diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..31081eef35d571ca988229fcbee6f40e5eca063c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/kaldi_io.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/kaldi_io.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cde7315a4d38db997afb2bcc7966a286d5b54750 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/kaldi_io.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/version.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/version.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ef1c95378e9d2ba99398d2f9839962d368cdf76 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/__pycache__/version.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..42a833d1a19edb523aeb76aac260eb79db21fe58 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__init__.py @@ -0,0 +1,61 @@ +from typing import List, Optional + +from torchaudio._internal.module_utils import deprecated + +from . import utils +from .common import AudioMetaData + +__all__ = [ + "AudioMetaData", + "load", + "info", + "save", + "list_audio_backends", + "get_audio_backend", + "set_audio_backend", +] + + +info = utils.get_info_func() +load = utils.get_load_func() +save = utils.get_save_func() + + +def list_audio_backends() -> List[str]: + """List available backends + + Returns: + list of str: The list of available backends. + + The possible values are; ``"ffmpeg"``, ``"sox"`` and ``"soundfile"``. + """ + + return list(utils.get_available_backends().keys()) + + +# Temporary until global backend is removed +@deprecated("With dispatcher enabled, this function is no-op. You can remove the function call.") +def get_audio_backend() -> Optional[str]: + """Get the name of the current global backend + + Returns: + str or None: + If dispatcher mode is enabled, returns ``None`` otherwise, + the name of current backend or ``None`` (no backend is set). + """ + return None + + +# Temporary until global backend is removed +@deprecated("With dispatcher enabled, this function is no-op. You can remove the function call.") +def set_audio_backend(backend: Optional[str]): # noqa + """Set the global backend. + + This is a no-op when dispatcher mode is enabled. + + Args: + backend (str or None): Name of the backend. + One of ``"sox_io"`` or ``"soundfile"`` based on availability + of the system. If ``None`` is provided the current backend is unassigned. + """ + pass diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d4d0a672a0c6139dbdf307fc1aaa95e09c4cc69c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/backend.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/backend.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..44fd23b3632b0861a16fe1fa2ec07e021da0300f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/backend.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/common.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/common.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..47a18568e8399be1ae51c551f268c31c005927a9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/common.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/ffmpeg.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/ffmpeg.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0f6af88330f4a24bdaeb0006ec69c9ebd30591b5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/ffmpeg.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/soundfile.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/soundfile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3188034bdf72aee1e6fbf3c1fb090ac66614f5c8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/soundfile.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/soundfile_backend.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/soundfile_backend.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f50af94aa6468528c115ceb77957607981604a77 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/soundfile_backend.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/sox.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/sox.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..59fd61d1b751a86f6f9cf46297e23e6bcbbce819 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/sox.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..777ef99e6d3aafe70b4292c9686a2b96cf4508d4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/backend.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/backend.py new file mode 100644 index 0000000000000000000000000000000000000000..0cbf92f30d7d0e979e64019e6c7c4d4e6317cd2a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/backend.py @@ -0,0 +1,53 @@ +import os +from abc import ABC, abstractmethod +from typing import BinaryIO, Optional, Tuple, Union + +from torch import Tensor +from torchaudio.io import CodecConfig + +from .common import AudioMetaData + + +class Backend(ABC): + @staticmethod + @abstractmethod + def info(uri: Union[BinaryIO, str, os.PathLike], format: Optional[str], buffer_size: int = 4096) -> AudioMetaData: + raise NotImplementedError + + @staticmethod + @abstractmethod + def load( + uri: Union[BinaryIO, str, os.PathLike], + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, + ) -> Tuple[Tensor, int]: + raise NotImplementedError + + @staticmethod + @abstractmethod + def save( + uri: Union[BinaryIO, str, os.PathLike], + src: Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + compression: Optional[Union[CodecConfig, float, int]] = None, + ) -> None: + raise NotImplementedError + + @staticmethod + @abstractmethod + def can_decode(uri: Union[BinaryIO, str, os.PathLike], format: Optional[str]) -> bool: + raise NotImplementedError + + @staticmethod + @abstractmethod + def can_encode(uri: Union[BinaryIO, str, os.PathLike], format: Optional[str]) -> bool: + raise NotImplementedError diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/common.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/common.py new file mode 100644 index 0000000000000000000000000000000000000000..b3b68aa4ce8a375e2535c3c521489cc1801b000a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/common.py @@ -0,0 +1,52 @@ +class AudioMetaData: + """AudioMetaData() + + Return type of ``torchaudio.info`` function. + + :ivar int sample_rate: Sample rate + :ivar int num_frames: The number of frames + :ivar int num_channels: The number of channels + :ivar int bits_per_sample: The number of bits per sample. This is 0 for lossy formats, + or when it cannot be accurately inferred. + :ivar str encoding: Audio encoding + The values encoding can take are one of the following: + + * ``PCM_S``: Signed integer linear PCM + * ``PCM_U``: Unsigned integer linear PCM + * ``PCM_F``: Floating point linear PCM + * ``FLAC``: Flac, Free Lossless Audio Codec + * ``ULAW``: Mu-law + * ``ALAW``: A-law + * ``MP3`` : MP3, MPEG-1 Audio Layer III + * ``VORBIS``: OGG Vorbis + * ``AMR_WB``: Adaptive Multi-Rate Wideband + * ``AMR_NB``: Adaptive Multi-Rate Narrowband + * ``OPUS``: Opus + * ``HTK``: Single channel 16-bit PCM + * ``UNKNOWN`` : None of above + """ + + def __init__( + self, + sample_rate: int, + num_frames: int, + num_channels: int, + bits_per_sample: int, + encoding: str, + ): + self.sample_rate = sample_rate + self.num_frames = num_frames + self.num_channels = num_channels + self.bits_per_sample = bits_per_sample + self.encoding = encoding + + def __str__(self): + return ( + f"AudioMetaData(" + f"sample_rate={self.sample_rate}, " + f"num_frames={self.num_frames}, " + f"num_channels={self.num_channels}, " + f"bits_per_sample={self.bits_per_sample}, " + f"encoding={self.encoding}" + f")" + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/ffmpeg.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/ffmpeg.py new file mode 100644 index 0000000000000000000000000000000000000000..9b10ccdd67ac3849edb47f47e23df9187f3ed7ed --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/ffmpeg.py @@ -0,0 +1,334 @@ +import os +import re +import sys +from typing import BinaryIO, Optional, Tuple, Union + +import torch +import torchaudio + +from .backend import Backend +from .common import AudioMetaData + +InputType = Union[BinaryIO, str, os.PathLike] + + +def info_audio( + src: InputType, + format: Optional[str], + buffer_size: int = 4096, +) -> AudioMetaData: + s = torchaudio.io.StreamReader(src, format, None, buffer_size) + sinfo = s.get_src_stream_info(s.default_audio_stream) + if sinfo.num_frames == 0: + waveform = _load_audio(s) + num_frames = waveform.size(1) + else: + num_frames = sinfo.num_frames + return AudioMetaData( + int(sinfo.sample_rate), + num_frames, + sinfo.num_channels, + sinfo.bits_per_sample, + sinfo.codec.upper(), + ) + + +def _get_load_filter( + frame_offset: int = 0, + num_frames: int = -1, + convert: bool = True, +) -> Optional[str]: + if frame_offset < 0: + raise RuntimeError("Invalid argument: frame_offset must be non-negative. Found: {}".format(frame_offset)) + if num_frames == 0 or num_frames < -1: + raise RuntimeError("Invalid argument: num_frames must be -1 or greater than 0. Found: {}".format(num_frames)) + + # All default values -> no filter + if frame_offset == 0 and num_frames == -1 and not convert: + return None + # Only convert + aformat = "aformat=sample_fmts=fltp" + if frame_offset == 0 and num_frames == -1 and convert: + return aformat + # At least one of frame_offset or num_frames has non-default value + if num_frames > 0: + atrim = "atrim=start_sample={}:end_sample={}".format(frame_offset, frame_offset + num_frames) + else: + atrim = "atrim=start_sample={}".format(frame_offset) + if not convert: + return atrim + return "{},{}".format(atrim, aformat) + + +def _load_audio( + s: "torchaudio.io.StreamReader", + filter: Optional[str] = None, + channels_first: bool = True, +) -> torch.Tensor: + s.add_audio_stream(-1, -1, filter_desc=filter) + s.process_all_packets() + chunk = s.pop_chunks()[0] + if chunk is None: + raise RuntimeError("Failed to decode audio.") + waveform = chunk._elem + return waveform.T if channels_first else waveform + + +def load_audio( + src: InputType, + frame_offset: int = 0, + num_frames: int = -1, + convert: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, +) -> Tuple[torch.Tensor, int]: + if hasattr(src, "read") and format == "vorbis": + format = "ogg" + s = torchaudio.io.StreamReader(src, format, None, buffer_size) + sample_rate = int(s.get_src_stream_info(s.default_audio_stream).sample_rate) + filter = _get_load_filter(frame_offset, num_frames, convert) + waveform = _load_audio(s, filter, channels_first) + return waveform, sample_rate + + +def _get_sample_format(dtype: torch.dtype) -> str: + dtype_to_format = { + torch.uint8: "u8", + torch.int16: "s16", + torch.int32: "s32", + torch.int64: "s64", + torch.float32: "flt", + torch.float64: "dbl", + } + format = dtype_to_format.get(dtype) + if format is None: + raise ValueError(f"No format found for dtype {dtype}; dtype must be one of {list(dtype_to_format.keys())}.") + return format + + +def _native_endianness() -> str: + if sys.byteorder == "little": + return "le" + else: + return "be" + + +def _get_encoder_for_wav(encoding: str, bits_per_sample: int) -> str: + if bits_per_sample not in {None, 8, 16, 24, 32, 64}: + raise ValueError(f"Invalid bits_per_sample {bits_per_sample} for WAV encoding.") + endianness = _native_endianness() + if not encoding: + if not bits_per_sample: + # default to PCM S16 + return f"pcm_s16{endianness}" + if bits_per_sample == 8: + return "pcm_u8" + return f"pcm_s{bits_per_sample}{endianness}" + if encoding == "PCM_S": + if not bits_per_sample: + bits_per_sample = 16 + if bits_per_sample == 8: + raise ValueError("For WAV signed PCM, 8-bit encoding is not supported.") + return f"pcm_s{bits_per_sample}{endianness}" + if encoding == "PCM_U": + if bits_per_sample in (None, 8): + return "pcm_u8" + raise ValueError("For WAV unsigned PCM, only 8-bit encoding is supported.") + if encoding == "PCM_F": + if not bits_per_sample: + bits_per_sample = 32 + if bits_per_sample in (32, 64): + return f"pcm_f{bits_per_sample}{endianness}" + raise ValueError("For WAV float PCM, only 32- and 64-bit encodings are supported.") + if encoding == "ULAW": + if bits_per_sample in (None, 8): + return "pcm_mulaw" + raise ValueError("For WAV PCM mu-law, only 8-bit encoding is supported.") + if encoding == "ALAW": + if bits_per_sample in (None, 8): + return "pcm_alaw" + raise ValueError("For WAV PCM A-law, only 8-bit encoding is supported.") + raise ValueError(f"WAV encoding {encoding} is not supported.") + + +def _get_flac_sample_fmt(bps): + if bps is None or bps == 16: + return "s16" + if bps == 24: + return "s32" + raise ValueError(f"FLAC only supports bits_per_sample values of 16 and 24 ({bps} specified).") + + +def _parse_save_args( + ext: Optional[str], + format: Optional[str], + encoding: Optional[str], + bps: Optional[int], +): + # torchaudio's save function accepts the followings, which do not 1to1 map + # to FFmpeg. + # + # - format: audio format + # - bits_per_sample: encoder sample format + # - encoding: such as PCM_U8. + # + # In FFmpeg, format is specified with the following three (and more) + # + # - muxer: could be audio format or container format. + # the one we passed to the constructor of StreamWriter + # - encoder: the audio encoder used to encode audio + # - encoder sample format: the format used by encoder to encode audio. + # + # If encoder sample format is different from source sample format, StreamWriter + # will insert a filter automatically. + # + def _type(spec): + # either format is exactly the specified one + # or extension matches to the spec AND there is no format override. + return format == spec or (format is None and ext == spec) + + if _type("wav") or _type("amb"): + # wav is special because it supports different encoding through encoders + # each encoder only supports one encoder format + # + # amb format is a special case originated from libsox. + # It is basically a WAV format, with slight modification. + # https://github.com/chirlu/sox/commit/4a4ea33edbca5972a1ed8933cc3512c7302fa67a#diff-39171191a858add9df87f5f210a34a776ac2c026842ae6db6ce97f5e68836795 + # It is a format so that decoders will recognize it as ambisonic. + # https://www.ambisonia.com/Members/mleese/file-format-for-b-format/ + # FFmpeg does not recognize amb because it is basically a WAV format. + muxer = "wav" + encoder = _get_encoder_for_wav(encoding, bps) + sample_fmt = None + elif _type("vorbis"): + # FFpmeg does not recognize vorbis extension, while libsox used to do. + # For the sake of bakward compatibility, (and the simplicity), + # we support the case where users want to do save("foo.vorbis") + muxer = "ogg" + encoder = "vorbis" + sample_fmt = None + else: + muxer = format + encoder = None + sample_fmt = None + if _type("flac"): + sample_fmt = _get_flac_sample_fmt(bps) + if _type("ogg"): + sample_fmt = _get_flac_sample_fmt(bps) + return muxer, encoder, sample_fmt + + +def save_audio( + uri: InputType, + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + compression: Optional[torchaudio.io.CodecConfig] = None, +) -> None: + ext = None + if hasattr(uri, "write"): + if format is None: + raise RuntimeError("'format' is required when saving to file object.") + else: + uri = os.path.normpath(uri) + if tokens := str(uri).split(".")[1:]: + ext = tokens[-1].lower() + + muxer, encoder, enc_fmt = _parse_save_args(ext, format, encoding, bits_per_sample) + + if channels_first: + src = src.T + + s = torchaudio.io.StreamWriter(uri, format=muxer, buffer_size=buffer_size) + s.add_audio_stream( + sample_rate, + num_channels=src.size(-1), + format=_get_sample_format(src.dtype), + encoder=encoder, + encoder_format=enc_fmt, + codec_config=compression, + ) + with s.open(): + s.write_audio_chunk(0, src) + + +def _map_encoding(encoding: str) -> str: + for dst in ["PCM_S", "PCM_U", "PCM_F"]: + if dst in encoding: + return dst + if encoding == "PCM_MULAW": + return "ULAW" + elif encoding == "PCM_ALAW": + return "ALAW" + return encoding + + +def _get_bits_per_sample(encoding: str, bits_per_sample: int) -> str: + if m := re.search(r"PCM_\w(\d+)\w*", encoding): + return int(m.group(1)) + elif encoding in ["PCM_ALAW", "PCM_MULAW"]: + return 8 + return bits_per_sample + + +class FFmpegBackend(Backend): + @staticmethod + def info(uri: InputType, format: Optional[str], buffer_size: int = 4096) -> AudioMetaData: + metadata = info_audio(uri, format, buffer_size) + metadata.bits_per_sample = _get_bits_per_sample(metadata.encoding, metadata.bits_per_sample) + metadata.encoding = _map_encoding(metadata.encoding) + return metadata + + @staticmethod + def load( + uri: InputType, + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, + ) -> Tuple[torch.Tensor, int]: + return load_audio(uri, frame_offset, num_frames, normalize, channels_first, format) + + @staticmethod + def save( + uri: InputType, + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + compression: Optional[Union[torchaudio.io.CodecConfig, float, int]] = None, + ) -> None: + if not isinstance(compression, (torchaudio.io.CodecConfig, type(None))): + raise ValueError( + "FFmpeg backend expects non-`None` value for argument `compression` to be of ", + f"type `torchaudio.io.CodecConfig`, but received value of type {type(compression)}", + ) + save_audio( + uri, + src, + sample_rate, + channels_first, + format, + encoding, + bits_per_sample, + buffer_size, + compression, + ) + + @staticmethod + def can_decode(uri: InputType, format: Optional[str]) -> bool: + return True + + @staticmethod + def can_encode(uri: InputType, format: Optional[str]) -> bool: + return True diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/soundfile.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/soundfile.py new file mode 100644 index 0000000000000000000000000000000000000000..d0ac8f0837264e43a810feb675470da5220dc9a6 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/soundfile.py @@ -0,0 +1,54 @@ +import os +from typing import BinaryIO, Optional, Tuple, Union + +import torch +from torchaudio.io import CodecConfig + +from . import soundfile_backend +from .backend import Backend +from .common import AudioMetaData + + +class SoundfileBackend(Backend): + @staticmethod + def info(uri: Union[BinaryIO, str, os.PathLike], format: Optional[str], buffer_size: int = 4096) -> AudioMetaData: + return soundfile_backend.info(uri, format) + + @staticmethod + def load( + uri: Union[BinaryIO, str, os.PathLike], + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, + ) -> Tuple[torch.Tensor, int]: + return soundfile_backend.load(uri, frame_offset, num_frames, normalize, channels_first, format) + + @staticmethod + def save( + uri: Union[BinaryIO, str, os.PathLike], + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + compression: Optional[Union[CodecConfig, float, int]] = None, + ) -> None: + if compression: + raise ValueError("soundfile backend does not support argument `compression`.") + + soundfile_backend.save( + uri, src, sample_rate, channels_first, format=format, encoding=encoding, bits_per_sample=bits_per_sample + ) + + @staticmethod + def can_decode(uri, format) -> bool: + return True + + @staticmethod + def can_encode(uri, format) -> bool: + return True diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/soundfile_backend.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/soundfile_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..df3eea6aba85fa3bfc3ac0b069572aa4e33e03c8 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/soundfile_backend.py @@ -0,0 +1,457 @@ +"""The new soundfile backend which will become default in 0.8.0 onward""" +import warnings +from typing import Optional, Tuple + +import torch +from torchaudio._internal import module_utils as _mod_utils + +from .common import AudioMetaData + + +_IS_SOUNDFILE_AVAILABLE = False + +# TODO: import soundfile only when it is used. +if _mod_utils.is_module_available("soundfile"): + try: + import soundfile + + _requires_soundfile = _mod_utils.no_op + _IS_SOUNDFILE_AVAILABLE = True + except Exception: + _requires_soundfile = _mod_utils.fail_with_message( + "requires soundfile, but we failed to import it. Please check the installation of soundfile." + ) +else: + _requires_soundfile = _mod_utils.fail_with_message( + "requires soundfile, but it is not installed. Please install soundfile." + ) + + +# Mapping from soundfile subtype to number of bits per sample. +# This is mostly heuristical and the value is set to 0 when it is irrelevant +# (lossy formats) or when it can't be inferred. +# For ADPCM (and G72X) subtypes, it's hard to infer the bit depth because it's not part of the standard: +# According to https://en.wikipedia.org/wiki/Adaptive_differential_pulse-code_modulation#In_telephony, +# the default seems to be 8 bits but it can be compressed further to 4 bits. +# The dict is inspired from +# https://github.com/bastibe/python-soundfile/blob/744efb4b01abc72498a96b09115b42a4cabd85e4/soundfile.py#L66-L94 +_SUBTYPE_TO_BITS_PER_SAMPLE = { + "PCM_S8": 8, # Signed 8 bit data + "PCM_16": 16, # Signed 16 bit data + "PCM_24": 24, # Signed 24 bit data + "PCM_32": 32, # Signed 32 bit data + "PCM_U8": 8, # Unsigned 8 bit data (WAV and RAW only) + "FLOAT": 32, # 32 bit float data + "DOUBLE": 64, # 64 bit float data + "ULAW": 8, # U-Law encoded. See https://en.wikipedia.org/wiki/G.711#Types + "ALAW": 8, # A-Law encoded. See https://en.wikipedia.org/wiki/G.711#Types + "IMA_ADPCM": 0, # IMA ADPCM. + "MS_ADPCM": 0, # Microsoft ADPCM. + "GSM610": 0, # GSM 6.10 encoding. (Wikipedia says 1.625 bit depth?? https://en.wikipedia.org/wiki/Full_Rate) + "VOX_ADPCM": 0, # OKI / Dialogix ADPCM + "G721_32": 0, # 32kbs G721 ADPCM encoding. + "G723_24": 0, # 24kbs G723 ADPCM encoding. + "G723_40": 0, # 40kbs G723 ADPCM encoding. + "DWVW_12": 12, # 12 bit Delta Width Variable Word encoding. + "DWVW_16": 16, # 16 bit Delta Width Variable Word encoding. + "DWVW_24": 24, # 24 bit Delta Width Variable Word encoding. + "DWVW_N": 0, # N bit Delta Width Variable Word encoding. + "DPCM_8": 8, # 8 bit differential PCM (XI only) + "DPCM_16": 16, # 16 bit differential PCM (XI only) + "VORBIS": 0, # Xiph Vorbis encoding. (lossy) + "ALAC_16": 16, # Apple Lossless Audio Codec (16 bit). + "ALAC_20": 20, # Apple Lossless Audio Codec (20 bit). + "ALAC_24": 24, # Apple Lossless Audio Codec (24 bit). + "ALAC_32": 32, # Apple Lossless Audio Codec (32 bit). +} + + +def _get_bit_depth(subtype): + if subtype not in _SUBTYPE_TO_BITS_PER_SAMPLE: + warnings.warn( + f"The {subtype} subtype is unknown to TorchAudio. As a result, the bits_per_sample " + "attribute will be set to 0. If you are seeing this warning, please " + "report by opening an issue on github (after checking for existing/closed ones). " + "You may otherwise ignore this warning." + ) + return _SUBTYPE_TO_BITS_PER_SAMPLE.get(subtype, 0) + + +_SUBTYPE_TO_ENCODING = { + "PCM_S8": "PCM_S", + "PCM_16": "PCM_S", + "PCM_24": "PCM_S", + "PCM_32": "PCM_S", + "PCM_U8": "PCM_U", + "FLOAT": "PCM_F", + "DOUBLE": "PCM_F", + "ULAW": "ULAW", + "ALAW": "ALAW", + "VORBIS": "VORBIS", +} + + +def _get_encoding(format: str, subtype: str): + if format == "FLAC": + return "FLAC" + return _SUBTYPE_TO_ENCODING.get(subtype, "UNKNOWN") + + +@_requires_soundfile +def info(filepath: str, format: Optional[str] = None) -> AudioMetaData: + """Get signal information of an audio file. + + Note: + ``filepath`` argument is intentionally annotated as ``str`` only, even though it accepts + ``pathlib.Path`` object as well. This is for the consistency with ``"sox_io"`` backend, + which has a restriction on type annotation due to TorchScript compiler compatiblity. + + Args: + filepath (path-like object or file-like object): + Source of audio data. + format (str or None, optional): + Not used. PySoundFile does not accept format hint. + + Returns: + AudioMetaData: meta data of the given audio. + + """ + sinfo = soundfile.info(filepath) + return AudioMetaData( + sinfo.samplerate, + sinfo.frames, + sinfo.channels, + bits_per_sample=_get_bit_depth(sinfo.subtype), + encoding=_get_encoding(sinfo.format, sinfo.subtype), + ) + + +_SUBTYPE2DTYPE = { + "PCM_S8": "int8", + "PCM_U8": "uint8", + "PCM_16": "int16", + "PCM_32": "int32", + "FLOAT": "float32", + "DOUBLE": "float64", +} + + +@_requires_soundfile +def load( + filepath: str, + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, +) -> Tuple[torch.Tensor, int]: + """Load audio data from file. + + Note: + The formats this function can handle depend on the soundfile installation. + This function is tested on the following formats; + + * WAV + + * 32-bit floating-point + * 32-bit signed integer + * 16-bit signed integer + * 8-bit unsigned integer + + * FLAC + * OGG/VORBIS + * SPHERE + + By default (``normalize=True``, ``channels_first=True``), this function returns Tensor with + ``float32`` dtype, and the shape of `[channel, time]`. + + .. warning:: + + ``normalize`` argument does not perform volume normalization. + It only converts the sample type to `torch.float32` from the native sample + type. + + When the input format is WAV with integer type, such as 32-bit signed integer, 16-bit + signed integer, 24-bit signed integer, and 8-bit unsigned integer, by providing ``normalize=False``, + this function can return integer Tensor, where the samples are expressed within the whole range + of the corresponding dtype, that is, ``int32`` tensor for 32-bit signed PCM, + ``int16`` for 16-bit signed PCM and ``uint8`` for 8-bit unsigned PCM. Since torch does not + support ``int24`` dtype, 24-bit signed PCM are converted to ``int32`` tensors. + + ``normalize`` argument has no effect on 32-bit floating-point WAV and other formats, such as + ``flac`` and ``mp3``. + + For these formats, this function always returns ``float32`` Tensor with values. + + Note: + ``filepath`` argument is intentionally annotated as ``str`` only, even though it accepts + ``pathlib.Path`` object as well. This is for the consistency with ``"sox_io"`` backend, + which has a restriction on type annotation due to TorchScript compiler compatiblity. + + Args: + filepath (path-like object or file-like object): + Source of audio data. + frame_offset (int, optional): + Number of frames to skip before start reading data. + num_frames (int, optional): + Maximum number of frames to read. ``-1`` reads all the remaining samples, + starting from ``frame_offset``. + This function may return the less number of frames if there is not enough + frames in the given file. + normalize (bool, optional): + When ``True``, this function converts the native sample type to ``float32``. + Default: ``True``. + + If input file is integer WAV, giving ``False`` will change the resulting Tensor type to + integer type. + This argument has no effect for formats other than integer WAV type. + + channels_first (bool, optional): + When True, the returned Tensor has dimension `[channel, time]`. + Otherwise, the returned Tensor's dimension is `[time, channel]`. + format (str or None, optional): + Not used. PySoundFile does not accept format hint. + + Returns: + (torch.Tensor, int): Resulting Tensor and sample rate. + If the input file has integer wav format and normalization is off, then it has + integer type, else ``float32`` type. If ``channels_first=True``, it has + `[channel, time]` else `[time, channel]`. + """ + with soundfile.SoundFile(filepath, "r") as file_: + if file_.format != "WAV" or normalize: + dtype = "float32" + elif file_.subtype not in _SUBTYPE2DTYPE: + raise ValueError(f"Unsupported subtype: {file_.subtype}") + else: + dtype = _SUBTYPE2DTYPE[file_.subtype] + + frames = file_._prepare_read(frame_offset, None, num_frames) + waveform = file_.read(frames, dtype, always_2d=True) + sample_rate = file_.samplerate + + waveform = torch.from_numpy(waveform) + if channels_first: + waveform = waveform.t() + return waveform, sample_rate + + +def _get_subtype_for_wav(dtype: torch.dtype, encoding: str, bits_per_sample: int): + if not encoding: + if not bits_per_sample: + subtype = { + torch.uint8: "PCM_U8", + torch.int16: "PCM_16", + torch.int32: "PCM_32", + torch.float32: "FLOAT", + torch.float64: "DOUBLE", + }.get(dtype) + if not subtype: + raise ValueError(f"Unsupported dtype for wav: {dtype}") + return subtype + if bits_per_sample == 8: + return "PCM_U8" + return f"PCM_{bits_per_sample}" + if encoding == "PCM_S": + if not bits_per_sample: + return "PCM_32" + if bits_per_sample == 8: + raise ValueError("wav does not support 8-bit signed PCM encoding.") + return f"PCM_{bits_per_sample}" + if encoding == "PCM_U": + if bits_per_sample in (None, 8): + return "PCM_U8" + raise ValueError("wav only supports 8-bit unsigned PCM encoding.") + if encoding == "PCM_F": + if bits_per_sample in (None, 32): + return "FLOAT" + if bits_per_sample == 64: + return "DOUBLE" + raise ValueError("wav only supports 32/64-bit float PCM encoding.") + if encoding == "ULAW": + if bits_per_sample in (None, 8): + return "ULAW" + raise ValueError("wav only supports 8-bit mu-law encoding.") + if encoding == "ALAW": + if bits_per_sample in (None, 8): + return "ALAW" + raise ValueError("wav only supports 8-bit a-law encoding.") + raise ValueError(f"wav does not support {encoding}.") + + +def _get_subtype_for_sphere(encoding: str, bits_per_sample: int): + if encoding in (None, "PCM_S"): + return f"PCM_{bits_per_sample}" if bits_per_sample else "PCM_32" + if encoding in ("PCM_U", "PCM_F"): + raise ValueError(f"sph does not support {encoding} encoding.") + if encoding == "ULAW": + if bits_per_sample in (None, 8): + return "ULAW" + raise ValueError("sph only supports 8-bit for mu-law encoding.") + if encoding == "ALAW": + return "ALAW" + raise ValueError(f"sph does not support {encoding}.") + + +def _get_subtype(dtype: torch.dtype, format: str, encoding: str, bits_per_sample: int): + if format == "wav": + return _get_subtype_for_wav(dtype, encoding, bits_per_sample) + if format == "flac": + if encoding: + raise ValueError("flac does not support encoding.") + if not bits_per_sample: + return "PCM_16" + if bits_per_sample > 24: + raise ValueError("flac does not support bits_per_sample > 24.") + return "PCM_S8" if bits_per_sample == 8 else f"PCM_{bits_per_sample}" + if format in ("ogg", "vorbis"): + if bits_per_sample: + raise ValueError("ogg/vorbis does not support bits_per_sample.") + if encoding is None or encoding == "vorbis": + return "VORBIS" + if encoding == "opus": + return "OPUS" + raise ValueError(f"Unexpected encoding: {encoding}") + if format == "mp3": + return "MPEG_LAYER_III" + if format == "sph": + return _get_subtype_for_sphere(encoding, bits_per_sample) + if format in ("nis", "nist"): + return "PCM_16" + raise ValueError(f"Unsupported format: {format}") + + +@_requires_soundfile +def save( + filepath: str, + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + compression: Optional[float] = None, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, +): + """Save audio data to file. + + Note: + The formats this function can handle depend on the soundfile installation. + This function is tested on the following formats; + + * WAV + + * 32-bit floating-point + * 32-bit signed integer + * 16-bit signed integer + * 8-bit unsigned integer + + * FLAC + * OGG/VORBIS + * SPHERE + + Note: + ``filepath`` argument is intentionally annotated as ``str`` only, even though it accepts + ``pathlib.Path`` object as well. This is for the consistency with ``"sox_io"`` backend, + which has a restriction on type annotation due to TorchScript compiler compatiblity. + + Args: + filepath (str or pathlib.Path): Path to audio file. + src (torch.Tensor): Audio data to save. must be 2D tensor. + sample_rate (int): sampling rate + channels_first (bool, optional): If ``True``, the given tensor is interpreted as `[channel, time]`, + otherwise `[time, channel]`. + compression (float of None, optional): Not used. + It is here only for interface compatibility reson with "sox_io" backend. + format (str or None, optional): Override the audio format. + When ``filepath`` argument is path-like object, audio format is + inferred from file extension. If the file extension is missing or + different, you can specify the correct format with this argument. + + When ``filepath`` argument is file-like object, + this argument is required. + + Valid values are ``"wav"``, ``"ogg"``, ``"vorbis"``, + ``"flac"`` and ``"sph"``. + encoding (str or None, optional): Changes the encoding for supported formats. + This argument is effective only for supported formats, sush as + ``"wav"``, ``""flac"`` and ``"sph"``. Valid values are; + + - ``"PCM_S"`` (signed integer Linear PCM) + - ``"PCM_U"`` (unsigned integer Linear PCM) + - ``"PCM_F"`` (floating point PCM) + - ``"ULAW"`` (mu-law) + - ``"ALAW"`` (a-law) + + bits_per_sample (int or None, optional): Changes the bit depth for the + supported formats. + When ``format`` is one of ``"wav"``, ``"flac"`` or ``"sph"``, + you can change the bit depth. + Valid values are ``8``, ``16``, ``24``, ``32`` and ``64``. + + Supported formats/encodings/bit depth/compression are: + + ``"wav"`` + - 32-bit floating-point PCM + - 32-bit signed integer PCM + - 24-bit signed integer PCM + - 16-bit signed integer PCM + - 8-bit unsigned integer PCM + - 8-bit mu-law + - 8-bit a-law + + Note: + Default encoding/bit depth is determined by the dtype of + the input Tensor. + + ``"flac"`` + - 8-bit + - 16-bit (default) + - 24-bit + + ``"ogg"``, ``"vorbis"`` + - Doesn't accept changing configuration. + + ``"sph"`` + - 8-bit signed integer PCM + - 16-bit signed integer PCM + - 24-bit signed integer PCM + - 32-bit signed integer PCM (default) + - 8-bit mu-law + - 8-bit a-law + - 16-bit a-law + - 24-bit a-law + - 32-bit a-law + + """ + if src.ndim != 2: + raise ValueError(f"Expected 2D Tensor, got {src.ndim}D.") + if compression is not None: + warnings.warn( + '`save` function of "soundfile" backend does not support "compression" parameter. ' + "The argument is silently ignored." + ) + if hasattr(filepath, "write"): + if format is None: + raise RuntimeError("`format` is required when saving to file object.") + ext = format.lower() + else: + ext = str(filepath).split(".")[-1].lower() + + if bits_per_sample not in (None, 8, 16, 24, 32, 64): + raise ValueError("Invalid bits_per_sample.") + if bits_per_sample == 24: + warnings.warn( + "Saving audio with 24 bits per sample might warp samples near -1. " + "Using 16 bits per sample might be able to avoid this." + ) + subtype = _get_subtype(src.dtype, ext, encoding, bits_per_sample) + + # sph is a extension used in TED-LIUM but soundfile does not recognize it as NIST format, + # so we extend the extensions manually here + if ext in ["nis", "nist", "sph"] and format is None: + format = "NIST" + + if channels_first: + src = src.t() + + soundfile.write(file=filepath, data=src, samplerate=sample_rate, subtype=subtype, format=format) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/sox.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/sox.py new file mode 100644 index 0000000000000000000000000000000000000000..ed03d329ea2fe5f9a35fa191feca82e68024e1c3 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/sox.py @@ -0,0 +1,91 @@ +import os +from typing import BinaryIO, Optional, Tuple, Union + +import torch +import torchaudio + +from .backend import Backend +from .common import AudioMetaData + +sox_ext = torchaudio._extension.lazy_import_sox_ext() + + +class SoXBackend(Backend): + @staticmethod + def info(uri: Union[BinaryIO, str, os.PathLike], format: Optional[str], buffer_size: int = 4096) -> AudioMetaData: + if hasattr(uri, "read"): + raise ValueError( + "SoX backend does not support reading from file-like objects. ", + "Please use an alternative backend that does support reading from file-like objects, e.g. FFmpeg.", + ) + else: + sinfo = sox_ext.get_info(uri, format) + if sinfo: + return AudioMetaData(*sinfo) + else: + raise RuntimeError(f"Failed to fetch metadata for {uri}.") + + @staticmethod + def load( + uri: Union[BinaryIO, str, os.PathLike], + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, + ) -> Tuple[torch.Tensor, int]: + if hasattr(uri, "read"): + raise ValueError( + "SoX backend does not support loading from file-like objects. ", + "Please use an alternative backend that does support loading from file-like objects, e.g. FFmpeg.", + ) + else: + ret = sox_ext.load_audio_file(uri, frame_offset, num_frames, normalize, channels_first, format) + if not ret: + raise RuntimeError(f"Failed to load audio from {uri}.") + return ret + + @staticmethod + def save( + uri: Union[BinaryIO, str, os.PathLike], + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + compression: Optional[Union[torchaudio.io.CodecConfig, float, int]] = None, + ) -> None: + if not isinstance(compression, (float, int, type(None))): + raise ValueError( + "SoX backend expects non-`None` value for argument `compression` to be of ", + f"type `float` or `int`, but received value of type {type(compression)}", + ) + if hasattr(uri, "write"): + raise ValueError( + "SoX backend does not support writing to file-like objects. ", + "Please use an alternative backend that does support writing to file-like objects, e.g. FFmpeg.", + ) + else: + sox_ext.save_audio_file( + uri, + src, + sample_rate, + channels_first, + compression, + format, + encoding, + bits_per_sample, + ) + + @staticmethod + def can_decode(uri: Union[BinaryIO, str, os.PathLike], format: Optional[str]) -> bool: + # i.e. not a file-like object. + return not hasattr(uri, "read") + + @staticmethod + def can_encode(uri: Union[BinaryIO, str, os.PathLike], format: Optional[str]) -> bool: + # i.e. not a file-like object. + return not hasattr(uri, "write") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..1b072656ba2e3aebccabf39e051176198b58a7c5 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_backend/utils.py @@ -0,0 +1,317 @@ +import os +from functools import lru_cache +from typing import BinaryIO, Dict, Optional, Tuple, Type, Union + +import torch + +from torchaudio._extension import lazy_import_sox_ext +from torchaudio.io import CodecConfig +from torio._extension import lazy_import_ffmpeg_ext + +from . import soundfile_backend + +from .backend import Backend +from .common import AudioMetaData +from .ffmpeg import FFmpegBackend +from .soundfile import SoundfileBackend +from .sox import SoXBackend + + +@lru_cache(None) +def get_available_backends() -> Dict[str, Type[Backend]]: + backend_specs: Dict[str, Type[Backend]] = {} + if lazy_import_ffmpeg_ext().is_available(): + backend_specs["ffmpeg"] = FFmpegBackend + if lazy_import_sox_ext().is_available(): + backend_specs["sox"] = SoXBackend + if soundfile_backend._IS_SOUNDFILE_AVAILABLE: + backend_specs["soundfile"] = SoundfileBackend + return backend_specs + + +def get_backend(backend_name, backends) -> Backend: + if backend := backends.get(backend_name): + return backend + else: + raise ValueError( + f"Unsupported backend '{backend_name}' specified; ", + f"please select one of {list(backends.keys())} instead.", + ) + + +def get_info_func(): + backends = get_available_backends() + + def dispatcher( + uri: Union[BinaryIO, str, os.PathLike], format: Optional[str], backend_name: Optional[str] + ) -> Backend: + if backend_name is not None: + return get_backend(backend_name, backends) + + for backend in backends.values(): + if backend.can_decode(uri, format): + return backend + raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.") + + def info( + uri: Union[BinaryIO, str, os.PathLike], + format: Optional[str] = None, + buffer_size: int = 4096, + backend: Optional[str] = None, + ) -> AudioMetaData: + """Get signal information of an audio file. + + Note: + When the input type is file-like object, this function cannot + get the correct length (``num_samples``) for certain formats, + such as ``vorbis``. + In this case, the value of ``num_samples`` is ``0``. + + Args: + uri (path-like object or file-like object): + Source of audio data. The following types are accepted: + + * ``path-like``: File path or URL. + * ``file-like``: Object with ``read(size: int) -> bytes`` method, + which returns byte string of at most ``size`` length. + + format (str or None, optional): + If not ``None``, interpreted as hint that may allow backend to override the detected format. + (Default: ``None``) + + buffer_size (int, optional): + Size of buffer to use when processing file-like objects, in bytes. (Default: ``4096``) + + backend (str or None, optional): + I/O backend to use. + If ``None``, function selects backend given input and available backends. + Otherwise, must be one of [``"ffmpeg"``, ``"sox"``, ``"soundfile"``], + with the corresponding backend available. + (Default: ``None``) + + .. seealso:: + :ref:`backend` + + Returns: + AudioMetaData + """ + backend = dispatcher(uri, format, backend) + return backend.info(uri, format, buffer_size) + + return info + + +def get_load_func(): + backends = get_available_backends() + + def dispatcher( + uri: Union[BinaryIO, str, os.PathLike], format: Optional[str], backend_name: Optional[str] + ) -> Backend: + if backend_name is not None: + return get_backend(backend_name, backends) + + for backend in backends.values(): + if backend.can_decode(uri, format): + return backend + raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.") + + def load( + uri: Union[BinaryIO, str, os.PathLike], + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, + buffer_size: int = 4096, + backend: Optional[str] = None, + ) -> Tuple[torch.Tensor, int]: + """Load audio data from source. + + By default (``normalize=True``, ``channels_first=True``), this function returns Tensor with + ``float32`` dtype, and the shape of `[channel, time]`. + + Note: + The formats this function can handle depend on the availability of backends. + Please use the following functions to fetch the supported formats. + + - FFmpeg: :py:func:`torchaudio.utils.ffmpeg_utils.get_audio_decoders` + - Sox: :py:func:`torchaudio.utils.sox_utils.list_read_formats` + - SoundFile: Refer to `the official document `__. + + .. warning:: + + ``normalize`` argument does not perform volume normalization. + It only converts the sample type to `torch.float32` from the native sample + type. + + When the input format is WAV with integer type, such as 32-bit signed integer, 16-bit + signed integer, 24-bit signed integer, and 8-bit unsigned integer, by providing ``normalize=False``, + this function can return integer Tensor, where the samples are expressed within the whole range + of the corresponding dtype, that is, ``int32`` tensor for 32-bit signed PCM, + ``int16`` for 16-bit signed PCM and ``uint8`` for 8-bit unsigned PCM. Since torch does not + support ``int24`` dtype, 24-bit signed PCM are converted to ``int32`` tensors. + + ``normalize`` argument has no effect on 32-bit floating-point WAV and other formats, such as + ``flac`` and ``mp3``. + + For these formats, this function always returns ``float32`` Tensor with values. + + + Args: + uri (path-like object or file-like object): + Source of audio data. + frame_offset (int, optional): + Number of frames to skip before start reading data. + num_frames (int, optional): + Maximum number of frames to read. ``-1`` reads all the remaining samples, + starting from ``frame_offset``. + This function may return the less number of frames if there is not enough + frames in the given file. + normalize (bool, optional): + When ``True``, this function converts the native sample type to ``float32``. + Default: ``True``. + + If input file is integer WAV, giving ``False`` will change the resulting Tensor type to + integer type. + This argument has no effect for formats other than integer WAV type. + + channels_first (bool, optional): + When True, the returned Tensor has dimension `[channel, time]`. + Otherwise, the returned Tensor's dimension is `[time, channel]`. + + format (str or None, optional): + If not ``None``, interpreted as hint that may allow backend to override the detected format. + (Default: ``None``) + + buffer_size (int, optional): + Size of buffer to use when processing file-like objects, in bytes. (Default: ``4096``) + + backend (str or None, optional): + I/O backend to use. + If ``None``, function selects backend given input and available backends. + Otherwise, must be one of [``"ffmpeg"``, ``"sox"``, ``"soundfile"``], + with the corresponding backend being available. (Default: ``None``) + + .. seealso:: + :ref:`backend` + + Returns: + (torch.Tensor, int): Resulting Tensor and sample rate. + If the input file has integer wav format and normalization is off, then it has + integer type, else ``float32`` type. If ``channels_first=True``, it has + `[channel, time]` else `[time, channel]`. + """ + backend = dispatcher(uri, format, backend) + return backend.load(uri, frame_offset, num_frames, normalize, channels_first, format, buffer_size) + + return load + + +def get_save_func(): + backends = get_available_backends() + + def dispatcher( + uri: Union[BinaryIO, str, os.PathLike], format: Optional[str], backend_name: Optional[str] + ) -> Backend: + if backend_name is not None: + return get_backend(backend_name, backends) + + for backend in backends.values(): + if backend.can_encode(uri, format): + return backend + raise RuntimeError(f"Couldn't find appropriate backend to handle uri {uri} and format {format}.") + + def save( + uri: Union[BinaryIO, str, os.PathLike], + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, + buffer_size: int = 4096, + backend: Optional[str] = None, + compression: Optional[Union[CodecConfig, float, int]] = None, + ): + """Save audio data to file. + + Note: + The formats this function can handle depend on the availability of backends. + Please use the following functions to fetch the supported formats. + + - FFmpeg: :py:func:`torchaudio.utils.ffmpeg_utils.get_audio_encoders` + - Sox: :py:func:`torchaudio.utils.sox_utils.list_write_formats` + - SoundFile: Refer to `the official document `__. + + Args: + uri (str or pathlib.Path): Path to audio file. + src (torch.Tensor): Audio data to save. must be 2D tensor. + sample_rate (int): sampling rate + channels_first (bool, optional): If ``True``, the given tensor is interpreted as `[channel, time]`, + otherwise `[time, channel]`. + format (str or None, optional): Override the audio format. + When ``uri`` argument is path-like object, audio format is + inferred from file extension. If the file extension is missing or + different, you can specify the correct format with this argument. + + When ``uri`` argument is file-like object, + this argument is required. + + Valid values are ``"wav"``, ``"ogg"``, and ``"flac"``. + encoding (str or None, optional): Changes the encoding for supported formats. + This argument is effective only for supported formats, i.e. + ``"wav"`` and ``""flac"```. Valid values are + + - ``"PCM_S"`` (signed integer Linear PCM) + - ``"PCM_U"`` (unsigned integer Linear PCM) + - ``"PCM_F"`` (floating point PCM) + - ``"ULAW"`` (mu-law) + - ``"ALAW"`` (a-law) + + bits_per_sample (int or None, optional): Changes the bit depth for the + supported formats. + When ``format`` is one of ``"wav"`` and ``"flac"``, + you can change the bit depth. + Valid values are ``8``, ``16``, ``24``, ``32`` and ``64``. + + buffer_size (int, optional): + Size of buffer to use when processing file-like objects, in bytes. (Default: ``4096``) + + backend (str or None, optional): + I/O backend to use. + If ``None``, function selects backend given input and available backends. + Otherwise, must be one of [``"ffmpeg"``, ``"sox"``, ``"soundfile"``], + with the corresponding backend being available. + (Default: ``None``) + + .. seealso:: + :ref:`backend` + + compression (CodecConfig, float, int, or None, optional): + Compression configuration to apply. + + If the selected backend is FFmpeg, an instance of :py:class:`CodecConfig` must be provided. + + Otherwise, if the selected backend is SoX, a float or int value corresponding to option ``-C`` of the + ``sox`` command line interface must be provided. For instance: + + ``"mp3"`` + Either bitrate (in ``kbps``) with quality factor, such as ``128.2``, or + VBR encoding with quality factor such as ``-4.2``. Default: ``-4.5``. + + ``"flac"`` + Whole number from ``0`` to ``8``. ``8`` is default and highest compression. + + ``"ogg"``, ``"vorbis"`` + Number from ``-1`` to ``10``; ``-1`` is the highest compression + and lowest quality. Default: ``3``. + + Refer to http://sox.sourceforge.net/soxformat.html for more details. + + """ + backend = dispatcher(uri, format, backend) + return backend.save( + uri, src, sample_rate, channels_first, format, encoding, bits_per_sample, buffer_size, compression + ) + + return save diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fa6527c9032d415cf9120ce4f1ca4547e7c97fee --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__init__.py @@ -0,0 +1,74 @@ +import logging +import os +import sys + +from torchaudio._internal.module_utils import fail_with_message, is_module_available, no_op + +from .utils import _check_cuda_version, _init_dll_path, _init_sox, _LazyImporter, _load_lib + +_LG = logging.getLogger(__name__) + + +# Note: +# `_check_cuda_version` is not meant to be used by regular users. +# Builder uses it for debugging purpose, so we export it. +# https://github.com/pytorch/builder/blob/e2e4542b8eb0bdf491214451a1a4128bd606cce2/test/smoke_test/smoke_test.py#L80 +__all__ = [ + "_check_cuda_version", + "_IS_TORCHAUDIO_EXT_AVAILABLE", + "_IS_RIR_AVAILABLE", + "lazy_import_sox_ext", +] + + +if os.name == "nt" and (3, 8) <= sys.version_info < (3, 9): + _init_dll_path() + + +# When the extension module is built, we initialize it. +# In case of an error, we do not catch the failure as it suggests there is something +# wrong with the installation. +_IS_TORCHAUDIO_EXT_AVAILABLE = is_module_available("torchaudio.lib._torchaudio") +# RIR features are implemented in _torchaudio extension, but they can be individually +# turned on/off at build time. Available means that _torchaudio is loaded properly, and +# RIR features are found there. +_IS_RIR_AVAILABLE = False +_IS_ALIGN_AVAILABLE = False +if _IS_TORCHAUDIO_EXT_AVAILABLE: + _load_lib("libtorchaudio") + + import torchaudio.lib._torchaudio # noqa + + _check_cuda_version() + _IS_RIR_AVAILABLE = torchaudio.lib._torchaudio.is_rir_available() + _IS_ALIGN_AVAILABLE = torchaudio.lib._torchaudio.is_align_available() + + +_SOX_EXT = None + + +def lazy_import_sox_ext(): + """Load SoX integration based on availability in lazy manner""" + + global _SOX_EXT + if _SOX_EXT is None: + _SOX_EXT = _LazyImporter("_torchaudio_sox", _init_sox) + return _SOX_EXT + + +fail_if_no_rir = ( + no_op + if _IS_RIR_AVAILABLE + else fail_with_message( + "requires RIR extension, but TorchAudio is not compiled with it. Please build TorchAudio with RIR support." + ) +) + +fail_if_no_align = ( + no_op + if _IS_ALIGN_AVAILABLE + else fail_with_message( + "Requires alignment extension, but TorchAudio is not compiled with it. \ + Please build TorchAudio with alignment support." + ) +) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5dd387b51a467eb217d0bbea3048f20c2aa3240b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..21aee44ba59efc1e4b6e7669be1c970d386d7598 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ddabf8e6711bbd809e9f3b8dab34028b4ac6c53d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_extension/utils.py @@ -0,0 +1,180 @@ +"""Module to implement logics used for initializing extensions. + +The implementations here should be stateless. +They should not depend on external state. +Anything that depends on external state should happen in __init__.py +""" +import importlib +import logging +import os +import types +from pathlib import Path + +import torch +from torchaudio._internal.module_utils import eval_env + +_LG = logging.getLogger(__name__) +_LIB_DIR = Path(__file__).parent.parent / "lib" + + +def _get_lib_path(lib: str): + suffix = "pyd" if os.name == "nt" else "so" + path = _LIB_DIR / f"{lib}.{suffix}" + return path + + +def _load_lib(lib: str) -> bool: + """Load extension module + + Note: + In case `torchaudio` is deployed with `pex` format, the library file + is not in a standard location. + In this case, we expect that `libtorchaudio` is available somewhere + in the search path of dynamic loading mechanism, so that importing + `_torchaudio` will have library loader find and load `libtorchaudio`. + This is the reason why the function should not raising an error when the library + file is not found. + + Returns: + bool: + True if the library file is found AND the library loaded without failure. + False if the library file is not found (like in the case where torchaudio + is deployed with pex format, thus the shared library file is + in a non-standard location.). + If the library file is found but there is an issue loading the library, + (such as missing dependency) then this function raises the exception as-is. + + Raises: + Exception: + If the library file is found, but there is an issue loading the library file, + (when underlying `ctype.DLL` throws an exception), this function will pass + the exception as-is, instead of catching it and returning bool. + The expected case is `OSError` thrown by `ctype.DLL` when a dynamic dependency + is not found. + This behavior was chosen because the expected failure case is not recoverable. + If a dependency is missing, then users have to install it. + """ + path = _get_lib_path(lib) + if not path.exists(): + return False + torch.ops.load_library(path) + return True + + +def _import_sox_ext(): + if os.name == "nt": + raise RuntimeError("sox extension is not supported on Windows") + if not eval_env("TORCHAUDIO_USE_SOX", True): + raise RuntimeError("sox extension is disabled. (TORCHAUDIO_USE_SOX=0)") + + ext = "torchaudio.lib._torchaudio_sox" + + if not importlib.util.find_spec(ext): + raise RuntimeError( + # fmt: off + "TorchAudio is not built with sox extension. " + "Please build TorchAudio with libsox support. (BUILD_SOX=1)" + # fmt: on + ) + + _load_lib("libtorchaudio_sox") + return importlib.import_module(ext) + + +def _init_sox(): + ext = _import_sox_ext() + ext.set_verbosity(0) + + import atexit + + torch.ops.torchaudio_sox.initialize_sox_effects() + atexit.register(torch.ops.torchaudio_sox.shutdown_sox_effects) + + # Bundle functions registered with TORCH_LIBRARY into extension + # so that they can also be accessed in the same (lazy) manner + # from the extension. + keys = [ + "get_info", + "load_audio_file", + "save_audio_file", + "apply_effects_tensor", + "apply_effects_file", + ] + for key in keys: + setattr(ext, key, getattr(torch.ops.torchaudio_sox, key)) + + return ext + + +class _LazyImporter(types.ModuleType): + """Lazily import module/extension.""" + + def __init__(self, name, import_func): + super().__init__(name) + self.import_func = import_func + self.module = None + + # Note: + # Python caches what was retrieved with `__getattr__`, so this method will not be + # called again for the same item. + def __getattr__(self, item): + self._import_once() + return getattr(self.module, item) + + def __repr__(self): + if self.module is None: + return f"" + return repr(self.module) + + def __dir__(self): + self._import_once() + return dir(self.module) + + def _import_once(self): + if self.module is None: + self.module = self.import_func() + # Note: + # By attaching the module attributes to self, + # module attributes are directly accessible. + # This allows to avoid calling __getattr__ for every attribute access. + self.__dict__.update(self.module.__dict__) + + def is_available(self): + try: + self._import_once() + except Exception: + return False + return True + + +def _init_dll_path(): + # On Windows Python-3.8+ has `os.add_dll_directory` call, + # which is called to configure dll search path. + # To find cuda related dlls we need to make sure the + # conda environment/bin path is configured Please take a look: + # https://stackoverflow.com/questions/59330863/cant-import-dll-module-in-python + # Please note: if some path can't be added using add_dll_directory we simply ignore this path + for path in os.environ.get("PATH", "").split(";"): + if os.path.exists(path): + try: + os.add_dll_directory(path) + except Exception: + pass + + +def _check_cuda_version(): + import torchaudio.lib._torchaudio + + version = torchaudio.lib._torchaudio.cuda_version() + if version is not None and torch.version.cuda is not None: + version_str = str(version) + ta_version = f"{version_str[:-3]}.{version_str[-2]}" + t_version = torch.version.cuda.split(".") + t_version = f"{t_version[0]}.{t_version[1]}" + if ta_version != t_version: + raise RuntimeError( + "Detected that PyTorch and TorchAudio were compiled with different CUDA versions. " + f"PyTorch has CUDA version {t_version} whereas TorchAudio has CUDA version {ta_version}. " + "Please install the TorchAudio version that matches your PyTorch version." + ) + return version diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..236213dbfe4779e181bf280f98dc84f71278b43e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__init__.py @@ -0,0 +1,10 @@ +try: + from .fb import download_url_to_file, load_state_dict_from_url +except ImportError: + from torch.hub import download_url_to_file, load_state_dict_from_url + + +__all__ = [ + "load_state_dict_from_url", + "download_url_to_file", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..936e254aea1cd0f66d375543c83fe28a7a30a7c3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__pycache__/module_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__pycache__/module_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a4b4568f43418cd8e26f4792b8fa96c319044e91 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/__pycache__/module_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/module_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/module_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..55f700140ef8fb49181c08b8c59ff8c5f0019f43 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/_internal/module_utils.py @@ -0,0 +1,113 @@ +import importlib.util +import os +import warnings +from functools import wraps +from typing import Optional + + +def eval_env(var, default): + """Check if environment varable has True-y value""" + if var not in os.environ: + return default + + val = os.environ.get(var, "0") + trues = ["1", "true", "TRUE", "on", "ON", "yes", "YES"] + falses = ["0", "false", "FALSE", "off", "OFF", "no", "NO"] + if val in trues: + return True + if val not in falses: + # fmt: off + raise RuntimeError( + f"Unexpected environment variable value `{var}={val}`. " + f"Expected one of {trues + falses}") + # fmt: on + return False + + +def is_module_available(*modules: str) -> bool: + r"""Returns if a top-level module with :attr:`name` exists *without** + importing it. This is generally safer than try-catch block around a + `import X`. It avoids third party libraries breaking assumptions of some of + our tests, e.g., setting multiprocessing start method when imported + (see librosa/#747, torchvision/#544). + """ + return all(importlib.util.find_spec(m) is not None for m in modules) + + +def requires_module(*modules: str): + """Decorate function to give error message if invoked without required optional modules. + + This decorator is to give better error message to users rather + than raising ``NameError: name 'module' is not defined`` at random places. + """ + missing = [m for m in modules if not is_module_available(m)] + + if not missing: + # fall through. If all the modules are available, no need to decorate + def decorator(func): + return func + + else: + req = f"module: {missing[0]}" if len(missing) == 1 else f"modules: {missing}" + + def decorator(func): + @wraps(func) + def wrapped(*args, **kwargs): + raise RuntimeError(f"{func.__module__}.{func.__name__} requires {req}") + + return wrapped + + return decorator + + +def deprecated(direction: str, version: Optional[str] = None, remove: bool = False): + """Decorator to add deprecation message + + Args: + direction (str): Migration steps to be given to users. + version (str or int): The version when the object will be removed + remove (bool): If enabled, append future removal message. + """ + + def decorator(func): + @wraps(func) + def wrapped(*args, **kwargs): + message = f"{func.__module__}.{func.__name__} has been deprecated. {direction}" + if remove: + message += f' It will be removed from {"future" if version is None else version} release. ' + warnings.warn(message, stacklevel=2) + return func(*args, **kwargs) + + message = "This function has been deprecated. " + if remove: + message += f'It will be removed from {"future" if version is None else version} release. ' + + wrapped.__doc__ = f"""DEPRECATED: {func.__doc__} + + .. warning:: + + {message} + {direction} + """ + + return wrapped + + return decorator + + +def fail_with_message(message): + """Generate decorator to give users message about missing TorchAudio extension.""" + + def decorator(func): + @wraps(func) + def wrapped(*args, **kwargs): + raise RuntimeError(f"{func.__module__}.{func.__name__} {message}") + + return wrapped + + return decorator + + +def no_op(func): + """Op-op decorator. Used in place of fail_with_message when a functionality that requires extension works fine.""" + return func diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9f4457cf20dbb730096b0a205f923175f38725d6 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/__init__.py @@ -0,0 +1,8 @@ +# NOTE: +# The entire `torchaudio.backend` module is deprecated. +# New things should be added to `torchaudio._backend`. +# Only things related to backward compatibility should be placed here. + +from . import common, no_backend, soundfile_backend, sox_io_backend # noqa + +__all__ = [] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/_no_backend.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/_no_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..614931bf244695347f356e12ecb4e399c27644ac --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/_no_backend.py @@ -0,0 +1,25 @@ +from pathlib import Path +from typing import Callable, Optional, Tuple, Union + +from torch import Tensor +from torchaudio import AudioMetaData + + +def load( + filepath: Union[str, Path], + out: Optional[Tensor] = None, + normalization: Union[bool, float, Callable] = True, + channels_first: bool = True, + num_frames: int = 0, + offset: int = 0, + filetype: Optional[str] = None, +) -> Tuple[Tensor, int]: + raise RuntimeError("No audio I/O backend is available.") + + +def save(filepath: str, src: Tensor, sample_rate: int, precision: int = 16, channels_first: bool = True) -> None: + raise RuntimeError("No audio I/O backend is available.") + + +def info(filepath: str) -> AudioMetaData: + raise RuntimeError("No audio I/O backend is available.") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/_sox_io_backend.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/_sox_io_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..9fad2d9c72bfe2d0204405aea709fe801bb66921 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/_sox_io_backend.py @@ -0,0 +1,294 @@ +import os +from typing import Optional, Tuple + +import torch +import torchaudio +from torchaudio import AudioMetaData + +sox_ext = torchaudio._extension.lazy_import_sox_ext() + + +def info( + filepath: str, + format: Optional[str] = None, +) -> AudioMetaData: + """Get signal information of an audio file. + + Args: + filepath (str): + Source of audio data. + + format (str or None, optional): + Override the format detection with the given format. + Providing the argument might help when libsox can not infer the format + from header or extension. + + Returns: + AudioMetaData: Metadata of the given audio. + """ + if not torch.jit.is_scripting(): + if hasattr(filepath, "read"): + raise RuntimeError("sox_io backend does not support file-like object.") + filepath = os.fspath(filepath) + sinfo = sox_ext.get_info(filepath, format) + return AudioMetaData(*sinfo) + + +def load( + filepath: str, + frame_offset: int = 0, + num_frames: int = -1, + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, +) -> Tuple[torch.Tensor, int]: + """Load audio data from file. + + Note: + This function can handle all the codecs that underlying libsox can handle, + however it is tested on the following formats; + + * WAV, AMB + + * 32-bit floating-point + * 32-bit signed integer + * 24-bit signed integer + * 16-bit signed integer + * 8-bit unsigned integer (WAV only) + + * MP3 + * FLAC + * OGG/VORBIS + * OPUS + * SPHERE + * AMR-NB + + To load ``MP3``, ``FLAC``, ``OGG/VORBIS``, ``OPUS`` and other codecs ``libsox`` does not + handle natively, your installation of ``torchaudio`` has to be linked to ``libsox`` + and corresponding codec libraries such as ``libmad`` or ``libmp3lame`` etc. + + By default (``normalize=True``, ``channels_first=True``), this function returns Tensor with + ``float32`` dtype, and the shape of `[channel, time]`. + + .. warning:: + + ``normalize`` argument does not perform volume normalization. + It only converts the sample type to `torch.float32` from the native sample + type. + + When the input format is WAV with integer type, such as 32-bit signed integer, 16-bit + signed integer, 24-bit signed integer, and 8-bit unsigned integer, by providing ``normalize=False``, + this function can return integer Tensor, where the samples are expressed within the whole range + of the corresponding dtype, that is, ``int32`` tensor for 32-bit signed PCM, + ``int16`` for 16-bit signed PCM and ``uint8`` for 8-bit unsigned PCM. Since torch does not + support ``int24`` dtype, 24-bit signed PCM are converted to ``int32`` tensors. + + ``normalize`` argument has no effect on 32-bit floating-point WAV and other formats, such as + ``flac`` and ``mp3``. + + For these formats, this function always returns ``float32`` Tensor with values. + + Args: + filepath (path-like object): Source of audio data. + frame_offset (int): + Number of frames to skip before start reading data. + num_frames (int, optional): + Maximum number of frames to read. ``-1`` reads all the remaining samples, + starting from ``frame_offset``. + This function may return the less number of frames if there is not enough + frames in the given file. + normalize (bool, optional): + When ``True``, this function converts the native sample type to ``float32``. + Default: ``True``. + + If input file is integer WAV, giving ``False`` will change the resulting Tensor type to + integer type. + This argument has no effect for formats other than integer WAV type. + + channels_first (bool, optional): + When True, the returned Tensor has dimension `[channel, time]`. + Otherwise, the returned Tensor's dimension is `[time, channel]`. + format (str or None, optional): + Override the format detection with the given format. + Providing the argument might help when libsox can not infer the format + from header or extension. + + Returns: + (torch.Tensor, int): Resulting Tensor and sample rate. + If the input file has integer wav format and ``normalize=False``, then it has + integer type, else ``float32`` type. If ``channels_first=True``, it has + `[channel, time]` else `[time, channel]`. + """ + if not torch.jit.is_scripting(): + if hasattr(filepath, "read"): + raise RuntimeError("sox_io backend does not support file-like object.") + filepath = os.fspath(filepath) + return sox_ext.load_audio_file(filepath, frame_offset, num_frames, normalize, channels_first, format) + + +def save( + filepath: str, + src: torch.Tensor, + sample_rate: int, + channels_first: bool = True, + compression: Optional[float] = None, + format: Optional[str] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, +): + """Save audio data to file. + + Args: + filepath (path-like object): Path to save file. + src (torch.Tensor): Audio data to save. must be 2D tensor. + sample_rate (int): sampling rate + channels_first (bool, optional): If ``True``, the given tensor is interpreted as `[channel, time]`, + otherwise `[time, channel]`. + compression (float or None, optional): Used for formats other than WAV. + This corresponds to ``-C`` option of ``sox`` command. + + ``"mp3"`` + Either bitrate (in ``kbps``) with quality factor, such as ``128.2``, or + VBR encoding with quality factor such as ``-4.2``. Default: ``-4.5``. + + ``"flac"`` + Whole number from ``0`` to ``8``. ``8`` is default and highest compression. + + ``"ogg"``, ``"vorbis"`` + Number from ``-1`` to ``10``; ``-1`` is the highest compression + and lowest quality. Default: ``3``. + + See the detail at http://sox.sourceforge.net/soxformat.html. + format (str or None, optional): Override the audio format. + When ``filepath`` argument is path-like object, audio format is infered from + file extension. If file extension is missing or different, you can specify the + correct format with this argument. + + When ``filepath`` argument is file-like object, this argument is required. + + Valid values are ``"wav"``, ``"mp3"``, ``"ogg"``, ``"vorbis"``, ``"amr-nb"``, + ``"amb"``, ``"flac"``, ``"sph"``, ``"gsm"``, and ``"htk"``. + + encoding (str or None, optional): Changes the encoding for the supported formats. + This argument is effective only for supported formats, such as ``"wav"``, ``""amb"`` + and ``"sph"``. Valid values are; + + - ``"PCM_S"`` (signed integer Linear PCM) + - ``"PCM_U"`` (unsigned integer Linear PCM) + - ``"PCM_F"`` (floating point PCM) + - ``"ULAW"`` (mu-law) + - ``"ALAW"`` (a-law) + + Default values + If not provided, the default value is picked based on ``format`` and ``bits_per_sample``. + + ``"wav"``, ``"amb"`` + - | If both ``encoding`` and ``bits_per_sample`` are not provided, the ``dtype`` of the + | Tensor is used to determine the default value. + + - ``"PCM_U"`` if dtype is ``uint8`` + - ``"PCM_S"`` if dtype is ``int16`` or ``int32`` + - ``"PCM_F"`` if dtype is ``float32`` + + - ``"PCM_U"`` if ``bits_per_sample=8`` + - ``"PCM_S"`` otherwise + + ``"sph"`` format; + - the default value is ``"PCM_S"`` + + bits_per_sample (int or None, optional): Changes the bit depth for the supported formats. + When ``format`` is one of ``"wav"``, ``"flac"``, ``"sph"``, or ``"amb"``, you can change the + bit depth. Valid values are ``8``, ``16``, ``32`` and ``64``. + + Default Value; + If not provided, the default values are picked based on ``format`` and ``"encoding"``; + + ``"wav"``, ``"amb"``; + - | If both ``encoding`` and ``bits_per_sample`` are not provided, the ``dtype`` of the + | Tensor is used. + + - ``8`` if dtype is ``uint8`` + - ``16`` if dtype is ``int16`` + - ``32`` if dtype is ``int32`` or ``float32`` + + - ``8`` if ``encoding`` is ``"PCM_U"``, ``"ULAW"`` or ``"ALAW"`` + - ``16`` if ``encoding`` is ``"PCM_S"`` + - ``32`` if ``encoding`` is ``"PCM_F"`` + + ``"flac"`` format; + - the default value is ``24`` + + ``"sph"`` format; + - ``16`` if ``encoding`` is ``"PCM_U"``, ``"PCM_S"``, ``"PCM_F"`` or not provided. + - ``8`` if ``encoding`` is ``"ULAW"`` or ``"ALAW"`` + + ``"amb"`` format; + - ``8`` if ``encoding`` is ``"PCM_U"``, ``"ULAW"`` or ``"ALAW"`` + - ``16`` if ``encoding`` is ``"PCM_S"`` or not provided. + - ``32`` if ``encoding`` is ``"PCM_F"`` + + Supported formats/encodings/bit depth/compression are; + + ``"wav"``, ``"amb"`` + - 32-bit floating-point PCM + - 32-bit signed integer PCM + - 24-bit signed integer PCM + - 16-bit signed integer PCM + - 8-bit unsigned integer PCM + - 8-bit mu-law + - 8-bit a-law + + Note: Default encoding/bit depth is determined by the dtype of the input Tensor. + + ``"mp3"`` + Fixed bit rate (such as 128kHz) and variable bit rate compression. + Default: VBR with high quality. + + ``"flac"`` + - 8-bit + - 16-bit + - 24-bit (default) + + ``"ogg"``, ``"vorbis"`` + - Different quality level. Default: approx. 112kbps + + ``"sph"`` + - 8-bit signed integer PCM + - 16-bit signed integer PCM + - 24-bit signed integer PCM + - 32-bit signed integer PCM (default) + - 8-bit mu-law + - 8-bit a-law + - 16-bit a-law + - 24-bit a-law + - 32-bit a-law + + ``"amr-nb"`` + Bitrate ranging from 4.75 kbit/s to 12.2 kbit/s. Default: 4.75 kbit/s + + ``"gsm"`` + Lossy Speech Compression, CPU intensive. + + ``"htk"`` + Uses a default single-channel 16-bit PCM format. + + Note: + To save into formats that ``libsox`` does not handle natively, (such as ``"mp3"``, + ``"flac"``, ``"ogg"`` and ``"vorbis"``), your installation of ``torchaudio`` has + to be linked to ``libsox`` and corresponding codec libraries such as ``libmad`` + or ``libmp3lame`` etc. + """ + if not torch.jit.is_scripting(): + if hasattr(filepath, "write"): + raise RuntimeError("sox_io backend does not handle file-like object.") + filepath = os.fspath(filepath) + sox_ext.save_audio_file( + filepath, + src, + sample_rate, + channels_first, + compression, + format, + encoding, + bits_per_sample, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/common.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/common.py new file mode 100644 index 0000000000000000000000000000000000000000..c9baa664b75f34f69f1fc7825877327c72874bde --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/common.py @@ -0,0 +1,13 @@ +def __getattr__(name: str): + if name == "AudioMetaData": + import warnings + + warnings.warn( + "`torchaudio.backend.common.AudioMetaData` has been moved to " + "`torchaudio.AudioMetaData`. Please update the import path.", + stacklevel=2, + ) + from torchaudio import AudioMetaData + + return AudioMetaData + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/no_backend.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/no_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..a36062886bd9b1dd22048aa67c722e1948f7aedf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/no_backend.py @@ -0,0 +1,14 @@ +def __getattr__(name: str): + import warnings + + warnings.warn( + "Torchaudio's I/O functions now support par-call bakcend dispatch. " + "Importing backend implementation directly is no longer guaranteed to work. " + "Please use `backend` keyword with load/save/info function, instead of " + "calling the udnerlying implementation directly.", + stacklevel=2, + ) + + from . import _no_backend + + return getattr(_no_backend, name) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/soundfile_backend.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/soundfile_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..1885a9f407e98464ada2556e5e5c5b9065c7034f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/soundfile_backend.py @@ -0,0 +1,14 @@ +def __getattr__(name: str): + import warnings + + warnings.warn( + "Torchaudio's I/O functions now support par-call bakcend dispatch. " + "Importing backend implementation directly is no longer guaranteed to work. " + "Please use `backend` keyword with load/save/info function, instead of " + "calling the udnerlying implementation directly.", + stacklevel=2, + ) + + from torchaudio._backend import soundfile_backend + + return getattr(soundfile_backend, name) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/sox_io_backend.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/sox_io_backend.py new file mode 100644 index 0000000000000000000000000000000000000000..a0ef3c05da6d3191f66d83d460d667f8fbe4ad1f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/backend/sox_io_backend.py @@ -0,0 +1,14 @@ +def __getattr__(name: str): + import warnings + + warnings.warn( + "Torchaudio's I/O functions now support par-call bakcend dispatch. " + "Importing backend implementation directly is no longer guaranteed to work. " + "Please use `backend` keyword with load/save/info function, instead of " + "calling the udnerlying implementation directly.", + stacklevel=2, + ) + + from . import _sox_io_backend + + return getattr(_sox_io_backend, name) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/compliance/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/compliance/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..727272101fe623a7d9a5c45f600e94540780d40e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/compliance/__init__.py @@ -0,0 +1,5 @@ +from . import kaldi + +__all__ = [ + "kaldi", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/compliance/kaldi.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/compliance/kaldi.py new file mode 100644 index 0000000000000000000000000000000000000000..6fe81036d138e0b351d213f28ae610a2ca50d2ed --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/compliance/kaldi.py @@ -0,0 +1,813 @@ +import math +from typing import Tuple + +import torch +import torchaudio +from torch import Tensor + +__all__ = [ + "get_mel_banks", + "inverse_mel_scale", + "inverse_mel_scale_scalar", + "mel_scale", + "mel_scale_scalar", + "spectrogram", + "fbank", + "mfcc", + "vtln_warp_freq", + "vtln_warp_mel_freq", +] + +# numeric_limits::epsilon() 1.1920928955078125e-07 +EPSILON = torch.tensor(torch.finfo(torch.float).eps) +# 1 milliseconds = 0.001 seconds +MILLISECONDS_TO_SECONDS = 0.001 + +# window types +HAMMING = "hamming" +HANNING = "hanning" +POVEY = "povey" +RECTANGULAR = "rectangular" +BLACKMAN = "blackman" +WINDOWS = [HAMMING, HANNING, POVEY, RECTANGULAR, BLACKMAN] + + +def _get_epsilon(device, dtype): + return EPSILON.to(device=device, dtype=dtype) + + +def _next_power_of_2(x: int) -> int: + r"""Returns the smallest power of 2 that is greater than x""" + return 1 if x == 0 else 2 ** (x - 1).bit_length() + + +def _get_strided(waveform: Tensor, window_size: int, window_shift: int, snip_edges: bool) -> Tensor: + r"""Given a waveform (1D tensor of size ``num_samples``), it returns a 2D tensor (m, ``window_size``) + representing how the window is shifted along the waveform. Each row is a frame. + + Args: + waveform (Tensor): Tensor of size ``num_samples`` + window_size (int): Frame length + window_shift (int): Frame shift + snip_edges (bool): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. + + Returns: + Tensor: 2D tensor of size (m, ``window_size``) where each row is a frame + """ + assert waveform.dim() == 1 + num_samples = waveform.size(0) + strides = (window_shift * waveform.stride(0), waveform.stride(0)) + + if snip_edges: + if num_samples < window_size: + return torch.empty((0, 0), dtype=waveform.dtype, device=waveform.device) + else: + m = 1 + (num_samples - window_size) // window_shift + else: + reversed_waveform = torch.flip(waveform, [0]) + m = (num_samples + (window_shift // 2)) // window_shift + pad = window_size // 2 - window_shift // 2 + pad_right = reversed_waveform + if pad > 0: + # torch.nn.functional.pad returns [2,1,0,1,2] for 'reflect' + # but we want [2, 1, 0, 0, 1, 2] + pad_left = reversed_waveform[-pad:] + waveform = torch.cat((pad_left, waveform, pad_right), dim=0) + else: + # pad is negative so we want to trim the waveform at the front + waveform = torch.cat((waveform[-pad:], pad_right), dim=0) + + sizes = (m, window_size) + return waveform.as_strided(sizes, strides) + + +def _feature_window_function( + window_type: str, + window_size: int, + blackman_coeff: float, + device: torch.device, + dtype: int, +) -> Tensor: + r"""Returns a window function with the given type and size""" + if window_type == HANNING: + return torch.hann_window(window_size, periodic=False, device=device, dtype=dtype) + elif window_type == HAMMING: + return torch.hamming_window(window_size, periodic=False, alpha=0.54, beta=0.46, device=device, dtype=dtype) + elif window_type == POVEY: + # like hanning but goes to zero at edges + return torch.hann_window(window_size, periodic=False, device=device, dtype=dtype).pow(0.85) + elif window_type == RECTANGULAR: + return torch.ones(window_size, device=device, dtype=dtype) + elif window_type == BLACKMAN: + a = 2 * math.pi / (window_size - 1) + window_function = torch.arange(window_size, device=device, dtype=dtype) + # can't use torch.blackman_window as they use different coefficients + return ( + blackman_coeff + - 0.5 * torch.cos(a * window_function) + + (0.5 - blackman_coeff) * torch.cos(2 * a * window_function) + ).to(device=device, dtype=dtype) + else: + raise Exception("Invalid window type " + window_type) + + +def _get_log_energy(strided_input: Tensor, epsilon: Tensor, energy_floor: float) -> Tensor: + r"""Returns the log energy of size (m) for a strided_input (m,*)""" + device, dtype = strided_input.device, strided_input.dtype + log_energy = torch.max(strided_input.pow(2).sum(1), epsilon).log() # size (m) + if energy_floor == 0.0: + return log_energy + return torch.max(log_energy, torch.tensor(math.log(energy_floor), device=device, dtype=dtype)) + + +def _get_waveform_and_window_properties( + waveform: Tensor, + channel: int, + sample_frequency: float, + frame_shift: float, + frame_length: float, + round_to_power_of_two: bool, + preemphasis_coefficient: float, +) -> Tuple[Tensor, int, int, int]: + r"""Gets the waveform and window properties""" + channel = max(channel, 0) + assert channel < waveform.size(0), "Invalid channel {} for size {}".format(channel, waveform.size(0)) + waveform = waveform[channel, :] # size (n) + window_shift = int(sample_frequency * frame_shift * MILLISECONDS_TO_SECONDS) + window_size = int(sample_frequency * frame_length * MILLISECONDS_TO_SECONDS) + padded_window_size = _next_power_of_2(window_size) if round_to_power_of_two else window_size + + assert 2 <= window_size <= len(waveform), "choose a window size {} that is [2, {}]".format( + window_size, len(waveform) + ) + assert 0 < window_shift, "`window_shift` must be greater than 0" + assert padded_window_size % 2 == 0, ( + "the padded `window_size` must be divisible by two." " use `round_to_power_of_two` or change `frame_length`" + ) + assert 0.0 <= preemphasis_coefficient <= 1.0, "`preemphasis_coefficient` must be between [0,1]" + assert sample_frequency > 0, "`sample_frequency` must be greater than zero" + return waveform, window_shift, window_size, padded_window_size + + +def _get_window( + waveform: Tensor, + padded_window_size: int, + window_size: int, + window_shift: int, + window_type: str, + blackman_coeff: float, + snip_edges: bool, + raw_energy: bool, + energy_floor: float, + dither: float, + remove_dc_offset: bool, + preemphasis_coefficient: float, +) -> Tuple[Tensor, Tensor]: + r"""Gets a window and its log energy + + Returns: + (Tensor, Tensor): strided_input of size (m, ``padded_window_size``) and signal_log_energy of size (m) + """ + device, dtype = waveform.device, waveform.dtype + epsilon = _get_epsilon(device, dtype) + + # size (m, window_size) + strided_input = _get_strided(waveform, window_size, window_shift, snip_edges) + + if dither != 0.0: + rand_gauss = torch.randn(strided_input.shape, device=device, dtype=dtype) + strided_input = strided_input + rand_gauss * dither + + if remove_dc_offset: + # Subtract each row/frame by its mean + row_means = torch.mean(strided_input, dim=1).unsqueeze(1) # size (m, 1) + strided_input = strided_input - row_means + + if raw_energy: + # Compute the log energy of each row/frame before applying preemphasis and + # window function + signal_log_energy = _get_log_energy(strided_input, epsilon, energy_floor) # size (m) + + if preemphasis_coefficient != 0.0: + # strided_input[i,j] -= preemphasis_coefficient * strided_input[i, max(0, j-1)] for all i,j + offset_strided_input = torch.nn.functional.pad(strided_input.unsqueeze(0), (1, 0), mode="replicate").squeeze( + 0 + ) # size (m, window_size + 1) + strided_input = strided_input - preemphasis_coefficient * offset_strided_input[:, :-1] + + # Apply window_function to each row/frame + window_function = _feature_window_function(window_type, window_size, blackman_coeff, device, dtype).unsqueeze( + 0 + ) # size (1, window_size) + strided_input = strided_input * window_function # size (m, window_size) + + # Pad columns with zero until we reach size (m, padded_window_size) + if padded_window_size != window_size: + padding_right = padded_window_size - window_size + strided_input = torch.nn.functional.pad( + strided_input.unsqueeze(0), (0, padding_right), mode="constant", value=0 + ).squeeze(0) + + # Compute energy after window function (not the raw one) + if not raw_energy: + signal_log_energy = _get_log_energy(strided_input, epsilon, energy_floor) # size (m) + + return strided_input, signal_log_energy + + +def _subtract_column_mean(tensor: Tensor, subtract_mean: bool) -> Tensor: + # subtracts the column mean of the tensor size (m, n) if subtract_mean=True + # it returns size (m, n) + if subtract_mean: + col_means = torch.mean(tensor, dim=0).unsqueeze(0) + tensor = tensor - col_means + return tensor + + +def spectrogram( + waveform: Tensor, + blackman_coeff: float = 0.42, + channel: int = -1, + dither: float = 0.0, + energy_floor: float = 1.0, + frame_length: float = 25.0, + frame_shift: float = 10.0, + min_duration: float = 0.0, + preemphasis_coefficient: float = 0.97, + raw_energy: bool = True, + remove_dc_offset: bool = True, + round_to_power_of_two: bool = True, + sample_frequency: float = 16000.0, + snip_edges: bool = True, + subtract_mean: bool = False, + window_type: str = POVEY, +) -> Tensor: + r"""Create a spectrogram from a raw audio signal. This matches the input/output of Kaldi's + compute-spectrogram-feats. + + Args: + waveform (Tensor): Tensor of audio of size (c, n) where c is in the range [0,2) + blackman_coeff (float, optional): Constant coefficient for generalized Blackman window. (Default: ``0.42``) + channel (int, optional): Channel to extract (-1 -> expect mono, 0 -> left, 1 -> right) (Default: ``-1``) + dither (float, optional): Dithering constant (0.0 means no dither). If you turn this off, you should set + the energy_floor option, e.g. to 1.0 or 0.1 (Default: ``0.0``) + energy_floor (float, optional): Floor on energy (absolute, not relative) in Spectrogram computation. Caution: + this floor is applied to the zeroth component, representing the total signal energy. The floor on the + individual spectrogram elements is fixed at std::numeric_limits::epsilon(). (Default: ``1.0``) + frame_length (float, optional): Frame length in milliseconds (Default: ``25.0``) + frame_shift (float, optional): Frame shift in milliseconds (Default: ``10.0``) + min_duration (float, optional): Minimum duration of segments to process (in seconds). (Default: ``0.0``) + preemphasis_coefficient (float, optional): Coefficient for use in signal preemphasis (Default: ``0.97``) + raw_energy (bool, optional): If True, compute energy before preemphasis and windowing (Default: ``True``) + remove_dc_offset (bool, optional): Subtract mean from waveform on each frame (Default: ``True``) + round_to_power_of_two (bool, optional): If True, round window size to power of two by zero-padding input + to FFT. (Default: ``True``) + sample_frequency (float, optional): Waveform data sample frequency (must match the waveform file, if + specified there) (Default: ``16000.0``) + snip_edges (bool, optional): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. (Default: ``True``) + subtract_mean (bool, optional): Subtract mean of each feature file [CMS]; not recommended to do + it this way. (Default: ``False``) + window_type (str, optional): Type of window ('hamming'|'hanning'|'povey'|'rectangular'|'blackman') + (Default: ``'povey'``) + + Returns: + Tensor: A spectrogram identical to what Kaldi would output. The shape is + (m, ``padded_window_size // 2 + 1``) where m is calculated in _get_strided + """ + device, dtype = waveform.device, waveform.dtype + epsilon = _get_epsilon(device, dtype) + + waveform, window_shift, window_size, padded_window_size = _get_waveform_and_window_properties( + waveform, channel, sample_frequency, frame_shift, frame_length, round_to_power_of_two, preemphasis_coefficient + ) + + if len(waveform) < min_duration * sample_frequency: + # signal is too short + return torch.empty(0) + + strided_input, signal_log_energy = _get_window( + waveform, + padded_window_size, + window_size, + window_shift, + window_type, + blackman_coeff, + snip_edges, + raw_energy, + energy_floor, + dither, + remove_dc_offset, + preemphasis_coefficient, + ) + + # size (m, padded_window_size // 2 + 1, 2) + fft = torch.fft.rfft(strided_input) + + # Convert the FFT into a power spectrum + power_spectrum = torch.max(fft.abs().pow(2.0), epsilon).log() # size (m, padded_window_size // 2 + 1) + power_spectrum[:, 0] = signal_log_energy + + power_spectrum = _subtract_column_mean(power_spectrum, subtract_mean) + return power_spectrum + + +def inverse_mel_scale_scalar(mel_freq: float) -> float: + return 700.0 * (math.exp(mel_freq / 1127.0) - 1.0) + + +def inverse_mel_scale(mel_freq: Tensor) -> Tensor: + return 700.0 * ((mel_freq / 1127.0).exp() - 1.0) + + +def mel_scale_scalar(freq: float) -> float: + return 1127.0 * math.log(1.0 + freq / 700.0) + + +def mel_scale(freq: Tensor) -> Tensor: + return 1127.0 * (1.0 + freq / 700.0).log() + + +def vtln_warp_freq( + vtln_low_cutoff: float, + vtln_high_cutoff: float, + low_freq: float, + high_freq: float, + vtln_warp_factor: float, + freq: Tensor, +) -> Tensor: + r"""This computes a VTLN warping function that is not the same as HTK's one, + but has similar inputs (this function has the advantage of never producing + empty bins). + + This function computes a warp function F(freq), defined between low_freq + and high_freq inclusive, with the following properties: + F(low_freq) == low_freq + F(high_freq) == high_freq + The function is continuous and piecewise linear with two inflection + points. + The lower inflection point (measured in terms of the unwarped + frequency) is at frequency l, determined as described below. + The higher inflection point is at a frequency h, determined as + described below. + If l <= f <= h, then F(f) = f/vtln_warp_factor. + If the higher inflection point (measured in terms of the unwarped + frequency) is at h, then max(h, F(h)) == vtln_high_cutoff. + Since (by the last point) F(h) == h/vtln_warp_factor, then + max(h, h/vtln_warp_factor) == vtln_high_cutoff, so + h = vtln_high_cutoff / max(1, 1/vtln_warp_factor). + = vtln_high_cutoff * min(1, vtln_warp_factor). + If the lower inflection point (measured in terms of the unwarped + frequency) is at l, then min(l, F(l)) == vtln_low_cutoff + This implies that l = vtln_low_cutoff / min(1, 1/vtln_warp_factor) + = vtln_low_cutoff * max(1, vtln_warp_factor) + Args: + vtln_low_cutoff (float): Lower frequency cutoffs for VTLN + vtln_high_cutoff (float): Upper frequency cutoffs for VTLN + low_freq (float): Lower frequency cutoffs in mel computation + high_freq (float): Upper frequency cutoffs in mel computation + vtln_warp_factor (float): Vtln warp factor + freq (Tensor): given frequency in Hz + + Returns: + Tensor: Freq after vtln warp + """ + assert vtln_low_cutoff > low_freq, "be sure to set the vtln_low option higher than low_freq" + assert vtln_high_cutoff < high_freq, "be sure to set the vtln_high option lower than high_freq [or negative]" + l = vtln_low_cutoff * max(1.0, vtln_warp_factor) + h = vtln_high_cutoff * min(1.0, vtln_warp_factor) + scale = 1.0 / vtln_warp_factor + Fl = scale * l # F(l) + Fh = scale * h # F(h) + assert l > low_freq and h < high_freq + # slope of left part of the 3-piece linear function + scale_left = (Fl - low_freq) / (l - low_freq) + # [slope of center part is just "scale"] + + # slope of right part of the 3-piece linear function + scale_right = (high_freq - Fh) / (high_freq - h) + + res = torch.empty_like(freq) + + outside_low_high_freq = torch.lt(freq, low_freq) | torch.gt(freq, high_freq) # freq < low_freq || freq > high_freq + before_l = torch.lt(freq, l) # freq < l + before_h = torch.lt(freq, h) # freq < h + after_h = torch.ge(freq, h) # freq >= h + + # order of operations matter here (since there is overlapping frequency regions) + res[after_h] = high_freq + scale_right * (freq[after_h] - high_freq) + res[before_h] = scale * freq[before_h] + res[before_l] = low_freq + scale_left * (freq[before_l] - low_freq) + res[outside_low_high_freq] = freq[outside_low_high_freq] + + return res + + +def vtln_warp_mel_freq( + vtln_low_cutoff: float, + vtln_high_cutoff: float, + low_freq, + high_freq: float, + vtln_warp_factor: float, + mel_freq: Tensor, +) -> Tensor: + r""" + Args: + vtln_low_cutoff (float): Lower frequency cutoffs for VTLN + vtln_high_cutoff (float): Upper frequency cutoffs for VTLN + low_freq (float): Lower frequency cutoffs in mel computation + high_freq (float): Upper frequency cutoffs in mel computation + vtln_warp_factor (float): Vtln warp factor + mel_freq (Tensor): Given frequency in Mel + + Returns: + Tensor: ``mel_freq`` after vtln warp + """ + return mel_scale( + vtln_warp_freq( + vtln_low_cutoff, vtln_high_cutoff, low_freq, high_freq, vtln_warp_factor, inverse_mel_scale(mel_freq) + ) + ) + + +def get_mel_banks( + num_bins: int, + window_length_padded: int, + sample_freq: float, + low_freq: float, + high_freq: float, + vtln_low: float, + vtln_high: float, + vtln_warp_factor: float, +) -> Tuple[Tensor, Tensor]: + """ + Returns: + (Tensor, Tensor): The tuple consists of ``bins`` (which is + melbank of size (``num_bins``, ``num_fft_bins``)) and ``center_freqs`` (which is + center frequencies of bins of size (``num_bins``)). + """ + assert num_bins > 3, "Must have at least 3 mel bins" + assert window_length_padded % 2 == 0 + num_fft_bins = window_length_padded / 2 + nyquist = 0.5 * sample_freq + + if high_freq <= 0.0: + high_freq += nyquist + + assert ( + (0.0 <= low_freq < nyquist) and (0.0 < high_freq <= nyquist) and (low_freq < high_freq) + ), "Bad values in options: low-freq {} and high-freq {} vs. nyquist {}".format(low_freq, high_freq, nyquist) + + # fft-bin width [think of it as Nyquist-freq / half-window-length] + fft_bin_width = sample_freq / window_length_padded + mel_low_freq = mel_scale_scalar(low_freq) + mel_high_freq = mel_scale_scalar(high_freq) + + # divide by num_bins+1 in next line because of end-effects where the bins + # spread out to the sides. + mel_freq_delta = (mel_high_freq - mel_low_freq) / (num_bins + 1) + + if vtln_high < 0.0: + vtln_high += nyquist + + assert vtln_warp_factor == 1.0 or ( + (low_freq < vtln_low < high_freq) and (0.0 < vtln_high < high_freq) and (vtln_low < vtln_high) + ), "Bad values in options: vtln-low {} and vtln-high {}, versus " "low-freq {} and high-freq {}".format( + vtln_low, vtln_high, low_freq, high_freq + ) + + bin = torch.arange(num_bins).unsqueeze(1) + left_mel = mel_low_freq + bin * mel_freq_delta # size(num_bins, 1) + center_mel = mel_low_freq + (bin + 1.0) * mel_freq_delta # size(num_bins, 1) + right_mel = mel_low_freq + (bin + 2.0) * mel_freq_delta # size(num_bins, 1) + + if vtln_warp_factor != 1.0: + left_mel = vtln_warp_mel_freq(vtln_low, vtln_high, low_freq, high_freq, vtln_warp_factor, left_mel) + center_mel = vtln_warp_mel_freq(vtln_low, vtln_high, low_freq, high_freq, vtln_warp_factor, center_mel) + right_mel = vtln_warp_mel_freq(vtln_low, vtln_high, low_freq, high_freq, vtln_warp_factor, right_mel) + + center_freqs = inverse_mel_scale(center_mel) # size (num_bins) + # size(1, num_fft_bins) + mel = mel_scale(fft_bin_width * torch.arange(num_fft_bins)).unsqueeze(0) + + # size (num_bins, num_fft_bins) + up_slope = (mel - left_mel) / (center_mel - left_mel) + down_slope = (right_mel - mel) / (right_mel - center_mel) + + if vtln_warp_factor == 1.0: + # left_mel < center_mel < right_mel so we can min the two slopes and clamp negative values + bins = torch.max(torch.zeros(1), torch.min(up_slope, down_slope)) + else: + # warping can move the order of left_mel, center_mel, right_mel anywhere + bins = torch.zeros_like(up_slope) + up_idx = torch.gt(mel, left_mel) & torch.le(mel, center_mel) # left_mel < mel <= center_mel + down_idx = torch.gt(mel, center_mel) & torch.lt(mel, right_mel) # center_mel < mel < right_mel + bins[up_idx] = up_slope[up_idx] + bins[down_idx] = down_slope[down_idx] + + return bins, center_freqs + + +def fbank( + waveform: Tensor, + blackman_coeff: float = 0.42, + channel: int = -1, + dither: float = 0.0, + energy_floor: float = 1.0, + frame_length: float = 25.0, + frame_shift: float = 10.0, + high_freq: float = 0.0, + htk_compat: bool = False, + low_freq: float = 20.0, + min_duration: float = 0.0, + num_mel_bins: int = 23, + preemphasis_coefficient: float = 0.97, + raw_energy: bool = True, + remove_dc_offset: bool = True, + round_to_power_of_two: bool = True, + sample_frequency: float = 16000.0, + snip_edges: bool = True, + subtract_mean: bool = False, + use_energy: bool = False, + use_log_fbank: bool = True, + use_power: bool = True, + vtln_high: float = -500.0, + vtln_low: float = 100.0, + vtln_warp: float = 1.0, + window_type: str = POVEY, +) -> Tensor: + r"""Create a fbank from a raw audio signal. This matches the input/output of Kaldi's + compute-fbank-feats. + + Args: + waveform (Tensor): Tensor of audio of size (c, n) where c is in the range [0,2) + blackman_coeff (float, optional): Constant coefficient for generalized Blackman window. (Default: ``0.42``) + channel (int, optional): Channel to extract (-1 -> expect mono, 0 -> left, 1 -> right) (Default: ``-1``) + dither (float, optional): Dithering constant (0.0 means no dither). If you turn this off, you should set + the energy_floor option, e.g. to 1.0 or 0.1 (Default: ``0.0``) + energy_floor (float, optional): Floor on energy (absolute, not relative) in Spectrogram computation. Caution: + this floor is applied to the zeroth component, representing the total signal energy. The floor on the + individual spectrogram elements is fixed at std::numeric_limits::epsilon(). (Default: ``1.0``) + frame_length (float, optional): Frame length in milliseconds (Default: ``25.0``) + frame_shift (float, optional): Frame shift in milliseconds (Default: ``10.0``) + high_freq (float, optional): High cutoff frequency for mel bins (if <= 0, offset from Nyquist) + (Default: ``0.0``) + htk_compat (bool, optional): If true, put energy last. Warning: not sufficient to get HTK compatible features + (need to change other parameters). (Default: ``False``) + low_freq (float, optional): Low cutoff frequency for mel bins (Default: ``20.0``) + min_duration (float, optional): Minimum duration of segments to process (in seconds). (Default: ``0.0``) + num_mel_bins (int, optional): Number of triangular mel-frequency bins (Default: ``23``) + preemphasis_coefficient (float, optional): Coefficient for use in signal preemphasis (Default: ``0.97``) + raw_energy (bool, optional): If True, compute energy before preemphasis and windowing (Default: ``True``) + remove_dc_offset (bool, optional): Subtract mean from waveform on each frame (Default: ``True``) + round_to_power_of_two (bool, optional): If True, round window size to power of two by zero-padding input + to FFT. (Default: ``True``) + sample_frequency (float, optional): Waveform data sample frequency (must match the waveform file, if + specified there) (Default: ``16000.0``) + snip_edges (bool, optional): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. (Default: ``True``) + subtract_mean (bool, optional): Subtract mean of each feature file [CMS]; not recommended to do + it this way. (Default: ``False``) + use_energy (bool, optional): Add an extra dimension with energy to the FBANK output. (Default: ``False``) + use_log_fbank (bool, optional):If true, produce log-filterbank, else produce linear. (Default: ``True``) + use_power (bool, optional): If true, use power, else use magnitude. (Default: ``True``) + vtln_high (float, optional): High inflection point in piecewise linear VTLN warping function (if + negative, offset from high-mel-freq (Default: ``-500.0``) + vtln_low (float, optional): Low inflection point in piecewise linear VTLN warping function (Default: ``100.0``) + vtln_warp (float, optional): Vtln warp factor (only applicable if vtln_map not specified) (Default: ``1.0``) + window_type (str, optional): Type of window ('hamming'|'hanning'|'povey'|'rectangular'|'blackman') + (Default: ``'povey'``) + + Returns: + Tensor: A fbank identical to what Kaldi would output. The shape is (m, ``num_mel_bins + use_energy``) + where m is calculated in _get_strided + """ + device, dtype = waveform.device, waveform.dtype + + waveform, window_shift, window_size, padded_window_size = _get_waveform_and_window_properties( + waveform, channel, sample_frequency, frame_shift, frame_length, round_to_power_of_two, preemphasis_coefficient + ) + + if len(waveform) < min_duration * sample_frequency: + # signal is too short + return torch.empty(0, device=device, dtype=dtype) + + # strided_input, size (m, padded_window_size) and signal_log_energy, size (m) + strided_input, signal_log_energy = _get_window( + waveform, + padded_window_size, + window_size, + window_shift, + window_type, + blackman_coeff, + snip_edges, + raw_energy, + energy_floor, + dither, + remove_dc_offset, + preemphasis_coefficient, + ) + + # size (m, padded_window_size // 2 + 1) + spectrum = torch.fft.rfft(strided_input).abs() + if use_power: + spectrum = spectrum.pow(2.0) + + # size (num_mel_bins, padded_window_size // 2) + mel_energies, _ = get_mel_banks( + num_mel_bins, padded_window_size, sample_frequency, low_freq, high_freq, vtln_low, vtln_high, vtln_warp + ) + mel_energies = mel_energies.to(device=device, dtype=dtype) + + # pad right column with zeros and add dimension, size (num_mel_bins, padded_window_size // 2 + 1) + mel_energies = torch.nn.functional.pad(mel_energies, (0, 1), mode="constant", value=0) + + # sum with mel fiterbanks over the power spectrum, size (m, num_mel_bins) + mel_energies = torch.mm(spectrum, mel_energies.T) + if use_log_fbank: + # avoid log of zero (which should be prevented anyway by dithering) + mel_energies = torch.max(mel_energies, _get_epsilon(device, dtype)).log() + + # if use_energy then add it as the last column for htk_compat == true else first column + if use_energy: + signal_log_energy = signal_log_energy.unsqueeze(1) # size (m, 1) + # returns size (m, num_mel_bins + 1) + if htk_compat: + mel_energies = torch.cat((mel_energies, signal_log_energy), dim=1) + else: + mel_energies = torch.cat((signal_log_energy, mel_energies), dim=1) + + mel_energies = _subtract_column_mean(mel_energies, subtract_mean) + return mel_energies + + +def _get_dct_matrix(num_ceps: int, num_mel_bins: int) -> Tensor: + # returns a dct matrix of size (num_mel_bins, num_ceps) + # size (num_mel_bins, num_mel_bins) + dct_matrix = torchaudio.functional.create_dct(num_mel_bins, num_mel_bins, "ortho") + # kaldi expects the first cepstral to be weighted sum of factor sqrt(1/num_mel_bins) + # this would be the first column in the dct_matrix for torchaudio as it expects a + # right multiply (which would be the first column of the kaldi's dct_matrix as kaldi + # expects a left multiply e.g. dct_matrix * vector). + dct_matrix[:, 0] = math.sqrt(1 / float(num_mel_bins)) + dct_matrix = dct_matrix[:, :num_ceps] + return dct_matrix + + +def _get_lifter_coeffs(num_ceps: int, cepstral_lifter: float) -> Tensor: + # returns size (num_ceps) + # Compute liftering coefficients (scaling on cepstral coeffs) + # coeffs are numbered slightly differently from HTK: the zeroth index is C0, which is not affected. + i = torch.arange(num_ceps) + return 1.0 + 0.5 * cepstral_lifter * torch.sin(math.pi * i / cepstral_lifter) + + +def mfcc( + waveform: Tensor, + blackman_coeff: float = 0.42, + cepstral_lifter: float = 22.0, + channel: int = -1, + dither: float = 0.0, + energy_floor: float = 1.0, + frame_length: float = 25.0, + frame_shift: float = 10.0, + high_freq: float = 0.0, + htk_compat: bool = False, + low_freq: float = 20.0, + num_ceps: int = 13, + min_duration: float = 0.0, + num_mel_bins: int = 23, + preemphasis_coefficient: float = 0.97, + raw_energy: bool = True, + remove_dc_offset: bool = True, + round_to_power_of_two: bool = True, + sample_frequency: float = 16000.0, + snip_edges: bool = True, + subtract_mean: bool = False, + use_energy: bool = False, + vtln_high: float = -500.0, + vtln_low: float = 100.0, + vtln_warp: float = 1.0, + window_type: str = POVEY, +) -> Tensor: + r"""Create a mfcc from a raw audio signal. This matches the input/output of Kaldi's + compute-mfcc-feats. + + Args: + waveform (Tensor): Tensor of audio of size (c, n) where c is in the range [0,2) + blackman_coeff (float, optional): Constant coefficient for generalized Blackman window. (Default: ``0.42``) + cepstral_lifter (float, optional): Constant that controls scaling of MFCCs (Default: ``22.0``) + channel (int, optional): Channel to extract (-1 -> expect mono, 0 -> left, 1 -> right) (Default: ``-1``) + dither (float, optional): Dithering constant (0.0 means no dither). If you turn this off, you should set + the energy_floor option, e.g. to 1.0 or 0.1 (Default: ``0.0``) + energy_floor (float, optional): Floor on energy (absolute, not relative) in Spectrogram computation. Caution: + this floor is applied to the zeroth component, representing the total signal energy. The floor on the + individual spectrogram elements is fixed at std::numeric_limits::epsilon(). (Default: ``1.0``) + frame_length (float, optional): Frame length in milliseconds (Default: ``25.0``) + frame_shift (float, optional): Frame shift in milliseconds (Default: ``10.0``) + high_freq (float, optional): High cutoff frequency for mel bins (if <= 0, offset from Nyquist) + (Default: ``0.0``) + htk_compat (bool, optional): If true, put energy last. Warning: not sufficient to get HTK compatible + features (need to change other parameters). (Default: ``False``) + low_freq (float, optional): Low cutoff frequency for mel bins (Default: ``20.0``) + num_ceps (int, optional): Number of cepstra in MFCC computation (including C0) (Default: ``13``) + min_duration (float, optional): Minimum duration of segments to process (in seconds). (Default: ``0.0``) + num_mel_bins (int, optional): Number of triangular mel-frequency bins (Default: ``23``) + preemphasis_coefficient (float, optional): Coefficient for use in signal preemphasis (Default: ``0.97``) + raw_energy (bool, optional): If True, compute energy before preemphasis and windowing (Default: ``True``) + remove_dc_offset (bool, optional): Subtract mean from waveform on each frame (Default: ``True``) + round_to_power_of_two (bool, optional): If True, round window size to power of two by zero-padding input + to FFT. (Default: ``True``) + sample_frequency (float, optional): Waveform data sample frequency (must match the waveform file, if + specified there) (Default: ``16000.0``) + snip_edges (bool, optional): If True, end effects will be handled by outputting only frames that completely fit + in the file, and the number of frames depends on the frame_length. If False, the number of frames + depends only on the frame_shift, and we reflect the data at the ends. (Default: ``True``) + subtract_mean (bool, optional): Subtract mean of each feature file [CMS]; not recommended to do + it this way. (Default: ``False``) + use_energy (bool, optional): Add an extra dimension with energy to the FBANK output. (Default: ``False``) + vtln_high (float, optional): High inflection point in piecewise linear VTLN warping function (if + negative, offset from high-mel-freq (Default: ``-500.0``) + vtln_low (float, optional): Low inflection point in piecewise linear VTLN warping function (Default: ``100.0``) + vtln_warp (float, optional): Vtln warp factor (only applicable if vtln_map not specified) (Default: ``1.0``) + window_type (str, optional): Type of window ('hamming'|'hanning'|'povey'|'rectangular'|'blackman') + (Default: ``"povey"``) + + Returns: + Tensor: A mfcc identical to what Kaldi would output. The shape is (m, ``num_ceps``) + where m is calculated in _get_strided + """ + assert num_ceps <= num_mel_bins, "num_ceps cannot be larger than num_mel_bins: %d vs %d" % (num_ceps, num_mel_bins) + + device, dtype = waveform.device, waveform.dtype + + # The mel_energies should not be squared (use_power=True), not have mean subtracted + # (subtract_mean=False), and use log (use_log_fbank=True). + # size (m, num_mel_bins + use_energy) + feature = fbank( + waveform=waveform, + blackman_coeff=blackman_coeff, + channel=channel, + dither=dither, + energy_floor=energy_floor, + frame_length=frame_length, + frame_shift=frame_shift, + high_freq=high_freq, + htk_compat=htk_compat, + low_freq=low_freq, + min_duration=min_duration, + num_mel_bins=num_mel_bins, + preemphasis_coefficient=preemphasis_coefficient, + raw_energy=raw_energy, + remove_dc_offset=remove_dc_offset, + round_to_power_of_two=round_to_power_of_two, + sample_frequency=sample_frequency, + snip_edges=snip_edges, + subtract_mean=False, + use_energy=use_energy, + use_log_fbank=True, + use_power=True, + vtln_high=vtln_high, + vtln_low=vtln_low, + vtln_warp=vtln_warp, + window_type=window_type, + ) + + if use_energy: + # size (m) + signal_log_energy = feature[:, num_mel_bins if htk_compat else 0] + # offset is 0 if htk_compat==True else 1 + mel_offset = int(not htk_compat) + feature = feature[:, mel_offset : (num_mel_bins + mel_offset)] + + # size (num_mel_bins, num_ceps) + dct_matrix = _get_dct_matrix(num_ceps, num_mel_bins).to(dtype=dtype, device=device) + + # size (m, num_ceps) + feature = feature.matmul(dct_matrix) + + if cepstral_lifter != 0.0: + # size (1, num_ceps) + lifter_coeffs = _get_lifter_coeffs(num_ceps, cepstral_lifter).unsqueeze(0) + feature *= lifter_coeffs.to(device=device, dtype=dtype) + + # if use_energy then replace the last column for htk_compat == true else first column + if use_energy: + feature[:, 0] = signal_log_energy + + if htk_compat: + energy = feature[:, 0].unsqueeze(1) # size (m, 1) + feature = feature[:, 1:] # size (m, num_ceps - 1) + if not use_energy: + # scale on C0 (actually removing a scale we previously added that's + # part of one common definition of the cosine transform.) + energy *= math.sqrt(2) + + feature = torch.cat((feature, energy), dim=1) + + feature = _subtract_column_mean(feature, subtract_mean) + return feature diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0c1032cfd4dd4ec3ca3f204f4ccc7a0598c17349 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/__init__.py @@ -0,0 +1,47 @@ +from .cmuarctic import CMUARCTIC +from .cmudict import CMUDict +from .commonvoice import COMMONVOICE +from .dr_vctk import DR_VCTK +from .fluentcommands import FluentSpeechCommands +from .gtzan import GTZAN +from .iemocap import IEMOCAP +from .librilight_limited import LibriLightLimited +from .librimix import LibriMix +from .librispeech import LIBRISPEECH +from .librispeech_biasing import LibriSpeechBiasing +from .libritts import LIBRITTS +from .ljspeech import LJSPEECH +from .musdb_hq import MUSDB_HQ +from .quesst14 import QUESST14 +from .snips import Snips +from .speechcommands import SPEECHCOMMANDS +from .tedlium import TEDLIUM +from .vctk import VCTK_092 +from .voxceleb1 import VoxCeleb1Identification, VoxCeleb1Verification +from .yesno import YESNO + + +__all__ = [ + "COMMONVOICE", + "LIBRISPEECH", + "LibriSpeechBiasing", + "LibriLightLimited", + "SPEECHCOMMANDS", + "VCTK_092", + "DR_VCTK", + "YESNO", + "LJSPEECH", + "GTZAN", + "CMUARCTIC", + "CMUDict", + "LibriMix", + "LIBRITTS", + "TEDLIUM", + "QUESST14", + "MUSDB_HQ", + "FluentSpeechCommands", + "VoxCeleb1Identification", + "VoxCeleb1Verification", + "IEMOCAP", + "Snips", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/cmuarctic.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/cmuarctic.py new file mode 100644 index 0000000000000000000000000000000000000000..bb58159267a15ebfc74a733afef4e1e0a5ce88cf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/cmuarctic.py @@ -0,0 +1,157 @@ +import csv +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + +URL = "aew" +FOLDER_IN_ARCHIVE = "ARCTIC" +_CHECKSUMS = { + "http://festvox.org/cmu_arctic/packed/cmu_us_aew_arctic.tar.bz2": "645cb33c0f0b2ce41384fdd8d3db2c3f5fc15c1e688baeb74d2e08cab18ab406", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_ahw_arctic.tar.bz2": "024664adeb892809d646a3efd043625b46b5bfa3e6189b3500b2d0d59dfab06c", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_aup_arctic.tar.bz2": "2c55bc3050caa996758869126ad10cf42e1441212111db034b3a45189c18b6fc", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_awb_arctic.tar.bz2": "d74a950c9739a65f7bfc4dfa6187f2730fa03de5b8eb3f2da97a51b74df64d3c", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_axb_arctic.tar.bz2": "dd65c3d2907d1ee52f86e44f578319159e60f4bf722a9142be01161d84e330ff", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_bdl_arctic.tar.bz2": "26b91aaf48b2799b2956792b4632c2f926cd0542f402b5452d5adecb60942904", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_clb_arctic.tar.bz2": "3f16dc3f3b97955ea22623efb33b444341013fc660677b2e170efdcc959fa7c6", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_eey_arctic.tar.bz2": "8a0ee4e5acbd4b2f61a4fb947c1730ab3adcc9dc50b195981d99391d29928e8a", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_fem_arctic.tar.bz2": "3fcff629412b57233589cdb058f730594a62c4f3a75c20de14afe06621ef45e2", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_gka_arctic.tar.bz2": "dc82e7967cbd5eddbed33074b0699128dbd4482b41711916d58103707e38c67f", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_jmk_arctic.tar.bz2": "3a37c0e1dfc91e734fdbc88b562d9e2ebca621772402cdc693bbc9b09b211d73", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_ksp_arctic.tar.bz2": "8029cafce8296f9bed3022c44ef1e7953332b6bf6943c14b929f468122532717", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_ljm_arctic.tar.bz2": "b23993765cbf2b9e7bbc3c85b6c56eaf292ac81ee4bb887b638a24d104f921a0", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_lnh_arctic.tar.bz2": "4faf34d71aa7112813252fb20c5433e2fdd9a9de55a00701ffcbf05f24a5991a", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_rms_arctic.tar.bz2": "c6dc11235629c58441c071a7ba8a2d067903dfefbaabc4056d87da35b72ecda4", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_rxr_arctic.tar.bz2": "1fa4271c393e5998d200e56c102ff46fcfea169aaa2148ad9e9469616fbfdd9b", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_slp_arctic.tar.bz2": "54345ed55e45c23d419e9a823eef427f1cc93c83a710735ec667d068c916abf1", # noqa: E501 + "http://festvox.org/cmu_arctic/packed/cmu_us_slt_arctic.tar.bz2": "7c173297916acf3cc7fcab2713be4c60b27312316765a90934651d367226b4ea", # noqa: E501 +} + + +def load_cmuarctic_item(line: str, path: str, folder_audio: str, ext_audio: str) -> Tuple[Tensor, int, str, str]: + + utterance_id, transcript = line[0].strip().split(" ", 2)[1:] + + # Remove space, double quote, and single parenthesis from transcript + transcript = transcript[1:-3] + + file_audio = os.path.join(path, folder_audio, utterance_id + ext_audio) + + # Load audio + waveform, sample_rate = torchaudio.load(file_audio) + + return (waveform, sample_rate, transcript, utterance_id.split("_")[1]) + + +class CMUARCTIC(Dataset): + """*CMU ARCTIC* :cite:`Kominek03cmuarctic` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): + The URL to download the dataset from or the type of the dataset to download. + (default: ``"aew"``) + Allowed type values are ``"aew"``, ``"ahw"``, ``"aup"``, ``"awb"``, ``"axb"``, ``"bdl"``, + ``"clb"``, ``"eey"``, ``"fem"``, ``"gka"``, ``"jmk"``, ``"ksp"``, ``"ljm"``, ``"lnh"``, + ``"rms"``, ``"rxr"``, ``"slp"`` or ``"slt"``. + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"ARCTIC"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _file_text = "txt.done.data" + _folder_text = "etc" + _ext_audio = ".wav" + _folder_audio = "wav" + + def __init__( + self, root: Union[str, Path], url: str = URL, folder_in_archive: str = FOLDER_IN_ARCHIVE, download: bool = False + ) -> None: + + if url in [ + "aew", + "ahw", + "aup", + "awb", + "axb", + "bdl", + "clb", + "eey", + "fem", + "gka", + "jmk", + "ksp", + "ljm", + "lnh", + "rms", + "rxr", + "slp", + "slt", + ]: + + url = "cmu_us_" + url + "_arctic" + ext_archive = ".tar.bz2" + base_url = "http://www.festvox.org/cmu_arctic/packed/" + + url = os.path.join(base_url, url + ext_archive) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + basename = os.path.basename(url) + root = os.path.join(root, folder_in_archive) + if not os.path.isdir(root): + os.mkdir(root) + archive = os.path.join(root, basename) + + basename = basename.split(".")[0] + + self._path = os.path.join(root, basename) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + self._text = os.path.join(self._path, self._folder_text, self._file_text) + + with open(self._text, "r") as text: + walker = csv.reader(text, delimiter="\n") + self._walker = list(walker) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + str: + Utterance ID + """ + line = self._walker[n] + return load_cmuarctic_item(line, self._path, self._folder_audio, self._ext_audio) + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/cmudict.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/cmudict.py new file mode 100644 index 0000000000000000000000000000000000000000..81cee0e302f3e78e601e1ce585401bb18cd64adf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/cmudict.py @@ -0,0 +1,186 @@ +import os +import re +from pathlib import Path +from typing import Iterable, List, Tuple, Union + +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file + + +_CHECKSUMS = { + "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b": "209a8b4cd265013e96f4658632a9878103b0c5abf62b50d4ef3ae1be226b29e4", # noqa: E501 + "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b.symbols": "408ccaae803641c6d7b626b6299949320c2dbca96b2220fd3fb17887b023b027", # noqa: E501 +} +_PUNCTUATIONS = { + "!EXCLAMATION-POINT", + '"CLOSE-QUOTE', + '"DOUBLE-QUOTE', + '"END-OF-QUOTE', + '"END-QUOTE', + '"IN-QUOTES', + '"QUOTE', + '"UNQUOTE', + "#HASH-MARK", + "#POUND-SIGN", + "#SHARP-SIGN", + "%PERCENT", + "&ERSAND", + "'END-INNER-QUOTE", + "'END-QUOTE", + "'INNER-QUOTE", + "'QUOTE", + "'SINGLE-QUOTE", + "(BEGIN-PARENS", + "(IN-PARENTHESES", + "(LEFT-PAREN", + "(OPEN-PARENTHESES", + "(PAREN", + "(PARENS", + "(PARENTHESES", + ")CLOSE-PAREN", + ")CLOSE-PARENTHESES", + ")END-PAREN", + ")END-PARENS", + ")END-PARENTHESES", + ")END-THE-PAREN", + ")PAREN", + ")PARENS", + ")RIGHT-PAREN", + ")UN-PARENTHESES", + "+PLUS", + ",COMMA", + "--DASH", + "-DASH", + "-HYPHEN", + "...ELLIPSIS", + ".DECIMAL", + ".DOT", + ".FULL-STOP", + ".PERIOD", + ".POINT", + "/SLASH", + ":COLON", + ";SEMI-COLON", + ";SEMI-COLON(1)", + "?QUESTION-MARK", + "{BRACE", + "{LEFT-BRACE", + "{OPEN-BRACE", + "}CLOSE-BRACE", + "}RIGHT-BRACE", +} + + +def _parse_dictionary(lines: Iterable[str], exclude_punctuations: bool) -> List[str]: + _alt_re = re.compile(r"\([0-9]+\)") + cmudict: List[Tuple[str, List[str]]] = [] + for line in lines: + if not line or line.startswith(";;;"): # ignore comments + continue + + word, phones = line.strip().split(" ") + if word in _PUNCTUATIONS: + if exclude_punctuations: + continue + # !EXCLAMATION-POINT -> ! + # --DASH -> -- + # ...ELLIPSIS -> ... + if word.startswith("..."): + word = "..." + elif word.startswith("--"): + word = "--" + else: + word = word[0] + + # if a word have multiple pronunciations, there will be (number) appended to it + # for example, DATAPOINTS and DATAPOINTS(1), + # the regular expression `_alt_re` removes the '(1)' and change the word DATAPOINTS(1) to DATAPOINTS + word = re.sub(_alt_re, "", word) + phones = phones.split(" ") + cmudict.append((word, phones)) + + return cmudict + + +class CMUDict(Dataset): + """*CMU Pronouncing Dictionary* :cite:`cmudict` (CMUDict) dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + exclude_punctuations (bool, optional): + When enabled, exclude the pronounciation of punctuations, such as + `!EXCLAMATION-POINT` and `#HASH-MARK`. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + url (str, optional): + The URL to download the dictionary from. + (default: ``"http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b"``) + url_symbols (str, optional): + The URL to download the list of symbols from. + (default: ``"http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b.symbols"``) + """ + + def __init__( + self, + root: Union[str, Path], + exclude_punctuations: bool = True, + *, + download: bool = False, + url: str = "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b", + url_symbols: str = "http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/cmudict-0.7b.symbols", + ) -> None: + + self.exclude_punctuations = exclude_punctuations + + self._root_path = Path(root) + if not os.path.isdir(self._root_path): + raise RuntimeError(f"The root directory does not exist; {root}") + + dict_file = self._root_path / os.path.basename(url) + symbol_file = self._root_path / os.path.basename(url_symbols) + if not os.path.exists(dict_file): + if not download: + raise RuntimeError( + "The dictionary file is not found in the following location. " + f"Set `download=True` to download it. {dict_file}" + ) + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, dict_file, checksum) + if not os.path.exists(symbol_file): + if not download: + raise RuntimeError( + "The symbol file is not found in the following location. " + f"Set `download=True` to download it. {symbol_file}" + ) + checksum = _CHECKSUMS.get(url_symbols, None) + download_url_to_file(url_symbols, symbol_file, checksum) + + with open(symbol_file, "r") as text: + self._symbols = [line.strip() for line in text.readlines()] + + with open(dict_file, "r", encoding="latin-1") as text: + self._dictionary = _parse_dictionary(text.readlines(), exclude_punctuations=self.exclude_punctuations) + + def __getitem__(self, n: int) -> Tuple[str, List[str]]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded. + + Returns: + Tuple of a word and its phonemes + + str: + Word + List[str]: + Phonemes + """ + return self._dictionary[n] + + def __len__(self) -> int: + return len(self._dictionary) + + @property + def symbols(self) -> List[str]: + """list[str]: A list of phonemes symbols, such as ``"AA"``, ``"AE"``, ``"AH"``.""" + return self._symbols.copy() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/commonvoice.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/commonvoice.py new file mode 100644 index 0000000000000000000000000000000000000000..311102a3e08ca754dfc6526ff8f2b6b04bf6085f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/commonvoice.py @@ -0,0 +1,86 @@ +import csv +import os +from pathlib import Path +from typing import Dict, List, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset + + +def load_commonvoice_item( + line: List[str], header: List[str], path: str, folder_audio: str, ext_audio: str +) -> Tuple[Tensor, int, Dict[str, str]]: + # Each line as the following data: + # client_id, path, sentence, up_votes, down_votes, age, gender, accent + + if header[1] != "path": + raise ValueError(f"expect `header[1]` to be 'path', but got {header[1]}") + fileid = line[1] + filename = os.path.join(path, folder_audio, fileid) + if not filename.endswith(ext_audio): + filename += ext_audio + waveform, sample_rate = torchaudio.load(filename) + + dic = dict(zip(header, line)) + + return waveform, sample_rate, dic + + +class COMMONVOICE(Dataset): + """*CommonVoice* :cite:`ardila2020common` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is located. + (Where the ``tsv`` file is present.) + tsv (str, optional): + The name of the tsv file used to construct the metadata, such as + ``"train.tsv"``, ``"test.tsv"``, ``"dev.tsv"``, ``"invalidated.tsv"``, + ``"validated.tsv"`` and ``"other.tsv"``. (default: ``"train.tsv"``) + """ + + _ext_txt = ".txt" + _ext_audio = ".mp3" + _folder_audio = "clips" + + def __init__(self, root: Union[str, Path], tsv: str = "train.tsv") -> None: + + # Get string representation of 'root' in case Path object is passed + self._path = os.fspath(root) + self._tsv = os.path.join(self._path, tsv) + + with open(self._tsv, "r") as tsv_: + walker = csv.reader(tsv_, delimiter="\t") + self._header = next(walker) + self._walker = list(walker) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, Dict[str, str]]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + Dict[str, str]: + Dictionary containing the following items from the corresponding TSV file; + + * ``"client_id"`` + * ``"path"`` + * ``"sentence"`` + * ``"up_votes"`` + * ``"down_votes"`` + * ``"age"`` + * ``"gender"`` + * ``"accent"`` + """ + line = self._walker[n] + return load_commonvoice_item(line, self._header, self._path, self._folder_audio, self._ext_audio) + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/dr_vctk.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/dr_vctk.py new file mode 100644 index 0000000000000000000000000000000000000000..c0dbffc6684a1eae6250800d1e434ce78a766b3c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/dr_vctk.py @@ -0,0 +1,121 @@ +from pathlib import Path +from typing import Dict, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip + + +_URL = "https://datashare.ed.ac.uk/bitstream/handle/10283/3038/DR-VCTK.zip" +_CHECKSUM = "781f12f4406ed36ed27ae3bce55da47ba176e2d8bae67319e389e07b2c9bd769" +_SUPPORTED_SUBSETS = {"train", "test"} + + +class DR_VCTK(Dataset): + """*Device Recorded VCTK (Small subset version)* :cite:`Sarfjoo2018DeviceRV` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found. + subset (str): The subset to use. Can be one of ``"train"`` and ``"test"``. (default: ``"train"``). + download (bool): + Whether to download the dataset if it is not found at root path. (default: ``False``). + url (str): The URL to download the dataset from. + (default: ``"https://datashare.ed.ac.uk/bitstream/handle/10283/3038/DR-VCTK.zip"``) + """ + + def __init__( + self, + root: Union[str, Path], + subset: str = "train", + *, + download: bool = False, + url: str = _URL, + ) -> None: + if subset not in _SUPPORTED_SUBSETS: + raise RuntimeError( + f"The subset '{subset}' does not match any of the supported subsets: {_SUPPORTED_SUBSETS}" + ) + + root = Path(root).expanduser() + archive = root / "DR-VCTK.zip" + + self._subset = subset + self._path = root / "DR-VCTK" / "DR-VCTK" + self._clean_audio_dir = self._path / f"clean_{self._subset}set_wav_16k" + self._noisy_audio_dir = self._path / f"device-recorded_{self._subset}set_wav_16k" + self._config_filepath = self._path / "configurations" / f"{self._subset}_ch_log.txt" + + if not self._path.is_dir(): + if not archive.is_file(): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + download_url_to_file(url, archive, hash_prefix=_CHECKSUM) + _extract_zip(archive, root) + + self._config = self._load_config(self._config_filepath) + self._filename_list = sorted(self._config) + + def _load_config(self, filepath: str) -> Dict[str, Tuple[str, int]]: + # Skip header + skip_rows = 2 if self._subset == "train" else 1 + + config = {} + with open(filepath) as f: + for i, line in enumerate(f): + if i < skip_rows or not line: + continue + filename, source, channel_id = line.strip().split("\t") + config[filename] = (source, int(channel_id)) + return config + + def _load_dr_vctk_item(self, filename: str) -> Tuple[Tensor, int, Tensor, int, str, str, str, int]: + speaker_id, utterance_id = filename.split(".")[0].split("_") + source, channel_id = self._config[filename] + file_clean_audio = self._clean_audio_dir / filename + file_noisy_audio = self._noisy_audio_dir / filename + waveform_clean, sample_rate_clean = torchaudio.load(file_clean_audio) + waveform_noisy, sample_rate_noisy = torchaudio.load(file_noisy_audio) + return ( + waveform_clean, + sample_rate_clean, + waveform_noisy, + sample_rate_noisy, + speaker_id, + utterance_id, + source, + channel_id, + ) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, Tensor, int, str, str, str, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Clean waveform + int: + Sample rate of the clean waveform + Tensor: + Noisy waveform + int: + Sample rate of the noisy waveform + str: + Speaker ID + str: + Utterance ID + str: + Source + int: + Channel ID + """ + filename = self._filename_list[n] + return self._load_dr_vctk_item(filename) + + def __len__(self) -> int: + return len(self._filename_list) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/fluentcommands.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/fluentcommands.py new file mode 100644 index 0000000000000000000000000000000000000000..aacfc9cfcba14d6f2636e57138edccdcca29b5cb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/fluentcommands.py @@ -0,0 +1,108 @@ +import csv +import os +from pathlib import Path +from typing import Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + +SAMPLE_RATE = 16000 + + +class FluentSpeechCommands(Dataset): + """*Fluent Speech Commands* :cite:`fluent` dataset + + Args: + root (str of Path): Path to the directory where the dataset is found. + subset (str, optional): subset of the dataset to use. + Options: [``"train"``, ``"valid"``, ``"test"``]. + (Default: ``"train"``) + """ + + def __init__(self, root: Union[str, Path], subset: str = "train"): + if subset not in ["train", "valid", "test"]: + raise ValueError("`subset` must be one of ['train', 'valid', 'test']") + + root = os.fspath(root) + self._path = os.path.join(root, "fluent_speech_commands_dataset") + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found.") + + subset_path = os.path.join(self._path, "data", f"{subset}_data.csv") + with open(subset_path) as subset_csv: + subset_reader = csv.reader(subset_csv) + data = list(subset_reader) + + self.header = data[0] + self.data = data[1:] + + def get_metadata(self, n: int) -> Tuple[str, int, str, int, str, str, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + File name + int: + Speaker ID + str: + Transcription + str: + Action + str: + Object + str: + Location + """ + sample = self.data[n] + + file_name = sample[self.header.index("path")].split("/")[-1] + file_name = file_name.split(".")[0] + speaker_id, transcription, action, obj, location = sample[2:] + file_path = os.path.join("wavs", "speakers", speaker_id, f"{file_name}.wav") + + return file_path, SAMPLE_RATE, file_name, speaker_id, transcription, action, obj, location + + def __len__(self) -> int: + return len(self.data) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, str, str, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + File name + int: + Speaker ID + str: + Transcription + str: + Action + str: + Object + str: + Location + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/gtzan.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/gtzan.py new file mode 100644 index 0000000000000000000000000000000000000000..7fd649f7536d2cbc251b3857d0bb780ea974ce34 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/gtzan.py @@ -0,0 +1,1118 @@ +import os +from pathlib import Path +from typing import Optional, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + +# The following lists prefixed with `filtered_` provide a filtered split +# that: +# +# a. Mitigate a known issue with GTZAN (duplication) +# +# b. Provide a standard split for testing it against other +# methods (e.g. the one in jordipons/sklearn-audio-transfer-learning). +# +# Those are used when GTZAN is initialised with the `filtered` keyword. +# The split was taken from (github) jordipons/sklearn-audio-transfer-learning. + +gtzan_genres = [ + "blues", + "classical", + "country", + "disco", + "hiphop", + "jazz", + "metal", + "pop", + "reggae", + "rock", +] + +filtered_test = [ + "blues.00012", + "blues.00013", + "blues.00014", + "blues.00015", + "blues.00016", + "blues.00017", + "blues.00018", + "blues.00019", + "blues.00020", + "blues.00021", + "blues.00022", + "blues.00023", + "blues.00024", + "blues.00025", + "blues.00026", + "blues.00027", + "blues.00028", + "blues.00061", + "blues.00062", + "blues.00063", + "blues.00064", + "blues.00065", + "blues.00066", + "blues.00067", + "blues.00068", + "blues.00069", + "blues.00070", + "blues.00071", + "blues.00072", + "blues.00098", + "blues.00099", + "classical.00011", + "classical.00012", + "classical.00013", + "classical.00014", + "classical.00015", + "classical.00016", + "classical.00017", + "classical.00018", + "classical.00019", + "classical.00020", + "classical.00021", + "classical.00022", + "classical.00023", + "classical.00024", + "classical.00025", + "classical.00026", + "classical.00027", + "classical.00028", + "classical.00029", + "classical.00034", + "classical.00035", + "classical.00036", + "classical.00037", + "classical.00038", + "classical.00039", + "classical.00040", + "classical.00041", + "classical.00049", + "classical.00077", + "classical.00078", + "classical.00079", + "country.00030", + "country.00031", + "country.00032", + "country.00033", + "country.00034", + "country.00035", + "country.00036", + "country.00037", + "country.00038", + "country.00039", + "country.00040", + "country.00043", + "country.00044", + "country.00046", + "country.00047", + "country.00048", + "country.00050", + "country.00051", + "country.00053", + "country.00054", + "country.00055", + "country.00056", + "country.00057", + "country.00058", + "country.00059", + "country.00060", + "country.00061", + "country.00062", + "country.00063", + "country.00064", + "disco.00001", + "disco.00021", + "disco.00058", + "disco.00062", + "disco.00063", + "disco.00064", + "disco.00065", + "disco.00066", + "disco.00069", + "disco.00076", + "disco.00077", + "disco.00078", + "disco.00079", + "disco.00080", + "disco.00081", + "disco.00082", + "disco.00083", + "disco.00084", + "disco.00085", + "disco.00086", + "disco.00087", + "disco.00088", + "disco.00091", + "disco.00092", + "disco.00093", + "disco.00094", + "disco.00096", + "disco.00097", + "disco.00099", + "hiphop.00000", + "hiphop.00026", + "hiphop.00027", + "hiphop.00030", + "hiphop.00040", + "hiphop.00043", + "hiphop.00044", + "hiphop.00045", + "hiphop.00051", + "hiphop.00052", + "hiphop.00053", + "hiphop.00054", + "hiphop.00062", + "hiphop.00063", + "hiphop.00064", + "hiphop.00065", + "hiphop.00066", + "hiphop.00067", + "hiphop.00068", + "hiphop.00069", + "hiphop.00070", + "hiphop.00071", + "hiphop.00072", + "hiphop.00073", + "hiphop.00074", + "hiphop.00075", + "hiphop.00099", + "jazz.00073", + "jazz.00074", + "jazz.00075", + "jazz.00076", + "jazz.00077", + "jazz.00078", + "jazz.00079", + "jazz.00080", + "jazz.00081", + "jazz.00082", + "jazz.00083", + "jazz.00084", + "jazz.00085", + "jazz.00086", + "jazz.00087", + "jazz.00088", + "jazz.00089", + "jazz.00090", + "jazz.00091", + "jazz.00092", + "jazz.00093", + "jazz.00094", + "jazz.00095", + "jazz.00096", + "jazz.00097", + "jazz.00098", + "jazz.00099", + "metal.00012", + "metal.00013", + "metal.00014", + "metal.00015", + "metal.00022", + "metal.00023", + "metal.00025", + "metal.00026", + "metal.00027", + "metal.00028", + "metal.00029", + "metal.00030", + "metal.00031", + "metal.00032", + "metal.00033", + "metal.00038", + "metal.00039", + "metal.00067", + "metal.00070", + "metal.00073", + "metal.00074", + "metal.00075", + "metal.00078", + "metal.00083", + "metal.00085", + "metal.00087", + "metal.00088", + "pop.00000", + "pop.00001", + "pop.00013", + "pop.00014", + "pop.00043", + "pop.00063", + "pop.00064", + "pop.00065", + "pop.00066", + "pop.00069", + "pop.00070", + "pop.00071", + "pop.00072", + "pop.00073", + "pop.00074", + "pop.00075", + "pop.00076", + "pop.00077", + "pop.00078", + "pop.00079", + "pop.00082", + "pop.00088", + "pop.00089", + "pop.00090", + "pop.00091", + "pop.00092", + "pop.00093", + "pop.00094", + "pop.00095", + "pop.00096", + "reggae.00034", + "reggae.00035", + "reggae.00036", + "reggae.00037", + "reggae.00038", + "reggae.00039", + "reggae.00040", + "reggae.00046", + "reggae.00047", + "reggae.00048", + "reggae.00052", + "reggae.00053", + "reggae.00064", + "reggae.00065", + "reggae.00066", + "reggae.00067", + "reggae.00068", + "reggae.00071", + "reggae.00079", + "reggae.00082", + "reggae.00083", + "reggae.00084", + "reggae.00087", + "reggae.00088", + "reggae.00089", + "reggae.00090", + "rock.00010", + "rock.00011", + "rock.00012", + "rock.00013", + "rock.00014", + "rock.00015", + "rock.00027", + "rock.00028", + "rock.00029", + "rock.00030", + "rock.00031", + "rock.00032", + "rock.00033", + "rock.00034", + "rock.00035", + "rock.00036", + "rock.00037", + "rock.00039", + "rock.00040", + "rock.00041", + "rock.00042", + "rock.00043", + "rock.00044", + "rock.00045", + "rock.00046", + "rock.00047", + "rock.00048", + "rock.00086", + "rock.00087", + "rock.00088", + "rock.00089", + "rock.00090", +] + +filtered_train = [ + "blues.00029", + "blues.00030", + "blues.00031", + "blues.00032", + "blues.00033", + "blues.00034", + "blues.00035", + "blues.00036", + "blues.00037", + "blues.00038", + "blues.00039", + "blues.00040", + "blues.00041", + "blues.00042", + "blues.00043", + "blues.00044", + "blues.00045", + "blues.00046", + "blues.00047", + "blues.00048", + "blues.00049", + "blues.00073", + "blues.00074", + "blues.00075", + "blues.00076", + "blues.00077", + "blues.00078", + "blues.00079", + "blues.00080", + "blues.00081", + "blues.00082", + "blues.00083", + "blues.00084", + "blues.00085", + "blues.00086", + "blues.00087", + "blues.00088", + "blues.00089", + "blues.00090", + "blues.00091", + "blues.00092", + "blues.00093", + "blues.00094", + "blues.00095", + "blues.00096", + "blues.00097", + "classical.00030", + "classical.00031", + "classical.00032", + "classical.00033", + "classical.00043", + "classical.00044", + "classical.00045", + "classical.00046", + "classical.00047", + "classical.00048", + "classical.00050", + "classical.00051", + "classical.00052", + "classical.00053", + "classical.00054", + "classical.00055", + "classical.00056", + "classical.00057", + "classical.00058", + "classical.00059", + "classical.00060", + "classical.00061", + "classical.00062", + "classical.00063", + "classical.00064", + "classical.00065", + "classical.00066", + "classical.00067", + "classical.00080", + "classical.00081", + "classical.00082", + "classical.00083", + "classical.00084", + "classical.00085", + "classical.00086", + "classical.00087", + "classical.00088", + "classical.00089", + "classical.00090", + "classical.00091", + "classical.00092", + "classical.00093", + "classical.00094", + "classical.00095", + "classical.00096", + "classical.00097", + "classical.00098", + "classical.00099", + "country.00019", + "country.00020", + "country.00021", + "country.00022", + "country.00023", + "country.00024", + "country.00025", + "country.00026", + "country.00028", + "country.00029", + "country.00065", + "country.00066", + "country.00067", + "country.00068", + "country.00069", + "country.00070", + "country.00071", + "country.00072", + "country.00073", + "country.00074", + "country.00075", + "country.00076", + "country.00077", + "country.00078", + "country.00079", + "country.00080", + "country.00081", + "country.00082", + "country.00083", + "country.00084", + "country.00085", + "country.00086", + "country.00087", + "country.00088", + "country.00089", + "country.00090", + "country.00091", + "country.00092", + "country.00093", + "country.00094", + "country.00095", + "country.00096", + "country.00097", + "country.00098", + "country.00099", + "disco.00005", + "disco.00015", + "disco.00016", + "disco.00017", + "disco.00018", + "disco.00019", + "disco.00020", + "disco.00022", + "disco.00023", + "disco.00024", + "disco.00025", + "disco.00026", + "disco.00027", + "disco.00028", + "disco.00029", + "disco.00030", + "disco.00031", + "disco.00032", + "disco.00033", + "disco.00034", + "disco.00035", + "disco.00036", + "disco.00037", + "disco.00039", + "disco.00040", + "disco.00041", + "disco.00042", + "disco.00043", + "disco.00044", + "disco.00045", + "disco.00047", + "disco.00049", + "disco.00053", + "disco.00054", + "disco.00056", + "disco.00057", + "disco.00059", + "disco.00061", + "disco.00070", + "disco.00073", + "disco.00074", + "disco.00089", + "hiphop.00002", + "hiphop.00003", + "hiphop.00004", + "hiphop.00005", + "hiphop.00006", + "hiphop.00007", + "hiphop.00008", + "hiphop.00009", + "hiphop.00010", + "hiphop.00011", + "hiphop.00012", + "hiphop.00013", + "hiphop.00014", + "hiphop.00015", + "hiphop.00016", + "hiphop.00017", + "hiphop.00018", + "hiphop.00019", + "hiphop.00020", + "hiphop.00021", + "hiphop.00022", + "hiphop.00023", + "hiphop.00024", + "hiphop.00025", + "hiphop.00028", + "hiphop.00029", + "hiphop.00031", + "hiphop.00032", + "hiphop.00033", + "hiphop.00034", + "hiphop.00035", + "hiphop.00036", + "hiphop.00037", + "hiphop.00038", + "hiphop.00041", + "hiphop.00042", + "hiphop.00055", + "hiphop.00056", + "hiphop.00057", + "hiphop.00058", + "hiphop.00059", + "hiphop.00060", + "hiphop.00061", + "hiphop.00077", + "hiphop.00078", + "hiphop.00079", + "hiphop.00080", + "jazz.00000", + "jazz.00001", + "jazz.00011", + "jazz.00012", + "jazz.00013", + "jazz.00014", + "jazz.00015", + "jazz.00016", + "jazz.00017", + "jazz.00018", + "jazz.00019", + "jazz.00020", + "jazz.00021", + "jazz.00022", + "jazz.00023", + "jazz.00024", + "jazz.00041", + "jazz.00047", + "jazz.00048", + "jazz.00049", + "jazz.00050", + "jazz.00051", + "jazz.00052", + "jazz.00053", + "jazz.00054", + "jazz.00055", + "jazz.00056", + "jazz.00057", + "jazz.00058", + "jazz.00059", + "jazz.00060", + "jazz.00061", + "jazz.00062", + "jazz.00063", + "jazz.00064", + "jazz.00065", + "jazz.00066", + "jazz.00067", + "jazz.00068", + "jazz.00069", + "jazz.00070", + "jazz.00071", + "jazz.00072", + "metal.00002", + "metal.00003", + "metal.00005", + "metal.00021", + "metal.00024", + "metal.00035", + "metal.00046", + "metal.00047", + "metal.00048", + "metal.00049", + "metal.00050", + "metal.00051", + "metal.00052", + "metal.00053", + "metal.00054", + "metal.00055", + "metal.00056", + "metal.00057", + "metal.00059", + "metal.00060", + "metal.00061", + "metal.00062", + "metal.00063", + "metal.00064", + "metal.00065", + "metal.00066", + "metal.00069", + "metal.00071", + "metal.00072", + "metal.00079", + "metal.00080", + "metal.00084", + "metal.00086", + "metal.00089", + "metal.00090", + "metal.00091", + "metal.00092", + "metal.00093", + "metal.00094", + "metal.00095", + "metal.00096", + "metal.00097", + "metal.00098", + "metal.00099", + "pop.00002", + "pop.00003", + "pop.00004", + "pop.00005", + "pop.00006", + "pop.00007", + "pop.00008", + "pop.00009", + "pop.00011", + "pop.00012", + "pop.00016", + "pop.00017", + "pop.00018", + "pop.00019", + "pop.00020", + "pop.00023", + "pop.00024", + "pop.00025", + "pop.00026", + "pop.00027", + "pop.00028", + "pop.00029", + "pop.00031", + "pop.00032", + "pop.00033", + "pop.00034", + "pop.00035", + "pop.00036", + "pop.00038", + "pop.00039", + "pop.00040", + "pop.00041", + "pop.00042", + "pop.00044", + "pop.00046", + "pop.00049", + "pop.00050", + "pop.00080", + "pop.00097", + "pop.00098", + "pop.00099", + "reggae.00000", + "reggae.00001", + "reggae.00002", + "reggae.00004", + "reggae.00006", + "reggae.00009", + "reggae.00011", + "reggae.00012", + "reggae.00014", + "reggae.00015", + "reggae.00016", + "reggae.00017", + "reggae.00018", + "reggae.00019", + "reggae.00020", + "reggae.00021", + "reggae.00022", + "reggae.00023", + "reggae.00024", + "reggae.00025", + "reggae.00026", + "reggae.00027", + "reggae.00028", + "reggae.00029", + "reggae.00030", + "reggae.00031", + "reggae.00032", + "reggae.00042", + "reggae.00043", + "reggae.00044", + "reggae.00045", + "reggae.00049", + "reggae.00050", + "reggae.00051", + "reggae.00054", + "reggae.00055", + "reggae.00056", + "reggae.00057", + "reggae.00058", + "reggae.00059", + "reggae.00060", + "reggae.00063", + "reggae.00069", + "rock.00000", + "rock.00001", + "rock.00002", + "rock.00003", + "rock.00004", + "rock.00005", + "rock.00006", + "rock.00007", + "rock.00008", + "rock.00009", + "rock.00016", + "rock.00017", + "rock.00018", + "rock.00019", + "rock.00020", + "rock.00021", + "rock.00022", + "rock.00023", + "rock.00024", + "rock.00025", + "rock.00026", + "rock.00057", + "rock.00058", + "rock.00059", + "rock.00060", + "rock.00061", + "rock.00062", + "rock.00063", + "rock.00064", + "rock.00065", + "rock.00066", + "rock.00067", + "rock.00068", + "rock.00069", + "rock.00070", + "rock.00091", + "rock.00092", + "rock.00093", + "rock.00094", + "rock.00095", + "rock.00096", + "rock.00097", + "rock.00098", + "rock.00099", +] + +filtered_valid = [ + "blues.00000", + "blues.00001", + "blues.00002", + "blues.00003", + "blues.00004", + "blues.00005", + "blues.00006", + "blues.00007", + "blues.00008", + "blues.00009", + "blues.00010", + "blues.00011", + "blues.00050", + "blues.00051", + "blues.00052", + "blues.00053", + "blues.00054", + "blues.00055", + "blues.00056", + "blues.00057", + "blues.00058", + "blues.00059", + "blues.00060", + "classical.00000", + "classical.00001", + "classical.00002", + "classical.00003", + "classical.00004", + "classical.00005", + "classical.00006", + "classical.00007", + "classical.00008", + "classical.00009", + "classical.00010", + "classical.00068", + "classical.00069", + "classical.00070", + "classical.00071", + "classical.00072", + "classical.00073", + "classical.00074", + "classical.00075", + "classical.00076", + "country.00000", + "country.00001", + "country.00002", + "country.00003", + "country.00004", + "country.00005", + "country.00006", + "country.00007", + "country.00009", + "country.00010", + "country.00011", + "country.00012", + "country.00013", + "country.00014", + "country.00015", + "country.00016", + "country.00017", + "country.00018", + "country.00027", + "country.00041", + "country.00042", + "country.00045", + "country.00049", + "disco.00000", + "disco.00002", + "disco.00003", + "disco.00004", + "disco.00006", + "disco.00007", + "disco.00008", + "disco.00009", + "disco.00010", + "disco.00011", + "disco.00012", + "disco.00013", + "disco.00014", + "disco.00046", + "disco.00048", + "disco.00052", + "disco.00067", + "disco.00068", + "disco.00072", + "disco.00075", + "disco.00090", + "disco.00095", + "hiphop.00081", + "hiphop.00082", + "hiphop.00083", + "hiphop.00084", + "hiphop.00085", + "hiphop.00086", + "hiphop.00087", + "hiphop.00088", + "hiphop.00089", + "hiphop.00090", + "hiphop.00091", + "hiphop.00092", + "hiphop.00093", + "hiphop.00094", + "hiphop.00095", + "hiphop.00096", + "hiphop.00097", + "hiphop.00098", + "jazz.00002", + "jazz.00003", + "jazz.00004", + "jazz.00005", + "jazz.00006", + "jazz.00007", + "jazz.00008", + "jazz.00009", + "jazz.00010", + "jazz.00025", + "jazz.00026", + "jazz.00027", + "jazz.00028", + "jazz.00029", + "jazz.00030", + "jazz.00031", + "jazz.00032", + "metal.00000", + "metal.00001", + "metal.00006", + "metal.00007", + "metal.00008", + "metal.00009", + "metal.00010", + "metal.00011", + "metal.00016", + "metal.00017", + "metal.00018", + "metal.00019", + "metal.00020", + "metal.00036", + "metal.00037", + "metal.00068", + "metal.00076", + "metal.00077", + "metal.00081", + "metal.00082", + "pop.00010", + "pop.00053", + "pop.00055", + "pop.00058", + "pop.00059", + "pop.00060", + "pop.00061", + "pop.00062", + "pop.00081", + "pop.00083", + "pop.00084", + "pop.00085", + "pop.00086", + "reggae.00061", + "reggae.00062", + "reggae.00070", + "reggae.00072", + "reggae.00074", + "reggae.00076", + "reggae.00077", + "reggae.00078", + "reggae.00085", + "reggae.00092", + "reggae.00093", + "reggae.00094", + "reggae.00095", + "reggae.00096", + "reggae.00097", + "reggae.00098", + "reggae.00099", + "rock.00038", + "rock.00049", + "rock.00050", + "rock.00051", + "rock.00052", + "rock.00053", + "rock.00054", + "rock.00055", + "rock.00056", + "rock.00071", + "rock.00072", + "rock.00073", + "rock.00074", + "rock.00075", + "rock.00076", + "rock.00077", + "rock.00078", + "rock.00079", + "rock.00080", + "rock.00081", + "rock.00082", + "rock.00083", + "rock.00084", + "rock.00085", +] + + +URL = "http://opihi.cs.uvic.ca/sound/genres.tar.gz" +FOLDER_IN_ARCHIVE = "genres" +_CHECKSUMS = { + "http://opihi.cs.uvic.ca/sound/genres.tar.gz": "24347e0223d2ba798e0a558c4c172d9d4a19c00bb7963fe055d183dadb4ef2c6" +} + + +def load_gtzan_item(fileid: str, path: str, ext_audio: str) -> Tuple[Tensor, str]: + """ + Loads a file from the dataset and returns the raw waveform + as a Torch Tensor, its sample rate as an integer, and its + genre as a string. + """ + # Filenames are of the form label.id, e.g. blues.00078 + label, _ = fileid.split(".") + + # Read wav + file_audio = os.path.join(path, label, fileid + ext_audio) + waveform, sample_rate = torchaudio.load(file_audio) + + return waveform, sample_rate, label + + +class GTZAN(Dataset): + """*GTZAN* :cite:`tzanetakis_essl_cook_2001` dataset. + + Note: + Please see http://marsyas.info/downloads/datasets.html if you are planning to use + this dataset to publish results. + + Note: + As of October 2022, the download link is not currently working. Setting ``download=True`` + in GTZAN dataset will result in a URL connection error. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from. + (default: ``"http://opihi.cs.uvic.ca/sound/genres.tar.gz"``) + folder_in_archive (str, optional): The top-level directory of the dataset. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + subset (str or None, optional): Which subset of the dataset to use. + One of ``"training"``, ``"validation"``, ``"testing"`` or ``None``. + If ``None``, the entire dataset is used. (default: ``None``). + """ + + _ext_audio = ".wav" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + subset: Optional[str] = None, + ) -> None: + + # super(GTZAN, self).__init__() + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + self.root = root + self.url = url + self.folder_in_archive = folder_in_archive + self.download = download + self.subset = subset + + if subset is not None and subset not in ["training", "validation", "testing"]: + raise ValueError("When `subset` is not None, it must be one of ['training', 'validation', 'testing'].") + + archive = os.path.basename(url) + archive = os.path.join(root, archive) + self._path = os.path.join(root, folder_in_archive) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + + if self.subset is None: + # Check every subdirectory under dataset root + # which has the same name as the genres in + # GTZAN (e.g. `root_dir'/blues/, `root_dir'/rock, etc.) + # This lets users remove or move around song files, + # useful when e.g. they want to use only some of the files + # in a genre or want to label other files with a different + # genre. + self._walker = [] + + root = os.path.expanduser(self._path) + + for directory in gtzan_genres: + fulldir = os.path.join(root, directory) + + if not os.path.exists(fulldir): + continue + + songs_in_genre = os.listdir(fulldir) + songs_in_genre.sort() + for fname in songs_in_genre: + name, ext = os.path.splitext(fname) + if ext.lower() == ".wav" and "." in name: + # Check whether the file is of the form + # `gtzan_genre`.`5 digit number`.wav + genre, num = name.split(".") + if genre in gtzan_genres and len(num) == 5 and num.isdigit(): + self._walker.append(name) + else: + if self.subset == "training": + self._walker = filtered_train + elif self.subset == "validation": + self._walker = filtered_valid + elif self.subset == "testing": + self._walker = filtered_test + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Label + """ + fileid = self._walker[n] + item = load_gtzan_item(fileid, self._path, self._ext_audio) + waveform, sample_rate, label = item + return waveform, sample_rate, label + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/iemocap.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/iemocap.py new file mode 100644 index 0000000000000000000000000000000000000000..9eb62b6b7eff61d76d52f29b7ed3dfac05de7c52 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/iemocap.py @@ -0,0 +1,147 @@ +import os +import re +from pathlib import Path +from typing import Optional, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + + +_SAMPLE_RATE = 16000 + + +def _get_wavs_paths(data_dir): + wav_dir = data_dir / "sentences" / "wav" + wav_paths = sorted(str(p) for p in wav_dir.glob("*/*.wav")) + relative_paths = [] + for wav_path in wav_paths: + start = wav_path.find("Session") + wav_path = wav_path[start:] + relative_paths.append(wav_path) + return relative_paths + + +class IEMOCAP(Dataset): + """*IEMOCAP* :cite:`iemocap` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found + sessions (Tuple[int]): Tuple of sessions (1-5) to use. (Default: ``(1, 2, 3, 4, 5)``) + utterance_type (str or None, optional): Which type(s) of utterances to include in the dataset. + Options: ("scripted", "improvised", ``None``). If ``None``, both scripted and improvised + data are used. + """ + + def __init__( + self, + root: Union[str, Path], + sessions: Tuple[str] = (1, 2, 3, 4, 5), + utterance_type: Optional[str] = None, + ): + root = Path(root) + self._path = root / "IEMOCAP" + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found.") + + if utterance_type not in ["scripted", "improvised", None]: + raise ValueError("utterance_type must be one of ['scripted', 'improvised', or None]") + + all_data = [] + self.data = [] + self.mapping = {} + + for session in sessions: + session_name = f"Session{session}" + session_dir = self._path / session_name + + # get wav paths + wav_paths = _get_wavs_paths(session_dir) + for wav_path in wav_paths: + wav_stem = str(Path(wav_path).stem) + all_data.append(wav_stem) + + # add labels + label_dir = session_dir / "dialog" / "EmoEvaluation" + query = "*.txt" + if utterance_type == "scripted": + query = "*script*.txt" + elif utterance_type == "improvised": + query = "*impro*.txt" + label_paths = label_dir.glob(query) + + for label_path in label_paths: + with open(label_path, "r") as f: + for line in f: + if not line.startswith("["): + continue + line = re.split("[\t\n]", line) + wav_stem = line[1] + label = line[2] + if wav_stem not in all_data: + continue + if label not in ["neu", "hap", "ang", "sad", "exc", "fru"]: + continue + self.mapping[wav_stem] = {} + self.mapping[wav_stem]["label"] = label + + for wav_path in wav_paths: + wav_stem = str(Path(wav_path).stem) + if wav_stem in self.mapping: + self.data.append(wav_stem) + self.mapping[wav_stem]["path"] = wav_path + + def get_metadata(self, n: int) -> Tuple[str, int, str, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:meth:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + File name + str: + Label (one of ``"neu"``, ``"hap"``, ``"ang"``, ``"sad"``, ``"exc"``, ``"fru"``) + str: + Speaker + """ + wav_stem = self.data[n] + wav_path = self.mapping[wav_stem]["path"] + label = self.mapping[wav_stem]["label"] + speaker = wav_stem.split("_")[0] + return (wav_path, _SAMPLE_RATE, wav_stem, label, speaker) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + File name + str: + Label (one of ``"neu"``, ``"hap"``, ``"ang"``, ``"sad"``, ``"exc"``, ``"fru"``) + str: + Speaker + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self): + return len(self.data) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librilight_limited.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librilight_limited.py new file mode 100644 index 0000000000000000000000000000000000000000..89e3ae4822490f761a01d536d20126aff8864bda --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librilight_limited.py @@ -0,0 +1,111 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.librispeech import _get_librispeech_metadata +from torchaudio.datasets.utils import _extract_tar + + +_ARCHIVE_NAME = "librispeech_finetuning" +_URL = "https://dl.fbaipublicfiles.com/librilight/data/librispeech_finetuning.tgz" +_CHECKSUM = "5d1efdc777b548194d7e09ba89126e2188026df9fd57aa57eb14408d2b2342af" +_SUBSET_MAP = {"10min": ["1h/0"], "1h": ["1h/*"], "10h": ["1h/*", "9h"]} + + +def _get_fileids_paths(path: Path, folders: List[str], _ext_audio: str) -> List[Tuple[str, str]]: + """Get the file names and the corresponding file paths without `speaker_id` + and `chapter_id` directories. + The format of path is like: + {root}/{_ARCHIVE_NAME}/1h/[0-5]/[clean, other] or + {root}/{_ARCHIVE_NAME}/9h/[clean, other] + + Args: + path (Path): Root path to the dataset. + folders (List[str]): Folders that contain the desired audio files. + _ext_audio (str): Extension of audio files. + + Returns: + List[Tuple[str, str]]: + List of tuples where the first element is the relative path to the audio file. + The format of relative path is like: + 1h/[0-5]/[clean, other] or 9h/[clean, other] + The second element is the file name without audio extension. + """ + + path = Path(path) + files_paths = [] + for folder in folders: + paths = [p.relative_to(path) for p in path.glob(f"{folder}/*/*/*/*{_ext_audio}")] + files_paths += [(str(p.parent.parent.parent), str(p.stem)) for p in paths] # get subset folder and file name + files_paths.sort(key=lambda x: x[0] + x[1]) + return files_paths + + +class LibriLightLimited(Dataset): + """Subset of Libri-light :cite:`librilight` dataset, + which was used in HuBERT :cite:`hsu2021hubert` for supervised fine-tuning. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + subset (str, optional): The subset to use. Options: [``"10min"``, ``"1h"``, ``"10h"``] + (Default: ``"10min"``). + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _ext_txt = ".trans.txt" + _ext_audio = ".flac" + + def __init__( + self, + root: Union[str, Path], + subset: str = "10min", + download: bool = False, + ) -> None: + if subset not in _SUBSET_MAP: + raise ValueError(f"`subset` must be one of {_SUBSET_MAP.keys()}. Found: {subset}") + folders = _SUBSET_MAP[subset] + + root = os.fspath(root) + self._path = os.path.join(root, _ARCHIVE_NAME) + archive = os.path.join(root, f"{_ARCHIVE_NAME}.tgz") + if not os.path.isdir(self._path): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download") + if not os.path.isfile(archive): + download_url_to_file(_URL, archive, hash_prefix=_CHECKSUM) + _extract_tar(archive) + self._fileids_paths = _get_fileids_paths(self._path, folders, self._ext_audio) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + """ + file_path, fileid = self._fileids_paths[n] + metadata = _get_librispeech_metadata(fileid, self._path, file_path, self._ext_audio, self._ext_txt) + waveform, _ = torchaudio.load(os.path.join(self._path, metadata[0])) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._fileids_paths) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librimix.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librimix.py new file mode 100644 index 0000000000000000000000000000000000000000..d605cfa1b891d892a3658886e0df4beae42e8a01 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librimix.py @@ -0,0 +1,133 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +import torch +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + +_TASKS_TO_MIXTURE = { + "sep_clean": "mix_clean", + "enh_single": "mix_single", + "enh_both": "mix_both", + "sep_noisy": "mix_both", +} + + +class LibriMix(Dataset): + r"""*LibriMix* :cite:`cosentino2020librimix` dataset. + + Args: + root (str or Path): The path where the directory ``Libri2Mix`` or + ``Libri3Mix`` is stored. Not the path of those directories. + subset (str, optional): The subset to use. Options: [``"train-360"``, ``"train-100"``, + ``"dev"``, and ``"test"``] (Default: ``"train-360"``). + num_speakers (int, optional): The number of speakers, which determines the directories + to traverse. The Dataset will traverse ``s1`` to ``sN`` directories to collect + N source audios. (Default: 2) + sample_rate (int, optional): Sample rate of audio files. The ``sample_rate`` determines + which subdirectory the audio are fetched. If any of the audio has a different sample + rate, raises ``ValueError``. Options: [8000, 16000] (Default: 8000) + task (str, optional): The task of LibriMix. + Options: [``"enh_single"``, ``"enh_both"``, ``"sep_clean"``, ``"sep_noisy"``] + (Default: ``"sep_clean"``) + mode (str, optional): The mode when creating the mixture. If set to ``"min"``, the lengths of mixture + and sources are the minimum length of all sources. If set to ``"max"``, the lengths of mixture and + sources are zero padded to the maximum length of all sources. + Options: [``"min"``, ``"max"``] + (Default: ``"min"``) + + Note: + The LibriMix dataset needs to be manually generated. Please check https://github.com/JorisCos/LibriMix + """ + + def __init__( + self, + root: Union[str, Path], + subset: str = "train-360", + num_speakers: int = 2, + sample_rate: int = 8000, + task: str = "sep_clean", + mode: str = "min", + ): + self.root = Path(root) / f"Libri{num_speakers}Mix" + if not os.path.exists(self.root): + raise RuntimeError( + f"The path {self.root} doesn't exist. " + "Please check the ``root`` path and ``num_speakers`` or download the dataset manually." + ) + if mode not in ["max", "min"]: + raise ValueError(f'Expect ``mode`` to be one in ["min", "max"]. Found {mode}.') + if sample_rate == 8000: + mix_dir = self.root / "wav8k" / mode / subset + elif sample_rate == 16000: + mix_dir = self.root / "wav16k" / mode / subset + else: + raise ValueError(f"Unsupported sample rate. Found {sample_rate}.") + self.sample_rate = sample_rate + self.task = task + + self.mix_dir = mix_dir / _TASKS_TO_MIXTURE[task] + if task == "enh_both": + self.src_dirs = [(mix_dir / "mix_clean")] + else: + self.src_dirs = [(mix_dir / f"s{i+1}") for i in range(num_speakers)] + + self.files = [p.name for p in self.mix_dir.glob("*.wav")] + self.files.sort() + + def _load_sample(self, key) -> Tuple[int, torch.Tensor, List[torch.Tensor]]: + metadata = self.get_metadata(key) + mixed = _load_waveform(self.root, metadata[1], metadata[0]) + srcs = [] + for i, path_ in enumerate(metadata[2]): + src = _load_waveform(self.root, path_, metadata[0]) + if mixed.shape != src.shape: + raise ValueError(f"Different waveform shapes. mixed: {mixed.shape}, src[{i}]: {src.shape}") + srcs.append(src) + return self.sample_rate, mixed, srcs + + def get_metadata(self, key: int) -> Tuple[int, str, List[str]]: + """Get metadata for the n-th sample from the dataset. + + Args: + key (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + int: + Sample rate + str: + Path to mixed audio + List of str: + List of paths to source audios + """ + filename = self.files[key] + mixed_path = os.path.relpath(self.mix_dir / filename, self.root) + srcs_paths = [] + for dir_ in self.src_dirs: + src = os.path.relpath(dir_ / filename, self.root) + srcs_paths.append(src) + return self.sample_rate, mixed_path, srcs_paths + + def __len__(self) -> int: + return len(self.files) + + def __getitem__(self, key: int) -> Tuple[int, torch.Tensor, List[torch.Tensor]]: + """Load the n-th sample from the dataset. + + Args: + key (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + int: + Sample rate + Tensor: + Mixture waveform + List of Tensors: + List of source waveforms + """ + return self._load_sample(key) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librispeech.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librispeech.py new file mode 100644 index 0000000000000000000000000000000000000000..50667cb5c49da6677342451dd8070c8c243d6716 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librispeech.py @@ -0,0 +1,174 @@ +import os +from pathlib import Path +from typing import Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + +URL = "train-clean-100" +FOLDER_IN_ARCHIVE = "LibriSpeech" +SAMPLE_RATE = 16000 +_DATA_SUBSETS = [ + "dev-clean", + "dev-other", + "test-clean", + "test-other", + "train-clean-100", + "train-clean-360", + "train-other-500", +] +_CHECKSUMS = { + "http://www.openslr.org/resources/12/dev-clean.tar.gz": "76f87d090650617fca0cac8f88b9416e0ebf80350acb97b343a85fa903728ab3", # noqa: E501 + "http://www.openslr.org/resources/12/dev-other.tar.gz": "12661c48e8c3fe1de2c1caa4c3e135193bfb1811584f11f569dd12645aa84365", # noqa: E501 + "http://www.openslr.org/resources/12/test-clean.tar.gz": "39fde525e59672dc6d1551919b1478f724438a95aa55f874b576be21967e6c23", # noqa: E501 + "http://www.openslr.org/resources/12/test-other.tar.gz": "d09c181bba5cf717b3dee7d4d592af11a3ee3a09e08ae025c5506f6ebe961c29", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-100.tar.gz": "d4ddd1d5a6ab303066f14971d768ee43278a5f2a0aa43dc716b0e64ecbbbf6e2", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-360.tar.gz": "146a56496217e96c14334a160df97fffedd6e0a04e66b9c5af0d40be3c792ecf", # noqa: E501 + "http://www.openslr.org/resources/12/train-other-500.tar.gz": "ddb22f27f96ec163645d53215559df6aa36515f26e01dd70798188350adcb6d2", # noqa: E501 +} + + +def _download_librispeech(root, url): + base_url = "http://www.openslr.org/resources/12/" + ext_archive = ".tar.gz" + + filename = url + ext_archive + archive = os.path.join(root, filename) + download_url = os.path.join(base_url, filename) + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(download_url, None) + download_url_to_file(download_url, archive, hash_prefix=checksum) + _extract_tar(archive) + + +def _get_librispeech_metadata( + fileid: str, root: str, folder: str, ext_audio: str, ext_txt: str +) -> Tuple[str, int, str, int, int, int]: + speaker_id, chapter_id, utterance_id = fileid.split("-") + + # Get audio path and sample rate + fileid_audio = f"{speaker_id}-{chapter_id}-{utterance_id}" + filepath = os.path.join(folder, speaker_id, chapter_id, f"{fileid_audio}{ext_audio}") + + # Load text + file_text = f"{speaker_id}-{chapter_id}{ext_txt}" + file_text = os.path.join(root, folder, speaker_id, chapter_id, file_text) + with open(file_text) as ft: + for line in ft: + fileid_text, transcript = line.strip().split(" ", 1) + if fileid_audio == fileid_text: + break + else: + # Translation not found + raise FileNotFoundError(f"Translation not found for {fileid_audio}") + + return ( + filepath, + SAMPLE_RATE, + transcript, + int(speaker_id), + int(chapter_id), + int(utterance_id), + ) + + +class LIBRISPEECH(Dataset): + """*LibriSpeech* :cite:`7178964` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"dev-clean"``, ``"dev-other"``, ``"test-clean"``, + ``"test-other"``, ``"train-clean-100"``, ``"train-clean-360"`` and + ``"train-other-500"``. (default: ``"train-clean-100"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"LibriSpeech"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _ext_txt = ".trans.txt" + _ext_audio = ".flac" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + ) -> None: + self._url = url + if url not in _DATA_SUBSETS: + raise ValueError(f"Invalid url '{url}' given; please provide one of {_DATA_SUBSETS}.") + + root = os.fspath(root) + self._archive = os.path.join(root, folder_in_archive) + self._path = os.path.join(root, folder_in_archive, url) + + if not os.path.isdir(self._path): + if download: + _download_librispeech(root, url) + else: + raise RuntimeError( + f"Dataset not found at {self._path}. Please set `download=True` to download the dataset." + ) + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio)) + + def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + """ + fileid = self._walker[n] + return _get_librispeech_metadata(fileid, self._archive, self._url, self._ext_audio, self._ext_txt) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._archive, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librispeech_biasing.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librispeech_biasing.py new file mode 100644 index 0000000000000000000000000000000000000000..c77b4215d2aa5b2df9c78546e0cd8049d628b722 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/librispeech_biasing.py @@ -0,0 +1,189 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + +URL = "train-clean-100" +FOLDER_IN_ARCHIVE = "LibriSpeech" +SAMPLE_RATE = 16000 +_DATA_SUBSETS = [ + "dev-clean", + "dev-other", + "test-clean", + "test-other", + "train-clean-100", + "train-clean-360", + "train-other-500", +] +_CHECKSUMS = { + "http://www.openslr.org/resources/12/dev-clean.tar.gz": "76f87d090650617fca0cac8f88b9416e0ebf80350acb97b343a85fa903728ab3", # noqa: E501 + "http://www.openslr.org/resources/12/dev-other.tar.gz": "12661c48e8c3fe1de2c1caa4c3e135193bfb1811584f11f569dd12645aa84365", # noqa: E501 + "http://www.openslr.org/resources/12/test-clean.tar.gz": "39fde525e59672dc6d1551919b1478f724438a95aa55f874b576be21967e6c23", # noqa: E501 + "http://www.openslr.org/resources/12/test-other.tar.gz": "d09c181bba5cf717b3dee7d4d592af11a3ee3a09e08ae025c5506f6ebe961c29", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-100.tar.gz": "d4ddd1d5a6ab303066f14971d768ee43278a5f2a0aa43dc716b0e64ecbbbf6e2", # noqa: E501 + "http://www.openslr.org/resources/12/train-clean-360.tar.gz": "146a56496217e96c14334a160df97fffedd6e0a04e66b9c5af0d40be3c792ecf", # noqa: E501 + "http://www.openslr.org/resources/12/train-other-500.tar.gz": "ddb22f27f96ec163645d53215559df6aa36515f26e01dd70798188350adcb6d2", # noqa: E501 +} + + +def _download_librispeech(root, url): + base_url = "http://www.openslr.org/resources/12/" + ext_archive = ".tar.gz" + + filename = url + ext_archive + archive = os.path.join(root, filename) + download_url = os.path.join(base_url, filename) + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(download_url, None) + download_url_to_file(download_url, archive, hash_prefix=checksum) + _extract_tar(archive) + + +def _get_librispeech_metadata( + fileid: str, root: str, folder: str, ext_audio: str, ext_txt: str, blist: List[str] +) -> Tuple[str, int, str, int, int, int]: + blist = blist or [] + speaker_id, chapter_id, utterance_id = fileid.split("-") + + # Get audio path and sample rate + fileid_audio = f"{speaker_id}-{chapter_id}-{utterance_id}" + filepath = os.path.join(folder, speaker_id, chapter_id, f"{fileid_audio}{ext_audio}") + + # Load text + file_text = f"{speaker_id}-{chapter_id}{ext_txt}" + file_text = os.path.join(root, folder, speaker_id, chapter_id, file_text) + uttblist = [] + with open(file_text) as ft: + for line in ft: + fileid_text, transcript = line.strip().split(" ", 1) + if fileid_audio == fileid_text: + # get utterance biasing list + for word in transcript.split(): + if word in blist and word not in uttblist: + uttblist.append(word) + break + else: + # Translation not found + raise FileNotFoundError(f"Translation not found for {fileid_audio}") + + return ( + filepath, + SAMPLE_RATE, + transcript, + int(speaker_id), + int(chapter_id), + int(utterance_id), + uttblist, + ) + + +class LibriSpeechBiasing(Dataset): + """*LibriSpeech* :cite:`7178964` dataset with prefix-tree construction and biasing support. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"dev-clean"``, ``"dev-other"``, ``"test-clean"``, + ``"test-other"``, ``"train-clean-100"``, ``"train-clean-360"`` and + ``"train-other-500"``. (default: ``"train-clean-100"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"LibriSpeech"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + blist (list, optional): + The list of biasing words (default: ``[]``). + """ + + _ext_txt = ".trans.txt" + _ext_audio = ".flac" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + blist: List[str] = None, + ) -> None: + self._url = url + if url not in _DATA_SUBSETS: + raise ValueError(f"Invalid url '{url}' given; please provide one of {_DATA_SUBSETS}.") + + root = os.fspath(root) + self._archive = os.path.join(root, folder_in_archive) + self._path = os.path.join(root, folder_in_archive, url) + + if not os.path.isdir(self._path): + if download: + _download_librispeech(root, url) + else: + raise RuntimeError( + f"Dataset not found at {self._path}. Please set `download=True` to download the dataset." + ) + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio)) + self.blist = blist + + def get_metadata(self, n: int) -> Tuple[str, int, str, int, int, int]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + list: + List of biasing words in the utterance + """ + fileid = self._walker[n] + return _get_librispeech_metadata(fileid, self._archive, self._url, self._ext_audio, self._ext_txt, self.blist) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Speaker ID + int: + Chapter ID + int: + Utterance ID + list: + List of biasing words in the utterance + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._archive, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/libritts.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/libritts.py new file mode 100644 index 0000000000000000000000000000000000000000..773db32b8b0981e4aecdcc4ce74d5d4bdb3d29c0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/libritts.py @@ -0,0 +1,168 @@ +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + +URL = "train-clean-100" +FOLDER_IN_ARCHIVE = "LibriTTS" +_CHECKSUMS = { + "http://www.openslr.org/resources/60/dev-clean.tar.gz": "da0864e1bd26debed35da8a869dd5c04dfc27682921936de7cff9c8a254dbe1a", # noqa: E501 + "http://www.openslr.org/resources/60/dev-other.tar.gz": "d413eda26f3a152ac7c9cf3658ef85504dfb1b625296e5fa83727f5186cca79c", # noqa: E501 + "http://www.openslr.org/resources/60/test-clean.tar.gz": "234ea5b25859102a87024a4b9b86641f5b5aaaf1197335c95090cde04fe9a4f5", # noqa: E501 + "http://www.openslr.org/resources/60/test-other.tar.gz": "33a5342094f3bba7ccc2e0500b9e72d558f72eb99328ac8debe1d9080402f10d", # noqa: E501 + "http://www.openslr.org/resources/60/train-clean-100.tar.gz": "c5608bf1ef74bb621935382b8399c5cdd51cd3ee47cec51f00f885a64c6c7f6b", # noqa: E501 + "http://www.openslr.org/resources/60/train-clean-360.tar.gz": "ce7cff44dcac46009d18379f37ef36551123a1dc4e5c8e4eb73ae57260de4886", # noqa: E501 + "http://www.openslr.org/resources/60/train-other-500.tar.gz": "e35f7e34deeb2e2bdfe4403d88c8fdd5fbf64865cae41f027a185a6965f0a5df", # noqa: E501 +} + + +def load_libritts_item( + fileid: str, + path: str, + ext_audio: str, + ext_original_txt: str, + ext_normalized_txt: str, +) -> Tuple[Tensor, int, str, str, int, int, str]: + speaker_id, chapter_id, segment_id, utterance_id = fileid.split("_") + utterance_id = fileid + + normalized_text = utterance_id + ext_normalized_txt + normalized_text = os.path.join(path, speaker_id, chapter_id, normalized_text) + + original_text = utterance_id + ext_original_txt + original_text = os.path.join(path, speaker_id, chapter_id, original_text) + + file_audio = utterance_id + ext_audio + file_audio = os.path.join(path, speaker_id, chapter_id, file_audio) + + # Load audio + waveform, sample_rate = torchaudio.load(file_audio) + + # Load original text + with open(original_text) as ft: + original_text = ft.readline() + + # Load normalized text + with open(normalized_text, "r") as ft: + normalized_text = ft.readline() + + return ( + waveform, + sample_rate, + original_text, + normalized_text, + int(speaker_id), + int(chapter_id), + utterance_id, + ) + + +class LIBRITTS(Dataset): + """*LibriTTS* :cite:`Zen2019LibriTTSAC` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"dev-clean"``, ``"dev-other"``, ``"test-clean"``, + ``"test-other"``, ``"train-clean-100"``, ``"train-clean-360"`` and + ``"train-other-500"``. (default: ``"train-clean-100"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"LibriTTS"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + _ext_original_txt = ".original.txt" + _ext_normalized_txt = ".normalized.txt" + _ext_audio = ".wav" + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + ) -> None: + + if url in [ + "dev-clean", + "dev-other", + "test-clean", + "test-other", + "train-clean-100", + "train-clean-360", + "train-other-500", + ]: + + ext_archive = ".tar.gz" + base_url = "http://www.openslr.org/resources/60/" + + url = os.path.join(base_url, url + ext_archive) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + basename = os.path.basename(url) + archive = os.path.join(root, basename) + + basename = basename.split(".")[0] + folder_in_archive = os.path.join(folder_in_archive, basename) + + self._path = os.path.join(root, folder_in_archive) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*/*/*" + self._ext_audio)) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str, int, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Original text + str: + Normalized text + int: + Speaker ID + int: + Chapter ID + str: + Utterance ID + """ + fileid = self._walker[n] + return load_libritts_item( + fileid, + self._path, + self._ext_audio, + self._ext_original_txt, + self._ext_normalized_txt, + ) + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/ljspeech.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/ljspeech.py new file mode 100644 index 0000000000000000000000000000000000000000..04878d6cc1285094a43c3ce3af0e46a19c2ae04e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/ljspeech.py @@ -0,0 +1,107 @@ +import csv +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + + +_RELEASE_CONFIGS = { + "release1": { + "folder_in_archive": "wavs", + "url": "https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2", + "checksum": "be1a30453f28eb8dd26af4101ae40cbf2c50413b1bb21936cbcdc6fae3de8aa5", + } +} + + +class LJSPEECH(Dataset): + """*LJSpeech-1.1* :cite:`ljspeech17` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from. + (default: ``"https://data.keithito.com/data/speech/LJSpeech-1.1.tar.bz2"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"wavs"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + def __init__( + self, + root: Union[str, Path], + url: str = _RELEASE_CONFIGS["release1"]["url"], + folder_in_archive: str = _RELEASE_CONFIGS["release1"]["folder_in_archive"], + download: bool = False, + ) -> None: + + self._parse_filesystem(root, url, folder_in_archive, download) + + def _parse_filesystem(self, root: str, url: str, folder_in_archive: str, download: bool) -> None: + root = Path(root) + + basename = os.path.basename(url) + archive = root / basename + + basename = Path(basename.split(".tar.bz2")[0]) + folder_in_archive = basename / folder_in_archive + + self._path = root / folder_in_archive + self._metadata_path = root / basename / "metadata.csv" + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _RELEASE_CONFIGS["release1"]["checksum"] + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + with open(self._metadata_path, "r", newline="") as metadata: + flist = csv.reader(metadata, delimiter="|", quoting=csv.QUOTE_NONE) + self._flist = list(flist) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + str: + Normalized Transcript + """ + line = self._flist[n] + fileid, transcript, normalized_transcript = line + fileid_audio = self._path / (fileid + ".wav") + + # Load audio + waveform, sample_rate = torchaudio.load(fileid_audio) + + return ( + waveform, + sample_rate, + transcript, + normalized_transcript, + ) + + def __len__(self) -> int: + return len(self._flist) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/musdb_hq.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/musdb_hq.py new file mode 100644 index 0000000000000000000000000000000000000000..fca108c51825869cb29a852cae210d6ca88f6efa --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/musdb_hq.py @@ -0,0 +1,139 @@ +import os +from pathlib import Path +from typing import List, Optional, Tuple, Union + +import torch +import torchaudio +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip + +_URL = "https://zenodo.org/record/3338373/files/musdb18hq.zip" +_CHECKSUM = "baac80d0483c61d74b2e5f3be75fa557eec52898339e6aa45c1fa48833c5d21d" +_EXT = ".wav" +_SAMPLE_RATE = 44100 +_VALIDATION_SET = [ + "Actions - One Minute Smile", + "Clara Berry And Wooldog - Waltz For My Victims", + "Johnny Lokke - Promises & Lies", + "Patrick Talbot - A Reason To Leave", + "Triviul - Angelsaint", + "Alexander Ross - Goodbye Bolero", + "Fergessen - Nos Palpitants", + "Leaf - Summerghost", + "Skelpolu - Human Mistakes", + "Young Griffo - Pennies", + "ANiMAL - Rockshow", + "James May - On The Line", + "Meaxic - Take A Step", + "Traffic Experiment - Sirens", +] + + +class MUSDB_HQ(Dataset): + """*MUSDB_HQ* :cite:`MUSDB18HQ` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found + subset (str): Subset of the dataset to use. Options: [``"train"``, ``"test"``]. + sources (List[str] or None, optional): Sources extract data from. + List can contain the following options: [``"bass"``, ``"drums"``, ``"other"``, ``"mixture"``, ``"vocals"``]. + If ``None``, dataset consists of tracks except mixture. + (default: ``None``) + split (str or None, optional): Whether to split training set into train and validation set. + If ``None``, no splitting occurs. If ``train`` or ``validation``, returns respective set. + (default: ``None``) + download (bool, optional): Whether to download the dataset if it is not found at root path. + (default: ``False``) + """ + + def __init__( + self, + root: Union[str, Path], + subset: str, + sources: Optional[List[str]] = None, + split: Optional[str] = None, + download: bool = False, + ) -> None: + self.sources = ["bass", "drums", "other", "vocals"] if not sources else sources + self.split = split + + basename = os.path.basename(_URL) + archive = os.path.join(root, basename) + basename = basename.rsplit(".", 2)[0] + + if subset not in ["test", "train"]: + raise ValueError("`subset` must be one of ['test', 'train']") + if self.split is not None and self.split not in ["train", "validation"]: + raise ValueError("`split` must be one of ['train', 'validation']") + base_path = os.path.join(root, basename) + self._path = os.path.join(base_path, subset) + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download") + download_url_to_file(_URL, archive, hash_prefix=_CHECKSUM) + os.makedirs(base_path, exist_ok=True) + _extract_zip(archive, base_path) + + self.names = self._collect_songs() + + def _get_track(self, name, source): + return Path(self._path) / name / f"{source}{_EXT}" + + def _load_sample(self, n: int) -> Tuple[torch.Tensor, int, int, str]: + name = self.names[n] + wavs = [] + num_frames = None + for source in self.sources: + track = self._get_track(name, source) + wav, sr = torchaudio.load(str(track)) + if sr != _SAMPLE_RATE: + raise ValueError(f"expected sample rate {_SAMPLE_RATE}, but got {sr}") + if num_frames is None: + num_frames = wav.shape[-1] + else: + if wav.shape[-1] != num_frames: + raise ValueError("num_frames do not match across sources") + wavs.append(wav) + + stacked = torch.stack(wavs) + + return stacked, _SAMPLE_RATE, num_frames, name + + def _collect_songs(self): + if self.split == "validation": + return _VALIDATION_SET + path = Path(self._path) + names = [] + for root, folders, _ in os.walk(path, followlinks=True): + root = Path(root) + if root.name.startswith(".") or folders or root == path: + continue + name = str(root.relative_to(path)) + if self.split and name in _VALIDATION_SET: + continue + names.append(name) + return sorted(names) + + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + int: + Num frames + str: + Track name + """ + return self._load_sample(n) + + def __len__(self) -> int: + return len(self.names) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/quesst14.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/quesst14.py new file mode 100644 index 0000000000000000000000000000000000000000..74ea3923ed0ba2d18608a431ee4aa3f60ff34b99 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/quesst14.py @@ -0,0 +1,136 @@ +import os +import re +from pathlib import Path +from typing import Optional, Tuple, Union + +import torch +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + + +URL = "https://speech.fit.vutbr.cz/files/quesst14Database.tgz" +SAMPLE_RATE = 8000 +_CHECKSUM = "4f869e06bc066bbe9c5dde31dbd3909a0870d70291110ebbb38878dcbc2fc5e4" +_LANGUAGES = [ + "albanian", + "basque", + "czech", + "nnenglish", + "romanian", + "slovak", +] + + +class QUESST14(Dataset): + """*QUESST14* :cite:`Mir2015QUESST2014EQ` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found + subset (str): Subset of the dataset to use. Options: [``"docs"``, ``"dev"``, ``"eval"``]. + language (str or None, optional): Language to get dataset for. + Options: [``None``, ``albanian``, ``basque``, ``czech``, ``nnenglish``, ``romanian``, ``slovak``]. + If ``None``, dataset consists of all languages. (default: ``"nnenglish"``) + download (bool, optional): Whether to download the dataset if it is not found at root path. + (default: ``False``) + """ + + def __init__( + self, + root: Union[str, Path], + subset: str, + language: Optional[str] = "nnenglish", + download: bool = False, + ) -> None: + if subset not in ["docs", "dev", "eval"]: + raise ValueError("`subset` must be one of ['docs', 'dev', 'eval']") + + if language is not None and language not in _LANGUAGES: + raise ValueError(f"`language` must be None or one of {str(_LANGUAGES)}") + + # Get string representation of 'root' + root = os.fspath(root) + + basename = os.path.basename(URL) + archive = os.path.join(root, basename) + + basename = basename.rsplit(".", 2)[0] + self._path = os.path.join(root, basename) + + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + if not download: + raise RuntimeError("Dataset not found. Please use `download=True` to download") + download_url_to_file(URL, archive, hash_prefix=_CHECKSUM) + _extract_tar(archive, root) + + if subset == "docs": + self.data = filter_audio_paths(self._path, language, "language_key_utterances.lst") + elif subset == "dev": + self.data = filter_audio_paths(self._path, language, "language_key_dev.lst") + elif subset == "eval": + self.data = filter_audio_paths(self._path, language, "language_key_eval.lst") + + def get_metadata(self, n: int) -> Tuple[str, int, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + str: + File name + """ + audio_path = self.data[n] + relpath = os.path.relpath(audio_path, self._path) + return relpath, SAMPLE_RATE, audio_path.with_suffix("").name + + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + File name + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self.data) + + +def filter_audio_paths( + path: str, + language: str, + lst_name: str, +): + """Extract audio paths for the given language.""" + audio_paths = [] + + path = Path(path) + with open(path / "scoring" / lst_name) as f: + for line in f: + audio_path, lang = line.strip().split() + if language is not None and lang != language: + continue + audio_path = re.sub(r"^.*?\/", "", audio_path) + audio_paths.append(path / audio_path) + + return audio_paths diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/snips.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/snips.py new file mode 100644 index 0000000000000000000000000000000000000000..604510cc3c9221e8d33f99d786db2ac6b26253f0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/snips.py @@ -0,0 +1,157 @@ +import os +from pathlib import Path +from typing import List, Optional, Tuple, Union + +import torch +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + + +_SAMPLE_RATE = 16000 +_SPEAKERS = [ + "Aditi", + "Amy", + "Brian", + "Emma", + "Geraint", + "Ivy", + "Joanna", + "Joey", + "Justin", + "Kendra", + "Kimberly", + "Matthew", + "Nicole", + "Raveena", + "Russell", + "Salli", +] + + +def _load_labels(file: Path, subset: str): + """Load transcirpt, iob, and intent labels for all utterances. + + Args: + file (Path): The path to the label file. + subset (str): Subset of the dataset to use. Options: [``"train"``, ``"valid"``, ``"test"``]. + + Returns: + Dictionary of labels, where the key is the filename of the audio, + and the label is a Tuple of transcript, Inside–outside–beginning (IOB) label, and intention label. + """ + labels = {} + with open(file, "r") as f: + for line in f: + line = line.strip().split(" ") + index = line[0] + trans, iob_intent = " ".join(line[1:]).split("\t") + trans = " ".join(trans.split(" ")[1:-1]) + iob = " ".join(iob_intent.split(" ")[1:-1]) + intent = iob_intent.split(" ")[-1] + if subset in index: + labels[index] = (trans, iob, intent) + return labels + + +class Snips(Dataset): + """*Snips* :cite:`coucke2018snips` dataset. + + Args: + root (str or Path): Root directory where the dataset's top level directory is found. + subset (str): Subset of the dataset to use. Options: [``"train"``, ``"valid"``, ``"test"``]. + speakers (List[str] or None, optional): The speaker list to include in the dataset. If ``None``, + include all speakers in the subset. (Default: ``None``) + audio_format (str, optional): The extension of the audios. Options: [``"mp3"``, ``"wav"``]. + (Default: ``"mp3"``) + """ + + _trans_file = "all.iob.snips.txt" + + def __init__( + self, + root: Union[str, Path], + subset: str, + speakers: Optional[List[str]] = None, + audio_format: str = "mp3", + ) -> None: + if subset not in ["train", "valid", "test"]: + raise ValueError('`subset` must be one of ["train", "valid", "test"].') + if audio_format not in ["mp3", "wav"]: + raise ValueError('`audio_format` must be one of ["mp3", "wav].') + + root = Path(root) + self._path = root / "SNIPS" + self.audio_path = self._path / subset + if speakers is None: + speakers = _SPEAKERS + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found.") + + self.audio_paths = self.audio_path.glob(f"*.{audio_format}") + self.data = [] + for audio_path in sorted(self.audio_paths): + audio_name = str(audio_path.name) + speaker = audio_name.split("-")[0] + if speaker in speakers: + self.data.append(audio_path) + transcript_path = self._path / self._trans_file + self.labels = _load_labels(transcript_path, subset) + + def get_metadata(self, n: int) -> Tuple[str, int, str, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded. + + Returns: + Tuple of the following items: + + str: + Path to audio + int: + Sample rate + str: + File name + str: + Transcription of audio + str: + Inside–outside–beginning (IOB) label of transcription + str: + Intention label of the audio. + """ + audio_path = self.data[n] + relpath = os.path.relpath(audio_path, self._path) + file_name = audio_path.with_suffix("").name + transcript, iob, intent = self.labels[file_name] + return relpath, _SAMPLE_RATE, file_name, transcript, iob, intent + + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, str, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items: + + Tensor: + Waveform + int: + Sample rate + str: + File name + str: + Transcription of audio + str: + Inside–outside–beginning (IOB) label of transcription + str: + Intention label of the audio. + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self.data) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/speechcommands.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/speechcommands.py new file mode 100644 index 0000000000000000000000000000000000000000..bf5f2d4d0bf18894a1969f3d58d4448f5a182919 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/speechcommands.py @@ -0,0 +1,183 @@ +import os +from pathlib import Path +from typing import Optional, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar, _load_waveform + +FOLDER_IN_ARCHIVE = "SpeechCommands" +URL = "speech_commands_v0.02" +HASH_DIVIDER = "_nohash_" +EXCEPT_FOLDER = "_background_noise_" +SAMPLE_RATE = 16000 +_CHECKSUMS = { + "http://download.tensorflow.org/data/speech_commands_v0.01.tar.gz": "743935421bb51cccdb6bdd152e04c5c70274e935c82119ad7faeec31780d811d", # noqa: E501 + "http://download.tensorflow.org/data/speech_commands_v0.02.tar.gz": "af14739ee7dc311471de98f5f9d2c9191b18aedfe957f4a6ff791c709868ff58", # noqa: E501 +} + + +def _load_list(root, *filenames): + output = [] + for filename in filenames: + filepath = os.path.join(root, filename) + with open(filepath) as fileobj: + output += [os.path.normpath(os.path.join(root, line.strip())) for line in fileobj] + return output + + +def _get_speechcommands_metadata(filepath: str, path: str) -> Tuple[str, int, str, str, int]: + relpath = os.path.relpath(filepath, path) + reldir, filename = os.path.split(relpath) + _, label = os.path.split(reldir) + # Besides the officially supported split method for datasets defined by "validation_list.txt" + # and "testing_list.txt" over "speech_commands_v0.0x.tar.gz" archives, an alternative split + # method referred to in paragraph 2-3 of Section 7.1, references 13 and 14 of the original + # paper, and the checksums file from the tensorflow_datasets package [1] is also supported. + # Some filenames in those "speech_commands_test_set_v0.0x.tar.gz" archives have the form + # "xxx.wav.wav", so file extensions twice needs to be stripped twice. + # [1] https://github.com/tensorflow/datasets/blob/master/tensorflow_datasets/url_checksums/speech_commands.txt + speaker, _ = os.path.splitext(filename) + speaker, _ = os.path.splitext(speaker) + + speaker_id, utterance_number = speaker.split(HASH_DIVIDER) + utterance_number = int(utterance_number) + + return relpath, SAMPLE_RATE, label, speaker_id, utterance_number + + +class SPEECHCOMMANDS(Dataset): + """*Speech Commands* :cite:`speechcommandsv2` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from, + or the type of the dataset to dowload. + Allowed type values are ``"speech_commands_v0.01"`` and ``"speech_commands_v0.02"`` + (default: ``"speech_commands_v0.02"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"SpeechCommands"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + subset (str or None, optional): + Select a subset of the dataset [None, "training", "validation", "testing"]. None means + the whole dataset. "validation" and "testing" are defined in "validation_list.txt" and + "testing_list.txt", respectively, and "training" is the rest. Details for the files + "validation_list.txt" and "testing_list.txt" are explained in the README of the dataset + and in the introduction of Section 7 of the original paper and its reference 12. The + original paper can be found `here `_. (Default: ``None``) + """ + + def __init__( + self, + root: Union[str, Path], + url: str = URL, + folder_in_archive: str = FOLDER_IN_ARCHIVE, + download: bool = False, + subset: Optional[str] = None, + ) -> None: + + if subset is not None and subset not in ["training", "validation", "testing"]: + raise ValueError("When `subset` is not None, it must be one of ['training', 'validation', 'testing'].") + + if url in [ + "speech_commands_v0.01", + "speech_commands_v0.02", + ]: + base_url = "http://download.tensorflow.org/data/" + ext_archive = ".tar.gz" + + url = os.path.join(base_url, url + ext_archive) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + self._archive = os.path.join(root, folder_in_archive) + + basename = os.path.basename(url) + archive = os.path.join(root, basename) + + basename = basename.rsplit(".", 2)[0] + folder_in_archive = os.path.join(folder_in_archive, basename) + + self._path = os.path.join(root, folder_in_archive) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive, self._path) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + if subset == "validation": + self._walker = _load_list(self._path, "validation_list.txt") + elif subset == "testing": + self._walker = _load_list(self._path, "testing_list.txt") + elif subset == "training": + excludes = set(_load_list(self._path, "validation_list.txt", "testing_list.txt")) + walker = sorted(str(p) for p in Path(self._path).glob("*/*.wav")) + self._walker = [ + w + for w in walker + if HASH_DIVIDER in w and EXCEPT_FOLDER not in w and os.path.normpath(w) not in excludes + ] + else: + walker = sorted(str(p) for p in Path(self._path).glob("*/*.wav")) + self._walker = [w for w in walker if HASH_DIVIDER in w and EXCEPT_FOLDER not in w] + + def get_metadata(self, n: int) -> Tuple[str, int, str, str, int]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + str: + Path to the audio + int: + Sample rate + str: + Label + str: + Speaker ID + int: + Utterance number + """ + fileid = self._walker[n] + return _get_speechcommands_metadata(fileid, self._archive) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, str, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Label + str: + Speaker ID + int: + Utterance number + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._archive, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/tedlium.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/tedlium.py new file mode 100644 index 0000000000000000000000000000000000000000..51b50f3bc784cabb4c4b12fdfce0f6fdeafa2aa0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/tedlium.py @@ -0,0 +1,218 @@ +import os +from pathlib import Path +from typing import Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + + +_RELEASE_CONFIGS = { + "release1": { + "folder_in_archive": "TEDLIUM_release1", + "url": "http://www.openslr.org/resources/7/TEDLIUM_release1.tar.gz", + "checksum": "30301975fd8c5cac4040c261c0852f57cfa8adbbad2ce78e77e4986957445f27", + "data_path": "", + "subset": "train", + "supported_subsets": ["train", "test", "dev"], + "dict": "TEDLIUM.150K.dic", + }, + "release2": { + "folder_in_archive": "TEDLIUM_release2", + "url": "http://www.openslr.org/resources/19/TEDLIUM_release2.tar.gz", + "checksum": "93281b5fcaaae5c88671c9d000b443cb3c7ea3499ad12010b3934ca41a7b9c58", + "data_path": "", + "subset": "train", + "supported_subsets": ["train", "test", "dev"], + "dict": "TEDLIUM.152k.dic", + }, + "release3": { + "folder_in_archive": "TEDLIUM_release-3", + "url": "http://www.openslr.org/resources/51/TEDLIUM_release-3.tgz", + "checksum": "ad1e454d14d1ad550bc2564c462d87c7a7ec83d4dc2b9210f22ab4973b9eccdb", + "data_path": "data/", + "subset": "train", + "supported_subsets": ["train", "test", "dev"], + "dict": "TEDLIUM.152k.dic", + }, +} + + +class TEDLIUM(Dataset): + """*Tedlium* :cite:`rousseau2012tedlium` dataset (releases 1,2 and 3). + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + release (str, optional): Release version. + Allowed values are ``"release1"``, ``"release2"`` or ``"release3"``. + (default: ``"release1"``). + subset (str, optional): The subset of dataset to use. Valid options are ``"train"``, ``"dev"``, + and ``"test"``. Defaults to ``"train"``. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + audio_ext (str, optional): extension for audio file (default: ``".sph"``) + """ + + def __init__( + self, + root: Union[str, Path], + release: str = "release1", + subset: str = "train", + download: bool = False, + audio_ext: str = ".sph", + ) -> None: + self._ext_audio = audio_ext + if release in _RELEASE_CONFIGS.keys(): + folder_in_archive = _RELEASE_CONFIGS[release]["folder_in_archive"] + url = _RELEASE_CONFIGS[release]["url"] + subset = subset if subset else _RELEASE_CONFIGS[release]["subset"] + else: + # Raise warning + raise RuntimeError( + "The release {} does not match any of the supported tedlium releases{} ".format( + release, + _RELEASE_CONFIGS.keys(), + ) + ) + if subset not in _RELEASE_CONFIGS[release]["supported_subsets"]: + # Raise warning + raise RuntimeError( + "The subset {} does not match any of the supported tedlium subsets{} ".format( + subset, + _RELEASE_CONFIGS[release]["supported_subsets"], + ) + ) + + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + + basename = os.path.basename(url) + archive = os.path.join(root, basename) + + basename = basename.split(".")[0] + + if release == "release3": + if subset == "train": + self._path = os.path.join(root, folder_in_archive, _RELEASE_CONFIGS[release]["data_path"]) + else: + self._path = os.path.join(root, folder_in_archive, "legacy", subset) + else: + self._path = os.path.join(root, folder_in_archive, _RELEASE_CONFIGS[release]["data_path"], subset) + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _RELEASE_CONFIGS[release]["checksum"] + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + else: + if not os.path.exists(self._path): + raise RuntimeError( + f"The path {self._path} doesn't exist. " + "Please check the ``root`` path or set `download=True` to download it" + ) + + # Create list for all samples + self._filelist = [] + stm_path = os.path.join(self._path, "stm") + for file in sorted(os.listdir(stm_path)): + if file.endswith(".stm"): + stm_path = os.path.join(self._path, "stm", file) + with open(stm_path) as f: + l = len(f.readlines()) + file = file.replace(".stm", "") + self._filelist.extend((file, line) for line in range(l)) + # Create dict path for later read + self._dict_path = os.path.join(root, folder_in_archive, _RELEASE_CONFIGS[release]["dict"]) + self._phoneme_dict = None + + def _load_tedlium_item(self, fileid: str, line: int, path: str) -> Tuple[Tensor, int, str, int, int, int]: + """Loads a TEDLIUM dataset sample given a file name and corresponding sentence name. + + Args: + fileid (str): File id to identify both text and audio files corresponding to the sample + line (int): Line identifier for the sample inside the text file + path (str): Dataset root path + + Returns: + (Tensor, int, str, int, int, int): + ``(waveform, sample_rate, transcript, talk_id, speaker_id, identifier)`` + """ + transcript_path = os.path.join(path, "stm", fileid) + with open(transcript_path + ".stm") as f: + transcript = f.readlines()[line] + talk_id, _, speaker_id, start_time, end_time, identifier, transcript = transcript.split(" ", 6) + + wave_path = os.path.join(path, "sph", fileid) + waveform, sample_rate = self._load_audio(wave_path + self._ext_audio, start_time=start_time, end_time=end_time) + + return (waveform, sample_rate, transcript, talk_id, speaker_id, identifier) + + def _load_audio(self, path: str, start_time: float, end_time: float, sample_rate: int = 16000) -> [Tensor, int]: + """Default load function used in TEDLIUM dataset, you can overwrite this function to customize functionality + and load individual sentences from a full ted audio talk file. + + Args: + path (str): Path to audio file + start_time (int): Time in seconds where the sample sentence stars + end_time (int): Time in seconds where the sample sentence finishes + sample_rate (float, optional): Sampling rate + + Returns: + [Tensor, int]: Audio tensor representation and sample rate + """ + start_time = int(float(start_time) * sample_rate) + end_time = int(float(end_time) * sample_rate) + + kwargs = {"frame_offset": start_time, "num_frames": end_time - start_time} + + return torchaudio.load(path, **kwargs) + + def __getitem__(self, n: int) -> Tuple[Tensor, int, str, int, int, int]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + int: + Talk ID + int: + Speaker ID + int: + Identifier + """ + fileid, line = self._filelist[n] + return self._load_tedlium_item(fileid, line, self._path) + + def __len__(self) -> int: + """TEDLIUM dataset custom function overwritting len default behaviour. + + Returns: + int: TEDLIUM dataset length + """ + return len(self._filelist) + + @property + def phoneme_dict(self): + """dict[str, tuple[str]]: Phonemes. Mapping from word to tuple of phonemes. + Note that some words have empty phonemes. + """ + # Read phoneme dictionary + if not self._phoneme_dict: + self._phoneme_dict = {} + with open(self._dict_path, "r", encoding="utf-8") as f: + for line in f.readlines(): + content = line.strip().split() + self._phoneme_dict[content[0]] = tuple(content[1:]) # content[1:] can be empty list + return self._phoneme_dict.copy() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..462415b422c4afcff4954d6c2fe537b5bc05a335 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/utils.py @@ -0,0 +1,54 @@ +import logging +import os +import tarfile +import zipfile +from typing import Any, List, Optional + +import torchaudio + +_LG = logging.getLogger(__name__) + + +def _extract_tar(from_path: str, to_path: Optional[str] = None, overwrite: bool = False) -> List[str]: + if to_path is None: + to_path = os.path.dirname(from_path) + with tarfile.open(from_path, "r") as tar: + files = [] + for file_ in tar: # type: Any + file_path = os.path.join(to_path, file_.name) + if file_.isfile(): + files.append(file_path) + if os.path.exists(file_path): + _LG.info("%s already extracted.", file_path) + if not overwrite: + continue + tar.extract(file_, to_path) + return files + + +def _extract_zip(from_path: str, to_path: Optional[str] = None, overwrite: bool = False) -> List[str]: + if to_path is None: + to_path = os.path.dirname(from_path) + + with zipfile.ZipFile(from_path, "r") as zfile: + files = zfile.namelist() + for file_ in files: + file_path = os.path.join(to_path, file_) + if os.path.exists(file_path): + _LG.info("%s already extracted.", file_path) + if not overwrite: + continue + zfile.extract(file_, to_path) + return files + + +def _load_waveform( + root: str, + filename: str, + exp_sample_rate: int, +): + path = os.path.join(root, filename) + waveform, sample_rate = torchaudio.load(path) + if exp_sample_rate != sample_rate: + raise ValueError(f"sample rate should be {exp_sample_rate}, but got {sample_rate}") + return waveform diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/vctk.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/vctk.py new file mode 100644 index 0000000000000000000000000000000000000000..cba6cddecf9fd5b8b7af03df436b16c0714ca588 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/vctk.py @@ -0,0 +1,143 @@ +import os +from typing import Tuple + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip + +URL = "https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip" +_CHECKSUMS = { + "https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip": "f96258be9fdc2cbff6559541aae7ea4f59df3fcaf5cf963aae5ca647357e359c" # noqa: E501 +} + + +SampleType = Tuple[Tensor, int, str, str, str] + + +class VCTK_092(Dataset): + """*VCTK 0.92* :cite:`yamagishi2019vctk` dataset + + Args: + root (str): Root directory where the dataset's top level directory is found. + mic_id (str, optional): Microphone ID. Either ``"mic1"`` or ``"mic2"``. (default: ``"mic2"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + url (str, optional): The URL to download the dataset from. + (default: ``"https://datashare.is.ed.ac.uk/bitstream/handle/10283/3443/VCTK-Corpus-0.92.zip"``) + audio_ext (str, optional): Custom audio extension if dataset is converted to non-default audio format. + + Note: + * All the speeches from speaker ``p315`` will be skipped due to the lack of the corresponding text files. + * All the speeches from ``p280`` will be skipped for ``mic_id="mic2"`` due to the lack of the audio files. + * Some of the speeches from speaker ``p362`` will be skipped due to the lack of the audio files. + * See Also: https://datashare.is.ed.ac.uk/handle/10283/3443 + """ + + def __init__( + self, + root: str, + mic_id: str = "mic2", + download: bool = False, + url: str = URL, + audio_ext=".flac", + ): + if mic_id not in ["mic1", "mic2"]: + raise RuntimeError(f'`mic_id` has to be either "mic1" or "mic2". Found: {mic_id}') + + archive = os.path.join(root, "VCTK-Corpus-0.92.zip") + + self._path = os.path.join(root, "VCTK-Corpus-0.92") + self._txt_dir = os.path.join(self._path, "txt") + self._audio_dir = os.path.join(self._path, "wav48_silence_trimmed") + self._mic_id = mic_id + self._audio_ext = audio_ext + + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _CHECKSUMS.get(url, None) + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_zip(archive, self._path) + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + + # Extracting speaker IDs from the folder structure + self._speaker_ids = sorted(os.listdir(self._txt_dir)) + self._sample_ids = [] + + """ + Due to some insufficient data complexity in the 0.92 version of this dataset, + we start traversing the audio folder structure in accordance with the text folder. + As some of the audio files are missing of either ``mic_1`` or ``mic_2`` but the + text is present for the same, we first check for the existence of the audio file + before adding it to the ``sample_ids`` list. + + Once the ``audio_ids`` are loaded into memory we can quickly access the list for + different parameters required by the user. + """ + for speaker_id in self._speaker_ids: + if speaker_id == "p280" and mic_id == "mic2": + continue + utterance_dir = os.path.join(self._txt_dir, speaker_id) + for utterance_file in sorted(f for f in os.listdir(utterance_dir) if f.endswith(".txt")): + utterance_id = os.path.splitext(utterance_file)[0] + audio_path_mic = os.path.join( + self._audio_dir, + speaker_id, + f"{utterance_id}_{mic_id}{self._audio_ext}", + ) + if speaker_id == "p362" and not os.path.isfile(audio_path_mic): + continue + self._sample_ids.append(utterance_id.split("_")) + + def _load_text(self, file_path) -> str: + with open(file_path) as file_path: + return file_path.readlines()[0] + + def _load_audio(self, file_path) -> Tuple[Tensor, int]: + return torchaudio.load(file_path) + + def _load_sample(self, speaker_id: str, utterance_id: str, mic_id: str) -> SampleType: + transcript_path = os.path.join(self._txt_dir, speaker_id, f"{speaker_id}_{utterance_id}.txt") + audio_path = os.path.join( + self._audio_dir, + speaker_id, + f"{speaker_id}_{utterance_id}_{mic_id}{self._audio_ext}", + ) + + # Reading text + transcript = self._load_text(transcript_path) + + # Reading FLAC + waveform, sample_rate = self._load_audio(audio_path) + + return (waveform, sample_rate, transcript, speaker_id, utterance_id) + + def __getitem__(self, n: int) -> SampleType: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + str: + Transcript + str: + Speaker ID + std: + Utterance ID + """ + speaker_id, utterance_id = self._sample_ids[n] + return self._load_sample(speaker_id, utterance_id, self._mic_id) + + def __len__(self) -> int: + return len(self._sample_ids) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/voxceleb1.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/voxceleb1.py new file mode 100644 index 0000000000000000000000000000000000000000..27af033a1f17dd09378466d2f54d7e615940563e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/voxceleb1.py @@ -0,0 +1,309 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_zip, _load_waveform + + +SAMPLE_RATE = 16000 +_ARCHIVE_CONFIGS = { + "dev": { + "archive_name": "vox1_dev_wav.zip", + "urls": [ + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partaa", + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partab", + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partac", + "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_dev_wav_partad", + ], + "checksums": [ + "21ec6ca843659ebc2fdbe04b530baa4f191ad4b0971912672d92c158f32226a0", + "311d21e0c8cbf33573a4fce6c80e5a279d80736274b381c394319fc557159a04", + "92b64465f2b2a3dc0e4196ae8dd6828cbe9ddd1f089419a11e4cbfe2e1750df0", + "00e6190c770b27f27d2a3dd26ee15596b17066b715ac111906861a7d09a211a5", + ], + }, + "test": { + "archive_name": "vox1_test_wav.zip", + "url": "https://thor.robots.ox.ac.uk/~vgg/data/voxceleb/vox1a/vox1_test_wav.zip", + "checksum": "8de57f347fe22b2c24526e9f444f689ecf5096fc2a92018cf420ff6b5b15eaea", + }, +} +_IDEN_SPLIT_URL = "https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/iden_split.txt" +_VERI_TEST_URL = "https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/veri_test.txt" + + +def _download_extract_wavs(root: str): + for archive in ["dev", "test"]: + archive_name = _ARCHIVE_CONFIGS[archive]["archive_name"] + archive_path = os.path.join(root, archive_name) + # The zip file of dev data is splited to 4 chunks. + # Download and combine them into one file before extraction. + if archive == "dev": + urls = _ARCHIVE_CONFIGS[archive]["urls"] + checksums = _ARCHIVE_CONFIGS[archive]["checksums"] + with open(archive_path, "wb") as f: + for url, checksum in zip(urls, checksums): + file_path = os.path.join(root, os.path.basename(url)) + download_url_to_file(url, file_path, hash_prefix=checksum) + with open(file_path, "rb") as f_split: + f.write(f_split.read()) + else: + url = _ARCHIVE_CONFIGS[archive]["url"] + checksum = _ARCHIVE_CONFIGS[archive]["checksum"] + download_url_to_file(url, archive_path, hash_prefix=checksum) + _extract_zip(archive_path) + + +def _get_flist(root: str, file_path: str, subset: str) -> List[str]: + f_list = [] + if subset == "train": + index = 1 + elif subset == "dev": + index = 2 + else: + index = 3 + with open(file_path, "r") as f: + for line in f: + id, path = line.split() + if int(id) == index: + f_list.append(path) + return sorted(f_list) + + +def _get_paired_flist(root: str, veri_test_path: str): + f_list = [] + with open(veri_test_path, "r") as f: + for line in f: + label, path1, path2 = line.split() + f_list.append((label, path1, path2)) + return f_list + + +def _get_file_id(file_path: str, _ext_audio: str): + speaker_id, youtube_id, utterance_id = file_path.split("/")[-3:] + utterance_id = utterance_id.replace(_ext_audio, "") + file_id = "-".join([speaker_id, youtube_id, utterance_id]) + return file_id + + +class VoxCeleb1(Dataset): + """*VoxCeleb1* :cite:`nagrani2017voxceleb` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + download (bool, optional): + Whether to download the dataset if it is not found at root path. (Default: ``False``). + """ + + _ext_audio = ".wav" + + def __init__(self, root: Union[str, Path], download: bool = False) -> None: + # Get string representation of 'root' in case Path object is passed + root = os.fspath(root) + self._path = os.path.join(root, "wav") + if not os.path.isdir(self._path): + if not download: + raise RuntimeError( + f"Dataset not found at {self._path}. Please set `download=True` to download the dataset." + ) + _download_extract_wavs(root) + + def get_metadata(self, n: int): + raise NotImplementedError + + def __getitem__(self, n: int): + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + +class VoxCeleb1Identification(VoxCeleb1): + """*VoxCeleb1* :cite:`nagrani2017voxceleb` dataset for speaker identification task. + + Each data sample contains the waveform, sample rate, speaker id, and the file id. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + subset (str, optional): Subset of the dataset to use. Options: ["train", "dev", "test"]. (Default: ``"train"``) + meta_url (str, optional): The url of meta file that contains the list of subset labels and file paths. + The format of each row is ``subset file_path". For example: ``1 id10006/nLEBBc9oIFs/00003.wav``. + ``1``, ``2``, ``3`` mean ``train``, ``dev``, and ``test`` subest, respectively. + (Default: ``"https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/iden_split.txt"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (Default: ``False``). + + Note: + The file structure of `VoxCeleb1Identification` dataset is as follows: + + └─ root/ + + └─ wav/ + + └─ speaker_id folders + + Users who pre-downloaded the ``"vox1_dev_wav.zip"`` and ``"vox1_test_wav.zip"`` files need to move + the extracted files into the same ``root`` directory. + """ + + def __init__( + self, root: Union[str, Path], subset: str = "train", meta_url: str = _IDEN_SPLIT_URL, download: bool = False + ) -> None: + super().__init__(root, download) + if subset not in ["train", "dev", "test"]: + raise ValueError("`subset` must be one of ['train', 'dev', 'test']") + # download the iden_split.txt to get the train, dev, test lists. + meta_list_path = os.path.join(root, os.path.basename(meta_url)) + if not os.path.exists(meta_list_path): + download_url_to_file(meta_url, meta_list_path) + self._flist = _get_flist(self._path, meta_list_path, subset) + + def get_metadata(self, n: int) -> Tuple[str, int, int, str]: + """Get metadata for the n-th sample from the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample + + Returns: + Tuple of the following items; + + str: + Path to audio + int: + Sample rate + int: + Speaker ID + str: + File ID + """ + file_path = self._flist[n] + file_id = _get_file_id(file_path, self._ext_audio) + speaker_id = file_id.split("-")[0] + speaker_id = int(speaker_id[3:]) + return file_path, SAMPLE_RATE, speaker_id, file_id + + def __getitem__(self, n: int) -> Tuple[Tensor, int, int, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + int: + Speaker ID + str: + File ID + """ + metadata = self.get_metadata(n) + waveform = _load_waveform(self._path, metadata[0], metadata[1]) + return (waveform,) + metadata[1:] + + def __len__(self) -> int: + return len(self._flist) + + +class VoxCeleb1Verification(VoxCeleb1): + """*VoxCeleb1* :cite:`nagrani2017voxceleb` dataset for speaker verification task. + + Each data sample contains a pair of waveforms, sample rate, the label indicating if they are + from the same speaker, and the file ids. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + meta_url (str, optional): The url of meta file that contains a list of utterance pairs + and the corresponding labels. The format of each row is ``label file_path1 file_path2". + For example: ``1 id10270/x6uYqmx31kE/00001.wav id10270/8jEAjG6SegY/00008.wav``. + ``1`` means the two utterances are from the same speaker, ``0`` means not. + (Default: ``"https://www.robots.ox.ac.uk/~vgg/data/voxceleb/meta/veri_test.txt"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (Default: ``False``). + + Note: + The file structure of `VoxCeleb1Verification` dataset is as follows: + + └─ root/ + + └─ wav/ + + └─ speaker_id folders + + Users who pre-downloaded the ``"vox1_dev_wav.zip"`` and ``"vox1_test_wav.zip"`` files need to move + the extracted files into the same ``root`` directory. + """ + + def __init__(self, root: Union[str, Path], meta_url: str = _VERI_TEST_URL, download: bool = False) -> None: + super().__init__(root, download) + # download the veri_test.txt to get the list of training pairs and labels. + meta_list_path = os.path.join(root, os.path.basename(meta_url)) + if not os.path.exists(meta_list_path): + download_url_to_file(meta_url, meta_list_path) + self._flist = _get_paired_flist(self._path, meta_list_path) + + def get_metadata(self, n: int) -> Tuple[str, str, int, int, str, str]: + """Get metadata for the n-th sample from the dataset. Returns filepaths instead of waveforms, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): The index of the sample + + Returns: + Tuple of the following items; + + str: + Path to audio file of speaker 1 + str: + Path to audio file of speaker 2 + int: + Sample rate + int: + Label + str: + File ID of speaker 1 + str: + File ID of speaker 2 + """ + label, file_path_spk1, file_path_spk2 = self._flist[n] + label = int(label) + file_id_spk1 = _get_file_id(file_path_spk1, self._ext_audio) + file_id_spk2 = _get_file_id(file_path_spk2, self._ext_audio) + return file_path_spk1, file_path_spk2, SAMPLE_RATE, label, file_id_spk1, file_id_spk2 + + def __getitem__(self, n: int) -> Tuple[Tensor, Tensor, int, int, str, str]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded. + + Returns: + Tuple of the following items; + + Tensor: + Waveform of speaker 1 + Tensor: + Waveform of speaker 2 + int: + Sample rate + int: + Label + str: + File ID of speaker 1 + str: + File ID of speaker 2 + """ + metadata = self.get_metadata(n) + waveform_spk1 = _load_waveform(self._path, metadata[0], metadata[2]) + waveform_spk2 = _load_waveform(self._path, metadata[1], metadata[2]) + return (waveform_spk1, waveform_spk2) + metadata[2:] + + def __len__(self) -> int: + return len(self._flist) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/yesno.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/yesno.py new file mode 100644 index 0000000000000000000000000000000000000000..c821528b0c27cf1d583247561e7b8acb192b5c11 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/datasets/yesno.py @@ -0,0 +1,89 @@ +import os +from pathlib import Path +from typing import List, Tuple, Union + +import torchaudio +from torch import Tensor +from torch.utils.data import Dataset +from torchaudio._internal import download_url_to_file +from torchaudio.datasets.utils import _extract_tar + + +_RELEASE_CONFIGS = { + "release1": { + "folder_in_archive": "waves_yesno", + "url": "http://www.openslr.org/resources/1/waves_yesno.tar.gz", + "checksum": "c3f49e0cca421f96b75b41640749167b52118f232498667ca7a5f9416aef8e73", + } +} + + +class YESNO(Dataset): + """*YesNo* :cite:`YesNo` dataset. + + Args: + root (str or Path): Path to the directory where the dataset is found or downloaded. + url (str, optional): The URL to download the dataset from. + (default: ``"http://www.openslr.org/resources/1/waves_yesno.tar.gz"``) + folder_in_archive (str, optional): + The top-level directory of the dataset. (default: ``"waves_yesno"``) + download (bool, optional): + Whether to download the dataset if it is not found at root path. (default: ``False``). + """ + + def __init__( + self, + root: Union[str, Path], + url: str = _RELEASE_CONFIGS["release1"]["url"], + folder_in_archive: str = _RELEASE_CONFIGS["release1"]["folder_in_archive"], + download: bool = False, + ) -> None: + + self._parse_filesystem(root, url, folder_in_archive, download) + + def _parse_filesystem(self, root: str, url: str, folder_in_archive: str, download: bool) -> None: + root = Path(root) + archive = os.path.basename(url) + archive = root / archive + + self._path = root / folder_in_archive + if download: + if not os.path.isdir(self._path): + if not os.path.isfile(archive): + checksum = _RELEASE_CONFIGS["release1"]["checksum"] + download_url_to_file(url, archive, hash_prefix=checksum) + _extract_tar(archive) + + if not os.path.isdir(self._path): + raise RuntimeError("Dataset not found. Please use `download=True` to download it.") + + self._walker = sorted(str(p.stem) for p in Path(self._path).glob("*.wav")) + + def _load_item(self, fileid: str, path: str): + labels = [int(c) for c in fileid.split("_")] + file_audio = os.path.join(path, fileid + ".wav") + waveform, sample_rate = torchaudio.load(file_audio) + return waveform, sample_rate, labels + + def __getitem__(self, n: int) -> Tuple[Tensor, int, List[int]]: + """Load the n-th sample from the dataset. + + Args: + n (int): The index of the sample to be loaded + + Returns: + Tuple of the following items; + + Tensor: + Waveform + int: + Sample rate + List[int]: + labels + """ + fileid = self._walker[n] + item = self._load_item(fileid, self._path) + return item + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c4e25b0b1f1c096e2d4dea2a3882634ae8878242 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/__init__.py @@ -0,0 +1,127 @@ +from ._alignment import forced_align, merge_tokens, TokenSpan +from .filtering import ( + allpass_biquad, + band_biquad, + bandpass_biquad, + bandreject_biquad, + bass_biquad, + biquad, + contrast, + dcshift, + deemph_biquad, + dither, + equalizer_biquad, + filtfilt, + flanger, + gain, + highpass_biquad, + lfilter, + lowpass_biquad, + overdrive, + phaser, + riaa_biquad, + treble_biquad, + vad, +) +from .functional import ( + add_noise, + amplitude_to_DB, + apply_beamforming, + apply_codec, + compute_deltas, + convolve, + create_dct, + DB_to_amplitude, + deemphasis, + detect_pitch_frequency, + edit_distance, + fftconvolve, + frechet_distance, + griffinlim, + inverse_spectrogram, + linear_fbanks, + loudness, + mask_along_axis, + mask_along_axis_iid, + melscale_fbanks, + mu_law_decoding, + mu_law_encoding, + mvdr_weights_rtf, + mvdr_weights_souden, + phase_vocoder, + pitch_shift, + preemphasis, + psd, + resample, + rnnt_loss, + rtf_evd, + rtf_power, + sliding_window_cmn, + spectral_centroid, + spectrogram, + speed, +) + +__all__ = [ + "amplitude_to_DB", + "compute_deltas", + "create_dct", + "melscale_fbanks", + "linear_fbanks", + "DB_to_amplitude", + "loudness", + "detect_pitch_frequency", + "griffinlim", + "mask_along_axis", + "mask_along_axis_iid", + "mu_law_encoding", + "mu_law_decoding", + "phase_vocoder", + "sliding_window_cmn", + "spectrogram", + "inverse_spectrogram", + "spectral_centroid", + "allpass_biquad", + "band_biquad", + "bandpass_biquad", + "bandreject_biquad", + "bass_biquad", + "biquad", + "contrast", + "dither", + "dcshift", + "deemph_biquad", + "equalizer_biquad", + "filtfilt", + "flanger", + "forced_align", + "merge_tokens", + "TokenSpan", + "gain", + "highpass_biquad", + "lfilter", + "lowpass_biquad", + "overdrive", + "phaser", + "riaa_biquad", + "treble_biquad", + "vad", + "apply_codec", + "resample", + "edit_distance", + "pitch_shift", + "rnnt_loss", + "psd", + "mvdr_weights_souden", + "mvdr_weights_rtf", + "rtf_evd", + "rtf_power", + "apply_beamforming", + "fftconvolve", + "convolve", + "add_noise", + "speed", + "preemphasis", + "deemphasis", + "frechet_distance", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/_alignment.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/_alignment.py new file mode 100644 index 0000000000000000000000000000000000000000..13a408b3b6dd2e2d48390201685244c239da8cd8 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/_alignment.py @@ -0,0 +1,128 @@ +from dataclasses import dataclass +from typing import List, Optional, Tuple + +import torch +from torch import Tensor +from torchaudio._extension import fail_if_no_align + +__all__ = [] + + +@fail_if_no_align +def forced_align( + log_probs: Tensor, + targets: Tensor, + input_lengths: Optional[Tensor] = None, + target_lengths: Optional[Tensor] = None, + blank: int = 0, +) -> Tuple[Tensor, Tensor]: + r"""Align a CTC label sequence to an emission. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + log_probs (Tensor): log probability of CTC emission output. + Tensor of shape `(B, T, C)`. where `B` is the batch size, `T` is the input length, + `C` is the number of characters in alphabet including blank. + targets (Tensor): Target sequence. Tensor of shape `(B, L)`, + where `L` is the target length. + input_lengths (Tensor or None, optional): + Lengths of the inputs (max value must each be <= `T`). 1-D Tensor of shape `(B,)`. + target_lengths (Tensor or None, optional): + Lengths of the targets. 1-D Tensor of shape `(B,)`. + blank_id (int, optional): The index of blank symbol in CTC emission. (Default: 0) + + Returns: + Tuple(Tensor, Tensor): + Tensor: Label for each time step in the alignment path computed using forced alignment. + + Tensor: Log probability scores of the labels for each time step. + + Note: + The sequence length of `log_probs` must satisfy: + + + .. math:: + L_{\text{log\_probs}} \ge L_{\text{label}} + N_{\text{repeat}} + + where :math:`N_{\text{repeat}}` is the number of consecutively repeated tokens. + For example, in str `"aabbc"`, the number of repeats are `2`. + + Note: + The current version only supports ``batch_size==1``. + """ + if blank in targets: + raise ValueError(f"targets Tensor shouldn't contain blank index. Found {targets}.") + if torch.max(targets) >= log_probs.shape[-1]: + raise ValueError("targets values must be less than the CTC dimension") + + if input_lengths is None: + batch_size, length = log_probs.size(0), log_probs.size(1) + input_lengths = torch.full((batch_size,), length, dtype=torch.int64, device=log_probs.device) + if target_lengths is None: + batch_size, length = targets.size(0), targets.size(1) + target_lengths = torch.full((batch_size,), length, dtype=torch.int64, device=targets.device) + + # For TorchScript compatibility + assert input_lengths is not None + assert target_lengths is not None + + paths, scores = torch.ops.torchaudio.forced_align(log_probs, targets, input_lengths, target_lengths, blank) + return paths, scores + + +@dataclass +class TokenSpan: + """TokenSpan() + Token with time stamps and score. Returned by :py:func:`merge_tokens`. + """ + + token: int + """The token""" + start: int + """The start time (inclusive) in emission time axis.""" + end: int + """The end time (exclusive) in emission time axis.""" + score: float + """The score of the this token.""" + + def __len__(self) -> int: + """Returns the time span""" + return self.end - self.start + + +def merge_tokens(tokens: Tensor, scores: Tensor, blank: int = 0) -> List[TokenSpan]: + """Removes repeated tokens and blank tokens from the given CTC token sequence. + + Args: + tokens (Tensor): Alignment tokens (unbatched) returned from :py:func:`forced_align`. + Shape: `(time, )`. + scores (Tensor): Alignment scores (unbatched) returned from :py:func:`forced_align`. + Shape: `(time, )`. When computing the token-size score, the given score is averaged + across the corresponding time span. + + Returns: + list of TokenSpan + + Example: + >>> aligned_tokens, scores = forced_align(emission, targets, input_lengths, target_lengths) + >>> token_spans = merge_tokens(aligned_tokens[0], scores[0]) + """ + if tokens.ndim != 1 or scores.ndim != 1: + raise ValueError("`tokens` and `scores` must be 1D Tensor.") + if len(tokens) != len(scores): + raise ValueError("`tokens` and `scores` must be the same length.") + + diff = torch.diff( + tokens, prepend=torch.tensor([-1], device=tokens.device), append=torch.tensor([-1], device=tokens.device) + ) + changes_wo_blank = torch.nonzero((diff != 0)).squeeze().tolist() + tokens = tokens.tolist() + spans = [ + TokenSpan(token=token, start=start, end=end, score=scores[start:end].mean().item()) + for start, end in zip(changes_wo_blank[:-1], changes_wo_blank[1:]) + if (token := tokens[start]) != blank + ] + return spans diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/filtering.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/filtering.py new file mode 100644 index 0000000000000000000000000000000000000000..659a1ea36bd736582ecb5fd48d05e037c436e643 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/filtering.py @@ -0,0 +1,1670 @@ +import math +import warnings +from typing import Optional + +import torch +from torch import Tensor + +from torchaudio._extension import _IS_TORCHAUDIO_EXT_AVAILABLE + + +def _dB2Linear(x: float) -> float: + return math.exp(x * math.log(10) / 20.0) + + +def _generate_wave_table( + wave_type: str, + data_type: str, + table_size: int, + min: float, + max: float, + phase: float, + device: torch.device, +) -> Tensor: + r"""A helper function for phaser. Generates a table with given parameters. + + Args: + wave_type (str): SINE or TRIANGULAR + data_type (str): desired data_type ( `INT` or `FLOAT` ) + table_size (int): desired table size + min (float): desired min value + max (float): desired max value + phase (float): desired phase + device (torch.device): Torch device on which table must be generated + Returns: + Tensor: A 1D tensor with wave table values + """ + + phase_offset = int(phase / math.pi / 2 * table_size + 0.5) + + t = torch.arange(table_size, device=device, dtype=torch.int32) + + point = (t + phase_offset) % table_size + + d = torch.zeros_like(point, device=device, dtype=torch.float64) + + if wave_type == "SINE": + d = (torch.sin(point.to(torch.float64) / table_size * 2 * math.pi) + 1) / 2 + elif wave_type == "TRIANGLE": + d = point.to(torch.float64) * 2 / table_size + value = torch.div(4 * point, table_size, rounding_mode="floor") + d[value == 0] = d[value == 0] + 0.5 + d[value == 1] = 1.5 - d[value == 1] + d[value == 2] = 1.5 - d[value == 2] + d[value == 3] = d[value == 3] - 1.5 + + d = d * (max - min) + min + + if data_type == "INT": + mask = d < 0 + d[mask] = d[mask] - 0.5 + d[~mask] = d[~mask] + 0.5 + d = d.to(torch.int32) + elif data_type == "FLOAT": + d = d.to(torch.float32) + + return d + + +def allpass_biquad(waveform: Tensor, sample_rate: int, central_freq: float, Q: float = 0.707) -> Tensor: + r"""Design two-pole all-pass filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform(torch.Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + + alpha = torch.sin(w0) / 2 / Q + + b0 = 1 - alpha + b1 = -2 * torch.cos(w0) + b2 = 1 + alpha + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def band_biquad( + waveform: Tensor, + sample_rate: int, + central_freq: float, + Q: float = 0.707, + noise: bool = False, +) -> Tensor: + r"""Design two-pole band filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``). + noise (bool, optional) : If ``True``, uses the alternate mode for un-pitched audio (e.g. percussion). + If ``False``, uses mode oriented to pitched audio, i.e. voice, singing, + or instrumental music (Default: ``False``). + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + bw_Hz = central_freq / Q + + a0 = 1.0 + a2 = torch.exp(-2 * math.pi * bw_Hz / sample_rate) + a1 = -4 * a2 / (1 + a2) * torch.cos(w0) + + b0 = torch.sqrt(1 - a1 * a1 / (4 * a2)) * (1 - a2) + + if noise: + mult = torch.sqrt(((1 + a2) * (1 + a2) - a1 * a1) * (1 - a2) / (1 + a2)) / b0 + b0 = mult * b0 + + b1 = 0.0 + b2 = 0.0 + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def bandpass_biquad( + waveform: Tensor, + sample_rate: int, + central_freq: float, + Q: float = 0.707, + const_skirt_gain: bool = False, +) -> Tensor: + r"""Design two-pole band-pass filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + const_skirt_gain (bool, optional) : If ``True``, uses a constant skirt gain (peak gain = Q). + If ``False``, uses a constant 0dB peak gain. (Default: ``False``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + + temp = torch.sin(w0) / 2 if const_skirt_gain else alpha + b0 = temp + b1 = 0.0 + b2 = -temp + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def bandreject_biquad(waveform: Tensor, sample_rate: int, central_freq: float, Q: float = 0.707) -> Tensor: + r"""Design two-pole band-reject filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + central_freq (float or torch.Tensor): central frequency (in Hz) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + + b0 = 1.0 + b1 = -2 * torch.cos(w0) + b2 = 1.0 + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def bass_biquad( + waveform: Tensor, + sample_rate: int, + gain: float, + central_freq: float = 100, + Q: float = 0.707, +) -> Tensor: + r"""Design a bass tone-control effect. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + gain (float or torch.Tensor): desired gain at the boost (or attenuation) in dB. + central_freq (float or torch.Tensor, optional): central frequency (in Hz). (Default: ``100``) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``). + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + gain = torch.as_tensor(gain, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + A = torch.exp(gain / 40 * math.log(10)) + + temp1 = 2 * torch.sqrt(A) * alpha + temp2 = (A - 1) * torch.cos(w0) + temp3 = (A + 1) * torch.cos(w0) + + b0 = A * ((A + 1) - temp2 + temp1) + b1 = 2 * A * ((A - 1) - temp3) + b2 = A * ((A + 1) - temp2 - temp1) + a0 = (A + 1) + temp2 + temp1 + a1 = -2 * ((A - 1) + temp3) + a2 = (A + 1) + temp2 - temp1 + + return biquad(waveform, b0 / a0, b1 / a0, b2 / a0, a0 / a0, a1 / a0, a2 / a0) + + +def biquad(waveform: Tensor, b0: float, b1: float, b2: float, a0: float, a1: float, a2: float) -> Tensor: + r"""Perform a biquad filter of input tensor. Initial conditions set to 0. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + b0 (float or torch.Tensor): numerator coefficient of current input, x[n] + b1 (float or torch.Tensor): numerator coefficient of input one time step ago x[n-1] + b2 (float or torch.Tensor): numerator coefficient of input two time steps ago x[n-2] + a0 (float or torch.Tensor): denominator coefficient of current output y[n], typically 1 + a1 (float or torch.Tensor): denominator coefficient of current output y[n-1] + a2 (float or torch.Tensor): denominator coefficient of current output y[n-2] + + Returns: + Tensor: Waveform with dimension of `(..., time)` + + Reference: + - https://en.wikipedia.org/wiki/Digital_biquad_filter + """ + + device = waveform.device + dtype = waveform.dtype + + b0 = torch.as_tensor(b0, dtype=dtype, device=device).view(1) + b1 = torch.as_tensor(b1, dtype=dtype, device=device).view(1) + b2 = torch.as_tensor(b2, dtype=dtype, device=device).view(1) + a0 = torch.as_tensor(a0, dtype=dtype, device=device).view(1) + a1 = torch.as_tensor(a1, dtype=dtype, device=device).view(1) + a2 = torch.as_tensor(a2, dtype=dtype, device=device).view(1) + + output_waveform = lfilter( + waveform, + torch.cat([a0, a1, a2]), + torch.cat([b0, b1, b2]), + ) + return output_waveform + + +def contrast(waveform: Tensor, enhancement_amount: float = 75.0) -> Tensor: + r"""Apply contrast effect. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Comparable with compression, this effect modifies an audio signal to make it sound louder + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + enhancement_amount (float, optional): controls the amount of the enhancement + Allowed range of values for enhancement_amount : 0-100 + Note that enhancement_amount = 0 still gives a significant contrast enhancement + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + """ + + if not 0 <= enhancement_amount <= 100: + raise ValueError("Allowed range of values for enhancement_amount : 0-100") + + contrast = enhancement_amount / 750.0 + + temp1 = waveform * (math.pi / 2) + temp2 = contrast * torch.sin(temp1 * 4) + output_waveform = torch.sin(temp1 + temp2) + + return output_waveform + + +def dcshift(waveform: Tensor, shift: float, limiter_gain: Optional[float] = None) -> Tensor: + r"""Apply a DC shift to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + This can be useful to remove a DC offset + (caused perhaps by a hardware problem in the recording chain) from the audio + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + shift (float): indicates the amount to shift the audio + Allowed range of values for shift : -2.0 to +2.0 + limiter_gain (float of None, optional): It is used only on peaks to prevent clipping + It should have a value much less than 1 (e.g. 0.05 or 0.02) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + """ + output_waveform = waveform + limiter_threshold = 0.0 + + if limiter_gain is not None: + limiter_threshold = 1.0 - (abs(shift) - limiter_gain) + + # Note: + # the following index-based update breaks auto-grad support + if limiter_gain is not None and shift > 0: + mask = waveform > limiter_threshold + temp = (waveform[mask] - limiter_threshold) * limiter_gain / (1 - limiter_threshold) + output_waveform[mask] = (temp + limiter_threshold + shift).clamp(max=limiter_threshold) + output_waveform[~mask] = (waveform[~mask] + shift).clamp(min=-1, max=1) + elif limiter_gain is not None and shift < 0: + mask = waveform < -limiter_threshold + temp = (waveform[mask] + limiter_threshold) * limiter_gain / (1 - limiter_threshold) + output_waveform[mask] = (temp - limiter_threshold + shift).clamp(min=-limiter_threshold) + output_waveform[~mask] = (waveform[~mask] + shift).clamp(min=-1, max=1) + else: + output_waveform = (waveform + shift).clamp(min=-1, max=1) + + return output_waveform + + +def deemph_biquad(waveform: Tensor, sample_rate: int) -> Tensor: + r"""Apply ISO 908 CD de-emphasis (shelving) IIR filter. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, Allowed sample rate ``44100`` or ``48000`` + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + + if sample_rate == 44100: + central_freq = 5283 + width_slope = 0.4845 + gain = -9.477 + elif sample_rate == 48000: + central_freq = 5356 + width_slope = 0.479 + gain = -9.62 + else: + raise ValueError("Sample rate must be 44100 (audio-CD) or 48000 (DAT)") + + w0 = 2 * math.pi * central_freq / sample_rate + A = math.exp(gain / 40.0 * math.log(10)) + alpha = math.sin(w0) / 2 * math.sqrt((A + 1 / A) * (1 / width_slope - 1) + 2) + + temp1 = 2 * math.sqrt(A) * alpha + temp2 = (A - 1) * math.cos(w0) + temp3 = (A + 1) * math.cos(w0) + + b0 = A * ((A + 1) + temp2 + temp1) + b1 = -2 * A * ((A - 1) + temp3) + b2 = A * ((A + 1) + temp2 - temp1) + a0 = (A + 1) - temp2 + temp1 + a1 = 2 * ((A - 1) - temp3) + a2 = (A + 1) - temp2 - temp1 + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _add_noise_shaping(dithered_waveform: Tensor, waveform: Tensor) -> Tensor: + r"""Noise shaping is calculated by error: + error[n] = dithered[n] - original[n] + noise_shaped_waveform[n] = dithered[n] + error[n-1] + """ + wf_shape = waveform.size() + waveform = waveform.reshape(-1, wf_shape[-1]) + + dithered_shape = dithered_waveform.size() + dithered_waveform = dithered_waveform.reshape(-1, dithered_shape[-1]) + + error = dithered_waveform - waveform + + # add error[n-1] to dithered_waveform[n], so offset the error by 1 index + zeros = torch.zeros(1, dtype=error.dtype, device=error.device) + for index in range(error.size()[0]): + err = error[index] + error_offset = torch.cat((zeros, err)) + error[index] = error_offset[: waveform.size()[1]] + + noise_shaped = dithered_waveform + error + return noise_shaped.reshape(dithered_shape[:-1] + noise_shaped.shape[-1:]) + + +def _apply_probability_distribution(waveform: Tensor, density_function: str = "TPDF") -> Tensor: + r"""Apply a probability distribution function on a waveform. + + Triangular probability density function (TPDF) dither noise has a + triangular distribution; values in the center of the range have a higher + probability of occurring. + + Rectangular probability density function (RPDF) dither noise has a + uniform distribution; any value in the specified range has the same + probability of occurring. + + Gaussian probability density function (GPDF) has a normal distribution. + The relationship of probabilities of results follows a bell-shaped, + or Gaussian curve, typical of dither generated by analog sources. + Args: + waveform (Tensor): Tensor of audio of dimension (..., time) + density_function (str, optional): The density function of a + continuous random variable (Default: ``"TPDF"``) + Options: Triangular Probability Density Function - `TPDF` + Rectangular Probability Density Function - `RPDF` + Gaussian Probability Density Function - `GPDF` + Returns: + Tensor: waveform dithered with TPDF + """ + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, shape[-1]) + + channel_size = waveform.size()[0] - 1 + time_size = waveform.size()[-1] - 1 + + random_channel = ( + int( + torch.randint( + channel_size, + [ + 1, + ], + ).item() + ) + if channel_size > 0 + else 0 + ) + random_time = ( + int( + torch.randint( + time_size, + [ + 1, + ], + ).item() + ) + if time_size > 0 + else 0 + ) + + number_of_bits = 16 + up_scaling = 2 ** (number_of_bits - 1) - 2 + signal_scaled = waveform * up_scaling + down_scaling = 2 ** (number_of_bits - 1) + + signal_scaled_dis = waveform + if density_function == "RPDF": + RPDF = waveform[random_channel][random_time] - 0.5 + + signal_scaled_dis = signal_scaled + RPDF + elif density_function == "GPDF": + # TODO Replace by distribution code once + # https://github.com/pytorch/pytorch/issues/29843 is resolved + # gaussian = torch.distributions.normal.Normal(torch.mean(waveform, -1), 1).sample() + + num_rand_variables = 6 + + gaussian = waveform[random_channel][random_time] + for ws in num_rand_variables * [time_size]: + rand_chan = int( + torch.randint( + channel_size, + [ + 1, + ], + ).item() + ) + gaussian += waveform[rand_chan][ + int( + torch.randint( + ws, + [ + 1, + ], + ).item() + ) + ] + + signal_scaled_dis = signal_scaled + gaussian + else: + # dtype needed for https://github.com/pytorch/pytorch/issues/32358 + TPDF = torch.bartlett_window(time_size + 1, dtype=signal_scaled.dtype, device=signal_scaled.device) + TPDF = TPDF.repeat((channel_size + 1), 1) + signal_scaled_dis = signal_scaled + TPDF + + quantised_signal_scaled = torch.round(signal_scaled_dis) + quantised_signal = quantised_signal_scaled / down_scaling + + # unpack batch + return quantised_signal.reshape(shape[:-1] + quantised_signal.shape[-1:]) + + +def dither(waveform: Tensor, density_function: str = "TPDF", noise_shaping: bool = False) -> Tensor: + r"""Apply dither + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Dither increases the perceived dynamic range of audio stored at a + particular bit-depth by eliminating nonlinear truncation distortion + (i.e. adding minimally perceived noise to mask distortion caused by quantization). + + Args: + waveform (Tensor): Tensor of audio of dimension (..., time) + density_function (str, optional): + The density function of a continuous random variable. One of + ``"TPDF"`` (Triangular Probability Density Function), + ``"RPDF"`` (Rectangular Probability Density Function) or + ``"GPDF"`` (Gaussian Probability Density Function) (Default: ``"TPDF"``). + noise_shaping (bool, optional): a filtering process that shapes the spectral + energy of quantisation error (Default: ``False``) + + Returns: + Tensor: waveform dithered + """ + dithered = _apply_probability_distribution(waveform, density_function=density_function) + + if noise_shaping: + return _add_noise_shaping(dithered, waveform) + else: + return dithered + + +def equalizer_biquad( + waveform: Tensor, + sample_rate: int, + center_freq: float, + gain: float, + Q: float = 0.707, +) -> Tensor: + r"""Design biquad peaking equalizer filter and perform filtering. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + center_freq (float): filter's central frequency + gain (float or torch.Tensor): desired gain at the boost (or attenuation) in dB + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + """ + dtype = waveform.dtype + device = waveform.device + center_freq = torch.as_tensor(center_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + gain = torch.as_tensor(gain, dtype=dtype, device=device) + + w0 = 2 * math.pi * center_freq / sample_rate + A = torch.exp(gain / 40.0 * math.log(10)) + alpha = torch.sin(w0) / 2 / Q + + b0 = 1 + alpha * A + b1 = -2 * torch.cos(w0) + b2 = 1 - alpha * A + a0 = 1 + alpha / A + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha / A + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def filtfilt( + waveform: Tensor, + a_coeffs: Tensor, + b_coeffs: Tensor, + clamp: bool = True, +) -> Tensor: + r"""Apply an IIR filter forward and backward to a waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Inspired by https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.filtfilt.html + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)`. Must be normalized to -1 to 1. + a_coeffs (Tensor): denominator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delay coefficients are first, e.g. ``[a0, a1, a2, ...]``. + Must be same size as b_coeffs (pad with 0's as necessary). + b_coeffs (Tensor): numerator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delay coefficients are first, e.g. ``[b0, b1, b2, ...]``. + Must be same size as a_coeffs (pad with 0's as necessary). + clamp (bool, optional): If ``True``, clamp the output signal to be in the range [-1, 1] (Default: ``True``) + + Returns: + Tensor: Waveform with dimension of either `(..., num_filters, time)` if ``a_coeffs`` and ``b_coeffs`` + are 2D Tensors, or `(..., time)` otherwise. + """ + forward_filtered = lfilter(waveform, a_coeffs, b_coeffs, clamp=False, batching=True) + backward_filtered = lfilter( + forward_filtered.flip(-1), + a_coeffs, + b_coeffs, + clamp=clamp, + batching=True, + ).flip(-1) + return backward_filtered + + +def flanger( + waveform: Tensor, + sample_rate: int, + delay: float = 0.0, + depth: float = 2.0, + regen: float = 0.0, + width: float = 71.0, + speed: float = 0.5, + phase: float = 25.0, + modulation: str = "sinusoidal", + interpolation: str = "linear", +) -> Tensor: + r"""Apply a flanger effect to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., channel, time)` . + Max 4 channels allowed + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + delay (float, optional): desired delay in milliseconds(ms) + Allowed range of values are 0 to 30 + depth (float, optional): desired delay depth in milliseconds(ms) + Allowed range of values are 0 to 10 + regen (float, optional): desired regen(feedback gain) in dB + Allowed range of values are -95 to 95 + width (float, optional): desired width(delay gain) in dB + Allowed range of values are 0 to 100 + speed (float, optional): modulation speed in Hz + Allowed range of values are 0.1 to 10 + phase (float, optional): percentage phase-shift for multi-channel + Allowed range of values are 0 to 100 + modulation (str, optional): Use either "sinusoidal" or "triangular" modulation. (Default: ``sinusoidal``) + interpolation (str, optional): Use either "linear" or "quadratic" for delay-line interpolation. + (Default: ``linear``) + + Returns: + Tensor: Waveform of dimension of `(..., channel, time)` + + Reference: + - http://sox.sourceforge.net/sox.html + + - Scott Lehman, `Effects Explained`_, + + .. _Effects Explained: + https://web.archive.org/web/20051125072557/http://www.harmony-central.com/Effects/effects-explained.html + """ + + if modulation not in ("sinusoidal", "triangular"): + raise ValueError('Only "sinusoidal" or "triangular" modulation allowed') + + if interpolation not in ("linear", "quadratic"): + raise ValueError('Only "linear" or "quadratic" interpolation allowed') + + actual_shape = waveform.shape + device, dtype = waveform.device, waveform.dtype + + if actual_shape[-2] > 4: + raise ValueError("Max 4 channels allowed") + + # convert to 3D (batch, channels, time) + waveform = waveform.view(-1, actual_shape[-2], actual_shape[-1]) + + # Scaling + feedback_gain = regen / 100 + delay_gain = width / 100 + channel_phase = phase / 100 + delay_min = delay / 1000 + delay_depth = depth / 1000 + + n_channels = waveform.shape[-2] + + if modulation == "sinusoidal": + wave_type = "SINE" + else: + wave_type = "TRIANGLE" + + # Balance output: + in_gain = 1.0 / (1 + delay_gain) + delay_gain = delay_gain / (1 + delay_gain) + + # Balance feedback loop: + delay_gain = delay_gain * (1 - abs(feedback_gain)) + + delay_buf_length = int((delay_min + delay_depth) * sample_rate + 0.5) + delay_buf_length = delay_buf_length + 2 + + delay_bufs = torch.zeros(waveform.shape[0], n_channels, delay_buf_length, dtype=dtype, device=device) + delay_last = torch.zeros(waveform.shape[0], n_channels, dtype=dtype, device=device) + + lfo_length = int(sample_rate / speed) + + table_min = math.floor(delay_min * sample_rate + 0.5) + table_max = delay_buf_length - 2.0 + + lfo = _generate_wave_table( + wave_type=wave_type, + data_type="FLOAT", + table_size=lfo_length, + min=float(table_min), + max=float(table_max), + phase=3 * math.pi / 2, + device=device, + ) + + output_waveform = torch.zeros_like(waveform, dtype=dtype, device=device) + + delay_buf_pos = 0 + lfo_pos = 0 + channel_idxs = torch.arange(0, n_channels, device=device) + + for i in range(waveform.shape[-1]): + + delay_buf_pos = (delay_buf_pos + delay_buf_length - 1) % delay_buf_length + + cur_channel_phase = (channel_idxs * lfo_length * channel_phase + 0.5).to(torch.int64) + delay_tensor = lfo[(lfo_pos + cur_channel_phase) % lfo_length] + frac_delay = torch.frac(delay_tensor) + delay_tensor = torch.floor(delay_tensor) + + int_delay = delay_tensor.to(torch.int64) + + temp = waveform[:, :, i] + + delay_bufs[:, :, delay_buf_pos] = temp + delay_last * feedback_gain + + delayed_0 = delay_bufs[:, channel_idxs, (delay_buf_pos + int_delay) % delay_buf_length] + + int_delay = int_delay + 1 + + delayed_1 = delay_bufs[:, channel_idxs, (delay_buf_pos + int_delay) % delay_buf_length] + + int_delay = int_delay + 1 + + if interpolation == "linear": + delayed = delayed_0 + (delayed_1 - delayed_0) * frac_delay + else: + delayed_2 = delay_bufs[:, channel_idxs, (delay_buf_pos + int_delay) % delay_buf_length] + + int_delay = int_delay + 1 + + delayed_2 = delayed_2 - delayed_0 + delayed_1 = delayed_1 - delayed_0 + a = delayed_2 * 0.5 - delayed_1 + b = delayed_1 * 2 - delayed_2 * 0.5 + + delayed = delayed_0 + (a * frac_delay + b) * frac_delay + + delay_last = delayed + output_waveform[:, :, i] = waveform[:, :, i] * in_gain + delayed * delay_gain + + lfo_pos = (lfo_pos + 1) % lfo_length + + return output_waveform.clamp(min=-1, max=1).view(actual_shape) + + +def gain(waveform: Tensor, gain_db: float = 1.0) -> Tensor: + r"""Apply amplification or attenuation to the whole waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + gain_db (float, optional) Gain adjustment in decibels (dB) (Default: ``1.0``). + + Returns: + Tensor: the whole waveform amplified by gain_db. + """ + if gain_db == 0: + return waveform + + ratio = 10 ** (gain_db / 20) + + return waveform * ratio + + +def highpass_biquad(waveform: Tensor, sample_rate: int, cutoff_freq: float, Q: float = 0.707) -> Tensor: + r"""Design biquad highpass filter and perform filtering. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + cutoff_freq (float or torch.Tensor): filter cutoff frequency + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform dimension of `(..., time)` + """ + dtype = waveform.dtype + device = waveform.device + cutoff_freq = torch.as_tensor(cutoff_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * cutoff_freq / sample_rate + alpha = torch.sin(w0) / 2.0 / Q + + b0 = (1 + torch.cos(w0)) / 2 + b1 = -1 - torch.cos(w0) + b2 = b0 + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _lfilter_core_generic_loop(input_signal_windows: Tensor, a_coeffs_flipped: Tensor, padded_output_waveform: Tensor): + n_order = a_coeffs_flipped.size(1) + a_coeffs_flipped = a_coeffs_flipped.unsqueeze(2) + for i_sample, o0 in enumerate(input_signal_windows.permute(2, 0, 1)): + windowed_output_signal = padded_output_waveform[:, :, i_sample : i_sample + n_order] + o0 -= (windowed_output_signal.transpose(0, 1) @ a_coeffs_flipped)[..., 0].t() + padded_output_waveform[:, :, i_sample + n_order - 1] = o0 + + +if _IS_TORCHAUDIO_EXT_AVAILABLE: + _lfilter_core_cpu_loop = torch.ops.torchaudio._lfilter_core_loop +else: + _lfilter_core_cpu_loop = _lfilter_core_generic_loop + + +def _lfilter_core( + waveform: Tensor, + a_coeffs: Tensor, + b_coeffs: Tensor, +) -> Tensor: + + if a_coeffs.size() != b_coeffs.size(): + raise ValueError( + "Expected coeffs to be the same size." + f"Found a_coeffs size: {a_coeffs.size()}, b_coeffs size: {b_coeffs.size()}" + ) + if waveform.ndim != 3: + raise ValueError(f"Expected waveform to be 3 dimensional. Found: {waveform.ndim}") + if not (waveform.device == a_coeffs.device == b_coeffs.device): + raise ValueError( + "Expected waveform and coeffs to be on the same device." + f"Found: waveform device:{waveform.device}, a_coeffs device: {a_coeffs.device}, " + f"b_coeffs device: {b_coeffs.device}" + ) + + n_batch, n_channel, n_sample = waveform.size() + n_order = a_coeffs.size(1) + if n_order <= 0: + raise ValueError(f"Expected n_order to be positive. Found: {n_order}") + + # Pad the input and create output + + padded_waveform = torch.nn.functional.pad(waveform, [n_order - 1, 0]) + padded_output_waveform = torch.zeros_like(padded_waveform) + + # Set up the coefficients matrix + # Flip coefficients' order + a_coeffs_flipped = a_coeffs.flip(1) + b_coeffs_flipped = b_coeffs.flip(1) + + # calculate windowed_input_signal in parallel using convolution + input_signal_windows = torch.nn.functional.conv1d(padded_waveform, b_coeffs_flipped.unsqueeze(1), groups=n_channel) + + input_signal_windows.div_(a_coeffs[:, :1]) + a_coeffs_flipped.div_(a_coeffs[:, :1]) + + if ( + input_signal_windows.device == torch.device("cpu") + and a_coeffs_flipped.device == torch.device("cpu") + and padded_output_waveform.device == torch.device("cpu") + ): + _lfilter_core_cpu_loop(input_signal_windows, a_coeffs_flipped, padded_output_waveform) + else: + _lfilter_core_generic_loop(input_signal_windows, a_coeffs_flipped, padded_output_waveform) + + output = padded_output_waveform[:, :, n_order - 1 :] + return output + + +if _IS_TORCHAUDIO_EXT_AVAILABLE: + _lfilter = torch.ops.torchaudio._lfilter +else: + _lfilter = _lfilter_core + + +def lfilter(waveform: Tensor, a_coeffs: Tensor, b_coeffs: Tensor, clamp: bool = True, batching: bool = True) -> Tensor: + r"""Perform an IIR filter by evaluating difference equation, using differentiable implementation + developed separately by *Yu et al.* :cite:`ismir_YuF23` and *Forgione et al.* :cite:`forgione2021dynonet`. + The gradients of ``a_coeffs`` are computed based on a faster algorithm from :cite:`ycy2024diffapf`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Note: + To avoid numerical problems, small filter order is preferred. + Using double precision could also minimize numerical precision errors. + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)`. Must be normalized to -1 to 1. + a_coeffs (Tensor): denominator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delays coefficients are first, e.g. ``[a0, a1, a2, ...]``. + Must be same size as b_coeffs (pad with 0's as necessary). + b_coeffs (Tensor): numerator coefficients of difference equation of dimension of either + 1D with shape `(num_order + 1)` or 2D with shape `(num_filters, num_order + 1)`. + Lower delays coefficients are first, e.g. ``[b0, b1, b2, ...]``. + Must be same size as a_coeffs (pad with 0's as necessary). + clamp (bool, optional): If ``True``, clamp the output signal to be in the range [-1, 1] (Default: ``True``) + batching (bool, optional): Effective only when coefficients are 2D. If ``True``, then waveform should be at + least 2D, and the size of second axis from last should equals to ``num_filters``. + The output can be expressed as ``output[..., i, :] = lfilter(waveform[..., i, :], + a_coeffs[i], b_coeffs[i], clamp=clamp, batching=False)``. (Default: ``True``) + + Returns: + Tensor: Waveform with dimension of either `(..., num_filters, time)` if ``a_coeffs`` and ``b_coeffs`` + are 2D Tensors, or `(..., time)` otherwise. + """ + if a_coeffs.size() != b_coeffs.size(): + raise ValueError( + "Expected coeffs to be the same size." + f"Found: a_coeffs size: {a_coeffs.size()}, b_coeffs size: {b_coeffs.size()}" + ) + if a_coeffs.ndim > 2: + raise ValueError(f"Expected coeffs to have greater than 1 dimension. Found: {a_coeffs.ndim}") + + if a_coeffs.ndim > 1: + if batching: + if waveform.ndim <= 0: + raise ValueError("Expected waveform to have a positive number of dimensions." f"Found: {waveform.ndim}") + if waveform.shape[-2] != a_coeffs.shape[0]: + raise ValueError( + "Expected number of batches in waveform and coeffs to be the same." + f"Found: coeffs batches: {a_coeffs.shape[0]}, waveform batches: {waveform.shape[-2]}" + ) + else: + waveform = torch.stack([waveform] * a_coeffs.shape[0], -2) + else: + a_coeffs = a_coeffs.unsqueeze(0) + b_coeffs = b_coeffs.unsqueeze(0) + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, a_coeffs.shape[0], shape[-1]) + output = _lfilter(waveform, a_coeffs, b_coeffs) + + if clamp: + output = torch.clamp(output, min=-1.0, max=1.0) + + # unpack batch + output = output.reshape(shape[:-1] + output.shape[-1:]) + + return output + + +def lowpass_biquad(waveform: Tensor, sample_rate: int, cutoff_freq: float, Q: float = 0.707) -> Tensor: + r"""Design biquad lowpass filter and perform filtering. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + cutoff_freq (float or torch.Tensor): filter cutoff frequency + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + """ + dtype = waveform.dtype + device = waveform.device + cutoff_freq = torch.as_tensor(cutoff_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + + w0 = 2 * math.pi * cutoff_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + + b0 = (1 - torch.cos(w0)) / 2 + b1 = 1 - torch.cos(w0) + b2 = b0 + a0 = 1 + alpha + a1 = -2 * torch.cos(w0) + a2 = 1 - alpha + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _overdrive_core_loop_generic( + waveform: Tensor, temp: Tensor, last_in: Tensor, last_out: Tensor, output_waveform: Tensor +): + for i in range(waveform.shape[-1]): + last_out = temp[:, i] - last_in + 0.995 * last_out + last_in = temp[:, i] + output_waveform[:, i] = waveform[:, i] * 0.5 + last_out * 0.75 + + +if _IS_TORCHAUDIO_EXT_AVAILABLE: + _overdrive_core_loop_cpu = torch.ops.torchaudio._overdrive_core_loop +else: + _overdrive_core_loop_cpu = _overdrive_core_loop_generic + + +def overdrive(waveform: Tensor, gain: float = 20, colour: float = 20) -> Tensor: + r"""Apply a overdrive effect to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + This effect applies a non linear distortion to the audio signal. + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + gain (float, optional): desired gain at the boost (or attenuation) in dB + Allowed range of values are 0 to 100 + colour (float, optional): controls the amount of even harmonic content in the over-driven output + Allowed range of values are 0 to 100 + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + """ + actual_shape = waveform.shape + device, dtype = waveform.device, waveform.dtype + + # convert to 2D (..,time) + waveform = waveform.view(-1, actual_shape[-1]) + + gain = _dB2Linear(gain) + colour = colour / 200 + last_in = torch.zeros(waveform.shape[:-1], dtype=dtype, device=device) + last_out = torch.zeros(waveform.shape[:-1], dtype=dtype, device=device) + + temp = waveform * gain + colour + + mask1 = temp < -1 + temp[mask1] = torch.tensor(-2.0 / 3.0, dtype=dtype, device=device) + # Wrapping the constant with Tensor is required for Torchscript + + mask2 = temp > 1 + temp[mask2] = torch.tensor(2.0 / 3.0, dtype=dtype, device=device) + + mask3 = ~mask1 & ~mask2 + temp[mask3] = temp[mask3] - (temp[mask3] ** 3) * (1.0 / 3) + + output_waveform = torch.zeros_like(waveform, dtype=dtype, device=device) + + # Uses CPU optimized loop function if available for CPU device + if device == torch.device("cpu"): + _overdrive_core_loop_cpu(waveform, temp, last_in, last_out, output_waveform) + else: + _overdrive_core_loop_generic(waveform, temp, last_in, last_out, output_waveform) + + return output_waveform.clamp(min=-1, max=1).view(actual_shape) + + +def phaser( + waveform: Tensor, + sample_rate: int, + gain_in: float = 0.4, + gain_out: float = 0.74, + delay_ms: float = 3.0, + decay: float = 0.4, + mod_speed: float = 0.5, + sinusoidal: bool = True, +) -> Tensor: + r"""Apply a phasing effect to the audio. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + gain_in (float, optional): desired input gain at the boost (or attenuation) in dB + Allowed range of values are 0 to 1 + gain_out (float, optional): desired output gain at the boost (or attenuation) in dB + Allowed range of values are 0 to 1e9 + delay_ms (float, optional): desired delay in milliseconds + Allowed range of values are 0 to 5.0 + decay (float, optional): desired decay relative to gain-in + Allowed range of values are 0 to 0.99 + mod_speed (float, optional): modulation speed in Hz + Allowed range of values are 0.1 to 2 + sinusoidal (bool, optional): If ``True``, uses sinusoidal modulation (preferable for multiple instruments) + If ``False``, uses triangular modulation (gives single instruments a sharper phasing effect) + (Default: ``True``) + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - Scott Lehman, `Effects Explained`_. + + .. _Effects Explained: + https://web.archive.org/web/20051125072557/http://www.harmony-central.com/Effects/effects-explained.html + """ + actual_shape = waveform.shape + device, dtype = waveform.device, waveform.dtype + + # convert to 2D (channels,time) + waveform = waveform.view(-1, actual_shape[-1]) + + delay_buf_len = int((delay_ms * 0.001 * sample_rate) + 0.5) + delay_buf = torch.zeros(waveform.shape[0], delay_buf_len, dtype=dtype, device=device) + + mod_buf_len = int(sample_rate / mod_speed + 0.5) + + if sinusoidal: + wave_type = "SINE" + else: + wave_type = "TRIANGLE" + + mod_buf = _generate_wave_table( + wave_type=wave_type, + data_type="INT", + table_size=mod_buf_len, + min=1.0, + max=float(delay_buf_len), + phase=math.pi / 2, + device=device, + ) + + delay_pos = 0 + mod_pos = 0 + + output_waveform_pre_gain_list = [] + waveform = waveform * gain_in + delay_buf = delay_buf * decay + waveform_list = [waveform[:, i] for i in range(waveform.size(1))] + delay_buf_list = [delay_buf[:, i] for i in range(delay_buf.size(1))] + mod_buf_list = [mod_buf[i] for i in range(mod_buf.size(0))] + + for i in range(waveform.shape[-1]): + idx = int((delay_pos + mod_buf_list[mod_pos]) % delay_buf_len) + mod_pos = (mod_pos + 1) % mod_buf_len + delay_pos = (delay_pos + 1) % delay_buf_len + temp = (waveform_list[i]) + (delay_buf_list[idx]) + delay_buf_list[delay_pos] = temp * decay + output_waveform_pre_gain_list.append(temp) + + output_waveform = torch.stack(output_waveform_pre_gain_list, dim=1).to(dtype=dtype, device=device) + output_waveform.mul_(gain_out) + + return output_waveform.clamp(min=-1, max=1).view(actual_shape) + + +def riaa_biquad(waveform: Tensor, sample_rate: int) -> Tensor: + r"""Apply RIAA vinyl playback equalization. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz). + Allowed sample rates in Hz : ``44100``,``48000``,``88200``,``96000`` + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + + if sample_rate == 44100: + zeros = [-0.2014898, 0.9233820] + poles = [0.7083149, 0.9924091] + + elif sample_rate == 48000: + zeros = [-0.1766069, 0.9321590] + poles = [0.7396325, 0.9931330] + + elif sample_rate == 88200: + zeros = [-0.1168735, 0.9648312] + poles = [0.8590646, 0.9964002] + + elif sample_rate == 96000: + zeros = [-0.1141486, 0.9676817] + poles = [0.8699137, 0.9966946] + + else: + raise ValueError("Sample rate must be 44.1k, 48k, 88.2k, or 96k") + + # polynomial coefficients with roots zeros[0] and zeros[1] + b0 = 1.0 + b1 = -(zeros[0] + zeros[1]) + b2 = zeros[0] * zeros[1] + + # polynomial coefficients with roots poles[0] and poles[1] + a0 = 1.0 + a1 = -(poles[0] + poles[1]) + a2 = poles[0] * poles[1] + + # Normalize to 0dB at 1kHz + y = 2 * math.pi * 1000 / sample_rate + b_re = b0 + b1 * math.cos(-y) + b2 * math.cos(-2 * y) + a_re = a0 + a1 * math.cos(-y) + a2 * math.cos(-2 * y) + b_im = b1 * math.sin(-y) + b2 * math.sin(-2 * y) + a_im = a1 * math.sin(-y) + a2 * math.sin(-2 * y) + g = 1 / math.sqrt((b_re**2 + b_im**2) / (a_re**2 + a_im**2)) + + b0 *= g + b1 *= g + b2 *= g + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def treble_biquad( + waveform: Tensor, + sample_rate: int, + gain: float, + central_freq: float = 3000, + Q: float = 0.707, +) -> Tensor: + r"""Design a treble tone-control effect. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): audio waveform of dimension of `(..., time)` + sample_rate (int): sampling rate of the waveform, e.g. 44100 (Hz) + gain (float or torch.Tensor): desired gain at the boost (or attenuation) in dB. + central_freq (float or torch.Tensor, optional): central frequency (in Hz). (Default: ``3000``) + Q (float or torch.Tensor, optional): https://en.wikipedia.org/wiki/Q_factor (Default: ``0.707``). + + Returns: + Tensor: Waveform of dimension of `(..., time)` + + Reference: + - http://sox.sourceforge.net/sox.html + - https://www.w3.org/2011/audio/audio-eq-cookbook.html#APF + """ + dtype = waveform.dtype + device = waveform.device + central_freq = torch.as_tensor(central_freq, dtype=dtype, device=device) + Q = torch.as_tensor(Q, dtype=dtype, device=device) + gain = torch.as_tensor(gain, dtype=dtype, device=device) + + w0 = 2 * math.pi * central_freq / sample_rate + alpha = torch.sin(w0) / 2 / Q + A = torch.exp(gain / 40 * math.log(10)) + + temp1 = 2 * torch.sqrt(A) * alpha + temp2 = (A - 1) * torch.cos(w0) + temp3 = (A + 1) * torch.cos(w0) + + b0 = A * ((A + 1) + temp2 + temp1) + b1 = -2 * A * ((A - 1) + temp3) + b2 = A * ((A + 1) + temp2 - temp1) + a0 = (A + 1) - temp2 + temp1 + a1 = 2 * ((A - 1) - temp3) + a2 = (A + 1) - temp2 - temp1 + + return biquad(waveform, b0, b1, b2, a0, a1, a2) + + +def _measure( + measure_len_ws: int, + samples: Tensor, + spectrum: Tensor, + noise_spectrum: Tensor, + spectrum_window: Tensor, + spectrum_start: int, + spectrum_end: int, + cepstrum_window: Tensor, + cepstrum_start: int, + cepstrum_end: int, + noise_reduction_amount: float, + measure_smooth_time_mult: float, + noise_up_time_mult: Tensor, + noise_down_time_mult: Tensor, + boot_count: int, +) -> float: + device = samples.device + + if spectrum.size(-1) != noise_spectrum.size(-1): + raise ValueError( + "Expected spectrum size to match noise spectrum size in final dimension." + f"Found: spectrum size: {spectrum.size()}, noise_spectrum size: {noise_spectrum.size()}" + ) + + dft_len_ws = spectrum.size()[-1] + + dftBuf = torch.zeros(dft_len_ws, device=device) + + dftBuf[:measure_len_ws] = samples * spectrum_window[:measure_len_ws] + + # lsx_safe_rdft((int)p->dft_len_ws, 1, c->dftBuf); + _dftBuf = torch.fft.rfft(dftBuf) + + mult: float = boot_count / (1.0 + boot_count) if boot_count >= 0 else measure_smooth_time_mult + + _d = _dftBuf[spectrum_start:spectrum_end].abs() + spectrum[spectrum_start:spectrum_end].mul_(mult).add_(_d * (1 - mult)) + _d = spectrum[spectrum_start:spectrum_end] ** 2 + + _zeros = torch.zeros(spectrum_end - spectrum_start, device=device) + _mult = ( + _zeros + if boot_count >= 0 + else torch.where( + _d > noise_spectrum[spectrum_start:spectrum_end], + noise_up_time_mult, # if + noise_down_time_mult, # else, + ) + ) + + noise_spectrum[spectrum_start:spectrum_end].mul_(_mult).add_(_d * (1 - _mult)) + _d = torch.sqrt( + torch.max( + _zeros, + _d - noise_reduction_amount * noise_spectrum[spectrum_start:spectrum_end], + ), + ) + + _cepstrum_Buf: Tensor = torch.zeros(dft_len_ws >> 1, device=device) + _cepstrum_Buf[spectrum_start:spectrum_end] = _d * cepstrum_window + _cepstrum_Buf[spectrum_end : dft_len_ws >> 1].zero_() + + # lsx_safe_rdft((int)p->dft_len_ws >> 1, 1, c->dftBuf); + _cepstrum_Buf = torch.fft.rfft(_cepstrum_Buf) + + result: float = float(torch.sum(_cepstrum_Buf[cepstrum_start:cepstrum_end].abs().pow(2))) + result = math.log(result / (cepstrum_end - cepstrum_start)) if result > 0 else -math.inf + return max(0, 21 + result) + + +def vad( + waveform: Tensor, + sample_rate: int, + trigger_level: float = 7.0, + trigger_time: float = 0.25, + search_time: float = 1.0, + allowed_gap: float = 0.25, + pre_trigger_time: float = 0.0, + # Fine-tuning parameters + boot_time: float = 0.35, + noise_up_time: float = 0.1, + noise_down_time: float = 0.01, + noise_reduction_amount: float = 1.35, + measure_freq: float = 20.0, + measure_duration: Optional[float] = None, + measure_smooth_time: float = 0.4, + hp_filter_freq: float = 50.0, + lp_filter_freq: float = 6000.0, + hp_lifter_freq: float = 150.0, + lp_lifter_freq: float = 2000.0, +) -> Tensor: + r"""Voice Activity Detector. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Attempts to trim silence and quiet background sounds from the ends of recordings of speech. + The algorithm currently uses a simple cepstral power measurement to detect voice, + so may be fooled by other things, especially music. + + The effect can trim only from the front of the audio, + so in order to trim from the back, the reverse effect must also be used. + + Args: + waveform (Tensor): Tensor of audio of dimension `(channels, time)` or `(time)` + Tensor of shape `(channels, time)` is treated as a multi-channel recording + of the same event and the resulting output will be trimmed to the earliest + voice activity in any channel. + sample_rate (int): Sample rate of audio signal. + trigger_level (float, optional): The measurement level used to trigger activity detection. + This may need to be cahnged depending on the noise level, signal level, + and other characteristics of the input audio. (Default: 7.0) + trigger_time (float, optional): The time constant (in seconds) + used to help ignore short bursts of sound. (Default: 0.25) + search_time (float, optional): The amount of audio (in seconds) + to search for quieter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 1.0) + allowed_gap (float, optional): The allowed gap (in seconds) between + quieter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 0.25) + pre_trigger_time (float, optional): The amount of audio (in seconds) to preserve + before the trigger point and any found quieter/shorter bursts. (Default: 0.0) + boot_time (float, optional) The algorithm (internally) uses adaptive noise + estimation/reduction in order to detect the start of the wanted audio. + This option sets the time for the initial noise estimate. (Default: 0.35) + noise_up_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is increasing. (Default: 0.1) + noise_down_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is decreasing. (Default: 0.01) + noise_reduction_amount (float, optional) Amount of noise reduction to use in + the detection algorithm (e.g. 0, 0.5, ...). (Default: 1.35) + measure_freq (float, optional) Frequency of the algorithm's + processing/measurements. (Default: 20.0) + measure_duration: (float, optional) Measurement duration. + (Default: Twice the measurement period; i.e. with overlap.) + measure_smooth_time (float, optional) Time constant used to smooth + spectral measurements. (Default: 0.4) + hp_filter_freq (float, optional) "Brick-wall" frequency of high-pass filter applied + at the input to the detector algorithm. (Default: 50.0) + lp_filter_freq (float, optional) "Brick-wall" frequency of low-pass filter applied + at the input to the detector algorithm. (Default: 6000.0) + hp_lifter_freq (float, optional) "Brick-wall" frequency of high-pass lifter used + in the detector algorithm. (Default: 150.0) + lp_lifter_freq (float, optional) "Brick-wall" frequency of low-pass lifter used + in the detector algorithm. (Default: 2000.0) + + Returns: + Tensor: Tensor of audio of dimension `(..., time)`. + + Reference: + - http://sox.sourceforge.net/sox.html + """ + device = waveform.device + + if waveform.ndim > 2: + warnings.warn( + "Expected input tensor dimension of 1 for single channel" + f" or 2 for multi-channel. Got {waveform.ndim} instead. " + "Batch semantics is not supported. " + "Please refer to https://github.com/pytorch/audio/issues/1348" + " and https://github.com/pytorch/audio/issues/1468." + ) + + measure_duration: float = 2.0 / measure_freq if measure_duration is None else measure_duration + + measure_len_ws = int(sample_rate * measure_duration + 0.5) + measure_len_ns = measure_len_ws + # for (dft_len_ws = 16; dft_len_ws < measure_len_ws; dft_len_ws <<= 1); + dft_len_ws = 16 + while dft_len_ws < measure_len_ws: + dft_len_ws *= 2 + + measure_period_ns = int(sample_rate / measure_freq + 0.5) + measures_len = math.ceil(search_time * measure_freq) + search_pre_trigger_len_ns = measures_len * measure_period_ns + gap_len = int(allowed_gap * measure_freq + 0.5) + + fixed_pre_trigger_len_ns = int(pre_trigger_time * sample_rate + 0.5) + samplesLen_ns = fixed_pre_trigger_len_ns + search_pre_trigger_len_ns + measure_len_ns + + spectrum_window = torch.zeros(measure_len_ws, device=device) + for i in range(measure_len_ws): + # sox.h:741 define SOX_SAMPLE_MIN (sox_sample_t)SOX_INT_MIN(32) + spectrum_window[i] = 2.0 / math.sqrt(float(measure_len_ws)) + # lsx_apply_hann(spectrum_window, (int)measure_len_ws); + spectrum_window *= torch.hann_window(measure_len_ws, device=device, dtype=torch.float) + + spectrum_start: int = int(hp_filter_freq / sample_rate * dft_len_ws + 0.5) + spectrum_start: int = max(spectrum_start, 1) + spectrum_end: int = int(lp_filter_freq / sample_rate * dft_len_ws + 0.5) + spectrum_end: int = min(spectrum_end, dft_len_ws // 2) + + cepstrum_window = torch.zeros(spectrum_end - spectrum_start, device=device) + for i in range(spectrum_end - spectrum_start): + cepstrum_window[i] = 2.0 / math.sqrt(float(spectrum_end) - spectrum_start) + # lsx_apply_hann(cepstrum_window,(int)(spectrum_end - spectrum_start)); + cepstrum_window *= torch.hann_window(spectrum_end - spectrum_start, device=device, dtype=torch.float) + + cepstrum_start = math.ceil(sample_rate * 0.5 / lp_lifter_freq) + cepstrum_end = math.floor(sample_rate * 0.5 / hp_lifter_freq) + cepstrum_end = min(cepstrum_end, dft_len_ws // 4) + + if cepstrum_end <= cepstrum_start: + raise ValueError( + "Expected cepstrum_start to be smaller than cepstrum_end." + f"Found: cepstrum_start: {cepstrum_start}, cepstrum_end: {cepstrum_end}." + ) + + noise_up_time_mult = torch.tensor(math.exp(-1.0 / (noise_up_time * measure_freq)), device=device) + noise_down_time_mult = torch.tensor(math.exp(-1.0 / (noise_down_time * measure_freq)), device=device) + measure_smooth_time_mult = math.exp(-1.0 / (measure_smooth_time * measure_freq)) + trigger_meas_time_mult = math.exp(-1.0 / (trigger_time * measure_freq)) + + boot_count_max = int(boot_time * measure_freq - 0.5) + boot_count = measures_index = flushedLen_ns = 0 + + # pack batch + shape = waveform.size() + waveform = waveform.view(-1, shape[-1]) + + n_channels, ilen = waveform.size() + + mean_meas = torch.zeros(n_channels, device=device) + spectrum = torch.zeros(n_channels, dft_len_ws, device=device) + noise_spectrum = torch.zeros(n_channels, dft_len_ws, device=device) + measures = torch.zeros(n_channels, measures_len, device=device) + + has_triggered: bool = False + num_measures_to_flush: int = 0 + + pos = 0 + for pos in range(measure_len_ns, ilen, measure_period_ns): + for i in range(n_channels): + meas: float = _measure( + measure_len_ws=measure_len_ws, + samples=waveform[i, pos - measure_len_ws : pos], + spectrum=spectrum[i], + noise_spectrum=noise_spectrum[i], + spectrum_window=spectrum_window, + spectrum_start=spectrum_start, + spectrum_end=spectrum_end, + cepstrum_window=cepstrum_window, + cepstrum_start=cepstrum_start, + cepstrum_end=cepstrum_end, + noise_reduction_amount=noise_reduction_amount, + measure_smooth_time_mult=measure_smooth_time_mult, + noise_up_time_mult=noise_up_time_mult, + noise_down_time_mult=noise_down_time_mult, + boot_count=boot_count, + ) + measures[i, measures_index] = meas + mean_meas[i] = mean_meas[i] * trigger_meas_time_mult + meas * (1.0 - trigger_meas_time_mult) + + has_triggered = has_triggered or (mean_meas[i] >= trigger_level) + if has_triggered: + n: int = measures_len + k: int = measures_index + jTrigger: int = n + jZero: int = n + j: int = 0 + + for j in range(n): + if (measures[i, k] >= trigger_level) and (j <= jTrigger + gap_len): + jZero = jTrigger = j + elif (measures[i, k] == 0) and (jTrigger >= jZero): + jZero = j + k = (k + n - 1) % n + j = min(j, jZero) + # num_measures_to_flush = range_limit(j, num_measures_to_flush, n); + num_measures_to_flush = min(max(num_measures_to_flush, j), n) + # end if has_triggered + # end for channel + measures_index += 1 + measures_index = measures_index % measures_len + if boot_count >= 0: + boot_count = -1 if boot_count == boot_count_max else boot_count + 1 + + if has_triggered: + flushedLen_ns = (measures_len - num_measures_to_flush) * measure_period_ns + break + # end for window + if not has_triggered: + return waveform[..., :0].view(shape[:-1] + torch.Size([0])) + + res = waveform[:, max(pos - samplesLen_ns + flushedLen_ns, 0) :] + # unpack batch + return res.view(shape[:-1] + res.shape[-1:]) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/functional.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/functional.py new file mode 100644 index 0000000000000000000000000000000000000000..2f7551662be4c13e415b7f23e2e8fbcee6d0c5e9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/functional/functional.py @@ -0,0 +1,2535 @@ +# -*- coding: utf-8 -*- + +import math +import tempfile +import warnings +from collections.abc import Sequence +from typing import List, Optional, Tuple, Union + +import torch +import torchaudio +from torch import Tensor +from torchaudio._internal.module_utils import deprecated + +from .filtering import highpass_biquad, treble_biquad + +__all__ = [ + "spectrogram", + "inverse_spectrogram", + "griffinlim", + "amplitude_to_DB", + "DB_to_amplitude", + "compute_deltas", + "melscale_fbanks", + "linear_fbanks", + "create_dct", + "compute_deltas", + "detect_pitch_frequency", + "DB_to_amplitude", + "mu_law_encoding", + "mu_law_decoding", + "phase_vocoder", + "mask_along_axis", + "mask_along_axis_iid", + "sliding_window_cmn", + "spectral_centroid", + "apply_codec", + "resample", + "edit_distance", + "loudness", + "pitch_shift", + "rnnt_loss", + "psd", + "mvdr_weights_souden", + "mvdr_weights_rtf", + "rtf_evd", + "rtf_power", + "apply_beamforming", + "fftconvolve", + "convolve", + "add_noise", + "speed", + "preemphasis", + "deemphasis", +] + + +def spectrogram( + waveform: Tensor, + pad: int, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, + power: Optional[float], + normalized: Union[bool, str], + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, + return_complex: Optional[bool] = None, +) -> Tensor: + r"""Create a spectrogram or a batch of spectrograms from a raw audio signal. + The spectrogram can be either magnitude-only or complex. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)` + pad (int): Two sided padding of signal + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT + hop_length (int): Length of hop between STFT windows + win_length (int): Window size + power (float or None): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. + If None, then the complex spectrum is returned instead. + normalized (bool or str): Whether to normalize by magnitude after stft. If input is str, choices are + ``"window"`` and ``"frame_length"``, if specific normalization type is desirable. ``True`` maps to + ``"window"``. When normalized on ``"window"``, waveform is normalized upon the window's L2 energy. If + normalized on ``"frame_length"``, waveform is normalized by dividing by + :math:`(\text{frame\_length})^{0.5}`. + center (bool, optional): whether to pad :attr:`waveform` on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + Default: ``True`` + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. Default: ``"reflect"`` + onesided (bool, optional): controls whether to return half of results to + avoid redundancy. Default: ``True`` + return_complex (bool, optional): + Deprecated and not used. + + Returns: + Tensor: Dimension `(..., freq, time)`, freq is + ``n_fft // 2 + 1`` and ``n_fft`` is the number of + Fourier bins, and time is the number of window hops (n_frame). + """ + if return_complex is not None: + warnings.warn( + "`return_complex` argument is now deprecated and is not effective." + "`torchaudio.functional.spectrogram(power=None)` always returns a tensor with " + "complex dtype. Please remove the argument in the function call." + ) + + if pad > 0: + # TODO add "with torch.no_grad():" back when JIT supports it + waveform = torch.nn.functional.pad(waveform, (pad, pad), "constant") + + frame_length_norm, window_norm = _get_spec_norms(normalized) + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, shape[-1]) + + # default values are consistent with librosa.core.spectrum._spectrogram + spec_f = torch.stft( + input=waveform, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=center, + pad_mode=pad_mode, + normalized=frame_length_norm, + onesided=onesided, + return_complex=True, + ) + + # unpack batch + spec_f = spec_f.reshape(shape[:-1] + spec_f.shape[-2:]) + + if window_norm: + spec_f /= window.pow(2.0).sum().sqrt() + if power is not None: + if power == 1.0: + return spec_f.abs() + return spec_f.abs().pow(power) + return spec_f + + +def inverse_spectrogram( + spectrogram: Tensor, + length: Optional[int], + pad: int, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, + normalized: Union[bool, str], + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, +) -> Tensor: + r"""Create an inverse spectrogram or a batch of inverse spectrograms from the provided + complex-valued spectrogram. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + spectrogram (Tensor): Complex tensor of audio of dimension (..., freq, time). + length (int or None): The output length of the waveform. + pad (int): Two sided padding of signal. It is only effective when ``length`` is provided. + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT + hop_length (int): Length of hop between STFT windows + win_length (int): Window size + normalized (bool or str): Whether the stft output was normalized by magnitude. If input is str, choices are + ``"window"`` and ``"frame_length"``, dependent on normalization mode. ``True`` maps to + ``"window"``. + center (bool, optional): whether the waveform was padded on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + Default: ``True`` + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. This parameter is provided for compatibility with the + spectrogram function and is not used. Default: ``"reflect"`` + onesided (bool, optional): controls whether spectrogram was done in onesided mode. + Default: ``True`` + + Returns: + Tensor: Dimension `(..., time)`. Least squares estimation of the original signal. + """ + + frame_length_norm, window_norm = _get_spec_norms(normalized) + + if not spectrogram.is_complex(): + raise ValueError("Expected `spectrogram` to be complex dtype.") + + if window_norm: + spectrogram = spectrogram * window.pow(2.0).sum().sqrt() + + # pack batch + shape = spectrogram.size() + spectrogram = spectrogram.reshape(-1, shape[-2], shape[-1]) + + # default values are consistent with librosa.core.spectrum._spectrogram + waveform = torch.istft( + input=spectrogram, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=center, + normalized=frame_length_norm, + onesided=onesided, + length=length + 2 * pad if length is not None else None, + return_complex=False, + ) + + if length is not None and pad > 0: + # remove padding from front and back + waveform = waveform[:, pad:-pad] + + # unpack batch + waveform = waveform.reshape(shape[:-2] + waveform.shape[-1:]) + + return waveform + + +def _get_spec_norms(normalized: Union[str, bool]): + frame_length_norm, window_norm = False, False + if torch.jit.isinstance(normalized, str): + if normalized not in ["frame_length", "window"]: + raise ValueError("Invalid normalized parameter: {}".format(normalized)) + if normalized == "frame_length": + frame_length_norm = True + elif normalized == "window": + window_norm = True + elif torch.jit.isinstance(normalized, bool): + if normalized: + window_norm = True + else: + raise TypeError("Input type not supported") + return frame_length_norm, window_norm + + +def _get_complex_dtype(real_dtype: torch.dtype): + if real_dtype == torch.double: + return torch.cdouble + if real_dtype == torch.float: + return torch.cfloat + if real_dtype == torch.half: + return torch.complex32 + raise ValueError(f"Unexpected dtype {real_dtype}") + + +def griffinlim( + specgram: Tensor, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, + power: float, + n_iter: int, + momentum: float, + length: Optional[int], + rand_init: bool, +) -> Tensor: + r"""Compute waveform from a linear scale magnitude spectrogram using the Griffin-Lim transformation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Implementation ported from + *librosa* :cite:`brian_mcfee-proc-scipy-2015`, *A fast Griffin-Lim algorithm* :cite:`6701851` + and *Signal estimation from modified short-time Fourier transform* :cite:`1172092`. + + Args: + specgram (Tensor): A magnitude-only STFT spectrogram of dimension `(..., freq, frames)` + where freq is ``n_fft // 2 + 1``. + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT, creates ``n_fft // 2 + 1`` bins + hop_length (int): Length of hop between STFT windows. ( + Default: ``win_length // 2``) + win_length (int): Window size. (Default: ``n_fft``) + power (float): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. + n_iter (int): Number of iteration for phase recovery process. + momentum (float): The momentum parameter for fast Griffin-Lim. + Setting this to 0 recovers the original Griffin-Lim method. + Values near 1 can lead to faster convergence, but above 1 may not converge. + length (int or None): Array length of the expected output. + rand_init (bool): Initializes phase randomly if True, to zero otherwise. + + Returns: + Tensor: waveform of `(..., time)`, where time equals the ``length`` parameter if given. + """ + if not 0 <= momentum < 1: + raise ValueError("momentum must be in range [0, 1). Found: {}".format(momentum)) + + momentum = momentum / (1 + momentum) + + # pack batch + shape = specgram.size() + specgram = specgram.reshape([-1] + list(shape[-2:])) + + specgram = specgram.pow(1 / power) + + # initialize the phase + if rand_init: + angles = torch.rand(specgram.size(), dtype=_get_complex_dtype(specgram.dtype), device=specgram.device) + else: + angles = torch.full(specgram.size(), 1, dtype=_get_complex_dtype(specgram.dtype), device=specgram.device) + + # And initialize the previous iterate to 0 + tprev = torch.tensor(0.0, dtype=specgram.dtype, device=specgram.device) + for _ in range(n_iter): + # Invert with our current estimate of the phases + inverse = torch.istft( + specgram * angles, n_fft=n_fft, hop_length=hop_length, win_length=win_length, window=window, length=length + ) + + # Rebuild the spectrogram + rebuilt = torch.stft( + input=inverse, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=True, + pad_mode="reflect", + normalized=False, + onesided=True, + return_complex=True, + ) + + # Update our phase estimates + angles = rebuilt + if momentum: + angles = angles - tprev.mul_(momentum) + angles = angles.div(angles.abs().add(1e-16)) + + # Store the previous iterate + tprev = rebuilt + + # Return the final phase estimates + waveform = torch.istft( + specgram * angles, n_fft=n_fft, hop_length=hop_length, win_length=win_length, window=window, length=length + ) + + # unpack batch + waveform = waveform.reshape(shape[:-2] + waveform.shape[-1:]) + + return waveform + + +def amplitude_to_DB( + x: Tensor, multiplier: float, amin: float, db_multiplier: float, top_db: Optional[float] = None +) -> Tensor: + r"""Turn a spectrogram from the power/amplitude scale to the decibel scale. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The output of each tensor in a batch depends on the maximum value of that tensor, + and so may return different values for an audio clip split into snippets vs. a full clip. + + Args: + + x (Tensor): Input spectrogram(s) before being converted to decibel scale. + The expected shapes are ``(freq, time)``, ``(channel, freq, time)`` or + ``(..., batch, channel, freq, time)``. + + .. note:: + + When ``top_db`` is specified, cut-off values are computed for each audio + in the batch. Therefore if the input shape is 4D (or larger), different + cut-off values are used for audio data in the batch. + If the input shape is 2D or 3D, a single cutoff value is used. + + multiplier (float): Use 10. for power and 20. for amplitude + amin (float): Number to clamp ``x`` + db_multiplier (float): Log10(max(reference value and amin)) + top_db (float or None, optional): Minimum negative cut-off in decibels. A reasonable number + is 80. (Default: ``None``) + + Returns: + Tensor: Output tensor in decibel scale + """ + x_db = multiplier * torch.log10(torch.clamp(x, min=amin)) + x_db -= multiplier * db_multiplier + + if top_db is not None: + # Expand batch + shape = x_db.size() + packed_channels = shape[-3] if x_db.dim() > 2 else 1 + x_db = x_db.reshape(-1, packed_channels, shape[-2], shape[-1]) + + x_db = torch.max(x_db, (x_db.amax(dim=(-3, -2, -1)) - top_db).view(-1, 1, 1, 1)) + + # Repack batch + x_db = x_db.reshape(shape) + + return x_db + + +def DB_to_amplitude(x: Tensor, ref: float, power: float) -> Tensor: + r"""Turn a tensor from the decibel scale to the power/amplitude scale. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + x (Tensor): Input tensor before being converted to power/amplitude scale. + ref (float): Reference which the output will be scaled by. + power (float): If power equals 1, will compute DB to power. If 0.5, will compute DB to amplitude. + + Returns: + Tensor: Output tensor in power/amplitude scale. + """ + return ref * torch.pow(torch.pow(10.0, 0.1 * x), power) + + +def _hz_to_mel(freq: float, mel_scale: str = "htk") -> float: + r"""Convert Hz to Mels. + + Args: + freqs (float): Frequencies in Hz + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Returns: + mels (float): Frequency in Mels + """ + + if mel_scale not in ["slaney", "htk"]: + raise ValueError('mel_scale should be one of "htk" or "slaney".') + + if mel_scale == "htk": + return 2595.0 * math.log10(1.0 + (freq / 700.0)) + + # Fill in the linear part + f_min = 0.0 + f_sp = 200.0 / 3 + + mels = (freq - f_min) / f_sp + + # Fill in the log-scale part + min_log_hz = 1000.0 + min_log_mel = (min_log_hz - f_min) / f_sp + logstep = math.log(6.4) / 27.0 + + if freq >= min_log_hz: + mels = min_log_mel + math.log(freq / min_log_hz) / logstep + + return mels + + +def _mel_to_hz(mels: Tensor, mel_scale: str = "htk") -> Tensor: + """Convert mel bin numbers to frequencies. + + Args: + mels (Tensor): Mel frequencies + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Returns: + freqs (Tensor): Mels converted in Hz + """ + + if mel_scale not in ["slaney", "htk"]: + raise ValueError('mel_scale should be one of "htk" or "slaney".') + + if mel_scale == "htk": + return 700.0 * (10.0 ** (mels / 2595.0) - 1.0) + + # Fill in the linear scale + f_min = 0.0 + f_sp = 200.0 / 3 + freqs = f_min + f_sp * mels + + # And now the nonlinear scale + min_log_hz = 1000.0 + min_log_mel = (min_log_hz - f_min) / f_sp + logstep = math.log(6.4) / 27.0 + + log_t = mels >= min_log_mel + freqs[log_t] = min_log_hz * torch.exp(logstep * (mels[log_t] - min_log_mel)) + + return freqs + + +def _create_triangular_filterbank( + all_freqs: Tensor, + f_pts: Tensor, +) -> Tensor: + """Create a triangular filter bank. + + Args: + all_freqs (Tensor): STFT freq points of size (`n_freqs`). + f_pts (Tensor): Filter mid points of size (`n_filter`). + + Returns: + fb (Tensor): The filter bank of size (`n_freqs`, `n_filter`). + """ + # Adopted from Librosa + # calculate the difference between each filter mid point and each stft freq point in hertz + f_diff = f_pts[1:] - f_pts[:-1] # (n_filter + 1) + slopes = f_pts.unsqueeze(0) - all_freqs.unsqueeze(1) # (n_freqs, n_filter + 2) + # create overlapping triangles + zero = torch.zeros(1) + down_slopes = (-1.0 * slopes[:, :-2]) / f_diff[:-1] # (n_freqs, n_filter) + up_slopes = slopes[:, 2:] / f_diff[1:] # (n_freqs, n_filter) + fb = torch.max(zero, torch.min(down_slopes, up_slopes)) + + return fb + + +def melscale_fbanks( + n_freqs: int, + f_min: float, + f_max: float, + n_mels: int, + sample_rate: int, + norm: Optional[str] = None, + mel_scale: str = "htk", +) -> Tensor: + r"""Create a frequency bin conversion matrix. + + .. devices:: CPU + + .. properties:: TorchScript + + Note: + For the sake of the numerical compatibility with librosa, not all the coefficients + in the resulting filter bank has magnitude of 1. + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/mel_fbanks.png + :alt: Visualization of generated filter bank + + Args: + n_freqs (int): Number of frequencies to highlight/apply + f_min (float): Minimum frequency (Hz) + f_max (float): Maximum frequency (Hz) + n_mels (int): Number of mel filterbanks + sample_rate (int): Sample rate of the audio waveform + norm (str or None, optional): If "slaney", divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Returns: + Tensor: Triangular filter banks (fb matrix) of size (``n_freqs``, ``n_mels``) + meaning number of frequencies to highlight/apply to x the number of filterbanks. + Each column is a filterbank so that assuming there is a matrix A of + size (..., ``n_freqs``), the applied result would be + ``A @ melscale_fbanks(A.size(-1), ...)``. + + """ + + if norm is not None and norm != "slaney": + raise ValueError('norm must be one of None or "slaney"') + + # freq bins + all_freqs = torch.linspace(0, sample_rate // 2, n_freqs) + + # calculate mel freq bins + m_min = _hz_to_mel(f_min, mel_scale=mel_scale) + m_max = _hz_to_mel(f_max, mel_scale=mel_scale) + + m_pts = torch.linspace(m_min, m_max, n_mels + 2) + f_pts = _mel_to_hz(m_pts, mel_scale=mel_scale) + + # create filterbank + fb = _create_triangular_filterbank(all_freqs, f_pts) + + if norm is not None and norm == "slaney": + # Slaney-style mel is scaled to be approx constant energy per channel + enorm = 2.0 / (f_pts[2 : n_mels + 2] - f_pts[:n_mels]) + fb *= enorm.unsqueeze(0) + + if (fb.max(dim=0).values == 0.0).any(): + warnings.warn( + "At least one mel filterbank has all zero values. " + f"The value for `n_mels` ({n_mels}) may be set too high. " + f"Or, the value for `n_freqs` ({n_freqs}) may be set too low." + ) + + return fb + + +def linear_fbanks( + n_freqs: int, + f_min: float, + f_max: float, + n_filter: int, + sample_rate: int, +) -> Tensor: + r"""Creates a linear triangular filterbank. + + .. devices:: CPU + + .. properties:: TorchScript + + Note: + For the sake of the numerical compatibility with librosa, not all the coefficients + in the resulting filter bank has magnitude of 1. + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/lin_fbanks.png + :alt: Visualization of generated filter bank + + Args: + n_freqs (int): Number of frequencies to highlight/apply + f_min (float): Minimum frequency (Hz) + f_max (float): Maximum frequency (Hz) + n_filter (int): Number of (linear) triangular filter + sample_rate (int): Sample rate of the audio waveform + + Returns: + Tensor: Triangular filter banks (fb matrix) of size (``n_freqs``, ``n_filter``) + meaning number of frequencies to highlight/apply to x the number of filterbanks. + Each column is a filterbank so that assuming there is a matrix A of + size (..., ``n_freqs``), the applied result would be + ``A * linear_fbanks(A.size(-1), ...)``. + """ + # freq bins + all_freqs = torch.linspace(0, sample_rate // 2, n_freqs) + + # filter mid-points + f_pts = torch.linspace(f_min, f_max, n_filter + 2) + + # create filterbank + fb = _create_triangular_filterbank(all_freqs, f_pts) + + return fb + + +def create_dct(n_mfcc: int, n_mels: int, norm: Optional[str]) -> Tensor: + r"""Create a DCT transformation matrix with shape (``n_mels``, ``n_mfcc``), + normalized depending on norm. + + .. devices:: CPU + + .. properties:: TorchScript + + Args: + n_mfcc (int): Number of mfc coefficients to retain + n_mels (int): Number of mel filterbanks + norm (str or None): Norm to use (either "ortho" or None) + + Returns: + Tensor: The transformation matrix, to be right-multiplied to + row-wise data of size (``n_mels``, ``n_mfcc``). + """ + + if norm is not None and norm != "ortho": + raise ValueError('norm must be either "ortho" or None') + + # http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II + n = torch.arange(float(n_mels)) + k = torch.arange(float(n_mfcc)).unsqueeze(1) + dct = torch.cos(math.pi / float(n_mels) * (n + 0.5) * k) # size (n_mfcc, n_mels) + + if norm is None: + dct *= 2.0 + else: + dct[0] *= 1.0 / math.sqrt(2.0) + dct *= math.sqrt(2.0 / float(n_mels)) + return dct.t() + + +def mu_law_encoding(x: Tensor, quantization_channels: int) -> Tensor: + r"""Encode signal based on mu-law companding. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This algorithm expects the signal has been scaled to between -1 and 1 and + returns a signal encoded with values from 0 to quantization_channels - 1. + + Args: + x (Tensor): Input tensor + quantization_channels (int): Number of channels + + Returns: + Tensor: Input after mu-law encoding + """ + mu = quantization_channels - 1.0 + if not x.is_floating_point(): + warnings.warn( + "The input Tensor must be of floating type. \ + This will be an error in the v0.12 release." + ) + x = x.to(torch.float) + mu = torch.tensor(mu, dtype=x.dtype) + x_mu = torch.sign(x) * torch.log1p(mu * torch.abs(x)) / torch.log1p(mu) + x_mu = ((x_mu + 1) / 2 * mu + 0.5).to(torch.int64) + return x_mu + + +def mu_law_decoding(x_mu: Tensor, quantization_channels: int) -> Tensor: + r"""Decode mu-law encoded signal. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This expects an input with values between 0 and quantization_channels - 1 + and returns a signal scaled between -1 and 1. + + Args: + x_mu (Tensor): Input tensor + quantization_channels (int): Number of channels + + Returns: + Tensor: Input after mu-law decoding + """ + mu = quantization_channels - 1.0 + if not x_mu.is_floating_point(): + x_mu = x_mu.to(torch.float) + mu = torch.tensor(mu, dtype=x_mu.dtype) + x = ((x_mu) / mu) * 2 - 1.0 + x = torch.sign(x) * (torch.exp(torch.abs(x) * torch.log1p(mu)) - 1.0) / mu + return x + + +def phase_vocoder(complex_specgrams: Tensor, rate: float, phase_advance: Tensor) -> Tensor: + r"""Given a STFT tensor, speed up in time without modifying pitch by a factor of ``rate``. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + complex_specgrams (Tensor): + A tensor of dimension `(..., freq, num_frame)` with complex dtype. + rate (float): Speed-up factor + phase_advance (Tensor): Expected phase advance in each bin. Dimension of `(freq, 1)` + + Returns: + Tensor: + Stretched spectrogram. The resulting tensor is of the same dtype as the input + spectrogram, but the number of frames is changed to ``ceil(num_frame / rate)``. + + Example + >>> freq, hop_length = 1025, 512 + >>> # (channel, freq, time) + >>> complex_specgrams = torch.randn(2, freq, 300, dtype=torch.cfloat) + >>> rate = 1.3 # Speed up by 30% + >>> phase_advance = torch.linspace( + >>> 0, math.pi * hop_length, freq)[..., None] + >>> x = phase_vocoder(complex_specgrams, rate, phase_advance) + >>> x.shape # with 231 == ceil(300 / 1.3) + torch.Size([2, 1025, 231]) + """ + if rate == 1.0: + return complex_specgrams + + # pack batch + shape = complex_specgrams.size() + complex_specgrams = complex_specgrams.reshape([-1] + list(shape[-2:])) + + # Figures out the corresponding real dtype, i.e. complex128 -> float64, complex64 -> float32 + # Note torch.real is a view so it does not incur any memory copy. + real_dtype = torch.real(complex_specgrams).dtype + time_steps = torch.arange(0, complex_specgrams.size(-1), rate, device=complex_specgrams.device, dtype=real_dtype) + + alphas = time_steps % 1.0 + phase_0 = complex_specgrams[..., :1].angle() + + # Time Padding + complex_specgrams = torch.nn.functional.pad(complex_specgrams, [0, 2]) + + # (new_bins, freq, 2) + complex_specgrams_0 = complex_specgrams.index_select(-1, time_steps.long()) + complex_specgrams_1 = complex_specgrams.index_select(-1, (time_steps + 1).long()) + + angle_0 = complex_specgrams_0.angle() + angle_1 = complex_specgrams_1.angle() + + norm_0 = complex_specgrams_0.abs() + norm_1 = complex_specgrams_1.abs() + + phase = angle_1 - angle_0 - phase_advance + phase = phase - 2 * math.pi * torch.round(phase / (2 * math.pi)) + + # Compute Phase Accum + phase = phase + phase_advance + phase = torch.cat([phase_0, phase[..., :-1]], dim=-1) + phase_acc = torch.cumsum(phase, -1) + + mag = alphas * norm_1 + (1 - alphas) * norm_0 + + complex_specgrams_stretch = torch.polar(mag, phase_acc) + + # unpack batch + complex_specgrams_stretch = complex_specgrams_stretch.reshape(shape[:-2] + complex_specgrams_stretch.shape[1:]) + return complex_specgrams_stretch + + +def _get_mask_param(mask_param: int, p: float, axis_length: int) -> int: + if p == 1.0: + return mask_param + else: + return min(mask_param, int(axis_length * p)) + + +def mask_along_axis_iid( + specgrams: Tensor, + mask_param: int, + mask_value: float, + axis: int, + p: float = 1.0, +) -> Tensor: + r"""Apply a mask along ``axis``. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Mask will be applied from indices ``[v_0, v_0 + v)``, + where ``v`` is sampled from ``uniform(0, max_v)`` and + ``v_0`` from ``uniform(0, specgrams.size(axis) - v)``, + with ``max_v = mask_param`` when ``p = 1.0`` and + ``max_v = min(mask_param, floor(specgrams.size(axis) * p))`` otherwise. + + Args: + specgrams (Tensor): Real spectrograms `(..., freq, time)`, with at least 3 dimensions. + mask_param (int): Number of columns to be masked will be uniformly sampled from [0, mask_param] + mask_value (float): Value to assign to the masked columns + axis (int): Axis to apply masking on, which should be the one of the last two dimensions. + p (float, optional): maximum proportion of columns that can be masked. (Default: 1.0) + + Returns: + Tensor: Masked spectrograms with the same dimensions as input specgrams Tensor` + """ + + dim = specgrams.dim() + + if dim < 3: + raise ValueError(f"Spectrogram must have at least three dimensions ({dim} given).") + + if axis not in [dim - 2, dim - 1]: + raise ValueError( + f"Only Frequency and Time masking are supported (axis {dim-2} and axis {dim-1} supported; {axis} given)." + ) + + if not 0.0 <= p <= 1.0: + raise ValueError(f"The value of p must be between 0.0 and 1.0 ({p} given).") + + mask_param = _get_mask_param(mask_param, p, specgrams.shape[axis]) + if mask_param < 1: + return specgrams + + device = specgrams.device + dtype = specgrams.dtype + + value = torch.rand(specgrams.shape[: (dim - 2)], device=device, dtype=dtype) * mask_param + min_value = torch.rand(specgrams.shape[: (dim - 2)], device=device, dtype=dtype) * (specgrams.size(axis) - value) + + # Create broadcastable mask + mask_start = min_value.long()[..., None, None] + mask_end = (min_value.long() + value.long())[..., None, None] + mask = torch.arange(0, specgrams.size(axis), device=device, dtype=dtype) + + # Per batch example masking + specgrams = specgrams.transpose(axis, -1) + specgrams = specgrams.masked_fill((mask >= mask_start) & (mask < mask_end), mask_value) + specgrams = specgrams.transpose(axis, -1) + + return specgrams + + +def mask_along_axis( + specgram: Tensor, + mask_param: int, + mask_value: float, + axis: int, + p: float = 1.0, +) -> Tensor: + r"""Apply a mask along ``axis``. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Mask will be applied from indices ``[v_0, v_0 + v)``, + where ``v`` is sampled from ``uniform(0, max_v)`` and + ``v_0`` from ``uniform(0, specgram.size(axis) - v)``, with + ``max_v = mask_param`` when ``p = 1.0`` and + ``max_v = min(mask_param, floor(specgram.size(axis) * p))`` + otherwise. + All examples will have the same mask interval. + + Args: + specgram (Tensor): Real spectrograms `(..., freq, time)`, with at least 2 dimensions. + mask_param (int): Number of columns to be masked will be uniformly sampled from [0, mask_param] + mask_value (float): Value to assign to the masked columns + axis (int): Axis to apply masking on, which should be the one of the last two dimensions. + p (float, optional): maximum proportion of columns that can be masked. (Default: 1.0) + + Returns: + Tensor: Masked spectrograms with the same dimensions as input specgram Tensor + """ + dim = specgram.dim() + + if dim < 2: + raise ValueError(f"Spectrogram must have at least two dimensions (time and frequency) ({dim} given).") + + if axis not in [dim - 2, dim - 1]: + raise ValueError( + f"Only Frequency and Time masking are supported (axis {dim-2} and axis {dim-1} supported; {axis} given)." + ) + + if not 0.0 <= p <= 1.0: + raise ValueError(f"The value of p must be between 0.0 and 1.0 ({p} given).") + + mask_param = _get_mask_param(mask_param, p, specgram.shape[axis]) + if mask_param < 1: + return specgram + + # pack batch + shape = specgram.size() + specgram = specgram.reshape([-1] + list(shape[-2:])) + # After packing, specgram is a 3D tensor, and the axis corresponding to the to-be-masked dimension + # is now (axis - dim + 3), e.g. a tensor of shape (10, 2, 50, 10, 2) becomes a tensor of shape (1000, 10, 2). + value = torch.rand(1) * mask_param + min_value = torch.rand(1) * (specgram.size(axis - dim + 3) - value) + + mask_start = (min_value.long()).squeeze() + mask_end = (min_value.long() + value.long()).squeeze() + mask = torch.arange(0, specgram.shape[axis - dim + 3], device=specgram.device, dtype=specgram.dtype) + mask = (mask >= mask_start) & (mask < mask_end) + # unsqueeze the mask if the axis is frequency + if axis == dim - 2: + mask = mask.unsqueeze(-1) + + if mask_end - mask_start >= mask_param: + raise ValueError("Number of columns to be masked should be less than mask_param") + + specgram = specgram.masked_fill(mask, mask_value) + + # unpack batch + specgram = specgram.reshape(shape[:-2] + specgram.shape[-2:]) + + return specgram + + +def compute_deltas(specgram: Tensor, win_length: int = 5, mode: str = "replicate") -> Tensor: + r"""Compute delta coefficients of a tensor, usually a spectrogram: + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + .. math:: + d_t = \frac{\sum_{n=1}^{\text{N}} n (c_{t+n} - c_{t-n})}{2 \sum_{n=1}^{\text{N}} n^2} + + where :math:`d_t` is the deltas at time :math:`t`, + :math:`c_t` is the spectrogram coeffcients at time :math:`t`, + :math:`N` is ``(win_length-1)//2``. + + Args: + specgram (Tensor): Tensor of audio of dimension `(..., freq, time)` + win_length (int, optional): The window length used for computing delta (Default: ``5``) + mode (str, optional): Mode parameter passed to padding (Default: ``"replicate"``) + + Returns: + Tensor: Tensor of deltas of dimension `(..., freq, time)` + + Example + >>> specgram = torch.randn(1, 40, 1000) + >>> delta = compute_deltas(specgram) + >>> delta2 = compute_deltas(delta) + """ + device = specgram.device + dtype = specgram.dtype + + # pack batch + shape = specgram.size() + specgram = specgram.reshape(1, -1, shape[-1]) + + if win_length < 3: + raise ValueError(f"Window length should be greater than or equal to 3. Found win_length {win_length}") + + n = (win_length - 1) // 2 + + # twice sum of integer squared + denom = n * (n + 1) * (2 * n + 1) / 3 + + specgram = torch.nn.functional.pad(specgram, (n, n), mode=mode) + + kernel = torch.arange(-n, n + 1, 1, device=device, dtype=dtype).repeat(specgram.shape[1], 1, 1) + + output = torch.nn.functional.conv1d(specgram, kernel, groups=specgram.shape[1]) / denom + + # unpack batch + output = output.reshape(shape) + + return output + + +def _compute_nccf(waveform: Tensor, sample_rate: int, frame_time: float, freq_low: int) -> Tensor: + r""" + Compute Normalized Cross-Correlation Function (NCCF). + + .. math:: + \phi_i(m) = \frac{\sum_{n=b_i}^{b_i + N-1} w(n) w(m+n)}{\sqrt{E(b_i) E(m+b_i)}}, + + where + :math:`\phi_i(m)` is the NCCF at frame :math:`i` with lag :math:`m`, + :math:`w` is the waveform, + :math:`N` is the length of a frame, + :math:`b_i` is the beginning of frame :math:`i`, + :math:`E(j)` is the energy :math:`\sum_{n=j}^{j+N-1} w^2(n)`. + """ + + EPSILON = 10 ** (-9) + + # Number of lags to check + lags = int(math.ceil(sample_rate / freq_low)) + + frame_size = int(math.ceil(sample_rate * frame_time)) + + waveform_length = waveform.size()[-1] + num_of_frames = int(math.ceil(waveform_length / frame_size)) + + p = lags + num_of_frames * frame_size - waveform_length + waveform = torch.nn.functional.pad(waveform, (0, p)) + + # Compute lags + output_lag = [] + for lag in range(1, lags + 1): + s1 = waveform[..., :-lag].unfold(-1, frame_size, frame_size)[..., :num_of_frames, :] + s2 = waveform[..., lag:].unfold(-1, frame_size, frame_size)[..., :num_of_frames, :] + + output_frames = ( + (s1 * s2).sum(-1) + / (EPSILON + torch.linalg.vector_norm(s1, ord=2, dim=-1)).pow(2) + / (EPSILON + torch.linalg.vector_norm(s2, ord=2, dim=-1)).pow(2) + ) + + output_lag.append(output_frames.unsqueeze(-1)) + + nccf = torch.cat(output_lag, -1) + + return nccf + + +def _combine_max(a: Tuple[Tensor, Tensor], b: Tuple[Tensor, Tensor], thresh: float = 0.99) -> Tuple[Tensor, Tensor]: + """ + Take value from first if bigger than a multiplicative factor of the second, elementwise. + """ + mask = a[0] > thresh * b[0] + values = mask * a[0] + ~mask * b[0] + indices = mask * a[1] + ~mask * b[1] + return values, indices + + +def _find_max_per_frame(nccf: Tensor, sample_rate: int, freq_high: int) -> Tensor: + r""" + For each frame, take the highest value of NCCF, + apply centered median smoothing, and convert to frequency. + + Note: If the max among all the lags is very close + to the first half of lags, then the latter is taken. + """ + + lag_min = int(math.ceil(sample_rate / freq_high)) + + # Find near enough max that is smallest + + best = torch.max(nccf[..., lag_min:], -1) + + half_size = nccf.shape[-1] // 2 + half = torch.max(nccf[..., lag_min:half_size], -1) + + best = _combine_max(half, best) + indices = best[1] + + # Add back minimal lag + indices += lag_min + # Add 1 empirical calibration offset + indices += 1 + + return indices + + +def _median_smoothing(indices: Tensor, win_length: int) -> Tensor: + r""" + Apply median smoothing to the 1D tensor over the given window. + """ + + # Centered windowed + pad_length = (win_length - 1) // 2 + + # "replicate" padding in any dimension + indices = torch.nn.functional.pad(indices, (pad_length, 0), mode="constant", value=0.0) + + indices[..., :pad_length] = torch.cat(pad_length * [indices[..., pad_length].unsqueeze(-1)], dim=-1) + roll = indices.unfold(-1, win_length, 1) + + values, _ = torch.median(roll, -1) + return values + + +def detect_pitch_frequency( + waveform: Tensor, + sample_rate: int, + frame_time: float = 10 ** (-2), + win_length: int = 30, + freq_low: int = 85, + freq_high: int = 3400, +) -> Tensor: + r"""Detect pitch frequency. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + It is implemented using normalized cross-correlation function and median smoothing. + + Args: + waveform (Tensor): Tensor of audio of dimension `(..., freq, time)` + sample_rate (int): The sample rate of the waveform (Hz) + frame_time (float, optional): Duration of a frame (Default: ``10 ** (-2)``). + win_length (int, optional): The window length for median smoothing (in number of frames) (Default: ``30``). + freq_low (int, optional): Lowest frequency that can be detected (Hz) (Default: ``85``). + freq_high (int, optional): Highest frequency that can be detected (Hz) (Default: ``3400``). + + Returns: + Tensor: Tensor of freq of dimension `(..., frame)` + """ + # pack batch + shape = list(waveform.size()) + waveform = waveform.reshape([-1] + shape[-1:]) + + nccf = _compute_nccf(waveform, sample_rate, frame_time, freq_low) + indices = _find_max_per_frame(nccf, sample_rate, freq_high) + indices = _median_smoothing(indices, win_length) + + # Convert indices to frequency + EPSILON = 10 ** (-9) + freq = sample_rate / (EPSILON + indices.to(torch.float)) + + # unpack batch + freq = freq.reshape(shape[:-1] + list(freq.shape[-1:])) + + return freq + + +def sliding_window_cmn( + specgram: Tensor, + cmn_window: int = 600, + min_cmn_window: int = 100, + center: bool = False, + norm_vars: bool = False, +) -> Tensor: + r""" + Apply sliding-window cepstral mean (and optionally variance) normalization per utterance. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + specgram (Tensor): Tensor of spectrogram of dimension `(..., time, freq)` + cmn_window (int, optional): Window in frames for running average CMN computation (int, default = 600) + min_cmn_window (int, optional): Minimum CMN window used at start of decoding (adds latency only at start). + Only applicable if center == false, ignored if center==true (int, default = 100) + center (bool, optional): If true, use a window centered on the current frame + (to the extent possible, modulo end effects). If false, window is to the left. (bool, default = false) + norm_vars (bool, optional): If true, normalize variance to one. (bool, default = false) + + Returns: + Tensor: Tensor matching input shape `(..., freq, time)` + """ + input_shape = specgram.shape + num_frames, num_feats = input_shape[-2:] + specgram = specgram.view(-1, num_frames, num_feats) + num_channels = specgram.shape[0] + + dtype = specgram.dtype + device = specgram.device + last_window_start = last_window_end = -1 + cur_sum = torch.zeros(num_channels, num_feats, dtype=dtype, device=device) + cur_sumsq = torch.zeros(num_channels, num_feats, dtype=dtype, device=device) + cmn_specgram = torch.zeros(num_channels, num_frames, num_feats, dtype=dtype, device=device) + for t in range(num_frames): + window_start = 0 + window_end = 0 + if center: + window_start = t - cmn_window // 2 + window_end = window_start + cmn_window + else: + window_start = t - cmn_window + window_end = t + 1 + if window_start < 0: + window_end -= window_start + window_start = 0 + if not center: + if window_end > t: + window_end = max(t + 1, min_cmn_window) + if window_end > num_frames: + window_start -= window_end - num_frames + window_end = num_frames + if window_start < 0: + window_start = 0 + if last_window_start == -1: + input_part = specgram[:, window_start : window_end - window_start, :] + cur_sum += torch.sum(input_part, 1) + if norm_vars: + cur_sumsq += torch.cumsum(input_part**2, 1)[:, -1, :] + else: + if window_start > last_window_start: + frame_to_remove = specgram[:, last_window_start, :] + cur_sum -= frame_to_remove + if norm_vars: + cur_sumsq -= frame_to_remove**2 + if window_end > last_window_end: + frame_to_add = specgram[:, last_window_end, :] + cur_sum += frame_to_add + if norm_vars: + cur_sumsq += frame_to_add**2 + window_frames = window_end - window_start + last_window_start = window_start + last_window_end = window_end + cmn_specgram[:, t, :] = specgram[:, t, :] - cur_sum / window_frames + if norm_vars: + if window_frames == 1: + cmn_specgram[:, t, :] = torch.zeros(num_channels, num_feats, dtype=dtype, device=device) + else: + variance = cur_sumsq + variance = variance / window_frames + variance -= (cur_sum**2) / (window_frames**2) + variance = torch.pow(variance, -0.5) + cmn_specgram[:, t, :] *= variance + + cmn_specgram = cmn_specgram.view(input_shape[:-2] + (num_frames, num_feats)) + if len(input_shape) == 2: + cmn_specgram = cmn_specgram.squeeze(0) + return cmn_specgram + + +def spectral_centroid( + waveform: Tensor, + sample_rate: int, + pad: int, + window: Tensor, + n_fft: int, + hop_length: int, + win_length: int, +) -> Tensor: + r"""Compute the spectral centroid for each channel along the time axis. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The spectral centroid is defined as the weighted average of the + frequency values, weighted by their magnitude. + + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)` + sample_rate (int): Sample rate of the audio waveform + pad (int): Two sided padding of signal + window (Tensor): Window tensor that is applied/multiplied to each frame/window + n_fft (int): Size of FFT + hop_length (int): Length of hop between STFT windows + win_length (int): Window size + + Returns: + Tensor: Dimension `(..., time)` + """ + specgram = spectrogram( + waveform, + pad=pad, + window=window, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + power=1.0, + normalized=False, + ) + freqs = torch.linspace(0, sample_rate // 2, steps=1 + n_fft // 2, device=specgram.device).reshape((-1, 1)) + freq_dim = -2 + return (freqs * specgram).sum(dim=freq_dim) / specgram.sum(dim=freq_dim) + + +@deprecated("Please migrate to :py:class:`torchaudio.io.AudioEffector`.", remove=False) +def apply_codec( + waveform: Tensor, + sample_rate: int, + format: str, + channels_first: bool = True, + compression: Optional[float] = None, + encoding: Optional[str] = None, + bits_per_sample: Optional[int] = None, +) -> Tensor: + r""" + Apply codecs as a form of augmentation. + + .. devices:: CPU + + Args: + waveform (Tensor): Audio data. Must be 2 dimensional. See also ```channels_first```. + sample_rate (int): Sample rate of the audio waveform. + format (str): File format. + channels_first (bool, optional): + When True, both the input and output Tensor have dimension `(channel, time)`. + Otherwise, they have dimension `(time, channel)`. + compression (float or None, optional): Used for formats other than WAV. + For more details see :py:func:`torchaudio.backend.sox_io_backend.save`. + encoding (str or None, optional): Changes the encoding for the supported formats. + For more details see :py:func:`torchaudio.backend.sox_io_backend.save`. + bits_per_sample (int or None, optional): Changes the bit depth for the supported formats. + For more details see :py:func:`torchaudio.backend.sox_io_backend.save`. + + Returns: + Tensor: Resulting Tensor. + If ``channels_first=True``, it has `(channel, time)` else `(time, channel)`. + """ + from torchaudio.backend import _sox_io_backend + + with tempfile.NamedTemporaryFile() as f: + torchaudio.backend._sox_io_backend.save( + f.name, waveform, sample_rate, channels_first, compression, format, encoding, bits_per_sample + ) + augmented, sr = _sox_io_backend.load(f.name, channels_first=channels_first, format=format) + if sr != sample_rate: + augmented = resample(augmented, sr, sample_rate) + return augmented + + +_CPU = torch.device("cpu") + + +def _get_sinc_resample_kernel( + orig_freq: int, + new_freq: int, + gcd: int, + lowpass_filter_width: int = 6, + rolloff: float = 0.99, + resampling_method: str = "sinc_interp_hann", + beta: Optional[float] = None, + device: torch.device = _CPU, + dtype: Optional[torch.dtype] = None, +): + if not (int(orig_freq) == orig_freq and int(new_freq) == new_freq): + raise Exception( + "Frequencies must be of integer type to ensure quality resampling computation. " + "To work around this, manually convert both frequencies to integer values " + "that maintain their resampling rate ratio before passing them into the function. " + "Example: To downsample a 44100 hz waveform by a factor of 8, use " + "`orig_freq=8` and `new_freq=1` instead of `orig_freq=44100` and `new_freq=5512.5`. " + "For more information, please refer to https://github.com/pytorch/audio/issues/1487." + ) + + if resampling_method in ["sinc_interpolation", "kaiser_window"]: + method_map = { + "sinc_interpolation": "sinc_interp_hann", + "kaiser_window": "sinc_interp_kaiser", + } + warnings.warn( + f'"{resampling_method}" resampling method name is being deprecated and replaced by ' + f'"{method_map[resampling_method]}" in the next release. ' + "The default behavior remains unchanged.", + stacklevel=3, + ) + elif resampling_method not in ["sinc_interp_hann", "sinc_interp_kaiser"]: + raise ValueError("Invalid resampling method: {}".format(resampling_method)) + + orig_freq = int(orig_freq) // gcd + new_freq = int(new_freq) // gcd + + if lowpass_filter_width <= 0: + raise ValueError("Low pass filter width should be positive.") + base_freq = min(orig_freq, new_freq) + # This will perform antialiasing filtering by removing the highest frequencies. + # At first I thought I only needed this when downsampling, but when upsampling + # you will get edge artifacts without this, as the edge is equivalent to zero padding, + # which will add high freq artifacts. + base_freq *= rolloff + + # The key idea of the algorithm is that x(t) can be exactly reconstructed from x[i] (tensor) + # using the sinc interpolation formula: + # x(t) = sum_i x[i] sinc(pi * orig_freq * (i / orig_freq - t)) + # We can then sample the function x(t) with a different sample rate: + # y[j] = x(j / new_freq) + # or, + # y[j] = sum_i x[i] sinc(pi * orig_freq * (i / orig_freq - j / new_freq)) + + # We see here that y[j] is the convolution of x[i] with a specific filter, for which + # we take an FIR approximation, stopping when we see at least `lowpass_filter_width` zeros crossing. + # But y[j+1] is going to have a different set of weights and so on, until y[j + new_freq]. + # Indeed: + # y[j + new_freq] = sum_i x[i] sinc(pi * orig_freq * ((i / orig_freq - (j + new_freq) / new_freq)) + # = sum_i x[i] sinc(pi * orig_freq * ((i - orig_freq) / orig_freq - j / new_freq)) + # = sum_i x[i + orig_freq] sinc(pi * orig_freq * (i / orig_freq - j / new_freq)) + # so y[j+new_freq] uses the same filter as y[j], but on a shifted version of x by `orig_freq`. + # This will explain the F.conv1d after, with a stride of orig_freq. + width = math.ceil(lowpass_filter_width * orig_freq / base_freq) + # If orig_freq is still big after GCD reduction, most filters will be very unbalanced, i.e., + # they will have a lot of almost zero values to the left or to the right... + # There is probably a way to evaluate those filters more efficiently, but this is kept for + # future work. + idx_dtype = dtype if dtype is not None else torch.float64 + + idx = torch.arange(-width, width + orig_freq, dtype=idx_dtype, device=device)[None, None] / orig_freq + + t = torch.arange(0, -new_freq, -1, dtype=dtype, device=device)[:, None, None] / new_freq + idx + t *= base_freq + t = t.clamp_(-lowpass_filter_width, lowpass_filter_width) + + # we do not use built in torch windows here as we need to evaluate the window + # at specific positions, not over a regular grid. + if resampling_method == "sinc_interp_hann": + window = torch.cos(t * math.pi / lowpass_filter_width / 2) ** 2 + else: + # sinc_interp_kaiser + if beta is None: + beta = 14.769656459379492 + beta_tensor = torch.tensor(float(beta)) + window = torch.i0(beta_tensor * torch.sqrt(1 - (t / lowpass_filter_width) ** 2)) / torch.i0(beta_tensor) + + t *= math.pi + + scale = base_freq / orig_freq + kernels = torch.where(t == 0, torch.tensor(1.0).to(t), t.sin() / t) + kernels *= window * scale + + if dtype is None: + kernels = kernels.to(dtype=torch.float32) + + return kernels, width + + +def _apply_sinc_resample_kernel( + waveform: Tensor, + orig_freq: int, + new_freq: int, + gcd: int, + kernel: Tensor, + width: int, +): + if not waveform.is_floating_point(): + raise TypeError(f"Expected floating point type for waveform tensor, but received {waveform.dtype}.") + + orig_freq = int(orig_freq) // gcd + new_freq = int(new_freq) // gcd + + # pack batch + shape = waveform.size() + waveform = waveform.view(-1, shape[-1]) + + num_wavs, length = waveform.shape + waveform = torch.nn.functional.pad(waveform, (width, width + orig_freq)) + resampled = torch.nn.functional.conv1d(waveform[:, None], kernel, stride=orig_freq) + resampled = resampled.transpose(1, 2).reshape(num_wavs, -1) + target_length = torch.ceil(torch.as_tensor(new_freq * length / orig_freq)).long() + resampled = resampled[..., :target_length] + + # unpack batch + resampled = resampled.view(shape[:-1] + resampled.shape[-1:]) + return resampled + + +def resample( + waveform: Tensor, + orig_freq: int, + new_freq: int, + lowpass_filter_width: int = 6, + rolloff: float = 0.99, + resampling_method: str = "sinc_interp_hann", + beta: Optional[float] = None, +) -> Tensor: + r"""Resamples the waveform at the new frequency using bandlimited interpolation. :cite:`RESAMPLE`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Note: + ``transforms.Resample`` precomputes and reuses the resampling kernel, so using it will result in + more efficient computation if resampling multiple waveforms with the same resampling parameters. + + Args: + waveform (Tensor): The input signal of dimension `(..., time)` + orig_freq (int): The original frequency of the signal + new_freq (int): The desired frequency + lowpass_filter_width (int, optional): Controls the sharpness of the filter, more == sharper + but less efficient. (Default: ``6``) + rolloff (float, optional): The roll-off frequency of the filter, as a fraction of the Nyquist. + Lower values reduce anti-aliasing, but also reduce some of the highest frequencies. (Default: ``0.99``) + resampling_method (str, optional): The resampling method to use. + Options: [``"sinc_interp_hann"``, ``"sinc_interp_kaiser"``] (Default: ``"sinc_interp_hann"``) + beta (float or None, optional): The shape parameter used for kaiser window. + + Returns: + Tensor: The waveform at the new frequency of dimension `(..., time).` + """ + + if orig_freq <= 0.0 or new_freq <= 0.0: + raise ValueError("Original frequency and desired frequecy should be positive") + + if orig_freq == new_freq: + return waveform + + gcd = math.gcd(int(orig_freq), int(new_freq)) + + kernel, width = _get_sinc_resample_kernel( + orig_freq, + new_freq, + gcd, + lowpass_filter_width, + rolloff, + resampling_method, + beta, + waveform.device, + waveform.dtype, + ) + resampled = _apply_sinc_resample_kernel(waveform, orig_freq, new_freq, gcd, kernel, width) + return resampled + + +@torch.jit.unused +def edit_distance(seq1: Sequence, seq2: Sequence) -> int: + """ + Calculate the word level edit (Levenshtein) distance between two sequences. + + .. devices:: CPU + + The function computes an edit distance allowing deletion, insertion and + substitution. The result is an integer. + + For most applications, the two input sequences should be the same type. If + two strings are given, the output is the edit distance between the two + strings (character edit distance). If two lists of strings are given, the + output is the edit distance between sentences (word edit distance). Users + may want to normalize the output by the length of the reference sequence. + + Args: + seq1 (Sequence): the first sequence to compare. + seq2 (Sequence): the second sequence to compare. + Returns: + int: The distance between the first and second sequences. + """ + len_sent2 = len(seq2) + dold = list(range(len_sent2 + 1)) + dnew = [0 for _ in range(len_sent2 + 1)] + + for i in range(1, len(seq1) + 1): + dnew[0] = i + for j in range(1, len_sent2 + 1): + if seq1[i - 1] == seq2[j - 1]: + dnew[j] = dold[j - 1] + else: + substitution = dold[j - 1] + 1 + insertion = dnew[j - 1] + 1 + deletion = dold[j] + 1 + dnew[j] = min(substitution, insertion, deletion) + + dnew, dold = dold, dnew + + return int(dold[-1]) + + +def loudness(waveform: Tensor, sample_rate: int): + r"""Measure audio loudness according to the ITU-R BS.1770-4 recommendation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + waveform(torch.Tensor): audio waveform of dimension `(..., channels, time)` + sample_rate (int): sampling rate of the waveform + + Returns: + Tensor: loudness estimates (LKFS) + + Reference: + - https://www.itu.int/rec/R-REC-BS.1770-4-201510-I/en + """ + + if waveform.size(-2) > 5: + raise ValueError("Only up to 5 channels are supported.") + + gate_duration = 0.4 + overlap = 0.75 + gamma_abs = -70.0 + kweight_bias = -0.691 + gate_samples = int(round(gate_duration * sample_rate)) + step = int(round(gate_samples * (1 - overlap))) + + # Apply K-weighting + waveform = treble_biquad(waveform, sample_rate, 4.0, 1500.0, 1 / math.sqrt(2)) + waveform = highpass_biquad(waveform, sample_rate, 38.0, 0.5) + + # Compute the energy for each block + energy = torch.square(waveform).unfold(-1, gate_samples, step) + energy = torch.mean(energy, dim=-1) + + # Compute channel-weighted summation + g = torch.tensor([1.0, 1.0, 1.0, 1.41, 1.41], dtype=waveform.dtype, device=waveform.device) + g = g[: energy.size(-2)] + + energy_weighted = torch.sum(g.unsqueeze(-1) * energy, dim=-2) + loudness = -0.691 + 10 * torch.log10(energy_weighted) + + # Apply absolute gating of the blocks + gated_blocks = loudness > gamma_abs + gated_blocks = gated_blocks.unsqueeze(-2) + + energy_filtered = torch.sum(gated_blocks * energy, dim=-1) / torch.count_nonzero(gated_blocks, dim=-1) + energy_weighted = torch.sum(g * energy_filtered, dim=-1) + gamma_rel = kweight_bias + 10 * torch.log10(energy_weighted) - 10 + + # Apply relative gating of the blocks + gated_blocks = torch.logical_and(gated_blocks.squeeze(-2), loudness > gamma_rel.unsqueeze(-1)) + gated_blocks = gated_blocks.unsqueeze(-2) + + energy_filtered = torch.sum(gated_blocks * energy, dim=-1) / torch.count_nonzero(gated_blocks, dim=-1) + energy_weighted = torch.sum(g * energy_filtered, dim=-1) + LKFS = kweight_bias + 10 * torch.log10(energy_weighted) + return LKFS + + +def pitch_shift( + waveform: Tensor, + sample_rate: int, + n_steps: int, + bins_per_octave: int = 12, + n_fft: int = 512, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window: Optional[Tensor] = None, +) -> Tensor: + """ + Shift the pitch of a waveform by ``n_steps`` steps. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + waveform (Tensor): The input waveform of shape `(..., time)`. + sample_rate (int): Sample rate of `waveform`. + n_steps (int): The (fractional) steps to shift `waveform`. + bins_per_octave (int, optional): The number of steps per octave (Default: ``12``). + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins (Default: ``512``). + win_length (int or None, optional): Window size. If None, then ``n_fft`` is used. (Default: ``None``). + hop_length (int or None, optional): Length of hop between STFT windows. If None, then + ``win_length // 4`` is used (Default: ``None``). + window (Tensor or None, optional): Window tensor that is applied/multiplied to each frame/window. + If None, then ``torch.hann_window(win_length)`` is used (Default: ``None``). + + + Returns: + Tensor: The pitch-shifted audio waveform of shape `(..., time)`. + """ + waveform_stretch = _stretch_waveform( + waveform, + n_steps, + bins_per_octave, + n_fft, + win_length, + hop_length, + window, + ) + rate = 2.0 ** (-float(n_steps) / bins_per_octave) + waveform_shift = resample(waveform_stretch, int(sample_rate / rate), sample_rate) + + return _fix_waveform_shape(waveform_shift, waveform.size()) + + +def _stretch_waveform( + waveform: Tensor, + n_steps: int, + bins_per_octave: int = 12, + n_fft: int = 512, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window: Optional[Tensor] = None, +) -> Tensor: + """ + Pitch shift helper function to preprocess and stretch waveform before resampling step. + + Args: + See pitch_shift arg descriptions. + + Returns: + Tensor: The preprocessed waveform stretched prior to resampling. + """ + if hop_length is None: + hop_length = n_fft // 4 + if win_length is None: + win_length = n_fft + if window is None: + window = torch.hann_window(window_length=win_length, device=waveform.device) + + # pack batch + shape = waveform.size() + waveform = waveform.reshape(-1, shape[-1]) + + ori_len = shape[-1] + rate = 2.0 ** (-float(n_steps) / bins_per_octave) + spec_f = torch.stft( + input=waveform, + n_fft=n_fft, + hop_length=hop_length, + win_length=win_length, + window=window, + center=True, + pad_mode="reflect", + normalized=False, + onesided=True, + return_complex=True, + ) + phase_advance = torch.linspace(0, math.pi * hop_length, spec_f.shape[-2], device=spec_f.device)[..., None] + spec_stretch = phase_vocoder(spec_f, rate, phase_advance) + len_stretch = int(round(ori_len / rate)) + waveform_stretch = torch.istft( + spec_stretch, n_fft=n_fft, hop_length=hop_length, win_length=win_length, window=window, length=len_stretch + ) + return waveform_stretch + + +def _fix_waveform_shape( + waveform_shift: Tensor, + shape: List[int], +) -> Tensor: + """ + PitchShift helper function to process after resampling step to fix the shape back. + + Args: + waveform_shift(Tensor): The waveform after stretch and resample + shape (List[int]): The shape of initial waveform + + Returns: + Tensor: The pitch-shifted audio waveform of shape `(..., time)`. + """ + ori_len = shape[-1] + shift_len = waveform_shift.size()[-1] + if shift_len > ori_len: + waveform_shift = waveform_shift[..., :ori_len] + else: + waveform_shift = torch.nn.functional.pad(waveform_shift, [0, ori_len - shift_len]) + + # unpack batch + waveform_shift = waveform_shift.view(shape[:-1] + waveform_shift.shape[-1:]) + return waveform_shift + + +def rnnt_loss( + logits: Tensor, + targets: Tensor, + logit_lengths: Tensor, + target_lengths: Tensor, + blank: int = -1, + clamp: float = -1, + reduction: str = "mean", + fused_log_softmax: bool = True, +): + """Compute the RNN Transducer loss from *Sequence Transduction with Recurrent Neural Networks* + :cite:`graves2012sequence`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The RNN Transducer loss extends the CTC loss by defining a distribution over output + sequences of all lengths, and by jointly modelling both input-output and output-output + dependencies. + + Args: + logits (Tensor): Tensor of dimension `(batch, max seq length, max target length + 1, class)` + containing output from joiner + targets (Tensor): Tensor of dimension `(batch, max target length)` containing targets with zero padded + logit_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of each sequence from encoder + target_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of targets for each sequence + blank (int, optional): blank label (Default: ``-1``) + clamp (float, optional): clamp for gradients (Default: ``-1``) + reduction (string, optional): Specifies the reduction to apply to the output: + ``"none"`` | ``"mean"`` | ``"sum"``. (Default: ``"mean"``) + fused_log_softmax (bool): set to False if calling log_softmax outside of loss (Default: ``True``) + Returns: + Tensor: Loss with the reduction option applied. If ``reduction`` is ``"none"``, then size `(batch)`, + otherwise scalar. + """ + if reduction not in ["none", "mean", "sum"]: + raise ValueError('reduction should be one of "none", "mean", or "sum"') + + if blank < 0: # reinterpret blank index if blank < 0. + blank = logits.shape[-1] + blank + + costs, _ = torch.ops.torchaudio.rnnt_loss( + logits=logits, + targets=targets, + logit_lengths=logit_lengths, + target_lengths=target_lengths, + blank=blank, + clamp=clamp, + fused_log_softmax=fused_log_softmax, + ) + + if reduction == "mean": + return costs.mean() + elif reduction == "sum": + return costs.sum() + + return costs + + +def psd( + specgram: Tensor, + mask: Optional[Tensor] = None, + normalize: bool = True, + eps: float = 1e-10, +) -> Tensor: + """Compute cross-channel power spectral density (PSD) matrix. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)`. + mask (torch.Tensor or None, optional): Time-Frequency mask for normalization. + Tensor with dimensions `(..., freq, time)`. (Default: ``None``) + normalize (bool, optional): If ``True``, normalize the mask along the time dimension. (Default: ``True``) + eps (float, optional): Value to add to the denominator in mask normalization. (Default: ``1e-15``) + + Returns: + torch.Tensor: The complex-valued PSD matrix of the input spectrum. + Tensor with dimensions `(..., freq, channel, channel)` + """ + specgram = specgram.transpose(-3, -2) # shape (freq, channel, time) + # outer product: + # (..., ch_1, time) x (..., ch_2, time) -> (..., time, ch_1, ch_2) + psd = torch.einsum("...ct,...et->...tce", [specgram, specgram.conj()]) + + if mask is not None: + if mask.shape[:-1] != specgram.shape[:-2] or mask.shape[-1] != specgram.shape[-1]: + raise ValueError( + "The dimensions of mask except the channel dimension should be the same as specgram." + f"Found {mask.shape} for mask and {specgram.shape} for specgram." + ) + # Normalized mask along time dimension: + if normalize: + mask = mask / (mask.sum(dim=-1, keepdim=True) + eps) + + psd = psd * mask[..., None, None] + + psd = psd.sum(dim=-3) + return psd + + +def _compute_mat_trace(input: torch.Tensor, dim1: int = -1, dim2: int = -2) -> torch.Tensor: + r"""Compute the trace of a Tensor along ``dim1`` and ``dim2`` dimensions. + + Args: + input (torch.Tensor): Tensor with dimensions `(..., channel, channel)`. + dim1 (int, optional): The first dimension of the diagonal matrix. + (Default: ``-1``) + dim2 (int, optional): The second dimension of the diagonal matrix. + (Default: ``-2``) + + Returns: + Tensor: The trace of the input Tensor. + """ + if input.ndim < 2: + raise ValueError("The dimension of the tensor must be at least 2.") + if input.shape[dim1] != input.shape[dim2]: + raise ValueError("The size of ``dim1`` and ``dim2`` must be the same.") + input = torch.diagonal(input, 0, dim1=dim1, dim2=dim2) + return input.sum(dim=-1) + + +def _tik_reg(mat: torch.Tensor, reg: float = 1e-7, eps: float = 1e-8) -> torch.Tensor: + """Perform Tikhonov regularization (only modifying real part). + + Args: + mat (torch.Tensor): Input matrix with dimensions `(..., channel, channel)`. + reg (float, optional): Regularization factor. (Default: 1e-8) + eps (float, optional): Value to avoid the correlation matrix is all-zero. (Default: ``1e-8``) + + Returns: + Tensor: Regularized matrix with dimensions `(..., channel, channel)`. + """ + # Add eps + C = mat.size(-1) + eye = torch.eye(C, dtype=mat.dtype, device=mat.device) + epsilon = _compute_mat_trace(mat).real[..., None, None] * reg + # in case that correlation_matrix is all-zero + epsilon = epsilon + eps + mat = mat + epsilon * eye[..., :, :] + return mat + + +def _assert_psd_matrices(psd_s: torch.Tensor, psd_n: torch.Tensor) -> None: + """Assertion checks of the PSD matrices of target speech and noise. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + """ + if psd_s.ndim < 3 or psd_n.ndim < 3: + raise ValueError( + "Expected at least 3D Tensor (..., freq, channel, channel) for psd_s and psd_n. " + f"Found {psd_s.shape} for psd_s and {psd_n.shape} for psd_n." + ) + if not (psd_s.is_complex() and psd_n.is_complex()): + raise TypeError( + "The type of psd_s and psd_n must be ``torch.cfloat`` or ``torch.cdouble``. " + f"Found {psd_s.dtype} for psd_s and {psd_n.dtype} for psd_n." + ) + if psd_s.shape != psd_n.shape: + raise ValueError( + f"The dimensions of psd_s and psd_n should be the same. Found {psd_s.shape} and {psd_n.shape}." + ) + if psd_s.shape[-1] != psd_s.shape[-2]: + raise ValueError(f"The last two dimensions of psd_s should be the same. Found {psd_s.shape}.") + + +def mvdr_weights_souden( + psd_s: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, +) -> Tensor: + r"""Compute the Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) beamforming weights + by the method proposed by *Souden et, al.* :cite:`souden2009optimal`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the power spectral density (PSD) matrix of target speech :math:`\bf{\Phi}_{\textbf{SS}}`, + the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and a one-hot vector that represents the + reference channel :math:`\bf{u}`, the method computes the MVDR beamforming weight martrix + :math:`\textbf{w}_{\text{MVDR}}`. The formula is defined as: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bf{\Phi}_{\textbf{SS}}}}(f)} + {\text{Trace}({{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f) \bf{\Phi}_{\textbf{SS}}}(f))}}\bm{u} + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: The complex-valued MVDR beamforming weight matrix with dimensions `(..., freq, channel)`. + """ + _assert_psd_matrices(psd_s, psd_n) + + if diagonal_loading: + psd_n = _tik_reg(psd_n, reg=diag_eps) + numerator = torch.linalg.solve(psd_n, psd_s) # psd_n.inv() @ psd_s + # ws: (..., C, C) / (...,) -> (..., C, C) + ws = numerator / (_compute_mat_trace(numerator)[..., None, None] + eps) + if torch.jit.isinstance(reference_channel, int): + beamform_weights = ws[..., :, reference_channel] + elif torch.jit.isinstance(reference_channel, Tensor): + reference_channel = reference_channel.to(psd_n.dtype) + # h: (..., F, C_1, C_2) x (..., C_2) -> (..., F, C_1) + beamform_weights = torch.einsum("...c,...c->...", [ws, reference_channel[..., None, None, :]]) + else: + raise TypeError(f'Expected "int" or "Tensor" for reference_channel. Found: {type(reference_channel)}.') + + return beamform_weights + + +def mvdr_weights_rtf( + rtf: Tensor, + psd_n: Tensor, + reference_channel: Optional[Union[int, Tensor]] = None, + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, +) -> Tensor: + r"""Compute the Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) beamforming weights + based on the relative transfer function (RTF) and power spectral density (PSD) matrix of noise. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the relative transfer function (RTF) matrix or the steering vector of target speech :math:`\bm{v}`, + the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and a one-hot vector that represents the + reference channel :math:`\bf{u}`, the method computes the MVDR beamforming weight martrix + :math:`\textbf{w}_{\text{MVDR}}`. The formula is defined as: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)}} + {{\bm{v}^{\mathsf{H}}}(f){\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)} + + where :math:`(.)^{\mathsf{H}}` denotes the Hermitian Conjugate operation. + + Args: + rtf (torch.Tensor): The complex-valued RTF vector of target speech. + Tensor with dimensions `(..., freq, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: The complex-valued MVDR beamforming weight matrix with dimensions `(..., freq, channel)`. + """ + if rtf.ndim < 2: + raise ValueError(f"Expected at least 2D Tensor (..., freq, channel) for rtf. Found {rtf.shape}.") + if psd_n.ndim < 3: + raise ValueError(f"Expected at least 3D Tensor (..., freq, channel, channel) for psd_n. Found {psd_n.shape}.") + if not (rtf.is_complex() and psd_n.is_complex()): + raise TypeError( + "The type of rtf and psd_n must be ``torch.cfloat`` or ``torch.cdouble``. " + f"Found {rtf.dtype} for rtf and {psd_n.dtype} for psd_n." + ) + if rtf.shape != psd_n.shape[:-1]: + raise ValueError( + "The dimensions of rtf and the dimensions withou the last dimension of psd_n should be the same. " + f"Found {rtf.shape} for rtf and {psd_n.shape} for psd_n." + ) + if psd_n.shape[-1] != psd_n.shape[-2]: + raise ValueError(f"The last two dimensions of psd_n should be the same. Found {psd_n.shape}.") + + if diagonal_loading: + psd_n = _tik_reg(psd_n, reg=diag_eps) + # numerator = psd_n.inv() @ stv + numerator = torch.linalg.solve(psd_n, rtf.unsqueeze(-1)).squeeze(-1) # (..., freq, channel) + # denominator = stv^H @ psd_n.inv() @ stv + denominator = torch.einsum("...d,...d->...", [rtf.conj(), numerator]) + beamform_weights = numerator / (denominator.real.unsqueeze(-1) + eps) + # normalize the numerator + if reference_channel is not None: + if torch.jit.isinstance(reference_channel, int): + scale = rtf[..., reference_channel].conj() + elif torch.jit.isinstance(reference_channel, Tensor): + reference_channel = reference_channel.to(psd_n.dtype) + scale = torch.einsum("...c,...c->...", [rtf.conj(), reference_channel[..., None, :]]) + else: + raise TypeError(f'Expected "int" or "Tensor" for reference_channel. Found: {type(reference_channel)}.') + + beamform_weights = beamform_weights * scale[..., None] + + return beamform_weights + + +def rtf_evd(psd_s: Tensor) -> Tensor: + r"""Estimate the relative transfer function (RTF) or the steering vector by eigenvalue decomposition. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + psd_s (Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor of dimension `(..., freq, channel, channel)` + + Returns: + Tensor: The estimated complex-valued RTF of target speech. + Tensor of dimension `(..., freq, channel)` + """ + if not psd_s.is_complex(): + raise TypeError(f"The type of psd_s must be ``torch.cfloat`` or ``torch.cdouble``. Found {psd_s.dtype}.") + if psd_s.shape[-1] != psd_s.shape[-2]: + raise ValueError(f"The last two dimensions of psd_s should be the same. Found {psd_s.shape}.") + _, v = torch.linalg.eigh(psd_s) # v is sorted along with eigenvalues in ascending order + rtf = v[..., -1] # choose the eigenvector with max eigenvalue + return rtf + + +def rtf_power( + psd_s: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + n_iter: int = 3, + diagonal_loading: bool = True, + diag_eps: float = 1e-7, +) -> Tensor: + r"""Estimate the relative transfer function (RTF) or the steering vector by the power method. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + + Returns: + torch.Tensor: The estimated complex-valued RTF of target speech. + Tensor of dimension `(..., freq, channel)`. + """ + _assert_psd_matrices(psd_s, psd_n) + if n_iter <= 0: + raise ValueError("The number of iteration must be greater than 0.") + + # Apply diagonal loading to psd_n to improve robustness. + if diagonal_loading: + psd_n = _tik_reg(psd_n, reg=diag_eps) + # phi is regarded as the first iteration + phi = torch.linalg.solve(psd_n, psd_s) # psd_n.inv() @ psd_s + if torch.jit.isinstance(reference_channel, int): + rtf = phi[..., reference_channel] + elif torch.jit.isinstance(reference_channel, Tensor): + reference_channel = reference_channel.to(psd_n.dtype) + rtf = torch.einsum("...c,...c->...", [phi, reference_channel[..., None, None, :]]) + else: + raise TypeError(f'Expected "int" or "Tensor" for reference_channel. Found: {type(reference_channel)}.') + rtf = rtf.unsqueeze(-1) # (..., freq, channel, 1) + if n_iter >= 2: + # The number of iterations in the for loop is `n_iter - 2` + # because the `phi` above and `torch.matmul(psd_s, rtf)` are regarded as + # two iterations. + for _ in range(n_iter - 2): + rtf = torch.matmul(phi, rtf) + rtf = torch.matmul(psd_s, rtf) + else: + # if there is only one iteration, the rtf is the psd_s[..., referenc_channel] + # which is psd_n @ phi @ ref_channel + rtf = torch.matmul(psd_n, rtf) + return rtf.squeeze(-1) + + +def apply_beamforming(beamform_weights: Tensor, specgram: Tensor) -> Tensor: + r"""Apply the beamforming weight to the multi-channel noisy spectrum to obtain the single-channel enhanced spectrum. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + .. math:: + \hat{\textbf{S}}(f) = \textbf{w}_{\text{bf}}(f)^{\mathsf{H}} \textbf{Y}(f) + + where :math:`\textbf{w}_{\text{bf}}(f)` is the beamforming weight for the :math:`f`-th frequency bin, + :math:`\textbf{Y}` is the multi-channel spectrum for the :math:`f`-th frequency bin. + + Args: + beamform_weights (Tensor): The complex-valued beamforming weight matrix. + Tensor of dimension `(..., freq, channel)` + specgram (Tensor): The multi-channel complex-valued noisy spectrum. + Tensor of dimension `(..., channel, freq, time)` + + Returns: + Tensor: The single-channel complex-valued enhanced spectrum. + Tensor of dimension `(..., freq, time)` + """ + if beamform_weights.shape[:-2] != specgram.shape[:-3]: + raise ValueError( + "The dimensions except the last two dimensions of beamform_weights should be the same " + "as the dimensions except the last three dimensions of specgram. " + f"Found {beamform_weights.shape} for beamform_weights and {specgram.shape} for specgram." + ) + + if not (beamform_weights.is_complex() and specgram.is_complex()): + raise TypeError( + "The type of beamform_weights and specgram must be ``torch.cfloat`` or ``torch.cdouble``. " + f"Found {beamform_weights.dtype} for beamform_weights and {specgram.dtype} for specgram." + ) + + # (..., freq, channel) x (..., channel, freq, time) -> (..., freq, time) + specgram_enhanced = torch.einsum("...fc,...cft->...ft", [beamform_weights.conj(), specgram]) + return specgram_enhanced + + +def _check_shape_compatible(x: torch.Tensor, y: torch.Tensor) -> None: + if x.ndim != y.ndim: + raise ValueError(f"The operands must be the same dimension (got {x.ndim} and {y.ndim}).") + + for i in range(x.ndim - 1): + xi = x.size(i) + yi = y.size(i) + if xi == yi or xi == 1 or yi == 1: + continue + raise ValueError(f"Leading dimensions of x and y are not broadcastable (got {x.shape} and {y.shape}).") + + +def _check_convolve_mode(mode: str) -> None: + valid_convolve_modes = ["full", "valid", "same"] + if mode not in valid_convolve_modes: + raise ValueError(f"Unrecognized mode value '{mode}'. Please specify one of {valid_convolve_modes}.") + + +def _apply_convolve_mode(conv_result: torch.Tensor, x_length: int, y_length: int, mode: str) -> torch.Tensor: + valid_convolve_modes = ["full", "valid", "same"] + if mode == "full": + return conv_result + elif mode == "valid": + target_length = max(x_length, y_length) - min(x_length, y_length) + 1 + start_idx = (conv_result.size(-1) - target_length) // 2 + return conv_result[..., start_idx : start_idx + target_length] + elif mode == "same": + start_idx = (conv_result.size(-1) - x_length) // 2 + return conv_result[..., start_idx : start_idx + x_length] + else: + raise ValueError(f"Unrecognized mode value '{mode}'. Please specify one of {valid_convolve_modes}.") + + +def fftconvolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.Tensor: + r""" + Convolves inputs along their last dimension using FFT. For inputs with large last dimensions, this function + is generally much faster than :meth:`convolve`. + Note that, in contrast to :meth:`torch.nn.functional.conv1d`, which actually applies the valid cross-correlation + operator, this function applies the true `convolution`_ operator. + Also note that this function can only output float tensors (int tensor inputs will be cast to float). + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + _check_shape_compatible(x, y) + _check_convolve_mode(mode) + + n = x.size(-1) + y.size(-1) - 1 + fresult = torch.fft.rfft(x, n=n) * torch.fft.rfft(y, n=n) + result = torch.fft.irfft(fresult, n=n) + return _apply_convolve_mode(result, x.size(-1), y.size(-1), mode) + + +def convolve(x: torch.Tensor, y: torch.Tensor, mode: str = "full") -> torch.Tensor: + r""" + Convolves inputs along their last dimension using the direct method. + Note that, in contrast to :meth:`torch.nn.functional.conv1d`, which actually applies the valid cross-correlation + operator, this function applies the true `convolution`_ operator. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + _check_shape_compatible(x, y) + _check_convolve_mode(mode) + + x_size, y_size = x.size(-1), y.size(-1) + + if x.size(-1) < y.size(-1): + x, y = y, x + + if x.shape[:-1] != y.shape[:-1]: + new_shape = [max(i, j) for i, j in zip(x.shape[:-1], y.shape[:-1])] + x = x.broadcast_to(new_shape + [x.shape[-1]]) + y = y.broadcast_to(new_shape + [y.shape[-1]]) + + num_signals = torch.tensor(x.shape[:-1]).prod() + reshaped_x = x.reshape((int(num_signals), x.size(-1))) + reshaped_y = y.reshape((int(num_signals), y.size(-1))) + output = torch.nn.functional.conv1d( + input=reshaped_x, + weight=reshaped_y.flip(-1).unsqueeze(1), + stride=1, + groups=reshaped_x.size(0), + padding=reshaped_y.size(-1) - 1, + ) + output_shape = x.shape[:-1] + (-1,) + result = output.reshape(output_shape) + return _apply_convolve_mode(result, x_size, y_size, mode) + + +def add_noise( + waveform: torch.Tensor, noise: torch.Tensor, snr: torch.Tensor, lengths: Optional[torch.Tensor] = None +) -> torch.Tensor: + r"""Scales and adds noise to waveform per signal-to-noise ratio. + + Specifically, for each pair of waveform vector :math:`x \in \mathbb{R}^L` and noise vector + :math:`n \in \mathbb{R}^L`, the function computes output :math:`y` as + + .. math:: + y = x + a n \, \text{,} + + where + + .. math:: + a = \sqrt{ \frac{ ||x||_{2}^{2} }{ ||n||_{2}^{2} } \cdot 10^{-\frac{\text{SNR}}{10}} } \, \text{,} + + with :math:`\text{SNR}` being the desired signal-to-noise ratio between :math:`x` and :math:`n`, in dB. + + Note that this function broadcasts singleton leading dimensions in its inputs in a manner that is + consistent with the above formulae and PyTorch's broadcasting semantics. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Input waveform, with shape `(..., L)`. + noise (torch.Tensor): Noise, with shape `(..., L)` (same shape as ``waveform``). + snr (torch.Tensor): Signal-to-noise ratios in dB, with shape `(...,)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform`` and ``noise``, with shape + `(...,)` (leading dimensions must match those of ``waveform``). If ``None``, all elements in ``waveform`` + and ``noise`` are treated as valid. (Default: ``None``) + + Returns: + torch.Tensor: Result of scaling and adding ``noise`` to ``waveform``, with shape `(..., L)` + (same shape as ``waveform``). + """ + + if not (waveform.ndim - 1 == noise.ndim - 1 == snr.ndim and (lengths is None or lengths.ndim == snr.ndim)): + raise ValueError("Input leading dimensions don't match.") + + L = waveform.size(-1) + + if L != noise.size(-1): + raise ValueError(f"Length dimensions of waveform and noise don't match (got {L} and {noise.size(-1)}).") + + # compute scale + if lengths is not None: + mask = torch.arange(0, L, device=lengths.device).expand(waveform.shape) < lengths.unsqueeze( + -1 + ) # (*, L) < (*, 1) = (*, L) + masked_waveform = waveform * mask + masked_noise = noise * mask + else: + masked_waveform = waveform + masked_noise = noise + + energy_signal = torch.linalg.vector_norm(masked_waveform, ord=2, dim=-1) ** 2 # (*,) + energy_noise = torch.linalg.vector_norm(masked_noise, ord=2, dim=-1) ** 2 # (*,) + original_snr_db = 10 * (torch.log10(energy_signal) - torch.log10(energy_noise)) + scale = 10 ** ((original_snr_db - snr) / 20.0) # (*,) + + # scale noise + scaled_noise = scale.unsqueeze(-1) * noise # (*, 1) * (*, L) = (*, L) + + return waveform + scaled_noise # (*, L) + + +def speed( + waveform: torch.Tensor, orig_freq: int, factor: float, lengths: Optional[torch.Tensor] = None +) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: + r"""Adjusts waveform speed. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Input signals, with shape `(..., time)`. + orig_freq (int): Original frequency of the signals in ``waveform``. + factor (float): Factor by which to adjust speed of input. Values greater than 1.0 + compress ``waveform`` in time, whereas values less than 1.0 stretch ``waveform`` in time. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform``, with shape `(...)`. + If ``None``, all elements in ``waveform`` are treated as valid. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor or None): + torch.Tensor + Speed-adjusted waveform, with shape `(..., new_time).` + torch.Tensor or None + If ``lengths`` is not ``None``, valid lengths of signals in speed-adjusted waveform, + with shape `(...)`; otherwise, ``None``. + """ + + source_sample_rate = int(factor * orig_freq) + target_sample_rate = int(orig_freq) + + gcd = math.gcd(source_sample_rate, target_sample_rate) + source_sample_rate = source_sample_rate // gcd + target_sample_rate = target_sample_rate // gcd + + if lengths is None: + out_lengths = None + else: + out_lengths = torch.ceil(lengths * target_sample_rate / source_sample_rate).to(lengths.dtype) + + return resample(waveform, source_sample_rate, target_sample_rate), out_lengths + + +def preemphasis(waveform, coeff: float = 0.97) -> torch.Tensor: + r"""Pre-emphasizes a waveform along its last dimension, i.e. + for each signal :math:`x` in ``waveform``, computes + output :math:`y` as + + .. math:: + y[i] = x[i] - \text{coeff} \cdot x[i - 1] + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + coeff (float, optional): Pre-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + + Returns: + torch.Tensor: Pre-emphasized waveform, with shape `(..., N)`. + """ + waveform = waveform.clone() + waveform[..., 1:] -= coeff * waveform[..., :-1] + return waveform + + +def deemphasis(waveform, coeff: float = 0.97) -> torch.Tensor: + r"""De-emphasizes a waveform along its last dimension. + Inverse of :meth:`preemphasis`. Concretely, for each signal + :math:`x` in ``waveform``, computes output :math:`y` as + + .. math:: + y[i] = x[i] + \text{coeff} \cdot y[i - 1] + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + coeff (float, optional): De-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + + Returns: + torch.Tensor: De-emphasized waveform, with shape `(..., N)`. + """ + a_coeffs = torch.tensor([1.0, -coeff], dtype=waveform.dtype, device=waveform.device) + b_coeffs = torch.tensor([1.0, 0.0], dtype=waveform.dtype, device=waveform.device) + return torchaudio.functional.lfilter(waveform, a_coeffs=a_coeffs, b_coeffs=b_coeffs) + + +def frechet_distance(mu_x, sigma_x, mu_y, sigma_y): + r"""Computes the Fréchet distance between two multivariate normal distributions :cite:`dowson1982frechet`. + + Concretely, for multivariate Gaussians :math:`X(\mu_X, \Sigma_X)` + and :math:`Y(\mu_Y, \Sigma_Y)`, the function computes and returns :math:`F` as + + .. math:: + F(X, Y) = || \mu_X - \mu_Y ||_2^2 + + \text{Tr}\left( \Sigma_X + \Sigma_Y - 2 \sqrt{\Sigma_X \Sigma_Y} \right) + + Args: + mu_x (torch.Tensor): mean :math:`\mu_X` of multivariate Gaussian :math:`X`, with shape `(N,)`. + sigma_x (torch.Tensor): covariance matrix :math:`\Sigma_X` of :math:`X`, with shape `(N, N)`. + mu_y (torch.Tensor): mean :math:`\mu_Y` of multivariate Gaussian :math:`Y`, with shape `(N,)`. + sigma_y (torch.Tensor): covariance matrix :math:`\Sigma_Y` of :math:`Y`, with shape `(N, N)`. + + Returns: + torch.Tensor: the Fréchet distance between :math:`X` and :math:`Y`. + """ + if len(mu_x.size()) != 1: + raise ValueError(f"Input mu_x must be one-dimensional; got dimension {len(mu_x.size())}.") + if len(sigma_x.size()) != 2: + raise ValueError(f"Input sigma_x must be two-dimensional; got dimension {len(sigma_x.size())}.") + if sigma_x.size(0) != sigma_x.size(1) != mu_x.size(0): + raise ValueError("Each of sigma_x's dimensions must match mu_x's size.") + if mu_x.size() != mu_y.size(): + raise ValueError(f"Inputs mu_x and mu_y must have the same shape; got {mu_x.size()} and {mu_y.size()}.") + if sigma_x.size() != sigma_y.size(): + raise ValueError( + f"Inputs sigma_x and sigma_y must have the same shape; got {sigma_x.size()} and {sigma_y.size()}." + ) + + a = (mu_x - mu_y).square().sum() + b = sigma_x.trace() + sigma_y.trace() + c = torch.linalg.eigvals(sigma_x @ sigma_y).sqrt().real.sum() + return a + b - 2 * c diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..63a3bf08b7cde7cd548878f49db339f07c0227e9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/__init__.py @@ -0,0 +1,13 @@ +from torio.io import CodecConfig, StreamingMediaDecoder as StreamReader, StreamingMediaEncoder as StreamWriter + +from ._effector import AudioEffector +from ._playback import play_audio + + +__all__ = [ + "AudioEffector", + "StreamReader", + "StreamWriter", + "CodecConfig", + "play_audio", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/_effector.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/_effector.py new file mode 100644 index 0000000000000000000000000000000000000000..f7ce4a448c7cd2755cb8c56f19dbb987486f7618 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/_effector.py @@ -0,0 +1,347 @@ +import io +from typing import Iterator, List, Optional + +import torch +from torch import Tensor + +from torio.io._streaming_media_decoder import _get_afilter_desc, StreamingMediaDecoder as StreamReader +from torio.io._streaming_media_encoder import CodecConfig, StreamingMediaEncoder as StreamWriter + + +class _StreamingIOBuffer: + """Streaming Bytes IO buffer. Data are dropped when read.""" + + def __init__(self): + self._buffer: List(bytes) = [] + + def write(self, b: bytes): + if b: + self._buffer.append(b) + return len(b) + + def pop(self, n): + """Pop the oldest byte string. It does not necessary return the requested amount""" + if not self._buffer: + return b"" + if len(self._buffer[0]) <= n: + return self._buffer.pop(0) + ret = self._buffer[0][:n] + self._buffer[0] = self._buffer[0][n:] + return ret + + +def _get_sample_fmt(dtype: torch.dtype): + types = { + torch.uint8: "u8", + torch.int16: "s16", + torch.int32: "s32", + torch.float32: "flt", + torch.float64: "dbl", + } + if dtype not in types: + raise ValueError(f"Unsupported dtype is provided {dtype}. Supported dtypes are: {types.keys()}") + return types[dtype] + + +class _AudioStreamingEncoder: + """Given a waveform, encode on-demand and return bytes""" + + def __init__( + self, + src: Tensor, + sample_rate: int, + effect: str, + muxer: str, + encoder: Optional[str], + codec_config: Optional[CodecConfig], + frames_per_chunk: int, + ): + self.src = src + self.buffer = _StreamingIOBuffer() + self.writer = StreamWriter(self.buffer, format=muxer) + self.writer.add_audio_stream( + num_channels=src.size(1), + sample_rate=sample_rate, + format=_get_sample_fmt(src.dtype), + encoder=encoder, + filter_desc=effect, + codec_config=codec_config, + ) + self.writer.open() + self.fpc = frames_per_chunk + + # index on the input tensor (along time-axis) + # we use -1 to indicate that we finished iterating the tensor and + # the writer is closed. + self.i_iter = 0 + + def read(self, n): + while not self.buffer._buffer and self.i_iter >= 0: + self.writer.write_audio_chunk(0, self.src[self.i_iter : self.i_iter + self.fpc]) + self.i_iter += self.fpc + if self.i_iter >= self.src.size(0): + self.writer.flush() + self.writer.close() + self.i_iter = -1 + return self.buffer.pop(n) + + +def _encode( + src: Tensor, + sample_rate: int, + effect: str, + muxer: str, + encoder: Optional[str], + codec_config: Optional[CodecConfig], +): + buffer = io.BytesIO() + writer = StreamWriter(buffer, format=muxer) + writer.add_audio_stream( + num_channels=src.size(1), + sample_rate=sample_rate, + format=_get_sample_fmt(src.dtype), + encoder=encoder, + filter_desc=effect, + codec_config=codec_config, + ) + with writer.open(): + writer.write_audio_chunk(0, src) + buffer.seek(0) + return buffer + + +def _get_muxer(dtype: torch.dtype): + # TODO: check if this works in Windows. + types = { + torch.uint8: "u8", + torch.int16: "s16le", + torch.int32: "s32le", + torch.float32: "f32le", + torch.float64: "f64le", + } + if dtype not in types: + raise ValueError(f"Unsupported dtype is provided {dtype}. Supported dtypes are: {types.keys()}") + return types[dtype] + + +class AudioEffector: + """Apply various filters and/or codecs to waveforms. + + .. versionadded:: 2.1 + + Args: + effect (str or None, optional): Filter expressions or ``None`` to apply no filter. + See https://ffmpeg.org/ffmpeg-filters.html#Audio-Filters for the + details of filter syntax. + + format (str or None, optional): When provided, encode the audio into the + corresponding format. Default: ``None``. + + encoder (str or None, optional): When provided, override the encoder used + by the ``format``. Default: ``None``. + + codec_config (CodecConfig or None, optional): When provided, configure the encoding codec. + Should be provided in conjunction with ``format`` option. + + pad_end (bool, optional): When enabled, and if the waveform becomes shorter after applying + effects/codec, then pad the end with silence. + + Example - Basic usage + To use ``AudioEffector``, first instantiate it with a set of + ``effect`` and ``format``. + + >>> # instantiate the effector + >>> effector = AudioEffector(effect=..., format=...) + + Then, use :py:meth:`~AudioEffector.apply` or :py:meth:`~AudioEffector.stream` + method to apply them. + + >>> # Apply the effect to the whole waveform + >>> applied = effector.apply(waveform, sample_rate) + + >>> # Apply the effect chunk-by-chunk + >>> for chunk in effector.stream(waveform, sample_rate): + >>> ... + + Example - Applying effects + Please refer to + https://ffmpeg.org/ffmpeg-filters.html#Filtergraph-description + for the overview of filter description, and + https://ffmpeg.org/ffmpeg-filters.html#toc-Audio-Filters + for the list of available filters. + + Tempo - https://ffmpeg.org/ffmpeg-filters.html#atempo + + >>> AudioEffector(effect="atempo=1.5") + + Echo - https://ffmpeg.org/ffmpeg-filters.html#aecho + + >>> AudioEffector(effect="aecho=0.8:0.88:60:0.4") + + Flanger - https://ffmpeg.org/ffmpeg-filters.html#flanger + + >>> AudioEffector(effect="aflanger") + + Vibrato - https://ffmpeg.org/ffmpeg-filters.html#vibrato + + >>> AudioEffector(effect="vibrato") + + Tremolo - https://ffmpeg.org/ffmpeg-filters.html#tremolo + + >>> AudioEffector(effect="vibrato") + + You can also apply multiple effects at once. + + >>> AudioEffector(effect="") + + Example - Applying codec + One can apply codec using ``format`` argument. ``format`` can be + audio format or container format. If the container format supports + multiple encoders, you can specify it with ``encoder`` argument. + + Wav format + (no compression is applied but samples are converted to + 16-bit signed integer) + + >>> AudioEffector(format="wav") + + Ogg format with default encoder + + >>> AudioEffector(format="ogg") + + Ogg format with vorbis + + >>> AudioEffector(format="ogg", encoder="vorbis") + + Ogg format with opus + + >>> AudioEffector(format="ogg", encoder="opus") + + Webm format with opus + + >>> AudioEffector(format="webm", encoder="opus") + + Example - Applying codec with configuration + Reference: https://trac.ffmpeg.org/wiki/Encode/MP3 + + MP3 with default config + + >>> AudioEffector(format="mp3") + + MP3 with variable bitrate + + >>> AudioEffector(format="mp3", codec_config=CodecConfig(qscale=5)) + + MP3 with constant bitrate + + >>> AudioEffector(format="mp3", codec_config=CodecConfig(bit_rate=32_000)) + """ + + def __init__( + self, + effect: Optional[str] = None, + format: Optional[str] = None, + *, + encoder: Optional[str] = None, + codec_config: Optional[CodecConfig] = None, + pad_end: bool = True, + ): + if format is None: + if encoder is not None or codec_config is not None: + raise ValueError("`encoder` and/or `condec_config` opions are provided without `format` option.") + self.effect = effect + self.format = format + self.encoder = encoder + self.codec_config = codec_config + self.pad_end = pad_end + + def _get_reader(self, waveform, sample_rate, output_sample_rate, frames_per_chunk=None): + num_frames, num_channels = waveform.shape + + if self.format is not None: + muxer = self.format + encoder = self.encoder + option = {} + # Some formats are headerless, so need to provide these infomation. + if self.format == "mulaw": + option = {"sample_rate": f"{sample_rate}", "channels": f"{num_channels}"} + + else: # PCM + muxer = _get_muxer(waveform.dtype) + encoder = None + option = {"sample_rate": f"{sample_rate}", "channels": f"{num_channels}"} + + if frames_per_chunk is None: + src = _encode(waveform, sample_rate, self.effect, muxer, encoder, self.codec_config) + else: + src = _AudioStreamingEncoder( + waveform, sample_rate, self.effect, muxer, encoder, self.codec_config, frames_per_chunk + ) + + output_sr = sample_rate if output_sample_rate is None else output_sample_rate + filter_desc = _get_afilter_desc(output_sr, _get_sample_fmt(waveform.dtype), num_channels) + if self.pad_end: + filter_desc = f"{filter_desc},apad=whole_len={num_frames}" + + reader = StreamReader(src, format=muxer, option=option) + reader.add_audio_stream(frames_per_chunk or -1, -1, filter_desc=filter_desc) + return reader + + def apply(self, waveform: Tensor, sample_rate: int, output_sample_rate: Optional[int] = None) -> Tensor: + """Apply the effect and/or codecs to the whole tensor. + + Args: + waveform (Tensor): The input waveform. Shape: ``(time, channel)`` + sample_rate (int): Sample rate of the input waveform. + output_sample_rate (int or None, optional): Output sample rate. + If provided, override the output sample rate. + Otherwise, the resulting tensor is resampled to have + the same sample rate as the input. + Default: ``None``. + + Returns: + Tensor: + Resulting Tensor. Shape: ``(time, channel)``. The number of frames + could be different from that of the input. + """ + if waveform.ndim != 2: + raise ValueError(f"Expected the input waveform to be 2D. Found: {waveform.ndim}") + + if waveform.numel() == 0: + return waveform + + reader = self._get_reader(waveform, sample_rate, output_sample_rate) + reader.process_all_packets() + (applied,) = reader.pop_chunks() + return Tensor(applied) + + def stream( + self, waveform: Tensor, sample_rate: int, frames_per_chunk: int, output_sample_rate: Optional[int] = None + ) -> Iterator[Tensor]: + """Apply the effect and/or codecs to the given tensor chunk by chunk. + + Args: + waveform (Tensor): The input waveform. Shape: ``(time, channel)`` + sample_rate (int): Sample rate of the waveform. + frames_per_chunk (int): The number of frames to return at a time. + output_sample_rate (int or None, optional): Output sample rate. + If provided, override the output sample rate. + Otherwise, the resulting tensor is resampled to have + the same sample rate as the input. + Default: ``None``. + + Returns: + Iterator[Tensor]: + Series of processed chunks. Shape: ``(time, channel)``, where the + the number of frames matches ``frames_per_chunk`` except the + last chunk, which could be shorter. + """ + if waveform.ndim != 2: + raise ValueError(f"Expected the input waveform to be 2D. Found: {waveform.ndim}") + + if waveform.numel() == 0: + return waveform + + reader = self._get_reader(waveform, sample_rate, output_sample_rate, frames_per_chunk) + for (applied,) in reader.stream(): + yield Tensor(applied) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/_playback.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/_playback.py new file mode 100644 index 0000000000000000000000000000000000000000..8d1ab630e5fdbb9e44e9b55583511cf7ef1640bf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/io/_playback.py @@ -0,0 +1,72 @@ +import warnings +from sys import platform +from typing import Optional + +import torch +import torchaudio + +dict_format = { + torch.uint8: "u8", + torch.int16: "s16", + torch.int32: "s32", + torch.int64: "s64", + torch.float32: "flt", + torch.float64: "dbl", +} + + +def play_audio( + waveform: torch.Tensor, + sample_rate: Optional[float], + device: Optional[str] = None, +) -> None: + """Plays audio through specified or available output device. + + .. warning:: + This function is currently only supported on MacOS, and requires + libavdevice (FFmpeg) with ``audiotoolbox`` output device. + + .. note:: + This function can play up to two audio channels. + + Args: + waveform: Tensor containing the audio to play. + Expected shape: `(time, num_channels)`. + sample_rate: Sample rate of the audio to play. + device: Output device to use. If None, the default device is used. + """ + + if platform == "darwin": + device = device or "audiotoolbox" + path = "-" + else: + raise ValueError(f"This function only supports MacOS, but current OS is {platform}") + + available_devices = list(torchaudio.utils.ffmpeg_utils.get_output_devices().keys()) + if device not in available_devices: + raise ValueError(f"Device {device} is not available. Available devices are: {available_devices}") + + if waveform.dtype not in dict_format: + raise ValueError(f"Unsupported type {waveform.dtype}. The list of supported types is: {dict_format.keys()}") + format = dict_format[waveform.dtype] + + if waveform.ndim != 2: + raise ValueError(f"Expected 2D tensor with shape `(time, num_channels)`, got {waveform.ndim}D tensor instead") + + time, num_channels = waveform.size() + if num_channels > 2: + warnings.warn( + f"Expected up to 2 channels, got {num_channels} channels instead. " + "Only the first 2 channels will be played.", + stacklevel=2, + ) + + # Write to speaker device + s = torchaudio.io.StreamWriter(dst=path, format=device) + s.add_audio_stream(sample_rate, num_channels, format=format) + + # write audio to the device + block_size = 256 + with s.open(): + for i in range(0, time, block_size): + s.write_audio_chunk(0, waveform[i : i + block_size, :]) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/lib/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/lib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..969486880ab98615b53bcfabf9cc596bb3cd33c0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/__init__.py @@ -0,0 +1,85 @@ +from ._hdemucs import HDemucs, hdemucs_high, hdemucs_low, hdemucs_medium +from .conformer import Conformer +from .conv_tasnet import conv_tasnet_base, ConvTasNet +from .deepspeech import DeepSpeech +from .emformer import Emformer +from .rnnt import emformer_rnnt_base, emformer_rnnt_model, RNNT +from .rnnt_decoder import Hypothesis, RNNTBeamSearch +from .squim import ( + squim_objective_base, + squim_objective_model, + squim_subjective_base, + squim_subjective_model, + SquimObjective, + SquimSubjective, +) +from .tacotron2 import Tacotron2 +from .wav2letter import Wav2Letter +from .wav2vec2 import ( + hubert_base, + hubert_large, + hubert_pretrain_base, + hubert_pretrain_large, + hubert_pretrain_model, + hubert_pretrain_xlarge, + hubert_xlarge, + HuBERTPretrainModel, + wav2vec2_base, + wav2vec2_large, + wav2vec2_large_lv60k, + wav2vec2_model, + wav2vec2_xlsr_1b, + wav2vec2_xlsr_2b, + wav2vec2_xlsr_300m, + Wav2Vec2Model, + wavlm_base, + wavlm_large, + wavlm_model, +) +from .wavernn import WaveRNN + + +__all__ = [ + "Wav2Letter", + "WaveRNN", + "ConvTasNet", + "conv_tasnet_base", + "DeepSpeech", + "Wav2Vec2Model", + "HuBERTPretrainModel", + "wavlm_model", + "wavlm_base", + "wavlm_large", + "wav2vec2_model", + "wav2vec2_base", + "wav2vec2_large", + "wav2vec2_large_lv60k", + "hubert_base", + "hubert_large", + "hubert_xlarge", + "hubert_pretrain_model", + "hubert_pretrain_base", + "hubert_pretrain_large", + "hubert_pretrain_xlarge", + "wav2vec2_xlsr_300m", + "wav2vec2_xlsr_1b", + "wav2vec2_xlsr_2b", + "Tacotron2", + "Conformer", + "Emformer", + "Hypothesis", + "RNNT", + "RNNTBeamSearch", + "emformer_rnnt_base", + "emformer_rnnt_model", + "HDemucs", + "hdemucs_low", + "hdemucs_medium", + "hdemucs_high", + "squim_objective_base", + "squim_objective_model", + "squim_subjective_base", + "squim_subjective_model", + "SquimObjective", + "SquimSubjective", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/_hdemucs.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/_hdemucs.py new file mode 100644 index 0000000000000000000000000000000000000000..ff081b3d402942dd6b56b96e930744d2a7457aa0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/_hdemucs.py @@ -0,0 +1,1008 @@ +# ***************************************************************************** +# MIT License +# +# Copyright (c) Facebook, Inc. and its affiliates. +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# ***************************************************************************** + + +import math +import typing as tp +from typing import Any, Dict, List, Optional + +import torch +from torch import nn +from torch.nn import functional as F + + +class _ScaledEmbedding(torch.nn.Module): + r"""Make continuous embeddings and boost learning rate + + Args: + num_embeddings (int): number of embeddings + embedding_dim (int): embedding dimensions + scale (float, optional): amount to scale learning rate (Default: 10.0) + smooth (bool, optional): choose to apply smoothing (Default: ``False``) + """ + + def __init__(self, num_embeddings: int, embedding_dim: int, scale: float = 10.0, smooth: bool = False): + super().__init__() + self.embedding = nn.Embedding(num_embeddings, embedding_dim) + if smooth: + weight = torch.cumsum(self.embedding.weight.data, dim=0) + # when summing gaussian, scale raises as sqrt(n), so we normalize by that. + weight = weight / torch.arange(1, num_embeddings + 1).sqrt()[:, None] + self.embedding.weight.data[:] = weight + self.embedding.weight.data /= scale + self.scale = scale + + @property + def weight(self) -> torch.Tensor: + return self.embedding.weight * self.scale + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""Forward pass for embedding with scale. + Args: + x (torch.Tensor): input tensor of shape `(num_embeddings)` + + Returns: + (Tensor): + Embedding output of shape `(num_embeddings, embedding_dim)` + """ + out = self.embedding(x) * self.scale + return out + + +class _HEncLayer(torch.nn.Module): + + r"""Encoder layer. This used both by the time and the frequency branch. + Args: + chin (int): number of input channels. + chout (int): number of output channels. + kernel_size (int, optional): Kernel size for encoder (Default: 8) + stride (int, optional): Stride for encoder layer (Default: 4) + norm_groups (int, optional): number of groups for group norm. (Default: 4) + empty (bool, optional): used to make a layer with just the first conv. this is used + before merging the time and freq. branches. (Default: ``False``) + freq (bool, optional): boolean for whether conv layer is for frequency domain (Default: ``True``) + norm_type (string, optional): Norm type, either ``group_norm `` or ``none`` (Default: ``group_norm``) + context (int, optional): context size for the 1x1 conv. (Default: 0) + dconv_kw (Dict[str, Any] or None, optional): dictionary of kwargs for the DConv class. (Default: ``None``) + pad (bool, optional): true to pad the input. Padding is done so that the output size is + always the input size / stride. (Default: ``True``) + """ + + def __init__( + self, + chin: int, + chout: int, + kernel_size: int = 8, + stride: int = 4, + norm_groups: int = 4, + empty: bool = False, + freq: bool = True, + norm_type: str = "group_norm", + context: int = 0, + dconv_kw: Optional[Dict[str, Any]] = None, + pad: bool = True, + ): + super().__init__() + if dconv_kw is None: + dconv_kw = {} + norm_fn = lambda d: nn.Identity() # noqa + if norm_type == "group_norm": + norm_fn = lambda d: nn.GroupNorm(norm_groups, d) # noqa + pad_val = kernel_size // 4 if pad else 0 + klass = nn.Conv1d + self.freq = freq + self.kernel_size = kernel_size + self.stride = stride + self.empty = empty + self.pad = pad_val + if freq: + kernel_size = [kernel_size, 1] + stride = [stride, 1] + pad_val = [pad_val, 0] + klass = nn.Conv2d + self.conv = klass(chin, chout, kernel_size, stride, pad_val) + self.norm1 = norm_fn(chout) + + if self.empty: + self.rewrite = nn.Identity() + self.norm2 = nn.Identity() + self.dconv = nn.Identity() + else: + self.rewrite = klass(chout, 2 * chout, 1 + 2 * context, 1, context) + self.norm2 = norm_fn(2 * chout) + self.dconv = _DConv(chout, **dconv_kw) + + def forward(self, x: torch.Tensor, inject: Optional[torch.Tensor] = None) -> torch.Tensor: + r"""Forward pass for encoding layer. + + Size depends on whether frequency or time + + Args: + x (torch.Tensor): tensor input of shape `(B, C, F, T)` for frequency and shape + `(B, C, T)` for time + inject (torch.Tensor, optional): on last layer, combine frequency and time branches through inject param, + same shape as x (default: ``None``) + + Returns: + Tensor + output tensor after encoder layer of shape `(B, C, F / stride, T)` for frequency + and shape `(B, C, ceil(T / stride))` for time + """ + + if not self.freq and x.dim() == 4: + B, C, Fr, T = x.shape + x = x.view(B, -1, T) + + if not self.freq: + le = x.shape[-1] + if not le % self.stride == 0: + x = F.pad(x, (0, self.stride - (le % self.stride))) + y = self.conv(x) + if self.empty: + return y + if inject is not None: + if inject.shape[-1] != y.shape[-1]: + raise ValueError("Injection shapes do not align") + if inject.dim() == 3 and y.dim() == 4: + inject = inject[:, :, None] + y = y + inject + y = F.gelu(self.norm1(y)) + if self.freq: + B, C, Fr, T = y.shape + y = y.permute(0, 2, 1, 3).reshape(-1, C, T) + y = self.dconv(y) + y = y.view(B, Fr, C, T).permute(0, 2, 1, 3) + else: + y = self.dconv(y) + z = self.norm2(self.rewrite(y)) + z = F.glu(z, dim=1) + return z + + +class _HDecLayer(torch.nn.Module): + r"""Decoder layer. This used both by the time and the frequency branches. + Args: + chin (int): number of input channels. + chout (int): number of output channels. + last (bool, optional): whether current layer is final layer (Default: ``False``) + kernel_size (int, optional): Kernel size for encoder (Default: 8) + stride (int): Stride for encoder layer (Default: 4) + norm_groups (int, optional): number of groups for group norm. (Default: 1) + empty (bool, optional): used to make a layer with just the first conv. this is used + before merging the time and freq. branches. (Default: ``False``) + freq (bool, optional): boolean for whether conv layer is for frequency (Default: ``True``) + norm_type (str, optional): Norm type, either ``group_norm `` or ``none`` (Default: ``group_norm``) + context (int, optional): context size for the 1x1 conv. (Default: 1) + dconv_kw (Dict[str, Any] or None, optional): dictionary of kwargs for the DConv class. (Default: ``None``) + pad (bool, optional): true to pad the input. Padding is done so that the output size is + always the input size / stride. (Default: ``True``) + """ + + def __init__( + self, + chin: int, + chout: int, + last: bool = False, + kernel_size: int = 8, + stride: int = 4, + norm_groups: int = 1, + empty: bool = False, + freq: bool = True, + norm_type: str = "group_norm", + context: int = 1, + dconv_kw: Optional[Dict[str, Any]] = None, + pad: bool = True, + ): + super().__init__() + if dconv_kw is None: + dconv_kw = {} + norm_fn = lambda d: nn.Identity() # noqa + if norm_type == "group_norm": + norm_fn = lambda d: nn.GroupNorm(norm_groups, d) # noqa + if pad: + if (kernel_size - stride) % 2 != 0: + raise ValueError("Kernel size and stride do not align") + pad = (kernel_size - stride) // 2 + else: + pad = 0 + self.pad = pad + self.last = last + self.freq = freq + self.chin = chin + self.empty = empty + self.stride = stride + self.kernel_size = kernel_size + klass = nn.Conv1d + klass_tr = nn.ConvTranspose1d + if freq: + kernel_size = [kernel_size, 1] + stride = [stride, 1] + klass = nn.Conv2d + klass_tr = nn.ConvTranspose2d + self.conv_tr = klass_tr(chin, chout, kernel_size, stride) + self.norm2 = norm_fn(chout) + if self.empty: + self.rewrite = nn.Identity() + self.norm1 = nn.Identity() + else: + self.rewrite = klass(chin, 2 * chin, 1 + 2 * context, 1, context) + self.norm1 = norm_fn(2 * chin) + + def forward(self, x: torch.Tensor, skip: Optional[torch.Tensor], length): + r"""Forward pass for decoding layer. + + Size depends on whether frequency or time + + Args: + x (torch.Tensor): tensor input of shape `(B, C, F, T)` for frequency and shape + `(B, C, T)` for time + skip (torch.Tensor, optional): on first layer, separate frequency and time branches using param + (default: ``None``) + length (int): Size of tensor for output + + Returns: + (Tensor, Tensor): + Tensor + output tensor after decoder layer of shape `(B, C, F * stride, T)` for frequency domain except last + frequency layer shape is `(B, C, kernel_size, T)`. Shape is `(B, C, stride * T)` + for time domain. + Tensor + contains the output just before final transposed convolution, which is used when the + freq. and time branch separate. Otherwise, does not matter. Shape is + `(B, C, F, T)` for frequency and `(B, C, T)` for time. + """ + if self.freq and x.dim() == 3: + B, C, T = x.shape + x = x.view(B, self.chin, -1, T) + + if not self.empty: + x = x + skip + y = F.glu(self.norm1(self.rewrite(x)), dim=1) + else: + y = x + if skip is not None: + raise ValueError("Skip must be none when empty is true.") + + z = self.norm2(self.conv_tr(y)) + if self.freq: + if self.pad: + z = z[..., self.pad : -self.pad, :] + else: + z = z[..., self.pad : self.pad + length] + if z.shape[-1] != length: + raise ValueError("Last index of z must be equal to length") + if not self.last: + z = F.gelu(z) + + return z, y + + +class HDemucs(torch.nn.Module): + r"""Hybrid Demucs model from + *Hybrid Spectrogram and Waveform Source Separation* :cite:`defossez2021hybrid`. + + See Also: + * :class:`torchaudio.pipelines.SourceSeparationBundle`: Source separation pipeline with pre-trained models. + + Args: + sources (List[str]): list of source names. List can contain the following source + options: [``"bass"``, ``"drums"``, ``"other"``, ``"mixture"``, ``"vocals"``]. + audio_channels (int, optional): input/output audio channels. (Default: 2) + channels (int, optional): initial number of hidden channels. (Default: 48) + growth (int, optional): increase the number of hidden channels by this factor at each layer. (Default: 2) + nfft (int, optional): number of fft bins. Note that changing this requires careful computation of + various shape parameters and will not work out of the box for hybrid models. (Default: 4096) + depth (int, optional): number of layers in encoder and decoder (Default: 6) + freq_emb (float, optional): add frequency embedding after the first frequency layer if > 0, + the actual value controls the weight of the embedding. (Default: 0.2) + emb_scale (int, optional): equivalent to scaling the embedding learning rate (Default: 10) + emb_smooth (bool, optional): initialize the embedding with a smooth one (with respect to frequencies). + (Default: ``True``) + kernel_size (int, optional): kernel_size for encoder and decoder layers. (Default: 8) + time_stride (int, optional): stride for the final time layer, after the merge. (Default: 2) + stride (int, optional): stride for encoder and decoder layers. (Default: 4) + context (int, optional): context for 1x1 conv in the decoder. (Default: 4) + context_enc (int, optional): context for 1x1 conv in the encoder. (Default: 0) + norm_starts (int, optional): layer at which group norm starts being used. + decoder layers are numbered in reverse order. (Default: 4) + norm_groups (int, optional): number of groups for group norm. (Default: 4) + dconv_depth (int, optional): depth of residual DConv branch. (Default: 2) + dconv_comp (int, optional): compression of DConv branch. (Default: 4) + dconv_attn (int, optional): adds attention layers in DConv branch starting at this layer. (Default: 4) + dconv_lstm (int, optional): adds a LSTM layer in DConv branch starting at this layer. (Default: 4) + dconv_init (float, optional): initial scale for the DConv branch LayerScale. (Default: 1e-4) + """ + + def __init__( + self, + sources: List[str], + audio_channels: int = 2, + channels: int = 48, + growth: int = 2, + nfft: int = 4096, + depth: int = 6, + freq_emb: float = 0.2, + emb_scale: int = 10, + emb_smooth: bool = True, + kernel_size: int = 8, + time_stride: int = 2, + stride: int = 4, + context: int = 1, + context_enc: int = 0, + norm_starts: int = 4, + norm_groups: int = 4, + dconv_depth: int = 2, + dconv_comp: int = 4, + dconv_attn: int = 4, + dconv_lstm: int = 4, + dconv_init: float = 1e-4, + ): + super().__init__() + self.depth = depth + self.nfft = nfft + self.audio_channels = audio_channels + self.sources = sources + self.kernel_size = kernel_size + self.context = context + self.stride = stride + self.channels = channels + + self.hop_length = self.nfft // 4 + self.freq_emb = None + + self.freq_encoder = nn.ModuleList() + self.freq_decoder = nn.ModuleList() + + self.time_encoder = nn.ModuleList() + self.time_decoder = nn.ModuleList() + + chin = audio_channels + chin_z = chin * 2 # number of channels for the freq branch + chout = channels + chout_z = channels + freqs = self.nfft // 2 + + for index in range(self.depth): + lstm = index >= dconv_lstm + attn = index >= dconv_attn + norm_type = "group_norm" if index >= norm_starts else "none" + freq = freqs > 1 + stri = stride + ker = kernel_size + if not freq: + if freqs != 1: + raise ValueError("When freq is false, freqs must be 1.") + ker = time_stride * 2 + stri = time_stride + + pad = True + last_freq = False + if freq and freqs <= kernel_size: + ker = freqs + pad = False + last_freq = True + + kw = { + "kernel_size": ker, + "stride": stri, + "freq": freq, + "pad": pad, + "norm_type": norm_type, + "norm_groups": norm_groups, + "dconv_kw": { + "lstm": lstm, + "attn": attn, + "depth": dconv_depth, + "compress": dconv_comp, + "init": dconv_init, + }, + } + kwt = dict(kw) + kwt["freq"] = 0 + kwt["kernel_size"] = kernel_size + kwt["stride"] = stride + kwt["pad"] = True + kw_dec = dict(kw) + + if last_freq: + chout_z = max(chout, chout_z) + chout = chout_z + + enc = _HEncLayer(chin_z, chout_z, context=context_enc, **kw) + if freq: + if last_freq is True and nfft == 2048: + kwt["stride"] = 2 + kwt["kernel_size"] = 4 + tenc = _HEncLayer(chin, chout, context=context_enc, empty=last_freq, **kwt) + self.time_encoder.append(tenc) + + self.freq_encoder.append(enc) + if index == 0: + chin = self.audio_channels * len(self.sources) + chin_z = chin * 2 + dec = _HDecLayer(chout_z, chin_z, last=index == 0, context=context, **kw_dec) + if freq: + tdec = _HDecLayer(chout, chin, empty=last_freq, last=index == 0, context=context, **kwt) + self.time_decoder.insert(0, tdec) + self.freq_decoder.insert(0, dec) + + chin = chout + chin_z = chout_z + chout = int(growth * chout) + chout_z = int(growth * chout_z) + if freq: + if freqs <= kernel_size: + freqs = 1 + else: + freqs //= stride + if index == 0 and freq_emb: + self.freq_emb = _ScaledEmbedding(freqs, chin_z, smooth=emb_smooth, scale=emb_scale) + self.freq_emb_scale = freq_emb + + _rescale_module(self) + + def _spec(self, x): + hl = self.hop_length + nfft = self.nfft + x0 = x # noqa + + # We re-pad the signal in order to keep the property + # that the size of the output is exactly the size of the input + # divided by the stride (here hop_length), when divisible. + # This is achieved by padding by 1/4th of the kernel size (here nfft). + # which is not supported by torch.stft. + # Having all convolution operations follow this convention allow to easily + # align the time and frequency branches later on. + if hl != nfft // 4: + raise ValueError("Hop length must be nfft // 4") + le = int(math.ceil(x.shape[-1] / hl)) + pad = hl // 2 * 3 + x = self._pad1d(x, pad, pad + le * hl - x.shape[-1], mode="reflect") + + z = _spectro(x, nfft, hl)[..., :-1, :] + if z.shape[-1] != le + 4: + raise ValueError("Spectrogram's last dimension must be 4 + input size divided by stride") + z = z[..., 2 : 2 + le] + return z + + def _ispec(self, z, length=None): + hl = self.hop_length + z = F.pad(z, [0, 0, 0, 1]) + z = F.pad(z, [2, 2]) + pad = hl // 2 * 3 + le = hl * int(math.ceil(length / hl)) + 2 * pad + x = _ispectro(z, hl, length=le) + x = x[..., pad : pad + length] + return x + + def _pad1d(self, x: torch.Tensor, padding_left: int, padding_right: int, mode: str = "zero", value: float = 0.0): + """Wrapper around F.pad, in order for reflect padding when num_frames is shorter than max_pad. + Add extra zero padding around in order for padding to not break.""" + length = x.shape[-1] + if mode == "reflect": + max_pad = max(padding_left, padding_right) + if length <= max_pad: + x = F.pad(x, (0, max_pad - length + 1)) + return F.pad(x, (padding_left, padding_right), mode, value) + + def _magnitude(self, z): + # move the complex dimension to the channel one. + B, C, Fr, T = z.shape + m = torch.view_as_real(z).permute(0, 1, 4, 2, 3) + m = m.reshape(B, C * 2, Fr, T) + return m + + def _mask(self, m): + # `m` is a full spectrogram and `z` is ignored. + B, S, C, Fr, T = m.shape + out = m.view(B, S, -1, 2, Fr, T).permute(0, 1, 2, 4, 5, 3) + out = torch.view_as_complex(out.contiguous()) + return out + + def forward(self, input: torch.Tensor): + + r"""HDemucs forward call + + Args: + input (torch.Tensor): input mixed tensor of shape `(batch_size, channel, num_frames)` + + Returns: + Tensor + output tensor split into sources of shape `(batch_size, num_sources, channel, num_frames)` + """ + + if input.ndim != 3: + raise ValueError(f"Expected 3D tensor with dimensions (batch, channel, frames). Found: {input.shape}") + + if input.shape[1] != self.audio_channels: + raise ValueError( + f"The channel dimension of input Tensor must match `audio_channels` of HDemucs model. " + f"Found:{input.shape[1]}." + ) + + x = input + length = x.shape[-1] + + z = self._spec(input) + mag = self._magnitude(z) + x = mag + + B, C, Fq, T = x.shape + + # unlike previous Demucs, we always normalize because it is easier. + mean = x.mean(dim=(1, 2, 3), keepdim=True) + std = x.std(dim=(1, 2, 3), keepdim=True) + x = (x - mean) / (1e-5 + std) + # x will be the freq. branch input. + + # Prepare the time branch input. + xt = input + meant = xt.mean(dim=(1, 2), keepdim=True) + stdt = xt.std(dim=(1, 2), keepdim=True) + xt = (xt - meant) / (1e-5 + stdt) + + saved = [] # skip connections, freq. + saved_t = [] # skip connections, time. + lengths: List[int] = [] # saved lengths to properly remove padding, freq branch. + lengths_t: List[int] = [] # saved lengths for time branch. + + for idx, encode in enumerate(self.freq_encoder): + lengths.append(x.shape[-1]) + inject = None + if idx < len(self.time_encoder): + # we have not yet merged branches. + lengths_t.append(xt.shape[-1]) + tenc = self.time_encoder[idx] + xt = tenc(xt) + if not tenc.empty: + # save for skip connection + saved_t.append(xt) + else: + # tenc contains just the first conv., so that now time and freq. + # branches have the same shape and can be merged. + inject = xt + x = encode(x, inject) + if idx == 0 and self.freq_emb is not None: + # add frequency embedding to allow for non equivariant convolutions + # over the frequency axis. + frs = torch.arange(x.shape[-2], device=x.device) + emb = self.freq_emb(frs).t()[None, :, :, None].expand_as(x) + x = x + self.freq_emb_scale * emb + + saved.append(x) + + x = torch.zeros_like(x) + xt = torch.zeros_like(x) + # initialize everything to zero (signal will go through u-net skips). + + for idx, decode in enumerate(self.freq_decoder): + skip = saved.pop(-1) + x, pre = decode(x, skip, lengths.pop(-1)) + # `pre` contains the output just before final transposed convolution, + # which is used when the freq. and time branch separate. + offset = self.depth - len(self.time_decoder) + if idx >= offset: + tdec = self.time_decoder[idx - offset] + length_t = lengths_t.pop(-1) + if tdec.empty: + if pre.shape[2] != 1: + raise ValueError(f"If tdec empty is True, pre shape does not match {pre.shape}") + pre = pre[:, :, 0] + xt, _ = tdec(pre, None, length_t) + else: + skip = saved_t.pop(-1) + xt, _ = tdec(xt, skip, length_t) + + if len(saved) != 0: + raise AssertionError("saved is not empty") + if len(lengths_t) != 0: + raise AssertionError("lengths_t is not empty") + if len(saved_t) != 0: + raise AssertionError("saved_t is not empty") + + S = len(self.sources) + x = x.view(B, S, -1, Fq, T) + x = x * std[:, None] + mean[:, None] + + zout = self._mask(x) + x = self._ispec(zout, length) + + xt = xt.view(B, S, -1, length) + xt = xt * stdt[:, None] + meant[:, None] + x = xt + x + return x + + +class _DConv(torch.nn.Module): + r""" + New residual branches in each encoder layer. + This alternates dilated convolutions, potentially with LSTMs and attention. + Also before entering each residual branch, dimension is projected on a smaller subspace, + e.g. of dim `channels // compress`. + + Args: + channels (int): input/output channels for residual branch. + compress (float, optional): amount of channel compression inside the branch. (default: 4) + depth (int, optional): number of layers in the residual branch. Each layer has its own + projection, and potentially LSTM and attention.(default: 2) + init (float, optional): initial scale for LayerNorm. (default: 1e-4) + norm_type (bool, optional): Norm type, either ``group_norm `` or ``none`` (Default: ``group_norm``) + attn (bool, optional): use LocalAttention. (Default: ``False``) + heads (int, optional): number of heads for the LocalAttention. (default: 4) + ndecay (int, optional): number of decay controls in the LocalAttention. (default: 4) + lstm (bool, optional): use LSTM. (Default: ``False``) + kernel_size (int, optional): kernel size for the (dilated) convolutions. (default: 3) + """ + + def __init__( + self, + channels: int, + compress: float = 4, + depth: int = 2, + init: float = 1e-4, + norm_type: str = "group_norm", + attn: bool = False, + heads: int = 4, + ndecay: int = 4, + lstm: bool = False, + kernel_size: int = 3, + ): + + super().__init__() + if kernel_size % 2 == 0: + raise ValueError("Kernel size should not be divisible by 2") + self.channels = channels + self.compress = compress + self.depth = abs(depth) + dilate = depth > 0 + + norm_fn: tp.Callable[[int], nn.Module] + norm_fn = lambda d: nn.Identity() # noqa + if norm_type == "group_norm": + norm_fn = lambda d: nn.GroupNorm(1, d) # noqa + + hidden = int(channels / compress) + + act = nn.GELU + + self.layers = nn.ModuleList([]) + for d in range(self.depth): + dilation = pow(2, d) if dilate else 1 + padding = dilation * (kernel_size // 2) + mods = [ + nn.Conv1d(channels, hidden, kernel_size, dilation=dilation, padding=padding), + norm_fn(hidden), + act(), + nn.Conv1d(hidden, 2 * channels, 1), + norm_fn(2 * channels), + nn.GLU(1), + _LayerScale(channels, init), + ] + if attn: + mods.insert(3, _LocalState(hidden, heads=heads, ndecay=ndecay)) + if lstm: + mods.insert(3, _BLSTM(hidden, layers=2, skip=True)) + layer = nn.Sequential(*mods) + self.layers.append(layer) + + def forward(self, x): + r"""DConv forward call + + Args: + x (torch.Tensor): input tensor for convolution + + Returns: + Tensor + Output after being run through layers. + """ + for layer in self.layers: + x = x + layer(x) + return x + + +class _BLSTM(torch.nn.Module): + r""" + BiLSTM with same hidden units as input dim. + If `max_steps` is not None, input will be splitting in overlapping + chunks and the LSTM applied separately on each chunk. + Args: + dim (int): dimensions at LSTM layer. + layers (int, optional): number of LSTM layers. (default: 1) + skip (bool, optional): (default: ``False``) + """ + + def __init__(self, dim, layers: int = 1, skip: bool = False): + super().__init__() + self.max_steps = 200 + self.lstm = nn.LSTM(bidirectional=True, num_layers=layers, hidden_size=dim, input_size=dim) + self.linear = nn.Linear(2 * dim, dim) + self.skip = skip + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""BLSTM forward call + + Args: + x (torch.Tensor): input tensor for BLSTM shape is `(batch_size, dim, time_steps)` + + Returns: + Tensor + Output after being run through bidirectional LSTM. Shape is `(batch_size, dim, time_steps)` + """ + B, C, T = x.shape + y = x + framed = False + width = 0 + stride = 0 + nframes = 0 + if self.max_steps is not None and T > self.max_steps: + width = self.max_steps + stride = width // 2 + frames = _unfold(x, width, stride) + nframes = frames.shape[2] + framed = True + x = frames.permute(0, 2, 1, 3).reshape(-1, C, width) + + x = x.permute(2, 0, 1) + + x = self.lstm(x)[0] + x = self.linear(x) + x = x.permute(1, 2, 0) + if framed: + out = [] + frames = x.reshape(B, -1, C, width) + limit = stride // 2 + for k in range(nframes): + if k == 0: + out.append(frames[:, k, :, :-limit]) + elif k == nframes - 1: + out.append(frames[:, k, :, limit:]) + else: + out.append(frames[:, k, :, limit:-limit]) + out = torch.cat(out, -1) + out = out[..., :T] + x = out + if self.skip: + x = x + y + + return x + + +class _LocalState(nn.Module): + """Local state allows to have attention based only on data (no positional embedding), + but while setting a constraint on the time window (e.g. decaying penalty term). + Also a failed experiments with trying to provide some frequency based attention. + """ + + def __init__(self, channels: int, heads: int = 4, ndecay: int = 4): + r""" + Args: + channels (int): Size of Conv1d layers. + heads (int, optional): (default: 4) + ndecay (int, optional): (default: 4) + """ + super(_LocalState, self).__init__() + if channels % heads != 0: + raise ValueError("Channels must be divisible by heads.") + self.heads = heads + self.ndecay = ndecay + self.content = nn.Conv1d(channels, channels, 1) + self.query = nn.Conv1d(channels, channels, 1) + self.key = nn.Conv1d(channels, channels, 1) + + self.query_decay = nn.Conv1d(channels, heads * ndecay, 1) + if ndecay: + # Initialize decay close to zero (there is a sigmoid), for maximum initial window. + self.query_decay.weight.data *= 0.01 + if self.query_decay.bias is None: + raise ValueError("bias must not be None.") + self.query_decay.bias.data[:] = -2 + self.proj = nn.Conv1d(channels + heads * 0, channels, 1) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""LocalState forward call + + Args: + x (torch.Tensor): input tensor for LocalState + + Returns: + Tensor + Output after being run through LocalState layer. + """ + B, C, T = x.shape + heads = self.heads + indexes = torch.arange(T, device=x.device, dtype=x.dtype) + # left index are keys, right index are queries + delta = indexes[:, None] - indexes[None, :] + + queries = self.query(x).view(B, heads, -1, T) + keys = self.key(x).view(B, heads, -1, T) + # t are keys, s are queries + dots = torch.einsum("bhct,bhcs->bhts", keys, queries) + dots /= math.sqrt(keys.shape[2]) + if self.ndecay: + decays = torch.arange(1, self.ndecay + 1, device=x.device, dtype=x.dtype) + decay_q = self.query_decay(x).view(B, heads, -1, T) + decay_q = torch.sigmoid(decay_q) / 2 + decay_kernel = -decays.view(-1, 1, 1) * delta.abs() / math.sqrt(self.ndecay) + dots += torch.einsum("fts,bhfs->bhts", decay_kernel, decay_q) + + # Kill self reference. + dots.masked_fill_(torch.eye(T, device=dots.device, dtype=torch.bool), -100) + weights = torch.softmax(dots, dim=2) + + content = self.content(x).view(B, heads, -1, T) + result = torch.einsum("bhts,bhct->bhcs", weights, content) + result = result.reshape(B, -1, T) + return x + self.proj(result) + + +class _LayerScale(nn.Module): + """Layer scale from [Touvron et al 2021] (https://arxiv.org/pdf/2103.17239.pdf). + This rescales diagonally residual outputs close to 0 initially, then learnt. + """ + + def __init__(self, channels: int, init: float = 0): + r""" + Args: + channels (int): Size of rescaling + init (float, optional): Scale to default to (default: 0) + """ + super().__init__() + self.scale = nn.Parameter(torch.zeros(channels, requires_grad=True)) + self.scale.data[:] = init + + def forward(self, x: torch.Tensor) -> torch.Tensor: + r"""LayerScale forward call + + Args: + x (torch.Tensor): input tensor for LayerScale + + Returns: + Tensor + Output after rescaling tensor. + """ + return self.scale[:, None] * x + + +def _unfold(a: torch.Tensor, kernel_size: int, stride: int) -> torch.Tensor: + """Given input of size [*OT, T], output Tensor of size [*OT, F, K] + with K the kernel size, by extracting frames with the given stride. + This will pad the input so that `F = ceil(T / K)`. + see https://github.com/pytorch/pytorch/issues/60466 + """ + shape = list(a.shape[:-1]) + length = int(a.shape[-1]) + n_frames = math.ceil(length / stride) + tgt_length = (n_frames - 1) * stride + kernel_size + a = F.pad(input=a, pad=[0, tgt_length - length]) + strides = [a.stride(dim) for dim in range(a.dim())] + if strides[-1] != 1: + raise ValueError("Data should be contiguous.") + strides = strides[:-1] + [stride, 1] + shape.append(n_frames) + shape.append(kernel_size) + return a.as_strided(shape, strides) + + +def _rescale_module(module): + r""" + Rescales initial weight scale for all models within the module. + """ + for sub in module.modules(): + if isinstance(sub, (nn.Conv1d, nn.ConvTranspose1d, nn.Conv2d, nn.ConvTranspose2d)): + std = sub.weight.std().detach() + scale = (std / 0.1) ** 0.5 + sub.weight.data /= scale + if sub.bias is not None: + sub.bias.data /= scale + + +def _spectro(x: torch.Tensor, n_fft: int = 512, hop_length: int = 0, pad: int = 0) -> torch.Tensor: + other = list(x.shape[:-1]) + length = int(x.shape[-1]) + x = x.reshape(-1, length) + z = torch.stft( + x, + n_fft * (1 + pad), + hop_length, + window=torch.hann_window(n_fft).to(x), + win_length=n_fft, + normalized=True, + center=True, + return_complex=True, + pad_mode="reflect", + ) + _, freqs, frame = z.shape + other.extend([freqs, frame]) + return z.view(other) + + +def _ispectro(z: torch.Tensor, hop_length: int = 0, length: int = 0, pad: int = 0) -> torch.Tensor: + other = list(z.shape[:-2]) + freqs = int(z.shape[-2]) + frames = int(z.shape[-1]) + + n_fft = 2 * freqs - 2 + z = z.view(-1, freqs, frames) + win_length = n_fft // (1 + pad) + x = torch.istft( + z, + n_fft, + hop_length, + window=torch.hann_window(win_length).to(z.real), + win_length=win_length, + normalized=True, + length=length, + center=True, + ) + _, length = x.shape + other.append(length) + return x.view(other) + + +def hdemucs_low(sources: List[str]) -> HDemucs: + """Builds low nfft (1024) version of :class:`HDemucs`, suitable for sample rates around 8 kHz. + + Args: + sources (List[str]): See :py:func:`HDemucs`. + + Returns: + HDemucs: + HDemucs model. + """ + + return HDemucs(sources=sources, nfft=1024, depth=5) + + +def hdemucs_medium(sources: List[str]) -> HDemucs: + r"""Builds medium nfft (2048) version of :class:`HDemucs`, suitable for sample rates of 16-32 kHz. + + .. note:: + + Medium HDemucs has not been tested against the original Hybrid Demucs as this nfft and depth configuration is + not compatible with the original implementation in https://github.com/facebookresearch/demucs + + Args: + sources (List[str]): See :py:func:`HDemucs`. + + Returns: + HDemucs: + HDemucs model. + """ + + return HDemucs(sources=sources, nfft=2048, depth=6) + + +def hdemucs_high(sources: List[str]) -> HDemucs: + r"""Builds medium nfft (4096) version of :class:`HDemucs`, suitable for sample rates of 44.1-48 kHz. + + Args: + sources (List[str]): See :py:func:`HDemucs`. + + Returns: + HDemucs: + HDemucs model. + """ + + return HDemucs(sources=sources, nfft=4096, depth=6) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/conformer.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/conformer.py new file mode 100644 index 0000000000000000000000000000000000000000..aaf3d6724112397853f18cb742acbdc9b691bd4a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/conformer.py @@ -0,0 +1,293 @@ +from typing import Optional, Tuple + +import torch + + +__all__ = ["Conformer"] + + +def _lengths_to_padding_mask(lengths: torch.Tensor) -> torch.Tensor: + batch_size = lengths.shape[0] + max_length = int(torch.max(lengths).item()) + padding_mask = torch.arange(max_length, device=lengths.device, dtype=lengths.dtype).expand( + batch_size, max_length + ) >= lengths.unsqueeze(1) + return padding_mask + + +class _ConvolutionModule(torch.nn.Module): + r"""Conformer convolution module. + + Args: + input_dim (int): input dimension. + num_channels (int): number of depthwise convolution layer input channels. + depthwise_kernel_size (int): kernel size of depthwise convolution layer. + dropout (float, optional): dropout probability. (Default: 0.0) + bias (bool, optional): indicates whether to add bias term to each convolution layer. (Default: ``False``) + use_group_norm (bool, optional): use GroupNorm rather than BatchNorm. (Default: ``False``) + """ + + def __init__( + self, + input_dim: int, + num_channels: int, + depthwise_kernel_size: int, + dropout: float = 0.0, + bias: bool = False, + use_group_norm: bool = False, + ) -> None: + super().__init__() + if (depthwise_kernel_size - 1) % 2 != 0: + raise ValueError("depthwise_kernel_size must be odd to achieve 'SAME' padding.") + self.layer_norm = torch.nn.LayerNorm(input_dim) + self.sequential = torch.nn.Sequential( + torch.nn.Conv1d( + input_dim, + 2 * num_channels, + 1, + stride=1, + padding=0, + bias=bias, + ), + torch.nn.GLU(dim=1), + torch.nn.Conv1d( + num_channels, + num_channels, + depthwise_kernel_size, + stride=1, + padding=(depthwise_kernel_size - 1) // 2, + groups=num_channels, + bias=bias, + ), + torch.nn.GroupNorm(num_groups=1, num_channels=num_channels) + if use_group_norm + else torch.nn.BatchNorm1d(num_channels), + torch.nn.SiLU(), + torch.nn.Conv1d( + num_channels, + input_dim, + kernel_size=1, + stride=1, + padding=0, + bias=bias, + ), + torch.nn.Dropout(dropout), + ) + + def forward(self, input: torch.Tensor) -> torch.Tensor: + r""" + Args: + input (torch.Tensor): with shape `(B, T, D)`. + + Returns: + torch.Tensor: output, with shape `(B, T, D)`. + """ + x = self.layer_norm(input) + x = x.transpose(1, 2) + x = self.sequential(x) + return x.transpose(1, 2) + + +class _FeedForwardModule(torch.nn.Module): + r"""Positionwise feed forward layer. + + Args: + input_dim (int): input dimension. + hidden_dim (int): hidden dimension. + dropout (float, optional): dropout probability. (Default: 0.0) + """ + + def __init__(self, input_dim: int, hidden_dim: int, dropout: float = 0.0) -> None: + super().__init__() + self.sequential = torch.nn.Sequential( + torch.nn.LayerNorm(input_dim), + torch.nn.Linear(input_dim, hidden_dim, bias=True), + torch.nn.SiLU(), + torch.nn.Dropout(dropout), + torch.nn.Linear(hidden_dim, input_dim, bias=True), + torch.nn.Dropout(dropout), + ) + + def forward(self, input: torch.Tensor) -> torch.Tensor: + r""" + Args: + input (torch.Tensor): with shape `(*, D)`. + + Returns: + torch.Tensor: output, with shape `(*, D)`. + """ + return self.sequential(input) + + +class ConformerLayer(torch.nn.Module): + r"""Conformer layer that constitutes Conformer. + + Args: + input_dim (int): input dimension. + ffn_dim (int): hidden layer dimension of feedforward network. + num_attention_heads (int): number of attention heads. + depthwise_conv_kernel_size (int): kernel size of depthwise convolution layer. + dropout (float, optional): dropout probability. (Default: 0.0) + use_group_norm (bool, optional): use ``GroupNorm`` rather than ``BatchNorm1d`` + in the convolution module. (Default: ``False``) + convolution_first (bool, optional): apply the convolution module ahead of + the attention module. (Default: ``False``) + """ + + def __init__( + self, + input_dim: int, + ffn_dim: int, + num_attention_heads: int, + depthwise_conv_kernel_size: int, + dropout: float = 0.0, + use_group_norm: bool = False, + convolution_first: bool = False, + ) -> None: + super().__init__() + + self.ffn1 = _FeedForwardModule(input_dim, ffn_dim, dropout=dropout) + + self.self_attn_layer_norm = torch.nn.LayerNorm(input_dim) + self.self_attn = torch.nn.MultiheadAttention(input_dim, num_attention_heads, dropout=dropout) + self.self_attn_dropout = torch.nn.Dropout(dropout) + + self.conv_module = _ConvolutionModule( + input_dim=input_dim, + num_channels=input_dim, + depthwise_kernel_size=depthwise_conv_kernel_size, + dropout=dropout, + bias=True, + use_group_norm=use_group_norm, + ) + + self.ffn2 = _FeedForwardModule(input_dim, ffn_dim, dropout=dropout) + self.final_layer_norm = torch.nn.LayerNorm(input_dim) + self.convolution_first = convolution_first + + def _apply_convolution(self, input: torch.Tensor) -> torch.Tensor: + residual = input + input = input.transpose(0, 1) + input = self.conv_module(input) + input = input.transpose(0, 1) + input = residual + input + return input + + def forward(self, input: torch.Tensor, key_padding_mask: Optional[torch.Tensor]) -> torch.Tensor: + r""" + Args: + input (torch.Tensor): input, with shape `(T, B, D)`. + key_padding_mask (torch.Tensor or None): key padding mask to use in self attention layer. + + Returns: + torch.Tensor: output, with shape `(T, B, D)`. + """ + residual = input + x = self.ffn1(input) + x = x * 0.5 + residual + + if self.convolution_first: + x = self._apply_convolution(x) + + residual = x + x = self.self_attn_layer_norm(x) + x, _ = self.self_attn( + query=x, + key=x, + value=x, + key_padding_mask=key_padding_mask, + need_weights=False, + ) + x = self.self_attn_dropout(x) + x = x + residual + + if not self.convolution_first: + x = self._apply_convolution(x) + + residual = x + x = self.ffn2(x) + x = x * 0.5 + residual + + x = self.final_layer_norm(x) + return x + + +class Conformer(torch.nn.Module): + r"""Conformer architecture introduced in + *Conformer: Convolution-augmented Transformer for Speech Recognition* + :cite:`gulati2020conformer`. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads in each Conformer layer. + ffn_dim (int): hidden layer dimension of feedforward networks. + num_layers (int): number of Conformer layers to instantiate. + depthwise_conv_kernel_size (int): kernel size of each Conformer layer's depthwise convolution layer. + dropout (float, optional): dropout probability. (Default: 0.0) + use_group_norm (bool, optional): use ``GroupNorm`` rather than ``BatchNorm1d`` + in the convolution module. (Default: ``False``) + convolution_first (bool, optional): apply the convolution module ahead of + the attention module. (Default: ``False``) + + Examples: + >>> conformer = Conformer( + >>> input_dim=80, + >>> num_heads=4, + >>> ffn_dim=128, + >>> num_layers=4, + >>> depthwise_conv_kernel_size=31, + >>> ) + >>> lengths = torch.randint(1, 400, (10,)) # (batch,) + >>> input = torch.rand(10, int(lengths.max()), input_dim) # (batch, num_frames, input_dim) + >>> output = conformer(input, lengths) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + ffn_dim: int, + num_layers: int, + depthwise_conv_kernel_size: int, + dropout: float = 0.0, + use_group_norm: bool = False, + convolution_first: bool = False, + ): + super().__init__() + + self.conformer_layers = torch.nn.ModuleList( + [ + ConformerLayer( + input_dim, + ffn_dim, + num_heads, + depthwise_conv_kernel_size, + dropout=dropout, + use_group_norm=use_group_norm, + convolution_first=convolution_first, + ) + for _ in range(num_layers) + ] + ) + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r""" + Args: + input (torch.Tensor): with shape `(B, T, input_dim)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + + Returns: + (torch.Tensor, torch.Tensor) + torch.Tensor + output frames, with shape `(B, T, input_dim)` + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output frames. + """ + encoder_padding_mask = _lengths_to_padding_mask(lengths) + + x = input.transpose(0, 1) + for layer in self.conformer_layers: + x = layer(x, encoder_padding_mask) + return x.transpose(0, 1), lengths diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/conv_tasnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/conv_tasnet.py new file mode 100644 index 0000000000000000000000000000000000000000..3f570a32c9e4c44fa48decac6ea9f67284395820 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/conv_tasnet.py @@ -0,0 +1,330 @@ +"""Implements Conv-TasNet with building blocks of it. + +Based on https://github.com/naplab/Conv-TasNet/tree/e66d82a8f956a69749ec8a4ae382217faa097c5c +""" + +from typing import Optional, Tuple + +import torch + + +class ConvBlock(torch.nn.Module): + """1D Convolutional block. + + Args: + io_channels (int): The number of input/output channels, + hidden_channels (int): The number of channels in the internal layers, . + kernel_size (int): The convolution kernel size of the middle layer,

. + padding (int): Padding value of the convolution in the middle layer. + dilation (int, optional): Dilation value of the convolution in the middle layer. + no_redisual (bool, optional): Disable residual block/output. + + Note: + This implementation corresponds to the "non-causal" setting in the paper. + """ + + def __init__( + self, + io_channels: int, + hidden_channels: int, + kernel_size: int, + padding: int, + dilation: int = 1, + no_residual: bool = False, + ): + super().__init__() + + self.conv_layers = torch.nn.Sequential( + torch.nn.Conv1d(in_channels=io_channels, out_channels=hidden_channels, kernel_size=1), + torch.nn.PReLU(), + torch.nn.GroupNorm(num_groups=1, num_channels=hidden_channels, eps=1e-08), + torch.nn.Conv1d( + in_channels=hidden_channels, + out_channels=hidden_channels, + kernel_size=kernel_size, + padding=padding, + dilation=dilation, + groups=hidden_channels, + ), + torch.nn.PReLU(), + torch.nn.GroupNorm(num_groups=1, num_channels=hidden_channels, eps=1e-08), + ) + + self.res_out = ( + None + if no_residual + else torch.nn.Conv1d(in_channels=hidden_channels, out_channels=io_channels, kernel_size=1) + ) + self.skip_out = torch.nn.Conv1d(in_channels=hidden_channels, out_channels=io_channels, kernel_size=1) + + def forward(self, input: torch.Tensor) -> Tuple[Optional[torch.Tensor], torch.Tensor]: + feature = self.conv_layers(input) + if self.res_out is None: + residual = None + else: + residual = self.res_out(feature) + skip_out = self.skip_out(feature) + return residual, skip_out + + +class MaskGenerator(torch.nn.Module): + """TCN (Temporal Convolution Network) Separation Module + + Generates masks for separation. + + Args: + input_dim (int): Input feature dimension, . + num_sources (int): The number of sources to separate. + kernel_size (int): The convolution kernel size of conv blocks,

. + num_featrs (int): Input/output feature dimenstion of conv blocks, . + num_hidden (int): Intermediate feature dimention of conv blocks, + num_layers (int): The number of conv blocks in one stack, . + num_stacks (int): The number of conv block stacks, . + msk_activate (str): The activation function of the mask output. + + Note: + This implementation corresponds to the "non-causal" setting in the paper. + """ + + def __init__( + self, + input_dim: int, + num_sources: int, + kernel_size: int, + num_feats: int, + num_hidden: int, + num_layers: int, + num_stacks: int, + msk_activate: str, + ): + super().__init__() + + self.input_dim = input_dim + self.num_sources = num_sources + + self.input_norm = torch.nn.GroupNorm(num_groups=1, num_channels=input_dim, eps=1e-8) + self.input_conv = torch.nn.Conv1d(in_channels=input_dim, out_channels=num_feats, kernel_size=1) + + self.receptive_field = 0 + self.conv_layers = torch.nn.ModuleList([]) + for s in range(num_stacks): + for l in range(num_layers): + multi = 2**l + self.conv_layers.append( + ConvBlock( + io_channels=num_feats, + hidden_channels=num_hidden, + kernel_size=kernel_size, + dilation=multi, + padding=multi, + # The last ConvBlock does not need residual + no_residual=(l == (num_layers - 1) and s == (num_stacks - 1)), + ) + ) + self.receptive_field += kernel_size if s == 0 and l == 0 else (kernel_size - 1) * multi + self.output_prelu = torch.nn.PReLU() + self.output_conv = torch.nn.Conv1d( + in_channels=num_feats, + out_channels=input_dim * num_sources, + kernel_size=1, + ) + if msk_activate == "sigmoid": + self.mask_activate = torch.nn.Sigmoid() + elif msk_activate == "relu": + self.mask_activate = torch.nn.ReLU() + else: + raise ValueError(f"Unsupported activation {msk_activate}") + + def forward(self, input: torch.Tensor) -> torch.Tensor: + """Generate separation mask. + + Args: + input (torch.Tensor): 3D Tensor with shape [batch, features, frames] + + Returns: + Tensor: shape [batch, num_sources, features, frames] + """ + batch_size = input.shape[0] + feats = self.input_norm(input) + feats = self.input_conv(feats) + output = 0.0 + for layer in self.conv_layers: + residual, skip = layer(feats) + if residual is not None: # the last conv layer does not produce residual + feats = feats + residual + output = output + skip + output = self.output_prelu(output) + output = self.output_conv(output) + output = self.mask_activate(output) + return output.view(batch_size, self.num_sources, self.input_dim, -1) + + +class ConvTasNet(torch.nn.Module): + """Conv-TasNet architecture introduced in + *Conv-TasNet: Surpassing Ideal Time–Frequency Magnitude Masking for Speech Separation* + :cite:`Luo_2019`. + + Note: + This implementation corresponds to the "non-causal" setting in the paper. + + See Also: + * :class:`torchaudio.pipelines.SourceSeparationBundle`: Source separation pipeline with pre-trained models. + + Args: + num_sources (int, optional): The number of sources to split. + enc_kernel_size (int, optional): The convolution kernel size of the encoder/decoder, . + enc_num_feats (int, optional): The feature dimensions passed to mask generator, . + msk_kernel_size (int, optional): The convolution kernel size of the mask generator,

. + msk_num_feats (int, optional): The input/output feature dimension of conv block in the mask generator, . + msk_num_hidden_feats (int, optional): The internal feature dimension of conv block of the mask generator, . + msk_num_layers (int, optional): The number of layers in one conv block of the mask generator, . + msk_num_stacks (int, optional): The numbr of conv blocks of the mask generator, . + msk_activate (str, optional): The activation function of the mask output (Default: ``sigmoid``). + """ + + def __init__( + self, + num_sources: int = 2, + # encoder/decoder parameters + enc_kernel_size: int = 16, + enc_num_feats: int = 512, + # mask generator parameters + msk_kernel_size: int = 3, + msk_num_feats: int = 128, + msk_num_hidden_feats: int = 512, + msk_num_layers: int = 8, + msk_num_stacks: int = 3, + msk_activate: str = "sigmoid", + ): + super().__init__() + + self.num_sources = num_sources + self.enc_num_feats = enc_num_feats + self.enc_kernel_size = enc_kernel_size + self.enc_stride = enc_kernel_size // 2 + + self.encoder = torch.nn.Conv1d( + in_channels=1, + out_channels=enc_num_feats, + kernel_size=enc_kernel_size, + stride=self.enc_stride, + padding=self.enc_stride, + bias=False, + ) + self.mask_generator = MaskGenerator( + input_dim=enc_num_feats, + num_sources=num_sources, + kernel_size=msk_kernel_size, + num_feats=msk_num_feats, + num_hidden=msk_num_hidden_feats, + num_layers=msk_num_layers, + num_stacks=msk_num_stacks, + msk_activate=msk_activate, + ) + self.decoder = torch.nn.ConvTranspose1d( + in_channels=enc_num_feats, + out_channels=1, + kernel_size=enc_kernel_size, + stride=self.enc_stride, + padding=self.enc_stride, + bias=False, + ) + + def _align_num_frames_with_strides(self, input: torch.Tensor) -> Tuple[torch.Tensor, int]: + """Pad input Tensor so that the end of the input tensor corresponds with + + 1. (if kernel size is odd) the center of the last convolution kernel + or 2. (if kernel size is even) the end of the first half of the last convolution kernel + + Assumption: + The resulting Tensor will be padded with the size of stride (== kernel_width // 2) + on the both ends in Conv1D + + |<--- k_1 --->| + | | |<-- k_n-1 -->| + | | | |<--- k_n --->| + | | | | | + | | | | | + | v v v | + |<---->|<--- input signal --->|<--->|<---->| + stride PAD stride + + Args: + input (torch.Tensor): 3D Tensor with shape (batch_size, channels==1, frames) + + Returns: + Tensor: Padded Tensor + int: Number of paddings performed + """ + batch_size, num_channels, num_frames = input.shape + is_odd = self.enc_kernel_size % 2 + num_strides = (num_frames - is_odd) // self.enc_stride + num_remainings = num_frames - (is_odd + num_strides * self.enc_stride) + if num_remainings == 0: + return input, 0 + + num_paddings = self.enc_stride - num_remainings + pad = torch.zeros( + batch_size, + num_channels, + num_paddings, + dtype=input.dtype, + device=input.device, + ) + return torch.cat([input, pad], 2), num_paddings + + def forward(self, input: torch.Tensor) -> torch.Tensor: + """Perform source separation. Generate audio source waveforms. + + Args: + input (torch.Tensor): 3D Tensor with shape [batch, channel==1, frames] + + Returns: + Tensor: 3D Tensor with shape [batch, channel==num_sources, frames] + """ + if input.ndim != 3 or input.shape[1] != 1: + raise ValueError(f"Expected 3D tensor (batch, channel==1, frames). Found: {input.shape}") + + # B: batch size + # L: input frame length + # L': padded input frame length + # F: feature dimension + # M: feature frame length + # S: number of sources + + padded, num_pads = self._align_num_frames_with_strides(input) # B, 1, L' + batch_size, num_padded_frames = padded.shape[0], padded.shape[2] + feats = self.encoder(padded) # B, F, M + masked = self.mask_generator(feats) * feats.unsqueeze(1) # B, S, F, M + masked = masked.view(batch_size * self.num_sources, self.enc_num_feats, -1) # B*S, F, M + decoded = self.decoder(masked) # B*S, 1, L' + output = decoded.view(batch_size, self.num_sources, num_padded_frames) # B, S, L' + if num_pads > 0: + output = output[..., :-num_pads] # B, S, L + return output + + +def conv_tasnet_base(num_sources: int = 2) -> ConvTasNet: + r"""Builds non-causal version of :class:`~torchaudio.models.ConvTasNet`. + + The parameter settings follow the ones with the highest Si-SNR metirc score in the paper, + except the mask activation function is changed from "sigmoid" to "relu" for performance improvement. + + Args: + num_sources (int, optional): Number of sources in the output. + (Default: 2) + Returns: + ConvTasNet: + ConvTasNet model. + """ + return ConvTasNet( + num_sources=num_sources, + enc_kernel_size=16, + enc_num_feats=512, + msk_kernel_size=3, + msk_num_feats=128, + msk_num_hidden_feats=512, + msk_num_layers=8, + msk_num_stacks=3, + msk_activate="relu", + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/deepspeech.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/deepspeech.py new file mode 100644 index 0000000000000000000000000000000000000000..0a6a0faa006a3fa6868ccb7e39e68118d8dbe277 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/deepspeech.py @@ -0,0 +1,84 @@ +import torch + +__all__ = ["DeepSpeech"] + + +class FullyConnected(torch.nn.Module): + """ + Args: + n_feature: Number of input features + n_hidden: Internal hidden unit size. + """ + + def __init__(self, n_feature: int, n_hidden: int, dropout: float, relu_max_clip: int = 20) -> None: + super(FullyConnected, self).__init__() + self.fc = torch.nn.Linear(n_feature, n_hidden, bias=True) + self.relu_max_clip = relu_max_clip + self.dropout = dropout + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x = self.fc(x) + x = torch.nn.functional.relu(x) + x = torch.nn.functional.hardtanh(x, 0, self.relu_max_clip) + if self.dropout: + x = torch.nn.functional.dropout(x, self.dropout, self.training) + return x + + +class DeepSpeech(torch.nn.Module): + """DeepSpeech architecture introduced in + *Deep Speech: Scaling up end-to-end speech recognition* :cite:`hannun2014deep`. + + Args: + n_feature: Number of input features + n_hidden: Internal hidden unit size. + n_class: Number of output classes + """ + + def __init__( + self, + n_feature: int, + n_hidden: int = 2048, + n_class: int = 40, + dropout: float = 0.0, + ) -> None: + super(DeepSpeech, self).__init__() + self.n_hidden = n_hidden + self.fc1 = FullyConnected(n_feature, n_hidden, dropout) + self.fc2 = FullyConnected(n_hidden, n_hidden, dropout) + self.fc3 = FullyConnected(n_hidden, n_hidden, dropout) + self.bi_rnn = torch.nn.RNN(n_hidden, n_hidden, num_layers=1, nonlinearity="relu", bidirectional=True) + self.fc4 = FullyConnected(n_hidden, n_hidden, dropout) + self.out = torch.nn.Linear(n_hidden, n_class) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + """ + Args: + x (torch.Tensor): Tensor of dimension (batch, channel, time, feature). + Returns: + Tensor: Predictor tensor of dimension (batch, time, class). + """ + # N x C x T x F + x = self.fc1(x) + # N x C x T x H + x = self.fc2(x) + # N x C x T x H + x = self.fc3(x) + # N x C x T x H + x = x.squeeze(1) + # N x T x H + x = x.transpose(0, 1) + # T x N x H + x, _ = self.bi_rnn(x) + # The fifth (non-recurrent) layer takes both the forward and backward units as inputs + x = x[:, :, : self.n_hidden] + x[:, :, self.n_hidden :] + # T x N x H + x = self.fc4(x) + # T x N x H + x = self.out(x) + # T x N x n_class + x = x.permute(1, 0, 2) + # N x T x n_class + x = torch.nn.functional.log_softmax(x, dim=2) + # N x T x n_class + return x diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/emformer.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/emformer.py new file mode 100644 index 0000000000000000000000000000000000000000..fa678869c07126a9a5556d35f40ca3324b3fe6b4 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/emformer.py @@ -0,0 +1,884 @@ +import math +from typing import List, Optional, Tuple + +import torch + + +__all__ = ["Emformer"] + + +def _lengths_to_padding_mask(lengths: torch.Tensor) -> torch.Tensor: + batch_size = lengths.shape[0] + max_length = int(torch.max(lengths).item()) + padding_mask = torch.arange(max_length, device=lengths.device, dtype=lengths.dtype).expand( + batch_size, max_length + ) >= lengths.unsqueeze(1) + return padding_mask + + +def _gen_padding_mask( + utterance: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + lengths: torch.Tensor, + mems: torch.Tensor, + left_context_key: Optional[torch.Tensor] = None, +) -> Optional[torch.Tensor]: + T = right_context.size(0) + utterance.size(0) + summary.size(0) + B = right_context.size(1) + if B == 1: + padding_mask = None + else: + right_context_blocks_length = T - torch.max(lengths).int() - summary.size(0) + left_context_blocks_length = left_context_key.size(0) if left_context_key is not None else 0 + klengths = lengths + mems.size(0) + right_context_blocks_length + left_context_blocks_length + padding_mask = _lengths_to_padding_mask(lengths=klengths) + return padding_mask + + +def _get_activation_module(activation: str) -> torch.nn.Module: + if activation == "relu": + return torch.nn.ReLU() + elif activation == "gelu": + return torch.nn.GELU() + elif activation == "silu": + return torch.nn.SiLU() + else: + raise ValueError(f"Unsupported activation {activation}") + + +def _get_weight_init_gains(weight_init_scale_strategy: Optional[str], num_layers: int) -> List[Optional[float]]: + if weight_init_scale_strategy is None: + return [None for _ in range(num_layers)] + elif weight_init_scale_strategy == "depthwise": + return [1.0 / math.sqrt(layer_idx + 1) for layer_idx in range(num_layers)] + elif weight_init_scale_strategy == "constant": + return [1.0 / math.sqrt(2) for layer_idx in range(num_layers)] + else: + raise ValueError(f"Unsupported weight_init_scale_strategy value {weight_init_scale_strategy}") + + +def _gen_attention_mask_block( + col_widths: List[int], col_mask: List[bool], num_rows: int, device: torch.device +) -> torch.Tensor: + if len(col_widths) != len(col_mask): + raise ValueError("Length of col_widths must match that of col_mask") + + mask_block = [ + torch.ones(num_rows, col_width, device=device) + if is_ones_col + else torch.zeros(num_rows, col_width, device=device) + for col_width, is_ones_col in zip(col_widths, col_mask) + ] + return torch.cat(mask_block, dim=1) + + +class _EmformerAttention(torch.nn.Module): + r"""Emformer layer attention module. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads in each Emformer layer. + dropout (float, optional): dropout probability. (Default: 0.0) + weight_init_gain (float or None, optional): scale factor to apply when initializing + attention module parameters. (Default: ``None``) + tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + negative_inf (float, optional): value to use for negative infinity in attention weights. (Default: -1e8) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + dropout: float = 0.0, + weight_init_gain: Optional[float] = None, + tanh_on_mem: bool = False, + negative_inf: float = -1e8, + ): + super().__init__() + + if input_dim % num_heads != 0: + raise ValueError(f"input_dim ({input_dim}) is not a multiple of num_heads ({num_heads}).") + + self.input_dim = input_dim + self.num_heads = num_heads + self.dropout = dropout + self.tanh_on_mem = tanh_on_mem + self.negative_inf = negative_inf + + self.scaling = (self.input_dim // self.num_heads) ** -0.5 + + self.emb_to_key_value = torch.nn.Linear(input_dim, 2 * input_dim, bias=True) + self.emb_to_query = torch.nn.Linear(input_dim, input_dim, bias=True) + self.out_proj = torch.nn.Linear(input_dim, input_dim, bias=True) + + if weight_init_gain: + torch.nn.init.xavier_uniform_(self.emb_to_key_value.weight, gain=weight_init_gain) + torch.nn.init.xavier_uniform_(self.emb_to_query.weight, gain=weight_init_gain) + + def _gen_key_value(self, input: torch.Tensor, mems: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + T, _, _ = input.shape + summary_length = mems.size(0) + 1 + right_ctx_utterance_block = input[: T - summary_length] + mems_right_ctx_utterance_block = torch.cat([mems, right_ctx_utterance_block]) + key, value = self.emb_to_key_value(mems_right_ctx_utterance_block).chunk(chunks=2, dim=2) + return key, value + + def _gen_attention_probs( + self, + attention_weights: torch.Tensor, + attention_mask: torch.Tensor, + padding_mask: Optional[torch.Tensor], + ) -> torch.Tensor: + attention_weights_float = attention_weights.float() + attention_weights_float = attention_weights_float.masked_fill(attention_mask.unsqueeze(0), self.negative_inf) + T = attention_weights.size(1) + B = attention_weights.size(0) // self.num_heads + if padding_mask is not None: + attention_weights_float = attention_weights_float.view(B, self.num_heads, T, -1) + attention_weights_float = attention_weights_float.masked_fill( + padding_mask.unsqueeze(1).unsqueeze(2).to(torch.bool), self.negative_inf + ) + attention_weights_float = attention_weights_float.view(B * self.num_heads, T, -1) + attention_probs = torch.nn.functional.softmax(attention_weights_float, dim=-1).type_as(attention_weights) + return torch.nn.functional.dropout(attention_probs, p=float(self.dropout), training=self.training) + + def _forward_impl( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + mems: torch.Tensor, + attention_mask: torch.Tensor, + left_context_key: Optional[torch.Tensor] = None, + left_context_val: Optional[torch.Tensor] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + B = utterance.size(1) + T = right_context.size(0) + utterance.size(0) + summary.size(0) + + # Compute query with [right context, utterance, summary]. + query = self.emb_to_query(torch.cat([right_context, utterance, summary])) + + # Compute key and value with [mems, right context, utterance]. + key, value = self.emb_to_key_value(torch.cat([mems, right_context, utterance])).chunk(chunks=2, dim=2) + + if left_context_key is not None and left_context_val is not None: + right_context_blocks_length = T - torch.max(lengths).int() - summary.size(0) + key = torch.cat( + [ + key[: mems.size(0) + right_context_blocks_length], + left_context_key, + key[mems.size(0) + right_context_blocks_length :], + ], + ) + value = torch.cat( + [ + value[: mems.size(0) + right_context_blocks_length], + left_context_val, + value[mems.size(0) + right_context_blocks_length :], + ], + ) + + # Compute attention weights from query, key, and value. + reshaped_query, reshaped_key, reshaped_value = [ + tensor.contiguous().view(-1, B * self.num_heads, self.input_dim // self.num_heads).transpose(0, 1) + for tensor in [query, key, value] + ] + attention_weights = torch.bmm(reshaped_query * self.scaling, reshaped_key.transpose(1, 2)) + + # Compute padding mask. + padding_mask = _gen_padding_mask(utterance, right_context, summary, lengths, mems, left_context_key) + + # Compute attention probabilities. + attention_probs = self._gen_attention_probs(attention_weights, attention_mask, padding_mask) + + # Compute attention. + attention = torch.bmm(attention_probs, reshaped_value) + if attention.shape != ( + B * self.num_heads, + T, + self.input_dim // self.num_heads, + ): + raise AssertionError("Computed attention has incorrect dimensions") + attention = attention.transpose(0, 1).contiguous().view(T, B, self.input_dim) + + # Apply output projection. + output_right_context_mems = self.out_proj(attention) + + summary_length = summary.size(0) + output_right_context = output_right_context_mems[: T - summary_length] + output_mems = output_right_context_mems[T - summary_length :] + if self.tanh_on_mem: + output_mems = torch.tanh(output_mems) + else: + output_mems = torch.clamp(output_mems, min=-10, max=10) + + return output_right_context, output_mems, key, value + + def forward( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + mems: torch.Tensor, + attention_mask: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + S: number of summary elements; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + summary (torch.Tensor): summary elements, with shape `(S, B, D)`. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + attention_mask (torch.Tensor): attention mask for underlying attention module. + + Returns: + (Tensor, Tensor): + Tensor + output frames corresponding to utterance and right_context, with shape `(T + R, B, D)`. + Tensor + updated memory elements, with shape `(M, B, D)`. + """ + output, output_mems, _, _ = self._forward_impl(utterance, lengths, right_context, summary, mems, attention_mask) + return output, output_mems[:-1] + + @torch.jit.export + def infer( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + summary: torch.Tensor, + mems: torch.Tensor, + left_context_key: torch.Tensor, + left_context_val: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Forward pass for inference. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + S: number of summary elements; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + summary (torch.Tensor): summary elements, with shape `(S, B, D)`. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + left_context_key (torch.Tensor): left context attention key computed from preceding invocation. + left_context_val (torch.Tensor): left context attention value computed from preceding invocation. + + Returns: + (Tensor, Tensor, Tensor, and Tensor): + Tensor + output frames corresponding to utterance and right_context, with shape `(T + R, B, D)`. + Tensor + updated memory elements, with shape `(M, B, D)`. + Tensor + attention key computed for left context and utterance. + Tensor + attention value computed for left context and utterance. + """ + query_dim = right_context.size(0) + utterance.size(0) + summary.size(0) + key_dim = right_context.size(0) + utterance.size(0) + mems.size(0) + left_context_key.size(0) + attention_mask = torch.zeros(query_dim, key_dim).to(dtype=torch.bool, device=utterance.device) + attention_mask[-1, : mems.size(0)] = True + output, output_mems, key, value = self._forward_impl( + utterance, + lengths, + right_context, + summary, + mems, + attention_mask, + left_context_key=left_context_key, + left_context_val=left_context_val, + ) + return ( + output, + output_mems, + key[mems.size(0) + right_context.size(0) :], + value[mems.size(0) + right_context.size(0) :], + ) + + +class _EmformerLayer(torch.nn.Module): + r"""Emformer layer that constitutes Emformer. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads. + ffn_dim: (int): hidden layer dimension of feedforward network. + segment_length (int): length of each input segment. + dropout (float, optional): dropout probability. (Default: 0.0) + activation (str, optional): activation function to use in feedforward network. + Must be one of ("relu", "gelu", "silu"). (Default: "relu") + left_context_length (int, optional): length of left context. (Default: 0) + max_memory_size (int, optional): maximum number of memory elements to use. (Default: 0) + weight_init_gain (float or None, optional): scale factor to apply when initializing + attention module parameters. (Default: ``None``) + tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + negative_inf (float, optional): value to use for negative infinity in attention weights. (Default: -1e8) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + ffn_dim: int, + segment_length: int, + dropout: float = 0.0, + activation: str = "relu", + left_context_length: int = 0, + max_memory_size: int = 0, + weight_init_gain: Optional[float] = None, + tanh_on_mem: bool = False, + negative_inf: float = -1e8, + ): + super().__init__() + + self.attention = _EmformerAttention( + input_dim=input_dim, + num_heads=num_heads, + dropout=dropout, + weight_init_gain=weight_init_gain, + tanh_on_mem=tanh_on_mem, + negative_inf=negative_inf, + ) + self.dropout = torch.nn.Dropout(dropout) + self.memory_op = torch.nn.AvgPool1d(kernel_size=segment_length, stride=segment_length, ceil_mode=True) + + activation_module = _get_activation_module(activation) + self.pos_ff = torch.nn.Sequential( + torch.nn.LayerNorm(input_dim), + torch.nn.Linear(input_dim, ffn_dim), + activation_module, + torch.nn.Dropout(dropout), + torch.nn.Linear(ffn_dim, input_dim), + torch.nn.Dropout(dropout), + ) + self.layer_norm_input = torch.nn.LayerNorm(input_dim) + self.layer_norm_output = torch.nn.LayerNorm(input_dim) + + self.left_context_length = left_context_length + self.segment_length = segment_length + self.max_memory_size = max_memory_size + self.input_dim = input_dim + + self.use_mem = max_memory_size > 0 + + def _init_state(self, batch_size: int, device: Optional[torch.device]) -> List[torch.Tensor]: + empty_memory = torch.zeros(self.max_memory_size, batch_size, self.input_dim, device=device) + left_context_key = torch.zeros(self.left_context_length, batch_size, self.input_dim, device=device) + left_context_val = torch.zeros(self.left_context_length, batch_size, self.input_dim, device=device) + past_length = torch.zeros(1, batch_size, dtype=torch.int32, device=device) + return [empty_memory, left_context_key, left_context_val, past_length] + + def _unpack_state(self, state: List[torch.Tensor]) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + past_length = state[3][0][0].item() + past_left_context_length = min(self.left_context_length, past_length) + past_mem_length = min(self.max_memory_size, math.ceil(past_length / self.segment_length)) + pre_mems = state[0][self.max_memory_size - past_mem_length :] + lc_key = state[1][self.left_context_length - past_left_context_length :] + lc_val = state[2][self.left_context_length - past_left_context_length :] + return pre_mems, lc_key, lc_val + + def _pack_state( + self, + next_k: torch.Tensor, + next_v: torch.Tensor, + update_length: int, + mems: torch.Tensor, + state: List[torch.Tensor], + ) -> List[torch.Tensor]: + new_k = torch.cat([state[1], next_k]) + new_v = torch.cat([state[2], next_v]) + state[0] = torch.cat([state[0], mems])[-self.max_memory_size :] + state[1] = new_k[new_k.shape[0] - self.left_context_length :] + state[2] = new_v[new_v.shape[0] - self.left_context_length :] + state[3] = state[3] + update_length + return state + + def _process_attention_output( + self, + rc_output: torch.Tensor, + utterance: torch.Tensor, + right_context: torch.Tensor, + ) -> torch.Tensor: + result = self.dropout(rc_output) + torch.cat([right_context, utterance]) + result = self.pos_ff(result) + result + result = self.layer_norm_output(result) + return result + + def _apply_pre_attention_layer_norm( + self, utterance: torch.Tensor, right_context: torch.Tensor + ) -> Tuple[torch.Tensor, torch.Tensor]: + layer_norm_input = self.layer_norm_input(torch.cat([right_context, utterance])) + return ( + layer_norm_input[right_context.size(0) :], + layer_norm_input[: right_context.size(0)], + ) + + def _apply_post_attention_ffn( + self, rc_output: torch.Tensor, utterance: torch.Tensor, right_context: torch.Tensor + ) -> Tuple[torch.Tensor, torch.Tensor]: + rc_output = self._process_attention_output(rc_output, utterance, right_context) + return rc_output[right_context.size(0) :], rc_output[: right_context.size(0)] + + def _apply_attention_forward( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + mems: torch.Tensor, + attention_mask: Optional[torch.Tensor], + ) -> Tuple[torch.Tensor, torch.Tensor]: + if attention_mask is None: + raise ValueError("attention_mask must be not None when for_inference is False") + + if self.use_mem: + summary = self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1) + else: + summary = torch.empty(0).to(dtype=utterance.dtype, device=utterance.device) + rc_output, next_m = self.attention( + utterance=utterance, + lengths=lengths, + right_context=right_context, + summary=summary, + mems=mems, + attention_mask=attention_mask, + ) + return rc_output, next_m + + def _apply_attention_infer( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + mems: torch.Tensor, + state: Optional[List[torch.Tensor]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[torch.Tensor]]: + if state is None: + state = self._init_state(utterance.size(1), device=utterance.device) + pre_mems, lc_key, lc_val = self._unpack_state(state) + if self.use_mem: + summary = self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1) + summary = summary[:1] + else: + summary = torch.empty(0).to(dtype=utterance.dtype, device=utterance.device) + rc_output, next_m, next_k, next_v = self.attention.infer( + utterance=utterance, + lengths=lengths, + right_context=right_context, + summary=summary, + mems=pre_mems, + left_context_key=lc_key, + left_context_val=lc_val, + ) + state = self._pack_state(next_k, next_v, utterance.size(0), mems, state) + return rc_output, next_m, state + + def forward( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + mems: torch.Tensor, + attention_mask: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + attention_mask (torch.Tensor): attention mask for underlying attention module. + + Returns: + (Tensor, Tensor, Tensor): + Tensor + encoded utterance frames, with shape `(T, B, D)`. + Tensor + updated right context frames, with shape `(R, B, D)`. + Tensor + updated memory elements, with shape `(M, B, D)`. + """ + ( + layer_norm_utterance, + layer_norm_right_context, + ) = self._apply_pre_attention_layer_norm(utterance, right_context) + rc_output, output_mems = self._apply_attention_forward( + layer_norm_utterance, + lengths, + layer_norm_right_context, + mems, + attention_mask, + ) + output_utterance, output_right_context = self._apply_post_attention_ffn(rc_output, utterance, right_context) + return output_utterance, output_right_context, output_mems + + @torch.jit.export + def infer( + self, + utterance: torch.Tensor, + lengths: torch.Tensor, + right_context: torch.Tensor, + state: Optional[List[torch.Tensor]], + mems: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, List[torch.Tensor], torch.Tensor]: + r"""Forward pass for inference. + + B: batch size; + D: feature dimension of each frame; + T: number of utterance frames; + R: number of right context frames; + M: number of memory elements. + + Args: + utterance (torch.Tensor): utterance frames, with shape `(T, B, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``utterance``. + right_context (torch.Tensor): right context frames, with shape `(R, B, D)`. + state (List[torch.Tensor] or None): list of tensors representing layer internal state + generated in preceding invocation of ``infer``. + mems (torch.Tensor): memory elements, with shape `(M, B, D)`. + + Returns: + (Tensor, Tensor, List[torch.Tensor], Tensor): + Tensor + encoded utterance frames, with shape `(T, B, D)`. + Tensor + updated right context frames, with shape `(R, B, D)`. + List[Tensor] + list of tensors representing layer internal state + generated in current invocation of ``infer``. + Tensor + updated memory elements, with shape `(M, B, D)`. + """ + ( + layer_norm_utterance, + layer_norm_right_context, + ) = self._apply_pre_attention_layer_norm(utterance, right_context) + rc_output, output_mems, output_state = self._apply_attention_infer( + layer_norm_utterance, lengths, layer_norm_right_context, mems, state + ) + output_utterance, output_right_context = self._apply_post_attention_ffn(rc_output, utterance, right_context) + return output_utterance, output_right_context, output_state, output_mems + + +class _EmformerImpl(torch.nn.Module): + def __init__( + self, + emformer_layers: torch.nn.ModuleList, + segment_length: int, + left_context_length: int = 0, + right_context_length: int = 0, + max_memory_size: int = 0, + ): + super().__init__() + + self.use_mem = max_memory_size > 0 + self.memory_op = torch.nn.AvgPool1d( + kernel_size=segment_length, + stride=segment_length, + ceil_mode=True, + ) + self.emformer_layers = emformer_layers + self.left_context_length = left_context_length + self.right_context_length = right_context_length + self.segment_length = segment_length + self.max_memory_size = max_memory_size + + def _gen_right_context(self, input: torch.Tensor) -> torch.Tensor: + T = input.shape[0] + num_segs = math.ceil((T - self.right_context_length) / self.segment_length) + right_context_blocks = [] + for seg_idx in range(num_segs - 1): + start = (seg_idx + 1) * self.segment_length + end = start + self.right_context_length + right_context_blocks.append(input[start:end]) + right_context_blocks.append(input[T - self.right_context_length :]) + return torch.cat(right_context_blocks) + + def _gen_attention_mask_col_widths(self, seg_idx: int, utterance_length: int) -> List[int]: + num_segs = math.ceil(utterance_length / self.segment_length) + rc = self.right_context_length + lc = self.left_context_length + rc_start = seg_idx * rc + rc_end = rc_start + rc + seg_start = max(seg_idx * self.segment_length - lc, 0) + seg_end = min((seg_idx + 1) * self.segment_length, utterance_length) + rc_length = self.right_context_length * num_segs + + if self.use_mem: + m_start = max(seg_idx - self.max_memory_size, 0) + mem_length = num_segs - 1 + col_widths = [ + m_start, # before memory + seg_idx - m_start, # memory + mem_length - seg_idx, # after memory + rc_start, # before right context + rc, # right context + rc_length - rc_end, # after right context + seg_start, # before query segment + seg_end - seg_start, # query segment + utterance_length - seg_end, # after query segment + ] + else: + col_widths = [ + rc_start, # before right context + rc, # right context + rc_length - rc_end, # after right context + seg_start, # before query segment + seg_end - seg_start, # query segment + utterance_length - seg_end, # after query segment + ] + + return col_widths + + def _gen_attention_mask(self, input: torch.Tensor) -> torch.Tensor: + utterance_length = input.size(0) + num_segs = math.ceil(utterance_length / self.segment_length) + + rc_mask = [] + query_mask = [] + summary_mask = [] + + if self.use_mem: + num_cols = 9 + # memory, right context, query segment + rc_q_cols_mask = [idx in [1, 4, 7] for idx in range(num_cols)] + # right context, query segment + s_cols_mask = [idx in [4, 7] for idx in range(num_cols)] + masks_to_concat = [rc_mask, query_mask, summary_mask] + else: + num_cols = 6 + # right context, query segment + rc_q_cols_mask = [idx in [1, 4] for idx in range(num_cols)] + s_cols_mask = None + masks_to_concat = [rc_mask, query_mask] + + for seg_idx in range(num_segs): + col_widths = self._gen_attention_mask_col_widths(seg_idx, utterance_length) + + rc_mask_block = _gen_attention_mask_block( + col_widths, rc_q_cols_mask, self.right_context_length, input.device + ) + rc_mask.append(rc_mask_block) + + query_mask_block = _gen_attention_mask_block( + col_widths, + rc_q_cols_mask, + min( + self.segment_length, + utterance_length - seg_idx * self.segment_length, + ), + input.device, + ) + query_mask.append(query_mask_block) + + if s_cols_mask is not None: + summary_mask_block = _gen_attention_mask_block(col_widths, s_cols_mask, 1, input.device) + summary_mask.append(summary_mask_block) + + attention_mask = (1 - torch.cat([torch.cat(mask) for mask in masks_to_concat])).to(torch.bool) + return attention_mask + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass for training and non-streaming inference. + + B: batch size; + T: max number of input frames in batch; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): utterance frames right-padded with right context frames, with + shape `(B, T + right_context_length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid utterance frames for i-th batch element in ``input``. + + Returns: + (Tensor, Tensor): + Tensor + output frames, with shape `(B, T, D)`. + Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output frames. + """ + input = input.permute(1, 0, 2) + right_context = self._gen_right_context(input) + utterance = input[: input.size(0) - self.right_context_length] + attention_mask = self._gen_attention_mask(utterance) + mems = ( + self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1)[:-1] + if self.use_mem + else torch.empty(0).to(dtype=input.dtype, device=input.device) + ) + output = utterance + for layer in self.emformer_layers: + output, right_context, mems = layer(output, lengths, right_context, mems, attention_mask) + return output.permute(1, 0, 2), lengths + + @torch.jit.export + def infer( + self, + input: torch.Tensor, + lengths: torch.Tensor, + states: Optional[List[List[torch.Tensor]]] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass for streaming inference. + + B: batch size; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): utterance frames right-padded with right context frames, with + shape `(B, segment_length + right_context_length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + states (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing internal state generated in preceding invocation of ``infer``. (Default: ``None``) + + Returns: + (Tensor, Tensor, List[List[Tensor]]): + Tensor + output frames, with shape `(B, segment_length, D)`. + Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output frames. + List[List[Tensor]] + output states; list of lists of tensors representing internal state + generated in current invocation of ``infer``. + """ + if input.size(1) != self.segment_length + self.right_context_length: + raise ValueError( + "Per configured segment_length and right_context_length" + f", expected size of {self.segment_length + self.right_context_length} for dimension 1 of input" + f", but got {input.size(1)}." + ) + input = input.permute(1, 0, 2) + right_context_start_idx = input.size(0) - self.right_context_length + right_context = input[right_context_start_idx:] + utterance = input[:right_context_start_idx] + output_lengths = torch.clamp(lengths - self.right_context_length, min=0) + mems = ( + self.memory_op(utterance.permute(1, 2, 0)).permute(2, 0, 1) + if self.use_mem + else torch.empty(0).to(dtype=input.dtype, device=input.device) + ) + output = utterance + output_states: List[List[torch.Tensor]] = [] + for layer_idx, layer in enumerate(self.emformer_layers): + output, right_context, output_state, mems = layer.infer( + output, + output_lengths, + right_context, + None if states is None else states[layer_idx], + mems, + ) + output_states.append(output_state) + + return output.permute(1, 0, 2), output_lengths, output_states + + +class Emformer(_EmformerImpl): + r"""Emformer architecture introduced in + *Emformer: Efficient Memory Transformer Based Acoustic Model for Low Latency Streaming Speech Recognition* + :cite:`shi2021emformer`. + + See Also: + * :func:`~torchaudio.models.emformer_rnnt_model`, + :func:`~torchaudio.models.emformer_rnnt_base`: factory functions. + * :class:`torchaudio.pipelines.RNNTBundle`: ASR pipelines with pretrained model. + + Args: + input_dim (int): input dimension. + num_heads (int): number of attention heads in each Emformer layer. + ffn_dim (int): hidden layer dimension of each Emformer layer's feedforward network. + num_layers (int): number of Emformer layers to instantiate. + segment_length (int): length of each input segment. + dropout (float, optional): dropout probability. (Default: 0.0) + activation (str, optional): activation function to use in each Emformer layer's + feedforward network. Must be one of ("relu", "gelu", "silu"). (Default: "relu") + left_context_length (int, optional): length of left context. (Default: 0) + right_context_length (int, optional): length of right context. (Default: 0) + max_memory_size (int, optional): maximum number of memory elements to use. (Default: 0) + weight_init_scale_strategy (str or None, optional): per-layer weight initialization scaling + strategy. Must be one of ("depthwise", "constant", ``None``). (Default: "depthwise") + tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + negative_inf (float, optional): value to use for negative infinity in attention weights. (Default: -1e8) + + Examples: + >>> emformer = Emformer(512, 8, 2048, 20, 4, right_context_length=1) + >>> input = torch.rand(128, 400, 512) # batch, num_frames, feature_dim + >>> lengths = torch.randint(1, 200, (128,)) # batch + >>> output, lengths = emformer(input, lengths) + >>> input = torch.rand(128, 5, 512) + >>> lengths = torch.ones(128) * 5 + >>> output, lengths, states = emformer.infer(input, lengths, None) + """ + + def __init__( + self, + input_dim: int, + num_heads: int, + ffn_dim: int, + num_layers: int, + segment_length: int, + dropout: float = 0.0, + activation: str = "relu", + left_context_length: int = 0, + right_context_length: int = 0, + max_memory_size: int = 0, + weight_init_scale_strategy: Optional[str] = "depthwise", + tanh_on_mem: bool = False, + negative_inf: float = -1e8, + ): + weight_init_gains = _get_weight_init_gains(weight_init_scale_strategy, num_layers) + emformer_layers = torch.nn.ModuleList( + [ + _EmformerLayer( + input_dim, + num_heads, + ffn_dim, + segment_length, + dropout=dropout, + activation=activation, + left_context_length=left_context_length, + max_memory_size=max_memory_size, + weight_init_gain=weight_init_gains[layer_idx], + tanh_on_mem=tanh_on_mem, + negative_inf=negative_inf, + ) + for layer_idx in range(num_layers) + ] + ) + super().__init__( + emformer_layers, + segment_length, + left_context_length=left_context_length, + right_context_length=right_context_length, + max_memory_size=max_memory_size, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/rnnt.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/rnnt.py new file mode 100644 index 0000000000000000000000000000000000000000..659c7b93442095ad3d7c86e38e328094ce552d0c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/rnnt.py @@ -0,0 +1,816 @@ +from abc import ABC, abstractmethod +from typing import List, Optional, Tuple + +import torch +from torchaudio.models import Emformer + + +__all__ = ["RNNT", "emformer_rnnt_base", "emformer_rnnt_model"] + + +class _TimeReduction(torch.nn.Module): + r"""Coalesces frames along time dimension into a + fewer number of frames with higher feature dimensionality. + + Args: + stride (int): number of frames to merge for each output frame. + """ + + def __init__(self, stride: int) -> None: + super().__init__() + self.stride = stride + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass. + + B: batch size; + T: maximum input sequence length in batch; + D: feature dimension of each input sequence frame. + + Args: + input (torch.Tensor): input sequences, with shape `(B, T, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor + output sequences, with shape + `(B, T // stride, D * stride)` + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in output sequences. + """ + B, T, D = input.shape + num_frames = T - (T % self.stride) + input = input[:, :num_frames, :] + lengths = lengths.div(self.stride, rounding_mode="trunc") + T_max = num_frames // self.stride + + output = input.reshape(B, T_max, D * self.stride) + output = output.contiguous() + return output, lengths + + +class _CustomLSTM(torch.nn.Module): + r"""Custom long-short-term memory (LSTM) block that applies layer normalization + to internal nodes. + + Args: + input_dim (int): input dimension. + hidden_dim (int): hidden dimension. + layer_norm (bool, optional): if ``True``, enables layer normalization. (Default: ``False``) + layer_norm_epsilon (float, optional): value of epsilon to use in + layer normalization layers (Default: 1e-5) + """ + + def __init__( + self, + input_dim: int, + hidden_dim: int, + layer_norm: bool = False, + layer_norm_epsilon: float = 1e-5, + ) -> None: + super().__init__() + self.x2g = torch.nn.Linear(input_dim, 4 * hidden_dim, bias=(not layer_norm)) + self.p2g = torch.nn.Linear(hidden_dim, 4 * hidden_dim, bias=False) + if layer_norm: + self.c_norm = torch.nn.LayerNorm(hidden_dim, eps=layer_norm_epsilon) + self.g_norm = torch.nn.LayerNorm(4 * hidden_dim, eps=layer_norm_epsilon) + else: + self.c_norm = torch.nn.Identity() + self.g_norm = torch.nn.Identity() + + self.hidden_dim = hidden_dim + + def forward( + self, input: torch.Tensor, state: Optional[List[torch.Tensor]] + ) -> Tuple[torch.Tensor, List[torch.Tensor]]: + r"""Forward pass. + + B: batch size; + T: maximum sequence length in batch; + D: feature dimension of each input sequence element. + + Args: + input (torch.Tensor): with shape `(T, B, D)`. + state (List[torch.Tensor] or None): list of tensors + representing internal state generated in preceding invocation + of ``forward``. + + Returns: + (torch.Tensor, List[torch.Tensor]): + torch.Tensor + output, with shape `(T, B, hidden_dim)`. + List[torch.Tensor] + list of tensors representing internal state generated + in current invocation of ``forward``. + """ + if state is None: + B = input.size(1) + h = torch.zeros(B, self.hidden_dim, device=input.device, dtype=input.dtype) + c = torch.zeros(B, self.hidden_dim, device=input.device, dtype=input.dtype) + else: + h, c = state + + gated_input = self.x2g(input) + outputs = [] + for gates in gated_input.unbind(0): + gates = gates + self.p2g(h) + gates = self.g_norm(gates) + input_gate, forget_gate, cell_gate, output_gate = gates.chunk(4, 1) + input_gate = input_gate.sigmoid() + forget_gate = forget_gate.sigmoid() + cell_gate = cell_gate.tanh() + output_gate = output_gate.sigmoid() + c = forget_gate * c + input_gate * cell_gate + c = self.c_norm(c) + h = output_gate * c.tanh() + outputs.append(h) + + output = torch.stack(outputs, dim=0) + state = [h, c] + + return output, state + + +class _Transcriber(ABC): + @abstractmethod + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + pass + + @abstractmethod + def infer( + self, + input: torch.Tensor, + lengths: torch.Tensor, + states: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + pass + + +class _EmformerEncoder(torch.nn.Module, _Transcriber): + r"""Emformer-based recurrent neural network transducer (RNN-T) encoder (transcription network). + + Args: + input_dim (int): feature dimension of each input sequence element. + output_dim (int): feature dimension of each output sequence element. + segment_length (int): length of input segment expressed as number of frames. + right_context_length (int): length of right context expressed as number of frames. + time_reduction_input_dim (int): dimension to scale each element in input sequences to + prior to applying time reduction block. + time_reduction_stride (int): factor by which to reduce length of input sequence. + transformer_num_heads (int): number of attention heads in each Emformer layer. + transformer_ffn_dim (int): hidden layer dimension of each Emformer layer's feedforward network. + transformer_num_layers (int): number of Emformer layers to instantiate. + transformer_left_context_length (int): length of left context. + transformer_dropout (float, optional): transformer dropout probability. (Default: 0.0) + transformer_activation (str, optional): activation function to use in each Emformer layer's + feedforward network. Must be one of ("relu", "gelu", "silu"). (Default: "relu") + transformer_max_memory_size (int, optional): maximum number of memory elements to use. (Default: 0) + transformer_weight_init_scale_strategy (str, optional): per-layer weight initialization scaling + strategy. Must be one of ("depthwise", "constant", ``None``). (Default: "depthwise") + transformer_tanh_on_mem (bool, optional): if ``True``, applies tanh to memory elements. (Default: ``False``) + """ + + def __init__( + self, + *, + input_dim: int, + output_dim: int, + segment_length: int, + right_context_length: int, + time_reduction_input_dim: int, + time_reduction_stride: int, + transformer_num_heads: int, + transformer_ffn_dim: int, + transformer_num_layers: int, + transformer_left_context_length: int, + transformer_dropout: float = 0.0, + transformer_activation: str = "relu", + transformer_max_memory_size: int = 0, + transformer_weight_init_scale_strategy: str = "depthwise", + transformer_tanh_on_mem: bool = False, + ) -> None: + super().__init__() + self.input_linear = torch.nn.Linear( + input_dim, + time_reduction_input_dim, + bias=False, + ) + self.time_reduction = _TimeReduction(time_reduction_stride) + transformer_input_dim = time_reduction_input_dim * time_reduction_stride + self.transformer = Emformer( + transformer_input_dim, + transformer_num_heads, + transformer_ffn_dim, + transformer_num_layers, + segment_length // time_reduction_stride, + dropout=transformer_dropout, + activation=transformer_activation, + left_context_length=transformer_left_context_length, + right_context_length=right_context_length // time_reduction_stride, + max_memory_size=transformer_max_memory_size, + weight_init_scale_strategy=transformer_weight_init_scale_strategy, + tanh_on_mem=transformer_tanh_on_mem, + ) + self.output_linear = torch.nn.Linear(transformer_input_dim, output_dim) + self.layer_norm = torch.nn.LayerNorm(output_dim) + + def forward(self, input: torch.Tensor, lengths: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + T: maximum input sequence length in batch; + D: feature dimension of each input sequence frame (input_dim). + + Args: + input (torch.Tensor): input frame sequences right-padded with right context, with + shape `(B, T + right context length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output input lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output frame sequences. + """ + input_linear_out = self.input_linear(input) + time_reduction_out, time_reduction_lengths = self.time_reduction(input_linear_out, lengths) + transformer_out, transformer_lengths = self.transformer(time_reduction_out, time_reduction_lengths) + output_linear_out = self.output_linear(transformer_out) + layer_norm_out = self.layer_norm(output_linear_out) + return layer_norm_out, transformer_lengths + + @torch.jit.export + def infer( + self, + input: torch.Tensor, + lengths: torch.Tensor, + states: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass for inference. + + B: batch size; + T: maximum input sequence segment length in batch; + D: feature dimension of each input sequence frame (input_dim). + + Args: + input (torch.Tensor): input frame sequence segments right-padded with right context, with + shape `(B, T + right context length, D)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + state (List[List[torch.Tensor]] or None): list of lists of tensors + representing internal state generated in preceding invocation + of ``infer``. + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output input lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing internal state generated in current invocation + of ``infer``. + """ + input_linear_out = self.input_linear(input) + time_reduction_out, time_reduction_lengths = self.time_reduction(input_linear_out, lengths) + ( + transformer_out, + transformer_lengths, + transformer_states, + ) = self.transformer.infer(time_reduction_out, time_reduction_lengths, states) + output_linear_out = self.output_linear(transformer_out) + layer_norm_out = self.layer_norm(output_linear_out) + return layer_norm_out, transformer_lengths, transformer_states + + +class _Predictor(torch.nn.Module): + r"""Recurrent neural network transducer (RNN-T) prediction network. + + Args: + num_symbols (int): size of target token lexicon. + output_dim (int): feature dimension of each output sequence element. + symbol_embedding_dim (int): dimension of each target token embedding. + num_lstm_layers (int): number of LSTM layers to instantiate. + lstm_hidden_dim (int): output dimension of each LSTM layer. + lstm_layer_norm (bool, optional): if ``True``, enables layer normalization + for LSTM layers. (Default: ``False``) + lstm_layer_norm_epsilon (float, optional): value of epsilon to use in + LSTM layer normalization layers. (Default: 1e-5) + lstm_dropout (float, optional): LSTM dropout probability. (Default: 0.0) + + """ + + def __init__( + self, + num_symbols: int, + output_dim: int, + symbol_embedding_dim: int, + num_lstm_layers: int, + lstm_hidden_dim: int, + lstm_layer_norm: bool = False, + lstm_layer_norm_epsilon: float = 1e-5, + lstm_dropout: float = 0.0, + ) -> None: + super().__init__() + self.embedding = torch.nn.Embedding(num_symbols, symbol_embedding_dim) + self.input_layer_norm = torch.nn.LayerNorm(symbol_embedding_dim) + self.lstm_layers = torch.nn.ModuleList( + [ + _CustomLSTM( + symbol_embedding_dim if idx == 0 else lstm_hidden_dim, + lstm_hidden_dim, + layer_norm=lstm_layer_norm, + layer_norm_epsilon=lstm_layer_norm_epsilon, + ) + for idx in range(num_lstm_layers) + ] + ) + self.dropout = torch.nn.Dropout(p=lstm_dropout) + self.linear = torch.nn.Linear(lstm_hidden_dim, output_dim) + self.output_layer_norm = torch.nn.LayerNorm(output_dim) + + self.lstm_dropout = lstm_dropout + + def forward( + self, + input: torch.Tensor, + lengths: torch.Tensor, + state: Optional[List[List[torch.Tensor]]] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass. + + B: batch size; + U: maximum sequence length in batch; + D: feature dimension of each input sequence element. + + Args: + input (torch.Tensor): target sequences, with shape `(B, U)` and each element + mapping to a target symbol, i.e. in range `[0, num_symbols)`. + lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``input``. + state (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing internal state generated in preceding invocation + of ``forward``. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output encoding sequences, with shape `(B, U, output_dim)` + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output encoding sequences. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing internal state generated in current invocation of ``forward``. + """ + input_tb = input.permute(1, 0) + embedding_out = self.embedding(input_tb) + input_layer_norm_out = self.input_layer_norm(embedding_out) + + lstm_out = input_layer_norm_out + state_out: List[List[torch.Tensor]] = [] + for layer_idx, lstm in enumerate(self.lstm_layers): + lstm_out, lstm_state_out = lstm(lstm_out, None if state is None else state[layer_idx]) + lstm_out = self.dropout(lstm_out) + state_out.append(lstm_state_out) + + linear_out = self.linear(lstm_out) + output_layer_norm_out = self.output_layer_norm(linear_out) + return output_layer_norm_out.permute(1, 0, 2), lengths, state_out + + +class _Joiner(torch.nn.Module): + r"""Recurrent neural network transducer (RNN-T) joint network. + + Args: + input_dim (int): source and target input dimension. + output_dim (int): output dimension. + activation (str, optional): activation function to use in the joiner. + Must be one of ("relu", "tanh"). (Default: "relu") + + """ + + def __init__(self, input_dim: int, output_dim: int, activation: str = "relu") -> None: + super().__init__() + self.linear = torch.nn.Linear(input_dim, output_dim, bias=True) + if activation == "relu": + self.activation = torch.nn.ReLU() + elif activation == "tanh": + self.activation = torch.nn.Tanh() + else: + raise ValueError(f"Unsupported activation {activation}") + + def forward( + self, + source_encodings: torch.Tensor, + source_lengths: torch.Tensor, + target_encodings: torch.Tensor, + target_lengths: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Forward pass for training. + + B: batch size; + T: maximum source sequence length in batch; + U: maximum target sequence length in batch; + D: dimension of each source and target sequence encoding. + + Args: + source_encodings (torch.Tensor): source encoding sequences, with + shape `(B, T, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``source_encodings``. + target_encodings (torch.Tensor): target encoding sequences, with shape `(B, U, D)`. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``target_encodings``. + + Returns: + (torch.Tensor, torch.Tensor, torch.Tensor): + torch.Tensor + joint network output, with shape `(B, T, U, output_dim)`. + torch.Tensor + output source lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 1 for i-th batch element in joint network output. + torch.Tensor + output target lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 2 for i-th batch element in joint network output. + """ + joint_encodings = source_encodings.unsqueeze(2).contiguous() + target_encodings.unsqueeze(1).contiguous() + activation_out = self.activation(joint_encodings) + output = self.linear(activation_out) + return output, source_lengths, target_lengths + + +class RNNT(torch.nn.Module): + r"""torchaudio.models.RNNT() + + Recurrent neural network transducer (RNN-T) model. + + Note: + To build the model, please use one of the factory functions. + + See Also: + :class:`torchaudio.pipelines.RNNTBundle`: ASR pipeline with pre-trained models. + + Args: + transcriber (torch.nn.Module): transcription network. + predictor (torch.nn.Module): prediction network. + joiner (torch.nn.Module): joint network. + """ + + def __init__(self, transcriber: _Transcriber, predictor: _Predictor, joiner: _Joiner) -> None: + super().__init__() + self.transcriber = transcriber + self.predictor = predictor + self.joiner = joiner + + def forward( + self, + sources: torch.Tensor, + source_lengths: torch.Tensor, + targets: torch.Tensor, + target_lengths: torch.Tensor, + predictor_state: Optional[List[List[torch.Tensor]]] = None, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Forward pass for training. + + B: batch size; + T: maximum source sequence length in batch; + U: maximum target sequence length in batch; + D: feature dimension of each source sequence element. + + Args: + sources (torch.Tensor): source frame sequences right-padded with right context, with + shape `(B, T, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``sources``. + targets (torch.Tensor): target sequences, with shape `(B, U)` and each element + mapping to a target symbol. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``targets``. + predictor_state (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing prediction network internal state generated in preceding invocation + of ``forward``. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + joint network output, with shape + `(B, max output source length, max output target length, output_dim (number of target symbols))`. + torch.Tensor + output source lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 1 for i-th batch element in joint network output. + torch.Tensor + output target lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 2 for i-th batch element in joint network output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing prediction network internal state generated in current invocation + of ``forward``. + """ + source_encodings, source_lengths = self.transcriber( + input=sources, + lengths=source_lengths, + ) + target_encodings, target_lengths, predictor_state = self.predictor( + input=targets, + lengths=target_lengths, + state=predictor_state, + ) + output, source_lengths, target_lengths = self.joiner( + source_encodings=source_encodings, + source_lengths=source_lengths, + target_encodings=target_encodings, + target_lengths=target_lengths, + ) + + return ( + output, + source_lengths, + target_lengths, + predictor_state, + ) + + @torch.jit.export + def transcribe_streaming( + self, + sources: torch.Tensor, + source_lengths: torch.Tensor, + state: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Applies transcription network to sources in streaming mode. + + B: batch size; + T: maximum source sequence segment length in batch; + D: feature dimension of each source sequence frame. + + Args: + sources (torch.Tensor): source frame sequence segments right-padded with right context, with + shape `(B, T + right context length, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``sources``. + state (List[List[torch.Tensor]] or None): list of lists of tensors + representing transcription network internal state generated in preceding invocation + of ``transcribe_streaming``. + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing transcription network internal state generated in current invocation + of ``transcribe_streaming``. + """ + return self.transcriber.infer(sources, source_lengths, state) + + @torch.jit.export + def transcribe( + self, + sources: torch.Tensor, + source_lengths: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor]: + r"""Applies transcription network to sources in non-streaming mode. + + B: batch size; + T: maximum source sequence length in batch; + D: feature dimension of each source sequence frame. + + Args: + sources (torch.Tensor): source frame sequences right-padded with right context, with + shape `(B, T + right context length, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``sources``. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor + output frame sequences, with + shape `(B, T // time_reduction_stride, output_dim)`. + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output frame sequences. + """ + return self.transcriber(sources, source_lengths) + + @torch.jit.export + def predict( + self, + targets: torch.Tensor, + target_lengths: torch.Tensor, + state: Optional[List[List[torch.Tensor]]], + ) -> Tuple[torch.Tensor, torch.Tensor, List[List[torch.Tensor]]]: + r"""Applies prediction network to targets. + + B: batch size; + U: maximum target sequence length in batch; + D: feature dimension of each target sequence frame. + + Args: + targets (torch.Tensor): target sequences, with shape `(B, U)` and each element + mapping to a target symbol, i.e. in range `[0, num_symbols)`. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + number of valid frames for i-th batch element in ``targets``. + state (List[List[torch.Tensor]] or None): list of lists of tensors + representing internal state generated in preceding invocation + of ``predict``. + + Returns: + (torch.Tensor, torch.Tensor, List[List[torch.Tensor]]): + torch.Tensor + output frame sequences, with shape `(B, U, output_dim)`. + torch.Tensor + output lengths, with shape `(B,)` and i-th element representing + number of valid elements for i-th batch element in output. + List[List[torch.Tensor]] + output states; list of lists of tensors + representing internal state generated in current invocation of ``predict``. + """ + return self.predictor(input=targets, lengths=target_lengths, state=state) + + @torch.jit.export + def join( + self, + source_encodings: torch.Tensor, + source_lengths: torch.Tensor, + target_encodings: torch.Tensor, + target_lengths: torch.Tensor, + ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + r"""Applies joint network to source and target encodings. + + B: batch size; + T: maximum source sequence length in batch; + U: maximum target sequence length in batch; + D: dimension of each source and target sequence encoding. + + Args: + source_encodings (torch.Tensor): source encoding sequences, with + shape `(B, T, D)`. + source_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``source_encodings``. + target_encodings (torch.Tensor): target encoding sequences, with shape `(B, U, D)`. + target_lengths (torch.Tensor): with shape `(B,)` and i-th element representing + valid sequence length of i-th batch element in ``target_encodings``. + + Returns: + (torch.Tensor, torch.Tensor, torch.Tensor): + torch.Tensor + joint network output, with shape `(B, T, U, output_dim)`. + torch.Tensor + output source lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 1 for i-th batch element in joint network output. + torch.Tensor + output target lengths, with shape `(B,)` and i-th element representing + number of valid elements along dim 2 for i-th batch element in joint network output. + """ + output, source_lengths, target_lengths = self.joiner( + source_encodings=source_encodings, + source_lengths=source_lengths, + target_encodings=target_encodings, + target_lengths=target_lengths, + ) + return output, source_lengths, target_lengths + + +def emformer_rnnt_model( + *, + input_dim: int, + encoding_dim: int, + num_symbols: int, + segment_length: int, + right_context_length: int, + time_reduction_input_dim: int, + time_reduction_stride: int, + transformer_num_heads: int, + transformer_ffn_dim: int, + transformer_num_layers: int, + transformer_dropout: float, + transformer_activation: str, + transformer_left_context_length: int, + transformer_max_memory_size: int, + transformer_weight_init_scale_strategy: str, + transformer_tanh_on_mem: bool, + symbol_embedding_dim: int, + num_lstm_layers: int, + lstm_layer_norm: bool, + lstm_layer_norm_epsilon: float, + lstm_dropout: float, +) -> RNNT: + r"""Builds Emformer-based :class:`~torchaudio.models.RNNT`. + + Note: + For non-streaming inference, the expectation is for `transcribe` to be called on input + sequences right-concatenated with `right_context_length` frames. + + For streaming inference, the expectation is for `transcribe_streaming` to be called + on input chunks comprising `segment_length` frames right-concatenated with `right_context_length` + frames. + + Args: + input_dim (int): dimension of input sequence frames passed to transcription network. + encoding_dim (int): dimension of transcription- and prediction-network-generated encodings + passed to joint network. + num_symbols (int): cardinality of set of target tokens. + segment_length (int): length of input segment expressed as number of frames. + right_context_length (int): length of right context expressed as number of frames. + time_reduction_input_dim (int): dimension to scale each element in input sequences to + prior to applying time reduction block. + time_reduction_stride (int): factor by which to reduce length of input sequence. + transformer_num_heads (int): number of attention heads in each Emformer layer. + transformer_ffn_dim (int): hidden layer dimension of each Emformer layer's feedforward network. + transformer_num_layers (int): number of Emformer layers to instantiate. + transformer_left_context_length (int): length of left context considered by Emformer. + transformer_dropout (float): Emformer dropout probability. + transformer_activation (str): activation function to use in each Emformer layer's + feedforward network. Must be one of ("relu", "gelu", "silu"). + transformer_max_memory_size (int): maximum number of memory elements to use. + transformer_weight_init_scale_strategy (str): per-layer weight initialization scaling + strategy. Must be one of ("depthwise", "constant", ``None``). + transformer_tanh_on_mem (bool): if ``True``, applies tanh to memory elements. + symbol_embedding_dim (int): dimension of each target token embedding. + num_lstm_layers (int): number of LSTM layers to instantiate. + lstm_layer_norm (bool): if ``True``, enables layer normalization for LSTM layers. + lstm_layer_norm_epsilon (float): value of epsilon to use in LSTM layer normalization layers. + lstm_dropout (float): LSTM dropout probability. + + Returns: + RNNT: + Emformer RNN-T model. + """ + encoder = _EmformerEncoder( + input_dim=input_dim, + output_dim=encoding_dim, + segment_length=segment_length, + right_context_length=right_context_length, + time_reduction_input_dim=time_reduction_input_dim, + time_reduction_stride=time_reduction_stride, + transformer_num_heads=transformer_num_heads, + transformer_ffn_dim=transformer_ffn_dim, + transformer_num_layers=transformer_num_layers, + transformer_dropout=transformer_dropout, + transformer_activation=transformer_activation, + transformer_left_context_length=transformer_left_context_length, + transformer_max_memory_size=transformer_max_memory_size, + transformer_weight_init_scale_strategy=transformer_weight_init_scale_strategy, + transformer_tanh_on_mem=transformer_tanh_on_mem, + ) + predictor = _Predictor( + num_symbols, + encoding_dim, + symbol_embedding_dim=symbol_embedding_dim, + num_lstm_layers=num_lstm_layers, + lstm_hidden_dim=symbol_embedding_dim, + lstm_layer_norm=lstm_layer_norm, + lstm_layer_norm_epsilon=lstm_layer_norm_epsilon, + lstm_dropout=lstm_dropout, + ) + joiner = _Joiner(encoding_dim, num_symbols) + return RNNT(encoder, predictor, joiner) + + +def emformer_rnnt_base(num_symbols: int) -> RNNT: + r"""Builds basic version of Emformer-based :class:`~torchaudio.models.RNNT`. + + Args: + num_symbols (int): The size of target token lexicon. + + Returns: + RNNT: + Emformer RNN-T model. + """ + return emformer_rnnt_model( + input_dim=80, + encoding_dim=1024, + num_symbols=num_symbols, + segment_length=16, + right_context_length=4, + time_reduction_input_dim=128, + time_reduction_stride=4, + transformer_num_heads=8, + transformer_ffn_dim=2048, + transformer_num_layers=20, + transformer_dropout=0.1, + transformer_activation="gelu", + transformer_left_context_length=30, + transformer_max_memory_size=0, + transformer_weight_init_scale_strategy="depthwise", + transformer_tanh_on_mem=True, + symbol_embedding_dim=512, + num_lstm_layers=3, + lstm_layer_norm=True, + lstm_layer_norm_epsilon=1e-3, + lstm_dropout=0.3, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/rnnt_decoder.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/rnnt_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..2fe03715513a077984f5c3d4fcf95e0fa653b5f7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/rnnt_decoder.py @@ -0,0 +1,339 @@ +from typing import Callable, Dict, List, Optional, Tuple + +import torch +from torchaudio.models import RNNT + + +__all__ = ["Hypothesis", "RNNTBeamSearch"] + + +Hypothesis = Tuple[List[int], torch.Tensor, List[List[torch.Tensor]], float] +Hypothesis.__doc__ = """Hypothesis generated by RNN-T beam search decoder, + represented as tuple of (tokens, prediction network output, prediction network state, score). + """ + + +def _get_hypo_tokens(hypo: Hypothesis) -> List[int]: + return hypo[0] + + +def _get_hypo_predictor_out(hypo: Hypothesis) -> torch.Tensor: + return hypo[1] + + +def _get_hypo_state(hypo: Hypothesis) -> List[List[torch.Tensor]]: + return hypo[2] + + +def _get_hypo_score(hypo: Hypothesis) -> float: + return hypo[3] + + +def _get_hypo_key(hypo: Hypothesis) -> str: + return str(hypo[0]) + + +def _batch_state(hypos: List[Hypothesis]) -> List[List[torch.Tensor]]: + states: List[List[torch.Tensor]] = [] + for i in range(len(_get_hypo_state(hypos[0]))): + batched_state_components: List[torch.Tensor] = [] + for j in range(len(_get_hypo_state(hypos[0])[i])): + batched_state_components.append(torch.cat([_get_hypo_state(hypo)[i][j] for hypo in hypos])) + states.append(batched_state_components) + return states + + +def _slice_state(states: List[List[torch.Tensor]], idx: int, device: torch.device) -> List[List[torch.Tensor]]: + idx_tensor = torch.tensor([idx], device=device) + return [[state.index_select(0, idx_tensor) for state in state_tuple] for state_tuple in states] + + +def _default_hypo_sort_key(hypo: Hypothesis) -> float: + return _get_hypo_score(hypo) / (len(_get_hypo_tokens(hypo)) + 1) + + +def _compute_updated_scores( + hypos: List[Hypothesis], + next_token_probs: torch.Tensor, + beam_width: int, +) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor]: + hypo_scores = torch.tensor([_get_hypo_score(h) for h in hypos]).unsqueeze(1) + nonblank_scores = hypo_scores + next_token_probs[:, :-1] # [beam_width, num_tokens - 1] + nonblank_nbest_scores, nonblank_nbest_idx = nonblank_scores.reshape(-1).topk(beam_width) + nonblank_nbest_hypo_idx = nonblank_nbest_idx.div(nonblank_scores.shape[1], rounding_mode="trunc") + nonblank_nbest_token = nonblank_nbest_idx % nonblank_scores.shape[1] + return nonblank_nbest_scores, nonblank_nbest_hypo_idx, nonblank_nbest_token + + +def _remove_hypo(hypo: Hypothesis, hypo_list: List[Hypothesis]) -> None: + for i, elem in enumerate(hypo_list): + if _get_hypo_key(hypo) == _get_hypo_key(elem): + del hypo_list[i] + break + + +class RNNTBeamSearch(torch.nn.Module): + r"""Beam search decoder for RNN-T model. + + See Also: + * :class:`torchaudio.pipelines.RNNTBundle`: ASR pipeline with pretrained model. + + Args: + model (RNNT): RNN-T model to use. + blank (int): index of blank token in vocabulary. + temperature (float, optional): temperature to apply to joint network output. + Larger values yield more uniform samples. (Default: 1.0) + hypo_sort_key (Callable[[Hypothesis], float] or None, optional): callable that computes a score + for a given hypothesis to rank hypotheses by. If ``None``, defaults to callable that returns + hypothesis score normalized by token sequence length. (Default: None) + step_max_tokens (int, optional): maximum number of tokens to emit per input time step. (Default: 100) + """ + + def __init__( + self, + model: RNNT, + blank: int, + temperature: float = 1.0, + hypo_sort_key: Optional[Callable[[Hypothesis], float]] = None, + step_max_tokens: int = 100, + ) -> None: + super().__init__() + self.model = model + self.blank = blank + self.temperature = temperature + + if hypo_sort_key is None: + self.hypo_sort_key = _default_hypo_sort_key + else: + self.hypo_sort_key = hypo_sort_key + + self.step_max_tokens = step_max_tokens + + def _init_b_hypos(self, device: torch.device) -> List[Hypothesis]: + token = self.blank + state = None + + one_tensor = torch.tensor([1], device=device) + pred_out, _, pred_state = self.model.predict(torch.tensor([[token]], device=device), one_tensor, state) + init_hypo = ( + [token], + pred_out[0].detach(), + pred_state, + 0.0, + ) + return [init_hypo] + + def _gen_next_token_probs( + self, enc_out: torch.Tensor, hypos: List[Hypothesis], device: torch.device + ) -> torch.Tensor: + one_tensor = torch.tensor([1], device=device) + predictor_out = torch.stack([_get_hypo_predictor_out(h) for h in hypos], dim=0) + joined_out, _, _ = self.model.join( + enc_out, + one_tensor, + predictor_out, + torch.tensor([1] * len(hypos), device=device), + ) # [beam_width, 1, 1, num_tokens] + joined_out = torch.nn.functional.log_softmax(joined_out / self.temperature, dim=3) + return joined_out[:, 0, 0] + + def _gen_b_hypos( + self, + b_hypos: List[Hypothesis], + a_hypos: List[Hypothesis], + next_token_probs: torch.Tensor, + key_to_b_hypo: Dict[str, Hypothesis], + ) -> List[Hypothesis]: + for i in range(len(a_hypos)): + h_a = a_hypos[i] + append_blank_score = _get_hypo_score(h_a) + next_token_probs[i, -1] + if _get_hypo_key(h_a) in key_to_b_hypo: + h_b = key_to_b_hypo[_get_hypo_key(h_a)] + _remove_hypo(h_b, b_hypos) + score = float(torch.tensor(_get_hypo_score(h_b)).logaddexp(append_blank_score)) + else: + score = float(append_blank_score) + h_b = ( + _get_hypo_tokens(h_a), + _get_hypo_predictor_out(h_a), + _get_hypo_state(h_a), + score, + ) + b_hypos.append(h_b) + key_to_b_hypo[_get_hypo_key(h_b)] = h_b + _, sorted_idx = torch.tensor([_get_hypo_score(hypo) for hypo in b_hypos]).sort() + return [b_hypos[idx] for idx in sorted_idx] + + def _gen_a_hypos( + self, + a_hypos: List[Hypothesis], + b_hypos: List[Hypothesis], + next_token_probs: torch.Tensor, + t: int, + beam_width: int, + device: torch.device, + ) -> List[Hypothesis]: + ( + nonblank_nbest_scores, + nonblank_nbest_hypo_idx, + nonblank_nbest_token, + ) = _compute_updated_scores(a_hypos, next_token_probs, beam_width) + + if len(b_hypos) < beam_width: + b_nbest_score = -float("inf") + else: + b_nbest_score = _get_hypo_score(b_hypos[-beam_width]) + + base_hypos: List[Hypothesis] = [] + new_tokens: List[int] = [] + new_scores: List[float] = [] + for i in range(beam_width): + score = float(nonblank_nbest_scores[i]) + if score > b_nbest_score: + a_hypo_idx = int(nonblank_nbest_hypo_idx[i]) + base_hypos.append(a_hypos[a_hypo_idx]) + new_tokens.append(int(nonblank_nbest_token[i])) + new_scores.append(score) + + if base_hypos: + new_hypos = self._gen_new_hypos(base_hypos, new_tokens, new_scores, t, device) + else: + new_hypos: List[Hypothesis] = [] + + return new_hypos + + def _gen_new_hypos( + self, + base_hypos: List[Hypothesis], + tokens: List[int], + scores: List[float], + t: int, + device: torch.device, + ) -> List[Hypothesis]: + tgt_tokens = torch.tensor([[token] for token in tokens], device=device) + states = _batch_state(base_hypos) + pred_out, _, pred_states = self.model.predict( + tgt_tokens, + torch.tensor([1] * len(base_hypos), device=device), + states, + ) + new_hypos: List[Hypothesis] = [] + for i, h_a in enumerate(base_hypos): + new_tokens = _get_hypo_tokens(h_a) + [tokens[i]] + new_hypos.append((new_tokens, pred_out[i].detach(), _slice_state(pred_states, i, device), scores[i])) + return new_hypos + + def _search( + self, + enc_out: torch.Tensor, + hypo: Optional[List[Hypothesis]], + beam_width: int, + ) -> List[Hypothesis]: + n_time_steps = enc_out.shape[1] + device = enc_out.device + + a_hypos: List[Hypothesis] = [] + b_hypos = self._init_b_hypos(device) if hypo is None else hypo + for t in range(n_time_steps): + a_hypos = b_hypos + b_hypos = torch.jit.annotate(List[Hypothesis], []) + key_to_b_hypo: Dict[str, Hypothesis] = {} + symbols_current_t = 0 + + while a_hypos: + next_token_probs = self._gen_next_token_probs(enc_out[:, t : t + 1], a_hypos, device) + next_token_probs = next_token_probs.cpu() + b_hypos = self._gen_b_hypos(b_hypos, a_hypos, next_token_probs, key_to_b_hypo) + + if symbols_current_t == self.step_max_tokens: + break + + a_hypos = self._gen_a_hypos( + a_hypos, + b_hypos, + next_token_probs, + t, + beam_width, + device, + ) + if a_hypos: + symbols_current_t += 1 + + _, sorted_idx = torch.tensor([self.hypo_sort_key(hyp) for hyp in b_hypos]).topk(beam_width) + b_hypos = [b_hypos[idx] for idx in sorted_idx] + + return b_hypos + + def forward(self, input: torch.Tensor, length: torch.Tensor, beam_width: int) -> List[Hypothesis]: + r"""Performs beam search for the given input sequence. + + T: number of frames; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): sequence of input frames, with shape (T, D) or (1, T, D). + length (torch.Tensor): number of valid frames in input + sequence, with shape () or (1,). + beam_width (int): beam size to use during search. + + Returns: + List[Hypothesis]: top-``beam_width`` hypotheses found by beam search. + """ + if input.dim() != 2 and not (input.dim() == 3 and input.shape[0] == 1): + raise ValueError("input must be of shape (T, D) or (1, T, D)") + if input.dim() == 2: + input = input.unsqueeze(0) + + if length.shape != () and length.shape != (1,): + raise ValueError("length must be of shape () or (1,)") + if length.dim() == 0: + length = length.unsqueeze(0) + + enc_out, _ = self.model.transcribe(input, length) + return self._search(enc_out, None, beam_width) + + @torch.jit.export + def infer( + self, + input: torch.Tensor, + length: torch.Tensor, + beam_width: int, + state: Optional[List[List[torch.Tensor]]] = None, + hypothesis: Optional[List[Hypothesis]] = None, + ) -> Tuple[List[Hypothesis], List[List[torch.Tensor]]]: + r"""Performs beam search for the given input sequence in streaming mode. + + T: number of frames; + D: feature dimension of each frame. + + Args: + input (torch.Tensor): sequence of input frames, with shape (T, D) or (1, T, D). + length (torch.Tensor): number of valid frames in input + sequence, with shape () or (1,). + beam_width (int): beam size to use during search. + state (List[List[torch.Tensor]] or None, optional): list of lists of tensors + representing transcription network internal state generated in preceding + invocation. (Default: ``None``) + hypothesis (List[Hypothesis] or None): hypotheses from preceding invocation to seed + search with. (Default: ``None``) + + Returns: + (List[Hypothesis], List[List[torch.Tensor]]): + List[Hypothesis] + top-``beam_width`` hypotheses found by beam search. + List[List[torch.Tensor]] + list of lists of tensors representing transcription network + internal state generated in current invocation. + """ + if input.dim() != 2 and not (input.dim() == 3 and input.shape[0] == 1): + raise ValueError("input must be of shape (T, D) or (1, T, D)") + if input.dim() == 2: + input = input.unsqueeze(0) + + if length.shape != () and length.shape != (1,): + raise ValueError("length must be of shape () or (1,)") + if length.dim() == 0: + length = length.unsqueeze(0) + + enc_out, _, state = self.model.transcribe_streaming(input, length, state) + return self._search(enc_out, hypothesis, beam_width), state diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/tacotron2.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/tacotron2.py new file mode 100644 index 0000000000000000000000000000000000000000..ad4f9b21a66e69c3e0fdb8bb80e80cbcbe2ef429 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/tacotron2.py @@ -0,0 +1,1046 @@ +# ***************************************************************************** +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# * Neither the name of the NVIDIA CORPORATION nor the +# names of its contributors may be used to endorse or promote products +# derived from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY +# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# ***************************************************************************** + +import warnings +from typing import List, Optional, Tuple, Union + +import torch +from torch import nn, Tensor +from torch.nn import functional as F + + +__all__ = [ + "Tacotron2", +] + + +def _get_linear_layer(in_dim: int, out_dim: int, bias: bool = True, w_init_gain: str = "linear") -> torch.nn.Linear: + r"""Linear layer with xavier uniform initialization. + + Args: + in_dim (int): Size of each input sample. + out_dim (int): Size of each output sample. + bias (bool, optional): If set to ``False``, the layer will not learn an additive bias. (Default: ``True``) + w_init_gain (str, optional): Parameter passed to ``torch.nn.init.calculate_gain`` + for setting the gain parameter of ``xavier_uniform_``. (Default: ``linear``) + + Returns: + (torch.nn.Linear): The corresponding linear layer. + """ + linear = torch.nn.Linear(in_dim, out_dim, bias=bias) + torch.nn.init.xavier_uniform_(linear.weight, gain=torch.nn.init.calculate_gain(w_init_gain)) + return linear + + +def _get_conv1d_layer( + in_channels: int, + out_channels: int, + kernel_size: int = 1, + stride: int = 1, + padding: Optional[Union[str, int, Tuple[int]]] = None, + dilation: int = 1, + bias: bool = True, + w_init_gain: str = "linear", +) -> torch.nn.Conv1d: + r"""1D convolution with xavier uniform initialization. + + Args: + in_channels (int): Number of channels in the input image. + out_channels (int): Number of channels produced by the convolution. + kernel_size (int, optional): Number of channels in the input image. (Default: ``1``) + stride (int, optional): Number of channels in the input image. (Default: ``1``) + padding (str, int or tuple, optional): Padding added to both sides of the input. + (Default: dilation * (kernel_size - 1) / 2) + dilation (int, optional): Number of channels in the input image. (Default: ``1``) + w_init_gain (str, optional): Parameter passed to ``torch.nn.init.calculate_gain`` + for setting the gain parameter of ``xavier_uniform_``. (Default: ``linear``) + + Returns: + (torch.nn.Conv1d): The corresponding Conv1D layer. + """ + if padding is None: + if kernel_size % 2 != 1: + raise ValueError("kernel_size must be odd") + padding = int(dilation * (kernel_size - 1) / 2) + + conv1d = torch.nn.Conv1d( + in_channels, + out_channels, + kernel_size=kernel_size, + stride=stride, + padding=padding, + dilation=dilation, + bias=bias, + ) + + torch.nn.init.xavier_uniform_(conv1d.weight, gain=torch.nn.init.calculate_gain(w_init_gain)) + + return conv1d + + +def _get_mask_from_lengths(lengths: Tensor) -> Tensor: + r"""Returns a binary mask based on ``lengths``. The ``i``-th row and ``j``-th column of the mask + is ``1`` if ``j`` is smaller than ``i``-th element of ``lengths. + + Args: + lengths (Tensor): The length of each element in the batch, with shape (n_batch, ). + + Returns: + mask (Tensor): The binary mask, with shape (n_batch, max of ``lengths``). + """ + max_len = torch.max(lengths).item() + ids = torch.arange(0, max_len, device=lengths.device, dtype=lengths.dtype) + mask = (ids < lengths.unsqueeze(1)).byte() + mask = torch.le(mask, 0) + return mask + + +class _LocationLayer(nn.Module): + r"""Location layer used in the Attention model. + + Args: + attention_n_filter (int): Number of filters for attention model. + attention_kernel_size (int): Kernel size for attention model. + attention_hidden_dim (int): Dimension of attention hidden representation. + """ + + def __init__( + self, + attention_n_filter: int, + attention_kernel_size: int, + attention_hidden_dim: int, + ): + super().__init__() + padding = int((attention_kernel_size - 1) / 2) + self.location_conv = _get_conv1d_layer( + 2, + attention_n_filter, + kernel_size=attention_kernel_size, + padding=padding, + bias=False, + stride=1, + dilation=1, + ) + self.location_dense = _get_linear_layer( + attention_n_filter, attention_hidden_dim, bias=False, w_init_gain="tanh" + ) + + def forward(self, attention_weights_cat: Tensor) -> Tensor: + r"""Location layer used in the Attention model. + + Args: + attention_weights_cat (Tensor): Cumulative and previous attention weights + with shape (n_batch, 2, max of ``text_lengths``). + + Returns: + processed_attention (Tensor): Cumulative and previous attention weights + with shape (n_batch, ``attention_hidden_dim``). + """ + # (n_batch, attention_n_filter, text_lengths.max()) + processed_attention = self.location_conv(attention_weights_cat) + processed_attention = processed_attention.transpose(1, 2) + # (n_batch, text_lengths.max(), attention_hidden_dim) + processed_attention = self.location_dense(processed_attention) + return processed_attention + + +class _Attention(nn.Module): + r"""Locally sensitive attention model. + + Args: + attention_rnn_dim (int): Number of hidden units for RNN. + encoder_embedding_dim (int): Number of embedding dimensions in the Encoder. + attention_hidden_dim (int): Dimension of attention hidden representation. + attention_location_n_filter (int): Number of filters for Attention model. + attention_location_kernel_size (int): Kernel size for Attention model. + """ + + def __init__( + self, + attention_rnn_dim: int, + encoder_embedding_dim: int, + attention_hidden_dim: int, + attention_location_n_filter: int, + attention_location_kernel_size: int, + ) -> None: + super().__init__() + self.query_layer = _get_linear_layer(attention_rnn_dim, attention_hidden_dim, bias=False, w_init_gain="tanh") + self.memory_layer = _get_linear_layer( + encoder_embedding_dim, attention_hidden_dim, bias=False, w_init_gain="tanh" + ) + self.v = _get_linear_layer(attention_hidden_dim, 1, bias=False) + self.location_layer = _LocationLayer( + attention_location_n_filter, + attention_location_kernel_size, + attention_hidden_dim, + ) + self.score_mask_value = -float("inf") + + def _get_alignment_energies(self, query: Tensor, processed_memory: Tensor, attention_weights_cat: Tensor) -> Tensor: + r"""Get the alignment vector. + + Args: + query (Tensor): Decoder output with shape (n_batch, n_mels * n_frames_per_step). + processed_memory (Tensor): Processed Encoder outputs + with shape (n_batch, max of ``text_lengths``, attention_hidden_dim). + attention_weights_cat (Tensor): Cumulative and previous attention weights + with shape (n_batch, 2, max of ``text_lengths``). + + Returns: + alignment (Tensor): attention weights, it is a tensor with shape (batch, max of ``text_lengths``). + """ + + processed_query = self.query_layer(query.unsqueeze(1)) + processed_attention_weights = self.location_layer(attention_weights_cat) + energies = self.v(torch.tanh(processed_query + processed_attention_weights + processed_memory)) + + alignment = energies.squeeze(2) + return alignment + + def forward( + self, + attention_hidden_state: Tensor, + memory: Tensor, + processed_memory: Tensor, + attention_weights_cat: Tensor, + mask: Tensor, + ) -> Tuple[Tensor, Tensor]: + r"""Pass the input through the Attention model. + + Args: + attention_hidden_state (Tensor): Attention rnn last output with shape (n_batch, ``attention_rnn_dim``). + memory (Tensor): Encoder outputs with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + processed_memory (Tensor): Processed Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``attention_hidden_dim``). + attention_weights_cat (Tensor): Previous and cumulative attention weights + with shape (n_batch, current_num_frames * 2, max of ``text_lengths``). + mask (Tensor): Binary mask for padded data with shape (n_batch, current_num_frames). + + Returns: + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + """ + alignment = self._get_alignment_energies(attention_hidden_state, processed_memory, attention_weights_cat) + + alignment = alignment.masked_fill(mask, self.score_mask_value) + + attention_weights = F.softmax(alignment, dim=1) + attention_context = torch.bmm(attention_weights.unsqueeze(1), memory) + attention_context = attention_context.squeeze(1) + + return attention_context, attention_weights + + +class _Prenet(nn.Module): + r"""Prenet Module. It is consists of ``len(output_size)`` linear layers. + + Args: + in_dim (int): The size of each input sample. + output_sizes (list): The output dimension of each linear layers. + """ + + def __init__(self, in_dim: int, out_sizes: List[int]) -> None: + super().__init__() + in_sizes = [in_dim] + out_sizes[:-1] + self.layers = nn.ModuleList( + [_get_linear_layer(in_size, out_size, bias=False) for (in_size, out_size) in zip(in_sizes, out_sizes)] + ) + + def forward(self, x: Tensor) -> Tensor: + r"""Pass the input through Prenet. + + Args: + x (Tensor): The input sequence to Prenet with shape (n_batch, in_dim). + + Return: + x (Tensor): Tensor with shape (n_batch, sizes[-1]) + """ + + for linear in self.layers: + x = F.dropout(F.relu(linear(x)), p=0.5, training=True) + return x + + +class _Postnet(nn.Module): + r"""Postnet Module. + + Args: + n_mels (int): Number of mel bins. + postnet_embedding_dim (int): Postnet embedding dimension. + postnet_kernel_size (int): Postnet kernel size. + postnet_n_convolution (int): Number of postnet convolutions. + """ + + def __init__( + self, + n_mels: int, + postnet_embedding_dim: int, + postnet_kernel_size: int, + postnet_n_convolution: int, + ): + super().__init__() + self.convolutions = nn.ModuleList() + + for i in range(postnet_n_convolution): + in_channels = n_mels if i == 0 else postnet_embedding_dim + out_channels = n_mels if i == (postnet_n_convolution - 1) else postnet_embedding_dim + init_gain = "linear" if i == (postnet_n_convolution - 1) else "tanh" + num_features = n_mels if i == (postnet_n_convolution - 1) else postnet_embedding_dim + self.convolutions.append( + nn.Sequential( + _get_conv1d_layer( + in_channels, + out_channels, + kernel_size=postnet_kernel_size, + stride=1, + padding=int((postnet_kernel_size - 1) / 2), + dilation=1, + w_init_gain=init_gain, + ), + nn.BatchNorm1d(num_features), + ) + ) + + self.n_convs = len(self.convolutions) + + def forward(self, x: Tensor) -> Tensor: + r"""Pass the input through Postnet. + + Args: + x (Tensor): The input sequence with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + + Return: + x (Tensor): Tensor with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + """ + + for i, conv in enumerate(self.convolutions): + if i < self.n_convs - 1: + x = F.dropout(torch.tanh(conv(x)), 0.5, training=self.training) + else: + x = F.dropout(conv(x), 0.5, training=self.training) + + return x + + +class _Encoder(nn.Module): + r"""Encoder Module. + + Args: + encoder_embedding_dim (int): Number of embedding dimensions in the encoder. + encoder_n_convolution (int): Number of convolution layers in the encoder. + encoder_kernel_size (int): The kernel size in the encoder. + + Examples + >>> encoder = _Encoder(3, 512, 5) + >>> input = torch.rand(10, 20, 30) + >>> output = encoder(input) # shape: (10, 30, 512) + """ + + def __init__( + self, + encoder_embedding_dim: int, + encoder_n_convolution: int, + encoder_kernel_size: int, + ) -> None: + super().__init__() + + self.convolutions = nn.ModuleList() + for _ in range(encoder_n_convolution): + conv_layer = nn.Sequential( + _get_conv1d_layer( + encoder_embedding_dim, + encoder_embedding_dim, + kernel_size=encoder_kernel_size, + stride=1, + padding=int((encoder_kernel_size - 1) / 2), + dilation=1, + w_init_gain="relu", + ), + nn.BatchNorm1d(encoder_embedding_dim), + ) + self.convolutions.append(conv_layer) + + self.lstm = nn.LSTM( + encoder_embedding_dim, + int(encoder_embedding_dim / 2), + 1, + batch_first=True, + bidirectional=True, + ) + self.lstm.flatten_parameters() + + def forward(self, x: Tensor, input_lengths: Tensor) -> Tensor: + r"""Pass the input through the Encoder. + + Args: + x (Tensor): The input sequences with shape (n_batch, encoder_embedding_dim, n_seq). + input_lengths (Tensor): The length of each input sequence with shape (n_batch, ). + + Return: + x (Tensor): A tensor with shape (n_batch, n_seq, encoder_embedding_dim). + """ + + for conv in self.convolutions: + x = F.dropout(F.relu(conv(x)), 0.5, self.training) + + x = x.transpose(1, 2) + + input_lengths = input_lengths.cpu() + x = nn.utils.rnn.pack_padded_sequence(x, input_lengths, batch_first=True) + + outputs, _ = self.lstm(x) + outputs, _ = nn.utils.rnn.pad_packed_sequence(outputs, batch_first=True) + + return outputs + + +class _Decoder(nn.Module): + r"""Decoder with Attention model. + + Args: + n_mels (int): number of mel bins + n_frames_per_step (int): number of frames processed per step, only 1 is supported + encoder_embedding_dim (int): the number of embedding dimensions in the encoder. + decoder_rnn_dim (int): number of units in decoder LSTM + decoder_max_step (int): maximum number of output mel spectrograms + decoder_dropout (float): dropout probability for decoder LSTM + decoder_early_stopping (bool): stop decoding when all samples are finished + attention_rnn_dim (int): number of units in attention LSTM + attention_hidden_dim (int): dimension of attention hidden representation + attention_location_n_filter (int): number of filters for attention model + attention_location_kernel_size (int): kernel size for attention model + attention_dropout (float): dropout probability for attention LSTM + prenet_dim (int): number of ReLU units in prenet layers + gate_threshold (float): probability threshold for stop token + """ + + def __init__( + self, + n_mels: int, + n_frames_per_step: int, + encoder_embedding_dim: int, + decoder_rnn_dim: int, + decoder_max_step: int, + decoder_dropout: float, + decoder_early_stopping: bool, + attention_rnn_dim: int, + attention_hidden_dim: int, + attention_location_n_filter: int, + attention_location_kernel_size: int, + attention_dropout: float, + prenet_dim: int, + gate_threshold: float, + ) -> None: + + super().__init__() + self.n_mels = n_mels + self.n_frames_per_step = n_frames_per_step + self.encoder_embedding_dim = encoder_embedding_dim + self.attention_rnn_dim = attention_rnn_dim + self.decoder_rnn_dim = decoder_rnn_dim + self.prenet_dim = prenet_dim + self.decoder_max_step = decoder_max_step + self.gate_threshold = gate_threshold + self.attention_dropout = attention_dropout + self.decoder_dropout = decoder_dropout + self.decoder_early_stopping = decoder_early_stopping + + self.prenet = _Prenet(n_mels * n_frames_per_step, [prenet_dim, prenet_dim]) + + self.attention_rnn = nn.LSTMCell(prenet_dim + encoder_embedding_dim, attention_rnn_dim) + + self.attention_layer = _Attention( + attention_rnn_dim, + encoder_embedding_dim, + attention_hidden_dim, + attention_location_n_filter, + attention_location_kernel_size, + ) + + self.decoder_rnn = nn.LSTMCell(attention_rnn_dim + encoder_embedding_dim, decoder_rnn_dim, True) + + self.linear_projection = _get_linear_layer(decoder_rnn_dim + encoder_embedding_dim, n_mels * n_frames_per_step) + + self.gate_layer = _get_linear_layer( + decoder_rnn_dim + encoder_embedding_dim, 1, bias=True, w_init_gain="sigmoid" + ) + + def _get_initial_frame(self, memory: Tensor) -> Tensor: + r"""Gets all zeros frames to use as the first decoder input. + + Args: + memory (Tensor): Encoder outputs with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + + Returns: + decoder_input (Tensor): all zeros frames with shape + (n_batch, max of ``text_lengths``, ``n_mels * n_frames_per_step``). + """ + + n_batch = memory.size(0) + dtype = memory.dtype + device = memory.device + decoder_input = torch.zeros(n_batch, self.n_mels * self.n_frames_per_step, dtype=dtype, device=device) + return decoder_input + + def _initialize_decoder_states( + self, memory: Tensor + ) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor]: + r"""Initializes attention rnn states, decoder rnn states, attention + weights, attention cumulative weights, attention context, stores memory + and stores processed memory. + + Args: + memory (Tensor): Encoder outputs with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + + Returns: + attention_hidden (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + attention_cell (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + decoder_hidden (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + decoder_cell (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + attention_weights_cum (Tensor): Cumulated attention weights with shape (n_batch, max of ``text_lengths``). + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + processed_memory (Tensor): Processed encoder outputs + with shape (n_batch, max of ``text_lengths``, ``attention_hidden_dim``). + """ + n_batch = memory.size(0) + max_time = memory.size(1) + dtype = memory.dtype + device = memory.device + + attention_hidden = torch.zeros(n_batch, self.attention_rnn_dim, dtype=dtype, device=device) + attention_cell = torch.zeros(n_batch, self.attention_rnn_dim, dtype=dtype, device=device) + + decoder_hidden = torch.zeros(n_batch, self.decoder_rnn_dim, dtype=dtype, device=device) + decoder_cell = torch.zeros(n_batch, self.decoder_rnn_dim, dtype=dtype, device=device) + + attention_weights = torch.zeros(n_batch, max_time, dtype=dtype, device=device) + attention_weights_cum = torch.zeros(n_batch, max_time, dtype=dtype, device=device) + attention_context = torch.zeros(n_batch, self.encoder_embedding_dim, dtype=dtype, device=device) + + processed_memory = self.attention_layer.memory_layer(memory) + + return ( + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + processed_memory, + ) + + def _parse_decoder_inputs(self, decoder_inputs: Tensor) -> Tensor: + r"""Prepares decoder inputs. + + Args: + decoder_inputs (Tensor): Inputs used for teacher-forced training, i.e. mel-specs, + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``) + + Returns: + inputs (Tensor): Processed decoder inputs with shape (max of ``mel_specgram_lengths``, n_batch, ``n_mels``). + """ + # (n_batch, n_mels, mel_specgram_lengths.max()) -> (n_batch, mel_specgram_lengths.max(), n_mels) + decoder_inputs = decoder_inputs.transpose(1, 2) + decoder_inputs = decoder_inputs.view( + decoder_inputs.size(0), + int(decoder_inputs.size(1) / self.n_frames_per_step), + -1, + ) + # (n_batch, mel_specgram_lengths.max(), n_mels) -> (mel_specgram_lengths.max(), n_batch, n_mels) + decoder_inputs = decoder_inputs.transpose(0, 1) + return decoder_inputs + + def _parse_decoder_outputs( + self, mel_specgram: Tensor, gate_outputs: Tensor, alignments: Tensor + ) -> Tuple[Tensor, Tensor, Tensor]: + r"""Prepares decoder outputs for output + + Args: + mel_specgram (Tensor): mel spectrogram with shape (max of ``mel_specgram_lengths``, n_batch, ``n_mels``) + gate_outputs (Tensor): predicted stop token with shape (max of ``mel_specgram_lengths``, n_batch) + alignments (Tensor): sequence of attention weights from the decoder + with shape (max of ``mel_specgram_lengths``, n_batch, max of ``text_lengths``) + + Returns: + mel_specgram (Tensor): mel spectrogram with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``) + gate_outputs (Tensor): predicted stop token with shape (n_batch, max of ``mel_specgram_lengths``) + alignments (Tensor): sequence of attention weights from the decoder + with shape (n_batch, max of ``mel_specgram_lengths``, max of ``text_lengths``) + """ + # (mel_specgram_lengths.max(), n_batch, text_lengths.max()) + # -> (n_batch, mel_specgram_lengths.max(), text_lengths.max()) + alignments = alignments.transpose(0, 1).contiguous() + # (mel_specgram_lengths.max(), n_batch) -> (n_batch, mel_specgram_lengths.max()) + gate_outputs = gate_outputs.transpose(0, 1).contiguous() + # (mel_specgram_lengths.max(), n_batch, n_mels) -> (n_batch, mel_specgram_lengths.max(), n_mels) + mel_specgram = mel_specgram.transpose(0, 1).contiguous() + # decouple frames per step + shape = (mel_specgram.shape[0], -1, self.n_mels) + mel_specgram = mel_specgram.view(*shape) + # (n_batch, mel_specgram_lengths.max(), n_mels) -> (n_batch, n_mels, T_out) + mel_specgram = mel_specgram.transpose(1, 2) + + return mel_specgram, gate_outputs, alignments + + def decode( + self, + decoder_input: Tensor, + attention_hidden: Tensor, + attention_cell: Tensor, + decoder_hidden: Tensor, + decoder_cell: Tensor, + attention_weights: Tensor, + attention_weights_cum: Tensor, + attention_context: Tensor, + memory: Tensor, + processed_memory: Tensor, + mask: Tensor, + ) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor]: + r"""Decoder step using stored states, attention and memory + + Args: + decoder_input (Tensor): Output of the Prenet with shape (n_batch, ``prenet_dim``). + attention_hidden (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + attention_cell (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + decoder_hidden (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + decoder_cell (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + attention_weights_cum (Tensor): Cumulated attention weights with shape (n_batch, max of ``text_lengths``). + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + memory (Tensor): Encoder output with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + processed_memory (Tensor): Processed Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``attention_hidden_dim``). + mask (Tensor): Binary mask for padded data with shape (n_batch, current_num_frames). + + Returns: + decoder_output: Predicted mel spectrogram for the current frame with shape (n_batch, ``n_mels``). + gate_prediction (Tensor): Prediction of the stop token with shape (n_batch, ``1``). + attention_hidden (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + attention_cell (Tensor): Hidden state of the attention LSTM with shape (n_batch, ``attention_rnn_dim``). + decoder_hidden (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + decoder_cell (Tensor): Hidden state of the decoder LSTM with shape (n_batch, ``decoder_rnn_dim``). + attention_weights (Tensor): Attention weights with shape (n_batch, max of ``text_lengths``). + attention_weights_cum (Tensor): Cumulated attention weights with shape (n_batch, max of ``text_lengths``). + attention_context (Tensor): Context vector with shape (n_batch, ``encoder_embedding_dim``). + """ + cell_input = torch.cat((decoder_input, attention_context), -1) + + attention_hidden, attention_cell = self.attention_rnn(cell_input, (attention_hidden, attention_cell)) + attention_hidden = F.dropout(attention_hidden, self.attention_dropout, self.training) + + attention_weights_cat = torch.cat((attention_weights.unsqueeze(1), attention_weights_cum.unsqueeze(1)), dim=1) + attention_context, attention_weights = self.attention_layer( + attention_hidden, memory, processed_memory, attention_weights_cat, mask + ) + + attention_weights_cum += attention_weights + decoder_input = torch.cat((attention_hidden, attention_context), -1) + + decoder_hidden, decoder_cell = self.decoder_rnn(decoder_input, (decoder_hidden, decoder_cell)) + decoder_hidden = F.dropout(decoder_hidden, self.decoder_dropout, self.training) + + decoder_hidden_attention_context = torch.cat((decoder_hidden, attention_context), dim=1) + decoder_output = self.linear_projection(decoder_hidden_attention_context) + + gate_prediction = self.gate_layer(decoder_hidden_attention_context) + + return ( + decoder_output, + gate_prediction, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + ) + + def forward( + self, memory: Tensor, mel_specgram_truth: Tensor, memory_lengths: Tensor + ) -> Tuple[Tensor, Tensor, Tensor]: + r"""Decoder forward pass for training. + + Args: + memory (Tensor): Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + mel_specgram_truth (Tensor): Decoder ground-truth mel-specs for teacher forcing + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + memory_lengths (Tensor): Encoder output lengths for attention masking + (the same as ``text_lengths``) with shape (n_batch, ). + + Returns: + mel_specgram (Tensor): Predicted mel spectrogram + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + gate_outputs (Tensor): Predicted stop token for each timestep + with shape (n_batch, max of ``mel_specgram_lengths``). + alignments (Tensor): Sequence of attention weights from the decoder + with shape (n_batch, max of ``mel_specgram_lengths``, max of ``text_lengths``). + """ + + decoder_input = self._get_initial_frame(memory).unsqueeze(0) + decoder_inputs = self._parse_decoder_inputs(mel_specgram_truth) + decoder_inputs = torch.cat((decoder_input, decoder_inputs), dim=0) + decoder_inputs = self.prenet(decoder_inputs) + + mask = _get_mask_from_lengths(memory_lengths) + ( + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + processed_memory, + ) = self._initialize_decoder_states(memory) + + mel_outputs, gate_outputs, alignments = [], [], [] + while len(mel_outputs) < decoder_inputs.size(0) - 1: + decoder_input = decoder_inputs[len(mel_outputs)] + ( + mel_output, + gate_output, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + ) = self.decode( + decoder_input, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + memory, + processed_memory, + mask, + ) + + mel_outputs += [mel_output.squeeze(1)] + gate_outputs += [gate_output.squeeze(1)] + alignments += [attention_weights] + + mel_specgram, gate_outputs, alignments = self._parse_decoder_outputs( + torch.stack(mel_outputs), torch.stack(gate_outputs), torch.stack(alignments) + ) + + return mel_specgram, gate_outputs, alignments + + def _get_go_frame(self, memory: Tensor) -> Tensor: + """Gets all zeros frames to use as the first decoder input + + args: + memory (Tensor): Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + + returns: + decoder_input (Tensor): All zeros frames with shape(n_batch, ``n_mels`` * ``n_frame_per_step``). + """ + + n_batch = memory.size(0) + dtype = memory.dtype + device = memory.device + decoder_input = torch.zeros(n_batch, self.n_mels * self.n_frames_per_step, dtype=dtype, device=device) + return decoder_input + + @torch.jit.export + def infer(self, memory: Tensor, memory_lengths: Tensor) -> Tuple[Tensor, Tensor, Tensor, Tensor]: + """Decoder inference + + Args: + memory (Tensor): Encoder outputs + with shape (n_batch, max of ``text_lengths``, ``encoder_embedding_dim``). + memory_lengths (Tensor): Encoder output lengths for attention masking + (the same as ``text_lengths``) with shape (n_batch, ). + + Returns: + mel_specgram (Tensor): Predicted mel spectrogram + with shape (n_batch, ``n_mels``, max of ``mel_specgram_lengths``). + mel_specgram_lengths (Tensor): the length of the predicted mel spectrogram (n_batch, )) + gate_outputs (Tensor): Predicted stop token for each timestep + with shape (n_batch, max of ``mel_specgram_lengths``). + alignments (Tensor): Sequence of attention weights from the decoder + with shape (n_batch, max of ``mel_specgram_lengths``, max of ``text_lengths``). + """ + batch_size, device = memory.size(0), memory.device + + decoder_input = self._get_go_frame(memory) + + mask = _get_mask_from_lengths(memory_lengths) + ( + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + processed_memory, + ) = self._initialize_decoder_states(memory) + + mel_specgram_lengths = torch.zeros([batch_size], dtype=torch.int32, device=device) + finished = torch.zeros([batch_size], dtype=torch.bool, device=device) + mel_specgrams: List[Tensor] = [] + gate_outputs: List[Tensor] = [] + alignments: List[Tensor] = [] + for _ in range(self.decoder_max_step): + decoder_input = self.prenet(decoder_input) + ( + mel_specgram, + gate_output, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + ) = self.decode( + decoder_input, + attention_hidden, + attention_cell, + decoder_hidden, + decoder_cell, + attention_weights, + attention_weights_cum, + attention_context, + memory, + processed_memory, + mask, + ) + + mel_specgrams.append(mel_specgram.unsqueeze(0)) + gate_outputs.append(gate_output.transpose(0, 1)) + alignments.append(attention_weights) + mel_specgram_lengths[~finished] += 1 + + finished |= torch.sigmoid(gate_output.squeeze(1)) > self.gate_threshold + if self.decoder_early_stopping and torch.all(finished): + break + + decoder_input = mel_specgram + + if len(mel_specgrams) == self.decoder_max_step: + warnings.warn( + "Reached max decoder steps. The generated spectrogram might not cover " "the whole transcript." + ) + + mel_specgrams = torch.cat(mel_specgrams, dim=0) + gate_outputs = torch.cat(gate_outputs, dim=0) + alignments = torch.cat(alignments, dim=0) + + mel_specgrams, gate_outputs, alignments = self._parse_decoder_outputs(mel_specgrams, gate_outputs, alignments) + + return mel_specgrams, mel_specgram_lengths, gate_outputs, alignments + + +class Tacotron2(nn.Module): + r"""Tacotron2 model from *Natural TTS Synthesis by Conditioning WaveNet on Mel Spectrogram Predictions* + :cite:`shen2018natural` based on the implementation from + `Nvidia Deep Learning Examples `_. + + See Also: + * :class:`torchaudio.pipelines.Tacotron2TTSBundle`: TTS pipeline with pretrained model. + + Args: + mask_padding (bool, optional): Use mask padding (Default: ``False``). + n_mels (int, optional): Number of mel bins (Default: ``80``). + n_symbol (int, optional): Number of symbols for the input text (Default: ``148``). + n_frames_per_step (int, optional): Number of frames processed per step, only 1 is supported (Default: ``1``). + symbol_embedding_dim (int, optional): Input embedding dimension (Default: ``512``). + encoder_n_convolution (int, optional): Number of encoder convolutions (Default: ``3``). + encoder_kernel_size (int, optional): Encoder kernel size (Default: ``5``). + encoder_embedding_dim (int, optional): Encoder embedding dimension (Default: ``512``). + decoder_rnn_dim (int, optional): Number of units in decoder LSTM (Default: ``1024``). + decoder_max_step (int, optional): Maximum number of output mel spectrograms (Default: ``2000``). + decoder_dropout (float, optional): Dropout probability for decoder LSTM (Default: ``0.1``). + decoder_early_stopping (bool, optional): Continue decoding after all samples are finished (Default: ``True``). + attention_rnn_dim (int, optional): Number of units in attention LSTM (Default: ``1024``). + attention_hidden_dim (int, optional): Dimension of attention hidden representation (Default: ``128``). + attention_location_n_filter (int, optional): Number of filters for attention model (Default: ``32``). + attention_location_kernel_size (int, optional): Kernel size for attention model (Default: ``31``). + attention_dropout (float, optional): Dropout probability for attention LSTM (Default: ``0.1``). + prenet_dim (int, optional): Number of ReLU units in prenet layers (Default: ``256``). + postnet_n_convolution (int, optional): Number of postnet convolutions (Default: ``5``). + postnet_kernel_size (int, optional): Postnet kernel size (Default: ``5``). + postnet_embedding_dim (int, optional): Postnet embedding dimension (Default: ``512``). + gate_threshold (float, optional): Probability threshold for stop token (Default: ``0.5``). + """ + + def __init__( + self, + mask_padding: bool = False, + n_mels: int = 80, + n_symbol: int = 148, + n_frames_per_step: int = 1, + symbol_embedding_dim: int = 512, + encoder_embedding_dim: int = 512, + encoder_n_convolution: int = 3, + encoder_kernel_size: int = 5, + decoder_rnn_dim: int = 1024, + decoder_max_step: int = 2000, + decoder_dropout: float = 0.1, + decoder_early_stopping: bool = True, + attention_rnn_dim: int = 1024, + attention_hidden_dim: int = 128, + attention_location_n_filter: int = 32, + attention_location_kernel_size: int = 31, + attention_dropout: float = 0.1, + prenet_dim: int = 256, + postnet_n_convolution: int = 5, + postnet_kernel_size: int = 5, + postnet_embedding_dim: int = 512, + gate_threshold: float = 0.5, + ) -> None: + super().__init__() + + self.mask_padding = mask_padding + self.n_mels = n_mels + self.n_frames_per_step = n_frames_per_step + self.embedding = nn.Embedding(n_symbol, symbol_embedding_dim) + torch.nn.init.xavier_uniform_(self.embedding.weight) + self.encoder = _Encoder(encoder_embedding_dim, encoder_n_convolution, encoder_kernel_size) + self.decoder = _Decoder( + n_mels, + n_frames_per_step, + encoder_embedding_dim, + decoder_rnn_dim, + decoder_max_step, + decoder_dropout, + decoder_early_stopping, + attention_rnn_dim, + attention_hidden_dim, + attention_location_n_filter, + attention_location_kernel_size, + attention_dropout, + prenet_dim, + gate_threshold, + ) + self.postnet = _Postnet(n_mels, postnet_embedding_dim, postnet_kernel_size, postnet_n_convolution) + + def forward( + self, + tokens: Tensor, + token_lengths: Tensor, + mel_specgram: Tensor, + mel_specgram_lengths: Tensor, + ) -> Tuple[Tensor, Tensor, Tensor, Tensor]: + r"""Pass the input through the Tacotron2 model. This is in teacher + forcing mode, which is generally used for training. + + The input ``tokens`` should be padded with zeros to length max of ``token_lengths``. + The input ``mel_specgram`` should be padded with zeros to length max of ``mel_specgram_lengths``. + + Args: + tokens (Tensor): The input tokens to Tacotron2 with shape `(n_batch, max of token_lengths)`. + token_lengths (Tensor): The valid length of each sample in ``tokens`` with shape `(n_batch, )`. + mel_specgram (Tensor): The target mel spectrogram + with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + mel_specgram_lengths (Tensor): The length of each mel spectrogram with shape `(n_batch, )`. + + Returns: + [Tensor, Tensor, Tensor, Tensor]: + Tensor + Mel spectrogram before Postnet with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + Tensor + Mel spectrogram after Postnet with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + Tensor + The output for stop token at each time step with shape `(n_batch, max of mel_specgram_lengths)`. + Tensor + Sequence of attention weights from the decoder with + shape `(n_batch, max of mel_specgram_lengths, max of token_lengths)`. + """ + + embedded_inputs = self.embedding(tokens).transpose(1, 2) + + encoder_outputs = self.encoder(embedded_inputs, token_lengths) + mel_specgram, gate_outputs, alignments = self.decoder( + encoder_outputs, mel_specgram, memory_lengths=token_lengths + ) + + mel_specgram_postnet = self.postnet(mel_specgram) + mel_specgram_postnet = mel_specgram + mel_specgram_postnet + + if self.mask_padding: + mask = _get_mask_from_lengths(mel_specgram_lengths) + mask = mask.expand(self.n_mels, mask.size(0), mask.size(1)) + mask = mask.permute(1, 0, 2) + + mel_specgram.masked_fill_(mask, 0.0) + mel_specgram_postnet.masked_fill_(mask, 0.0) + gate_outputs.masked_fill_(mask[:, 0, :], 1e3) + + return mel_specgram, mel_specgram_postnet, gate_outputs, alignments + + @torch.jit.export + def infer(self, tokens: Tensor, lengths: Optional[Tensor] = None) -> Tuple[Tensor, Tensor, Tensor]: + r"""Using Tacotron2 for inference. The input is a batch of encoded + sentences (``tokens``) and its corresponding lengths (``lengths``). The + output is the generated mel spectrograms, its corresponding lengths, and + the attention weights from the decoder. + + The input `tokens` should be padded with zeros to length max of ``lengths``. + + Args: + tokens (Tensor): The input tokens to Tacotron2 with shape `(n_batch, max of lengths)`. + lengths (Tensor or None, optional): + The valid length of each sample in ``tokens`` with shape `(n_batch, )`. + If ``None``, it is assumed that the all the tokens are valid. Default: ``None`` + + Returns: + (Tensor, Tensor, Tensor): + Tensor + The predicted mel spectrogram with shape `(n_batch, n_mels, max of mel_specgram_lengths)`. + Tensor + The length of the predicted mel spectrogram with shape `(n_batch, )`. + Tensor + Sequence of attention weights from the decoder with shape + `(n_batch, max of mel_specgram_lengths, max of lengths)`. + """ + n_batch, max_length = tokens.shape + if lengths is None: + lengths = torch.tensor([max_length]).expand(n_batch).to(tokens.device, tokens.dtype) + + assert lengths is not None # For TorchScript compiler + embedded_inputs = self.embedding(tokens).transpose(1, 2) + encoder_outputs = self.encoder(embedded_inputs, lengths) + mel_specgram, mel_specgram_lengths, _, alignments = self.decoder.infer(encoder_outputs, lengths) + + mel_outputs_postnet = self.postnet(mel_specgram) + mel_outputs_postnet = mel_specgram + mel_outputs_postnet + + alignments = alignments.unfold(1, n_batch, n_batch).transpose(0, 2) + + return mel_outputs_postnet, mel_specgram_lengths, alignments diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/wav2letter.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/wav2letter.py new file mode 100644 index 0000000000000000000000000000000000000000..defe7902fbe3c20aeb9fdaa5b5f32840691f6c66 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/wav2letter.py @@ -0,0 +1,72 @@ +from torch import nn, Tensor + +__all__ = [ + "Wav2Letter", +] + + +class Wav2Letter(nn.Module): + r"""Wav2Letter model architecture from *Wav2Letter: an End-to-End ConvNet-based Speech + Recognition System* :cite:`collobert2016wav2letter`. + + See Also: + * `Training example `__ + + Args: + num_classes (int, optional): Number of classes to be classified. (Default: ``40``) + input_type (str, optional): Wav2Letter can use as input: ``waveform``, ``power_spectrum`` + or ``mfcc`` (Default: ``waveform``). + num_features (int, optional): Number of input features that the network will receive (Default: ``1``). + """ + + def __init__(self, num_classes: int = 40, input_type: str = "waveform", num_features: int = 1) -> None: + super().__init__() + + acoustic_num_features = 250 if input_type == "waveform" else num_features + acoustic_model = nn.Sequential( + nn.Conv1d(in_channels=acoustic_num_features, out_channels=250, kernel_size=48, stride=2, padding=23), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=250, kernel_size=7, stride=1, padding=3), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=250, out_channels=2000, kernel_size=32, stride=1, padding=16), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=2000, out_channels=2000, kernel_size=1, stride=1, padding=0), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=2000, out_channels=num_classes, kernel_size=1, stride=1, padding=0), + nn.ReLU(inplace=True), + ) + + if input_type == "waveform": + waveform_model = nn.Sequential( + nn.Conv1d(in_channels=num_features, out_channels=250, kernel_size=250, stride=160, padding=45), + nn.ReLU(inplace=True), + ) + self.acoustic_model = nn.Sequential(waveform_model, acoustic_model) + + if input_type in ["power_spectrum", "mfcc"]: + self.acoustic_model = acoustic_model + + def forward(self, x: Tensor) -> Tensor: + r""" + Args: + x (torch.Tensor): Tensor of dimension (batch_size, num_features, input_length). + + Returns: + Tensor: Predictor tensor of dimension (batch_size, number_of_classes, input_length). + """ + + x = self.acoustic_model(x) + x = nn.functional.log_softmax(x, dim=1) + return x diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/wavernn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/wavernn.py new file mode 100644 index 0000000000000000000000000000000000000000..90bc2fca7240235e2a8e67ba454ba29a4a9e667b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/models/wavernn.py @@ -0,0 +1,409 @@ +import math +from typing import List, Optional, Tuple + +import torch +import torch.nn.functional as F +from torch import nn, Tensor + +__all__ = [ + "ResBlock", + "MelResNet", + "Stretch2d", + "UpsampleNetwork", + "WaveRNN", +] + + +class ResBlock(nn.Module): + r"""ResNet block based on *Efficient Neural Audio Synthesis* :cite:`kalchbrenner2018efficient`. + + Args: + n_freq: the number of bins in a spectrogram. (Default: ``128``) + + Examples + >>> resblock = ResBlock() + >>> input = torch.rand(10, 128, 512) # a random spectrogram + >>> output = resblock(input) # shape: (10, 128, 512) + """ + + def __init__(self, n_freq: int = 128) -> None: + super().__init__() + + self.resblock_model = nn.Sequential( + nn.Conv1d(in_channels=n_freq, out_channels=n_freq, kernel_size=1, bias=False), + nn.BatchNorm1d(n_freq), + nn.ReLU(inplace=True), + nn.Conv1d(in_channels=n_freq, out_channels=n_freq, kernel_size=1, bias=False), + nn.BatchNorm1d(n_freq), + ) + + def forward(self, specgram: Tensor) -> Tensor: + r"""Pass the input through the ResBlock layer. + Args: + specgram (Tensor): the input sequence to the ResBlock layer (n_batch, n_freq, n_time). + + Return: + Tensor shape: (n_batch, n_freq, n_time) + """ + + return self.resblock_model(specgram) + specgram + + +class MelResNet(nn.Module): + r"""MelResNet layer uses a stack of ResBlocks on spectrogram. + + Args: + n_res_block: the number of ResBlock in stack. (Default: ``10``) + n_freq: the number of bins in a spectrogram. (Default: ``128``) + n_hidden: the number of hidden dimensions of resblock. (Default: ``128``) + n_output: the number of output dimensions of melresnet. (Default: ``128``) + kernel_size: the number of kernel size in the first Conv1d layer. (Default: ``5``) + + Examples + >>> melresnet = MelResNet() + >>> input = torch.rand(10, 128, 512) # a random spectrogram + >>> output = melresnet(input) # shape: (10, 128, 508) + """ + + def __init__( + self, n_res_block: int = 10, n_freq: int = 128, n_hidden: int = 128, n_output: int = 128, kernel_size: int = 5 + ) -> None: + super().__init__() + + ResBlocks = [ResBlock(n_hidden) for _ in range(n_res_block)] + + self.melresnet_model = nn.Sequential( + nn.Conv1d(in_channels=n_freq, out_channels=n_hidden, kernel_size=kernel_size, bias=False), + nn.BatchNorm1d(n_hidden), + nn.ReLU(inplace=True), + *ResBlocks, + nn.Conv1d(in_channels=n_hidden, out_channels=n_output, kernel_size=1), + ) + + def forward(self, specgram: Tensor) -> Tensor: + r"""Pass the input through the MelResNet layer. + Args: + specgram (Tensor): the input sequence to the MelResNet layer (n_batch, n_freq, n_time). + + Return: + Tensor shape: (n_batch, n_output, n_time - kernel_size + 1) + """ + + return self.melresnet_model(specgram) + + +class Stretch2d(nn.Module): + r"""Upscale the frequency and time dimensions of a spectrogram. + + Args: + time_scale: the scale factor in time dimension + freq_scale: the scale factor in frequency dimension + + Examples + >>> stretch2d = Stretch2d(time_scale=10, freq_scale=5) + + >>> input = torch.rand(10, 100, 512) # a random spectrogram + >>> output = stretch2d(input) # shape: (10, 500, 5120) + """ + + def __init__(self, time_scale: int, freq_scale: int) -> None: + super().__init__() + + self.freq_scale = freq_scale + self.time_scale = time_scale + + def forward(self, specgram: Tensor) -> Tensor: + r"""Pass the input through the Stretch2d layer. + + Args: + specgram (Tensor): the input sequence to the Stretch2d layer (..., n_freq, n_time). + + Return: + Tensor shape: (..., n_freq * freq_scale, n_time * time_scale) + """ + + return specgram.repeat_interleave(self.freq_scale, -2).repeat_interleave(self.time_scale, -1) + + +class UpsampleNetwork(nn.Module): + r"""Upscale the dimensions of a spectrogram. + + Args: + upsample_scales: the list of upsample scales. + n_res_block: the number of ResBlock in stack. (Default: ``10``) + n_freq: the number of bins in a spectrogram. (Default: ``128``) + n_hidden: the number of hidden dimensions of resblock. (Default: ``128``) + n_output: the number of output dimensions of melresnet. (Default: ``128``) + kernel_size: the number of kernel size in the first Conv1d layer. (Default: ``5``) + + Examples + >>> upsamplenetwork = UpsampleNetwork(upsample_scales=[4, 4, 16]) + >>> input = torch.rand(10, 128, 10) # a random spectrogram + >>> output = upsamplenetwork(input) # shape: (10, 128, 1536), (10, 128, 1536) + """ + + def __init__( + self, + upsample_scales: List[int], + n_res_block: int = 10, + n_freq: int = 128, + n_hidden: int = 128, + n_output: int = 128, + kernel_size: int = 5, + ) -> None: + super().__init__() + + total_scale = 1 + for upsample_scale in upsample_scales: + total_scale *= upsample_scale + self.total_scale: int = total_scale + + self.indent = (kernel_size - 1) // 2 * total_scale + self.resnet = MelResNet(n_res_block, n_freq, n_hidden, n_output, kernel_size) + self.resnet_stretch = Stretch2d(total_scale, 1) + + up_layers = [] + for scale in upsample_scales: + stretch = Stretch2d(scale, 1) + conv = nn.Conv2d( + in_channels=1, out_channels=1, kernel_size=(1, scale * 2 + 1), padding=(0, scale), bias=False + ) + torch.nn.init.constant_(conv.weight, 1.0 / (scale * 2 + 1)) + up_layers.append(stretch) + up_layers.append(conv) + self.upsample_layers = nn.Sequential(*up_layers) + + def forward(self, specgram: Tensor) -> Tuple[Tensor, Tensor]: + r"""Pass the input through the UpsampleNetwork layer. + + Args: + specgram (Tensor): the input sequence to the UpsampleNetwork layer (n_batch, n_freq, n_time) + + Return: + Tensor shape: (n_batch, n_freq, (n_time - kernel_size + 1) * total_scale), + (n_batch, n_output, (n_time - kernel_size + 1) * total_scale) + where total_scale is the product of all elements in upsample_scales. + """ + + resnet_output = self.resnet(specgram).unsqueeze(1) + resnet_output = self.resnet_stretch(resnet_output) + resnet_output = resnet_output.squeeze(1) + + specgram = specgram.unsqueeze(1) + upsampling_output = self.upsample_layers(specgram) + upsampling_output = upsampling_output.squeeze(1)[:, :, self.indent : -self.indent] + + return upsampling_output, resnet_output + + +class WaveRNN(nn.Module): + r"""WaveRNN model from *Efficient Neural Audio Synthesis* :cite:`wavernn` + based on the implementation from `fatchord/WaveRNN `_. + + The original implementation was introduced in *Efficient Neural Audio Synthesis* + :cite:`kalchbrenner2018efficient`. The input channels of waveform and spectrogram have to be 1. + The product of `upsample_scales` must equal `hop_length`. + + See Also: + * `Training example `__ + * :class:`torchaudio.pipelines.Tacotron2TTSBundle`: TTS pipeline with pretrained model. + + Args: + upsample_scales: the list of upsample scales. + n_classes: the number of output classes. + hop_length: the number of samples between the starts of consecutive frames. + n_res_block: the number of ResBlock in stack. (Default: ``10``) + n_rnn: the dimension of RNN layer. (Default: ``512``) + n_fc: the dimension of fully connected layer. (Default: ``512``) + kernel_size: the number of kernel size in the first Conv1d layer. (Default: ``5``) + n_freq: the number of bins in a spectrogram. (Default: ``128``) + n_hidden: the number of hidden dimensions of resblock. (Default: ``128``) + n_output: the number of output dimensions of melresnet. (Default: ``128``) + + Example + >>> wavernn = WaveRNN(upsample_scales=[5,5,8], n_classes=512, hop_length=200) + >>> waveform, sample_rate = torchaudio.load(file) + >>> # waveform shape: (n_batch, n_channel, (n_time - kernel_size + 1) * hop_length) + >>> specgram = MelSpectrogram(sample_rate)(waveform) # shape: (n_batch, n_channel, n_freq, n_time) + >>> output = wavernn(waveform, specgram) + >>> # output shape: (n_batch, n_channel, (n_time - kernel_size + 1) * hop_length, n_classes) + """ + + def __init__( + self, + upsample_scales: List[int], + n_classes: int, + hop_length: int, + n_res_block: int = 10, + n_rnn: int = 512, + n_fc: int = 512, + kernel_size: int = 5, + n_freq: int = 128, + n_hidden: int = 128, + n_output: int = 128, + ) -> None: + super().__init__() + + self.kernel_size = kernel_size + self._pad = (kernel_size - 1 if kernel_size % 2 else kernel_size) // 2 + self.n_rnn = n_rnn + self.n_aux = n_output // 4 + self.hop_length = hop_length + self.n_classes = n_classes + self.n_bits: int = int(math.log2(self.n_classes)) + + total_scale = 1 + for upsample_scale in upsample_scales: + total_scale *= upsample_scale + if total_scale != self.hop_length: + raise ValueError(f"Expected: total_scale == hop_length, but found {total_scale} != {hop_length}") + + self.upsample = UpsampleNetwork(upsample_scales, n_res_block, n_freq, n_hidden, n_output, kernel_size) + self.fc = nn.Linear(n_freq + self.n_aux + 1, n_rnn) + + self.rnn1 = nn.GRU(n_rnn, n_rnn, batch_first=True) + self.rnn2 = nn.GRU(n_rnn + self.n_aux, n_rnn, batch_first=True) + + self.relu1 = nn.ReLU(inplace=True) + self.relu2 = nn.ReLU(inplace=True) + + self.fc1 = nn.Linear(n_rnn + self.n_aux, n_fc) + self.fc2 = nn.Linear(n_fc + self.n_aux, n_fc) + self.fc3 = nn.Linear(n_fc, self.n_classes) + + def forward(self, waveform: Tensor, specgram: Tensor) -> Tensor: + r"""Pass the input through the WaveRNN model. + + Args: + waveform: the input waveform to the WaveRNN layer (n_batch, 1, (n_time - kernel_size + 1) * hop_length) + specgram: the input spectrogram to the WaveRNN layer (n_batch, 1, n_freq, n_time) + + Return: + Tensor: shape (n_batch, 1, (n_time - kernel_size + 1) * hop_length, n_classes) + """ + + if waveform.size(1) != 1: + raise ValueError("Require the input channel of waveform is 1") + if specgram.size(1) != 1: + raise ValueError("Require the input channel of specgram is 1") + # remove channel dimension until the end + waveform, specgram = waveform.squeeze(1), specgram.squeeze(1) + + batch_size = waveform.size(0) + h1 = torch.zeros(1, batch_size, self.n_rnn, dtype=waveform.dtype, device=waveform.device) + h2 = torch.zeros(1, batch_size, self.n_rnn, dtype=waveform.dtype, device=waveform.device) + # output of upsample: + # specgram: (n_batch, n_freq, (n_time - kernel_size + 1) * total_scale) + # aux: (n_batch, n_output, (n_time - kernel_size + 1) * total_scale) + specgram, aux = self.upsample(specgram) + specgram = specgram.transpose(1, 2) + aux = aux.transpose(1, 2) + + aux_idx = [self.n_aux * i for i in range(5)] + a1 = aux[:, :, aux_idx[0] : aux_idx[1]] + a2 = aux[:, :, aux_idx[1] : aux_idx[2]] + a3 = aux[:, :, aux_idx[2] : aux_idx[3]] + a4 = aux[:, :, aux_idx[3] : aux_idx[4]] + + x = torch.cat([waveform.unsqueeze(-1), specgram, a1], dim=-1) + x = self.fc(x) + res = x + x, _ = self.rnn1(x, h1) + + x = x + res + res = x + x = torch.cat([x, a2], dim=-1) + x, _ = self.rnn2(x, h2) + + x = x + res + x = torch.cat([x, a3], dim=-1) + x = self.fc1(x) + x = self.relu1(x) + + x = torch.cat([x, a4], dim=-1) + x = self.fc2(x) + x = self.relu2(x) + x = self.fc3(x) + + # bring back channel dimension + return x.unsqueeze(1) + + @torch.jit.export + def infer(self, specgram: Tensor, lengths: Optional[Tensor] = None) -> Tuple[Tensor, Optional[Tensor]]: + r"""Inference method of WaveRNN. + + This function currently only supports multinomial sampling, which assumes the + network is trained on cross entropy loss. + + Args: + specgram (Tensor): + Batch of spectrograms. Shape: `(n_batch, n_freq, n_time)`. + lengths (Tensor or None, optional): + Indicates the valid length of each audio in the batch. + Shape: `(batch, )`. + When the ``specgram`` contains spectrograms with different durations, + by providing ``lengths`` argument, the model will compute + the corresponding valid output lengths. + If ``None``, it is assumed that all the audio in ``waveforms`` + have valid length. Default: ``None``. + + Returns: + (Tensor, Optional[Tensor]): + Tensor + The inferred waveform of size `(n_batch, 1, n_time)`. + 1 stands for a single channel. + Tensor or None + If ``lengths`` argument was provided, a Tensor of shape `(batch, )` + is returned. + It indicates the valid length in time axis of the output Tensor. + """ + + device = specgram.device + dtype = specgram.dtype + + specgram = torch.nn.functional.pad(specgram, (self._pad, self._pad)) + specgram, aux = self.upsample(specgram) + if lengths is not None: + lengths = lengths * self.upsample.total_scale + + output: List[Tensor] = [] + b_size, _, seq_len = specgram.size() + + h1 = torch.zeros((1, b_size, self.n_rnn), device=device, dtype=dtype) + h2 = torch.zeros((1, b_size, self.n_rnn), device=device, dtype=dtype) + x = torch.zeros((b_size, 1), device=device, dtype=dtype) + + aux_split = [aux[:, self.n_aux * i : self.n_aux * (i + 1), :] for i in range(4)] + + for i in range(seq_len): + + m_t = specgram[:, :, i] + + a1_t, a2_t, a3_t, a4_t = [a[:, :, i] for a in aux_split] + + x = torch.cat([x, m_t, a1_t], dim=1) + x = self.fc(x) + _, h1 = self.rnn1(x.unsqueeze(1), h1) + + x = x + h1[0] + inp = torch.cat([x, a2_t], dim=1) + _, h2 = self.rnn2(inp.unsqueeze(1), h2) + + x = x + h2[0] + x = torch.cat([x, a3_t], dim=1) + x = F.relu(self.fc1(x)) + + x = torch.cat([x, a4_t], dim=1) + x = F.relu(self.fc2(x)) + + logits = self.fc3(x) + + posterior = F.softmax(logits, dim=1) + + x = torch.multinomial(posterior, 1).float() + # Transform label [0, 2 ** n_bits - 1] to waveform [-1, 1] + x = 2 * x / (2**self.n_bits - 1.0) - 1.0 + + output.append(x) + + return torch.stack(output).permute(1, 2, 0), lengths diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cad3f14dfb5b27839d0954959428732acedb8a2a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/__init__.py @@ -0,0 +1,102 @@ +from ._source_separation_pipeline import ( + CONVTASNET_BASE_LIBRI2MIX, + HDEMUCS_HIGH_MUSDB, + HDEMUCS_HIGH_MUSDB_PLUS, + SourceSeparationBundle, +) +from ._squim_pipeline import SQUIM_OBJECTIVE, SQUIM_SUBJECTIVE, SquimObjectiveBundle, SquimSubjectiveBundle +from ._tts import ( + TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH, + TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH, + TACOTRON2_WAVERNN_CHAR_LJSPEECH, + TACOTRON2_WAVERNN_PHONE_LJSPEECH, + Tacotron2TTSBundle, +) +from ._wav2vec2.impl import ( + HUBERT_ASR_LARGE, + HUBERT_ASR_XLARGE, + HUBERT_BASE, + HUBERT_LARGE, + HUBERT_XLARGE, + MMS_FA, + VOXPOPULI_ASR_BASE_10K_DE, + VOXPOPULI_ASR_BASE_10K_EN, + VOXPOPULI_ASR_BASE_10K_ES, + VOXPOPULI_ASR_BASE_10K_FR, + VOXPOPULI_ASR_BASE_10K_IT, + WAV2VEC2_ASR_BASE_100H, + WAV2VEC2_ASR_BASE_10M, + WAV2VEC2_ASR_BASE_960H, + WAV2VEC2_ASR_LARGE_100H, + WAV2VEC2_ASR_LARGE_10M, + WAV2VEC2_ASR_LARGE_960H, + WAV2VEC2_ASR_LARGE_LV60K_100H, + WAV2VEC2_ASR_LARGE_LV60K_10M, + WAV2VEC2_ASR_LARGE_LV60K_960H, + WAV2VEC2_BASE, + WAV2VEC2_LARGE, + WAV2VEC2_LARGE_LV60K, + WAV2VEC2_XLSR53, + WAV2VEC2_XLSR_1B, + WAV2VEC2_XLSR_2B, + WAV2VEC2_XLSR_300M, + Wav2Vec2ASRBundle, + Wav2Vec2Bundle, + Wav2Vec2FABundle, + WAVLM_BASE, + WAVLM_BASE_PLUS, + WAVLM_LARGE, +) +from .rnnt_pipeline import EMFORMER_RNNT_BASE_LIBRISPEECH, RNNTBundle + + +__all__ = [ + "Wav2Vec2Bundle", + "Wav2Vec2ASRBundle", + "Wav2Vec2FABundle", + "WAV2VEC2_BASE", + "WAV2VEC2_LARGE", + "WAV2VEC2_LARGE_LV60K", + "WAV2VEC2_ASR_BASE_10M", + "WAV2VEC2_ASR_BASE_100H", + "WAV2VEC2_ASR_BASE_960H", + "WAV2VEC2_ASR_LARGE_10M", + "WAV2VEC2_ASR_LARGE_100H", + "WAV2VEC2_ASR_LARGE_960H", + "WAV2VEC2_ASR_LARGE_LV60K_10M", + "WAV2VEC2_ASR_LARGE_LV60K_100H", + "WAV2VEC2_ASR_LARGE_LV60K_960H", + "WAV2VEC2_XLSR53", + "WAV2VEC2_XLSR_300M", + "WAV2VEC2_XLSR_1B", + "WAV2VEC2_XLSR_2B", + "VOXPOPULI_ASR_BASE_10K_EN", + "VOXPOPULI_ASR_BASE_10K_ES", + "VOXPOPULI_ASR_BASE_10K_DE", + "VOXPOPULI_ASR_BASE_10K_FR", + "VOXPOPULI_ASR_BASE_10K_IT", + "HUBERT_BASE", + "HUBERT_LARGE", + "HUBERT_XLARGE", + "HUBERT_ASR_LARGE", + "HUBERT_ASR_XLARGE", + "MMS_FA", + "WAVLM_BASE", + "WAVLM_BASE_PLUS", + "WAVLM_LARGE", + "Tacotron2TTSBundle", + "TACOTRON2_GRIFFINLIM_CHAR_LJSPEECH", + "TACOTRON2_GRIFFINLIM_PHONE_LJSPEECH", + "TACOTRON2_WAVERNN_CHAR_LJSPEECH", + "TACOTRON2_WAVERNN_PHONE_LJSPEECH", + "RNNTBundle", + "EMFORMER_RNNT_BASE_LIBRISPEECH", + "SourceSeparationBundle", + "CONVTASNET_BASE_LIBRI2MIX", + "HDEMUCS_HIGH_MUSDB_PLUS", + "HDEMUCS_HIGH_MUSDB", + "SQUIM_OBJECTIVE", + "SQUIM_SUBJECTIVE", + "SquimObjectiveBundle", + "SquimSubjectiveBundle", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/_source_separation_pipeline.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/_source_separation_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..eebf190bd2233bd65143ba4b8b0da0ba5f1c6eba --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/_source_separation_pipeline.py @@ -0,0 +1,109 @@ +from dataclasses import dataclass +from functools import partial +from typing import Callable + +import torch +import torchaudio + +from torchaudio.models import conv_tasnet_base, hdemucs_high + + +@dataclass +class SourceSeparationBundle: + """Dataclass that bundles components for performing source separation. + + Example + >>> import torchaudio + >>> from torchaudio.pipelines import CONVTASNET_BASE_LIBRI2MIX + >>> import torch + >>> + >>> # Build the separation model. + >>> model = CONVTASNET_BASE_LIBRI2MIX.get_model() + >>> 100%|███████████████████████████████|19.1M/19.1M [00:04<00:00, 4.93MB/s] + >>> + >>> # Instantiate the test set of Libri2Mix dataset. + >>> dataset = torchaudio.datasets.LibriMix("/home/datasets/", subset="test") + >>> + >>> # Apply source separation on mixture audio. + >>> for i, data in enumerate(dataset): + >>> sample_rate, mixture, clean_sources = data + >>> # Make sure the shape of input suits the model requirement. + >>> mixture = mixture.reshape(1, 1, -1) + >>> estimated_sources = model(mixture) + >>> score = si_snr_pit(estimated_sources, clean_sources) # for demonstration + >>> print(f"Si-SNR score is : {score}.) + >>> break + >>> Si-SNR score is : 16.24. + >>> + """ + + _model_path: str + _model_factory_func: Callable[[], torch.nn.Module] + _sample_rate: int + + @property + def sample_rate(self) -> int: + """Sample rate of the audio that the model is trained on. + + :type: int + """ + return self._sample_rate + + def get_model(self) -> torch.nn.Module: + """Construct the model and load the pretrained weight.""" + model = self._model_factory_func() + path = torchaudio.utils.download_asset(self._model_path) + state_dict = torch.load(path) + model.load_state_dict(state_dict) + model.eval() + return model + + +CONVTASNET_BASE_LIBRI2MIX = SourceSeparationBundle( + _model_path="models/conv_tasnet_base_libri2mix.pt", + _model_factory_func=partial(conv_tasnet_base, num_sources=2), + _sample_rate=8000, +) +CONVTASNET_BASE_LIBRI2MIX.__doc__ = """Pre-trained Source Separation pipeline with *ConvTasNet* +:cite:`Luo_2019` trained on *Libri2Mix dataset* :cite:`cosentino2020librimix`. + +The source separation model is constructed by :func:`~torchaudio.models.conv_tasnet_base` +and is trained using the training script ``lightning_train.py`` +`here `__ +with default arguments. + +Please refer to :class:`SourceSeparationBundle` for usage instructions. +""" + + +HDEMUCS_HIGH_MUSDB_PLUS = SourceSeparationBundle( + _model_path="models/hdemucs_high_trained.pt", + _model_factory_func=partial(hdemucs_high, sources=["drums", "bass", "other", "vocals"]), + _sample_rate=44100, +) +HDEMUCS_HIGH_MUSDB_PLUS.__doc__ = """Pre-trained music source separation pipeline with +*Hybrid Demucs* :cite:`defossez2021hybrid` trained on both training and test sets of +MUSDB-HQ :cite:`MUSDB18HQ` and an additional 150 extra songs from an internal database +that was specifically produced for Meta. + +The model is constructed by :func:`~torchaudio.models.hdemucs_high`. + +Training was performed in the original HDemucs repository `here `__. + +Please refer to :class:`SourceSeparationBundle` for usage instructions. +""" + + +HDEMUCS_HIGH_MUSDB = SourceSeparationBundle( + _model_path="models/hdemucs_high_musdbhq_only.pt", + _model_factory_func=partial(hdemucs_high, sources=["drums", "bass", "other", "vocals"]), + _sample_rate=44100, +) +HDEMUCS_HIGH_MUSDB.__doc__ = """Pre-trained music source separation pipeline with +*Hybrid Demucs* :cite:`defossez2021hybrid` trained on the training set of MUSDB-HQ :cite:`MUSDB18HQ`. + +The model is constructed by :func:`~torchaudio.models.hdemucs_high`. +Training was performed in the original HDemucs repository `here `__. + +Please refer to :class:`SourceSeparationBundle` for usage instructions. +""" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/_squim_pipeline.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/_squim_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..64b74449b0658ae5db47d1f7351ef448a1755d63 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/_squim_pipeline.py @@ -0,0 +1,156 @@ +from dataclasses import dataclass + +import torch +import torchaudio + +from torchaudio.models import squim_objective_base, squim_subjective_base, SquimObjective, SquimSubjective + + +@dataclass +class SquimObjectiveBundle: + """Data class that bundles associated information to use pretrained + :py:class:`~torchaudio.models.SquimObjective` model. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + This bundle can estimate objective metric scores for speech enhancement, such as STOI, PESQ, Si-SDR. + A typical use case would be a flow like `waveform -> list of scores`. Please see below for the code example. + + Example: Estimate the objective metric scores for the input waveform. + >>> import torch + >>> import torchaudio + >>> from torchaudio.pipelines import SQUIM_OBJECTIVE as bundle + >>> + >>> # Load the SquimObjective bundle + >>> model = bundle.get_model() + Downloading: "https://download.pytorch.org/torchaudio/models/squim_objective_dns2020.pth" + 100%|████████████| 28.2M/28.2M [00:03<00:00, 9.24MB/s] + >>> + >>> # Resample audio to the expected sampling rate + >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate) + >>> + >>> # Estimate objective metric scores + >>> scores = model(waveform) + >>> print(f"STOI: {scores[0].item()}, PESQ: {scores[1].item()}, SI-SDR: {scores[2].item()}.") + """ # noqa: E501 + + _path: str + _sample_rate: float + + def get_model(self) -> SquimObjective: + """Construct the SquimObjective model, and load the pretrained weight. + + Returns: + Variation of :py:class:`~torchaudio.models.SquimObjective`. + """ + model = squim_objective_base() + path = torchaudio.utils.download_asset(f"models/{self._path}") + state_dict = torch.load(path, weights_only=True) + model.load_state_dict(state_dict) + model.eval() + return model + + @property + def sample_rate(self): + """Sample rate of the audio that the model is trained on. + + :type: float + """ + return self._sample_rate + + +SQUIM_OBJECTIVE = SquimObjectiveBundle( + "squim_objective_dns2020.pth", + _sample_rate=16000, +) +SQUIM_OBJECTIVE.__doc__ = """SquimObjective pipeline trained using approach described in + :cite:`kumar2023torchaudio` on the *DNS 2020 Dataset* :cite:`reddy2020interspeech`. + + The underlying model is constructed by :py:func:`torchaudio.models.squim_objective_base`. + The weights are under `Creative Commons Attribution 4.0 International License + `__. + + Please refer to :py:class:`SquimObjectiveBundle` for usage instructions. + """ + + +@dataclass +class SquimSubjectiveBundle: + """Data class that bundles associated information to use pretrained + :py:class:`~torchaudio.models.SquimSubjective` model. + + This class provides interfaces for instantiating the pretrained model along with + the information necessary to retrieve pretrained weights and additional data + to be used with the model. + + Torchaudio library instantiates objects of this class, each of which represents + a different pretrained model. Client code should access pretrained models via these + instances. + + This bundle can estimate subjective metric scores for speech enhancement, such as MOS. + A typical use case would be a flow like `waveform -> score`. Please see below for the code example. + + Example: Estimate the subjective metric scores for the input waveform. + >>> import torch + >>> import torchaudio + >>> from torchaudio.pipelines import SQUIM_SUBJECTIVE as bundle + >>> + >>> # Load the SquimSubjective bundle + >>> model = bundle.get_model() + Downloading: "https://download.pytorch.org/torchaudio/models/squim_subjective_bvcc_daps.pth" + 100%|████████████| 360M/360M [00:09<00:00, 41.1MB/s] + >>> + >>> # Resample audio to the expected sampling rate + >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate) + >>> # Use a clean reference (doesn't need to be the reference for the waveform) as the second input + >>> reference = torchaudio.functional.resample(reference, sample_rate, bundle.sample_rate) + >>> + >>> # Estimate subjective metric scores + >>> score = model(waveform, reference) + >>> print(f"MOS: {score}.") + """ # noqa: E501 + + _path: str + _sample_rate: float + + def get_model(self) -> SquimSubjective: + """Construct the SquimSubjective model, and load the pretrained weight. + Returns: + Variation of :py:class:`~torchaudio.models.SquimObjective`. + """ + model = squim_subjective_base() + path = torchaudio.utils.download_asset(f"models/{self._path}") + state_dict = torch.load(path, weights_only=True) + model.load_state_dict(state_dict) + model.eval() + return model + + @property + def sample_rate(self): + """Sample rate of the audio that the model is trained on. + + :type: float + """ + return self._sample_rate + + +SQUIM_SUBJECTIVE = SquimSubjectiveBundle( + "squim_subjective_bvcc_daps.pth", + _sample_rate=16000, +) +SQUIM_SUBJECTIVE.__doc__ = """SquimSubjective pipeline trained + as described in :cite:`manocha2022speech` and :cite:`kumar2023torchaudio` + on the *BVCC* :cite:`cooper2021voices` and *DAPS* :cite:`mysore2014can` datasets. + + The underlying model is constructed by :py:func:`torchaudio.models.squim_subjective_base`. + The weights are under `Creative Commons Attribution Non Commercial 4.0 International + `__. + + Please refer to :py:class:`SquimSubjectiveBundle` for usage instructions. + """ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/rnnt_pipeline.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/rnnt_pipeline.py new file mode 100644 index 0000000000000000000000000000000000000000..4a6f50941113d181e9950b3a3c7eadb9c1359a01 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/pipelines/rnnt_pipeline.py @@ -0,0 +1,380 @@ +import json +import math +from abc import ABC, abstractmethod +from dataclasses import dataclass +from functools import partial +from typing import Callable, List, Tuple + +import torch +import torchaudio +from torchaudio._internal import module_utils +from torchaudio.models import emformer_rnnt_base, RNNT, RNNTBeamSearch + + +__all__ = [] + +_decibel = 2 * 20 * math.log10(torch.iinfo(torch.int16).max) +_gain = pow(10, 0.05 * _decibel) + + +def _piecewise_linear_log(x): + x[x > math.e] = torch.log(x[x > math.e]) + x[x <= math.e] = x[x <= math.e] / math.e + return x + + +class _FunctionalModule(torch.nn.Module): + def __init__(self, functional): + super().__init__() + self.functional = functional + + def forward(self, input): + return self.functional(input) + + +class _GlobalStatsNormalization(torch.nn.Module): + def __init__(self, global_stats_path): + super().__init__() + + with open(global_stats_path) as f: + blob = json.loads(f.read()) + + self.register_buffer("mean", torch.tensor(blob["mean"])) + self.register_buffer("invstddev", torch.tensor(blob["invstddev"])) + + def forward(self, input): + return (input - self.mean) * self.invstddev + + +class _FeatureExtractor(ABC): + @abstractmethod + def __call__(self, input: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + """Generates features and length output from the given input tensor. + + Args: + input (torch.Tensor): input tensor. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor: + Features, with shape `(length, *)`. + torch.Tensor: + Length, with shape `(1,)`. + """ + + +class _TokenProcessor(ABC): + @abstractmethod + def __call__(self, tokens: List[int], **kwargs) -> str: + """Decodes given list of tokens to text sequence. + + Args: + tokens (List[int]): list of tokens to decode. + + Returns: + str: + Decoded text sequence. + """ + + +class _ModuleFeatureExtractor(torch.nn.Module, _FeatureExtractor): + """``torch.nn.Module``-based feature extraction pipeline. + + Args: + pipeline (torch.nn.Module): module that implements feature extraction logic. + """ + + def __init__(self, pipeline: torch.nn.Module) -> None: + super().__init__() + self.pipeline = pipeline + + def forward(self, input: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: + """Generates features and length output from the given input tensor. + + Args: + input (torch.Tensor): input tensor. + + Returns: + (torch.Tensor, torch.Tensor): + torch.Tensor: + Features, with shape `(length, *)`. + torch.Tensor: + Length, with shape `(1,)`. + """ + features = self.pipeline(input) + length = torch.tensor([features.shape[0]]) + return features, length + + +class _SentencePieceTokenProcessor(_TokenProcessor): + """SentencePiece-model-based token processor. + + Args: + sp_model_path (str): path to SentencePiece model. + """ + + def __init__(self, sp_model_path: str) -> None: + if not module_utils.is_module_available("sentencepiece"): + raise RuntimeError("SentencePiece is not available. Please install it.") + + import sentencepiece as spm + + self.sp_model = spm.SentencePieceProcessor(model_file=sp_model_path) + self.post_process_remove_list = { + self.sp_model.unk_id(), + self.sp_model.eos_id(), + self.sp_model.pad_id(), + } + + def __call__(self, tokens: List[int], lstrip: bool = True) -> str: + """Decodes given list of tokens to text sequence. + + Args: + tokens (List[int]): list of tokens to decode. + lstrip (bool, optional): if ``True``, returns text sequence with leading whitespace + removed. (Default: ``True``). + + Returns: + str: + Decoded text sequence. + """ + filtered_hypo_tokens = [ + token_index for token_index in tokens[1:] if token_index not in self.post_process_remove_list + ] + output_string = "".join(self.sp_model.id_to_piece(filtered_hypo_tokens)).replace("\u2581", " ") + + if lstrip: + return output_string.lstrip() + else: + return output_string + + +@dataclass +class RNNTBundle: + """Dataclass that bundles components for performing automatic speech recognition (ASR, speech-to-text) + inference with an RNN-T model. + + More specifically, the class provides methods that produce the featurization pipeline, + decoder wrapping the specified RNN-T model, and output token post-processor that together + constitute a complete end-to-end ASR inference pipeline that produces a text sequence + given a raw waveform. + + It can support non-streaming (full-context) inference as well as streaming inference. + + Users should not directly instantiate objects of this class; rather, users should use the + instances (representing pre-trained models) that exist within the module, + e.g. :data:`torchaudio.pipelines.EMFORMER_RNNT_BASE_LIBRISPEECH`. + + Example + >>> import torchaudio + >>> from torchaudio.pipelines import EMFORMER_RNNT_BASE_LIBRISPEECH + >>> import torch + >>> + >>> # Non-streaming inference. + >>> # Build feature extractor, decoder with RNN-T model, and token processor. + >>> feature_extractor = EMFORMER_RNNT_BASE_LIBRISPEECH.get_feature_extractor() + 100%|███████████████████████████████| 3.81k/3.81k [00:00<00:00, 4.22MB/s] + >>> decoder = EMFORMER_RNNT_BASE_LIBRISPEECH.get_decoder() + Downloading: "https://download.pytorch.org/torchaudio/models/emformer_rnnt_base_librispeech.pt" + 100%|███████████████████████████████| 293M/293M [00:07<00:00, 42.1MB/s] + >>> token_processor = EMFORMER_RNNT_BASE_LIBRISPEECH.get_token_processor() + 100%|███████████████████████████████| 295k/295k [00:00<00:00, 25.4MB/s] + >>> + >>> # Instantiate LibriSpeech dataset; retrieve waveform for first sample. + >>> dataset = torchaudio.datasets.LIBRISPEECH("/home/librispeech", url="test-clean") + >>> waveform = next(iter(dataset))[0].squeeze() + >>> + >>> with torch.no_grad(): + >>> # Produce mel-scale spectrogram features. + >>> features, length = feature_extractor(waveform) + >>> + >>> # Generate top-10 hypotheses. + >>> hypotheses = decoder(features, length, 10) + >>> + >>> # For top hypothesis, convert predicted tokens to text. + >>> text = token_processor(hypotheses[0][0]) + >>> print(text) + he hoped there would be stew for dinner turnips and carrots and bruised potatoes and fat mutton pieces to [...] + >>> + >>> + >>> # Streaming inference. + >>> hop_length = EMFORMER_RNNT_BASE_LIBRISPEECH.hop_length + >>> num_samples_segment = EMFORMER_RNNT_BASE_LIBRISPEECH.segment_length * hop_length + >>> num_samples_segment_right_context = ( + >>> num_samples_segment + EMFORMER_RNNT_BASE_LIBRISPEECH.right_context_length * hop_length + >>> ) + >>> + >>> # Build streaming inference feature extractor. + >>> streaming_feature_extractor = EMFORMER_RNNT_BASE_LIBRISPEECH.get_streaming_feature_extractor() + >>> + >>> # Process same waveform as before, this time sequentially across overlapping segments + >>> # to simulate streaming inference. Note the usage of ``streaming_feature_extractor`` and ``decoder.infer``. + >>> state, hypothesis = None, None + >>> for idx in range(0, len(waveform), num_samples_segment): + >>> segment = waveform[idx: idx + num_samples_segment_right_context] + >>> segment = torch.nn.functional.pad(segment, (0, num_samples_segment_right_context - len(segment))) + >>> with torch.no_grad(): + >>> features, length = streaming_feature_extractor(segment) + >>> hypotheses, state = decoder.infer(features, length, 10, state=state, hypothesis=hypothesis) + >>> hypothesis = hypotheses[0] + >>> transcript = token_processor(hypothesis[0]) + >>> if transcript: + >>> print(transcript, end=" ", flush=True) + he hoped there would be stew for dinner turn ips and car rots and bru 'd oes and fat mut ton pieces to [...] + """ + + class FeatureExtractor(_FeatureExtractor): + """Interface of the feature extraction part of RNN-T pipeline""" + + class TokenProcessor(_TokenProcessor): + """Interface of the token processor part of RNN-T pipeline""" + + _rnnt_path: str + _rnnt_factory_func: Callable[[], RNNT] + _global_stats_path: str + _sp_model_path: str + _right_padding: int + _blank: int + _sample_rate: int + _n_fft: int + _n_mels: int + _hop_length: int + _segment_length: int + _right_context_length: int + + def _get_model(self) -> RNNT: + model = self._rnnt_factory_func() + path = torchaudio.utils.download_asset(self._rnnt_path) + state_dict = torch.load(path) + model.load_state_dict(state_dict) + model.eval() + return model + + @property + def sample_rate(self) -> int: + """Sample rate (in cycles per second) of input waveforms. + + :type: int + """ + return self._sample_rate + + @property + def n_fft(self) -> int: + """Size of FFT window to use. + + :type: int + """ + return self._n_fft + + @property + def n_mels(self) -> int: + """Number of mel spectrogram features to extract from input waveforms. + + :type: int + """ + return self._n_mels + + @property + def hop_length(self) -> int: + """Number of samples between successive frames in input expected by model. + + :type: int + """ + return self._hop_length + + @property + def segment_length(self) -> int: + """Number of frames in segment in input expected by model. + + :type: int + """ + return self._segment_length + + @property + def right_context_length(self) -> int: + """Number of frames in right contextual block in input expected by model. + + :type: int + """ + return self._right_context_length + + def get_decoder(self) -> RNNTBeamSearch: + """Constructs RNN-T decoder. + + Returns: + RNNTBeamSearch + """ + model = self._get_model() + return RNNTBeamSearch(model, self._blank) + + def get_feature_extractor(self) -> FeatureExtractor: + """Constructs feature extractor for non-streaming (full-context) ASR. + + Returns: + FeatureExtractor + """ + local_path = torchaudio.utils.download_asset(self._global_stats_path) + return _ModuleFeatureExtractor( + torch.nn.Sequential( + torchaudio.transforms.MelSpectrogram( + sample_rate=self.sample_rate, n_fft=self.n_fft, n_mels=self.n_mels, hop_length=self.hop_length + ), + _FunctionalModule(lambda x: x.transpose(1, 0)), + _FunctionalModule(lambda x: _piecewise_linear_log(x * _gain)), + _GlobalStatsNormalization(local_path), + _FunctionalModule(lambda x: torch.nn.functional.pad(x, (0, 0, 0, self._right_padding))), + ) + ) + + def get_streaming_feature_extractor(self) -> FeatureExtractor: + """Constructs feature extractor for streaming (simultaneous) ASR. + + Returns: + FeatureExtractor + """ + local_path = torchaudio.utils.download_asset(self._global_stats_path) + return _ModuleFeatureExtractor( + torch.nn.Sequential( + torchaudio.transforms.MelSpectrogram( + sample_rate=self.sample_rate, n_fft=self.n_fft, n_mels=self.n_mels, hop_length=self.hop_length + ), + _FunctionalModule(lambda x: x.transpose(1, 0)), + _FunctionalModule(lambda x: _piecewise_linear_log(x * _gain)), + _GlobalStatsNormalization(local_path), + ) + ) + + def get_token_processor(self) -> TokenProcessor: + """Constructs token processor. + + Returns: + TokenProcessor + """ + local_path = torchaudio.utils.download_asset(self._sp_model_path) + return _SentencePieceTokenProcessor(local_path) + + +EMFORMER_RNNT_BASE_LIBRISPEECH = RNNTBundle( + _rnnt_path="models/emformer_rnnt_base_librispeech.pt", + _rnnt_factory_func=partial(emformer_rnnt_base, num_symbols=4097), + _global_stats_path="pipeline-assets/global_stats_rnnt_librispeech.json", + _sp_model_path="pipeline-assets/spm_bpe_4096_librispeech.model", + _right_padding=4, + _blank=4096, + _sample_rate=16000, + _n_fft=400, + _n_mels=80, + _hop_length=160, + _segment_length=16, + _right_context_length=4, +) +EMFORMER_RNNT_BASE_LIBRISPEECH.__doc__ = """ASR pipeline based on Emformer-RNNT, +pretrained on *LibriSpeech* dataset :cite:`7178964`, +capable of performing both streaming and non-streaming inference. + +The underlying model is constructed by :py:func:`torchaudio.models.emformer_rnnt_base` +and utilizes weights trained on LibriSpeech using training script ``train.py`` +`here `__ with default arguments. + +Please refer to :py:class:`RNNTBundle` for usage instructions. +""" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/datasets/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/datasets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..66123a85ed4d8dd27e0eedaa8a0c8e5552da6348 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/datasets/__init__.py @@ -0,0 +1,4 @@ +from .musan import Musan + + +__all__ = ["Musan"] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/datasets/musan.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/datasets/musan.py new file mode 100644 index 0000000000000000000000000000000000000000..5e8fe3d6a1342378c70108cad7679d8fd64b7c7a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/datasets/musan.py @@ -0,0 +1,67 @@ +from pathlib import Path +from typing import Tuple, Union + +import torch +from torch.utils.data import Dataset +from torchaudio.datasets.utils import _load_waveform + + +_SUBSETS = ["music", "noise", "speech"] +_SAMPLE_RATE = 16_000 + + +class Musan(Dataset): + r"""*MUSAN* :cite:`musan2015` dataset. + + Args: + root (str or Path): Root directory where the dataset's top-level directory exists. + subset (str): Subset of the dataset to use. Options: [``"music"``, ``"noise"``, ``"speech"``]. + """ + + def __init__(self, root: Union[str, Path], subset: str): + if subset not in _SUBSETS: + raise ValueError(f"Invalid subset '{subset}' given. Please provide one of {_SUBSETS}") + + subset_path = Path(root) / subset + self._walker = [str(p) for p in subset_path.glob("*/*.*")] + + def get_metadata(self, n: int) -> Tuple[str, int, str]: + r"""Get metadata for the n-th sample in the dataset. Returns filepath instead of waveform, + but otherwise returns the same fields as :py:func:`__getitem__`. + + Args: + n (int): Index of sample to be loaded. + + Returns: + (str, int, str): + str + Path to audio. + int + Sample rate. + str + File name. + """ + audio_path = self._walker[n] + return audio_path, _SAMPLE_RATE, Path(audio_path).name + + def __getitem__(self, n: int) -> Tuple[torch.Tensor, int, str]: + r"""Return the n-th sample in the dataset. + + Args: + n (int): Index of sample to be loaded. + + Returns: + (torch.Tensor, int, str): + torch.Tensor + Waveform. + int + Sample rate. + str + File name. + """ + audio_path, sample_rate, filename = self.get_metadata(n) + path = Path(audio_path) + return _load_waveform(path.parent, path.name, sample_rate), sample_rate, filename + + def __len__(self) -> int: + return len(self._walker) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/functional/_dsp.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/functional/_dsp.py new file mode 100644 index 0000000000000000000000000000000000000000..c590374b3fe8ce58479ed0c0388a551ad8765004 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/functional/_dsp.py @@ -0,0 +1,433 @@ +import warnings +from typing import List, Optional, Union + +import torch + +from torchaudio.functional import fftconvolve + + +def oscillator_bank( + frequencies: torch.Tensor, + amplitudes: torch.Tensor, + sample_rate: float, + reduction: str = "sum", + dtype: Optional[torch.dtype] = torch.float64, +) -> torch.Tensor: + """Synthesize waveform from the given instantaneous frequencies and amplitudes. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Note: + The phase information of the output waveform is found by taking the cumulative sum + of the given instantaneous frequencies (``frequencies``). + This incurs roundoff error when the data type does not have enough precision. + Using ``torch.float64`` can work around this. + + The following figure shows the difference between ``torch.float32`` and + ``torch.float64`` when generating a sin wave of constant frequency and amplitude + with sample rate 8000 [Hz]. + Notice that ``torch.float32`` version shows artifacts that are not seen in + ``torch.float64`` version. + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/oscillator_precision.png + + Args: + frequencies (Tensor): Sample-wise oscillator frequencies (Hz). Shape `(..., time, N)`. + amplitudes (Tensor): Sample-wise oscillator amplitude. Shape: `(..., time, N)`. + sample_rate (float): Sample rate + reduction (str): Reduction to perform. + Valid values are ``"sum"``, ``"mean"`` or ``"none"``. Default: ``"sum"`` + dtype (torch.dtype or None, optional): The data type on which cumulative sum operation is performed. + Default: ``torch.float64``. Pass ``None`` to disable the casting. + + Returns: + Tensor: + The resulting waveform. + + If ``reduction`` is ``"none"``, then the shape is + `(..., time, N)`, otherwise the shape is `(..., time)`. + """ + if frequencies.shape != amplitudes.shape: + raise ValueError( + "The shapes of `frequencies` and `amplitudes` must match. " + f"Found: {frequencies.shape} and {amplitudes.shape} respectively." + ) + reductions = ["sum", "mean", "none"] + if reduction not in reductions: + raise ValueError(f"The value of reduction must be either {reductions}. Found: {reduction}") + + invalid = torch.abs(frequencies) >= sample_rate / 2 + if torch.any(invalid): + warnings.warn( + "Some frequencies are above nyquist frequency. " + "Setting the corresponding amplitude to zero. " + "This might cause numerically unstable gradient." + ) + amplitudes = torch.where(invalid, 0.0, amplitudes) + + pi2 = 2.0 * torch.pi + freqs = frequencies * pi2 / sample_rate % pi2 + phases = torch.cumsum(freqs, dim=-2, dtype=dtype) + if dtype is not None and freqs.dtype != dtype: + phases = phases.to(freqs.dtype) + + waveform = amplitudes * torch.sin(phases) + if reduction == "sum": + return waveform.sum(-1) + if reduction == "mean": + return waveform.mean(-1) + return waveform + + +def adsr_envelope( + num_frames: int, + *, + attack: float = 0.0, + hold: float = 0.0, + decay: float = 0.0, + sustain: float = 1.0, + release: float = 0.0, + n_decay: int = 2, + dtype: Optional[torch.dtype] = None, + device: Optional[torch.device] = None, +): + """Generate ADSR Envelope + + .. devices:: CPU CUDA + + Args: + num_frames (int): The number of output frames. + attack (float, optional): + The relative *time* it takes to reach the maximum level from + the start. (Default: ``0.0``) + hold (float, optional): + The relative *time* the maximum level is held before + it starts to decay. (Default: ``0.0``) + decay (float, optional): + The relative *time* it takes to sustain from + the maximum level. (Default: ``0.0``) + sustain (float, optional): The relative *level* at which + the sound should sustain. (Default: ``1.0``) + + .. Note:: + The duration of sustain is derived as `1.0 - (The sum of attack, hold, decay and release)`. + + release (float, optional): The relative *time* it takes for the sound level to + reach zero after the sustain. (Default: ``0.0``) + n_decay (int, optional): The degree of polynomial decay. Default: ``2``. + dtype (torch.dtype, optional): the desired data type of returned tensor. + Default: if ``None``, uses a global default + (see :py:func:`torch.set_default_tensor_type`). + device (torch.device, optional): the desired device of returned tensor. + Default: if ``None``, uses the current device for the default tensor type + (see :py:func:`torch.set_default_tensor_type`). + device will be the CPU for CPU tensor types and the current CUDA + device for CUDA tensor types. + + Returns: + Tensor: ADSR Envelope. Shape: `(num_frames, )` + + Example + .. image:: https://download.pytorch.org/torchaudio/doc-assets/adsr_examples.png + + """ + if not 0 <= attack <= 1: + raise ValueError(f"The value of `attack` must be within [0, 1]. Found: {attack}") + if not 0 <= decay <= 1: + raise ValueError(f"The value of `decay` must be within [0, 1]. Found: {decay}") + if not 0 <= sustain <= 1: + raise ValueError(f"The value of `sustain` must be within [0, 1]. Found: {sustain}") + if not 0 <= hold <= 1: + raise ValueError(f"The value of `hold` must be within [0, 1]. Found: {hold}") + if not 0 <= release <= 1: + raise ValueError(f"The value of `release` must be within [0, 1]. Found: {release}") + if attack + decay + release + hold > 1: + raise ValueError("The sum of `attack`, `hold`, `decay` and `release` must not exceed 1.") + + nframes = num_frames - 1 + num_a = int(nframes * attack) + num_h = int(nframes * hold) + num_d = int(nframes * decay) + num_r = int(nframes * release) + + # Initialize with sustain + out = torch.full((num_frames,), float(sustain), device=device, dtype=dtype) + + # attack + if num_a > 0: + torch.linspace(0.0, 1.0, num_a + 1, out=out[: num_a + 1]) + + # hold + if num_h > 0: + out[num_a : num_a + num_h + 1] = 1.0 + + # decay + if num_d > 0: + # Compute: sustain + (1.0 - sustain) * (linspace[1, 0] ** n_decay) + i = num_a + num_h + decay = out[i : i + num_d + 1] + torch.linspace(1.0, 0.0, num_d + 1, out=decay) + decay **= n_decay + decay *= 1.0 - sustain + decay += sustain + + # sustain is handled by initialization + + # release + if num_r > 0: + torch.linspace(sustain, 0, num_r + 1, out=out[-num_r - 1 :]) + + return out + + +def extend_pitch( + base: torch.Tensor, + pattern: Union[int, List[float], torch.Tensor], +): + """Extend the given time series values with multipliers of them. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given a series of fundamental frequencies (pitch), this function appends + its harmonic overtones or inharmonic partials. + + Args: + base (torch.Tensor): + Base time series, like fundamental frequencies (Hz). Shape: `(..., time, 1)`. + pattern (int, list of floats or torch.Tensor): + If ``int``, the number of pitch series after the operation. + `pattern - 1` tones are added, so that the resulting Tensor contains + up to `pattern`-th overtones of the given series. + + If list of float or ``torch.Tensor``, it must be one dimensional, + representing the custom multiplier of the fundamental frequency. + + Returns: + Tensor: Oscillator frequencies (Hz). Shape: `(..., time, num_tones)`. + + Example + >>> # fundamental frequency + >>> f0 = torch.linspace(1, 5, 5).unsqueeze(-1) + >>> f0 + tensor([[1.], + [2.], + [3.], + [4.], + [5.]]) + >>> # Add harmonic overtones, up to 3rd. + >>> f = extend_pitch(f0, 3) + >>> f.shape + torch.Size([5, 3]) + >>> f + tensor([[ 1., 2., 3.], + [ 2., 4., 6.], + [ 3., 6., 9.], + [ 4., 8., 12.], + [ 5., 10., 15.]]) + >>> # Add custom (inharmonic) partials. + >>> f = extend_pitch(f0, torch.tensor([1, 2.1, 3.3, 4.5])) + >>> f.shape + torch.Size([5, 4]) + >>> f + tensor([[ 1.0000, 2.1000, 3.3000, 4.5000], + [ 2.0000, 4.2000, 6.6000, 9.0000], + [ 3.0000, 6.3000, 9.9000, 13.5000], + [ 4.0000, 8.4000, 13.2000, 18.0000], + [ 5.0000, 10.5000, 16.5000, 22.5000]]) + """ + if isinstance(pattern, torch.Tensor): + mult = pattern + elif isinstance(pattern, int): + mult = torch.linspace(1.0, float(pattern), pattern, device=base.device, dtype=base.dtype) + else: + mult = torch.tensor(pattern, dtype=base.dtype, device=base.device) + h_freq = base @ mult.unsqueeze(0) + return h_freq + + +def sinc_impulse_response(cutoff: torch.Tensor, window_size: int = 513, high_pass: bool = False): + """Create windowed-sinc impulse response for given cutoff frequencies. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + cutoff (Tensor): Cutoff frequencies for low-pass sinc filter. + + window_size (int, optional): Size of the Hamming window to apply. Must be odd. + (Default: 513) + + high_pass (bool, optional): + If ``True``, convert the resulting filter to high-pass. + Otherwise low-pass filter is returned. Default: ``False``. + + Returns: + Tensor: A series of impulse responses. Shape: `(..., window_size)`. + """ + if window_size % 2 == 0: + raise ValueError(f"`window_size` must be odd. Given: {window_size}") + + half = window_size // 2 + device, dtype = cutoff.device, cutoff.dtype + idx = torch.linspace(-half, half, window_size, device=device, dtype=dtype) + + filt = torch.special.sinc(cutoff.unsqueeze(-1) * idx.unsqueeze(0)) + filt = filt * torch.hamming_window(window_size, device=device, dtype=dtype, periodic=False).unsqueeze(0) + filt = filt / filt.sum(dim=-1, keepdim=True).abs() + + # High pass IR is obtained by subtracting low_pass IR from delta function. + # https://courses.engr.illinois.edu/ece401/fa2020/slides/lec10.pdf + if high_pass: + filt = -filt + filt[..., half] = 1.0 + filt[..., half] + return filt + + +def frequency_impulse_response(magnitudes): + """Create filter from desired frequency response + + Args: + magnitudes: The desired frequency responses. Shape: `(..., num_fft_bins)` + + Returns: + Tensor: Impulse response. Shape `(..., 2 * (num_fft_bins - 1))` + """ + if magnitudes.min() < 0.0: + # Negative magnitude does not make sense but allowing so that autograd works + # around 0. + # Should we raise error? + warnings.warn("The input frequency response should not contain negative values.") + ir = torch.fft.fftshift(torch.fft.irfft(magnitudes), dim=-1) + device, dtype = magnitudes.device, magnitudes.dtype + window = torch.hann_window(ir.size(-1), periodic=False, device=device, dtype=dtype).expand_as(ir) + return ir * window + + +def _overlap_and_add(waveform, stride): + num_frames, frame_size = waveform.shape[-2:] + numel = (num_frames - 1) * stride + frame_size + buffer = torch.zeros(waveform.shape[:-2] + (numel,), device=waveform.device, dtype=waveform.dtype) + for i in range(num_frames): + start = i * stride + end = start + frame_size + buffer[..., start:end] += waveform[..., i, :] + return buffer + + +def filter_waveform(waveform: torch.Tensor, kernels: torch.Tensor, delay_compensation: int = -1): + """Applies filters along time axis of the given waveform. + + This function applies the given filters along time axis in the following manner: + + 1. Split the given waveform into chunks. The number of chunks is equal to the number of given filters. + 2. Filter each chunk with corresponding filter. + 3. Place the filtered chunks at the original indices while adding up the overlapping parts. + 4. Crop the resulting waveform so that delay introduced by the filter is removed and its length + matches that of the input waveform. + + The following figure illustrates this. + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/filter_waveform.png + + .. note:: + + If the number of filters is one, then the operation becomes stationary. + i.e. the same filtering is applied across the time axis. + + Args: + waveform (Tensor): Shape `(..., time)`. + kernels (Tensor): Impulse responses. + Valid inputs are 2D tensor with shape `(num_filters, filter_length)` or + `(N+1)`-D tensor with shape `(..., num_filters, filter_length)`, where `N` is + the dimension of waveform. + + In case of 2D input, the same set of filters is used across channels and batches. + Otherwise, different sets of filters are applied. In this case, the shape of + the first `N-1` dimensions of filters must match (or be broadcastable to) that of waveform. + + delay_compensation (int): Control how the waveform is cropped after full convolution. + If the value is zero or positive, it is interpreted as the length of crop at the + beginning of the waveform. The value cannot be larger than the size of filter kernel. + Otherwise the initial crop is ``filter_size // 2``. + When cropping happens, the waveform is also cropped from the end so that the + length of the resulting waveform matches the input waveform. + + Returns: + Tensor: `(..., time)`. + """ + if kernels.ndim not in [2, waveform.ndim + 1]: + raise ValueError( + "`kernels` must be 2 or N+1 dimension where " + f"N is the dimension of waveform. Found: {kernels.ndim} (N={waveform.ndim})" + ) + + num_filters, filter_size = kernels.shape[-2:] + num_frames = waveform.size(-1) + + if delay_compensation > filter_size: + raise ValueError( + "When `delay_compenstation` is provided, it cannot be larger than the size of filters." + f"Found: delay_compensation={delay_compensation}, filter_size={filter_size}" + ) + + # Transform waveform's time axis into (num_filters x chunk_length) with optional padding + chunk_length = num_frames // num_filters + if num_frames % num_filters > 0: + chunk_length += 1 + num_pad = chunk_length * num_filters - num_frames + waveform = torch.nn.functional.pad(waveform, [0, num_pad], "constant", 0) + chunked = waveform.unfold(-1, chunk_length, chunk_length) + assert chunked.numel() >= waveform.numel() + + # Broadcast kernels + if waveform.ndim + 1 > kernels.ndim: + expand_shape = waveform.shape[:-1] + kernels.shape + kernels = kernels.expand(expand_shape) + + convolved = fftconvolve(chunked, kernels) + restored = _overlap_and_add(convolved, chunk_length) + + # Trim in a way that the number of samples are same as input, + # and the filter delay is compensated + if delay_compensation >= 0: + start = delay_compensation + else: + start = filter_size // 2 + num_crops = restored.size(-1) - num_frames + end = num_crops - start + result = restored[..., start:-end] + return result + + +def exp_sigmoid( + input: torch.Tensor, exponent: float = 10.0, max_value: float = 2.0, threshold: float = 1e-7 +) -> torch.Tensor: + """Exponential Sigmoid pointwise nonlinearity. + Implements the equation: + ``max_value`` * sigmoid(``input``) ** (log(``exponent``)) + ``threshold`` + + The output has a range of [``threshold``, ``max_value``]. + ``exponent`` controls the slope of the output. + + .. devices:: CPU CUDA + + Args: + input (Tensor): Input Tensor + exponent (float, optional): Exponent. Controls the slope of the output + max_value (float, optional): Maximum value of the output + threshold (float, optional): Minimum value of the output + + Returns: + Tensor: Exponential Sigmoid output. Shape: same as input + + """ + + return max_value * torch.pow( + torch.nn.functional.sigmoid(input), + torch.log(torch.tensor(exponent, device=input.device, dtype=input.dtype)), + ) + torch.tensor(threshold, device=input.device, dtype=input.dtype) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/functional/functional.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/functional/functional.py new file mode 100644 index 0000000000000000000000000000000000000000..5d14d7af29c5b72249a4b015e6bf6609a6acba78 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/prototype/functional/functional.py @@ -0,0 +1,190 @@ +import math +import warnings +from typing import Optional + +import torch +from torchaudio.functional.functional import _create_triangular_filterbank + + +def _hz_to_bark(freqs: float, bark_scale: str = "traunmuller") -> float: + r"""Convert Hz to Barks. + + Args: + freqs (float): Frequencies in Hz + bark_scale (str, optional): Scale to use: ``traunmuller``, ``schroeder`` or ``wang``. (Default: ``traunmuller``) + + Returns: + barks (float): Frequency in Barks + """ + + if bark_scale not in ["schroeder", "traunmuller", "wang"]: + raise ValueError('bark_scale should be one of "schroeder", "traunmuller" or "wang".') + + if bark_scale == "wang": + return 6.0 * math.asinh(freqs / 600.0) + elif bark_scale == "schroeder": + return 7.0 * math.asinh(freqs / 650.0) + # Traunmuller Bark scale + barks = ((26.81 * freqs) / (1960.0 + freqs)) - 0.53 + # Bark value correction + if barks < 2: + barks += 0.15 * (2 - barks) + elif barks > 20.1: + barks += 0.22 * (barks - 20.1) + + return barks + + +def _bark_to_hz(barks: torch.Tensor, bark_scale: str = "traunmuller") -> torch.Tensor: + """Convert bark bin numbers to frequencies. + + Args: + barks (torch.Tensor): Bark frequencies + bark_scale (str, optional): Scale to use: ``traunmuller``,``schroeder`` or ``wang``. (Default: ``traunmuller``) + + Returns: + freqs (torch.Tensor): Barks converted in Hz + """ + + if bark_scale not in ["schroeder", "traunmuller", "wang"]: + raise ValueError('bark_scale should be one of "traunmuller", "schroeder" or "wang".') + + if bark_scale == "wang": + return 600.0 * torch.sinh(barks / 6.0) + elif bark_scale == "schroeder": + return 650.0 * torch.sinh(barks / 7.0) + # Bark value correction + if any(barks < 2): + idx = barks < 2 + barks[idx] = (barks[idx] - 0.3) / 0.85 + elif any(barks > 20.1): + idx = barks > 20.1 + barks[idx] = (barks[idx] + 4.422) / 1.22 + + # Traunmuller Bark scale + freqs = 1960 * ((barks + 0.53) / (26.28 - barks)) + + return freqs + + +def _hz_to_octs(freqs, tuning=0.0, bins_per_octave=12): + a440 = 440.0 * 2.0 ** (tuning / bins_per_octave) + return torch.log2(freqs / (a440 / 16)) + + +def barkscale_fbanks( + n_freqs: int, + f_min: float, + f_max: float, + n_barks: int, + sample_rate: int, + bark_scale: str = "traunmuller", +) -> torch.Tensor: + r"""Create a frequency bin conversion matrix. + + .. devices:: CPU + + .. properties:: TorchScript + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/bark_fbanks.png + :alt: Visualization of generated filter bank + + Args: + n_freqs (int): Number of frequencies to highlight/apply + f_min (float): Minimum frequency (Hz) + f_max (float): Maximum frequency (Hz) + n_barks (int): Number of mel filterbanks + sample_rate (int): Sample rate of the audio waveform + bark_scale (str, optional): Scale to use: ``traunmuller``,``schroeder`` or ``wang``. (Default: ``traunmuller``) + + Returns: + torch.Tensor: Triangular filter banks (fb matrix) of size (``n_freqs``, ``n_barks``) + meaning number of frequencies to highlight/apply to x the number of filterbanks. + Each column is a filterbank so that assuming there is a matrix A of + size (..., ``n_freqs``), the applied result would be + ``A * barkscale_fbanks(A.size(-1), ...)``. + + """ + + # freq bins + all_freqs = torch.linspace(0, sample_rate // 2, n_freqs) + + # calculate bark freq bins + m_min = _hz_to_bark(f_min, bark_scale=bark_scale) + m_max = _hz_to_bark(f_max, bark_scale=bark_scale) + + m_pts = torch.linspace(m_min, m_max, n_barks + 2) + f_pts = _bark_to_hz(m_pts, bark_scale=bark_scale) + + # create filterbank + fb = _create_triangular_filterbank(all_freqs, f_pts) + + if (fb.max(dim=0).values == 0.0).any(): + warnings.warn( + "At least one bark filterbank has all zero values. " + f"The value for `n_barks` ({n_barks}) may be set too high. " + f"Or, the value for `n_freqs` ({n_freqs}) may be set too low." + ) + + return fb + + +def chroma_filterbank( + sample_rate: int, + n_freqs: int, + n_chroma: int, + *, + tuning: float = 0.0, + ctroct: float = 5.0, + octwidth: Optional[float] = 2.0, + norm: int = 2, + base_c: bool = True, +): + """Create a frequency-to-chroma conversion matrix. Implementation adapted from librosa. + + Args: + sample_rate (int): Sample rate. + n_freqs (int): Number of input frequencies. + n_chroma (int): Number of output chroma. + tuning (float, optional): Tuning deviation from A440 in fractions of a chroma bin. (Default: 0.0) + ctroct (float, optional): Center of Gaussian dominance window to weight filters by, in octaves. (Default: 5.0) + octwidth (float or None, optional): Width of Gaussian dominance window to weight filters by, in octaves. + If ``None``, then disable weighting altogether. (Default: 2.0) + norm (int, optional): order of norm to normalize filter bank by. (Default: 2) + base_c (bool, optional): If True, then start filter bank at C. Otherwise, start at A. (Default: True) + + Returns: + torch.Tensor: Chroma filter bank, with shape `(n_freqs, n_chroma)`. + """ + # Skip redundant upper half of frequency range. + freqs = torch.linspace(0, sample_rate // 2, n_freqs)[1:] + freq_bins = n_chroma * _hz_to_octs(freqs, bins_per_octave=n_chroma, tuning=tuning) + freq_bins = torch.cat((torch.tensor([freq_bins[0] - 1.5 * n_chroma]), freq_bins)) + freq_bin_widths = torch.cat( + ( + torch.maximum(freq_bins[1:] - freq_bins[:-1], torch.tensor(1.0)), + torch.tensor([1]), + ) + ) + + # (n_freqs, n_chroma) + D = freq_bins.unsqueeze(1) - torch.arange(0, n_chroma) + + n_chroma2 = round(n_chroma / 2) + + # Project to range [-n_chroma/2, n_chroma/2 - 1] + D = torch.remainder(D + n_chroma2, n_chroma) - n_chroma2 + + fb = torch.exp(-0.5 * (2 * D / torch.tile(freq_bin_widths.unsqueeze(1), (1, n_chroma))) ** 2) + fb = torch.nn.functional.normalize(fb, p=norm, dim=1) + + if octwidth is not None: + fb *= torch.tile( + torch.exp(-0.5 * (((freq_bins.unsqueeze(1) / n_chroma - ctroct) / octwidth) ** 2)), + (1, n_chroma), + ) + + if base_c: + fb = torch.roll(fb, -3 * (n_chroma // 12), dims=1) + + return fb diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1c65a49b277c25c36273b888c1ac2861cb3ce9a0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__init__.py @@ -0,0 +1,10 @@ +from .sox_effects import apply_effects_file, apply_effects_tensor, effect_names, init_sox_effects, shutdown_sox_effects + + +__all__ = [ + "init_sox_effects", + "shutdown_sox_effects", + "effect_names", + "apply_effects_tensor", + "apply_effects_file", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..035a799dc1087ddde226c735fcf45f40a3ce9d71 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__pycache__/sox_effects.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__pycache__/sox_effects.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d24687faf135c90fe2927733b1e2c37cb0e759e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/__pycache__/sox_effects.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/sox_effects.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/sox_effects.py new file mode 100644 index 0000000000000000000000000000000000000000..b80e4bfad689925ba4a08503ebaeddcbe5cc6a5d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/sox_effects/sox_effects.py @@ -0,0 +1,272 @@ +import os +from typing import List, Optional, Tuple + +import torch +import torchaudio +from torchaudio._internal.module_utils import deprecated +from torchaudio.utils.sox_utils import list_effects + + +sox_ext = torchaudio._extension.lazy_import_sox_ext() + + +@deprecated("Please remove the call. This function is called automatically.") +def init_sox_effects(): + """Initialize resources required to use sox effects. + + Note: + You do not need to call this function manually. It is called automatically. + + Once initialized, you do not need to call this function again across the multiple uses of + sox effects though it is safe to do so as long as :func:`shutdown_sox_effects` is not called yet. + Once :func:`shutdown_sox_effects` is called, you can no longer use SoX effects and initializing + again will result in error. + """ + pass + + +@deprecated("Please remove the call. This function is called automatically.") +def shutdown_sox_effects(): + """Clean up resources required to use sox effects. + + Note: + You do not need to call this function manually. It is called automatically. + + It is safe to call this function multiple times. + Once :py:func:`shutdown_sox_effects` is called, you can no longer use SoX effects and + initializing again will result in error. + """ + pass + + +def effect_names() -> List[str]: + """Gets list of valid sox effect names + + Returns: + List[str]: list of available effect names. + + Example + >>> torchaudio.sox_effects.effect_names() + ['allpass', 'band', 'bandpass', ... ] + """ + return list(list_effects().keys()) + + +def apply_effects_tensor( + tensor: torch.Tensor, + sample_rate: int, + effects: List[List[str]], + channels_first: bool = True, +) -> Tuple[torch.Tensor, int]: + """Apply sox effects to given Tensor + + .. devices:: CPU + + .. properties:: TorchScript + + Note: + This function only works on CPU Tensors. + This function works in the way very similar to ``sox`` command, however there are slight + differences. For example, ``sox`` command adds certain effects automatically (such as + ``rate`` effect after ``speed`` and ``pitch`` and other effects), but this function does + only applies the given effects. (Therefore, to actually apply ``speed`` effect, you also + need to give ``rate`` effect with desired sampling rate.). + + Args: + tensor (torch.Tensor): Input 2D CPU Tensor. + sample_rate (int): Sample rate + effects (List[List[str]]): List of effects. + channels_first (bool, optional): Indicates if the input Tensor's dimension is + `[channels, time]` or `[time, channels]` + + Returns: + (Tensor, int): Resulting Tensor and sample rate. + The resulting Tensor has the same ``dtype`` as the input Tensor, and + the same channels order. The shape of the Tensor can be different based on the + effects applied. Sample rate can also be different based on the effects applied. + + Example - Basic usage + >>> + >>> # Defines the effects to apply + >>> effects = [ + ... ['gain', '-n'], # normalises to 0dB + ... ['pitch', '5'], # 5 cent pitch shift + ... ['rate', '8000'], # resample to 8000 Hz + ... ] + >>> + >>> # Generate pseudo wave: + >>> # normalized, channels first, 2ch, sampling rate 16000, 1 second + >>> sample_rate = 16000 + >>> waveform = 2 * torch.rand([2, sample_rate * 1]) - 1 + >>> waveform.shape + torch.Size([2, 16000]) + >>> waveform + tensor([[ 0.3138, 0.7620, -0.9019, ..., -0.7495, -0.4935, 0.5442], + [-0.0832, 0.0061, 0.8233, ..., -0.5176, -0.9140, -0.2434]]) + >>> + >>> # Apply effects + >>> waveform, sample_rate = apply_effects_tensor( + ... wave_form, sample_rate, effects, channels_first=True) + >>> + >>> # Check the result + >>> # The new waveform is sampling rate 8000, 1 second. + >>> # normalization and channel order are preserved + >>> waveform.shape + torch.Size([2, 8000]) + >>> waveform + tensor([[ 0.5054, -0.5518, -0.4800, ..., -0.0076, 0.0096, -0.0110], + [ 0.1331, 0.0436, -0.3783, ..., -0.0035, 0.0012, 0.0008]]) + >>> sample_rate + 8000 + + Example - Torchscript-able transform + >>> + >>> # Use `apply_effects_tensor` in `torch.nn.Module` and dump it to file, + >>> # then run sox effect via Torchscript runtime. + >>> + >>> class SoxEffectTransform(torch.nn.Module): + ... effects: List[List[str]] + ... + ... def __init__(self, effects: List[List[str]]): + ... super().__init__() + ... self.effects = effects + ... + ... def forward(self, tensor: torch.Tensor, sample_rate: int): + ... return sox_effects.apply_effects_tensor( + ... tensor, sample_rate, self.effects) + ... + ... + >>> # Create transform object + >>> effects = [ + ... ["lowpass", "-1", "300"], # apply single-pole lowpass filter + ... ["rate", "8000"], # change sample rate to 8000 + ... ] + >>> transform = SoxEffectTensorTransform(effects, input_sample_rate) + >>> + >>> # Dump it to file and load + >>> path = 'sox_effect.zip' + >>> torch.jit.script(trans).save(path) + >>> transform = torch.jit.load(path) + >>> + >>>> # Run transform + >>> waveform, input_sample_rate = torchaudio.load("input.wav") + >>> waveform, sample_rate = transform(waveform, input_sample_rate) + >>> assert sample_rate == 8000 + """ + return sox_ext.apply_effects_tensor(tensor, sample_rate, effects, channels_first) + + +def apply_effects_file( + path: str, + effects: List[List[str]], + normalize: bool = True, + channels_first: bool = True, + format: Optional[str] = None, +) -> Tuple[torch.Tensor, int]: + """Apply sox effects to the audio file and load the resulting data as Tensor + + .. devices:: CPU + + .. properties:: TorchScript + + Note: + This function works in the way very similar to ``sox`` command, however there are slight + differences. For example, ``sox`` commnad adds certain effects automatically (such as + ``rate`` effect after ``speed``, ``pitch`` etc), but this function only applies the given + effects. Therefore, to actually apply ``speed`` effect, you also need to give ``rate`` + effect with desired sampling rate, because internally, ``speed`` effects only alter sampling + rate and leave samples untouched. + + Args: + path (path-like object): + Source of audio data. + effects (List[List[str]]): List of effects. + normalize (bool, optional): + When ``True``, this function converts the native sample type to ``float32``. + Default: ``True``. + + If input file is integer WAV, giving ``False`` will change the resulting Tensor type to + integer type. + This argument has no effect for formats other than integer WAV type. + + channels_first (bool, optional): When True, the returned Tensor has dimension `[channel, time]`. + Otherwise, the returned Tensor's dimension is `[time, channel]`. + format (str or None, optional): + Override the format detection with the given format. + Providing the argument might help when libsox can not infer the format + from header or extension, + + Returns: + (Tensor, int): Resulting Tensor and sample rate. + If ``normalize=True``, the resulting Tensor is always ``float32`` type. + If ``normalize=False`` and the input audio file is of integer WAV file, then the + resulting Tensor has corresponding integer type. (Note 24 bit integer type is not supported) + If ``channels_first=True``, the resulting Tensor has dimension `[channel, time]`, + otherwise `[time, channel]`. + + Example - Basic usage + >>> + >>> # Defines the effects to apply + >>> effects = [ + ... ['gain', '-n'], # normalises to 0dB + ... ['pitch', '5'], # 5 cent pitch shift + ... ['rate', '8000'], # resample to 8000 Hz + ... ] + >>> + >>> # Apply effects and load data with channels_first=True + >>> waveform, sample_rate = apply_effects_file("data.wav", effects, channels_first=True) + >>> + >>> # Check the result + >>> waveform.shape + torch.Size([2, 8000]) + >>> waveform + tensor([[ 5.1151e-03, 1.8073e-02, 2.2188e-02, ..., 1.0431e-07, + -1.4761e-07, 1.8114e-07], + [-2.6924e-03, 2.1860e-03, 1.0650e-02, ..., 6.4122e-07, + -5.6159e-07, 4.8103e-07]]) + >>> sample_rate + 8000 + + Example - Apply random speed perturbation to dataset + >>> + >>> # Load data from file, apply random speed perturbation + >>> class RandomPerturbationFile(torch.utils.data.Dataset): + ... \"\"\"Given flist, apply random speed perturbation + ... + ... Suppose all the input files are at least one second long. + ... \"\"\" + ... def __init__(self, flist: List[str], sample_rate: int): + ... super().__init__() + ... self.flist = flist + ... self.sample_rate = sample_rate + ... + ... def __getitem__(self, index): + ... speed = 0.5 + 1.5 * random.randn() + ... effects = [ + ... ['gain', '-n', '-10'], # apply 10 db attenuation + ... ['remix', '-'], # merge all the channels + ... ['speed', f'{speed:.5f}'], # duration is now 0.5 ~ 2.0 seconds. + ... ['rate', f'{self.sample_rate}'], + ... ['pad', '0', '1.5'], # add 1.5 seconds silence at the end + ... ['trim', '0', '2'], # get the first 2 seconds + ... ] + ... waveform, _ = torchaudio.sox_effects.apply_effects_file( + ... self.flist[index], effects) + ... return waveform + ... + ... def __len__(self): + ... return len(self.flist) + ... + >>> dataset = RandomPerturbationFile(file_list, sample_rate=8000) + >>> loader = torch.utils.data.DataLoader(dataset, batch_size=32) + >>> for batch in loader: + >>> pass + """ + if not torch.jit.is_scripting(): + if hasattr(path, "read"): + raise RuntimeError( + "apply_effects_file function does not support file-like object. " + "Please use torchaudio.io.AudioEffector." + ) + path = os.fspath(path) + return sox_ext.apply_effects_file(path, effects, normalize, channels_first, format) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fd84516a001e93db4085229354b57a64b5213f3d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__init__.py @@ -0,0 +1,75 @@ +from ._multi_channel import MVDR, PSD, RTFMVDR, SoudenMVDR +from ._transforms import ( + AddNoise, + AmplitudeToDB, + ComputeDeltas, + Convolve, + Deemphasis, + Fade, + FFTConvolve, + FrequencyMasking, + GriffinLim, + InverseMelScale, + InverseSpectrogram, + LFCC, + Loudness, + MelScale, + MelSpectrogram, + MFCC, + MuLawDecoding, + MuLawEncoding, + PitchShift, + Preemphasis, + Resample, + RNNTLoss, + SlidingWindowCmn, + SpecAugment, + SpectralCentroid, + Spectrogram, + Speed, + SpeedPerturbation, + TimeMasking, + TimeStretch, + Vad, + Vol, +) + + +__all__ = [ + "AddNoise", + "AmplitudeToDB", + "ComputeDeltas", + "Convolve", + "Deemphasis", + "Fade", + "FFTConvolve", + "FrequencyMasking", + "GriffinLim", + "InverseMelScale", + "InverseSpectrogram", + "LFCC", + "Loudness", + "MFCC", + "MVDR", + "MelScale", + "MelSpectrogram", + "MuLawDecoding", + "MuLawEncoding", + "PSD", + "PitchShift", + "Preemphasis", + "RNNTLoss", + "RTFMVDR", + "Resample", + "SlidingWindowCmn", + "SoudenMVDR", + "SpecAugment", + "SpectralCentroid", + "Spectrogram", + "Speed", + "SpeedPerturbation", + "TimeMasking", + "TimeStretch", + "Vad", + "Vol", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..15acb3a0cbbccbaedb0bd052a0d153f90d19a325 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__pycache__/_multi_channel.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__pycache__/_multi_channel.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1afe6eaa1d5e7f70f49fff395aaa4e6b5f311de3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/__pycache__/_multi_channel.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/_multi_channel.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/_multi_channel.py new file mode 100644 index 0000000000000000000000000000000000000000..956ccd2ee1526e56f647872a07a5f55957ce2381 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/_multi_channel.py @@ -0,0 +1,467 @@ +# -*- coding: utf-8 -*- + +import warnings +from typing import Optional, Union + +import torch +from torch import Tensor +from torchaudio import functional as F + + +__all__ = [] + + +def _get_mvdr_vector( + psd_s: torch.Tensor, + psd_n: torch.Tensor, + reference_vector: torch.Tensor, + solution: str = "ref_channel", + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, +) -> torch.Tensor: + r"""Compute the MVDR beamforming weights with ``solution`` argument. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_vector (torch.Tensor): one-hot reference channel matrix. + solution (str, optional): Solution to compute the MVDR beamforming weights. + Options: [``ref_channel``, ``stv_evd``, ``stv_power``]. (Default: ``ref_channel``) + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: the mvdr beamforming weight matrix + """ + if solution == "ref_channel": + beamform_vector = F.mvdr_weights_souden(psd_s, psd_n, reference_vector, diagonal_loading, diag_eps, eps) + else: + if solution == "stv_evd": + stv = F.rtf_evd(psd_s) + else: + stv = F.rtf_power(psd_s, psd_n, reference_vector, diagonal_loading=diagonal_loading, diag_eps=diag_eps) + beamform_vector = F.mvdr_weights_rtf(stv, psd_n, reference_vector, diagonal_loading, diag_eps, eps) + + return beamform_vector + + +class PSD(torch.nn.Module): + r"""Compute cross-channel power spectral density (PSD) matrix. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + multi_mask (bool, optional): If ``True``, only accepts multi-channel Time-Frequency masks. (Default: ``False``) + normalize (bool, optional): If ``True``, normalize the mask along the time dimension. (Default: ``True``) + eps (float, optional): Value to add to the denominator in mask normalization. (Default: ``1e-15``) + """ + + def __init__(self, multi_mask: bool = False, normalize: bool = True, eps: float = 1e-15): + super().__init__() + self.multi_mask = multi_mask + self.normalize = normalize + self.eps = eps + + def forward(self, specgram: torch.Tensor, mask: Optional[torch.Tensor] = None): + """ + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)`. + mask (torch.Tensor or None, optional): Time-Frequency mask for normalization. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` or + with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + (Default: ``None``) + + Returns: + torch.Tensor: The complex-valued PSD matrix of the input spectrum. + Tensor with dimensions `(..., freq, channel, channel)` + """ + if mask is not None: + if self.multi_mask: + # Averaging mask along channel dimension + mask = mask.mean(dim=-3) # (..., freq, time) + psd = F.psd(specgram, mask, self.normalize, self.eps) + + return psd + + +class MVDR(torch.nn.Module): + """Minimum Variance Distortionless Response (MVDR) module that performs MVDR beamforming with Time-Frequency masks. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Based on https://github.com/espnet/espnet/blob/master/espnet2/enh/layers/beamformer.py + + We provide three solutions of MVDR beamforming. One is based on *reference channel selection* + :cite:`souden2009optimal` (``solution=ref_channel``). + + .. math:: + \\textbf{w}_{\\text{MVDR}}(f) =\ + \\frac{{{\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f){\\bf{\\Phi}_{\\textbf{SS}}}}(f)}\ + {\\text{Trace}({{{\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f) \\bf{\\Phi}_{\\textbf{SS}}}(f))}}\\bm{u} + + where :math:`\\bf{\\Phi}_{\\textbf{SS}}` and :math:`\\bf{\\Phi}_{\\textbf{NN}}` are the covariance\ + matrices of speech and noise, respectively. :math:`\\bf{u}` is an one-hot vector to determine the\ + reference channel. + + The other two solutions are based on the steering vector (``solution=stv_evd`` or ``solution=stv_power``). + + .. math:: + \\textbf{w}_{\\text{MVDR}}(f) =\ + \\frac{{{\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f){\\bm{v}}(f)}}\ + {{\\bm{v}^{\\mathsf{H}}}(f){\\bf{\\Phi}_{\\textbf{NN}}^{-1}}(f){\\bm{v}}(f)} + + where :math:`\\bm{v}` is the acoustic transfer function or the steering vector.\ + :math:`.^{\\mathsf{H}}` denotes the Hermitian Conjugate operation. + + We apply either *eigenvalue decomposition* + :cite:`higuchi2016robust` or the *power method* :cite:`mises1929praktische` to get the + steering vector from the PSD matrix of speech. + + After estimating the beamforming weight, the enhanced Short-time Fourier Transform (STFT) is obtained by + + .. math:: + \\hat{\\bf{S}} = {\\bf{w}^\\mathsf{H}}{\\bf{Y}}, {\\bf{w}} \\in \\mathbb{C}^{M \\times F} + + where :math:`\\bf{Y}` and :math:`\\hat{\\bf{S}}` are the STFT of the multi-channel noisy speech and\ + the single-channel enhanced speech, respectively. + + For online streaming audio, we provide a *recursive method* :cite:`higuchi2017online` to update the + PSD matrices of speech and noise, respectively. + + Args: + ref_channel (int, optional): Reference channel for beamforming. (Default: ``0``) + solution (str, optional): Solution to compute the MVDR beamforming weights. + Options: [``ref_channel``, ``stv_evd``, ``stv_power``]. (Default: ``ref_channel``) + multi_mask (bool, optional): If ``True``, only accepts multi-channel Time-Frequency masks. (Default: ``False``) + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to the covariance matrix + of the noise. (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + online (bool, optional): If ``True``, updates the MVDR beamforming weights based on + the previous covarience matrices. (Default: ``False``) + + Note: + To improve the numerical stability, the input spectrogram will be converted to double precision + (``torch.complex128`` or ``torch.cdouble``) dtype for internal computation. The output spectrogram + is converted to the dtype of the input spectrogram to be compatible with other modules. + + Note: + If you use ``stv_evd`` solution, the gradient of the same input may not be identical if the + eigenvalues of the PSD matrix are not distinct (i.e. some eigenvalues are close or identical). + """ + + def __init__( + self, + ref_channel: int = 0, + solution: str = "ref_channel", + multi_mask: bool = False, + diag_loading: bool = True, + diag_eps: float = 1e-7, + online: bool = False, + ): + super().__init__() + if solution not in [ + "ref_channel", + "stv_evd", + "stv_power", + ]: + raise ValueError( + '`solution` must be one of ["ref_channel", "stv_evd", "stv_power"]. Given {}'.format(solution) + ) + self.ref_channel = ref_channel + self.solution = solution + self.multi_mask = multi_mask + self.diag_loading = diag_loading + self.diag_eps = diag_eps + self.online = online + self.psd = PSD(multi_mask) + + psd_s: torch.Tensor = torch.zeros(1) + psd_n: torch.Tensor = torch.zeros(1) + mask_sum_s: torch.Tensor = torch.zeros(1) + mask_sum_n: torch.Tensor = torch.zeros(1) + self.register_buffer("psd_s", psd_s) + self.register_buffer("psd_n", psd_n) + self.register_buffer("mask_sum_s", mask_sum_s) + self.register_buffer("mask_sum_n", mask_sum_n) + + def _get_updated_mvdr_vector( + self, + psd_s: torch.Tensor, + psd_n: torch.Tensor, + mask_s: torch.Tensor, + mask_n: torch.Tensor, + reference_vector: torch.Tensor, + solution: str = "ref_channel", + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, + ) -> torch.Tensor: + r"""Recursively update the MVDR beamforming vector. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + mask_s (torch.Tensor): Time-Frequency mask of the target speech. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + mask_n (torch.Tensor or None, optional): Time-Frequency mask of the noise. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + reference_vector (torch.Tensor): One-hot reference channel matrix. + solution (str, optional): Solution to compute the MVDR beamforming weights. + Options: [``ref_channel``, ``stv_evd``, ``stv_power``]. (Default: ``ref_channel``) + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: The MVDR beamforming weight matrix. + """ + if self.multi_mask: + # Averaging mask along channel dimension + mask_s = mask_s.mean(dim=-3) # (..., freq, time) + mask_n = mask_n.mean(dim=-3) # (..., freq, time) + if self.psd_s.ndim == 1: + self.psd_s = psd_s + self.psd_n = psd_n + self.mask_sum_s = mask_s.sum(dim=-1) + self.mask_sum_n = mask_n.sum(dim=-1) + return _get_mvdr_vector(psd_s, psd_n, reference_vector, solution, diagonal_loading, diag_eps, eps) + else: + psd_s = self._get_updated_psd_speech(psd_s, mask_s) + psd_n = self._get_updated_psd_noise(psd_n, mask_n) + self.psd_s = psd_s + self.psd_n = psd_n + self.mask_sum_s = self.mask_sum_s + mask_s.sum(dim=-1) + self.mask_sum_n = self.mask_sum_n + mask_n.sum(dim=-1) + return _get_mvdr_vector(psd_s, psd_n, reference_vector, solution, diagonal_loading, diag_eps, eps) + + def _get_updated_psd_speech(self, psd_s: torch.Tensor, mask_s: torch.Tensor) -> torch.Tensor: + r"""Update psd of speech recursively. + + Args: + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + mask_s (torch.Tensor): Time-Frequency mask of the target speech. + Tensor with dimensions `(..., freq, time)`. + + Returns: + torch.Tensor: The updated PSD matrix of target speech. + """ + numerator = self.mask_sum_s / (self.mask_sum_s + mask_s.sum(dim=-1)) + denominator = 1 / (self.mask_sum_s + mask_s.sum(dim=-1)) + psd_s = self.psd_s * numerator[..., None, None] + psd_s * denominator[..., None, None] + return psd_s + + def _get_updated_psd_noise(self, psd_n: torch.Tensor, mask_n: torch.Tensor) -> torch.Tensor: + r"""Update psd of noise recursively. + + Args: + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + mask_n (torch.Tensor or None, optional): Time-Frequency mask of the noise. + Tensor with dimensions `(..., freq, time)`. + + Returns: + torch.Tensor: The updated PSD matrix of noise. + """ + numerator = self.mask_sum_n / (self.mask_sum_n + mask_n.sum(dim=-1)) + denominator = 1 / (self.mask_sum_n + mask_n.sum(dim=-1)) + psd_n = self.psd_n * numerator[..., None, None] + psd_n * denominator[..., None, None] + return psd_n + + def forward( + self, specgram: torch.Tensor, mask_s: torch.Tensor, mask_n: Optional[torch.Tensor] = None + ) -> torch.Tensor: + """Perform MVDR beamforming. + + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)` + mask_s (torch.Tensor): Time-Frequency mask of target speech. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + mask_n (torch.Tensor or None, optional): Time-Frequency mask of noise. + Tensor with dimensions `(..., freq, time)` if multi_mask is ``False`` + or with dimensions `(..., channel, freq, time)` if multi_mask is ``True``. + (Default: None) + + Returns: + torch.Tensor: Single-channel complex-valued enhanced spectrum with dimensions `(..., freq, time)`. + """ + dtype = specgram.dtype + if specgram.ndim < 3: + raise ValueError(f"Expected at least 3D tensor (..., channel, freq, time). Found: {specgram.shape}") + if not specgram.is_complex(): + raise ValueError( + f"The type of ``specgram`` tensor must be ``torch.cfloat`` or ``torch.cdouble``.\ + Found: {specgram.dtype}" + ) + if specgram.dtype == torch.cfloat: + specgram = specgram.cdouble() # Convert specgram to ``torch.cdouble``. + + if mask_n is None: + warnings.warn("``mask_n`` is not provided, use ``1 - mask_s`` as ``mask_n``.") + mask_n = 1 - mask_s + + psd_s = self.psd(specgram, mask_s) # (..., freq, time, channel, channel) + psd_n = self.psd(specgram, mask_n) # (..., freq, time, channel, channel) + + u = torch.zeros(specgram.size()[:-2], device=specgram.device, dtype=torch.cdouble) # (..., channel) + u[..., self.ref_channel].fill_(1) + + if self.online: + w_mvdr = self._get_updated_mvdr_vector( + psd_s, psd_n, mask_s, mask_n, u, self.solution, self.diag_loading, self.diag_eps + ) + else: + w_mvdr = _get_mvdr_vector(psd_s, psd_n, u, self.solution, self.diag_loading, self.diag_eps) + + specgram_enhanced = F.apply_beamforming(w_mvdr, specgram) + + return specgram_enhanced.to(dtype) + + +class RTFMVDR(torch.nn.Module): + r"""Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) module + based on the relative transfer function (RTF) and power spectral density (PSD) matrix of noise. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the multi-channel complex-valued spectrum :math:`\textbf{Y}`, the relative transfer function (RTF) matrix + or the steering vector of target speech :math:`\bm{v}`, the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and + a one-hot vector that represents the reference channel :math:`\bf{u}`, the module computes the single-channel + complex-valued spectrum of the enhanced speech :math:`\hat{\textbf{S}}`. The formula is defined as: + + .. math:: + \hat{\textbf{S}}(f) = \textbf{w}_{\text{bf}}(f)^{\mathsf{H}} \textbf{Y}(f) + + where :math:`\textbf{w}_{\text{bf}}(f)` is the MVDR beamforming weight for the :math:`f`-th frequency bin, + :math:`(.)^{\mathsf{H}}` denotes the Hermitian Conjugate operation. + + The beamforming weight is computed by: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)}} + {{\bm{v}^{\mathsf{H}}}(f){\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bm{v}}(f)} + """ + + def forward( + self, + specgram: Tensor, + rtf: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, + ) -> Tensor: + """ + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)` + rtf (torch.Tensor): The complex-valued RTF vector of target speech. + Tensor with dimensions `(..., freq, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: Single-channel complex-valued enhanced spectrum with dimensions `(..., freq, time)`. + """ + w_mvdr = F.mvdr_weights_rtf(rtf, psd_n, reference_channel, diagonal_loading, diag_eps, eps) + spectrum_enhanced = F.apply_beamforming(w_mvdr, specgram) + return spectrum_enhanced + + +class SoudenMVDR(torch.nn.Module): + r"""Minimum Variance Distortionless Response (*MVDR* :cite:`capon1969high`) module + based on the method proposed by *Souden et, al.* :cite:`souden2009optimal`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Given the multi-channel complex-valued spectrum :math:`\textbf{Y}`, the power spectral density (PSD) matrix + of target speech :math:`\bf{\Phi}_{\textbf{SS}}`, the PSD matrix of noise :math:`\bf{\Phi}_{\textbf{NN}}`, and + a one-hot vector that represents the reference channel :math:`\bf{u}`, the module computes the single-channel + complex-valued spectrum of the enhanced speech :math:`\hat{\textbf{S}}`. The formula is defined as: + + .. math:: + \hat{\textbf{S}}(f) = \textbf{w}_{\text{bf}}(f)^{\mathsf{H}} \textbf{Y}(f) + + where :math:`\textbf{w}_{\text{bf}}(f)` is the MVDR beamforming weight for the :math:`f`-th frequency bin. + + The beamforming weight is computed by: + + .. math:: + \textbf{w}_{\text{MVDR}}(f) = + \frac{{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f){\bf{\Phi}_{\textbf{SS}}}}(f)} + {\text{Trace}({{{\bf{\Phi}_{\textbf{NN}}^{-1}}(f) \bf{\Phi}_{\textbf{SS}}}(f))}}\bm{u} + """ + + def forward( + self, + specgram: Tensor, + psd_s: Tensor, + psd_n: Tensor, + reference_channel: Union[int, Tensor], + diagonal_loading: bool = True, + diag_eps: float = 1e-7, + eps: float = 1e-8, + ) -> torch.Tensor: + """ + Args: + specgram (torch.Tensor): Multi-channel complex-valued spectrum. + Tensor with dimensions `(..., channel, freq, time)`. + psd_s (torch.Tensor): The complex-valued power spectral density (PSD) matrix of target speech. + Tensor with dimensions `(..., freq, channel, channel)`. + psd_n (torch.Tensor): The complex-valued power spectral density (PSD) matrix of noise. + Tensor with dimensions `(..., freq, channel, channel)`. + reference_channel (int or torch.Tensor): Specifies the reference channel. + If the dtype is ``int``, it represents the reference channel index. + If the dtype is ``torch.Tensor``, its shape is `(..., channel)`, where the ``channel`` dimension + is one-hot. + diagonal_loading (bool, optional): If ``True``, enables applying diagonal loading to ``psd_n``. + (Default: ``True``) + diag_eps (float, optional): The coefficient multiplied to the identity matrix for diagonal loading. + It is only effective when ``diagonal_loading`` is set to ``True``. (Default: ``1e-7``) + eps (float, optional): Value to add to the denominator in the beamforming weight formula. + (Default: ``1e-8``) + + Returns: + torch.Tensor: Single-channel complex-valued enhanced spectrum with dimensions `(..., freq, time)`. + """ + w_mvdr = F.mvdr_weights_souden(psd_s, psd_n, reference_channel, diagonal_loading, diag_eps, eps) + spectrum_enhanced = F.apply_beamforming(w_mvdr, specgram) + return spectrum_enhanced diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/_transforms.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/_transforms.py new file mode 100644 index 0000000000000000000000000000000000000000..242fd971a8d1efabb485a4cdbda2a8f1dbf59f02 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/transforms/_transforms.py @@ -0,0 +1,2137 @@ +# -*- coding: utf-8 -*- + +import math +import warnings +from typing import Callable, Optional, Sequence, Tuple, Union + +import torch +from torch import Tensor +from torch.nn.modules.lazy import LazyModuleMixin +from torch.nn.parameter import UninitializedParameter + +from torchaudio import functional as F +from torchaudio.functional.functional import ( + _apply_sinc_resample_kernel, + _check_convolve_mode, + _fix_waveform_shape, + _get_sinc_resample_kernel, + _stretch_waveform, +) + +__all__ = [] + + +class Spectrogram(torch.nn.Module): + r"""Create a spectrogram from a audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + power (float or None, optional): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. + If None, then the complex spectrum is returned instead. (Default: ``2``) + normalized (bool or str, optional): Whether to normalize by magnitude after stft. If input is str, choices are + ``"window"`` and ``"frame_length"``, if specific normalization type is desirable. ``True`` maps to + ``"window"``. (Default: ``False``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + center (bool, optional): whether to pad :attr:`waveform` on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + (Default: ``True``) + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. (Default: ``"reflect"``) + onesided (bool, optional): controls whether to return half of results to + avoid redundancy (Default: ``True``) + return_complex (bool, optional): + Deprecated and not used. + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = torchaudio.transforms.Spectrogram(n_fft=800) + >>> spectrogram = transform(waveform) + + """ + __constants__ = ["n_fft", "win_length", "hop_length", "pad", "power", "normalized"] + + def __init__( + self, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + pad: int = 0, + window_fn: Callable[..., Tensor] = torch.hann_window, + power: Optional[float] = 2.0, + normalized: Union[bool, str] = False, + wkwargs: Optional[dict] = None, + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, + return_complex: Optional[bool] = None, + ) -> None: + super(Spectrogram, self).__init__() + torch._C._log_api_usage_once("torchaudio.transforms.Spectrogram") + self.n_fft = n_fft + # number of FFT bins. the returned STFT result will have n_fft // 2 + 1 + # number of frequencies due to onesided=True in torch.stft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.pad = pad + self.power = power + self.normalized = normalized + self.center = center + self.pad_mode = pad_mode + self.onesided = onesided + if return_complex is not None: + warnings.warn( + "`return_complex` argument is now deprecated and is not effective." + "`torchaudio.transforms.Spectrogram(power=None)` always returns a tensor with " + "complex dtype. Please remove the argument in the function call." + ) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Dimension (..., freq, time), where freq is + ``n_fft // 2 + 1`` where ``n_fft`` is the number of + Fourier bins, and time is the number of window hops (n_frame). + """ + return F.spectrogram( + waveform, + self.pad, + self.window, + self.n_fft, + self.hop_length, + self.win_length, + self.power, + self.normalized, + self.center, + self.pad_mode, + self.onesided, + ) + + +class InverseSpectrogram(torch.nn.Module): + r"""Create an inverse spectrogram to recover an audio signal from a spectrogram. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + normalized (bool or str, optional): Whether the stft output was normalized by magnitude. If input is str, + choices are ``"window"`` and ``"frame_length"``, dependent on normalization mode. ``True`` maps to + ``"window"``. (Default: ``False``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + center (bool, optional): whether the signal in spectrogram was padded on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + (Default: ``True``) + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. (Default: ``"reflect"``) + onesided (bool, optional): controls whether spectrogram was used to return half of results to + avoid redundancy (Default: ``True``) + + Example + >>> batch, freq, time = 2, 257, 100 + >>> length = 25344 + >>> spectrogram = torch.randn(batch, freq, time, dtype=torch.cdouble) + >>> transform = transforms.InverseSpectrogram(n_fft=512) + >>> waveform = transform(spectrogram, length) + """ + __constants__ = ["n_fft", "win_length", "hop_length", "pad", "power", "normalized"] + + def __init__( + self, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + pad: int = 0, + window_fn: Callable[..., Tensor] = torch.hann_window, + normalized: Union[bool, str] = False, + wkwargs: Optional[dict] = None, + center: bool = True, + pad_mode: str = "reflect", + onesided: bool = True, + ) -> None: + super(InverseSpectrogram, self).__init__() + self.n_fft = n_fft + # number of FFT bins. the returned STFT result will have n_fft // 2 + 1 + # number of frequencies due to onesided=True in torch.stft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.pad = pad + self.normalized = normalized + self.center = center + self.pad_mode = pad_mode + self.onesided = onesided + + def forward(self, spectrogram: Tensor, length: Optional[int] = None) -> Tensor: + r""" + Args: + spectrogram (Tensor): Complex tensor of audio of dimension (..., freq, time). + length (int or None, optional): The output length of the waveform. + + Returns: + Tensor: Dimension (..., time), Least squares estimation of the original signal. + """ + return F.inverse_spectrogram( + spectrogram, + length, + self.pad, + self.window, + self.n_fft, + self.hop_length, + self.win_length, + self.normalized, + self.center, + self.pad_mode, + self.onesided, + ) + + +class GriffinLim(torch.nn.Module): + r"""Compute waveform from a linear scale magnitude spectrogram using the Griffin-Lim transformation. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Implementation ported from + *librosa* :cite:`brian_mcfee-proc-scipy-2015`, *A fast Griffin-Lim algorithm* :cite:`6701851` + and *Signal estimation from modified short-time Fourier transform* :cite:`1172092`. + + Args: + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + n_iter (int, optional): Number of iteration for phase recovery process. (Default: ``32``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + power (float, optional): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. (Default: ``2``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + momentum (float, optional): The momentum parameter for fast Griffin-Lim. + Setting this to 0 recovers the original Griffin-Lim method. + Values near 1 can lead to faster convergence, but above 1 may not converge. (Default: ``0.99``) + length (int, optional): Array length of the expected output. (Default: ``None``) + rand_init (bool, optional): Initializes phase randomly if True and to zero otherwise. (Default: ``True``) + + Example + >>> batch, freq, time = 2, 257, 100 + >>> spectrogram = torch.randn(batch, freq, time) + >>> transform = transforms.GriffinLim(n_fft=512) + >>> waveform = transform(spectrogram) + """ + __constants__ = ["n_fft", "n_iter", "win_length", "hop_length", "power", "length", "momentum", "rand_init"] + + def __init__( + self, + n_fft: int = 400, + n_iter: int = 32, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window_fn: Callable[..., Tensor] = torch.hann_window, + power: float = 2.0, + wkwargs: Optional[dict] = None, + momentum: float = 0.99, + length: Optional[int] = None, + rand_init: bool = True, + ) -> None: + super(GriffinLim, self).__init__() + + if not (0 <= momentum < 1): + raise ValueError("momentum must be in the range [0, 1). Found: {}".format(momentum)) + + self.n_fft = n_fft + self.n_iter = n_iter + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.length = length + self.power = power + self.momentum = momentum + self.rand_init = rand_init + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): + A magnitude-only STFT spectrogram of dimension (..., freq, frames) + where freq is ``n_fft // 2 + 1``. + + Returns: + Tensor: waveform of (..., time), where time equals the ``length`` parameter if given. + """ + return F.griffinlim( + specgram, + self.window, + self.n_fft, + self.hop_length, + self.win_length, + self.power, + self.n_iter, + self.momentum, + self.length, + self.rand_init, + ) + + +class AmplitudeToDB(torch.nn.Module): + r"""Turn a tensor from the power/amplitude scale to the decibel scale. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + This output depends on the maximum value in the input tensor, and so + may return different values for an audio clip split into snippets vs. a + a full clip. + + Args: + stype (str, optional): scale of input tensor (``"power"`` or ``"magnitude"``). The + power being the elementwise square of the magnitude. (Default: ``"power"``) + top_db (float or None, optional): minimum negative cut-off in decibels. A reasonable + number is 80. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.AmplitudeToDB(stype="amplitude", top_db=80) + >>> waveform_db = transform(waveform) + """ + __constants__ = ["multiplier", "amin", "ref_value", "db_multiplier"] + + def __init__(self, stype: str = "power", top_db: Optional[float] = None) -> None: + super(AmplitudeToDB, self).__init__() + self.stype = stype + if top_db is not None and top_db < 0: + raise ValueError("top_db must be positive value") + self.top_db = top_db + self.multiplier = 10.0 if stype == "power" else 20.0 + self.amin = 1e-10 + self.ref_value = 1.0 + self.db_multiplier = math.log10(max(self.amin, self.ref_value)) + + def forward(self, x: Tensor) -> Tensor: + r"""Numerically stable implementation from Librosa. + + https://librosa.org/doc/latest/generated/librosa.amplitude_to_db.html + + Args: + x (Tensor): Input tensor before being converted to decibel scale. + + Returns: + Tensor: Output tensor in decibel scale. + """ + return F.amplitude_to_DB(x, self.multiplier, self.amin, self.db_multiplier, self.top_db) + + +class MelScale(torch.nn.Module): + r"""Turn a normal STFT into a mel frequency STFT with triangular filter banks. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + n_mels (int, optional): Number of mel filterbanks. (Default: ``128``) + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``sample_rate // 2``) + n_stft (int, optional): Number of bins in STFT. See ``n_fft`` in :class:`Spectrogram`. (Default: ``201``) + norm (str or None, optional): If ``"slaney"``, divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> spectrogram_transform = transforms.Spectrogram(n_fft=1024) + >>> spectrogram = spectrogram_transform(waveform) + >>> melscale_transform = transforms.MelScale(sample_rate=sample_rate, n_stft=1024 // 2 + 1) + >>> melscale_spectrogram = melscale_transform(spectrogram) + + See also: + :py:func:`torchaudio.functional.melscale_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["n_mels", "sample_rate", "f_min", "f_max"] + + def __init__( + self, + n_mels: int = 128, + sample_rate: int = 16000, + f_min: float = 0.0, + f_max: Optional[float] = None, + n_stft: int = 201, + norm: Optional[str] = None, + mel_scale: str = "htk", + ) -> None: + super(MelScale, self).__init__() + self.n_mels = n_mels + self.sample_rate = sample_rate + self.f_max = f_max if f_max is not None else float(sample_rate // 2) + self.f_min = f_min + self.norm = norm + self.mel_scale = mel_scale + + if f_min > self.f_max: + raise ValueError("Require f_min: {} <= f_max: {}".format(f_min, self.f_max)) + + fb = F.melscale_fbanks(n_stft, self.f_min, self.f_max, self.n_mels, self.sample_rate, self.norm, self.mel_scale) + self.register_buffer("fb", fb) + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): A spectrogram STFT of dimension (..., freq, time). + + Returns: + Tensor: Mel frequency spectrogram of size (..., ``n_mels``, time). + """ + + # (..., time, freq) dot (freq, n_mels) -> (..., n_mels, time) + mel_specgram = torch.matmul(specgram.transpose(-1, -2), self.fb).transpose(-1, -2) + + return mel_specgram + + +class InverseMelScale(torch.nn.Module): + r"""Estimate a STFT in normal frequency domain from mel frequency domain. + + .. devices:: CPU CUDA + + It minimizes the euclidian norm between the input mel-spectrogram and the product between + the estimated spectrogram and the filter banks using `torch.linalg.lstsq`. + + Args: + n_stft (int): Number of bins in STFT. See ``n_fft`` in :class:`Spectrogram`. + n_mels (int, optional): Number of mel filterbanks. (Default: ``128``) + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``sample_rate // 2``) + norm (str or None, optional): If "slaney", divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + driver (str, optional): Name of the LAPACK/MAGMA method to be used for `torch.lstsq`. + For CPU inputs the valid values are ``"gels"``, ``"gelsy"``, ``"gelsd"``, ``"gelss"``. + For CUDA input, the only valid driver is ``"gels"``, which assumes that A is full-rank. + (Default: ``"gels``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> mel_spectrogram_transform = transforms.MelSpectrogram(sample_rate, n_fft=1024) + >>> mel_spectrogram = mel_spectrogram_transform(waveform) + >>> inverse_melscale_transform = transforms.InverseMelScale(n_stft=1024 // 2 + 1) + >>> spectrogram = inverse_melscale_transform(mel_spectrogram) + """ + __constants__ = [ + "n_stft", + "n_mels", + "sample_rate", + "f_min", + "f_max", + ] + + def __init__( + self, + n_stft: int, + n_mels: int = 128, + sample_rate: int = 16000, + f_min: float = 0.0, + f_max: Optional[float] = None, + norm: Optional[str] = None, + mel_scale: str = "htk", + driver: str = "gels", + ) -> None: + super(InverseMelScale, self).__init__() + self.n_mels = n_mels + self.sample_rate = sample_rate + self.f_max = f_max or float(sample_rate // 2) + self.f_min = f_min + self.driver = driver + + if f_min > self.f_max: + raise ValueError("Require f_min: {} <= f_max: {}".format(f_min, self.f_max)) + + if driver not in ["gels", "gelsy", "gelsd", "gelss"]: + raise ValueError(f'driver must be one of ["gels", "gelsy", "gelsd", "gelss"]. Found {driver}.') + + fb = F.melscale_fbanks(n_stft, self.f_min, self.f_max, self.n_mels, self.sample_rate, norm, mel_scale) + self.register_buffer("fb", fb) + + def forward(self, melspec: Tensor) -> Tensor: + r""" + Args: + melspec (Tensor): A Mel frequency spectrogram of dimension (..., ``n_mels``, time) + + Returns: + Tensor: Linear scale spectrogram of size (..., freq, time) + """ + # pack batch + shape = melspec.size() + melspec = melspec.view(-1, shape[-2], shape[-1]) + + n_mels, time = shape[-2], shape[-1] + freq, _ = self.fb.size() # (freq, n_mels) + if self.n_mels != n_mels: + raise ValueError("Expected an input with {} mel bins. Found: {}".format(self.n_mels, n_mels)) + + specgram = torch.relu(torch.linalg.lstsq(self.fb.transpose(-1, -2)[None], melspec, driver=self.driver).solution) + + # unpack batch + specgram = specgram.view(shape[:-2] + (freq, time)) + return specgram + + +class MelSpectrogram(torch.nn.Module): + r"""Create MelSpectrogram for a raw audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + This is a composition of :py:func:`torchaudio.transforms.Spectrogram` + and :py:func:`torchaudio.transforms.MelScale`. + + Sources + * https://gist.github.com/kastnerkyle/179d6e9a88202ab0a2fe + * https://timsainb.github.io/spectrograms-mfccs-and-inversion-in-python.html + * http://haythamfayek.com/2016/04/21/speech-processing-for-machine-learning.html + + Args: + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``None``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + n_mels (int, optional): Number of mel filterbanks. (Default: ``128``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + power (float, optional): Exponent for the magnitude spectrogram, + (must be > 0) e.g., 1 for magnitude, 2 for power, etc. (Default: ``2``) + normalized (bool, optional): Whether to normalize by magnitude after stft. (Default: ``False``) + wkwargs (Dict[..., ...] or None, optional): Arguments for window function. (Default: ``None``) + center (bool, optional): whether to pad :attr:`waveform` on both sides so + that the :math:`t`-th frame is centered at time :math:`t \times \text{hop\_length}`. + (Default: ``True``) + pad_mode (string, optional): controls the padding method used when + :attr:`center` is ``True``. (Default: ``"reflect"``) + onesided: Deprecated and unused. + norm (str or None, optional): If "slaney", divide the triangular mel weights by the width of the mel band + (area normalization). (Default: ``None``) + mel_scale (str, optional): Scale to use: ``htk`` or ``slaney``. (Default: ``htk``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.MelSpectrogram(sample_rate) + >>> mel_specgram = transform(waveform) # (channel, n_mels, time) + + See also: + :py:func:`torchaudio.functional.melscale_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["sample_rate", "n_fft", "win_length", "hop_length", "pad", "n_mels", "f_min"] + + def __init__( + self, + sample_rate: int = 16000, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + f_min: float = 0.0, + f_max: Optional[float] = None, + pad: int = 0, + n_mels: int = 128, + window_fn: Callable[..., Tensor] = torch.hann_window, + power: float = 2.0, + normalized: bool = False, + wkwargs: Optional[dict] = None, + center: bool = True, + pad_mode: str = "reflect", + onesided: Optional[bool] = None, + norm: Optional[str] = None, + mel_scale: str = "htk", + ) -> None: + super(MelSpectrogram, self).__init__() + torch._C._log_api_usage_once("torchaudio.transforms.MelSpectrogram") + + if onesided is not None: + warnings.warn( + "Argument 'onesided' has been deprecated and has no influence on the behavior of this module." + ) + + self.sample_rate = sample_rate + self.n_fft = n_fft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + self.pad = pad + self.power = power + self.normalized = normalized + self.n_mels = n_mels # number of mel frequency bins + self.f_max = f_max + self.f_min = f_min + self.spectrogram = Spectrogram( + n_fft=self.n_fft, + win_length=self.win_length, + hop_length=self.hop_length, + pad=self.pad, + window_fn=window_fn, + power=self.power, + normalized=self.normalized, + wkwargs=wkwargs, + center=center, + pad_mode=pad_mode, + onesided=True, + ) + self.mel_scale = MelScale( + self.n_mels, self.sample_rate, self.f_min, self.f_max, self.n_fft // 2 + 1, norm, mel_scale + ) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Mel frequency spectrogram of size (..., ``n_mels``, time). + """ + specgram = self.spectrogram(waveform) + mel_specgram = self.mel_scale(specgram) + return mel_specgram + + +class MFCC(torch.nn.Module): + r"""Create the Mel-frequency cepstrum coefficients from an audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + By default, this calculates the MFCC on the DB-scaled Mel spectrogram. + This is not the textbook implementation, but is implemented here to + give consistency with librosa. + + This output depends on the maximum value in the input spectrogram, and so + may return different values for an audio clip split into snippets vs. a + a full clip. + + Args: + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + n_mfcc (int, optional): Number of mfc coefficients to retain. (Default: ``40``) + dct_type (int, optional): type of DCT (discrete cosine transform) to use. (Default: ``2``) + norm (str, optional): norm to use. (Default: ``"ortho"``) + log_mels (bool, optional): whether to use log-mel spectrograms instead of db-scaled. (Default: ``False``) + melkwargs (dict or None, optional): arguments for MelSpectrogram. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.MFCC( + >>> sample_rate=sample_rate, + >>> n_mfcc=13, + >>> melkwargs={"n_fft": 400, "hop_length": 160, "n_mels": 23, "center": False}, + >>> ) + >>> mfcc = transform(waveform) + + See also: + :py:func:`torchaudio.functional.melscale_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["sample_rate", "n_mfcc", "dct_type", "top_db", "log_mels"] + + def __init__( + self, + sample_rate: int = 16000, + n_mfcc: int = 40, + dct_type: int = 2, + norm: str = "ortho", + log_mels: bool = False, + melkwargs: Optional[dict] = None, + ) -> None: + super(MFCC, self).__init__() + supported_dct_types = [2] + if dct_type not in supported_dct_types: + raise ValueError("DCT type not supported: {}".format(dct_type)) + self.sample_rate = sample_rate + self.n_mfcc = n_mfcc + self.dct_type = dct_type + self.norm = norm + self.top_db = 80.0 + self.amplitude_to_DB = AmplitudeToDB("power", self.top_db) + + melkwargs = melkwargs or {} + self.MelSpectrogram = MelSpectrogram(sample_rate=self.sample_rate, **melkwargs) + + if self.n_mfcc > self.MelSpectrogram.n_mels: + raise ValueError("Cannot select more MFCC coefficients than # mel bins") + dct_mat = F.create_dct(self.n_mfcc, self.MelSpectrogram.n_mels, self.norm) + self.register_buffer("dct_mat", dct_mat) + self.log_mels = log_mels + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: specgram_mel_db of size (..., ``n_mfcc``, time). + """ + mel_specgram = self.MelSpectrogram(waveform) + if self.log_mels: + log_offset = 1e-6 + mel_specgram = torch.log(mel_specgram + log_offset) + else: + mel_specgram = self.amplitude_to_DB(mel_specgram) + + # (..., time, n_mels) dot (n_mels, n_mfcc) -> (..., n_nfcc, time) + mfcc = torch.matmul(mel_specgram.transpose(-1, -2), self.dct_mat).transpose(-1, -2) + return mfcc + + +class LFCC(torch.nn.Module): + r"""Create the linear-frequency cepstrum coefficients from an audio signal. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + By default, this calculates the LFCC on the DB-scaled linear filtered spectrogram. + This is not the textbook implementation, but is implemented here to + give consistency with librosa. + + This output depends on the maximum value in the input spectrogram, and so + may return different values for an audio clip split into snippets vs. a + a full clip. + + Args: + sample_rate (int, optional): Sample rate of audio signal. (Default: ``16000``) + n_filter (int, optional): Number of linear filters to apply. (Default: ``128``) + n_lfcc (int, optional): Number of lfc coefficients to retain. (Default: ``40``) + f_min (float, optional): Minimum frequency. (Default: ``0.``) + f_max (float or None, optional): Maximum frequency. (Default: ``None``) + dct_type (int, optional): type of DCT (discrete cosine transform) to use. (Default: ``2``) + norm (str, optional): norm to use. (Default: ``"ortho"``) + log_lf (bool, optional): whether to use log-lf spectrograms instead of db-scaled. (Default: ``False``) + speckwargs (dict or None, optional): arguments for Spectrogram. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.LFCC( + >>> sample_rate=sample_rate, + >>> n_lfcc=13, + >>> speckwargs={"n_fft": 400, "hop_length": 160, "center": False}, + >>> ) + >>> lfcc = transform(waveform) + + See also: + :py:func:`torchaudio.functional.linear_fbanks` - The function used to + generate the filter banks. + """ + __constants__ = ["sample_rate", "n_filter", "n_lfcc", "dct_type", "top_db", "log_lf"] + + def __init__( + self, + sample_rate: int = 16000, + n_filter: int = 128, + f_min: float = 0.0, + f_max: Optional[float] = None, + n_lfcc: int = 40, + dct_type: int = 2, + norm: str = "ortho", + log_lf: bool = False, + speckwargs: Optional[dict] = None, + ) -> None: + super(LFCC, self).__init__() + supported_dct_types = [2] + if dct_type not in supported_dct_types: + raise ValueError("DCT type not supported: {}".format(dct_type)) + self.sample_rate = sample_rate + self.f_min = f_min + self.f_max = f_max if f_max is not None else float(sample_rate // 2) + self.n_filter = n_filter + self.n_lfcc = n_lfcc + self.dct_type = dct_type + self.norm = norm + self.top_db = 80.0 + self.amplitude_to_DB = AmplitudeToDB("power", self.top_db) + + speckwargs = speckwargs or {} + self.Spectrogram = Spectrogram(**speckwargs) + + if self.n_lfcc > self.Spectrogram.n_fft: + raise ValueError("Cannot select more LFCC coefficients than # fft bins") + + filter_mat = F.linear_fbanks( + n_freqs=self.Spectrogram.n_fft // 2 + 1, + f_min=self.f_min, + f_max=self.f_max, + n_filter=self.n_filter, + sample_rate=self.sample_rate, + ) + self.register_buffer("filter_mat", filter_mat) + + dct_mat = F.create_dct(self.n_lfcc, self.n_filter, self.norm) + self.register_buffer("dct_mat", dct_mat) + self.log_lf = log_lf + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Linear Frequency Cepstral Coefficients of size (..., ``n_lfcc``, time). + """ + specgram = self.Spectrogram(waveform) + + # (..., time, freq) dot (freq, n_filter) -> (..., n_filter, time) + specgram = torch.matmul(specgram.transpose(-1, -2), self.filter_mat).transpose(-1, -2) + + if self.log_lf: + log_offset = 1e-6 + specgram = torch.log(specgram + log_offset) + else: + specgram = self.amplitude_to_DB(specgram) + + # (..., time, n_filter) dot (n_filter, n_lfcc) -> (..., n_lfcc, time) + lfcc = torch.matmul(specgram.transpose(-1, -2), self.dct_mat).transpose(-1, -2) + return lfcc + + +class MuLawEncoding(torch.nn.Module): + r"""Encode signal based on mu-law companding. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This algorithm assumes the signal has been scaled to between -1 and 1 and + returns a signal encoded with values from 0 to quantization_channels - 1 + + Args: + quantization_channels (int, optional): Number of channels. (Default: ``256``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = torchaudio.transforms.MuLawEncoding(quantization_channels=512) + >>> mulawtrans = transform(waveform) + + """ + __constants__ = ["quantization_channels"] + + def __init__(self, quantization_channels: int = 256) -> None: + super(MuLawEncoding, self).__init__() + self.quantization_channels = quantization_channels + + def forward(self, x: Tensor) -> Tensor: + r""" + Args: + x (Tensor): A signal to be encoded. + + Returns: + Tensor: An encoded signal. + """ + return F.mu_law_encoding(x, self.quantization_channels) + + +class MuLawDecoding(torch.nn.Module): + r"""Decode mu-law encoded signal. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + For more info see the + `Wikipedia Entry `_ + + This expects an input with values between 0 and ``quantization_channels - 1`` + and returns a signal scaled between -1 and 1. + + Args: + quantization_channels (int, optional): Number of channels. (Default: ``256``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = torchaudio.transforms.MuLawDecoding(quantization_channels=512) + >>> mulawtrans = transform(waveform) + """ + __constants__ = ["quantization_channels"] + + def __init__(self, quantization_channels: int = 256) -> None: + super(MuLawDecoding, self).__init__() + self.quantization_channels = quantization_channels + + def forward(self, x_mu: Tensor) -> Tensor: + r""" + Args: + x_mu (Tensor): A mu-law encoded signal which needs to be decoded. + + Returns: + Tensor: The signal decoded. + """ + return F.mu_law_decoding(x_mu, self.quantization_channels) + + +class Resample(torch.nn.Module): + r"""Resample a signal from one frequency to another. A resampling method can be given. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Note: + If resampling on waveforms of higher precision than float32, there may be a small loss of precision + because the kernel is cached once as float32. If high precision resampling is important for your application, + the functional form will retain higher precision, but run slower because it does not cache the kernel. + Alternatively, you could rewrite a transform that caches a higher precision kernel. + + Args: + orig_freq (int, optional): The original frequency of the signal. (Default: ``16000``) + new_freq (int, optional): The desired frequency. (Default: ``16000``) + resampling_method (str, optional): The resampling method to use. + Options: [``sinc_interp_hann``, ``sinc_interp_kaiser``] (Default: ``"sinc_interp_hann"``) + lowpass_filter_width (int, optional): Controls the sharpness of the filter, more == sharper + but less efficient. (Default: ``6``) + rolloff (float, optional): The roll-off frequency of the filter, as a fraction of the Nyquist. + Lower values reduce anti-aliasing, but also reduce some of the highest frequencies. (Default: ``0.99``) + beta (float or None, optional): The shape parameter used for kaiser window. + dtype (torch.device, optional): + Determnines the precision that resampling kernel is pre-computed and cached. If not provided, + kernel is computed with ``torch.float64`` then cached as ``torch.float32``. + If you need higher precision, provide ``torch.float64``, and the pre-computed kernel is computed and + cached as ``torch.float64``. If you use resample with lower precision, then instead of providing this + providing this argument, please use ``Resample.to(dtype)``, so that the kernel generation is still + carried out on ``torch.float64``. + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Resample(sample_rate, sample_rate/10) + >>> waveform = transform(waveform) + """ + + def __init__( + self, + orig_freq: int = 16000, + new_freq: int = 16000, + resampling_method: str = "sinc_interp_hann", + lowpass_filter_width: int = 6, + rolloff: float = 0.99, + beta: Optional[float] = None, + *, + dtype: Optional[torch.dtype] = None, + ) -> None: + super().__init__() + + self.orig_freq = orig_freq + self.new_freq = new_freq + self.gcd = math.gcd(int(self.orig_freq), int(self.new_freq)) + self.resampling_method = resampling_method + self.lowpass_filter_width = lowpass_filter_width + self.rolloff = rolloff + self.beta = beta + + if self.orig_freq != self.new_freq: + kernel, self.width = _get_sinc_resample_kernel( + self.orig_freq, + self.new_freq, + self.gcd, + self.lowpass_filter_width, + self.rolloff, + self.resampling_method, + beta, + dtype=dtype, + ) + self.register_buffer("kernel", kernel) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension (..., time). + + Returns: + Tensor: Output signal of dimension (..., time). + """ + if self.orig_freq == self.new_freq: + return waveform + return _apply_sinc_resample_kernel(waveform, self.orig_freq, self.new_freq, self.gcd, self.kernel, self.width) + + +class ComputeDeltas(torch.nn.Module): + r"""Compute delta coefficients of a tensor, usually a spectrogram. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + See `torchaudio.functional.compute_deltas` for more details. + + Args: + win_length (int, optional): The window length used for computing delta. (Default: ``5``) + mode (str, optional): Mode parameter passed to padding. (Default: ``"replicate"``) + """ + __constants__ = ["win_length"] + + def __init__(self, win_length: int = 5, mode: str = "replicate") -> None: + super(ComputeDeltas, self).__init__() + self.win_length = win_length + self.mode = mode + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of audio of dimension (..., freq, time). + + Returns: + Tensor: Tensor of deltas of dimension (..., freq, time). + """ + return F.compute_deltas(specgram, win_length=self.win_length, mode=self.mode) + + +class TimeStretch(torch.nn.Module): + r"""Stretch stft in time without modifying pitch for a given rate. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Proposed in *SpecAugment* :cite:`specaugment`. + + Args: + hop_length (int or None, optional): Length of hop between STFT windows. + (Default: ``n_fft // 2``, where ``n_fft == (n_freq - 1) * 2``) + n_freq (int, optional): number of filter banks from stft. (Default: ``201``) + fixed_rate (float or None, optional): rate to speed up or slow down by. + If None is provided, rate must be passed to the forward method. (Default: ``None``) + + .. note:: + + The expected input is raw, complex-valued spectrogram. + + Example + >>> spectrogram = torchaudio.transforms.Spectrogram(power=None) + >>> stretch = torchaudio.transforms.TimeStretch() + >>> + >>> original = spectrogram(waveform) + >>> stretched_1_2 = stretch(original, 1.2) + >>> stretched_0_9 = stretch(original, 0.9) + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_time_stretch.png + :width: 600 + :alt: The visualization of stretched spectrograms. + """ + __constants__ = ["fixed_rate"] + + def __init__(self, hop_length: Optional[int] = None, n_freq: int = 201, fixed_rate: Optional[float] = None) -> None: + super(TimeStretch, self).__init__() + + self.fixed_rate = fixed_rate + + n_fft = (n_freq - 1) * 2 + hop_length = hop_length if hop_length is not None else n_fft // 2 + self.register_buffer("phase_advance", torch.linspace(0, math.pi * hop_length, n_freq)[..., None]) + + def forward(self, complex_specgrams: Tensor, overriding_rate: Optional[float] = None) -> Tensor: + r""" + Args: + complex_specgrams (Tensor): + A tensor of dimension `(..., freq, num_frame)` with complex dtype. + overriding_rate (float or None, optional): speed up to apply to this batch. + If no rate is passed, use ``self.fixed_rate``. (Default: ``None``) + + Returns: + Tensor: + Stretched spectrogram. The resulting tensor is of the corresponding complex dtype + as the input spectrogram, and the number of frames is changed to ``ceil(num_frame / rate)``. + """ + if not torch.is_complex(complex_specgrams): + warnings.warn( + "The input to TimeStretch must be complex type. " + "Providing non-complex tensor produces invalid results.", + stacklevel=4, + ) + + if overriding_rate is None: + if self.fixed_rate is None: + raise ValueError("If no fixed_rate is specified, must pass a valid rate to the forward method.") + rate = self.fixed_rate + else: + rate = overriding_rate + return F.phase_vocoder(complex_specgrams, rate, self.phase_advance) + + +class Fade(torch.nn.Module): + r"""Add a fade in and/or fade out to an waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + fade_in_len (int, optional): Length of fade-in (time frames). (Default: ``0``) + fade_out_len (int, optional): Length of fade-out (time frames). (Default: ``0``) + fade_shape (str, optional): Shape of fade. Must be one of: "quarter_sine", + ``"half_sine"``, ``"linear"``, ``"logarithmic"``, ``"exponential"``. + (Default: ``"linear"``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Fade(fade_in_len=sample_rate, fade_out_len=2 * sample_rate, fade_shape="linear") + >>> faded_waveform = transform(waveform) + """ + + def __init__(self, fade_in_len: int = 0, fade_out_len: int = 0, fade_shape: str = "linear") -> None: + super(Fade, self).__init__() + self.fade_in_len = fade_in_len + self.fade_out_len = fade_out_len + self.fade_shape = fade_shape + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: Tensor of audio of dimension `(..., time)`. + """ + waveform_length = waveform.size()[-1] + device = waveform.device + return self._fade_in(waveform_length, device) * self._fade_out(waveform_length, device) * waveform + + def _fade_in(self, waveform_length: int, device: torch.device) -> Tensor: + fade = torch.linspace(0, 1, self.fade_in_len, device=device) + ones = torch.ones(waveform_length - self.fade_in_len, device=device) + + if self.fade_shape == "linear": + fade = fade + + if self.fade_shape == "exponential": + fade = torch.pow(2, (fade - 1)) * fade + + if self.fade_shape == "logarithmic": + fade = torch.log10(0.1 + fade) + 1 + + if self.fade_shape == "quarter_sine": + fade = torch.sin(fade * math.pi / 2) + + if self.fade_shape == "half_sine": + fade = torch.sin(fade * math.pi - math.pi / 2) / 2 + 0.5 + + return torch.cat((fade, ones)).clamp_(0, 1) + + def _fade_out(self, waveform_length: int, device: torch.device) -> Tensor: + fade = torch.linspace(0, 1, self.fade_out_len, device=device) + ones = torch.ones(waveform_length - self.fade_out_len, device=device) + + if self.fade_shape == "linear": + fade = -fade + 1 + + if self.fade_shape == "exponential": + fade = torch.pow(2, -fade) * (1 - fade) + + if self.fade_shape == "logarithmic": + fade = torch.log10(1.1 - fade) + 1 + + if self.fade_shape == "quarter_sine": + fade = torch.sin(fade * math.pi / 2 + math.pi / 2) + + if self.fade_shape == "half_sine": + fade = torch.sin(fade * math.pi + math.pi / 2) / 2 + 0.5 + + return torch.cat((ones, fade)).clamp_(0, 1) + + +class _AxisMasking(torch.nn.Module): + r"""Apply masking to a spectrogram. + + Args: + mask_param (int): Maximum possible length of the mask. + axis (int): What dimension the mask is applied on (assuming the tensor is 3D). + For frequency masking, axis = 1. + For time masking, axis = 2. + iid_masks (bool): Applies iid masks to each of the examples in the batch dimension. + This option is applicable only when the dimension of the input tensor is >= 3. + p (float, optional): maximum proportion of columns that can be masked. (Default: 1.0) + """ + __constants__ = ["mask_param", "axis", "iid_masks", "p"] + + def __init__(self, mask_param: int, axis: int, iid_masks: bool, p: float = 1.0) -> None: + super(_AxisMasking, self).__init__() + self.mask_param = mask_param + self.axis = axis + self.iid_masks = iid_masks + self.p = p + + def forward(self, specgram: Tensor, mask_value: float = 0.0) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of dimension `(..., freq, time)`. + mask_value (float): Value to assign to the masked columns. + + Returns: + Tensor: Masked spectrogram of dimensions `(..., freq, time)`. + """ + # if iid_masks flag marked and specgram has a batch dimension + # self.axis + specgram.dim() - 3 gives the time/frequency dimension (last two dimensions) + # for input tensor for which the dimension is not 3. + if self.iid_masks: + return F.mask_along_axis_iid( + specgram, self.mask_param, mask_value, self.axis + specgram.dim() - 3, p=self.p + ) + else: + return F.mask_along_axis(specgram, self.mask_param, mask_value, self.axis + specgram.dim() - 3, p=self.p) + + +class FrequencyMasking(_AxisMasking): + r"""Apply masking to a spectrogram in the frequency domain. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Proposed in *SpecAugment* :cite:`specaugment`. + + Args: + freq_mask_param (int): maximum possible length of the mask. + Indices uniformly sampled from [0, freq_mask_param). + iid_masks (bool, optional): whether to apply different masks to each + example/channel in the batch. (Default: ``False``) + This option is applicable only when the input tensor >= 3D. + + Example + >>> spectrogram = torchaudio.transforms.Spectrogram() + >>> masking = torchaudio.transforms.FrequencyMasking(freq_mask_param=80) + >>> + >>> original = spectrogram(waveform) + >>> masked = masking(original) + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_freq_masking1.png + :alt: The original spectrogram + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_freq_masking2.png + :alt: The spectrogram masked along frequency axis + """ + + def __init__(self, freq_mask_param: int, iid_masks: bool = False) -> None: + super(FrequencyMasking, self).__init__(freq_mask_param, 1, iid_masks) + + +class TimeMasking(_AxisMasking): + r"""Apply masking to a spectrogram in the time domain. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Proposed in *SpecAugment* :cite:`specaugment`. + + Args: + time_mask_param (int): maximum possible length of the mask. + Indices uniformly sampled from [0, time_mask_param). + iid_masks (bool, optional): whether to apply different masks to each + example/channel in the batch. (Default: ``False``) + This option is applicable only when the input tensor >= 3D. + p (float, optional): maximum proportion of time steps that can be masked. + Must be within range [0.0, 1.0]. (Default: 1.0) + + Example + >>> spectrogram = torchaudio.transforms.Spectrogram() + >>> masking = torchaudio.transforms.TimeMasking(time_mask_param=80) + >>> + >>> original = spectrogram(waveform) + >>> masked = masking(original) + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_time_masking1.png + :alt: The original spectrogram + + .. image:: https://download.pytorch.org/torchaudio/doc-assets/specaugment_time_masking2.png + :alt: The spectrogram masked along time axis + """ + + def __init__(self, time_mask_param: int, iid_masks: bool = False, p: float = 1.0) -> None: + if not 0.0 <= p <= 1.0: + raise ValueError(f"The value of p must be between 0.0 and 1.0 ({p} given).") + super(TimeMasking, self).__init__(time_mask_param, 2, iid_masks, p=p) + + +class SpecAugment(torch.nn.Module): + r"""Apply time and frequency masking to a spectrogram. + Args: + n_time_masks (int): Number of time masks. If its value is zero, no time masking will be applied. + time_mask_param (int): Maximum possible length of the time mask. + n_freq_masks (int): Number of frequency masks. If its value is zero, no frequency masking will be applied. + freq_mask_param (int): Maximum possible length of the frequency mask. + iid_masks (bool, optional): Applies iid masks to each of the examples in the batch dimension. + This option is applicable only when the input tensor is 4D. (Default: ``True``) + p (float, optional): maximum proportion of time steps that can be masked. + Must be within range [0.0, 1.0]. (Default: 1.0) + zero_masking (bool, optional): If ``True``, use 0 as the mask value, + else use mean of the input tensor. (Default: ``False``) + """ + __constants__ = [ + "n_time_masks", + "time_mask_param", + "n_freq_masks", + "freq_mask_param", + "iid_masks", + "p", + "zero_masking", + ] + + def __init__( + self, + n_time_masks: int, + time_mask_param: int, + n_freq_masks: int, + freq_mask_param: int, + iid_masks: bool = True, + p: float = 1.0, + zero_masking: bool = False, + ) -> None: + super(SpecAugment, self).__init__() + self.n_time_masks = n_time_masks + self.time_mask_param = time_mask_param + self.n_freq_masks = n_freq_masks + self.freq_mask_param = freq_mask_param + self.iid_masks = iid_masks + self.p = p + self.zero_masking = zero_masking + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of shape `(..., freq, time)`. + Returns: + Tensor: Masked spectrogram of shape `(..., freq, time)`. + """ + if self.zero_masking: + mask_value = 0.0 + else: + mask_value = specgram.mean() + time_dim = specgram.dim() - 1 + freq_dim = time_dim - 1 + + if specgram.dim() > 2 and self.iid_masks is True: + for _ in range(self.n_time_masks): + specgram = F.mask_along_axis_iid(specgram, self.time_mask_param, mask_value, time_dim, p=self.p) + for _ in range(self.n_freq_masks): + specgram = F.mask_along_axis_iid(specgram, self.freq_mask_param, mask_value, freq_dim, p=self.p) + else: + for _ in range(self.n_time_masks): + specgram = F.mask_along_axis(specgram, self.time_mask_param, mask_value, time_dim, p=self.p) + for _ in range(self.n_freq_masks): + specgram = F.mask_along_axis(specgram, self.freq_mask_param, mask_value, freq_dim, p=self.p) + + return specgram + + +class Loudness(torch.nn.Module): + r"""Measure audio loudness according to the ITU-R BS.1770-4 recommendation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + sample_rate (int): Sample rate of audio signal. + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Loudness(sample_rate) + >>> loudness = transform(waveform) + + Reference: + - https://www.itu.int/rec/R-REC-BS.1770-4-201510-I/en + """ + __constants__ = ["sample_rate"] + + def __init__(self, sample_rate: int): + super(Loudness, self).__init__() + self.sample_rate = sample_rate + + def forward(self, wavefrom: Tensor): + r""" + Args: + waveform(torch.Tensor): audio waveform of dimension `(..., channels, time)` + + Returns: + Tensor: loudness estimates (LKFS) + """ + return F.loudness(wavefrom, self.sample_rate) + + +class Vol(torch.nn.Module): + r"""Adjust volume of waveform. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + gain (float): Interpreted according to the given gain_type: + If ``gain_type`` = ``amplitude``, ``gain`` is a positive amplitude ratio. + If ``gain_type`` = ``power``, ``gain`` is a power (voltage squared). + If ``gain_type`` = ``db``, ``gain`` is in decibels. + gain_type (str, optional): Type of gain. One of: ``amplitude``, ``power``, ``db`` (Default: ``amplitude``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.Vol(gain=0.5, gain_type="amplitude") + >>> quieter_waveform = transform(waveform) + """ + + def __init__(self, gain: float, gain_type: str = "amplitude"): + super(Vol, self).__init__() + self.gain = gain + self.gain_type = gain_type + + if gain_type in ["amplitude", "power"] and gain < 0: + raise ValueError("If gain_type = amplitude or power, gain must be positive.") + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: Tensor of audio of dimension `(..., time)`. + """ + if self.gain_type == "amplitude": + waveform = waveform * self.gain + + if self.gain_type == "db": + waveform = F.gain(waveform, self.gain) + + if self.gain_type == "power": + waveform = F.gain(waveform, 10 * math.log10(self.gain)) + + return torch.clamp(waveform, -1, 1) + + +class SlidingWindowCmn(torch.nn.Module): + r""" + Apply sliding-window cepstral mean (and optionally variance) normalization per utterance. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + cmn_window (int, optional): Window in frames for running average CMN computation (int, default = 600) + min_cmn_window (int, optional): Minimum CMN window used at start of decoding (adds latency only at start). + Only applicable if center == false, ignored if center==true (int, default = 100) + center (bool, optional): If true, use a window centered on the current frame + (to the extent possible, modulo end effects). If false, window is to the left. (bool, default = false) + norm_vars (bool, optional): If true, normalize variance to one. (bool, default = false) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.SlidingWindowCmn(cmn_window=1000) + >>> cmn_waveform = transform(waveform) + """ + + def __init__( + self, cmn_window: int = 600, min_cmn_window: int = 100, center: bool = False, norm_vars: bool = False + ) -> None: + super().__init__() + self.cmn_window = cmn_window + self.min_cmn_window = min_cmn_window + self.center = center + self.norm_vars = norm_vars + + def forward(self, specgram: Tensor) -> Tensor: + r""" + Args: + specgram (Tensor): Tensor of spectrogram of dimension `(..., time, freq)`. + + Returns: + Tensor: Tensor of spectrogram of dimension `(..., time, freq)`. + """ + cmn_specgram = F.sliding_window_cmn(specgram, self.cmn_window, self.min_cmn_window, self.center, self.norm_vars) + return cmn_specgram + + +class Vad(torch.nn.Module): + r"""Voice Activity Detector. Similar to SoX implementation. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Attempts to trim silence and quiet background sounds from the ends of recordings of speech. + The algorithm currently uses a simple cepstral power measurement to detect voice, + so may be fooled by other things, especially music. + + The effect can trim only from the front of the audio, + so in order to trim from the back, the reverse effect must also be used. + + Args: + sample_rate (int): Sample rate of audio signal. + trigger_level (float, optional): The measurement level used to trigger activity detection. + This may need to be changed depending on the noise level, signal level, + and other characteristics of the input audio. (Default: 7.0) + trigger_time (float, optional): The time constant (in seconds) + used to help ignore short bursts of sound. (Default: 0.25) + search_time (float, optional): The amount of audio (in seconds) + to search for quieter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 1.0) + allowed_gap (float, optional): The allowed gap (in seconds) between + quiteter/shorter bursts of audio to include prior + to the detected trigger point. (Default: 0.25) + pre_trigger_time (float, optional): The amount of audio (in seconds) to preserve + before the trigger point and any found quieter/shorter bursts. (Default: 0.0) + boot_time (float, optional) The algorithm (internally) uses adaptive noise + estimation/reduction in order to detect the start of the wanted audio. + This option sets the time for the initial noise estimate. (Default: 0.35) + noise_up_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is increasing. (Default: 0.1) + noise_down_time (float, optional) Time constant used by the adaptive noise estimator + for when the noise level is decreasing. (Default: 0.01) + noise_reduction_amount (float, optional) Amount of noise reduction to use in + the detection algorithm (e.g. 0, 0.5, ...). (Default: 1.35) + measure_freq (float, optional) Frequency of the algorithm’s + processing/measurements. (Default: 20.0) + measure_duration: (float or None, optional) Measurement duration. + (Default: Twice the measurement period; i.e. with overlap.) + measure_smooth_time (float, optional) Time constant used to smooth + spectral measurements. (Default: 0.4) + hp_filter_freq (float, optional) "Brick-wall" frequency of high-pass filter applied + at the input to the detector algorithm. (Default: 50.0) + lp_filter_freq (float, optional) "Brick-wall" frequency of low-pass filter applied + at the input to the detector algorithm. (Default: 6000.0) + hp_lifter_freq (float, optional) "Brick-wall" frequency of high-pass lifter used + in the detector algorithm. (Default: 150.0) + lp_lifter_freq (float, optional) "Brick-wall" frequency of low-pass lifter used + in the detector algorithm. (Default: 2000.0) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> waveform_reversed, sample_rate = apply_effects_tensor(waveform, sample_rate, [["reverse"]]) + >>> transform = transforms.Vad(sample_rate=sample_rate, trigger_level=7.5) + >>> waveform_reversed_front_trim = transform(waveform_reversed) + >>> waveform_end_trim, sample_rate = apply_effects_tensor( + >>> waveform_reversed_front_trim, sample_rate, [["reverse"]] + >>> ) + + Reference: + - http://sox.sourceforge.net/sox.html + """ + + def __init__( + self, + sample_rate: int, + trigger_level: float = 7.0, + trigger_time: float = 0.25, + search_time: float = 1.0, + allowed_gap: float = 0.25, + pre_trigger_time: float = 0.0, + boot_time: float = 0.35, + noise_up_time: float = 0.1, + noise_down_time: float = 0.01, + noise_reduction_amount: float = 1.35, + measure_freq: float = 20.0, + measure_duration: Optional[float] = None, + measure_smooth_time: float = 0.4, + hp_filter_freq: float = 50.0, + lp_filter_freq: float = 6000.0, + hp_lifter_freq: float = 150.0, + lp_lifter_freq: float = 2000.0, + ) -> None: + super().__init__() + + self.sample_rate = sample_rate + self.trigger_level = trigger_level + self.trigger_time = trigger_time + self.search_time = search_time + self.allowed_gap = allowed_gap + self.pre_trigger_time = pre_trigger_time + self.boot_time = boot_time + self.noise_up_time = noise_up_time + self.noise_down_time = noise_down_time + self.noise_reduction_amount = noise_reduction_amount + self.measure_freq = measure_freq + self.measure_duration = measure_duration + self.measure_smooth_time = measure_smooth_time + self.hp_filter_freq = hp_filter_freq + self.lp_filter_freq = lp_filter_freq + self.hp_lifter_freq = hp_lifter_freq + self.lp_lifter_freq = lp_lifter_freq + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(channels, time)` or `(time)` + Tensor of shape `(channels, time)` is treated as a multi-channel recording + of the same event and the resulting output will be trimmed to the earliest + voice activity in any channel. + """ + return F.vad( + waveform=waveform, + sample_rate=self.sample_rate, + trigger_level=self.trigger_level, + trigger_time=self.trigger_time, + search_time=self.search_time, + allowed_gap=self.allowed_gap, + pre_trigger_time=self.pre_trigger_time, + boot_time=self.boot_time, + noise_up_time=self.noise_up_time, + noise_down_time=self.noise_down_time, + noise_reduction_amount=self.noise_reduction_amount, + measure_freq=self.measure_freq, + measure_duration=self.measure_duration, + measure_smooth_time=self.measure_smooth_time, + hp_filter_freq=self.hp_filter_freq, + lp_filter_freq=self.lp_filter_freq, + hp_lifter_freq=self.hp_lifter_freq, + lp_lifter_freq=self.lp_lifter_freq, + ) + + +class SpectralCentroid(torch.nn.Module): + r"""Compute the spectral centroid for each channel along the time axis. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The spectral centroid is defined as the weighted average of the + frequency values, weighted by their magnitude. + + Args: + sample_rate (int): Sample rate of audio signal. + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins. (Default: ``400``) + win_length (int or None, optional): Window size. (Default: ``n_fft``) + hop_length (int or None, optional): Length of hop between STFT windows. (Default: ``win_length // 2``) + pad (int, optional): Two sided padding of signal. (Default: ``0``) + window_fn (Callable[..., Tensor], optional): A function to create a window tensor + that is applied/multiplied to each frame/window. (Default: ``torch.hann_window``) + wkwargs (dict or None, optional): Arguments for window function. (Default: ``None``) + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.SpectralCentroid(sample_rate) + >>> spectral_centroid = transform(waveform) # (channel, time) + """ + __constants__ = ["sample_rate", "n_fft", "win_length", "hop_length", "pad"] + + def __init__( + self, + sample_rate: int, + n_fft: int = 400, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + pad: int = 0, + window_fn: Callable[..., Tensor] = torch.hann_window, + wkwargs: Optional[dict] = None, + ) -> None: + super(SpectralCentroid, self).__init__() + self.sample_rate = sample_rate + self.n_fft = n_fft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 2 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + self.pad = pad + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: Spectral Centroid of size `(..., time)`. + """ + + return F.spectral_centroid( + waveform, self.sample_rate, self.pad, self.window, self.n_fft, self.hop_length, self.win_length + ) + + +class PitchShift(LazyModuleMixin, torch.nn.Module): + r"""Shift the pitch of a waveform by ``n_steps`` steps. + + .. devices:: CPU CUDA + + .. properties:: TorchScript + + Args: + waveform (Tensor): The input waveform of shape `(..., time)`. + sample_rate (int): Sample rate of `waveform`. + n_steps (int): The (fractional) steps to shift `waveform`. + bins_per_octave (int, optional): The number of steps per octave (Default : ``12``). + n_fft (int, optional): Size of FFT, creates ``n_fft // 2 + 1`` bins (Default: ``512``). + win_length (int or None, optional): Window size. If None, then ``n_fft`` is used. (Default: ``None``). + hop_length (int or None, optional): Length of hop between STFT windows. If None, then ``win_length // 4`` + is used (Default: ``None``). + window (Tensor or None, optional): Window tensor that is applied/multiplied to each frame/window. + If None, then ``torch.hann_window(win_length)`` is used (Default: ``None``). + + Example + >>> waveform, sample_rate = torchaudio.load("test.wav", normalize=True) + >>> transform = transforms.PitchShift(sample_rate, 4) + >>> waveform_shift = transform(waveform) # (channel, time) + """ + __constants__ = ["sample_rate", "n_steps", "bins_per_octave", "n_fft", "win_length", "hop_length"] + + kernel: UninitializedParameter + width: int + + def __init__( + self, + sample_rate: int, + n_steps: int, + bins_per_octave: int = 12, + n_fft: int = 512, + win_length: Optional[int] = None, + hop_length: Optional[int] = None, + window_fn: Callable[..., Tensor] = torch.hann_window, + wkwargs: Optional[dict] = None, + ) -> None: + super().__init__() + self.n_steps = n_steps + self.bins_per_octave = bins_per_octave + self.sample_rate = sample_rate + self.n_fft = n_fft + self.win_length = win_length if win_length is not None else n_fft + self.hop_length = hop_length if hop_length is not None else self.win_length // 4 + window = window_fn(self.win_length) if wkwargs is None else window_fn(self.win_length, **wkwargs) + self.register_buffer("window", window) + rate = 2.0 ** (-float(n_steps) / bins_per_octave) + self.orig_freq = int(sample_rate / rate) + self.gcd = math.gcd(int(self.orig_freq), int(sample_rate)) + + if self.orig_freq != sample_rate: + self.width = -1 + self.kernel = UninitializedParameter(device=None, dtype=None) + + def initialize_parameters(self, input): + if self.has_uninitialized_params(): + if self.orig_freq != self.sample_rate: + with torch.no_grad(): + kernel, self.width = _get_sinc_resample_kernel( + self.orig_freq, + self.sample_rate, + self.gcd, + dtype=input.dtype, + device=input.device, + ) + self.kernel.materialize(kernel.shape) + self.kernel.copy_(kernel) + + def forward(self, waveform: Tensor) -> Tensor: + r""" + Args: + waveform (Tensor): Tensor of audio of dimension `(..., time)`. + + Returns: + Tensor: The pitch-shifted audio of shape `(..., time)`. + """ + shape = waveform.size() + + waveform_stretch = _stretch_waveform( + waveform, + self.n_steps, + self.bins_per_octave, + self.n_fft, + self.win_length, + self.hop_length, + self.window, + ) + + if self.orig_freq != self.sample_rate: + waveform_shift = _apply_sinc_resample_kernel( + waveform_stretch, + self.orig_freq, + self.sample_rate, + self.gcd, + self.kernel, + self.width, + ) + else: + waveform_shift = waveform_stretch + + return _fix_waveform_shape( + waveform_shift, + shape, + ) + + +class RNNTLoss(torch.nn.Module): + """Compute the RNN Transducer loss from *Sequence Transduction with Recurrent Neural Networks* + :cite:`graves2012sequence`. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + The RNN Transducer loss extends the CTC loss by defining a distribution over output + sequences of all lengths, and by jointly modelling both input-output and output-output + dependencies. + + Args: + blank (int, optional): blank label (Default: ``-1``) + clamp (float, optional): clamp for gradients (Default: ``-1``) + reduction (string, optional): Specifies the reduction to apply to the output: + ``"none"`` | ``"mean"`` | ``"sum"``. (Default: ``"mean"``) + fused_log_softmax (bool): set to False if calling log_softmax outside of loss (Default: ``True``) + + Example + >>> # Hypothetical values + >>> logits = torch.tensor([[[[0.1, 0.6, 0.1, 0.1, 0.1], + >>> [0.1, 0.1, 0.6, 0.1, 0.1], + >>> [0.1, 0.1, 0.2, 0.8, 0.1]], + >>> [[0.1, 0.6, 0.1, 0.1, 0.1], + >>> [0.1, 0.1, 0.2, 0.1, 0.1], + >>> [0.7, 0.1, 0.2, 0.1, 0.1]]]], + >>> dtype=torch.float32, + >>> requires_grad=True) + >>> targets = torch.tensor([[1, 2]], dtype=torch.int) + >>> logit_lengths = torch.tensor([2], dtype=torch.int) + >>> target_lengths = torch.tensor([2], dtype=torch.int) + >>> transform = transforms.RNNTLoss(blank=0) + >>> loss = transform(logits, targets, logit_lengths, target_lengths) + >>> loss.backward() + """ + + def __init__( + self, + blank: int = -1, + clamp: float = -1.0, + reduction: str = "mean", + fused_log_softmax: bool = True, + ): + super().__init__() + self.blank = blank + self.clamp = clamp + self.reduction = reduction + self.fused_log_softmax = fused_log_softmax + + def forward( + self, + logits: Tensor, + targets: Tensor, + logit_lengths: Tensor, + target_lengths: Tensor, + ): + """ + Args: + logits (Tensor): Tensor of dimension `(batch, max seq length, max target length + 1, class)` + containing output from joiner + targets (Tensor): Tensor of dimension `(batch, max target length)` containing targets with zero padded + logit_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of each sequence from encoder + target_lengths (Tensor): Tensor of dimension `(batch)` containing lengths of targets for each sequence + Returns: + Tensor: Loss with the reduction option applied. If ``reduction`` is ``"none"``, then size (batch), + otherwise scalar. + """ + return F.rnnt_loss( + logits, + targets, + logit_lengths, + target_lengths, + self.blank, + self.clamp, + self.reduction, + self.fused_log_softmax, + ) + + +class Convolve(torch.nn.Module): + r""" + Convolves inputs along their last dimension using the direct method. + Note that, in contrast to :class:`torch.nn.Conv1d`, which actually applies the valid cross-correlation + operator, this module applies the true `convolution`_ operator. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`, where + `N` and `M` are the trailing dimensions of the two inputs. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + + def __init__(self, mode: str = "full") -> None: + _check_convolve_mode(mode) + + super().__init__() + self.mode = mode + + def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: + r""" + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + """ + return F.convolve(x, y, mode=self.mode) + + +class FFTConvolve(torch.nn.Module): + r""" + Convolves inputs along their last dimension using FFT. For inputs with large last dimensions, this module + is generally much faster than :class:`Convolve`. + Note that, in contrast to :class:`torch.nn.Conv1d`, which actually applies the valid cross-correlation + operator, this module applies the true `convolution`_ operator. + Also note that this module can only output float tensors (int tensor inputs will be cast to float). + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + mode (str, optional): Must be one of ("full", "valid", "same"). + + * "full": Returns the full convolution result, with shape `(..., N + M - 1)`, where + `N` and `M` are the trailing dimensions of the two inputs. (Default) + * "valid": Returns the segment of the full convolution result corresponding to where + the two inputs overlap completely, with shape `(..., max(N, M) - min(N, M) + 1)`. + * "same": Returns the center segment of the full convolution result, with shape `(..., N)`. + + .. _convolution: + https://en.wikipedia.org/wiki/Convolution + """ + + def __init__(self, mode: str = "full") -> None: + _check_convolve_mode(mode) + + super().__init__() + self.mode = mode + + def forward(self, x: torch.Tensor, y: torch.Tensor) -> torch.Tensor: + r""" + Args: + x (torch.Tensor): First convolution operand, with shape `(..., N)`. + y (torch.Tensor): Second convolution operand, with shape `(..., M)` + (leading dimensions must be broadcast-able with those of ``x``). + + Returns: + torch.Tensor: Result of convolving ``x`` and ``y``, with shape `(..., L)`, where + the leading dimensions match those of ``x`` and `L` is dictated by ``mode``. + """ + return F.fftconvolve(x, y, mode=self.mode) + + +def _source_target_sample_rate(orig_freq: int, speed: float) -> Tuple[int, int]: + source_sample_rate = int(speed * orig_freq) + target_sample_rate = int(orig_freq) + gcd = math.gcd(source_sample_rate, target_sample_rate) + return source_sample_rate // gcd, target_sample_rate // gcd + + +class Speed(torch.nn.Module): + r"""Adjusts waveform speed. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + orig_freq (int): Original frequency of the signals in ``waveform``. + factor (float): Factor by which to adjust speed of input. Values greater than 1.0 + compress ``waveform`` in time, whereas values less than 1.0 stretch ``waveform`` in time. + """ + + def __init__(self, orig_freq, factor) -> None: + super().__init__() + + self.orig_freq = orig_freq + self.factor = factor + + self.source_sample_rate, self.target_sample_rate = _source_target_sample_rate(orig_freq, factor) + self.resampler = Resample(orig_freq=self.source_sample_rate, new_freq=self.target_sample_rate) + + def forward(self, waveform, lengths: Optional[torch.Tensor] = None) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: + r""" + Args: + waveform (torch.Tensor): Input signals, with shape `(..., time)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform``, with shape `(...)`. + If ``None``, all elements in ``waveform`` are treated as valid. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor or None): + torch.Tensor + Speed-adjusted waveform, with shape `(..., new_time).` + torch.Tensor or None + If ``lengths`` is not ``None``, valid lengths of signals in speed-adjusted waveform, + with shape `(...)`; otherwise, ``None``. + """ + + if lengths is None: + out_lengths = None + else: + out_lengths = torch.ceil(lengths * self.target_sample_rate / self.source_sample_rate).to(lengths.dtype) + + return self.resampler(waveform), out_lengths + + +class SpeedPerturbation(torch.nn.Module): + r"""Applies the speed perturbation augmentation introduced in + *Audio augmentation for speech recognition* :cite:`ko15_interspeech`. For a given input, + the module samples a speed-up factor from ``factors`` uniformly at random and adjusts + the speed of the input by that factor. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + orig_freq (int): Original frequency of the signals in ``waveform``. + factors (Sequence[float]): Factors by which to adjust speed of input. Values greater than 1.0 + compress ``waveform`` in time, whereas values less than 1.0 stretch ``waveform`` in time. + + Example + >>> speed_perturb = SpeedPerturbation(16000, [0.9, 1.1, 1.0, 1.0, 1.0]) + >>> # waveform speed will be adjusted by factor 0.9 with 20% probability, + >>> # 1.1 with 20% probability, and 1.0 (i.e. kept the same) with 60% probability. + >>> speed_perturbed_waveform = speed_perturb(waveform, lengths) + """ + + def __init__(self, orig_freq: int, factors: Sequence[float]) -> None: + super().__init__() + + self.speeders = torch.nn.ModuleList([Speed(orig_freq=orig_freq, factor=factor) for factor in factors]) + + def forward( + self, waveform: torch.Tensor, lengths: Optional[torch.Tensor] = None + ) -> Tuple[torch.Tensor, Optional[torch.Tensor]]: + r""" + Args: + waveform (torch.Tensor): Input signals, with shape `(..., time)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform``, with shape `(...)`. + If ``None``, all elements in ``waveform`` are treated as valid. (Default: ``None``) + + Returns: + (torch.Tensor, torch.Tensor or None): + torch.Tensor + Speed-adjusted waveform, with shape `(..., new_time).` + torch.Tensor or None + If ``lengths`` is not ``None``, valid lengths of signals in speed-adjusted waveform, + with shape `(...)`; otherwise, ``None``. + """ + + idx = int(torch.randint(len(self.speeders), ())) + # NOTE: we do this because TorchScript doesn't allow for + # indexing ModuleList instances with non-literals. + for speeder_idx, speeder in enumerate(self.speeders): + if idx == speeder_idx: + return speeder(waveform, lengths) + raise RuntimeError("Speeder not found; execution should have never reached here.") + + +class AddNoise(torch.nn.Module): + r"""Scales and adds noise to waveform per signal-to-noise ratio. + See :meth:`torchaudio.functional.add_noise` for more details. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + """ + + def forward( + self, waveform: torch.Tensor, noise: torch.Tensor, snr: torch.Tensor, lengths: Optional[torch.Tensor] = None + ) -> torch.Tensor: + r""" + Args: + waveform (torch.Tensor): Input waveform, with shape `(..., L)`. + noise (torch.Tensor): Noise, with shape `(..., L)` (same shape as ``waveform``). + snr (torch.Tensor): Signal-to-noise ratios in dB, with shape `(...,)`. + lengths (torch.Tensor or None, optional): Valid lengths of signals in ``waveform`` and ``noise``, + with shape `(...,)` (leading dimensions must match those of ``waveform``). If ``None``, all + elements in ``waveform`` and ``noise`` are treated as valid. (Default: ``None``) + + Returns: + torch.Tensor: Result of scaling and adding ``noise`` to ``waveform``, with shape `(..., L)` + (same shape as ``waveform``). + """ + return F.add_noise(waveform, noise, snr, lengths) + + +class Preemphasis(torch.nn.Module): + r"""Pre-emphasizes a waveform along its last dimension. + See :meth:`torchaudio.functional.preemphasis` for more details. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + coeff (float, optional): Pre-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + """ + + def __init__(self, coeff: float = 0.97) -> None: + super().__init__() + self.coeff = coeff + + def forward(self, waveform: torch.Tensor) -> torch.Tensor: + r""" + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + + Returns: + torch.Tensor: Pre-emphasized waveform, with shape `(..., N)`. + """ + return F.preemphasis(waveform, coeff=self.coeff) + + +class Deemphasis(torch.nn.Module): + r"""De-emphasizes a waveform along its last dimension. + See :meth:`torchaudio.functional.deemphasis` for more details. + + .. devices:: CPU CUDA + + .. properties:: Autograd TorchScript + + Args: + coeff (float, optional): De-emphasis coefficient. Typically between 0.0 and 1.0. + (Default: 0.97) + """ + + def __init__(self, coeff: float = 0.97) -> None: + super().__init__() + self.coeff = coeff + + def forward(self, waveform: torch.Tensor) -> torch.Tensor: + r""" + Args: + waveform (torch.Tensor): Waveform, with shape `(..., N)`. + + Returns: + torch.Tensor: De-emphasized waveform, with shape `(..., N)`. + """ + return F.deemphasis(waveform, coeff=self.coeff) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..0aff17a50e2fb49176c884e5d4b11970ae76cbab --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__init__.py @@ -0,0 +1,11 @@ +from torio.utils import ffmpeg_utils + +from . import sox_utils +from .download import download_asset + + +__all__ = [ + "download_asset", + "sox_utils", + "ffmpeg_utils", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b7aa1550fae6787905e0f4b365c1332cb8ed205b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/download.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/download.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9cf95bae4594f84da05ec5f74f798dcc90b05623 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/download.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/ffmpeg_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/ffmpeg_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..978920f13b0a87a4c80c3000ba91865f0d0010ca Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/ffmpeg_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/sox_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/sox_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d9cac7a1e7bdd9dc5cf861a64592876d2feae51a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/__pycache__/sox_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/download.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/download.py new file mode 100644 index 0000000000000000000000000000000000000000..5f62c7ef1f56ba0ee25888e5fc14dcb2c665ba6a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/download.py @@ -0,0 +1,89 @@ +import hashlib +import logging +from os import PathLike +from pathlib import Path +from typing import Union + +import torch +from torchaudio._internal import download_url_to_file + +_LG = logging.getLogger(__name__) + + +def _get_local_path(key): + path = Path(torch.hub.get_dir()) / "torchaudio" / Path(key) + path.parent.mkdir(parents=True, exist_ok=True) + return path + + +def _download(key, path, progress): + url = f"https://download.pytorch.org/torchaudio/{key}" + download_url_to_file(url, path, progress=progress) + + +def _get_hash(path, hash, chunk_size=1028): + m = hashlib.sha256() + with open(path, "rb") as file: + data = file.read(chunk_size) + while data: + m.update(data) + data = file.read(chunk_size) + return m.hexdigest() + + +def download_asset( + key: str, + hash: str = "", + path: Union[str, PathLike] = "", + *, + progress: bool = True, +) -> str: + """Download and store torchaudio assets to local file system. + + If a file exists at the download path, then that path is returned with or without + hash validation. + + Args: + key (str): The asset identifier. + hash (str, optional): + The value of SHA256 hash of the asset. If provided, it is used to verify + the downloaded / cached object. If not provided, then no hash validation + is performed. This means if a file exists at the download path, then the path + is returned as-is without verifying the identity of the file. + path (path-like object, optional): + By default, the downloaded asset is saved in a directory under + :py:func:`torch.hub.get_dir` and intermediate directories based on the given `key` + are created. + This argument can be used to overwrite the target location. + When this argument is provided, all the intermediate directories have to be + created beforehand. + progress (bool): Whether to show progress bar for downloading. Default: ``True``. + + Note: + Currently the valid key values are the route on ``download.pytorch.org/torchaudio``, + but this is an implementation detail. + + Returns: + str: The path to the asset on the local file system. + """ + path = path or _get_local_path(key) + + if path.exists(): + _LG.info("The local file (%s) exists. Skipping the download.", path) + else: + _LG.info("Downloading %s to %s", key, path) + _download(key, path, progress=progress) + + if hash: + _LG.info("Verifying the hash value.") + digest = _get_hash(path, hash) + + if digest != hash: + raise ValueError( + f"The hash value of the downloaded file ({path}), '{digest}' does not match " + f"the provided hash value, '{hash}'." + ) + + _LG.info("Hash validated.") + + return str(path) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/ffmpeg_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/ffmpeg_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8a4bb3c4e3b621ff7b48062d1c4d3374a4459c90 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/ffmpeg_utils.py @@ -0,0 +1,11 @@ +"""Module to change the configuration of FFmpeg libraries (such as libavformat). + +It affects functionalities in :py:mod:`torchaudio.io` (and indirectly :py:func:`torchaudio.load`). +""" + + +# This file is just for BC. +def __getattr__(item): + from torio.utils import ffmpeg_utils + + return getattr(ffmpeg_utils, item) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/sox_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/sox_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..8975b4216f54e3ece63483bf91b49f10385f5785 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchaudio/utils/sox_utils.py @@ -0,0 +1,99 @@ +"""Module to change the configuration of libsox, which is used by I/O functions like +:py:mod:`~torchaudio.backend.sox_io_backend` and :py:mod:`~torchaudio.sox_effects`. +""" + +from typing import Dict, List + +import torchaudio + +sox_ext = torchaudio._extension.lazy_import_sox_ext() + + +def set_seed(seed: int): + """Set libsox's PRNG + + Args: + seed (int): seed value. valid range is int32. + + See Also: + http://sox.sourceforge.net/sox.html + """ + sox_ext.set_seed(seed) + + +def set_verbosity(verbosity: int): + """Set libsox's verbosity + + Args: + verbosity (int): Set verbosity level of libsox. + + * ``1`` failure messages + * ``2`` warnings + * ``3`` details of processing + * ``4``-``6`` increasing levels of debug messages + + See Also: + http://sox.sourceforge.net/sox.html + """ + sox_ext.set_verbosity(verbosity) + + +def set_buffer_size(buffer_size: int): + """Set buffer size for sox effect chain + + Args: + buffer_size (int): Set the size in bytes of the buffers used for processing audio. + + See Also: + http://sox.sourceforge.net/sox.html + """ + sox_ext.set_buffer_size(buffer_size) + + +def set_use_threads(use_threads: bool): + """Set multithread option for sox effect chain + + Args: + use_threads (bool): When ``True``, enables ``libsox``'s parallel effects channels processing. + To use mutlithread, the underlying ``libsox`` has to be compiled with OpenMP support. + + See Also: + http://sox.sourceforge.net/sox.html + """ + sox_ext.set_use_threads(use_threads) + + +def list_effects() -> Dict[str, str]: + """List the available sox effect names + + Returns: + Dict[str, str]: Mapping from ``effect name`` to ``usage`` + """ + return dict(sox_ext.list_effects()) + + +def list_read_formats() -> List[str]: + """List the supported audio formats for read + + Returns: + List[str]: List of supported audio formats + """ + return sox_ext.list_read_formats() + + +def list_write_formats() -> List[str]: + """List the supported audio formats for write + + Returns: + List[str]: List of supported audio formats + """ + return sox_ext.list_write_formats() + + +def get_buffer_size() -> int: + """Get buffer size for sox effect chain + + Returns: + int: size in bytes of buffers used for processing audio. + """ + return sox_ext.get_buffer_size() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9f4231151684cbbdc943099712e3f7ed89cf22e4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/code_template.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/code_template.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a67e666757c7ccd166fdaa2a7d98b65e1545d82 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/code_template.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/context.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/context.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1e98d829aa7039836741b06f274391ac740bb17 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/context.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_aoti_c_shim.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_aoti_c_shim.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1cd20273cd3bd4f3c24e568349c12489997f37a8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_aoti_c_shim.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_backend_stubs.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_backend_stubs.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c78c534d49730238146b641d100a77fb1ca8cf8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_backend_stubs.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_executorch.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_executorch.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f1386f204b0b5f4b09d44facbaff704584b2edfa Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_executorch.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_functionalization_type.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_functionalization_type.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..400ca0c735b889170e5025610fe431a3b1200017 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_functionalization_type.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_lazy_tensor.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_lazy_tensor.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4f5d6d76f67e6f0a949e0f118de670b6e46b6163 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_lazy_tensor.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_schema_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_schema_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c49c62056ca896479e9d28640f38abf4411104e2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_schema_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_vmap_plumbing.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_vmap_plumbing.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4657c66ac05e043b4717f6c820c2eddf90ef765 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/gen_vmap_plumbing.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/local.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/local.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6b0aa8c177e75363ff2d6143191b493300c5e90 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/local.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/native_function_generation.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/native_function_generation.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d2e8da2b0925e78789aee6a4350449f973f51f27 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/native_function_generation.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f82cfb3b9ea0467d0c24d0f708e2ecdd19b377bd Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/yaml_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/yaml_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e14ec7837399e82c5dae44f3607e40a4366d783c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/__pycache__/yaml_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..785d5b42dafe0720ceb8578fd40a725d4756d08f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__pycache__/fallback_ops.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__pycache__/fallback_ops.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e08b585992eb7b9fcdc085a0e04c2c7b498dc1c4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/__pycache__/fallback_ops.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/fallback_ops.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/fallback_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..edb4db1f4adf8aa834b0a2b2b78ea7872f2a742a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/aoti/fallback_ops.py @@ -0,0 +1,156 @@ +# Be extra careful when you edit this file, because it affects AOTInductor ABI compatbility. See +# https://github.com/pytorch/pytorch/blob/7e86a7c0155295539996e0cf422883571126073e/torchgen/gen.py#L2424-L2436 +# for details. +# +# The inductor_fallback_ops list is based on the fallback ops from torch/_inductor/lowering.py. +# Generally speaking, it is ok to add a new op to the list, but you need to run +# `python torchgen/gen.py --update-aoti-c-shim` in order to regenerate C shim header files. +# But it is NOT ok to remove an existing fallback op from the list, since that will break +# some existing AOTInductor-compiled models. +inductor_fallback_ops = { + "aten._adaptive_avg_pool2d_backward.default", + "aten._adaptive_avg_pool2d.default", + "aten._adaptive_avg_pool3d.default", + "aten._adaptive_avg_pool3d_backward.default", + "aten.adaptive_max_pool2d_backward.default", + "aten.adaptive_max_pool2d.default", + "aten.adaptive_max_pool3d.default", + "aten.adaptive_max_pool3d_backward.default", + "aten.add.Scalar", + "aten.add.Tensor", + "aten.addbmm.default", + "aten._addmm_activation.default", + "aten.addmm.out", + "aten.addmv.default", + "aten.angle.default", + "aten.avg_pool2d_backward.default", + "aten.avg_pool2d.default", + "aten.avg_pool3d_backward.default", + "aten.avg_pool3d.default", + "aten.baddbmm.out", + "aten.bernoulli_.float", + "aten.bernoulli_.Tensor", + "aten.bmm.out", + "aten.bucketize.Tensor", + "aten.cat.default", + "aten._cdist_backward.default", + "aten._cdist_forward.default", + "aten.cholesky_inverse.default", + "aten.cholesky_solve.default", + "aten.convolution_backward.default", + "aten._cudnn_rnn.default", + "aten._cudnn_rnn_backward.default", + "aten.convolution.default", + "aten.cummax.default", + "aten.cummin.default", + "aten.cumprod.default", + "aten.cumsum.default", + "aten._efficient_attention_backward.default", + "aten._efficient_attention_forward.default", + "aten._efficientzerotensor.default", + "aten._embedding_bag.default", + "aten._embedding_bag_dense_backward.default", + "aten._embedding_bag_forward_only.default", + "aten._embedding_bag_per_sample_weights_backward.default", + "aten.exponential.default", + "aten._fft_c2c.default", + "aten._fft_r2c.default", + "aten._flash_attention_backward.default", + "aten._flash_attention_forward.default", + "aten.fractional_max_pool2d_backward.default", + "aten.fractional_max_pool2d.default", + "aten.fractional_max_pool3d.default", + "aten.fractional_max_pool3d_backward.default", + "aten._fused_moving_avg_obs_fq_helper.default", + "aten._fused_moving_avg_obs_fq_helper_functional.default", + "aten.gcd.default", + "aten.geqrf.default", + "aten.grid_sampler_2d_backward.default", + "aten.histc.default", + "aten.histogram.bin_ct", + "aten._histogramdd_bin_edges.default", + "aten._histogramdd_from_bin_cts.default", + "aten.index_put.default", + "aten.index_reduce.default", + "aten.index.Tensor", + "aten.kthvalue.default", + "aten.logcumsumexp.default", + "aten.lu_unpack.default", + "aten.masked_select.default", + "aten.masked_scatter.default", + "aten.masked_scatter_backward.default", + "aten.max_pool2d_with_indices_backward.default", + "aten.max_pool2d_with_indices.default", + "aten.max_pool3d_with_indices.default", + "aten.max_pool3d_with_indices_backward.default", + "aten.max_unpool2d.default", + "aten.max_unpool3d.default", + "aten.median.default", + "aten.mm.out", + "aten.mode.default", + "aten.mul.Scalar", + "aten.mul.Tensor", + "aten.nanmedian.default", + "aten.native_dropout.default", + "aten.normal_functional.default", + "aten.nonzero.default", + "aten.ormqr.default", + "aten._pdist_backward.default", + "aten._pdist_forward.default", + "aten.polar.default", + "aten.pow.Scalar", + "aten.pow.Tensor_Scalar", + "aten.pow.Tensor_Tensor", + "aten.rand.default", + "aten.rand.generator", + "aten.randint.default", + "aten.randint.generator", + "aten.randint.low", + "aten.randint.low_out", + "aten.randn.default", + "aten.randn.generator", + "aten.randperm.default", + "aten.repeat_interleave.Tensor", + "aten.replication_pad1d_backward.default", + "aten.replication_pad2d_backward.default", + "aten.reshape.default", + "aten.resize_.default", + "aten.resize_as_.default", + "aten._scaled_dot_product_efficient_attention_backward.default", + "aten._scaled_dot_product_efficient_attention.default", + "aten._scaled_dot_product_flash_attention_backward.default", + "aten._scaled_dot_product_flash_attention.default", + "aten._scaled_dot_product_cudnn_attention_backward.default", + "aten._scaled_dot_product_cudnn_attention.default", + "aten._scaled_dot_product_flash_attention_for_cpu_backward.default", + "aten._scaled_dot_product_flash_attention_for_cpu.default", + "aten._scaled_mm.default", + "aten._scaled_mm.out", + "aten.scatter_reduce.two_out", + "aten.scatter.src_out", + "aten.scatter.value_out", + "aten.searchsorted.Scalar", + "aten.searchsorted.Tensor", + "aten._segment_reduce_backward.default", + "aten.segment_reduce.default", + "aten.slice.Tensor", + "aten.soft_margin_loss_backward.default", + "aten.sort.default", + "aten.sort.stable", + "aten._sparse_coo_tensor_with_dims_and_tensors.default", + "aten._thnn_fused_lstm_cell.default", + "aten.topk.default", + "aten._to_sparse.default", + "aten.to_sparse.default", + "aten.triangular_solve.default", + "aten._trilinear.default", + "aten.uniform.default", + "aten.upsample_bicubic2d_backward.default", + "aten.upsample_linear1d_backward.default", + "aten.upsample_trilinear3d_backward.default", + "aten.view_as_complex.default", + "aten.view_as_real.default", + "aten.view.dtype", + "aten._weight_int8pack_mm.default", + "aten.zeros.names", +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1f516d7229f691ebecc8ba61638af3a8d65809e7 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/autograd.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/autograd.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d6b4d2baa5766d4ed6eeed093e7d365bc4d78e71 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/autograd.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/cpp.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/cpp.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bbacf943f71fef5c88510c11f2048c98a2593b68 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/cpp.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/dispatcher.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/dispatcher.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a9141645186354df62613e4f13f4f6a10e6b5339 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/dispatcher.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/functionalization.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/functionalization.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9abad571228578559f94a1d328b1a0a939a4294f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/functionalization.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/lazy.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/lazy.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d22fc3b786622e46ec4691fb2225cfad472fed1d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/lazy.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/meta.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/meta.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b5040a4655868962ac262f7c18cdb747797e02f4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/meta.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/native.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/native.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..633c8c2660f27cdc41c233f007f4feff320287fd Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/native.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/python.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/python.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c9f5ae3f06cf242215683416ad225e1f18783795 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/python.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/structured.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/structured.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d773b4eaa10513649b9e063a617b5da1d9c5e7e7 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/structured.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/translate.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/translate.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..410b2109ed5e1e907198b249e242414df7216eb9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/translate.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/ufunc.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/ufunc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8b91756cfaa0f1626fb91f8b8efe5871a28fe8aa Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/ufunc.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/unboxing.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/unboxing.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16a45dea3ed16f48407e58020872dadb09859f31 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/__pycache__/unboxing.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/autograd.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..bb1caeab6464f00015bd6f5c82a7c5871eb4a3b1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/autograd.py @@ -0,0 +1,874 @@ +from __future__ import annotations + +import re +from dataclasses import dataclass +from typing import cast, TYPE_CHECKING + +from torchgen import local +from torchgen.api import cpp +from torchgen.api.types import BaseCType, Binding, NamedCType, tensorListT +from torchgen.model import ( + BaseTy, + BaseType, + FunctionSchema, + ListType, + NativeFunction, + NativeFunctionsViewGroup, + SchemaKind, + Type, +) +from torchgen.utils import IDENT_REGEX + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +# Represents a saved attribute involved in backward calculation. +# Note that it can be a derived property of an input argument, e.g.: +# we could save `other.scalar_type()` instead of the entire `other` tensor. +@dataclass(frozen=True) +class SavedAttribute: + # The NamedCType holds the updated name and cpp type of the attribute + # for the name, Suffix is appended if it's derived property, e.g.: `other_scalar_type` + nctype: NamedCType + + # The expression to read the derived property at save time, e.g.: + # `other.scalar_type()`. + expr: str + + +# Represents a backward formula that calculates derivatives for one +# or more tensors. +@dataclass(frozen=True) +class Derivative: + # The formula string (legit C++ expression). + # Note that expressions against input arguments have been replaced with the + # corresponding saved attributes. + # E.g.: + # raw formula: `mul_tensor_backward(grad, self, other.scalar_type())` + # here: `mul_tensor_backward(grad, self, other_scalar_type)` + formula: str + + # The formula string before input argument replacement + original_formula: str + + # Names of the arguments for which this formula calculates derivatives. + var_names: tuple[str, ...] + + # Saved inputs that are referenced by the formula. + saved_inputs: tuple[SavedAttribute, ...] + + # Saved outputs that are referenced by the formula. + saved_outputs: tuple[SavedAttribute, ...] + + # Gradients that are referenced by name in the formula. + named_gradients: set[str] + + +# Represents a forward formula that calculates forward derivatives +# for one tensor. +@dataclass(frozen=True) +class ForwardDerivative: + # The formula string (legit C++ expression). + # Note that special keywords such as "linear" or "element_wise" have been + # replaced by the automatically generated formula. + formula: str + + # Name of the output arguments for which this formula calculates forward + # derivatives + var_names: tuple[str, ...] + + # Type of the output arguments for which this formula calculates forward + # derivatives + var_types: tuple[Type, ...] + + # Inputs for which the forward derivatives are required for this formula + required_inputs_fw_grad: tuple[str, ...] | None + + # Inputs for which the primal is required for this formula + required_inputs_primal: tuple[str, ...] | None + + # Flag to specify if this formula requires the original value of self + # This is only used by inplace operations + required_original_self_value: bool + + # If this formula is specified in derivatives.yaml or if we are re-using the + # out of place formula for inplace + is_reusing_outplace_formula: bool + + +# Represents differentiability info for a NativeFunction. +@dataclass(frozen=True) +class DifferentiabilityInfo: + # The base name read from derivatives.yaml. + name: str + + # The matching native function. + # + # There can be multiple NativeFunction having the same base name: + # - different overloads with different types of input arguments; + # - in-place/out/functional variants of the same function; + # + # We first use the schema string (under the 'name' key) in derivatives.yaml + # to find the NativeFunction having the same schema string. + # Then we find the in-place/out/functional variants of the matching function. + # Among these variants, we choose the one having the same name as the + # derivatives.yaml entry. If there is no exact match, then we choose the + # in-place variant. + # TODO: maybe the logic to search for all variants is no longer necessary? + func: NativeFunction + + # The name of the generated autograd function. + # It's set only if we will calculate a derivative, i.e. + # 'args_with_derivatives' is not empty. + op: str | None + + # The derivatives formulae for this function. + # Note that the length of this sequence is the number of differentiable inputs + derivatives: Sequence[Derivative] + + # The forward derivatives formulae for this function. + # Note that the length of this sequence is the number of differentiable outputs + forward_derivatives: Sequence[ForwardDerivative] + + # The union of 'saved_inputs' of all 'derivatives'. + all_saved_inputs: Sequence[SavedAttribute] + + # The union of 'saved_outputs' of all 'derivatives'. + all_saved_outputs: Sequence[SavedAttribute] + + # All named gradients that are available for use, in the same + # order as in the grads vector. + available_named_gradients: Sequence[str] + + # The named gradients that are used in any of the derivatives. + # Invariant: all(name in available_named_gradients for name in used_named_gradients) + used_named_gradients: set[str] + + # The function's input arguments for which it calculates derivatives. + # It's the union of 'var_names' of all 'derivatives', sorted by the + # argument order in the function schema. + args_with_derivatives: Sequence[Binding] + + # Names of arguments whose derivative formula is 'non_differentiable'. + non_differentiable_arg_names: Sequence[str] + + # Raw data read from derivatives.yaml. + output_differentiability: list[bool] | None + + # output_differentiability in derivatives.yaml can be a list of + # conditions that express if the output is differentiable. In this case, + # the number of conditions must match the number of outputs + # (NB: we only support one condition right now). + # output_differentiability gets populated with True for each condition, + # while output_differentiability_conditions gets populated with the conditions + output_differentiability_conditions: list[str] | None + + @property + def has_derivatives(self) -> bool: + return len(self.args_with_derivatives) > 0 + + # Generates a new DifferentiabilityInfo using the exact same set of derivative information, + # but with a new operator name. + # This is used when generating "copy" variants of view ops, + # which are able to use the exact same derivative formula as the original view op + # See Note [Codegen'd {view}_copy Operators] + def create_view_copy_from_view_derivative( + self, g: NativeFunctionsViewGroup + ) -> DifferentiabilityInfo | None: + if g.view_copy is None: + return None + f = g.view_copy + + name_split_by_period = self.name.split(".", maxsplit=2) + # Append a "_copy" to the base name of the operator (but keep the overload name the same) + view_copy_name = f"{name_split_by_period[0]}_copy." + ".".join( + name_split_by_period[1:] + ) + view_copy_op_name = None if self.op is None else f"{self.op}_copy" + + return DifferentiabilityInfo( + # Use the "_copy" version of name/func/op + name=view_copy_name, + func=f, + op=view_copy_op_name, + # But keep all derivative info the same + derivatives=self.derivatives, + forward_derivatives=self.forward_derivatives, + all_saved_inputs=self.all_saved_inputs, + all_saved_outputs=self.all_saved_outputs, + available_named_gradients=self.available_named_gradients, + used_named_gradients=self.used_named_gradients, + args_with_derivatives=self.args_with_derivatives, + non_differentiable_arg_names=self.non_differentiable_arg_names, + output_differentiability=self.output_differentiability, + output_differentiability_conditions=self.output_differentiability_conditions, + ) + + +def uses_ident(info: DifferentiabilityInfo | None, ident: str) -> bool: + if info is None: + return False + for derivative in info.derivatives: + formula = derivative.formula + if re.search(IDENT_REGEX.format(ident), formula): + return True + return False + + +def uses_retain_variables(info: DifferentiabilityInfo | None) -> bool: + return uses_ident(info, "retain_variables") + + +def uses_single_grad(info: DifferentiabilityInfo | None) -> bool: + return uses_ident(info, "grad") + + +# Represents a differentiable `Argument`. +# How is it different from the `Argument` type? +# - It's processed Arguments which are differentiable and only used in the +# context of the autograd codegen; +# - It can represent SelfArgument or regular Argument but not TensorOptionsArgument; +@dataclass(frozen=True) +class DifferentiableInput: + name: str + type: Type + + # TODO: only to keep it byte-for-byte compatible with the old codegen, should remove. + cpp_type: str + + +# Represents a differentiable `Return`. +# How it it different from the `Return` type? +# - The name in `Return` is optional. Here it is always populated using the same +# `cpp.return_names()` method. +# TODO: some cpp naming logic (e.g. resolving name conflict) might be irrelevant? +# - It's processed Returns which are differentiable, in compliance with the +# `output_differentiability` field defined in derivatives.yaml (if specified), +# and are only used in the context of the autograd codegen; +@dataclass(frozen=True) +class DifferentiableOutput: + name: str + type: Type + + # TODO: only to keep it byte-for-byte compatible with the old codegen, should remove. + cpp_type: str + + +@dataclass(frozen=True) +class NativeFunctionWithDifferentiabilityInfo: + func: NativeFunction + info: dict[str, DifferentiabilityInfo] | None + fw_derivatives: dict[str, Sequence[ForwardDerivative]] | None + + +# TODO: Update comment below since it is out of date. +def dispatch_strategy(fn: NativeFunctionWithDifferentiabilityInfo) -> str: + """How are we going to call the underlying implementation of a + declaration? There are two strategies: + - use_derived: we want to call the implementation on CPUDoubleType + (or a similar, derived Type instance). Because these derived + instances deal in Tensors, not Variables (it's a completely different + object, so it doesn't dispatch back to VariableType), code on + this dispatch path needs to wrap/unwrap tensors. If the + derived implementation takes and returns tensors, the + implementation is usually differentiable (although we also use + the derived dispatch path for non-differentiable functions + that we still want to dispatch on the derived Type instance; + e.g., size()) + - use_type: we want to call the implementation on Type, because + it is implemented concretely, and the functions it invokes will + get dispatched back to VariableType (which will ensure that they + are differentiable.) + """ + # fn is derived as long as any of its per-key differentiability infos + # has_derivatives. dispatch_strategy() is used to guard generation of fns in VariableType + # and ADInplaceOrViewType. We want to generate these functions as long as a + # derivative is defined for ANY dispatch key. + if fn.func.is_abstract or ( + fn.info is not None and any(info.has_derivatives for info in fn.info.values()) + ): + # If the function is abstract (not implemented on at::Type), we must + # call the implementation on the derived type with unpacked tensors. + + # If the function has a derivative specified and is concrete, we could + # call either implementation. We prefer the calling the derived + # type's implementation with unpacked tensors because it is more + # performant in some cases: any internal calls to other ATen functions + # won't have the history tracked. + + # If the function has a type dispatched argument (i.e. is a factory), + # we prefer calling the derived type's implementation both because it is + # more performant and to ensure factory functions return tensors with _version + # of 0 (probably not strictly necessary, but nice to have to keeps versions simple + # to understand. + + return "use_derived" + else: + # If the function is concrete (we don't have to override it) and we + # didn't declare it in derivatives.yaml, we'll assume that it is + # actually implemented out of differentiable functions. (This + # assumption might not hold, but then you'll see gradcheck fail.) + return "use_type" + + +def is_foreach_func(f: NativeFunction) -> bool: + return f.func.name.name.base.startswith("_foreach_") + + +# note(crcrpar): Most foreach functions can reference an out-place `torch` function whose schema kind +# is functional for their backward derivatives (and forward derivatives in the future), i.e., +# they would find such one in `functional_info_by_signature`. There however are some exceptions: +_foreach_with_inplace_ref = {"_foreach_zero_"} +_foreach_with_tensor_overload = { + "_foreach_add.Tensor", + "_foreach_mul.Tensor", + "_foreach_div.Tensor", +} +# The following do not support the alpha kwarg, which the nonforeach versions support. +_skip_argument_len_check = { + "_foreach_add.Scalar", + "_foreach_add_.Scalar", + "_foreach_add.ScalarList", + "_foreach_add_.ScalarList", + "_foreach_sub.Scalar", + "_foreach_sub_.Scalar", + "_foreach_sub.ScalarList", + "_foreach_sub_.ScalarList", +} + + +# Checks if `function_schema` is a native, non-foreach function which `f`, a foreach function +# reference to generate derivatives. +def is_reference_for_foreach( + f: NativeFunction, + function_schema: FunctionSchema, +) -> bool: + return ( + f.func.name.name.base.split("_foreach_")[-1] == function_schema.name.name.base + and ( + not function_schema.name.name.inplace + or str(f.func.name) in _foreach_with_inplace_ref + ) + and ( + str(f.func.name) in _skip_argument_len_check + or len(f.func.arguments.flat_non_out) + == len(function_schema.arguments.flat_non_out) + ) + and all( + ref_arg.type in (arg.type, getattr(arg.type, "elem", None)) + for arg, ref_arg in zip( + f.func.arguments.flat_non_out, + function_schema.arguments.flat_non_out, + ) + ) + ) + + +# TODO(crcrpar): Avoid hard coding "Default" ideally. +def gen_foreach_derivativeinfo( + foreach_function: NativeFunction, + functional_info_by_signature: dict[ + FunctionSchema, dict[str, DifferentiabilityInfo] + ], + non_functional_info_by_signature: dict[ + FunctionSchema, dict[str, DifferentiabilityInfo] + ], + dispatch_key: str = "Default", +) -> tuple[DifferentiabilityInfo | None, bool]: + """Generate DifferentiabilityInfo for out-place foreach function, return the existing one for in-place. + + The second return value indicates whether the info is generated in this function. + """ + ref_diff_info: DifferentiabilityInfo | None = None + + for function_schema, diff_info in functional_info_by_signature.items(): + if not is_reference_for_foreach(foreach_function, function_schema): + continue + ref_diff_info = diff_info[dispatch_key] + if ref_diff_info is not None: + break + # note(crcrpar): It seems like `zero`'s info isn't available in functional_info_by_signature + # while the info of `zero_` is in non_functional_info_by_signature + if ( + ref_diff_info is None + and foreach_function.func.kind() == SchemaKind.inplace + and str(foreach_function.func.name) in _foreach_with_inplace_ref + ): + for function_schema, diff_info in non_functional_info_by_signature.items(): + if not is_reference_for_foreach(foreach_function, function_schema): + continue + ref_diff_info = diff_info[dispatch_key] + if ref_diff_info is not None: + break + if ref_diff_info is None: + return None, False + + # non out-place uses the existing Derivative. + if foreach_function.func.kind() == SchemaKind.inplace: + return ref_diff_info, False + + map_refarg2foreacharg, map_name2arg = {}, {} + for i, (arg, ref_arg) in enumerate( + zip( + foreach_function.func.arguments.flat_non_out, + function_schema.arguments.flat_non_out, + ) + ): + map_refarg2foreacharg[ref_arg.name] = arg.name + map_name2arg[arg.name] = arg + + all_saved_inputs, all_saved_outputs, all_var_names = [], [], [] + modified_derivative_formulas = [] + for i, derivative in enumerate(ref_diff_info.derivatives): + modified_formula = derivative.formula.replace("grad", "grads[i]").replace( + "result", "result[i]" + ) + saved_inputs, saved_outputs = [], [] + # note(crcrpar): This context seems necessary to call `cpp.argument_type` + with local.parametrize( + use_const_ref_for_mutable_tensors=foreach_function.use_const_ref_for_mutable_tensors, + use_ilistref_for_tensor_lists=foreach_function.part_of_structured_group, + ): + for ref_input in derivative.saved_inputs: + ref_input_jit_name = ref_input.expr.split(".")[0] + mapped_name = map_refarg2foreacharg[ref_input_jit_name] + if isinstance(map_name2arg[mapped_name].type, ListType): + mapped_expr = mapped_name + "[i]" + else: + mapped_expr = mapped_name + new_expr = ref_input.expr.replace(ref_input_jit_name, mapped_expr) + modified_formula = modified_formula.replace( + cast(str, ref_input.nctype.name), new_expr + ) + + nctype = cpp.argument_type(map_name2arg[mapped_name], binds=mapped_name) + canonical_nctype = NamedCType( + nctype.name, nctype.type.remove_const_ref() + ) + saved_inputs.append( + SavedAttribute(nctype=canonical_nctype, expr=mapped_name) + ) + for ref_output in derivative.saved_outputs: + if ref_output.nctype.name == "result": + saved_outputs.append( + SavedAttribute( + nctype=NamedCType( + name="result", type=BaseCType(tensorListT) + ), + expr="result", + ) + ) + else: + raise RuntimeError("") + var_names = [map_refarg2foreacharg[var] for var in derivative.var_names] + all_var_names.extend(var_names) + all_saved_inputs.extend(saved_inputs) + all_saved_outputs.extend(saved_outputs) + modified_derivative = Derivative( + formula=modified_formula, + original_formula=derivative.formula, + var_names=tuple(var_names), + saved_inputs=tuple(saved_inputs), + saved_outputs=tuple(saved_outputs), + named_gradients=set(), + ) + modified_derivative_formulas.append(modified_derivative) + + with local.parametrize( + use_const_ref_for_mutable_tensors=foreach_function.use_const_ref_for_mutable_tensors, + use_ilistref_for_tensor_lists=foreach_function.part_of_structured_group, + ): + args_with_derivatives = [ + Binding( + name=arg.name, + nctype=cpp.argument_type(arg, binds=arg.name), + argument=arg, + default=None, + ) + for arg in foreach_function.func.arguments.flat_non_out + if arg.name in all_var_names + ] + + forward_derivatives: list[ForwardDerivative] = [] + fw_derivative: ForwardDerivative + for fw_derivative in ref_diff_info.forward_derivatives: + var_names: list[str] = list(fw_derivative.var_names) # type: ignore[no-redef] + var_types: list[Type] = list(fw_derivative.var_types) + required_inputs_fw_grad: list[str] = [] + required_inputs_primal: list[str] = [] + if fw_derivative.required_inputs_fw_grad is not None: + required_inputs_fw_grad = list(fw_derivative.required_inputs_fw_grad) + if fw_derivative.required_inputs_primal: + required_inputs_primal = list(fw_derivative.required_inputs_primal) + modified_formula = fw_derivative.formula + + # Foreach's result is TensorList + if "result" in modified_formula: + modified_formula = fw_derivative.formula.replace("result", "result[i]") + + for foreach_arg, ref_arg in zip( + foreach_function.func.arguments.flat_non_out, + ref_diff_info.func.func.arguments.flat_non_out, + ): + # Modify reference forward formula + if ( + isinstance(foreach_arg.type, ListType) + and not foreach_arg.type.is_tensor_like() + ): + # Assuming ScalarList + modified_formula = modified_formula.replace( + ref_arg.name, foreach_arg.name + "[i]" + ) + elif foreach_arg.type.is_tensor_like(): + # Assuming TensorList / Tensor + # assert isinstance(foreach_arg.type, ListType), f"{foreach_function.func.name}, {foreach_arg.type}" + assert isinstance(foreach_arg.type, ListType) or ( + foreach_arg.type == BaseType(BaseTy.Tensor) + and str(foreach_function.func.name) in _foreach_with_tensor_overload + ), f"{foreach_function.func.name}, {foreach_arg.type}" + for suffix in ("_p", "_t"): + curr_expr = ref_arg.name + suffix + if curr_expr in modified_formula: + new_expr = foreach_arg.name + suffix + modified_formula = modified_formula.replace(curr_expr, new_expr) + else: + # Assuming Scalar + if foreach_arg.name != ref_arg.name: + modified_formula = modified_formula.replace( + ref_arg.name, foreach_arg.name + ) + + # note(crcrpar): there should exist a cooler way... + for i, name in enumerate(var_names): + if name == ref_arg.name: + var_names[i] = foreach_arg.name + var_types[i] = foreach_arg.type + for i, name in enumerate(required_inputs_fw_grad): + if name == ref_arg.name: + required_inputs_fw_grad[i] = foreach_arg.name + for i, name in enumerate(required_inputs_primal): + if name == ref_arg.name: + required_inputs_primal[i] = foreach_arg.name + forward_derivatives.append( + ForwardDerivative( + formula=modified_formula, + var_names=tuple(var_names), + var_types=tuple(var_types), + required_inputs_fw_grad=tuple(required_inputs_fw_grad), + required_inputs_primal=tuple(required_inputs_primal), + required_original_self_value=fw_derivative.required_original_self_value, + is_reusing_outplace_formula=fw_derivative.is_reusing_outplace_formula, + ) + ) + + return ( + DifferentiabilityInfo( + name=foreach_function.func.name.name.base, + func=foreach_function, + op=f"Foreach{ref_diff_info.op}{foreach_function.func.name.overload_name}", + derivatives=modified_derivative_formulas, + forward_derivatives=forward_derivatives, + all_saved_inputs=tuple(set(all_saved_inputs)), + all_saved_outputs=tuple(set(all_saved_outputs)), + available_named_gradients=(), + used_named_gradients=set(), + args_with_derivatives=args_with_derivatives, + non_differentiable_arg_names=[], + output_differentiability=None, + output_differentiability_conditions=None, + ), + True, + ) + + +def match_differentiability_info( + native_functions: list[NativeFunction], + differentiability_infos: dict[FunctionSchema, dict[str, DifferentiabilityInfo]], +) -> list[NativeFunctionWithDifferentiabilityInfo]: + """Sets the "derivative" key on declarations to matching autograd function + In-place functions will use the out-of-place derivative definition if there + is no in-place specific derivative. + """ + + functional_info_by_signature = { + schema.signature(strip_default=True): info_dict + for schema, info_dict in differentiability_infos.items() + if schema.kind() == SchemaKind.functional + } + non_functional_info_by_signature = { + schema.signature(strip_default=True): info_dict + for schema, info_dict in differentiability_infos.items() + if schema.kind() != SchemaKind.functional + } + + def find_info( + f: NativeFunction, + ) -> tuple[dict[str, DifferentiabilityInfo] | None, bool]: + # Don't bother matching info to generated out= variants + if "generated" in f.tags and f.func.kind() == SchemaKind.out: + return None, False + + # (1) Check for an exact match + if f.func in differentiability_infos: + return differentiability_infos[f.func], True + + # (2) If no exact match, check if the out-of-place variant + # of this operator has a match. + # i.e mul() for mul_() or mul_out() + # note(crcrpar): Check foreach or not because in-place foreach functions use backward defined for the existing + # native functions instead of the out-place counterparts. + f_sig = f.func.signature(strip_default=True) + if f_sig in functional_info_by_signature and not is_foreach_func(f): + return functional_info_by_signature[f_sig], False + + # (3) Some operators have a derivative explicitly defined for the mutable + # variant, but get a code-generated out-of-place variant which does *not* + # come with a derivative formula. + # For the generated out-of-place variant, use the mutable variant's formula + # if it exists. + if "generated" in f.tags and f_sig in non_functional_info_by_signature: + info_dict = non_functional_info_by_signature[f_sig] + # See https://github.com/pytorch/pytorch/pull/76320/files#r874816389 + assert not any( + any("self" in str(inpt.nctype.name) for inpt in info.all_saved_inputs) + for info in info_dict.values() + ), f"""\ +Attempted to convert a derivative formula for a mutable operator + to be used by automatically by its functional variant ("{str(f.func)}"). + this is not currently supported (we'd need to fix up the formula in the codegen).""" + return info_dict, False + + # (4) Generate derivative information of foreach functions if none is defined in `derivatives.yaml` + if is_foreach_func(f): + assert f.func not in differentiability_infos + diff_info, is_generated = gen_foreach_derivativeinfo( + f, + functional_info_by_signature, + non_functional_info_by_signature, + ) + if diff_info is None: + return None, False + # TODO(crcrpar): Avoid hard coding "Default" ideally. + diff_info_dict = {"Default": diff_info} + if is_generated: + differentiability_infos[f.func] = diff_info_dict + functional_info_by_signature[f.func] = diff_info_dict + return diff_info_dict, is_generated + + return None, False + + result: list[NativeFunctionWithDifferentiabilityInfo] = [] + for f in native_functions: + info_dict, is_exact_match = find_info(f) + + # Currently, the '.strides()' to 'strides_or_error' replacement does not support + # 'self' derivatives of an inplace function, so we must check for this case. + if f.func.kind() == SchemaKind.inplace and (info_dict is not None): + for info in info_dict.values(): + for derivative in info.derivatives: + if "self" in derivative.var_names: + for saved_input in derivative.saved_inputs: + assert "strides_or_error" not in saved_input.expr, ( + "Calling '.strides()' in the 'self' derivative formula of an " + f"in-place function is not supported: {f.func}" + ) + + if not info_dict: + result.append( + NativeFunctionWithDifferentiabilityInfo( + func=f, info=None, fw_derivatives=None + ) + ) + continue + + fw_derivative_dict: dict[str, Sequence[ForwardDerivative]] = {} + for key, info in info_dict.items(): + if not info.forward_derivatives: + fw_derivative_dict[key] = [] + continue + + forward_derivatives = info.forward_derivatives + + # For functions that have a single def for out-of-place and inplace (like abs()) + if f.func.kind() == SchemaKind.inplace: + # For inplace functions there is a little bit of work to do: + # 1) Validate the formula and make sure the input that is modified in not used: + # - If there is a formula for the inplace variant of the function (is_exact_match == True) then + # we make sure that the original value of the input that is being modified inplace (self_p) is + # not used in the formula. Note that the formula can use "original_self_p" here and that would + # trigger a clone of the original input. + # - If we are re-using the out of place formula (is_exact_match == False) then we replace every + # occurrence of self_p and self_t by original_self_p and original_self_t. These will be + # populated by cloned version of the original input (either the clone done by the backward AD + # logic if self is also used in a backward formula or a special clone that we add). + # 2) At this point, there cannot be a self_p in the formula. + # 3) Change "result" into "self_p" as by design, in the inplace function codegen, the result is + # simply called self (as it is modified inplace). + # 4) Update the required primals data in case it used to contain "result" but should now contain + # "self" + # 5) If it is not an exact match, the user formula is not modifying the existing forward grad + # inplace as it should. So add some code that makes sure that we do so if the forward grad + # already exists. + + assert ( + len(info.forward_derivatives) == 1 + ) # Only single output inplace should exist + fw_info = info.forward_derivatives[0] + formula = fw_info.formula + + def replace_self_with_original_self(formula: str, postfix: str) -> str: + def repl(m: re.Match[str]) -> str: + return f"{m.group(1)}original_self{postfix}{m.group(2)}" + + return re.sub(IDENT_REGEX.format(f"self{postfix}"), repl, formula) + + if re.search(IDENT_REGEX.format("self_p"), formula): + if is_exact_match: + # For manually defined formulas, don't allow the original value to be used + raise RuntimeError( + f'The formula for "{f.func.name}" is using the original value of self ' + "that is being modified inplace. This would lead to wrong forward gradients. " + 'Please use "result" in the formula only.' + ) + else: + # When the original formula is out of place, we save a clone of the primal + # value to be able to access this value if needed + # replace "self_p"/"self_t" from the formula by "original_self_p"/"original_self_t" + formula = replace_self_with_original_self(formula, "_p") + formula = replace_self_with_original_self(formula, "_t") + + # replace "result" from the formula by "self_p" + def repl(m: re.Match[str]) -> str: + return f"{m.group(1)}self_p{m.group(2)}" + + formula = re.sub(IDENT_REGEX.format("result"), repl, formula) + + required_primals = fw_info.required_inputs_primal + if re.search(IDENT_REGEX.format("self_p"), formula): + required_primals = ( + required_primals + ("self",) if required_primals else ("self",) + ) + + if not is_exact_match: + # NOTE [In-place forward AD formula Optimization] + # + # This optimization transforms the formula to directly do inplace, i.e. + # instead of self_t.copy_(self_t.op()) we do self_t.op_() when the following are met: + # + # 1) the formula satisfies the pattern: "self_t.op(*args)" + # 2) "op" in (1) needs to be the same as the op the derivative is for + # + # (2) may seem too strict, but currently the only ops that satisfy (1) also satisfy (2) + # If there is a need, we can relax (2) to allow any op that has an in-place variant + is_single_method_on_self_t = False + directly_do_inplace = False + op_name: str | None = None + between_parens: str | None = None + match = re.fullmatch(r"self_t.([\w]*)\((.*)\)", formula) + if match: + op_name, between_parens = match.group(1), match.group(2) + + # We want to... + # Match: self_t.op1(other_p.op2(arg)) + # Avoid: self_t.op1(args) + self_t.op2(args) + # Avoid: self_t.op1(other_p.op2(arg)) + self_t.op2(args) + def check_parens_nest_level_gt_zero(s: str) -> bool: + level = 1 + for ch in s: + if ch == ")": + level -= 1 + if level == 0: + return False + if ch == "(": + level += 1 + return True + + is_single_method_on_self_t = check_parens_nest_level_gt_zero( + between_parens + ) + directly_do_inplace = ( + is_single_method_on_self_t and op_name == info.name + ) + + if directly_do_inplace: + assert op_name is not None + assert between_parens is not None + formula = f"self_t_raw.defined() ? self_t_raw.{op_name}_({between_parens}) : {formula}" + else: + # Make sure that the forward grad is modified inplace when the original formula + # is out of place + formula = f"self_t_raw.defined() ? self_t_raw.copy_({formula}) : {formula}" + + required_original_self_value = bool( + re.search(IDENT_REGEX.format("original_self_p"), formula) + ) or bool(re.search(IDENT_REGEX.format("original_self_t"), formula)) + + forward_derivatives = [ + ForwardDerivative( + formula=formula, + var_names=("self",), + var_types=fw_info.var_types, + required_inputs_fw_grad=fw_info.required_inputs_fw_grad, + required_inputs_primal=required_primals, + required_original_self_value=required_original_self_value, + is_reusing_outplace_formula=not is_exact_match, + ), + ] + + fw_derivative_dict[key] = forward_derivatives + + result.append( + NativeFunctionWithDifferentiabilityInfo( + func=f, info=info_dict, fw_derivatives=fw_derivative_dict + ) + ) + + return result + + +def is_differentiable( + name: str, type: Type, info: DifferentiabilityInfo | None +) -> bool: + return type.is_tensor_like() and ( + info is None or name not in info.non_differentiable_arg_names + ) + + +def gen_differentiable_outputs( + fn: NativeFunctionWithDifferentiabilityInfo, key: str = "Default" +) -> list[DifferentiableOutput]: + f = fn.func + info = fn.info[key] if fn.info else None + outputs: list[DifferentiableOutput] = [ + DifferentiableOutput( + name=name, + type=ret.type, + cpp_type=cpp.return_type(ret, symint=True).cpp_type(), + ) + for name, ret in zip(cpp.return_names(f), f.func.returns) + ] + output_differentiability = info.output_differentiability if info else None + if output_differentiability is not None: + if len(output_differentiability) != len(outputs): + raise RuntimeError( + f"The length of output_differentiability ({len(output_differentiability)}), " + f"does not match the number of outputs ({len(outputs)})." + ) + differentiable_outputs: list[DifferentiableOutput] = [] + if False in output_differentiability and f.func.kind() == SchemaKind.inplace: + raise RuntimeError( + "output_differentiability=False for inplace operation (version_counter won't get updated)" + ) + for differentiable, output in zip(output_differentiability, outputs): + if differentiable: + differentiable_outputs.append(output) + return differentiable_outputs + candidate_differentiable_outputs = list( + filter(lambda r: is_differentiable(r.name, r.type, info), outputs) + ) + if uses_single_grad(info): + return candidate_differentiable_outputs[:1] + else: + return candidate_differentiable_outputs diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/cpp.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/cpp.py new file mode 100644 index 0000000000000000000000000000000000000000..7578afe3a0cdd308da7aadb9a5f96bbab3f41bd1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/cpp.py @@ -0,0 +1,474 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from torchgen import local +from torchgen.api.types import ( + ArgName, + ArrayCType, + ArrayRefCType, + BaseCType, + BaseTypeToCppMapping, + Binding, + boolT, + ConstRefCType, + CType, + dimnameListT, + intArrayRefT, + iTensorListRefT, + ListCType, + longT, + MutRefCType, + NamedCType, + OptionalCType, + optionalIntArrayRefT, + optionalSymIntArrayRefT, + scalarT, + SpecialArgName, + symIntArrayRefT, + SymIntT, + tensorListT, + tensorOptionsT, + tensorT, + TupleCType, + VectorCType, + voidT, +) +from torchgen.model import ( + Argument, + Arguments, + BaseTy, + BaseType, + FunctionSchema, + ListType, + NativeFunction, + OptionalType, + Return, + SelfArgument, + TensorOptionsArguments, + Type, +) +from torchgen.utils import assert_never + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +# This file describes the translation of JIT schema to the public C++ +# API, which is what people use when they call functions like at::add. +# +# Prominent characteristics of the C++ API: +# +# - dtype, layout, device and pin_memory are collected into +# a single C++ type TensorOptions (the native functions API +# also has this, but tensor options is really most relevant +# for the C++ API; it makes calling kwarg factory functions +# pleasant) +# +# - defaulting lives here (in fact, the dispatcher is completely +# oblivious of defaults!) +# +# BTW: policy on name collisions: we try not to have types with +# collisions, but functions are fair game to collide + + +def name( + func: FunctionSchema, + *, + faithful_name_for_out_overloads: bool = False, + symint_overload: bool = False, +) -> str: + name = str(func.name.name) + if symint_overload: + name += "_symint" + if func.is_out_fn(): + if faithful_name_for_out_overloads: + name += "_outf" + else: + name += "_out" + + return name + + +# Translation of "value types" in JIT schema to C++ API type. Value +# types look the same no matter if they are argument types or return +# types. Returns None if the type in question is not a value type. +def valuetype_type( + t: Type, + *, + binds: ArgName, + mutable: bool = True, + remove_non_owning_ref_types: bool = False, + symint: bool = False, +) -> NamedCType | None: + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor or t.name == BaseTy.Scalar: + return None + elif str(t) == "SymInt": + if symint: + return NamedCType(binds, BaseCType(SymIntT)) + else: + return NamedCType(binds, BaseCType(longT)) + if remove_non_owning_ref_types: + if t.name == BaseTy.str: + raise AssertionError( + "string ref->value conversion: not implemented yet" + ) + # All other BaseType currently map directly to BaseCppTypes. + return NamedCType(binds, BaseCType(BaseTypeToCppMapping[t.name])) + elif isinstance(t, OptionalType): + elem = valuetype_type(t.elem, binds=binds, mutable=mutable, symint=symint) + if elem is None: + return None + return NamedCType(binds, OptionalCType(elem.type)) + elif isinstance(t, ListType): + if str(t.elem) == "bool": + assert t.size is not None + return NamedCType(binds, ArrayCType(BaseCType(boolT), t.size)) + else: + return None + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +# Translation of types occurring in JIT arguments to a C++ argument type. +# If remove_non_owning_ref_types is set, we'll guarantee that the outputed CType is not a non-owning reference type. +# For example, we'll return std::vector instead of IntArrayRef. +# See Note [translation from C++ reference to value types] +def argumenttype_type( + t: Type, + *, + mutable: bool, + binds: ArgName, + remove_non_owning_ref_types: bool = False, + symint: bool = False, +) -> NamedCType: + # If it's a value type, do the value type translation + r = valuetype_type( + t, + binds=binds, + mutable=mutable, + symint=symint, + remove_non_owning_ref_types=remove_non_owning_ref_types, + ) + if r is not None: + return r + + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor: + if mutable and not local.use_const_ref_for_mutable_tensors(): + return NamedCType(binds, MutRefCType(BaseCType(tensorT))) + else: + return NamedCType(binds, ConstRefCType(BaseCType(tensorT))) + elif t.name == BaseTy.Scalar: + return NamedCType(binds, ConstRefCType(BaseCType(scalarT))) + else: + raise AssertionError(f"base type should have been value type {t}") + elif isinstance(t, OptionalType): + if str(t.elem) == "Tensor": + if mutable and not local.use_const_ref_for_mutable_tensors(): + return NamedCType( + binds, MutRefCType(BaseCType(tensorT)) + ) # TODO: fix this discrepancy + else: + return NamedCType( + binds, ConstRefCType(OptionalCType(BaseCType(tensorT))) + ) + elif str(t.elem) == "Scalar": + return NamedCType(binds, ConstRefCType(OptionalCType(BaseCType(scalarT)))) + elif isinstance(t.elem, ListType) and str(t.elem.elem) == "int": + return NamedCType(binds, BaseCType(optionalIntArrayRefT)) + elif isinstance(t.elem, ListType) and str(t.elem.elem) == "SymInt": + if symint: + return NamedCType(binds, BaseCType(optionalSymIntArrayRefT)) + else: + return NamedCType(binds, BaseCType(optionalIntArrayRefT)) + elem = argumenttype_type(t.elem, mutable=mutable, binds=binds, symint=symint) + return NamedCType(binds, OptionalCType(elem.type)) + elif isinstance(t, ListType): + # TODO: remove these special cases, ArrayRef fallthrough works fine + if str(t.elem) == "int": + if remove_non_owning_ref_types: + return NamedCType(binds, VectorCType(BaseCType(longT))) + else: + return NamedCType(binds, BaseCType(intArrayRefT)) + if str(t.elem) == "SymInt": + if remove_non_owning_ref_types: + if symint: + return NamedCType(binds, VectorCType(BaseCType(SymIntT))) + else: + return NamedCType(binds, VectorCType(BaseCType(longT))) + else: + if symint: + return NamedCType(binds, BaseCType(symIntArrayRefT)) + else: + return NamedCType(binds, BaseCType(intArrayRefT)) + if str(t.elem) == "Tensor": + if local.use_ilistref_for_tensor_lists(): + return NamedCType(binds, ConstRefCType(BaseCType(iTensorListRefT))) + else: + return NamedCType(binds, BaseCType(tensorListT)) + elif str(t.elem) == "Scalar": + return NamedCType(binds, ArrayRefCType(BaseCType(scalarT))) + elif str(t.elem) == "Dimname": + return NamedCType(binds, BaseCType(dimnameListT)) + elif str(t.elem) == "Tensor?": + return NamedCType( + binds, ConstRefCType(ListCType(OptionalCType(BaseCType(tensorT)))) + ) + elem = argumenttype_type(t.elem, mutable=mutable, binds=binds, symint=symint) + return NamedCType(binds, ArrayRefCType(elem.type)) + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +# Translate a JIT argument into its C++ type +def argument_type(a: Argument, *, binds: ArgName, symint: bool = False) -> NamedCType: + return argumenttype_type(a.type, mutable=a.is_write, symint=symint, binds=binds) + + +# Translation of a (non-multi) return type from JIT to C++ +# N.B: returntype_type returns a CType, not a NamedCType. +# This is mostly because of the mismatch between return types and return names. +# e.g. a function with a return type of 'void' has 0 return names, +# and a function with a return type of 'std::tuple' has >1 return name. +def returntype_type(t: Type, *, mutable: bool, symint: bool = False) -> CType: + # placeholder is ignored + # NB: symint is ALWAYS respected for return types. So symint argument + # here is IGNORED + r = valuetype_type(t, binds="__placeholder__", mutable=mutable, symint=True) + if r is not None: + return r.type + + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor: + if mutable: + if local.use_const_ref_for_mutable_tensors(): + return ConstRefCType(BaseCType(tensorT)) + else: + return MutRefCType(BaseCType(tensorT)) + else: + # Note [Tensor Copy Returns] + # Currently, we use "Argument.is_write" to determine + # whether or not Tensor return types should be copies or references. + # If that ever changes, take a look at other locations of this note! + return BaseCType(tensorT) + elif t.name == BaseTy.Scalar: + return BaseCType(scalarT) + elif isinstance(t, ListType): + assert not mutable, "Native functions should never return a mutable tensor list. They should return void." + elem = returntype_type(t.elem, mutable=False) + assert t.size is None, f"fixed size list returns not supported: {t}" + return VectorCType(elem) + elif isinstance(t, OptionalType): + elem = returntype_type(t.elem, mutable=mutable) + if str(t.elem) == "Tensor": + return OptionalCType(elem) + + raise AssertionError(f"unrecognized return type {t}") + + +# Translation of a single return to its C++ type +def return_type(r: Return, *, symint: bool = False) -> CType: + return returntype_type(r.type, mutable=r.is_write, symint=symint) + + +# Translation of a full (possibly multi) return from JIT to its C++ type +def returns_type(rs: Sequence[Return], *, symint: bool = False) -> CType: + if len(rs) == 0: + return BaseCType(voidT) + elif len(rs) == 1: + return return_type(rs[0], symint=symint) + else: + return TupleCType([return_type(r, symint=symint) for r in rs]) + + +def return_names(f: NativeFunction, *, fallback_name: str = "result") -> Sequence[str]: + returns: list[str] = [] + for i, r in enumerate(f.func.returns): + # If we have an inplace function, the return argument is + # implicitly named self. + # TODO: Consider incorporating this into the data model + if f.func.name.name.inplace: + assert i == 0, "illegal inplace function with multiple returns" + name = "self" + # If we are out function, the name is the name of the + # corresponding output function (r.name will get recorded + # in field_name later.) + elif f.func.is_out_fn(): + name = f.func.arguments.out[i].name + # If the return argument is explicitly named... + elif r.name: + name_conflict = any( + r.name == a.name for a in f.func.schema_order_arguments() + ) + if name_conflict and not f.func.is_out_fn(): + name = f"{r.name}_return" + else: + name = r.name + # If there is no explicit name and no fallback name was passed in, we just name the output result, + # unless it's a multi-return, in which case it's result0, + # result1, etc (zero-indexed) + else: + name = fallback_name if len(f.func.returns) == 1 else f"{fallback_name}{i}" + returns.append(name) + return returns + + +JIT_TO_CPP_DEFAULT = { + "False": "false", + "True": "true", + "None": "::std::nullopt", # UGH this one is type directed + "Mean": "at::Reduction::Mean", + "[]": "{}", + "contiguous_format": "c10::MemoryFormat::Contiguous", + "long": "at::kLong", +} + + +# Convert a JIT default into C++ expression representing the default +def default_expr(d: str, t: Type, *, symint: bool) -> str: + if d == "None" and str(t) == "Tensor?": + return "{}" + if isinstance(t, BaseType) and t.name is BaseTy.str: + # Schema allows single quotes but C++ needs double + if len(d) >= 2 and d[0] == "'" and d[-1] == "'": + s = "" + i = 1 + while i + 1 < len(d): + if d[i] != "\\": + if d[i] == '"': + s += '\\"' + else: + s += d[i] + i += 1 + else: + if d[i + 1] == "'": + s += "'" + else: + s += d[i : i + 2] + i += 2 + + return f'"{s}"' + + if isinstance(t, OptionalType): + if d == "None": + return "::std::nullopt" + + return default_expr(d, t.elem, symint=symint) + + if isinstance(t, ListType): + if d.startswith("[") and d.endswith("]"): + return "{" + d[1:-1] + "}" + elif symint and d.isdigit() and str(t.elem) == "SymInt": + return f"c10::SymInt({d})" + elif t.size is None: + # NOTE: Sized lists can have scalar defaults + raise ValueError(f"Expected a list default '[...]' but found: '{d}'") + + return JIT_TO_CPP_DEFAULT.get(d, d) + + +# Convert an argument into its C++ API form + + +def argument( + a: Argument | TensorOptionsArguments | SelfArgument, + *, + cpp_no_default_args: set[str], + method: bool, + faithful: bool, + symint: bool = False, + has_tensor_options: bool, +) -> list[Binding]: + def sub_argument( + a: Argument | TensorOptionsArguments | SelfArgument, + ) -> list[Binding]: + return argument( + a, + cpp_no_default_args=cpp_no_default_args, + method=method, + faithful=faithful, + symint=symint, + has_tensor_options=has_tensor_options, + ) + + if isinstance(a, Argument): + binds: ArgName + if a.name == "memory_format" and has_tensor_options: + binds = SpecialArgName.possibly_redundant_memory_format + else: + binds = a.name + default: str | None = None + if a.name not in cpp_no_default_args and a.default is not None: + default = default_expr(a.default, a.type, symint=symint) + return [ + Binding( + nctype=argument_type(a, binds=binds, symint=symint), + name=a.name, + default=default, + argument=a, + ) + ] + elif isinstance(a, TensorOptionsArguments): + if faithful: + return ( + sub_argument(a.dtype) + + sub_argument(a.layout) + + sub_argument(a.device) + + sub_argument(a.pin_memory) + ) + else: + default = None + # Enforced by NativeFunction.__post_init__ + assert "options" not in cpp_no_default_args + if all(x.default == "None" for x in a.all()): + default = "{}" + elif a.dtype.default == "long": + default = "at::kLong" # TODO: this is wrong + return [ + Binding( + nctype=NamedCType("options", BaseCType(tensorOptionsT)), + name="options", + default=default, + argument=a, + ) + ] + elif isinstance(a, SelfArgument): + if method: + # Caller is responsible for installing implicit this in context! + return [] + else: + return sub_argument(a.argument) + else: + assert_never(a) + + +def arguments( + arguments: Arguments, + *, + faithful: bool, + symint: bool = False, + method: bool, + cpp_no_default_args: set[str], +) -> list[Binding]: + args: list[Argument | TensorOptionsArguments | SelfArgument] = [] + if faithful: + args.extend(arguments.non_out) + args.extend(arguments.out) + else: + args.extend(arguments.out) + args.extend(arguments.non_out) + return [ + r.no_default() if faithful else r + for a in args + for r in argument( + a, + faithful=faithful, + symint=symint, + method=method, + has_tensor_options=arguments.tensor_options is not None, + cpp_no_default_args=cpp_no_default_args, + ) + ] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/dispatcher.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/dispatcher.py new file mode 100644 index 0000000000000000000000000000000000000000..99c61a127e871f09b18fa7ffca16e6100194d182 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/dispatcher.py @@ -0,0 +1,124 @@ +from __future__ import annotations + +import itertools +from typing import TYPE_CHECKING + +from torchgen.api import cpp +from torchgen.api.types import ArgName, Binding, CType, NamedCType +from torchgen.model import ( + Argument, + FunctionSchema, + Return, + SelfArgument, + TensorOptionsArguments, + Type, +) +from torchgen.utils import assert_never, concatMap + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +# This file describes the translation of JIT schema to the dispatcher +# API, the *unboxed* calling convention by which invocations through +# the dispatcher are made. Historically, the dispatcher API matched +# the C++ API, but with the establishment of the boxed API, we've +# made changes to the dispatcher API to so that the unboxed API +# better aligns with the boxed API. The dispatcher API hooks heavily +# into our template based boxing/unboxing machinery, so changes +# to this convention will usually need template updates too. +# +# Prominent characteristics of the dispatcher API: +# +# - dtype, layout, device and pin_memory are represented as separate +# arguments. +# + + +def name(func: FunctionSchema) -> str: + return cpp.name(func) + + +def argumenttype_type( + t: Type, + *, + mutable: bool, + binds: ArgName, + remove_non_owning_ref_types: bool = False, + symint: bool = True, +) -> NamedCType: + # This is a faux amis. If it makes sense in the future to add + # more special cases here, or invert things so cpp.argument_type + # calls this, or just completely inline the function, please do + # it. + return cpp.argumenttype_type( + t, + mutable=mutable, + binds=binds, + symint=symint, + remove_non_owning_ref_types=remove_non_owning_ref_types, + ) + + +def argument_type( + a: Argument, + *, + binds: ArgName, + remove_non_owning_ref_types: bool = False, + symint: bool = True, +) -> NamedCType: + return argumenttype_type( + a.type, + mutable=a.is_write, + binds=binds, + remove_non_owning_ref_types=remove_non_owning_ref_types, + symint=symint, + ) + + +def returns_type(rs: Sequence[Return], *, symint: bool = True) -> CType: + # At present, there is no difference. But there could be! + return cpp.returns_type(rs, symint=symint) + + +def jit_arguments(func: FunctionSchema) -> list[Argument]: + def to_argument( + a: Argument | TensorOptionsArguments | SelfArgument, + ) -> list[Argument]: + if isinstance(a, Argument): + return [a] + elif isinstance(a, SelfArgument): + return [a.argument] + elif isinstance(a, TensorOptionsArguments): + return [a.dtype, a.layout, a.device, a.pin_memory] + else: + assert_never(a) + + return list( + concatMap( + to_argument, + itertools.chain( + func.arguments.positional, func.arguments.kwarg_only, func.arguments.out + ), + ) + ) + + +def argument( + a: Argument, *, remove_non_owning_ref_types: bool = False, symint: bool = True +) -> Binding: + return Binding( + nctype=argument_type( + a, + binds=a.name, + remove_non_owning_ref_types=remove_non_owning_ref_types, + symint=symint, + ), + name=a.name, + argument=a, + ) + + +def arguments(func: FunctionSchema, *, symint: bool = True) -> list[Binding]: + return [argument(a, symint=symint) for a in jit_arguments(func)] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/functionalization.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/functionalization.py new file mode 100644 index 0000000000000000000000000000000000000000..2d2adb7555ead8a7afabacff20e5616ece3c688f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/functionalization.py @@ -0,0 +1,199 @@ +from __future__ import annotations + +from torchgen.api import dispatcher +from torchgen.api.types import ( + BaseCppType, + BaseCType, + Binding, + boolT, + ConstRefCType, + CType, + longT, + NamedCType, + tensorT, +) +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + FunctionSchema, + NativeFunction, + NativeFunctionsViewGroup, +) + + +# This file describes the translation of JIT schema to API's used +# when creating view lambdas that are used by the functionalization pass. +# There are two types of lambdas: forward lambdas and reverse lambdas. +# These API's mostly follow the dispatcher API, with a few quirks: +# - The lambda capture has to convert reference types to value types +# - While the forward lambda just directly calls into the at::_ops API +# (following the dispatcher convention), the logic here for the reverse lambda +# is responsible for generating both the call-site, and the declarations +# (which are implemented manually in the at::functionalization::impl namespace). + +# The lambdas generated for each view op in the functionalization pass are of the form +# [capture_arguments](outer_arguments) -> returns_type { +# return name(inner_arguments); +# } + +# Define some specific lambda input arguments. +base_binding = Binding( + name="base", + nctype=NamedCType(name="base", type=ConstRefCType(BaseCType(tensorT))), + argument=Argument( + name="base", type=BaseType(BaseTy.Tensor), default=None, annotation=None + ), + default=None, +) +mutated_view_binding = Binding( + name="mutated_view", + nctype=NamedCType(name="mutated_view", type=ConstRefCType(BaseCType(tensorT))), + argument=Argument( + name="base", type=BaseType(BaseTy.Tensor), default=None, annotation=None + ), + default=None, +) +mutated_view_idx_binding = Binding( + name="mutated_view_idx", + nctype=NamedCType(name="mutated_view_idx", type=BaseCType(longT)), + argument=Argument( + name="base", type=BaseType(BaseTy.Tensor), default=None, annotation=None + ), + default=None, +) +reapply_views_binding = Binding( + name="reapply_views", + nctype=NamedCType(name="reapply_views", type=BaseCType(boolT)), + argument=Argument( + name="reapply_views", type=BaseType(BaseTy.bool), default=None, annotation=None + ), + default=None, +) + +InverseReturnModeT = BaseCppType("at::functionalization", "InverseReturnMode") +inverse_return_mode_binding = Binding( + name="inverse_return_mode", + nctype=NamedCType(name="inverse_return_mode", type=BaseCType(InverseReturnModeT)), + argument=Argument( + name="inverse_return_mode", + # NB: not actually a bool but it doesn't matter because this isn't used + type=BaseType(BaseTy.bool), + default=None, + annotation=None, + ), + default=None, +) + + +# The lambda capture itself doesn't have a name. +# The name returned here corresponds to the name of the inner function called by the lambda. +def name( + g: NativeFunctionsViewGroup, + *, + is_reverse: bool, + include_namespace: bool, + reapply_views: bool | None = None, +) -> str: + if reapply_views is None: + # reapply_views is only important for the fwd lambda, + # since we always plumb the runtime "reapply_views" argument into the reverse function. + assert is_reverse + if is_reverse: + return reverse_name(g.view, include_namespace) + # in the forward case, we just directly call into the at::_ops API (so we always need the namespace) + assert include_namespace + assert g.view_copy is not None + api_name = ( + g.view.func.name.unambiguous_name() + if reapply_views + else g.view_copy.func.name.unambiguous_name() + ) + return f"at::_ops::{api_name}::call" + + +def reverse_name(f: NativeFunction, include_namespace: bool) -> str: + # for the reverse: we plumb the "reapply_views" flag into that function and support + # both copy and non-copy variants. (We could avoid doing that, but that would require + # writing out twice as many view inverse functions). + api_name = f.func.name.unambiguous_name() + # in the reverse case, we codegen both the call-sites (which need the full namespace) and the declarations (which don't) + if include_namespace: + return f"at::functionalization::FunctionalInverses::{api_name}_inverse" + else: + return f"{api_name}_inverse" + + +def capture_arguments(func: FunctionSchema, *, is_reverse: bool) -> list[Binding]: + # capture arguments include all arguments except `self`. + # Importantly, they don't include any C++ reference types (or else we'll get a dangling reference in the capture), + # So any reference types (IntArrayRef) need to be converted to value types (vector) + args = func.arguments.flat_all + assert args[0].type == BaseType(BaseTy.Tensor) + non_self_args = args[1:] + non_self_value_bindings = [ + dispatcher.argument(a, remove_non_owning_ref_types=True) for a in non_self_args + ] + + all_bindings = [ + inverse_return_mode_binding if is_reverse else reapply_views_binding + ] + all_bindings.extend(non_self_value_bindings) + return all_bindings + + +def returns_type(func: FunctionSchema) -> CType: + # Assertion: all view ops return tensor-like outputs + assert len(func.returns) >= 1 + for ret in func.returns: + assert ret.type.is_tensor_like() + # However, the return type of the lambda is always an individual tensor. + # For multi-tensor outputs, each tensor needs to be tracked individually. + return BaseCType(tensorT) + + +def outer_arguments(*, is_reverse: bool) -> list[Binding]: + if is_reverse: + return [base_binding, mutated_view_binding, mutated_view_idx_binding] + else: + return [base_binding, mutated_view_idx_binding] + + +def inner_call_index(func: FunctionSchema) -> Binding | None: + # For view ops that return multiple tensors (like `split`), we generate a separate lambda for each output. + # When we replay a view op that returns multiple tensors, we need to index into the output appropriately + if len(func.returns) > 1 or ( + len(func.returns) == 1 and func.returns[0].type.is_list_like() + ): + return mutated_view_idx_binding + return None + + +def inner_arguments(func: FunctionSchema, is_reverse: bool) -> list[Binding]: + args = func.arguments.flat_all + assert args[0].type == BaseType(BaseTy.Tensor) + non_self_args = args[1:] + # The forward lambda calls the at::_ops API, while the reverse lambda calls the view inverse API. + # Both of these follow the dispatcher API. + non_self_bindings = [dispatcher.argument(a) for a in non_self_args] + if not is_reverse: + # the forward lambda swaps out the original tensor argument with the lambd arg "base" + return [base_binding] + non_self_bindings + else: + # the reverse lambda does the same, but with an additional "mutated_view" arg + # additionally, we have a calling convention: for view ops that return multiple tensor outputs + # their corresponding view_inverse function takes in an additional index argument. + index_binding = inner_call_index(func) + if index_binding is not None: + return [ + base_binding, + mutated_view_binding, + inverse_return_mode_binding, + index_binding, + ] + non_self_bindings + else: + return [ + base_binding, + mutated_view_binding, + inverse_return_mode_binding, + ] + non_self_bindings diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/lazy.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/lazy.py new file mode 100644 index 0000000000000000000000000000000000000000..99cc1fed962fecf19ca2d46d9a964967a252f9ca --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/lazy.py @@ -0,0 +1,468 @@ +from __future__ import annotations + +from typing import Any + +from torchgen.api.types import ( + BaseCppType, + BaseCType, + boolT, + CType, + deviceT, + doubleT, + generatorT, + layoutT, + ListCType, + longT, + memoryFormatT, + NamedCType, + OptionalCType, + scalarT, + scalarTypeT, + stringT, + SymIntT, + VectorCType, +) +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + FunctionSchema, + ListType, + OperatorName, + OptionalType, + Return, + TensorOptionsArguments, + Type, +) + + +_valueT: BaseCppType | None = None + + +# A ValueT is an IR type which represents the computation of a Tensor. In other +# words, a PyTorch user will do operations on lazy tensors, and each output lazy +# tensor internally tracks a ValueT representing the IR node that would have +# actually produced the value of this tensor for real. +# +# This is configurable because different lazy tensor backends (LTC vs XLA) will +# have different IR representations. (Though, arguably, after unification they +# shouldn't!) +def getValueT() -> BaseCppType: + global _valueT + if not _valueT: + raise NotImplementedError( + "The value type needs to be set with setValueT() in run_gen_lazy_tensor()" + ) + + return _valueT + + +def setValueT(val: BaseCppType) -> None: + global _valueT + _valueT = val + + +# this is a bad hack. I need to refactor the data model to represent each arg in the schema as an object, +# making it easier to represent special properties of an arg. +tensorListValueT = BaseCppType("torch::lazy", "Value") + + +def process_ir_type( + typ: Type, properties: LazyIrProperties, *, symint: bool +) -> BaseCType | VectorCType | OptionalCType | ListCType: + """ + This function takes a type from NativeFunctions and converts it for use with + lazy tensor codegen. + + Type conversion for lazy currently consists of + (1) changing at::Tensors into lazy::Values + (2) wrapping everything in a BaseCType + (3) making cpp-reference types into cpp-value types (e.g. vector instead of IntArrayRef) + + (1) converts at::Tensors to lazy::Values (which wrap lazy::Nodes, with which Lazy IR represents tensors.) + There is special handling for Optional[Tensor] or list[Tensor], etc- hence 'tensor-like' + + This is incomplete- there are assertions in places that it's expected to need to add + more types as the codegen is used with more operators. + """ + if isinstance(typ, BaseType): + if typ.name == BaseTy.Tensor: + return BaseCType(getValueT()) + elif typ.name == BaseTy.Scalar: + if properties.TreatScalarsAsConstants: + return BaseCType(scalarT) + # at::scalar has special handling, + # and is wrapped in an lazy::Value just like at::tensor + return BaseCType(getValueT()) + elif typ.name == BaseTy.ScalarType: + return BaseCType(scalarTypeT) + elif typ.name == BaseTy.int: + return BaseCType(longT) + elif typ.name == BaseTy.SymInt: + if symint: + return BaseCType(getValueT()) + else: + return BaseCType(longT) + elif typ.name == BaseTy.bool: + return BaseCType(boolT) + elif typ.name == BaseTy.float: + return BaseCType(doubleT) + elif typ.name == BaseTy.str: + return BaseCType(stringT) + elif typ.name == BaseTy.Device: + return BaseCType(deviceT) + elif typ.name == BaseTy.Generator: + return BaseCType(generatorT) + elif typ.name == BaseTy.Layout: + return BaseCType(layoutT) + elif typ.name == BaseTy.MemoryFormat: + return BaseCType(memoryFormatT) + else: + raise AssertionError(f"TODO add support for type {repr(typ)}") + elif isinstance(typ, OptionalType): + return OptionalCType(process_ir_type(typ.elem, properties, symint=symint)) + elif isinstance(typ, ListType): + if str(typ.elem) == "Tensor?": + # TODO(whc) is this actually correct? or should it use a Vector like above + return ListCType(OptionalCType(BaseCType(getValueT()))) + elif str(typ.elem) == "Tensor": + # this is a TensorList which comes in from GetTensorList as a Value + return BaseCType(tensorListValueT) + elif typ.elem == BaseType(BaseTy.SymInt): + # TODO: return a value type. The problem here is analogous to + # the problem with tensorListValueT: if you have SymInt[] you + # cannot conveniently save the list of Value directly, as nodes + # expect to save values as a vector for ALL arguments. So you + # need a separate IR node that represents all of the size nodes + # assembled into a list. I'm not an LTC dev so I don't want to + # figure it out right now. Y'all figure it out... + return VectorCType(BaseCType(longT)) + + else: + return VectorCType(process_ir_type(typ.elem, properties, symint=symint)) + else: + raise AssertionError(f"unrecognized type {repr(typ)}") + + +# TODO: Determining this based off of CType is bad; this should be computed +# from Type directly; then the same logic as process_ir_type can be used +# +# Invariant: passed typ should be an *owning* CType (e.g., we will report +# that ArrayRef is NOT a value type) +def isValueType(typ: CType, properties: LazyIrProperties | None = None) -> bool: + """ + Given a type, determine if it is a Value-like type. This is equivalent to + being Tensor-like, but assumes the type has already been transformed. + """ + if isinstance(typ, BaseCType): + # I am regretting my naming conventions, but now we are wrapping at::scalar in + # lazy value, while preserving other 'scalar' types as scalars in the IR + treat_scalars_as_constants = properties and properties.TreatScalarsAsConstants + return ( + typ.type == getValueT() + or (typ.type == scalarT and not treat_scalars_as_constants) + or typ.type == SymIntT + ) + elif typ == VectorCType(BaseCType(SymIntT)): + # TODO: report True for this + return False + elif isinstance(typ, (OptionalCType, ListCType, VectorCType)): + return isValueType(typ.elem, properties) + return False + + +def isSymIntType(typ: Type) -> bool: + return isinstance(typ, BaseType) and typ.name == BaseTy.SymInt + + +def isWrappedScalarType(typ: Type) -> bool: + """ + Given a type, determine if it is a c10::scalar which we will wrap in a lazy Value. + Since we literally change the type from scalarT to valueT, information is lost. + This function helps build a list of wrapped scalars to save that information + """ + if isinstance(typ, BaseType): + # I am regretting my naming conventions, but now we are wrapping at::scalar in + # lazy value, while preserving other 'scalar' types as scalars in the IR + return typ.name == BaseTy.Scalar + elif isinstance(typ, (OptionalType, ListType)): + return isWrappedScalarType(typ.elem) + return False + + +# TODO: dedupe with Type.is_generator_like +def isGeneratorType(typ: Type) -> bool: + if isinstance(typ, BaseType): + return typ.name == BaseTy.Generator + elif isinstance(typ, (OptionalType)): + return isGeneratorType(typ.elem) + return False + + +# This class caches a few derived properties computed from an Argument +# and LazyIrProperties +class LazyArgument: + name: str + orig_type: Type + lazy_type_: CType | None + is_wrapped_scalar: bool + is_generator: bool + # TODO: this is lies, it is false for symint list + is_symint_or_list: bool + + # Whether or not we are treating this as symint or not + symint: bool + + # true if this argument is or contains a lazy IR value + is_lazy_value: bool + + def __init__( + self, arg: Argument, properties: LazyIrProperties, *, symint: bool + ) -> None: + self.name = arg.name + self.orig_type = arg.type + self.symint = symint + self.is_optional = isinstance(arg.type, OptionalType) + self.is_generator = isGeneratorType(arg.type) + self.lazy_type_ = process_ir_type(arg.type, properties, symint=symint) + self.is_wrapped_scalar = isWrappedScalarType(arg.type) + self.is_symint_or_list = symint and ( + isSymIntType(arg.type) + or (isinstance(arg.type, OptionalType) and isSymIntType(arg.type.elem)) + # TODO: lists of symints are not currently treated as value types + # or (isinstance(arg.type, ListType) and isSymIntType(arg.type.elem)) + ) + + self.is_lazy_value = isValueType(self.lazy_type, properties) + + @property + def lazy_type(self) -> CType: + assert ( + self.lazy_type_ is not None + ), f"Attempted to access lazy_type for invalid argument {self.name}" + return self.lazy_type_ + + +class LazyIrProperties: + """Collection of properties for an IR node + + The property groups are listed below. Each group is mutually + exclusive, meaning that only one property from each group can be True + at any one time. The properties can be accessed as if they were normal + attributes. The mutual exclusivity is automatically handled. + """ + + Properties: tuple[tuple[str, ...], ...] = ( + ( + "ShapePrecompute", # Assume shape has been precomputed + "ShapeCompute", # Need to compute the shape on construction + "ShapeCache", # Utilize the shape cache to defer computation + ), + ( + "Lower", # Codegen full lower function + "LowerDeclOnly", # Codegen only lower function declaration + ), + ( + "CanBeReused", # Codegen full reuse function + "CanBeReusedDeclOnly", # Codegen only reuse function declaration + ), + ( + "CreateFn", # Codegen full create function + "CreateFnDeclOnly", # Codegen only create function declaration + ), + ( + "TreatScalarsAsConstants", # Treat Scalars as constants instead of handling like values + ), + ) + + def __init__(self, *default_properties: str) -> None: + properties: dict[tuple[str, ...], str | None] = dict.fromkeys( + LazyIrProperties.Properties + ) + self.__dict__["properties"] = properties + for p in default_properties: + setattr(self, p, True) + + def __getattr__(self, key: str) -> Any: + properties = self.__dict__["properties"] + for values in LazyIrProperties.Properties: + if key in values: + return properties[values] == key + + return self.__getattribute__(key) + + def __setattr__(self, key: str, value: Any) -> Any: + properties = self.__dict__["properties"] + for values in LazyIrProperties.Properties: + if key in values: + properties[values] = key if value else None + return value + + raise KeyError(f"Invalid property: {key}") + + +# Inspired by a FunctionSchema object, a LazyIrSchema holds the schema of a Lazy IR node. +# Unlike a FunctionSchema, it has no round-trippable string form (relating to the YAML), +# but carries type information from a native FunctionSchema modified for use with IR nodes, +# and preserving original argument names. +# +# TODO: This is not idiomatic with how other torchgen APIs transform on schema. +class LazyIrSchema: + # The name of the operator this function schema describes. + name: OperatorName + + positional_args: tuple[LazyArgument, ...] + keyword_args: tuple[LazyArgument, ...] + + # TODO: Need to handle collisions with argument names at some point + returns: tuple[Return, ...] + + # if this schema has a Generator arg, list its orig ctype/name but don't + # build a LazyArgument since lazy IR doesn't support it + generator_arg: NamedCType | None = None + + # original function schema + func: FunctionSchema + + # Whether or not we are code-genning for SymInt or not + symint: bool + + properties: LazyIrProperties = LazyIrProperties( + # default properties + "ShapePrecompute", + "Lower", + "CanBeReused", + ) + opkind: str | None = None + + def __init__( + self, + func: FunctionSchema, + properties: LazyIrProperties | None = None, + *, + symint: bool, + ) -> None: + if properties: + self.properties = properties + + self.func = func + self.symint = symint + positional_args: list[LazyArgument] = [] + for arg_field in ["pre_self_positional", "self_arg", "post_self_positional"]: + if arg_field == "self_arg" and func.arguments.self_arg is not None: + arg = func.arguments.self_arg.argument + positional_args.append( + LazyArgument(arg, self.properties, symint=symint) + ) + elif getattr(func.arguments, arg_field) is not None: + positional_args.extend( + LazyArgument(arg, self.properties, symint=symint) + for arg in getattr(func.arguments, arg_field) + ) + self.positional_args = tuple(positional_args) + + keyword_args: list[LazyArgument] = [] + for arg_field in [ + "pre_tensor_options_kwarg_only", + "tensor_options", + "post_tensor_options_kwarg_only", + "out", + ]: + curr_args = getattr(func.arguments, arg_field) + if curr_args is not None: + if isinstance(curr_args, TensorOptionsArguments): + curr_args = curr_args.all() + for arg in curr_args: + if isGeneratorType(arg.type): + assert ( + self.generator_arg is None + ), "We expect there is only one generator arg" + self.generator_arg = NamedCType( + arg.name, + arg.type, # type:ignore[arg-type] + ) + keyword_args.extend( + LazyArgument(arg, self.properties, symint=symint) + for arg in curr_args + ) + self.keyword_args = tuple(keyword_args) + self.name = func.name + self.returns = func.returns + + @property + def node_name(self) -> str: + """ + Return camel-case version of op in node. + + Note: This function also appends any `overload_name` in the operation. + For example, if the op is `bitwise_and.Tensor`, the returned name + will be `BitwiseAndTensor`. + """ + op_name = f"{self.name.name}_{self.name.overload_name}".lower() + return "".join(word.capitalize() or "" for word in op_name.split("_")) + + @property + def aten_name(self) -> str: + return str(self.name.name) + + @property + def base_name(self) -> str: + return f"{self.name.name.base}" + + def filtered_args( + self, + positional: bool = True, + keyword: bool = True, + values: bool = True, + scalars: bool = True, + generator: bool = True, + ) -> list[LazyArgument]: + # This function maintains the sorted order of arguments but provides different filtered views. + # Some parts of the code care about kwargs vs args (TS lowerings), + # other parts care about whether they need to wrap the arg in a lazy value or leave it alone. + # Generators are special cased, as they are needed for fallback/shape-inference but not supported + # in TS lowerings and therefore also omitted from lazy IR. + args: list[LazyArgument] = [] + if positional: + args.extend(self.positional_args) + if keyword: + args.extend(self.keyword_args) + + if values and scalars and generator: + return args + elif values and scalars: + return [a for a in args if not a.is_generator] + elif values: + return [a for a in args if a.is_lazy_value] + elif scalars: + return [ + a + for a in args + if not a.is_lazy_value and (generator or not a.is_generator) + ] + + return [] + + @property + def positional_values(self) -> list[LazyArgument]: + return self.filtered_args( + positional=True, keyword=False, values=True, scalars=False + ) + + @property + def positional_scalars(self) -> list[LazyArgument]: + return self.filtered_args( + positional=True, keyword=False, values=False, scalars=True + ) + + @property + def keyword_values(self) -> list[LazyArgument]: + return self.filtered_args( + positional=False, keyword=True, values=True, scalars=False + ) + + @property + def keyword_scalars(self) -> list[LazyArgument]: + return self.filtered_args( + positional=False, keyword=True, values=False, scalars=True + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/meta.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/meta.py new file mode 100644 index 0000000000000000000000000000000000000000..ffafc500dbfdde8b290ef6a2283c57fd602f0606 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/meta.py @@ -0,0 +1,13 @@ +from torchgen.model import NativeFunctionsGroup + + +# Follows dispatcher calling convention, but: +# - Mutable arguments not allowed. Meta functions are always +# written in functional form. Look at FunctionSchema.signature() +# - No tensor returns; instead we return a TensorMeta describing +# the tensor in question + + +def name(g: NativeFunctionsGroup) -> str: + # use the overload name from the functional version + return str(g.functional.func.name).replace(".", "_") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/native.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/native.py new file mode 100644 index 0000000000000000000000000000000000000000..09039857d683517b46dcaa1e160369ac0a52ad0e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/native.py @@ -0,0 +1,159 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from torchgen import local +from torchgen.api import cpp +from torchgen.api.types import ( + ArgName, + BaseCType, + Binding, + boolT, + ConstRefCType, + CType, + deviceT, + layoutT, + ListCType, + MutRefCType, + NamedCType, + OptionalCType, + scalarT, + scalarTypeT, + tensorT, +) +from torchgen.model import ( + Argument, + FunctionSchema, + Return, + SelfArgument, + TensorOptionsArguments, + Type, +) +from torchgen.utils import assert_never + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +# This file describes the translation of JIT schema to the native functions API. +# This looks a lot like the C++ API (which makes historical sense, because the +# idea was you wrote native functions to implement functions in the C++ API), +# but over time we have evolved the C++ API without actually changing our +# native:: kernels. The intention is to make native API and dispatcher API +# line up as closely as possible, since this results in the least overhead +# (no translation is needed from dispatcher API to native API). +# +# NB: this is symint aware, you will get the non-SymInt variant for some +# dispatch entries and SymInt for others. + + +def name(func: FunctionSchema) -> str: + name = str(func.name.name) + # TODO: delete this! + if func.is_out_fn(): + name += "_out" + if func.name.overload_name: + name += f"_{func.name.overload_name}" + return name + + +def argumenttype_type( + t: Type, *, mutable: bool, binds: ArgName, symint: bool +) -> NamedCType: + if str(t) == "Tensor?": + tensor_type: OptionalCType = OptionalCType(BaseCType(tensorT)) + if mutable and not local.use_const_ref_for_mutable_tensors(): + return NamedCType(binds, MutRefCType(tensor_type)) + else: + return NamedCType(binds, ConstRefCType(tensor_type)) + elif str(t) == "Tensor?[]": + return NamedCType( + binds, ConstRefCType(ListCType(OptionalCType(BaseCType(tensorT)))) + ) + elif str(t) == "Scalar": + return NamedCType(binds, ConstRefCType(BaseCType(scalarT))) + elif str(t) == "Scalar?": + return NamedCType(binds, ConstRefCType(OptionalCType(BaseCType(scalarT)))) + return cpp.argumenttype_type(t, mutable=mutable, binds=binds, symint=symint) + + +def returns_type(rs: Sequence[Return], *, symint: bool) -> CType: + return cpp.returns_type(rs, symint=symint) + + +def argument_type(a: Argument, *, binds: ArgName, symint: bool) -> NamedCType: + return argumenttype_type(a.type, mutable=a.is_write, binds=binds, symint=symint) + + +def argument( + a: Argument | SelfArgument | TensorOptionsArguments, + *, + is_out: bool, + symint: bool, +) -> list[Binding]: + # Ideally, we NEVER default native functions. However, there are a number + # of functions that call native:: directly and rely on the defaulting + # existing. So for BC, we generate defaults for non-out variants (but not + # for out variants, where it is impossible to generate an appropriate + # default) + should_default = not is_out + if isinstance(a, Argument): + default: str | None = None + if should_default and a.default is not None: + default = cpp.default_expr(a.default, a.type, symint=symint) + return [ + Binding( + nctype=argument_type(a, binds=a.name, symint=symint), + name=a.name, + default=default, + argument=a, + ) + ] + elif isinstance(a, SelfArgument): + # Erase SelfArgument from the distinction + return argument(a.argument, is_out=is_out, symint=symint) + elif isinstance(a, TensorOptionsArguments): + default = None + if should_default: + default = "{}" + # TODO: Not sure why the arguments assigned here are for + # TensorOptionsArguments and not the constituent pieces. It seems + # to matter + return [ + Binding( + nctype=NamedCType("dtype", OptionalCType(BaseCType(scalarTypeT))), + name="dtype", + default=default, + argument=a, + ), + Binding( + nctype=NamedCType("layout", OptionalCType(BaseCType(layoutT))), + name="layout", + default=default, + argument=a, + ), + Binding( + nctype=NamedCType("device", OptionalCType(BaseCType(deviceT))), + name="device", + default=default, + argument=a, + ), + Binding( + nctype=NamedCType("pin_memory", OptionalCType(BaseCType(boolT))), + name="pin_memory", + default=default, + argument=a, + ), + ] + else: + assert_never(a) + + +def arguments(func: FunctionSchema, *, symint: bool) -> list[Binding]: + args: list[Argument | TensorOptionsArguments | SelfArgument] = [] + args.extend(func.arguments.non_out) + args.extend(func.arguments.out) + return [ + r for arg in args for r in argument(arg, symint=symint, is_out=func.is_out_fn()) + ] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/python.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/python.py new file mode 100644 index 0000000000000000000000000000000000000000..1e8b939cf3c515c869c21634cd0738fb829aec12 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/python.py @@ -0,0 +1,1521 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import TYPE_CHECKING + +from torchgen.api import cpp +from torchgen.api.types import Binding, CppSignature, CppSignatureGroup +from torchgen.gen import pythonify_default +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + FunctionSchema, + ListType, + NativeFunction, + OptionalType, + Return, + Type, + Variant, +) + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Data Models +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# [Notes] python binding codegen +# +# The Python binding codegen produces code that takes the input list of +# PyObjects, finds the matching ATen C++ function using PythonArgParser, +# converts the PyObjects into C++ types and calls the ATen C++ function: +# +# +--------+ parsing +------------------------+ binding +-----------------------+ +# | PyObjs | ---------> | PythonArgParser Output | ---------> | Cpp Function Dispatch | +# +--------+ +------------------------+ +-----------------------+ +# +# The following examples demonstrate the data models the Python binding +# codegen needs to deal with and the tasks it needs to accomplish. It +# helps understand the purpose of the new data types we introduced below. +# +# - Function Schema (source of truth) +# +# aten::empty.names(int[] size, *, Dimname[]? names, +# ScalarType? dtype=None, Layout? layout=None, +# Device? device=None, bool? pin_memory=None, +# MemoryFormat? memory_format=None) -> Tensor +# +# - Python Signature +# +# It's used to generate input schema string for PythonArgParser. +# Note: TensorOptions fields are reordered and the additional +# 'requires_grad' field is added: +# +# empty(IntArrayRef size, *, DimnameList? names, +# MemoryFormat? memory_format=None, ScalarType dtype=None, +# Layout layout=torch.strided, Device device=None, +# bool pin_memory=False, bool requires_grad=False) +# +# - C++ Signature +# +# It's used to generate C++ lambda formals & dispatch call. +# Note: the scattered TensorOptions fields are packed into 'options'. +# +# auto dispatch_empty = +# [](IntArrayRef size, std::optional names, +# const TensorOptions & options, +# std::optional memory_format) -> Tensor { +# pybind11::gil_scoped_release no_gil; +# return torch::empty(size, names, options, memory_format); +# }; +# +# - Binding between Python Arguments and C++ Arguments +# +# Given a set of Python Arguments in scope, we need produce the +# binding expressions that translate the Python API into C++ API: +# +# Python Args Cpp Args Binding Exprs +# ----------------------------------------------------------------- +# 0: size size '_r.intlist(0)' +# 1: names names 'names' [special init] +# 2: memory_format -------+ +# 3: dtype -----+-|--> options 'options' [special packing] +# 4: layout / | +# 5: device / +--> memory_format '_r.memoryformatOptional(2)' +# 6: pin_memory / +# 7: requires_grad -+ +# +# So the full dispatch expression would look like: +# +# dispatch_empty(_r.intlist(0), names, options, +# _r.memoryformatOptional(2)) +# +# Where does 'names' come from? It involves special local init: +# +# auto __names = _r.toDimnameListOptional(1); +# std::optional names = +# __names ? std::make_optional(DimnameList(__names.value())) +# : std::nullopt; +# +# Where does 'options' come from? It involves special local init +# for TensorOptions. Note that Python side has the additional +# 'requires_grad' field: +# +# const auto options = TensorOptions() +# .dtype(_r.scalartype(3)) +# .device(_r.device(5)) +# .layout(_r.layoutOptional(4)) +# .requires_grad(_r.toBool(7)) +# .pinned_memory(_r.toBool(6)); +# +# In some other cases one Python Argument can map to multiple C++ +# Arguments. For example: +# +# aten::max.names_dim(Tensor self, Dimname dim, bool keepdim=False) +# -> (Tensor values, Tensor indices) +# +# Python Args Cpp Args Binding Exprs +# --------------------------------------------------------------------- +# +----> max 'out[0]' +# /-----> max_values 'out[1] +# 0: input / self '_r.tensor(0)' +# 1: dim / dim '_r.dimname(1)' +# 2: keepdim / keepdim '_r.toBool(2)' +# 3: out -----+ [local init] out '_r.tensorlist_n<2>(3)' +# +# As demonstrated above, the binding can involve reordering, +# packing, unpacking and special local inits. +# +# +# Let's look at a concrete example: +# +# static PythonArgParser parser({ +# "abs(Tensor input, *, Tensor out=None)", +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ^ +# +--- Python Schema, represented by PythonSignature and PythonArgument +# +# }, /*traceable=*/true); +# +# ParsedArgs<2> parsed_args; +# auto _r = parser.parse(nullptr, args, kwargs, parsed_args); +# +# ... +# +# if (_r.isNone(1)) { +# ~~~~~~~~~~~~ <--- Scattered PythonArgParser output (arg name = 'out') +# represented by PythonArgParserOutputExpr +# +# // aten::abs(Tensor self) -> Tensor +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ^ +# +--- NativeFunction schema, base version +# +# auto dispatch_abs = [](const Tensor & self) -> Tensor { +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ^ +# +--- dispatch_lambda_args / dispatch_lambda_return_str +# generated from NativeFunction / CppSignature +# (deprecated PythonSignature is special) +# arguments are represented by DispatchLambdaArgument +# +# pybind11::gil_scoped_release no_gil; +# return self.abs(); +# ~~~~~~~~~~~ <--- cpp_dispatch_target / cpp_dispatch_exprs +# generated from NativeFunction / CppSignature +# }; +# return wrap(dispatch_abs(_r.tensor(0))); +# ~~~~~~~~~~~~~ +# ^ +# +--- dispatch_lambda_exprs +# binding PythonArgParserOutputExpr (python args) +# and DispatchLambdaArgument (c++ args) +# +# } else { +# // aten::abs.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ^ +# +--- NativeFunction schema, out-variant +# +# auto dispatch_abs_out = [](Tensor out, const Tensor & self) -> Tensor { +# pybind11::gil_scoped_release no_gil; +# return at::abs_out(out, self); +# }; +# return wrap(dispatch_abs_out(_r.tensor(1), _r.tensor(0))); +# } +# +# +# [Notes] python interface codegen +# The python dataclasses below are used used to generate both python binding code +# and pyi type hint signatures. +# In theory these two should look very similar, but there are number of differences +# in how pyi signatures vs. python_arg_parser signatures are generated. +# These differences have been encapsulated in signature_str() vs. signature_str_pyi() +# to display the full signatures, and argument_str() vs argument_str_pyi() to display arguments. +# For examples, only pyi signatures include return types. + + +@dataclass(frozen=True) +class PythonReturns: + returns: tuple[Return, ...] + + +@dataclass(frozen=True) +class PythonArgument: + name: str + type: Type + default: str | None + + # Used to generate the default init expr for some PythonArgParser outputs, e.g.: + # + # _r.layoutWithDefault(3, layout_from_backend(self.options().backend()))) + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # ^ + # +--- default_init str + default_init: str | None + + # Compute argument formal for python argument parsing. + # Needs to be consistent with torch/csrc/utils/python_arg_parser.h. + def argument_str(self, *, method: bool = False, symint: bool = True) -> str: + type_str = ( + argument_type_str(self.type, symint=symint) + .replace("const ", "") + .replace(" &", "") + ) + + name = self.name + # s/self/input/ outside method bindings + # [old codegen] TODO: remove this? doesn't rename in codegen, it's just + # for the parse string + if name == "self" and type_str in ["Tensor", "Number"] and not method: + name = "input" + + # add default + if self.default is not None: + default = { + "nullptr": "None", + "::std::nullopt": "None", + "std::nullopt": "None", + "{}": "None", + }.get(self.default, self.default) + return f"{type_str} {name}={default}" + else: + return f"{type_str} {name}" + + def argument_str_pyi( + self, *, method: bool = False, deprecated: bool = False + ) -> str: + type_str = argument_type_str_pyi(self.type) + + name = self.name + # s/self/input/ outside method bindings + # [old codegen] TODO: remove this? doesn't rename in codegen, it's just + # for the parse string + if name == "self" and type_str == "Tensor" and not method and not deprecated: + name = "input" + + if name == "from": # from is a Python keyword... + name += "_" + + # pyi merges the _out and functional variants into the same signature, with an optional out arg + if name == "out" and type_str == "Tensor" and not deprecated: + type_str = "Optional[" + type_str + "]" + + # pyi deprecated signatures don't get defaults for their out arg + treat_as_no_default = ( + deprecated + and isinstance(self, PythonOutArgument) + and self.default == "None" + ) + + # add default + if self.default is not None and not treat_as_no_default: + if ( + isinstance(self.type, ListType) + and self.type.elem == BaseType(BaseTy.int) + and self.default.startswith("{") + and self.default.endswith("}") + ): + default = ( + "(" + ", ".join(map(str.strip, self.default[1:-1].split(","))) + ")" + ) + else: + default = { + "nullptr": "None", + "::std::nullopt": "None", + "std::nullopt": "None", + "{}": "None", + "c10::MemoryFormat::Contiguous": "contiguous_format", + "QScheme::PER_TENSOR_AFFINE": "per_tensor_affine", + }.get(self.default, self.default) + return f"{name}: {type_str} = {default}" + else: + return f"{name}: {type_str}" + + +@dataclass(frozen=True) +class PythonOutArgument(PythonArgument): + # In Python signature multiple output fields are packed into one 'out' argument. + # When binding to C++, it's first binded to a local 'out' variable: + # 'auto out = _r.tensorlist_n<2>(2);', + # then binded to scattered C++ output arguments as 'out[0]', 'out[1]', and etc. + # TODO: maybe don't need keep scattered out fields for python signature? + outputs: tuple[PythonArgument, ...] + + @staticmethod + def from_outputs(outputs: tuple[PythonArgument, ...]) -> PythonOutArgument | None: + if not outputs: + return None + + size = len(outputs) + if size == 1: + return PythonOutArgument( + name=outputs[0].name, + type=outputs[0].type, + default="None", + default_init=None, + outputs=outputs, + ) + elif size > 1: + if any(not a.type.is_tensor_like() for a in outputs): + raise RuntimeError(f"Unsupported output type: {outputs}") + return PythonOutArgument( + name="out", + # TODO: shouldn't this be OptionalType[ListType[...]], since it defaults to None? + type=ListType(BaseType(BaseTy.Tensor), size), + default="None", + default_init=None, + outputs=outputs, + ) + raise AssertionError(r"Unexpected PythonOutArgument size") + + +@dataclass(frozen=True) +class PythonSignature: + # Base operator name, without inplace/outplace suffix. + name: str + + # Positional arguments. + # TODO: create a dedicated SelfArgument type for 'self'? + input_args: tuple[PythonArgument, ...] + + # Keyword arguments excluding the 'out' argument and scattered kwargs belonging + # to TensorOptions (dtype, layout, device, pin_memory, requires_grad, etc). + input_kwargs: tuple[PythonArgument, ...] + + output_args: PythonOutArgument | None + + # Return types, which are only used by pyi + returns: PythonReturns + + # These are scattered kwargs arguments belonging to TensorOptions. + # When binding to C++, they are packed into a TensorOptions object 'options'. + # It's possible that the C++ signature doesn't take TensorOptions object (e.g. + # for out variant), in which case they will be used as scattered fields without + # being packed into 'options'. + # TODO: maybe create a PythonTensorOptionsArgument? + tensor_options_args: tuple[PythonArgument, ...] + + # method or function signature? + method: bool + + @property + def deprecated(self) -> bool: + return False + + def arguments( + self, *, skip_outputs: bool = False, skip_tensor_options: bool = False + ) -> tuple[PythonArgument | PythonOutArgument, ...]: + result: list[PythonArgument | PythonOutArgument] = [] + result.extend(self.input_args) + result.extend(self.input_kwargs) + if self.output_args is not None and not skip_outputs: + result.append(self.output_args) + if not skip_tensor_options: + result.extend(self.tensor_options_args) + return tuple(result) + + def arguments_count(self) -> int: + return len(self.arguments()) + + def output_idx(self) -> int: + return len(self.input_args) + len(self.input_kwargs) + + # [old codegen] Compute the Python function signature for argument parsing, + # as specified in torch/csrc/utils/python_arg_parser.h. WARNING: + # this is NOT the same type signature as specified by PEP 484 + # as understood by mypy; our format was independently developed + # and has some quirks to make it more suitable specifically + # for error parsing. + # + # For a translation to mypy-valid type signatures, see + # signature_str_pyi(). + def signature_str(self, *, skip_outputs: bool = False, symint: bool = True) -> str: + args = self.arguments(skip_outputs=skip_outputs) + schema_formals: list[str] = [ + a.argument_str(method=self.method, symint=symint) for a in args + ] + positional_argc = len(self.input_args) + if len(schema_formals) > positional_argc: + schema_formals.insert(positional_argc, "*") + + return f'{self.name}({", ".join(schema_formals)})' + + def signature_str_pyi(self, *, skip_outputs: bool = False) -> str: + args = self.arguments(skip_outputs=skip_outputs) + schema_formals: list[str] = [ + a.argument_str_pyi(method=self.method) for a in args + ] + positional_argc = len(self.input_args) + if len(schema_formals) > positional_argc: + schema_formals.insert(positional_argc, "*") + + # only pyi signatures include returns + returns_str = returns_str_pyi(self) + # pyi also includes self (with no typing/defaults) for methods + if self.method: + schema_formals.insert(0, "self") + return f'def {self.name}({", ".join(schema_formals)}) -> {returns_str}: ...' + + def signature_str_pyi_vararg(self, *, skip_outputs: bool = False) -> str | None: + # only pyi uses vararg signatures + args = self.arguments(skip_outputs=skip_outputs) + schema_formals: list[str] = [ + a.argument_str_pyi(method=self.method) for a in args + ] + # vararg only applies to pyi signatures. vararg variants are not generated for all signatures + num_args = self.arguments_count() + num_positionalargs = len(self.input_args) + + have_vararg_version = False + if num_args > 0: + vararg_type = args[0].type + if ( + isinstance(vararg_type, ListType) + and str(vararg_type.elem) in ["int", "SymInt"] + and num_positionalargs == 1 + ): + have_vararg_version = True + + if not have_vararg_version: + return None + + # Below are the major changes in vararg vs. regular pyi signatures + # vararg signatures also omit the asterix + assert isinstance(vararg_type, ListType) + schema_formals[0] = ( + "*" + args[0].name + ": " + argument_type_str_pyi(vararg_type.elem) + ) + + returns_str = returns_str_pyi(self) + # pyi also includes self (with no typing/defaults) for methods + if self.method: + schema_formals.insert(0, "self") + return f'def {self.name}({", ".join(schema_formals)}) -> {returns_str}: ...' + + +# The deprecated python signature involves some special logic, so create a +# dedicated data model to store these extra properties. +@dataclass(frozen=True) +class PythonSignatureDeprecated(PythonSignature): + # Schema for the deprecated function + deprecated_schema: FunctionSchema + + # The deprecated signature might miss some arguments that the corresponding + # C++ signature expects. We need store the constant default values to pass in. + # For example: + # [deprecate signature]: addmm(Scalar beta, Tensor self, Tensor mat1, Tensor mat2) + # [func schema]: aten::addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + # [func call]: self.addmm(mat1, mat2, beta, 1) + # We store ['self', 'mat1', 'mat2', 'beta', '1'] in this case. + deprecated_args_exprs: tuple[str, ...] + + @property + def deprecated(self) -> bool: + return True + + def signature_str(self, *, skip_outputs: bool = False, symint: bool = True) -> str: + return ( + PythonSignature.signature_str( + self, skip_outputs=skip_outputs, symint=symint + ) + + "|deprecated" + ) + + def signature_str_pyi(self, *, skip_outputs: bool = False) -> str: + args = self.arguments(skip_outputs=skip_outputs) + schema_formals: list[str] = [ + a.argument_str_pyi(method=self.method, deprecated=True) for a in args + ] + positional_argc = len(self.input_args) + if len(schema_formals) > positional_argc: + schema_formals.insert(positional_argc, "*") + + returns_str = returns_str_pyi(self) + return f'def {self.name}({", ".join(schema_formals)}) -> {returns_str}: ...' + + def signature_str_pyi_vararg(self, *, skip_outputs: bool = False) -> str | None: + # the codegen doesn't include vararg variants for deprecated signatures + return None + + +# This struct is used to hold the PythonSignature and its corresponding +# NativeFunction BEFORE grouping base and out-variant functions. +# Why not store NativeFunction in PythonSignature or construct PythonSignature +# from NativeFunction? Because they are not 1-1 mapped. +# One native function could have both deprecated and non-deprecated python +# signatures - NativeFunction doesn't contain information to construct the +# deprecated python signature. +# One python signature is used to handle both the base and the out-variant +# function - see 'PythonSignatureGroup'. +@dataclass(frozen=True) +class PythonSignatureNativeFunctionPair: + signature: PythonSignature + function: NativeFunction + + +# We merge pairs of functions with signatures that are equivalent mod +# output arguments, and use a single entry in the python_arg_parser sig +# list for both (output arguments become optional). +@dataclass(frozen=True) +class PythonSignatureGroup: + # The signature used for Python argument parsing. The outplace signature + # is preferred if exists, because it can be used to parse inputs for both + # the out-place variant and the base version (with output omitted). + signature: PythonSignature + + # The regular ATen declaration (e.g. conv2d) + base: NativeFunction + + # The out variant (e.g. conv2d_out) + outplace: NativeFunction | None + + @classmethod + def from_pairs( + cls, + functional: PythonSignatureNativeFunctionPair, + out: PythonSignatureNativeFunctionPair | None, + ) -> PythonSignatureGroup: + if out is None: + return PythonSignatureGroup( + signature=functional.signature, + base=functional.function, + outplace=None, + ) + + # prefer the signature with optional out=... arguments because it's the + # superset that can be used to parse input for both base and outplace. + signature_kwargs = out.signature.__dict__.copy() + + # Out overloads in C++ don't have TensorOptions arguments, + # so take these from the functional variant + signature_kwargs["tensor_options_args"] = ( + functional.signature.tensor_options_args + ) + + return PythonSignatureGroup( + signature=type(out.signature)(**signature_kwargs), + base=functional.function, + outplace=out.function, + ) + + +# C++ function dispatch is wrapped in a lambda function. The lambda function +# has almost the same signature as the C++ function, only with some small +# variants - see details below. +# This data model is used to represent arguments of the lambda function +# signature. +@dataclass(frozen=True) +class DispatchLambdaArgument: + name: str + type_str: str + is_out_arg: bool + + +# To pass PyObjects arguments to C++ function (via the lambda wrapper), +# we need first convert PyObjects into simple C++ objects. This work +# is done by PythonArgParser. +# This data model is used to represent the output of PythonArgParser. +# It has 1-1 mapping with PythonArgument in PythonSignature. +@dataclass(frozen=True) +class PythonArgParserOutputExpr: + # argument name + name: str + + # RHS expression to reference PythonArgParser output. + expr: str + + # In some special cases we need create different expr, e.g.: + # '_r.isNone(1)' instead of '_r.tensor(1)'. + index: int + + # The python argument it maps to. + argument: PythonArgument + + @property + def is_none_expr(self) -> str: + return f"_r.isNone({self.index})" + + +# To pass PythonArgParser output to the lambda wrapper, we need bind +# PythonArgParserOutputExpr to DispatchLambdaArgument. +# They are not always 1-1 mapped, e.g. scattered TensorOptions fields +# need be packed into a TensorOptions object, which is the argument +# that the lambda function wrapper takes. +@dataclass(frozen=True) +class DispatchLambdaArgumentExprs: + # The exprs that provide the binding for lambda arguments, e.g.: + # + # 'self' -> '_r.tensor(0)' + # 'min' -> 'out[0]' / 'min_indices' -> 'out[1]' + # 'options' -> 'options' + # + # It has 1-1 mapping with DispatchLambdaArgument. + exprs: Sequence[str] + + # Special local inits, which might introduce new variables that + # the 'exprs' above reference, e.g.: + # + # 'auto out = _r.tensorlist_n<2>(2);' + # + inits: Sequence[str] + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Helper Functions +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +def _cpp_signature(f: NativeFunction, *, method: bool = False) -> CppSignature: + return CppSignatureGroup.from_native_function(f, method=method).signature + + +def has_tensor_options(f: NativeFunction) -> bool: + return f.func.arguments.tensor_options is not None + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Python Signature +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +# 'simple_type' was introduced by the old codegen, which is slightly +# different from the python schema type, e.g.: doesn't have '?' suffix +# for optional Tensor/TensorList; doesn't have '[size]' suffix for list type. +def argument_type_str( + t: Type, *, simple_type: bool = False, symint: bool = True +) -> str: + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor: + return "Tensor" + elif t.name == BaseTy.int: + return "int64_t" + elif t.name == BaseTy.float: + return "double" + elif t.name == BaseTy.str: + return "c10::string_view" + elif t.name in [ + BaseTy.bool, + BaseTy.QScheme, + BaseTy.Scalar, + BaseTy.ScalarType, + BaseTy.Generator, + BaseTy.Storage, + BaseTy.Layout, + BaseTy.Device, + BaseTy.DeviceIndex, + BaseTy.MemoryFormat, + BaseTy.Dimname, + BaseTy.Stream, + BaseTy.SymInt, + ]: + # These python schema type names line up with their function schema names + return t.name.name + + elif isinstance(t, OptionalType): + if str(t.elem) == "Tensor": + # Is it desired to keep '?' for simple_type with new style dispatcher? + return "Tensor?" + elem = argument_type_str(t.elem, simple_type=simple_type, symint=symint) + return f"{elem}?" + elif isinstance(t, ListType): + size = t.size if not simple_type else None + if str(t.elem) == "bool": + assert t.size is not None + return f"::std::array" + elif str(t.elem) == "int": + return f"IntArrayRef[{size}]" if size is not None else "IntArrayRef" + elif str(t.elem) == "SymInt": + if symint: + return ( + f"SymIntArrayRef[{size}]" if size is not None else "SymIntArrayRef" + ) + else: + return f"IntArrayRef[{size}]" if size is not None else "IntArrayRef" + elif str(t.elem) == "Tensor": + return f"TensorList[{size}]" if size is not None else "TensorList" + elif str(t.elem) == "Scalar": + return f"ScalarList[{size}]" if size is not None else "ScalarList" + elif str(t.elem) == "Tensor?": + if simple_type: + return "c10::List<::std::optional>" + else: + return "const c10::List<::std::optional> &" + elif str(t.elem) == "Dimname": + return f"DimnameList[{size}]" if size is not None else "DimnameList" + elem = argument_type_str(t.elem, simple_type=simple_type, symint=symint) + return f"ArrayRef<{elem}>" + + raise RuntimeError(f"unrecognized type {repr(t)}") + + +def argument_type_size(t: Type) -> int | None: + l = t.is_list_like() + if l is not None and str(l.elem) != "bool": + return l.size + else: + return None + + +def argument(a: Argument) -> PythonArgument: + return PythonArgument( + name=a.name, + type=a.type, + # TODO: directly translate a.default to python default + default=( + str(pythonify_default(cpp.default_expr(a.default, a.type, symint=False))) + if a.default is not None + else None + ), + default_init=None, + ) + + +# Generates a PythonSignature that can be used for either .pyi or PythonArgParser codegen +def signature( + f: NativeFunction, *, method: bool = False, pyi: bool = False +) -> PythonSignature: + return signature_from_schema( + f.func, category_override=f.category_override, method=method, pyi=pyi + ) + + +def signature_from_schema( + func: FunctionSchema, + *, + category_override: str | None, + method: bool = False, + pyi: bool = False, +) -> PythonSignature: + args: list[Argument] = [] + args.extend(func.arguments.pre_self_positional) + # Skip SelfArgument if this is method. + if not method and func.arguments.self_arg is not None: + args.append(func.arguments.self_arg.argument) + args.extend(func.arguments.post_self_positional) + args.extend(func.arguments.pre_tensor_options_kwarg_only) + # Skip TensorOptionsArguments. Python side TensorOptions + # arguments are created based on different rules - see below. + args.extend(func.arguments.post_tensor_options_kwarg_only) + args.extend(func.arguments.out) + + input_arg_set = {a.name for a in func.arguments.flat_positional} + kwarg_only_set = {a.name for a in func.arguments.flat_kwarg_only} + out_arg_set = {a.name for a in func.arguments.out} + + input_args = tuple(map(argument, filter(lambda a: a.name in input_arg_set, args))) + input_kwargs = tuple( + map(argument, filter(lambda a: a.name in kwarg_only_set, args)) + ) + outputs = tuple(map(argument, filter(lambda a: a.name in out_arg_set, args))) + + # Reintroduce the scattered fields of TensorOptions for Python. + # Compared to the cpp counterpart, the python arguments have new property + # (default_init) and a new argument 'requires_grad', which require some + # special handlings. + # [old codegen] TODO: because these aren't guaranteed to be 100% faithful + # to the original versions in the yaml, this recreation is a potential + # source of drift between eager and JIT. Pull this logic out to a shared place. + + has_tensor_input_arg = any( + a.type.is_tensor_like() for a in func.arguments.flat_non_out + ) + if any(a.name == "requires_grad" for a in func.schema_order_arguments()): + raise ValueError( + "argument named requires_grad is reserved, should not explicitly add it in the schema" + ) + + # [old codegen] this probably won't work if one of the returns is not a tensor, + # but it will produce a compile-time error that is obvious. + has_tensor_return = any(r.type.is_tensor_like() for r in func.returns) + + name: str = cpp.name(func) + is_factory_function = category_override == "factory" or ( + has_tensor_return and not has_tensor_input_arg + ) + is_like_or_new_function = ( + category_override in ("new", "like") + or name.startswith("new_") + or name.endswith("_like") + ) + is_dummy_function = category_override == "dummy" + + tensor_options_args: list[PythonArgument] = [] + if (is_factory_function or is_like_or_new_function) and not is_dummy_function: + + def topt_default_init(name: str) -> str | None: + topt_args = func.arguments.tensor_options + if topt_args is None: + return None + a = getattr(topt_args, name) + if a.default is None or a.default == "None": + return None + return cpp.default_expr(a.default, a.type, symint=False) + + tensor_options_args.append( + PythonArgument( + name="dtype", + type=OptionalType(BaseType(BaseTy.ScalarType)), + default="None", + default_init=( + None if is_like_or_new_function else topt_default_init("dtype") + ), + ) + ) + tensor_options_args.append( + PythonArgument( + name="layout", + type=OptionalType(BaseType(BaseTy.Layout)), + default="None", + default_init=( + None if is_like_or_new_function else topt_default_init("layout") + ), + ) + ) + tensor_options_args.append( + PythonArgument( + name="device", + type=OptionalType(BaseType(BaseTy.Device)), + default="None", + default_init=( + None + if is_like_or_new_function + else ( + topt_default_init("device") + or "torch::tensors::get_default_device()" + ) + ), + ) + ) + tensor_options_args.append( + PythonArgument( + name="pin_memory", + type=OptionalType(BaseType(BaseTy.bool)), + default="False", + default_init=None, + ) + ) + tensor_options_args.append( + PythonArgument( + name="requires_grad", + type=OptionalType(BaseType(BaseTy.bool)), + default="False", + default_init=None, + ) + ) + + returns = PythonReturns(returns=func.returns) + + return PythonSignature( + name=str(func.name.name), + input_args=input_args, + input_kwargs=input_kwargs, + output_args=PythonOutArgument.from_outputs(outputs), + tensor_options_args=tuple(tensor_options_args), + returns=returns, + method=method, + ) + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Python Interface +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +def structseq_fieldnames(returns: tuple[Return, ...]) -> list[str]: + if len(returns) <= 1 or all(r.name is None for r in returns): + return [] + else: + if any(r.name is None for r in returns): + # When building on Windows, `PyStructSequence_UnnamedField` could not be + # resolved by the linker for some reason, which cause error in building: + # + # python_nn_functions.cpp.obj : error LNK2001: unresolved external symbol + # PyStructSequence_UnnamedField + # + # Thus, at this point in time, we do not support unnamed + # fields in structseq; you must either name all fields, + # or none of them. + raise ValueError("Unnamed field is not supported by codegen") + + return [str(r.name) for r in returns] + + +def argument_type_str_pyi(t: Type) -> str: + add_optional = False + if isinstance(t, OptionalType): + t = t.elem + add_optional = True + + if isinstance(t, BaseType): + if t.name in [BaseTy.int, BaseTy.DeviceIndex]: + ret = "_int" + if t.name == BaseTy.SymInt: + ret = "Union[_int, SymInt]" + elif t.name == BaseTy.float: + ret = "_float" + elif t.name == BaseTy.str: + ret = "str" + elif t.name == BaseTy.Scalar: + ret = "Union[Number, _complex]" + elif t.name == BaseTy.ScalarType: + ret = "_dtype" + elif t.name == BaseTy.bool: + ret = "_bool" + elif t.name == BaseTy.QScheme: + ret = "_qscheme" + elif t.name == BaseTy.Layout: + ret = "_layout" + elif t.name == BaseTy.Device: + ret = "Optional[DeviceLikeType]" + elif t.name == BaseTy.MemoryFormat: + ret = "memory_format" + elif t.name == BaseTy.Dimname: + ret = "Union[str, ellipsis, None]" + elif t.name == BaseTy.Storage: + ret = "Union[Storage, UntypedStorage]" + elif t.name in [BaseTy.Tensor, BaseTy.Generator, BaseTy.Stream]: + # These python schema type names line up with their function schema names + ret = t.name.name + + elif isinstance(t, ListType): + if str(t.elem) == "int": + ret = "Union[_int, _size]" if t.size is not None else "_size" + elif t.is_tensor_like(): + # TODO: this doesn't seem right... + # Tensor?[] currently translates to Optional[Union[tuple[Tensor, ...], list[Tensor]]] + # It should probably translate to Union[tuple[Optional[Tensor], ...], list[Optional[Tensor]]] + add_optional = True + ret = ( + "Union[Tensor, tuple[Tensor, ...], list[Tensor]]" + if t.size is not None + else "Union[tuple[Tensor, ...], list[Tensor]]" + ) + elif str(t.elem) == "float": + ret = "Sequence[_float]" + elif str(t.elem) == "SymInt" and t.size is not None: + elem = argument_type_str_pyi(t.elem) + ret = f"Union[{elem}, Sequence[{elem}]]" + else: + elem = argument_type_str_pyi(t.elem) + ret = f"Sequence[{elem}]" + + else: + raise RuntimeError(f"unrecognized type {repr(t)}") + + if add_optional: + ret = "Optional[" + ret + "]" + + return ret + + +def return_type_str_pyi(t: Type) -> str: + # Where arguments are open to accepting Union, return types should return + # concrete types + + if isinstance(t, OptionalType): + inner = return_type_str_pyi(t.elem) + return f"Optional[{inner}]" + + if isinstance(t, BaseType): + if t.name == BaseTy.Device: + return "_device" + elif t.name == BaseTy.Dimname: + return "Optional[str]" + else: + return argument_type_str_pyi(t) + + if isinstance(t, ListType): + inner = return_type_str_pyi(t.elem) + return f"tuple[{inner}, ...]" + + return argument_type_str_pyi(t) + + +def returns_structseq_pyi(signature: PythonSignature) -> tuple[str, str] | None: + python_returns = [return_type_str_pyi(r.type) for r in signature.returns.returns] + structseq_name = signature.name + field_names = structseq_fieldnames(signature.returns.returns) + if field_names: + # These types are structseq objects which act like named NamedTuples, but + # the constructor acts like the constructor of tuple. Using typing.NamedTuple + # does not allow us to override __init__. + seq_type = f"tuple[{', '.join(python_returns)}]" + structseq_def_lines = [ + f"class {structseq_name}({seq_type}):", + ] + for name, typ in zip(field_names, python_returns): + structseq_def_lines.extend( + [ + " @property", + f" def {name}(self) -> {typ}: ...", + ] + ) + structseq_def_lines.extend( + [ + f" def __new__(cls, sequence: {seq_type}): ...", + f" n_fields: _int = {len(field_names)}", + f" n_sequeunce_fields: _int = {len(field_names)}", + " n_unnamed_fields: _int = 0", + " def __init_subclass__(cls) -> NoReturn: ... # prohibit subclassing", + "", # add an extra newline + ] + ) + structseq_def = "\n".join(structseq_def_lines) + # Example: + # structseq_def = ( + # "class max(tuple[Tensor, Tensor]):\n" + # " @property\n" + # " def values(self) -> Tensor: ...\n" + # " @property\n" + # " def indices(self) -> Tensor: ...\n" + # " def __new__(cls, sequence: tuple[Tensor, Tensor]): ...\n" + # " n_fields: _int = 2", + # " n_sequeunce_fields: _int = 2", + # " n_unnamed_fields: _int = 0", + # " def __init_subclass__(cls) -> NoReturn: ... # prohibit subclassing", + # ) + return structseq_name, structseq_def + return None + + +def returns_str_pyi(signature: PythonSignature) -> str: + field_names = structseq_fieldnames(signature.returns.returns) + if field_names: + return f"torch.return_types.{signature.name}" + + python_returns = [return_type_str_pyi(r.type) for r in signature.returns.returns] + if len(python_returns) > 1: + return "tuple[" + ", ".join(python_returns) + "]" + if len(python_returns) == 1: + return python_returns[0] + return "None" + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# C++ Function Dispatch +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# This section provides APIs to generate the code that does C++ function +# dispatch. The C++ function call is wrapped by a lambda function. +# For example: +# +# // aten::selu_(Tensor(a!) self) -> Tensor(a!) +# auto dispatch_selu_ = [](Tensor self) -> Tensor { +# pybind11::gil_scoped_release no_gil; +# return at::selu_(self); +# }; +# +# The lambda function's signature follows the C++ signature in common +# cases, e.g.: +# +# // aten::add.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor +# [](const Tensor & self, const Tensor & other, Scalar alpha) -> Tensor +# +# For out variant the 'out' argument's type is changed from 'Tensor &' +# to 'Tensor'. It's because when calling the lambda it passes in the +# PythonArgParser output '_r.tensor(3)', which is stack allocated object +# and needs to pass by value. Also see comments in 'dispatch_lambda_return_str()'. +# +# // aten::add.out(Tensor self, Tensor other, *, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) +# [](Tensor out, const Tensor & self, const Tensor & other, Scalar alpha) -> Tensor +# +# For multi-output case it can keep using reference type because the +# PythonArgParser output has been unpacked to local variables, e.g.: +# +# // aten::max.names_dim_max(Tensor self, Dimname dim, bool keepdim=False, *, +# // Tensor(a!) max, Tensor(b!) max_values) -> (Tensor(a!) values, Tensor(b!) indices) +# [](Tensor & max, Tensor & max_values, const Tensor & self, Dimname dim, bool keepdim) -> std::tuple +# +# For deprecated python signature, it should follow deprecated python arg order. +# TODO: This is to keep same byte-for-byte result as the old codegen - maybe unnecessary? + + +def dispatch_lambda_args( + ps: PythonSignature, f: NativeFunction, symint: bool = True +) -> tuple[DispatchLambdaArgument, ...]: + if isinstance(ps, PythonSignatureDeprecated): + schema = ps.deprecated_schema + else: + schema = f.func + + # Start with cpp arguments - dispatch lambda signature always include 'self' + cpp_args = cpp.arguments( + arguments=schema.arguments, + faithful=False, + symint=symint, + method=False, + cpp_no_default_args=f.cpp_no_default_args, + ) + out_args: set[str] = {a.name for a in schema.arguments.out} + + # Convert from cpp argument to lambda argument + def dispatch_lambda_arg(cpp_arg: Binding) -> DispatchLambdaArgument: + type_str = cpp_arg.type + is_out_arg = cpp_arg.name in out_args + if ps.method and cpp_arg.name == "self": + # For method's 'self', we can use 'const Tensor &' and simply ignore mutability! + type_str = "const at::Tensor &" + else: + # For other cases we need prevent dangling refs to temps (unless it's + # unpacked scattered output) + # The reason is explained in the comments above and in 'dispatch_lambda_return_str()'. + # TODO: avoid this special handling? + ensure_temp_safe = len(out_args) <= 1 or not is_out_arg + if ensure_temp_safe: + type_str = { + "at::Tensor &": "at::Tensor", + }.get(type_str, type_str) + return DispatchLambdaArgument( + name=cpp_arg.name, + type_str=type_str, + is_out_arg=is_out_arg, + ) + + return tuple(map(dispatch_lambda_arg, cpp_args)) + + +# [old codegen] XXX: if you got here because of an assertion failure, it doesn't mean +# it's enough to just extend the list here. Before you do this, make sure +# to add an appropriate wrap() overload in torch/csrc/autograd/utils/wrap_outputs.h. +SUPPORTED_RETURN_TYPES = { + "at::Tensor", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple", + "::std::tuple>", + "::std::vector", + # Needed for flash attention forw/backward + "::std::tuple", + "at::Scalar", + "bool", + "int64_t", + "void*", + "void", + "at::QScheme", + "double", + "at::IntArrayRef", + "at::ScalarType", + "at::Stream", +} + + +def dispatch_lambda_return_str(f: NativeFunction) -> str: + # [old codegen] Remove type annotation (e.g. 'Tensor' rather than 'Tensor &') + # because the dispatch lambdas take mutable arguments *by value*, not + # by reference. If you then return a reference to such an argument, you + # will now have a pointer to a dangling stack entry. Not good. + # + # You want: + # + # auto dispatch_selu_ = [](Tensor self) -> Tensor { ...; return at::selu_(self); }; + # ^^^^^^ + # + # *not* + # + # auto dispatch_selu_ = [](Tensor self) -> Tensor& { ...; return at::selu_(self); }; + # ^^^^^^^ + # + # (NB: We can't make dispatch_selu_ take Tensor&, because the enclosing + # codegen looks like dispatch_selu_(_r.tensor(0)), and you can't take a + # mutable reference to temporary. Maybe we could assign it to a + # variable itself.) + returns_without_annotation = tuple( + Return(r.name, r.type, None) for r in f.func.returns + ) + return_str = cpp.returns_type(returns_without_annotation, symint=True).cpp_type() + if return_str not in SUPPORTED_RETURN_TYPES: + raise RuntimeError(f"{f.func.name} returns unsupported type {return_str}") + return return_str + + +def cpp_dispatch_target(f: NativeFunction) -> str: + symint = f.func.has_symint() + name = cpp.name(f.func, symint_overload=symint) + if Variant.method in f.variants: + return f"self.{name}" + if Variant.function in f.variants: + if has_tensor_options(f) or f.func.name.name.base.endswith("_like"): + namespace = "torch" + else: + namespace = "at" + return f"{namespace}::{name}" + raise RuntimeError(f"could not dispatch, neither function nor method: {f.func}") + + +def cpp_dispatch_exprs( + f: NativeFunction, + *, + python_signature: PythonSignature | None = None, +) -> tuple[str, ...]: + cpp_args: Sequence[Binding] = _cpp_signature(f, method=False).arguments() + + exprs: tuple[str, ...] = () + if not isinstance(python_signature, PythonSignatureDeprecated): + # By default the exprs are consistent with the C++ signature. + exprs = tuple(a.name for a in cpp_args) + else: + # For deprecated python signature we may need fill in some constants. + exprs = tuple( + filter( + lambda n: n != "out" or f.func.is_out_fn(), + python_signature.deprecated_args_exprs, + ) + ) + + if Variant.method in f.variants: + exprs = tuple(filter("self".__ne__, exprs)) + + return exprs + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Python / C++ Args Binding +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +# We explicitly enumerate the PythonArgParser unpacking methods for all +# supported types. This might be more verbose than necessary, partially +# because of the irregularity of unpacking method naming, partially +# because we want to mimic the old codegen behavior - to reject +# unexpected and/or unsupported cases which the old codegen rejects. +# For certain cases it is intentionally more restrictive than necessary, +# e.g.: it doesn't accepts doublelist with definite size. +def arg_parser_unpack_method( + t: Type, default: str | None, default_init: str | None, *, symint: bool = True +) -> str: + has_default_init = default_init is not None + if has_default_init and str(t) not in ( + "ScalarType?", + "ScalarType", + "Device", + "Device?", + "Layout", + "Layout?", + "bool", + "bool?", + ): + raise RuntimeError(f"type '{t}' does not supported unpacking with default") + + if isinstance(t, BaseType): + if t.name in [ + BaseTy.Tensor, + BaseTy.Stream, + BaseTy.Storage, + BaseTy.Scalar, + BaseTy.Dimname, + ]: + # These unpack methods line up with their schema names + return t.name.name.lower() + elif t.name == BaseTy.ScalarType: + return "scalartypeWithDefault" if has_default_init else "scalartype" + elif t.name == BaseTy.Device: + return "deviceWithDefault" if has_default_init else "device" + elif t.name == BaseTy.DeviceIndex: + return "toInt64" + elif t.name == BaseTy.int: + return "toInt64" + elif t.name == BaseTy.SymInt: + return "toSymInt" if symint else "toInt64" + elif t.name == BaseTy.bool: + return "toBoolWithDefault" if has_default_init else "toBool" + elif t.name == BaseTy.float: + return "toDouble" + elif t.name == BaseTy.str: + return "stringView" + elif t.name == BaseTy.Layout: + return "layoutWithDefault" if has_default_init else "layout" + elif t.name == BaseTy.MemoryFormat: + return "memoryformat" + + elif isinstance(t, OptionalType): + if str(t.elem) == "Tensor": + return "optionalTensor" + elif str(t.elem) == "Generator": + return "generator" + elif str(t.elem) == "Dimname[]": + return "toDimnameListOptional" + elif not has_default_init and default in ( + None, + "None", + "::std::nullopt", + "std::nullopt", + ): + # If default is None: append 'Optional' to elem's unpacking method + return ( + arg_parser_unpack_method(t.elem, None, None, symint=symint) + "Optional" + ) + else: + # Otherwise, load as underlying type with default + return arg_parser_unpack_method( + t.elem, default, default_init, symint=symint + ) + + elif isinstance(t, ListType): + if str(t.elem) == "Tensor": + # accept and use definite size + return f"tensorlist_n<{t.size}>" if t.size is not None else "tensorlist" + elif str(t.elem) == "Tensor?": + return "list_of_optional_tensors" + elif str(t.elem) == "Dimname": + # accept definite size + return "dimnamelist" + elif str(t.elem) == "int": + # accept definite size + return "intlist" + elif str(t.elem) == "float": + return "doublelist" + elif str(t.elem) == "SymInt": + # accept definite size + return "symintlist" if symint else "intlist" + elif str(t.elem) == "Scalar": + return "scalarlist" + raise RuntimeError(f"type '{t}' is not supported by PythonArgParser") + + +# Return RHS expression for python argument using PythonArgParser output. +# e.g. for arg name 'foo', arg type 'bool', arg_index = 2, returns '_r.toBool(2)' +def arg_parser_output_expr( + arg_index: int, a: PythonArgument, *, symint: bool = True +) -> PythonArgParserOutputExpr: + has_default = a.default_init is not None + unpack_method = arg_parser_unpack_method( + t=a.type, default=a.default, default_init=a.default_init, symint=symint + ) + default = f", {a.default_init}" if has_default else "" + expr = f"_r.{unpack_method}({arg_index}{default})" + + return PythonArgParserOutputExpr( + name=a.name, + expr=expr, + index=arg_index, + argument=a, + ) + + +# Returns a map with key = arg_name and value = PythonArgParserOutputExpr. +def arg_parser_output_exprs( + ps: PythonSignature, f: NativeFunction, *, symint: bool = True +) -> dict[str, PythonArgParserOutputExpr]: + return { + e.name: e + for i, a in enumerate(ps.arguments()) + for e in (arg_parser_output_expr(i, a, symint=symint),) + } + + +# argument name to type for scattered tensor options fields +TENSOR_OPTIONS_FIELDS = { + "dtype": "ScalarType?", + "device": "Device?", + "layout": "Layout?", + "pin_memory": "bool?", + "requires_grad": "bool?", +} + + +# bind arg parser outputs (python args) with dispatch lambda arguments (c++ args). +def dispatch_lambda_exprs( + ps: PythonSignature, f: NativeFunction, *, symint: bool = True +) -> DispatchLambdaArgumentExprs: + # This method is to bind 'arg_parser_outputs' and 'lambda_args' by producing + # 'inits' and 'lambda_args_exprs' for each lambda argument using arg parser + # outputs. + arg_parser_outputs = arg_parser_output_exprs(ps, f, symint=symint) + lambda_args = dispatch_lambda_args(ps, f, symint=symint) + inits: list[str] = [] + lambda_args_exprs: dict[str, str] = {} + + has_toptions = has_tensor_options(f) + + # 1. special inits/unpacking to provide binding exprs for lambda arguments. + for a in ps.arguments(skip_tensor_options=True): + name = a.name + arg_parser_expr = arg_parser_outputs[a.name].expr + + if has_toptions and name == "self": + # TODO: why this needs to be special case? + inits.extend( + [ + f"auto self = {arg_parser_expr};", + ] + ) + lambda_args_exprs[name] = name + elif ( + isinstance(a, PythonOutArgument) + and len(a.outputs) > 1 + and f.func.is_out_fn() + ): + inits.extend( + [ + f"auto out = {arg_parser_expr};", + ] + ) + for i, out_arg in enumerate(a.outputs): + lambda_args_exprs[out_arg.name] = f"out[{i}]" + elif str(a.type) == "Dimname[]?": + # [old codegen] + # TODO: make this part of something more general, or get rid of it. + # optional> are special. The PythonArgParser returns an + # optional>, which cannot be implicitly converted to + # optional>. One needs to unwrap the optional and rewrap. + inits.extend( + [ + f"auto __{name} = {arg_parser_expr};", + f"::std::optional {name} = __{name} ? ::std::make_optional(DimnameList(__{name}.value())) : ::std::nullopt;", # noqa: B950 + ] + ) + lambda_args_exprs[name] = name + else: + # default case - directly using PythonArgParser output expr + lambda_args_exprs[name] = arg_parser_expr + + # method's self is passed directly to python binding, rather than parsed + if ps.method: + lambda_args_exprs["self"] = "self" + + # 2. special packing/checking for TensorOptions. + tensor_options_args_names = [a.name for a in ps.tensor_options_args] + if has_toptions: + if f.func.is_out_fn(): + raise RuntimeError(f"{f.func}: tensor options with output arg") + for a in ps.tensor_options_args: + if a.name not in TENSOR_OPTIONS_FIELDS: + raise RuntimeError( + f"{f.func}: unrecognized tensor options field '{a.name}' in python binding arguments" + ) + if str(a.type) != TENSOR_OPTIONS_FIELDS.get(a.name): + raise RuntimeError( + f"{f.func}: unrecognized type '{str(a.type)}' for tensor options field '{a.name}'" + ) + if not all(a in tensor_options_args_names for a in TENSOR_OPTIONS_FIELDS): + raise RuntimeError( + f"{f.func}: incomplete tensor options args: {tensor_options_args_names}" + ) + + inits.append( + f"""\ +const auto options = TensorOptions() + .dtype({arg_parser_outputs['dtype'].expr}) + .device({arg_parser_outputs['device'].expr}) + .layout({arg_parser_outputs['layout'].expr}) + .requires_grad({arg_parser_outputs['requires_grad'].expr}) + .pinned_memory({arg_parser_outputs['pin_memory'].expr}); +torch::utils::maybe_initialize_device(options); +""" + ) + lambda_args_exprs["options"] = "options" + + # 3. special case - access scattered TensorOptions fields without packing + # TODO: maybe move to the generator side as it's not related to binding. + if not has_toptions and tensor_options_args_names: + if "dtype" in tensor_options_args_names: + # we're an output-arg variant, check these args against output tensor + if not f.func.is_out_fn(): + raise RuntimeError( + f"{f.func}: dtype in tensor_options_args without output arg, {ps} {ps.arguments}" + ) + if not all(a in tensor_options_args_names for a in ("layout", "device")): + raise RuntimeError( + f"{f.func}: incomplete tensor options for output check" + ) + + inits.append( + f"""\ +check_out_type_matches({arg_parser_outputs['out'].expr}, {arg_parser_outputs['dtype'].expr}, + {arg_parser_outputs['dtype'].is_none_expr}, {arg_parser_outputs['layout'].expr}, + {arg_parser_outputs['device'].expr}, {arg_parser_outputs['device'].is_none_expr}); +""" + ) + # we'll set requires_grad on outgoing tensor + if "requires_grad" not in tensor_options_args_names: + raise RuntimeError( + f'{f.func}: expected "requires_grad" in tensor_options_args absent, but found [{tensor_options_args_names}]' + ) + + return DispatchLambdaArgumentExprs( + exprs=tuple(lambda_args_exprs[a.name] for a in lambda_args), + inits=inits, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/structured.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/structured.py new file mode 100644 index 0000000000000000000000000000000000000000..a4a7ac9cc30a7838297dda96099441822e92ac17 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/structured.py @@ -0,0 +1,157 @@ +from __future__ import annotations + +from torchgen.api import cpp +from torchgen.api.types import ( + ArgName, + ArrayRefCType, + BaseCType, + Binding, + ConstRefCType, + dimnameListT, + intArrayRefT, + iOptTensorListRefT, + iTensorListRefT, + NamedCType, + OptionalCType, + optionalIntArrayRefT, + optionalScalarRefT, + optionalTensorRefT, + scalarT, + tensorT, +) +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + ListType, + NativeFunctionsGroup, + OptionalType, + SelfArgument, + TensorOptionsArguments, + Type, +) +from torchgen.utils import assert_never + + +# This file describes the translation of JIT schema to the structured functions API. +# This is similar to native API, but a number of historical problems with native +# API have been fixed. + + +# Translation of types occurring in JIT arguments to a C++ argument type. +# NB: For now, mutable doesn't do anything; but it could if we make +# some more nominal types +def argumenttype_type(t: Type, *, mutable: bool, binds: ArgName) -> NamedCType: + # If it's a value type, do the value type translation + # NB: structured kernels ALWAYS have symint off, since they involve actual + # kernels that require real ints. The one exception is the + # CompositeExplicitAutograd and the meta function (which could + # hypothetically be SymInt), but for simplicity we plan for these to just + # be handled in Python + r = cpp.valuetype_type(t, symint=False, binds=binds, mutable=mutable) + if r is not None: + return r + + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor: + return NamedCType(binds, ConstRefCType(BaseCType(tensorT))) + elif t.name == BaseTy.Scalar: + return NamedCType(binds, ConstRefCType(BaseCType(scalarT))) + else: + raise AssertionError(f"base type should have been value type {t}") + elif isinstance(t, OptionalType): + if t.elem == BaseType(BaseTy.Tensor): + return NamedCType(binds, BaseCType(optionalTensorRefT)) + elif t.elem == BaseType(BaseTy.Scalar): + return NamedCType(binds, BaseCType(optionalScalarRefT)) + elif isinstance(t.elem, ListType) and str(t.elem.elem) == "int": + return NamedCType(binds, BaseCType(optionalIntArrayRefT)) + elem = argumenttype_type(t.elem, mutable=mutable, binds=binds) + return NamedCType(binds, OptionalCType(elem.type)) + elif isinstance(t, ListType): + if t.elem == BaseType(BaseTy.Tensor): + return NamedCType(binds, ConstRefCType(BaseCType(iTensorListRefT))) + elif t.elem == OptionalType(BaseType(BaseTy.Tensor)): + return NamedCType(binds, BaseCType(iOptTensorListRefT)) + # TODO: delete these special cases; see torchgen.api.cpp--these + # must be changed in tandem, but there are problems; see + # https://github.com/pytorch/pytorch/pull/51485 + elif str(t.elem) == "int": + return NamedCType(binds, BaseCType(intArrayRefT)) + elif str(t.elem) == "Dimname": + return NamedCType(binds, BaseCType(dimnameListT)) + elem = argumenttype_type(t.elem, mutable=mutable, binds=binds) + return NamedCType(binds, ArrayRefCType(elem.type)) + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +def argument_type(a: Argument, *, binds: ArgName) -> NamedCType: + return argumenttype_type(a.type, mutable=a.is_write, binds=binds) + + +# returns_type intentionally omitted, because structured kernels never "return"; +# instead, they always indirectly report their outputs (in the case of a meta +# function, by calling set_output; in the case of an impl function, by writing +# directly into the provided out argument). + + +# Structured kernels are never defaulted +def argument(a: Argument | SelfArgument | TensorOptionsArguments) -> list[Binding]: + if isinstance(a, Argument): + return [ + Binding( + nctype=argument_type(a, binds=a.name), + name=a.name, + default=None, + argument=a, + ) + ] + elif isinstance(a, SelfArgument): + return argument(a.argument) + elif isinstance(a, TensorOptionsArguments): + raise AssertionError("structured kernels don't support TensorOptions yet") + else: + assert_never(a) + + +def impl_arguments(g: NativeFunctionsGroup) -> list[Binding]: + args: list[Argument | TensorOptionsArguments | SelfArgument] = [] + + if g.out.precomputed: + # A list of parameters for the impl function with + # certain parameters replaced with precomputed counterparts + # as specified in native_functions.yaml. + non_out_args_replaced: list[ + Argument | TensorOptionsArguments | SelfArgument + ] = [] + for a in g.out.func.arguments.non_out: + if isinstance(a, Argument) and a.name in g.out.precomputed.replace: + # If a is in precompute.replace, append the parameters + # that should replace it onto non_out_args_replaced. + non_out_args_replaced.extend(g.out.precomputed.replace[a.name]) + else: + # If not, push a as it is. + non_out_args_replaced.append(a) + + args.extend(non_out_args_replaced) + # g.out.precomputed.add is the list of parameters that are added + # without replacement after the non out args and just before the out args + args.extend(g.out.precomputed.add) + else: + args.extend(g.out.func.arguments.non_out) + + args.extend(g.out.func.arguments.out) + return [r for arg in args for r in argument(arg)] + + +def meta_arguments(g: NativeFunctionsGroup) -> list[Binding]: + args: list[Argument | TensorOptionsArguments | SelfArgument] = [] + args.extend(g.functional.func.arguments.non_out) + return [r for arg in args for r in argument(arg)] + + +def out_arguments(g: NativeFunctionsGroup) -> list[Binding]: + args: list[Argument | TensorOptionsArguments | SelfArgument] = [] + args.extend(g.out.func.arguments.out) + return [r for arg in args for r in argument(arg)] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/translate.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/translate.py new file mode 100644 index 0000000000000000000000000000000000000000..e119e436bd296e0d592da40b2682a3e328eb9cad --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/translate.py @@ -0,0 +1,437 @@ +from __future__ import annotations + +from typing import NoReturn, TYPE_CHECKING + +from torchgen.api.types import ( + ArrayRefCType, + BaseCType, + Binding, + boolT, + ConstRefCType, + deviceT, + Expr, + intArrayRefT, + iOptTensorListRefT, + layoutT, + ListCType, + longT, + memoryFormatT, + MutRefCType, + NamedCType, + opmath_t, + OptionalCType, + optionalIntArrayRefT, + optionalScalarRefT, + optionalSymIntArrayRefT, + optionalTensorRefT, + scalar_t, + scalarT, + scalarTypeT, + SpecialArgName, + symIntArrayRefT, + SymIntT, + tensorOptionsT, + tensorT, + VectorCType, +) + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +# This file implements a small program synthesis engine that implements +# conversions between one API to another. +# +# The key data type in this file in NamedCType, short for Named C++ semantic type. A NamedCType +# represents a C++ type, plus semantic information about what it represents. +# For example, consider the argument "bool pin_memory"; its normal C++ type is +# "bool", but its C++ semantic type also keeps track that this represents a +# "pin_memory"; you can't just use a random other boolean in a context where you +# need a "pin_memory"! +# +# The translator takes a list of needed NamedCTypes, and then figures out how +# to construct expressions with these NamedCTypes from the given bindings. Many +# of these expressions are trivial (I need a Tensor other; there's a Tensor +# other scope); others are more nontrivial and may require packing/unpacking. +# Some examples of non-trivial action: +# +# - Need the "dtype" binding? Well, maybe "dtype" isn't available +# in the context, instead, "options" is, and you need to extract +# it from there. (Gather) +# +# - Need the "context" binding? Well, maybe "context" isn't available +# in the context, and you need to construct it from "dtype", "device", +# etc. (Scatter) +# +# - Need the "memory_format" binding? Well, actually, it's available +# from both "memory_format" and "options", so you had better make sure +# they are consistent. (Join) + +options_ctype = NamedCType("options", ConstRefCType(BaseCType(tensorOptionsT))) + +out_tensor_ctype = NamedCType("out", ConstRefCType(BaseCType(tensorT))) + +longVec_ctype = VectorCType(BaseCType(longT)) +longSymVec_ctype = VectorCType(BaseCType(SymIntT)) +optionalLongVec_ctype = OptionalCType(VectorCType(BaseCType(longT))) +optionalScalar_ctype = OptionalCType(BaseCType(scalarT)) +optionalTensor_ctype = OptionalCType(BaseCType(tensorT)) + + +class UnsatError(RuntimeError): + pass + + +# Given a set of in-scope bindings and a set of target bindings, synthesize +# a list of expressions that uses only the in-scope bindings (bindings) that +# have all of the types of goals. You may want to use this function if +# you're generating code for a function like: +# +# void f({args}) { +# g({exprs}); // g is a different API +# } +# +# and you need to generate "exprs". +# +# Typically, a list of Bindings is convenient to get (you usually call something +# like arguments() to get them); but technically you only need less information: +# for 'bindings' an (un-ordered) list of Exprs is sufficient; similarly, for +# 'goals', an (ordered) list of NamedCType goals is sufficient. If you are doing +# something more complicated, e.g., tracking the set of bindings in a context, +# you may find using these smaller types more convenient. +def translate( + bindings: Sequence[Expr | Binding], + goals: Sequence[NamedCType | Binding], + *, + method: bool = False, + allow_expensive_conversions: bool = False, +) -> list[Expr]: + binding_exprs: list[Expr] = [] + for b in bindings: + if isinstance(b, Binding): + binding_exprs.append( + Expr( + expr=b.name, + type=b.nctype, + ) + ) + else: + binding_exprs.append(b) + + goal_ctypes: list[NamedCType] = [] + for g in goals: + if isinstance(g, Binding): + goal_ctypes.append(g.nctype) + else: + goal_ctypes.append(g) + + # Add all the bindings to the context + ctx: dict[NamedCType, str] = {} + for b in binding_exprs: + ctx[b.type] = b.expr + + # While we're at it, do some simple forward inference, looking through + # constructors. + # + # NB: When should you do forward inference versus backward inference? + # The general idea: + # + # - Backward inference WHEN the goal gets smaller + # - Forward inference WHEN the hypothesis gets smaller + # + # This helps ensure termination: backward inference starts with a goal + # and tries to make it simpler and simpler until it's trivial; if the + # goal can grow in size, we blow up to a really huge goal size. + # Similarly, with forward inference we take hypotheses and decompose + # them into simpler hypotheses; if hypotheses could expand in size, + # we also have potential nontermination. (In the code below, forward + # inference is only ever carried out at a single step, but you could + # imagine repeated application of forward inference being profitable.) + # + # A good starting point in the literature for exploring more about proof + # search are these lecture notes + # https://www.cs.cmu.edu/~fp/courses/oregon-m10/04-focusing.pdf + # + # TODO: My kingdom for a pattern matcher + # https://www.python.org/dev/peps/pep-0634/ + # + # TODO: This could get us in recomputation trouble if b.expr is nontrivial. + # Fix this by implementing some sort of sharing so that if multiple + # goals share the same expression, we only compute it once. This seems + # to matter in practice as compiler is often unwilling to CSE nontrivial + # expressions like scalar.to() + t = b.type + if ( + isinstance(t, ConstRefCType) + and isinstance(t.elem, OptionalCType) + and isinstance(t.elem.elem, BaseCType) + and str(t.elem.elem.type) == "at::Tensor" + ): + ctx[NamedCType(t.elem.elem.name, ConstRefCType(BaseCType(tensorT)))] = ( + f"({b.expr}.has_value() ? *{b.expr} : at::Tensor())" + ) + + if t.type == ConstRefCType(OptionalCType(BaseCType(tensorT))): + ctx[NamedCType(t.name, BaseCType(optionalTensorRefT))] = ( + f"(({b.expr}.has_value() && (*{b.expr}).defined()) ? at::OptionalTensorRef(*{b.expr}) : at::OptionalTensorRef())" + ) + + if t.type == ConstRefCType(BaseCType(scalarT)): + ctx[NamedCType(t.name, BaseCType(opmath_t))] = f"({b.expr}).to()" + + if t.type == ConstRefCType(OptionalCType(BaseCType(scalarT))): + ctx[NamedCType(t.name, BaseCType(optionalScalarRefT))] = ( + f"({b.expr}.has_value() ? at::OptionalScalarRef(&({b.expr}.value())) : at::OptionalScalarRef())" + ) + + if t.type == BaseCType(scalar_t): + ctx[NamedCType(t.name, BaseCType(opmath_t))] = ( + f"static_cast({b.expr})" + ) + + # [Note: IOptTensorListRef] + if t.type == ConstRefCType(ListCType(OptionalCType(BaseCType(tensorT)))): + ctx[NamedCType(t.name, BaseCType(iOptTensorListRefT))] = ( + f"at::IOptTensorListRef({b.expr})" + ) + + # Add implicit bindings if the generated code is inside a Tensor method + if method: + ctx[NamedCType("self", MutRefCType(BaseCType(tensorT)))] = ( + "const_cast(*this)" + ) + ctx[NamedCType("self", ConstRefCType(BaseCType(tensorT)))] = ( + "const_cast(*this)" + ) + # This is better! Byte-for-byte compat + # ctx[NamedCType("self", ConstRefCType(BaseCType(tensorT)))] = "*this" + + def unsat(goal: NamedCType) -> NoReturn: + ctx_desc = "\n".join( + f" {t.cpp_type()} {t.name}; // {e}" for t, e in ctx.items() + ) + raise UnsatError( + f""" +Failed to synthesize the expression "{goal.cpp_type()} {goal.name}". +When I failed, the following bindings were available in the context: + +{ctx_desc} + +This probably means there is a missing rule in the rules of torchgen.api.translate. +Check this module for more information. +""" + ) + + # A shitty backtracking search implementation. It's shitty because it + # does backtracking via stack (bad idea!) and for the most part tries to + # avoid backtracking. In particular, if + # direct=True, we won't try to do any fancy synthesis, just trivial + # conversions (e.g., "T a" is OK for "const T& a"). So all of the + # existing rules in this function simply try to solve immediately, + # and bail if things don't work out. + def solve(goal: NamedCType, *, direct: bool) -> str: + def direct_solve(goal: NamedCType) -> str: + return solve(goal, direct=True) + + if goal in ctx: + # Trivial + return ctx[goal] + + # const & is satisfied with mutable & + if isinstance(goal.type, ConstRefCType): + try: + # WARNING: not strictly decreasing; be careful not + # to add a direct conversion that goes satisfies + # mutable& with const& + return solve( + NamedCType(goal.name, MutRefCType(goal.type.elem)), direct=direct + ) + except UnsatError: + pass + + # mutable & is satisfied with value + if isinstance(goal.type, MutRefCType): + try: + return solve(NamedCType(goal.name, goal.type.elem), direct=direct) + except UnsatError: + pass + + # TODO: These are referentially equal, shouldn't have to do this; + # ensuring we don't use type synonym IntArrayRef in codegen would + # help + if goal.type == ArrayRefCType(BaseCType(longT)): + return solve(NamedCType(goal.name, BaseCType(intArrayRefT)), direct=direct) + + if direct: + unsat(goal) + + # For now, all of these rules are mutually exclusive. + if goal == NamedCType("memory_format", OptionalCType(BaseCType(memoryFormatT))): + memory_format = direct_solve( + NamedCType( + SpecialArgName.possibly_redundant_memory_format, + OptionalCType(BaseCType(memoryFormatT)), + ) + ) + # No need to join "memory_format" and "options" if the target API takes "options" directly. + # Otherwise it will cause the redundant memory_format error. + if options_ctype in goal_ctypes: + return memory_format + try: + options = direct_solve(options_ctype) + return f"c10::impl::check_tensor_options_and_extract_memory_format({options}, {memory_format})" + except UnsatError: + return memory_format + elif goal == NamedCType("options", BaseCType(tensorOptionsT)): + dtype = direct_solve( + NamedCType("dtype", OptionalCType(BaseCType(scalarTypeT))) + ) + pin_memory = direct_solve( + NamedCType("pin_memory", OptionalCType(BaseCType(boolT))) + ) + device = direct_solve( + NamedCType("device", OptionalCType(BaseCType(deviceT))) + ) + layout = direct_solve( + NamedCType("layout", OptionalCType(BaseCType(layoutT))) + ) + return f"TensorOptions().dtype({dtype}).layout({layout}).device({device}).pinned_memory({pin_memory})" + + elif goal == NamedCType("dtype", OptionalCType(BaseCType(scalarTypeT))): + try: + options = direct_solve(options_ctype) + return f"c10::optTypeMetaToScalarType({options}.dtype_opt())" + except UnsatError: + out_tensor = direct_solve(out_tensor_ctype) + return f"{out_tensor}.scalar_type()" + + elif goal == NamedCType("layout", OptionalCType(BaseCType(layoutT))): + try: + options = direct_solve(options_ctype) + return f"{options}.layout_opt()" + except UnsatError: + out_tensor = direct_solve(out_tensor_ctype) + return f"{out_tensor}.layout()" + + elif goal == NamedCType("device", OptionalCType(BaseCType(deviceT))): + try: + options = direct_solve(options_ctype) + return f"{options}.device_opt()" + except UnsatError: + out_tensor = direct_solve(out_tensor_ctype) + return f"{out_tensor}.device()" + + elif goal == NamedCType("pin_memory", OptionalCType(BaseCType(boolT))): + try: + options = direct_solve(options_ctype) + return f"{options}.pinned_memory_opt()" + except UnsatError: + # If we're calling a factory op from its out= variant, + # We don't actually care about the value of pin_memory. + out_tensor = direct_solve(out_tensor_ctype) + return "::std::nullopt" + + # We can always do translations from value types to reference types, like vector -> IntArrayRef + elif goal.type == BaseCType(intArrayRefT): + try: + return direct_solve(NamedCType(goal.name, longVec_ctype)) + except UnsatError: + # We can also go SymIntArrayRef -> IntArrayRef + symIntArrayRef_type = direct_solve( + NamedCType(goal.name, BaseCType(symIntArrayRefT)) + ) + return f"C10_AS_INTARRAYREF_SLOW({symIntArrayRef_type})" + elif goal.type == BaseCType(symIntArrayRefT): + try: + r = direct_solve(NamedCType(goal.name, BaseCType(intArrayRefT))) + return f"c10::fromIntArrayRefSlow({r})" + except UnsatError: + return direct_solve(NamedCType(goal.name, longSymVec_ctype)) + elif goal.type == BaseCType(SymIntT): + return direct_solve(NamedCType(goal.name, BaseCType(longT))) + elif goal.type == OptionalCType(BaseCType(SymIntT)): + argname = direct_solve( + NamedCType(goal.name, OptionalCType(BaseCType(longT))) + ) + return f"{argname}.has_value() ? ::std::make_optional(c10::SymInt(*{argname})) : ::std::nullopt" + elif goal.type == BaseCType(longT): + symInt_type = direct_solve(NamedCType(goal.name, BaseCType(SymIntT))) + return f"{symInt_type}.guard_int(__FILE__, __LINE__)" + elif goal.type == OptionalCType(BaseCType(longT)): + argname = direct_solve( + NamedCType(goal.name, OptionalCType(BaseCType(SymIntT))) + ) + return f"{argname}.has_value() ? ::std::make_optional({argname}->guard_int(__FILE__, __LINE__)) : ::std::nullopt" + elif goal.type == BaseCType(optionalIntArrayRefT): + try: + return direct_solve(NamedCType(goal.name, optionalLongVec_ctype)) + except UnsatError: + argname = direct_solve( + NamedCType(goal.name, BaseCType(optionalSymIntArrayRefT)) + ) + return f"{argname}.has_value() ? ::std::make_optional(C10_AS_INTARRAYREF_SLOW(*{argname})) : ::std::nullopt" + elif goal.type == BaseCType(optionalSymIntArrayRefT): + # TODO: You might also want to solve this from longSymVec_ctype or + # an optional version of it + argname = direct_solve( + NamedCType(goal.name, BaseCType(optionalIntArrayRefT)) + ) + return f"{argname}.has_value() ? ::std::make_optional(c10::fromIntArrayRefSlow(*{argname})) : ::std::nullopt" + elif goal.type == BaseCType(optionalScalarRefT): + return direct_solve(NamedCType(goal.name, optionalScalar_ctype)) + elif goal.type == BaseCType(optionalTensorRefT): + return direct_solve(NamedCType(goal.name, optionalTensor_ctype)) + + # Note [translation from C++ reference to value types] + # The below cases are all for when we have an argument with a reference type, + # and a corresponding goal with a value type. + # These are needed when we populate the inputs to a lambda capture and we need + # to guarantee the lifetime of each captured argument. + # We guard it with an explicit kwarg because converting to a value type is expensive + # (O(n)) to convert from IntArrayRef to vector), + # so the caller of translate() should be explicit that they need it. + if allow_expensive_conversions: + if goal.type == VectorCType(BaseCType(longT)): + intArrayRef_ctype = NamedCType(goal.name, BaseCType(intArrayRefT)) + argname = direct_solve(intArrayRef_ctype) + return f"{argname}.vec()" + if goal.type == VectorCType(BaseCType(SymIntT)): + symIntArrayRef_ctype = NamedCType(goal.name, BaseCType(symIntArrayRefT)) + argname = direct_solve(symIntArrayRef_ctype) + return f"{argname}.vec()" + elif goal.type == OptionalCType(VectorCType(BaseCType(longT))): + optionalIntArrayRef_ctype = NamedCType( + goal.name, BaseCType(optionalIntArrayRefT) + ) + argname = direct_solve(optionalIntArrayRef_ctype) + return f"{argname}.has_value() ? ::std::make_optional({argname}->vec()) : ::std::nullopt" + elif goal.type == OptionalCType(BaseCType(scalarT)): + optionalScalarRef_ctype = NamedCType( + goal.name, BaseCType(optionalScalarRefT) + ) + argname = direct_solve(optionalScalarRef_ctype) + return f"{argname}.has_value() ? ::std::make_optional({argname}) : ::std::nullopt" + elif goal.type == OptionalCType(BaseCType(scalarT)): + optionalTensorRef_ctype = NamedCType( + goal.name, BaseCType(optionalTensorRefT) + ) + argname = direct_solve(optionalTensorRef_ctype) + return f"{argname}.has_value() ? ::std::make_optional({argname}) : ::std::nullopt" + # Technically, we also need to handle cases of C++ containers holding reference types. + # But there currently aren't any ops that require lambda capture codegen + # With arguments like ::std::vector. + # If that changes, we'll have to add the translation here. + + # We allow const casting on tensors, since const-correctness is a bit broken for at::Tensor. + # We could probably generalize this to non-tensor types too. + if goal.type == MutRefCType(BaseCType(tensorT)): + const_ref_tensor_ctype = NamedCType( + goal.name, ConstRefCType(BaseCType(tensorT)) + ) + argname = direct_solve(const_ref_tensor_ctype) + return f"const_cast({argname})" + + unsat(goal) + + return [Expr(solve(g, direct=False), g) for g in goal_ctypes] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3b48163dbd3706644e162f899267674b86bf053e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__init__.py @@ -0,0 +1,5 @@ +from torchgen.api.types.types import * +from torchgen.api.types.types_base import * + + +from torchgen.api.types.signatures import * # usort: skip diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..056dec8ff31cc76fe56626743c2bb326a1fe3d2e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/signatures.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/signatures.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f69431846e3bac983f9d338f8e494940bab2e63 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/signatures.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/types.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/types.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..656556cab6c784750c0db8bee8e9fba37cf7a190 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/types.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/types_base.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/types_base.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c8bf4c22c881864487d119753f6b1954c8f5e208 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/__pycache__/types_base.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/signatures.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/signatures.py new file mode 100644 index 0000000000000000000000000000000000000000..a56cc8bc794cbdae2fb9b09578b7016f059f8d51 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/signatures.py @@ -0,0 +1,426 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import TYPE_CHECKING + +from torchgen.api.types.types_base import Binding, CType, Expr + + +if TYPE_CHECKING: + from collections.abc import Iterator, Sequence + + from torchgen.model import ( + BackendIndex, + FunctionSchema, + NativeFunction, + NativeFunctionsGroup, + NativeFunctionsViewGroup, + ) + + +@dataclass(frozen=True) +class CppSignature: + """ + A CppSignature represents a single overload in the C++ API. For + any given function schema, there may be multiple CppSignatures + corresponding to it, based on how we desugar to C++. See also + CppSignatureGroup. + """ + + # The schema this signature is derived from + func: FunctionSchema + + # Is this a C++ signature for a method, i.e. Tensor::my_op(...)? + method: bool + + # Is this a faithful C++ signature (i.e. following the JIT schema) or a convenience API + # (i.e. with a potential TensorOptions argument and out arguments in the front) + faithful: bool + + # Is this a symint C++ signature. For BC reasons, functions that take + # SymInts still present as int64_t in C++, and the SymInt variant is + # offered at a different overload name + # + # NB: If a function RETURNS a SymInt, this is ALWAYS false + symint: bool + + # The set of C++ arguments which should not have defaults applied to them + cpp_no_default_args: set[str] + + # Is this a fallback C++ binding? Fallback bindings are enabled by + # manual_cpp_binding: True and are alternate, non-public API that + # lets manual C++ binding implementors access the binding that would + # have been automatically generated + fallback_binding: bool = False + + # Return the unpacked argument structure of this signature, + # discarding information about which arguments are semantically + # related to each other. + def arguments(self) -> Sequence[Binding]: + return cpp.arguments( + self.func.arguments, + faithful=self.faithful, + symint=self.symint, + method=self.method, + cpp_no_default_args=self.cpp_no_default_args, + ) + + def name(self, *, suppress_symint_suffix: bool = False) -> str: + n = cpp.name( + self.func, + faithful_name_for_out_overloads=self.faithful, + symint_overload=False if suppress_symint_suffix else self.symint, + ) + if self.fallback_binding: + n = f"__dispatch_{n}" + return n + + # Render the C++ declaration for this signature + def decl( + self, + *, + name: str | None = None, + prefix: str = "", + is_redispatching_fn: bool = False, + suppress_symint_suffix: bool = False, + ) -> str: + returns_type = cpp.returns_type( + self.func.returns, symint=self.symint + ).cpp_type() + cpp_args = [a.decl() for a in self.arguments()] + if is_redispatching_fn: + cpp_args = ["c10::DispatchKeySet dispatchKeySet"] + cpp_args + cpp_args_str = ", ".join(cpp_args) + if name is None: + name = prefix + self.name(suppress_symint_suffix=suppress_symint_suffix) + return f"{returns_type} {name}({cpp_args_str})" + + # Render the C++ definition for this signature, not including + # the body (with curly braces) + def defn( + self, + *, + name: str | None = None, + prefix: str = "", + is_redispatching_fn: bool = False, + ) -> str: + returns_type = cpp.returns_type( + self.func.returns, symint=self.symint + ).cpp_type() + cpp_args = [a.defn() for a in self.arguments()] + if is_redispatching_fn: + cpp_args = ["c10::DispatchKeySet dispatchKeySet"] + cpp_args + cpp_args_str = ", ".join(cpp_args) + if name is None: + name = prefix + self.name() + return f"{returns_type} {name}({cpp_args_str})" + + def ptr_type(self) -> str: + args_types_str = ", ".join(a.type for a in self.arguments()) + return f"{cpp.returns_type(self.func.returns, symint=self.symint).cpp_type()} (*)({args_types_str})" + + # Return the C++ function type, e.g., something like int(bool) + def type(self) -> str: + args_types_str = ", ".join(a.type for a in self.arguments()) + return f"{cpp.returns_type(self.func.returns, symint=self.symint).cpp_type()} ({args_types_str})" + + +# Represents group of all CppSignatures associated with a +# FunctionSchema. Right now, that's the regular, user-visible +# signature, as well as a "faithful" signature which doesn't +# have grouping. +@dataclass(frozen=True) +class CppSignatureGroup: + func: FunctionSchema + signature: CppSignature + faithful_signature: CppSignature | None + symint_signature: CppSignature | None + symint_faithful_signature: CppSignature | None + + def most_faithful_signature(self) -> CppSignature: + if self.faithful_signature: + return self.faithful_signature + else: + return self.signature + + def signatures(self, *, symint: bool = True) -> Iterator[CppSignature]: + yield self.signature + if self.faithful_signature: + yield self.faithful_signature + if symint: + if self.symint_signature: + yield self.symint_signature + if self.symint_faithful_signature: + yield self.symint_faithful_signature + + @staticmethod + def from_native_function( + f: NativeFunction, *, method: bool, fallback_binding: bool = False + ) -> CppSignatureGroup: + func = f.func + + def make_sig(*, faithful: bool, symint: bool) -> CppSignature: + return CppSignature( + func=func, + faithful=faithful, + symint=symint, + method=method, + fallback_binding=fallback_binding, + cpp_no_default_args=f.cpp_no_default_args, + ) + + def make_sigs(*, symint: bool) -> tuple[CppSignature, CppSignature | None]: + faithful_signature: CppSignature | None = None + if func.arguments.tensor_options is not None or len(func.arguments.out) > 0: + faithful_signature = make_sig(faithful=True, symint=symint) + signature = make_sig(faithful=False, symint=symint) + return signature, faithful_signature + + signature, faithful_signature = make_sigs(symint=False) + symint_signature: CppSignature | None = None + symint_faithful_signature: CppSignature | None = None + if func.has_symint(): + symint_signature, symint_faithful_signature = make_sigs(symint=True) + + return CppSignatureGroup( + func=func, + signature=signature, + faithful_signature=faithful_signature, + symint_signature=symint_signature, + symint_faithful_signature=symint_faithful_signature, + ) + + +@dataclass(frozen=True) +class DispatcherSignature: + # The schema this signature is derived from + func: FunctionSchema + + # Allows you to prepend an arbitrary prefix to the signature name. + # This is useful for parts of the codegen that generate wrappers around kernels, + # and need to avoid naming collisions. + prefix: str = "" + + symint: bool = True + + def arguments(self) -> list[Binding]: + return dispatcher.arguments(self.func, symint=self.symint) + + def name(self) -> str: + return self.prefix + dispatcher.name(self.func) + + def decl(self, name: str | None = None) -> str: + args_str = ", ".join(a.decl() for a in self.arguments()) + if name is None: + name = self.name() + return f"{self.returns_type().cpp_type()} {name}({args_str})" + + def defn( + self, name: str | None = None, *, is_redispatching_fn: bool = False + ) -> str: + args = [a.defn() for a in self.arguments()] + if is_redispatching_fn: + args = ["c10::DispatchKeySet dispatchKeySet"] + args + args_str = ", ".join(args) + if name is None: + name = self.name() + return f"{self.returns_type().cpp_type()} {name}({args_str})" + + def exprs(self) -> list[Expr]: + return [Expr(a.name, a.nctype) for a in self.arguments()] + + def returns_type(self) -> CType: + return dispatcher.returns_type(self.func.returns, symint=self.symint) + + def ptr_type(self) -> str: + dispatcher_args_types_str = ", ".join(a.type for a in self.arguments()) + return f"{self.returns_type().cpp_type()} (*)({dispatcher_args_types_str})" + + # Return the C++ function type, e.g., something like int(bool) + def type(self) -> str: + dispatcher_args_types_str = ", ".join(a.type for a in self.arguments()) + return f"{self.returns_type().cpp_type()} ({dispatcher_args_types_str})" + + @staticmethod + def from_schema( + func: FunctionSchema, *, prefix: str = "", symint: bool = True + ) -> DispatcherSignature: + return DispatcherSignature(func, prefix, symint) + + +@dataclass(frozen=True) +class NativeSignature: + # The schema this signature is derived from + func: FunctionSchema + + symint: bool + + prefix: str = "" + + def name(self) -> str: + return self.prefix + native.name(self.func) + + def decl(self, name: str | None = None) -> str: + args_str = ", ".join(a.decl() for a in self.arguments()) + if name is None: + name = self.name() + return f"{native.returns_type(self.func.returns, symint=self.symint).cpp_type()} {name}({args_str})" + + def defn(self, name: str | None = None) -> str: + args_str = ", ".join(a.defn() for a in self.arguments()) + if name is None: + name = self.name() + return f"{native.returns_type(self.func.returns, symint=self.symint).cpp_type()} {name}({args_str})" + + def ptr_type(self) -> str: + # don't include defaults in type signature! + args_str = ", ".join(a.defn() for a in self.arguments()) + return f"{native.returns_type(self.func.returns, symint=self.symint).cpp_type()} (*)({args_str})" + + def arguments(self) -> list[Binding]: + return native.arguments(self.func, symint=self.symint) + + def returns_type(self) -> CType: + return native.returns_type(self.func.returns, symint=self.symint) + + def dispatcher_exprs(self) -> list[Expr]: + return translate.translate( + self.arguments(), dispatcher.arguments(self.func), method=False + ) + + +@dataclass(frozen=True) +class ViewInverseSignature: + g: NativeFunctionsViewGroup + + def name(self) -> str: + return functionalization.reverse_name(self.g.view, include_namespace=False) + + def decl(self) -> str: + return_type = functionalization.returns_type(self.g.view.func) + decls = [ + a.decl() + for a in functionalization.inner_arguments( + self.g.view.func, is_reverse=True + ) + ] + return f"static {return_type.cpp_type()} {self.name()}({', '.join(decls)});" + + +@dataclass(frozen=True) +class FunctionalizationLambda: + g: NativeFunctionsViewGroup + + # are we generating the forward lambda or the reverse lambda? + is_reverse: bool + + def captures(self) -> list[Expr]: + # The lambda lives inside of a kernel following the dispatcher API, so its outer context is the dispatcher arguments + # We also need to read the "reapply views" TLS at the time that the functionalization kernel was executed, + # and plumb it into the lambda. + outer_ctx = dispatcher.arguments(self.g.view.func) + [ + functionalization.reapply_views_binding, + functionalization.inverse_return_mode_binding, + ] + capture_bindings = functionalization.capture_arguments( + self.g.view.func, is_reverse=self.is_reverse + ) + # allow_expensive_conversions is set because we want to convert + # some reference types (IntArrayRef) to value types (vector). + capture_exprs = translate.translate( + outer_ctx, capture_bindings, method=False, allow_expensive_conversions=True + ) + return capture_exprs + + def decl(self) -> str: + return_type = functionalization.returns_type(self.g.view.func) + capture_str = ", ".join( + f"{val.type.name} = {val.expr}" for val in self.captures() + ) + decls = [ + a.decl() + for a in functionalization.outer_arguments(is_reverse=self.is_reverse) + ] + return f"[{capture_str}]({', '.join(decls)}) -> {return_type.cpp_type()}" + + def inner_call(self, *, reapply_views: bool | None = None) -> str: + inner_call_name = functionalization.name( + self.g, + is_reverse=self.is_reverse, + include_namespace=True, + reapply_views=reapply_views, + ) + + arg_ctx = functionalization.outer_arguments(is_reverse=self.is_reverse) + capture_ctx = functionalization.capture_arguments( + self.g.view.func, is_reverse=self.is_reverse + ) + full_ctx = arg_ctx + capture_ctx + + assert self.g.view_copy is not None + call_bindings = functionalization.inner_arguments( + self.g.view_copy.func, is_reverse=self.is_reverse + ) + maybe_index = functionalization.inner_call_index(self.g.view_copy.func) + call_exprs = [ + e.expr for e in translate.translate(full_ctx, call_bindings, method=False) + ] + if not self.is_reverse and maybe_index is not None: + return f'{inner_call_name}({", ".join(call_exprs)})[{maybe_index.name}];' + else: + return f'{inner_call_name}({", ".join(call_exprs)});' + + @staticmethod + def from_func( + g: NativeFunctionsViewGroup, *, is_reverse: bool + ) -> FunctionalizationLambda: + return FunctionalizationLambda(g, is_reverse) + + +@dataclass(frozen=True) +class StructuredImplSignature: + g: NativeFunctionsGroup + name: str + + def defn(self, name: str | None = None) -> str: + args_str = ", ".join(a.defn() for a in self.arguments()) + return f"TORCH_IMPL_FUNC({self.name})({args_str})" + + def arguments(self) -> list[Binding]: + return structured.impl_arguments(self.g) + + +# Helper functions + + +def kernel_signature( + f: NativeFunction, backend_index: BackendIndex, *, prefix: str = "" +) -> NativeSignature | DispatcherSignature: + # Note [External Backends Follow Dispatcher API] + # Kernel signatures for in-tree backends follow the "native" API, + # while kernels for out-of-tree backends follow the dispatcher API. + # See the comments in `native.py` for details, but historically there have been + # some small differences in schema convention between them and the Dispatcher API. + # Any differences that require translating between the two will results in a runtime cost, + # so we'd like to keep the differences as small as possible. + # With external backends, we'd like to enforce that they write their kernels with schemas + # that match the Dispatcher API directly, if they can. + meta = backend_index.get_kernel(f) + symint = meta is not None and meta.supports_symint() + if symint: + assert f.func.has_symint(), f"attempted to define symint kernel for {backend_index.dispatch_key} without SymInt in schema" + if backend_index.external: + return DispatcherSignature.from_schema(f.func, prefix=prefix, symint=symint) + else: + return NativeSignature(f.func, prefix=prefix, symint=symint) + + +# Functions only, no types +from torchgen.api import ( + cpp, + dispatcher, + functionalization, + native, + structured, + translate, +) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/types.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/types.py new file mode 100644 index 0000000000000000000000000000000000000000..d0870cff5b1c06f28b7fb7f99ebf1704843dcf10 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/types.py @@ -0,0 +1,191 @@ +""" +Where should I add a new type? `types_base.py` vs `types.py` + +This file defines data model classes for torchgen typing system, as well as some base types such as int32_t. + +`types.py` defines ATen Tensor type and some c10 types, along with signatures that use these types. + +The difference between these two files, is `types_base.py` should be implementation-agnostic, meaning it shouldn't +contain any type definition that is tight to a specific C++ library (e.g., ATen), so that it can be easily reused +if we want to generate code for another C++ library. + +Add new types to `types.py` if these types are ATen/c10 related. +Add new types to `types_base.py` if they are basic and not attached to ATen/c10. +""" + +from __future__ import annotations + +from dataclasses import dataclass + +from torchgen.api.types.types_base import ( + BaseCppType, + BaseCType, + boolT, + byteT, + charT, + CType, + doubleT, + floatT, + int32T, + longT, + shortT, +) +from torchgen.model import BaseTy, ScalarType + + +TENSOR_LIST_LIKE_CTYPES = [ + "at::TensorList", + "const c10::List<::std::optional> &", + "const at::ITensorListRef &", +] + + +halfT = BaseCppType("at", "Half") +complexHalfT = BaseCppType( + "c10", "complex" +) # stuffing template param here is an abuse +complexFloatT = BaseCppType("c10", "complex") +complexDoubleT = BaseCppType("c10", "complex") +bfloat16T = BaseCppType("at", "BFloat16") +float8_e5m2T = BaseCppType("at", "Float8_e5m2") +float8_e5m2fnuzT = BaseCppType("at", "Float8_e5m2fnuz") +float8_e4m3fnT = BaseCppType("at", "Float8_e4m3fn") +float8_e4m3fnuzT = BaseCppType("at", "Float8_e4m3fnuz") +stringT = BaseCppType("c10", "string_view") +generatorT = BaseCppType("at", "Generator") +scalarTypeT = BaseCppType("at", "ScalarType") +tensorT = BaseCppType("at", "Tensor") +optionalTensorRefT = BaseCppType("at", "OptionalTensorRef") +tensorListT = BaseCppType("at", "TensorList") +iTensorListRefT = BaseCppType("at", "ITensorListRef") +iOptTensorListRefT = BaseCppType("at", "IOptTensorListRef") +dimnameT = BaseCppType("at", "Dimname") +dimnameListT = BaseCppType("at", "DimnameList") +dimVectorT = BaseCppType("at", "DimVector") +layoutT = BaseCppType("at", "Layout") +deviceT = BaseCppType("at", "Device") +deviceIndexT = BaseCppType("at", "DeviceIndex") +scalarT = BaseCppType("at", "Scalar") +optionalScalarRefT = BaseCppType("at", "OptionalScalarRef") +memoryFormatT = BaseCppType("at", "MemoryFormat") +qschemeT = BaseCppType("at", "QScheme") +storageT = BaseCppType("at", "Storage") +streamT = BaseCppType("at", "Stream") +intArrayRefT = BaseCppType("at", "IntArrayRef") +optionalIntArrayRefT = BaseCppType("at", "OptionalIntArrayRef") +optionalSymIntArrayRefT = BaseCppType("at", "OptionalSymIntArrayRef") +tensorOptionsT = BaseCppType("at", "TensorOptions") +typeAndSizeT = BaseCppType("torch::autograd::generated", "TypeAndSize") +tensorGeometryT = BaseCppType("at", "TensorGeometry") +SymIntT = BaseCppType("c10", "SymInt") +symIntArrayRefT = BaseCppType("c10", "SymIntArrayRef") + +# Types representing template parameters. Technically, we probably shouldn't +# represent them this way in codegen, but it was pretty convenient. +scalar_t = BaseCppType("", "scalar_t") +opmath_t = BaseCppType("", "opmath_t") + +ScalarTypeToCppMapping: dict[ScalarType, BaseCppType] = { + ScalarType.Byte: byteT, + ScalarType.Char: charT, + ScalarType.Short: shortT, + ScalarType.Int: int32T, + ScalarType.Long: longT, + ScalarType.Half: halfT, + ScalarType.Float: floatT, + ScalarType.Double: doubleT, + ScalarType.ComplexHalf: complexHalfT, + ScalarType.ComplexFloat: complexFloatT, + ScalarType.ComplexDouble: complexDoubleT, + ScalarType.Bool: boolT, + ScalarType.Float8_e5m2: float8_e5m2T, + ScalarType.Float8_e5m2fnuz: float8_e5m2fnuzT, + ScalarType.Float8_e4m3fn: float8_e4m3fnT, + ScalarType.Float8_e4m3fnuz: float8_e4m3fnuzT, +} + +BaseTypeToCppMapping: dict[BaseTy, BaseCppType] = { + BaseTy.int: longT, + BaseTy.float: doubleT, + BaseTy.bool: boolT, + BaseTy.str: stringT, + BaseTy.Generator: generatorT, + BaseTy.ScalarType: scalarTypeT, + BaseTy.Tensor: tensorT, + BaseTy.Dimname: dimnameT, + BaseTy.DimVector: dimVectorT, + BaseTy.Layout: layoutT, + BaseTy.Device: deviceT, + BaseTy.DeviceIndex: deviceIndexT, + BaseTy.Scalar: scalarT, + BaseTy.MemoryFormat: memoryFormatT, + BaseTy.QScheme: qschemeT, + BaseTy.Storage: storageT, + BaseTy.Stream: streamT, + BaseTy.SymInt: SymIntT, +} + +# CTypes encode C++ type structure as needed for translation. + + +@dataclass(frozen=True) +class OptionalCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f"::std::optional<{self.elem.cpp_type()}>" + + def cpp_type_registration_declarations(self) -> str: + return f"::std::optional<{self.elem.cpp_type_registration_declarations()}>" + + def remove_const_ref(self) -> CType: + return OptionalCType(self.elem.remove_const_ref()) + + +@dataclass(frozen=True) +class ListCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f"c10::List<{self.elem.cpp_type()}>" + + def cpp_type_registration_declarations(self) -> str: + return f"c10::List<{self.elem.cpp_type_registration_declarations()}>" + + def remove_const_ref(self) -> CType: + return ListCType(self.elem.remove_const_ref()) + + +@dataclass(frozen=True) +class ArrayRefCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f"at::ArrayRef<{self.elem.cpp_type()}>" + + def cpp_type_registration_declarations(self) -> str: + return f"ArrayRef<{self.elem.cpp_type_registration_declarations()}>" + + def remove_const_ref(self) -> CType: + return ArrayRefCType(self.elem.remove_const_ref()) + + +@dataclass(frozen=True) +class VectorizedCType(CType): + # This template is explicitly specialized, so the only valid + # elems are those we have specializations for (e.g., float, double, ...) + # scalar_t is also a common argument here (when we are codegen in + # a templated context) + elem: BaseCType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + return f"at::vec::Vectorized<{self.elem.cpp_type()}>" + + def cpp_type_registration_declarations(self) -> str: + raise NotImplementedError + + def remove_const_ref(self) -> CType: + return self diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/types_base.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/types_base.py new file mode 100644 index 0000000000000000000000000000000000000000..c24016d74ef4835686532c8f544fcd77f1776765 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/types/types_base.py @@ -0,0 +1,276 @@ +""" +Where should I add a new type? `types_base.py` vs `types.py` + +This file defines data model classes for torchgen typing system, as well as some base types such as int32_t. + +`types.py` defines ATen Tensor type and some c10 types, along with signatures that use these types. + +The difference between these two files, is `types_base.py` should be implementation-agnostic, meaning it shouldn't +contain any type definition that is tight to a specific C++ library (e.g., ATen), so that it can be easily reused +if we want to generate code for another C++ library. + +Add new types to `types.py` if these types are ATen/c10 related. +Add new types to `types_base.py` if they are basic and not attached to ATen/c10. +""" + +from __future__ import annotations + +from abc import ABC, abstractmethod +from dataclasses import dataclass +from enum import auto, Enum +from typing import TYPE_CHECKING, Union + + +if TYPE_CHECKING: + from torchgen.model import Argument, SelfArgument, TensorOptionsArguments + + +# An ArgName is just the str name of the argument in schema; +# but in some special circumstances, we may add a little extra +# context. The Enum SpecialArgName covers all of these cases; +# grep for their construction sites to see when they can occur. + + +class SpecialArgName(Enum): + possibly_redundant_memory_format = auto() + + +ArgName = Union[str, SpecialArgName] + + +# This class shouldn't be created directly; instead, use/create one of the singletons below. +@dataclass(frozen=True) +class BaseCppType: + ns: str | None + name: str + + def __str__(self) -> str: + if self.ns is None or self.ns == "": + return self.name + return f"{self.ns}::{self.name}" + + +# The set of all non-templated, valid, fully-qualified names of C++ types that are used in the codegen. +# Templated types get their own dataclass, mainly to make namespace parsing easier. +byteT = BaseCppType("", "uint8_t") +charT = BaseCppType("", "int8_t") +shortT = BaseCppType("", "int16_t") +# It would be more symmetric for this to be called intT, but it easy to mix +# this up with JIT int (which is int64_t in C++), so we intentionally don't +# define intT to make it obvious when you've stuffed it up +int32T = BaseCppType("", "int32_t") +longT = BaseCppType("", "int64_t") +doubleT = BaseCppType("", "double") +floatT = BaseCppType("", "float") +boolT = BaseCppType("", "bool") +voidT = BaseCppType("", "void") + + +class CType(ABC): + @abstractmethod + def cpp_type(self, *, strip_ref: bool = False) -> str: + raise NotImplementedError + + @abstractmethod + def cpp_type_registration_declarations(self) -> str: + raise NotImplementedError + + @abstractmethod + def remove_const_ref(self) -> CType: + return self + + +@dataclass(frozen=True) +class BaseCType(CType): + type: BaseCppType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + return str(self.type) + + # For BC reasons, we don't want to introduce at:: namespaces to RegistrationDeclarations.yaml + # TODO: Kill this when we eventually remove it! + def cpp_type_registration_declarations(self) -> str: + return str(self.type).replace("at::", "") + + def remove_const_ref(self) -> CType: + return self + + +@dataclass(frozen=True) +class ConstRefCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + if strip_ref: + return self.elem.cpp_type(strip_ref=strip_ref) + return f"const {self.elem.cpp_type()} &" + + def cpp_type_registration_declarations(self) -> str: + return f"const {self.elem.cpp_type_registration_declarations()} &" + + def remove_const_ref(self) -> CType: + return self.elem.remove_const_ref() + + +@dataclass(frozen=True) +class VectorCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f"::std::vector<{self.elem.cpp_type()}>" + + def cpp_type_registration_declarations(self) -> str: + return f"::std::vector<{self.elem.cpp_type_registration_declarations()}>" + + def remove_const_ref(self) -> CType: + return VectorCType(self.elem.remove_const_ref()) + + +@dataclass(frozen=True) +class ArrayCType(CType): + elem: CType + size: int + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f"::std::array<{self.elem.cpp_type()},{self.size}>" + + def cpp_type_registration_declarations(self) -> str: + return f"::std::array<{self.elem.cpp_type_registration_declarations()},{self.size}>" + + def remove_const_ref(self) -> CType: + return ArrayCType(self.elem.remove_const_ref(), self.size) + + +@dataclass(frozen=True) +class TupleCType(CType): + elems: list[CType] + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f'::std::tuple<{",".join([e.cpp_type() for e in self.elems])}>' + + def cpp_type_registration_declarations(self) -> str: + return f'::std::tuple<{",".join([e.cpp_type_registration_declarations() for e in self.elems])}>' + + def remove_const_ref(self) -> CType: + return TupleCType([e.remove_const_ref() for e in self.elems]) + + +@dataclass(frozen=True) +class MutRefCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + if strip_ref: + return self.elem.cpp_type(strip_ref=strip_ref) + return f"{self.elem.cpp_type()} &" + + def cpp_type_registration_declarations(self) -> str: + return f"{self.elem.cpp_type_registration_declarations()} &" + + def remove_const_ref(self) -> CType: + return self.elem.remove_const_ref() + + +# A NamedCType is short for Named C++ semantic type. A NamedCType represents a C++ type, plus +# semantic information about what it represents. For example, consider the +# argument "bool pin_memory"; its normal C++ type is "bool", but its C++ +# semantic type also keeps track that this represents a "pin_memory"; you can't +# just use a random other boolean in a context where you need a "pin_memory"! +# + + +@dataclass(frozen=True) +class NamedCType: + name: ArgName + type: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + return self.type.cpp_type(strip_ref=strip_ref) + + # For BC reasons, we don't want to introduce at:: namespaces to RegistrationDeclarations.yaml + # TODO: Kill this when we eventually remove it! + def cpp_type_registration_declarations(self) -> str: + return self.type.cpp_type_registration_declarations() + + def remove_const_ref(self) -> NamedCType: + return NamedCType(self.name, self.type.remove_const_ref()) + + def with_name(self, name: str) -> NamedCType: + return NamedCType(name, self.type) + + +# A binding represents any C++ binding site for a formal parameter. +# We don't distinguish between binding sites for different APIs; +# instead, all of the important distinctions are encoded in CType, +# which you can use to figure out if a given Binding is appropriate +# for use in another context. (See torchgen.api.translate) + + +@dataclass(frozen=True) +class Binding: + name: str + nctype: NamedCType + argument: Argument | TensorOptionsArguments | SelfArgument + # TODO: maybe don't represent default here + default: str | None = None + + def rename(self, name: str) -> Binding: + return Binding( + name=name, + nctype=self.nctype, + argument=self.argument, + default=self.default, + ) + + @property + def type(self) -> str: + return self.nctype.cpp_type() + + def no_default(self) -> Binding: + return Binding( + name=self.name, + nctype=self.nctype, + default=None, + argument=self.argument, + ) + + def decl(self, *, func_ptr_cast: bool = False) -> str: + mb_default = "" + if self.default is not None: + mb_default = f"={self.default}" + + # casting only needs to know the type + if func_ptr_cast: + return f"{self.type}" + else: + return f"{self.type} {self.name}{mb_default}" + + # For BC reasons, we don't want to introduce at:: namespaces to RegistrationDeclarations.yaml + # TODO: Kill this when we eventually remove it! + def decl_registration_declarations(self) -> str: + type_s = self.nctype.cpp_type_registration_declarations() + mb_default = "" + if self.default is not None: + mb_default = f"={self.default}" + return f"{type_s} {self.name}{mb_default}" + + def defn(self) -> str: + return f"{self.type} {self.name}" + + def with_name(self, name: str) -> Binding: + return Binding( + name=name, nctype=self.nctype, argument=self.argument, default=self.default + ) + + +# An Expr is a C++ expression. It has a C++ string representing its syntax, +# as well as a CType saying what it provides. + + +@dataclass(frozen=True) +class Expr: + expr: str + type: NamedCType diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/ufunc.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/ufunc.py new file mode 100644 index 0000000000000000000000000000000000000000..4bfc0de5fe6fd3e8f56eb3753bdb8031d8e5c659 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/ufunc.py @@ -0,0 +1,209 @@ +from __future__ import annotations + +from dataclasses import dataclass + +import torchgen.api.types as api_types +from torchgen.api import cpp, structured +from torchgen.api.types import ( + ArgName, + BaseCppType, + BaseCType, + Binding, + ConstRefCType, + CType, + NamedCType, + scalarT, +) +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + DispatchKey, + FunctionSchema, + NativeFunctionsGroup, + Type, +) + + +def schema_kernel_name(func: FunctionSchema, dispatch_key: DispatchKey) -> str: + assert func.is_out_fn(), "ufunc.kernel_name should only be invoked on out schemas" + return f"ufunc_{func.name.name}_{dispatch_key}" + + +def kernel_name(g: NativeFunctionsGroup, dispatch_key: DispatchKey) -> str: + return schema_kernel_name(g.out.func, dispatch_key) + + +# Tensors are omitted (as they are stored in TensorIterator), everything else is +# passed along (technically, we can pass tensors along too, it just wastes +# argument registers) +# +# NB: used for CPU only +def dispatchstub_type(t: Type, *, binds: ArgName) -> NamedCType | None: + # Dispatch stubs are always plain ints + r = cpp.valuetype_type(t, binds=binds, symint=False) + if r is not None: + return r + + if t == BaseType(BaseTy.Scalar): + return NamedCType(binds, ConstRefCType(BaseCType(scalarT))) + elif t == BaseType(BaseTy.Tensor): + return None + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +def opmath_type(scalar_t: BaseCppType) -> BaseCppType: + if scalar_t == api_types.scalar_t: + return api_types.opmath_t + raise NotImplementedError + + +# NB: Tensors in constructor are stored in opmath_t, not scalar_t +# because Tensor in constructor = its a scalar tensor partially applied = +# it can be higher precision and we want to compute in that higher precision +# +# NB: CUDA only +def ufunctor_ctor_type(t: Type, *, binds: ArgName, scalar_t: BaseCppType) -> NamedCType: + r = cpp.valuetype_type(t, binds=binds, symint=False) + if r is not None: + return r + + if t == BaseType(BaseTy.Scalar): + return NamedCType(binds, BaseCType(opmath_type(scalar_t))) + elif t == BaseType(BaseTy.Tensor): + return NamedCType(binds, BaseCType(opmath_type(scalar_t))) + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +# Only Tensors ever get passed directly to operator() +# +# NB: CUDA only +# (Actually, this works for CPU too) +def ufunctor_apply_type( + t: Type, *, binds: ArgName, scalar_t: BaseCppType +) -> NamedCType: + if t == BaseType(BaseTy.Tensor): + return NamedCType(binds, BaseCType(scalar_t)) + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +# The actual ufunc template function the user writes. Everything here +# is done in the computation type. compute_t is opmath_t in CUDA and scalar_t +# in CPU +def ufunc_type(t: Type, *, binds: ArgName, compute_t: CType) -> NamedCType: + r = cpp.valuetype_type(t, binds=binds, symint=False) + if r is not None: + return r + + if t == BaseType(BaseTy.Scalar): + return NamedCType(binds, compute_t) + elif t == BaseType(BaseTy.Tensor): + return NamedCType(binds, compute_t) + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +def ufunctor_ctor_argument(a: Argument, scalar_t: BaseCppType) -> Binding: + return Binding( + nctype=ufunctor_ctor_type(a.type, binds=a.name, scalar_t=scalar_t), + name=a.name, + default=None, + argument=a, + ) + + +def ufunctor_apply_argument(a: Argument, scalar_t: BaseCppType) -> Binding: + return Binding( + nctype=ufunctor_apply_type(a.type, binds=a.name, scalar_t=scalar_t), + name=a.name, + default=None, + argument=a, + ) + + +def ufunc_argument(a: Argument, compute_t: CType) -> Binding: + return Binding( + nctype=ufunc_type(a.type, binds=a.name, compute_t=compute_t), + name=a.name, + default=None, + argument=a, + ) + + +@dataclass(frozen=True) +class UfunctorBindings: + ctor: list[Binding] + apply: list[Binding] + + +# ufunctors are a CUDA-only concept representing functors that take some of +# their arguments on a host-side constructor, and the rest in the device-side +# apply. E.g., +# +# template +# struct CUDAFunctorOnSelf_add { +# using opmath_t = at::opmath_type; +# opmath_t other_; +# opmath_t alpha_; +# CUDAFunctorOnSelf_add(opmath_t other, opmath_t alpha) : other_(other), alpha_(alpha) {} +# __device__ scalar_t operator()(scalar_t self) { +# return ufunc::add(static_cast(self), other_, alpha_); +# } +# }; +# +# The ctor refers to the constructor CUDAFunctorOnSelf_add, while apply refers +# to the operator() definition +def ufunctor_arguments( + g: NativeFunctionsGroup, *, scalar_tensor_idx: int | None, scalar_t: BaseCppType +) -> UfunctorBindings: + ctor = [] + apply = [] + for a in g.functional.func.arguments.flat_non_out: + if a.type.is_tensor_like(): + if scalar_tensor_idx == 0: + # put it in the ctor anyway + ctor.append(ufunctor_ctor_argument(a, scalar_t=scalar_t)) + scalar_tensor_idx = None + else: + if scalar_tensor_idx is not None: + scalar_tensor_idx -= 1 + apply.append(ufunctor_apply_argument(a, scalar_t=scalar_t)) + else: + ctor.append(ufunctor_ctor_argument(a, scalar_t=scalar_t)) + assert scalar_tensor_idx is None + return UfunctorBindings(ctor=ctor, apply=apply) + + +# ufuncs are the inner loop template functions that you wrote in ufunc/add.h +# which do the actual computation in question. E.g., +# +# template +# C10_HOST_DEVICE T add(T self, T other, T alpha) __ubsan_ignore_undefined__ { +# return self + alpha * other; +# } +# +# In this file, we refer to T as compute_t which is bound by caller +def ufunc_arguments(g: NativeFunctionsGroup, *, compute_t: CType) -> list[Binding]: + return [ + ufunc_argument(a, compute_t=compute_t) + for a in g.functional.func.arguments.flat_non_out + ] + + +# Stubs are the DispatchStub trampolines that CPU kernels use to get to their +# vectorized versions. E.g., +# +# using structured_binary_fn_alpha = void(*)(TensorIteratorBase&, const Scalar& alpha); +# DECLARE_DISPATCH(structured_binary_fn_alpha, add_stub); +def stub_arguments(g: NativeFunctionsGroup) -> list[Binding]: + # stubs drop all tensor arguments (they are implicit in the TensorIterator + # argument and keep everything else) + return [ + r + for a in g.out.func.arguments.flat_non_out + if not a.type.is_tensor_like() + for r in structured.argument(a) + ] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/unboxing.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/unboxing.py new file mode 100644 index 0000000000000000000000000000000000000000..b1249692aeeabbb95f4c4ecb6a8dfdd9015901eb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/api/unboxing.py @@ -0,0 +1,241 @@ +from __future__ import annotations + +from torchgen.api import cpp +from torchgen.api.types import Binding, CppSignatureGroup, CType +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + ListType, + NativeFunction, + OptionalType, + Type, +) + + +# This file generates the code for unboxing wrappers, i.e., the glue logic to unbox a boxed operator and convert the +# ivalues from stack to correct arguments to the unboxed kernel, based on corresponding JIT schema. This codegen is +# an alternative way to generate unboxing wrappers similar to the existing C++ metaprogramming approach but gets the +# job done statically. These generated unboxing wrappers will be useful under the scenario where we need to register +# a fixed set of operators known at compile time and thus can save some time in runtime initialization phase. +# +# Here's an example on how the codegen works: +# +# - Function Schema (source of truth) +# +# aten::empty.names(int[] size, *, Dimname[]? names, +# ScalarType? dtype=None, Layout? layout=None, +# Device? device=None, bool? pin_memory=None, +# MemoryFormat? memory_format=None) -> Tensor +# - Argument Conversion +# Generates C++ code to convert an ivalue (from stack) to its underlying C++ type. +# - int[] size +# ```cpp +# const c10::List size_list_in = (std::move(peek(stack, 0, 7))).toList(); +# +# std::vector size_vec; +# for (c10::IValue size_elem: size_list_in) { +# int64_t size_base = size_elem.to(); +# size_vec.push_back(size_base); +# } +# at::ArrayRef size_list_out(size_vec); +# ~~~~~~~~~~~~~ <-- The converted argument from ivalues in the stack. +# Will be passed to unboxed kernel. +# ``` +# - Dimname[]? names +# ```cpp +# ::std::optional names_opt = (std::move(peek(stack, 1, 7))).toOptional(); +# ::std::optional> names_opt_out; +# if (names_opt.has_value()) { +# ~~~~~~~~~~~ <-- Unwrapping optional shell +# const c10::IValue names_opt_in = names_opt.value(); +# const c10::List names_list_in = names_opt_in.toList(); +# +# std::vector names_vec; +# for (c10::IValue names_elem: names_list_in) { +# ~~~~~~~~~~~~~~~~~~~~~~~~~ <-- Unrolling list, then convert elements one by one. +# at::Dimname names_base = names_elem.to(); +# names_vec.push_back(names_base); +# } +# at::ArrayRef names_list_out(names_vec); +# +# names_opt_out = ::std::optional>(names_list_out); +# } else { +# names_opt_out = ::std::optional>(); +# } +# ``` +# - ScalarType? dtype (similarly for the rest of the arguments) +# ```cpp +# ::std::optional dtype_opt = (std::move(peek(stack, 2, 7))).toOptional(); +# ::std::optional dtype_opt_out; +# if (dtype_opt.has_value()) { +# const c10::IValue dtype_opt_in = dtype_opt.value(); +# at::ScalarType dtype_base = dtype_opt_in.to(); +# ~~~~~~~~~~~~~~~~~~~~ <-- For base types, convert ivalue to it +# directly using ".to()" API. +# dtype_opt_out = ::std::optional(dtype_base); +# } else { +# dtype_opt_out = ::std::optional(); +# } +# ``` +# +# - Unboxed Kernel Call +# ```cpp +# auto result_ = torch::empty( +# size_list_out, +# names_opt_out, +# options, +# memory_format_opt_out +# ); +# ``` +# +# - Push Result Back to Stack +# ```cpp +# drop(stack, 7); +# pack(stack, std::move(result_)); +# ``` +connector = "\n\t" + + +# Return unboxing function name for a NativeFunction +def name(f: NativeFunction) -> str: + return f.func.name.unambiguous_name() + + +# Convert all the arguments in a NativeFunction to C++ code +def convert_arguments(f: NativeFunction) -> tuple[list[Binding], list[str]]: + # we need the 'self' argument so method needs to be False + args = ( + CppSignatureGroup.from_native_function(f, method=False) + .most_faithful_signature() + .arguments() + ) + code_list = [ + f"c10::IValue {args[i].name} = std::move(peek(stack, {i}, {len(args)}));" + for i in range(len(args)) + ] + [""] + binding_list = [] + for arg in args: + # expecting only Argument + if not isinstance(arg.argument, Argument): + raise Exception( # noqa: TRY002 + f"Unexpected argument type, expecting `Argument` but got {arg}" + ) + argument: Argument = arg.argument + unboxed_name, _, code, decl = argumenttype_ivalue_convert( + argument.type, + argument.name, + mutable=argument.is_write, + ) + code_list.extend(decl) + code_list.extend(code) + binding_list.append(arg.with_name(unboxed_name)) + return binding_list, code_list + + +# Takes in the type, name and mutability corresponding to an argument, and generates a tuple of: +# (1) the C++ code necessary to unbox the argument +# (2) A Binding corresponding to the newly created unboxed variable, including variable name and its CType +def argumenttype_ivalue_convert( + t: Type, arg_name: str, *, mutable: bool = False +) -> tuple[str, CType, list[str], list[str]]: + # Unboxing is for mobile, which doesn't care about SymInts + ctype = cpp.argumenttype_type( + t=t, mutable=mutable, binds=arg_name, symint=False + ).type + + if isinstance(t, BaseType): + out_name = f"{arg_name}_base" + code, decl = _gen_code_base_type( + arg_name=arg_name, out_name=out_name, ctype=ctype + ) + elif isinstance(t, OptionalType): + out_name = f"{arg_name}_opt_out" + code, decl = _gen_code_optional_type( + arg_name=arg_name, + out_name=out_name, + t=t, + ctype=ctype, + ) + elif isinstance(t, ListType): + out_name = f"{arg_name}_list_out" + code, decl = _gen_code_list_type( + arg_name=arg_name, + out_name=out_name, + t=t, + ctype=ctype, + ) + else: + raise Exception(f"Cannot handle type {t}. arg_name: {arg_name}") # noqa: TRY002 + return out_name, ctype, code, decl + + +def _gen_code_base_type( + arg_name: str, out_name: str, ctype: CType +) -> tuple[list[str], list[str]]: + return [ + f"{ctype.cpp_type(strip_ref=True)} {out_name} = {arg_name}.to<{ctype.cpp_type(strip_ref=True)}>();" + ], [] + + +def _gen_code_optional_type( + arg_name: str, out_name: str, t: OptionalType, ctype: CType +) -> tuple[list[str], list[str]]: + in_name = f"{arg_name}_opt_in" + res_name, _, res_code, decl = argumenttype_ivalue_convert(t.elem, in_name) + return ( + f""" +auto {arg_name}_opt = {arg_name}.toOptional(); +{ctype.cpp_type(strip_ref=True)} {out_name}; +if ({arg_name}_opt.has_value()) {{ + const c10::IValue {in_name} = {arg_name}_opt.value(); + {connector.join(res_code)} + {out_name} = {ctype.cpp_type(strip_ref=True)}({res_name}); +}} else {{ + {out_name} = {ctype.cpp_type(strip_ref=True)}(); +}} + """.split("\n"), + decl, + ) + + +def _gen_code_list_type( + arg_name: str, out_name: str, t: ListType, ctype: CType +) -> tuple[list[str], list[str]]: + in_name = f"{arg_name}_list_in" + elem_name = f"{arg_name}_elem" + code = [f"const c10::List {in_name} = {arg_name}.toList();"] + res_name, res_ctype, res_code, decl = argumenttype_ivalue_convert(t.elem, elem_name) + # handle list type with size, e.g., bool[4] + if isinstance(t.elem, BaseType) and t.elem.name == BaseTy.bool and t.size: + code.extend( + f""" +{ctype.cpp_type(strip_ref=True)} {out_name} = as_array<{res_ctype.cpp_type(strip_ref=True)}, {t.size}>({in_name}); + """.split("\n") + ) + # we have to use c10::List for optional element. e.g., Tensor?[] -> c10::List<::std::optional> + elif isinstance(t.elem, OptionalType): + code.extend( + f""" +{ctype.cpp_type(strip_ref=True)} {out_name}; +for (c10::IValue {elem_name}: {in_name}) {{ + {connector.join(res_code)} + {out_name}.push_back({res_name}); +}} + """.split("\n") + ) + else: + # use ArrayRef as default. + vec_name = arg_name + "_vec" + # need to bring vector instantiation out of scope so that ArrayRef has valid data + decl.append(f"std::vector<{res_ctype.cpp_type(strip_ref=True)}> {vec_name};") + code.extend( + f""" +for (c10::IValue {elem_name}: {in_name}) {{ + {connector.join(res_code)} + {vec_name}.push_back({res_name}); +}} +{ctype.cpp_type(strip_ref=True)} {out_name}({vec_name}); + """.split("\n") + ) + return code, decl diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3db7b19d69fbcb8ce74e03dba7a53e85f2b17c20 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__init__.py @@ -0,0 +1,19 @@ +from torchgen.dest.lazy_ir import ( + generate_non_native_lazy_ir_nodes as generate_non_native_lazy_ir_nodes, + GenLazyIR as GenLazyIR, + GenLazyNativeFuncDefinition as GenLazyNativeFuncDefinition, + GenLazyShapeInferenceDefinition as GenLazyShapeInferenceDefinition, +) +from torchgen.dest.native_functions import ( + compute_native_function_declaration as compute_native_function_declaration, +) +from torchgen.dest.register_dispatch_key import ( + gen_registration_headers as gen_registration_headers, + gen_registration_helpers as gen_registration_helpers, + RegisterDispatchKey as RegisterDispatchKey, +) +from torchgen.dest.ufunc import ( + compute_ufunc_cpu as compute_ufunc_cpu, + compute_ufunc_cpu_kernel as compute_ufunc_cpu_kernel, + compute_ufunc_cuda as compute_ufunc_cuda, +) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..00f43bd2399b542d19d235cf58de3256eab6573d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/lazy_ir.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/lazy_ir.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b4d7a87f1f0b7d1396b8761d3fd6bc75bcbaa10f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/lazy_ir.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/lazy_ts_lowering.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/lazy_ts_lowering.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..478a4c79b299246c2f4df60cdf43d2c14001ebd3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/lazy_ts_lowering.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/native_functions.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/native_functions.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6018bd897c32ab4e5cb70f9a24135fc1f58d01fc Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/native_functions.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/register_dispatch_key.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/register_dispatch_key.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0c222aa20682f3104621e4dadc6e89532f2ccac9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/register_dispatch_key.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/ufunc.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/ufunc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f73f4dfad6b21dc3f45d416c8b6ea2d676145a34 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/__pycache__/ufunc.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/lazy_ir.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/lazy_ir.py new file mode 100644 index 0000000000000000000000000000000000000000..7b296e9a3ffa994ced909992f4c6dd3c04deded2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/lazy_ir.py @@ -0,0 +1,707 @@ +from __future__ import annotations + +import itertools +from abc import ABC +from dataclasses import dataclass +from typing import Any + +import torchgen.api.dispatcher as dispatcher +from torchgen.api.lazy import ( + getValueT, + isValueType, + LazyArgument, + LazyIrProperties, + LazyIrSchema, + tensorListValueT, +) +from torchgen.api.translate import translate +from torchgen.api.types import ( + BaseCType, + Binding, + deviceT, + DispatcherSignature, + kernel_signature, + NativeSignature, + OptionalCType, + VectorCType, +) +from torchgen.context import method_with_native_function +from torchgen.dest.lazy_ts_lowering import ts_lowering_body +from torchgen.model import ( + Argument, + BackendIndex, + BackendMetadata, + BaseTy, + BaseType, + FunctionSchema, + ListType, + NativeFunction, + NativeFunctionsGroup, +) + + +def node_ctor_arg_rvalue_string(arg: LazyArgument) -> str: + """ + Given a LazyArgument, + generate a c++ string for materializing an rvalue of that arg for passing into + a lazy Node constructor. + """ + + # TODO: Matching on CType seems wrong; should be matching on Type + if isValueType(arg.lazy_type): + if isinstance(arg.lazy_type, BaseCType): + if arg.is_wrapped_scalar: + return f"node_{arg.name}" + elif arg.lazy_type.type is tensorListValueT: + return f"lazy_{arg.name}_tensorlist" + elif arg.is_symint_or_list: + return f"GetSymIntValue({arg.name})" + return f"lazy_{arg.name}->GetIrValue()" + elif isinstance(arg.lazy_type, OptionalCType): + if arg.is_symint_or_list: + # TODO: I don't understand when you should put lazy_ in the name + # or not + return f"{arg.name} ? std::make_optional(GetSymIntValue(*{arg.name})) : ::std::nullopt" + elif arg.is_wrapped_scalar: + return f"node_{arg.name}" + return ( + f"lazy_{arg.name} ? " + f"std::make_optional(lazy_{arg.name}->GetIrValue()) : " + "::std::nullopt" + ) + else: + raise AssertionError( + f"TODO not sure if there are other valid types to handle here ({arg.lazy_type})" + ) + else: + # NB: this is here because right now we aren't treating SymInt[] as a + # value type; when we do this needs to move above + # NB: we cannot test arg.lazy_type as we've already specified it is an + # int64_t and so we cannot distinguish between SymInt and int64_t + if isinstance(arg.orig_type, ListType) and arg.orig_type.elem == BaseType( + BaseTy.SymInt + ): + if arg.symint: + return f"GetSymIntArrayRefValue({arg.name})" + else: + return f"std::vector({arg.name}.begin(), {arg.name}.end())" + elif isinstance(arg.lazy_type, VectorCType) and isinstance( + arg.lazy_type.elem, BaseCType + ): + return f"std::vector<{arg.lazy_type.elem.type}>({arg.name}.begin(), {arg.name}.end())" + elif ( + isinstance(arg.lazy_type, OptionalCType) + and isinstance(arg.lazy_type.elem, VectorCType) + and isinstance(arg.lazy_type.elem.elem, BaseCType) + ): + return f"torch::lazy::ToOptionalVector<{arg.lazy_type.elem.elem.type}>({arg.name})" + else: + return f"{arg.name}" + + +def node_ctor_inputs(schema: LazyIrSchema) -> str: + """ + Produce a formatted string with the arguments as passed into the constructor of a node class. + """ + node_ctor_values = [ + node_ctor_arg_rvalue_string(arg) for arg in schema.filtered_args() + ] + return ", ".join(node_ctor_values) + + +def gen_fallback_code( + schema: LazyIrSchema, + sig: DispatcherSignature | NativeSignature, + overload_name: str, +) -> str: + """ + Generate code that falls back to eager conditioned on a predicate + """ + dispatcher_sig = DispatcherSignature.from_schema(schema.func) + exprs = translate(sig.arguments(), dispatcher_sig.arguments()) + fallback_args = ",\n ".join([a.expr for a in exprs]) + if len(overload_name): + aten_op_str = f"ATEN_OP2({schema.aten_name}, {overload_name})" + else: + aten_op_str = f"ATEN_OP({schema.aten_name})" + return f""" + if (force_eager_fallback({aten_symbol(schema)})) {{ + return at::native::call_fallback_fn_symint<<c_eager_fallback, {aten_op_str}>::call( + {fallback_args} + ); + }} +""" + + +def aten_symbol(schema: LazyIrSchema) -> str: + missing_interned_strings = { + "sigmoid_backward", + } + if schema.aten_name in missing_interned_strings: + return f'c10::Symbol::fromQualString("aten::{schema.aten_name}")' + + if not schema.aten_name.startswith("at::"): + return f"at::aten::{schema.aten_name}" + else: + return schema.aten_name + + +# converts all tensor-like arguments to meta tensors. Returns: +# (1) a string containing all of the logic that does the conversions. +# (2) a context, to be used by translate(), with all of the relevant bindings. +def convert_to_meta_tensors(sig: DispatcherSignature) -> tuple[str, list[Binding]]: + context: list[Binding] = [] + unwrapped_tensor_args: list[str] = [] + for arg in sig.arguments(): + if isinstance(arg.argument, Argument) and arg.argument.type.is_tensor_like(): + unwrapped_name = f"{arg.name}_meta" + unwrapped_tensor_args.append( + f"auto {unwrapped_name} = to_meta({arg.name});" + ) + context.append(arg.with_name(unwrapped_name)) + else: + context.append(arg) + unwrap_tensor_args_str = "\n ".join(unwrapped_tensor_args) + return unwrap_tensor_args_str, context + + +@dataclass(frozen=True) +class GenLazyIR(ABC): + backend_index: BackendIndex + backend_name: str + node_base: str + use_lazy_shape: bool + + @method_with_native_function + def __call__(self, f: NativeFunctionsGroup | NativeFunction) -> list[str]: + func = f.functional.func if isinstance(f, NativeFunctionsGroup) else f.func + metadata = self.backend_index.get_kernel( + f.functional if isinstance(f, NativeFunctionsGroup) else f + ) + schema = LazyIrSchema( + func, symint=metadata is not None and metadata.supports_symint() + ) + return self.gen(schema) + + # there is no lowering functionality generated unless this IR base class is subclassed and + # implemented as a backend-specific node + def lowering_function(self, schema: LazyIrSchema) -> str: + return "" + + def create_function(self, schema: LazyIrSchema, node_ctor_args: str) -> str: + return "" + + def can_be_reused_function(self, schema: LazyIrSchema, node_ctor_args: str) -> str: + return f"""bool CanBeReused({node_ctor_args}) const {{ + return false; + }}""" + + def node_base_ctor_call(self, schema: LazyIrSchema) -> str: + value_args = schema.filtered_args(values=True, scalars=False) + # backends can customize the way the node base class constructor is called, + # as long as all of its arguments can be generated from information available from the schema + base_ctor_value_args_list = [] + for arg in value_args: + if isinstance(arg.lazy_type, (BaseCType, VectorCType)): + base_ctor_value_args_list.append(f"{arg.name}") + elif isinstance(arg.lazy_type, OptionalCType): + base_ctor_value_args_list.append(f"{arg.name}.value_or(kNullValue)") + else: + raise AssertionError( + f"Unsupported type ({arg.lazy_type}) - add support if necessary" + ) + base_ctor_value_args = ", ".join(base_ctor_value_args_list) + + scalar_args = schema.filtered_args(values=False, scalars=True) + + # Shape construction. + # Conditionally build shape depending on specified shape property + if schema.properties.ShapePrecompute: + shape_ctor_arg = "std::move(shapes)," + elif schema.properties.ShapeCompute: + shape_args = [a.name for a in value_args] + shape_args.extend(a.name for a in scalar_args) + shape_ctor_arg = f"compute_shape_{schema.name}({', '.join(shape_args)})," + elif schema.properties.ShapeCache: + shape_args = [f"operand({i})" for i in range(len(value_args))] + shape_args.extend(a.name for a in scalar_args) + shape_ctor_arg = f"[&](){{ return compute_shape_{schema.name}({', '.join(shape_args)})[0]; }}," + else: + shape_ctor_arg = "" + + scalar_hashes = ", ".join(f"{a.name}" for a in scalar_args) + + return f"""{self.node_base}( + {schema.node_name}::ClassOpKind(), + OpList{{{base_ctor_value_args}}}, + {shape_ctor_arg} + /* num_outputs */ {len(schema.returns)}, + torch::lazy::MHash({scalar_hashes}))""" + + def gen(self, schema: LazyIrSchema) -> list[str]: + opkind = schema.opkind or aten_symbol(schema) + + # for now, we just want one IR class decl and soon after also the method defs + # and we use the functional version not out/inplace. + all_args = schema.filtered_args() + scalar_args = schema.filtered_args(values=False, scalars=True) + + ctor_args = [f"const {i.lazy_type.cpp_type()}& {i.name}" for i in all_args] + reuse_ctor_args = ", ".join(ctor_args) + if self.use_lazy_shape and schema.properties.ShapePrecompute: + ctor_args.append("std::vector&& shapes") + node_ctor_args = ", ".join(ctor_args) + + scalar_initializers = ",\n ".join( + [ + # This code is just special casing the mapping from string_view -> strings + f"{a.name}({a.name}.has_value() ? ::std::make_optional(std::string(*{a.name})) : ::std::nullopt)" + if a.lazy_type.cpp_type() == "::std::optional" + else f"{a.name}({a.name})" + for a in scalar_args + ] + ) + if len(scalar_initializers): + scalar_initializers = f",\n {scalar_initializers}" + scalar_decls = "\n ".join( + [ + f"std::string {a.name};" + if a.lazy_type.cpp_type() == "c10::string_view" + else f"::std::optional {a.name};" + if a.lazy_type.cpp_type() == "::std::optional" + else f"{a.lazy_type.cpp_type()} {a.name};" + for a in scalar_args + ] + ) + optional_values = [ + arg.name + for arg in schema.filtered_args(values=True, scalars=False) + if isinstance(arg.lazy_type, OptionalCType) + ] + has_optional_decls = "\n ".join( + [f"bool has_{value}: 1;" for value in optional_values] + ) + has_optional_defs = "\n ".join( + [f"has_{value} = !!{value};" for value in optional_values] + ) + members_to_string = [] + for arg in scalar_args: + if isinstance(arg.lazy_type, OptionalCType): + value = f"{arg.name}.value()" + if arg.is_generator: + value = '"torch.Generator()"' + members_to_string.append( + f"""if ({arg.name}.has_value()) {{ + ss << ", {arg.name}=" << {value}; + }} else {{ + ss << ", {arg.name}=null"; + }}""" + ) + else: + members_to_string.append(f'ss << ", {arg.name}=" << {arg.name};') + members_to_string_str = "\n ".join(members_to_string) + + return [ + f"""\ +class {schema.node_name} : public {self.node_base} {{ + public: + static torch::lazy::OpKind ClassOpKind() {{ + return torch::lazy::OpKind({opkind}); + }} + + {schema.node_name}({node_ctor_args}) + : {self.node_base_ctor_call(schema)}{scalar_initializers} + {{ + {has_optional_defs} + }} + + std::string ToString() const override {{ + std::stringstream ss; + ss << {self.node_base}::ToString(); + {members_to_string_str} + return ss.str(); + }} + + {self.create_function(schema, reuse_ctor_args)} + + {self.can_be_reused_function(schema, reuse_ctor_args)} + + {self.lowering_function(schema)} + + {scalar_decls} + {has_optional_decls} + +}}; + +""", + ] + + +@dataclass(frozen=True) +class GenTSLazyIR(GenLazyIR): + def lowering_function(self, schema: LazyIrSchema) -> str: + signature = """ + torch::lazy::TSOpVector Lower( + std::shared_ptr function, + torch::lazy::TSLoweringContext* loctx) const override""" + + if schema.properties.LowerDeclOnly: + return f"{signature};" + elif schema.properties.Lower: + return f"""{signature} {{ + {ts_lowering_body(schema)} + }} + """ + else: + return "" + + def create_function(self, schema: LazyIrSchema, node_ctor_args: str) -> str: + signature = f"static NodePtr Create({node_ctor_args})" + if schema.properties.CreateFnDeclOnly: + return f"{signature};" + elif not schema.properties.CreateFn: + return "" + return f"""{signature} {{ + return ReuseOrMakeNode<{schema.node_name}>(data); + }}""" + + def can_be_reused_function(self, schema: LazyIrSchema, node_ctor_args: str) -> str: + signature = f"bool CanBeReused({node_ctor_args}) const" + if schema.properties.CanBeReusedDeclOnly: + return f"{signature};" + elif not schema.properties.CanBeReused: + return "" + value_comparison = [] + for arg in itertools.chain(schema.positional_values, schema.keyword_values): + if isinstance(arg.lazy_type, OptionalCType): + value_comparison.append( + f"nullable_operand(i++) == {arg.name}.value_or(kNullValue)" + ) + else: + value_comparison.append(f"operand(i++) == {arg.name}") + for arg in itertools.chain(schema.positional_scalars, schema.keyword_scalars): + if isinstance(arg.lazy_type, OptionalCType): + value_comparison.append( + f"((!this->{arg.name}&&!{arg.name}) || (this->{arg.name}&&{arg.name} && *(this->{arg.name}) == *{arg.name}))" + ) + else: + value_comparison.append(f"this->{arg.name} == {arg.name}") + value_comparison_str = " &&\n ".join(value_comparison) + + return f"""{signature} {{ + size_t i = 0; + return ({value_comparison_str}); + }}""" + + +@dataclass(frozen=True) +class GenLazyNativeFuncDefinition: + class_method_name: str + backend_index: BackendIndex + tensor_class: str + gen_forced_fallback_code: bool + backend_namespace: str + get_tensorlist: str + get_tensor_or_wrap_number: str + try_get_tensor: str + metrics_counter: str + create_tensor: str + create_from_first_tensor: bool + create_aten_from_ltc_tensor: str + tuple_aten_from_ltc_tensors: str + lazy_tensor_ptr: str + get_device_fn: str + + def lazy_tensor_decls(self, func: NativeFunction, schema: LazyIrSchema) -> str: + value_args = schema.filtered_args(values=True, scalars=False) + # Generates lazy_{name} variables for LazyTensors wrapping input tensors + lazy_tensor_decls: list[str] = [] + for arg in value_args: + if arg.is_wrapped_scalar: + if isinstance(arg.lazy_type, OptionalCType): + lazy_tensor_decls.append( + f"""auto node_{arg.name} = {arg.name} ? + std::make_optional(torch::lazy::LazyGraphExecutor::Get()-> + GetIrValueForScalarFromCodegen(*{arg.name}, *common_device)): + ::std::nullopt;""" + ) + else: + lazy_tensor_decls.append( + f"""auto node_{arg.name} = torch::lazy::LazyGraphExecutor::Get()-> + GetIrValueForScalarFromCodegen({arg.name}, *common_device);""" + ) + elif arg.is_symint_or_list: + continue # values are extracted in isValueType + elif isinstance(arg.lazy_type, BaseCType): + if arg.lazy_type.type is tensorListValueT: + lazy_tensor_decls.append( + f"auto lazy_{arg.name}_tensorlist = " + f"{self.backend_namespace}::{self.get_tensorlist}({arg.name});" + ) + else: + lazy_tensor_decls.append( + f"{self.lazy_tensor_ptr} lazy_{arg.name} = " + f"{self.backend_namespace}::{self.get_tensor_or_wrap_number}({arg.name}, *common_device);" + ) + elif isinstance(arg.lazy_type, OptionalCType): + assert arg.lazy_type.elem == BaseCType(getValueT()), arg.lazy_type.elem + # TODO(alanwaketan): Maybe we want to apply GetLtcTensorOrCreateForWrappedNumber here, but hold it + # until we encounter a real world example. + lazy_tensor_decls.append( + f"{self.lazy_tensor_ptr} lazy_{arg.name} = " + f"{self.backend_namespace}::{self.try_get_tensor}({arg.name}.value_or(at::Tensor()));" + ) + else: + raise AssertionError( + f"TODO not sure if there are other valid types to handle here ({arg.lazy_type})" + ) + return ("\n ").join(lazy_tensor_decls) + + def force_eager_fallback( + self, + func: NativeFunction, + schema: LazyIrSchema, + metadata: BackendMetadata, + sig: DispatcherSignature | NativeSignature, + ) -> str: + if self.gen_forced_fallback_code: + return gen_fallback_code( + schema, sig, overload_name=func.func.name.overload_name + ) + return "" + + def metrics(self, func: NativeFunction, schema: LazyIrSchema) -> str: + return f"{self.metrics_counter};" + + def get_device(self, func: NativeFunction, schema: LazyIrSchema) -> str: + value_args = schema.filtered_args(values=True, scalars=False) + scalar_args = schema.filtered_args(values=False, scalars=True) + value_types_names = [f"{a.name}" for a in value_args if not a.is_wrapped_scalar] + optional_device = OptionalCType(BaseCType(deviceT)) + optional_devices = [ + a.name for a in scalar_args if a.lazy_type == optional_device + ] + assert ( + len(value_types_names) > 0 or len(optional_devices) > 0 + ), "Expected at least one Value or Device type" + get_device_str = ( + f"{self.get_device_fn}({', '.join(value_types_names + optional_devices)})" + ) + return f"""auto common_device = {get_device_str}; + TORCH_INTERNAL_ASSERT(common_device); + """ + + def shape_inference(self, func: NativeFunction, schema: LazyIrSchema) -> str: + metadata = self.backend_index.get_kernel(func) + assert metadata is not None + all_args = schema.filtered_args() + returns_length = len(schema.returns) + # call the meta kernel if it exists, to compute output shape/dtype for our IR + # Note [Generated LTC Shape Functions] + # LTC uses meta tensors from core to do shape inference when possible, and otherwise + # we generate a shape function declaration that needs to be manually implemented. + # How do we detect which ops are eligible to use meta tensors? + # In general we should be able to use meta tensors not just on structured operators, + # but also on composite operators that are implemented in terms of structured kernels. + # We don't currently have a way of knowing at codegen time which ops are implemented that way. + # This is the case for all view and view_copy operators however, so we're going to + # use them specifically for all of the view_copy ops (instead of manually writing shape rules for all of them). + is_view_copy_op = "view_copy" in func.tags + is_structured = func.structured or func.structured_delegate is not None + if is_structured or is_view_copy_op: + meta_out = """ +std::vector shapes{torch::lazy::Shape(out_meta.scalar_type(), out_meta.sizes().vec())};""" + if returns_length > 1: + + def this_shape(i: int) -> str: + return f"torch::lazy::Shape(std::get<{i}>(out_meta).scalar_type(), std::get<{i}>(out_meta).sizes().vec())" + + shapes_str = ",".join([this_shape(i) for i in range(returns_length)]) + meta_out = "std::vector shapes{" + shapes_str + "};" + + # Convert tensor args to the meta device and call it. + # (We can't pass in the input tensors directly, because they are "functional wrappers". + # If any of the meta kernels call a tensor op and redispatch, we don't want to hit the functionalize kernels.) + # Even at::meta:: functions might redispatch, e.g. if they call into view ops. + dispatcher_sig = DispatcherSignature.from_schema(func.func) + meta_conversion_str, meta_call_ctx = convert_to_meta_tensors(dispatcher_sig) + meta_call_args = [ + e.expr + for e in translate( + meta_call_ctx, dispatcher_sig.arguments(), method=False + ) + ] + if is_view_copy_op: + # view_copy ops always have a CompositeExplicitAutogradNonFunctional kernel + assert func.has_composite_explicit_autograd_non_functional_kernel + dispatch_ns = "compositeexplicitautogradnonfunctional" + else: + dispatch_ns = "meta" + aten_name = schema.aten_name + # TODO: this is trolling + if func.func.has_symint() and metadata.supports_symint(): + aten_name += "_symint" + shape_str = f"""\ + {meta_conversion_str} + auto out_meta = at::{dispatch_ns}::{aten_name}({', '.join(meta_call_args)}); + {meta_out}""" + else: + shape_sig = ComputeShapeSignature( + metadata.kernel, func, symint=metadata.supports_symint() + ) + shape_str = f""" + auto shapes = {shape_sig.shape_call};""" + + shape_str += f""" + TORCH_INTERNAL_ASSERT(shapes.size() == {returns_length});""" + + # Calculating which dimensions are symbolic + func_schema_str = "aten::" + str(func.func) + shape_str += f""" + if(torch::lazy::symbolicShapeEnabled()){{ + std::vector inputs = {{ {', '.join(str(a.name) for a in all_args)} }}; + const char* schema_str = "{func_schema_str}"; + applySymbolicShapesOnLT(schema_str, inputs, shapes); + }} + """ + return shape_str + + def build_ir_node(self, func: NativeFunction, schema: LazyIrSchema) -> str: + node_ctor_input_str = node_ctor_inputs(schema) + return f"""torch::lazy::NodePtr node = torch::lazy::ReuseNode<{schema.node_name}>({node_ctor_input_str}); + if (!node) {{ + {self.shape_inference(func, schema)} + node = torch::lazy::MakeNode<{schema.node_name}>({node_ctor_input_str}, std::move(shapes)); + CacheNode(node); + }} + """ + + def create_lazy_tensor(self, first_tensor_name: str | None = None) -> str: + # xla uses an instance method for tensor creation, for the time being + if self.create_from_first_tensor: + # TODO(whc) remove this if XLA switches to using static method for creation + assert ( + first_tensor_name is not None + ), "Requires first tensor to create lazy tensor" + return f"{first_tensor_name}.{self.create_tensor}" + return f"{self.backend_namespace}::{self.create_tensor}" + + def return_aten_tensor(self, func: NativeFunction, schema: LazyIrSchema) -> str: + returns_length = len(schema.returns) + value_args = schema.filtered_args(values=True, scalars=False) + value_types_names = [f"{a.name}" for a in value_args if not a.is_wrapped_scalar] + first_tensor_name = value_types_names[0] if len(value_types_names) > 0 else None + bridge_str = f"""auto result = {self.create_aten_from_ltc_tensor}( + {self.create_lazy_tensor(first_tensor_name)}(std::move(node), *common_device));""" + + if returns_length > 1: + assert ( + len(value_types_names) > 0 + ), "Code below assumes there is at least one tensor arg" + bridge_str = f"""std::vector<{self.lazy_tensor_ptr}> lazy_tensors; + for (int i = 0; i < {returns_length}; i++) {{ + lazy_tensors.push_back({self.create_lazy_tensor(first_tensor_name)}({getValueT()}(node, i), *common_device)); + }} + auto result = {self.tuple_aten_from_ltc_tensors}<{returns_length}>(lazy_tensors);""" + + if schema.name.name.inplace or func.func.is_out_fn(): + assert returns_length == 1, ( + "We assumed there was no such case where an op is an in-place variant " + f"and has tuple outputs, but got tuple of len {returns_length}." + ) + bridge_str = f"""lazy_{first_tensor_name}->SetInPlaceIrValue(node); + auto& result = {first_tensor_name};""" + + bridge_str += """ + return result;""" + return bridge_str + + @method_with_native_function + def __call__(self, func: NativeFunction) -> list[str]: + sig = kernel_signature(func, self.backend_index) + metadata = self.backend_index.get_kernel(func) + assert metadata is not None + schema = LazyIrSchema(func.func, symint=metadata.supports_symint()) + return [ + f"""\ + {sig.decl(name=f"{self.class_method_name}::{metadata.kernel}")} {{ + {self.force_eager_fallback(func, schema, metadata, sig)} + {self.metrics(func, schema)} + {self.get_device(func, schema)} + {self.lazy_tensor_decls(func, schema)} + {self.build_ir_node(func, schema)} + {self.return_aten_tensor(func, schema)} + }}\n + """ + ] + + +class ComputeShapeSignature: + """ + Here we use the base name as the suffix of the signature to avoid generating for in-place variants. + """ + + def __init__(self, kernel_name: str, f: NativeFunction, *, symint: bool) -> None: + self.__schema = LazyIrSchema(f.func, symint=symint) + self.__dispatch_args = ", ".join( + [a.decl() for a in dispatcher.arguments(f.func, symint=symint)] + ) + self.__call_args = ", ".join( + [f"{arg.name}" for arg in self.__schema.filtered_args(generator=True)] + ) + self.__kernel_name = kernel_name + + def __decl_suffix(self) -> str: + return f"{self.__kernel_name}({self.__dispatch_args})" + + def __call_suffix(self) -> str: + return f"{self.__kernel_name}({self.__call_args})" + + @property + def shape_decl(self) -> str: + return f"TORCH_API std::vector compute_shape_{self.__decl_suffix()}" + + @property + def shape_call(self) -> str: + return f"torch::lazy::compute_shape_{self.__call_suffix()}" + + +@dataclass(frozen=True) +class GenLazyShapeInferenceDefinition: + backend_index: BackendIndex + tensor_class: str + + @method_with_native_function + def __call__(self, f: NativeFunction) -> list[str]: + metadata = self.backend_index.get_kernel(f) + assert metadata is not None + + # See Note [Generated LTC Shape Functions] + is_view_copy_op = "view_copy" in f.tags + is_structured = f.structured or f.structured_delegate is not None + if is_structured or is_view_copy_op: + return [] + else: + shape_sig = ComputeShapeSignature( + metadata.kernel, f, symint=metadata.supports_symint() + ) + return ["\n".join([f"{shape_sig.shape_decl};"])] + + +def generate_non_native_lazy_ir_nodes( + non_native: list[dict[str, Any]], gen_lazy_ir: GenLazyIR +) -> list[str]: + """Generate the non-native lazy IR node classes""" + nodes = [] + for op in non_native: + # Set default properties for Non-Native IRs + properties = LazyIrProperties("ShapeCache", "CanBeReused", "LowerDeclOnly") + for p in op.get("properties", []): + setattr(properties, p, True) + + # non-native is assumed to want symint bindings if you wrote symint + schema = LazyIrSchema(FunctionSchema.parse(op["func"]), properties, symint=True) + schema.opkind = op.get("opkind") + nodes.append(gen_lazy_ir.gen(schema)[0]) + + return nodes diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/lazy_ts_lowering.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/lazy_ts_lowering.py new file mode 100644 index 0000000000000000000000000000000000000000..1efbd63d7e7722d39c314afdf5474f80a5994c28 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/lazy_ts_lowering.py @@ -0,0 +1,48 @@ +from torchgen.api.lazy import LazyArgument, LazyIrSchema +from torchgen.api.types import OptionalCType + + +def ts_lowering_body(schema: LazyIrSchema) -> str: + # for now, we just want one IR class decl and soon after also the method defs + # and we use the functional version not out/inplace. + emplace_arguments = [] + + def get_value(arg: LazyArgument) -> str: + if isinstance(arg.lazy_type, OptionalCType): + return f"has_{arg.name} ? loctx->GetOutputOp(operand(i++)) : nullptr" + return "loctx->GetOutputOp(operand(i++))" + + for arg in schema.positional_args: + if arg.is_lazy_value: + emplace_arguments.append(get_value(arg)) + continue + emplace_arguments.append(f'"{arg.name}", {arg.name}') + + emplace_arguments_str = "\n ".join( + [f"arguments.emplace_back({a});" for a in emplace_arguments] + ) + emplace_kwarg_values = [ + f'"{arg.name}", {get_value(arg)}' for arg in schema.keyword_values + ] + emplace_kwarg_scalars = [ + f'"{arg.name}", {arg.name}' for arg in schema.keyword_scalars + ] + emplace_kwarguments = "\n ".join( + [ + f"kwarguments.emplace_back({a});" + for a in emplace_kwarg_values + emplace_kwarg_scalars + ] + ) + return f"""\ + std::vector arguments; + std::vector kwarguments; + arguments.reserve({len(emplace_arguments)}); + kwarguments.reserve({len(emplace_kwarg_values + emplace_kwarg_scalars)}); + size_t i = 0; + {emplace_arguments_str} + {emplace_kwarguments} + torch::lazy::TSOpVector {schema.aten_name}_out = torch::lazy::LowerTSBuiltin(function, op().op, arguments, kwarguments); + TORCH_CHECK_EQ({schema.aten_name}_out.size(), {len(schema.returns)}); + + return {schema.aten_name}_out; +""" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/native_functions.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/native_functions.py new file mode 100644 index 0000000000000000000000000000000000000000..f3527d72e088d37c4cddc44fa7e48c51d0d9816e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/native_functions.py @@ -0,0 +1,84 @@ +from __future__ import annotations + +import torchgen.api.meta as meta +import torchgen.api.structured as structured +from torchgen.api.types import kernel_signature +from torchgen.context import with_native_function_and_index +from torchgen.model import BackendIndex, NativeFunction, NativeFunctionsGroup +from torchgen.utils import mapMaybe + + +def torch_api_key_word_prefix(bankend_index: BackendIndex) -> str: + if bankend_index.external: + return "" + + # Although Intel GPU ATen library is out-of-tree, it still utilizes torchgen to produce structrued + # kernels. Regarding these produced structured kernels, they should be visible for the Intel GPU ATen + # library. Therefore, we need to add "TORCH_XPU_API" prefix to these structured kernels, + # rather than "TORCH_API". Because the semantic of "TORCH_API" is "hidden" for out-of-tree backends. + # For other in-tree backends like cpu and cuda, they still use "TORCH_API" prefix with "visible" semantic. + device_torch_api_key_word_mapping = { + "XPU": "TORCH_XPU_API", + } + + return ( + device_torch_api_key_word_mapping.get( + bankend_index.dispatch_key.name, "TORCH_API" + ) + + " " + ) + + +@with_native_function_and_index +def gen_unstructured(f: NativeFunction, backend_index: BackendIndex) -> str | None: + sig = kernel_signature(f, backend_index) + metadata = backend_index.get_kernel(f) + if metadata is None: + return None + if "legacy::" in metadata.kernel: + return None + else: + prefix = "static" if backend_index.external else "TORCH_API" + return f"{prefix} {sig.decl(name=metadata.kernel)};" + + +@with_native_function_and_index +def gen_structured(g: NativeFunctionsGroup, backend_index: BackendIndex) -> list[str]: + meta_name = meta.name(g) + out_args = structured.impl_arguments(g) + metadata = backend_index.get_kernel(g) + if metadata is None: + return [] + prefix = torch_api_key_word_prefix(backend_index) + return [ + f"""\ +struct {prefix}structured_{metadata.kernel} : public at::meta::structured_{meta_name} {{ +void impl({', '.join(a.decl() for a in out_args)}); +}}; +""" + ] + + +# Generates NativeFunctions.h, a list of forward declarations of all +# actual kernel definitions we keep in aten/src/ATen/native/ +@with_native_function_and_index +def compute_native_function_declaration( + g: NativeFunctionsGroup | NativeFunction, backend_index: BackendIndex +) -> list[str]: + metadata = backend_index.get_kernel(g) + if isinstance(g, NativeFunctionsGroup): + if metadata is not None and metadata.structured: + if backend_index.external: + # Structured hasn't been tested with external backends yet. + raise AssertionError( + "Structured external backend functions are not implemented yet." + ) + else: + return gen_structured(g, backend_index) + else: + return list( + mapMaybe(lambda f: gen_unstructured(f, backend_index), g.functions()) + ) + else: + x = gen_unstructured(g, backend_index) + return [] if x is None else [x] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/register_dispatch_key.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/register_dispatch_key.py new file mode 100644 index 0000000000000000000000000000000000000000..c9dd0b205004e97049449878e648e8a60281077c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/register_dispatch_key.py @@ -0,0 +1,1006 @@ +from __future__ import annotations + +import itertools +import textwrap +from dataclasses import dataclass +from typing import Literal, TYPE_CHECKING + +import torchgen.api.cpp as cpp +import torchgen.api.meta as meta +import torchgen.api.structured as structured +from torchgen.api.translate import translate +from torchgen.api.types import ( + BaseCType, + Binding, + ConstRefCType, + CppSignature, + CppSignatureGroup, + DispatcherSignature, + Expr, + kernel_signature, + MutRefCType, + NamedCType, + NativeSignature, + tensorT, +) +from torchgen.context import method_with_native_function, native_function_manager +from torchgen.model import ( + Argument, + BackendIndex, + DeviceCheckType, + DispatchKey, + gets_generated_out_inplace_wrapper, + is_cuda_dispatch_key, + NativeFunction, + NativeFunctionsGroup, + SchemaKind, + TensorOptionsArguments, +) +from torchgen.utils import assert_never, mapMaybe, Target + + +if TYPE_CHECKING: + from torchgen.selective_build.selector import SelectiveBuilder + + +def gen_registration_headers( + backend_index: BackendIndex, + per_operator_headers: bool, + rocm: bool, +) -> list[str]: + if per_operator_headers: + headers = ["#include "] + else: + headers = ["#include "] + + if backend_index.dispatch_key in (DispatchKey.CPU, DispatchKey.Meta): + headers.append("#include ") + elif backend_index.dispatch_key == DispatchKey.CUDA: + if rocm: + headers.append("#include ") + else: + headers.append("#include ") + elif backend_index.dispatch_key == DispatchKey.MPS: + headers.append("#include ") + elif backend_index.dispatch_key == DispatchKey.XPU: + # XPU specific, this header resides in third_party/torch-xpu-ops + headers.append("#include ") + elif per_operator_headers: + headers += [ + "#include ", + "#include ", + "#include ", + "#include ", + ] + else: + headers.append("#include ") + + headers.append("#include ") + return headers + + +def gen_empty_impl_names( + backend_index: BackendIndex, +) -> tuple[str | None, str | None]: + empty_impl = None + empty_strided_impl = None + + if backend_index.dispatch_key in ( + DispatchKey.Meta, + DispatchKey.CPU, + DispatchKey.CUDA, + DispatchKey.MPS, + DispatchKey.XPU, + ): + dispatch = str(backend_index.dispatch_key).lower() + empty_impl = f"at::detail::empty_{dispatch}" + empty_strided_impl = f"at::detail::empty_strided_{dispatch}" + elif backend_index.dispatch_key in ( + DispatchKey.CompositeExplicitAutogradNonFunctional, + DispatchKey.QuantizedCPU, + DispatchKey.QuantizedCUDA, + DispatchKey.XPU, + ): + empty_impl = "at::empty" + empty_strided_impl = "at::empty_strided" + + return empty_impl, empty_strided_impl + + +def gen_create_out_helper(backend_index: BackendIndex) -> list[str]: + if backend_index.dispatch_key == DispatchKey.Meta: + empty_options = "options.device(at::kMeta)" + else: + empty_options = "options" + + empty_impl, empty_strided_impl = gen_empty_impl_names(backend_index) + if empty_impl is None: + return [] + + return [ + f""" +Tensor create_out(IntArrayRef sizes, IntArrayRef strides, const TensorOptions &options) {{ + if (strides.empty()) {{ + return {empty_impl}(sizes, {empty_options}); + }} else {{ + return {empty_strided_impl}(sizes, strides, {empty_options}); + }} +}} +""" + ] + + +def gen_maybe_create_proxy_helper(backend_index: BackendIndex) -> list[str]: + _, empty_strided_impl = gen_empty_impl_names(backend_index) + return ( + [] + if empty_strided_impl is None + else [ + f""" +std::optional maybe_create_proxy(const Tensor &out, IntArrayRef sizes, IntArrayRef strides, const TensorOptions &options) {{ + if (out.strides() != strides) {{ + return {empty_strided_impl}(sizes, strides, options); + }} + return std::nullopt; +}} +""" + ] + ) + + +def gen_resize_out_helper(backend_index: BackendIndex) -> list[str]: + if backend_index.dispatch_key == DispatchKey.CompositeExplicitAutogradNonFunctional: + # The function isn't used by this key (since only functional ops have a kernel for this key), + # so we need to not include it to avoid a defined-but-not-used error. + return [] + return [ + """ +void resize_out(const Tensor &out, IntArrayRef sizes, IntArrayRef strides, const TensorOptions &options) { + TORCH_CHECK(options.dtype() == out.dtype(), + "Expected out tensor to have dtype ", options.dtype(), ", but got ", out.dtype(), " instead"); + TORCH_CHECK(options.device() == out.device(), + "Expected out tensor to have device ", options.device(), ", but got ", out.device(), " instead"); + const bool resized = at::native::resize_output(out, sizes); + // Only restride if a resize occurred; otherwise we ignore the (advisory) + // strides from the meta function and directly use the output tensor's + // preexisting strides + if (resized) { + if (!strides.empty()) { + TORCH_INTERNAL_ASSERT(!options.memory_format_opt().has_value()); + // TODO: avoid the redispatch here + out.as_strided_(sizes, strides); + } else if (options.memory_format_opt().has_value()) { + out.unsafeGetTensorImpl()->empty_tensor_restride(*options.memory_format_opt()); + } + } +} +""" + ] + + +def gen_check_inplace_helper(backend_index: BackendIndex) -> list[str]: + return [ + """ +void check_inplace(const Tensor &self, IntArrayRef sizes, const TensorOptions &options) { + // These checks are needed on those operators that: + // 1) don't use 'TensorIterator' (e.g. 'addmm' and 'baddbmm') + // 2) have particular typing rules (e.g. 'cumsum' and 'cumprod') + // For other operators (e.g. 'add'), 'TensorIterator' already checks + // these things separately. + TORCH_CHECK(options.dtype() == self.dtype(), + "Bad in-place call: ", + "input tensor dtype ", self.dtype(), " and output tensor dtype ", options.dtype(), " should match"); + TORCH_CHECK(options.device() == self.device(), + "Bad in-place call: ", + "input tensor device ", self.device(), " and output tensor device ", options.device(), " should match"); + TORCH_CHECK(sizes == self.sizes(), + "Bad in-place call: ", + "input tensor size ", self.sizes(), " and output tensor size ", sizes, " should match"); +} +""" + ] + + +def gen_registration_helpers(backend_index: BackendIndex) -> list[str]: + return [ + 'C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wunused-function")', + *gen_create_out_helper(backend_index), + *gen_resize_out_helper(backend_index), + *gen_check_inplace_helper(backend_index), + *gen_maybe_create_proxy_helper(backend_index), + "C10_DIAGNOSTIC_POP()", + ] + + +# Generates Register{dispatch}.cpp (e.g., RegisterCPU.cpp). +# +# - The primary function of this file is to register all of the +# implementations for the given dispatch key to the dispatcher, +# so they are available for use in PyTorch. If dispatch is +# None, we generate schema (def) registrations and catchall +# registrations. +# - The secondary function of this file is to generate a wrapper +# around functions. In CPUType these wrappers do nothing +# (and should be removed), but in other cases they handle +# DeviceGuard. A small extra benefit of wrappers is they +# are not overloaded, so they can be used in the registration +# API without having to disambiguate which overload you want +# (as would be the case if you directly registered native:: +# functions). +# - The tertiary function of this file is to generate *static* +# cpp API bindings which can be used to bypass dispatcher +# directly to kernels, but with user-friendly cpp-style API +@dataclass(frozen=True) +class RegisterDispatchKey: + backend_index: BackendIndex + + target: Literal[ + Target.ANONYMOUS_DEFINITION, + Target.NAMESPACED_DEFINITION, + Target.NAMESPACED_DECLARATION, + Target.REGISTRATION, + ] + + # Selector object to determine which operators to generate + # registration code for. + selector: SelectiveBuilder + + # Whether or not we are actually code-genning for ROCm + rocm: bool + + # Whether or not to generate symint registrations or not. External users + # of codegen who don't care about symints can set this to false to get + # non-SymInt codegen + symint: bool + + # The class that all unstructured native functions live under. This is used to improve + # compiler error messages when a kernel writer adds a native function with the wrong signature. + # This is only used in unstructured kernels, since structured kernels already live in a class. + # Finally, this field is currently Optional because it is only used by external backends. + # It would be nice if we can add the same logic to in-tree kernels too, but that requires updating + # all of the existing kernel signatures scattered across aten/src/ATen/native. + class_method_name: str | None + + # Only set to true in lightweight dispatch. If lightweight dispatch is enabled we are registering + # operators into JIT op registry, thus we need to avoid generating code to register into the dispatcher. + skip_dispatcher_op_registration: bool + + @staticmethod + def gen_device_check( + type: DeviceCheckType, args: list[Argument], method_name: str + ) -> str: + if type == DeviceCheckType.NoCheck: + return " // No device check\n" + + device_check = "std::optional common_device = std::nullopt;\n" + device_check += "(void)common_device; // Suppress unused variable warning\n" + for arg in args: + # Only tensor like arguments are eligible + if arg.type.is_tensor_like(): + device_check += f""" + c10::impl::check_and_update_common_device(common_device, {arg.name}, "{method_name}", "{arg.name}");""" + return device_check + + @method_with_native_function + def __call__(self, f: NativeFunctionsGroup | NativeFunction) -> list[str]: + if isinstance(f, NativeFunctionsGroup): + g: NativeFunctionsGroup = f + # Note: We call gen_structured() if the operator is marked structured, regardless of the backend. + # gen_structured() has special logic to handle auto-generated kernels. + if g.structured: + return self.gen_structured(g) + else: + return list( + mapMaybe(lambda f: self.gen_unstructured(f, g), g.functions()) + ) + elif isinstance(f, NativeFunction): + r = self.gen_unstructured(f) + return [] if r is None else [r] + else: + assert_never(f) + + def wrapper_kernel_sig( + self, f: NativeFunction + ) -> NativeSignature | DispatcherSignature: + # The prefix is just to ensure uniqueness. The Dispatcher API doesn't guarantee unique kernel names. + return DispatcherSignature.from_schema( + f.func, + prefix=f"wrapper_{self.backend_index.dispatch_key}_{f.func.name.overload_name}_", + symint=self.symint, + ) + + def gen_out_inplace_wrapper( + self, f: NativeFunction, g: NativeFunctionsGroup | None + ) -> str | None: + if g is None: + return None + k = f.func.kind() + if k is SchemaKind.inplace: + copy_op = "at::_copy_from" + elif k is SchemaKind.out: + copy_op = "at::_copy_from_and_resize" + else: + raise AssertionError("gen_out_inplace_wrapper called on a functional op") + + sig = self.wrapper_kernel_sig(f) + name = sig.name() + + func_res = f"{name}_tmp" + return_names = cpp.return_names(f) + if len(return_names) > 1: + updates = "\n ".join( + f"{copy_op}(std::get<{i}>({func_res}), {ret_name});" + for i, ret_name in enumerate(return_names) + ) + returns = f'{sig.returns_type().cpp_type()}({", ".join(return_names)})' + elif len(return_names) == 1: + ret_name = return_names[0] + updates = f"{copy_op}({func_res}, {ret_name});" + returns = ret_name + else: + assert len(f.func.arguments.out) == 1 + returns = "" + out_arg = f.func.arguments.out[0] + if out_arg.type.is_list_like(): + updates = f"""\ + for (int64_t i = 0; i < {func_res}.size(); ++i) {{ + {copy_op}({func_res}[i], {out_arg.name}[i]); + }}""" + else: + updates = f"{copy_op}({func_res}, {out_arg.name});" + + functional_sig = self.wrapper_kernel_sig(g.functional) + wrapper_name = sig.name() + + return f"""\ +{sig.defn(name=wrapper_name)} {{ + auto {func_res} = {functional_sig.name()}({", ".join(e.expr for e in translate(sig.arguments(), functional_sig.arguments()))}); + {updates} + return {returns}; +}} +""" + + def gen_structured(self, g: NativeFunctionsGroup) -> list[str]: + metadata = self.backend_index.get_kernel(g) + if self.backend_index.dispatch_key == DispatchKey.Meta: + assert not self.backend_index.has_kernel(g.out), ( + "Do not explicitly specify Meta dispatch key on structured " + "functions, they will be automatically generated for you" + ) + elif ( + self.backend_index.dispatch_key + == DispatchKey.CompositeExplicitAutogradNonFunctional + ): + assert not self.backend_index.has_kernel(g.out), ( + "Do not explicitly specify CompositeExplicitAutograd dispatch key on structured " + "functions, they will be automatically generated for you" + ) + elif metadata is None or not metadata.structured: + return list(mapMaybe(lambda f: self.gen_unstructured(f, g), g.functions())) + structured_gen = StructuredRegisterDispatchKey( + self.backend_index, + self.target, + self.selector, + self.rocm, + self.symint, + self.class_method_name, + self.skip_dispatcher_op_registration, + g, + ) + return list(mapMaybe(structured_gen.gen_one, g.functions())) + + def gen_unstructured( + self, f: NativeFunction, g: NativeFunctionsGroup | None = None + ) -> str | None: + with native_function_manager(f): + inplace_meta = False + gets_out_inplace_wrapper = False + if not self.backend_index.has_kernel(f): + if ( + self.backend_index.dispatch_key == DispatchKey.Meta + and f.func.kind() is SchemaKind.inplace + and + # Defer to composites for meta implementation + not f.has_composite_kernel + and + # Inplace list operations are not supported + len(f.func.returns) == 1 + ): + inplace_meta = True + elif ( + not self.backend_index.use_out_as_primary + and g is not None + and gets_generated_out_inplace_wrapper(f, g, self.backend_index) + ): + # We want to generate inplace/out wrappers, that don't have a kernel for the backend. + gets_out_inplace_wrapper = True + else: + return None + if f.manual_kernel_registration: + return None + + if ( + self.target is Target.REGISTRATION + and not self.selector.is_native_function_selected(f) + ): + return None + + sig = self.wrapper_kernel_sig(f) + + name = sig.name() + returns_type = sig.returns_type().cpp_type() + args = sig.arguments() + args_str = ", ".join(a.defn() for a in args) + + # See Note [Direct dispatch bindings] + cpp_sig_group = CppSignatureGroup.from_native_function( + f, method=False, fallback_binding=False + ) + + # TODO: dedupe this with the structured codegen + if self.target is Target.NAMESPACED_DECLARATION: + result = "" + for cpp_sig in cpp_sig_group.signatures(symint=self.symint): + result += f"TORCH_API {cpp_sig.decl()};\n" + return result + elif self.target is Target.NAMESPACED_DEFINITION: + + def generate_defn(cpp_sig: CppSignature) -> str: + return f""" +{cpp_sig.defn()} {{ +return {sig.name()}({', '.join(e.expr for e in translate(cpp_sig.arguments(), sig.arguments()))}); +}} +""" + + result = "" + for cpp_sig in cpp_sig_group.signatures(symint=self.symint): + result += generate_defn(cpp_sig) + return result + + elif self.target is Target.ANONYMOUS_DEFINITION: + # short circuit for inplace_meta + if inplace_meta: + assert f.func.arguments.self_arg is not None + self_arg_name = f.func.arguments.self_arg.argument.name + # TODO: handle in place on tensor list + return f""" +{returns_type} {name}({args_str}) {{ + TORCH_CHECK_NOT_IMPLEMENTED({self_arg_name}.is_meta(), + "Cannot inplace into non-meta tensor with meta tensor argument"); + return {self_arg_name}; +}} +""" + + # short circuit for generated inplace/out wrappers + if gets_out_inplace_wrapper: + return self.gen_out_inplace_wrapper(f, g) + + metadata = self.backend_index.get_kernel(f) + if metadata is None: + return None + if self.class_method_name is None: + impl_name = f"{metadata.cpp_namespace}::{metadata.kernel}" + else: + impl_name = f"{metadata.cpp_namespace}::{self.class_method_name}::{metadata.kernel}" + + kernel_sig = kernel_signature(f, self.backend_index) + + args_exprs_str = ", ".join( + e.expr + for e in translate( + sig.arguments(), kernel_sig.arguments(), method=False + ) + ) + + device_check = " // No device check\n" + # Backends that require device guards presumably also require device checks. + if self.backend_index.device_guard: + device_check_args = itertools.chain( + f.func.arguments.out, f.func.arguments.flat_positional + ) + device_check = RegisterDispatchKey.gen_device_check( + f.device_check, list(device_check_args), name + ) + + device_guard = "// DeviceGuard omitted" # default + if f.device_guard and self.backend_index.device_guard: + has_tensor_options = any( + isinstance(a, TensorOptionsArguments) + for a in f.func.arguments.non_out + ) + if has_tensor_options: + # kernel is creating a tensor + device_guard = """ + const DeviceGuard device_guard(device_or_default(device));""" + + # CUDA requires special handling + if is_cuda_dispatch_key(self.backend_index.dispatch_key): + device_guard = f"globalContext().lazyInitDevice(c10::DeviceType::CUDA);\n{device_guard}" + else: + # kernel is operating on existing tensors + + # There is precedence for which argument we use to do + # device guard. This describes the precedence order. + self_arg = ( + [f.func.arguments.self_arg.argument] + if f.func.arguments.self_arg is not None + else [] + ) + candidate_args = itertools.chain( + self_arg, + f.func.arguments.out, + f.func.arguments.flat_positional, + ) + + # Only tensor like arguments are eligible + device_of = next( + ( + f"{a.name}" + for a in candidate_args + if a.type.is_tensor_like() + ), + None, + ) + if device_of is not None: + device_guard = f"const OptionalDeviceGuard device_guard(device_of({device_of}));" + + return f"""\ +namespace {{ + +{returns_type} {name}({args_str}) {{ + {device_check} + + {device_guard} + return {impl_name}({args_exprs_str}); +}} + +}} // anonymous namespace +""" + + elif self.target is Target.REGISTRATION: + if f.manual_kernel_registration or self.skip_dispatcher_op_registration: + return None + else: + payload = f"TORCH_FN({name})" + return f'm.impl("{f.func.name}",\n{payload});\n' + else: + assert_never(self.target) + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# STRUCTURED +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +@dataclass(frozen=True) +class StructuredRegisterDispatchKey(RegisterDispatchKey): + g: NativeFunctionsGroup + + def gen_class_set_output_functions( + self, k: SchemaKind, parent_class: str, generate_super: bool + ) -> str: + if generate_super: + set_output_super = f"{parent_class}::set_output_raw_strided(output_idx, sizes, strides, options, names);" + else: + set_output_super = "" + + def gen_set_output_function(name: str, maybe_create_proxy: bool) -> str: + return f""" +void set_output_{name}( + int64_t output_idx, IntArrayRef sizes, IntArrayRef strides, + TensorOptions options, DimnameList names +) override {{ +{textwrap.indent(self.gen_class_set_output_body(k, maybe_create_proxy), " ")} + if (!names.empty()) {{ + namedinference::propagate_names(outputs_[output_idx], names); + }} + // super must happen after, so that downstream can use maybe_get_output + // to retrieve the output +{textwrap.indent(set_output_super, " ")} +}} +""" + + return f""" +{gen_set_output_function("strided", maybe_create_proxy=True)} +{gen_set_output_function("raw_strided", maybe_create_proxy=False)} +""" + + def gen_class_set_output_body(self, k: SchemaKind, maybe_create_proxy: bool) -> str: + if self.backend_index.dispatch_key in [ + DispatchKey.CUDA, + DispatchKey.MPS, + DispatchKey.XPU, + DispatchKey.CompositeExplicitAutogradNonFunctional, + ]: + maybe_set_guard = """ +auto current_device = guard_.current_device(); +if (C10_UNLIKELY(current_device.has_value())) { + TORCH_INTERNAL_ASSERT(*current_device == options.device(), + "structured kernels don't support multi-device outputs"); +} else { + guard_.reset_device(options.device()); +} +""" + maybe_set_guard_line = maybe_set_guard + "\n" + else: + maybe_set_guard_line = maybe_set_guard = "" + + if maybe_create_proxy: + create_proxy = """ +auto maybe_proxy = maybe_create_proxy(out, sizes, strides, options); +if (C10_UNLIKELY(maybe_proxy.has_value())) { + proxy_outputs_[output_idx] = std::move(maybe_proxy).value(); +} +""" + else: + create_proxy = "" + + if k is SchemaKind.functional: + assert self.backend_index.dispatch_key in ( + DispatchKey.Meta, + DispatchKey.CPU, + DispatchKey.CUDA, + DispatchKey.MPS, + DispatchKey.XPU, + DispatchKey.CompositeExplicitAutogradNonFunctional, + ) + return f"""{maybe_set_guard_line} +outputs_[output_idx] = create_out(sizes, strides, options);""" + elif k is SchemaKind.inplace: + return f"""{maybe_set_guard_line} +const auto& out = outputs_[output_idx].get(); +check_inplace(out, sizes, options); +{create_proxy}""" + elif k is SchemaKind.out: + return f"""{maybe_set_guard_line} +const auto& out = outputs_[output_idx].get(); +resize_out(out, sizes, strides, options); +{create_proxy}""" + elif k is SchemaKind.mutable or k is SchemaKind.scratch: + raise AssertionError( + f"{k} structured operators are currently not supported" + ) + else: + assert_never(k) + + # returns the definition of a ctor, as well as how to construct + # this class to a variable named op + def gen_class_ctor(self, k: SchemaKind, class_name: str, returns: int) -> str: + if k is SchemaKind.functional: + return "" + elif k is SchemaKind.inplace: + # TODO: Make sure out argument is guaranteed to be self + return f"{class_name}(Tensor& self) : outputs_{{std::ref(self)}} {{}}" + elif k is SchemaKind.out: + out_args = ", ".join(f"Tensor& out{i}" for i in range(returns)) + out_refs = ", ".join(f"std::ref(out{i})" for i in range(returns)) + return f"{class_name}({out_args}) : outputs_{{ {out_refs} }} {{}}" + elif k is SchemaKind.mutable or k is SchemaKind.scratch: + raise AssertionError( + f"{k} structured operators are currently not supported" + ) + else: + assert_never(k) + + def gen_class( + self, + f: NativeFunction, + k: SchemaKind, + *, + class_name: str, + parent_class: str, + generate_super: bool, + ) -> str: + if k is SchemaKind.functional: + output_type = "Tensor" + output_value = "outputs_[output_idx]" + proxy_field = "" + elif k is SchemaKind.inplace: + output_type = "std::reference_wrapper" + output_value = "proxy_outputs_[output_idx].has_value() ? *proxy_outputs_[output_idx] : outputs_[output_idx].get()" + proxy_field = f"std::array<::std::optional, {len(f.func.returns)}> proxy_outputs_;" + elif k is SchemaKind.out: + output_type = "std::reference_wrapper" + output_value = "proxy_outputs_[output_idx].has_value() ? *proxy_outputs_[output_idx] : outputs_[output_idx].get()" + proxy_field = f"std::array<::std::optional, {len(f.func.returns)}> proxy_outputs_;" + else: + raise RuntimeError(f"Unsupported SchemaKind {k}") + + if self.backend_index.dispatch_key == DispatchKey.CUDA: + if self.rocm: + guard_field = "c10::hip::OptionalHIPGuardMasqueradingAsCUDA guard_;" + else: + guard_field = "c10::cuda::OptionalCUDAGuard guard_;" + elif ( + self.backend_index.dispatch_key + == DispatchKey.CompositeExplicitAutogradNonFunctional + ): + guard_field = "c10::OptionalDeviceGuard guard_;" + elif self.backend_index.dispatch_key == DispatchKey.MPS: + # TODO: Move to OptionalMPSGuard. + guard_field = "c10::OptionalDeviceGuard guard_;" + elif self.backend_index.dispatch_key == DispatchKey.XPU: + guard_field = "c10::OptionalDeviceGuard guard_;" + else: + guard_field = "" + + indent = " " * 4 + class_ctor_str = self.gen_class_ctor(k, class_name, len(f.func.returns)) + lines = ( + f"struct {class_name} final : public {parent_class} {{", + f"{textwrap.indent(class_ctor_str, indent)}", + f"{textwrap.indent(self.gen_class_set_output_functions(k, parent_class, generate_super), indent)}", + " const Tensor& maybe_get_output(int64_t output_idx) override {", + f" return {output_value};\n", # type: ignore[possibly-undefined] # TODO: audit + " }", + # type: ignore[possibly-undefined] # TODO: audit + f" std::array<{output_type}, {len(f.func.returns)}> outputs_;", + f"{textwrap.indent(proxy_field, indent)}", # type: ignore[possibly-undefined] # TODO: audit + f"{textwrap.indent(guard_field, indent)}", + "};", + ) + return "\n".join(line for line in lines if line) + + @method_with_native_function + def gen_one(self, f: NativeFunction) -> str | None: + assert not f.manual_kernel_registration + + if ( + self.target is Target.REGISTRATION + and not self.selector.is_native_function_selected(f) + ): + return None + + # TODO: Now, there is something interesting going on here. In the code below, + # we generate CompositeExplicitAutogradNonFunctional implementations of functional and inplace + # based on the out implementation. But in fact, out is definable by + # functional too (just not very efficiently), and this is honestly the + # MORE likely situation for a backend implementor. How do we pick? + # Well, taking a page from Haskell type classes and default methods, + # we could conceivably register a circular definition (out in terms + # of functional, and functional in terms of out) and just require + # someone to implement one or the other. We'd have to do a little bit + # of work to not register one of these "weak" definitions unless there + # is a strong definition somewhere in the DAG! So it's not implemented yet. + if ( + self.backend_index.dispatch_key + == DispatchKey.CompositeExplicitAutogradNonFunctional + and f.func.kind() is SchemaKind.out + ): + # Never generate a default implementation for out, that's what you + # have to define as a backend implementor + return None + + # Note [Direct dispatch bindings] + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # Signature of the non-dispatched function we'll expose in a header + # (e.g., at::cpu::add). We don't generate methods (TODO: do this + # when CPUTensor class is a thing); nor do we generate fallback + # bindings for manual_cpp_binding functions. + cpp_sig_group = CppSignatureGroup.from_native_function( + f, method=False, fallback_binding=False + ) + + # Signature of the wrapper function we'll register to the dispatcher + kern = self.backend_index.get_kernel(f) + sig = NativeSignature( + f.func, + prefix=f"wrapper_{self.backend_index.dispatch_key}_", + symint=kern is not None and kern.supports_symint(), + ) + + if self.target is Target.NAMESPACED_DECLARATION: + result = "" + for cpp_sig in cpp_sig_group.signatures(symint=self.symint): + result += f"TORCH_API {cpp_sig.decl()};\n" + return result + + elif self.target is Target.NAMESPACED_DEFINITION: + + def generate_defn(cpp_sig: CppSignature) -> str: + return f""" +{cpp_sig.defn()} {{ +return {sig.name()}({', '.join(e.expr for e in translate(cpp_sig.arguments(), sig.arguments()))}); +}} +""" + + result = "" + for cpp_sig in cpp_sig_group.signatures(symint=self.symint): + result += generate_defn(cpp_sig) + return result + + elif self.target is Target.ANONYMOUS_DEFINITION: + k = f.func.kind() + + # Construct the body of the wrapper function with signature sig + sig_body = [] + # We'll use context to keep track of any variables we've brought + # into scope while generating code + context: list[Binding | Expr] = list(sig.arguments()) + + # Initialize the class corresponding to this structured + # operator; feeding it the output argument(s) if it is known + if self.backend_index.dispatch_key is DispatchKey.Meta: + class_name = f"structured_{meta.name(self.g)}_meta_{k.name}" + parent_class = f"at::meta::structured_{meta.name(self.g)}" + elif ( + self.backend_index.dispatch_key + is DispatchKey.CompositeExplicitAutogradNonFunctional + ): + # TODO: dedup this branch + class_name = f"structured_{meta.name(self.g)}_default_backend_{k.name}" + parent_class = f"at::meta::structured_{meta.name(self.g)}" + else: + metadata = self.backend_index.get_kernel(self.g) + assert metadata is not None + class_name = f"structured_{metadata.kernel}_{k.name}" + parent_class = f"{metadata.cpp_namespace}::structured_{metadata.kernel}" + + if self.backend_index.device_guard: + device_check_args = itertools.chain( + f.func.arguments.out, f.func.arguments.flat_positional + ) + sig_body.append( + RegisterDispatchKey.gen_device_check( + f.device_check, list(device_check_args), sig.name() + ) + ) + + if k is SchemaKind.functional: + sig_body.append(f"{class_name} op;") + elif k is SchemaKind.inplace: + sig_body.append(f"{class_name} op(self);") + elif k is SchemaKind.out: + out_args_str = ", ".join(a.name for a in f.func.arguments.out) + sig_body.append(f"{class_name} op({out_args_str});") + + # Translate the input native arguments into structured + # arguments for the meta call + meta_exprs = ", ".join( + e.expr + for e in translate( + context, structured.meta_arguments(self.g), method=False + ) + ) + + if self.g.out.precomputed: + # If this function group has precomputed elements, the meta function + # returns a struct containing them which must be saved so that it + # can be unpacked when generating code to call the impl. + sig_body.append(f"auto precompute = op.meta({meta_exprs});") + + # Put all of the contents of the precompute struct into the context + # so that translate will be able to return the correct args for the + # call to the impl. + precomputed_values = [ + *self.g.out.precomputed.replace.values(), + self.g.out.precomputed.add, + ] + for precomputed_elems in precomputed_values: + context.extend( + Expr( + expr=f"precompute.{arg.name}", + type=structured.argument_type(arg, binds=arg.name), + ) + for arg in precomputed_elems + ) + + # Add a use of the precompute struct so FB internal compilers don't + # complain that there is an unused variable. + sig_body.append("(void)precompute;") + else: + sig_body.append(f"op.meta({meta_exprs});") + + # After running meta, op.outputs_ is guaranteed to be valid; + # add it to the context + out_args = structured.out_arguments(self.g) + for i, out_arg in enumerate(out_args): + assert ConstRefCType(BaseCType(tensorT)) == out_arg.nctype.type + + if k is SchemaKind.out: + expr = f"op.maybe_get_output({i})" + else: + expr = f"op.outputs_[{i}]" + + context.append( + Expr( + expr=expr, + # TODO: Stop hardcoding that the output type is a Tensor. Note + # that for the codegen here this is fine because outputs_ is + # hardcoded to be tensor already + type=NamedCType( + out_arg.nctype.name, MutRefCType(BaseCType(tensorT)) + ), + ) + ) + + # With the expanded context, do the impl call (if not a meta + # function) + if ( + self.backend_index.dispatch_key + == DispatchKey.CompositeExplicitAutogradNonFunctional + ): + # TODO: https://github.com/pytorch/pytorch/issues/53023 + out_sig_group = CppSignatureGroup.from_native_function( + self.g.out, method=False, fallback_binding=f.manual_cpp_binding + ) + out_sig = out_sig_group.most_faithful_signature() + api_name = out_sig.name() + out_exprs = ", ".join( + e.expr + for e in translate(context, out_sig.arguments(), method=False) + ) + # TODO: I think this means structured won't work with method + # only functions (but maybe you're saved by faithful? iunno.) + # NB: Originally I wrote this as an at::redispatch call, but + # I got in trouble because that meant I needed a DispatchKeySet + # in the wrapper function, which meant I needed a DispatchKeySet + # in the DispatchKeyFunctions declarations, but the defined API + # there does NOT permit a dispatch key set. I think you can + # probably unwind this by calling some function to do the TLS + # fetch and get the DispatchKeySet when you don't have it, but + # I didn't do it for this version + sig_body.append(f"at::{api_name}({out_exprs});") + elif self.backend_index.dispatch_key != DispatchKey.Meta: + impl_exprs = ", ".join( + e.expr + for e in translate( + context, structured.impl_arguments(self.g), method=False + ) + ) + sig_body.append(f"op.impl({impl_exprs});") + + # Go over each output, and check if there is a proxy created for it. + # If so, copy it over to the original output. + if k is SchemaKind.out or k is SchemaKind.inplace: + for i in range(len(f.func.returns)): + sig_body.append( + f"if (op.proxy_outputs_[{i}].has_value()) op.outputs_[{i}].get().copy_(*op.proxy_outputs_[{i}]);" + ) + + # Destructively return the final tensors + # TODO: Do this in translate instead + if k is SchemaKind.functional: + if len(f.func.returns) == 1: + ret_expr = "std::move(op.outputs_[0])" # small optimization + else: + moved = ", ".join( + f"std::move(op.outputs_[{i}])" + for i in range(len(f.func.returns)) + ) + ret_expr = f"std::make_tuple({moved})" + elif k is SchemaKind.inplace: + ret_expr = "self" + elif k is SchemaKind.out: + if len(f.func.returns) == 1: + ret_expr = f.func.arguments.out[0].name + else: + refs = ", ".join(a.name for a in f.func.arguments.out) + ret_expr = f"std::forward_as_tuple({refs})" + sig_body.append(f"return {ret_expr};") # type: ignore[possibly-undefined] # TODO: audit + + sig_body_str = "\n".join(sig_body) + + # For an overview of what this template code looks like, see + # https://github.com/pytorch/rfcs/pull/9 + return f"""\ +{self.gen_class( +f, k, +class_name=class_name, +parent_class=parent_class, +generate_super=self.g.out.structured_inherits is not None +)} + +{sig.defn()} {{ +{sig_body_str} +}} +""" + + elif self.target is Target.REGISTRATION: + return f'm.impl("{f.func.name}", TORCH_FN({sig.name()}));' + else: + assert_never(self.target) + # Silence mypy's "Missing return statement" error + return None diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/ufunc.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/ufunc.py new file mode 100644 index 0000000000000000000000000000000000000000..598bc8236c799ad4975ed3c21f5658085f2bb4e4 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/dest/ufunc.py @@ -0,0 +1,553 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import TYPE_CHECKING + +import torchgen.api.ufunc as ufunc +from torchgen.api.translate import translate +from torchgen.api.types import ( + BaseCType, + Binding, + CType, + Expr, + NamedCType, + opmath_t, + scalar_t, + StructuredImplSignature, + VectorizedCType, +) +from torchgen.context import with_native_function +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + DispatchKey, + NativeFunctionsGroup, + ScalarType, + UfuncKey, +) +from torchgen.utils import OrderedSet + + +if TYPE_CHECKING: + from collections.abc import Sequence + + from torchgen.api.ufunc import UfunctorBindings + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# CUDA STUFF +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + +# NB: not bothering to generate dispatch stub forward declaration in header, +# we can just paste it whereever necessary + +# TODO: use BackendIndex +# dispatch_key: DispatchKey # only CPU/CUDA right now + + +# Represents functors for implementing CUDA ufuncs. +# Functors are templated by scalar_t because when USERS instantiate functors +# they are templated. A functor looks something like this: +# +# template +# struct CUDAFunctorOnSelf_add { +# using opmath_t = at::opmath_type; +# opmath_t other_; +# opmath_t alpha_; +# CUDAFunctorOnSelf_add(opmath_t other, opmath_t alpha) +# : other_(other), alpha_(alpha) {} +# __device__ scalar_t operator()(scalar_t self) { +# return ufunc::add(static_cast(self), other_, alpha_); +# } +# }; +# +@dataclass(frozen=True) +class UfunctorSignature: + g: NativeFunctionsGroup + scalar_tensor_idx: int | None + name: str + + def arguments(self) -> UfunctorBindings: + return ufunc.ufunctor_arguments( + self.g, scalar_tensor_idx=self.scalar_tensor_idx, scalar_t=scalar_t + ) + + def fields(self) -> list[Binding]: + # fields are renamed to have a trailing underscore, as is conventional + return [b.rename(f"{b.name}_") for b in self.arguments().ctor] + + def returns_type(self) -> CType: + # TODO: don't hardcode; return type will be inferred based on tags on + # the native function + return BaseCType(scalar_t) + + def decl_fields(self) -> str: + return "\n".join(f"{f.type} {f.name};" for f in self.fields()) + + def inline_defn_ctor(self) -> str: + args_str = ", ".join(a.decl() for a in self.arguments().ctor) + # NB: hypothetically could do this with translate but the + # transition here is very regular + init_str = ", ".join(f"{a.name}_({a.name})" for a in self.arguments().ctor) + return f"{self.name}({args_str}) : {init_str} {{}}" + + def decl_apply(self) -> str: + args_str = ", ".join(a.decl() for a in self.arguments().apply) + return f"{self.returns_type().cpp_type()} operator()({args_str}) const" + + +@dataclass(frozen=True) +class UfuncSignature: + g: NativeFunctionsGroup + name: str + compute_t: CType + + def arguments(self) -> list[Binding]: + return ufunc.ufunc_arguments(self.g, compute_t=self.compute_t) + + def call(self, ctx: Sequence[Binding | Expr]) -> str: + return f"{self.name}({', '.join(a.expr for a in translate(ctx, self.arguments()))})" + + +# steps: +# 1. take the functional signature +# 2. use api.ufunc to convert it to template signature. this establishes +# the type of the template function +# 3. use api.ufunc (II) to generate a split struct / operator() signature. +# this establish context in which we call the template signature +# +# StructuredImplSignature context +# ~> functor constructor sig +# +# Functor constructor context +# ~> functor fields sig +# +# Functor apply context (functor fields + functor apply sig) +# ~> template sig +# + + +def eligible_for_binary_scalar_specialization(g: NativeFunctionsGroup) -> bool: + num_tensors = sum( + 1 for a in g.functional.func.arguments.flat_non_out if a.type.is_tensor_like() + ) + return num_tensors == 2 + + +def compute_ufunc_cuda_functors( + g: NativeFunctionsGroup, +) -> tuple[dict[ScalarType, dict[UfuncKey, UfunctorSignature]], str]: + # First, build the functors. + ufunctor_sigs: dict[ScalarType, dict[UfuncKey, UfunctorSignature]] = {} + ufunctors: list[str] = [] + loops = g.out.ufunc_inner_loop + scalar_tensor_idx_lookup = { + UfuncKey.CUDAFunctorOnSelf: 1, + UfuncKey.CUDAFunctorOnOther: 0, + UfuncKey.CUDAFunctor: None, + } + if eligible_for_binary_scalar_specialization(g): + keys = [ + UfuncKey.CUDAFunctorOnSelf, + UfuncKey.CUDAFunctorOnOther, + UfuncKey.CUDAFunctor, + ] + else: + keys = [UfuncKey.CUDAFunctor] + for k in [UfuncKey.CUDAFunctorOnSelf, UfuncKey.CUDAFunctorOnOther]: + assert k not in loops, f"cannot use {k} on non-binary function" + for k in keys: + # If the key was directly defined, skip functor codegen; we assume the + # user already done it for us + if k in loops: + ufunctor_sig = UfunctorSignature( + g, scalar_tensor_idx=scalar_tensor_idx_lookup[k], name=loops[k].name + ) + for dtype in loops[k].supported_dtypes: + ufunctor_sigs.setdefault(dtype, {})[k] = ufunctor_sig + continue + + # Note [ScalarOnly and Generic must match names for CUDA] + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + # Otherwise, look in ANY of the generic entries. For simplicity of + # codegen, both ScalarOnly and Generic are defined, the ufunc name + # must match (if they didn't match, we'd have to generate distinct + # functors per dtype, which is awful, so we're not going to do it unless + # someone really forces us to) + ufunc_name = None + supported_dtypes: OrderedSet[ScalarType] = OrderedSet() + for lk in [UfuncKey.ScalarOnly, UfuncKey.Generic]: + if lk not in loops: + continue + if ufunc_name is None: + ufunc_name = loops[lk].name + else: + # See Note [ScalarOnly and Generic must match names for CUDA] + assert ( + ufunc_name == loops[lk].name + ), "ScalarOnly and Generic must have same ufunc name" + supported_dtypes |= loops[lk].supported_dtypes + assert ufunc_name is not None + + name = f"{k}_{ufunc_name}" + ufunctor_sig = UfunctorSignature( + g, scalar_tensor_idx=scalar_tensor_idx_lookup[k], name=name + ) + for dtype in supported_dtypes: + ufunctor_sigs.setdefault(dtype, {})[k] = ufunctor_sig + + ufunc_sig = UfuncSignature( + g, name=f"ufunc::{ufunc_name}", compute_t=BaseCType(opmath_t) + ) + apply_ctx = ufunctor_sig.fields() + ufunctor_sig.arguments().apply + ufunctors.append( + f""" +template +struct {ufunctor_sig.name} {{ + using opmath_t = at::opmath_type; + {ufunctor_sig.decl_fields()} + {ufunctor_sig.inline_defn_ctor()} + __device__ {ufunctor_sig.decl_apply()} {{ + return {ufunc_sig.call(apply_ctx)}; + }} +}}; +""" + ) + + return ufunctor_sigs, "\n".join(ufunctors) + + +@dataclass(frozen=True) +class BinaryScalarSpecializationConfig: + scalar_idx: int + ctor_tensor: str + ufunc_key: UfuncKey + + +BinaryScalarSpecializationConfigs = [ + BinaryScalarSpecializationConfig( + scalar_idx=0, + ctor_tensor="self", + ufunc_key=UfuncKey.CUDAFunctorOnOther, + ), + BinaryScalarSpecializationConfig( + scalar_idx=1, + ctor_tensor="other", + ufunc_key=UfuncKey.CUDAFunctorOnSelf, + ), +] + + +def compute_ufunc_cuda_dtype_body( + g: NativeFunctionsGroup, + dtype: ScalarType, + inner_loops: dict[UfuncKey, UfunctorSignature], + parent_ctx: Sequence[Binding], +) -> str: + body = "using opmath_t = at::opmath_type;" + body += "if (false) {}\n" # for ease of codegen + for config in BinaryScalarSpecializationConfigs: + if config.ufunc_key not in inner_loops: + continue + ufunctor_sig = inner_loops[config.ufunc_key] + scalar_idx = config.scalar_idx + 1 + # Make a copy and at the same time widen the type (not permissible + # without copy; we don't want to mutate the input argument anyway) + ctx: list[Expr | Binding] = list(parent_ctx) + ctx.append( + Expr( + expr=f"iter.scalar_value({scalar_idx})", + type=NamedCType(config.ctor_tensor, BaseCType(opmath_t)), + ) + ) + ufunctor_ctor_exprs_str = ", ".join( + a.expr for a in translate(ctx, ufunctor_sig.arguments().ctor) + ) + + # NB: ufunctor must be allocated before iter.remove_operand is called, + # as it relies on iter + body += f"""\ +else if (iter.is_cpu_scalar({scalar_idx})) {{ + {ufunctor_sig.name} ufunctor({ufunctor_ctor_exprs_str}); + iter.remove_operand({scalar_idx}); + gpu_kernel(iter, ufunctor); +}}""" + + ufunctor_sig = inner_loops[UfuncKey.CUDAFunctor] + ufunctor_ctor_exprs_str = ", ".join( + a.expr for a in translate(parent_ctx, ufunctor_sig.arguments().ctor) + ) + body += f""" +else {{ + gpu_kernel(iter, {ufunctor_sig.name}({ufunctor_ctor_exprs_str})); +}} + """ + return body + + +@with_native_function +def compute_ufunc_cuda(g: NativeFunctionsGroup) -> str: + # First, build the functors, indexing them by dtype + ufunctor_sigs, ufunctors = compute_ufunc_cuda_functors(g) + + # Next, build the conditionals + sig = StructuredImplSignature(g, ufunc.kernel_name(g, DispatchKey.CUDA)) + dtype_cases = [] + for dtype, inner_ufunc_sigs in ufunctor_sigs.items(): + dtype_cases.append( + f""" +AT_DISPATCH_CASE(at::ScalarType::{dtype}, + [&]() {{ + {compute_ufunc_cuda_dtype_body(g, dtype, inner_ufunc_sigs, sig.arguments())} + }} +) +""" + ) + + dtype_cases_str = "\n".join(dtype_cases) + + stub_sig = StubSignature(g) + + return f""" +{ufunctors} + +{stub_sig.type_defn()}; +{stub_sig.dispatch_decl()} + +{stub_sig.kernel_defn()} {{ + AT_DISPATCH_SWITCH(iter.common_dtype(), "{sig.name}", + {dtype_cases_str} + ); +}} +REGISTER_DISPATCH({stub_sig.name}, &{stub_sig.kernel_name}) + +{sig.defn()} {{ + {stub_sig.direct_call(sig.arguments())}; +}} +""" + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# CPU STUFF +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +@dataclass(frozen=True) +class StubSignature: + g: NativeFunctionsGroup + + @property + def name(self) -> str: + return f"{str(self.g.functional.func.name.name)}_stub" + + @property + def kernel_name(self) -> str: + return f"{str(self.g.functional.func.name.name)}_kernel" + + @property + def type_name(self) -> str: + return f"{str(self.g.functional.func.name.name)}_fn" + + def arguments(self) -> list[Binding]: + return ufunc.stub_arguments(self.g) + + def type(self) -> str: + cpp_args = self.arguments() + return f"void(*)(TensorIteratorBase&, {', '.join(a.type for a in cpp_args)})" + + def dispatch_decl(self) -> str: + return f"DECLARE_DISPATCH({self.type_name}, {self.name})" + + def dispatch_defn(self) -> str: + return f"DEFINE_DISPATCH({self.name})" + + def kernel_defn(self) -> str: + return f"void {self.kernel_name}(TensorIteratorBase& iter, {', '.join(a.defn() for a in self.arguments())})" + + def type_defn(self) -> str: + return f"using {self.type_name} = {self.type()}" + + # must be called from context where this is TensorIteratorBase* + def call(self, ctx: Sequence[Binding]) -> str: + return f"{self.name}(device_type(), *this, {', '.join(a.expr for a in translate(ctx, self.arguments()))})" + + # used in CUDA to skip the unnecessary dynamic dispatch + def direct_call(self, ctx: Sequence[Binding]) -> str: + return f"{self.kernel_name}(*this, {', '.join(a.expr for a in translate(ctx, self.arguments()))})" + + +@with_native_function +def compute_ufunc_cpu(g: NativeFunctionsGroup) -> str: + stub_sig = StubSignature(g) + sig = StructuredImplSignature(g, ufunc.kernel_name(g, DispatchKey.CPU)) + + return f""" +{stub_sig.type_defn()}; +{stub_sig.dispatch_decl()} +{stub_sig.dispatch_defn()}; + +{sig.defn()} {{ + {stub_sig.call(sig.arguments())}; +}} +""" + + +def compute_ufunc_cpu_dtype_body( + g: NativeFunctionsGroup, + dtype: ScalarType, + inner_loops: dict[UfuncKey, UfuncSignature], + parent_ctx: Sequence[Binding], +) -> str: + assert UfuncKey.CPUScalar in inner_loops, f"{dtype}, {inner_loops.keys()}" + assert inner_loops.keys() <= {UfuncKey.CPUScalar, UfuncKey.CPUVector} + scalar_loop = inner_loops[UfuncKey.CPUScalar] + vec_loop = None + if UfuncKey.CPUVector in inner_loops: + vec_loop = inner_loops[UfuncKey.CPUVector] + + # NB: We DON'T use translate here, because translate is + # incapable of CSE'ing the scalar accesses in case it is also + # used by Vectorized; also, the unpacking here is very simple + # and only affects Scalar; everything else is implicitly captured + # by the lambda + + # Setup scalar in scope + body = [] + ctx = [] + for b in parent_ctx: + if isinstance(b.argument, Argument) and b.argument.type != BaseType( + BaseTy.Scalar + ): + continue + body.append(f"auto _s_{b.name} = {b.name}.to();") + ctx.append(Expr(f"_s_{b.name}", NamedCType(b.nctype.name, BaseCType(scalar_t)))) + if vec_loop is not None: + for b in parent_ctx: + if isinstance(b.argument, Argument) and b.argument.type != BaseType( + BaseTy.Scalar + ): + continue + body.append( + f"auto _v_{b.name} = at::vec::Vectorized(_s_{b.name});" + ) + ctx.append( + Expr( + f"_v_{b.name}", + NamedCType(b.nctype.name, VectorizedCType(BaseCType(scalar_t))), + ) + ) + + # Setup lambda signature + # NB: simplified version of ufunctor_arguments + scalar_bindings = [] + vec_bindings = [] + for a in g.functional.func.arguments.flat_non_out: + if not a.type.is_tensor_like(): + continue + assert a.type == BaseType(BaseTy.Tensor) + scalar_bindings.append( + Binding( + name=a.name, + nctype=NamedCType(a.name, BaseCType(scalar_t)), + argument=a, + ) + ) + if vec_loop is not None: + vec_bindings.append( + Binding( + name=a.name, + nctype=NamedCType(a.name, VectorizedCType(BaseCType(scalar_t))), + argument=a, + ) + ) + + def with_ctx(b: Sequence[Binding]) -> list[Expr | Binding]: + r: list[Expr | Binding] = [] + r.extend(ctx) + r.extend(b) + return r + + body_str = "\n".join(body) + if vec_loop is not None: + return f""" +{body_str} +cpu_kernel_vec(iter, + [=]({', '.join(b.decl() for b in scalar_bindings)}) {{ return {scalar_loop.call(with_ctx(scalar_bindings))}; }}, + [=]({', '.join(b.decl() for b in vec_bindings)}) {{ return {vec_loop.call(with_ctx(vec_bindings))}; }} +); +""" + else: + return f""" +{body_str} +cpu_kernel(iter, + [=]({', '.join(b.decl() for b in scalar_bindings)}) {{ return {scalar_loop.call(with_ctx(scalar_bindings))}; }} +); +""" + + +@with_native_function +def compute_ufunc_cpu_kernel(g: NativeFunctionsGroup) -> str: + stub_sig = StubSignature(g) + + # Reindex the ufunc by dtypes; processing generic/scalaronly as well + loops = g.out.ufunc_inner_loop + ufunc_sigs: dict[ScalarType, dict[UfuncKey, UfuncSignature]] = {} + for k in [UfuncKey.CPUScalar, UfuncKey.CPUVector]: + lks = [] + # ORDER MATTERS: this specifies overriding precedence + if k in loops: # should happen rarely + lks.append(k) + if UfuncKey.ScalarOnly in loops and k is UfuncKey.CPUScalar: + lks.append(UfuncKey.ScalarOnly) + if UfuncKey.Generic in loops: + lks.append(UfuncKey.Generic) + # TODO: don't hardcode ufunc:: namespace here, should be centralized smh + for lk in lks: + for dtype in loops[lk].supported_dtypes: + compute_t: CType + if k is UfuncKey.CPUScalar: + compute_t = BaseCType(scalar_t) + elif k is UfuncKey.CPUVector: + compute_t = VectorizedCType(BaseCType(scalar_t)) + else: + raise AssertionError + inner_ufunc_sigs = ufunc_sigs.setdefault(dtype, {}) + if k not in inner_ufunc_sigs: + inner_ufunc_sigs[k] = UfuncSignature( + g, name=f"ufunc::{loops[lk].name}", compute_t=compute_t + ) + + # Build the conditionals + dtype_cases = [] + for dtype, inner_ufunc_sigs in ufunc_sigs.items(): + dtype_cases.append( + f""" +AT_DISPATCH_CASE(at::ScalarType::{dtype}, + [&]() {{ + {compute_ufunc_cpu_dtype_body(g, dtype, inner_ufunc_sigs, stub_sig.arguments())} + }} +) +""" + ) + + dtype_cases_str = "\n".join(dtype_cases) + return f""" +namespace {{ + +{stub_sig.kernel_defn()} {{ + AT_DISPATCH_SWITCH(iter.common_dtype(), "{stub_sig.name}", + {dtype_cases_str} + ); +}} + +}} // anonymous namespace + +{stub_sig.type_defn()}; +{stub_sig.dispatch_decl()} +REGISTER_DISPATCH({stub_sig.name}, &{stub_sig.kernel_name}) +""" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..35554d529c7e917eb866b1b6f4cd05e99b6b037b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/model.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/model.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96c0bda79941ac102e55f479e8cebc711b425eb8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/model.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/parse.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/parse.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b96cda3451036b4de564323c2ad94d86e1ad779 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/__pycache__/parse.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a760a8f29516cc6d51b22932fa424da3f1f3369 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/custom_ops.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/custom_ops.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30b5d04e37ef5f8721c8e60113af2eb2bc0f88ca Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/custom_ops.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/et_cpp.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/et_cpp.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..70b9e734d25986323291738c8e475fb29f583360 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/et_cpp.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/unboxing.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/unboxing.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..36a99158663223be4e3cd82fa719a7f47133a462 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/__pycache__/unboxing.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/custom_ops.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/custom_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..3871b2f5c9f193d581d46a9778bd3d3c20df3f07 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/custom_ops.py @@ -0,0 +1,151 @@ +from __future__ import annotations + +from collections import defaultdict +from dataclasses import dataclass +from typing import TYPE_CHECKING + +from torchgen import dest + + +# disable import sorting to avoid circular dependency. +from torchgen.api.types import DispatcherSignature # usort: skip +from torchgen.context import method_with_native_function +from torchgen.model import BaseTy, BaseType, DispatchKey, NativeFunction, Variant +from torchgen.utils import concatMap, Target + + +if TYPE_CHECKING: + from collections.abc import Sequence + + from torchgen.executorch.model import ETKernelIndex + from torchgen.selective_build.selector import SelectiveBuilder + + +# Generates RegisterKernelStub.cpp, which provides placeholder kernels for custom operators. This will be used at +# model authoring side. +@dataclass(frozen=True) +class ComputeNativeFunctionStub: + @method_with_native_function + def __call__(self, f: NativeFunction) -> str | None: + if Variant.function not in f.variants: + return None + + sig = DispatcherSignature.from_schema( + f.func, prefix=f"wrapper_CPU_{f.func.name.overload_name}_", symint=False + ) + assert sig is not None + if len(f.func.returns) == 0: + ret_name = "" + elif len(f.func.returns) == 1: + if f.func.arguments.out: + ret_name = f.func.arguments.out[0].name + else: + ret_name = next( + ( + a.name + for a in f.func.arguments.flat_non_out + if a.type == f.func.returns[0].type + ), + "", + ) + if not ret_name: + # if return type is tensor + if f.func.returns[0].type == BaseType(BaseTy.Tensor): + # Returns an empty tensor + ret_name = "at::Tensor()" + else: + raise Exception( # noqa: TRY002 + f"Can't handle this return type {f.func}" + ) # noqa: TRY002 + elif len(f.func.arguments.out) == len(f.func.returns): + # Returns a tuple of out arguments + tensor_type = "at::Tensor &" + comma = ", " + ret_name = f"""::std::tuple<{comma.join([tensor_type] * len(f.func.returns))}>( + {comma.join([r.name for r in f.func.arguments.out])} + )""" + else: + assert all( + a.type == BaseType(BaseTy.Tensor) for a in f.func.returns + ), f"Only support tensor returns but got {f.func.returns}" + # Returns a tuple of empty tensors + tensor_type = "at::Tensor" + comma = ", " + ret_name = f"""::std::tuple<{comma.join([tensor_type] * len(f.func.returns))}>( + {comma.join(["at::Tensor()" for _ in f.func.returns])} + )""" + ret_str = f"return {ret_name};" if len(f.func.returns) > 0 else "" + return f""" +{sig.defn()} {{ + {ret_str} +}} + """ + + +def gen_custom_ops_registration( + *, + native_functions: Sequence[NativeFunction], + selector: SelectiveBuilder, + kernel_index: ETKernelIndex, + rocm: bool, +) -> tuple[str, str]: + """ + Generate custom ops registration code for dest.RegisterDispatchKey. + + :param native_functions: a sequence of `NativeFunction` + :param selector: for selective build. + :param kernel_index: kernels for all the ops. + :param rocm: bool for dest.RegisterDispatchKey. + :return: generated C++ code to register custom operators into PyTorch + """ + + # convert kernel index to BackendIndex. This is because we can't handle ETKernelIndex yet. + # TODO larryliu: evaluate if this code is still needed. If yes let it handle ETKernelIndex. + + dispatch_key = DispatchKey.CPU + backend_index = kernel_index._to_backend_index() + static_init_dispatch_registrations = "" + ns_grouped_native_functions: dict[str, list[NativeFunction]] = defaultdict(list) + for native_function in native_functions: + ns_grouped_native_functions[native_function.namespace].append(native_function) + + for namespace, functions in ns_grouped_native_functions.items(): + if len(functions) == 0: + continue + dispatch_registrations_body = "\n".join( + list( + concatMap( + dest.RegisterDispatchKey( + backend_index, + Target.REGISTRATION, + selector, + rocm=rocm, + symint=False, + class_method_name=None, + skip_dispatcher_op_registration=False, + ), + functions, + ) + ) + ) + static_init_dispatch_registrations += f""" +TORCH_LIBRARY_IMPL({namespace}, {dispatch_key}, m) {{ +{dispatch_registrations_body} +}}""" + anonymous_definition = "\n".join( + list( + concatMap( + dest.RegisterDispatchKey( + backend_index, + Target.ANONYMOUS_DEFINITION, + selector, + rocm=rocm, + symint=False, + class_method_name=None, + skip_dispatcher_op_registration=False, + ), + native_functions, + ) + ) + ) + return anonymous_definition, static_init_dispatch_registrations diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/et_cpp.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/et_cpp.py new file mode 100644 index 0000000000000000000000000000000000000000..c4b8fe5e4539b80e550641d695831060f1959bde --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/et_cpp.py @@ -0,0 +1,372 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from torchgen import local +from torchgen.api.types import ( + ArgName, + BaseCType, + Binding, + ConstRefCType, + CType, + MutRefCType, + NamedCType, + SpecialArgName, + TupleCType, + VectorCType, + voidT, +) +from torchgen.executorch.api.types import ( + ArrayRefCType, + BaseTypeToCppMapping, + OptionalCType, + scalarT, + tensorListT, + tensorT, +) +from torchgen.model import ( + Argument, + Arguments, + BaseTy, + BaseType, + ListType, + NativeFunction, + OptionalType, + Return, + SelfArgument, + TensorOptionsArguments, + Type, +) +from torchgen.utils import assert_never + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +""" +This file describes the translation of JIT schema to the public C++ API, which is what people use when they call +functions like at::add. It also serves as a native function API, which is the signature of kernels, +since in Executorch CppSignature is the same as NativeSignature. + +Difference between this file and torchgen.api.cpp.py: + + - Executorch doesn't support TensorOptions, however in this file we still keep the logic here to be compatible with + torchgen.api.cpp, so that we can do stuff like ATen mode (running ATen kernels in Executorch). + + - Executorch doesn't support Dimname. + + - Executorch runtime doesn't support SymInt, will treat it as int. +""" + + +# Translation of "value types" in JIT schema to C++ API type. Value +# types look the same no matter if they are argument types or return +# types. Returns None if the type in question is not a value type. +def valuetype_type( + t: Type, + *, + binds: ArgName, + remove_non_owning_ref_types: bool = False, +) -> NamedCType | None: + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor or t.name == BaseTy.Scalar: + return None + # For SymInt we simply treat it as int. + elif str(t) == "SymInt": + return NamedCType(binds, BaseCType(BaseTypeToCppMapping[BaseTy.int])) + if remove_non_owning_ref_types: + if t.name == BaseTy.str: + raise AssertionError( + "string ref->value conversion: not implemented yet" + ) + # All other BaseType currently map directly to BaseCppTypes. + return NamedCType(binds, BaseCType(BaseTypeToCppMapping[t.name])) + elif isinstance(t, OptionalType): + elem = valuetype_type(t.elem, binds=binds) + if elem is None: + return None + return NamedCType(binds, OptionalCType(elem.type)) + elif isinstance(t, ListType): + if str(t.elem) == "bool": + assert t.size is not None + return NamedCType( + binds, ArrayRefCType(BaseCType(BaseTypeToCppMapping[BaseTy.bool])) + ) + else: + return None + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +# Translation of types occurring in JIT arguments to a C++ argument type. +# If remove_non_owning_ref_types is set, we'll guarantee that the outputed CType is not a non-owning reference type. +# For example, we'll return std::vector instead of IntArrayRef. +# See Note [translation from C++ reference to value types] +def argumenttype_type( + t: Type, + *, + mutable: bool, + binds: ArgName, + remove_non_owning_ref_types: bool = False, +) -> NamedCType: + # If it's a value type, do the value type translation + r = valuetype_type( + t, + binds=binds, + remove_non_owning_ref_types=remove_non_owning_ref_types, + ) + if r is not None: + return r + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor: + if mutable and not local.use_const_ref_for_mutable_tensors(): + return NamedCType(binds, MutRefCType(BaseCType(tensorT))) + else: + return NamedCType(binds, ConstRefCType(BaseCType(tensorT))) + elif t.name == BaseTy.Scalar: + return NamedCType(binds, ConstRefCType(BaseCType(scalarT))) + else: + raise AssertionError(f"base type should have been value type {t}") + elif isinstance(t, OptionalType): + if str(t.elem) == "Tensor": + if mutable and not local.use_const_ref_for_mutable_tensors(): + return NamedCType( + binds, MutRefCType(BaseCType(tensorT)) + ) # TODO: fix this discrepancy + else: + return NamedCType( + binds, ConstRefCType(OptionalCType(BaseCType(tensorT))) + ) + elif str(t.elem) == "Scalar": + return NamedCType(binds, ConstRefCType(OptionalCType(BaseCType(scalarT)))) + elem = argumenttype_type(t.elem, mutable=mutable, binds=binds) + return NamedCType(binds, OptionalCType(elem.type)) + elif isinstance(t, ListType): + # TODO: keeping these special cases for Tensor[] and Tensor?[] so that we can hookup with ATen kernels. + if str(t.elem) == "Tensor": + return NamedCType(binds, BaseCType(tensorListT)) + elif str(t.elem) == "Dimname": + raise NotImplementedError("Executorch doesn't support Dimname") + elif str(t.elem) == "Tensor?": + return NamedCType(binds, ArrayRefCType(OptionalCType(BaseCType(tensorT)))) + elem = argumenttype_type(t.elem, mutable=mutable, binds=binds) + return NamedCType(binds, ArrayRefCType(elem.type)) + else: + raise AssertionError(f"unrecognized type {repr(t)}") + + +# Translate a JIT argument into its C++ type +def argument_type(a: Argument, *, binds: ArgName) -> NamedCType: + return argumenttype_type(a.type, mutable=a.is_write, binds=binds) + + +# Translation of a (non-multi) return type from JIT to C++ +# N.B: returntype_type returns a CType, not a NamedCType. +# This is mostly because of the mismatch between return types and return names. +# e.g. a function with a return type of 'void' has 0 return names, +# and a function with a return type of 'std::tuple' has >1 return name. +def returntype_type(t: Type, *, mutable: bool) -> CType: + # placeholder is ignored + r = valuetype_type(t, binds="__placeholder__") + if r is not None: + return r.type + + if isinstance(t, BaseType): + if t.name == BaseTy.Tensor: + if mutable: + if local.use_const_ref_for_mutable_tensors(): + return ConstRefCType(BaseCType(tensorT)) + else: + return MutRefCType(BaseCType(tensorT)) + else: + # Note [Tensor Copy Returns] + # Currently, we use "Argument.is_write" to determine + # whether or not Tensor return types should be copies or references. + # If that ever changes, take a look at other locations of this note! + return BaseCType(tensorT) + elif t.name == BaseTy.Scalar: + return BaseCType(scalarT) + elif isinstance(t, ListType): + assert not mutable, "Native functions should never return a mutable tensor list. They should return void." + elem = returntype_type(t.elem, mutable=False) + assert t.size is None, f"fixed size list returns not supported: {t}" + return VectorCType(elem) + + raise AssertionError(f"unrecognized return type {t}") + + +# Translation of a single return to its C++ type +def return_type(r: Return) -> CType: + return returntype_type(r.type, mutable=r.is_write) + + +# Translation of a full (possibly multi) return from JIT to its C++ type +def returns_type(rs: Sequence[Return]) -> CType: + if len(rs) == 0: + return BaseCType(voidT) + elif len(rs) == 1: + return return_type(rs[0]) + else: + return TupleCType([return_type(r) for r in rs]) + + +def return_names(f: NativeFunction, *, fallback_name: str = "result") -> Sequence[str]: + returns: list[str] = [] + for i, r in enumerate(f.func.returns): + # If we have an inplace function, the return argument is + # implicitly named self. + # TODO: Consider incorporating this into the data model + if f.func.name.name.inplace: + assert i == 0, "illegal inplace function with multiple returns" + name = "self" + # If we are out function, the name is the name of the + # corresponding output function (r.name will get recorded + # in field_name later.) + elif f.func.is_out_fn(): + name = f.func.arguments.out[i].name + # If the return argument is explicitly named... + elif r.name: + name_conflict = any( + r.name == a.name for a in f.func.schema_order_arguments() + ) + if name_conflict and not f.func.is_out_fn(): + name = f"{r.name}_return" + else: + name = r.name + # If there is no explicit name and no fallback name was passed in, we just name the output result, + # unless it's a multi-return, in which case it's result0, + # result1, etc (zero-indexed) + else: + name = fallback_name if len(f.func.returns) == 1 else f"{fallback_name}{i}" + returns.append(name) + return returns + + +JIT_TO_CPP_DEFAULT = { + "False": "false", + "True": "true", + "None": "torch::execustd::nullopt", # UGH this one is type directed + "[]": "{}", + "contiguous_format": "torch::executorch::MemoryFormat::Contiguous", + "long": "torch::executorch::kLong", +} + + +# Convert a JIT default into C++ expression representing the default +def default_expr(d: str, t: Type) -> str: + if d == "None" and str(t) == "Tensor?": + return "{}" + if isinstance(t, BaseType) and t.name is BaseTy.str: + # Schema allows single quotes but C++ needs double + if len(d) >= 2 and d[0] == "'" and d[-1] == "'": + s = "" + i = 1 + while i + 1 < len(d): + if d[i] != "\\": + if d[i] == '"': + s += '\\"' + else: + s += d[i] + i += 1 + else: + if d[i + 1] == "'": + s += "'" + else: + s += d[i : i + 2] + i += 2 + + return f'"{s}"' + + if isinstance(t, OptionalType): + if d == "None": + return "torch::executor::nullopt" + + return default_expr(d, t.elem) + + if isinstance(t, ListType): + if d.startswith("[") and d.endswith("]"): + return "{" + d[1:-1] + "}" + elif t.size is None: + # NOTE: Sized lists can have scalar defaults + raise ValueError(f"Expected a list default '[...]' but found: '{d}'") + + return JIT_TO_CPP_DEFAULT.get(d, d) + + +# Convert an argument into its C++ API form + + +def argument( + a: Argument | TensorOptionsArguments | SelfArgument, + *, + cpp_no_default_args: set[str], + method: bool, + faithful: bool, + has_tensor_options: bool, +) -> list[Binding]: + def sub_argument( + a: Argument | TensorOptionsArguments | SelfArgument, + ) -> list[Binding]: + return argument( + a, + cpp_no_default_args=cpp_no_default_args, + method=method, + faithful=faithful, + has_tensor_options=has_tensor_options, + ) + + if isinstance(a, Argument): + binds: ArgName + if a.name == "memory_format" and has_tensor_options: + binds = SpecialArgName.possibly_redundant_memory_format + else: + binds = a.name + default: str | None = None + if a.name not in cpp_no_default_args and a.default is not None: + default = default_expr(a.default, a.type) + return [ + Binding( + nctype=argument_type(a, binds=binds), + name=a.name, + default=default, + argument=a, + ) + ] + elif isinstance(a, TensorOptionsArguments): + raise NotImplementedError("Need to implement type resolution for TensorOptions") + elif isinstance(a, SelfArgument): + if method: + # Caller is responsible for installing implicit this in context! + return [] + else: + return sub_argument(a.argument) + else: + assert_never(a) + + +def arguments( + arguments: Arguments, + *, + faithful: bool, + method: bool, + cpp_no_default_args: set[str], +) -> list[Binding]: + args: list[Argument | TensorOptionsArguments | SelfArgument] = [] + if faithful: + args.extend(arguments.non_out) + args.extend(arguments.out) + else: + args.extend(arguments.out) + args.extend(arguments.non_out) + return [ + r.no_default() if faithful else r + for a in args + for r in argument( + a, + faithful=faithful, + method=method, + has_tensor_options=arguments.tensor_options is not None, + cpp_no_default_args=cpp_no_default_args, + ) + ] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..056b3b4416e32dbf1b8b0e0e785f5a3c3557cac3 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__init__.py @@ -0,0 +1,4 @@ +from torchgen.executorch.api.types.types import * + + +from torchgen.executorch.api.types.signatures import * # usort: skip diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9056a575489113107b207f5ca56977a3d5d68814 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/signatures.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/signatures.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..34c93d5077ec40ad4b4f2a8aee70e5084993a6a4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/signatures.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/types.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/types.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f3a029365235f44be5f3b522a58077703ac3df56 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/__pycache__/types.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/signatures.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/signatures.py new file mode 100644 index 0000000000000000000000000000000000000000..7f8f90c0d5ef30fb828842b45f9412df169b4db7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/signatures.py @@ -0,0 +1,76 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import TYPE_CHECKING + +import torchgen.api.cpp as aten_cpp +from torchgen.executorch.api.types.types import contextArg + + +if TYPE_CHECKING: + from torchgen.api.types import Binding, CType + from torchgen.model import FunctionSchema, NativeFunction + + +@dataclass(frozen=True) +class ExecutorchCppSignature: + """ + This signature is merely a CppSignature with Executorch types (optionally + contains KernelRuntimeContext as well). The inline definition of + CppSignature is generated in Functions.h and it's used by unboxing + functions. + """ + + # The schema this signature is derived from + func: FunctionSchema + + # The set of C++ arguments which should not have defaults applied to them + cpp_no_default_args: set[str] + + # Allows you to prepend an arbitrary prefix to the signature name. + # This is useful for parts of the codegen that generate wrappers around kernels, + # and need to avoid naming collisions. + prefix: str = "" + + def arguments(self, *, include_context: bool = True) -> list[Binding]: + return ([contextArg] if include_context else []) + et_cpp.arguments( + self.func.arguments, + faithful=True, # always faithful, out argument at the end + method=False, # method not supported + cpp_no_default_args=self.cpp_no_default_args, + ) + + def name(self) -> str: + return self.prefix + aten_cpp.name( + self.func, + faithful_name_for_out_overloads=True, + ) + + def decl(self, name: str | None = None, *, include_context: bool = True) -> str: + args_str = ", ".join( + a.decl() for a in self.arguments(include_context=include_context) + ) + if name is None: + name = self.name() + return f"{self.returns_type().cpp_type()} {name}({args_str})" + + def defn(self, name: str | None = None) -> str: + args = [a.defn() for a in self.arguments()] + args_str = ", ".join(args) + if name is None: + name = self.name() + return f"{self.returns_type().cpp_type()} {name}({args_str})" + + def returns_type(self) -> CType: + return et_cpp.returns_type(self.func.returns) + + @staticmethod + def from_native_function( + f: NativeFunction, *, prefix: str = "" + ) -> ExecutorchCppSignature: + return ExecutorchCppSignature( + func=f.func, prefix=prefix, cpp_no_default_args=f.cpp_no_default_args + ) + + +from torchgen.executorch.api import et_cpp diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/types.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/types.py new file mode 100644 index 0000000000000000000000000000000000000000..5852e25ad70074fb9f8a74154d2ff8f99437cdfb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/types/types.py @@ -0,0 +1,83 @@ +from __future__ import annotations + +from dataclasses import dataclass + +from torchgen.api.types import ( + BaseCppType, + BaseCType, + Binding, + boolT, + CType, + doubleT, + Expr, + longT, + MutRefCType, + NamedCType, +) +from torchgen.model import BaseTy + + +halfT = BaseCppType("torch::executor", "Half") +bfloat16T = BaseCppType("torch::executor", "BFloat16") +stringT = BaseCppType("torch::executor", "string_view") +scalarTypeT = BaseCppType("torch::executor", "ScalarType") +tensorT = BaseCppType("torch::executor", "Tensor") +tensorListT = BaseCppType("torch::executor", "TensorList") +scalarT = BaseCppType("torch::executor", "Scalar") +memoryFormatT = BaseCppType("torch::executor", "MemoryFormat") +intArrayRefT = BaseCppType("torch::executor", "IntArrayRef") +optionalT = BaseCppType("torch::executor", "optional") +contextT = BaseCppType("torch::executor", "KernelRuntimeContext") + +contextExpr = Expr( + expr="context", + type=NamedCType(name="context", type=MutRefCType(BaseCType(contextT))), +) + +contextArg = Binding( + name="context", + nctype=contextExpr.type, + argument=None, # type: ignore[arg-type] + default=None, +) + +BaseTypeToCppMapping: dict[BaseTy, BaseCppType] = { + BaseTy.int: longT, + BaseTy.float: doubleT, + BaseTy.bool: boolT, + BaseTy.str: stringT, + BaseTy.ScalarType: scalarTypeT, + BaseTy.Tensor: tensorT, + BaseTy.Scalar: scalarT, + BaseTy.MemoryFormat: memoryFormatT, +} + + +@dataclass(frozen=True) +class OptionalCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f"torch::executor::optional<{self.elem.cpp_type()}>" + + def cpp_type_registration_declarations(self) -> str: + return f"torch::executor::optional<{self.elem.cpp_type_registration_declarations()}>" + + def remove_const_ref(self) -> CType: + return OptionalCType(self.elem.remove_const_ref()) + + +@dataclass(frozen=True) +class ArrayRefCType(CType): + elem: CType + + def cpp_type(self, *, strip_ref: bool = False) -> str: + # Do not pass `strip_ref` recursively. + return f"torch::executor::ArrayRef<{self.elem.cpp_type()}>" + + def cpp_type_registration_declarations(self) -> str: + return f"torch::executor::ArrayRef<{self.elem.cpp_type_registration_declarations()}>" + + def remove_const_ref(self) -> CType: + return ArrayRefCType(self.elem.remove_const_ref()) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/unboxing.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/unboxing.py new file mode 100644 index 0000000000000000000000000000000000000000..c905bb3a4350626175b2d018f7c4d3cdb6f2300f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/api/unboxing.py @@ -0,0 +1,218 @@ +from __future__ import annotations + +from dataclasses import dataclass +from typing import Callable, TYPE_CHECKING + +from torchgen.model import ( + Argument, + BaseTy, + BaseType, + ListType, + NativeFunction, + OptionalType, + Type, +) + + +if TYPE_CHECKING: + from collections.abc import Sequence + + from torchgen.api.types import Binding, CType, NamedCType + + +connector = "\n\t" + + +# Return unboxing function name for a NativeFunction +def name(f: NativeFunction) -> str: + return f.func.name.unambiguous_name() + + +@dataclass(frozen=True) +class Unboxing: + """ + Takes a sequence of Bindings and unbox EValues to these Bindings. Return generated code that performs correct unboxing. + A sample generated code: + // aten::mul.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + void mul_out(EValue** stack) { + EValue& self = *stack[0]; + EValue& other = *stack[1]; + EValue& out = *stack[2]; + const torch::executor::Tensor & self_base = self.to(); + const torch::executor::Tensor & other_base = other.to(); + torch::executor::Tensor & out_base = out.to(); + + EXECUTORCH_SCOPE_PROF("native_call_mul.out"); + torch::executor::mul_outf(self_base, other_base, out_base); + + + } + """ + + # this is a callable that converts a JIT argument, into its C++ type. + # Translates (type, mutability, binds) to NamedCType. E.g., torchgen.api.cpp.argumenttype_type. + argument_type_gen: Callable[ + ..., + NamedCType, + ] + + # Convert all the arguments in a NativeFunction to C++ code + def convert_arguments( + self, args: Sequence[Binding] + ) -> tuple[list[Binding], list[str]]: + code_list = [f"EValue& {args[i].name} = *stack[{i}];" for i in range(len(args))] + binding_list = [] + for arg in args: + # expecting only Argument + if not isinstance(arg.argument, Argument): + raise Exception( # noqa: TRY002 + f"Unexpected argument type, expecting `Argument` but got {arg}" + ) + argument: Argument = arg.argument + unboxed_name, _, code, decl = self.argumenttype_evalue_convert( + argument.type, argument.name, mutable=argument.is_write + ) + code_list.extend(decl) + code_list.extend(code) + binding_list.append(arg.with_name(unboxed_name)) + return binding_list, code_list + + def argumenttype_evalue_convert( + self, t: Type, arg_name: str, *, mutable: bool = False + ) -> tuple[str, CType, list[str], list[str]]: + """ + Takes in the type, name and mutability corresponding to an argument, and generates a tuple of: + (1) the C++ code necessary to unbox the argument + (2) A Binding corresponding to the newly created unboxed variable, including variable name and its CType + :param t: a `Type` of an argument + :param arg_name: argument name + :param mutable: boolean for whether this argument type is mutable + :return: unboxed result + """ + ctype = self.argument_type_gen(t, mutable=mutable, binds=arg_name).type + + if isinstance(t, BaseType): + out_name = f"{arg_name}_base" + code, decl = self._gen_code_base_type( + arg_name=arg_name, out_name=out_name, ctype=ctype + ) + elif isinstance(t, OptionalType): + out_name = f"{arg_name}_opt_out" + code, decl = self._gen_code_optional_type( + arg_name=arg_name, out_name=out_name, t=t, ctype=ctype + ) + elif isinstance(t, ListType): + out_name = f"{arg_name}_list_out" + code, decl = self._gen_code_list_type( + arg_name=arg_name, out_name=out_name, t=t, ctype=ctype + ) + else: + raise Exception( # noqa: TRY002 + f"Cannot handle type {t}. arg_name: {arg_name}" + ) # noqa: TRY002 + return out_name, ctype, code, decl + + def _gen_code_base_type( + self, arg_name: str, out_name: str, ctype: CType + ) -> tuple[list[str], list[str]]: + return [ + f"{ctype.cpp_type()} {out_name} = {arg_name}.to<{ctype.cpp_type(strip_ref=True)}>();" + ], [] + + def _gen_code_optional_type( + self, arg_name: str, out_name: str, t: OptionalType, ctype: CType + ) -> tuple[list[str], list[str]]: + in_name = f"{arg_name}_opt_in" + res_name, base_type, res_code, decl = self.argumenttype_evalue_convert( + t.elem, in_name + ) + return ( + f""" + auto {out_name} = {arg_name}.toOptional<{base_type.cpp_type(strip_ref=True)}>(); + """.split("\n"), + decl, + ) + + def _gen_code_list_type( + self, arg_name: str, out_name: str, t: ListType, ctype: CType + ) -> tuple[list[str], list[str]]: + in_name = f"{arg_name}_list_in" + elem_name = f"{arg_name}_elem" + code = [] + res_name, res_ctype, res_code, decl = self.argumenttype_evalue_convert( + t.elem, elem_name + ) + + if isinstance(t.elem, BaseType) and t.elem.name == BaseTy.Tensor: + code.extend( + f""" + auto {out_name} = {arg_name}.toTensorList(); + """.split("\n") + ) + elif isinstance(t.elem, BaseType) and ( + t.elem.name == BaseTy.int or t.elem.name == BaseTy.SymInt + ): + code.extend( + f""" + auto {out_name} = {arg_name}.toIntList(); + """.split("\n") + ) + elif isinstance(t.elem, BaseType) and t.elem.name == BaseTy.float: + code.extend( + f""" + auto {out_name} = {arg_name}.toDoubleList(); + """.split("\n") + ) + elif isinstance(t.elem, BaseType) and t.elem.name == BaseTy.bool: + # handle list type with size, e.g., bool[4] + code.extend( + f""" +#ifdef USE_ATEN_LIB +std::array {out_name}; +auto {in_name} = {arg_name}.toBoolList(); +size_t _i = 0; +for (auto {elem_name}: {in_name}) {{ + {out_name}[_i++] = {elem_name}; +}} +#else +auto {out_name} = {arg_name}.toBoolList(); +#endif + """.split("\n") + ) + # pytorch codegen: + # we have to use c10::List for optional element. e.g., Tensor?[] -> c10::List<::std::optional> + elif ( + isinstance(t.elem, OptionalType) + and isinstance(t.elem.elem, BaseType) + and t.elem.elem.name == BaseTy.Tensor + ): + code.extend( + f""" +#ifdef USE_ATEN_LIB +auto {in_name} = {arg_name}.toListOptionalTensor(); +c10::List<::std::optional> {out_name}; +for (auto {elem_name}: {in_name}) {{ + {out_name}.push_back({elem_name}); +}} +#else +auto {out_name} = {arg_name}.toListOptionalTensor(); +#endif + """.split("\n") + ) + else: + # use ArrayRef as default. + vec_name = arg_name + "_vec" + # need to bring vector instantiation out of scope so that ArrayRef has valid data + decl.append( + f"std::vector<{res_ctype.cpp_type(strip_ref=True)}> {vec_name};" + ) + code.extend( + f""" + for (EValue {elem_name}: {in_name}) {{ + {connector.join(res_code)} + {vec_name}.push_back({res_name}); + }} + {ctype.cpp_type(strip_ref=True)} {out_name}({vec_name}); + """.split("\n") + ) + return code, decl diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/model.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/model.py new file mode 100644 index 0000000000000000000000000000000000000000..450782186765ab2bb3f6b481cfb227ebe71255ff --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/model.py @@ -0,0 +1,220 @@ +# Represents all kernels used by an Executorch model. +# It maintains a dict[OperatorName, dict[ETKernelKey, BackendMetadata]] structure. + +from __future__ import annotations + +import itertools +from collections import defaultdict, namedtuple +from dataclasses import dataclass +from enum import IntEnum + +from torchgen.model import ( + BackendIndex, + BackendMetadata, + DispatchKey, + NativeFunction, + NativeFunctionsGroup, + OperatorName, +) +from torchgen.utils import assert_never + + +KERNEL_KEY_VERSION = 1 + + +# TODO: Duplicated Subset from codegen.tool.gen_oplist, remove declaration in codegen +class ScalarType(IntEnum): + Byte = 0 + Char = 1 + Short = 2 + Int = 3 + Long = 4 + Float = 6 + Double = 7 + Bool = 11 + + +ETParsedYaml = namedtuple("ETParsedYaml", ["native_functions", "kernel_index"]) + + +@dataclass(frozen=True) +class ETKernelKeyOpArgMeta: + arg_name: str + dtype: str + # The order of the dimensions if entry is a Tensor + dim_order: tuple[int, ...] + + def to_native_string(self) -> str: + dtype_str = ScalarType[self.dtype].value + dim_str = str(self.dim_order)[1:-1].replace(" ", "") + return f"{dtype_str};{dim_str}" + + +@dataclass(frozen=True) +class ETKernelKey: + # Field undefined is default = True + arg_meta: tuple[ETKernelKeyOpArgMeta, ...] = () + + # Indicator for this kernel being used as a catch all + default: bool = False + + version: int = KERNEL_KEY_VERSION + + @staticmethod + def gen_from_yaml( + args: dict[str, tuple[str, str]], + type_alias_map: dict[str, list[str]], # TODO: Support unwrapped str val + dim_order_alias_map: dict[str, list[int]], + ) -> list[ETKernelKey]: + """Generate ETKernelKeys from arg kernel specs + Multiple ETKernelKeys are returned due to dtype permutations from utilizing + type_alias_map (actualizing each potential type permutation as a KernelKey) + + Args: + args: Mapping from argument name to kernel specs + Kernel specs are a tuple of (dtype, dim_order). + Currently tuple entries must be aliased via the alias map arguments + type_alias_map: Mapping from type alias to potential type enums + i.e { T0 : [Double, Int] } means T0 can be either Double or Int + Used for lookup by args + dim_order_alias_map: Mapping from alias to a list of dimension orders + Used for lookup by args + """ + # Cast to dim order to int + dim_order_alias_map = { + k: [int(alias) for alias in v] for k, v in dim_order_alias_map.items() + } + kernel_keys = [] + + # Get all used Dtype Alias + dtype_alias_used = set() + for type_alias, dim_order in args.values(): + # Enforce usage of alias initially + # TODO: Support inlined arguments + assert type_alias in type_alias_map, "Undefined type alias: " + str( + type_alias + ) + assert ( + dim_order in dim_order_alias_map + ), f"Undefined dim_order alias: {dim_order}" + dtype_alias_used.add(type_alias) + + # Generate all permutations of dtype alias values + alias_dtypes = [ + [(alias, dtype) for dtype in type_alias_map[alias]] + for alias in dtype_alias_used + ] + alias_permutations = [ + dict(permutation) for permutation in list(itertools.product(*alias_dtypes)) + ] + + # Using each alias value permutation, generate kernel keys + op_arg_cache = {} + for permutation in alias_permutations: + arg_list = [] + for arg_name, arg_spec in args.items(): + dtype = permutation[arg_spec[0]] + dim_order = dim_order_alias_map[arg_spec[1]] # type: ignore[assignment] + if ( + cache_key := (arg_name, dtype, tuple(dim_order)) + ) not in op_arg_cache: + op_arg_cache[cache_key] = ETKernelKeyOpArgMeta(*cache_key) # type: ignore[arg-type] + + arg_list.append(op_arg_cache[cache_key]) + kernel_keys.append(ETKernelKey(tuple(arg_list))) + + return kernel_keys + + def to_native_string(self) -> str: + if self.default: + return "default" + return ( + "v" + + str(KERNEL_KEY_VERSION) + + "/" + + "|".join([arg.to_native_string() for arg in self.arg_meta]) + ) + + +@dataclass(frozen=True) +class ETKernelIndex: + index: dict[OperatorName, dict[ETKernelKey, BackendMetadata]] + + def has_kernels(self, g: NativeFunction | NativeFunctionsGroup) -> bool: + m = self.get_kernels(g) + return m is not None + + def get_kernels( + self, g: NativeFunction | NativeFunctionsGroup + ) -> dict[ETKernelKey, BackendMetadata]: + if isinstance(g, NativeFunction): + f = g + elif isinstance(g, NativeFunctionsGroup): + f = g.functional + else: + assert_never(g) + if f.func.name not in self.index: + return {} + return self.index[f.func.name] + + @staticmethod + def grow_from_backend_indices( + kernel_index: dict[OperatorName, dict[ETKernelKey, BackendMetadata]], + backend_indices: dict[DispatchKey, dict[OperatorName, BackendMetadata]], + ) -> None: + for dk in backend_indices: + index = backend_indices[dk] + for op, backend_metadata in index.items(): + if op in kernel_index: + kernel_index[op][ETKernelKey(default=True)] = backend_metadata + else: + kernel_index[op] = {ETKernelKey(default=True): backend_metadata} + + @staticmethod + def from_backend_indices( + backend_indices: dict[DispatchKey, dict[OperatorName, BackendMetadata]], + ) -> ETKernelIndex: + kernel_index: dict[OperatorName, dict[ETKernelKey, BackendMetadata]] = ( + defaultdict(dict) + ) + ETKernelIndex.grow_from_backend_indices(kernel_index, backend_indices) + return ETKernelIndex(kernel_index) + + def grow( + self, backend_indices: dict[DispatchKey, dict[OperatorName, BackendMetadata]] + ) -> ETKernelIndex: + ETKernelIndex.grow_from_backend_indices(self.index, backend_indices) + return self + + def _to_backend_index(self) -> BackendIndex: + """ + WARNING: this will be deprecated once all the codegen places know how to handle ETKernelIndex. + """ + index: dict[OperatorName, BackendMetadata] = {} + for op in self.index: + kernel_dict = self.index[op] + assert ( + len(kernel_dict.values()) == 1 + ), f"Can't convert ETKernelIndex to BackendIndex because {op} has more than one kernels. Got {kernel_dict}" + index[op] = kernel_dict.get( + ETKernelKey(default=True), + BackendMetadata(kernel="", structured=False, cpp_namespace=""), + ) + return BackendIndex( + dispatch_key=DispatchKey.CPU, + use_out_as_primary=False, + device_guard=False, + external=False, + index=index, + ) + + # Note duplicate ETKernelKey from index_b will clobber the metadata from index_a + @staticmethod + def merge_indices(index_a: ETKernelIndex, index_b: ETKernelIndex) -> ETKernelIndex: + combined = defaultdict(dict, index_a.index.copy()) + + for op, entry in index_b.index.items(): + for key, metadata in entry.items(): + combined[op][key] = metadata + + return ETKernelIndex(combined) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/parse.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/parse.py new file mode 100644 index 0000000000000000000000000000000000000000..86b73e0ce1d709dd9960c1493111782de3881749 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/executorch/parse.py @@ -0,0 +1,153 @@ +from __future__ import annotations + +from collections import defaultdict, namedtuple +from typing import Any + +import yaml + +from torchgen.executorch.model import ETKernelIndex, ETKernelKey +from torchgen.gen import LineLoader, parse_native_yaml +from torchgen.model import ( + BackendMetadata, + DispatchKey, + FunctionSchema, + NativeFunction, + OperatorName, +) +from torchgen.utils import NamespaceHelper + + +# Parse native_functions.yaml into a sequence of NativeFunctions and ET Backend Indices. +ETParsedYaml = namedtuple("ETParsedYaml", ["native_functions", "et_kernel_indices"]) + +# Fields in native_functions.yaml used to determine which kernels should be used +ET_FIELDS = ["kernels", "type_alias", "dim_order_alias"] + + +def parse_from_yaml(ei: dict[str, object]) -> dict[ETKernelKey, BackendMetadata]: + """Given a loaded yaml representing kernel assignment information, extract the + mapping from `kernel keys` to `BackendMetadata` (the latter representing the kernel instance) + + Args: + ei: Dict keys {kernels, type_alias, dim_order_alias} + See ETKernelKey for description of arguments + """ + e = ei.copy() + if (kernels := e.pop("kernels", None)) is None: + return {} + + type_alias: dict[str, list[str]] = e.pop("type_alias", {}) # type: ignore[assignment] + dim_order_alias: dict[str, list[str]] = e.pop("dim_order_alias", {}) # type: ignore[assignment] + dim_order_alias.pop("__line__", None) + + kernel_mapping: dict[ETKernelKey, BackendMetadata] = {} + + for entry in kernels: # type: ignore[attr-defined] + arg_meta = entry.get("arg_meta") + if arg_meta is not None: + arg_meta.pop("__line__") + + kernel_name = entry.get("kernel_name") + namespace_helper = NamespaceHelper.from_namespaced_entity( + kernel_name, max_level=3 + ) + kernel_namespace = namespace_helper.get_cpp_namespace(default="at") + backend_metadata = BackendMetadata( + kernel=namespace_helper.entity_name, + structured=False, + cpp_namespace=(kernel_namespace + "::native"), + ) + + kernel_keys = ( + [ETKernelKey((), default=True)] + if arg_meta is None + else ETKernelKey.gen_from_yaml(arg_meta, type_alias, dim_order_alias) # type: ignore[arg-type] + ) + + for kernel_key in kernel_keys: + assert kernel_key not in kernel_mapping, ( + "Duplicate kernel key: " + str(kernel_key) + " " + str(e) + ) + kernel_mapping[kernel_key] = backend_metadata + + return kernel_mapping + + +def parse_et_yaml_struct(es: object) -> ETKernelIndex: + """Given a loaded yaml representing a list of operators, for each op extract the mapping + of `kernel keys` to `BackendMetadata` (the latter representing the kernel instance + that should be used by the kernel key). + """ + indices: dict[OperatorName, dict[ETKernelKey, BackendMetadata]] = {} + for ei in es: # type: ignore[attr-defined] + e = ei.copy() + + funcs = e.pop("func") + assert isinstance(funcs, str), f"not a str: {funcs}" + namespace_helper = NamespaceHelper.from_namespaced_entity( + namespaced_entity=funcs, max_level=1 + ) + opname = FunctionSchema.parse(namespace_helper.entity_name).name + + assert opname not in indices, f"Duplicate func found in yaml: {opname} already" + + if len(index := parse_from_yaml(e)) != 0: + indices[opname] = index + + return ETKernelIndex(indices) + + +def extract_kernel_fields(es: object) -> dict[OperatorName, dict[str, Any]]: + """Given a loaded yaml representing a list of operators, extract the + kernel key related fields indexed by the operator name. + """ + fields: dict[OperatorName, dict[str, Any]] = defaultdict(dict) + for ei in es: # type: ignore[attr-defined] + funcs = ei.get("func") + assert isinstance(funcs, str), f"not a str: {funcs}" + namespace_helper = NamespaceHelper.from_namespaced_entity( + namespaced_entity=funcs, max_level=1 + ) + opname = FunctionSchema.parse(namespace_helper.entity_name).name + + for field in ET_FIELDS: + if (value := ei.get(field)) is not None: + fields[opname][field] = value + + return fields + + +def parse_et_yaml( + path: str, + tags_yaml_path: str, + ignore_keys: set[DispatchKey] | None = None, + skip_native_fns_gen: bool = False, +) -> tuple[list[NativeFunction], dict[OperatorName, dict[str, Any]]]: + """Parse native_functions.yaml into NativeFunctions and an Operator Indexed Dict + of fields to persist from native_functions.yaml to functions.yaml + """ + with open(path) as f: + es = yaml.load(f, Loader=LineLoader) + + et_kernel = extract_kernel_fields(es) + + # Remove ET specific fields from entries for BC compatibility + strip_et_fields(es) + + native_yaml = parse_native_yaml( + path, + tags_yaml_path, + ignore_keys, + skip_native_fns_gen=skip_native_fns_gen, + loaded_yaml=es, + ) + return native_yaml.native_functions, et_kernel + + +def strip_et_fields(es: object) -> None: + """Given a loaded yaml representing a list of operators, + remove ET specific fields from every entries for BC compatibility + """ + for entry in es: # type: ignore[attr-defined] + for field in ET_FIELDS: + entry.pop(field, None) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b0f050611200d023e99c7894e291553f3399726e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/gen_mobile_upgraders.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/gen_mobile_upgraders.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9aa1c33b4c2c34fef08a1e0f79fd0d085424a955 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/gen_mobile_upgraders.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/gen_mobile_upgraders_constant.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/gen_mobile_upgraders_constant.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..612a445115c450888847f51d9de8b2ce3dcf9c66 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/__pycache__/gen_mobile_upgraders_constant.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/gen_mobile_upgraders.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/gen_mobile_upgraders.py new file mode 100644 index 0000000000000000000000000000000000000000..b3d023618a08515a47c29cfcd2927dd73e9b1ad7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/gen_mobile_upgraders.py @@ -0,0 +1,389 @@ +#!/usr/bin/env python3 + +from __future__ import annotations + +import os +from enum import Enum +from operator import itemgetter +from pathlib import Path +from typing import Any + +import torch +from torch.jit.generate_bytecode import generate_upgraders_bytecode +from torchgen.code_template import CodeTemplate +from torchgen.operator_versions.gen_mobile_upgraders_constant import ( + MOBILE_UPGRADERS_HEADER_DESCRIPTION, +) + + +class ByteCode(Enum): + instructions = 1 + constants = 2 + types = 3 + operators = 4 + register_size = 5 + + +EXCLUDED_OP_SET = [ + "aten::full.names", + "aten::full.out", + "aten::full", +] + +EXCLUE_UPGRADER_SET = ["full_0_4", "full_out_0_4"] + +ONE_INSTRUCTION = CodeTemplate( + """ + Instruction{OpCode::${operator_name}, ${X}, ${N}},""" +) + +INSTRUCTION_LIST = CodeTemplate( + """std::vector({ + ${instruction_list} + }), // instructions list""" +) + +ONE_CONSTANT = CodeTemplate( + """ + c10::IValue(${constant}),""" +) + +CONSTANT_LIST = CodeTemplate( + """std::vector({ + ${constant_list} + }), // constants list""" +) + +CONSTANTS_LIST_EMPTY = """std::vector(), // constants list""" + +ONE_TYPE = CodeTemplate("""c10::parseType("${type_str}"),""") + +TYPE_LIST = CodeTemplate( + """std::vector({ + ${type_list} + }), // types list""" +) + +TYPE_LIST_EMPTY = """std::vector(), // types list""" + +ONE_OPERATOTR_STRING = CodeTemplate( + """ + OperatorString({"${operator_name}", "${overload_name}", ${num_of_args}}),""" +) + +OPERATOR_STRING_LIST = CodeTemplate( + """ + std::vector({ + ${operator_string_list} + }), // operators list""" +) + +ONE_UPGRADER_FUNCTION = CodeTemplate( + """ + mobile::Function::registerFunc( + "${upgrader_name}", + ${instruction_list}, + ${constant_list}, + ${type_list}, + ${register_size} + )""" +) + +ONE_UPGRADER_SRC = CodeTemplate( + """ + ByteCodeFunctionWithOperator({ + ${bytecode_function}, + ${operator_string_list} + }),""" +) + + +ONE_UPGRADER_IN_VERSION_MAP = CodeTemplate( + """Upgrader({${upgrader_min_version}, ${upgrader_max_version}, "${upgrader_name}", ${bytecode_func_index}})""" +) # noqa: E501 + +ONE_OPERATOR_IN_VERSION_MAP = CodeTemplate( + """ + {std::string("${operator_name}"), + std::vector({ + ${upgrader_list_in_version_map} + })},""" +) + + +OPERATOR_VERSION_MAP = CodeTemplate( + """ +const std::unordered_map> +getOperatorVersionMapForMobile() { + static std::unordered_map> + operatorVersionMapForMobile({ + ${operator_list_in_version_map} + }); + return operatorVersionMapForMobile; +} +""" +) + + +UPGRADER_CPP_SRC = CodeTemplate( + MOBILE_UPGRADERS_HEADER_DESCRIPTION + + """ +#include +#include + +namespace c10 { +TypePtr parseType(const std::string& pythonStr); +} // namespace c10 + +namespace torch { +namespace jit { + +// clang-format off + +// From operator_versions_map +${operator_version_map} + +const std::vector& getUpgraderBytecodeList() { + auto generate_upgrader_bytecode_list = []() { + std::vector upgrader_function_list({ + ${upgrader_bytecode} + }); + for (const auto& upgrader_function : upgrader_function_list) { + for (const auto& op : upgrader_function.operators) { + upgrader_function.function.append_operator( + op.name, + op.overload_name, + op.num_specified_args); + } + } + return upgrader_function_list; + }; + static std::vector upgraderBytecodeList = + generate_upgrader_bytecode_list(); + return upgraderBytecodeList; +} + +// clang-format on + +} // namespace jit +} // namespace torch +""" +) + +UPGRADER_MOBILE_FILE_NAME = "upgrader_mobile.cpp" + +UPGRADER_ELEMENT = CodeTemplate( + """\ +Upgrader({${min_version}, ${max_version}, ${operator_name}, ${index}}), +""" +) + +PER_OPERATOR_UPGRADER_LIST = CodeTemplate( + """\ +{ + std::string(${operator_name}), + std::vector({${upgrader_list}}); +} +""" +) + + +def construct_instruction(instruction_list_from_yaml: list[Any]) -> str: + instruction_list_part = [ + ONE_INSTRUCTION.substitute( + operator_name=instruction[0], + X=instruction[1], + N=instruction[2], + ) + for instruction in instruction_list_from_yaml + ] + return INSTRUCTION_LIST.substitute( + instruction_list="".join(instruction_list_part).lstrip("\n") + ) + + +def construct_constants(constants_list_from_yaml: list[Any]) -> str: + constants_list_part = [] + for constant_from_yaml in constants_list_from_yaml: + convert_constant = None + if isinstance(constant_from_yaml, str): + # Add quotes if it's string + convert_constant = f'"{constant_from_yaml}"' + elif isinstance(constant_from_yaml, bool): + convert_constant = "true" if constant_from_yaml else "false" + elif constant_from_yaml is None: + convert_constant = "" + elif isinstance(constant_from_yaml, int): + convert_constant = str(constant_from_yaml) + else: + raise ValueError( + f"The type of {constant_from_yaml} is {type(constant_from_yaml)}. " + "Please add change in construct_constants function in gen_mobile_upgraders.py." + ) + constants_list_part.append(ONE_CONSTANT.substitute(constant=convert_constant)) + if len(constants_list_part) == 0: + return CONSTANTS_LIST_EMPTY + return CONSTANT_LIST.substitute( + constant_list="".join(constants_list_part).lstrip("\n") + ) + + +def construct_operators(operator_list_from_yaml: list[Any]) -> str: + operator_list_part = [ + ONE_OPERATOTR_STRING.substitute( + operator_name=operator[0], + overload_name=operator[1], + num_of_args=operator[2], + ) + for operator in operator_list_from_yaml + ] + return OPERATOR_STRING_LIST.substitute( + operator_string_list="".join(operator_list_part).lstrip("\n") + ) + + +def construct_types(types_tr_list_from_yaml: list[Any]) -> str: + types_tr_list_part = [ + ONE_TYPE.substitute(type_str=types_tr) for types_tr in types_tr_list_from_yaml + ] + if len(types_tr_list_part) == 0: + return TYPE_LIST_EMPTY + return TYPE_LIST.substitute(type_list="".join(types_tr_list_part).lstrip("\n")) + + +def construct_register_size(register_size_from_yaml: int) -> str: + if not isinstance(register_size_from_yaml, int): + raise ValueError( + f"Input register size is {register_size_from_yaml} and" + "it's type is {type(register_size_from_yaml)}. An int type is expected." + ) + return str(register_size_from_yaml) + + +def construct_version_maps( + upgrader_bytecode_function_to_index_map: dict[str, Any], +) -> str: + version_map = torch._C._get_operator_version_map() + sorted_version_map_ = sorted(version_map.items(), key=itemgetter(0)) # type: ignore[no-any-return] + sorted_version_map = dict(sorted_version_map_) + + operator_list_in_version_map_part = [] + for op_name in sorted_version_map: + upgraders_in_version_map_part = [] + # TODO: remove the skip after these two operators schemas are fixed + if op_name in EXCLUDED_OP_SET: + continue + upgrader_ranges = torch._C._get_upgrader_ranges(op_name) + upgrader_entries = sorted_version_map[op_name] + assert len(upgrader_ranges) == len(upgrader_entries) + for idx, upgrader_entry in enumerate(upgrader_entries): + upgrader_name = upgrader_entry.upgrader_name + bytecode_function_index = upgrader_bytecode_function_to_index_map[ + upgrader_name + ] + upgraders_in_version_map_part.append( + ONE_UPGRADER_IN_VERSION_MAP.substitute( + upgrader_min_version=upgrader_ranges[idx].min_version, + upgrader_max_version=upgrader_ranges[idx].max_version, + upgrader_name=upgrader_name, + bytecode_func_index=bytecode_function_index, + ) + ) + operator_list_in_version_map_part.append( + ONE_OPERATOR_IN_VERSION_MAP.substitute( + operator_name=op_name, + upgrader_list_in_version_map="".join(upgraders_in_version_map_part), + ) + ) + return OPERATOR_VERSION_MAP.substitute( + operator_list_in_version_map="".join(operator_list_in_version_map_part).lstrip( + "\n" + ) + ) + + +def get_upgrader_bytecode_function_to_index_map( + upgrader_dict: list[dict[str, Any]], +) -> dict[str, Any]: + upgrader_bytecode_function_to_index_map = {} + index = 0 + for upgrader_bytecode in upgrader_dict: + for upgrader_name in upgrader_bytecode.keys(): + if upgrader_name in EXCLUE_UPGRADER_SET: + continue + upgrader_bytecode_function_to_index_map[upgrader_name] = index + index += 1 + return upgrader_bytecode_function_to_index_map + + +def write_cpp(cpp_path: str, upgrader_dict: list[dict[str, Any]]) -> None: + upgrader_bytecode_function_to_index_map = ( + get_upgrader_bytecode_function_to_index_map(upgrader_dict) + ) + version_map_src = construct_version_maps(upgrader_bytecode_function_to_index_map) + all_upgrader_src_string = [] + for upgrader_bytecode in upgrader_dict: + for upgrader_name, bytecode in upgrader_bytecode.items(): + # TODO: remove the skip after these two operators schemas are fixed + if upgrader_name in EXCLUE_UPGRADER_SET: + continue + instruction_list_str = "" + constant_list_str = "" + type_list_str = "" + register_size_str = "" + operator_list_str = "" + for table_name, contents in bytecode.items(): + element = ByteCode[table_name] + if element is ByteCode.instructions: + instruction_list_str = construct_instruction(contents) + elif element is ByteCode.constants: + constant_list_str = construct_constants(contents) + elif element is ByteCode.operators: + operator_list_str = construct_operators(contents) + elif element is ByteCode.types: + type_list_str = construct_types(contents) + elif element is ByteCode.register_size: + register_size_str = construct_register_size(contents) + + one_upgrader_function_string = ONE_UPGRADER_FUNCTION.substitute( + upgrader_name=upgrader_name, + instruction_list=instruction_list_str, + constant_list=constant_list_str, + type_list=type_list_str, + register_size=register_size_str, + ) + one_upgrader_src_string = ONE_UPGRADER_SRC.substitute( + bytecode_function=one_upgrader_function_string.lstrip("\n"), + operator_string_list=operator_list_str.lstrip("\n"), + ) + all_upgrader_src_string.append(one_upgrader_src_string) + + upgrader_file_content = UPGRADER_CPP_SRC.substitute( + operator_version_map=version_map_src, + upgrader_bytecode="".join(all_upgrader_src_string).lstrip("\n"), + ) + print("writing file to : ", cpp_path + "/" + UPGRADER_MOBILE_FILE_NAME) + with open(os.path.join(cpp_path, UPGRADER_MOBILE_FILE_NAME), "wb") as out_file: + out_file.write(upgrader_file_content.encode("utf-8")) + + +def sort_upgrader(upgrader_list: list[dict[str, Any]]) -> list[dict[str, Any]]: + sorted_upgrader_list = sorted( + upgrader_list, key=lambda one_upgrader: next(iter(one_upgrader)) + ) + return sorted_upgrader_list + + +def main() -> None: + upgrader_list = generate_upgraders_bytecode() + sorted_upgrader_list = sort_upgrader(upgrader_list) + for up in sorted_upgrader_list: + print("after sort upgrader : ", next(iter(up))) + + pytorch_dir = Path(__file__).resolve().parents[2] + upgrader_path = pytorch_dir / "torch" / "csrc" / "jit" / "mobile" + write_cpp(str(upgrader_path), sorted_upgrader_list) + + +if __name__ == "__main__": + main() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/gen_mobile_upgraders_constant.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/gen_mobile_upgraders_constant.py new file mode 100644 index 0000000000000000000000000000000000000000..923e39c4891e0562df75652d05673c4e393aff1b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/operator_versions/gen_mobile_upgraders_constant.py @@ -0,0 +1,7 @@ +MOBILE_UPGRADERS_HEADER_DESCRIPTION = """/** + * @generated + * This is an auto-generated file. Please do not modify it by hand. + * To re-generate, please run: + * cd ~/pytorch && python torchgen/operator_versions/gen_mobile_upgraders.py + */ +""" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/native/native_functions.yaml b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/native/native_functions.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9ad02bcd95c79b84f236ce4098529bdc21d35bab --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/native/native_functions.yaml @@ -0,0 +1,15795 @@ +# See README.md in this directory for more guidance + +# *********NB: _cast_* operators are DEPRECATED and will be removed +# eventually. These were previously used before TorchScript IR supported +# representing ScalarType's. They are now superseded by usage of +# `aten::to()`. The ops remain here for backward compatibility purposes. + +# DEPRECATED. DO NOT USE +- func: _cast_Byte(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# DEPRECATED. DO NOT USE +- func: _cast_Char(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# DEPRECATED. DO NOT USE +- func: _cast_Double(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# DEPRECATED. DO NOT USE +- func: _cast_Float(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# DEPRECATED. DO NOT USE +- func: _cast_Int(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# DEPRECATED. DO NOT USE +- func: _cast_Long(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# DEPRECATED. DO NOT USE +- func: _cast_Short(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# DEPRECATED. DO NOT USE +- func: _cast_Half(Tensor self, bool non_blocking=False) -> Tensor + variants: function + +# Computes the gradient of current tensor w.r.t. graph leaves. +- func: _backward(Tensor self, Tensor[] inputs, Tensor? gradient=None, bool? retain_graph=None, bool create_graph=False) -> () + manual_cpp_binding: True + variants: method + +# DEPRECATED. Sets the tensor data held by this `Variable` to be the same as +# `new_data`. It requires that `new_data` and `Variable` have compatible tensor +# type, by checking `_has_compatible_shallow_copy_type(this, new_data)`. +# +# This function is deprecated because it doesn't really make sense in a world +# where Variables *are* Tensors (as opposed to them containing tensors, which +# is what the previous interpretation was.) +- func: set_data(Tensor(a!) self, Tensor new_data) -> () + manual_cpp_binding: True + variants: method + +- func: data(Tensor self) -> Tensor + manual_cpp_binding: True + variants: method + +# True if this `Variable` is a leaf and thus does not have a `grad_fn`. +- func: is_leaf(Tensor self) -> bool + manual_cpp_binding: True + variants: method + +# Returns the output index of this variable from the forward operation that +# produced it. Conversely, it returns the input index of the gradient `Node` to +# which this `Variable` is connected (because in the gradient computation, +# inputs and outputs switch meaning). For example: +# +# y0, y1, y2 = f(x) +# assert y0.output_nr == 0 +# assert y1.output_nr == 1 +# assert y2.output_nr == 2 +# +- func: output_nr(Tensor self) -> int + manual_cpp_binding: True + variants: method + +- func: _version(Tensor self) -> int + manual_cpp_binding: True + variants: method + +- func: requires_grad_(Tensor(a!) self, bool requires_grad=True) -> Tensor(a!) + manual_cpp_binding: True + variants: method + +# Enables .grad attribute for non-leaf Tensors. +- func: retain_grad(Tensor(a!) self) -> () + manual_cpp_binding: True + variants: method + +- func: retains_grad(Tensor self) -> bool + manual_cpp_binding: True + variants: method + +- func: _fw_primal(Tensor(a) self, int level) -> Tensor(a) + variants: method + dispatch: + CompositeExplicitAutograd: _fw_primal + +- func: _make_dual(Tensor(a) primal, Tensor tangent, int level) -> Tensor(a) + variants: function + dispatch: + CompositeExplicitAutograd: _make_dual + +- func: _unpack_dual(Tensor(a) dual, int level) -> (Tensor(a) primal, Tensor tangent) + variants: function + +# NOTE: [_new_zeros_with_same_feature_meta] +# This function creates a new tensor with the layout and TensorOptions +# of `other` but also takes into account the batch dimensions of `self` +# +# This function has a couple extra constraints because it is also used for `jvp` +# in functorch. +# - is used for forward AD because there is the restriction +# that the primal and tangent must have the same layout +# - We cannot assume that `self` and `other` have the same sizes or even dim +# because in the inplace over view case, `other` is the base tensor, and +# `self` is the forward grad with respect to the view, which can have an +# entirely different shape +# - takes the number of batch dims for `self` because we also handle +# some batching logic. We handle that here instead of a batching rule because +# we'd like to avoid calling as_strided in the batching rule (as to enable +# nested vmap in functorch). +# - needs to be CompositeExplicitAutograd for jvp support in functorch. +# functorch currently relies on TensorWrapper which does not have storage +# CompositeExplicitAutograd makes sure the TensorWrapper is unwrapped. +# - this function may eventually take on another int argument to store the +# the number of batch dims for other once we support that use case +- func: _new_zeros_with_same_feature_meta(Tensor self, Tensor other, *, int self_num_batch_dims=0) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _new_zeros_with_same_feature_meta + autogen: _new_zeros_with_same_feature_meta.out + +# This function compares the storage numel of self with that of other, where +# storage numel is computed as: `other.storage().nbytes() / other.itemsize()`. +# We create this function for composite compliance purposes. The batching rule +# always returns true because vmapped as_strided does not support accessing +# storage locations not indexable by the input tensor. +# See the note above for more information. +- func: _has_same_storage_numel(Tensor self, Tensor other) -> bool + variants: function + dispatch: + CompositeExplicitAutograd: _has_same_storage_numel + +- func: rename_(Tensor(a!) self, Dimname[]? names) -> Tensor(a!) + variants: method + tags: inplace_view + +- func: rename(Tensor(a) self, Dimname[]? names) -> Tensor(a) + variants: method + +- func: align_to(Tensor(a) self, Dimname[] names) -> Tensor(a) + variants: method + +- func: align_to.ellipsis_idx(Tensor(a) self, Dimname[] order, int ellipsis_idx) -> Tensor(a) + variants: method + +- func: align_as(Tensor self, Tensor other) -> Tensor + variants: method + +- func: align_tensors(Tensor[] tensors) -> Tensor[] + +# Not assert because it's a keyword; not Assert because FX already +# took that syntax +# TODO: need to specify this is side-effectful somehow +- func: _assert_async(Tensor self) -> () + dispatch: + CPU: _assert_async_cpu + CUDA: _assert_async_cuda + +- func: _assert_async.msg(Tensor self, str assert_msg) -> () + dispatch: + CPU: _assert_async_msg_cpu + CUDA: _assert_async_msg_cuda + +- func: _assert_scalar(Scalar self, str assert_msg) -> () + dispatch: + CompositeExplicitAutograd: _assert_scalar + +- func: _functional_assert_scalar(Scalar self, str assert_msg, Tensor dep_token) -> Tensor + dispatch: + CompositeExplicitAutograd: _functional_assert_scalar + +- func: _functional_assert_async.msg(Tensor self, str assert_msg, Tensor dep_token) -> Tensor + dispatch: + CPU: _functional_assert_async_msg_cpu + +- func: _assert_tensor_metadata(Tensor a, SymInt[]? size=None, SymInt[]? stride=None, ScalarType? dtype=None, *, Device? device=None, Layout? layout=None) -> () + dispatch: + CompositeExplicitAutograd: _assert_tensor_metadata + Meta: _assert_tensor_metadata_meta_symint + +- func: _print(str s) -> () + dispatch: + CompositeExplicitAutograd: _print + +- func: sym_constrain_range(Scalar size, *, int? min=None, int? max=None) -> () + dispatch: + CompositeExplicitAutograd: sym_constrain_range + +- func: sym_constrain_range_for_size(Scalar size, *, int? min=None, int? max=None) -> () + dispatch: + CompositeExplicitAutograd: sym_constrain_range_for_size + +- func: _functional_sym_constrain_range(Scalar size, int? min, int? max, Tensor dep_token) -> Tensor + dispatch: + CompositeExplicitAutograd: _functional_sym_constrain_range + +- func: _functional_sym_constrain_range_for_size(Scalar size, int? min, int? max, Tensor dep_token) -> Tensor + dispatch: + CompositeExplicitAutograd: _functional_sym_constrain_range_for_size + +- func: _make_dep_token(*, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + dispatch: + CPU: _make_dep_token_cpu + +- func: refine_names(Tensor(a) self, Dimname[] names) -> Tensor(a) + variants: method + +- func: _use_cudnn_ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank) -> bool + device_check: NoCheck # Tensor arguments allowed to be on different devices, see also _cudnn_ctc_loss + dispatch: + CUDA: _use_cudnn_ctc_loss + +- func: _use_cudnn_ctc_loss.Tensor(Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, int blank) -> bool + device_check: NoCheck # Tensor arguments allowed to be on different devices, see also _cudnn_ctc_loss + dispatch: + CUDA: _use_cudnn_ctc_loss_tensor + +- func: _cudnn_ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank, bool deterministic, bool zero_infinity) -> (Tensor, Tensor) + device_check: NoCheck # log_probs is expected to be on CUDA while targets is expected to be on CPU + dispatch: + CUDA: _cudnn_ctc_loss + autogen: _cudnn_ctc_loss.out + +- func: _cudnn_ctc_loss.Tensor(Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, int blank, bool deterministic, bool zero_infinity) -> (Tensor, Tensor) + device_check: NoCheck # log_probs is expected to be on CUDA while targets is expected to be on CPU + dispatch: + CUDA: _cudnn_ctc_loss_tensor + +- func: _use_cudnn_rnn_flatten_weight() -> bool + +- func: _cudnn_rnn_flatten_weight(Tensor[] weight_arr, int weight_stride0, SymInt input_size, int mode, SymInt hidden_size, SymInt proj_size, int num_layers, bool batch_first, bool bidirectional) -> Tensor + dispatch: + CUDA: _cudnn_rnn_flatten_weight + autogen: _cudnn_rnn_flatten_weight.out + +- func: _cudnn_rnn(Tensor input, Tensor[] weight, int weight_stride0, Tensor? weight_buf, Tensor hx, Tensor? cx, int mode, SymInt hidden_size, SymInt proj_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, SymInt[] batch_sizes, Tensor? dropout_state) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + # rnn_tanh may or may not redispatch to _cudnn_rnn based on algorithm and build. Thus it might hit dispatch or kernel device check. + # Disable dispatch time device check for consistent behavior. + device_check: NoCheck + dispatch: + CUDA: _cudnn_rnn + autogen: _cudnn_rnn.out + tags: nondeterministic_seeded + +- func: _cudnn_rnn_backward(Tensor input, Tensor[] weight, int weight_stride0, Tensor weight_buf, Tensor hx, Tensor? cx, Tensor output, Tensor? grad_output, Tensor? grad_hy, Tensor? grad_cy, int mode, SymInt hidden_size, SymInt proj_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, SymInt[] batch_sizes, Tensor? dropout_state, Tensor reserve, bool[4] output_mask) -> (Tensor, Tensor, Tensor, Tensor[]) + dispatch: + CUDA: _cudnn_rnn_backward + autogen: _cudnn_rnn_backward.out + +- func: _cudnn_init_dropout_state(float dropout, bool train, int dropout_seed, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + dispatch: + CUDA: _cudnn_init_dropout_state + autogen: _cudnn_init_dropout_state.out + tags: nondeterministic_seeded + +- func: _debug_has_internal_overlap(Tensor self) -> int + variants: function + +- func: _fused_dropout(Tensor self, float p, Generator? generator=None) -> (Tensor, Tensor) + variants: function + dispatch: + CUDA: fused_dropout_cuda + tags: nondeterministic_seeded + autogen: _fused_dropout.out + +- func: _masked_scale(Tensor self, Tensor mask, float scale) -> Tensor + variants: function + dispatch: + CUDA: masked_scale_cuda + autogen: _masked_scale.out + +- func: native_dropout(Tensor input, float p, bool? train) -> (Tensor, Tensor) + variants: function + dispatch: + CPU: native_dropout_cpu + CUDA: native_dropout_cuda + NestedTensorCPU, NestedTensorCUDA: native_dropout_nested + tags: [nondeterministic_seeded, core] + autogen: native_dropout.out + +- func: native_dropout_backward(Tensor grad_output, Tensor mask, float scale) -> Tensor + dispatch: + CPU, NestedTensorCPU, NestedTensorCUDA: native_dropout_backward + CUDA: native_dropout_backward_cuda + autogen: native_dropout_backward.out + tags: pointwise + +- func: _sobol_engine_draw(Tensor quasi, int n, Tensor sobolstate, int dimension, int num_generated, ScalarType? dtype) -> (Tensor, Tensor) + +- func: _sobol_engine_ff_(Tensor(a!) self, int n, Tensor sobolstate, int dimension, int num_generated) -> Tensor(a!) + +- func: _sobol_engine_scramble_(Tensor(a!) self, Tensor ltm, int dimension) -> Tensor(a!) + +- func: _sobol_engine_initialize_state_(Tensor(a!) self, int dimension) -> Tensor(a!) + +- func: _reshape_from_tensor(Tensor self, Tensor shape) -> Tensor + +- func: _shape_as_tensor(Tensor self) -> Tensor + +- func: dropout(Tensor input, float p, bool train) -> Tensor + tags: [nondeterministic_seeded, maybe_aliasing_or_mutating] + +- func: dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) + tags: nondeterministic_seeded + +- func: feature_dropout(Tensor input, float p, bool train) -> Tensor + tags: [nondeterministic_seeded, maybe_aliasing_or_mutating] + +- func: feature_dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) + tags: nondeterministic_seeded + +- func: alpha_dropout(Tensor input, float p, bool train) -> Tensor + tags: [nondeterministic_seeded, maybe_aliasing_or_mutating] + +- func: alpha_dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) + tags: nondeterministic_seeded + +- func: feature_alpha_dropout(Tensor input, float p, bool train) -> Tensor + tags: [nondeterministic_seeded, maybe_aliasing_or_mutating] + +- func: feature_alpha_dropout_(Tensor(a!) self, float p, bool train) -> Tensor(a!) + tags: nondeterministic_seeded + +- func: abs(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: abs + SparseCPU, SparseCUDA: abs_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: abs_sparse_csr + NestedTensorCPU, NestedTensorCUDA: NestedTensor_abs + tags: [core, pointwise] + +- func: abs_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: abs_ + SparseCPU, SparseCUDA: abs_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: abs_sparse_csr_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_abs_ + +- func: abs.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: abs_out + MPS: abs_out_mps + SparseCPU, SparseCUDA: abs_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: abs_sparse_csr_out + tags: pointwise + +# Note [Adding an alias] +# To add an alias do the following: +# +# 1) Copy the original functions native_functions.yaml entry, but replace the +# original function's name with their own and delete any dispatch +# keys for the aliases. Specifying a dispatch key will prevent +# autograd from recording the operations the alias performs, which +# will stop it from "inheriting" the original operation's autograd behavior. +# 2) Implement the corresponding functions and have them redispatch to the +# original function. +# 3) Add docstrings to the new function that reference the original function, +# and document the method as usual (if it exists.) +# (See torch/_torch_docs.py and docs/source/torch.rst if adding a function, +# torch/_tensor_docs.py and docs/source/tensors.rst if adding a method, +# or module-specific doc bindings (like torch/linalg/__init__.py) if +# adding an alias in a namespace.) +# 4) Update torch/overrides.py consistent with the original function. +# 5) Update the alias_map in torch/csrc/jit/passes/normalize_ops.cpp. +# 6) Add aliases argument to existing OpInfo/UnaryUfuncInfo or create new OpInfo/UnaryUfuncInfo entry +# in op_db list in torch/testing/_internal/common_methods_invocations.py +# +# See torch.absolute, an alias for torch.abs, as an example. +# Absolute, alias for abs + +- func: absolute(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: absolute_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: absolute.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: angle(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: angle + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: angle_sparse_csr + tags: pointwise + +- func: angle.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: angle_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: angle_sparse_csr_out + tags: pointwise + +- func: view_as_real(Tensor(a) self) -> Tensor(a) + variants: function + dispatch: + CPU, CUDA, MPS, Meta: view_as_real + +- func: view_as_complex(Tensor(a) self) -> Tensor(a) + variants: function + dispatch: + CPU, CUDA, MPS, Meta: view_as_complex + +- func: sgn(Tensor self) -> Tensor + variants: function, method + structured_delegate: sgn.out + dispatch: + SparseCPU, SparseCUDA: sgn_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sgn_sparse_csr + NestedTensorCPU, NestedTensorCUDA: NestedTensor_sgn + tags: pointwise + +- func: sgn_(Tensor(a!) self) -> Tensor(a!) + variants: method + structured_delegate: sgn.out + dispatch: + SparseCPU, SparseCUDA: sgn_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sgn_sparse_csr_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_sgn_ + tags: pointwise + +- func: sgn.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sgn_out + MPS: sgn_out_mps + SparseCPU, SparseCUDA: sgn_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sgn_sparse_csr_out + tags: pointwise + +- func: chalf(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor + variants: method + +- func: real(Tensor(a) self) -> Tensor(a) + device_check: NoCheck # TensorIterator + variants: function + +- func: imag(Tensor(a) self) -> Tensor(a) + device_check: NoCheck # TensorIterator + variants: function + +- func: _conj(Tensor(a) self) -> Tensor(a) + variants: function, method + dispatch: + CompositeExplicitAutograd: _conj + +- func: conj(Tensor(a) self) -> Tensor(a) + variants: function, method + manual_cpp_binding: True + +- func: _conj_physical(Tensor self) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: _conj_physical + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: conj_physical_sparse_csr + autogen: _conj_physical.out + +- func: conj_physical(Tensor self) -> Tensor + variants: function, method + tags: [pointwise, maybe_aliasing_or_mutating] + +- func: conj_physical.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: conj_physical_out + MPS: conj_physical_out_mps + SparseCPU, SparseCUDA: conj_physical_out_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: conj_physical_sparse_csr_out + tags: pointwise + +- func: conj_physical_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + dispatch: + CompositeExplicitAutograd: conj_physical_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: conj_physical_sparse_csr_ + tags: pointwise + +- func: resolve_conj(Tensor(a) self) -> Tensor(a) + variants: function, method + +- func: resolve_neg(Tensor(a) self) -> Tensor(a) + variants: function, method + +- func: _neg_view(Tensor(a) self) -> Tensor(a) + variants: function, method + dispatch: + CompositeExplicitAutograd: _neg_view + +- func: acos(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: acos.out + tags: [core, pointwise] + +- func: acos_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: acos.out + tags: pointwise + +- func: acos.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: acos_out + MPS: acos_out_mps + tags: pointwise + +# arccos, alias of acos +- func: arccos(Tensor self) -> Tensor + variants: function, method + +- func: arccos_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: arccos.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: avg_pool1d(Tensor self, int[1] kernel_size, int[1] stride=[], int[1] padding=0, bool ceil_mode=False, bool count_include_pad=True) -> Tensor + tags: core + autogen: avg_pool1d.out + +- func: adaptive_avg_pool1d(Tensor self, int[1] output_size) -> Tensor + tags: core + autogen: adaptive_avg_pool1d.out + +# Return: (Tensor output, Tensor indices) +- func: adaptive_max_pool1d(Tensor self, int[1] output_size) -> (Tensor, Tensor) + +- func: add.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: add.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: add_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: add_sparse_csr + MkldnnCPU: mkldnn_add + ZeroTensor: add_zerotensor + NestedTensorCPU, NestedTensorCUDA: NestedTensor_add_Tensor + tags: [core, pointwise] + +- func: add_.Tensor(Tensor(a!) self, Tensor other, *, Scalar alpha=1) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: add.out + dispatch: + SparseCPU, SparseCUDA, SparseMeta: add_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: add_sparse_csr_ + MkldnnCPU: mkldnn_add_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_add__Tensor + tags: pointwise + +- func: add.out(Tensor self, Tensor other, *, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + ufunc_inner_loop: + Generic: add (AllAndComplex, BFloat16, Half, ComplexHalf) + ScalarOnly: add (Bool) + dispatch: + SparseCPU, SparseMeta: add_out_sparse_cpu + SparseCUDA: add_out_sparse_cuda + SparseCsrCPU, SparseCsrMeta: add_out_sparse_compressed_cpu + SparseCsrCUDA: add_out_sparse_compressed_cuda + MkldnnCPU: mkldnn_add_out + MPS: add_out_mps + tags: pointwise + +- func: _add_relu.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + variants: function + dispatch: + CPU: add_relu + +- func: _add_relu_.Tensor(Tensor(a!) self, Tensor other, *, Scalar alpha=1) -> Tensor(a!) + variants: function + dispatch: + CPU: add_relu_ + +- func: _add_relu.out(Tensor self, Tensor other, *, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CPU: add_relu_out + +- func: _add_relu.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + variants: function + dispatch: + CPU: add_relu + +- func: _add_relu_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!) + variants: function + dispatch: + CPU: add_relu_ + autogen: _add_relu.Scalar_out + +# For C++ only, until we have conversion from C++ numbers to Tensor +- func: add.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: add + tags: [core, pointwise] + +- func: add_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: add_ + autogen: add.Scalar_out + tags: pointwise + +- func: addmv(Tensor self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1) -> Tensor + structured_delegate: addmv.out + variants: function, method + +- func: addmv_(Tensor(a!) self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) + structured_delegate: addmv.out + variants: function, method + +- func: addmv.out(Tensor self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: addmv_out_cpu + CUDA: addmv_out_cuda + MPS: addmv_out_mps + XPU: addmv_out_xpu + SparseCsrCPU: addmv_out_sparse_compressed + SparseCsrCUDA: addmv_out_sparse_compressed_cuda + +- func: addr(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + variants: function, method + dispatch: + CPU, CUDA: addr + MPS: addr_mps + CompositeExplicitAutograd: math_addr + +- func: addr_(Tensor(a!) self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) + variants: method + dispatch: + CompositeExplicitAutograd: addr_ + +- func: addr.out(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: addr_out + MPS: addr_out_mps + CompositeExplicitAutograd: math_addr_out + +- func: affine_grid_generator(Tensor theta, SymInt[] size, bool align_corners) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: affine_grid_generator + autogen: affine_grid_generator.out + +- func: affine_grid_generator_backward(Tensor grad, SymInt[] size, bool align_corners) -> Tensor + variants: function + +- func: _is_all_true(Tensor self) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: _is_all_true + +- func: _is_any_true(Tensor self) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: _is_any_true + +# Note: this function is only for testing. +- func: _test_check_tensor(Tensor self) -> Tensor + variants: function + +# Note; this function is only for testing +- func: _test_functorch_fallback(Tensor self, Tensor other) -> Tensor + variants: function + dispatch: + CPU: _test_functorch_fallback + autogen: _test_functorch_fallback.out + +- func: all.dim(Tensor self, int dim, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: all.out + variants: function, method + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_all + + +- func: all.dims(Tensor self, int[]? dim=None, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: all.dims_out + variants: function, method + cpp_no_default_args: ['dim'] + dispatch: + CompositeExplicitAutograd: all_dims_default + +- func: all.out(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + dispatch: + CPU, CUDA: all_out + MPS: all_out_mps + +- func: all.dims_out(Tensor self, int[]? dim=None, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + dispatch: + CPU, CUDA: all_dims_out + CompositeExplicitAutograd: all_dims_out_default + cpp_no_default_args: ['dim'] + +- func: all.dimname(Tensor self, Dimname dim, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: all.dimname_out(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: allclose(Tensor self, Tensor other, float rtol=1e-05, float atol=1e-08, bool equal_nan=False) -> bool + variants: function, method + tags: data_dependent_output + dispatch: + CompositeExplicitAutograd: allclose + +- func: any.dim(Tensor self, int dim, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: any.out + variants: function, method + tags: core + +- func: any.dims(Tensor self, int[]? dim=None, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: any.dims_out + variants: function, method + cpp_no_default_args: ['dim'] + tags: core + dispatch: + CompositeExplicitAutograd: any_dims_default + +- func: any.out(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + dispatch: + CPU, CUDA: any_out + MPS: any_out_mps + +- func: any.dims_out(Tensor self, int[]? dim=None, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + dispatch: + CPU, CUDA: any_dims_out + CompositeExplicitAutograd: any_dims_out_default + cpp_no_default_args: ['dim'] + +- func: any.dimname(Tensor self, Dimname dim, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: any.dimname_out(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: arange(Scalar end, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: arange + +- func: arange.start(Scalar start, Scalar end, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: arange + +# This operator should be named `arange.start_out` if following the naming convention. However that +# name is already taken. Disabled because of CI job failures. +# FIXME: enable this +#- func: arange.start_out_(Scalar start, Scalar end, *, Tensor(a!) out) -> Tensor(a!) +# dispatch: +# CompositeExplicitAutograd: arange_start_out + +- func: arange.start_step(Scalar start, Scalar end, Scalar step=1, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: arange + cpp_no_default_args: ['step'] + tags: core + +- func: arange.out(Scalar end, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: arange_out + +- func: arange.start_out(Scalar start, Scalar end, Scalar step=1, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, Meta: arange_out + CUDA: arange_cuda_out + MPS: arange_mps_out + cpp_no_default_args: ['step'] + +# This function is a temporary hack to allow tracing of arange like constructs with dynamic +# bounds on arange. Normal arange is not traceable because it does not take any tensor inputs; +# if the range you need is based on another tensor, calling this function directly will +# preserve tracing. Get rid of this when arange can directly take tensors for bounds +# (so that it can be traced directly). +- func: _dim_arange(Tensor like, int dim) -> Tensor + +- func: argmax(Tensor self, int? dim=None, bool keepdim=False) -> Tensor + structured_delegate: argmax.out + device_check: NoCheck # TensorIterator + variants: function, method + tags: core + +- func: argmax.out(Tensor self, int? dim=None, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU, CUDA: argmax_out + MPS: argmax_out_mps + +- func: argmin(Tensor self, int? dim=None, bool keepdim=False) -> Tensor + structured_delegate: argmin.out + device_check: NoCheck # TensorIterator + variants: function, method + tags: core + +- func: argmin.out(Tensor self, int? dim=None, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU, CUDA: argmin_out + MPS: argmin_out_mps + +- func: acosh(Tensor self) -> Tensor + variants: function, method + structured_delegate: acosh.out + tags: [core, pointwise] + +- func: acosh_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + structured_delegate: acosh.out + tags: pointwise + +- func: acosh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: acosh_out + MPS: acosh_out_mps + tags: pointwise +# arccosh, alias for acosh + +- func: arccosh(Tensor self) -> Tensor + variants: function, method + +- func: arccosh_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: arccosh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: asinh(Tensor self) -> Tensor + variants: function, method + structured_delegate: asinh.out + dispatch: + SparseCPU, SparseCUDA: asinh_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: asinh_sparse_csr + tags: [core, pointwise] + +- func: asinh_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + structured_delegate: asinh.out + dispatch: + SparseCPU, SparseCUDA: asinh_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: asinh_sparse_csr_ + tags: pointwise + +- func: asinh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: asinh_out + MPS: asinh_out_mps + SparseCPU, SparseCUDA: asinh_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: asinh_sparse_csr_out + tags: pointwise + +# arcsinh, alias for asinh +- func: arcsinh(Tensor self) -> Tensor + variants: function, method + +- func: arcsinh_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: arcsinh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: atanh(Tensor self) -> Tensor + structured_delegate: atanh.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: atanh_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: atanh_sparse_csr + tags: [core, pointwise] + +- func: atanh_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: atanh.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: atanh_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: atanh_sparse_csr_ + tags: pointwise + +- func: atanh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: atanh_out + MPS: atanh_out_mps + SparseCPU, SparseCUDA: atanh_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: atanh_sparse_csr_out + tags: pointwise +# arctanh, alias for atanh + +- func: arctanh(Tensor self) -> Tensor + variants: function, method + +- func: arctanh_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: arctanh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: as_strided(Tensor(a) self, SymInt[] size, SymInt[] stride, SymInt? storage_offset=None) -> Tensor(a) + variants: function, method + dispatch: + ZeroTensor, CPU, CUDA: as_strided_tensorimpl + Meta: as_strided_tensorimpl_meta_symint + MPS: as_strided_tensorimpl_mps + QuantizedCPU, QuantizedCUDA: as_strided_qtensorimpl + device_check: NoCheck + device_guard: False + tags: core + +- func: as_strided_(Tensor(a!) self, SymInt[] size, SymInt[] stride, SymInt? storage_offset=None) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + variants: function, method + device_check: NoCheck + device_guard: False + tags: inplace_view + dispatch: + CompositeExplicitAutogradNonFunctional: as_strided__symint + +- func: asin(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: asin.out + dispatch: + SparseCPU, SparseCUDA: asin_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: asin_sparse_csr + tags: [core, pointwise] + +- func: asin_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: asin.out + dispatch: + SparseCPU, SparseCUDA: asin_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: asin_sparse_csr_ + tags: pointwise + +- func: asin.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: asin_out + MPS: asin_out_mps + SparseCPU, SparseCUDA: asin_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: asin_sparse_csr_out + tags: pointwise + +# arcsin, alias of asin +- func: arcsin(Tensor self) -> Tensor + variants: function, method + +- func: arcsin_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: arcsin.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: atan(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: atan.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: atan_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: atan_sparse_csr + tags: [core, pointwise] + +- func: atan_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: atan.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: atan_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: atan_sparse_csr_ + tags: pointwise + +- func: atan.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: atan_out + MPS: atan_out_mps + SparseCPU, SparseCUDA: atan_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: atan_sparse_csr_out + tags: pointwise + +# arctan, alias of atan +- func: arctan(Tensor self) -> Tensor + variants: function, method + +- func: arctan_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: arctan.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: atleast_1d(Tensor self) -> Tensor + variants: function + tags: maybe_aliasing_or_mutating + +- func: atleast_1d.Sequence(Tensor[] tensors) -> Tensor[] + +- func: atleast_2d(Tensor self) -> Tensor + variants: function + tags: maybe_aliasing_or_mutating + +- func: atleast_2d.Sequence(Tensor[] tensors) -> Tensor[] + variants: function + +- func: atleast_3d(Tensor self) -> Tensor + variants: function + tags: maybe_aliasing_or_mutating + +- func: atleast_3d.Sequence(Tensor[] tensors) -> Tensor[] + variants: function + +- func: baddbmm(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + variants: function, method + structured_delegate: baddbmm.out + +- func: baddbmm_(Tensor(a!) self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) + variants: method + structured_delegate: baddbmm.out + +- func: baddbmm.out(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU: baddbmm_out_cpu + CUDA: baddbmm_out_cuda + MPS: baddbmm_out_mps + XPU: baddbmm_out_xpu + SparseCsrCUDA: baddbmm_out_sparse_csr_cuda + +- func: bartlett_window(int window_length, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: bartlett_window + autogen: bartlett_window.out + +- func: bartlett_window.periodic(int window_length, bool periodic, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: bartlett_window + autogen: bartlett_window.periodic_out + +- func: batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps, bool cudnn_enabled) -> Tensor + tags: maybe_aliasing_or_mutating + +- func: quantized_batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor mean, Tensor var, float eps, float output_scale, int output_zero_point) -> Tensor + dispatch: + QuantizedCPU: quantized_batch_norm + autogen: quantized_batch_norm.out + +- func: _batch_norm_impl_index(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps, bool cudnn_enabled) -> (Tensor, Tensor, Tensor, Tensor, int) + tags: maybe_aliasing_or_mutating + +- func: _batch_norm_impl_index_backward(int impl_index, Tensor input, Tensor grad_output, Tensor? weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var_transform, bool train, float eps, bool[3] output_mask, Tensor reservedSpace) -> (Tensor, Tensor, Tensor) + +# Sample bernoulli with values in `self` as probability. +- func: bernoulli(Tensor self, *, Generator? generator=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: bernoulli + tags: nondeterministic_seeded + +- func: bernoulli.out(Tensor self, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + tags: nondeterministic_seeded + dispatch: + CPU, CUDA: bernoulli_out + MPS: bernoulli_out_mps + +- func: bernoulli_.Tensor(Tensor(a!) self, Tensor p, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + tags: nondeterministic_seeded + dispatch: + CPU, CUDA: bernoulli_ + MPS: bernoulli_mps_ + autogen: bernoulli.Tensor, bernoulli.Tensor_out + +- func: bernoulli_.float(Tensor(a!) self, float p=0.5, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + tags: nondeterministic_seeded + dispatch: + CPU, CUDA: bernoulli_ + MPS: bernoulli_mps_ + autogen: bernoulli.float_out + +# Note [bernoulli.p schema] +# We should probably just fix the overload ambiguity by appending a _functional to the C++ API name (BC breaking) +# This out-of-place version isn't used explicitly, but needed by jit. +# There is no default valid on `p` here because it would introduce ambiguity +# with `bernoulli(Tensor self, *, Generator? generator=None)` declaration. +- func: bernoulli.p(Tensor self, float p, *, Generator? generator=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutogradNonFunctional: bernoulli + +- func: bilinear(Tensor input1, Tensor input2, Tensor weight, Tensor? bias=None) -> Tensor + +- func: binary_cross_entropy(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor + device_check: NoCheck # TensorIterator + python_module: nn + variants: function + dispatch: + CPU: binary_cross_entropy_cpu + CUDA: binary_cross_entropy_cuda + MPS: binary_cross_entropy_mps + +- func: binary_cross_entropy.out(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: nn + variants: function + dispatch: + CPU: binary_cross_entropy_out_cpu + CUDA: binary_cross_entropy_out_cuda + MPS: binary_cross_entropy_out_mps + +- func: binary_cross_entropy_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor + python_module: nn + variants: function + dispatch: + CPU: binary_cross_entropy_backward_cpu + CUDA: binary_cross_entropy_backward_cuda + MPS: binary_cross_entropy_backward_mps + +- func: binary_cross_entropy_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + variants: function + dispatch: + CPU: binary_cross_entropy_backward_out_cpu + CUDA: binary_cross_entropy_backward_out_cuda + MPS: binary_cross_entropy_backward_out_mps + +- func: binary_cross_entropy_with_logits(Tensor self, Tensor target, Tensor? weight=None, Tensor? pos_weight=None, int reduction=Mean) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: binary_cross_entropy_with_logits + autogen: binary_cross_entropy_with_logits.out + +- func: bincount(Tensor self, Tensor? weights=None, int minlength=0) -> Tensor + variants: function, method + dispatch: + CPU: _bincount_cpu + CUDA: _bincount_cuda + MPS: _bincount_mps + tags: dynamic_output_shape + autogen: bincount.out + +- func: bitwise_not(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: bitwise_not.out + variants: function, method + tags: [core, pointwise] + +- func: bitwise_not_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: bitwise_not.out + variants: method + tags: pointwise + +- func: bitwise_not.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: bitwise_not_out + MPS: bitwise_not_out_mps + tags: pointwise + +- func: copysign.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: copysign_out + tags: pointwise + +- func: copysign.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: copysign.out + tags: pointwise + +- func: copysign_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: copysign.out + +- func: copysign.Scalar(Tensor self, Scalar other) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: copysign + tags: pointwise + +- func: copysign_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + dispatch: + CompositeExplicitAutograd: copysign_ + +- func: copysign.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: copysign_out + tags: pointwise + +- func: _lazy_clone(Tensor self) -> Tensor + # Like clone, but the copy takes place lazily, only if either the + # input or the output are written. + variants: function, method + dispatch: + CompositeExplicitAutograd: _lazy_clone + +- func: logical_not(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: logical_not + NestedTensorCPU, NestedTensorCUDA: NestedTensor_logical_not + tags: [core, pointwise] + +- func: logical_not_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: logical_not_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_logical_not_ + tags: pointwise + +- func: logical_not.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: logical_not_out + MPS: logical_not_out_mps + tags: pointwise + +- func: logical_xor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: logical_xor + tags: [core, pointwise] + +- func: logical_xor_(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: logical_xor_ + tags: pointwise + +- func: logical_xor.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: logical_xor_out + MPS: logical_xor_out_mps + tags: pointwise + +- func: logical_and(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: logical_and + tags: [core, pointwise] + +- func: logical_and_(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: logical_and_ + tags: pointwise + +- func: logical_and.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: logical_and_out + MPS: logical_and_out_mps + tags: pointwise + +- func: logical_or(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: logical_or + tags: [core, pointwise] + +- func: logical_or_(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: logical_or_ + tags: pointwise + +- func: logical_or.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: logical_or_out + MPS: logical_or_out_mps + tags: pointwise + +- func: blackman_window(int window_length, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: blackman_window + autogen: blackman_window.out + +- func: blackman_window.periodic(int window_length, bool periodic, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: blackman_window + autogen: blackman_window.periodic_out + +- func: bmm(Tensor self, Tensor mat2) -> Tensor + structured_delegate: bmm.out + variants: function, method + dispatch: + SparseCPU: bmm_sparse_cpu + SparseCUDA: bmm_sparse_cuda + NestedTensorCPU: bmm_nested + NestedTensorCUDA: bmm_nested_cuda + tags: core + +- func: bmm.out(Tensor self, Tensor mat2, *, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU: bmm_out_cpu + CUDA: bmm_out_cuda + MPS: bmm_out_mps + XPU: bmm_out_xpu + SparseCPU: bmm_out_sparse_cpu + SparseCUDA: bmm_out_sparse_cuda + SparseCsrCUDA: bmm_out_sparse_csr_cuda + +- func: broadcast_tensors(Tensor[] tensors) -> Tensor[] + device_check: NoCheck + device_guard: False + +- func: broadcast_to(Tensor(a) self, SymInt[] size) -> Tensor(a) + variants: function, method + dispatch: + CompositeImplicitAutograd: broadcast_to_symint + +- func: _sparse_broadcast_to(Tensor(a) self, int[] size) -> Tensor(a) + variants: function + dispatch: + SparseCPU, SparseCUDA: sparse_broadcast_to + +- func: cat(Tensor[] tensors, int dim=0) -> Tensor + structured_delegate: cat.out + dispatch: + SparseCPU, SparseCUDA: cat_sparse + QuantizedCPU: cat_quantized_cpu + NestedTensorCPU, NestedTensorCUDA: cat_nested + tags: core + +- func: cat.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) + structured: True + precomputed: + - dim -> int dim, int valid, bool all_contiguous, bool all_same_dtype, bool all_same_sizes_and_stride, MemoryFormat memory_format + dispatch: + CPU: cat_out_cpu + CUDA: cat_out_cuda + MPS: cat_out_mps + QuantizedCPU: cat_out_quantized_cpu + +- func: cat.names(Tensor[] tensors, Dimname dim) -> Tensor + +- func: cat.names_out(Tensor[] tensors, Dimname dim, *, Tensor(a!) out) -> Tensor(a!) + +# alias for torch.cat +- func: concat(Tensor[] tensors, int dim=0) -> Tensor + +- func: concat.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) + +- func: concat.names(Tensor[] tensors, Dimname dim) -> Tensor + +- func: concat.names_out(Tensor[] tensors, Dimname dim, *, Tensor(a!) out) -> Tensor(a!) + +# alias for torch.cat +- func: concatenate(Tensor[] tensors, int dim=0) -> Tensor + +- func: concatenate.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) + +- func: concatenate.names(Tensor[] tensors, Dimname dim) -> Tensor + +- func: concatenate.names_out(Tensor[] tensors, Dimname dim, *, Tensor(a!) out) -> Tensor(a!) + +- func: block_diag(Tensor[] tensors) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: block_diag + autogen: block_diag.out + +- func: ceil(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: ceil.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: ceil_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: ceil_sparse_csr + tags: [core, pointwise] + +- func: ceil_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: ceil.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: ceil_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: ceil_sparse_csr_ + tags: pointwise + +- func: ceil.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: ceil_out + MPS: ceil_out_mps + SparseCPU, SparseCUDA: ceil_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: ceil_sparse_csr_out + tags: pointwise + +# alias for torch.linalg.multi_dot +- func: chain_matmul(Tensor[] matrices) -> Tensor + variants: function + +# alias for torch.linalg.multi_dot +- func: chain_matmul.out(Tensor[] matrices, *, Tensor(a!) out) -> Tensor(a!) + +- func: unsafe_chunk(Tensor self, int chunks, int dim=0) -> Tensor[] + variants: function, method + device_check: NoCheck + device_guard: False + tags: maybe_aliasing_or_mutating + +- func: chunk(Tensor(a -> *) self, int chunks, int dim=0) -> Tensor(a)[] + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: chunk + NestedTensorCPU, NestedTensorCUDA: chunk_nested_tensor + +- func: tensor_split.sections(Tensor(a -> *) self, SymInt sections, int dim=0) -> Tensor(a)[] + variants: function, method + dispatch: + CompositeImplicitAutograd: tensor_split_sections_symint + +- func: tensor_split.indices(Tensor(a -> *) self, SymInt[] indices, int dim=0) -> Tensor(a)[] + variants: function, method + dispatch: + CompositeImplicitAutograd: tensor_split_indices_symint + +- func: tensor_split.tensor_indices_or_sections(Tensor(a -> *) self, Tensor tensor_indices_or_sections, int dim=0) -> Tensor(a)[] + variants: function, method + +- func: clamp(Tensor self, Scalar? min=None, Scalar? max=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + cpp_no_default_args: ['min'] + structured_delegate: clamp.out + dispatch: + QuantizedCPU: clamp_quantized_cpu + tags: [core, pointwise] + +- func: clamp.Tensor(Tensor self, Tensor? min=None, Tensor? max=None) -> Tensor + variants: function, method + structured_delegate: clamp.Tensor_out + tags: [core, pointwise] + +- func: clamp_(Tensor(a!) self, Scalar? min=None, Scalar? max=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + cpp_no_default_args: ['min'] + structured_delegate: clamp.out + tags: pointwise + +- func: clamp_.Tensor(Tensor(a!) self, Tensor? min=None, Tensor? max=None) -> Tensor(a!) + variants: function, method + structured_delegate: clamp.Tensor_out + tags: pointwise + +- func: clamp.out(Tensor self, Scalar? min=None, Scalar? max=None, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + cpp_no_default_args: ['min'] + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: clamp_out + MPS: clamp_out_mps + tags: pointwise + +- func: clamp.Tensor_out(Tensor self, Tensor? min=None, Tensor? max=None, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: clamp_Tensor_out + MPS: clamp_Tensor_out_mps + tags: pointwise + +- func: clamp_max(Tensor self, Scalar max) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: clamp_max.out + tags: pointwise + +- func: clamp_max.Tensor(Tensor self, Tensor max) -> Tensor + variants: function, method + structured_delegate: clamp_max.Tensor_out + tags: pointwise + +- func: clamp_max_(Tensor(a!) self, Scalar max) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: clamp_max.out + tags: pointwise + +- func: clamp_max_.Tensor(Tensor(a!) self, Tensor max) -> Tensor(a!) + variants: function, method + structured_delegate: clamp_max.Tensor_out + tags: pointwise + +- func: clamp_max.out(Tensor self, Scalar max, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: clamp_max_out + MPS: clamp_max_out_mps + tags: pointwise + +- func: clamp_max.Tensor_out(Tensor self, Tensor max, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: clamp_max_Tensor_out + MPS: clamp_max_Tensor_out_mps + tags: pointwise + +- func: clamp_min(Tensor self, Scalar min) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: clamp_min.out + tags: pointwise + +- func: clamp_min.Tensor(Tensor self, Tensor min) -> Tensor + variants: function, method + structured_delegate: clamp_min.Tensor_out + tags: pointwise + +- func: clamp_min_(Tensor(a!) self, Scalar min) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: clamp_min.out + tags: pointwise + +- func: clamp_min_.Tensor(Tensor(a!) self, Tensor min) -> Tensor(a!) + variants: function, method + structured_delegate: clamp_min.Tensor_out + tags: pointwise + +- func: clamp_min.out(Tensor self, Scalar min, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: clamp_min_out + MPS: clamp_min_out_mps + tags: pointwise + +- func: clamp_min.Tensor_out(Tensor self, Tensor min, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: clamp_min_Tensor_out + MPS: clamp_min_Tensor_out_mps + tags: pointwise + +# clip is an alias for clamp +- func: clip(Tensor self, Scalar? min=None, Scalar? max=None) -> Tensor + cpp_no_default_args: ['min'] + variants: function, method + tags: pointwise + +- func: clip.Tensor(Tensor self, Tensor? min=None, Tensor? max=None) -> Tensor + variants: function, method + tags: pointwise + +- func: clip_(Tensor(a!) self, Scalar? min=None, Scalar? max=None) -> Tensor(a!) + cpp_no_default_args: ['min'] + variants: function, method + tags: pointwise + +- func: clip_.Tensor(Tensor(a!) self, Tensor? min=None, Tensor? max=None) -> Tensor(a!) + variants: function, method + tags: pointwise + +- func: clip.out(Tensor self, Scalar? min=None, Scalar? max=None, *, Tensor(a!) out) -> Tensor(a!) + cpp_no_default_args: ['min'] + tags: pointwise + +- func: clip.Tensor_out(Tensor self, Tensor? min=None, Tensor? max=None, *, Tensor(a!) out) -> Tensor(a!) + +- func: cudnn_is_acceptable(Tensor self) -> bool + device_check: NoCheck + device_guard: False + +- func: complex(Tensor real, Tensor imag) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: complex + +- func: complex.out(Tensor real, Tensor imag, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: complex_out + MPS: complex_out_mps + +- func: polar(Tensor abs, Tensor angle) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: polar + +- func: polar.out(Tensor abs, Tensor angle, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: polar_out + MPS: polar_out_mps + +- func: constant_pad_nd(Tensor self, SymInt[] pad, Scalar value=0) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: constant_pad_nd + MPS: constant_pad_nd_mps + autogen: constant_pad_nd.out + tags: core + +- func: contiguous(Tensor(a) self, *, MemoryFormat memory_format=contiguous_format) -> Tensor(a) + variants: method + manual_cpp_binding: True + +- func: convolution(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups) -> Tensor + dispatch: + CompositeExplicitAutograd: convolution + autogen: convolution.out + tags: core + +- func: convolution_backward(Tensor grad_output, Tensor input, Tensor weight, SymInt[]? bias_sizes, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + dispatch: + CompositeExplicitAutograd, CUDA: convolution_backward + autogen: convolution_backward.out + tags: core + +- func: convolution_overrideable(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups) -> Tensor + dispatch: + CompositeExplicitAutograd: convolution_overrideable + autogen: convolution_overrideable.out + +- func: convolution_backward_overrideable(Tensor grad_output, Tensor input, Tensor weight, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) + dispatch: + CompositeExplicitAutograd: convolution_backward_overrideable + autogen: convolution_backward_overrideable.out + +- func: _convolution(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups, bool benchmark, bool deterministic, bool cudnn_enabled, bool allow_tf32) -> Tensor + dispatch: + CompositeExplicitAutograd: _convolution + autogen: _convolution.out + +- func: _convolution.deprecated(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, int[] output_padding, SymInt groups, bool benchmark, bool deterministic, bool cudnn_enabled) -> Tensor + +- func: _convolution_mode(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, str padding, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + CompositeImplicitAutograd: _convolution_mode_symint + +- func: _convolution_double_backward(Tensor? ggI, Tensor? ggW, Tensor? ggb, Tensor gO, Tensor weight, Tensor self, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + +- func: conv1d(Tensor input, Tensor weight, Tensor? bias=None, SymInt[1] stride=1, SymInt[1] padding=0, SymInt[1] dilation=1, SymInt groups=1) -> Tensor + dispatch: + CompositeImplicitAutograd: conv1d_symint + +- func: conv2d(Tensor input, Tensor weight, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, SymInt[2] dilation=1, SymInt groups=1) -> Tensor + dispatch: + CompositeImplicitAutograd: conv2d_symint + +- func: conv3d(Tensor input, Tensor weight, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] dilation=1, SymInt groups=1) -> Tensor + dispatch: + CompositeImplicitAutograd: conv3d_symint + +- func: conv1d.padding(Tensor input, Tensor weight, Tensor? bias=None, SymInt[1] stride=1, str padding="valid", SymInt[1] dilation=1, SymInt groups=1) -> Tensor + cpp_no_default_args: ['bias', 'stride', 'padding'] + dispatch: + CompositeImplicitAutograd: conv1d_padding_symint + +- func: conv2d.padding(Tensor input, Tensor weight, Tensor? bias=None, SymInt[2] stride=1, str padding="valid", SymInt[2] dilation=1, SymInt groups=1) -> Tensor + cpp_no_default_args: ['bias', 'stride', 'padding'] + dispatch: + CompositeImplicitAutograd: conv2d_padding_symint + +- func: conv3d.padding(Tensor input, Tensor weight, Tensor? bias=None, SymInt[3] stride=1, str padding="valid", SymInt[3] dilation=1, SymInt groups=1) -> Tensor + cpp_no_default_args: ['bias', 'stride', 'padding'] + dispatch: + CompositeImplicitAutograd: conv3d_padding_symint + +- func: conv_tbc(Tensor self, Tensor weight, Tensor bias, int pad=0) -> Tensor + dispatch: + CompositeExplicitAutograd: conv_tbc + autogen: conv_tbc.out + +- func: conv_tbc_backward(Tensor self, Tensor input, Tensor weight, Tensor bias, int pad) -> (Tensor, Tensor, Tensor) + +# NB: we inherit the goofy argument order from PyTorch torch.nn.functional +- func: conv_transpose1d(Tensor input, Tensor weight, Tensor? bias=None, SymInt[1] stride=1, SymInt[1] padding=0, SymInt[1] output_padding=0, SymInt groups=1, SymInt[1] dilation=1) -> Tensor + dispatch: + CompositeImplicitAutograd: conv_transpose1d_symint + +- func: conv_transpose2d.input(Tensor input, Tensor weight, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, SymInt[2] output_padding=0, SymInt groups=1, SymInt[2] dilation=1) -> Tensor + dispatch: + CompositeImplicitAutograd: conv_transpose2d_symint + +- func: conv_transpose3d.input(Tensor input, Tensor weight, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] output_padding=0, SymInt groups=1, SymInt[3] dilation=1) -> Tensor + dispatch: + CompositeImplicitAutograd: conv_transpose3d_symint + +- func: copy(Tensor self, Tensor src, bool non_blocking=False) -> Tensor + variants: function + dispatch: + Meta: copy_meta + CompositeExplicitAutogradNonFunctional: copy + tags: core + +- func: copy_(Tensor(a!) self, Tensor src, bool non_blocking=False) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + MkldnnCPU: copy_mkldnn_ + SparseCPU, SparseCUDA: copy_sparse_wrapper_ + CompositeExplicitAutograd: copy_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: copy_sparse_compressed_ + NestedTensorCPU, NestedTensorCUDA: copy_nested_ + autogen: copy.out + +- func: _copy_from(Tensor self, Tensor dst, bool non_blocking=False) -> Tensor + dispatch: + MPS: _copy_from_mps + autogen: _copy_from.out + +# We need this to be able to properly copy from a CPU to an XLA tensor with different sizes. +# See https://github.com/pytorch/xla/issues/2881 +- func: _copy_from_and_resize(Tensor self, Tensor dst) -> Tensor + dispatch: + MPS: _copy_from_and_resize_mps + autogen: _copy_from_and_resize.out + +- func: cos(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: cos.out + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_cos + tags: [core, pointwise] + +- func: cos_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: cos.out + tags: pointwise + +- func: cos.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: cos_out + MPS: cos_out_mps + tags: pointwise + +- func: cosh(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: cosh.out + tags: [core, pointwise] + +- func: cosh_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: cosh.out + tags: pointwise + +- func: cosh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: cosh_out + MPS: cosh_out_mps + tags: pointwise + +- func: cosine_embedding_loss(Tensor input1, Tensor input2, Tensor target, float margin=0.0, int reduction=Mean) -> Tensor + +- func: count_nonzero.dim_IntList(Tensor self, int[] dim) -> Tensor + variants: function, method + dispatch: + CPU: count_nonzero_cpu + CUDA: count_nonzero_cuda + MPS: count_nonzero_mps + autogen: count_nonzero.dim_IntList_out + +- func: count_nonzero(Tensor self, int? dim=None) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: count_nonzero + autogen: count_nonzero.out + +- func: cov(Tensor self, *, int correction=1, Tensor? fweights=None, Tensor? aweights=None) -> Tensor + variants: function, method + +- func: corrcoef(Tensor self) -> Tensor + variants: function, method + +- func: cudnn_affine_grid_generator(Tensor theta, int N, int C, int H, int W) -> Tensor grid + dispatch: + CUDA: cudnn_affine_grid_generator_forward + autogen: cudnn_affine_grid_generator.out + +# TODO: Why do I have to call this grad?! +- func: cudnn_affine_grid_generator_backward(Tensor grad, int N, int C, int H, int W) -> Tensor grad_theta + dispatch: + CUDA: cudnn_affine_grid_generator_backward + autogen: cudnn_affine_grid_generator_backward.out + +- func: cudnn_batch_norm(Tensor input, Tensor weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float exponential_average_factor, float epsilon) -> (Tensor, Tensor, Tensor, Tensor) + dispatch: + CUDA: cudnn_batch_norm + autogen: cudnn_batch_norm.out + +# NB: You can only use this if you used cudnn_batch_norm training=True +- func: cudnn_batch_norm_backward(Tensor input, Tensor grad_output, Tensor weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var, float epsilon, Tensor reserveSpace) -> (Tensor, Tensor, Tensor) + dispatch: + CUDA: cudnn_batch_norm_backward + autogen: cudnn_batch_norm_backward.out + +- func: cudnn_convolution(Tensor self, Tensor weight, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic, bool allow_tf32) -> Tensor + dispatch: + CUDA: cudnn_convolution + +- func: cudnn_convolution.out(Tensor self, Tensor weight, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic, bool allow_tf32, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CUDA: cudnn_convolution_out + +- func: cudnn_convolution_transpose(Tensor self, Tensor weight, SymInt[] padding, SymInt[] output_padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic, bool allow_tf32) -> Tensor + dispatch: + CUDA: cudnn_convolution_transpose + autogen: cudnn_convolution_transpose.out + +- func: _mps_convolution_transpose(Tensor self, Tensor weight, SymInt[] padding, SymInt[] output_padding, SymInt[] stride, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + MPS: _mps_convolution_transpose + autogen: _mps_convolution_transpose.out + +- func: mps_convolution_transpose_backward(Tensor self, Tensor grad_output, Tensor weight, SymInt[] padding, SymInt[] output_padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool[2] output_mask) -> (Tensor, Tensor) + dispatch: + MPS: mps_convolution_transpose_backward + autogen: mps_convolution_transpose_backward.out + +- func: cudnn_convolution_relu(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + CUDA: cudnn_convolution_relu + autogen: cudnn_convolution_relu.out + +- func: cudnn_convolution_add_relu(Tensor self, Tensor weight, Tensor z, Scalar? alpha, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + CUDA: cudnn_convolution_add_relu + autogen: cudnn_convolution_add_relu.out + +# NB: input is special cased in a way I don't quite understand +- func: cudnn_grid_sampler(Tensor self, Tensor grid) -> Tensor output + dispatch: + CUDA: cudnn_grid_sampler_forward + autogen: cudnn_grid_sampler.out + +- func: cudnn_grid_sampler_backward(Tensor self, Tensor grid, Tensor grad_output) -> (Tensor grad_self, Tensor grad_grid) + dispatch: + CUDA: cudnn_grid_sampler_backward + autogen: cudnn_grid_sampler_backward.out + +- func: cummax(Tensor self, int dim) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: cummax + +- func: cummax.out(Tensor self, int dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + dispatch: + CompositeExplicitAutograd: cummax_out + +- func: cummax.dimname(Tensor self, Dimname dim) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + variants: function, method + +- func: cummax.dimname_out(Tensor self, Dimname dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + +- func: _cummax_helper(Tensor self, Tensor(a!) values, Tensor(b!) indices, int dim) -> () + variants: function + dispatch: + CPU: cummax_helper_cpu + CUDA: cummax_helper_cuda + +- func: cummin(Tensor self, int dim) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: cummin + +- func: cummin.out(Tensor self, int dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + dispatch: + CompositeExplicitAutograd: cummin_out + +- func: cummin.dimname(Tensor self, Dimname dim) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + variants: function, method + +- func: cummin.dimname_out(Tensor self, Dimname dim, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + +- func: _cummin_helper(Tensor self, Tensor(a!) values, Tensor(b!) indices, int dim) -> () + variants: function + dispatch: + CPU: cummin_helper_cpu + CUDA: cummin_helper_cuda + +- func: cummaxmin_backward(Tensor grad, Tensor input, Tensor indices, int dim) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + +- func: cumprod(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor + structured_delegate: cumprod.out + device_check: NoCheck # TensorIterator + variants: function, method + +- func: cumprod_(Tensor(a!) self, int dim, *, ScalarType? dtype=None) -> Tensor(a!) + structured_delegate: cumprod.out + variants: method + +- func: cumprod.out(Tensor self, int dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + structured: True + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: cumprod_out + MPS: cumprod_out_mps + +- func: cumprod.dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: cumprod_.dimname(Tensor(a!) self, Dimname dim, *, ScalarType? dtype=None) -> Tensor(a!) + variants: method + +- func: cumprod.dimname_out(Tensor self, Dimname dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: cumprod_backward(Tensor grad, Tensor input, int dim, Tensor output) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + +- func: cumsum(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor + structured_delegate: cumsum.out + device_check: NoCheck # TensorIterator + variants: function, method + tags: core + +- func: cumsum_(Tensor(a!) self, int dim, *, ScalarType? dtype=None) -> Tensor(a!) + structured_delegate: cumsum.out + variants: method + +- func: cumsum.out(Tensor self, int dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + structured: True + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: cumsum_out + MPS: cumsum_out_mps + +- func: cumsum.dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: cumsum_.dimname(Tensor(a!) self, Dimname dim, *, ScalarType? dtype=None) -> Tensor(a!) + variants: method + +- func: cumsum.dimname_out(Tensor self, Dimname dim, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: cumulative_trapezoid.x(Tensor y, Tensor x, *, int dim=-1) -> Tensor + +- func: cumulative_trapezoid.dx(Tensor y, *, Scalar dx=1, int dim=-1) -> Tensor + +- func: ctc_loss.IntList(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank=0, int reduction=Mean, bool zero_infinity=False) -> Tensor + +# convenience function that converts to intlists for you +- func: ctc_loss.Tensor(Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, int blank=0, int reduction=Mean, bool zero_infinity=False) -> Tensor + +- func: _ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank=0, bool zero_infinity=False) -> (Tensor, Tensor) + dispatch: + CPU: ctc_loss_cpu + CUDA: ctc_loss_gpu + Meta: ctc_loss_meta + autogen: _ctc_loss.out + tags: dynamic_output_shape # the shape of second output is data dependent + +- func: _ctc_loss.Tensor(Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, int blank=0, bool zero_infinity=False) -> (Tensor, Tensor) + dispatch: + CPU, CUDA: ctc_loss_tensor + autogen: _ctc_loss.Tensor_out + tags: dynamic_output_shape # the shape of second output is data dependent + +- func: _ctc_loss_backward(Tensor grad, Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, Tensor neg_log_likelihood, Tensor log_alpha, int blank, bool zero_infinity=False) -> Tensor + dispatch: + CPU: ctc_loss_backward_cpu + CUDA: ctc_loss_backward_gpu + autogen: _ctc_loss_backward.out + +- func: _ctc_loss_backward.Tensor(Tensor grad, Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, Tensor neg_log_likelihood, Tensor log_alpha, int blank, bool zero_infinity=False) -> Tensor + dispatch: + CPU, CUDA: ctc_loss_backward_tensor + +- func: diag_embed(Tensor self, int offset=0, int dim1=-2, int dim2=-1) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutogradNonFunctional: diag_embed + autogen: diag_embed.out + +- func: diagflat(Tensor self, int offset=0) -> Tensor + variants: function, method + +- func: diagonal(Tensor(a) self, int offset=0, int dim1=0, int dim2=1) -> Tensor(a) + variants: function, method + dispatch: + CompositeExplicitAutograd: diagonal + tags: core + +- func: linalg_diagonal(Tensor(a) A, *, int offset=0, int dim1=-2, int dim2=-1) -> Tensor(a) + python_module: linalg + variants: function + +- func: diagonal.Dimname(Tensor(a) self, *, Dimname outdim, Dimname dim1, Dimname dim2, int offset=0) -> Tensor(a) + variants: function, method + +- func: diagonal_backward(Tensor grad_output, SymInt[] input_sizes, int offset, int dim1, int dim2) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: diagonal_backward_symint + autogen: diagonal_backward.out + +- func: fill_diagonal_(Tensor(a!) self, Scalar fill_value, bool wrap=False) -> Tensor(a!) + variants: method + +- func: diff(Tensor self, int n=1, int dim=-1, Tensor? prepend=None, Tensor? append=None) -> Tensor + variants: function, method + +- func: diff.out(Tensor self, int n=1, int dim=-1, Tensor? prepend=None, Tensor? append=None, *, Tensor(a!) out) -> Tensor(a!) + variants: function + +- func: gradient.scalarint(Tensor self, *, Scalar? spacing=None, int? dim=None, int edge_order=1) -> Tensor[] + variants: function + +- func: gradient.scalararray(Tensor self, *, Scalar spacing, int[] dim, int edge_order=1) -> Tensor[] + variants: function + +- func: gradient.array(Tensor self, *, int[] dim, int edge_order=1) -> Tensor[] + variants: function + +- func: gradient.scalarrayint(Tensor self, *, Scalar[] spacing, int? dim=None, int edge_order=1) -> Tensor[] + variants: function + +- func: gradient.scalarrayarray(Tensor self, *, Scalar[] spacing, int[] dim, int edge_order=1) -> Tensor[] + variants: function + +- func: gradient.tensorarrayint(Tensor self, *, Tensor[] spacing, int? dim=None, int edge_order=1) -> Tensor[] + variants: function + +- func: gradient.tensorarray(Tensor self, *, Tensor[] spacing, int[] dim, int edge_order=1) -> Tensor[] + variants: function + +- func: div.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: div.out + dispatch: + SparseCPU, SparseCUDA: div_sparse + ZeroTensor: div_zerotensor + NestedTensorCPU, NestedTensorCUDA: NestedTensor_div_Tensor + tags: [core, pointwise] + +- func: div_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: div.out + dispatch: + SparseCPU, SparseCUDA: div_sparse_ + tags: pointwise + +- func: div.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: div_out + MPS: div_out_mps + SparseCPU, SparseCUDA: div_out_sparse_zerodim + tags: pointwise + +- func: div.Tensor_mode(Tensor self, Tensor other, *, str? rounding_mode) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: div.out_mode + dispatch: + SparseCPU, SparseCUDA: div_sparse + tags: [core, pointwise] + +- func: div_.Tensor_mode(Tensor(a!) self, Tensor other, *, str? rounding_mode) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: div.out_mode + dispatch: + SparseCPU, SparseCUDA: div_sparse_ + tags: pointwise + +- func: div.out_mode(Tensor self, Tensor other, *, str? rounding_mode, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: div_out_mode + MPS: div_out_mode_mps + SparseCPU, SparseCUDA: div_out_sparse_zerodim + tags: pointwise + +# For C++ only, until we have conversion from C++ numbers to Tensor +- func: div.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: div + NestedTensorCPU, NestedTensorCUDA: NestedTensor_div_Scalar + tags: [core, pointwise] + +- func: div_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: div_ + autogen: div.Scalar_out + tags: pointwise + +- func: div.Scalar_mode(Tensor self, Scalar other, *, str? rounding_mode) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: div + tags: [core, pointwise] + +- func: div_.Scalar_mode(Tensor(a!) self, Scalar other, *, str? rounding_mode) -> Tensor(a!) + variants: method + dispatch: + CompositeExplicitAutograd: div_ + autogen: div.Scalar_mode_out + tags: pointwise + +# divide, alias for div +- func: divide.Tensor(Tensor self, Tensor other) -> Tensor + variants: function, method + +- func: divide_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: divide.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: divide.Scalar(Tensor self, Scalar other) -> Tensor + variants: function, method + +- func: divide_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: divide.Tensor_mode(Tensor self, Tensor other, *, str? rounding_mode) -> Tensor + variants: function, method + +- func: divide_.Tensor_mode(Tensor(a!) self, Tensor other, *, str? rounding_mode) -> Tensor(a!) + variants: method + +- func: divide.out_mode(Tensor self, Tensor other, *, str? rounding_mode, Tensor(a!) out) -> Tensor(a!) + +- func: divide.Scalar_mode(Tensor self, Scalar other, *, str? rounding_mode) -> Tensor + variants: function, method + +- func: divide_.Scalar_mode(Tensor(a!) self, Scalar other, *, str? rounding_mode) -> Tensor(a!) + variants: method + + # true_divide, an alias for div +- func: true_divide.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + tags: pointwise + +- func: true_divide_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: true_divide.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: true_divide.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: true_divide_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: dot(Tensor self, Tensor tensor) -> Tensor + variants: function, method + dispatch: + CPU: dot + CUDA: dot_cuda + MPS: dot_mps + +- func: dot.out(Tensor self, Tensor tensor, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: dot_out + +- func: vdot(Tensor self, Tensor other) -> Tensor + variants: function, method + dispatch: + CPU: vdot + CUDA: vdot_cuda + +- func: vdot.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: vdot_out + +- func: einsum(str equation, Tensor[] tensors, *, int[]? path=None) -> Tensor + +- func: embedding(Tensor weight, Tensor indices, SymInt padding_idx=-1, bool scale_grad_by_freq=False, bool sparse=False) -> Tensor + dispatch: + CompositeExplicitAutograd: embedding_symint + NestedTensorCPU, NestedTensorCUDA: NestedTensor_embedding + autogen: embedding.out + tags: core + +- func: embedding_backward(Tensor grad, Tensor indices, SymInt num_weights, SymInt padding_idx, bool scale_grad_by_freq, bool sparse) -> Tensor + dispatch: + CompositeImplicitAutograd: embedding_backward_symint + +- func: embedding_dense_backward(Tensor grad_output, Tensor indices, SymInt num_weights, SymInt padding_idx, bool scale_grad_by_freq) -> Tensor + dispatch: + CPU: embedding_dense_backward_cpu + CUDA: embedding_dense_backward_cuda + MPS: embedding_dense_backward_mps + autogen: embedding_dense_backward.out + tags: core + +- func: embedding_renorm_(Tensor(a!) self, Tensor indices, float max_norm, float norm_type) -> Tensor(a!) + dispatch: + CPU: embedding_renorm_cpu_ + CUDA: embedding_renorm_cuda_ + autogen: embedding_renorm, embedding_renorm.out + +- func: embedding_sparse_backward(Tensor grad, Tensor indices, int num_weights, int padding_idx, bool scale_grad_by_freq) -> Tensor + +# NOTE [ embedding_bag Native Functions ] +# The `_embedding_bag.*` variants assume that input tensors except for `weight`, +# e.g. `indices` and `offsets` (and `offset2bag`), are contiguous. +# We really only need to enforce this for `_embedding_bag` (the forward) because +# the backward inputs are the same as forward ones. +# The above `embedding_bag` wrapper is created to achieve this, e.g., +# applying indices = indices.contiguous(). +# The backward functions apply a check that these input tensors are contiguous. + + +- func: _embedding_bag_forward_only(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None, bool include_last_offset=False, int padding_idx=-1) -> (Tensor, Tensor, Tensor, Tensor) + dispatch: + CPU: _embedding_bag_forward_only_cpu + CUDA: _embedding_bag_forward_only_cuda + autogen: _embedding_bag_forward_only.out + +- func: _rowwise_prune(Tensor weight, Tensor mask, ScalarType compressed_indices_dtype) -> (Tensor, Tensor) + +# row_stack is the alias of vstack +- func: row_stack(Tensor[] tensors) -> Tensor + +- func: row_stack.out(Tensor[] tensors, *, Tensor(a!) out) -> Tensor(a!) + +- func: embedding_bag(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None, bool include_last_offset=False) -> (Tensor, Tensor, Tensor, Tensor) + +# To keep backward and forward compatibility, and to avoid ambiguity with the +# original signature above, scale_grad_by_freq, mode, sparse, +# per_sample_weights, and include_last_offset parameters do not have default +# values. Once the original signature is removed, default values can be added. +- func: embedding_bag.padding_idx(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq, int mode, bool sparse, Tensor? per_sample_weights, bool include_last_offset, int? padding_idx) -> (Tensor, Tensor, Tensor, Tensor) + +- func: _embedding_bag(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None, bool include_last_offset=False, int padding_idx=-1) -> (Tensor, Tensor, Tensor, Tensor) + dispatch: + CPU: _embedding_bag_cpu + CUDA: _embedding_bag_cuda + autogen: _embedding_bag.out + tags: core + +- func: _embedding_bag_backward(Tensor grad, Tensor indices, Tensor offsets, Tensor offset2bag, Tensor bag_size, Tensor maximum_indices, SymInt num_weights, bool scale_grad_by_freq, int mode, bool sparse, Tensor? per_sample_weights, int padding_idx=-1) -> Tensor + dispatch: + CPU, CUDA: _embedding_bag_backward_symint + +- func: _embedding_bag_sparse_backward(Tensor grad, Tensor indices, Tensor offsets, Tensor offset2bag, Tensor bag_size, SymInt num_weights, bool scale_grad_by_freq, int mode, Tensor? per_sample_weights, int padding_idx=-1) -> Tensor + dispatch: + CompositeImplicitAutograd: _embedding_bag_sparse_backward_symint + +- func: _embedding_bag_dense_backward(Tensor grad, Tensor indices, Tensor offset2bag, Tensor bag_size, Tensor maximum_indices, SymInt num_weights, bool scale_grad_by_freq, int mode, Tensor? per_sample_weights, int padding_idx=-1) -> Tensor + dispatch: + CPU: _embedding_bag_dense_backward_cpu + CUDA: _embedding_bag_dense_backward_cuda + autogen: _embedding_bag_dense_backward.out + +- func: _embedding_bag_per_sample_weights_backward(Tensor grad, Tensor weight, Tensor indices, Tensor offsets, Tensor offset2bag, int mode, int padding_idx=-1) -> Tensor + dispatch: + CPU: _embedding_bag_per_sample_weights_backward_cpu + CUDA: _embedding_bag_per_sample_weights_backward_cuda + autogen: _embedding_bag_per_sample_weights_backward.out + +- func: empty.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: empty_names + autogen: empty.names_out + +- func: empty.memory_format(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + dispatch: + CPU: empty_cpu + CUDA: empty_cuda + MPS: empty_mps + Meta: empty_meta_symint + MkldnnCPU: empty_mkldnn + SparseCPU, SparseCUDA: empty_sparse + SparseMeta: empty_sparse_symint + SparseCsrCPU, SparseCsrCUDA: empty_sparse_compressed + SparseCsrMeta: empty_sparse_compressed_symint + QuantizedCPU, QuantizedCUDA, QuantizedMeta: empty_unknown_quantized + tags: core + +- func: empty_permuted(SymInt[] size, int[] physical_layout, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: empty_permuted_symint + autogen: empty_permuted.out + +# We do not make new_empty a composite that calls into new_empty_strided, as the strided version +# is significantly more difficult to implement by different backends +- func: new_empty(Tensor self, SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + variants: method + dispatch: + CompositeExplicitAutograd: new_empty_symint + autogen: new_empty.out + +- func: new_empty_strided(Tensor self, SymInt[] size, SymInt[] stride, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + variants: method + dispatch: + CompositeExplicitAutogradNonFunctional: new_empty_strided_symint + autogen: new_empty_strided.out + +- func: new_full(Tensor self, SymInt[] size, Scalar fill_value, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + variants: method + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: new_full + autogen: new_full.out + +- func: new_zeros(Tensor self, SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + variants: method + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: new_zeros + autogen: new_zeros.out + +- func: new_ones(Tensor self, SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + variants: method + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: new_ones + autogen: new_ones.out + +# other overrides are to provide a more helpful error message that dtype is required +- func: _empty_affine_quantized(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, float scale=1, int zero_point=0, MemoryFormat? memory_format=contiguous_format) -> Tensor + dispatch: + CPU: empty_affine_quantized_other_backends_stub + QuantizedCPU, QuantizedCUDA: empty_affine_quantized + autogen: _empty_affine_quantized.out + +# it's a factory function receiving a tensor argument, thus overriding explicitly +# other overrides are to provide a more helpful error message that dtype is required +- func: _empty_per_channel_affine_quantized(SymInt[] size, *, Tensor scales, Tensor zero_points, int axis, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=contiguous_format) -> Tensor + category_override: factory + dispatch: + CPU: empty_per_channel_affine_quantized_other_backends_stub + QuantizedCPU, QuantizedCUDA: empty_per_channel_affine_quantized + autogen: _empty_per_channel_affine_quantized.out + +- func: resize_(Tensor(a!) self, SymInt[] size, *, MemoryFormat? memory_format=None) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + variants: method + device_check: NoCheck + device_guard: False + tags: [core, inplace_view] + dispatch: + Meta: resize__symint + CPU: resize_ + CUDA: resize_cuda_ + MPS: resize_mps_ + QuantizedCPU: quantized_resize_cpu_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: resize_sparse_csr_ + autogen: resize, resize.out + +# This is a utility function to enable users to resize out tensor while registering kernels for out variants. +# Eventually, we can consider exposing `resize_output` as a public API to ship it with python op registration +# to make it easy to register out variants for ops. +- func: _resize_output_(Tensor(a!) self, SymInt[] size, Device device) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + variants: function + dispatch: + Meta: _resize_output_ + autogen: _resize_output, _resize_output.out + +- func: empty_quantized(int[] size, Tensor qtensor, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + category_override: factory + variants: function + dispatch: + QuantizedCPU, QuantizedCUDA: empty_quantized + autogen: empty_quantized.out + +- func: empty.out(SymInt[] size, *, MemoryFormat? memory_format=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + device_guard: False + +- func: empty_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: empty_like + QuantizedCPU, QuantizedCUDA: empty_like_quantized + SparseCPU, SparseCUDA, SparseMeta: empty_like_sparse_coo + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: empty_like_sparse_csr + NestedTensorCPU, NestedTensorCUDA: empty_like_nested + autogen: empty_like.out + +- func: empty_strided(SymInt[] size, SymInt[] stride, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CPU: empty_strided_cpu + CUDA: empty_strided_cuda + MPS: empty_strided_mps + Meta: empty_strided_meta_symint + QuantizedCPU, QuantizedCUDA: empty_strided_unknown_quantized + autogen: empty_strided.out + tags: core + +- func: erf(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: erf.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: erf_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: erf_sparse_csr + tags: [core, pointwise] + +- func: erf_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: erf.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: erf_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: erf_sparse_csr_ + tags: pointwise + +- func: erf.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: erf_out + MPS: erf_out_mps + SparseCPU, SparseCUDA: erf_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: erf_sparse_csr_out + tags: pointwise + +- func: erfc(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: erfc.out + variants: function, method + tags: pointwise + +- func: erfc_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: erfc.out + variants: function, method + tags: pointwise + +- func: erfc.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: erfc_out + tags: pointwise + +- func: exp(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: exp.out + variants: function, method + tags: [core, pointwise] + +- func: exp_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: exp.out + variants: function, method + tags: pointwise + +- func: exp.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: exp_out + MPS: exp_out_mps + tags: pointwise + +- func: exp2(Tensor self) -> Tensor + structured_delegate: exp2.out + variants: function, method + tags: pointwise + +- func: exp2_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: exp2.out + variants: function, method + tags: pointwise + +- func: exp2.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: exp2_out + MPS: exp2_out_mps + tags: pointwise + +- func: expm1(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: expm1.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: expm1_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: expm1_sparse_csr + tags: [core, pointwise] + +- func: expm1_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: expm1.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: expm1_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: expm1_sparse_csr_ + tags: pointwise + +- func: expm1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: expm1_out + MPS: expm1_out_mps + SparseCPU, SparseCUDA: expm1_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: expm1_sparse_csr_out + tags: pointwise + +- func: expand(Tensor(a) self, SymInt[] size, *, bool implicit=False) -> Tensor(a) + variants: method # This is method-only to match the previous tensor API. In the future we could make this a function too. + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: expand + tags: core + +- func: expand_as(Tensor(a) self, Tensor other) -> Tensor(a) + variants: method # This is method-only to match the previous tensor API. In the future we could make this a function too. + device_check: NoCheck + device_guard: False + +# decomposes to eye.m +- func: eye(SymInt n, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: eye + +- func: eye.m(SymInt n, SymInt m, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: eye + +- func: eye.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, Meta: eye_out_cpu + CUDA: eye_out_cuda + MPS: eye_out_mps + +- func: eye.m_out(SymInt n, SymInt m, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, Meta: eye_out_cpu + CUDA: eye_out_cuda + MPS: eye_out_mps + +- func: flatten.using_ints(Tensor(a) self, int start_dim=0, int end_dim=-1) -> Tensor(a) + variants: function, method + +- func: flatten.named_out_dim(Tensor(a) self, int start_dim, int end_dim, Dimname out_dim) -> Tensor(a) + variants: function, method + +- func: flatten.using_names(Tensor(a) self, Dimname start_dim, Dimname end_dim, Dimname out_dim) -> Tensor(a) + variants: function, method + +- func: flatten.DimnameList(Tensor(a) self, Dimname[] dims, Dimname out_dim) -> Tensor(a) + variants: function, method + +- func: unflatten.int(Tensor(a) self, int dim, SymInt[] sizes) -> Tensor(a) + variants: function, method + dispatch: + CompositeImplicitAutograd: unflatten_symint + +- func: unflatten.Dimname(Tensor(a) self, Dimname dim, SymInt[] sizes, Dimname[] names) -> Tensor(a) + variants: function, method + dispatch: + CompositeImplicitAutograd: unflatten_dimname_symint + +- func: fill.Scalar(Tensor self, Scalar value) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: fill + tags: core + +- func: fill.Tensor(Tensor self, Tensor value) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: fill + +- func: fill_.Scalar(Tensor(a!) self, Scalar value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: fill_ + MPS: fill_scalar_mps + QuantizedCPU, QuantizedCUDA: fill_quantized_ + Meta: fill_meta_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: fill_sparse_csr_ + NestedTensorCPU, NestedTensorCUDA: fill_nested_ + autogen: fill.Scalar_out + +- func: fill_.Tensor(Tensor(a!) self, Tensor value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: fill_ + MPS: fill_tensor_mps_ + QuantizedCPU, QuantizedCUDA: fill_quantized_ + Meta: fill_meta_ + NestedTensorCPU, NestedTensorCUDA: fill_nested_ + autogen: fill.Tensor_out + +- func: floor(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: floor.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: floor_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: floor_sparse_csr + tags: [core, pointwise] + +- func: floor_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: floor.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: floor_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: floor_sparse_csr_ + tags: pointwise + +- func: floor.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: floor_out + MPS: floor_out_mps + SparseCPU, SparseCUDA: floor_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: floor_sparse_csr_out + tags: pointwise + +- func: floor_divide(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: floor_divide + MPS: floor_divide_mps + SparseCPU, SparseCUDA: floor_divide_sparse + +- func: floor_divide_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU, CUDA: floor_divide_ + MPS: floor_divide_mps_ + SparseCPU, SparseCUDA: floor_divide_sparse_ + +- func: floor_divide.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: floor_divide_out + MPS: floor_divide_out_mps + SparseCPU, SparseCUDA: floor_divide_out_sparse_zerodim + +- func: floor_divide.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: floor_divide + +- func: floor_divide_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: floor_divide_ + autogen: floor_divide.Scalar_out + +- func: frac(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: frac.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: frac_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: frac_sparse_csr + tags: pointwise + +- func: frac_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: frac.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: frac_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: frac_sparse_csr_ + tags: pointwise + +- func: frac.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: frac_out + MPS: frac_out_mps + SparseCPU, SparseCUDA: frac_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: frac_sparse_csr_out + tags: pointwise + +- func: full.names(int[] size, Scalar fill_value, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: full + autogen: full.names_out + +- func: full(SymInt[] size, Scalar fill_value, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: full + tags: core + +- func: full.out(SymInt[] size, Scalar fill_value, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: full_out + +- func: full_like(Tensor self, Scalar fill_value, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: full_like + autogen: full_like.out + tags: core + +- func: from_file(str filename, bool? shared=None, int? size=0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CPU: from_file + autogen: from_file.out + +- func: gcd.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: gcd_out + tags: pointwise + +- func: gcd(Tensor self, Tensor other) -> Tensor + structured_delegate: gcd.out + variants: function, method + tags: pointwise + +- func: gcd_(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: gcd.out + variants: function, method + +- func: lcm.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: lcm_out + tags: pointwise + +- func: lcm(Tensor self, Tensor other) -> Tensor + structured_delegate: lcm.out + variants: function, method + tags: pointwise + +- func: lcm_(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: lcm.out + variants: function, method + +# NOTE [ grid_sampler Native Functions ] +# `grid_sampler` is _supposed to_ do all the shape checking and then dispatch to +# one of `cudnn_grid_sampler`, `grid_sampler_2d`, or `grid_sampler_3d`, each of +# which has the corresponding backward defined as native functions as well. +# However, we do shape checking everywhere for now since each of the mentioned +# functions can be called directly, which will lead to crashes otherwise. +# See https://github.com/pytorch/pytorch/issues/73187 for more information. +# +# There is also _grid_sampler_2d_backward_cpu_fallback which is an +# implementation detail of grid_sampler_2d and is only exposed here for testing +# purposes. +# +# Additionally, arguments `padding_mode` and `interpolation_mode` are cast to +# enums defined in `native/GridSampler.h`. `cudnn_grid_sampler` doesn't take in +# `interpolation_mode` because it only supports Bilinear interpolation mode. +# Nor does it take in `align_corners` because it only supports the mode +# `align_corners = True`. +- func: grid_sampler(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor + +- func: grid_sampler_2d(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor + dispatch: + CPU, QuantizedCPU: grid_sampler_2d_cpu + CUDA: grid_sampler_2d_cuda + MPS: grid_sampler_2d_mps + autogen: grid_sampler_2d.out + tags: core + +# `grid_sampler_2d_backward` takes in `output_mask` to optimize performance for +# the case where `input` doesn't require gradient. Gradient for `grid` is always +# computed (only `output_mask[0]` is checked by the implementations). +- func: grid_sampler_2d_backward(Tensor grad_output, Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners, bool[2] output_mask) -> (Tensor, Tensor) + dispatch: + CPU: grid_sampler_2d_backward_cpu + CUDA: grid_sampler_2d_backward_cuda + autogen: grid_sampler_2d_backward.out + +# See NOTE [ grid_sample CPU fallback ] +- func: _grid_sampler_2d_cpu_fallback(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor + dispatch: + CompositeExplicitAutograd: _grid_sampler_2d_cpu_fallback + autogen: _grid_sampler_2d_cpu_fallback.out + +- func: _grid_sampler_2d_cpu_fallback_backward(Tensor grad_output, Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> (Tensor, Tensor) + +- func: grid_sampler_3d(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor + dispatch: + CPU: grid_sampler_3d_cpu + CUDA: grid_sampler_3d_cuda + autogen: grid_sampler_3d.out + +# `grid_sampler_3d_backward` takes in `output_mask` to optimize performance for +# the case where `input` doesn't require gradient. Gradient for `grid` is always +# computed (only `output_mask[0]` is checked by the implementations). +- func: grid_sampler_3d_backward(Tensor grad_output, Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners, bool[2] output_mask) -> (Tensor, Tensor) + dispatch: + CPU: grid_sampler_3d_backward_cpu + CUDA: grid_sampler_3d_backward_cuda + autogen: grid_sampler_3d_backward.out + +- func: hann_window(int window_length, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: hann_window + autogen: hann_window.out + +- func: hann_window.periodic(int window_length, bool periodic, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: hann_window + autogen: hann_window.periodic_out + +- func: hamming_window(int window_length, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: hamming_window + autogen: hamming_window.out + +- func: hamming_window.periodic(int window_length, bool periodic, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: hamming_window + autogen: hamming_window.periodic_out + +- func: hamming_window.periodic_alpha(int window_length, bool periodic, float alpha, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: hamming_window + autogen: hamming_window.periodic_alpha_out + +- func: hamming_window.periodic_alpha_beta(int window_length, bool periodic, float alpha, float beta, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: hamming_window + autogen: hamming_window.periodic_alpha_beta_out + +- func: kaiser_window(int window_length, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: kaiser_window + autogen: kaiser_window.out + +- func: kaiser_window.periodic(int window_length, bool periodic, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: kaiser_window + autogen: kaiser_window.periodic_out + +- func: kaiser_window.beta(int window_length, bool periodic, float beta, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: kaiser_window + autogen: kaiser_window.beta_out + +- func: hinge_embedding_loss(Tensor self, Tensor target, float margin=1.0, int reduction=Mean) -> Tensor + +- func: group_norm(Tensor input, int num_groups, Tensor? weight=None, Tensor? bias=None, float eps=1e-05, bool cudnn_enabled=True) -> Tensor + +- func: native_group_norm(Tensor input, Tensor? weight, Tensor? bias, SymInt N, SymInt C, SymInt HxW, int group, float eps) -> (Tensor, Tensor, Tensor) + dispatch: + CPU, CUDA: native_group_norm + CompositeExplicitAutograd: math_group_norm + autogen: native_group_norm.out + tags: core + +- func: native_group_norm_backward(Tensor grad_out, Tensor input, Tensor mean, Tensor rstd, Tensor? weight, SymInt N, SymInt C, SymInt HxW, int group, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + dispatch: + CPU, CUDA: native_group_norm_backward + autogen: native_group_norm_backward.out + tags: core + +# Real to complex forward FFT +- func: _fft_r2c(Tensor self, int[] dim, int normalization, bool onesided) -> Tensor + variants: function + dispatch: + CPU: _fft_r2c_mkl + CUDA: _fft_r2c_cufft + MPS: _fft_r2c_mps + +- func: _fft_r2c.out(Tensor self, int[] dim, int normalization, bool onesided, *, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CPU: _fft_r2c_mkl_out + CUDA: _fft_r2c_cufft_out + MPS: _fft_r2c_mps_out + +# Complex to real inverse FFT +- func: _fft_c2r(Tensor self, int[] dim, int normalization, SymInt last_dim_size) -> Tensor + variants: function + dispatch: + CPU: _fft_c2r_mkl + CUDA: _fft_c2r_cufft + MPS: _fft_c2r_mps + +- func: _fft_c2r.out(Tensor self, int[] dim, int normalization, SymInt last_dim_size, *, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CPU: _fft_c2r_mkl_out + CUDA: _fft_c2r_cufft_out + MPS: _fft_c2r_mps_out + +# Standard complex to complex FFT (forward or backward) +- func: _fft_c2c(Tensor self, SymInt[] dim, int normalization, bool forward) -> Tensor + variants: function + dispatch: + CPU: _fft_c2c_mkl + CUDA: _fft_c2c_cufft + MPS: _fft_c2c_mps + +- func: _fft_c2c.out(Tensor self, SymInt[] dim, int normalization, bool forward, *, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CPU: _fft_c2c_mkl_out + CUDA: _fft_c2c_cufft_out + MPS: _fft_c2c_mps_out + +- func: _validate_compressed_sparse_indices(bool is_crow, Tensor compressed_idx, Tensor plain_idx, int cdim, int dim, int nnz) -> () + device_check: NoCheck + variants: function + dispatch: + CPU: _validate_compressed_sparse_indices_cpu + CUDA: _validate_compressed_sparse_indices_cuda + +- func: _cufft_get_plan_cache_size(DeviceIndex device_index) -> int + +- func: _cufft_get_plan_cache_max_size(DeviceIndex device_index) -> int + +- func: _cufft_set_plan_cache_max_size(DeviceIndex device_index, int max_size) -> () + +- func: _cufft_clear_plan_cache(DeviceIndex device_index) -> () + +- func: index.Tensor(Tensor self, Tensor?[] indices) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: index.Tensor_out + variants: function, method + dispatch: + QuantizedCPU: quantized_index + tags: [core, dynamic_output_shape] + # NB: This function is special-cased in tools/autograd/gen_variable_type.py + # NB: The following functions are declared in aten/src/ATen/templates/TensorBody.h and defined in aten/src/ATen/TensorIndexing.cpp: + # - Tensor Tensor::index(ArrayRef indices) + # - Tensor Tensor::index(std::initializer_list indices) + +- func: index.Tensor_out(Tensor self, Tensor?[] indices, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + structured: True + structured_inherits: TensorIteratorBase + precomputed: + - indices -> DimVector sizes, DimVector strides + dispatch: + CPU, CUDA, MPS: index_out + +# Used by inductor to signal indexing without bounds checks +# Note that we don't support boolean indexing, to avoid dynamic output shapes +- func: _unsafe_index.Tensor(Tensor self, Tensor?[] indices) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _unsafe_index + +# Used by inductor to generate masked loads +# Note that we don't support boolean indexing, to avoid dynamic output shapes +- func: _unsafe_masked_index(Tensor self, Tensor mask, Tensor?[] indices, Scalar fill) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _unsafe_masked_index + +- func: _unsafe_masked_index_put_accumulate(Tensor self, Tensor mask, Tensor?[] indices, Tensor values) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _unsafe_masked_index_put_accumulate + +- func: index_copy.out(Tensor self, int dim, Tensor index, Tensor source, *, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + precomputed: + - dim -> int dim + dispatch: + CPU, CUDA: index_copy_out + +- func: index_copy_(Tensor(a!) self, int dim, Tensor index, Tensor source) -> Tensor(a!) + variants: method + structured_delegate: index_copy.out + +- func: index_copy(Tensor self, int dim, Tensor index, Tensor source) -> Tensor + variants: function, method + structured_delegate: index_copy.out + +- func: index_copy_.dimname(Tensor(a!) self, Dimname dim, Tensor index, Tensor source) -> Tensor(a!) + variants: method + +- func: index_copy.dimname(Tensor self, Dimname dim, Tensor index, Tensor source) -> Tensor + variants: function, method + +- func: index_put_(Tensor(a!) self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor(a!) + device_check: NoCheck # delegate to _index_put_impl_, which leverages TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: index_put_ + autogen: index_put.out + # NB: The following functions are declared in aten/src/ATen/templates/TensorBody.h and defined in aten/src/ATen/TensorIndexing.cpp: + # - Tensor & Tensor::index_put_(ArrayRef indices, Tensor const & rhs) + # - Tensor & Tensor::index_put_(ArrayRef indices, Scalar v) + # - Tensor & Tensor::index_put_(std::initializer_list indices, Tensor const & rhs) + # - Tensor & Tensor::index_put_(std::initializer_list indices, Scalar v) + +- func: index_put(Tensor self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor + device_check: NoCheck # delegate to _index_put_impl_ after clone, which leverages TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: index_put + tags: core + +- func: _unsafe_index_put(Tensor self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor + device_check: NoCheck # delegate to _index_put_impl_ after clone, which leverages TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: _unsafe_index_put + +- func: _index_put_impl_(Tensor(a!) self, Tensor?[] indices, Tensor values, bool accumulate=False, bool unsafe=False) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CPU, CUDA, MPS: _index_put_impl_ + QuantizedCPU: _index_put_impl_quantized_cpu_ + QuantizedCUDA: _index_put_impl_quantized_cuda_ + autogen: _index_put_impl, _index_put_impl.out + +- func: instance_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool use_input_stats, float momentum, float eps, bool cudnn_enabled) -> Tensor + variants: function + +- func: isclose(Tensor self, Tensor other, float rtol=1e-05, float atol=1e-08, bool equal_nan=False) -> Tensor + variants: function, method + +- func: isin.Tensor_Tensor_out(Tensor elements, Tensor test_elements, *, bool assume_unique=False, bool invert=False, Tensor(a!) out) -> Tensor(a!) + variants: function + structured: True + dispatch: + CPU, CUDA: isin_Tensor_Tensor_out + MPS: isin_Tensor_Tensor_out_mps + +- func: isin.Tensor_Tensor(Tensor elements, Tensor test_elements, *, bool assume_unique=False, bool invert=False) -> Tensor + variants: function + structured_delegate: isin.Tensor_Tensor_out + +- func: isin.Tensor_Scalar_out(Tensor elements, Scalar test_element, *, bool assume_unique=False, bool invert=False, Tensor(a!) out) -> Tensor(a!) + variants: function + structured: True + dispatch: + CPU, CUDA: isin_Tensor_Scalar_out + +- func: isin.Tensor_Scalar(Tensor elements, Scalar test_element, *, bool assume_unique=False, bool invert=False) -> Tensor + variants: function + structured_delegate: isin.Tensor_Scalar_out + +- func: isin.Scalar_Tensor_out(Scalar element, Tensor test_elements, *, bool assume_unique=False, bool invert=False, Tensor(a!) out) -> Tensor(a!) + variants: function + structured: True + dispatch: + CPU, CUDA: isin_Scalar_Tensor_out + +- func: isin.Scalar_Tensor(Scalar element, Tensor test_elements, *, bool assume_unique=False, bool invert=False) -> Tensor + variants: function + structured_delegate: isin.Scalar_Tensor_out + +- func: isnan(Tensor self) -> Tensor + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CPU, CUDA, MPS: isnan + NestedTensorCPU, NestedTensorCUDA: NestedTensor_isnan + SparseCPU, SparseCUDA: isnan_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: isnan_sparse_csr + autogen: isnan.out + tags: [core, pointwise] + +- func: is_distributed(Tensor self) -> bool + variants: function, method + device_check: NoCheck + device_guard: False + +- func: is_floating_point(Tensor self) -> bool + variants: function, method + device_check: NoCheck + device_guard: False + manual_cpp_binding: True + +- func: is_complex(Tensor self) -> bool + variants: function, method + device_check: NoCheck + device_guard: False + manual_cpp_binding: True + +- func: is_conj(Tensor self) -> bool + variants: function, method + device_guard: False + manual_cpp_binding: True + +- func: _is_zerotensor(Tensor self) -> bool + variants: function, method + device_guard: False + manual_cpp_binding: True + +- func: is_neg(Tensor self) -> bool + variants: function, method + device_guard: False + manual_cpp_binding: True + +- func: isreal(Tensor self) -> Tensor + variants: function, method + +- func: is_nonzero(Tensor self) -> bool + variants: function, method + device_check: NoCheck + device_guard: False + +- func: is_same_size(Tensor self, Tensor other) -> bool + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + NestedTensorCPU, NestedTensorCUDA: nested_is_same_size + CompositeExplicitAutograd: is_same_size + +- func: is_signed(Tensor self) -> bool + variants: function, method + device_check: NoCheck + device_guard: False + manual_cpp_binding: True + +- func: is_inference(Tensor self) -> bool + variants: function, method + device_check: NoCheck + device_guard: False + manual_cpp_binding: True + +- func: kl_div(Tensor self, Tensor target, int reduction=Mean, *, bool log_target=False) -> Tensor + +- func: kron(Tensor self, Tensor other) -> Tensor + variants: function, method + +- func: kron.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: kthvalue(Tensor self, int k, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + dispatch: + CompositeExplicitAutograd: kthvalue + +- func: kthvalue.values(Tensor self, int k, int dim=-1, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + dispatch: + CPU: kthvalue_out_cpu + CUDA: kthvalue_out_cuda + +- func: kthvalue.dimname(Tensor self, int k, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + +- func: kthvalue.dimname_out(Tensor self, int k, Dimname dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + +- func: layer_norm(Tensor input, SymInt[] normalized_shape, Tensor? weight=None, Tensor? bias=None, float eps=1e-05, bool cudnn_enable=True) -> Tensor + dispatch: + CompositeImplicitAutograd: layer_norm_symint + +- func: native_layer_norm(Tensor input, SymInt[] normalized_shape, Tensor? weight, Tensor? bias, float eps) -> (Tensor, Tensor, Tensor) + dispatch: + CPU: layer_norm_cpu + CUDA: layer_norm_cuda + MPS: layer_norm_mps + CompositeExplicitAutograd: math_native_layer_norm + NestedTensorCPU, NestedTensorCUDA: nested_layer_norm + autogen: native_layer_norm.out + tags: core + +- func: native_layer_norm_backward(Tensor grad_out, Tensor input, SymInt[] normalized_shape, Tensor mean, Tensor rstd, Tensor? weight, Tensor? bias, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + dispatch: + CPU: layer_norm_backward_cpu + CUDA: layer_norm_backward_cuda + MPS: layer_norm_backward_mps + NestedTensorCPU, NestedTensorCUDA: layer_norm_backward_nested + autogen: native_layer_norm_backward.out + tags: core + +- func: rms_norm(Tensor input, SymInt[] normalized_shape, Tensor? weight=None, float? eps=None) -> Tensor + dispatch: + CompositeImplicitAutograd: rms_norm_symint + +- func: nan_to_num(Tensor self, float? nan=None, float? posinf=None, float? neginf=None) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: nan_to_num + SparseCPU, SparseCUDA: nan_to_num_sparse + tags: pointwise + +- func: nan_to_num_(Tensor(a!) self, float? nan=None, float? posinf=None, float? neginf=None) -> Tensor(a!) + variants: function, method + dispatch: + CompositeExplicitAutograd: nan_to_num_ + SparseCPU, SparseCUDA: nan_to_num_sparse_ + tags: pointwise + +- func: nan_to_num.out(Tensor self, float? nan=None, float? posinf=None, float? neginf=None, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: nan_to_num_out + MPS: nan_to_num_out_mps + SparseCPU, SparseCUDA: nan_to_num_sparse_out + tags: pointwise + +- func: linear(Tensor input, Tensor weight, Tensor? bias=None) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: linear + NestedTensorCPU, NestedTensorCUDA: nested_linear + MPS: _mps_linear + +- func: linear_backward(Tensor self, Tensor grad_output, Tensor weight, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + dispatch: + NestedTensorCPU, NestedTensorCUDA: nested_linear_backward + MPS: mps_linear_backward + autogen: linear_backward.out + +- func: linear.out(Tensor input, Tensor weight, Tensor? bias=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CompositeExplicitAutograd: linear_out + +- func: mkldnn_linear(Tensor self, Tensor weight, Tensor? bias=None) -> Tensor + python_module: nn + dispatch: + MkldnnCPU: mkldnn_linear + autogen: mkldnn_linear.out + +- func: mkldnn_linear_backward_input(int[] input_size, Tensor grad_output, Tensor weight) -> Tensor + dispatch: + MkldnnCPU: mkldnn_linear_backward_input + autogen: mkldnn_linear_backward_input.out + +- func: mkldnn_linear_backward_weights(Tensor grad_output, Tensor input, Tensor weight, bool bias_defined) -> (Tensor, Tensor) + dispatch: + MkldnnCPU: mkldnn_linear_backward_weights + autogen: mkldnn_linear_backward_weights.out + +- func: mkldnn_linear_backward(Tensor self, Tensor grad_output, Tensor weight, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + dispatch: + MkldnnCPU: mkldnn_linear_backward + autogen: mkldnn_linear_backward.out + +- func: _cslt_compress(Tensor input) -> Tensor + dispatch: + CUDA: _cslt_compress + +- func: _cslt_sparse_mm(Tensor compressed_A, Tensor dense_B, Tensor? bias=None, Tensor? alpha=None, ScalarType? out_dtype=None, bool transpose_result=False, int alg_id=0, int split_k=1, bool split_k_one_kernel=True) -> Tensor + dispatch: + CUDA: _cslt_sparse_mm + tags: needs_fixed_stride_order + +- func: _cslt_sparse_mm_search(Tensor compressed_A, Tensor dense_B, Tensor? bias=None, Tensor? alpha=None, ScalarType? out_dtype=None, bool transpose_result=False) -> int + dispatch: + CUDA: _cslt_sparse_mm_search + +- func: _sparse_semi_structured_tile(Tensor input, str algorithm="", bool use_cutlass=True) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + dispatch: + CUDA: _sparse_semi_structured_tile + +- func: _sparse_semi_structured_apply(Tensor input, Tensor thread_masks) -> (Tensor, Tensor) + dispatch: + CUDA: _sparse_semi_structured_apply + +- func: _sparse_semi_structured_apply_dense(Tensor input, Tensor thread_masks) -> Tensor + dispatch: + CUDA: _sparse_semi_structured_apply_dense + +# DEPRECATED: Use torch.__sparse_semi_structured_mm/torch._sparse_semi_structured_addmm instead +- func: _sparse_semi_structured_linear(Tensor input, Tensor weight, Tensor meta, *, Tensor? bias=None, str? activation=None, ScalarType? out_dtype=None) -> Tensor + dispatch: + CUDA: _sparse_semi_structured_linear + +- func: _sparse_semi_structured_mm(Tensor mat1, Tensor mat1_meta, Tensor mat2, *, ScalarType? out_dtype=None) -> Tensor + dispatch: + CUDA: _sparse_semi_structured_mm + +- func: _sparse_semi_structured_addmm(Tensor input, Tensor mat1, Tensor mat1_meta, Tensor mat2, *, Scalar alpha=1, Scalar beta=1, ScalarType? out_dtype=None) -> Tensor + dispatch: + CUDA: _sparse_semi_structured_addmm + +- func: _mixed_dtypes_linear(Tensor input, Tensor weight, Tensor scale, *, Tensor? bias=None, str? activation=None) -> Tensor + dispatch: + CUDA: _mixed_dtypes_linear + +- func: fbgemm_linear_int8_weight_fp32_activation(Tensor input, Tensor weight, Tensor packed, Tensor col_offsets, Scalar weight_scale, Scalar weight_zero_point, Tensor bias) -> Tensor + +- func: fbgemm_linear_int8_weight(Tensor input, Tensor weight, Tensor packed, Tensor col_offsets, Scalar weight_scale, Scalar weight_zero_point, Tensor bias) -> Tensor + +- func: fbgemm_linear_quantize_weight(Tensor input) -> (Tensor, Tensor, float, int) + +- func: fbgemm_pack_gemm_matrix_fp16(Tensor input) -> Tensor + +- func: _wrapped_linear_prepack(Tensor weight, Tensor weight_scale, Tensor weight_zero_point, Tensor bias) -> Tensor + +- func: _wrapped_quantized_linear_prepacked(Tensor input, Tensor input_scale, Tensor input_zero_point, Tensor packed_weight, Tensor output_scale, Tensor output_zero_point, int out_channel) -> Tensor + +- func: fbgemm_linear_fp16_weight_fp32_activation(Tensor input, Tensor packed_weight, Tensor bias) -> Tensor + +- func: fbgemm_linear_fp16_weight(Tensor input, Tensor packed_weight, Tensor bias) -> Tensor + +- func: fbgemm_pack_quantized_matrix(Tensor input) -> Tensor + +- func: fbgemm_pack_quantized_matrix.KN(Tensor input, int K, int N) -> Tensor + +- func: ldexp.Tensor(Tensor self, Tensor other) -> Tensor + variants: function, method + +- func: ldexp_(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: function, method + tags: pointwise + +- func: ldexp.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + tags: pointwise + +- func: linspace(Scalar start, Scalar end, int steps, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: linspace + +- func: linspace.Tensor_Tensor(Tensor start, Tensor end, int steps, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + category_override: factory + dispatch: + CompositeExplicitAutograd: linspace + +- func: linspace.Tensor_Scalar(Tensor start, Scalar end, int steps, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + category_override: factory + dispatch: + CompositeExplicitAutograd: linspace + +- func: linspace.Scalar_Tensor(Scalar start, Tensor end, int steps, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + category_override: factory + dispatch: + CompositeExplicitAutograd: linspace + +- func: linspace.out(Scalar start, Scalar end, int steps, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, Meta: linspace_out + CUDA: linspace_cuda_out + MPS: linspace_out_mps + +- func: linspace.Tensor_Tensor_out(Tensor start, Tensor end, int steps, *, Tensor(a!) out) -> Tensor(a!) + category_override: factory + dispatch: + CompositeExplicitAutograd: linspace_out + +- func: linspace.Tensor_Scalar_out(Tensor start, Scalar end, int steps, *, Tensor(a!) out) -> Tensor(a!) + category_override: factory + dispatch: + CompositeExplicitAutograd: linspace_out + +- func: linspace.Scalar_Tensor_out(Scalar start, Tensor end, int steps, *, Tensor(a!) out) -> Tensor(a!) + category_override: factory + dispatch: + CompositeExplicitAutograd: linspace_out + +- func: log(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: log.out + variants: function, method + tags: [core, pointwise] + +- func: log_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: log.out + variants: function, method + tags: pointwise + +- func: log.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: log_out + MPS: log_out_mps + tags: pointwise + +- func: log10(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: log10.out + variants: function, method + tags: [core, pointwise] + +- func: log10_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: log10.out + variants: function, method + tags: pointwise + +- func: log10.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: log10_out + MPS: log10_out_mps + tags: pointwise + +- func: log1p(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: log1p.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: log1p_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: log1p_sparse_csr + tags: [core, pointwise] + +- func: log1p_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: log1p.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: log1p_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: log1p_sparse_csr_ + tags: pointwise + +- func: log1p.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: log1p_out + MPS: log1p_out_mps + SparseCPU, SparseCUDA: log1p_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: log1p_sparse_csr_out + tags: pointwise + +- func: log2(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: log2.out + variants: function, method + tags: [core, pointwise] + +- func: log2_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: log2.out + variants: function, method + tags: pointwise + +- func: log2.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: log2_out + MPS: log2_out_mps + tags: pointwise + +- func: logaddexp.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: logaddexp_out + MPS: logaddexp_out_mps + tags: pointwise + +- func: logaddexp(Tensor self, Tensor other) -> Tensor + variants: method, function + structured_delegate: logaddexp.out + tags: pointwise + +- func: logaddexp2.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: logaddexp2_out + MPS: logaddexp2_out_mps + tags: pointwise + +- func: logaddexp2(Tensor self, Tensor other) -> Tensor + variants: method, function + structured_delegate: logaddexp2.out + tags: pointwise + +- func: xlogy.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: xlogy.OutTensor + variants: function, method + tags: pointwise + +- func: xlogy.Scalar_Self(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: xlogy + tags: pointwise + +- func: xlogy.Scalar_Other(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: xlogy + tags: pointwise + +# xlogy: inplace variant +- func: xlogy_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: xlogy.OutTensor + tags: pointwise + +- func: xlogy_.Scalar_Other(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: xlogy_ + +# xlogy: out variant +- func: xlogy.OutTensor(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + variants: function + dispatch: + CPU, CUDA: xlogy_out + MPS: xlogy_out_mps + tags: pointwise + +- func: xlogy.OutScalar_Self(Scalar self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: xlogy_out + tags: pointwise + +- func: xlogy.OutScalar_Other(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: xlogy_out + tags: pointwise + +- func: logspace(Scalar start, Scalar end, int steps, float base=10.0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: logspace + +- func: logspace.Tensor_Tensor(Tensor start, Tensor end, int steps, float base=10.0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + category_override: factory + dispatch: + CompositeExplicitAutograd: logspace + +- func: logspace.Tensor_Scalar(Tensor start, Scalar end, int steps, float base=10.0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + category_override: factory + dispatch: + CompositeExplicitAutograd: logspace + +- func: logspace.Scalar_Tensor(Scalar start, Tensor end, int steps, float base=10.0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + category_override: factory + dispatch: + CompositeExplicitAutograd: logspace + +- func: logspace.out(Scalar start, Scalar end, int steps, float base=10.0, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, Meta: logspace_out + CUDA: logspace_cuda_out + +- func: logspace.Tensor_Tensor_out(Tensor start, Tensor end, int steps, float base=10.0, *, Tensor(a!) out) -> Tensor(a!) + category_override: factory + dispatch: + CompositeExplicitAutograd: logspace_out + +- func: logspace.Tensor_Scalar_out(Tensor start, Scalar end, int steps, float base=10.0, *, Tensor(a!) out) -> Tensor(a!) + category_override: factory + dispatch: + CompositeExplicitAutograd: logspace_out + +- func: logspace.Scalar_Tensor_out(Scalar start, Tensor end, int steps, float base=10.0, *, Tensor(a!) out) -> Tensor(a!) + category_override: factory + dispatch: + CompositeExplicitAutograd: logspace_out + +# log_softmax allows positional dtype, unlike most operators, because kwonly is BC-breaking when loading jit models. +- func: log_softmax.int(Tensor self, int dim, ScalarType? dtype=None) -> Tensor + variants: function, method + +- func: log_softmax.int_out(Tensor self, int dim, ScalarType? dtype=None, *, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CompositeExplicitAutograd: log_softmax_out + +- func: log_softmax.Dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor + variants: function, method + +- func: _log_softmax(Tensor self, int dim, bool half_to_float) -> Tensor + structured_delegate: _log_softmax.out + tags: core + +- func: _log_softmax.out(Tensor self, int dim, bool half_to_float, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: log_softmax_cpu_out + CUDA: log_softmax_cuda_out + MPS: log_softmax_mps_out + +- func: _log_softmax_backward_data(Tensor grad_output, Tensor output, int dim, ScalarType input_dtype) -> Tensor + structured_delegate: _log_softmax_backward_data.out + +- func: _log_softmax_backward_data.out(Tensor grad_output, Tensor output, int dim, ScalarType input_dtype, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: log_softmax_backward_cpu_out + CUDA: log_softmax_backward_cuda_out + MPS: log_softmax_backward_mps_out + +- func: _logcumsumexp(Tensor self, int dim) -> Tensor + dispatch: + CPU: _logcumsumexp_cpu + CUDA: _logcumsumexp_cuda + +- func: _logcumsumexp.out(Tensor self, int dim, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: _logcumsumexp_out_cpu + CUDA: _logcumsumexp_out_cuda + +- func: logcumsumexp(Tensor self, int dim) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: logcumsumexp + +- func: logcumsumexp.out(Tensor self, int dim, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: logcumsumexp_out + +- func: logcumsumexp.dimname(Tensor self, Dimname dim) -> Tensor + variants: function, method + +- func: logcumsumexp.dimname_out(Tensor self, Dimname dim, *, Tensor(a!) out) -> Tensor(a!) + +- func: logsumexp(Tensor self, int[1] dim, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: logsumexp + +- func: logsumexp.out(Tensor self, int[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + # calls squeeze + CompositeExplicitAutogradNonFunctional: logsumexp_out + +- func: logsumexp.names(Tensor self, Dimname[1] dim, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: logsumexp.names_out(Tensor self, Dimname[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: margin_ranking_loss(Tensor input1, Tensor input2, Tensor target, float margin=0.0, int reduction=Mean) -> Tensor + +- func: matmul(Tensor self, Tensor other) -> Tensor + variants: function, method + dispatch: + CompositeImplicitAutograd: matmul + NestedTensorCPU, NestedTensorCUDA: matmul_nested + +- func: matmul_backward(Tensor grad, Tensor self, Tensor other, bool[2] mask) -> (Tensor, Tensor) + dispatch: + NestedTensorCPU, NestedTensorCUDA: matmul_backward_nested + autogen: matmul_backward.out + +- func: matmul.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeImplicitAutograd: matmul_out + NestedTensorCPU, NestedTensorCUDA: matmul_out_nested + +# Alias to linalg.matrix_power +- func: matrix_power(Tensor self, int n) -> Tensor + variants: function, method + +# Alias to linalg.matrix_power +- func: matrix_power.out(Tensor self, int n, *, Tensor(a!) out) -> Tensor(a!) + +# Alias to linalg.matrix_exp +- func: matrix_exp(Tensor self) -> Tensor + variants: function, method + +# This function should be deprecated in favor of differential_analytic_matrix_function in FunctionsManual.cpp +- func: matrix_exp_backward(Tensor self, Tensor grad) -> Tensor + +# DEPRECATED: Use torch.aminmax instead +- func: _aminmax(Tensor self) -> (Tensor, Tensor) + dispatch: + CPU, CUDA: _aminmax_all + autogen: _aminmax.out + +# DEPRECATED: Use torch.aminmax instead +- func: _aminmax.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor, Tensor) + dispatch: + CPU, CUDA: _aminmax + autogen: _aminmax.dim_out + +- func: aminmax(Tensor self, *, int? dim=None, bool keepdim=False) -> (Tensor min, Tensor max) + device_check: NoCheck # TensorIterator + structured_delegate: aminmax.out + variants: function, method + +- func: aminmax.out(Tensor self, *, int? dim=None, bool keepdim=False, Tensor(a!) min, Tensor(b!) max) -> (Tensor(a!) min, Tensor(b!) max) + device_check: NoCheck # TensorIterator + structured: True + dispatch: + CPU, CUDA: aminmax_out + MPS: aminmax_out_mps + +- func: _compute_linear_combination(Tensor input, Tensor coefficients) -> Tensor + dispatch: + CPU, CUDA: _compute_linear_combination + +- func: _compute_linear_combination.out(Tensor input, Tensor coefficients, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: _compute_linear_combination_out + +- func: max.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + structured_delegate: max.dim_max + variants: function, method + dispatch: + QuantizedCPU, QuantizedCUDA: qmax + tags: core + +- func: max.dim_max(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) max, Tensor(b!) max_values) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + structured: True + precomputed: + - dim -> int dim + dispatch: + CPU, CUDA: max_out + MPS: max_out_mps + +- func: max.names_dim(Tensor self, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + variants: function, method + +- func: max.names_dim_max(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) max, Tensor(b!) max_values) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + +- func: value_selecting_reduction_backward(Tensor grad, int dim, Tensor indices, SymInt[] sizes, bool keepdim) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: value_selecting_reduction_backward_symint + +- func: amax(Tensor self, int[1] dim=[], bool keepdim=False) -> Tensor + variants: function, method + structured_delegate: amax.out + tags: core + +- func: amax.out(Tensor self, int[1] dim=[], bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU, CUDA: amax_out + MPS: amax_out_mps + +# Return: (Tensor output, Tensor indices) +- func: max_pool1d_with_indices(Tensor self, int[1] kernel_size, int[1] stride=[], int[1] padding=0, int[1] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor) + +- func: max_pool1d(Tensor self, int[1] kernel_size, int[1] stride=[], int[1] padding=0, int[1] dilation=1, bool ceil_mode=False) -> Tensor + +- func: max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + CompositeImplicitAutograd: max_pool2d + MPS: mps_max_pool2d + +- func: max_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + MPS: mps_max_pool2d_backward + autogen: max_pool2d_backward.out + +- func: mkldnn_max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + MkldnnCPU: mkldnn_max_pool2d + autogen: mkldnn_max_pool2d.out + +- func: mkldnn_max_pool2d_backward(Tensor grad_output, Tensor output, Tensor input, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + MkldnnCPU: mkldnn_max_pool2d_backward + autogen: mkldnn_max_pool2d_backward.out + +- func: mkldnn_max_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + MkldnnCPU: mkldnn_max_pool3d + autogen: mkldnn_max_pool3d.out + +- func: mkldnn_max_pool3d_backward(Tensor grad_output, Tensor output, Tensor input, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + MkldnnCPU: mkldnn_max_pool3d_backward + autogen: mkldnn_max_pool3d_backward.out + +- func: quantized_max_pool1d(Tensor self, int[1] kernel_size, int[1] stride=[], int[1] padding=0, int[1] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + QuantizedCPU: quantized_max_pool1d + autogen: quantized_max_pool1d.out + +- func: quantized_max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + QuantizedCPU: quantized_max_pool2d + QuantizedCUDA: quantized_max_pool2d_cudnn + autogen: quantized_max_pool2d.out + +- func: quantized_max_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> Tensor + dispatch: + QuantizedCPU: quantized_max_pool3d + autogen: quantized_max_pool3d.out + +- func: max_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> Tensor + +# The CPU and GPU dispatch variants are named weirdly here because otherwise there +# are namespacing issues in C++ +- func: mean(Tensor self, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: mean + tags: core + +# For normal naming convention this should be `mean.out`. However since we already have `mean.out` we have to rename this. +- func: mean.dtype_out(Tensor self, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CompositeExplicitAutograd: mean_dtype_out + +- func: mean.dim(Tensor self, int[1]? dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + structured_delegate: mean.out + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + QuantizedCPU: mean_quantized_cpu + tags: core + +- func: mean.out(Tensor self, int[1]? dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + structured: True + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: mean_out + MPS: mean_out_mps + QuantizedCPU: mean_out_quantized_cpu + +- func: mean.names_dim(Tensor self, Dimname[1] dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: mean.names_out(Tensor self, Dimname[1] dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: nanmean(Tensor self, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # Composite + variants: function, method + +- func: nanmean.out(Tensor self, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # Composite + +- func: median(Tensor self) -> Tensor + variants: function, method + dispatch: + CPU: median_cpu + CUDA: median_cuda + MPS: median_mps + autogen: median.out + +- func: median.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + dispatch: + CompositeExplicitAutograd: median + +- func: median.dim_values(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + dispatch: + CPU: median_out_cpu + CUDA: median_out_cuda + MPS: median_out_mps + +- func: median.names_dim(Tensor self, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + +- func: median.names_dim_values(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + +- func: nanmedian(Tensor self) -> Tensor + variants: function, method + dispatch: + CPU: nanmedian_cpu + CUDA: nanmedian_cuda + autogen: nanmedian.out + +- func: nanmedian.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + dispatch: + CompositeExplicitAutograd: nanmedian + +- func: nanmedian.dim_values(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + dispatch: + CPU: nanmedian_out_cpu + CUDA: nanmedian_out_cuda + +- func: nanmedian.names_dim(Tensor self, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + +- func: nanmedian.names_dim_values(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + +- func: min.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + structured_delegate: min.dim_min + variants: function, method + dispatch: + QuantizedCPU, QuantizedCUDA: qmin + tags: core + +- func: min.dim_min(Tensor self, int dim, bool keepdim=False, *, Tensor(a!) min, Tensor(b!) min_indices) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + structured: True + precomputed: + - dim -> int dim + dispatch: + CPU, CUDA: min_out + MPS: min_out_mps + +- func: min.names_dim(Tensor self, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + variants: function, method + +- func: min.names_dim_min(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) min, Tensor(b!) min_indices) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + +- func: amin(Tensor self, int[1] dim=[], bool keepdim=False) -> Tensor + variants: function, method + structured_delegate: amin.out + tags: core + +- func: amin.out(Tensor self, int[1] dim=[], bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU, CUDA: amin_out + MPS: amin_out_mps + +# TODO: Add this function to MPS dispatch key so that we avoid declaring it in +# native_functions.yaml +# https://github.com/pytorch/pytorch/issues/77394 +- func: _mps_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + MPS: _mps_convolution + autogen: _mps_convolution.out + +- func: mps_convolution_backward(Tensor self, Tensor grad_output, Tensor weight, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + dispatch: + MPS: mps_convolution_backward + autogen: mps_convolution_backward.out + +- func: mkldnn_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + CompositeExplicitAutograd: mkldnn_convolution + autogen: mkldnn_convolution.out + +- func: mkldnn_rnn_layer(Tensor input, Tensor weight0, Tensor weight1, Tensor weight2, Tensor weight3, Tensor hx_, Tensor cx_, bool reverse, int[] batch_sizes, int mode, int hidden_size, int num_layers, bool has_biases, bool bidirectional, bool batch_first, bool train) -> (Tensor, Tensor, Tensor, Tensor) + dispatch: + CPU: mkldnn_rnn_layer + MkldnnCPU: mkldnn_rnn_layer + autogen: mkldnn_rnn_layer.out + +- func: mkldnn_rnn_layer_backward(Tensor input, Tensor weight1, Tensor weight2, Tensor weight3, Tensor weight4, Tensor hx_, Tensor cx_tmp, Tensor output, Tensor hy_, Tensor cy_, Tensor? grad_output, Tensor? grad_hy, Tensor? grad_cy, bool reverse, int mode, int hidden_size, int num_layers, bool has_biases, bool train, bool bidirectional, int[] batch_sizes, bool batch_first, Tensor workspace) -> (Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor) + dispatch: + CPU: mkldnn_rnn_layer_backward + autogen: mkldnn_rnn_layer_backward.out + +- func: miopen_batch_norm(Tensor input, Tensor weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float exponential_average_factor, float epsilon) -> (Tensor, Tensor, Tensor) + dispatch: + CUDA: miopen_batch_norm + autogen: miopen_batch_norm.out + +- func: miopen_batch_norm_backward(Tensor input, Tensor grad_output, Tensor weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var, float epsilon) -> (Tensor, Tensor, Tensor) + dispatch: + CUDA: miopen_batch_norm_backward + autogen: miopen_batch_norm_backward.out + +- func: miopen_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic) -> Tensor + dispatch: + CUDA: miopen_convolution + autogen: miopen_convolution.out + +- func: miopen_convolution_transpose(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] output_padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic) -> Tensor + dispatch: + CUDA: miopen_convolution_transpose + autogen: miopen_convolution_transpose.out + +- func: miopen_depthwise_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic) -> Tensor + dispatch: + CUDA: miopen_depthwise_convolution + autogen: miopen_depthwise_convolution.out + +- func: miopen_convolution_relu(Tensor self, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + CUDA: miopen_convolution_relu + +- func: miopen_convolution_add_relu(Tensor self, Tensor weight, Tensor z, Scalar? alpha, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, SymInt groups) -> Tensor + dispatch: + CUDA: miopen_convolution_add_relu + +- func: miopen_rnn(Tensor input, Tensor[] weight, int weight_stride0, Tensor hx, Tensor? cx, int mode, int hidden_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, int[] batch_sizes, Tensor? dropout_state) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + dispatch: + CUDA: miopen_rnn + autogen: miopen_rnn.out + tags: nondeterministic_seeded + + +- func: miopen_rnn_backward(Tensor input, Tensor[] weight, int weight_stride0, Tensor weight_buf, Tensor hx, Tensor? cx, Tensor output, Tensor? grad_output, Tensor? grad_hy, Tensor? grad_cy, int mode, int hidden_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, int[] batch_sizes, Tensor? dropout_state, Tensor reserve, bool[4] output_mask) -> (Tensor, Tensor, Tensor, Tensor[]) + dispatch: + CUDA: miopen_rnn_backward + autogen: miopen_rnn_backward.out + +- func: mm(Tensor self, Tensor mat2) -> Tensor + structured_delegate: mm.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: _sparse_mm + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: _sparse_csr_mm + tags: core + +- func: mm.out(Tensor self, Tensor mat2, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: mm_out_cpu + CUDA: mm_out_cuda + MPS: mm_out_mps + XPU: mm_out_xpu + SparseCPU, SparseCUDA: _sparse_mm_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: _sparse_csr_mm_out + +- func: _int_mm(Tensor self, Tensor mat2) -> Tensor + dispatch: + CPU: _int_mm_cpu + CUDA: _int_mm_cuda + +- func: _int_mm.out(Tensor self, Tensor mat2, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: _int_mm_out_cpu + CUDA: _int_mm_out_cuda + +- func: _convert_weight_to_int4pack(Tensor self, int innerKTiles) -> Tensor + dispatch: + CUDA: _convert_weight_to_int4pack_cuda + MPS: _convert_weight_to_int4pack_mps + +- func: _weight_int4pack_mm(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor + dispatch: + MPS: _weight_int4pack_mm_mps + CUDA: _weight_int4pack_mm_cuda + +# Split int4 pack weight between cpu and other devices due to +# https://github.com/pytorch/ao/issues/1117#issuecomment-2451252756. +- func: _convert_weight_to_int4pack_for_cpu(Tensor self, int innerKTiles) -> Tensor + dispatch: + CPU: _convert_weight_to_int4pack_cpu + +- func: _weight_int4pack_mm_for_cpu(Tensor self, Tensor mat2, int qGroupSize, Tensor qScaleAndZeros) -> Tensor + dispatch: + CPU: _weight_int4pack_mm_cpu + +- func: _weight_int8pack_mm(Tensor self, Tensor mat2, Tensor scales) -> Tensor + dispatch: + CPU: _weight_int8pack_mm_cpu + MPS: _weight_int8pack_mm_mps + +- func: _sparse_mm(Tensor sparse, Tensor dense) -> Tensor + python_module: sparse + +- func: _sparse_mm.reduce(Tensor sparse, Tensor dense, str reduce) -> Tensor + python_module: sparse + +- func: _sparse_sparse_matmul(Tensor self, Tensor other) -> Tensor + dispatch: + SparseCPU: sparse_sparse_matmul_cpu + SparseCUDA: sparse_sparse_matmul_cuda + autogen: _sparse_sparse_matmul.out + +- func: mode(Tensor self, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + dispatch: + CPU, CUDA: mode + +- func: mode.values(Tensor self, int dim=-1, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + dispatch: + CompositeExplicitAutograd: mode_out + +- func: mode.dimname(Tensor self, Dimname dim, bool keepdim=False) -> (Tensor values, Tensor indices) + variants: function, method + +- func: mode.dimname_out(Tensor self, Dimname dim, bool keepdim=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + +- func: mul.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: mul.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: mul_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: mul_sparse_csr + MkldnnCPU: mkldnn_mul + ZeroTensor: mul_zerotensor + NestedTensorCPU, NestedTensorCUDA: NestedTensor_mul_Tensor + tags: [core, pointwise] + +- func: mul_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: mul.out + variants: method + dispatch: + SparseCPU, SparseCUDA: mul_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: mul_sparse_csr_ + MkldnnCPU: mkldnn_mul_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_mul__Tensor + tags: pointwise + +- func: mul.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: mul_out + MPS: mul_out_mps + SparseCPU: mul_out_sparse_cpu + SparseCUDA: mul_out_sparse_cuda + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: mul_out_sparse_csr + MkldnnCPU: mkldnn_mul_out + tags: pointwise + # For C++ only, until we have conversion from C++ numbers to Tensor + +- func: mul.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: mul + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: mul_scalar_sparse_csr + NestedTensorCPU, NestedTensorCUDA: NestedTensor_mul_Scalar + tags: [core, pointwise] + +- func: mul_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: mul_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: mul__scalar_sparse_csr + NestedTensorCPU, NestedTensorCUDA: NestedTensor_mul__Scalar + autogen: mul.Scalar_out + tags: pointwise +# multiply, alias for mul + +- func: multiply.Tensor(Tensor self, Tensor other) -> Tensor + variants: function, method + +- func: multiply_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: multiply.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: multiply.Scalar(Tensor self, Scalar other) -> Tensor + variants: function, method + +- func: multiply_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: mv(Tensor self, Tensor vec) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: mv + SparseCPU, SparseCUDA: mv_sparse + +- func: mv.out(Tensor self, Tensor vec, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: mv_out + +- func: mvlgamma.out(Tensor self, int p, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: mvlgamma_out + tags: pointwise + +- func: mvlgamma(Tensor self, int p) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: mvlgamma + tags: pointwise + +- func: mvlgamma_(Tensor(a!) self, int p) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: mvlgamma_ + tags: pointwise + +- func: narrow_copy(Tensor self, int dim, SymInt start, SymInt length) -> Tensor + variants: function, method + dispatch: + CPU: narrow_copy_dense_cpu + SparseCPU, SparseCUDA: narrow_copy_sparse + CompositeExplicitAutogradNonFunctional: narrow_copy_dense_symint + tags: view_copy + +- func: narrow_copy.out(Tensor self, int dim, SymInt start, SymInt length, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: narrow_copy_dense_cpu_out + +- func: narrow(Tensor(a) self, int dim, SymInt start, SymInt length) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: narrow_symint + NestedTensorCPU, NestedTensorCUDA: narrow_nested_symint + +- func: narrow.Tensor(Tensor(a) self, int dim, Tensor start, SymInt length) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: narrow_tensor_symint + +- func: native_batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps) -> (Tensor, Tensor, Tensor) + dispatch: + CPU: batch_norm_cpu + CUDA: batch_norm_cuda + MPS: batch_norm_mps + MkldnnCPU: mkldnn_batch_norm + +- func: native_batch_norm.out(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps, *, Tensor(a!) out, Tensor(b!) save_mean, Tensor(c!) save_invstd) -> (Tensor(a!), Tensor(b!), Tensor(c!)) + dispatch: + CUDA: batch_norm_cuda_out + MPS: batch_norm_mps_out + CPU: batch_norm_cpu_out + +# TODO: In 2 weeks, we should make native_batch_norm composite implicit so that this correct schema percolates correctly through our dispatching +- func: _native_batch_norm_legit(Tensor input, Tensor? weight, Tensor? bias, Tensor(a!) running_mean, Tensor(b!) running_var, bool training, float momentum, float eps) -> (Tensor, Tensor, Tensor) + dispatch: + CPU: _batch_norm_legit_cpu + CUDA: _batch_norm_legit_cuda + MPS: _batch_norm_legit_mps + MkldnnCPU: _mkldnn_batch_norm_legit + autogen: _native_batch_norm_legit_functional + tags: core + +# HACK: identical to _native_batch_norm_legit, but training is known to be False, +# So we known that running stats will not be mutated. +# The real fix here is batch norm consolidation. +- func: _native_batch_norm_legit_no_training(Tensor input, Tensor? weight, Tensor? bias, Tensor running_mean, Tensor running_var, float momentum, float eps) -> (Tensor, Tensor, Tensor) + dispatch: + CompositeExplicitAutograd: _batch_norm_legit_no_training + autogen: _native_batch_norm_legit_no_training.out + tags: core + +- func: _native_batch_norm_legit.out(Tensor input, Tensor? weight, Tensor? bias, Tensor(a!) running_mean, Tensor(b!) running_var, bool training, float momentum, float eps, *, Tensor(d!) out, Tensor(e!) save_mean, Tensor(f!) save_invstd) -> (Tensor(d!), Tensor(e!), Tensor(f!)) + dispatch: + CPU: _batch_norm_legit_cpu_out + CUDA: _batch_norm_legit_cuda_out + MPS: _batch_norm_legit_mps_out + +- func: _native_batch_norm_legit.no_stats(Tensor input, Tensor? weight, Tensor? bias, bool training, float momentum, float eps) -> (Tensor, Tensor, Tensor) + dispatch: + CPU: _batch_norm_legit_no_stats_cpu + CUDA: _batch_norm_legit_no_stats_cuda + MPS: _batch_norm_legit_no_stats_mps + MkldnnCPU: _mkldnn_batch_norm_legit_no_stats + tags: core + +- func: _native_batch_norm_legit.no_stats_out(Tensor input, Tensor? weight, Tensor? bias, bool training, float momentum, float eps, *, Tensor(a!) out, Tensor(b!) save_mean, Tensor(c!) save_invstd) -> (Tensor(a!), Tensor(b!), Tensor(c!)) + dispatch: + CPU: _batch_norm_legit_no_stats_cpu_out + CUDA: _batch_norm_legit_no_stats_cuda_out + MPS: _batch_norm_legit_no_stats_mps_out + +- func: batch_norm_stats(Tensor input, float eps) -> (Tensor, Tensor) + dispatch: + CUDA: batch_norm_stats_cuda + autogen: batch_norm_stats.out + +- func: batch_norm_elemt(Tensor input, Tensor? weight, Tensor? bias, Tensor mean, Tensor invstd, float eps) -> Tensor + dispatch: + CUDA: batch_norm_elemt_cuda + +- func: batch_norm_elemt.out(Tensor input, Tensor? weight, Tensor? bias, Tensor mean, Tensor invstd, float eps, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CUDA: batch_norm_elemt_cuda_out + +# for backward compatibility +- func: batch_norm_gather_stats(Tensor input, Tensor mean, Tensor invstd, Tensor? running_mean, Tensor? running_var, float momentum, float eps, int count) -> (Tensor, Tensor) + dispatch: + CUDA: batch_norm_gather_stats_cuda + autogen: batch_norm_gather_stats.out + +- func: batch_norm_gather_stats_with_counts(Tensor input, Tensor mean, Tensor invstd, Tensor? running_mean, Tensor? running_var, float momentum, float eps, Tensor counts) -> (Tensor, Tensor) + dispatch: + CUDA: batch_norm_gather_stats_with_counts_cuda + autogen: batch_norm_gather_stats_with_counts.out + +- func: native_batch_norm_backward(Tensor grad_out, Tensor input, Tensor? weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_invstd, bool train, float eps, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + dispatch: + CPU: batch_norm_backward_cpu + CUDA: batch_norm_backward_cuda + MPS: batch_norm_backward_mps + MkldnnCPU: mkldnn_batch_norm_backward + autogen: native_batch_norm_backward.out + +- func: batch_norm_backward_reduce(Tensor grad_out, Tensor input, Tensor mean, Tensor invstd, Tensor? weight, bool input_g, bool weight_g, bool bias_g) -> (Tensor, Tensor, Tensor, Tensor) + dispatch: + CUDA: batch_norm_backward_reduce_cuda + autogen: batch_norm_backward_reduce.out + +- func: batch_norm_backward_elemt(Tensor grad_out, Tensor input, Tensor mean, Tensor invstd, Tensor? weight, Tensor sum_dy, Tensor sum_dy_xmu, Tensor count) -> Tensor + dispatch: + CUDA: batch_norm_backward_elemt_cuda + autogen: batch_norm_backward_elemt.out + +- func: batch_norm_update_stats(Tensor input, Tensor? running_mean, Tensor? running_var, float momentum) -> (Tensor, Tensor) + dispatch: + CPU: batch_norm_update_stats_cpu + CUDA: batch_norm_update_stats_cuda + autogen: batch_norm_update_stats.out + +- func: is_vulkan_available() -> bool + +- func: _nnpack_available() -> bool + +- func: _nnpack_spatial_convolution(Tensor input, Tensor weight, Tensor? bias, SymInt[2] padding, SymInt[2] stride=1) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _nnpack_spatial_convolution + autogen: _nnpack_spatial_convolution.out + +- func: ones.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: ones + autogen: ones.names_out + +- func: ones(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: ones + +- func: ones.out(SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: ones_out + +- func: ones_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: ones_like + NestedTensorCPU, NestedTensorCUDA: ones_like + autogen: ones_like.out + +- func: pairwise_distance(Tensor x1, Tensor x2, float p=2, float eps=1e-06, bool keepdim=False) -> Tensor + +- func: cdist(Tensor x1, Tensor x2, float p=2, int? compute_mode=None) -> Tensor + +- func: _euclidean_dist(Tensor x1, Tensor x2) -> Tensor + dispatch: + CompositeExplicitAutograd: _euclidean_dist + autogen: _euclidean_dist.out + +- func: _cdist_forward(Tensor x1, Tensor x2, float p, int? compute_mode) -> Tensor + dispatch: + CPU, CUDA: _cdist_forward + MPS: _cdist_forward_mps + autogen: _cdist_forward.out + tags: core + +- func: _cdist_backward(Tensor grad, Tensor x1, Tensor x2, float p, Tensor cdist) -> Tensor + dispatch: + CPU, CUDA: _cdist_backward + autogen: _cdist_backward.out + +- func: pdist(Tensor self, float p=2) -> Tensor + +- func: _pdist_forward(Tensor self, float p=2) -> Tensor + dispatch: + CPU, CUDA: _pdist_forward + autogen: _pdist_forward.out + tags: core + +- func: _pdist_backward(Tensor grad, Tensor self, float p, Tensor pdist) -> Tensor + dispatch: + CPU, CUDA: _pdist_backward + autogen: _pdist_backward.out + +- func: cosine_similarity(Tensor x1, Tensor x2, int dim=1, float eps=1e-08) -> Tensor + variants: function + +- func: permute(Tensor(a) self, int[] dims) -> Tensor(a) + variants: function, method + dispatch: + CompositeExplicitAutograd: permute + MPS: permute_mps + SparseCPU, SparseCUDA: permute_sparse_coo + tags: core + +- func: movedim.intlist(Tensor(a) self, int[] source, int[] destination) -> Tensor(a) + variants: function, method + +- func: movedim.int(Tensor(a) self, int source, int destination) -> Tensor(a) + variants: function, method + +# moveaxis, alias for movedim +- func: moveaxis.intlist(Tensor(a) self, int[] source, int[] destination) -> Tensor(a) + variants: function, method + +- func: moveaxis.int(Tensor(a) self, int source, int destination) -> Tensor(a) + variants: function, method + +# Only exposed from C++ -- in Python, +# we expose it as an attribute `T`, not a function. +# +# I'd like to name this "T" in C++ too, but +# calling a native function "T" causes undefined +# behavior on Windows, for reasons I don't understand +# (maybe related to capital letter collation somehow...) +- func: numpy_T(Tensor(a) self) -> Tensor(a) + variants: method + +# Exposed on Python as an attribute 'H' +- func: matrix_H(Tensor(a) self) -> Tensor(a) + variants: method + +# Exposed on Python as an attribute 'mT' +- func: mT(Tensor(a) self) -> Tensor(a) + variants: method + +# Exposed on Python as an attribute 'mH' +- func: mH(Tensor(a) self) -> Tensor(a) + variants: method + +- func: adjoint(Tensor(a) self) -> Tensor(a) + variants: function, method + +- func: pixel_shuffle(Tensor self, int upscale_factor) -> Tensor + dispatch: + CPU: pixel_shuffle_cpu + MPS: pixel_shuffle_mps + CompositeExplicitAutogradNonFunctional: math_pixel_shuffle + autogen: pixel_shuffle.out + +- func: pixel_unshuffle(Tensor self, int downscale_factor) -> Tensor + dispatch: + CPU: pixel_unshuffle_cpu + MPS: pixel_unshuffle_mps + CompositeExplicitAutogradNonFunctional: math_pixel_unshuffle + autogen: pixel_unshuffle.out + +- func: channel_shuffle(Tensor self, SymInt groups) -> Tensor + dispatch: + CPU, CUDA: channel_shuffle + QuantizedCPU: channel_shuffle_quantized_cpu + autogen: channel_shuffle.out + +- func: native_channel_shuffle(Tensor self, SymInt groups) -> Tensor + dispatch: + CPU: channel_shuffle_cpu + CompositeImplicitAutograd: math_channel_shuffle + +- func: is_pinned(Tensor self, Device? device=None) -> bool + variants: method + dispatch: + # the NestedTensor keys are necessary because NestedTensor has been removed + # from the CompositeExplicitAutograd keyset see Note [NestedTensor Not Included in Backend Keys] + CompositeExplicitAutograd, NestedTensorCPU: is_pinned + SparseCsrCPU: is_pinned_sparse_compressed + SparseCPU: is_pinned_sparse_coo + +# TODO: add a copy kwarg that guarantees that the tensor is put into fresh +# pinned memory +- func: pin_memory(Tensor(a) self, Device? device=None) -> Tensor(a) + variants: method + +# Unlike pin_memory, this is guaranteed to give a new non-aliasing tensor +- func: _pin_memory(Tensor self, Device? device=None) -> Tensor + dispatch: + CompositeExplicitAutograd: _pin_memory + NestedTensorCPU: _pin_memory_nested + SparseCPU: _pin_memory_sparse_coo + SparseCsrCPU: _pin_memory_sparse_compressed + autogen: _pin_memory.out + +- func: pinverse(Tensor self, float rcond=1e-15) -> Tensor + variants: function, method + +- func: poisson_nll_loss(Tensor input, Tensor target, bool log_input, bool full, float eps, int reduction) -> Tensor + variants: function + +- func: rad2deg(Tensor self) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: rad2deg + SparseCPU, SparseCUDA: rad2deg_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: rad2deg_sparse_csr + tags: pointwise + +- func: rad2deg_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + dispatch: + CompositeExplicitAutograd: rad2deg_ + SparseCPU, SparseCUDA: rad2deg_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: rad2deg_sparse_csr_ + tags: pointwise + +- func: rad2deg.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: rad2deg_out + SparseCPU, SparseCUDA: rad2deg_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: rad2deg_sparse_csr_out + tags: pointwise + +- func: deg2rad(Tensor self) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: deg2rad + SparseCPU, SparseCUDA: deg2rad_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: deg2rad_sparse_csr + tags: pointwise + +- func: deg2rad_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + dispatch: + CompositeExplicitAutograd: deg2rad_ + SparseCPU, SparseCUDA: deg2rad_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: deg2rad_sparse_csr_ + tags: pointwise + +- func: deg2rad.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: deg2rad_out + SparseCPU, SparseCUDA: deg2rad_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: deg2rad_sparse_csr_out + tags: pointwise + +- func: scalar_tensor(Scalar s, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: scalar_tensor + autogen: scalar_tensor.out + tags: core + +- func: rand.names(SymInt[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: rand + autogen: rand.names_out + tags: nondeterministic_seeded + +- func: rand.generator_with_names(SymInt[] size, *, Generator? generator, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + device_check: NoCheck + device_guard: False + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: rand + autogen: rand.generator_with_names_out + +- func: rand(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: [core, nondeterministic_seeded] + dispatch: + CompositeExplicitAutograd: rand + +- func: rand.generator(SymInt[] size, *, Generator? generator, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: rand + +- func: rand.out(SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: rand_out + +- func: rand.generator_out(SymInt[] size, *, Generator? generator, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + +- func: rand_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: rand_like + autogen: rand_like.out + +- func: randint(SymInt high, SymInt[] size, *, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint + +- func: randint.generator(SymInt high, SymInt[] size, *, Generator? generator, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint + +- func: randint.low(SymInt low, SymInt high, SymInt[] size, *, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint + +- func: randint.low_generator(SymInt low, SymInt high, SymInt[] size, *, Generator? generator, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint + +- func: randint.out(SymInt high, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint_out + +- func: randint.generator_out(SymInt high, SymInt[] size, *, Generator? generator, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint_out + +- func: randint.low_out(SymInt low, SymInt high, SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint_out + +- func: randint.low_generator_out(SymInt low, SymInt high, SymInt[] size, *, Generator? generator, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randint_out + +- func: randint_like(Tensor self, SymInt high, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: randint_like + autogen: randint_like.out + +- func: randint_like.low_dtype(Tensor self, SymInt low, SymInt high, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd: randint_like + autogen: randint_like.low_dtype_out + +- func: randn(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: [core, nondeterministic_seeded] + dispatch: + CompositeExplicitAutograd: randn + +- func: randn.generator(SymInt[] size, *, Generator? generator, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randn + +- func: randn.names(SymInt[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: randn + autogen: randn.names_out + +- func: randn.generator_with_names(SymInt[] size, *, Generator? generator, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: randn + autogen: randn.generator_with_names_out + +- func: randn.out(SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + +- func: randn.generator_out(SymInt[] size, *, Generator? generator, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + +- func: randn_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd, CompositeImplicitAutogradNestedTensor: randn_like + autogen: randn_like.out + +- func: randperm(SymInt n, *, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: [core, nondeterministic_seeded] + dispatch: + CompositeExplicitAutograd: randperm + +- func: randperm.generator(SymInt n, *, Generator? generator, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randperm + +- func: randperm.out(SymInt n, *, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: randperm_out + +- func: randperm.generator_out(SymInt n, *, Generator? generator, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CPU: randperm_out_cpu + CUDA: randperm_out_cuda + MPS: randperm_out_mps + +- func: range.step(Scalar start, Scalar end, Scalar step=1, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: range + +- func: range(Scalar start, Scalar end, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: range + +- func: range.out_(Scalar start, Scalar end, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: range_out_no_step + +- func: range.out(Scalar start, Scalar end, Scalar step=1, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, Meta: range_out + CUDA: range_cuda_out + MPS: range_mps_out + cpp_no_default_args: ['step'] + +- func: ravel(Tensor(a) self) -> Tensor(a) + variants: function, method + +- func: reciprocal(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: reciprocal.out + variants: function, method + tags: [core, pointwise] + +- func: reciprocal_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: reciprocal.out + variants: function, method + tags: pointwise + +- func: reciprocal.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: reciprocal_out + MPS: reciprocal_out_mps + tags: pointwise + +- func: neg(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: neg.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: neg_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: neg_sparse_csr + NestedTensorCPU, NestedTensorCUDA: NestedTensor_neg + tags: [core, pointwise] + +- func: neg_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: neg.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: neg_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: neg_sparse_csr_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_neg_ + tags: pointwise + +- func: neg.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: neg_out + MPS: neg_out_mps + SparseCPU, SparseCUDA: neg_out_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: neg_sparse_csr_out + tags: pointwise +# Alias for neg + +- func: negative(Tensor self) -> Tensor + variants: function, method + +- func: negative_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: negative.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: repeat(Tensor self, SymInt[] repeats) -> Tensor + variants: method # This is method-only to match the previous tensor API. In the future we could make this a function too. + dispatch: + CompositeExplicitAutograd: repeat + MPS: repeat_mps + autogen: repeat.out + tags: core + +- func: repeat_interleave.Tensor(Tensor repeats, *, SymInt? output_size=None) -> Tensor + variants: function + dispatch: + CPU: repeat_interleave_cpu + CUDA: repeat_interleave_cuda + MPS: repeat_interleave_mps + tags: dynamic_output_shape + autogen: repeat_interleave.Tensor_out + +- func: repeat_interleave.self_Tensor(Tensor self, Tensor repeats, int? dim=None, *, SymInt? output_size=None) -> Tensor + variants: function, method + dispatch: + CompositeImplicitAutograd: repeat_interleave_symint + +- func: repeat_interleave.self_int(Tensor self, SymInt repeats, int? dim=None, *, SymInt? output_size=None) -> Tensor + variants: function, method + dispatch: + CompositeImplicitAutograd: repeat_interleave_symint + +- func: reshape(Tensor(a) self, SymInt[] shape) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: reshape_symint + CompositeImplicitAutogradNestedTensor: reshape_nested_symint + +- func: _reshape_copy(Tensor self, SymInt[] size) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _reshape_copy_symint + +# NOTE [ _reshape_alias ] is meant to be used in the implementation of reshape. +# They are not user-facing, hence the leading underscore. Please don't use it +# anywhere else. +- func: _reshape_alias(Tensor(a) self, SymInt[] size, SymInt[] stride) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CPU, CUDA, Meta, QuantizedCPU, QuantizedCUDA, ZeroTensor, MPS: _reshape_alias + # We don't need to support mkldnn since this is handled explicitly by the reshape operator. + +- func: _mkldnn_reshape(Tensor self, int[] shape) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + MkldnnCPU: mkldnn_reshape + autogen: _mkldnn_reshape.out + +- func: reshape_as(Tensor(a) self, Tensor other) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: reshape_as + CompositeImplicitAutogradNestedTensor: reshape_as_nested + +- func: round(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: round.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: round_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: round_sparse_csr + tags: [core, pointwise] + +- func: round_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: round.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: round_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: round_sparse_csr_ + tags: pointwise + +- func: round.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU: round_out + CUDA: round_out + MPS: round_out_mps + SparseCPU, SparseCUDA: round_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: round_sparse_csr_out + tags: pointwise + +- func: round.decimals(Tensor self, *, int decimals) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: round.decimals_out + variants: function, method + tags: pointwise + +- func: round_.decimals(Tensor(a!) self, *, int decimals) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: round.decimals_out + variants: function, method + tags: pointwise + +- func: round.decimals_out(Tensor self, *, int decimals, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU: round_decimals_out + CUDA: round_decimals_out + tags: pointwise + +- func: rrelu(Tensor self, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor + device_check: NoCheck # TensorIterator + tags: [pointwise, nondeterministic_seeded] + +- func: rrelu_(Tensor(a!) self, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor(a!) + tags: nondeterministic_seeded + device_check: NoCheck # TensorIterator + +- func: relu(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: relu + MPS: relu_mps + MkldnnCPU: mkldnn_relu + QuantizedCPU: relu_quantized_cpu + QuantizedCUDA: relu_quantized_cuda + NestedTensorCPU, NestedTensorCUDA: NestedTensor_relu + SparseCPU, SparseCUDA: relu_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: relu_sparse_csr + tags: [core, pointwise] + +- func: relu_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: relu_ + MPS: relu_mps_ + MkldnnCPU: mkldnn_relu_ + QuantizedCPU: relu_quantized_cpu_ + QuantizedCUDA: relu_quantized_cuda_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_relu_ + SparseCPU, SparseCUDA: relu_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: relu_sparse_csr_ + autogen: relu.out + tags: pointwise + +- func: relu6(Tensor self) -> Tensor + python_module: nn + tags: pointwise + +- func: relu6_(Tensor(a!) self) -> Tensor(a!) + python_module: nn + +- func: prelu(Tensor self, Tensor weight) -> Tensor + variants: function, method + autogen: prelu.out + +- func: _prelu_kernel(Tensor self, Tensor weight) -> Tensor + dispatch: + CPU, CUDA: _prelu_kernel + QuantizedCPU: _prelu_kernel_quantized_cpu + MkldnnCPU: mkldnn_prelu + MPS: prelu_mps + +- func: _prelu_kernel_backward(Tensor grad_output, Tensor self, Tensor weight) -> (Tensor, Tensor) + dispatch: + CPU, CUDA: _prelu_kernel_backward + MkldnnCPU: mkldnn_prelu_backward + MPS: prelu_backward_mps + +- func: gelu.out(Tensor self, *, str approximate='none', Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU: gelu_out_cpu + CUDA: gelu_out_cuda + MPS: gelu_out_mps + +- func: gelu_(Tensor(a!) self, *, str approximate='none') -> Tensor(a!) + structured_delegate: gelu.out + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + QuantizedCPU: gelu_quantized_cpu_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_gelu_ + +- func: gelu(Tensor self, *, str approximate='none') -> Tensor + structured_delegate: gelu.out + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + MkldnnCPU: mkldnn_gelu + QuantizedCPU: gelu_quantized_cpu + QuantizedCUDA: gelu_quantized_cuda + NestedTensorCPU, NestedTensorCUDA: NestedTensor_gelu + tags: [core, pointwise] + +- func: gelu_backward.grad_input(Tensor grad_output, Tensor self, *, str approximate='none', Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU: gelu_backward_out_cpu + CUDA: gelu_backward_out_cuda + MPS: gelu_backward_out_mps + +- func: gelu_backward(Tensor grad_output, Tensor self, *, str approximate='none') -> Tensor + structured_delegate: gelu_backward.grad_input + python_module: nn + dispatch: + MkldnnCPU: mkldnn_gelu_backward + NestedTensorCPU, NestedTensorCUDA: gelu_backwards_nested + tags: pointwise + +- func: infinitely_differentiable_gelu_backward(Tensor grad, Tensor self) -> Tensor + variants: function + python_module: nn + device_check: NoCheck + device_guard: False + +- func: hardshrink.out(Tensor self, Scalar lambd=0.5, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: hardshrink_out + +- func: hardshrink(Tensor self, Scalar lambd=0.5) -> Tensor + structured_delegate: hardshrink.out + device_check: NoCheck # TensorIterator + variants: function, method + tags: pointwise + +- func: hardshrink_backward.grad_input(Tensor grad_out, Tensor self, Scalar lambd, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: hardshrink_backward_out + +- func: hardshrink_backward(Tensor grad_out, Tensor self, Scalar lambd) -> Tensor + structured_delegate: hardshrink_backward.grad_input + variants: function, method + +- func: rsqrt(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: rsqrt.out + variants: function, method + tags: [core, pointwise] + +- func: rsqrt_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: rsqrt.out + variants: function, method + tags: pointwise + +- func: rsqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: rsqrt_out + MPS: rsqrt_out_mps + tags: pointwise + +- func: select.Dimname(Tensor(a) self, Dimname dim, int index) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + +- func: select.int(Tensor(a) self, int dim, SymInt index) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: select_symint + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: select_sparse_csr + NestedTensorCPU, NestedTensorCUDA: select_nested + tags: core + +- func: select_backward(Tensor grad_output, SymInt[] input_sizes, int dim, SymInt index) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutogradNonFunctional: select_backward_symint + autogen: select_backward.out + +- func: _nested_select_backward(Tensor grad_output, Tensor self, int dim, SymInt index) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + dispatch: + NestedTensorCPU, NestedTensorCUDA: _nested_select_backward_symint + +- func: selu(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + tags: pointwise + +- func: selu_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: celu(Tensor self, Scalar alpha=1.0) -> Tensor + device_check: NoCheck # TensorIterator + dispatch: + CompositeExplicitAutograd: celu + tags: pointwise + +- func: celu_(Tensor(a!) self, Scalar alpha=1.0) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CompositeExplicitAutograd: celu_ + autogen: celu.out + +- func: silu(Tensor self) -> Tensor + structured_delegate: silu.out + python_module: nn + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_silu + tags: pointwise + +- func: silu_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: silu.out + python_module: nn + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_silu_ + tags: pointwise + +- func: silu.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: silu_out + MPS: silu_out_mps + tags: pointwise + +- func: silu_backward.grad_input(Tensor grad_output, Tensor self, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: silu_backward_out + MPS: silu_backward_out_mps + tags: pointwise + +- func: silu_backward(Tensor grad_output, Tensor self) -> Tensor + structured_delegate: silu_backward.grad_input + python_module: nn + dispatch: + CompositeImplicitAutograd: math_silu_backward + NestedTensorCPU, NestedTensorCUDA: silu_backward_nested + tags: pointwise + +- func: mish(Tensor self) -> Tensor + structured_delegate: mish.out + python_module: nn + tags: pointwise + +- func: mish_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: mish.out + python_module: nn + +- func: mish.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: mish_out + MPS: mish_out_mps + +- func: mish_backward(Tensor grad_output, Tensor self) -> Tensor + python_module: nn + dispatch: + CPU, CUDA: mish_backward + MPS: mish_backward_mps + CompositeImplicitAutograd: math_mish_backward + +- func: sigmoid(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: sigmoid.out + variants: function, method + dispatch: + QuantizedCPU: sigmoid_quantized_cpu + MkldnnCPU: mkldnn_sigmoid + tags: [core, pointwise] + +- func: sigmoid_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: sigmoid.out + variants: function, method + dispatch: + MkldnnCPU: mkldnn_sigmoid_ + tags: pointwise + +- func: sigmoid.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sigmoid_out + MPS: sigmoid_out_mps + tags: pointwise + +- func: logit(Tensor self, float? eps=None) -> Tensor + variants: function, method + dispatch: + CPU, CUDA: logit + MPS: logit_mps + tags: pointwise + +- func: logit_(Tensor(a!) self, float? eps=None) -> Tensor(a!) + variants: function, method + dispatch: + CPU, CUDA: logit_ + tags: pointwise + +- func: logit.out(Tensor self, float? eps=None, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: logit_out + MPS: logit_out_mps + tags: pointwise + +- func: sin(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: sin.out + variants: function, method + dispatch: + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sin_sparse_csr + SparseCPU, SparseCUDA: sin_sparse + NestedTensorCPU, NestedTensorCUDA: NestedTensor_sin + tags: [core, pointwise] + +- func: sin_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: sin.out + variants: function, method + dispatch: + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sin_sparse_csr_ + SparseCPU, SparseCUDA: sin_sparse_ + tags: pointwise + +- func: sin.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sin_out + MPS: sin_out_mps + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sin_sparse_csr_out + SparseCPU, SparseCUDA: sin_sparse_out + tags: pointwise + +- func: sinc(Tensor self) -> Tensor + structured_delegate: sinc.out + variants: function, method + tags: pointwise + +- func: sinc_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: sinc.out + variants: function, method + tags: pointwise + +- func: sinc.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sinc_out + tags: pointwise + +- func: sinh(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: sinh.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: sinh_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sinh_sparse_csr + tags: [core, pointwise] + +- func: sinh_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: sinh.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: sinh_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sinh_sparse_csr_ + tags: pointwise + +- func: sinh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sinh_out + MPS: sinh_out_mps + SparseCPU, SparseCUDA: sinh_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sinh_sparse_csr_out + +# Returns a copy of this `Variable` that is detached from its autograd graph. +# This method is OK to call if the `Variable` is a view. +# +# NOTE: Previously, if we change the tensor metadata (e.g. sizes / strides / +# storage / storage_offset) of a tensor created from `detach()`, those metadata +# in the original tensor will also be updated. However, the new behavior is that +# those metadata changes to the detached tensor will not update the original tensor +# anymore, and in the `detach()` function we need to set `allow_tensor_metadata_change_` +# to false to make such changes explicitly illegal, in order to prevent users from +# changing metadata of the detached tensor and expecting the original tensor to also +# be updated. + tags: pointwise +- func: detach(Tensor(a) self) -> Tensor(a) + variants: function, method + dispatch: + CompositeExplicitAutograd: detach + NestedTensorCPU, NestedTensorCUDA: detach + +# Like `detach()`, but modifies this `Variable` in-place. This method may +# only be called on non-view `Variable`s. You can use `is_view()` to check +# this. If this `Variable` is a view, throws an `std::runtime_error()`. +- func: detach_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + tags: inplace_view + dispatch: + CompositeExplicitAutograd: detach_ + +- func: size.int(Tensor self, int dim) -> int + variants: function + device_check: NoCheck + device_guard: False + manual_cpp_binding: True + +- func: size.Dimname(Tensor self, Dimname dim) -> int + variants: function, method + device_check: NoCheck + device_guard: False + +- func: sym_size.int(Tensor self, int dim) -> SymInt + variants: function + device_check: NoCheck + device_guard: False + tags: core + manual_cpp_binding: True + +- func: sym_numel(Tensor self) -> SymInt + variants: function + device_check: NoCheck + device_guard: False + tags: core + manual_cpp_binding: True + +- func: sym_storage_offset(Tensor self) -> SymInt + variants: function + device_check: NoCheck + device_guard: False + tags: core + manual_cpp_binding: True + +- func: slice.Tensor(Tensor(a) self, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: slice + tags: core + +# NOTE: The implementation of split_with_sizes bypasses the dispatcher to call this; undo +# that if adding specific implementations here! + +- func: slice_backward(Tensor grad_output, SymInt[] input_sizes, int dim, SymInt start, SymInt end, SymInt step) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: slice_backward + autogen: slice_backward.out + +# NB: This op exists to back the implementation of reverse view_funcs for various views (chunk, +# slice.Tensor, split_with_sizes, et al.). Currently, these are only used during fake-ification +# of PT2 graph input subclass instances that are views. This means: +# * This op shouldn't really show up in eager mode (so e.g. XLA shouldn't have to implement it) +# * This op shouldn't show up in a PT2 graph (so a PT2 backend shouldn't have to implement it) +# * A subclass will have to implement this to work in PT2 if a subclass view is used as a graph +# input AND the view utilizes this op in its inverse. The idea is that slice_inverse() is +# easier to implement for a subclass than as_strided() +- func: slice_inverse(Tensor(a) self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: slice_inverse_symint + +- func: slice_scatter(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutogradNonFunctional: slice_scatter + autogen: slice_scatter.out + tags: [core, view_copy] + +- func: select_scatter(Tensor self, Tensor src, int dim, SymInt index) -> Tensor + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutogradNonFunctional: select_scatter_symint + autogen: select_scatter.out + tags: core + +- func: diagonal_scatter(Tensor self, Tensor src, int offset=0, int dim1=0, int dim2=1) -> Tensor + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutogradNonFunctional: diagonal_scatter + autogen: diagonal_scatter.out + +- func: as_strided_scatter(Tensor self, Tensor src, SymInt[] size, SymInt[] stride, SymInt? storage_offset=None) -> Tensor + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutogradNonFunctional: as_strided_scatter_symint + autogen: as_strided_scatter.out + +- func: smm(Tensor self, Tensor mat2) -> Tensor + variants: function, method + +# softmax allows positional dtype, unlike most operators, because kwonly is BC-breaking when loading jit models. +- func: softmax.int(Tensor self, int dim, ScalarType? dtype=None) -> Tensor + variants: function, method + +- func: softmax.int_out(Tensor self, int dim, ScalarType? dtype=None, *, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CompositeExplicitAutograd: softmax_out + +- func: softmax.Dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor + variants: function, method + +- func: _softmax(Tensor self, int dim, bool half_to_float) -> Tensor + structured_delegate: _softmax.out + dispatch: + MkldnnCPU: mkldnn_softmax + NestedTensorCPU, NestedTensorCUDA: softmax_nested + tags: core + +- func: _softmax.out(Tensor self, int dim, bool half_to_float, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: softmax_cpu_out + CUDA: softmax_cuda_out + MPS: softmax_mps_out + +- func: _softmax_backward_data(Tensor grad_output, Tensor output, int dim, ScalarType input_dtype) -> Tensor + structured_delegate: _softmax_backward_data.out + dispatch: + NestedTensorCPU, NestedTensorCUDA: nested_softmax_backward + +- func: _softmax_backward_data.out(Tensor grad_output, Tensor output, int dim, ScalarType input_dtype, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + dispatch: + CPU: softmax_backward_cpu_out + CUDA: softmax_backward_cuda_out + MPS: softmax_backward_mps_out + +- func: unsafe_split.Tensor(Tensor self, SymInt split_size, int dim=0) -> Tensor[] + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: unsafe_split + autogen: unsafe_split.Tensor_out + +- func: split.Tensor(Tensor(a -> *) self, SymInt split_size, int dim=0) -> Tensor(a)[] + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: split + +- func: split.sizes(Tensor(a -> *) self, SymInt[] split_size, int dim=0) -> Tensor(a)[] + variants: function, method + device_guard: False + dispatch: + CompositeImplicitAutograd: split_symint + +- func: unsafe_split_with_sizes(Tensor self, SymInt[] split_sizes, int dim=0) -> Tensor[] + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: unsafe_split_with_sizes + autogen: unsafe_split_with_sizes.out + +- func: split_with_sizes(Tensor(a -> *) self, SymInt[] split_sizes, int dim=0) -> Tensor(a)[] + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: split_with_sizes + NestedTensorCPU, NestedTensorCUDA: split_with_sizes_nested + tags: core + +- func: hsplit.int(Tensor(a -> *) self, int sections) -> Tensor(a)[] + variants: function, method + +- func: hsplit.array(Tensor(a -> *) self, int[] indices) -> Tensor(a)[] + variants: function, method + +- func: vsplit.int(Tensor(a -> *) self, int sections) -> Tensor(a)[] + variants: function, method + +- func: vsplit.array(Tensor(a -> *) self, int[] indices) -> Tensor(a)[] + variants: function, method + +- func: dsplit.int(Tensor(a -> *) self, int sections) -> Tensor(a)[] + variants: function, method + +- func: dsplit.array(Tensor(a -> *) self, int[] indices) -> Tensor(a)[] + variants: function, method + +- func: squeeze(Tensor(a) self) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: squeeze + QuantizedCPU, QuantizedCUDA: squeeze_quantized + NestedTensorCPU, NestedTensorCUDA: squeeze_nested + +- func: squeeze.dim(Tensor(a) self, int dim) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: squeeze + QuantizedCPU, QuantizedCUDA: squeeze_quantized + NestedTensorCPU, NestedTensorCUDA: squeeze_dim_nested + tags: core + +- func: squeeze.dimname(Tensor(a) self, Dimname dim) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + + +- func: squeeze.dims(Tensor(a) self, int[] dim) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: squeeze + QuantizedCPU, QuantizedCUDA: squeeze_quantized + NestedTensorCPU, NestedTensorCUDA: squeeze_dim_nested + tags: core + +- func: squeeze_(Tensor(a!) self) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + dispatch: + CompositeExplicitAutograd: squeeze_ + +- func: squeeze_.dim(Tensor(a!) self, int dim) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + dispatch: + CompositeExplicitAutograd: squeeze_ + +- func: squeeze_.dims(Tensor(a!) self, int[] dim) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + dispatch: + CompositeExplicitAutograd: squeeze_ + +- func: squeeze_.dimname(Tensor(a!) self, Dimname dim) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + +- func: sspaddmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + variants: function, method + +- func: sspaddmm.out(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: _sspaddmm_out_only_sparse + CUDA: _sspaddmm_out_only_sparse_cuda + SparseCPU: _sspaddmm_out_cpu + SparseCUDA: _sspaddmm_out_cuda + +- func: _chunk_cat(Tensor[] tensors, int dim, int num_chunks) -> Tensor + dispatch: + CompositeExplicitAutograd: _chunk_cat + CUDA: _chunk_cat_cuda + +- func: _chunk_cat.out(Tensor[] tensors, int dim, int num_chunks, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: _chunk_cat_out + CUDA: _chunk_cat_out_cuda + +- func: stack(Tensor[] tensors, int dim=0) -> Tensor + dispatch: + CompositeExplicitAutograd: stack + +- func: stack.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: stack_out + +- func: _stack(Tensor[] tensors, int dim=0) -> Tensor + dispatch: # match the backends supported by _cat + CPU: _stack_cpu + CompositeExplicitAutograd: _stack + +- func: _stack.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) + dispatch: # match the backends supported by _cat_out + CPU: _stack_out_cpu + CompositeExplicitAutograd: _stack_out + +- func: hstack(Tensor[] tensors) -> Tensor + +- func: hstack.out(Tensor[] tensors, *, Tensor(a!) out) -> Tensor(a!) + +- func: vstack(Tensor[] tensors) -> Tensor + +- func: vstack.out(Tensor[] tensors, *, Tensor(a!) out) -> Tensor(a!) + +- func: dstack(Tensor[] tensors) -> Tensor + +- func: dstack.out(Tensor[] tensors, *, Tensor(a!) out) -> Tensor(a!) + +# Overload without center & pad mode, needed for forward-compatibility +- func: stft(Tensor self, int n_fft, int? hop_length=None, int? win_length=None, Tensor? window=None, bool normalized=False, bool? onesided=None, bool? return_complex=None) -> Tensor + variants: function, method + cpp_no_default_args: ['hop_length', 'win_length', 'window', 'normalized'] + +- func: stft.center(Tensor self, int n_fft, int? hop_length=None, int? win_length=None, Tensor? window=None, bool center=True, str pad_mode="reflect", bool normalized=False, bool? onesided=None, bool? return_complex=None) -> Tensor + variants: function, method + +- func: istft(Tensor self, int n_fft, int? hop_length=None, int? win_length=None, Tensor? window=None, bool center=True, bool normalized=False, bool? onesided=None, int? length=None, bool return_complex=False) -> Tensor + variants: function, method + +- func: stride.int(Tensor self, int dim) -> int + variants: function + device_check: NoCheck + device_guard: False + manual_cpp_binding: True + +- func: stride.Dimname(Tensor self, Dimname dim) -> int + variants: function, method + device_check: NoCheck + device_guard: False + +- func: sym_stride.int(Tensor self, int dim) -> SymInt + variants: function + device_check: NoCheck + device_guard: False + tags: core + manual_cpp_binding: True + +- func: sum(Tensor self, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: sum + SparseCPU, SparseCUDA, SparseMeta: sum_coo + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sum_csr + autogen: sum.out + +- func: sum.dim_IntList(Tensor self, int[1]? dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + # TODO: Align the signature of sum.dim_IntList and _sparse_csr_sum.dim_dtype + structured_delegate: sum.IntList_out + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + NestedTensorCPU: NestedTensor_sum_dim_CPU + SparseCPU, SparseCUDA: sum_sparse_coo + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sum_sparse_compressed + tags: core + +- func: sum.dim_DimnameList(Tensor self, Dimname[1] dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: sum.IntList_out(Tensor self, int[1]? dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + structured: True + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: sum_out + MPS: sum_out_mps + +- func: sum.DimnameList_out(Tensor self, Dimname[1] dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +# TODO: this function will be replaced once nested expand semantics have been settled on +- func: _nested_sum_backward(Tensor grad, Tensor self, int[1]? dim, bool keepdim=False) -> Tensor + dispatch: + NestedTensorCPU: _nested_sum_backward_cpu + +- func: nansum(Tensor self, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + variants: function, method + dispatch: + CPU, CUDA: nansum + MPS: nansum_mps + +- func: nansum.out(Tensor self, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: nansum_out + MPS: nansum_out_mps + +- func: sum_to_size(Tensor self, SymInt[] size) -> Tensor + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: sum_to_size_symint + +- func: sqrt(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: sqrt.out + variants: function, method + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_sqrt + SparseCPU, SparseCUDA: sqrt_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sqrt_sparse_csr + tags: [core, pointwise] + +- func: sqrt_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: sqrt.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: sqrt_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sqrt_sparse_csr_ + tags: pointwise + +- func: sqrt.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sqrt_out + MPS: sqrt_out_mps + SparseCPU, SparseCUDA: sqrt_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sqrt_sparse_csr_out + tags: pointwise + +- func: square(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + tags: pointwise + +- func: square_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function, method + tags: pointwise + +- func: square.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + tags: pointwise + +- func: std(Tensor self, bool unbiased=True) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + cpp_no_default_args: ["unbiased"] + +- func: std.dim(Tensor self, int[1]? dim, bool unbiased=True, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + cpp_no_default_args: ["unbiased"] + +- func: std.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: std + MPS: std_mps + QuantizedCPU: std_quantized_cpu + +- func: std_mean(Tensor self, bool unbiased=True) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + cpp_no_default_args: ["unbiased"] + +- func: std_mean.dim(Tensor self, int[1]? dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + cpp_no_default_args: ["unbiased"] + +- func: std_mean.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CPU, CUDA: std_mean + MPS: std_mean_mps + autogen: std_mean.correction_out + +- func: std_mean.names_dim(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + cpp_no_default_args: ["unbiased"] + +- func: std_mean.correction_names(Tensor self, Dimname[1] dim, *, Scalar? correction=None, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + +- func: std.out(Tensor self, int[1]? dim, bool unbiased=True, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + cpp_no_default_args: ["unbiased"] + +- func: std.correction_out(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: std_out + QuantizedCPU: std_out_quantized_cpu + +- func: std.names_dim(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + cpp_no_default_args: ["unbiased"] + +- func: std.names_out(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + cpp_no_default_args: ["unbiased"] + +- func: std.correction_names(Tensor self, Dimname[1] dim, *, Scalar? correction=None, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: std.correction_names_out(Tensor self, Dimname[1] dim, *, Scalar? correction=None, bool keepdim=False, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + +- func: prod(Tensor self, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: prod + MPS: prod_mps + autogen: prod.out + tags: core + +- func: prod.dim_int(Tensor self, int dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + structured_delegate: prod.int_out + device_check: NoCheck # TensorIterator + variants: function, method + tags: core + +- func: prod.int_out(Tensor self, int dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + structured: True + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: prod_out + MPS: prod_out_mps + +- func: prod.dim_Dimname(Tensor self, Dimname dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: prod.Dimname_out(Tensor self, Dimname dim, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: t(Tensor(a) self) -> Tensor(a) + device_check: NoCheck + device_guard: False + variants: function, method + dispatch: + CompositeExplicitAutograd: t + +- func: t_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck + device_guard: False + variants: method + tags: inplace_view + dispatch: + CompositeExplicitAutograd: t_ + +- func: tan(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: tan.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: tan_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: tan_sparse_csr + tags: [core, pointwise] + +- func: tan_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: tan.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: tan_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: tan_sparse_csr_ + tags: pointwise + +- func: tan.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: tan_out + MPS: tan_out_mps + SparseCPU, SparseCUDA: tan_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: tan_sparse_csr_out + tags: pointwise + +- func: tanh(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: tanh.out + variants: function, method + dispatch: + QuantizedCPU: tanh_quantized_cpu + MkldnnCPU: mkldnn_tanh + SparseCPU, SparseCUDA: tanh_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: tanh_sparse_csr + NestedTensorCPU, NestedTensorCUDA: NestedTensor_tanh + tags: [core, pointwise] + +- func: tanh_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: tanh.out + variants: function, method + dispatch: + MkldnnCPU: mkldnn_tanh_ + SparseCPU, SparseCUDA: tanh_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: tanh_sparse_csr_ + NestedTensorCPU, NestedTensorCUDA: NestedTensor_tanh_ + tags: pointwise + +- func: tanh.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: tanh_out + MPS: tanh_out_mps + SparseCPU, SparseCUDA: tanh_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: tanh_sparse_csr_out + tags: pointwise + +- func: tensordot(Tensor self, Tensor other, int[] dims_self, int[] dims_other) -> Tensor + variants: function + +- func: tensordot.out(Tensor self, Tensor other, int[] dims_self, int[] dims_other, *, Tensor(a!) out) -> Tensor(a!) + variants: function + +# TODO: namespace threshold in 'nn' +- func: threshold(Tensor self, Scalar threshold, Scalar value) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + structured_delegate: threshold.out + dispatch: + QuantizedCPU: threshold_quantized_cpu + tags: pointwise + +- func: threshold_(Tensor(a!) self, Scalar threshold, Scalar value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + structured_delegate: threshold.out + +- func: threshold.out(Tensor self, Scalar threshold, Scalar value, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: threshold_out + MPS: threshold_out_mps + +- func: threshold_backward.grad_input(Tensor grad_output, Tensor self, Scalar threshold, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: threshold_backward_out + MPS: threshold_backward_out_mps + SparseCPU, SparseCUDA: threshold_backward_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: threshold_backward_sparse_compressed_out + +- func: threshold_backward(Tensor grad_output, Tensor self, Scalar threshold) -> Tensor + variants: function + structured_delegate: threshold_backward.grad_input + dispatch: + MkldnnCPU: mkldnn_relu_backward + SparseCPU, SparseCUDA: threshold_backward_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: threshold_backward_sparse_compressed + NestedTensorCPU, NestedTensorCUDA: threshold_backwards_nested + tags: pointwise + +- func: tile(Tensor self, SymInt[] dims) -> Tensor + variants: function, method + dispatch: + CompositeImplicitAutograd: tile_symint + +- func: transpose.int(Tensor(a) self, int dim0, int dim1) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: transpose + NestedTensorCPU, NestedTensorCUDA: transpose_nested + +- func: transpose.Dimname(Tensor(a) self, Dimname dim0, Dimname dim1) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + +- func: _mkldnn_transpose(Tensor self, int dim0, int dim1) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + MkldnnCPU: mkldnn_transpose + +- func: transpose_(Tensor(a!) self, int dim0, int dim1) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + dispatch: + CompositeExplicitAutograd: transpose_ + +- func: _mkldnn_transpose_(Tensor(a!) self, int dim0, int dim1) -> Tensor(a!) + device_check: NoCheck + device_guard: False + dispatch: + MkldnnCPU: mkldnn_transpose_ + autogen: _mkldnn_transpose.out + +- func: one_hot(Tensor self, int num_classes=-1) -> Tensor + python_module: nn + variants: function + tags: dynamic_output_shape + +- func: flip(Tensor self, int[] dims) -> Tensor + variants: function, method + dispatch: + CPU, QuantizedCPU, CUDA, QuantizedCUDA: flip + MPS: flip_mps + autogen: flip.out + tags: core + +- func: fliplr(Tensor self) -> Tensor + variants: function, method + +- func: flipud(Tensor self) -> Tensor + variants: function, method + +- func: roll(Tensor self, SymInt[1] shifts, int[1] dims=[]) -> Tensor + variants: function, method + dispatch: + CPU, MPS: roll + CUDA: roll_cuda + autogen: roll.out + +# default int[] value [0,1] should not add space after comma, since codegen parser uses ', ' to split args + +- func: rot90(Tensor self, int k=1, int[] dims=[0,1]) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: rot90 + autogen: rot90.out + +- func: trapezoid.x(Tensor y, Tensor x, *, int dim=-1) -> Tensor + +- func: trapezoid.dx(Tensor y, *, Scalar dx=1, int dim=-1) -> Tensor + +- func: trapz.x(Tensor y, Tensor x, *, int dim=-1) -> Tensor + +- func: trapz.dx(Tensor y, *, float dx=1, int dim=-1) -> Tensor + +# Fused implementation detail for transformers. Adds in-projection bias to QKV and divides Q by sqrt(D/num_heads). +- func: _transform_bias_rescale_qkv(Tensor qkv, Tensor qkv_bias, int num_heads) -> (Tensor, Tensor, Tensor) + dispatch: + CPU, NestedTensorCPU: transform_bias_rescale_qkv_cpu + CUDA, NestedTensorCUDA: transform_bias_rescale_qkv_cuda + autogen: _transform_bias_rescale_qkv.out + +- func: _nested_tensor_from_mask(Tensor t, Tensor mask, bool mask_check=True) -> Tensor + dispatch: + CPU, CUDA: NestedTensor_nested_tensor_from_mask + autogen: _nested_tensor_from_mask.out + +- func: _nested_tensor_from_mask_left_aligned(Tensor t, Tensor mask) -> bool + dispatch: + CPU, CUDA: NestedTensor_nested_tensor_from_mask_left_aligned + +- func: _nested_from_padded(Tensor padded, Tensor cpu_nested_shape_example, bool fuse_transform_0213=False) -> Tensor + device_check: NoCheck # cpu_nested_shape_example will always be on CPU + dispatch: + CPU: nested_from_padded_generic + CUDA: nested_from_padded_cuda + autogen: _nested_from_padded.out + +# These private functions are temporary. They will be updated/deleted when nested tensors switch to using SymInts for their metadata representation +- func: _nested_tensor_size(Tensor self) -> Tensor + variants: method + dispatch: + NestedTensorCPU, NestedTensorCUDA: _nested_tensor_size + autogen: _nested_tensor_size.out + +- func: _nested_tensor_strides(Tensor self) -> Tensor + variants: method + dispatch: + NestedTensorCPU, NestedTensorCUDA: _nested_tensor_strides + autogen: _nested_tensor_strides.out + +- func: _nested_tensor_storage_offsets(Tensor self) -> Tensor + variants: method + dispatch: + NestedTensorCPU, NestedTensorCUDA, NestedTensorMeta: _nested_tensor_storage_offsets + autogen: _nested_tensor_storage_offsets.out + +# _nested_from_padded is not usable from Python, so +# _nested_from_padded_and_nested_example is available for testing. +- func: _nested_from_padded_and_nested_example(Tensor padded, Tensor nt_example) -> Tensor + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_from_padded_and_nested_example + autogen: _nested_from_padded_and_nested_example.out + +# The input arguments' types to this functions are temporary. When nested tensors switch to using SymInts for their metadata representation +# this will need to be updated +- func: _nested_view_from_buffer(Tensor(a) self, Tensor nested_size, Tensor nested_strides, Tensor offsets) -> Tensor(a) + variants: function + device_check: NoCheck + dispatch: + CPU, CUDA: _nested_view_from_buffer + +- func: _nested_view_from_buffer_copy(Tensor self, Tensor nested_size, Tensor nested_strides, Tensor offsets) -> Tensor + variants: function + device_check: NoCheck + tags: view_copy + dispatch: + CompositeExplicitAutogradNonFunctional: _nested_view_from_buffer_copy + autogen: _nested_view_from_buffer_copy.out + +- func: _nested_view_from_jagged(Tensor(a) self, Tensor offsets, Tensor dummy, Tensor? lengths=None, int ragged_idx=1, Tensor? min_seqlen=None, Tensor? max_seqlen=None) -> Tensor(a) + variants: function + device_check: NoCheck + dispatch: {} + +- func: _nested_view_from_jagged_copy(Tensor self, Tensor offsets, Tensor dummy, Tensor? lengths=None, int ragged_idx=1, Tensor? min_seqlen=None, Tensor? max_seqlen=None) -> Tensor + variants: function + device_check: NoCheck + tags: view_copy + dispatch: + CompositeExplicitAutogradNonFunctional: _nested_view_from_jagged_copy + autogen: _nested_view_from_jagged_copy.out + +- func: _nested_get_values(Tensor(a) self) -> Tensor(a) + variants: function + device_check: NoCheck + dispatch: {} + +- func: _nested_get_values_copy(Tensor self) -> Tensor + variants: function + device_check: NoCheck + tags: view_copy + dispatch: + CompositeExplicitAutogradNonFunctional: _nested_get_values_copy + autogen: _nested_get_values_copy.out + +- func: _nested_get_offsets(Tensor self) -> Tensor + variants: function + device_check: NoCheck + dispatch: {} + +# returns undefined Tensor if no lengths present +- func: _nested_get_lengths(Tensor self) -> Tensor + variants: function + device_check: NoCheck + dispatch: {} + +- func: _nested_get_ragged_idx(Tensor self) -> int + variants: function + device_check: NoCheck + dispatch: {} + +- func: _nested_get_min_seqlen(Tensor self) -> Tensor + variants: function + device_check: NoCheck + dispatch: {} + +- func: _nested_get_max_seqlen(Tensor self) -> Tensor + variants: function + device_check: NoCheck + dispatch: {} + +- func: _nested_get_jagged_dummy(Tensor any) -> Tensor + category_override: dummy + dispatch: {} + +- func: _nested_compute_contiguous_strides_offsets(Tensor nested_size) -> (Tensor, Tensor) + variants: function + device_check: NoCheck + dispatch: + CPU, CUDA: _nested_compute_contiguous_strides_offsets + +- func: _trilinear(Tensor i1, Tensor i2, Tensor i3, int[] expand1, int[] expand2, int[] expand3, int[] sumdim, int unroll_dim=1) -> Tensor + dispatch: + # calls unsqueeze + CompositeExplicitAutogradNonFunctional: _trilinear + autogen: _trilinear.out + +- func: triplet_margin_loss(Tensor anchor, Tensor positive, Tensor negative, float margin=1.0, float p=2, float eps=1e-06, bool swap=False, int reduction=Mean) -> Tensor + +- func: trunc(Tensor self) -> Tensor + structured_delegate: trunc.out + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + SparseCPU, SparseCUDA: trunc_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: trunc_sparse_csr + tags: [core, pointwise] + +- func: trunc_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: trunc.out + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + SparseCPU, SparseCUDA: trunc_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: trunc_sparse_csr_ + tags: pointwise + +- func: trunc.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: trunc_out + MPS: trunc_out_mps + SparseCPU, SparseCUDA: trunc_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: trunc_sparse_csr_out + tags: pointwise +# Alias for trunc + +- func: fix(Tensor self) -> Tensor + variants: function, method + +- func: fix_(Tensor(a!) self) -> Tensor(a!) + variants: function, method + +- func: fix.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: type_as(Tensor self, Tensor other) -> Tensor + variants: method + +- func: _has_compatible_shallow_copy_type(Tensor self, Tensor from) -> bool + variants: function + +- func: _unique(Tensor self, bool sorted=True, bool return_inverse=False) -> (Tensor, Tensor) + variants: function + dispatch: + CPU: _unique_cpu + CUDA: _unique_cuda + autogen: _unique.out + +- func: unique_dim(Tensor self, int dim, bool sorted=True, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) + variants: function + dispatch: + CPU: unique_dim_cpu + CUDA: unique_dim_cuda + tags: dynamic_output_shape + autogen: unique_dim.out + +- func: unique_consecutive(Tensor self, bool return_inverse=False, bool return_counts=False, int? dim=None) -> (Tensor, Tensor, Tensor) + variants: function + dispatch: + CPU: unique_consecutive_cpu + CUDA: unique_consecutive_cuda + MPS: unique_consecutive_mps + tags: dynamic_output_shape + autogen: unique_consecutive.out + +- func: unique_dim_consecutive(Tensor self, int dim, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) + variants: function + dispatch: + CPU: unique_dim_consecutive_cpu + CUDA: unique_dim_consecutive_cuda + MPS: unique_dim_consecutive_mps + tags: dynamic_output_shape + autogen: unique_dim_consecutive.out + +# _unique and _unique_dim are fragile and modifying them easily cause internal break +# the below operator is a temporary hack for adding return_counts support +# Please don't rely on these two operators, they will be removed soon + +- func: _unique2(Tensor self, bool sorted=True, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) + variants: function + dispatch: + CPU: _unique2_cpu + CUDA: _unique2_cuda + MPS: _unique2_mps + tags: dynamic_output_shape + autogen: _unique2.out + +- func: _unsafe_view(Tensor self, SymInt[] size) -> Tensor + dispatch: + CompositeExplicitAutograd: _unsafe_view + autogen: _unsafe_view.out + +- func: unsqueeze(Tensor(a) self, int dim) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: unsqueeze + SparseCPU, SparseCUDA: unsqueeze_sparse + QuantizedCPU, QuantizedCUDA: unsqueeze_quantized + NestedTensorCPU, NestedTensorCUDA: unsqueeze_nested + tags: core + +- func: unsqueeze_(Tensor(a!) self, int dim) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + dispatch: + CompositeExplicitAutograd: unsqueeze_ + +- func: vander(Tensor x, int? N=None, bool increasing=False) -> Tensor + +- func: var(Tensor self, bool unbiased=True) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + cpp_no_default_args: ["unbiased"] + +- func: var.dim(Tensor self, int[1]? dim, bool unbiased=True, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + tags: core + cpp_no_default_args: ["unbiased"] + +- func: var.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA: var + MPS: var_mps + tags: core + +- func: var.out(Tensor self, int[1]? dim, bool unbiased=True, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + cpp_no_default_args: ["unbiased"] + +- func: var.correction_out(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: var_out + +- func: var.names_dim(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + cpp_no_default_args: ["unbiased"] + +- func: var.names_out(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + cpp_no_default_args: ["unbiased"] + +- func: var.correction_names(Tensor self, Dimname[1] dim, *, Scalar? correction=None, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: var.correction_names_out(Tensor self, Dimname[1] dim, *, Scalar? correction=None, bool keepdim=False, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + +- func: var_mean(Tensor self, bool unbiased=True) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + cpp_no_default_args: ["unbiased"] + +- func: var_mean.dim(Tensor self, int[1]? dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + cpp_no_default_args: ["unbiased"] + +- func: var_mean.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CPU, CUDA: var_mean + MPS: var_mean_mps + autogen: var_mean.correction_out + +- func: var_mean.names_dim(Tensor self, Dimname[1] dim, bool unbiased=True, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + cpp_no_default_args: ["unbiased"] + +- func: var_mean.correction_names(Tensor self, Dimname[1] dim, *, Scalar? correction=None, bool keepdim=False) -> (Tensor, Tensor) + device_check: NoCheck # TensorIterator + variants: function + +- func: view_as(Tensor(a) self, Tensor other) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + +- func: where.self(Tensor condition, Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CPU, CUDA, MPS: where + NestedTensorCPU, NestedTensorCUDA: NestedTensor_where + tags: [core, pointwise] + +- func: where.self_out(Tensor condition, Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA, MPS: where_self_out + NestedTensorCPU, NestedTensorCUDA: NestedTensor_where_out + +- func: where.ScalarSelf(Tensor condition, Scalar self, Tensor other) -> Tensor + variants: function + +- func: where.ScalarOther(Tensor condition, Tensor self, Scalar other) -> Tensor + variants: function, method + +- func: where.Scalar(Tensor condition, Scalar self, Scalar other) -> Tensor + variants: function + +- func: where(Tensor condition) -> Tensor[] + device_check: NoCheck # TensorIterator + variants: function + +- func: norm_except_dim(Tensor v, int pow=2, int dim=0) -> Tensor + variants: function + +# VariableType::_weight_norm does not want to be given a gap in the autograd graph, +# so we don't define "dispatch" variants for it. +- func: _weight_norm(Tensor v, Tensor g, int dim=0) -> Tensor + variants: function + +- func: _weight_norm_interface(Tensor v, Tensor g, int dim=0) -> (Tensor, Tensor) + variants: function + dispatch: + CPU: weight_norm_cpu + CUDA: weight_norm_cuda + MPS: weight_norm_mps + autogen: _weight_norm_interface.out + +- func: _weight_norm_interface_backward(Tensor grad_w, Tensor saved_v, Tensor saved_g, Tensor saved_norms, int dim) -> (Tensor, Tensor) + variants: function + dispatch: + CPU: weight_norm_backward_cpu + CUDA: weight_norm_backward_cuda + MPS: weight_norm_backward_mps + autogen: _weight_norm_interface_backward.out + +- func: _weight_norm_differentiable_backward(Tensor grad_w, Tensor saved_v, Tensor saved_g, Tensor saved_norms, int dim) -> (Tensor, Tensor) + variants: function + +- func: zeros.names(int[] size, *, Dimname[]? names, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: zeros + autogen: zeros.names_out + +- func: _efficientzerotensor(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CPU: _efficientzerotensor + CUDA: _efficientzerotensor_cuda + MPS: _efficientzerotensor_mps + Meta: _efficientzerotensor_meta_symint + autogen: _efficientzerotensor.out + +- func: zeros(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: zeros_symint + +- func: zeros.out(SymInt[] size, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: zeros_out + SparseCPU, SparseCUDA, SparseMeta: zeros_sparse_out + +- func: zeros_like(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor + dispatch: + # NB: Although this composite mutates on the inside, it is + # non-differentiable so NonFunctional doesn't apply + CompositeExplicitAutograd, CompositeImplicitAutogradNestedTensor: zeros_like + autogen: zeros_like.out + +- func: _standard_gamma_grad(Tensor self, Tensor output) -> Tensor + variants: function + dispatch: + CPU: _standard_gamma_grad_cpu + CUDA: _standard_gamma_grad_cuda + autogen: _standard_gamma_grad.out + +- func: _standard_gamma(Tensor self, Generator? generator=None) -> Tensor + variants: function + dispatch: + CPU: _s_gamma_cpu + CUDA: _s_gamma_cuda + tags: nondeterministic_seeded + autogen: _standard_gamma.out + +- func: _dirichlet_grad(Tensor x, Tensor alpha, Tensor total) -> Tensor + dispatch: + CPU: _dirichlet_grad_cpu + CUDA: _dirichlet_grad_cuda + autogen: _dirichlet_grad.out + +- func: _sample_dirichlet(Tensor self, Generator? generator=None) -> Tensor + tags: nondeterministic_seeded + variants: function + dispatch: + CPU: _s_dirichlet_cpu + CUDA: _s_dirichlet_cuda + autogen: _sample_dirichlet.out + +- func: poisson(Tensor self, Generator? generator=None) -> Tensor + device_check: NoCheck # TensorIterator + dispatch: + CPU: _s_poisson_cpu + CUDA: _s_poisson_cuda + tags: nondeterministic_seeded + autogen: poisson.out + +- func: binomial(Tensor count, Tensor prob, Generator? generator=None) -> Tensor + device_check: NoCheck # TensorIterator + dispatch: + CPU: _s_binomial_cpu + CUDA: _s_binomial_cuda + tags: nondeterministic_seeded + autogen: binomial.out + +# When more variants get ported to native, this dispatch will get more +# complicated + +- func: native_norm(Tensor self, Scalar p=2) -> Tensor + dispatch: + SparseCPU, SparseCUDA: norm_sparse + autogen: native_norm.out + +- func: native_norm.ScalarOpt_dim_dtype(Tensor self, Scalar? p, int[1] dim, bool keepdim, ScalarType? dtype) -> Tensor + dispatch: + SparseCPU, SparseCUDA: norm_sparse + autogen: native_norm.ScalarOpt_dim_dtype_out + +- func: _batch_norm_with_update(Tensor input, Tensor? weight, Tensor? bias, Tensor(a!) running_mean, Tensor(b!) running_var, float momentum, float eps) -> (Tensor, Tensor, Tensor, Tensor) + dispatch: + CPU: _batch_norm_with_update_cpu + CUDA: _batch_norm_with_update_cuda + MPS: _batch_norm_with_update_mps + MkldnnCPU: _batch_norm_with_update_mkldnn + autogen: _batch_norm_with_update_functional + +- func: _batch_norm_with_update.out(Tensor input, Tensor? weight, Tensor? bias, Tensor(a!) running_mean, Tensor(b!) running_var, float momentum, float eps, *, Tensor(d!) out, Tensor(e!) save_mean, Tensor(f!) save_invstd, Tensor(g!) reserve) -> (Tensor(d!), Tensor(e!), Tensor(f!), Tensor(g!)) + dispatch: + CPU: _batch_norm_with_update_cpu_out + CUDA: _batch_norm_with_update_cuda_out + MPS: _batch_norm_with_update_mps_out + +- func: _batch_norm_no_update(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, float momentum, float eps) -> (Tensor, Tensor, Tensor, Tensor) + dispatch: + CompositeExplicitAutograd: _batch_norm_no_update + autogen: _batch_norm_no_update.out + +- func: batch_norm_backward(Tensor grad_out, Tensor input, Tensor weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var, bool update, float eps, bool[3] output_mask, Tensor reserve) -> (Tensor, Tensor, Tensor) + dispatch: + CPU: _new_batch_norm_backward_cpu + CUDA: _new_batch_norm_backward_cuda + MPS: _new_batch_norm_backward_mps + MkldnnCPU: _new_batch_norm_backward_mkldnn + +# TODO: reduce signatures down to one when optional args is available +- func: _sparse_sum(Tensor self) -> Tensor + +- func: _sparse_sum.dtype(Tensor self, *, ScalarType dtype) -> Tensor + +- func: _sparse_sum.dim(Tensor self, int[1] dim) -> Tensor + dispatch: + CompositeExplicitAutograd: _sparse_sum + autogen: _sparse_sum.dim_out + +- func: _sparse_sum.dim_dtype(Tensor self, int[1] dim, *, ScalarType dtype) -> Tensor + +- func: _sparse_sum_backward(Tensor grad, Tensor self, int[] dim) -> Tensor + dispatch: + SparseCPU: _sparse_sum_backward_cpu + SparseCUDA: _sparse_sum_backward_cuda + autogen: _sparse_sum_backward.out + +- func: _sparse_csr_sum.dim_dtype(Tensor self, int[1] dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + dispatch: + SparseCsrCPU: _sparse_csr_sum_cpu + SparseCsrCUDA: _sparse_csr_sum_cuda + autogen: _sparse_csr_sum.dim_dtype_out + +- func: _sparse_csr_prod.dim_dtype(Tensor self, int[1] dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + dispatch: + SparseCsrCPU: _sparse_csr_prod_cpu + SparseCsrCUDA: _sparse_csr_prod_cuda + autogen: _sparse_csr_prod.dim_dtype_out + +- func: _sparse_softmax.int(Tensor self, int dim, ScalarType? dtype=None) -> Tensor + python_module: sparse + variants: function + +- func: _sparse_softmax.Dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor + python_module: sparse + variants: function + +- func: _sparse_softmax(Tensor self, int dim, bool half_to_float) -> Tensor + python_module: sparse + dispatch: + SparseCPU: softmax_sparse_cpu + SparseCUDA: softmax_sparse_cuda + autogen: _sparse_softmax.out + +- func: _sparse_softmax_backward_data(Tensor grad_output, Tensor output, int dim, Tensor self) -> Tensor + dispatch: + SparseCPU: softmax_backward_sparse_cpu + SparseCUDA: softmax_backward_sparse_cuda + autogen: _sparse_softmax_backward_data.out + +- func: _sparse_log_softmax.int(Tensor self, int dim, ScalarType? dtype=None) -> Tensor + python_module: sparse + variants: function + +- func: _sparse_log_softmax.Dimname(Tensor self, Dimname dim, *, ScalarType? dtype=None) -> Tensor + python_module: sparse + variants: function + +- func: _sparse_log_softmax(Tensor self, int dim, bool half_to_float) -> Tensor + python_module: sparse + dispatch: + SparseCPU: log_softmax_sparse_cpu + SparseCUDA: log_softmax_sparse_cuda + autogen: _sparse_log_softmax.out + +- func: _sparse_log_softmax_backward_data(Tensor grad_output, Tensor output, int dim, Tensor self) -> Tensor + dispatch: + SparseCPU: log_softmax_backward_sparse_cpu + SparseCUDA: log_softmax_backward_sparse_cuda + autogen: _sparse_log_softmax_backward_data.out + +- func: _spdiags(Tensor diagonals, Tensor offsets, int[] shape, Layout? layout=None) -> Tensor + python_module: sparse + dispatch: + CPU: spdiags + autogen: _spdiags.out + +- func: norm.ScalarOpt_dtype(Tensor self, Scalar? p, *, ScalarType dtype) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: norm + autogen: norm.ScalarOpt_dtype_out + +- func: norm.Scalar(Tensor self, Scalar p=2) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: norm + autogen: norm.Scalar_out + +- func: norm.ScalarOpt_dim_dtype(Tensor self, Scalar? p, int[1] dim, bool keepdim, *, ScalarType dtype) -> Tensor + structured_delegate: norm.dtype_out + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + SparseCPU, SparseCUDA: sparse_dtype_norm + +- func: norm.ScalarOpt_dim(Tensor self, Scalar? p, int[1] dim, bool keepdim=False) -> Tensor + structured_delegate: norm.out + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + SparseCPU, SparseCUDA: sparse_norm + +- func: norm.dtype_out(Tensor self, Scalar? p, int[1] dim, bool keepdim, *, ScalarType dtype, Tensor(a!) out) -> Tensor(a!) + structured: True + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: norm_dtype_out + MPS: norm_dtype_out_mps + +- func: norm.out(Tensor self, Scalar? p, int[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + structured: True + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: norm_out + MPS: norm_out_mps + +# These four redispatch in their implementation, so OK to be CompositeImplicitAutograd +- func: norm.names_ScalarOpt_dim_dtype(Tensor self, Scalar? p, Dimname[1] dim, bool keepdim, *, ScalarType dtype) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: norm.names_ScalarOpt_dim(Tensor self, Scalar? p, Dimname[1] dim, bool keepdim=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: norm.names_dtype_out(Tensor self, Scalar? p, Dimname[1] dim, bool keepdim, *, ScalarType dtype, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: norm.names_out(Tensor self, Scalar? p, Dimname[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: frexp.Tensor(Tensor self) -> (Tensor mantissa, Tensor exponent) + variants: method, function + dispatch: + CompositeExplicitAutograd: frexp + tags: pointwise + +- func: frexp.Tensor_out(Tensor self, *, Tensor(a!) mantissa, Tensor(b!) exponent) -> (Tensor(a!) mantissa, Tensor(b!) exponent) + dispatch: + CPU, CUDA: frexp_out + tags: pointwise + +# Deprecated (v.1.12) +- func: frobenius_norm.dim(Tensor self, int[1] dim, bool keepdim=False) -> Tensor + variants: function + +# Deprecated (v.1.12) +- func: frobenius_norm.out(Tensor self, int[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + variants: function + +# Deprecated (v.1.12) +- func: nuclear_norm(Tensor self, bool keepdim=False) -> Tensor + variants: function + +# Deprecated (v.1.12) +- func: nuclear_norm.out(Tensor self, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + variants: function + +# Deprecated (v.1.12) +- func: nuclear_norm.dim(Tensor self, int[2] dim, bool keepdim=False) -> Tensor + variants: function + +# Deprecated (v.1.12) +- func: nuclear_norm.dim_out(Tensor self, int[2] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + variants: function + +- func: clone(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: clone + SparseCPU, SparseCUDA: clone_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: clone_sparse_compressed + MkldnnCPU: mkldnn_clone + QuantizedCPU, QuantizedCUDA: quantized_clone + NestedTensorCPU, NestedTensorCUDA: clone_nested + autogen: clone.out + tags: [core, pointwise] + +- func: positive(Tensor(a) self) -> Tensor(a) + variants: function, method + tags: pointwise + +- func: resize_as_(Tensor(a!) self, Tensor the_template, *, MemoryFormat? memory_format=None) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + variants: function, method + dispatch: + CompositeExplicitAutograd: resize_as_ + autogen: resize_as, resize_as.out + tags: inplace_view + +- func: resize_as_sparse_(Tensor(a!) self, Tensor the_template) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + variants: function, method + dispatch: + SparseCPU, SparseCUDA: resize_as_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: resize_as_sparse_compressed_ + autogen: resize_as_sparse, resize_as_sparse.out + +- func: zero_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CPU, CUDA: zero_ + MPS: zero_mps_ + Meta: zero_meta_ + SparseCPU, SparseCUDA, SparseMeta: zero_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: zero_sparse_csr_ + MkldnnCPU: mkldnn_zero_ + NestedTensorCPU, NestedTensorCUDA: zero_nested_ + autogen: zero, zero.out + +- func: sub.out(Tensor self, Tensor other, *, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sub_out + MPS: sub_out_mps + SparseCPU, SparseCUDA: sub_out_sparse + tags: pointwise + +- func: sub.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: sub.out + dispatch: + SparseCPU, SparseCUDA: sub_sparse + ZeroTensor: sub_zerotensor + NestedTensorCPU, NestedTensorCUDA: NestedTensor_sub_Tensor + tags: [core, pointwise] + +- func: sub_.Tensor(Tensor(a!) self, Tensor other, *, Scalar alpha=1) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: sub.out + dispatch: + SparseCPU, SparseCUDA: sub_sparse_ + tags: pointwise +# For C++ only, until we have conversion from C++ numbers to Tensor + +- func: sub.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: sub + tags: [core, pointwise] + +- func: sub_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: sub_ + autogen: sub.Scalar_out + tags: pointwise +# subtract, alias for sub + +- func: subtract.out(Tensor self, Tensor other, *, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + +- func: subtract.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + variants: function, method + +- func: subtract_.Tensor(Tensor(a!) self, Tensor other, *, Scalar alpha=1) -> Tensor(a!) + variants: method + +# For C++ only, until we have conversion from C++ numbers to Tensor +- func: subtract.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + variants: function, method + +- func: subtract_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!) + variants: method + +- func: rsub.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CPU, CUDA: rsub + autogen: rsub.Tensor_out + +- func: heaviside.out(Tensor self, Tensor values, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: heaviside_out + tags: pointwise + +- func: heaviside(Tensor self, Tensor values) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: heaviside.out + tags: pointwise + +- func: heaviside_(Tensor(a!) self, Tensor values) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: heaviside.out + +# For C++ only, until we have conversion from C++ numbers to Tensor +- func: rsub.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: rsub + autogen: rsub.Scalar_out + +# Functionally the same as addmm, but we give it a different derivative formula +# that doesn't propagate gradients to non-present entries on sparse. + tags: pointwise +- func: _sparse_addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + python_module: sparse + dispatch: + CompositeExplicitAutograd: _sparse_addmm + autogen: _sparse_addmm.out + +- func: sparse_sampled_addmm.out(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + python_module: sparse + dispatch: + SparseCsrCUDA: sparse_sampled_addmm_out_sparse_csr_cuda + SparseCsrCPU: sparse_sampled_addmm_out_sparse_csr_cpu + +- func: sparse_sampled_addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + python_module: sparse + dispatch: + SparseCsrCUDA: sparse_sampled_addmm_sparse_csr_cuda + SparseCsrCPU: sparse_sampled_addmm_sparse_csr_cpu + +- func: _sparse_mm_reduce_impl(Tensor self, Tensor other, str reduce) -> (Tensor, Tensor) + python_module: sparse + dispatch: + SparseCsrCPU: _sparse_mm_reduce_impl_sparse_csr_cpu + +- func: _sparse_mm_reduce_impl_backward(Tensor self, Tensor grad_out, Tensor weight, str reduce, Tensor arg_out, bool[2] output_mask) -> (Tensor, Tensor) + python_module: sparse + dispatch: + SparseCsrCPU: _sparse_mm_reduce_impl_backward_sparse_csr_cpu + +- func: addmm.out(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: addmm_out_cpu + CUDA: addmm_out_cuda + MPS: addmm_out_mps + XPU: addmm_out_xpu + SparseCPU: addmm_out_sparse_dense_cpu + SparseCUDA: addmm_out_sparse_dense_cuda + SparseCsrCPU: addmm_out_sparse_compressed_cpu + SparseCsrCUDA: addmm_out_sparse_compressed_cuda + +- func: addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + structured_delegate: addmm.out + variants: function, method + dispatch: + SparseCPU: addmm_sparse_dense_cpu + SparseCUDA: addmm_sparse_dense_cuda + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: addmm_sparse_compressed_dense + tags: core + +- func: addmm_(Tensor(a!) self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) + structured_delegate: addmm.out + variants: method + dispatch: + # Warning! For whatever reason, the inplace sparse addmm is NON + # broadcasting + SparseCPU: s_addmm_sparse_dense_cpu_ + SparseCUDA: s_addmm_sparse_dense_cuda_ + +- func: _addmm_activation.out(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1, bool use_gelu=False, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: addmm_activation_out_cpu + CUDA: addmm_activation_out_cuda + XPU: addmm_activation_out_xpu + +- func: _addmm_activation(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1, bool use_gelu=False) -> Tensor + structured_delegate: _addmm_activation.out + variants: function, method + +- func: _scaled_mm(Tensor self, Tensor mat2, Tensor scale_a, Tensor scale_b, Tensor? bias=None, Tensor? scale_result=None, ScalarType? out_dtype=None, bool use_fast_accum=False) -> Tensor + variants: function + dispatch: + CUDA: _scaled_mm_cuda + +- func: _scaled_mm.out(Tensor self, Tensor mat2, Tensor scale_a, Tensor scale_b, Tensor? bias=None, Tensor? scale_result=None, ScalarType? out_dtype=None, bool use_fast_accum=False, *, Tensor(a!) out) -> Tensor(a!) + variants: function + dispatch: + CUDA: _scaled_mm_out_cuda + +# NOTE [ Sparse: autograd and API ] +# +# +# Sparse Tensor Constructors +# ~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# The API entry points to sparse tensor construction should be +# `sparse_coo tensor` and `_sparse_coo_tensor_unsafe`. Depending on whether the +# indices and values tensors are given, they eventually dispatch to either +# `sparse_coo_tensor_with_dims` or `sparse_coo_tensor_with_dims_and_tensors`. +# +# The autograd support for ctor is implement on `sparse_coo_tensor_with_dims_and_tensors`. +# +# The API methods `sparse_coo tensor` and `_sparse_coo_tensor_unsafe` +# **must not** have specific type dispatches because otherwise codegen will +# consider them as abstract methods (see Note [Abstract ATen methods]), dispatch +# using **Tensor** type, and thus lose autograd tracking on the actual method +# they dispatch to, e.g., `sparse_coo_tensor_with_dims_and_tensors`. +# +# +# Sparse Methods API Design +# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Goals: 1. Flexible API for users to write custom sparse ops +# 2. ctor and member accessor with autograd support +# +# To achieve 1, we need to provide a set of *dangerous* APIs (dangerous in the +# sense that misusing them will break sparse tensor invariant and may out in +# unexpected behavior, e.g., crash). These methods are all prefixed with +# underscore "_" to indicate that they should be used with care. We provide: +# +# + `_indices()`: returns the *raw* indices within the sparse tensor (not just +# sharing storage). Any inplace operation will change the +# actual indices, including t_, set_, as_strided_, resize_, +# etc. +# + `_values()`: returns the *raw* values within the sparse tensor. Similar +# semantics as `_indices()` +# + `_nnz()`: returns the number of non-zero entries. This will always be +# determined by the shapes of indices and values. +# + `_coalesced_(bool)`: inplace sets whether the tensor is coalesced, and +# returns itself. +# +# These methods are very useful in writing new operations, e.g., a custom +# autograd Function. +# +# We also provide other public *safe* APIs: +# + `indices()`: returns a **view** of the indices tensor if the sparse tensor +# is **coalesced**. +# + `values()`: returns a **view** of the values tensor if the containing +# sparse tensor is **coalesced**. +# + `sparse_dim()`: number of sparse dimensions +# + `dense_dim()`: number of dense dimensions +# + `is_coalesced()`: whether the sparse tensor is coalesced +# +# `_indices()` and `_values()` should returns the raw indices and values dense +# tensors within a sparse tensor. They can be quite unsafe with inplace +# operations like `t_()`, and exposes uncoalesced indices and values. The public +# recommended API is `indices()` and `values()`, both of which first check that +# the tensor is coalesced and return views on those tensors. +# +# +# Autograd Support +# ~~~~~~~~~~~~~~~~ +# +# Autograd is supported on `values()` and sparse tensor ctor with indices and +# values tensors. E.g., `torch.sparse_coo_tensor(i, v).values().sum()` is +# differentiable w.r.t. `v`. +# +# NB: The `values()` and `_values()` operators are special in that they are +# layout-aware, i.e., the output depends not just on the data it represents, but +# also on the input layout details (in this case, the `indices` tensor). See +# NOTE [ as_strided Backward and layout-aware/agnostic autograd ] in Functions.cpp +# for discussion on layout-aware vs layout-agnostic autograd. Since PyTorch ops +# operate in the layout-agnostic mode, similar to `as_strided`, backward of +# these two operators need to consider them in a layout-agnostic way: +# + `values()`: +# Input is coalesced. +# We just pretend having `input.indices()` as an additional argument +# `input_indices`, then forward is similar to +# `input.to(kStrided).index_select(input_indices)` regardless of the layout. +# Note that `values()` normally is layout-aware even if we constrain +# ourselves on sparse inputs since it may include all zeros values entries +# as "present" entries. +# + `_values()`: +# Input may be uncoalesced. +# It is not straightforward to construct a layout-agnostic version because +# duplicate indices entries may exist and additional parameterization is +# needed to distribute the value into different values entries. Furthermore, +# this op is intended to provide ways to write custom sparse ops, rather +# than being used in autograd graph, so it is marked as *non-differentiable* +# in derivatives.yaml. +# +# Before reading the following, see NOTE [ Autograd Variable Views ] in +# variable.h for details on views that are tracked by autograd, and views that +# are not. +# +# Moreover, these methods return tensors that share storage with inputs, so we +# mark these methods as view ops to support autograd history tracking. +# The sparse tensor ctor output should technically be view of both input indices +# and values tensors, but currently we only support setting as view of a single +# Variable, so it is only view of the values tensor. +# TODO: clone indices in sparse tensor ctor. +# +# For other methods that return outputs that share storage with inputs, i.e., +# `indices()` and `_indices()`. We mark their outputs as non-differentiable, so +# the view relation is not tracked by autograd, but the version counter is still +# shared. In other words, their outputs are non-differentiable views of the +# sparse tensor. +# FIXME: would be nicer if TensorOptions was optional based; not adding default arguments for options given +# the default would never make sense. + +- func: _sparse_compressed_tensor_with_dims(int nnz, int dense_dim, int[] size, int[] blocksize, ScalarType index_dtype, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + dispatch: + CompositeExplicitAutograd: sparse_compressed_tensor_with_dims + +- func: sparse_compressed_tensor.comp_plain_value_size(Tensor compressed_indices, Tensor plain_indices, Tensor values, SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + dispatch: + CompositeExplicitAutograd: sparse_compressed_tensor + +- func: sparse_csr_tensor.crow_col_value_size(Tensor crow_indices, Tensor col_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor +- func: sparse_csc_tensor.ccol_row_value_size(Tensor ccol_indices, Tensor row_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor +- func: sparse_bsr_tensor.crow_col_value_size(Tensor crow_indices, Tensor col_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor +- func: sparse_bsc_tensor.ccol_row_value_size(Tensor ccol_indices, Tensor row_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + +- func: sparse_compressed_tensor.comp_plain_value(Tensor compressed_indices, Tensor plain_indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + dispatch: + CompositeExplicitAutograd: sparse_compressed_tensor +- func: sparse_csr_tensor.crow_col_value(Tensor crow_indices, Tensor col_indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor +- func: sparse_csc_tensor.ccol_row_value(Tensor ccol_indices, Tensor row_indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor +- func: sparse_bsr_tensor.crow_col_value(Tensor crow_indices, Tensor col_indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor +- func: sparse_bsc_tensor.ccol_row_value(Tensor ccol_indices, Tensor row_indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + +- func: _sparse_compressed_tensor_unsafe(Tensor compressed_indices, Tensor plain_indices, Tensor values, SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeImplicitAutograd: _sparse_compressed_tensor_unsafe_symint + +- func: _sparse_csr_tensor_unsafe(Tensor crow_indices, Tensor col_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor +- func: _sparse_csc_tensor_unsafe(Tensor ccol_indices, Tensor row_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor +- func: _sparse_bsr_tensor_unsafe(Tensor crow_indices, Tensor col_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor +- func: _sparse_bsc_tensor_unsafe(Tensor ccol_indices, Tensor row_indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + +- func: sparse_coo_tensor.size(int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + dispatch: + CompositeExplicitAutograd: sparse_coo_tensor + autogen: sparse_coo_tensor.size_out + +- func: sparse_coo_tensor.indices(Tensor indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, bool? is_coalesced=None) -> Tensor + +- func: sparse_coo_tensor.indices_size(Tensor indices, Tensor values, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, bool? is_coalesced=None) -> Tensor + +- func: _sparse_coo_tensor_unsafe(Tensor indices, Tensor values, SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, bool? is_coalesced=None) -> Tensor + dispatch: + CompositeImplicitAutograd: _sparse_coo_tensor_unsafe_symint + +- func: _validate_sparse_coo_tensor_args(Tensor indices, Tensor values, int[] size, bool? is_coalesced=None) -> () + +- func: _validate_sparse_compressed_tensor_args(Tensor compressed_indices, Tensor plain_indices, Tensor values, int[] size, Layout layout) -> () +- func: _validate_sparse_csr_tensor_args(Tensor crow_indices, Tensor col_indices, Tensor values, int[] size) -> () +- func: _validate_sparse_csc_tensor_args(Tensor ccol_indices, Tensor row_indices, Tensor values, int[] size) -> () +- func: _validate_sparse_bsr_tensor_args(Tensor crow_indices, Tensor col_indices, Tensor values, int[] size) -> () +- func: _validate_sparse_bsc_tensor_args(Tensor ccol_indices, Tensor row_indices, Tensor values, int[] size) -> () + +- func: _sparse_coo_tensor_with_dims(int sparse_dim, int dense_dim, int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + dispatch: + SparseCPU, SparseCUDA, SparseMeta, Meta: new_with_dims_sparse + autogen: _sparse_coo_tensor_with_dims.out + +- func: _sparse_coo_tensor_with_dims_and_tensors(int sparse_dim, int dense_dim, SymInt[] size, Tensor indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False, bool? is_coalesced=None) -> Tensor + dispatch: + SparseCPU, SparseCUDA, SparseMeta, Meta: new_with_dims_and_tensor_sparse_symint + autogen: _sparse_coo_tensor_with_dims_and_tensors.out + +- func: sparse_resize_(Tensor(a!) self, int[] size, int sparse_dim, int dense_dim) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: sparse_resize_ + autogen: sparse_resize, sparse_resize.out + +- func: sparse_resize_and_clear_(Tensor(a!) self, int[] size, int sparse_dim, int dense_dim) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: sparse_resize_and_clear_ + autogen: sparse_resize_and_clear, sparse_resize_and_clear.out + +- func: sparse_mask(Tensor self, Tensor mask) -> Tensor + variants: method + dispatch: + SparseCPU, SparseCUDA: sparse_mask + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_mask_sparse_compressed + autogen: sparse_mask.out + +- func: _sparse_mask_projection(Tensor self, Tensor mask, bool accumulate_matches=False) -> Tensor + variants: method + dispatch: + SparseCPU, SparseCUDA: sparse_mask_projection + autogen: _sparse_mask_projection.out + +- func: _to_cpu(Tensor[] tensors) -> Tensor[] + variants: function + +- func: to_dense(Tensor self, ScalarType? dtype=None, *, bool? masked_grad=None) -> Tensor + variants: method + +# Special case of to_dense with custom derivative +- func: _to_dense(Tensor self, ScalarType? dtype=None, bool? masked_grad=None) -> Tensor + variants: method + dispatch: + SparseCPU, SparseCUDA: sparse_to_dense + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_compressed_to_dense + MkldnnCPU: mkldnn_to_dense + autogen: _to_dense.out + +- func: to_dense_backward(Tensor grad, Tensor input, bool? masked_grad=None) -> Tensor + +- func: sparse_dim(Tensor self) -> int + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: sparse_dim_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_dim_sparse_csr + CompositeExplicitAutograd: sparse_dim_default + device_check: NoCheck + device_guard: False + +# legacy method +- func: _dimI(Tensor self) -> int + variants: method + dispatch: + SparseCPU, SparseCUDA: sparse_dim_sparse + device_check: NoCheck + device_guard: False + +- func: dense_dim(Tensor self) -> int + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: dense_dim_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: dense_dim_sparse_csr + CompositeExplicitAutograd: dense_dim_default + device_check: NoCheck + device_guard: False + +# legacy method +- func: _dimV(Tensor self) -> int + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: dense_dim_sparse + device_check: NoCheck + device_guard: False + +- func: _nnz(Tensor self) -> int + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: _nnz_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: _nnz_sparse_csr + device_check: NoCheck + device_guard: False + +# NOTE: [ coalesce autograd ] +# coalesce returns self directly for already coalesced sparse tensors. +# This means coalesce cannot have a derivative registered, otherwise it creates +# circular references in the autograd graph (see gh-52874). +# Instead, the derivative is registered on the slow-path "_coalesce" +- func: coalesce(Tensor(a) self) -> Tensor(a) + variants: method + +- func: _coalesce(Tensor self) -> Tensor + dispatch: + SparseCPU: _coalesce_sparse_cpu + SparseCUDA: _coalesce_sparse_cuda + autogen: _coalesce.out + +- func: is_coalesced(Tensor self) -> bool + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: is_coalesced_sparse + CompositeExplicitAutograd: is_coalesced_default + device_check: NoCheck + device_guard: False + +- func: _indices(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: _indices_sparse + device_check: NoCheck + device_guard: False + +- func: _values(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: _values_sparse + device_check: NoCheck + device_guard: False + +# This method doesn't do any check but only directly sets the flag. So it can be +# a bit unsafe. Similar to _indices and _values, this is useful for implementing +# custom sparse operations in Python/C++ extension. +- func: _coalesced_(Tensor(a!) self, bool coalesced) -> Tensor(a!) + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: _coalesced_sparse_ + device_check: NoCheck + device_guard: False + autogen: _coalesced, _coalesced.out + +- func: indices(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: indices_sparse + CompositeExplicitAutograd: indices_default + device_check: NoCheck + device_guard: False + +- func: values(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCPU, SparseCUDA, SparseMeta: values_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: values_sparse_csr + NestedTensorCPU, NestedTensorCUDA: values_nested + CompositeExplicitAutograd: values_default + device_check: NoCheck + device_guard: False + +- func: crow_indices(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: crow_indices_sparse_csr + CompositeExplicitAutograd: crow_indices_default + device_check: NoCheck + device_guard: False + +- func: col_indices(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: col_indices_sparse_csr + CompositeExplicitAutograd: col_indices_default + device_check: NoCheck + device_guard: False + +- func: ccol_indices(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: ccol_indices_sparse_csr + CompositeExplicitAutograd: ccol_indices_default + device_check: NoCheck + device_guard: False + +- func: row_indices(Tensor(a) self) -> Tensor(a) + variants: method + dispatch: + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: row_indices_sparse_csr + CompositeExplicitAutograd: row_indices_default + device_check: NoCheck + device_guard: False + +- func: hspmm.out(Tensor mat1, Tensor mat2, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + SparseCPU: hspmm_out_sparse_cpu + SparseCUDA: hspmm_out_sparse_cuda + +- func: hspmm(Tensor mat1, Tensor mat2) -> Tensor + dispatch: + SparseCPU: hspmm_sparse_cpu + SparseCUDA: hspmm_sparse_cuda + +- func: copy_sparse_to_sparse_(Tensor(a!) self, Tensor src, bool non_blocking=False) -> Tensor(a!) + device_check: NoCheck # Allows copy into different device + variants: function + dispatch: + SparseCPU, SparseCUDA, SparseMeta: copy_sparse_ + autogen: copy_sparse_to_sparse, copy_sparse_to_sparse.out + +# By adding the AutogradNestedTensor this makes this function CompositeImplicit-like for nested tensors +- func: unbind.int(Tensor(a -> *) self, int dim=0) -> Tensor(a)[] + variants: function, method + dispatch: + CompositeExplicitAutograd: unbind + NestedTensorCPU, NestedTensorCUDA: NestedTensor_unbind + +- func: unbind.Dimname(Tensor(a -> *) self, Dimname dim) -> Tensor(a)[] + variants: function, method + +- func: to_sparse.sparse_dim(Tensor self, int sparse_dim) -> Tensor + variants: method + +# Special case of to_sparse.sparse_dim with custom derivative +- func: _to_sparse.sparse_dim(Tensor self, int sparse_dim) -> Tensor + variants: method + dispatch: + CPU, CUDA: dense_to_sparse + SparseCPU, SparseCUDA: sparse_coo_to_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_compressed_to_sparse + autogen: _to_sparse.sparse_dim_out + +- func: to_sparse(Tensor self, *, Layout? layout=None, int[2]? blocksize=None, int? dense_dim=None) -> Tensor + variants: method + +# Special case of to_sparse with custom derivative +- func: _to_sparse(Tensor self, *, Layout? layout=None, int[2]? blocksize=None, int? dense_dim=None) -> Tensor + variants: method + dispatch: + CPU, CUDA: dense_to_sparse + SparseCPU, SparseCUDA: sparse_coo_to_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_compressed_to_sparse + autogen: _to_sparse.out + +- func: to_sparse_csr(Tensor self, int? dense_dim=None) -> Tensor + variants: method + +# Special case of to_sparse_csr with custom derivative +- func: _to_sparse_csr(Tensor self, int? dense_dim=None) -> Tensor + variants: method + dispatch: + CPU, CUDA: dense_to_sparse_csr + SparseCPU, SparseCUDA: coo_to_sparse_csr + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_compressed_to_sparse_csr + autogen: _to_sparse_csr.out + +- func: to_sparse_csc(Tensor self, int? dense_dim=None) -> Tensor + variants: method + +# Special case of to_sparse_csc with custom derivative +- func: _to_sparse_csc(Tensor self, int? dense_dim=None) -> Tensor + variants: method + dispatch: + CPU, CUDA: dense_to_sparse_csc + SparseCPU, SparseCUDA: coo_to_sparse_csc + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_compressed_to_sparse_csc + autogen: _to_sparse_csc.out + +- func: to_sparse_bsr(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor + variants: method + +# Special case of to_sparse_bsr with custom derivative +- func: _to_sparse_bsr(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor + variants: method + dispatch: + CPU, CUDA: dense_to_sparse_bsr + SparseCPU, SparseCUDA: coo_to_sparse_bsr + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_compressed_to_sparse_bsr + autogen: _to_sparse_bsr.out + +- func: to_sparse_bsc(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor + variants: method + +# Special case of to_sparse_bsc with custom derivative +- func: _to_sparse_bsc(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor + variants: method + dispatch: + CPU, CUDA: dense_to_sparse_bsc + SparseCPU, SparseCUDA: coo_to_sparse_bsc + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sparse_compressed_to_sparse_bsc + autogen: _to_sparse_bsc.out + +- func: _to_sparse_semi_structured(Tensor dense) -> (Tensor, Tensor) + variants: function + dispatch: + CUDA: _to_sparse_semi_structured + +- func: to_mkldnn(Tensor self, ScalarType? dtype=None) -> Tensor + variants: method + dispatch: + CPU: dense_to_mkldnn + autogen: to_mkldnn.out + +- func: mkldnn_reorder_conv2d_weight(Tensor self, SymInt[2] padding=0, SymInt[2] stride=1, SymInt[2] dilation=1, SymInt groups=1, SymInt[]? input_size=None) -> Tensor + variants: function + python_module: nn + dispatch: + MkldnnCPU: mkldnn_reorder_conv2d_weight + autogen: mkldnn_reorder_conv2d_weight.out + +- func: mkldnn_reorder_conv3d_weight(Tensor self, SymInt[3] padding=0, SymInt[3] stride=1, SymInt[3] dilation=1, SymInt groups=1, SymInt[]? input_size=None) -> Tensor + variants: function + python_module: nn + dispatch: + MkldnnCPU: mkldnn_reorder_conv3d_weight + autogen: mkldnn_reorder_conv3d_weight.out + +- func: to_mkldnn_backward(Tensor grad, Tensor input) -> Tensor + +- func: quantize_per_tensor_dynamic(Tensor self, ScalarType dtype, bool reduce_range) -> Tensor + variants: function + dispatch: + CPU, CUDA: quantize_per_tensor_dynamic + autogen: quantize_per_tensor_dynamic.out + +- func: quantize_per_tensor(Tensor self, float scale, int zero_point, ScalarType dtype) -> Tensor + variants: function + dispatch: + CPU, CUDA: quantize_per_tensor + autogen: quantize_per_tensor.out + +- func: quantize_per_tensor.tensor_qparams(Tensor self, Tensor scale, Tensor zero_point, ScalarType dtype) -> Tensor + variants: function + dispatch: + CPU, CUDA: quantize_per_tensor_tensor_qparams + autogen: quantize_per_tensor.tensor_qparams_out + +- func: quantize_per_tensor.tensors(Tensor[] tensors, Tensor scales, Tensor zero_points, ScalarType dtype) -> Tensor[] + variants: function + dispatch: + CPU: quantize_per_tensor_list_cpu + autogen: quantize_per_tensor.tensors_out + +- func: quantize_per_channel(Tensor self, Tensor scales, Tensor zero_points, int axis, ScalarType dtype) -> Tensor + variants: function + dispatch: + CPU, CUDA: quantize_per_channel + autogen: quantize_per_channel.out + +- func: dequantize.self(Tensor self) -> Tensor + variants: function, method + dispatch: + CPU, CUDA: dequantize_cpu_or_cuda + QuantizedCPU, QuantizedCUDA: dequantize_quantized + autogen: dequantize.self_out + +- func: dequantize.tensors(Tensor[] tensors) -> Tensor[] + variants: function + dispatch: + QuantizedCPU: dequantize_tensors_quantized_cpu + autogen: dequantize.tensors_out + +- func: q_scale(Tensor self) -> float + variants: function, method + dispatch: + QuantizedCPU, QuantizedCUDA: q_scale_quant + +- func: q_zero_point(Tensor self) -> int + variants: function, method + dispatch: + QuantizedCPU, QuantizedCUDA: q_zero_point_quant + +- func: q_per_channel_scales(Tensor self) -> Tensor + variants: function, method + dispatch: + QuantizedCPU, QuantizedCUDA: q_per_channel_scales + autogen: q_per_channel_scales.out + +- func: q_per_channel_zero_points(Tensor self) -> Tensor + variants: function, method + dispatch: + QuantizedCPU, QuantizedCUDA: q_per_channel_zero_points + autogen: q_per_channel_zero_points.out + +- func: q_per_channel_axis(Tensor self) -> int + variants: function, method + dispatch: + QuantizedCPU, QuantizedCUDA: q_per_channel_axis + +- func: int_repr(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + QuantizedCPU: int_repr_quantized_cpu + QuantizedCUDA: int_repr_quantized_cuda + autogen: int_repr.out + +- func: _make_per_tensor_quantized_tensor(Tensor self, float scale, int zero_point) -> Tensor + dispatch: + CPU: make_per_tensor_quantized_tensor_cpu + CUDA: make_per_tensor_quantized_tensor_cuda + autogen: _make_per_tensor_quantized_tensor.out + +- func: _make_per_channel_quantized_tensor(Tensor self, Tensor scale, Tensor zero_point, int axis) -> Tensor + dispatch: + CPU: make_per_channel_quantized_tensor_cpu + CUDA: make_per_channel_quantized_tensor_cuda + autogen: _make_per_channel_quantized_tensor.out + +- func: qscheme(Tensor self) -> QScheme + variants: method + dispatch: + QuantizedCPU, QuantizedCUDA: qscheme_quant + +- func: fake_quantize_per_tensor_affine(Tensor self, float scale, int zero_point, int quant_min, int quant_max) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + +- func: fake_quantize_per_tensor_affine.tensor_qparams(Tensor self, Tensor scale, Tensor zero_point, int quant_min, int quant_max) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + +- func: fake_quantize_per_tensor_affine_cachemask(Tensor self, float scale, int zero_point, int quant_min, int quant_max) -> (Tensor output, Tensor mask) + variants: function + dispatch: + CPU, CUDA: fake_quantize_per_tensor_affine_cachemask + autogen: fake_quantize_per_tensor_affine_cachemask.out + +- func: _fake_quantize_per_tensor_affine_cachemask_tensor_qparams(Tensor self, Tensor scale, Tensor zero_point, Tensor fake_quant_enabled, int quant_min, int quant_max) -> (Tensor output, Tensor mask) + variants: function + dispatch: + CPU, CUDA: _fake_quantize_per_tensor_affine_cachemask_tensor_qparams + autogen: _fake_quantize_per_tensor_affine_cachemask_tensor_qparams.out + +- func: fake_quantize_per_tensor_affine_cachemask_backward(Tensor grad, Tensor mask) -> Tensor + variants: function + +- func: _fake_quantize_learnable_per_tensor_affine(Tensor self, Tensor scale, Tensor zero_point, int quant_min, int quant_max, float grad_factor=1.0) -> Tensor + variants: function + dispatch: + CPU, CUDA: _fake_quantize_learnable_per_tensor_affine + autogen: _fake_quantize_learnable_per_tensor_affine.out + +- func: _fake_quantize_learnable_per_tensor_affine_backward(Tensor grad, Tensor self, Tensor scale, Tensor zero_point, int quant_min, int quant_max, float grad_factor=1.0) -> (Tensor, Tensor, Tensor) + variants: function + dispatch: + CPU, CUDA: _fake_quantize_learnable_per_tensor_affine_backward + +- func: fake_quantize_per_channel_affine(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + +- func: fake_quantize_per_channel_affine_cachemask(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max) -> (Tensor output, Tensor mask) + variants: function + dispatch: + CPU, CUDA: fake_quantize_per_channel_affine_cachemask + autogen: fake_quantize_per_channel_affine_cachemask.out + +- func: fake_quantize_per_channel_affine_cachemask_backward(Tensor grad, Tensor mask) -> Tensor + variants: function + +- func: _fake_quantize_learnable_per_channel_affine(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, float grad_factor=1.0) -> Tensor + variants: function + dispatch: + CPU, CUDA: _fake_quantize_learnable_per_channel_affine + autogen: _fake_quantize_learnable_per_channel_affine.out + +- func: _fake_quantize_learnable_per_channel_affine_backward(Tensor grad, Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, float grad_factor=1.0) -> (Tensor, Tensor, Tensor) + variants: function + dispatch: + CPU, CUDA: _fake_quantize_learnable_per_channel_affine_backward + +- func: fused_moving_avg_obs_fake_quant(Tensor self, Tensor observer_on, Tensor fake_quant_on, Tensor(a!) running_min, Tensor(b!) running_max, Tensor(c!) scale, Tensor(d!) zero_point, float averaging_const, int quant_min, int quant_max, int ch_axis, bool per_row_fake_quant=False, bool symmetric_quant=False) -> Tensor + variants: function + +- func: _fused_moving_avg_obs_fq_helper(Tensor self, Tensor observer_on, Tensor fake_quant_on, Tensor(a!) running_min, Tensor(b!) running_max, Tensor(c!) scale, Tensor(d!) zero_point, float averaging_const, int quant_min, int quant_max, int ch_axis, bool per_row_fake_quant=False, bool symmetric_quant=False) -> (Tensor output, Tensor mask) + dispatch: + CPU: fused_moving_avg_obs_fake_quant_cpu + CUDA: fused_moving_avg_obs_fake_quant_cuda + autogen: _fused_moving_avg_obs_fq_helper_functional, _fused_moving_avg_obs_fq_helper.out + +- func: _choose_qparams_per_tensor(Tensor self, bool reduce_range=False) -> (float, int) + variants: function + +- func: _saturate_weight_to_fp16(Tensor weight) -> Tensor + variants: function + +- func: choose_qparams_optimized(Tensor input, int numel, int n_bins, float ratio, int bit_width) -> (Tensor, Tensor) + variants: function + +- func: _autocast_to_reduced_precision(Tensor(a) self, bool cuda_enabled, bool cpu_enabled, ScalarType cuda_dtype, ScalarType cpu_dtype) -> Tensor(a) + variants: method + device_guard: False + +- func: _autocast_to_full_precision(Tensor(a) self, bool cuda_enabled, bool cpu_enabled) -> Tensor(a) + variants: method + device_guard: False + +- func: _to_copy(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, bool non_blocking=False, MemoryFormat? memory_format=None) -> Tensor + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: _to_copy + NestedTensorCPU, NestedTensorCUDA: _to_copy_nested + autogen: _to_copy.out + tags: core + +# to(Device) must not exist because all constructors of Device also works for +# TensorOptions. Otherwise, an ambiguity error is thrown. +# See NOTE [ TensorOptions Constructors ]. +- func: to.dtype_layout(Tensor(a) self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + +- func: to.device(Tensor(a) self, Device device, ScalarType dtype, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + +- func: to.dtype(Tensor(a) self, ScalarType dtype, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + +- func: to.other(Tensor(a) self, Tensor other, bool non_blocking=False, bool copy=False, MemoryFormat? memory_format=None) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + +- func: meshgrid(Tensor[] tensors) -> Tensor[] + +# TODO: Two weeks after this lands, combine these two overloads, +# making "indexing" optional. These are temporarily distinct for +# forward-compatibility reasons. +- func: meshgrid.indexing(Tensor[] tensors, *, str indexing) -> Tensor[] + +- func: cartesian_prod(Tensor[] tensors) -> Tensor + variants: function + tags: maybe_aliasing_or_mutating + +- func: combinations(Tensor self, int r=2, bool with_replacement=False) -> Tensor + variants: function + +- func: item(Tensor self) -> Scalar + tags: data_dependent_output + variants: method + +- func: result_type.Tensor(Tensor tensor, Tensor other) -> ScalarType + variants: function + +- func: result_type.Scalar(Tensor tensor, Scalar other) -> ScalarType + variants: function + +- func: result_type.Scalar_Tensor(Scalar scalar, Tensor tensor) -> ScalarType + variants: function + +- func: result_type.Scalar_Scalar(Scalar scalar1, Scalar scalar2) -> ScalarType + +- func: can_cast(ScalarType from_, ScalarType to) -> bool + variants: function + +- func: promote_types(ScalarType type1, ScalarType type2) -> ScalarType + variants: function + +# NB: Does NOT check precondition that numel == 1 +- func: _local_scalar_dense(Tensor self) -> Scalar + tags: [core, data_dependent_output] + dispatch: + CPU: _local_scalar_dense_cpu + CUDA: _local_scalar_dense_cuda + MPS: _local_scalar_dense_mps + variants: function + +# MPS LSTM implementation + +- func: _lstm_mps(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor, Tensor, Tensor, Tensor, Tensor) + dispatch: + MPS: _lstm_mps + autogen: _lstm_mps.out + tags: nondeterministic_seeded + +- func: lstm_mps_backward(Tensor? grad_y, Tensor? grad_hy, Tensor? grad_cy, Tensor z_state, Tensor cell_state_fwd, Tensor input, Tensor layersOutputs, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor[], Tensor[]) + dispatch: + MPS: lstm_mps_backward + autogen: lstm_mps_backward.out + + +# Fused RNN kernels +- func: _thnn_fused_lstm_cell(Tensor input_gates, Tensor hidden_gates, Tensor cx, Tensor? input_bias=None, Tensor? hidden_bias=None) -> (Tensor, Tensor, Tensor) + dispatch: + CUDA: _thnn_fused_lstm_cell_cuda + autogen: _thnn_fused_lstm_cell.out + +# NB: The composite version of this function below is a simple wrapper that duplicates some of the outputs +# It is necessary to avoid triggering TensorImpl use count checks in debug mode +# NB: this is function is NOT differentiable +- func: _thnn_fused_lstm_cell_backward_impl(Tensor? grad_hy, Tensor? grad_cy, Tensor cx, Tensor cy, Tensor workspace, bool has_bias) -> (Tensor, Tensor, Tensor) + dispatch: + CUDA: _thnn_fused_lstm_cell_backward_impl_cuda + autogen: _thnn_fused_lstm_cell_backward_impl.out + +- func: _thnn_fused_lstm_cell_backward(Tensor? grad_hy, Tensor? grad_cy, Tensor cx, Tensor cy, Tensor workspace, bool has_bias) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + +- func: _thnn_differentiable_lstm_cell_backward(Tensor? grad_hy, Tensor? grad_cy, Tensor input_gates, Tensor hidden_gates, Tensor? input_bias, Tensor? hidden_bias, Tensor cx, Tensor cy) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + +- func: _thnn_fused_gru_cell(Tensor input_gates, Tensor hidden_gates, Tensor hx, Tensor? input_bias=None, Tensor? hidden_bias=None) -> (Tensor, Tensor) + dispatch: + CUDA: _thnn_fused_gru_cell_cuda + autogen: _thnn_fused_gru_cell.out + +- func: _thnn_fused_gru_cell_backward(Tensor grad_hy, Tensor workspace, bool has_bias) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + dispatch: + CUDA: _thnn_fused_gru_cell_backward_cuda + autogen: _thnn_fused_gru_cell_backward.out + +- func: _thnn_differentiable_gru_cell_backward(Tensor grad_hy, Tensor input_gates, Tensor hidden_gates, Tensor hx, Tensor? input_bias, Tensor? hidden_bias) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + +# RNN cells and layers +- func: lstm.input(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor, Tensor) + tags: nondeterministic_seeded + +- func: lstm.data(Tensor data, Tensor batch_sizes, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor, Tensor) + tags: nondeterministic_seeded + +- func: gru.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) + tags: nondeterministic_seeded + +- func: gru.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) + tags: nondeterministic_seeded + +- func: rnn_tanh.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) + tags: nondeterministic_seeded + +- func: rnn_tanh.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) + tags: nondeterministic_seeded + +- func: rnn_relu.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) + tags: nondeterministic_seeded + +- func: rnn_relu.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) + tags: nondeterministic_seeded + +- func: lstm_cell(Tensor input, Tensor[] hx, Tensor w_ih, Tensor w_hh, Tensor? b_ih=None, Tensor? b_hh=None) -> (Tensor, Tensor) + +- func: gru_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor? b_ih=None, Tensor? b_hh=None) -> Tensor + +- func: rnn_tanh_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor? b_ih=None, Tensor? b_hh=None) -> Tensor + +- func: rnn_relu_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor? b_ih=None, Tensor? b_hh=None) -> Tensor + +# Quantized RNN layer registration has been moved to C10 dispatch in `RNN.cpp` + +# Quantized RNN layers +# - func: quantized_lstm(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first, *, ScalarType? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor) + + +# - func: quantized_lstm.data(Tensor data, Tensor batch_sizes, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, *, ScalarType? dtype=None, bool use_dynamic=False) -> (Tensor, Tensor, Tensor) + + +# Quantized GRU layers + +# - func: quantized_gru.input(Tensor input, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor) +# + +# - func: quantized_gru.data(Tensor data, Tensor batch_sizes, Tensor hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional) -> (Tensor, Tensor) +# + +# Quantized RNN cells +- func: quantized_lstm_cell(Tensor input, Tensor[] hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> (Tensor, Tensor) + +- func: quantized_gru_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> Tensor + +- func: quantized_rnn_relu_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> Tensor + +- func: quantized_rnn_tanh_cell(Tensor input, Tensor hx, Tensor w_ih, Tensor w_hh, Tensor b_ih, Tensor b_hh, Tensor packed_ih, Tensor packed_hh, Tensor col_offsets_ih, Tensor col_offsets_hh, Scalar scale_ih, Scalar scale_hh, Scalar zero_point_ih, Scalar zero_point_hh) -> Tensor + +# PackedSequence utilities +- func: _pack_padded_sequence(Tensor input, Tensor lengths, bool batch_first) -> (Tensor, Tensor) + dispatch: + CompositeExplicitAutograd: _pack_padded_sequence + autogen: _pack_padded_sequence.out + +- func: _pack_padded_sequence_backward(Tensor grad, SymInt[] input_size, Tensor batch_sizes, bool batch_first) -> Tensor + dispatch: + CompositeImplicitAutograd: _pack_padded_sequence_backward_symint + +- func: _pad_packed_sequence(Tensor data, Tensor batch_sizes, bool batch_first, Scalar padding_value, int total_length) -> (Tensor, Tensor) + +# wrappers for legacy TH methods + +- func: set_.source_Storage(Tensor(a!) self, Storage source) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CPU, CUDA, Meta, MPS: set_ + autogen: set.source_Storage, set.source_Storage_out + tags: inplace_view + +- func: set_.source_Storage_storage_offset(Tensor(a!) self, Storage source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[]) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CPU: set_storage_cpu_ + Meta: set_storage_meta__symint + CUDA: set_storage_cuda_ + MPS: set_storage_mps_ + QuantizedCPU, QuantizedCUDA: set_storage_quantized_ + autogen: set.source_Storage_storage_offset, set.source_Storage_storage_offset_out + tags: inplace_view + +- func: set_.source_Tensor_storage_offset(Tensor(a!) self, Tensor source, SymInt storage_offset, SymInt[] size, SymInt[] stride=[]) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: set__symint + tags: inplace_view + +- func: set_.source_Tensor(Tensor(a!) self, Tensor source) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CPU, CUDA, Meta, MPS: set_tensor_ + autogen: set.source_Tensor, set.source_Tensor_out + tags: inplace_view + +- func: set_(Tensor(a!) self) -> Tensor(a!) + variants: method + dispatch: + CPU: set_cpu_ + CUDA: set_cuda_ + Meta: set_meta_ + MPS: set_mps_ + autogen: set, set.out + tags: inplace_view + +# Not making it CompositeImplicitAutograd because lift +# should be a primitive w.r.t. functorch + +# TODO: this should have a view annotation +# TODO: shouldn't be a method +- func: lift(Tensor self) -> Tensor + dispatch: + CompositeExplicitAutograd: lift + autogen: lift.out + +# lift_fresh is called with an argument that is guaranteed to be +# fresh (i.e., newly allocated). This is ONLY called from a +# torch.tensor call; if you FX trace a lift_fresh, you are obligated +# to convert this into a lift_fresh_copy (because FX will violate the +# freshness invariant when tracing). +- func: lift_fresh(Tensor(a) self) -> Tensor(a) + dispatch: + CompositeExplicitAutograd: lift_fresh + +# Like lift, but it clones the input. +- func: lift_fresh_copy(Tensor self) -> Tensor + tags: view_copy + dispatch: + CompositeExplicitAutogradNonFunctional: lift_fresh_copy + autogen: lift_fresh_copy.out + +- func: is_set_to(Tensor self, Tensor tensor) -> bool + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CPU, CUDA, MPS: is_set_to + +- func: masked_fill_.Scalar(Tensor(a!) self, Tensor mask, Scalar value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU: masked_fill__cpu + CUDA: masked_fill__cuda + QuantizedCPU: masked_fill__quantized_cpu + QuantizedCUDA: masked_fill__quantized_cuda + MPS: masked_fill__mps + autogen: masked_fill.Scalar_out + +- func: masked_fill.Scalar(Tensor self, Tensor mask, Scalar value) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: masked_fill + NestedTensorCPU, NestedTensorCUDA: NestedTensor_masked_fill + tags: pointwise + +- func: masked_fill_.Tensor(Tensor(a!) self, Tensor mask, Tensor value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU: masked_fill__cpu + CUDA: masked_fill__cuda + QuantizedCPU: masked_fill__quantized_cpu + QuantizedCUDA: masked_fill__quantized_cuda + MPS: masked_fill__mps + autogen: masked_fill.Tensor_out + +- func: masked_fill.Tensor(Tensor self, Tensor mask, Tensor value) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: masked_fill + +- func: masked_scatter_(Tensor(a!) self, Tensor mask, Tensor source) -> Tensor(a!) + variants: method + dispatch: + CPU: masked_scatter__cpu + CUDA: masked_scatter__cuda + MPS: masked_scatter__mps + autogen: masked_scatter.out + +- func: masked_scatter(Tensor self, Tensor mask, Tensor source) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: masked_scatter + tags: core + +- func: masked_scatter_backward(Tensor grad_output, Tensor mask, SymInt[] sizes) -> Tensor + dispatch: + CompositeExplicitAutograd: masked_scatter_backward_symint + +- func: _masked_softmax(Tensor self, Tensor mask, int? dim=None, int? mask_type=None) -> Tensor + dispatch: + CUDA: masked_softmax_cuda + CPU: masked_softmax_cpu + autogen: _masked_softmax.out + +- func: _masked_softmax_backward(Tensor grad_output, Tensor output, Tensor mask, int? dim=None) -> Tensor + dispatch: + CUDA: masked_softmax_backward_cuda + CPU: masked_softmax_backward_cpu + autogen: _masked_softmax_backward.out + +- func: view(Tensor(a) self, SymInt[] size) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + ZeroTensor, Meta, CPU, CUDA, QuantizedCPU, QuantizedCUDA, MPS: view + MkldnnCPU: mkldnn_view + NestedTensorCPU, NestedTensorCUDA: view_nested + tags: core + +# Warning: If you want to change the name or overload name of this +# operator, you might also want to change the `isBlockListedSchema` +# function in `torch/csrc/jit/frontend/schema_catching.cpp`. +# The name and overload name of this operator is hardcoded in that +# function in order to workaround a bug: +# https://github.com/pytorch/pytorch/issues/47964 +- func: view.dtype(Tensor(a) self, ScalarType dtype) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: view_dtype + +- func: put_(Tensor(a!) self, Tensor index, Tensor source, bool accumulate=False) -> Tensor(a!) + variants: method + dispatch: + CPU, CUDA: put_ + autogen: put.out + +- func: put(Tensor self, Tensor index, Tensor source, bool accumulate=False) -> Tensor + variants: function, method + dispatch: + CompositeExplicitAutograd: put + +- func: index_add.out(Tensor self, int dim, Tensor index, Tensor source, *, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + precomputed: + - dim -> int dim + dispatch: + CPU: index_add_cpu_out + CUDA: index_add_cuda_out + MPS: index_add_mps_out + +- func: index_add_(Tensor(a!) self, int dim, Tensor index, Tensor source, *, Scalar alpha=1) -> Tensor(a!) + structured_delegate: index_add.out + variants: method + +- func: index_add(Tensor self, int dim, Tensor index, Tensor source, *, Scalar alpha=1) -> Tensor + structured_delegate: index_add.out + variants: function, method + +- func: index_add.dimname(Tensor self, Dimname dim, Tensor index, Tensor source, *, Scalar alpha=1) -> Tensor + variants: function, method + +- func: index_reduce.out(Tensor self, int dim, Tensor index, Tensor source, str reduce, *, bool include_self=True, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + precomputed: + - dim -> int dim + dispatch: + CPU: index_reduce_cpu_out + CUDA: index_reduce_cuda_out + +- func: index_reduce_(Tensor(a!) self, int dim, Tensor index, Tensor source, str reduce, *, bool include_self=True) -> Tensor(a!) + structured_delegate: index_reduce.out + variants: method + +- func: index_reduce(Tensor self, int dim, Tensor index, Tensor source, str reduce, *, bool include_self=True) -> Tensor + structured_delegate: index_reduce.out + variants: function, method + +- func: index_fill_.int_Scalar(Tensor(a!) self, int dim, Tensor index, Scalar value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU: index_fill_ + CUDA: index_fill_ + MPS: index_fill_mps_ + autogen: index_fill.int_Scalar_out + +- func: index_fill.int_Scalar(Tensor self, int dim, Tensor index, Scalar value) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: index_fill + +- func: index_fill_.int_Tensor(Tensor(a!) self, int dim, Tensor index, Tensor value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU, CUDA: index_fill_ + MPS: index_fill_mps_ + autogen: index_fill.int_Tensor_out + +- func: index_fill.int_Tensor(Tensor self, int dim, Tensor index, Tensor value) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + dispatch: + CompositeExplicitAutograd: index_fill + +- func: index_fill_.Dimname_Scalar(Tensor(a!) self, Dimname dim, Tensor index, Scalar value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: index_fill_.Dimname_Tensor(Tensor(a!) self, Dimname dim, Tensor index, Tensor value) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: index_fill.Dimname_Scalar(Tensor self, Dimname dim, Tensor index, Scalar value) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: index_fill.Dimname_Tensor(Tensor self, Dimname dim, Tensor index, Tensor value) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + +- func: scatter.src(Tensor self, int dim, Tensor index, Tensor src) -> Tensor + structured_delegate: scatter.src_out + variants: function, method + tags: core + +- func: scatter_.src(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!) + structured_delegate: scatter.src_out + variants: method + +- func: scatter.src_out(Tensor self, int dim, Tensor index, Tensor src, *, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU, CUDA: scatter_src_out + MPS: scatter_src_out_mps + +- func: scatter.value(Tensor self, int dim, Tensor index, Scalar value) -> Tensor + structured_delegate: scatter.value_out + variants: function, method + tags: core + +- func: scatter_.value(Tensor(a!) self, int dim, Tensor index, Scalar value) -> Tensor(a!) + structured_delegate: scatter.value_out + variants: method + +- func: scatter.value_out(Tensor self, int dim, Tensor index, Scalar value, *, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU, CUDA: scatter_value_out + MPS: scatter_value_out_mps + +- func: scatter.reduce(Tensor self, int dim, Tensor index, Tensor src, *, str reduce) -> Tensor + structured_delegate: scatter.reduce_out + variants: function, method + +- func: scatter_.reduce(Tensor(a!) self, int dim, Tensor index, Tensor src, *, str reduce) -> Tensor(a!) + structured_delegate: scatter.reduce_out + variants: method + +- func: scatter.reduce_out(Tensor self, int dim, Tensor index, Tensor src, *, str reduce, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU, CUDA: scatter_reduce_out + MPS: scatter_reduce_out_mps + +- func: scatter.value_reduce(Tensor self, int dim, Tensor index, Scalar value, *, str reduce) -> Tensor + structured_delegate: scatter.value_reduce_out + variants: function, method + +- func: scatter_.value_reduce(Tensor(a!) self, int dim, Tensor index, Scalar value, *, str reduce) -> Tensor(a!) + structured_delegate: scatter.value_reduce_out + variants: method + +- func: scatter.value_reduce_out(Tensor self, int dim, Tensor index, Scalar value, *, str reduce, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU, CUDA: scatter_value_reduce_out + MPS: scatter_value_reduce_out_mps + +- func: scatter.dimname_src(Tensor self, Dimname dim, Tensor index, Tensor src) -> Tensor + variants: function, method + +- func: scatter.dimname_value(Tensor self, Dimname dim, Tensor index, Scalar value) -> Tensor + variants: function, method + +- func: scatter_add(Tensor self, int dim, Tensor index, Tensor src) -> Tensor + structured_delegate: scatter_add.out + variants: function, method + tags: core + +- func: scatter_add_(Tensor(a!) self, int dim, Tensor index, Tensor src) -> Tensor(a!) + structured_delegate: scatter_add.out + variants: method + +- func: scatter_add.out(Tensor self, int dim, Tensor index, Tensor src, *, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU, CUDA: scatter_add + MPS: scatter_add_mps_out + +- func: scatter_add.dimname(Tensor self, Dimname dim, Tensor index, Tensor src) -> Tensor + variants: function, method + +- func: scatter_reduce.two(Tensor self, int dim, Tensor index, Tensor src, str reduce, *, bool include_self=True) -> Tensor + structured_delegate: scatter_reduce.two_out + variants: function, method + tags: core + +- func: scatter_reduce_.two(Tensor(a!) self, int dim, Tensor index, Tensor src, str reduce, *, bool include_self=True) -> Tensor(a!) + structured_delegate: scatter_reduce.two_out + variants: method + +- func: scatter_reduce.two_out(Tensor self, int dim, Tensor index, Tensor src, str reduce, *, bool include_self=True, Tensor(a!) out) -> Tensor(a!) + structured: True + variants: function + dispatch: + CPU, CUDA, MPS: scatter_reduce_two + +- func: eq_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + structured_delegate: eq.Scalar_out + device_check: NoCheck # TensorIterator + variants: method + +- func: eq_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: eq.Tensor_out + device_check: NoCheck # TensorIterator + variants: method + +- func: bitwise_and.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + variants: function + dispatch: + CPU, CUDA: bitwise_and_out + MPS: bitwise_and_out_mps + tags: pointwise + +- func: bitwise_and.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_and_out + tags: pointwise + +- func: bitwise_and.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: bitwise_and + tags: [core, pointwise] + +- func: bitwise_and.Scalar_Tensor(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_and + autogen: bitwise_and.Scalar_Tensor_out + tags: pointwise + +- func: bitwise_and.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + structured_delegate: bitwise_and.Tensor_out + tags: [core, pointwise] + +- func: bitwise_and_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: bitwise_and_ + tags: pointwise + +- func: bitwise_and_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: bitwise_and.Tensor_out + tags: pointwise + +- func: __and__.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + +- func: __and__.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + +- func: __iand__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: __iand__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: bitwise_or.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + variants: function + dispatch: + CPU, CUDA: bitwise_or_out + MPS: bitwise_or_out_mps + tags: pointwise + +- func: bitwise_or.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_or_out + tags: pointwise + +- func: bitwise_or.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: bitwise_or + tags: [core, pointwise] + +- func: bitwise_or.Scalar_Tensor(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_or + autogen: bitwise_or.Scalar_Tensor_out + tags: pointwise + +- func: bitwise_or.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + structured_delegate: bitwise_or.Tensor_out + tags: [core, pointwise] + +- func: bitwise_or_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: bitwise_or_ + tags: pointwise + +- func: bitwise_or_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: bitwise_or.Tensor_out + tags: pointwise + +- func: __or__.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + +- func: __or__.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + +- func: __ior__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: __ior__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + +- func: bitwise_xor.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + variants: function + dispatch: + CPU, CUDA: bitwise_xor_out + MPS: bitwise_xor_out_mps + tags: pointwise + +- func: bitwise_xor.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_xor_out + tags: pointwise + +- func: bitwise_xor.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: bitwise_xor + tags: [core, pointwise] + +- func: bitwise_xor.Scalar_Tensor(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_xor + autogen: bitwise_xor.Scalar_Tensor_out + tags: pointwise + +- func: bitwise_xor.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + structured_delegate: bitwise_xor.Tensor_out + tags: [core, pointwise] + +- func: bitwise_xor_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: bitwise_xor_ + tags: pointwise + +- func: bitwise_xor_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: bitwise_xor.Tensor_out + tags: pointwise + +- func: __xor__.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: __xor__.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: __ixor__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + tags: pointwise + +- func: __ixor__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + tags: pointwise + +- func: __lshift__.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CPU, CUDA, MPS: __lshift__ + tags: pointwise + +- func: __lshift__.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CPU, CUDA, MPS: __lshift__ + tags: pointwise + +- func: __ilshift__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU, CUDA, MPS: __ilshift__ + autogen: __lshift__.Scalar_out + tags: pointwise + +- func: __ilshift__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU, CUDA, MPS: __ilshift__ + autogen: __lshift__.Tensor_out + tags: pointwise + +- func: bitwise_left_shift.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: bitwise_left_shift.Tensor_out + tags: pointwise + +- func: bitwise_left_shift_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: bitwise_left_shift.Tensor_out + tags: pointwise + +- func: bitwise_left_shift.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: bitwise_left_shift_out + tags: pointwise + +- func: bitwise_left_shift.Tensor_Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: bitwise_left_shift + tags: pointwise + +- func: bitwise_left_shift_.Tensor_Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: bitwise_left_shift_ + tags: pointwise + +- func: bitwise_left_shift.Tensor_Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_left_shift_out + tags: pointwise + +- func: bitwise_left_shift.Scalar_Tensor(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_left_shift + autogen: bitwise_left_shift.Scalar_Tensor_out + tags: pointwise + +- func: __rshift__.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CPU, CUDA, MPS: __rshift__ + tags: pointwise + +- func: __rshift__.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CPU, CUDA, MPS: __rshift__ + tags: pointwise + +- func: __irshift__.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU, CUDA, MPS: __irshift__ + autogen: __rshift__.Scalar_out + +- func: __irshift__.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CPU, CUDA, MPS: __irshift__ + autogen: __rshift__.Tensor_out + +- func: bitwise_right_shift.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function, method + structured_delegate: bitwise_right_shift.Tensor_out + tags: pointwise + +- func: bitwise_right_shift_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: bitwise_right_shift.Tensor_out + tags: pointwise + +- func: bitwise_right_shift.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: bitwise_right_shift_out + tags: pointwise + +- func: bitwise_right_shift.Tensor_Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: bitwise_right_shift + tags: pointwise + +- func: bitwise_right_shift_.Tensor_Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: bitwise_right_shift_ + tags: pointwise + +- func: bitwise_right_shift.Tensor_Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_right_shift_out + tags: pointwise + +- func: bitwise_right_shift.Scalar_Tensor(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CompositeExplicitAutograd: bitwise_right_shift + autogen: bitwise_right_shift.Scalar_Tensor_out + tags: pointwise + +- func: tril_(Tensor(a!) self, int diagonal=0) -> Tensor(a!) + structured_delegate: tril.out + variants: method + +- func: triu_(Tensor(a!) self, int diagonal=0) -> Tensor(a!) + structured_delegate: triu.out + variants: method + +- func: digamma_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: digamma.out + variants: method + tags: pointwise + +- func: lerp_.Scalar(Tensor(a!) self, Tensor end, Scalar weight) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: lerp.Scalar_out + tags: pointwise + +- func: lerp_.Tensor(Tensor(a!) self, Tensor end, Tensor weight) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: lerp.Tensor_out + tags: pointwise + +- func: addbmm_(Tensor(a!) self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor(a!) + variants: method + dispatch: + CPU, CUDA, XPU: addbmm_ + MPS: addbmm_mps_ + +- func: addbmm.out(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA, XPU: addbmm_out + MPS: addbmm_out_mps + +- func: addbmm(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + variants: method, function + dispatch: + CPU, CUDA, XPU: addbmm + MPS: addbmm_mps + +- func: random_.from(Tensor(a!) self, int from, int? to, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + tags: nondeterministic_seeded + dispatch: + CPU, CUDA: random_ + Meta: random_meta_ + MPS: random_mps_ + autogen: random.from, random.from_out + +- func: random_.to(Tensor(a!) self, int to, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + variants: method + dispatch: + CPU, CUDA: random_ + Meta: random_meta_ + MPS: random_mps_ + autogen: random.to, random.to_out + +- func: random_(Tensor(a!) self, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + variants: method + dispatch: + CPU, CUDA: random_ + MPS: random_mps_ + Meta: random_meta_ + autogen: random, random.out + +- func: uniform_(Tensor(a!) self, float from=0, float to=1, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + variants: method + dispatch: + CPU, CUDA: uniform_ + MPS: uniform_mps_ + Meta: uniform_meta_ + autogen: uniform, uniform.out + +- func: cauchy_(Tensor(a!) self, float median=0, float sigma=1, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + tags: nondeterministic_seeded + dispatch: + CPU, CUDA: cauchy_ + autogen: cauchy, cauchy.out + +- func: log_normal_(Tensor(a!) self, float mean=1, float std=2, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + variants: method + dispatch: + CPU, CUDA: log_normal_ + autogen: log_normal, log_normal.out + +- func: exponential_(Tensor(a!) self, float lambd=1, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + variants: method + dispatch: + CPU, CUDA: exponential_ + MPS: exponential_mps_ + autogen: exponential, exponential.out + +- func: geometric_(Tensor(a!) self, float p, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + variants: method + dispatch: + CPU, CUDA: geometric_ + + # wrappers for TH functions + autogen: geometric, geometric.out + +- func: diag.out(Tensor self, int diagonal=0, *, Tensor(a!) out) -> Tensor(a!) + +- func: diag(Tensor self, int diagonal=0) -> Tensor + variants: method, function + +- func: cross.out(Tensor self, Tensor other, int? dim=None, *, Tensor(a!) out) -> Tensor(a!) + +- func: cross(Tensor self, Tensor other, int? dim=None) -> Tensor + variants: method, function + +- func: triu.out(Tensor self, int diagonal=0, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: triu_cpu + CUDA: triu_cuda + MPS: triu_mps_out + +- func: triu(Tensor self, int diagonal=0) -> Tensor + structured_delegate: triu.out + variants: method, function + +- func: tril.out(Tensor self, int diagonal=0, *, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: tril_cpu + CUDA: tril_cuda + MPS: tril_mps_out + +- func: tril(Tensor self, int diagonal=0) -> Tensor + structured_delegate: tril.out + variants: method, function + +- func: tril_indices(int row, int col, int offset=0, *, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CPU: tril_indices_cpu + CUDA: tril_indices_cuda + MPS: tril_indices_mps + autogen: tril_indices.out + +- func: triu_indices(int row, int col, int offset=0, *, ScalarType? dtype=long, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CPU: triu_indices_cpu + CUDA: triu_indices_cuda + MPS: triu_indices_mps + autogen: triu_indices.out + +- func: trace(Tensor self) -> Tensor + variants: method, function + dispatch: + CPU: trace_cpu + CUDA: trace_cuda + MPS: trace_mps + autogen: trace.out + +- func: trace_backward(Tensor grad, SymInt[] sizes) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: trace_backward_symint + +- func: ne.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: ne_Scalar_out + MPS: ne_scalar_out_mps + QuantizedCPU: ne_out_quantized_cpu + tags: pointwise + +- func: ne.Scalar(Tensor self, Scalar other) -> Tensor + structured_delegate: ne.Scalar_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: ne_quantized_cpu + tags: [core, pointwise] + +- func: ne.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: ne_Tensor_out + MPS: ne_tensor_out_mps + QuantizedCPU: ne_out_quantized_cpu + tags: pointwise + +- func: ne.Tensor(Tensor self, Tensor other) -> Tensor + structured_delegate: ne.Tensor_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: ne_quantized_cpu + tags: [core, pointwise] + +- func: ne_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + structured_delegate: ne.Scalar_out + device_check: NoCheck # TensorIterator + variants: method + +- func: ne_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: ne.Tensor_out + device_check: NoCheck # TensorIterator + variants: method + +# not_equal, alias for torch.ne +- func: not_equal.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + +- func: not_equal.Scalar(Tensor self, Scalar other) -> Tensor + variants: method, function + +- func: not_equal.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: not_equal.Tensor(Tensor self, Tensor other) -> Tensor + variants: method, function + +- func: not_equal_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: not_equal_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: eq.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: eq_Scalar_out + MPS: eq_scalar_out_mps + QuantizedCPU: eq_out_quantized_cpu + tags: pointwise + +- func: eq.Scalar(Tensor self, Scalar other) -> Tensor + structured_delegate: eq.Scalar_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: eq_quantized_cpu + NestedTensorCPU, NestedTensorCUDA: eq_scalar_nested + tags: [core, pointwise] + +- func: eq.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: eq_Tensor_out + MPS: eq_tensor_out_mps + QuantizedCPU: eq_out_quantized_cpu + tags: pointwise + +- func: eq.Tensor(Tensor self, Tensor other) -> Tensor + structured_delegate: eq.Tensor_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: eq_quantized_cpu + NestedTensorCPU, NestedTensorCUDA: eq_tensor_nested + tags: [core, pointwise] + +- func: ge.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: ge_Scalar_out + MPS: ge_scalar_out_mps + QuantizedCPU: ge_out_quantized_cpu + tags: pointwise + +- func: ge.Scalar(Tensor self, Scalar other) -> Tensor + structured_delegate: ge.Scalar_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: ge_quantized_cpu + NestedTensorCPU, NestedTensorCUDA: ge_scalar_nested + tags: [core, pointwise] + +- func: ge.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: ge_Tensor_out + MPS: ge_tensor_out_mps + QuantizedCPU: ge_out_quantized_cpu + tags: pointwise + +- func: ge.Tensor(Tensor self, Tensor other) -> Tensor + structured_delegate: ge.Tensor_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: ge_quantized_cpu + tags: [core, pointwise] + +- func: ge_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + structured_delegate: ge.Scalar_out + device_check: NoCheck # TensorIterator + variants: method + +- func: ge_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: ge.Tensor_out + device_check: NoCheck # TensorIterator + variants: method + +# greater_equal, alias for torch.ge +- func: greater_equal.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + +- func: greater_equal.Scalar(Tensor self, Scalar other) -> Tensor + variants: method, function + +- func: greater_equal.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: greater_equal.Tensor(Tensor self, Tensor other) -> Tensor + variants: method, function + +- func: greater_equal_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: greater_equal_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: le.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: le_Scalar_out + MPS: le_scalar_out_mps + QuantizedCPU: le_out_quantized_cpu + tags: pointwise + +- func: le.Scalar(Tensor self, Scalar other) -> Tensor + structured_delegate: le.Scalar_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: le_quantized_cpu + tags: [core, pointwise] + +- func: le.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: le_Tensor_out + MPS: le_tensor_out_mps + QuantizedCPU: le_out_quantized_cpu + tags: pointwise + +- func: le.Tensor(Tensor self, Tensor other) -> Tensor + structured_delegate: le.Tensor_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: le_quantized_cpu + tags: [core, pointwise] + +- func: le_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + structured_delegate: le.Scalar_out + device_check: NoCheck # TensorIterator + variants: method + +- func: le_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: le.Tensor_out + device_check: NoCheck # TensorIterator + variants: method + +# less_equal, alias for torch.le +- func: less_equal.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + +- func: less_equal.Scalar(Tensor self, Scalar other) -> Tensor + variants: method, function + +- func: less_equal.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: less_equal.Tensor(Tensor self, Tensor other) -> Tensor + variants: method, function + +- func: less_equal_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: less_equal_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: gt.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: gt_Scalar_out + MPS: gt_scalar_out_mps + QuantizedCPU: gt_out_quantized_cpu + tags: pointwise + +- func: gt.Scalar(Tensor self, Scalar other) -> Tensor + structured_delegate: gt.Scalar_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: gt_quantized_cpu + NestedTensorCPU, NestedTensorCUDA: gt_scalar_nested + tags: [core, pointwise] + +- func: gt.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: gt_Tensor_out + MPS: gt_tensor_out_mps + QuantizedCPU: gt_out_quantized_cpu + tags: pointwise + +- func: gt.Tensor(Tensor self, Tensor other) -> Tensor + structured_delegate: gt.Tensor_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: gt_quantized_cpu + tags: [core, pointwise] + +- func: gt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + structured_delegate: gt.Scalar_out + device_check: NoCheck # TensorIterator + variants: method + +- func: gt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: gt.Tensor_out + device_check: NoCheck # TensorIterator + variants: method + +# greater, alias for torch.gt +- func: greater.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + +- func: greater.Scalar(Tensor self, Scalar other) -> Tensor + variants: method, function + +- func: greater.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: greater.Tensor(Tensor self, Tensor other) -> Tensor + variants: method, function + +- func: greater_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: greater_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: lt.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: lt_Scalar_out + MPS: lt_scalar_out_mps + QuantizedCPU: lt_out_quantized_cpu + tags: pointwise + +- func: lt.Scalar(Tensor self, Scalar other) -> Tensor + structured_delegate: lt.Scalar_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: lt_quantized_cpu + tags: [core, pointwise] + +- func: lt.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: lt_Tensor_out + MPS: lt_tensor_out_mps + QuantizedCPU: lt_out_quantized_cpu + tags: pointwise + +- func: lt.Tensor(Tensor self, Tensor other) -> Tensor + structured_delegate: lt.Tensor_out + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + QuantizedCPU: lt_quantized_cpu + tags: [core, pointwise] + +- func: lt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + structured_delegate: lt.Scalar_out + device_check: NoCheck # TensorIterator + variants: method + +- func: lt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: lt.Tensor_out + device_check: NoCheck # TensorIterator + variants: method + +# less, alias for torch.lt +- func: less.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + +- func: less.Scalar(Tensor self, Scalar other) -> Tensor + variants: method, function + +- func: less.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: less.Tensor(Tensor self, Tensor other) -> Tensor + variants: method, function + +- func: less_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + +- func: less_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: take.out(Tensor self, Tensor index, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: take_out + +- func: take(Tensor self, Tensor index) -> Tensor + variants: method, function + dispatch: + CPU, CUDA: take + +- func: take_along_dim.out(Tensor self, Tensor indices, int? dim=None, *, Tensor(a!) out) -> Tensor(a!) + +- func: take_along_dim(Tensor self, Tensor indices, int? dim=None) -> Tensor + variants: method, function + +- func: index_select.out(Tensor self, int dim, Tensor index, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, QuantizedCPU: index_select_out_cpu_ + CUDA, QuantizedCUDA: index_select_out_cuda + MPS: index_select_out_mps + +- func: index_select(Tensor self, int dim, Tensor index) -> Tensor + variants: method, function + dispatch: + CPU: index_select_cpu_ + QuantizedCPU: index_select_quantized_cpu_ + CUDA: index_select_cuda + QuantizedCUDA: index_select_quantized_cuda + SparseCPU: index_select_sparse_cpu + SparseCUDA: index_select_sparse_cuda + MPS: index_select_mps + tags: core + +- func: index_select.dimname_out(Tensor self, Dimname dim, Tensor index, *, Tensor(a!) out) -> Tensor(a!) + +- func: index_select.dimname(Tensor self, Dimname dim, Tensor index) -> Tensor + variants: method, function + +- func: index_select_backward(Tensor grad, SymInt[] self_sizes, int dim, Tensor index) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + dispatch: + CompositeImplicitAutograd: index_select_backward_symint + +- func: masked_select.out(Tensor self, Tensor mask, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: masked_select_out_cpu + CUDA: masked_select_out_cuda + MPS: masked_select_out_mps + tags: dynamic_output_shape + +- func: masked_select(Tensor self, Tensor mask) -> Tensor + variants: method, function + dispatch: + CPU: masked_select_cpu + CUDA: masked_select_cuda + MPS: masked_select_mps + tags: dynamic_output_shape + +- func: masked_select_backward(Tensor grad, Tensor input, Tensor mask) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + +- func: nonzero.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: nonzero_out_cpu + CUDA: nonzero_out_cuda + MPS: nonzero_out_mps + tags: dynamic_output_shape + +- func: nonzero(Tensor self) -> Tensor + variants: method, function + dispatch: + CPU: nonzero_cpu + CUDA: nonzero_cuda + MPS: nonzero_mps + tags: [dynamic_output_shape, core] + +- func: nonzero_static.out(Tensor self, *, int size, int fill_value=-1, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: nonzero_static_out_cpu + CUDA: nonzero_static_out_cuda + +- func: nonzero_static(Tensor self, *, int size, int fill_value=-1) -> Tensor + variants: method, function + dispatch: + CPU: nonzero_static_cpu + CUDA: nonzero_static_cuda + +- func: nonzero_numpy(Tensor self) -> Tensor[] + variants: method, function + +- func: argwhere(Tensor self) -> Tensor + variants: method, function + tags: dynamic_output_shape + +- func: gather.out(Tensor self, int dim, Tensor index, *, bool sparse_grad=False, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU, CUDA: gather_out + MPS: gather_out_mps + +- func: gather(Tensor self, int dim, Tensor index, *, bool sparse_grad=False) -> Tensor + variants: method, function + structured_delegate: gather.out + tags: core + +- func: gather_backward(Tensor grad, Tensor self, int dim, Tensor index, bool sparse_grad) -> Tensor + variants: function + device_check: NoCheck + device_guard: False + +- func: gather.dimname_out(Tensor self, Dimname dim, Tensor index, *, bool sparse_grad=False, Tensor(a!) out) -> Tensor(a!) + +- func: gather.dimname(Tensor self, Dimname dim, Tensor index, *, bool sparse_grad=False) -> Tensor + variants: method, function + +- func: _gather_sparse_backward(Tensor self, int dim, Tensor index, Tensor grad) -> Tensor + +- func: addcmul.out(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: addcmul_out + MPS: addcmul_out_mps + tags: pointwise + +- func: addcmul(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor + structured_delegate: addcmul.out + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: addcmul_(Tensor(a!) self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor(a!) + structured_delegate: addcmul.out + device_check: NoCheck # TensorIterator + variants: method + tags: pointwise + +- func: addcdiv.out(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: addcdiv_out + MPS: addcdiv_out_mps + tags: pointwise + +- func: addcdiv(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor + structured_delegate: addcdiv.out + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: addcdiv_(Tensor(a!) self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor(a!) + structured_delegate: addcdiv.out + device_check: NoCheck # TensorIterator + variants: method + tags: pointwise + +- func: cross_entropy_loss(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100, float label_smoothing=0.0) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: cross_entropy_loss_symint + +- func: triangular_solve.X(Tensor self, Tensor A, bool upper=True, bool transpose=False, bool unitriangular=False, *, Tensor(a!) X, Tensor(b!) M) -> (Tensor(a!) solution, Tensor(b!) cloned_coefficient) + structured: True + dispatch: + CPU, CUDA: triangular_solve_out + MPS: triangular_solve_mps_out + SparseCsrCPU: triangular_solve_out_sparse_csr_cpu + SparseCsrCUDA: triangular_solve_out_sparse_csr_cuda + +- func: triangular_solve(Tensor self, Tensor A, bool upper=True, bool transpose=False, bool unitriangular=False) -> (Tensor solution, Tensor cloned_coefficient) + structured_delegate: triangular_solve.X + variants: method, function + +- func: _linalg_check_errors(Tensor info, str api_name, *, bool is_matrix) -> () + dispatch: + CompositeExplicitAutograd: _linalg_check_errors + +- func: linalg_solve_triangular.out(Tensor self, Tensor B, *, bool upper, bool left=True, bool unitriangular=False, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + dispatch: + CPU, CUDA: linalg_solve_triangular_out + MPS: linalg_solve_triangular_mps_out + +- func: linalg_solve_triangular(Tensor self, Tensor B, *, bool upper, bool left=True, bool unitriangular=False) -> Tensor + python_module: linalg + variants: function + dispatch: + CPU, CUDA: linalg_solve_triangular + MPS: linalg_solve_triangular_mps + +- func: linalg_vander(Tensor x, *, SymInt? N=None) -> Tensor + python_module: linalg + dispatch: + CompositeImplicitAutograd: linalg_vander_symint + +- func: svd.U(Tensor self, bool some=True, bool compute_uv=True, *, Tensor(a!) U, Tensor(b!) S, Tensor(c!) V) -> (Tensor(a!) U, Tensor(b!) S, Tensor(c!) V) + +- func: svd(Tensor self, bool some=True, bool compute_uv=True) -> (Tensor U, Tensor S, Tensor V) + variants: method, function + +# swapaxes, alias for transpose +- func: swapaxes(Tensor(a) self, int axis0, int axis1) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + +- func: swapaxes_(Tensor(a!) self, int axis0, int axis1) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + +# swapdims, alias for transpose +- func: swapdims(Tensor(a) self, int dim0, int dim1) -> Tensor(a) + variants: function, method + device_check: NoCheck + device_guard: False + +- func: swapdims_(Tensor(a!) self, int dim0, int dim1) -> Tensor(a!) + variants: method + device_check: NoCheck + device_guard: False + tags: inplace_view + +- func: cholesky.out(Tensor self, bool upper=False, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: cholesky_out + +- func: cholesky(Tensor self, bool upper=False) -> Tensor + variants: method, function + dispatch: + CPU, CUDA: cholesky + +- func: cholesky_solve.out(Tensor self, Tensor input2, bool upper=False, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: cholesky_solve_out + +- func: cholesky_solve(Tensor self, Tensor input2, bool upper=False) -> Tensor + variants: method, function + dispatch: + CompositeExplicitAutograd: cholesky_solve + +- func: _cholesky_solve_helper(Tensor self, Tensor A, bool upper) -> Tensor + variants: function + dispatch: + CPU: _cholesky_solve_helper_cpu + CUDA: _cholesky_solve_helper_cuda + autogen: _cholesky_solve_helper.out + +- func: cholesky_inverse(Tensor self, bool upper=False) -> Tensor + variants: method, function + dispatch: + CPU, CUDA: cholesky_inverse + +- func: cholesky_inverse.out(Tensor self, bool upper=False, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: cholesky_inverse_out + +- func: qr.Q(Tensor self, bool some=True, *, Tensor(a!) Q, Tensor(b!) R) -> (Tensor(a!) Q, Tensor(b!) R) + +- func: qr(Tensor self, bool some=True) -> (Tensor Q, Tensor R) + variants: method, function + +- func: geqrf.a(Tensor self, *, Tensor(a!) a, Tensor(b!) tau) -> (Tensor(a!) a, Tensor(b!) tau) + dispatch: + CPU, CUDA: geqrf_out + +- func: geqrf(Tensor self) -> (Tensor a, Tensor tau) + variants: method, function + dispatch: + CPU, CUDA: geqrf + +# orgqr, alias for linalg_householder_product +- func: orgqr(Tensor self, Tensor input2) -> Tensor + variants: method, function + +- func: orgqr.out(Tensor self, Tensor input2, *, Tensor(a!) out) -> Tensor(a!) + +- func: ormqr.out(Tensor self, Tensor input2, Tensor input3, bool left=True, bool transpose=False, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: ormqr_out + +- func: ormqr(Tensor self, Tensor input2, Tensor input3, bool left=True, bool transpose=False) -> Tensor + variants: method, function + dispatch: + CPU, CUDA: ormqr + +- func: _lu_with_info(Tensor self, bool pivot=True, bool check_errors=True) -> (Tensor LU, Tensor pivots, Tensor info) + variants: function + +- func: lu_solve.out(Tensor self, Tensor LU_data, Tensor LU_pivots, *, Tensor(a!) out) -> Tensor(a!) + +- func: lu_solve(Tensor self, Tensor LU_data, Tensor LU_pivots) -> Tensor + variants: method, function + +# lu_unpack +- func: lu_unpack(Tensor LU_data, Tensor LU_pivots, bool unpack_data=True, bool unpack_pivots=True) -> (Tensor P, Tensor L, Tensor U) + structured_delegate: lu_unpack.out + variants: function + +- func: lu_unpack.out(Tensor LU_data, Tensor LU_pivots, bool unpack_data=True, bool unpack_pivots=True, *, Tensor(a!) P, Tensor(b!) L, Tensor(c!) U) -> (Tensor(a!) P, Tensor(b!) L, Tensor(c!) U) + variants: function + structured: True + dispatch: + CPU, CUDA: lu_unpack_out + +# TODO: remove dispatch section when porting TH CUDA to ATen +- func: multinomial.out(Tensor self, int num_samples, bool replacement=False, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CPU, CUDA: multinomial_out + MPS: multinomial_out_mps + +- func: multinomial(Tensor self, int num_samples, bool replacement=False, *, Generator? generator=None) -> Tensor + variants: method, function + dispatch: + CPU, CUDA: multinomial + MPS: multinomial_mps + tags: nondeterministic_seeded + +- func: lgamma.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: lgamma_out + MPS: lgamma_out_mps + tags: pointwise + +- func: lgamma_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: lgamma.out + variants: method + tags: pointwise + +- func: lgamma(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: lgamma.out + variants: method, function + tags: pointwise + +- func: digamma.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: digamma_out + MPS: digamma_out_mps + tags: pointwise + +- func: digamma(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: digamma.out + variants: method, function + tags: pointwise + +- func: polygamma.out(int n, Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: polygamma_out + MPS: polygamma_out_mps + tags: pointwise + +- func: polygamma(int n, Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: polygamma.out + variants: method, function + tags: pointwise + +- func: polygamma_(Tensor(a!) self, int n) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: polygamma_ + tags: pointwise + +- func: erfinv(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: erfinv.out + variants: method, function + dispatch: + SparseCPU, SparseCUDA: erfinv_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: erfinv_sparse_csr + tags: pointwise + +- func: erfinv_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: erfinv.out + variants: method + dispatch: + SparseCPU, SparseCUDA: erfinv_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: erfinv_sparse_csr_ + tags: pointwise + +- func: erfinv.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: erfinv_out + MPS: erfinv_out_mps + SparseCPU, SparseCUDA: erfinv_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: erfinv_sparse_csr_out + tags: pointwise + +- func: i0(Tensor self) -> Tensor + structured_delegate: i0.out + variants: function, method + tags: pointwise + +- func: i0_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: i0.out + variants: function, method + tags: pointwise + +- func: i0.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: i0_out + tags: pointwise + +- func: sign(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: sign.out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: sign_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sign_sparse_csr + tags: [core, pointwise] + +- func: sign_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: sign.out + variants: method + dispatch: + SparseCPU, SparseCUDA: sign_sparse_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sign_sparse_csr_ + tags: pointwise + +- func: sign.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sign_out + MPS: sign_out_mps + SparseCPU, SparseCUDA: sign_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: sign_sparse_csr_out + tags: pointwise + +- func: signbit(Tensor self) -> Tensor + variants: function, method + structured_delegate: signbit.out + dispatch: + SparseCPU, SparseCUDA: signbit_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: signbit_sparse_csr + tags: pointwise + +- func: signbit.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU: signbit_out + CUDA: signbit_out + MPS: signbit_out_mps + SparseCPU, SparseCUDA: signbit_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: signbit_sparse_csr_out + tags: pointwise + +- func: dist(Tensor self, Tensor other, Scalar p=2) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: dist + autogen: dist.out + +- func: atan2.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: atan2_out + MPS: atan2_out_mps + tags: [core, pointwise] + +- func: atan2_(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: atan2.out + variants: method + tags: pointwise + +- func: atan2(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: atan2.out + variants: method, function + tags: [core, pointwise] +# arctan2, alias of atan2 + +- func: arctan2(Tensor self, Tensor other) -> Tensor + variants: method, function + +- func: arctan2.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + +- func: arctan2_(Tensor(a!) self, Tensor other) -> Tensor(a!) + variants: method + +- func: lerp.Scalar_out(Tensor self, Tensor end, Scalar weight, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: lerp_Scalar + MPS: lerp_Scalar_mps + tags: pointwise + +- func: lerp.Tensor_out(Tensor self, Tensor end, Tensor weight, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: lerp_Tensor + MPS: lerp_Tensor_mps + tags: pointwise + +- func: lerp.Scalar(Tensor self, Tensor end, Scalar weight) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + structured_delegate: lerp.Scalar_out + tags: pointwise + +- func: lerp.Tensor(Tensor self, Tensor end, Tensor weight) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + structured_delegate: lerp.Tensor_out + tags: pointwise + +- func: histc.out(Tensor self, int bins=100, Scalar min=0, Scalar max=0, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, MPS: histogram_histc_out + CUDA: _histc_out_cuda + +- func: histc(Tensor self, int bins=100, Scalar min=0, Scalar max=0) -> Tensor + variants: method, function + dispatch: + CPU, MPS: histogram_histc + CUDA: _histc_cuda + +- func: histogram.bins_tensor_out(Tensor self, Tensor bins, *, Tensor? weight=None, bool density=False, Tensor(a!) hist, Tensor(b!) bin_edges) -> (Tensor(a!) hist, Tensor(b!) bin_edges) + dispatch: + CPU, MPS: histogram_out + +- func: histogram.bins_tensor(Tensor self, Tensor bins, *, Tensor? weight=None, bool density=False) -> (Tensor hist, Tensor bin_edges) + variants: method, function + dispatch: + CPU, MPS: histogram + +- func: histogram.bin_ct_out(Tensor self, int bins=100, *, float[]? range=None, Tensor? weight=None, bool density=False, Tensor(a!) hist, Tensor(b!) bin_edges) -> (Tensor(a!) hist, Tensor(b!) bin_edges) + dispatch: + CPU, MPS: histogram_out + +- func: histogram.bin_ct(Tensor self, int bins=100, *, float[]? range=None, Tensor? weight=None, bool density=False) -> (Tensor hist, Tensor bin_edges) + variants: method, function + dispatch: + CPU, MPS: histogram + +- func: _histogramdd_bin_edges(Tensor self, int[] bins, *, float[]? range=None, Tensor? weight=None, bool density=False) -> Tensor[] + dispatch: + CPU, MPS: histogramdd_bin_edges + autogen: _histogramdd_bin_edges.out + +- func: _histogramdd_from_bin_cts(Tensor self, int[] bins, *, float[]? range=None, Tensor? weight=None, bool density=False) -> Tensor + dispatch: + CPU, MPS: _histogramdd + autogen: _histogramdd_from_bin_cts.out + +- func: _histogramdd_from_bin_tensors(Tensor self, Tensor[] bins, *, Tensor? weight=None, bool density=False) -> Tensor + dispatch: + CPU, MPS: _histogramdd + autogen: _histogramdd_from_bin_tensors.out + +- func: histogramdd(Tensor self, int[] bins, float[]? range=None, Tensor? weight=None, bool density=False) -> (Tensor hist, Tensor[] bin_edges) + +- func: histogramdd.int_bins(Tensor self, int bins, float[]? range=None, Tensor? weight=None, bool density=False) -> (Tensor hist, Tensor[] bin_edges) + +- func: histogramdd.TensorList_bins(Tensor self, Tensor[] bins, float[]? range=None, Tensor? weight=None, bool density=False) -> (Tensor hist, Tensor[] bin_edges) + +- func: fmod.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CompositeExplicitAutograd: fmod_out + tags: pointwise + +- func: fmod.Scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: fmod + tags: [core, pointwise] + +- func: fmod_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + dispatch: + CompositeExplicitAutograd: fmod_ + tags: pointwise + +- func: fmod.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: fmod_out + MPS: fmod_mps_out + tags: pointwise + +- func: fmod.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: fmod.Tensor_out + variants: method, function + tags: [core, pointwise] + +- func: fmod_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: fmod.Tensor_out + tags: pointwise + +- func: hypot.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: hypot_out + MPS: hypot_out_mps + tags: pointwise + +- func: hypot(Tensor self, Tensor other) -> Tensor + structured_delegate: hypot.out + variants: method, function + tags: pointwise + +- func: hypot_(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: hypot.out + variants: method + tags: pointwise + +- func: igamma.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: igamma_out + tags: pointwise + +- func: igamma(Tensor self, Tensor other) -> Tensor + structured_delegate: igamma.out + variants: method, function + tags: pointwise + +- func: igamma_(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: igamma.out + variants: method + tags: pointwise + +- func: igammac.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: igammac_out + tags: pointwise + +- func: igammac(Tensor self, Tensor other) -> Tensor + structured_delegate: igammac.out + variants: method, function + tags: pointwise + +- func: igammac_(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: igammac.out + variants: method + tags: pointwise + +- func: nextafter.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: nextafter_out + tags: pointwise + +- func: nextafter(Tensor self, Tensor other) -> Tensor + structured_delegate: nextafter.out + variants: method, function + tags: pointwise + +- func: nextafter_(Tensor(a!) self, Tensor other) -> Tensor(a!) + structured_delegate: nextafter.out + variants: method + tags: pointwise + +- func: remainder.Scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: remainder_out + tags: pointwise + +- func: remainder.Scalar(Tensor self, Scalar other) -> Tensor + variants: method, function + dispatch: + CompositeExplicitAutograd: remainder + tags: [core, pointwise] + +- func: remainder_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + variants: method + dispatch: + CompositeExplicitAutograd: remainder_ + tags: pointwise + +- func: remainder.Tensor_out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: remainder_out + MPS: remainder_out_mps + tags: pointwise + +- func: remainder.Tensor(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: remainder.Tensor_out + variants: method, function + tags: [core, pointwise] + +- func: remainder_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: remainder.Tensor_out + variants: method + tags: pointwise + +- func: remainder.Scalar_Tensor(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: function + dispatch: + CPU, CUDA, MPS: remainder + autogen: remainder.Scalar_Tensor_out + tags: pointwise + +- func: min(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CPU, CUDA: min + MPS: min_mps + QuantizedCPU: min_quantized_cpu + +- func: min.unary_out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: min_unary_out + QuantizedCPU: min_quantized_unary_out + +- func: fmin(Tensor self, Tensor other) -> Tensor + structured_delegate: fmin.out + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: fmin.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA, MPS: fmin_out + tags: pointwise + +- func: max(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CPU, CUDA: max + MPS: max_mps + QuantizedCPU: max_quantized_cpu + +- func: fmax(Tensor self, Tensor other) -> Tensor + structured_delegate: fmax.out + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: fmax.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA, MPS: fmax_out + tags: pointwise + +- func: maximum(Tensor self, Tensor other) -> Tensor + structured_delegate: maximum.out + device_check: NoCheck # TensorIterator + variants: method, function + tags: [core, pointwise] + +- func: maximum.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: maximum_out + MPS: maximum_out_mps + tags: pointwise + +# binary max, alias of maximum +# NOTE: max is not an alias for maximum, since there is also unary max +- func: max.other(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: max.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: pointwise + +- func: max.unary_out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: max_unary_out + QuantizedCPU: max_quantized_unary_out + +- func: minimum(Tensor self, Tensor other) -> Tensor + structured_delegate: minimum.out + device_check: NoCheck # TensorIterator + variants: method, function + tags: [core, pointwise] + +- func: minimum.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + dispatch: + CPU, CUDA: minimum_out + MPS: minimum_out_mps + tags: pointwise + +# binary min, alias for minimum +# NOTE: min is not an alias for minimum, since there is also unary min +- func: min.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: pointwise + +- func: min.other(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + tags: pointwise + +- func: quantile(Tensor self, Tensor q, int? dim=None, bool keepdim=False, *, str interpolation='linear') -> Tensor + variants: method, function + +- func: quantile.out(Tensor self, Tensor q, int? dim=None, bool keepdim=False, *, str interpolation='linear', Tensor(a!) out) -> Tensor(a!) + +- func: quantile.scalar(Tensor self, float q, int? dim=None, bool keepdim=False, *, str interpolation='linear') -> Tensor + variants: method, function + +- func: quantile.scalar_out(Tensor self, float q, int? dim=None, bool keepdim=False, *, str interpolation='linear', Tensor(a!) out) -> Tensor(a!) + +- func: nanquantile(Tensor self, Tensor q, int? dim=None, bool keepdim=False, *, str interpolation='linear') -> Tensor + variants: method, function + +- func: nanquantile.out(Tensor self, Tensor q, int? dim=None, bool keepdim=False, *, str interpolation='linear', Tensor(a!) out) -> Tensor(a!) + +- func: nanquantile.scalar(Tensor self, float q, int? dim=None, bool keepdim=False, *, str interpolation='linear') -> Tensor + variants: method, function + +- func: nanquantile.scalar_out(Tensor self, float q, int? dim=None, bool keepdim=False, *, str interpolation='linear', Tensor(a!) out) -> Tensor(a!) + +- func: sort.values(Tensor self, int dim=-1, bool descending=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + device_check: NoCheck # TensorIterator + dispatch: + CompositeExplicitAutograd: sort_out + +- func: sort.values_stable(Tensor self, *, bool? stable, int dim=-1, bool descending=False, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + structured: True + dispatch: + CPU, CUDA: sort_stable_out + MPS: sort_stable_out_mps + +- func: sort(Tensor self, int dim=-1, bool descending=False) -> (Tensor values, Tensor indices) + device_check: NoCheck # TensorIterator + variants: method, function + dispatch: + CompositeExplicitAutograd: sort + tags: core + +- func: sort.stable(Tensor self, *, bool? stable, int dim=-1, bool descending=False) -> (Tensor values, Tensor indices) + structured_delegate: sort.values_stable + variants: method, function + dispatch: + QuantizedCPU: sort_quantized_cpu_stable + +- func: sort.dimname_values(Tensor self, Dimname dim, bool descending=False, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + +- func: sort.dimname_values_stable(Tensor self, *, bool? stable, Dimname dim, bool descending=False, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + +- func: sort.dimname(Tensor self, Dimname dim, bool descending=False) -> (Tensor values, Tensor indices) + variants: method, function + +- func: sort.dimname_stable(Tensor self, *, bool? stable, Dimname dim, bool descending=False) -> (Tensor values, Tensor indices) + variants: method, function + +- func: msort.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: msort(Tensor self) -> Tensor + variants: method, function + +- func: argsort(Tensor self, int dim=-1, bool descending=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + +- func: argsort.stable(Tensor self, *, bool stable, int dim=-1, bool descending=False) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + +- func: argsort.stable_out(Tensor self, *, bool stable, int dim=-1, bool descending=False, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: function + +- func: argsort.dimname(Tensor self, Dimname dim, bool descending=False) -> Tensor + variants: method, function + +- func: topk.values(Tensor self, SymInt k, int dim=-1, bool largest=True, bool sorted=True, *, Tensor(a!) values, Tensor(b!) indices) -> (Tensor(a!) values, Tensor(b!) indices) + structured: True + dispatch: + CPU: topk_out_cpu + CUDA: topk_out_cuda + MPS: topk_out_mps + +- func: topk(Tensor self, SymInt k, int dim=-1, bool largest=True, bool sorted=True) -> (Tensor values, Tensor indices) + variants: method, function + structured_delegate: topk.values + dispatch: + QuantizedCPU: topk_quantized_cpu + tags: core + +- func: all(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: all.all_out + variants: method, function + +- func: all.all_out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + structured: True + dispatch: + CPU, CUDA: all_all_out + MPS: all_all_out_mps + +- func: any(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: any.all_out + variants: method, function + dispatch: + SparseCPU, SparseCUDA: any_sparse + tags: core + +- func: any.all_out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + structured: True + dispatch: + CPU, CUDA: any_all_out + MPS: any_all_out_mps + +- func: renorm.out(Tensor self, Scalar p, int dim, Scalar maxnorm, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + dispatch: + CPU, CUDA: renorm_out + MPS: renorm_out_mps + +- func: renorm(Tensor self, Scalar p, int dim, Scalar maxnorm) -> Tensor + device_check: NoCheck # TensorIterator + variants: method, function + structured_delegate: renorm.out + +- func: renorm_(Tensor(a!) self, Scalar p, int dim, Scalar maxnorm) -> Tensor(a!) + device_check: NoCheck # TensorIterator + variants: method + structured_delegate: renorm.out + +- func: unfold(Tensor(a) self, int dimension, int size, int step) -> Tensor(a) + variants: method + device_check: NoCheck + device_guard: False + dispatch: + CPU, CUDA, Meta, MPS: unfold + QuantizedCPU, QuantizedCUDA: unfold + +- func: unfold_backward(Tensor grad_in, SymInt[] input_sizes, int dim, int size, int step) -> Tensor + variants: function + dispatch: + CPU, CUDA, MPS: unfold_backward + autogen: unfold_backward.out + +- func: equal(Tensor self, Tensor other) -> bool + tags: [data_dependent_output, pointwise] + variants: method, function + dispatch: + CPU: cpu_equal + CUDA: cuda_equal + MPS: mps_equal + QuantizedCPU: equal_quantized_cpu + +- func: pow.Tensor_Tensor_out(Tensor self, Tensor exponent, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: pow_Tensor_Tensor_out + MPS: pow_tensor_tensor_out_mps + tags: pointwise + +- func: pow.Tensor_Tensor(Tensor self, Tensor exponent) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: pow.Tensor_Tensor_out + variants: method, function + tags: [core, pointwise] + +- func: pow.Scalar_out(Scalar self, Tensor exponent, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + dispatch: + CPU, CUDA: pow_Scalar_out + MPS: pow_Scalar_out_mps + tags: pointwise + +- func: pow.Scalar(Scalar self, Tensor exponent) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: pow.Scalar_out + tags: [core, pointwise] + +- func: pow.Tensor_Scalar_out(Tensor self, Scalar exponent, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: pow_Tensor_Scalar_out + SparseCPU, SparseCUDA: pow_out_sparse_scalar + MPS: pow_tensor_scalar_out_mps + tags: pointwise + +- func: pow.Tensor_Scalar(Tensor self, Scalar exponent) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: pow.Tensor_Scalar_out + variants: function, method + dispatch: + SparseCPU, SparseCUDA: pow_sparse_scalar + tags: [core, pointwise] + +- func: pow_.Scalar(Tensor(a!) self, Scalar exponent) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: pow.Tensor_Scalar_out + variants: method + tags: pointwise + +- func: pow_.Tensor(Tensor(a!) self, Tensor exponent) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured_delegate: pow.Tensor_Tensor_out + variants: method + tags: pointwise + +- func: float_power.Tensor_Tensor_out(Tensor self, Tensor exponent, *, Tensor(a!) out) -> Tensor(a!) + tags: pointwise + +- func: float_power.Tensor_Tensor(Tensor self, Tensor exponent) -> Tensor + variants: function, method + tags: pointwise + +- func: float_power.Scalar_out(Scalar self, Tensor exponent, *, Tensor(a!) out) -> Tensor(a!) + tags: pointwise + +- func: float_power.Scalar(Scalar self, Tensor exponent) -> Tensor + tags: pointwise + +- func: float_power.Tensor_Scalar_out(Tensor self, Scalar exponent, *, Tensor(a!) out) -> Tensor(a!) + tags: pointwise + +- func: float_power.Tensor_Scalar(Tensor self, Scalar exponent) -> Tensor + variants: function, method + tags: pointwise + +- func: float_power_.Scalar(Tensor(a!) self, Scalar exponent) -> Tensor(a!) + variants: method + tags: pointwise + +- func: float_power_.Tensor(Tensor(a!) self, Tensor exponent) -> Tensor(a!) + variants: method + tags: pointwise + +- func: normal_(Tensor(a!) self, float mean=0, float std=1, *, Generator? generator=None) -> Tensor(a!) + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + variants: method + dispatch: + CPU, CUDA: normal_ + MPS: normal_mps_ + Meta: normal_meta_ + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: normal_sparse_csr_ + NestedTensorCPU, NestedTensorCUDA: normal_nested_ + autogen: normal.out + +# Only used by the functionalization pass. +# Normally, the codegen would be able to generate a normal() NativeFunction, +# but we can't due to overload ambiguity with normal.Tensor_float. +- func: normal_functional(Tensor self, float mean=0, float std=1, *, Generator? generator=None) -> Tensor + device_check: NoCheck # TensorIterator + tags: nondeterministic_seeded + dispatch: + CompositeExplicitAutograd: normal_functional + +- func: normal.Tensor_float_out(Tensor mean, float std=1, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!) + tags: nondeterministic_seeded + dispatch: + CPU, CUDA: normal_out + MPS: normal_mps_out + Meta: normal_out_meta + +- func: normal.Tensor_float(Tensor mean, float std=1, *, Generator? generator=None) -> Tensor + dispatch: + CPU, CUDA: normal + MPS: normal_mps + Meta: normal_meta + tags: nondeterministic_seeded + +- func: normal.float_Tensor_out(float mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: normal_out + Meta: normal_out_meta + MPS: normal_mps_out + tags: nondeterministic_seeded + +- func: normal.float_Tensor(float mean, Tensor std, *, Generator? generator=None) -> Tensor + dispatch: + CPU, CUDA: normal + MPS: normal_mps + Meta: normal_meta + tags: nondeterministic_seeded + +- func: normal.Tensor_Tensor_out(Tensor mean, Tensor std, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: normal_out + Meta: normal_out_meta + MPS: normal_mps_out + tags: nondeterministic_seeded + +- func: normal.Tensor_Tensor(Tensor mean, Tensor std, *, Generator? generator=None) -> Tensor + dispatch: + CPU, CUDA: normal + MPS: normal_mps + Meta: normal_meta + tags: nondeterministic_seeded + +- func: normal.float_float(float mean, float std, SymInt[] size, *, Generator? generator=None, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + dispatch: + CompositeExplicitAutograd: normal + tags: nondeterministic_seeded + +- func: normal.float_float_out(float mean, float std, SymInt[] size, *, Generator? generator=None, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: normal_out + tags: nondeterministic_seeded + +- func: alias(Tensor(a) self) -> Tensor(a) + variants: method, function + dispatch: + CompositeExplicitAutograd: alias + NestedTensorCPU, NestedTensorCUDA: alias_nested + tags: core + +- func: _amp_foreach_non_finite_check_and_unscale_(Tensor(a!)[] self, Tensor(b!) found_inf, Tensor inv_scale) -> () + variants: function + dispatch: + CUDA: _amp_foreach_non_finite_check_and_unscale_cuda_ + CPU: _amp_foreach_non_finite_check_and_unscale_cpu_ + autogen: _amp_foreach_non_finite_check_and_unscale, _amp_foreach_non_finite_check_and_unscale.out + +- func: _amp_update_scale_(Tensor(a!) self, Tensor(b!) growth_tracker, Tensor found_inf, float scale_growth_factor, float scale_backoff_factor, int growth_interval) -> Tensor(a!) + variants: function + dispatch: + CUDA: _amp_update_scale_cuda_ + CPU: _amp_update_scale_cpu_ + autogen: _amp_update_scale, _amp_update_scale.out + + #- func: _cat(Tensor[] tensors, int dim=0) -> Tensor + #dispatch: + #CPU: _cat_cpu + #CUDA: cat_cuda + #MPS: cat_mps + #QuantizedCPU: cat_quantized_cpu + + #- func: _cat.out(Tensor[] tensors, int dim=0, *, Tensor(a!) out) -> Tensor(a!) + #dispatch: + #CPU: _cat_out_cpu + #CUDA: cat_out_cuda + #QuantizedCPU: cat_out_quantized_cpu + +- func: _foreach_add.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_scalar_kernel_slow + CUDA: foreach_tensor_add_scalar_kernel_cuda + +- func: _foreach_add_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_scalar_kernel_slow_ + CUDA: foreach_tensor_add_scalar_kernel_cuda_ + autogen: _foreach_add.Scalar_out + +- func: _foreach_add.List(Tensor[] self, Tensor[] other, *, Scalar alpha=1) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_list_kernel_slow + CUDA: foreach_tensor_add_list_kernel_cuda + +- func: _foreach_add_.List(Tensor(a!)[] self, Tensor[] other, *, Scalar alpha=1) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_list_kernel_slow_ + CUDA: foreach_tensor_add_list_kernel_cuda_ + autogen: _foreach_add.List_out + +- func: _foreach_add.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_scalarlist_kernel_slow + CUDA: foreach_tensor_add_scalarlist_kernel_cuda + +- func: _foreach_add_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_scalarlist_kernel_slow_ + CUDA: foreach_tensor_add_scalarlist_kernel_cuda_ + autogen: _foreach_add.ScalarList_out + +- func: _foreach_add.Tensor(Tensor[] self, Tensor other, *, Scalar alpha=1) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_tensor_kernel_slow + CUDA: foreach_tensor_add_tensor_kernel_cuda + +- func: _foreach_add_.Tensor(Tensor(a!)[] self, Tensor other, *, Scalar alpha=1) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_add_tensor_kernel_slow_ + CUDA: foreach_tensor_add_tensor_kernel_cuda_ + autogen: _foreach_add.Tensor_out + +- func: _foreach_sub.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sub_scalar_kernel_slow + CUDA: foreach_tensor_sub_scalar_kernel_cuda + +- func: _foreach_sub_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sub_scalar_kernel_slow_ + CUDA: foreach_tensor_sub_scalar_kernel_cuda_ + autogen: _foreach_sub.Scalar_out + +- func: _foreach_sub.List(Tensor[] self, Tensor[] other, *, Scalar alpha=1) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sub_list_kernel_slow + CUDA: foreach_tensor_sub_list_kernel_cuda + +- func: _foreach_sub_.List(Tensor(a!)[] self, Tensor[] other, *, Scalar alpha=1) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sub_list_kernel_slow_ + CUDA: foreach_tensor_sub_list_kernel_cuda_ + autogen: _foreach_sub.List_out + +- func: _foreach_sub.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sub_scalarlist_kernel_slow + CUDA: foreach_tensor_sub_scalarlist_kernel_cuda + +- func: _foreach_sub_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sub_scalarlist_kernel_slow_ + CUDA: foreach_tensor_sub_scalarlist_kernel_cuda_ + autogen: _foreach_sub.ScalarList_out + +- func: _foreach_mul.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_scalar_kernel_slow + CUDA: foreach_tensor_mul_scalar_kernel_cuda + +- func: _foreach_mul_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_scalar_kernel_slow_ + CUDA: foreach_tensor_mul_scalar_kernel_cuda_ + autogen: _foreach_mul.Scalar_out + +- func: _foreach_mul.List(Tensor[] self, Tensor[] other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_list_kernel_slow + CUDA: foreach_tensor_mul_list_kernel_cuda + +- func: _foreach_mul_.List(Tensor(a!)[] self, Tensor[] other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_list_kernel_slow_ + CUDA: foreach_tensor_mul_list_kernel_cuda_ + autogen: _foreach_mul.List_out + +- func: _foreach_mul.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_scalarlist_kernel_slow + CUDA: foreach_tensor_mul_scalarlist_kernel_cuda + +- func: _foreach_mul_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_scalarlist_kernel_slow_ + CUDA: foreach_tensor_mul_scalarlist_kernel_cuda_ + autogen: _foreach_mul.ScalarList_out + +- func: _foreach_mul.Tensor(Tensor[] self, Tensor other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_tensor_kernel_slow + CUDA: foreach_tensor_mul_tensor_kernel_cuda + +- func: _foreach_mul_.Tensor(Tensor(a!)[] self, Tensor other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_mul_tensor_kernel_slow_ + CUDA: foreach_tensor_mul_tensor_kernel_cuda_ + autogen: _foreach_mul.Tensor_out + +- func: _foreach_div.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_scalar_kernel_slow + CUDA: foreach_tensor_div_scalar_kernel_cuda + +- func: _foreach_div_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_scalar_kernel_slow_ + CUDA: foreach_tensor_div_scalar_kernel_cuda_ + autogen: _foreach_div.Scalar_out + +- func: _foreach_div.List(Tensor[] self, Tensor[] other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_list_kernel_slow + CUDA: foreach_tensor_div_list_kernel_cuda + +- func: _foreach_div_.List(Tensor(a!)[] self, Tensor[] other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_list_kernel_slow_ + CUDA: foreach_tensor_div_list_kernel_cuda_ + autogen: _foreach_div.List_out + +- func: _foreach_div.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_scalarlist_kernel_slow + CUDA: foreach_tensor_div_scalarlist_kernel_cuda + +- func: _foreach_div_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_scalarlist_kernel_slow_ + CUDA: foreach_tensor_div_scalarlist_kernel_cuda_ + autogen: _foreach_div.ScalarList_out + +- func: _foreach_div.Tensor(Tensor[] self, Tensor other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_tensor_kernel_slow + CUDA: foreach_tensor_div_tensor_kernel_cuda + +- func: _foreach_div_.Tensor(Tensor(a!)[] self, Tensor other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_div_tensor_kernel_slow_ + CUDA: foreach_tensor_div_tensor_kernel_cuda_ + autogen: _foreach_div.Tensor_out + +- func: _foreach_clamp_max.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalar_kernel_slow + CUDA: foreach_tensor_clamp_max_scalar_kernel_cuda + +- func: _foreach_clamp_max_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalar_kernel_slow_ + CUDA: foreach_tensor_clamp_max_scalar_kernel_cuda_ + autogen: _foreach_clamp_max.Scalar_out + +- func: _foreach_clamp_max.List(Tensor[] self, Tensor[] other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_list_kernel_slow + CUDA: foreach_tensor_clamp_max_list_kernel_cuda + +- func: _foreach_clamp_max_.List(Tensor(a!)[] self, Tensor[] other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_list_kernel_slow_ + CUDA: foreach_tensor_clamp_max_list_kernel_cuda_ + autogen: _foreach_clamp_max.List_out + +- func: _foreach_clamp_max.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalarlist_kernel_slow + CUDA: foreach_tensor_clamp_max_scalarlist_kernel_cuda + +- func: _foreach_clamp_max_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalarlist_kernel_slow_ + CUDA: foreach_tensor_clamp_max_scalarlist_kernel_cuda_ + autogen: _foreach_clamp_max.ScalarList_out + +- func: _foreach_clamp_min.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalar_kernel_slow + CUDA: foreach_tensor_clamp_min_scalar_kernel_cuda + +- func: _foreach_clamp_min_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalar_kernel_slow_ + CUDA: foreach_tensor_clamp_min_scalar_kernel_cuda_ + autogen: _foreach_clamp_min.Scalar_out + +- func: _foreach_clamp_min.List(Tensor[] self, Tensor[] other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_list_kernel_slow + CUDA: foreach_tensor_clamp_min_list_kernel_cuda + +- func: _foreach_clamp_min_.List(Tensor(a!)[] self, Tensor[] other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_list_kernel_slow_ + CUDA: foreach_tensor_clamp_min_list_kernel_cuda_ + autogen: _foreach_clamp_min.List_out + +- func: _foreach_clamp_min.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalarlist_kernel_slow + CUDA: foreach_tensor_clamp_min_scalarlist_kernel_cuda + +- func: _foreach_clamp_min_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalarlist_kernel_slow_ + CUDA: foreach_tensor_clamp_min_scalarlist_kernel_cuda_ + autogen: _foreach_clamp_min.ScalarList_out + +# foreach_minimum/maximum dispatches to clamp_max/min +- func: _foreach_maximum.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalar_kernel_slow + CUDA: foreach_tensor_clamp_min_scalar_kernel_cuda + +- func: _foreach_maximum_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalar_kernel_slow_ + CUDA: foreach_tensor_clamp_min_scalar_kernel_cuda_ + autogen: _foreach_maximum.Scalar_out + +# foreach_minimum/maximum dispatches to clamp_max/min +- func: _foreach_maximum.List(Tensor[] self, Tensor[] other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_list_kernel_slow + CUDA: foreach_tensor_clamp_min_list_kernel_cuda + +- func: _foreach_maximum_.List(Tensor(a!)[] self, Tensor[] other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_list_kernel_slow_ + CUDA: foreach_tensor_clamp_min_list_kernel_cuda_ + autogen: _foreach_maximum.List_out + +# foreach_minimum/maximum dispatches to clamp_max/min +- func: _foreach_maximum.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalarlist_kernel_slow + CUDA: foreach_tensor_clamp_min_scalarlist_kernel_cuda + +- func: _foreach_maximum_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_min_scalarlist_kernel_slow_ + CUDA: foreach_tensor_clamp_min_scalarlist_kernel_cuda_ + autogen: _foreach_maximum.ScalarList_out + +- func: _foreach_minimum.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalar_kernel_slow + CUDA: foreach_tensor_clamp_max_scalar_kernel_cuda + +- func: _foreach_minimum_.Scalar(Tensor(a!)[] self, Scalar scalar) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalar_kernel_slow_ + CUDA: foreach_tensor_clamp_max_scalar_kernel_cuda_ + autogen: _foreach_minimum.Scalar_out + +- func: _foreach_minimum.List(Tensor[] self, Tensor[] other) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_list_kernel_slow + CUDA: foreach_tensor_clamp_max_list_kernel_cuda + +- func: _foreach_minimum_.List(Tensor(a!)[] self, Tensor[] other) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_list_kernel_slow_ + CUDA: foreach_tensor_clamp_max_list_kernel_cuda_ + autogen: _foreach_minimum.List_out + +- func: _foreach_minimum.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalarlist_kernel_slow + CUDA: foreach_tensor_clamp_max_scalarlist_kernel_cuda + +- func: _foreach_minimum_.ScalarList(Tensor(a!)[] self, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_clamp_max_scalarlist_kernel_slow_ + CUDA: foreach_tensor_clamp_max_scalarlist_kernel_cuda_ + autogen: _foreach_minimum.ScalarList_out + +- func: _foreach_addcdiv.Scalar(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar value=1) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcdiv_scalar_slow + CUDA: foreach_tensor_addcdiv_scalar_cuda + +- func: _foreach_addcdiv.ScalarList(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcdiv_scalarlist_slow + CUDA: foreach_tensor_addcdiv_scalarlist_cuda + +- func: _foreach_addcdiv.Tensor(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Tensor scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcdiv_tensor_slow + CUDA: foreach_tensor_addcdiv_tensor_cuda + +- func: _foreach_addcdiv_.Scalar(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar value=1) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcdiv_scalar_slow_ + CUDA: foreach_tensor_addcdiv_scalar_cuda_ + autogen: _foreach_addcdiv.Scalar_out + +- func: _foreach_addcdiv_.ScalarList(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcdiv_scalarlist_slow_ + CUDA: foreach_tensor_addcdiv_scalarlist_cuda_ + autogen: _foreach_addcdiv.ScalarList_out + +- func: _foreach_addcdiv_.Tensor(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Tensor scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcdiv_tensor_slow_ + CUDA: foreach_tensor_addcdiv_tensor_cuda_ + autogen: _foreach_addcdiv.Tensor_out + +- func: _foreach_addcmul.Scalar(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar value=1) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcmul_scalar_slow + CUDA: foreach_tensor_addcmul_scalar_cuda + +- func: _foreach_addcmul.ScalarList(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar[] scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcmul_scalarlist_slow + CUDA: foreach_tensor_addcmul_scalarlist_cuda + +- func: _foreach_addcmul.Tensor(Tensor[] self, Tensor[] tensor1, Tensor[] tensor2, Tensor scalars) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcmul_tensor_slow + CUDA: foreach_tensor_addcmul_tensor_cuda + +- func: _foreach_addcmul_.Scalar(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar value=1) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcmul_scalar_slow_ + CUDA: foreach_tensor_addcmul_scalar_cuda_ + autogen: _foreach_addcmul.Scalar_out + +- func: _foreach_addcmul_.ScalarList(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Scalar[] scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcmul_scalarlist_slow_ + CUDA: foreach_tensor_addcmul_scalarlist_cuda_ + autogen: _foreach_addcmul.ScalarList_out + +- func: _foreach_addcmul_.Tensor(Tensor(a!)[] self, Tensor[] tensor1, Tensor[] tensor2, Tensor scalars) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_addcmul_tensor_slow_ + CUDA: foreach_tensor_addcmul_tensor_cuda_ + autogen: _foreach_addcmul.Tensor_out + +- func: _foreach_abs(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_abs_slow + CUDA: foreach_tensor_abs_cuda + +- func: _foreach_abs_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_abs_slow_ + CUDA: foreach_tensor_abs_cuda_ + autogen: _foreach_abs.out + +- func: _foreach_acos(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_acos_slow + CUDA: foreach_tensor_acos_cuda + +- func: _foreach_acos_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_acos_slow_ + CUDA: foreach_tensor_acos_cuda_ + autogen: _foreach_acos.out + +- func: _foreach_asin(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_asin_slow + CUDA: foreach_tensor_asin_cuda + +- func: _foreach_asin_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_asin_slow_ + CUDA: foreach_tensor_asin_cuda_ + autogen: _foreach_asin.out + +- func: _foreach_atan(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_atan_slow + CUDA: foreach_tensor_atan_cuda + +- func: _foreach_atan_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_atan_slow_ + CUDA: foreach_tensor_atan_cuda_ + autogen: _foreach_atan.out + +- func: _foreach_ceil(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_ceil_slow + CUDA: foreach_tensor_ceil_cuda + +- func: _foreach_ceil_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_ceil_slow_ + CUDA: foreach_tensor_ceil_cuda_ + autogen: _foreach_ceil.out + +- func: _foreach_cos(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_cos_slow + CUDA: foreach_tensor_cos_cuda + +- func: _foreach_cos_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_cos_slow_ + CUDA: foreach_tensor_cos_cuda_ + autogen: _foreach_cos.out + +- func: _foreach_cosh(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_cosh_slow + CUDA: foreach_tensor_cosh_cuda + +- func: _foreach_cosh_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_cosh_slow_ + CUDA: foreach_tensor_cosh_cuda_ + autogen: _foreach_cosh.out + +- func: _foreach_erf(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_erf_slow + CUDA: foreach_tensor_erf_cuda + +- func: _foreach_erf_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_erf_slow_ + CUDA: foreach_tensor_erf_cuda_ + autogen: _foreach_erf.out + +- func: _foreach_erfc(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_erfc_slow + CUDA: foreach_tensor_erfc_cuda + +- func: _foreach_erfc_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_erfc_slow_ + CUDA: foreach_tensor_erfc_cuda_ + autogen: _foreach_erfc.out + +- func: _foreach_exp(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_exp_slow + CUDA: foreach_tensor_exp_cuda + +- func: _foreach_exp_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_exp_slow_ + CUDA: foreach_tensor_exp_cuda_ + autogen: _foreach_exp.out + +- func: _foreach_expm1(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_expm1_slow + CUDA: foreach_tensor_expm1_cuda + +- func: _foreach_expm1_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_expm1_slow_ + CUDA: foreach_tensor_expm1_cuda_ + autogen: _foreach_expm1.out + +- func: _foreach_floor(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_floor_slow + CUDA: foreach_tensor_floor_cuda + +- func: _foreach_floor_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_floor_slow_ + CUDA: foreach_tensor_floor_cuda_ + autogen: _foreach_floor.out + +- func: _foreach_frac(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_frac_slow + CUDA: foreach_tensor_frac_cuda + +- func: _foreach_frac_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_frac_slow_ + CUDA: foreach_tensor_frac_cuda_ + autogen: _foreach_frac.out + +- func: _foreach_lerp.List(Tensor[] self, Tensor[] tensors1, Tensor[] weights) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensors are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_ternary_lerp_slow + CUDA: foreach_tensor_lerp_ternary_cuda + autogen: _foreach_lerp.List_out + +- func: _foreach_lerp_.List(Tensor(a!)[] self, Tensor[] tensors1, Tensor[] weights) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensors are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_ternary_lerp_slow_ + CUDA: foreach_tensor_lerp_ternary_cuda_ + autogen: _foreach_lerp.List_out + +- func: _foreach_lerp.Scalar(Tensor[] self, Tensor[] tensors1, Scalar weight) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensors are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_lerp_list_kernel_slow + CUDA: foreach_tensor_lerp_list_cuda + autogen: _foreach_lerp.Scalar_out + +- func: _foreach_lerp_.Scalar(Tensor(a!)[] self, Tensor[] tensors1, Scalar weight) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensors are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_lerp_list_kernel_slow_ + CUDA: foreach_tensor_lerp_list_cuda_ + autogen: _foreach_lerp.Scalar_out + +- func: _foreach_lerp.ScalarList(Tensor[] self, Tensor[] tensors1, Scalar[] weight) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensors are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_lerp_scalarlist_kernel_slow + CUDA: foreach_tensor_lerp_scalarlist_cuda + autogen: _foreach_lerp.ScalarList_out + +- func: _foreach_lerp_.ScalarList(Tensor(a!)[] self, Tensor[] tensors1, Scalar[] weight) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensors are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_lerp_scalarlist_kernel_slow_ + CUDA: foreach_tensor_lerp_scalarlist_cuda_ + autogen: _foreach_lerp.ScalarList_out + +- func: _foreach_lgamma(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_lgamma_slow + CUDA: foreach_tensor_lgamma_cuda + +- func: _foreach_lgamma_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_lgamma_slow_ + CUDA: foreach_tensor_lgamma_cuda_ + autogen: _foreach_lgamma.out + +- func: _foreach_log(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log_slow + CUDA: foreach_tensor_log_cuda + +- func: _foreach_log_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log_slow_ + CUDA: foreach_tensor_log_cuda_ + autogen: _foreach_log.out + +- func: _foreach_log10(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log10_slow + CUDA: foreach_tensor_log10_cuda + +- func: _foreach_log10_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log10_slow_ + CUDA: foreach_tensor_log10_cuda_ + autogen: _foreach_log10.out + +- func: _foreach_log1p(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log1p_slow + CUDA: foreach_tensor_log1p_cuda + +- func: _foreach_log1p_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log1p_slow_ + CUDA: foreach_tensor_log1p_cuda_ + autogen: _foreach_log1p.out + +- func: _foreach_log2(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log2_slow + CUDA: foreach_tensor_log2_cuda + +- func: _foreach_log2_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_log2_slow_ + CUDA: foreach_tensor_log2_cuda_ + autogen: _foreach_log2.out + +- func: _foreach_max(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_max_slow + CUDA: foreach_tensor_max_cuda + autogen: _foreach_max.out + +- func: _foreach_neg(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_neg_slow + CUDA: foreach_tensor_neg_cuda + +- func: _foreach_neg_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_neg_slow_ + CUDA: foreach_tensor_neg_cuda_ + autogen: _foreach_neg.out + +- func: _foreach_norm.Scalar(Tensor[] self, Scalar ord=2, ScalarType? dtype=None) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_norm_slow + CUDA: foreach_tensor_norm_cuda + autogen: _foreach_norm.Scalar_out + +- func: _foreach_pow.List(Tensor[] self, Tensor[] exponent) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_pow_list_kernel_slow + CUDA: foreach_tensor_pow_list_kernel_cuda + +- func: _foreach_pow.Scalar(Tensor[] self, Scalar exponent) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_pow_scalar_kernel_slow + CUDA: foreach_tensor_pow_scalar_kernel_cuda + +- func: _foreach_pow.ScalarList(Tensor[] self, Scalar[] exponent) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_pow_scalarlist_kernel_slow + CUDA: foreach_tensor_pow_scalarlist_kernel_cuda + +- func: _foreach_pow.ScalarAndTensor(Scalar self, Tensor[] exponent) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_scalar_pow_list_kernel_slow + CUDA: foreach_scalar_pow_list_kernel_cuda + +- func: _foreach_pow_.List(Tensor(a!)[] self, Tensor[] exponent) -> () + device_check: NoCheck + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_pow_list_kernel_slow_ + CUDA: foreach_tensor_pow_list_kernel_cuda_ + autogen: _foreach_pow.List_out + +- func: _foreach_pow_.Scalar(Tensor(a!)[] self, Scalar exponent) -> () + device_check: NoCheck + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_pow_scalar_kernel_slow_ + CUDA: foreach_tensor_pow_scalar_kernel_cuda_ + autogen: _foreach_pow.Scalar_out + +- func: _foreach_pow_.ScalarList(Tensor(a!)[] self, Scalar[] exponent) -> () + device_check: NoCheck + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_pow_scalarlist_kernel_slow_ + CUDA: foreach_tensor_pow_scalarlist_kernel_cuda_ + autogen: _foreach_pow.ScalarList_out + +- func: _foreach_reciprocal(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_reciprocal_slow + CUDA: foreach_tensor_reciprocal_cuda + +- func: _foreach_reciprocal_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_reciprocal_slow_ + CUDA: foreach_tensor_reciprocal_cuda_ + autogen: _foreach_reciprocal.out + +- func: _foreach_round(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_round_slow + CUDA: foreach_tensor_round_cuda + +- func: _foreach_round_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_round_slow_ + CUDA: foreach_tensor_round_cuda_ + autogen: _foreach_round.out + +- func: _foreach_rsqrt(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_rsqrt_slow + CUDA: foreach_tensor_rsqrt_cuda + +- func: _foreach_rsqrt_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_rsqrt_slow_ + CUDA: foreach_tensor_rsqrt_cuda_ + autogen: _foreach_rsqrt.out + +- func: _foreach_sigmoid(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sigmoid_slow + CUDA: foreach_tensor_sigmoid_cuda + +- func: _foreach_sigmoid_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sigmoid_slow_ + CUDA: foreach_tensor_sigmoid_cuda_ + autogen: _foreach_sigmoid.out + +- func: _foreach_sign(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sign_slow + CUDA: foreach_tensor_sign_cuda + +- func: _foreach_sign_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sign_slow_ + CUDA: foreach_tensor_sign_cuda_ + autogen: _foreach_sign.out + +- func: _foreach_sin(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sin_slow + CUDA: foreach_tensor_sin_cuda + +- func: _foreach_sin_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sin_slow_ + CUDA: foreach_tensor_sin_cuda_ + autogen: _foreach_sin.out + +- func: _foreach_sinh(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sinh_slow + CUDA: foreach_tensor_sinh_cuda + +- func: _foreach_sinh_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sinh_slow_ + CUDA: foreach_tensor_sinh_cuda_ + autogen: _foreach_sinh.out + +- func: _foreach_sqrt(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sqrt_slow + CUDA: foreach_tensor_sqrt_cuda + +- func: _foreach_sqrt_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_sqrt_slow_ + CUDA: foreach_tensor_sqrt_cuda_ + autogen: _foreach_sqrt.out + +- func: _foreach_tan(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_tan_slow + CUDA: foreach_tensor_tan_cuda + +- func: _foreach_tan_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_tan_slow_ + CUDA: foreach_tensor_tan_cuda_ + autogen: _foreach_tan.out + +- func: _foreach_tanh(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_tanh_slow + CUDA: foreach_tensor_tanh_cuda + +- func: _foreach_tanh_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_tanh_slow_ + CUDA: foreach_tensor_tanh_cuda_ + autogen: _foreach_tanh.out + +- func: _foreach_trunc(Tensor[] self) -> Tensor[] + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_trunc_slow + CUDA: foreach_tensor_trunc_cuda + +- func: _foreach_trunc_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_trunc_slow_ + CUDA: foreach_tensor_trunc_cuda_ + autogen: _foreach_trunc.out + +- func: _foreach_zero_(Tensor(a!)[] self) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_zero_slow_ + CUDA: foreach_tensor_zero_cuda_ + autogen: _foreach_zero, _foreach_zero.out + +- func: _foreach_copy_(Tensor(a!)[] self, Tensor[] src, bool non_blocking=False) -> () + device_check: NoCheck # foreach kernels fall back to slow path when tensor are on different devices + variants: function + dispatch: + CompositeExplicitAutograd: foreach_tensor_copy_list_kernel_slow_ + CUDA: foreach_tensor_copy_list_kernel_cuda_ + autogen: _foreach_copy.out + +- func: _foreach_copy(Tensor[] self, Tensor[] src, bool non_blocking=False) -> Tensor[] self_out + device_check: NoCheck + variants: function + dispatch: + CompositeExplicitAutograd: _foreach_copy + +- func: bucketize.Tensor(Tensor self, Tensor boundaries, *, bool out_int32=False, bool right=False) -> Tensor + dispatch: + CPU: bucketize_cpu + CUDA: bucketize_cuda + MPS: bucketize_mps + +- func: bucketize.Tensor_out(Tensor self, Tensor boundaries, *, bool out_int32=False, bool right=False, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: bucketize_out_cpu + CUDA: bucketize_out_cuda + MPS: bucketize_out_mps + +- func: bucketize.Scalar(Scalar self, Tensor boundaries, *, bool out_int32=False, bool right=False) -> Tensor + dispatch: + CPU: bucketize_cpu + CUDA: bucketize_cuda + MPS: bucketize_mps + autogen: bucketize.Scalar_out + +- func: searchsorted.Tensor(Tensor sorted_sequence, Tensor self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None) -> Tensor + dispatch: + CPU: searchsorted_cpu + CUDA: searchsorted_cuda + MPS: searchsorted_mps + +- func: searchsorted.Tensor_out(Tensor sorted_sequence, Tensor self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: searchsorted_out_cpu + CUDA: searchsorted_out_cuda + MPS: searchsorted_out_mps + +- func: searchsorted.Scalar(Tensor sorted_sequence, Scalar self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None) -> Tensor + dispatch: + CPU: searchsorted_cpu + CUDA: searchsorted_cuda + MPS: searchsorted_mps + +- func: searchsorted.Scalar_out(Tensor sorted_sequence, Scalar self, *, bool out_int32=False, bool right=False, str? side=None, Tensor? sorter=None, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU: searchsorted_out_cpu + CUDA: searchsorted_out_cuda + MPS: searchsorted_out_mps + +- func: _convert_indices_from_coo_to_csr(Tensor self, int size, *, bool out_int32=False) -> Tensor + structured_delegate: _convert_indices_from_coo_to_csr.out + +- func: _convert_indices_from_coo_to_csr.out(Tensor self, int size, *, bool out_int32=False, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: _convert_indices_from_coo_to_csr_structured_cpu + CUDA: _convert_indices_from_coo_to_csr_structured_cuda + +- func: _convert_indices_from_csr_to_coo(Tensor crow_indices, Tensor col_indices, *, bool out_int32=False, bool transpose=False) -> Tensor + structured_delegate: _convert_indices_from_csr_to_coo.out + +- func: _convert_indices_from_csr_to_coo.out(Tensor crow_indices, Tensor col_indices, *, bool out_int32=False, bool transpose=False, Tensor(a!) out) -> Tensor(a!) + structured: True + dispatch: + CPU: _convert_indices_from_csr_to_coo_structured_cpu + CUDA: _convert_indices_from_csr_to_coo_structured_cuda + +## NN wrappers + +- func: mse_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: mse_loss_out + MPS: mse_loss_out_mps + +- func: mse_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: mse_loss.out + python_module: nn + +- func: mse_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, int reduction, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU, CUDA: mse_loss_backward_out + MPS: mse_loss_backward_out_mps + +- func: mse_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor + python_module: nn + dispatch: + CPU, CUDA: mse_loss_backward + MPS: mse_loss_backward_mps + +- func: l1_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor + python_module: nn + +- func: multi_margin_loss.out(Tensor self, Tensor target, Scalar p=1, Scalar margin=1, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: multi_margin_loss_cpu_out + CUDA: multi_margin_loss_cuda_out + +- func: multi_margin_loss(Tensor self, Tensor target, Scalar p=1, Scalar margin=1, Tensor? weight=None, int reduction=Mean) -> Tensor + python_module: nn + dispatch: + CPU: multi_margin_loss_cpu + CUDA: multi_margin_loss_cuda + +- func: multi_margin_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Scalar p, Scalar margin, Tensor? weight=None, int reduction=Mean, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: multi_margin_loss_cpu_backward_out + CUDA: multi_margin_loss_cuda_backward_out + +- func: multi_margin_loss_backward(Tensor grad_output, Tensor self, Tensor target, Scalar p, Scalar margin, Tensor? weight=None, int reduction=Mean) -> Tensor + python_module: nn + dispatch: + CPU: multi_margin_loss_cpu_backward + CUDA: multi_margin_loss_cuda_backward + +- func: multilabel_margin_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + +- func: multilabel_margin_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor + python_module: nn + +- func: multilabel_margin_loss_forward.output(Tensor self, Tensor target, int reduction, *, Tensor(a!) output, Tensor(b!) is_target) -> (Tensor(a!), Tensor(b!)) + python_module: nn + dispatch: + CPU: multilabel_margin_loss_forward_out_cpu + CUDA: multilabel_margin_loss_forward_out_cuda + +- func: multilabel_margin_loss_forward(Tensor self, Tensor target, int reduction) -> (Tensor output, Tensor is_target) + python_module: nn + dispatch: + CPU: multilabel_margin_loss_forward_cpu + CUDA: multilabel_margin_loss_forward_cuda + +- func: multilabel_margin_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, int reduction, Tensor is_target, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: multilabel_margin_loss_backward_cpu_out + CUDA: multilabel_margin_loss_backward_cuda_out + +- func: multilabel_margin_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction, Tensor is_target) -> Tensor + python_module: nn + dispatch: + CPU: multilabel_margin_loss_backward_cpu + CUDA: multilabel_margin_loss_backward_cuda + +- func: nll_loss.out(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + +- func: nll_loss_nd(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: nll_loss_nd_symint + +- func: nll_loss(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: nll_loss_symint + +- func: nll_loss_forward.output(Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, *, Tensor(a!) output, Tensor(b!) total_weight) -> (Tensor(a!), Tensor(b!)) + python_module: nn + structured: True + dispatch: + CPU: nll_loss_forward_out_cpu + CUDA: nll_loss_forward_out_cuda + MPS: nll_loss_forward_out_mps + +- func: nll_loss_forward(Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index) -> (Tensor output, Tensor total_weight) + python_module: nn + structured_delegate: nll_loss_forward.output + +- func: nll_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, Tensor total_weight, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: nll_loss_backward_out_cpu + CUDA: nll_loss_backward_out_cuda + MPS: nll_loss_backward_out_mps + +- func: nll_loss_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, Tensor total_weight) -> Tensor + python_module: nn + structured_delegate: nll_loss_backward.grad_input + +- func: nll_loss2d.out(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + +- func: nll_loss2d(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean, SymInt ignore_index=-100) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: nll_loss2d_symint + +- func: nll_loss2d_forward.output(Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, *, Tensor(a!) output, Tensor(b!) total_weight) -> (Tensor(a!), Tensor(b!)) + python_module: nn + dispatch: + CPU: nll_loss2d_forward_out_cpu + CUDA: nll_loss2d_forward_out_cuda + MPS: nll_loss2d_forward_out_mps + +- func: nll_loss2d_forward(Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index) -> (Tensor output, Tensor total_weight) + python_module: nn + dispatch: + CPU: nll_loss2d_forward_cpu + CUDA: nll_loss2d_forward_cuda + MPS: nll_loss2d_forward_mps + +- func: nll_loss2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, Tensor total_weight, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: nll_loss2d_backward_out_cpu + CUDA: nll_loss2d_backward_out_cuda + MPS: nll_loss2d_backward_out_mps + +- func: nll_loss2d_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, Tensor total_weight) -> Tensor + python_module: nn + dispatch: + CPU: nll_loss2d_backward_cpu + CUDA: nll_loss2d_backward_cuda + MPS: nll_loss2d_backward_mps + +- func: smooth_l1_loss.out(Tensor self, Tensor target, int reduction=Mean, float beta=1.0, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: smooth_l1_loss_out + MPS: smooth_l1_loss_out_mps + +- func: smooth_l1_loss(Tensor self, Tensor target, int reduction=Mean, float beta=1.0) -> Tensor + device_check: NoCheck # TensorIterator + structured_delegate: smooth_l1_loss.out + python_module: nn + +- func: smooth_l1_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, int reduction, float beta, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: smooth_l1_loss_backward_out + CUDA: smooth_l1_loss_backward_out + MPS: smooth_l1_loss_backward_out_mps + +- func: smooth_l1_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction, float beta) -> Tensor + python_module: nn + dispatch: + CompositeExplicitAutograd: smooth_l1_loss_backward + +- func: huber_loss.out(Tensor self, Tensor target, int reduction=Mean, float delta=1.0, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU, CUDA: huber_loss_out + MPS: huber_loss_out_mps + +- func: huber_loss(Tensor self, Tensor target, int reduction=Mean, float delta=1.0) -> Tensor + python_module: nn + dispatch: + CPU, CUDA: huber_loss + MPS: huber_loss_mps + +- func: huber_loss_backward.out(Tensor grad_output, Tensor self, Tensor target, int reduction, float delta, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU, CUDA: huber_loss_backward_out + MPS: huber_loss_backward_out_mps + +- func: huber_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction, float delta) -> Tensor + python_module: nn + dispatch: + CompositeExplicitAutograd: huber_loss_backward + +- func: soft_margin_loss.out(Tensor self, Tensor target, int reduction=Mean, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CompositeExplicitAutograd: soft_margin_loss_out + +- func: soft_margin_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor + python_module: nn + dispatch: + CompositeExplicitAutograd: soft_margin_loss + +- func: soft_margin_loss_backward.grad_input(Tensor grad_output, Tensor self, Tensor target, int reduction, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CompositeExplicitAutograd: soft_margin_loss_backward_out + +- func: soft_margin_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor + python_module: nn + dispatch: + CompositeExplicitAutograd: soft_margin_loss_backward + +- func: elu.out(Tensor self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: elu_out + MPS: elu_out_mps + +- func: elu(Tensor self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1) -> Tensor + structured_delegate: elu.out + device_check: NoCheck # TensorIterator + python_module: nn + tags: pointwise + +- func: elu_backward.grad_input(Tensor grad_output, Scalar alpha, Scalar scale, Scalar input_scale, bool is_result, Tensor self_or_result, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: elu_backward_out + MPS: elu_backward_out_mps + +- func: elu_backward(Tensor grad_output, Scalar alpha, Scalar scale, Scalar input_scale, bool is_result, Tensor self_or_result) -> Tensor + structured_delegate: elu_backward.grad_input + python_module: nn + +- func: elu_(Tensor(a!) self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1) -> Tensor(a!) + structured_delegate: elu.out + device_check: NoCheck # TensorIterator + python_module: nn + +- func: glu.out(Tensor self, int dim=-1, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: glu_out + MPS: glu_out_mps + +- func: glu(Tensor self, int dim=-1) -> Tensor + structured_delegate: glu.out + device_check: NoCheck # TensorIterator + python_module: nn + +- func: glu_backward.grad_input(Tensor grad_output, Tensor self, int dim, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: glu_backward_cpu_out + CUDA: glu_backward_cuda_out + MPS: glu_backward_mps_out + +- func: glu_backward(Tensor grad_output, Tensor self, int dim) -> Tensor + python_module: nn + dispatch: + CPU: glu_backward_cpu + CUDA: glu_backward_cuda + MPS: glu_backward_mps + +- func: glu_jvp(Tensor glu, Tensor x, Tensor dx, int dim) -> Tensor + python_module: nn + dispatch: + CPU, CUDA: glu_jvp + autogen: glu_jvp.out + +- func: glu_backward_jvp(Tensor grad_x, Tensor grad_glu, Tensor x, Tensor dgrad_glu, Tensor dx, int dim) -> Tensor + python_module: nn + dispatch: + CPU, CUDA: glu_backward_jvp + autogen: glu_backward_jvp.out + +- func: hardsigmoid.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: hardsigmoid_out + MPS: hardsigmoid_out_mps + QuantizedCPU: hardsigmoid_out_quantized_cpu + +- func: hardsigmoid(Tensor self) -> Tensor + structured_delegate: hardsigmoid.out + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + QuantizedCPU: hardsigmoid_quantized_cpu + tags: pointwise + +- func: hardsigmoid_(Tensor(a!) self) -> Tensor(a!) + structured_delegate: hardsigmoid.out + device_check: NoCheck # TensorIterator + python_module: nn + +- func: hardsigmoid_backward.grad_input(Tensor grad_output, Tensor self, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: hardsigmoid_backward_out + MPS: hardsigmoid_backward_out_mps + +- func: hardsigmoid_backward(Tensor grad_output, Tensor self) -> Tensor + structured_delegate: hardsigmoid_backward.grad_input + python_module: nn + +- func: hardtanh.out(Tensor self, Scalar min_val=-1, Scalar max_val=1, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA, MPS: hardtanh_out + QuantizedCPU: hardtanh_out_quantized_cpu + +- func: hardtanh(Tensor self, Scalar min_val=-1, Scalar max_val=1) -> Tensor + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA, MPS: hardtanh + QuantizedCPU: hardtanh_quantized_cpu + tags: [pointwise, core] + +- func: hardtanh_backward.grad_input(Tensor grad_output, Tensor self, Scalar min_val, Scalar max_val, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU, CUDA: hardtanh_backward_out + MPS: hardtanh_backward_out_mps + +- func: hardtanh_backward(Tensor grad_output, Tensor self, Scalar min_val, Scalar max_val) -> Tensor + python_module: nn + dispatch: + CPU, CUDA: hardtanh_backward + MPS: hardtanh_backward_mps + +- func: hardtanh_(Tensor(a!) self, Scalar min_val=-1, Scalar max_val=1) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA, MPS: hardtanh_ + QuantizedCPU: hardtanh_quantized_cpu_ + +- func: hardswish.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: hardswish_out + MPS: hardswish_out_mps + +- func: hardswish(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: hardswish + MPS: hardswish_mps + +- func: hardswish_(Tensor(a!) self) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: hardswish_ + MPS: hardswish_mps_ + +- func: hardswish_backward(Tensor grad_output, Tensor self) -> Tensor + python_module: nn + dispatch: + CPU, CUDA: hardswish_backward + MPS: hardswish_backward_mps + autogen: hardswish_backward.out + +- func: leaky_relu.out(Tensor self, Scalar negative_slope=0.01, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: leaky_relu_out + MPS: leaky_relu_out_mps + QuantizedCPU: leaky_relu_out_quantized_cpu + +- func: leaky_relu(Tensor self, Scalar negative_slope=0.01) -> Tensor + structured_delegate: leaky_relu.out + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + QuantizedCPU: leaky_relu_quantized_cpu + tags: core + +- func: leaky_relu_backward.grad_input(Tensor grad_output, Tensor self, Scalar negative_slope, bool self_is_result, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: leaky_relu_backward_out + MPS: leaky_relu_backward_out_mps + +- func: leaky_relu_backward(Tensor grad_output, Tensor self, Scalar negative_slope, bool self_is_result) -> Tensor + structured_delegate: leaky_relu_backward.grad_input + python_module: nn + +- func: leaky_relu_(Tensor(a!) self, Scalar negative_slope=0.01) -> Tensor(a!) + structured_delegate: leaky_relu.out + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + QuantizedCPU: leaky_relu_quantized_cpu_ + +- func: log_sigmoid.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: nn + +- func: log_sigmoid(Tensor self) -> Tensor + device_check: NoCheck # TensorIterator + python_module: nn + +- func: log_sigmoid_forward.output(Tensor self, *, Tensor(a!) output, Tensor(b!) buffer) -> (Tensor(a!), Tensor(b!)) + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU: log_sigmoid_forward_out_cpu + CUDA: log_sigmoid_forward_out_cuda + MPS: log_sigmoid_forward_out_mps + +- func: log_sigmoid_forward(Tensor self) -> (Tensor output, Tensor buffer) + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU: log_sigmoid_forward_cpu + CUDA: log_sigmoid_forward_cuda + MPS: log_sigmoid_forward_mps + +- func: log_sigmoid_backward.grad_input(Tensor grad_output, Tensor self, Tensor buffer, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: log_sigmoid_backward_cpu_out + CUDA: log_sigmoid_backward_cuda_out + MPS: log_sigmoid_backward_mps_out + +- func: log_sigmoid_backward(Tensor grad_output, Tensor self, Tensor buffer) -> Tensor + python_module: nn + dispatch: + CPU: log_sigmoid_backward_cpu + CUDA: log_sigmoid_backward_cuda + MPS: log_sigmoid_backward_mps + +- func: rrelu_with_noise.out(Tensor self, Tensor(b!) noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + tags: nondeterministic_seeded + dispatch: + CPU: rrelu_with_noise_out_cpu + CUDA: rrelu_with_noise_out_cuda + +- func: rrelu_with_noise(Tensor self, Tensor(b!) noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor + python_module: nn + dispatch: + CPU: rrelu_with_noise_cpu + CUDA: rrelu_with_noise_cuda + tags: nondeterministic_seeded + autogen: rrelu_with_noise_functional + +- func: rrelu_with_noise_backward(Tensor grad_output, Tensor self, Tensor noise, Scalar lower, Scalar upper, bool training, bool self_is_result) -> Tensor + python_module: nn + dispatch: + CompositeExplicitAutograd: rrelu_with_noise_backward + autogen: rrelu_with_noise_backward.out + +- func: rrelu_with_noise_(Tensor(a!) self, Tensor(b!) noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor(a!) + python_module: nn + tags: nondeterministic_seeded + dispatch: + CPU: rrelu_with_noise_cpu_ + CUDA: rrelu_with_noise_cuda_ + +- func: softplus.out(Tensor self, Scalar beta=1, Scalar threshold=20, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: softplus_out + MPS: softplus_out_mps + +- func: softplus(Tensor self, Scalar beta=1, Scalar threshold=20) -> Tensor + structured_delegate: softplus.out + device_check: NoCheck # TensorIterator + python_module: nn + tags: pointwise + +- func: softplus_backward.grad_input(Tensor grad_output, Tensor self, Scalar beta, Scalar threshold, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: softplus_backward_out + MPS: softplus_backward_out_mps + +- func: softplus_backward(Tensor grad_output, Tensor self, Scalar beta, Scalar threshold) -> Tensor + structured_delegate: softplus_backward.grad_input + python_module: nn + +- func: softshrink.out(Tensor self, Scalar lambd=0.5, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + device_check: NoCheck # TensorIterator + python_module: nn + dispatch: + CPU, CUDA: softshrink_out + MPS: softshrink_out_mps + +- func: softshrink(Tensor self, Scalar lambd=0.5) -> Tensor + structured_delegate: softshrink.out + device_check: NoCheck # TensorIterator + python_module: nn + tags: pointwise + +- func: softshrink_backward.grad_input(Tensor grad_output, Tensor self, Scalar lambd, *, Tensor(a!) grad_input) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: nn + dispatch: + CPU, CUDA: softshrink_backward_out + MPS: softshrink_backward_out_mps + +- func: softshrink_backward(Tensor grad_output, Tensor self, Scalar lambd) -> Tensor + structured_delegate: softshrink_backward.grad_input + python_module: nn + +- func: adaptive_avg_pool2d.out(Tensor self, SymInt[2] output_size, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: adaptive_avg_pool2d_out_cpu + CUDA: adaptive_avg_pool2d_out_cuda + MPS: adaptive_avg_pool2d_out_mps + MkldnnCPU: mkldnn_adaptive_avg_pool2d_out_stub + +- func: adaptive_avg_pool2d(Tensor self, SymInt[2] output_size) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: adaptive_avg_pool2d_symint + +- func: mkldnn_adaptive_avg_pool2d(Tensor self, int[2] output_size) -> Tensor + dispatch: + MkldnnCPU: mkldnn_adaptive_avg_pool2d + +- func: mkldnn_adaptive_avg_pool2d.out(Tensor self, int[2] output_size, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + MkldnnCPU: mkldnn_adaptive_avg_pool2d_out + +- func: mkldnn_adaptive_avg_pool2d_backward(Tensor grad_output, Tensor self) -> Tensor + dispatch: + MkldnnCPU: mkldnn_adaptive_avg_pool2d_backward + autogen: mkldnn_adaptive_avg_pool2d_backward.out + +- func: _adaptive_avg_pool2d(Tensor self, SymInt[2] output_size) -> Tensor + dispatch: + CPU: adaptive_avg_pool2d_cpu + CUDA: adaptive_avg_pool2d_cuda + MPS: adaptive_avg_pool2d_mps + QuantizedCPU: adaptive_avg_pool2d_quantized_cpu + QuantizedCUDA: adaptive_avg_pool2d_quantized_cuda + autogen: _adaptive_avg_pool2d.out + tags: core + +- func: _adaptive_avg_pool2d_backward(Tensor grad_output, Tensor self) -> Tensor + python_module: nn + dispatch: + CPU: adaptive_avg_pool2d_backward_cpu + CUDA: adaptive_avg_pool2d_backward_cuda + MPS: adaptive_avg_pool2d_backward_mps + autogen: _adaptive_avg_pool2d_backward.out + tags: core + +- func: adaptive_avg_pool3d.out(Tensor self, SymInt[3] output_size, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: adaptive_avg_pool3d_out_cpu + CUDA: adaptive_avg_pool3d_out_cuda + QuantizedCPU: adaptive_avg_pool3d_out_quantized_cpu + +- func: adaptive_avg_pool3d(Tensor self, SymInt[3] output_size) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: adaptive_avg_pool3d_symint + +- func: _adaptive_avg_pool3d(Tensor self, SymInt[3] output_size) -> Tensor + dispatch: + CPU: adaptive_avg_pool3d_cpu + CUDA: adaptive_avg_pool3d_cuda + QuantizedCPU: adaptive_avg_pool3d_quantized_cpu + autogen: _adaptive_avg_pool3d.out + tags: core + +- func: adaptive_avg_pool3d_backward.grad_input(Tensor grad_output, Tensor self, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: adaptive_avg_pool3d_backward_out_cpu + CUDA: adaptive_avg_pool3d_backward_out_cuda + +- func: _adaptive_avg_pool3d_backward(Tensor grad_output, Tensor self) -> Tensor + python_module: nn + dispatch: + CPU: adaptive_avg_pool3d_backward_cpu + CUDA: adaptive_avg_pool3d_backward_cuda + autogen: _adaptive_avg_pool3d_backward.out + +# Return: (Tensor output, Tensor indices) +- func: adaptive_max_pool2d.out(Tensor self, int[2] output_size, *, Tensor(a!) out, Tensor(b!) indices) -> (Tensor(a!), Tensor(b!)) + python_module: nn + structured: True + dispatch: + CPU: adaptive_max_pool2d_out_cpu + CUDA: adaptive_max_pool2d_out_cuda + MPS: adaptive_max_pool2d_out_mps + +# Return: (Tensor output, Tensor indices) +- func: adaptive_max_pool2d(Tensor self, int[2] output_size) -> (Tensor, Tensor) + python_module: nn + structured_delegate: adaptive_max_pool2d.out + +- func: adaptive_max_pool2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: adaptive_max_pool2d_backward_out_cpu + CUDA: adaptive_max_pool2d_backward_out_cuda + MPS: adaptive_max_pool2d_backward_out_mps + +- func: adaptive_max_pool2d_backward(Tensor grad_output, Tensor self, Tensor indices) -> Tensor + python_module: nn + structured_delegate: adaptive_max_pool2d_backward.grad_input + +# Return: (Tensor output, Tensor indices) +- func: adaptive_max_pool3d.out(Tensor self, int[3] output_size, *, Tensor(a!) out, Tensor(b!) indices) -> (Tensor(a!), Tensor(b!)) + python_module: nn + structured: True + dispatch: + CPU: adaptive_max_pool3d_out_cpu + CUDA: adaptive_max_pool3d_out_cuda + +# Return: (Tensor output, Tensor indices) +- func: adaptive_max_pool3d(Tensor self, int[3] output_size) -> (Tensor, Tensor) + python_module: nn + structured_delegate: adaptive_max_pool3d.out + +- func: adaptive_max_pool3d_backward.grad_input(Tensor grad_output, Tensor self, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: adaptive_max_pool3d_backward_out_cpu + CUDA: adaptive_max_pool3d_backward_out_cuda + +- func: adaptive_max_pool3d_backward(Tensor grad_output, Tensor self, Tensor indices) -> Tensor + python_module: nn + structured_delegate: adaptive_max_pool3d_backward.grad_input + +- func: avg_pool2d.out(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + precomputed: + - kernel_size -> int kH, int kW + - stride -> int dH, int dW + - padding -> int padH, int padW + dispatch: + CPU: avg_pool2d_out_cpu + CUDA: avg_pool2d_out_cuda + MPS: avg_pool2d_out_mps + MkldnnCPU: mkldnn_avg_pool2d_out + +- func: avg_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None) -> Tensor + python_module: nn + structured_delegate: avg_pool2d.out + dispatch: + MkldnnCPU: mkldnn_avg_pool2d + QuantizedCPU: avg_pool2d_quantized_cpu + tags: core + +- func: avg_pool2d_backward.grad_input(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: avg_pool2d_backward_out_cpu + CUDA: avg_pool2d_backward_out_cuda + MPS: avg_pool2d_backward_out_mps + MkldnnCPU: mkldnn_avg_pool2d_backward_out + +- func: avg_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override) -> Tensor + python_module: nn + structured_delegate: avg_pool2d_backward.grad_input + dispatch: + MkldnnCPU: mkldnn_avg_pool2d_backward + tags: core + +- func: avg_pool3d.out(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: avg_pool3d_out_cpu + CUDA: avg_pool3d_out_cuda + MkldnnCPU: mkldnn_avg_pool3d_out + +- func: avg_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None) -> Tensor + python_module: nn + structured_delegate: avg_pool3d.out + dispatch: + MkldnnCPU: mkldnn_avg_pool3d + QuantizedCPU: avg_pool3d_quantized_cpu + tags: core + +- func: avg_pool3d_backward.grad_input(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, bool ceil_mode, bool count_include_pad, int? divisor_override, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: avg_pool3d_backward_out_cpu + CUDA: avg_pool3d_backward_out_cuda + MkldnnCPU: mkldnn_avg_pool3d_backward_out + +- func: avg_pool3d_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, bool ceil_mode, bool count_include_pad, int? divisor_override) -> Tensor + python_module: nn + structured_delegate: avg_pool3d_backward.grad_input + dispatch: + MkldnnCPU: mkldnn_avg_pool3d_backward + +# Return: (Tensor output, Tensor indices) +- func: fractional_max_pool2d.output(Tensor self, int[2] kernel_size, int[2] output_size, Tensor random_samples, *, Tensor(a!) output, Tensor(b!) indices) -> (Tensor(a!), Tensor(b!)) + python_module: nn + structured: True + dispatch: + CPU: fractional_max_pool2d_out_cpu + CUDA: fractional_max_pool2d_out_cuda + +# Return: (Tensor output, Tensor indices) +- func: fractional_max_pool2d(Tensor self, int[2] kernel_size, int[2] output_size, Tensor random_samples) -> (Tensor, Tensor) + python_module: nn + structured_delegate: fractional_max_pool2d.output + +- func: fractional_max_pool2d_backward.grad_input(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] output_size, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: fractional_max_pool2d_backward_cpu + CUDA: fractional_max_pool2d_backward_cuda + +- func: fractional_max_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] output_size, Tensor indices) -> Tensor + python_module: nn + structured_delegate: fractional_max_pool2d_backward.grad_input + +# Return: (Tensor output, Tensor indices) +- func: fractional_max_pool3d.output(Tensor self, int[3] kernel_size, int[3] output_size, Tensor random_samples, *, Tensor(a!) output, Tensor(b!) indices) -> (Tensor(a!), Tensor(b!)) + python_module: nn + structured: True + precomputed: + - kernel_size -> int poolSizeT, int poolSizeH, int poolSizeW + - output_size -> int outputT, int outputH, int outputW + - int numBatch, int numPlanes, int inputT, int inputH, int inputW + dispatch: + CPU: fractional_max_pool3d_out_cpu + CUDA: fractional_max_pool3d_out_cuda + +# Return: (Tensor output, Tensor indices) +- func: fractional_max_pool3d(Tensor self, int[3] kernel_size, int[3] output_size, Tensor random_samples) -> (Tensor, Tensor) + python_module: nn + structured_delegate: fractional_max_pool3d.output + +- func: fractional_max_pool3d_backward.grad_input(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] output_size, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: fractional_max_pool3d_backward_out_cpu + CUDA: fractional_max_pool3d_backward_out_cuda + +- func: fractional_max_pool3d_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] output_size, Tensor indices) -> Tensor + python_module: nn + dispatch: + CPU: fractional_max_pool3d_backward_cpu + CUDA: fractional_max_pool3d_backward_cuda + +# Return: (Tensor output, Tensor indices) +- func: max_pool2d_with_indices.out(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False, *, Tensor(a!) out, Tensor(b!) indices) -> (Tensor(a!), Tensor(b!)) + python_module: nn + structured: True + dispatch: + CPU: max_pool2d_with_indices_out_cpu + CUDA: max_pool2d_with_indices_out_cuda + MPS: max_pool2d_with_indices_out_mps + +# Return: (Tensor output, Tensor indices) +- func: max_pool2d_with_indices(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor) + python_module: nn + structured_delegate: max_pool2d_with_indices.out + tags: core + +- func: max_pool2d_with_indices_backward.grad_input(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, bool ceil_mode, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: max_pool2d_with_indices_backward_out_cpu + CUDA: max_pool2d_with_indices_backward_out_cuda + MPS: max_pool2d_with_indices_backward_out_mps + +- func: max_pool2d_with_indices_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, bool ceil_mode, Tensor indices) -> Tensor + python_module: nn + structured_delegate: max_pool2d_with_indices_backward.grad_input + tags: core + +# Return: (Tensor output, Tensor indices) +- func: max_pool3d_with_indices.out(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False, *, Tensor(a!) out, Tensor(b!) indices) -> (Tensor(a!), Tensor(b!)) + python_module: nn + dispatch: + CPU: max_pool3d_with_indices_out_cpu + CUDA: max_pool3d_with_indices_out_cuda + +# Return: (Tensor output, Tensor indices) +- func: max_pool3d_with_indices(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor) + python_module: nn + dispatch: + CPU: max_pool3d_with_indices_cpu + CUDA: max_pool3d_with_indices_cuda + tags: core + +- func: max_pool3d_with_indices_backward.grad_input(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, int[3] dilation, bool ceil_mode, Tensor indices, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: max_pool3d_with_indices_backward_out_cpu + CUDA: max_pool3d_with_indices_backward_out_cuda + +- func: max_pool3d_with_indices_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, int[3] dilation, bool ceil_mode, Tensor indices) -> Tensor + python_module: nn + dispatch: + CPU: max_pool3d_with_indices_backward_cpu + CUDA: max_pool3d_with_indices_backward_cuda + +- func: max_unpool2d.out(Tensor self, Tensor indices, SymInt[2] output_size, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: max_unpooling2d_forward_out_cpu + CUDA: max_unpooling2d_forward_out_cuda + +- func: max_unpool2d(Tensor self, Tensor indices, SymInt[2] output_size) -> Tensor + python_module: nn + dispatch: + CPU: max_unpooling2d_forward_cpu + CUDA: max_unpooling2d_forward_cuda + +- func: max_unpool3d.out(Tensor self, Tensor indices, SymInt[3] output_size, int[3] stride, int[3] padding, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: max_unpooling3d_forward_out_cpu + CUDA: max_unpooling3d_forward_out_cuda + +- func: max_unpool3d(Tensor self, Tensor indices, SymInt[3] output_size, int[3] stride, int[3] padding) -> Tensor + python_module: nn + dispatch: + CPU: max_unpooling3d_forward_cpu + CUDA: max_unpooling3d_forward_cuda + +- func: reflection_pad1d.out(Tensor self, SymInt[2] padding, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: reflection_pad1d_out_cpu + QuantizedCPU: reflection_pad1d_out_quantized_cpu + CUDA: reflection_pad1d_out_cuda + MPS: reflection_pad1d_out_mps + +- func: reflection_pad1d(Tensor self, SymInt[2] padding) -> Tensor + python_module: nn + structured_delegate: reflection_pad1d.out + tags: core + +- func: reflection_pad1d_backward.grad_input(Tensor grad_output, Tensor self, SymInt[2] padding, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: reflection_pad1d_backward_out_cpu + CUDA: reflection_pad1d_backward_out_cuda + MPS: reflection_pad1d_backward_out_mps + +- func: reflection_pad1d_backward(Tensor grad_output, Tensor self, SymInt[2] padding) -> Tensor + python_module: nn + structured_delegate: reflection_pad1d_backward.grad_input + +- func: reflection_pad2d.out(Tensor self, SymInt[4] padding, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU, QuantizedCPU: reflection_pad2d_out_cpu + CUDA: reflection_pad2d_out_cuda + MPS: reflection_pad2d_out_mps + +- func: reflection_pad2d(Tensor self, SymInt[4] padding) -> Tensor + python_module: nn + dispatch: + CPU: reflection_pad2d_cpu + QuantizedCPU: reflection_pad2d_quantized_cpu + CUDA: reflection_pad2d_cuda + MPS: reflection_pad2d_mps + tags: core + +- func: reflection_pad2d_backward.grad_input(Tensor grad_output, Tensor self, SymInt[4] padding, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: reflection_pad2d_backward_out_cpu + CUDA: reflection_pad2d_backward_out_cuda + MPS: reflection_pad2d_backward_out_mps + +- func: reflection_pad2d_backward(Tensor grad_output, Tensor self, SymInt[4] padding) -> Tensor + python_module: nn + dispatch: + CPU: reflection_pad2d_backward_cpu + CUDA: reflection_pad2d_backward_cuda + MPS: reflection_pad2d_backward_mps + +- func: reflection_pad3d.out(Tensor self, SymInt[6] padding, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: reflection_pad3d_out_cpu + CUDA: reflection_pad3d_out_cuda + MPS: reflection_pad3d_out_mps + +- func: reflection_pad3d(Tensor self, SymInt[6] padding) -> Tensor + python_module: nn + structured_delegate: reflection_pad3d.out + tags: core + +- func: reflection_pad3d_backward.grad_input(Tensor grad_output, Tensor self, SymInt[6] padding, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: reflection_pad3d_backward_out_cpu + CUDA: reflection_pad3d_backward_out_cuda + MPS: reflection_pad3d_backward_out_mps + +- func: reflection_pad3d_backward(Tensor grad_output, Tensor self, SymInt[6] padding) -> Tensor + python_module: nn + structured_delegate: reflection_pad3d_backward.grad_input + +- func: replication_pad1d.out(Tensor self, SymInt[2] padding, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: replication_pad1d_out_cpu + CUDA: replication_pad1d_out_cuda + MPS: replication_pad1d_out_mps + +- func: replication_pad1d(Tensor self, SymInt[2] padding) -> Tensor + python_module: nn + structured_delegate: replication_pad1d.out + +- func: replication_pad1d_backward.grad_input(Tensor grad_output, Tensor self, SymInt[2] padding, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: replication_pad1d_backward_out_cpu + CUDA: replication_pad1d_backward_out_cuda + MPS: replication_pad1d_backward_out_mps + +- func: replication_pad1d_backward(Tensor grad_output, Tensor self, SymInt[2] padding) -> Tensor + python_module: nn + structured_delegate: replication_pad1d_backward.grad_input + +- func: replication_pad2d.out(Tensor self, SymInt[4] padding, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: replication_pad2d_out_cpu + CUDA: replication_pad2d_out_cuda + MPS: replication_pad2d_out_mps + +- func: replication_pad2d(Tensor self, SymInt[4] padding) -> Tensor + python_module: nn + structured_delegate: replication_pad2d.out + tags: core + +- func: replication_pad2d_backward.grad_input(Tensor grad_output, Tensor self, SymInt[4] padding, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: replication_pad2d_backward_out_cpu + CUDA: replication_pad2d_backward_out_cuda + MPS: replication_pad2d_backward_out_mps + +- func: replication_pad2d_backward(Tensor grad_output, Tensor self, SymInt[4] padding) -> Tensor + python_module: nn + dispatch: + CPU: replication_pad2d_backward_cpu + CUDA: replication_pad2d_backward_cuda + MPS: replication_pad2d_backward_mps + +- func: replication_pad3d.out(Tensor self, SymInt[6] padding, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: replication_pad3d_out_cpu + CUDA: replication_pad3d_out_cuda + MPS: replication_pad3d_out_mps + +- func: replication_pad3d(Tensor self, SymInt[6] padding) -> Tensor + python_module: nn + structured_delegate: replication_pad3d.out + tags: core + + +- func: replication_pad3d_backward.grad_input(Tensor grad_output, Tensor self, SymInt[6] padding, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + dispatch: + CPU: replication_pad3d_backward_out_cpu + CUDA: replication_pad3d_backward_out_cuda + MPS: replication_pad3d_backward_out_mps + +- func: replication_pad3d_backward(Tensor grad_output, Tensor self, SymInt[6] padding) -> Tensor + python_module: nn + dispatch: + CPU: replication_pad3d_backward_cpu + CUDA: replication_pad3d_backward_cuda + MPS: replication_pad3d_backward_mps + +- func: _pad_circular(Tensor self, SymInt[] pad) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: _pad_circular_symint + +- func: _pad_enum(Tensor self, SymInt[] pad, int mode, float? value=None) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: _pad_enum_symint + +- func: pad(Tensor self, SymInt[] pad, str mode="constant", float? value=None) -> Tensor + python_module: nn + dispatch: + CompositeImplicitAutograd: pad_symint + +- func: upsample_linear1d.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor + python_module: nn + autogen: upsample_linear1d.vec_out + +- func: upsample_bilinear2d.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor + python_module: nn + autogen: upsample_bilinear2d.vec_out + tags: core + +- func: _upsample_bilinear2d_aa.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor + python_module: nn + autogen: _upsample_bilinear2d_aa.vec_out + +- func: upsample_trilinear3d.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor + python_module: nn + autogen: upsample_trilinear3d.vec_out + +- func: upsample_bicubic2d.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor + python_module: nn + autogen: upsample_bicubic2d.vec_out + +- func: _upsample_bicubic2d_aa.vec(Tensor input, SymInt[]? output_size, bool align_corners, float[]? scale_factors) -> Tensor + python_module: nn + autogen: _upsample_bicubic2d_aa.vec_out + +- func: upsample_nearest1d.vec(Tensor input, SymInt[]? output_size, float[]? scale_factors) -> Tensor + python_module: nn + autogen: upsample_nearest1d.vec_out + +- func: _upsample_nearest_exact1d.vec(Tensor input, SymInt[]? output_size, float[]? scale_factors) -> Tensor + python_module: nn + autogen: _upsample_nearest_exact1d.vec_out + +- func: upsample_nearest2d.vec(Tensor input, SymInt[]? output_size, float[]? scale_factors) -> Tensor + python_module: nn + autogen: upsample_nearest2d.vec_out + tags: core + +- func: _upsample_nearest_exact2d.vec(Tensor input, SymInt[]? output_size, float[]? scale_factors) -> Tensor + python_module: nn + autogen: _upsample_nearest_exact2d.vec_out + +- func: upsample_nearest3d.vec(Tensor input, SymInt[]? output_size, float[]? scale_factors) -> Tensor + python_module: nn + autogen: upsample_nearest3d.vec_out + +- func: _upsample_nearest_exact3d.vec(Tensor input, SymInt[]? output_size, float[]? scale_factors) -> Tensor + python_module: nn + autogen: _upsample_nearest_exact3d.vec_out + +# NOTE: all of the non-"vec" upsample overloads are only kept for backward compatibility. +- func: upsample_linear1d.out(Tensor self, SymInt[1] output_size, bool align_corners, float? scales=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_linear1d_out_cpu + CUDA: upsample_linear1d_out_cuda + MPS: upsample_linear1d_out_mps + +- func: upsample_linear1d(Tensor self, SymInt[1] output_size, bool align_corners, float? scales=None) -> Tensor + python_module: nn + structured_delegate: upsample_linear1d.out + +- func: upsample_linear1d_backward.grad_input(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, bool align_corners, float? scales=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_linear1d_backward_out_cpu + CUDA: upsample_linear1d_backward_out_cuda + MPS: upsample_linear1d_backward_out_mps + +- func: upsample_linear1d_backward(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, bool align_corners, float? scales=None) -> Tensor + python_module: nn + structured_delegate: upsample_linear1d_backward.grad_input + +- func: upsample_bilinear2d.out(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_bilinear2d_out_cpu + CUDA: upsample_bilinear2d_out_cuda + MPS: upsample_bilinear2d_out_mps + +- func: upsample_bilinear2d(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_bilinear2d.out + dispatch: + QuantizedCPU: upsample_bilinear2d_quantized_cpu + +- func: upsample_bilinear2d_backward.grad_input(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_bilinear2d_backward_out_cpu + CUDA: upsample_bilinear2d_backward_out_cuda + MPS: upsample_bilinear2d_backward_out_mps + +- func: upsample_bilinear2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_bilinear2d_backward.grad_input + +- func: _upsample_bilinear2d_aa.out(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_bilinear2d_aa_out_cpu + CUDA: _upsample_bilinear2d_aa_out_cuda + +- func: _upsample_bilinear2d_aa(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_bilinear2d_aa.out + +- func: _upsample_bilinear2d_aa_backward.grad_input(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_bilinear2d_aa_backward_out_cpu + CUDA: _upsample_bilinear2d_aa_backward_out_cuda + +- func: _upsample_bilinear2d_aa_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_bilinear2d_aa_backward.grad_input + +- func: upsample_bicubic2d.out(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_bicubic2d_out_cpu + CUDA: upsample_bicubic2d_out_cuda + MPS: upsample_bicubic2d_out_mps + +- func: upsample_bicubic2d(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_bicubic2d.out + +- func: upsample_bicubic2d_backward.grad_input(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_bicubic2d_backward_out_cpu + CUDA: upsample_bicubic2d_backward_out_cuda + MPS: upsample_bicubic2d_backward_out_mps + +- func: upsample_bicubic2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_bicubic2d_backward.grad_input + +- func: _upsample_bicubic2d_aa.out(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_bicubic2d_aa_out_cpu + CUDA: _upsample_bicubic2d_aa_out_cuda + +- func: _upsample_bicubic2d_aa(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_bicubic2d_aa.out + +- func: _upsample_bicubic2d_aa_backward.grad_input(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_bicubic2d_aa_backward_out_cpu + CUDA: _upsample_bicubic2d_aa_backward_out_cuda + +- func: _upsample_bicubic2d_aa_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_bicubic2d_aa_backward.grad_input + +- func: upsample_trilinear3d.out(Tensor self, SymInt[3] output_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_trilinear3d_out_cpu + CUDA: upsample_trilinear3d_out_cuda + +- func: upsample_trilinear3d(Tensor self, SymInt[3] output_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_trilinear3d.out + +- func: upsample_trilinear3d_backward.grad_input(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_trilinear3d_backward_out_cpu + CUDA: upsample_trilinear3d_backward_out_cuda + +- func: upsample_trilinear3d_backward(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_trilinear3d_backward.grad_input + +- func: upsample_nearest1d.out(Tensor self, SymInt[1] output_size, float? scales=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_nearest1d_out_cpu + CUDA: upsample_nearest1d_out_cuda + MPS: upsample_nearest1d_out_mps + +- func: _upsample_nearest_exact1d.out(Tensor self, SymInt[1] output_size, float? scales=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_nearest_exact1d_out_cpu + CUDA: _upsample_nearest_exact1d_out_cuda + MPS: _upsample_nearest_exact1d_out_mps + +- func: upsample_nearest1d(Tensor self, SymInt[1] output_size, float? scales=None) -> Tensor + python_module: nn + structured_delegate: upsample_nearest1d.out + +- func: _upsample_nearest_exact1d(Tensor self, SymInt[1] output_size, float? scales=None) -> Tensor + python_module: nn + structured_delegate: _upsample_nearest_exact1d.out + +- func: upsample_nearest1d_backward.grad_input(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, float? scales=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_nearest1d_backward_out_cpu + CUDA: upsample_nearest1d_backward_out_cuda + MPS: upsample_nearest1d_backward_out_mps + +- func: _upsample_nearest_exact1d_backward.grad_input(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, float? scales=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_nearest_exact1d_backward_out_cpu + CUDA: _upsample_nearest_exact1d_backward_out_cuda + MPS: _upsample_nearest_exact1d_backward_out_mps + +- func: upsample_nearest1d_backward(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, float? scales=None) -> Tensor + python_module: nn + structured_delegate: upsample_nearest1d_backward.grad_input + +- func: _upsample_nearest_exact1d_backward(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, float? scales=None) -> Tensor + python_module: nn + structured_delegate: _upsample_nearest_exact1d_backward.grad_input + +- func: upsample_nearest2d.out(Tensor self, SymInt[2] output_size, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_nearest2d_out_cpu + CUDA: upsample_nearest2d_out_cuda + MPS: upsample_nearest2d_out_mps + +- func: _upsample_nearest_exact2d.out(Tensor self, SymInt[2] output_size, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_nearest_exact2d_out_cpu + CUDA: _upsample_nearest_exact2d_out_cuda + MPS: _upsample_nearest_exact2d_out_mps + +- func: upsample_nearest2d(Tensor self, SymInt[2] output_size, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_nearest2d.out + dispatch: + QuantizedCPU: upsample_nearest2d_quantized_cpu + +- func: _upsample_nearest_exact2d(Tensor self, SymInt[2] output_size, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_nearest_exact2d.out + dispatch: + QuantizedCPU: _upsample_nearest_exact2d_quantized_cpu + +- func: upsample_nearest2d_backward.grad_input(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_nearest2d_backward_out_cpu + CUDA: upsample_nearest2d_backward_out_cuda + MPS: upsample_nearest2d_backward_out_mps + +- func: _upsample_nearest_exact2d_backward.grad_input(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_nearest_exact2d_backward_out_cpu + CUDA: _upsample_nearest_exact2d_backward_out_cuda + MPS: _upsample_nearest_exact2d_backward_out_mps + +- func: upsample_nearest2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_nearest2d_backward.grad_input + +- func: _upsample_nearest_exact2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_nearest_exact2d_backward.grad_input + +- func: upsample_nearest3d.out(Tensor self, SymInt[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_nearest3d_out_cpu + CUDA: upsample_nearest3d_out_cuda + +- func: _upsample_nearest_exact3d.out(Tensor self, SymInt[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_nearest_exact3d_out_cpu + CUDA: _upsample_nearest_exact3d_out_cuda + +- func: upsample_nearest3d(Tensor self, SymInt[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_nearest3d.out + dispatch: + QuantizedCPU: upsample_nearest3d_quantized_cpu + +- func: _upsample_nearest_exact3d(Tensor self, SymInt[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_nearest_exact3d.out + dispatch: + QuantizedCPU: _upsample_nearest_exact3d_quantized_cpu + +- func: upsample_nearest3d_backward.grad_input(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: upsample_nearest3d_backward_out_cpu + CUDA: upsample_nearest3d_backward_out_cuda + +- func: _upsample_nearest_exact3d_backward.grad_input(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: _upsample_nearest_exact3d_backward_out_cpu + CUDA: _upsample_nearest_exact3d_backward_out_cuda + +- func: upsample_nearest3d_backward(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: upsample_nearest3d_backward.grad_input + +- func: _upsample_nearest_exact3d_backward(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + python_module: nn + structured_delegate: _upsample_nearest_exact3d_backward.grad_input + +- func: sigmoid_backward.grad_input(Tensor grad_output, Tensor output, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: sigmoid_backward_out + MPS: sigmoid_backward_out_mps + tags: pointwise + +- func: sigmoid_backward(Tensor grad_output, Tensor output) -> Tensor + python_module: nn + structured_delegate: sigmoid_backward.grad_input + tags: pointwise + +- func: logit_backward.grad_input(Tensor grad_output, Tensor self, float? eps=None, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: logit_backward_out + MPS: logit_backward_out_mps + tags: pointwise + +- func: logit_backward(Tensor grad_output, Tensor self, float? eps=None) -> Tensor + python_module: nn + structured_delegate: logit_backward.grad_input + tags: pointwise + +- func: tanh_backward.grad_input(Tensor grad_output, Tensor output, *, Tensor(a!) grad_input) -> Tensor(a!) + python_module: nn + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: tanh_backward_out + MPS: tanh_backward_out_mps + tags: pointwise + +- func: tanh_backward(Tensor grad_output, Tensor output) -> Tensor + python_module: nn + structured_delegate: tanh_backward.grad_input + +# What's a thnn_conv_ versus a slow_conv_? +# +# Historically, we have inefficient implementations of convolutions +# coming from the THNN/THCUNN library. These convolutions typically +# operated by computing the Toeplitz matrix and then doing a matrix +# multiply with the input; this is very memory inefficient! However, +# occasionally, we really don't have anything better, so it's helpful +# to have these fallbacks when there is no more optimized implementation +# in cudnn or mkldnn, etc. Both thnn_ and slow_ convolutions fall +# into this bucket. +# +# The difference between these two designations, is that thnn_ refers +# to a convolution that is still written in the "legacy" style; that is, +# C code in the THNN/ or THCUNN/ directory. A slow_ convolution is +# one that is written in the native style: modern C++. Algorithmically, +# these are the same thing, but we give them different prefixes to +# make the operational distinction clear. + tags: pointwise + +- func: slow_conv_transpose2d.out(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, SymInt[2] output_padding=0, SymInt[2] dilation=1, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + structured: True + dispatch: + CPU: slow_conv_transpose2d_structured_cpu + CUDA: slow_conv_transpose2d_structured_cuda + +- func: slow_conv_transpose2d(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, SymInt[2] output_padding=0, SymInt[2] dilation=1) -> Tensor + python_module: nn + structured_delegate: slow_conv_transpose2d.out + +- func: slow_conv_transpose3d.out(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] output_padding=0, SymInt[3] dilation=1, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: slow_conv_transpose3d_out_cpu + CUDA: slow_conv_transpose3d_out_cuda + +- func: slow_conv_transpose3d(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] output_padding=0, SymInt[3] dilation=1) -> Tensor + python_module: nn + dispatch: + CPU: slow_conv_transpose3d_cpu + CUDA: slow_conv_transpose3d_cuda + +- func: thnn_conv2d.out(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + +- func: thnn_conv2d(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0) -> Tensor + python_module: nn + +- func: _slow_conv2d_forward.output(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias, SymInt[2] stride, SymInt[2] padding, *, Tensor(a!) output) -> Tensor(a!) + python_module: nn + dispatch: + CPU: slow_conv2d_forward_out_cpu + CUDA: slow_conv2d_forward_out_cuda + +- func: _slow_conv2d_forward(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias, SymInt[2] stride, SymInt[2] padding) -> Tensor + python_module: nn + dispatch: + CPU: slow_conv2d_forward_cpu + CUDA: slow_conv2d_forward_cuda + +- func: _slow_conv2d_backward.grad_input(Tensor grad_output, Tensor self, Tensor weight, SymInt[2] kernel_size, SymInt[2] stride, SymInt[2] padding, *, Tensor(a!) grad_input, Tensor(b!) grad_weight, Tensor(c!) grad_bias) -> (Tensor(a!), Tensor(b!), Tensor(c!)) + python_module: nn + dispatch: + CPU: slow_conv2d_backward_out_cpu + CUDA: slow_conv2d_backward_out_cuda + +- func: _slow_conv2d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, SymInt[2] kernel_size, SymInt[2] stride, SymInt[2] padding, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) + python_module: nn + dispatch: + CPU: slow_conv2d_backward_cpu + CUDA: slow_conv2d_backward_cuda + autogen: _slow_conv2d_backward.output_mask_out + +- func: _conv_depthwise2d.out(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias, SymInt[2] stride, SymInt[2] padding, SymInt[2] dilation, *, Tensor(a!) out) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + python_module: nn + dispatch: + CUDA: conv_depthwise2d_cuda_out + +- func: _conv_depthwise2d(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias, SymInt[2] stride, SymInt[2] padding, SymInt[2] dilation) -> Tensor + python_module: nn + dispatch: + CUDA: conv_depthwise2d_cuda + +- func: conv_depthwise3d(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias, SymInt[3] stride, SymInt[3] padding, SymInt[3] dilation) -> Tensor + python_module: nn + dispatch: + CUDA: conv_depthwise3d_cuda + autogen: conv_depthwise3d.out + +- func: slow_conv3d.out(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + +- func: slow_conv3d(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0) -> Tensor + python_module: nn + +- func: slow_conv3d_forward.output(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias, SymInt[3] stride, SymInt[3] padding, *, Tensor(a!) output) -> Tensor(a!) + python_module: nn + dispatch: + CPU: slow_conv3d_forward_out_cpu + +- func: slow_conv3d_forward(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias, SymInt[3] stride, SymInt[3] padding) -> Tensor + python_module: nn + dispatch: + CPU: slow_conv3d_forward_cpu + +- func: slow_conv_dilated2d(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, SymInt[2] dilation=1) -> Tensor + python_module: nn + dispatch: + CPU: slow_conv_dilated2d_cpu + CUDA: slow_conv_dilated2d_cuda + autogen: slow_conv_dilated2d.out + +- func: slow_conv_dilated3d(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] dilation=1) -> Tensor + python_module: nn + dispatch: + CPU: slow_conv_dilated3d_cpu + CUDA: slow_conv_dilated3d_cuda + autogen: slow_conv_dilated3d.out + +- func: col2im.out(Tensor self, SymInt[2] output_size, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: col2im_out_cpu + CUDA: col2im_out_cuda + +- func: col2im(Tensor self, SymInt[2] output_size, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor + python_module: nn + dispatch: + CPU: col2im_cpu + CUDA: col2im_cuda + tags: core + +- func: column_stack(Tensor[] tensors) -> Tensor + +- func: column_stack.out(Tensor[] tensors, *, Tensor(a!) out) -> Tensor(a!) + +- func: im2col.out(Tensor self, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride, *, Tensor(a!) out) -> Tensor(a!) + python_module: nn + dispatch: + CPU: im2col_out_cpu + CUDA: im2col_out_cuda + MPS: im2col_out_mps + +- func: im2col(Tensor self, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor + python_module: nn + dispatch: + CPU: im2col_cpu + CUDA: im2col_cuda + MPS: im2col_mps + +- func: isfinite(Tensor self) -> Tensor + variants: function, method + device_check: NoCheck + device_guard: False + tags: pointwise + +- func: isinf(Tensor self) -> Tensor + variants: function, method + device_check: NoCheck + device_guard: False + dispatch: + CompositeExplicitAutograd: isinf + NestedTensorCPU, NestedTensorCUDA: NestedTensor_isinf + SparseCPU, SparseCUDA: isinf_sparse + SparseMeta: isinf_sparse_meta + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: isinf_sparse_csr + autogen: isinf.out + tags: [core, pointwise] + +- func: record_stream(Tensor(a!) self, Stream s) -> () + variants: method + dispatch: + CUDA: record_stream_cuda + +- func: isposinf(Tensor self) -> Tensor + variants: function, method + structured_delegate: isposinf.out + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_isposinf + SparseCPU, SparseCUDA: isposinf_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: isposinf_sparse_csr + tags: pointwise + +- func: isposinf.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: isposinf_out + SparseCPU, SparseCUDA: isposinf_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: isposinf_sparse_csr_out + tags: pointwise + +- func: isneginf(Tensor self) -> Tensor + variants: function, method + structured_delegate: isneginf.out + dispatch: + NestedTensorCPU, NestedTensorCUDA: NestedTensor_isneginf + SparseCPU, SparseCUDA: isneginf_sparse + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: isneginf_sparse_csr + tags: pointwise + +- func: isneginf.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: isneginf_out + SparseCPU, SparseCUDA: isneginf_sparse_out + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: isneginf_sparse_csr_out + tags: pointwise + +# NOTE [_add_batch_dim and _remove_batch_dim] +# _add_batch_dim and _remove_batch_dim are meant to be used in the implementation +# of the vmap frontend API (see torch/_vmap_internals.py). They are not +# user-facing, hence the leading underscore. Please don't use them them anywhere else. +- func: _add_batch_dim(Tensor self, int batch_dim, int level) -> Tensor + variants: function + +# See NOTE [_add_batch_dim and _remove_batch_dim] +- func: _remove_batch_dim(Tensor self, int level, SymInt batch_size, int out_dim) -> Tensor + variants: function + +## Functions related to the `torch.special` namespace +# Note [special namespace binding] +# Functions in the special python module should have their names start with +# "special_" underscore and be bound to the desired Python name in +# torch/special/__init__.py, and the desired C++ name in torch/csrc/api/include/torch/special.h. +# The "special_" names should be hidden from the user and not documented. + +- func: special_entr(Tensor self) -> Tensor + structured_delegate: special_entr.out + python_module: special + variants: function + tags: pointwise + +- func: special_entr.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: special + variants: function + dispatch: + CPU, CUDA: special_entr_out + tags: pointwise + +- func: special_ndtri(Tensor self) -> Tensor + structured_delegate: special_ndtri.out + python_module: special + variants: function + tags: pointwise + +- func: special_ndtri.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: special + variants: function + dispatch: + CPU, CUDA: special_ndtri_out + tags: pointwise + +- func: special_log_ndtr(Tensor self) -> Tensor + structured_delegate: special_log_ndtr.out + python_module: special + variants: function + tags: pointwise + +- func: special_log_ndtr.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + structured: True + structured_inherits: TensorIteratorBase + python_module: special + variants: function + dispatch: + CPU, CUDA: special_log_ndtr_out + tags: pointwise + +- func: special_expm1(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_expm1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_exp2(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_exp2.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_psi(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_psi.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_digamma(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_digamma.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_gammaln(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_gammaln.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_erf(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_erf.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_erfc(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_erfc.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + +- func: special_erfcx(Tensor self) -> Tensor + python_module: special + variants: function + structured_delegate: special_erfcx.out + tags: pointwise + +- func: special_erfcx.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: special_erfcx_out + tags: pointwise + +- func: special_erfinv(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_erfinv.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + +- func: special_ndtr(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_ndtr.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_xlog1py(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + structured_delegate: special_xlog1py.out + tags: pointwise + +- func: special_xlog1py.self_scalar(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_xlog1py + tags: pointwise + +- func: special_xlog1py.other_scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_xlog1py + tags: pointwise + +- func: special_xlog1py.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + python_module: special + variants: function + dispatch: + CPU, CUDA: special_xlog1py_out + tags: pointwise + +- func: special_xlog1py.self_scalar_out(Scalar self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_xlog1py_out + tags: pointwise + +- func: special_xlog1py.other_scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_xlog1py_out + tags: pointwise + +- func: special_xlogy(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + +- func: special_xlogy.self_scalar(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + +- func: special_xlogy.other_scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + +- func: special_xlogy.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: special + variants: function + +- func: special_xlogy.self_scalar_out(Scalar self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: special + variants: function + +- func: special_xlogy.other_scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: special + variants: function + +- func: special_zeta(Tensor self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + structured_delegate: special_zeta.out + tags: pointwise + +- func: special_zeta.self_scalar(Scalar self, Tensor other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_zeta + tags: pointwise + +- func: special_zeta.other_scalar(Tensor self, Scalar other) -> Tensor + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_zeta + tags: pointwise + +- func: special_zeta.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + structured: True + structured_inherits: TensorIteratorBase + python_module: special + variants: function + dispatch: + CPU, CUDA: special_zeta_out + tags: pointwise + +- func: special_zeta.self_scalar_out(Scalar self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_zeta_out + tags: pointwise + +- func: special_zeta.other_scalar_out(Tensor self, Scalar other, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck # TensorIterator + python_module: special + variants: function + dispatch: + CompositeExplicitAutograd: special_zeta_out + tags: pointwise + +- func: special_i0(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_i0.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_i0e(Tensor self) -> Tensor + python_module: special + variants: function + structured_delegate: special_i0e.out + tags: pointwise + +- func: special_i0e.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: special_i0e_out + tags: pointwise + +- func: special_i1(Tensor self) -> Tensor + python_module: special + variants: function + structured_delegate: special_i1.out + tags: pointwise + +- func: special_i1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA, MPS: special_i1_out + tags: pointwise + +- func: special_i1e(Tensor self) -> Tensor + python_module: special + variants: function + structured_delegate: special_i1e.out + tags: pointwise + +- func: special_i1e.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + structured: True + structured_inherits: TensorIteratorBase + dispatch: + CPU, CUDA: special_i1e_out + tags: pointwise + +- func: special_logit(Tensor self, float? eps=None) -> Tensor + python_module: special + variants: function + +- func: special_logit.out(Tensor self, float? eps=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + +- func: special_polygamma(int n, Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_polygamma.out(int n, Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + +- func: special_logsumexp(Tensor self, int[1] dim, bool keepdim=False) -> Tensor + python_module: special + variants: function + +- func: special_logsumexp.out(Tensor self, int[1] dim, bool keepdim=False, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + +- func: special_expit(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_expit.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_sinc(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_sinc.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_round(Tensor self, *, int decimals=0) -> Tensor + python_module: special + variants: function + +- func: special_round.out(Tensor self, *, int decimals=0, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_log1p(Tensor self) -> Tensor + python_module: special + variants: function + +- func: special_log1p.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_log_softmax(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor + python_module: special + variants: function + +- func: special_gammainc.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_gammainc(Tensor self, Tensor other) -> Tensor + python_module: special + variants: function + +- func: special_gammaincc.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_gammaincc(Tensor self, Tensor other) -> Tensor + python_module: special + variants: function + +- func: special_multigammaln(Tensor self, int p) -> Tensor + python_module: special + variants: function + +- func: special_multigammaln.out(Tensor self, int p, *, Tensor(a!) out) -> Tensor(a!) + python_module: special + variants: function + +- func: special_softmax(Tensor self, int dim, ScalarType? dtype=None) -> Tensor + python_module: special + variants: function + +## Functions related to the fast Fourier transform and the torch.fft namespace +# Note [FFT namespace binding] +# Functions in the fft python module should have their names start with +# "fft_" underscore and be bound to the desired Python name in +# torch/fft/__init__.py, and the desired C++ name in torch/csrc/api/include/torch/fft.h. +# The "fft_" names should be hidden from the user and not documented. +# +# See fft_fft as an example. + +# torch.fft.fft +# NOTE: NOT an alias for torch.fft, which has different semantics +- func: fft_fft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_fft_symint + +- func: fft_fft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_fft_symint_out + +- func: fft_ifft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ifft_symint + +- func: fft_ifft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ifft_symint_out + +- func: fft_rfft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_rfft_symint + +- func: fft_rfft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_rfft_symint_out + +- func: fft_irfft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_irfft_symint + +- func: fft_irfft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_irfft_symint_out + +- func: fft_hfft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_hfft_symint + +- func: fft_hfft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_hfft_symint_out + +- func: fft_ihfft(Tensor self, SymInt? n=None, int dim=-1, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ihfft_symint + +- func: fft_ihfft.out(Tensor self, SymInt? n=None, int dim=-1, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ihfft_symint_out + +- func: fft_fft2(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_fft2_symint + +- func: fft_fft2.out(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_fft2_symint_out + +- func: fft_ifft2(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ifft2_symint + +- func: fft_ifft2.out(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ifft2_symint_out + +- func: fft_rfft2(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_rfft2_symint + +- func: fft_rfft2.out(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_rfft2_symint_out + +- func: fft_irfft2(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_irfft2_symint + +- func: fft_irfft2.out(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_irfft2_symint_out + +- func: fft_hfft2(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None) -> Tensor + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_hfft2_symint + +- func: fft_hfft2.out(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_hfft2_symint_out + +- func: fft_ihfft2(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None) -> Tensor + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ihfft2_symint + +- func: fft_ihfft2.out(Tensor self, SymInt[1]? s=None, int[1] dim=[-2,-1], str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ihfft2_symint_out + +- func: fft_fftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_fftn_symint + +- func: fft_fftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_fftn_symint_out + +- func: fft_ifftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ifftn_symint + +- func: fft_ifftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ifftn_symint_out + +- func: fft_rfftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_rfftn_symint + +- func: fft_rfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_rfftn_symint_out + +- func: fft_irfftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_irfftn_symint + +- func: fft_irfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_irfftn_symint_out + +- func: fft_hfftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_hfftn_symint + +- func: fft_hfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_hfftn_symint_out + +- func: fft_ihfftn(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None) -> Tensor + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ihfftn_symint + +- func: fft_ihfftn.out(Tensor self, SymInt[1]? s=None, int[1]? dim=None, str? norm=None, *, Tensor(a!) out) -> Tensor(a!) + use_const_ref_for_mutable_tensors: True + python_module: fft + variants: function + dispatch: + CompositeImplicitAutograd: fft_ihfftn_symint_out + +- func: fft_fftfreq(int n, float d=1.0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeExplicitAutograd: fft_fftfreq + +- func: fft_fftfreq.out(int n, float d=1.0, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeExplicitAutograd: fft_fftfreq_out + +- func: fft_rfftfreq(int n, float d=1.0, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + python_module: fft + variants: function + dispatch: + CompositeExplicitAutograd: fft_rfftfreq + +- func: fft_rfftfreq.out(int n, float d=1.0, *, Tensor(a!) out) -> Tensor(a!) + python_module: fft + variants: function + dispatch: + CompositeExplicitAutograd: fft_rfftfreq_out + +- func: fft_fftshift(Tensor self, int[1]? dim=None) -> Tensor + python_module: fft + variants: function + +- func: fft_ifftshift(Tensor self, int[1]? dim=None) -> Tensor + python_module: fft + variants: function + +## Functions for linear algebra and the torch.linalg namespace +# Note [linalg namespace binding] +# Functions in the linalg python module should have their names start with +# "linalg_" and be bound to the desired Python name in +# torch/linalg/__init__.py, and the desired C++ name in torch/csrc/api/include/torch/linalg.h. +# The "linalg_" names should be hidden from the user and not documented. +# +# See linalg_det as an example. + +# "_ex" stands for experimental +- func: linalg_cholesky_ex(Tensor self, *, bool upper=False, bool check_errors=False) -> (Tensor L, Tensor info) + python_module: linalg + structured_delegate: linalg_cholesky_ex.L + +- func: linalg_cholesky_ex.L(Tensor self, *, bool upper=False, bool check_errors=False, Tensor(a!) L, Tensor(b!) info) -> (Tensor(a!) L, Tensor(b!) info) + python_module: linalg + structured: True + dispatch: + CPU, CUDA: linalg_cholesky_ex_out + +- func: linalg_cholesky(Tensor self, *, bool upper=False) -> Tensor + python_module: linalg + +- func: linalg_cholesky.out(Tensor self, *, bool upper=False, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: linalg_cross(Tensor self, Tensor other, *, int dim=-1) -> Tensor + python_module: linalg + variants: function + structured_delegate: linalg_cross.out + dispatch: + ZeroTensor: linalg_cross_zerotensor + +- func: linalg_cross.out(Tensor self, Tensor other, *, int dim=-1, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + structured: True + dispatch: + CPU, CUDA, MPS: linalg_cross_out + +# linalg.lu_factor +- func: linalg_lu_factor(Tensor A, *, bool pivot=True) -> (Tensor LU, Tensor pivots) + python_module: linalg + variants: function + dispatch: + CompositeImplicitAutograd: linalg_lu_factor + MPS: linalg_lu_factor_mps + +- func: linalg_lu_factor.out(Tensor A, *, bool pivot=True, Tensor(a!) LU, Tensor(b!) pivots) -> (Tensor(a!) LU, Tensor(b!) pivots) + python_module: linalg + variants: function + dispatch: + CompositeImplicitAutograd: linalg_lu_factor_out + MPS: linalg_lu_factor_out_mps + +- func: linalg_lu_factor_ex(Tensor A, *, bool pivot=True, bool check_errors=False) -> (Tensor LU, Tensor pivots, Tensor info) + python_module: linalg + structured_delegate: linalg_lu_factor_ex.out + variants: function + +- func: linalg_lu_factor_ex.out(Tensor A, *, bool pivot=True, bool check_errors=False, Tensor(a!) LU, Tensor(b!) pivots, Tensor(c!) info) -> (Tensor(a!) LU, Tensor(b!) pivots, Tensor(c!) info) + python_module: linalg + variants: function + structured: True + dispatch: + CPU, CUDA: linalg_lu_factor_ex_out + +# linalg.lu +- func: linalg_lu(Tensor A, *, bool pivot=True) -> (Tensor P, Tensor L, Tensor U) + python_module: linalg + structured_delegate: linalg_lu.out + variants: function + +- func: linalg_lu.out(Tensor A, *, bool pivot=True, Tensor(a!) P, Tensor(b!) L, Tensor(c!) U) -> (Tensor(a!) P, Tensor(b!) L, Tensor(c!) U) + python_module: linalg + variants: function + structured: True + dispatch: + CPU, CUDA: linalg_lu_out + +# linalg.lu_solve +- func: linalg_lu_solve(Tensor LU, Tensor pivots, Tensor B, *, bool left=True, bool adjoint=False) -> Tensor + python_module: linalg + structured_delegate: linalg_lu_solve.out + variants: function + +- func: linalg_lu_solve.out(Tensor LU, Tensor pivots, Tensor B, *, bool left=True, bool adjoint=False, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + structured: True + dispatch: + CPU, CUDA: linalg_lu_solve_out + +# linalg.det +- func: _linalg_det(Tensor A) -> (Tensor result, Tensor LU, Tensor pivots) + structured_delegate: _linalg_det.result + +- func: _linalg_det.result(Tensor A, *, Tensor(a!) result, Tensor(b!) LU, Tensor(c!) pivots) -> (Tensor(a!) result, Tensor(b!) LU, Tensor(c!) pivots) + structured: True + dispatch: + CPU, CUDA: _linalg_det_out + +- func: linalg_det(Tensor A) -> Tensor + python_module: linalg + variants: function + +- func: linalg_det.out(Tensor A, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +# torch.det, alias for torch.linalg.det +- func: det(Tensor self) -> Tensor + variants: function, method + +- func: linalg_ldl_factor_ex(Tensor self, *, bool hermitian=False, bool check_errors=False) -> (Tensor LD, Tensor pivots, Tensor info) + structured_delegate: linalg_ldl_factor_ex.out + python_module: linalg + variants: function + +- func: linalg_ldl_factor_ex.out(Tensor self, *, bool hermitian=False, bool check_errors=False, Tensor(a!) LD, Tensor(b!) pivots, Tensor(c!) info) -> (Tensor(a!) LD, Tensor(b!) pivots, Tensor(c!) info) + structured: True + python_module: linalg + variants: function + dispatch: + CPU, CUDA: linalg_ldl_factor_ex_out + +- func: linalg_ldl_factor(Tensor self, *, bool hermitian=False) -> (Tensor LD, Tensor pivots) + python_module: linalg + variants: function + +- func: linalg_ldl_factor.out(Tensor self, *, bool hermitian=False, Tensor(a!) LD, Tensor(b!) pivots) -> (Tensor(a!) LD, Tensor(b!) pivots) + python_module: linalg + variants: function + +- func: linalg_ldl_solve(Tensor LD, Tensor pivots, Tensor B, *, bool hermitian=False) -> Tensor + structured_delegate: linalg_ldl_solve.out + python_module: linalg + variants: function + +- func: linalg_ldl_solve.out(Tensor LD, Tensor pivots, Tensor B, *, bool hermitian=False, Tensor(a!) out) -> Tensor(a!) + structured: True + python_module: linalg + variants: function + dispatch: + CPU, CUDA: linalg_ldl_solve_out + +- func: linalg_lstsq(Tensor self, Tensor b, float? rcond=None, *, str? driver=None) -> (Tensor solution, Tensor residuals, Tensor rank, Tensor singular_values) + python_module: linalg + variants: function + dispatch: + CompositeExplicitAutograd: linalg_lstsq + tags: dynamic_output_shape + +- func: linalg_lstsq.out(Tensor self, Tensor b, float? rcond=None, *, str? driver=None, Tensor(a!) solution, Tensor(b!) residuals, Tensor(c!) rank, Tensor(d!) singular_values) -> (Tensor(a!) solution, Tensor(b!) residuals, Tensor(c!) rank, Tensor(d!) singular_values) + python_module: linalg + variants: function + dispatch: + CPU, CUDA: linalg_lstsq_out + tags: dynamic_output_shape + +# torch.linalg.matmul, alias for torch.matmul +- func: linalg_matmul(Tensor self, Tensor other) -> Tensor + python_module: linalg + variants: function + +- func: linalg_matmul.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: linalg_vecdot(Tensor x, Tensor y, *, int dim=-1) -> Tensor + python_module: linalg + variants: function + +- func: linalg_vecdot.out(Tensor x, Tensor y, *, int dim=-1, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: linalg_matrix_exp(Tensor self) -> Tensor + python_module: linalg + variants: function + dispatch: + CPU, CUDA: linalg_matrix_exp + autogen: linalg_matrix_exp.out + +- func: _linalg_slogdet(Tensor A) -> (Tensor sign, Tensor logabsdet, Tensor LU, Tensor pivots) + structured_delegate: _linalg_slogdet.sign + +- func: _linalg_slogdet.sign(Tensor A, *, Tensor(a!) sign, Tensor(b!) logabsdet, Tensor(c!) LU, Tensor(d!) pivots) -> (Tensor(a!) sign, Tensor(b!) logabsdet, Tensor(c!) LU, Tensor(d!) pivots) + structured: True + dispatch: + CPU, CUDA: _linalg_slogdet_out + +- func: linalg_slogdet(Tensor A) -> (Tensor sign, Tensor logabsdet) + python_module: linalg + +- func: linalg_slogdet.out(Tensor A, *, Tensor(a!) sign, Tensor(b!) logabsdet) -> (Tensor(a!) sign, Tensor(b!) logabsdet) + python_module: linalg + +- func: slogdet(Tensor self) -> (Tensor sign, Tensor logabsdet) + variants: function, method + +- func: slogdet.out(Tensor self, *, Tensor(a!) sign, Tensor(b!) logabsdet) -> (Tensor(a!) sign, Tensor(b!) logabsdet) + variants: function + +- func: logdet(Tensor self) -> Tensor + variants: function, method + +- func: linalg_eig(Tensor self) -> (Tensor eigenvalues, Tensor eigenvectors) + python_module: linalg + variants: function + dispatch: + CPU, CUDA: linalg_eig + +- func: linalg_eig.out(Tensor self, *, Tensor(a!) eigenvalues, Tensor(b!) eigenvectors) -> (Tensor(a!) eigenvalues, Tensor(b!) eigenvectors) + python_module: linalg + dispatch: + CPU, CUDA: linalg_eig_out + +- func: _linalg_eigvals(Tensor self) -> Tensor + python_module: linalg + dispatch: + CPU, CUDA: _linalg_eigvals + +- func: linalg_eigvals(Tensor self) -> Tensor + python_module: linalg + +- func: linalg_eigvals.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + dispatch: + CPU, CUDA: linalg_eigvals_out + +# This function is exposes the `compute_v` flag, which is then used to implement `linalg.eigh` and +# `linalg.eigvalsh` as composite functions that call this one +- func: _linalg_eigh(Tensor A, str UPLO="L", bool compute_v=True) -> (Tensor eigenvalues, Tensor eigenvectors) + structured_delegate: _linalg_eigh.eigenvalues + +- func: _linalg_eigh.eigenvalues(Tensor A, str UPLO="L", bool compute_v=True, *, Tensor(a!) eigenvalues, Tensor(b!) eigenvectors) -> (Tensor(a!) eigenvalues, Tensor(b!) eigenvectors) + structured: True + dispatch: + CPU, CUDA: _linalg_eigh_out + +- func: linalg_eigh(Tensor self, str UPLO="L") -> (Tensor eigenvalues, Tensor eigenvectors) + python_module: linalg + +- func: linalg_eigh.eigvals(Tensor self, str UPLO="L", *, Tensor(a!) eigvals, Tensor(b!) eigvecs) -> (Tensor(a!) eigenvalues, Tensor(b!) eigenvectors) + python_module: linalg + +- func: linalg_eigvalsh(Tensor self, str UPLO="L") -> Tensor + python_module: linalg + +- func: linalg_eigvalsh.out(Tensor self, str UPLO="L", *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: linalg_householder_product(Tensor input, Tensor tau) -> Tensor + python_module: linalg + variants: function + dispatch: + CPU, CUDA: linalg_householder_product + +- func: linalg_householder_product.out(Tensor input, Tensor tau, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + dispatch: + CPU, CUDA: linalg_householder_product_out + +- func: linalg_inv_ex(Tensor A, *, bool check_errors=False) -> (Tensor inverse, Tensor info) + python_module: linalg + structured_delegate: linalg_inv_ex.inverse + +- func: linalg_inv_ex.inverse(Tensor A, *, bool check_errors=False, Tensor(a!) inverse, Tensor(b!) info) -> (Tensor(a!) inverse, Tensor(b!) info) + python_module: linalg + structured: True + dispatch: + CPU, CUDA: linalg_inv_ex_out + MPS: linalg_inv_ex_out_mps + +- func: linalg_inv(Tensor A) -> Tensor + python_module: linalg + +- func: linalg_inv.out(Tensor A, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: inverse(Tensor self) -> Tensor + variants: function, method + +- func: inverse.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + +- func: inner(Tensor self, Tensor other) -> Tensor + variants: function, method + +- func: inner.out(Tensor self, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + +- func: outer(Tensor self, Tensor vec2) -> Tensor + variants: function, method + +- func: outer.out(Tensor self, Tensor vec2, *, Tensor(a!) out) -> Tensor(a!) + +# torch.ger, alias for torch.outer +- func: ger(Tensor self, Tensor vec2) -> Tensor + variants: function, method + +- func: ger.out(Tensor self, Tensor vec2, *, Tensor(a!) out) -> Tensor(a!) + +- func: linalg_norm(Tensor self, Scalar? ord=None, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + python_module: linalg + variants: function + +- func: linalg_norm.ord_str(Tensor self, str ord, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + python_module: linalg + variants: function + +- func: linalg_norm.out(Tensor self, Scalar? ord=None, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_norm.ord_str_out(Tensor self, str ord, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_vector_norm(Tensor self, Scalar ord=2, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + python_module: linalg + variants: function + structured_delegate: linalg_vector_norm.out + +- func: linalg_vector_norm.out(Tensor self, Scalar ord=2, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + structured: True + dispatch: + CPU, CUDA: linalg_vector_norm_out + MPS: linalg_vector_norm_out_mps + +- func: linalg_matrix_norm(Tensor self, Scalar ord, int[] dim=[-2,-1], bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + python_module: linalg + +- func: linalg_matrix_norm.out(Tensor self, Scalar ord, int[] dim=[-2,-1], bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: linalg_matrix_norm.str_ord(Tensor self, str ord='fro', int[] dim=[-2,-1], bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + python_module: linalg + +- func: linalg_matrix_norm.str_ord_out(Tensor self, str ord='fro', int[] dim=[-2,-1], bool keepdim=False, *, ScalarType? dtype=None, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +# This function is exposes the `compute_uv` flag, which is then used to implement `linalg.svd` and +# `linalg.svdvals` as composite functions that call this one +- func: _linalg_svd(Tensor A, bool full_matrices=False, bool compute_uv=True, *, str? driver=None) -> (Tensor U, Tensor S, Tensor Vh) + variants: function + structured_delegate: _linalg_svd.U + +- func: _linalg_svd.U(Tensor A, bool full_matrices=False, bool compute_uv=True, *, str? driver=None, Tensor(a!) U, Tensor(b!) S, Tensor(c!) Vh) -> (Tensor(a!) U, Tensor(b!) S, Tensor(c!) Vh) + structured: True + dispatch: + CPU, CUDA: _linalg_svd_out + +- func: linalg_svd(Tensor A, bool full_matrices=True, *, str? driver=None) -> (Tensor U, Tensor S, Tensor Vh) + python_module: linalg + variants: function + +- func: linalg_svd.U(Tensor A, bool full_matrices=True, *, str? driver=None, Tensor(a!) U, Tensor(b!) S, Tensor(c!) Vh) -> (Tensor(a!) U, Tensor(b!) S, Tensor(c!) Vh) + python_module: linalg + variants: function + +- func: linalg_svdvals(Tensor A, *, str? driver=None) -> Tensor + python_module: linalg + variants: function + +- func: linalg_svdvals.out(Tensor A, *, str? driver=None, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_cond(Tensor self, Scalar? p=None) -> Tensor + python_module: linalg + variants: function + +- func: linalg_cond.out(Tensor self, Scalar? p=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_cond.p_str(Tensor self, str p) -> Tensor + python_module: linalg + variants: function + +- func: linalg_cond.p_str_out(Tensor self, str p, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_pinv.atol_rtol_tensor(Tensor self, *, Tensor? atol=None, Tensor? rtol=None, bool hermitian=False) -> Tensor + python_module: linalg + variants: function + dispatch: + # calls svd, which calls mH() (view op) + # also calls narrow() + CompositeExplicitAutogradNonFunctional: linalg_pinv + +- func: linalg_pinv.atol_rtol_tensor_out(Tensor self, *, Tensor? atol=None, Tensor? rtol=None, bool hermitian=False, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + dispatch: + CompositeExplicitAutograd: linalg_pinv_out + +- func: linalg_pinv.atol_rtol_float(Tensor self, *, float? atol=None, float? rtol=None, bool hermitian=False) -> Tensor + cpp_no_default_args: ['atol', 'rtol'] + python_module: linalg + variants: function + +- func: linalg_pinv.atol_rtol_float_out(Tensor self, *, float? atol=None, float? rtol=None, bool hermitian=False, Tensor(a!) out) -> Tensor(a!) + cpp_no_default_args: ['atol', 'rtol'] + python_module: linalg + variants: function + +- func: linalg_pinv(Tensor self, float rcond, bool hermitian=False) -> Tensor + python_module: linalg + variants: function + +- func: linalg_pinv.rcond_tensor(Tensor self, Tensor rcond, bool hermitian=False) -> Tensor + python_module: linalg + variants: function + +- func: linalg_pinv.out(Tensor self, float rcond, bool hermitian=False, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_pinv.out_rcond_tensor(Tensor self, Tensor rcond, bool hermitian=False, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: _linalg_solve_ex(Tensor A, Tensor B, *, bool left=True, bool check_errors=False) -> (Tensor result, Tensor LU, Tensor pivots, Tensor info) + structured_delegate: _linalg_solve_ex.result + +- func: _linalg_solve_ex.result(Tensor A, Tensor B, *, bool left=True, bool check_errors=False, Tensor(a!) result, Tensor(b!) LU, Tensor(c!) pivots, Tensor(d!) info) -> (Tensor(a!) result, Tensor(b!) LU, Tensor(c!) pivots, Tensor(d!) info) + structured: True + dispatch: + CPU, CUDA: _linalg_solve_ex_out + +- func: linalg_solve_ex(Tensor A, Tensor B, *, bool left=True, bool check_errors=False) -> (Tensor result, Tensor info) + python_module: linalg + +- func: linalg_solve_ex.out(Tensor A, Tensor B, *, bool left=True, bool check_errors=False, Tensor(a!) result, Tensor(b!) info) -> (Tensor(a!) result, Tensor(b!) info) + python_module: linalg + +- func: linalg_solve(Tensor A, Tensor B, *, bool left=True) -> Tensor + python_module: linalg + +- func: _spsolve(Tensor A, Tensor B, *, bool left=True) -> Tensor + python_module: sparse + dispatch: + SparseCsrCUDA: _sparse_csr_linear_solve + +- func: linalg_solve.out(Tensor A, Tensor B, *, bool left=True, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: linalg_tensorinv(Tensor self, int ind=2) -> Tensor + python_module: linalg + variants: function + +- func: linalg_tensorinv.out(Tensor self, int ind=2, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_tensorsolve(Tensor self, Tensor other, int[]? dims=None) -> Tensor + python_module: linalg + variants: function + +- func: linalg_tensorsolve.out(Tensor self, Tensor other, int[]? dims=None, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_qr(Tensor A, str mode='reduced') -> (Tensor Q, Tensor R) + python_module: linalg + variants: function + structured_delegate: linalg_qr.out + +- func: linalg_qr.out(Tensor A, str mode='reduced', *, Tensor(a!) Q, Tensor(b!) R) -> (Tensor(a!) Q, Tensor(b!) R) + python_module: linalg + structured: True + dispatch: + CPU, CUDA: linalg_qr_out + +- func: linalg_matrix_power(Tensor self, int n) -> Tensor + python_module: linalg + +- func: linalg_matrix_power.out(Tensor self, int n, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +- func: linalg_matrix_rank.atol_rtol_tensor(Tensor input, *, Tensor? atol=None, Tensor? rtol=None, bool hermitian=False) -> Tensor + python_module: linalg + variants: function + +- func: linalg_matrix_rank.atol_rtol_tensor_out(Tensor input, *, Tensor? atol=None, Tensor? rtol=None, bool hermitian=False, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_matrix_rank.atol_rtol_float(Tensor self, *, float? atol=None, float? rtol=None, bool hermitian=False) -> Tensor + cpp_no_default_args: ['atol', 'rtol'] + python_module: linalg + variants: function + +- func: linalg_matrix_rank.atol_rtol_float_out(Tensor self, *, float? atol=None, float? rtol=None, bool hermitian=False, Tensor(a!) out) -> Tensor(a!) + cpp_no_default_args: ['atol', 'rtol'] + python_module: linalg + variants: function + +- func: linalg_matrix_rank(Tensor self, float tol, bool hermitian=False) -> Tensor + python_module: linalg + variants: function + +- func: linalg_matrix_rank.out(Tensor self, float tol, bool hermitian=False, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_matrix_rank.tol_tensor(Tensor input, Tensor tol, bool hermitian=False) -> Tensor + python_module: linalg + variants: function + +- func: linalg_matrix_rank.out_tol_tensor(Tensor input, Tensor tol, bool hermitian=False, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + variants: function + +- func: linalg_multi_dot(Tensor[] tensors) -> Tensor + python_module: linalg + +- func: linalg_multi_dot.out(Tensor[] tensors, *, Tensor(a!) out) -> Tensor(a!) + python_module: linalg + +## Functions related to the `torch.nested` namespace +# Note [nested namespace binding] +# Functions in the nested python module should have their names start with +# "nested_" underscore and be bound to the desired Python name in +# torch/nested/__init__.py, and the desired C++ name in torch/csrc/api/include/torch/nested.h. +# The "nested_" names should be hidden from the user and not documented. + +- func: nested_to_padded_tensor(Tensor self, float padding, int[]? output_size=None) -> Tensor + python_module: nested + variants: function + +## Functions that are only for testing +# It is undocumented and should not be used outside of tests. +- func: _test_serialization_subcmul(Tensor self, Tensor other, Scalar alpha=1) -> Tensor + +# Note: for testing COW materialization within `at::parallel_for` loop function +- func: _test_parallel_materialize(Tensor self, int num_parallel, bool skip_first=False) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _test_parallel_materialize + +# Note: this function is only for testing. +- func: _test_optional_intlist(Tensor values, int[]? addends) -> Tensor + python_module: nn + dispatch: + CPU: _test_optional_intlist + autogen: _test_optional_intlist.out + +# Note: this function is only for testing. +- func: _test_optional_filled_intlist(Tensor values, int[2]? addends) -> Tensor + python_module: nn + dispatch: + CPU: _test_optional_intlist + autogen: _test_optional_filled_intlist.out + +# Note: this function is only for testing. +- func: _test_optional_floatlist(Tensor values, float[]? addends) -> Tensor + python_module: nn + dispatch: + CPU: _test_optional_floatlist + autogen: _test_optional_floatlist.out + +# Note: this function is only for testing. +- func: _test_string_default(Tensor dummy, str a="\"'\\", str b='"\'\\') -> Tensor + python_module: nn + +# Note: this function is only for testing. +- func: _test_ambiguous_defaults.a(Tensor dummy, int a=1, int b=1) -> Tensor + python_module: nn + +# Note: this function is only for testing. +- func: _test_ambiguous_defaults.b(Tensor dummy, int a=2, str b="2") -> Tensor + cpp_no_default_args: ['a', 'b'] + python_module: nn + +# Note: this function is only for testing. +- func: _test_warn_in_autograd(Tensor self) -> Tensor + python_module: nn + dispatch: + CompositeExplicitAutograd: _test_warn_in_autograd + autogen: _test_warn_in_autograd.out + +# Note: this function is only for testing. +- func: _test_autograd_multiple_dispatch.fullcoverage(Tensor self) -> Tensor + dispatch: + # the NestedTensor keys are necessary because NestedTensor has been removed + # from the CompositeExplicitAutograd keyset see Note [NestedTensor Not Included in Backend Keys] + CompositeExplicitAutograd, NestedTensorCPU, NestedTensorCUDA: _test_autograd_multiple_dispatch_fullcoverage + autogen: _test_autograd_multiple_dispatch.fullcoverage_out + +# Note: this function is only for testing. +- func: _test_autograd_multiple_dispatch.ntonly(Tensor self, bool b) -> Tensor + dispatch: + CompositeImplicitAutograd, NestedTensorCPU, NestedTensorCUDA: _test_autograd_multiple_dispatch_ntonly + +# Note: this function is only for testing. +- func: _test_autograd_multiple_dispatch_view(Tensor(a) self) -> Tensor(a) + dispatch: + CompositeExplicitAutograd: _test_autograd_multiple_dispatch_view + +# Note: this function is only for testing. +- func: _test_autograd_multiple_dispatch_view_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _test_autograd_multiple_dispatch_view_copy + tags: view_copy + autogen: _test_autograd_multiple_dispatch_view_copy.out + +- func: segment_reduce(Tensor data, str reduce, *, Tensor? lengths=None, Tensor? indices=None, Tensor? offsets=None, int axis=0, bool unsafe=False, Scalar? initial=None) -> Tensor + variants: function + dispatch: + CPU, CUDA: segment_reduce_kernel + autogen: segment_reduce.out + +- func: _segment_reduce_backward(Tensor grad, Tensor output, Tensor data, str reduce, *, Tensor? lengths=None, Tensor? offsets=None, int axis=0, Scalar? initial=None) -> Tensor + variants: function + dispatch: + CPU, CUDA: _segment_reduce_backward_kernel + autogen: _segment_reduce_backward.out + +- func: pad_sequence(Tensor[] sequences, bool batch_first=False, float padding_value=0.0, str padding_side="right") -> Tensor + python_module: nn + variants: function + +- func: flatten_dense_tensors(Tensor[] tensors) -> Tensor + variants: function + python_module: nn + +- func: unflatten_dense_tensors(Tensor flat, Tensor[] tensors) -> Tensor[] + variants: function + python_module: nn + +- func: _nested_tensor_from_tensor_list(Tensor[] list, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + variants: function + dispatch: + CompositeExplicitAutograd: _nested_tensor_from_tensor_list + autogen: _nested_tensor_from_tensor_list.out + +- func: _fw_primal_copy(Tensor self, int level) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _fw_primal_copy + tags: view_copy + autogen: _fw_primal_copy.out + +- func: _make_dual_copy(Tensor primal, Tensor tangent, int level) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _make_dual_copy + tags: view_copy + autogen: _make_dual_copy.out + +- func: view_as_real_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: view_as_real_copy + tags: view_copy + autogen: view_as_real_copy.out + +- func: view_as_complex_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: view_as_complex_copy + tags: view_copy + autogen: view_as_complex_copy.out + +- func: _conj_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _conj_copy + tags: view_copy + autogen: _conj_copy.out + +- func: _neg_view_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _neg_view_copy + tags: view_copy + autogen: _neg_view_copy.out + +- func: as_strided_copy(Tensor self, SymInt[] size, SymInt[] stride, SymInt? storage_offset=None) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: as_strided_copy_symint + tags: view_copy + autogen: as_strided_copy.out + +- func: _sparse_broadcast_to_copy(Tensor self, int[] size) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _sparse_broadcast_to_copy + tags: view_copy + autogen: _sparse_broadcast_to_copy.out + +- func: diagonal_copy(Tensor self, int offset=0, int dim1=0, int dim2=1) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: diagonal_copy + tags: view_copy + autogen: diagonal_copy.out + +- func: expand_copy(Tensor self, SymInt[] size, *, bool implicit=False) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: expand_copy_symint + tags: view_copy + autogen: expand_copy.out + +- func: permute_copy(Tensor self, int[] dims) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: permute_copy + tags: view_copy + autogen: permute_copy.out + +- func: _reshape_alias_copy(Tensor self, SymInt[] size, SymInt[] stride) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _reshape_alias_copy_symint + tags: view_copy + autogen: _reshape_alias_copy.out + +- func: select_copy.int(Tensor self, int dim, SymInt index) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: select_copy_symint + SparseCsrCPU, SparseCsrCUDA, SparseCsrMeta: select_copy_sparse_csr + tags: view_copy + autogen: select_copy.int_out + +- func: detach_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: detach_copy + tags: view_copy + autogen: detach_copy.out + +- func: slice_copy.Tensor(Tensor self, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: slice_copy_Tensor_symint + tags: view_copy + autogen: slice_copy.Tensor_out + +- func: split_copy.Tensor(Tensor self, SymInt split_size, int dim=0) -> Tensor[] + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: split_copy_Tensor_symint + tags: view_copy + +- func: split_with_sizes_copy(Tensor self, SymInt[] split_sizes, int dim=0) -> Tensor[] + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: split_with_sizes_copy_symint + tags: view_copy + +- func: squeeze_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: squeeze_copy + tags: view_copy + autogen: squeeze_copy.out + +- func: squeeze_copy.dim(Tensor self, int dim) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: squeeze_copy_dim + tags: view_copy + autogen: squeeze_copy.dim_out + +- func: squeeze_copy.dims(Tensor self, int[] dim) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: squeeze_copy_dims + tags: view_copy + autogen: squeeze_copy.dims_out + +- func: t_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: t_copy + tags: view_copy + autogen: t_copy.out + +- func: transpose_copy.int(Tensor self, int dim0, int dim1) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: transpose_copy_int + tags: view_copy + autogen: transpose_copy.int_out + +- func: unsqueeze_copy(Tensor self, int dim) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: unsqueeze_copy + tags: view_copy + autogen: unsqueeze_copy.out + +- func: _indices_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _indices_copy + tags: view_copy + autogen: _indices_copy.out + +- func: _values_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: _values_copy + tags: view_copy + autogen: _values_copy.out + +- func: indices_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: indices_copy + tags: view_copy + autogen: indices_copy.out + +- func: values_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: values_copy + tags: view_copy + autogen: values_copy.out + +- func: crow_indices_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: crow_indices_copy + tags: view_copy + autogen: crow_indices_copy.out + +- func: col_indices_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: col_indices_copy + tags: view_copy + autogen: col_indices_copy.out + +- func: ccol_indices_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: ccol_indices_copy + tags: view_copy + autogen: ccol_indices_copy.out + +- func: row_indices_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: row_indices_copy + tags: view_copy + autogen: row_indices_copy.out + +- func: unbind_copy.int(Tensor self, int dim=0) -> Tensor[] + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: unbind_copy_int + tags: view_copy + +- func: unbind_copy.int_out(Tensor self, int dim=0, *, Tensor(a!)[] out) -> () + variants: function + dispatch: + CompositeExplicitAutograd: unbind_copy_int_out + +- func: split_copy.Tensor_out(Tensor self, SymInt split_size, int dim=0, *, Tensor(a!)[] out) -> () + variants: function + dispatch: + CompositeExplicitAutograd: split_copy_Tensor_out + + +- func: split_with_sizes_copy.out(Tensor self, SymInt[] split_sizes, int dim=0, *, Tensor(a!)[] out) -> () + variants: function + dispatch: + CompositeExplicitAutograd: split_with_sizes_copy_out + CUDA: split_with_sizes_copy_out_cuda + +- func: view_copy(Tensor self, SymInt[] size) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: view_copy_symint + tags: view_copy + autogen: view_copy.out + +- func: view_copy.dtype(Tensor self, ScalarType dtype) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: view_copy_dtype + tags: view_copy + autogen: view_copy.dtype_out + +- func: unfold_copy(Tensor self, int dimension, int size, int step) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: unfold_copy + tags: view_copy + autogen: unfold_copy.out + +- func: alias_copy(Tensor self) -> Tensor + variants: function + dispatch: + CompositeExplicitAutogradNonFunctional: alias_copy + tags: view_copy + autogen: alias_copy.out + +- func: to_padded_tensor(Tensor self, float padding, SymInt[]? output_size=None) -> Tensor + variants: method + dispatch: + NestedTensorCPU: NestedTensor_to_padded_tensor_generic + NestedTensorCUDA: NestedTensor_to_padded_tensor_cuda + autogen: to_padded_tensor.out + +- func: _jagged_to_padded_dense_forward(Tensor values, Tensor[] offsets, SymInt[] max_lengths, float padding_value=0.0) -> Tensor + variants: function + dispatch: + CUDA: _fbgemm_jagged_to_padded_dense_forward + CPU: _jagged_to_padded_dense_forward_cpu + +- func: _padded_dense_to_jagged_forward(Tensor dense, Tensor[] offsets, SymInt? total_L=None) -> Tensor + variants: function + dispatch: + CUDA: _fbgemm_dense_to_jagged_forward_symint + CPU: _padded_dense_to_jagged_forward_cpu + +- func: _nested_from_padded_tensor(Tensor padded, Tensor offsets, Tensor dummy, int ragged_idx=1, Tensor? min_seqlen=None, Tensor? max_seqlen=None, SymInt? sum_S=None) -> Tensor + variants: function + device_check: NoCheck + dispatch: {} + +- func: _nested_tensor_softmax_with_shape(Tensor self, Tensor query) -> Tensor + dispatch: + NestedTensorCPU: NestedTensor_softmax_dropout + NestedTensorCUDA: NestedTensor_softmax_dropout_cuda + tags: nondeterministic_seeded + +- func: _safe_softmax(Tensor self, int dim, ScalarType? dtype=None) -> Tensor + dispatch: + CompositeExplicitAutograd: _safe_softmax + NestedTensorCPU, NestedTensorCUDA: _safe_softmax + +# Apparently, putting "forward" in the name will cause Python bindings to be skipped, so "fwd" it is. +- func: _transformer_encoder_layer_fwd(Tensor src, int embed_dim, int num_heads, Tensor qkv_weight, Tensor qkv_bias, Tensor proj_weight, Tensor proj_bias, bool use_gelu, bool norm_first, float eps, Tensor norm_weight_1, Tensor norm_bias_1, Tensor norm_weight_2, Tensor norm_bias_2, Tensor ffn_weight_1, Tensor ffn_bias_1, Tensor ffn_weight_2, Tensor ffn_bias_2, Tensor? mask=None, int? mask_type=None) -> Tensor + variants: function + dispatch: + CPU, CUDA, NestedTensorCPU, NestedTensorCUDA: transformer_encoder_layer_forward + autogen: _transformer_encoder_layer_fwd.out + +- func: _native_multi_head_attention(Tensor query, Tensor key, Tensor value, int embed_dim, int num_head, Tensor qkv_weight, Tensor qkv_bias, Tensor proj_weight, Tensor proj_bias, Tensor? mask=None, bool need_weights=True, bool average_attn_weights=True, int? mask_type=None) -> (Tensor, Tensor) + variants: function + dispatch: + CPU, NestedTensorCPU: native_multi_head_attention_cpu + CUDA, NestedTensorCUDA: native_multi_head_attention_cuda + autogen: _native_multi_head_attention.out + +- func: scaled_dot_product_attention(Tensor query, Tensor key, Tensor value, Tensor? attn_mask=None, float dropout_p=0.0, bool is_causal=False, *, float? scale=None, bool enable_gqa=False) -> Tensor + python_module: nn + variants: function + autogen: scaled_dot_product_attention.out + tags: nondeterministic_seeded + +# This aten function is kept so that we can test the choice function from Python +- func: _fused_sdp_choice(Tensor query, Tensor key, Tensor value, Tensor? attn_mask=None, float dropout_p=0.0, bool is_causal=False, *, float? scale=None, bool enable_gqa=False) -> int + dispatch: + Meta: _fused_sdp_choice_meta + CPU, NestedTensorCPU: _fused_sdp_choice_cpp + CUDA, NestedTensorCUDA: _fused_sdp_choice_cuda + tags: nondeterministic_seeded + +- func: _scaled_dot_product_attention_math(Tensor query, Tensor key, Tensor value, Tensor? attn_mask=None, float dropout_p=0.0, bool is_causal=False, Tensor? dropout_mask=None, *, float? scale=None, bool enable_gqa=False) -> (Tensor, Tensor) + variants: function + tags: nondeterministic_seeded + +- func: _scaled_dot_product_attention_math_for_mps(Tensor query, Tensor key, Tensor value, Tensor? attn_mask=None, float dropout_p=0.0, bool is_causal=False, Tensor? dropout_mask=None, *, float? scale=None) -> (Tensor, Tensor) + dispatch: + MPS: _scaled_dot_product_attention_math_mps + tags: nondeterministic_seeded + +- func: _scaled_dot_product_flash_attention(Tensor query, Tensor key, Tensor value, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + dispatch: + CUDA: _scaled_dot_product_flash_attention_cuda + NestedTensorCUDA: _scaled_dot_product_flash_attention_nestedtensor_cuda + tags: nondeterministic_seeded + +- func: _scaled_dot_product_flash_attention_for_cpu(Tensor query, Tensor key, Tensor value, float dropout_p=0.0, bool is_causal=False, *, Tensor? attn_mask=None, float? scale=None) -> (Tensor output, Tensor logsumexp) + dispatch: + CPU: _scaled_dot_product_flash_attention_cpu + tags: nondeterministic_seeded + +- func: _scaled_dot_product_fused_attention_overrideable(Tensor query, Tensor key, Tensor value, Tensor? attn_bias=None, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + dispatch: + CompositeExplicitAutograd: _scaled_dot_product_fused_attention_overrideable + tags: nondeterministic_seeded + +- func: _scaled_dot_product_flash_attention_backward(Tensor grad_out, Tensor query, Tensor key, Tensor value, Tensor out, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, float dropout_p, bool is_causal, Tensor philox_seed, Tensor philox_offset, *, float? scale=None) -> (Tensor grad_query, Tensor grad_key, Tensor grad_value) + device_check: NoCheck + variants: function + dispatch: + CUDA: _scaled_dot_product_flash_attention_backward_cuda + NestedTensorCUDA: _scaled_dot_product_flash_attention_backward_nested + +- func: _scaled_dot_product_flash_attention_for_cpu_backward(Tensor grad_out, Tensor query, Tensor key, Tensor value, Tensor out, Tensor logsumexp, float dropout_p, bool is_causal, *, Tensor? attn_mask=None, float? scale=None) -> (Tensor grad_query, Tensor grad_key, Tensor grad_value) + device_check: NoCheck + variants: function + dispatch: + CPU: _scaled_dot_product_flash_attention_cpu_backward + +- func: _scaled_dot_product_fused_attention_overrideable_backward(Tensor grad_out, Tensor query, Tensor key, Tensor value, Tensor attn_bias, bool[4] grad_input_mask, Tensor out, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, float dropout_p, bool is_causal, Tensor philox_seed, Tensor philox_offset, *, float? scale=None) -> (Tensor grad_query, Tensor grad_key, Tensor grad_value, Tensor grad_attn_bias) + device_check: NoCheck + variants: function + dispatch: + CompositeExplicitAutograd: _scaled_dot_product_fused_attention_overrideable_backward + +- func: _scaled_dot_product_efficient_attention(Tensor query, Tensor key, Tensor value, Tensor? attn_bias, bool compute_log_sumexp, float dropout_p=0.0, bool is_causal=False, *, float? scale=None) -> (Tensor output, Tensor log_sumexp, Tensor philox_seed, Tensor philox_offset) + dispatch: + CUDA: _scaled_dot_product_efficient_attention_cuda + NestedTensorCUDA: _scaled_dot_product_efficient_attention_nestedtensor_cuda + tags: nondeterministic_seeded + +- func: _scaled_dot_product_efficient_attention_backward(Tensor grad_out_, Tensor query, Tensor key, Tensor value, Tensor attn_bias, Tensor out, Tensor logsumexp, Tensor philox_seed, Tensor philox_offset, float dropout_p, bool[4] grad_input_mask, bool is_causal=False, *, float? scale=None) -> (Tensor, Tensor, Tensor, Tensor) + device_check: NoCheck + dispatch: + CUDA: _scaled_dot_product_efficient_attention_backward_cuda + tags: nondeterministic_seeded + +- func: _scaled_dot_product_cudnn_attention(Tensor query, Tensor key, Tensor value, Tensor? attn_bias, bool compute_log_sumexp, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + dispatch: + CUDA: _scaled_dot_product_cudnn_attention_cuda + tags: nondeterministic_seeded + +- func: _scaled_dot_product_cudnn_attention_backward(Tensor grad_out, Tensor query, Tensor key, Tensor value, Tensor out, Tensor logsumexp, Tensor philox_seed, Tensor philox_offset, Tensor attn_bias, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, float dropout_p, bool is_causal, *, float? scale=None) -> (Tensor, Tensor, Tensor) + dispatch: + CUDA: _scaled_dot_product_cudnn_attention_backward_cuda + tags: nondeterministic_seeded + +- func: _flash_attention_forward(Tensor query, Tensor key, Tensor value, Tensor? cum_seq_q, Tensor? cum_seq_k, SymInt max_q, SymInt max_k, float dropout_p, bool is_causal, bool return_debug_mask, *, float? scale=None, SymInt? window_size_left=None, SymInt? window_size_right=None, Tensor? seqused_k=None, Tensor? alibi_slopes=None) -> (Tensor output, Tensor softmax_logsumexp, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + variants: function + dispatch: + CUDA: _flash_attention_forward + tags: nondeterministic_seeded + +- func: _flash_attention_backward(Tensor grad_out, Tensor query, Tensor key, Tensor value, Tensor out, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, float dropout_p, bool is_causal, Tensor philox_seed, Tensor philox_offset, *, float? scale=None, SymInt? window_size_left=None, SymInt? window_size_right=None) -> (Tensor, Tensor, Tensor) + device_check: NoCheck + variants: function + dispatch: + CUDA: _flash_attention_backward + +# Returns output, logsumexp if compute_logsumexp +- func: _efficient_attention_forward(Tensor query, Tensor key, Tensor value, Tensor? bias, Tensor? cu_seqlens_q, Tensor? cu_seqlens_k, SymInt? max_seqlen_q, SymInt? max_seqlen_k, float dropout_p, int custom_mask_type, bool compute_log_sumexp=False, *, float? scale=None, Tensor? seqlen_k=None, int? window_size=None) -> (Tensor output, Tensor logsumexp, Tensor philox_seed, Tensor philox_offset, SymInt max_seqlen_batch_q, SymInt max_seqlen_batch_k) + variants: function + dispatch: + CUDA: _efficient_attention_forward + tags: nondeterministic_seeded + +- func: _efficient_attention_backward(Tensor grad_out_, Tensor query, Tensor key, Tensor value, Tensor? bias, Tensor out, Tensor? cu_seqlens_q, Tensor? cu_seqlens_k, SymInt max_seqlen_q, SymInt max_seqlen_k, Tensor logsumexp, float dropout_p, Tensor philox_seed, Tensor philox_offset, int custom_mask_type, bool bias_requires_grad, *, float? scale=None, int? num_splits_key=None, int? window_size=None, bool shared_storage_dqdkdv=False) -> (Tensor, Tensor, Tensor, Tensor) + device_check: NoCheck + variants: function + dispatch: + CUDA: _efficient_attention_backward + +- func: _triton_scaled_dot_attention(Tensor q, Tensor k, Tensor v, float dropout_p=0.0) -> Tensor + variants: function + dispatch: + CUDA: triton_scaled_dot_attention + tags: nondeterministic_seeded + autogen: _triton_scaled_dot_attention.out + +- func: _fill_mem_eff_dropout_mask_(Tensor(a!) self, float dropout_p, int seed, int offset) -> Tensor(a!) + variants: function + dispatch: + CUDA: _fill_mem_eff_dropout_mask_ + tags: nondeterministic_seeded + +- func: _triton_multi_head_attention(Tensor query, Tensor key, Tensor value, int embed_dim, int num_head, Tensor qkv_weight, Tensor qkv_bias, Tensor proj_weight, Tensor proj_bias, Tensor? mask=None) -> Tensor + variants: function + dispatch: + CUDA: triton_multi_head_attention + autogen: _triton_multi_head_attention.out + +- func: special_airy_ai(Tensor x) -> Tensor + python_module: special + structured_delegate: special_airy_ai.out + variants: function + tags: pointwise + +- func: special_airy_ai.out(Tensor x, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_airy_ai_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_bessel_j0(Tensor self) -> Tensor + python_module: special + structured_delegate: special_bessel_j0.out + variants: function + tags: pointwise + +- func: special_bessel_j0.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_bessel_j0_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_bessel_j1(Tensor self) -> Tensor + python_module: special + structured_delegate: special_bessel_j1.out + variants: function + tags: pointwise + +- func: special_bessel_j1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_bessel_j1_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_bessel_y0(Tensor self) -> Tensor + python_module: special + structured_delegate: special_bessel_y0.out + variants: function + tags: pointwise + +- func: special_bessel_y0.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_bessel_y0_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_bessel_y1(Tensor self) -> Tensor + python_module: special + structured_delegate: special_bessel_y1.out + variants: function + tags: pointwise + +- func: special_bessel_y1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_bessel_y1_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_t(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_chebyshev_polynomial_t.out + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_t.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_t + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_t.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_t + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_t.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_chebyshev_polynomial_t_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_t.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_t_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_t.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_t_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_u(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_chebyshev_polynomial_u.out + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_u.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_u + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_u.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_u + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_u.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_chebyshev_polynomial_u_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_u.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_u_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_u.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_u_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_v(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_chebyshev_polynomial_v.out + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_v.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_v + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_v.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_v + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_v.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_chebyshev_polynomial_v_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_v.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_v_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_v.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_v_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_w(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_chebyshev_polynomial_w.out + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_w.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_w + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_w.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_w + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_w.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_chebyshev_polynomial_w_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_w.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_w_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_chebyshev_polynomial_w.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_chebyshev_polynomial_w_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_h(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_hermite_polynomial_h.out + variants: function + tags: pointwise + +- func: special_hermite_polynomial_h.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_h + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_h.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_h + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_h.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_hermite_polynomial_h_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_hermite_polynomial_h.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_h_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_h.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_h_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_he(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_hermite_polynomial_he.out + variants: function + tags: pointwise + +- func: special_hermite_polynomial_he.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_he + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_he.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_he + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_he.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_hermite_polynomial_he_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_hermite_polynomial_he.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_he_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_hermite_polynomial_he.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_hermite_polynomial_he_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_laguerre_polynomial_l(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_laguerre_polynomial_l.out + variants: function + tags: pointwise + +- func: special_laguerre_polynomial_l.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_laguerre_polynomial_l + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_laguerre_polynomial_l.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_laguerre_polynomial_l + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_laguerre_polynomial_l.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_laguerre_polynomial_l_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_laguerre_polynomial_l.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_laguerre_polynomial_l_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_laguerre_polynomial_l.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_laguerre_polynomial_l_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_legendre_polynomial_p(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_legendre_polynomial_p.out + variants: function + tags: pointwise + +- func: special_legendre_polynomial_p.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_legendre_polynomial_p + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_legendre_polynomial_p.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_legendre_polynomial_p + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_legendre_polynomial_p.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_legendre_polynomial_p_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_legendre_polynomial_p.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_legendre_polynomial_p_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_legendre_polynomial_p.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_legendre_polynomial_p_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_modified_bessel_i0(Tensor self) -> Tensor + python_module: special + structured_delegate: special_modified_bessel_i0.out + variants: function + tags: pointwise + +- func: special_modified_bessel_i0.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_modified_bessel_i0_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_modified_bessel_i1(Tensor self) -> Tensor + python_module: special + structured_delegate: special_modified_bessel_i1.out + variants: function + tags: pointwise + +- func: special_modified_bessel_i1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_modified_bessel_i1_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_modified_bessel_k0(Tensor self) -> Tensor + python_module: special + structured_delegate: special_modified_bessel_k0.out + variants: function + tags: pointwise + +- func: special_modified_bessel_k0.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_modified_bessel_k0_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_modified_bessel_k1(Tensor self) -> Tensor + python_module: special + structured_delegate: special_modified_bessel_k1.out + variants: function + tags: pointwise + +- func: special_modified_bessel_k1.out(Tensor self, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_modified_bessel_k1_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_scaled_modified_bessel_k0(Tensor x) -> Tensor + python_module: special + structured_delegate: special_scaled_modified_bessel_k0.out + variants: function + tags: pointwise + +- func: special_scaled_modified_bessel_k0.out(Tensor x, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_scaled_modified_bessel_k0_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_scaled_modified_bessel_k1(Tensor x) -> Tensor + python_module: special + structured_delegate: special_scaled_modified_bessel_k1.out + variants: function + tags: pointwise + +- func: special_scaled_modified_bessel_k1.out(Tensor x, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_scaled_modified_bessel_k1_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_t(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_shifted_chebyshev_polynomial_t.out + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_t.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_t + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_t.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_t + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_t.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_shifted_chebyshev_polynomial_t_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_t.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_t_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_t.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_t_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_u(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_shifted_chebyshev_polynomial_u.out + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_u.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_u + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_u.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_u + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_u.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_shifted_chebyshev_polynomial_u_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_u.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_u_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_u.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_u_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_v(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_shifted_chebyshev_polynomial_v.out + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_v.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_v + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_v.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_v + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_v.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_shifted_chebyshev_polynomial_v_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_v.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_v_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_v.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_v_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_w(Tensor x, Tensor n) -> Tensor + device_check: NoCheck + python_module: special + structured_delegate: special_shifted_chebyshev_polynomial_w.out + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_w.x_scalar(Scalar x, Tensor n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_w + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_w.n_scalar(Tensor x, Scalar n) -> Tensor + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_w + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_w.out(Tensor x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + device_check: NoCheck + dispatch: + CPU, CUDA: special_shifted_chebyshev_polynomial_w_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_w.x_scalar_out(Scalar x, Tensor n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_w_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_shifted_chebyshev_polynomial_w.n_scalar_out(Tensor x, Scalar n, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CompositeExplicitAutograd: special_shifted_chebyshev_polynomial_w_out + device_check: NoCheck + python_module: special + variants: function + tags: pointwise + +- func: special_spherical_bessel_j0(Tensor x) -> Tensor + python_module: special + structured_delegate: special_spherical_bessel_j0.out + variants: function + tags: pointwise + +- func: special_spherical_bessel_j0.out(Tensor x, *, Tensor(a!) out) -> Tensor(a!) + dispatch: + CPU, CUDA: special_spherical_bessel_j0_out + python_module: special + structured_inherits: TensorIteratorBase + structured: True + variants: function + tags: pointwise + +# Aux function used in the test TestPythonDispatch.test_kwarg_only_and_positional_default +# within test/test_python_dispatch.py +- func: _foobar(Tensor self, bool arg1=True, bool arg2=True, *, bool arg3=True) -> Tensor + dispatch: + CPU: foobar + autogen: _foobar.out + +- func: _fused_adam_(Tensor(a!)[] self, Tensor(b!)[] grads, Tensor(c!)[] exp_avgs, Tensor(d!)[] exp_avg_sqs, Tensor(e!)[] max_exp_avg_sqs, Tensor[] state_steps, *, float lr, float beta1, float beta2, float weight_decay, float eps, bool amsgrad, bool maximize, Tensor? grad_scale=None, Tensor? found_inf=None) -> () + # Unlike "foreach" functions, lists of tensors should be guaranteed to be on the same device (for now). + variants: function + dispatch: + CPU: _fused_adam_kernel_cpu_ + CUDA: _fused_adam_kernel_cuda_ + MPS: _fused_adam_kernel_mps_ + autogen: _fused_adam, _fused_adam.out + +- func: _fused_adam_.tensor_lr(Tensor(a!)[] self, Tensor(b!)[] grads, Tensor(c!)[] exp_avgs, Tensor(d!)[] exp_avg_sqs, Tensor(e!)[] max_exp_avg_sqs, Tensor[] state_steps, *, Tensor lr, float beta1, float beta2, float weight_decay, float eps, bool amsgrad, bool maximize, Tensor? grad_scale=None, Tensor? found_inf=None) -> () + # Unlike "foreach" functions, lists of tensors should be guaranteed to be on the same device (for now), + # but still skip the device check as the Tensor LR can be on CPU + device_check: NoCheck + variants: function + dispatch: + CPU: _fused_adam_kernel_cpu_ + CUDA: _fused_adam_kernel_cuda_ + MPS: _fused_adam_kernel_mps_ + autogen: _fused_adam.tensor_lr, _fused_adam.tensor_lr_out + +- func: _fused_adamw_(Tensor(a!)[] self, Tensor(b!)[] grads, Tensor(c!)[] exp_avgs, Tensor(d!)[] exp_avg_sqs, Tensor(e!)[] max_exp_avg_sqs, Tensor[] state_steps, *, float lr, float beta1, float beta2, float weight_decay, float eps, bool amsgrad, bool maximize, Tensor? grad_scale=None, Tensor? found_inf=None) -> () + # Unlike "foreach" functions, lists of tensors should be guaranteed to be on the same device (for now). + variants: function + dispatch: + CPU: _fused_adamw_kernel_cpu_ + CUDA: _fused_adamw_kernel_cuda_ + MPS: _fused_adamw_kernel_mps_ + autogen: _fused_adamw, _fused_adamw.out + +- func: _fused_adamw_.tensor_lr(Tensor(a!)[] self, Tensor(b!)[] grads, Tensor(c!)[] exp_avgs, Tensor(d!)[] exp_avg_sqs, Tensor(e!)[] max_exp_avg_sqs, Tensor[] state_steps, *, Tensor lr, float beta1, float beta2, float weight_decay, float eps, bool amsgrad, bool maximize, Tensor? grad_scale=None, Tensor? found_inf=None) -> () + # Unlike "foreach" functions, lists of tensors should be guaranteed to be on the same device (for now), + # but still skip the device check as the Tensor LR can be on CPU + device_check: NoCheck + variants: function + dispatch: + CPU: _fused_adamw_kernel_cpu_ + CUDA: _fused_adamw_kernel_cuda_ + MPS: _fused_adamw_kernel_mps_ + autogen: _fused_adamw.tensor_lr, _fused_adamw.tensor_lr_out + +- func: _fused_sgd_(Tensor(a!)[] self, Tensor(b!)[] grads, Tensor(c!)[] momentum_buffer_list, *, float weight_decay, float momentum, float lr, float dampening, bool nesterov, bool maximize, bool is_first_step, Tensor? grad_scale=None, Tensor? found_inf=None) -> () + # Unlike "foreach" functions, lists of tensors should be guaranteed to be on the same device (for now). + variants: function + dispatch: + CPU: _fused_sgd_kernel_cpu_ + CUDA: _fused_sgd_kernel_cuda_ + MPS: _fused_sgd_kernel_mps_ + autogen: _fused_sgd, _fused_sgd.out + +- func: _fused_sgd_.tensor_lr(Tensor(a!)[] self, Tensor(b!)[] grads, Tensor(c!)[] momentum_buffer_list, *, float weight_decay, float momentum, Tensor lr, float dampening, bool nesterov, bool maximize, bool is_first_step, Tensor? grad_scale=None, Tensor? found_inf=None) -> () + # Unlike "foreach" functions, lists of tensors should be guaranteed to be on the same device (for now). + # but still skip the device check as the Tensor LR can be on CPU + device_check: NoCheck + variants: function + dispatch: + CPU: _fused_sgd_kernel_cpu_ + CUDA: _fused_sgd_kernel_cuda_ + MPS: _fused_sgd_kernel_mps_ + autogen: _fused_sgd.tensor_lr, _fused_sgd.tensor_lr_out + +- func: _fused_adagrad_(Tensor(a!)[] self, Tensor(b!)[] grads, Tensor(c!)[] state_sums, Tensor(d!)[] state_steps, *, float lr, float lr_decay, float weight_decay, float eps, bool maximize, Tensor? grad_scale=None, Tensor? found_inf=None) -> () + variants: function + dispatch: + CPU: _fused_adagrad_kernel_cpu_ + autogen: _fused_adagrad, _fused_adagrad.out + +# This op is ONLY used by pytorch/XLA in functionalization, and should never show up in vanilla eager mode or in any pytorch tracing contexts. +- func: _propagate_xla_data(Tensor input, Tensor output) -> () + variants: function diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/native/tags.yaml b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/native/tags.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c2aa5ba4cd20bc9f8e6e4b9434a220ca55ef0b86 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/native/tags.yaml @@ -0,0 +1,80 @@ +# This yaml file contains all the possible tags that can be defined in `tags` in `native_functions.yaml` + +- tag: inplace_view + desc: | + This tag indicates if an operator *only* modifies the tensor metadata +- tag: pt2_compliant_tag + desc: | + This tag indicates if the operator is guaranteed to + work with the PT2 compilation APIs (torch.compile, + torch.export, etc). If you add this tag to an + operator, please use + `torch.testing._internal.optest.opcheck` to test that + the operator has been registered correctly and + works with torch.compile +- tag: view_copy + desc: | + This tag indicates operators that are *_copy* variants + of view/aliasing operators. If an operator has a view_copy tag, + then it should have the name {op}_copy, where {op} is a view operator. +- tag: dynamic_output_shape + desc: | + This tag indicates if an operator's output's shape depends on input Tensor + data. +- tag: data_dependent_output + desc: | + Operator has a non-Tensor output whose value is dependent on the data + of Tensor inputs. Among other things, this implies that this operator + cannot be run with meta tensor (since data is not available), nor + can it be symbolically traced. +- tag: generated + desc: | + This tag indicates that the operator doesn't have an explicit entry in + native_functions.yaml, and instead was generated automatically by the codegen. +- tag: nondeterministic_seeded + desc: | + This tag indicates if an operator is nondeterministically seeded + (i.e., is random) such that the operator intentionally produces + different results when run twice on the same inputs, but this randomness + is controlled by a Generator which, if reseeded would give you the + same result. +- tag: nondeterministic_bitwise + desc: | + This tag indicates if an operator doesn't guarantee bitwise equivalence + across different runs of an operator with identical inputs. +- tag: needs_fixed_stride_order + desc: | + This tag indicates that the operator should be passed Tensors following + the same stride permutation as observed in eager when compiled in inductor. + Only one of {needs_fixed_stride_order, flexible_layout} can apply; if + multiple are assigned then we assume the most restrictive one. +- tag: flexible_layout + desc: | + This tag indicates that the custom operator can accept inputs with varying + strides/storage_offset and that when compiled, Inductor is allowed to change + the strides/storage_offset of inputs to the custom operator. + Only one of {needs_fixed_stride_order, flexible_layout} can apply; if + multiple are assigned then we assume the most restrictive one. + +# NOTE [Core ATen Ops] +- tag: core + desc: | + Core aten ops is a subset of aten ops that remains after aten-to-aten decomposition and + functionalization pass. Core aten ops are fully functional and adhere to single static + assignment (SSA): this implies there will be no `inplace` or `_out` variants in this opset. + This opset is designed to serve as the functional IR to interface with compiler backends. + In contrast to primTorch, core aten opset doesn't decompose ops into explicit + type promotion and broadcasting ops. + Core aten ops is also effectively the opset produced by torchdynamo.export(aten_graph=True), + and thus can be used as an opset for export purpose. +- tag: pointwise + desc: | + Pointwise operators are operators where each element of the output is computed only by accessing + the corresponding element of all the broadcasted inputs. The output shape will be the broadcasted + shape of the inputs. +- tag: maybe_aliasing_or_mutating + desc: | + For some ops, we can't statically determine whether the op is functional or not. Note that this is only + relevant to CIA ops that decompose before functionalization/autograd. It is useful to + know this information for export as we would want to decompose these ops as they are unsafe to be + preserved. diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/ATenOpList.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/ATenOpList.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1e2cdef2ba05d346a852d1873251df006a5a6bba --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/ATenOpList.cpp @@ -0,0 +1,36 @@ +#include + +#include +#include +#include +#include +#include + +// ${generated_comment} + +namespace at { + +namespace { +struct OpNameEquals final { + bool operator()(const std::pair& lhs, const std::pair& rhs) const { + return 0 == strcmp(lhs.first, rhs.first) && 0 == strcmp(lhs.second, rhs.second); + } +}; + +struct OpNameHash final { + size_t operator()(const std::pair& p) const { + // use std::hash because std::hash would hash pointers and not pointed-to strings + return std::hash()(p.first) ^ (~ std::hash()(p.second)); + } +}; +} + +bool is_custom_op(const c10::OperatorName& opName) { + static std::unordered_set, OpNameHash, OpNameEquals> ops { + ${aten_ops} + {"", ""} + }; + return ops.count(std::make_pair( + opName.name.c_str(), opName.overload_name.c_str())) == 0; +} +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/CompositeViewCopyKernels.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/CompositeViewCopyKernels.cpp new file mode 100644 index 0000000000000000000000000000000000000000..a950b6356078215e04328e3d1eca6df19d0060a4 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/CompositeViewCopyKernels.cpp @@ -0,0 +1,73 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include +#include +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +#include +$ops_headers +#endif + +namespace at { +namespace native { + +// This file contains a number of kernels for aten functions that are fully code-generated. +// TODO: rename this file to something more generic. + +namespace { +at::Tensor clone_arg(const at::Tensor& t) { + return t.clone(); +} + +std::vector clone_arg(const at::TensorList& t_list) { + std::vector out(t_list.size()); + for (const auto& i : c10::irange(t_list.size())) { + out[i] = t_list[i].clone(); + } + return out; +} + +// duped with gen_resize_out_helper from structured kernels +void copy_arg(const at::Tensor& dst, const at::Tensor& src) { + TORCH_CHECK(src.dtype() == dst.dtype(), + "Expected out tensor to have dtype ", src.dtype(), ", but got ", dst.dtype(), " instead"); + TORCH_CHECK(src.device() == dst.device(), + "Expected out tensor to have device ", src.device(), ", but got ", dst.device(), " instead"); + dst.copy_(src); +} + +void copy_arg(const at::TensorList& dst, const at::TensorList& src) { + TORCH_INTERNAL_ASSERT(dst.size() == src.size()); + for (const auto& i : c10::irange(dst.size())) { + copy_arg(dst[i], src[i]); + } +} + +// TODO: this doesn't handle restriding empty tensors correctly; see +// gen_resize_out_helper for the correct algorithm + +void resize_out_helper(const at::Tensor& dst, const at::Tensor& src) { + at::native::resize_output(dst, src.sizes()); +} + +void resize_out_helper(const at::TensorList& dst, const at::TensorList& src) { + TORCH_INTERNAL_ASSERT(dst.size() == src.size()); + for (const auto& i : c10::irange(dst.size())) { + at::native::resize_output(dst[i], src[i].sizes()); + } +} +} + + +${CompositeViewCopyKernel_Definitions} + +${GeneratedCompositeFunctional_Definitions} + +${GeneratedCompositeOut_Definitions} + +} // namespace native +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunction.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunction.h new file mode 100644 index 0000000000000000000000000000000000000000..4bd999183177c647735f6db51ae19619113b2df2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunction.h @@ -0,0 +1,23 @@ +#pragma once +// ${generated_comment} + +// NB: The implementing C++ file is RegisterDispatchKey.cpp + +// The only #includes we need are for custom classes that have defaults in the C++ API +#include +#include +#include + +// Forward declarations of any types needed in the operator signatures. +// We can't directly include these classes because it will cause circular include dependencies. +// This file is included by TensorBody.h, which defines the Tensor class. +#include + +namespace at { + +namespace ${dispatch_namespace} { + +${dispatch_namespaced_declarations} + +} // namespace ${dispatch_namespace} +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunctions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunctions.h new file mode 100644 index 0000000000000000000000000000000000000000..4532acdf7f790e4dd520bfe4879c693e52f958d4 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunctions.h @@ -0,0 +1,29 @@ +#include + +// TODO Undo all logic introduced for Note [Avoiding Include Cycles In Static Dispatch] +// Code introduced to avoid cyclic dependency in static dispatch is no longer +// needed as static dispatch logic is moved from TensorBody.h, which caused cycles in the first place, +// to Operators.cpp for supporting multiple backends with multiple kernels. +// +// Note [Avoiding Include Cycles In Static Dispatch] +// In order to avoid #include cycles in the static dispatch build, we've carefully split out +// the static function definition files into {DispatchKey}Functions.h and {DispatchKey}Functions_inl.h. +// +// Without this split, the include cycle looks like TensorBody.h -> CPUFunctions.h -> TensorBody.h. +// - TensorBody.h #includes CPUFunctions.h in the static dispatch build, because the tensor methods +// all need to call into the fastpath C++ API defined in CPUFunctions.h. The methods are also all +// directly inlined into TensorBody.h. +// - CPUFunctions.h #includes TensorBody.h because it contains function declarations for the entire C++ API, +// which include functions that have defaultable std::optional arguments. +// That requires knowing the full Tensor class definition. +// +// We break the cycle by doing the following: +// - Split out CPUFunction.h into two files: CPUFunctions.h and CPUFunctions_inl.h +// - CPUFunction.h is a dummy file that just includes the Tensor class and includes CPUFunctions_inl., +// - CPUFunctions_inl.h includes everything else +// - (only in the static dispatch build) TensorBody.h makes sure to finish defining the Tensor class, +// and then it includes CPUFunctions_inl.h. +// - All other files that want the cpu fastpath functions can include CPUFunctions.h directly. +// - This also means that static dispatch build, CPUFunctions.h only needs to +// #include TensorBody.h, and it will automatically bring in CPUFunctions_inl.h. +${inline_headers} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunctions_inl.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunctions_inl.h new file mode 100644 index 0000000000000000000000000000000000000000..7e9fe55a26ba9915b231d541880e3e8c9dd2bcec --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyFunctions_inl.h @@ -0,0 +1,22 @@ +#pragma once +// ${generated_comment} + +// NB: The implementing C++ file is RegisterDispatchKey.cpp + +// The only #includes we need are for custom classes that have defaults in the C++ API +#include +#include +#include + +#if defined(AT_PER_OPERATOR_HEADERS) && defined(TORCH_ASSERT_ONLY_METHOD_OPERATORS) +#error This change adds a dependency on all pytorch operators, meaning the \ + file will need to be re-compiled every time an operator is changed or added. \ + Consider including a specific operator from \ + . \ + See NOTE [TORCH_ASSERT_ONLY_METHOD_OPERATORS]. +#endif + +${DispatchKeyFunctions_inl_includes} + + +${dispatch_namespaced_declarations} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..604a7bcb6275616ebe98756378f7feaffe4a6856 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.cpp @@ -0,0 +1,13 @@ +// ${generated_comment} +${includes} +${native_functions_include} + +namespace { +${helper_fns} +} // namespace + +${namespace_prologue} + +${native_function_definitions} + +${namespace_epilogue} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.h new file mode 100644 index 0000000000000000000000000000000000000000..e616b4d7ef360ab4e2223a55a11fe5d423efc8c2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/DispatchKeyNativeFunctions.h @@ -0,0 +1,19 @@ +#pragma once + +// an external backend might generate file within its code tree +// and check all the source files within the tree with clang-format. +// so, disable it since the backend might have a different config. +// clang-format off + +// ${generated_comment} + +#include + +${namespace_prologue} + +struct ${class_name} { + +${dispatch_declarations} + +}; +${namespace_epilogue} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Function.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Function.h new file mode 100644 index 0000000000000000000000000000000000000000..1cde26cfdae4d48769e0986d7390900dd4aa3556 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Function.h @@ -0,0 +1,26 @@ +#pragma once + +// ${generated_comment} + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +${static_dispatch_ops_headers} + +${operator_includes} + +namespace at { + +${function_definitions} + +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/FunctionalInverses.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/FunctionalInverses.h new file mode 100644 index 0000000000000000000000000000000000000000..2a817670b7cd6dd80404fc6a512c51e3ed8b8352 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/FunctionalInverses.h @@ -0,0 +1,33 @@ +#pragma once + +// ${generated_comment} + +#include + +namespace at { +namespace functionalization { + +enum class InverseReturnMode { + /// Specifies that functional inverses should always return a view. + AlwaysView, + /// Specifies that functional inverses should always return a non-view / copy. + NeverView, + /// Specifies that functional inverses should return a view unless a (copying) scatter + /// inverse exists, in which case that will be used instead. + /// This avoids as_strided() calls that can be difficult for subclasses to handle. + ViewOrScatterInverse, +}; + +struct FunctionalInverses { + +${view_inverse_declarations} + +// NB: These are not generated! They're manually implemented in the template. +// TODO: Change codegen to generate these. See the following link: +// https://github.com/pytorch/pytorch/blob/main/torchgen/model.py#L2583-L2585 +static at::Tensor chunk_inverse(const at::Tensor & base, const at::Tensor & mutated_view, InverseReturnMode inverse_return_mode, int64_t mutated_view_idx, int chunks, int dim); +static at::Tensor narrow_inverse(const at::Tensor & base, const at::Tensor & mutated_view, InverseReturnMode inverse_return_mode, int dim, c10::SymInt start, c10::SymInt length); + +}; +} +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..01ca697f71e06829d735d17e18f325c974abc394 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Functions.cpp @@ -0,0 +1,103 @@ +#include + +#include +#include +#include + +namespace at { + +Tensor TensorMaker::make_tensor() { + AutoDispatchBelowADInplaceOrView guard{}; // TODO: Remove. + tracer::impl::NoTracerDispatchMode tracer_guard{}; + + check_size_nonnegative(sizes_); + + TORCH_CHECK_VALUE( + !deleter_ || !ctx_, + "The deleter and context arguments are mutually exclusive."); + + if (device_ == std::nullopt) { + device_ = globalContext().getDeviceFromPtr(data_, opts_.device().type()); + } + + if (opts_.device().has_index()) { + // clang-format off + TORCH_CHECK_VALUE( + opts_.device() == *device_, + "Specified device ", opts_.device(), " does not match device of data ", *device_); + // clang-format on + } + + std::size_t size_bytes = computeStorageSize(); + + DataPtr data_ptr{}; + if (deleter_) { + data_ptr = makeDataPtrFromDeleter(); + } else { + data_ptr = makeDataPtrFromContext(); + } + + TORCH_CHECK(!resizeable_ || allocator_ != nullptr, "Must specify an allocator with allocator() if you want to use resizeable_storage()"); + Storage storage{Storage::use_byte_size_t{}, size_bytes, std::move(data_ptr), /*allocator=*/allocator_, /*resizable=*/resizeable_}; + + Tensor tensor = detail::make_tensor( + std::move(storage), opts_.computeDispatchKey(), opts_.dtype()); + + TensorImpl* tensor_impl = tensor.unsafeGetTensorImpl(); + if (strides_) { + tensor_impl->set_sizes_and_strides(sizes_, *strides_); + } else { + tensor_impl->set_sizes_contiguous(sizes_); + } + if (storage_offset_) { + tensor_impl->set_storage_offset(*storage_offset_); + } + + return tensor; + } + + std::size_t TensorMaker::computeStorageSize() const noexcept { + std::size_t itemsize = opts_.dtype().itemsize(); + + if (strides_) { + auto storage_size = detail::computeStorageNbytes(sizes_, *strides_, itemsize); + if (storage_offset_) { + storage_size += storage_offset_.value(); + } + return storage_size; + } + + std::size_t size = 1; + for (std::int64_t s : sizes_) { + size *= static_cast(s); + } + auto storage_size = size * itemsize; + if (storage_offset_) { + storage_size += storage_offset_.value(); + } + return storage_size; + } + + inline DataPtr TensorMaker::makeDataPtrFromDeleter() noexcept { + return InefficientStdFunctionContext::makeDataPtr(data_, std::move(deleter_), *device_); + } + + inline DataPtr TensorMaker::makeDataPtrFromContext() noexcept { + return DataPtr{data_, ctx_.release(), ctx_.get_deleter(), *device_}; + } + + IntArrayRef TensorMaker::makeTempSizes() const noexcept { + static std::int64_t zeros[5] = {0, 0, 0, 0, 0}; + if (opts_.has_memory_format()) { + MemoryFormat format = *opts_.memory_format_opt(); + if (format == MemoryFormat::ChannelsLast) { + return IntArrayRef(zeros, 4); + } + if (format == MemoryFormat::ChannelsLast3d) { + return IntArrayRef(zeros, 5); + } + } + return IntArrayRef(zeros, 1); + } + +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Functions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Functions.h new file mode 100644 index 0000000000000000000000000000000000000000..55fa67c5bddb2f4abc730396c3affe4d75479753 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Functions.h @@ -0,0 +1,143 @@ +#pragma once + +// ${generated_comment} + +#ifdef TORCH_ASSERT_NO_OPERATORS +#error This change adds a dependency on native_functions.yaml, \ + meaning the file will need to be re-compiled every time an operator \ + is changed or added. Consider if your change would be better placed in \ + another file, or if a more specific header might achieve the same goal. \ + See NOTE: [Tensor vs. TensorBase] +#endif + +#if defined(AT_PER_OPERATOR_HEADERS) && defined(TORCH_ASSERT_ONLY_METHOD_OPERATORS) +#error This change adds a dependency on all pytorch operators, meaning the \ + file will need to be re-compiled every time an operator is changed or added. \ + Consider including a specific operator from and \ + see NOTE [TORCH_ASSERT_ONLY_METHOD_OPERATORS]. +#endif + +// NOTE: [TORCH_ASSERT_ONLY_METHOD_OPERATORS] +// +// In ATen, certain generated headers files include the definitions of +// every single operator in PyTorch. Unfortunately this means every +// time an operator signature is updated or changed in +// native_functions.yaml, you (and every other PyTorch developer) need +// to recompile every source file that includes any of these headers. +// +// To break up these header dependencies, and improve incremental +// build times for all PyTorch developers. These headers are split +// into per-operator headers in the `ATen/ops` folder. This limits +// incremental builds to only changes to methods of `Tensor`, or files +// that use the specific operator being changed. With `at::sum` as an +// example, you should include +// +// // instead of ATen/Functions.h +// // instead of ATen/NativeFunctions.h +// // instead of ATen/Operators.h +// // instead of ATen/CPUFunctions.h +// +// However, even if you're careful to use this in your own code. +// `Functions.h` might be included indirectly through another header +// without you realising. To avoid this, you can add +// +// #define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// +// to the top of your source file. This way any time the non-specific +// headers are included, the compiler will error out. +// +// Also, be aware that `ops` are not available in all build +// configurations (namely fb-internal) so you must guard these +// includes with `#ifdef AT_PER_OPERATOR_HEADERS`. e.g. +// +// #ifndef AT_PER_OPERATOR_HEADERS +// #include +// #else +// #include +// #endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +${Functions_includes} + +namespace at { + +${Functions_declarations} + +// Special C++ only overloads for std()-like functions (See gh-40287) +// These are needed because int -> bool conversion takes precedence over int -> IntArrayRef +// So, for example std(0) would select the std(unbiased=False) overload +TORCH_API inline Tensor var(const Tensor& self, int dim) { + return at::var(self, IntArrayRef{dim}); +} +TORCH_API inline std::tuple var_mean(const Tensor& self, int dim) { + return at::var_mean(self, IntArrayRef{dim}); +} +TORCH_API inline Tensor std(const Tensor& self, int dim) { + return at::std(self, IntArrayRef{dim}); +} +TORCH_API inline std::tuple std_mean(const Tensor& self, int dim) { + return at::std_mean(self, IntArrayRef{dim}); +} + +inline int64_t numel(const Tensor& tensor) { + return tensor.numel(); +} + +inline int64_t size(const Tensor& tensor, int64_t dim) { + return tensor.size(dim); +} + +inline int64_t stride(const Tensor& tensor, int64_t dim) { + return tensor.stride(dim); +} + +inline bool is_complex(const Tensor& tensor) { + return tensor.is_complex(); +} + +inline bool is_floating_point(const Tensor& tensor) { + return tensor.is_floating_point(); +} + +inline bool is_signed(const Tensor& tensor) { + return tensor.is_signed(); +} + +inline bool is_inference(const Tensor& tensor) { + return tensor.is_inference(); +} + +inline bool _is_zerotensor(const Tensor& tensor) { + return tensor._is_zerotensor(); +} + +inline bool is_conj(const Tensor& tensor) { + return tensor.is_conj(); +} + +inline Tensor conj(const Tensor& tensor) { + return tensor.conj(); +} + +inline bool is_neg(const Tensor& tensor) { + return tensor.is_neg(); +} + +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/LazyIr.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/LazyIr.h new file mode 100644 index 0000000000000000000000000000000000000000..6f3867cbd91d2f6331908372de5f1434107f664d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/LazyIr.h @@ -0,0 +1,19 @@ +#pragma once + +// This file contains autogenerated LazyTensor IR nodes +${lazy_ir_sysinc} +${lazy_ir_inc} + +${namespace_prologue} +using at::operator<<; + +// kNullValue is used to contribute a static hash value any time +// a node has an Optional input that is nullopt. It is important +// to differentiate between HASH(std::nullopt, something) and HASH(something, std::nullopt), +// and using kNullValue in the hash function in the order of arguments +// serves this purpose. +static const torch::lazy::Value kNullValue = torch::lazy::Value(); + +${ir_declarations} + +${namespace_epilogue} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/LazyNonNativeIr.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/LazyNonNativeIr.h new file mode 100644 index 0000000000000000000000000000000000000000..df0f621c9620d3075a23a1af2da621d79cdb712f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/LazyNonNativeIr.h @@ -0,0 +1,11 @@ +#pragma once + +${lazy_non_native_ir_inc} + +// This file contains autogenerated LazyTensor Non Native IR nodes + +${namespace_prologue} + +${non_native_ir_nodes} + +${namespace_epilogue} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/MethodOperators.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/MethodOperators.h new file mode 100644 index 0000000000000000000000000000000000000000..b6fe7ba41de0850908d3de589363a58cd97cf0ce --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/MethodOperators.h @@ -0,0 +1,24 @@ +#pragma once + +// ${generated_comment} + +#ifdef TORCH_ASSERT_NO_OPERATORS +#error This change adds a dependency on native_functions.yaml, \ + meaning the file will need to be re-compiled every time an operator \ + is changed or added. Consider if your change would be better placed in \ + another file, or if a more specific header might achieve the same goal. \ + See NOTE: [Tensor vs. TensorBase] +#endif + +// Forward declarations of any types needed in the operator signatures. +// We can't directly include these classes because it will cause circular include dependencies. +// This file is included by TensorBody.h, which defines the Tensor class. +#include + +${MethodOperators_includes} + +namespace at { +namespace _ops { +${MethodOperators_declarations} +} // namespace _ops +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeFunction.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeFunction.h new file mode 100644 index 0000000000000000000000000000000000000000..323849f0dbc73d1340594ffcc5ba692975290a76 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeFunction.h @@ -0,0 +1,17 @@ +#pragma once + +// ${generated_comment} + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +${extra_includes} + +${native_function_declarations} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeFunctions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeFunctions.h new file mode 100644 index 0000000000000000000000000000000000000000..d99b9afa9a9874328512b40a3e07478d48539c93 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeFunctions.h @@ -0,0 +1,33 @@ +#pragma once + +// ${generated_comment} + +#ifdef TORCH_ASSERT_NO_OPERATORS +#error This change adds a dependency on native_functions.yaml, \ + meaning the file will need to be re-compiled every time an operator \ + is changed or added. Consider if your change would be better placed in \ + another file, or if a more specific header might achieve the same goal. \ + See NOTE: [Tensor vs. TensorBase] +#endif + +#if defined(AT_PER_OPERATOR_HEADERS) && defined(TORCH_ASSERT_ONLY_METHOD_OPERATORS) +#error This change adds a dependency on all pytorch operators, meaning the \ + file will need to be re-compiled every time an operator is changed or added. \ + Consider including a specific operator from \ + and see NOTE [TORCH_ASSERT_ONLY_METHOD_OPERATORS]. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +${NativeFunctions_includes} + +${NativeFunctions_declarations} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeMetaFunction.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeMetaFunction.h new file mode 100644 index 0000000000000000000000000000000000000000..daf2bdf65bb47fe7609930137a9aece8f75f6839 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeMetaFunction.h @@ -0,0 +1,23 @@ +#pragma once + +// ${generated_comment} + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace at { +namespace meta { + +${meta_function_declarations} + +} // namespace native +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeMetaFunctions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeMetaFunctions.h new file mode 100644 index 0000000000000000000000000000000000000000..ed628e1656dcb541d3bfe07e3df179d0bcbbf3e1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/NativeMetaFunctions.h @@ -0,0 +1,19 @@ +#pragma once + +// ${generated_comment} + +#include +#include +#include +#include + +${NativeMetaFunctions_includes} + +namespace at { + +namespace meta { + +${NativeMetaFunctions_declarations} + +} // namespace meta +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operator.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operator.h new file mode 100644 index 0000000000000000000000000000000000000000..821ae3b76529c53dfc96db299a7ecac02657ea3c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operator.h @@ -0,0 +1,18 @@ +#pragma once + +// ${generated_comment} + +#include +#include + +// Forward declarations of any types needed in the operator signatures. +// We can't directly include these classes because it will cause circular include dependencies. +// This file is included by TensorBody.h, which defines the Tensor class. +#include + +namespace at { +namespace _ops { + +${declarations} + +}} // namespace at::_ops diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operators.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operators.cpp new file mode 100644 index 0000000000000000000000000000000000000000..9eaff50501a2f3487566eedbfe4cfc33b26c3594 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operators.cpp @@ -0,0 +1,19 @@ +#include +#include + +// ${generated_comment} +// NOTE See [Sharded File] comment in VariableType + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +${operator_headers} +#endif + +${static_dispatch_extra_headers} + +namespace at { namespace _ops { + +${definitions} + +}} // namespace at::_ops diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operators.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operators.h new file mode 100644 index 0000000000000000000000000000000000000000..c4ff5dc101c6764563301310036d48a24bc3c6cd --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/Operators.h @@ -0,0 +1,74 @@ +#pragma once + +// ${generated_comment} + +#ifdef TORCH_ASSERT_NO_OPERATORS +#error This change adds a dependency on native_functions.yaml, \ + meaning the file will need to be re-compiled every time an operator \ + is changed or added. Consider if your change would be better placed in \ + another file, or if a more specific header might achieve the same goal. \ + See NOTE: [Tensor vs. TensorBase] +#endif + +#if defined(AT_PER_OPERATOR_HEADERS) && defined(TORCH_ASSERT_ONLY_METHOD_OPERATORS) +#error This change adds a dependency on all pytorch operators, meaning the \ + file will need to be re-compiled every time an operator is changed or added. \ + Consider including a specific operator from \ + and see NOTE [TORCH_ASSERT_ONLY_METHOD_OPERATORS]. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +${Operators_includes} + +// Extension writers: do you write wrapper functions? Are you frustrated with +// resolving overloads of operators? Are you frustrated with dealing with +// pointer-to-methods and resolving overloads of pointer-to-methods?? Look no +// further, this is the utility for you. +// +// Given an operator schema: aten::op.overload(... +// +// Use ATEN_FN2(op, overload) to get a *function* version of the operator +// that is guaranteed to not be overloaded. This means that you can safely +// decltype(&ATEN_FN2(op, overload)) it. NB: the 2 means this macro takes 2 args. +// +// Given an operator schema without an overload name: aten::op(... +// +// Use ATEN_FN(op) to get an unambiguous *function* version of the operator. +// +// There is some interesting behavior for out= operations. +// ATEN_FN2(sin, out) gives a function that is *faithful* to the schema; +// that is, the order of arguments is exactly what it looks like in the schema. + +#define ATEN_FN2(op_name, overload) at::_ops::op_name##_##overload::call +#define ATEN_FN(op_name) at::_ops::op_name::call + +// Separately, ATEN_OP(op) and ATEN_OP2(op, overload) define a class containing compile-time +// metadata about a given aten operator. +// Notable data on the class includes: +// - ATEN_OP2(add, Tensor)::name // returns the string name: "add" +// - ATEN_OP2(add, Tensor)::overload_name // returns the string overload name: "Tensor" +// - ATEN_OP2(add, Tensor)::schema // returns the C++ schema type: at::Tensor (const at::Tensor &, const at::Tensor &, const at::Scalar &) +// - ATEN_OP2(add, Tensor)::schema_str // returns the string jit type: "add.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor" + +#define ATEN_OP2(op_name, overload) at::_ops::op_name##_##overload +#define ATEN_OP(op_name) at::_ops::op_name + +// WARNING: Please do not call any of the ops in the _ops namespace directly. +// Use the ATEN_FN macros. We do not guarantee stability of the naming +// scheme for the functions in at::_ops + +// See Note [The ATen Operators API] for details of the at::_ops namespace + +namespace at { +namespace _ops { +${Operators_declarations} +} // namespace _ops +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RedispatchFunctions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RedispatchFunctions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..800ae1bc4cc0411ba4b673daec15328fa14aae8e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RedispatchFunctions.cpp @@ -0,0 +1,15 @@ +// ${generated_comment} + +#include +#include + +#include +#include + +namespace at { + +namespace redispatch { + ${function_redispatch_definitions} +} // namespace redispatch + +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RedispatchFunctions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RedispatchFunctions.h new file mode 100644 index 0000000000000000000000000000000000000000..379ad8d5d426d3ad4e965c97085369b567379deb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RedispatchFunctions.h @@ -0,0 +1,32 @@ +#pragma once + +// ${generated_comment} + +#ifdef TORCH_ASSERT_ONLY_METHOD_OPERATORS +#error This change adds a dependency on all pytorch operators, meaning the \ + file will need to be re-compiled every time an operator is changed or added. \ + Consider using the at::_ops::{name}::redispatch() interface by including \ + the specific operator from +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace at { + +namespace redispatch { + ${function_redispatch_definitions} +} // namespace redispatch + +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterBackendSelect.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterBackendSelect.cpp new file mode 100644 index 0000000000000000000000000000000000000000..250fada8eb1befefe83f1ab0a241e44ede50268b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterBackendSelect.cpp @@ -0,0 +1,29 @@ +// We register ops with a higher priority dispatch key (BackendSelect) than the usual backend-specific keys (e.g. CPU) +// which makes calls to the factory functions dispatch to here. +// We then 'manually' compute a lower-priority to re-dispatch to (e.g. CPU) to get to the eventually correct backend. +// ${generated_comment} + +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +#include +#include +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else + +${ops_headers} +#endif + +namespace at { + +namespace { + +${backend_select_method_definitions} + +TORCH_LIBRARY_IMPL(aten, BackendSelect, m) { + ${backend_select_function_registrations}; +} + +} // namespace +} // at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterCodegenUnboxedKernels.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterCodegenUnboxedKernels.cpp new file mode 100644 index 0000000000000000000000000000000000000000..52adaeec74da5905fbc1ffbfaccd7454577892b9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterCodegenUnboxedKernels.cpp @@ -0,0 +1,41 @@ +#include +#include +#include + +#include + +// ${generated_comment} + +// NOTE [Sharded File]: This file is generated in a sharded fashion to speed up +// incremental rebuilds. See the comment at the top of +// templates/VariableType.cpp for an analogous, in-depth discussion. +// +// Generated by tools/jit/gen_unboxing.py. This file registers all ATen ops into JIT op registry instead of c10 +// dispatcher. JIT op registry only takes boxed kernels, so we are calling unboxing functions in UnboxingFunctions.h +// to cast arguments into C++ types (instead of IValue) and delegate to unboxed kernels. + +namespace torch { namespace jit { + +using autograd::Variable; +using autograd::variable_list; +using at::Scalar; +using at::ScalarType; +using at::Tensor; +using at::TensorOptions; +using at::DeviceGuard; + +using ::c10::fmap; +using ::c10::filter; + +namespace { + +RegisterOperators reg({ + + // Generated operators + ${unboxed_ops} +}); + +} // anon namespace + + +}} // namespace torch::jit diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterDispatchDefinitions.ini b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterDispatchDefinitions.ini new file mode 100644 index 0000000000000000000000000000000000000000..6e8c5002563870e7a0709630257b09e43beda799 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterDispatchDefinitions.ini @@ -0,0 +1,24 @@ +${ns_prologue} + +// NB: TORCH_LIBRARY_IMPL must be in an anonymous namespace to avoid +// ambiguity with conflicting identifiers that may have been defined in +// at namespace already. +namespace { + +${dispatch_helpers} + +${dispatch_anonymous_definitions} + +${static_init_dispatch_registrations} + +} // anonymous namespace + +${deferred_dispatch_registrations} + +namespace ${dispatch_namespace} { + +${dispatch_namespaced_definitions} + +} // namespace ${dispatch_namespace} + +${ns_epilogue} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterDispatchKey.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterDispatchKey.cpp new file mode 100644 index 0000000000000000000000000000000000000000..812458b996fcffddccc42c8931a3c1e2921cc8c9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterDispatchKey.cpp @@ -0,0 +1,55 @@ +// required for old g++ to compile PRId64 macros, see +// https://github.com/pytorch/pytorch/issues/3571 +// for context +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif + +// an external backend might generate file within its code tree +// and check all the source files within the tree with clang-format. +// so, disable it since the backend might have a different config. +// clang-format off + +// NOTE: This condition is true for all PyTorch internal libraries, it +// just excludes external projects such as torch_xla which +// re-use some of the PyTorch codegen machinery. +#if defined(CAFFE2_BUILD_MAIN_LIB) || \ + defined(TORCH_CUDA_BUILD_MAIN_LIB) || \ + defined(TORCH_HIP_BUILD_MAIN_LIB) || \ + defined(TORCH_XPU_BUILD_MAIN_LIB) || \ + defined(TORCH_CUDA_CU_BUILD_MAIN_LIB) || \ + defined(TORCH_CUDA_CPP_BUILD_MAIN_LIB) +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +#endif + +// ${generated_comment} + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +$extra_cuda_headers +$external_backend_headers +$dispatch_headers +$ops_headers + +// See template file RegisterDispatchDefinitions.ini +$dispatch_definitions diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterFunctionalization.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterFunctionalization.cpp new file mode 100644 index 0000000000000000000000000000000000000000..c6fd0f74228cf928505f814ae34e537e47fdd988 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterFunctionalization.cpp @@ -0,0 +1,110 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include +#include +#include +#include +#include +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#include +#else +// needed for the meta tensor calls to get stride info in functionalization +#include +// needed for special handling of copy_(). +// See Note [functionalizating copy_() and not preserving strides] +#include +#include + +$ops_headers +#endif + +namespace at { +namespace functionalization { + +// This keyset is used by functionalization when it calls into meta kernels +// to accurately propagate stride metadata. +// Exclude any modes: the purpose of calling into meta kernels is only as an implementation +// detail to perform shape inference, and we don't want any modal keys to run. +// Specifically, we want to prevent functionalization and Python modes from running. +constexpr auto exclude_keys_for_meta_dispatch = + c10::functorch_transforms_ks | + c10::DispatchKeySet({ + c10::DispatchKey::FuncTorchDynamicLayerBackMode, + c10::DispatchKey::FuncTorchDynamicLayerFrontMode, + c10::DispatchKey::Python, + c10::DispatchKey::PreDispatch, + + }); + +// Helper around at::has_internal_overlap. +// The ATen util is used in hot-path eager mode: it's always fast, +// but might return TOO_HARD sometimes. +// During functionalization, we're ok taking a bit longer +// to detect memory overlap. +inline bool has_internal_overlap_helper(const at::Tensor t) { + auto has_overlap = at::has_internal_overlap(t); + if (has_overlap == at::MemOverlap::Yes) return true; + if (has_overlap == at::MemOverlap::No) return false; + return false; +} + + +inline Tensor to_meta(const Tensor& t) { + if (!t.defined()) return t; + return at::native::empty_strided_meta_symint(t.sym_sizes(), t.sym_strides(), +/*dtype=*/t.scalar_type(), /*layout=*/t.layout(), +/*device=*/c10::Device(kMeta), /*pin_memory=*/std::nullopt); +} + +inline std::optional to_meta(const std::optional& t) { + if (t.has_value()) { + return to_meta(*t); + } + return std::nullopt; +} + +inline std::vector to_meta(at::ITensorListRef t_list) { + std::vector outputs; + outputs.reserve(t_list.size()); + for (const auto& tensor : t_list) { + outputs.push_back(to_meta(tensor)); + } + return outputs; +} + +inline c10::List to_meta(const c10::List& t_list) { + c10::List outputs; + outputs.reserve(t_list.size()); + for (const auto i : c10::irange(t_list.size())) { + outputs.push_back(to_meta(t_list[i])); + } + return outputs; +} + +inline c10::List<::std::optional> to_meta(const c10::List<::std::optional>& t_list) { + c10::List<::std::optional> outputs; + outputs.reserve(t_list.size()); + for (const auto i : c10::irange(t_list.size())) { + outputs.push_back(to_meta(t_list[i])); + } + return outputs; +} + + +${func_definitions} + +} // namespace functionalization + +namespace { + +TORCH_LIBRARY_IMPL(aten, Functionalize, m) { + ${func_registrations}; +} + +} // namespace + +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterSchema.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterSchema.cpp new file mode 100644 index 0000000000000000000000000000000000000000..72bc8ed613c3626e9faeebe290832dc868d341f9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegisterSchema.cpp @@ -0,0 +1,13 @@ +// ${generated_comment} +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +#include + +namespace at { +TORCH_LIBRARY(aten, m) { + ${aten_schema_registrations}; + // Distributed Ops + // Implementations located in torch/csrc/jit/runtime/register_distributed_ops.cpp + m.def("get_gradients(int context_id) -> Dict(Tensor, Tensor)"); +} +${schema_registrations} +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegistrationDeclarations.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegistrationDeclarations.h new file mode 100644 index 0000000000000000000000000000000000000000..f645f271585b28724829d7ac2672fab582f18dcf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/RegistrationDeclarations.h @@ -0,0 +1,4 @@ +// This file contains all native_functions that can be registered to +// and the schema string that they should be registered with + +${registration_declarations} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/TensorBody.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/TensorBody.h new file mode 100644 index 0000000000000000000000000000000000000000..61b1ede9d22ea3d23f96789becee6ddb53c4b4cc --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/TensorBody.h @@ -0,0 +1,753 @@ +#pragma once + +#ifdef TORCH_ASSERT_NO_OPERATORS +#error This change adds a dependency on native_functions.yaml, \ + meaning the file will need to be re-compiled every time an operator \ + is changed or added. Consider if your change would be better placed in \ + another file, or if a more specific header might achieve the same goal. \ + See NOTE: [Tensor vs. TensorBase] +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include + +namespace c10{ +template class List; +template class IListRef; +} +namespace at { +struct Generator; +struct Type; +class DeprecatedTypeProperties; +class Tensor; +} // namespace at +namespace at { +namespace indexing { +struct TensorIndex; +} // namespace indexing +} // namespace at + +namespace torch { namespace autograd { + +struct Node; + +}} // namespace torch::autograd + +namespace at { + +class OptionalTensorRef; +class TensorRef; +class Tensor; +using TensorList = ArrayRef; +using ITensorList = c10::IListRef; + +using Stream = c10::Stream; + +// Tensor is a "generic" object holding a pointer to the underlying TensorImpl object, which +// has an embedded reference count. In this way, Tensor is similar to boost::intrusive_ptr. +// +// For example: +// +// void func(Tensor a) { +// Tensor b = a; +// ... +// } +// +// In this example, when we say Tensor b = a, we are creating a new object that points to the +// same underlying TensorImpl, and bumps its reference count. When b goes out of scope, the +// destructor decrements the reference count by calling release() on the TensorImpl it points to. +// The existing constructors, operator overloads, etc. take care to implement the correct semantics. +// +// Note that Tensor can also be NULL, i.e. it is not associated with any underlying TensorImpl, and +// special care must be taken to handle this. +class TORCH_API Tensor: public TensorBase { + protected: + // Create a Tensor with a +0 reference count. Special care must be + // taken to avoid decrementing this reference count at destruction + // time. Intended to support MaybeOwnedTraits. + explicit Tensor(unsafe_borrow_t, const TensorBase& rhs): TensorBase(unsafe_borrow_t{}, rhs) {} + friend MaybeOwnedTraits; + friend OptionalTensorRef; + friend TensorRef; + + public: + Tensor() = default; + // This constructor should not be used by end users and is an implementation + // detail invoked by autogenerated code. + explicit Tensor( + c10::intrusive_ptr tensor_impl) + : TensorBase(std::move(tensor_impl)) {} + Tensor(const Tensor &tensor) = default; + Tensor(Tensor &&tensor) = default; + + // Implicitly move-constructible from TensorBase, but must be explicit to increase refcount + explicit Tensor(const TensorBase &base): TensorBase(base) {} + /*implicit*/ Tensor(TensorBase &&base): TensorBase(std::move(base)) {} + + // Creates a new wrapper from TensorImpl. Intentionally a free method because + // it should be used with care. Checks necessary invariants + static Tensor wrap_tensor_impl( + c10::intrusive_ptr tensor_impl) { + return TensorBase::wrap_tensor_impl(std::move(tensor_impl)); + } + + Tensor contiguous(MemoryFormat memory_format=MemoryFormat::Contiguous) const { + return TensorBase::contiguous(memory_format); + } + + Tensor conj() const { + if (!this->is_complex()) { + return *this; + } + + switch (this->layout()) { + case at::kSparse: + case at::kSparseCsr: + case at::kSparseCsc: + case at::kSparseBsr: + case at::kSparseBsc: + return this->conj_physical(); + default: + return this->_conj(); + } + } + + // Aliased by Dimname overloads, so need explicit using + using TensorBase::size; + using TensorBase::sym_size; + using TensorBase::stride; + + /// Should be used if *this can reasonably be expected to be contiguous and + /// performance is important. + /// Compared to contiguous, it saves a reference count + /// increment/decrement if *this is already contiguous, at the cost + /// in all cases of an extra pointer of stack usage, an extra branch + /// to access, and an extra branch at destruction time. + c10::MaybeOwned expect_contiguous(MemoryFormat memory_format=MemoryFormat::Contiguous) const &; + + // Use .contiguous() instead. Trying to borrow from a prvalue Tensor + // will only lead to trouble and dangling references. + c10::MaybeOwned expect_contiguous(MemoryFormat memory_format=MemoryFormat::Contiguous) && = delete; + + // The following overloads are very intruiging. Consider the following + // program: + // + // x[1] = 3; + // + // We would expect that the first entry of x is written to 3. But how can we + // actually achieve this? x[1] evaluates to a tensor... + // + // The answer is, using a ref-qualifier. x[1] is an rvalue, which cannot be + // (profitably) assigned to in the traditional sense, so we overload + // assignment to mean, "Actually, copy 3 into the tensor data." This is done + // with an rvalue-reference ref-qualified overload (the methods with && at the + // end of their type.) + // + // There's one more fly in the ointment: We also want + // + // Tensor x = y; + // + // to work, and we want it NOT to copy. So we need a traditional operator= + // overload. But we MUST specify a mutable lvalue ref-qualifier, to + // disambiguate the traditional overload from the rvalue-reference + // ref-qualified overload. Otherwise, it will be ambiguous, because + // a non ref-qualified method is eligible for all situations. + + // Unfortunately, we have to write these constructors out manually + // to work around an MSVC bug: + // error C2580: 'at::Tensor &at::Tensor::operator =(const at::Tensor &) &': + // multiple versions of a defaulted special member functions are not allowed + // Tensor& operator=(const Tensor&) & = default; + // Tensor& operator=(Tensor&&) & = default; + + // Also MSVC will wrongly issue the following warning with the aforementioned fix + // warning C4522: 'at::Tensor': multiple assignment operators specified + // Let's just skip the warning. + // + // TODO: temporarily disabled + + Tensor& operator=(const TensorBase& x) & noexcept { + impl_ = x.getIntrusivePtr(); + return *this; + } + Tensor& operator=(TensorBase&& x) & noexcept { + impl_ = x.unsafeReleaseIntrusivePtr(); + return *this; + } + + Tensor& operator=(const Tensor &x) & noexcept { + return operator=(static_cast(x)); + } + Tensor& operator=(Tensor &&x) & noexcept { + return operator=(static_cast(x)); + } + + Tensor& operator=(const Scalar &v) && { + return fill_(v); + } + Tensor& operator=(const Tensor &rhs) && { + return copy_(rhs); + } + Tensor& operator=(Tensor&& rhs) && { + return copy_(rhs); + } + + C10_DEPRECATED_MESSAGE("Tensor.type() is deprecated. Instead use Tensor.options(), which in many cases (e.g. in a constructor) is a drop-in replacement. If you were using data from type(), that is now available from Tensor itself, so instead of tensor.type().scalar_type(), use tensor.scalar_type() instead and instead of tensor.type().backend() use tensor.device().") + DeprecatedTypeProperties & type() const { + return globalDeprecatedTypePropertiesRegistry().getDeprecatedTypeProperties( + dispatchKeyToBackend(legacyExtractDispatchKey(key_set())), + scalar_type()); + } + + Tensor toType(ScalarType t) const { + return to(options().dtype(t), /*non_blocking*/ false, /*copy*/ false); + } + + // TODO: Deprecate me + Tensor toBackend(Backend b) const { + return to(options().device(backendToDeviceType(b)).layout(layout_from_backend(b)), /*non_blocking*/ false, /*copy*/ false); + } + + C10_DEPRECATED_MESSAGE("Tensor.is_variable() is deprecated; everything is a variable now. (If you want to assert that variable has been appropriately handled already, use at::impl::variable_excluded_from_dispatch())") + bool is_variable() const noexcept { + return !at::impl::variable_excluded_from_dispatch(); + } + + template + C10_DEPRECATED_MESSAGE("Tensor.data() is deprecated. Please use Tensor.data_ptr() instead.") + T * data() const { + return data_ptr(); + } + + template + T item() const; + + template class PtrTraits = DefaultPtrTraits, typename index_t = int64_t> + C10_DEPRECATED_MESSAGE("packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead") + GenericPackedTensorAccessor packed_accessor() const & { + return generic_packed_accessor(); + } + template class PtrTraits = DefaultPtrTraits, typename index_t = int64_t> + C10_DEPRECATED_MESSAGE("packed_accessor is deprecated, use packed_accessor32 or packed_accessor64 instead") + GenericPackedTensorAccessor packed_accessor() && = delete; + + Tensor operator~() const { + return bitwise_not(); + } + Tensor operator-() const { + return neg(); + } + Tensor& operator+=(const Tensor & other) { + return add_(other); + } + Tensor& operator+=(const Scalar & other) { + return add_(other); + } + Tensor& operator-=(const Tensor & other) { + return sub_(other); + } + Tensor& operator-=(const Scalar & other) { + return sub_(other); + } + Tensor& operator*=(const Tensor & other) { + return mul_(other); + } + Tensor& operator*=(const Scalar & other) { + return mul_(other); + } + Tensor& operator/=(const Tensor & other) { + return div_(other); + } + Tensor& operator/=(const Scalar & other) { + return div_(other); + } + Tensor& operator&=(const Tensor & other) { + return bitwise_and_(other); + } + Tensor& operator|=(const Tensor & other) { + return bitwise_or_(other); + } + Tensor& operator^=(const Tensor & other) { + return bitwise_xor_(other); + } + Tensor operator[](const Scalar & index) const { + if (!index.isIntegral(false)) { + TORCH_CHECK_INDEX(false, "Can only index tensors with integral scalars"); + } + return this->operator[](index.toLong()); + } + Tensor operator[](const Tensor & index) const { + // These properties are checked in the Scalar constructor, but we already + // check them here to provide more useful diagnostics for the user. + if (!index.defined()) { + TORCH_CHECK_INDEX(false, "Can only index with tensors that are defined"); + } + if (index.dim() != 0) { + TORCH_CHECK_INDEX(false, + "Can only index with tensors that are scalars (zero-dim)"); + } + // The Scalar(Tensor) constructor is explicit, so we need to call it. + return this->operator[](index.item()); + } + Tensor operator[](int64_t index) const { + return select(0, index); + } + + Tensor index(ArrayRef indices) const; + Tensor index(std::initializer_list indices) const; + + Tensor & index_put_(ArrayRef indices, Tensor const & rhs); + Tensor & index_put_(ArrayRef indices, const Scalar& v); + Tensor & index_put_(std::initializer_list indices, Tensor const & rhs); + Tensor & index_put_(std::initializer_list indices, const Scalar& v); + + Tensor cpu() const { + return to(options().device(c10::DeviceType::CPU), /*non_blocking*/ false, /*copy*/ false); + } + + // TODO: The Python version also accepts arguments + Tensor cuda() const { + return to(options().device(c10::DeviceType::CUDA), /*non_blocking*/ false, /*copy*/ false); + } + + Tensor hip() const { + return to(options().device(c10::DeviceType::HIP), /*non_blocking*/ false, /*copy*/ false); + } + + Tensor ve() const { + return to(options().device(c10::DeviceType::VE), /*non_blocking*/ false, /*copy*/ false); + } + + Tensor vulkan() const { + return to(options().device(c10::DeviceType::Vulkan), /*non_blocking*/ false, /*copy*/ false); + } + + Tensor metal() const { + return to(options().device(c10::DeviceType::Metal), /*non_blocking*/ false, /*copy*/ false); + } + + Tensor meta() const { + return to(options().device(c10::DeviceType::Meta), /*non_blocking*/ false, /*copy*/ false); + } + + // ~~~~~ Autograd API ~~~~~ + + /// \fn bool is_leaf() const; + /// + /// All Tensors that have `requires_grad()` which is ``false`` will be leaf Tensors by convention. + /// + /// For Tensors that have `requires_grad()` which is ``true``, they will be leaf Tensors if they were + /// created by the user. This means that they are not the result of an operation and so + /// `grad_fn()` is `nullptr`. + /// + /// Only leaf Tensors will have their `grad()` populated during a call to `backward()`. + /// To get `grad()` populated for non-leaf Tensors, you can use `retain_grad()`. + /// + /// Example: + /// @code + /// auto a = torch::rand(10, torch::requires_grad()); + /// std::cout << a.is_leaf() << std::endl; // prints `true` + /// + /// auto b = torch::rand(10, torch::requires_grad()).to(torch::kCUDA); + /// std::cout << b.is_leaf() << std::endl; // prints `false` + /// // b was created by the operation that cast a cpu Tensor into a cuda Tensor + /// + /// auto c = torch::rand(10, torch::requires_grad()) + 2; + /// std::cout << c.is_leaf() << std::endl; // prints `false` + /// // c was created by the addition operation + /// + /// auto d = torch::rand(10).cuda(); + /// std::cout << d.is_leaf() << std::endl; // prints `true` + /// // d does not require gradients and so has no operation creating it (that is tracked by the autograd engine) + /// + /// auto e = torch::rand(10).cuda().requires_grad_(); + /// std::cout << e.is_leaf() << std::endl; // prints `true` + /// // e requires gradients and has no operations creating it + /// + /// auto f = torch::rand(10, torch::device(torch::kCUDA).requires_grad(true)); + /// std::cout << f.is_leaf() << std::endl; // prints `true` + /// // f requires grad, has no operation creating it + /// @endcode + + /// \fn void backward(const Tensor & gradient={}, std::optional retain_graph=std::nullopt, bool create_graph=false, std::optional inputs=std::nullopt) const; + /// + /// Computes the gradient of current tensor with respect to graph leaves. + /// + /// The graph is differentiated using the chain rule. If the tensor is + /// non-scalar (i.e. its data has more than one element) and requires + /// gradient, the function additionally requires specifying ``gradient``. + /// It should be a tensor of matching type and location, that contains + /// the gradient of the differentiated function w.r.t. this Tensor. + /// + /// This function accumulates gradients in the leaves - you might need to + /// zero them before calling it. + /// + /// \param gradient Gradient w.r.t. the + /// tensor. If it is a tensor, it will be automatically converted + /// to a Tensor that does not require grad unless ``create_graph`` is True. + /// None values can be specified for scalar Tensors or ones that + /// don't require grad. If a None value would be acceptable then + /// this argument is optional. + /// \param retain_graph If ``false``, the graph used to compute + /// the grads will be freed. Note that in nearly all cases setting + /// this option to True is not needed and often can be worked around + /// in a much more efficient way. Defaults to the value of + /// ``create_graph``. + /// \param create_graph If ``true``, graph of the derivative will + /// be constructed, allowing to compute higher order derivative + /// products. Defaults to ``false``. + /// \param inputs Inputs w.r.t. which the gradient will be accumulated into + /// ``at::Tensor::grad``. All other Tensors will be ignored. If not + /// provided, the gradient is accumulated into all the leaf Tensors + /// that were used to compute the current tensor. + /// When inputs are provided and a given input is not a leaf, + /// the current implementation will call its grad_fn (even though it is not strictly needed to get this gradients). + /// It is an implementation detail on which the user should not rely. + /// See https://github.com/pytorch/pytorch/pull/60521#issuecomment-867061780 for more details. + void backward(const Tensor & gradient={}, std::optional retain_graph=std::nullopt, bool create_graph=false, std::optional inputs=std::nullopt) const { + // NB: Adding this wrapper to _backward here because we'd like our + // 'backwards' api to accept the 'inputs' argument optionally. Since code gen + // currently does not support optional of TensorList our approach is to replace + // backward in native_functions.yaml with _backward and call it here instead. + if (inputs.has_value()) { + TORCH_CHECK(inputs.value().size() > 0, "'inputs' argument to backward cannot be empty") + this->_backward(inputs.value(), gradient, retain_graph, create_graph); + } else { + this->_backward({}, gradient, retain_graph, create_graph); + } + } + + /// \fn Tensor detach() const; + /// + /// Returns a new Tensor, detached from the current graph. + /// The result will never require gradient. + + /// \fn Tensor & detach_() const; + /// + /// Detaches the Tensor from the graph that created it, making it a leaf. + /// Views cannot be detached in-place. + + /// \fn void retain_grad() const; + /// + /// Enables this Tensor to have their :attr:`grad` populated during + /// :func:`backward`. This is a no-op for leaf tensors. + + /// \fn bool retains_grad() const; + /// + /// Is ``true`` if this Tensor is non-leaf and its :attr:`grad` is enabled to be + /// populated during :func:`backward`, ``false`` otherwise. + + const Tensor& set_requires_grad(bool requires_grad) const { + TensorBase::set_requires_grad(requires_grad); + return *this; + } + + /// Return a mutable reference to the gradient. This is conventionally + /// used as `t.grad() = x` to set a gradient to a completely new tensor. + /// Note that this function work with a non-const Tensor and is not + /// thread safe. + Tensor& mutable_grad() const { + return impl_->mutable_grad(); + } + + /// This function returns an undefined tensor by default and returns a defined tensor + /// the first time a call to `backward()` computes gradients for this Tensor. + /// The attribute will then contain the gradients computed and future calls + /// to `backward()` will accumulate (add) gradients into it. + const Tensor& grad() const { + const Tensor& maybe_grad = impl_->grad(); + if (!is_leaf() && !retains_grad() && !maybe_grad.defined()) { + TORCH_WARN( + "The .grad attribute of a Tensor that is not a leaf Tensor is being accessed. Its .grad " + "attribute won't be populated during autograd.backward(). If you indeed want the .grad " + "field to be populated for a non-leaf Tensor, use .retain_grad() on the non-leaf Tensor. " + "If you access the non-leaf Tensor by mistake, make sure you access the leaf Tensor " + "instead. See github.com/pytorch/pytorch/pull/30531 for more informations."); + } + return maybe_grad; + } + + // The Forward AD API functions below are low level and are not to be used by end + // users who should use the API provided in torch/csrc/autograd.h + + /// This function returns the forward gradient for this Tensor at the given level. + const Tensor& _fw_grad(uint64_t level) const { + return impl_->_fw_grad(level, *this); + } + + /// This function can be used to set the value of the forward grad. + /// Note that the given new_grad might not be used directly if it has different + /// metadata (size/stride/storage offset) compared to this Tensor. In that case, + /// new_grad content will be copied into a new Tensor + void _set_fw_grad(const TensorBase& new_grad, uint64_t level, bool is_inplace_op) const { + impl_->_set_fw_grad(new_grad, *this, level, is_inplace_op); + } + + + // STOP. Thinking of adding a method here, which only makes use + // of other ATen methods? Define it in native_functions.yaml. + + //example + //Tensor * add(Tensor & b); + ${tensor_method_declarations} + + // Special C++ only overloads for std()-like functions (See gh-40287) + // These are needed because int -> bool conversion takes precedence over int -> IntArrayRef + // So, for example std(0) would select the std(unbiased=False) overload + + Tensor var(int dim) const { + return var(IntArrayRef{dim}); + } + + Tensor std(int dim) const { + return std(IntArrayRef{dim}); + } + + // We changed .dtype() to return a TypeMeta in #12766. Ideally, we want the + // at::kDouble and its friends to be TypeMeta's, but that hasn't happened yet. + // Before that change, we make this method to maintain BC for C++ usage like + // `x.to(y.dtype)`. + // TODO: remove following two after at::kDouble and its friends are TypeMeta's. + inline Tensor to(caffe2::TypeMeta type_meta, bool non_blocking=false, bool copy=false) const { + return this->to(/*scalar_type=*/typeMetaToScalarType(type_meta), non_blocking, copy); + } + inline Tensor to(Device device, caffe2::TypeMeta type_meta, bool non_blocking=false, bool copy=false) const { + return this->to(device, /*scalar_type=*/typeMetaToScalarType(type_meta), non_blocking, copy); + } + + template + decltype(auto) m(F func, Args&&... params) const { + return func(*this, std::forward(params)...); + } + + /// NOTE: This is similar to the legacy `.data()` function on `Variable`, and is intended + /// to be used from functions that need to access the `Variable`'s equivalent `Tensor` + /// (i.e. `Tensor` that shares the same storage and tensor metadata with the `Variable`). + /// + /// One notable difference with the legacy `.data()` function is that changes to the + /// returned `Tensor`'s tensor metadata (e.g. sizes / strides / storage / storage_offset) + /// will not update the original `Variable`, due to the fact that this function + /// shallow-copies the `Variable`'s underlying TensorImpl. + at::Tensor tensor_data() const { + return TensorBase::tensor_data(); + } + + /// NOTE: `var.variable_data()` in C++ has the same semantics as `tensor.data` + /// in Python, which create a new `Variable` that shares the same storage and + /// tensor metadata with the original `Variable`, but with a completely new + /// autograd history. + /// + /// NOTE: If we change the tensor metadata (e.g. sizes / strides / + /// storage / storage_offset) of a variable created from `var.variable_data()`, those + /// changes will not update the original variable `var`. In `.variable_data()`, we set + /// `allow_tensor_metadata_change_` to false to make such changes explicitly illegal, + /// in order to prevent users from changing metadata of `var.variable_data()` + /// and expecting the original variable `var` to also be updated. + at::Tensor variable_data() const { + return TensorBase::variable_data(); + } + + // Hooks + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + template + using hook_return_void_t = std::enable_if_t>::value, unsigned>; + template + using hook_return_var_t = std::enable_if_t, Tensor>::value, unsigned>; + + /// Registers a backward hook. + /// + /// The hook will be called every time a gradient with respect to the Tensor is computed. + /// The hook should have one of the following signature: + /// ``` + /// hook(Tensor grad) -> Tensor + /// ``` + /// ``` + /// hook(Tensor grad) -> void + /// ``` + /// The hook should not modify its argument, but it can optionally return a new gradient + /// which will be used in place of `grad`. + /// + /// This function returns the index of the hook in the list which can be used to remove hook. + /// + /// Example: + /// @code + /// auto v = torch::tensor({0., 0., 0.}, torch::requires_grad()); + /// auto h = v.register_hook([](torch::Tensor grad){ return grad * 2; }); // double the gradient + /// v.backward(torch::tensor({1., 2., 3.})); + /// // This prints: + /// // ``` + /// // 2 + /// // 4 + /// // 6 + /// // [ CPUFloatType{3} ] + /// // ``` + /// std::cout << v.grad() << std::endl; + /// v.remove_hook(h); // removes the hook + /// @endcode + template + hook_return_void_t register_hook(T&& hook) const; + template + hook_return_var_t register_hook(T&& hook) const; + + // Variable methods + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Tensor data() const { + return TensorBase::data(); + } + + void _backward(TensorList inputs, const std::optional& gradient, std::optional keep_graph, bool create_graph) const; + + const Tensor& requires_grad_(bool _requires_grad=true) const { + TensorBase::requires_grad_(_requires_grad); + return *this; + } +}; + +namespace detail { +// Helper creator for Tensor class which doesn't requires the users to pass +// in an intrusive_ptr instead it just converts the argument passed to +// requested intrusive_ptr type. +template +Tensor make_tensor(Args&&... args) { + return Tensor(c10::make_intrusive(std::forward(args)...)); +} + +} // namespace detail + +} // namespace at + + +namespace at { +${tensor_method_definitions} +} // namespace at + + +namespace c10 { +template <> +struct MaybeOwnedTraits { + using owned_type = at::Tensor; + using borrow_type = at::Tensor; + + static borrow_type createBorrow(const owned_type& from) { + // NOTE: this can be implemented without the special + // unsafe_borrow_t Tensor constructor as + // + // return borrow_type(c10::intrusive_ptr::reclaim(from.unsafeGetTensorImpl())); + // + // but that hurts inlining due to the nullptr check in the + // Tensor(c10::intrusive_ptr<...>) constructor. We already know + // that from.impl_ isn't null because from is a valid Tensor, so + // we needn't do the check again. (using __builtin_assume can + // avoid this, but wouldn't be portable to MSVC.) + return borrow_type(borrow_type::unsafe_borrow_t{}, from); + } + + static void assignBorrow(borrow_type& lhs, const borrow_type& rhs) { + lhs.unsafeReleaseTensorImpl(); + // See above note: this can be implemented with public API + // similarly to createBorrow(), but that would hurt inlining. + lhs = borrow_type(borrow_type::unsafe_borrow_t{}, rhs); + } + + static void destroyBorrow(borrow_type& toDestroy) { + toDestroy.unsafeReleaseTensorImpl(); // "leak" it, but it was already +0. + } + + static const owned_type& referenceFromBorrow(const borrow_type& borrow) { + return borrow; + } + + static const owned_type* pointerFromBorrow(const borrow_type& borrow) { + return &borrow; + } + + static bool debugBorrowIsValid(const borrow_type& /*borrow*/) { + return true; + } +}; + +template <> +struct ExclusivelyOwnedTraits { + using repr_type = at::Tensor; + using pointer_type = at::Tensor*; + using const_pointer_type = const at::Tensor*; + + static repr_type nullRepr() { + return at::Tensor(); + } + + template + static repr_type createInPlace(Args&&... args) { + return at::Tensor(std::forward(args)...); + } + + static repr_type moveToRepr(at::Tensor&& x) { + return std::move(x); + } + + static void destroyOwned(at::Tensor& x) { + return ExclusivelyOwnedTraits::destroyOwned(x); + } + + static at::Tensor take(at::Tensor& x) { + return std::move(x); + } + + static pointer_type getImpl(repr_type& x) { + return &x; + } + + static const_pointer_type getImpl(const repr_type& x) { + return &x; + } +}; +} // namespace c10 + +namespace at { + +inline c10::MaybeOwned borrow_from_optional_tensor( + const std::optional& opt) { + return opt.has_value() + ? c10::MaybeOwned::borrowed(*opt) + : c10::MaybeOwned::owned(std::in_place); +} + +inline c10::MaybeOwned Tensor::expect_contiguous(MemoryFormat memory_format) const & { + if (is_contiguous(memory_format)) { + return c10::MaybeOwned::borrowed(*this); + } else { + return c10::MaybeOwned::owned(__dispatch_contiguous(memory_format)); + } +} +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/TensorMethods.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/TensorMethods.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ad043f123a76904610f02c614fb27589c1d63121 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/TensorMethods.cpp @@ -0,0 +1,61 @@ +#include +#include + +#include + +namespace at { + +namespace { + +// Verifies the requested type is the same as the Tensor's type. +void check_type(const TensorBase& tensor, ScalarType type, std::string_view type_name) { + TORCH_CHECK( + tensor.scalar_type() == type + || (isQIntType(tensor.scalar_type()) + && toUnderlying(tensor.scalar_type()) == type), + "expected scalar type ", type_name, " but found ", tensor.scalar_type()); +} + +} // namespace + +#define DEFINE_CAST(T, name) \ + template <> \ + TORCH_API const T* TensorBase::const_data_ptr() const { \ + check_type(*this, ScalarType::name, #name); \ + return this->unsafeGetTensorImpl()->data_ptr_impl(); \ + } \ + \ + template <> \ + TORCH_API const T* TensorBase::const_data_ptr() const { \ + check_type(*this, ScalarType::name, #name); \ + return this->unsafeGetTensorImpl()->data_ptr_impl>(); \ + } \ + \ + template <> \ + TORCH_API T* TensorBase::mutable_data_ptr() const { \ + check_type(*this, ScalarType::name, #name); \ + return this->unsafeGetTensorImpl()->mutable_data_ptr_impl(); \ + } \ + \ + template <> \ + TORCH_API T* TensorBase::data_ptr() const { \ + return mutable_data_ptr(); \ + } \ + + AT_FORALL_SCALAR_TYPES_WITH_COMPLEX(DEFINE_CAST) + AT_FORALL_QINT_TYPES(DEFINE_CAST) + DEFINE_CAST(uint16_t, UInt16) + DEFINE_CAST(uint32_t, UInt32) + DEFINE_CAST(uint64_t, UInt64) + #undef DEFINE_CAST + + #define DEFINE_ITEM(T, name) \ + template <> \ + TORCH_API T Tensor::item() const { \ + return item().to##name(); \ + } + + AT_FORALL_SCALAR_TYPES_WITH_COMPLEX(DEFINE_ITEM) + #undef DEFINE_ITEM + + } //namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCPU.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCPU.cpp new file mode 100644 index 0000000000000000000000000000000000000000..46e9f4eca41156ec4ea6a962f8d643e292165cd8 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCPU.cpp @@ -0,0 +1,19 @@ +#define TORCH_ASSERT_NO_OPERATORS + +#include +#include +#include + +namespace at { + +// NB: this is explicitly copied here (via codegen) rather than +// included via NativeFunctions.h to avoid recompiling this file when +// NativeFunctions.h changes +namespace meta { +${meta_declaration} +} + +namespace native { +${native_declaration} +${native_definitions} +}} // namespace at::native diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCPUKernel.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCPUKernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..6db4c0280bda7e46a6dd92ec09f3aab60f278c44 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCPUKernel.cpp @@ -0,0 +1,14 @@ +#define TORCH_ASSERT_NO_OPERATORS + +#include +#include +#include +#include +#include +#include +#include + +namespace at { +namespace native { +${native_definitions} +}} // namespace at::native diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCUDA.cu b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCUDA.cu new file mode 100644 index 0000000000000000000000000000000000000000..90cbe9d4add4ca094b5fa7661df6bc798556767d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UfuncCUDA.cu @@ -0,0 +1,21 @@ +#define TORCH_ASSERT_NO_OPERATORS + +#include +#include +#include +#include +${cuda_headers} + +namespace at { + +// NB: this is explicitly copied here (via codegen) rather than +// included via NativeFunctions.h to avoid recompiling this file when +// NativeFunctions.h changes +namespace meta { +${meta_declaration} +} + +namespace native { +${native_declaration} +${native_definitions} +}} // namespace at::native diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UnboxingFunctions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UnboxingFunctions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..b564cac031754439e5b3e2dd0a2a2a694c1af504 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UnboxingFunctions.cpp @@ -0,0 +1,35 @@ +#include +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +namespace at { +namespace unboxing { + +using ::c10::fmap; +using ::c10::filter; +using torch::jit::peek; +using torch::jit::drop; +using torch::jit::pack; +using torch::jit::pop; + +// Generated function declaration +${definitions} + +} // namespace unboxing +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UnboxingFunctions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UnboxingFunctions.h new file mode 100644 index 0000000000000000000000000000000000000000..698fb032046497eb87882fa57fc71de1fd49537b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/UnboxingFunctions.h @@ -0,0 +1,32 @@ +// ${generated_comment} + +// Generated by tools/jit/gen_unboxing.py. This file declares code generated boxed C++ functions for operators, +// base off of native_functions.yaml (or similar yaml file with the same syntax). The definition of such a boxed +// function will pop out IValues from the stack then convert them into the correct C++ types based on given schema. This +// unboxing logic is an alternative to template-based metaprogramming unboxing. + +#pragma once + +#include +namespace at { +namespace unboxing { +namespace { + +template +std::array as_array(const c10::List& list) { + std::array res; + AT_ASSERT(list.size() == N); + std::vector vec; + for (c10::IValue elem : list) { + vec.push_back(elem.to()); + } + std::copy(vec.begin(), vec.end(), res.begin()); + return res; +} +} // namespace +using Stack = std::vector; +// Generated function declaration +${declarations} + +} // namespace unboxing +} // namespace at diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/aten_interned_strings.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/aten_interned_strings.h new file mode 100644 index 0000000000000000000000000000000000000000..8af363bc783fe29a3b2c82444c8a06108a38f59f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/aten_interned_strings.h @@ -0,0 +1,22 @@ +#pragma once + +// ${generated_comment} + +#if defined(TORCH_ASSERT_NO_OPERATORS) || defined(TORCH_ASSERT_ONLY_METHOD_OPERATORS) +#error This change adds a dependency on native_functions.yaml, \ + meaning the file will need to be re-compiled every time an operator \ + is changed or added. Consider if including for \ + the c10::Symbol class would be sufficient, or if your change would be \ + better placed in another file. +#endif + +// ATen symbols correspond exactly to operators defined in ATen. Every +// symbol here corresponds exactly to an ATen operation defined in +// native_functions.yaml; attributes are in one-to-one correspondence +// with their ATen name. + +#define FORALL_ATEN_BASE_SYMBOLS(_) \ +${aten_symbols} + +#define FORALL_ATTR_BASE_SYMBOLS(_) \ +${attr_symbols} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/enum_tag.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/enum_tag.h new file mode 100644 index 0000000000000000000000000000000000000000..39c8c0049e4b9e833481dfdfc896fd889a01ca5a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/ATen/templates/enum_tag.h @@ -0,0 +1,10 @@ +#pragma once + +// ${generated_comment} + +namespace at { + // Enum of valid tags obtained from the entries in tags.yaml + enum class Tag { + ${enum_of_valid_tags} + }; +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/BUILD.bazel b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/BUILD.bazel new file mode 100644 index 0000000000000000000000000000000000000000..f4127325e0958e6884843e37efff282ab7af484d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/BUILD.bazel @@ -0,0 +1,4 @@ +load("//:tools/bazel.bzl", "rules") +load(":build.bzl", "define_targets") + +define_targets(rules = rules) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/README.md b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0200bb9d56d4148d8befc61133552989eb09b947 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/README.md @@ -0,0 +1,3 @@ +If you add a file to this directory, you **MUST** update +`torch/CMakeLists.txt` and add the file as a dependency to +the `add_custom_command` call. diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..701ebeea1ab8223915bc6e72fc351deb758f433d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/context.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/context.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a6daa4989de94350a0dd5f1c4b4631bf8c39481 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/context.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_annotated_fn_args.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_annotated_fn_args.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..19ef71fb75630788483e16b6da7da97347b2bd73 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_annotated_fn_args.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_autograd.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_autograd.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81277c69db35b262718c2c4aae764ec5f496fef3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_autograd.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_autograd_functions.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_autograd_functions.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..27245c4202b7b0680283805364a6ef4130fcee48 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_autograd_functions.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_inplace_or_view_type.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_inplace_or_view_type.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b8d870e3fe40acde9d6e0732eecd800166bab715 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_inplace_or_view_type.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_python_functions.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_python_functions.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b0552bcbee8f291e738aa0a6019481b40a2ad47f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_python_functions.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_trace_type.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_trace_type.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7df55aadcd8b418f2abf5dcf2501045961de8956 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_trace_type.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_variable_factories.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_variable_factories.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c55c9392ccac05b3573d7220b1d301d6b6345516 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_variable_factories.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_variable_type.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_variable_type.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7a15e19ad9c6bf0d5c235b4496c80ba404b1f659 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_variable_type.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_view_funcs.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_view_funcs.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0d1c2dfbe2ec3bf4d55e8d0c327d77e19de7ae5b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/gen_view_funcs.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/load_derivatives.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/load_derivatives.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..23ccf130b21e6bd705d7bce64a4bee50efda8f11 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/__pycache__/load_derivatives.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/build.bzl b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/build.bzl new file mode 100644 index 0000000000000000000000000000000000000000..08071722d7cbb8af370d679de92c2624b1b205ad --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/build.bzl @@ -0,0 +1,14 @@ +def define_targets(rules): + rules.py_library( + name = "autograd", + srcs = rules.glob(["*.py"]), + data = rules.glob([ + "*.yaml", + "templates/*", + ]), + visibility = ["//:__subpackages__"], + deps = [ + rules.requirement("PyYAML"), + "//torchgen", + ], + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/context.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/context.py new file mode 100644 index 0000000000000000000000000000000000000000..1978a8ec7958bcaace429e1ce0adf5c9f9a0c934 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/context.py @@ -0,0 +1,31 @@ +import functools +from typing import Callable + +from torchgen.api.autograd import NativeFunctionWithDifferentiabilityInfo as NFWDI +from torchgen.context import native_function_manager +from torchgen.utils import T + + +# Like tools.api.context.with_native_function, but for +# NativeFunctionWithDifferentiabilityInfo. +def with_native_function_with_differentiability_info( + func: Callable[[NFWDI], T], +) -> Callable[[NFWDI], T]: + @functools.wraps(func) + def wrapper(f: NFWDI) -> T: + with native_function_manager(f.func): + return func(f) + + return wrapper + + +# Like the above but with an additional dispatch key string argument +def with_native_function_with_differentiability_info_and_key( + func: Callable[[NFWDI, str], T], +) -> Callable[[NFWDI, str], T]: + @functools.wraps(func) + def wrapper(f: NFWDI, key: str) -> T: + with native_function_manager(f.func): + return func(f, key) + + return wrapper diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/deprecated.yaml b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/deprecated.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e0998acd3fc869df696acbfda28b6bab8f4779d4 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/deprecated.yaml @@ -0,0 +1,134 @@ +# Deprecated function signatures. These are exposed in Python, but not included +# in the error message suggestions. + +- name: add(Tensor self, Scalar alpha, Tensor other) -> Tensor + aten: add(self, other, alpha) + +- name: add_(Tensor(a!) self, Scalar alpha, Tensor other) -> Tensor(a!) + aten: add_(self, other, alpha) + +- name: add(Tensor self, Scalar alpha, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + aten: add_out(out, self, other, alpha) + +- name: addbmm(Scalar beta, Tensor self, Scalar alpha, Tensor batch1, Tensor batch2) -> Tensor + aten: addbmm(self, batch1, batch2, beta, alpha) + +- name: addbmm_(Scalar beta, Tensor(a!) self, Scalar alpha, Tensor batch1, Tensor batch2) -> Tensor(a!) + aten: addbmm_(self, batch1, batch2, beta, alpha) + +- name: addbmm(Scalar beta, Tensor self, Scalar alpha, Tensor batch1, Tensor batch2, *, Tensor(a!) out) -> Tensor(a!) + aten: addbmm_out(out, self, batch1, batch2, beta, alpha) + +- name: addbmm(Scalar beta, Tensor self, Tensor batch1, Tensor batch2) -> Tensor + aten: addbmm(self, batch1, batch2, beta, 1) + +- name: addbmm_(Scalar beta, Tensor(a!) self, Tensor batch1, Tensor batch2) -> Tensor(a!) + aten: addbmm_(self, batch1, batch2, beta, 1) + +- name: addbmm(Scalar beta, Tensor self, Tensor batch1, Tensor batch2, *, Tensor(a!) out) -> Tensor(a!) + aten: addbmm_out(out, self, batch1, batch2, beta, 1) + +- name: addcdiv(Tensor self, Scalar value, Tensor tensor1, Tensor tensor2) -> Tensor + aten: addcdiv(self, tensor1, tensor2, value) + +- name: addcdiv_(Tensor(a!) self, Scalar value, Tensor tensor1, Tensor tensor2) -> Tensor(a!) + aten: addcdiv_(self, tensor1, tensor2, value) + +- name: addcdiv(Tensor self, Scalar value, Tensor tensor1, Tensor tensor2, *, Tensor(a!) out) -> Tensor(a!) + aten: addcdiv_out(out, self, tensor1, tensor2, value) + +- name: addcmul(Tensor self, Scalar value, Tensor tensor1, Tensor tensor2) -> Tensor + aten: addcmul(self, tensor1, tensor2, value) + +- name: addcmul_(Tensor(a!) self, Scalar value, Tensor tensor1, Tensor tensor2) -> Tensor(a!) + aten: addcmul_(self, tensor1, tensor2, value) + +- name: addcmul(Tensor self, Scalar value, Tensor tensor1, Tensor tensor2, *, Tensor(a!) out) -> Tensor(a!) + aten: addcmul_out(out, self, tensor1, tensor2, value) + +- name: addmm(Scalar beta, Tensor self, Scalar alpha, Tensor mat1, Tensor mat2) -> Tensor + aten: addmm(self, mat1, mat2, beta, alpha) + +- name: addmm_(Scalar beta, Tensor(a!) self, Scalar alpha, Tensor mat1, Tensor mat2) -> Tensor(a!) + aten: addmm_(self, mat1, mat2, beta, alpha) + +- name: addmm(Scalar beta, Tensor self, Scalar alpha, Tensor mat1, Tensor mat2, *, Tensor(a!) out) -> Tensor(a!) + aten: addmm_out(out, self, mat1, mat2, beta, alpha) + +- name: addmm(Scalar beta, Tensor self, Tensor mat1, Tensor mat2) -> Tensor + aten: addmm(self, mat1, mat2, beta, 1) + +- name: addmm_(Scalar beta, Tensor(a!) self, Tensor mat1, Tensor mat2) -> Tensor(a!) + aten: addmm_(self, mat1, mat2, beta, 1) + +- name: addmm(Scalar beta, Tensor self, Tensor mat1, Tensor mat2, *, Tensor(a!) out) -> Tensor(a!) + aten: addmm_out(out, self, mat1, mat2, beta, 1) + +- name: sspaddmm(Scalar beta, Tensor self, Scalar alpha, Tensor mat1, Tensor mat2) -> Tensor + aten: sspaddmm(self, mat1, mat2, beta, alpha) + +- name: sspaddmm(Scalar beta, Tensor self, Tensor mat1, Tensor mat2) -> Tensor + aten: sspaddmm(self, mat1, mat2, beta, 1) + +- name: addmv(Scalar beta, Tensor self, Scalar alpha, Tensor mat, Tensor vec) -> Tensor + aten: addmv(self, mat, vec, beta, alpha) + +- name: addmv_(Scalar beta, Tensor(a!) self, Scalar alpha, Tensor mat, Tensor vec) -> Tensor(a!) + aten: addmv_(self, mat, vec, beta, alpha) + +- name: addmv(Scalar beta, Tensor self, Scalar alpha, Tensor mat, Tensor vec, *, Tensor(a!) out) -> Tensor(a!) + aten: addmv_out(out, self, mat, vec, beta, alpha) + +- name: addmv(Scalar beta, Tensor self, Tensor mat, Tensor vec) -> Tensor + aten: addmv(self, mat, vec, beta, 1) + +- name: addmv_(Scalar beta, Tensor(a!) self, Tensor mat, Tensor vec) -> Tensor(a!) + aten: addmv_(self, mat, vec, beta, 1) + +- name: addmv(Scalar beta, Tensor self, Tensor mat, Tensor vec, *, Tensor(a!) out) -> Tensor(a!) + aten: addmv_out(out, self, mat, vec, beta, 1) + +- name: addr(Scalar beta, Tensor self, Scalar alpha, Tensor vec1, Tensor vec2) -> Tensor + aten: addr(self, vec1, vec2, beta, alpha) + +- name: addr_(Scalar beta, Tensor(a!) self, Scalar alpha, Tensor vec1, Tensor vec2) -> Tensor(a!) + aten: addr_(self, vec1, vec2, beta, alpha) + +- name: addr(Scalar beta, Tensor self, Scalar alpha, Tensor vec1, Tensor vec2, *, Tensor(a!) out) -> Tensor(a!) + aten: addr_out(out, self, vec1, vec2, beta, alpha) + +- name: addr(Scalar beta, Tensor self, Tensor vec1, Tensor vec2) -> Tensor + aten: addr(self, vec1, vec2, beta, 1) + +- name: addr_(Scalar beta, Tensor(a!) self, Tensor vec1, Tensor vec2) -> Tensor(a!) + aten: addr_(self, vec1, vec2, beta, 1) + +- name: addr(Scalar beta, Tensor self, Tensor vec1, Tensor vec2, *, Tensor(a!) out) -> Tensor(a!) + aten: addr_out(out, self, vec1, vec2, beta, 1) + +- name: baddbmm(Scalar beta, Tensor self, Scalar alpha, Tensor batch1, Tensor batch2) -> Tensor + aten: baddbmm(self, batch1, batch2, beta, alpha) + +- name: baddbmm_(Scalar beta, Tensor(a!) self, Scalar alpha, Tensor batch1, Tensor batch2) -> Tensor(a!) + aten: baddbmm_(self, batch1, batch2, beta, alpha) + +- name: baddbmm(Scalar beta, Tensor self, Scalar alpha, Tensor batch1, Tensor batch2, *, Tensor(a!) out) -> Tensor(a!) + aten: baddbmm_out(out, self, batch1, batch2, beta, alpha) + +- name: baddbmm(Scalar beta, Tensor self, Tensor batch1, Tensor batch2) -> Tensor + aten: baddbmm(self, batch1, batch2, beta, 1) + +- name: baddbmm_(Scalar beta, Tensor(a!) self, Tensor batch1, Tensor batch2) -> Tensor(a!) + aten: baddbmm_(self, batch1, batch2, beta, 1) + +- name: baddbmm(Scalar beta, Tensor self, Tensor batch1, Tensor batch2, *, Tensor(a!) out) -> Tensor(a!) + aten: baddbmm_out(out, self, batch1, batch2, beta, 1) + +- name: sub(Tensor self, Scalar alpha, Tensor other) -> Tensor + aten: sub(self, other, alpha) + +- name: sub_(Tensor(a!) self, Scalar alpha, Tensor other) -> Tensor(a!) + aten: sub_(self, other, alpha) + +- name: sub(Tensor self, Scalar alpha, Tensor other, *, Tensor(a!) out) -> Tensor(a!) + aten: sub_out(out, self, other, alpha) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/derivatives.yaml b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/derivatives.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d7df5cf842a90028bc27300d6ce89acc10b37fc6 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/derivatives.yaml @@ -0,0 +1,3228 @@ +# Defines derivative formulas and Python signatures of methods on Variable +# +# Note about possibly confusing nomenclature: An 'output gradient' is the +# gradient of an output of a forward function. Output gradients are used as +# the inputs to backward functions. `grads` is a vector of output gradients, +# and `grad == grads[0]`, in all the derivative formulas in this file. +# An 'input gradient' is the gradient of an input to a forward function. +# Input gradients are the outputs of backward functions, corresponding to the +# input names included in the derivative formulas defined in this file. +# Also, every time we talk computing "gradient" we actually mean computing +# the vector jacobian product using the given 'output gradient' as the vector. +# +# Each entry consists of: +# - A 'name', which specifies the ATen name of the function you +# are defining derivatives for, and an argument specification. +# - An optional 'dispatch' entry which can be used to specify +# per-autograd dispatch key derivatives. If this entry is not +# specified, then the gradient entries will be taken as the +# default gradients (i.e. registered for every backward dispatch +# key). (see _test_autograd_multiple_dispatch for an example +# of how to register separate derivates for different dispatch keys). +# The list of allowed dispatch keys (in addition to 'Default' which +# represents the Autograd alias key) is torchgen/model.py:AUTOGRAD_KEYS. +# - One or more gradients entries, mapping differentiable input +# names to a formula specifying how to compute its gradient. +# Note that a single gradient entry can specify the gradient +# formula for multiple input names, by specifying a key +# "input1, input2" (see atan2 for an example). +# - An argument can be flagged as 'non_differentiable'. +# - Optional entry with key 'output_differentiability' and value a list of the +# same length as the number of outputs from the forward function. The list +# should contain only booleans, specifying whether each of the output Tensor +# is differentiable. +# If it is not specified for a function that returns multiple elements but +# uses `grad` instead of `grads[idx]`, then all but the first output will +# be marked as non-differentiable. +# If None of the output is differentiable, you can also add the function +# name to `gen_variable_type.py`'s `DONT_REQUIRE_DERIVATIVE` list. +# +# There are two cases for Tensor and TensorList arguments here: +# - If that argument is differentiable, in the sense that a gradient with respect +# to that argument could exist. You should either: +# - Specify the formula for that gradient +# - Specify not_implemented("function_name") as a formula to say that this is not +# implemented yet (but might be in the future and the user can request that on an issue) +# - If that argument is not differentiable, because it is not a floating point dtype or the +# function is not differentiable with respect to that argument for +# example. You should either: +# - Do not specify any formula for this argument +# - Specify explicitly that this argument is "non_differentiable". Note that in this case, +# we trust you that this argument will never have requires_grad=True and it will be silently +# ignored if it does. +# +# If a function has out-of-place and in-place variants, then the derivative +# definition for the in-place variant is optional. It will default to the +# definition for the out-of-place variant. Note that _out variants are never +# differentiable. +# +# Gradient expressions are standard C++ expressions operating on ATen +# variables. In a gradient expression, the following variables/functions +# are in scope: +# +# - 'grad', the gradient of the output (often spelled grad_output +# in Python) which we are going to left-multiply. +# +# When a function returns multiple *differentiable* outputs, +# you can refer to the gradients of each outputs using 'grads', +# e.g., 'grads[0]', 'grads[1]'. +# +# When a function returns multiple *differentiable* outputs that +# are named, you can refer to the gradients of each outputs using +# 'grad_{name}', e.g., 'grad_x', 'grad_y'. +# +# When a function returns *one* differentiable output (the +# first output) and some more nondifferentiable outputs, +# you MUST refer to the gradient of the differentiable output with +# 'grad' (this case is special-cased in our code generation). +# +# Note that the number of differentiable outputs can be modified by the +# 'output_differentiability' entry (see above). +# +# Across a differentiable function's derivatives set, it is not +# permitted to mix the use of "grad", "grads", and +# "grad_{name}". You must be consistent for that differentiable +# function. +# +# - Any of the input arguments, tensor or non-tensor, including +# argument names that only appear in Declarations.yaml, e.g. 'output'. +# +# - 'result', representing the result of evaluating the forward +# expression for ATen native function declarations. If the forward +# expression outputs a tuple, use 'resultX' instead to access the +# X-th entry +# +# - 'grad_input_mask', a std::array, specifies which input +# gradients are actually needed. For example, in the entry +# `input0, input1: foo(grad_input_mask)`, `grad_input_mask` is a size +# two array, where `grad_input_mask[0]` is true if `input0` requires +# grad, and `grad_input_mask[1]` is true if `input1` requires grad. +# +# (NB: if your function computes gradient for a list of tensors, +# the `grad_input_mask` will only have a single entry for the list +# specifying if either zero or at least one tensor from the list requires +# grad. If we want to support more fine-grained signalling, +# we'll need some alternate variable which is not a std::array) +# +# - 'retain_variables', a bool which is true if a user has specified +# that saved variables should be retained in case the backwards is +# run again later. This allows an optimization where we can +# destroy saved buffers if we know variables are not going to be retained, +# e.g., it is used by _cudnn_rnn +# +# - `wrap_opt_if`, is a 2-argument function that accepts a tensor +# variable and a boolean condition that dictates whether to save that +# variable in a graph. The result of this function is `std::optional`, +# and it is `::std::nullopt` when the condition evalutes to `false`, +# otherwise it is the variable wrapped in `std::optional`. +# For example, wrap_opt_if(var_0, grad_input_mask[1] || grad_input_mask[2]) +# would mean that `var_0` is saved as long as the second (grad_input_mask[1]) +# or the third (grad_input_mask[2]) argument requires gradients. +# Another interpretation of this expression would read as `var_0` is needed +# in the backward computation of the second or the third argument. +# NOTE: the usage of `var_i.requires_grad()` in the conditional expression +# is not supported, use `grad_input_mask[i]` instead. +# NOTE: `wrap_opt_if` could be used to prevent saving redundant variables +# with multi-output backward formulas. +# See https://github.com/pytorch/pytorch/issues/97575 for more details +# on the issue. +# +# If you need a complex expression, e.g., with local variables, +# write a _backward function in torch/csrc/autograd/FunctionsManual.cpp +# and invoke it from here. By the way, go read +# https://github.com/zdevito/ATen/issues/163; this describes an +# important hazard that occurs when porting backwards from Python to C++ +# +# Double backwards gradient expressions can be somewhat confusing; +# the most important thing to remember is: (1) you need to define a +# derivative formula for every input, including inputs named things +# like 'grad_output', and (2) the gradient to multiply with is always +# called 'grad' (even though it really is a grad-grad). +# +# You can also add forward derivative definition by defining a formula for +# a returned value (in general "result" if the name is not specified). This +# formula works the same way as the backward one and advanced implementations +# should also be placed in the FunctionsManual file. +# This formula should compute a single Jacobian vector product using the (primal) +# value of the argument "foo_p", its forward grad "foo_t" and the result of the +# function as "result". +# Note that the forward derivative can be automatically generated in two cases: +# - if your function is linear (NOT affine or multi-linear), then you can +# specify so by just using the string "auto_linear" for the formula. +# - if your function is applied element wise (and has a single input), you +# can specify so by just using the string "auto_element_wise" for the formula. +# +# Note that to avoid unpacking overhead, functions taking TensorList as inputs +# will always have their forward grad formula called. This function is responsible +# to check if any computation is needed and should return an undefined Tensor when +# there is nothing to do. You can check "cat_forward" for a full example. +# +# NB: There are a number of gradient definitions in here which are bogus +# (implemented using zeros_like). These gradients are (hopefully) not +# used by our frontend. You MUST check the frontend code; search for +# OpName.apply to see if it's still using a legacy Python style API. +# +# Note: Returning views. +# The following cases exist: +# - If a function returns no view, it can have arbitrary outputs. +# - If a function return at least one Tensor that is a differentiable view +# of one of its input: +# - If there is only one differentiable output, this Tensor is marked as a +# differentiable view. (alias or transpose for example) +# - If there are more than one differentiable output, by default all the views are +# marked as differentiable views and created with allow_rebase_history=false. +# Meaning that any inplace operation on it will raise an error. (unbind for example) +# +# Notes about undefined output gradients: +# All backward functions must support all combinations of undefined output +# gradient Tensors, where `grad[i].defined() == false`. Depending on the +# number of input and output grads your derivative formula uses, code +# generation may automatically add some level of undefined grad support, +# according to these three cases: +# +# * 1 input grad and 1 output grad: +# Complete undefined grad support is automatically added, so you +# shouldn't have to think about it, unless there is a bug in the code +# generation. +# +# * 1 input grad and multiple output grads: +# Undefined grad support is automatically added ONLY in the case where +# all output grads are undefined. You will have to add explicit support +# for cases where a subset of output grads is undefined. +# +# * multiple input grads: +# No automatic support, so you will need to add it. +# +# If your derivative formula uses more than one output grad, it is usually +# preferable to add undefined grad support in the backward function itself +# (if you're using one), rather than in the derivative formula in this file. +# +# Undefined Tensors are created with the default constructor `at::Tensor()`. +# It is an efficient way to represent a Tensor filled with zeros because +# the Tensor holds no sizing information and no Storage data is allocated. +# But consequentially, Tensor operations cannot be performed on them. +# Therefore, your backward function should treat an undefined output grad as +# a zero, and it needs to be a special case. +# +# If all output grads are undefined, then it should be correct for the +# backward function to return undefined input grads. Since we use the chain +# rule, output grads equal to zero should result in input grads equal to zero, +# unless there is some rare special case. +# +# If a subset of output grads is undefined, then it may be acceptable for +# the backward function to return undefined input grads--it depends on the +# specific function, so you'll have to determine that yourself. If returning +# an undefined Tensor is correct for a given input grad, it is also logically +# correct to return a defined grad full of zeros, but that would not be +# preferable since it would be less efficient. +# +# NB: The parameter names here MUST be consistent with the parameter names +# in native_functions.yaml +- name: abs(Tensor self) -> Tensor + self: grad * self.sgn() + result: handle_r_to_c(result.scalar_type(), self_t.conj() * self_p.sgn()) + +- name: acos(Tensor self) -> Tensor + self: grad * -((-self * self + 1).rsqrt()).conj() + result: auto_element_wise + +- name: add.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), grad) + other: handle_r_to_c(other.scalar_type(), maybe_multiply(grad, alpha.conj())) + result: self_t + maybe_multiply(other_t, alpha) + +- name: add.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), grad) + result: self_t.clone() + +- name: addbmm(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + self: maybe_multiply(grad, beta.conj()) + batch1: maybe_multiply(grad.unsqueeze(0).expand_symint({ batch1.sym_size(0), batch1.sym_size(1), batch2.sym_size(2) }).bmm(batch2.transpose(1, 2).conj()), alpha.conj()) + batch2: maybe_multiply(batch1.transpose(1, 2).conj().bmm(grad.unsqueeze(0).expand_symint({ batch1.sym_size(0), batch1.sym_size(1), batch2.sym_size(2) })), alpha.conj()) + result: maybe_multiply(self_t, beta) + maybe_multiply(batch1_t.bmm(batch2_p).sum(0), alpha) + maybe_multiply(batch1_p.bmm(batch2_t).sum(0), alpha) + +- name: addcdiv(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), grad) + tensor1: handle_r_to_c(tensor1.scalar_type(), grad * (value / tensor2).conj()) + tensor2: handle_r_to_c(tensor2.scalar_type(), -grad * (value * tensor1 / (tensor2 * tensor2)).conj()) + result: self_t + maybe_multiply(tensor1_t / tensor2_p, value) - maybe_multiply(tensor2_t * (tensor1_p / tensor2_p) / tensor2_p, value) + +- name: addcmul(Tensor self, Tensor tensor1, Tensor tensor2, *, Scalar value=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), grad) + tensor1: handle_r_to_c(tensor1.scalar_type(), grad * (tensor2 * value).conj()) + tensor2: handle_r_to_c(tensor2.scalar_type(), grad * (tensor1 * value).conj()) + result: self_t + maybe_multiply(tensor1_t * tensor2_p, value) + maybe_multiply(tensor2_t * tensor1_p, value) + +- name: addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + self: maybe_multiply(grad, beta.conj()) + mat1: mm_mat1_backward(grad, mat2, mat1.sym_sizes(), mat1.sym_strides(), mat1.layout(), alpha) + mat2: mm_mat2_backward(grad, mat1, mat2.sym_sizes(), mat2.sym_strides(), mat2.layout(), alpha) + result: maybe_multiply(self_t, beta) + maybe_multiply(mat1_t.mm(mat2_p), alpha) + maybe_multiply(mat1_p.mm(mat2_t), alpha) + +- name: _sparse_addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + self: maybe_multiply(grad, beta) + mat1: mm_mat1_sparse_backward(grad, mat1, mat2, alpha) + mat2: mm_mat2_backward(grad, mat1, mat2.sym_sizes(), mat2.sym_strides(), mat2.layout(), alpha) + +- name: addmv(Tensor self, Tensor mat, Tensor vec, *, Scalar beta=1, Scalar alpha=1) -> Tensor + self: maybe_multiply(grad, beta.conj()) + mat: maybe_multiply(grad.ger(vec.conj()), alpha.conj()) + vec: maybe_multiply(mat.t().conj().mv(grad), alpha.conj()) + result: maybe_multiply(self_t, beta) + maybe_multiply(mat_t.mv(vec_p), alpha) + maybe_multiply(mat_p.mv(vec_t), alpha) + +- name: addr(Tensor self, Tensor vec1, Tensor vec2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + self: maybe_multiply(grad, beta.conj()) + vec1: maybe_multiply(grad.mv(vec2.conj()), alpha.conj()) + vec2: maybe_multiply(grad.t().mv(vec1.conj()), alpha.conj()) + result: maybe_multiply(self_t, beta) + maybe_multiply(vec1_t.outer(vec2_p), alpha) + maybe_multiply(vec1_p.outer(vec2_t), alpha) + +- name: affine_grid_generator(Tensor theta, SymInt[] size, bool align_corners) -> Tensor + theta: affine_grid_generator_backward_symint(grad, size, align_corners) + result: auto_linear + +- name: alias(Tensor(a) self) -> Tensor(a) + self: grad + result: self_t + +- name: angle(Tensor self) -> Tensor + self: angle_backward(grad, self) + result: handle_r_to_c(result.scalar_type(), angle_backward(self_t.conj(), self_p).conj()) + +# The four items below are necessary because TensorIterator doesn't work on +# Variables (codegen does not unwrap the input Tensor for all() and any() ). +- name: any(Tensor self) -> Tensor + output_differentiability: [False] + +- name: any.dim(Tensor self, int dim, bool keepdim=False) -> Tensor + output_differentiability: [False] + +- name: any.dims(Tensor self, int[]? dim=None, bool keepdim=False) -> Tensor + output_differentiability: [False] + +- name: _is_all_true(Tensor self) -> Tensor + self: non_differentiable + +- name: _is_any_true(Tensor self) -> Tensor + self: non_differentiable + +- name: all(Tensor self) -> Tensor + output_differentiability: [False] + +- name: all.dim(Tensor self, int dim, bool keepdim=False) -> Tensor + output_differentiability: [False] + +- name: all.dims(Tensor self, int[]? dim=None, bool keepdim=False) -> Tensor + output_differentiability: [False] + +- name: acosh(Tensor self) -> Tensor +# Save one rsqrt in the real case by using that for x real and positive sqrt(x*y) = sqrt(x)*sqrt(y) (not true in the complex case) + self: "self.is_complex() ? grad * ((self + 1).rsqrt() * (self - 1).rsqrt()).conj() : grad * (self * self - 1).rsqrt()" + result: auto_element_wise + +- name: acosh_(Tensor(a!) self) -> Tensor(a!) + self: not_implemented("inplace version of acosh") + +- name: asinh(Tensor self) -> Tensor + self: grad * (self.pow(2) + 1).rsqrt().conj() + result: auto_element_wise + +- name: asinh_(Tensor(a!) self) -> Tensor(a!) + self: not_implemented("inplace version of asinh") + +- name: atanh(Tensor self) -> Tensor + self: grad * 1 / (1 - self.pow(2)).conj() + result: auto_element_wise + +- name: atanh_(Tensor(a!) self) -> Tensor(a!) + self: not_implemented("inplace version of atanh") + +- name: as_strided(Tensor(a) self, SymInt[] size, SymInt[] stride, SymInt? storage_offset=None) -> Tensor(a) + self: as_strided_backward(grad, TensorGeometry(self), size, stride, storage_offset) + result: auto_linear + +- name: as_strided_(Tensor(a!) self, SymInt[] size, SymInt[] stride, SymInt? storage_offset=None) -> Tensor(a!) + self: as_strided_backward(grad, TensorGeometry(self), size, stride, storage_offset) + result: auto_linear + +- name: asin(Tensor self) -> Tensor + self: grad * (-self * self + 1).rsqrt().conj() + result: auto_element_wise + +- name: atan(Tensor self) -> Tensor + self: grad / (self * self + 1).conj() + result: auto_element_wise + +- name: atan2(Tensor self, Tensor other) -> Tensor + self, other: atan2_backward(grad, self, other, grad_input_mask) + result: (-self_p * other_t + other_p * self_t) / (self_p.pow(2) + other_p.pow(2)) + +- name: baddbmm(Tensor self, Tensor batch1, Tensor batch2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + self: maybe_multiply(grad, beta.conj()) + batch1: maybe_multiply(grad.bmm(batch2.transpose(1, 2).conj()), alpha.conj()) + batch2: maybe_multiply(batch1.transpose(1, 2).conj().bmm(grad), alpha.conj()) + result: maybe_multiply(self_t, beta) + maybe_multiply(batch1_t.bmm(batch2_p), alpha) + maybe_multiply(batch1_p.bmm(batch2_t), alpha) + +- name: bernoulli(Tensor self, *, Generator? generator=None) -> Tensor + self: zeros_like(grad) + result: auto_element_wise + +- name: bernoulli_.Tensor(Tensor(a!) self, Tensor p, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + p: zeros_like(p) + result: self_t.zero_() + +- name: bernoulli_.float(Tensor(a!) self, float p=0.5, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: bmm(Tensor self, Tensor mat2) -> Tensor + self: grad.bmm(mat2.transpose(1, 2).conj()) + mat2: self.transpose(1, 2).conj().bmm(grad) + result: self_t.bmm(mat2_p) + self_p.bmm(mat2_t) + +- name: matmul(Tensor self, Tensor other) -> Tensor + self, other: matmul_backward(grad, self, other, grad_input_mask) + +- name: cat(Tensor[] tensors, int dim=0) -> Tensor + tensors: cat_tensors_backward(grad, to_args_sizes_symint(tensors), to_args_scalartypes(tensors), dim) + result: cat_jvp(tensors, dim) + +- name: cauchy_(Tensor(a!) self, float median=0, float sigma=1, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: ceil(Tensor self) -> Tensor + self: zeros_like(grad) + result: auto_element_wise + +- name: cholesky(Tensor self, bool upper=False) -> Tensor + self: cholesky_backward(grad, upper, result) + +- name: chunk(Tensor(a -> *) self, int chunks, int dim=0) -> Tensor(a)[] + dispatch: + Default: + # the default case will use the CompositeImplicitAutograd + self: not_implemented("chunk") + AutogradNestedTensor: + self: chunk_backward_nested(grads, self, chunks, dim) + +- name: linalg_cholesky_ex(Tensor self, *, bool upper=False, bool check_errors=False) -> (Tensor L, Tensor info) + self: cholesky_backward(grad, upper, L) + L: cholesky_jvp(self_t, L, upper) + +- name: cholesky_solve(Tensor self, Tensor input2, bool upper=False) -> Tensor + self, input2: cholesky_solve_backward(grad, self, input2, result, upper, grad_input_mask) + result: cholesky_solve_jvp(result, input2_p, input2_t, self_t, upper) + +- name: cholesky_inverse(Tensor self, bool upper=False) -> Tensor + self: cholesky_inverse_backward(grad, self, upper, result) + result: cholesky_inverse_jvp(self_p, self_t, result, upper) + +# For clamp, gradient is not defined at the boundaries. But empirically it's helpful +# to be able to get gradient on min and max, so we return the subgradient 1 for these cases. +- name: clamp.Tensor(Tensor self, Tensor? min=None, Tensor? max=None) -> Tensor + self: clamp_backward(grad, self, min, max) + min, max: clamp_backward_min_max(grad, self, min, max, grad_input_mask) + result: clamp_jvp(self_p, self_t, min_p, min_t, max_p, max_t) + +- name: clamp(Tensor self, Scalar? min=None, Scalar? max=None) -> Tensor + self: clamp_backward(grad, self, min, max) + result: auto_element_wise + +- name: clamp_min(Tensor self, Scalar min) -> Tensor + self: where(self >= min, grad, at::scalar_tensor(0., grad.options())) + result: auto_element_wise + +- name: clamp_min.Tensor(Tensor self, Tensor min) -> Tensor + self: where(self >= min, grad, at::scalar_tensor(0., grad.options())) + min: where(self < min, grad, at::scalar_tensor(0., grad.options())) + result: where(self_p >= min_p, self_t, min_t) + +- name: clamp_max(Tensor self, Scalar max) -> Tensor + self: where(self <= max, grad, at::scalar_tensor(0., grad.options())) + result: auto_element_wise + +- name: clamp_max.Tensor(Tensor self, Tensor max) -> Tensor + self: where(self <= max, grad, at::scalar_tensor(0., grad.options())) + max: where(self > max, grad, at::scalar_tensor(0., grad.options())) + result: where(self_p <= max_p, self_t, max_t) + +- name: clone(Tensor self, *, MemoryFormat? memory_format=None) -> Tensor + self: grad + result: auto_linear + +- name: _lazy_clone(Tensor self) -> Tensor + self: grad + result: auto_linear + +- name: _to_copy(Tensor self, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, bool non_blocking=False, MemoryFormat? memory_format=None) -> Tensor + self: _to_copy_backward(grad, self.options()) + result: _to_copy(self_t, dtype, layout, device, pin_memory, non_blocking, memory_format) + # The condition is: if dtype is not nullopt, then isDifferentiableType(*dtype) + # (If dtype IS nullopt, we rely on the regular check that any input requires grad). + output_differentiability: ["!dtype || isDifferentiableType(*dtype)"] + +- name: _coalesce(Tensor self) -> Tensor + self: grad + +- name: complex(Tensor real, Tensor imag) -> Tensor + real: at::real(grad) + imag: at::imag(grad) + result: at::complex(real_t, imag_t) + +- name: polar(Tensor abs, Tensor angle) -> Tensor + abs, angle: polar_backward(grad, result) + result: at::complex(abs_t*angle_p.cos() - angle_t*abs_p*angle_p.sin(), abs_t*angle_p.sin() + angle_t*abs_p*angle_p.cos()) + +- name: _conj(Tensor(a) self) -> Tensor(a) + self: grad.conj() + result: self_t.conj() + +- name: _neg_view(Tensor(a) self) -> Tensor(a) + self: grad.neg() + result: self_t._neg_view() + +- name: _conj_physical(Tensor self) -> Tensor + self: grad.conj_physical() + result: self_t.conj_physical() + +- name: conj_physical_(Tensor(a!) self) -> Tensor(a!) + self: grad.conj_physical() + result: self_t.conj_physical_() + +- name: copysign.Tensor(Tensor self, Tensor other) -> Tensor + self: copysign_tensor_self_backward(grad, self, result) + other: zeros_like(other) + result: copysign_tensor_self_backward(self_t, self_p, result) + +- name: copysign.Scalar(Tensor self, Scalar other) -> Tensor + self: copysign_tensor_self_backward(grad, self, result) + result: auto_element_wise + +- name: cos(Tensor self) -> Tensor + self: grad * -self.sin().conj() + result: auto_element_wise + +- name: cosh(Tensor self) -> Tensor + self: grad * self.sinh().conj() + result: auto_element_wise + +- name: count_nonzero.dim_IntList(Tensor self, int[] dim) -> Tensor + output_differentiability: [False] + +- name: count_nonzero(Tensor self, int? dim=None) -> Tensor + output_differentiability: [False] + +- name: linalg_cross(Tensor self, Tensor other, *, int dim=-1) -> Tensor + self: at::linalg_cross(other.conj(), grad, dim) + other: at::linalg_cross(grad, self.conj(), dim) + result: "at::linalg_cross(self_t, other_p, dim) + at::linalg_cross(self_p, other_t, dim)" + +- name: logcumsumexp(Tensor self, int dim) -> Tensor + self: logcumsumexp_backward(grad, self, result, dim) + result: logcumsumexp_jvp(self_p, self_t, dim) + +- name: cumprod(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor + self: cumprod_backward(grad.to(self.scalar_type()), self, dim, result) + result: "cumprod_jvp(self_t, self_p, result, dim).to(dtype.has_value() ? *dtype : self_p.scalar_type())" + +- name: cumsum(Tensor self, int dim, *, ScalarType? dtype=None) -> Tensor + self: cumsum_backward(grad.to(self.scalar_type()), dim) + result: auto_linear + +- name: cummax(Tensor self, int dim) -> (Tensor values, Tensor indices) + self: cummaxmin_backward(grad, self, indices, dim) + values: self_t.gather(dim, indices) + +- name: cummin(Tensor self, int dim) -> (Tensor values, Tensor indices) + self: cummaxmin_backward(grad, self, indices, dim) + values: self_t.gather(dim, indices) + +- name: conv_tbc(Tensor self, Tensor weight, Tensor bias, int pad=0) -> Tensor + self, weight, bias: "grad.defined() ? conv_tbc_backward(grad, self, weight, bias, pad) : std::tuple()" + +- name: _ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank=0, bool zero_infinity=False) -> (Tensor, Tensor) + log_probs: _ctc_loss_backward(grad, log_probs, targets, input_lengths, target_lengths, result0, result1, blank, zero_infinity) + +- name: _ctc_loss.Tensor(Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, int blank=0, bool zero_infinity=False) -> (Tensor, Tensor) + log_probs: _ctc_loss_backward(grad, log_probs, targets, input_lengths, target_lengths, result0, result1, blank, zero_infinity) + +- name: deg2rad(Tensor self) -> Tensor + self: deg2rad_backward(grad) + result: auto_element_wise + +- name: _linalg_det(Tensor A) -> (Tensor result, Tensor LU, Tensor pivots) + A: linalg_det_backward(grad, result, A, LU, pivots) + result: linalg_det_jvp(A_t, result, LU, pivots, A_p.is_contiguous() && !A_p.is_complex()) + output_differentiability: [True, False, False] + +- name: _linalg_slogdet(Tensor A) -> (Tensor sign, Tensor logabsdet, Tensor LU, Tensor pivots) + A: slogdet_backward(grad_sign, grad_logabsdet, A, sign, LU, pivots) + sign, logabsdet: slogdet_jvp(LU, pivots, A_t, sign, A_p.is_contiguous() && !A_p.is_complex()) + output_differentiability: [True, True, False, False] + +- name: block_diag(Tensor[] tensors) -> Tensor + tensors: block_diag_backward(grad, to_args_sizes(tensors), to_args_scalartypes(tensors)) + result: block_diag_jvp(tensors) + +- name: diag_embed(Tensor self, int offset=0, int dim1=-2, int dim2=-1) -> Tensor + self: grad.diagonal(offset, dim1, dim2) + result: auto_linear + +- name: diagonal(Tensor(a) self, int offset=0, int dim1=0, int dim2=1) -> Tensor(a) + self: diagonal_backward_symint(grad, self.sym_sizes(), offset, dim1, dim2) + result: auto_linear + +- name: diagonal_backward(Tensor grad_output, SymInt[] input_sizes, int offset, int dim1, int dim2) -> Tensor + grad_output: grad.diagonal(offset, dim1, dim2) + result: auto_linear + +- name: dist(Tensor self, Tensor other, Scalar p=2) -> Tensor + self: norm_backward(grad, self - other, p, result) + other: -norm_backward(grad, self - other, p, result) + result: norm_jvp(self_p - other_p, self_t - other_t, p, result, {}, false) + +# The backward formula is done in this order to improve numerical stability +# of the higher order derivatives, see https://github.com/pytorch/pytorch/issues/43414 +# Note that we don't use "result" because saving it would be BC-breaking when it is used in an inplace operation later +- name: div.Tensor(Tensor self, Tensor other) -> Tensor + self: div_tensor_self_backward(grad, other, self.scalar_type()) + other: div_tensor_other_backward(grad, self, other) + result: (self_t - other_t * result) / other_p + +- name: div.Scalar(Tensor self, Scalar other) -> Tensor + self: div_tensor_self_backward(grad, other, self.scalar_type()) + result: self_t / other + +- name: div.Tensor_mode(Tensor self, Tensor other, *, str? rounding_mode) -> Tensor + self: div_tensor_self_backward(grad, other, self.scalar_type(), rounding_mode) + other: div_tensor_other_backward(grad, self, other, rounding_mode) + result: "rounding_mode.has_value() ? result.new_zeros_symint(result.sym_sizes()) : self_t / other_p - other_t * (self_p / other_p) / other_p" + +- name: div.Scalar_mode(Tensor self, Scalar other, *, str? rounding_mode) -> Tensor + self: div_tensor_self_backward(grad, other, self.scalar_type(), rounding_mode) + result: "rounding_mode.has_value() ? result.new_zeros_symint(result.sym_sizes()) : self_t / other" + +- name: dot(Tensor self, Tensor tensor) -> Tensor + self: grad * tensor.conj() + tensor: grad * self.conj() + result: at::dot(self_t, tensor_p) + at::dot(self_p, tensor_t) + +- name: vdot(Tensor self, Tensor other) -> Tensor + self: grad.conj() * other + other: grad * self + result: at::vdot(self_t, other_p) + at::vdot(self_p, other_t) + +- name: _fused_dropout(Tensor self, float p, Generator? generator=None) -> (Tensor, Tensor) + self: _fused_dropout_backward(grad, result1, p) + +- name: native_dropout(Tensor input, float p, bool? train) -> (Tensor, Tensor) + input: "GradMode::is_enabled() ? infinitely_differentiable_native_dropout_backward(grad, result1, (!train.has_value() || !train.value() ? 1 : (p == 1 ? 0.0 : 1.0 / (1.0 - p)))) : native_dropout_backward(grad, result1, (!train.has_value() || !train.value() ? 1 : (p == 1 ? 0.0 : 1.0 / (1.0 - p))))" + result0: "(!train.has_value() || train.value()) ? (p == 1 ? 0.0 : 1.0 / (1.0 - p)) * input_t * result1 : input_t" + +- name: native_dropout_backward(Tensor grad_output, Tensor mask, float scale) -> Tensor + grad_output: "native_dropout_double_backward(grad, grad_output, mask, scale)" + mask: 'not_implemented("native_dropout_backward: mask")' + +- name: eq_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + self: zeros_like(self) + result: self_t.zero_() + +- name: eq_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + self: zeros_like(self) + other: zeros_like(other) + result: self_t.zero_() + +- name: erf(Tensor self) -> Tensor + self: 2.0 / sqrt(M_PI) * exp(-(self.pow(2))) * grad + result: auto_element_wise + +- name: erfc(Tensor self) -> Tensor + self: -2.0 / sqrt(M_PI) * exp(-(self.pow(2))) * grad + result: auto_element_wise + +- name: special_erfcx(Tensor self) -> Tensor + self: (2.0 * self * result - 2.0 / sqrt(M_PI)) * grad + result: auto_element_wise + +- name: erfinv(Tensor self) -> Tensor + self: 0.5 * sqrt(M_PI) * exp(self.erfinv().pow(2)) * grad + result: auto_element_wise + +- name: exp(Tensor self) -> Tensor + self: grad * result.conj() + result: auto_element_wise + +- name: exp2(Tensor self) -> Tensor + self: grad * result.conj() * M_LN2 + result: auto_element_wise + +- name: expm1(Tensor self) -> Tensor + self: grad * (result.conj() + 1) + result: auto_element_wise + +# TODO: this derivative is not SymInt safe, need sum_to support +- name: expand(Tensor(a) self, SymInt[] size, *, bool implicit=False) -> Tensor(a) + self: at::sum_to(grad, self.sym_sizes()) + result: auto_linear + +- name: exponential_(Tensor(a!) self, float lambd=1, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: fake_quantize_per_tensor_affine_cachemask(Tensor self, float scale, int zero_point, int quant_min, int quant_max) -> (Tensor output, Tensor mask) + self: fake_quantize_per_tensor_affine_cachemask_backward(grad, mask) + +- name: _fake_quantize_per_tensor_affine_cachemask_tensor_qparams(Tensor self, Tensor scale, Tensor zero_point, Tensor fake_quant_enabled, int quant_min, int quant_max) -> (Tensor output, Tensor mask) + self: fake_quantize_per_tensor_affine_cachemask_backward(grad, mask) + +- name: _fake_quantize_learnable_per_tensor_affine(Tensor self, Tensor scale, Tensor zero_point, int quant_min, int quant_max, float grad_factor=1.0) -> Tensor + self, scale, zero_point: "grad.defined() ? _fake_quantize_learnable_per_tensor_affine_backward(grad, self, scale, zero_point, quant_min, quant_max, grad_factor) : std::tuple()" + +- name: fake_quantize_per_channel_affine_cachemask(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max) -> (Tensor output, Tensor mask) + self: fake_quantize_per_channel_affine_cachemask_backward(grad, mask) + +- name: _fake_quantize_learnable_per_channel_affine(Tensor self, Tensor scale, Tensor zero_point, int axis, int quant_min, int quant_max, float grad_factor=1.0) -> Tensor + self, scale, zero_point: "grad.defined() ? _fake_quantize_learnable_per_channel_affine_backward(grad, self, scale, zero_point, axis, quant_min, quant_max, grad_factor) : std::tuple()" + +- name: _fused_moving_avg_obs_fq_helper(Tensor self, Tensor observer_on, Tensor fake_quant_on, Tensor(a!) running_min, Tensor(b!) running_max, Tensor(c!) scale, Tensor(d!) zero_point, float averaging_const, int quant_min, int quant_max, int ch_axis, bool per_row_fake_quant=False, bool symmetric_quant=False) -> (Tensor output, Tensor mask) + self: fake_quantize_per_tensor_affine_cachemask_backward(grad, mask) + +- name: fill.Scalar(Tensor self, Scalar value) -> Tensor + self: zeros_like(grad) + result: at::fill(self_t, 0) + +- name: fill.Tensor(Tensor self, Tensor value) -> Tensor + self: zeros_like(grad) + value: grad.sum() + result: at::fill(self_t, value_t) + +- name: fill_.Scalar(Tensor(a!) self, Scalar value) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.fill_(0) + +- name: fill_.Tensor(Tensor(a!) self, Tensor value) -> Tensor(a!) + self: zeros_like(grad) + value: grad.sum() + result: self_t.fill_(value_t) + +- name: floor(Tensor self) -> Tensor + self: zeros_like(grad) + result: auto_element_wise + +- name: fmod.Scalar(Tensor self, Scalar other) -> Tensor + self: grad + result: auto_element_wise + +- name: fmod.Tensor(Tensor self, Tensor other) -> Tensor + self: grad + other: -grad * self.div(other, /*rounding_mode=*/"trunc") + result: self_t - other_t * self_p.div(other_p, /*rounding_mode=*/"trunc") + +- name: frac(Tensor self) -> Tensor + self: grad + result: self_t + +- name: frexp.Tensor(Tensor self) -> (Tensor mantissa, Tensor exponent) + self: grad / exponent.exp2() + mantissa: self_t / exponent.exp2() + +- name: gather(Tensor self, int dim, Tensor index, *, bool sparse_grad=False) -> Tensor + self: gather_backward(grad, self, dim, index, sparse_grad) + index: non_differentiable + result: auto_linear + +- name: ge_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + self: zeros_like(self) + result: self_t.zero_() + +- name: ge_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + self: zeros_like(self) + other: zeros_like(other) + result: self_t.zero_() + +- name: geometric_(Tensor(a!) self, float p, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: geqrf(Tensor self) -> (Tensor a, Tensor tau) + self: not_implemented("geqrf") + +- name: indices(Tensor(a) self) -> Tensor(a) + output_differentiability: [False] + +- name: _indices(Tensor(a) self) -> Tensor(a) + output_differentiability: [False] + +- name: crow_indices(Tensor(a) self) -> Tensor(a) + output_differentiability: [False] + +- name: col_indices(Tensor(a) self) -> Tensor(a) + output_differentiability: [False] + +- name: ccol_indices(Tensor(a) self) -> Tensor(a) + output_differentiability: [False] + +- name: row_indices(Tensor(a) self) -> Tensor(a) + output_differentiability: [False] + +- name: grid_sampler_2d(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor + input, grid: "grad.defined() ? grid_sampler_2d_backward(grad, input, grid, interpolation_mode, padding_mode, align_corners, grad_input_mask) : std::tuple()" + +- name: grid_sampler_3d(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor + input, grid: "grad.defined() ? grid_sampler_3d_backward(grad, input, grid, interpolation_mode, padding_mode, align_corners, grad_input_mask) : std::tuple()" + +# See NOTE [ grid_sample CPU fallback ] +- name: _grid_sampler_2d_cpu_fallback(Tensor input, Tensor grid, int interpolation_mode, int padding_mode, bool align_corners) -> Tensor + input, grid: "grad.defined() ? _grid_sampler_2d_cpu_fallback_backward(grad, input, grid, interpolation_mode, padding_mode, align_corners) : std::tuple()" + +- name: gt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + self: zeros_like(self) + result: self_t.zero_() + +- name: gt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + self: zeros_like(self) + other: zeros_like(other) + result: self_t.zero_() + +- name: hardsigmoid(Tensor self) -> Tensor + self: hardsigmoid_backward(grad, self) + result: auto_element_wise + +- name: histc(Tensor self, int bins=100, Scalar min=0, Scalar max=0) -> Tensor + output_differentiability: [False] + +- name: hardswish(Tensor self) -> Tensor + self: hardswish_backward(grad, self) + result: auto_element_wise + +- name: hardswish_backward(Tensor grad_output, Tensor self) -> Tensor + grad_output: hardswish_backward(grad, self) + self: at::where(at::logical_and(-3.0 < self, self < 3.0), grad * grad_output / 3.0, at::zeros({}, self.options())) + result: "hardswish_backward(grad_output_t, self_p) + + at::where(at::logical_and(-3.0 < self_p, self_p < 3.0), self_t * grad_output_p / 3.0, at::zeros({}, self_p.options()))" + +- name: hypot(Tensor self, Tensor other) -> Tensor + self: grad * self / result + other: grad * other / result + result: self_t * self_p / result + other_t * other_p / result + +- name: i0(Tensor self) -> Tensor + self: grad * at::special_i1(self) + result: auto_element_wise + +- name: special_i0e(Tensor self) -> Tensor + self: grad * (at::special_i1e(self) - self.sgn() * result) + result: auto_element_wise + +- name: special_i1(Tensor self) -> Tensor + self: i1_backward(grad, self, result) + result: auto_element_wise + +- name: special_i1e(Tensor self) -> Tensor + self: i1e_backward(grad, self, result) + result: auto_element_wise + +- name: igamma(Tensor self, Tensor other) -> Tensor + self: 'not_implemented("igamma: input")' + other: grad * exp((self - 1) * log(other) - other - lgamma(self)) + +- name: igammac(Tensor self, Tensor other) -> Tensor + self: 'not_implemented("igammac: input")' + other: -grad * exp((self - 1) * log(other) - other - lgamma(self)) + +- name: index.Tensor(Tensor self, Tensor?[] indices) -> Tensor + self: index_backward(grad.new_zeros_symint(self.sym_sizes(), self.options()), indices, grad) + result: auto_linear + +- name: _unsafe_index.Tensor(Tensor self, Tensor?[] indices) -> Tensor + self: at::_unsafe_index_put(grad.new_zeros_symint(self.sym_sizes(), self.options()), indices, grad, true) + result: auto_linear + +- name: _unsafe_masked_index(Tensor self, Tensor mask, Tensor?[] indices, Scalar fill) -> Tensor + self: at::_unsafe_masked_index_put_accumulate(grad.new_zeros_symint(self.sym_sizes(), self.options()), mask, indices, grad) + mask: non_differentiable + result: _unsafe_masked_index(self_t, mask, indices, 0) + +- name: _unsafe_masked_index_put_accumulate(Tensor self, Tensor mask, Tensor?[] indices, Tensor values) -> Tensor + self: grad + mask: non_differentiable + values: at::_unsafe_masked_index(grad, mask, indices, 0) + result: at::_unsafe_masked_index_put_accumulate(self_t, mask, indices, values_t) + +- name: index_add(Tensor self, int dim, Tensor index, Tensor source, *, Scalar alpha=1) -> Tensor + self: grad + # The case source.dim() == 0 is necessary to support scalar tensors of the form + # source.dim() == 0 and index.dim() == 1 and index.size() == (1,), + # This is because source is not broadcastable to index, as source.dim() < index.dim() + source: "maybe_multiply(source.dim() > 0 ? grad.index_select(dim, index).expand_as(source) : grad.index_select(dim, index.squeeze(0)), alpha)" + index: non_differentiable + result: at::index_add(self_t, dim, index, maybe_multiply(source_t, alpha)) + +- name: index_reduce(Tensor self, int dim, Tensor index, Tensor source, str reduce, *, bool include_self=True) -> Tensor + self, source: index_reduce_backward(grad, self, dim, index, source, reduce, include_self, result) + index: non_differentiable + +- name: index_copy(Tensor self, int dim, Tensor index, Tensor source) -> Tensor + self: grad.index_fill(dim, index, 0) + # The case source.dim() == 0 is necessary to support scalar tensors of the form + # source.dim() == 0 and index.dim() == 1 and index.size() == (1,), + # This is because source is not broadcastable to index, as source.dim() < index.dim() + source: "source.dim() > 0 ? grad.index_select(dim, index).expand_as(source) : grad.index_select(dim, index.squeeze(0))" + index: non_differentiable + result: self_t.index_copy(dim, index, source_t) + +- name: index_fill.int_Scalar(Tensor self, int dim, Tensor index, Scalar value) -> Tensor + self: grad.index_fill(dim, index, 0) + index: non_differentiable + result: self_t.index_fill(dim, index, 0) + +- name: index_fill.int_Tensor(Tensor self, int dim, Tensor index, Tensor value) -> Tensor + self: grad.index_fill(dim, index, 0) + value: grad.index_select(dim, std::get<0>(at::_unique(index, /*sorted=*/false))).sum() + index: non_differentiable + result: self_t.index_fill(dim, index, value_t) + +- name: index_put(Tensor self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor + self: "accumulate ? grad : grad.index_put(indices, zeros_like(values), false)" + values: grad.index(indices) + result: self_t.index_put(indices, values_t, accumulate) + +- name: _unsafe_index_put(Tensor self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor + self: "accumulate ? grad : at::_unsafe_index_put(grad, indices, zeros_like(values), false)" + values: at::_unsafe_index(grad, indices) + result: at::_unsafe_index_put(self_t, indices, values_t, accumulate) + +- name: _index_put_impl_(Tensor(a!) self, Tensor?[] indices, Tensor values, bool accumulate=False, bool unsafe=False) -> Tensor(a!) + self: "accumulate ? grad : grad.index_put(indices, zeros_like(values), false)" + values: grad.index(indices) + result: at::_index_put_impl_(self_t, indices, values_t, accumulate, unsafe) + +- name: index_select(Tensor self, int dim, Tensor index) -> Tensor + self: index_select_backward_symint(grad, self.sym_sizes(), dim, index) + index: non_differentiable + result: auto_linear + +- name: linalg_inv_ex(Tensor A, *, bool check_errors=False) -> (Tensor inverse, Tensor info) + A: -at::matmul(inverse.mH(), at::matmul(grad, inverse.mH())) + inverse: -at::matmul(at::matmul(inverse, A_t), inverse) + output_differentiability: [True, False] + +- name: linalg_pinv.atol_rtol_tensor(Tensor self, *, Tensor? atol=None, Tensor? rtol=None, bool hermitian=False) -> Tensor + self: pinv_backward(grad, result, self) + result: pinv_jvp(self_p, result, self_t) + +- name: isnan(Tensor self) -> Tensor + self: non_differentiable + +- name: kthvalue(Tensor self, int k, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), keepdim) + values: gather_with_keepdimed_indices(self_t, dim, indices, keepdim) + +- name: le_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + self: zeros_like(self) + result: self_t.zero_() + +- name: le_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + self: zeros_like(self) + other: zeros_like(other) + result: self_t.zero_() + +- name: lerp.Scalar(Tensor self, Tensor end, Scalar weight) -> Tensor + self: "weight.isComplex() ? grad * (1 - weight.conj().toComplexDouble()) : grad * (1 - weight.toDouble())" + end: grad * weight.conj() + result: at::lerp(self_t, end_t, weight) + +- name: lerp.Tensor(Tensor self, Tensor end, Tensor weight) -> Tensor + self: grad * (1 - weight).conj() + end: grad * weight.conj() + weight: grad * (end - self).conj() + result: at::lerp(self_t, end_t, weight_p) + weight_t * (end_p - self_p) + +- name: lgamma(Tensor self) -> Tensor + self: grad * digamma(self) + result: auto_element_wise + +- name: digamma(Tensor self) -> Tensor + self: grad * polygamma(1, self) + result: auto_element_wise + +- name: polygamma(int n, Tensor self) -> Tensor + self: grad * polygamma(n + 1, self) + result: auto_element_wise + +- name: polygamma_(Tensor(a!) self, int n) -> Tensor(a!) + self: grad * polygamma(n + 1, self) + result: self_t.mul_(polygamma(n + 1, original_self_p)) + +- name: log(Tensor self) -> Tensor + self: grad.div(self.conj()) + result: auto_element_wise + +- name: log10(Tensor self) -> Tensor + self: grad / (self.conj() * 2.3025850929940456) + result: auto_element_wise + +- name: log1p(Tensor self) -> Tensor + self: log1p_backward(grad, self) + result: auto_element_wise + +- name: log2(Tensor self) -> Tensor + self: grad / (self.conj() * 0.6931471805599453) + result: auto_element_wise + +- name: logaddexp(Tensor self, Tensor other) -> Tensor + self: grad / (1 + exp(other - self)).conj() + other: grad / (1 + exp(self - other)).conj() + result: self_t / (1 + exp(other_p - self_p)) + other_t / (1 + exp(self_p - other_p)) + +- name: logaddexp2(Tensor self, Tensor other) -> Tensor + self: grad / (1 + pow(2, other - self)) + other: grad / (1 + pow(2, self - other)) + result: self_t / (1 + pow(2, other_p - self_p)) + other_t / (1 + pow(2, self_p - other_p)) + +# Note [Gradient formula for xlogy at x = 0, y <= 0] +# x * log(y) is not defined at y <= 0, so we cannot even talk about differentiability +# Now, xlogy(0, y) = 0 by definition. +# This does not make it differentiable as it's not defined in a neighbourhood of a point +# (0, y) when y <= 0. +# Now, when a function is non-differentiable, sometimes we return "a relatively sensible value" +# In this case, as per the discussion in https://github.com/pytorch/pytorch/issues/80770, we choose +# this value to be zero, which is the directional derivative along the line {x = 0}. +- name: xlogy.Tensor(Tensor self, Tensor other) -> Tensor + self: at::xlogy(grad, other).masked_fill((self == 0.) & (other <= 0.), 0.) + other: grad * self / other + result: at::xlogy(self_t, other_p).masked_fill((self_p == 0.) & (other_p <= 0.), 0.) + other_t * self_p / other_p + +- name: xlogy.Scalar_Self(Scalar self, Tensor other) -> Tensor + other: grad * self / other + result: auto_element_wise + +- name: xlogy.Scalar_Other(Tensor self, Scalar other) -> Tensor + self: "other.toDouble() > 0. + ? at::xlogy(grad, other) + : at::xlogy(grad, other).masked_fill(self == 0., 0.)" + result: auto_element_wise + +# See Note [Gradient formula for xlogy at x = 0, y <= 0] +# Same here but with y <= -1 +- name: special_xlog1py(Tensor self, Tensor other) -> Tensor + self: at::special_xlog1py(grad, other).masked_fill((self == 0.) & (other <= -1.), 0.) + other: grad * self / (other + 1) + result: at::special_xlog1py(self_t, other_p).masked_fill((self_p == 0.) & (other_p <= -1.), 0.) + other_t * self_p / (other_p + 1) + +- name: special_xlog1py.self_scalar(Scalar self, Tensor other) -> Tensor + other: grad * self / (other + 1) + result: auto_element_wise + +- name: special_xlog1py.other_scalar(Tensor self, Scalar other) -> Tensor + self: "other.toDouble() > -1. + ? at::special_xlog1py(grad, other) + : at::special_xlog1py(grad, other).masked_fill(self == 0., 0.)" + result: auto_element_wise + +- name: special_zeta(Tensor self, Tensor other) -> Tensor + self: not_implemented("zeta") + other: grad * -self * special_zeta(self + 1., other) + +- name: special_zeta.self_scalar(Scalar self, Tensor other) -> Tensor + other: grad * -self * special_zeta(self.toDouble() + 1., other) + +- name: special_zeta.other_scalar(Tensor self, Scalar other) -> Tensor + self: not_implemented("zeta") + +- name: log_normal_(Tensor(a!) self, float mean=1, float std=2, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: logsumexp(Tensor self, int[1] dim, bool keepdim=False) -> Tensor + self: logsumexp_backward(grad, self, result, dim, keepdim) + result: logsumexp_jvp(self_p, self_t, dim, keepdim) + +- name: linalg_lstsq(Tensor self, Tensor b, float? rcond=None, *, str? driver=None) -> (Tensor solution, Tensor residuals, Tensor rank, Tensor singular_values) + self, b: linalg_lstsq_backward(grad, self, b, grad_input_mask) + solution: linalg_lstsq_jvp(self_p, b_p, self_t, b_t) + output_differentiability: [True, False, False, False] + +- name: lt_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + self: zeros_like(self) + result: self_t.zero_() + +- name: lt_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + self: zeros_like(self) + other: zeros_like(other) + result: self_t.zero_() + +- name: linalg_lu_factor_ex(Tensor A, *, bool pivot=True, bool check_errors=False) -> (Tensor LU, Tensor pivots, Tensor info) + A: lu_factor_ex_backward(grad, LU, pivots, pivot) + LU: lu_factor_ex_jvp(A_t, LU, pivots, pivot) + output_differentiability: [True, False, False] + +- name: linalg_lu_factor(Tensor A, *, bool pivot=True) -> (Tensor LU, Tensor pivots) + A: lu_factor_ex_backward(grad, LU, pivots, pivot) + LU: lu_factor_ex_jvp(A_t, LU, pivots, pivot) + output_differentiability: [True, False] + +- name: linalg_lu(Tensor A, *, bool pivot=True) -> (Tensor P, Tensor L, Tensor U) + A: linalg_lu_backward(grad_L, grad_U, P, L, U, pivot) + L: std::get<0>(linalg_lu_jvp(A_t, P, L, U, pivot)) + U: std::get<1>(linalg_lu_jvp(A_t, P, L, U, pivot)) + output_differentiability: [False, True, True] + +- name: linalg_lu_solve(Tensor LU, Tensor pivots, Tensor B, *, bool left=True, bool adjoint=False) -> Tensor + LU: linalg_lu_solve_LU(grad, LU, pivots, result, left, adjoint) + B: "at::linalg_lu_solve(LU, pivots, grad, left, !adjoint)" + result: linalg_lu_solve_jvp(result, LU_p, pivots, LU_t, B_t, left, adjoint) + +- name: lu_unpack(Tensor LU_data, Tensor LU_pivots, bool unpack_data=True, bool unpack_pivots=True) -> (Tensor P, Tensor L, Tensor U) + LU_data: lu_unpack_backward(grad_L, grad_U, LU_data.sym_size(-2), LU_data.sym_size(-1)) + LU_pivots: non_differentiable + L: "LU_data_t.sym_size(-2) >= LU_data_t.sym_size(-1) ? LU_data_t.tril(-1) : LU_data_t.narrow_symint(-1, 0, LU_data_t.sym_size(-2)).tril(-1)" + U: "LU_data_t.sym_size(-1) >= LU_data_t.sym_size(-2) ? LU_data_t.triu() : LU_data_t.narrow_symint(-2, 0, LU_data_t.sym_size(-1)).triu()" + output_differentiability: [False, True, True] + +- name: masked_fill.Scalar(Tensor self, Tensor mask, Scalar value) -> Tensor + self: grad.masked_fill(mask, 0) + mask: non_differentiable + result: self_t.masked_fill(mask, 0) + +- name: masked_fill.Tensor(Tensor self, Tensor mask, Tensor value) -> Tensor + self: grad.masked_fill(mask, 0) + value: masked_fill_backward(grad, mask) + mask: non_differentiable + result: self_t.masked_fill(mask, value_t) + +- name: masked_scatter(Tensor self, Tensor mask, Tensor source) -> Tensor + self: grad.masked_fill(mask, 0) + source: masked_scatter_backward_symint(grad, mask, source.sym_sizes()) + mask: non_differentiable + result: self_t.masked_scatter(mask, source_t) + +- name: masked_scatter_backward(Tensor grad_output, Tensor mask, SymInt[] sizes) -> Tensor + grad_output: zeros_like(grad_output).masked_scatter(mask, grad) + mask: non_differentiable + result: masked_scatter_backward(grad_output_t, mask, grad_output_t.sizes()) + +- name: masked_select(Tensor self, Tensor mask) -> Tensor + self: masked_select_backward(grad, self, mask) + mask: non_differentiable + result: auto_linear + +- name: linalg_matrix_exp(Tensor self) -> Tensor + self: linalg_matrix_exp_differential(self, grad, /*adjoint*/ true) + result: linalg_matrix_exp_differential(self_p, self_t, /*adjoint*/ false) + +- name: max.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), keepdim) + values: gather_with_keepdimed_indices(self_t, dim, indices, keepdim) + +- name: max(Tensor self) -> Tensor + self: evenly_distribute_backward(grad, self, result) + result: evenly_read_jvp(self_t, self_p, result) + +- name: maximum(Tensor self, Tensor other) -> Tensor + self: at::where(self == other, grad / 2, grad).masked_fill_(self < other, 0) + other: at::where(self == other, grad / 2, grad).masked_fill_(self > other, 0) + result: other_t + at::where(self_p == other_p, at::scalar_tensor(0.5, result.options()), (self_p > other_p).to(result.scalar_type())) * (self_t - other_t) + +- name: fmax(Tensor self, Tensor other) -> Tensor + self: grad.masked_fill((self >= other).logical_or_(other.isnan()).logical_not_(), 0) + other: grad.masked_fill((self >= other).logical_or_(other.isnan()), 0) + result: other_t + (self_p > other_p).logical_or_(other_p.isnan()) * (self_t - other_t) + +- name: mean(Tensor self, *, ScalarType? dtype=None) -> Tensor + dispatch: + Default: + self: grad.expand_symint(self.sym_sizes()) / self.sym_numel() + result: auto_linear + AutogradNestedTensor: + # TODO: replace this with grad.expand_as(self) / self.sym_numel() when that is supported + self: (ones_like(self) * grad) / self.sym_numel() + result: auto_linear + +- name: mean.dim(Tensor self, int[1]? dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + self: mean_backward(grad, self.sym_sizes(), dim, self.sym_numel(), keepdim) + result: auto_linear + +- name: median(Tensor self) -> Tensor + self: evenly_distribute_backward(grad, self, result) + result: evenly_read_jvp(self_t, self_p, result) + +- name: nanmedian(Tensor self) -> Tensor + self: evenly_distribute_backward(grad, self, result) + result: evenly_read_jvp(self_t, self_p, result) + +# This is in theory incorrect in the following case: +# sorted list: [..., a, b, b, ..., b, b, c, ...] with median = b and the value +# | at middle position of the +# | list between two `b`s. E.g., +# | +# ^the middle position +# The gradient exists and is essentially 0 in this case. +# +# In case where the middle position is at the boundary of `b` range, e.g., +# sorted list: [..., a, b, b, ..., b, b, c, ...] +# | +# ^the middle position +# The backward implementation is correct in the sense that it returns the +# subgradient on one side. +- name: median.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), keepdim) + values: gather_with_keepdimed_indices(self_t, dim, indices, keepdim) + +- name: nanmedian.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), keepdim) + values: gather_with_keepdimed_indices(self_t, dim, indices, keepdim) + +- name: min.dim(Tensor self, int dim, bool keepdim=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), keepdim) + values: gather_with_keepdimed_indices(self_t, dim, indices, keepdim) + +- name: min(Tensor self) -> Tensor + self: evenly_distribute_backward(grad, self, result) + result: evenly_read_jvp(self_t, self_p, result) + +- name: minimum(Tensor self, Tensor other) -> Tensor + self: at::where(self == other, grad / 2, grad).masked_fill_(self > other, 0) + other: at::where(self == other, grad / 2, grad).masked_fill_(self < other, 0) + result: other_t + at::where(self_p == other_p, at::scalar_tensor(0.5, result.options()), (self_p < other_p).to(result.scalar_type())) * (self_t - other_t) + +- name: fmin(Tensor self, Tensor other) -> Tensor + self: grad.masked_fill((self <= other).logical_or_(other.isnan()).logical_not_(), 0) + other: grad.masked_fill((self <= other).logical_or_(other.isnan()), 0) + result: other_t + (self_p <= other_p).logical_or_(other_p.isnan()) * (self_t - other_t) + +- name: amax(Tensor self, int[1] dim=[], bool keepdim=False) -> Tensor + self: scale_grad_by_count(restore_reduced_dims(grad, dim, keepdim), restore_reduced_dims(result, dim, keepdim) == self, dim) + result: amaxamin_jvp(self_p, self_t, result, dim, keepdim) + +- name: amin(Tensor self, int[1] dim=[], bool keepdim=False) -> Tensor + self: scale_grad_by_count(restore_reduced_dims(grad, dim, keepdim), restore_reduced_dims(result, dim, keepdim) == self, dim) + result: amaxamin_jvp(self_p, self_t, result, dim, keepdim) + +- name: mm(Tensor self, Tensor mat2) -> Tensor + self: mm_mat1_backward(grad, mat2, self.sym_sizes(), self.sym_strides(), self.layout(), 1) + mat2: mm_mat2_backward(grad, self, mat2.sym_sizes(), mat2.sym_strides(), mat2.layout(), 1) + result: at::mm(self_t, mat2_p) + at::mm(self_p, mat2_t) + +- name: mode(Tensor self, int dim=-1, bool keepdim=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), keepdim) + values: gather_with_keepdimed_indices(self_t, dim, indices, keepdim) + +- name: mul.Tensor(Tensor self, Tensor other) -> Tensor + self: mul_tensor_backward(grad, other, self.scalar_type()) + other: mul_tensor_backward(grad, self, other.scalar_type()) + result: other_t * self_p + self_t * other_p + +- name: mul.Scalar(Tensor self, Scalar other) -> Tensor + self: mul_tensor_backward(grad, other, self.scalar_type()) + result: self_t * other + +- name: mv(Tensor self, Tensor vec) -> Tensor + self: grad.ger(vec.conj()) + vec: self.conj().t().mv(grad) + result: mv(self_t, vec_p) + mv(self_p, vec_t) + +- name: mvlgamma(Tensor self, int p) -> Tensor + self: mvlgamma_backward(grad, self, p) + result: auto_element_wise + +- name: nan_to_num(Tensor self, float? nan=None, float? posinf=None, float? neginf=None) -> Tensor + self: grad * at::isfinite(self) + result: auto_element_wise + +- name: native_batch_norm(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float momentum, float eps) -> (Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? native_batch_norm_backward(grad, input, weight, running_mean, running_var, result1, result2, training, eps, grad_input_mask) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, running_mean, running_var, result1, result2, training, eps) + +- name: _native_batch_norm_legit(Tensor input, Tensor? weight, Tensor? bias, Tensor(a!) running_mean, Tensor(b!) running_var, bool training, float momentum, float eps) -> (Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? native_batch_norm_backward(grad, input, weight, running_mean, running_var, result1, result2, training, eps, grad_input_mask) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, running_mean, running_var, result1, result2, training, eps) + +- name: _native_batch_norm_legit_no_training(Tensor input, Tensor? weight, Tensor? bias, Tensor running_mean, Tensor running_var, float momentum, float eps) -> (Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? native_batch_norm_backward(grad, input, weight, running_mean, running_var, result1, result2, /*training=*/false, eps, grad_input_mask) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, running_mean, running_var, result1, result2, /*training=*/false, eps) + +- name: _native_batch_norm_legit.no_stats(Tensor input, Tensor? weight, Tensor? bias, bool training, float momentum, float eps) -> (Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? native_batch_norm_backward(grad, input, weight, Tensor(), Tensor(), result1, result2, training, eps, grad_input_mask) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, Tensor(), Tensor(), result1, result2, training, eps) + +- name: native_batch_norm_backward(Tensor grad_out, Tensor input, Tensor? weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_invstd, bool train, float eps, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + input, weight, grad_out: batchnorm_double_backward(input, weight, grads[0], grads[1], grads[2], grad_out, running_mean, running_var, train, eps, save_mean, save_invstd, grad_input_mask) + save_mean: not_implemented("native_batch_norm_backward save_mean") + save_invstd: not_implemented("native_batch_norm_backward save_invstd") + +- name: native_layer_norm(Tensor input, SymInt[] normalized_shape, Tensor? weight, Tensor? bias, float eps) -> (Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? native_layer_norm_backward_symint(grad, input, normalized_shape, result1, result2, weight, bias, grad_input_mask) : std::tuple()" + result0: layer_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, result1, result2, normalized_shape) + +- name: native_layer_norm_backward(Tensor grad_out, Tensor input, SymInt[] normalized_shape, Tensor mean, Tensor rstd, Tensor? weight, Tensor? bias, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + input, weight, grad_out: layer_norm_double_backward(input, weight, grads[0], grads[1], grads[2], grad_out, mean, rstd, normalized_shape, grad_input_mask) + bias: Tensor() + mean: not_implemented("native_layer_norm_backward mean") + rstd: not_implemented("native_layer_norm_backward rstd") + +- name: native_group_norm(Tensor input, Tensor? weight, Tensor? bias, SymInt N, SymInt C, SymInt HxW, int group, float eps) -> (Tensor, Tensor, Tensor) + input, weight, bias: "GradMode::is_enabled() || grads[1].defined() || grads[2].defined() ? infinitely_differentiable_native_group_norm_backward(grads[0], grads[1], grads[2], input, result1, result2, weight, N, C, HxW, group, eps, grad_input_mask) : (grads[0].defined() ? native_group_norm_backward_symint(grads[0].device().is_xpu() ? grads[0] : grads[0].contiguous(grads[0].device().is_cpu() ? input.suggest_memory_format() : c10::MemoryFormat::Contiguous), input.device().is_xpu() ? input : input.contiguous(input.device().is_cpu() ? input.suggest_memory_format() : c10::MemoryFormat::Contiguous), result1, result2, weight, N, C, HxW, group, grad_input_mask) : std::tuple())" + result0: group_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, result1, result2, group) + result1: group_norm_mean_jvp(input_t, result1, group) + result2: group_norm_invstd_jvp(input_p, input_t, result1, result2, group) + +- name: ne_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!) + self: zeros_like(self) + result: self_t.zero_() + +- name: ne_.Tensor(Tensor(a!) self, Tensor other) -> Tensor(a!) + self: zeros_like(self) + other: zeros_like(other) + result: self_t.zero_() + +- name: neg(Tensor self) -> Tensor + self: grad.neg() + result: auto_element_wise + +- name: _batch_norm_with_update(Tensor input, Tensor? weight, Tensor? bias, Tensor(a!) running_mean, Tensor(b!) running_var, float momentum, float eps) -> (Tensor, Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? batch_norm_backward(grad, input, weight, running_mean, running_var, result1, result2, /*update*/true, eps, grad_input_mask, retain_variables ? result3.clone() : result3) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, running_mean, running_var, result1, result2, true, eps) + +- name: _batch_norm_no_update(Tensor input, Tensor? weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, float momentum, float eps) -> (Tensor, Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? batch_norm_backward(grad, input, weight, running_mean, running_var, result1, result2, /*update*/false, eps, grad_input_mask, retain_variables ? result3.clone() : result3) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, running_mean, running_var, result1, result2, false, eps) + +- name: batch_norm_backward(Tensor grad_out, Tensor input, Tensor weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var, bool update, float eps, bool[3] output_mask, Tensor reserve) -> (Tensor, Tensor, Tensor) + input, weight, grad_out: batchnorm_double_backward(input, weight, grads[0], grads[1], grads[2], grad_out, running_mean, running_var, update, eps, save_mean, save_var, grad_input_mask) + save_mean: not_implemented("batch_norm_backward save_mean") + save_var: not_implemented("batch_norm_backward save_var") + reserve: not_implemented("batch_norm_backward reserve") + +- name: nextafter(Tensor self, Tensor other) -> Tensor + self: not_implemented("nextafter") + other: not_implemented("nextafter") + +- name: norm.Scalar(Tensor self, Scalar p=2) -> Tensor + self: norm_backward(grad, self, p, result) + result: norm_jvp(self_p, self_t, p, result) + +- name: norm.ScalarOpt_dim(Tensor self, Scalar? p, int[1] dim, bool keepdim=False) -> Tensor + self: norm_backward(grad, self, p, result, dim, keepdim) + result: norm_jvp(self_p, self_t, p, result, dim, keepdim) + +- name: norm.ScalarOpt_dtype(Tensor self, Scalar? p, *, ScalarType dtype) -> Tensor + self: norm_backward(grad, self.to(grad.scalar_type()), p, result) + result: norm_jvp(self_p, self_t, p, result) + +- name: norm.ScalarOpt_dim_dtype(Tensor self, Scalar? p, int[1] dim, bool keepdim, *, ScalarType dtype) -> Tensor + self: norm_backward(grad, self.to(grad.scalar_type()), p, result, dim, keepdim) + result: norm_jvp(self_p, self_t, p, result, dim, keepdim) + +- name: linalg_vector_norm(Tensor self, Scalar ord=2, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + self: linalg_vector_norm_backward(grad, self, ord, result, dim, keepdim) + result: linalg_vector_norm_jvp(self_p, self_t, ord, result, dim, keepdim) + +- name: _pdist_forward(Tensor self, float p=2) -> Tensor + self: _pdist_backward(grad, self, p, result) + +- name: _pdist_backward(Tensor grad, Tensor self, float p, Tensor pdist) -> Tensor + grad: not_implemented("_pdist_backward") + self: not_implemented("_pdist_backward") + pdist: not_implemented("_pdist_backward") + +- name: _euclidean_dist(Tensor x1, Tensor x2) -> Tensor + x1, x2: _euclidean_dist_backward(grad, x1, x2, result) + +- name: _cdist_forward(Tensor x1, Tensor x2, float p, int? compute_mode) -> Tensor + x1: _cdist_backward(grad.contiguous(), x1, x2, p, result) + x2: _cdist_backward(grad.mT().contiguous(), x2, x1, p, result.mT().contiguous()) + +- name: _cdist_backward(Tensor grad, Tensor x1, Tensor x2, float p, Tensor cdist) -> Tensor + grad: not_implemented("_cdist_backward") + x1: not_implemented("_cdist_backward") + x2: not_implemented("_cdist_backward") + cdist: not_implemented("_cdist_backward") + +- name: normal_(Tensor(a!) self, float mean=0, float std=1, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: normal.Tensor_float(Tensor mean, float std=1, *, Generator? generator=None) -> Tensor + mean: at::zeros_symint(mean.sym_sizes(), grad.options()) + result: auto_element_wise + +- name: normal.float_Tensor(float mean, Tensor std, *, Generator? generator=None) -> Tensor + std: at::zeros_symint(std.sym_sizes(), grad.options()) + result: auto_element_wise + +- name: normal.Tensor_Tensor(Tensor mean, Tensor std, *, Generator? generator=None) -> Tensor + mean: at::zeros_symint(mean.sym_sizes(), grad.options()) + std: at::zeros_symint(std.sym_sizes(), grad.options()) + result: zeros_like(mean_t) + +- name: linalg_householder_product(Tensor input, Tensor tau) -> Tensor + input, tau: householder_product_backward(grad, result, input, tau) + result: householder_product_jvp(input_t, tau_t, result, input_p, tau_p) + +- name: ormqr(Tensor self, Tensor input2, Tensor input3, bool left=True, bool transpose=False) -> Tensor + self, input2, input3: ormqr_backward(grad, result, self, input2, input3, left, transpose, grad_input_mask) + +- name: permute(Tensor(a) self, int[] dims) -> Tensor(a) + self: permute_backwards(grad, dims) + result: auto_linear + +- name: poisson(Tensor self, Generator? generator=None) -> Tensor + self: zeros_like(self) + result: auto_element_wise + +- name: pow.Tensor_Scalar(Tensor self, Scalar exponent) -> Tensor + self: pow_backward(grad, self, exponent) + result: auto_element_wise + +- name: pow.Tensor_Tensor(Tensor self, Tensor exponent) -> Tensor + self: pow_backward_self(grad, self, exponent) + exponent: pow_backward_exponent(grad, self, exponent, result) + result: (pow_backward_self(self_t.conj(), self_p, exponent_p) + pow_backward_exponent(exponent_t.conj(), self_p, exponent_p, result)).conj() + +- name: pow.Scalar(Scalar self, Tensor exponent) -> Tensor + exponent: pow_backward_exponent(grad, self, exponent, result) + result: auto_element_wise + +- name: prod(Tensor self, *, ScalarType? dtype=None) -> Tensor + self: prod_backward(grad, self.to(grad.scalar_type()), result) + result: (prod_backward(at::ones({}, result.options()).expand_as(result), self_p.to(result.scalar_type()), result) * self_t.conj()).sum().conj() + +- name: prod.dim_int(Tensor self, int dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + self: prod_backward(grad, self.to(grad.scalar_type()), result, dim, keepdim) + result: (prod_backward(at::ones({}, result.options()).expand_as(result), self_p.to(result.scalar_type()), result, dim, keepdim) * self_t.conj()).sum(dim, keepdim).conj() + +- name: put(Tensor self, Tensor index, Tensor source, bool accumulate=False) -> Tensor + self: "accumulate ? grad : grad.put(index, zeros_like(source), false)" + index: non_differentiable + source: grad.take(index).reshape_as(source) + result: self_t.put(index, source_t, accumulate) + +- name: linalg_qr(Tensor A, str mode='reduced') -> (Tensor Q, Tensor R) + A: linalg_qr_backward(grad_Q, grad_R, Q, R, mode) + Q, R: linalg_qr_jvp(A_t, Q, R, mode) + +- name: rad2deg(Tensor self) -> Tensor + self: rad2deg_backward(grad) + result: auto_element_wise + +- name: random_.from(Tensor(a!) self, int from, int? to, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: random_.to(Tensor(a!) self, int to, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: random_(Tensor(a!) self, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: reciprocal(Tensor self) -> Tensor + self: -grad * (result * result).conj() + result: auto_element_wise + +- name: remainder.Scalar(Tensor self, Scalar other) -> Tensor + self: grad + result: auto_element_wise + +- name: remainder.Tensor(Tensor self, Tensor other) -> Tensor + self: grad + other: -grad * self.div(other, /*rounding_mode=*/"floor") + result: self_t - other_t * self_p.div(other_p, /*rounding_mode=*/"floor") + +- name: renorm(Tensor self, Scalar p, int dim, Scalar maxnorm) -> Tensor + self: renorm_backward(grad, self, p, dim, maxnorm) + result: renorm_jvp(self_p, self_t, p, dim, maxnorm) + +- name: repeat(Tensor self, SymInt[] repeats) -> Tensor + self: repeat_backward(grad, repeats, self.sym_sizes()) + result: auto_linear + +- name: special_entr(Tensor self) -> Tensor + self: grad * (-(1 + self.log())) + result: auto_element_wise + +- name: special_ndtri(Tensor self) -> Tensor + self: grad * std::sqrt(2 * M_PI) * (result.square() / 2).exp() + result: auto_element_wise + +- name: special_log_ndtr(Tensor self) -> Tensor + self: grad / std::sqrt(2 * M_PI) * (result + self.pow(2) / 2).neg().exp() + result: auto_element_wise + +# [Note: Sometimes view derivatives] +# The following situation applies to other operations as well. +# TODO: This note is only referenced by to_dense and to_sparse*. Make +# this more generic if it's been referenced more than once. +# +# DO NOT define a backward for reshape! +# reshape is special in that it sometimes returns a view, and sometimes not. +# Defining a backward will make codegen spit out the forward call as +# as_variable(baseType->reshape(self)), +# making it impossible (hard) to detect when it is actually a view. +# - name: reshape(Tensor self, IntArrayRef shape) + +- name: _reshape_alias(Tensor(a) self, SymInt[] size, SymInt[] stride) -> Tensor(a) + self: grad.reshape_symint(self.sym_sizes()) + result: auto_linear + +- name: round(Tensor self) -> Tensor + self: zeros_like(grad) + result: auto_element_wise + +- name: round.decimals(Tensor self, *, int decimals) -> Tensor + self: zeros_like(grad) + result: auto_element_wise + +- name: rsqrt(Tensor self) -> Tensor + self: -0.5 * grad * result.pow(3).conj() + result: auto_element_wise + +- name: scatter.src(Tensor self, int dim, Tensor index, Tensor src) -> Tensor + self: grad.scatter(dim, index, 0) + index: non_differentiable + src: grad.gather(dim, index) + result: self_t.scatter(dim, index, src_t) + +- name: scatter.value(Tensor self, int dim, Tensor index, Scalar value) -> Tensor + self: grad.scatter(dim, index, 0) + index: non_differentiable + result: self_t.scatter(dim, index, 0) + +- name: scatter_add(Tensor self, int dim, Tensor index, Tensor src) -> Tensor + self: grad + index: non_differentiable + src: grad.gather(dim, index) + result: scatter_add(self_t, dim, index, src_t) + +- name: select.int(Tensor(a) self, int dim, SymInt index) -> Tensor(a) + dispatch: + Default: + self: select_backward_symint(grad, self.sym_sizes(), dim, index) + result: auto_linear + AutogradNestedTensor: + self: _nested_select_backward_symint(grad, self, dim, index) + +- name: select_backward(Tensor grad_output, SymInt[] input_sizes, int dim, SymInt index) -> Tensor + grad_output: grad.select_symint(dim, index) + result: auto_linear + +- name: sigmoid(Tensor self) -> Tensor + self: sigmoid_backward(grad, result) + result: auto_element_wise + +- name: logit(Tensor self, float? eps=None) -> Tensor + self: "GradMode::is_enabled() ? infinitely_differentiable_logit_backward(grad, self, eps) : logit_backward(grad, self, eps)" + result: auto_element_wise + +- name: sign(Tensor self) -> Tensor + self: zeros_like(grad) + result: auto_element_wise + +- name: sgn(Tensor self) -> Tensor + self: sgn_backward(self, grad, result) + # Cannot use auto_element_wise here because the Jacobian is *not* Hermitian (in fact, it is symmetric) + # The function is not holomorphic, so there's no reason for its Jacobian to be Hermitian + # auto_element_wise has a name that's a bit deceiving in the complex case + result: sgn_backward(self_p, self_t, result) + +- name: sin(Tensor self) -> Tensor + self: grad * self.cos().conj() + result: auto_element_wise + +- name: sinc(Tensor self) -> Tensor + self: sinc_backward(grad, self) + result: auto_element_wise + +- name: sinh(Tensor self) -> Tensor + self: grad * self.cosh().conj() + result: auto_element_wise + +- name: slice.Tensor(Tensor(a) self, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor(a) + self: slice_backward_wrapper(grad, self.sym_sizes(), dim, start, end, step) + result: auto_linear + +- name: slice_backward(Tensor grad_output, SymInt[] input_sizes, int dim, SymInt start, SymInt end, SymInt step) -> Tensor + grad_output: grad.slice_symint(dim, start, end, step) + result: auto_linear + +- name: slice_inverse(Tensor(a) self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor(a) + self: grad.slice_symint(dim, start, end, step) + src: slice_scatter_symint(grad, zeros_like(self), dim, start, end, step) + result: auto_linear + +- name: slice_scatter(Tensor self, Tensor src, int dim=0, SymInt? start=None, SymInt? end=None, SymInt step=1) -> Tensor + self: slice_scatter_symint(grad, zeros_like(src), dim, start, end, step) + src: grad.slice_symint(dim, start, end, step) + result: auto_linear + +- name: select_scatter(Tensor self, Tensor src, int dim, SymInt index) -> Tensor + self: select_scatter_symint(grad, zeros_like(src), dim, index) + src: grad.select_symint(dim, index) + result: auto_linear + +- name: diagonal_scatter(Tensor self, Tensor src, int offset=0, int dim1=0, int dim2=1) -> Tensor + self: diagonal_scatter(grad, zeros_like(src), offset, dim1, dim2) + src: grad.diagonal(offset, dim1, dim2) + result: auto_linear + +- name: as_strided_scatter(Tensor self, Tensor src, SymInt[] size, SymInt[] stride, SymInt? storage_offset=None) -> Tensor + self: as_strided_scatter_backward(grad, TensorGeometry(self), TensorGeometry(src), size, stride, storage_offset) + # See Note [as_strided_scatter backward support] + src: grad.contiguous().as_strided_symint(size, stride, storage_offset) + result: auto_linear + +- name: _linalg_solve_ex(Tensor A, Tensor B, *, bool left=True, bool check_errors=False) -> (Tensor result, Tensor LU, Tensor pivots, Tensor info) + A, B: linalg_solve_backward(grad, result, A, LU, pivots, left, grad_input_mask[1]) + result: "linalg_solve_jvp(A_t, B_t, result, LU, pivots, left, A_p.is_contiguous() && !A_p.is_complex())" + output_differentiability: [True, False, False, False] # LU is an auxiliary tensor not exposed to the user + +- name: sort(Tensor self, int dim=-1, bool descending=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), true) + output_differentiability: [True, False] + values: gather_with_keepdimed_indices(self_t, dim, indices, true) + +- name: sort.stable(Tensor self, *, bool? stable, int dim=-1, bool descending=False) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), true) + output_differentiability: [True, False] + values: gather_with_keepdimed_indices(self_t, dim, indices, true) + +- name: split.Tensor(Tensor(a -> *) self, SymInt split_size, int dim=0) -> Tensor(a)[] + self: split_backward(grads, split_size, dim, self.sym_sizes(), self.options()) + result: auto_linear + +- name: unsafe_split.Tensor(Tensor self, SymInt split_size, int dim=0) -> Tensor[] + self: split_backward(grads, split_size, dim, self.sym_sizes(), self.options()) + result: auto_linear + +- name: split_with_sizes(Tensor(a -> *) self, SymInt[] split_sizes, int dim=0) -> Tensor(a)[] + dispatch: + Default: + self: split_with_sizes_backward(grads, split_sizes, dim, self.sym_sizes(), self.options()) + result: auto_linear + AutogradNestedTensor: + self: _nested_split_with_sizes_backward(grads, split_sizes, dim, at::native::get_nested_tensor_impl(self)->get_nested_sizes(), self.options()) + +- name: unsafe_split_with_sizes(Tensor self, SymInt[] split_sizes, int dim=0) -> Tensor[] + self: split_with_sizes_backward(grads, split_sizes, dim, self.sym_sizes(), self.options()) + result: auto_linear + +- name: sqrt(Tensor self) -> Tensor + self: grad / (2 * result.conj()) + result: auto_element_wise + +- name: squeeze(Tensor(a) self) -> Tensor(a) + self: unsqueeze_to(grad, self.sym_sizes()) + result: auto_linear + +- name: squeeze.dim(Tensor(a) self, int dim) -> Tensor(a) + dispatch: + Default: + self: unsqueeze_to(grad, dim, self.sym_sizes()) + result: auto_linear + AutogradNestedTensor: + self: grad.unsqueeze(dim) + +- name: squeeze.dims(Tensor(a) self, int[] dim) -> Tensor(a) + dispatch: + Default: + self: unsqueeze_to(grad, dim, self.sym_sizes()) + result: auto_linear + AutogradNestedTensor: + self: unsqueeze_multiple(grad, dim, self.dim()) + +- name: squeeze_(Tensor(a!) self) -> Tensor(a!) + self: unsqueeze_to(grad, self.sym_sizes()) + result: auto_linear + +- name: squeeze_.dim(Tensor(a!) self, int dim) -> Tensor(a!) + self: unsqueeze_to(grad, dim, self.sym_sizes()) + result: auto_linear + +- name: squeeze_.dims(Tensor(a!) self, int[] dim) -> Tensor(a!) + self: unsqueeze_to(grad, dim, self.sym_sizes()) + result: auto_linear + +- name: std.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> Tensor + self: std_backward(result, grad, self, dim, correction, keepdim) + # pointwise (variance) + sum + sqrt + result: (at::real(var_backward(self_t.conj(), self_p, dim, correction, true).sum(dim.value_or(IntArrayRef({})), keepdim)) / (2. * result)).masked_fill_(result == 0, 0) + +- name: std_mean.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> (Tensor, Tensor) + self: std_mean_backward(grads[0], grads[1], self, result0, dim, correction, keepdim) + result0: (at::real(var_backward(self_t.conj(), self_p, dim, correction, true).sum(dim.value_or(IntArrayRef({})), keepdim)) / (2. * result0)).masked_fill_(result0 == 0, 0) + # linear + result1: mean(self_t, dim.value_or(IntArrayRef({})), keepdim) + +- name: sub.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), grad) + other: handle_r_to_c(other.scalar_type(), maybe_multiply(-grad, alpha.conj())) + result: self_t - maybe_multiply(other_t, alpha) + +- name: sub.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), grad) + result: auto_element_wise + +- name: rsub.Tensor(Tensor self, Tensor other, *, Scalar alpha=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), maybe_multiply(-grad, alpha.conj())) + other: handle_r_to_c(other.scalar_type(), grad) + result: -maybe_multiply(self_t, alpha) + other_t + +- name: rsub.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor + self: handle_r_to_c(self.scalar_type(), maybe_multiply(-grad, alpha.conj())) + result: auto_element_wise + +- name: sum(Tensor self, *, ScalarType? dtype=None) -> Tensor + dispatch: + Default: + self: grad.expand_symint(self.sym_sizes()) + result: auto_linear + AutogradNestedTensor: + # TODO: replace this with grad.expand_as(self) when that is supported + self: ones_like(self) * grad + result: auto_linear + +- name: sum.dim_IntList(Tensor self, int[1]? dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + dispatch: + Default: + self: sum_backward(grad, self.sym_sizes(), dim, keepdim) + result: auto_linear + AutogradNestedTensor: + # TODO: replace this function once semantics for nested tensor expand have been settled on + self: _nested_sum_backward(grad, self, dim, keepdim) + +- name: nansum(Tensor self, int[1]? dim=None, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor + self: nansum_backward(grad.to(self.scalar_type()), self, dim, keepdim) + result: at::where(self_p.isnan(), 0, self_t).sum(dim, keepdim, dtype) + +# We never call _linalg_svd with compute_uv=False in an autograd context, so we don't even consider it here +- name: _linalg_svd(Tensor A, bool full_matrices=False, bool compute_uv=True, *, str? driver=None) -> (Tensor U, Tensor S, Tensor Vh) + A: "svd_backward(full_matrices && grad_U.defined() ? grad_U.narrow_symint(-1, 0, S.sym_size(-1)) : grad_U, + grad_S, + full_matrices && grad_Vh.defined() ? grad_Vh.narrow_symint(-2, 0, S.sym_size(-1)) : grad_Vh, + full_matrices ? U.narrow_symint(-1, 0, S.sym_size(-1)) : U, + S, + full_matrices ? Vh.narrow_symint(-2, 0, S.sym_size(-1)) : Vh)" + U, S, Vh: linalg_svd_jvp(A_t, U, S, Vh, full_matrices) + +- name: _linalg_eigh(Tensor A, str UPLO="L", bool compute_v=True) -> (Tensor eigenvalues, Tensor eigenvectors) + A: linalg_eig_backward(grads[0], grads[1], eigenvalues, eigenvectors, /*is_hermitian=*/true) + eigenvalues, eigenvectors: linalg_eig_jvp(A_t, eigenvalues, eigenvectors, /*is_hermitian=*/true) + +- name: linalg_eig(Tensor self) -> (Tensor eigenvalues, Tensor eigenvectors) + self: handle_r_to_c(self.scalar_type(), linalg_eig_backward(grads[0], grads[1], eigenvalues, eigenvectors, /*is_hermitian=*/false)) + eigenvalues, eigenvectors: linalg_eig_jvp(self_t, eigenvalues, eigenvectors, /*is_hermitian=*/false) + +- name: t(Tensor(a) self) -> Tensor(a) + self: grad.t() + result: auto_linear + +- name: t_(Tensor(a!) self) -> Tensor(a!) + self: grad.t() + result: auto_linear + +- name: one_hot(Tensor self, int num_classes=-1) -> Tensor + self: non_differentiable + +- name: flip(Tensor self, int[] dims) -> Tensor + self: grad.flip(dims) + result: auto_linear + +- name: roll(Tensor self, SymInt[1] shifts, int[1] dims=[]) -> Tensor + self: grad.roll_symint(fmap(reverse_list_symint(shifts), [](c10::SymInt i){return -i;}), reverse_list(dims)) + result: auto_linear + +- name: rot90(Tensor self, int k=1, int[] dims=[0,1]) -> Tensor + self: grad.rot90(-k, dims) + result: auto_linear + +- name: take(Tensor self, Tensor index) -> Tensor + self: take_backward(grad, self, index) + index: non_differentiable + result: auto_linear + +- name: tan(Tensor self) -> Tensor + self: grad * (1 + result.pow(2)).conj() + result: auto_element_wise + +- name: tanh(Tensor self) -> Tensor + self: tanh_backward(grad, result) + result: auto_element_wise + +- name: topk(Tensor self, SymInt k, int dim=-1, bool largest=True, bool sorted=True) -> (Tensor values, Tensor indices) + self: value_selecting_reduction_backward_symint(grad, dim, indices, self.sym_sizes(), true) + output_differentiability: [True, False] + values: gather(self_t, dim, indices) + +- name: trace(Tensor self) -> Tensor + self: trace_backward_symint(grad, self.sym_sizes()) + result: auto_linear + +- name: transpose.int(Tensor(a) self, int dim0, int dim1) -> Tensor(a) + self: grad.transpose(dim0, dim1) + result: auto_linear + +- name: transpose_(Tensor(a!) self, int dim0, int dim1) -> Tensor(a!) + self: grad.transpose(dim0, dim1) + result: auto_linear + +- name: triangular_solve(Tensor self, Tensor A, bool upper=True, bool transpose=False, bool unitriangular=False) -> (Tensor solution, Tensor cloned_coefficient) + self, A: triangular_solve_backward(grad_solution, grad_cloned_coefficient, self, A, solution, upper, transpose, unitriangular, grad_input_mask) + solution: triangular_solve_jvp(solution, A_p, A_t, self_t, upper, transpose, unitriangular) + cloned_coefficient: A_t + +- name: linalg_solve_triangular(Tensor self, Tensor B, *, bool upper, bool left=True, bool unitriangular=False) -> Tensor + self, B: linalg_solve_triangular_backward(grad, self, result, upper, left, unitriangular, grad_input_mask) + result: linalg_solve_triangular_forward_AD(self_t, B_t, self_p, result, upper, left, unitriangular) + +- name: tril(Tensor self, int diagonal=0) -> Tensor + self: grad.tril(diagonal) + result: auto_linear + +- name: triu(Tensor self, int diagonal=0) -> Tensor + self: grad.triu(diagonal) + result: auto_linear + +- name: trunc(Tensor self) -> Tensor + self: zeros_like(grad) + result: auto_element_wise + +# DO NOT define a backward for to_dense +# See [Note: Sometimes view derivatives] +# - name: to_dense(Tensor self, ScalarType? dtype=None, *, bool? masked_grad=None) -> Tensor +# +- name: _to_dense(Tensor self, ScalarType? dtype=None, bool? masked_grad=None) -> Tensor + self: to_dense_backward(grad, self, masked_grad) + +# DO NOT define a backward for to_sparse.sparse_dim +# See [Note: Sometimes view derivatives] +# - name: to_sparse.sparse_dim(Tensor self, int sparse_dim) -> Tensor +# +- name: _to_sparse.sparse_dim(Tensor self, int sparse_dim) -> Tensor + self: to_sparse_backward(grad, self.layout(), self.sym_blocksize()) + +# DO NOT define a backward for to_sparse +# See [Note: Sometimes view derivatives] +# - name: to_sparse(Tensor self, *, Layout? layout=None, int[2]? blocksize=None, int? dense_dim=None) -> Tensor +# +- name: _to_sparse(Tensor self, *, Layout? layout=None, int[2]? blocksize=None, int? dense_dim=None) -> Tensor + self: to_sparse_backward(grad, self.layout(), self.sym_blocksize()) + +# DO NOT define a backward for to_sparse_csr +# See [Note: Sometimes view derivatives] +# - name: to_sparse_csr(Tensor self, int? dense_dim=None) -> Tensor +# +- name: _to_sparse_csr(Tensor self, int? dense_dim=None) -> Tensor + self: to_sparse_backward(grad, self.layout(), self.sym_blocksize()) + +# DO NOT define a backward for to_sparse_csc +# See [Note: Sometimes view derivatives] +# - name: to_sparse_csc(Tensor self, int? dense_dim=None) -> Tensor +# +- name: _to_sparse_csc(Tensor self, int? dense_dim=None) -> Tensor + self: to_sparse_backward(grad, self.layout(), self.sym_blocksize()) + +# DO NOT define a backward for to_sparse_bsr +# See [Note: Sometimes view derivatives] +# - name: to_sparse_bsr(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor +# +- name: _to_sparse_bsr(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor + self: to_sparse_backward(grad, self.layout(), self.sym_blocksize()) + +# DO NOT define a backward for to_sparse_bsc +# See [Note: Sometimes view derivatives] +# - name: to_sparse_bsc(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor +# +- name: _to_sparse_bsc(Tensor self, int[2] blocksize, int? dense_dim=None) -> Tensor + self: to_sparse_backward(grad, self.layout(), self.sym_blocksize()) + +- name: to_mkldnn(Tensor self, ScalarType? dtype=None) -> Tensor + self: to_mkldnn_backward(grad, self) + +- name: unfold(Tensor(a) self, int dimension, int size, int step) -> Tensor(a) + self: unfold_backward_symint(grad, self.sym_sizes(), dimension, size, step) + result: auto_linear + +- name: unfold_backward(Tensor grad_in, SymInt[] input_sizes, int dim, int size, int step) -> Tensor + grad_in: grad.unfold(dim, size, step) + result: auto_linear + +- name: uniform_(Tensor(a!) self, float from=0, float to=1, *, Generator? generator=None) -> Tensor(a!) + self: zeros_like(grad) + result: self_t.zero_() + +- name: _unique(Tensor self, bool sorted=True, bool return_inverse=False) -> (Tensor, Tensor) + output_differentiability: [True, False] + self: not_implemented("_unique") + +- name: unique_dim(Tensor self, int dim, bool sorted=True, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) + output_differentiability: [True, False, False] + self: not_implemented("unique_dim") + +- name: unique_consecutive(Tensor self, bool return_inverse=False, bool return_counts=False, int? dim=None) -> (Tensor, Tensor, Tensor) + output_differentiability: [True, False, False] + self: not_implemented("unique_consecutive") + +- name: unique_dim_consecutive(Tensor self, int dim, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) + output_differentiability: [True, False, False] + self: not_implemented("unique_dim_consecutive") + +- name: _unique2(Tensor self, bool sorted=True, bool return_inverse=False, bool return_counts=False) -> (Tensor, Tensor, Tensor) + output_differentiability: [True, False, False] + self: not_implemented("_unique2") + +- name: _unsafe_view(Tensor self, SymInt[] size) -> Tensor + self: grad.reshape_symint(self.sym_sizes()) + result: auto_linear + +- name: lift(Tensor self) -> Tensor + self: grad + result: auto_linear + +- name: lift_fresh(Tensor(a) self) -> Tensor(a) + self: grad + result: auto_linear + +- name: unsqueeze(Tensor(a) self, int dim) -> Tensor(a) + self: grad.squeeze(dim) + result: auto_linear + +- name: unsqueeze_(Tensor(a!) self, int dim) -> Tensor(a!) + self: grad.squeeze(dim) + result: auto_linear + +- name: var.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> Tensor + self: var_backward(grad, self, dim, correction, keepdim) + # pointwise + sum + result: at::real(var_backward(self_t.conj(), self_p, dim, correction, true).sum(dim.value_or(IntArrayRef({})), keepdim)) + +- name: var_mean.correction(Tensor self, int[1]? dim=None, *, Scalar? correction=None, bool keepdim=False) -> (Tensor, Tensor) + self: var_mean_backward(grads[0], grads[1], self, dim, correction, keepdim) + result0: at::real(var_backward(self_t.conj(), self_p, dim, correction, true).sum(dim.value_or(IntArrayRef({})), keepdim)) + # linear + result1: mean(self_t, dim.value_or(IntArrayRef({})), keepdim) + +- name: view(Tensor(a) self, SymInt[] size) -> Tensor(a) + dispatch: + Default: + self: grad.reshape_symint(self.sym_sizes()) + result: auto_linear + AutogradNestedTensor: + self: grad.reshape_as(self) + result: auto_linear + +- name: view.dtype(Tensor(a) self, ScalarType dtype) -> Tensor(a) + output_differentiability: [False] + +- name: view_as_real(Tensor(a) self) -> Tensor(a) + self: at::view_as_complex(grad.contiguous()) # gx0 + 1j * gx1 + result: at::view_as_real(self_t) + +- name: view_as_complex(Tensor(a) self) -> Tensor(a) + self: at::view_as_real(grad.contiguous().resolve_conj()) # [gx, gy] + result: at::view_as_complex(self_t) + +- name: where.self(Tensor condition, Tensor self, Tensor other) -> Tensor + condition: non_differentiable + self: where(condition, grad, 0) + other: where(condition, 0, grad) + result: where(condition, self_t, other_t) + +# weight_norm_cuda_interface_backward does not have an explicitly defined derivative, so if we do happen +# to be running backward with create_graph=True, fall back to a backward function that uses +# differentiable ops. +- name: _weight_norm_interface(Tensor v, Tensor g, int dim=0) -> (Tensor, Tensor) + v, g: "grad.defined() ? (GradMode::is_enabled() ? _weight_norm_differentiable_backward(grad.contiguous(), v, g, result1, dim) : _weight_norm_interface_backward(grad.contiguous(), v, g, result1, dim)) : std::tuple()" + +- name: zero_(Tensor(a!) self) -> Tensor(a!) + self: zeros_like(grad) + result: auto_linear + +- name: sparse_mask(Tensor self, Tensor mask) -> Tensor + self: sparse_mask_backward(grad, mask, self.layout()) + mask: non_differentiable + +- name: _sparse_coo_tensor_with_dims_and_tensors(int sparse_dim, int dense_dim, SymInt[] size, Tensor indices, Tensor values, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False, bool? is_coalesced=None) -> Tensor + indices: non_differentiable + values: grad.sparse_mask(result)._values() + +- name: sparse_compressed_tensor.comp_plain_value_size(Tensor compressed_indices, Tensor plain_indices, Tensor values, SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=False) -> Tensor + compressed_indices: non_differentiable + plain_indices: non_differentiable + # TODO: remove to_dense after gh-107381 is fixed + values: grad.to_dense().sparse_mask(result).values() + +- name: _sparse_sum.dim(Tensor self, int[1] dim) -> Tensor + self: at::_sparse_sum_backward(grad, self, dim) + +- name: _standard_gamma(Tensor self, Generator? generator=None) -> Tensor + self: grad * _standard_gamma_grad(self, result) + +- name: _standard_gamma_grad(Tensor self, Tensor output) -> Tensor + self: not_implemented("_standard_gamma_grad") + +- name: values(Tensor(a) self) -> Tensor(a) + dispatch: + Default: + self: values_backward(grad, self) + AutogradNestedTensor: + self: at::_nested_view_from_buffer(grad.contiguous(), self._nested_tensor_size(), self._nested_tensor_strides(), self._nested_tensor_storage_offsets()) + +# Why is _values() not differentiable? +# See NOTE [ Sparse: autograd and API ] +- name: _values(Tensor(a) self) -> Tensor(a) + output_differentiability: [False] + +# NN +- name: _trilinear(Tensor i1, Tensor i2, Tensor i3, int[] expand1, int[] expand2, int[] expand3, int[] sumdim, int unroll_dim=1) -> Tensor + i1, i2, i3: "_trilinear_backward(grad, + wrap_opt_if(i1, grad_input_mask[1] || grad_input_mask[2]), + wrap_opt_if(i2, grad_input_mask[0] || grad_input_mask[2]), + wrap_opt_if(i3, grad_input_mask[0] || grad_input_mask[1]), + expand1, expand2, expand3, sumdim, grad_input_mask)" + result: "_trilinear(i1_t, i2_p, i3_p, expand1, expand2, expand3, sumdim, unroll_dim) + + _trilinear(i1_p, i2_t, i3_p, expand1, expand2, expand3, sumdim, unroll_dim) + + _trilinear(i1_p, i2_p, i3_t, expand1, expand2, expand3, sumdim, unroll_dim)" + +- name: constant_pad_nd(Tensor self, SymInt[] pad, Scalar value=0) -> Tensor + self: constant_pad_nd_backward(grad, pad) + result: constant_pad_nd_symint(self_t, pad, 0) + +- name: binary_cross_entropy(Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor + self: binary_cross_entropy_backward(grad, self, target, weight, reduction) + target: binary_cross_entropy_target_backward(grad, self, target, weight, reduction) + result: "apply_loss_reduction( + binary_cross_entropy_backward(self_t, self_p, target_p, weight, at::Reduction::None) + + binary_cross_entropy_target_backward(target_t, self_p, target_p, weight, at::Reduction::None), + reduction)" + +- name: binary_cross_entropy_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight=None, int reduction=Mean) -> Tensor + self: binary_cross_entropy_double_backward(grad_output, grad, self, target, weight, reduction) + target: binary_cross_entropy_double_backward_target(grad, grad_output, self, target, weight, reduction) + grad_output: binary_cross_entropy_double_backward_grad_output(grad, self, target, weight, reduction) + result: " binary_cross_entropy_double_backward(grad_output_p, self_t, self_p, target_p, weight, reduction) + + binary_cross_entropy_double_backward_target(target_t, grad_output_p, self_p, target_p, weight, reduction) + + binary_cross_entropy_double_backward_grad_output(grad_output_t, self_p, target_p, weight, reduction)" + +- name: binary_cross_entropy_with_logits(Tensor self, Tensor target, Tensor? weight=None, Tensor? pos_weight=None, int reduction=Mean) -> Tensor + self: binary_cross_entropy_with_logits_backward(grad, self, target, weight, pos_weight, reduction) + target: binary_cross_entropy_with_logits_target_backward(grad, self, target, weight, pos_weight, reduction) + result: "apply_loss_reduction( + binary_cross_entropy_with_logits_backward(self_t, self_p, target_p, weight, pos_weight, at::Reduction::None) + + binary_cross_entropy_with_logits_target_backward(target_t, self_p, target_p, weight, pos_weight, at::Reduction::None), + reduction)" + +- name: embedding(Tensor weight, Tensor indices, SymInt padding_idx=-1, bool scale_grad_by_freq=False, bool sparse=False) -> Tensor + indices: non_differentiable + weight: embedding_backward_symint(grad, indices, weight.sym_size(0), padding_idx, scale_grad_by_freq, sparse) + result: auto_linear + +- name: embedding_dense_backward(Tensor grad_output, Tensor indices, SymInt num_weights, SymInt padding_idx, bool scale_grad_by_freq) -> Tensor + grad_output: embedding_dense_double_backward_symint(grad, indices, padding_idx) + indices: non_differentiable + result: auto_linear + +- name: _embedding_bag(Tensor weight, Tensor indices, Tensor offsets, bool scale_grad_by_freq=False, int mode=0, bool sparse=False, Tensor? per_sample_weights=None, bool include_last_offset=False, int padding_idx=-1) -> (Tensor, Tensor, Tensor, Tensor) + indices: non_differentiable + offsets: non_differentiable + weight: _embedding_bag_backward_symint(grad, indices, offsets, result1, result2, result3, weight.sym_size(0), scale_grad_by_freq, mode, sparse, per_sample_weights, padding_idx) + per_sample_weights: _embedding_bag_per_sample_weights_backward(grad, weight, indices, offsets, result1, mode, padding_idx) + +- name: _embedding_bag_backward(Tensor grad, Tensor indices, Tensor offsets, Tensor offset2bag, Tensor bag_size, Tensor maximum_indices, SymInt num_weights, bool scale_grad_by_freq, int mode, bool sparse, Tensor? per_sample_weights, int padding_idx=-1) -> Tensor + grad: not_implemented("_embedding_bag_backward") + indices: non_differentiable + offsets: non_differentiable + offset2bag: non_differentiable + bag_size: non_differentiable + maximum_indices: non_differentiable + per_sample_weights: not_implemented("_embedding_bag_backward") + +- name: _embedding_bag_dense_backward(Tensor grad, Tensor indices, Tensor offset2bag, Tensor bag_size, Tensor maximum_indices, SymInt num_weights, bool scale_grad_by_freq, int mode, Tensor? per_sample_weights, int padding_idx=-1) -> Tensor + grad: not_implemented("_embedding_bag_dense_backward") + indices: non_differentiable + offset2bag: non_differentiable + bag_size: non_differentiable + maximum_indices: non_differentiable + per_sample_weights: not_implemented("_embedding_bag_dense_backward") + +- name: embedding_renorm_(Tensor(a!) self, Tensor indices, float max_norm, float norm_type) -> Tensor(a!) + indices: non_differentiable + self: not_implemented("embedding_renorm") + +- name: mse_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor + self: mse_loss_backward(grad, self, target, reduction) + target: mse_loss_backward(grad, target, self, reduction) + result: apply_loss_reduction(mse_loss_backward(self_t.conj(), self_p, target_p, at::Reduction::None).conj() + mse_loss_backward(target_t.conj(), target_p, self_p, at::Reduction::None).conj(), reduction) + +- name: multi_margin_loss(Tensor self, Tensor target, Scalar p=1, Scalar margin=1, Tensor? weight=None, int reduction=Mean) -> Tensor + self: multi_margin_loss_backward(grad, self, target, p, margin, weight, reduction) + target: non_differentiable + +- name: multilabel_margin_loss_forward(Tensor self, Tensor target, int reduction) -> (Tensor output, Tensor is_target) + self: multilabel_margin_loss_backward(grad, self, target, reduction, is_target) + target: non_differentiable + +- name: nll_loss_forward(Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index) -> (Tensor output, Tensor total_weight) + self: nll_loss_backward_symint(grad, self, target, weight, reduction, ignore_index, total_weight) + target: non_differentiable + output: std::get<0>(nll_loss_forward_symint(self_t, target, weight, reduction, ignore_index)) + +- name: nll_loss2d_forward(Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index) -> (Tensor output, Tensor total_weight) + self: nll_loss2d_backward_symint(grad, self, target, weight, reduction, ignore_index, total_weight) + target: non_differentiable + output: std::get<0>(nll_loss2d_forward_symint(self_t, target, weight, reduction, ignore_index)) + +- name: smooth_l1_loss(Tensor self, Tensor target, int reduction=Mean, float beta=1.0) -> Tensor + self: smooth_l1_loss_backward(grad, self, target, reduction, beta) + target: smooth_l1_loss_backward(grad, target, self, reduction, beta) + result: apply_loss_reduction(smooth_l1_loss_backward(self_t.conj(), self_p, target_p, at::Reduction::None, beta).conj() + smooth_l1_loss_backward(target_t.conj(), target_p, self_p, at::Reduction::None, beta).conj(), reduction) + +- name: huber_loss(Tensor self, Tensor target, int reduction=Mean, float delta=1.0) -> Tensor + self: huber_loss_backward(grad, self, target, reduction, delta) + target: huber_loss_backward(grad, target, self, reduction, delta) + result: apply_loss_reduction(huber_loss_backward(self_t.conj(), self_p, target_p, at::Reduction::None, delta).conj() + huber_loss_backward(target_t.conj(), target_p, self_p, at::Reduction::None, delta).conj(), reduction) + +- name: soft_margin_loss(Tensor self, Tensor target, int reduction=Mean) -> Tensor + self: soft_margin_loss_backward(grad, self, target, reduction) + result: apply_loss_reduction(soft_margin_loss_backward(self_t.conj(), self_p, target, at::Reduction::None).conj(), reduction) + +- name: relu(Tensor self) -> Tensor + self: threshold_backward(grad, result, 0) + result: auto_element_wise + +- name: silu(Tensor self) -> Tensor + self: "GradMode::is_enabled() ? infinitely_differentiable_silu_backward(grad, self) : silu_backward(grad, self)" + result: auto_element_wise + +- name: mish(Tensor self) -> Tensor + self: "GradMode::is_enabled() ? infinitely_differentiable_mish_backward(grad, self) : mish_backward(grad, self)" + result: auto_element_wise + +- name: elu(Tensor self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1) -> Tensor + self: elu_backward(grad, alpha, scale, input_scale, /* is_result */ false, self) + result: auto_element_wise + +- name: elu_(Tensor(a!) self, Scalar alpha=1, Scalar scale=1, Scalar input_scale=1) -> Tensor(a!) + self: elu_backward(grad, alpha, scale, input_scale, /* is_result */ true, result) + result: self_t.copy_(elu_backward(original_self_t, alpha, scale, input_scale, /* is_result */ true, result)) + +- name: celu(Tensor self, Scalar alpha=1.0) -> Tensor + self: elu_backward(grad, alpha, 1, 1.0/alpha.toFloat(), /* is_result */ false, self) + result: auto_element_wise + +- name: celu_(Tensor(a!) self, Scalar alpha=1.0) -> Tensor(a!) + self: elu_backward(grad, alpha, 1, 1.0/alpha.toFloat(), /* is_result */ true, result) + result: self_t.copy_(elu_backward(original_self_t, alpha, 1, 1.0/alpha.toFloat(), /* is_result */ true, result)) + +- name: gelu(Tensor self, *, str approximate='none') -> Tensor + self: gelu_backward(grad, self, approximate) + result: auto_element_wise + +- name: gelu_backward(Tensor grad_output, Tensor self, *, str approximate='none') -> Tensor + grad_output: gelu_backward(grad, self, approximate) + self: gelu_double_backward(grad, grad_output, self, approximate) + result: gelu_backward(grad_output_t, self_p, approximate) + gelu_double_backward(self_t, grad_output_p, self_p, approximate) + +- name: glu(Tensor self, int dim=-1) -> Tensor + # TODO: glu_backward can benefit from forward result, + # and forward ad/forward over reverse ad for that matter + self: glu_backward(grad, self, dim) + result: glu_jvp(result, self_p, self_t, dim) + +- name: hardshrink(Tensor self, Scalar lambd=0.5) -> Tensor + self: hardshrink_backward(grad, self, lambd) + result: auto_element_wise + +- name: hardshrink_backward(Tensor grad_out, Tensor self, Scalar lambd) -> Tensor + grad_out: hardshrink_backward(grad, self, lambd) + self: zeros_like(grad) + result: at::where((self_p > lambd).logical_or(self_p < -lambd), grad_out_t, at::zeros({}, result.options()).expand_as(result)) + +- name: hardtanh(Tensor self, Scalar min_val=-1, Scalar max_val=1) -> Tensor + self: hardtanh_backward(grad, self, min_val, max_val) + result: auto_element_wise + +- name: leaky_relu(Tensor self, Scalar negative_slope=0.01) -> Tensor + self: leaky_relu_backward(grad, self, negative_slope, false) + result: auto_element_wise + +- name: leaky_relu_(Tensor(a!) self, Scalar negative_slope=0.01) -> Tensor(a!) + self: leaky_relu_backward(grad, result, negative_slope, true) + result: self_t.copy_(leaky_relu_backward(original_self_t.conj(), result, negative_slope, true).conj()) + +- name: log_sigmoid_forward(Tensor self) -> (Tensor output, Tensor buffer) + self: log_sigmoid_backward(grad, self, buffer) + output: log_sigmoid_backward(self_t.conj(), self_p, buffer).conj() + output_differentiability: [True, False] + +- name: _log_softmax(Tensor self, int dim, bool half_to_float) -> Tensor + self: _log_softmax_backward_data(grad, result, dim, self.scalar_type()) + result: self_t - logsumexp_jvp(self_p, self_t, {dim}, true) + +- name: _sparse_log_softmax(Tensor self, int dim, bool half_to_float) -> Tensor + self: _sparse_log_softmax_backward_data(grad, result, dim, self) + +- name: _masked_softmax(Tensor self, Tensor mask, int? dim=None, int? mask_type=None) -> Tensor + self: _masked_softmax_backward(grad, result, mask, dim) + mask: non_differentiable + +- name: _prelu_kernel(Tensor self, Tensor weight) -> Tensor + self, weight: "grad.defined() ? _prelu_kernel_backward(grad, self, weight) : std::tuple()" + result: at::where(self_p >= 0, self_t, weight_p * self_t + weight_t * self_p) + +- name: _prelu_kernel_backward(Tensor grad_output, Tensor self, Tensor weight) -> (Tensor, Tensor) + grad_output: "grads[0].defined() ? + (grads[1].defined() ? at::where(self >= 0, grads[0], grads[0] * weight + grads[1] * self) + : at::where(self >= 0, grads[0], grads[0] * weight)) + : at::where(self >= 0, at::zeros({}, grad_output.options()), grads[1] * self)" + self: "grads[1].defined() ? at::where(self >= 0, at::zeros({}, self.options()), grad_output * grads[1]) : zeros_like(self)" + weight: "grads[0].defined() ? at::where(self >= 0, at::zeros({}, weight.options()), grad_output * grads[0]) : zeros_like(self)" + result0: at::where(self_p >= 0, grad_output_t, grad_output_t * weight_p + grad_output_p * weight_t) + result1: at::where(self_p >= 0, at::zeros({}, self_p.options()), grad_output_p * self_t + grad_output_t * self_p) + +- name: rrelu_with_noise(Tensor self, Tensor(b!) noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor + self: rrelu_with_noise_backward(grad, self, noise, lower, upper, training, false) + result: auto_element_wise + +- name: rrelu_with_noise_(Tensor(a!) self, Tensor(b!) noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> Tensor(a!) + self: rrelu_with_noise_backward(grad, result, noise, lower, upper, training, true) + +- name: rrelu_with_noise_functional(Tensor self, Tensor noise, Scalar lower=0.125, Scalar upper=0.3333333333333333, bool training=False, Generator? generator=None) -> (Tensor, Tensor noise_out) + noise: non_differentiable + self: rrelu_with_noise_backward(grad, self, noise, lower, upper, training, false) + +- name: _softmax(Tensor self, int dim, bool half_to_float) -> Tensor + self: _softmax_backward_data(grad, result, dim, self.scalar_type()) + result: result * (self_t - logsumexp_jvp(self_p, self_t, {dim}, true)) + +- name: _sparse_softmax(Tensor self, int dim, bool half_to_float) -> Tensor + self: _sparse_softmax_backward_data(grad, result, dim, self) + +- name: _sparse_sparse_matmul(Tensor self, Tensor other) -> Tensor + self: sparse_sparse_matmul_backward(grad, self, other, 0) + other: sparse_sparse_matmul_backward(grad, self, other, 1) + +- name: softplus(Tensor self, Scalar beta=1, Scalar threshold=20) -> Tensor + self: softplus_backward(grad, self, beta, threshold) + result: auto_element_wise + +- name: softshrink(Tensor self, Scalar lambd=0.5) -> Tensor + self: softshrink_backward(grad, self, lambd) + result: auto_element_wise + +- name: threshold(Tensor self, Scalar threshold, Scalar value) -> Tensor + self: threshold_backward(grad, self, threshold) + result: auto_element_wise + +- name: threshold_(Tensor(a!) self, Scalar threshold, Scalar value) -> Tensor(a!) + self: threshold_backward(grad, self, threshold) + result: self_t.copy_(threshold_backward(self_t.conj(), original_self_p, threshold).conj()) + +- name: reflection_pad1d(Tensor self, SymInt[2] padding) -> Tensor + self: reflection_pad1d_backward_symint(grad, self, padding) + result: auto_linear + +- name: reflection_pad2d(Tensor self, SymInt[4] padding) -> Tensor + self: reflection_pad2d_backward_symint(grad, self, padding) + result: auto_linear + +- name: reflection_pad3d(Tensor self, SymInt[6] padding) -> Tensor + self: reflection_pad3d_backward_symint(grad, self, padding) + result: auto_linear + +- name: replication_pad1d(Tensor self, SymInt[2] padding) -> Tensor + self: replication_pad1d_backward_symint(grad, self, padding) + result: auto_linear + +- name: replication_pad2d(Tensor self, SymInt[4] padding) -> Tensor + self: replication_pad2d_backward_symint(grad, self, padding) + result: auto_linear + +- name: replication_pad3d(Tensor self, SymInt[6] padding) -> Tensor + self: replication_pad3d_backward_symint(grad, self, padding) + result: auto_linear + +- name: upsample_linear1d(Tensor self, SymInt[1] output_size, bool align_corners, float? scales=None) -> Tensor + self: upsample_linear1d_backward_symint(grad, output_size, self.sym_sizes(), align_corners, scales) + result: auto_linear + +- name: upsample_bilinear2d(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + self: upsample_bilinear2d_backward_symint(grad, output_size, self.sym_sizes(), align_corners, scales_h, scales_w) + result: auto_linear + +- name: _upsample_bilinear2d_aa(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + self: _upsample_bilinear2d_aa_backward_symint(grad, output_size, self.sym_sizes(), align_corners, scales_h, scales_w) + result: auto_linear + +- name: upsample_bicubic2d(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + self: upsample_bicubic2d_backward_symint(grad, output_size, self.sym_sizes(), align_corners, scales_h, scales_w) + result: auto_linear + +- name: _upsample_bicubic2d_aa(Tensor self, SymInt[2] output_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + self: _upsample_bicubic2d_aa_backward_symint(grad, output_size, self.sym_sizes(), align_corners, scales_h, scales_w) + result: auto_linear + +- name: upsample_trilinear3d(Tensor self, SymInt[3] output_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + self: upsample_trilinear3d_backward_symint(grad, output_size, self.sym_sizes(), align_corners, scales_d, scales_h, scales_w) + result: auto_linear + +- name: upsample_nearest1d(Tensor self, SymInt[1] output_size, float? scales=None) -> Tensor + self: upsample_nearest1d_backward_symint(grad, output_size, self.sym_sizes(), scales) + result: auto_linear + +- name: _upsample_nearest_exact1d(Tensor self, SymInt[1] output_size, float? scales=None) -> Tensor + self: _upsample_nearest_exact1d_backward_symint(grad, output_size, self.sym_sizes(), scales) + result: auto_linear + +- name: upsample_nearest2d(Tensor self, SymInt[2] output_size, float? scales_h=None, float? scales_w=None) -> Tensor + self: upsample_nearest2d_backward_symint(grad, output_size, self.sym_sizes(), scales_h, scales_w) + result: auto_linear + +- name: _upsample_nearest_exact2d(Tensor self, SymInt[2] output_size, float? scales_h=None, float? scales_w=None) -> Tensor + self: _upsample_nearest_exact2d_backward_symint(grad, output_size, self.sym_sizes(), scales_h, scales_w) + result: auto_linear + +- name: upsample_nearest3d(Tensor self, SymInt[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + self: upsample_nearest3d_backward_symint(grad, output_size, self.sym_sizes(), scales_d, scales_h, scales_w) + result: auto_linear + +- name: _upsample_nearest_exact3d(Tensor self, SymInt[3] output_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + self: _upsample_nearest_exact3d_backward_symint(grad, output_size, self.sym_sizes(), scales_d, scales_h, scales_w) + result: auto_linear + +- name: pixel_shuffle(Tensor self, int upscale_factor) -> Tensor + self: pixel_unshuffle(grad, upscale_factor) + result: auto_linear + +- name: pixel_unshuffle(Tensor self, int downscale_factor) -> Tensor + self: pixel_shuffle(grad, downscale_factor) + result: auto_linear + +- name: channel_shuffle(Tensor self, SymInt groups) -> Tensor + self: channel_shuffle_symint(grad, grad.sym_size(1) / groups) + result: auto_linear + +- name: _adaptive_avg_pool2d(Tensor self, SymInt[2] output_size) -> Tensor + self: _adaptive_avg_pool2d_backward(grad, self) + result: auto_linear + +- name: _adaptive_avg_pool3d(Tensor self, SymInt[3] output_size) -> Tensor + self: _adaptive_avg_pool3d_backward(grad, self) + result: auto_linear + +- name: adaptive_max_pool2d(Tensor self, int[2] output_size) -> (Tensor, Tensor) + self: adaptive_max_pool2d_backward(grad, self, result1) + result0: gather(self_t.flatten(-2), -1, result1.flatten(-2)).view_as(result1) + output_differentiability: [True, False] + +- name: adaptive_max_pool3d(Tensor self, int[3] output_size) -> (Tensor, Tensor) + self: adaptive_max_pool3d_backward(grad, self, result1) + result0: gather(self_t.flatten(-3), -1, result1.flatten(-3)).view_as(result1) + output_differentiability: [True, False] + +- name: avg_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None) -> Tensor + self: avg_pool2d_backward(grad, self, kernel_size, stride, padding, ceil_mode, count_include_pad, divisor_override) + result: auto_linear + +- name: avg_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, bool ceil_mode=False, bool count_include_pad=True, int? divisor_override=None) -> Tensor + self: avg_pool3d_backward(grad, self, kernel_size, stride, padding, ceil_mode, count_include_pad, divisor_override) + result: auto_linear + +- name: fractional_max_pool2d(Tensor self, int[2] kernel_size, int[2] output_size, Tensor random_samples) -> (Tensor, Tensor) + self: fractional_max_pool2d_backward(grad, self, kernel_size, output_size, result1) + result0: gather(self_t.flatten(-2), -1, result1.flatten(-2)).view_as(result1) + output_differentiability: [True, False] + +- name: fractional_max_pool3d(Tensor self, int[3] kernel_size, int[3] output_size, Tensor random_samples) -> (Tensor, Tensor) + self: fractional_max_pool3d_backward(grad, self, kernel_size, output_size, result1) + result0: gather(self_t.flatten(-3), -1, result1.flatten(-3)).view_as(result1) + output_differentiability: [True, False] + +- name: linear(Tensor input, Tensor weight, Tensor? bias=None) -> Tensor + input, weight, bias: "grad.defined() ? linear_backward(input, grad, weight, grad_input_mask) : std::tuple()" + +- name: linear_backward(Tensor self, Tensor grad_output, Tensor weight, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + self, grad_output, weight: linear_double_backward(grads, self, grad_output, weight) + +#mps +- name: max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + self: max_pool2d_backward(grad, self, kernel_size, stride, padding, dilation, ceil_mode) + +- name: _mps_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups) -> Tensor + self, weight, bias: "grad.defined() ? mps_convolution_backward_symint(self, grad, weight, padding, stride, dilation, groups, grad_input_mask) : std::tuple()" + +- name: mps_convolution_backward(Tensor self, Tensor grad_output, Tensor weight, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + grad_output, self, weight: _convolution_double_backward_symint(grads[0], grads[1], grads[2], grad_output, weight, self, stride, padding, dilation, false, std::vector(padding.size(), 0), groups, grad_input_mask) + +- name: max_pool2d_with_indices(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor) + self: max_pool2d_with_indices_backward(grad, self, kernel_size, stride, padding, dilation, ceil_mode, result1) + result0: gather(self_t.flatten(-2), -1, result1.flatten(-2)).view_as(result1) + output_differentiability: [True, False] + +- name: max_pool3d_with_indices(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> (Tensor, Tensor) + self: max_pool3d_with_indices_backward(grad, self, kernel_size, stride, padding, dilation, ceil_mode, result1) + result0: gather(self_t.flatten(-3), -1, result1.flatten(-3)).view_as(result1) + output_differentiability: [True, False] + +- name: max_unpool2d(Tensor self, Tensor indices, SymInt[2] output_size) -> Tensor + self: max_pool_double_backward(grad, indices, 2) + indices: non_differentiable + result: auto_linear + +- name: max_unpool3d(Tensor self, Tensor indices, SymInt[3] output_size, int[3] stride, int[3] padding) -> Tensor + self: max_pool_double_backward(grad, indices, 3) + indices: non_differentiable + result: auto_linear + +- name: convolution(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups) -> Tensor + input, weight, bias: "grad.defined() ? convolution_backward_symint(grad, input, weight, bias->sym_sizes(), stride, padding, dilation, transposed, output_padding, groups, grad_input_mask) : std::tuple()" + result: convolution_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, stride, padding, dilation, transposed, output_padding, groups) + +# TorchScript serializes calls to _convolution so this entry is present until that is changed to use convolution. +# Note that the benchmark, deterministic, cudnn_enabled, and allow_tf32 flags are queried from the global context +# by convolution_backward instead of being passed along from the forward pass. +- name: _convolution(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups, bool benchmark, bool deterministic, bool cudnn_enabled, bool allow_tf32) -> Tensor + input, weight, bias: "grad.defined() ? convolution_backward_symint(grad, input, weight, bias->sym_sizes(), stride, padding, dilation, transposed, output_padding, groups, grad_input_mask) : std::tuple()" + result: _convolution_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, stride, padding, dilation, transposed, output_padding, groups, benchmark, deterministic, cudnn_enabled, allow_tf32) + +- name: convolution_backward(Tensor grad_output, Tensor input, Tensor weight, SymInt[]? bias_sizes, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups, bool[3] output_mask) -> (Tensor, Tensor, Tensor) + grad_output, input, weight: _convolution_double_backward_symint(grads[0], grads[1], grads[2], grad_output, weight, input, stride, padding, dilation, transposed, output_padding, groups, grad_input_mask) + result0: std::get<0>(convolution_backward_symint(grad_output_p, input_p, weight_t, bias_sizes, stride, padding, dilation, transposed, output_padding, groups, {true, false, false})) + std::get<0>(convolution_backward_symint(grad_output_t, input_p, weight_p, bias_sizes, stride, padding, dilation, transposed, output_padding, groups, {true, false, false})) + result1: std::get<1>(convolution_backward_symint(grad_output_p, input_t, weight_p, bias_sizes, stride, padding, dilation, transposed, output_padding, groups, {false, true, false})) + std::get<1>(convolution_backward_symint(grad_output_t, input_p, weight_p, bias_sizes, stride, padding, dilation, transposed, output_padding, groups, {false, true, false})) + result2: convolution_backward_jvp_grad_bias(grad_output_t, result2) + +- name: convolution_overrideable(Tensor input, Tensor weight, Tensor? bias, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups) -> Tensor + input, weight, bias: "grad.defined() ? convolution_backward_overrideable_symint(grad, input, weight, stride, padding, dilation, transposed, output_padding, groups, grad_input_mask) : std::tuple()" + +- name: convolution_backward_overrideable(Tensor grad_output, Tensor input, Tensor weight, SymInt[] stride, SymInt[] padding, SymInt[] dilation, bool transposed, SymInt[] output_padding, SymInt groups, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) + grad_output, input, weight: _convolution_double_backward_symint(grads[0], grads[1], grads[2], grad_output, weight, input, stride, padding, dilation, transposed, output_padding, groups, grad_input_mask) + +- name: slow_conv_transpose2d(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, SymInt[2] output_padding=0, SymInt[2] dilation=1) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, true, output_padding, 1, grad_input_mask) : std::tuple()" + +- name: slow_conv_transpose3d(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] output_padding=0, SymInt[3] dilation=1) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, true, output_padding, 1, grad_input_mask) : std::tuple()" + +- name: _slow_conv2d_forward(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias, SymInt[2] stride, SymInt[2] padding) -> Tensor + self, weight, bias: "grad.defined() ? _slow_conv2d_backward_symint(grad, self, weight, kernel_size, stride, padding, grad_input_mask) : std::tuple()" + +- name: _slow_conv2d_backward.output_mask(Tensor grad_output, Tensor self, Tensor weight, SymInt[2] kernel_size, SymInt[2] stride, SymInt[2] padding, bool[3] output_mask) -> (Tensor grad_input, Tensor grad_weight, Tensor grad_bias) + grad_output, self, weight: _convolution_double_backward_symint(grads[0], grads[1], grads[2], grad_output, weight, self, stride, padding, {{1, 1}}, false, {{0, 0}}, 1, grad_input_mask) + +- name: _conv_depthwise2d(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias, SymInt[2] stride, SymInt[2] padding, SymInt[2] dilation) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad.contiguous(), self, weight, bias->sym_sizes(), stride, padding, dilation, /*transposed=*/ false, /*output_padding=*/ {{0, 0}}, /*groups=*/ 1, grad_input_mask) : std::tuple()" + +- name: conv_depthwise3d(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias, SymInt[3] stride, SymInt[3] padding, SymInt[3] dilation) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad.contiguous(), self, weight, bias->sym_sizes(), stride, padding, dilation, /*transposed=*/ false, /*output_padding=*/ {{0, 0, 0}}, /*groups=*/ 1, grad_input_mask) : std::tuple()" + +- name: slow_conv3d_forward(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias, SymInt[3] stride, SymInt[3] padding) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, /*dilation=*/ {{1, 1, 1}}, false, /*output_padding=*/ {{0, 0, 0}}, 1, grad_input_mask) : std::tuple()" + +- name: slow_conv_dilated2d(Tensor self, Tensor weight, SymInt[2] kernel_size, Tensor? bias=None, SymInt[2] stride=1, SymInt[2] padding=0, SymInt[2] dilation=1) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, false, std::vector(padding.size(), 0), 1, grad_input_mask) : std::tuple()" + +- name: slow_conv_dilated3d(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias=None, SymInt[3] stride=1, SymInt[3] padding=0, SymInt[3] dilation=1) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, false, std::vector(padding.size(), 0), 1, grad_input_mask) : std::tuple()" + +- name: col2im(Tensor self, SymInt[2] output_size, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor + self: im2col(grad, kernel_size, dilation, padding, stride) + result: auto_linear + +- name: im2col(Tensor self, int[2] kernel_size, int[2] dilation, int[2] padding, int[2] stride) -> Tensor + self: col2im_symint(grad, {self.sym_size(-2), self.sym_size(-1)}, kernel_size, dilation, padding, stride) + result: auto_linear + +- name: _adaptive_avg_pool2d_backward(Tensor grad_output, Tensor self) -> Tensor + grad_output: _adaptive_avg_pool2d_symint(grad, {grad_output.sym_size(-2), grad_output.sym_size(-1)}) + self: zeros_like(self) + result: _adaptive_avg_pool2d_backward(grad_output_t, self_p) + +- name: _adaptive_avg_pool3d_backward(Tensor grad_output, Tensor self) -> Tensor + grad_output: _adaptive_avg_pool3d_symint(grad, { grad_output.sym_size(-3), grad_output.sym_size(-2), grad_output.sym_size(-1) }) + self: zeros_like(self) + result: _adaptive_avg_pool3d_backward(grad_output_t, self_p) + +- name: adaptive_max_pool2d_backward(Tensor grad_output, Tensor self, Tensor indices) -> Tensor + grad_output: max_pool_double_backward(grad, indices, 2) + self: zeros_like(self) + result: auto_linear + +- name: adaptive_max_pool3d_backward(Tensor grad_output, Tensor self, Tensor indices) -> Tensor + grad_output: max_pool_double_backward(grad, indices, 3) + self: zeros_like(self) + result: auto_linear + +- name: avg_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override) -> Tensor + grad_output: avg_pool2d(grad, kernel_size, stride, padding, ceil_mode, count_include_pad, divisor_override) + self: zeros_like(self) + result: avg_pool2d_backward(grad_output_t, self_p, kernel_size, stride, padding, ceil_mode, count_include_pad, divisor_override) + +- name: avg_pool3d_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, bool ceil_mode, bool count_include_pad, int? divisor_override) -> Tensor + grad_output: avg_pool3d(grad, kernel_size, stride, padding, ceil_mode, count_include_pad, divisor_override) + self: zeros_like(self) + result: avg_pool3d_backward(grad_output_t, self_p, kernel_size, stride, padding, ceil_mode, count_include_pad, divisor_override) + +- name: elu_backward(Tensor grad_output, Scalar alpha, Scalar scale, Scalar input_scale, bool is_result, Tensor self_or_result) -> Tensor + grad_output: elu_backward(grad, alpha, scale, input_scale, is_result, self_or_result) + self_or_result: elu_double_backward(grad, grad_output, alpha, scale, input_scale, is_result, self_or_result) + result: elu_backward(grad_output_t, alpha, scale, input_scale, is_result, self_or_result_p) + elu_double_backward(self_or_result_t, grad_output_p, alpha, scale, input_scale, is_result, self_or_result_p) + +- name: fractional_max_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] output_size, Tensor indices) -> Tensor + grad_output: max_pool_double_backward(grad, indices, 2) + self: zeros_like(self) + result: auto_linear + +- name: fractional_max_pool3d_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] output_size, Tensor indices) -> Tensor + grad_output: max_pool_double_backward(grad, indices, 3) + self: zeros_like(self) + result: auto_linear + +- name: glu_backward(Tensor grad_output, Tensor self, int dim) -> Tensor + grad_output: glu_double_backward_grad_output(grad, self, dim) + self: glu_double_backward(grad, grad_output, self, dim) + result: glu_backward_jvp(result, grad_output_p, self_p, grad_output_t, self_t, dim) + +- name: hardtanh_backward(Tensor grad_output, Tensor self, Scalar min_val, Scalar max_val) -> Tensor + grad_output: hardtanh_backward(grad, self, min_val, max_val) + self: zeros_like(grad) + result: at::where((self_p > min_val).logical_and(self_p < max_val), grad_output_t, at::zeros({}, result.options()).expand_as(result)) + +- name: log_sigmoid_backward(Tensor grad_output, Tensor self, Tensor buffer) -> Tensor + grad_output: log_sigmoid_backward(grad, self, buffer) + self: log_sigmoid_double_backward(grad * grad_output, self) + result: log_sigmoid_backward(grad_output_t, self_p, buffer) + log_sigmoid_double_backward(self_t * grad_output_p, self_p) + +- name: _log_softmax_backward_data(Tensor grad_output, Tensor output, int dim, ScalarType input_dtype) -> Tensor + grad_output: grad.to(output.dtype()) - (grad.to(output.dtype()) * output.exp()).sum(dim, true) + output: (-grad_output.sum(dim, true) * output.exp() * grad.to(output.dtype())).to(output.dtype()) + +- name: leaky_relu_backward(Tensor grad_output, Tensor self, Scalar negative_slope, bool self_is_result) -> Tensor + # self_is_result is always false here since double backward call is an out-of-place call, self is input itself + grad_output: leaky_relu_backward(grad, self, negative_slope, false) + self: zeros_like(grad) + # leaky_relu_backward(grad_output, self, negative_slope, false) + # computes grad_output * at::where(self_p > 0, 1, negative_slope) + # so the jvp formula is the following: + # grad_output_t * at::where(self_p > 0, self_p.new_ones([]), negative_slope); + # + # leaky_relu_backward(grad_output, result, negative_slope, true) + # computes grad_output * at::where(result > 0, 1, negative_slope) + # under the assumption that `negative_slope` is positive (otherwise, + # it is not possible to compute the gradient). + # + # so the jvp formula is the following: + # grad_output_t * at::where(result_p > 0, result_p.new_ones([]), negative_slope); + # with the assumption that negative_slope is positive. + # + # Combined together that results in the following optimized kernel which + # also checks the assumption that negative_slope is positive when self_is_result + # is True: + result: leaky_relu_backward(grad_output_t, self_p, negative_slope, self_is_result) + +# This derivative is mps-only, and `error_for_max_pool2d_double_backward` just raises an error. +- name: max_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + grad_output: error_for_max_pool2d_double_backward() + self: zeros_like(self) + result: auto_linear + +- name: max_pool2d_with_indices_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, int[2] dilation, bool ceil_mode, Tensor indices) -> Tensor + grad_output: max_pool_double_backward(grad, indices, 2) + self: zeros_like(self) + indices: non_differentiable + result: auto_linear + +- name: max_pool3d_with_indices_backward(Tensor grad_output, Tensor self, int[3] kernel_size, int[3] stride, int[3] padding, int[3] dilation, bool ceil_mode, Tensor indices) -> Tensor + grad_output: max_pool_double_backward(grad, indices, 3) + self: zeros_like(self) + indices: non_differentiable + result: auto_linear + +- name: mse_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor + grad_output: mse_loss_backward(grad, self, target, reduction) + self: mse_loss_double_backward(grad * grad_output, self, reduction) + target: -mse_loss_double_backward(grad * grad_output, target, reduction) + result: " mse_loss_double_backward(self_t * grad_output_p, self_p, reduction) + - mse_loss_double_backward(target_t * grad_output_p, target_p, reduction) + + mse_loss_backward(grad_output_t, self_p, target_p, reduction) + " + +- name: nll_loss_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, Tensor total_weight) -> Tensor + grad_output: nll_loss_symint(grad, target, weight, reduction, ignore_index) + self: zeros_like(grad) + target: non_differentiable + +- name: nll_loss2d_backward(Tensor grad_output, Tensor self, Tensor target, Tensor? weight, int reduction, SymInt ignore_index, Tensor total_weight) -> Tensor + grad_output: nll_loss2d_symint(grad, target, weight, reduction, ignore_index) + self: zeros_like(grad) + target: non_differentiable + +- name: rrelu_with_noise_backward(Tensor grad_output, Tensor self, Tensor noise, Scalar lower, Scalar upper, bool training, bool self_is_result) -> Tensor + # self_is_result is always false here since double backward call is an out-of-place call, self is input itself + grad_output: rrelu_with_noise_backward(grad, self, noise, lower, upper, training, false) + self: zeros_like(grad) + result: rrelu_with_noise_backward(grad_output_t, self_p, noise, lower, upper, training, false) + +- name: reflection_pad1d_backward(Tensor grad_output, Tensor self, SymInt[2] padding) -> Tensor + grad_output: reflection_pad1d_symint(grad, padding) + self: zeros_like(self) + result: reflection_pad1d_backward_symint(grad_output_t, self_p, padding) + +- name: reflection_pad2d_backward(Tensor grad_output, Tensor self, SymInt[4] padding) -> Tensor + grad_output: reflection_pad2d_symint(grad, padding) + self: zeros_like(self) + result: reflection_pad2d_backward_symint(grad_output_t, self_p, padding) + +- name: reflection_pad3d_backward(Tensor grad_output, Tensor self, SymInt[6] padding) -> Tensor + grad_output: reflection_pad3d_symint(grad, padding) + self: zeros_like(self) + result: reflection_pad3d_backward_symint(grad_output_t, self_p, padding) + +- name: replication_pad1d_backward(Tensor grad_output, Tensor self, SymInt[2] padding) -> Tensor + grad_output: replication_pad1d_symint(grad, padding) + self: zeros_like(self) + result: replication_pad1d_backward_symint(grad_output_t, self_p, padding) + +- name: replication_pad2d_backward(Tensor grad_output, Tensor self, SymInt[4] padding) -> Tensor + grad_output: replication_pad2d_symint(grad, padding) + self: zeros_like(self) + result: replication_pad2d_backward_symint(grad_output_t, self_p, padding) + +- name: replication_pad3d_backward(Tensor grad_output, Tensor self, SymInt[6] padding) -> Tensor + grad_output: replication_pad3d_symint(grad, padding) + self: zeros_like(self) + result: replication_pad3d_backward_symint(grad_output_t, self_p, padding) + +- name: sparse_sampled_addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor + self, mat1, mat2: "sparse_sampled_addmm_backward(grad, + self, + wrap_opt_if(mat1, grad_input_mask[2]), + wrap_opt_if(mat2, grad_input_mask[1]), + alpha, beta, grad_input_mask)" + +- name: _sparse_mm_reduce_impl(Tensor self, Tensor other, str reduce) -> (Tensor, Tensor) + output_differentiability: [True, False] + self, other: "grad.defined() ? _sparse_mm_reduce_impl_backward(self, grad, other, reduce, result1, grad_input_mask) : std::tuple()" + +- name: smooth_l1_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction, float beta) -> Tensor + grad_output: smooth_l1_loss_backward(grad, self, target, reduction, beta) + self: smooth_l1_loss_double_backward(grad * grad_output, self, target, reduction, beta) + target: -smooth_l1_loss_double_backward(grad * grad_output, self, target, reduction, beta) + result: " smooth_l1_loss_double_backward(self_t * grad_output_p, self_p, target_p, reduction, beta) + - smooth_l1_loss_double_backward(target_t * grad_output_p, self_p, target_p, reduction, beta) + + smooth_l1_loss_backward(grad_output_t, self_p, target_p, reduction, beta) + " + +- name: huber_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction, float delta) -> Tensor + grad_output: huber_loss_double_backward_grad_output(grad, grad_output, self, target, reduction, delta) + self: huber_loss_double_backward(grad * grad_output, self, target, reduction, delta) + target: -huber_loss_double_backward(grad * grad_output, self, target, reduction, delta) + +- name: softplus_backward(Tensor grad_output, Tensor self, Scalar beta, Scalar threshold) -> Tensor + grad_output: softplus_backward(grad, self, beta, threshold) + self: softplus_double_backward(grad * grad_output, self, beta, threshold) + result: "softplus_backward(grad_output_t, self_p, beta, threshold) + + softplus_double_backward(self_t * grad_output_p, self_p, beta, threshold)" + +- name: _softmax_backward_data(Tensor grad_output, Tensor output, int dim, ScalarType input_dtype) -> Tensor + grad_output: _softmax_backward_data(grad.to(output.dtype()), output, dim, input_dtype) + output: softmax_double_backward(grad.to(output.dtype()), grad_output, dim, output).to(output.dtype()) + +- name: soft_margin_loss_backward(Tensor grad_output, Tensor self, Tensor target, int reduction) -> Tensor + grad_output: soft_margin_loss_double_backward_grad_output(grad, grad_output, self, target, reduction) + self: soft_margin_loss_double_backward(grad * grad_output, self, target, reduction) + +- name: softshrink_backward(Tensor grad_output, Tensor self, Scalar lambd) -> Tensor + grad_output: softshrink_backward(grad, self, lambd) + self: zeros_like(grad) + result: at::where((self_p > lambd).logical_or(self_p < -lambd), grad_output_t, at::zeros({}, result.options()).expand_as(result)) + +- name: threshold_backward(Tensor grad_output, Tensor self, Scalar threshold) -> Tensor + grad_output: threshold_backward(grad, self, threshold) + self: zeros_like(grad) + result: zeros_like(self_t) + threshold_backward(grad_output_t, self_p, threshold) + +- name: upsample_linear1d_backward(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, bool align_corners, float? scales=None) -> Tensor + grad_output: upsample_linear1d_symint(grad, output_size, align_corners, scales) + result: auto_linear + +- name: upsample_bilinear2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: upsample_bilinear2d_symint(grad, output_size, align_corners, scales_h, scales_w) + result: auto_linear + +- name: _upsample_bilinear2d_aa_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: _upsample_bilinear2d_aa_symint(grad, output_size, align_corners, scales_h, scales_w) + result: auto_linear + +- name: upsample_bicubic2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: upsample_bicubic2d_symint(grad, output_size, align_corners, scales_h, scales_w) + result: auto_linear + +- name: _upsample_bicubic2d_aa_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, bool align_corners, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: _upsample_bicubic2d_aa_symint(grad, output_size, align_corners, scales_h, scales_w) + result: auto_linear + +- name: upsample_trilinear3d_backward(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, bool align_corners, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: upsample_trilinear3d_symint(grad, output_size, align_corners, scales_d, scales_h, scales_w) + result: auto_linear + +- name: upsample_nearest1d_backward(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, float? scales=None) -> Tensor + grad_output: upsample_nearest1d_symint(grad, output_size, scales) + result: auto_linear + +- name: _upsample_nearest_exact1d_backward(Tensor grad_output, SymInt[1] output_size, SymInt[3] input_size, float? scales=None) -> Tensor + grad_output: _upsample_nearest_exact1d_symint(grad, output_size, scales) + result: auto_linear + +- name: upsample_nearest2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: upsample_nearest2d_symint(grad, output_size, scales_h, scales_w) + result: auto_linear + +- name: _upsample_nearest_exact2d_backward(Tensor grad_output, SymInt[2] output_size, SymInt[4] input_size, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: _upsample_nearest_exact2d_symint(grad, output_size, scales_h, scales_w) + result: auto_linear + +- name: upsample_nearest3d_backward(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: upsample_nearest3d_symint(grad, output_size, scales_d, scales_h, scales_w) + result: auto_linear + +- name: _upsample_nearest_exact3d_backward(Tensor grad_output, SymInt[3] output_size, SymInt[5] input_size, float? scales_d=None, float? scales_h=None, float? scales_w=None) -> Tensor + grad_output: _upsample_nearest_exact3d_symint(grad, output_size, scales_d, scales_h, scales_w) + result: auto_linear + +- name: sigmoid_backward(Tensor grad_output, Tensor output) -> Tensor + grad_output: sigmoid_backward(grad, output.conj()) + output: grad.conj() * grad_output * (-2 * output.conj() + 1) + result: sigmoid_backward(grad_output_t, output_p) + output_t.conj() * grad_output_p * (-2 * output_p.conj() + 1) + +- name: tanh_backward(Tensor grad_output, Tensor output) -> Tensor + grad_output: tanh_backward(grad, output.conj()) + output: grad.conj() * (-2 * output.conj() * grad_output) + result: tanh_backward(grad_output_t, output_p) + output_t.conj() * (-2 * output_p.conj() * grad_output_p) + +# cudnn +- name: _cudnn_ctc_loss(Tensor log_probs, Tensor targets, int[] input_lengths, int[] target_lengths, int blank, bool deterministic, bool zero_infinity) -> (Tensor, Tensor) + log_probs: _cudnn_ctc_loss_backward(grad, result0, result1, zero_infinity) + +- name: _cudnn_ctc_loss.Tensor(Tensor log_probs, Tensor targets, Tensor input_lengths, Tensor target_lengths, int blank, bool deterministic, bool zero_infinity) -> (Tensor, Tensor) + log_probs: _cudnn_ctc_loss_backward(grad, result0, result1, zero_infinity) + +- name: cudnn_convolution_transpose(Tensor self, Tensor weight, SymInt[] padding, SymInt[] output_padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic, bool allow_tf32) -> Tensor + self, weight: "_cudnn_convolution_backward(self, grad, weight, padding, output_padding, stride, dilation, true, groups, {grad_input_mask[0], grad_input_mask[1]})" + +- name: _mps_convolution_transpose(Tensor self, Tensor weight, SymInt[] padding, SymInt[] output_padding, SymInt[] stride, SymInt[] dilation, SymInt groups) -> Tensor + self, weight: "grad.defined() ? mps_convolution_transpose_backward_symint(self, grad, weight, padding, output_padding, stride, dilation, groups, grad_input_mask) : std::tuple()" + +- name: cudnn_convolution(Tensor self, Tensor weight, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic, bool allow_tf32) -> Tensor + self, weight: "_cudnn_convolution_backward(self, grad, weight, padding, std::vector(padding.size(), 0), stride, dilation, false, groups, {grad_input_mask[0], grad_input_mask[1]})" + +- name: cudnn_grid_sampler(Tensor self, Tensor grid) -> Tensor output + self, grid: "grad.defined() ? cudnn_grid_sampler_backward(self, grid, grad) : std::tuple()" + +- name: cudnn_affine_grid_generator(Tensor theta, int N, int C, int H, int W) -> Tensor grid + theta: cudnn_affine_grid_generator_backward(grad, N, C, H, W) + +# NB: Why is the backwards here so complicated? CuDNN cannot be used to compute +# backward in evaluation mode, because the math for backward in evaluation mode +# is different (since the forward math is different), and CuDNN does not support +# it. And in any case, you shouldn't be using this bn in evaluation mode, +# because it should be merged into the previous convolution (left for future +# work.) +# NB2: The quotes around the gradient are needed to appease YAML parsing rules. +- name: cudnn_batch_norm(Tensor input, Tensor weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float exponential_average_factor, float epsilon) -> (Tensor, Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? (training ? cudnn_batch_norm_backward(input, grad.contiguous(input.suggest_memory_format()), weight, running_mean, running_var, result1, result2, epsilon, retain_variables ? result3.clone() : result3) : native_batch_norm_backward(grad, input, weight, running_mean, running_var, result1, result2, training, epsilon, grad_input_mask)) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, running_mean, running_var, result1, result2, training, epsilon) + +# HACK: save_mean and save_var are going to be passed in as +# requires_grad variables (even though we'll never backprop through +# them) so we need to prevent the unpacking from triggering an error. +- name: cudnn_batch_norm_backward(Tensor input, Tensor grad_output, Tensor weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var, float epsilon, Tensor reserveSpace) -> (Tensor, Tensor, Tensor) + save_mean: not_implemented("cudnn_batch_norm_backward save_mean") + save_var: not_implemented("cudnn_batch_norm_backward save_var") + reserveSpace: not_implemented("cudnn_batch_norm_backward reserveSpace") + input, weight, grad_output: batchnorm_double_backward(input, weight, grads[0], grads[1], grads[2], grad_output, running_mean, running_var, true, epsilon, save_mean, save_var, grad_input_mask) + +# nnpack + +- name: _nnpack_spatial_convolution(Tensor input, Tensor weight, Tensor? bias, SymInt[2] padding, SymInt[2] stride=1) -> Tensor + # NNPACK does not support strided convolutions in the backwards path, which is the reason why we are using the closest available function that does here. + input, weight, bias: "grad.defined() ? convolution_backward_symint(grad, input, weight, bias->sym_sizes(), stride, padding, std::vector(padding.size(), 1), false, std::vector(padding.size(), 0), 1, grad_input_mask) : std::tuple()" + +#LSTM MPS +- name: _lstm_mps(Tensor input, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor, Tensor, Tensor, Tensor, Tensor) + output_differentiability: [True, True, True, False, False, False] + input, hx, params: "lstm_mps_backward(grads[0], grads[1], grads[2], result3, result4, input, result5, hx, params, has_biases, num_layers, dropout, train, bidirectional, batch_first)" + +- name: lstm_mps_backward(Tensor? grad_y, Tensor? grad_hy, Tensor? grad_cy, Tensor z_state, Tensor cell_state_fwd, Tensor input, Tensor layersOutputs, Tensor[] hx, Tensor[] params, bool has_biases, int num_layers, float dropout, bool train, bool bidirectional, bool batch_first) -> (Tensor, Tensor[], Tensor[]) + + + +# Only frst three of _cudnn_rnn outputs can have gradients. +# _cudnn_rnn outputs: (output, hy, cy, reserve, weight_buf) +- name: _cudnn_rnn(Tensor input, Tensor[] weight, int weight_stride0, Tensor? weight_buf, Tensor hx, Tensor? cx, int mode, SymInt hidden_size, SymInt proj_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, SymInt[] batch_sizes, Tensor? dropout_state) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + dropout_state: non_differentiable + output_differentiability: [True, True, True, False, False] + input, hx, cx, weight: "_cudnn_rnn_backward_symint(input, weight, weight_stride0, result4, hx, cx, result0, grads[0], grads[1], grads[2], mode, hidden_size, proj_size, num_layers, batch_first, dropout, train, bidirectional, batch_sizes, dropout_state, retain_variables ? result3.clone() : result3, grad_input_mask)" + +- name: _cudnn_rnn_backward(Tensor input, Tensor[] weight, int weight_stride0, Tensor weight_buf, Tensor hx, Tensor? cx, Tensor output, Tensor? grad_output, Tensor? grad_hy, Tensor? grad_cy, int mode, SymInt hidden_size, SymInt proj_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, SymInt[] batch_sizes, Tensor? dropout_state, Tensor reserve, bool[4] output_mask) -> (Tensor, Tensor, Tensor, Tensor[]) + dropout_state: non_differentiable + input: not_implemented("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + weight: not_implemented_list("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + hx: not_implemented("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + cx: not_implemented("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + output: not_implemented("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + grad_output: not_implemented("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + grad_hy: not_implemented("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + grad_cy: not_implemented("_cudnn_rnn_backward", kCudnnDoubleBackwardMsg) + +# miopen + +- name: miopen_convolution_transpose(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] output_padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, true, output_padding, groups, grad_input_mask) : std::tuple()" + +- name: miopen_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, false, std::vector(padding.size(), 0), groups, grad_input_mask) : std::tuple()" + +- name: miopen_depthwise_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups, bool benchmark, bool deterministic) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, false, std::vector(padding.size(), 0), groups, grad_input_mask) : std::tuple()" + +- name: miopen_batch_norm(Tensor input, Tensor weight, Tensor? bias, Tensor? running_mean, Tensor? running_var, bool training, float exponential_average_factor, float epsilon) -> (Tensor, Tensor, Tensor) + input, weight, bias: "grad.defined() ? (training ? miopen_batch_norm_backward(input, grad.contiguous(), weight, running_mean, running_var, result1, result2, epsilon) : native_batch_norm_backward(grad, input, weight, running_mean, running_var, result1, result2, training, epsilon, grad_input_mask)) : std::tuple()" + result0: batch_norm_jvp(input_p, input_t, weight_p, weight_t, bias_p, bias_t, running_mean, running_var, result1, result2, training, epsilon) + +- name: miopen_batch_norm_backward(Tensor input, Tensor grad_output, Tensor weight, Tensor? running_mean, Tensor? running_var, Tensor? save_mean, Tensor? save_var, float epsilon) -> (Tensor, Tensor, Tensor) + save_mean: not_implemented("miopen_batch_norm_backward save_mean") + save_var: not_implemented("miopen_batch_norm_backward save_var") + input, weight, grad_output: batchnorm_double_backward(input, weight, grads[0], grads[1], grads[2], grad_output, running_mean, running_var, true, epsilon, save_mean, save_var, grad_input_mask) + +- name: miopen_rnn(Tensor input, Tensor[] weight, int weight_stride0, Tensor hx, Tensor? cx, int mode, int hidden_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, int[] batch_sizes, Tensor? dropout_state) -> (Tensor, Tensor, Tensor, Tensor, Tensor) + dropout_state: non_differentiable + output_differentiability: [True, True, True, False, False] + input, hx, cx, weight: "miopen_rnn_backward(input, weight, weight_stride0, result4, hx, cx, result0, grads[0], grads[1], grads[2], mode, hidden_size, num_layers, batch_first, dropout, train, bidirectional, batch_sizes, dropout_state, retain_variables ? result3.clone() : result3, grad_input_mask)" + +- name: miopen_rnn_backward(Tensor input, Tensor[] weight, int weight_stride0, Tensor weight_buf, Tensor hx, Tensor? cx, Tensor output, Tensor? grad_output, Tensor? grad_hy, Tensor? grad_cy, int mode, int hidden_size, int num_layers, bool batch_first, float dropout, bool train, bool bidirectional, int[] batch_sizes, Tensor? dropout_state, Tensor reserve, bool[4] output_mask) -> (Tensor, Tensor, Tensor, Tensor[]) + dropout_state: non_differentiable + +- name: mkldnn_rnn_layer(Tensor input, Tensor weight0, Tensor weight1, Tensor weight2, Tensor weight3, Tensor hx_, Tensor cx_, bool reverse, int[] batch_sizes, int mode, int hidden_size, int num_layers, bool has_biases, bool bidirectional, bool batch_first, bool train) -> (Tensor, Tensor, Tensor, Tensor) + output_differentiability: [True, True, True, False] + input, weight0, weight1, weight2, weight3, hx_, cx_: "GradMode::is_enabled() ? mkldnn_rnn_layer_differentiable_backward(input, weight0, weight1, weight2, weight3, hx_, cx_, result0, result1, result2, grads[0], grads[1], grads[2], reverse, mode, hidden_size, num_layers, has_biases, train, bidirectional, batch_sizes, batch_first, result3) : mkldnn_rnn_layer_backward(input, weight0, weight1, weight2, weight3, hx_, cx_, result0, result1, result2, grads[0], grads[1], grads[2], reverse, mode, hidden_size, num_layers, has_biases, train, bidirectional, batch_sizes, batch_first, result3)" + +- name: mkldnn_rnn_layer_backward(Tensor input, Tensor weight1, Tensor weight2, Tensor weight3, Tensor weight4, Tensor hx_, Tensor cx_tmp, Tensor output, Tensor hy_, Tensor cy_, Tensor? grad_output, Tensor? grad_hy, Tensor? grad_cy, bool reverse, int mode, int hidden_size, int num_layers, bool has_biases, bool train, bool bidirectional, int[] batch_sizes, bool batch_first, Tensor workspace) -> (Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor) + +# mkldnn +- name: mkldnn_convolution(Tensor self, Tensor weight, Tensor? bias, SymInt[] padding, SymInt[] stride, SymInt[] dilation, SymInt groups) -> Tensor + self, weight, bias: "grad.defined() ? convolution_backward_symint(grad, self, weight, bias->sym_sizes(), stride, padding, dilation, /*transposed=*/ false, /*output_padding=*/ std::vector(padding.size(), 0), groups, grad_input_mask) : std::tuple()" + +- name: mkldnn_linear(Tensor self, Tensor weight, Tensor? bias=None) -> Tensor + self, weight, bias: mkldnn_linear_backward(self, grad, weight, grad_input_mask) + +- name: mkldnn_max_pool2d(Tensor self, int[2] kernel_size, int[2] stride=[], int[2] padding=0, int[2] dilation=1, bool ceil_mode=False) -> Tensor + self: mkldnn_max_pool2d_backward(grad, result, self, kernel_size, stride, padding, dilation, ceil_mode) + +- name: mkldnn_max_pool3d(Tensor self, int[3] kernel_size, int[3] stride=[], int[3] padding=0, int[3] dilation=1, bool ceil_mode=False) -> Tensor + self: mkldnn_max_pool3d_backward(grad, result, self, kernel_size, stride, padding, dilation, ceil_mode) + +- name: mkldnn_adaptive_avg_pool2d(Tensor self, int[2] output_size) -> Tensor + self: mkldnn_adaptive_avg_pool2d_backward(grad, self) + +- name: _mkldnn_reshape(Tensor self, int[] shape) -> Tensor + self: grad.reshape_symint(self.sym_sizes()) + +# NestedTensor +- name: _nested_tensor_from_tensor_list(Tensor[] list, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + list: "grad.defined()? at::unbind(grad) : std::vector(list.size())" + +- name: _nested_tensor_from_mask(Tensor t, Tensor mask, bool mask_check=True) -> Tensor + t: grad.to_padded_tensor_symint(0, t.sym_sizes()) + mask: non_differentiable + +- name: _nested_from_padded(Tensor padded, Tensor cpu_nested_shape_example, bool fuse_transform_0213=False) -> Tensor + padded: _nested_from_padded_backward(grad, padded, fuse_transform_0213) + cpu_nested_shape_example: non_differentiable + +- name: to_padded_tensor(Tensor self, float padding, SymInt[]? output_size=None) -> Tensor + self: "self.layout() == c10::kJagged ? at::_nested_from_padded_tensor_symint(grad, at::_nested_get_offsets(self), at::_nested_get_jagged_dummy(self), at::_nested_get_ragged_idx(self), at::_nested_get_min_seqlen(self).defined() ? std::optional(at::_nested_get_min_seqlen(self)) : ::std::nullopt, at::_nested_get_max_seqlen(self).defined() ? std::optional(at::_nested_get_max_seqlen(self)) : ::std::nullopt, std::optional(at::_nested_get_values(self).sym_size(0))) : at::_nested_from_padded(grad, self._nested_tensor_size())" + padding: non_differentiable + +- name: _nested_from_padded_tensor(Tensor padded, Tensor offsets, Tensor dummy, int ragged_idx=1, Tensor? min_seqlen=None, Tensor? max_seqlen=None, SymInt? sum_S=None) -> Tensor + padded: grad.to_padded_tensor_symint(0.0, at::OptionalArrayRef(padded.sym_sizes())) + offsets: non_differentiable + dummy: non_differentiable + +- name: _nested_view_from_buffer(Tensor(a) self, Tensor nested_size, Tensor nested_strides, Tensor offsets) -> Tensor(a) + self: grad.values() + nested_size: non_differentiable + nested_strides: non_differentiable + +- name: _nested_view_from_jagged(Tensor(a) self, Tensor offsets, Tensor dummy, Tensor? lengths=None, int ragged_idx=1, Tensor? min_seqlen=None, Tensor? max_seqlen=None) -> Tensor(a) + self: grad.values() + offsets: non_differentiable + lengths: non_differentiable + dummy: non_differentiable + +- name: _nested_get_values(Tensor(a) self) -> Tensor(a) + self: "_nested_view_from_jagged(grad, at::_nested_get_offsets(self), at::_nested_get_jagged_dummy(self), at::_nested_get_lengths(self), at::_nested_get_ragged_idx(self), at::_nested_get_min_seqlen(self).defined() ? std::optional(at::_nested_get_min_seqlen(self)) : ::std::nullopt, at::_nested_get_max_seqlen(self).defined() ? std::optional(at::_nested_get_max_seqlen(self)) : ::std::nullopt)" + +# Transformer +- name: _safe_softmax(Tensor self, int dim, ScalarType? dtype=None) -> Tensor + self: _softmax_backward_data(grad, result, dim, self.scalar_type()) + result: result * (self_t - safe_logsumexp_jvp(self_p, self_t, {dim}, true)) + +- name: _scaled_dot_product_efficient_attention(Tensor query, Tensor key, Tensor value, Tensor? attn_bias, bool compute_log_sumexp, float dropout_p=0.0, bool is_causal=False, *, float? scale=None) -> (Tensor output, Tensor log_sumexp, Tensor philox_seed, Tensor philox_offset) + output_differentiability: [True, False, False, False] + query, key, value, attn_bias: _scaled_dot_product_efficient_attention_backward(grad, query, key, value, attn_bias, output, log_sumexp, philox_seed, philox_offset, dropout_p, grad_input_mask, is_causal, scale) + +- name: _scaled_dot_product_flash_attention(Tensor query, Tensor key, Tensor value, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + output_differentiability: [True, False, False, False, False, False, False, False, False] + query, key, value: _scaled_dot_product_flash_attention_backward_symint(grad, query, key, value, output, logsumexp, cum_seq_q, cum_seq_k, max_q, max_k, dropout_p, is_causal, philox_seed, philox_offset, scale) + +- name: _scaled_dot_product_flash_attention_for_cpu(Tensor query, Tensor key, Tensor value, float dropout_p=0.0, bool is_causal=False, *, Tensor? attn_mask=None, float? scale=None) -> (Tensor output, Tensor logsumexp) + output_differentiability: [True, False] + query, key, value: _scaled_dot_product_flash_attention_for_cpu_backward(grad, query, key, value, output, logsumexp, dropout_p, is_causal, attn_mask, scale) + +- name: _flash_attention_forward(Tensor query, Tensor key, Tensor value, Tensor? cum_seq_q, Tensor? cum_seq_k, SymInt max_q, SymInt max_k, float dropout_p, bool is_causal, bool return_debug_mask, *, float? scale=None, SymInt? window_size_left=None, SymInt? window_size_right=None, Tensor? seqused_k=None, Tensor? alibi_slopes=None) -> (Tensor output, Tensor softmax_logsumexp, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + output_differentiability: [True, False, False, False, False] + query, key, value: _flash_attention_backward_symint(grad, query, key, value, output, softmax_logsumexp, cum_seq_q, cum_seq_k, max_q, max_k, dropout_p, is_causal, philox_seed, philox_offset, scale, window_size_left, window_size_right) + +- name: _efficient_attention_forward(Tensor query, Tensor key, Tensor value, Tensor? bias, Tensor? cu_seqlens_q, Tensor? cu_seqlens_k, SymInt? max_seqlen_q, SymInt? max_seqlen_k, float dropout_p, int custom_mask_type, bool compute_log_sumexp=False, *, float? scale=None, Tensor? seqlen_k=None, int? window_size=None) -> (Tensor output, Tensor logsumexp, Tensor philox_seed, Tensor philox_offset, SymInt max_seqlen_batch_q, SymInt max_seqlen_batch_k) + output_differentiability: [True, False, False, False, False, False] + query, key, value, bias: _efficient_attention_backward_symint(grad, query, key, value, bias, output, cu_seqlens_q, cu_seqlens_k, max_seqlen_batch_q, max_seqlen_batch_k, logsumexp, dropout_p, philox_seed, philox_offset, custom_mask_type, bias.requires_grad(), scale) + +- name: _scaled_dot_product_cudnn_attention(Tensor query, Tensor key, Tensor value, Tensor? attn_bias, bool compute_log_sumexp, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + output_differentiability: [True, False, False, False, False, False, False, False, False] + query, key, value: _scaled_dot_product_cudnn_attention_backward_symint(grad, query, key, value, output, logsumexp, philox_seed, philox_offset, attn_bias, cum_seq_q, cum_seq_k, max_q, max_k, dropout_p, is_causal, scale) + +- name: _scaled_dot_product_fused_attention_overrideable(Tensor query, Tensor key, Tensor value, Tensor? attn_bias=None, float dropout_p=0.0, bool is_causal=False, bool return_debug_mask=False, *, float? scale=None) -> (Tensor output, Tensor logsumexp, Tensor cum_seq_q, Tensor cum_seq_k, SymInt max_q, SymInt max_k, Tensor philox_seed, Tensor philox_offset, Tensor debug_attn_mask) + output_differentiability: [True, False, False, False, False, False, False, False, False] + query, key, value, attn_bias: _scaled_dot_product_fused_attention_overrideable_backward_symint(grad, query, key, value, attn_bias, grad_input_mask, output, logsumexp, cum_seq_q, cum_seq_k, max_q, max_k, dropout_p, is_causal, philox_seed, philox_offset, scale) + +# fft +- name: _fft_r2c(Tensor self, int[] dim, int normalization, bool onesided) -> Tensor + self: fft_r2c_backward(grad, dim, normalization, onesided, self.sym_size(dim.back())) + result: auto_linear + +- name: _fft_c2r(Tensor self, int[] dim, int normalization, SymInt last_dim_size) -> Tensor + self: fft_c2r_backward(grad, dim, normalization) + result: auto_linear + +- name: _fft_c2c(Tensor self, SymInt[] dim, int normalization, bool forward) -> Tensor + self: _fft_c2c_symint(grad, dim, normalization, !forward) + result: auto_linear + +- name: unbind.int(Tensor(a -> *) self, int dim=0) -> Tensor(a)[] + dispatch: + Default: + self: unbind_backward(grads, dim) + result: auto_linear + AutogradNestedTensor: + self: "self.layout() == c10::kJagged ? unbind_backward_nested_jagged(grads, self, dim) : unbind_backward_nested(grads, at::native::get_nested_tensor_impl(self)->get_nested_sizes(), dim, self.options())" + result: auto_linear + +- name: stack(Tensor[] tensors, int dim=0) -> Tensor + tensors: stack_tensors_backward(grad, dim, to_args_scalartypes(tensors)) + result: stack_jvp(tensors, dim) + +# fused RNN kernels + +# Only frst two of _thnn_fused_lstm_cell outputs can have gradients. +# _thnn_fused_lstm_cell outputs: (hy, cy, workspace) +- name: _thnn_fused_lstm_cell(Tensor input_gates, Tensor hidden_gates, Tensor cx, Tensor? input_bias=None, Tensor? hidden_bias=None) -> (Tensor, Tensor, Tensor) + output_differentiability: [True, True, False] + input_gates, hidden_gates, cx, input_bias, hidden_bias: "GradMode::is_enabled() ? _thnn_differentiable_lstm_cell_backward(grads[0], grads[1], input_gates, hidden_gates, input_bias, hidden_bias, cx, result1) : _thnn_fused_lstm_cell_backward(grads[0], grads[1], cx, result1, result2, input_bias.defined())" + +- name: _thnn_fused_gru_cell(Tensor input_gates, Tensor hidden_gates, Tensor hx, Tensor? input_bias=None, Tensor? hidden_bias=None) -> (Tensor, Tensor) + input_gates, hidden_gates, hx, input_bias, hidden_bias: "grad.defined() ? (GradMode::is_enabled() ? _thnn_differentiable_gru_cell_backward(grad, input_gates, hidden_gates, hx, input_bias, hidden_bias) : _thnn_fused_gru_cell_backward(grad, result1, input_bias.defined())) : std::tuple()" + +# PackedSequence helpers +- name: _pack_padded_sequence(Tensor input, Tensor lengths, bool batch_first) -> (Tensor, Tensor) + input: _pack_padded_sequence_backward_symint(grad, input.sym_sizes(), result1, batch_first) + +# TH wrappers +- name: eq.Scalar(Tensor self, Scalar other) -> Tensor + output_differentiability: [False] + +- name: eq.Tensor(Tensor self, Tensor other) -> Tensor + output_differentiability: [False] + +- name: ge.Scalar(Tensor self, Scalar other) -> Tensor + output_differentiability: [False] + +- name: ge.Tensor(Tensor self, Tensor other) -> Tensor + output_differentiability: [False] + +- name: gt.Scalar(Tensor self, Scalar other) -> Tensor + output_differentiability: [False] + +- name: gt.Tensor(Tensor self, Tensor other) -> Tensor + output_differentiability: [False] + +- name: le.Scalar(Tensor self, Scalar other) -> Tensor + output_differentiability: [False] + +- name: le.Tensor(Tensor self, Tensor other) -> Tensor + output_differentiability: [False] + +- name: lt.Scalar(Tensor self, Scalar other) -> Tensor + output_differentiability: [False] + +- name: lt.Tensor(Tensor self, Tensor other) -> Tensor + output_differentiability: [False] + +- name: ne.Scalar(Tensor self, Scalar other) -> Tensor + output_differentiability: [False] + +- name: ne.Tensor(Tensor self, Tensor other) -> Tensor + output_differentiability: [False] + +- name: multinomial(Tensor self, int num_samples, bool replacement=False, *, Generator? generator=None) -> Tensor + output_differentiability: [False] + +- name: nonzero(Tensor self) -> Tensor + output_differentiability: [False] + +- name: segment_reduce(Tensor data, str reduce, *, Tensor? lengths=None, Tensor? indices=None, Tensor? offsets=None, int axis=0, bool unsafe=False, Scalar? initial=None) -> Tensor + data: _segment_reduce_backward(grad, result, data, reduce, lengths, offsets, axis, initial) + +- name: _pin_memory(Tensor self, Device? device=None) -> Tensor + self: grad + +- name: _new_zeros_with_same_feature_meta(Tensor self, Tensor other, *, int self_num_batch_dims=0) -> Tensor + self: non_differentiable + other: non_differentiable + output_differentiability: [False] + +- name: _test_warn_in_autograd(Tensor self) -> Tensor + self: warn_backwards(grad) + +- name: _test_autograd_multiple_dispatch.fullcoverage(Tensor self) -> Tensor + dispatch: + Default: + self: grad.expand_symint(self.sym_sizes()) + 1 + result: auto_linear + AutogradNestedTensor: + self: grad.mul(grad) + AutogradCUDA: + self: grad.expand_symint(self.sym_sizes()) * 2 + +- name: _test_autograd_multiple_dispatch.ntonly(Tensor self, bool b) -> Tensor + dispatch: + AutogradNestedTensor: + self: grad.mul(grad).add(grad) + +- name: _test_autograd_multiple_dispatch_view(Tensor(a) self) -> Tensor(a) + dispatch: + Default: + self: grad.reshape_as(self) + AutogradCUDA: + self: grad.reshape_as(self) + 1 + +- name: _efficientzerotensor(SymInt[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor + output_differentiability: [False] + +- name: scatter_reduce.two(Tensor self, int dim, Tensor index, Tensor src, str reduce, *, bool include_self=True) -> Tensor + self, src: scatter_reduce_backward(grad, self, dim, index, src, reduce, include_self, result) + index: non_differentiable + result: scatter_reduce_jvp(self_p, self_t, dim, index, src_p, src_t, reduce, include_self, result) + +- name: special_airy_ai(Tensor x) -> Tensor + x: non_differentiable + +- name: special_bessel_j0(Tensor self) -> Tensor + self: non_differentiable + +- name: special_bessel_j1(Tensor self) -> Tensor + self: non_differentiable + +- name: special_bessel_y0(Tensor self) -> Tensor + self: non_differentiable + +- name: special_bessel_y1(Tensor self) -> Tensor + self: non_differentiable + +- name: special_chebyshev_polynomial_t(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_chebyshev_polynomial_t.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_chebyshev_polynomial_t.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_chebyshev_polynomial_u(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_chebyshev_polynomial_u.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_chebyshev_polynomial_u.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_chebyshev_polynomial_v(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_chebyshev_polynomial_v.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_chebyshev_polynomial_v.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_chebyshev_polynomial_w(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_chebyshev_polynomial_w.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_chebyshev_polynomial_w.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_hermite_polynomial_h(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_hermite_polynomial_h.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_hermite_polynomial_h.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_hermite_polynomial_he(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_hermite_polynomial_he.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_hermite_polynomial_he.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_laguerre_polynomial_l(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_laguerre_polynomial_l.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_laguerre_polynomial_l.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_legendre_polynomial_p(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_legendre_polynomial_p.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_legendre_polynomial_p.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_modified_bessel_i0(Tensor self) -> Tensor + self: non_differentiable + +- name: special_modified_bessel_i1(Tensor self) -> Tensor + self: non_differentiable + +- name: special_modified_bessel_k0(Tensor self) -> Tensor + self: non_differentiable + +- name: special_modified_bessel_k1(Tensor self) -> Tensor + self: non_differentiable + +- name: special_scaled_modified_bessel_k0(Tensor x) -> Tensor + x: non_differentiable + +- name: special_scaled_modified_bessel_k1(Tensor x) -> Tensor + x: non_differentiable + +- name: special_shifted_chebyshev_polynomial_t(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_t.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_t.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_shifted_chebyshev_polynomial_u(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_u.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_u.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_shifted_chebyshev_polynomial_v(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_v.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_v.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_shifted_chebyshev_polynomial_w(Tensor x, Tensor n) -> Tensor + x: non_differentiable + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_w.x_scalar(Scalar x, Tensor n) -> Tensor + n: non_differentiable + +- name: special_shifted_chebyshev_polynomial_w.n_scalar(Tensor x, Scalar n) -> Tensor + x: non_differentiable + +- name: special_spherical_bessel_j0(Tensor x) -> Tensor + x: non_differentiable + +- name: _reshape_copy(Tensor self, SymInt[] size) -> Tensor + self: grad.reshape_symint(self.sym_sizes()) + result: auto_linear + +# note(crcrpar): `torchgen/api/autograd` logic would unwantedly replace substrings of `self` and `other` of function names. +- name: _foreach_div.List(Tensor[] self, Tensor[] other) -> Tensor[] + self: div_tensor_self_backward(grads[i], other[i], self[i].scalar_type()) + other: div_tensor_other_backward(grads[i], self[i], other[i]) + result: (self_t - other_t * result[i]) / other_p + +- name: _foreach_pow.List(Tensor[] self, Tensor[] exponent) -> Tensor[] + self: pow_backward_self(grads[i], self[i], exponent[i]) + exponent: pow_backward_exponent(grads[i], self[i], exponent[i], result[i]) + result: (pow_backward_self(self_t.conj(), self_p, exponent_p) + pow_backward_exponent(exponent_t.conj(), self_p, exponent_p, result[i])).conj() + +- name: _foreach_pow.ScalarList(Tensor[] self, Scalar[] exponent) -> Tensor[] + self: pow_backward(grads[i], self[i], exponent[i]) + result: pow_backward(self_t.conj(), self_p, exponent[i]).conj() + +- name: _foreach_pow.ScalarAndTensor(Scalar self, Tensor[] exponent) -> Tensor[] + exponent: pow_backward_exponent(grads[i], self, exponent[i], result[i]) + +# note(crcrpar): following definitions seem necessary because the reference native functions +# of `maximum` and `minimum` don't have the overload def with Scalar as their second argument. +- name: _foreach_minimum.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + self: at::where(self[i] == scalar, grads[i] / 2, grads[i]).masked_fill_(self[i] > scalar, 0) + result: scalar + at::where(self_p == scalar, at::scalar_tensor(0.5, result[i].options()), (self_p < scalar).to(result[i].scalar_type())) * (self_t - scalar) + +- name: _foreach_minimum.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + self: at::where(self[i] == scalars[i], grads[i] / 2, grads[i]).masked_fill_(self[i] > scalars[i], 0) + result: scalars[i] + at::where(self_p == scalars[i], at::scalar_tensor(0.5, result[i].options()), (self_p < scalars[i]).to(result[i].scalar_type())) * (self_t - scalars[i]) + +- name: _foreach_maximum.Scalar(Tensor[] self, Scalar scalar) -> Tensor[] + self: at::where(self[i] == scalar, grads[i] / 2, grads[i]).masked_fill_(self[i] < scalar, 0) + result: scalar + at::where(self_p == scalar, at::scalar_tensor(0.5, result[i].options()), (self_p > scalar).to(result[i].scalar_type())) * (self_t - scalar) + +- name: _foreach_maximum.ScalarList(Tensor[] self, Scalar[] scalars) -> Tensor[] + self: at::where(self[i] == scalars[i], grads[i] / 2, grads[i]).masked_fill_(self[i] < scalars[i], 0) + result: scalars[i] + at::where(self_p == scalars[i], at::scalar_tensor(0.5, result[i].options()), (self_p > scalars[i]).to(result[i].scalar_type())) * (self_t - scalars[i]) + +# note(crcrpar): forward-mode AD is tricky for a simple string replace to handle: +# formula.replace("p", "ord") produces `norm_jvord(self_ord, self_t, ord, result)` +- name: _foreach_norm.Scalar(Tensor[] self, Scalar ord=2, ScalarType? dtype=None) -> Tensor[] + self: norm_backward(grads[i], self[i], ord, result[i]) + result: norm_jvp(self_p, self_t, ord, result[i]) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_annotated_fn_args.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_annotated_fn_args.py new file mode 100644 index 0000000000000000000000000000000000000000..1c2555f6ad24a38b12aaabe94abb2961c4a15b0a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_annotated_fn_args.py @@ -0,0 +1,132 @@ +""" +For procedural tests needed for __torch_function__, we use this function +to export method names and signatures as needed by the tests in +test/test_overrides.py. + +python -m tools.autograd.gen_annotated_fn_args \ + aten/src/ATen/native/native_functions.yaml \ + aten/src/ATen/native/tags.yaml \ + $OUTPUT_DIR \ + tools/autograd + +Where $OUTPUT_DIR is where you would like the files to be +generated. In the full build system, OUTPUT_DIR is +torch/testing/_internal/generated +""" + +from __future__ import annotations + +import argparse +import os +import textwrap +from collections import defaultdict +from typing import Any, Sequence, TYPE_CHECKING + +import torchgen.api.python as python +from torchgen.context import with_native_function +from torchgen.gen import parse_native_yaml +from torchgen.utils import FileManager + +from .gen_python_functions import ( + is_py_fft_function, + is_py_linalg_function, + is_py_nn_function, + is_py_special_function, + is_py_torch_function, + is_py_variable_method, + should_generate_py_binding, +) + + +if TYPE_CHECKING: + from torchgen.model import Argument, BaseOperatorName, NativeFunction + + +def gen_annotated( + native_yaml_path: str, tags_yaml_path: str, out: str, autograd_dir: str +) -> None: + native_functions = parse_native_yaml( + native_yaml_path, tags_yaml_path + ).native_functions + mappings = ( + (is_py_torch_function, "torch._C._VariableFunctions"), + (is_py_nn_function, "torch._C._nn"), + (is_py_linalg_function, "torch._C._linalg"), + (is_py_special_function, "torch._C._special"), + (is_py_fft_function, "torch._C._fft"), + (is_py_variable_method, "torch.Tensor"), + ) + annotated_args: list[str] = [] + for pred, namespace in mappings: + groups: dict[BaseOperatorName, list[NativeFunction]] = defaultdict(list) + for f in native_functions: + if not should_generate_py_binding(f) or not pred(f): + continue + groups[f.func.name.name].append(f) + for group in groups.values(): + for f in group: + annotated_args.append(f"{namespace}.{gen_annotated_args(f)}") + + template_path = os.path.join(autograd_dir, "templates") + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + fm.write_with_template( + "annotated_fn_args.py", + "annotated_fn_args.py.in", + lambda: { + "annotated_args": textwrap.indent("\n".join(annotated_args), " "), + }, + ) + + +@with_native_function +def gen_annotated_args(f: NativeFunction) -> str: + def _get_kwargs_func_exclusion_list() -> list[str]: + # functions that currently don't work with kwargs in test_overrides.py + return [ + "diagonal", + "round_", + "round", + "scatter_", + ] + + def _add_out_arg( + out_args: list[dict[str, Any]], args: Sequence[Argument], *, is_kwarg_only: bool + ) -> None: + for arg in args: + if arg.default is not None: + continue + out_arg: dict[str, Any] = {} + out_arg["is_kwarg_only"] = str(is_kwarg_only) + out_arg["name"] = arg.name + out_arg["simple_type"] = python.argument_type_str( + arg.type, simple_type=True + ) + size_t = python.argument_type_size(arg.type) + if size_t: + out_arg["size"] = size_t + out_args.append(out_arg) + + out_args: list[dict[str, Any]] = [] + _add_out_arg(out_args, f.func.arguments.flat_positional, is_kwarg_only=False) + if f"{f.func.name.name}" not in _get_kwargs_func_exclusion_list(): + _add_out_arg(out_args, f.func.arguments.flat_kwarg_only, is_kwarg_only=True) + + return f"{f.func.name.name}: {repr(out_args)}," + + +def main() -> None: + parser = argparse.ArgumentParser(description="Generate annotated_fn_args script") + parser.add_argument( + "native_functions", metavar="NATIVE", help="path to native_functions.yaml" + ) + parser.add_argument("tags", metavar="TAGS", help="path to tags.yaml") + parser.add_argument("out", metavar="OUT", help="path to output directory") + parser.add_argument( + "autograd", metavar="AUTOGRAD", help="path to template directory" + ) + args = parser.parse_args() + gen_annotated(args.native_functions, args.tags, args.out, args.autograd) + + +if __name__ == "__main__": + main() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_autograd.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_autograd.py new file mode 100644 index 0000000000000000000000000000000000000000..cee788aa9c825c4ed2916254726bd3e35c0d55fa --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_autograd.py @@ -0,0 +1,147 @@ +""" +To run this file by hand from the root of the PyTorch +repository, run: + +python -m tools.autograd.gen_autograd \ + aten/src/ATen/native/native_functions.yaml \ + aten/src/ATen/native/tags.yaml \ + $OUTPUT_DIR \ + tools/autograd + +Where $OUTPUT_DIR is where you would like the files to be +generated. In the full build system, OUTPUT_DIR is +torch/csrc/autograd/generated/ +""" + +# gen_autograd.py generates C++ autograd functions and Python bindings. +# +# It delegates to the following scripts: +# +# gen_autograd_functions.py: generates subclasses of torch::autograd::Node +# gen_variable_type.py: generates VariableType.h which contains all tensor methods +# gen_python_functions.py: generates Python bindings to THPVariable +# + +from __future__ import annotations + +import argparse +import os + +from torchgen.api import cpp +from torchgen.api.autograd import ( + match_differentiability_info, + NativeFunctionWithDifferentiabilityInfo, +) +from torchgen.gen import parse_native_yaml +from torchgen.selective_build.selector import SelectiveBuilder + +from . import gen_python_functions +from .gen_autograd_functions import ( + gen_autograd_functions_lib, + gen_autograd_functions_python, +) +from .gen_inplace_or_view_type import gen_inplace_or_view_type +from .gen_trace_type import gen_trace_type +from .gen_variable_factories import gen_variable_factories +from .gen_variable_type import gen_variable_type +from .gen_view_funcs import gen_view_funcs +from .load_derivatives import load_derivatives + + +def gen_autograd( + native_functions_path: str, + tags_path: str, + out: str, + autograd_dir: str, + operator_selector: SelectiveBuilder, + disable_autograd: bool = False, +) -> None: + # Parse and load derivatives.yaml + differentiability_infos, used_dispatch_keys = load_derivatives( + os.path.join(autograd_dir, "derivatives.yaml"), native_functions_path, tags_path + ) + + template_path = os.path.join(autograd_dir, "templates") + + native_funcs = parse_native_yaml(native_functions_path, tags_path).native_functions + fns = sorted( + filter( + operator_selector.is_native_function_selected_for_training, native_funcs + ), + key=lambda f: cpp.name(f.func), + ) + fns_with_diff_infos: list[NativeFunctionWithDifferentiabilityInfo] = ( + match_differentiability_info(fns, differentiability_infos) + ) + + # Generate VariableType.h/cpp + if not disable_autograd: + gen_variable_type( + out, + native_functions_path, + tags_path, + fns_with_diff_infos, + template_path, + used_dispatch_keys, + ) + + gen_inplace_or_view_type( + out, native_functions_path, tags_path, fns_with_diff_infos, template_path + ) + + # operator filter not applied as tracing sources are excluded in selective build + gen_trace_type(out, native_funcs, template_path) + # Generate Functions.h/cpp + gen_autograd_functions_lib(out, differentiability_infos, template_path) + + # Generate variable_factories.h + gen_variable_factories(out, native_functions_path, tags_path, template_path) + + # Generate ViewFuncs.h/cpp + gen_view_funcs(out, fns_with_diff_infos, template_path) + + +def gen_autograd_python( + native_functions_path: str, + tags_path: str, + out: str, + autograd_dir: str, +) -> None: + differentiability_infos, _ = load_derivatives( + os.path.join(autograd_dir, "derivatives.yaml"), native_functions_path, tags_path + ) + + template_path = os.path.join(autograd_dir, "templates") + + # Generate Functions.h/cpp + gen_autograd_functions_python(out, differentiability_infos, template_path) + + # Generate Python bindings + deprecated_path = os.path.join(autograd_dir, "deprecated.yaml") + gen_python_functions.gen( + out, native_functions_path, tags_path, deprecated_path, template_path + ) + + +def main() -> None: + parser = argparse.ArgumentParser(description="Generate autograd C++ files script") + parser.add_argument( + "native_functions", metavar="NATIVE", help="path to native_functions.yaml" + ) + parser.add_argument("tags", metavar="NATIVE", help="path to tags.yaml") + parser.add_argument("out", metavar="OUT", help="path to output directory") + parser.add_argument( + "autograd", metavar="AUTOGRAD", help="path to autograd directory" + ) + args = parser.parse_args() + gen_autograd( + args.native_functions, + args.tags, + args.out, + args.autograd, + SelectiveBuilder.get_nop_selector(), + ) + + +if __name__ == "__main__": + main() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_autograd_functions.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_autograd_functions.py new file mode 100644 index 0000000000000000000000000000000000000000..ce82961727a2d32e54ccd35a6d1b19446ab1248d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_autograd_functions.py @@ -0,0 +1,1009 @@ +# Generates C++ autograd functions for the derivatives of ATen operations +# +# This writes two files: +# Functions.h/cpp: subclasses of autograd::Node +# python_functions.h/cpp: Python bindings for the above classes +# + +from __future__ import annotations + +from typing import Sequence + +from torchgen.api.autograd import ( + Derivative, + DifferentiabilityInfo, + SavedAttribute, + uses_retain_variables, + uses_single_grad, +) +from torchgen.api.types import ( + ArrayRefCType, + BaseCppType, + BaseCType, + Binding, + boolT, + doubleT, + intArrayRefT, + iTensorListRefT, + ListCType, + longT, + MutRefCType, + OptionalCType, + optionalIntArrayRefT, + optionalSymIntArrayRefT, + scalarT, + stringT, + symIntArrayRefT, + SymIntT, + TENSOR_LIST_LIKE_CTYPES, + tensorListT, + tensorT, + VectorCType, +) +from torchgen.code_template import CodeTemplate +from torchgen.model import Argument, FunctionSchema +from torchgen.utils import FileManager + +from .gen_inplace_or_view_type import VIEW_FUNCTIONS + + +FUNCTION_DECLARATION = CodeTemplate( + """\ +#ifdef _WIN32 +struct ${op} : public ${superclass} { + TORCH_API ${op}() = default; +#else +struct TORCH_API ${op} : public ${superclass} { +#endif + using ${superclass}::${superclass}; + variable_list apply(variable_list&& grads) override; + std::string name() const override { return "${op}"; } + void release_variables() override { + ${thread_lock} + ${release_variables} + } + ${will_release_variables} + void compiled_args(CompiledNodeArgs& args) override; + variable_list apply_with_saved(const variable_list& inputs, SwapSavedVariables& saved) override; + ${saved_variables} + ${saved_list_sizes} +}; +""" +) + +WILL_RELEASE_VARIABLES = CodeTemplate( + """\ +bool retain_variables = true; +void will_release_variables() override { + retain_variables = false; +} +""" +) + +# We generate e.g. MulBackward0::apply and have that call into +# MulBackward0_apply_functional. The apply_functional is a pure function, +# that is, it does not rely on global state. MulBackward0::apply +# is responsible for querying the autograd engine for which outputs should +# be computed (needs_input_grad), applying locks, +# and unpacking saved variables to pass to MulBackward0_apply_functional. +# +# needs_input_grad is a mapping from input index to if that input needs +# gradients computed. For operators that take in List[Tensor], the List[Tensor] +# is one element in the needs_input_grad that specifies if *any* of the +# List[Tensor] needs input grad. In theory this could be optimized. +FUNCTION_DEFINITION = CodeTemplate( + """\ +static variable_list ${op}_apply_functional( + variable_list&& grads, + std::array needs_input_grad${,unpacked_saved_vars_signature}) +{ + IndexRangeGenerator gen; + ${compute_index_ranges} + variable_list grad_inputs(gen.size()); + ${body} + return grad_inputs; +} + +variable_list ${op}::apply(variable_list&& grads) { + ${thread_lock} + ${asserts} + ${unpacks} + ${compute_needs_input_grad} + return ${op}_apply_functional(std::move(grads), needs_input_grad${,unpacked_saved_vars}); +} + +void ${op}::compiled_args(CompiledNodeArgs& args) { + ${compiled_args} +} +variable_list ${op}::apply_with_saved(const variable_list& grads, SwapSavedVariables& saved) { + ${apply_with_saved_before} + variable_list result = apply(variable_list(grads)); + ${apply_with_saved_after} + return result; +} +""" +) + +GRAD_INPUT_MASK = CodeTemplate( + """\ + auto grad_input_mask = std::array{ + ${masks} + }; +""" +) + +COMPUTE_NEEDS_INPUT_GRAD = CodeTemplate( + """\ +IndexRangeGenerator gen; +${compute_index_ranges} +auto needs_input_grad = std::array{ + ${masks} +};\ +""" +) + + +DERIVATIVE_SINGLE = CodeTemplate( + """\ +if (needs_input_grad[/*${name}*/${idx}]) { + auto grad_result = ${derivative}; + copy_range(grad_inputs, ${name}_ix, grad_result); +} +""" +) + +# note(crcrpar): `self` argument and other optional positional argument +# of foreach functions are basically a list of n `Tensor`s thus iterating over +# `grads` in order to utilize and apply the existing derivative definitions +# to each `Tensor`(s) of `self`, and the others. +DERIVATIVE_SINGLE_FOREACH = CodeTemplate( + """\ +if (needs_input_grad[/*${name}*/${idx}]) { // ${name} + std::vector grad_result; + grad_result.reserve(grads.size()); + for (const auto & i : c10::irange(grads.size())) { + if (grads[i].defined()) { + grad_result.emplace_back(${derivative}); + } else { + grad_result.emplace_back(Tensor()); + } + } + copy_range(grad_inputs, ${name}_ix, grad_result); +} +""" +) + +DERIVATIVE_MULTI_COPY_RANGE = CodeTemplate( + """\ + if (needs_input_grad[/*${name}*/${idx}]) { + copy_range(grad_inputs, ${name}_ix, std::get<${i}>(grad_result)); + } +""" +) + +DERIVATIVE_MULTI = CodeTemplate( + """\ +if (${needs_input_grad}) { + ${grad_input_mask} + auto grad_result = ${derivative}; + ${copy_ranges} +} +""" +) + +# Generates python bindings +# +# This generates the definitions for: +# (1) The PyTypeObject for each backward grad_fn subclassing Node +# (2) The entry for PyTypeObject's tp_getset slot (an array of PyGetSetDef structs) +# We generate one PyGetSetDef struct for each of grad_fn's saved inputs and outputs +# Each PyGetSetDef has a function ptr to a getter, also defined here (3). +# (3) Getters for each of grad_fn's saved inputs and outputs. +# +PY_FUNCTION_DEFINITION = CodeTemplate( + """\ +static PyTypeObject ${op}Class; +addClass<${op}>(module, ${op}Class, "${op}", ${op}_properties); +""" +) + +PY_FUNCTION_PROPS_AND_GETTERS = CodeTemplate( + """\ +${all_getter_definitions} + +static struct PyGetSetDef ${op}_properties[] = { + THP_FUNCTION_DEFAULT_PROPERTIES, + ${all_getsetdef_structs} + {nullptr} /* sentinel */ +}; + +""" +) + +PY_GETSETDEF_STRUCT = CodeTemplate( + """\ +{(char*)"_saved_${name}", (getter)THP${op}_${name}_getter, nullptr, nullptr, nullptr}""" +) + +PY_RAW_GETSETDEF_STRUCT = CodeTemplate( + """\ +{(char*)"_raw_saved_${name}", (getter)THP${op}_${name}_raw_getter, nullptr, nullptr, nullptr}""" +) + +# Getter templates +GETTER_DEFINITION = CodeTemplate( + """\ +PyObject* THP${op}_${name}_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + auto prop = static_cast<${op}*>(self->cdata.get())->${name}; + ${body} + END_HANDLE_TH_ERRORS +} +""" +) + +GETTER_DEFINITION_SAVEDVAR = CodeTemplate( + """\ +PyObject* THP${op}_${name}_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + const auto& prop = static_cast<${op}*>(self->cdata.get())->${name}_; + ${body} + END_HANDLE_TH_ERRORS +} +""" +) + +GETTER_DEFINITION_RAW_SAVEDVAR = CodeTemplate( + """\ +PyObject* THP${op}_${name}_raw_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + const auto& prop = static_cast<${op}*>(self->cdata.get())->${name}_; + ${body} + END_HANDLE_TH_ERRORS +} +""" +) + +GETTER_DEFINITION_VEC_SAVEDVAR = CodeTemplate( + """\ +PyObject* THP${op}_${name}_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + const auto *node = static_cast<${op}*>(self->cdata.get()); + const auto& prop = node->${name}_; + if (node->${name}_released_) { + PyErr_SetString(PyExc_RuntimeError, ERR_BACKWARD_TWICE); + return nullptr; + } + ${body} + END_HANDLE_TH_ERRORS +} +""" +) + +GETTER_DEFINITION_RAW_VEC_SAVEDVAR = CodeTemplate( + """\ +PyObject* THP${op}_${name}_raw_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + const auto *node = static_cast<${op}*>(self->cdata.get()); + const auto& prop = node->${name}_; + if (node->${name}_released_) { + PyErr_SetString(PyExc_RuntimeError, ERR_BACKWARD_TWICE); + return nullptr; + } + ${body} + END_HANDLE_TH_ERRORS +} +""" +) + +GETTER_DEFINITION_OPT = CodeTemplate( + """\ +PyObject* THP${op}_${name}_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + auto opt_prop = static_cast<${op}*>(self->cdata.get())->${name}; + if (!opt_prop.has_value()) { + Py_RETURN_NONE; + } + auto prop = opt_prop.value(); + ${body} + END_HANDLE_TH_ERRORS +} +""" +) + +GETTER_DEFINITION_OPT_ARRAYREF = CodeTemplate( + """\ +PyObject* THP${op}_${name}_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + auto opt_prop = static_cast<${op}*>(self->cdata.get())->${name}; + if (!opt_prop.list.has_value()) { + Py_RETURN_NONE; + } + auto prop = opt_prop.list.value(); + ${body} + END_HANDLE_TH_ERRORS +} +""" +) + +# Getter body +GETTER_BODY_SAVEDVAR = """\ +return THPVariable_Wrap(prop.unpack(self->cdata)); +""" + +GETTER_BODY_RAW_SAVEDVAR = """\ +pybind11::object obj = pybind11::cast(prop, pybind11::return_value_policy::reference); +return obj.release().ptr(); +""" + +GETTER_BODY_VEC_SAVEDVAR = """\ +PyObject* tup = PyTuple_New((Py_ssize_t) prop.size()); +for (auto i: c10::irange(prop.size())) { + PyTuple_SetItem(tup, (Py_ssize_t) i, THPVariable_Wrap(prop[i].unpack(self->cdata))); +} +return tup; +""" + +GETTER_BODY_RAW_VEC_SAVEDVAR = """\ +PyObject* tup = PyTuple_New((Py_ssize_t) prop.size()); +for (auto i : c10::irange(prop.size())) { + pybind11::object obj = pybind11::cast(prop[i], pybind11::return_value_policy::reference); + PyTuple_SetItem(tup, (Py_ssize_t) i, obj.release().ptr()); +} +return tup; +""" + +GETTER_BODY_ARRAYREF_LONG = """\ +PyObject* tup = PyTuple_New((Py_ssize_t) prop.size()); +for (auto i : c10::irange(prop.size())) { + PyTuple_SetItem(tup, (Py_ssize_t) i, PyLong_FromUnsignedLong((uint64_t) prop[i])); +} +return tup; +""" + +GETTER_BODY_ARRAYREF_SYMINT = """\ +PyObject* tup = PyTuple_New((Py_ssize_t) prop.size()); +for (auto i : c10::irange(prop.size())) { + auto si = prop[i]; + if (auto m = si.maybe_as_int()) { + PyTuple_SetItem(tup, (Py_ssize_t) i, PyLong_FromUnsignedLong(*m)); + } else { + auto py_symint = py::cast(si).release().ptr(); + PyTuple_SetItem(tup, (Py_ssize_t) i, py_symint); + } +} +return tup; +""" + +GETTER_BODY_ARRAYREF_DOUBLE = """\ +PyObject* tup = PyTuple_New((Py_ssize_t) prop.size()); +for (auto i : c10::irange(prop.size())) { + PyTuple_SetItem(tup, (Py_ssize_t) i, PyFloat_FromDouble((double) prop[i])); +} +return tup; +""" + +GETTER_BODY_INT64_T = """\ +return PyLong_FromUnsignedLong((int64_t) prop); +""" + +GETTER_BODY_SYMINT = """\ +if (auto m = prop.maybe_as_int()) { + return PyLong_FromUnsignedLong(*m); +} else { + return py::cast(prop).release().ptr(); +} +""" + +GETTER_BODY_DOUBLE = """\ +return PyFloat_FromDouble((double) prop); +""" + +GETTER_BODY_BOOL = """\ +if (prop) { + Py_RETURN_TRUE; +} else { + Py_RETURN_FALSE; +} +""" + +GETTER_BODY_STRING = """\ +return PyUnicode_FromStringAndSize(prop.data(), prop.size()); +""" + +GETTER_BODY_SCALAR = """\ +if (prop.isComplex()) { + auto cprop = prop.to>(); + return PyComplex_FromDoubles(cprop.real(), cprop.imag()); +} else if (prop.isFloatingPoint()) { + return PyFloat_FromDouble(prop.to()); +} else if (prop.isIntegral(/*includeBool=*/false)) { + return PyLong_FromLong(prop.to()); +} else if (prop.isBoolean()) { + if (prop.to()) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } +} else { + PyErr_SetString(PyExc_RuntimeError, "Unknown scalar type"); + return nullptr; +} +""" + + +GETTER_BODY_VEC_SCALAR = """\ +PyObject* tup = PyTuple_New((Py_ssize_t) prop.size()); +for (auto i: c10::irange(prop.size())) { + if (prop[i].isComplex()) { + auto cprop = prop[i].to>(); + PyTuple_SetItem(tup, (Py_ssize_t) i, PyComplex_FromDoubles(cprop.real(), cprop.imag())); + } else if (prop[i].isFloatingPoint()) { + auto double_prop = prop[i].to(); + PyTuple_SetItem(tup, (Py_ssize_t) i, PyFloat_FromDouble(double_prop)); + } else if (prop[i].isIntegral(/*includeBool=*/false)) { + auto long_prop = prop[i].to(); + PyTuple_SetItem(tup, (Py_ssize_t) i, PyLong_FromLong(long_prop)); + } else if (prop[i].isBoolean()) { + if (prop[i].to()) { + PyTuple_SetItem(tup, (Py_ssize_t) i, Py_True); + } else { + PyTuple_SetItem(tup, (Py_ssize_t) i, Py_False); + } + } else { + PyErr_SetString(PyExc_RuntimeError, "Unknown scalar type"); + return nullptr; + } +} +return tup; +""" + + +MISC_GETTER_DEFS = { + OptionalCType(BaseCType(longT)): (GETTER_DEFINITION_OPT, GETTER_BODY_INT64_T), + OptionalCType(BaseCType(SymIntT)): (GETTER_DEFINITION_OPT, GETTER_BODY_SYMINT), + BaseCType(doubleT): (GETTER_DEFINITION, GETTER_BODY_DOUBLE), + OptionalCType(BaseCType(doubleT)): (GETTER_DEFINITION_OPT, GETTER_BODY_DOUBLE), + BaseCType(boolT): (GETTER_DEFINITION, GETTER_BODY_BOOL), + BaseCType(scalarT): (GETTER_DEFINITION, GETTER_BODY_SCALAR), + OptionalCType(BaseCType(scalarT)): (GETTER_DEFINITION_OPT, GETTER_BODY_SCALAR), +} + +# These functions have backwards which cannot be traced, and so must have +# their backward functions traced opaquely. +# VIEW_FUNCTIONS are not traceable because they use as_strided, which +# has an untraceable backwards, see +# https://github.com/pytorch/pytorch/issues/4250 +# TODO: This is probably not exhaustive, but it's a start +UNTRACEABLE_FUNCTIONS = VIEW_FUNCTIONS + + +def get_infos_with_derivatives_list( + differentiability_infos: dict[FunctionSchema, dict[str, DifferentiabilityInfo]], +) -> list[DifferentiabilityInfo]: + diff_info_list = [ + info + for diffinfo_dict in differentiability_infos.values() + for info in diffinfo_dict.values() + ] + + return list(filter(lambda info: info.args_with_derivatives, diff_info_list)) + + +def gen_autograd_functions_lib( + out: str, + differentiability_infos: dict[FunctionSchema, dict[str, DifferentiabilityInfo]], + template_path: str, +) -> None: + """Functions.h and Functions.cpp body + + These contain the auto-generated subclasses of torch::autograd::Node + for each every differentiable torch function. + """ + + # get a 1D list of diffinfos, we do not need them to be per FunctionSchema/DispatchKey here + # infos with the diff dispatchkeys but the same name will still be in the same shard. + infos = get_infos_with_derivatives_list(differentiability_infos) + declarations = [process_function(f, FUNCTION_DECLARATION) for f in infos] + definitions = [process_function(f, FUNCTION_DEFINITION) for f in infos] + + file_basename = "Functions" + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + for suffix in [".h", ".cpp"]: + fname = file_basename + suffix + fm.write_with_template( + fname, + fname, + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/" + + fname, + "autograd_function_declarations": declarations, + "autograd_function_definitions": definitions, + }, + ) + + +def gen_autograd_functions_python( + out: str, + differentiability_infos: dict[FunctionSchema, dict[str, DifferentiabilityInfo]], + template_path: str, +) -> None: + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + num_shards = 5 + fm.write( + "python_functions.h", + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/python_functions.h", + "shard_forward_declare": [ + f"void initialize_autogenerated_functions_{i}(PyObject* module);" + for i in range(num_shards) + ], + "shard_call": [ + f"initialize_autogenerated_functions_{i}(module);" + for i in range(num_shards) + ], + }, + ) + + # get a 1D list of diffinfos, we do not need them to be per FunctionSchema/DispatchKey here + # infos with the diff dispatchkeys but the same name will still be in the same shard. + infos = get_infos_with_derivatives_list(differentiability_infos) + fm.write_sharded( + "python_functions.cpp", + infos, + key_fn=lambda info: info.name, + base_env={ + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/python_functions.cpp", + }, + env_callable=lambda info: { + "py_function_initializers": [ + process_function(info, PY_FUNCTION_DEFINITION) + ], + "py_function_props_and_getters": [ + process_function(info, PY_FUNCTION_PROPS_AND_GETTERS) + ], + }, + num_shards=num_shards, + sharded_keys={"py_function_initializers", "py_function_props_and_getters"}, + ) + + +def process_function(info: DifferentiabilityInfo, template: CodeTemplate) -> str: + saved_variables: list[str] = [] + release_variables: list[str] = [] + saved_list_sizes: list[str] = [] + unpack: list[str] = [] + asserts: list[str] = [] + compute_index_ranges: list[str] = [] + getter_definitions: list[str] = [] + py_getsetdef_structs: list[str] = [] + compiled_args: list[str] = [] + apply_with_saved_before: list[str] = [] + apply_with_saved_after: list[str] = [] + unpacked_saved_vars: list[str] = [] + unpacked_saved_vars_ref_type: list[str] = [] + # Maps var_name to a unique index. The var_name is the + # name of an input to the operator that needs a gradient (like "self", "other"). + # The index is the order in which they appear. We use this mapping + # to populate needs_input_grad in some order and then grab values from it. + var_name_map: dict[str, int] = {} + + for idx, arg in enumerate(info.args_with_derivatives): + if arg.type in TENSOR_LIST_LIKE_CTYPES: + size = f"{arg.name}_size_" + saved_list_sizes.append(f"size_t {arg.name}_size_;") + unpacked_saved_vars.append(f"{arg.name}_size_") + unpacked_saved_vars_ref_type.append("size_t") + else: + size = "1" + compute_index_ranges.append(f"auto {arg.name}_ix = gen.range({size});") + var_name_map[arg.name] = idx + + def save_var(var: SavedAttribute, is_output: bool) -> None: + name = var.nctype.name + type = var.nctype.type + should_append_getsetdef = True + should_append_raw_getsetdef = False + visit_name = name + uses_cpp_saved_variable_cls = False + unpacked_ref_type = None + + if ( + type == BaseCType(tensorT) + or type == OptionalCType(BaseCType(tensorT)) + or type == MutRefCType(OptionalCType(BaseCType(tensorT))) + or (type == BaseCType(scalarT) and is_output) + ): + uses_cpp_saved_variable_cls = True + saved_variables.append(f"SavedVariable {name}_;") + release_variables.append(f"{name}_.reset_data();") + ptr = "shared_from_this()" if is_output else "" + unpack.append(f"auto {name} = {name}_.unpack({ptr});") + getter_definitions.append( + GETTER_DEFINITION_SAVEDVAR.substitute( + op=info.op, name=name, body=GETTER_BODY_SAVEDVAR + ) + ) + getter_definitions.append( + GETTER_DEFINITION_RAW_SAVEDVAR.substitute( + op=info.op, name=name, body=GETTER_BODY_RAW_SAVEDVAR + ) + ) + should_append_raw_getsetdef = True + visit_name = f"{name}_" + unpacked_ref_type = "Tensor&" + elif ( + type == BaseCType(tensorListT) + or type == BaseCType(iTensorListRefT) + or type == VectorCType(BaseCType(tensorT)) + ): + # note(crcrpar): [nuanced return type of out-of-place foreach functions] + # When an out-of-place foreach function whose return signature is `Tensor[]` + # spells out its backward definitions in `derivatives.yaml`, and some of them depend on + # `result`, `result`'s type is interpreted and treated as `std::vector`. + # An out-of-place foreach whose backwards rely on their output doesn't suffer from this + # difference if the definitions are codegen'ed. + # This special case is needed for `_foreach_pow.List` and `_foreach_pow.ScalarAndTensor` + # as of https://github.com/pytorch/pytorch/pull/105504. + if type == VectorCType(BaseCType(tensorT)): + assert ( + info.func.func.name.name.base.startswith("_foreach") and is_output + ) + uses_cpp_saved_variable_cls = True + saved_variables.append(f"std::vector {name}_;") + saved_variables.append(f"bool {name}_released_ = false;") + # Just clear() is sufficient, we don't need to loop and clear each variable. + # Because the SavedVariable owns a tensor and a grad_fn, removing the SavedVariable makes them go away as well. + release_variables.append(f"{name}_.clear();") + release_variables.append(f"{name}_released_ = true;") + ptr = "shared_from_this()" if is_output else "nullptr" + unpack.append(f"auto {name} = unpack_list({name}_, {ptr});") + asserts.append(f"TORCH_CHECK(!{name}_released_, ERR_BACKWARD_TWICE);") + getter_definitions.append( + GETTER_DEFINITION_VEC_SAVEDVAR.substitute( + op=info.op, name=name, body=GETTER_BODY_VEC_SAVEDVAR + ) + ) + getter_definitions.append( + GETTER_DEFINITION_RAW_VEC_SAVEDVAR.substitute( + op=info.op, name=name, body=GETTER_BODY_RAW_VEC_SAVEDVAR + ) + ) + should_append_raw_getsetdef = True + visit_name = f"{name}_" + unpacked_ref_type = "std::vector&" + elif type == ListCType(OptionalCType(BaseCType(tensorT))): + uses_cpp_saved_variable_cls = True + saved_variables.append(f"std::vector {name}_;") + saved_variables.append(f"bool {name}_released_ = false;") + # Just clear() is sufficient, we don't need to loop and clear each variable. + # Because the SavedVariable owns a tensor and a grad_fn, removing the SavedVariable makes them go away as well. + release_variables.append(f"{name}_.clear();") + release_variables.append(f"{name}_released_ = true;") + unpack.append(f"auto {name} = unpack_opt_list({name}_);") + asserts.append(f"TORCH_CHECK(!{name}_released_, ERR_BACKWARD_TWICE);") + getter_definitions.append( + GETTER_DEFINITION_VEC_SAVEDVAR.substitute( + op=info.op, name=name, body=GETTER_BODY_VEC_SAVEDVAR + ) + ) + getter_definitions.append( + GETTER_DEFINITION_RAW_VEC_SAVEDVAR.substitute( + op=info.op, name=name, body=GETTER_BODY_RAW_VEC_SAVEDVAR + ) + ) + should_append_raw_getsetdef = True + visit_name = f"{name}_" + unpacked_ref_type = "torch::List>&" + elif type == BaseCType(intArrayRefT): + saved_variables.append(f"std::vector {name};") + getter_definitions.append( + GETTER_DEFINITION.substitute( + op=info.op, name=name, body=GETTER_BODY_ARRAYREF_LONG + ) + ) + elif type == BaseCType(symIntArrayRefT): + saved_variables.append(f"std::vector {name};") + getter_definitions.append( + GETTER_DEFINITION.substitute( + op=info.op, name=name, body=GETTER_BODY_ARRAYREF_SYMINT + ) + ) + elif type == BaseCType(optionalIntArrayRefT): + saved_variables.append(f"c10::OptionalArray {name};") + getter_definitions.append( + GETTER_DEFINITION_OPT_ARRAYREF.substitute( + op=info.op, name=name, body=GETTER_BODY_ARRAYREF_LONG + ) + ) + elif type == BaseCType(optionalSymIntArrayRefT): + saved_variables.append(f"c10::OptionalArray {name};") + getter_definitions.append( + GETTER_DEFINITION_OPT_ARRAYREF.substitute( + op=info.op, name=name, body=GETTER_BODY_ARRAYREF_SYMINT + ) + ) + elif type == OptionalCType(BaseCType(intArrayRefT)): + saved_variables.append(f"c10::OptionalArray {name};") + getter_definitions.append( + GETTER_DEFINITION_OPT_ARRAYREF.substitute( + op=info.op, name=name, body=GETTER_BODY_ARRAYREF_LONG + ) + ) + elif type == OptionalCType(BaseCType(symIntArrayRefT)): + saved_variables.append(f"c10::OptionalArray {name};") + getter_definitions.append( + GETTER_DEFINITION_OPT_ARRAYREF.substitute( + op=info.op, name=name, body=GETTER_BODY_ARRAYREF_SYMINT + ) + ) + elif type == OptionalCType(ArrayRefCType(BaseCType(doubleT))): + saved_variables.append(f"c10::OptionalArray {name};") + getter_definitions.append( + GETTER_DEFINITION_OPT_ARRAYREF.substitute( + op=info.op, name=name, body=GETTER_BODY_ARRAYREF_DOUBLE + ) + ) + elif type == BaseCType(longT): + saved_variables.append(f"{type.cpp_type()} {name} = 0;") + getter_definitions.append( + GETTER_DEFINITION.substitute( + op=info.op, name=name, body=GETTER_BODY_INT64_T + ) + ) + elif type == BaseCType(SymIntT): + saved_variables.append(f"c10::SymInt {name};") + getter_definitions.append( + GETTER_DEFINITION.substitute( + op=info.op, name=name, body=GETTER_BODY_SYMINT + ) + ) + elif type == BaseCType(stringT): + saved_variables.append(f"std::string {name};") + getter_definitions.append( + GETTER_DEFINITION.substitute( + op=info.op, name=name, body=GETTER_BODY_STRING + ) + ) + elif type == OptionalCType(BaseCType(stringT)): + saved_variables.append(f"std::optional {name};") + getter_definitions.append( + GETTER_DEFINITION_OPT.substitute( + op=info.op, name=name, body=GETTER_BODY_STRING + ) + ) + elif type == ArrayRefCType( + elem=BaseCType(type=BaseCppType(ns="at", name="Scalar")) + ): + saved_variables.append(f"std::vector {name};") + unpacked_ref_type = "std::vector&" + saved_variables.append(f"bool {name}_released_ = false;") + # Just clear() is sufficient, we don't need to loop and clear each variable. + # Because the SavedVariable owns a tensor and a grad_fn, removing the SavedVariable makes them go away as well. + release_variables.append(f"{name}.clear();") + # release_variables.append(f"{name}_released_ = true;") + # unpack.append(f"auto {name} = unpack_list({name}_);") + # asserts.append(f"TORCH_CHECK(!{name}_released_, ERR_BACKWARD_TWICE);") + getter_definitions.append( + CodeTemplate( + """\ +PyObject* THP${op}_${name}_getter(THPCppFunction *self, void *_unused) { + HANDLE_TH_ERRORS + const auto *node = static_cast<${op}*>(self->cdata.get()); + const auto& prop = node->${name}; + if (node->${name}_released_) { + PyErr_SetString(PyExc_RuntimeError, ERR_BACKWARD_TWICE); + return nullptr; + } + ${body} + END_HANDLE_TH_ERRORS +} + """ + ).substitute( + op=info.op, + name=name, + body=GETTER_BODY_VEC_SCALAR, + ) + ) + else: + # Check for indicators that you're putting a non-owning reference + # into the saved variable field. If this is spuriously firing, + # edit this field. Otherwise, you probably need to add a case + # above. + assert ( + "ref" not in type.cpp_type().lower() + and "view" not in type.cpp_type().lower() + and "*" not in type.cpp_type() + and "&" not in type.cpp_type() + ), f"{type.cpp_type()} looks like it contains a non-owning reference" + saved_variables.append(f"{type.cpp_type()} {name};") + + if type in MISC_GETTER_DEFS: + getter_def, body = MISC_GETTER_DEFS[type] + getter_definitions.append( + getter_def.substitute(op=info.op, name=name, body=body) + ) + else: + # Types we don't expose python bindings to yet: + # TypeAndSize, at::ScalarType, TensorOptions, TensorGeometry, + # std::vector>, std::vector + should_append_getsetdef = False + + if should_append_getsetdef: + py_getsetdef_structs.append( + PY_GETSETDEF_STRUCT.substitute(op=info.op, name=name) + ) + if should_append_raw_getsetdef: + py_getsetdef_structs.append( + PY_RAW_GETSETDEF_STRUCT.substitute(op=info.op, name=name) + ) + + if uses_cpp_saved_variable_cls: + compiled_args.append( + f"args.collect({visit_name}, {'true' if is_output else 'false'});" + ) + else: + compiled_args.append(f"args.collect({visit_name});") + apply_with_saved_before.append(f"saved.before({visit_name});") + apply_with_saved_after.append(f"saved.after({visit_name});") + + if unpacked_ref_type is None: + unpacked_ref_type = f"{saved_variables[-1].split(' ')[0]}&" + unpacked_saved_vars.append(str(name)) + unpacked_saved_vars_ref_type.append(unpacked_ref_type) + + for var in sorted(info.all_saved_inputs, key=lambda sa: str(sa.nctype.name)): + save_var(var, is_output=False) + for var in sorted(info.all_saved_outputs, key=lambda sa: str(sa.nctype.name)): + save_var(var, is_output=True) + + # lock the mutex when we release variables and in Node::apply to protect thread safety + # see Note [Thread Safety on Autograd Node] + if len(release_variables) > 0: + thread_lock = "std::lock_guard lock(mutex_);" + else: + thread_lock = "" + + if uses_retain_variables(info): + unpacked_saved_vars.append("retain_variables") + unpacked_saved_vars_ref_type.append("bool") + will_release_variables = WILL_RELEASE_VARIABLES.substitute() + else: + will_release_variables = "" + + body: list[str] = [] + + if uses_single_grad(info): + body.append("const auto& grad = grads[0];") + else: + # Generate aliases for gradients named for returned values. + body.extend( + f"const auto& {name} = grads[{info.available_named_gradients.index(name)}];" + for name in sorted(info.used_named_gradients) + ) + + def emit_derivative( + derivative: Derivative, + args_with_derivatives: Sequence[Binding], + ) -> tuple[bool, str]: + formula = derivative.formula + var_names = derivative.var_names + + if len(var_names) == 1: + checks_any_grad_defined = False + if "not_implemented" not in formula: + matching_args = [ + arg for arg in args_with_derivatives if arg.name == var_names[0] + ] + if len(matching_args) == 1: + # We can add undefined grad support if the input variable is a Tensor + arg = matching_args[0] + if isinstance(arg.argument, Argument) and str( + arg.argument.type + ) in ("Tensor", "Tensor?"): + formula = "any_grad_defined ? (" + formula + ") : Tensor()" + checks_any_grad_defined = True + if info.name.startswith("_foreach_"): + derivative_template = DERIVATIVE_SINGLE_FOREACH + else: + derivative_template = DERIVATIVE_SINGLE + return ( + checks_any_grad_defined, + derivative_template.substitute( + name=var_names[0], + derivative=formula, + idx=var_name_map[var_names[0]], + ), + ) + + else: + if "grad_input_mask" in formula: + masks = [ + f"needs_input_grad[{var_name_map[name]}]," for name in var_names + ] + grad_input_mask = GRAD_INPUT_MASK.substitute( + n=len(var_names), masks=masks + ) + else: + grad_input_mask = "" + needs_input_grad = [ + f"needs_input_grad[{var_name_map[name]}]" for name in var_names + ] + needs_input_grad = " || ".join(needs_input_grad) + copy_ranges: list[str] = [] + for i, n in enumerate(var_names): + copy_ranges.append( + DERIVATIVE_MULTI_COPY_RANGE.substitute( + name=n, i=i, idx=var_name_map[n] + ) + ) + return False, DERIVATIVE_MULTI.substitute( + needs_input_grad=needs_input_grad, + copy_ranges=copy_ranges, + derivative=formula, + grad_input_mask=grad_input_mask, + ) + + masks = [] + + need_any_grad_defined_var = False + for derivative in info.derivatives: + checks_any_grad_defined, derivative_text = emit_derivative( + derivative, info.args_with_derivatives + ) + body.append(derivative_text) + need_any_grad_defined_var |= checks_any_grad_defined + + for name in var_name_map: + masks.append(f"task_should_compute_output({{ {name}_ix }}),") + + # Since single-output derivative formulas need to check if grads are + # defined, only perform the check once, before all the formulas + if need_any_grad_defined_var: + body.insert( + -len(info.derivatives), + "bool any_grad_defined = any_variable_defined(grads);", + ) + + if info.name in UNTRACEABLE_FUNCTIONS: + superclass = "Node" + else: + superclass = "TraceableFunction" + + all_getsetdef_structs = ( + ",\n".join(py_getsetdef_structs) + "," if len(py_getsetdef_structs) != 0 else "" + ) + all_getter_definitions = "\n".join(getter_definitions) + + compute_needs_input_grad = COMPUTE_NEEDS_INPUT_GRAD.substitute( + n=len(masks), compute_index_ranges=compute_index_ranges, masks=masks + ) + unpacked_saved_vars_signature = [ + f"{T} {x}" for T, x in zip(unpacked_saved_vars_ref_type, unpacked_saved_vars) + ] + + return template.substitute( + unpacks="\n".join(unpack), + op=info.op, + unpacked_saved_vars=unpacked_saved_vars, + unpacked_saved_vars_signature=unpacked_saved_vars_signature, + compute_needs_input_grad=compute_needs_input_grad, + num_vars=len(var_name_map), + compute_index_ranges=compute_index_ranges, + saved_variables=saved_variables, + release_variables=release_variables, + saved_list_sizes=saved_list_sizes, + asserts=asserts, + thread_lock=thread_lock, + will_release_variables=will_release_variables, + body=body, + superclass=superclass, + all_getter_definitions=all_getter_definitions, + all_getsetdef_structs=all_getsetdef_structs, + compiled_args=compiled_args, + apply_with_saved_before=apply_with_saved_before, + apply_with_saved_after=apply_with_saved_after, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_inplace_or_view_type.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_inplace_or_view_type.py new file mode 100644 index 0000000000000000000000000000000000000000..dcb5ebf3654e45842c0cbde77c18b13a5ddf407e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_inplace_or_view_type.py @@ -0,0 +1,673 @@ +# Generates ADInplaceOrViewType.h/cpp +# +# NOTE: If any changes are being made to the ADInplaceOrView codegen please also check +# if updates are needed in torch/csrc/autograd/autograd_not_implemented_fallback.cpp +# The fallback is expected to mimick this codegen, so we should keep the two in sync. + +from __future__ import annotations + +from torchgen.api import cpp +from torchgen.api.autograd import ( + dispatch_strategy, + gen_differentiable_outputs, + NativeFunctionWithDifferentiabilityInfo, +) +from torchgen.api.types import ( + BaseCType, + Binding, + boolT, + ConstRefCType, + CType, + DispatcherSignature, + intArrayRefT, + longT, + OptionalCType, + symIntArrayRefT, + SymIntT, + tensorT, +) +from torchgen.code_template import CodeTemplate +from torchgen.context import with_native_function +from torchgen.model import ( + NativeFunction, + SchemaKind, + SelfArgument, + TensorOptionsArguments, + Type, +) +from torchgen.utils import FileManager + +from .context import with_native_function_with_differentiability_info +from .gen_trace_type import ( + get_return_value, + MANUAL_AUTOGRAD, + tie_return_values, + type_wrapper_name, +) + + +# See NOTE [ Autograd View Variables ] in variable.h for details. +# If you update list VIEW_FUNCTIONS or RETURNS_VIEWS_OF_INPUT, +# you **MUST** also update the public list of view ops accordingly in +# docs/source/tensor_view.rst. Note not all ATen functions are exposed to public, +# e.g alias & sparse_coo_tensor_with_dims_and_tensors. +# +# A map: function name => name of the argument that all outputs are view of + +VIEW_FUNCTIONS_WITH_METADATA_CHANGE = [ + "view_as_complex", + "view_as_real", + "_conj", + "_neg_view", + "_nested_get_values", + "_nested_view_from_buffer", + "_nested_view_from_jagged", +] + +VIEW_FUNCTIONS = { + "numpy_T": "self", + "alias": "self", + "as_strided": "self", + "diagonal": "self", + "expand": "self", + "permute": "self", + "select": "self", + "slice": "self", + "slice_inverse": "self", + "split": "self", + "split_with_sizes": "self", + "squeeze": "self", + "t": "self", + "transpose": "self", + "unfold": "self", + "unsqueeze": "self", + "flatten": "self", + "view": "self", + "unbind": "self", + "_indices": "self", + "_values": "self", + "indices": "self", + "values": "self", + "crow_indices": "self", + "col_indices": "self", + "ccol_indices": "self", + "row_indices": "self", + # sparse_coo ctor output should really be views of both indices and values, + # but we only supports making as view of a single variable, and indices is + # discrete anyways. + # FIXME: clone indices on construction. + "sparse_coo_tensor_with_dims_and_tensors": "values", + "_reshape_alias": "self", + "_test_autograd_multiple_dispatch_view": "self", +} + +for key in VIEW_FUNCTIONS_WITH_METADATA_CHANGE: + VIEW_FUNCTIONS[key] = "self" + +# note: some VIEW_FUNCTIONS are just compositions of the view functions above +# this list contains both the root view functions and any that are purely composed +# of viewing functions, and is used by the JIT to determine when an operator +# may return a view of its inputs; however they may sometimes return a copy. +# (e.g. `contiguous`) +RETURNS_VIEWS_OF_INPUT = set(VIEW_FUNCTIONS.keys()).union( + { + "chunk", + "detach", + "contiguous", + "reshape", + "reshape_as", + "expand_as", + "view_as", + "real", + "imag", + "narrow", + "movedim", + "tensor_split", + "swapdims", + "swapaxes", + "mT", + "mH", + "adjoint", + "matrix_H", + } +) + +# These are the functions we consider views for the purposes of validating +# StorageImpl and TensorImpl in gen_variable_type. +# `_unsafe_view` is not included in VIEW_FUNCTIONS above because it is not a +# view for the purposes of ADInplaceOrView kernel, we do not want to call as_view +# See NOTE [Unsafe View] for more info. +ALL_VIEW_FUNCTIONS = { + **VIEW_FUNCTIONS, + "_unsafe_view": "self", +} + +ARRAYREF_TO_VEC = CodeTemplate( + """\ +auto ${vec} = ${arg}.vec(); +""" +) + +OPTIONAL_TO_VAL = CodeTemplate( + """\ +auto ${val} = ${arg}.value_or(${default}); +""" +) + +CALL_DISPATCH = CodeTemplate( + """\ +at::_ops::${unambiguous_name}::call(${unpacked_args})""" +) + +REVERSE_VIEW_DISPATCH = CodeTemplate( + """\ +${reverse_name}(${unpacked_args})""" +) + +MULTI_OUTPUT_VIEW_ITERATION = CodeTemplate( + """\ +for (auto ${view_idx} : c10::irange(${var}.size())) { + ${body} +} +""" +) + +SETUP_REPLAY_VIEW_IF_NOT_SUPPORT_AS_STRIDED_OR_VIEW_WITH_METADATA_CHANGE = CodeTemplate( + """\ +std::unique_ptr func(nullptr); +std::function rev_func=nullptr; +if (${is_view_with_metadata_change} || + !self.unsafeGetTensorImpl()->support_as_strided() || + self.unsafeGetTensorImpl()->is_python_dispatch() || + c10::AutogradState::get_tls_state().get_view_replay_enabled()) { + ${replay_view_func} + ${reverse_replay_view_func} +} +""" +) + +REPLAY_VIEW_FUNC = CodeTemplate( + """\ +func = std::make_unique<${view_func_name}>(${view_func_args}); +""" +) + +REVERSE_REPLAY_VIEW_LAMBDA_FUNC = CodeTemplate( + """\ +rev_func = [=](const at::Tensor& ${input_view}) { + return ${reverse_replay_view_call}; +}; +""" +) + +METHOD_DEFINITION = CodeTemplate( + """\ +${return_type} ${type_wrapper_name}(${formals}) { + ${type_definition_body} +} +""" +) + +WRAPPER_REGISTRATION = CodeTemplate( + """\ +m.impl("${unqual_operator_name_with_overload}", + TORCH_FN(${class_type}::${type_wrapper_name}) +); +""" +) + +AUTOGRAD_NOT_IMPLEMENTED_REGISTRATION = CodeTemplate( + """\ +m.impl("${unqual_operator_name_with_overload}", torch::autograd::autogradNotImplementedFallback()); +""" +) + +INPLACE_REDISPATCH = CodeTemplate( + """\ +{ + at::AutoDispatchBelowADInplaceOrView guard; + at::_ops::${unambiguous_name}::redispatch(${unpacked_args}); +} +""" +) + +ASSIGN_RETURN_VALUE = CodeTemplate( + """\ +${return_values} = ${rhs_value}; +""" +) + +VIEW_REDISPATCH = CodeTemplate( + """\ +${assign_return_values} ([&]() { + at::AutoDispatchBelowADInplaceOrView guard; + return at::_ops::${unambiguous_name}::redispatch(${unpacked_args}); +})(); +""" +) + +TMP_VAR = "_tmp" + + +# FIXME: Ideally these functions should be methods on Type class, but we have a +# comment in codegen/model.py there saying these concepts are not well defined. +# Thus we put a version that commonly used by autograd codegen here. +def is_tensor_type(t: Type) -> bool: + # TODO: Should handle optional here? + return t.is_tensor_like() and t.is_list_like() is None + + +def is_tensor_list_type(t: Type) -> bool: + # TODO: Should handle optional here? + return t.is_tensor_like() and t.is_list_like() is not None + + +UNPACK_TENSOR = CodeTemplate( + """\ +auto${ref} ${arg_name}_ = unpack${suffix}(${arg_name}, "${arg_name}", ${arg_pos});""" +) + + +def unpacked_name(arg_name: str) -> str: + return arg_name + "_" + + +# e.g. select.int -> select_copy_int_inverse() +def inverse_view_name(f: NativeFunction) -> str: + copy_variant = f"{f.root_name}_copy" + overload = f"{f.func.name.overload_name}" + if overload != "": + overload = "_" + overload + return f"{copy_variant}{overload}_inverse" + + +def extract_bindings(f: NativeFunction) -> list[Binding]: + return [ + r + for a in f.func.schema_order_arguments() + for r in cpp.argument( + a, + method=False, + symint=True, + cpp_no_default_args=set(), + faithful=False, + has_tensor_options=False, + ) + ] + + +@with_native_function +def unpack_args(f: NativeFunction) -> tuple[list[str], list[Binding]]: + body: list[str] = [] + unpacked_bindings: list[Binding] = [] + + for i, binding in enumerate(extract_bindings(f)): + assert not isinstance(binding.argument, SelfArgument) + if isinstance(binding.argument, TensorOptionsArguments): + raise RuntimeError("VariableKernel shouldn't take TensorOptions") + + is_nullable = binding.argument.type.is_nullable() + if not binding.argument.type.is_tensor_like() or is_nullable: + unpacked_bindings.append(binding) + continue + + is_tensor_list = is_tensor_list_type(binding.argument.type) + ref = (not is_nullable) and not is_tensor_list + suffix = "_opt" if is_nullable and not is_tensor_list else "" + body.append( + UNPACK_TENSOR.substitute( + arg_name=binding.name, + arg_pos=i, + suffix=suffix, + ref="&" if ref else "", + ) + ) + unpacked_bindings.append( + Binding( + name=unpacked_name(binding.name), + nctype=binding.nctype, + argument=binding.argument, + default=binding.default, + ) + ) + + return body, unpacked_bindings + + +def get_base_name(f: NativeFunction) -> str: + return f.func.name.name.base # TODO: should be str(f.func.name.name)? + + +def get_view_info(f: NativeFunction) -> str | None: + base_name = get_base_name(f) + view_info = VIEW_FUNCTIONS.get(base_name, None) + if view_info is None and base_name in RETURNS_VIEWS_OF_INPUT: + view_info = "self" + return view_info + + +def emit_view_func( + f: NativeFunction, bindings: list[Binding], view_idx: str | None = None +) -> str: + """Generate an additional lambda function to recover views in backward when as_strided is not supported. + See Note [View + Inplace update for base tensor] and [View + Inplace update for view tensor] for more details. + """ + # TODO: Clean this logic up if we get rid of reverse view funcs or reify them. + input_base = "input_base" + replay_view_func = "" + updated_args: list[str] = [] + known_view_arg_simple_types: list[CType] = [ + BaseCType(longT), + OptionalCType(BaseCType(longT)), + BaseCType(SymIntT), + OptionalCType(BaseCType(SymIntT)), + BaseCType(boolT), + BaseCType(intArrayRefT), + BaseCType(symIntArrayRefT), + ConstRefCType(BaseCType(tensorT)), + ConstRefCType(OptionalCType(BaseCType(tensorT))), + ] + for binding in bindings: + arg, arg_type = binding.name, binding.nctype.type + if arg == "self": + updated_args.append(input_base) + continue + if arg_type not in known_view_arg_simple_types: + known_types_str = ", ".join([str(t) for t in known_view_arg_simple_types]) + raise TypeError( + f"You are adding an {arg_type} {arg} argument to op {cpp.name(f.func)} in addition to known types: " + f"{known_types_str}. Please update the list or materialize it so that it can be closed " + "over by value, also add a test in pytorch/xla/test/test_operations.py where this code " + "is exercised." + ) + if arg_type == BaseCType(intArrayRefT) or arg_type == BaseCType( + symIntArrayRefT + ): + # It's not safe to close over IntArrayRef by value, since this is a + # reference type, so materialize a vector to close over by value + arg_vec = arg + "_vec" + replay_view_func += ARRAYREF_TO_VEC.substitute(arg=arg, vec=arg_vec) + updated_args.append(arg_vec) + elif arg_type == OptionalCType(BaseCType(longT)): + # Materialize int64_t? to int64_t + arg_value = arg + "_val" + replay_view_func += OPTIONAL_TO_VAL.substitute( + arg=arg, val=arg_value, default="0" + ) + updated_args.append(arg_value) + elif arg_type == ConstRefCType(BaseCType(tensorT)) or arg_type == ConstRefCType( + OptionalCType(BaseCType(tensorT)) + ): + # NB: Closing over a tensor. If a user modifies this tensor, this will be silently + # incorrect. The proper thing to do is to store the version counter and copy on write. + updated_args.append(arg) + else: + updated_args.append(arg) + + from .gen_view_funcs import view_func_name + + view_func_args = [b.name for b in bindings if b.name != "self"] + if view_idx is not None: + view_func_args.append(f"{view_idx}") + replay_view_func += REPLAY_VIEW_FUNC.substitute( + view_func_name=view_func_name(f, include_namespace=True), + view_func_args=view_func_args, + ) + + input_view = "input_view" + reverse_unpacked_args = [ + "self", + f"{input_view}", + # inverse_return_mode= + "at::functionalization::InverseReturnMode::AlwaysView", + *(() if view_idx is None else (f"{view_idx}",)), + # skip input_base arg + *updated_args[1:], + ] + + from torchgen.api.functionalization import reverse_name + + reverse_replay_view_call = REVERSE_VIEW_DISPATCH.substitute( + reverse_name=reverse_name(f, include_namespace=True), + unpacked_args=reverse_unpacked_args, + ) + reverse_replay_view_func = REVERSE_REPLAY_VIEW_LAMBDA_FUNC.substitute( + input_view=input_view, reverse_replay_view_call=reverse_replay_view_call + ) + + is_view_with_metadata_change = ( + "true" if cpp.name(f.func) in VIEW_FUNCTIONS_WITH_METADATA_CHANGE else "false" + ) + + return SETUP_REPLAY_VIEW_IF_NOT_SUPPORT_AS_STRIDED_OR_VIEW_WITH_METADATA_CHANGE.substitute( + is_view_with_metadata_change=is_view_with_metadata_change, + replay_view_func=replay_view_func, + reverse_replay_view_func=reverse_replay_view_func, + ) + + +def emit_view_body( + fn: NativeFunctionWithDifferentiabilityInfo, var: str +) -> tuple[str, str]: + # See NOTE [ Autograd View Variables ] in variable.h for details. + f = fn.func + base_name = get_base_name(f) + view_info = get_view_info(f) + call = "" + differentiable_outputs = gen_differentiable_outputs(fn) + differentiable_output_vars = {r.name for r in differentiable_outputs} + if not isinstance(view_info, str): + raise TypeError( + f"The view info should be a string for {base_name}, but it is: {view_info}" + ) + if len(differentiable_output_vars) == 0: + # no output is differentiable (.indices() for SparseTensors for example) + rhs_value = ( + f"as_view({view_info}, {var}, " + f"/* is_bw_differentiable */ false, /* is_fw_differentiable */ false)" + ) + elif len(differentiable_output_vars) == 1: + # Single differentiable output (Tensor or Tensor[]) + return_info = differentiable_outputs[0] + # We only support simple Tensor or a TensorList for functions that return views + if not is_tensor_type(return_info.type) and not is_tensor_list_type( + return_info.type + ): + raise RuntimeError( + f"{base_name} that return differentiable views can only return Tensor or Tensor[]" + ) + + # See Note [ View + Inplace detection] + def get_creation_meta_in_mode(original: str) -> str: + creation_meta_with_grad_mode = f"(at::GradMode::is_enabled() ? {original} : CreationMeta::NO_GRAD_MODE)" + return f"InferenceMode::is_enabled() ? CreationMeta::INFERENCE_MODE : {creation_meta_with_grad_mode}" + + # Only allow rebasing of the history if we return a single Tensor + # If we are in a no grad block, raise a warning + # See NOTE [ View + Inplace detection ] for more details about this logic + if is_tensor_list_type(return_info.type): + creation_meta = get_creation_meta_in_mode("CreationMeta::MULTI_OUTPUT_NODE") + view_idx = "view_idx" + view_func = emit_view_func( + f, extract_bindings(f), view_idx=view_idx + ).strip() + as_view_call = ( + f"as_view(/* base */ {view_info}, /* output */ {var}[{view_idx}], " + "/* is_bw_differentiable */ true, /* is_fw_differentiable */ true, " + "/* view_func */ std::move(func), /* rev_view_func */ rev_func, " + f"/* creation_meta */ {creation_meta});" + ) + call += MULTI_OUTPUT_VIEW_ITERATION.substitute( + var=var, view_idx=view_idx, body=f"{view_func}\n{as_view_call}" + ) + rhs_value = f"std::move({var})" + else: + call += emit_view_func(f, extract_bindings(f), view_idx=None) + creation_meta = get_creation_meta_in_mode("CreationMeta::DEFAULT") + rhs_value = ( + f"as_view(/* base */ {view_info}, /* output */ {var}, /* is_bw_differentiable */ true, " + "/* is_fw_differentiable */ true, " + f"/* view_func */ std::move(func), /* rev_view_func */ rev_func, /* creation_meta */ {creation_meta})" + ) + else: + # This could be supported but we don't need it at the moment, so keeping things simple. + raise RuntimeError( + "Function that return multiple differentiable output " + "when at least one of them is view is not supported." + ) + return call, rhs_value + + +def modifies_arguments(f: NativeFunction) -> bool: + return f.func.kind() in [SchemaKind.inplace, SchemaKind.out] + + +@with_native_function_with_differentiability_info +def emit_inplace_or_view_body(fn: NativeFunctionWithDifferentiabilityInfo) -> list[str]: + f = fn.func + inplace_view_body: list[str] = [] + + dispatcher_sig = DispatcherSignature.from_schema(f.func) + dispatcher_exprs = dispatcher_sig.exprs() + + # code-generated ADInplaceOrView kernels plumb and recompute dispatch keys directly through the kernel for performance. + # See Note [Plumbing Keys Through The Dispatcher] for details. + dispatch_key_set = "ks & c10::after_ADInplaceOrView_keyset" + redispatch_args = ", ".join([dispatch_key_set] + [a.expr for a in dispatcher_exprs]) + + # Note that this calls the slow, dispatching variants of manual_cpp_binding ops. + # We could probably work harder to ensure that the fast variants are called instead, but the perf benefit would be minimal. + if modifies_arguments(f): # inplace op + inplace_view_body.append( + INPLACE_REDISPATCH.substitute( + unambiguous_name=f.func.name.unambiguous_name(), + unpacked_args=redispatch_args, + ) + ) + for r in cpp.return_names(f): + inplace_view_body.append(f"increment_version({r});") + else: + assert get_view_info(f) is not None + inplace_view_body.append( + VIEW_REDISPATCH.substitute( + assign_return_values="auto " + TMP_VAR + " = ", + unambiguous_name=f.func.name.unambiguous_name(), + unpacked_args=redispatch_args, + ) + ) + call, rhs_value = emit_view_body(fn, TMP_VAR) + inplace_view_body.append(call) + assert rhs_value is not None + inplace_view_body.append( + ASSIGN_RETURN_VALUE.substitute( + return_values=tie_return_values(f), rhs_value=rhs_value + ) + ) + if f.func.returns: + inplace_view_body.append(f"return {get_return_value(f)};") + return inplace_view_body + + +@with_native_function +def gen_formals(f: NativeFunction) -> str: + return ", ".join( + # code-generated autograd kernels plumb and recompute dispatch keys directly through the kernel for performance. + # See Note [Plumbing Keys Through The Dispatcher] for details. + ["c10::DispatchKeySet ks"] + + [ + f'{cpp.argument_type(a, binds="__placeholder__", symint=True).cpp_type()} {a.name}' + for a in f.func.schema_order_arguments() + ] + ) + + +@with_native_function_with_differentiability_info +def inplace_or_view_method_definition( + fn: NativeFunctionWithDifferentiabilityInfo, +) -> str | None: + f = fn.func + if get_view_info(f) is None and ( + # For functions that modify their inputs but don't return them, + # we can't give them autograd support. + # See https://github.com/pytorch/pytorch/issues/53796 + not modifies_arguments(f) or len(f.func.returns) == 0 + ): + return None + return METHOD_DEFINITION.substitute( + return_type=cpp.returns_type(f.func.returns, symint=True).cpp_type(), + type_wrapper_name=type_wrapper_name(f), + formals=gen_formals(f), + type_definition_body=emit_inplace_or_view_body(fn), + ) + + +@with_native_function_with_differentiability_info +def inplace_or_view_method_registration( + fn: NativeFunctionWithDifferentiabilityInfo, +) -> str | None: + f = fn.func + if get_view_info(f) is None and ( + not modifies_arguments(f) or len(f.func.returns) == 0 + ): + return None + return WRAPPER_REGISTRATION.substitute( + unqual_operator_name_with_overload=f.func.name, + type_wrapper_name=type_wrapper_name(f), + class_type="ADInplaceOrView", + ) + + +def use_derived(fn: NativeFunctionWithDifferentiabilityInfo) -> bool: + f = fn.func + name = cpp.name(f.func) + return name not in MANUAL_AUTOGRAD and dispatch_strategy(fn) == "use_derived" + + +def gen_inplace_or_view_type_env( + fn: NativeFunctionWithDifferentiabilityInfo, +) -> dict[str, list[str]]: + definition = inplace_or_view_method_definition(fn) + registration = inplace_or_view_method_registration(fn) + + return { + "ops_headers": ( + [f"#include "] + if definition is not None + else [] + ), + "inplace_or_view_method_definitions": [definition] + if definition is not None + else [], + "inplace_or_view_wrapper_registrations": [registration] + if registration is not None + else [], + } + + +def gen_inplace_or_view_type( + out: str, + native_yaml_path: str, + tags_yaml_path: str, + fns_with_infos: list[NativeFunctionWithDifferentiabilityInfo], + template_path: str, +) -> None: + # NOTE: see Note [Sharded File] at the top of the VariableType.cpp + # template regarding sharding of the generated files. + + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + fm.write_sharded( + "ADInplaceOrViewType.cpp", + [fn for fn in fns_with_infos if use_derived(fn)], + key_fn=lambda fn: fn.func.root_name, + base_env={ + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/ADInplaceOrViewType.cpp", + }, + env_callable=gen_inplace_or_view_type_env, + num_shards=2, + sharded_keys={ + "ops_headers", + "inplace_or_view_method_definitions", + "inplace_or_view_wrapper_registrations", + }, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_python_functions.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_python_functions.py new file mode 100644 index 0000000000000000000000000000000000000000..98aee0d992bd5bd49fc007784140d3f43fb207bc --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_python_functions.py @@ -0,0 +1,1398 @@ +# Generates Python bindings for ATen functions +# +# The bindings are generated as methods on python_variable or functions on the +# torch._C._nn. torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._sparse +# or torch._C._special objects. +# + +# Code tries to stick to the following rules: +# +# - templates should be colocated with the functions that use them. +# no templates are currently shared between functions, but if that +# happens, maybe put the template with the first one +# +# - don't use environment dictionaries when calling template.substitute(). +# pass named arguments directly for everything, otherwise it's much too +# hard to track what's actually being used and by who +# +# - colocate any new hacks/adjustments with existing ones of the same kind. +# ideally in a data structure rather than code if possible. See e.g. +# SCHEMA_DEFAULT_CONVERSION_HACKS, etc. +# +# - similarly, conversions from one format to another should ideally happen +# all at once in a single place. +# +# - no nontrivial nested functions. couple-liners are ok but please no more. +# especially avoid functions that read/write outer variables defined far away. +# +# - raise RuntimeError instead of asserting, and put as much +# information as is available into the message. I.e. no need to +# plumb in new params whose only purpose is to fill out an error +# message, but use what's there +# + +from __future__ import annotations + +import itertools +import re +from collections import defaultdict +from typing import Callable, Iterable, Sequence + +import yaml + +from torchgen.api import cpp +from torchgen.api.python import ( + arg_parser_output_exprs, + cpp_dispatch_exprs, + cpp_dispatch_target, + dispatch_lambda_args, + dispatch_lambda_exprs, + dispatch_lambda_return_str, + has_tensor_options, + PythonSignature, + PythonSignatureDeprecated, + PythonSignatureGroup, + PythonSignatureNativeFunctionPair, + signature, + signature_from_schema, + structseq_fieldnames, +) +from torchgen.code_template import CodeTemplate +from torchgen.context import with_native_function +from torchgen.gen import cpp_string, parse_native_yaml, parse_tags_yaml +from torchgen.model import ( + Argument, + BaseOperatorName, + FunctionSchema, + NativeFunction, + SchemaKind, + Type, + Variant, +) +from torchgen.utils import FileManager, split_name_params +from torchgen.yaml_utils import YamlLoader + +from .gen_inplace_or_view_type import is_tensor_list_type +from .gen_trace_type import should_trace + + +# +# declarations blocklist +# We skip codegen for these functions, for various reasons. +# Future PRs will categorize this list and eliminate or hoist +# them out of eager-only codegen. +# See https://github.com/pytorch/pytorch/issues/30788 +# + +# These functions require manual Python bindings or are not exposed to Python +_SKIP_PYTHON_BINDINGS = [ + "alias", + "contiguous", + "is_cuda", + "is_sparse", + "is_sparse_csr", + "size", + "stride", + "sym_size", + "sym_stride", + "sym_storage_offset", + "sym_numel", + ".*_backward", + ".*_backward_(out|input|weight|bias)", + ".*_forward", + ".*_forward_out", + ".*_jvp", + "_unsafe_view", + "tensor", + "_?sparse_(coo|compressed|csr|csc|bsr|bsc)_tensor.*", + "_range.*", + "_sparse_add_out", + "_sparse_div.*", + "_sparse_mul.*", + "_sparse_sub.*", + "_sparse_dense_add_out", + "index", + "index_out", + "unique_dim_consecutive", + "_cumsum.*", + "_cumprod.*", + "_sum.*", + "_prod.*", + "_th_.*", + "_thnn_.*", + "range.*", + "_solve.*", + "_inverse.*", + "_cholesky.*", + "_triangular_solve.*", + "_qr.*", + "_svd.*", + "slice", + "item", + "_local_scalar_dense", + "to", + "_to_copy", + "_to_copy_out", + "_reshape_copy", + "_reshape_copy_out", + "copy_sparse_to_sparse_", + "copy_", + "_foreach_copy", + "numpy_T", + "matrix_H", + "mT", + "mH", # these need to be an attributes in Python, not functions + "nonzero(_(out|numpy))?", + "set_data", + ".*_overrideable", # overrideable functions for backend extension + "data", + "is_leaf", + "output_nr", + "_version", + "requires_grad_", + "retains_grad", + "set_", + "_fw_primal", + "fake_quantize_per_tensor_affine_cachemask", + "fake_quantize_per_channel_affine_cachemask", + "_new_zeros_with_same_feature_meta", + "_has_same_storage_numel", # used for forward AD internals + "_reshape_alias", + "replace_", # only used by the functionalization pass, doesn't need to be exposed to python + "copy", # only used by the functionalization pass + "fill.Tensor", # only used by the functionalization pass + "fill.Scalar", # only used by the functionalization pass + "lift.*", + "normal_functional", # only used by the functionalization pass + "nbytes", + "itemsize", + "_batch_norm_with_update", + "_batch_norm_with_update_out", + "_batch_norm_no_update", +] + +SKIP_PYTHON_BINDINGS = [ + re.compile(rf"^{pattern}$") for pattern in _SKIP_PYTHON_BINDINGS +] + +# These function signatures are not exposed to Python. Note that this signature +# list does not support regex. +SKIP_PYTHON_BINDINGS_SIGNATURES = [ + "add.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor", + "add_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!)", + "sub.Scalar(Tensor self, Scalar other, Scalar alpha=1) -> Tensor", + "sub_.Scalar(Tensor(a!) self, Scalar other, Scalar alpha=1) -> Tensor(a!)", + "mul.Scalar(Tensor self, Scalar other) -> Tensor", + "mul_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)", + "div.Scalar(Tensor self, Scalar other) -> Tensor", + "div_.Scalar(Tensor(a!) self, Scalar other) -> Tensor(a!)", +] + + +@with_native_function +def should_generate_py_binding(f: NativeFunction) -> bool: + # NativeFunctions that are entirely code-generated should not get python bindings + # because these codegen implementations are often inefficient. A handful of + # view_copy style ops were exposed accidentally when they were handwritten and now + # that we are moving them to codegen for bc reasons we need to keep them exposed in + # python. + if "generated" in f.tags and "view_copy" not in f.tags: + return False + + name = cpp.name(f.func) + for skip_regex in SKIP_PYTHON_BINDINGS: + if skip_regex.match(name): + return False + + signature = str(f.func) + for pattern in SKIP_PYTHON_BINDINGS_SIGNATURES: + if pattern == signature: + return False + return True + + +def get_pycname(name: BaseOperatorName) -> str: + return f"THPVariable_{name}" + + +def is_noarg(overloads: Sequence[PythonSignatureNativeFunctionPair]) -> bool: + return len(overloads) == 1 and overloads[0].signature.arguments_count() == 0 + + +def is_py_variable_method(f: NativeFunction) -> bool: + return f.python_module is None and Variant.method in f.variants + + +def is_py_torch_function(f: NativeFunction) -> bool: + return f.python_module is None and Variant.function in f.variants + + +def is_py_nn_function(f: NativeFunction) -> bool: + return f.python_module == "nn" + + +def is_py_fft_function(f: NativeFunction) -> bool: + return f.python_module == "fft" + + +def is_py_linalg_function(f: NativeFunction) -> bool: + return f.python_module == "linalg" + + +def is_py_nested_function(f: NativeFunction) -> bool: + return f.python_module == "nested" + + +def is_py_sparse_function(f: NativeFunction) -> bool: + return f.python_module == "sparse" + + +def is_py_special_function(f: NativeFunction) -> bool: + return f.python_module == "special" + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Main Function +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +def gen( + out: str, + native_yaml_path: str, + tags_yaml_path: str, + deprecated_yaml_path: str, + template_path: str, + *, + symint: bool = True, +) -> None: + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + native_functions = parse_native_yaml( + native_yaml_path, tags_yaml_path + ).native_functions + native_functions = list(filter(should_generate_py_binding, native_functions)) + + methods = load_signatures(native_functions, deprecated_yaml_path, method=True) + create_python_bindings( + fm, + methods, + is_py_variable_method, + None, + "python_variable_methods.cpp", + method=True, + symint=symint, + ) + + # NOTE: num_shards here must be synced with gatherTorchFunctions in + # torch/csrc/autograd/python_torch_functions_manual.cpp + functions = load_signatures(native_functions, deprecated_yaml_path, method=False) + create_python_bindings_sharded( + fm, + functions, + is_py_torch_function, + "torch", + "python_torch_functions.cpp", + method=False, + num_shards=3, + symint=symint, + ) + + create_python_bindings( + fm, + functions, + is_py_nn_function, + "torch.nn", + "python_nn_functions.cpp", + method=False, + symint=symint, + ) + + create_python_bindings( + fm, + functions, + is_py_fft_function, + "torch.fft", + "python_fft_functions.cpp", + method=False, + symint=symint, + ) + + create_python_bindings( + fm, + functions, + is_py_linalg_function, + "torch.linalg", + "python_linalg_functions.cpp", + method=False, + symint=symint, + ) + + create_python_bindings( + fm, + functions, + is_py_nested_function, + "torch.nested", + "python_nested_functions.cpp", + method=False, + ) + + create_python_bindings( + fm, + functions, + is_py_sparse_function, + "torch.sparse", + "python_sparse_functions.cpp", + method=False, + symint=symint, + ) + + create_python_bindings( + fm, + functions, + is_py_special_function, + "torch.special", + "python_special_functions.cpp", + method=False, + symint=symint, + ) + + # Currently, we only use `functions` to generate `return_types` bindings. + # All methods which return structseq have function variant at this point. + # If any method only operator with structseq is added in the future, + # we will have to address that. + create_python_return_type_bindings( + fm, functions, lambda fn: True, "python_return_types.cpp" + ) + create_python_return_type_bindings_header( + fm, functions, lambda fn: True, "python_return_types.h" + ) + + valid_tags = parse_tags_yaml(tags_yaml_path) + + def gen_tags_enum() -> dict[str, str]: + return { + "enum_of_valid_tags": ( + "".join( + [f'\n.value("{tag}", at::Tag::{tag})' for tag in sorted(valid_tags)] + ) + ) + } + + fm.write("python_enum_tag.cpp", gen_tags_enum) + + +def group_filter_overloads( + pairs: Sequence[PythonSignatureNativeFunctionPair], + pred: Callable[[NativeFunction], bool], +) -> dict[BaseOperatorName, list[PythonSignatureNativeFunctionPair]]: + grouped: dict[BaseOperatorName, list[PythonSignatureNativeFunctionPair]] = ( + defaultdict(list) + ) + for pair in pairs: + if pred(pair.function): + grouped[pair.function.func.name.name].append(pair) + return grouped + + +def create_python_bindings( + fm: FileManager, + pairs: Sequence[PythonSignatureNativeFunctionPair], + pred: Callable[[NativeFunction], bool], + module: str | None, + filename: str, + *, + method: bool, + symint: bool = True, +) -> None: + """Generates Python bindings to ATen functions""" + py_methods: list[str] = [] + ops_headers: list[str] = [] + py_method_defs: list[str] = [] + py_forwards: list[str] = [] + + grouped = group_filter_overloads(pairs, pred) + + for name in sorted(grouped.keys(), key=str): + overloads = grouped[name] + py_methods.append( + method_impl(name, module, overloads, method=method, symint=symint) + ) + py_method_defs.append(method_def(name, module, overloads, method=method)) + py_forwards.extend(forward_decls(name, overloads, method=method)) + ops_headers.append(f"#include ") + + fm.write_with_template( + filename, + filename, + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/{filename}", + "ops_headers": ops_headers, + "py_forwards": py_forwards, + "py_methods": py_methods, + "py_method_defs": py_method_defs, + }, + ) + + +def create_python_return_type_bindings( + fm: FileManager, + pairs: Sequence[PythonSignatureNativeFunctionPair], + pred: Callable[[NativeFunction], bool], + filename: str, +) -> None: + """ + Generate function to initialize and return named tuple for native functions + which returns named tuple and registration invocations in `python_return_types.cpp`. + """ + py_return_types_definition: list[str] = [] + py_return_types_registrations: list[str] = [] + + grouped = group_filter_overloads(pairs, pred) + + for name in sorted(grouped.keys(), key=str): + overloads = grouped[name] + definitions, registrations = generate_return_type_definition_and_registrations( + overloads + ) + py_return_types_definition.append( + "" if not definitions else "\n".join(definitions) + ) + py_return_types_registrations.append( + "" if not registrations else "\n".join(registrations) + ) + + fm.write_with_template( + filename, + filename, + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/{filename}", + "py_return_types": py_return_types_definition, + "py_return_types_registrations": py_return_types_registrations, + }, + ) + + +def create_python_return_type_bindings_header( + fm: FileManager, + pairs: Sequence[PythonSignatureNativeFunctionPair], + pred: Callable[[NativeFunction], bool], + filename: str, +) -> None: + """ + Generate function to initialize and return named tuple for native functions + which returns named tuple and relevant entry for the map in `python_return_types.cpp`. + """ + py_return_types_declarations: list[str] = [] + + grouped = group_filter_overloads(pairs, pred) + + for name in sorted(grouped.keys(), key=str): + overloads = grouped[name] + declarations = generate_return_type_declarations(overloads) + py_return_types_declarations.append( + "" if not declarations else "\n".join(declarations) + ) + + fm.write_with_template( + filename, + filename, + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/{filename}", + "py_return_types_declarations": py_return_types_declarations, + }, + ) + + +def create_python_bindings_sharded( + fm: FileManager, + pairs: Sequence[PythonSignatureNativeFunctionPair], + pred: Callable[[NativeFunction], bool], + module: str | None, + filename: str, + *, + method: bool, + num_shards: int, + symint: bool = True, +) -> None: + """Generates Python bindings to ATen functions""" + grouped = group_filter_overloads(pairs, pred) + + def key_func( + kv: tuple[BaseOperatorName, list[PythonSignatureNativeFunctionPair]], + ) -> str: + return kv[0].base + + def env_func( + kv: tuple[BaseOperatorName, list[PythonSignatureNativeFunctionPair]], + ) -> dict[str, list[str]]: + name, fn_pairs = kv + return { + "ops_headers": [f"#include "], + "py_forwards": list(forward_decls(name, fn_pairs, method=method)), + "py_methods": [ + method_impl(name, module, fn_pairs, method=method, symint=symint) + ], + "py_method_defs": [method_def(name, module, fn_pairs, method=method)], + } + + fm.write_sharded( + filename, + grouped.items(), + base_env={ + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/{filename}", + }, + key_fn=key_func, + env_callable=env_func, + num_shards=num_shards, + sharded_keys={"ops_headers", "py_forwards", "py_methods", "py_method_defs"}, + ) + + +def load_signatures( + native_functions: list[NativeFunction], + deprecated_yaml_path: str, + *, + method: bool, + skip_deprecated: bool = False, + pyi: bool = False, +) -> Sequence[PythonSignatureNativeFunctionPair]: + @with_native_function + def gen_signature_pairs(f: NativeFunction) -> PythonSignatureNativeFunctionPair: + return PythonSignatureNativeFunctionPair( + signature=signature(f, method=method, pyi=pyi), + function=f, + ) + + pairs = list(map(gen_signature_pairs, native_functions)) + deprecated = load_deprecated_signatures( + pairs, deprecated_yaml_path, method=method, pyi=pyi + ) + return pairs if skip_deprecated else pairs + deprecated + + +def load_deprecated_signatures( + pairs: Sequence[PythonSignatureNativeFunctionPair], + deprecated_yaml_path: str, + *, + method: bool, + pyi: bool, +) -> list[PythonSignatureNativeFunctionPair]: + # The deprecated.yaml doesn't have complete type information, we need + # find and leverage the original ATen signature (to which it delegates + # the call) to generate the full python signature. + # We join the deprecated and the original signatures using type-only form. + + # group the original ATen signatures by name + grouped: dict[str, list[PythonSignatureNativeFunctionPair]] = defaultdict(list) + for pair in pairs: + grouped[pair.signature.name].append(pair) + + # find matching original signatures for each deprecated signature + results: list[PythonSignatureNativeFunctionPair] = [] + + with open(deprecated_yaml_path) as f: + deprecated_defs = yaml.load(f, Loader=YamlLoader) + + for deprecated in deprecated_defs: + schema = FunctionSchema.parse(deprecated["name"]) + aten_name, call_args = split_name_params(deprecated["aten"]) + is_out = aten_name.endswith("_out") + if is_out: + aten_name = aten_name.replace("_out", "") + + # HACK: these are fixed constants used to pass the aten function. + # The type must be known ahead of time + known_constants = { + "1": Type.parse("Scalar"), + } + schema_args_by_name = {a.name: a for a in schema.arguments.flat_all} + for name in call_args: + assert ( + name in schema_args_by_name or name in known_constants + ), f"deprecation definiton: Unrecognized value {name}" + + # Map deprecated signature arguments to their aten signature and test + # if the types and alias annotation match. + def is_schema_compatible( + aten_schema: FunctionSchema, + ) -> bool: + arguments: Iterable[Argument] + if is_out: + arguments = itertools.chain( + aten_schema.arguments.out, aten_schema.arguments.flat_non_out + ) + else: + arguments = aten_schema.arguments.flat_all + + for i, arg in enumerate(arguments): + if i < len(call_args): + arg_name = call_args[i] + if arg_name in known_constants: + schema_type = known_constants[arg_name] + schema_annotation = None + else: + schema_arg = schema_args_by_name[arg_name] + schema_type = schema_arg.type + schema_annotation = schema_arg.annotation + + if schema_type != arg.type or schema_annotation != arg.annotation: + return False + else: + if arg.default is None: + return False + + return len(schema.returns) == len(aten_schema.returns) and all( + a == b for a, b in zip(schema.returns, aten_schema.returns) + ) + + any_schema_found = False + for pair in grouped[aten_name]: + if not is_schema_compatible(pair.function.func): + continue + any_schema_found = True + + python_sig = signature_from_schema( + schema, + category_override=pair.function.category_override, + method=method, + pyi=pyi, + ) + + results.append( + PythonSignatureNativeFunctionPair( + signature=PythonSignatureDeprecated( + name=python_sig.name, + input_args=python_sig.input_args, + input_kwargs=python_sig.input_kwargs, + output_args=python_sig.output_args, + tensor_options_args=python_sig.tensor_options_args, + method=python_sig.method, + deprecated_schema=schema, + deprecated_args_exprs=tuple(call_args), + returns=python_sig.returns, + ), + function=pair.function, + ) + ) + assert any_schema_found, f"No native function with name {aten_name} matched signature:\n {str(schema)}" + + return results + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Named Tuple Codegen +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +@with_native_function +def gen_structseq_typename_key(f: NativeFunction) -> str: + name = cpp.name(f.func) + fieldnames = structseq_fieldnames(f.func.returns) + return "_".join([name] + fieldnames) + + +def emit_structseq_call( + overloads: Sequence[PythonSignatureNativeFunctionPair], +) -> tuple[list[str], dict[str, str]]: + """ + Generate block of named tuple type def inits, and add typeref snippets + to declarations that use them + """ + typenames: dict[ + str, str + ] = {} # map from unique name + field name lists to typedef name + typedefs: list[str] = [] # typedef declarations and init code + + for overload in overloads: + fieldnames = structseq_fieldnames(overload.function.func.returns) + if not fieldnames: + continue + + name = cpp.name(overload.function.func) # use @with_native_function? + tn_key = gen_structseq_typename_key(overload.function) + typename = typenames.get(tn_key) + if typename is None: + typename = f'NamedTuple{"" if not typedefs else len(typedefs)}' + typenames[tn_key] = typename + typedefs.append( + f"""\ +static PyTypeObject* {typename} = generated::get_{name}_structseq();""" + ) + + return typedefs, typenames + + +def generate_return_type_definition_and_registrations( + overloads: Sequence[PythonSignatureNativeFunctionPair], +) -> tuple[list[str], list[str]]: + """ + Generate block of function in `python_return_types.cpp` to initialize + and return named tuple for a native function which returns named tuple + and registration invocations in same file. + """ + typenames: dict[ + str, str + ] = {} # map from unique name + field name lists to typedef name + definitions: list[str] = [] # function definition to register the typedef + registrations: list[str] = [] # register call for the typedef + + for overload in overloads: + fieldnames = structseq_fieldnames(overload.function.func.returns) + if not fieldnames: + continue + + fields = ", ".join(f'{{"{fn}", ""}}' for fn in fieldnames) + + name = cpp.name(overload.function.func) # use @with_native_function? + tn_key = gen_structseq_typename_key(overload.function) + typename = typenames.get(tn_key) + + if typename is None: + typename = f'{name}NamedTuple{"" if not definitions else len(definitions)}' + typenames[tn_key] = typename + definitions.append( + f"""\ +PyTypeObject* get_{name}_structseq() {{ + static PyStructSequence_Field NamedTuple_fields[] = {{ {fields}, {{nullptr}} }}; + static PyTypeObject {typename}; + static bool is_initialized = false; + static PyStructSequence_Desc desc = {{ "torch.return_types.{name}", nullptr, NamedTuple_fields, {len(fieldnames)} }}; + if (!is_initialized) {{ + PyStructSequence_InitType(&{typename}, &desc); + {typename}.tp_repr = (reprfunc)torch::utils::returned_structseq_repr; + is_initialized = true; + }} + return &{typename}; +}} +""" + ) + registrations.append( + f'addReturnType(return_types_module, "{name}", generated::get_{name}_structseq());' + ) + + return definitions, registrations + + +def generate_return_type_declarations( + overloads: Sequence[PythonSignatureNativeFunctionPair], +) -> list[str]: + """ + Generate block of function declarations in `python_return_types.h` to initialize + and return named tuple for a native function. + """ + typenames: dict[ + str, str + ] = {} # map from unique name + field name lists to typedef name + declarations: list[str] = [] # function declaration to register the typedef + + for overload in overloads: + fieldnames = structseq_fieldnames(overload.function.func.returns) + if not fieldnames: + continue + + name = cpp.name(overload.function.func) # use @with_native_function? + tn_key = gen_structseq_typename_key(overload.function) + typename = typenames.get(tn_key) + + if typename is None: + typename = ( + f'{name}NamedTuple{"" if not declarations else len(declarations)}' + ) + typenames[tn_key] = typename + declarations.append(f"PyTypeObject* get_{name}_structseq();") + + return declarations + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Method Impl Codegen +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + +# python binding for all overloads of a particular function/method +PY_VARIABLE_METHOD_VARARGS = CodeTemplate( + r"""\ +// ${name} +static PyObject * ${pycname}(PyObject* self_, PyObject* args, PyObject* kwargs) +{ + ${method_header} + static PythonArgParser parser({ + ${signatures} + }, /*traceable=*/${traceable}); + + ParsedArgs<${max_args}> parsed_args; + auto _r = parser.parse(${self_}, args, kwargs, parsed_args); + ${check_has_torch_function} + switch (_r.idx) { + ${dispatch} + } + ${method_footer} +} + +""" +) + +# handler for a single parsed signature - may be a single overload or +# a pair of overloads that whose signatures only differ in output params +# (plugged into PY_VARIABLE_METHOD_VARARGS as an item in ${dispatch}) +PY_VARIABLE_CASE = CodeTemplate( + """\ +case ${overload_index}: { + ${body} +} +""" +) + +# python binding for single-overload function/method +PY_VARIABLE_METHOD_VARARGS_SINGLETON = CodeTemplate( + """\ +// ${name} +static PyObject * ${pycname}(PyObject* self_, PyObject* args, PyObject* kwargs) +{ + ${method_header} + static PythonArgParser parser({ + ${signatures} + }, /*traceable=*/${traceable}); + + ParsedArgs<${max_args}> parsed_args; + auto _r = parser.parse(${self_}, args, kwargs, parsed_args); + ${check_has_torch_function} + ${dispatch} + ${method_footer} +} + +""" +) + +# python binding for a method with no args, shortcuts parsing +PY_VARIABLE_METHOD_NOARGS = CodeTemplate( + """\ +// ${name} +static PyObject * ${pycname}(PyObject* self_, PyObject* args) +{ + ${method_header} + ${check_has_torch_function} + ${dispatch} + ${method_footer} +} + +""" +) + + +def method_impl( + name: BaseOperatorName, + module: str | None, + overloads: Sequence[PythonSignatureNativeFunctionPair], + *, + method: bool, + symint: bool = True, +) -> str: + """ + Generate a python binding for all overloads of an op. + """ + pycname = get_pycname(name) + noarg = is_noarg(overloads) + structseq_inits, structseq_typenames = emit_structseq_call(overloads) + + method_header = ["HANDLE_TH_ERRORS"] + method_header += structseq_inits + method_header += ( + ["const Tensor& self = THPVariable_Unpack(self_);"] if method else [] + ) + + method_footer = ([] if noarg else ["Py_RETURN_NONE;"]) + ["END_HANDLE_TH_ERRORS"] + + traceable = "true" if all(should_trace(o.function) for o in overloads) else "false" + + grouped_overloads: Sequence[PythonSignatureGroup] = group_overloads( + overloads, symint=symint + ) + is_singleton = len(grouped_overloads) == 1 + signatures: list[str] = [] + dispatch: list[str] = [] + for overload_index, overload in enumerate(grouped_overloads): + signature = overload.signature.signature_str(symint=symint) + signatures.append(f"{cpp_string(str(signature))},") + dispatch_body = emit_dispatch_case(overload, structseq_typenames, symint=symint) + dispatch.append( + PY_VARIABLE_CASE.substitute( + overload_index=overload_index, body=dispatch_body + ) + if not is_singleton + else dispatch_body + ) + + if noarg: + template = PY_VARIABLE_METHOD_NOARGS + elif is_singleton: + template = PY_VARIABLE_METHOD_VARARGS_SINGLETON + else: + template = PY_VARIABLE_METHOD_VARARGS + + return template.substitute( + name=name, + pycname=pycname, + method_header=method_header, + max_args=max(o.signature.arguments_count() for o in overloads), + signatures=signatures, + traceable=traceable, + check_has_torch_function=gen_has_torch_function_check( + name=name, + module=module, + noarg=noarg, + method=method, + ), + dispatch=dispatch, + method_footer=method_footer, + self_="self_" if method else "nullptr", + ) + + +def gen_has_torch_function_check( + name: BaseOperatorName, module: str | None, *, noarg: bool, method: bool +) -> str: + if noarg: + if method: + return f"""\ +if(check_has_torch_function(self_)) {{ + return handle_torch_function(self_, "{name}"); +}} +""" + else: + return "" + + self_ = "self_" if method else "nullptr" + namespace = ( + { + "torch": "THPVariableFunctionsModule", + "torch.nn": "THPNNVariableFunctionsModule", + "torch.fft": "THPFFTVariableFunctionsModule", + "torch.linalg": "THPLinalgVariableFunctionsModule", + "torch.nested": "THPNestedVariableFunctionsModule", + "torch.sparse": "THPSparseVariableFunctionsModule", + "torch.special": "THPSpecialVariableFunctionsModule", + }[module] + if module + else "THPVariableClass" + ) + + return f"""\ +if(_r.has_torch_function()) {{ + return handle_torch_function(_r, {self_}, args, kwargs, {namespace}, "{module or "torch.Tensor"}"); +}} +""" + + +# handler for output/no-output overload pair +PY_VARIABLE_OUT = CodeTemplate( + """\ +if (_r.isNone(${out_idx})) { + ${call_dispatch} +} else { + ${call_dispatch_out} +} +""" +) + + +def emit_dispatch_case( + overload: PythonSignatureGroup, + structseq_typenames: dict[str, str], + *, + symint: bool = True, +) -> str: + """ + Emit dispatch code for a single parsed signature. This corresponds to either + a single native function, or a pair that differ only in output params. In the + latter case, a single python signature is used for both and dispatching + switches on the presence/absence of passed output args. + """ + if overload.outplace is not None: + # dispatch output and no-output variants, branch on _r.isNone() + return PY_VARIABLE_OUT.substitute( + out_idx=overload.signature.output_idx(), + call_dispatch=emit_single_dispatch( + overload.signature, overload.base, structseq_typenames, symint=symint + ), + call_dispatch_out=emit_single_dispatch( + overload.signature, + overload.outplace, + structseq_typenames, + symint=symint, + ), + ) + else: + # no-output version only + return emit_single_dispatch( + overload.signature, overload.base, structseq_typenames, symint=symint + ) + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Forward Declarations Codegen +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +def forward_decls( + name: BaseOperatorName, + overloads: Sequence[PythonSignatureNativeFunctionPair], + *, + method: bool, +) -> tuple[str, ...]: + if method: + return () + + pycname = get_pycname(name) + if is_noarg(overloads): + return ( + f"""\ +static PyObject * {pycname}(PyObject* self_, PyObject* args); +""", + ) + else: + return ( + f"""\ +static PyObject * {pycname}(PyObject* self_, PyObject* args, PyObject* kwargs); +""", + ) + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Method Def (Binding Table Entry) Codegen +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +def method_def( + name: BaseOperatorName, + module: str | None, + overloads: Sequence[PythonSignatureNativeFunctionPair], + *, + method: bool, +) -> str: + """ + Generate method def entry. + """ + pycname = get_pycname(name) + + if name.dunder_method: + # PyMethodDef entry for binary op, throws not implemented error + pycname = f"TypeError_to_NotImplemented_<{pycname}>" + + if is_noarg(overloads): + flags = "METH_NOARGS" if method else "METH_VARARGS | METH_KEYWORDS" + else: + pycname = f"castPyCFunctionWithKeywords({pycname})" + flags = "METH_VARARGS | METH_KEYWORDS" + + if module == "torch": + flags += " | METH_STATIC" + + return f'{{"{name}", {pycname}, {flags}, nullptr}},' + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Overload Sorting and Grouping +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +def group_overloads( + overloads: Sequence[PythonSignatureNativeFunctionPair], *, symint: bool = True +) -> Sequence[PythonSignatureGroup]: + bases: dict[str, PythonSignatureNativeFunctionPair] = {} + outplaces: dict[str, PythonSignatureNativeFunctionPair] = {} + + # first group by signature ignoring out arguments + for overload in overloads: + sig = overload.signature.signature_str(skip_outputs=True, symint=symint) + if overload.function.func.is_out_fn(): + if sig in outplaces: + raise RuntimeError( + f"Found duplicated function definition:\n- {overload.function.func}.\n" + f"Existing definition:\n- {outplaces[sig].function.func}." + ) + outplaces[sig] = overload + else: + if sig in bases: + raise RuntimeError( + f"Found duplicated function definition:\n- {overload.function.func}.\n" + f"Existing definition:\n- {bases[sig].function.func}." + ) + bases[sig] = overload + + for sig, out in outplaces.items(): + if sig not in bases: + candidates: list[str] = [] + for overload in overloads: + if ( + str(overload.function.func.name.name) + == str(out.function.func.name.name) + and not overload.function.func.is_out_fn() + and not overload.signature.deprecated + ): + candidates.append( + overload.signature.signature_str( + skip_outputs=True, symint=symint + ) + ) + out_sig = out.signature.signature_str(symint=symint) + raise RuntimeError( + f"While identifying overloads, we found an out schema {out_sig} without a corresponding non-out variant. " + f"We expected the non-out variant to have schema: \n- {sig}\nPlease check that you spelled the schema " + "correctly in native_functions.yaml. We discovered the following candidate(s): \n" + + "\n".join(f"- {candidate}" for candidate in candidates) + ) + + grouped = [ + PythonSignatureGroup.from_pairs( + functional=base, + out=outplaces.get(sig), + ) + for sig, base in bases.items() + ] + return sort_overloads(grouped, symint=symint) + + +# This function declares a partial order on declarations, and sorts them according +# to its linear extension. This is necessary, because there's some ambiguity in the +# choice of overload, and we want a different order. +# +# See Note[Order of overloads matters] +# +# A few examples of ambiguous python signature pairs. +# +# All parameters have the same type, except one taking Tensor the other taking +# Scalar. A numeric PyObject can be casted into Tensor, and a zero-dim Tensor +# object can be accepted as Scalar type parameter (see python_arg_parser.cpp). +# Therefore, same input arguments might be accepted by either python signature. +# We want to always parse the one taking Tensor first. +# +# bitwise_and(Tensor input, Tensor other, *, Tensor out=None) +# bitwise_and(Tensor input, Scalar other, *, Tensor out=None) +# +# If they have different number of parameters then they are not ambiguous - but +# the difference on output param can be ignored as it's optional. +# +# multiply(Tensor input, Tensor other, *, Tensor out=None) +# multiply(Tensor input, Scalar other) +# +# Both positional args and keyword-only args are considered together. +# +# subtract(Tensor other, *, Scalar alpha=1) +# subtract(Scalar other, Scalar alpha=1) +# +# A few ambiguous cases which it does NOT handle yet. +# +# If there is any difference in other parameters besides the Tensor/Scalar +# difference, then they are not considered ambiguous by this method anymore. +# However, the difference could be too trivial to disambiguate. +# +# foo(Tensor input, Scalar other, Scalar bar) +# foo(Tensor input, Tensor other, double bar) +# +# If they are taking different number of parameters then they are not considered +# ambiguous anymore, even if the difference is only on optional kwargs. +# +# foo(Scalar other, Scalar alpha=1) +# foo(Tensor other, *, Scalar alpha=1, Scalar beta=1) +# + + +def sort_overloads( + grouped_overloads: Sequence[PythonSignatureGroup], *, symint: bool = True +) -> Sequence[PythonSignatureGroup]: + # NB: Smaller here means lower priority + + def is_arg_smaller(t1: Type, t2: Type) -> bool: + return ( + str(t1) == "Scalar" + and str(t2) == "Tensor" + or str(t1) == "Scalar?" + and str(t2) == "Tensor?" + or "Dimname" in str(t1) + and "Dimname" not in str(t2) + or + # In the discussion https://github.com/pytorch/pytorch/issues/54555 it has been + # discussed why it is important to prioritize int/int? over int[] + str(t1) == "int[]" + and (str(t2) == "int" or str(t2) == "int?") + or + # TensorList currently throws an error during argument parsing, that's why it needs to be + # last in signature ordering. See discussion: https://github.com/pytorch/pytorch/issues/58087 + str(t1) == "Tensor[]" + and str(t2).find("[]") != -1 + or + # Prioritize IntArrayRef overload over SymIntArrayRef + str(t1) == "SymInt[]" + and str(t2) == "int[]" + or + # Make sure both in, SymInt are sorted consistently w.r.t. Tensor since Tensor can be implicitly + # converted to either int or SymInt. Prioritize the Tensor overload since it otherwise gets shadowed. + (str(t1) == "SymInt" or str(t1) == "int") + and str(t2) == "Tensor" + ) + + def is_smaller(s1: PythonSignature, s2: PythonSignature) -> bool: + """Returns True if s1 < s2 in the partial order.""" + args1, args2 = s1.arguments(skip_outputs=True), s2.arguments(skip_outputs=True) + if len(args1) != len(args2): + return False + # TODO: should use some canonical form instead of 'str(arg.type)' - see comments + # above. The old codegen used the deprecated 'dynamic_type(arg.type)', which + # ignores the optional annotation, i.e. 'Scalar' and 'Scalar?'. + equal = all(arg1.type == arg2.type for arg1, arg2 in zip(args1, args2)) + smaller_or_equal = all( + str(arg1.type) == str(arg2.type) or is_arg_smaller(arg1.type, arg2.type) + for arg1, arg2 in zip(args1, args2) + ) + return smaller_or_equal and not equal + + # First sort by signature + grouped_overloads = sorted( + grouped_overloads, key=lambda x: x.signature.signature_str(symint=symint) + ) + + # Construct the relation graph + larger_than: dict[int, set[int]] = defaultdict(set) + for i1, overload1 in enumerate(grouped_overloads): + for i2, overload2 in enumerate(grouped_overloads): + if is_smaller(overload1.signature, overload2.signature): + larger_than[i1].add(i2) + + if not larger_than: + return list(grouped_overloads) + + # Use a topological sort to sort overloads according to the partial order. + N = len(grouped_overloads) + sorted_ids: list[int] = list(filter(lambda x: x not in larger_than, range(N))) + + for idx in range(N): + # The size of sorted_ids will grow to N eventually. + i = sorted_ids[idx] + for j in sorted(larger_than.keys()): + larger = larger_than[j] + larger.discard(i) + if not larger: + del larger_than[j] + sorted_ids.append(j) + + return [grouped_overloads[x] for x in sorted_ids] + + +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # +# +# Codegen API Integration +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # + + +def emit_single_dispatch( + ps: PythonSignature, + f: NativeFunction, + structseq_typenames: dict[str, str], + *, + symint: bool = True, +) -> str: + """ + Emit dispatch code for a single native function. + """ + + @with_native_function + def go(f: NativeFunction) -> str: + # header comments + if isinstance(ps, PythonSignatureDeprecated): + schema_comment = f"// [deprecated] aten::{ps.deprecated_schema}" + else: + schema_comment = f"// aten::{f.func}" + + # dispatch lambda signature + name = cpp.name(f.func) + lambda_formals = ", ".join( + f"{a.type_str} {a.name}" for a in dispatch_lambda_args(ps, f, symint=symint) + ) + lambda_return = dispatch_lambda_return_str(f) + + # dispatch lambda body + dispatch_callee = cpp_dispatch_target(f) + dispatch_args = ", ".join(cpp_dispatch_exprs(f, python_signature=ps)) + + # from arg parser outputs to dispatch lambda arguments + parser_outputs = arg_parser_output_exprs(ps, f, symint=symint) + lambda_arg_exprs = dispatch_lambda_exprs(ps, f, symint=symint) + inits = "\n".join(lambda_arg_exprs.inits) + lambda_args = ", ".join(lambda_arg_exprs.exprs) + + # scatter fields + # TODO: Checking `ps.method and ('requires_grad' in parser_outputs)` is a hacky + # solution for enabling the 'requires_grad' argument for tensor methods + # new_full, new_empty, and new_zeros. A much better but more difficult to + # implement solution involves refactoring according to Ed's description here: + # https://github.com/pytorch/pytorch/issues/36455#issuecomment-614767589 + need_set_requires_grad = ps.tensor_options_args and ( + not has_tensor_options(f) + or (ps.method and ("requires_grad" in parser_outputs)) + ) + set_requires_grad = ( + f'.set_requires_grad({parser_outputs["requires_grad"].expr})' + if need_set_requires_grad + else "" + ) + + if lambda_return == "void": + # Make in-place foreach return `self` at python-binding level. + # ref: https://github.com/pytorch/pytorch/pull/118622#pullrequestreview-1904804954 + self_arg = f.func.arguments.self_arg + return_stmt: str + if ( + str(f.func.name).startswith("_foreach_") + and f.func.kind() == SchemaKind.inplace + ): + # note(crcrpar): `_foreach_pow.ScalarAndTensor` does NOT have its in-place + # variant and it unlikely to have it in the future. Thus it's safe to have the following assert. + assert self_arg is not None and is_tensor_list_type( + self_arg.argument.type + ) + return_stmt = """PyObject* self_tensorlist = _r.args[0]; +Py_INCREF(self_tensorlist); +return self_tensorlist; +""" + else: + return_stmt = "Py_RETURN_NONE;" + return f"""\ +{schema_comment} +{inits} +auto dispatch_{name} = []({lambda_formals}) -> {lambda_return} {{ + pybind11::gil_scoped_release no_gil; + {dispatch_callee}({dispatch_args}); +}}; +dispatch_{name}({lambda_args}){set_requires_grad}; +{return_stmt} +""" + else: + typename = structseq_typenames.get(gen_structseq_typename_key(f)) + structseq_typeref = f"{typename}, " if typename is not None else "" + return f"""\ +{schema_comment} +{inits} +auto dispatch_{name} = []({lambda_formals}) -> {lambda_return} {{ + pybind11::gil_scoped_release no_gil; + return {dispatch_callee}({dispatch_args}); +}}; +return wrap({structseq_typeref}dispatch_{name}({lambda_args}){set_requires_grad}); +""" + + return go(f) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_trace_type.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_trace_type.py new file mode 100644 index 0000000000000000000000000000000000000000..e8b240906d3b4dca37ad5c85493fa262eb9d610d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_trace_type.py @@ -0,0 +1,535 @@ +from __future__ import annotations + +import itertools +from typing import Sequence + +from torchgen.api import cpp +from torchgen.api.types import DispatcherSignature +from torchgen.code_template import CodeTemplate +from torchgen.context import with_native_function +from torchgen.model import Argument, NativeFunction, SchemaKind, TensorOptionsArguments +from torchgen.utils import FileManager + + +# Note [Manual Backend kernels] +# For these ops, we want to manually register to dispatch key Backend and +# skip codegen-ed registeration to all keys before Backend. +# For codegen this means: +# - op set below must match ops with manual_kernel_registration=True in native_functions.yaml +# where we skip codegen backend kernels +# - all ops below are part of MANUAL_AUTOGRAD to skip codegen Autograd kernel registration +# - all ops below are part of MANUAL_TRACER to skip codegen Tracer kernel registration +# Note: we still register to dispatch key Profiler for these ops, keeping it untouched for now. +# You can find the manual registration in torch/csrc/autograd/VariableTypeManual.cpp +MANUAL_BACKEND = { + "options", + "data", + "set_data", + "is_leaf", + "output_nr", + "_version", + "retain_grad", + "_backward", + "requires_grad_", +} + +# For these ops we want to skip the codegen-ed registration to both Autograd and Tracer keys. +# You can find the manual registration in torch/csrc/autograd/VariableTypeManual.cpp +MANUAL_AUTOGRAD_AND_TRACER = { + "resize_", + "resize_as_", + "detach", + "detach_", + "copy_", + "_fw_primal", + "_make_dual", +} + +# Currently MANUAL_AUTOGRAD and MANUAL_TRACER share the same set of ops: +# union(MANUAL_BACKEND, MANUAL_AUTOGRAD_AND_TRACER) +# You can find the manual registration in torch/csrc/autograd/VariableTypeManual.cpp +MANUAL_AUTOGRAD = MANUAL_TRACER = MANUAL_BACKEND | MANUAL_AUTOGRAD_AND_TRACER + +# These functions we don't want to record for tracing, because we always want +# to trace their constituent parts. This is a temporary hack in lieue +# of proper scopes, where subsequent compilation passes can ask for the unfolding +# on demand. Only concrete ATen methods can be disabled this way; it will have +# NO EFFECT otherwise. +DONT_RECORD_TRACE = { + "convolution", + "conv1d", + "conv2d", + "conv3d", + "conv_transpose1d", + "conv_transpose2d", + "conv_transpose3d", + "lstm_cell", + "gru_cell", + "rnn_tanh_cell", + "rnn_relu_cell", + # FIXME: figure out a better way when we support sparse tensors in jit + "_coalesced", +} + + +def should_trace(f: NativeFunction) -> bool: + # Operations involving Storage or Type are not traceable at the moment + if any( + str(arg.type) in {"Storage", "Type"} for arg in f.func.schema_order_arguments() + ): + return False + # We can't trace functions which don't have any Tensor or TensorList returns + if not any(r.type.is_tensor_like() for r in f.func.returns): + return False + return f.func.name.name.base not in DONT_RECORD_TRACE + + +SELECT = CodeTemplate( + """\ + +if (${cond}) { + ${true} +} else { + ${false} +} +""" +) + +OP_NAME = CodeTemplate( + """\ +op_name = c10::Symbol::fromQualString("aten::${trace_name}"); +""" +) + +# These functions have their names recorded under trace renamed, +RENAME_TRACE = { + "zero": "zeros_like", # replacing aten::zero_ with aten::zeros_like + "fill": "full_like", # replacing aten::fill_ with aten::full_like +} + + +def format_trace_op_name(f: NativeFunction) -> str: + # TODO: byte-for-byte compatible with old codegen behavior - should clean up + if ( + f.func.kind() in (SchemaKind.functional, SchemaKind.out) + or f.func.name.name.dunder_method + ): + # special case for *_out functions: the in-place and out-of-place ops + # are overloaded with the same name in the JIT + trace_name = str(f.func.name.name) + trace_name = RENAME_TRACE.get(trace_name, trace_name) + return OP_NAME.substitute(trace_name=trace_name) + + # otherwise, this is an in-place op and we need to emit both in- and + # out-of-place versions + outplace_trace_name = f.func.name.name.base + inplace_trace_name = cpp.name(f.func) + outplace_trace_name = RENAME_TRACE.get(outplace_trace_name, outplace_trace_name) + inplace_trace_name = RENAME_TRACE.get(inplace_trace_name, inplace_trace_name) + + return SELECT.substitute( + cond="tracer_state->force_outplace", + true=OP_NAME.substitute(trace_name=outplace_trace_name), + false=OP_NAME.substitute(trace_name=inplace_trace_name), + ) + + +ADD_TRACE_INPUT = CodeTemplate("""jit::tracer::addInputs(node, "${name}", ${input});""") + + +def format_trace_inputs(f: NativeFunction) -> str: + def dispatch_trace_input(arg: Argument | TensorOptionsArguments) -> Sequence[str]: + if isinstance(arg, TensorOptionsArguments): + name = "options" + return [ + ADD_TRACE_INPUT.substitute( + name=name, input="c10::optTypeMetaToScalarType(options.dtype_opt())" + ), + ADD_TRACE_INPUT.substitute(name=name, input="options.layout()"), + ADD_TRACE_INPUT.substitute(name=name, input="options.device()"), + ADD_TRACE_INPUT.substitute(name=name, input="options.pinned_memory()"), + ] + else: + name = arg.name + if str(arg.type) == "Tensor?[]": + return [f'jit::tracer::addInputs(node, "{name}", {name});'] + else: + return [ADD_TRACE_INPUT.substitute(name=name, input=name)] + + args: list[Argument | TensorOptionsArguments] = list( + f.func.schema_order_arguments() + ) + + if f.func.is_out_fn(): + # *_out functions take the result as a separate argument, but we don't want to + # trace that argument directly. Instead, we trace its TensorOptions. + # So first, we need to remove the out argument from the list of arguments to trace. + num_out_args = len(f.func.arguments.out) + args = args[:-num_out_args] + + trace_inputs = itertools.chain.from_iterable( + dispatch_trace_input(arg) for arg in args + ) + + if f.func.is_out_fn(): + # for *_out functions, handle the result argument differently for inplace/outplace. + # For inplace: just add the input to the end to confirm with the JIT schema + inplace = [ + ADD_TRACE_INPUT.substitute( + name=f.func.arguments.out[i].name, input=f.func.arguments.out[i].name + ) + for i in range(num_out_args) + ] + + # for outplace: do nothing, except if the function is a factory. + # Factories are a bit special because their out-of-place overloads + # take an extra TensorOptions argument, which is missing in the _out function + has_tensor_return = any(r.type.is_tensor_like() for r in f.func.returns) + has_tensor_input_arg = any( + a.type.is_tensor_like() for a in f.func.arguments.flat_non_out + ) + is_factory_method = f.category_override == "factory" or ( + has_tensor_return and not has_tensor_input_arg + ) + + # HACK: preserve old codegen behavior - the old codegen set the `is_factory_method` + # flag for the whole family of ops with the same basename if any of them is a + # factory method. For most cases the whole family of ops are indeed all factory + # method - 'normal' is the only exception. So we handle it specially here to avoid + # cloning the old logic. + if f.func.name.name.base == "normal": + is_factory_method = True + + if is_factory_method: + outplace = [ + ADD_TRACE_INPUT.substitute( + name="out", + input="c10::optTypeMetaToScalarType(out.options().dtype_opt())", + ), + ADD_TRACE_INPUT.substitute(name="out", input="out.options().layout()"), + ADD_TRACE_INPUT.substitute(name="out", input="out.options().device()"), + ADD_TRACE_INPUT.substitute( + name="out", input="out.options().pinned_memory()" + ), + ] + else: + outplace = [] + + trace_inputs = itertools.chain( + trace_inputs, + [ + SELECT.substitute( + cond="tracer_state->force_outplace", + true="\n".join(outplace), + false="\n".join(inplace), + ) + ], + ) + + return "\n".join(trace_inputs) + + +# `torch.jit.trace` have undocumented keyword argument `_force_outplace`, +# which force jit to replace functions with outplace variants (for +# example `aten::add_` becomes `aten::add`). +# +# This replacement implemented in-place with minimum modifications of +# arguments stack (as it assumes that outplace call has the same arguments +# as inplace version). +# +# However there are no such substitutions available for `aten::fill_` +# and `aten::zero_` operators, as we never implemented `aten::fill` +# and `aten::zero`. So jit tracing hack replacing `aten::zero_` with +# `aten::zeros_like` and replacing `aten::fill_` with `aten::full_like`. +# +# But as they potentially can have different arguments, we also have +# to hack into the stack and add missing ones. +# +# A possible alternative would be: +# +# - Add `aten::fill` and `aten::zero` +# +# - Or keep `aten::zeros_like` arguments aligned with `aten::zero_` +# arguments (inside of the `native_functions.yaml`) +RENAME_TRACE_ADD_ARGS = { + "fill": """\ + jit::tracer::addInputs(node, "options", ::std::optional()); + jit::tracer::addInputs(node, "options", layout_or_default(::std::nullopt)); + jit::tracer::addInputs(node, "options", device_or_default(::std::nullopt)); + jit::tracer::addInputs(node, "options", pinned_memory_or_default(::std::nullopt)); + ::std::optional memory_format = c10::MemoryFormat::Preserve; + jit::tracer::addInputs(node, "memory_format", memory_format); +""", + "zero": """\ + jit::tracer::addInputs(node, "options", ::std::optional()); + jit::tracer::addInputs(node, "options", layout_or_default(::std::nullopt)); + jit::tracer::addInputs(node, "options", device_or_default(::std::nullopt)); + jit::tracer::addInputs(node, "options", pinned_memory_or_default(::std::nullopt)); + ::std::optional memory_format = c10::MemoryFormat::Preserve; + jit::tracer::addInputs(node, "memory_format", memory_format); +""", +} + +INPLACE_GUARD = CodeTemplate( + """\ +jit::tracer::ensureUniqueIfOutOfPlaced("${name}", ${mutable_input}); +""" +) + +PRE_RECORD_TRACE = CodeTemplate( + """\ +torch::jit::Node* node = nullptr; +std::shared_ptr tracer_state; +if (jit::tracer::isTracing()) { + tracer_state = jit::tracer::getTracingState(); + at::Symbol op_name; + ${set_op_name} + node = tracer_state->createNode(op_name, /*num_outputs=*/0); + jit::tracer::recordSourceLocation(node); + ${add_trace_inputs} + tracer_state->insertNode(node); + ${inplace_guard} + jit::tracer::setTracingState(nullptr); +} +""" +) + + +def format_prerecord_trace(f: NativeFunction) -> str: + if not should_trace(f): + return "" + + # TODO: clean up old codegen behavior + is_inplace = ( + f.func.kind() in (SchemaKind.inplace, SchemaKind.out) + and not f.func.name.name.dunder_method + ) + add_args = ( + RENAME_TRACE_ADD_ARGS.get(f.func.name.name.base, "") if is_inplace else "" + ) + additional_inputs = ( + SELECT.substitute( + cond="tracer_state->force_outplace", + true=add_args, + false="", + ) + if add_args + else "" + ) + + return PRE_RECORD_TRACE.substitute( + set_op_name=format_trace_op_name(f), + add_trace_inputs=format_trace_inputs(f) + additional_inputs, + inplace_guard=INPLACE_GUARD.substitute( + name=cpp.name(f.func), + mutable_input=f.func.arguments.out[0].name + if f.func.arguments.out + else "self", + ) + if is_inplace + else "", + ) + + +POST_RECORD_TRACE = CodeTemplate( + """\ +if (tracer_state) { + jit::tracer::setTracingState(std::move(tracer_state)); + ${add_trace_outputs} +} +""" +) + + +def format_postrecord_trace(f: NativeFunction) -> str: + if not should_trace(f): + return "" + + # For outplacing ops, *_out overloads require special handling to move the + # output *argument* to a return value + if f.func.is_out_fn(): + output_names_outplace = [arg.name for arg in f.func.arguments.out] + output_names_inplace = cpp.return_names(f) + + # Code size optimization: the common case is that the return value is + # the same for both variants + if output_names_outplace == output_names_inplace: + outputs = [ + f"jit::tracer::addOutput(node, {n});" for n in output_names_outplace + ] + return POST_RECORD_TRACE.substitute(add_trace_outputs=outputs) + + selection = SELECT.substitute( + cond="force_outplace", + true="\n".join( + f"jit::tracer::addOutput(node, {n});" for n in output_names_outplace + ), + false="\n".join( + f"jit::tracer::addOutput(node, {n});" for n in output_names_inplace + ), + ) + return POST_RECORD_TRACE.substitute(add_trace_outputs=selection) + else: + output_names = cpp.return_names(f) + outputs = [f"jit::tracer::addOutput(node, {n});" for n in output_names] + return POST_RECORD_TRACE.substitute(add_trace_outputs=outputs) + + +def tie_return_values(f: NativeFunction) -> str: + if len(f.func.returns) == 1: + return f'auto {f.func.returns[0].name or "result"}' + names = cpp.return_names(f) + return f'auto [{", ".join(names)}]' + + +def get_return_value(f: NativeFunction) -> str: + names = cpp.return_names(f) + if len(f.func.returns) == 1: + return names[0] + if f.func.kind() == SchemaKind.out: + return f'std::forward_as_tuple({", ".join(names)})' + else: + moved = ", ".join(f"std::move({name})" for name in names) + return f"std::make_tuple({moved})" + + +TRACE_DISPATCH = CodeTemplate( + """\ +${assign_return_values}at::_ops::${unambiguous_name}::redispatch(${unpacked_args});""" +) + + +def emit_trace_body(f: NativeFunction) -> list[str]: + trace_body: list[str] = [] + + trace_body.append(format_prerecord_trace(f)) + + dispatcher_sig = DispatcherSignature.from_schema(f.func) + dispatcher_exprs = dispatcher_sig.exprs() + + # code-generated tracing kernels plumb and recompute dispatch keys directly through the kernel for performance. + # See Note [Plumbing Keys Through The Dispatcher] for details. + dispatch_key_set = "ks & c10::DispatchKeySet(c10::DispatchKeySet::FULL_AFTER, c10::DispatchKey::Tracer)" + redispatch_args = ", ".join([dispatch_key_set] + [a.expr for a in dispatcher_exprs]) + + assign_return_values = ( + f"{tie_return_values(f)} = " + if f.func.kind() in [SchemaKind.functional, SchemaKind.mutable] + and f.func.returns + else "" + ) + + # Note that this calls the slow, dispatching variants of manual_cpp_binding ops. + # We could probably work harder to ensure that the fast variants are + # called instead, but the perf benefit would be minimal. + trace_body.append( + TRACE_DISPATCH.substitute( + assign_return_values=assign_return_values, + unambiguous_name=f.func.name.unambiguous_name(), + unpacked_args=redispatch_args, + ) + ) + + trace_body.append(format_postrecord_trace(f)) + if f.func.returns: + trace_body.append(f"return {get_return_value(f)};") + return trace_body + + +METHOD_DEFINITION = CodeTemplate( + """\ +${return_type} ${type_wrapper_name}(${formals}) { + ${type_definition_body} +} +""" +) + + +def type_wrapper_name(f: NativeFunction, key: str = "Default") -> str: + if f.func.name.overload_name: + name = f"{cpp.name(f.func)}_{f.func.name.overload_name}" + else: + name = cpp.name(f.func) + + # The key argument is only used in gen_variable_type where we need fns per autograd dispatch key. + # In gen_trace_type and gen_inplace_view_type where only one fn per native_fn must be generated, + # the key argument should not be passed. + # We do not append key if it is Default so that generated functions from + # before per-dispatch-key derivatives were added retain the same names. + if key != "Default": + name = name + f"_{key}" + return name + + +@with_native_function +def method_definition(f: NativeFunction) -> str: + assert cpp.name(f.func) not in MANUAL_TRACER + + formals = ", ".join( + # code-generated tracing kernels plumb and recompute dispatch keys directly through the kernel for performance. + # See Note [Plumbing Keys Through The Dispatcher] for details. + ["c10::DispatchKeySet ks"] + + [ + f'{cpp.argument_type(a, binds="__placeholder__", symint=True).cpp_type()} {a.name}' + for a in f.func.schema_order_arguments() + ] + ) + + return METHOD_DEFINITION.substitute( + return_type=cpp.returns_type(f.func.returns, symint=True).cpp_type(), + type_wrapper_name=type_wrapper_name(f), + formals=formals, + type_definition_body=emit_trace_body(f), + ) + + +WRAPPER_REGISTRATION = CodeTemplate( + """\ +m.impl("${name}", + TORCH_FN(${class_type}::${type_wrapper_name}) +); +""" +) + + +@with_native_function +def method_registration(f: NativeFunction) -> str: + assert cpp.name(f.func) not in MANUAL_TRACER + + return WRAPPER_REGISTRATION.substitute( + name=f.func.name, + type_wrapper_name=type_wrapper_name(f), + class_type="TraceType", + ) + + +def gen_trace_type_func(fn: NativeFunction) -> dict[str, list[str]]: + return { + "ops_headers": [f"#include "], + "trace_method_definitions": [method_definition(fn)], + "trace_wrapper_registrations": [method_registration(fn)], + } + + +def gen_trace_type( + out: str, native_functions: list[NativeFunction], template_path: str +) -> None: + # NOTE: see Note [Sharded File] at the top of the VariableType.cpp + # template regarding sharding of the generated files. + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + fm.write_sharded( + "TraceType.cpp", + [fn for fn in native_functions if cpp.name(fn.func) not in MANUAL_TRACER], + key_fn=lambda fn: fn.root_name, + base_env={ + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/TraceType.cpp", + }, + env_callable=gen_trace_type_func, + num_shards=5, + sharded_keys={ + "ops_headers", + "trace_method_definitions", + "trace_wrapper_registrations", + }, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_variable_factories.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_variable_factories.py new file mode 100644 index 0000000000000000000000000000000000000000..d446ec1f13e3f4435a3e50cc0df42c026963b07b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_variable_factories.py @@ -0,0 +1,116 @@ +# Generates C++ functions that wrap ATen tensor factory methods to turn them into Variables. +# +# This writes one file: variable_factories.h + +from __future__ import annotations + +import re + +import torchgen.api.python as python +from torchgen.api import cpp +from torchgen.api.types import CppSignatureGroup +from torchgen.context import with_native_function +from torchgen.gen import parse_native_yaml +from torchgen.model import NativeFunction, TensorOptionsArguments, Variant +from torchgen.utils import FileManager, mapMaybe + + +OPTIONAL_TYPE_PATTERN = re.compile(r"std::optional<(.+)>") +TYPE_PATTERN = re.compile(r"(?:const\s+)?([A-Z]\w+)") + + +# Add 'at::' to types defined in ATen namespace, e.g. Tensor, TensorList, IntArrayRef and etc. +# TODO: maybe update the cpp argument API to take optional namespace argument? +def fully_qualified_type(argument_type: str) -> str: + def maybe_optional_type(type: str, is_opt: bool) -> str: + return f"std::optional<{type}>" if is_opt else type + + opt_match = OPTIONAL_TYPE_PATTERN.match(argument_type) + is_opt = opt_match is not None + if opt_match: + argument_type = argument_type[opt_match.start(1) : opt_match.end(1)] + match = TYPE_PATTERN.match(argument_type) + if match is None: + return maybe_optional_type(argument_type, is_opt) + index = match.start(1) + qualified_type = f"{argument_type[:index]}at::{argument_type[index:]}" + return maybe_optional_type(qualified_type, is_opt) + + +def gen_variable_factories( + out: str, native_yaml_path: str, tags_yaml_path: str, template_path: str +) -> None: + native_functions = parse_native_yaml( + native_yaml_path, tags_yaml_path + ).native_functions + factory_functions = [fn for fn in native_functions if is_factory_function(fn)] + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + fm.write_with_template( + "variable_factories.h", + "variable_factories.h", + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/variable_factories.h", + "ops_headers": [ + f"#include " for fn in factory_functions + ], + "function_definitions": list(mapMaybe(process_function, factory_functions)), + }, + ) + + +@with_native_function +def is_factory_function(f: NativeFunction) -> bool: + if Variant.function not in f.variants: + return False + + name = cpp.name(f.func) + has_tensor_options = python.has_tensor_options(f) + return has_tensor_options or name.endswith("_like") + + +@with_native_function +def process_function(f: NativeFunction) -> str | None: + name = cpp.name(f.func) + has_tensor_options = python.has_tensor_options(f) + is_factory = has_tensor_options or name.endswith("_like") + + if Variant.function not in f.variants or not is_factory: + return None + + cpp_sigs = CppSignatureGroup.from_native_function(f, method=False) + sigs = [cpp_sigs.signature] + if cpp_sigs.symint_signature is not None: + sigs.append(cpp_sigs.symint_signature) + r = "" + for sig in sigs: + formals: list[str] = [] + exprs: list[str] = [] + requires_grad = "false" + for arg in sig.arguments(): + qualified_type = fully_qualified_type(arg.type) + if arg.default: + formals.append(f"{qualified_type} {arg.name} = {arg.default}") + else: + formals.append(f"{qualified_type} {arg.name}") + + if isinstance(arg.argument, TensorOptionsArguments): + # note: we remove the requires_grad setting from the TensorOptions because + # it is ignored anyways (and we actually have an assertion that it isn't set + # which would fail otherwise). We handle requires_grad explicitly here + # instead of passing it through to the kernel. + exprs.append( + f"at::TensorOptions({arg.name}).requires_grad(::std::nullopt)" + ) + # Manually set the requires_grad bit on the result tensor. + requires_grad = f"{arg.name}.requires_grad()" + else: + exprs.append(arg.name) + + r += f"""\ +inline at::Tensor {sig.name()}({', '.join(formals)}) {{ + at::AutoDispatchBelowADInplaceOrView guard; + return autograd::make_variable(at::{sig.name()}({', '.join(exprs)}), /*requires_grad=*/{requires_grad}); +}} +""" + return r diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_variable_type.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_variable_type.py new file mode 100644 index 0000000000000000000000000000000000000000..f8a4b2aec8865bfa7cfaf1bca5d80770ef445bb1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_variable_type.py @@ -0,0 +1,2179 @@ +# Generates VariableType.h/cpp +# +# **If any changes are being made to the VariableType codegen please also check +# if updates are needed in torch/csrc/autograd/autograd_not_implemented_fallback.cpp +# +# VariableType is a subclass of at::Type that provides the binding code +# necessary to provide a differentiable version of ATen operators. There are a +# number of different things we could mean: +# +# - Given a non-differentiable forward implementation, we might +# directly associate it with a backward implementation to make +# it differentiable. This is the common case. +# +# - Some functions don't need a backwards implementation, because +# backpropagation will never propagate beyond them. There are a +# number of different reasons why this may be the case: +# +# - The function has no differentiable inputs +# - The function's output is not differentiable +# - The function has no data dependency on its input +# +# - Some function don't need a backwards implementation because they +# are implemented as a composition of other (differentiable) ATen +# functions. These are dispatched directly to the Type superclass, +# which will in turn dispatch back to VariableType for its +# differentiable subcomponents. +# + +from __future__ import annotations + +import re +from typing import Callable, Sequence + +from torchgen.api import cpp +from torchgen.api.autograd import ( + DifferentiableInput, + dispatch_strategy, + ForwardDerivative, + gen_differentiable_outputs, + is_differentiable, + NativeFunctionWithDifferentiabilityInfo, + SavedAttribute, +) +from torchgen.api.types import ( + ArrayRefCType, + BaseCppType, + BaseCType, + Binding, + intArrayRefT, + iTensorListRefT, + ListCType, + MutRefCType, + OptionalCType, + scalarT, + SpecialArgName, + stringT, + symIntArrayRefT, + TENSOR_LIST_LIKE_CTYPES, + tensorListT, + tensorT, + TupleCType, + VectorCType, +) +from torchgen.code_template import CodeTemplate +from torchgen.context import ( + native_function_manager, + with_native_function, + with_native_function_and, +) +from torchgen.model import ( + Argument, + BaseType, + ListType, + NativeFunction, + SchemaKind, + SelfArgument, + TensorOptionsArguments, +) +from torchgen.utils import FileManager, mapMaybe + +from .context import with_native_function_with_differentiability_info_and_key +from .gen_inplace_or_view_type import ( + ALL_VIEW_FUNCTIONS, + ASSIGN_RETURN_VALUE, + AUTOGRAD_NOT_IMPLEMENTED_REGISTRATION, + gen_formals, + get_base_name, + get_view_info, + is_tensor_list_type, + is_tensor_type, + METHOD_DEFINITION, + modifies_arguments, + TMP_VAR, + unpack_args, + unpacked_name, + use_derived, + WRAPPER_REGISTRATION, +) +from .gen_trace_type import ( + get_return_value, + MANUAL_AUTOGRAD_AND_TRACER, + MANUAL_BACKEND, + tie_return_values, + type_wrapper_name, +) + + +# We don't set or modify grad_fn on these methods. Generally, they return +# tensors that have requires_grad=False. In-place functions listed here will +# not examine or modify requires_grad or grad_fn. +# NB: this does NOT include overload name +DONT_REQUIRE_DERIVATIVE = { + # These only depend on the input Tensor's shape and device, not the data + "empty_like", + "ones_like", + "full_like", + "zeros_like", + "rand_like", + "randn_like", + "new_empty", + "new_empty_strided", + "new_full", + "new_zeros", + "new_ones", + # These are only implemented on integral types + "__and__", + "__iand__", + "__ilshift__", + "__ior__", + "__irshift__", + "__ixor__", + "__lshift__", + "__or__", + "__rshift__", + "__xor__", + # These work on integral data types, and hence don't require derivative + "_sobol_engine_draw", + "_sobol_engine_ff", + "_sobol_engine_scramble_", + "_sobol_engine_initialize_state_", + # This is an unsafe method that is meant to be out of reach of autograd. + "_coalesced_", + # Quantize functions should not record gradients + "quantize_per_tensor", + "quantize_per_channel", + # Functions that return integers should not have output that require gradients + "argmax", + "argmin", + "argsort", + "searchsorted", + "bucketize", + # Functions that return booleans are not differentiable + "isnan", + "isposinf", + "isneginf", + "isinf", + "signbit", + "isin", + "allclose", + # Functions return none are not differentiable + "record_stream", + # These functions are not differentiable + "logical_and", + "logical_xor", + "logical_not", + "logical_or", + # This function returns nested_tensor shape as a tensor that is non-differentiable + "_nested_tensor_size", + "_nested_tensor_strides", + "_nested_tensor_storage_offsets", +} + +# The C -> R functions at the time of adding this are still being audited and tested +# but will not error out. +# C -> C, R -> C functions for which backward is correctly implemented and tested +GRADIENT_IMPLEMENTED_FOR_COMPLEX = { + "fill", + "t", + "t_copy", + "view", + "reshape", + "reshape_as", + "view_as", + "view_copy", + "roll", + "clone", + "block_diag", + "diag_embed", + "repeat", + "expand", + "expand_copy", + "flip", + "fliplr", + "flipud", + "rot90", + "nanmean", + "nansum", + "transpose", + "transpose_copy", + "permute", + "permute_copy", + "squeeze", + "squeeze_copy", + "unsqueeze", + "unsqueeze_copy", + "resize", + "resize_as", + "tril", + "triu", + "chunk", + "zero_", + "eq_", + "ne_", + "add", + "__radd__", + "sum", + "_conj", + "sin", + "cos", + "mul", + "sinc", + "sinh", + "cosh", + "__rmul__", + "sgn", + "asin", + "acos", + "sub", + "div", + "cat", + "view_as_complex", + "index_put", + "neg", + "complex", + "select", + "where", + "as_strided", + "as_strided_copy", + "as_strided_scatter", + "slice", + "constant_pad_nd", + "unbind", + "split", + "split_with_sizes", + "unsafe_split", + "split_with_sizes_backward", + "dot", + "vdot", + "cholesky", + "triangular_solve", + "mm", + "_unsafe_view", + "mv", + "outer", + "bmm", + "diagonal", + "alias", + "atan", + "log", + "log10", + "log1p", + "log2", + "logaddexp", + "logsumexp", + "logcumsumexp", + "reciprocal", + "tan", + "pow", + "rsqrt", + "tanh", + "tanh_backward", + "asinh", + "acosh", + "atanh", + "take", + "fill_", + "exp", + "exp2", + "expm1", + "nonzero", + "mean", + "std_mean", + "var_mean", + "inverse", + "solve", + "linalg_cholesky", + "addcmul", + "addcdiv", + "matrix_exp", + "linalg_matrix_exp", + "_linalg_eigh", + "cholesky_solve", + "linalg_qr", + "_linalg_svd", + "_fft_c2c", + "_fft_r2c", + "linalg_solve", + "sqrt", + "stack", + "gather", + "index_select", + "index_add_", + "linalg_inv", + "linalg_inv_ex", + "baddbmm", + "addbmm", + "addmm", + "addmv", + "addr", + "linalg_householder_product", + "ormqr", + "reflection_pad1d", + "reflection_pad2d", + "reflection_pad3d", + "linalg_cholesky_ex", + "linalg_eig", + "diagonal_copy", + "diagonal_scatter", + "alias_copy", + "select_backward", + "diagonal_backward", + "slice_backward", + "reflection_pad1d_backward", + "reflection_pad2d_backward", + "reflection_pad3d_backward", + "_sparse_sparse_matmul", + "replication_pad1d", + "replication_pad2d", + "replication_pad3d", + "put", + "put_", + "_to_copy", + "replication_pad1d_backward", + "replication_pad2d_backward", + "replication_pad3d_backward", + "diag", + "masked_scatter", + "masked_select", + "index_add", + "index_fill", + "trace", + "polar", + "cumsum", + "rsub", + "eig", + "lerp", + "linalg_vector_norm", + "cumprod", + "prod", + "index_copy", + "lu", + "unfold", + "unfold_backward", + "index", + "masked_fill", + "masked_scatter_backward", + "linalg_cross", + "lu_unpack", + "renorm", + "_conj_physical", + "linalg_lu_factor_ex", + "scatter", + "scatter_add", + "sigmoid", + "sigmoid_backward", + "sparse_mask", + "trapezoid", + "cumulative_trapezoid", + "conj_physical_", + "_neg_view", + "_reshape_alias", + "_reshape_copy", + "_linalg_det", + "lu_solve", + "linalg_solve_triangular", + "linalg_pinv", + "linalg_lstsq", + "unfold_copy", + "col2im", + "im2col", + "cholesky_inverse", + "to_sparse", + "sparse_sampled_addmm", + "linalg_lu", + "pixel_shuffle", + "pixel_unshuffle", + "channel_shuffle", + "linalg_lu_solve", + "_linalg_slogdet", + "_linalg_solve_ex", + "_unsafe_index", + "_unsafe_index_put", + "_unsafe_masked_index", + "_unsafe_masked_index_put_accumulate", +} + +GRADIENT_IMPLEMENTED_FOR_SPARSE_COMPLEX = { + "_to_dense", + "_coalesce", + "coalesce", + "values", + "_sparse_coo_tensor_with_dims_and_tensors", + "_sparse_addmm", +} + +GRADIENT_IMPLEMENTED_FOR_COMPLEX.update(GRADIENT_IMPLEMENTED_FOR_SPARSE_COMPLEX) + +# Some operators invalidate the grad_accumulator. Let's reset it. +RESET_GRAD_ACCUMULATOR = {"set_", "resize_"} + +# NOTE [ TensorImpl and Storage Pointer Sanity Checks ] +# +# We check the following properties: +# 1) A function should never change the input tensors' underlying c10::TensorImpl +# pointers or c10::Storage pointers, even if it modifies its input tensors (via +# inplace or out-variants) +# If the function does not modify its arguments, we also check the following properties +# pertaining to its output: +# 2) Its TensorImpl has use_count of 1 +# 3) If the function is a view function, it has the same StorageImpl as that of +# the input it is aliased with. Otherwise, its StorageImpl has use_count of 1 +# +# The following code templates implement the checks for this invariant: +SAVE_TENSOR_STORAGE = CodeTemplate( + """\ +auto ${tensor_name}_storage_saved = + ${tensor_name}.has_storage() ? ::std::optional(${tensor_name}.storage()) : ::std::nullopt; +""" +) + + +# If tensor_name == out_tensor_name, used to enforce (1), otherwise used for (2) +ENFORCE_SAME_TENSOR_STORAGE = CodeTemplate( + """\ +if (${tensor_name}_storage_saved.has_value() && + !at::impl::dispatch_mode_enabled() && + !at::impl::tensor_has_dispatch(${tensor_name}) && + !at::impl::tensor_has_dispatch(${out_tensor_name})) + TORCH_INTERNAL_ASSERT(${tensor_name}_storage_saved.value().is_alias_of(${out_tensor_name}.storage())); +""" +) + +SAVE_TENSORLIST_STORAGE = CodeTemplate( + """\ +std::vector<::std::optional> ${tensorlist_name}_storage_saved(${tensorlist_name}.size()); +for (const Tensor& tensor : ${tensorlist_name}) + ${tensorlist_name}_storage_saved.push_back( + tensor.has_storage() ? ::std::optional(tensor.storage()) : ::std::nullopt); +""" +) + +ENFORCE_SAME_TENSORLIST_STORAGE = CodeTemplate( + """\ +for (size_t i=0; i<${tensorlist_name}.size() && !at::impl::dispatch_mode_enabled(); i++) { + if (${tensorlist_name}_storage_saved[i].has_value() && !at::impl::tensorlist_has_dispatch(${tensorlist_name})) + TORCH_INTERNAL_ASSERT(${tensorlist_name}_storage_saved[i].value().is_alias_of(${tensorlist_name}[i].storage())); +} +""" +) + +SAVE_OPTIONALTENSORLIST_STORAGE = CodeTemplate( + """\ +std::vector<::std::optional> ${tensorlist_name}_storage_saved(${tensorlist_name}.size()); +for (const ::std::optional& tensor : ${tensorlist_name}) + ${tensorlist_name}_storage_saved.push_back( + tensor.has_value() && tensor->has_storage() ? ::std::optional(tensor->storage()) : ::std::nullopt); +""" +) + +ENFORCE_SAME_OPTIONALTENSORLIST_STORAGE = CodeTemplate( + """\ +for (size_t i=0; i<${tensorlist_name}.size() && !at::impl::dispatch_mode_enabled(); i++) { + if (${tensorlist_name}_storage_saved[i].has_value() && !at::impl::tensorlist_has_dispatch(${tensorlist_name})) + TORCH_INTERNAL_ASSERT(${tensorlist_name}_storage_saved[i].value().is_alias_of( + static_cast<::std::optional>(${tensorlist_name}[i])->storage())); +} +""" +) + +SAVE_TENSOR_IMPL = CodeTemplate( + """\ +c10::intrusive_ptr ${tensor_name}_impl_saved; +if (${tensor_name}.defined()) ${tensor_name}_impl_saved = ${tensor_name}.getIntrusivePtr(); +""" +) + +ENFORCE_SAME_TENSOR_IMPL = CodeTemplate( + """\ +if (${tensor_name}_impl_saved && !at::impl::dispatch_mode_enabled() && !at::impl::tensor_has_dispatch(${tensor_name})) + TORCH_INTERNAL_ASSERT(${tensor_name}_impl_saved == ${tensor_name}.getIntrusivePtr()); +""" +) + +ENFORCE_TENSOR_IMPL_USE_COUNT_LT_OR_EQ_ONE = CodeTemplate( + """\ +if (!at::impl::dispatch_mode_enabled() && !at::impl::tensor_has_dispatch(${tensor_name})) + TORCH_INTERNAL_ASSERT(${tensor_name}.use_count() <= 1, "function: ${fn_name}"); +""" +) + +ENFORCE_TENSOR_STORAGE_USE_COUNT_EQUALS_ONE = CodeTemplate( + """\ +if (${tensor_name}.has_storage() && !at::impl::dispatch_mode_enabled() && !at::impl::tensor_has_dispatch(${tensor_name})) { + TORCH_INTERNAL_ASSERT(${tensor_name}.storage().use_count() == 1, "function: ${fn_name}"); +} +""" +) + +SAVE_TENSORLIST_IMPL = CodeTemplate( + """\ +std::vector> ${tensorlist_name}_impl_saved(${tensorlist_name}.size()); +for (size_t i=0; i<${tensorlist_name}.size(); i++) + if (${tensorlist_name}[i].defined()) ${tensorlist_name}_impl_saved[i] = ${tensorlist_name}[i].getIntrusivePtr(); +""" +) + +ENFORCE_SAME_TENSORLIST_IMPL = CodeTemplate( + """\ +for (size_t i=0; i<${tensorlist_name}.size() && !at::impl::dispatch_mode_enabled(); i++) { + if (${tensorlist_name}_impl_saved[i] && !at::impl::tensorlist_has_dispatch(${tensorlist_name})) + TORCH_INTERNAL_ASSERT(${tensorlist_name}_impl_saved[i] == ${tensorlist_name}[i].getIntrusivePtr()); +} +""" +) + +SAVE_OPTIONALTENSORLIST_IMPL = CodeTemplate( + """\ +std::vector> ${tensorlist_name}_impl_saved(${tensorlist_name}.size()); +for (size_t i=0; i<${tensorlist_name}.size(); i++) { + ::std::optional t = ${tensorlist_name}[i]; + if (t.has_value() && t->defined()) ${tensorlist_name}_impl_saved[i] = t->getIntrusivePtr(); +} +""" +) + +ENFORCE_SAME_OPTIONALTENSORLIST_IMPL = CodeTemplate( + """\ +for (size_t i=0; i<${tensorlist_name}.size() && !at::impl::dispatch_mode_enabled(); i++) { + if (${tensorlist_name}_impl_saved[i]) + TORCH_INTERNAL_ASSERT( + ${tensorlist_name}_impl_saved[i] == static_cast<::std::optional>(${tensorlist_name}[i])->getIntrusivePtr()); +} +""" +) + +# The following list contains functions that we don't enforce the invariant on. +DONT_ENFORCE_SAME_TENSOR_IMPL_OR_STORAGE = { + # These functions are expected to change impl or storage of input tensors + "set_", + "_cudnn_rnn_flatten_weight", + "_unsafe_masked_index", + "_unsafe_masked_index_put_accumulate", +} +DONT_ENFORCE_TENSOR_IMPL_USE_COUNT = { + # These non-inplace, non-out functions return tensors with use_count > 1 + # Therefore, they MAY (but not necessarily) return one of its inputs as-is + # See https://github.com/pytorch/pytorch/issues/60426 for more information + "_embedding_bag", + "_embedding_bag_forward_only", + "q_per_channel_scales", + "q_per_channel_zero_points", + "lu_unpack", + "_cudnn_rnn_backward", + # The below failed StorageImpl use_count check but we skip tensor_impl check + # just in case + "_cudnn_rnn", + "dequantize_self", + # lift() should never actually be called with a requires_grad=True tensor, + "lift", + "lift_fresh", + "lift_fresh_copy", + # Nested Tensors related functions + # _nested_tensor_size() should never actually be called with requires_grad=True tensor + "_nested_tensor_size", + "_nested_tensor_strides", + "_nested_tensor_storage_offsets", +} + +DONT_ENFORCE_STORAGE_IMPL_USE_COUNT = { + # These non-view functions return tensors with storage use_count != 1 + "_slow_conv2d_forward", + "slow_conv3d_forward", + "channel_shuffle", + # If an input is returned as-is in output, we cannot guarantee its storage_impl + # use count to be 1 either. + *DONT_ENFORCE_TENSOR_IMPL_USE_COUNT, +} +# END CHECKS FOR [ TensorImpl and Storage Pointer Sanity Checks ] + +DECLARE_GRAD_FN = CodeTemplate( + """\ +std::shared_ptr<${op}> grad_fn; +""" +) + +DECLARE_VECTOR_OF_GRAD_FN = CodeTemplate( + """\ +std::vector> grad_fns; +""" +) + +SETUP_ANY_REQUIRES_GRAD = CodeTemplate( + """\ +[[maybe_unused]] auto _any_requires_grad = compute_requires_grad( ${args_with_derivatives} ); +${extra_differentiability_conditions} +""" +) + +SETUP_DERIVATIVE = CodeTemplate( + """\ +if (_any_requires_grad) { + ${setup} +} +""" +) + +SETUP_NONE_REQUIRES_GRAD = CodeTemplate( + """\ +if (compute_requires_grad( ${args_to_check} )) { + throw_error_out_requires_grad("${base_name}"); +} +""" +) + +ASSIGN_GRAD_FN = CodeTemplate( + """\ +grad_fn = std::shared_ptr<${op}>(new ${op}(${op_ctor}), deleteNode); +grad_fn->set_next_edges(collect_next_edges( ${args_with_derivatives} )); +""" +) + +# note(crcrpar): `compute_requires_grad` in the template below is supplied with arguments indexed with `i` +# while the `SETUP_ANY_REQUIRES_GRAD` above takes whole tensors and scalars. +ASSIGN_VECTOR_OF_GRAD_FN = CodeTemplate( + """\ +for (const auto& i : c10::irange( ${irange} )) { + const auto ith_requires_grad = compute_requires_grad(${args_with_derivatives}); + check_inplace(self[i], ith_requires_grad); + grad_fns.push_back([&]() -> std::shared_ptr<${op}> { + if (!ith_requires_grad) { + return nullptr; + } else { + auto grad_fn = std::shared_ptr<${op}>(new ${op}(${op_ctor}), deleteNode); + grad_fn->set_next_edges(collect_next_edges( ${args_with_derivatives} )); + return grad_fn; + } + }()); +} +""" +) + +CALL_REDISPATCH = CodeTemplate( + """\ +at::redispatch::${api_name}(${unpacked_args})""" +) +# If the non-variable operation has return values, we use the `tmp` variable to hold the +# values temporarily and pass the values to the return variables outside of the +# `at::AutoDispatchBelowAutograd` guard block. +DISPATCH_TO_NON_VAR_TYPE_WITH_TMP_RETURN_VALUES_JVP_DECOMP = CodeTemplate( + """\ +auto ${tmp_var} = ([&]() { + if (${any_has_forward_grad}) { + static c10::OperatorName full_name("aten::${op_name}", "${op_overload}"); + static ::std::optional opt_op = c10::Dispatcher::singleton().findSchema(full_name); + return impl::run_jit_decomposition_with_args_for_jvp<${return_types}>("${op_name}", *opt_op, ks, ${arg_names}); + } else { + ${guard} + return ${base_type_call}; + } +})(); +""" +) + +DISPATCH_TO_NON_VAR_TYPE_WITH_TMP_RETURN_VALUES = CodeTemplate( + """\ +auto ${tmp_var} = ([&]() { + ${guard} + return ${base_type_call}; +})(); +""" +) + +DISPATCH_TO_NON_VAR_TYPE_WITHOUT_RETURN_VALUES = CodeTemplate( + """\ +{ + ${guard} + ${base_type_call}; +} +""" +) + +SET_HISTORY = CodeTemplate( + """\ +if (grad_fn) { + ${fn}_history(${differentiable_outputs}, grad_fn); +} +""" +) + +LOOP_OVER_VECTOR_OF_GRAD_FNS = CodeTemplate( + """\ +if (!grad_fns.empty()) { + ${preamble} + for (const auto& i : c10::irange(grad_fns.size())) { + auto grad_fn = grad_fns[i]; + if (grad_fn != nullptr) { + ${statements} + } + } +} +""" +) + +CONDITIONAL = CodeTemplate( + """\ +if (${cond}) { + ${statements} +} +""" +) + +RUN_ONLY_IN_DEBUG_MODE = CodeTemplate( + """\ +#ifndef NDEBUG +${statements} +#endif +""" +) + +FW_DERIVATIVE_CHECK_TEMPLATE = CodeTemplate( + """\ +isFwGradDefined(${req_inp})\ +""" +) +FW_DERIVATIVE_SIZE_CHECK_TEMPLATE = CodeTemplate( + """\ +TORCH_CHECK( + self.size() == ${inp_name}.size(), + "Tensor lists must have the same number of tensors, got ", + self.size(), + " and ", + ${inp_name}.size()); +""" +) + +FW_DERIVATIVE_TENSORLIST_CHECK_TEMPLATE = CodeTemplate( + """\ +isFwGradDefinedTensorList(${req_inp})\ +""" +) + +FW_DERIVATIVE_DEFINED_GRAD_TEMPLATE = CodeTemplate( + """\ +auto ${inp_name}_t_raw = toNonOptFwGrad(${inp}); +auto ${inp_name}_tensor = toNonOptTensor(${inp}); +auto ${inp_name}_t = (${inp_name}_t_raw.defined() || !${inp_name}_tensor.defined()) + ? ${inp_name}_t_raw : at::${zeros_fn}(${inp_name}_tensor.sym_sizes(), ${inp_name}_tensor.options()); +""" +) + +FW_DERIVATIVE_DEFINED_PRIMAL_TEMPLATE = CodeTemplate( + """\ +auto ${inp_name}_p = toNonOptPrimal(${inp}); +""" +) + +FW_DERIVATIVE_SETTER_TENSOR = CodeTemplate( + """\ +if (${out_arg}_new_fw_grad_opt.has_value() && ${out_arg}_new_fw_grad_opt.value().defined() && ${out_arg}.defined()) { + // The hardcoded 0 here will need to be updated once we support multiple levels. + ${out_arg}._set_fw_grad(${out_arg}_new_fw_grad_opt.value(), /* level */ 0, /* is_inplace_op */ ${is_inplace}); +} +""" +) + +FW_DERIVATIVE_SETTER_TENSOR_FOREACH = CodeTemplate( + """\ +for (const auto& i : c10::irange(${out_arg}_new_fw_grad_opts.size())) { + auto& ${out_arg}_new_fw_grad_opt = ${out_arg}_new_fw_grad_opts[i]; + if (${out_arg}_new_fw_grad_opt.has_value() && ${out_arg}_new_fw_grad_opt.value().defined() && ${out_arg}[i].defined()) { + // The hardcoded 0 here will need to be updated once we support multiple levels. + ${out_arg}[i]._set_fw_grad(${out_arg}_new_fw_grad_opt.value(), /* level */ 0, /* is_inplace_op */ ${is_inplace}); + } +} +""" +) + +FW_DERIVATIVE_SETTER_MULTI_OUTPUT = CodeTemplate( + """\ +if (${all_res}_new_fw_grad_opt.has_value() && std::get<${idx}>(${all_res}_new_fw_grad_opt.value()).defined() + && ${out_arg}.defined()) { + ${out_arg}._set_fw_grad(std::get<${idx}>(${all_res}_new_fw_grad_opt.value()), /* level */ 0, /* is_inplace_op */ false); +} +""" +) + +FW_DERIVATIVE_SETTER_TENSOR_LIST = CodeTemplate( + """\ +if (${out_arg}_new_fw_grad_opt.has_value()) { + auto ${out_arg}_new_fw_grad = ${out_arg}_new_fw_grad_opt.value(); + TORCH_INTERNAL_ASSERT(${out_arg}.size() == ${out_arg}_new_fw_grad.size()); + for (const auto i : c10::irange(${out_arg}.size())) { + if (${out_arg}_new_fw_grad[i].defined() && ${out_arg}[i].defined()) { + // The hardcoded 0 here will need to be updated once we support multiple levels. + ${out_arg}[i]._set_fw_grad(${out_arg}_new_fw_grad[i], /* level */ 0, /* is_inplace_op */ ${is_inplace}); + } + } +} +""" +) + +FW_DERIVATIVE_TEMPLATE = CodeTemplate( + """\ +${fw_grad_opt_definition} +if (${requires_fw_grad}) { + ${unpacked_arguments} + ${out_arg}_new_fw_grad_opt = ${formula}; +} +""" +) + +FW_DERIVATIVE_FOREACH_TEMPLATE = CodeTemplate( + """\ +${fw_grad_opt_definition} +for (const auto& i : c10::irange(${vector_of_optional_tensor}.size())) { + if (${any_has_forward_grad_for_current_index}) { + ${unpacked_arguments} + ${vector_of_optional_tensor}[i] = ${formula}; + } +} +""" +) + +FW_DERIVATIVE_FORBID_TEMPLATE = CodeTemplate( + """\ +TORCH_CHECK_NOT_IMPLEMENTED(!(${cond}), "Trying to use forward AD with ${name} that does not support it ${msg}"); +""" +) + +FW_DERIVATIVE_FORBID_LIST_TEMPLATE = CodeTemplate( + """\ +for (const auto& _t: ${arg}) { + TORCH_CHECK_NOT_IMPLEMENTED(!(${cond}), "Trying to use forward AD with ${name} that does not support it ${msg}"); +} +""" +) + + +def gen_variable_type( + out: str, + native_yaml_path: str, + tags_yaml_path: str, + fns_with_diff_infos: list[NativeFunctionWithDifferentiabilityInfo], + template_path: str, + used_keys: set[str], +) -> None: + """VariableType.h and VariableType.cpp body + + This is the at::Type subclass for differentiable tensors. The + implementation of each function dispatches to the base tensor type to + compute the output. The grad_fn is attached to differentiable functions. + """ + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + fm.write( + "VariableType.h", + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/VariableType.h" + }, + ) + + # helper that generates a TORCH_LIBRARY_IMPL macro for each + # dispatch key that appears in derivatives.yaml + def wrapper_registrations(used_keys: set[str]) -> str: + library_impl_macro_list: list[str] = [] + for key in sorted(used_keys): + dispatch_key = key + if key == "Default": + dispatch_key = "Autograd" + library_impl_macro = ( + f"TORCH_LIBRARY_IMPL(aten, {dispatch_key}, m) " + + "{\n" + + "${" + + f"wrapper_registrations_{key}" + + "}\n}" + ) + library_impl_macro_list += [library_impl_macro] + return "\n\n".join(library_impl_macro_list) + + # Generate a new template from VariableType.cpp which replaces ${wrapper_registrations} + # with per key TORCH_LIBRARY_IMPL macros for each key that appears in derivatives.yaml + fm1 = FileManager( + install_dir=out + "/templates", template_dir=template_path, dry_run=False + ) + fm1.write( + "VariableType.cpp", + lambda: { + "type_derived_method_definitions": "\n\n".join( + [ + "${" + f"type_derived_method_definitions_{key}" + "}" + for key in sorted(used_keys) + ] + ), + "wrapper_registrations": wrapper_registrations(used_keys), + }, + ) + + # Generate final VariableType_*.cpp files from the generated template + fm2 = FileManager(install_dir=out, template_dir=out + "/templates", dry_run=False) + + sharded_keys = set( + [f"type_derived_method_definitions_{key}" for key in sorted(used_keys)] + + [f"wrapper_registrations_{key}" for key in sorted(used_keys)] + ) + # NOTE: see Note [Sharded File] at the top of the VariableType.cpp + # template regarding sharding of the generated files. + fm2.write_sharded( + "VariableType.cpp", + [fn for fn in fns_with_diff_infos if use_derived(fn)], + key_fn=lambda fn: cpp.name(fn.func.func), + base_env={ + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/VariableType.cpp", + }, + env_callable=gen_variable_type_func, + num_shards=5, + sharded_keys=sharded_keys, + ) + + +@with_native_function_and +def gen_wrapper_registration(f: NativeFunction, key: str = "Default") -> str: + return WRAPPER_REGISTRATION.substitute( + unqual_operator_name_with_overload=f.func.name, + type_wrapper_name=type_wrapper_name(f, key), + class_type="VariableType", + ) + + +def gen_variable_type_func( + fn: NativeFunctionWithDifferentiabilityInfo, +) -> dict[str, list[str]]: + f = fn.func + result = {} + with native_function_manager(f): + name = cpp.name(f.func) + formals = gen_formals(f) + + if ( + fn.info is None + and str(f.func.name.name) not in RESET_GRAD_ACCUMULATOR + and get_base_name(f) not in DONT_REQUIRE_DERIVATIVE + and len(gen_differentiable_outputs(fn)) > 0 + and cpp.name(f.func) not in DONT_ENFORCE_SAME_TENSOR_IMPL_OR_STORAGE + and type_wrapper_name(f) not in DONT_ENFORCE_STORAGE_IMPL_USE_COUNT + and type_wrapper_name(f) not in DONT_ENFORCE_TENSOR_IMPL_USE_COUNT + ): + # NOTE: [ Registering AutogradNotImplemented boxed kernel ] + # + # When there is no derivatives.yaml entry, we register a generic boxed + # NotImplemented kernel to set grad_fn to be NotImplemented, so that forward + # proceeds as usual but an error is properly produced on backward. + # TODO: it would be nice to not have these special cases + # + # There are several cases where still let codegen handle it: + # 1) ops that need to reset grad accumulator (we let codegen handle this case + # because) the list is (currently) only accessible in Python. + # 2) User explicitly specifies DONT_REQUIRE_DERIVATIVE. This basically makes + # autograd a fallthrough with NDEBUG checks. This can be useful for when all + # outputs are integral. + # 3) When there are no differentiable outputs. This is similar to (2). + # 4) There are certain ops where we skip certain NDEBUG checks. this is similar + # to (1). + type_definition = "" + wrapper_registration = AUTOGRAD_NOT_IMPLEMENTED_REGISTRATION.substitute( + unqual_operator_name_with_overload=f.func.name + ) + result["type_derived_method_definitions_Default"] = [type_definition] + result["wrapper_registrations_Default"] = [wrapper_registration] + else: + if not fn.info: + key = "Default" + type_definition = METHOD_DEFINITION.substitute( + return_type=cpp.returns_type( + f.func.returns, symint=True + ).cpp_type(), + type_wrapper_name=type_wrapper_name(f, key), + type_definition_body=emit_body(fn, key), + formals=formals, + ) + wrapper_registration = gen_wrapper_registration(f, key) + result[f"type_derived_method_definitions_{key}"] = [type_definition] + result[f"wrapper_registrations_{key}"] = [wrapper_registration] + else: + for key in fn.info.keys(): + type_definition = METHOD_DEFINITION.substitute( + return_type=cpp.returns_type( + f.func.returns, symint=True + ).cpp_type(), + type_wrapper_name=type_wrapper_name(f, key), + type_definition_body=emit_body(fn, key), + formals=formals, + ) + wrapper_registration = gen_wrapper_registration(f, key) + result[f"type_derived_method_definitions_{key}"] = [type_definition] + result[f"wrapper_registrations_{key}"] = [wrapper_registration] + # See Note [Manual Backend kernels] + assert (name in MANUAL_BACKEND) == f.manual_kernel_registration + # If you want to register a kernel to Autograd, you must make the op abstract. + # In other words, this op must have dispatch section in native_functions.yaml. + if name in MANUAL_AUTOGRAD_AND_TRACER or ( + fn.info and any(info.has_derivatives for info in fn.info.values()) + ): + msg = ( + f"There's a formula for {name}(or its functional variant) in derivatives.yaml. " + f"It's required to add a dispatch section for it with explicit supported backends e.g CPU/CUDA " + f"or CompositeExplicitAutograd in native_functions.yaml. Please see " + f"https://github.com/pytorch/pytorch/tree/master/aten/src/ATen/native#choosing-the-right-dispatch-keyword " + f"for instructions to choose the right dispatch keyword." + ) + assert f.is_abstract, msg + + return result + + +_foreach_ops_without_differentiability_info = { + # No reference backward available due to the lack of `{maximum, minimum}(tensor, scalar)`. + ("_foreach_maximum", "Scalar"), + ("_foreach_maximum", "ScalarList"), + ("_foreach_minimum", "Scalar"), + ("_foreach_minimum", "ScalarList"), + # No reference backward available as addcdiv/addcmul don't support Tensor as scaling factor. + ("_foreach_addcdiv", "Tensor"), + ("_foreach_addcmul", "Tensor"), + ("_foreach_copy", ""), +} + +_foreach_ops_with_different_arity = { + # These ops lack `alpha` of scaling factor to applied to the right hand side argument. + ("_foreach_add", "Scalar"), + ("_foreach_add", "ScalarList"), + ("_foreach_sub", "Scalar"), + ("_foreach_sub", "ScalarList"), +} + + +@with_native_function_with_differentiability_info_and_key +def emit_body( + fn: NativeFunctionWithDifferentiabilityInfo, key: str = "Default" +) -> list[str]: + assert dispatch_strategy(fn) == "use_derived" + f = fn.func + info = fn.info[key] if fn.info else None + fw_derivatives = fn.fw_derivatives.get(key, []) if fn.fw_derivatives else [] + + name = cpp.name(f.func) + inplace = f.func.kind() == SchemaKind.inplace + is_out_fn = f.func.kind() == SchemaKind.out + returns_void = len(f.func.returns) == 0 + base_name = get_base_name(f) + view_info = get_view_info(f) + + is_foreach = name.startswith("_foreach") + is_inplace_foreach = is_foreach and inplace + if is_inplace_foreach: + inplace_foreacharg2refarg: dict[Argument, Argument] = {} + refargname2inplace_foreacharg: dict[str, Argument] = {} + base_name_and_overload_name = (f.func.name.name.base, f.func.name.overload_name) + if info is None: + assert ( + base_name_and_overload_name + in _foreach_ops_without_differentiability_info + ), f"{'.'.join(base_name_and_overload_name)} should have a differentiability info" + else: + assert ( + len(f.func.arguments.flat_non_out) + == len(info.func.func.arguments.flat_non_out) + ) or (base_name_and_overload_name in _foreach_ops_with_different_arity), ( + f"{'.'.join(base_name_and_overload_name)} has {len(f.func.arguments.flat_non_out)} args " + f"but the reference has {len(info.func.func.arguments.flat_non_out)}" + ) + for foreach_arg, ref_arg in zip( + f.func.arguments.flat_non_out, info.func.func.arguments.flat_non_out + ): + foreach_arg_type = foreach_arg.type + if isinstance(foreach_arg_type, ListType): + foreach_arg_type = foreach_arg_type.elem + assert foreach_arg_type == ref_arg.type + inplace_foreacharg2refarg[foreach_arg] = ref_arg + refargname2inplace_foreacharg[ref_arg.name] = foreach_arg + + def gen_differentiable_input( + arg: Argument | SelfArgument | TensorOptionsArguments, + ) -> DifferentiableInput | None: + if isinstance(arg, TensorOptionsArguments): + return None + a: Argument = arg.argument if isinstance(arg, SelfArgument) else arg + + # TODO: `cpp_type` is only to keep it byte-for-byte compatible with the old codegen, should remove. + # NB: This is not a clone of cpp.argument() - TensorOptionsArguments / faithful / binds are + # not handled properly as they are irrelevant for this codegen. + cpp_type = cpp.argument_type(a, binds=a.name, symint=True).cpp_type() + + if not is_differentiable(a.name, a.type, info): + return None + return DifferentiableInput( + name=a.name, + type=a.type, + cpp_type=cpp_type, + ) + + @with_native_function + def gen_differentiable_inputs(f: NativeFunction) -> list[DifferentiableInput]: + arguments = list(f.func.arguments.non_out) + if is_inplace_foreach and info is not None: + for i, arg in enumerate(f.func.arguments.flat_non_out): + if arg in inplace_foreacharg2refarg: + # note(crcrpar): From what I understand, what matters is only the name. + # Thus originally I only replace argument only when the names are different. + # TODO(crcrpar): Make it simpler. + mapped_arg = inplace_foreacharg2refarg[arg] + arguments[i] = Argument( + mapped_arg.name, + mapped_arg.type, + mapped_arg.default, + mapped_arg.annotation, + ) + return list(mapMaybe(gen_differentiable_input, arguments)) + + def find_args_with_derivatives( + differentiable_inputs: list[DifferentiableInput], + ) -> list[DifferentiableInput]: + """Find arguments that have derivative definitions""" + if info is None or not info.has_derivatives: + return differentiable_inputs + names = {name for d in info.derivatives for name in d.var_names} + differentiable = [arg for arg in differentiable_inputs if arg.name in names] + if len(differentiable) != len(names): + missing = names - {arg.name for arg in differentiable} + raise RuntimeError( + f"Missing arguments for derivatives: {missing} in {info.name}" + ) + return differentiable + + differentiable_inputs = gen_differentiable_inputs(f) + args_with_derivatives = find_args_with_derivatives(differentiable_inputs) + differentiable_outputs = gen_differentiable_outputs(fn, key) + + undifferentiable = (base_name in DONT_REQUIRE_DERIVATIVE) or ( + name in DONT_REQUIRE_DERIVATIVE + ) + + requires_derivative = ( + (not undifferentiable) + and (len(differentiable_inputs) > 0) + and ( + (len(differentiable_outputs) > 0) + # note(crcrpar): In-place foreach functions are a void function. + or is_inplace_foreach + ) + ) + + if ( + info is not None + and info.has_derivatives + and not requires_derivative + # out= ops are allowed to have zero returns which cause requires_derivative to be False + # we shouldn't error out though (out= ops for autograd just redispatch) + and len(f.func.returns) > 0 + ): + raise RuntimeError( + f"ERROR: derivative ignored for {name} -- specified an autograd function without derivative" + ) + + # note(crcrpar): In-place foreach functions do not support forward AD + if requires_derivative and len(fw_derivatives) > 0 and not is_inplace_foreach: + assert sum(len(derivative.var_names) for derivative in fw_derivatives) == len( + differentiable_outputs + ), ( + "Expected the number of forward derivatives implemented to match the " + "number of differentiable outputs. NB: This only applies when at least " + "one forward derivative is implemented. Not implementing any forward " + "derivatives is also okay, and we would require inputs to the op to " + "not have associated tangents in that case." + ) + + try_jit_decomposition = ( + requires_derivative + and len(fw_derivatives) == 0 + and (not modifies_arguments(f)) + and (not returns_void) + ) + + def emit_save_inputs() -> list[str]: + setup: list[str] = [] + if info is None or not info.has_derivatives: + return setup + + has_tensorlist_arg = any( + is_tensor_list_type(arg.type) for arg in args_with_derivatives + ) + + # We don't want to save tensors if we know that they will never be used + # when computing the derivative, so we add guards to those statements + def guard_for(arg: SavedAttribute) -> str | None: + assert info is not None + + # It's hard to determine the edge offset if we have TensorLists + # NOTE(crcrpar): in-place foreach functions' arguments include tensorlist + # but their derivatives don't use it, so let them bypass this check. + if has_tensorlist_arg and (not is_inplace_foreach): + return None + + # Empirical evaluation of the cases where we insert those guards in + # backward show that they are somewhat useless. E.g. there's no need + # to guard on some values captured from forward, because they had to + # require_grad if the backward function even gets executed. I don't + # have any good ideas for detecting those cases, so I simply disabled the + # checks. + if "backward" in info.name: + return None + + # If there's a single derivative we could compute, we already have + # a requires_grad check that is sufficient + if len(args_with_derivatives) <= 1: + return None + + # We really only care about trimming down the amount of tensors we save + if arg.nctype.type != BaseCType(tensorT): + return None + + # We want to emit simple guards, so we only allow that if checking one + # input is enough to determine whether we need that value + used_in = [d for d in info.derivatives if arg in d.saved_inputs] + assert len(used_in) > 0 + if len(used_in) != 1: + return None + derivative = used_in[0] + + # Case with multioutput formulas + # TODO: process all derivative formulas!!! + if len(derivative.var_names) != 1: + wrap_opt_if_start = derivative.formula.find( + f"wrap_opt_if({arg.nctype.name}" + ) + if wrap_opt_if_start == -1: + return None + + wrap_opt_if_match = re.match( + rf"wrap_opt_if\({arg.nctype.name},(.*?)\)", + derivative.formula[wrap_opt_if_start:], + ) + assert wrap_opt_if_match is not None + + # Condition is between 'wrap_opt_if(var_name,' and ')'. + condition_slice = slice(len(rf"wrap_opt_if\({arg.nctype.name},"), -1) + wrap_opt_if_condition = wrap_opt_if_match.group(0)[ + condition_slice + ].strip() + # replace 'grad_input_mask[num]' with 'grad_fn->should_compute_output(num)' + wrap_opt_if_condition = re.sub( + r"grad_input_mask\[(\d+)\]", + r"grad_fn->should_compute_output(\1)", + wrap_opt_if_condition, + ) + return f"{wrap_opt_if_condition}" + + # Figure out the offset of the edge that uses this variable + derivative_var_name = derivative.var_names[0] + for edge_off, a in enumerate(args_with_derivatives): + if a.name == derivative_var_name: + break + else: + raise AssertionError + return f"grad_fn->should_compute_output({edge_off})" + + if is_inplace_foreach: + save_input_stmts = save_variables(info.all_saved_inputs, False, guard_for) + if save_input_stmts: + setup.append( + LOOP_OVER_VECTOR_OF_GRAD_FNS.substitute( + preamble="", statements=save_input_stmts + ) + ) + else: + setup.extend(save_variables(info.all_saved_inputs, False, guard_for)) + for arg in args_with_derivatives: + if is_tensor_list_type(arg.type): + setup.append(f"grad_fn->{arg.name}_size_ = {arg.name}.size();") + return setup + + def setup_derivative(differentiable_inputs: list[DifferentiableInput]) -> list[str]: + body: list[str] = [] + if is_out_fn: + # For out functions, ensure that no input or output requires grad + body.append(DECLARE_GRAD_FN.substitute(op="Node")) + body.append( + SETUP_NONE_REQUIRES_GRAD.substitute( + base_name=base_name, + args_to_check=[arg.name for arg in differentiable_inputs], + ) + ) + body.append( + SETUP_NONE_REQUIRES_GRAD.substitute( + base_name=base_name, + args_to_check=[arg.name for arg in differentiable_outputs], + ) + ) + return body + + op = info.op if info is not None and info.has_derivatives else "NotImplemented" + setup = [] + if not is_inplace_foreach: + setup.extend( + ASSIGN_GRAD_FN.substitute( + op=op, + op_ctor="" + if info is not None and info.has_derivatives + else f'"{cpp.name(f.func)}"', + args_with_derivatives=[arg.name for arg in args_with_derivatives], + ).split("\n") + ) + else: + # note(crcrpar): Assuming in-place foreach function's self_arg is always TensorList. + list_like_arg = "self" + args = [arg.name for arg in args_with_derivatives] + for i, arg in enumerate(args): + if is_inplace_foreach and info is not None: + if arg in refargname2inplace_foreacharg: + foreach_arg = refargname2inplace_foreacharg[arg] + args[i] = foreach_arg.name + ( + "[i]" if isinstance(foreach_arg.type, ListType) else "" + ) + else: + if arg == list_like_arg: + args[i] = arg + "[i]" + setup.extend( + ASSIGN_VECTOR_OF_GRAD_FN.substitute( + op=op, + op_ctor="" + if info is not None and info.has_derivatives + else f'"{cpp.name(f.func)}"', + args_with_derivatives=args, + irange=f"{list_like_arg}.size()", + ).split("\n") + ) + setup.extend(emit_save_inputs()) + + body.extend( + emit_check_no_requires_grad(differentiable_inputs, args_with_derivatives) + ) + declare_grad_fn_template = ( + DECLARE_GRAD_FN if not is_inplace_foreach else DECLARE_VECTOR_OF_GRAD_FN + ) + body.append(declare_grad_fn_template.substitute(op=op)) + body.append(SETUP_DERIVATIVE.substitute(setup=setup)) + return body + + def emit_check_if_in_complex_autograd_allowlist() -> list[str]: + body: list[str] = [] + if base_name in GRADIENT_IMPLEMENTED_FOR_COMPLEX: + return body + for arg in differentiable_outputs: + name = arg.name + # TODO: should be `arg.type.is_tensor_like()`? + if arg.cpp_type == "at::Tensor" or arg.cpp_type in TENSOR_LIST_LIKE_CTYPES: + body.append(f'throw_error_for_complex_autograd({name}, "{base_name}");') + return body + + def emit_check_no_requires_grad( + tensor_args: list[DifferentiableInput], + args_with_derivatives: list[DifferentiableInput], + ) -> list[str]: + """Checks that arguments without derivatives don't require grad""" + body: list[str] = [] + for arg in tensor_args: + if arg in args_with_derivatives: + continue + arg_name = arg.name + if info and arg_name in info.non_differentiable_arg_names: + continue + if arg_name == "output": + # Double-backwards definitions sometimes take in 'input' and + # 'output', but only define the derivative for input. + continue + body.append(f'check_no_requires_grad({arg_name}, "{arg_name}", "{name}");') + return body + + def emit_original_self_definition() -> list[str]: + body: list[str] = [] + if inplace: + if is_inplace_foreach: + body.append( + "std::vector<::std::optional> original_selfs(self.size());" + ) + else: + body.append("::std::optional original_self;") + + all_forward_grad_cond = [] + for derivative in fw_derivatives: + if derivative.required_original_self_value: + all_forward_grad_cond.append( + get_any_has_forward_grad_name(derivative.var_names) + ) + + if all_forward_grad_cond: + if not is_inplace_foreach: + body.append(f'if ({" || ".join(all_forward_grad_cond)}) {{') + body.append(" original_self = self.clone();") + body.append("}") + else: + current_all_forward_grad_cond = [ + f"{cond}[i]" for cond in all_forward_grad_cond + ] + body.append("for (const auto& i : c10::irange(self.size())) {") + body.append( + f" if ({' || '.join(current_all_forward_grad_cond)}) {{" + ) + body.append(" original_selfs[i] = self[i].clone();") + body.append(" }") + body.append("}") + + return body + + def save_variables( + saved_variables: Sequence[SavedAttribute], + is_output: bool, + guard_for: Callable[[SavedAttribute], str | None] = lambda name: None, + ) -> Sequence[str]: + # assign the saved variables to the generated grad_fn + stmts: list[str] = [] + for arg in sorted(saved_variables, key=lambda sa: str(sa.nctype.name)): + name = ( + arg.nctype.name.name + if isinstance(arg.nctype.name, SpecialArgName) + else arg.nctype.name + ) + foreacharg: Argument | None = None + is_foreacharg_list_type: bool = False + type = arg.nctype.type + expr = arg.expr + stmts_prepend = None + if is_inplace_foreach and info is not None: + # todo(crcrpar): See if we can add some check e.g. `assert foreacharg is not None`. + # for now the example assert would fail. + name_to_query = name.split("_scalar_type")[0] + if name_to_query in refargname2inplace_foreacharg: + foreacharg = refargname2inplace_foreacharg[name_to_query] + is_foreacharg_list_type = isinstance(foreacharg.type, ListType) + if foreacharg is not None: + name_in_expr = ( + f"{foreacharg.name}{'[i]' if is_foreacharg_list_type else ''}" + ) + src_name = name + if "_scalar_type" in src_name: + split_src_name = src_name.split("_scalar_type") + assert len(split_src_name) == 2 + src_name = split_src_name[0] + expr = expr.replace(src_name, name_in_expr) + if ( + type == BaseCType(tensorT) + or type == OptionalCType(BaseCType(tensorT)) + or type == MutRefCType(OptionalCType(BaseCType(tensorT))) + or (is_output and type == BaseCType(scalarT)) + ): + # note(crcrpar): Here `expr` is generated from scratch, `arg.expr` is ignored. + var = name + name += "_" + if var == "self" and inplace: + original_self_var = ( + "original_self" + if not is_inplace_foreach + else "original_selfs[i]" + ) + self_var = var if not is_inplace_foreach else var + "[i]" + stmts_prepend = f"if (!{original_self_var}.has_value()) {original_self_var} = {self_var}.clone()" + var = f"{original_self_var}.value()" + assert not is_output + if inplace and is_output: + assert name == "result_" + var = ( + "self[i]" + if is_inplace_foreach or is_foreacharg_list_type + else "self" + ) + is_inplace_view = f"{var}.is_view()" + expr = f"SavedVariable({var}, {str(is_output).lower()}, {is_inplace_view})" + else: + expr = f"SavedVariable({var}, {str(is_output).lower()})" + if foreacharg is not None and "original_selfs" not in expr: + expr = expr.replace(src_name, name_in_expr) + elif ( + type == BaseCType(tensorListT) + or type == ListCType(OptionalCType(BaseCType(tensorT))) + or type == BaseCType(iTensorListRefT) + or type == VectorCType(BaseCType(tensorT)) + ): + # See Note [nuanced return type of out-of-place foreach functions] + if type == VectorCType(BaseCType(tensorT)): + assert is_foreach and is_output + expr = f"make_saved_variable_list({name}, {str(is_foreach and is_output).lower()})" + name += "_" + elif type == BaseCType(intArrayRefT): + expr = expr + ".vec()" + elif type == BaseCType(symIntArrayRefT): + expr = expr + ".vec()" + elif type == BaseCType(stringT): + expr = f"std::string({expr})" + elif type == OptionalCType(BaseCType(stringT)): + expr = f"{expr}.has_value() ? ::std::optional(std::string({expr}.value())) : ::std::nullopt" + elif type == ArrayRefCType( + elem=BaseCType(type=BaseCppType(ns="at", name="Scalar")) + ): + expr = expr + ".vec()" + + guard = guard_for(arg) + if guard is None: + if stmts_prepend: + stmts.append(f"{stmts_prepend};") + stmts.append(f"grad_fn->{name} = {expr};") + else: + stmts.append(f"if ({guard}) {{") + if stmts_prepend: + stmts.append(f" {stmts_prepend};") + stmts.append(f" grad_fn->{name} = {expr};") + stmts.append("}") + return stmts + + # Generates a Dispatcher::redispatch() call into the dispatcher. We do this mainly for performance reasons: + # - Pre-compute the full DispatchKeySet. This saves the dispatcher from having to read from TLS. + # - redispatch() avoids a redundant call to RecordFunction, which was already called right before + # we entered this autograd kernel. + def emit_dispatch_call( + f: NativeFunction, input_base: str, unpacked_args: Sequence[str] + ) -> str: + """Dispatch call via function in a namespace or method on Tensor.""" + # code-generated autograd kernels plumb and recompute dispatch keys directly through the kernel for performance. + # Ops also always have a function variant of the redispatch API. + # See Note [Plumbing Keys Through The Dispatcher] for details. + dispatch_key_set = "ks & c10::after_autograd_keyset" + call = CALL_REDISPATCH.substitute( + api_name=cpp.name( + f.func, + faithful_name_for_out_overloads=True, + symint_overload=f.func.has_symint(), + ), + unpacked_args=[dispatch_key_set] + list(unpacked_args), + ) + return call + + def wrap_output( + f: NativeFunction, unpacked_bindings: list[Binding], var: str + ) -> str: + call = "" + rhs_value: str | None = None + if not any(r.type.is_tensor_like() for r in f.func.returns): + rhs_value = var + else: + rhs_value = f"std::move({var})" + assert rhs_value is not None + call += ASSIGN_RETURN_VALUE.substitute( + return_values=tie_return_values(f), rhs_value=rhs_value + ) + return call + + def check_tensorimpl_and_storage( + call: str, unpacked_bindings: list[Binding] + ) -> str: + # See NOTE [ TensorImpl and Storage Pointer Sanity Checks ] + stmts_before_call: list[str] = [] + stmts_after_call: list[str] = [] + + if cpp.name(f.func) in DONT_ENFORCE_SAME_TENSOR_IMPL_OR_STORAGE: + return call + + # Check properties of inputs (enforce (1)) + for unpacked_binding in unpacked_bindings: + arg = unpacked_binding.name + noref_cpp_type = unpacked_binding.nctype.type.remove_const_ref() + if noref_cpp_type == BaseCType(tensorListT) or noref_cpp_type == BaseCType( + iTensorListRefT + ): + stmts_before_call += [ + SAVE_TENSORLIST_STORAGE.substitute(tensorlist_name=arg), + SAVE_TENSORLIST_IMPL.substitute(tensorlist_name=arg), + ] + stmts_after_call += [ + ENFORCE_SAME_TENSORLIST_STORAGE.substitute(tensorlist_name=arg), + ENFORCE_SAME_TENSORLIST_IMPL.substitute(tensorlist_name=arg), + ] + elif noref_cpp_type == ListCType(OptionalCType(BaseCType(tensorT))): + stmts_before_call += [ + SAVE_OPTIONALTENSORLIST_STORAGE.substitute(tensorlist_name=arg), + SAVE_OPTIONALTENSORLIST_IMPL.substitute(tensorlist_name=arg), + ] + stmts_after_call += [ + ENFORCE_SAME_OPTIONALTENSORLIST_STORAGE.substitute( + tensorlist_name=arg + ), + ENFORCE_SAME_OPTIONALTENSORLIST_IMPL.substitute( + tensorlist_name=arg + ), + ] + elif noref_cpp_type == BaseCType(tensorT): + stmts_before_call += [ + SAVE_TENSOR_STORAGE.substitute(tensor_name=arg), + SAVE_TENSOR_IMPL.substitute(tensor_name=arg), + ] + stmts_after_call += [ + ENFORCE_SAME_TENSOR_STORAGE.substitute( + tensor_name=arg, out_tensor_name=arg + ), + ENFORCE_SAME_TENSOR_IMPL.substitute(tensor_name=arg), + ] + + assert (stmts_before_call and stmts_after_call) or ( + not stmts_before_call and not stmts_after_call + ) + + # Check properties of outputs (enforce (2), (3)) + if f.func.kind() not in (SchemaKind.inplace, SchemaKind.out): + base_name = f.func.name.name.base # TODO: should be str(f.func.name.name)? + aliased_arg_name = ALL_VIEW_FUNCTIONS.get(base_name, None) + if aliased_arg_name is not None: + aliased_arg_name = unpacked_name(aliased_arg_name) + for i, (ret, ret_name) in enumerate( + zip(f.func.returns, cpp.return_names(f)) + ): + noref_cpp_type = cpp.return_type(ret, symint=True).remove_const_ref() + if noref_cpp_type == BaseCType(tensorT): + if aliased_arg_name is not None: + assert ( + i == 0 + ), "Expect non-CompositeImplicitAutograd view function {base} to return single output" + stmts_after_call += [ + ENFORCE_SAME_TENSOR_STORAGE.substitute( + tensor_name=aliased_arg_name, out_tensor_name=ret_name + ) + ] + else: + if ( + type_wrapper_name(f) + not in DONT_ENFORCE_STORAGE_IMPL_USE_COUNT + ): + stmts_after_call += [ + ENFORCE_TENSOR_STORAGE_USE_COUNT_EQUALS_ONE.substitute( + tensor_name=ret_name, fn_name=type_wrapper_name(f) + ) + ] + + if type_wrapper_name(f) not in DONT_ENFORCE_TENSOR_IMPL_USE_COUNT: + stmts_after_call += [ + ENFORCE_TENSOR_IMPL_USE_COUNT_LT_OR_EQ_ONE.substitute( + tensor_name=ret_name, fn_name=type_wrapper_name(f) + ) + ] + + # Currently we don't have any functions that return the following types, but + # we should update the checks once we do + elif noref_cpp_type == ListCType(OptionalCType(BaseCType(tensorT))): + raise AssertionError( + f"Please add use_count checks for {noref_cpp_type}" + ) + elif noref_cpp_type == BaseCType(tensorListT): + raise AssertionError( + f"Please add use_count checks for {noref_cpp_type}" + ) + + if stmts_before_call and stmts_after_call: + call = ( + RUN_ONLY_IN_DEBUG_MODE.substitute(statements=stmts_before_call) + + call + + RUN_ONLY_IN_DEBUG_MODE.substitute(statements=stmts_after_call) + ) + return call + + def emit_call( + f: NativeFunction, unpacked_bindings: list[Binding], try_jit_decomposition: bool + ) -> str: + # We only care about adding `at::AutoDispatchBelowAutograd` guard for non-variable dispatch + # (which corresponds to 'use_derived' strategy). The purpose of this guard is to make sure + # the baseType operations still dispatch to non-Variable type, even if the arguments passed + # in are now Variables. + # See NOTE [ Treating Variables as non-Variables in type dispatch ] for details. + unpacked_args = [b.name for b in unpacked_bindings] + base_type_call = emit_dispatch_call(f, "self_", unpacked_args) + + if get_view_info(f) is not None or modifies_arguments(f): + guard = "at::AutoDispatchBelowAutograd guard;" + else: + guard = "at::AutoDispatchBelowADInplaceOrView guard;" + + any_has_forward_grad = ( + get_any_has_fw_grad_cond(derivative=None) + if requires_derivative + else "false" + ) + return_types = ", ".join( + [cpp.return_type(a, symint=True).cpp_type() for a in f.func.returns] + ) + if len(f.func.returns) > 1: + return_types = f"std::tuple<{return_types}>" + + arg_names = [ + a.name + for a in cpp.arguments( + f.func.arguments, + faithful=True, + symint=True, + method=False, + cpp_no_default_args=set(), + ) + ] + + if not modifies_arguments(f) and not returns_void: + if try_jit_decomposition: + call = DISPATCH_TO_NON_VAR_TYPE_WITH_TMP_RETURN_VALUES_JVP_DECOMP.substitute( + base_type_call=base_type_call, + tmp_var=TMP_VAR, + guard=guard, + any_has_forward_grad=any_has_forward_grad, + op_name=cpp.name(f.func), + op_overload=f.func.name.overload_name, + return_types=return_types, + arg_names=arg_names, + ) + else: + call = DISPATCH_TO_NON_VAR_TYPE_WITH_TMP_RETURN_VALUES.substitute( + base_type_call=base_type_call, + tmp_var=TMP_VAR, + guard=guard, + ) + + call += wrap_output(f, unpacked_bindings, TMP_VAR) + else: + assert not try_jit_decomposition + call = DISPATCH_TO_NON_VAR_TYPE_WITHOUT_RETURN_VALUES.substitute( + base_type_call=base_type_call, guard=guard + ) + call = check_tensorimpl_and_storage(call, unpacked_bindings) + return call + + def emit_history() -> str: + fn = "rebase" if modifies_arguments(f) and view_info is None else "set" + output_names = [r.name for r in differentiable_outputs] + # TODO: flatten allocates a std::vector, which could be expensive + outs = CodeTemplate("flatten_tensor_args( ${outs} )").substitute( + outs=output_names if not is_inplace_foreach else "self" + ) + if not is_inplace_foreach: + return SET_HISTORY.substitute(fn=fn, differentiable_outputs=outs) + else: + return LOOP_OVER_VECTOR_OF_GRAD_FNS.substitute( + preamble=( + f"auto differentiable_outputs = {outs};\n" + f"TORCH_INTERNAL_ASSERT(differentiable_outputs.size() == grad_fns.size());" + ), + statements=f"{fn}_history(differentiable_outputs[i], grad_fns[i]);", + ) + + def emit_save_outputs() -> str: + if is_out_fn: + # out functions don't currently support differentiation + return "" + if info is not None and info.has_derivatives: + stmts = save_variables(info.all_saved_outputs, True) + if len(stmts) == 0: + return "" + if not is_inplace_foreach: + return CONDITIONAL.substitute(cond="grad_fn", statements=stmts) + else: + return LOOP_OVER_VECTOR_OF_GRAD_FNS.substitute( + preamble="", statements=stmts + ) + return "" + + def emit_any_requires_grad() -> list[str]: + extra_condition = "" + if info and info.output_differentiability_conditions: + assert len(info.output_differentiability_conditions) == 1 + extra_condition = f"_any_requires_grad &= ({info.output_differentiability_conditions[0]});" + names_of_args_with_derivatives = [arg.name for arg in args_with_derivatives] + if is_inplace_foreach and info is not None: + for i, arg in enumerate(names_of_args_with_derivatives): + for f_arg, r_arg in inplace_foreacharg2refarg.items(): + if arg == r_arg.name: + names_of_args_with_derivatives[i] = f_arg.name + return [ + SETUP_ANY_REQUIRES_GRAD.substitute( + args_with_derivatives=names_of_args_with_derivatives, + extra_differentiability_conditions=extra_condition, + ) + ] + + def get_any_has_forward_grad_name(var_names: tuple[str, ...]) -> str: + if len(var_names) == 1: + return f"_any_has_forward_grad_{var_names[0]}" + else: + return f'_any_has_forward_grad_{"_".join(var_names)}' + + def emit_any_has_forward_grad() -> list[str]: + content: list[str] = [] + if not is_foreach: + for derivative in fw_derivatives: + requires_fw_grad = get_any_has_fw_grad_cond(derivative=derivative) + if info and info.output_differentiability_conditions: + assert len(info.output_differentiability_conditions) == 1 + requires_fw_grad = f"({info.output_differentiability_conditions[0]}) && {requires_fw_grad}" + content.append( + f"[[maybe_unused]] auto {get_any_has_forward_grad_name(derivative.var_names)} = {requires_fw_grad};" + ) + else: + for derivative in fw_derivatives: + bool_vector_name = get_any_has_forward_grad_name(derivative.var_names) + cur_derivative_conditions = [] + for inp in differentiable_inputs: + if derivative.required_inputs_fw_grad is None: + continue + if inp.name not in derivative.required_inputs_fw_grad: + continue + inp_name = ( + inp.name + if not inplace + else refargname2inplace_foreacharg[inp.name].name + ) + inp_type = ( + inp.type + if not inplace + else refargname2inplace_foreacharg[inp.name].type + ) + is_list_type = is_tensor_list_type(inp_type) + if is_list_type: + if inp_name != "self": + content.append( + FW_DERIVATIVE_SIZE_CHECK_TEMPLATE.substitute( + inp_name=inp_name + ) + ) + cur_derivative_conditions.append( + FW_DERIVATIVE_CHECK_TEMPLATE.substitute( + req_inp=inp_name + "[i]" + ) + ) + else: + cur_derivative_conditions.append( + FW_DERIVATIVE_CHECK_TEMPLATE.substitute(req_inp=inp_name) + ) + + content.append(f"std::vector {bool_vector_name}(self.size());") + content.append("for (const auto& i : c10::irange(self.size())) {") + content.append( + f" {bool_vector_name}[i] = {' || '.join(cur_derivative_conditions)};" + ) + content.append("}") + return content + + def emit_check_inplace() -> list[str]: + if not inplace: + return [] + return [ + f"check_inplace({arg.name}, _any_requires_grad);" + for arg in differentiable_outputs + ] + + def emit_fw_derivatives() -> list[str]: + content: list[str] = [] + fw_grad_setters: list[str] = [] + for derivative in fw_derivatives: + res = derivative.var_names + if f.func.name.name.inplace: + assert ( + len(res) == 1 + ), "Expected number of outputs to be 1 if function is inplace" + # TODO update this when inplace namings are unified + res = ("self",) + + assert derivative.required_inputs_fw_grad is not None + + unpacked_arguments = "" + for inp in differentiable_inputs: + inp_name = inp.name + is_input_tensorlist = is_foreach and is_tensor_list_type( + inp.type + if not inplace + else refargname2inplace_foreacharg[inp.name].type + ) + input_suffix = "[i]" if is_input_tensorlist else "" + if is_inplace_foreach: + if inp.name in refargname2inplace_foreacharg: + inp_name = refargname2inplace_foreacharg[inp.name].name + zeros_fn = ( + "zeros_symint" + if inplace and inp.name == "self" + else "_efficientzerotensor_symint" + ) + if inp.name in derivative.required_inputs_fw_grad: + unpacked_arguments += ( + FW_DERIVATIVE_DEFINED_GRAD_TEMPLATE.substitute( + inp_name=inp.name, + inp=inp_name + input_suffix, + zeros_fn=zeros_fn, + ) + ) + if inp.name in (derivative.required_inputs_primal or []): + unpacked_arguments += ( + FW_DERIVATIVE_DEFINED_PRIMAL_TEMPLATE.substitute( + inp_name=inp.name, + inp=inp_name + input_suffix, + ) + ) + if derivative.required_original_self_value: + input_suffix = "s[i]" if is_inplace_foreach else "" + unpacked_arguments += FW_DERIVATIVE_DEFINED_GRAD_TEMPLATE.substitute( + inp_name="original_self", + inp="original_self" + input_suffix, + zeros_fn=zeros_fn, + ) + unpacked_arguments += FW_DERIVATIVE_DEFINED_PRIMAL_TEMPLATE.substitute( + inp_name="original_self", + inp="original_self" + input_suffix, + ) + elif inplace and derivative.is_reusing_outplace_formula: + # The gradient wasn't already cloned, do it if grad mode is enabled + unpacked_arguments += ( + "self_t = GradMode::is_enabled() ? self_t.clone() : self_t;" + ) + + if inplace: + is_inplace_str = "true" + else: + is_inplace_str = "false" + + requires_fw_grad = get_any_has_forward_grad_name(derivative.var_names) + + if all( + (isinstance(var_type, BaseType) and var_type.is_tensor_like()) + for var_type in derivative.var_types + ): + # Is there a way to get from BaseType to BaseCType + if len(derivative.var_types) == 1: + opt_res_grad_type = OptionalCType(BaseCType(tensorT)).cpp_type() + if not is_foreach: + fw_grad_setters.append( + FW_DERIVATIVE_SETTER_TENSOR.substitute( + out_arg=res[0], is_inplace=is_inplace_str + ) + ) + else: + assert res[0] == ("result" if not inplace else "self") + fw_grad_setters.append( + FW_DERIVATIVE_SETTER_TENSOR_FOREACH.substitute( + out_arg=res[0], is_inplace=is_inplace_str + ) + ) + requires_fw_grad += f" && ({derivative.var_names[0]}.defined())" + else: + tuple_type = TupleCType( + [BaseCType(tensorT)] * len(derivative.var_types) + ) + opt_res_grad_type = OptionalCType(tuple_type).cpp_type() + for idx, single_res in enumerate(res): + fw_grad_setters.append( + FW_DERIVATIVE_SETTER_MULTI_OUTPUT.substitute( + idx=idx, all_res="_".join(res), out_arg=single_res + ) + ) + elif ( + isinstance(derivative.var_types[0], ListType) + and derivative.var_types[0].is_tensor_like() + ): + assert ( + len(derivative.var_types) == 1 + ), "Expected number of outputs to be 1 if function returns ListType" + if not is_foreach: + opt_res_grad_type = OptionalCType( + VectorCType(BaseCType(tensorT)) + ).cpp_type() + fw_grad_setters.append( + FW_DERIVATIVE_SETTER_TENSOR_LIST.substitute( + out_arg=res[0], is_inplace=is_inplace_str + ) + ) + else: + # TODO(crcrpar): Should this (= the foreach specific logic) be refactored somehow? + # Only out-place foreach functions that have entries in `tools/autograd/derivatives.yaml` + # can reach here. + opt_res_grad_type = OptionalCType(BaseCType(tensorT)).cpp_type() + fw_grad_setters.append( + FW_DERIVATIVE_SETTER_TENSOR_FOREACH.substitute( + out_arg=res[0], is_inplace=is_inplace_str + ) + ) + else: + raise RuntimeError("Unsupported output type for forward derivative") + + if not is_foreach: + fw_grad_opt_definition = f"{opt_res_grad_type} {'_'.join(res)}_new_fw_grad_opt = ::std::nullopt;" + # View ops create fw_grad that already is a view of the base's fw_grad so just use that + content.append( + FW_DERIVATIVE_TEMPLATE.substitute( + fw_grad_opt_definition=fw_grad_opt_definition, + requires_fw_grad=requires_fw_grad, + formula=derivative.formula, + out_arg="_".join(res), + unpacked_arguments=unpacked_arguments, + ) + ) + else: + # note(crcrpar): Assuming `self` is TensorList. + fw_grad_opt_definition = ( + f"std::vector<{opt_res_grad_type}> {'_'.join(res)}_new_fw_grad_opts" + "(self.size(), ::std::nullopt);" + ) + foreach_forward_grad_formula = derivative.formula + _foreach_arg: Argument | DifferentiableInput + if inplace: + for _foreach_arg, _ref_arg in inplace_foreacharg2refarg.items(): + # note(crcrpar): Massage only Scalar and ArrayRef here. + if not ( + is_tensor_type(_foreach_arg.type) + or is_tensor_list_type(_foreach_arg.type) + ): + pattern = _foreach_arg.name + if isinstance(_foreach_arg.type, ListType): + pattern += "[i]" + foreach_forward_grad_formula = ( + foreach_forward_grad_formula.replace( + _ref_arg.name, pattern + ) + ) + else: + if ( + "result" in foreach_forward_grad_formula + and "result[i]" not in foreach_forward_grad_formula + ): + foreach_forward_grad_formula = ( + foreach_forward_grad_formula.replace("result", "result[i]") + ) + + content.append( + FW_DERIVATIVE_FOREACH_TEMPLATE.substitute( + fw_grad_opt_definition=fw_grad_opt_definition, + vector_of_optional_tensor=f"{'_'.join(res)}_new_fw_grad_opts", + any_has_forward_grad_for_current_index=" || ".join( + get_any_has_forward_grad_name(derivative.var_names) + "[i]" + for derivative in fw_derivatives + ), + formula=foreach_forward_grad_formula, + unpacked_arguments=unpacked_arguments, + ) + ) + + # Set all the grads at the end to avoid: https://github.com/pytorch/pytorch/issues/67367 + content.append("\n".join(fw_grad_setters)) + return content + + def get_any_has_fw_grad_cond(derivative: ForwardDerivative | None) -> str: + # + # Produces a condition string (e.g, "isFwGradDefined(grad_output) || isFwGradDefined(output)") + # + if derivative is None: + # (1) If a derivative is NOT provided, cond will check fw_grad of ALL differentiable inputs + # - Used in the out_fn case when we want to forbid fw derivatives + # - Used in the case where the fw_derivative is not defined, but we want + # To check if there is a decomposition registered for jvp + to_check: list[str] = [] + for inp in list( + mapMaybe( + gen_differentiable_input, + f.func.arguments.non_out + list(f.func.arguments.out), # type: ignore[operator] + ) + ): + if is_tensor_type(inp.type): + to_check.append( + FW_DERIVATIVE_CHECK_TEMPLATE.substitute(req_inp=inp.name) + ) + elif is_tensor_list_type(inp.type): + to_check.append( + FW_DERIVATIVE_TENSORLIST_CHECK_TEMPLATE.substitute( + req_inp=inp.name + ) + ) + else: + raise RuntimeError( + f'Unsupported input type for "{name}" when forbidding forward AD usage.' + ) + return f'({" || ".join(to_check)})' + else: + # (2) If derivative is provided, use that information to determine which inputs + # to check fw_grad for + assert derivative.required_inputs_fw_grad is not None + + if len(derivative.required_inputs_fw_grad) == 0: + # Handle functions like stack + # For these, we don't unpack anything and always call the user function + if not ( + len(differentiable_inputs) == 1 + and is_tensor_list_type(differentiable_inputs[0].type) + ): + raise RuntimeError( + f'No differentiable input to "{name}" is a differentiable Tensor (as the provided ' + "forward AD formula does not use any input tangent) even though a forward gradient " + "formula has been defined for it. This case should only happen for function that " + "take a single TensorList as input. All other cases are not supported right now." + ) + any_has_fw_grad = "true" + else: + any_has_fw_grad = " || ".join( + [ + ( + FW_DERIVATIVE_TENSORLIST_CHECK_TEMPLATE + if is_tensor_list_type(inp.type) + else FW_DERIVATIVE_CHECK_TEMPLATE + ).substitute(req_inp=inp.name) + for inp in differentiable_inputs + if inp.name in derivative.required_inputs_fw_grad + ] + ) + any_has_fw_grad = f"({any_has_fw_grad})" + + return any_has_fw_grad + + def emit_forbid_fw_derivatives(is_out_fn: bool = False) -> str: + if is_out_fn: + msg = "because it is an out= function" + else: + msg = ( + "because it has not been implemented yet.\\nPlease file an issue " + "to PyTorch at https://github.com/pytorch/pytorch/issues/new?template=feature-request.yml " + "so that we can prioritize its implementation." + ) + cond = get_any_has_fw_grad_cond(derivative=None) + return ( + FW_DERIVATIVE_FORBID_TEMPLATE.substitute(cond=cond, name=name, msg=msg) + if cond != "" + else "" + ) + + body: list[str] = [] + unpack_args_stats, unpacked_bindings = unpack_args(f) + + body.extend(unpack_args_stats) + if requires_derivative: + body.extend(emit_any_requires_grad()) + body.extend(emit_any_has_forward_grad()) + body.extend(emit_check_inplace()) + body.extend(emit_original_self_definition()) + body.extend(setup_derivative(differentiable_inputs)) + + body.append(emit_call(f, unpacked_bindings, try_jit_decomposition)) + if requires_derivative: + # set_flags has to appear after version_counter, because rebase_history + # requires that the counter is incremented before it is called + body.append(emit_history()) + body.extend(emit_check_if_in_complex_autograd_allowlist()) + + if is_out_fn: + body.append(emit_forbid_fw_derivatives(is_out_fn=True)) + else: + if requires_derivative and not try_jit_decomposition: + if len(fw_derivatives) > 0: + body.extend(emit_fw_derivatives()) + else: + body.append(emit_forbid_fw_derivatives()) + + if requires_derivative: + # Save only after the forward AD has been set up + body.append(emit_save_outputs()) + + if str(f.func.name.name) in RESET_GRAD_ACCUMULATOR: + # `inplace` implies that there is exactly one output named `self`, + # so we can keep the generated code easy. If you need to + # `reset_grad_accumulator` in an operator that's not `inplace`, you can + # remove this assert but the code generation will get more elaborate + assert inplace + body.append("reset_grad_accumulator(self);") + if not returns_void: + body.append(f"return {get_return_value(f)};") + return body diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_view_funcs.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_view_funcs.py new file mode 100644 index 0000000000000000000000000000000000000000..1cad03cb5cd0afd5fa8ee3cab96618470a2f0b9c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/gen_view_funcs.py @@ -0,0 +1,340 @@ +# Generates ViewFuncs.h/cpp +# +# NOTE: If any changes are being made to the ViewFunc codegen please also check +# if updates are needed in torch/csrc/autograd/autograd_not_implemented_fallback.cpp +# The fallback is expected to mimic this codegen, so we should keep the two in sync. + +from __future__ import annotations + +from typing import TYPE_CHECKING + +import torchgen.api.dispatcher as dispatcher +from torchgen.api.translate import translate +from torchgen.api.types import ( + BaseCType, + Binding, + NamedCType, + SymIntT, + tensorT, + VectorCType, +) +from torchgen.code_template import CodeTemplate +from torchgen.model import Argument, NativeFunction, OptionalType +from torchgen.utils import FileManager + +from .gen_inplace_or_view_type import ( + CALL_DISPATCH, + extract_bindings, + get_view_info, + modifies_arguments, + use_derived, +) + + +if TYPE_CHECKING: + from torchgen.api.autograd import NativeFunctionWithDifferentiabilityInfo + + +FUNCTION_DECLARATION = CodeTemplate( + """\ +#define ${uppercase_op}_AVAILABLE +struct ${op} : public ${superclass} { + ${op}(${constructor_args}) ${initializer_list} + {} + virtual ~${op}() override = default; + virtual std::vector get_symints() const override; + virtual size_t num_symints() const override; + virtual std::vector get_tensors() const override; + virtual size_t num_tensors() const override; + virtual at::Tensor operator()(const at::Tensor&) const override; + virtual std::unique_ptr clone_and_set( + std::optional> = ::std::nullopt, + std::optional> = ::std::nullopt) const override; + +protected: + virtual void set_symints(std::vector) override; + virtual void set_tensors(std::vector) override; + +private: + ${state} +}; + +""" +) + +FUNCTION_DEFINITION = CodeTemplate( + """\ +std::vector ${op}::get_symints() const { + ${get_symints} +} + +size_t ${op}::num_symints() const { + return static_cast(${num_symints}); +} + +void ${op}::set_symints(std::vector ${symints_vec}) { + TORCH_INTERNAL_ASSERT(${symints_vec}.size() == num_symints()); + ${set_symints} +} + +std::vector ${op}::get_tensors() const { + ${get_tensors} +} + +size_t ${op}::num_tensors() const { + return static_cast(${num_tensors}); +} + +void ${op}::set_tensors(std::vector ${tensors_vec}) { + TORCH_INTERNAL_ASSERT(${tensors_vec}.size() == num_tensors()); + ${set_tensors} +} + +at::Tensor ${op}::operator()(const at::Tensor& ${call_input_name}) const { + return ${op_call}; +} + +std::unique_ptr ${op}::clone_and_set( + std::optional> ${symints_vec}, + std::optional> ${tensors_vec}) const { + auto output = std::make_unique<${op}>(${clone_args}); + if (${symints_vec}.has_value()) { + output->set_symints(std::move(*(${symints_vec}))); + } + if (${tensors_vec}.has_value()) { + output->set_tensors(std::move(*(${tensors_vec}))); + } + return output; +} + +""" +) + + +# e.g. as_strided -> AsStridedViewFunc for camel case or +# as_strided_view_func otherwise +def view_func_name( + f: NativeFunction, include_namespace: bool = False, camel_case: bool = True +) -> str: + name = f.func.name.unambiguous_name() + view_func_name = f"{name.replace('.', '_')}_view_func" + if camel_case: + is_private = view_func_name.startswith("_") + view_func_name = "".join( + [p.title() for p in view_func_name.replace(".", "_").split("_")] + ) + if is_private: + # put the leading underscore back in + view_func_name = f"_{view_func_name}" + namespace = "torch::autograd::generated::" if include_namespace else "" + return f"{namespace}{view_func_name}" + + +def is_symint_or_tensor(arg: Argument) -> bool: + return arg.type.is_tensor_like() or arg.type.is_symint_like() + + +def remove_const_ref(binding: Binding) -> Binding: + return Binding( + name=binding.name, + nctype=binding.nctype.remove_const_ref(), + argument=binding.argument, + default=binding.default, + ) + + +def returns_multi_tensor(fn: NativeFunction) -> bool: + returns = fn.func.returns + assert len(returns) == 1 + returns_list_like = returns[0].type.is_list_like() is not None + returns_tensor_like = returns[0].type.is_tensor_like() + return returns_list_like and returns_tensor_like + + +# Generates strings with logic for getting / setting state of a particular type. +# +# Args: +# bindings (list): List of state bindings of interest (may be empty) +# state_vec_type (NamedCType): Type of vector to either return or copy from +# +# Returns: +# tuple: (list of getter logic strings, list of setter logic strings, string +# with num items expression) +def generate_state_getter_setter( + bindings: list[Binding], + state_vec_type: NamedCType, +) -> tuple[list[str], list[str], str]: + getter_logic = [] + setter_logic = [] + + state_vec = state_vec_type.name + getter_logic.append(f"{state_vec_type.cpp_type()} {state_vec};") + if len(bindings) > 0: + setter_logic.append("auto i = 0;") + + num_exprs = [] + for i, b in enumerate(bindings): + assert isinstance(b.argument, Argument) + if b.argument.type.is_list_like(): + # Handle list-likes. + num_expr = f"{b.name}.size()" + num_exprs.append(num_expr) + getter = f"{state_vec}.insert({state_vec}.end(), {b.name}.begin(), {b.name}.end());" + setter = f"std::copy({state_vec}.begin() + i, {state_vec}.begin() + i + {b.name}.size(), {b.name}.begin());" + elif isinstance(b.argument.type, OptionalType): + # Handle optionals. + num_expr = f"({b.name}.has_value() ? 1 : 0)" + num_exprs.append(num_expr) + conditional = f"if({b.name}.has_value())" + getter = ( + f"{conditional} {state_vec}.insert({state_vec}.end(), *({b.name}));" + ) + setter = f"{conditional} {b.name} = {state_vec}[i];" + else: + num_expr = "1" + num_exprs.append(num_expr) + getter = f"{state_vec}.push_back({b.name});" + setter = f"{b.name} = {state_vec}[i];" + + getter_logic.append(getter) + setter_logic.append(setter) + if i < len(bindings) - 1: + setter_logic.append(f"i += {num_expr};") + + # Reserve / assert based on the total number of items expression. + num_items = "0" if len(num_exprs) == 0 else " + ".join(num_exprs) + if len(bindings) > 0: + getter_logic.insert(1, f"{state_vec}.reserve({num_items});") + + getter_logic.append(f"return {state_vec};") + + return getter_logic, setter_logic, num_items + + +def process_function(fn: NativeFunction, template: CodeTemplate) -> str: + bindings = extract_bindings(fn) + non_self_bindings = [b for b in bindings if b.name != "self"] + + non_self_args = fn.func.arguments.flat_all[1:] + non_self_value_bindings = [ + dispatcher.argument(a, remove_non_owning_ref_types=True) for a in non_self_args + ] + + # Generate constructor / clone args for the generated struct. + constructor_args = [b.defn() for b in non_self_bindings] + clone_args = [b.name for b in non_self_bindings] + + # Generate state variable declarations for the generated struct. + state_variables = [ + f"{remove_const_ref(b).defn()};" for b in non_self_value_bindings + ] + + # Generate initializer list expressions for the generated struct. + # allow_expensive_conversions=True because we need to store e.g. SymIntArrayRefs as + # vectors. + init_exprs = translate( + non_self_bindings, non_self_value_bindings, allow_expensive_conversions=True + ) + initializers = [] + for b, init_expr in zip(non_self_bindings, init_exprs): + name = b.nctype.name + assert isinstance(name, str) + initializers.append(f"{name}({init_expr.expr})") + + # Generate call to underlying view op + call_input_name = "input_base" + op_call_args = [call_input_name, *(b.name for b in non_self_bindings)] + op_call = CALL_DISPATCH.substitute( + unambiguous_name=fn.func.name.unambiguous_name(), + unpacked_args=op_call_args, + ) + + # Multi-output views additionally require a view_idx for disambiguation. + if returns_multi_tensor(fn): + view_idx_name = "view_idx" + view_idx_typename = "int64_t" + view_idx_decl = f"{view_idx_typename} {view_idx_name}" + constructor_args.append(view_idx_decl) + clone_args.append(view_idx_name) + state_variables.append(f"{view_idx_decl};") + initializers.append(f"{view_idx_name}({view_idx_name})") + op_call += f"[{view_idx_name}]" + + # Generate initializer list for the generated struct. + initializer_list = f": {', '.join(initializers)}" if len(initializers) > 0 else "" + + # Generate getter / setter logic for any symints. + symint_bindings = [ + b + for b in non_self_bindings + if isinstance(b.argument, Argument) and b.argument.type.is_symint_like() + ] + symints_vec_type = NamedCType("symints", VectorCType(BaseCType(SymIntT))) + get_symints, set_symints, num_symints = generate_state_getter_setter( + symint_bindings, symints_vec_type + ) + + # Generate getter / setter logic for any tensors. + tensor_bindings = [ + b + for b in non_self_bindings + if isinstance(b.argument, Argument) and b.argument.type.is_tensor_like() + ] + tensors_vec_type = NamedCType("tensors", VectorCType(BaseCType(tensorT))) + get_tensors, set_tensors, num_tensors = generate_state_getter_setter( + tensor_bindings, tensors_vec_type + ) + + return template.substitute( + op=view_func_name(fn), + uppercase_op=view_func_name(fn, camel_case=False).upper(), + superclass="torch::autograd::ViewFunc", + initializer_list=initializer_list, + state=state_variables, + constructor_args=constructor_args, + clone_args=clone_args, + symints_vec=symints_vec_type.name, + get_symints=get_symints, + set_symints=set_symints, + num_symints=num_symints, + tensors_vec=tensors_vec_type.name, + get_tensors=get_tensors, + set_tensors=set_tensors, + num_tensors=num_tensors, + call_input_name=call_input_name, + op_call=op_call, + ) + + +def gen_view_funcs( + out: str, + fns_with_infos: list[NativeFunctionWithDifferentiabilityInfo], + template_path: str, +) -> None: + # don't need the info parts, just the function + fns = [fn.func for fn in fns_with_infos if use_derived(fn)] + # only want out-of-place views + view_fns = [ + fn for fn in fns if get_view_info(fn) is not None and not modifies_arguments(fn) + ] + + declarations = [process_function(fn, FUNCTION_DECLARATION) for fn in view_fns] + definitions = [process_function(fn, FUNCTION_DEFINITION) for fn in view_fns] + ops_headers = [f"#include " for fn in view_fns] + + file_basename = "ViewFuncs" + fm = FileManager(install_dir=out, template_dir=template_path, dry_run=False) + for suffix in [".h", ".cpp"]: + fname = file_basename + suffix + fm.write_with_template( + fname, + fname, + lambda: { + "generated_comment": "@" + + f"generated from {fm.template_dir_for_comments()}/" + + fname, + "view_func_declarations": declarations, + "view_func_definitions": definitions, + "ops_headers": ops_headers, + }, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/load_derivatives.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/load_derivatives.py new file mode 100644 index 0000000000000000000000000000000000000000..bd55497e7d88ef73e211bfd73c6bab95ad4e5588 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/load_derivatives.py @@ -0,0 +1,1014 @@ +# Parses derivatives.yaml into autograd functions +# +# Each autograd function is represented by `DifferentiabilityInfo` containing +# a list of `Derivative`. See `torchgen.api.autograd` for the data models. + +from __future__ import annotations + +import re +from collections import defaultdict +from typing import Any, Counter, Dict, Sequence, Set, Tuple + +import yaml + +from torchgen.api import cpp +from torchgen.api.autograd import ( + Derivative, + DifferentiabilityInfo, + ForwardDerivative, + SavedAttribute, +) +from torchgen.api.types import ( + BaseCType, + Binding, + boolT, + CppSignatureGroup, + layoutT, + longT, + NamedCType, + OptionalCType, + scalarTypeT, + SpecialArgName, + stringT, + symIntArrayRefT, + SymIntT, + tensorGeometryT, + tensorOptionsT, + typeAndSizeT, + VectorCType, +) +from torchgen.context import with_native_function +from torchgen.gen import get_grouped_by_view_native_functions, parse_native_yaml +from torchgen.model import ( + AUTOGRAD_KEYS, + FunctionSchema, + NativeFunction, + NativeFunctionsViewGroup, + OperatorName, + SchemaKind, + Type, + Variant, +) +from torchgen.utils import concatMap, IDENT_REGEX, split_name_params +from torchgen.yaml_utils import YamlLoader + + +DerivativeRet = Tuple[Dict[FunctionSchema, Dict[str, DifferentiabilityInfo]], Set[str]] + +_GLOBAL_LOAD_DERIVATIVE_CACHE: dict[tuple[str, str], DerivativeRet] = {} + +_VALID_AUTOGRAD_KEYS = set(AUTOGRAD_KEYS) + + +# This function directly adds per-dispatchkey derivative entries for {view}_copy variants of each view op. +# Since every {view} and {view}_copy op shares the same derivative formula, +# we generate them here instead of duplicating them in the yaml. +# See Note [Codegen'd {view}_copy Operators] +def add_view_copy_derivatives( + infos: dict[FunctionSchema, dict[str, DifferentiabilityInfo]], + view_groups: list[NativeFunctionsViewGroup], +) -> None: + # Get the map from each view op's name to its corresponding view group + view_name_to_group: dict[OperatorName, NativeFunctionsViewGroup] = { + g.view.func.name: g for g in view_groups + } + + view_infos = {} + + for info_dispatch_dict in infos.values(): + # maybe_view_group only needs to be calculated once per info_dispatch_dict + maybe_view_group = None + view_copy_differentiability_infos = {} + for dispatch_key, info in info_dispatch_dict.items(): + maybe_view_group = view_name_to_group.get(info.func.func.name, None) + if maybe_view_group is not None and maybe_view_group.view_copy is not None: + view_copy_info = info.create_view_copy_from_view_derivative( + maybe_view_group + ) + if view_copy_info is not None: + fn_schema = view_copy_info.func.func + view_copy_differentiability_infos[dispatch_key] = view_copy_info + else: + break + # prefer manually-defined derivatives if any + if len(view_copy_differentiability_infos) > 0 and fn_schema not in infos: + assert fn_schema is not None + view_infos[fn_schema] = view_copy_differentiability_infos + + infos.update(view_infos) + + +def load_derivatives( + derivatives_yaml_path: str, native_yaml_path: str, tags_yaml_path: str +) -> DerivativeRet: + # Do some caching as this is a deterministic function + global _GLOBAL_LOAD_DERIVATIVE_CACHE + key = (derivatives_yaml_path, native_yaml_path) + if key not in _GLOBAL_LOAD_DERIVATIVE_CACHE: + with open(derivatives_yaml_path) as f: + definitions = yaml.load(f, Loader=YamlLoader) + + funcs = parse_native_yaml(native_yaml_path, tags_yaml_path).native_functions + # From the parsed native functions, separate out the (generated) view_copy functions, + # so we can generate derivatives for them separately. + native_functions_with_view_groups = get_grouped_by_view_native_functions(funcs) + native_functions = concatMap( + lambda g: [g] + if isinstance(g, NativeFunction) + else list(g.functions(include_copy=True)), + native_functions_with_view_groups, + ) + view_groups = [ + g + for g in native_functions_with_view_groups + if isinstance(g, NativeFunctionsViewGroup) + ] + + # What's the difference between function schema v.s. signature? + # function schema is the complete declaration including mutability annotation / default value and etc. + # signature is the canonical schema for a group of functions (in-place/out/functional variants) + # that are semantically related. + functions_by_signature: dict[FunctionSchema, list[NativeFunction]] = ( + defaultdict(list) + ) + functions_by_schema: dict[str, NativeFunction] = {} + for function in native_functions: + functions_by_signature[function.func.signature()].append(function) + assert str(function.func) not in functions_by_schema + functions_by_schema[str(function.func)] = function + + # Keep track of how many of which ops we've seen so we can + # disambiguate them with a numeric suffix. + op_counter = Counter[str]() + + # infos is a dict that maps FunctionSchema -> a dict of per dispatch key DifferentiabilityInfos + # this is useful because in tools/autograd/gen_autograd.py:match_differentiability_info + # we ultimately need to categorize the DifferentiabilityInfos by FunctionSchema + infos: dict[FunctionSchema, dict[str, DifferentiabilityInfo]] = {} + used_dispatch_keys: set[str] = set() + for defn_dict in definitions: + # Ensure that the old derivatives.yaml schema with no dispatch key can be loaded. + if "dispatch" not in defn_dict: + specification = defn_dict.pop("name") + output_differentiability = defn_dict.pop( + "output_differentiability", None + ) + defn_dict = {"name": specification, "dispatch": {"Default": defn_dict}} + if output_differentiability: + defn_dict["output_differentiability"] = output_differentiability + name, per_dispatch_diffinfos = create_differentiability_info( + defn_dict, + functions_by_signature, + functions_by_schema, + op_counter, + used_dispatch_keys, + ) + infos[name] = per_dispatch_diffinfos + + add_view_copy_derivatives(infos, view_groups) + + # cache both loaded infos as well a a set of all the dispatch_keys/aliases + # that appear in derivatives.yaml. used_dispatch_keys is useful for generating + # VariableType.cpp where we need a TORCH_LIBRARY_IMPL for every autograd dispatch key used + _GLOBAL_LOAD_DERIVATIVE_CACHE[key] = infos, used_dispatch_keys + + return _GLOBAL_LOAD_DERIVATIVE_CACHE[key] + + +# TODO: Why is this going through CppSignatureGroup, that doesn't make sense... +@with_native_function +def cpp_arguments(f: NativeFunction) -> Sequence[Binding]: + sigs = CppSignatureGroup.from_native_function(f, method=False) + if sigs.symint_signature is not None: + return sigs.symint_signature.arguments() + else: + return sigs.signature.arguments() + + +def create_derivative( + f: NativeFunction, + formula: str, + var_names: tuple[str, ...], + available_named_gradients: Sequence[str], +) -> Derivative: + original_formula = formula + arguments: list[NamedCType] = [ + a.nctype.remove_const_ref() for a in cpp_arguments(f) + ] + + return_names = tuple(n if n != "self" else "result" for n in cpp.return_names(f)) + return_types = tuple( + cpp.return_type(r, symint=True).remove_const_ref() for r in f.func.returns + ) + + named_returns = [ + NamedCType(name, type) for name, type in zip(return_names, return_types) + ] + + formula, saved_inputs = saved_variables(formula, arguments, var_names) + formula, saved_outputs = saved_variables(formula, named_returns, var_names) + + used_named_gradients = { + name + for name in available_named_gradients + if re.search(IDENT_REGEX.format(name), formula) + } + + # Check that the referenced derivatives in the formula are in bounds + for i in used_gradient_indices(formula): + if i >= len(f.func.returns): + raise RuntimeError( + f"Out of bounds grads access: derivative formula for {cpp.name(f.func)} " + f"used grads[{i}], but the forward only returns {len(f.func.returns)} outputs." + ) + + return Derivative( + formula=formula, + original_formula=original_formula, + var_names=var_names, + saved_inputs=saved_inputs, + saved_outputs=saved_outputs, + named_gradients=used_named_gradients, + ) + + +def create_forward_derivative( + f: NativeFunction, formula: str, names: tuple[str, ...] +) -> ForwardDerivative: + var_names = names + var_types: tuple[Type, ...] | None = None + for r in f.func.returns: + if r.name in var_names: + if var_types is None: + var_types = () + var_types = var_types + (r.type,) + + # Handle default return names + if var_types is None: + if var_names == ("result",): + assert len(f.func.returns) == 1 + var_types = (f.func.returns[0].type,) + else: + for var_name in var_names: + res = re.findall(r"^result(\d+)$", var_name) + if len(res) == 1: + if var_types is None: + var_types = () + arg_idx = int(res[0]) + var_types = var_types + (f.func.returns[arg_idx].type,) + + assert var_types is not None, "No matching output for forward derivative definition" + return ForwardDerivative( + formula=formula, + var_names=var_names, + var_types=var_types, + required_inputs_fw_grad=None, + required_inputs_primal=None, + required_original_self_value=False, + is_reusing_outplace_formula=False, + ) + + +def postprocess_forward_derivatives( + f: NativeFunction, + defn_name: str, + all_arg_names: list[str], + derivatives: list[Derivative], + forward_derivatives: list[ForwardDerivative], + args_with_derivatives: Sequence[Binding], +) -> list[ForwardDerivative]: + def find_required_inputs(formula: str, postfix: str) -> tuple[str, ...]: + is_foreach = f.func.name.name.base.startswith("_foreach_") + required_inputs = set() + for arg in args_with_derivatives: + if ( + arg.type in ("at::TensorList", "const at::ITensorListRef &") + and not is_foreach + ): + # The functions taking TensorList handle everything internally + continue + arg_name = arg.name + + found = re.search(IDENT_REGEX.format(arg_name), formula) + if found: + raise RuntimeError( + f"The forward formula for {defn_name} is using the base name of the {arg_name} " + f"argument which is ambiguous. You should use {arg_name}_p to access the primal " + f"value and {arg_name}_t to access the tangent." + ) + + found = re.search(IDENT_REGEX.format(arg_name + postfix), formula) + if found: + required_inputs.add(arg_name) + + return tuple(required_inputs) + + updated_derivatives: list[ForwardDerivative] = [] + + for defn in forward_derivatives: + formula = defn.formula + required_inputs_tangent = find_required_inputs(formula, "_t") + if formula == "auto_element_wise": + assert ( + f.func.kind() != SchemaKind.inplace + ), f"Cannot use auto_element_wise with {f.func.name} because it is an in-place variant" + if ( + (not len(args_with_derivatives) == 1) + or len(forward_derivatives) > 1 + or len(forward_derivatives[0].var_names) > 1 + ): + raise RuntimeError( + f"Derivative definition of {defn_name} in derivatives.yaml defines the " + "forward definition of gradient as element_wise but this only " + "works for functions with a single differentiable input and a " + "single differentiable output." + ) + if not len(derivatives) == 1: + raise RuntimeError( + f"Derivative definition of {defn_name} in derivatives.yaml defines the " + "forward definition of gradient as element_wise but it does not " + "defines the gradient formula for its argument which is required." + ) + # This transformation is based on the observation that for element-wise functions, the Jacobian + # matrix is diagonal and thus doing J * v is the same as (v^T J)^T (in practice, we ignore the transpositions) + # For the complex case, we use hermitian transpose and get (v.conj() J).conj() + # So here we are going to re-use the backward formula and replace two things: + # 1) all occurrences of "grad" with "foo_t.conj()", where foo is the name of the unique differentiable input. + # 2) all usage of an original input "foo" with its primal value "foo_p". + # 3) conjugate the final result + # For example, for abs, the backward formula is: + # grad * self.sgn() + # And this function generates a forward formula that is: + # (self_t.conj() * self_p.sgn()).conj() + + backward_formula = derivatives[0].original_formula + input_name = args_with_derivatives[0].name + + # Do replacement 1) of the grad + def repl(m: Any) -> str: + return f"{m.group(1)}{input_name}_t.conj(){m.group(2)}" + + fw_formula = re.sub(IDENT_REGEX.format("grad"), repl, backward_formula) + + # Do replacement 2) of the input variables + for arg in args_with_derivatives: + arg_name = arg.name + + def repl(m: Any) -> str: + return f"{m.group(1)}{arg_name}_p{m.group(2)}" + + fw_formula = re.sub(IDENT_REGEX.format(arg_name), repl, fw_formula) + + # Do the final conjugate 3) + fw_formula = f"({fw_formula}).conj()" + + # Since there is a single differentiable inputs and we necessarily need its tangent we can + # simply require all differentiable input's tangent. + required_inputs_tangent = tuple(all_arg_names) + formula = fw_formula + elif formula == "auto_linear": + if ( + len(forward_derivatives) > 1 + or len(forward_derivatives[0].var_names) > 1 + ): + raise RuntimeError( + f"Derivative definition of {defn_name} in derivatives.yaml defines the " + "forward definition of gradient as linear but this only works " + "for functions with a single differentiable output." + ) + # This transformation is based on the observation that linear functions can be written as: + # y = f(x) = A * x + # For some matrix A and the Jacobian of the function f is also A. + # So doing J * v = A * v = f(v). + # Hence to do the jvp, we simply need to evaluate the function at the point v instead of x. + # We do this by calling the forward again by replacing any occurrence of the differentiable + # input "foo" by it's tangent "foo_t". + # Note that multiple inputs are not a problem as long as the function is truly linear wrt to + # the vector where all the differentiable inputs are stacked. + + diff_arg_names = [arg.name for arg in args_with_derivatives] + assert len(diff_arg_names) > 0 + + # Do replacement of input variables + new_args = [] + for arg_name in all_arg_names: + if arg_name in diff_arg_names: + arg_name = arg_name + "_t" + new_args.append(arg_name) + + # TODO we are trolling + if f.func.has_symint(): + defn_name += "_symint" + + # Call into the forward again. We need two cases here to handle both Tensor methods and at:: functions. + if Variant.function in f.variants: + fw_formula = f"at::{defn_name}({', '.join(new_args)})" + else: + assert Variant.method in f.variants + fw_formula = f"{new_args[0]}.{defn_name}({', '.join(new_args[1:])})" + + # All of the input tangents are always used so all of them are required here. + required_inputs_tangent = tuple(diff_arg_names) + formula = fw_formula + + # At this point, the formula is final and is not modified anymore. + + # During forward formula, we use the primal instead of the input Tensors. + # This call inspects the formula to find for which input's primal are used. + required_inputs_primal = find_required_inputs(formula, "_p") + + updated_derivatives.append( + ForwardDerivative( + formula=formula, + var_names=defn.var_names, + var_types=defn.var_types, + required_inputs_fw_grad=required_inputs_tangent, + required_inputs_primal=required_inputs_primal, + required_original_self_value=False, + is_reusing_outplace_formula=False, + ) + ) + + return updated_derivatives + + +def is_forward_derivative_definition( + all_arg_names: list[str], names: tuple[str, ...] +) -> bool: + for name in names: + return name not in all_arg_names + raise RuntimeError("Expected `names` to be non-empty") + + +def create_differentiability_info( + defn_dict: dict[Any, Any], + functions_by_signature: dict[FunctionSchema, list[NativeFunction]], + functions_by_schema: dict[str, NativeFunction], + op_counter: Counter[str], + used_dispatch_keys: set[str], +) -> tuple[FunctionSchema, dict[str, DifferentiabilityInfo]]: + """Processes a single entry `defn` in derivatives.yaml""" + + def canonical_function( + functions: Sequence[NativeFunction], name: str + ) -> NativeFunction: + for f in functions: + if ( + not f.func.is_functional_fn() + and not f.func.is_out_fn() + and name == str(f.func.name.name) + ): + return f + # some functions only have in-place variants + assert name + "_" == cpp.name(functions[0].func) + return functions[0] + + def split_names(raw_names: str) -> tuple[str, ...]: + """Given "foo, bar", return ["foo", "bar"].""" + return tuple(x.strip() for x in raw_names.split(",")) + + def check_grad_usage(defn_name: str, derivatives: Sequence[Derivative]) -> None: + """ + Check for some subtle mistakes one might make when writing derivatives. + These mistakes will compile, but will be latent until a function is + used with double backwards. + """ + + uses_grad = False # true if any derivative uses "grad" + num_grads_uses = 0 # count of uses of "grads" or "grads[INDEX]" + uses_named_grads = False # true if any derivative uses "grad_{name}" + used_grads_indices: list[int] = [] # which indices of grads are used + for d in derivatives: + formula = d.formula + uses_grad = uses_grad or bool( + re.findall(IDENT_REGEX.format("grad"), formula) + ) + num_grads_uses += len(re.findall(IDENT_REGEX.format("grads"), formula)) + uses_named_grads = uses_named_grads or bool(d.named_gradients) + used_grads_indices.extend(used_gradient_indices(formula)) + # This is a basic sanity check: the number of places we see + # "grads" should be no fewer than the number of indices we see + # inside "grads". They may not be equal because we may use + # "grads" without an index. + assert num_grads_uses >= len(used_grads_indices) + # Thus if the number is equal, every use of grads is also + # indexed. + only_used_grads_indices = num_grads_uses == len(used_grads_indices) + + if uses_grad and num_grads_uses > 0: + raise RuntimeError( + f"Derivative definition of {defn_name} in derivatives.yaml illegally " + "mixes use of 'grad' and 'grads'. Consider replacing " + "occurrences of 'grad' with 'grads[0]'" + ) + + if only_used_grads_indices and set(used_grads_indices) == {0}: + raise RuntimeError( + f"Derivative definition of {defn_name} in derivatives.yaml solely " + "refers to 'grads[0]'. If the first output is indeed the " + "only differentiable output, replace 'grads[0]' with 'grad'; " + "otherwise, there is a likely error in your derivatives " + "declaration." + ) + + if uses_named_grads and (uses_grad or num_grads_uses > 0): + raise RuntimeError( + f"Derivative definition of {defn_name} in derivatives.yaml illegally " + 'mixes use of "grad_RETURN_NAME" and "grad" or "grads[x]". Use ' + "only one method for identifying gradients." + ) + + @with_native_function + def set_up_derivatives( + f: NativeFunction, + ) -> tuple[ + Sequence[Derivative], + Sequence[ForwardDerivative], + Sequence[Binding], + Sequence[str], + Sequence[str], + ]: + # Set up the derivative information + derivatives: list[Derivative] = [] + forward_derivatives: list[ForwardDerivative] = [] + non_differentiable_arg_names: list[str] = [] + args_with_derivatives_set: set[str] = set() + + all_arg_names = [a.name for a in cpp_arguments(f)] + all_ret_names = [ + r.name for r in f.func.returns + ] # only used for the assert below + # output_differentiability is captured from the enclosed + # scope. Don't modify it. + # + # If it is not present, then no output is explicitly + # undifferentiable. + # + # It may be present and shorter than the length of return + # values. If that's the case, any return value that does not + # have a corresponding entry is considered not differentiable. + differentiability = output_differentiability or [True] * len(f.func.returns) + # A return is available as a named gradient ... + available_named_gradients = [ + f"grad_{ret.name}" + for ret, differentiable in zip(f.func.returns, differentiability) + # if it has not been explicitly made undifferentiable + if differentiable + # and if it has a name + and ret.name is not None + # and if its type is differentiable + and ret.type.is_tensor_like() + ] + + for raw_names in sorted(defn.keys()): + formula = defn[raw_names] + names = split_names(raw_names) + + for name in names: + assert not (name in all_arg_names and name in all_ret_names), ( + f"While processing the derivative formula for '{f.func.name}' wrt '{name}', " + f"expected '{name}' to not be both an input arg and named return. " + ) + + if is_forward_derivative_definition(all_arg_names, names): + forward_derivatives.append(create_forward_derivative(f, formula, names)) + else: + if formula.lower().strip() == "non_differentiable": + non_differentiable_arg_names += names + else: + derivative = create_derivative( + f, formula, names, available_named_gradients + ) + derivatives.append(derivative) + args_with_derivatives_set |= set(names) + + overlap = args_with_derivatives_set.intersection(non_differentiable_arg_names) + if overlap: + raise RuntimeError( + f"derivatives definition for {defn} have overlapped non_differentiable " + f"and differentiable variables: {overlap}" + ) + + # Next, let us determine the list of inputs in order. + # TODO: do we need eagerly calculate and save it here? Can it be derived + # from NativeFunction and `derivatives` on callsites instead? + args_with_derivatives = [ + a for a in cpp_arguments(f) if a.name in args_with_derivatives_set + ] + + # Postprocess forward derivatives definitions now that we know the differentiable arguments + forward_derivatives = postprocess_forward_derivatives( + f, + defn_name, + all_arg_names, + derivatives, + forward_derivatives, + args_with_derivatives, + ) + + # Test to see if the use of 'grads' makes sense. + check_grad_usage(defn_name, derivatives) + + return ( + derivatives, + forward_derivatives, + args_with_derivatives, + non_differentiable_arg_names, + available_named_gradients, + ) + + # NB: Removes 'name' from defn dictionary + specification = defn_dict.pop("name") + defn_name, _ = split_name_params(specification) + # NB: Removes 'output_differentiability' from defn dictionary + # `None` means all differentiable. + output_differentiability = defn_dict.pop("output_differentiability", None) + output_differentiability_conditions = None + if output_differentiability and any( + isinstance(diff, str) for diff in output_differentiability + ): + if len(output_differentiability) != 1: + raise RuntimeError( + f"Not supported: for {specification}," + f"output_differentiability must either be " + f"List[bool] or a List[str] where each str is a " + f"condition. In the case where it is a condition, " + f"we only support single-output functions. " + f"Please file us an issue. " + ) + output_differentiability_conditions = output_differentiability + output_differentiability = [True] + + schema_function = functions_by_schema.get(specification) + if not schema_function: + avail = "\n".join( + k for k, v in functions_by_schema.items() if cpp.name(v.func) == defn_name + ) + raise RuntimeError( + f"could not find ATen function for schema: {specification} " + f". Available signatures:\n{avail}" + ) + + # now map this to the legacy schema; this isn't technically necessary, but we'd need some logic here + # to map in-place schemas to the out-of-place variants. + # TODO: maybe the logic to handle the legacy schema is no longer necessary? + signature = schema_function.func.signature() + functions = functions_by_signature[signature] + if len(functions) == 0: + avail = "\n".join( + str(k) + for k, v in functions_by_signature.items() + if cpp.name(k) == defn_name + ) + raise RuntimeError( + f"could not find ATen function for legacy signature: {signature} " + f"corresponding to schema {specification}. Please report a bug to PyTorch. " + f"Available signatures:\n{avail}" + ) + + canonical = canonical_function(functions, defn_name) + if "grad_input_mask" in (a.name for a in cpp_arguments(canonical)): + raise RuntimeError( + f"Schema for {defn_name} has an argument named grad_input_mask, " + "but this name would be shadowed by our codegen. " + "Please use a different name in native_functions.yaml." + ) + + if "result" in (a.name for a in cpp_arguments(canonical)): + raise RuntimeError( + f"Schema for {defn_name} has an argument named result, " + "but this is only allowed for outputs." + "Please use a different name in native_functions.yaml." + ) + + diffinfo_dict = {} + for key, defn in defn_dict["dispatch"].items(): + if key != "Default" and key not in _VALID_AUTOGRAD_KEYS: + raise RuntimeError( + f"Invalid dispatch key {key} in derivatives.yaml for {specification}," + f" expected key to be one of {_VALID_AUTOGRAD_KEYS}" + ) + if key not in used_dispatch_keys: + used_dispatch_keys.add(key) + + ( + derivatives, + forward_derivatives, + args_with_derivatives, + non_differentiable_arg_names, + available_named_gradients, + ) = set_up_derivatives(canonical) + + used_named_gradients: set[str] = set() + for d in derivatives: + used_named_gradients |= d.named_gradients + + # only assign an op name if we are actually going to calculate a derivative + op = None + if args_with_derivatives: + op_prefix = _create_op_prefix(defn_name) + if key != "Default": + op_prefix = op_prefix + key + op = f"{op_prefix}{op_counter[op_prefix]}" + op_counter[op_prefix] += 1 + + diffinfo_dict[key] = DifferentiabilityInfo( + name=defn_name, + func=canonical, + op=op, + derivatives=derivatives, + forward_derivatives=forward_derivatives, + all_saved_inputs=dedup_vars( + [v for d in derivatives for v in d.saved_inputs] + ), + all_saved_outputs=dedup_vars( + [v for d in derivatives for v in d.saved_outputs] + ), + available_named_gradients=available_named_gradients, + used_named_gradients=used_named_gradients, + args_with_derivatives=args_with_derivatives, + non_differentiable_arg_names=non_differentiable_arg_names, + output_differentiability=output_differentiability, + output_differentiability_conditions=output_differentiability_conditions, + ) + + return canonical.func, diffinfo_dict + + +GRAD_INDEX_REGEX = r"(?:^|\W)grads\[(\d+)\]" + + +def used_gradient_indices(formula: str) -> list[int]: + """Determine a list of gradient indices (the i in grads[i]) that + are used by the formula. + + >>> used_gradient_indices("foo(grads[0], grads[1])") + [0, 1] + """ + return [int(i) for i in re.findall(GRAD_INDEX_REGEX, formula)] + + +def saved_variables( + formula: str, + nctypes: list[NamedCType], + var_names: tuple[str, ...], +) -> tuple[str, tuple[SavedAttribute, ...]]: + def stride_expr(name: str) -> str: + assert var_names == (name,), ( + 'Replacement for ".strides()" is currently only supported for single derivatives of the same tensor ' + 'that ".strides()" is being called on.' + ) + return f'strides_or_error({name}, "{name}")' + + REPLACEMENTS: list[tuple[str, dict[str, Any]]] = [ + # replace self.sym_sizes() with self_sym_sizes + ( + r"{}.sym_sizes\(\)", + { + "suffix": "_sym_sizes", + "nctype": lambda name: NamedCType(name, BaseCType(symIntArrayRefT)), + }, + ), + # replace self->sym_sizes() with self_sym_sizes_opt + ( + r"{}->sym_sizes\(\)", + { + "suffix": "_sym_sizes_opt", + "nctype": lambda name: NamedCType( + name, OptionalCType(BaseCType(symIntArrayRefT)) + ), + "expr": lambda name: f"{name}.has_value() ? std::optional({name}->sym_sizes()) : std::nullopt", + }, + ), + # replace self.sym_blocksize() with self_sym_blocksize_opt + ( + r"{}.sym_blocksize\(\)", + { + "suffix": "_self_sym_blocksize_opt", + "nctype": lambda name: NamedCType( + name, OptionalCType(BaseCType(symIntArrayRefT)) + ), + "expr": lambda name: f"at::sparse_csr::getSymIntBlockSize({name})", + }, + ), + # replace self.options() with self_options + ( + r"{}.options\(\)", + { + "suffix": "_options", + "nctype": lambda name: NamedCType(name, BaseCType(tensorOptionsT)), + }, + ), + # replace zeros_like(self) with self_info + ( + r"zeros_like\({}\)", + { + "suffix": "_info", + "nctype": lambda name: NamedCType(name, BaseCType(typeAndSizeT)), + "expr": lambda name: name, # at save-time + "res": lambda name: name + "_info.zeros()", # at eval-time + }, + ), + # replace self.sym_size(2) with self_sym_size_2 + ( + r"{}.sym_size\((-?\w+)\)", + { + "suffix": lambda m: f"_sym_argsize_{m.groups()[0].replace('-', 'minus_')}", + "nctype": lambda name: NamedCType(name, BaseCType(SymIntT)), + }, + ), + # replace self.numel() with self_numel + ( + r"{}.numel\(\)", + { + "suffix": "_numel", + "nctype": lambda name: NamedCType(name, BaseCType(longT)), + }, + ), + # replace self.sym_numel() with self_sym_numel + ( + r"{}.sym_numel\(\)", + { + "suffix": "_sym_numel", + "nctype": lambda name: NamedCType(name, BaseCType(SymIntT)), + }, + ), + # replace to_args_sizes(self) with self_args_sizes + ( + r"to_args_sizes\({}\)", + { + "suffix": "_args_sizes", + "nctype": lambda name: NamedCType( + name, VectorCType(VectorCType(BaseCType(longT))) + ), + }, + ), + # replace to_args_sizes_symint(self) with self_args_sizes + ( + r"to_args_sizes_symint\({}\)", + { + "suffix": "_args_sizes_symint", + "nctype": lambda name: NamedCType( + name, VectorCType(VectorCType(BaseCType(SymIntT))) + ), + }, + ), + # replace to_args_scalartypes(self) with self_args_scalartypes + ( + r"to_args_scalartypes\({}\)", + { + "suffix": "_args_scalartypes", + "nctype": lambda name: NamedCType( + name, VectorCType(BaseCType(scalarTypeT)) + ), + }, + ), + # replace TensorGeometry(self) with self_geometry + ( + r"TensorGeometry\({}\)", + { + "suffix": "_geometry", + "nctype": lambda name: NamedCType(name, BaseCType(tensorGeometryT)), + }, + ), + ( + r"{}.scalar_type\(\)", + { + "suffix": "_scalar_type", + "nctype": lambda name: NamedCType(name, BaseCType(scalarTypeT)), + }, + ), + # replace self.dim() with self_dim + ( + r"{}.dim\(\)", + { + "suffix": "_dim", + "nctype": lambda name: NamedCType(name, BaseCType(longT)), + }, + ), + # replace self.sym_strides() with self_sym_strides + ( + r"{}.sym_strides\(\)", + { + "suffix": "_sym_strides", + "nctype": lambda name: NamedCType(name, BaseCType(symIntArrayRefT)), + "expr": stride_expr, + }, + ), + # replace self.layout() with self_layout + ( + r"{}.layout\(\)", + { + "suffix": "_layout", + "nctype": lambda name: NamedCType(name, BaseCType(layoutT)), + }, + ), + # replace self.is_conj() with self_conjugate + ( + r"{}.is_conj\(\)", + { + "suffix": "_conjugate", + "nctype": lambda name: NamedCType(name, BaseCType(boolT)), + }, + ), + ] + + # find which arguments need to be saved + saved: list[SavedAttribute] = [] + + if ".sizes()" in formula or "->sizes()" in formula: + raise RuntimeError( + ".sizes() is not supported in derivative formulas. Instead, please use the SymInt version," + + f".sym_sizes(), which returned a c10::SymIntArrayRef. formula={formula}" + ) + if re.search(r"\.size\([-]?\d+\)", formula) or re.search( + r"->size\([-]?\d+\)", formula + ): + raise RuntimeError( + ".size(int) is not supported in derivative formulas. Instead, please use the SymInt version," + + f".sym_size(int), which returned a c10::SymIntArrayRef. formula={formula}" + ) + if ".strides()" in formula or "->strides()" in formula: + raise RuntimeError( + ".strides() is not supported in derivative formulas. Instead, please use the SymInt version," + + f".sym_strides(), which returned a c10::SymIntArrayRef. formula={formula}" + ) + for nctype in nctypes: + name = ( + nctype.name.name if isinstance(nctype.name, SpecialArgName) else nctype.name + ) + # First search the formula for expressions which can be evaluated + # when the autograd Function is created to avoid saving variables + for regex, info in REPLACEMENTS: + + def repl(m: re.Match[str]) -> str: + suffix: str = ( + info["suffix"](m) if callable(info["suffix"]) else info["suffix"] + ) + expr: str = info["expr"](name) if "expr" in info else m.group(0) + saved.append( + SavedAttribute( + nctype=info["nctype"](name + suffix), + expr=expr, + ) + ) + if "res" in info: + replacement: str = info["res"](name) + return replacement + return name + suffix + + formula = re.sub(regex.format(name), repl, formula) + + # std::optional types stored in Backward nodes must be + # converted to std::optional before being passed into + # the backward function + if nctype.type == OptionalCType(BaseCType(stringT)): + formula = re.sub( + rf"\b{name}\b", + f"{name}.has_value() ? std::optional({name}.value()) : std::nullopt", + formula, + ) + + # Find any variables which remain in the formula and save them + if re.search(IDENT_REGEX.format(name), formula): + saved.append( + SavedAttribute( + nctype=nctype, + expr=name, + ) + ) + + return formula, tuple(saved) + + +def _create_op_prefix(name: str) -> str: + """Takes a native function name converts to a op prefix name. + + Note that the "name" parameter must be the native function name + without the optional variant suffix, so "add" instead of + "add.out". + + OP names correspond to classes, hence the change to title case. + + Example:: + >>> _create_op_prefix("add") + 'AddBackward' + """ + camel_case = "".join([p.title() for p in name.split("_")]) + return (camel_case + "Backward").replace("ForwardBackward", "Backward") + + +def dedup_vars(vars: Sequence[SavedAttribute]) -> Sequence[SavedAttribute]: + seen: set[str] = set() + saved: list[SavedAttribute] = [] + for var in vars: + name = ( + var.nctype.name.name + if isinstance(var.nctype.name, SpecialArgName) + else var.nctype.name + ) + if name in seen: + continue + seen.add(name) + saved.append(var) + return saved diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ADInplaceOrViewType.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ADInplaceOrViewType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f02837e9d4825a409eb4061195de1e4b8d21b928 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ADInplaceOrViewType.cpp @@ -0,0 +1,38 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +#include "torch/csrc/autograd/VariableTypeUtils.h" +#include "torch/csrc/autograd/generated/ViewFuncs.h" + +#include +#include +#include + +// ${generated_comment} + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using namespace at; +using torch::autograd::CreationMeta; +using torch::autograd::as_view; +using torch::autograd::increment_version; + +namespace torch { + +namespace ADInplaceOrView { + +namespace { +${inplace_or_view_method_definitions} +} // namespace +} // namespace ADInplaceOrView + +namespace { + +TORCH_LIBRARY_IMPL(aten, ADInplaceOrView, m) { + ${inplace_or_view_wrapper_registrations}; +} + +} // namespace +} // namespace torch diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/Functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/Functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e2fda79d52e56e2be935b8c346fbff73c57f3f08 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/Functions.cpp @@ -0,0 +1,20 @@ +#include "torch/csrc/autograd/FunctionsManual.h" +#include "torch/csrc/dynamo/compiled_autograd.h" + +// ${generated_comment} + +// The manual function definitions that used to be here are now in torch/csrc/autograd/FunctionsManual.cpp +// This speeds up re-compilation and allow to share these implementations so that they can be +// used for forward mode AD formulas as well. + +using namespace torch::autograd::generated::details; +using at::Tensor; +using at::Scalar; +using at::IntArrayRef; +using at::TensorList; + +namespace torch::autograd::generated { + +${autograd_function_definitions} + +} // namespace torch::autograd::generated diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/Functions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/Functions.h new file mode 100644 index 0000000000000000000000000000000000000000..41b51c9963dce410ded912dece616bebe15825b2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/Functions.h @@ -0,0 +1,51 @@ +#pragma once + +// ${generated_comment} + +#include +#include +#include + +#include "torch/csrc/autograd/function.h" +#include "torch/csrc/autograd/variable.h" +#include "torch/csrc/autograd/saved_variable.h" +#include + +#include + +namespace torch { namespace autograd { namespace generated { + +using at::Scalar; +using at::Tensor; +using at::IntArrayRef; +using at::ArrayRef; +using at::Type; +using at::TensorGeometry; +using at::ScalarType; +using std::optional; +using c10::fmap; + +inline std::vector unpack_list(at::ArrayRef xs, std::shared_ptr saved_for = nullptr) { + // NB: we must explicitly do the conversion in the lambda, otherwise template + // deduction will give a Tensor of Variable which is not convertible + return fmap(xs, [&saved_for](const SavedVariable& x) { + // TODO(crcrpar): Use `std::move(saved_for)` to avoid incrementing refcount, which would need refactoring. + return static_cast(x.unpack(saved_for)); + }); +} + +inline c10::List> unpack_opt_list(at::ArrayRef xs, std::shared_ptr saved_for = nullptr) { + torch::List> result; + result.reserve(xs.size()); + for (const SavedVariable& v : xs) { + auto var = v.unpack(saved_for); + result.push_back(var.defined() ? std::optional(var) : ::std::nullopt); + } + return result; +} + +using torch::autograd::TypeAndSize; + +${autograd_function_declarations} + +}}} // namespace torch::autograd::generated diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/TraceType.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/TraceType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8b0feeb21cc2666248ef283bfbd6a2355b957863 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/TraceType.cpp @@ -0,0 +1,40 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +#include "torch/csrc/jit/frontend/tracer.h" + +#include + +#include "torch/csrc/autograd/function.h" + +#include "ATen/quantized/Quantizer.h" + +// ${generated_comment} + +// See the `Tracer` section in `torch/csrc/jit/OVERVIEW.md`. +// NOTE See [Sharded File] comment in VariableType + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using namespace at; + +namespace torch { + +namespace TraceType { + +namespace { +${trace_method_definitions} +} // namespace +} // namespace TraceType + +namespace { + +TORCH_LIBRARY_IMPL(aten, Tracer, m) { + ${trace_wrapper_registrations}; +} + +} // namespace + +} // namespace torch diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/VariableType.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/VariableType.cpp new file mode 100644 index 0000000000000000000000000000000000000000..4bd3e317493cd254a7023707637e86ef7b99b061 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/VariableType.cpp @@ -0,0 +1,65 @@ +#include "torch/csrc/autograd/VariableTypeUtils.h" +#include "torch/csrc/autograd/generated/VariableType.h" +#include "torch/csrc/autograd/FunctionsManual.h" + +#include +#include +#include +#include + +#include + + +// ${generated_comment} + +// NOTE [Sharded File]: on this file's split-into-shards state +// +// Back in the good old days, VariableType.cpp was generated as one +// file with every function in it, and everything was great and +// simple. +// +// However, this file was also very large (over 36,000 lines), and +// compiling it was very slow, and in fact was a significant +// bottleneck for incremental rebuilds. To address this, we now +// generate the file split across multiple shards, named +// VariableType_0.cpp and so on, which can be compiled in parallel. +// +// For ease of inspection and debugging, so that it's not necessary to +// go rooting around in multiple files, we also generate all the +// functions together in VariableTypeEverything.cpp. This generated +// file is only for convenience; it's not actually used in the +// build. If the file you're looking at now is one of the shards, you +// may want to switch over to the Everything variant to make you +// grepping smoother. + +using namespace at; +using namespace torch::autograd::generated; +using namespace torch::autograd::generated::details; + + +namespace torch::autograd { + +namespace VariableType { +namespace{ +[[maybe_unused]] void reset_grad_accumulator(Variable& self) { + AutogradMeta* meta = torch::autograd::impl::get_autograd_meta(self); + if (meta != nullptr) { + meta->grad_accumulator_.reset(); + } +} +} + +namespace { + + +${type_derived_method_definitions} +} +} + +namespace { + +${wrapper_registrations} + +} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/VariableType.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/VariableType.h new file mode 100644 index 0000000000000000000000000000000000000000..f854a863bb68981b4138f47062e999d0b59341a2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/VariableType.h @@ -0,0 +1,55 @@ +#pragma once + +// ${generated_comment} + +#include +#include + +#include + +#include +#include + +#include // for size_t +#include // for function +#include // for unique_ptr +#include +#include + +namespace at { + struct Quantizer; +} + +namespace torch { namespace autograd { + +using Variable = at::Tensor; +using at::Context; +using at::Device; +using at::Dimname; +using at::DimnameList; +using at::Generator; +using at::IntArrayRef; +using at::MemoryFormat; +using at::QScheme; +using at::Scalar; +using at::ScalarType; +using at::Storage; +using at::Tensor; +using at::TensorList; +using at::TensorOptions; +using at::Quantizer; +using std::optional; + +namespace VariableType { + TORCH_API std::vector allCUDATypes(); + TORCH_API std::vector allXPUTypes(); + TORCH_API std::vector allCPUTypes(); + TORCH_API std::vector allPrivateUser1Types(); + + at::Tensor & unpack(Tensor & t, const char * name, int pos); + const at::Tensor & unpack(const Tensor & t, const char * name, int pos); + at::Tensor unpack_opt(const Tensor & t, const char * name, int pos); + std::vector unpack(const at::ITensorListRef& tl, const char *name, int pos); +} + +}} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ViewFuncs.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ViewFuncs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2c7bac1bcc471be9c740c3304f33bae5d2e2ef9a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ViewFuncs.cpp @@ -0,0 +1,14 @@ +#include + +// ${generated_comment} + +using at::Tensor; +using at::Scalar; +using at::IntArrayRef; +using at::TensorList; + +namespace torch::autograd::generated { + +${view_func_definitions} + +} // namespace torch::autograd::generated diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ViewFuncs.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ViewFuncs.h new file mode 100644 index 0000000000000000000000000000000000000000..69701a0fc5f91aa06ac2ce208e8a1c2386008ac9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/ViewFuncs.h @@ -0,0 +1,28 @@ +#pragma once + +// ${generated_comment} + +#include +#include +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +namespace torch::autograd::generated { + +using at::Scalar; +using at::Tensor; +using at::IntArrayRef; +using at::ArrayRef; +using at::Type; +using at::ScalarType; +using std::optional; +using c10::fmap; + +${view_func_declarations} + +} // namespace torch::autograd::generated diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/annotated_fn_args.py.in b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/annotated_fn_args.py.in new file mode 100644 index 0000000000000000000000000000000000000000..bd219be4268759a52e0bceb9548616ba0fffacc8 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/annotated_fn_args.py.in @@ -0,0 +1,11 @@ +""" +This file is needed for generating procedural tests required for +testing __torch_function__. See tests/test_overrides.py. +""" + +# flake8: noqa +import torch + +annotated_args = { +${annotated_args} +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_enum_tag.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_enum_tag.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8f96a3a3663dd15a056adc68b75d8f01fdc565ff --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_enum_tag.cpp @@ -0,0 +1,15 @@ +#include +#include +#include +#include + +namespace py = pybind11; +namespace torch { + namespace autograd { + void initEnumTag(PyObject* module) { + auto m = py::handle(module).cast(); + py::enum_(m, "Tag") + ${enum_of_valid_tags}; + m.doc() = "An Enum that contains tags that can be assigned to an operator registered in C++."; + } +}} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_fft_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_fft_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..2ff38cb7b71de1a8b0b2a25c42f5fc836fced426 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_fft_functions.cpp @@ -0,0 +1,81 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include "torch/csrc/Device.h" +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/autograd/python_fft_functions.h" +#include "torch/csrc/autograd/generated/python_return_types.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/autograd/utils/python_arg_parsing.h" +#include "torch/csrc/autograd/generated/variable_factories.h" +#include "torch/csrc/utils/out_types.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/structseq.h" +#include "torch/csrc/utils/device_lazy_init.h" + +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using at::Tensor; +using at::Device; +using at::Layout; +using at::Scalar; +using at::ScalarType; +using at::Backend; +using at::OptionalDeviceGuard; +using at::DeviceGuard; +using at::TensorOptions; +using at::IntArrayRef; +using at::Generator; +using at::TensorList; +using at::Dimname; +using at::DimnameList; + +using torch::utils::check_out_type_matches; +using namespace torch::autograd::utils; + +namespace torch::autograd { + +// generated forward declarations start here + +${py_forwards} + +static PyMethodDef fft_functions[] = { + ${py_method_defs} + {NULL} +}; + +static PyObject* THPFFTVariableFunctionsModule = NULL; + +void initFFTFunctions(PyObject* module) { + static struct PyModuleDef def = { + PyModuleDef_HEAD_INIT, + "torch._C._fft", + NULL, + -1, + fft_functions + }; + PyObject* fft = PyModule_Create(&def); + THPFFTVariableFunctionsModule = fft; + if (!fft) { + throw python_error(); + } + // steals a reference to fft + if (PyModule_AddObject(module, "_fft", fft) != 0) { + throw python_error(); + } +} + +// generated methods start here + +${py_methods} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3e7d1ee94c3972b0861395f90a84276b57892097 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_functions.cpp @@ -0,0 +1,37 @@ +#include + +// ${generated_comment} + +#include +#include + +#include +#include "torch/csrc/autograd/generated/Functions.h" +#include "torch/csrc/autograd/python_cpp_function.h" +#include +#include +#include +#include +#include + +// NOTE: See [Sharded File] comment in VariableType + +namespace torch::autograd::generated { + +template +static void addClass(PyObject* module, PyTypeObject& type, const char* name, + PyGetSetDef* function_properties=NULL, PyMethodDef* function_methods=NULL) +{ + _initFunctionPyTypeObject(type, name, function_properties, function_methods); + Py_INCREF(&type); + PyModule_AddObject(module, name, (PyObject*)&type); + registerCppFunction(typeid(C), &type); +} + +${py_function_props_and_getters} + +void initialize_autogenerated_functions${shard_id}(PyObject* module) { + ${py_function_initializers} +} + +} // namespace torch::autograd::generated diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_functions.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_functions.h new file mode 100644 index 0000000000000000000000000000000000000000..92919a630ca201ca05ce1090e07389a5dcca6453 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_functions.h @@ -0,0 +1,17 @@ +#pragma once + +#include + +// ${generated_comment} + +// Python bindings for automatically generated autograd functions + +namespace torch { namespace autograd { namespace generated { + +${shard_forward_declare} + +inline void initialize_autogenerated_functions(PyObject* module) { + ${shard_call} +} + +}}} // namespace torch::autograd::generated diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_linalg_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_linalg_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..ba116e6167092fefbbd71d5528700e4e7a34cd40 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_linalg_functions.cpp @@ -0,0 +1,68 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include "torch/csrc/Device.h" +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/autograd/python_linalg_functions.h" +#include "torch/csrc/autograd/generated/python_return_types.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/autograd/utils/python_arg_parsing.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/structseq.h" + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using at::Tensor; +using at::Scalar; +using at::ScalarType; +using at::MemoryFormat; +using at::Generator; +using at::IntArrayRef; +using at::TensorList; + +using namespace torch::autograd::utils; + +namespace torch::autograd { + +// generated forward declarations start here + +${py_forwards} + +static PyMethodDef linalg_functions[] = { + ${py_method_defs} + {NULL} +}; + +static PyObject* THPLinalgVariableFunctionsModule = NULL; + +void initLinalgFunctions(PyObject* module) { + static struct PyModuleDef def = { + PyModuleDef_HEAD_INIT, + "torch._C._linalg", + NULL, + -1, + linalg_functions + }; + PyObject* linalg = PyModule_Create(&def); + THPLinalgVariableFunctionsModule = linalg; + if (!linalg) { + throw python_error(); + } + // steals a reference to linalg + if (PyModule_AddObject(module, "_linalg", linalg) != 0) { + throw python_error(); + } +} + +// generated methods start here + +${py_methods} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_nested_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_nested_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..162904598d52dc4007a1cf29cd798cc4ef5b29dc --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_nested_functions.cpp @@ -0,0 +1,81 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include "torch/csrc/Device.h" +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/autograd/python_nested_functions.h" +#include "torch/csrc/autograd/generated/python_return_types.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/autograd/utils/python_arg_parsing.h" +#include "torch/csrc/autograd/generated/variable_factories.h" +#include "torch/csrc/utils/out_types.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/structseq.h" +#include "torch/csrc/utils/device_lazy_init.h" + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using at::Tensor; +using at::Device; +using at::Layout; +using at::Scalar; +using at::ScalarType; +using at::Backend; +using at::OptionalDeviceGuard; +using at::DeviceGuard; +using at::TensorOptions; +using at::IntArrayRef; +using at::OptionalIntArrayRef; +using at::Generator; +using at::TensorList; +using at::Dimname; +using at::DimnameList; + +using namespace torch::autograd::utils; + +namespace torch::autograd { + +// generated forward declarations start here + +${py_forwards} + +static PyMethodDef nested_functions[] = { + {NULL, NULL, 0, NULL}, + ${py_method_defs} + {NULL} +}; + +static PyObject* THPNestedVariableFunctionsModule = NULL; + +void initNestedFunctions(PyObject* module) { + nested_functions[0] = get_nested_functions_manual()[0]; + static struct PyModuleDef def = { + PyModuleDef_HEAD_INIT, + "torch._C._nested", + NULL, + -1, + nested_functions + }; + PyObject* nested = PyModule_Create(&def); + THPNestedVariableFunctionsModule = nested; + if (!nested) { + throw python_error(); + } + // steals a reference to nested + if (PyModule_AddObject(module, "_nested", nested) != 0) { + throw python_error(); + } +} + +// generated methods start here + +${py_methods} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_nn_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_nn_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..55325801981f89fa2a8e909b87b73c2d0310c00c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_nn_functions.cpp @@ -0,0 +1,113 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include "torch/csrc/Device.h" +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/autograd/python_nn_functions.h" +#include "torch/csrc/autograd/generated/python_return_types.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/autograd/utils/python_arg_parsing.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/structseq.h" +#include "torch/csrc/utils/tensor_memoryformats.h" + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using at::Tensor; +using at::Scalar; +using at::MemoryFormat; +using at::Generator; +using at::IntArrayRef; +using at::ArrayRef; + +using namespace torch::autograd::utils; + +namespace torch::autograd { + +static PyObject* THPNNVariableFunctionsModule = nullptr; + +static PyObject * THPVariable__parse_to(PyObject* module, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "to(Device device=None, ScalarType dtype=None, bool non_blocking=False, bool copy=False, *, MemoryFormat? memory_format=None)", + "to(ScalarType dtype, bool non_blocking=False, bool copy=False, *, MemoryFormat? memory_format=None)", + "to(Tensor tensor, bool non_blocking=False, bool copy=False, *, MemoryFormat? memory_format=None)", + }); + ParsedArgs<5> parsed_args; + auto r = parser.parse(args, kwargs, parsed_args); + if (r.has_torch_function()) { + return handle_torch_function(r, args, kwargs, THPNNVariableFunctionsModule, "torch.nn", "_parse_to"); + } + auto parsed = parse_to_conversion(r, /*allow_copy*/ false); // we don't want copy for nn.Module.to + auto& device = std::get<0>(parsed); + auto& scalarType = std::get<1>(parsed); + auto non_blocking = std::get<2>(parsed); + auto opt_memory_format = std::get<4>(parsed); + auto tuple = THPObjectPtr{PyTuple_New(4)}; + if (!tuple) throw python_error(); + if (device) { + PyTuple_SET_ITEM(tuple.get(), 0, THPDevice_New(*device)); + } else { + Py_INCREF(Py_None); + PyTuple_SET_ITEM(tuple.get(), 0, Py_None); + } + if (scalarType) { + PyTuple_SET_ITEM(tuple.get(), 1, Py_NewRef(torch::getTHPDtype(*scalarType))); + } else { + Py_INCREF(Py_None); + PyTuple_SET_ITEM(tuple.get(), 1, Py_None); + } + PyTuple_SET_ITEM(tuple.get(), 2, torch::autograd::utils::wrap(non_blocking)); + if (opt_memory_format.has_value()) { + PyTuple_SET_ITEM(tuple.get(), 3, Py_NewRef(torch::utils::getTHPMemoryFormat(opt_memory_format.value()))); + } else { + Py_INCREF(Py_None); + PyTuple_SET_ITEM(tuple.get(), 3, Py_None); + } + return tuple.release(); + END_HANDLE_TH_ERRORS +} + +// generated forward declarations start here + +${py_forwards} + +static PyMethodDef nn_functions[] = { + {"_parse_to", castPyCFunctionWithKeywords(THPVariable__parse_to), + METH_VARARGS | METH_KEYWORDS, nullptr}, + ${py_method_defs} + {nullptr} +}; + +void initNNFunctions(PyObject* module) { + static struct PyModuleDef def = { + PyModuleDef_HEAD_INIT, + "torch._C._nn", + nullptr, + -1, + nn_functions + }; + PyObject* nn = PyModule_Create(&def); + THPNNVariableFunctionsModule = nn; + if (!nn) { + throw python_error(); + } + // steals a reference to nn + if (PyModule_AddObject(module, "_nn", nn) != 0) { + throw python_error(); + } +} + +// generated methods start here + +${py_methods} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_return_types.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_return_types.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e721644565a8c47a0c2081050907008e4b2055c1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_return_types.cpp @@ -0,0 +1,52 @@ +#include + +#include +#include +#include + +#include "torch/csrc/autograd/generated/python_return_types.h" +#include "torch/csrc/utils/structseq.h" +#include "torch/csrc/Exceptions.h" + +namespace torch { namespace autograd { namespace generated { + +${py_return_types} + +}}} + +namespace torch::autograd { + +static void addReturnType( + PyObject* module, + const char* name, + PyTypeObject* type) { + // hold onto the TypeObject for the unlikely case of user + // deleting or overriding it. + Py_INCREF(type); + if (PyModule_AddObject( + module, + name, + (PyObject*)type) != 0) { + Py_DECREF(type); + throw python_error(); + } +} + +void initReturnTypes(PyObject* module) { + static struct PyModuleDef def = { + PyModuleDef_HEAD_INIT, "torch._C._return_types", nullptr, -1, {}}; + PyObject* return_types_module = PyModule_Create(&def); + if (!return_types_module) { + throw python_error(); + } + + ${py_return_types_registrations} + + // steals a reference to return_types on success + if (PyModule_AddObject(module, "_return_types", return_types_module) != 0) { + Py_DECREF(return_types_module); + throw python_error(); + } +} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_return_types.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_return_types.h new file mode 100644 index 0000000000000000000000000000000000000000..24c18b92ee7308b3a9ff556ab890a26674913302 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_return_types.h @@ -0,0 +1,14 @@ +#pragma once + +namespace torch { +namespace autograd { +namespace generated { + +${py_return_types_declarations} + +} + +void initReturnTypes(PyObject* module); + +} // namespace autograd +} // namespace torch diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_sparse_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_sparse_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e565b71f76082b3946b74d645124c3a8b30fbef3 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_sparse_functions.cpp @@ -0,0 +1,67 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include "torch/csrc/Device.h" +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/autograd/python_sparse_functions.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/autograd/utils/python_arg_parsing.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/structseq.h" + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using at::Tensor; +using at::Scalar; +using at::ScalarType; +using at::MemoryFormat; +using at::Generator; +using at::IntArrayRef; +using at::TensorList; + +using namespace torch::autograd::utils; + +namespace torch::autograd { + +// generated forward declarations start here + +${py_forwards} + +static PyMethodDef sparse_functions[] = { + ${py_method_defs} + {NULL} +}; + +static PyObject* THPSparseVariableFunctionsModule = NULL; + +void initSparseFunctions(PyObject* module) { + static struct PyModuleDef def = { + PyModuleDef_HEAD_INIT, + "torch._C._sparse", + NULL, + -1, + sparse_functions + }; + PyObject* sparse = PyModule_Create(&def); + THPSparseVariableFunctionsModule = sparse; + if (!sparse) { + throw python_error(); + } + // steals a reference to sparse + if (PyModule_AddObject(module, "_sparse", sparse) != 0) { + throw python_error(); + } +} + +// generated methods start here + +${py_methods} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_special_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_special_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..beeac9258b891d6ed1ab1abf221acf04e2f5b8b5 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_special_functions.cpp @@ -0,0 +1,79 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include "torch/csrc/Device.h" +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/autograd/python_special_functions.h" +#include "torch/csrc/autograd/generated/python_return_types.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/autograd/utils/python_arg_parsing.h" +#include "torch/csrc/autograd/generated/variable_factories.h" +#include "torch/csrc/utils/out_types.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/structseq.h" +#include "torch/csrc/utils/device_lazy_init.h" + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +using at::Tensor; +using at::Device; +using at::Layout; +using at::Scalar; +using at::ScalarType; +using at::Backend; +using at::OptionalDeviceGuard; +using at::DeviceGuard; +using at::TensorOptions; +using at::IntArrayRef; +using at::Generator; +using at::TensorList; +using at::Dimname; +using at::DimnameList; + +using torch::utils::check_out_type_matches; +using namespace torch::autograd::utils; + +namespace torch::autograd { + +// generated forward declarations start here + +${py_forwards} + +static PyMethodDef special_functions[] = { + ${py_method_defs} + {NULL} +}; + +static PyObject* THPSpecialVariableFunctionsModule = NULL; + +void initSpecialFunctions(PyObject* module) { + static struct PyModuleDef def = { + PyModuleDef_HEAD_INIT, + "torch._C._special", + NULL, + -1, + special_functions + }; + PyObject* special = PyModule_Create(&def); + THPSpecialVariableFunctionsModule = special; + if (!special) { + throw python_error(); + } + // steals a reference to special + if (PyModule_AddObject(module, "_special", special) != 0) { + throw python_error(); + } +} + +// generated methods start here + +${py_methods} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_torch_functions.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_torch_functions.cpp new file mode 100644 index 0000000000000000000000000000000000000000..900bd621bb5c6914c13c5bdd52bfe1c121640fd3 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_torch_functions.cpp @@ -0,0 +1,93 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +// Python bindings for torch.* functions implemented through ATen. +// +// The functions are bound as static methods on a class +// torch._C._VariableFunctions which is also aliased as Variable._torch +// and also copied into 'torch' module. + +#include + +// Undefine the copysign macro so that at::copysign works as intended with MSVC +// https://github.com/python/cpython/blob/c60394c7fc9cc09b16e9675a3eeb5844b6d8523f/PC/pyconfig.h#L196 +#ifdef _MSC_VER +#undef copysign +#endif // _MSC_VER + +#include "torch/csrc/autograd/python_torch_functions.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/Dtype.h" +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/utils/out_types.h" +#include "torch/csrc/utils/pybind.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/tensor_layouts.h" +#include "torch/csrc/utils/tensor_new.h" +#include "torch/csrc/utils/tensor_numpy.h" +#include "torch/csrc/jit/frontend/tracer.h" +#include "torch/csrc/autograd/generated/variable_factories.h" +#include "torch/csrc/utils/structseq.h" +#include "torch/csrc/utils/device_lazy_init.h" +#include "torch/csrc/autograd/generated/python_return_types.h" + +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#endif + +#include +#include +#include +#include + +using at::Tensor; +using at::Device; +using at::Layout; +using at::Scalar; +using at::ScalarType; +using at::Backend; +using at::OptionalDeviceGuard; +using at::DeviceGuard; +using at::TensorOptions; +using at::IntArrayRef; +using at::Generator; +using at::TensorList; +using at::Dimname; +using at::DimnameList; +using at::ArrayRef; + +using torch::utils::check_out_type_matches; +using namespace torch::autograd::utils; + +// NOTE: See [Sharded File] comment in VariableType + +namespace torch::autograd { + +// generated forward declarations start here + +${py_forwards} + +static PyMethodDef torch_functions_shard[] = { + ${py_method_defs} +}; + +void gatherTorchFunctions${shard_id}(std::vector &torch_functions) { + constexpr size_t num_functions = sizeof(torch_functions_shard) / sizeof(torch_functions_shard[0]); + torch_functions.insert( + torch_functions.end(), + torch_functions_shard, + torch_functions_shard + num_functions); +} + +// generated methods start here + +${py_methods} + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_variable_methods.cpp b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_variable_methods.cpp new file mode 100644 index 0000000000000000000000000000000000000000..1edbf5a257f99b964819ae1180123c99b71ed57c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/python_variable_methods.cpp @@ -0,0 +1,1328 @@ +#define TORCH_ASSERT_ONLY_METHOD_OPERATORS +// ${generated_comment} + +#include + +// Undefine the copysign macro so that at::copysign works as intended with MSVC +// https://github.com/python/cpython/blob/c60394c7fc9cc09b16e9675a3eeb5844b6d8523f/PC/pyconfig.h#L196 +#ifdef _MSC_VER +#undef copysign +#endif // _MSC_VER + +#include "torch/csrc/DynamicTypes.h" +#include "torch/csrc/Exceptions.h" +#include "torch/csrc/Size.h" +#include "torch/csrc/autograd/generated/VariableType.h" +#include "torch/csrc/autograd/python_variable.h" +#include "torch/csrc/autograd/utils/python_arg_parsing.h" +#include "torch/csrc/autograd/utils/error_messages.h" +#include "torch/csrc/autograd/utils/wrap_outputs.h" +#include "torch/csrc/jit/frontend/tracer.h" +#ifdef USE_CUDA +#include "torch/csrc/cuda/Event.h" +#endif +#include "torch/csrc/utils/device_lazy_init.h" +#include +#include "torch/csrc/utils/object_ptr.h" +#include "torch/csrc/utils/pycfunction_helpers.h" +#include "torch/csrc/utils/python_arg_parser.h" +#include "torch/csrc/utils/python_numbers.h" +#include "torch/csrc/utils/python_strings.h" +#include "torch/csrc/utils/tensor_apply.h" +#include "torch/csrc/utils/tensor_list.h" +#include "torch/csrc/utils/tensor_new.h" +#include "torch/csrc/utils/tensor_numpy.h" +#include "torch/csrc/utils/tensor_types.h" +#include "torch/csrc/autograd/generated/python_return_types.h" + +#include +#include +#include "c10/core/Stream.h" + +#include +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +$ops_headers +#include +#endif + +using at::device_of; +using at::OptionalDeviceGuard; +using at::Scalar; +using at::ScalarType; +using at::Tensor; +using c10::Stream; +using namespace torch::autograd::utils; + +namespace torch::autograd { + +static PyObject * THPVariable__is_view(PyObject *self, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "_is_view", args); + } + auto& self_ = THPVariable_Unpack(self); + if (self_.is_view()) { + Py_RETURN_TRUE; + } else { + Py_RETURN_FALSE; + } + END_HANDLE_TH_ERRORS +} + +// implemented on the python object bc no support for first-class functions in native_functions.yaml +// See: ATen/native/README.md for more context +static PyObject * THPVariable_apply_(PyObject* self, PyObject* arg) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + auto args = py::make_tuple(py::handle(arg)); + return handle_torch_function(self, "apply_", args.ptr()); + } + auto& self_ = THPVariable_Unpack(self); + if (self_.requires_grad()) { + throw std::runtime_error( + "Can't call apply_() on Variable that requires grad. Use " + "var.detach().apply_() instead."); + } + return THPVariable_Wrap(torch::utils::apply_(self_, arg)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_size(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "size(int64_t? dim=None)", + "size(Dimname dim)", + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + if (r.idx == 0) { + if (!r.toInt64Optional(0).has_value()) { + return THPSize_NewFromSymSizes(self_); + } + if (jit::tracer::isTracing()) { + // will error out if a tensor has symints + return wrap(jit::tracer::getSizeOf(self_, r.toInt64(0))); + } else { + return torch::toPyObject(self_.sym_size(r.toInt64(0))); + } + } else if (r.idx == 1) { + if (jit::tracer::isTracing()) { + TORCH_INTERNAL_ASSERT(false, "NYI: Named tensors w/ JIT"); + } + return wrap(self_.size(r.dimname(0))); + } + Py_RETURN_NONE; + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_stride(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "stride(int64_t? dim=None)", + "stride(Dimname dim)", + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + if (r.idx == 0) { + if (r.toInt64Optional(0).has_value()) { + return torch::toPyObject(self_.sym_stride(r.toInt64(0))); + } + // yes, this is called strides in ATen. + at::SymIntArrayRef strides = self_.sym_strides(); + // we can't do the normal wrapping here because IntArrayRef maps to both + // torch.Size and tuple in python + // TODO: consider factoring this out + THPObjectPtr tuple(PyTuple_New(static_cast(strides.size()))); + if (!tuple) throw python_error(); + for (size_t i = 0; i != strides.size(); i++) { + PyObject* s = torch::toPyObject(strides[i]); + if (!s) throw python_error(); + PyTuple_SET_ITEM(tuple.get(), i, s); + } + return tuple.release(); + } else if (r.idx == 1) { + return wrap(self_.stride(r.dimname(0))); + } + Py_RETURN_NONE; + END_HANDLE_TH_ERRORS +} + +// implemented on the python object to avoid dispatch overhead +static PyObject * THPVariable_get_device(PyObject* self_, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self_)) { + return handle_torch_function(self_, "get_device", args, nullptr); + } + auto& self = THPVariable_Unpack(self_); + return wrap(self.get_device()); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_has_names(PyObject* self_, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self_)) { + return handle_torch_function(self_, "has_names", args); + } + auto& self = THPVariable_Unpack(self_); + return wrap(self.has_names()); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object to avoid dispatch overhead +static PyObject * THPVariable_data_ptr(PyObject* self_, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self_)) { + return handle_torch_function(self_, "data_ptr", args); + } + auto& self = THPVariable_Unpack(self_); + return wrap(self.data_ptr()); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object to avoid dispatch overhead +static PyObject * THPVariable_storage_offset(PyObject* self_, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self_)) { + return handle_torch_function(self_, "storage_offset"); + } + auto& self = THPVariable_Unpack(self_); + return py::cast(self.sym_storage_offset()).release().ptr(); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object to avoid dispatch overhead +static PyObject * THPVariable_dim(PyObject* self, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "dim", args); + } + auto& self_ = THPVariable_Unpack(self); + return THPUtils_packInt64(self_.dim()); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object to avoid dispatch overhead +static PyObject * THPVariable_numel(PyObject* self, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "numel", args); + } + auto& self_ = THPVariable_Unpack(self); + if (jit::tracer::isTracing()) { + return wrap(jit::tracer::getNumelOf(self_)); + } else { + return py::cast(self_.sym_numel()).release().ptr(); + } + END_HANDLE_TH_ERRORS +} + +static Tensor dispatch_contiguous(const Tensor & self, at::MemoryFormat memory_format) { + pybind11::gil_scoped_release no_gil; + OptionalDeviceGuard device_guard(device_of(self)); + return self.contiguous(memory_format); +} + +static PyObject * THPVariable_contiguous(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "contiguous(*, MemoryFormat memory_format=contiguous_format)", + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto& self_ = THPVariable_Unpack(self); + auto memory_format = r.memoryformat(0); + // avoids touching the GIL or current device if self is already contiguous + if (self_.is_contiguous(memory_format)) { + // NOTE: this logic is duplicated from VariableType.cpp. Since we need to + // record this call to contiguous() in the trace regardless of whether + // we actually call contiguous here, we need to record this information + // manually. + if (jit::tracer::isTracing()) { + const auto& tracer_state = jit::tracer::getTracingState(); + auto op_name = c10::Symbol::fromQualString("aten::contiguous"); + auto node = tracer_state->createNode(op_name, /*num_outputs=*/0); + jit::tracer::recordSourceLocation(node); + jit::tracer::addInputs(node, "self", self_); + jit::tracer::addInputs(node, "memory_format", memory_format); + tracer_state->insertNode(node); + jit::tracer::addOutput(node, self_); + } + Py_INCREF(self); + return self; + } + return THPVariable_Wrap(dispatch_contiguous(self_, memory_format)); + END_HANDLE_TH_ERRORS +} + +static Tensor dispatch_copy_(const Tensor & self, const Tensor & other, bool non_blocking) { + pybind11::gil_scoped_release no_gil; + OptionalDeviceGuard device_guard(device_of(self)); + return self.copy_(other, non_blocking); +} + + static PyObject * THPVariable_copy_(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "copy_(Tensor other, bool non_blocking=False)", + "copy_(Tensor other, bool async=False)|deprecated" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<2> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + return THPVariable_Wrap(dispatch_copy_(self_, r.tensor(0), r.toBool(1))); + END_HANDLE_TH_ERRORS +} + +template +static T dispatch_to(const Tensor & self) { + pybind11::gil_scoped_release no_gil; + OptionalDeviceGuard device_guard(device_of(self)); + TORCH_CHECK_VALUE(self.sym_numel() == 1, "only one element tensors can be converted to Python scalars"); + return self.template item(); +} + +static PyObject * THPVariable_float_scalar(PyObject* self, PyObject* args) { + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "__float__", args); + } + jit::tracer::warn("Converting a tensor to a Python float", jit::tracer::WARN_PYTHON_DATAFLOW); + auto& self_ = THPVariable_Unpack(self); + return wrap(dispatch_to(self_)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_complex_scalar(PyObject* self, PyObject* args) { + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "__complex__", args); + } + jit::tracer::warn("Converting a tensor to a Python complex", jit::tracer::WARN_PYTHON_DATAFLOW); + auto& self_ = THPVariable_Unpack(self); + return wrap(dispatch_to>(self_)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_integral_scalar(PyObject* self, PyObject* args) { + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "__int__", args); + } + jit::tracer::warn("Converting a tensor to a Python integer", jit::tracer::WARN_PYTHON_DATAFLOW); + auto& self_ = THPVariable_Unpack(self); + if (isFloatingType(self_.scalar_type())) { + // we can't dispatch to item here because we want to avoid ATen overflow checks; + // the python integral type (long in python2) can't overflow. + return THPUtils_packDoubleAsInt(dispatch_to(self_)); + } else { + return wrap(dispatch_to(self_)); + } + END_HANDLE_TH_ERRORS +} + +// This is the __index__ function in Python which is similar to __int__, but +// called when used as a slice. +static PyObject * THPVariable_index_scalar(PyObject* self, PyObject* args) { + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "__index__", args); + } + auto& self_ = THPVariable_Unpack(self); + // TODO: change the condition to `self_.dim() != 0` once we expose scalars + // in PyTorch. + if (!isIntegralType(self_.scalar_type(), /*includeBool=*/true) || self_.sym_numel() != 1) { + throw TypeError("only integer tensors of a single element can be converted to an index"); + } + return wrap(dispatch_to(self_)); + END_HANDLE_TH_ERRORS +} + +static Tensor dispatch_invert(const Tensor & self) { + pybind11::gil_scoped_release no_gil; + OptionalDeviceGuard device_guard(device_of(self)); + return self.bitwise_not(); +} + +static PyObject * THPVariable_invert(PyObject* self, PyObject* args) { + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "__invert__", args); + } + auto& self_ = THPVariable_Unpack(self); + if (!isIntegralType(self_.scalar_type(), /*includeBool=*/true)) { + throw TypeError("~ (operator.invert) is only implemented on integer and Boolean-type tensors"); + } + return THPVariable_Wrap(dispatch_invert(self_)); + END_HANDLE_TH_ERRORS +} + +static Tensor dispatch_to(const Tensor & self, Device device, bool non_blocking, bool copy, std::optional optional_memory_format) { + pybind11::gil_scoped_release no_gil; + // NOTE: this is where we record aten::to in the graph during tracing. However, the behavior of aten::to + // is different with respect to TensorOptions fields that are not present: aten::to inherits fields that + // are missing from the self argument while the tracer assumes that they should be populated with the + // default values (eg. float for scalar type). By explicitly copying over the tensor options here we fully + // specify all tensor options and thus record the proper trace + return self.to(self.options().device(device).memory_format(optional_memory_format), non_blocking, copy); +} + +static Tensor dispatch_to(const Tensor & self, bool non_blocking, bool copy, std::optional optional_memory_format) { + pybind11::gil_scoped_release no_gil; + return self.to(self.options().memory_format(optional_memory_format), non_blocking, copy); +} + +static Tensor dispatch_to(const Tensor & self, ScalarType dtype, bool non_blocking, bool copy, std::optional optional_memory_format) { + pybind11::gil_scoped_release no_gil; + // TODO: Make this call the TensorOptions version, maybe? + return self.to(dtype, non_blocking, copy, optional_memory_format); +} + +static Tensor dispatch_to(const Tensor & self, Device device, ScalarType dtype, bool non_blocking, bool copy, std::optional optional_memory_format) { + pybind11::gil_scoped_release no_gil; + // TODO: Make this call the TensorOptions version, maybe? + return self.to(device, dtype, non_blocking, copy, optional_memory_format); +} + +static PyObject * THPVariable_cpu(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "cpu(*, MemoryFormat? memory_format=None)" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_Wrap(dispatch_to(self_, at::Device(at::DeviceType::CPU), false, false, opt_memory_format)); + END_HANDLE_TH_ERRORS +} + +static Tensor dispatch_nonzero(const Tensor & self) { + pybind11::gil_scoped_release no_gil; + OptionalDeviceGuard device_guard(device_of(self)); + return self.nonzero(); +} + +static std::vector dispatch_nonzero_numpy(const Tensor & self) { + pybind11::gil_scoped_release no_gil; + OptionalDeviceGuard device_guard(device_of(self)); + return self.nonzero_numpy(); +} + +static PyObject * THPVariable_nonzero(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "nonzero()", + "nonzero(*, bool as_tuple)", + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<2> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + if (r.idx == 0 || (r.idx == 1 && !r.toBool(0))) { + return wrap(dispatch_nonzero(self_)); + } else { + return wrap(dispatch_nonzero_numpy(self_)); + } + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_cuda(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "cuda(Device? device=None, bool non_blocking=False, *, MemoryFormat? memory_format=None)", + "cuda(Device? device=None, bool async=False, *, MemoryFormat? memory_format=None)|deprecated" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto device = r.isNone(0) ? at::Device(at::DeviceType::CUDA) : r.device(0); + auto opt_memory_format = r.memoryformatOptional(2); + TORCH_CHECK(device.is_cuda(), "Invalid device, must be cuda device"); + torch::utils::device_lazy_init(at::kCUDA); + return THPVariable_Wrap(dispatch_to(self_, device, r.toBool(1), false, opt_memory_format)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_mtia(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "mtia(Device? device=None, bool non_blocking=False, *, MemoryFormat? memory_format=None)", + "mtia(Device? device=None, bool async=False, *, MemoryFormat? memory_format=None)|deprecated" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if (r.has_torch_function()) { + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto device = r.isNone(0) ? at::Device(at::DeviceType::MTIA) : r.device(0); + auto opt_memory_format = r.memoryformatOptional(2); + TORCH_CHECK(device.is_mtia(), "Invalid device, must be MTIA device"); + torch::utils::device_lazy_init(at::kMTIA); + return THPVariable_Wrap(dispatch_to(self_, device, r.toBool(1), false, opt_memory_format)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_xpu(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "xpu(Device? device=None, bool non_blocking=False, *, MemoryFormat? memory_format=None)", + "xpu(Device? device=None, bool async=False, *, MemoryFormat? memory_format=None)|deprecated" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if (r.has_torch_function()) { + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto device = r.isNone(0) ? at::Device(at::DeviceType::XPU) : r.device(0); + auto opt_memory_format = r.memoryformatOptional(2); + TORCH_CHECK(device.is_xpu(), "Invalid device, must be xpu device"); + torch::utils::device_lazy_init(at::kXPU); + return THPVariable_Wrap(dispatch_to(self_, device, r.toBool(1), false, opt_memory_format)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_ipu(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "ipu(Device? device=None, bool non_blocking=False, *, MemoryFormat? memory_format=None)", + "ipu(Device? device=None, bool async=False, *, MemoryFormat? memory_format=None)|deprecated" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if (r.has_torch_function()) { + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto device = r.isNone(0) ? at::Device(at::DeviceType::IPU) : r.device(0); + auto opt_memory_format = r.memoryformatOptional(2); + TORCH_CHECK(device.is_ipu(), "Invalid device, must be ipu device"); + return THPVariable_Wrap(dispatch_to(self_, device, r.toBool(1), false, opt_memory_format)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_to_type(PyObject* self, ScalarType scalarType, std::optional optional_memory_format) { + HANDLE_TH_ERRORS + auto& self_ = THPVariable_Unpack(self); + return THPVariable_Wrap(dispatch_to(self_, scalarType, false, false, optional_memory_format)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_byte(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "byte(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Byte, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_char(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "char(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Char, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_double(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "double(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Double, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_float(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "float(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Float, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_cdouble(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "cdouble(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::ComplexDouble, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_cfloat(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "cfloat(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::ComplexFloat, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_half(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "half(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Half, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_int(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "int(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Int, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_long(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "long(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Long, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_short(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "short(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Short, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_bool(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "bool(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::Bool, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_bfloat16(PyObject* self, PyObject* args, PyObject* kwargs) { + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "bfloat16(*, MemoryFormat? memory_format=None)" + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + auto opt_memory_format = r.memoryformatOptional(0); + return THPVariable_to_type(self, ScalarType::BFloat16, opt_memory_format); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_element_size(PyObject* self, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "element_size", args); + } + auto& self_ = THPVariable_Unpack(self); + return THPUtils_packInt64(self_.element_size()); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object bc PyObjects not declarable in native_functions.yaml +// See: ATen/native/README.md for more context +static PyObject * THPVariable_numpy(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "numpy(*, bool force=False)" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if (r.has_torch_function()) { + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + jit::tracer::warn("Converting a tensor to a NumPy array", jit::tracer::WARN_PYTHON_DATAFLOW); + return torch::utils::tensor_to_numpy(self_, r.toBool(0)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_requires_grad_(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "requires_grad_(bool requires_grad=True)", + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + // temporary hack to improve functorch UX. + const auto& functorch_tls = at::functorch::functorchTLSAccessor(); + if (functorch_tls) { + functorch_tls->checkSupportsInplaceRequiresGrad(); + } + + auto requires_grad = r.toBool(0); + // should we throw if requires_grad is true? var.requires_grad = True throws here + // but it's nice to let this be a no-op. + if (!self_.is_leaf() && !requires_grad) { + throw std::runtime_error(autograd::utils::requires_grad_leaf_error(requires_grad)); + } + if (requires_grad && ! isDifferentiableType(at::typeMetaToScalarType(self_.dtype()))) { + throw std::runtime_error("only Tensors of floating point dtype can require gradients"); + } + self_.set_requires_grad(requires_grad); + return THPVariable_Wrap(self_); + END_HANDLE_TH_ERRORS +} + +inline bool dispatch_is_contiguous(const Tensor & self, MemoryFormat memory_format) { + return self.is_contiguous(memory_format); +} + +// implemented on the python object to avoid dispatch overhead +static PyObject * THPVariable_is_contiguous(PyObject* self_, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "is_contiguous(*, MemoryFormat memory_format=contiguous_format)", + }); + ParsedArgs<1> parsed_args; + auto r = parser.parse(self_, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self_, args, kwargs, PyObject_Type(self_), "torch.Tensor"); + } + + auto memory_format = r.memoryformat(0); + auto& self = THPVariable_Unpack(self_); + return wrap(dispatch_is_contiguous(self, memory_format)); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object to avoid dispatch overhead +static PyObject * THPVariable_item(PyObject* self, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "item", args); + } + jit::tracer::warn("Converting a tensor to a Python number", jit::tracer::WARN_PYTHON_DATAFLOW); + auto& self_ = THPVariable_Unpack(self); + auto dispatch_item_ = [](const Tensor& self) -> at::Scalar { + pybind11::gil_scoped_release no_gil; + return self.item(); + }; + return py::cast(dispatch_item_(self_)).release().ptr(); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object bc no support for first class functions in native_functions.yaml +// See: ATen/native/README.md for more context +static PyObject * THPVariable_map_(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ "map_(Tensor other, PyObject* callable)" }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<2> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + Variable other = r.tensor(0); + if (self_.requires_grad() || other.requires_grad()) { + throw std::runtime_error( + "Can't call map_() on Variable that requires grad. Use " + "var.detach().map_() instead."); + } + TORCH_CHECK( + !self_.unsafeGetTensorImpl()->is_python_dispatch() && !other.unsafeGetTensorImpl()->is_python_dispatch(), + ".map_ is not supported for tensor subclasses."); + + return THPVariable_Wrap(torch::utils::map_(self_, other, r.pyobject(1))); + END_HANDLE_TH_ERRORS +} + +// implemented on the python object bc no support for first class functions in native_functions.yaml +// See: ATen/native/README.md for more context +static PyObject * THPVariable_map2_(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ "map2_(Tensor x, Tensor y, PyObject* callable)" }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + Variable x = r.tensor(0); + Variable y = r.tensor(1); + if (self_.requires_grad() || x.requires_grad() || y.requires_grad()) { + throw std::runtime_error( + "Can't call map2_() on Variable that requires grad. Use " + "var.detach().map2_() instead."); + } + TORCH_CHECK( + !x.unsafeGetTensorImpl()->is_python_dispatch() && !y.unsafeGetTensorImpl()->is_python_dispatch(), + ".map2_ is not supported for tensor subclasses."); + return THPVariable_Wrap(torch::utils::map2_(self_, x, y, r.pyobject(2))); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_new(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "new", args, kwargs); + } + auto& self_ = THPVariable_Unpack(self); + OptionalDeviceGuard device_guard(device_of(self_)); + return THPVariable_Wrap(torch::utils::legacy_tensor_new(legacyExtractDispatchKey(self_), self_.scalar_type(), args, kwargs)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_new_tensor(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "new_tensor", args, kwargs); + } + auto& self_ = THPVariable_Unpack(self); + OptionalDeviceGuard device_guard(device_of(self_)); + return THPVariable_Wrap(torch::utils::new_tensor(legacyExtractDispatchKey(self_), self_.scalar_type(), args, kwargs)); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_storage(PyObject* self, PyObject* arg) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "untyped_storage"); + } + auto& self_ = THPVariable_Unpack(self); + return createPyObject(self_.storage()); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_to(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "to(Device device=None, ScalarType dtype=None, bool non_blocking=False, bool copy=False, *, MemoryFormat? memory_format=None)", + "to(ScalarType dtype, bool non_blocking=False, bool copy=False, *, MemoryFormat? memory_format=None)", + "to(Tensor tensor, bool non_blocking=False, bool copy=False, *, MemoryFormat? memory_format=None)", + }); + ParsedArgs<5> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + if (r.has_torch_function()) { + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + auto parsed = parse_to_conversion(r, /*allow_copy*/ true); + auto& device = std::get<0>(parsed); + auto& scalarType = std::get<1>(parsed); + auto non_blocking = std::get<2>(parsed); + auto copy = std::get<3>(parsed); + auto opt_memory_format = std::get<4>(parsed); + auto& self_ = THPVariable_Unpack(self); + torch::utils::maybe_initialize_device(device); + if (!device && !scalarType && !copy && !opt_memory_format.has_value()) { + Py_INCREF(self); + return self; + } else if (!device && !scalarType) { + return THPVariable_Wrap( + dispatch_to(self_, non_blocking, copy, opt_memory_format)); + } else if (!device) { + return THPVariable_Wrap(dispatch_to(self_, *scalarType, non_blocking, copy, opt_memory_format)); + } else if (!scalarType) { + return THPVariable_Wrap(dispatch_to(self_, *device, non_blocking, copy, opt_memory_format)); + } else { + return THPVariable_Wrap(dispatch_to(self_, *device, *scalarType, non_blocking, copy, opt_memory_format)); + } + Py_RETURN_NONE; + END_HANDLE_TH_ERRORS +} + +// implemented on the python object b/c arbitrarily nested list not declarable in native_functions.yaml +// See: ATen/native/README.md for more context +static PyObject * THPVariable_tolist(PyObject* self, PyObject* args) +{ + HANDLE_TH_ERRORS + if (check_has_torch_function(self)) { + return handle_torch_function(self, "tolist", args); + } + jit::tracer::warn("Converting a tensor to a Python list", jit::tracer::WARN_PYTHON_DATAFLOW); + auto self_ = THPVariable_Unpack(self); + return torch::utils::tensor_to_list(self_); + END_HANDLE_TH_ERRORS +} + +static PyObject * THPVariable_type(PyObject* self, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS + static PythonArgParser parser({ + "type(PyObject* dtype=None, bool non_blocking=False, *, MemoryFormat? memory_format=None)", + "type(PyObject* dtype=None, bool async=False, *, MemoryFormat? memory_format=None)|deprecated" + }); + auto& self_ = THPVariable_Unpack(self); + ParsedArgs<3> parsed_args; + auto r = parser.parse(self, args, kwargs, parsed_args); + + if(r.has_torch_function()){ + return handle_torch_function(r, self, args, kwargs, THPVariableClass, "torch.Tensor"); + } + + if (r.isNone(0)) { + return THPUtils_packString(torch::utils::options_to_string(self_.options())); + } + auto obj = r.pyobject(0); + auto opt_memory_format = r.memoryformatOptional(2); + std::string type_name; + bool is_dtype = false; + if (PyType_Check(obj)) { + if (obj == THPVariableClass) { + type_name = "torch.Tensor"; + } else { + type_name = ((PyTypeObject*)obj)->tp_name; + } + } else if (THPUtils_checkString(obj)) { + type_name = THPUtils_unpackString(obj); + } else if (THPDtype_Check(obj)) { + is_dtype = true; + } else { + throw TypeError("dtype must be a type, str, or dtype object"); + } + Device device = self_.device(); + if (is_dtype) { + auto scalar_type = r.scalartype(0); + return THPVariable_Wrap(dispatch_to(self_, scalar_type, /*non_blocking=*/ r.toBool(1), /*copy=*/ false, opt_memory_format)); + } + at::TensorOptions options = torch::utils::options_from_string(type_name); + auto scalar_type = at::typeMetaToScalarType(options.dtype()); + auto device_type = options.device().type(); + if (device_type != device.type()) { + device = at::Device(device_type); + } + torch::utils::maybe_initialize_device(device); + return THPVariable_Wrap(dispatch_to(self_, device, scalar_type, /*non_blocking=*/ r.toBool(1), /*copy=*/ false, opt_memory_format)); + END_HANDLE_TH_ERRORS +} + +// generated methods start here + +${py_methods} + +static PyObject * THPVariable_bool_scalar(PyObject* self, PyObject* args) { + if (check_has_torch_function(self)) { + HANDLE_TH_ERRORS + return handle_torch_function(self, "__bool__", args); + END_HANDLE_TH_ERRORS + } + jit::tracer::warn("Converting a tensor to a Python boolean", jit::tracer::WARN_PYTHON_DATAFLOW); + return THPVariable_is_nonzero(self, args); +} + +static PyObject * THPVariable___eq__(PyObject* self_, PyObject* args, PyObject* kwargs) +{ + HANDLE_TH_ERRORS +#ifdef USE_NUMPY + if (torch::utils::is_numpy_available()) { + static PythonArgParser parser({ + "__eq__(PyObject* other)", + }, /*traceable=*/true); + + ParsedArgs<1> parsed_args; + auto _r = parser.parse(self_, args, kwargs, parsed_args); + if(_r.has_torch_function()) { + return handle_torch_function(_r, self_, args, kwargs, THPVariableClass, "torch.Tensor"); + } + switch (_r.idx) { + case 0: { + auto other = _r.pyobject(0); + if (PyArray_Check(other)) { + auto other_tensor = torch::utils::tensor_from_numpy(other); + auto dispatch_eq = [](const at::Tensor & self, const at::Tensor & other) -> at::Tensor { + pybind11::gil_scoped_release no_gil; + return self.eq(other); + }; + const Tensor& self = THPVariable_Unpack(self_); + return wrap(dispatch_eq(self, other_tensor)); + } + } + } + } +#endif + return THPVariable_eq(self_, args, kwargs); + Py_RETURN_NONE; + END_HANDLE_TH_ERRORS +} + +// Wrapper converts a raised TypeError into returning NotImplemented +// Used to implement binary arithmetic operators +template +static PyObject * TypeError_to_NotImplemented_(PyObject* self, PyObject* args, PyObject* kwargs) { + + PyObject* ret = Func(self, args, kwargs); + if (!ret && PyErr_ExceptionMatches(PyExc_TypeError)) { + PyErr_Clear(); + Py_INCREF(Py_NotImplemented); + ret = Py_NotImplemented; + } + return ret; +} + +// set_ has to be defined in the template because the c10::Storage object +// does not have a type, and we need to make sure the Python storage object's +// type matches the tensor's type +static PyObject* THPVariable_set_( + PyObject* self_, + PyObject* args, + PyObject* kwargs) { + HANDLE_TH_ERRORS + const Tensor& self = THPVariable_Unpack(self_); + static PythonArgParser parser( + { + "set_()", + "set_(Storage source)", + "set_(Storage source, SymInt storage_offset, SymIntArrayRef size, SymIntArrayRef stride=None)", + "set_(Tensor source)", + "set_(Tensor source, SymInt storage_offset, SymIntArrayRef size, SymIntArrayRef stride=None)", + }, + /*traceable=*/false); + + ParsedArgs<4> parsed_args; + auto _r = parser.parse(args, kwargs, parsed_args); + + switch (_r.idx) { + case 0: { + // aten::set_(Tensor(a!) self) -> Tensor(a!) + auto dispatch_set_ = [](const Tensor& self) -> Tensor { + pybind11::gil_scoped_release no_gil; + return self.set_(); + }; + return wrap(dispatch_set_(self)); + } + case 1: { + // aten::set_.source_Storage(Tensor(a!) self, Storage source) -> + // Tensor(a!) + at::ScalarType storage_scalar_type{}; + bool is_typed_storage = true; + at::Storage storage = _r.storage(0, storage_scalar_type, is_typed_storage); + TORCH_CHECK(storage_scalar_type == self.dtype() || !is_typed_storage, + "Expected a Storage of type ", self.dtype(), + " or an UntypedStorage, but got type ", storage_scalar_type, + " for argument 1 'storage'"); + auto dispatch_set_ = [](const Tensor& self, Storage source) -> Tensor { + pybind11::gil_scoped_release no_gil; + return self.set_(std::move(source)); + }; + return wrap(dispatch_set_(self, storage)); + } + case 2: { + // aten::set_.source_Storage_storage_offset(Tensor(a!) self, Storage + // source, int storage_offset, int[] size, int[] stride=[]) -> Tensor(a!) + at::ScalarType storage_scalar_type{}; + bool is_typed_storage = true; + at::Storage storage = _r.storage(0, storage_scalar_type, is_typed_storage); + TORCH_CHECK(storage_scalar_type == self.dtype() || !is_typed_storage, + "Expected a Storage of type ", self.dtype(), + " or an UntypedStorage, but got type ", storage_scalar_type, + " for argument 1 'storage'"); + auto dispatch_set_ = [](const Tensor& self, + Storage source, + c10::SymInt storage_offset, + c10::SymIntArrayRef size, + c10::SymIntArrayRef stride) -> Tensor { + pybind11::gil_scoped_release no_gil; + return self.set__symint(std::move(source), std::move(storage_offset), size, stride); + }; + return wrap(dispatch_set_( + self, storage, _r.toSymInt(1), _r.symintlist(2), _r.symintlist(3))); + } + case 3: { + // aten::set_.source_Tensor(Tensor(a!) self, Tensor source) -> Tensor(a!) + auto dispatch_set_ = [](const Tensor& self, const Tensor& source) -> Tensor { + TORCH_CHECK(source.dtype() == self.dtype(), "Could not set tensor of type ", source.dtype(), " to a tensor of type ", self.dtype()); + pybind11::gil_scoped_release no_gil; + return self.set_(source); + }; + return wrap(dispatch_set_(self, _r.tensor(0))); + } + case 4: { + // aten::set_.source_Tensor_storage_offset(Tensor(a!) self, Tensor + // source, int storage_offset, int[] size, int[] stride=[]) -> Tensor(a!) + at::Tensor storage = _r.tensor(0); + auto dispatch_set_ = [](const Tensor& self, + const Tensor& source, + c10::SymInt storage_offset, + c10::SymIntArrayRef size, + c10::SymIntArrayRef stride) -> Tensor { + pybind11::gil_scoped_release no_gil; + return self.set__symint(source, std::move(storage_offset), size, stride); + }; + return wrap(dispatch_set_( + self, storage, _r.toSymInt(1), _r.symintlist(2), _r.symintlist(3))); + } + } + Py_RETURN_NONE; + END_HANDLE_TH_ERRORS +} + +// XXX: ops that are bound here are not exposed to the C++ api nor the JIT. +// Any new ops added here should be accompanied with a comment why they are not +// being registered through native_functions.yaml, and be tagged cpp / JIT +PyMethodDef variable_methods[] = { + // These magic methods are all implemented on python object to wrap NotImplementedError + {"__add__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__radd__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__iadd__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__rmul__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__mul__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__imul__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__sub__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__isub__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__div__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__truediv__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__floordiv__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__idiv__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__ifloordiv__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__mod__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__imod__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__eq__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__ne__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__lt__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__le__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__gt__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__ge__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__rand__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__ror__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__rxor__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"__bool__", THPVariable_bool_scalar, METH_NOARGS, nullptr}, + {"__float__", THPVariable_float_scalar, METH_NOARGS, nullptr}, + {"__complex__", THPVariable_complex_scalar, METH_NOARGS, nullptr}, + {"__int__", THPVariable_integral_scalar, METH_NOARGS, nullptr}, + {"__long__", THPVariable_integral_scalar, METH_NOARGS, nullptr}, + {"__index__", THPVariable_index_scalar, METH_NOARGS, nullptr}, + {"__nonzero__", THPVariable_bool_scalar, METH_NOARGS, nullptr}, + {"__invert__", THPVariable_invert, METH_NOARGS, nullptr}, + {"__matmul__", castPyCFunctionWithKeywords(TypeError_to_NotImplemented_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"_is_view", THPVariable__is_view, METH_NOARGS, nullptr}, + {"apply_", THPVariable_apply_, METH_O, nullptr}, + {"bfloat16", castPyCFunctionWithKeywords(THPVariable_bfloat16), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"byte", castPyCFunctionWithKeywords(THPVariable_byte), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"char", castPyCFunctionWithKeywords(THPVariable_char), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"contiguous", castPyCFunctionWithKeywords(THPVariable_contiguous), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"copy_", castPyCFunctionWithKeywords(THPVariable_copy_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"cpu", castPyCFunctionWithKeywords(THPVariable_cpu), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"cuda", castPyCFunctionWithKeywords(THPVariable_cuda), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"mtia", castPyCFunctionWithKeywords(THPVariable_mtia), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"xpu", castPyCFunctionWithKeywords(THPVariable_xpu), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"ipu", castPyCFunctionWithKeywords(THPVariable_ipu), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"data_ptr", THPVariable_data_ptr, METH_NOARGS, nullptr}, + {"dim", THPVariable_dim, METH_NOARGS, nullptr}, + {"has_names", THPVariable_has_names, METH_NOARGS, nullptr}, + {"double", castPyCFunctionWithKeywords(THPVariable_double), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"cdouble", castPyCFunctionWithKeywords(THPVariable_cdouble), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"element_size", THPVariable_element_size, METH_NOARGS, nullptr}, + {"float", castPyCFunctionWithKeywords(THPVariable_float), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"cfloat", castPyCFunctionWithKeywords(THPVariable_cfloat), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"get_device", THPVariable_get_device, METH_NOARGS, nullptr}, + {"bool", castPyCFunctionWithKeywords(THPVariable_bool), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"half", castPyCFunctionWithKeywords(THPVariable_half), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"int", castPyCFunctionWithKeywords(THPVariable_int), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"is_contiguous", castPyCFunctionWithKeywords(THPVariable_is_contiguous), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"item", THPVariable_item, METH_NOARGS, nullptr}, + {"long", castPyCFunctionWithKeywords(THPVariable_long), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"map_", castPyCFunctionWithKeywords(THPVariable_map_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"map2_", castPyCFunctionWithKeywords(THPVariable_map2_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"ndimension", THPVariable_dim, METH_NOARGS, nullptr}, + {"nelement", THPVariable_numel, METH_NOARGS, nullptr}, + {"new", castPyCFunctionWithKeywords(THPVariable_new), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"new_tensor", castPyCFunctionWithKeywords(THPVariable_new_tensor), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"nonzero", castPyCFunctionWithKeywords(THPVariable_nonzero), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"numel", THPVariable_numel, METH_NOARGS, nullptr}, + {"numpy", castPyCFunctionWithKeywords(THPVariable_numpy), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"requires_grad_", castPyCFunctionWithKeywords(THPVariable_requires_grad_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"set_", castPyCFunctionWithKeywords(THPVariable_set_), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"short", castPyCFunctionWithKeywords(THPVariable_short), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"size", castPyCFunctionWithKeywords(THPVariable_size), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"untyped_storage", THPVariable_storage, METH_NOARGS, nullptr}, + {"storage_offset", THPVariable_storage_offset, METH_NOARGS, nullptr}, + {"stride", castPyCFunctionWithKeywords(THPVariable_stride), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"to", castPyCFunctionWithKeywords(THPVariable_to), METH_VARARGS | METH_KEYWORDS, nullptr}, + {"tolist", THPVariable_tolist, METH_NOARGS, nullptr}, + {"type", castPyCFunctionWithKeywords(THPVariable_type), METH_VARARGS | METH_KEYWORDS, nullptr}, + ${py_method_defs} + {nullptr} +}; + +} // namespace torch::autograd diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/variable_factories.h b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/variable_factories.h new file mode 100644 index 0000000000000000000000000000000000000000..225ad79f0947c69b8799f7fb79d4cc37bc39c09f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/packaged/autograd/templates/variable_factories.h @@ -0,0 +1,135 @@ +#pragma once + +// ${generated_comment} + +#include +#include +#include +#include +#include +#include +#include + +#ifndef AT_PER_OPERATOR_HEADERS +#include +#else +#include +$ops_headers +#endif + +#include +#include +#include + +namespace torch { + +/// NOTE: Currently `torch::tensor(...)` doesn't support mixed data types +/// (i.e. `torch::tensor({{bool, 2.0}})` doesn't work). We might be able to +/// support it in the future by iterating over all sub-lists to find +/// the largest data type that can represent all of the elements, or by using +/// variadic templates. +/// +/// NOTE: C++ `torch::tensor` with a floating-point type or an `at::ArrayRef` / `std::vector` / +/// (nested) braced-init-list of floating-point types always produces a tensor of dtype +/// `torch::get_default_dtype()`, matching Python `torch.tensor` behavior. +/// +/// NOTE: C++ `torch::tensor` with an integer type or an `at::ArrayRef` / `std::vector` / +/// (nested) braced-init-list of integer types always produces a tensor of dtype `at::kLong` +/// (aka. int64_t), matching Python `torch.tensor` behavior. +/// +/// NOTE: The following dtypes are not supported by `torch::tensor` currently: +/// - `unsigned int` +/// - `unsigned long int` +/// - `unsigned long long int` +/// - `long long int` +inline at::Tensor tensor(detail::TensorDataContainer tensor_data_container, const at::TensorOptions& options = {}) { + return autograd::make_variable( + // note: we remove the requires_grad setting from the TensorOptions because + // it is ignored anyways (and we actually have an assertion that it isn't set + // which would fail otherwise). We handle requires_grad explicitly here + // instead of passing it through to the kernel. + tensor_data_container.convert_to_tensor(options.requires_grad(::std::nullopt)), + options.requires_grad()); +} + +/// A generic deleter function. +using Deleter = std::function; +using at::MemoryFormat; + +/// Exposes the given `data` as a `Tensor` without taking ownership of the +/// original data. `sizes` should specify the shape of the tensor, `strides` the +/// stride in each dimension. The `deleter` function (a +/// `std::function`) will be called on the `data` when the Tensor +/// data would normally be deallocated. The `TensorOptions` specify additional +/// configuration options for the returned tensor, such as what type to +/// interpret the `data` as. +inline at::Tensor from_blob( + void* data, + at::IntArrayRef sizes, + at::IntArrayRef strides, + const Deleter& deleter, + const at::TensorOptions& options = at::TensorOptions()) { + at::Tensor tensor = ([&]() { + at::AutoDispatchBelowAutograd guard; // TODO: remove + at::tracer::impl::NoTracerDispatchMode tracer_guard; + return at::from_blob(data, sizes, strides, deleter, options.requires_grad(::std::nullopt)); + })(); + return autograd::make_variable(tensor, options.requires_grad()); +} + +/// Exposes the given `data` as a `Tensor` without taking ownership of the +/// original data. `sizes` should specify the shape of the tensor, `strides` the +/// stride in each dimension. The `TensorOptions` +/// specify additional configuration options for the returned tensor, such as +/// what type to interpret the `data` as. +inline at::Tensor from_blob( + void* data, + at::IntArrayRef sizes, + at::IntArrayRef strides, + const at::TensorOptions& options = at::TensorOptions()) { + at::Tensor tensor = ([&]() { + at::AutoDispatchBelowAutograd guard; // TODO: remove + at::tracer::impl::NoTracerDispatchMode tracer_guard; + return at::from_blob(data, sizes, strides, options.requires_grad(::std::nullopt)); + })(); + return autograd::make_variable(tensor, options.requires_grad()); +} + +/// Exposes the given `data` as a `Tensor` without taking ownership of the +/// original data. `sizes` should specify the shape of the tensor. The `deleter` +/// (a `std::function`) function will be called on the `data` when +/// the Tensor data would normally be deallocated. The `TensorOptions` specify +/// additional configuration options for the returned tensor, such as what type +/// to interpret the `data` as. +inline at::Tensor from_blob( + void* data, + at::IntArrayRef sizes, + const Deleter& deleter, + const at::TensorOptions& options = at::TensorOptions()) { + at::Tensor tensor = ([&]() { + at::AutoDispatchBelowAutograd guard; // TODO: remove + at::tracer::impl::NoTracerDispatchMode tracer_guard; + return at::from_blob(data, sizes, deleter, options.requires_grad(::std::nullopt)); + })(); + return autograd::make_variable(tensor, options.requires_grad()); +} + +/// Exposes the given `data` as a `Tensor` without taking ownership of the +/// original data. `sizes` should specify the shape of the tensor. The +/// `TensorOptions` specify additional configuration options for the returned +/// tensor, such as what type to interpret the `data` as. +inline at::Tensor from_blob( + void* data, + at::IntArrayRef sizes, + const at::TensorOptions& options = at::TensorOptions()) { + at::Tensor tensor = ([&]() { + at::AutoDispatchBelowAutograd guard; // TODO: remove + at::tracer::impl::NoTracerDispatchMode tracer_guard; + return at::from_blob(data, sizes, options.requires_grad(::std::nullopt)); + })(); + return autograd::make_variable(tensor, options.requires_grad()); +} + +${function_definitions} + +} // namespace torch diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e3f308c5b47558ff35d1beb53cfbb42d9eed4363 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/operator.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/operator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c7aa252c4dbe16464497125bceb0a16bc5b98c16 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/operator.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/selector.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/selector.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6ecaae849c0edf69f827cded3fc2cda6a7c83fa Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/__pycache__/selector.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/operator.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/operator.py new file mode 100644 index 0000000000000000000000000000000000000000..be35a83cb083527841e04fbde6a365de0fc62c5f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/operator.py @@ -0,0 +1,171 @@ +from __future__ import annotations + +from dataclasses import dataclass + + +# This class holds information about a single operator used to determine +# the outcome of a selective/custom PyTorch build that doesn't include +# registration code for all the supported operators. This is done to +# reduce the size of the generated binary so that it can be deployed in +# situations where binary size comes at a premium. +# +@dataclass(frozen=True) +class SelectiveBuildOperator: + # The name of the operator. This includes the aten::, etc... prefix + # The operator name may or may not have the overload name. If this + # operator name does not specify an overload name, the way to determine + # if this entry refers to the family of operators with this base name + # or just the operator with this name is to look at the value of the + # 'include_all_overloads' flag in this class. + name: str + + # True if this is a root operator (i.e. called directly from a + # TorchScript model, etc...). An operator is considered to be a + # root operator if it is called directly from any one of the models + # that this instance of the pytorch library was built for. Hence, it + # may not be a root operator in all of the models that are used in + # this instance of the pytorch library. + is_root_operator: bool + + # Is this operator used for on-device training? If True, then we need to + # use the information to generate code in VariableType_N.cpp for registration + # of training related operators. Again, this is True if this operator + # is used for training in one or more models used by this instance of the + # pytorch library. + is_used_for_training: bool + + # If True, it indicates that this operator instance (object) refers to an + # operator without the overload name and should apply to all overloads + # which have this operator name as the base name. This flag is applicable + # only for objects that have operator names without a DOT (period) character + # in them. + # + # Note: This flag is a temporary workaround to grandfather in the current + # static selective (custom) build mechanism, which largely ignores overload + # names when determining whether to select operators for registration + # purposes. + include_all_overloads: bool + + # Debug Information at the operator level + _debug_info: tuple[str, ...] | None + + @staticmethod + def from_yaml_dict( + op_name: str, op_info: dict[str, object] + ) -> SelectiveBuildOperator: + allowed_keys = { + "name", + "is_root_operator", + "is_used_for_training", + "include_all_overloads", + "debug_info", + } + + if len(set(op_info.keys()) - allowed_keys) > 0: + raise Exception( # noqa: TRY002 + "Got unexpected top level keys: {}".format( + ",".join(set(op_info.keys()) - allowed_keys), + ) + ) + + if "name" in op_info: + assert op_name == op_info["name"] + + is_root_operator = op_info.get("is_root_operator", True) + assert isinstance(is_root_operator, bool) + + is_used_for_training = op_info.get("is_used_for_training", True) + assert isinstance(is_used_for_training, bool) + + include_all_overloads = op_info.get("include_all_overloads", True) + assert isinstance(include_all_overloads, bool) + + debug_info: tuple[str, ...] | None = None + if "debug_info" in op_info: + di_list = op_info["debug_info"] + assert isinstance(di_list, list) + debug_info = tuple(str(x) for x in di_list) + + return SelectiveBuildOperator( + name=op_name, + is_root_operator=is_root_operator, + is_used_for_training=is_used_for_training, + include_all_overloads=include_all_overloads, + _debug_info=debug_info, + ) + + @staticmethod + def from_legacy_operator_name_without_overload( + name: str, + ) -> SelectiveBuildOperator: + return SelectiveBuildOperator( + name=name, + is_root_operator=True, + is_used_for_training=True, + include_all_overloads=True, + _debug_info=None, + ) + + def to_dict(self) -> dict[str, object]: + ret: dict[str, object] = { + "is_root_operator": self.is_root_operator, + "is_used_for_training": self.is_used_for_training, + "include_all_overloads": self.include_all_overloads, + } + if self._debug_info is not None: + ret["debug_info"] = self._debug_info + + return ret + + +def merge_debug_info( + lhs: tuple[str, ...] | None, + rhs: tuple[str, ...] | None, +) -> tuple[str, ...] | None: + # Ensure that when merging, each entry shows up just once. + if lhs is None and rhs is None: + return None + + return tuple(set((lhs or ()) + (rhs or ()))) + + +def combine_operators( + lhs: SelectiveBuildOperator, rhs: SelectiveBuildOperator +) -> SelectiveBuildOperator: + if str(lhs.name) != str(rhs.name): + raise Exception( # noqa: TRY002 + f"Expected both arguments to have the same name, but got '{str(lhs.name)}' and '{str(rhs.name)}' instead" + ) + + return SelectiveBuildOperator( + name=lhs.name, + # Consider this operator to be a root operator if it is a + # root operator in any of the models used in this instance of + # the pytorch library. + is_root_operator=lhs.is_root_operator or rhs.is_root_operator, + # Consider this operator to be a training operator if it is + # an operator used for training in any of the models used + # in this instance of the pytorch library. + is_used_for_training=lhs.is_used_for_training or rhs.is_used_for_training, + include_all_overloads=lhs.include_all_overloads or rhs.include_all_overloads, + _debug_info=merge_debug_info(lhs._debug_info, rhs._debug_info), + ) + + +def merge_operator_dicts( + lhs: dict[str, SelectiveBuildOperator], + rhs: dict[str, SelectiveBuildOperator], +) -> dict[str, SelectiveBuildOperator]: + operators: dict[str, SelectiveBuildOperator] = {} + for op_name, op in list(lhs.items()) + list(rhs.items()): + new_op = op + if op_name in operators: + new_op = combine_operators(operators[op_name], op) + + operators[op_name] = new_op + + return operators + + +def strip_operator_overload_name(op_name: str) -> str: + return op_name.split(".")[0] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/selector.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/selector.py new file mode 100644 index 0000000000000000000000000000000000000000..55c1b85a2dbe573d75234c705ce72a98a501c34e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/selective_build/selector.py @@ -0,0 +1,352 @@ +from __future__ import annotations + +from collections import defaultdict +from collections.abc import Iterable +from dataclasses import dataclass +from typing import TYPE_CHECKING + +import yaml + +from torchgen.selective_build.operator import ( + merge_debug_info, + merge_operator_dicts, + SelectiveBuildOperator, + strip_operator_overload_name, +) + + +if TYPE_CHECKING: + from torchgen.model import NativeFunction + + +# A SelectiveBuilder holds information extracted from the selective build +# YAML specification. +# +# It includes information about the build's selectivity, the debug_info +# associated with this selective build (opaque string), and the set of +# operators that should be included in the build. +# +@dataclass(frozen=True) +class SelectiveBuilder: + # If true, then the build is not selective, and includes all + # operators. + include_all_operators: bool + + # Debug Information at the selective/custom build level. + _debug_info: tuple[str, ...] | None + + # A dictionary of operator -> operator metadata. + operators: dict[str, SelectiveBuildOperator] + + # A dictionary of selected kernel tags and dtypes. Typically a + # PyTorch Operator Kernel (function) may have many code paths + # that are specialized for many many Tensor dtypes, so it's not + # one per kernel function, but there could be many per kernel + # function. The tag isn't a kernel function name, but some fragment + # of the kernel function implementation itself. + kernel_metadata: dict[str, list[str]] + + # ExecuTorch only. A dictionary of kernel tag -> list of (list of input + # dtypes for tensor-like input args). + # This is from selective.yaml + et_kernel_metadata: dict[str, list[str]] + + # A set of all the custom torch bind classes used by the selected models + # Stored as a set internally to remove duplicates proactively, but written + # as a list to yamls + custom_classes: set[str] + + # A set of all the build features used by the selected models + # Stored as a set internally to remove duplicates proactively, but written + # as a list to yamls + build_features: set[str] + + # If true, then fragments for all dtypes for all kernel functions + # are included as well as all custom classes. This is typically set when any one of the + # operator lists is generated from a mechanism other than + # tracing based selective build. + include_all_non_op_selectives: bool + + @staticmethod + def get_nop_selector() -> SelectiveBuilder: + return SelectiveBuilder.from_yaml_dict({"include_all_operators": True}) + + @staticmethod + def from_yaml_dict(data: dict[str, object]) -> SelectiveBuilder: + valid_top_level_keys = { + "include_all_non_op_selectives", + "include_all_operators", + "debug_info", + "operators", + "kernel_metadata", + "et_kernel_metadata", + "custom_classes", + "build_features", + } + top_level_keys = set(data.keys()) + if len(top_level_keys - valid_top_level_keys) > 0: + raise Exception( # noqa: TRY002 + "Got unexpected top level keys: {}".format( + ",".join(top_level_keys - valid_top_level_keys), + ) + ) + include_all_operators = data.get("include_all_operators", False) + assert isinstance(include_all_operators, bool) + + debug_info = None + if "debug_info" in data: + di_list = data["debug_info"] + assert isinstance(di_list, list) + + debug_info = tuple(str(x) for x in di_list) + + operators = {} + operators_dict = data.get("operators", {}) + assert isinstance(operators_dict, dict) + + for k, v in operators_dict.items(): + operators[k] = SelectiveBuildOperator.from_yaml_dict(k, v) + + kernel_metadata = {} + kernel_metadata_dict = data.get("kernel_metadata", {}) + assert isinstance(kernel_metadata_dict, dict) + + for k, v in kernel_metadata_dict.items(): + kernel_metadata[str(k)] = [str(dtype) for dtype in v] + + et_kernel_metadata = data.get("et_kernel_metadata", {}) + assert isinstance(et_kernel_metadata, dict) + + custom_classes = data.get("custom_classes", []) + assert isinstance(custom_classes, Iterable) + custom_classes = set(custom_classes) + + build_features = data.get("build_features", []) + assert isinstance(build_features, Iterable) + build_features = set(build_features) + + include_all_non_op_selectives = data.get("include_all_non_op_selectives", False) + assert isinstance(include_all_non_op_selectives, bool) + + return SelectiveBuilder( + include_all_operators, + debug_info, + operators, + kernel_metadata, + et_kernel_metadata, + custom_classes, # type: ignore[arg-type] + build_features, # type: ignore[arg-type] + include_all_non_op_selectives, + ) + + @staticmethod + def from_yaml_str(config_contents: str) -> SelectiveBuilder: + contents = yaml.safe_load(config_contents) + return SelectiveBuilder.from_yaml_dict(contents) + + @staticmethod + def from_yaml_path(config_path: str) -> SelectiveBuilder: + with open(config_path) as f: + contents = yaml.safe_load(f) + return SelectiveBuilder.from_yaml_dict(contents) + + @staticmethod + def from_legacy_op_registration_allow_list( + allow_list: set[str], is_root_operator: bool, is_used_for_training: bool + ) -> SelectiveBuilder: + operators = {} + for op in allow_list: + operators[op] = { + "name": op, + "is_root_operator": is_root_operator, + "is_used_for_training": is_used_for_training, + "include_all_overloads": True, + } + return SelectiveBuilder.from_yaml_dict( + { + "operators": operators, + "include_all_non_op_selectives": True, + } + ) + + def is_operator_selected(self, name: str) -> bool: + if self.include_all_operators: + return True + + if name in self.operators: + return True + name = strip_operator_overload_name(name) + return name in self.operators and self.operators[name].include_all_overloads + + def is_native_function_selected(self, func: NativeFunction) -> bool: + op_name = op_name_from_native_function(func) + return self.is_operator_selected(op_name) + + def is_operator_selected_for_training(self, name: str) -> bool: + if not self.is_operator_selected(name): + return False + if self.include_all_operators: + return True + + not_training_op = SelectiveBuildOperator( + name="", + is_root_operator=False, + is_used_for_training=False, + include_all_overloads=False, + _debug_info=None, + ) + op = not_training_op + if name in self.operators: + op = self.operators[name] + + name = strip_operator_overload_name(name) + base_op = not_training_op + if name in self.operators: + base_op = self.operators[name] + + return op.is_used_for_training or ( + base_op.include_all_overloads and base_op.is_used_for_training + ) + + def is_native_function_selected_for_training(self, func: NativeFunction) -> bool: + op_name = op_name_from_native_function(func) + return self.is_operator_selected_for_training(op_name) + + def is_root_operator(self, name: str) -> bool: + if not self.is_operator_selected(name): + return False + if self.include_all_operators: + return True + + if name in self.operators: + op: SelectiveBuildOperator = self.operators[name] + return op.is_root_operator + name = strip_operator_overload_name(name) + if name not in self.operators: + return False + base_op: SelectiveBuildOperator = self.operators[name] + return base_op.include_all_overloads and base_op.is_root_operator + + def is_kernel_dtype_selected(self, kernel_tag: str, dtype: str) -> bool: + if self.include_all_operators or self.include_all_non_op_selectives: + return True + + return ( + kernel_tag in self.kernel_metadata + and dtype in self.kernel_metadata[kernel_tag] + ) + + def et_get_selected_kernels(self, op_name: str, kernel_key: list[str]) -> list[str]: + """ + Return a list of kernel keys that cover the used ops + """ + # If no kernel metadata, either it's implied by include_all_operators=True or the op is not used. + if op_name not in self.et_kernel_metadata: + return kernel_key if self.include_all_operators else [] + # Otherwise, only return the specific kernel keys. + + result_set = set() + + for model_kernel_keys in self.et_kernel_metadata[op_name]: + key_found = False + for key in kernel_key: + # Don't compare the version for now + if ( + key != "default" + and key.split("/")[1] == model_kernel_keys.split("/")[1] + ): + result_set.add(key) + key_found = True + break + if not key_found: + if "default" not in kernel_key: + raise Exception("Missing kernel for the model") # noqa: TRY002 + else: + result_set.add("default") + + return list(result_set) + + def to_dict(self) -> dict[str, object]: + ret: dict[str, object] = { + "include_all_non_op_selectives": self.include_all_non_op_selectives, + "include_all_operators": self.include_all_operators, + } + operators = {} + for op_name, op in self.operators.items(): + operators[op_name] = op.to_dict() + ret["operators"] = operators + + if self._debug_info is not None: + ret["debug_info"] = sorted(self._debug_info) + + ret["kernel_metadata"] = { + k: sorted(v) for (k, v) in self.kernel_metadata.items() + } + + ret["et_kernel_metadata"] = self.et_kernel_metadata + + ret["custom_classes"] = sorted(self.custom_classes) + + ret["build_features"] = sorted(self.build_features) + + return ret + + +def merge_kernel_metadata( + lhs: dict[str, list[str]], + rhs: dict[str, list[str]], +) -> dict[str, list[str]]: + kernel_metadata: dict[str, list[str]] = {} + for tag_name, dtypes in list(lhs.items()) + list(rhs.items()): + dtypes_copy = set(dtypes) + if tag_name in kernel_metadata: + dtypes_copy |= set(kernel_metadata[tag_name]) + + kernel_metadata[tag_name] = list(dtypes_copy) + + return kernel_metadata + + +def merge_et_kernel_metadata( + lhs: dict[str, list[str]], + rhs: dict[str, list[str]], +) -> dict[str, list[str]]: + merge_et_kernel_metadata: dict[str, set[str]] = defaultdict(set) + for op in list(lhs.keys()) + list(rhs.keys()): + merge_et_kernel_metadata[op].update(lhs.get(op, [])) + merge_et_kernel_metadata[op].update(rhs.get(op, [])) + + return {op: sorted(val) for op, val in merge_et_kernel_metadata.items()} + + +def combine_selective_builders( + lhs: SelectiveBuilder, rhs: SelectiveBuilder +) -> SelectiveBuilder: + include_all_operators = lhs.include_all_operators or rhs.include_all_operators + debug_info = merge_debug_info(lhs._debug_info, rhs._debug_info) + operators = merge_operator_dicts(lhs.operators, rhs.operators) + kernel_metadata = merge_kernel_metadata(lhs.kernel_metadata, rhs.kernel_metadata) + et_kernel_metadata = merge_et_kernel_metadata( + lhs.et_kernel_metadata, rhs.et_kernel_metadata + ) + include_all_non_op_selectives = ( + lhs.include_all_non_op_selectives or rhs.include_all_non_op_selectives + ) + custom_classes = lhs.custom_classes.union(rhs.custom_classes) + build_features = lhs.build_features.union(rhs.build_features) + return SelectiveBuilder( + include_all_operators, + debug_info, + operators, + kernel_metadata, + et_kernel_metadata, + custom_classes, + build_features, + include_all_non_op_selectives, + ) + + +def op_name_from_native_function(f: NativeFunction) -> str: + # This was originally read from the 'operator_name_with_overload' field in the + # declaration dict, which was the part before the first '(' in 'schema_string'. + return f"{f.namespace}::{f.func.name}" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..56b3d6fdacd8078189e11c1d8347553552c9c725 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/config.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..de31d2755f9d0d1c25413f7c5109b2283c63f010 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/config.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/gen_static_runtime_ops.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/gen_static_runtime_ops.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a513f7be69e9c8ab5acb6c884e0c186fbb5dd297 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/gen_static_runtime_ops.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/generator.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/generator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad171e831f15a00b4c7c325b324fa0d5cc109db6 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/__pycache__/generator.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/config.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/config.py new file mode 100644 index 0000000000000000000000000000000000000000..887949880af482391ba7186a455968f500cb7868 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/config.py @@ -0,0 +1,388 @@ +from __future__ import annotations + +from torchgen.model import NativeFunctionsGroup, NativeFunctionsViewGroup + + +def func_name_base_str(g: NativeFunctionsGroup | NativeFunctionsViewGroup) -> str: + if isinstance(g, NativeFunctionsGroup): + return str(g.functional.func.name.name.base) + else: + return str(g.view.root_name) + + +is_hand_written_ops_ = frozenset( + ( + "abs", + "add", + "addmm", + "all", + "any", + "argmin", + "bmm", + "clamp", + "clamp_min", + "cumsum", + "div", + "fmod", + "index_select", + "leaky_relu", + "linear", + "log", + "matmul", + "mul", + "narrow_copy", + "nonzero", + "pow", + "remainder", + "sigmoid", + "sign", + "sub", + "tanh", + "detach", + "expand_as", + "flatten", + "narrow", + "reshape_as", + "select", + "slice", + "softmax", + "split", + "squeeze", + "transpose", + "view", + "where", + ) +) + + +def is_hand_written(g: NativeFunctionsGroup | NativeFunctionsViewGroup) -> bool: + name_base = func_name_base_str(g) + return name_base in is_hand_written_ops_ + + +def override_test_values(arg_map: dict[str, str], op_name: str, index: int) -> None: + assert index == 0 or index == 1 + if op_name == "addr": + if index == 0: + arg_map["self"] = "at::rand({6, 6})" + arg_map["vec1"] = "at::rand({6})" + arg_map["vec2"] = "at::rand({6})" + else: + arg_map["self"] = "at::rand({22, 22})" + arg_map["vec1"] = "at::rand({22})" + arg_map["vec2"] = "at::rand({22})" + return + if op_name == "mv": + if index == 0: + arg_map["self"] = "at::rand({6, 6})" + arg_map["vec"] = "at::rand({6})" + else: + arg_map["self"] = "at::rand({22, 22})" + arg_map["vec"] = "at::rand({22})" + return + if op_name == "addbmm": + if index == 0: + arg_map["self"] = "at::rand({6, 6})" + else: + arg_map["self"] = "at::rand({22, 22})" + return + if op_name == "cross": + if index == 0: + arg_map["self"] = "at::rand({3, 3, 3})" + arg_map["other"] = "at::rand({3, 3, 3})" + else: + arg_map["self"] = "at::rand({22, 3, 22})" + arg_map["other"] = "at::rand({22, 3, 22})" + return + if op_name == "take": + if index == 0: + arg_map["index"] = "at::randint(0, 216, {20}, torch::kInt64)" + else: + arg_map["index"] = "at::randint(0, 1000, {100}, torch::kInt64)" + return + if op_name == "take_along_dim": + if index == 0: + arg_map["indices"] = "at::argsort(self0, 1, true)" + else: + arg_map["indices"] = "at::argsort(self1, 1, true)" + return + if op_name == "masked_select": + if index == 0: + arg_map["mask"] = "at::randn({6, 6, 6}) > 0.5" + else: + arg_map["mask"] = "at::rand({22, 22, 22}) > 0.5" + return + if op_name == "orgqr": + if index == 0: + arg_map["input2"] = "at::rand({6, 6})" + else: + arg_map["input2"] = "at::rand({22, 22})" + return + if op_name == "ormqr": + if index == 0: + arg_map["input2"] = "at::rand({6, 6})" + else: + arg_map["input2"] = "at::rand({22, 22})" + return + if op_name == "quantile": + if index == 0: + arg_map["q"] = "at::rand({6})" + arg_map["interpolation"] = '"linear"' + else: + arg_map["q"] = "at::rand({22})" + arg_map["interpolation"] = '"linear"' + return + if op_name == "nanquantile": + if index == 0: + arg_map["q"] = "at::rand({6})" + arg_map["interpolation"] = '"linear"' + else: + arg_map["q"] = "at::rand({22})" + arg_map["interpolation"] = '"linear"' + return + if op_name == "multi_margin_loss": + if index == 0: + arg_map["self"] = "at::rand({6, 6})" + arg_map["target"] = "at::randint(6, {6}, torch::kInt64)" + arg_map["weight"] = "at::rand({6})" + else: + arg_map["self"] = "at::rand({22, 22})" + arg_map["target"] = "at::randint(22, {22}, torch::kInt64)" + arg_map["weight"] = "at::rand({22})" + return + if op_name == "multilabel_margin_loss": + if index == 0: + arg_map["self"] = "at::rand({6, 6})" + arg_map["target"] = "at::randint(6, {6, 6}, torch::kInt64)" + else: + arg_map["self"] = "at::rand({22, 22})" + arg_map["target"] = "at::randint(22, {22, 22}, torch::kInt64)" + return + if op_name == "nll_loss": + if index == 0: + arg_map["self"] = "at::rand({6, 6})" + arg_map["target"] = "at::randint(6, {6}, torch::kInt64)" + arg_map["weight"] = "at::rand({6})" + else: + arg_map["self"] = "at::rand({22, 22})" + arg_map["target"] = "at::randint(22, {22}, torch::kInt64)" + arg_map["weight"] = "at::rand({22})" + return + if op_name == "nll_loss2d": + if index == 0: + arg_map["self"] = "at::rand({6, 6, 6, 6})" + arg_map["target"] = "at::randint(6, {6, 6, 6}, torch::kInt64)" + arg_map["weight"] = "at::rand({6})" + else: + arg_map["self"] = "at::rand({22, 22, 22, 22})" + arg_map["target"] = "at::randint(22, {22, 22, 22}, torch::kInt64)" + arg_map["weight"] = "at::rand({22})" + return + if op_name in ( + "fft_fft", + "fft_ifft", + "fft_rfft", + "fft_irfft", + "fft_hfft", + "fft_ihfft", + ): + arg_map["norm"] = '"forward"' + return + if op_name == "linalg_tensorinv": + if index == 0: + arg_map["self"] = "at::rand({6, 6, 6, 6})" + arg_map["ind"] = "2" + else: + arg_map["self"] = "at::rand({22, 22, 22, 22})" + arg_map["ind"] = "2" + return + if op_name == "addmv": + if index == 0: + arg_map["self"] = "at::rand({2})" + arg_map["mat"] = "at::rand({2, 2})" + arg_map["vec"] = "at::rand({2})" + else: + arg_map["self"] = "at::rand({35})" + arg_map["mat"] = "at::rand({35, 35})" + arg_map["vec"] = "at::rand({35})" + return + if op_name == "acosh": + if index == 0: + arg_map["self"] = "at::rand({2, 2, 2}) + at::ones({2, 2, 2})" + else: + arg_map["self"] = "at::rand({5, 5, 5}) + at::ones({5, 5, 5})" + return + if op_name == "adaptive_max_pool2d_backward": + if index == 0: + arg_map["grad_output"] = "at::rand({2, 2, 2}, at::kFloat)" + arg_map["self"] = "at::rand({2, 2, 2}, at::kFloat)" + arg_map["indices"] = "at::randint(0, 1, {2, 2, 2}, at::kLong)" + else: + arg_map["grad_output"] = "at::rand({3, 3, 3}, at::kFloat)" + arg_map["self"] = "at::rand({3, 3, 3}, at::kFloat)" + arg_map["indices"] = "at::randint(0, 1, {3, 3, 3}, at::kLong)" + return + if op_name == "adaptive_max_pool3d_backward": + if index == 0: + arg_map["grad_output"] = "at::rand({2, 2, 2, 2}, at::kFloat)" + arg_map["self"] = "at::rand({2, 2, 2, 2}, at::kFloat)" + arg_map["indices"] = "at::randint(0, 1, {2, 2, 2, 2}, at::kLong)" + else: + arg_map["grad_output"] = "at::rand({3, 3, 3, 3}, at::kFloat)" + arg_map["self"] = "at::rand({3, 3, 3, 3}, at::kFloat)" + arg_map["indices"] = "at::randint(0, 1, {3, 3, 3, 3}, at::kLong)" + return + if op_name == "bitwise_left_shift": + if index == 0: + arg_map["self"] = "at::randint(1, 1 << 4, {6, 6, 6}, at::kInt)" + arg_map["other"] = "at::randint(1, 26, {6, 6, 6}, at::kInt)" + else: + arg_map["self"] = "at::randint(1, 1 << 4, {22, 22, 22}, at::kInt)" + arg_map["other"] = "at::randint(1, 26, {22, 22, 22}, at::kInt)" + return + if op_name == "bitwise_right_shift": + if index == 0: + arg_map["self"] = "at::randint(1 << 21, 1 << 30, {6, 6, 6}, at::kInt)" + arg_map["other"] = "at::randint(1, 22, {6, 6, 6}, at::kInt)" + else: + arg_map["self"] = "at::randint(1 << 21, 1 << 30, {22, 22, 22}, at::kInt)" + arg_map["other"] = "at::randint(1, 22, {22, 22, 22}, at::kInt)" + return + if op_name == "gather": + if index == 0: + arg_map["self"] = "at::randint(1, 100, {2,2,2}, at::kInt)" + arg_map["dim"] = "1" + arg_map["index"] = "at::randint(0, 1, {2,2,2}, torch::kInt64)" + arg_map["sparse_grad"] = "false" + else: + arg_map["self"] = "at::randint(1, 100, {5,5,5}, at::kInt)" + arg_map["dim"] = "1" + arg_map["index"] = "at::randint(0, 4, {5,5,5}, torch::kInt64)" + arg_map["sparse_grad"] = "false" + return + if op_name == "gelu": + if index == 0: + arg_map["self"] = "at::rand({6, 6, 6})" + arg_map["approximate"] = '"tanh"' + else: + arg_map["self"] = "at::rand({22, 22, 22})" + arg_map["approximate"] = '"tanh"' + return + if op_name == "gelu_backward": + if index == 0: + arg_map["grad_output"] = "at::rand({6, 6, 6})" + arg_map["self"] = "at::rand({6, 6, 6})" + arg_map["approximate"] = '"tanh"' + else: + arg_map["grad_output"] = "at::rand({22, 22, 22})" + arg_map["self"] = "at::rand({22, 22, 22})" + arg_map["approximate"] = '"tanh"' + return + if op_name == "index_add": + if index == 0: + arg_map["self"] = "at::rand({2})" + arg_map["dim"] = "0" + arg_map["index"] = "at::randint(0, 1, {2}, at::kInt)" + arg_map["source"] = "at::rand({2})" + arg_map["alpha"] = "2" + else: + arg_map["self"] = "at::rand({16})" + arg_map["dim"] = "0" + arg_map["index"] = "at::randint(0, 10, {16}, at::kInt)" + arg_map["source"] = "at::rand({16})" + arg_map["alpha"] = "2" + return + if op_name == "index_copy": + if index == 0: + arg_map["self"] = "at::rand({2})" + arg_map["dim"] = "0" + arg_map["index"] = "at::randint(0, 1, {2}, at::kLong)" + arg_map["source"] = "at::rand({2})" + else: + arg_map["self"] = "at::rand({32})" + arg_map["dim"] = "0" + arg_map["index"] = "at::randint(0, 10, {32}, at::kLong)" + arg_map["source"] = "at::rand({32})" + return + if op_name == "linalg_cross": + if index == 0: + arg_map["self"] = "at::rand({6, 3, 6})" + arg_map["other"] = "at::rand({6, 3, 6})" + arg_map["dim"] = "1" + else: + arg_map["self"] = "at::rand({22, 3, 22})" + arg_map["other"] = "at::rand({22, 3, 22})" + arg_map["dim"] = "1" + return + if op_name == "nll_loss_backward": + if index == 0: + arg_map["grad_output"] = "at::rand({})" + arg_map["self"] = "at::rand({6})" + arg_map["target"] = "at::randint(0, 5, {6}, torch::kInt64)" + arg_map["weight"] = "at::rand({6})" + arg_map["reduction"] = "1" + arg_map["ignore_index"] = "1" + arg_map["total_weight"] = "at::rand({})" + else: + arg_map["grad_output"] = "at::rand({})" + arg_map["self"] = "at::rand({36})" + arg_map["target"] = "at::randint(0, 11, {36}, torch::kInt64)" + arg_map["weight"] = "at::rand({36})" + arg_map["reduction"] = "1" + arg_map["ignore_index"] = "1" + arg_map["total_weight"] = "at::rand({})" + return + if op_name in ["scatter", "scatter_add", "_scatter_reduce"]: + if index == 0: + arg_map["self"] = "at::randint(1, 100, {2,2,2}, torch::kInt64)" + arg_map["index"] = "at::randint(0, 1, {2,2,2}, torch::kInt64)" + arg_map["src"] = "at::randint(1, 100, {2,2,2}, torch::kInt64)" + else: + arg_map["self"] = "at::randint(1, 100, {5,5,5}, torch::kInt64)" + arg_map["index"] = "at::randint(0, 1, {5,5,5}, torch::kInt64)" + arg_map["src"] = "at::randint(1, 100, {5,5,5}, torch::kInt64)" + if "reduce" in arg_map: + arg_map["reduce"] = '"sum"' if op_name == "_scatter_reduce" else '"add"' + return + if op_name == "scatter_reduce": + arg_map["reduce"] = '"mean"' + if index == 0: + arg_map["index"] = "at::randint(6, {6, 6, 6}, torch::kInt64)" + else: + arg_map["index"] = "at::randint(22, {22, 22, 22}, torch::kInt64)" + return + if op_name == "special_zeta": + if index == 0: + arg_map["self"] = "at::rand({2,2,2}, at::kDouble) + at::ones({2,2,2})" + arg_map["other"] = "at::rand({2,2,2}, at::kDouble) + at::ones({2,2,2})" + else: + arg_map["self"] = "at::rand({5,5,5}, at::kDouble) + at::ones({5,5,5})" + arg_map["other"] = "at::rand({5,5,5}, at::kDouble) + at::ones({5,5,5})" + return + if op_name == "_convert_indices_from_csr_to_coo": + if index == 0: + arg_map["crow_indices"] = "torch::tensor({1}, torch::kInt32)" + arg_map["col_indices"] = "torch::tensor({0, 1, 0}, torch::kInt32)" + arg_map["out_int32"] = "false" + else: + arg_map["crow_indices"] = "torch::tensor({0}, torch::kInt32)" + arg_map["col_indices"] = ( + "torch::tensor({0, 1, 0, 2, 1, 2, 0, 1, 0, 2, 1, 2}, torch::kInt32)" + ) + arg_map["out_int32"] = "false" + return + if op_name == "_convert_indices_from_coo_to_csr": + if index == 0: + arg_map["self"] = "at::randint(0, 3, {2}, at::kInt)" + arg_map["size"] = "10" + arg_map["out_int32"] = "false" + else: + arg_map["self"] = "at::randint(0, 3, {12}, at::kInt)" + arg_map["size"] = "24" + arg_map["out_int32"] = "false" + return + if op_name in ("diagonal", "linalg_diagonal"): + arg_map["offset"] = "0" + arg_map["dim1"] = "2" + arg_map["dim2"] = "1" + return diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/gen_static_runtime_ops.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/gen_static_runtime_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..51cf9f979ffa850a36eec5b4e4dcd36bf7f5d578 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/gen_static_runtime_ops.py @@ -0,0 +1,233 @@ +from __future__ import annotations + +import argparse +import itertools +import os +from typing import TYPE_CHECKING, TypeVar, Union + +from libfb.py.log import set_simple_logging # type: ignore[import] + +from torchgen import gen +from torchgen.context import native_function_manager +from torchgen.model import DispatchKey, NativeFunctionsGroup, NativeFunctionsViewGroup +from torchgen.static_runtime import config, generator + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +# Given a list of `grouped_native_functions` sorted by their op names, return a list of +# lists each of which groups ops that share the base name. For example, `mean` and +# `mean.dim` are grouped together by this function. + +NativeGroupT = TypeVar( + "NativeGroupT", + bound=Union[NativeFunctionsGroup, NativeFunctionsViewGroup], +) + + +def group_functions_by_op_name( + grouped_native_functions: Sequence[NativeGroupT], +) -> Sequence[Sequence[NativeGroupT]]: + if not grouped_native_functions: + return [] + groups = [] + + def is_supported(g: NativeFunctionsGroup | NativeFunctionsViewGroup) -> bool: + with native_function_manager(g): + return generator.is_supported(g) + + eligible_ops = (g for g in grouped_native_functions if is_supported(g)) + groups = [ + list(group) + for k, group in ( + itertools.groupby( + eligible_ops, + key=config.func_name_base_str, + ) + ) + ] + + return groups + + +def clang_format(cpp_file_path: str) -> None: + import subprocess + + subprocess.check_call(["clang-format", "-i", cpp_file_path]) + + +def write_cpp(cpp_ops: Sequence[str], file_path: str) -> None: + code = "\n".join(cpp_ops) + generated = f"""// @lint-ignore-every CLANGTIDY HOWTOEVEN +// AUTO-GENERATED FROM: torchgen/static_runtime/gen_static_runtime_ops.py +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace torch {{ +namespace jit {{ + +{code} + +}} // namespace jit +}} // namespace torch +""" + with open(file_path, "w") as f: + f.write(generated) + clang_format(file_path) + + +def write_test_cpp(cpp_ops: Sequence[str], file_path: str) -> None: + code = "\n".join(cpp_ops) + generated = f"""// @lint-ignore-every CLANGTIDY HOWTOEVEN +// AUTO-GENERATED FROM: torchgen/static_runtime/gen_static_runtime_ops.py +#include +#include +#include + +#include "test_utils.h" + +using namespace caffe2; +using namespace torch; +using namespace torch::jit; +using namespace torch::jit::test; +using c10::IValue; + +{code} + +""" + with open(file_path, "w") as f: + f.write(generated) + clang_format(file_path) + + +def main() -> None: + parser = argparse.ArgumentParser(description="Generate ATen source files") + parser.add_argument( + "-s", + "--source-path", + help="path to source directory for ATen", + default="caffe2/aten/src/ATen", + ) + parser.add_argument( + "-p", + "--generated-ops-cpp-path", + help="path to directory to generate op dispatcher .cpp file", + default="caffe2/torch/csrc/jit/runtime/static/generated_ops.cpp", + ) + parser.add_argument( + "-t", + "--generated-ops-test-cpp-path", + help="path to directory to generate op dispatcher .cpp file", + default="caffe2/benchmarks/static_runtime/test_generated_ops.cc", + ) + options = parser.parse_args() + native_yaml_path = os.path.join(options.source_path, "native/native_functions.yaml") + tags_yaml_path = os.path.join(options.source_path, "native/tags.yaml") + parsed_yaml = gen.parse_native_yaml(native_yaml_path, tags_yaml_path) + native_functions, backend_indices = ( + parsed_yaml.native_functions, + parsed_yaml.backend_indices, + ) + + op_generator = generator.GenOpDispatcher() + test_case_generator = generator.GenOpTestCase() + + native_functions_groups = [ + g + for g in gen.get_grouped_native_functions(native_functions) + if isinstance(g, NativeFunctionsGroup) + ] + + supported_functions_groups = group_functions_by_op_name(native_functions_groups) + + out_variant_op_result = [ + op_generator.out_variant(groups, backend_indices[DispatchKey.CPU]) + for groups in supported_functions_groups + ] + out_variant_test_result = [ + test_case_generator.out_variant(groups) for groups in supported_functions_groups + ] + + native_functions_view_groups = [ + g + for g in gen.get_grouped_by_view_native_functions(native_functions) + if isinstance(g, NativeFunctionsViewGroup) + ] + + supported_functions_view_groups = group_functions_by_op_name( + native_functions_view_groups + ) + + view_op_result = [ + op_generator.view(groups, backend_indices[DispatchKey.CPU]) + for groups in supported_functions_view_groups + ] + view_test_result = [ + test_case_generator.view(groups) for groups in supported_functions_view_groups + ] + + op_result = out_variant_op_result + ["\n\n"] + view_op_result + test_result = out_variant_test_result + ["\n\n"] + view_test_result + + write_cpp(op_result, options.generated_ops_cpp_path) + write_test_cpp(test_result, options.generated_ops_test_cpp_path) + + print( + "\ntotal grouped native ops: %d" + % len(gen.get_grouped_native_functions(native_functions)) + ) + + print("grouped native ops with out variant: %d" % len(native_functions_groups)) + supported_functions_num = sum(len(groups) for groups in supported_functions_groups) + print("generated functions groups with out variant: %d" % supported_functions_num) + + print("\nview grouped native ops: %d" % len(native_functions_view_groups)) + supported_view_functions_num = sum( + len(groups) for groups in supported_functions_view_groups + ) + print("generated functions view groups: %d" % supported_view_functions_num) + + print( + "\noverall generated : %d" + % (supported_functions_num + supported_view_functions_num) + ) + + +if __name__ == "__main__": + set_simple_logging(escape_newlines=False) + main() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/generator.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/generator.py new file mode 100644 index 0000000000000000000000000000000000000000..2c9635689ebcbded37a16065cc8b2f07733fa747 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchgen/static_runtime/generator.py @@ -0,0 +1,813 @@ +from __future__ import annotations + +import json +import logging +import math +from typing import TYPE_CHECKING + +import torchgen.api.cpp as cpp +from torchgen.context import native_function_manager +from torchgen.model import ( + Argument, + BackendIndex, + BaseTy, + BaseType, + FunctionSchema, + NativeFunctionsGroup, + NativeFunctionsViewGroup, + OptionalType, + SelfArgument, + TensorOptionsArguments, + Type, +) +from torchgen.static_runtime import config + + +if TYPE_CHECKING: + from collections.abc import Sequence + + +logger: logging.Logger = logging.getLogger() + + +def has_alias( + arguments: Sequence[Argument | SelfArgument | TensorOptionsArguments], +) -> bool: + for arg in arguments: + annotation = getattr(arg, "annotation", None) + if not annotation: + continue + alias_set = getattr(annotation, "alias_set", ()) + if alias_set: + return True + return False + + +BLOCKED_OPS = frozenset( + ( + # non cpu ops + "sparse_sampled_addmm", + "hspmm", + "linalg_svdvals", + # sparse ops + "sspaddmm", + "coalesce", + "_indices", + "indices", + "_values", + "values", + "crow_indices", + "col_indices", + # deprecated ops + "floor_divide", + "ger", + # buggy ops + "conj_physical", # P495807361 + "binary_cross_entropy", # P496394764 + "arccosh", + # uncommon ops + "cholesky", + "lu_solve", + "linalg_cholesky", + "linalg_householder_product", + "linalg_ldl_solve", + "_compute_linear_combination", + # training related ops + "_make_dual", + # cannot call directly + "_fw_primal", + # no documentation + "_index_reduce", + # TODO: these ones got added recently and need manual inspection + "_new_zeros_with_same_feature_meta", + "_conj_physical", + "binary_cross_entropy_with_logits", + "bincount", + "conv_tbc", + "copy", + "_copy_from", + "_copy_from_and_resize", + "count_nonzero", + "cudnn_affine_grid_generator", + "cudnn_affine_grid_generator_backward", + "cudnn_grid_sampler", + "diag_embed", + "embedding", + "embedding_dense_backward", + "_embedding_bag_dense_backward", + "_embedding_bag_per_sample_weights_backward", + "grid_sampler_2d", + "_grid_sampler_2d_cpu_fallback", + "grid_sampler_3d", + "isnan", + "mkldnn_linear", + "median", + "nanmedian", + "_sparse_sparse_matmul", + "batch_norm_backward_elemt", + "_euclidean_dist", + "pixel_shuffle", + "pixel_unshuffle", + "channel_shuffle", + "_reshape_nested_backward", + "relu", + "prelu", + "celu", + "slice_scatter", + "select_scatter", + "diagonal_scatter", + "sum", + "_mkldnn_transpose", + "_nested_tensor_from_mask", + "_nested_from_padded", + "_nested_tensor_size", + "_nested_from_padded_and_nested_example", + "_standard_gamma_grad", + "_dirichlet_grad", + "native_norm", + "_sparse_softmax", + "_sparse_softmax_backward_data", + "_sparse_log_softmax", + "_sparse_log_softmax_backward_data", + "zero", + "_sparse_addmm", + "sparse_mask", + "_sparse_mask_projection", + "_to_dense", + "_coalesce", + "_coalesced", + "copy_sparse_to_sparse", + "to_sparse", + "to_sparse_csr", + "to_sparse_csc", + "to_mkldnn", + "quantize_per_tensor_dynamic", + "quantize_per_channel", + "q_per_channel_scales", + "q_per_channel_zero_points", + "int_repr", + "_make_per_channel_quantized_tensor", + "set", + "lift", + "lift_fresh", + "lift_fresh_copy", + "masked_scatter", + "_masked_softmax", + "_masked_softmax_backward", + "put", + "index_reduce", + "trace", + "_cholesky_solve_helper", + "dist", + "max", + "_torch_cuda_cu_linker_symbol_op", + "glu_jvp", + "glu_backward_jvp", + "hardswish_backward", + "rrelu_with_noise_backward", + "mkldnn_adaptive_avg_pool2d_backward", + "_adaptive_avg_pool2d_backward", + "_adaptive_avg_pool3d_backward", + "isinf", + "linalg_lu_solve", + "linalg_vecdot", + "linalg_matrix_exp", + "linalg_eigvalsh", + "_test_warn_in_autograd", + "_test_autograd_multiple_dispatch_view", + "_test_autograd_multiple_dispatch_view_copy", + "_segment_reduce", + "_segment_reduce_backward", + "_fw_primal_copy", + "_make_dual_copy", + "view_as_real_copy", + "view_as_complex_copy", + "_conj_copy", + "_neg_view_copy", + "diagonal_copy", + "detach_copy", + "squeeze_copy", + "t_copy", + "unsqueeze_copy", + "_indices_copy", + "_values_copy", + "indices_copy", + "values_copy", + "crow_indices_copy", + "col_indices_copy", + "ccol_indices", + "ccol_indices_copy", + "row_indices", + "row_indices_copy", + "unfold_copy", + "alias_copy", + "_triton_multi_head_attention", + "special_airy_ai", + "special_bessel_j0", + "special_bessel_j1", + "special_bessel_y0", + "special_bessel_y1", + "special_chebyshev_polynomial_t", + "special_chebyshev_polynomial_u", + "special_chebyshev_polynomial_v", + "special_chebyshev_polynomial_w", + "special_hermite_polynomial_h", + "special_hermite_polynomial_he", + "special_laguerre_polynomial_l", + "special_legendre_polynomial_p", + "special_modified_bessel_i0", + "special_modified_bessel_i1", + "special_modified_bessel_k0", + "special_modified_bessel_k1", + "special_scaled_modified_bessel_k0", + "special_scaled_modified_bessel_k1", + "special_shifted_chebyshev_polynomial_t", + "special_shifted_chebyshev_polynomial_u", + "special_shifted_chebyshev_polynomial_v", + "special_shifted_chebyshev_polynomial_w", + "special_spherical_bessel_j0", + "_foobar", + "_nested_tensor_strides", + "_nested_tensor_storage_offsets", + "_nested_get_values", # no CPU backend + "_nested_get_values_copy", # no CPU backend + "_nested_view_from_jagged", # testing needs to be patched + "_nested_view_from_jagged_copy", # testing needs to be patched + "_nested_view_from_buffer", # testing needs to be patched + "_nested_view_from_buffer_copy", # testing needs to be patched + "_int_mm", # testing needs to be patched + "_to_sparse_csc", # testing needs to be patched + "_to_sparse_csr", # testing needs to be patched + "segment_reduce", # testing needs to be patched + ) +) + + +def is_supported(g: NativeFunctionsGroup | NativeFunctionsViewGroup) -> bool: + base_op_name = "" + func = None + if isinstance(g, NativeFunctionsViewGroup): + base_op_name = g.view.root_name + func = g.view.func + else: + base_op_name = g.out.func.name.name.base + func = g.out.func + if config.is_hand_written(g): + logger.info("HAND WRITTEN: %s", base_op_name) + return False + if base_op_name in BLOCKED_OPS: + logger.info("BLOCKED: %s", base_op_name) + return False + for arg in func.schema_order_arguments(): + maybe_method = ivalue_type_conversion_method(arg.type) + if not maybe_method: + # Type converting is unsupported yet. + logger.info("NOT SUPPORTED TYPE CONVERTING: %s", func) + return False + + if isinstance(g, NativeFunctionsViewGroup): + # TODO: stop doing type tests by converting to C++ and then testing + # the string, just test the dang thing directly + if "at::Tensor" != cpp.returns_type(func.returns, symint=False).cpp_type(): + # Returns a non-Tensor value. + logger.info("NON-TENSOR RET TYPE: %s", str(func)) + return False + return True + + # For out variant ops, we need to check the arguments of its functional func. + for arg in g.functional.func.schema_order_arguments(): + maybe_method = ivalue_type_conversion_method(arg.type) + if not maybe_method: + # Type converting is unsupported yet. + logger.info("NOT SUPPORTED TYPE CONVERTING: %s", g.functional.func) + return False + + if not g.structured: + # In case of unstructured op, we check if it has out variant implementation. + # The out variant implementation satisfies the minimum requirement that it has the output tensor as the last + # parameter. + if ( + not hasattr(g, "out") + or not str(func).endswith("Tensor(a!) out) -> Tensor(a!)") + or not str(func.name).endswith(".out") + ): + return False + # TODO: stop type testing by converting to C++ + if "at::Tensor &" != cpp.returns_type(func.returns, symint=False).cpp_type(): + logger.info("NON_TENSOR RET TYPE: %s", func) + return False + if has_alias(func.arguments.non_out): + # This op may create an alias of inputs. + logger.info("INPUTS ALIAS: %s", base_op_name) + return False + return True + + +def ivalue_type_conversion_method( + arg_type: BaseType | OptionalType | Type, +) -> tuple[bool, str] | None: + """ + Return the method call expression of `c10::ivalue' to convert its contained value to + the expected value of `arg_type` type. For example, for `arg_type` == BaseTy.Tensor, + this function returns ".toTensor()", so that it can be appended to the ivalue's + variable name to get the value of the expected type. + """ + type_conversion_methods = { + BaseTy.Tensor: ((True, "toTensor()"), (False, "toOptional()")), + BaseTy.int: ((False, "toInt()"), (False, "toOptional()")), + BaseTy.bool: ((False, "toBool()"), (False, "toOptional()")), + BaseTy.Scalar: ((False, "toScalar()"), (False, "toOptional()")), + BaseTy.ScalarType: ( + (False, "toScalarType()"), + (False, "toOptional()"), + ), + BaseTy.str: ( + (False, "toStringView()"), + (False, "toOptional()"), + ), + } + + base_ty_object = None + if isinstance(arg_type, BaseType): + base_ty_object = arg_type.name + elif isinstance(arg_type, OptionalType): + if not isinstance(arg_type.elem, BaseType): + # ListType is currently unsupported. + return None + base_ty_object = arg_type.elem.name + else: + return None + + if base_ty_object not in type_conversion_methods: + return None + methods = type_conversion_methods[base_ty_object] + if isinstance(arg_type, BaseType): + return methods[0] + return methods[1] + + +should_use_int_tensor_ops_ = frozenset( + ( + "bitwise_not", + "bitwise_and", + "bitwise_or", + "bitwise_xor", + "bitwise_left_shift", + "bitwise_right_shift", + "gcd", + "lcm", + "scatter", + "gather", + "_convert_indices_from_coo_to_csr", + "_convert_indices_from_csr_to_coo", + ) +) +should_use_complex_tensor_ops_ = frozenset(("view_as_real", "imag", "_conj")) + + +def should_use_int_tensor(op_name: str) -> bool: + return op_name in should_use_int_tensor_ops_ + + +def should_use_complex_tensor(op_name: str) -> bool: + return op_name in should_use_complex_tensor_ops_ + + +test_tensor_dim_ops_1_ = frozenset( + ( + "addmv", + "index_add", + "_convert_indices_from_coo_to_csr", + "_convert_indices_from_csr_to_coo", + "nll_loss_backward", + "dot", + "vdot", + "outer", + "ger", + ) +) +test_tensor_dim_ops_2_ = frozenset( + ("addmm", "mm", "nuclear_norm", "diag", "_addmm_activation", "matrix_H", "t") +) + + +def test_tensor_dim(op_name: str) -> int: + if op_name in test_tensor_dim_ops_1_: + return 1 + if op_name in test_tensor_dim_ops_2_: + return 2 + return 3 + + +test_tensor_shapes_string = '{"view_as_complex": "{2, 2}"}' +test_tensor_shape_json: dict[str, str] = json.loads(test_tensor_shapes_string) + + +def test_tensor_shape(op_name: str) -> str: + if op_name in test_tensor_shape_json: + return test_tensor_shape_json[op_name] + else: + return "" + + +def test_value_expression( + arg_type: BaseType | OptionalType | Type, index: int, op_name: str +) -> str: + tensor_size_ex = test_tensor_shape(op_name) + if tensor_size_ex == "": + num_tensors = 16 if index == 0 else 64 + num_dim = test_tensor_dim(op_name) + size_per_dim = math.ceil(num_tensors / float(num_dim)) + size_per_dim += size_per_dim % 2 + tensor_size_ex = "{{{}}}".format(",".join([f"{size_per_dim}"] * num_dim)) + if should_use_int_tensor(op_name): + tensor_expression = f"at::randint(1, 100, {tensor_size_ex}, at::kInt)" + elif should_use_complex_tensor(op_name): + tensor_expression = f"at::randn({tensor_size_ex}, at::kComplexFloat)" + else: + tensor_expression = f"at::rand({tensor_size_ex})" + + value_expressions = { + BaseTy.Tensor: tensor_expression, + BaseTy.int: "1", + BaseTy.bool: "false", + BaseTy.Scalar: "2", + BaseTy.ScalarType: "at::ScalarType::Float", + BaseTy.str: '"floor"', + } + + base_ty_object = None + if isinstance(arg_type, BaseType): + base_ty_object = arg_type.name + else: + assert isinstance(arg_type, OptionalType) and isinstance( + arg_type.elem, BaseType + ) + base_ty_object = arg_type.elem.name + assert base_ty_object in value_expressions, "not expected type" + value_expression = value_expressions[base_ty_object] + return value_expression + + +def generate_test_value_definitions(schema: FunctionSchema, index: int) -> str: + assert not schema.is_out_fn() + schema_name = schema.name.name.base + arg_map = {} + for arg in schema.schema_order_arguments(): + test_value_exp = test_value_expression(arg.type, index, schema_name) + arg_map[arg.name] = test_value_exp + config.override_test_values(arg_map, schema_name, index) + arg_populations = [] + for arg_name, arg_value in arg_map.items(): + arg_populations.append(f"auto {arg_name}{index} = {arg_value}") + return ";\n ".join(arg_populations) + ";" + + +def generate_test_value_names(schema: FunctionSchema, index: int) -> str: + assert not schema.is_out_fn() + return ",".join(f"{arg.name}{index}" for arg in schema.schema_order_arguments()) + + +generate_test_ir_arguments_base_ty_to_type_str_ = { + BaseTy.Tensor: "Tensor", + BaseTy.int: "int", + BaseTy.float: "float", + BaseTy.str: "str", + BaseTy.Scalar: "int", + BaseTy.ScalarType: "int", + BaseTy.bool: "bool", +} + + +def generate_test_ir_arguments( + schema: FunctionSchema, +) -> list[tuple[str, str | None]]: + def ir_argument(arg: Argument) -> tuple[str, str | None]: + t = arg.type + add_optional = False + if isinstance(t, OptionalType): + t = t.elem + add_optional = True + assert isinstance(t, BaseType) + type_str = None + if t.name in generate_test_ir_arguments_base_ty_to_type_str_: + type_str = generate_test_ir_arguments_base_ty_to_type_str_[t.name] + if type_str and add_optional: + type_str = f"{type_str}?" + return ("%" + arg.name, type_str) + + return [ir_argument(arg) for arg in schema.schema_order_arguments()] + + +def generate_arg_extraction(schema: FunctionSchema) -> str: + arg_populations = [] + for i, arg in enumerate(schema.schema_order_arguments()): + maybe_method = ivalue_type_conversion_method(arg.type) + assert maybe_method + is_reference, type_conversion_method = maybe_method + reference = "&" if is_reference else "" + arg_populations.append( + f"const auto{reference} {arg.name} = p_node->Input({i}).{type_conversion_method}" + ) + return ";\n ".join(arg_populations) + ";" + + +def get_kernel_name(g: NativeFunctionsGroup, backend_index: BackendIndex) -> str: + kernel = backend_index.get_kernel(g.functional) + if g.structured or kernel is None: + return cpp.name(g.functional.func) + return kernel.kernel + + +def get_out_kernel_name(g: NativeFunctionsGroup, backend_index: BackendIndex) -> str: + kernel = backend_index.get_kernel(g.out) + if g.structured or kernel is None: + return cpp.name(g.out.func) + return kernel.kernel + + +def generate_non_out_variant_call( + g: NativeFunctionsGroup, backend_index: BackendIndex +) -> str: + schema = g.functional.func + assert not schema.is_out_fn() + kernel_name = get_kernel_name(g, backend_index) + arg_names = (arg.name for arg in schema.schema_order_arguments()) + namespace_name = "cpu" if g.structured else "native" + return f'at::{namespace_name}::{kernel_name}({",".join(arg_names)})' + + +def generate_call_to_view_ops( + g: NativeFunctionsViewGroup, backend_index: BackendIndex +) -> str: + schema = g.view.func + kernel_name = cpp.name(schema) + kernel = backend_index.get_kernel(g.view) + if kernel: + kernel_name = kernel.kernel + arg_names = (arg.name for arg in schema.schema_order_arguments()) + namespace_name = "native" + return f'at::{namespace_name}::{kernel_name}({",".join(arg_names)})' + + +def generate_out_variant_call( + g: NativeFunctionsGroup, backend_index: BackendIndex +) -> str: + schema = g.out.func + assert schema.is_out_fn() + arg_names = [] + kernel_name = get_out_kernel_name(g, backend_index) + if g.structured: + # structured op starts with the output tensor argument. + arg_names = [out_arg.name for out_arg in schema.arguments.out] + else: + arg_names = [] + for arg in schema.arguments.non_out: + if isinstance(arg, SelfArgument): + arg_names.append(arg.argument.name) + else: + assert isinstance(arg, Argument) + arg_names.append(arg.name) + if not g.structured: + assert len(schema.arguments.out) == 1 + arg_names.append(schema.arguments.out[0].name) + cpp_arg_names = ",".join(arg_names) + namespace_name = "cpu" if g.structured else "native" + return f"at::{namespace_name}::{kernel_name}({cpp_arg_names})" + + +no_memory_resize_ops = frozenset( + ( + "isin.Scalar_Tensor", + "index_add", + "dot", + "vdot", + "nuclear_norm", + "histc", + "l1_loss", + "multi_margin_loss", + "multilabel_margin_loss", + "nll_loss", + "nll_loss2d", + "prod", + ) +) + + +def should_check_resize(schema: FunctionSchema) -> bool: + schema_str = str(schema) + type_variant_op_name = schema_str[: schema_str.find("(")] + return type_variant_op_name not in no_memory_resize_ops + + +def op_name_from_group(g: NativeFunctionsGroup) -> str: + return g.functional.func.name.name.base + + +class GenOpDispatcher: + def out_variant( + self, groups: Sequence[NativeFunctionsGroup], backend_index: BackendIndex + ) -> str: + if not groups: + return "" + generated_type_variants = [] + for g in groups: + with native_function_manager(g): + assert is_supported(g) + assert isinstance(g, NativeFunctionsGroup) + generated_type_variant = self.out_variant_op_generator(g, backend_index) + generated_type_variants.append(generated_type_variant) + op_name = op_name_from_group(groups[0]) + body = "\n".join(generated_type_variants) + generated = f""" +REGISTER_OPERATOR_FUNCTOR( + aten::{op_name}, + aten_{op_name}, + [](Node* n) -> SROperator {{ + {body} + LogAndDumpSchema(n); + return nullptr; + }}) +""" + return generated + + def view( + self, groups: Sequence[NativeFunctionsViewGroup], backend_index: BackendIndex + ) -> str: + if not groups: + return "" + generated_type_variants = [] + for g in groups: + with native_function_manager(g): + assert is_supported(g) + assert isinstance(g, NativeFunctionsViewGroup) + generated_type_variant = self.view_op_generator(g, backend_index) + generated_type_variants.append(generated_type_variant) + op_name = config.func_name_base_str(groups[0]) + body = "\n".join(generated_type_variants) + generated = f""" +REGISTER_NATIVE_OPERATOR_FUNCTOR( + aten::{op_name}, + aten_{op_name}, + [](Node* n) -> SROperator {{ + {body} + LogAndDumpSchema(n); + return nullptr; + }}); +""" + return generated + + def out_variant_op_generator( + self, g: NativeFunctionsGroup, backend_index: BackendIndex + ) -> str: + functional = g.functional + schema = str(functional.func) + populated_argument = generate_arg_extraction(g.functional.func) + functional_variant_call = generate_non_out_variant_call(g, backend_index) + assert len(g.out.func.arguments.out) == 1 + out_variable_name = str(g.out.func.arguments.out[0].name) + out_variant_call = generate_out_variant_call(g, backend_index) + generated = f""" + if (n->matches(torch::schema("aten::{schema}"))) {{ + return [](ProcessedNode* p_node) {{ + {populated_argument} + if (p_node->Output(0).isNone()) {{ + p_node->Output(0) = {functional_variant_call}; + return; + }} + auto& {out_variable_name} = p_node->Output(0).toTensor(); + fastResizeToZero({out_variable_name}); + {out_variant_call}; + }}; + }}""" + return generated + + def view_op_generator( + self, g: NativeFunctionsViewGroup, backend_index: BackendIndex + ) -> str: + schema = str(g.view.func) + populated_argument = generate_arg_extraction(g.view.func) + functional_variant_call = generate_call_to_view_ops(g, backend_index) + generated = f""" + if (n->matches(torch::schema("aten::{schema}"))) {{ + return [](ProcessedNode* p_node) {{ + {populated_argument} + p_node->Output(0) = {functional_variant_call}; + }}; + }}""" + return generated + + +class GenOpTestCase: + def out_variant(self, groups: Sequence[NativeFunctionsGroup]) -> str: + if not groups: + return "" + generated_type_variants = [] + for g in groups: + with native_function_manager(g): + assert is_supported(g) + assert isinstance(g, NativeFunctionsGroup) + generated_type_variant = self.out_variant_op_test_case_generator(g) + generated_type_variants.append(generated_type_variant) + return "\n".join(generated_type_variants) + + def view(self, groups: Sequence[NativeFunctionsViewGroup]) -> str: + if not groups: + return "" + generated_type_variants = [] + for g in groups: + with native_function_manager(g): + assert is_supported(g) + assert isinstance(g, NativeFunctionsViewGroup) + generated_type_variant = self.view_op_test_case_generator(g) + generated_type_variants.append(generated_type_variant) + return "\n".join(generated_type_variants) + + def out_variant_op_test_case_generator(self, g: NativeFunctionsGroup) -> str: + schema = g.functional.func + schema_str = str(schema) + assert schema_str.find("(") > 0 + type_variant_op_name = schema_str[: schema_str.find("(")].replace(".", "_") + op_name = op_name_from_group(g) + assert type_variant_op_name.startswith(op_name) + + arg_types = generate_test_ir_arguments(schema) + arg_declarations = ", ".join( + ( + arg_name if arg_type is None else f"{arg_name}: {arg_type}" + for arg_name, arg_type in arg_types + ) + ) + arg_names = ", ".join((arg_name for arg_name, _ in arg_types)) + assert ( + len(schema.returns) == 1 + and isinstance(schema.returns[0].type, BaseType) + and schema.returns[0].type.name is BaseTy.Tensor + ) + test_value_definitions = generate_test_value_definitions(schema, 0) + test_value_names = generate_test_value_names(schema, 0) + test_value_definitions2 = generate_test_value_definitions(schema, 1) + test_value_names2 = generate_test_value_names(schema, 1) + check_resize = "true" if should_check_resize(schema) else "false" + generated = f""" +TEST(StaticRuntime, autogen_{type_variant_op_name}) {{ + const std::string script = R"IR( + graph({arg_declarations}): + %bias: None = prim::Constant() + %ret = aten::{op_name}({arg_names}) + %cloned = aten::clone(%ret, %bias) + return (%cloned) + )IR"; + + {test_value_definitions} + std::vector args{{{test_value_names}}}; + testStaticRuntime(script, args, {{}}, /*use_allclose=*/false, /*use_equalnan=*/false, /*check_resize=*/{check_resize}); + + {test_value_definitions2} + std::vector args2{{{test_value_names2}}}; + testStaticRuntime(script, args, args2, /*use_allclose=*/false, /*use_equalnan=*/false, /*check_resize=*/{check_resize}); + +}} +""" + return generated + + def view_op_test_case_generator(self, g: NativeFunctionsViewGroup) -> str: + schema = g.view.func + schema_str = str(schema) + assert schema_str.find("(") > 0 + type_variant_op_name = schema_str[: schema_str.find("(")].replace(".", "_") + op_name = g.view.root_name + assert type_variant_op_name.startswith(op_name) + + arg_types = generate_test_ir_arguments(schema) + arg_declarations = ", ".join( + ( + arg_name if arg_type is None else f"{arg_name}: {arg_type}" + for arg_name, arg_type in arg_types + ) + ) + arg_names = ", ".join((arg_name for arg_name, _ in arg_types)) + assert ( + len(schema.returns) == 1 + and isinstance(schema.returns[0].type, BaseType) + and schema.returns[0].type.name is BaseTy.Tensor + ) + test_value_definitions = generate_test_value_definitions(schema, 0) + test_value_names = generate_test_value_names(schema, 0) + generated = f""" +TEST(StaticRuntime, autogen_{type_variant_op_name}) {{ + const std::string script = R"IR( + graph({arg_declarations}): + %bias: None = prim::Constant() + %ret = aten::{op_name}({arg_names}) + %cloned = aten::clone(%ret, %bias) + return (%cloned) + )IR"; + + {test_value_definitions} + std::vector args{{{test_value_names}}}; + testStaticRuntime(script, args); +}} +""" + + return generated diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fbcf77152cc1a17b179bc6b46c8fa02861f7328 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_internally_replaced_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_internally_replaced_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..86798d16665f3ec51e25ea845dcde428253d0f0f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_internally_replaced_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_meta_registrations.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_meta_registrations.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7f5fa63b192d1cd3e73bab85c62283a05a5a0a5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_meta_registrations.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3aba77d50fba57ee3f9991df86ccc85430a76acd Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/extension.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/extension.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bcde3969ffb0a0341479ca73210eaa9004ee96b2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/extension.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f0f0dd12b9f999a433a1cc8e20bd5e6e3d29297 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/version.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/version.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a997478bd06df08731e134664967a94a8b5ed9f3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/__pycache__/version.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..deee558cd75dc357db43e5cb5b28f040c6648eeb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__init__.py @@ -0,0 +1,147 @@ +from ._optical_flow import FlyingChairs, FlyingThings3D, HD1K, KittiFlow, Sintel +from ._stereo_matching import ( + CarlaStereo, + CREStereo, + ETH3DStereo, + FallingThingsStereo, + InStereo2k, + Kitti2012Stereo, + Kitti2015Stereo, + Middlebury2014Stereo, + SceneFlowStereo, + SintelStereo, +) +from .caltech import Caltech101, Caltech256 +from .celeba import CelebA +from .cifar import CIFAR10, CIFAR100 +from .cityscapes import Cityscapes +from .clevr import CLEVRClassification +from .coco import CocoCaptions, CocoDetection +from .country211 import Country211 +from .dtd import DTD +from .eurosat import EuroSAT +from .fakedata import FakeData +from .fer2013 import FER2013 +from .fgvc_aircraft import FGVCAircraft +from .flickr import Flickr30k, Flickr8k +from .flowers102 import Flowers102 +from .folder import DatasetFolder, ImageFolder +from .food101 import Food101 +from .gtsrb import GTSRB +from .hmdb51 import HMDB51 +from .imagenet import ImageNet +from .imagenette import Imagenette +from .inaturalist import INaturalist +from .kinetics import Kinetics +from .kitti import Kitti +from .lfw import LFWPairs, LFWPeople +from .lsun import LSUN, LSUNClass +from .mnist import EMNIST, FashionMNIST, KMNIST, MNIST, QMNIST +from .moving_mnist import MovingMNIST +from .omniglot import Omniglot +from .oxford_iiit_pet import OxfordIIITPet +from .pcam import PCAM +from .phototour import PhotoTour +from .places365 import Places365 +from .rendered_sst2 import RenderedSST2 +from .sbd import SBDataset +from .sbu import SBU +from .semeion import SEMEION +from .stanford_cars import StanfordCars +from .stl10 import STL10 +from .sun397 import SUN397 +from .svhn import SVHN +from .ucf101 import UCF101 +from .usps import USPS +from .vision import VisionDataset +from .voc import VOCDetection, VOCSegmentation +from .widerface import WIDERFace + +__all__ = ( + "LSUN", + "LSUNClass", + "ImageFolder", + "DatasetFolder", + "FakeData", + "CocoCaptions", + "CocoDetection", + "CIFAR10", + "CIFAR100", + "EMNIST", + "FashionMNIST", + "QMNIST", + "MNIST", + "KMNIST", + "MovingMNIST", + "StanfordCars", + "STL10", + "SUN397", + "SVHN", + "PhotoTour", + "SEMEION", + "Omniglot", + "SBU", + "Flickr8k", + "Flickr30k", + "Flowers102", + "VOCSegmentation", + "VOCDetection", + "Cityscapes", + "ImageNet", + "Caltech101", + "Caltech256", + "CelebA", + "WIDERFace", + "SBDataset", + "VisionDataset", + "USPS", + "Kinetics", + "HMDB51", + "UCF101", + "Places365", + "Kitti", + "INaturalist", + "LFWPeople", + "LFWPairs", + "KittiFlow", + "Sintel", + "FlyingChairs", + "FlyingThings3D", + "HD1K", + "Food101", + "DTD", + "FER2013", + "GTSRB", + "CLEVRClassification", + "OxfordIIITPet", + "PCAM", + "Country211", + "FGVCAircraft", + "EuroSAT", + "RenderedSST2", + "Kitti2012Stereo", + "Kitti2015Stereo", + "CarlaStereo", + "Middlebury2014Stereo", + "CREStereo", + "FallingThingsStereo", + "SceneFlowStereo", + "SintelStereo", + "InStereo2k", + "ETH3DStereo", + "wrap_dataset_for_transforms_v2", + "Imagenette", +) + + +# We override current module's attributes to handle the import: +# from torchvision.datasets import wrap_dataset_for_transforms_v2 +# without a cyclic error. +# Ref: https://peps.python.org/pep-0562/ +def __getattr__(name): + if name in ("wrap_dataset_for_transforms_v2",): + from torchvision.tv_tensors._dataset_wrapper import wrap_dataset_for_transforms_v2 + + return wrap_dataset_for_transforms_v2 + + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d1974c83c399b88d42f45dd08afcd83729ff61f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/_optical_flow.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/_optical_flow.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6ccf06306336b113be7ef29cbfba4e810eaef65f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/_optical_flow.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/_stereo_matching.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/_stereo_matching.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e328ecd14789d2e762547c43fd7f8a478855d91c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/_stereo_matching.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/caltech.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/caltech.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6e4fb0458d2a1d315f4000cff072a9b8023dbf92 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/caltech.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/celeba.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/celeba.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cb181131e1ba8e32076d3d04fd0ea8a6ce91f1a9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/celeba.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/cifar.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/cifar.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..82476ce914d530772eef44a0fe6586f35c0347bb Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/cifar.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/cityscapes.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/cityscapes.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7531a7cd97c6ccdbe0922d69e39cefbd2e5a25aa Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/cityscapes.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/clevr.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/clevr.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..80e3d2bbf3bfd0329dc7b58d2ca3212a07d82c9d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/clevr.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/coco.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/coco.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..901ed5c0608166853e4a0ecf8f210de91948e80f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/coco.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/country211.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/country211.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c86aa310bc69682db73f90ac4943ca0a9932d02f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/country211.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/dtd.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/dtd.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f01f191b906b2a66f71de34568b50821fae331d2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/dtd.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/eurosat.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/eurosat.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5f85a64efc14d20541739acac340b9ccb99b9ea4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/eurosat.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fakedata.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fakedata.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b89850bd0c64ffd704987d45d6958abfe079c7e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fakedata.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fer2013.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fer2013.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bdfa959216594617da4f973b2182ffd0e68682be Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fer2013.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fgvc_aircraft.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fgvc_aircraft.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fa7d2afa4c5bb6bcc917e137d51bed9f2d109e14 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/fgvc_aircraft.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/flickr.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/flickr.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef487cb0c961249b06f5544e0cb6edcf41ff2a93 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/flickr.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/flowers102.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/flowers102.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..62078c9d8aa910333c746e607b8921d62c02a561 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/flowers102.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/folder.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/folder.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef0b0af8960d22eb2e91c3f969e3bf161711762f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/folder.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/food101.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/food101.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7c5ba789321f11d66f1377509e586b16b80a89d8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/food101.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/gtsrb.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/gtsrb.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d00836adeb48c48a5a102b2c1202776c47a76bf5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/gtsrb.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/hmdb51.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/hmdb51.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6183220be77429964ae1dd0e8c64daab0d15515e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/hmdb51.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/imagenet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/imagenet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..efe93f4b416c2da3b823df91f8577c436f866bf0 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/imagenet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/imagenette.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/imagenette.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8a2099e035454287bbf063cefcce87d2fded21ab Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/imagenette.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/inaturalist.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/inaturalist.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ea39110da1226795efa2bb513e9145265ce28b8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/inaturalist.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/kinetics.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/kinetics.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b4f405bde97c743940ad2164406e1d8f0c68d87 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/kinetics.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/kitti.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/kitti.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..26e706027dac1489d2b6ec1ada5ec92759e3b150 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/kitti.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/lfw.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/lfw.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c330379cd21cc76d9c218a9ccb05dcf4bb11136 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/lfw.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/lsun.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/lsun.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8cee17cbe1d27eecddf05ef7c9b572cc4c07a2c3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/lsun.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/mnist.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/mnist.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e1c8a08892091adb9e1ee38dc98edf47a4a7d7dc Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/mnist.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/moving_mnist.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/moving_mnist.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dccdcaaf9249bc35f3048f0180cbbf9271b85b69 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/moving_mnist.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/omniglot.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/omniglot.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bf69fe5ddbdf98ff314c49cba122f592001123ae Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/omniglot.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/oxford_iiit_pet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/oxford_iiit_pet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fb90706cc9569d6ddc7c5a340032a0b6ba58679a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/oxford_iiit_pet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/pcam.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/pcam.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..feaefca16fc96a98f86035e24672c68f1f519ce9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/pcam.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/phototour.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/phototour.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7d45c71a0e0f4e68c6faaa623c8e6a99c81b240 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/phototour.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/places365.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/places365.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d267e423277c035af277f71f14436ded31fbcc3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/places365.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/rendered_sst2.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/rendered_sst2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f90d745d7b73fb74d6130ca4799d7dcf372e9e5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/rendered_sst2.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sbd.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sbd.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0cb89f703dfdfe9aba8f98eb4412fda7caab2ce6 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sbd.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sbu.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sbu.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7808938f8b66edd937b3e6e2786b6ba0c6e721c9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sbu.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/semeion.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/semeion.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..76e18922dcdc0a6248cd9e4abcb704245244eeba Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/semeion.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/stanford_cars.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/stanford_cars.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d59475fb5f68ac8cfd5ff3b43998292f2b7f42e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/stanford_cars.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/stl10.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/stl10.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0da01e56ad4753c9585b55f6f66ae8f79b0340b2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/stl10.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sun397.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sun397.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..520512c8a6ab1426463f2d816574583c82c96cb6 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/sun397.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/svhn.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/svhn.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cde1ff0afcce94d12d79de8d242f37a002194e6a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/svhn.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/ucf101.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/ucf101.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bcc5d3c1985b885cb024043df325fca09713a165 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/ucf101.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/usps.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/usps.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ba84fb33ab715cb653f7d24b2febac968724104 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/usps.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1983606b9a5b538fe97996ef6cf2e3a32abc26a8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/video_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/video_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fc1c3c59db968b0609e7179922eb0b9ecebca4a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/video_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/vision.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/vision.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d991d1f1f9ae17ce8c29fc2b782ad47e1c82cb74 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/vision.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/voc.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/voc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae8bb0fa7bf0ed8d9b1c87018a2b0d5731e7db49 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/voc.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/widerface.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/widerface.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ca3347917e58df8d22fe6ef706111b6daf889f80 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/__pycache__/widerface.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/_optical_flow.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/_optical_flow.py new file mode 100644 index 0000000000000000000000000000000000000000..0ffd387283cb46da7799b66f24f7f35ec9bf312c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/_optical_flow.py @@ -0,0 +1,490 @@ +import itertools +import os +from abc import ABC, abstractmethod +from glob import glob +from pathlib import Path +from typing import Callable, List, Optional, Tuple, Union + +import numpy as np +import torch +from PIL import Image + +from ..io.image import decode_png, read_file +from .utils import _read_pfm, verify_str_arg +from .vision import VisionDataset + +T1 = Tuple[Image.Image, Image.Image, Optional[np.ndarray], Optional[np.ndarray]] +T2 = Tuple[Image.Image, Image.Image, Optional[np.ndarray]] + + +__all__ = ( + "KittiFlow", + "Sintel", + "FlyingThings3D", + "FlyingChairs", + "HD1K", +) + + +class FlowDataset(ABC, VisionDataset): + # Some datasets like Kitti have a built-in valid_flow_mask, indicating which flow values are valid + # For those we return (img1, img2, flow, valid_flow_mask), and for the rest we return (img1, img2, flow), + # and it's up to whatever consumes the dataset to decide what valid_flow_mask should be. + _has_builtin_flow_mask = False + + def __init__(self, root: Union[str, Path], transforms: Optional[Callable] = None) -> None: + + super().__init__(root=root) + self.transforms = transforms + + self._flow_list: List[str] = [] + self._image_list: List[List[str]] = [] + + def _read_img(self, file_name: str) -> Image.Image: + img = Image.open(file_name) + if img.mode != "RGB": + img = img.convert("RGB") # type: ignore[assignment] + return img + + @abstractmethod + def _read_flow(self, file_name: str): + # Return the flow or a tuple with the flow and the valid_flow_mask if _has_builtin_flow_mask is True + pass + + def __getitem__(self, index: int) -> Union[T1, T2]: + + img1 = self._read_img(self._image_list[index][0]) + img2 = self._read_img(self._image_list[index][1]) + + if self._flow_list: # it will be empty for some dataset when split="test" + flow = self._read_flow(self._flow_list[index]) + if self._has_builtin_flow_mask: + flow, valid_flow_mask = flow + else: + valid_flow_mask = None + else: + flow = valid_flow_mask = None + + if self.transforms is not None: + img1, img2, flow, valid_flow_mask = self.transforms(img1, img2, flow, valid_flow_mask) + + if self._has_builtin_flow_mask or valid_flow_mask is not None: + # The `or valid_flow_mask is not None` part is here because the mask can be generated within a transform + return img1, img2, flow, valid_flow_mask + else: + return img1, img2, flow + + def __len__(self) -> int: + return len(self._image_list) + + def __rmul__(self, v: int) -> torch.utils.data.ConcatDataset: + return torch.utils.data.ConcatDataset([self] * v) + + +class Sintel(FlowDataset): + """`Sintel `_ Dataset for optical flow. + + The dataset is expected to have the following structure: :: + + root + Sintel + testing + clean + scene_1 + scene_2 + ... + final + scene_1 + scene_2 + ... + training + clean + scene_1 + scene_2 + ... + final + scene_1 + scene_2 + ... + flow + scene_1 + scene_2 + ... + + Args: + root (str or ``pathlib.Path``): Root directory of the Sintel Dataset. + split (string, optional): The dataset split, either "train" (default) or "test" + pass_name (string, optional): The pass to use, either "clean" (default), "final", or "both". See link above for + details on the different passes. + transforms (callable, optional): A function/transform that takes in + ``img1, img2, flow, valid_flow_mask`` and returns a transformed version. + ``valid_flow_mask`` is expected for consistency with other datasets which + return a built-in valid mask, such as :class:`~torchvision.datasets.KittiFlow`. + """ + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + pass_name: str = "clean", + transforms: Optional[Callable] = None, + ) -> None: + super().__init__(root=root, transforms=transforms) + + verify_str_arg(split, "split", valid_values=("train", "test")) + verify_str_arg(pass_name, "pass_name", valid_values=("clean", "final", "both")) + passes = ["clean", "final"] if pass_name == "both" else [pass_name] + + root = Path(root) / "Sintel" + flow_root = root / "training" / "flow" + + for pass_name in passes: + split_dir = "training" if split == "train" else split + image_root = root / split_dir / pass_name + for scene in os.listdir(image_root): + image_list = sorted(glob(str(image_root / scene / "*.png"))) + for i in range(len(image_list) - 1): + self._image_list += [[image_list[i], image_list[i + 1]]] + + if split == "train": + self._flow_list += sorted(glob(str(flow_root / scene / "*.flo"))) + + def __getitem__(self, index: int) -> Union[T1, T2]: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3-tuple with ``(img1, img2, flow)``. + The flow is a numpy array of shape (2, H, W) and the images are PIL images. + ``flow`` is None if ``split="test"``. + If a valid flow mask is generated within the ``transforms`` parameter, + a 4-tuple with ``(img1, img2, flow, valid_flow_mask)`` is returned. + """ + return super().__getitem__(index) + + def _read_flow(self, file_name: str) -> np.ndarray: + return _read_flo(file_name) + + +class KittiFlow(FlowDataset): + """`KITTI `__ dataset for optical flow (2015). + + The dataset is expected to have the following structure: :: + + root + KittiFlow + testing + image_2 + training + image_2 + flow_occ + + Args: + root (str or ``pathlib.Path``): Root directory of the KittiFlow Dataset. + split (string, optional): The dataset split, either "train" (default) or "test" + transforms (callable, optional): A function/transform that takes in + ``img1, img2, flow, valid_flow_mask`` and returns a transformed version. + """ + + _has_builtin_flow_mask = True + + def __init__(self, root: Union[str, Path], split: str = "train", transforms: Optional[Callable] = None) -> None: + super().__init__(root=root, transforms=transforms) + + verify_str_arg(split, "split", valid_values=("train", "test")) + + root = Path(root) / "KittiFlow" / (split + "ing") + images1 = sorted(glob(str(root / "image_2" / "*_10.png"))) + images2 = sorted(glob(str(root / "image_2" / "*_11.png"))) + + if not images1 or not images2: + raise FileNotFoundError( + "Could not find the Kitti flow images. Please make sure the directory structure is correct." + ) + + for img1, img2 in zip(images1, images2): + self._image_list += [[img1, img2]] + + if split == "train": + self._flow_list = sorted(glob(str(root / "flow_occ" / "*_10.png"))) + + def __getitem__(self, index: int) -> Union[T1, T2]: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img1, img2, flow, valid_flow_mask)`` + where ``valid_flow_mask`` is a numpy boolean mask of shape (H, W) + indicating which flow values are valid. The flow is a numpy array of + shape (2, H, W) and the images are PIL images. ``flow`` and ``valid_flow_mask`` are None if + ``split="test"``. + """ + return super().__getitem__(index) + + def _read_flow(self, file_name: str) -> Tuple[np.ndarray, np.ndarray]: + return _read_16bits_png_with_flow_and_valid_mask(file_name) + + +class FlyingChairs(FlowDataset): + """`FlyingChairs `_ Dataset for optical flow. + + You will also need to download the FlyingChairs_train_val.txt file from the dataset page. + + The dataset is expected to have the following structure: :: + + root + FlyingChairs + data + 00001_flow.flo + 00001_img1.ppm + 00001_img2.ppm + ... + FlyingChairs_train_val.txt + + + Args: + root (str or ``pathlib.Path``): Root directory of the FlyingChairs Dataset. + split (string, optional): The dataset split, either "train" (default) or "val" + transforms (callable, optional): A function/transform that takes in + ``img1, img2, flow, valid_flow_mask`` and returns a transformed version. + ``valid_flow_mask`` is expected for consistency with other datasets which + return a built-in valid mask, such as :class:`~torchvision.datasets.KittiFlow`. + """ + + def __init__(self, root: Union[str, Path], split: str = "train", transforms: Optional[Callable] = None) -> None: + super().__init__(root=root, transforms=transforms) + + verify_str_arg(split, "split", valid_values=("train", "val")) + + root = Path(root) / "FlyingChairs" + images = sorted(glob(str(root / "data" / "*.ppm"))) + flows = sorted(glob(str(root / "data" / "*.flo"))) + + split_file_name = "FlyingChairs_train_val.txt" + + if not os.path.exists(root / split_file_name): + raise FileNotFoundError( + "The FlyingChairs_train_val.txt file was not found - please download it from the dataset page (see docstring)." + ) + + split_list = np.loadtxt(str(root / split_file_name), dtype=np.int32) + for i in range(len(flows)): + split_id = split_list[i] + if (split == "train" and split_id == 1) or (split == "val" and split_id == 2): + self._flow_list += [flows[i]] + self._image_list += [[images[2 * i], images[2 * i + 1]]] + + def __getitem__(self, index: int) -> Union[T1, T2]: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3-tuple with ``(img1, img2, flow)``. + The flow is a numpy array of shape (2, H, W) and the images are PIL images. + ``flow`` is None if ``split="val"``. + If a valid flow mask is generated within the ``transforms`` parameter, + a 4-tuple with ``(img1, img2, flow, valid_flow_mask)`` is returned. + """ + return super().__getitem__(index) + + def _read_flow(self, file_name: str) -> np.ndarray: + return _read_flo(file_name) + + +class FlyingThings3D(FlowDataset): + """`FlyingThings3D `_ dataset for optical flow. + + The dataset is expected to have the following structure: :: + + root + FlyingThings3D + frames_cleanpass + TEST + TRAIN + frames_finalpass + TEST + TRAIN + optical_flow + TEST + TRAIN + + Args: + root (str or ``pathlib.Path``): Root directory of the intel FlyingThings3D Dataset. + split (string, optional): The dataset split, either "train" (default) or "test" + pass_name (string, optional): The pass to use, either "clean" (default) or "final" or "both". See link above for + details on the different passes. + camera (string, optional): Which camera to return images from. Can be either "left" (default) or "right" or "both". + transforms (callable, optional): A function/transform that takes in + ``img1, img2, flow, valid_flow_mask`` and returns a transformed version. + ``valid_flow_mask`` is expected for consistency with other datasets which + return a built-in valid mask, such as :class:`~torchvision.datasets.KittiFlow`. + """ + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + pass_name: str = "clean", + camera: str = "left", + transforms: Optional[Callable] = None, + ) -> None: + super().__init__(root=root, transforms=transforms) + + verify_str_arg(split, "split", valid_values=("train", "test")) + split = split.upper() + + verify_str_arg(pass_name, "pass_name", valid_values=("clean", "final", "both")) + passes = { + "clean": ["frames_cleanpass"], + "final": ["frames_finalpass"], + "both": ["frames_cleanpass", "frames_finalpass"], + }[pass_name] + + verify_str_arg(camera, "camera", valid_values=("left", "right", "both")) + cameras = ["left", "right"] if camera == "both" else [camera] + + root = Path(root) / "FlyingThings3D" + + directions = ("into_future", "into_past") + for pass_name, camera, direction in itertools.product(passes, cameras, directions): + image_dirs = sorted(glob(str(root / pass_name / split / "*/*"))) + image_dirs = sorted(Path(image_dir) / camera for image_dir in image_dirs) + + flow_dirs = sorted(glob(str(root / "optical_flow" / split / "*/*"))) + flow_dirs = sorted(Path(flow_dir) / direction / camera for flow_dir in flow_dirs) + + if not image_dirs or not flow_dirs: + raise FileNotFoundError( + "Could not find the FlyingThings3D flow images. " + "Please make sure the directory structure is correct." + ) + + for image_dir, flow_dir in zip(image_dirs, flow_dirs): + images = sorted(glob(str(image_dir / "*.png"))) + flows = sorted(glob(str(flow_dir / "*.pfm"))) + for i in range(len(flows) - 1): + if direction == "into_future": + self._image_list += [[images[i], images[i + 1]]] + self._flow_list += [flows[i]] + elif direction == "into_past": + self._image_list += [[images[i + 1], images[i]]] + self._flow_list += [flows[i + 1]] + + def __getitem__(self, index: int) -> Union[T1, T2]: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3-tuple with ``(img1, img2, flow)``. + The flow is a numpy array of shape (2, H, W) and the images are PIL images. + ``flow`` is None if ``split="test"``. + If a valid flow mask is generated within the ``transforms`` parameter, + a 4-tuple with ``(img1, img2, flow, valid_flow_mask)`` is returned. + """ + return super().__getitem__(index) + + def _read_flow(self, file_name: str) -> np.ndarray: + return _read_pfm(file_name) + + +class HD1K(FlowDataset): + """`HD1K `__ dataset for optical flow. + + The dataset is expected to have the following structure: :: + + root + hd1k + hd1k_challenge + image_2 + hd1k_flow_gt + flow_occ + hd1k_input + image_2 + + Args: + root (str or ``pathlib.Path``): Root directory of the HD1K Dataset. + split (string, optional): The dataset split, either "train" (default) or "test" + transforms (callable, optional): A function/transform that takes in + ``img1, img2, flow, valid_flow_mask`` and returns a transformed version. + """ + + _has_builtin_flow_mask = True + + def __init__(self, root: Union[str, Path], split: str = "train", transforms: Optional[Callable] = None) -> None: + super().__init__(root=root, transforms=transforms) + + verify_str_arg(split, "split", valid_values=("train", "test")) + + root = Path(root) / "hd1k" + if split == "train": + # There are 36 "sequences" and we don't want seq i to overlap with seq i + 1, so we need this for loop + for seq_idx in range(36): + flows = sorted(glob(str(root / "hd1k_flow_gt" / "flow_occ" / f"{seq_idx:06d}_*.png"))) + images = sorted(glob(str(root / "hd1k_input" / "image_2" / f"{seq_idx:06d}_*.png"))) + for i in range(len(flows) - 1): + self._flow_list += [flows[i]] + self._image_list += [[images[i], images[i + 1]]] + else: + images1 = sorted(glob(str(root / "hd1k_challenge" / "image_2" / "*10.png"))) + images2 = sorted(glob(str(root / "hd1k_challenge" / "image_2" / "*11.png"))) + for image1, image2 in zip(images1, images2): + self._image_list += [[image1, image2]] + + if not self._image_list: + raise FileNotFoundError( + "Could not find the HD1K images. Please make sure the directory structure is correct." + ) + + def _read_flow(self, file_name: str) -> Tuple[np.ndarray, np.ndarray]: + return _read_16bits_png_with_flow_and_valid_mask(file_name) + + def __getitem__(self, index: int) -> Union[T1, T2]: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img1, img2, flow, valid_flow_mask)`` where ``valid_flow_mask`` + is a numpy boolean mask of shape (H, W) + indicating which flow values are valid. The flow is a numpy array of + shape (2, H, W) and the images are PIL images. ``flow`` and ``valid_flow_mask`` are None if + ``split="test"``. + """ + return super().__getitem__(index) + + +def _read_flo(file_name: str) -> np.ndarray: + """Read .flo file in Middlebury format""" + # Code adapted from: + # http://stackoverflow.com/questions/28013200/reading-middlebury-flow-files-with-python-bytes-array-numpy + # Everything needs to be in little Endian according to + # https://vision.middlebury.edu/flow/code/flow-code/README.txt + with open(file_name, "rb") as f: + magic = np.fromfile(f, "c", count=4).tobytes() + if magic != b"PIEH": + raise ValueError("Magic number incorrect. Invalid .flo file") + + w = int(np.fromfile(f, " Tuple[np.ndarray, np.ndarray]: + + flow_and_valid = decode_png(read_file(file_name)).to(torch.float32) + flow, valid_flow_mask = flow_and_valid[:2, :, :], flow_and_valid[2, :, :] + flow = (flow - 2**15) / 64 # This conversion is explained somewhere on the kitti archive + valid_flow_mask = valid_flow_mask.bool() + + # For consistency with other datasets, we convert to numpy + return flow.numpy(), valid_flow_mask.numpy() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/_stereo_matching.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/_stereo_matching.py new file mode 100644 index 0000000000000000000000000000000000000000..a89914489984af09ca0b0ea2533d5dd77bd35d01 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/_stereo_matching.py @@ -0,0 +1,1223 @@ +import functools +import json +import os +import random +import shutil +from abc import ABC, abstractmethod +from glob import glob +from pathlib import Path +from typing import Callable, cast, List, Optional, Tuple, Union + +import numpy as np +from PIL import Image + +from .utils import _read_pfm, download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + +T1 = Tuple[Image.Image, Image.Image, Optional[np.ndarray], np.ndarray] +T2 = Tuple[Image.Image, Image.Image, Optional[np.ndarray]] + +__all__ = () + +_read_pfm_file = functools.partial(_read_pfm, slice_channels=1) + + +class StereoMatchingDataset(ABC, VisionDataset): + """Base interface for Stereo matching datasets""" + + _has_built_in_disparity_mask = False + + def __init__(self, root: Union[str, Path], transforms: Optional[Callable] = None) -> None: + """ + Args: + root(str): Root directory of the dataset. + transforms(callable, optional): A function/transform that takes in Tuples of + (images, disparities, valid_masks) and returns a transformed version of each of them. + images is a Tuple of (``PIL.Image``, ``PIL.Image``) + disparities is a Tuple of (``np.ndarray``, ``np.ndarray``) with shape (1, H, W) + valid_masks is a Tuple of (``np.ndarray``, ``np.ndarray``) with shape (H, W) + In some cases, when a dataset does not provide disparities, the ``disparities`` and + ``valid_masks`` can be Tuples containing None values. + For training splits generally the datasets provide a minimal guarantee of + images: (``PIL.Image``, ``PIL.Image``) + disparities: (``np.ndarray``, ``None``) with shape (1, H, W) + Optionally, based on the dataset, it can return a ``mask`` as well: + valid_masks: (``np.ndarray | None``, ``None``) with shape (H, W) + For some test splits, the datasets provides outputs that look like: + imgaes: (``PIL.Image``, ``PIL.Image``) + disparities: (``None``, ``None``) + Optionally, based on the dataset, it can return a ``mask`` as well: + valid_masks: (``None``, ``None``) + """ + super().__init__(root=root) + self.transforms = transforms + + self._images = [] # type: ignore + self._disparities = [] # type: ignore + + def _read_img(self, file_path: Union[str, Path]) -> Image.Image: + img = Image.open(file_path) + if img.mode != "RGB": + img = img.convert("RGB") # type: ignore [assignment] + return img + + def _scan_pairs( + self, + paths_left_pattern: str, + paths_right_pattern: Optional[str] = None, + ) -> List[Tuple[str, Optional[str]]]: + + left_paths = list(sorted(glob(paths_left_pattern))) + + right_paths: List[Union[None, str]] + if paths_right_pattern: + right_paths = list(sorted(glob(paths_right_pattern))) + else: + right_paths = list(None for _ in left_paths) + + if not left_paths: + raise FileNotFoundError(f"Could not find any files matching the patterns: {paths_left_pattern}") + + if not right_paths: + raise FileNotFoundError(f"Could not find any files matching the patterns: {paths_right_pattern}") + + if len(left_paths) != len(right_paths): + raise ValueError( + f"Found {len(left_paths)} left files but {len(right_paths)} right files using:\n " + f"left pattern: {paths_left_pattern}\n" + f"right pattern: {paths_right_pattern}\n" + ) + + paths = list((left, right) for left, right in zip(left_paths, right_paths)) + return paths + + @abstractmethod + def _read_disparity(self, file_path: str) -> Tuple[Optional[np.ndarray], Optional[np.ndarray]]: + # function that returns a disparity map and an occlusion map + pass + + def __getitem__(self, index: int) -> Union[T1, T2]: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3 or 4-tuple with ``(img_left, img_right, disparity, Optional[valid_mask])`` where ``valid_mask`` + can be a numpy boolean mask of shape (H, W) if the dataset provides a file + indicating which disparity pixels are valid. The disparity is a numpy array of + shape (1, H, W) and the images are PIL images. ``disparity`` is None for + datasets on which for ``split="test"`` the authors did not provide annotations. + """ + img_left = self._read_img(self._images[index][0]) + img_right = self._read_img(self._images[index][1]) + + dsp_map_left, valid_mask_left = self._read_disparity(self._disparities[index][0]) + dsp_map_right, valid_mask_right = self._read_disparity(self._disparities[index][1]) + + imgs = (img_left, img_right) + dsp_maps = (dsp_map_left, dsp_map_right) + valid_masks = (valid_mask_left, valid_mask_right) + + if self.transforms is not None: + ( + imgs, + dsp_maps, + valid_masks, + ) = self.transforms(imgs, dsp_maps, valid_masks) + + if self._has_built_in_disparity_mask or valid_masks[0] is not None: + return imgs[0], imgs[1], dsp_maps[0], cast(np.ndarray, valid_masks[0]) + else: + return imgs[0], imgs[1], dsp_maps[0] + + def __len__(self) -> int: + return len(self._images) + + +class CarlaStereo(StereoMatchingDataset): + """ + Carla simulator data linked in the `CREStereo github repo `_. + + The dataset is expected to have the following structure: :: + + root + carla-highres + trainingF + scene1 + img0.png + img1.png + disp0GT.pfm + disp1GT.pfm + calib.txt + scene2 + img0.png + img1.png + disp0GT.pfm + disp1GT.pfm + calib.txt + ... + + Args: + root (str or ``pathlib.Path``): Root directory where `carla-highres` is located. + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + def __init__(self, root: Union[str, Path], transforms: Optional[Callable] = None) -> None: + super().__init__(root, transforms) + + root = Path(root) / "carla-highres" + + left_image_pattern = str(root / "trainingF" / "*" / "im0.png") + right_image_pattern = str(root / "trainingF" / "*" / "im1.png") + imgs = self._scan_pairs(left_image_pattern, right_image_pattern) + self._images = imgs + + left_disparity_pattern = str(root / "trainingF" / "*" / "disp0GT.pfm") + right_disparity_pattern = str(root / "trainingF" / "*" / "disp1GT.pfm") + disparities = self._scan_pairs(left_disparity_pattern, right_disparity_pattern) + self._disparities = disparities + + def _read_disparity(self, file_path: str) -> Tuple[np.ndarray, None]: + disparity_map = _read_pfm_file(file_path) + disparity_map = np.abs(disparity_map) # ensure that the disparity is positive + valid_mask = None + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T1: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3-tuple with ``(img_left, img_right, disparity)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + If a ``valid_mask`` is generated within the ``transforms`` parameter, + a 4-tuple with ``(img_left, img_right, disparity, valid_mask)`` is returned. + """ + return cast(T1, super().__getitem__(index)) + + +class Kitti2012Stereo(StereoMatchingDataset): + """ + KITTI dataset from the `2012 stereo evaluation benchmark `_. + Uses the RGB images for consistency with KITTI 2015. + + The dataset is expected to have the following structure: :: + + root + Kitti2012 + testing + colored_0 + 1_10.png + 2_10.png + ... + colored_1 + 1_10.png + 2_10.png + ... + training + colored_0 + 1_10.png + 2_10.png + ... + colored_1 + 1_10.png + 2_10.png + ... + disp_noc + 1.png + 2.png + ... + calib + + Args: + root (str or ``pathlib.Path``): Root directory where `Kitti2012` is located. + split (string, optional): The dataset split of scenes, either "train" (default) or "test". + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + _has_built_in_disparity_mask = True + + def __init__(self, root: Union[str, Path], split: str = "train", transforms: Optional[Callable] = None) -> None: + super().__init__(root, transforms) + + verify_str_arg(split, "split", valid_values=("train", "test")) + + root = Path(root) / "Kitti2012" / (split + "ing") + + left_img_pattern = str(root / "colored_0" / "*_10.png") + right_img_pattern = str(root / "colored_1" / "*_10.png") + self._images = self._scan_pairs(left_img_pattern, right_img_pattern) + + if split == "train": + disparity_pattern = str(root / "disp_noc" / "*.png") + self._disparities = self._scan_pairs(disparity_pattern, None) + else: + self._disparities = list((None, None) for _ in self._images) + + def _read_disparity(self, file_path: str) -> Tuple[Optional[np.ndarray], None]: + # test split has no disparity maps + if file_path is None: + return None, None + + disparity_map = np.asarray(Image.open(file_path)) / 256.0 + # unsqueeze the disparity map into (C, H, W) format + disparity_map = disparity_map[None, :, :] + valid_mask = None + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T1: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img_left, img_right, disparity, valid_mask)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + ``valid_mask`` is implicitly ``None`` if the ``transforms`` parameter does not + generate a valid mask. + Both ``disparity`` and ``valid_mask`` are ``None`` if the dataset split is test. + """ + return cast(T1, super().__getitem__(index)) + + +class Kitti2015Stereo(StereoMatchingDataset): + """ + KITTI dataset from the `2015 stereo evaluation benchmark `_. + + The dataset is expected to have the following structure: :: + + root + Kitti2015 + testing + image_2 + img1.png + img2.png + ... + image_3 + img1.png + img2.png + ... + training + image_2 + img1.png + img2.png + ... + image_3 + img1.png + img2.png + ... + disp_occ_0 + img1.png + img2.png + ... + disp_occ_1 + img1.png + img2.png + ... + calib + + Args: + root (str or ``pathlib.Path``): Root directory where `Kitti2015` is located. + split (string, optional): The dataset split of scenes, either "train" (default) or "test". + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + _has_built_in_disparity_mask = True + + def __init__(self, root: Union[str, Path], split: str = "train", transforms: Optional[Callable] = None) -> None: + super().__init__(root, transforms) + + verify_str_arg(split, "split", valid_values=("train", "test")) + + root = Path(root) / "Kitti2015" / (split + "ing") + left_img_pattern = str(root / "image_2" / "*.png") + right_img_pattern = str(root / "image_3" / "*.png") + self._images = self._scan_pairs(left_img_pattern, right_img_pattern) + + if split == "train": + left_disparity_pattern = str(root / "disp_occ_0" / "*.png") + right_disparity_pattern = str(root / "disp_occ_1" / "*.png") + self._disparities = self._scan_pairs(left_disparity_pattern, right_disparity_pattern) + else: + self._disparities = list((None, None) for _ in self._images) + + def _read_disparity(self, file_path: str) -> Tuple[Optional[np.ndarray], None]: + # test split has no disparity maps + if file_path is None: + return None, None + + disparity_map = np.asarray(Image.open(file_path)) / 256.0 + # unsqueeze the disparity map into (C, H, W) format + disparity_map = disparity_map[None, :, :] + valid_mask = None + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T1: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img_left, img_right, disparity, valid_mask)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + ``valid_mask`` is implicitly ``None`` if the ``transforms`` parameter does not + generate a valid mask. + Both ``disparity`` and ``valid_mask`` are ``None`` if the dataset split is test. + """ + return cast(T1, super().__getitem__(index)) + + +class Middlebury2014Stereo(StereoMatchingDataset): + """Publicly available scenes from the Middlebury dataset `2014 version `. + + The dataset mostly follows the original format, without containing the ambient subdirectories. : :: + + root + Middlebury2014 + train + scene1-{perfect,imperfect} + calib.txt + im{0,1}.png + im1E.png + im1L.png + disp{0,1}.pfm + disp{0,1}-n.png + disp{0,1}-sd.pfm + disp{0,1}y.pfm + scene2-{perfect,imperfect} + calib.txt + im{0,1}.png + im1E.png + im1L.png + disp{0,1}.pfm + disp{0,1}-n.png + disp{0,1}-sd.pfm + disp{0,1}y.pfm + ... + additional + scene1-{perfect,imperfect} + calib.txt + im{0,1}.png + im1E.png + im1L.png + disp{0,1}.pfm + disp{0,1}-n.png + disp{0,1}-sd.pfm + disp{0,1}y.pfm + ... + test + scene1 + calib.txt + im{0,1}.png + scene2 + calib.txt + im{0,1}.png + ... + + Args: + root (str or ``pathlib.Path``): Root directory of the Middleburry 2014 Dataset. + split (string, optional): The dataset split of scenes, either "train" (default), "test", or "additional" + use_ambient_views (boolean, optional): Whether to use different expose or lightning views when possible. + The dataset samples with equal probability between ``[im1.png, im1E.png, im1L.png]``. + calibration (string, optional): Whether or not to use the calibrated (default) or uncalibrated scenes. + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + download (boolean, optional): Whether or not to download the dataset in the ``root`` directory. + """ + + splits = { + "train": [ + "Adirondack", + "Jadeplant", + "Motorcycle", + "Piano", + "Pipes", + "Playroom", + "Playtable", + "Recycle", + "Shelves", + "Vintage", + ], + "additional": [ + "Backpack", + "Bicycle1", + "Cable", + "Classroom1", + "Couch", + "Flowers", + "Mask", + "Shopvac", + "Sticks", + "Storage", + "Sword1", + "Sword2", + "Umbrella", + ], + "test": [ + "Plants", + "Classroom2E", + "Classroom2", + "Australia", + "DjembeL", + "CrusadeP", + "Crusade", + "Hoops", + "Bicycle2", + "Staircase", + "Newkuba", + "AustraliaP", + "Djembe", + "Livingroom", + "Computer", + ], + } + + _has_built_in_disparity_mask = True + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + calibration: Optional[str] = "perfect", + use_ambient_views: bool = False, + transforms: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transforms) + + verify_str_arg(split, "split", valid_values=("train", "test", "additional")) + self.split = split + + if calibration: + verify_str_arg(calibration, "calibration", valid_values=("perfect", "imperfect", "both", None)) # type: ignore + if split == "test": + raise ValueError("Split 'test' has only no calibration settings, please set `calibration=None`.") + else: + if split != "test": + raise ValueError( + f"Split '{split}' has calibration settings, however None was provided as an argument." + f"\nSetting calibration to 'perfect' for split '{split}'. Available calibration settings are: 'perfect', 'imperfect', 'both'.", + ) + + if download: + self._download_dataset(root) + + root = Path(root) / "Middlebury2014" + + if not os.path.exists(root / split): + raise FileNotFoundError(f"The {split} directory was not found in the provided root directory") + + split_scenes = self.splits[split] + # check that the provided root folder contains the scene splits + if not any( + # using startswith to account for perfect / imperfect calibrartion + scene.startswith(s) + for scene in os.listdir(root / split) + for s in split_scenes + ): + raise FileNotFoundError(f"Provided root folder does not contain any scenes from the {split} split.") + + calibrartion_suffixes = { + None: [""], + "perfect": ["-perfect"], + "imperfect": ["-imperfect"], + "both": ["-perfect", "-imperfect"], + }[calibration] + + for calibration_suffix in calibrartion_suffixes: + scene_pattern = "*" + calibration_suffix + left_img_pattern = str(root / split / scene_pattern / "im0.png") + right_img_pattern = str(root / split / scene_pattern / "im1.png") + self._images += self._scan_pairs(left_img_pattern, right_img_pattern) + + if split == "test": + self._disparities = list((None, None) for _ in self._images) + else: + left_dispartity_pattern = str(root / split / scene_pattern / "disp0.pfm") + right_dispartity_pattern = str(root / split / scene_pattern / "disp1.pfm") + self._disparities += self._scan_pairs(left_dispartity_pattern, right_dispartity_pattern) + + self.use_ambient_views = use_ambient_views + + def _read_img(self, file_path: Union[str, Path]) -> Image.Image: + """ + Function that reads either the original right image or an augmented view when ``use_ambient_views`` is True. + When ``use_ambient_views`` is True, the dataset will return at random one of ``[im1.png, im1E.png, im1L.png]`` + as the right image. + """ + ambient_file_paths: List[Union[str, Path]] # make mypy happy + + if not isinstance(file_path, Path): + file_path = Path(file_path) + + if file_path.name == "im1.png" and self.use_ambient_views: + base_path = file_path.parent + # initialize sampleable container + ambient_file_paths = list(base_path / view_name for view_name in ["im1E.png", "im1L.png"]) + # double check that we're not going to try to read from an invalid file path + ambient_file_paths = list(filter(lambda p: os.path.exists(p), ambient_file_paths)) + # keep the original image as an option as well for uniform sampling between base views + ambient_file_paths.append(file_path) + file_path = random.choice(ambient_file_paths) # type: ignore + return super()._read_img(file_path) + + def _read_disparity(self, file_path: str) -> Union[Tuple[None, None], Tuple[np.ndarray, np.ndarray]]: + # test split has not disparity maps + if file_path is None: + return None, None + + disparity_map = _read_pfm_file(file_path) + disparity_map = np.abs(disparity_map) # ensure that the disparity is positive + disparity_map[disparity_map == np.inf] = 0 # remove infinite disparities + valid_mask = (disparity_map > 0).squeeze(0) # mask out invalid disparities + return disparity_map, valid_mask + + def _download_dataset(self, root: Union[str, Path]) -> None: + base_url = "https://vision.middlebury.edu/stereo/data/scenes2014/zip" + # train and additional splits have 2 different calibration settings + root = Path(root) / "Middlebury2014" + split_name = self.split + + if split_name != "test": + for split_scene in self.splits[split_name]: + split_root = root / split_name + for calibration in ["perfect", "imperfect"]: + scene_name = f"{split_scene}-{calibration}" + scene_url = f"{base_url}/{scene_name}.zip" + # download the scene only if it doesn't exist + if not (split_root / scene_name).exists(): + download_and_extract_archive( + url=scene_url, + filename=f"{scene_name}.zip", + download_root=str(split_root), + remove_finished=True, + ) + else: + os.makedirs(root / "test") + if any(s not in os.listdir(root / "test") for s in self.splits["test"]): + # test split is downloaded from a different location + test_set_url = "https://vision.middlebury.edu/stereo/submit3/zip/MiddEval3-data-F.zip" + # the unzip is going to produce a directory MiddEval3 with two subdirectories trainingF and testF + # we want to move the contents from testF into the directory + download_and_extract_archive(url=test_set_url, download_root=str(root), remove_finished=True) + for scene_dir, scene_names, _ in os.walk(str(root / "MiddEval3/testF")): + for scene in scene_names: + scene_dst_dir = root / "test" + scene_src_dir = Path(scene_dir) / scene + os.makedirs(scene_dst_dir, exist_ok=True) + shutil.move(str(scene_src_dir), str(scene_dst_dir)) + + # cleanup MiddEval3 directory + shutil.rmtree(str(root / "MiddEval3")) + + def __getitem__(self, index: int) -> T2: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img_left, img_right, disparity, valid_mask)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + ``valid_mask`` is implicitly ``None`` for `split=test`. + """ + return cast(T2, super().__getitem__(index)) + + +class CREStereo(StereoMatchingDataset): + """Synthetic dataset used in training the `CREStereo `_ architecture. + Dataset details on the official paper `repo `_. + + The dataset is expected to have the following structure: :: + + root + CREStereo + tree + img1_left.jpg + img1_right.jpg + img1_left.disp.jpg + img1_right.disp.jpg + img2_left.jpg + img2_right.jpg + img2_left.disp.jpg + img2_right.disp.jpg + ... + shapenet + img1_left.jpg + img1_right.jpg + img1_left.disp.jpg + img1_right.disp.jpg + ... + reflective + img1_left.jpg + img1_right.jpg + img1_left.disp.jpg + img1_right.disp.jpg + ... + hole + img1_left.jpg + img1_right.jpg + img1_left.disp.jpg + img1_right.disp.jpg + ... + + Args: + root (str): Root directory of the dataset. + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + _has_built_in_disparity_mask = True + + def __init__( + self, + root: Union[str, Path], + transforms: Optional[Callable] = None, + ) -> None: + super().__init__(root, transforms) + + root = Path(root) / "CREStereo" + + dirs = ["shapenet", "reflective", "tree", "hole"] + + for s in dirs: + left_image_pattern = str(root / s / "*_left.jpg") + right_image_pattern = str(root / s / "*_right.jpg") + imgs = self._scan_pairs(left_image_pattern, right_image_pattern) + self._images += imgs + + left_disparity_pattern = str(root / s / "*_left.disp.png") + right_disparity_pattern = str(root / s / "*_right.disp.png") + disparities = self._scan_pairs(left_disparity_pattern, right_disparity_pattern) + self._disparities += disparities + + def _read_disparity(self, file_path: str) -> Tuple[np.ndarray, None]: + disparity_map = np.asarray(Image.open(file_path), dtype=np.float32) + # unsqueeze the disparity map into (C, H, W) format + disparity_map = disparity_map[None, :, :] / 32.0 + valid_mask = None + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T1: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img_left, img_right, disparity, valid_mask)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + ``valid_mask`` is implicitly ``None`` if the ``transforms`` parameter does not + generate a valid mask. + """ + return cast(T1, super().__getitem__(index)) + + +class FallingThingsStereo(StereoMatchingDataset): + """`FallingThings `_ dataset. + + The dataset is expected to have the following structure: :: + + root + FallingThings + single + dir1 + scene1 + _object_settings.json + _camera_settings.json + image1.left.depth.png + image1.right.depth.png + image1.left.jpg + image1.right.jpg + image2.left.depth.png + image2.right.depth.png + image2.left.jpg + image2.right + ... + scene2 + ... + mixed + scene1 + _object_settings.json + _camera_settings.json + image1.left.depth.png + image1.right.depth.png + image1.left.jpg + image1.right.jpg + image2.left.depth.png + image2.right.depth.png + image2.left.jpg + image2.right + ... + scene2 + ... + + Args: + root (str or ``pathlib.Path``): Root directory where FallingThings is located. + variant (string): Which variant to use. Either "single", "mixed", or "both". + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + def __init__(self, root: Union[str, Path], variant: str = "single", transforms: Optional[Callable] = None) -> None: + super().__init__(root, transforms) + + root = Path(root) / "FallingThings" + + verify_str_arg(variant, "variant", valid_values=("single", "mixed", "both")) + + variants = { + "single": ["single"], + "mixed": ["mixed"], + "both": ["single", "mixed"], + }[variant] + + split_prefix = { + "single": Path("*") / "*", + "mixed": Path("*"), + } + + for s in variants: + left_img_pattern = str(root / s / split_prefix[s] / "*.left.jpg") + right_img_pattern = str(root / s / split_prefix[s] / "*.right.jpg") + self._images += self._scan_pairs(left_img_pattern, right_img_pattern) + + left_disparity_pattern = str(root / s / split_prefix[s] / "*.left.depth.png") + right_disparity_pattern = str(root / s / split_prefix[s] / "*.right.depth.png") + self._disparities += self._scan_pairs(left_disparity_pattern, right_disparity_pattern) + + def _read_disparity(self, file_path: str) -> Tuple[np.ndarray, None]: + # (H, W) image + depth = np.asarray(Image.open(file_path)) + # as per https://research.nvidia.com/sites/default/files/pubs/2018-06_Falling-Things/readme_0.txt + # in order to extract disparity from depth maps + camera_settings_path = Path(file_path).parent / "_camera_settings.json" + with open(camera_settings_path, "r") as f: + # inverse of depth-from-disparity equation: depth = (baseline * focal) / (disparity * pixel_constant) + intrinsics = json.load(f) + focal = intrinsics["camera_settings"][0]["intrinsic_settings"]["fx"] + baseline, pixel_constant = 6, 100 # pixel constant is inverted + disparity_map = (baseline * focal * pixel_constant) / depth.astype(np.float32) + # unsqueeze disparity to (C, H, W) + disparity_map = disparity_map[None, :, :] + valid_mask = None + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T1: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3-tuple with ``(img_left, img_right, disparity)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + If a ``valid_mask`` is generated within the ``transforms`` parameter, + a 4-tuple with ``(img_left, img_right, disparity, valid_mask)`` is returned. + """ + return cast(T1, super().__getitem__(index)) + + +class SceneFlowStereo(StereoMatchingDataset): + """Dataset interface for `Scene Flow `_ datasets. + This interface provides access to the `FlyingThings3D, `Monkaa` and `Driving` datasets. + + The dataset is expected to have the following structure: :: + + root + SceneFlow + Monkaa + frames_cleanpass + scene1 + left + img1.png + img2.png + right + img1.png + img2.png + scene2 + left + img1.png + img2.png + right + img1.png + img2.png + frames_finalpass + scene1 + left + img1.png + img2.png + right + img1.png + img2.png + ... + ... + disparity + scene1 + left + img1.pfm + img2.pfm + right + img1.pfm + img2.pfm + FlyingThings3D + ... + ... + + Args: + root (str or ``pathlib.Path``): Root directory where SceneFlow is located. + variant (string): Which dataset variant to user, "FlyingThings3D" (default), "Monkaa" or "Driving". + pass_name (string): Which pass to use, "clean" (default), "final" or "both". + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + + """ + + def __init__( + self, + root: Union[str, Path], + variant: str = "FlyingThings3D", + pass_name: str = "clean", + transforms: Optional[Callable] = None, + ) -> None: + super().__init__(root, transforms) + + root = Path(root) / "SceneFlow" + + verify_str_arg(variant, "variant", valid_values=("FlyingThings3D", "Driving", "Monkaa")) + verify_str_arg(pass_name, "pass_name", valid_values=("clean", "final", "both")) + + passes = { + "clean": ["frames_cleanpass"], + "final": ["frames_finalpass"], + "both": ["frames_cleanpass", "frames_finalpass"], + }[pass_name] + + root = root / variant + + prefix_directories = { + "Monkaa": Path("*"), + "FlyingThings3D": Path("*") / "*" / "*", + "Driving": Path("*") / "*" / "*", + } + + for p in passes: + left_image_pattern = str(root / p / prefix_directories[variant] / "left" / "*.png") + right_image_pattern = str(root / p / prefix_directories[variant] / "right" / "*.png") + self._images += self._scan_pairs(left_image_pattern, right_image_pattern) + + left_disparity_pattern = str(root / "disparity" / prefix_directories[variant] / "left" / "*.pfm") + right_disparity_pattern = str(root / "disparity" / prefix_directories[variant] / "right" / "*.pfm") + self._disparities += self._scan_pairs(left_disparity_pattern, right_disparity_pattern) + + def _read_disparity(self, file_path: str) -> Tuple[np.ndarray, None]: + disparity_map = _read_pfm_file(file_path) + disparity_map = np.abs(disparity_map) # ensure that the disparity is positive + valid_mask = None + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T1: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3-tuple with ``(img_left, img_right, disparity)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + If a ``valid_mask`` is generated within the ``transforms`` parameter, + a 4-tuple with ``(img_left, img_right, disparity, valid_mask)`` is returned. + """ + return cast(T1, super().__getitem__(index)) + + +class SintelStereo(StereoMatchingDataset): + """Sintel `Stereo Dataset `_. + + The dataset is expected to have the following structure: :: + + root + Sintel + training + final_left + scene1 + img1.png + img2.png + ... + ... + final_right + scene2 + img1.png + img2.png + ... + ... + disparities + scene1 + img1.png + img2.png + ... + ... + occlusions + scene1 + img1.png + img2.png + ... + ... + outofframe + scene1 + img1.png + img2.png + ... + ... + + Args: + root (str or ``pathlib.Path``): Root directory where Sintel Stereo is located. + pass_name (string): The name of the pass to use, either "final", "clean" or "both". + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + _has_built_in_disparity_mask = True + + def __init__(self, root: Union[str, Path], pass_name: str = "final", transforms: Optional[Callable] = None) -> None: + super().__init__(root, transforms) + + verify_str_arg(pass_name, "pass_name", valid_values=("final", "clean", "both")) + + root = Path(root) / "Sintel" + pass_names = { + "final": ["final"], + "clean": ["clean"], + "both": ["final", "clean"], + }[pass_name] + + for p in pass_names: + left_img_pattern = str(root / "training" / f"{p}_left" / "*" / "*.png") + right_img_pattern = str(root / "training" / f"{p}_right" / "*" / "*.png") + self._images += self._scan_pairs(left_img_pattern, right_img_pattern) + + disparity_pattern = str(root / "training" / "disparities" / "*" / "*.png") + self._disparities += self._scan_pairs(disparity_pattern, None) + + def _get_occlussion_mask_paths(self, file_path: str) -> Tuple[str, str]: + # helper function to get the occlusion mask paths + # a path will look like .../.../.../training/disparities/scene1/img1.png + # we want to get something like .../.../.../training/occlusions/scene1/img1.png + fpath = Path(file_path) + basename = fpath.name + scenedir = fpath.parent + # the parent of the scenedir is actually the disparity dir + sampledir = scenedir.parent.parent + + occlusion_path = str(sampledir / "occlusions" / scenedir.name / basename) + outofframe_path = str(sampledir / "outofframe" / scenedir.name / basename) + + if not os.path.exists(occlusion_path): + raise FileNotFoundError(f"Occlusion mask {occlusion_path} does not exist") + + if not os.path.exists(outofframe_path): + raise FileNotFoundError(f"Out of frame mask {outofframe_path} does not exist") + + return occlusion_path, outofframe_path + + def _read_disparity(self, file_path: str) -> Union[Tuple[None, None], Tuple[np.ndarray, np.ndarray]]: + if file_path is None: + return None, None + + # disparity decoding as per Sintel instructions in the README provided with the dataset + disparity_map = np.asarray(Image.open(file_path), dtype=np.float32) + r, g, b = np.split(disparity_map, 3, axis=-1) + disparity_map = r * 4 + g / (2**6) + b / (2**14) + # reshape into (C, H, W) format + disparity_map = np.transpose(disparity_map, (2, 0, 1)) + # find the appropriate file paths + occlued_mask_path, out_of_frame_mask_path = self._get_occlussion_mask_paths(file_path) + # occlusion masks + valid_mask = np.asarray(Image.open(occlued_mask_path)) == 0 + # out of frame masks + off_mask = np.asarray(Image.open(out_of_frame_mask_path)) == 0 + # combine the masks together + valid_mask = np.logical_and(off_mask, valid_mask) + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T2: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img_left, img_right, disparity, valid_mask)`` is returned. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images whilst + the valid_mask is a numpy array of shape (H, W). + """ + return cast(T2, super().__getitem__(index)) + + +class InStereo2k(StereoMatchingDataset): + """`InStereo2k `_ dataset. + + The dataset is expected to have the following structure: :: + + root + InStereo2k + train + scene1 + left.png + right.png + left_disp.png + right_disp.png + ... + scene2 + ... + test + scene1 + left.png + right.png + left_disp.png + right_disp.png + ... + scene2 + ... + + Args: + root (str or ``pathlib.Path``): Root directory where InStereo2k is located. + split (string): Either "train" or "test". + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + def __init__(self, root: Union[str, Path], split: str = "train", transforms: Optional[Callable] = None) -> None: + super().__init__(root, transforms) + + root = Path(root) / "InStereo2k" / split + + verify_str_arg(split, "split", valid_values=("train", "test")) + + left_img_pattern = str(root / "*" / "left.png") + right_img_pattern = str(root / "*" / "right.png") + self._images = self._scan_pairs(left_img_pattern, right_img_pattern) + + left_disparity_pattern = str(root / "*" / "left_disp.png") + right_disparity_pattern = str(root / "*" / "right_disp.png") + self._disparities = self._scan_pairs(left_disparity_pattern, right_disparity_pattern) + + def _read_disparity(self, file_path: str) -> Tuple[np.ndarray, None]: + disparity_map = np.asarray(Image.open(file_path), dtype=np.float32) + # unsqueeze disparity to (C, H, W) + disparity_map = disparity_map[None, :, :] / 1024.0 + valid_mask = None + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T1: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 3-tuple with ``(img_left, img_right, disparity)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + If a ``valid_mask`` is generated within the ``transforms`` parameter, + a 4-tuple with ``(img_left, img_right, disparity, valid_mask)`` is returned. + """ + return cast(T1, super().__getitem__(index)) + + +class ETH3DStereo(StereoMatchingDataset): + """ETH3D `Low-Res Two-View `_ dataset. + + The dataset is expected to have the following structure: :: + + root + ETH3D + two_view_training + scene1 + im1.png + im0.png + images.txt + cameras.txt + calib.txt + scene2 + im1.png + im0.png + images.txt + cameras.txt + calib.txt + ... + two_view_training_gt + scene1 + disp0GT.pfm + mask0nocc.png + scene2 + disp0GT.pfm + mask0nocc.png + ... + two_view_testing + scene1 + im1.png + im0.png + images.txt + cameras.txt + calib.txt + scene2 + im1.png + im0.png + images.txt + cameras.txt + calib.txt + ... + + Args: + root (str or ``pathlib.Path``): Root directory of the ETH3D Dataset. + split (string, optional): The dataset split of scenes, either "train" (default) or "test". + transforms (callable, optional): A function/transform that takes in a sample and returns a transformed version. + """ + + _has_built_in_disparity_mask = True + + def __init__(self, root: Union[str, Path], split: str = "train", transforms: Optional[Callable] = None) -> None: + super().__init__(root, transforms) + + verify_str_arg(split, "split", valid_values=("train", "test")) + + root = Path(root) / "ETH3D" + + img_dir = "two_view_training" if split == "train" else "two_view_test" + anot_dir = "two_view_training_gt" + + left_img_pattern = str(root / img_dir / "*" / "im0.png") + right_img_pattern = str(root / img_dir / "*" / "im1.png") + self._images = self._scan_pairs(left_img_pattern, right_img_pattern) + + if split == "test": + self._disparities = list((None, None) for _ in self._images) + else: + disparity_pattern = str(root / anot_dir / "*" / "disp0GT.pfm") + self._disparities = self._scan_pairs(disparity_pattern, None) + + def _read_disparity(self, file_path: str) -> Union[Tuple[None, None], Tuple[np.ndarray, np.ndarray]]: + # test split has no disparity maps + if file_path is None: + return None, None + + disparity_map = _read_pfm_file(file_path) + disparity_map = np.abs(disparity_map) # ensure that the disparity is positive + mask_path = Path(file_path).parent / "mask0nocc.png" + valid_mask = Image.open(mask_path) + valid_mask = np.asarray(valid_mask).astype(bool) + return disparity_map, valid_mask + + def __getitem__(self, index: int) -> T2: + """Return example at given index. + + Args: + index(int): The index of the example to retrieve + + Returns: + tuple: A 4-tuple with ``(img_left, img_right, disparity, valid_mask)``. + The disparity is a numpy array of shape (1, H, W) and the images are PIL images. + ``valid_mask`` is implicitly ``None`` if the ``transforms`` parameter does not + generate a valid mask. + Both ``disparity`` and ``valid_mask`` are ``None`` if the dataset split is test. + """ + return cast(T2, super().__getitem__(index)) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/caltech.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/caltech.py new file mode 100644 index 0000000000000000000000000000000000000000..e37c720c6305fcb246b0f130c4389fc2d835b06e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/caltech.py @@ -0,0 +1,240 @@ +import os +import os.path +from pathlib import Path +from typing import Any, Callable, List, Optional, Tuple, Union + +from PIL import Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class Caltech101(VisionDataset): + """`Caltech 101 `_ Dataset. + + .. warning:: + + This class needs `scipy `_ to load target files from `.mat` format. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``caltech101`` exists or will be saved to if download is set to True. + target_type (string or list, optional): Type of target to use, ``category`` or + ``annotation``. Can also be a list to output a tuple with all specified + target types. ``category`` represents the target class, and + ``annotation`` is a list of points from a hand-generated outline. + Defaults to ``category``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + .. warning:: + + To download the dataset `gdown `_ is required. + """ + + def __init__( + self, + root: Union[str, Path], + target_type: Union[List[str], str] = "category", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(os.path.join(root, "caltech101"), transform=transform, target_transform=target_transform) + os.makedirs(self.root, exist_ok=True) + if isinstance(target_type, str): + target_type = [target_type] + self.target_type = [verify_str_arg(t, "target_type", ("category", "annotation")) for t in target_type] + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + self.categories = sorted(os.listdir(os.path.join(self.root, "101_ObjectCategories"))) + self.categories.remove("BACKGROUND_Google") # this is not a real class + + # For some reason, the category names in "101_ObjectCategories" and + # "Annotations" do not always match. This is a manual map between the + # two. Defaults to using same name, since most names are fine. + name_map = { + "Faces": "Faces_2", + "Faces_easy": "Faces_3", + "Motorbikes": "Motorbikes_16", + "airplanes": "Airplanes_Side_2", + } + self.annotation_categories = list(map(lambda x: name_map[x] if x in name_map else x, self.categories)) + + self.index: List[int] = [] + self.y = [] + for (i, c) in enumerate(self.categories): + n = len(os.listdir(os.path.join(self.root, "101_ObjectCategories", c))) + self.index.extend(range(1, n + 1)) + self.y.extend(n * [i]) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where the type of target specified by target_type. + """ + import scipy.io + + img = Image.open( + os.path.join( + self.root, + "101_ObjectCategories", + self.categories[self.y[index]], + f"image_{self.index[index]:04d}.jpg", + ) + ) + + target: Any = [] + for t in self.target_type: + if t == "category": + target.append(self.y[index]) + elif t == "annotation": + data = scipy.io.loadmat( + os.path.join( + self.root, + "Annotations", + self.annotation_categories[self.y[index]], + f"annotation_{self.index[index]:04d}.mat", + ) + ) + target.append(data["obj_contour"]) + target = tuple(target) if len(target) > 1 else target[0] + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def _check_integrity(self) -> bool: + # can be more robust and check hash of files + return os.path.exists(os.path.join(self.root, "101_ObjectCategories")) + + def __len__(self) -> int: + return len(self.index) + + def download(self) -> None: + if self._check_integrity(): + return + + download_and_extract_archive( + "https://drive.google.com/file/d/137RyRjvTBkBiIfeYBNZBtViDHQ6_Ewsp", + self.root, + filename="101_ObjectCategories.tar.gz", + md5="b224c7392d521a49829488ab0f1120d9", + ) + download_and_extract_archive( + "https://drive.google.com/file/d/175kQy3UsZ0wUEHZjqkUDdNVssr7bgh_m", + self.root, + filename="Annotations.tar", + md5="6f83eeb1f24d99cab4eb377263132c91", + ) + + def extra_repr(self) -> str: + return "Target type: {target_type}".format(**self.__dict__) + + +class Caltech256(VisionDataset): + """`Caltech 256 `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``caltech256`` exists or will be saved to if download is set to True. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + def __init__( + self, + root: str, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(os.path.join(root, "caltech256"), transform=transform, target_transform=target_transform) + os.makedirs(self.root, exist_ok=True) + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + self.categories = sorted(os.listdir(os.path.join(self.root, "256_ObjectCategories"))) + self.index: List[int] = [] + self.y = [] + for (i, c) in enumerate(self.categories): + n = len( + [ + item + for item in os.listdir(os.path.join(self.root, "256_ObjectCategories", c)) + if item.endswith(".jpg") + ] + ) + self.index.extend(range(1, n + 1)) + self.y.extend(n * [i]) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target class. + """ + img = Image.open( + os.path.join( + self.root, + "256_ObjectCategories", + self.categories[self.y[index]], + f"{self.y[index] + 1:03d}_{self.index[index]:04d}.jpg", + ) + ) + + target = self.y[index] + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def _check_integrity(self) -> bool: + # can be more robust and check hash of files + return os.path.exists(os.path.join(self.root, "256_ObjectCategories")) + + def __len__(self) -> int: + return len(self.index) + + def download(self) -> None: + if self._check_integrity(): + return + + download_and_extract_archive( + "https://drive.google.com/file/d/1r6o0pSROcV1_VwT4oSjA2FBUSCWGuxLK", + self.root, + filename="256_ObjectCategories.tar", + md5="67b4f42ca05d46448c6bb8ecd2220f6d", + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/celeba.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/celeba.py new file mode 100644 index 0000000000000000000000000000000000000000..c39011064d7fec41fe925173fa7ce3b0823efd08 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/celeba.py @@ -0,0 +1,193 @@ +import csv +import os +from collections import namedtuple +from pathlib import Path +from typing import Any, Callable, List, Optional, Tuple, Union + +import PIL +import torch + +from .utils import check_integrity, download_file_from_google_drive, extract_archive, verify_str_arg +from .vision import VisionDataset + +CSV = namedtuple("CSV", ["header", "index", "data"]) + + +class CelebA(VisionDataset): + """`Large-scale CelebFaces Attributes (CelebA) Dataset `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory where images are downloaded to. + split (string): One of {'train', 'valid', 'test', 'all'}. + Accordingly dataset is selected. + target_type (string or list, optional): Type of target to use, ``attr``, ``identity``, ``bbox``, + or ``landmarks``. Can also be a list to output a tuple with all specified target types. + The targets represent: + + - ``attr`` (Tensor shape=(40,) dtype=int): binary (0, 1) labels for attributes + - ``identity`` (int): label for each person (data points with the same identity are the same person) + - ``bbox`` (Tensor shape=(4,) dtype=int): bounding box (x, y, width, height) + - ``landmarks`` (Tensor shape=(10,) dtype=int): landmark points (lefteye_x, lefteye_y, righteye_x, + righteye_y, nose_x, nose_y, leftmouth_x, leftmouth_y, rightmouth_x, rightmouth_y) + + Defaults to ``attr``. If empty, ``None`` will be returned as target. + + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.PILToTensor`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + .. warning:: + + To download the dataset `gdown `_ is required. + """ + + base_folder = "celeba" + # There currently does not appear to be an easy way to extract 7z in python (without introducing additional + # dependencies). The "in-the-wild" (not aligned+cropped) images are only in 7z, so they are not available + # right now. + file_list = [ + # File ID MD5 Hash Filename + ("0B7EVK8r0v71pZjFTYXZWM3FlRnM", "00d2c5bc6d35e252742224ab0c1e8fcb", "img_align_celeba.zip"), + # ("0B7EVK8r0v71pbWNEUjJKdDQ3dGc","b6cd7e93bc7a96c2dc33f819aa3ac651", "img_align_celeba_png.7z"), + # ("0B7EVK8r0v71peklHb0pGdDl6R28", "b6cd7e93bc7a96c2dc33f819aa3ac651", "img_celeba.7z"), + ("0B7EVK8r0v71pblRyaVFSWGxPY0U", "75e246fa4810816ffd6ee81facbd244c", "list_attr_celeba.txt"), + ("1_ee_0u7vcNLOfNLegJRHmolfH5ICW-XS", "32bd1bd63d3c78cd57e08160ec5ed1e2", "identity_CelebA.txt"), + ("0B7EVK8r0v71pbThiMVRxWXZ4dU0", "00566efa6fedff7a56946cd1c10f1c16", "list_bbox_celeba.txt"), + ("0B7EVK8r0v71pd0FJY3Blby1HUTQ", "cc24ecafdb5b50baae59b03474781f8c", "list_landmarks_align_celeba.txt"), + # ("0B7EVK8r0v71pTzJIdlJWdHczRlU", "063ee6ddb681f96bc9ca28c6febb9d1a", "list_landmarks_celeba.txt"), + ("0B7EVK8r0v71pY0NSMzRuSXJEVkk", "d32c9cbf5e040fd4025c592c306e6668", "list_eval_partition.txt"), + ] + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + target_type: Union[List[str], str] = "attr", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self.split = split + if isinstance(target_type, list): + self.target_type = target_type + else: + self.target_type = [target_type] + + if not self.target_type and self.target_transform is not None: + raise RuntimeError("target_transform is specified but target_type is empty") + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + split_map = { + "train": 0, + "valid": 1, + "test": 2, + "all": None, + } + split_ = split_map[verify_str_arg(split.lower(), "split", ("train", "valid", "test", "all"))] + splits = self._load_csv("list_eval_partition.txt") + identity = self._load_csv("identity_CelebA.txt") + bbox = self._load_csv("list_bbox_celeba.txt", header=1) + landmarks_align = self._load_csv("list_landmarks_align_celeba.txt", header=1) + attr = self._load_csv("list_attr_celeba.txt", header=1) + + mask = slice(None) if split_ is None else (splits.data == split_).squeeze() + + if mask == slice(None): # if split == "all" + self.filename = splits.index + else: + self.filename = [splits.index[i] for i in torch.squeeze(torch.nonzero(mask))] # type: ignore[arg-type] + self.identity = identity.data[mask] + self.bbox = bbox.data[mask] + self.landmarks_align = landmarks_align.data[mask] + self.attr = attr.data[mask] + # map from {-1, 1} to {0, 1} + self.attr = torch.div(self.attr + 1, 2, rounding_mode="floor") + self.attr_names = attr.header + + def _load_csv( + self, + filename: str, + header: Optional[int] = None, + ) -> CSV: + with open(os.path.join(self.root, self.base_folder, filename)) as csv_file: + data = list(csv.reader(csv_file, delimiter=" ", skipinitialspace=True)) + + if header is not None: + headers = data[header] + data = data[header + 1 :] + else: + headers = [] + + indices = [row[0] for row in data] + data = [row[1:] for row in data] + data_int = [list(map(int, i)) for i in data] + + return CSV(headers, indices, torch.tensor(data_int)) + + def _check_integrity(self) -> bool: + for (_, md5, filename) in self.file_list: + fpath = os.path.join(self.root, self.base_folder, filename) + _, ext = os.path.splitext(filename) + # Allow original archive to be deleted (zip and 7z) + # Only need the extracted images + if ext not in [".zip", ".7z"] and not check_integrity(fpath, md5): + return False + + # Should check a hash of the images + return os.path.isdir(os.path.join(self.root, self.base_folder, "img_align_celeba")) + + def download(self) -> None: + if self._check_integrity(): + return + + for (file_id, md5, filename) in self.file_list: + download_file_from_google_drive(file_id, os.path.join(self.root, self.base_folder), filename, md5) + + extract_archive(os.path.join(self.root, self.base_folder, "img_align_celeba.zip")) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + X = PIL.Image.open(os.path.join(self.root, self.base_folder, "img_align_celeba", self.filename[index])) + + target: Any = [] + for t in self.target_type: + if t == "attr": + target.append(self.attr[index, :]) + elif t == "identity": + target.append(self.identity[index, 0]) + elif t == "bbox": + target.append(self.bbox[index, :]) + elif t == "landmarks": + target.append(self.landmarks_align[index, :]) + else: + # TODO: refactor with utils.verify_str_arg + raise ValueError(f'Target type "{t}" is not recognized.') + + if self.transform is not None: + X = self.transform(X) + + if target: + target = tuple(target) if len(target) > 1 else target[0] + + if self.target_transform is not None: + target = self.target_transform(target) + else: + target = None + + return X, target + + def __len__(self) -> int: + return len(self.attr) + + def extra_repr(self) -> str: + lines = ["Target type: {target_type}", "Split: {split}"] + return "\n".join(lines).format(**self.__dict__) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/cifar.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/cifar.py new file mode 100644 index 0000000000000000000000000000000000000000..931110168de8fa45429a0af46caca0d6a2e36b3b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/cifar.py @@ -0,0 +1,167 @@ +import os.path +import pickle +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import numpy as np +from PIL import Image + +from .utils import check_integrity, download_and_extract_archive +from .vision import VisionDataset + + +class CIFAR10(VisionDataset): + """`CIFAR10 `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``cifar-10-batches-py`` exists or will be saved to if download is set to True. + train (bool, optional): If True, creates dataset from training set, otherwise + creates from test set. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + + base_folder = "cifar-10-batches-py" + url = "https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz" + filename = "cifar-10-python.tar.gz" + tgz_md5 = "c58f30108f718f92721af3b95e74349a" + train_list = [ + ["data_batch_1", "c99cafc152244af753f735de768cd75f"], + ["data_batch_2", "d4bba439e000b95fd0a9bffe97cbabec"], + ["data_batch_3", "54ebc095f3ab1f0389bbae665268c751"], + ["data_batch_4", "634d18415352ddfa80567beed471001a"], + ["data_batch_5", "482c414d41f54cd18b22e5b47cb7c3cb"], + ] + + test_list = [ + ["test_batch", "40351d587109b95175f43aff81a1287e"], + ] + meta = { + "filename": "batches.meta", + "key": "label_names", + "md5": "5ff9c542aee3614f3951f8cda6e48888", + } + + def __init__( + self, + root: Union[str, Path], + train: bool = True, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + + super().__init__(root, transform=transform, target_transform=target_transform) + + self.train = train # training set or test set + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + if self.train: + downloaded_list = self.train_list + else: + downloaded_list = self.test_list + + self.data: Any = [] + self.targets = [] + + # now load the picked numpy arrays + for file_name, checksum in downloaded_list: + file_path = os.path.join(self.root, self.base_folder, file_name) + with open(file_path, "rb") as f: + entry = pickle.load(f, encoding="latin1") + self.data.append(entry["data"]) + if "labels" in entry: + self.targets.extend(entry["labels"]) + else: + self.targets.extend(entry["fine_labels"]) + + self.data = np.vstack(self.data).reshape(-1, 3, 32, 32) + self.data = self.data.transpose((0, 2, 3, 1)) # convert to HWC + + self._load_meta() + + def _load_meta(self) -> None: + path = os.path.join(self.root, self.base_folder, self.meta["filename"]) + if not check_integrity(path, self.meta["md5"]): + raise RuntimeError("Dataset metadata file not found or corrupted. You can use download=True to download it") + with open(path, "rb") as infile: + data = pickle.load(infile, encoding="latin1") + self.classes = data[self.meta["key"]] + self.class_to_idx = {_class: i for i, _class in enumerate(self.classes)} + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target class. + """ + img, target = self.data[index], self.targets[index] + + # doing this so that it is consistent with all other datasets + # to return a PIL Image + img = Image.fromarray(img) + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.data) + + def _check_integrity(self) -> bool: + for filename, md5 in self.train_list + self.test_list: + fpath = os.path.join(self.root, self.base_folder, filename) + if not check_integrity(fpath, md5): + return False + return True + + def download(self) -> None: + if self._check_integrity(): + return + download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5) + + def extra_repr(self) -> str: + split = "Train" if self.train is True else "Test" + return f"Split: {split}" + + +class CIFAR100(CIFAR10): + """`CIFAR100 `_ Dataset. + + This is a subclass of the `CIFAR10` Dataset. + """ + + base_folder = "cifar-100-python" + url = "https://www.cs.toronto.edu/~kriz/cifar-100-python.tar.gz" + filename = "cifar-100-python.tar.gz" + tgz_md5 = "eb9058c3a382ffc7106e4002c42a8d85" + train_list = [ + ["train", "16019d7e3df5f24257cddd939b257f8d"], + ] + + test_list = [ + ["test", "f0ef6b0ae62326f3e7ffdfab6717acfc"], + ] + meta = { + "filename": "meta", + "key": "fine_label_names", + "md5": "7973b15100ade9c7d40fb424638fde48", + } diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/cityscapes.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/cityscapes.py new file mode 100644 index 0000000000000000000000000000000000000000..9f49eee66c5bf6851f6f71accdb878a6f9a4726e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/cityscapes.py @@ -0,0 +1,222 @@ +import json +import os +from collections import namedtuple +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +from PIL import Image + +from .utils import extract_archive, iterable_to_str, verify_str_arg +from .vision import VisionDataset + + +class Cityscapes(VisionDataset): + """`Cityscapes `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory ``leftImg8bit`` + and ``gtFine`` or ``gtCoarse`` are located. + split (string, optional): The image split to use, ``train``, ``test`` or ``val`` if mode="fine" + otherwise ``train``, ``train_extra`` or ``val`` + mode (string, optional): The quality mode to use, ``fine`` or ``coarse`` + target_type (string or list, optional): Type of target to use, ``instance``, ``semantic``, ``polygon`` + or ``color``. Can also be a list to output a tuple with all specified target types. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. + + Examples: + + Get semantic segmentation target + + .. code-block:: python + + dataset = Cityscapes('./data/cityscapes', split='train', mode='fine', + target_type='semantic') + + img, smnt = dataset[0] + + Get multiple targets + + .. code-block:: python + + dataset = Cityscapes('./data/cityscapes', split='train', mode='fine', + target_type=['instance', 'color', 'polygon']) + + img, (inst, col, poly) = dataset[0] + + Validate on the "coarse" set + + .. code-block:: python + + dataset = Cityscapes('./data/cityscapes', split='val', mode='coarse', + target_type='semantic') + + img, smnt = dataset[0] + """ + + # Based on https://github.com/mcordts/cityscapesScripts + CityscapesClass = namedtuple( + "CityscapesClass", + ["name", "id", "train_id", "category", "category_id", "has_instances", "ignore_in_eval", "color"], + ) + + classes = [ + CityscapesClass("unlabeled", 0, 255, "void", 0, False, True, (0, 0, 0)), + CityscapesClass("ego vehicle", 1, 255, "void", 0, False, True, (0, 0, 0)), + CityscapesClass("rectification border", 2, 255, "void", 0, False, True, (0, 0, 0)), + CityscapesClass("out of roi", 3, 255, "void", 0, False, True, (0, 0, 0)), + CityscapesClass("static", 4, 255, "void", 0, False, True, (0, 0, 0)), + CityscapesClass("dynamic", 5, 255, "void", 0, False, True, (111, 74, 0)), + CityscapesClass("ground", 6, 255, "void", 0, False, True, (81, 0, 81)), + CityscapesClass("road", 7, 0, "flat", 1, False, False, (128, 64, 128)), + CityscapesClass("sidewalk", 8, 1, "flat", 1, False, False, (244, 35, 232)), + CityscapesClass("parking", 9, 255, "flat", 1, False, True, (250, 170, 160)), + CityscapesClass("rail track", 10, 255, "flat", 1, False, True, (230, 150, 140)), + CityscapesClass("building", 11, 2, "construction", 2, False, False, (70, 70, 70)), + CityscapesClass("wall", 12, 3, "construction", 2, False, False, (102, 102, 156)), + CityscapesClass("fence", 13, 4, "construction", 2, False, False, (190, 153, 153)), + CityscapesClass("guard rail", 14, 255, "construction", 2, False, True, (180, 165, 180)), + CityscapesClass("bridge", 15, 255, "construction", 2, False, True, (150, 100, 100)), + CityscapesClass("tunnel", 16, 255, "construction", 2, False, True, (150, 120, 90)), + CityscapesClass("pole", 17, 5, "object", 3, False, False, (153, 153, 153)), + CityscapesClass("polegroup", 18, 255, "object", 3, False, True, (153, 153, 153)), + CityscapesClass("traffic light", 19, 6, "object", 3, False, False, (250, 170, 30)), + CityscapesClass("traffic sign", 20, 7, "object", 3, False, False, (220, 220, 0)), + CityscapesClass("vegetation", 21, 8, "nature", 4, False, False, (107, 142, 35)), + CityscapesClass("terrain", 22, 9, "nature", 4, False, False, (152, 251, 152)), + CityscapesClass("sky", 23, 10, "sky", 5, False, False, (70, 130, 180)), + CityscapesClass("person", 24, 11, "human", 6, True, False, (220, 20, 60)), + CityscapesClass("rider", 25, 12, "human", 6, True, False, (255, 0, 0)), + CityscapesClass("car", 26, 13, "vehicle", 7, True, False, (0, 0, 142)), + CityscapesClass("truck", 27, 14, "vehicle", 7, True, False, (0, 0, 70)), + CityscapesClass("bus", 28, 15, "vehicle", 7, True, False, (0, 60, 100)), + CityscapesClass("caravan", 29, 255, "vehicle", 7, True, True, (0, 0, 90)), + CityscapesClass("trailer", 30, 255, "vehicle", 7, True, True, (0, 0, 110)), + CityscapesClass("train", 31, 16, "vehicle", 7, True, False, (0, 80, 100)), + CityscapesClass("motorcycle", 32, 17, "vehicle", 7, True, False, (0, 0, 230)), + CityscapesClass("bicycle", 33, 18, "vehicle", 7, True, False, (119, 11, 32)), + CityscapesClass("license plate", -1, -1, "vehicle", 7, False, True, (0, 0, 142)), + ] + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + mode: str = "fine", + target_type: Union[List[str], str] = "instance", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + transforms: Optional[Callable] = None, + ) -> None: + super().__init__(root, transforms, transform, target_transform) + self.mode = "gtFine" if mode == "fine" else "gtCoarse" + self.images_dir = os.path.join(self.root, "leftImg8bit", split) + self.targets_dir = os.path.join(self.root, self.mode, split) + self.target_type = target_type + self.split = split + self.images = [] + self.targets = [] + + verify_str_arg(mode, "mode", ("fine", "coarse")) + if mode == "fine": + valid_modes = ("train", "test", "val") + else: + valid_modes = ("train", "train_extra", "val") + msg = "Unknown value '{}' for argument split if mode is '{}'. Valid values are {{{}}}." + msg = msg.format(split, mode, iterable_to_str(valid_modes)) + verify_str_arg(split, "split", valid_modes, msg) + + if not isinstance(target_type, list): + self.target_type = [target_type] + [ + verify_str_arg(value, "target_type", ("instance", "semantic", "polygon", "color")) + for value in self.target_type + ] + + if not os.path.isdir(self.images_dir) or not os.path.isdir(self.targets_dir): + + if split == "train_extra": + image_dir_zip = os.path.join(self.root, "leftImg8bit_trainextra.zip") + else: + image_dir_zip = os.path.join(self.root, "leftImg8bit_trainvaltest.zip") + + if self.mode == "gtFine": + target_dir_zip = os.path.join(self.root, f"{self.mode}_trainvaltest.zip") + elif self.mode == "gtCoarse": + target_dir_zip = os.path.join(self.root, f"{self.mode}.zip") + + if os.path.isfile(image_dir_zip) and os.path.isfile(target_dir_zip): + extract_archive(from_path=image_dir_zip, to_path=self.root) + extract_archive(from_path=target_dir_zip, to_path=self.root) + else: + raise RuntimeError( + "Dataset not found or incomplete. Please make sure all required folders for the" + ' specified "split" and "mode" are inside the "root" directory' + ) + + for city in os.listdir(self.images_dir): + img_dir = os.path.join(self.images_dir, city) + target_dir = os.path.join(self.targets_dir, city) + for file_name in os.listdir(img_dir): + target_types = [] + for t in self.target_type: + target_name = "{}_{}".format( + file_name.split("_leftImg8bit")[0], self._get_target_suffix(self.mode, t) + ) + target_types.append(os.path.join(target_dir, target_name)) + + self.images.append(os.path.join(img_dir, file_name)) + self.targets.append(target_types) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + Returns: + tuple: (image, target) where target is a tuple of all target types if target_type is a list with more + than one item. Otherwise, target is a json object if target_type="polygon", else the image segmentation. + """ + + image = Image.open(self.images[index]).convert("RGB") + + targets: Any = [] + for i, t in enumerate(self.target_type): + if t == "polygon": + target = self._load_json(self.targets[index][i]) + else: + target = Image.open(self.targets[index][i]) # type: ignore[assignment] + + targets.append(target) + + target = tuple(targets) if len(targets) > 1 else targets[0] # type: ignore[assignment] + + if self.transforms is not None: + image, target = self.transforms(image, target) + + return image, target + + def __len__(self) -> int: + return len(self.images) + + def extra_repr(self) -> str: + lines = ["Split: {split}", "Mode: {mode}", "Type: {target_type}"] + return "\n".join(lines).format(**self.__dict__) + + def _load_json(self, path: str) -> Dict[str, Any]: + with open(path) as file: + data = json.load(file) + return data + + def _get_target_suffix(self, mode: str, target_type: str) -> str: + if target_type == "instance": + return f"{mode}_instanceIds.png" + elif target_type == "semantic": + return f"{mode}_labelIds.png" + elif target_type == "color": + return f"{mode}_color.png" + else: + return f"{mode}_polygons.json" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/clevr.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/clevr.py new file mode 100644 index 0000000000000000000000000000000000000000..f67508be8f53a598f1473c7ff91e15cb978833a9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/clevr.py @@ -0,0 +1,88 @@ +import json +import pathlib +from typing import Any, Callable, List, Optional, Tuple, Union +from urllib.parse import urlparse + +from PIL import Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class CLEVRClassification(VisionDataset): + """`CLEVR `_ classification dataset. + + The number of objects in a scene are used as label. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory ``root/clevr`` exists or will be saved to if download is + set to True. + split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in them target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and puts it in root directory. If + dataset is already downloaded, it is not downloaded again. + """ + + _URL = "https://dl.fbaipublicfiles.com/clevr/CLEVR_v1.0.zip" + _MD5 = "b11922020e72d0cd9154779b2d3d07d2" + + def __init__( + self, + root: Union[str, pathlib.Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + self._split = verify_str_arg(split, "split", ("train", "val", "test")) + super().__init__(root, transform=transform, target_transform=target_transform) + self._base_folder = pathlib.Path(self.root) / "clevr" + self._data_folder = self._base_folder / pathlib.Path(urlparse(self._URL).path).stem + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + self._image_files = sorted(self._data_folder.joinpath("images", self._split).glob("*")) + + self._labels: List[Optional[int]] + if self._split != "test": + with open(self._data_folder / "scenes" / f"CLEVR_{self._split}_scenes.json") as file: + content = json.load(file) + num_objects = {scene["image_filename"]: len(scene["objects"]) for scene in content["scenes"]} + self._labels = [num_objects[image_file.name] for image_file in self._image_files] + else: + self._labels = [None] * len(self._image_files) + + def __len__(self) -> int: + return len(self._image_files) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_file = self._image_files[idx] + label = self._labels[idx] + + image = Image.open(image_file).convert("RGB") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + label = self.target_transform(label) + + return image, label + + def _check_exists(self) -> bool: + return self._data_folder.exists() and self._data_folder.is_dir() + + def _download(self) -> None: + if self._check_exists(): + return + + download_and_extract_archive(self._URL, str(self._base_folder), md5=self._MD5) + + def extra_repr(self) -> str: + return f"split={self._split}" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/coco.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/coco.py new file mode 100644 index 0000000000000000000000000000000000000000..c1bc73090212d70774e4679f53f37f23abe862df --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/coco.py @@ -0,0 +1,109 @@ +import os.path +from pathlib import Path +from typing import Any, Callable, List, Optional, Tuple, Union + +from PIL import Image + +from .vision import VisionDataset + + +class CocoDetection(VisionDataset): + """`MS Coco Detection `_ Dataset. + + It requires the `COCO API to be installed `_. + + Args: + root (str or ``pathlib.Path``): Root directory where images are downloaded to. + annFile (string): Path to json annotation file. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.PILToTensor`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. + """ + + def __init__( + self, + root: Union[str, Path], + annFile: str, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + transforms: Optional[Callable] = None, + ) -> None: + super().__init__(root, transforms, transform, target_transform) + from pycocotools.coco import COCO + + self.coco = COCO(annFile) + self.ids = list(sorted(self.coco.imgs.keys())) + + def _load_image(self, id: int) -> Image.Image: + path = self.coco.loadImgs(id)[0]["file_name"] + return Image.open(os.path.join(self.root, path)).convert("RGB") + + def _load_target(self, id: int) -> List[Any]: + return self.coco.loadAnns(self.coco.getAnnIds(id)) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + + if not isinstance(index, int): + raise ValueError(f"Index must be of type integer, got {type(index)} instead.") + + id = self.ids[index] + image = self._load_image(id) + target = self._load_target(id) + + if self.transforms is not None: + image, target = self.transforms(image, target) + + return image, target + + def __len__(self) -> int: + return len(self.ids) + + +class CocoCaptions(CocoDetection): + """`MS Coco Captions `_ Dataset. + + It requires the `COCO API to be installed `_. + + Args: + root (str or ``pathlib.Path``): Root directory where images are downloaded to. + annFile (string): Path to json annotation file. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.PILToTensor`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. + + Example: + + .. code:: python + + import torchvision.datasets as dset + import torchvision.transforms as transforms + cap = dset.CocoCaptions(root = 'dir where images are', + annFile = 'json annotation file', + transform=transforms.PILToTensor()) + + print('Number of samples: ', len(cap)) + img, target = cap[3] # load 4th sample + + print("Image Size: ", img.size()) + print(target) + + Output: :: + + Number of samples: 82783 + Image Size: (3L, 427L, 640L) + [u'A plane emitting smoke stream flying over a mountain.', + u'A plane darts across a bright blue sky behind a mountain covered in snow', + u'A plane leaves a contrail above the snowy mountain top.', + u'A mountain that has a plane flying overheard in the distance.', + u'A mountain view with a plume of smoke in the background'] + + """ + + def _load_target(self, id: int) -> List[str]: + return [ann["caption"] for ann in super()._load_target(id)] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/country211.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/country211.py new file mode 100644 index 0000000000000000000000000000000000000000..35a0e03bc14b95ff2ee6e662e1d858f432df8f35 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/country211.py @@ -0,0 +1,58 @@ +from pathlib import Path +from typing import Callable, Optional, Union + +from .folder import ImageFolder +from .utils import download_and_extract_archive, verify_str_arg + + +class Country211(ImageFolder): + """`The Country211 Data Set `_ from OpenAI. + + This dataset was built by filtering the images from the YFCC100m dataset + that have GPS coordinate corresponding to a ISO-3166 country code. The + dataset is balanced by sampling 150 train images, 50 validation images, and + 100 test images for each country. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"train"`` (default), ``"valid"`` and ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and puts it into + ``root/country211/``. If dataset is already downloaded, it is not downloaded again. + """ + + _URL = "https://openaipublic.azureedge.net/clip/data/country211.tgz" + _MD5 = "84988d7644798601126c29e9877aab6a" + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + self._split = verify_str_arg(split, "split", ("train", "valid", "test")) + + root = Path(root).expanduser() + self.root = str(root) + self._base_folder = root / "country211" + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + super().__init__(str(self._base_folder / self._split), transform=transform, target_transform=target_transform) + self.root = str(root) + + def _check_exists(self) -> bool: + return self._base_folder.exists() and self._base_folder.is_dir() + + def _download(self) -> None: + if self._check_exists(): + return + download_and_extract_archive(self._URL, download_root=self.root, md5=self._MD5) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/dtd.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/dtd.py new file mode 100644 index 0000000000000000000000000000000000000000..d29615fc5d9fec5bc6ea84d6ffd640d3db072a42 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/dtd.py @@ -0,0 +1,100 @@ +import os +import pathlib +from typing import Any, Callable, Optional, Tuple, Union + +import PIL.Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class DTD(VisionDataset): + """`Describable Textures Dataset (DTD) `_. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``. + partition (int, optional): The dataset partition. Should be ``1 <= partition <= 10``. Defaults to ``1``. + + .. note:: + + The partition only changes which split each image belongs to. Thus, regardless of the selected + partition, combining all splits will result in all images. + + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. Default is False. + """ + + _URL = "https://www.robots.ox.ac.uk/~vgg/data/dtd/download/dtd-r1.0.1.tar.gz" + _MD5 = "fff73e5086ae6bdbea199a49dfb8a4c1" + + def __init__( + self, + root: Union[str, pathlib.Path], + split: str = "train", + partition: int = 1, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + self._split = verify_str_arg(split, "split", ("train", "val", "test")) + if not isinstance(partition, int) and not (1 <= partition <= 10): + raise ValueError( + f"Parameter 'partition' should be an integer with `1 <= partition <= 10`, " + f"but got {partition} instead" + ) + self._partition = partition + + super().__init__(root, transform=transform, target_transform=target_transform) + self._base_folder = pathlib.Path(self.root) / type(self).__name__.lower() + self._data_folder = self._base_folder / "dtd" + self._meta_folder = self._data_folder / "labels" + self._images_folder = self._data_folder / "images" + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + self._image_files = [] + classes = [] + with open(self._meta_folder / f"{self._split}{self._partition}.txt") as file: + for line in file: + cls, name = line.strip().split("/") + self._image_files.append(self._images_folder.joinpath(cls, name)) + classes.append(cls) + + self.classes = sorted(set(classes)) + self.class_to_idx = dict(zip(self.classes, range(len(self.classes)))) + self._labels = [self.class_to_idx[cls] for cls in classes] + + def __len__(self) -> int: + return len(self._image_files) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_file, label = self._image_files[idx], self._labels[idx] + image = PIL.Image.open(image_file).convert("RGB") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + label = self.target_transform(label) + + return image, label + + def extra_repr(self) -> str: + return f"split={self._split}, partition={self._partition}" + + def _check_exists(self) -> bool: + return os.path.exists(self._data_folder) and os.path.isdir(self._data_folder) + + def _download(self) -> None: + if self._check_exists(): + return + download_and_extract_archive(self._URL, download_root=str(self._base_folder), md5=self._MD5) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/eurosat.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/eurosat.py new file mode 100644 index 0000000000000000000000000000000000000000..0715c309a8bda8527109333ba0d5eab0392ec136 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/eurosat.py @@ -0,0 +1,62 @@ +import os +from pathlib import Path +from typing import Callable, Optional, Union + +from .folder import ImageFolder +from .utils import download_and_extract_archive + + +class EuroSAT(ImageFolder): + """RGB version of the `EuroSAT `_ Dataset. + + For the MS version of the dataset, see + `TorchGeo `__. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where ``root/eurosat`` exists. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. Default is False. + """ + + def __init__( + self, + root: Union[str, Path], + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + self.root = os.path.expanduser(root) + self._base_folder = os.path.join(self.root, "eurosat") + self._data_folder = os.path.join(self._base_folder, "2750") + + if download: + self.download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + super().__init__(self._data_folder, transform=transform, target_transform=target_transform) + self.root = os.path.expanduser(root) + + def __len__(self) -> int: + return len(self.samples) + + def _check_exists(self) -> bool: + return os.path.exists(self._data_folder) + + def download(self) -> None: + + if self._check_exists(): + return + + os.makedirs(self._base_folder, exist_ok=True) + download_and_extract_archive( + "https://huggingface.co/datasets/torchgeo/eurosat/resolve/c877bcd43f099cd0196738f714544e355477f3fd/EuroSAT.zip", + download_root=self._base_folder, + md5="c8fa014336c82ac7804f0398fcb19387", + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fakedata.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fakedata.py new file mode 100644 index 0000000000000000000000000000000000000000..9374bbf22db7e5f4ac90351f1ec972be4922465b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fakedata.py @@ -0,0 +1,67 @@ +from typing import Any, Callable, Optional, Tuple + +import torch + +from .. import transforms +from .vision import VisionDataset + + +class FakeData(VisionDataset): + """A fake dataset that returns randomly generated images and returns them as PIL images + + Args: + size (int, optional): Size of the dataset. Default: 1000 images + image_size(tuple, optional): Size if the returned images. Default: (3, 224, 224) + num_classes(int, optional): Number of classes in the dataset. Default: 10 + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + random_offset (int): Offsets the index-based random seed used to + generate each image. Default: 0 + + """ + + def __init__( + self, + size: int = 1000, + image_size: Tuple[int, int, int] = (3, 224, 224), + num_classes: int = 10, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + random_offset: int = 0, + ) -> None: + super().__init__(transform=transform, target_transform=target_transform) + self.size = size + self.num_classes = num_classes + self.image_size = image_size + self.random_offset = random_offset + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is class_index of the target class. + """ + # create random image that is consistent with the index id + if index >= len(self): + raise IndexError(f"{self.__class__.__name__} index out of range") + rng_state = torch.get_rng_state() + torch.manual_seed(index + self.random_offset) + img = torch.randn(*self.image_size) + target = torch.randint(0, self.num_classes, size=(1,), dtype=torch.long)[0] + torch.set_rng_state(rng_state) + + # convert to PIL Image + img = transforms.ToPILImage()(img) + if self.transform is not None: + img = self.transform(img) + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target.item() + + def __len__(self) -> int: + return self.size diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fer2013.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fer2013.py new file mode 100644 index 0000000000000000000000000000000000000000..8a7ea5d27f3060e77eb0503168a7b96057196df6 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fer2013.py @@ -0,0 +1,120 @@ +import csv +import pathlib +from typing import Any, Callable, Optional, Tuple, Union + +import torch +from PIL import Image + +from .utils import check_integrity, verify_str_arg +from .vision import VisionDataset + + +class FER2013(VisionDataset): + """`FER2013 + `_ Dataset. + + .. note:: + This dataset can return test labels only if ``fer2013.csv`` OR + ``icml_face_data.csv`` are present in ``root/fer2013/``. If only + ``train.csv`` and ``test.csv`` are present, the test labels are set to + ``None``. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``root/fer2013`` exists. This directory may contain either + ``fer2013.csv``, ``icml_face_data.csv``, or both ``train.csv`` and + ``test.csv``. Precendence is given in that order, i.e. if + ``fer2013.csv`` is present then the rest of the files will be + ignored. All these (combinations of) files contain the same data and + are supported for convenience, but only ``fer2013.csv`` and + ``icml_face_data.csv`` are able to return non-None test labels. + split (string, optional): The dataset split, supports ``"train"`` (default), or ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + """ + + _RESOURCES = { + "train": ("train.csv", "3f0dfb3d3fd99c811a1299cb947e3131"), + "test": ("test.csv", "b02c2298636a634e8c2faabbf3ea9a23"), + # The fer2013.csv and icml_face_data.csv files contain both train and + # tests instances, and unlike test.csv they contain the labels for the + # test instances. We give these 2 files precedence over train.csv and + # test.csv. And yes, they both contain the same data, but with different + # column names (note the spaces) and ordering: + # $ head -n 1 fer2013.csv icml_face_data.csv train.csv test.csv + # ==> fer2013.csv <== + # emotion,pixels,Usage + # + # ==> icml_face_data.csv <== + # emotion, Usage, pixels + # + # ==> train.csv <== + # emotion,pixels + # + # ==> test.csv <== + # pixels + "fer": ("fer2013.csv", "f8428a1edbd21e88f42c73edd2a14f95"), + "icml": ("icml_face_data.csv", "b114b9e04e6949e5fe8b6a98b3892b1d"), + } + + def __init__( + self, + root: Union[str, pathlib.Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + ) -> None: + self._split = verify_str_arg(split, "split", ("train", "test")) + super().__init__(root, transform=transform, target_transform=target_transform) + + base_folder = pathlib.Path(self.root) / "fer2013" + use_fer_file = (base_folder / self._RESOURCES["fer"][0]).exists() + use_icml_file = not use_fer_file and (base_folder / self._RESOURCES["icml"][0]).exists() + file_name, md5 = self._RESOURCES["fer" if use_fer_file else "icml" if use_icml_file else self._split] + data_file = base_folder / file_name + if not check_integrity(str(data_file), md5=md5): + raise RuntimeError( + f"{file_name} not found in {base_folder} or corrupted. " + f"You can download it from " + f"https://www.kaggle.com/c/challenges-in-representation-learning-facial-expression-recognition-challenge" + ) + + pixels_key = " pixels" if use_icml_file else "pixels" + usage_key = " Usage" if use_icml_file else "Usage" + + def get_img(row): + return torch.tensor([int(idx) for idx in row[pixels_key].split()], dtype=torch.uint8).reshape(48, 48) + + def get_label(row): + if use_fer_file or use_icml_file or self._split == "train": + return int(row["emotion"]) + else: + return None + + with open(data_file, "r", newline="") as file: + rows = (row for row in csv.DictReader(file)) + + if use_fer_file or use_icml_file: + valid_keys = ("Training",) if self._split == "train" else ("PublicTest", "PrivateTest") + rows = (row for row in rows if row[usage_key] in valid_keys) + + self._samples = [(get_img(row), get_label(row)) for row in rows] + + def __len__(self) -> int: + return len(self._samples) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_tensor, target = self._samples[idx] + image = Image.fromarray(image_tensor.numpy()) + + if self.transform is not None: + image = self.transform(image) + + if self.target_transform is not None: + target = self.target_transform(target) + + return image, target + + def extra_repr(self) -> str: + return f"split={self._split}" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fgvc_aircraft.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fgvc_aircraft.py new file mode 100644 index 0000000000000000000000000000000000000000..938dcd61806b18cd236cbf9da56660f2be9720d0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/fgvc_aircraft.py @@ -0,0 +1,115 @@ +from __future__ import annotations + +import os +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import PIL.Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class FGVCAircraft(VisionDataset): + """`FGVC Aircraft `_ Dataset. + + The dataset contains 10,000 images of aircraft, with 100 images for each of 100 + different aircraft model variants, most of which are airplanes. + Aircraft models are organized in a three-levels hierarchy. The three levels, from + finer to coarser, are: + + - ``variant``, e.g. Boeing 737-700. A variant collapses all the models that are visually + indistinguishable into one class. The dataset comprises 100 different variants. + - ``family``, e.g. Boeing 737. The dataset comprises 70 different families. + - ``manufacturer``, e.g. Boeing. The dataset comprises 30 different manufacturers. + + Args: + root (str or ``pathlib.Path``): Root directory of the FGVC Aircraft dataset. + split (string, optional): The dataset split, supports ``train``, ``val``, + ``trainval`` and ``test``. + annotation_level (str, optional): The annotation level, supports ``variant``, + ``family`` and ``manufacturer``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + _URL = "https://www.robots.ox.ac.uk/~vgg/data/fgvc-aircraft/archives/fgvc-aircraft-2013b.tar.gz" + + def __init__( + self, + root: Union[str, Path], + split: str = "trainval", + annotation_level: str = "variant", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self._split = verify_str_arg(split, "split", ("train", "val", "trainval", "test")) + self._annotation_level = verify_str_arg( + annotation_level, "annotation_level", ("variant", "family", "manufacturer") + ) + + self._data_path = os.path.join(self.root, "fgvc-aircraft-2013b") + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + annotation_file = os.path.join( + self._data_path, + "data", + { + "variant": "variants.txt", + "family": "families.txt", + "manufacturer": "manufacturers.txt", + }[self._annotation_level], + ) + with open(annotation_file, "r") as f: + self.classes = [line.strip() for line in f] + + self.class_to_idx = dict(zip(self.classes, range(len(self.classes)))) + + image_data_folder = os.path.join(self._data_path, "data", "images") + labels_file = os.path.join(self._data_path, "data", f"images_{self._annotation_level}_{self._split}.txt") + + self._image_files = [] + self._labels = [] + + with open(labels_file, "r") as f: + for line in f: + image_name, label_name = line.strip().split(" ", 1) + self._image_files.append(os.path.join(image_data_folder, f"{image_name}.jpg")) + self._labels.append(self.class_to_idx[label_name]) + + def __len__(self) -> int: + return len(self._image_files) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_file, label = self._image_files[idx], self._labels[idx] + image = PIL.Image.open(image_file).convert("RGB") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + label = self.target_transform(label) + + return image, label + + def _download(self) -> None: + """ + Download the FGVC Aircraft dataset archive and extract it under root. + """ + if self._check_exists(): + return + download_and_extract_archive(self._URL, self.root) + + def _check_exists(self) -> bool: + return os.path.exists(self._data_path) and os.path.isdir(self._data_path) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/flickr.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/flickr.py new file mode 100644 index 0000000000000000000000000000000000000000..1a3cd33b73ad5a1f5cb73c9bf335bbe0f2ef8ae7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/flickr.py @@ -0,0 +1,167 @@ +import glob +import os +from collections import defaultdict +from html.parser import HTMLParser +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +from PIL import Image + +from .vision import VisionDataset + + +class Flickr8kParser(HTMLParser): + """Parser for extracting captions from the Flickr8k dataset web page.""" + + def __init__(self, root: Union[str, Path]) -> None: + super().__init__() + + self.root = root + + # Data structure to store captions + self.annotations: Dict[str, List[str]] = {} + + # State variables + self.in_table = False + self.current_tag: Optional[str] = None + self.current_img: Optional[str] = None + + def handle_starttag(self, tag: str, attrs: List[Tuple[str, Optional[str]]]) -> None: + self.current_tag = tag + + if tag == "table": + self.in_table = True + + def handle_endtag(self, tag: str) -> None: + self.current_tag = None + + if tag == "table": + self.in_table = False + + def handle_data(self, data: str) -> None: + if self.in_table: + if data == "Image Not Found": + self.current_img = None + elif self.current_tag == "a": + img_id = data.split("/")[-2] + img_id = os.path.join(self.root, img_id + "_*.jpg") + img_id = glob.glob(img_id)[0] + self.current_img = img_id + self.annotations[img_id] = [] + elif self.current_tag == "li" and self.current_img: + img_id = self.current_img + self.annotations[img_id].append(data.strip()) + + +class Flickr8k(VisionDataset): + """`Flickr8k Entities `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory where images are downloaded to. + ann_file (string): Path to annotation file. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.PILToTensor`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + """ + + def __init__( + self, + root: Union[str, Path], + ann_file: str, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self.ann_file = os.path.expanduser(ann_file) + + # Read annotations and store in a dict + parser = Flickr8kParser(self.root) + with open(self.ann_file) as fh: + parser.feed(fh.read()) + self.annotations = parser.annotations + + self.ids = list(sorted(self.annotations.keys())) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: Tuple (image, target). target is a list of captions for the image. + """ + img_id = self.ids[index] + + # Image + img = Image.open(img_id).convert("RGB") + if self.transform is not None: + img = self.transform(img) + + # Captions + target = self.annotations[img_id] + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.ids) + + +class Flickr30k(VisionDataset): + """`Flickr30k Entities `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory where images are downloaded to. + ann_file (string): Path to annotation file. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.PILToTensor`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + """ + + def __init__( + self, + root: str, + ann_file: str, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self.ann_file = os.path.expanduser(ann_file) + + # Read annotations and store in a dict + self.annotations = defaultdict(list) + with open(self.ann_file) as fh: + for line in fh: + img_id, caption = line.strip().split("\t") + self.annotations[img_id[:-2]].append(caption) + + self.ids = list(sorted(self.annotations.keys())) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: Tuple (image, target). target is a list of captions for the image. + """ + img_id = self.ids[index] + + # Image + filename = os.path.join(self.root, img_id) + img = Image.open(filename).convert("RGB") + if self.transform is not None: + img = self.transform(img) + + # Captions + target = self.annotations[img_id] + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.ids) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/flowers102.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/flowers102.py new file mode 100644 index 0000000000000000000000000000000000000000..99a2a2297def2f7e060df5737435564094f976c1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/flowers102.py @@ -0,0 +1,114 @@ +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import PIL.Image + +from .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg +from .vision import VisionDataset + + +class Flowers102(VisionDataset): + """`Oxford 102 Flower `_ Dataset. + + .. warning:: + + This class needs `scipy `_ to load target files from `.mat` format. + + Oxford 102 Flower is an image classification dataset consisting of 102 flower categories. The + flowers were chosen to be flowers commonly occurring in the United Kingdom. Each class consists of + between 40 and 258 images. + + The images have large scale, pose and light variations. In addition, there are categories that + have large variations within the category, and several very similar categories. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"train"`` (default), ``"val"``, or ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a + transformed version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + _download_url_prefix = "https://www.robots.ox.ac.uk/~vgg/data/flowers/102/" + _file_dict = { # filename, md5 + "image": ("102flowers.tgz", "52808999861908f626f3c1f4e79d11fa"), + "label": ("imagelabels.mat", "e0620be6f572b9609742df49c70aed4d"), + "setid": ("setid.mat", "a5357ecc9cb78c4bef273ce3793fc85c"), + } + _splits_map = {"train": "trnid", "val": "valid", "test": "tstid"} + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self._split = verify_str_arg(split, "split", ("train", "val", "test")) + self._base_folder = Path(self.root) / "flowers-102" + self._images_folder = self._base_folder / "jpg" + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + from scipy.io import loadmat + + set_ids = loadmat(self._base_folder / self._file_dict["setid"][0], squeeze_me=True) + image_ids = set_ids[self._splits_map[self._split]].tolist() + + labels = loadmat(self._base_folder / self._file_dict["label"][0], squeeze_me=True) + image_id_to_label = dict(enumerate((labels["labels"] - 1).tolist(), 1)) + + self._labels = [] + self._image_files = [] + for image_id in image_ids: + self._labels.append(image_id_to_label[image_id]) + self._image_files.append(self._images_folder / f"image_{image_id:05d}.jpg") + + def __len__(self) -> int: + return len(self._image_files) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_file, label = self._image_files[idx], self._labels[idx] + image = PIL.Image.open(image_file).convert("RGB") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + label = self.target_transform(label) + + return image, label + + def extra_repr(self) -> str: + return f"split={self._split}" + + def _check_integrity(self): + if not (self._images_folder.exists() and self._images_folder.is_dir()): + return False + + for id in ["label", "setid"]: + filename, md5 = self._file_dict[id] + if not check_integrity(str(self._base_folder / filename), md5): + return False + return True + + def download(self): + if self._check_integrity(): + return + download_and_extract_archive( + f"{self._download_url_prefix}{self._file_dict['image'][0]}", + str(self._base_folder), + md5=self._file_dict["image"][1], + ) + for id in ["label", "setid"]: + filename, md5 = self._file_dict[id] + download_url(self._download_url_prefix + filename, str(self._base_folder), md5=md5) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/folder.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/folder.py new file mode 100644 index 0000000000000000000000000000000000000000..d9d97e45a5cc65edce8f4b1d98caf3f7b34ee798 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/folder.py @@ -0,0 +1,337 @@ +import os +import os.path +from pathlib import Path +from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union + +from PIL import Image + +from .vision import VisionDataset + + +def has_file_allowed_extension(filename: str, extensions: Union[str, Tuple[str, ...]]) -> bool: + """Checks if a file is an allowed extension. + + Args: + filename (string): path to a file + extensions (tuple of strings): extensions to consider (lowercase) + + Returns: + bool: True if the filename ends with one of given extensions + """ + return filename.lower().endswith(extensions if isinstance(extensions, str) else tuple(extensions)) + + +def is_image_file(filename: str) -> bool: + """Checks if a file is an allowed image extension. + + Args: + filename (string): path to a file + + Returns: + bool: True if the filename ends with a known image extension + """ + return has_file_allowed_extension(filename, IMG_EXTENSIONS) + + +def find_classes(directory: Union[str, Path]) -> Tuple[List[str], Dict[str, int]]: + """Finds the class folders in a dataset. + + See :class:`DatasetFolder` for details. + """ + classes = sorted(entry.name for entry in os.scandir(directory) if entry.is_dir()) + if not classes: + raise FileNotFoundError(f"Couldn't find any class folder in {directory}.") + + class_to_idx = {cls_name: i for i, cls_name in enumerate(classes)} + return classes, class_to_idx + + +def make_dataset( + directory: Union[str, Path], + class_to_idx: Optional[Dict[str, int]] = None, + extensions: Optional[Union[str, Tuple[str, ...]]] = None, + is_valid_file: Optional[Callable[[str], bool]] = None, + allow_empty: bool = False, +) -> List[Tuple[str, int]]: + """Generates a list of samples of a form (path_to_sample, class). + + See :class:`DatasetFolder` for details. + + Note: The class_to_idx parameter is here optional and will use the logic of the ``find_classes`` function + by default. + """ + directory = os.path.expanduser(directory) + + if class_to_idx is None: + _, class_to_idx = find_classes(directory) + elif not class_to_idx: + raise ValueError("'class_to_index' must have at least one entry to collect any samples.") + + both_none = extensions is None and is_valid_file is None + both_something = extensions is not None and is_valid_file is not None + if both_none or both_something: + raise ValueError("Both extensions and is_valid_file cannot be None or not None at the same time") + + if extensions is not None: + + def is_valid_file(x: str) -> bool: + return has_file_allowed_extension(x, extensions) # type: ignore[arg-type] + + is_valid_file = cast(Callable[[str], bool], is_valid_file) + + instances = [] + available_classes = set() + for target_class in sorted(class_to_idx.keys()): + class_index = class_to_idx[target_class] + target_dir = os.path.join(directory, target_class) + if not os.path.isdir(target_dir): + continue + for root, _, fnames in sorted(os.walk(target_dir, followlinks=True)): + for fname in sorted(fnames): + path = os.path.join(root, fname) + if is_valid_file(path): + item = path, class_index + instances.append(item) + + if target_class not in available_classes: + available_classes.add(target_class) + + empty_classes = set(class_to_idx.keys()) - available_classes + if empty_classes and not allow_empty: + msg = f"Found no valid file for the classes {', '.join(sorted(empty_classes))}. " + if extensions is not None: + msg += f"Supported extensions are: {extensions if isinstance(extensions, str) else ', '.join(extensions)}" + raise FileNotFoundError(msg) + + return instances + + +class DatasetFolder(VisionDataset): + """A generic data loader. + + This default directory structure can be customized by overriding the + :meth:`find_classes` method. + + Args: + root (str or ``pathlib.Path``): Root directory path. + loader (callable): A function to load a sample given its path. + extensions (tuple[string]): A list of allowed extensions. + both extensions and is_valid_file should not be passed. + transform (callable, optional): A function/transform that takes in + a sample and returns a transformed version. + E.g, ``transforms.RandomCrop`` for images. + target_transform (callable, optional): A function/transform that takes + in the target and transforms it. + is_valid_file (callable, optional): A function that takes path of a file + and check if the file is a valid file (used to check of corrupt files) + both extensions and is_valid_file should not be passed. + allow_empty(bool, optional): If True, empty folders are considered to be valid classes. + An error is raised on empty folders if False (default). + + Attributes: + classes (list): List of the class names sorted alphabetically. + class_to_idx (dict): Dict with items (class_name, class_index). + samples (list): List of (sample path, class_index) tuples + targets (list): The class_index value for each image in the dataset + """ + + def __init__( + self, + root: Union[str, Path], + loader: Callable[[str], Any], + extensions: Optional[Tuple[str, ...]] = None, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + is_valid_file: Optional[Callable[[str], bool]] = None, + allow_empty: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + classes, class_to_idx = self.find_classes(self.root) + samples = self.make_dataset( + self.root, + class_to_idx=class_to_idx, + extensions=extensions, + is_valid_file=is_valid_file, + allow_empty=allow_empty, + ) + + self.loader = loader + self.extensions = extensions + + self.classes = classes + self.class_to_idx = class_to_idx + self.samples = samples + self.targets = [s[1] for s in samples] + + @staticmethod + def make_dataset( + directory: Union[str, Path], + class_to_idx: Dict[str, int], + extensions: Optional[Tuple[str, ...]] = None, + is_valid_file: Optional[Callable[[str], bool]] = None, + allow_empty: bool = False, + ) -> List[Tuple[str, int]]: + """Generates a list of samples of a form (path_to_sample, class). + + This can be overridden to e.g. read files from a compressed zip file instead of from the disk. + + Args: + directory (str): root dataset directory, corresponding to ``self.root``. + class_to_idx (Dict[str, int]): Dictionary mapping class name to class index. + extensions (optional): A list of allowed extensions. + Either extensions or is_valid_file should be passed. Defaults to None. + is_valid_file (optional): A function that takes path of a file + and checks if the file is a valid file + (used to check of corrupt files) both extensions and + is_valid_file should not be passed. Defaults to None. + allow_empty(bool, optional): If True, empty folders are considered to be valid classes. + An error is raised on empty folders if False (default). + + Raises: + ValueError: In case ``class_to_idx`` is empty. + ValueError: In case ``extensions`` and ``is_valid_file`` are None or both are not None. + FileNotFoundError: In case no valid file was found for any class. + + Returns: + List[Tuple[str, int]]: samples of a form (path_to_sample, class) + """ + if class_to_idx is None: + # prevent potential bug since make_dataset() would use the class_to_idx logic of the + # find_classes() function, instead of using that of the find_classes() method, which + # is potentially overridden and thus could have a different logic. + raise ValueError("The class_to_idx parameter cannot be None.") + return make_dataset( + directory, class_to_idx, extensions=extensions, is_valid_file=is_valid_file, allow_empty=allow_empty + ) + + def find_classes(self, directory: Union[str, Path]) -> Tuple[List[str], Dict[str, int]]: + """Find the class folders in a dataset structured as follows:: + + directory/ + ├── class_x + │ ├── xxx.ext + │ ├── xxy.ext + │ └── ... + │ └── xxz.ext + └── class_y + ├── 123.ext + ├── nsdf3.ext + └── ... + └── asd932_.ext + + This method can be overridden to only consider + a subset of classes, or to adapt to a different dataset directory structure. + + Args: + directory(str): Root directory path, corresponding to ``self.root`` + + Raises: + FileNotFoundError: If ``dir`` has no class folders. + + Returns: + (Tuple[List[str], Dict[str, int]]): List of all classes and dictionary mapping each class to an index. + """ + return find_classes(directory) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (sample, target) where target is class_index of the target class. + """ + path, target = self.samples[index] + sample = self.loader(path) + if self.transform is not None: + sample = self.transform(sample) + if self.target_transform is not None: + target = self.target_transform(target) + + return sample, target + + def __len__(self) -> int: + return len(self.samples) + + +IMG_EXTENSIONS = (".jpg", ".jpeg", ".png", ".ppm", ".bmp", ".pgm", ".tif", ".tiff", ".webp") + + +def pil_loader(path: str) -> Image.Image: + # open path as file to avoid ResourceWarning (https://github.com/python-pillow/Pillow/issues/835) + with open(path, "rb") as f: + img = Image.open(f) + return img.convert("RGB") + + +# TODO: specify the return type +def accimage_loader(path: str) -> Any: + import accimage + + try: + return accimage.Image(path) + except OSError: + # Potentially a decoding problem, fall back to PIL.Image + return pil_loader(path) + + +def default_loader(path: str) -> Any: + from torchvision import get_image_backend + + if get_image_backend() == "accimage": + return accimage_loader(path) + else: + return pil_loader(path) + + +class ImageFolder(DatasetFolder): + """A generic data loader where the images are arranged in this way by default: :: + + root/dog/xxx.png + root/dog/xxy.png + root/dog/[...]/xxz.png + + root/cat/123.png + root/cat/nsdf3.png + root/cat/[...]/asd932_.png + + This class inherits from :class:`~torchvision.datasets.DatasetFolder` so + the same methods can be overridden to customize the dataset. + + Args: + root (str or ``pathlib.Path``): Root directory path. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + loader (callable, optional): A function to load an image given its path. + is_valid_file (callable, optional): A function that takes path of an Image file + and check if the file is a valid file (used to check of corrupt files) + allow_empty(bool, optional): If True, empty folders are considered to be valid classes. + An error is raised on empty folders if False (default). + + Attributes: + classes (list): List of the class names sorted alphabetically. + class_to_idx (dict): Dict with items (class_name, class_index). + imgs (list): List of (image path, class_index) tuples + """ + + def __init__( + self, + root: Union[str, Path], + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + loader: Callable[[str], Any] = default_loader, + is_valid_file: Optional[Callable[[str], bool]] = None, + allow_empty: bool = False, + ): + super().__init__( + root, + loader, + IMG_EXTENSIONS if is_valid_file is None else None, + transform=transform, + target_transform=target_transform, + is_valid_file=is_valid_file, + allow_empty=allow_empty, + ) + self.imgs = self.samples diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/food101.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/food101.py new file mode 100644 index 0000000000000000000000000000000000000000..8b1a1e3ad21a93915c14cfc72e5dc777ffb62585 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/food101.py @@ -0,0 +1,93 @@ +import json +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import PIL.Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class Food101(VisionDataset): + """`The Food-101 Data Set `_. + + The Food-101 is a challenging data set of 101 food categories with 101,000 images. + For each class, 250 manually reviewed test images are provided as well as 750 training images. + On purpose, the training images were not cleaned, and thus still contain some amount of noise. + This comes mostly in the form of intense colors and sometimes wrong labels. All images were + rescaled to have a maximum side length of 512 pixels. + + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"train"`` (default) and ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. Default is False. + """ + + _URL = "http://data.vision.ee.ethz.ch/cvl/food-101.tar.gz" + _MD5 = "85eeb15f3717b99a5da872d97d918f87" + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self._split = verify_str_arg(split, "split", ("train", "test")) + self._base_folder = Path(self.root) / "food-101" + self._meta_folder = self._base_folder / "meta" + self._images_folder = self._base_folder / "images" + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + self._labels = [] + self._image_files = [] + with open(self._meta_folder / f"{split}.json") as f: + metadata = json.loads(f.read()) + + self.classes = sorted(metadata.keys()) + self.class_to_idx = dict(zip(self.classes, range(len(self.classes)))) + + for class_label, im_rel_paths in metadata.items(): + self._labels += [self.class_to_idx[class_label]] * len(im_rel_paths) + self._image_files += [ + self._images_folder.joinpath(*f"{im_rel_path}.jpg".split("/")) for im_rel_path in im_rel_paths + ] + + def __len__(self) -> int: + return len(self._image_files) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_file, label = self._image_files[idx], self._labels[idx] + image = PIL.Image.open(image_file).convert("RGB") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + label = self.target_transform(label) + + return image, label + + def extra_repr(self) -> str: + return f"split={self._split}" + + def _check_exists(self) -> bool: + return all(folder.exists() and folder.is_dir() for folder in (self._meta_folder, self._images_folder)) + + def _download(self) -> None: + if self._check_exists(): + return + download_and_extract_archive(self._URL, download_root=self.root, md5=self._MD5) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/gtsrb.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/gtsrb.py new file mode 100644 index 0000000000000000000000000000000000000000..175f61e348d45c196a4bf2224a0c9658a65a82a6 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/gtsrb.py @@ -0,0 +1,103 @@ +import csv +import pathlib +from typing import Any, Callable, Optional, Tuple, Union + +import PIL + +from .folder import make_dataset +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class GTSRB(VisionDataset): + """`German Traffic Sign Recognition Benchmark (GTSRB) `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"train"`` (default), or ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + def __init__( + self, + root: Union[str, pathlib.Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + + super().__init__(root, transform=transform, target_transform=target_transform) + + self._split = verify_str_arg(split, "split", ("train", "test")) + self._base_folder = pathlib.Path(root) / "gtsrb" + self._target_folder = ( + self._base_folder / "GTSRB" / ("Training" if self._split == "train" else "Final_Test/Images") + ) + + if download: + self.download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + if self._split == "train": + samples = make_dataset(str(self._target_folder), extensions=(".ppm",)) + else: + with open(self._base_folder / "GT-final_test.csv") as csv_file: + samples = [ + (str(self._target_folder / row["Filename"]), int(row["ClassId"])) + for row in csv.DictReader(csv_file, delimiter=";", skipinitialspace=True) + ] + + self._samples = samples + self.transform = transform + self.target_transform = target_transform + + def __len__(self) -> int: + return len(self._samples) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + + path, target = self._samples[index] + sample = PIL.Image.open(path).convert("RGB") + + if self.transform is not None: + sample = self.transform(sample) + + if self.target_transform is not None: + target = self.target_transform(target) + + return sample, target + + def _check_exists(self) -> bool: + return self._target_folder.is_dir() + + def download(self) -> None: + if self._check_exists(): + return + + base_url = "https://sid.erda.dk/public/archives/daaeac0d7ce1152aea9b61d9f1e19370/" + + if self._split == "train": + download_and_extract_archive( + f"{base_url}GTSRB-Training_fixed.zip", + download_root=str(self._base_folder), + md5="513f3c79a4c5141765e10e952eaa2478", + ) + else: + download_and_extract_archive( + f"{base_url}GTSRB_Final_Test_Images.zip", + download_root=str(self._base_folder), + md5="c7e4e6327067d32654124b0fe9e82185", + ) + download_and_extract_archive( + f"{base_url}GTSRB_Final_Test_GT.zip", + download_root=str(self._base_folder), + md5="fe31e9c9270bbcd7b84b7f21a9d9d9e5", + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/hmdb51.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/hmdb51.py new file mode 100644 index 0000000000000000000000000000000000000000..df816fcb50652b5c51f8aaaefa2383259aabdf1d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/hmdb51.py @@ -0,0 +1,152 @@ +import glob +import os +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +from torch import Tensor + +from .folder import find_classes, make_dataset +from .video_utils import VideoClips +from .vision import VisionDataset + + +class HMDB51(VisionDataset): + """ + `HMDB51 `_ + dataset. + + HMDB51 is an action recognition video dataset. + This dataset consider every video as a collection of video clips of fixed size, specified + by ``frames_per_clip``, where the step in frames between each clip is given by + ``step_between_clips``. + + To give an example, for 2 videos with 10 and 15 frames respectively, if ``frames_per_clip=5`` + and ``step_between_clips=5``, the dataset size will be (2 + 3) = 5, where the first two + elements will come from video 1, and the next three elements from video 2. + Note that we drop clips which do not have exactly ``frames_per_clip`` elements, so not all + frames in a video might be present. + + Internally, it uses a VideoClips object to handle clip creation. + + Args: + root (str or ``pathlib.Path``): Root directory of the HMDB51 Dataset. + annotation_path (str): Path to the folder containing the split files. + frames_per_clip (int): Number of frames in a clip. + step_between_clips (int): Number of frames between each clip. + fold (int, optional): Which fold to use. Should be between 1 and 3. + train (bool, optional): If ``True``, creates a dataset from the train split, + otherwise from the ``test`` split. + transform (callable, optional): A function/transform that takes in a TxHxWxC video + and returns a transformed version. + output_format (str, optional): The format of the output video tensors (before transforms). + Can be either "THWC" (default) or "TCHW". + + Returns: + tuple: A 3-tuple with the following entries: + + - video (Tensor[T, H, W, C] or Tensor[T, C, H, W]): The `T` video frames + - audio(Tensor[K, L]): the audio frames, where `K` is the number of channels + and `L` is the number of points + - label (int): class of the video clip + """ + + data_url = "https://serre-lab.clps.brown.edu/wp-content/uploads/2013/10/hmdb51_org.rar" + splits = { + "url": "https://serre-lab.clps.brown.edu/wp-content/uploads/2013/10/test_train_splits.rar", + "md5": "15e67781e70dcfbdce2d7dbb9b3344b5", + } + TRAIN_TAG = 1 + TEST_TAG = 2 + + def __init__( + self, + root: Union[str, Path], + annotation_path: str, + frames_per_clip: int, + step_between_clips: int = 1, + frame_rate: Optional[int] = None, + fold: int = 1, + train: bool = True, + transform: Optional[Callable] = None, + _precomputed_metadata: Optional[Dict[str, Any]] = None, + num_workers: int = 1, + _video_width: int = 0, + _video_height: int = 0, + _video_min_dimension: int = 0, + _audio_samples: int = 0, + output_format: str = "THWC", + ) -> None: + super().__init__(root) + if fold not in (1, 2, 3): + raise ValueError(f"fold should be between 1 and 3, got {fold}") + + extensions = ("avi",) + self.classes, class_to_idx = find_classes(self.root) + self.samples = make_dataset( + self.root, + class_to_idx, + extensions, + ) + + video_paths = [path for (path, _) in self.samples] + video_clips = VideoClips( + video_paths, + frames_per_clip, + step_between_clips, + frame_rate, + _precomputed_metadata, + num_workers=num_workers, + _video_width=_video_width, + _video_height=_video_height, + _video_min_dimension=_video_min_dimension, + _audio_samples=_audio_samples, + output_format=output_format, + ) + # we bookkeep the full version of video clips because we want to be able + # to return the metadata of full version rather than the subset version of + # video clips + self.full_video_clips = video_clips + self.fold = fold + self.train = train + self.indices = self._select_fold(video_paths, annotation_path, fold, train) + self.video_clips = video_clips.subset(self.indices) + self.transform = transform + + @property + def metadata(self) -> Dict[str, Any]: + return self.full_video_clips.metadata + + def _select_fold(self, video_list: List[str], annotations_dir: str, fold: int, train: bool) -> List[int]: + target_tag = self.TRAIN_TAG if train else self.TEST_TAG + split_pattern_name = f"*test_split{fold}.txt" + split_pattern_path = os.path.join(annotations_dir, split_pattern_name) + annotation_paths = glob.glob(split_pattern_path) + selected_files = set() + for filepath in annotation_paths: + with open(filepath) as fid: + lines = fid.readlines() + for line in lines: + video_filename, tag_string = line.split() + tag = int(tag_string) + if tag == target_tag: + selected_files.add(video_filename) + + indices = [] + for video_index, video_path in enumerate(video_list): + if os.path.basename(video_path) in selected_files: + indices.append(video_index) + + return indices + + def __len__(self) -> int: + return self.video_clips.num_clips() + + def __getitem__(self, idx: int) -> Tuple[Tensor, Tensor, int]: + video, audio, _, video_idx = self.video_clips.get_clip(idx) + sample_index = self.indices[video_idx] + _, class_index = self.samples[sample_index] + + if self.transform is not None: + video = self.transform(video) + + return video, audio, class_index diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/imagenet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/imagenet.py new file mode 100644 index 0000000000000000000000000000000000000000..a98940dd3057fa4e0db20c0bc8297cb780d31810 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/imagenet.py @@ -0,0 +1,219 @@ +import os +import shutil +import tempfile +from contextlib import contextmanager +from pathlib import Path +from typing import Any, Dict, Iterator, List, Optional, Tuple, Union + +import torch + +from .folder import ImageFolder +from .utils import check_integrity, extract_archive, verify_str_arg + +ARCHIVE_META = { + "train": ("ILSVRC2012_img_train.tar", "1d675b47d978889d74fa0da5fadfb00e"), + "val": ("ILSVRC2012_img_val.tar", "29b22e2961454d5413ddabcf34fc5622"), + "devkit": ("ILSVRC2012_devkit_t12.tar.gz", "fa75699e90414af021442c21a62c3abf"), +} + +META_FILE = "meta.bin" + + +class ImageNet(ImageFolder): + """`ImageNet `_ 2012 Classification Dataset. + + .. note:: + Before using this class, it is required to download ImageNet 2012 dataset from + `here `_ and + place the files ``ILSVRC2012_devkit_t12.tar.gz`` and ``ILSVRC2012_img_train.tar`` + or ``ILSVRC2012_img_val.tar`` based on ``split`` in the root directory. + + Args: + root (str or ``pathlib.Path``): Root directory of the ImageNet Dataset. + split (string, optional): The dataset split, supports ``train``, or ``val``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + loader (callable, optional): A function to load an image given its path. + + Attributes: + classes (list): List of the class name tuples. + class_to_idx (dict): Dict with items (class_name, class_index). + wnids (list): List of the WordNet IDs. + wnid_to_idx (dict): Dict with items (wordnet_id, class_index). + imgs (list): List of (image path, class_index) tuples + targets (list): The class_index value for each image in the dataset + """ + + def __init__(self, root: Union[str, Path], split: str = "train", **kwargs: Any) -> None: + root = self.root = os.path.expanduser(root) + self.split = verify_str_arg(split, "split", ("train", "val")) + + self.parse_archives() + wnid_to_classes = load_meta_file(self.root)[0] + + super().__init__(self.split_folder, **kwargs) + self.root = root + + self.wnids = self.classes + self.wnid_to_idx = self.class_to_idx + self.classes = [wnid_to_classes[wnid] for wnid in self.wnids] + self.class_to_idx = {cls: idx for idx, clss in enumerate(self.classes) for cls in clss} + + def parse_archives(self) -> None: + if not check_integrity(os.path.join(self.root, META_FILE)): + parse_devkit_archive(self.root) + + if not os.path.isdir(self.split_folder): + if self.split == "train": + parse_train_archive(self.root) + elif self.split == "val": + parse_val_archive(self.root) + + @property + def split_folder(self) -> str: + return os.path.join(self.root, self.split) + + def extra_repr(self) -> str: + return "Split: {split}".format(**self.__dict__) + + +def load_meta_file(root: Union[str, Path], file: Optional[str] = None) -> Tuple[Dict[str, str], List[str]]: + if file is None: + file = META_FILE + file = os.path.join(root, file) + + if check_integrity(file): + return torch.load(file, weights_only=True) + else: + msg = ( + "The meta file {} is not present in the root directory or is corrupted. " + "This file is automatically created by the ImageNet dataset." + ) + raise RuntimeError(msg.format(file, root)) + + +def _verify_archive(root: Union[str, Path], file: str, md5: str) -> None: + if not check_integrity(os.path.join(root, file), md5): + msg = ( + "The archive {} is not present in the root directory or is corrupted. " + "You need to download it externally and place it in {}." + ) + raise RuntimeError(msg.format(file, root)) + + +def parse_devkit_archive(root: Union[str, Path], file: Optional[str] = None) -> None: + """Parse the devkit archive of the ImageNet2012 classification dataset and save + the meta information in a binary file. + + Args: + root (str or ``pathlib.Path``): Root directory containing the devkit archive + file (str, optional): Name of devkit archive. Defaults to + 'ILSVRC2012_devkit_t12.tar.gz' + """ + import scipy.io as sio + + def parse_meta_mat(devkit_root: str) -> Tuple[Dict[int, str], Dict[str, Tuple[str, ...]]]: + metafile = os.path.join(devkit_root, "data", "meta.mat") + meta = sio.loadmat(metafile, squeeze_me=True)["synsets"] + nums_children = list(zip(*meta))[4] + meta = [meta[idx] for idx, num_children in enumerate(nums_children) if num_children == 0] + idcs, wnids, classes = list(zip(*meta))[:3] + classes = [tuple(clss.split(", ")) for clss in classes] + idx_to_wnid = {idx: wnid for idx, wnid in zip(idcs, wnids)} + wnid_to_classes = {wnid: clss for wnid, clss in zip(wnids, classes)} + return idx_to_wnid, wnid_to_classes + + def parse_val_groundtruth_txt(devkit_root: str) -> List[int]: + file = os.path.join(devkit_root, "data", "ILSVRC2012_validation_ground_truth.txt") + with open(file) as txtfh: + val_idcs = txtfh.readlines() + return [int(val_idx) for val_idx in val_idcs] + + @contextmanager + def get_tmp_dir() -> Iterator[str]: + tmp_dir = tempfile.mkdtemp() + try: + yield tmp_dir + finally: + shutil.rmtree(tmp_dir) + + archive_meta = ARCHIVE_META["devkit"] + if file is None: + file = archive_meta[0] + md5 = archive_meta[1] + + _verify_archive(root, file, md5) + + with get_tmp_dir() as tmp_dir: + extract_archive(os.path.join(root, file), tmp_dir) + + devkit_root = os.path.join(tmp_dir, "ILSVRC2012_devkit_t12") + idx_to_wnid, wnid_to_classes = parse_meta_mat(devkit_root) + val_idcs = parse_val_groundtruth_txt(devkit_root) + val_wnids = [idx_to_wnid[idx] for idx in val_idcs] + + torch.save((wnid_to_classes, val_wnids), os.path.join(root, META_FILE)) + + +def parse_train_archive(root: Union[str, Path], file: Optional[str] = None, folder: str = "train") -> None: + """Parse the train images archive of the ImageNet2012 classification dataset and + prepare it for usage with the ImageNet dataset. + + Args: + root (str or ``pathlib.Path``): Root directory containing the train images archive + file (str, optional): Name of train images archive. Defaults to + 'ILSVRC2012_img_train.tar' + folder (str, optional): Optional name for train images folder. Defaults to + 'train' + """ + archive_meta = ARCHIVE_META["train"] + if file is None: + file = archive_meta[0] + md5 = archive_meta[1] + + _verify_archive(root, file, md5) + + train_root = os.path.join(root, folder) + extract_archive(os.path.join(root, file), train_root) + + archives = [os.path.join(train_root, archive) for archive in os.listdir(train_root)] + for archive in archives: + extract_archive(archive, os.path.splitext(archive)[0], remove_finished=True) + + +def parse_val_archive( + root: Union[str, Path], file: Optional[str] = None, wnids: Optional[List[str]] = None, folder: str = "val" +) -> None: + """Parse the validation images archive of the ImageNet2012 classification dataset + and prepare it for usage with the ImageNet dataset. + + Args: + root (str or ``pathlib.Path``): Root directory containing the validation images archive + file (str, optional): Name of validation images archive. Defaults to + 'ILSVRC2012_img_val.tar' + wnids (list, optional): List of WordNet IDs of the validation images. If None + is given, the IDs are loaded from the meta file in the root directory + folder (str, optional): Optional name for validation images folder. Defaults to + 'val' + """ + archive_meta = ARCHIVE_META["val"] + if file is None: + file = archive_meta[0] + md5 = archive_meta[1] + if wnids is None: + wnids = load_meta_file(root)[1] + + _verify_archive(root, file, md5) + + val_root = os.path.join(root, folder) + extract_archive(os.path.join(root, file), val_root) + + images = sorted(os.path.join(val_root, image) for image in os.listdir(val_root)) + + for wnid in set(wnids): + os.mkdir(os.path.join(val_root, wnid)) + + for wnid, img_file in zip(wnids, images): + shutil.move(img_file, os.path.join(val_root, wnid, os.path.basename(img_file))) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/imagenette.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/imagenette.py new file mode 100644 index 0000000000000000000000000000000000000000..8482322f6080f1a77011f216977a249b85b4a447 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/imagenette.py @@ -0,0 +1,101 @@ +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +from PIL import Image + +from .folder import find_classes, make_dataset +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class Imagenette(VisionDataset): + """`Imagenette `_ image classification dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of the Imagenette dataset. + split (string, optional): The dataset split. Supports ``"train"`` (default), and ``"val"``. + size (string, optional): The image size. Supports ``"full"`` (default), ``"320px"``, and ``"160px"``. + download (bool, optional): If ``True``, downloads the dataset components and places them in ``root``. Already + downloaded archives are not downloaded again. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version, e.g. ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + + Attributes: + classes (list): List of the class name tuples. + class_to_idx (dict): Dict with items (class name, class index). + wnids (list): List of the WordNet IDs. + wnid_to_idx (dict): Dict with items (WordNet ID, class index). + """ + + _ARCHIVES = { + "full": ("https://s3.amazonaws.com/fast-ai-imageclas/imagenette2.tgz", "fe2fc210e6bb7c5664d602c3cd71e612"), + "320px": ("https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-320.tgz", "3df6f0d01a2c9592104656642f5e78a3"), + "160px": ("https://s3.amazonaws.com/fast-ai-imageclas/imagenette2-160.tgz", "e793b78cc4c9e9a4ccc0c1155377a412"), + } + _WNID_TO_CLASS = { + "n01440764": ("tench", "Tinca tinca"), + "n02102040": ("English springer", "English springer spaniel"), + "n02979186": ("cassette player",), + "n03000684": ("chain saw", "chainsaw"), + "n03028079": ("church", "church building"), + "n03394916": ("French horn", "horn"), + "n03417042": ("garbage truck", "dustcart"), + "n03425413": ("gas pump", "gasoline pump", "petrol pump", "island dispenser"), + "n03445777": ("golf ball",), + "n03888257": ("parachute", "chute"), + } + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + size: str = "full", + download=False, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + + self._split = verify_str_arg(split, "split", ["train", "val"]) + self._size = verify_str_arg(size, "size", ["full", "320px", "160px"]) + + self._url, self._md5 = self._ARCHIVES[self._size] + self._size_root = Path(self.root) / Path(self._url).stem + self._image_root = str(self._size_root / self._split) + + if download: + self._download() + elif not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it.") + + self.wnids, self.wnid_to_idx = find_classes(self._image_root) + self.classes = [self._WNID_TO_CLASS[wnid] for wnid in self.wnids] + self.class_to_idx = { + class_name: idx for wnid, idx in self.wnid_to_idx.items() for class_name in self._WNID_TO_CLASS[wnid] + } + self._samples = make_dataset(self._image_root, self.wnid_to_idx, extensions=".jpeg") + + def _check_exists(self) -> bool: + return self._size_root.exists() + + def _download(self): + if self._check_exists(): + return + + download_and_extract_archive(self._url, self.root, md5=self._md5) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + path, label = self._samples[idx] + image = Image.open(path).convert("RGB") + + if self.transform is not None: + image = self.transform(image) + + if self.target_transform is not None: + label = self.target_transform(label) + + return image, label + + def __len__(self) -> int: + return len(self._samples) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/inaturalist.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/inaturalist.py new file mode 100644 index 0000000000000000000000000000000000000000..48ab403b388f50fa57dd8584b70824409e1221d9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/inaturalist.py @@ -0,0 +1,238 @@ +import os +import os.path +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +from PIL import Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + +CATEGORIES_2021 = ["kingdom", "phylum", "class", "order", "family", "genus"] + +DATASET_URLS = { + "2017": "https://ml-inat-competition-datasets.s3.amazonaws.com/2017/train_val_images.tar.gz", + "2018": "https://ml-inat-competition-datasets.s3.amazonaws.com/2018/train_val2018.tar.gz", + "2019": "https://ml-inat-competition-datasets.s3.amazonaws.com/2019/train_val2019.tar.gz", + "2021_train": "https://ml-inat-competition-datasets.s3.amazonaws.com/2021/train.tar.gz", + "2021_train_mini": "https://ml-inat-competition-datasets.s3.amazonaws.com/2021/train_mini.tar.gz", + "2021_valid": "https://ml-inat-competition-datasets.s3.amazonaws.com/2021/val.tar.gz", +} + +DATASET_MD5 = { + "2017": "7c784ea5e424efaec655bd392f87301f", + "2018": "b1c6952ce38f31868cc50ea72d066cc3", + "2019": "c60a6e2962c9b8ccbd458d12c8582644", + "2021_train": "e0526d53c7f7b2e3167b2b43bb2690ed", + "2021_train_mini": "db6ed8330e634445efc8fec83ae81442", + "2021_valid": "f6f6e0e242e3d4c9569ba56400938afc", +} + + +class INaturalist(VisionDataset): + """`iNaturalist `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where the image files are stored. + This class does not require/use annotation files. + version (string, optional): Which version of the dataset to download/use. One of + '2017', '2018', '2019', '2021_train', '2021_train_mini', '2021_valid'. + Default: `2021_train`. + target_type (string or list, optional): Type of target to use, for 2021 versions, one of: + + - ``full``: the full category (species) + - ``kingdom``: e.g. "Animalia" + - ``phylum``: e.g. "Arthropoda" + - ``class``: e.g. "Insecta" + - ``order``: e.g. "Coleoptera" + - ``family``: e.g. "Cleridae" + - ``genus``: e.g. "Trichodes" + + for 2017-2019 versions, one of: + + - ``full``: the full (numeric) category + - ``super``: the super category, e.g. "Amphibians" + + Can also be a list to output a tuple with all specified target types. + Defaults to ``full``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + def __init__( + self, + root: Union[str, Path], + version: str = "2021_train", + target_type: Union[List[str], str] = "full", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + self.version = verify_str_arg(version, "version", DATASET_URLS.keys()) + + super().__init__(os.path.join(root, version), transform=transform, target_transform=target_transform) + + os.makedirs(root, exist_ok=True) + if download: + self.download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + self.all_categories: List[str] = [] + + # map: category type -> name of category -> index + self.categories_index: Dict[str, Dict[str, int]] = {} + + # list indexed by category id, containing mapping from category type -> index + self.categories_map: List[Dict[str, int]] = [] + + if not isinstance(target_type, list): + target_type = [target_type] + if self.version[:4] == "2021": + self.target_type = [verify_str_arg(t, "target_type", ("full", *CATEGORIES_2021)) for t in target_type] + self._init_2021() + else: + self.target_type = [verify_str_arg(t, "target_type", ("full", "super")) for t in target_type] + self._init_pre2021() + + # index of all files: (full category id, filename) + self.index: List[Tuple[int, str]] = [] + + for dir_index, dir_name in enumerate(self.all_categories): + files = os.listdir(os.path.join(self.root, dir_name)) + for fname in files: + self.index.append((dir_index, fname)) + + def _init_2021(self) -> None: + """Initialize based on 2021 layout""" + + self.all_categories = sorted(os.listdir(self.root)) + + # map: category type -> name of category -> index + self.categories_index = {k: {} for k in CATEGORIES_2021} + + for dir_index, dir_name in enumerate(self.all_categories): + pieces = dir_name.split("_") + if len(pieces) != 8: + raise RuntimeError(f"Unexpected category name {dir_name}, wrong number of pieces") + if pieces[0] != f"{dir_index:05d}": + raise RuntimeError(f"Unexpected category id {pieces[0]}, expecting {dir_index:05d}") + cat_map = {} + for cat, name in zip(CATEGORIES_2021, pieces[1:7]): + if name in self.categories_index[cat]: + cat_id = self.categories_index[cat][name] + else: + cat_id = len(self.categories_index[cat]) + self.categories_index[cat][name] = cat_id + cat_map[cat] = cat_id + self.categories_map.append(cat_map) + + def _init_pre2021(self) -> None: + """Initialize based on 2017-2019 layout""" + + # map: category type -> name of category -> index + self.categories_index = {"super": {}} + + cat_index = 0 + super_categories = sorted(os.listdir(self.root)) + for sindex, scat in enumerate(super_categories): + self.categories_index["super"][scat] = sindex + subcategories = sorted(os.listdir(os.path.join(self.root, scat))) + for subcat in subcategories: + if self.version == "2017": + # this version does not use ids as directory names + subcat_i = cat_index + cat_index += 1 + else: + try: + subcat_i = int(subcat) + except ValueError: + raise RuntimeError(f"Unexpected non-numeric dir name: {subcat}") + if subcat_i >= len(self.categories_map): + old_len = len(self.categories_map) + self.categories_map.extend([{}] * (subcat_i - old_len + 1)) + self.all_categories.extend([""] * (subcat_i - old_len + 1)) + if self.categories_map[subcat_i]: + raise RuntimeError(f"Duplicate category {subcat}") + self.categories_map[subcat_i] = {"super": sindex} + self.all_categories[subcat_i] = os.path.join(scat, subcat) + + # validate the dictionary + for cindex, c in enumerate(self.categories_map): + if not c: + raise RuntimeError(f"Missing category {cindex}") + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where the type of target specified by target_type. + """ + + cat_id, fname = self.index[index] + img = Image.open(os.path.join(self.root, self.all_categories[cat_id], fname)) + + target: Any = [] + for t in self.target_type: + if t == "full": + target.append(cat_id) + else: + target.append(self.categories_map[cat_id][t]) + target = tuple(target) if len(target) > 1 else target[0] + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.index) + + def category_name(self, category_type: str, category_id: int) -> str: + """ + Args: + category_type(str): one of "full", "kingdom", "phylum", "class", "order", "family", "genus" or "super" + category_id(int): an index (class id) from this category + + Returns: + the name of the category + """ + if category_type == "full": + return self.all_categories[category_id] + else: + if category_type not in self.categories_index: + raise ValueError(f"Invalid category type '{category_type}'") + else: + for name, id in self.categories_index[category_type].items(): + if id == category_id: + return name + raise ValueError(f"Invalid category id {category_id} for {category_type}") + + def _check_exists(self) -> bool: + return os.path.exists(self.root) and len(os.listdir(self.root)) > 0 + + def download(self) -> None: + if self._check_exists(): + return + + base_root = os.path.dirname(self.root) + + download_and_extract_archive( + DATASET_URLS[self.version], base_root, filename=f"{self.version}.tgz", md5=DATASET_MD5[self.version] + ) + + orig_dir_name = os.path.join(base_root, os.path.basename(DATASET_URLS[self.version]).rstrip(".tar.gz")) + if not os.path.exists(orig_dir_name): + raise RuntimeError(f"Unable to find downloaded files at {orig_dir_name}") + os.rename(orig_dir_name, self.root) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/kinetics.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/kinetics.py new file mode 100644 index 0000000000000000000000000000000000000000..26bf71cc0e2dd16dd78669cd94cc350e520b5bb1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/kinetics.py @@ -0,0 +1,237 @@ +import csv +import os +import urllib +from functools import partial +from multiprocessing import Pool +from os import path +from pathlib import Path +from typing import Any, Callable, Dict, Optional, Tuple, Union + +from torch import Tensor + +from .folder import find_classes, make_dataset +from .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg +from .video_utils import VideoClips +from .vision import VisionDataset + + +def _dl_wrap(tarpath: Union[str, Path], videopath: Union[str, Path], line: str) -> None: + download_and_extract_archive(line, tarpath, videopath) + + +class Kinetics(VisionDataset): + """`Generic Kinetics `_ + dataset. + + Kinetics-400/600/700 are action recognition video datasets. + This dataset consider every video as a collection of video clips of fixed size, specified + by ``frames_per_clip``, where the step in frames between each clip is given by + ``step_between_clips``. + + To give an example, for 2 videos with 10 and 15 frames respectively, if ``frames_per_clip=5`` + and ``step_between_clips=5``, the dataset size will be (2 + 3) = 5, where the first two + elements will come from video 1, and the next three elements from video 2. + Note that we drop clips which do not have exactly ``frames_per_clip`` elements, so not all + frames in a video might be present. + + Args: + root (str or ``pathlib.Path``): Root directory of the Kinetics Dataset. + Directory should be structured as follows: + .. code:: + + root/ + ├── split + │ ├── class1 + │ │ ├── vid1.mp4 + │ │ ├── vid2.mp4 + │ │ ├── vid3.mp4 + │ │ ├── ... + │ ├── class2 + │ │ ├── vidx.mp4 + │ │ └── ... + + Note: split is appended automatically using the split argument. + frames_per_clip (int): number of frames in a clip + num_classes (int): select between Kinetics-400 (default), Kinetics-600, and Kinetics-700 + split (str): split of the dataset to consider; supports ``"train"`` (default) ``"val"`` ``"test"`` + frame_rate (float): If omitted, interpolate different frame rate for each clip. + step_between_clips (int): number of frames between each clip + transform (callable, optional): A function/transform that takes in a TxHxWxC video + and returns a transformed version. + download (bool): Download the official version of the dataset to root folder. + num_workers (int): Use multiple workers for VideoClips creation + num_download_workers (int): Use multiprocessing in order to speed up download. + output_format (str, optional): The format of the output video tensors (before transforms). + Can be either "THWC" or "TCHW" (default). + Note that in most other utils and datasets, the default is actually "THWC". + + Returns: + tuple: A 3-tuple with the following entries: + + - video (Tensor[T, C, H, W] or Tensor[T, H, W, C]): the `T` video frames in torch.uint8 tensor + - audio(Tensor[K, L]): the audio frames, where `K` is the number of channels + and `L` is the number of points in torch.float tensor + - label (int): class of the video clip + + Raises: + RuntimeError: If ``download is True`` and the video archives are already extracted. + """ + + _TAR_URLS = { + "400": "https://s3.amazonaws.com/kinetics/400/{split}/k400_{split}_path.txt", + "600": "https://s3.amazonaws.com/kinetics/600/{split}/k600_{split}_path.txt", + "700": "https://s3.amazonaws.com/kinetics/700_2020/{split}/k700_2020_{split}_path.txt", + } + _ANNOTATION_URLS = { + "400": "https://s3.amazonaws.com/kinetics/400/annotations/{split}.csv", + "600": "https://s3.amazonaws.com/kinetics/600/annotations/{split}.csv", + "700": "https://s3.amazonaws.com/kinetics/700_2020/annotations/{split}.csv", + } + + def __init__( + self, + root: Union[str, Path], + frames_per_clip: int, + num_classes: str = "400", + split: str = "train", + frame_rate: Optional[int] = None, + step_between_clips: int = 1, + transform: Optional[Callable] = None, + extensions: Tuple[str, ...] = ("avi", "mp4"), + download: bool = False, + num_download_workers: int = 1, + num_workers: int = 1, + _precomputed_metadata: Optional[Dict[str, Any]] = None, + _video_width: int = 0, + _video_height: int = 0, + _video_min_dimension: int = 0, + _audio_samples: int = 0, + _audio_channels: int = 0, + _legacy: bool = False, + output_format: str = "TCHW", + ) -> None: + + # TODO: support test + self.num_classes = verify_str_arg(num_classes, arg="num_classes", valid_values=["400", "600", "700"]) + self.extensions = extensions + self.num_download_workers = num_download_workers + + self.root = root + self._legacy = _legacy + + if _legacy: + self.split_folder = root + self.split = "unknown" + output_format = "THWC" + if download: + raise ValueError("Cannot download the videos using legacy_structure.") + else: + self.split_folder = path.join(root, split) + self.split = verify_str_arg(split, arg="split", valid_values=["train", "val", "test"]) + + if download: + self.download_and_process_videos() + + super().__init__(self.root) + + self.classes, class_to_idx = find_classes(self.split_folder) + self.samples = make_dataset(self.split_folder, class_to_idx, extensions, is_valid_file=None) + video_list = [x[0] for x in self.samples] + self.video_clips = VideoClips( + video_list, + frames_per_clip, + step_between_clips, + frame_rate, + _precomputed_metadata, + num_workers=num_workers, + _video_width=_video_width, + _video_height=_video_height, + _video_min_dimension=_video_min_dimension, + _audio_samples=_audio_samples, + _audio_channels=_audio_channels, + output_format=output_format, + ) + self.transform = transform + + def download_and_process_videos(self) -> None: + """Downloads all the videos to the _root_ folder in the expected format.""" + self._download_videos() + self._make_ds_structure() + + def _download_videos(self) -> None: + """download tarballs containing the video to "tars" folder and extract them into the _split_ folder where + split is one of the official dataset splits. + + Raises: + RuntimeError: if download folder exists, break to prevent downloading entire dataset again. + """ + if path.exists(self.split_folder): + return + tar_path = path.join(self.root, "tars") + file_list_path = path.join(self.root, "files") + + split_url = self._TAR_URLS[self.num_classes].format(split=self.split) + split_url_filepath = path.join(file_list_path, path.basename(split_url)) + if not check_integrity(split_url_filepath): + download_url(split_url, file_list_path) + with open(split_url_filepath) as file: + list_video_urls = [urllib.parse.quote(line, safe="/,:") for line in file.read().splitlines()] + + if self.num_download_workers == 1: + for line in list_video_urls: + download_and_extract_archive(line, tar_path, self.split_folder) + else: + part = partial(_dl_wrap, tar_path, self.split_folder) + poolproc = Pool(self.num_download_workers) + poolproc.map(part, list_video_urls) + + def _make_ds_structure(self) -> None: + """move videos from + split_folder/ + ├── clip1.avi + ├── clip2.avi + + to the correct format as described below: + split_folder/ + ├── class1 + │ ├── clip1.avi + + """ + annotation_path = path.join(self.root, "annotations") + if not check_integrity(path.join(annotation_path, f"{self.split}.csv")): + download_url(self._ANNOTATION_URLS[self.num_classes].format(split=self.split), annotation_path) + annotations = path.join(annotation_path, f"{self.split}.csv") + + file_fmtstr = "{ytid}_{start:06}_{end:06}.mp4" + with open(annotations) as csvfile: + reader = csv.DictReader(csvfile) + for row in reader: + f = file_fmtstr.format( + ytid=row["youtube_id"], + start=int(row["time_start"]), + end=int(row["time_end"]), + ) + label = row["label"].replace(" ", "_").replace("'", "").replace("(", "").replace(")", "") + os.makedirs(path.join(self.split_folder, label), exist_ok=True) + downloaded_file = path.join(self.split_folder, f) + if path.isfile(downloaded_file): + os.replace( + downloaded_file, + path.join(self.split_folder, label, f), + ) + + @property + def metadata(self) -> Dict[str, Any]: + return self.video_clips.metadata + + def __len__(self) -> int: + return self.video_clips.num_clips() + + def __getitem__(self, idx: int) -> Tuple[Tensor, Tensor, int]: + video, audio, info, video_idx = self.video_clips.get_clip(idx) + label = self.samples[video_idx][1] + + if self.transform is not None: + video = self.transform(video) + + return video, audio, label diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/kitti.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/kitti.py new file mode 100644 index 0000000000000000000000000000000000000000..f1deaf1390b343bfd3545390fff4a448b80ebb2a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/kitti.py @@ -0,0 +1,158 @@ +import csv +import os +from pathlib import Path +from typing import Any, Callable, List, Optional, Tuple, Union + +from PIL import Image + +from .utils import download_and_extract_archive +from .vision import VisionDataset + + +class Kitti(VisionDataset): + """`KITTI `_ Dataset. + + It corresponds to the "left color images of object" dataset, for object detection. + + Args: + root (str or ``pathlib.Path``): Root directory where images are downloaded to. + Expects the following folder structure if download=False: + + .. code:: + + + └── Kitti + └─ raw + ├── training + | ├── image_2 + | └── label_2 + └── testing + └── image_2 + train (bool, optional): Use ``train`` split if true, else ``test`` split. + Defaults to ``train``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.PILToTensor`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + transforms (callable, optional): A function/transform that takes input sample + and its target as entry and returns a transformed version. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + + data_url = "https://s3.eu-central-1.amazonaws.com/avg-kitti/" + resources = [ + "data_object_image_2.zip", + "data_object_label_2.zip", + ] + image_dir_name = "image_2" + labels_dir_name = "label_2" + + def __init__( + self, + root: Union[str, Path], + train: bool = True, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + transforms: Optional[Callable] = None, + download: bool = False, + ): + super().__init__( + root, + transform=transform, + target_transform=target_transform, + transforms=transforms, + ) + self.images = [] + self.targets = [] + self.train = train + self._location = "training" if self.train else "testing" + + if download: + self.download() + if not self._check_exists(): + raise RuntimeError("Dataset not found. You may use download=True to download it.") + + image_dir = os.path.join(self._raw_folder, self._location, self.image_dir_name) + if self.train: + labels_dir = os.path.join(self._raw_folder, self._location, self.labels_dir_name) + for img_file in os.listdir(image_dir): + self.images.append(os.path.join(image_dir, img_file)) + if self.train: + self.targets.append(os.path.join(labels_dir, f"{img_file.split('.')[0]}.txt")) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """Get item at a given index. + + Args: + index (int): Index + Returns: + tuple: (image, target), where + target is a list of dictionaries with the following keys: + + - type: str + - truncated: float + - occluded: int + - alpha: float + - bbox: float[4] + - dimensions: float[3] + - locations: float[3] + - rotation_y: float + + """ + image = Image.open(self.images[index]) + target = self._parse_target(index) if self.train else None + if self.transforms: + image, target = self.transforms(image, target) + return image, target + + def _parse_target(self, index: int) -> List: + target = [] + with open(self.targets[index]) as inp: + content = csv.reader(inp, delimiter=" ") + for line in content: + target.append( + { + "type": line[0], + "truncated": float(line[1]), + "occluded": int(line[2]), + "alpha": float(line[3]), + "bbox": [float(x) for x in line[4:8]], + "dimensions": [float(x) for x in line[8:11]], + "location": [float(x) for x in line[11:14]], + "rotation_y": float(line[14]), + } + ) + return target + + def __len__(self) -> int: + return len(self.images) + + @property + def _raw_folder(self) -> str: + return os.path.join(self.root, self.__class__.__name__, "raw") + + def _check_exists(self) -> bool: + """Check if the data directory exists.""" + folders = [self.image_dir_name] + if self.train: + folders.append(self.labels_dir_name) + return all(os.path.isdir(os.path.join(self._raw_folder, self._location, fname)) for fname in folders) + + def download(self) -> None: + """Download the KITTI data if it doesn't exist already.""" + + if self._check_exists(): + return + + os.makedirs(self._raw_folder, exist_ok=True) + + # download files + for fname in self.resources: + download_and_extract_archive( + url=f"{self.data_url}{fname}", + download_root=self._raw_folder, + filename=fname, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/lfw.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/lfw.py new file mode 100644 index 0000000000000000000000000000000000000000..059d3f69af4458369bbe27b55a2d516f62608c43 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/lfw.py @@ -0,0 +1,255 @@ +import os +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +from PIL import Image + +from .utils import check_integrity, download_and_extract_archive, download_url, verify_str_arg +from .vision import VisionDataset + + +class _LFW(VisionDataset): + + base_folder = "lfw-py" + download_url_prefix = "http://vis-www.cs.umass.edu/lfw/" + + file_dict = { + "original": ("lfw", "lfw.tgz", "a17d05bd522c52d84eca14327a23d494"), + "funneled": ("lfw_funneled", "lfw-funneled.tgz", "1b42dfed7d15c9b2dd63d5e5840c86ad"), + "deepfunneled": ("lfw-deepfunneled", "lfw-deepfunneled.tgz", "68331da3eb755a505a502b5aacb3c201"), + } + checksums = { + "pairs.txt": "9f1ba174e4e1c508ff7cdf10ac338a7d", + "pairsDevTest.txt": "5132f7440eb68cf58910c8a45a2ac10b", + "pairsDevTrain.txt": "4f27cbf15b2da4a85c1907eb4181ad21", + "people.txt": "450f0863dd89e85e73936a6d71a3474b", + "peopleDevTest.txt": "e4bf5be0a43b5dcd9dc5ccfcb8fb19c5", + "peopleDevTrain.txt": "54eaac34beb6d042ed3a7d883e247a21", + "lfw-names.txt": "a6d0a479bd074669f656265a6e693f6d", + } + annot_file = {"10fold": "", "train": "DevTrain", "test": "DevTest"} + names = "lfw-names.txt" + + def __init__( + self, + root: Union[str, Path], + split: str, + image_set: str, + view: str, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(os.path.join(root, self.base_folder), transform=transform, target_transform=target_transform) + + self.image_set = verify_str_arg(image_set.lower(), "image_set", self.file_dict.keys()) + images_dir, self.filename, self.md5 = self.file_dict[self.image_set] + + self.view = verify_str_arg(view.lower(), "view", ["people", "pairs"]) + self.split = verify_str_arg(split.lower(), "split", ["10fold", "train", "test"]) + self.labels_file = f"{self.view}{self.annot_file[self.split]}.txt" + self.data: List[Any] = [] + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + self.images_dir = os.path.join(self.root, images_dir) + + def _loader(self, path: str) -> Image.Image: + with open(path, "rb") as f: + img = Image.open(f) + return img.convert("RGB") + + def _check_integrity(self) -> bool: + st1 = check_integrity(os.path.join(self.root, self.filename), self.md5) + st2 = check_integrity(os.path.join(self.root, self.labels_file), self.checksums[self.labels_file]) + if not st1 or not st2: + return False + if self.view == "people": + return check_integrity(os.path.join(self.root, self.names), self.checksums[self.names]) + return True + + def download(self) -> None: + if self._check_integrity(): + return + url = f"{self.download_url_prefix}{self.filename}" + download_and_extract_archive(url, self.root, filename=self.filename, md5=self.md5) + download_url(f"{self.download_url_prefix}{self.labels_file}", self.root) + if self.view == "people": + download_url(f"{self.download_url_prefix}{self.names}", self.root) + + def _get_path(self, identity: str, no: Union[int, str]) -> str: + return os.path.join(self.images_dir, identity, f"{identity}_{int(no):04d}.jpg") + + def extra_repr(self) -> str: + return f"Alignment: {self.image_set}\nSplit: {self.split}" + + def __len__(self) -> int: + return len(self.data) + + +class LFWPeople(_LFW): + """`LFW `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``lfw-py`` exists or will be saved to if download is set to True. + split (string, optional): The image split to use. Can be one of ``train``, ``test``, + ``10fold`` (default). + image_set (str, optional): Type of image funneling to use, ``original``, ``funneled`` or + ``deepfunneled``. Defaults to ``funneled``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomRotation`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + + def __init__( + self, + root: str, + split: str = "10fold", + image_set: str = "funneled", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, split, image_set, "people", transform, target_transform, download) + + self.class_to_idx = self._get_classes() + self.data, self.targets = self._get_people() + + def _get_people(self) -> Tuple[List[str], List[int]]: + data, targets = [], [] + with open(os.path.join(self.root, self.labels_file)) as f: + lines = f.readlines() + n_folds, s = (int(lines[0]), 1) if self.split == "10fold" else (1, 0) + + for fold in range(n_folds): + n_lines = int(lines[s]) + people = [line.strip().split("\t") for line in lines[s + 1 : s + n_lines + 1]] + s += n_lines + 1 + for i, (identity, num_imgs) in enumerate(people): + for num in range(1, int(num_imgs) + 1): + img = self._get_path(identity, num) + data.append(img) + targets.append(self.class_to_idx[identity]) + + return data, targets + + def _get_classes(self) -> Dict[str, int]: + with open(os.path.join(self.root, self.names)) as f: + lines = f.readlines() + names = [line.strip().split()[0] for line in lines] + class_to_idx = {name: i for i, name in enumerate(names)} + return class_to_idx + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: Tuple (image, target) where target is the identity of the person. + """ + img = self._loader(self.data[index]) + target = self.targets[index] + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def extra_repr(self) -> str: + return super().extra_repr() + f"\nClasses (identities): {len(self.class_to_idx)}" + + +class LFWPairs(_LFW): + """`LFW `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``lfw-py`` exists or will be saved to if download is set to True. + split (string, optional): The image split to use. Can be one of ``train``, ``test``, + ``10fold``. Defaults to ``10fold``. + image_set (str, optional): Type of image funneling to use, ``original``, ``funneled`` or + ``deepfunneled``. Defaults to ``funneled``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomRotation`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + + def __init__( + self, + root: str, + split: str = "10fold", + image_set: str = "funneled", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, split, image_set, "pairs", transform, target_transform, download) + + self.pair_names, self.data, self.targets = self._get_pairs(self.images_dir) + + def _get_pairs(self, images_dir: str) -> Tuple[List[Tuple[str, str]], List[Tuple[str, str]], List[int]]: + pair_names, data, targets = [], [], [] + with open(os.path.join(self.root, self.labels_file)) as f: + lines = f.readlines() + if self.split == "10fold": + n_folds, n_pairs = lines[0].split("\t") + n_folds, n_pairs = int(n_folds), int(n_pairs) + else: + n_folds, n_pairs = 1, int(lines[0]) + s = 1 + + for fold in range(n_folds): + matched_pairs = [line.strip().split("\t") for line in lines[s : s + n_pairs]] + unmatched_pairs = [line.strip().split("\t") for line in lines[s + n_pairs : s + (2 * n_pairs)]] + s += 2 * n_pairs + for pair in matched_pairs: + img1, img2, same = self._get_path(pair[0], pair[1]), self._get_path(pair[0], pair[2]), 1 + pair_names.append((pair[0], pair[0])) + data.append((img1, img2)) + targets.append(same) + for pair in unmatched_pairs: + img1, img2, same = self._get_path(pair[0], pair[1]), self._get_path(pair[2], pair[3]), 0 + pair_names.append((pair[0], pair[2])) + data.append((img1, img2)) + targets.append(same) + + return pair_names, data, targets + + def __getitem__(self, index: int) -> Tuple[Any, Any, int]: + """ + Args: + index (int): Index + + Returns: + tuple: (image1, image2, target) where target is `0` for different indentities and `1` for same identities. + """ + img1, img2 = self.data[index] + img1, img2 = self._loader(img1), self._loader(img2) + target = self.targets[index] + + if self.transform is not None: + img1, img2 = self.transform(img1), self.transform(img2) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img1, img2, target diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/lsun.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/lsun.py new file mode 100644 index 0000000000000000000000000000000000000000..e188420bc80222926262022b0e7258ba2633e72c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/lsun.py @@ -0,0 +1,168 @@ +import io +import os.path +import pickle +import string +from collections.abc import Iterable +from pathlib import Path +from typing import Any, Callable, cast, List, Optional, Tuple, Union + +from PIL import Image + +from .utils import iterable_to_str, verify_str_arg +from .vision import VisionDataset + + +class LSUNClass(VisionDataset): + def __init__( + self, root: str, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None + ) -> None: + import lmdb + + super().__init__(root, transform=transform, target_transform=target_transform) + + self.env = lmdb.open(root, max_readers=1, readonly=True, lock=False, readahead=False, meminit=False) + with self.env.begin(write=False) as txn: + self.length = txn.stat()["entries"] + cache_file = "_cache_" + "".join(c for c in root if c in string.ascii_letters) + if os.path.isfile(cache_file): + self.keys = pickle.load(open(cache_file, "rb")) + else: + with self.env.begin(write=False) as txn: + self.keys = [key for key in txn.cursor().iternext(keys=True, values=False)] + pickle.dump(self.keys, open(cache_file, "wb")) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + img, target = None, None + env = self.env + with env.begin(write=False) as txn: + imgbuf = txn.get(self.keys[index]) + + buf = io.BytesIO() + buf.write(imgbuf) + buf.seek(0) + img = Image.open(buf).convert("RGB") + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return self.length + + +class LSUN(VisionDataset): + """`LSUN `_ dataset. + + You will need to install the ``lmdb`` package to use this dataset: run + ``pip install lmdb`` + + Args: + root (str or ``pathlib.Path``): Root directory for the database files. + classes (string or list): One of {'train', 'val', 'test'} or a list of + categories to load. e,g. ['bedroom_train', 'church_outdoor_train']. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + """ + + def __init__( + self, + root: Union[str, Path], + classes: Union[str, List[str]] = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self.classes = self._verify_classes(classes) + + # for each class, create an LSUNClassDataset + self.dbs = [] + for c in self.classes: + self.dbs.append(LSUNClass(root=os.path.join(root, f"{c}_lmdb"), transform=transform)) + + self.indices = [] + count = 0 + for db in self.dbs: + count += len(db) + self.indices.append(count) + + self.length = count + + def _verify_classes(self, classes: Union[str, List[str]]) -> List[str]: + categories = [ + "bedroom", + "bridge", + "church_outdoor", + "classroom", + "conference_room", + "dining_room", + "kitchen", + "living_room", + "restaurant", + "tower", + ] + dset_opts = ["train", "val", "test"] + + try: + classes = cast(str, classes) + verify_str_arg(classes, "classes", dset_opts) + if classes == "test": + classes = [classes] + else: + classes = [c + "_" + classes for c in categories] + except ValueError: + if not isinstance(classes, Iterable): + msg = "Expected type str or Iterable for argument classes, but got type {}." + raise ValueError(msg.format(type(classes))) + + classes = list(classes) + msg_fmtstr_type = "Expected type str for elements in argument classes, but got type {}." + for c in classes: + verify_str_arg(c, custom_msg=msg_fmtstr_type.format(type(c))) + c_short = c.split("_") + category, dset_opt = "_".join(c_short[:-1]), c_short[-1] + + msg_fmtstr = "Unknown value '{}' for {}. Valid values are {{{}}}." + msg = msg_fmtstr.format(category, "LSUN class", iterable_to_str(categories)) + verify_str_arg(category, valid_values=categories, custom_msg=msg) + + msg = msg_fmtstr.format(dset_opt, "postfix", iterable_to_str(dset_opts)) + verify_str_arg(dset_opt, valid_values=dset_opts, custom_msg=msg) + + return classes + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: Tuple (image, target) where target is the index of the target category. + """ + target = 0 + sub = 0 + for ind in self.indices: + if index < ind: + break + target += 1 + sub = ind + + db = self.dbs[target] + index = index - sub + + if self.target_transform is not None: + target = self.target_transform(target) + + img, _ = db[index] + return img, target + + def __len__(self) -> int: + return self.length + + def extra_repr(self) -> str: + return "Classes: {classes}".format(**self.__dict__) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/mnist.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/mnist.py new file mode 100644 index 0000000000000000000000000000000000000000..09812c15f517a0168e62142d9f09b0a904287aef --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/mnist.py @@ -0,0 +1,560 @@ +import codecs +import os +import os.path +import shutil +import string +import sys +import warnings +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union +from urllib.error import URLError + +import numpy as np +import torch +from PIL import Image + +from .utils import _flip_byte_order, check_integrity, download_and_extract_archive, extract_archive, verify_str_arg +from .vision import VisionDataset + + +class MNIST(VisionDataset): + """`MNIST `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where ``MNIST/raw/train-images-idx3-ubyte`` + and ``MNIST/raw/t10k-images-idx3-ubyte`` exist. + train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``, + otherwise from ``t10k-images-idx3-ubyte``. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + """ + + mirrors = [ + "http://yann.lecun.com/exdb/mnist/", + "https://ossci-datasets.s3.amazonaws.com/mnist/", + ] + + resources = [ + ("train-images-idx3-ubyte.gz", "f68b3c2dcbeaaa9fbdd348bbdeb94873"), + ("train-labels-idx1-ubyte.gz", "d53e105ee54ea40749a09fcbcd1e9432"), + ("t10k-images-idx3-ubyte.gz", "9fb629c4189551a2d022fa330f9573f3"), + ("t10k-labels-idx1-ubyte.gz", "ec29112dd5afa0611ce80d1b7f02629c"), + ] + + training_file = "training.pt" + test_file = "test.pt" + classes = [ + "0 - zero", + "1 - one", + "2 - two", + "3 - three", + "4 - four", + "5 - five", + "6 - six", + "7 - seven", + "8 - eight", + "9 - nine", + ] + + @property + def train_labels(self): + warnings.warn("train_labels has been renamed targets") + return self.targets + + @property + def test_labels(self): + warnings.warn("test_labels has been renamed targets") + return self.targets + + @property + def train_data(self): + warnings.warn("train_data has been renamed data") + return self.data + + @property + def test_data(self): + warnings.warn("test_data has been renamed data") + return self.data + + def __init__( + self, + root: Union[str, Path], + train: bool = True, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self.train = train # training set or test set + + if self._check_legacy_exist(): + self.data, self.targets = self._load_legacy_data() + return + + if download: + self.download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + self.data, self.targets = self._load_data() + + def _check_legacy_exist(self): + processed_folder_exists = os.path.exists(self.processed_folder) + if not processed_folder_exists: + return False + + return all( + check_integrity(os.path.join(self.processed_folder, file)) for file in (self.training_file, self.test_file) + ) + + def _load_legacy_data(self): + # This is for BC only. We no longer cache the data in a custom binary, but simply read from the raw data + # directly. + data_file = self.training_file if self.train else self.test_file + return torch.load(os.path.join(self.processed_folder, data_file), weights_only=True) + + def _load_data(self): + image_file = f"{'train' if self.train else 't10k'}-images-idx3-ubyte" + data = read_image_file(os.path.join(self.raw_folder, image_file)) + + label_file = f"{'train' if self.train else 't10k'}-labels-idx1-ubyte" + targets = read_label_file(os.path.join(self.raw_folder, label_file)) + + return data, targets + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target class. + """ + img, target = self.data[index], int(self.targets[index]) + + # doing this so that it is consistent with all other datasets + # to return a PIL Image + img = Image.fromarray(img.numpy(), mode="L") + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.data) + + @property + def raw_folder(self) -> str: + return os.path.join(self.root, self.__class__.__name__, "raw") + + @property + def processed_folder(self) -> str: + return os.path.join(self.root, self.__class__.__name__, "processed") + + @property + def class_to_idx(self) -> Dict[str, int]: + return {_class: i for i, _class in enumerate(self.classes)} + + def _check_exists(self) -> bool: + return all( + check_integrity(os.path.join(self.raw_folder, os.path.splitext(os.path.basename(url))[0])) + for url, _ in self.resources + ) + + def download(self) -> None: + """Download the MNIST data if it doesn't exist already.""" + + if self._check_exists(): + return + + os.makedirs(self.raw_folder, exist_ok=True) + + # download files + for filename, md5 in self.resources: + errors = [] + for mirror in self.mirrors: + url = f"{mirror}{filename}" + try: + download_and_extract_archive(url, download_root=self.raw_folder, filename=filename, md5=md5) + except URLError as e: + errors.append(e) + continue + break + else: + s = f"Error downloading {filename}:\n" + for mirror, err in zip(self.mirrors, errors): + s += f"Tried {mirror}, got:\n{str(err)}\n" + raise RuntimeError(s) + + def extra_repr(self) -> str: + split = "Train" if self.train is True else "Test" + return f"Split: {split}" + + +class FashionMNIST(MNIST): + """`Fashion-MNIST `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where ``FashionMNIST/raw/train-images-idx3-ubyte`` + and ``FashionMNIST/raw/t10k-images-idx3-ubyte`` exist. + train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``, + otherwise from ``t10k-images-idx3-ubyte``. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + """ + + mirrors = ["http://fashion-mnist.s3-website.eu-central-1.amazonaws.com/"] + + resources = [ + ("train-images-idx3-ubyte.gz", "8d4fb7e6c68d591d4c3dfef9ec88bf0d"), + ("train-labels-idx1-ubyte.gz", "25c81989df183df01b3e8a0aad5dffbe"), + ("t10k-images-idx3-ubyte.gz", "bef4ecab320f06d8554ea6380940ec79"), + ("t10k-labels-idx1-ubyte.gz", "bb300cfdad3c16e7a12a480ee83cd310"), + ] + classes = ["T-shirt/top", "Trouser", "Pullover", "Dress", "Coat", "Sandal", "Shirt", "Sneaker", "Bag", "Ankle boot"] + + +class KMNIST(MNIST): + """`Kuzushiji-MNIST `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where ``KMNIST/raw/train-images-idx3-ubyte`` + and ``KMNIST/raw/t10k-images-idx3-ubyte`` exist. + train (bool, optional): If True, creates dataset from ``train-images-idx3-ubyte``, + otherwise from ``t10k-images-idx3-ubyte``. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + """ + + mirrors = ["http://codh.rois.ac.jp/kmnist/dataset/kmnist/"] + + resources = [ + ("train-images-idx3-ubyte.gz", "bdb82020997e1d708af4cf47b453dcf7"), + ("train-labels-idx1-ubyte.gz", "e144d726b3acfaa3e44228e80efcd344"), + ("t10k-images-idx3-ubyte.gz", "5c965bf0a639b31b8f53240b1b52f4d7"), + ("t10k-labels-idx1-ubyte.gz", "7320c461ea6c1c855c0b718fb2a4b134"), + ] + classes = ["o", "ki", "su", "tsu", "na", "ha", "ma", "ya", "re", "wo"] + + +class EMNIST(MNIST): + """`EMNIST `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where ``EMNIST/raw/train-images-idx3-ubyte`` + and ``EMNIST/raw/t10k-images-idx3-ubyte`` exist. + split (string): The dataset has 6 different splits: ``byclass``, ``bymerge``, + ``balanced``, ``letters``, ``digits`` and ``mnist``. This argument specifies + which one to use. + train (bool, optional): If True, creates dataset from ``training.pt``, + otherwise from ``test.pt``. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + """ + + url = "https://biometrics.nist.gov/cs_links/EMNIST/gzip.zip" + md5 = "58c8d27c78d21e728a6bc7b3cc06412e" + splits = ("byclass", "bymerge", "balanced", "letters", "digits", "mnist") + # Merged Classes assumes Same structure for both uppercase and lowercase version + _merged_classes = {"c", "i", "j", "k", "l", "m", "o", "p", "s", "u", "v", "w", "x", "y", "z"} + _all_classes = set(string.digits + string.ascii_letters) + classes_split_dict = { + "byclass": sorted(list(_all_classes)), + "bymerge": sorted(list(_all_classes - _merged_classes)), + "balanced": sorted(list(_all_classes - _merged_classes)), + "letters": ["N/A"] + list(string.ascii_lowercase), + "digits": list(string.digits), + "mnist": list(string.digits), + } + + def __init__(self, root: Union[str, Path], split: str, **kwargs: Any) -> None: + self.split = verify_str_arg(split, "split", self.splits) + self.training_file = self._training_file(split) + self.test_file = self._test_file(split) + super().__init__(root, **kwargs) + self.classes = self.classes_split_dict[self.split] + + @staticmethod + def _training_file(split) -> str: + return f"training_{split}.pt" + + @staticmethod + def _test_file(split) -> str: + return f"test_{split}.pt" + + @property + def _file_prefix(self) -> str: + return f"emnist-{self.split}-{'train' if self.train else 'test'}" + + @property + def images_file(self) -> str: + return os.path.join(self.raw_folder, f"{self._file_prefix}-images-idx3-ubyte") + + @property + def labels_file(self) -> str: + return os.path.join(self.raw_folder, f"{self._file_prefix}-labels-idx1-ubyte") + + def _load_data(self): + return read_image_file(self.images_file), read_label_file(self.labels_file) + + def _check_exists(self) -> bool: + return all(check_integrity(file) for file in (self.images_file, self.labels_file)) + + def download(self) -> None: + """Download the EMNIST data if it doesn't exist already.""" + + if self._check_exists(): + return + + os.makedirs(self.raw_folder, exist_ok=True) + + download_and_extract_archive(self.url, download_root=self.raw_folder, md5=self.md5) + gzip_folder = os.path.join(self.raw_folder, "gzip") + for gzip_file in os.listdir(gzip_folder): + if gzip_file.endswith(".gz"): + extract_archive(os.path.join(gzip_folder, gzip_file), self.raw_folder) + shutil.rmtree(gzip_folder) + + +class QMNIST(MNIST): + """`QMNIST `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset whose ``raw`` + subdir contains binary files of the datasets. + what (string,optional): Can be 'train', 'test', 'test10k', + 'test50k', or 'nist' for respectively the mnist compatible + training set, the 60k qmnist testing set, the 10k qmnist + examples that match the mnist testing set, the 50k + remaining qmnist testing examples, or all the nist + digits. The default is to select 'train' or 'test' + according to the compatibility argument 'train'. + compat (bool,optional): A boolean that says whether the target + for each example is class number (for compatibility with + the MNIST dataloader) or a torch vector containing the + full qmnist information. Default=True. + download (bool, optional): If True, downloads the dataset from + the internet and puts it in root directory. If dataset is + already downloaded, it is not downloaded again. + transform (callable, optional): A function/transform that + takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform + that takes in the target and transforms it. + train (bool,optional,compatibility): When argument 'what' is + not specified, this boolean decides whether to load the + training set or the testing set. Default: True. + """ + + subsets = {"train": "train", "test": "test", "test10k": "test", "test50k": "test", "nist": "nist"} + resources: Dict[str, List[Tuple[str, str]]] = { # type: ignore[assignment] + "train": [ + ( + "https://raw.githubusercontent.com/facebookresearch/qmnist/master/qmnist-train-images-idx3-ubyte.gz", + "ed72d4157d28c017586c42bc6afe6370", + ), + ( + "https://raw.githubusercontent.com/facebookresearch/qmnist/master/qmnist-train-labels-idx2-int.gz", + "0058f8dd561b90ffdd0f734c6a30e5e4", + ), + ], + "test": [ + ( + "https://raw.githubusercontent.com/facebookresearch/qmnist/master/qmnist-test-images-idx3-ubyte.gz", + "1394631089c404de565df7b7aeaf9412", + ), + ( + "https://raw.githubusercontent.com/facebookresearch/qmnist/master/qmnist-test-labels-idx2-int.gz", + "5b5b05890a5e13444e108efe57b788aa", + ), + ], + "nist": [ + ( + "https://raw.githubusercontent.com/facebookresearch/qmnist/master/xnist-images-idx3-ubyte.xz", + "7f124b3b8ab81486c9d8c2749c17f834", + ), + ( + "https://raw.githubusercontent.com/facebookresearch/qmnist/master/xnist-labels-idx2-int.xz", + "5ed0e788978e45d4a8bd4b7caec3d79d", + ), + ], + } + classes = [ + "0 - zero", + "1 - one", + "2 - two", + "3 - three", + "4 - four", + "5 - five", + "6 - six", + "7 - seven", + "8 - eight", + "9 - nine", + ] + + def __init__( + self, root: Union[str, Path], what: Optional[str] = None, compat: bool = True, train: bool = True, **kwargs: Any + ) -> None: + if what is None: + what = "train" if train else "test" + self.what = verify_str_arg(what, "what", tuple(self.subsets.keys())) + self.compat = compat + self.data_file = what + ".pt" + self.training_file = self.data_file + self.test_file = self.data_file + super().__init__(root, train, **kwargs) + + @property + def images_file(self) -> str: + (url, _), _ = self.resources[self.subsets[self.what]] + return os.path.join(self.raw_folder, os.path.splitext(os.path.basename(url))[0]) + + @property + def labels_file(self) -> str: + _, (url, _) = self.resources[self.subsets[self.what]] + return os.path.join(self.raw_folder, os.path.splitext(os.path.basename(url))[0]) + + def _check_exists(self) -> bool: + return all(check_integrity(file) for file in (self.images_file, self.labels_file)) + + def _load_data(self): + data = read_sn3_pascalvincent_tensor(self.images_file) + if data.dtype != torch.uint8: + raise TypeError(f"data should be of dtype torch.uint8 instead of {data.dtype}") + if data.ndimension() != 3: + raise ValueError("data should have 3 dimensions instead of {data.ndimension()}") + + targets = read_sn3_pascalvincent_tensor(self.labels_file).long() + if targets.ndimension() != 2: + raise ValueError(f"targets should have 2 dimensions instead of {targets.ndimension()}") + + if self.what == "test10k": + data = data[0:10000, :, :].clone() + targets = targets[0:10000, :].clone() + elif self.what == "test50k": + data = data[10000:, :, :].clone() + targets = targets[10000:, :].clone() + + return data, targets + + def download(self) -> None: + """Download the QMNIST data if it doesn't exist already. + Note that we only download what has been asked for (argument 'what'). + """ + if self._check_exists(): + return + + os.makedirs(self.raw_folder, exist_ok=True) + split = self.resources[self.subsets[self.what]] + + for url, md5 in split: + download_and_extract_archive(url, self.raw_folder, md5=md5) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + # redefined to handle the compat flag + img, target = self.data[index], self.targets[index] + img = Image.fromarray(img.numpy(), mode="L") + if self.transform is not None: + img = self.transform(img) + if self.compat: + target = int(target[0]) + if self.target_transform is not None: + target = self.target_transform(target) + return img, target + + def extra_repr(self) -> str: + return f"Split: {self.what}" + + +def get_int(b: bytes) -> int: + return int(codecs.encode(b, "hex"), 16) + + +SN3_PASCALVINCENT_TYPEMAP = { + 8: torch.uint8, + 9: torch.int8, + 11: torch.int16, + 12: torch.int32, + 13: torch.float32, + 14: torch.float64, +} + + +def read_sn3_pascalvincent_tensor(path: str, strict: bool = True) -> torch.Tensor: + """Read a SN3 file in "Pascal Vincent" format (Lush file 'libidx/idx-io.lsh'). + Argument may be a filename, compressed filename, or file object. + """ + # read + with open(path, "rb") as f: + data = f.read() + + # parse + if sys.byteorder == "little": + magic = get_int(data[0:4]) + nd = magic % 256 + ty = magic // 256 + else: + nd = get_int(data[0:1]) + ty = get_int(data[1:2]) + get_int(data[2:3]) * 256 + get_int(data[3:4]) * 256 * 256 + + assert 1 <= nd <= 3 + assert 8 <= ty <= 14 + torch_type = SN3_PASCALVINCENT_TYPEMAP[ty] + s = [get_int(data[4 * (i + 1) : 4 * (i + 2)]) for i in range(nd)] + + if sys.byteorder == "big": + for i in range(len(s)): + s[i] = int.from_bytes(s[i].to_bytes(4, byteorder="little"), byteorder="big", signed=False) + + parsed = torch.frombuffer(bytearray(data), dtype=torch_type, offset=(4 * (nd + 1))) + + # The MNIST format uses the big endian byte order, while `torch.frombuffer` uses whatever the system uses. In case + # that is little endian and the dtype has more than one byte, we need to flip them. + if sys.byteorder == "little" and parsed.element_size() > 1: + parsed = _flip_byte_order(parsed) + + assert parsed.shape[0] == np.prod(s) or not strict + return parsed.view(*s) + + +def read_label_file(path: str) -> torch.Tensor: + x = read_sn3_pascalvincent_tensor(path, strict=False) + if x.dtype != torch.uint8: + raise TypeError(f"x should be of dtype torch.uint8 instead of {x.dtype}") + if x.ndimension() != 1: + raise ValueError(f"x should have 1 dimension instead of {x.ndimension()}") + return x.long() + + +def read_image_file(path: str) -> torch.Tensor: + x = read_sn3_pascalvincent_tensor(path, strict=False) + if x.dtype != torch.uint8: + raise TypeError(f"x should be of dtype torch.uint8 instead of {x.dtype}") + if x.ndimension() != 3: + raise ValueError(f"x should have 3 dimension instead of {x.ndimension()}") + return x diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/moving_mnist.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/moving_mnist.py new file mode 100644 index 0000000000000000000000000000000000000000..7443f539c23b06803b4c92e718404db86bf699b2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/moving_mnist.py @@ -0,0 +1,94 @@ +import os.path +from pathlib import Path +from typing import Callable, Optional, Union + +import numpy as np +import torch +from torchvision.datasets.utils import download_url, verify_str_arg +from torchvision.datasets.vision import VisionDataset + + +class MovingMNIST(VisionDataset): + """`MovingMNIST `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where ``MovingMNIST/mnist_test_seq.npy`` exists. + split (string, optional): The dataset split, supports ``None`` (default), ``"train"`` and ``"test"``. + If ``split=None``, the full data is returned. + split_ratio (int, optional): The split ratio of number of frames. If ``split="train"``, the first split + frames ``data[:, :split_ratio]`` is returned. If ``split="test"``, the last split frames ``data[:, split_ratio:]`` + is returned. If ``split=None``, this parameter is ignored and the all frames data is returned. + transform (callable, optional): A function/transform that takes in a torch Tensor + and returns a transformed version. E.g, ``transforms.RandomCrop`` + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + _URL = "http://www.cs.toronto.edu/~nitish/unsupervised_video/mnist_test_seq.npy" + + def __init__( + self, + root: Union[str, Path], + split: Optional[str] = None, + split_ratio: int = 10, + download: bool = False, + transform: Optional[Callable] = None, + ) -> None: + super().__init__(root, transform=transform) + + self._base_folder = os.path.join(self.root, self.__class__.__name__) + self._filename = self._URL.split("/")[-1] + + if split is not None: + verify_str_arg(split, "split", ("train", "test")) + self.split = split + + if not isinstance(split_ratio, int): + raise TypeError(f"`split_ratio` should be an integer, but got {type(split_ratio)}") + elif not (1 <= split_ratio <= 19): + raise ValueError(f"`split_ratio` should be `1 <= split_ratio <= 19`, but got {split_ratio} instead.") + self.split_ratio = split_ratio + + if download: + self.download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it.") + + data = torch.from_numpy(np.load(os.path.join(self._base_folder, self._filename))) + if self.split == "train": + data = data[: self.split_ratio] + elif self.split == "test": + data = data[self.split_ratio :] + self.data = data.transpose(0, 1).unsqueeze(2).contiguous() + + def __getitem__(self, idx: int) -> torch.Tensor: + """ + Args: + idx (int): Index + Returns: + torch.Tensor: Video frames (torch Tensor[T, C, H, W]). The `T` is the number of frames. + """ + data = self.data[idx] + if self.transform is not None: + data = self.transform(data) + + return data + + def __len__(self) -> int: + return len(self.data) + + def _check_exists(self) -> bool: + return os.path.exists(os.path.join(self._base_folder, self._filename)) + + def download(self) -> None: + if self._check_exists(): + return + + download_url( + url=self._URL, + root=self._base_folder, + filename=self._filename, + md5="be083ec986bfe91a449d63653c411eb2", + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/omniglot.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/omniglot.py new file mode 100644 index 0000000000000000000000000000000000000000..83ce6faacadd10de77157f0144e1dec68a13beb7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/omniglot.py @@ -0,0 +1,102 @@ +from os.path import join +from pathlib import Path +from typing import Any, Callable, List, Optional, Tuple, Union + +from PIL import Image + +from .utils import check_integrity, download_and_extract_archive, list_dir, list_files +from .vision import VisionDataset + + +class Omniglot(VisionDataset): + """`Omniglot `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``omniglot-py`` exists. + background (bool, optional): If True, creates dataset from the "background" set, otherwise + creates from the "evaluation" set. This terminology is defined by the authors. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset zip files from the internet and + puts it in root directory. If the zip files are already downloaded, they are not + downloaded again. + """ + + folder = "omniglot-py" + download_url_prefix = "https://raw.githubusercontent.com/brendenlake/omniglot/master/python" + zips_md5 = { + "images_background": "68d2efa1b9178cc56df9314c21c6e718", + "images_evaluation": "6b91aef0f799c5bb55b94e3f2daec811", + } + + def __init__( + self, + root: Union[str, Path], + background: bool = True, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(join(root, self.folder), transform=transform, target_transform=target_transform) + self.background = background + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + self.target_folder = join(self.root, self._get_target_folder()) + self._alphabets = list_dir(self.target_folder) + self._characters: List[str] = sum( + ([join(a, c) for c in list_dir(join(self.target_folder, a))] for a in self._alphabets), [] + ) + self._character_images = [ + [(image, idx) for image in list_files(join(self.target_folder, character), ".png")] + for idx, character in enumerate(self._characters) + ] + self._flat_character_images: List[Tuple[str, int]] = sum(self._character_images, []) + + def __len__(self) -> int: + return len(self._flat_character_images) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target character class. + """ + image_name, character_class = self._flat_character_images[index] + image_path = join(self.target_folder, self._characters[character_class], image_name) + image = Image.open(image_path, mode="r").convert("L") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + character_class = self.target_transform(character_class) + + return image, character_class + + def _check_integrity(self) -> bool: + zip_filename = self._get_target_folder() + if not check_integrity(join(self.root, zip_filename + ".zip"), self.zips_md5[zip_filename]): + return False + return True + + def download(self) -> None: + if self._check_integrity(): + return + + filename = self._get_target_folder() + zip_filename = filename + ".zip" + url = self.download_url_prefix + "/" + zip_filename + download_and_extract_archive(url, self.root, filename=zip_filename, md5=self.zips_md5[filename]) + + def _get_target_folder(self) -> str: + return "images_background" if self.background else "images_evaluation" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/oxford_iiit_pet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/oxford_iiit_pet.py new file mode 100644 index 0000000000000000000000000000000000000000..f50d6e7b2ae7a10f9dd3c90823b38b5ed10615cb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/oxford_iiit_pet.py @@ -0,0 +1,132 @@ +import os +import os.path +import pathlib +from typing import Any, Callable, Optional, Sequence, Tuple, Union + +from PIL import Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class OxfordIIITPet(VisionDataset): + """`Oxford-IIIT Pet Dataset `_. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"trainval"`` (default) or ``"test"``. + target_types (string, sequence of strings, optional): Types of target to use. Can be ``category`` (default) or + ``segmentation``. Can also be a list to output a tuple with all specified target types. The types represent: + + - ``category`` (int): Label for one of the 37 pet categories. + - ``binary-category`` (int): Binary label for cat or dog. + - ``segmentation`` (PIL image): Segmentation trimap of the image. + + If empty, ``None`` will be returned as target. + + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and puts it into + ``root/oxford-iiit-pet``. If dataset is already downloaded, it is not downloaded again. + """ + + _RESOURCES = ( + ("https://www.robots.ox.ac.uk/~vgg/data/pets/data/images.tar.gz", "5c4f3ee8e5d25df40f4fd59a7f44e54c"), + ("https://www.robots.ox.ac.uk/~vgg/data/pets/data/annotations.tar.gz", "95a8c909bbe2e81eed6a22bccdf3f68f"), + ) + _VALID_TARGET_TYPES = ("category", "binary-category", "segmentation") + + def __init__( + self, + root: Union[str, pathlib.Path], + split: str = "trainval", + target_types: Union[Sequence[str], str] = "category", + transforms: Optional[Callable] = None, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ): + self._split = verify_str_arg(split, "split", ("trainval", "test")) + if isinstance(target_types, str): + target_types = [target_types] + self._target_types = [ + verify_str_arg(target_type, "target_types", self._VALID_TARGET_TYPES) for target_type in target_types + ] + + super().__init__(root, transforms=transforms, transform=transform, target_transform=target_transform) + self._base_folder = pathlib.Path(self.root) / "oxford-iiit-pet" + self._images_folder = self._base_folder / "images" + self._anns_folder = self._base_folder / "annotations" + self._segs_folder = self._anns_folder / "trimaps" + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + image_ids = [] + self._labels = [] + self._bin_labels = [] + with open(self._anns_folder / f"{self._split}.txt") as file: + for line in file: + image_id, label, bin_label, _ = line.strip().split() + image_ids.append(image_id) + self._labels.append(int(label) - 1) + self._bin_labels.append(int(bin_label) - 1) + + self.bin_classes = ["Cat", "Dog"] + self.classes = [ + " ".join(part.title() for part in raw_cls.split("_")) + for raw_cls, _ in sorted( + {(image_id.rsplit("_", 1)[0], label) for image_id, label in zip(image_ids, self._labels)}, + key=lambda image_id_and_label: image_id_and_label[1], + ) + ] + self.bin_class_to_idx = dict(zip(self.bin_classes, range(len(self.bin_classes)))) + self.class_to_idx = dict(zip(self.classes, range(len(self.classes)))) + + self._images = [self._images_folder / f"{image_id}.jpg" for image_id in image_ids] + self._segs = [self._segs_folder / f"{image_id}.png" for image_id in image_ids] + + def __len__(self) -> int: + return len(self._images) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image = Image.open(self._images[idx]).convert("RGB") + + target: Any = [] + for target_type in self._target_types: + if target_type == "category": + target.append(self._labels[idx]) + elif target_type == "binary-category": + target.append(self._bin_labels[idx]) + else: # target_type == "segmentation" + target.append(Image.open(self._segs[idx])) + + if not target: + target = None + elif len(target) == 1: + target = target[0] + else: + target = tuple(target) + + if self.transforms: + image, target = self.transforms(image, target) + + return image, target + + def _check_exists(self) -> bool: + for folder in (self._images_folder, self._anns_folder): + if not (os.path.exists(folder) and os.path.isdir(folder)): + return False + else: + return True + + def _download(self) -> None: + if self._check_exists(): + return + + for url, md5 in self._RESOURCES: + download_and_extract_archive(url, download_root=str(self._base_folder), md5=md5) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/pcam.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/pcam.py new file mode 100644 index 0000000000000000000000000000000000000000..e32b7fad6cf47605c3e4ee0784f5cfd0d82396a0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/pcam.py @@ -0,0 +1,134 @@ +import pathlib +from typing import Any, Callable, Optional, Tuple, Union + +from PIL import Image + +from .utils import _decompress, download_file_from_google_drive, verify_str_arg +from .vision import VisionDataset + + +class PCAM(VisionDataset): + """`PCAM Dataset `_. + + The PatchCamelyon dataset is a binary classification dataset with 327,680 + color images (96px x 96px), extracted from histopathologic scans of lymph node + sections. Each image is annotated with a binary label indicating presence of + metastatic tissue. + + This dataset requires the ``h5py`` package which you can install with ``pip install h5py``. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"train"`` (default), ``"test"`` or ``"val"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and puts it into ``root/pcam``. If + dataset is already downloaded, it is not downloaded again. + + .. warning:: + + To download the dataset `gdown `_ is required. + """ + + _FILES = { + "train": { + "images": ( + "camelyonpatch_level_2_split_train_x.h5", # Data file name + "1Ka0XfEMiwgCYPdTI-vv6eUElOBnKFKQ2", # Google Drive ID + "1571f514728f59376b705fc836ff4b63", # md5 hash + ), + "targets": ( + "camelyonpatch_level_2_split_train_y.h5", + "1269yhu3pZDP8UYFQs-NYs3FPwuK-nGSG", + "35c2d7259d906cfc8143347bb8e05be7", + ), + }, + "test": { + "images": ( + "camelyonpatch_level_2_split_test_x.h5", + "1qV65ZqZvWzuIVthK8eVDhIwrbnsJdbg_", + "d8c2d60d490dbd479f8199bdfa0cf6ec", + ), + "targets": ( + "camelyonpatch_level_2_split_test_y.h5", + "17BHrSrwWKjYsOgTMmoqrIjDy6Fa2o_gP", + "60a7035772fbdb7f34eb86d4420cf66a", + ), + }, + "val": { + "images": ( + "camelyonpatch_level_2_split_valid_x.h5", + "1hgshYGWK8V-eGRy8LToWJJgDU_rXWVJ3", + "d5b63470df7cfa627aeec8b9dc0c066e", + ), + "targets": ( + "camelyonpatch_level_2_split_valid_y.h5", + "1bH8ZRbhSVAhScTS0p9-ZzGnX91cHT3uO", + "2b85f58b927af9964a4c15b8f7e8f179", + ), + }, + } + + def __init__( + self, + root: Union[str, pathlib.Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ): + try: + import h5py + + self.h5py = h5py + except ImportError: + raise RuntimeError( + "h5py is not found. This dataset needs to have h5py installed: please run pip install h5py" + ) + + self._split = verify_str_arg(split, "split", ("train", "test", "val")) + + super().__init__(root, transform=transform, target_transform=target_transform) + self._base_folder = pathlib.Path(self.root) / "pcam" + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + def __len__(self) -> int: + images_file = self._FILES[self._split]["images"][0] + with self.h5py.File(self._base_folder / images_file) as images_data: + return images_data["x"].shape[0] + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + images_file = self._FILES[self._split]["images"][0] + with self.h5py.File(self._base_folder / images_file) as images_data: + image = Image.fromarray(images_data["x"][idx]).convert("RGB") + + targets_file = self._FILES[self._split]["targets"][0] + with self.h5py.File(self._base_folder / targets_file) as targets_data: + target = int(targets_data["y"][idx, 0, 0, 0]) # shape is [num_images, 1, 1, 1] + + if self.transform: + image = self.transform(image) + if self.target_transform: + target = self.target_transform(target) + + return image, target + + def _check_exists(self) -> bool: + images_file = self._FILES[self._split]["images"][0] + targets_file = self._FILES[self._split]["targets"][0] + return all(self._base_folder.joinpath(h5_file).exists() for h5_file in (images_file, targets_file)) + + def _download(self) -> None: + if self._check_exists(): + return + + for file_name, file_id, md5 in self._FILES[self._split].values(): + archive_name = file_name + ".gz" + download_file_from_google_drive(file_id, str(self._base_folder), filename=archive_name, md5=md5) + _decompress(str(self._base_folder / archive_name)) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/phototour.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/phototour.py new file mode 100644 index 0000000000000000000000000000000000000000..ed7f4f2405f3925e02283a3a57422ad1c7377dde --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/phototour.py @@ -0,0 +1,230 @@ +import os +from pathlib import Path +from typing import Any, Callable, List, Optional, Tuple, Union + +import numpy as np +import torch +from PIL import Image + +from .utils import download_url +from .vision import VisionDataset + + +class PhotoTour(VisionDataset): + """`Multi-view Stereo Correspondence `_ Dataset. + + .. note:: + + We only provide the newer version of the dataset, since the authors state that it + + is more suitable for training descriptors based on difference of Gaussian, or Harris corners, as the + patches are centred on real interest point detections, rather than being projections of 3D points as is the + case in the old dataset. + + The original dataset is available under http://phototour.cs.washington.edu/patches/default.htm. + + + Args: + root (str or ``pathlib.Path``): Root directory where images are. + name (string): Name of the dataset to load. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + + urls = { + "notredame_harris": [ + "http://matthewalunbrown.com/patchdata/notredame_harris.zip", + "notredame_harris.zip", + "69f8c90f78e171349abdf0307afefe4d", + ], + "yosemite_harris": [ + "http://matthewalunbrown.com/patchdata/yosemite_harris.zip", + "yosemite_harris.zip", + "a73253d1c6fbd3ba2613c45065c00d46", + ], + "liberty_harris": [ + "http://matthewalunbrown.com/patchdata/liberty_harris.zip", + "liberty_harris.zip", + "c731fcfb3abb4091110d0ae8c7ba182c", + ], + "notredame": [ + "http://icvl.ee.ic.ac.uk/vbalnt/notredame.zip", + "notredame.zip", + "509eda8535847b8c0a90bbb210c83484", + ], + "yosemite": ["http://icvl.ee.ic.ac.uk/vbalnt/yosemite.zip", "yosemite.zip", "533b2e8eb7ede31be40abc317b2fd4f0"], + "liberty": ["http://icvl.ee.ic.ac.uk/vbalnt/liberty.zip", "liberty.zip", "fdd9152f138ea5ef2091746689176414"], + } + means = { + "notredame": 0.4854, + "yosemite": 0.4844, + "liberty": 0.4437, + "notredame_harris": 0.4854, + "yosemite_harris": 0.4844, + "liberty_harris": 0.4437, + } + stds = { + "notredame": 0.1864, + "yosemite": 0.1818, + "liberty": 0.2019, + "notredame_harris": 0.1864, + "yosemite_harris": 0.1818, + "liberty_harris": 0.2019, + } + lens = { + "notredame": 468159, + "yosemite": 633587, + "liberty": 450092, + "liberty_harris": 379587, + "yosemite_harris": 450912, + "notredame_harris": 325295, + } + image_ext = "bmp" + info_file = "info.txt" + matches_files = "m50_100000_100000_0.txt" + + def __init__( + self, + root: Union[str, Path], + name: str, + train: bool = True, + transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform) + self.name = name + self.data_dir = os.path.join(self.root, name) + self.data_down = os.path.join(self.root, f"{name}.zip") + self.data_file = os.path.join(self.root, f"{name}.pt") + + self.train = train + self.mean = self.means[name] + self.std = self.stds[name] + + if download: + self.download() + + if not self._check_datafile_exists(): + self.cache() + + # load the serialized data + self.data, self.labels, self.matches = torch.load(self.data_file, weights_only=True) + + def __getitem__(self, index: int) -> Union[torch.Tensor, Tuple[Any, Any, torch.Tensor]]: + """ + Args: + index (int): Index + + Returns: + tuple: (data1, data2, matches) + """ + if self.train: + data = self.data[index] + if self.transform is not None: + data = self.transform(data) + return data + m = self.matches[index] + data1, data2 = self.data[m[0]], self.data[m[1]] + if self.transform is not None: + data1 = self.transform(data1) + data2 = self.transform(data2) + return data1, data2, m[2] + + def __len__(self) -> int: + return len(self.data if self.train else self.matches) + + def _check_datafile_exists(self) -> bool: + return os.path.exists(self.data_file) + + def _check_downloaded(self) -> bool: + return os.path.exists(self.data_dir) + + def download(self) -> None: + if self._check_datafile_exists(): + return + + if not self._check_downloaded(): + # download files + url = self.urls[self.name][0] + filename = self.urls[self.name][1] + md5 = self.urls[self.name][2] + fpath = os.path.join(self.root, filename) + + download_url(url, self.root, filename, md5) + + import zipfile + + with zipfile.ZipFile(fpath, "r") as z: + z.extractall(self.data_dir) + + os.unlink(fpath) + + def cache(self) -> None: + # process and save as torch files + + dataset = ( + read_image_file(self.data_dir, self.image_ext, self.lens[self.name]), + read_info_file(self.data_dir, self.info_file), + read_matches_files(self.data_dir, self.matches_files), + ) + + with open(self.data_file, "wb") as f: + torch.save(dataset, f) + + def extra_repr(self) -> str: + split = "Train" if self.train is True else "Test" + return f"Split: {split}" + + +def read_image_file(data_dir: str, image_ext: str, n: int) -> torch.Tensor: + """Return a Tensor containing the patches""" + + def PIL2array(_img: Image.Image) -> np.ndarray: + """Convert PIL image type to numpy 2D array""" + return np.array(_img.getdata(), dtype=np.uint8).reshape(64, 64) + + def find_files(_data_dir: str, _image_ext: str) -> List[str]: + """Return a list with the file names of the images containing the patches""" + files = [] + # find those files with the specified extension + for file_dir in os.listdir(_data_dir): + if file_dir.endswith(_image_ext): + files.append(os.path.join(_data_dir, file_dir)) + return sorted(files) # sort files in ascend order to keep relations + + patches = [] + list_files = find_files(data_dir, image_ext) + + for fpath in list_files: + img = Image.open(fpath) + for y in range(0, img.height, 64): + for x in range(0, img.width, 64): + patch = img.crop((x, y, x + 64, y + 64)) + patches.append(PIL2array(patch)) + return torch.ByteTensor(np.array(patches[:n])) + + +def read_info_file(data_dir: str, info_file: str) -> torch.Tensor: + """Return a Tensor containing the list of labels + Read the file and keep only the ID of the 3D point. + """ + with open(os.path.join(data_dir, info_file)) as f: + labels = [int(line.split()[0]) for line in f] + return torch.LongTensor(labels) + + +def read_matches_files(data_dir: str, matches_file: str) -> torch.Tensor: + """Return a Tensor containing the ground truth matches + Read the file and keep only 3D point ID. + Matches are represented with a 1, non matches with a 0. + """ + matches = [] + with open(os.path.join(data_dir, matches_file)) as f: + for line in f: + line_split = line.split() + matches.append([int(line_split[0]), int(line_split[3]), int(line_split[1] == line_split[4])]) + return torch.LongTensor(matches) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/places365.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/places365.py new file mode 100644 index 0000000000000000000000000000000000000000..4d26cffc5e0eb8bf062935e2adee04ee76ed49b9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/places365.py @@ -0,0 +1,168 @@ +import os +from os import path +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union +from urllib.parse import urljoin + +from .folder import default_loader +from .utils import check_integrity, download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class Places365(VisionDataset): + r"""`Places365 `_ classification dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of the Places365 dataset. + split (string, optional): The dataset split. Can be one of ``train-standard`` (default), ``train-challenge``, + ``val``. + small (bool, optional): If ``True``, uses the small images, i.e. resized to 256 x 256 pixels, instead of the + high resolution ones. + download (bool, optional): If ``True``, downloads the dataset components and places them in ``root``. Already + downloaded archives are not downloaded again. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + loader (callable, optional): A function to load an image given its path. + + Attributes: + classes (list): List of the class names. + class_to_idx (dict): Dict with items (class_name, class_index). + imgs (list): List of (image path, class_index) tuples + targets (list): The class_index value for each image in the dataset + + Raises: + RuntimeError: If ``download is False`` and the meta files, i.e. the devkit, are not present or corrupted. + RuntimeError: If ``download is True`` and the image archive is already extracted. + """ + _SPLITS = ("train-standard", "train-challenge", "val") + _BASE_URL = "http://data.csail.mit.edu/places/places365/" + # {variant: (archive, md5)} + _DEVKIT_META = { + "standard": ("filelist_places365-standard.tar", "35a0585fee1fa656440f3ab298f8479c"), + "challenge": ("filelist_places365-challenge.tar", "70a8307e459c3de41690a7c76c931734"), + } + # (file, md5) + _CATEGORIES_META = ("categories_places365.txt", "06c963b85866bd0649f97cb43dd16673") + # {split: (file, md5)} + _FILE_LIST_META = { + "train-standard": ("places365_train_standard.txt", "30f37515461640559006b8329efbed1a"), + "train-challenge": ("places365_train_challenge.txt", "b2931dc997b8c33c27e7329c073a6b57"), + "val": ("places365_val.txt", "e9f2fd57bfd9d07630173f4e8708e4b1"), + } + # {(split, small): (file, md5)} + _IMAGES_META = { + ("train-standard", False): ("train_large_places365standard.tar", "67e186b496a84c929568076ed01a8aa1"), + ("train-challenge", False): ("train_large_places365challenge.tar", "605f18e68e510c82b958664ea134545f"), + ("val", False): ("val_large.tar", "9b71c4993ad89d2d8bcbdc4aef38042f"), + ("train-standard", True): ("train_256_places365standard.tar", "53ca1c756c3d1e7809517cc47c5561c5"), + ("train-challenge", True): ("train_256_places365challenge.tar", "741915038a5e3471ec7332404dfb64ef"), + ("val", True): ("val_256.tar", "e27b17d8d44f4af9a78502beb927f808"), + } + + def __init__( + self, + root: Union[str, Path], + split: str = "train-standard", + small: bool = False, + download: bool = False, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + loader: Callable[[str], Any] = default_loader, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + + self.split = self._verify_split(split) + self.small = small + self.loader = loader + + self.classes, self.class_to_idx = self.load_categories(download) + self.imgs, self.targets = self.load_file_list(download) + + if download: + self.download_images() + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + file, target = self.imgs[index] + image = self.loader(file) + + if self.transforms is not None: + image, target = self.transforms(image, target) + + return image, target + + def __len__(self) -> int: + return len(self.imgs) + + @property + def variant(self) -> str: + return "challenge" if "challenge" in self.split else "standard" + + @property + def images_dir(self) -> str: + size = "256" if self.small else "large" + if self.split.startswith("train"): + dir = f"data_{size}_{self.variant}" + else: + dir = f"{self.split}_{size}" + return path.join(self.root, dir) + + def load_categories(self, download: bool = True) -> Tuple[List[str], Dict[str, int]]: + def process(line: str) -> Tuple[str, int]: + cls, idx = line.split() + return cls, int(idx) + + file, md5 = self._CATEGORIES_META + file = path.join(self.root, file) + if not self._check_integrity(file, md5, download): + self.download_devkit() + + with open(file) as fh: + class_to_idx = dict(process(line) for line in fh) + + return sorted(class_to_idx.keys()), class_to_idx + + def load_file_list(self, download: bool = True) -> Tuple[List[Tuple[str, int]], List[int]]: + def process(line: str, sep="/") -> Tuple[str, int]: + image, idx = line.split() + return path.join(self.images_dir, image.lstrip(sep).replace(sep, os.sep)), int(idx) + + file, md5 = self._FILE_LIST_META[self.split] + file = path.join(self.root, file) + if not self._check_integrity(file, md5, download): + self.download_devkit() + + with open(file) as fh: + images = [process(line) for line in fh] + + _, targets = zip(*images) + return images, list(targets) + + def download_devkit(self) -> None: + file, md5 = self._DEVKIT_META[self.variant] + download_and_extract_archive(urljoin(self._BASE_URL, file), self.root, md5=md5) + + def download_images(self) -> None: + if path.exists(self.images_dir): + return + + file, md5 = self._IMAGES_META[(self.split, self.small)] + download_and_extract_archive(urljoin(self._BASE_URL, file), self.root, md5=md5) + + if self.split.startswith("train"): + os.rename(self.images_dir.rsplit("_", 1)[0], self.images_dir) + + def extra_repr(self) -> str: + return "\n".join(("Split: {split}", "Small: {small}")).format(**self.__dict__) + + def _verify_split(self, split: str) -> str: + return verify_str_arg(split, "split", self._SPLITS) + + def _check_integrity(self, file: str, md5: str, download: bool) -> bool: + integrity = check_integrity(file, md5=md5) + if not integrity and not download: + raise RuntimeError( + f"The file {file} does not exist or is corrupted. You can set download=True to download it." + ) + return integrity diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/rendered_sst2.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/rendered_sst2.py new file mode 100644 index 0000000000000000000000000000000000000000..7d1a2459c7bafb49f5175244f07fe2a948068f6f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/rendered_sst2.py @@ -0,0 +1,86 @@ +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import PIL.Image + +from .folder import make_dataset +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class RenderedSST2(VisionDataset): + """`The Rendered SST2 Dataset `_. + + Rendered SST2 is an image classification dataset used to evaluate the models capability on optical + character recognition. This dataset was generated by rendering sentences in the Standford Sentiment + Treebank v2 dataset. + + This dataset contains two classes (positive and negative) and is divided in three splits: a train + split containing 6920 images (3610 positive and 3310 negative), a validation split containing 872 images + (444 positive and 428 negative), and a test split containing 1821 images (909 positive and 912 negative). + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + split (string, optional): The dataset split, supports ``"train"`` (default), `"val"` and ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. Default is False. + """ + + _URL = "https://openaipublic.azureedge.net/clip/data/rendered-sst2.tgz" + _MD5 = "2384d08e9dcfa4bd55b324e610496ee5" + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self._split = verify_str_arg(split, "split", ("train", "val", "test")) + self._split_to_folder = {"train": "train", "val": "valid", "test": "test"} + self._base_folder = Path(self.root) / "rendered-sst2" + self.classes = ["negative", "positive"] + self.class_to_idx = {"negative": 0, "positive": 1} + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + self._samples = make_dataset(str(self._base_folder / self._split_to_folder[self._split]), extensions=("png",)) + + def __len__(self) -> int: + return len(self._samples) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_file, label = self._samples[idx] + image = PIL.Image.open(image_file).convert("RGB") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + label = self.target_transform(label) + + return image, label + + def extra_repr(self) -> str: + return f"split={self._split}" + + def _check_exists(self) -> bool: + for class_label in set(self.classes): + if not (self._base_folder / self._split_to_folder[self._split] / class_label).is_dir(): + return False + return True + + def _download(self) -> None: + if self._check_exists(): + return + download_and_extract_archive(self._URL, download_root=self.root, md5=self._MD5) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c89da0db39630b49095820fcea5de9367b1751c8 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__init__.py @@ -0,0 +1,3 @@ +from .clip_sampler import DistributedSampler, RandomClipSampler, UniformClipSampler + +__all__ = ("DistributedSampler", "UniformClipSampler", "RandomClipSampler") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd4a04142b53e319c000dfb33e81b684d826c8ea Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__pycache__/clip_sampler.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__pycache__/clip_sampler.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b9facba964deab1fc219f8ab619a6f982652267 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/__pycache__/clip_sampler.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/clip_sampler.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/clip_sampler.py new file mode 100644 index 0000000000000000000000000000000000000000..ff4a53267509e32c72f773433fd6fdd1d781325e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/samplers/clip_sampler.py @@ -0,0 +1,172 @@ +import math +from typing import cast, Iterator, List, Optional, Sized, Union + +import torch +import torch.distributed as dist +from torch.utils.data import Sampler +from torchvision.datasets.video_utils import VideoClips + + +class DistributedSampler(Sampler): + """ + Extension of DistributedSampler, as discussed in + https://github.com/pytorch/pytorch/issues/23430 + + Example: + dataset: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13] + num_replicas: 4 + shuffle: False + + when group_size = 1 + RANK | shard_dataset + ========================= + rank_0 | [0, 4, 8, 12] + rank_1 | [1, 5, 9, 13] + rank_2 | [2, 6, 10, 0] + rank_3 | [3, 7, 11, 1] + + when group_size = 2 + + RANK | shard_dataset + ========================= + rank_0 | [0, 1, 8, 9] + rank_1 | [2, 3, 10, 11] + rank_2 | [4, 5, 12, 13] + rank_3 | [6, 7, 0, 1] + + """ + + def __init__( + self, + dataset: Sized, + num_replicas: Optional[int] = None, + rank: Optional[int] = None, + shuffle: bool = False, + group_size: int = 1, + ) -> None: + if num_replicas is None: + if not dist.is_available(): + raise RuntimeError("Requires distributed package to be available") + num_replicas = dist.get_world_size() + if rank is None: + if not dist.is_available(): + raise RuntimeError("Requires distributed package to be available") + rank = dist.get_rank() + if len(dataset) % group_size != 0: + raise ValueError( + f"dataset length must be a multiplier of group size dataset length: {len(dataset)}, group size: {group_size}" + ) + self.dataset = dataset + self.group_size = group_size + self.num_replicas = num_replicas + self.rank = rank + self.epoch = 0 + dataset_group_length = len(dataset) // group_size + self.num_group_samples = int(math.ceil(dataset_group_length * 1.0 / self.num_replicas)) + self.num_samples = self.num_group_samples * group_size + self.total_size = self.num_samples * self.num_replicas + self.shuffle = shuffle + + def __iter__(self) -> Iterator[int]: + # deterministically shuffle based on epoch + g = torch.Generator() + g.manual_seed(self.epoch) + indices: Union[torch.Tensor, List[int]] + if self.shuffle: + indices = torch.randperm(len(self.dataset), generator=g).tolist() + else: + indices = list(range(len(self.dataset))) + + # add extra samples to make it evenly divisible + indices += indices[: (self.total_size - len(indices))] + assert len(indices) == self.total_size + + total_group_size = self.total_size // self.group_size + indices = torch.reshape(torch.LongTensor(indices), (total_group_size, self.group_size)) + + # subsample + indices = indices[self.rank : total_group_size : self.num_replicas, :] + indices = torch.reshape(indices, (-1,)).tolist() + assert len(indices) == self.num_samples + + if isinstance(self.dataset, Sampler): + orig_indices = list(iter(self.dataset)) + indices = [orig_indices[i] for i in indices] + + return iter(indices) + + def __len__(self) -> int: + return self.num_samples + + def set_epoch(self, epoch: int) -> None: + self.epoch = epoch + + +class UniformClipSampler(Sampler): + """ + Sample `num_video_clips_per_video` clips for each video, equally spaced. + When number of unique clips in the video is fewer than num_video_clips_per_video, + repeat the clips until `num_video_clips_per_video` clips are collected + + Args: + video_clips (VideoClips): video clips to sample from + num_clips_per_video (int): number of clips to be sampled per video + """ + + def __init__(self, video_clips: VideoClips, num_clips_per_video: int) -> None: + if not isinstance(video_clips, VideoClips): + raise TypeError(f"Expected video_clips to be an instance of VideoClips, got {type(video_clips)}") + self.video_clips = video_clips + self.num_clips_per_video = num_clips_per_video + + def __iter__(self) -> Iterator[int]: + idxs = [] + s = 0 + # select num_clips_per_video for each video, uniformly spaced + for c in self.video_clips.clips: + length = len(c) + if length == 0: + # corner case where video decoding fails + continue + + sampled = torch.linspace(s, s + length - 1, steps=self.num_clips_per_video).floor().to(torch.int64) + s += length + idxs.append(sampled) + return iter(cast(List[int], torch.cat(idxs).tolist())) + + def __len__(self) -> int: + return sum(self.num_clips_per_video for c in self.video_clips.clips if len(c) > 0) + + +class RandomClipSampler(Sampler): + """ + Samples at most `max_video_clips_per_video` clips for each video randomly + + Args: + video_clips (VideoClips): video clips to sample from + max_clips_per_video (int): maximum number of clips to be sampled per video + """ + + def __init__(self, video_clips: VideoClips, max_clips_per_video: int) -> None: + if not isinstance(video_clips, VideoClips): + raise TypeError(f"Expected video_clips to be an instance of VideoClips, got {type(video_clips)}") + self.video_clips = video_clips + self.max_clips_per_video = max_clips_per_video + + def __iter__(self) -> Iterator[int]: + idxs = [] + s = 0 + # select at most max_clips_per_video for each video, randomly + for c in self.video_clips.clips: + length = len(c) + size = min(length, self.max_clips_per_video) + sampled = torch.randperm(length)[:size] + s + s += length + idxs.append(sampled) + idxs_ = torch.cat(idxs) + # shuffle all clips randomly + perm = torch.randperm(len(idxs_)) + return iter(idxs_[perm].tolist()) + + def __len__(self) -> int: + return sum(min(len(c), self.max_clips_per_video) for c in self.video_clips.clips) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sbd.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sbd.py new file mode 100644 index 0000000000000000000000000000000000000000..4f1a8a1e152fc80c0bfd77a066a971509ef2c89f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sbd.py @@ -0,0 +1,126 @@ +import os +import shutil +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import numpy as np +from PIL import Image + +from .utils import download_and_extract_archive, download_url, verify_str_arg +from .vision import VisionDataset + + +class SBDataset(VisionDataset): + """`Semantic Boundaries Dataset `_ + + The SBD currently contains annotations from 11355 images taken from the PASCAL VOC 2011 dataset. + + .. note :: + + Please note that the train and val splits included with this dataset are different from + the splits in the PASCAL VOC dataset. In particular some "train" images might be part of + VOC2012 val. + If you are interested in testing on VOC 2012 val, then use `image_set='train_noval'`, + which excludes all val images. + + .. warning:: + + This class needs `scipy `_ to load target files from `.mat` format. + + Args: + root (str or ``pathlib.Path``): Root directory of the Semantic Boundaries Dataset + image_set (string, optional): Select the image_set to use, ``train``, ``val`` or ``train_noval``. + Image set ``train_noval`` excludes VOC 2012 val images. + mode (string, optional): Select target type. Possible values 'boundaries' or 'segmentation'. + In case of 'boundaries', the target is an array of shape `[num_classes, H, W]`, + where `num_classes=20`. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. Input sample is PIL image and target is a numpy array + if `mode='boundaries'` or PIL image if `mode='segmentation'`. + """ + + url = "https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/semantic_contours/benchmark.tgz" + md5 = "82b4d87ceb2ed10f6038a1cba92111cb" + filename = "benchmark.tgz" + + voc_train_url = "https://www.cs.cornell.edu/~bharathh/train_noval.txt" + voc_split_filename = "train_noval.txt" + voc_split_md5 = "79bff800c5f0b1ec6b21080a3c066722" + + def __init__( + self, + root: Union[str, Path], + image_set: str = "train", + mode: str = "boundaries", + download: bool = False, + transforms: Optional[Callable] = None, + ) -> None: + + try: + from scipy.io import loadmat + + self._loadmat = loadmat + except ImportError: + raise RuntimeError("Scipy is not found. This dataset needs to have scipy installed: pip install scipy") + + super().__init__(root, transforms) + self.image_set = verify_str_arg(image_set, "image_set", ("train", "val", "train_noval")) + self.mode = verify_str_arg(mode, "mode", ("segmentation", "boundaries")) + self.num_classes = 20 + + sbd_root = self.root + image_dir = os.path.join(sbd_root, "img") + mask_dir = os.path.join(sbd_root, "cls") + + if download: + download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.md5) + extracted_ds_root = os.path.join(self.root, "benchmark_RELEASE", "dataset") + for f in ["cls", "img", "inst", "train.txt", "val.txt"]: + old_path = os.path.join(extracted_ds_root, f) + shutil.move(old_path, sbd_root) + if self.image_set == "train_noval": + # Note: this is failing as of June 2024 https://github.com/pytorch/vision/issues/8471 + download_url(self.voc_train_url, sbd_root, self.voc_split_filename, self.voc_split_md5) + + if not os.path.isdir(sbd_root): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + split_f = os.path.join(sbd_root, image_set.rstrip("\n") + ".txt") + + with open(os.path.join(split_f)) as fh: + file_names = [x.strip() for x in fh.readlines()] + + self.images = [os.path.join(image_dir, x + ".jpg") for x in file_names] + self.masks = [os.path.join(mask_dir, x + ".mat") for x in file_names] + + self._get_target = self._get_segmentation_target if self.mode == "segmentation" else self._get_boundaries_target + + def _get_segmentation_target(self, filepath: str) -> Image.Image: + mat = self._loadmat(filepath) + return Image.fromarray(mat["GTcls"][0]["Segmentation"][0]) + + def _get_boundaries_target(self, filepath: str) -> np.ndarray: + mat = self._loadmat(filepath) + return np.concatenate( + [np.expand_dims(mat["GTcls"][0]["Boundaries"][0][i][0].toarray(), axis=0) for i in range(self.num_classes)], + axis=0, + ) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + img = Image.open(self.images[index]).convert("RGB") + target = self._get_target(self.masks[index]) + + if self.transforms is not None: + img, target = self.transforms(img, target) + + return img, target + + def __len__(self) -> int: + return len(self.images) + + def extra_repr(self) -> str: + lines = ["Image set: {image_set}", "Mode: {mode}"] + return "\n".join(lines).format(**self.__dict__) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sbu.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sbu.py new file mode 100644 index 0000000000000000000000000000000000000000..36c20ddb31a139eed56848a5911d222c034161ca --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sbu.py @@ -0,0 +1,109 @@ +import os +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +from PIL import Image + +from .utils import check_integrity, download_and_extract_archive, download_url +from .vision import VisionDataset + + +class SBU(VisionDataset): + """`SBU Captioned Photo `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where tarball + ``SBUCaptionedPhotoDataset.tar.gz`` exists. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If True, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + url = "https://www.cs.rice.edu/~vo9/sbucaptions/SBUCaptionedPhotoDataset.tar.gz" + filename = "SBUCaptionedPhotoDataset.tar.gz" + md5_checksum = "9aec147b3488753cf758b4d493422285" + + def __init__( + self, + root: Union[str, Path], + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = True, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + # Read the caption for each photo + self.photos = [] + self.captions = [] + + file1 = os.path.join(self.root, "dataset", "SBU_captioned_photo_dataset_urls.txt") + file2 = os.path.join(self.root, "dataset", "SBU_captioned_photo_dataset_captions.txt") + + for line1, line2 in zip(open(file1), open(file2)): + url = line1.rstrip() + photo = os.path.basename(url) + filename = os.path.join(self.root, "dataset", photo) + if os.path.exists(filename): + caption = line2.rstrip() + self.photos.append(photo) + self.captions.append(caption) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is a caption for the photo. + """ + filename = os.path.join(self.root, "dataset", self.photos[index]) + img = Image.open(filename).convert("RGB") + if self.transform is not None: + img = self.transform(img) + + target = self.captions[index] + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + """The number of photos in the dataset.""" + return len(self.photos) + + def _check_integrity(self) -> bool: + """Check the md5 checksum of the downloaded tarball.""" + root = self.root + fpath = os.path.join(root, self.filename) + if not check_integrity(fpath, self.md5_checksum): + return False + return True + + def download(self) -> None: + """Download and extract the tarball, and download each individual photo.""" + + if self._check_integrity(): + return + + download_and_extract_archive(self.url, self.root, self.root, self.filename, self.md5_checksum) + + # Download individual photos + with open(os.path.join(self.root, "dataset", "SBU_captioned_photo_dataset_urls.txt")) as fh: + for line in fh: + url = line.rstrip() + try: + download_url(url, os.path.join(self.root, "dataset")) + except OSError: + # The images point to public images on Flickr. + # Note: Images might be removed by users at anytime. + pass diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/semeion.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/semeion.py new file mode 100644 index 0000000000000000000000000000000000000000..5513316fd7dbdf84e92a626d9ef244fc26cc0407 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/semeion.py @@ -0,0 +1,91 @@ +import os.path +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import numpy as np +from PIL import Image + +from .utils import check_integrity, download_url +from .vision import VisionDataset + + +class SEMEION(VisionDataset): + r"""`SEMEION `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``semeion.py`` exists. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + url = "http://archive.ics.uci.edu/ml/machine-learning-databases/semeion/semeion.data" + filename = "semeion.data" + md5_checksum = "cb545d371d2ce14ec121470795a77432" + + def __init__( + self, + root: Union[str, Path], + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = True, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + fp = os.path.join(self.root, self.filename) + data = np.loadtxt(fp) + # convert value to 8 bit unsigned integer + # color (white #255) the pixels + self.data = (data[:, :256] * 255).astype("uint8") + self.data = np.reshape(self.data, (-1, 16, 16)) + self.labels = np.nonzero(data[:, 256:])[1] + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target class. + """ + img, target = self.data[index], int(self.labels[index]) + + # doing this so that it is consistent with all other datasets + # to return a PIL Image + img = Image.fromarray(img, mode="L") + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.data) + + def _check_integrity(self) -> bool: + root = self.root + fpath = os.path.join(root, self.filename) + if not check_integrity(fpath, self.md5_checksum): + return False + return True + + def download(self) -> None: + if self._check_integrity(): + return + + root = self.root + download_url(self.url, root, self.filename, self.md5_checksum) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/stanford_cars.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/stanford_cars.py new file mode 100644 index 0000000000000000000000000000000000000000..6303992888a5fe5144dbce9823fe8590e9380960 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/stanford_cars.py @@ -0,0 +1,114 @@ +import pathlib +from typing import Any, Callable, Optional, Tuple, Union + +from PIL import Image + +from .utils import verify_str_arg +from .vision import VisionDataset + + +class StanfordCars(VisionDataset): + """Stanford Cars Dataset + + The Cars dataset contains 16,185 images of 196 classes of cars. The data is + split into 8,144 training images and 8,041 testing images, where each class + has been split roughly in a 50-50 split + + The original URL is https://ai.stanford.edu/~jkrause/cars/car_dataset.html, but it is broken. + Follow the instructions in ``download`` argument to obtain and use the dataset offline. + + .. note:: + + This class needs `scipy `_ to load target files from `.mat` format. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset + split (string, optional): The dataset split, supports ``"train"`` (default) or ``"test"``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): This parameter exists for backward compatibility but it does not + download the dataset, since the original URL is not available anymore. The dataset + seems to be available on Kaggle so you can try to manually download and configure it using + `these instructions `_, + or use an integrated + `dataset on Kaggle `_. + In both cases, first download and configure the dataset locally, and use the dataset with + ``"download=False"``. + """ + + def __init__( + self, + root: Union[str, pathlib.Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + + try: + import scipy.io as sio + except ImportError: + raise RuntimeError("Scipy is not found. This dataset needs to have scipy installed: pip install scipy") + + super().__init__(root, transform=transform, target_transform=target_transform) + + self._split = verify_str_arg(split, "split", ("train", "test")) + self._base_folder = pathlib.Path(root) / "stanford_cars" + devkit = self._base_folder / "devkit" + + if self._split == "train": + self._annotations_mat_path = devkit / "cars_train_annos.mat" + self._images_base_path = self._base_folder / "cars_train" + else: + self._annotations_mat_path = self._base_folder / "cars_test_annos_withlabels.mat" + self._images_base_path = self._base_folder / "cars_test" + + if download: + self.download() + + if not self._check_exists(): + raise RuntimeError( + "Dataset not found. Try to manually download following the instructions in " + "https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616." + ) + + self._samples = [ + ( + str(self._images_base_path / annotation["fname"]), + annotation["class"] - 1, # Original target mapping starts from 1, hence -1 + ) + for annotation in sio.loadmat(self._annotations_mat_path, squeeze_me=True)["annotations"] + ] + + self.classes = sio.loadmat(str(devkit / "cars_meta.mat"), squeeze_me=True)["class_names"].tolist() + self.class_to_idx = {cls: i for i, cls in enumerate(self.classes)} + + def __len__(self) -> int: + return len(self._samples) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + """Returns pil_image and class_id for given index""" + image_path, target = self._samples[idx] + pil_image = Image.open(image_path).convert("RGB") + + if self.transform is not None: + pil_image = self.transform(pil_image) + if self.target_transform is not None: + target = self.target_transform(target) + return pil_image, target + + def _check_exists(self) -> bool: + if not (self._base_folder / "devkit").is_dir(): + return False + + return self._annotations_mat_path.exists() and self._images_base_path.is_dir() + + def download(self): + raise ValueError( + "The original URL is broken so the StanfordCars dataset is not available for automatic " + "download anymore. You can try to download it manually following " + "https://github.com/pytorch/vision/issues/7545#issuecomment-1631441616, " + "and set download=False to avoid this error." + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/stl10.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/stl10.py new file mode 100644 index 0000000000000000000000000000000000000000..6f44738cf1c3d0078c4a3b906ba7c8be0810ea0d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/stl10.py @@ -0,0 +1,174 @@ +import os.path +from pathlib import Path +from typing import Any, Callable, cast, Optional, Tuple, Union + +import numpy as np +from PIL import Image + +from .utils import check_integrity, download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + + +class STL10(VisionDataset): + """`STL10 `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset where directory + ``stl10_binary`` exists. + split (string): One of {'train', 'test', 'unlabeled', 'train+unlabeled'}. + Accordingly, dataset is selected. + folds (int, optional): One of {0-9} or None. + For training, loads one of the 10 pre-defined folds of 1k samples for the + standard evaluation procedure. If no value is passed, loads the 5k samples. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + base_folder = "stl10_binary" + url = "http://ai.stanford.edu/~acoates/stl10/stl10_binary.tar.gz" + filename = "stl10_binary.tar.gz" + tgz_md5 = "91f7769df0f17e558f3565bffb0c7dfb" + class_names_file = "class_names.txt" + folds_list_file = "fold_indices.txt" + train_list = [ + ["train_X.bin", "918c2871b30a85fa023e0c44e0bee87f"], + ["train_y.bin", "5a34089d4802c674881badbb80307741"], + ["unlabeled_X.bin", "5242ba1fed5e4be9e1e742405eb56ca4"], + ] + + test_list = [["test_X.bin", "7f263ba9f9e0b06b93213547f721ac82"], ["test_y.bin", "36f9794fa4beb8a2c72628de14fa638e"]] + splits = ("train", "train+unlabeled", "unlabeled", "test") + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + folds: Optional[int] = None, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self.split = verify_str_arg(split, "split", self.splits) + self.folds = self._verify_folds(folds) + + if download: + self.download() + elif not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + # now load the picked numpy arrays + self.labels: Optional[np.ndarray] + if self.split == "train": + self.data, self.labels = self.__loadfile(self.train_list[0][0], self.train_list[1][0]) + self.labels = cast(np.ndarray, self.labels) + self.__load_folds(folds) + + elif self.split == "train+unlabeled": + self.data, self.labels = self.__loadfile(self.train_list[0][0], self.train_list[1][0]) + self.labels = cast(np.ndarray, self.labels) + self.__load_folds(folds) + unlabeled_data, _ = self.__loadfile(self.train_list[2][0]) + self.data = np.concatenate((self.data, unlabeled_data)) + self.labels = np.concatenate((self.labels, np.asarray([-1] * unlabeled_data.shape[0]))) + + elif self.split == "unlabeled": + self.data, _ = self.__loadfile(self.train_list[2][0]) + self.labels = np.asarray([-1] * self.data.shape[0]) + else: # self.split == 'test': + self.data, self.labels = self.__loadfile(self.test_list[0][0], self.test_list[1][0]) + + class_file = os.path.join(self.root, self.base_folder, self.class_names_file) + if os.path.isfile(class_file): + with open(class_file) as f: + self.classes = f.read().splitlines() + + def _verify_folds(self, folds: Optional[int]) -> Optional[int]: + if folds is None: + return folds + elif isinstance(folds, int): + if folds in range(10): + return folds + msg = "Value for argument folds should be in the range [0, 10), but got {}." + raise ValueError(msg.format(folds)) + else: + msg = "Expected type None or int for argument folds, but got type {}." + raise ValueError(msg.format(type(folds))) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target class. + """ + target: Optional[int] + if self.labels is not None: + img, target = self.data[index], int(self.labels[index]) + else: + img, target = self.data[index], None + + # doing this so that it is consistent with all other datasets + # to return a PIL Image + img = Image.fromarray(np.transpose(img, (1, 2, 0))) + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return self.data.shape[0] + + def __loadfile(self, data_file: str, labels_file: Optional[str] = None) -> Tuple[np.ndarray, Optional[np.ndarray]]: + labels = None + if labels_file: + path_to_labels = os.path.join(self.root, self.base_folder, labels_file) + with open(path_to_labels, "rb") as f: + labels = np.fromfile(f, dtype=np.uint8) - 1 # 0-based + + path_to_data = os.path.join(self.root, self.base_folder, data_file) + with open(path_to_data, "rb") as f: + # read whole file in uint8 chunks + everything = np.fromfile(f, dtype=np.uint8) + images = np.reshape(everything, (-1, 3, 96, 96)) + images = np.transpose(images, (0, 1, 3, 2)) + + return images, labels + + def _check_integrity(self) -> bool: + for filename, md5 in self.train_list + self.test_list: + fpath = os.path.join(self.root, self.base_folder, filename) + if not check_integrity(fpath, md5): + return False + return True + + def download(self) -> None: + if self._check_integrity(): + return + download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.tgz_md5) + self._check_integrity() + + def extra_repr(self) -> str: + return "Split: {split}".format(**self.__dict__) + + def __load_folds(self, folds: Optional[int]) -> None: + # loads one of the folds if specified + if folds is None: + return + path_to_folds = os.path.join(self.root, self.base_folder, self.folds_list_file) + with open(path_to_folds) as f: + str_idx = f.read().splitlines()[folds] + list_idx = np.fromstring(str_idx, dtype=np.int64, sep=" ") + self.data = self.data[list_idx, :, :, :] + if self.labels is not None: + self.labels = self.labels[list_idx] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sun397.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sun397.py new file mode 100644 index 0000000000000000000000000000000000000000..e951d3e2aea97e846f0ff6444762935a53150b22 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/sun397.py @@ -0,0 +1,76 @@ +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import PIL.Image + +from .utils import download_and_extract_archive +from .vision import VisionDataset + + +class SUN397(VisionDataset): + """`The SUN397 Data Set `_. + + The SUN397 or Scene UNderstanding (SUN) is a dataset for scene recognition consisting of + 397 categories with 108'754 images. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset. + transform (callable, optional): A function/transform that takes in a PIL image and returns a transformed + version. E.g, ``transforms.RandomCrop``. + target_transform (callable, optional): A function/transform that takes in the target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + """ + + _DATASET_URL = "http://vision.princeton.edu/projects/2010/SUN/SUN397.tar.gz" + _DATASET_MD5 = "8ca2778205c41d23104230ba66911c7a" + + def __init__( + self, + root: Union[str, Path], + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self._data_dir = Path(self.root) / "SUN397" + + if download: + self._download() + + if not self._check_exists(): + raise RuntimeError("Dataset not found. You can use download=True to download it") + + with open(self._data_dir / "ClassName.txt") as f: + self.classes = [c[3:].strip() for c in f] + + self.class_to_idx = dict(zip(self.classes, range(len(self.classes)))) + self._image_files = list(self._data_dir.rglob("sun_*.jpg")) + + self._labels = [ + self.class_to_idx["/".join(path.relative_to(self._data_dir).parts[1:-1])] for path in self._image_files + ] + + def __len__(self) -> int: + return len(self._image_files) + + def __getitem__(self, idx: int) -> Tuple[Any, Any]: + image_file, label = self._image_files[idx], self._labels[idx] + image = PIL.Image.open(image_file).convert("RGB") + + if self.transform: + image = self.transform(image) + + if self.target_transform: + label = self.target_transform(label) + + return image, label + + def _check_exists(self) -> bool: + return self._data_dir.is_dir() + + def _download(self) -> None: + if self._check_exists(): + return + download_and_extract_archive(self._DATASET_URL, download_root=self.root, md5=self._DATASET_MD5) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/svhn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/svhn.py new file mode 100644 index 0000000000000000000000000000000000000000..969ce59a2f3bb9e3eeb45ff010e62e1cd7722c81 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/svhn.py @@ -0,0 +1,130 @@ +import os.path +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import numpy as np +from PIL import Image + +from .utils import check_integrity, download_url, verify_str_arg +from .vision import VisionDataset + + +class SVHN(VisionDataset): + """`SVHN `_ Dataset. + Note: The SVHN dataset assigns the label `10` to the digit `0`. However, in this Dataset, + we assign the label `0` to the digit `0` to be compatible with PyTorch loss functions which + expect the class labels to be in the range `[0, C-1]` + + .. warning:: + + This class needs `scipy `_ to load data from `.mat` format. + + Args: + root (str or ``pathlib.Path``): Root directory of the dataset where the data is stored. + split (string): One of {'train', 'test', 'extra'}. + Accordingly dataset is selected. 'extra' is Extra training set. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + + split_list = { + "train": [ + "http://ufldl.stanford.edu/housenumbers/train_32x32.mat", + "train_32x32.mat", + "e26dedcc434d2e4c54c9b2d4a06d8373", + ], + "test": [ + "http://ufldl.stanford.edu/housenumbers/test_32x32.mat", + "test_32x32.mat", + "eb5a983be6a315427106f1b164d9cef3", + ], + "extra": [ + "http://ufldl.stanford.edu/housenumbers/extra_32x32.mat", + "extra_32x32.mat", + "a93ce644f1a588dc4d68dda5feec44a7", + ], + } + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + self.split = verify_str_arg(split, "split", tuple(self.split_list.keys())) + self.url = self.split_list[split][0] + self.filename = self.split_list[split][1] + self.file_md5 = self.split_list[split][2] + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + # import here rather than at top of file because this is + # an optional dependency for torchvision + import scipy.io as sio + + # reading(loading) mat file as array + loaded_mat = sio.loadmat(os.path.join(self.root, self.filename)) + + self.data = loaded_mat["X"] + # loading from the .mat file gives an np.ndarray of type np.uint8 + # converting to np.int64, so that we have a LongTensor after + # the conversion from the numpy array + # the squeeze is needed to obtain a 1D tensor + self.labels = loaded_mat["y"].astype(np.int64).squeeze() + + # the svhn dataset assigns the class label "10" to the digit 0 + # this makes it inconsistent with several loss functions + # which expect the class labels to be in the range [0, C-1] + np.place(self.labels, self.labels == 10, 0) + self.data = np.transpose(self.data, (3, 2, 0, 1)) + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target class. + """ + img, target = self.data[index], int(self.labels[index]) + + # doing this so that it is consistent with all other datasets + # to return a PIL Image + img = Image.fromarray(np.transpose(img, (1, 2, 0))) + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.data) + + def _check_integrity(self) -> bool: + root = self.root + md5 = self.split_list[self.split][2] + fpath = os.path.join(root, self.filename) + return check_integrity(fpath, md5) + + def download(self) -> None: + md5 = self.split_list[self.split][2] + download_url(self.url, self.root, self.filename, md5) + + def extra_repr(self) -> str: + return "Split: {split}".format(**self.__dict__) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/ucf101.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/ucf101.py new file mode 100644 index 0000000000000000000000000000000000000000..c93bc3ef8a1a12c60b728a0071c831f97db5a7a0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/ucf101.py @@ -0,0 +1,131 @@ +import os +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +from torch import Tensor + +from .folder import find_classes, make_dataset +from .video_utils import VideoClips +from .vision import VisionDataset + + +class UCF101(VisionDataset): + """ + `UCF101 `_ dataset. + + UCF101 is an action recognition video dataset. + This dataset consider every video as a collection of video clips of fixed size, specified + by ``frames_per_clip``, where the step in frames between each clip is given by + ``step_between_clips``. The dataset itself can be downloaded from the dataset website; + annotations that ``annotation_path`` should be pointing to can be downloaded from `here + `_. + + To give an example, for 2 videos with 10 and 15 frames respectively, if ``frames_per_clip=5`` + and ``step_between_clips=5``, the dataset size will be (2 + 3) = 5, where the first two + elements will come from video 1, and the next three elements from video 2. + Note that we drop clips which do not have exactly ``frames_per_clip`` elements, so not all + frames in a video might be present. + + Internally, it uses a VideoClips object to handle clip creation. + + Args: + root (str or ``pathlib.Path``): Root directory of the UCF101 Dataset. + annotation_path (str): path to the folder containing the split files; + see docstring above for download instructions of these files + frames_per_clip (int): number of frames in a clip. + step_between_clips (int, optional): number of frames between each clip. + fold (int, optional): which fold to use. Should be between 1 and 3. + train (bool, optional): if ``True``, creates a dataset from the train split, + otherwise from the ``test`` split. + transform (callable, optional): A function/transform that takes in a TxHxWxC video + and returns a transformed version. + output_format (str, optional): The format of the output video tensors (before transforms). + Can be either "THWC" (default) or "TCHW". + + Returns: + tuple: A 3-tuple with the following entries: + + - video (Tensor[T, H, W, C] or Tensor[T, C, H, W]): The `T` video frames + - audio(Tensor[K, L]): the audio frames, where `K` is the number of channels + and `L` is the number of points + - label (int): class of the video clip + """ + + def __init__( + self, + root: Union[str, Path], + annotation_path: str, + frames_per_clip: int, + step_between_clips: int = 1, + frame_rate: Optional[int] = None, + fold: int = 1, + train: bool = True, + transform: Optional[Callable] = None, + _precomputed_metadata: Optional[Dict[str, Any]] = None, + num_workers: int = 1, + _video_width: int = 0, + _video_height: int = 0, + _video_min_dimension: int = 0, + _audio_samples: int = 0, + output_format: str = "THWC", + ) -> None: + super().__init__(root) + if not 1 <= fold <= 3: + raise ValueError(f"fold should be between 1 and 3, got {fold}") + + extensions = ("avi",) + self.fold = fold + self.train = train + + self.classes, class_to_idx = find_classes(self.root) + self.samples = make_dataset(self.root, class_to_idx, extensions, is_valid_file=None) + video_list = [x[0] for x in self.samples] + video_clips = VideoClips( + video_list, + frames_per_clip, + step_between_clips, + frame_rate, + _precomputed_metadata, + num_workers=num_workers, + _video_width=_video_width, + _video_height=_video_height, + _video_min_dimension=_video_min_dimension, + _audio_samples=_audio_samples, + output_format=output_format, + ) + # we bookkeep the full version of video clips because we want to be able + # to return the metadata of full version rather than the subset version of + # video clips + self.full_video_clips = video_clips + self.indices = self._select_fold(video_list, annotation_path, fold, train) + self.video_clips = video_clips.subset(self.indices) + self.transform = transform + + @property + def metadata(self) -> Dict[str, Any]: + return self.full_video_clips.metadata + + def _select_fold(self, video_list: List[str], annotation_path: str, fold: int, train: bool) -> List[int]: + name = "train" if train else "test" + name = f"{name}list{fold:02d}.txt" + f = os.path.join(annotation_path, name) + selected_files = set() + with open(f) as fid: + data = fid.readlines() + data = [x.strip().split(" ")[0] for x in data] + data = [os.path.join(self.root, *x.split("/")) for x in data] + selected_files.update(data) + indices = [i for i in range(len(video_list)) if video_list[i] in selected_files] + return indices + + def __len__(self) -> int: + return self.video_clips.num_clips() + + def __getitem__(self, idx: int) -> Tuple[Tensor, Tensor, int]: + video, audio, info, video_idx = self.video_clips.get_clip(idx) + label = self.samples[self.indices[video_idx]][1] + + if self.transform is not None: + video = self.transform(video) + + return video, audio, label diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/usps.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/usps.py new file mode 100644 index 0000000000000000000000000000000000000000..3345a93902c2a9e10346f312a554b160f0769352 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/usps.py @@ -0,0 +1,96 @@ +import os +from pathlib import Path +from typing import Any, Callable, Optional, Tuple, Union + +import numpy as np +from PIL import Image + +from .utils import download_url +from .vision import VisionDataset + + +class USPS(VisionDataset): + """`USPS `_ Dataset. + The data-format is : [label [index:value ]*256 \\n] * num_lines, where ``label`` lies in ``[1, 10]``. + The value for each pixel lies in ``[-1, 1]``. Here we transform the ``label`` into ``[0, 9]`` + and make pixel values in ``[0, 255]``. + + Args: + root (str or ``pathlib.Path``): Root directory of dataset to store``USPS`` data files. + train (bool, optional): If True, creates dataset from ``usps.bz2``, + otherwise from ``usps.t.bz2``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + """ + + split_list = { + "train": [ + "https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/usps.bz2", + "usps.bz2", + "ec16c51db3855ca6c91edd34d0e9b197", + ], + "test": [ + "https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/multiclass/usps.t.bz2", + "usps.t.bz2", + "8ea070ee2aca1ac39742fdd1ef5ed118", + ], + } + + def __init__( + self, + root: Union[str, Path], + train: bool = True, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__(root, transform=transform, target_transform=target_transform) + split = "train" if train else "test" + url, filename, checksum = self.split_list[split] + full_path = os.path.join(self.root, filename) + + if download and not os.path.exists(full_path): + download_url(url, self.root, filename, md5=checksum) + + import bz2 + + with bz2.open(full_path) as fp: + raw_data = [line.decode().split() for line in fp.readlines()] + tmp_list = [[x.split(":")[-1] for x in data[1:]] for data in raw_data] + imgs = np.asarray(tmp_list, dtype=np.float32).reshape((-1, 16, 16)) + imgs = ((imgs + 1) / 2 * 255).astype(dtype=np.uint8) + targets = [int(d[0]) - 1 for d in raw_data] + + self.data = imgs + self.targets = targets + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is index of the target class. + """ + img, target = self.data[index], int(self.targets[index]) + + # doing this so that it is consistent with all other datasets + # to return a PIL Image + img = Image.fromarray(img, mode="L") + + if self.transform is not None: + img = self.transform(img) + + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.data) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..f0f3bff56d0517622738a15f9c3d6fba32105bf0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/utils.py @@ -0,0 +1,471 @@ +import bz2 +import gzip +import hashlib +import lzma +import os +import os.path +import pathlib +import re +import sys +import tarfile +import urllib +import urllib.error +import urllib.request +import zipfile +from typing import Any, Callable, Dict, IO, Iterable, List, Optional, Tuple, TypeVar, Union +from urllib.parse import urlparse + +import numpy as np +import torch +from torch.utils.model_zoo import tqdm + +from .._internally_replaced_utils import _download_file_from_remote_location, _is_remote_location_available + +USER_AGENT = "pytorch/vision" + + +def _urlretrieve(url: str, filename: Union[str, pathlib.Path], chunk_size: int = 1024 * 32) -> None: + with urllib.request.urlopen(urllib.request.Request(url, headers={"User-Agent": USER_AGENT})) as response: + with open(filename, "wb") as fh, tqdm(total=response.length, unit="B", unit_scale=True) as pbar: + while chunk := response.read(chunk_size): + fh.write(chunk) + pbar.update(len(chunk)) + + +def calculate_md5(fpath: Union[str, pathlib.Path], chunk_size: int = 1024 * 1024) -> str: + # Setting the `usedforsecurity` flag does not change anything about the functionality, but indicates that we are + # not using the MD5 checksum for cryptography. This enables its usage in restricted environments like FIPS. Without + # it torchvision.datasets is unusable in these environments since we perform a MD5 check everywhere. + if sys.version_info >= (3, 9): + md5 = hashlib.md5(usedforsecurity=False) + else: + md5 = hashlib.md5() + with open(fpath, "rb") as f: + while chunk := f.read(chunk_size): + md5.update(chunk) + return md5.hexdigest() + + +def check_md5(fpath: Union[str, pathlib.Path], md5: str, **kwargs: Any) -> bool: + return md5 == calculate_md5(fpath, **kwargs) + + +def check_integrity(fpath: Union[str, pathlib.Path], md5: Optional[str] = None) -> bool: + if not os.path.isfile(fpath): + return False + if md5 is None: + return True + return check_md5(fpath, md5) + + +def _get_redirect_url(url: str, max_hops: int = 3) -> str: + initial_url = url + headers = {"Method": "HEAD", "User-Agent": USER_AGENT} + + for _ in range(max_hops + 1): + with urllib.request.urlopen(urllib.request.Request(url, headers=headers)) as response: + if response.url == url or response.url is None: + return url + + url = response.url + else: + raise RecursionError( + f"Request to {initial_url} exceeded {max_hops} redirects. The last redirect points to {url}." + ) + + +def _get_google_drive_file_id(url: str) -> Optional[str]: + parts = urlparse(url) + + if re.match(r"(drive|docs)[.]google[.]com", parts.netloc) is None: + return None + + match = re.match(r"/file/d/(?P[^/]*)", parts.path) + if match is None: + return None + + return match.group("id") + + +def download_url( + url: str, + root: Union[str, pathlib.Path], + filename: Optional[Union[str, pathlib.Path]] = None, + md5: Optional[str] = None, + max_redirect_hops: int = 3, +) -> None: + """Download a file from a url and place it in root. + + Args: + url (str): URL to download file from + root (str): Directory to place downloaded file in + filename (str, optional): Name to save the file under. If None, use the basename of the URL + md5 (str, optional): MD5 checksum of the download. If None, do not check + max_redirect_hops (int, optional): Maximum number of redirect hops allowed + """ + root = os.path.expanduser(root) + if not filename: + filename = os.path.basename(url) + fpath = os.fspath(os.path.join(root, filename)) + + os.makedirs(root, exist_ok=True) + + # check if file is already present locally + if check_integrity(fpath, md5): + return + + if _is_remote_location_available(): + _download_file_from_remote_location(fpath, url) + else: + # expand redirect chain if needed + url = _get_redirect_url(url, max_hops=max_redirect_hops) + + # check if file is located on Google Drive + file_id = _get_google_drive_file_id(url) + if file_id is not None: + return download_file_from_google_drive(file_id, root, filename, md5) + + # download the file + try: + _urlretrieve(url, fpath) + except (urllib.error.URLError, OSError) as e: # type: ignore[attr-defined] + if url[:5] == "https": + url = url.replace("https:", "http:") + _urlretrieve(url, fpath) + else: + raise e + + # check integrity of downloaded file + if not check_integrity(fpath, md5): + raise RuntimeError("File not found or corrupted.") + + +def list_dir(root: Union[str, pathlib.Path], prefix: bool = False) -> List[str]: + """List all directories at a given root + + Args: + root (str): Path to directory whose folders need to be listed + prefix (bool, optional): If true, prepends the path to each result, otherwise + only returns the name of the directories found + """ + root = os.path.expanduser(root) + directories = [p for p in os.listdir(root) if os.path.isdir(os.path.join(root, p))] + if prefix is True: + directories = [os.path.join(root, d) for d in directories] + return directories + + +def list_files(root: Union[str, pathlib.Path], suffix: str, prefix: bool = False) -> List[str]: + """List all files ending with a suffix at a given root + + Args: + root (str): Path to directory whose folders need to be listed + suffix (str or tuple): Suffix of the files to match, e.g. '.png' or ('.jpg', '.png'). + It uses the Python "str.endswith" method and is passed directly + prefix (bool, optional): If true, prepends the path to each result, otherwise + only returns the name of the files found + """ + root = os.path.expanduser(root) + files = [p for p in os.listdir(root) if os.path.isfile(os.path.join(root, p)) and p.endswith(suffix)] + if prefix is True: + files = [os.path.join(root, d) for d in files] + return files + + +def download_file_from_google_drive( + file_id: str, + root: Union[str, pathlib.Path], + filename: Optional[Union[str, pathlib.Path]] = None, + md5: Optional[str] = None, +): + """Download a Google Drive file from and place it in root. + + Args: + file_id (str): id of file to be downloaded + root (str): Directory to place downloaded file in + filename (str, optional): Name to save the file under. If None, use the id of the file. + md5 (str, optional): MD5 checksum of the download. If None, do not check + """ + try: + import gdown + except ModuleNotFoundError: + raise RuntimeError( + "To download files from GDrive, 'gdown' is required. You can install it with 'pip install gdown'." + ) + + root = os.path.expanduser(root) + if not filename: + filename = file_id + fpath = os.fspath(os.path.join(root, filename)) + + os.makedirs(root, exist_ok=True) + + if check_integrity(fpath, md5): + return + + gdown.download(id=file_id, output=fpath, quiet=False, user_agent=USER_AGENT) + + if not check_integrity(fpath, md5): + raise RuntimeError("File not found or corrupted.") + + +def _extract_tar( + from_path: Union[str, pathlib.Path], to_path: Union[str, pathlib.Path], compression: Optional[str] +) -> None: + with tarfile.open(from_path, f"r:{compression[1:]}" if compression else "r") as tar: + tar.extractall(to_path) + + +_ZIP_COMPRESSION_MAP: Dict[str, int] = { + ".bz2": zipfile.ZIP_BZIP2, + ".xz": zipfile.ZIP_LZMA, +} + + +def _extract_zip( + from_path: Union[str, pathlib.Path], to_path: Union[str, pathlib.Path], compression: Optional[str] +) -> None: + with zipfile.ZipFile( + from_path, "r", compression=_ZIP_COMPRESSION_MAP[compression] if compression else zipfile.ZIP_STORED + ) as zip: + zip.extractall(to_path) + + +_ARCHIVE_EXTRACTORS: Dict[str, Callable[[Union[str, pathlib.Path], Union[str, pathlib.Path], Optional[str]], None]] = { + ".tar": _extract_tar, + ".zip": _extract_zip, +} +_COMPRESSED_FILE_OPENERS: Dict[str, Callable[..., IO]] = { + ".bz2": bz2.open, + ".gz": gzip.open, + ".xz": lzma.open, +} +_FILE_TYPE_ALIASES: Dict[str, Tuple[Optional[str], Optional[str]]] = { + ".tbz": (".tar", ".bz2"), + ".tbz2": (".tar", ".bz2"), + ".tgz": (".tar", ".gz"), +} + + +def _detect_file_type(file: Union[str, pathlib.Path]) -> Tuple[str, Optional[str], Optional[str]]: + """Detect the archive type and/or compression of a file. + + Args: + file (str): the filename + + Returns: + (tuple): tuple of suffix, archive type, and compression + + Raises: + RuntimeError: if file has no suffix or suffix is not supported + """ + suffixes = pathlib.Path(file).suffixes + if not suffixes: + raise RuntimeError( + f"File '{file}' has no suffixes that could be used to detect the archive type and compression." + ) + suffix = suffixes[-1] + + # check if the suffix is a known alias + if suffix in _FILE_TYPE_ALIASES: + return (suffix, *_FILE_TYPE_ALIASES[suffix]) + + # check if the suffix is an archive type + if suffix in _ARCHIVE_EXTRACTORS: + return suffix, suffix, None + + # check if the suffix is a compression + if suffix in _COMPRESSED_FILE_OPENERS: + # check for suffix hierarchy + if len(suffixes) > 1: + suffix2 = suffixes[-2] + + # check if the suffix2 is an archive type + if suffix2 in _ARCHIVE_EXTRACTORS: + return suffix2 + suffix, suffix2, suffix + + return suffix, None, suffix + + valid_suffixes = sorted(set(_FILE_TYPE_ALIASES) | set(_ARCHIVE_EXTRACTORS) | set(_COMPRESSED_FILE_OPENERS)) + raise RuntimeError(f"Unknown compression or archive type: '{suffix}'.\nKnown suffixes are: '{valid_suffixes}'.") + + +def _decompress( + from_path: Union[str, pathlib.Path], + to_path: Optional[Union[str, pathlib.Path]] = None, + remove_finished: bool = False, +) -> pathlib.Path: + r"""Decompress a file. + + The compression is automatically detected from the file name. + + Args: + from_path (str): Path to the file to be decompressed. + to_path (str): Path to the decompressed file. If omitted, ``from_path`` without compression extension is used. + remove_finished (bool): If ``True``, remove the file after the extraction. + + Returns: + (str): Path to the decompressed file. + """ + suffix, archive_type, compression = _detect_file_type(from_path) + if not compression: + raise RuntimeError(f"Couldn't detect a compression from suffix {suffix}.") + + if to_path is None: + to_path = pathlib.Path(os.fspath(from_path).replace(suffix, archive_type if archive_type is not None else "")) + + # We don't need to check for a missing key here, since this was already done in _detect_file_type() + compressed_file_opener = _COMPRESSED_FILE_OPENERS[compression] + + with compressed_file_opener(from_path, "rb") as rfh, open(to_path, "wb") as wfh: + wfh.write(rfh.read()) + + if remove_finished: + os.remove(from_path) + + return pathlib.Path(to_path) + + +def extract_archive( + from_path: Union[str, pathlib.Path], + to_path: Optional[Union[str, pathlib.Path]] = None, + remove_finished: bool = False, +) -> Union[str, pathlib.Path]: + """Extract an archive. + + The archive type and a possible compression is automatically detected from the file name. If the file is compressed + but not an archive the call is dispatched to :func:`decompress`. + + Args: + from_path (str): Path to the file to be extracted. + to_path (str): Path to the directory the file will be extracted to. If omitted, the directory of the file is + used. + remove_finished (bool): If ``True``, remove the file after the extraction. + + Returns: + (str): Path to the directory the file was extracted to. + """ + + def path_or_str(ret_path: pathlib.Path) -> Union[str, pathlib.Path]: + if isinstance(from_path, str): + return os.fspath(ret_path) + else: + return ret_path + + if to_path is None: + to_path = os.path.dirname(from_path) + + suffix, archive_type, compression = _detect_file_type(from_path) + if not archive_type: + ret_path = _decompress( + from_path, + os.path.join(to_path, os.path.basename(from_path).replace(suffix, "")), + remove_finished=remove_finished, + ) + return path_or_str(ret_path) + + # We don't need to check for a missing key here, since this was already done in _detect_file_type() + extractor = _ARCHIVE_EXTRACTORS[archive_type] + + extractor(from_path, to_path, compression) + if remove_finished: + os.remove(from_path) + + return path_or_str(pathlib.Path(to_path)) + + +def download_and_extract_archive( + url: str, + download_root: Union[str, pathlib.Path], + extract_root: Optional[Union[str, pathlib.Path]] = None, + filename: Optional[Union[str, pathlib.Path]] = None, + md5: Optional[str] = None, + remove_finished: bool = False, +) -> None: + download_root = os.path.expanduser(download_root) + if extract_root is None: + extract_root = download_root + if not filename: + filename = os.path.basename(url) + + download_url(url, download_root, filename, md5) + + archive = os.path.join(download_root, filename) + extract_archive(archive, extract_root, remove_finished) + + +def iterable_to_str(iterable: Iterable) -> str: + return "'" + "', '".join([str(item) for item in iterable]) + "'" + + +T = TypeVar("T", str, bytes) + + +def verify_str_arg( + value: T, + arg: Optional[str] = None, + valid_values: Optional[Iterable[T]] = None, + custom_msg: Optional[str] = None, +) -> T: + if not isinstance(value, str): + if arg is None: + msg = "Expected type str, but got type {type}." + else: + msg = "Expected type str for argument {arg}, but got type {type}." + msg = msg.format(type=type(value), arg=arg) + raise ValueError(msg) + + if valid_values is None: + return value + + if value not in valid_values: + if custom_msg is not None: + msg = custom_msg + else: + msg = "Unknown value '{value}' for argument {arg}. Valid values are {{{valid_values}}}." + msg = msg.format(value=value, arg=arg, valid_values=iterable_to_str(valid_values)) + raise ValueError(msg) + + return value + + +def _read_pfm(file_name: Union[str, pathlib.Path], slice_channels: int = 2) -> np.ndarray: + """Read file in .pfm format. Might contain either 1 or 3 channels of data. + + Args: + file_name (str): Path to the file. + slice_channels (int): Number of channels to slice out of the file. + Useful for reading different data formats stored in .pfm files: Optical Flows, Stereo Disparity Maps, etc. + """ + + with open(file_name, "rb") as f: + header = f.readline().rstrip() + if header not in [b"PF", b"Pf"]: + raise ValueError("Invalid PFM file") + + dim_match = re.match(rb"^(\d+)\s(\d+)\s$", f.readline()) + if not dim_match: + raise Exception("Malformed PFM header.") + w, h = (int(dim) for dim in dim_match.groups()) + + scale = float(f.readline().rstrip()) + if scale < 0: # little-endian + endian = "<" + scale = -scale + else: + endian = ">" # big-endian + + data = np.fromfile(f, dtype=endian + "f") + + pfm_channels = 3 if header == b"PF" else 1 + + data = data.reshape(h, w, pfm_channels).transpose(2, 0, 1) + data = np.flip(data, axis=1) # flip on h dimension + data = data[:slice_channels, :, :] + return data.astype(np.float32) + + +def _flip_byte_order(t: torch.Tensor) -> torch.Tensor: + return ( + t.contiguous().view(torch.uint8).view(*t.shape, t.element_size()).flip(-1).view(*t.shape[:-1], -1).view(t.dtype) + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/video_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/video_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..beeebe8acaeaf242bf07ddb8d8ef23bd8dfa6f2f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/video_utils.py @@ -0,0 +1,419 @@ +import bisect +import math +import warnings +from fractions import Fraction +from typing import Any, Callable, cast, Dict, List, Optional, Tuple, TypeVar, Union + +import torch +from torchvision.io import _probe_video_from_file, _read_video_from_file, read_video, read_video_timestamps + +from .utils import tqdm + +T = TypeVar("T") + + +def pts_convert(pts: int, timebase_from: Fraction, timebase_to: Fraction, round_func: Callable = math.floor) -> int: + """convert pts between different time bases + Args: + pts: presentation timestamp, float + timebase_from: original timebase. Fraction + timebase_to: new timebase. Fraction + round_func: rounding function. + """ + new_pts = Fraction(pts, 1) * timebase_from / timebase_to + return round_func(new_pts) + + +def unfold(tensor: torch.Tensor, size: int, step: int, dilation: int = 1) -> torch.Tensor: + """ + similar to tensor.unfold, but with the dilation + and specialized for 1d tensors + + Returns all consecutive windows of `size` elements, with + `step` between windows. The distance between each element + in a window is given by `dilation`. + """ + if tensor.dim() != 1: + raise ValueError(f"tensor should have 1 dimension instead of {tensor.dim()}") + o_stride = tensor.stride(0) + numel = tensor.numel() + new_stride = (step * o_stride, dilation * o_stride) + new_size = ((numel - (dilation * (size - 1) + 1)) // step + 1, size) + if new_size[0] < 1: + new_size = (0, size) + return torch.as_strided(tensor, new_size, new_stride) + + +class _VideoTimestampsDataset: + """ + Dataset used to parallelize the reading of the timestamps + of a list of videos, given their paths in the filesystem. + + Used in VideoClips and defined at top level, so it can be + pickled when forking. + """ + + def __init__(self, video_paths: List[str]) -> None: + self.video_paths = video_paths + + def __len__(self) -> int: + return len(self.video_paths) + + def __getitem__(self, idx: int) -> Tuple[List[int], Optional[float]]: + return read_video_timestamps(self.video_paths[idx]) + + +def _collate_fn(x: T) -> T: + """ + Dummy collate function to be used with _VideoTimestampsDataset + """ + return x + + +class VideoClips: + """ + Given a list of video files, computes all consecutive subvideos of size + `clip_length_in_frames`, where the distance between each subvideo in the + same video is defined by `frames_between_clips`. + If `frame_rate` is specified, it will also resample all the videos to have + the same frame rate, and the clips will refer to this frame rate. + + Creating this instance the first time is time-consuming, as it needs to + decode all the videos in `video_paths`. It is recommended that you + cache the results after instantiation of the class. + + Recreating the clips for different clip lengths is fast, and can be done + with the `compute_clips` method. + + Args: + video_paths (List[str]): paths to the video files + clip_length_in_frames (int): size of a clip in number of frames + frames_between_clips (int): step (in frames) between each clip + frame_rate (float, optional): if specified, it will resample the video + so that it has `frame_rate`, and then the clips will be defined + on the resampled video + num_workers (int): how many subprocesses to use for data loading. + 0 means that the data will be loaded in the main process. (default: 0) + output_format (str): The format of the output video tensors. Can be either "THWC" (default) or "TCHW". + """ + + def __init__( + self, + video_paths: List[str], + clip_length_in_frames: int = 16, + frames_between_clips: int = 1, + frame_rate: Optional[float] = None, + _precomputed_metadata: Optional[Dict[str, Any]] = None, + num_workers: int = 0, + _video_width: int = 0, + _video_height: int = 0, + _video_min_dimension: int = 0, + _video_max_dimension: int = 0, + _audio_samples: int = 0, + _audio_channels: int = 0, + output_format: str = "THWC", + ) -> None: + + self.video_paths = video_paths + self.num_workers = num_workers + + # these options are not valid for pyav backend + self._video_width = _video_width + self._video_height = _video_height + self._video_min_dimension = _video_min_dimension + self._video_max_dimension = _video_max_dimension + self._audio_samples = _audio_samples + self._audio_channels = _audio_channels + self.output_format = output_format.upper() + if self.output_format not in ("THWC", "TCHW"): + raise ValueError(f"output_format should be either 'THWC' or 'TCHW', got {output_format}.") + + if _precomputed_metadata is None: + self._compute_frame_pts() + else: + self._init_from_metadata(_precomputed_metadata) + self.compute_clips(clip_length_in_frames, frames_between_clips, frame_rate) + + def _compute_frame_pts(self) -> None: + self.video_pts = [] # len = num_videos. Each entry is a tensor of shape (num_frames_in_video,) + self.video_fps: List[float] = [] # len = num_videos + + # strategy: use a DataLoader to parallelize read_video_timestamps + # so need to create a dummy dataset first + import torch.utils.data + + dl: torch.utils.data.DataLoader = torch.utils.data.DataLoader( + _VideoTimestampsDataset(self.video_paths), # type: ignore[arg-type] + batch_size=16, + num_workers=self.num_workers, + collate_fn=_collate_fn, + ) + + with tqdm(total=len(dl)) as pbar: + for batch in dl: + pbar.update(1) + batch_pts, batch_fps = list(zip(*batch)) + # we need to specify dtype=torch.long because for empty list, + # torch.as_tensor will use torch.float as default dtype. This + # happens when decoding fails and no pts is returned in the list. + batch_pts = [torch.as_tensor(pts, dtype=torch.long) for pts in batch_pts] + self.video_pts.extend(batch_pts) + self.video_fps.extend(batch_fps) + + def _init_from_metadata(self, metadata: Dict[str, Any]) -> None: + self.video_paths = metadata["video_paths"] + assert len(self.video_paths) == len(metadata["video_pts"]) + self.video_pts = metadata["video_pts"] + assert len(self.video_paths) == len(metadata["video_fps"]) + self.video_fps = metadata["video_fps"] + + @property + def metadata(self) -> Dict[str, Any]: + _metadata = { + "video_paths": self.video_paths, + "video_pts": self.video_pts, + "video_fps": self.video_fps, + } + return _metadata + + def subset(self, indices: List[int]) -> "VideoClips": + video_paths = [self.video_paths[i] for i in indices] + video_pts = [self.video_pts[i] for i in indices] + video_fps = [self.video_fps[i] for i in indices] + metadata = { + "video_paths": video_paths, + "video_pts": video_pts, + "video_fps": video_fps, + } + return type(self)( + video_paths, + clip_length_in_frames=self.num_frames, + frames_between_clips=self.step, + frame_rate=self.frame_rate, + _precomputed_metadata=metadata, + num_workers=self.num_workers, + _video_width=self._video_width, + _video_height=self._video_height, + _video_min_dimension=self._video_min_dimension, + _video_max_dimension=self._video_max_dimension, + _audio_samples=self._audio_samples, + _audio_channels=self._audio_channels, + output_format=self.output_format, + ) + + @staticmethod + def compute_clips_for_video( + video_pts: torch.Tensor, num_frames: int, step: int, fps: Optional[float], frame_rate: Optional[float] = None + ) -> Tuple[torch.Tensor, Union[List[slice], torch.Tensor]]: + if fps is None: + # if for some reason the video doesn't have fps (because doesn't have a video stream) + # set the fps to 1. The value doesn't matter, because video_pts is empty anyway + fps = 1 + if frame_rate is None: + frame_rate = fps + total_frames = len(video_pts) * frame_rate / fps + _idxs = VideoClips._resample_video_idx(int(math.floor(total_frames)), fps, frame_rate) + video_pts = video_pts[_idxs] + clips = unfold(video_pts, num_frames, step) + if not clips.numel(): + warnings.warn( + "There aren't enough frames in the current video to get a clip for the given clip length and " + "frames between clips. The video (and potentially others) will be skipped." + ) + idxs: Union[List[slice], torch.Tensor] + if isinstance(_idxs, slice): + idxs = [_idxs] * len(clips) + else: + idxs = unfold(_idxs, num_frames, step) + return clips, idxs + + def compute_clips(self, num_frames: int, step: int, frame_rate: Optional[float] = None) -> None: + """ + Compute all consecutive sequences of clips from video_pts. + Always returns clips of size `num_frames`, meaning that the + last few frames in a video can potentially be dropped. + + Args: + num_frames (int): number of frames for the clip + step (int): distance between two clips + frame_rate (int, optional): The frame rate + """ + self.num_frames = num_frames + self.step = step + self.frame_rate = frame_rate + self.clips = [] + self.resampling_idxs = [] + for video_pts, fps in zip(self.video_pts, self.video_fps): + clips, idxs = self.compute_clips_for_video(video_pts, num_frames, step, fps, frame_rate) + self.clips.append(clips) + self.resampling_idxs.append(idxs) + clip_lengths = torch.as_tensor([len(v) for v in self.clips]) + self.cumulative_sizes = clip_lengths.cumsum(0).tolist() + + def __len__(self) -> int: + return self.num_clips() + + def num_videos(self) -> int: + return len(self.video_paths) + + def num_clips(self) -> int: + """ + Number of subclips that are available in the video list. + """ + return self.cumulative_sizes[-1] + + def get_clip_location(self, idx: int) -> Tuple[int, int]: + """ + Converts a flattened representation of the indices into a video_idx, clip_idx + representation. + """ + video_idx = bisect.bisect_right(self.cumulative_sizes, idx) + if video_idx == 0: + clip_idx = idx + else: + clip_idx = idx - self.cumulative_sizes[video_idx - 1] + return video_idx, clip_idx + + @staticmethod + def _resample_video_idx(num_frames: int, original_fps: float, new_fps: float) -> Union[slice, torch.Tensor]: + step = original_fps / new_fps + if step.is_integer(): + # optimization: if step is integer, don't need to perform + # advanced indexing + step = int(step) + return slice(None, None, step) + idxs = torch.arange(num_frames, dtype=torch.float32) * step + idxs = idxs.floor().to(torch.int64) + return idxs + + def get_clip(self, idx: int) -> Tuple[torch.Tensor, torch.Tensor, Dict[str, Any], int]: + """ + Gets a subclip from a list of videos. + + Args: + idx (int): index of the subclip. Must be between 0 and num_clips(). + + Returns: + video (Tensor) + audio (Tensor) + info (Dict) + video_idx (int): index of the video in `video_paths` + """ + if idx >= self.num_clips(): + raise IndexError(f"Index {idx} out of range ({self.num_clips()} number of clips)") + video_idx, clip_idx = self.get_clip_location(idx) + video_path = self.video_paths[video_idx] + clip_pts = self.clips[video_idx][clip_idx] + + from torchvision import get_video_backend + + backend = get_video_backend() + + if backend == "pyav": + # check for invalid options + if self._video_width != 0: + raise ValueError("pyav backend doesn't support _video_width != 0") + if self._video_height != 0: + raise ValueError("pyav backend doesn't support _video_height != 0") + if self._video_min_dimension != 0: + raise ValueError("pyav backend doesn't support _video_min_dimension != 0") + if self._video_max_dimension != 0: + raise ValueError("pyav backend doesn't support _video_max_dimension != 0") + if self._audio_samples != 0: + raise ValueError("pyav backend doesn't support _audio_samples != 0") + + if backend == "pyav": + start_pts = clip_pts[0].item() + end_pts = clip_pts[-1].item() + video, audio, info = read_video(video_path, start_pts, end_pts) + else: + _info = _probe_video_from_file(video_path) + video_fps = _info.video_fps + audio_fps = None + + video_start_pts = cast(int, clip_pts[0].item()) + video_end_pts = cast(int, clip_pts[-1].item()) + + audio_start_pts, audio_end_pts = 0, -1 + audio_timebase = Fraction(0, 1) + video_timebase = Fraction(_info.video_timebase.numerator, _info.video_timebase.denominator) + if _info.has_audio: + audio_timebase = Fraction(_info.audio_timebase.numerator, _info.audio_timebase.denominator) + audio_start_pts = pts_convert(video_start_pts, video_timebase, audio_timebase, math.floor) + audio_end_pts = pts_convert(video_end_pts, video_timebase, audio_timebase, math.ceil) + audio_fps = _info.audio_sample_rate + video, audio, _ = _read_video_from_file( + video_path, + video_width=self._video_width, + video_height=self._video_height, + video_min_dimension=self._video_min_dimension, + video_max_dimension=self._video_max_dimension, + video_pts_range=(video_start_pts, video_end_pts), + video_timebase=video_timebase, + audio_samples=self._audio_samples, + audio_channels=self._audio_channels, + audio_pts_range=(audio_start_pts, audio_end_pts), + audio_timebase=audio_timebase, + ) + + info = {"video_fps": video_fps} + if audio_fps is not None: + info["audio_fps"] = audio_fps + + if self.frame_rate is not None: + resampling_idx = self.resampling_idxs[video_idx][clip_idx] + if isinstance(resampling_idx, torch.Tensor): + resampling_idx = resampling_idx - resampling_idx[0] + video = video[resampling_idx] + info["video_fps"] = self.frame_rate + assert len(video) == self.num_frames, f"{video.shape} x {self.num_frames}" + + if self.output_format == "TCHW": + # [T,H,W,C] --> [T,C,H,W] + video = video.permute(0, 3, 1, 2) + + return video, audio, info, video_idx + + def __getstate__(self) -> Dict[str, Any]: + video_pts_sizes = [len(v) for v in self.video_pts] + # To be back-compatible, we convert data to dtype torch.long as needed + # because for empty list, in legacy implementation, torch.as_tensor will + # use torch.float as default dtype. This happens when decoding fails and + # no pts is returned in the list. + video_pts = [x.to(torch.int64) for x in self.video_pts] + # video_pts can be an empty list if no frames have been decoded + if video_pts: + video_pts = torch.cat(video_pts) # type: ignore[assignment] + # avoid bug in https://github.com/pytorch/pytorch/issues/32351 + # TODO: Revert it once the bug is fixed. + video_pts = video_pts.numpy() # type: ignore[attr-defined] + + # make a copy of the fields of self + d = self.__dict__.copy() + d["video_pts_sizes"] = video_pts_sizes + d["video_pts"] = video_pts + # delete the following attributes to reduce the size of dictionary. They + # will be re-computed in "__setstate__()" + del d["clips"] + del d["resampling_idxs"] + del d["cumulative_sizes"] + + # for backwards-compatibility + d["_version"] = 2 + return d + + def __setstate__(self, d: Dict[str, Any]) -> None: + # for backwards-compatibility + if "_version" not in d: + self.__dict__ = d + return + + video_pts = torch.as_tensor(d["video_pts"], dtype=torch.int64) + video_pts = torch.split(video_pts, d["video_pts_sizes"], dim=0) + # don't need this info anymore + del d["video_pts_sizes"] + + d["video_pts"] = video_pts + self.__dict__ = d + # recompute attributes "clips", "resampling_idxs" and other derivative ones + self.compute_clips(self.num_frames, self.step, self.frame_rate) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/vision.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/vision.py new file mode 100644 index 0000000000000000000000000000000000000000..e54c8a3df75f19dfbdf11988faf2ff0d941a6401 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/vision.py @@ -0,0 +1,111 @@ +import os +from pathlib import Path +from typing import Any, Callable, List, Optional, Tuple, Union + +import torch.utils.data as data + +from ..utils import _log_api_usage_once + + +class VisionDataset(data.Dataset): + """ + Base Class For making datasets which are compatible with torchvision. + It is necessary to override the ``__getitem__`` and ``__len__`` method. + + Args: + root (string, optional): Root directory of dataset. Only used for `__repr__`. + transforms (callable, optional): A function/transforms that takes in + an image and a label and returns the transformed versions of both. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + + .. note:: + + :attr:`transforms` and the combination of :attr:`transform` and :attr:`target_transform` are mutually exclusive. + """ + + _repr_indent = 4 + + def __init__( + self, + root: Union[str, Path] = None, # type: ignore[assignment] + transforms: Optional[Callable] = None, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + ) -> None: + _log_api_usage_once(self) + if isinstance(root, str): + root = os.path.expanduser(root) + self.root = root + + has_transforms = transforms is not None + has_separate_transform = transform is not None or target_transform is not None + if has_transforms and has_separate_transform: + raise ValueError("Only transforms or transform/target_transform can be passed as argument") + + # for backwards-compatibility + self.transform = transform + self.target_transform = target_transform + + if has_separate_transform: + transforms = StandardTransform(transform, target_transform) + self.transforms = transforms + + def __getitem__(self, index: int) -> Any: + """ + Args: + index (int): Index + + Returns: + (Any): Sample and meta data, optionally transformed by the respective transforms. + """ + raise NotImplementedError + + def __len__(self) -> int: + raise NotImplementedError + + def __repr__(self) -> str: + head = "Dataset " + self.__class__.__name__ + body = [f"Number of datapoints: {self.__len__()}"] + if self.root is not None: + body.append(f"Root location: {self.root}") + body += self.extra_repr().splitlines() + if hasattr(self, "transforms") and self.transforms is not None: + body += [repr(self.transforms)] + lines = [head] + [" " * self._repr_indent + line for line in body] + return "\n".join(lines) + + def _format_transform_repr(self, transform: Callable, head: str) -> List[str]: + lines = transform.__repr__().splitlines() + return [f"{head}{lines[0]}"] + ["{}{}".format(" " * len(head), line) for line in lines[1:]] + + def extra_repr(self) -> str: + return "" + + +class StandardTransform: + def __init__(self, transform: Optional[Callable] = None, target_transform: Optional[Callable] = None) -> None: + self.transform = transform + self.target_transform = target_transform + + def __call__(self, input: Any, target: Any) -> Tuple[Any, Any]: + if self.transform is not None: + input = self.transform(input) + if self.target_transform is not None: + target = self.target_transform(target) + return input, target + + def _format_transform_repr(self, transform: Callable, head: str) -> List[str]: + lines = transform.__repr__().splitlines() + return [f"{head}{lines[0]}"] + ["{}{}".format(" " * len(head), line) for line in lines[1:]] + + def __repr__(self) -> str: + body = [self.__class__.__name__] + if self.transform is not None: + body += self._format_transform_repr(self.transform, "Transform: ") + if self.target_transform is not None: + body += self._format_transform_repr(self.target_transform, "Target transform: ") + + return "\n".join(body) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/voc.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/voc.py new file mode 100644 index 0000000000000000000000000000000000000000..d81799428b4633e23ff157be08bce32ee3e4c242 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/voc.py @@ -0,0 +1,224 @@ +import collections +import os +from pathlib import Path +from typing import Any, Callable, Dict, List, Optional, Tuple, Union +from xml.etree.ElementTree import Element as ET_Element + +try: + from defusedxml.ElementTree import parse as ET_parse +except ImportError: + from xml.etree.ElementTree import parse as ET_parse + +from PIL import Image + +from .utils import download_and_extract_archive, verify_str_arg +from .vision import VisionDataset + +DATASET_YEAR_DICT = { + "2012": { + "url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2012/VOCtrainval_11-May-2012.tar", + "filename": "VOCtrainval_11-May-2012.tar", + "md5": "6cd6e144f989b92b3379bac3b3de84fd", + "base_dir": os.path.join("VOCdevkit", "VOC2012"), + }, + "2011": { + "url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2011/VOCtrainval_25-May-2011.tar", + "filename": "VOCtrainval_25-May-2011.tar", + "md5": "6c3384ef61512963050cb5d687e5bf1e", + "base_dir": os.path.join("TrainVal", "VOCdevkit", "VOC2011"), + }, + "2010": { + "url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2010/VOCtrainval_03-May-2010.tar", + "filename": "VOCtrainval_03-May-2010.tar", + "md5": "da459979d0c395079b5c75ee67908abb", + "base_dir": os.path.join("VOCdevkit", "VOC2010"), + }, + "2009": { + "url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2009/VOCtrainval_11-May-2009.tar", + "filename": "VOCtrainval_11-May-2009.tar", + "md5": "a3e00b113cfcfebf17e343f59da3caa1", + "base_dir": os.path.join("VOCdevkit", "VOC2009"), + }, + "2008": { + "url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2008/VOCtrainval_14-Jul-2008.tar", + "filename": "VOCtrainval_11-May-2012.tar", + "md5": "2629fa636546599198acfcfbfcf1904a", + "base_dir": os.path.join("VOCdevkit", "VOC2008"), + }, + "2007": { + "url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtrainval_06-Nov-2007.tar", + "filename": "VOCtrainval_06-Nov-2007.tar", + "md5": "c52e279531787c972589f7e41ab4ae64", + "base_dir": os.path.join("VOCdevkit", "VOC2007"), + }, + "2007-test": { + "url": "http://host.robots.ox.ac.uk/pascal/VOC/voc2007/VOCtest_06-Nov-2007.tar", + "filename": "VOCtest_06-Nov-2007.tar", + "md5": "b6e924de25625d8de591ea690078ad9f", + "base_dir": os.path.join("VOCdevkit", "VOC2007"), + }, +} + + +class _VOCBase(VisionDataset): + _SPLITS_DIR: str + _TARGET_DIR: str + _TARGET_FILE_EXT: str + + def __init__( + self, + root: Union[str, Path], + year: str = "2012", + image_set: str = "train", + download: bool = False, + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + transforms: Optional[Callable] = None, + ): + super().__init__(root, transforms, transform, target_transform) + + self.year = verify_str_arg(year, "year", valid_values=[str(yr) for yr in range(2007, 2013)]) + + valid_image_sets = ["train", "trainval", "val"] + if year == "2007": + valid_image_sets.append("test") + self.image_set = verify_str_arg(image_set, "image_set", valid_image_sets) + + key = "2007-test" if year == "2007" and image_set == "test" else year + dataset_year_dict = DATASET_YEAR_DICT[key] + + self.url = dataset_year_dict["url"] + self.filename = dataset_year_dict["filename"] + self.md5 = dataset_year_dict["md5"] + + base_dir = dataset_year_dict["base_dir"] + voc_root = os.path.join(self.root, base_dir) + + if download: + download_and_extract_archive(self.url, self.root, filename=self.filename, md5=self.md5) + + if not os.path.isdir(voc_root): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download it") + + splits_dir = os.path.join(voc_root, "ImageSets", self._SPLITS_DIR) + split_f = os.path.join(splits_dir, image_set.rstrip("\n") + ".txt") + with open(os.path.join(split_f)) as f: + file_names = [x.strip() for x in f.readlines()] + + image_dir = os.path.join(voc_root, "JPEGImages") + self.images = [os.path.join(image_dir, x + ".jpg") for x in file_names] + + target_dir = os.path.join(voc_root, self._TARGET_DIR) + self.targets = [os.path.join(target_dir, x + self._TARGET_FILE_EXT) for x in file_names] + + assert len(self.images) == len(self.targets) + + def __len__(self) -> int: + return len(self.images) + + +class VOCSegmentation(_VOCBase): + """`Pascal VOC `_ Segmentation Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of the VOC Dataset. + year (string, optional): The dataset year, supports years ``"2007"`` to ``"2012"``. + image_set (string, optional): Select the image_set to use, ``"train"``, ``"trainval"`` or ``"val"``. If + ``year=="2007"``, can also be ``"test"``. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. + """ + + _SPLITS_DIR = "Segmentation" + _TARGET_DIR = "SegmentationClass" + _TARGET_FILE_EXT = ".png" + + @property + def masks(self) -> List[str]: + return self.targets + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is the image segmentation. + """ + img = Image.open(self.images[index]).convert("RGB") + target = Image.open(self.masks[index]) + + if self.transforms is not None: + img, target = self.transforms(img, target) + + return img, target + + +class VOCDetection(_VOCBase): + """`Pascal VOC `_ Detection Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory of the VOC Dataset. + year (string, optional): The dataset year, supports years ``"2007"`` to ``"2012"``. + image_set (string, optional): Select the image_set to use, ``"train"``, ``"trainval"`` or ``"val"``. If + ``year=="2007"``, can also be ``"test"``. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + (default: alphabetic indexing of VOC's 20 classes). + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, required): A function/transform that takes in the + target and transforms it. + transforms (callable, optional): A function/transform that takes input sample and its target as entry + and returns a transformed version. + """ + + _SPLITS_DIR = "Main" + _TARGET_DIR = "Annotations" + _TARGET_FILE_EXT = ".xml" + + @property + def annotations(self) -> List[str]: + return self.targets + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is a dictionary of the XML tree. + """ + img = Image.open(self.images[index]).convert("RGB") + target = self.parse_voc_xml(ET_parse(self.annotations[index]).getroot()) + + if self.transforms is not None: + img, target = self.transforms(img, target) + + return img, target + + @staticmethod + def parse_voc_xml(node: ET_Element) -> Dict[str, Any]: + voc_dict: Dict[str, Any] = {} + children = list(node) + if children: + def_dic: Dict[str, Any] = collections.defaultdict(list) + for dc in map(VOCDetection.parse_voc_xml, children): + for ind, v in dc.items(): + def_dic[ind].append(v) + if node.tag == "annotation": + def_dic["object"] = [def_dic["object"]] + voc_dict = {node.tag: {ind: v[0] if len(v) == 1 else v for ind, v in def_dic.items()}} + if node.text: + text = node.text.strip() + if not children: + voc_dict[node.tag] = text + return voc_dict diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/widerface.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/widerface.py new file mode 100644 index 0000000000000000000000000000000000000000..201caafa92a8ab1fea909335ec16cf087bedb1ca --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/datasets/widerface.py @@ -0,0 +1,196 @@ +import os +from os.path import abspath, expanduser +from pathlib import Path + +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +import torch +from PIL import Image + +from .utils import download_and_extract_archive, download_file_from_google_drive, extract_archive, verify_str_arg +from .vision import VisionDataset + + +class WIDERFace(VisionDataset): + """`WIDERFace `_ Dataset. + + Args: + root (str or ``pathlib.Path``): Root directory where images and annotations are downloaded to. + Expects the following folder structure if download=False: + + .. code:: + + + └── widerface + ├── wider_face_split ('wider_face_split.zip' if compressed) + ├── WIDER_train ('WIDER_train.zip' if compressed) + ├── WIDER_val ('WIDER_val.zip' if compressed) + └── WIDER_test ('WIDER_test.zip' if compressed) + split (string): The dataset split to use. One of {``train``, ``val``, ``test``}. + Defaults to ``train``. + transform (callable, optional): A function/transform that takes in a PIL image + and returns a transformed version. E.g, ``transforms.RandomCrop`` + target_transform (callable, optional): A function/transform that takes in the + target and transforms it. + download (bool, optional): If true, downloads the dataset from the internet and + puts it in root directory. If dataset is already downloaded, it is not + downloaded again. + + .. warning:: + + To download the dataset `gdown `_ is required. + + """ + + BASE_FOLDER = "widerface" + FILE_LIST = [ + # File ID MD5 Hash Filename + ("15hGDLhsx8bLgLcIRD5DhYt5iBxnjNF1M", "3fedf70df600953d25982bcd13d91ba2", "WIDER_train.zip"), + ("1GUCogbp16PMGa39thoMMeWxp7Rp5oM8Q", "dfa7d7e790efa35df3788964cf0bbaea", "WIDER_val.zip"), + ("1HIfDbVEWKmsYKJZm4lchTBDLW5N7dY5T", "e5d8f4248ed24c334bbd12f49c29dd40", "WIDER_test.zip"), + ] + ANNOTATIONS_FILE = ( + "http://shuoyang1213.me/WIDERFACE/support/bbx_annotation/wider_face_split.zip", + "0e3767bcf0e326556d407bf5bff5d27c", + "wider_face_split.zip", + ) + + def __init__( + self, + root: Union[str, Path], + split: str = "train", + transform: Optional[Callable] = None, + target_transform: Optional[Callable] = None, + download: bool = False, + ) -> None: + super().__init__( + root=os.path.join(root, self.BASE_FOLDER), transform=transform, target_transform=target_transform + ) + # check arguments + self.split = verify_str_arg(split, "split", ("train", "val", "test")) + + if download: + self.download() + + if not self._check_integrity(): + raise RuntimeError("Dataset not found or corrupted. You can use download=True to download and prepare it") + + self.img_info: List[Dict[str, Union[str, Dict[str, torch.Tensor]]]] = [] + if self.split in ("train", "val"): + self.parse_train_val_annotations_file() + else: + self.parse_test_annotations_file() + + def __getitem__(self, index: int) -> Tuple[Any, Any]: + """ + Args: + index (int): Index + + Returns: + tuple: (image, target) where target is a dict of annotations for all faces in the image. + target=None for the test split. + """ + + # stay consistent with other datasets and return a PIL Image + img = Image.open(self.img_info[index]["img_path"]) # type: ignore[arg-type] + + if self.transform is not None: + img = self.transform(img) + + target = None if self.split == "test" else self.img_info[index]["annotations"] + if self.target_transform is not None: + target = self.target_transform(target) + + return img, target + + def __len__(self) -> int: + return len(self.img_info) + + def extra_repr(self) -> str: + lines = ["Split: {split}"] + return "\n".join(lines).format(**self.__dict__) + + def parse_train_val_annotations_file(self) -> None: + filename = "wider_face_train_bbx_gt.txt" if self.split == "train" else "wider_face_val_bbx_gt.txt" + filepath = os.path.join(self.root, "wider_face_split", filename) + + with open(filepath) as f: + lines = f.readlines() + file_name_line, num_boxes_line, box_annotation_line = True, False, False + num_boxes, box_counter = 0, 0 + labels = [] + for line in lines: + line = line.rstrip() + if file_name_line: + img_path = os.path.join(self.root, "WIDER_" + self.split, "images", line) + img_path = abspath(expanduser(img_path)) + file_name_line = False + num_boxes_line = True + elif num_boxes_line: + num_boxes = int(line) + num_boxes_line = False + box_annotation_line = True + elif box_annotation_line: + box_counter += 1 + line_split = line.split(" ") + line_values = [int(x) for x in line_split] + labels.append(line_values) + if box_counter >= num_boxes: + box_annotation_line = False + file_name_line = True + labels_tensor = torch.tensor(labels) + self.img_info.append( + { + "img_path": img_path, + "annotations": { + "bbox": labels_tensor[:, 0:4].clone(), # x, y, width, height + "blur": labels_tensor[:, 4].clone(), + "expression": labels_tensor[:, 5].clone(), + "illumination": labels_tensor[:, 6].clone(), + "occlusion": labels_tensor[:, 7].clone(), + "pose": labels_tensor[:, 8].clone(), + "invalid": labels_tensor[:, 9].clone(), + }, + } + ) + box_counter = 0 + labels.clear() + else: + raise RuntimeError(f"Error parsing annotation file {filepath}") + + def parse_test_annotations_file(self) -> None: + filepath = os.path.join(self.root, "wider_face_split", "wider_face_test_filelist.txt") + filepath = abspath(expanduser(filepath)) + with open(filepath) as f: + lines = f.readlines() + for line in lines: + line = line.rstrip() + img_path = os.path.join(self.root, "WIDER_test", "images", line) + img_path = abspath(expanduser(img_path)) + self.img_info.append({"img_path": img_path}) + + def _check_integrity(self) -> bool: + # Allow original archive to be deleted (zip). Only need the extracted images + all_files = self.FILE_LIST.copy() + all_files.append(self.ANNOTATIONS_FILE) + for (_, md5, filename) in all_files: + file, ext = os.path.splitext(filename) + extracted_dir = os.path.join(self.root, file) + if not os.path.exists(extracted_dir): + return False + return True + + def download(self) -> None: + if self._check_integrity(): + return + + # download and extract image data + for (file_id, md5, filename) in self.FILE_LIST: + download_file_from_google_drive(file_id, self.root, filename, md5) + filepath = os.path.join(self.root, filename) + extract_archive(filepath) + + # download and extract annotation files + download_and_extract_archive( + url=self.ANNOTATIONS_FILE[0], download_root=self.root, md5=self.ANNOTATIONS_FILE[1] + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..693e09c70e530b8a7bc989e16bef7549493ff615 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__init__.py @@ -0,0 +1,73 @@ +try: + from ._load_gpu_decoder import _HAS_GPU_VIDEO_DECODER +except ModuleNotFoundError: + _HAS_GPU_VIDEO_DECODER = False + +from ._video_opt import ( + _HAS_CPU_VIDEO_DECODER, + _HAS_VIDEO_OPT, + _probe_video_from_file, + _probe_video_from_memory, + _read_video_from_file, + _read_video_from_memory, + _read_video_timestamps_from_file, + _read_video_timestamps_from_memory, + Timebase, + VideoMetaData, +) +from .image import ( + decode_avif, + decode_gif, + decode_heic, + decode_image, + decode_jpeg, + decode_png, + decode_webp, + encode_jpeg, + encode_png, + ImageReadMode, + read_file, + read_image, + write_file, + write_jpeg, + write_png, +) +from .video import read_video, read_video_timestamps, write_video +from .video_reader import VideoReader + + +__all__ = [ + "write_video", + "read_video", + "read_video_timestamps", + "_read_video_from_file", + "_read_video_timestamps_from_file", + "_probe_video_from_file", + "_read_video_from_memory", + "_read_video_timestamps_from_memory", + "_probe_video_from_memory", + "_HAS_CPU_VIDEO_DECODER", + "_HAS_VIDEO_OPT", + "_HAS_GPU_VIDEO_DECODER", + "_read_video_clip_from_memory", + "_read_video_meta_data", + "VideoMetaData", + "Timebase", + "ImageReadMode", + "decode_image", + "decode_jpeg", + "decode_png", + "decode_avif", + "decode_heic", + "decode_webp", + "decode_gif", + "encode_jpeg", + "encode_png", + "read_file", + "read_image", + "write_file", + "write_jpeg", + "write_png", + "Video", + "VideoReader", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..475fbdbb2225db9729657f35aa036d445651d9b9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/_load_gpu_decoder.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/_load_gpu_decoder.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ed56bc5a0490739b880cec771c39e2350e95abff Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/_load_gpu_decoder.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/_video_opt.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/_video_opt.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81348910c866f40103c98a1dfc2987f939e4d8b2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/_video_opt.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/image.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/image.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66c42aadea7cfe806cc9a00495523777b0c67a46 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/image.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/video.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/video.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46e13356a68d482641bc119fcb0bb0d9ebf7fbb0 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/video.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/video_reader.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/video_reader.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0f8bc239505ee6366ecea058fae7146ae854f265 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/__pycache__/video_reader.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/_load_gpu_decoder.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/_load_gpu_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..dcff731257c7f24c3b82f9430b7ead73dde7798a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/_load_gpu_decoder.py @@ -0,0 +1,8 @@ +from ..extension import _load_library + + +try: + _load_library("gpu_decoder") + _HAS_GPU_VIDEO_DECODER = True +except (ImportError, OSError): + _HAS_GPU_VIDEO_DECODER = False diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/_video_opt.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/_video_opt.py new file mode 100644 index 0000000000000000000000000000000000000000..8b3e4b172062f714dfdb10c8535bd5befee8c72b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/_video_opt.py @@ -0,0 +1,513 @@ +import math +import warnings +from fractions import Fraction +from typing import Dict, List, Optional, Tuple, Union + +import torch + +from ..extension import _load_library + + +try: + _load_library("video_reader") + _HAS_CPU_VIDEO_DECODER = True +except (ImportError, OSError): + _HAS_CPU_VIDEO_DECODER = False + +_HAS_VIDEO_OPT = _HAS_CPU_VIDEO_DECODER # For BC +default_timebase = Fraction(0, 1) + + +# simple class for torch scripting +# the complex Fraction class from fractions module is not scriptable +class Timebase: + __annotations__ = {"numerator": int, "denominator": int} + __slots__ = ["numerator", "denominator"] + + def __init__( + self, + numerator: int, + denominator: int, + ) -> None: + self.numerator = numerator + self.denominator = denominator + + +class VideoMetaData: + __annotations__ = { + "has_video": bool, + "video_timebase": Timebase, + "video_duration": float, + "video_fps": float, + "has_audio": bool, + "audio_timebase": Timebase, + "audio_duration": float, + "audio_sample_rate": float, + } + __slots__ = [ + "has_video", + "video_timebase", + "video_duration", + "video_fps", + "has_audio", + "audio_timebase", + "audio_duration", + "audio_sample_rate", + ] + + def __init__(self) -> None: + self.has_video = False + self.video_timebase = Timebase(0, 1) + self.video_duration = 0.0 + self.video_fps = 0.0 + self.has_audio = False + self.audio_timebase = Timebase(0, 1) + self.audio_duration = 0.0 + self.audio_sample_rate = 0.0 + + +def _validate_pts(pts_range: Tuple[int, int]) -> None: + + if pts_range[0] > pts_range[1] > 0: + raise ValueError( + f"Start pts should not be smaller than end pts, got start pts: {pts_range[0]} and end pts: {pts_range[1]}" + ) + + +def _fill_info( + vtimebase: torch.Tensor, + vfps: torch.Tensor, + vduration: torch.Tensor, + atimebase: torch.Tensor, + asample_rate: torch.Tensor, + aduration: torch.Tensor, +) -> VideoMetaData: + """ + Build update VideoMetaData struct with info about the video + """ + meta = VideoMetaData() + if vtimebase.numel() > 0: + meta.video_timebase = Timebase(int(vtimebase[0].item()), int(vtimebase[1].item())) + timebase = vtimebase[0].item() / float(vtimebase[1].item()) + if vduration.numel() > 0: + meta.has_video = True + meta.video_duration = float(vduration.item()) * timebase + if vfps.numel() > 0: + meta.video_fps = float(vfps.item()) + if atimebase.numel() > 0: + meta.audio_timebase = Timebase(int(atimebase[0].item()), int(atimebase[1].item())) + timebase = atimebase[0].item() / float(atimebase[1].item()) + if aduration.numel() > 0: + meta.has_audio = True + meta.audio_duration = float(aduration.item()) * timebase + if asample_rate.numel() > 0: + meta.audio_sample_rate = float(asample_rate.item()) + + return meta + + +def _align_audio_frames( + aframes: torch.Tensor, aframe_pts: torch.Tensor, audio_pts_range: Tuple[int, int] +) -> torch.Tensor: + start, end = aframe_pts[0], aframe_pts[-1] + num_samples = aframes.size(0) + step_per_aframe = float(end - start + 1) / float(num_samples) + s_idx = 0 + e_idx = num_samples + if start < audio_pts_range[0]: + s_idx = int((audio_pts_range[0] - start) / step_per_aframe) + if audio_pts_range[1] != -1 and end > audio_pts_range[1]: + e_idx = int((audio_pts_range[1] - end) / step_per_aframe) + return aframes[s_idx:e_idx, :] + + +def _read_video_from_file( + filename: str, + seek_frame_margin: float = 0.25, + read_video_stream: bool = True, + video_width: int = 0, + video_height: int = 0, + video_min_dimension: int = 0, + video_max_dimension: int = 0, + video_pts_range: Tuple[int, int] = (0, -1), + video_timebase: Fraction = default_timebase, + read_audio_stream: bool = True, + audio_samples: int = 0, + audio_channels: int = 0, + audio_pts_range: Tuple[int, int] = (0, -1), + audio_timebase: Fraction = default_timebase, +) -> Tuple[torch.Tensor, torch.Tensor, VideoMetaData]: + """ + Reads a video from a file, returning both the video frames and the audio frames + + Args: + filename (str): path to the video file + seek_frame_margin (double, optional): seeking frame in the stream is imprecise. Thus, + when video_start_pts is specified, we seek the pts earlier by seek_frame_margin seconds + read_video_stream (int, optional): whether read video stream. If yes, set to 1. Otherwise, 0 + video_width/video_height/video_min_dimension/video_max_dimension (int): together decide + the size of decoded frames: + + - When video_width = 0, video_height = 0, video_min_dimension = 0, + and video_max_dimension = 0, keep the original frame resolution + - When video_width = 0, video_height = 0, video_min_dimension != 0, + and video_max_dimension = 0, keep the aspect ratio and resize the + frame so that shorter edge size is video_min_dimension + - When video_width = 0, video_height = 0, video_min_dimension = 0, + and video_max_dimension != 0, keep the aspect ratio and resize + the frame so that longer edge size is video_max_dimension + - When video_width = 0, video_height = 0, video_min_dimension != 0, + and video_max_dimension != 0, resize the frame so that shorter + edge size is video_min_dimension, and longer edge size is + video_max_dimension. The aspect ratio may not be preserved + - When video_width = 0, video_height != 0, video_min_dimension = 0, + and video_max_dimension = 0, keep the aspect ratio and resize + the frame so that frame video_height is $video_height + - When video_width != 0, video_height == 0, video_min_dimension = 0, + and video_max_dimension = 0, keep the aspect ratio and resize + the frame so that frame video_width is $video_width + - When video_width != 0, video_height != 0, video_min_dimension = 0, + and video_max_dimension = 0, resize the frame so that frame + video_width and video_height are set to $video_width and + $video_height, respectively + video_pts_range (list(int), optional): the start and end presentation timestamp of video stream + video_timebase (Fraction, optional): a Fraction rational number which denotes timebase in video stream + read_audio_stream (int, optional): whether read audio stream. If yes, set to 1. Otherwise, 0 + audio_samples (int, optional): audio sampling rate + audio_channels (int optional): audio channels + audio_pts_range (list(int), optional): the start and end presentation timestamp of audio stream + audio_timebase (Fraction, optional): a Fraction rational number which denotes time base in audio stream + + Returns + vframes (Tensor[T, H, W, C]): the `T` video frames + aframes (Tensor[L, K]): the audio frames, where `L` is the number of points and + `K` is the number of audio_channels + info (Dict): metadata for the video and audio. Can contain the fields video_fps (float) + and audio_fps (int) + """ + _validate_pts(video_pts_range) + _validate_pts(audio_pts_range) + + result = torch.ops.video_reader.read_video_from_file( + filename, + seek_frame_margin, + 0, # getPtsOnly + read_video_stream, + video_width, + video_height, + video_min_dimension, + video_max_dimension, + video_pts_range[0], + video_pts_range[1], + video_timebase.numerator, + video_timebase.denominator, + read_audio_stream, + audio_samples, + audio_channels, + audio_pts_range[0], + audio_pts_range[1], + audio_timebase.numerator, + audio_timebase.denominator, + ) + vframes, _vframe_pts, vtimebase, vfps, vduration, aframes, aframe_pts, atimebase, asample_rate, aduration = result + info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) + if aframes.numel() > 0: + # when audio stream is found + aframes = _align_audio_frames(aframes, aframe_pts, audio_pts_range) + return vframes, aframes, info + + +def _read_video_timestamps_from_file(filename: str) -> Tuple[List[int], List[int], VideoMetaData]: + """ + Decode all video- and audio frames in the video. Only pts + (presentation timestamp) is returned. The actual frame pixel data is not + copied. Thus, it is much faster than read_video(...) + """ + result = torch.ops.video_reader.read_video_from_file( + filename, + 0, # seek_frame_margin + 1, # getPtsOnly + 1, # read_video_stream + 0, # video_width + 0, # video_height + 0, # video_min_dimension + 0, # video_max_dimension + 0, # video_start_pts + -1, # video_end_pts + 0, # video_timebase_num + 1, # video_timebase_den + 1, # read_audio_stream + 0, # audio_samples + 0, # audio_channels + 0, # audio_start_pts + -1, # audio_end_pts + 0, # audio_timebase_num + 1, # audio_timebase_den + ) + _vframes, vframe_pts, vtimebase, vfps, vduration, _aframes, aframe_pts, atimebase, asample_rate, aduration = result + info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) + + vframe_pts = vframe_pts.numpy().tolist() + aframe_pts = aframe_pts.numpy().tolist() + return vframe_pts, aframe_pts, info + + +def _probe_video_from_file(filename: str) -> VideoMetaData: + """ + Probe a video file and return VideoMetaData with info about the video + """ + result = torch.ops.video_reader.probe_video_from_file(filename) + vtimebase, vfps, vduration, atimebase, asample_rate, aduration = result + info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) + return info + + +def _read_video_from_memory( + video_data: torch.Tensor, + seek_frame_margin: float = 0.25, + read_video_stream: int = 1, + video_width: int = 0, + video_height: int = 0, + video_min_dimension: int = 0, + video_max_dimension: int = 0, + video_pts_range: Tuple[int, int] = (0, -1), + video_timebase_numerator: int = 0, + video_timebase_denominator: int = 1, + read_audio_stream: int = 1, + audio_samples: int = 0, + audio_channels: int = 0, + audio_pts_range: Tuple[int, int] = (0, -1), + audio_timebase_numerator: int = 0, + audio_timebase_denominator: int = 1, +) -> Tuple[torch.Tensor, torch.Tensor]: + """ + Reads a video from memory, returning both the video frames as the audio frames + This function is torchscriptable. + + Args: + video_data (data type could be 1) torch.Tensor, dtype=torch.int8 or 2) python bytes): + compressed video content stored in either 1) torch.Tensor 2) python bytes + seek_frame_margin (double, optional): seeking frame in the stream is imprecise. + Thus, when video_start_pts is specified, we seek the pts earlier by seek_frame_margin seconds + read_video_stream (int, optional): whether read video stream. If yes, set to 1. Otherwise, 0 + video_width/video_height/video_min_dimension/video_max_dimension (int): together decide + the size of decoded frames: + + - When video_width = 0, video_height = 0, video_min_dimension = 0, + and video_max_dimension = 0, keep the original frame resolution + - When video_width = 0, video_height = 0, video_min_dimension != 0, + and video_max_dimension = 0, keep the aspect ratio and resize the + frame so that shorter edge size is video_min_dimension + - When video_width = 0, video_height = 0, video_min_dimension = 0, + and video_max_dimension != 0, keep the aspect ratio and resize + the frame so that longer edge size is video_max_dimension + - When video_width = 0, video_height = 0, video_min_dimension != 0, + and video_max_dimension != 0, resize the frame so that shorter + edge size is video_min_dimension, and longer edge size is + video_max_dimension. The aspect ratio may not be preserved + - When video_width = 0, video_height != 0, video_min_dimension = 0, + and video_max_dimension = 0, keep the aspect ratio and resize + the frame so that frame video_height is $video_height + - When video_width != 0, video_height == 0, video_min_dimension = 0, + and video_max_dimension = 0, keep the aspect ratio and resize + the frame so that frame video_width is $video_width + - When video_width != 0, video_height != 0, video_min_dimension = 0, + and video_max_dimension = 0, resize the frame so that frame + video_width and video_height are set to $video_width and + $video_height, respectively + video_pts_range (list(int), optional): the start and end presentation timestamp of video stream + video_timebase_numerator / video_timebase_denominator (float, optional): a rational + number which denotes timebase in video stream + read_audio_stream (int, optional): whether read audio stream. If yes, set to 1. Otherwise, 0 + audio_samples (int, optional): audio sampling rate + audio_channels (int optional): audio audio_channels + audio_pts_range (list(int), optional): the start and end presentation timestamp of audio stream + audio_timebase_numerator / audio_timebase_denominator (float, optional): + a rational number which denotes time base in audio stream + + Returns: + vframes (Tensor[T, H, W, C]): the `T` video frames + aframes (Tensor[L, K]): the audio frames, where `L` is the number of points and + `K` is the number of channels + """ + + _validate_pts(video_pts_range) + _validate_pts(audio_pts_range) + + if not isinstance(video_data, torch.Tensor): + with warnings.catch_warnings(): + # Ignore the warning because we actually don't modify the buffer in this function + warnings.filterwarnings("ignore", message="The given buffer is not writable") + video_data = torch.frombuffer(video_data, dtype=torch.uint8) + + result = torch.ops.video_reader.read_video_from_memory( + video_data, + seek_frame_margin, + 0, # getPtsOnly + read_video_stream, + video_width, + video_height, + video_min_dimension, + video_max_dimension, + video_pts_range[0], + video_pts_range[1], + video_timebase_numerator, + video_timebase_denominator, + read_audio_stream, + audio_samples, + audio_channels, + audio_pts_range[0], + audio_pts_range[1], + audio_timebase_numerator, + audio_timebase_denominator, + ) + + vframes, _vframe_pts, vtimebase, vfps, vduration, aframes, aframe_pts, atimebase, asample_rate, aduration = result + + if aframes.numel() > 0: + # when audio stream is found + aframes = _align_audio_frames(aframes, aframe_pts, audio_pts_range) + + return vframes, aframes + + +def _read_video_timestamps_from_memory( + video_data: torch.Tensor, +) -> Tuple[List[int], List[int], VideoMetaData]: + """ + Decode all frames in the video. Only pts (presentation timestamp) is returned. + The actual frame pixel data is not copied. Thus, read_video_timestamps(...) + is much faster than read_video(...) + """ + if not isinstance(video_data, torch.Tensor): + with warnings.catch_warnings(): + # Ignore the warning because we actually don't modify the buffer in this function + warnings.filterwarnings("ignore", message="The given buffer is not writable") + video_data = torch.frombuffer(video_data, dtype=torch.uint8) + result = torch.ops.video_reader.read_video_from_memory( + video_data, + 0, # seek_frame_margin + 1, # getPtsOnly + 1, # read_video_stream + 0, # video_width + 0, # video_height + 0, # video_min_dimension + 0, # video_max_dimension + 0, # video_start_pts + -1, # video_end_pts + 0, # video_timebase_num + 1, # video_timebase_den + 1, # read_audio_stream + 0, # audio_samples + 0, # audio_channels + 0, # audio_start_pts + -1, # audio_end_pts + 0, # audio_timebase_num + 1, # audio_timebase_den + ) + _vframes, vframe_pts, vtimebase, vfps, vduration, _aframes, aframe_pts, atimebase, asample_rate, aduration = result + info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) + + vframe_pts = vframe_pts.numpy().tolist() + aframe_pts = aframe_pts.numpy().tolist() + return vframe_pts, aframe_pts, info + + +def _probe_video_from_memory( + video_data: torch.Tensor, +) -> VideoMetaData: + """ + Probe a video in memory and return VideoMetaData with info about the video + This function is torchscriptable + """ + if not isinstance(video_data, torch.Tensor): + with warnings.catch_warnings(): + # Ignore the warning because we actually don't modify the buffer in this function + warnings.filterwarnings("ignore", message="The given buffer is not writable") + video_data = torch.frombuffer(video_data, dtype=torch.uint8) + result = torch.ops.video_reader.probe_video_from_memory(video_data) + vtimebase, vfps, vduration, atimebase, asample_rate, aduration = result + info = _fill_info(vtimebase, vfps, vduration, atimebase, asample_rate, aduration) + return info + + +def _read_video( + filename: str, + start_pts: Union[float, Fraction] = 0, + end_pts: Optional[Union[float, Fraction]] = None, + pts_unit: str = "pts", +) -> Tuple[torch.Tensor, torch.Tensor, Dict[str, float]]: + if end_pts is None: + end_pts = float("inf") + + if pts_unit == "pts": + warnings.warn( + "The pts_unit 'pts' gives wrong results and will be removed in a " + + "follow-up version. Please use pts_unit 'sec'." + ) + + info = _probe_video_from_file(filename) + + has_video = info.has_video + has_audio = info.has_audio + + def get_pts(time_base): + start_offset = start_pts + end_offset = end_pts + if pts_unit == "sec": + start_offset = int(math.floor(start_pts * (1 / time_base))) + if end_offset != float("inf"): + end_offset = int(math.ceil(end_pts * (1 / time_base))) + if end_offset == float("inf"): + end_offset = -1 + return start_offset, end_offset + + video_pts_range = (0, -1) + video_timebase = default_timebase + if has_video: + video_timebase = Fraction(info.video_timebase.numerator, info.video_timebase.denominator) + video_pts_range = get_pts(video_timebase) + + audio_pts_range = (0, -1) + audio_timebase = default_timebase + if has_audio: + audio_timebase = Fraction(info.audio_timebase.numerator, info.audio_timebase.denominator) + audio_pts_range = get_pts(audio_timebase) + + vframes, aframes, info = _read_video_from_file( + filename, + read_video_stream=True, + video_pts_range=video_pts_range, + video_timebase=video_timebase, + read_audio_stream=True, + audio_pts_range=audio_pts_range, + audio_timebase=audio_timebase, + ) + _info = {} + if has_video: + _info["video_fps"] = info.video_fps + if has_audio: + _info["audio_fps"] = info.audio_sample_rate + + return vframes, aframes, _info + + +def _read_video_timestamps( + filename: str, pts_unit: str = "pts" +) -> Tuple[Union[List[int], List[Fraction]], Optional[float]]: + if pts_unit == "pts": + warnings.warn( + "The pts_unit 'pts' gives wrong results and will be removed in a " + + "follow-up version. Please use pts_unit 'sec'." + ) + + pts: Union[List[int], List[Fraction]] + pts, _, info = _read_video_timestamps_from_file(filename) + + if pts_unit == "sec": + video_time_base = Fraction(info.video_timebase.numerator, info.video_timebase.denominator) + pts = [x * video_time_base for x in pts] + + video_fps = info.video_fps if info.has_video else None + + return pts, video_fps diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/image.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/image.py new file mode 100644 index 0000000000000000000000000000000000000000..71b702198cd6e66f4ce58b387a82a2cacc45620d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/image.py @@ -0,0 +1,511 @@ +from enum import Enum +from typing import List, Union +from warnings import warn + +import torch + +from ..extension import _load_library +from ..utils import _log_api_usage_once + + +try: + _load_library("image") +except (ImportError, OSError) as e: + warn( + f"Failed to load image Python extension: '{e}'" + f"If you don't plan on using image functionality from `torchvision.io`, you can ignore this warning. " + f"Otherwise, there might be something wrong with your environment. " + f"Did you have `libjpeg` or `libpng` installed before building `torchvision` from source?" + ) + + +class ImageReadMode(Enum): + """Allow automatic conversion to RGB, RGBA, etc while decoding. + + .. note:: + + You don't need to use this struct, you can just pass strings to all + ``mode`` parameters, e.g. ``mode="RGB"``. + + The different available modes are the following. + + - UNCHANGED: loads the image as-is + - RGB: converts to RGB + - RGBA: converts to RGB with transparency (also aliased as RGB_ALPHA) + - GRAY: converts to grayscale + - GRAY_ALPHA: converts to grayscale with transparency + + .. note:: + + Some decoders won't support all possible values, e.g. GRAY and + GRAY_ALPHA are only supported for PNG and JPEG images. + """ + + UNCHANGED = 0 + GRAY = 1 + GRAY_ALPHA = 2 + RGB = 3 + RGB_ALPHA = 4 + RGBA = RGB_ALPHA # Alias for convenience + + +def read_file(path: str) -> torch.Tensor: + """ + Return the bytes contents of a file as a uint8 1D Tensor. + + Args: + path (str or ``pathlib.Path``): the path to the file to be read + + Returns: + data (Tensor) + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(read_file) + data = torch.ops.image.read_file(str(path)) + return data + + +def write_file(filename: str, data: torch.Tensor) -> None: + """ + Write the content of an uint8 1D tensor to a file. + + Args: + filename (str or ``pathlib.Path``): the path to the file to be written + data (Tensor): the contents to be written to the output file + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(write_file) + torch.ops.image.write_file(str(filename), data) + + +def decode_png( + input: torch.Tensor, + mode: ImageReadMode = ImageReadMode.UNCHANGED, + apply_exif_orientation: bool = False, +) -> torch.Tensor: + """ + Decodes a PNG image into a 3 dimensional RGB or grayscale Tensor. + + The values of the output tensor are in uint8 in [0, 255] for most cases. If + the image is a 16-bit png, then the output tensor is uint16 in [0, 65535] + (supported from torchvision ``0.21``). Since uint16 support is limited in + pytorch, we recommend calling + :func:`torchvision.transforms.v2.functional.to_dtype()` with ``scale=True`` + after this function to convert the decoded image into a uint8 or float + tensor. + + Args: + input (Tensor[1]): a one dimensional uint8 tensor containing + the raw bytes of the PNG image. + mode (str or ImageReadMode): The mode to convert the image to, e.g. "RGB". + Default is "UNCHANGED". See :class:`~torchvision.io.ImageReadMode` + for available modes. + apply_exif_orientation (bool): apply EXIF orientation transformation to the output tensor. + Default: False. + + Returns: + output (Tensor[image_channels, image_height, image_width]) + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(decode_png) + if isinstance(mode, str): + mode = ImageReadMode[mode.upper()] + output = torch.ops.image.decode_png(input, mode.value, apply_exif_orientation) + return output + + +def encode_png(input: torch.Tensor, compression_level: int = 6) -> torch.Tensor: + """ + Takes an input tensor in CHW layout and returns a buffer with the contents + of its corresponding PNG file. + + Args: + input (Tensor[channels, image_height, image_width]): int8 image tensor of + ``c`` channels, where ``c`` must 3 or 1. + compression_level (int): Compression factor for the resulting file, it must be a number + between 0 and 9. Default: 6 + + Returns: + Tensor[1]: A one dimensional int8 tensor that contains the raw bytes of the + PNG file. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(encode_png) + output = torch.ops.image.encode_png(input, compression_level) + return output + + +def write_png(input: torch.Tensor, filename: str, compression_level: int = 6): + """ + Takes an input tensor in CHW layout (or HW in the case of grayscale images) + and saves it in a PNG file. + + Args: + input (Tensor[channels, image_height, image_width]): int8 image tensor of + ``c`` channels, where ``c`` must be 1 or 3. + filename (str or ``pathlib.Path``): Path to save the image. + compression_level (int): Compression factor for the resulting file, it must be a number + between 0 and 9. Default: 6 + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(write_png) + output = encode_png(input, compression_level) + write_file(filename, output) + + +def decode_jpeg( + input: Union[torch.Tensor, List[torch.Tensor]], + mode: ImageReadMode = ImageReadMode.UNCHANGED, + device: Union[str, torch.device] = "cpu", + apply_exif_orientation: bool = False, +) -> Union[torch.Tensor, List[torch.Tensor]]: + """Decode JPEG image(s) into 3D RGB or grayscale Tensor(s), on CPU or CUDA. + + The values of the output tensor are uint8 between 0 and 255. + + .. note:: + When using a CUDA device, passing a list of tensors is more efficient than repeated individual calls to ``decode_jpeg``. + When using CPU the performance is equivalent. + The CUDA version of this function has explicitly been designed with thread-safety in mind. + This function does not return partial results in case of an error. + + Args: + input (Tensor[1] or list[Tensor[1]]): a (list of) one dimensional uint8 tensor(s) containing + the raw bytes of the JPEG image. The tensor(s) must be on CPU, + regardless of the ``device`` parameter. + mode (str or ImageReadMode): The mode to convert the image to, e.g. "RGB". + Default is "UNCHANGED". See :class:`~torchvision.io.ImageReadMode` + for available modes. + device (str or torch.device): The device on which the decoded image will + be stored. If a cuda device is specified, the image will be decoded + with `nvjpeg `_. This is only + supported for CUDA version >= 10.1 + + .. betastatus:: device parameter + + .. warning:: + There is a memory leak in the nvjpeg library for CUDA versions < 11.6. + Make sure to rely on CUDA 11.6 or above before using ``device="cuda"``. + apply_exif_orientation (bool): apply EXIF orientation transformation to the output tensor. + Default: False. Only implemented for JPEG format on CPU. + + Returns: + output (Tensor[image_channels, image_height, image_width] or list[Tensor[image_channels, image_height, image_width]]): + The values of the output tensor(s) are uint8 between 0 and 255. + ``output.device`` will be set to the specified ``device`` + + + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(decode_jpeg) + if isinstance(device, str): + device = torch.device(device) + if isinstance(mode, str): + mode = ImageReadMode[mode.upper()] + + if isinstance(input, list): + if len(input) == 0: + raise ValueError("Input list must contain at least one element") + if not all(isinstance(t, torch.Tensor) for t in input): + raise ValueError("All elements of the input list must be tensors.") + if not all(t.device.type == "cpu" for t in input): + raise ValueError("Input list must contain tensors on CPU.") + if device.type == "cuda": + return torch.ops.image.decode_jpegs_cuda(input, mode.value, device) + else: + return [torch.ops.image.decode_jpeg(img, mode.value, apply_exif_orientation) for img in input] + + else: # input is tensor + if input.device.type != "cpu": + raise ValueError("Input tensor must be a CPU tensor") + if device.type == "cuda": + return torch.ops.image.decode_jpegs_cuda([input], mode.value, device)[0] + else: + return torch.ops.image.decode_jpeg(input, mode.value, apply_exif_orientation) + + +def encode_jpeg( + input: Union[torch.Tensor, List[torch.Tensor]], quality: int = 75 +) -> Union[torch.Tensor, List[torch.Tensor]]: + """Encode RGB tensor(s) into raw encoded jpeg bytes, on CPU or CUDA. + + .. note:: + Passing a list of CUDA tensors is more efficient than repeated individual calls to ``encode_jpeg``. + For CPU tensors the performance is equivalent. + + Args: + input (Tensor[channels, image_height, image_width] or List[Tensor[channels, image_height, image_width]]): + (list of) uint8 image tensor(s) of ``c`` channels, where ``c`` must be 1 or 3 + quality (int): Quality of the resulting JPEG file(s). Must be a number between + 1 and 100. Default: 75 + + Returns: + output (Tensor[1] or list[Tensor[1]]): A (list of) one dimensional uint8 tensor(s) that contain the raw bytes of the JPEG file. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(encode_jpeg) + if quality < 1 or quality > 100: + raise ValueError("Image quality should be a positive number between 1 and 100") + if isinstance(input, list): + if not input: + raise ValueError("encode_jpeg requires at least one input tensor when a list is passed") + if input[0].device.type == "cuda": + return torch.ops.image.encode_jpegs_cuda(input, quality) + else: + return [torch.ops.image.encode_jpeg(image, quality) for image in input] + else: # single input tensor + if input.device.type == "cuda": + return torch.ops.image.encode_jpegs_cuda([input], quality)[0] + else: + return torch.ops.image.encode_jpeg(input, quality) + + +def write_jpeg(input: torch.Tensor, filename: str, quality: int = 75): + """ + Takes an input tensor in CHW layout and saves it in a JPEG file. + + Args: + input (Tensor[channels, image_height, image_width]): int8 image tensor of ``c`` + channels, where ``c`` must be 1 or 3. + filename (str or ``pathlib.Path``): Path to save the image. + quality (int): Quality of the resulting JPEG file, it must be a number + between 1 and 100. Default: 75 + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(write_jpeg) + output = encode_jpeg(input, quality) + assert isinstance(output, torch.Tensor) # Needed for torchscript + write_file(filename, output) + + +def decode_image( + input: Union[torch.Tensor, str], + mode: ImageReadMode = ImageReadMode.UNCHANGED, + apply_exif_orientation: bool = False, +) -> torch.Tensor: + """Decode an image into a uint8 tensor, from a path or from raw encoded bytes. + + Currently supported image formats are jpeg, png, gif and webp. + + The values of the output tensor are in uint8 in [0, 255] for most cases. + + If the image is a 16-bit png, then the output tensor is uint16 in [0, 65535] + (supported from torchvision ``0.21``). Since uint16 support is limited in + pytorch, we recommend calling + :func:`torchvision.transforms.v2.functional.to_dtype()` with ``scale=True`` + after this function to convert the decoded image into a uint8 or float + tensor. + + .. note:: + + ``decode_image()`` doesn't work yet on AVIF or HEIC images. For these + formats, directly call :func:`~torchvision.io.decode_avif` or + :func:`~torchvision.io.decode_heic`. + + Args: + input (Tensor or str or ``pathlib.Path``): The image to decode. If a + tensor is passed, it must be one dimensional uint8 tensor containing + the raw bytes of the image. Otherwise, this must be a path to the image file. + mode (str or ImageReadMode): The mode to convert the image to, e.g. "RGB". + Default is "UNCHANGED". See :class:`~torchvision.io.ImageReadMode` + for available modes. + apply_exif_orientation (bool): apply EXIF orientation transformation to the output tensor. + Only applies to JPEG and PNG images. Default: False. + + Returns: + output (Tensor[image_channels, image_height, image_width]) + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(decode_image) + if not isinstance(input, torch.Tensor): + input = read_file(str(input)) + if isinstance(mode, str): + mode = ImageReadMode[mode.upper()] + output = torch.ops.image.decode_image(input, mode.value, apply_exif_orientation) + return output + + +def read_image( + path: str, + mode: ImageReadMode = ImageReadMode.UNCHANGED, + apply_exif_orientation: bool = False, +) -> torch.Tensor: + """[OBSOLETE] Use :func:`~torchvision.io.decode_image` instead.""" + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(read_image) + data = read_file(path) + return decode_image(data, mode, apply_exif_orientation=apply_exif_orientation) + + +def decode_gif(input: torch.Tensor) -> torch.Tensor: + """ + Decode a GIF image into a 3 or 4 dimensional RGB Tensor. + + The values of the output tensor are uint8 between 0 and 255. + The output tensor has shape ``(C, H, W)`` if there is only one image in the + GIF, and ``(N, C, H, W)`` if there are ``N`` images. + + Args: + input (Tensor[1]): a one dimensional contiguous uint8 tensor containing + the raw bytes of the GIF image. + + Returns: + output (Tensor[image_channels, image_height, image_width] or Tensor[num_images, image_channels, image_height, image_width]) + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(decode_gif) + return torch.ops.image.decode_gif(input) + + +def decode_webp( + input: torch.Tensor, + mode: ImageReadMode = ImageReadMode.UNCHANGED, +) -> torch.Tensor: + """ + Decode a WEBP image into a 3 dimensional RGB[A] Tensor. + + The values of the output tensor are uint8 between 0 and 255. + + Args: + input (Tensor[1]): a one dimensional contiguous uint8 tensor containing + the raw bytes of the WEBP image. + mode (str or ImageReadMode): The mode to convert the image to, e.g. "RGB". + Default is "UNCHANGED". See :class:`~torchvision.io.ImageReadMode` + for available modes. + + Returns: + Decoded image (Tensor[image_channels, image_height, image_width]) + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(decode_webp) + if isinstance(mode, str): + mode = ImageReadMode[mode.upper()] + return torch.ops.image.decode_webp(input, mode.value) + + +# TODO_AVIF_HEIC: Better support for torchscript. Scripting decode_avif of +# decode_heic currently fails, mainly because of the logic +# _load_extra_decoders_once() (using global variables, try/except statements, +# etc.). +# The ops (torch.ops.extra_decoders_ns.decode_*) are otherwise torchscript-able, +# and users who need torchscript can always just wrap those. + +# TODO_AVIF_HEIC: decode_image() should work for those. The key technical issue +# we have here is that the format detection logic of decode_image() is +# implemented in torchvision, and torchvision has zero knowledge of +# torchvision-extra-decoders, so we cannot call the AVIF/HEIC C++ decoders +# (those in torchvision-extra-decoders) from there. +# A trivial check that could be done within torchvision would be to check the +# file extension, if a path was passed. We could also just implement the +# AVIF/HEIC detection logic in Python as a fallback, if the file detection +# didn't find any format. In any case: properly determining whether a file is +# HEIC is far from trivial, and relying on libmagic would probably be best + + +_EXTRA_DECODERS_ALREADY_LOADED = False + + +def _load_extra_decoders_once(): + global _EXTRA_DECODERS_ALREADY_LOADED + if _EXTRA_DECODERS_ALREADY_LOADED: + return + + try: + import torchvision_extra_decoders + + # torchvision-extra-decoders only supports linux for now. BUT, users on + # e.g. MacOS can still install it: they will get the pure-python + # 0.0.0.dev version: + # https://pypi.org/project/torchvision-extra-decoders/0.0.0.dev0, which + # is a dummy version that was created to reserve the namespace on PyPI. + # We have to check that expose_extra_decoders() exists for those users, + # so we can properly error on non-Linux archs. + assert hasattr(torchvision_extra_decoders, "expose_extra_decoders") + except (AssertionError, ImportError) as e: + raise RuntimeError( + "In order to enable the AVIF and HEIC decoding capabilities of " + "torchvision, you need to `pip install torchvision-extra-decoders`. " + "Just install the package, you don't need to update your code. " + "This is only supported on Linux, and this feature is still in BETA stage. " + "Please let us know of any issue: https://github.com/pytorch/vision/issues/new/choose. " + "Note that `torchvision-extra-decoders` is released under the LGPL license. " + ) from e + + # This will expose torch.ops.extra_decoders_ns.decode_avif and torch.ops.extra_decoders_ns.decode_heic + torchvision_extra_decoders.expose_extra_decoders() + + _EXTRA_DECODERS_ALREADY_LOADED = True + + +def decode_avif(input: torch.Tensor, mode: ImageReadMode = ImageReadMode.UNCHANGED) -> torch.Tensor: + """Decode an AVIF image into a 3 dimensional RGB[A] Tensor. + + .. warning:: + In order to enable the AVIF decoding capabilities of torchvision, you + first need to run ``pip install torchvision-extra-decoders``. Just + install the package, you don't need to update your code. This is only + supported on Linux, and this feature is still in BETA stage. Please let + us know of any issue: + https://github.com/pytorch/vision/issues/new/choose. Note that + `torchvision-extra-decoders + `_ is + released under the LGPL license. + + The values of the output tensor are in uint8 in [0, 255] for most images. If + the image has a bit-depth of more than 8, then the output tensor is uint16 + in [0, 65535]. Since uint16 support is limited in pytorch, we recommend + calling :func:`torchvision.transforms.v2.functional.to_dtype()` with + ``scale=True`` after this function to convert the decoded image into a uint8 + or float tensor. + + Args: + input (Tensor[1]): a one dimensional contiguous uint8 tensor containing + the raw bytes of the AVIF image. + mode (str or ImageReadMode): The mode to convert the image to, e.g. "RGB". + Default is "UNCHANGED". See :class:`~torchvision.io.ImageReadMode` + for available modes. + + Returns: + Decoded image (Tensor[image_channels, image_height, image_width]) + """ + _load_extra_decoders_once() + if input.dtype != torch.uint8: + raise RuntimeError(f"Input tensor must have uint8 data type, got {input.dtype}") + return torch.ops.extra_decoders_ns.decode_avif(input, mode.value) + + +def decode_heic(input: torch.Tensor, mode: ImageReadMode = ImageReadMode.UNCHANGED) -> torch.Tensor: + """Decode an HEIC image into a 3 dimensional RGB[A] Tensor. + + .. warning:: + In order to enable the AVIF decoding capabilities of torchvision, you + first need to run ``pip install torchvision-extra-decoders``. Just + install the package, you don't need to update your code. This is only + supported on Linux, and this feature is still in BETA stage. Please let + us know of any issue: + https://github.com/pytorch/vision/issues/new/choose. Note that + `torchvision-extra-decoders + `_ is + released under the LGPL license. + + The values of the output tensor are in uint8 in [0, 255] for most images. If + the image has a bit-depth of more than 8, then the output tensor is uint16 + in [0, 65535]. Since uint16 support is limited in pytorch, we recommend + calling :func:`torchvision.transforms.v2.functional.to_dtype()` with + ``scale=True`` after this function to convert the decoded image into a uint8 + or float tensor. + + Args: + input (Tensor[1]): a one dimensional contiguous uint8 tensor containing + the raw bytes of the HEIC image. + mode (str or ImageReadMode): The mode to convert the image to, e.g. "RGB". + Default is "UNCHANGED". See :class:`~torchvision.io.ImageReadMode` + for available modes. + + Returns: + Decoded image (Tensor[image_channels, image_height, image_width]) + """ + _load_extra_decoders_once() + if input.dtype != torch.uint8: + raise RuntimeError(f"Input tensor must have uint8 data type, got {input.dtype}") + return torch.ops.extra_decoders_ns.decode_heic(input, mode.value) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/video.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/video.py new file mode 100644 index 0000000000000000000000000000000000000000..23ff8b18f3395c6ce34427cd9619d0436d97f50b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/video.py @@ -0,0 +1,466 @@ +import gc +import math +import os +import re +import warnings +from fractions import Fraction +from typing import Any, Dict, List, Optional, Tuple, Union + +import numpy as np +import torch + +from ..utils import _log_api_usage_once +from . import _video_opt + +try: + import av + + av.logging.set_level(av.logging.ERROR) + if not hasattr(av.video.frame.VideoFrame, "pict_type"): + av = ImportError( + """\ +Your version of PyAV is too old for the necessary video operations in torchvision. +If you are on Python 3.5, you will have to build from source (the conda-forge +packages are not up-to-date). See +https://github.com/mikeboers/PyAV#installation for instructions on how to +install PyAV on your system. +""" + ) + try: + FFmpegError = av.FFmpegError # from av 14 https://github.com/PyAV-Org/PyAV/blob/main/CHANGELOG.rst + except AttributeError: + FFmpegError = av.AVError +except ImportError: + av = ImportError( + """\ +PyAV is not installed, and is necessary for the video operations in torchvision. +See https://github.com/mikeboers/PyAV#installation for instructions on how to +install PyAV on your system. +""" + ) + + +def _check_av_available() -> None: + if isinstance(av, Exception): + raise av + + +def _av_available() -> bool: + return not isinstance(av, Exception) + + +# PyAV has some reference cycles +_CALLED_TIMES = 0 +_GC_COLLECTION_INTERVAL = 10 + + +def write_video( + filename: str, + video_array: torch.Tensor, + fps: float, + video_codec: str = "libx264", + options: Optional[Dict[str, Any]] = None, + audio_array: Optional[torch.Tensor] = None, + audio_fps: Optional[float] = None, + audio_codec: Optional[str] = None, + audio_options: Optional[Dict[str, Any]] = None, +) -> None: + """ + Writes a 4d tensor in [T, H, W, C] format in a video file. + + This function relies on PyAV (therefore, ultimately FFmpeg) to encode + videos, you can get more fine-grained control by referring to the other + options at your disposal within `the FFMpeg wiki + `_. + + .. warning:: + + In the near future, we intend to centralize PyTorch's video decoding + capabilities within the `torchcodec + `_ project. We encourage you to + try it out and share your feedback, as the torchvision video decoders + will eventually be deprecated. + + Args: + filename (str): path where the video will be saved + video_array (Tensor[T, H, W, C]): tensor containing the individual frames, + as a uint8 tensor in [T, H, W, C] format + fps (Number): video frames per second + video_codec (str): the name of the video codec, i.e. "libx264", "h264", etc. + options (Dict): dictionary containing options to be passed into the PyAV video stream. + The list of options is codec-dependent and can all + be found from `the FFMpeg wiki `_. + audio_array (Tensor[C, N]): tensor containing the audio, where C is the number of channels + and N is the number of samples + audio_fps (Number): audio sample rate, typically 44100 or 48000 + audio_codec (str): the name of the audio codec, i.e. "mp3", "aac", etc. + audio_options (Dict): dictionary containing options to be passed into the PyAV audio stream. + The list of options is codec-dependent and can all + be found from `the FFMpeg wiki `_. + + Examples:: + >>> # Creating libx264 video with CRF 17, for visually lossless footage: + >>> + >>> from torchvision.io import write_video + >>> # 1000 frames of 100x100, 3-channel image. + >>> vid = torch.randn(1000, 100, 100, 3, dtype = torch.uint8) + >>> write_video("video.mp4", options = {"crf": "17"}) + + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(write_video) + _check_av_available() + video_array = torch.as_tensor(video_array, dtype=torch.uint8).numpy(force=True) + + # PyAV does not support floating point numbers with decimal point + # and will throw OverflowException in case this is not the case + if isinstance(fps, float): + fps = np.round(fps) + + with av.open(filename, mode="w") as container: + stream = container.add_stream(video_codec, rate=fps) + stream.width = video_array.shape[2] + stream.height = video_array.shape[1] + stream.pix_fmt = "yuv420p" if video_codec != "libx264rgb" else "rgb24" + stream.options = options or {} + + if audio_array is not None: + audio_format_dtypes = { + "dbl": " 1 else "mono" + audio_sample_fmt = container.streams.audio[0].format.name + + format_dtype = np.dtype(audio_format_dtypes[audio_sample_fmt]) + audio_array = torch.as_tensor(audio_array).numpy(force=True).astype(format_dtype) + + frame = av.AudioFrame.from_ndarray(audio_array, format=audio_sample_fmt, layout=audio_layout) + + frame.sample_rate = audio_fps + + for packet in a_stream.encode(frame): + container.mux(packet) + + for packet in a_stream.encode(): + container.mux(packet) + + for img in video_array: + frame = av.VideoFrame.from_ndarray(img, format="rgb24") + try: + frame.pict_type = "NONE" + except TypeError: + from av.video.frame import PictureType # noqa + + frame.pict_type = PictureType.NONE + + for packet in stream.encode(frame): + container.mux(packet) + + # Flush stream + for packet in stream.encode(): + container.mux(packet) + + +def _read_from_stream( + container: "av.container.Container", + start_offset: float, + end_offset: float, + pts_unit: str, + stream: "av.stream.Stream", + stream_name: Dict[str, Optional[Union[int, Tuple[int, ...], List[int]]]], +) -> List["av.frame.Frame"]: + global _CALLED_TIMES, _GC_COLLECTION_INTERVAL + _CALLED_TIMES += 1 + if _CALLED_TIMES % _GC_COLLECTION_INTERVAL == _GC_COLLECTION_INTERVAL - 1: + gc.collect() + + if pts_unit == "sec": + # TODO: we should change all of this from ground up to simply take + # sec and convert to MS in C++ + start_offset = int(math.floor(start_offset * (1 / stream.time_base))) + if end_offset != float("inf"): + end_offset = int(math.ceil(end_offset * (1 / stream.time_base))) + else: + warnings.warn("The pts_unit 'pts' gives wrong results. Please use pts_unit 'sec'.") + + frames = {} + should_buffer = True + max_buffer_size = 5 + if stream.type == "video": + # DivX-style packed B-frames can have out-of-order pts (2 frames in a single pkt) + # so need to buffer some extra frames to sort everything + # properly + extradata = stream.codec_context.extradata + # overly complicated way of finding if `divx_packed` is set, following + # https://github.com/FFmpeg/FFmpeg/commit/d5a21172283572af587b3d939eba0091484d3263 + if extradata and b"DivX" in extradata: + # can't use regex directly because of some weird characters sometimes... + pos = extradata.find(b"DivX") + d = extradata[pos:] + o = re.search(rb"DivX(\d+)Build(\d+)(\w)", d) + if o is None: + o = re.search(rb"DivX(\d+)b(\d+)(\w)", d) + if o is not None: + should_buffer = o.group(3) == b"p" + seek_offset = start_offset + # some files don't seek to the right location, so better be safe here + seek_offset = max(seek_offset - 1, 0) + if should_buffer: + # FIXME this is kind of a hack, but we will jump to the previous keyframe + # so this will be safe + seek_offset = max(seek_offset - max_buffer_size, 0) + try: + # TODO check if stream needs to always be the video stream here or not + container.seek(seek_offset, any_frame=False, backward=True, stream=stream) + except FFmpegError: + # TODO add some warnings in this case + # print("Corrupted file?", container.name) + return [] + buffer_count = 0 + try: + for _idx, frame in enumerate(container.decode(**stream_name)): + frames[frame.pts] = frame + if frame.pts >= end_offset: + if should_buffer and buffer_count < max_buffer_size: + buffer_count += 1 + continue + break + except FFmpegError: + # TODO add a warning + pass + # ensure that the results are sorted wrt the pts + result = [frames[i] for i in sorted(frames) if start_offset <= frames[i].pts <= end_offset] + if len(frames) > 0 and start_offset > 0 and start_offset not in frames: + # if there is no frame that exactly matches the pts of start_offset + # add the last frame smaller than start_offset, to guarantee that + # we will have all the necessary data. This is most useful for audio + preceding_frames = [i for i in frames if i < start_offset] + if len(preceding_frames) > 0: + first_frame_pts = max(preceding_frames) + result.insert(0, frames[first_frame_pts]) + return result + + +def _align_audio_frames( + aframes: torch.Tensor, audio_frames: List["av.frame.Frame"], ref_start: int, ref_end: float +) -> torch.Tensor: + start, end = audio_frames[0].pts, audio_frames[-1].pts + total_aframes = aframes.shape[1] + step_per_aframe = (end - start + 1) / total_aframes + s_idx = 0 + e_idx = total_aframes + if start < ref_start: + s_idx = int((ref_start - start) / step_per_aframe) + if end > ref_end: + e_idx = int((ref_end - end) / step_per_aframe) + return aframes[:, s_idx:e_idx] + + +def read_video( + filename: str, + start_pts: Union[float, Fraction] = 0, + end_pts: Optional[Union[float, Fraction]] = None, + pts_unit: str = "pts", + output_format: str = "THWC", +) -> Tuple[torch.Tensor, torch.Tensor, Dict[str, Any]]: + """ + Reads a video from a file, returning both the video frames and the audio frames + + .. warning:: + + In the near future, we intend to centralize PyTorch's video decoding + capabilities within the `torchcodec + `_ project. We encourage you to + try it out and share your feedback, as the torchvision video decoders + will eventually be deprecated. + + Args: + filename (str): path to the video file. If using the pyav backend, this can be whatever ``av.open`` accepts. + start_pts (int if pts_unit = 'pts', float / Fraction if pts_unit = 'sec', optional): + The start presentation time of the video + end_pts (int if pts_unit = 'pts', float / Fraction if pts_unit = 'sec', optional): + The end presentation time + pts_unit (str, optional): unit in which start_pts and end_pts values will be interpreted, + either 'pts' or 'sec'. Defaults to 'pts'. + output_format (str, optional): The format of the output video tensors. Can be either "THWC" (default) or "TCHW". + + Returns: + vframes (Tensor[T, H, W, C] or Tensor[T, C, H, W]): the `T` video frames + aframes (Tensor[K, L]): the audio frames, where `K` is the number of channels and `L` is the number of points + info (Dict): metadata for the video and audio. Can contain the fields video_fps (float) and audio_fps (int) + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(read_video) + + output_format = output_format.upper() + if output_format not in ("THWC", "TCHW"): + raise ValueError(f"output_format should be either 'THWC' or 'TCHW', got {output_format}.") + + from torchvision import get_video_backend + + if get_video_backend() != "pyav": + if not os.path.exists(filename): + raise RuntimeError(f"File not found: {filename}") + vframes, aframes, info = _video_opt._read_video(filename, start_pts, end_pts, pts_unit) + else: + _check_av_available() + + if end_pts is None: + end_pts = float("inf") + + if end_pts < start_pts: + raise ValueError( + f"end_pts should be larger than start_pts, got start_pts={start_pts} and end_pts={end_pts}" + ) + + info = {} + video_frames = [] + audio_frames = [] + audio_timebase = _video_opt.default_timebase + + try: + with av.open(filename, metadata_errors="ignore") as container: + if container.streams.audio: + audio_timebase = container.streams.audio[0].time_base + if container.streams.video: + video_frames = _read_from_stream( + container, + start_pts, + end_pts, + pts_unit, + container.streams.video[0], + {"video": 0}, + ) + video_fps = container.streams.video[0].average_rate + # guard against potentially corrupted files + if video_fps is not None: + info["video_fps"] = float(video_fps) + + if container.streams.audio: + audio_frames = _read_from_stream( + container, + start_pts, + end_pts, + pts_unit, + container.streams.audio[0], + {"audio": 0}, + ) + info["audio_fps"] = container.streams.audio[0].rate + + except FFmpegError: + # TODO raise a warning? + pass + + vframes_list = [frame.to_rgb().to_ndarray() for frame in video_frames] + aframes_list = [frame.to_ndarray() for frame in audio_frames] + + if vframes_list: + vframes = torch.as_tensor(np.stack(vframes_list)) + else: + vframes = torch.empty((0, 1, 1, 3), dtype=torch.uint8) + + if aframes_list: + aframes = np.concatenate(aframes_list, 1) + aframes = torch.as_tensor(aframes) + if pts_unit == "sec": + start_pts = int(math.floor(start_pts * (1 / audio_timebase))) + if end_pts != float("inf"): + end_pts = int(math.ceil(end_pts * (1 / audio_timebase))) + aframes = _align_audio_frames(aframes, audio_frames, start_pts, end_pts) + else: + aframes = torch.empty((1, 0), dtype=torch.float32) + + if output_format == "TCHW": + # [T,H,W,C] --> [T,C,H,W] + vframes = vframes.permute(0, 3, 1, 2) + + return vframes, aframes, info + + +def _can_read_timestamps_from_packets(container: "av.container.Container") -> bool: + extradata = container.streams[0].codec_context.extradata + if extradata is None: + return False + if b"Lavc" in extradata: + return True + return False + + +def _decode_video_timestamps(container: "av.container.Container") -> List[int]: + if _can_read_timestamps_from_packets(container): + # fast path + return [x.pts for x in container.demux(video=0) if x.pts is not None] + else: + return [x.pts for x in container.decode(video=0) if x.pts is not None] + + +def read_video_timestamps(filename: str, pts_unit: str = "pts") -> Tuple[List[int], Optional[float]]: + """ + List the video frames timestamps. + + .. warning:: + + In the near future, we intend to centralize PyTorch's video decoding + capabilities within the `torchcodec + `_ project. We encourage you to + try it out and share your feedback, as the torchvision video decoders + will eventually be deprecated. + + Note that the function decodes the whole video frame-by-frame. + + Args: + filename (str): path to the video file + pts_unit (str, optional): unit in which timestamp values will be returned + either 'pts' or 'sec'. Defaults to 'pts'. + + Returns: + pts (List[int] if pts_unit = 'pts', List[Fraction] if pts_unit = 'sec'): + presentation timestamps for each one of the frames in the video. + video_fps (float, optional): the frame rate for the video + + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(read_video_timestamps) + from torchvision import get_video_backend + + if get_video_backend() != "pyav": + return _video_opt._read_video_timestamps(filename, pts_unit) + + _check_av_available() + + video_fps = None + pts = [] + + try: + with av.open(filename, metadata_errors="ignore") as container: + if container.streams.video: + video_stream = container.streams.video[0] + video_time_base = video_stream.time_base + try: + pts = _decode_video_timestamps(container) + except FFmpegError: + warnings.warn(f"Failed decoding frames for file {filename}") + video_fps = float(video_stream.average_rate) + except FFmpegError as e: + msg = f"Failed to open container for {filename}; Caught error: {e}" + warnings.warn(msg, RuntimeWarning) + + pts.sort() + + if pts_unit == "sec": + pts = [x * video_time_base for x in pts] + + return pts, video_fps diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/video_reader.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/video_reader.py new file mode 100644 index 0000000000000000000000000000000000000000..eeb6acd59dbfed46c00e02d2f5d5ecc33f2f3305 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/io/video_reader.py @@ -0,0 +1,294 @@ +import io +import warnings + +from typing import Any, Dict, Iterator + +import torch + +from ..utils import _log_api_usage_once + +from ._video_opt import _HAS_CPU_VIDEO_DECODER + +if _HAS_CPU_VIDEO_DECODER: + + def _has_video_opt() -> bool: + return True + +else: + + def _has_video_opt() -> bool: + return False + + +try: + import av + + av.logging.set_level(av.logging.ERROR) + if not hasattr(av.video.frame.VideoFrame, "pict_type"): + av = ImportError( + """\ +Your version of PyAV is too old for the necessary video operations in torchvision. +If you are on Python 3.5, you will have to build from source (the conda-forge +packages are not up-to-date). See +https://github.com/mikeboers/PyAV#installation for instructions on how to +install PyAV on your system. +""" + ) +except ImportError: + av = ImportError( + """\ +PyAV is not installed, and is necessary for the video operations in torchvision. +See https://github.com/mikeboers/PyAV#installation for instructions on how to +install PyAV on your system. +""" + ) + + +class VideoReader: + """ + Fine-grained video-reading API. + Supports frame-by-frame reading of various streams from a single video + container. Much like previous video_reader API it supports the following + backends: video_reader, pyav, and cuda. + Backends can be set via `torchvision.set_video_backend` function. + + .. warning:: + + In the near future, we intend to centralize PyTorch's video decoding + capabilities within the `torchcodec + `_ project. We encourage you to + try it out and share your feedback, as the torchvision video decoders + will eventually be deprecated. + + .. betastatus:: VideoReader class + + Example: + The following examples creates a :mod:`VideoReader` object, seeks into 2s + point, and returns a single frame:: + + import torchvision + video_path = "path_to_a_test_video" + reader = torchvision.io.VideoReader(video_path, "video") + reader.seek(2.0) + frame = next(reader) + + :mod:`VideoReader` implements the iterable API, which makes it suitable to + using it in conjunction with :mod:`itertools` for more advanced reading. + As such, we can use a :mod:`VideoReader` instance inside for loops:: + + reader.seek(2) + for frame in reader: + frames.append(frame['data']) + # additionally, `seek` implements a fluent API, so we can do + for frame in reader.seek(2): + frames.append(frame['data']) + + With :mod:`itertools`, we can read all frames between 2 and 5 seconds with the + following code:: + + for frame in itertools.takewhile(lambda x: x['pts'] <= 5, reader.seek(2)): + frames.append(frame['data']) + + and similarly, reading 10 frames after the 2s timestamp can be achieved + as follows:: + + for frame in itertools.islice(reader.seek(2), 10): + frames.append(frame['data']) + + .. note:: + + Each stream descriptor consists of two parts: stream type (e.g. 'video') and + a unique stream id (which are determined by the video encoding). + In this way, if the video container contains multiple + streams of the same type, users can access the one they want. + If only stream type is passed, the decoder auto-detects first stream of that type. + + Args: + src (string, bytes object, or tensor): The media source. + If string-type, it must be a file path supported by FFMPEG. + If bytes, should be an in-memory representation of a file supported by FFMPEG. + If Tensor, it is interpreted internally as byte buffer. + It must be one-dimensional, of type ``torch.uint8``. + + stream (string, optional): descriptor of the required stream, followed by the stream id, + in the format ``{stream_type}:{stream_id}``. Defaults to ``"video:0"``. + Currently available options include ``['video', 'audio']`` + + num_threads (int, optional): number of threads used by the codec to decode video. + Default value (0) enables multithreading with codec-dependent heuristic. The performance + will depend on the version of FFMPEG codecs supported. + """ + + def __init__( + self, + src: str, + stream: str = "video", + num_threads: int = 0, + ) -> None: + _log_api_usage_once(self) + from .. import get_video_backend + + self.backend = get_video_backend() + if isinstance(src, str): + if not src: + raise ValueError("src cannot be empty") + elif isinstance(src, bytes): + if self.backend in ["cuda"]: + raise RuntimeError( + "VideoReader cannot be initialized from bytes object when using cuda or pyav backend." + ) + elif self.backend == "pyav": + src = io.BytesIO(src) + else: + with warnings.catch_warnings(): + # Ignore the warning because we actually don't modify the buffer in this function + warnings.filterwarnings("ignore", message="The given buffer is not writable") + src = torch.frombuffer(src, dtype=torch.uint8) + elif isinstance(src, torch.Tensor): + if self.backend in ["cuda", "pyav"]: + raise RuntimeError( + "VideoReader cannot be initialized from Tensor object when using cuda or pyav backend." + ) + else: + raise ValueError(f"src must be either string, Tensor or bytes object. Got {type(src)}") + + if self.backend == "cuda": + device = torch.device("cuda") + self._c = torch.classes.torchvision.GPUDecoder(src, device) + + elif self.backend == "video_reader": + if isinstance(src, str): + self._c = torch.classes.torchvision.Video(src, stream, num_threads) + elif isinstance(src, torch.Tensor): + self._c = torch.classes.torchvision.Video("", "", 0) + self._c.init_from_memory(src, stream, num_threads) + + elif self.backend == "pyav": + self.container = av.open(src, metadata_errors="ignore") + # TODO: load metadata + stream_type = stream.split(":")[0] + stream_id = 0 if len(stream.split(":")) == 1 else int(stream.split(":")[1]) + self.pyav_stream = {stream_type: stream_id} + self._c = self.container.decode(**self.pyav_stream) + + # TODO: add extradata exception + + else: + raise RuntimeError("Unknown video backend: {}".format(self.backend)) + + def __next__(self) -> Dict[str, Any]: + """Decodes and returns the next frame of the current stream. + Frames are encoded as a dict with mandatory + data and pts fields, where data is a tensor, and pts is a + presentation timestamp of the frame expressed in seconds + as a float. + + Returns: + (dict): a dictionary and containing decoded frame (``data``) + and corresponding timestamp (``pts``) in seconds + + """ + if self.backend == "cuda": + frame = self._c.next() + if frame.numel() == 0: + raise StopIteration + return {"data": frame, "pts": None} + elif self.backend == "video_reader": + frame, pts = self._c.next() + else: + try: + frame = next(self._c) + pts = float(frame.pts * frame.time_base) + if "video" in self.pyav_stream: + frame = torch.as_tensor(frame.to_rgb().to_ndarray()).permute(2, 0, 1) + elif "audio" in self.pyav_stream: + frame = torch.as_tensor(frame.to_ndarray()).permute(1, 0) + else: + frame = None + except av.error.EOFError: + raise StopIteration + + if frame.numel() == 0: + raise StopIteration + + return {"data": frame, "pts": pts} + + def __iter__(self) -> Iterator[Dict[str, Any]]: + return self + + def seek(self, time_s: float, keyframes_only: bool = False) -> "VideoReader": + """Seek within current stream. + + Args: + time_s (float): seek time in seconds + keyframes_only (bool): allow to seek only to keyframes + + .. note:: + Current implementation is the so-called precise seek. This + means following seek, call to :mod:`next()` will return the + frame with the exact timestamp if it exists or + the first frame with timestamp larger than ``time_s``. + """ + if self.backend in ["cuda", "video_reader"]: + self._c.seek(time_s, keyframes_only) + else: + # handle special case as pyav doesn't catch it + if time_s < 0: + time_s = 0 + temp_str = self.container.streams.get(**self.pyav_stream)[0] + offset = int(round(time_s / temp_str.time_base)) + if not keyframes_only: + warnings.warn("Accurate seek is not implemented for pyav backend") + self.container.seek(offset, backward=True, any_frame=False, stream=temp_str) + self._c = self.container.decode(**self.pyav_stream) + return self + + def get_metadata(self) -> Dict[str, Any]: + """Returns video metadata + + Returns: + (dict): dictionary containing duration and frame rate for every stream + """ + if self.backend == "pyav": + metadata = {} # type: Dict[str, Any] + for stream in self.container.streams: + if stream.type not in metadata: + if stream.type == "video": + rate_n = "fps" + else: + rate_n = "framerate" + metadata[stream.type] = {rate_n: [], "duration": []} + + rate = getattr(stream, "average_rate", None) or stream.sample_rate + + metadata[stream.type]["duration"].append(float(stream.duration * stream.time_base)) + metadata[stream.type][rate_n].append(float(rate)) + return metadata + return self._c.get_metadata() + + def set_current_stream(self, stream: str) -> bool: + """Set current stream. + Explicitly define the stream we are operating on. + + Args: + stream (string): descriptor of the required stream. Defaults to ``"video:0"`` + Currently available stream types include ``['video', 'audio']``. + Each descriptor consists of two parts: stream type (e.g. 'video') and + a unique stream id (which are determined by video encoding). + In this way, if the video container contains multiple + streams of the same type, users can access the one they want. + If only stream type is passed, the decoder auto-detects first stream + of that type and returns it. + + Returns: + (bool): True on success, False otherwise + """ + if self.backend == "cuda": + warnings.warn("GPU decoding only works with video stream.") + if self.backend == "pyav": + stream_type = stream.split(":")[0] + stream_id = 0 if len(stream.split(":")) == 1 else int(stream.split(":")[1]) + self.pyav_stream = {stream_type: stream_id} + self._c = self.container.decode(**self.pyav_stream) + return True + return self._c.set_current_stream(stream) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..58f4f50658ff8b97d23ac5bb48485fd7895af0e5 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__init__.py @@ -0,0 +1,23 @@ +from .alexnet import * +from .convnext import * +from .densenet import * +from .efficientnet import * +from .googlenet import * +from .inception import * +from .mnasnet import * +from .mobilenet import * +from .regnet import * +from .resnet import * +from .shufflenetv2 import * +from .squeezenet import * +from .vgg import * +from .vision_transformer import * +from .swin_transformer import * +from .maxvit import * +from . import detection, optical_flow, quantization, segmentation, video + +# The Weights and WeightsEnum are developer-facing utils that we make public for +# downstream libs like torchgeo https://github.com/pytorch/vision/issues/7094 +# TODO: we could / should document them publicly, but it's not clear where, as +# they're not intended for end users. +from ._api import get_model, get_model_builder, get_model_weights, get_weight, list_models, Weights, WeightsEnum diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..10e9d971f4c20e87e79372b32ff31b08c615fe42 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_api.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_api.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..936ef49432a1aaf3971ef6464bd94df5b6421d56 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_api.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_meta.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_meta.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..52afdc3ffd8fba29457a9fa6dc2abcc9624ab799 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_meta.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d0bc3a3fd323cb4c94decee70bcc89378b50e49 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/alexnet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/alexnet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a99c199e2d1a5e775f0299f90a5bd0acc30c22b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/alexnet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/convnext.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/convnext.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f80206773695fc9cf96aa106612bb74af2aea678 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/convnext.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/densenet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/densenet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6215601fa3b36301b05a3d243f0db964d20ccc19 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/densenet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/efficientnet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/efficientnet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9405bb022c378bf185817e59d81e6df1e2a1acf Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/efficientnet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/feature_extraction.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/feature_extraction.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8bb1bb2b15d4a32e203892d1bdedbb2928777bba Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/feature_extraction.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/googlenet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/googlenet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2ade6e40b7490a9a2112870aa1baaab224cc2021 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/googlenet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/inception.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/inception.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..30877c654bffcf649c162186f3dcc343abce3b47 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/inception.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/maxvit.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/maxvit.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16a1d2c03e93308baf601c3abbbc2f6665fe9d04 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/maxvit.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mnasnet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mnasnet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..387a28c14f58a6e5185a5814b28247a9911f09c3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mnasnet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98500ce7c9eec985a4dd1b2a6f70db125670882a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenetv2.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenetv2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e18e12a2b572c7572772451fbd27524b1417e247 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenetv2.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenetv3.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenetv3.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dc30a7a9bde0578942cbda782e4b4cc7690000be Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/mobilenetv3.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/regnet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/regnet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..159896d762c620c1068067ac82550d7f5bc9f553 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/regnet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/resnet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/resnet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a41c902918e4bc10218ce5a6aff2be9301f314bd Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/resnet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/shufflenetv2.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/shufflenetv2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f697d87d26e0a0bf4ba12a77dce287d52988de3b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/shufflenetv2.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/squeezenet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/squeezenet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b6e4532be7dd9fe55b4eddb7e7a63f9812068714 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/squeezenet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/swin_transformer.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/swin_transformer.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad2532f2794f55c56e75c632b05d25304ffa6306 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/swin_transformer.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/vgg.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/vgg.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..260a60f0fe0c3474b58d34b4c8d7ab6e0a25b2c2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/vgg.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/vision_transformer.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/vision_transformer.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..46fdab429ce9b1bed422b15a8dd19faaafe1302f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/__pycache__/vision_transformer.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_api.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_api.py new file mode 100644 index 0000000000000000000000000000000000000000..9a53aaf0a36e2e62b8f2247f0be7beea8a94c39f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_api.py @@ -0,0 +1,277 @@ +import fnmatch +import importlib +import inspect +import sys +from dataclasses import dataclass +from enum import Enum +from functools import partial +from inspect import signature +from types import ModuleType +from typing import Any, Callable, Dict, Iterable, List, Mapping, Optional, Set, Type, TypeVar, Union + +from torch import nn + +from .._internally_replaced_utils import load_state_dict_from_url + + +__all__ = ["WeightsEnum", "Weights", "get_model", "get_model_builder", "get_model_weights", "get_weight", "list_models"] + + +@dataclass +class Weights: + """ + This class is used to group important attributes associated with the pre-trained weights. + + Args: + url (str): The location where we find the weights. + transforms (Callable): A callable that constructs the preprocessing method (or validation preset transforms) + needed to use the model. The reason we attach a constructor method rather than an already constructed + object is because the specific object might have memory and thus we want to delay initialization until + needed. + meta (Dict[str, Any]): Stores meta-data related to the weights of the model and its configuration. These can be + informative attributes (for example the number of parameters/flops, recipe link/methods used in training + etc), configuration parameters (for example the `num_classes`) needed to construct the model or important + meta-data (for example the `classes` of a classification model) needed to use the model. + """ + + url: str + transforms: Callable + meta: Dict[str, Any] + + def __eq__(self, other: Any) -> bool: + # We need this custom implementation for correct deep-copy and deserialization behavior. + # TL;DR: After the definition of an enum, creating a new instance, i.e. by deep-copying or deserializing it, + # involves an equality check against the defined members. Unfortunately, the `transforms` attribute is often + # defined with `functools.partial` and `fn = partial(...); assert deepcopy(fn) != fn`. Without custom handling + # for it, the check against the defined members would fail and effectively prevent the weights from being + # deep-copied or deserialized. + # See https://github.com/pytorch/vision/pull/7107 for details. + if not isinstance(other, Weights): + return NotImplemented + + if self.url != other.url: + return False + + if self.meta != other.meta: + return False + + if isinstance(self.transforms, partial) and isinstance(other.transforms, partial): + return ( + self.transforms.func == other.transforms.func + and self.transforms.args == other.transforms.args + and self.transforms.keywords == other.transforms.keywords + ) + else: + return self.transforms == other.transforms + + +class WeightsEnum(Enum): + """ + This class is the parent class of all model weights. Each model building method receives an optional `weights` + parameter with its associated pre-trained weights. It inherits from `Enum` and its values should be of type + `Weights`. + + Args: + value (Weights): The data class entry with the weight information. + """ + + @classmethod + def verify(cls, obj: Any) -> Any: + if obj is not None: + if type(obj) is str: + obj = cls[obj.replace(cls.__name__ + ".", "")] + elif not isinstance(obj, cls): + raise TypeError( + f"Invalid Weight class provided; expected {cls.__name__} but received {obj.__class__.__name__}." + ) + return obj + + def get_state_dict(self, *args: Any, **kwargs: Any) -> Mapping[str, Any]: + return load_state_dict_from_url(self.url, *args, **kwargs) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}.{self._name_}" + + @property + def url(self): + return self.value.url + + @property + def transforms(self): + return self.value.transforms + + @property + def meta(self): + return self.value.meta + + +def get_weight(name: str) -> WeightsEnum: + """ + Gets the weights enum value by its full name. Example: "ResNet50_Weights.IMAGENET1K_V1" + + Args: + name (str): The name of the weight enum entry. + + Returns: + WeightsEnum: The requested weight enum. + """ + try: + enum_name, value_name = name.split(".") + except ValueError: + raise ValueError(f"Invalid weight name provided: '{name}'.") + + base_module_name = ".".join(sys.modules[__name__].__name__.split(".")[:-1]) + base_module = importlib.import_module(base_module_name) + model_modules = [base_module] + [ + x[1] + for x in inspect.getmembers(base_module, inspect.ismodule) + if x[1].__file__.endswith("__init__.py") # type: ignore[union-attr] + ] + + weights_enum = None + for m in model_modules: + potential_class = m.__dict__.get(enum_name, None) + if potential_class is not None and issubclass(potential_class, WeightsEnum): + weights_enum = potential_class + break + + if weights_enum is None: + raise ValueError(f"The weight enum '{enum_name}' for the specific method couldn't be retrieved.") + + return weights_enum[value_name] + + +def get_model_weights(name: Union[Callable, str]) -> Type[WeightsEnum]: + """ + Returns the weights enum class associated to the given model. + + Args: + name (callable or str): The model builder function or the name under which it is registered. + + Returns: + weights_enum (WeightsEnum): The weights enum class associated with the model. + """ + model = get_model_builder(name) if isinstance(name, str) else name + return _get_enum_from_fn(model) + + +def _get_enum_from_fn(fn: Callable) -> Type[WeightsEnum]: + """ + Internal method that gets the weight enum of a specific model builder method. + + Args: + fn (Callable): The builder method used to create the model. + Returns: + WeightsEnum: The requested weight enum. + """ + sig = signature(fn) + if "weights" not in sig.parameters: + raise ValueError("The method is missing the 'weights' argument.") + + ann = signature(fn).parameters["weights"].annotation + weights_enum = None + if isinstance(ann, type) and issubclass(ann, WeightsEnum): + weights_enum = ann + else: + # handle cases like Union[Optional, T] + # TODO: Replace ann.__args__ with typing.get_args(ann) after python >= 3.8 + for t in ann.__args__: # type: ignore[union-attr] + if isinstance(t, type) and issubclass(t, WeightsEnum): + weights_enum = t + break + + if weights_enum is None: + raise ValueError( + "The WeightsEnum class for the specific method couldn't be retrieved. Make sure the typing info is correct." + ) + + return weights_enum + + +M = TypeVar("M", bound=nn.Module) + +BUILTIN_MODELS = {} + + +def register_model(name: Optional[str] = None) -> Callable[[Callable[..., M]], Callable[..., M]]: + def wrapper(fn: Callable[..., M]) -> Callable[..., M]: + key = name if name is not None else fn.__name__ + if key in BUILTIN_MODELS: + raise ValueError(f"An entry is already registered under the name '{key}'.") + BUILTIN_MODELS[key] = fn + return fn + + return wrapper + + +def list_models( + module: Optional[ModuleType] = None, + include: Union[Iterable[str], str, None] = None, + exclude: Union[Iterable[str], str, None] = None, +) -> List[str]: + """ + Returns a list with the names of registered models. + + Args: + module (ModuleType, optional): The module from which we want to extract the available models. + include (str or Iterable[str], optional): Filter(s) for including the models from the set of all models. + Filters are passed to `fnmatch `__ to match Unix shell-style + wildcards. In case of many filters, the results is the union of individual filters. + exclude (str or Iterable[str], optional): Filter(s) applied after include_filters to remove models. + Filter are passed to `fnmatch `__ to match Unix shell-style + wildcards. In case of many filters, the results is removal of all the models that match any individual filter. + + Returns: + models (list): A list with the names of available models. + """ + all_models = { + k for k, v in BUILTIN_MODELS.items() if module is None or v.__module__.rsplit(".", 1)[0] == module.__name__ + } + if include: + models: Set[str] = set() + if isinstance(include, str): + include = [include] + for include_filter in include: + models = models | set(fnmatch.filter(all_models, include_filter)) + else: + models = all_models + + if exclude: + if isinstance(exclude, str): + exclude = [exclude] + for exclude_filter in exclude: + models = models - set(fnmatch.filter(all_models, exclude_filter)) + return sorted(models) + + +def get_model_builder(name: str) -> Callable[..., nn.Module]: + """ + Gets the model name and returns the model builder method. + + Args: + name (str): The name under which the model is registered. + + Returns: + fn (Callable): The model builder method. + """ + name = name.lower() + try: + fn = BUILTIN_MODELS[name] + except KeyError: + raise ValueError(f"Unknown model {name}") + return fn + + +def get_model(name: str, **config: Any) -> nn.Module: + """ + Gets the model name and configuration and returns an instantiated model. + + Args: + name (str): The name under which the model is registered. + **config (Any): parameters passed to the model builder method. + + Returns: + model (nn.Module): The initialized model. + """ + fn = get_model_builder(name) + return fn(**config) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_meta.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_meta.py new file mode 100644 index 0000000000000000000000000000000000000000..d5f856c291ddd98e485a0ab07501aa51077feb2b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_meta.py @@ -0,0 +1,1554 @@ +""" +This file is part of the private API. Please do not refer to any variables defined here directly as they will be +removed on future versions without warning. +""" + +# This will eventually be replaced with a call at torchvision.datasets.info("imagenet").categories +_IMAGENET_CATEGORIES = [ + "tench", + "goldfish", + "great white shark", + "tiger shark", + "hammerhead", + "electric ray", + "stingray", + "cock", + "hen", + "ostrich", + "brambling", + "goldfinch", + "house finch", + "junco", + "indigo bunting", + "robin", + "bulbul", + "jay", + "magpie", + "chickadee", + "water ouzel", + "kite", + "bald eagle", + "vulture", + "great grey owl", + "European fire salamander", + "common newt", + "eft", + "spotted salamander", + "axolotl", + "bullfrog", + "tree frog", + "tailed frog", + "loggerhead", + "leatherback turtle", + "mud turtle", + "terrapin", + "box turtle", + "banded gecko", + "common iguana", + "American chameleon", + "whiptail", + "agama", + "frilled lizard", + "alligator lizard", + "Gila monster", + "green lizard", + "African chameleon", + "Komodo dragon", + "African crocodile", + "American alligator", + "triceratops", + "thunder snake", + "ringneck snake", + "hognose snake", + "green snake", + "king snake", + "garter snake", + "water snake", + "vine snake", + "night snake", + "boa constrictor", + "rock python", + "Indian cobra", + "green mamba", + "sea snake", + "horned viper", + "diamondback", + "sidewinder", + "trilobite", + "harvestman", + "scorpion", + "black and gold garden spider", + "barn spider", + "garden spider", + "black widow", + "tarantula", + "wolf spider", + "tick", + "centipede", + "black grouse", + "ptarmigan", + "ruffed grouse", + "prairie chicken", + "peacock", + "quail", + "partridge", + "African grey", + "macaw", + "sulphur-crested cockatoo", + "lorikeet", + "coucal", + "bee eater", + "hornbill", + "hummingbird", + "jacamar", + "toucan", + "drake", + "red-breasted merganser", + "goose", + "black swan", + "tusker", + "echidna", + "platypus", + "wallaby", + "koala", + "wombat", + "jellyfish", + "sea anemone", + "brain coral", + "flatworm", + "nematode", + "conch", + "snail", + "slug", + "sea slug", + "chiton", + "chambered nautilus", + "Dungeness crab", + "rock crab", + "fiddler crab", + "king crab", + "American lobster", + "spiny lobster", + "crayfish", + "hermit crab", + "isopod", + "white stork", + "black stork", + "spoonbill", + "flamingo", + "little blue heron", + "American egret", + "bittern", + "crane bird", + "limpkin", + "European gallinule", + "American coot", + "bustard", + "ruddy turnstone", + "red-backed sandpiper", + "redshank", + "dowitcher", + "oystercatcher", + "pelican", + "king penguin", + "albatross", + "grey whale", + "killer whale", + "dugong", + "sea lion", + "Chihuahua", + "Japanese spaniel", + "Maltese dog", + "Pekinese", + "Shih-Tzu", + "Blenheim spaniel", + "papillon", + "toy terrier", + "Rhodesian ridgeback", + "Afghan hound", + "basset", + "beagle", + "bloodhound", + "bluetick", + "black-and-tan coonhound", + "Walker hound", + "English foxhound", + "redbone", + "borzoi", + "Irish wolfhound", + "Italian greyhound", + "whippet", + "Ibizan hound", + "Norwegian elkhound", + "otterhound", + "Saluki", + "Scottish deerhound", + "Weimaraner", + "Staffordshire bullterrier", + "American Staffordshire terrier", + "Bedlington terrier", + "Border terrier", + "Kerry blue terrier", + "Irish terrier", + "Norfolk terrier", + "Norwich terrier", + "Yorkshire terrier", + "wire-haired fox terrier", + "Lakeland terrier", + "Sealyham terrier", + "Airedale", + "cairn", + "Australian terrier", + "Dandie Dinmont", + "Boston bull", + "miniature schnauzer", + "giant schnauzer", + "standard schnauzer", + "Scotch terrier", + "Tibetan terrier", + "silky terrier", + "soft-coated wheaten terrier", + "West Highland white terrier", + "Lhasa", + "flat-coated retriever", + "curly-coated retriever", + "golden retriever", + "Labrador retriever", + "Chesapeake Bay retriever", + "German short-haired pointer", + "vizsla", + "English setter", + "Irish setter", + "Gordon setter", + "Brittany spaniel", + "clumber", + "English springer", + "Welsh springer spaniel", + "cocker spaniel", + "Sussex spaniel", + "Irish water spaniel", + "kuvasz", + "schipperke", + "groenendael", + "malinois", + "briard", + "kelpie", + "komondor", + "Old English sheepdog", + "Shetland sheepdog", + "collie", + "Border collie", + "Bouvier des Flandres", + "Rottweiler", + "German shepherd", + "Doberman", + "miniature pinscher", + "Greater Swiss Mountain dog", + "Bernese mountain dog", + "Appenzeller", + "EntleBucher", + "boxer", + "bull mastiff", + "Tibetan mastiff", + "French bulldog", + "Great Dane", + "Saint Bernard", + "Eskimo dog", + "malamute", + "Siberian husky", + "dalmatian", + "affenpinscher", + "basenji", + "pug", + "Leonberg", + "Newfoundland", + "Great Pyrenees", + "Samoyed", + "Pomeranian", + "chow", + "keeshond", + "Brabancon griffon", + "Pembroke", + "Cardigan", + "toy poodle", + "miniature poodle", + "standard poodle", + "Mexican hairless", + "timber wolf", + "white wolf", + "red wolf", + "coyote", + "dingo", + "dhole", + "African hunting dog", + "hyena", + "red fox", + "kit fox", + "Arctic fox", + "grey fox", + "tabby", + "tiger cat", + "Persian cat", + "Siamese cat", + "Egyptian cat", + "cougar", + "lynx", + "leopard", + "snow leopard", + "jaguar", + "lion", + "tiger", + "cheetah", + "brown bear", + "American black bear", + "ice bear", + "sloth bear", + "mongoose", + "meerkat", + "tiger beetle", + "ladybug", + "ground beetle", + "long-horned beetle", + "leaf beetle", + "dung beetle", + "rhinoceros beetle", + "weevil", + "fly", + "bee", + "ant", + "grasshopper", + "cricket", + "walking stick", + "cockroach", + "mantis", + "cicada", + "leafhopper", + "lacewing", + "dragonfly", + "damselfly", + "admiral", + "ringlet", + "monarch", + "cabbage butterfly", + "sulphur butterfly", + "lycaenid", + "starfish", + "sea urchin", + "sea cucumber", + "wood rabbit", + "hare", + "Angora", + "hamster", + "porcupine", + "fox squirrel", + "marmot", + "beaver", + "guinea pig", + "sorrel", + "zebra", + "hog", + "wild boar", + "warthog", + "hippopotamus", + "ox", + "water buffalo", + "bison", + "ram", + "bighorn", + "ibex", + "hartebeest", + "impala", + "gazelle", + "Arabian camel", + "llama", + "weasel", + "mink", + "polecat", + "black-footed ferret", + "otter", + "skunk", + "badger", + "armadillo", + "three-toed sloth", + "orangutan", + "gorilla", + "chimpanzee", + "gibbon", + "siamang", + "guenon", + "patas", + "baboon", + "macaque", + "langur", + "colobus", + "proboscis monkey", + "marmoset", + "capuchin", + "howler monkey", + "titi", + "spider monkey", + "squirrel monkey", + "Madagascar cat", + "indri", + "Indian elephant", + "African elephant", + "lesser panda", + "giant panda", + "barracouta", + "eel", + "coho", + "rock beauty", + "anemone fish", + "sturgeon", + "gar", + "lionfish", + "puffer", + "abacus", + "abaya", + "academic gown", + "accordion", + "acoustic guitar", + "aircraft carrier", + "airliner", + "airship", + "altar", + "ambulance", + "amphibian", + "analog clock", + "apiary", + "apron", + "ashcan", + "assault rifle", + "backpack", + "bakery", + "balance beam", + "balloon", + "ballpoint", + "Band Aid", + "banjo", + "bannister", + "barbell", + "barber chair", + "barbershop", + "barn", + "barometer", + "barrel", + "barrow", + "baseball", + "basketball", + "bassinet", + "bassoon", + "bathing cap", + "bath towel", + "bathtub", + "beach wagon", + "beacon", + "beaker", + "bearskin", + "beer bottle", + "beer glass", + "bell cote", + "bib", + "bicycle-built-for-two", + "bikini", + "binder", + "binoculars", + "birdhouse", + "boathouse", + "bobsled", + "bolo tie", + "bonnet", + "bookcase", + "bookshop", + "bottlecap", + "bow", + "bow tie", + "brass", + "brassiere", + "breakwater", + "breastplate", + "broom", + "bucket", + "buckle", + "bulletproof vest", + "bullet train", + "butcher shop", + "cab", + "caldron", + "candle", + "cannon", + "canoe", + "can opener", + "cardigan", + "car mirror", + "carousel", + "carpenter's kit", + "carton", + "car wheel", + "cash machine", + "cassette", + "cassette player", + "castle", + "catamaran", + "CD player", + "cello", + "cellular telephone", + "chain", + "chainlink fence", + "chain mail", + "chain saw", + "chest", + "chiffonier", + "chime", + "china cabinet", + "Christmas stocking", + "church", + "cinema", + "cleaver", + "cliff dwelling", + "cloak", + "clog", + "cocktail shaker", + "coffee mug", + "coffeepot", + "coil", + "combination lock", + "computer keyboard", + "confectionery", + "container ship", + "convertible", + "corkscrew", + "cornet", + "cowboy boot", + "cowboy hat", + "cradle", + "crane", + "crash helmet", + "crate", + "crib", + "Crock Pot", + "croquet ball", + "crutch", + "cuirass", + "dam", + "desk", + "desktop computer", + "dial telephone", + "diaper", + "digital clock", + "digital watch", + "dining table", + "dishrag", + "dishwasher", + "disk brake", + "dock", + "dogsled", + "dome", + "doormat", + "drilling platform", + "drum", + "drumstick", + "dumbbell", + "Dutch oven", + "electric fan", + "electric guitar", + "electric locomotive", + "entertainment center", + "envelope", + "espresso maker", + "face powder", + "feather boa", + "file", + "fireboat", + "fire engine", + "fire screen", + "flagpole", + "flute", + "folding chair", + "football helmet", + "forklift", + "fountain", + "fountain pen", + "four-poster", + "freight car", + "French horn", + "frying pan", + "fur coat", + "garbage truck", + "gasmask", + "gas pump", + "goblet", + "go-kart", + "golf ball", + "golfcart", + "gondola", + "gong", + "gown", + "grand piano", + "greenhouse", + "grille", + "grocery store", + "guillotine", + "hair slide", + "hair spray", + "half track", + "hammer", + "hamper", + "hand blower", + "hand-held computer", + "handkerchief", + "hard disc", + "harmonica", + "harp", + "harvester", + "hatchet", + "holster", + "home theater", + "honeycomb", + "hook", + "hoopskirt", + "horizontal bar", + "horse cart", + "hourglass", + "iPod", + "iron", + "jack-o'-lantern", + "jean", + "jeep", + "jersey", + "jigsaw puzzle", + "jinrikisha", + "joystick", + "kimono", + "knee pad", + "knot", + "lab coat", + "ladle", + "lampshade", + "laptop", + "lawn mower", + "lens cap", + "letter opener", + "library", + "lifeboat", + "lighter", + "limousine", + "liner", + "lipstick", + "Loafer", + "lotion", + "loudspeaker", + "loupe", + "lumbermill", + "magnetic compass", + "mailbag", + "mailbox", + "maillot", + "maillot tank suit", + "manhole cover", + "maraca", + "marimba", + "mask", + "matchstick", + "maypole", + "maze", + "measuring cup", + "medicine chest", + "megalith", + "microphone", + "microwave", + "military uniform", + "milk can", + "minibus", + "miniskirt", + "minivan", + "missile", + "mitten", + "mixing bowl", + "mobile home", + "Model T", + "modem", + "monastery", + "monitor", + "moped", + "mortar", + "mortarboard", + "mosque", + "mosquito net", + "motor scooter", + "mountain bike", + "mountain tent", + "mouse", + "mousetrap", + "moving van", + "muzzle", + "nail", + "neck brace", + "necklace", + "nipple", + "notebook", + "obelisk", + "oboe", + "ocarina", + "odometer", + "oil filter", + "organ", + "oscilloscope", + "overskirt", + "oxcart", + "oxygen mask", + "packet", + "paddle", + "paddlewheel", + "padlock", + "paintbrush", + "pajama", + "palace", + "panpipe", + "paper towel", + "parachute", + "parallel bars", + "park bench", + "parking meter", + "passenger car", + "patio", + "pay-phone", + "pedestal", + "pencil box", + "pencil sharpener", + "perfume", + "Petri dish", + "photocopier", + "pick", + "pickelhaube", + "picket fence", + "pickup", + "pier", + "piggy bank", + "pill bottle", + "pillow", + "ping-pong ball", + "pinwheel", + "pirate", + "pitcher", + "plane", + "planetarium", + "plastic bag", + "plate rack", + "plow", + "plunger", + "Polaroid camera", + "pole", + "police van", + "poncho", + "pool table", + "pop bottle", + "pot", + "potter's wheel", + "power drill", + "prayer rug", + "printer", + "prison", + "projectile", + "projector", + "puck", + "punching bag", + "purse", + "quill", + "quilt", + "racer", + "racket", + "radiator", + "radio", + "radio telescope", + "rain barrel", + "recreational vehicle", + "reel", + "reflex camera", + "refrigerator", + "remote control", + "restaurant", + "revolver", + "rifle", + "rocking chair", + "rotisserie", + "rubber eraser", + "rugby ball", + "rule", + "running shoe", + "safe", + "safety pin", + "saltshaker", + "sandal", + "sarong", + "sax", + "scabbard", + "scale", + "school bus", + "schooner", + "scoreboard", + "screen", + "screw", + "screwdriver", + "seat belt", + "sewing machine", + "shield", + "shoe shop", + "shoji", + "shopping basket", + "shopping cart", + "shovel", + "shower cap", + "shower curtain", + "ski", + "ski mask", + "sleeping bag", + "slide rule", + "sliding door", + "slot", + "snorkel", + "snowmobile", + "snowplow", + "soap dispenser", + "soccer ball", + "sock", + "solar dish", + "sombrero", + "soup bowl", + "space bar", + "space heater", + "space shuttle", + "spatula", + "speedboat", + "spider web", + "spindle", + "sports car", + "spotlight", + "stage", + "steam locomotive", + "steel arch bridge", + "steel drum", + "stethoscope", + "stole", + "stone wall", + "stopwatch", + "stove", + "strainer", + "streetcar", + "stretcher", + "studio couch", + "stupa", + "submarine", + "suit", + "sundial", + "sunglass", + "sunglasses", + "sunscreen", + "suspension bridge", + "swab", + "sweatshirt", + "swimming trunks", + "swing", + "switch", + "syringe", + "table lamp", + "tank", + "tape player", + "teapot", + "teddy", + "television", + "tennis ball", + "thatch", + "theater curtain", + "thimble", + "thresher", + "throne", + "tile roof", + "toaster", + "tobacco shop", + "toilet seat", + "torch", + "totem pole", + "tow truck", + "toyshop", + "tractor", + "trailer truck", + "tray", + "trench coat", + "tricycle", + "trimaran", + "tripod", + "triumphal arch", + "trolleybus", + "trombone", + "tub", + "turnstile", + "typewriter keyboard", + "umbrella", + "unicycle", + "upright", + "vacuum", + "vase", + "vault", + "velvet", + "vending machine", + "vestment", + "viaduct", + "violin", + "volleyball", + "waffle iron", + "wall clock", + "wallet", + "wardrobe", + "warplane", + "washbasin", + "washer", + "water bottle", + "water jug", + "water tower", + "whiskey jug", + "whistle", + "wig", + "window screen", + "window shade", + "Windsor tie", + "wine bottle", + "wing", + "wok", + "wooden spoon", + "wool", + "worm fence", + "wreck", + "yawl", + "yurt", + "web site", + "comic book", + "crossword puzzle", + "street sign", + "traffic light", + "book jacket", + "menu", + "plate", + "guacamole", + "consomme", + "hot pot", + "trifle", + "ice cream", + "ice lolly", + "French loaf", + "bagel", + "pretzel", + "cheeseburger", + "hotdog", + "mashed potato", + "head cabbage", + "broccoli", + "cauliflower", + "zucchini", + "spaghetti squash", + "acorn squash", + "butternut squash", + "cucumber", + "artichoke", + "bell pepper", + "cardoon", + "mushroom", + "Granny Smith", + "strawberry", + "orange", + "lemon", + "fig", + "pineapple", + "banana", + "jackfruit", + "custard apple", + "pomegranate", + "hay", + "carbonara", + "chocolate sauce", + "dough", + "meat loaf", + "pizza", + "potpie", + "burrito", + "red wine", + "espresso", + "cup", + "eggnog", + "alp", + "bubble", + "cliff", + "coral reef", + "geyser", + "lakeside", + "promontory", + "sandbar", + "seashore", + "valley", + "volcano", + "ballplayer", + "groom", + "scuba diver", + "rapeseed", + "daisy", + "yellow lady's slipper", + "corn", + "acorn", + "hip", + "buckeye", + "coral fungus", + "agaric", + "gyromitra", + "stinkhorn", + "earthstar", + "hen-of-the-woods", + "bolete", + "ear", + "toilet tissue", +] + +# To be replaced with torchvision.datasets.info("coco").categories +_COCO_CATEGORIES = [ + "__background__", + "person", + "bicycle", + "car", + "motorcycle", + "airplane", + "bus", + "train", + "truck", + "boat", + "traffic light", + "fire hydrant", + "N/A", + "stop sign", + "parking meter", + "bench", + "bird", + "cat", + "dog", + "horse", + "sheep", + "cow", + "elephant", + "bear", + "zebra", + "giraffe", + "N/A", + "backpack", + "umbrella", + "N/A", + "N/A", + "handbag", + "tie", + "suitcase", + "frisbee", + "skis", + "snowboard", + "sports ball", + "kite", + "baseball bat", + "baseball glove", + "skateboard", + "surfboard", + "tennis racket", + "bottle", + "N/A", + "wine glass", + "cup", + "fork", + "knife", + "spoon", + "bowl", + "banana", + "apple", + "sandwich", + "orange", + "broccoli", + "carrot", + "hot dog", + "pizza", + "donut", + "cake", + "chair", + "couch", + "potted plant", + "bed", + "N/A", + "dining table", + "N/A", + "N/A", + "toilet", + "N/A", + "tv", + "laptop", + "mouse", + "remote", + "keyboard", + "cell phone", + "microwave", + "oven", + "toaster", + "sink", + "refrigerator", + "N/A", + "book", + "clock", + "vase", + "scissors", + "teddy bear", + "hair drier", + "toothbrush", +] + +# To be replaced with torchvision.datasets.info("coco_kp") +_COCO_PERSON_CATEGORIES = ["no person", "person"] +_COCO_PERSON_KEYPOINT_NAMES = [ + "nose", + "left_eye", + "right_eye", + "left_ear", + "right_ear", + "left_shoulder", + "right_shoulder", + "left_elbow", + "right_elbow", + "left_wrist", + "right_wrist", + "left_hip", + "right_hip", + "left_knee", + "right_knee", + "left_ankle", + "right_ankle", +] + +# To be replaced with torchvision.datasets.info("voc").categories +_VOC_CATEGORIES = [ + "__background__", + "aeroplane", + "bicycle", + "bird", + "boat", + "bottle", + "bus", + "car", + "cat", + "chair", + "cow", + "diningtable", + "dog", + "horse", + "motorbike", + "person", + "pottedplant", + "sheep", + "sofa", + "train", + "tvmonitor", +] + +# To be replaced with torchvision.datasets.info("kinetics400").categories +_KINETICS400_CATEGORIES = [ + "abseiling", + "air drumming", + "answering questions", + "applauding", + "applying cream", + "archery", + "arm wrestling", + "arranging flowers", + "assembling computer", + "auctioning", + "baby waking up", + "baking cookies", + "balloon blowing", + "bandaging", + "barbequing", + "bartending", + "beatboxing", + "bee keeping", + "belly dancing", + "bench pressing", + "bending back", + "bending metal", + "biking through snow", + "blasting sand", + "blowing glass", + "blowing leaves", + "blowing nose", + "blowing out candles", + "bobsledding", + "bookbinding", + "bouncing on trampoline", + "bowling", + "braiding hair", + "breading or breadcrumbing", + "breakdancing", + "brush painting", + "brushing hair", + "brushing teeth", + "building cabinet", + "building shed", + "bungee jumping", + "busking", + "canoeing or kayaking", + "capoeira", + "carrying baby", + "cartwheeling", + "carving pumpkin", + "catching fish", + "catching or throwing baseball", + "catching or throwing frisbee", + "catching or throwing softball", + "celebrating", + "changing oil", + "changing wheel", + "checking tires", + "cheerleading", + "chopping wood", + "clapping", + "clay pottery making", + "clean and jerk", + "cleaning floor", + "cleaning gutters", + "cleaning pool", + "cleaning shoes", + "cleaning toilet", + "cleaning windows", + "climbing a rope", + "climbing ladder", + "climbing tree", + "contact juggling", + "cooking chicken", + "cooking egg", + "cooking on campfire", + "cooking sausages", + "counting money", + "country line dancing", + "cracking neck", + "crawling baby", + "crossing river", + "crying", + "curling hair", + "cutting nails", + "cutting pineapple", + "cutting watermelon", + "dancing ballet", + "dancing charleston", + "dancing gangnam style", + "dancing macarena", + "deadlifting", + "decorating the christmas tree", + "digging", + "dining", + "disc golfing", + "diving cliff", + "dodgeball", + "doing aerobics", + "doing laundry", + "doing nails", + "drawing", + "dribbling basketball", + "drinking", + "drinking beer", + "drinking shots", + "driving car", + "driving tractor", + "drop kicking", + "drumming fingers", + "dunking basketball", + "dying hair", + "eating burger", + "eating cake", + "eating carrots", + "eating chips", + "eating doughnuts", + "eating hotdog", + "eating ice cream", + "eating spaghetti", + "eating watermelon", + "egg hunting", + "exercising arm", + "exercising with an exercise ball", + "extinguishing fire", + "faceplanting", + "feeding birds", + "feeding fish", + "feeding goats", + "filling eyebrows", + "finger snapping", + "fixing hair", + "flipping pancake", + "flying kite", + "folding clothes", + "folding napkins", + "folding paper", + "front raises", + "frying vegetables", + "garbage collecting", + "gargling", + "getting a haircut", + "getting a tattoo", + "giving or receiving award", + "golf chipping", + "golf driving", + "golf putting", + "grinding meat", + "grooming dog", + "grooming horse", + "gymnastics tumbling", + "hammer throw", + "headbanging", + "headbutting", + "high jump", + "high kick", + "hitting baseball", + "hockey stop", + "holding snake", + "hopscotch", + "hoverboarding", + "hugging", + "hula hooping", + "hurdling", + "hurling (sport)", + "ice climbing", + "ice fishing", + "ice skating", + "ironing", + "javelin throw", + "jetskiing", + "jogging", + "juggling balls", + "juggling fire", + "juggling soccer ball", + "jumping into pool", + "jumpstyle dancing", + "kicking field goal", + "kicking soccer ball", + "kissing", + "kitesurfing", + "knitting", + "krumping", + "laughing", + "laying bricks", + "long jump", + "lunge", + "making a cake", + "making a sandwich", + "making bed", + "making jewelry", + "making pizza", + "making snowman", + "making sushi", + "making tea", + "marching", + "massaging back", + "massaging feet", + "massaging legs", + "massaging person's head", + "milking cow", + "mopping floor", + "motorcycling", + "moving furniture", + "mowing lawn", + "news anchoring", + "opening bottle", + "opening present", + "paragliding", + "parasailing", + "parkour", + "passing American football (in game)", + "passing American football (not in game)", + "peeling apples", + "peeling potatoes", + "petting animal (not cat)", + "petting cat", + "picking fruit", + "planting trees", + "plastering", + "playing accordion", + "playing badminton", + "playing bagpipes", + "playing basketball", + "playing bass guitar", + "playing cards", + "playing cello", + "playing chess", + "playing clarinet", + "playing controller", + "playing cricket", + "playing cymbals", + "playing didgeridoo", + "playing drums", + "playing flute", + "playing guitar", + "playing harmonica", + "playing harp", + "playing ice hockey", + "playing keyboard", + "playing kickball", + "playing monopoly", + "playing organ", + "playing paintball", + "playing piano", + "playing poker", + "playing recorder", + "playing saxophone", + "playing squash or racquetball", + "playing tennis", + "playing trombone", + "playing trumpet", + "playing ukulele", + "playing violin", + "playing volleyball", + "playing xylophone", + "pole vault", + "presenting weather forecast", + "pull ups", + "pumping fist", + "pumping gas", + "punching bag", + "punching person (boxing)", + "push up", + "pushing car", + "pushing cart", + "pushing wheelchair", + "reading book", + "reading newspaper", + "recording music", + "riding a bike", + "riding camel", + "riding elephant", + "riding mechanical bull", + "riding mountain bike", + "riding mule", + "riding or walking with horse", + "riding scooter", + "riding unicycle", + "ripping paper", + "robot dancing", + "rock climbing", + "rock scissors paper", + "roller skating", + "running on treadmill", + "sailing", + "salsa dancing", + "sanding floor", + "scrambling eggs", + "scuba diving", + "setting table", + "shaking hands", + "shaking head", + "sharpening knives", + "sharpening pencil", + "shaving head", + "shaving legs", + "shearing sheep", + "shining shoes", + "shooting basketball", + "shooting goal (soccer)", + "shot put", + "shoveling snow", + "shredding paper", + "shuffling cards", + "side kick", + "sign language interpreting", + "singing", + "situp", + "skateboarding", + "ski jumping", + "skiing (not slalom or crosscountry)", + "skiing crosscountry", + "skiing slalom", + "skipping rope", + "skydiving", + "slacklining", + "slapping", + "sled dog racing", + "smoking", + "smoking hookah", + "snatch weight lifting", + "sneezing", + "sniffing", + "snorkeling", + "snowboarding", + "snowkiting", + "snowmobiling", + "somersaulting", + "spinning poi", + "spray painting", + "spraying", + "springboard diving", + "squat", + "sticking tongue out", + "stomping grapes", + "stretching arm", + "stretching leg", + "strumming guitar", + "surfing crowd", + "surfing water", + "sweeping floor", + "swimming backstroke", + "swimming breast stroke", + "swimming butterfly stroke", + "swing dancing", + "swinging legs", + "swinging on something", + "sword fighting", + "tai chi", + "taking a shower", + "tango dancing", + "tap dancing", + "tapping guitar", + "tapping pen", + "tasting beer", + "tasting food", + "testifying", + "texting", + "throwing axe", + "throwing ball", + "throwing discus", + "tickling", + "tobogganing", + "tossing coin", + "tossing salad", + "training dog", + "trapezing", + "trimming or shaving beard", + "trimming trees", + "triple jump", + "tying bow tie", + "tying knot (not on a tie)", + "tying tie", + "unboxing", + "unloading truck", + "using computer", + "using remote controller (not gaming)", + "using segway", + "vault", + "waiting in line", + "walking the dog", + "washing dishes", + "washing feet", + "washing hair", + "washing hands", + "water skiing", + "water sliding", + "watering plants", + "waxing back", + "waxing chest", + "waxing eyebrows", + "waxing legs", + "weaving basket", + "welding", + "whistling", + "windsurfing", + "wrapping present", + "wrestling", + "writing", + "yawning", + "yoga", + "zumba", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..753c2cc5d02330a9a3c0c085022637ab162b95ed --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/_utils.py @@ -0,0 +1,256 @@ +import functools +import inspect +import warnings +from collections import OrderedDict +from typing import Any, Callable, Dict, Optional, Tuple, TypeVar, Union + +from torch import nn + +from .._utils import sequence_to_str +from ._api import WeightsEnum + + +class IntermediateLayerGetter(nn.ModuleDict): + """ + Module wrapper that returns intermediate layers from a model + + It has a strong assumption that the modules have been registered + into the model in the same order as they are used. + This means that one should **not** reuse the same nn.Module + twice in the forward if you want this to work. + + Additionally, it is only able to query submodules that are directly + assigned to the model. So if `model` is passed, `model.feature1` can + be returned, but not `model.feature1.layer2`. + + Args: + model (nn.Module): model on which we will extract the features + return_layers (Dict[name, new_name]): a dict containing the names + of the modules for which the activations will be returned as + the key of the dict, and the value of the dict is the name + of the returned activation (which the user can specify). + + Examples:: + + >>> m = torchvision.models.resnet18(weights=ResNet18_Weights.DEFAULT) + >>> # extract layer1 and layer3, giving as names `feat1` and feat2` + >>> new_m = torchvision.models._utils.IntermediateLayerGetter(m, + >>> {'layer1': 'feat1', 'layer3': 'feat2'}) + >>> out = new_m(torch.rand(1, 3, 224, 224)) + >>> print([(k, v.shape) for k, v in out.items()]) + >>> [('feat1', torch.Size([1, 64, 56, 56])), + >>> ('feat2', torch.Size([1, 256, 14, 14]))] + """ + + _version = 2 + __annotations__ = { + "return_layers": Dict[str, str], + } + + def __init__(self, model: nn.Module, return_layers: Dict[str, str]) -> None: + if not set(return_layers).issubset([name for name, _ in model.named_children()]): + raise ValueError("return_layers are not present in model") + orig_return_layers = return_layers + return_layers = {str(k): str(v) for k, v in return_layers.items()} + layers = OrderedDict() + for name, module in model.named_children(): + layers[name] = module + if name in return_layers: + del return_layers[name] + if not return_layers: + break + + super().__init__(layers) + self.return_layers = orig_return_layers + + def forward(self, x): + out = OrderedDict() + for name, module in self.items(): + x = module(x) + if name in self.return_layers: + out_name = self.return_layers[name] + out[out_name] = x + return out + + +def _make_divisible(v: float, divisor: int, min_value: Optional[int] = None) -> int: + """ + This function is taken from the original tf repo. + It ensures that all layers have a channel number that is divisible by 8 + It can be seen here: + https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet/mobilenet.py + """ + if min_value is None: + min_value = divisor + new_v = max(min_value, int(v + divisor / 2) // divisor * divisor) + # Make sure that round down does not go down by more than 10%. + if new_v < 0.9 * v: + new_v += divisor + return new_v + + +D = TypeVar("D") + + +def kwonly_to_pos_or_kw(fn: Callable[..., D]) -> Callable[..., D]: + """Decorates a function that uses keyword only parameters to also allow them being passed as positionals. + + For example, consider the use case of changing the signature of ``old_fn`` into the one from ``new_fn``: + + .. code:: + + def old_fn(foo, bar, baz=None): + ... + + def new_fn(foo, *, bar, baz=None): + ... + + Calling ``old_fn("foo", "bar, "baz")`` was valid, but the same call is no longer valid with ``new_fn``. To keep BC + and at the same time warn the user of the deprecation, this decorator can be used: + + .. code:: + + @kwonly_to_pos_or_kw + def new_fn(foo, *, bar, baz=None): + ... + + new_fn("foo", "bar, "baz") + """ + params = inspect.signature(fn).parameters + + try: + keyword_only_start_idx = next( + idx for idx, param in enumerate(params.values()) if param.kind == param.KEYWORD_ONLY + ) + except StopIteration: + raise TypeError(f"Found no keyword-only parameter on function '{fn.__name__}'") from None + + keyword_only_params = tuple(inspect.signature(fn).parameters)[keyword_only_start_idx:] + + @functools.wraps(fn) + def wrapper(*args: Any, **kwargs: Any) -> D: + args, keyword_only_args = args[:keyword_only_start_idx], args[keyword_only_start_idx:] + if keyword_only_args: + keyword_only_kwargs = dict(zip(keyword_only_params, keyword_only_args)) + warnings.warn( + f"Using {sequence_to_str(tuple(keyword_only_kwargs.keys()), separate_last='and ')} as positional " + f"parameter(s) is deprecated since 0.13 and may be removed in the future. Please use keyword parameter(s) " + f"instead." + ) + kwargs.update(keyword_only_kwargs) + + return fn(*args, **kwargs) + + return wrapper + + +W = TypeVar("W", bound=WeightsEnum) +M = TypeVar("M", bound=nn.Module) +V = TypeVar("V") + + +def handle_legacy_interface(**weights: Tuple[str, Union[Optional[W], Callable[[Dict[str, Any]], Optional[W]]]]): + """Decorates a model builder with the new interface to make it compatible with the old. + + In particular this handles two things: + + 1. Allows positional parameters again, but emits a deprecation warning in case they are used. See + :func:`torchvision.prototype.utils._internal.kwonly_to_pos_or_kw` for details. + 2. Handles the default value change from ``pretrained=False`` to ``weights=None`` and ``pretrained=True`` to + ``weights=Weights`` and emits a deprecation warning with instructions for the new interface. + + Args: + **weights (Tuple[str, Union[Optional[W], Callable[[Dict[str, Any]], Optional[W]]]]): Deprecated parameter + name and default value for the legacy ``pretrained=True``. The default value can be a callable in which + case it will be called with a dictionary of the keyword arguments. The only key that is guaranteed to be in + the dictionary is the deprecated parameter name passed as first element in the tuple. All other parameters + should be accessed with :meth:`~dict.get`. + """ + + def outer_wrapper(builder: Callable[..., M]) -> Callable[..., M]: + @kwonly_to_pos_or_kw + @functools.wraps(builder) + def inner_wrapper(*args: Any, **kwargs: Any) -> M: + for weights_param, (pretrained_param, default) in weights.items(): # type: ignore[union-attr] + # If neither the weights nor the pretrained parameter as passed, or the weights argument already use + # the new style arguments, there is nothing to do. Note that we cannot use `None` as sentinel for the + # weight argument, since it is a valid value. + sentinel = object() + weights_arg = kwargs.get(weights_param, sentinel) + if ( + (weights_param not in kwargs and pretrained_param not in kwargs) + or isinstance(weights_arg, WeightsEnum) + or (isinstance(weights_arg, str) and weights_arg != "legacy") + or weights_arg is None + ): + continue + + # If the pretrained parameter was passed as positional argument, it is now mapped to + # `kwargs[weights_param]`. This happens because the @kwonly_to_pos_or_kw decorator uses the current + # signature to infer the names of positionally passed arguments and thus has no knowledge that there + # used to be a pretrained parameter. + pretrained_positional = weights_arg is not sentinel + if pretrained_positional: + # We put the pretrained argument under its legacy name in the keyword argument dictionary to have + # unified access to the value if the default value is a callable. + kwargs[pretrained_param] = pretrained_arg = kwargs.pop(weights_param) + else: + pretrained_arg = kwargs[pretrained_param] + + if pretrained_arg: + default_weights_arg = default(kwargs) if callable(default) else default + if not isinstance(default_weights_arg, WeightsEnum): + raise ValueError(f"No weights available for model {builder.__name__}") + else: + default_weights_arg = None + + if not pretrained_positional: + warnings.warn( + f"The parameter '{pretrained_param}' is deprecated since 0.13 and may be removed in the future, " + f"please use '{weights_param}' instead." + ) + + msg = ( + f"Arguments other than a weight enum or `None` for '{weights_param}' are deprecated since 0.13 and " + f"may be removed in the future. " + f"The current behavior is equivalent to passing `{weights_param}={default_weights_arg}`." + ) + if pretrained_arg: + msg = ( + f"{msg} You can also use `{weights_param}={type(default_weights_arg).__name__}.DEFAULT` " + f"to get the most up-to-date weights." + ) + warnings.warn(msg) + + del kwargs[pretrained_param] + kwargs[weights_param] = default_weights_arg + + return builder(*args, **kwargs) + + return inner_wrapper + + return outer_wrapper + + +def _ovewrite_named_param(kwargs: Dict[str, Any], param: str, new_value: V) -> None: + if param in kwargs: + if kwargs[param] != new_value: + raise ValueError(f"The parameter '{param}' expected value {new_value} but got {kwargs[param]} instead.") + else: + kwargs[param] = new_value + + +def _ovewrite_value_param(param: str, actual: Optional[V], expected: V) -> V: + if actual is not None: + if actual != expected: + raise ValueError(f"The parameter '{param}' expected value {expected} but got {actual} instead.") + return expected + + +class _ModelURLs(dict): + def __getitem__(self, item): + warnings.warn( + "Accessing the model URLs via the internal dictionary of the module is deprecated since 0.13 and may " + "be removed in the future. Please access them via the appropriate Weights Enum instead." + ) + return super().__getitem__(item) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/alexnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/alexnet.py new file mode 100644 index 0000000000000000000000000000000000000000..32c6bf71b747545be52c2e3a91521a5706da9fce --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/alexnet.py @@ -0,0 +1,119 @@ +from functools import partial +from typing import Any, Optional + +import torch +import torch.nn as nn + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = ["AlexNet", "AlexNet_Weights", "alexnet"] + + +class AlexNet(nn.Module): + def __init__(self, num_classes: int = 1000, dropout: float = 0.5) -> None: + super().__init__() + _log_api_usage_once(self) + self.features = nn.Sequential( + nn.Conv2d(3, 64, kernel_size=11, stride=4, padding=2), + nn.ReLU(inplace=True), + nn.MaxPool2d(kernel_size=3, stride=2), + nn.Conv2d(64, 192, kernel_size=5, padding=2), + nn.ReLU(inplace=True), + nn.MaxPool2d(kernel_size=3, stride=2), + nn.Conv2d(192, 384, kernel_size=3, padding=1), + nn.ReLU(inplace=True), + nn.Conv2d(384, 256, kernel_size=3, padding=1), + nn.ReLU(inplace=True), + nn.Conv2d(256, 256, kernel_size=3, padding=1), + nn.ReLU(inplace=True), + nn.MaxPool2d(kernel_size=3, stride=2), + ) + self.avgpool = nn.AdaptiveAvgPool2d((6, 6)) + self.classifier = nn.Sequential( + nn.Dropout(p=dropout), + nn.Linear(256 * 6 * 6, 4096), + nn.ReLU(inplace=True), + nn.Dropout(p=dropout), + nn.Linear(4096, 4096), + nn.ReLU(inplace=True), + nn.Linear(4096, num_classes), + ) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x = self.features(x) + x = self.avgpool(x) + x = torch.flatten(x, 1) + x = self.classifier(x) + return x + + +class AlexNet_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/alexnet-owt-7be5be79.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + "num_params": 61100840, + "min_size": (63, 63), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#alexnet-and-vgg", + "_metrics": { + "ImageNet-1K": { + "acc@1": 56.522, + "acc@5": 79.066, + } + }, + "_ops": 0.714, + "_file_size": 233.087, + "_docs": """ + These weights reproduce closely the results of the paper using a simplified training recipe. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", AlexNet_Weights.IMAGENET1K_V1)) +def alexnet(*, weights: Optional[AlexNet_Weights] = None, progress: bool = True, **kwargs: Any) -> AlexNet: + """AlexNet model architecture from `One weird trick for parallelizing convolutional neural networks `__. + + .. note:: + AlexNet was originally introduced in the `ImageNet Classification with + Deep Convolutional Neural Networks + `__ + paper. Our implementation is based instead on the "One weird trick" + paper above. + + Args: + weights (:class:`~torchvision.models.AlexNet_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.AlexNet_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.squeezenet.AlexNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.AlexNet_Weights + :members: + """ + + weights = AlexNet_Weights.verify(weights) + + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = AlexNet(**kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/convnext.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/convnext.py new file mode 100644 index 0000000000000000000000000000000000000000..dae6cfe67999ce908d76e0d37e631d8f33d912d9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/convnext.py @@ -0,0 +1,414 @@ +from functools import partial +from typing import Any, Callable, List, Optional, Sequence + +import torch +from torch import nn, Tensor +from torch.nn import functional as F + +from ..ops.misc import Conv2dNormActivation, Permute +from ..ops.stochastic_depth import StochasticDepth +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "ConvNeXt", + "ConvNeXt_Tiny_Weights", + "ConvNeXt_Small_Weights", + "ConvNeXt_Base_Weights", + "ConvNeXt_Large_Weights", + "convnext_tiny", + "convnext_small", + "convnext_base", + "convnext_large", +] + + +class LayerNorm2d(nn.LayerNorm): + def forward(self, x: Tensor) -> Tensor: + x = x.permute(0, 2, 3, 1) + x = F.layer_norm(x, self.normalized_shape, self.weight, self.bias, self.eps) + x = x.permute(0, 3, 1, 2) + return x + + +class CNBlock(nn.Module): + def __init__( + self, + dim, + layer_scale: float, + stochastic_depth_prob: float, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + if norm_layer is None: + norm_layer = partial(nn.LayerNorm, eps=1e-6) + + self.block = nn.Sequential( + nn.Conv2d(dim, dim, kernel_size=7, padding=3, groups=dim, bias=True), + Permute([0, 2, 3, 1]), + norm_layer(dim), + nn.Linear(in_features=dim, out_features=4 * dim, bias=True), + nn.GELU(), + nn.Linear(in_features=4 * dim, out_features=dim, bias=True), + Permute([0, 3, 1, 2]), + ) + self.layer_scale = nn.Parameter(torch.ones(dim, 1, 1) * layer_scale) + self.stochastic_depth = StochasticDepth(stochastic_depth_prob, "row") + + def forward(self, input: Tensor) -> Tensor: + result = self.layer_scale * self.block(input) + result = self.stochastic_depth(result) + result += input + return result + + +class CNBlockConfig: + # Stores information listed at Section 3 of the ConvNeXt paper + def __init__( + self, + input_channels: int, + out_channels: Optional[int], + num_layers: int, + ) -> None: + self.input_channels = input_channels + self.out_channels = out_channels + self.num_layers = num_layers + + def __repr__(self) -> str: + s = self.__class__.__name__ + "(" + s += "input_channels={input_channels}" + s += ", out_channels={out_channels}" + s += ", num_layers={num_layers}" + s += ")" + return s.format(**self.__dict__) + + +class ConvNeXt(nn.Module): + def __init__( + self, + block_setting: List[CNBlockConfig], + stochastic_depth_prob: float = 0.0, + layer_scale: float = 1e-6, + num_classes: int = 1000, + block: Optional[Callable[..., nn.Module]] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + **kwargs: Any, + ) -> None: + super().__init__() + _log_api_usage_once(self) + + if not block_setting: + raise ValueError("The block_setting should not be empty") + elif not (isinstance(block_setting, Sequence) and all([isinstance(s, CNBlockConfig) for s in block_setting])): + raise TypeError("The block_setting should be List[CNBlockConfig]") + + if block is None: + block = CNBlock + + if norm_layer is None: + norm_layer = partial(LayerNorm2d, eps=1e-6) + + layers: List[nn.Module] = [] + + # Stem + firstconv_output_channels = block_setting[0].input_channels + layers.append( + Conv2dNormActivation( + 3, + firstconv_output_channels, + kernel_size=4, + stride=4, + padding=0, + norm_layer=norm_layer, + activation_layer=None, + bias=True, + ) + ) + + total_stage_blocks = sum(cnf.num_layers for cnf in block_setting) + stage_block_id = 0 + for cnf in block_setting: + # Bottlenecks + stage: List[nn.Module] = [] + for _ in range(cnf.num_layers): + # adjust stochastic depth probability based on the depth of the stage block + sd_prob = stochastic_depth_prob * stage_block_id / (total_stage_blocks - 1.0) + stage.append(block(cnf.input_channels, layer_scale, sd_prob)) + stage_block_id += 1 + layers.append(nn.Sequential(*stage)) + if cnf.out_channels is not None: + # Downsampling + layers.append( + nn.Sequential( + norm_layer(cnf.input_channels), + nn.Conv2d(cnf.input_channels, cnf.out_channels, kernel_size=2, stride=2), + ) + ) + + self.features = nn.Sequential(*layers) + self.avgpool = nn.AdaptiveAvgPool2d(1) + + lastblock = block_setting[-1] + lastconv_output_channels = ( + lastblock.out_channels if lastblock.out_channels is not None else lastblock.input_channels + ) + self.classifier = nn.Sequential( + norm_layer(lastconv_output_channels), nn.Flatten(1), nn.Linear(lastconv_output_channels, num_classes) + ) + + for m in self.modules(): + if isinstance(m, (nn.Conv2d, nn.Linear)): + nn.init.trunc_normal_(m.weight, std=0.02) + if m.bias is not None: + nn.init.zeros_(m.bias) + + def _forward_impl(self, x: Tensor) -> Tensor: + x = self.features(x) + x = self.avgpool(x) + x = self.classifier(x) + return x + + def forward(self, x: Tensor) -> Tensor: + return self._forward_impl(x) + + +def _convnext( + block_setting: List[CNBlockConfig], + stochastic_depth_prob: float, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> ConvNeXt: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = ConvNeXt(block_setting, stochastic_depth_prob=stochastic_depth_prob, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "min_size": (32, 32), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#convnext", + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, +} + + +class ConvNeXt_Tiny_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/convnext_tiny-983f1562.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=236), + meta={ + **_COMMON_META, + "num_params": 28589128, + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.520, + "acc@5": 96.146, + } + }, + "_ops": 4.456, + "_file_size": 109.119, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ConvNeXt_Small_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/convnext_small-0c510722.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=230), + meta={ + **_COMMON_META, + "num_params": 50223688, + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.616, + "acc@5": 96.650, + } + }, + "_ops": 8.684, + "_file_size": 191.703, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ConvNeXt_Base_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/convnext_base-6075fbad.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 88591464, + "_metrics": { + "ImageNet-1K": { + "acc@1": 84.062, + "acc@5": 96.870, + } + }, + "_ops": 15.355, + "_file_size": 338.064, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ConvNeXt_Large_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/convnext_large-ea097f82.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 197767336, + "_metrics": { + "ImageNet-1K": { + "acc@1": 84.414, + "acc@5": 96.976, + } + }, + "_ops": 34.361, + "_file_size": 754.537, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ConvNeXt_Tiny_Weights.IMAGENET1K_V1)) +def convnext_tiny(*, weights: Optional[ConvNeXt_Tiny_Weights] = None, progress: bool = True, **kwargs: Any) -> ConvNeXt: + """ConvNeXt Tiny model architecture from the + `A ConvNet for the 2020s `_ paper. + + Args: + weights (:class:`~torchvision.models.convnext.ConvNeXt_Tiny_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.convnext.ConvNeXt_Tiny_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.convnext.ConvNext`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ConvNeXt_Tiny_Weights + :members: + """ + weights = ConvNeXt_Tiny_Weights.verify(weights) + + block_setting = [ + CNBlockConfig(96, 192, 3), + CNBlockConfig(192, 384, 3), + CNBlockConfig(384, 768, 9), + CNBlockConfig(768, None, 3), + ] + stochastic_depth_prob = kwargs.pop("stochastic_depth_prob", 0.1) + return _convnext(block_setting, stochastic_depth_prob, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ConvNeXt_Small_Weights.IMAGENET1K_V1)) +def convnext_small( + *, weights: Optional[ConvNeXt_Small_Weights] = None, progress: bool = True, **kwargs: Any +) -> ConvNeXt: + """ConvNeXt Small model architecture from the + `A ConvNet for the 2020s `_ paper. + + Args: + weights (:class:`~torchvision.models.convnext.ConvNeXt_Small_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.convnext.ConvNeXt_Small_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.convnext.ConvNext`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ConvNeXt_Small_Weights + :members: + """ + weights = ConvNeXt_Small_Weights.verify(weights) + + block_setting = [ + CNBlockConfig(96, 192, 3), + CNBlockConfig(192, 384, 3), + CNBlockConfig(384, 768, 27), + CNBlockConfig(768, None, 3), + ] + stochastic_depth_prob = kwargs.pop("stochastic_depth_prob", 0.4) + return _convnext(block_setting, stochastic_depth_prob, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ConvNeXt_Base_Weights.IMAGENET1K_V1)) +def convnext_base(*, weights: Optional[ConvNeXt_Base_Weights] = None, progress: bool = True, **kwargs: Any) -> ConvNeXt: + """ConvNeXt Base model architecture from the + `A ConvNet for the 2020s `_ paper. + + Args: + weights (:class:`~torchvision.models.convnext.ConvNeXt_Base_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.convnext.ConvNeXt_Base_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.convnext.ConvNext`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ConvNeXt_Base_Weights + :members: + """ + weights = ConvNeXt_Base_Weights.verify(weights) + + block_setting = [ + CNBlockConfig(128, 256, 3), + CNBlockConfig(256, 512, 3), + CNBlockConfig(512, 1024, 27), + CNBlockConfig(1024, None, 3), + ] + stochastic_depth_prob = kwargs.pop("stochastic_depth_prob", 0.5) + return _convnext(block_setting, stochastic_depth_prob, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ConvNeXt_Large_Weights.IMAGENET1K_V1)) +def convnext_large( + *, weights: Optional[ConvNeXt_Large_Weights] = None, progress: bool = True, **kwargs: Any +) -> ConvNeXt: + """ConvNeXt Large model architecture from the + `A ConvNet for the 2020s `_ paper. + + Args: + weights (:class:`~torchvision.models.convnext.ConvNeXt_Large_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.convnext.ConvNeXt_Large_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.convnext.ConvNext`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ConvNeXt_Large_Weights + :members: + """ + weights = ConvNeXt_Large_Weights.verify(weights) + + block_setting = [ + CNBlockConfig(192, 384, 3), + CNBlockConfig(384, 768, 3), + CNBlockConfig(768, 1536, 27), + CNBlockConfig(1536, None, 3), + ] + stochastic_depth_prob = kwargs.pop("stochastic_depth_prob", 0.5) + return _convnext(block_setting, stochastic_depth_prob, weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/densenet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/densenet.py new file mode 100644 index 0000000000000000000000000000000000000000..014d033df4f34440130e11a2439cd87b095ed387 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/densenet.py @@ -0,0 +1,448 @@ +import re +from collections import OrderedDict +from functools import partial +from typing import Any, List, Optional, Tuple + +import torch +import torch.nn as nn +import torch.nn.functional as F +import torch.utils.checkpoint as cp +from torch import Tensor + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + +__all__ = [ + "DenseNet", + "DenseNet121_Weights", + "DenseNet161_Weights", + "DenseNet169_Weights", + "DenseNet201_Weights", + "densenet121", + "densenet161", + "densenet169", + "densenet201", +] + + +class _DenseLayer(nn.Module): + def __init__( + self, num_input_features: int, growth_rate: int, bn_size: int, drop_rate: float, memory_efficient: bool = False + ) -> None: + super().__init__() + self.norm1 = nn.BatchNorm2d(num_input_features) + self.relu1 = nn.ReLU(inplace=True) + self.conv1 = nn.Conv2d(num_input_features, bn_size * growth_rate, kernel_size=1, stride=1, bias=False) + + self.norm2 = nn.BatchNorm2d(bn_size * growth_rate) + self.relu2 = nn.ReLU(inplace=True) + self.conv2 = nn.Conv2d(bn_size * growth_rate, growth_rate, kernel_size=3, stride=1, padding=1, bias=False) + + self.drop_rate = float(drop_rate) + self.memory_efficient = memory_efficient + + def bn_function(self, inputs: List[Tensor]) -> Tensor: + concated_features = torch.cat(inputs, 1) + bottleneck_output = self.conv1(self.relu1(self.norm1(concated_features))) # noqa: T484 + return bottleneck_output + + # todo: rewrite when torchscript supports any + def any_requires_grad(self, input: List[Tensor]) -> bool: + for tensor in input: + if tensor.requires_grad: + return True + return False + + @torch.jit.unused # noqa: T484 + def call_checkpoint_bottleneck(self, input: List[Tensor]) -> Tensor: + def closure(*inputs): + return self.bn_function(inputs) + + return cp.checkpoint(closure, *input, use_reentrant=False) + + @torch.jit._overload_method # noqa: F811 + def forward(self, input: List[Tensor]) -> Tensor: # noqa: F811 + pass + + @torch.jit._overload_method # noqa: F811 + def forward(self, input: Tensor) -> Tensor: # noqa: F811 + pass + + # torchscript does not yet support *args, so we overload method + # allowing it to take either a List[Tensor] or single Tensor + def forward(self, input: Tensor) -> Tensor: # noqa: F811 + if isinstance(input, Tensor): + prev_features = [input] + else: + prev_features = input + + if self.memory_efficient and self.any_requires_grad(prev_features): + if torch.jit.is_scripting(): + raise Exception("Memory Efficient not supported in JIT") + + bottleneck_output = self.call_checkpoint_bottleneck(prev_features) + else: + bottleneck_output = self.bn_function(prev_features) + + new_features = self.conv2(self.relu2(self.norm2(bottleneck_output))) + if self.drop_rate > 0: + new_features = F.dropout(new_features, p=self.drop_rate, training=self.training) + return new_features + + +class _DenseBlock(nn.ModuleDict): + _version = 2 + + def __init__( + self, + num_layers: int, + num_input_features: int, + bn_size: int, + growth_rate: int, + drop_rate: float, + memory_efficient: bool = False, + ) -> None: + super().__init__() + for i in range(num_layers): + layer = _DenseLayer( + num_input_features + i * growth_rate, + growth_rate=growth_rate, + bn_size=bn_size, + drop_rate=drop_rate, + memory_efficient=memory_efficient, + ) + self.add_module("denselayer%d" % (i + 1), layer) + + def forward(self, init_features: Tensor) -> Tensor: + features = [init_features] + for name, layer in self.items(): + new_features = layer(features) + features.append(new_features) + return torch.cat(features, 1) + + +class _Transition(nn.Sequential): + def __init__(self, num_input_features: int, num_output_features: int) -> None: + super().__init__() + self.norm = nn.BatchNorm2d(num_input_features) + self.relu = nn.ReLU(inplace=True) + self.conv = nn.Conv2d(num_input_features, num_output_features, kernel_size=1, stride=1, bias=False) + self.pool = nn.AvgPool2d(kernel_size=2, stride=2) + + +class DenseNet(nn.Module): + r"""Densenet-BC model class, based on + `"Densely Connected Convolutional Networks" `_. + + Args: + growth_rate (int) - how many filters to add each layer (`k` in paper) + block_config (list of 4 ints) - how many layers in each pooling block + num_init_features (int) - the number of filters to learn in the first convolution layer + bn_size (int) - multiplicative factor for number of bottle neck layers + (i.e. bn_size * k features in the bottleneck layer) + drop_rate (float) - dropout rate after each dense layer + num_classes (int) - number of classification classes + memory_efficient (bool) - If True, uses checkpointing. Much more memory efficient, + but slower. Default: *False*. See `"paper" `_. + """ + + def __init__( + self, + growth_rate: int = 32, + block_config: Tuple[int, int, int, int] = (6, 12, 24, 16), + num_init_features: int = 64, + bn_size: int = 4, + drop_rate: float = 0, + num_classes: int = 1000, + memory_efficient: bool = False, + ) -> None: + + super().__init__() + _log_api_usage_once(self) + + # First convolution + self.features = nn.Sequential( + OrderedDict( + [ + ("conv0", nn.Conv2d(3, num_init_features, kernel_size=7, stride=2, padding=3, bias=False)), + ("norm0", nn.BatchNorm2d(num_init_features)), + ("relu0", nn.ReLU(inplace=True)), + ("pool0", nn.MaxPool2d(kernel_size=3, stride=2, padding=1)), + ] + ) + ) + + # Each denseblock + num_features = num_init_features + for i, num_layers in enumerate(block_config): + block = _DenseBlock( + num_layers=num_layers, + num_input_features=num_features, + bn_size=bn_size, + growth_rate=growth_rate, + drop_rate=drop_rate, + memory_efficient=memory_efficient, + ) + self.features.add_module("denseblock%d" % (i + 1), block) + num_features = num_features + num_layers * growth_rate + if i != len(block_config) - 1: + trans = _Transition(num_input_features=num_features, num_output_features=num_features // 2) + self.features.add_module("transition%d" % (i + 1), trans) + num_features = num_features // 2 + + # Final batch norm + self.features.add_module("norm5", nn.BatchNorm2d(num_features)) + + # Linear layer + self.classifier = nn.Linear(num_features, num_classes) + + # Official init from torch repo. + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight) + elif isinstance(m, nn.BatchNorm2d): + nn.init.constant_(m.weight, 1) + nn.init.constant_(m.bias, 0) + elif isinstance(m, nn.Linear): + nn.init.constant_(m.bias, 0) + + def forward(self, x: Tensor) -> Tensor: + features = self.features(x) + out = F.relu(features, inplace=True) + out = F.adaptive_avg_pool2d(out, (1, 1)) + out = torch.flatten(out, 1) + out = self.classifier(out) + return out + + +def _load_state_dict(model: nn.Module, weights: WeightsEnum, progress: bool) -> None: + # '.'s are no longer allowed in module names, but previous _DenseLayer + # has keys 'norm.1', 'relu.1', 'conv.1', 'norm.2', 'relu.2', 'conv.2'. + # They are also in the checkpoints in model_urls. This pattern is used + # to find such keys. + pattern = re.compile( + r"^(.*denselayer\d+\.(?:norm|relu|conv))\.((?:[12])\.(?:weight|bias|running_mean|running_var))$" + ) + + state_dict = weights.get_state_dict(progress=progress, check_hash=True) + for key in list(state_dict.keys()): + res = pattern.match(key) + if res: + new_key = res.group(1) + res.group(2) + state_dict[new_key] = state_dict[key] + del state_dict[key] + model.load_state_dict(state_dict) + + +def _densenet( + growth_rate: int, + block_config: Tuple[int, int, int, int], + num_init_features: int, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> DenseNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = DenseNet(growth_rate, block_config, num_init_features, **kwargs) + + if weights is not None: + _load_state_dict(model=model, weights=weights, progress=progress) + + return model + + +_COMMON_META = { + "min_size": (29, 29), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/pull/116", + "_docs": """These weights are ported from LuaTorch.""", +} + + +class DenseNet121_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/densenet121-a639ec97.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 7978856, + "_metrics": { + "ImageNet-1K": { + "acc@1": 74.434, + "acc@5": 91.972, + } + }, + "_ops": 2.834, + "_file_size": 30.845, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class DenseNet161_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/densenet161-8d451a50.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 28681000, + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.138, + "acc@5": 93.560, + } + }, + "_ops": 7.728, + "_file_size": 110.369, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class DenseNet169_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/densenet169-b2777c0a.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 14149480, + "_metrics": { + "ImageNet-1K": { + "acc@1": 75.600, + "acc@5": 92.806, + } + }, + "_ops": 3.36, + "_file_size": 54.708, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class DenseNet201_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/densenet201-c1103571.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 20013928, + "_metrics": { + "ImageNet-1K": { + "acc@1": 76.896, + "acc@5": 93.370, + } + }, + "_ops": 4.291, + "_file_size": 77.373, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", DenseNet121_Weights.IMAGENET1K_V1)) +def densenet121(*, weights: Optional[DenseNet121_Weights] = None, progress: bool = True, **kwargs: Any) -> DenseNet: + r"""Densenet-121 model from + `Densely Connected Convolutional Networks `_. + + Args: + weights (:class:`~torchvision.models.DenseNet121_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.DenseNet121_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.densenet.DenseNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.DenseNet121_Weights + :members: + """ + weights = DenseNet121_Weights.verify(weights) + + return _densenet(32, (6, 12, 24, 16), 64, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", DenseNet161_Weights.IMAGENET1K_V1)) +def densenet161(*, weights: Optional[DenseNet161_Weights] = None, progress: bool = True, **kwargs: Any) -> DenseNet: + r"""Densenet-161 model from + `Densely Connected Convolutional Networks `_. + + Args: + weights (:class:`~torchvision.models.DenseNet161_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.DenseNet161_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.densenet.DenseNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.DenseNet161_Weights + :members: + """ + weights = DenseNet161_Weights.verify(weights) + + return _densenet(48, (6, 12, 36, 24), 96, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", DenseNet169_Weights.IMAGENET1K_V1)) +def densenet169(*, weights: Optional[DenseNet169_Weights] = None, progress: bool = True, **kwargs: Any) -> DenseNet: + r"""Densenet-169 model from + `Densely Connected Convolutional Networks `_. + + Args: + weights (:class:`~torchvision.models.DenseNet169_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.DenseNet169_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.densenet.DenseNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.DenseNet169_Weights + :members: + """ + weights = DenseNet169_Weights.verify(weights) + + return _densenet(32, (6, 12, 32, 32), 64, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", DenseNet201_Weights.IMAGENET1K_V1)) +def densenet201(*, weights: Optional[DenseNet201_Weights] = None, progress: bool = True, **kwargs: Any) -> DenseNet: + r"""Densenet-201 model from + `Densely Connected Convolutional Networks `_. + + Args: + weights (:class:`~torchvision.models.DenseNet201_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.DenseNet201_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.densenet.DenseNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.DenseNet201_Weights + :members: + """ + weights = DenseNet201_Weights.verify(weights) + + return _densenet(32, (6, 12, 48, 32), 64, weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4de07c337975512e2b139157071b90824277c17a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__init__.py @@ -0,0 +1,7 @@ +from .faster_rcnn import * +from .fcos import * +from .keypoint_rcnn import * +from .mask_rcnn import * +from .retinanet import * +from .ssd import * +from .ssdlite import * diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b623c513a7f979254df8c9d16477d3eaab521779 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1fc70c913e736ae3e171076a1fe070c64b79d4e0 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/anchor_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/anchor_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3635aeb66b00cd04a9c3f29318f3f71f9e4ca1fe Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/anchor_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/backbone_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/backbone_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..693b24fb25e3fb87ede69d3d5f227933bf14e29b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/backbone_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/faster_rcnn.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/faster_rcnn.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a96beff56f8fc8a3d7426debdd6322b51c6380dc Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/faster_rcnn.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/fcos.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/fcos.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b639ea7f5db1ec05475a9951574721f954924af1 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/fcos.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/generalized_rcnn.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/generalized_rcnn.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..470aec9bf525507f460340b17fed33d380200ada Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/generalized_rcnn.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/image_list.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/image_list.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..12e0ece7a2c6ec62126a0e9de4d03e343d1f15a0 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/image_list.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/keypoint_rcnn.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/keypoint_rcnn.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f87cf4eebc47a842b25d05bdfa580b542421eba2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/keypoint_rcnn.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/mask_rcnn.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/mask_rcnn.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..853b57c0b5b21ad49ad00455023e59f39881b35d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/mask_rcnn.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/retinanet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/retinanet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ceebf9957149b478bf0cebc3a408f31f5be00eea Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/retinanet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/roi_heads.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/roi_heads.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..54f1591cfee2b6ddd1c2ec6694363ae9881d0beb Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/roi_heads.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/rpn.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/rpn.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a11009295f696162c9eb5018062d79ddc20b3ebe Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/rpn.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/ssd.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/ssd.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0e1597ecbe925b529bfb07d7c95e2eedb3c7f5a3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/ssd.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/ssdlite.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/ssdlite.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ee2f547419960d9c6285f1381a6d19f88cda4b8f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/ssdlite.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/transform.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/transform.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ec21fe020f43c399586ebb0558ae5956b51798e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/__pycache__/transform.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..9800e44419be3ed8ca7b6156578833c5a838bdf2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/_utils.py @@ -0,0 +1,540 @@ +import math +from collections import OrderedDict +from typing import Dict, List, Optional, Tuple + +import torch +from torch import nn, Tensor +from torch.nn import functional as F +from torchvision.ops import complete_box_iou_loss, distance_box_iou_loss, FrozenBatchNorm2d, generalized_box_iou_loss + + +class BalancedPositiveNegativeSampler: + """ + This class samples batches, ensuring that they contain a fixed proportion of positives + """ + + def __init__(self, batch_size_per_image: int, positive_fraction: float) -> None: + """ + Args: + batch_size_per_image (int): number of elements to be selected per image + positive_fraction (float): percentage of positive elements per batch + """ + self.batch_size_per_image = batch_size_per_image + self.positive_fraction = positive_fraction + + def __call__(self, matched_idxs: List[Tensor]) -> Tuple[List[Tensor], List[Tensor]]: + """ + Args: + matched_idxs: list of tensors containing -1, 0 or positive values. + Each tensor corresponds to a specific image. + -1 values are ignored, 0 are considered as negatives and > 0 as + positives. + + Returns: + pos_idx (list[tensor]) + neg_idx (list[tensor]) + + Returns two lists of binary masks for each image. + The first list contains the positive elements that were selected, + and the second list the negative example. + """ + pos_idx = [] + neg_idx = [] + for matched_idxs_per_image in matched_idxs: + positive = torch.where(matched_idxs_per_image >= 1)[0] + negative = torch.where(matched_idxs_per_image == 0)[0] + + num_pos = int(self.batch_size_per_image * self.positive_fraction) + # protect against not enough positive examples + num_pos = min(positive.numel(), num_pos) + num_neg = self.batch_size_per_image - num_pos + # protect against not enough negative examples + num_neg = min(negative.numel(), num_neg) + + # randomly select positive and negative examples + perm1 = torch.randperm(positive.numel(), device=positive.device)[:num_pos] + perm2 = torch.randperm(negative.numel(), device=negative.device)[:num_neg] + + pos_idx_per_image = positive[perm1] + neg_idx_per_image = negative[perm2] + + # create binary mask from indices + pos_idx_per_image_mask = torch.zeros_like(matched_idxs_per_image, dtype=torch.uint8) + neg_idx_per_image_mask = torch.zeros_like(matched_idxs_per_image, dtype=torch.uint8) + + pos_idx_per_image_mask[pos_idx_per_image] = 1 + neg_idx_per_image_mask[neg_idx_per_image] = 1 + + pos_idx.append(pos_idx_per_image_mask) + neg_idx.append(neg_idx_per_image_mask) + + return pos_idx, neg_idx + + +@torch.jit._script_if_tracing +def encode_boxes(reference_boxes: Tensor, proposals: Tensor, weights: Tensor) -> Tensor: + """ + Encode a set of proposals with respect to some + reference boxes + + Args: + reference_boxes (Tensor): reference boxes + proposals (Tensor): boxes to be encoded + weights (Tensor[4]): the weights for ``(x, y, w, h)`` + """ + + # perform some unpacking to make it JIT-fusion friendly + wx = weights[0] + wy = weights[1] + ww = weights[2] + wh = weights[3] + + proposals_x1 = proposals[:, 0].unsqueeze(1) + proposals_y1 = proposals[:, 1].unsqueeze(1) + proposals_x2 = proposals[:, 2].unsqueeze(1) + proposals_y2 = proposals[:, 3].unsqueeze(1) + + reference_boxes_x1 = reference_boxes[:, 0].unsqueeze(1) + reference_boxes_y1 = reference_boxes[:, 1].unsqueeze(1) + reference_boxes_x2 = reference_boxes[:, 2].unsqueeze(1) + reference_boxes_y2 = reference_boxes[:, 3].unsqueeze(1) + + # implementation starts here + ex_widths = proposals_x2 - proposals_x1 + ex_heights = proposals_y2 - proposals_y1 + ex_ctr_x = proposals_x1 + 0.5 * ex_widths + ex_ctr_y = proposals_y1 + 0.5 * ex_heights + + gt_widths = reference_boxes_x2 - reference_boxes_x1 + gt_heights = reference_boxes_y2 - reference_boxes_y1 + gt_ctr_x = reference_boxes_x1 + 0.5 * gt_widths + gt_ctr_y = reference_boxes_y1 + 0.5 * gt_heights + + targets_dx = wx * (gt_ctr_x - ex_ctr_x) / ex_widths + targets_dy = wy * (gt_ctr_y - ex_ctr_y) / ex_heights + targets_dw = ww * torch.log(gt_widths / ex_widths) + targets_dh = wh * torch.log(gt_heights / ex_heights) + + targets = torch.cat((targets_dx, targets_dy, targets_dw, targets_dh), dim=1) + return targets + + +class BoxCoder: + """ + This class encodes and decodes a set of bounding boxes into + the representation used for training the regressors. + """ + + def __init__( + self, weights: Tuple[float, float, float, float], bbox_xform_clip: float = math.log(1000.0 / 16) + ) -> None: + """ + Args: + weights (4-element tuple) + bbox_xform_clip (float) + """ + self.weights = weights + self.bbox_xform_clip = bbox_xform_clip + + def encode(self, reference_boxes: List[Tensor], proposals: List[Tensor]) -> List[Tensor]: + boxes_per_image = [len(b) for b in reference_boxes] + reference_boxes = torch.cat(reference_boxes, dim=0) + proposals = torch.cat(proposals, dim=0) + targets = self.encode_single(reference_boxes, proposals) + return targets.split(boxes_per_image, 0) + + def encode_single(self, reference_boxes: Tensor, proposals: Tensor) -> Tensor: + """ + Encode a set of proposals with respect to some + reference boxes + + Args: + reference_boxes (Tensor): reference boxes + proposals (Tensor): boxes to be encoded + """ + dtype = reference_boxes.dtype + device = reference_boxes.device + weights = torch.as_tensor(self.weights, dtype=dtype, device=device) + targets = encode_boxes(reference_boxes, proposals, weights) + + return targets + + def decode(self, rel_codes: Tensor, boxes: List[Tensor]) -> Tensor: + torch._assert( + isinstance(boxes, (list, tuple)), + "This function expects boxes of type list or tuple.", + ) + torch._assert( + isinstance(rel_codes, torch.Tensor), + "This function expects rel_codes of type torch.Tensor.", + ) + boxes_per_image = [b.size(0) for b in boxes] + concat_boxes = torch.cat(boxes, dim=0) + box_sum = 0 + for val in boxes_per_image: + box_sum += val + if box_sum > 0: + rel_codes = rel_codes.reshape(box_sum, -1) + pred_boxes = self.decode_single(rel_codes, concat_boxes) + if box_sum > 0: + pred_boxes = pred_boxes.reshape(box_sum, -1, 4) + return pred_boxes + + def decode_single(self, rel_codes: Tensor, boxes: Tensor) -> Tensor: + """ + From a set of original boxes and encoded relative box offsets, + get the decoded boxes. + + Args: + rel_codes (Tensor): encoded boxes + boxes (Tensor): reference boxes. + """ + + boxes = boxes.to(rel_codes.dtype) + + widths = boxes[:, 2] - boxes[:, 0] + heights = boxes[:, 3] - boxes[:, 1] + ctr_x = boxes[:, 0] + 0.5 * widths + ctr_y = boxes[:, 1] + 0.5 * heights + + wx, wy, ww, wh = self.weights + dx = rel_codes[:, 0::4] / wx + dy = rel_codes[:, 1::4] / wy + dw = rel_codes[:, 2::4] / ww + dh = rel_codes[:, 3::4] / wh + + # Prevent sending too large values into torch.exp() + dw = torch.clamp(dw, max=self.bbox_xform_clip) + dh = torch.clamp(dh, max=self.bbox_xform_clip) + + pred_ctr_x = dx * widths[:, None] + ctr_x[:, None] + pred_ctr_y = dy * heights[:, None] + ctr_y[:, None] + pred_w = torch.exp(dw) * widths[:, None] + pred_h = torch.exp(dh) * heights[:, None] + + # Distance from center to box's corner. + c_to_c_h = torch.tensor(0.5, dtype=pred_ctr_y.dtype, device=pred_h.device) * pred_h + c_to_c_w = torch.tensor(0.5, dtype=pred_ctr_x.dtype, device=pred_w.device) * pred_w + + pred_boxes1 = pred_ctr_x - c_to_c_w + pred_boxes2 = pred_ctr_y - c_to_c_h + pred_boxes3 = pred_ctr_x + c_to_c_w + pred_boxes4 = pred_ctr_y + c_to_c_h + pred_boxes = torch.stack((pred_boxes1, pred_boxes2, pred_boxes3, pred_boxes4), dim=2).flatten(1) + return pred_boxes + + +class BoxLinearCoder: + """ + The linear box-to-box transform defined in FCOS. The transformation is parameterized + by the distance from the center of (square) src box to 4 edges of the target box. + """ + + def __init__(self, normalize_by_size: bool = True) -> None: + """ + Args: + normalize_by_size (bool): normalize deltas by the size of src (anchor) boxes. + """ + self.normalize_by_size = normalize_by_size + + def encode(self, reference_boxes: Tensor, proposals: Tensor) -> Tensor: + """ + Encode a set of proposals with respect to some reference boxes + + Args: + reference_boxes (Tensor): reference boxes + proposals (Tensor): boxes to be encoded + + Returns: + Tensor: the encoded relative box offsets that can be used to + decode the boxes. + + """ + + # get the center of reference_boxes + reference_boxes_ctr_x = 0.5 * (reference_boxes[..., 0] + reference_boxes[..., 2]) + reference_boxes_ctr_y = 0.5 * (reference_boxes[..., 1] + reference_boxes[..., 3]) + + # get box regression transformation deltas + target_l = reference_boxes_ctr_x - proposals[..., 0] + target_t = reference_boxes_ctr_y - proposals[..., 1] + target_r = proposals[..., 2] - reference_boxes_ctr_x + target_b = proposals[..., 3] - reference_boxes_ctr_y + + targets = torch.stack((target_l, target_t, target_r, target_b), dim=-1) + + if self.normalize_by_size: + reference_boxes_w = reference_boxes[..., 2] - reference_boxes[..., 0] + reference_boxes_h = reference_boxes[..., 3] - reference_boxes[..., 1] + reference_boxes_size = torch.stack( + (reference_boxes_w, reference_boxes_h, reference_boxes_w, reference_boxes_h), dim=-1 + ) + targets = targets / reference_boxes_size + return targets + + def decode(self, rel_codes: Tensor, boxes: Tensor) -> Tensor: + + """ + From a set of original boxes and encoded relative box offsets, + get the decoded boxes. + + Args: + rel_codes (Tensor): encoded boxes + boxes (Tensor): reference boxes. + + Returns: + Tensor: the predicted boxes with the encoded relative box offsets. + + .. note:: + This method assumes that ``rel_codes`` and ``boxes`` have same size for 0th dimension. i.e. ``len(rel_codes) == len(boxes)``. + + """ + + boxes = boxes.to(dtype=rel_codes.dtype) + + ctr_x = 0.5 * (boxes[..., 0] + boxes[..., 2]) + ctr_y = 0.5 * (boxes[..., 1] + boxes[..., 3]) + + if self.normalize_by_size: + boxes_w = boxes[..., 2] - boxes[..., 0] + boxes_h = boxes[..., 3] - boxes[..., 1] + + list_box_size = torch.stack((boxes_w, boxes_h, boxes_w, boxes_h), dim=-1) + rel_codes = rel_codes * list_box_size + + pred_boxes1 = ctr_x - rel_codes[..., 0] + pred_boxes2 = ctr_y - rel_codes[..., 1] + pred_boxes3 = ctr_x + rel_codes[..., 2] + pred_boxes4 = ctr_y + rel_codes[..., 3] + + pred_boxes = torch.stack((pred_boxes1, pred_boxes2, pred_boxes3, pred_boxes4), dim=-1) + return pred_boxes + + +class Matcher: + """ + This class assigns to each predicted "element" (e.g., a box) a ground-truth + element. Each predicted element will have exactly zero or one matches; each + ground-truth element may be assigned to zero or more predicted elements. + + Matching is based on the MxN match_quality_matrix, that characterizes how well + each (ground-truth, predicted)-pair match. For example, if the elements are + boxes, the matrix may contain box IoU overlap values. + + The matcher returns a tensor of size N containing the index of the ground-truth + element m that matches to prediction n. If there is no match, a negative value + is returned. + """ + + BELOW_LOW_THRESHOLD = -1 + BETWEEN_THRESHOLDS = -2 + + __annotations__ = { + "BELOW_LOW_THRESHOLD": int, + "BETWEEN_THRESHOLDS": int, + } + + def __init__(self, high_threshold: float, low_threshold: float, allow_low_quality_matches: bool = False) -> None: + """ + Args: + high_threshold (float): quality values greater than or equal to + this value are candidate matches. + low_threshold (float): a lower quality threshold used to stratify + matches into three levels: + 1) matches >= high_threshold + 2) BETWEEN_THRESHOLDS matches in [low_threshold, high_threshold) + 3) BELOW_LOW_THRESHOLD matches in [0, low_threshold) + allow_low_quality_matches (bool): if True, produce additional matches + for predictions that have only low-quality match candidates. See + set_low_quality_matches_ for more details. + """ + self.BELOW_LOW_THRESHOLD = -1 + self.BETWEEN_THRESHOLDS = -2 + torch._assert(low_threshold <= high_threshold, "low_threshold should be <= high_threshold") + self.high_threshold = high_threshold + self.low_threshold = low_threshold + self.allow_low_quality_matches = allow_low_quality_matches + + def __call__(self, match_quality_matrix: Tensor) -> Tensor: + """ + Args: + match_quality_matrix (Tensor[float]): an MxN tensor, containing the + pairwise quality between M ground-truth elements and N predicted elements. + + Returns: + matches (Tensor[int64]): an N tensor where N[i] is a matched gt in + [0, M - 1] or a negative value indicating that prediction i could not + be matched. + """ + if match_quality_matrix.numel() == 0: + # empty targets or proposals not supported during training + if match_quality_matrix.shape[0] == 0: + raise ValueError("No ground-truth boxes available for one of the images during training") + else: + raise ValueError("No proposal boxes available for one of the images during training") + + # match_quality_matrix is M (gt) x N (predicted) + # Max over gt elements (dim 0) to find best gt candidate for each prediction + matched_vals, matches = match_quality_matrix.max(dim=0) + if self.allow_low_quality_matches: + all_matches = matches.clone() + else: + all_matches = None # type: ignore[assignment] + + # Assign candidate matches with low quality to negative (unassigned) values + below_low_threshold = matched_vals < self.low_threshold + between_thresholds = (matched_vals >= self.low_threshold) & (matched_vals < self.high_threshold) + matches[below_low_threshold] = self.BELOW_LOW_THRESHOLD + matches[between_thresholds] = self.BETWEEN_THRESHOLDS + + if self.allow_low_quality_matches: + if all_matches is None: + torch._assert(False, "all_matches should not be None") + else: + self.set_low_quality_matches_(matches, all_matches, match_quality_matrix) + + return matches + + def set_low_quality_matches_(self, matches: Tensor, all_matches: Tensor, match_quality_matrix: Tensor) -> None: + """ + Produce additional matches for predictions that have only low-quality matches. + Specifically, for each ground-truth find the set of predictions that have + maximum overlap with it (including ties); for each prediction in that set, if + it is unmatched, then match it to the ground-truth with which it has the highest + quality value. + """ + # For each gt, find the prediction with which it has the highest quality + highest_quality_foreach_gt, _ = match_quality_matrix.max(dim=1) + # Find the highest quality match available, even if it is low, including ties + gt_pred_pairs_of_highest_quality = torch.where(match_quality_matrix == highest_quality_foreach_gt[:, None]) + # Example gt_pred_pairs_of_highest_quality: + # (tensor([0, 1, 1, 2, 2, 3, 3, 4, 5, 5]), + # tensor([39796, 32055, 32070, 39190, 40255, 40390, 41455, 45470, 45325, 46390])) + # Each element in the first tensor is a gt index, and each element in second tensor is a prediction index + # Note how gt items 1, 2, 3, and 5 each have two ties + + pred_inds_to_update = gt_pred_pairs_of_highest_quality[1] + matches[pred_inds_to_update] = all_matches[pred_inds_to_update] + + +class SSDMatcher(Matcher): + def __init__(self, threshold: float) -> None: + super().__init__(threshold, threshold, allow_low_quality_matches=False) + + def __call__(self, match_quality_matrix: Tensor) -> Tensor: + matches = super().__call__(match_quality_matrix) + + # For each gt, find the prediction with which it has the highest quality + _, highest_quality_pred_foreach_gt = match_quality_matrix.max(dim=1) + matches[highest_quality_pred_foreach_gt] = torch.arange( + highest_quality_pred_foreach_gt.size(0), dtype=torch.int64, device=highest_quality_pred_foreach_gt.device + ) + + return matches + + +def overwrite_eps(model: nn.Module, eps: float) -> None: + """ + This method overwrites the default eps values of all the + FrozenBatchNorm2d layers of the model with the provided value. + This is necessary to address the BC-breaking change introduced + by the bug-fix at pytorch/vision#2933. The overwrite is applied + only when the pretrained weights are loaded to maintain compatibility + with previous versions. + + Args: + model (nn.Module): The model on which we perform the overwrite. + eps (float): The new value of eps. + """ + for module in model.modules(): + if isinstance(module, FrozenBatchNorm2d): + module.eps = eps + + +def retrieve_out_channels(model: nn.Module, size: Tuple[int, int]) -> List[int]: + """ + This method retrieves the number of output channels of a specific model. + + Args: + model (nn.Module): The model for which we estimate the out_channels. + It should return a single Tensor or an OrderedDict[Tensor]. + size (Tuple[int, int]): The size (wxh) of the input. + + Returns: + out_channels (List[int]): A list of the output channels of the model. + """ + in_training = model.training + model.eval() + + with torch.no_grad(): + # Use dummy data to retrieve the feature map sizes to avoid hard-coding their values + device = next(model.parameters()).device + tmp_img = torch.zeros((1, 3, size[1], size[0]), device=device) + features = model(tmp_img) + if isinstance(features, torch.Tensor): + features = OrderedDict([("0", features)]) + out_channels = [x.size(1) for x in features.values()] + + if in_training: + model.train() + + return out_channels + + +@torch.jit.unused +def _fake_cast_onnx(v: Tensor) -> int: + return v # type: ignore[return-value] + + +def _topk_min(input: Tensor, orig_kval: int, axis: int) -> int: + """ + ONNX spec requires the k-value to be less than or equal to the number of inputs along + provided dim. Certain models use the number of elements along a particular axis instead of K + if K exceeds the number of elements along that axis. Previously, python's min() function was + used to determine whether to use the provided k-value or the specified dim axis value. + + However, in cases where the model is being exported in tracing mode, python min() is + static causing the model to be traced incorrectly and eventually fail at the topk node. + In order to avoid this situation, in tracing mode, torch.min() is used instead. + + Args: + input (Tensor): The original input tensor. + orig_kval (int): The provided k-value. + axis(int): Axis along which we retrieve the input size. + + Returns: + min_kval (int): Appropriately selected k-value. + """ + if not torch.jit.is_tracing(): + return min(orig_kval, input.size(axis)) + axis_dim_val = torch._shape_as_tensor(input)[axis].unsqueeze(0) + min_kval = torch.min(torch.cat((torch.tensor([orig_kval], dtype=axis_dim_val.dtype), axis_dim_val), 0)) + return _fake_cast_onnx(min_kval) + + +def _box_loss( + type: str, + box_coder: BoxCoder, + anchors_per_image: Tensor, + matched_gt_boxes_per_image: Tensor, + bbox_regression_per_image: Tensor, + cnf: Optional[Dict[str, float]] = None, +) -> Tensor: + torch._assert(type in ["l1", "smooth_l1", "ciou", "diou", "giou"], f"Unsupported loss: {type}") + + if type == "l1": + target_regression = box_coder.encode_single(matched_gt_boxes_per_image, anchors_per_image) + return F.l1_loss(bbox_regression_per_image, target_regression, reduction="sum") + elif type == "smooth_l1": + target_regression = box_coder.encode_single(matched_gt_boxes_per_image, anchors_per_image) + beta = cnf["beta"] if cnf is not None and "beta" in cnf else 1.0 + return F.smooth_l1_loss(bbox_regression_per_image, target_regression, reduction="sum", beta=beta) + else: + bbox_per_image = box_coder.decode_single(bbox_regression_per_image, anchors_per_image) + eps = cnf["eps"] if cnf is not None and "eps" in cnf else 1e-7 + if type == "ciou": + return complete_box_iou_loss(bbox_per_image, matched_gt_boxes_per_image, reduction="sum", eps=eps) + if type == "diou": + return distance_box_iou_loss(bbox_per_image, matched_gt_boxes_per_image, reduction="sum", eps=eps) + # otherwise giou + return generalized_box_iou_loss(bbox_per_image, matched_gt_boxes_per_image, reduction="sum", eps=eps) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/anchor_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/anchor_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..08280b524c77aef0fa82a547d67cc1ecf357aef3 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/anchor_utils.py @@ -0,0 +1,268 @@ +import math +from typing import List, Optional + +import torch +from torch import nn, Tensor + +from .image_list import ImageList + + +class AnchorGenerator(nn.Module): + """ + Module that generates anchors for a set of feature maps and + image sizes. + + The module support computing anchors at multiple sizes and aspect ratios + per feature map. This module assumes aspect ratio = height / width for + each anchor. + + sizes and aspect_ratios should have the same number of elements, and it should + correspond to the number of feature maps. + + sizes[i] and aspect_ratios[i] can have an arbitrary number of elements, + and AnchorGenerator will output a set of sizes[i] * aspect_ratios[i] anchors + per spatial location for feature map i. + + Args: + sizes (Tuple[Tuple[int]]): + aspect_ratios (Tuple[Tuple[float]]): + """ + + __annotations__ = { + "cell_anchors": List[torch.Tensor], + } + + def __init__( + self, + sizes=((128, 256, 512),), + aspect_ratios=((0.5, 1.0, 2.0),), + ): + super().__init__() + + if not isinstance(sizes[0], (list, tuple)): + # TODO change this + sizes = tuple((s,) for s in sizes) + if not isinstance(aspect_ratios[0], (list, tuple)): + aspect_ratios = (aspect_ratios,) * len(sizes) + + self.sizes = sizes + self.aspect_ratios = aspect_ratios + self.cell_anchors = [ + self.generate_anchors(size, aspect_ratio) for size, aspect_ratio in zip(sizes, aspect_ratios) + ] + + # TODO: https://github.com/pytorch/pytorch/issues/26792 + # For every (aspect_ratios, scales) combination, output a zero-centered anchor with those values. + # (scales, aspect_ratios) are usually an element of zip(self.scales, self.aspect_ratios) + # This method assumes aspect ratio = height / width for an anchor. + def generate_anchors( + self, + scales: List[int], + aspect_ratios: List[float], + dtype: torch.dtype = torch.float32, + device: torch.device = torch.device("cpu"), + ) -> Tensor: + scales = torch.as_tensor(scales, dtype=dtype, device=device) + aspect_ratios = torch.as_tensor(aspect_ratios, dtype=dtype, device=device) + h_ratios = torch.sqrt(aspect_ratios) + w_ratios = 1 / h_ratios + + ws = (w_ratios[:, None] * scales[None, :]).view(-1) + hs = (h_ratios[:, None] * scales[None, :]).view(-1) + + base_anchors = torch.stack([-ws, -hs, ws, hs], dim=1) / 2 + return base_anchors.round() + + def set_cell_anchors(self, dtype: torch.dtype, device: torch.device): + self.cell_anchors = [cell_anchor.to(dtype=dtype, device=device) for cell_anchor in self.cell_anchors] + + def num_anchors_per_location(self) -> List[int]: + return [len(s) * len(a) for s, a in zip(self.sizes, self.aspect_ratios)] + + # For every combination of (a, (g, s), i) in (self.cell_anchors, zip(grid_sizes, strides), 0:2), + # output g[i] anchors that are s[i] distance apart in direction i, with the same dimensions as a. + def grid_anchors(self, grid_sizes: List[List[int]], strides: List[List[Tensor]]) -> List[Tensor]: + anchors = [] + cell_anchors = self.cell_anchors + torch._assert(cell_anchors is not None, "cell_anchors should not be None") + torch._assert( + len(grid_sizes) == len(strides) == len(cell_anchors), + "Anchors should be Tuple[Tuple[int]] because each feature " + "map could potentially have different sizes and aspect ratios. " + "There needs to be a match between the number of " + "feature maps passed and the number of sizes / aspect ratios specified.", + ) + + for size, stride, base_anchors in zip(grid_sizes, strides, cell_anchors): + grid_height, grid_width = size + stride_height, stride_width = stride + device = base_anchors.device + + # For output anchor, compute [x_center, y_center, x_center, y_center] + shifts_x = torch.arange(0, grid_width, dtype=torch.int32, device=device) * stride_width + shifts_y = torch.arange(0, grid_height, dtype=torch.int32, device=device) * stride_height + shift_y, shift_x = torch.meshgrid(shifts_y, shifts_x, indexing="ij") + shift_x = shift_x.reshape(-1) + shift_y = shift_y.reshape(-1) + shifts = torch.stack((shift_x, shift_y, shift_x, shift_y), dim=1) + + # For every (base anchor, output anchor) pair, + # offset each zero-centered base anchor by the center of the output anchor. + anchors.append((shifts.view(-1, 1, 4) + base_anchors.view(1, -1, 4)).reshape(-1, 4)) + + return anchors + + def forward(self, image_list: ImageList, feature_maps: List[Tensor]) -> List[Tensor]: + grid_sizes = [feature_map.shape[-2:] for feature_map in feature_maps] + image_size = image_list.tensors.shape[-2:] + dtype, device = feature_maps[0].dtype, feature_maps[0].device + strides = [ + [ + torch.empty((), dtype=torch.int64, device=device).fill_(image_size[0] // g[0]), + torch.empty((), dtype=torch.int64, device=device).fill_(image_size[1] // g[1]), + ] + for g in grid_sizes + ] + self.set_cell_anchors(dtype, device) + anchors_over_all_feature_maps = self.grid_anchors(grid_sizes, strides) + anchors: List[List[torch.Tensor]] = [] + for _ in range(len(image_list.image_sizes)): + anchors_in_image = [anchors_per_feature_map for anchors_per_feature_map in anchors_over_all_feature_maps] + anchors.append(anchors_in_image) + anchors = [torch.cat(anchors_per_image) for anchors_per_image in anchors] + return anchors + + +class DefaultBoxGenerator(nn.Module): + """ + This module generates the default boxes of SSD for a set of feature maps and image sizes. + + Args: + aspect_ratios (List[List[int]]): A list with all the aspect ratios used in each feature map. + min_ratio (float): The minimum scale :math:`\text{s}_{\text{min}}` of the default boxes used in the estimation + of the scales of each feature map. It is used only if the ``scales`` parameter is not provided. + max_ratio (float): The maximum scale :math:`\text{s}_{\text{max}}` of the default boxes used in the estimation + of the scales of each feature map. It is used only if the ``scales`` parameter is not provided. + scales (List[float]], optional): The scales of the default boxes. If not provided it will be estimated using + the ``min_ratio`` and ``max_ratio`` parameters. + steps (List[int]], optional): It's a hyper-parameter that affects the tiling of default boxes. If not provided + it will be estimated from the data. + clip (bool): Whether the standardized values of default boxes should be clipped between 0 and 1. The clipping + is applied while the boxes are encoded in format ``(cx, cy, w, h)``. + """ + + def __init__( + self, + aspect_ratios: List[List[int]], + min_ratio: float = 0.15, + max_ratio: float = 0.9, + scales: Optional[List[float]] = None, + steps: Optional[List[int]] = None, + clip: bool = True, + ): + super().__init__() + if steps is not None and len(aspect_ratios) != len(steps): + raise ValueError("aspect_ratios and steps should have the same length") + self.aspect_ratios = aspect_ratios + self.steps = steps + self.clip = clip + num_outputs = len(aspect_ratios) + + # Estimation of default boxes scales + if scales is None: + if num_outputs > 1: + range_ratio = max_ratio - min_ratio + self.scales = [min_ratio + range_ratio * k / (num_outputs - 1.0) for k in range(num_outputs)] + self.scales.append(1.0) + else: + self.scales = [min_ratio, max_ratio] + else: + self.scales = scales + + self._wh_pairs = self._generate_wh_pairs(num_outputs) + + def _generate_wh_pairs( + self, num_outputs: int, dtype: torch.dtype = torch.float32, device: torch.device = torch.device("cpu") + ) -> List[Tensor]: + _wh_pairs: List[Tensor] = [] + for k in range(num_outputs): + # Adding the 2 default width-height pairs for aspect ratio 1 and scale s'k + s_k = self.scales[k] + s_prime_k = math.sqrt(self.scales[k] * self.scales[k + 1]) + wh_pairs = [[s_k, s_k], [s_prime_k, s_prime_k]] + + # Adding 2 pairs for each aspect ratio of the feature map k + for ar in self.aspect_ratios[k]: + sq_ar = math.sqrt(ar) + w = self.scales[k] * sq_ar + h = self.scales[k] / sq_ar + wh_pairs.extend([[w, h], [h, w]]) + + _wh_pairs.append(torch.as_tensor(wh_pairs, dtype=dtype, device=device)) + return _wh_pairs + + def num_anchors_per_location(self) -> List[int]: + # Estimate num of anchors based on aspect ratios: 2 default boxes + 2 * ratios of feaure map. + return [2 + 2 * len(r) for r in self.aspect_ratios] + + # Default Boxes calculation based on page 6 of SSD paper + def _grid_default_boxes( + self, grid_sizes: List[List[int]], image_size: List[int], dtype: torch.dtype = torch.float32 + ) -> Tensor: + default_boxes = [] + for k, f_k in enumerate(grid_sizes): + # Now add the default boxes for each width-height pair + if self.steps is not None: + x_f_k = image_size[1] / self.steps[k] + y_f_k = image_size[0] / self.steps[k] + else: + y_f_k, x_f_k = f_k + + shifts_x = ((torch.arange(0, f_k[1]) + 0.5) / x_f_k).to(dtype=dtype) + shifts_y = ((torch.arange(0, f_k[0]) + 0.5) / y_f_k).to(dtype=dtype) + shift_y, shift_x = torch.meshgrid(shifts_y, shifts_x, indexing="ij") + shift_x = shift_x.reshape(-1) + shift_y = shift_y.reshape(-1) + + shifts = torch.stack((shift_x, shift_y) * len(self._wh_pairs[k]), dim=-1).reshape(-1, 2) + # Clipping the default boxes while the boxes are encoded in format (cx, cy, w, h) + _wh_pair = self._wh_pairs[k].clamp(min=0, max=1) if self.clip else self._wh_pairs[k] + wh_pairs = _wh_pair.repeat((f_k[0] * f_k[1]), 1) + + default_box = torch.cat((shifts, wh_pairs), dim=1) + + default_boxes.append(default_box) + + return torch.cat(default_boxes, dim=0) + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"aspect_ratios={self.aspect_ratios}" + f", clip={self.clip}" + f", scales={self.scales}" + f", steps={self.steps}" + ")" + ) + return s + + def forward(self, image_list: ImageList, feature_maps: List[Tensor]) -> List[Tensor]: + grid_sizes = [feature_map.shape[-2:] for feature_map in feature_maps] + image_size = image_list.tensors.shape[-2:] + dtype, device = feature_maps[0].dtype, feature_maps[0].device + default_boxes = self._grid_default_boxes(grid_sizes, image_size, dtype=dtype) + default_boxes = default_boxes.to(device) + + dboxes = [] + x_y_size = torch.tensor([image_size[1], image_size[0]], device=default_boxes.device) + for _ in image_list.image_sizes: + dboxes_in_image = default_boxes + dboxes_in_image = torch.cat( + [ + (dboxes_in_image[:, :2] - 0.5 * dboxes_in_image[:, 2:]) * x_y_size, + (dboxes_in_image[:, :2] + 0.5 * dboxes_in_image[:, 2:]) * x_y_size, + ], + -1, + ) + dboxes.append(dboxes_in_image) + return dboxes diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/backbone_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/backbone_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..78789fb93af434898f4dabcf2fca73d4d76ae198 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/backbone_utils.py @@ -0,0 +1,244 @@ +import warnings +from typing import Callable, Dict, List, Optional, Union + +from torch import nn, Tensor +from torchvision.ops import misc as misc_nn_ops +from torchvision.ops.feature_pyramid_network import ExtraFPNBlock, FeaturePyramidNetwork, LastLevelMaxPool + +from .. import mobilenet, resnet +from .._api import _get_enum_from_fn, WeightsEnum +from .._utils import handle_legacy_interface, IntermediateLayerGetter + + +class BackboneWithFPN(nn.Module): + """ + Adds a FPN on top of a model. + Internally, it uses torchvision.models._utils.IntermediateLayerGetter to + extract a submodel that returns the feature maps specified in return_layers. + The same limitations of IntermediateLayerGetter apply here. + Args: + backbone (nn.Module) + return_layers (Dict[name, new_name]): a dict containing the names + of the modules for which the activations will be returned as + the key of the dict, and the value of the dict is the name + of the returned activation (which the user can specify). + in_channels_list (List[int]): number of channels for each feature map + that is returned, in the order they are present in the OrderedDict + out_channels (int): number of channels in the FPN. + norm_layer (callable, optional): Module specifying the normalization layer to use. Default: None + Attributes: + out_channels (int): the number of channels in the FPN + """ + + def __init__( + self, + backbone: nn.Module, + return_layers: Dict[str, str], + in_channels_list: List[int], + out_channels: int, + extra_blocks: Optional[ExtraFPNBlock] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + + if extra_blocks is None: + extra_blocks = LastLevelMaxPool() + + self.body = IntermediateLayerGetter(backbone, return_layers=return_layers) + self.fpn = FeaturePyramidNetwork( + in_channels_list=in_channels_list, + out_channels=out_channels, + extra_blocks=extra_blocks, + norm_layer=norm_layer, + ) + self.out_channels = out_channels + + def forward(self, x: Tensor) -> Dict[str, Tensor]: + x = self.body(x) + x = self.fpn(x) + return x + + +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: _get_enum_from_fn(resnet.__dict__[kwargs["backbone_name"]])["IMAGENET1K_V1"], + ), +) +def resnet_fpn_backbone( + *, + backbone_name: str, + weights: Optional[WeightsEnum], + norm_layer: Callable[..., nn.Module] = misc_nn_ops.FrozenBatchNorm2d, + trainable_layers: int = 3, + returned_layers: Optional[List[int]] = None, + extra_blocks: Optional[ExtraFPNBlock] = None, +) -> BackboneWithFPN: + """ + Constructs a specified ResNet backbone with FPN on top. Freezes the specified number of layers in the backbone. + + Examples:: + + >>> import torch + >>> from torchvision.models import ResNet50_Weights + >>> from torchvision.models.detection.backbone_utils import resnet_fpn_backbone + >>> backbone = resnet_fpn_backbone(backbone_name='resnet50', weights=ResNet50_Weights.DEFAULT, trainable_layers=3) + >>> # get some dummy image + >>> x = torch.rand(1,3,64,64) + >>> # compute the output + >>> output = backbone(x) + >>> print([(k, v.shape) for k, v in output.items()]) + >>> # returns + >>> [('0', torch.Size([1, 256, 16, 16])), + >>> ('1', torch.Size([1, 256, 8, 8])), + >>> ('2', torch.Size([1, 256, 4, 4])), + >>> ('3', torch.Size([1, 256, 2, 2])), + >>> ('pool', torch.Size([1, 256, 1, 1]))] + + Args: + backbone_name (string): resnet architecture. Possible values are 'resnet18', 'resnet34', 'resnet50', + 'resnet101', 'resnet152', 'resnext50_32x4d', 'resnext101_32x8d', 'wide_resnet50_2', 'wide_resnet101_2' + weights (WeightsEnum, optional): The pretrained weights for the model + norm_layer (callable): it is recommended to use the default value. For details visit: + (https://github.com/facebookresearch/maskrcnn-benchmark/issues/267) + trainable_layers (int): number of trainable (not frozen) layers starting from final block. + Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. + returned_layers (list of int): The layers of the network to return. Each entry must be in ``[1, 4]``. + By default, all layers are returned. + extra_blocks (ExtraFPNBlock or None): if provided, extra operations will + be performed. It is expected to take the fpn features, the original + features and the names of the original features as input, and returns + a new list of feature maps and their corresponding names. By + default, a ``LastLevelMaxPool`` is used. + """ + backbone = resnet.__dict__[backbone_name](weights=weights, norm_layer=norm_layer) + return _resnet_fpn_extractor(backbone, trainable_layers, returned_layers, extra_blocks) + + +def _resnet_fpn_extractor( + backbone: resnet.ResNet, + trainable_layers: int, + returned_layers: Optional[List[int]] = None, + extra_blocks: Optional[ExtraFPNBlock] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, +) -> BackboneWithFPN: + + # select layers that won't be frozen + if trainable_layers < 0 or trainable_layers > 5: + raise ValueError(f"Trainable layers should be in the range [0,5], got {trainable_layers}") + layers_to_train = ["layer4", "layer3", "layer2", "layer1", "conv1"][:trainable_layers] + if trainable_layers == 5: + layers_to_train.append("bn1") + for name, parameter in backbone.named_parameters(): + if all([not name.startswith(layer) for layer in layers_to_train]): + parameter.requires_grad_(False) + + if extra_blocks is None: + extra_blocks = LastLevelMaxPool() + + if returned_layers is None: + returned_layers = [1, 2, 3, 4] + if min(returned_layers) <= 0 or max(returned_layers) >= 5: + raise ValueError(f"Each returned layer should be in the range [1,4]. Got {returned_layers}") + return_layers = {f"layer{k}": str(v) for v, k in enumerate(returned_layers)} + + in_channels_stage2 = backbone.inplanes // 8 + in_channels_list = [in_channels_stage2 * 2 ** (i - 1) for i in returned_layers] + out_channels = 256 + return BackboneWithFPN( + backbone, return_layers, in_channels_list, out_channels, extra_blocks=extra_blocks, norm_layer=norm_layer + ) + + +def _validate_trainable_layers( + is_trained: bool, + trainable_backbone_layers: Optional[int], + max_value: int, + default_value: int, +) -> int: + # don't freeze any layers if pretrained model or backbone is not used + if not is_trained: + if trainable_backbone_layers is not None: + warnings.warn( + "Changing trainable_backbone_layers has no effect if " + "neither pretrained nor pretrained_backbone have been set to True, " + f"falling back to trainable_backbone_layers={max_value} so that all layers are trainable" + ) + trainable_backbone_layers = max_value + + # by default freeze first blocks + if trainable_backbone_layers is None: + trainable_backbone_layers = default_value + if trainable_backbone_layers < 0 or trainable_backbone_layers > max_value: + raise ValueError( + f"Trainable backbone layers should be in the range [0,{max_value}], got {trainable_backbone_layers} " + ) + return trainable_backbone_layers + + +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: _get_enum_from_fn(mobilenet.__dict__[kwargs["backbone_name"]])["IMAGENET1K_V1"], + ), +) +def mobilenet_backbone( + *, + backbone_name: str, + weights: Optional[WeightsEnum], + fpn: bool, + norm_layer: Callable[..., nn.Module] = misc_nn_ops.FrozenBatchNorm2d, + trainable_layers: int = 2, + returned_layers: Optional[List[int]] = None, + extra_blocks: Optional[ExtraFPNBlock] = None, +) -> nn.Module: + backbone = mobilenet.__dict__[backbone_name](weights=weights, norm_layer=norm_layer) + return _mobilenet_extractor(backbone, fpn, trainable_layers, returned_layers, extra_blocks) + + +def _mobilenet_extractor( + backbone: Union[mobilenet.MobileNetV2, mobilenet.MobileNetV3], + fpn: bool, + trainable_layers: int, + returned_layers: Optional[List[int]] = None, + extra_blocks: Optional[ExtraFPNBlock] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, +) -> nn.Module: + backbone = backbone.features + # Gather the indices of blocks which are strided. These are the locations of C1, ..., Cn-1 blocks. + # The first and last blocks are always included because they are the C0 (conv1) and Cn. + stage_indices = [0] + [i for i, b in enumerate(backbone) if getattr(b, "_is_cn", False)] + [len(backbone) - 1] + num_stages = len(stage_indices) + + # find the index of the layer from which we won't freeze + if trainable_layers < 0 or trainable_layers > num_stages: + raise ValueError(f"Trainable layers should be in the range [0,{num_stages}], got {trainable_layers} ") + freeze_before = len(backbone) if trainable_layers == 0 else stage_indices[num_stages - trainable_layers] + + for b in backbone[:freeze_before]: + for parameter in b.parameters(): + parameter.requires_grad_(False) + + out_channels = 256 + if fpn: + if extra_blocks is None: + extra_blocks = LastLevelMaxPool() + + if returned_layers is None: + returned_layers = [num_stages - 2, num_stages - 1] + if min(returned_layers) < 0 or max(returned_layers) >= num_stages: + raise ValueError(f"Each returned layer should be in the range [0,{num_stages - 1}], got {returned_layers} ") + return_layers = {f"{stage_indices[k]}": str(v) for v, k in enumerate(returned_layers)} + + in_channels_list = [backbone[stage_indices[i]].out_channels for i in returned_layers] + return BackboneWithFPN( + backbone, return_layers, in_channels_list, out_channels, extra_blocks=extra_blocks, norm_layer=norm_layer + ) + else: + m = nn.Sequential( + backbone, + # depthwise linear combination of channels to reduce their size + nn.Conv2d(backbone[-1].out_channels, out_channels, 1), + ) + m.out_channels = out_channels # type: ignore[assignment] + return m diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/faster_rcnn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/faster_rcnn.py new file mode 100644 index 0000000000000000000000000000000000000000..b33f29cc219c2c1f5aadb11e238f8c08d810fd3d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/faster_rcnn.py @@ -0,0 +1,846 @@ +from typing import Any, Callable, List, Optional, Tuple, Union + +import torch +import torch.nn.functional as F +from torch import nn +from torchvision.ops import MultiScaleRoIAlign + +from ...ops import misc as misc_nn_ops +from ...transforms._presets import ObjectDetection +from .._api import register_model, Weights, WeightsEnum +from .._meta import _COCO_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface +from ..mobilenetv3 import mobilenet_v3_large, MobileNet_V3_Large_Weights +from ..resnet import resnet50, ResNet50_Weights +from ._utils import overwrite_eps +from .anchor_utils import AnchorGenerator +from .backbone_utils import _mobilenet_extractor, _resnet_fpn_extractor, _validate_trainable_layers +from .generalized_rcnn import GeneralizedRCNN +from .roi_heads import RoIHeads +from .rpn import RegionProposalNetwork, RPNHead +from .transform import GeneralizedRCNNTransform + + +__all__ = [ + "FasterRCNN", + "FasterRCNN_ResNet50_FPN_Weights", + "FasterRCNN_ResNet50_FPN_V2_Weights", + "FasterRCNN_MobileNet_V3_Large_FPN_Weights", + "FasterRCNN_MobileNet_V3_Large_320_FPN_Weights", + "fasterrcnn_resnet50_fpn", + "fasterrcnn_resnet50_fpn_v2", + "fasterrcnn_mobilenet_v3_large_fpn", + "fasterrcnn_mobilenet_v3_large_320_fpn", +] + + +def _default_anchorgen(): + anchor_sizes = ((32,), (64,), (128,), (256,), (512,)) + aspect_ratios = ((0.5, 1.0, 2.0),) * len(anchor_sizes) + return AnchorGenerator(anchor_sizes, aspect_ratios) + + +class FasterRCNN(GeneralizedRCNN): + """ + Implements Faster R-CNN. + + The input to the model is expected to be a list of tensors, each of shape [C, H, W], one for each + image, and should be in 0-1 range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the class label for each ground-truth box + + The model returns a Dict[Tensor] during training, containing the classification and regression + losses for both the RPN and the R-CNN. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a List[Dict[Tensor]], one for each input image. The fields of the Dict are as + follows: + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the predicted labels for each image + - scores (Tensor[N]): the scores or each prediction + + Args: + backbone (nn.Module): the network used to compute the features for the model. + It should contain an out_channels attribute, which indicates the number of output + channels that each feature map has (and it should be the same for all feature maps). + The backbone should return a single Tensor or and OrderedDict[Tensor]. + num_classes (int): number of output classes of the model (including the background). + If box_predictor is specified, num_classes should be None. + min_size (int): Images are rescaled before feeding them to the backbone: + we attempt to preserve the aspect ratio and scale the shorter edge + to ``min_size``. If the resulting longer edge exceeds ``max_size``, + then downscale so that the longer edge does not exceed ``max_size``. + This may result in the shorter edge beeing lower than ``min_size``. + max_size (int): See ``min_size``. + image_mean (Tuple[float, float, float]): mean values used for input normalization. + They are generally the mean values of the dataset on which the backbone has been trained + on + image_std (Tuple[float, float, float]): std values used for input normalization. + They are generally the std values of the dataset on which the backbone has been trained on + rpn_anchor_generator (AnchorGenerator): module that generates the anchors for a set of feature + maps. + rpn_head (nn.Module): module that computes the objectness and regression deltas from the RPN + rpn_pre_nms_top_n_train (int): number of proposals to keep before applying NMS during training + rpn_pre_nms_top_n_test (int): number of proposals to keep before applying NMS during testing + rpn_post_nms_top_n_train (int): number of proposals to keep after applying NMS during training + rpn_post_nms_top_n_test (int): number of proposals to keep after applying NMS during testing + rpn_nms_thresh (float): NMS threshold used for postprocessing the RPN proposals + rpn_fg_iou_thresh (float): minimum IoU between the anchor and the GT box so that they can be + considered as positive during training of the RPN. + rpn_bg_iou_thresh (float): maximum IoU between the anchor and the GT box so that they can be + considered as negative during training of the RPN. + rpn_batch_size_per_image (int): number of anchors that are sampled during training of the RPN + for computing the loss + rpn_positive_fraction (float): proportion of positive anchors in a mini-batch during training + of the RPN + rpn_score_thresh (float): only return proposals with an objectness score greater than rpn_score_thresh + box_roi_pool (MultiScaleRoIAlign): the module which crops and resizes the feature maps in + the locations indicated by the bounding boxes + box_head (nn.Module): module that takes the cropped feature maps as input + box_predictor (nn.Module): module that takes the output of box_head and returns the + classification logits and box regression deltas. + box_score_thresh (float): during inference, only return proposals with a classification score + greater than box_score_thresh + box_nms_thresh (float): NMS threshold for the prediction head. Used during inference + box_detections_per_img (int): maximum number of detections per image, for all classes. + box_fg_iou_thresh (float): minimum IoU between the proposals and the GT box so that they can be + considered as positive during training of the classification head + box_bg_iou_thresh (float): maximum IoU between the proposals and the GT box so that they can be + considered as negative during training of the classification head + box_batch_size_per_image (int): number of proposals that are sampled during training of the + classification head + box_positive_fraction (float): proportion of positive proposals in a mini-batch during training + of the classification head + bbox_reg_weights (Tuple[float, float, float, float]): weights for the encoding/decoding of the + bounding boxes + + Example:: + + >>> import torch + >>> import torchvision + >>> from torchvision.models.detection import FasterRCNN + >>> from torchvision.models.detection.rpn import AnchorGenerator + >>> # load a pre-trained model for classification and return + >>> # only the features + >>> backbone = torchvision.models.mobilenet_v2(weights=MobileNet_V2_Weights.DEFAULT).features + >>> # FasterRCNN needs to know the number of + >>> # output channels in a backbone. For mobilenet_v2, it's 1280, + >>> # so we need to add it here + >>> backbone.out_channels = 1280 + >>> + >>> # let's make the RPN generate 5 x 3 anchors per spatial + >>> # location, with 5 different sizes and 3 different aspect + >>> # ratios. We have a Tuple[Tuple[int]] because each feature + >>> # map could potentially have different sizes and + >>> # aspect ratios + >>> anchor_generator = AnchorGenerator(sizes=((32, 64, 128, 256, 512),), + >>> aspect_ratios=((0.5, 1.0, 2.0),)) + >>> + >>> # let's define what are the feature maps that we will + >>> # use to perform the region of interest cropping, as well as + >>> # the size of the crop after rescaling. + >>> # if your backbone returns a Tensor, featmap_names is expected to + >>> # be ['0']. More generally, the backbone should return an + >>> # OrderedDict[Tensor], and in featmap_names you can choose which + >>> # feature maps to use. + >>> roi_pooler = torchvision.ops.MultiScaleRoIAlign(featmap_names=['0'], + >>> output_size=7, + >>> sampling_ratio=2) + >>> + >>> # put the pieces together inside a FasterRCNN model + >>> model = FasterRCNN(backbone, + >>> num_classes=2, + >>> rpn_anchor_generator=anchor_generator, + >>> box_roi_pool=roi_pooler) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + """ + + def __init__( + self, + backbone, + num_classes=None, + # transform parameters + min_size=800, + max_size=1333, + image_mean=None, + image_std=None, + # RPN parameters + rpn_anchor_generator=None, + rpn_head=None, + rpn_pre_nms_top_n_train=2000, + rpn_pre_nms_top_n_test=1000, + rpn_post_nms_top_n_train=2000, + rpn_post_nms_top_n_test=1000, + rpn_nms_thresh=0.7, + rpn_fg_iou_thresh=0.7, + rpn_bg_iou_thresh=0.3, + rpn_batch_size_per_image=256, + rpn_positive_fraction=0.5, + rpn_score_thresh=0.0, + # Box parameters + box_roi_pool=None, + box_head=None, + box_predictor=None, + box_score_thresh=0.05, + box_nms_thresh=0.5, + box_detections_per_img=100, + box_fg_iou_thresh=0.5, + box_bg_iou_thresh=0.5, + box_batch_size_per_image=512, + box_positive_fraction=0.25, + bbox_reg_weights=None, + **kwargs, + ): + + if not hasattr(backbone, "out_channels"): + raise ValueError( + "backbone should contain an attribute out_channels " + "specifying the number of output channels (assumed to be the " + "same for all the levels)" + ) + + if not isinstance(rpn_anchor_generator, (AnchorGenerator, type(None))): + raise TypeError( + f"rpn_anchor_generator should be of type AnchorGenerator or None instead of {type(rpn_anchor_generator)}" + ) + if not isinstance(box_roi_pool, (MultiScaleRoIAlign, type(None))): + raise TypeError( + f"box_roi_pool should be of type MultiScaleRoIAlign or None instead of {type(box_roi_pool)}" + ) + + if num_classes is not None: + if box_predictor is not None: + raise ValueError("num_classes should be None when box_predictor is specified") + else: + if box_predictor is None: + raise ValueError("num_classes should not be None when box_predictor is not specified") + + out_channels = backbone.out_channels + + if rpn_anchor_generator is None: + rpn_anchor_generator = _default_anchorgen() + if rpn_head is None: + rpn_head = RPNHead(out_channels, rpn_anchor_generator.num_anchors_per_location()[0]) + + rpn_pre_nms_top_n = dict(training=rpn_pre_nms_top_n_train, testing=rpn_pre_nms_top_n_test) + rpn_post_nms_top_n = dict(training=rpn_post_nms_top_n_train, testing=rpn_post_nms_top_n_test) + + rpn = RegionProposalNetwork( + rpn_anchor_generator, + rpn_head, + rpn_fg_iou_thresh, + rpn_bg_iou_thresh, + rpn_batch_size_per_image, + rpn_positive_fraction, + rpn_pre_nms_top_n, + rpn_post_nms_top_n, + rpn_nms_thresh, + score_thresh=rpn_score_thresh, + ) + + if box_roi_pool is None: + box_roi_pool = MultiScaleRoIAlign(featmap_names=["0", "1", "2", "3"], output_size=7, sampling_ratio=2) + + if box_head is None: + resolution = box_roi_pool.output_size[0] + representation_size = 1024 + box_head = TwoMLPHead(out_channels * resolution**2, representation_size) + + if box_predictor is None: + representation_size = 1024 + box_predictor = FastRCNNPredictor(representation_size, num_classes) + + roi_heads = RoIHeads( + # Box + box_roi_pool, + box_head, + box_predictor, + box_fg_iou_thresh, + box_bg_iou_thresh, + box_batch_size_per_image, + box_positive_fraction, + bbox_reg_weights, + box_score_thresh, + box_nms_thresh, + box_detections_per_img, + ) + + if image_mean is None: + image_mean = [0.485, 0.456, 0.406] + if image_std is None: + image_std = [0.229, 0.224, 0.225] + transform = GeneralizedRCNNTransform(min_size, max_size, image_mean, image_std, **kwargs) + + super().__init__(backbone, rpn, roi_heads, transform) + + +class TwoMLPHead(nn.Module): + """ + Standard heads for FPN-based models + + Args: + in_channels (int): number of input channels + representation_size (int): size of the intermediate representation + """ + + def __init__(self, in_channels, representation_size): + super().__init__() + + self.fc6 = nn.Linear(in_channels, representation_size) + self.fc7 = nn.Linear(representation_size, representation_size) + + def forward(self, x): + x = x.flatten(start_dim=1) + + x = F.relu(self.fc6(x)) + x = F.relu(self.fc7(x)) + + return x + + +class FastRCNNConvFCHead(nn.Sequential): + def __init__( + self, + input_size: Tuple[int, int, int], + conv_layers: List[int], + fc_layers: List[int], + norm_layer: Optional[Callable[..., nn.Module]] = None, + ): + """ + Args: + input_size (Tuple[int, int, int]): the input size in CHW format. + conv_layers (list): feature dimensions of each Convolution layer + fc_layers (list): feature dimensions of each FCN layer + norm_layer (callable, optional): Module specifying the normalization layer to use. Default: None + """ + in_channels, in_height, in_width = input_size + + blocks = [] + previous_channels = in_channels + for current_channels in conv_layers: + blocks.append(misc_nn_ops.Conv2dNormActivation(previous_channels, current_channels, norm_layer=norm_layer)) + previous_channels = current_channels + blocks.append(nn.Flatten()) + previous_channels = previous_channels * in_height * in_width + for current_channels in fc_layers: + blocks.append(nn.Linear(previous_channels, current_channels)) + blocks.append(nn.ReLU(inplace=True)) + previous_channels = current_channels + + super().__init__(*blocks) + for layer in self.modules(): + if isinstance(layer, nn.Conv2d): + nn.init.kaiming_normal_(layer.weight, mode="fan_out", nonlinearity="relu") + if layer.bias is not None: + nn.init.zeros_(layer.bias) + + +class FastRCNNPredictor(nn.Module): + """ + Standard classification + bounding box regression layers + for Fast R-CNN. + + Args: + in_channels (int): number of input channels + num_classes (int): number of output classes (including background) + """ + + def __init__(self, in_channels, num_classes): + super().__init__() + self.cls_score = nn.Linear(in_channels, num_classes) + self.bbox_pred = nn.Linear(in_channels, num_classes * 4) + + def forward(self, x): + if x.dim() == 4: + torch._assert( + list(x.shape[2:]) == [1, 1], + f"x has the wrong shape, expecting the last two dimensions to be [1,1] instead of {list(x.shape[2:])}", + ) + x = x.flatten(start_dim=1) + scores = self.cls_score(x) + bbox_deltas = self.bbox_pred(x) + + return scores, bbox_deltas + + +_COMMON_META = { + "categories": _COCO_CATEGORIES, + "min_size": (1, 1), +} + + +class FasterRCNN_ResNet50_FPN_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/fasterrcnn_resnet50_fpn_coco-258fb6c6.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 41755286, + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#faster-r-cnn-resnet-50-fpn", + "_metrics": { + "COCO-val2017": { + "box_map": 37.0, + } + }, + "_ops": 134.38, + "_file_size": 159.743, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +class FasterRCNN_ResNet50_FPN_V2_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/fasterrcnn_resnet50_fpn_v2_coco-dd69338a.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 43712278, + "recipe": "https://github.com/pytorch/vision/pull/5763", + "_metrics": { + "COCO-val2017": { + "box_map": 46.7, + } + }, + "_ops": 280.371, + "_file_size": 167.104, + "_docs": """These weights were produced using an enhanced training recipe to boost the model accuracy.""", + }, + ) + DEFAULT = COCO_V1 + + +class FasterRCNN_MobileNet_V3_Large_FPN_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/fasterrcnn_mobilenet_v3_large_fpn-fb6a3cc7.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 19386354, + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#faster-r-cnn-mobilenetv3-large-fpn", + "_metrics": { + "COCO-val2017": { + "box_map": 32.8, + } + }, + "_ops": 4.494, + "_file_size": 74.239, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +class FasterRCNN_MobileNet_V3_Large_320_FPN_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/fasterrcnn_mobilenet_v3_large_320_fpn-907ea3f9.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 19386354, + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#faster-r-cnn-mobilenetv3-large-320-fpn", + "_metrics": { + "COCO-val2017": { + "box_map": 22.8, + } + }, + "_ops": 0.719, + "_file_size": 74.239, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", FasterRCNN_ResNet50_FPN_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def fasterrcnn_resnet50_fpn( + *, + weights: Optional[FasterRCNN_ResNet50_FPN_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = ResNet50_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> FasterRCNN: + """ + Faster R-CNN model with a ResNet-50-FPN backbone from the `Faster R-CNN: Towards Real-Time Object + Detection with Region Proposal Networks `__ + paper. + + .. betastatus:: detection module + + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each + image, and should be in ``0-1`` range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and a targets (list of dictionary), + containing: + + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the class label for each ground-truth box + + The model returns a ``Dict[Tensor]`` during training, containing the classification and regression + losses for both the RPN and the R-CNN. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a ``List[Dict[Tensor]]``, one for each input image. The fields of the ``Dict`` are as + follows, where ``N`` is the number of detections: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the predicted labels for each detection + - scores (``Tensor[N]``): the scores of each detection + + For more details on the output, you may refer to :ref:`instance_seg_output`. + + Faster R-CNN is exportable to ONNX for a fixed batch size with inputs images of fixed size. + + Example:: + + >>> model = torchvision.models.detection.fasterrcnn_resnet50_fpn(weights=FasterRCNN_ResNet50_FPN_Weights.DEFAULT) + >>> # For training + >>> images, boxes = torch.rand(4, 3, 600, 1200), torch.rand(4, 11, 4) + >>> boxes[:, :, 2:4] = boxes[:, :, 0:2] + boxes[:, :, 2:4] + >>> labels = torch.randint(1, 91, (4, 11)) + >>> images = list(image for image in images) + >>> targets = [] + >>> for i in range(len(images)): + >>> d = {} + >>> d['boxes'] = boxes[i] + >>> d['labels'] = labels[i] + >>> targets.append(d) + >>> output = model(images, targets) + >>> # For inference + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + >>> + >>> # optionally, if you want to export the model to ONNX: + >>> torch.onnx.export(model, x, "faster_rcnn.onnx", opset_version = 11) + + Args: + weights (:class:`~torchvision.models.detection.FasterRCNN_ResNet50_FPN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.FasterRCNN_ResNet50_FPN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The + pretrained weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from + final block. Valid values are between 0 and 5, with 5 meaning all backbone layers are + trainable. If ``None`` is passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.faster_rcnn.FasterRCNN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.FasterRCNN_ResNet50_FPN_Weights + :members: + """ + weights = FasterRCNN_ResNet50_FPN_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + norm_layer = misc_nn_ops.FrozenBatchNorm2d if is_trained else nn.BatchNorm2d + + backbone = resnet50(weights=weights_backbone, progress=progress, norm_layer=norm_layer) + backbone = _resnet_fpn_extractor(backbone, trainable_backbone_layers) + model = FasterRCNN(backbone, num_classes=num_classes, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if weights == FasterRCNN_ResNet50_FPN_Weights.COCO_V1: + overwrite_eps(model, 0.0) + + return model + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", FasterRCNN_ResNet50_FPN_V2_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def fasterrcnn_resnet50_fpn_v2( + *, + weights: Optional[FasterRCNN_ResNet50_FPN_V2_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = None, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> FasterRCNN: + """ + Constructs an improved Faster R-CNN model with a ResNet-50-FPN backbone from `Benchmarking Detection + Transfer Learning with Vision Transformers `__ paper. + + .. betastatus:: detection module + + It works similarly to Faster R-CNN with ResNet-50 FPN backbone. See + :func:`~torchvision.models.detection.fasterrcnn_resnet50_fpn` for more + details. + + Args: + weights (:class:`~torchvision.models.detection.FasterRCNN_ResNet50_FPN_V2_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.FasterRCNN_ResNet50_FPN_V2_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The + pretrained weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from + final block. Valid values are between 0 and 5, with 5 meaning all backbone layers are + trainable. If ``None`` is passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.faster_rcnn.FasterRCNN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.FasterRCNN_ResNet50_FPN_V2_Weights + :members: + """ + weights = FasterRCNN_ResNet50_FPN_V2_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + + backbone = resnet50(weights=weights_backbone, progress=progress) + backbone = _resnet_fpn_extractor(backbone, trainable_backbone_layers, norm_layer=nn.BatchNorm2d) + rpn_anchor_generator = _default_anchorgen() + rpn_head = RPNHead(backbone.out_channels, rpn_anchor_generator.num_anchors_per_location()[0], conv_depth=2) + box_head = FastRCNNConvFCHead( + (backbone.out_channels, 7, 7), [256, 256, 256, 256], [1024], norm_layer=nn.BatchNorm2d + ) + model = FasterRCNN( + backbone, + num_classes=num_classes, + rpn_anchor_generator=rpn_anchor_generator, + rpn_head=rpn_head, + box_head=box_head, + **kwargs, + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +def _fasterrcnn_mobilenet_v3_large_fpn( + *, + weights: Optional[Union[FasterRCNN_MobileNet_V3_Large_FPN_Weights, FasterRCNN_MobileNet_V3_Large_320_FPN_Weights]], + progress: bool, + num_classes: Optional[int], + weights_backbone: Optional[MobileNet_V3_Large_Weights], + trainable_backbone_layers: Optional[int], + **kwargs: Any, +) -> FasterRCNN: + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 6, 3) + norm_layer = misc_nn_ops.FrozenBatchNorm2d if is_trained else nn.BatchNorm2d + + backbone = mobilenet_v3_large(weights=weights_backbone, progress=progress, norm_layer=norm_layer) + backbone = _mobilenet_extractor(backbone, True, trainable_backbone_layers) + anchor_sizes = ( + ( + 32, + 64, + 128, + 256, + 512, + ), + ) * 3 + aspect_ratios = ((0.5, 1.0, 2.0),) * len(anchor_sizes) + model = FasterRCNN( + backbone, num_classes, rpn_anchor_generator=AnchorGenerator(anchor_sizes, aspect_ratios), **kwargs + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", MobileNet_V3_Large_Weights.IMAGENET1K_V1), +) +def fasterrcnn_mobilenet_v3_large_320_fpn( + *, + weights: Optional[FasterRCNN_MobileNet_V3_Large_320_FPN_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[MobileNet_V3_Large_Weights] = MobileNet_V3_Large_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> FasterRCNN: + """ + Low resolution Faster R-CNN model with a MobileNetV3-Large backbone tuned for mobile use cases. + + .. betastatus:: detection module + + It works similarly to Faster R-CNN with ResNet-50 FPN backbone. See + :func:`~torchvision.models.detection.fasterrcnn_resnet50_fpn` for more + details. + + Example:: + + >>> model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_320_fpn(weights=FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + + Args: + weights (:class:`~torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_320_FPN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_320_FPN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The + pretrained weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from + final block. Valid values are between 0 and 6, with 6 meaning all backbone layers are + trainable. If ``None`` is passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.faster_rcnn.FasterRCNN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_320_FPN_Weights + :members: + """ + weights = FasterRCNN_MobileNet_V3_Large_320_FPN_Weights.verify(weights) + weights_backbone = MobileNet_V3_Large_Weights.verify(weights_backbone) + + defaults = { + "min_size": 320, + "max_size": 640, + "rpn_pre_nms_top_n_test": 150, + "rpn_post_nms_top_n_test": 150, + "rpn_score_thresh": 0.05, + } + + kwargs = {**defaults, **kwargs} + return _fasterrcnn_mobilenet_v3_large_fpn( + weights=weights, + progress=progress, + num_classes=num_classes, + weights_backbone=weights_backbone, + trainable_backbone_layers=trainable_backbone_layers, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", FasterRCNN_MobileNet_V3_Large_FPN_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", MobileNet_V3_Large_Weights.IMAGENET1K_V1), +) +def fasterrcnn_mobilenet_v3_large_fpn( + *, + weights: Optional[FasterRCNN_MobileNet_V3_Large_FPN_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[MobileNet_V3_Large_Weights] = MobileNet_V3_Large_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> FasterRCNN: + """ + Constructs a high resolution Faster R-CNN model with a MobileNetV3-Large FPN backbone. + + .. betastatus:: detection module + + It works similarly to Faster R-CNN with ResNet-50 FPN backbone. See + :func:`~torchvision.models.detection.fasterrcnn_resnet50_fpn` for more + details. + + Example:: + + >>> model = torchvision.models.detection.fasterrcnn_mobilenet_v3_large_fpn(weights=FasterRCNN_MobileNet_V3_Large_FPN_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + + Args: + weights (:class:`~torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_FPN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_FPN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The + pretrained weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from + final block. Valid values are between 0 and 6, with 6 meaning all backbone layers are + trainable. If ``None`` is passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.faster_rcnn.FasterRCNN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.FasterRCNN_MobileNet_V3_Large_FPN_Weights + :members: + """ + weights = FasterRCNN_MobileNet_V3_Large_FPN_Weights.verify(weights) + weights_backbone = MobileNet_V3_Large_Weights.verify(weights_backbone) + + defaults = { + "rpn_score_thresh": 0.05, + } + + kwargs = {**defaults, **kwargs} + return _fasterrcnn_mobilenet_v3_large_fpn( + weights=weights, + progress=progress, + num_classes=num_classes, + weights_backbone=weights_backbone, + trainable_backbone_layers=trainable_backbone_layers, + **kwargs, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/fcos.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/fcos.py new file mode 100644 index 0000000000000000000000000000000000000000..6ee93fc6c7903484434bf660e2b3f39471636815 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/fcos.py @@ -0,0 +1,775 @@ +import math +import warnings +from collections import OrderedDict +from functools import partial +from typing import Any, Callable, Dict, List, Optional, Tuple + +import torch +from torch import nn, Tensor + +from ...ops import boxes as box_ops, generalized_box_iou_loss, misc as misc_nn_ops, sigmoid_focal_loss +from ...ops.feature_pyramid_network import LastLevelP6P7 +from ...transforms._presets import ObjectDetection +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._meta import _COCO_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface +from ..resnet import resnet50, ResNet50_Weights +from . import _utils as det_utils +from .anchor_utils import AnchorGenerator +from .backbone_utils import _resnet_fpn_extractor, _validate_trainable_layers +from .transform import GeneralizedRCNNTransform + + +__all__ = [ + "FCOS", + "FCOS_ResNet50_FPN_Weights", + "fcos_resnet50_fpn", +] + + +class FCOSHead(nn.Module): + """ + A regression and classification head for use in FCOS. + + Args: + in_channels (int): number of channels of the input feature + num_anchors (int): number of anchors to be predicted + num_classes (int): number of classes to be predicted + num_convs (Optional[int]): number of conv layer of head. Default: 4. + """ + + __annotations__ = { + "box_coder": det_utils.BoxLinearCoder, + } + + def __init__(self, in_channels: int, num_anchors: int, num_classes: int, num_convs: Optional[int] = 4) -> None: + super().__init__() + self.box_coder = det_utils.BoxLinearCoder(normalize_by_size=True) + self.classification_head = FCOSClassificationHead(in_channels, num_anchors, num_classes, num_convs) + self.regression_head = FCOSRegressionHead(in_channels, num_anchors, num_convs) + + def compute_loss( + self, + targets: List[Dict[str, Tensor]], + head_outputs: Dict[str, Tensor], + anchors: List[Tensor], + matched_idxs: List[Tensor], + ) -> Dict[str, Tensor]: + + cls_logits = head_outputs["cls_logits"] # [N, HWA, C] + bbox_regression = head_outputs["bbox_regression"] # [N, HWA, 4] + bbox_ctrness = head_outputs["bbox_ctrness"] # [N, HWA, 1] + + all_gt_classes_targets = [] + all_gt_boxes_targets = [] + for targets_per_image, matched_idxs_per_image in zip(targets, matched_idxs): + if len(targets_per_image["labels"]) == 0: + gt_classes_targets = targets_per_image["labels"].new_zeros((len(matched_idxs_per_image),)) + gt_boxes_targets = targets_per_image["boxes"].new_zeros((len(matched_idxs_per_image), 4)) + else: + gt_classes_targets = targets_per_image["labels"][matched_idxs_per_image.clip(min=0)] + gt_boxes_targets = targets_per_image["boxes"][matched_idxs_per_image.clip(min=0)] + gt_classes_targets[matched_idxs_per_image < 0] = -1 # background + all_gt_classes_targets.append(gt_classes_targets) + all_gt_boxes_targets.append(gt_boxes_targets) + + # List[Tensor] to Tensor conversion of `all_gt_boxes_target`, `all_gt_classes_targets` and `anchors` + all_gt_boxes_targets, all_gt_classes_targets, anchors = ( + torch.stack(all_gt_boxes_targets), + torch.stack(all_gt_classes_targets), + torch.stack(anchors), + ) + + # compute foregroud + foregroud_mask = all_gt_classes_targets >= 0 + num_foreground = foregroud_mask.sum().item() + + # classification loss + gt_classes_targets = torch.zeros_like(cls_logits) + gt_classes_targets[foregroud_mask, all_gt_classes_targets[foregroud_mask]] = 1.0 + loss_cls = sigmoid_focal_loss(cls_logits, gt_classes_targets, reduction="sum") + + # amp issue: pred_boxes need to convert float + pred_boxes = self.box_coder.decode(bbox_regression, anchors) + + # regression loss: GIoU loss + loss_bbox_reg = generalized_box_iou_loss( + pred_boxes[foregroud_mask], + all_gt_boxes_targets[foregroud_mask], + reduction="sum", + ) + + # ctrness loss + + bbox_reg_targets = self.box_coder.encode(anchors, all_gt_boxes_targets) + + if len(bbox_reg_targets) == 0: + gt_ctrness_targets = bbox_reg_targets.new_zeros(bbox_reg_targets.size()[:-1]) + else: + left_right = bbox_reg_targets[:, :, [0, 2]] + top_bottom = bbox_reg_targets[:, :, [1, 3]] + gt_ctrness_targets = torch.sqrt( + (left_right.min(dim=-1)[0] / left_right.max(dim=-1)[0]) + * (top_bottom.min(dim=-1)[0] / top_bottom.max(dim=-1)[0]) + ) + pred_centerness = bbox_ctrness.squeeze(dim=2) + loss_bbox_ctrness = nn.functional.binary_cross_entropy_with_logits( + pred_centerness[foregroud_mask], gt_ctrness_targets[foregroud_mask], reduction="sum" + ) + + return { + "classification": loss_cls / max(1, num_foreground), + "bbox_regression": loss_bbox_reg / max(1, num_foreground), + "bbox_ctrness": loss_bbox_ctrness / max(1, num_foreground), + } + + def forward(self, x: List[Tensor]) -> Dict[str, Tensor]: + cls_logits = self.classification_head(x) + bbox_regression, bbox_ctrness = self.regression_head(x) + return { + "cls_logits": cls_logits, + "bbox_regression": bbox_regression, + "bbox_ctrness": bbox_ctrness, + } + + +class FCOSClassificationHead(nn.Module): + """ + A classification head for use in FCOS. + + Args: + in_channels (int): number of channels of the input feature. + num_anchors (int): number of anchors to be predicted. + num_classes (int): number of classes to be predicted. + num_convs (Optional[int]): number of conv layer. Default: 4. + prior_probability (Optional[float]): probability of prior. Default: 0.01. + norm_layer: Module specifying the normalization layer to use. + """ + + def __init__( + self, + in_channels: int, + num_anchors: int, + num_classes: int, + num_convs: int = 4, + prior_probability: float = 0.01, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + + self.num_classes = num_classes + self.num_anchors = num_anchors + + if norm_layer is None: + norm_layer = partial(nn.GroupNorm, 32) + + conv = [] + for _ in range(num_convs): + conv.append(nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1)) + conv.append(norm_layer(in_channels)) + conv.append(nn.ReLU()) + self.conv = nn.Sequential(*conv) + + for layer in self.conv.children(): + if isinstance(layer, nn.Conv2d): + torch.nn.init.normal_(layer.weight, std=0.01) + torch.nn.init.constant_(layer.bias, 0) + + self.cls_logits = nn.Conv2d(in_channels, num_anchors * num_classes, kernel_size=3, stride=1, padding=1) + torch.nn.init.normal_(self.cls_logits.weight, std=0.01) + torch.nn.init.constant_(self.cls_logits.bias, -math.log((1 - prior_probability) / prior_probability)) + + def forward(self, x: List[Tensor]) -> Tensor: + all_cls_logits = [] + + for features in x: + cls_logits = self.conv(features) + cls_logits = self.cls_logits(cls_logits) + + # Permute classification output from (N, A * K, H, W) to (N, HWA, K). + N, _, H, W = cls_logits.shape + cls_logits = cls_logits.view(N, -1, self.num_classes, H, W) + cls_logits = cls_logits.permute(0, 3, 4, 1, 2) + cls_logits = cls_logits.reshape(N, -1, self.num_classes) # Size=(N, HWA, 4) + + all_cls_logits.append(cls_logits) + + return torch.cat(all_cls_logits, dim=1) + + +class FCOSRegressionHead(nn.Module): + """ + A regression head for use in FCOS, which combines regression branch and center-ness branch. + This can obtain better performance. + + Reference: `FCOS: A simple and strong anchor-free object detector `_. + + Args: + in_channels (int): number of channels of the input feature + num_anchors (int): number of anchors to be predicted + num_convs (Optional[int]): number of conv layer. Default: 4. + norm_layer: Module specifying the normalization layer to use. + """ + + def __init__( + self, + in_channels: int, + num_anchors: int, + num_convs: int = 4, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ): + super().__init__() + + if norm_layer is None: + norm_layer = partial(nn.GroupNorm, 32) + + conv = [] + for _ in range(num_convs): + conv.append(nn.Conv2d(in_channels, in_channels, kernel_size=3, stride=1, padding=1)) + conv.append(norm_layer(in_channels)) + conv.append(nn.ReLU()) + self.conv = nn.Sequential(*conv) + + self.bbox_reg = nn.Conv2d(in_channels, num_anchors * 4, kernel_size=3, stride=1, padding=1) + self.bbox_ctrness = nn.Conv2d(in_channels, num_anchors * 1, kernel_size=3, stride=1, padding=1) + for layer in [self.bbox_reg, self.bbox_ctrness]: + torch.nn.init.normal_(layer.weight, std=0.01) + torch.nn.init.zeros_(layer.bias) + + for layer in self.conv.children(): + if isinstance(layer, nn.Conv2d): + torch.nn.init.normal_(layer.weight, std=0.01) + torch.nn.init.zeros_(layer.bias) + + def forward(self, x: List[Tensor]) -> Tuple[Tensor, Tensor]: + all_bbox_regression = [] + all_bbox_ctrness = [] + + for features in x: + bbox_feature = self.conv(features) + bbox_regression = nn.functional.relu(self.bbox_reg(bbox_feature)) + bbox_ctrness = self.bbox_ctrness(bbox_feature) + + # permute bbox regression output from (N, 4 * A, H, W) to (N, HWA, 4). + N, _, H, W = bbox_regression.shape + bbox_regression = bbox_regression.view(N, -1, 4, H, W) + bbox_regression = bbox_regression.permute(0, 3, 4, 1, 2) + bbox_regression = bbox_regression.reshape(N, -1, 4) # Size=(N, HWA, 4) + all_bbox_regression.append(bbox_regression) + + # permute bbox ctrness output from (N, 1 * A, H, W) to (N, HWA, 1). + bbox_ctrness = bbox_ctrness.view(N, -1, 1, H, W) + bbox_ctrness = bbox_ctrness.permute(0, 3, 4, 1, 2) + bbox_ctrness = bbox_ctrness.reshape(N, -1, 1) + all_bbox_ctrness.append(bbox_ctrness) + + return torch.cat(all_bbox_regression, dim=1), torch.cat(all_bbox_ctrness, dim=1) + + +class FCOS(nn.Module): + """ + Implements FCOS. + + The input to the model is expected to be a list of tensors, each of shape [C, H, W], one for each + image, and should be in 0-1 range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the class label for each ground-truth box + + The model returns a Dict[Tensor] during training, containing the classification, regression + and centerness losses. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a List[Dict[Tensor]], one for each input image. The fields of the Dict are as + follows: + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the predicted labels for each image + - scores (Tensor[N]): the scores for each prediction + + Args: + backbone (nn.Module): the network used to compute the features for the model. + It should contain an out_channels attribute, which indicates the number of output + channels that each feature map has (and it should be the same for all feature maps). + The backbone should return a single Tensor or an OrderedDict[Tensor]. + num_classes (int): number of output classes of the model (including the background). + min_size (int): Images are rescaled before feeding them to the backbone: + we attempt to preserve the aspect ratio and scale the shorter edge + to ``min_size``. If the resulting longer edge exceeds ``max_size``, + then downscale so that the longer edge does not exceed ``max_size``. + This may result in the shorter edge beeing lower than ``min_size``. + max_size (int): See ``min_size``. + image_mean (Tuple[float, float, float]): mean values used for input normalization. + They are generally the mean values of the dataset on which the backbone has been trained + on + image_std (Tuple[float, float, float]): std values used for input normalization. + They are generally the std values of the dataset on which the backbone has been trained on + anchor_generator (AnchorGenerator): module that generates the anchors for a set of feature + maps. For FCOS, only set one anchor for per position of each level, the width and height equal to + the stride of feature map, and set aspect ratio = 1.0, so the center of anchor is equivalent to the point + in FCOS paper. + head (nn.Module): Module run on top of the feature pyramid. + Defaults to a module containing a classification and regression module. + center_sampling_radius (int): radius of the "center" of a groundtruth box, + within which all anchor points are labeled positive. + score_thresh (float): Score threshold used for postprocessing the detections. + nms_thresh (float): NMS threshold used for postprocessing the detections. + detections_per_img (int): Number of best detections to keep after NMS. + topk_candidates (int): Number of best detections to keep before NMS. + + Example: + + >>> import torch + >>> import torchvision + >>> from torchvision.models.detection import FCOS + >>> from torchvision.models.detection.anchor_utils import AnchorGenerator + >>> # load a pre-trained model for classification and return + >>> # only the features + >>> backbone = torchvision.models.mobilenet_v2(weights=MobileNet_V2_Weights.DEFAULT).features + >>> # FCOS needs to know the number of + >>> # output channels in a backbone. For mobilenet_v2, it's 1280, + >>> # so we need to add it here + >>> backbone.out_channels = 1280 + >>> + >>> # let's make the network generate 5 x 3 anchors per spatial + >>> # location, with 5 different sizes and 3 different aspect + >>> # ratios. We have a Tuple[Tuple[int]] because each feature + >>> # map could potentially have different sizes and + >>> # aspect ratios + >>> anchor_generator = AnchorGenerator( + >>> sizes=((8,), (16,), (32,), (64,), (128,)), + >>> aspect_ratios=((1.0,),) + >>> ) + >>> + >>> # put the pieces together inside a FCOS model + >>> model = FCOS( + >>> backbone, + >>> num_classes=80, + >>> anchor_generator=anchor_generator, + >>> ) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + """ + + __annotations__ = { + "box_coder": det_utils.BoxLinearCoder, + } + + def __init__( + self, + backbone: nn.Module, + num_classes: int, + # transform parameters + min_size: int = 800, + max_size: int = 1333, + image_mean: Optional[List[float]] = None, + image_std: Optional[List[float]] = None, + # Anchor parameters + anchor_generator: Optional[AnchorGenerator] = None, + head: Optional[nn.Module] = None, + center_sampling_radius: float = 1.5, + score_thresh: float = 0.2, + nms_thresh: float = 0.6, + detections_per_img: int = 100, + topk_candidates: int = 1000, + **kwargs, + ): + super().__init__() + _log_api_usage_once(self) + + if not hasattr(backbone, "out_channels"): + raise ValueError( + "backbone should contain an attribute out_channels " + "specifying the number of output channels (assumed to be the " + "same for all the levels)" + ) + self.backbone = backbone + + if not isinstance(anchor_generator, (AnchorGenerator, type(None))): + raise TypeError( + f"anchor_generator should be of type AnchorGenerator or None, instead got {type(anchor_generator)}" + ) + + if anchor_generator is None: + anchor_sizes = ((8,), (16,), (32,), (64,), (128,)) # equal to strides of multi-level feature map + aspect_ratios = ((1.0,),) * len(anchor_sizes) # set only one anchor + anchor_generator = AnchorGenerator(anchor_sizes, aspect_ratios) + self.anchor_generator = anchor_generator + if self.anchor_generator.num_anchors_per_location()[0] != 1: + raise ValueError( + f"anchor_generator.num_anchors_per_location()[0] should be 1 instead of {anchor_generator.num_anchors_per_location()[0]}" + ) + + if head is None: + head = FCOSHead(backbone.out_channels, anchor_generator.num_anchors_per_location()[0], num_classes) + self.head = head + + self.box_coder = det_utils.BoxLinearCoder(normalize_by_size=True) + + if image_mean is None: + image_mean = [0.485, 0.456, 0.406] + if image_std is None: + image_std = [0.229, 0.224, 0.225] + self.transform = GeneralizedRCNNTransform(min_size, max_size, image_mean, image_std, **kwargs) + + self.center_sampling_radius = center_sampling_radius + self.score_thresh = score_thresh + self.nms_thresh = nms_thresh + self.detections_per_img = detections_per_img + self.topk_candidates = topk_candidates + + # used only on torchscript mode + self._has_warned = False + + @torch.jit.unused + def eager_outputs( + self, losses: Dict[str, Tensor], detections: List[Dict[str, Tensor]] + ) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]]: + if self.training: + return losses + + return detections + + def compute_loss( + self, + targets: List[Dict[str, Tensor]], + head_outputs: Dict[str, Tensor], + anchors: List[Tensor], + num_anchors_per_level: List[int], + ) -> Dict[str, Tensor]: + matched_idxs = [] + for anchors_per_image, targets_per_image in zip(anchors, targets): + if targets_per_image["boxes"].numel() == 0: + matched_idxs.append( + torch.full((anchors_per_image.size(0),), -1, dtype=torch.int64, device=anchors_per_image.device) + ) + continue + + gt_boxes = targets_per_image["boxes"] + gt_centers = (gt_boxes[:, :2] + gt_boxes[:, 2:]) / 2 # Nx2 + anchor_centers = (anchors_per_image[:, :2] + anchors_per_image[:, 2:]) / 2 # N + anchor_sizes = anchors_per_image[:, 2] - anchors_per_image[:, 0] + # center sampling: anchor point must be close enough to gt center. + pairwise_match = (anchor_centers[:, None, :] - gt_centers[None, :, :]).abs_().max( + dim=2 + ).values < self.center_sampling_radius * anchor_sizes[:, None] + # compute pairwise distance between N points and M boxes + x, y = anchor_centers.unsqueeze(dim=2).unbind(dim=1) # (N, 1) + x0, y0, x1, y1 = gt_boxes.unsqueeze(dim=0).unbind(dim=2) # (1, M) + pairwise_dist = torch.stack([x - x0, y - y0, x1 - x, y1 - y], dim=2) # (N, M) + + # anchor point must be inside gt + pairwise_match &= pairwise_dist.min(dim=2).values > 0 + + # each anchor is only responsible for certain scale range. + lower_bound = anchor_sizes * 4 + lower_bound[: num_anchors_per_level[0]] = 0 + upper_bound = anchor_sizes * 8 + upper_bound[-num_anchors_per_level[-1] :] = float("inf") + pairwise_dist = pairwise_dist.max(dim=2).values + pairwise_match &= (pairwise_dist > lower_bound[:, None]) & (pairwise_dist < upper_bound[:, None]) + + # match the GT box with minimum area, if there are multiple GT matches + gt_areas = (gt_boxes[:, 2] - gt_boxes[:, 0]) * (gt_boxes[:, 3] - gt_boxes[:, 1]) # N + pairwise_match = pairwise_match.to(torch.float32) * (1e8 - gt_areas[None, :]) + min_values, matched_idx = pairwise_match.max(dim=1) # R, per-anchor match + matched_idx[min_values < 1e-5] = -1 # unmatched anchors are assigned -1 + + matched_idxs.append(matched_idx) + + return self.head.compute_loss(targets, head_outputs, anchors, matched_idxs) + + def postprocess_detections( + self, head_outputs: Dict[str, List[Tensor]], anchors: List[List[Tensor]], image_shapes: List[Tuple[int, int]] + ) -> List[Dict[str, Tensor]]: + class_logits = head_outputs["cls_logits"] + box_regression = head_outputs["bbox_regression"] + box_ctrness = head_outputs["bbox_ctrness"] + + num_images = len(image_shapes) + + detections: List[Dict[str, Tensor]] = [] + + for index in range(num_images): + box_regression_per_image = [br[index] for br in box_regression] + logits_per_image = [cl[index] for cl in class_logits] + box_ctrness_per_image = [bc[index] for bc in box_ctrness] + anchors_per_image, image_shape = anchors[index], image_shapes[index] + + image_boxes = [] + image_scores = [] + image_labels = [] + + for box_regression_per_level, logits_per_level, box_ctrness_per_level, anchors_per_level in zip( + box_regression_per_image, logits_per_image, box_ctrness_per_image, anchors_per_image + ): + num_classes = logits_per_level.shape[-1] + + # remove low scoring boxes + scores_per_level = torch.sqrt( + torch.sigmoid(logits_per_level) * torch.sigmoid(box_ctrness_per_level) + ).flatten() + keep_idxs = scores_per_level > self.score_thresh + scores_per_level = scores_per_level[keep_idxs] + topk_idxs = torch.where(keep_idxs)[0] + + # keep only topk scoring predictions + num_topk = det_utils._topk_min(topk_idxs, self.topk_candidates, 0) + scores_per_level, idxs = scores_per_level.topk(num_topk) + topk_idxs = topk_idxs[idxs] + + anchor_idxs = torch.div(topk_idxs, num_classes, rounding_mode="floor") + labels_per_level = topk_idxs % num_classes + + boxes_per_level = self.box_coder.decode( + box_regression_per_level[anchor_idxs], anchors_per_level[anchor_idxs] + ) + boxes_per_level = box_ops.clip_boxes_to_image(boxes_per_level, image_shape) + + image_boxes.append(boxes_per_level) + image_scores.append(scores_per_level) + image_labels.append(labels_per_level) + + image_boxes = torch.cat(image_boxes, dim=0) + image_scores = torch.cat(image_scores, dim=0) + image_labels = torch.cat(image_labels, dim=0) + + # non-maximum suppression + keep = box_ops.batched_nms(image_boxes, image_scores, image_labels, self.nms_thresh) + keep = keep[: self.detections_per_img] + + detections.append( + { + "boxes": image_boxes[keep], + "scores": image_scores[keep], + "labels": image_labels[keep], + } + ) + + return detections + + def forward( + self, + images: List[Tensor], + targets: Optional[List[Dict[str, Tensor]]] = None, + ) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]]: + """ + Args: + images (list[Tensor]): images to be processed + targets (list[Dict[Tensor]]): ground-truth boxes present in the image (optional) + + Returns: + result (list[BoxList] or dict[Tensor]): the output from the model. + During training, it returns a dict[Tensor] which contains the losses. + During testing, it returns list[BoxList] contains additional fields + like `scores`, `labels` and `mask` (for Mask R-CNN models). + """ + if self.training: + + if targets is None: + torch._assert(False, "targets should not be none when in training mode") + else: + for target in targets: + boxes = target["boxes"] + torch._assert(isinstance(boxes, torch.Tensor), "Expected target boxes to be of type Tensor.") + torch._assert( + len(boxes.shape) == 2 and boxes.shape[-1] == 4, + f"Expected target boxes to be a tensor of shape [N, 4], got {boxes.shape}.", + ) + + original_image_sizes: List[Tuple[int, int]] = [] + for img in images: + val = img.shape[-2:] + torch._assert( + len(val) == 2, + f"expecting the last two dimensions of the Tensor to be H and W instead got {img.shape[-2:]}", + ) + original_image_sizes.append((val[0], val[1])) + + # transform the input + images, targets = self.transform(images, targets) + + # Check for degenerate boxes + if targets is not None: + for target_idx, target in enumerate(targets): + boxes = target["boxes"] + degenerate_boxes = boxes[:, 2:] <= boxes[:, :2] + if degenerate_boxes.any(): + # print the first degenerate box + bb_idx = torch.where(degenerate_boxes.any(dim=1))[0][0] + degen_bb: List[float] = boxes[bb_idx].tolist() + torch._assert( + False, + f"All bounding boxes should have positive height and width. Found invalid box {degen_bb} for target at index {target_idx}.", + ) + + # get the features from the backbone + features = self.backbone(images.tensors) + if isinstance(features, torch.Tensor): + features = OrderedDict([("0", features)]) + + features = list(features.values()) + + # compute the fcos heads outputs using the features + head_outputs = self.head(features) + + # create the set of anchors + anchors = self.anchor_generator(images, features) + # recover level sizes + num_anchors_per_level = [x.size(2) * x.size(3) for x in features] + + losses = {} + detections: List[Dict[str, Tensor]] = [] + if self.training: + if targets is None: + torch._assert(False, "targets should not be none when in training mode") + else: + # compute the losses + losses = self.compute_loss(targets, head_outputs, anchors, num_anchors_per_level) + else: + # split outputs per level + split_head_outputs: Dict[str, List[Tensor]] = {} + for k in head_outputs: + split_head_outputs[k] = list(head_outputs[k].split(num_anchors_per_level, dim=1)) + split_anchors = [list(a.split(num_anchors_per_level)) for a in anchors] + + # compute the detections + detections = self.postprocess_detections(split_head_outputs, split_anchors, images.image_sizes) + detections = self.transform.postprocess(detections, images.image_sizes, original_image_sizes) + + if torch.jit.is_scripting(): + if not self._has_warned: + warnings.warn("FCOS always returns a (Losses, Detections) tuple in scripting") + self._has_warned = True + return losses, detections + return self.eager_outputs(losses, detections) + + +class FCOS_ResNet50_FPN_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/fcos_resnet50_fpn_coco-99b0c9b7.pth", + transforms=ObjectDetection, + meta={ + "num_params": 32269600, + "categories": _COCO_CATEGORIES, + "min_size": (1, 1), + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#fcos-resnet-50-fpn", + "_metrics": { + "COCO-val2017": { + "box_map": 39.2, + } + }, + "_ops": 128.207, + "_file_size": 123.608, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", FCOS_ResNet50_FPN_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def fcos_resnet50_fpn( + *, + weights: Optional[FCOS_ResNet50_FPN_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = ResNet50_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> FCOS: + """ + Constructs a FCOS model with a ResNet-50-FPN backbone. + + .. betastatus:: detection module + + Reference: `FCOS: Fully Convolutional One-Stage Object Detection `_. + `FCOS: A simple and strong anchor-free object detector `_. + + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each + image, and should be in ``0-1`` range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the class label for each ground-truth box + + The model returns a ``Dict[Tensor]`` during training, containing the classification and regression + losses. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a ``List[Dict[Tensor]]``, one for each input image. The fields of the ``Dict`` are as + follows, where ``N`` is the number of detections: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the predicted labels for each detection + - scores (``Tensor[N]``): the scores of each detection + + For more details on the output, you may refer to :ref:`instance_seg_output`. + + Example: + + >>> model = torchvision.models.detection.fcos_resnet50_fpn(weights=FCOS_ResNet50_FPN_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + + Args: + weights (:class:`~torchvision.models.detection.FCOS_ResNet50_FPN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.FCOS_ResNet50_FPN_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for + the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) resnet layers starting + from final block. Valid values are between 0 and 5, with 5 meaning all backbone layers are + trainable. If ``None`` is passed (the default) this value is set to 3. Default: None + **kwargs: parameters passed to the ``torchvision.models.detection.FCOS`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.FCOS_ResNet50_FPN_Weights + :members: + """ + weights = FCOS_ResNet50_FPN_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + norm_layer = misc_nn_ops.FrozenBatchNorm2d if is_trained else nn.BatchNorm2d + + backbone = resnet50(weights=weights_backbone, progress=progress, norm_layer=norm_layer) + backbone = _resnet_fpn_extractor( + backbone, trainable_backbone_layers, returned_layers=[2, 3, 4], extra_blocks=LastLevelP6P7(256, 256) + ) + model = FCOS(backbone, num_classes, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/generalized_rcnn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/generalized_rcnn.py new file mode 100644 index 0000000000000000000000000000000000000000..695dd6978fb4f6060fa357eb8b54da27a7be2809 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/generalized_rcnn.py @@ -0,0 +1,118 @@ +""" +Implements the Generalized R-CNN framework +""" + +import warnings +from collections import OrderedDict +from typing import Dict, List, Optional, Tuple, Union + +import torch +from torch import nn, Tensor + +from ...utils import _log_api_usage_once + + +class GeneralizedRCNN(nn.Module): + """ + Main class for Generalized R-CNN. + + Args: + backbone (nn.Module): + rpn (nn.Module): + roi_heads (nn.Module): takes the features + the proposals from the RPN and computes + detections / masks from it. + transform (nn.Module): performs the data transformation from the inputs to feed into + the model + """ + + def __init__(self, backbone: nn.Module, rpn: nn.Module, roi_heads: nn.Module, transform: nn.Module) -> None: + super().__init__() + _log_api_usage_once(self) + self.transform = transform + self.backbone = backbone + self.rpn = rpn + self.roi_heads = roi_heads + # used only on torchscript mode + self._has_warned = False + + @torch.jit.unused + def eager_outputs(self, losses, detections): + # type: (Dict[str, Tensor], List[Dict[str, Tensor]]) -> Union[Dict[str, Tensor], List[Dict[str, Tensor]]] + if self.training: + return losses + + return detections + + def forward(self, images, targets=None): + # type: (List[Tensor], Optional[List[Dict[str, Tensor]]]) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]] + """ + Args: + images (list[Tensor]): images to be processed + targets (list[Dict[str, Tensor]]): ground-truth boxes present in the image (optional) + + Returns: + result (list[BoxList] or dict[Tensor]): the output from the model. + During training, it returns a dict[Tensor] which contains the losses. + During testing, it returns list[BoxList] contains additional fields + like `scores`, `labels` and `mask` (for Mask R-CNN models). + + """ + if self.training: + if targets is None: + torch._assert(False, "targets should not be none when in training mode") + else: + for target in targets: + boxes = target["boxes"] + if isinstance(boxes, torch.Tensor): + torch._assert( + len(boxes.shape) == 2 and boxes.shape[-1] == 4, + f"Expected target boxes to be a tensor of shape [N, 4], got {boxes.shape}.", + ) + else: + torch._assert(False, f"Expected target boxes to be of type Tensor, got {type(boxes)}.") + + original_image_sizes: List[Tuple[int, int]] = [] + for img in images: + val = img.shape[-2:] + torch._assert( + len(val) == 2, + f"expecting the last two dimensions of the Tensor to be H and W instead got {img.shape[-2:]}", + ) + original_image_sizes.append((val[0], val[1])) + + images, targets = self.transform(images, targets) + + # Check for degenerate boxes + # TODO: Move this to a function + if targets is not None: + for target_idx, target in enumerate(targets): + boxes = target["boxes"] + degenerate_boxes = boxes[:, 2:] <= boxes[:, :2] + if degenerate_boxes.any(): + # print the first degenerate box + bb_idx = torch.where(degenerate_boxes.any(dim=1))[0][0] + degen_bb: List[float] = boxes[bb_idx].tolist() + torch._assert( + False, + "All bounding boxes should have positive height and width." + f" Found invalid box {degen_bb} for target at index {target_idx}.", + ) + + features = self.backbone(images.tensors) + if isinstance(features, torch.Tensor): + features = OrderedDict([("0", features)]) + proposals, proposal_losses = self.rpn(images, features, targets) + detections, detector_losses = self.roi_heads(features, proposals, images.image_sizes, targets) + detections = self.transform.postprocess(detections, images.image_sizes, original_image_sizes) # type: ignore[operator] + + losses = {} + losses.update(detector_losses) + losses.update(proposal_losses) + + if torch.jit.is_scripting(): + if not self._has_warned: + warnings.warn("RCNN always returns a (Losses, Detections) tuple in scripting") + self._has_warned = True + return losses, detections + else: + return self.eager_outputs(losses, detections) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/image_list.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/image_list.py new file mode 100644 index 0000000000000000000000000000000000000000..01d3a0d63d6a075f2a4100241f2d2b8d9a47c950 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/image_list.py @@ -0,0 +1,25 @@ +from typing import List, Tuple + +import torch +from torch import Tensor + + +class ImageList: + """ + Structure that holds a list of images (of possibly + varying sizes) as a single tensor. + This works by padding the images to the same size, + and storing in a field the original sizes of each image + + Args: + tensors (tensor): Tensor containing images. + image_sizes (list[tuple[int, int]]): List of Tuples each containing size of images. + """ + + def __init__(self, tensors: Tensor, image_sizes: List[Tuple[int, int]]) -> None: + self.tensors = tensors + self.image_sizes = image_sizes + + def to(self, device: torch.device) -> "ImageList": + cast_tensor = self.tensors.to(device) + return ImageList(cast_tensor, self.image_sizes) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/keypoint_rcnn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/keypoint_rcnn.py new file mode 100644 index 0000000000000000000000000000000000000000..5ca869a4fcbbbdd3fa69568c695430ba98e03578 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/keypoint_rcnn.py @@ -0,0 +1,474 @@ +from typing import Any, Optional + +import torch +from torch import nn +from torchvision.ops import MultiScaleRoIAlign + +from ...ops import misc as misc_nn_ops +from ...transforms._presets import ObjectDetection +from .._api import register_model, Weights, WeightsEnum +from .._meta import _COCO_PERSON_CATEGORIES, _COCO_PERSON_KEYPOINT_NAMES +from .._utils import _ovewrite_value_param, handle_legacy_interface +from ..resnet import resnet50, ResNet50_Weights +from ._utils import overwrite_eps +from .backbone_utils import _resnet_fpn_extractor, _validate_trainable_layers +from .faster_rcnn import FasterRCNN + + +__all__ = [ + "KeypointRCNN", + "KeypointRCNN_ResNet50_FPN_Weights", + "keypointrcnn_resnet50_fpn", +] + + +class KeypointRCNN(FasterRCNN): + """ + Implements Keypoint R-CNN. + + The input to the model is expected to be a list of tensors, each of shape [C, H, W], one for each + image, and should be in 0-1 range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the class label for each ground-truth box + - keypoints (FloatTensor[N, K, 3]): the K keypoints location for each of the N instances, in the + format [x, y, visibility], where visibility=0 means that the keypoint is not visible. + + The model returns a Dict[Tensor] during training, containing the classification and regression + losses for both the RPN and the R-CNN, and the keypoint loss. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a List[Dict[Tensor]], one for each input image. The fields of the Dict are as + follows: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the predicted labels for each image + - scores (Tensor[N]): the scores or each prediction + - keypoints (FloatTensor[N, K, 3]): the locations of the predicted keypoints, in [x, y, v] format. + + Args: + backbone (nn.Module): the network used to compute the features for the model. + It should contain an out_channels attribute, which indicates the number of output + channels that each feature map has (and it should be the same for all feature maps). + The backbone should return a single Tensor or and OrderedDict[Tensor]. + num_classes (int): number of output classes of the model (including the background). + If box_predictor is specified, num_classes should be None. + min_size (int): Images are rescaled before feeding them to the backbone: + we attempt to preserve the aspect ratio and scale the shorter edge + to ``min_size``. If the resulting longer edge exceeds ``max_size``, + then downscale so that the longer edge does not exceed ``max_size``. + This may result in the shorter edge beeing lower than ``min_size``. + max_size (int): See ``min_size``. + image_mean (Tuple[float, float, float]): mean values used for input normalization. + They are generally the mean values of the dataset on which the backbone has been trained + on + image_std (Tuple[float, float, float]): std values used for input normalization. + They are generally the std values of the dataset on which the backbone has been trained on + rpn_anchor_generator (AnchorGenerator): module that generates the anchors for a set of feature + maps. + rpn_head (nn.Module): module that computes the objectness and regression deltas from the RPN + rpn_pre_nms_top_n_train (int): number of proposals to keep before applying NMS during training + rpn_pre_nms_top_n_test (int): number of proposals to keep before applying NMS during testing + rpn_post_nms_top_n_train (int): number of proposals to keep after applying NMS during training + rpn_post_nms_top_n_test (int): number of proposals to keep after applying NMS during testing + rpn_nms_thresh (float): NMS threshold used for postprocessing the RPN proposals + rpn_fg_iou_thresh (float): minimum IoU between the anchor and the GT box so that they can be + considered as positive during training of the RPN. + rpn_bg_iou_thresh (float): maximum IoU between the anchor and the GT box so that they can be + considered as negative during training of the RPN. + rpn_batch_size_per_image (int): number of anchors that are sampled during training of the RPN + for computing the loss + rpn_positive_fraction (float): proportion of positive anchors in a mini-batch during training + of the RPN + rpn_score_thresh (float): only return proposals with an objectness score greater than rpn_score_thresh + box_roi_pool (MultiScaleRoIAlign): the module which crops and resizes the feature maps in + the locations indicated by the bounding boxes + box_head (nn.Module): module that takes the cropped feature maps as input + box_predictor (nn.Module): module that takes the output of box_head and returns the + classification logits and box regression deltas. + box_score_thresh (float): during inference, only return proposals with a classification score + greater than box_score_thresh + box_nms_thresh (float): NMS threshold for the prediction head. Used during inference + box_detections_per_img (int): maximum number of detections per image, for all classes. + box_fg_iou_thresh (float): minimum IoU between the proposals and the GT box so that they can be + considered as positive during training of the classification head + box_bg_iou_thresh (float): maximum IoU between the proposals and the GT box so that they can be + considered as negative during training of the classification head + box_batch_size_per_image (int): number of proposals that are sampled during training of the + classification head + box_positive_fraction (float): proportion of positive proposals in a mini-batch during training + of the classification head + bbox_reg_weights (Tuple[float, float, float, float]): weights for the encoding/decoding of the + bounding boxes + keypoint_roi_pool (MultiScaleRoIAlign): the module which crops and resizes the feature maps in + the locations indicated by the bounding boxes, which will be used for the keypoint head. + keypoint_head (nn.Module): module that takes the cropped feature maps as input + keypoint_predictor (nn.Module): module that takes the output of the keypoint_head and returns the + heatmap logits + + Example:: + + >>> import torch + >>> import torchvision + >>> from torchvision.models.detection import KeypointRCNN + >>> from torchvision.models.detection.anchor_utils import AnchorGenerator + >>> + >>> # load a pre-trained model for classification and return + >>> # only the features + >>> backbone = torchvision.models.mobilenet_v2(weights=MobileNet_V2_Weights.DEFAULT).features + >>> # KeypointRCNN needs to know the number of + >>> # output channels in a backbone. For mobilenet_v2, it's 1280, + >>> # so we need to add it here + >>> backbone.out_channels = 1280 + >>> + >>> # let's make the RPN generate 5 x 3 anchors per spatial + >>> # location, with 5 different sizes and 3 different aspect + >>> # ratios. We have a Tuple[Tuple[int]] because each feature + >>> # map could potentially have different sizes and + >>> # aspect ratios + >>> anchor_generator = AnchorGenerator(sizes=((32, 64, 128, 256, 512),), + >>> aspect_ratios=((0.5, 1.0, 2.0),)) + >>> + >>> # let's define what are the feature maps that we will + >>> # use to perform the region of interest cropping, as well as + >>> # the size of the crop after rescaling. + >>> # if your backbone returns a Tensor, featmap_names is expected to + >>> # be ['0']. More generally, the backbone should return an + >>> # OrderedDict[Tensor], and in featmap_names you can choose which + >>> # feature maps to use. + >>> roi_pooler = torchvision.ops.MultiScaleRoIAlign(featmap_names=['0'], + >>> output_size=7, + >>> sampling_ratio=2) + >>> + >>> keypoint_roi_pooler = torchvision.ops.MultiScaleRoIAlign(featmap_names=['0'], + >>> output_size=14, + >>> sampling_ratio=2) + >>> # put the pieces together inside a KeypointRCNN model + >>> model = KeypointRCNN(backbone, + >>> num_classes=2, + >>> rpn_anchor_generator=anchor_generator, + >>> box_roi_pool=roi_pooler, + >>> keypoint_roi_pool=keypoint_roi_pooler) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + """ + + def __init__( + self, + backbone, + num_classes=None, + # transform parameters + min_size=None, + max_size=1333, + image_mean=None, + image_std=None, + # RPN parameters + rpn_anchor_generator=None, + rpn_head=None, + rpn_pre_nms_top_n_train=2000, + rpn_pre_nms_top_n_test=1000, + rpn_post_nms_top_n_train=2000, + rpn_post_nms_top_n_test=1000, + rpn_nms_thresh=0.7, + rpn_fg_iou_thresh=0.7, + rpn_bg_iou_thresh=0.3, + rpn_batch_size_per_image=256, + rpn_positive_fraction=0.5, + rpn_score_thresh=0.0, + # Box parameters + box_roi_pool=None, + box_head=None, + box_predictor=None, + box_score_thresh=0.05, + box_nms_thresh=0.5, + box_detections_per_img=100, + box_fg_iou_thresh=0.5, + box_bg_iou_thresh=0.5, + box_batch_size_per_image=512, + box_positive_fraction=0.25, + bbox_reg_weights=None, + # keypoint parameters + keypoint_roi_pool=None, + keypoint_head=None, + keypoint_predictor=None, + num_keypoints=None, + **kwargs, + ): + + if not isinstance(keypoint_roi_pool, (MultiScaleRoIAlign, type(None))): + raise TypeError( + "keypoint_roi_pool should be of type MultiScaleRoIAlign or None instead of {type(keypoint_roi_pool)}" + ) + if min_size is None: + min_size = (640, 672, 704, 736, 768, 800) + + if num_keypoints is not None: + if keypoint_predictor is not None: + raise ValueError("num_keypoints should be None when keypoint_predictor is specified") + else: + num_keypoints = 17 + + out_channels = backbone.out_channels + + if keypoint_roi_pool is None: + keypoint_roi_pool = MultiScaleRoIAlign(featmap_names=["0", "1", "2", "3"], output_size=14, sampling_ratio=2) + + if keypoint_head is None: + keypoint_layers = tuple(512 for _ in range(8)) + keypoint_head = KeypointRCNNHeads(out_channels, keypoint_layers) + + if keypoint_predictor is None: + keypoint_dim_reduced = 512 # == keypoint_layers[-1] + keypoint_predictor = KeypointRCNNPredictor(keypoint_dim_reduced, num_keypoints) + + super().__init__( + backbone, + num_classes, + # transform parameters + min_size, + max_size, + image_mean, + image_std, + # RPN-specific parameters + rpn_anchor_generator, + rpn_head, + rpn_pre_nms_top_n_train, + rpn_pre_nms_top_n_test, + rpn_post_nms_top_n_train, + rpn_post_nms_top_n_test, + rpn_nms_thresh, + rpn_fg_iou_thresh, + rpn_bg_iou_thresh, + rpn_batch_size_per_image, + rpn_positive_fraction, + rpn_score_thresh, + # Box parameters + box_roi_pool, + box_head, + box_predictor, + box_score_thresh, + box_nms_thresh, + box_detections_per_img, + box_fg_iou_thresh, + box_bg_iou_thresh, + box_batch_size_per_image, + box_positive_fraction, + bbox_reg_weights, + **kwargs, + ) + + self.roi_heads.keypoint_roi_pool = keypoint_roi_pool + self.roi_heads.keypoint_head = keypoint_head + self.roi_heads.keypoint_predictor = keypoint_predictor + + +class KeypointRCNNHeads(nn.Sequential): + def __init__(self, in_channels, layers): + d = [] + next_feature = in_channels + for out_channels in layers: + d.append(nn.Conv2d(next_feature, out_channels, 3, stride=1, padding=1)) + d.append(nn.ReLU(inplace=True)) + next_feature = out_channels + super().__init__(*d) + for m in self.children(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu") + nn.init.constant_(m.bias, 0) + + +class KeypointRCNNPredictor(nn.Module): + def __init__(self, in_channels, num_keypoints): + super().__init__() + input_features = in_channels + deconv_kernel = 4 + self.kps_score_lowres = nn.ConvTranspose2d( + input_features, + num_keypoints, + deconv_kernel, + stride=2, + padding=deconv_kernel // 2 - 1, + ) + nn.init.kaiming_normal_(self.kps_score_lowres.weight, mode="fan_out", nonlinearity="relu") + nn.init.constant_(self.kps_score_lowres.bias, 0) + self.up_scale = 2 + self.out_channels = num_keypoints + + def forward(self, x): + x = self.kps_score_lowres(x) + return torch.nn.functional.interpolate( + x, scale_factor=float(self.up_scale), mode="bilinear", align_corners=False, recompute_scale_factor=False + ) + + +_COMMON_META = { + "categories": _COCO_PERSON_CATEGORIES, + "keypoint_names": _COCO_PERSON_KEYPOINT_NAMES, + "min_size": (1, 1), +} + + +class KeypointRCNN_ResNet50_FPN_Weights(WeightsEnum): + COCO_LEGACY = Weights( + url="https://download.pytorch.org/models/keypointrcnn_resnet50_fpn_coco-9f466800.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 59137258, + "recipe": "https://github.com/pytorch/vision/issues/1606", + "_metrics": { + "COCO-val2017": { + "box_map": 50.6, + "kp_map": 61.1, + } + }, + "_ops": 133.924, + "_file_size": 226.054, + "_docs": """ + These weights were produced by following a similar training recipe as on the paper but use a checkpoint + from an early epoch. + """, + }, + ) + COCO_V1 = Weights( + url="https://download.pytorch.org/models/keypointrcnn_resnet50_fpn_coco-fc266e95.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 59137258, + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#keypoint-r-cnn", + "_metrics": { + "COCO-val2017": { + "box_map": 54.6, + "kp_map": 65.0, + } + }, + "_ops": 137.42, + "_file_size": 226.054, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +@register_model() +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: KeypointRCNN_ResNet50_FPN_Weights.COCO_LEGACY + if kwargs["pretrained"] == "legacy" + else KeypointRCNN_ResNet50_FPN_Weights.COCO_V1, + ), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def keypointrcnn_resnet50_fpn( + *, + weights: Optional[KeypointRCNN_ResNet50_FPN_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + num_keypoints: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = ResNet50_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> KeypointRCNN: + """ + Constructs a Keypoint R-CNN model with a ResNet-50-FPN backbone. + + .. betastatus:: detection module + + Reference: `Mask R-CNN `__. + + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each + image, and should be in ``0-1`` range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the class label for each ground-truth box + - keypoints (``FloatTensor[N, K, 3]``): the ``K`` keypoints location for each of the ``N`` instances, in the + format ``[x, y, visibility]``, where ``visibility=0`` means that the keypoint is not visible. + + The model returns a ``Dict[Tensor]`` during training, containing the classification and regression + losses for both the RPN and the R-CNN, and the keypoint loss. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a ``List[Dict[Tensor]]``, one for each input image. The fields of the ``Dict`` are as + follows, where ``N`` is the number of detected instances: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the predicted labels for each instance + - scores (``Tensor[N]``): the scores or each instance + - keypoints (``FloatTensor[N, K, 3]``): the locations of the predicted keypoints, in ``[x, y, v]`` format. + + For more details on the output, you may refer to :ref:`instance_seg_output`. + + Keypoint R-CNN is exportable to ONNX for a fixed batch size with inputs images of fixed size. + + Example:: + + >>> model = torchvision.models.detection.keypointrcnn_resnet50_fpn(weights=KeypointRCNN_ResNet50_FPN_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + >>> + >>> # optionally, if you want to export the model to ONNX: + >>> torch.onnx.export(model, x, "keypoint_rcnn.onnx", opset_version = 11) + + Args: + weights (:class:`~torchvision.models.detection.KeypointRCNN_ResNet50_FPN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.KeypointRCNN_ResNet50_FPN_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr + num_classes (int, optional): number of output classes of the model (including the background) + num_keypoints (int, optional): number of keypoints + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The + pretrained weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from final block. + Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. If ``None`` is + passed (the default) this value is set to 3. + + .. autoclass:: torchvision.models.detection.KeypointRCNN_ResNet50_FPN_Weights + :members: + """ + weights = KeypointRCNN_ResNet50_FPN_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + num_keypoints = _ovewrite_value_param("num_keypoints", num_keypoints, len(weights.meta["keypoint_names"])) + else: + if num_classes is None: + num_classes = 2 + if num_keypoints is None: + num_keypoints = 17 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + norm_layer = misc_nn_ops.FrozenBatchNorm2d if is_trained else nn.BatchNorm2d + + backbone = resnet50(weights=weights_backbone, progress=progress, norm_layer=norm_layer) + backbone = _resnet_fpn_extractor(backbone, trainable_backbone_layers) + model = KeypointRCNN(backbone, num_classes, num_keypoints=num_keypoints, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if weights == KeypointRCNN_ResNet50_FPN_Weights.COCO_V1: + overwrite_eps(model, 0.0) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/mask_rcnn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/mask_rcnn.py new file mode 100644 index 0000000000000000000000000000000000000000..a7221a1c4ca0b774075705a4275ecbd47f993fb1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/mask_rcnn.py @@ -0,0 +1,590 @@ +from collections import OrderedDict +from typing import Any, Callable, Optional + +from torch import nn +from torchvision.ops import MultiScaleRoIAlign + +from ...ops import misc as misc_nn_ops +from ...transforms._presets import ObjectDetection +from .._api import register_model, Weights, WeightsEnum +from .._meta import _COCO_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface +from ..resnet import resnet50, ResNet50_Weights +from ._utils import overwrite_eps +from .backbone_utils import _resnet_fpn_extractor, _validate_trainable_layers +from .faster_rcnn import _default_anchorgen, FasterRCNN, FastRCNNConvFCHead, RPNHead + + +__all__ = [ + "MaskRCNN", + "MaskRCNN_ResNet50_FPN_Weights", + "MaskRCNN_ResNet50_FPN_V2_Weights", + "maskrcnn_resnet50_fpn", + "maskrcnn_resnet50_fpn_v2", +] + + +class MaskRCNN(FasterRCNN): + """ + Implements Mask R-CNN. + + The input to the model is expected to be a list of tensors, each of shape [C, H, W], one for each + image, and should be in 0-1 range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the class label for each ground-truth box + - masks (UInt8Tensor[N, H, W]): the segmentation binary masks for each instance + + The model returns a Dict[Tensor] during training, containing the classification and regression + losses for both the RPN and the R-CNN, and the mask loss. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a List[Dict[Tensor]], one for each input image. The fields of the Dict are as + follows: + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the predicted labels for each image + - scores (Tensor[N]): the scores or each prediction + - masks (UInt8Tensor[N, 1, H, W]): the predicted masks for each instance, in 0-1 range. In order to + obtain the final segmentation masks, the soft masks can be thresholded, generally + with a value of 0.5 (mask >= 0.5) + + Args: + backbone (nn.Module): the network used to compute the features for the model. + It should contain an out_channels attribute, which indicates the number of output + channels that each feature map has (and it should be the same for all feature maps). + The backbone should return a single Tensor or and OrderedDict[Tensor]. + num_classes (int): number of output classes of the model (including the background). + If box_predictor is specified, num_classes should be None. + min_size (int): Images are rescaled before feeding them to the backbone: + we attempt to preserve the aspect ratio and scale the shorter edge + to ``min_size``. If the resulting longer edge exceeds ``max_size``, + then downscale so that the longer edge does not exceed ``max_size``. + This may result in the shorter edge beeing lower than ``min_size``. + max_size (int): See ``min_size``. + image_mean (Tuple[float, float, float]): mean values used for input normalization. + They are generally the mean values of the dataset on which the backbone has been trained + on + image_std (Tuple[float, float, float]): std values used for input normalization. + They are generally the std values of the dataset on which the backbone has been trained on + rpn_anchor_generator (AnchorGenerator): module that generates the anchors for a set of feature + maps. + rpn_head (nn.Module): module that computes the objectness and regression deltas from the RPN + rpn_pre_nms_top_n_train (int): number of proposals to keep before applying NMS during training + rpn_pre_nms_top_n_test (int): number of proposals to keep before applying NMS during testing + rpn_post_nms_top_n_train (int): number of proposals to keep after applying NMS during training + rpn_post_nms_top_n_test (int): number of proposals to keep after applying NMS during testing + rpn_nms_thresh (float): NMS threshold used for postprocessing the RPN proposals + rpn_fg_iou_thresh (float): minimum IoU between the anchor and the GT box so that they can be + considered as positive during training of the RPN. + rpn_bg_iou_thresh (float): maximum IoU between the anchor and the GT box so that they can be + considered as negative during training of the RPN. + rpn_batch_size_per_image (int): number of anchors that are sampled during training of the RPN + for computing the loss + rpn_positive_fraction (float): proportion of positive anchors in a mini-batch during training + of the RPN + rpn_score_thresh (float): only return proposals with an objectness score greater than rpn_score_thresh + box_roi_pool (MultiScaleRoIAlign): the module which crops and resizes the feature maps in + the locations indicated by the bounding boxes + box_head (nn.Module): module that takes the cropped feature maps as input + box_predictor (nn.Module): module that takes the output of box_head and returns the + classification logits and box regression deltas. + box_score_thresh (float): during inference, only return proposals with a classification score + greater than box_score_thresh + box_nms_thresh (float): NMS threshold for the prediction head. Used during inference + box_detections_per_img (int): maximum number of detections per image, for all classes. + box_fg_iou_thresh (float): minimum IoU between the proposals and the GT box so that they can be + considered as positive during training of the classification head + box_bg_iou_thresh (float): maximum IoU between the proposals and the GT box so that they can be + considered as negative during training of the classification head + box_batch_size_per_image (int): number of proposals that are sampled during training of the + classification head + box_positive_fraction (float): proportion of positive proposals in a mini-batch during training + of the classification head + bbox_reg_weights (Tuple[float, float, float, float]): weights for the encoding/decoding of the + bounding boxes + mask_roi_pool (MultiScaleRoIAlign): the module which crops and resizes the feature maps in + the locations indicated by the bounding boxes, which will be used for the mask head. + mask_head (nn.Module): module that takes the cropped feature maps as input + mask_predictor (nn.Module): module that takes the output of the mask_head and returns the + segmentation mask logits + + Example:: + + >>> import torch + >>> import torchvision + >>> from torchvision.models.detection import MaskRCNN + >>> from torchvision.models.detection.anchor_utils import AnchorGenerator + >>> + >>> # load a pre-trained model for classification and return + >>> # only the features + >>> backbone = torchvision.models.mobilenet_v2(weights=MobileNet_V2_Weights.DEFAULT).features + >>> # MaskRCNN needs to know the number of + >>> # output channels in a backbone. For mobilenet_v2, it's 1280 + >>> # so we need to add it here, + >>> backbone.out_channels = 1280 + >>> + >>> # let's make the RPN generate 5 x 3 anchors per spatial + >>> # location, with 5 different sizes and 3 different aspect + >>> # ratios. We have a Tuple[Tuple[int]] because each feature + >>> # map could potentially have different sizes and + >>> # aspect ratios + >>> anchor_generator = AnchorGenerator(sizes=((32, 64, 128, 256, 512),), + >>> aspect_ratios=((0.5, 1.0, 2.0),)) + >>> + >>> # let's define what are the feature maps that we will + >>> # use to perform the region of interest cropping, as well as + >>> # the size of the crop after rescaling. + >>> # if your backbone returns a Tensor, featmap_names is expected to + >>> # be ['0']. More generally, the backbone should return an + >>> # OrderedDict[Tensor], and in featmap_names you can choose which + >>> # feature maps to use. + >>> roi_pooler = torchvision.ops.MultiScaleRoIAlign(featmap_names=['0'], + >>> output_size=7, + >>> sampling_ratio=2) + >>> + >>> mask_roi_pooler = torchvision.ops.MultiScaleRoIAlign(featmap_names=['0'], + >>> output_size=14, + >>> sampling_ratio=2) + >>> # put the pieces together inside a MaskRCNN model + >>> model = MaskRCNN(backbone, + >>> num_classes=2, + >>> rpn_anchor_generator=anchor_generator, + >>> box_roi_pool=roi_pooler, + >>> mask_roi_pool=mask_roi_pooler) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + """ + + def __init__( + self, + backbone, + num_classes=None, + # transform parameters + min_size=800, + max_size=1333, + image_mean=None, + image_std=None, + # RPN parameters + rpn_anchor_generator=None, + rpn_head=None, + rpn_pre_nms_top_n_train=2000, + rpn_pre_nms_top_n_test=1000, + rpn_post_nms_top_n_train=2000, + rpn_post_nms_top_n_test=1000, + rpn_nms_thresh=0.7, + rpn_fg_iou_thresh=0.7, + rpn_bg_iou_thresh=0.3, + rpn_batch_size_per_image=256, + rpn_positive_fraction=0.5, + rpn_score_thresh=0.0, + # Box parameters + box_roi_pool=None, + box_head=None, + box_predictor=None, + box_score_thresh=0.05, + box_nms_thresh=0.5, + box_detections_per_img=100, + box_fg_iou_thresh=0.5, + box_bg_iou_thresh=0.5, + box_batch_size_per_image=512, + box_positive_fraction=0.25, + bbox_reg_weights=None, + # Mask parameters + mask_roi_pool=None, + mask_head=None, + mask_predictor=None, + **kwargs, + ): + + if not isinstance(mask_roi_pool, (MultiScaleRoIAlign, type(None))): + raise TypeError( + f"mask_roi_pool should be of type MultiScaleRoIAlign or None instead of {type(mask_roi_pool)}" + ) + + if num_classes is not None: + if mask_predictor is not None: + raise ValueError("num_classes should be None when mask_predictor is specified") + + out_channels = backbone.out_channels + + if mask_roi_pool is None: + mask_roi_pool = MultiScaleRoIAlign(featmap_names=["0", "1", "2", "3"], output_size=14, sampling_ratio=2) + + if mask_head is None: + mask_layers = (256, 256, 256, 256) + mask_dilation = 1 + mask_head = MaskRCNNHeads(out_channels, mask_layers, mask_dilation) + + if mask_predictor is None: + mask_predictor_in_channels = 256 # == mask_layers[-1] + mask_dim_reduced = 256 + mask_predictor = MaskRCNNPredictor(mask_predictor_in_channels, mask_dim_reduced, num_classes) + + super().__init__( + backbone, + num_classes, + # transform parameters + min_size, + max_size, + image_mean, + image_std, + # RPN-specific parameters + rpn_anchor_generator, + rpn_head, + rpn_pre_nms_top_n_train, + rpn_pre_nms_top_n_test, + rpn_post_nms_top_n_train, + rpn_post_nms_top_n_test, + rpn_nms_thresh, + rpn_fg_iou_thresh, + rpn_bg_iou_thresh, + rpn_batch_size_per_image, + rpn_positive_fraction, + rpn_score_thresh, + # Box parameters + box_roi_pool, + box_head, + box_predictor, + box_score_thresh, + box_nms_thresh, + box_detections_per_img, + box_fg_iou_thresh, + box_bg_iou_thresh, + box_batch_size_per_image, + box_positive_fraction, + bbox_reg_weights, + **kwargs, + ) + + self.roi_heads.mask_roi_pool = mask_roi_pool + self.roi_heads.mask_head = mask_head + self.roi_heads.mask_predictor = mask_predictor + + +class MaskRCNNHeads(nn.Sequential): + _version = 2 + + def __init__(self, in_channels, layers, dilation, norm_layer: Optional[Callable[..., nn.Module]] = None): + """ + Args: + in_channels (int): number of input channels + layers (list): feature dimensions of each FCN layer + dilation (int): dilation rate of kernel + norm_layer (callable, optional): Module specifying the normalization layer to use. Default: None + """ + blocks = [] + next_feature = in_channels + for layer_features in layers: + blocks.append( + misc_nn_ops.Conv2dNormActivation( + next_feature, + layer_features, + kernel_size=3, + stride=1, + padding=dilation, + dilation=dilation, + norm_layer=norm_layer, + ) + ) + next_feature = layer_features + + super().__init__(*blocks) + for layer in self.modules(): + if isinstance(layer, nn.Conv2d): + nn.init.kaiming_normal_(layer.weight, mode="fan_out", nonlinearity="relu") + if layer.bias is not None: + nn.init.zeros_(layer.bias) + + def _load_from_state_dict( + self, + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ): + version = local_metadata.get("version", None) + + if version is None or version < 2: + num_blocks = len(self) + for i in range(num_blocks): + for type in ["weight", "bias"]: + old_key = f"{prefix}mask_fcn{i+1}.{type}" + new_key = f"{prefix}{i}.0.{type}" + if old_key in state_dict: + state_dict[new_key] = state_dict.pop(old_key) + + super()._load_from_state_dict( + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ) + + +class MaskRCNNPredictor(nn.Sequential): + def __init__(self, in_channels, dim_reduced, num_classes): + super().__init__( + OrderedDict( + [ + ("conv5_mask", nn.ConvTranspose2d(in_channels, dim_reduced, 2, 2, 0)), + ("relu", nn.ReLU(inplace=True)), + ("mask_fcn_logits", nn.Conv2d(dim_reduced, num_classes, 1, 1, 0)), + ] + ) + ) + + for name, param in self.named_parameters(): + if "weight" in name: + nn.init.kaiming_normal_(param, mode="fan_out", nonlinearity="relu") + # elif "bias" in name: + # nn.init.constant_(param, 0) + + +_COMMON_META = { + "categories": _COCO_CATEGORIES, + "min_size": (1, 1), +} + + +class MaskRCNN_ResNet50_FPN_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/maskrcnn_resnet50_fpn_coco-bf2d0c1e.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 44401393, + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#mask-r-cnn", + "_metrics": { + "COCO-val2017": { + "box_map": 37.9, + "mask_map": 34.6, + } + }, + "_ops": 134.38, + "_file_size": 169.84, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +class MaskRCNN_ResNet50_FPN_V2_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/maskrcnn_resnet50_fpn_v2_coco-73cbd019.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 46359409, + "recipe": "https://github.com/pytorch/vision/pull/5773", + "_metrics": { + "COCO-val2017": { + "box_map": 47.4, + "mask_map": 41.8, + } + }, + "_ops": 333.577, + "_file_size": 177.219, + "_docs": """These weights were produced using an enhanced training recipe to boost the model accuracy.""", + }, + ) + DEFAULT = COCO_V1 + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", MaskRCNN_ResNet50_FPN_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def maskrcnn_resnet50_fpn( + *, + weights: Optional[MaskRCNN_ResNet50_FPN_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = ResNet50_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> MaskRCNN: + """Mask R-CNN model with a ResNet-50-FPN backbone from the `Mask R-CNN + `_ paper. + + .. betastatus:: detection module + + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each + image, and should be in ``0-1`` range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the class label for each ground-truth box + - masks (``UInt8Tensor[N, H, W]``): the segmentation binary masks for each instance + + The model returns a ``Dict[Tensor]`` during training, containing the classification and regression + losses for both the RPN and the R-CNN, and the mask loss. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a ``List[Dict[Tensor]]``, one for each input image. The fields of the ``Dict`` are as + follows, where ``N`` is the number of detected instances: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the predicted labels for each instance + - scores (``Tensor[N]``): the scores or each instance + - masks (``UInt8Tensor[N, 1, H, W]``): the predicted masks for each instance, in ``0-1`` range. In order to + obtain the final segmentation masks, the soft masks can be thresholded, generally + with a value of 0.5 (``mask >= 0.5``) + + For more details on the output and on how to plot the masks, you may refer to :ref:`instance_seg_output`. + + Mask R-CNN is exportable to ONNX for a fixed batch size with inputs images of fixed size. + + Example:: + + >>> model = torchvision.models.detection.maskrcnn_resnet50_fpn(weights=MaskRCNN_ResNet50_FPN_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + >>> + >>> # optionally, if you want to export the model to ONNX: + >>> torch.onnx.export(model, x, "mask_rcnn.onnx", opset_version = 11) + + Args: + weights (:class:`~torchvision.models.detection.MaskRCNN_ResNet50_FPN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.MaskRCNN_ResNet50_FPN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The + pretrained weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from + final block. Valid values are between 0 and 5, with 5 meaning all backbone layers are + trainable. If ``None`` is passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.mask_rcnn.MaskRCNN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.MaskRCNN_ResNet50_FPN_Weights + :members: + """ + weights = MaskRCNN_ResNet50_FPN_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + norm_layer = misc_nn_ops.FrozenBatchNorm2d if is_trained else nn.BatchNorm2d + + backbone = resnet50(weights=weights_backbone, progress=progress, norm_layer=norm_layer) + backbone = _resnet_fpn_extractor(backbone, trainable_backbone_layers) + model = MaskRCNN(backbone, num_classes=num_classes, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if weights == MaskRCNN_ResNet50_FPN_Weights.COCO_V1: + overwrite_eps(model, 0.0) + + return model + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", MaskRCNN_ResNet50_FPN_V2_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def maskrcnn_resnet50_fpn_v2( + *, + weights: Optional[MaskRCNN_ResNet50_FPN_V2_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = None, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> MaskRCNN: + """Improved Mask R-CNN model with a ResNet-50-FPN backbone from the `Benchmarking Detection Transfer + Learning with Vision Transformers `_ paper. + + .. betastatus:: detection module + + :func:`~torchvision.models.detection.maskrcnn_resnet50_fpn` for more details. + + Args: + weights (:class:`~torchvision.models.detection.MaskRCNN_ResNet50_FPN_V2_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.MaskRCNN_ResNet50_FPN_V2_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The + pretrained weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from + final block. Valid values are between 0 and 5, with 5 meaning all backbone layers are + trainable. If ``None`` is passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.mask_rcnn.MaskRCNN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.MaskRCNN_ResNet50_FPN_V2_Weights + :members: + """ + weights = MaskRCNN_ResNet50_FPN_V2_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + + backbone = resnet50(weights=weights_backbone, progress=progress) + backbone = _resnet_fpn_extractor(backbone, trainable_backbone_layers, norm_layer=nn.BatchNorm2d) + rpn_anchor_generator = _default_anchorgen() + rpn_head = RPNHead(backbone.out_channels, rpn_anchor_generator.num_anchors_per_location()[0], conv_depth=2) + box_head = FastRCNNConvFCHead( + (backbone.out_channels, 7, 7), [256, 256, 256, 256], [1024], norm_layer=nn.BatchNorm2d + ) + mask_head = MaskRCNNHeads(backbone.out_channels, [256, 256, 256, 256], 1, norm_layer=nn.BatchNorm2d) + model = MaskRCNN( + backbone, + num_classes=num_classes, + rpn_anchor_generator=rpn_anchor_generator, + rpn_head=rpn_head, + box_head=box_head, + mask_head=mask_head, + **kwargs, + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/retinanet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/retinanet.py new file mode 100644 index 0000000000000000000000000000000000000000..210eeb67941ccc733a39b7f991e440f4b07d4514 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/retinanet.py @@ -0,0 +1,903 @@ +import math +import warnings +from collections import OrderedDict +from functools import partial +from typing import Any, Callable, Dict, List, Optional, Tuple + +import torch +from torch import nn, Tensor + +from ...ops import boxes as box_ops, misc as misc_nn_ops, sigmoid_focal_loss +from ...ops.feature_pyramid_network import LastLevelP6P7 +from ...transforms._presets import ObjectDetection +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._meta import _COCO_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface +from ..resnet import resnet50, ResNet50_Weights +from . import _utils as det_utils +from ._utils import _box_loss, overwrite_eps +from .anchor_utils import AnchorGenerator +from .backbone_utils import _resnet_fpn_extractor, _validate_trainable_layers +from .transform import GeneralizedRCNNTransform + + +__all__ = [ + "RetinaNet", + "RetinaNet_ResNet50_FPN_Weights", + "RetinaNet_ResNet50_FPN_V2_Weights", + "retinanet_resnet50_fpn", + "retinanet_resnet50_fpn_v2", +] + + +def _sum(x: List[Tensor]) -> Tensor: + res = x[0] + for i in x[1:]: + res = res + i + return res + + +def _v1_to_v2_weights(state_dict, prefix): + for i in range(4): + for type in ["weight", "bias"]: + old_key = f"{prefix}conv.{2*i}.{type}" + new_key = f"{prefix}conv.{i}.0.{type}" + if old_key in state_dict: + state_dict[new_key] = state_dict.pop(old_key) + + +def _default_anchorgen(): + anchor_sizes = tuple((x, int(x * 2 ** (1.0 / 3)), int(x * 2 ** (2.0 / 3))) for x in [32, 64, 128, 256, 512]) + aspect_ratios = ((0.5, 1.0, 2.0),) * len(anchor_sizes) + anchor_generator = AnchorGenerator(anchor_sizes, aspect_ratios) + return anchor_generator + + +class RetinaNetHead(nn.Module): + """ + A regression and classification head for use in RetinaNet. + + Args: + in_channels (int): number of channels of the input feature + num_anchors (int): number of anchors to be predicted + num_classes (int): number of classes to be predicted + norm_layer (callable, optional): Module specifying the normalization layer to use. Default: None + """ + + def __init__(self, in_channels, num_anchors, num_classes, norm_layer: Optional[Callable[..., nn.Module]] = None): + super().__init__() + self.classification_head = RetinaNetClassificationHead( + in_channels, num_anchors, num_classes, norm_layer=norm_layer + ) + self.regression_head = RetinaNetRegressionHead(in_channels, num_anchors, norm_layer=norm_layer) + + def compute_loss(self, targets, head_outputs, anchors, matched_idxs): + # type: (List[Dict[str, Tensor]], Dict[str, Tensor], List[Tensor], List[Tensor]) -> Dict[str, Tensor] + return { + "classification": self.classification_head.compute_loss(targets, head_outputs, matched_idxs), + "bbox_regression": self.regression_head.compute_loss(targets, head_outputs, anchors, matched_idxs), + } + + def forward(self, x): + # type: (List[Tensor]) -> Dict[str, Tensor] + return {"cls_logits": self.classification_head(x), "bbox_regression": self.regression_head(x)} + + +class RetinaNetClassificationHead(nn.Module): + """ + A classification head for use in RetinaNet. + + Args: + in_channels (int): number of channels of the input feature + num_anchors (int): number of anchors to be predicted + num_classes (int): number of classes to be predicted + norm_layer (callable, optional): Module specifying the normalization layer to use. Default: None + """ + + _version = 2 + + def __init__( + self, + in_channels, + num_anchors, + num_classes, + prior_probability=0.01, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ): + super().__init__() + + conv = [] + for _ in range(4): + conv.append(misc_nn_ops.Conv2dNormActivation(in_channels, in_channels, norm_layer=norm_layer)) + self.conv = nn.Sequential(*conv) + + for layer in self.conv.modules(): + if isinstance(layer, nn.Conv2d): + torch.nn.init.normal_(layer.weight, std=0.01) + if layer.bias is not None: + torch.nn.init.constant_(layer.bias, 0) + + self.cls_logits = nn.Conv2d(in_channels, num_anchors * num_classes, kernel_size=3, stride=1, padding=1) + torch.nn.init.normal_(self.cls_logits.weight, std=0.01) + torch.nn.init.constant_(self.cls_logits.bias, -math.log((1 - prior_probability) / prior_probability)) + + self.num_classes = num_classes + self.num_anchors = num_anchors + + # This is to fix using det_utils.Matcher.BETWEEN_THRESHOLDS in TorchScript. + # TorchScript doesn't support class attributes. + # https://github.com/pytorch/vision/pull/1697#issuecomment-630255584 + self.BETWEEN_THRESHOLDS = det_utils.Matcher.BETWEEN_THRESHOLDS + + def _load_from_state_dict( + self, + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ): + version = local_metadata.get("version", None) + + if version is None or version < 2: + _v1_to_v2_weights(state_dict, prefix) + + super()._load_from_state_dict( + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ) + + def compute_loss(self, targets, head_outputs, matched_idxs): + # type: (List[Dict[str, Tensor]], Dict[str, Tensor], List[Tensor]) -> Tensor + losses = [] + + cls_logits = head_outputs["cls_logits"] + + for targets_per_image, cls_logits_per_image, matched_idxs_per_image in zip(targets, cls_logits, matched_idxs): + # determine only the foreground + foreground_idxs_per_image = matched_idxs_per_image >= 0 + num_foreground = foreground_idxs_per_image.sum() + + # create the target classification + gt_classes_target = torch.zeros_like(cls_logits_per_image) + gt_classes_target[ + foreground_idxs_per_image, + targets_per_image["labels"][matched_idxs_per_image[foreground_idxs_per_image]], + ] = 1.0 + + # find indices for which anchors should be ignored + valid_idxs_per_image = matched_idxs_per_image != self.BETWEEN_THRESHOLDS + + # compute the classification loss + losses.append( + sigmoid_focal_loss( + cls_logits_per_image[valid_idxs_per_image], + gt_classes_target[valid_idxs_per_image], + reduction="sum", + ) + / max(1, num_foreground) + ) + + return _sum(losses) / len(targets) + + def forward(self, x): + # type: (List[Tensor]) -> Tensor + all_cls_logits = [] + + for features in x: + cls_logits = self.conv(features) + cls_logits = self.cls_logits(cls_logits) + + # Permute classification output from (N, A * K, H, W) to (N, HWA, K). + N, _, H, W = cls_logits.shape + cls_logits = cls_logits.view(N, -1, self.num_classes, H, W) + cls_logits = cls_logits.permute(0, 3, 4, 1, 2) + cls_logits = cls_logits.reshape(N, -1, self.num_classes) # Size=(N, HWA, 4) + + all_cls_logits.append(cls_logits) + + return torch.cat(all_cls_logits, dim=1) + + +class RetinaNetRegressionHead(nn.Module): + """ + A regression head for use in RetinaNet. + + Args: + in_channels (int): number of channels of the input feature + num_anchors (int): number of anchors to be predicted + norm_layer (callable, optional): Module specifying the normalization layer to use. Default: None + """ + + _version = 2 + + __annotations__ = { + "box_coder": det_utils.BoxCoder, + } + + def __init__(self, in_channels, num_anchors, norm_layer: Optional[Callable[..., nn.Module]] = None): + super().__init__() + + conv = [] + for _ in range(4): + conv.append(misc_nn_ops.Conv2dNormActivation(in_channels, in_channels, norm_layer=norm_layer)) + self.conv = nn.Sequential(*conv) + + self.bbox_reg = nn.Conv2d(in_channels, num_anchors * 4, kernel_size=3, stride=1, padding=1) + torch.nn.init.normal_(self.bbox_reg.weight, std=0.01) + torch.nn.init.zeros_(self.bbox_reg.bias) + + for layer in self.conv.modules(): + if isinstance(layer, nn.Conv2d): + torch.nn.init.normal_(layer.weight, std=0.01) + if layer.bias is not None: + torch.nn.init.zeros_(layer.bias) + + self.box_coder = det_utils.BoxCoder(weights=(1.0, 1.0, 1.0, 1.0)) + self._loss_type = "l1" + + def _load_from_state_dict( + self, + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ): + version = local_metadata.get("version", None) + + if version is None or version < 2: + _v1_to_v2_weights(state_dict, prefix) + + super()._load_from_state_dict( + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ) + + def compute_loss(self, targets, head_outputs, anchors, matched_idxs): + # type: (List[Dict[str, Tensor]], Dict[str, Tensor], List[Tensor], List[Tensor]) -> Tensor + losses = [] + + bbox_regression = head_outputs["bbox_regression"] + + for targets_per_image, bbox_regression_per_image, anchors_per_image, matched_idxs_per_image in zip( + targets, bbox_regression, anchors, matched_idxs + ): + # determine only the foreground indices, ignore the rest + foreground_idxs_per_image = torch.where(matched_idxs_per_image >= 0)[0] + num_foreground = foreground_idxs_per_image.numel() + + # select only the foreground boxes + matched_gt_boxes_per_image = targets_per_image["boxes"][matched_idxs_per_image[foreground_idxs_per_image]] + bbox_regression_per_image = bbox_regression_per_image[foreground_idxs_per_image, :] + anchors_per_image = anchors_per_image[foreground_idxs_per_image, :] + + # compute the loss + losses.append( + _box_loss( + self._loss_type, + self.box_coder, + anchors_per_image, + matched_gt_boxes_per_image, + bbox_regression_per_image, + ) + / max(1, num_foreground) + ) + + return _sum(losses) / max(1, len(targets)) + + def forward(self, x): + # type: (List[Tensor]) -> Tensor + all_bbox_regression = [] + + for features in x: + bbox_regression = self.conv(features) + bbox_regression = self.bbox_reg(bbox_regression) + + # Permute bbox regression output from (N, 4 * A, H, W) to (N, HWA, 4). + N, _, H, W = bbox_regression.shape + bbox_regression = bbox_regression.view(N, -1, 4, H, W) + bbox_regression = bbox_regression.permute(0, 3, 4, 1, 2) + bbox_regression = bbox_regression.reshape(N, -1, 4) # Size=(N, HWA, 4) + + all_bbox_regression.append(bbox_regression) + + return torch.cat(all_bbox_regression, dim=1) + + +class RetinaNet(nn.Module): + """ + Implements RetinaNet. + + The input to the model is expected to be a list of tensors, each of shape [C, H, W], one for each + image, and should be in 0-1 range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the class label for each ground-truth box + + The model returns a Dict[Tensor] during training, containing the classification and regression + losses. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a List[Dict[Tensor]], one for each input image. The fields of the Dict are as + follows: + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the predicted labels for each image + - scores (Tensor[N]): the scores for each prediction + + Args: + backbone (nn.Module): the network used to compute the features for the model. + It should contain an out_channels attribute, which indicates the number of output + channels that each feature map has (and it should be the same for all feature maps). + The backbone should return a single Tensor or an OrderedDict[Tensor]. + num_classes (int): number of output classes of the model (including the background). + min_size (int): Images are rescaled before feeding them to the backbone: + we attempt to preserve the aspect ratio and scale the shorter edge + to ``min_size``. If the resulting longer edge exceeds ``max_size``, + then downscale so that the longer edge does not exceed ``max_size``. + This may result in the shorter edge beeing lower than ``min_size``. + max_size (int): See ``min_size``. + image_mean (Tuple[float, float, float]): mean values used for input normalization. + They are generally the mean values of the dataset on which the backbone has been trained + on + image_std (Tuple[float, float, float]): std values used for input normalization. + They are generally the std values of the dataset on which the backbone has been trained on + anchor_generator (AnchorGenerator): module that generates the anchors for a set of feature + maps. + head (nn.Module): Module run on top of the feature pyramid. + Defaults to a module containing a classification and regression module. + score_thresh (float): Score threshold used for postprocessing the detections. + nms_thresh (float): NMS threshold used for postprocessing the detections. + detections_per_img (int): Number of best detections to keep after NMS. + fg_iou_thresh (float): minimum IoU between the anchor and the GT box so that they can be + considered as positive during training. + bg_iou_thresh (float): maximum IoU between the anchor and the GT box so that they can be + considered as negative during training. + topk_candidates (int): Number of best detections to keep before NMS. + + Example: + + >>> import torch + >>> import torchvision + >>> from torchvision.models.detection import RetinaNet + >>> from torchvision.models.detection.anchor_utils import AnchorGenerator + >>> # load a pre-trained model for classification and return + >>> # only the features + >>> backbone = torchvision.models.mobilenet_v2(weights=MobileNet_V2_Weights.DEFAULT).features + >>> # RetinaNet needs to know the number of + >>> # output channels in a backbone. For mobilenet_v2, it's 1280, + >>> # so we need to add it here + >>> backbone.out_channels = 1280 + >>> + >>> # let's make the network generate 5 x 3 anchors per spatial + >>> # location, with 5 different sizes and 3 different aspect + >>> # ratios. We have a Tuple[Tuple[int]] because each feature + >>> # map could potentially have different sizes and + >>> # aspect ratios + >>> anchor_generator = AnchorGenerator( + >>> sizes=((32, 64, 128, 256, 512),), + >>> aspect_ratios=((0.5, 1.0, 2.0),) + >>> ) + >>> + >>> # put the pieces together inside a RetinaNet model + >>> model = RetinaNet(backbone, + >>> num_classes=2, + >>> anchor_generator=anchor_generator) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + """ + + __annotations__ = { + "box_coder": det_utils.BoxCoder, + "proposal_matcher": det_utils.Matcher, + } + + def __init__( + self, + backbone, + num_classes, + # transform parameters + min_size=800, + max_size=1333, + image_mean=None, + image_std=None, + # Anchor parameters + anchor_generator=None, + head=None, + proposal_matcher=None, + score_thresh=0.05, + nms_thresh=0.5, + detections_per_img=300, + fg_iou_thresh=0.5, + bg_iou_thresh=0.4, + topk_candidates=1000, + **kwargs, + ): + super().__init__() + _log_api_usage_once(self) + + if not hasattr(backbone, "out_channels"): + raise ValueError( + "backbone should contain an attribute out_channels " + "specifying the number of output channels (assumed to be the " + "same for all the levels)" + ) + self.backbone = backbone + + if not isinstance(anchor_generator, (AnchorGenerator, type(None))): + raise TypeError( + f"anchor_generator should be of type AnchorGenerator or None instead of {type(anchor_generator)}" + ) + + if anchor_generator is None: + anchor_generator = _default_anchorgen() + self.anchor_generator = anchor_generator + + if head is None: + head = RetinaNetHead(backbone.out_channels, anchor_generator.num_anchors_per_location()[0], num_classes) + self.head = head + + if proposal_matcher is None: + proposal_matcher = det_utils.Matcher( + fg_iou_thresh, + bg_iou_thresh, + allow_low_quality_matches=True, + ) + self.proposal_matcher = proposal_matcher + + self.box_coder = det_utils.BoxCoder(weights=(1.0, 1.0, 1.0, 1.0)) + + if image_mean is None: + image_mean = [0.485, 0.456, 0.406] + if image_std is None: + image_std = [0.229, 0.224, 0.225] + self.transform = GeneralizedRCNNTransform(min_size, max_size, image_mean, image_std, **kwargs) + + self.score_thresh = score_thresh + self.nms_thresh = nms_thresh + self.detections_per_img = detections_per_img + self.topk_candidates = topk_candidates + + # used only on torchscript mode + self._has_warned = False + + @torch.jit.unused + def eager_outputs(self, losses, detections): + # type: (Dict[str, Tensor], List[Dict[str, Tensor]]) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]] + if self.training: + return losses + + return detections + + def compute_loss(self, targets, head_outputs, anchors): + # type: (List[Dict[str, Tensor]], Dict[str, Tensor], List[Tensor]) -> Dict[str, Tensor] + matched_idxs = [] + for anchors_per_image, targets_per_image in zip(anchors, targets): + if targets_per_image["boxes"].numel() == 0: + matched_idxs.append( + torch.full((anchors_per_image.size(0),), -1, dtype=torch.int64, device=anchors_per_image.device) + ) + continue + + match_quality_matrix = box_ops.box_iou(targets_per_image["boxes"], anchors_per_image) + matched_idxs.append(self.proposal_matcher(match_quality_matrix)) + + return self.head.compute_loss(targets, head_outputs, anchors, matched_idxs) + + def postprocess_detections(self, head_outputs, anchors, image_shapes): + # type: (Dict[str, List[Tensor]], List[List[Tensor]], List[Tuple[int, int]]) -> List[Dict[str, Tensor]] + class_logits = head_outputs["cls_logits"] + box_regression = head_outputs["bbox_regression"] + + num_images = len(image_shapes) + + detections: List[Dict[str, Tensor]] = [] + + for index in range(num_images): + box_regression_per_image = [br[index] for br in box_regression] + logits_per_image = [cl[index] for cl in class_logits] + anchors_per_image, image_shape = anchors[index], image_shapes[index] + + image_boxes = [] + image_scores = [] + image_labels = [] + + for box_regression_per_level, logits_per_level, anchors_per_level in zip( + box_regression_per_image, logits_per_image, anchors_per_image + ): + num_classes = logits_per_level.shape[-1] + + # remove low scoring boxes + scores_per_level = torch.sigmoid(logits_per_level).flatten() + keep_idxs = scores_per_level > self.score_thresh + scores_per_level = scores_per_level[keep_idxs] + topk_idxs = torch.where(keep_idxs)[0] + + # keep only topk scoring predictions + num_topk = det_utils._topk_min(topk_idxs, self.topk_candidates, 0) + scores_per_level, idxs = scores_per_level.topk(num_topk) + topk_idxs = topk_idxs[idxs] + + anchor_idxs = torch.div(topk_idxs, num_classes, rounding_mode="floor") + labels_per_level = topk_idxs % num_classes + + boxes_per_level = self.box_coder.decode_single( + box_regression_per_level[anchor_idxs], anchors_per_level[anchor_idxs] + ) + boxes_per_level = box_ops.clip_boxes_to_image(boxes_per_level, image_shape) + + image_boxes.append(boxes_per_level) + image_scores.append(scores_per_level) + image_labels.append(labels_per_level) + + image_boxes = torch.cat(image_boxes, dim=0) + image_scores = torch.cat(image_scores, dim=0) + image_labels = torch.cat(image_labels, dim=0) + + # non-maximum suppression + keep = box_ops.batched_nms(image_boxes, image_scores, image_labels, self.nms_thresh) + keep = keep[: self.detections_per_img] + + detections.append( + { + "boxes": image_boxes[keep], + "scores": image_scores[keep], + "labels": image_labels[keep], + } + ) + + return detections + + def forward(self, images, targets=None): + # type: (List[Tensor], Optional[List[Dict[str, Tensor]]]) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]] + """ + Args: + images (list[Tensor]): images to be processed + targets (list[Dict[Tensor]]): ground-truth boxes present in the image (optional) + + Returns: + result (list[BoxList] or dict[Tensor]): the output from the model. + During training, it returns a dict[Tensor] which contains the losses. + During testing, it returns list[BoxList] contains additional fields + like `scores`, `labels` and `mask` (for Mask R-CNN models). + + """ + if self.training: + if targets is None: + torch._assert(False, "targets should not be none when in training mode") + else: + for target in targets: + boxes = target["boxes"] + torch._assert(isinstance(boxes, torch.Tensor), "Expected target boxes to be of type Tensor.") + torch._assert( + len(boxes.shape) == 2 and boxes.shape[-1] == 4, + "Expected target boxes to be a tensor of shape [N, 4].", + ) + + # get the original image sizes + original_image_sizes: List[Tuple[int, int]] = [] + for img in images: + val = img.shape[-2:] + torch._assert( + len(val) == 2, + f"expecting the last two dimensions of the Tensor to be H and W instead got {img.shape[-2:]}", + ) + original_image_sizes.append((val[0], val[1])) + + # transform the input + images, targets = self.transform(images, targets) + + # Check for degenerate boxes + # TODO: Move this to a function + if targets is not None: + for target_idx, target in enumerate(targets): + boxes = target["boxes"] + degenerate_boxes = boxes[:, 2:] <= boxes[:, :2] + if degenerate_boxes.any(): + # print the first degenerate box + bb_idx = torch.where(degenerate_boxes.any(dim=1))[0][0] + degen_bb: List[float] = boxes[bb_idx].tolist() + torch._assert( + False, + "All bounding boxes should have positive height and width." + f" Found invalid box {degen_bb} for target at index {target_idx}.", + ) + + # get the features from the backbone + features = self.backbone(images.tensors) + if isinstance(features, torch.Tensor): + features = OrderedDict([("0", features)]) + + # TODO: Do we want a list or a dict? + features = list(features.values()) + + # compute the retinanet heads outputs using the features + head_outputs = self.head(features) + + # create the set of anchors + anchors = self.anchor_generator(images, features) + + losses = {} + detections: List[Dict[str, Tensor]] = [] + if self.training: + if targets is None: + torch._assert(False, "targets should not be none when in training mode") + else: + # compute the losses + losses = self.compute_loss(targets, head_outputs, anchors) + else: + # recover level sizes + num_anchors_per_level = [x.size(2) * x.size(3) for x in features] + HW = 0 + for v in num_anchors_per_level: + HW += v + HWA = head_outputs["cls_logits"].size(1) + A = HWA // HW + num_anchors_per_level = [hw * A for hw in num_anchors_per_level] + + # split outputs per level + split_head_outputs: Dict[str, List[Tensor]] = {} + for k in head_outputs: + split_head_outputs[k] = list(head_outputs[k].split(num_anchors_per_level, dim=1)) + split_anchors = [list(a.split(num_anchors_per_level)) for a in anchors] + + # compute the detections + detections = self.postprocess_detections(split_head_outputs, split_anchors, images.image_sizes) + detections = self.transform.postprocess(detections, images.image_sizes, original_image_sizes) + + if torch.jit.is_scripting(): + if not self._has_warned: + warnings.warn("RetinaNet always returns a (Losses, Detections) tuple in scripting") + self._has_warned = True + return losses, detections + return self.eager_outputs(losses, detections) + + +_COMMON_META = { + "categories": _COCO_CATEGORIES, + "min_size": (1, 1), +} + + +class RetinaNet_ResNet50_FPN_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/retinanet_resnet50_fpn_coco-eeacb38b.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 34014999, + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#retinanet", + "_metrics": { + "COCO-val2017": { + "box_map": 36.4, + } + }, + "_ops": 151.54, + "_file_size": 130.267, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +class RetinaNet_ResNet50_FPN_V2_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/retinanet_resnet50_fpn_v2_coco-5905b1c5.pth", + transforms=ObjectDetection, + meta={ + **_COMMON_META, + "num_params": 38198935, + "recipe": "https://github.com/pytorch/vision/pull/5756", + "_metrics": { + "COCO-val2017": { + "box_map": 41.5, + } + }, + "_ops": 152.238, + "_file_size": 146.037, + "_docs": """These weights were produced using an enhanced training recipe to boost the model accuracy.""", + }, + ) + DEFAULT = COCO_V1 + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", RetinaNet_ResNet50_FPN_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def retinanet_resnet50_fpn( + *, + weights: Optional[RetinaNet_ResNet50_FPN_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = ResNet50_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> RetinaNet: + """ + Constructs a RetinaNet model with a ResNet-50-FPN backbone. + + .. betastatus:: detection module + + Reference: `Focal Loss for Dense Object Detection `_. + + The input to the model is expected to be a list of tensors, each of shape ``[C, H, W]``, one for each + image, and should be in ``0-1`` range. Different images can have different sizes. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the class label for each ground-truth box + + The model returns a ``Dict[Tensor]`` during training, containing the classification and regression + losses. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a ``List[Dict[Tensor]]``, one for each input image. The fields of the ``Dict`` are as + follows, where ``N`` is the number of detections: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (``Int64Tensor[N]``): the predicted labels for each detection + - scores (``Tensor[N]``): the scores of each detection + + For more details on the output, you may refer to :ref:`instance_seg_output`. + + Example:: + + >>> model = torchvision.models.detection.retinanet_resnet50_fpn(weights=RetinaNet_ResNet50_FPN_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 300, 400), torch.rand(3, 500, 400)] + >>> predictions = model(x) + + Args: + weights (:class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for + the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from final block. + Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. If ``None`` is + passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.RetinaNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.RetinaNet_ResNet50_FPN_Weights + :members: + """ + weights = RetinaNet_ResNet50_FPN_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + norm_layer = misc_nn_ops.FrozenBatchNorm2d if is_trained else nn.BatchNorm2d + + backbone = resnet50(weights=weights_backbone, progress=progress, norm_layer=norm_layer) + # skip P2 because it generates too many anchors (according to their paper) + backbone = _resnet_fpn_extractor( + backbone, trainable_backbone_layers, returned_layers=[2, 3, 4], extra_blocks=LastLevelP6P7(256, 256) + ) + model = RetinaNet(backbone, num_classes, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if weights == RetinaNet_ResNet50_FPN_Weights.COCO_V1: + overwrite_eps(model, 0.0) + + return model + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", RetinaNet_ResNet50_FPN_V2_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def retinanet_resnet50_fpn_v2( + *, + weights: Optional[RetinaNet_ResNet50_FPN_V2_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[ResNet50_Weights] = None, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> RetinaNet: + """ + Constructs an improved RetinaNet model with a ResNet-50-FPN backbone. + + .. betastatus:: detection module + + Reference: `Bridging the Gap Between Anchor-based and Anchor-free Detection via Adaptive Training Sample Selection + `_. + + :func:`~torchvision.models.detection.retinanet_resnet50_fpn` for more details. + + Args: + weights (:class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_V2_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.RetinaNet_ResNet50_FPN_V2_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for + the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from final block. + Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. If ``None`` is + passed (the default) this value is set to 3. + **kwargs: parameters passed to the ``torchvision.models.detection.RetinaNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.RetinaNet_ResNet50_FPN_V2_Weights + :members: + """ + weights = RetinaNet_ResNet50_FPN_V2_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + is_trained = weights is not None or weights_backbone is not None + trainable_backbone_layers = _validate_trainable_layers(is_trained, trainable_backbone_layers, 5, 3) + + backbone = resnet50(weights=weights_backbone, progress=progress) + backbone = _resnet_fpn_extractor( + backbone, trainable_backbone_layers, returned_layers=[2, 3, 4], extra_blocks=LastLevelP6P7(2048, 256) + ) + anchor_generator = _default_anchorgen() + head = RetinaNetHead( + backbone.out_channels, + anchor_generator.num_anchors_per_location()[0], + num_classes, + norm_layer=partial(nn.GroupNorm, 32), + ) + head.regression_head._loss_type = "giou" + model = RetinaNet(backbone, num_classes, anchor_generator=anchor_generator, head=head, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/roi_heads.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/roi_heads.py new file mode 100644 index 0000000000000000000000000000000000000000..eced85595751933121be6f7c46595090fd10d4cb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/roi_heads.py @@ -0,0 +1,876 @@ +from typing import Dict, List, Optional, Tuple + +import torch +import torch.nn.functional as F +import torchvision +from torch import nn, Tensor +from torchvision.ops import boxes as box_ops, roi_align + +from . import _utils as det_utils + + +def fastrcnn_loss(class_logits, box_regression, labels, regression_targets): + # type: (Tensor, Tensor, List[Tensor], List[Tensor]) -> Tuple[Tensor, Tensor] + """ + Computes the loss for Faster R-CNN. + + Args: + class_logits (Tensor) + box_regression (Tensor) + labels (list[BoxList]) + regression_targets (Tensor) + + Returns: + classification_loss (Tensor) + box_loss (Tensor) + """ + + labels = torch.cat(labels, dim=0) + regression_targets = torch.cat(regression_targets, dim=0) + + classification_loss = F.cross_entropy(class_logits, labels) + + # get indices that correspond to the regression targets for + # the corresponding ground truth labels, to be used with + # advanced indexing + sampled_pos_inds_subset = torch.where(labels > 0)[0] + labels_pos = labels[sampled_pos_inds_subset] + N, num_classes = class_logits.shape + box_regression = box_regression.reshape(N, box_regression.size(-1) // 4, 4) + + box_loss = F.smooth_l1_loss( + box_regression[sampled_pos_inds_subset, labels_pos], + regression_targets[sampled_pos_inds_subset], + beta=1 / 9, + reduction="sum", + ) + box_loss = box_loss / labels.numel() + + return classification_loss, box_loss + + +def maskrcnn_inference(x, labels): + # type: (Tensor, List[Tensor]) -> List[Tensor] + """ + From the results of the CNN, post process the masks + by taking the mask corresponding to the class with max + probability (which are of fixed size and directly output + by the CNN) and return the masks in the mask field of the BoxList. + + Args: + x (Tensor): the mask logits + labels (list[BoxList]): bounding boxes that are used as + reference, one for ech image + + Returns: + results (list[BoxList]): one BoxList for each image, containing + the extra field mask + """ + mask_prob = x.sigmoid() + + # select masks corresponding to the predicted classes + num_masks = x.shape[0] + boxes_per_image = [label.shape[0] for label in labels] + labels = torch.cat(labels) + index = torch.arange(num_masks, device=labels.device) + mask_prob = mask_prob[index, labels][:, None] + mask_prob = mask_prob.split(boxes_per_image, dim=0) + + return mask_prob + + +def project_masks_on_boxes(gt_masks, boxes, matched_idxs, M): + # type: (Tensor, Tensor, Tensor, int) -> Tensor + """ + Given segmentation masks and the bounding boxes corresponding + to the location of the masks in the image, this function + crops and resizes the masks in the position defined by the + boxes. This prepares the masks for them to be fed to the + loss computation as the targets. + """ + matched_idxs = matched_idxs.to(boxes) + rois = torch.cat([matched_idxs[:, None], boxes], dim=1) + gt_masks = gt_masks[:, None].to(rois) + return roi_align(gt_masks, rois, (M, M), 1.0)[:, 0] + + +def maskrcnn_loss(mask_logits, proposals, gt_masks, gt_labels, mask_matched_idxs): + # type: (Tensor, List[Tensor], List[Tensor], List[Tensor], List[Tensor]) -> Tensor + """ + Args: + proposals (list[BoxList]) + mask_logits (Tensor) + targets (list[BoxList]) + + Return: + mask_loss (Tensor): scalar tensor containing the loss + """ + + discretization_size = mask_logits.shape[-1] + labels = [gt_label[idxs] for gt_label, idxs in zip(gt_labels, mask_matched_idxs)] + mask_targets = [ + project_masks_on_boxes(m, p, i, discretization_size) for m, p, i in zip(gt_masks, proposals, mask_matched_idxs) + ] + + labels = torch.cat(labels, dim=0) + mask_targets = torch.cat(mask_targets, dim=0) + + # torch.mean (in binary_cross_entropy_with_logits) doesn't + # accept empty tensors, so handle it separately + if mask_targets.numel() == 0: + return mask_logits.sum() * 0 + + mask_loss = F.binary_cross_entropy_with_logits( + mask_logits[torch.arange(labels.shape[0], device=labels.device), labels], mask_targets + ) + return mask_loss + + +def keypoints_to_heatmap(keypoints, rois, heatmap_size): + # type: (Tensor, Tensor, int) -> Tuple[Tensor, Tensor] + offset_x = rois[:, 0] + offset_y = rois[:, 1] + scale_x = heatmap_size / (rois[:, 2] - rois[:, 0]) + scale_y = heatmap_size / (rois[:, 3] - rois[:, 1]) + + offset_x = offset_x[:, None] + offset_y = offset_y[:, None] + scale_x = scale_x[:, None] + scale_y = scale_y[:, None] + + x = keypoints[..., 0] + y = keypoints[..., 1] + + x_boundary_inds = x == rois[:, 2][:, None] + y_boundary_inds = y == rois[:, 3][:, None] + + x = (x - offset_x) * scale_x + x = x.floor().long() + y = (y - offset_y) * scale_y + y = y.floor().long() + + x[x_boundary_inds] = heatmap_size - 1 + y[y_boundary_inds] = heatmap_size - 1 + + valid_loc = (x >= 0) & (y >= 0) & (x < heatmap_size) & (y < heatmap_size) + vis = keypoints[..., 2] > 0 + valid = (valid_loc & vis).long() + + lin_ind = y * heatmap_size + x + heatmaps = lin_ind * valid + + return heatmaps, valid + + +def _onnx_heatmaps_to_keypoints( + maps, maps_i, roi_map_width, roi_map_height, widths_i, heights_i, offset_x_i, offset_y_i +): + num_keypoints = torch.scalar_tensor(maps.size(1), dtype=torch.int64) + + width_correction = widths_i / roi_map_width + height_correction = heights_i / roi_map_height + + roi_map = F.interpolate( + maps_i[:, None], size=(int(roi_map_height), int(roi_map_width)), mode="bicubic", align_corners=False + )[:, 0] + + w = torch.scalar_tensor(roi_map.size(2), dtype=torch.int64) + pos = roi_map.reshape(num_keypoints, -1).argmax(dim=1) + + x_int = pos % w + y_int = (pos - x_int) // w + + x = (torch.tensor(0.5, dtype=torch.float32) + x_int.to(dtype=torch.float32)) * width_correction.to( + dtype=torch.float32 + ) + y = (torch.tensor(0.5, dtype=torch.float32) + y_int.to(dtype=torch.float32)) * height_correction.to( + dtype=torch.float32 + ) + + xy_preds_i_0 = x + offset_x_i.to(dtype=torch.float32) + xy_preds_i_1 = y + offset_y_i.to(dtype=torch.float32) + xy_preds_i_2 = torch.ones(xy_preds_i_1.shape, dtype=torch.float32) + xy_preds_i = torch.stack( + [ + xy_preds_i_0.to(dtype=torch.float32), + xy_preds_i_1.to(dtype=torch.float32), + xy_preds_i_2.to(dtype=torch.float32), + ], + 0, + ) + + # TODO: simplify when indexing without rank will be supported by ONNX + base = num_keypoints * num_keypoints + num_keypoints + 1 + ind = torch.arange(num_keypoints) + ind = ind.to(dtype=torch.int64) * base + end_scores_i = ( + roi_map.index_select(1, y_int.to(dtype=torch.int64)) + .index_select(2, x_int.to(dtype=torch.int64)) + .view(-1) + .index_select(0, ind.to(dtype=torch.int64)) + ) + + return xy_preds_i, end_scores_i + + +@torch.jit._script_if_tracing +def _onnx_heatmaps_to_keypoints_loop( + maps, rois, widths_ceil, heights_ceil, widths, heights, offset_x, offset_y, num_keypoints +): + xy_preds = torch.zeros((0, 3, int(num_keypoints)), dtype=torch.float32, device=maps.device) + end_scores = torch.zeros((0, int(num_keypoints)), dtype=torch.float32, device=maps.device) + + for i in range(int(rois.size(0))): + xy_preds_i, end_scores_i = _onnx_heatmaps_to_keypoints( + maps, maps[i], widths_ceil[i], heights_ceil[i], widths[i], heights[i], offset_x[i], offset_y[i] + ) + xy_preds = torch.cat((xy_preds.to(dtype=torch.float32), xy_preds_i.unsqueeze(0).to(dtype=torch.float32)), 0) + end_scores = torch.cat( + (end_scores.to(dtype=torch.float32), end_scores_i.to(dtype=torch.float32).unsqueeze(0)), 0 + ) + return xy_preds, end_scores + + +def heatmaps_to_keypoints(maps, rois): + """Extract predicted keypoint locations from heatmaps. Output has shape + (#rois, 4, #keypoints) with the 4 rows corresponding to (x, y, logit, prob) + for each keypoint. + """ + # This function converts a discrete image coordinate in a HEATMAP_SIZE x + # HEATMAP_SIZE image to a continuous keypoint coordinate. We maintain + # consistency with keypoints_to_heatmap_labels by using the conversion from + # Heckbert 1990: c = d + 0.5, where d is a discrete coordinate and c is a + # continuous coordinate. + offset_x = rois[:, 0] + offset_y = rois[:, 1] + + widths = rois[:, 2] - rois[:, 0] + heights = rois[:, 3] - rois[:, 1] + widths = widths.clamp(min=1) + heights = heights.clamp(min=1) + widths_ceil = widths.ceil() + heights_ceil = heights.ceil() + + num_keypoints = maps.shape[1] + + if torchvision._is_tracing(): + xy_preds, end_scores = _onnx_heatmaps_to_keypoints_loop( + maps, + rois, + widths_ceil, + heights_ceil, + widths, + heights, + offset_x, + offset_y, + torch.scalar_tensor(num_keypoints, dtype=torch.int64), + ) + return xy_preds.permute(0, 2, 1), end_scores + + xy_preds = torch.zeros((len(rois), 3, num_keypoints), dtype=torch.float32, device=maps.device) + end_scores = torch.zeros((len(rois), num_keypoints), dtype=torch.float32, device=maps.device) + for i in range(len(rois)): + roi_map_width = int(widths_ceil[i].item()) + roi_map_height = int(heights_ceil[i].item()) + width_correction = widths[i] / roi_map_width + height_correction = heights[i] / roi_map_height + roi_map = F.interpolate( + maps[i][:, None], size=(roi_map_height, roi_map_width), mode="bicubic", align_corners=False + )[:, 0] + # roi_map_probs = scores_to_probs(roi_map.copy()) + w = roi_map.shape[2] + pos = roi_map.reshape(num_keypoints, -1).argmax(dim=1) + + x_int = pos % w + y_int = torch.div(pos - x_int, w, rounding_mode="floor") + # assert (roi_map_probs[k, y_int, x_int] == + # roi_map_probs[k, :, :].max()) + x = (x_int.float() + 0.5) * width_correction + y = (y_int.float() + 0.5) * height_correction + xy_preds[i, 0, :] = x + offset_x[i] + xy_preds[i, 1, :] = y + offset_y[i] + xy_preds[i, 2, :] = 1 + end_scores[i, :] = roi_map[torch.arange(num_keypoints, device=roi_map.device), y_int, x_int] + + return xy_preds.permute(0, 2, 1), end_scores + + +def keypointrcnn_loss(keypoint_logits, proposals, gt_keypoints, keypoint_matched_idxs): + # type: (Tensor, List[Tensor], List[Tensor], List[Tensor]) -> Tensor + N, K, H, W = keypoint_logits.shape + if H != W: + raise ValueError( + f"keypoint_logits height and width (last two elements of shape) should be equal. Instead got H = {H} and W = {W}" + ) + discretization_size = H + heatmaps = [] + valid = [] + for proposals_per_image, gt_kp_in_image, midx in zip(proposals, gt_keypoints, keypoint_matched_idxs): + kp = gt_kp_in_image[midx] + heatmaps_per_image, valid_per_image = keypoints_to_heatmap(kp, proposals_per_image, discretization_size) + heatmaps.append(heatmaps_per_image.view(-1)) + valid.append(valid_per_image.view(-1)) + + keypoint_targets = torch.cat(heatmaps, dim=0) + valid = torch.cat(valid, dim=0).to(dtype=torch.uint8) + valid = torch.where(valid)[0] + + # torch.mean (in binary_cross_entropy_with_logits) doesn't + # accept empty tensors, so handle it sepaartely + if keypoint_targets.numel() == 0 or len(valid) == 0: + return keypoint_logits.sum() * 0 + + keypoint_logits = keypoint_logits.view(N * K, H * W) + + keypoint_loss = F.cross_entropy(keypoint_logits[valid], keypoint_targets[valid]) + return keypoint_loss + + +def keypointrcnn_inference(x, boxes): + # type: (Tensor, List[Tensor]) -> Tuple[List[Tensor], List[Tensor]] + kp_probs = [] + kp_scores = [] + + boxes_per_image = [box.size(0) for box in boxes] + x2 = x.split(boxes_per_image, dim=0) + + for xx, bb in zip(x2, boxes): + kp_prob, scores = heatmaps_to_keypoints(xx, bb) + kp_probs.append(kp_prob) + kp_scores.append(scores) + + return kp_probs, kp_scores + + +def _onnx_expand_boxes(boxes, scale): + # type: (Tensor, float) -> Tensor + w_half = (boxes[:, 2] - boxes[:, 0]) * 0.5 + h_half = (boxes[:, 3] - boxes[:, 1]) * 0.5 + x_c = (boxes[:, 2] + boxes[:, 0]) * 0.5 + y_c = (boxes[:, 3] + boxes[:, 1]) * 0.5 + + w_half = w_half.to(dtype=torch.float32) * scale + h_half = h_half.to(dtype=torch.float32) * scale + + boxes_exp0 = x_c - w_half + boxes_exp1 = y_c - h_half + boxes_exp2 = x_c + w_half + boxes_exp3 = y_c + h_half + boxes_exp = torch.stack((boxes_exp0, boxes_exp1, boxes_exp2, boxes_exp3), 1) + return boxes_exp + + +# the next two functions should be merged inside Masker +# but are kept here for the moment while we need them +# temporarily for paste_mask_in_image +def expand_boxes(boxes, scale): + # type: (Tensor, float) -> Tensor + if torchvision._is_tracing(): + return _onnx_expand_boxes(boxes, scale) + w_half = (boxes[:, 2] - boxes[:, 0]) * 0.5 + h_half = (boxes[:, 3] - boxes[:, 1]) * 0.5 + x_c = (boxes[:, 2] + boxes[:, 0]) * 0.5 + y_c = (boxes[:, 3] + boxes[:, 1]) * 0.5 + + w_half *= scale + h_half *= scale + + boxes_exp = torch.zeros_like(boxes) + boxes_exp[:, 0] = x_c - w_half + boxes_exp[:, 2] = x_c + w_half + boxes_exp[:, 1] = y_c - h_half + boxes_exp[:, 3] = y_c + h_half + return boxes_exp + + +@torch.jit.unused +def expand_masks_tracing_scale(M, padding): + # type: (int, int) -> float + return torch.tensor(M + 2 * padding).to(torch.float32) / torch.tensor(M).to(torch.float32) + + +def expand_masks(mask, padding): + # type: (Tensor, int) -> Tuple[Tensor, float] + M = mask.shape[-1] + if torch._C._get_tracing_state(): # could not import is_tracing(), not sure why + scale = expand_masks_tracing_scale(M, padding) + else: + scale = float(M + 2 * padding) / M + padded_mask = F.pad(mask, (padding,) * 4) + return padded_mask, scale + + +def paste_mask_in_image(mask, box, im_h, im_w): + # type: (Tensor, Tensor, int, int) -> Tensor + TO_REMOVE = 1 + w = int(box[2] - box[0] + TO_REMOVE) + h = int(box[3] - box[1] + TO_REMOVE) + w = max(w, 1) + h = max(h, 1) + + # Set shape to [batchxCxHxW] + mask = mask.expand((1, 1, -1, -1)) + + # Resize mask + mask = F.interpolate(mask, size=(h, w), mode="bilinear", align_corners=False) + mask = mask[0][0] + + im_mask = torch.zeros((im_h, im_w), dtype=mask.dtype, device=mask.device) + x_0 = max(box[0], 0) + x_1 = min(box[2] + 1, im_w) + y_0 = max(box[1], 0) + y_1 = min(box[3] + 1, im_h) + + im_mask[y_0:y_1, x_0:x_1] = mask[(y_0 - box[1]) : (y_1 - box[1]), (x_0 - box[0]) : (x_1 - box[0])] + return im_mask + + +def _onnx_paste_mask_in_image(mask, box, im_h, im_w): + one = torch.ones(1, dtype=torch.int64) + zero = torch.zeros(1, dtype=torch.int64) + + w = box[2] - box[0] + one + h = box[3] - box[1] + one + w = torch.max(torch.cat((w, one))) + h = torch.max(torch.cat((h, one))) + + # Set shape to [batchxCxHxW] + mask = mask.expand((1, 1, mask.size(0), mask.size(1))) + + # Resize mask + mask = F.interpolate(mask, size=(int(h), int(w)), mode="bilinear", align_corners=False) + mask = mask[0][0] + + x_0 = torch.max(torch.cat((box[0].unsqueeze(0), zero))) + x_1 = torch.min(torch.cat((box[2].unsqueeze(0) + one, im_w.unsqueeze(0)))) + y_0 = torch.max(torch.cat((box[1].unsqueeze(0), zero))) + y_1 = torch.min(torch.cat((box[3].unsqueeze(0) + one, im_h.unsqueeze(0)))) + + unpaded_im_mask = mask[(y_0 - box[1]) : (y_1 - box[1]), (x_0 - box[0]) : (x_1 - box[0])] + + # TODO : replace below with a dynamic padding when support is added in ONNX + + # pad y + zeros_y0 = torch.zeros(y_0, unpaded_im_mask.size(1)) + zeros_y1 = torch.zeros(im_h - y_1, unpaded_im_mask.size(1)) + concat_0 = torch.cat((zeros_y0, unpaded_im_mask.to(dtype=torch.float32), zeros_y1), 0)[0:im_h, :] + # pad x + zeros_x0 = torch.zeros(concat_0.size(0), x_0) + zeros_x1 = torch.zeros(concat_0.size(0), im_w - x_1) + im_mask = torch.cat((zeros_x0, concat_0, zeros_x1), 1)[:, :im_w] + return im_mask + + +@torch.jit._script_if_tracing +def _onnx_paste_masks_in_image_loop(masks, boxes, im_h, im_w): + res_append = torch.zeros(0, im_h, im_w) + for i in range(masks.size(0)): + mask_res = _onnx_paste_mask_in_image(masks[i][0], boxes[i], im_h, im_w) + mask_res = mask_res.unsqueeze(0) + res_append = torch.cat((res_append, mask_res)) + return res_append + + +def paste_masks_in_image(masks, boxes, img_shape, padding=1): + # type: (Tensor, Tensor, Tuple[int, int], int) -> Tensor + masks, scale = expand_masks(masks, padding=padding) + boxes = expand_boxes(boxes, scale).to(dtype=torch.int64) + im_h, im_w = img_shape + + if torchvision._is_tracing(): + return _onnx_paste_masks_in_image_loop( + masks, boxes, torch.scalar_tensor(im_h, dtype=torch.int64), torch.scalar_tensor(im_w, dtype=torch.int64) + )[:, None] + res = [paste_mask_in_image(m[0], b, im_h, im_w) for m, b in zip(masks, boxes)] + if len(res) > 0: + ret = torch.stack(res, dim=0)[:, None] + else: + ret = masks.new_empty((0, 1, im_h, im_w)) + return ret + + +class RoIHeads(nn.Module): + __annotations__ = { + "box_coder": det_utils.BoxCoder, + "proposal_matcher": det_utils.Matcher, + "fg_bg_sampler": det_utils.BalancedPositiveNegativeSampler, + } + + def __init__( + self, + box_roi_pool, + box_head, + box_predictor, + # Faster R-CNN training + fg_iou_thresh, + bg_iou_thresh, + batch_size_per_image, + positive_fraction, + bbox_reg_weights, + # Faster R-CNN inference + score_thresh, + nms_thresh, + detections_per_img, + # Mask + mask_roi_pool=None, + mask_head=None, + mask_predictor=None, + keypoint_roi_pool=None, + keypoint_head=None, + keypoint_predictor=None, + ): + super().__init__() + + self.box_similarity = box_ops.box_iou + # assign ground-truth boxes for each proposal + self.proposal_matcher = det_utils.Matcher(fg_iou_thresh, bg_iou_thresh, allow_low_quality_matches=False) + + self.fg_bg_sampler = det_utils.BalancedPositiveNegativeSampler(batch_size_per_image, positive_fraction) + + if bbox_reg_weights is None: + bbox_reg_weights = (10.0, 10.0, 5.0, 5.0) + self.box_coder = det_utils.BoxCoder(bbox_reg_weights) + + self.box_roi_pool = box_roi_pool + self.box_head = box_head + self.box_predictor = box_predictor + + self.score_thresh = score_thresh + self.nms_thresh = nms_thresh + self.detections_per_img = detections_per_img + + self.mask_roi_pool = mask_roi_pool + self.mask_head = mask_head + self.mask_predictor = mask_predictor + + self.keypoint_roi_pool = keypoint_roi_pool + self.keypoint_head = keypoint_head + self.keypoint_predictor = keypoint_predictor + + def has_mask(self): + if self.mask_roi_pool is None: + return False + if self.mask_head is None: + return False + if self.mask_predictor is None: + return False + return True + + def has_keypoint(self): + if self.keypoint_roi_pool is None: + return False + if self.keypoint_head is None: + return False + if self.keypoint_predictor is None: + return False + return True + + def assign_targets_to_proposals(self, proposals, gt_boxes, gt_labels): + # type: (List[Tensor], List[Tensor], List[Tensor]) -> Tuple[List[Tensor], List[Tensor]] + matched_idxs = [] + labels = [] + for proposals_in_image, gt_boxes_in_image, gt_labels_in_image in zip(proposals, gt_boxes, gt_labels): + + if gt_boxes_in_image.numel() == 0: + # Background image + device = proposals_in_image.device + clamped_matched_idxs_in_image = torch.zeros( + (proposals_in_image.shape[0],), dtype=torch.int64, device=device + ) + labels_in_image = torch.zeros((proposals_in_image.shape[0],), dtype=torch.int64, device=device) + else: + # set to self.box_similarity when https://github.com/pytorch/pytorch/issues/27495 lands + match_quality_matrix = box_ops.box_iou(gt_boxes_in_image, proposals_in_image) + matched_idxs_in_image = self.proposal_matcher(match_quality_matrix) + + clamped_matched_idxs_in_image = matched_idxs_in_image.clamp(min=0) + + labels_in_image = gt_labels_in_image[clamped_matched_idxs_in_image] + labels_in_image = labels_in_image.to(dtype=torch.int64) + + # Label background (below the low threshold) + bg_inds = matched_idxs_in_image == self.proposal_matcher.BELOW_LOW_THRESHOLD + labels_in_image[bg_inds] = 0 + + # Label ignore proposals (between low and high thresholds) + ignore_inds = matched_idxs_in_image == self.proposal_matcher.BETWEEN_THRESHOLDS + labels_in_image[ignore_inds] = -1 # -1 is ignored by sampler + + matched_idxs.append(clamped_matched_idxs_in_image) + labels.append(labels_in_image) + return matched_idxs, labels + + def subsample(self, labels): + # type: (List[Tensor]) -> List[Tensor] + sampled_pos_inds, sampled_neg_inds = self.fg_bg_sampler(labels) + sampled_inds = [] + for img_idx, (pos_inds_img, neg_inds_img) in enumerate(zip(sampled_pos_inds, sampled_neg_inds)): + img_sampled_inds = torch.where(pos_inds_img | neg_inds_img)[0] + sampled_inds.append(img_sampled_inds) + return sampled_inds + + def add_gt_proposals(self, proposals, gt_boxes): + # type: (List[Tensor], List[Tensor]) -> List[Tensor] + proposals = [torch.cat((proposal, gt_box)) for proposal, gt_box in zip(proposals, gt_boxes)] + + return proposals + + def check_targets(self, targets): + # type: (Optional[List[Dict[str, Tensor]]]) -> None + if targets is None: + raise ValueError("targets should not be None") + if not all(["boxes" in t for t in targets]): + raise ValueError("Every element of targets should have a boxes key") + if not all(["labels" in t for t in targets]): + raise ValueError("Every element of targets should have a labels key") + if self.has_mask(): + if not all(["masks" in t for t in targets]): + raise ValueError("Every element of targets should have a masks key") + + def select_training_samples( + self, + proposals, # type: List[Tensor] + targets, # type: Optional[List[Dict[str, Tensor]]] + ): + # type: (...) -> Tuple[List[Tensor], List[Tensor], List[Tensor], List[Tensor]] + self.check_targets(targets) + if targets is None: + raise ValueError("targets should not be None") + dtype = proposals[0].dtype + device = proposals[0].device + + gt_boxes = [t["boxes"].to(dtype) for t in targets] + gt_labels = [t["labels"] for t in targets] + + # append ground-truth bboxes to propos + proposals = self.add_gt_proposals(proposals, gt_boxes) + + # get matching gt indices for each proposal + matched_idxs, labels = self.assign_targets_to_proposals(proposals, gt_boxes, gt_labels) + # sample a fixed proportion of positive-negative proposals + sampled_inds = self.subsample(labels) + matched_gt_boxes = [] + num_images = len(proposals) + for img_id in range(num_images): + img_sampled_inds = sampled_inds[img_id] + proposals[img_id] = proposals[img_id][img_sampled_inds] + labels[img_id] = labels[img_id][img_sampled_inds] + matched_idxs[img_id] = matched_idxs[img_id][img_sampled_inds] + + gt_boxes_in_image = gt_boxes[img_id] + if gt_boxes_in_image.numel() == 0: + gt_boxes_in_image = torch.zeros((1, 4), dtype=dtype, device=device) + matched_gt_boxes.append(gt_boxes_in_image[matched_idxs[img_id]]) + + regression_targets = self.box_coder.encode(matched_gt_boxes, proposals) + return proposals, matched_idxs, labels, regression_targets + + def postprocess_detections( + self, + class_logits, # type: Tensor + box_regression, # type: Tensor + proposals, # type: List[Tensor] + image_shapes, # type: List[Tuple[int, int]] + ): + # type: (...) -> Tuple[List[Tensor], List[Tensor], List[Tensor]] + device = class_logits.device + num_classes = class_logits.shape[-1] + + boxes_per_image = [boxes_in_image.shape[0] for boxes_in_image in proposals] + pred_boxes = self.box_coder.decode(box_regression, proposals) + + pred_scores = F.softmax(class_logits, -1) + + pred_boxes_list = pred_boxes.split(boxes_per_image, 0) + pred_scores_list = pred_scores.split(boxes_per_image, 0) + + all_boxes = [] + all_scores = [] + all_labels = [] + for boxes, scores, image_shape in zip(pred_boxes_list, pred_scores_list, image_shapes): + boxes = box_ops.clip_boxes_to_image(boxes, image_shape) + + # create labels for each prediction + labels = torch.arange(num_classes, device=device) + labels = labels.view(1, -1).expand_as(scores) + + # remove predictions with the background label + boxes = boxes[:, 1:] + scores = scores[:, 1:] + labels = labels[:, 1:] + + # batch everything, by making every class prediction be a separate instance + boxes = boxes.reshape(-1, 4) + scores = scores.reshape(-1) + labels = labels.reshape(-1) + + # remove low scoring boxes + inds = torch.where(scores > self.score_thresh)[0] + boxes, scores, labels = boxes[inds], scores[inds], labels[inds] + + # remove empty boxes + keep = box_ops.remove_small_boxes(boxes, min_size=1e-2) + boxes, scores, labels = boxes[keep], scores[keep], labels[keep] + + # non-maximum suppression, independently done per class + keep = box_ops.batched_nms(boxes, scores, labels, self.nms_thresh) + # keep only topk scoring predictions + keep = keep[: self.detections_per_img] + boxes, scores, labels = boxes[keep], scores[keep], labels[keep] + + all_boxes.append(boxes) + all_scores.append(scores) + all_labels.append(labels) + + return all_boxes, all_scores, all_labels + + def forward( + self, + features, # type: Dict[str, Tensor] + proposals, # type: List[Tensor] + image_shapes, # type: List[Tuple[int, int]] + targets=None, # type: Optional[List[Dict[str, Tensor]]] + ): + # type: (...) -> Tuple[List[Dict[str, Tensor]], Dict[str, Tensor]] + """ + Args: + features (List[Tensor]) + proposals (List[Tensor[N, 4]]) + image_shapes (List[Tuple[H, W]]) + targets (List[Dict]) + """ + if targets is not None: + for t in targets: + # TODO: https://github.com/pytorch/pytorch/issues/26731 + floating_point_types = (torch.float, torch.double, torch.half) + if not t["boxes"].dtype in floating_point_types: + raise TypeError(f"target boxes must of float type, instead got {t['boxes'].dtype}") + if not t["labels"].dtype == torch.int64: + raise TypeError(f"target labels must of int64 type, instead got {t['labels'].dtype}") + if self.has_keypoint(): + if not t["keypoints"].dtype == torch.float32: + raise TypeError(f"target keypoints must of float type, instead got {t['keypoints'].dtype}") + + if self.training: + proposals, matched_idxs, labels, regression_targets = self.select_training_samples(proposals, targets) + else: + labels = None + regression_targets = None + matched_idxs = None + + box_features = self.box_roi_pool(features, proposals, image_shapes) + box_features = self.box_head(box_features) + class_logits, box_regression = self.box_predictor(box_features) + + result: List[Dict[str, torch.Tensor]] = [] + losses = {} + if self.training: + if labels is None: + raise ValueError("labels cannot be None") + if regression_targets is None: + raise ValueError("regression_targets cannot be None") + loss_classifier, loss_box_reg = fastrcnn_loss(class_logits, box_regression, labels, regression_targets) + losses = {"loss_classifier": loss_classifier, "loss_box_reg": loss_box_reg} + else: + boxes, scores, labels = self.postprocess_detections(class_logits, box_regression, proposals, image_shapes) + num_images = len(boxes) + for i in range(num_images): + result.append( + { + "boxes": boxes[i], + "labels": labels[i], + "scores": scores[i], + } + ) + + if self.has_mask(): + mask_proposals = [p["boxes"] for p in result] + if self.training: + if matched_idxs is None: + raise ValueError("if in training, matched_idxs should not be None") + + # during training, only focus on positive boxes + num_images = len(proposals) + mask_proposals = [] + pos_matched_idxs = [] + for img_id in range(num_images): + pos = torch.where(labels[img_id] > 0)[0] + mask_proposals.append(proposals[img_id][pos]) + pos_matched_idxs.append(matched_idxs[img_id][pos]) + else: + pos_matched_idxs = None + + if self.mask_roi_pool is not None: + mask_features = self.mask_roi_pool(features, mask_proposals, image_shapes) + mask_features = self.mask_head(mask_features) + mask_logits = self.mask_predictor(mask_features) + else: + raise Exception("Expected mask_roi_pool to be not None") + + loss_mask = {} + if self.training: + if targets is None or pos_matched_idxs is None or mask_logits is None: + raise ValueError("targets, pos_matched_idxs, mask_logits cannot be None when training") + + gt_masks = [t["masks"] for t in targets] + gt_labels = [t["labels"] for t in targets] + rcnn_loss_mask = maskrcnn_loss(mask_logits, mask_proposals, gt_masks, gt_labels, pos_matched_idxs) + loss_mask = {"loss_mask": rcnn_loss_mask} + else: + labels = [r["labels"] for r in result] + masks_probs = maskrcnn_inference(mask_logits, labels) + for mask_prob, r in zip(masks_probs, result): + r["masks"] = mask_prob + + losses.update(loss_mask) + + # keep none checks in if conditional so torchscript will conditionally + # compile each branch + if ( + self.keypoint_roi_pool is not None + and self.keypoint_head is not None + and self.keypoint_predictor is not None + ): + keypoint_proposals = [p["boxes"] for p in result] + if self.training: + # during training, only focus on positive boxes + num_images = len(proposals) + keypoint_proposals = [] + pos_matched_idxs = [] + if matched_idxs is None: + raise ValueError("if in trainning, matched_idxs should not be None") + + for img_id in range(num_images): + pos = torch.where(labels[img_id] > 0)[0] + keypoint_proposals.append(proposals[img_id][pos]) + pos_matched_idxs.append(matched_idxs[img_id][pos]) + else: + pos_matched_idxs = None + + keypoint_features = self.keypoint_roi_pool(features, keypoint_proposals, image_shapes) + keypoint_features = self.keypoint_head(keypoint_features) + keypoint_logits = self.keypoint_predictor(keypoint_features) + + loss_keypoint = {} + if self.training: + if targets is None or pos_matched_idxs is None: + raise ValueError("both targets and pos_matched_idxs should not be None when in training mode") + + gt_keypoints = [t["keypoints"] for t in targets] + rcnn_loss_keypoint = keypointrcnn_loss( + keypoint_logits, keypoint_proposals, gt_keypoints, pos_matched_idxs + ) + loss_keypoint = {"loss_keypoint": rcnn_loss_keypoint} + else: + if keypoint_logits is None or keypoint_proposals is None: + raise ValueError( + "both keypoint_logits and keypoint_proposals should not be None when not in training mode" + ) + + keypoints_probs, kp_scores = keypointrcnn_inference(keypoint_logits, keypoint_proposals) + for keypoint_prob, kps, r in zip(keypoints_probs, kp_scores, result): + r["keypoints"] = keypoint_prob + r["keypoints_scores"] = kps + losses.update(loss_keypoint) + + return result, losses diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/rpn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/rpn.py new file mode 100644 index 0000000000000000000000000000000000000000..009a651ca891b0c1935f3766c28521419a188c89 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/rpn.py @@ -0,0 +1,388 @@ +from typing import Dict, List, Optional, Tuple + +import torch +from torch import nn, Tensor +from torch.nn import functional as F +from torchvision.ops import boxes as box_ops, Conv2dNormActivation + +from . import _utils as det_utils + +# Import AnchorGenerator to keep compatibility. +from .anchor_utils import AnchorGenerator # noqa: 401 +from .image_list import ImageList + + +class RPNHead(nn.Module): + """ + Adds a simple RPN Head with classification and regression heads + + Args: + in_channels (int): number of channels of the input feature + num_anchors (int): number of anchors to be predicted + conv_depth (int, optional): number of convolutions + """ + + _version = 2 + + def __init__(self, in_channels: int, num_anchors: int, conv_depth=1) -> None: + super().__init__() + convs = [] + for _ in range(conv_depth): + convs.append(Conv2dNormActivation(in_channels, in_channels, kernel_size=3, norm_layer=None)) + self.conv = nn.Sequential(*convs) + self.cls_logits = nn.Conv2d(in_channels, num_anchors, kernel_size=1, stride=1) + self.bbox_pred = nn.Conv2d(in_channels, num_anchors * 4, kernel_size=1, stride=1) + + for layer in self.modules(): + if isinstance(layer, nn.Conv2d): + torch.nn.init.normal_(layer.weight, std=0.01) # type: ignore[arg-type] + if layer.bias is not None: + torch.nn.init.constant_(layer.bias, 0) # type: ignore[arg-type] + + def _load_from_state_dict( + self, + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ): + version = local_metadata.get("version", None) + + if version is None or version < 2: + for type in ["weight", "bias"]: + old_key = f"{prefix}conv.{type}" + new_key = f"{prefix}conv.0.0.{type}" + if old_key in state_dict: + state_dict[new_key] = state_dict.pop(old_key) + + super()._load_from_state_dict( + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ) + + def forward(self, x: List[Tensor]) -> Tuple[List[Tensor], List[Tensor]]: + logits = [] + bbox_reg = [] + for feature in x: + t = self.conv(feature) + logits.append(self.cls_logits(t)) + bbox_reg.append(self.bbox_pred(t)) + return logits, bbox_reg + + +def permute_and_flatten(layer: Tensor, N: int, A: int, C: int, H: int, W: int) -> Tensor: + layer = layer.view(N, -1, C, H, W) + layer = layer.permute(0, 3, 4, 1, 2) + layer = layer.reshape(N, -1, C) + return layer + + +def concat_box_prediction_layers(box_cls: List[Tensor], box_regression: List[Tensor]) -> Tuple[Tensor, Tensor]: + box_cls_flattened = [] + box_regression_flattened = [] + # for each feature level, permute the outputs to make them be in the + # same format as the labels. Note that the labels are computed for + # all feature levels concatenated, so we keep the same representation + # for the objectness and the box_regression + for box_cls_per_level, box_regression_per_level in zip(box_cls, box_regression): + N, AxC, H, W = box_cls_per_level.shape + Ax4 = box_regression_per_level.shape[1] + A = Ax4 // 4 + C = AxC // A + box_cls_per_level = permute_and_flatten(box_cls_per_level, N, A, C, H, W) + box_cls_flattened.append(box_cls_per_level) + + box_regression_per_level = permute_and_flatten(box_regression_per_level, N, A, 4, H, W) + box_regression_flattened.append(box_regression_per_level) + # concatenate on the first dimension (representing the feature levels), to + # take into account the way the labels were generated (with all feature maps + # being concatenated as well) + box_cls = torch.cat(box_cls_flattened, dim=1).flatten(0, -2) + box_regression = torch.cat(box_regression_flattened, dim=1).reshape(-1, 4) + return box_cls, box_regression + + +class RegionProposalNetwork(torch.nn.Module): + """ + Implements Region Proposal Network (RPN). + + Args: + anchor_generator (AnchorGenerator): module that generates the anchors for a set of feature + maps. + head (nn.Module): module that computes the objectness and regression deltas + fg_iou_thresh (float): minimum IoU between the anchor and the GT box so that they can be + considered as positive during training of the RPN. + bg_iou_thresh (float): maximum IoU between the anchor and the GT box so that they can be + considered as negative during training of the RPN. + batch_size_per_image (int): number of anchors that are sampled during training of the RPN + for computing the loss + positive_fraction (float): proportion of positive anchors in a mini-batch during training + of the RPN + pre_nms_top_n (Dict[str, int]): number of proposals to keep before applying NMS. It should + contain two fields: training and testing, to allow for different values depending + on training or evaluation + post_nms_top_n (Dict[str, int]): number of proposals to keep after applying NMS. It should + contain two fields: training and testing, to allow for different values depending + on training or evaluation + nms_thresh (float): NMS threshold used for postprocessing the RPN proposals + score_thresh (float): only return proposals with an objectness score greater than score_thresh + + """ + + __annotations__ = { + "box_coder": det_utils.BoxCoder, + "proposal_matcher": det_utils.Matcher, + "fg_bg_sampler": det_utils.BalancedPositiveNegativeSampler, + } + + def __init__( + self, + anchor_generator: AnchorGenerator, + head: nn.Module, + # Faster-RCNN Training + fg_iou_thresh: float, + bg_iou_thresh: float, + batch_size_per_image: int, + positive_fraction: float, + # Faster-RCNN Inference + pre_nms_top_n: Dict[str, int], + post_nms_top_n: Dict[str, int], + nms_thresh: float, + score_thresh: float = 0.0, + ) -> None: + super().__init__() + self.anchor_generator = anchor_generator + self.head = head + self.box_coder = det_utils.BoxCoder(weights=(1.0, 1.0, 1.0, 1.0)) + + # used during training + self.box_similarity = box_ops.box_iou + + self.proposal_matcher = det_utils.Matcher( + fg_iou_thresh, + bg_iou_thresh, + allow_low_quality_matches=True, + ) + + self.fg_bg_sampler = det_utils.BalancedPositiveNegativeSampler(batch_size_per_image, positive_fraction) + # used during testing + self._pre_nms_top_n = pre_nms_top_n + self._post_nms_top_n = post_nms_top_n + self.nms_thresh = nms_thresh + self.score_thresh = score_thresh + self.min_size = 1e-3 + + def pre_nms_top_n(self) -> int: + if self.training: + return self._pre_nms_top_n["training"] + return self._pre_nms_top_n["testing"] + + def post_nms_top_n(self) -> int: + if self.training: + return self._post_nms_top_n["training"] + return self._post_nms_top_n["testing"] + + def assign_targets_to_anchors( + self, anchors: List[Tensor], targets: List[Dict[str, Tensor]] + ) -> Tuple[List[Tensor], List[Tensor]]: + + labels = [] + matched_gt_boxes = [] + for anchors_per_image, targets_per_image in zip(anchors, targets): + gt_boxes = targets_per_image["boxes"] + + if gt_boxes.numel() == 0: + # Background image (negative example) + device = anchors_per_image.device + matched_gt_boxes_per_image = torch.zeros(anchors_per_image.shape, dtype=torch.float32, device=device) + labels_per_image = torch.zeros((anchors_per_image.shape[0],), dtype=torch.float32, device=device) + else: + match_quality_matrix = self.box_similarity(gt_boxes, anchors_per_image) + matched_idxs = self.proposal_matcher(match_quality_matrix) + # get the targets corresponding GT for each proposal + # NB: need to clamp the indices because we can have a single + # GT in the image, and matched_idxs can be -2, which goes + # out of bounds + matched_gt_boxes_per_image = gt_boxes[matched_idxs.clamp(min=0)] + + labels_per_image = matched_idxs >= 0 + labels_per_image = labels_per_image.to(dtype=torch.float32) + + # Background (negative examples) + bg_indices = matched_idxs == self.proposal_matcher.BELOW_LOW_THRESHOLD + labels_per_image[bg_indices] = 0.0 + + # discard indices that are between thresholds + inds_to_discard = matched_idxs == self.proposal_matcher.BETWEEN_THRESHOLDS + labels_per_image[inds_to_discard] = -1.0 + + labels.append(labels_per_image) + matched_gt_boxes.append(matched_gt_boxes_per_image) + return labels, matched_gt_boxes + + def _get_top_n_idx(self, objectness: Tensor, num_anchors_per_level: List[int]) -> Tensor: + r = [] + offset = 0 + for ob in objectness.split(num_anchors_per_level, 1): + num_anchors = ob.shape[1] + pre_nms_top_n = det_utils._topk_min(ob, self.pre_nms_top_n(), 1) + _, top_n_idx = ob.topk(pre_nms_top_n, dim=1) + r.append(top_n_idx + offset) + offset += num_anchors + return torch.cat(r, dim=1) + + def filter_proposals( + self, + proposals: Tensor, + objectness: Tensor, + image_shapes: List[Tuple[int, int]], + num_anchors_per_level: List[int], + ) -> Tuple[List[Tensor], List[Tensor]]: + + num_images = proposals.shape[0] + device = proposals.device + # do not backprop through objectness + objectness = objectness.detach() + objectness = objectness.reshape(num_images, -1) + + levels = [ + torch.full((n,), idx, dtype=torch.int64, device=device) for idx, n in enumerate(num_anchors_per_level) + ] + levels = torch.cat(levels, 0) + levels = levels.reshape(1, -1).expand_as(objectness) + + # select top_n boxes independently per level before applying nms + top_n_idx = self._get_top_n_idx(objectness, num_anchors_per_level) + + image_range = torch.arange(num_images, device=device) + batch_idx = image_range[:, None] + + objectness = objectness[batch_idx, top_n_idx] + levels = levels[batch_idx, top_n_idx] + proposals = proposals[batch_idx, top_n_idx] + + objectness_prob = torch.sigmoid(objectness) + + final_boxes = [] + final_scores = [] + for boxes, scores, lvl, img_shape in zip(proposals, objectness_prob, levels, image_shapes): + boxes = box_ops.clip_boxes_to_image(boxes, img_shape) + + # remove small boxes + keep = box_ops.remove_small_boxes(boxes, self.min_size) + boxes, scores, lvl = boxes[keep], scores[keep], lvl[keep] + + # remove low scoring boxes + # use >= for Backwards compatibility + keep = torch.where(scores >= self.score_thresh)[0] + boxes, scores, lvl = boxes[keep], scores[keep], lvl[keep] + + # non-maximum suppression, independently done per level + keep = box_ops.batched_nms(boxes, scores, lvl, self.nms_thresh) + + # keep only topk scoring predictions + keep = keep[: self.post_nms_top_n()] + boxes, scores = boxes[keep], scores[keep] + + final_boxes.append(boxes) + final_scores.append(scores) + return final_boxes, final_scores + + def compute_loss( + self, objectness: Tensor, pred_bbox_deltas: Tensor, labels: List[Tensor], regression_targets: List[Tensor] + ) -> Tuple[Tensor, Tensor]: + """ + Args: + objectness (Tensor) + pred_bbox_deltas (Tensor) + labels (List[Tensor]) + regression_targets (List[Tensor]) + + Returns: + objectness_loss (Tensor) + box_loss (Tensor) + """ + + sampled_pos_inds, sampled_neg_inds = self.fg_bg_sampler(labels) + sampled_pos_inds = torch.where(torch.cat(sampled_pos_inds, dim=0))[0] + sampled_neg_inds = torch.where(torch.cat(sampled_neg_inds, dim=0))[0] + + sampled_inds = torch.cat([sampled_pos_inds, sampled_neg_inds], dim=0) + + objectness = objectness.flatten() + + labels = torch.cat(labels, dim=0) + regression_targets = torch.cat(regression_targets, dim=0) + + box_loss = F.smooth_l1_loss( + pred_bbox_deltas[sampled_pos_inds], + regression_targets[sampled_pos_inds], + beta=1 / 9, + reduction="sum", + ) / (sampled_inds.numel()) + + objectness_loss = F.binary_cross_entropy_with_logits(objectness[sampled_inds], labels[sampled_inds]) + + return objectness_loss, box_loss + + def forward( + self, + images: ImageList, + features: Dict[str, Tensor], + targets: Optional[List[Dict[str, Tensor]]] = None, + ) -> Tuple[List[Tensor], Dict[str, Tensor]]: + + """ + Args: + images (ImageList): images for which we want to compute the predictions + features (Dict[str, Tensor]): features computed from the images that are + used for computing the predictions. Each tensor in the list + correspond to different feature levels + targets (List[Dict[str, Tensor]]): ground-truth boxes present in the image (optional). + If provided, each element in the dict should contain a field `boxes`, + with the locations of the ground-truth boxes. + + Returns: + boxes (List[Tensor]): the predicted boxes from the RPN, one Tensor per + image. + losses (Dict[str, Tensor]): the losses for the model during training. During + testing, it is an empty dict. + """ + # RPN uses all feature maps that are available + features = list(features.values()) + objectness, pred_bbox_deltas = self.head(features) + anchors = self.anchor_generator(images, features) + + num_images = len(anchors) + num_anchors_per_level_shape_tensors = [o[0].shape for o in objectness] + num_anchors_per_level = [s[0] * s[1] * s[2] for s in num_anchors_per_level_shape_tensors] + objectness, pred_bbox_deltas = concat_box_prediction_layers(objectness, pred_bbox_deltas) + # apply pred_bbox_deltas to anchors to obtain the decoded proposals + # note that we detach the deltas because Faster R-CNN do not backprop through + # the proposals + proposals = self.box_coder.decode(pred_bbox_deltas.detach(), anchors) + proposals = proposals.view(num_images, -1, 4) + boxes, scores = self.filter_proposals(proposals, objectness, images.image_sizes, num_anchors_per_level) + + losses = {} + if self.training: + if targets is None: + raise ValueError("targets should not be None") + labels, matched_gt_boxes = self.assign_targets_to_anchors(anchors, targets) + regression_targets = self.box_coder.encode(matched_gt_boxes, anchors) + loss_objectness, loss_rpn_box_reg = self.compute_loss( + objectness, pred_bbox_deltas, labels, regression_targets + ) + losses = { + "loss_objectness": loss_objectness, + "loss_rpn_box_reg": loss_rpn_box_reg, + } + return boxes, losses diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/ssd.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/ssd.py new file mode 100644 index 0000000000000000000000000000000000000000..bc8f61057e70d021d7cca4508a1aa0a85e7d1ccf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/ssd.py @@ -0,0 +1,682 @@ +import warnings +from collections import OrderedDict +from typing import Any, Dict, List, Optional, Tuple + +import torch +import torch.nn.functional as F +from torch import nn, Tensor + +from ...ops import boxes as box_ops +from ...transforms._presets import ObjectDetection +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._meta import _COCO_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface +from ..vgg import VGG, vgg16, VGG16_Weights +from . import _utils as det_utils +from .anchor_utils import DefaultBoxGenerator +from .backbone_utils import _validate_trainable_layers +from .transform import GeneralizedRCNNTransform + + +__all__ = [ + "SSD300_VGG16_Weights", + "ssd300_vgg16", +] + + +class SSD300_VGG16_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/ssd300_vgg16_coco-b556d3b4.pth", + transforms=ObjectDetection, + meta={ + "num_params": 35641826, + "categories": _COCO_CATEGORIES, + "min_size": (1, 1), + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#ssd300-vgg16", + "_metrics": { + "COCO-val2017": { + "box_map": 25.1, + } + }, + "_ops": 34.858, + "_file_size": 135.988, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +def _xavier_init(conv: nn.Module): + for layer in conv.modules(): + if isinstance(layer, nn.Conv2d): + torch.nn.init.xavier_uniform_(layer.weight) + if layer.bias is not None: + torch.nn.init.constant_(layer.bias, 0.0) + + +class SSDHead(nn.Module): + def __init__(self, in_channels: List[int], num_anchors: List[int], num_classes: int): + super().__init__() + self.classification_head = SSDClassificationHead(in_channels, num_anchors, num_classes) + self.regression_head = SSDRegressionHead(in_channels, num_anchors) + + def forward(self, x: List[Tensor]) -> Dict[str, Tensor]: + return { + "bbox_regression": self.regression_head(x), + "cls_logits": self.classification_head(x), + } + + +class SSDScoringHead(nn.Module): + def __init__(self, module_list: nn.ModuleList, num_columns: int): + super().__init__() + self.module_list = module_list + self.num_columns = num_columns + + def _get_result_from_module_list(self, x: Tensor, idx: int) -> Tensor: + """ + This is equivalent to self.module_list[idx](x), + but torchscript doesn't support this yet + """ + num_blocks = len(self.module_list) + if idx < 0: + idx += num_blocks + out = x + for i, module in enumerate(self.module_list): + if i == idx: + out = module(x) + return out + + def forward(self, x: List[Tensor]) -> Tensor: + all_results = [] + + for i, features in enumerate(x): + results = self._get_result_from_module_list(features, i) + + # Permute output from (N, A * K, H, W) to (N, HWA, K). + N, _, H, W = results.shape + results = results.view(N, -1, self.num_columns, H, W) + results = results.permute(0, 3, 4, 1, 2) + results = results.reshape(N, -1, self.num_columns) # Size=(N, HWA, K) + + all_results.append(results) + + return torch.cat(all_results, dim=1) + + +class SSDClassificationHead(SSDScoringHead): + def __init__(self, in_channels: List[int], num_anchors: List[int], num_classes: int): + cls_logits = nn.ModuleList() + for channels, anchors in zip(in_channels, num_anchors): + cls_logits.append(nn.Conv2d(channels, num_classes * anchors, kernel_size=3, padding=1)) + _xavier_init(cls_logits) + super().__init__(cls_logits, num_classes) + + +class SSDRegressionHead(SSDScoringHead): + def __init__(self, in_channels: List[int], num_anchors: List[int]): + bbox_reg = nn.ModuleList() + for channels, anchors in zip(in_channels, num_anchors): + bbox_reg.append(nn.Conv2d(channels, 4 * anchors, kernel_size=3, padding=1)) + _xavier_init(bbox_reg) + super().__init__(bbox_reg, 4) + + +class SSD(nn.Module): + """ + Implements SSD architecture from `"SSD: Single Shot MultiBox Detector" `_. + + The input to the model is expected to be a list of tensors, each of shape [C, H, W], one for each + image, and should be in 0-1 range. Different images can have different sizes, but they will be resized + to a fixed size before passing it to the backbone. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the class label for each ground-truth box + + The model returns a Dict[Tensor] during training, containing the classification and regression + losses. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a List[Dict[Tensor]], one for each input image. The fields of the Dict are as + follows, where ``N`` is the number of detections: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the predicted labels for each detection + - scores (Tensor[N]): the scores for each detection + + Args: + backbone (nn.Module): the network used to compute the features for the model. + It should contain an out_channels attribute with the list of the output channels of + each feature map. The backbone should return a single Tensor or an OrderedDict[Tensor]. + anchor_generator (DefaultBoxGenerator): module that generates the default boxes for a + set of feature maps. + size (Tuple[int, int]): the width and height to which images will be rescaled before feeding them + to the backbone. + num_classes (int): number of output classes of the model (including the background). + image_mean (Tuple[float, float, float]): mean values used for input normalization. + They are generally the mean values of the dataset on which the backbone has been trained + on + image_std (Tuple[float, float, float]): std values used for input normalization. + They are generally the std values of the dataset on which the backbone has been trained on + head (nn.Module, optional): Module run on top of the backbone features. Defaults to a module containing + a classification and regression module. + score_thresh (float): Score threshold used for postprocessing the detections. + nms_thresh (float): NMS threshold used for postprocessing the detections. + detections_per_img (int): Number of best detections to keep after NMS. + iou_thresh (float): minimum IoU between the anchor and the GT box so that they can be + considered as positive during training. + topk_candidates (int): Number of best detections to keep before NMS. + positive_fraction (float): a number between 0 and 1 which indicates the proportion of positive + proposals used during the training of the classification head. It is used to estimate the negative to + positive ratio. + """ + + __annotations__ = { + "box_coder": det_utils.BoxCoder, + "proposal_matcher": det_utils.Matcher, + } + + def __init__( + self, + backbone: nn.Module, + anchor_generator: DefaultBoxGenerator, + size: Tuple[int, int], + num_classes: int, + image_mean: Optional[List[float]] = None, + image_std: Optional[List[float]] = None, + head: Optional[nn.Module] = None, + score_thresh: float = 0.01, + nms_thresh: float = 0.45, + detections_per_img: int = 200, + iou_thresh: float = 0.5, + topk_candidates: int = 400, + positive_fraction: float = 0.25, + **kwargs: Any, + ): + super().__init__() + _log_api_usage_once(self) + + self.backbone = backbone + + self.anchor_generator = anchor_generator + + self.box_coder = det_utils.BoxCoder(weights=(10.0, 10.0, 5.0, 5.0)) + + if head is None: + if hasattr(backbone, "out_channels"): + out_channels = backbone.out_channels + else: + out_channels = det_utils.retrieve_out_channels(backbone, size) + + if len(out_channels) != len(anchor_generator.aspect_ratios): + raise ValueError( + f"The length of the output channels from the backbone ({len(out_channels)}) do not match the length of the anchor generator aspect ratios ({len(anchor_generator.aspect_ratios)})" + ) + + num_anchors = self.anchor_generator.num_anchors_per_location() + head = SSDHead(out_channels, num_anchors, num_classes) + self.head = head + + self.proposal_matcher = det_utils.SSDMatcher(iou_thresh) + + if image_mean is None: + image_mean = [0.485, 0.456, 0.406] + if image_std is None: + image_std = [0.229, 0.224, 0.225] + self.transform = GeneralizedRCNNTransform( + min(size), max(size), image_mean, image_std, size_divisible=1, fixed_size=size, **kwargs + ) + + self.score_thresh = score_thresh + self.nms_thresh = nms_thresh + self.detections_per_img = detections_per_img + self.topk_candidates = topk_candidates + self.neg_to_pos_ratio = (1.0 - positive_fraction) / positive_fraction + + # used only on torchscript mode + self._has_warned = False + + @torch.jit.unused + def eager_outputs( + self, losses: Dict[str, Tensor], detections: List[Dict[str, Tensor]] + ) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]]: + if self.training: + return losses + + return detections + + def compute_loss( + self, + targets: List[Dict[str, Tensor]], + head_outputs: Dict[str, Tensor], + anchors: List[Tensor], + matched_idxs: List[Tensor], + ) -> Dict[str, Tensor]: + bbox_regression = head_outputs["bbox_regression"] + cls_logits = head_outputs["cls_logits"] + + # Match original targets with default boxes + num_foreground = 0 + bbox_loss = [] + cls_targets = [] + for ( + targets_per_image, + bbox_regression_per_image, + cls_logits_per_image, + anchors_per_image, + matched_idxs_per_image, + ) in zip(targets, bbox_regression, cls_logits, anchors, matched_idxs): + # produce the matching between boxes and targets + foreground_idxs_per_image = torch.where(matched_idxs_per_image >= 0)[0] + foreground_matched_idxs_per_image = matched_idxs_per_image[foreground_idxs_per_image] + num_foreground += foreground_matched_idxs_per_image.numel() + + # Calculate regression loss + matched_gt_boxes_per_image = targets_per_image["boxes"][foreground_matched_idxs_per_image] + bbox_regression_per_image = bbox_regression_per_image[foreground_idxs_per_image, :] + anchors_per_image = anchors_per_image[foreground_idxs_per_image, :] + target_regression = self.box_coder.encode_single(matched_gt_boxes_per_image, anchors_per_image) + bbox_loss.append( + torch.nn.functional.smooth_l1_loss(bbox_regression_per_image, target_regression, reduction="sum") + ) + + # Estimate ground truth for class targets + gt_classes_target = torch.zeros( + (cls_logits_per_image.size(0),), + dtype=targets_per_image["labels"].dtype, + device=targets_per_image["labels"].device, + ) + gt_classes_target[foreground_idxs_per_image] = targets_per_image["labels"][ + foreground_matched_idxs_per_image + ] + cls_targets.append(gt_classes_target) + + bbox_loss = torch.stack(bbox_loss) + cls_targets = torch.stack(cls_targets) + + # Calculate classification loss + num_classes = cls_logits.size(-1) + cls_loss = F.cross_entropy(cls_logits.view(-1, num_classes), cls_targets.view(-1), reduction="none").view( + cls_targets.size() + ) + + # Hard Negative Sampling + foreground_idxs = cls_targets > 0 + num_negative = self.neg_to_pos_ratio * foreground_idxs.sum(1, keepdim=True) + # num_negative[num_negative < self.neg_to_pos_ratio] = self.neg_to_pos_ratio + negative_loss = cls_loss.clone() + negative_loss[foreground_idxs] = -float("inf") # use -inf to detect positive values that creeped in the sample + values, idx = negative_loss.sort(1, descending=True) + # background_idxs = torch.logical_and(idx.sort(1)[1] < num_negative, torch.isfinite(values)) + background_idxs = idx.sort(1)[1] < num_negative + + N = max(1, num_foreground) + return { + "bbox_regression": bbox_loss.sum() / N, + "classification": (cls_loss[foreground_idxs].sum() + cls_loss[background_idxs].sum()) / N, + } + + def forward( + self, images: List[Tensor], targets: Optional[List[Dict[str, Tensor]]] = None + ) -> Tuple[Dict[str, Tensor], List[Dict[str, Tensor]]]: + if self.training: + if targets is None: + torch._assert(False, "targets should not be none when in training mode") + else: + for target in targets: + boxes = target["boxes"] + if isinstance(boxes, torch.Tensor): + torch._assert( + len(boxes.shape) == 2 and boxes.shape[-1] == 4, + f"Expected target boxes to be a tensor of shape [N, 4], got {boxes.shape}.", + ) + else: + torch._assert(False, f"Expected target boxes to be of type Tensor, got {type(boxes)}.") + + # get the original image sizes + original_image_sizes: List[Tuple[int, int]] = [] + for img in images: + val = img.shape[-2:] + torch._assert( + len(val) == 2, + f"expecting the last two dimensions of the Tensor to be H and W instead got {img.shape[-2:]}", + ) + original_image_sizes.append((val[0], val[1])) + + # transform the input + images, targets = self.transform(images, targets) + + # Check for degenerate boxes + if targets is not None: + for target_idx, target in enumerate(targets): + boxes = target["boxes"] + degenerate_boxes = boxes[:, 2:] <= boxes[:, :2] + if degenerate_boxes.any(): + bb_idx = torch.where(degenerate_boxes.any(dim=1))[0][0] + degen_bb: List[float] = boxes[bb_idx].tolist() + torch._assert( + False, + "All bounding boxes should have positive height and width." + f" Found invalid box {degen_bb} for target at index {target_idx}.", + ) + + # get the features from the backbone + features = self.backbone(images.tensors) + if isinstance(features, torch.Tensor): + features = OrderedDict([("0", features)]) + + features = list(features.values()) + + # compute the ssd heads outputs using the features + head_outputs = self.head(features) + + # create the set of anchors + anchors = self.anchor_generator(images, features) + + losses = {} + detections: List[Dict[str, Tensor]] = [] + if self.training: + matched_idxs = [] + if targets is None: + torch._assert(False, "targets should not be none when in training mode") + else: + for anchors_per_image, targets_per_image in zip(anchors, targets): + if targets_per_image["boxes"].numel() == 0: + matched_idxs.append( + torch.full( + (anchors_per_image.size(0),), -1, dtype=torch.int64, device=anchors_per_image.device + ) + ) + continue + + match_quality_matrix = box_ops.box_iou(targets_per_image["boxes"], anchors_per_image) + matched_idxs.append(self.proposal_matcher(match_quality_matrix)) + + losses = self.compute_loss(targets, head_outputs, anchors, matched_idxs) + else: + detections = self.postprocess_detections(head_outputs, anchors, images.image_sizes) + detections = self.transform.postprocess(detections, images.image_sizes, original_image_sizes) + + if torch.jit.is_scripting(): + if not self._has_warned: + warnings.warn("SSD always returns a (Losses, Detections) tuple in scripting") + self._has_warned = True + return losses, detections + return self.eager_outputs(losses, detections) + + def postprocess_detections( + self, head_outputs: Dict[str, Tensor], image_anchors: List[Tensor], image_shapes: List[Tuple[int, int]] + ) -> List[Dict[str, Tensor]]: + bbox_regression = head_outputs["bbox_regression"] + pred_scores = F.softmax(head_outputs["cls_logits"], dim=-1) + + num_classes = pred_scores.size(-1) + device = pred_scores.device + + detections: List[Dict[str, Tensor]] = [] + + for boxes, scores, anchors, image_shape in zip(bbox_regression, pred_scores, image_anchors, image_shapes): + boxes = self.box_coder.decode_single(boxes, anchors) + boxes = box_ops.clip_boxes_to_image(boxes, image_shape) + + image_boxes = [] + image_scores = [] + image_labels = [] + for label in range(1, num_classes): + score = scores[:, label] + + keep_idxs = score > self.score_thresh + score = score[keep_idxs] + box = boxes[keep_idxs] + + # keep only topk scoring predictions + num_topk = det_utils._topk_min(score, self.topk_candidates, 0) + score, idxs = score.topk(num_topk) + box = box[idxs] + + image_boxes.append(box) + image_scores.append(score) + image_labels.append(torch.full_like(score, fill_value=label, dtype=torch.int64, device=device)) + + image_boxes = torch.cat(image_boxes, dim=0) + image_scores = torch.cat(image_scores, dim=0) + image_labels = torch.cat(image_labels, dim=0) + + # non-maximum suppression + keep = box_ops.batched_nms(image_boxes, image_scores, image_labels, self.nms_thresh) + keep = keep[: self.detections_per_img] + + detections.append( + { + "boxes": image_boxes[keep], + "scores": image_scores[keep], + "labels": image_labels[keep], + } + ) + return detections + + +class SSDFeatureExtractorVGG(nn.Module): + def __init__(self, backbone: nn.Module, highres: bool): + super().__init__() + + _, _, maxpool3_pos, maxpool4_pos, _ = (i for i, layer in enumerate(backbone) if isinstance(layer, nn.MaxPool2d)) + + # Patch ceil_mode for maxpool3 to get the same WxH output sizes as the paper + backbone[maxpool3_pos].ceil_mode = True + + # parameters used for L2 regularization + rescaling + self.scale_weight = nn.Parameter(torch.ones(512) * 20) + + # Multiple Feature maps - page 4, Fig 2 of SSD paper + self.features = nn.Sequential(*backbone[:maxpool4_pos]) # until conv4_3 + + # SSD300 case - page 4, Fig 2 of SSD paper + extra = nn.ModuleList( + [ + nn.Sequential( + nn.Conv2d(1024, 256, kernel_size=1), + nn.ReLU(inplace=True), + nn.Conv2d(256, 512, kernel_size=3, padding=1, stride=2), # conv8_2 + nn.ReLU(inplace=True), + ), + nn.Sequential( + nn.Conv2d(512, 128, kernel_size=1), + nn.ReLU(inplace=True), + nn.Conv2d(128, 256, kernel_size=3, padding=1, stride=2), # conv9_2 + nn.ReLU(inplace=True), + ), + nn.Sequential( + nn.Conv2d(256, 128, kernel_size=1), + nn.ReLU(inplace=True), + nn.Conv2d(128, 256, kernel_size=3), # conv10_2 + nn.ReLU(inplace=True), + ), + nn.Sequential( + nn.Conv2d(256, 128, kernel_size=1), + nn.ReLU(inplace=True), + nn.Conv2d(128, 256, kernel_size=3), # conv11_2 + nn.ReLU(inplace=True), + ), + ] + ) + if highres: + # Additional layers for the SSD512 case. See page 11, footernote 5. + extra.append( + nn.Sequential( + nn.Conv2d(256, 128, kernel_size=1), + nn.ReLU(inplace=True), + nn.Conv2d(128, 256, kernel_size=4), # conv12_2 + nn.ReLU(inplace=True), + ) + ) + _xavier_init(extra) + + fc = nn.Sequential( + nn.MaxPool2d(kernel_size=3, stride=1, padding=1, ceil_mode=False), # add modified maxpool5 + nn.Conv2d(in_channels=512, out_channels=1024, kernel_size=3, padding=6, dilation=6), # FC6 with atrous + nn.ReLU(inplace=True), + nn.Conv2d(in_channels=1024, out_channels=1024, kernel_size=1), # FC7 + nn.ReLU(inplace=True), + ) + _xavier_init(fc) + extra.insert( + 0, + nn.Sequential( + *backbone[maxpool4_pos:-1], # until conv5_3, skip maxpool5 + fc, + ), + ) + self.extra = extra + + def forward(self, x: Tensor) -> Dict[str, Tensor]: + # L2 regularization + Rescaling of 1st block's feature map + x = self.features(x) + rescaled = self.scale_weight.view(1, -1, 1, 1) * F.normalize(x) + output = [rescaled] + + # Calculating Feature maps for the rest blocks + for block in self.extra: + x = block(x) + output.append(x) + + return OrderedDict([(str(i), v) for i, v in enumerate(output)]) + + +def _vgg_extractor(backbone: VGG, highres: bool, trainable_layers: int): + backbone = backbone.features + # Gather the indices of maxpools. These are the locations of output blocks. + stage_indices = [0] + [i for i, b in enumerate(backbone) if isinstance(b, nn.MaxPool2d)][:-1] + num_stages = len(stage_indices) + + # find the index of the layer from which we won't freeze + torch._assert( + 0 <= trainable_layers <= num_stages, + f"trainable_layers should be in the range [0, {num_stages}]. Instead got {trainable_layers}", + ) + freeze_before = len(backbone) if trainable_layers == 0 else stage_indices[num_stages - trainable_layers] + + for b in backbone[:freeze_before]: + for parameter in b.parameters(): + parameter.requires_grad_(False) + + return SSDFeatureExtractorVGG(backbone, highres) + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", SSD300_VGG16_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", VGG16_Weights.IMAGENET1K_FEATURES), +) +def ssd300_vgg16( + *, + weights: Optional[SSD300_VGG16_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[VGG16_Weights] = VGG16_Weights.IMAGENET1K_FEATURES, + trainable_backbone_layers: Optional[int] = None, + **kwargs: Any, +) -> SSD: + """The SSD300 model is based on the `SSD: Single Shot MultiBox Detector + `_ paper. + + .. betastatus:: detection module + + The input to the model is expected to be a list of tensors, each of shape [C, H, W], one for each + image, and should be in 0-1 range. Different images can have different sizes, but they will be resized + to a fixed size before passing it to the backbone. + + The behavior of the model changes depending on if it is in training or evaluation mode. + + During training, the model expects both the input tensors and targets (list of dictionary), + containing: + + - boxes (``FloatTensor[N, 4]``): the ground-truth boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the class label for each ground-truth box + + The model returns a Dict[Tensor] during training, containing the classification and regression + losses. + + During inference, the model requires only the input tensors, and returns the post-processed + predictions as a List[Dict[Tensor]], one for each input image. The fields of the Dict are as + follows, where ``N`` is the number of detections: + + - boxes (``FloatTensor[N, 4]``): the predicted boxes in ``[x1, y1, x2, y2]`` format, with + ``0 <= x1 < x2 <= W`` and ``0 <= y1 < y2 <= H``. + - labels (Int64Tensor[N]): the predicted labels for each detection + - scores (Tensor[N]): the scores for each detection + + Example: + + >>> model = torchvision.models.detection.ssd300_vgg16(weights=SSD300_VGG16_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 300, 300), torch.rand(3, 500, 400)] + >>> predictions = model(x) + + Args: + weights (:class:`~torchvision.models.detection.SSD300_VGG16_Weights`, optional): The pretrained + weights to use. See + :class:`~torchvision.models.detection.SSD300_VGG16_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr + Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + weights_backbone (:class:`~torchvision.models.VGG16_Weights`, optional): The pretrained weights for the + backbone + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers starting from final block. + Valid values are between 0 and 5, with 5 meaning all backbone layers are trainable. If ``None`` is + passed (the default) this value is set to 4. + **kwargs: parameters passed to the ``torchvision.models.detection.SSD`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.SSD300_VGG16_Weights + :members: + """ + weights = SSD300_VGG16_Weights.verify(weights) + weights_backbone = VGG16_Weights.verify(weights_backbone) + + if "size" in kwargs: + warnings.warn("The size of the model is already fixed; ignoring the parameter.") + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + trainable_backbone_layers = _validate_trainable_layers( + weights is not None or weights_backbone is not None, trainable_backbone_layers, 5, 4 + ) + + # Use custom backbones more appropriate for SSD + backbone = vgg16(weights=weights_backbone, progress=progress) + backbone = _vgg_extractor(backbone, False, trainable_backbone_layers) + anchor_generator = DefaultBoxGenerator( + [[2], [2, 3], [2, 3], [2, 3], [2], [2]], + scales=[0.07, 0.15, 0.33, 0.51, 0.69, 0.87, 1.05], + steps=[8, 16, 32, 64, 100, 300], + ) + + defaults = { + # Rescale the input in a way compatible to the backbone + "image_mean": [0.48235, 0.45882, 0.40784], + "image_std": [1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0], # undo the 0-1 scaling of toTensor + } + kwargs: Any = {**defaults, **kwargs} + model = SSD(backbone, anchor_generator, (300, 300), num_classes, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/ssdlite.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/ssdlite.py new file mode 100644 index 0000000000000000000000000000000000000000..0224feaf6931b3edfbded9b9bb23e5f76689fc69 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/ssdlite.py @@ -0,0 +1,331 @@ +import warnings +from collections import OrderedDict +from functools import partial +from typing import Any, Callable, Dict, List, Optional, Union + +import torch +from torch import nn, Tensor + +from ...ops.misc import Conv2dNormActivation +from ...transforms._presets import ObjectDetection +from ...utils import _log_api_usage_once +from .. import mobilenet +from .._api import register_model, Weights, WeightsEnum +from .._meta import _COCO_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface +from ..mobilenetv3 import mobilenet_v3_large, MobileNet_V3_Large_Weights +from . import _utils as det_utils +from .anchor_utils import DefaultBoxGenerator +from .backbone_utils import _validate_trainable_layers +from .ssd import SSD, SSDScoringHead + + +__all__ = [ + "SSDLite320_MobileNet_V3_Large_Weights", + "ssdlite320_mobilenet_v3_large", +] + + +# Building blocks of SSDlite as described in section 6.2 of MobileNetV2 paper +def _prediction_block( + in_channels: int, out_channels: int, kernel_size: int, norm_layer: Callable[..., nn.Module] +) -> nn.Sequential: + return nn.Sequential( + # 3x3 depthwise with stride 1 and padding 1 + Conv2dNormActivation( + in_channels, + in_channels, + kernel_size=kernel_size, + groups=in_channels, + norm_layer=norm_layer, + activation_layer=nn.ReLU6, + ), + # 1x1 projetion to output channels + nn.Conv2d(in_channels, out_channels, 1), + ) + + +def _extra_block(in_channels: int, out_channels: int, norm_layer: Callable[..., nn.Module]) -> nn.Sequential: + activation = nn.ReLU6 + intermediate_channels = out_channels // 2 + return nn.Sequential( + # 1x1 projection to half output channels + Conv2dNormActivation( + in_channels, intermediate_channels, kernel_size=1, norm_layer=norm_layer, activation_layer=activation + ), + # 3x3 depthwise with stride 2 and padding 1 + Conv2dNormActivation( + intermediate_channels, + intermediate_channels, + kernel_size=3, + stride=2, + groups=intermediate_channels, + norm_layer=norm_layer, + activation_layer=activation, + ), + # 1x1 projetion to output channels + Conv2dNormActivation( + intermediate_channels, out_channels, kernel_size=1, norm_layer=norm_layer, activation_layer=activation + ), + ) + + +def _normal_init(conv: nn.Module): + for layer in conv.modules(): + if isinstance(layer, nn.Conv2d): + torch.nn.init.normal_(layer.weight, mean=0.0, std=0.03) + if layer.bias is not None: + torch.nn.init.constant_(layer.bias, 0.0) + + +class SSDLiteHead(nn.Module): + def __init__( + self, in_channels: List[int], num_anchors: List[int], num_classes: int, norm_layer: Callable[..., nn.Module] + ): + super().__init__() + self.classification_head = SSDLiteClassificationHead(in_channels, num_anchors, num_classes, norm_layer) + self.regression_head = SSDLiteRegressionHead(in_channels, num_anchors, norm_layer) + + def forward(self, x: List[Tensor]) -> Dict[str, Tensor]: + return { + "bbox_regression": self.regression_head(x), + "cls_logits": self.classification_head(x), + } + + +class SSDLiteClassificationHead(SSDScoringHead): + def __init__( + self, in_channels: List[int], num_anchors: List[int], num_classes: int, norm_layer: Callable[..., nn.Module] + ): + cls_logits = nn.ModuleList() + for channels, anchors in zip(in_channels, num_anchors): + cls_logits.append(_prediction_block(channels, num_classes * anchors, 3, norm_layer)) + _normal_init(cls_logits) + super().__init__(cls_logits, num_classes) + + +class SSDLiteRegressionHead(SSDScoringHead): + def __init__(self, in_channels: List[int], num_anchors: List[int], norm_layer: Callable[..., nn.Module]): + bbox_reg = nn.ModuleList() + for channels, anchors in zip(in_channels, num_anchors): + bbox_reg.append(_prediction_block(channels, 4 * anchors, 3, norm_layer)) + _normal_init(bbox_reg) + super().__init__(bbox_reg, 4) + + +class SSDLiteFeatureExtractorMobileNet(nn.Module): + def __init__( + self, + backbone: nn.Module, + c4_pos: int, + norm_layer: Callable[..., nn.Module], + width_mult: float = 1.0, + min_depth: int = 16, + ): + super().__init__() + _log_api_usage_once(self) + + if backbone[c4_pos].use_res_connect: + raise ValueError("backbone[c4_pos].use_res_connect should be False") + + self.features = nn.Sequential( + # As described in section 6.3 of MobileNetV3 paper + nn.Sequential(*backbone[:c4_pos], backbone[c4_pos].block[0]), # from start until C4 expansion layer + nn.Sequential(backbone[c4_pos].block[1:], *backbone[c4_pos + 1 :]), # from C4 depthwise until end + ) + + get_depth = lambda d: max(min_depth, int(d * width_mult)) # noqa: E731 + extra = nn.ModuleList( + [ + _extra_block(backbone[-1].out_channels, get_depth(512), norm_layer), + _extra_block(get_depth(512), get_depth(256), norm_layer), + _extra_block(get_depth(256), get_depth(256), norm_layer), + _extra_block(get_depth(256), get_depth(128), norm_layer), + ] + ) + _normal_init(extra) + + self.extra = extra + + def forward(self, x: Tensor) -> Dict[str, Tensor]: + # Get feature maps from backbone and extra. Can't be refactored due to JIT limitations. + output = [] + for block in self.features: + x = block(x) + output.append(x) + + for block in self.extra: + x = block(x) + output.append(x) + + return OrderedDict([(str(i), v) for i, v in enumerate(output)]) + + +def _mobilenet_extractor( + backbone: Union[mobilenet.MobileNetV2, mobilenet.MobileNetV3], + trainable_layers: int, + norm_layer: Callable[..., nn.Module], +): + backbone = backbone.features + # Gather the indices of blocks which are strided. These are the locations of C1, ..., Cn-1 blocks. + # The first and last blocks are always included because they are the C0 (conv1) and Cn. + stage_indices = [0] + [i for i, b in enumerate(backbone) if getattr(b, "_is_cn", False)] + [len(backbone) - 1] + num_stages = len(stage_indices) + + # find the index of the layer from which we won't freeze + if not 0 <= trainable_layers <= num_stages: + raise ValueError("trainable_layers should be in the range [0, {num_stages}], instead got {trainable_layers}") + freeze_before = len(backbone) if trainable_layers == 0 else stage_indices[num_stages - trainable_layers] + + for b in backbone[:freeze_before]: + for parameter in b.parameters(): + parameter.requires_grad_(False) + + return SSDLiteFeatureExtractorMobileNet(backbone, stage_indices[-2], norm_layer) + + +class SSDLite320_MobileNet_V3_Large_Weights(WeightsEnum): + COCO_V1 = Weights( + url="https://download.pytorch.org/models/ssdlite320_mobilenet_v3_large_coco-a79551df.pth", + transforms=ObjectDetection, + meta={ + "num_params": 3440060, + "categories": _COCO_CATEGORIES, + "min_size": (1, 1), + "recipe": "https://github.com/pytorch/vision/tree/main/references/detection#ssdlite320-mobilenetv3-large", + "_metrics": { + "COCO-val2017": { + "box_map": 21.3, + } + }, + "_ops": 0.583, + "_file_size": 13.418, + "_docs": """These weights were produced by following a similar training recipe as on the paper.""", + }, + ) + DEFAULT = COCO_V1 + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", SSDLite320_MobileNet_V3_Large_Weights.COCO_V1), + weights_backbone=("pretrained_backbone", MobileNet_V3_Large_Weights.IMAGENET1K_V1), +) +def ssdlite320_mobilenet_v3_large( + *, + weights: Optional[SSDLite320_MobileNet_V3_Large_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[MobileNet_V3_Large_Weights] = MobileNet_V3_Large_Weights.IMAGENET1K_V1, + trainable_backbone_layers: Optional[int] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + **kwargs: Any, +) -> SSD: + """SSDlite model architecture with input size 320x320 and a MobileNetV3 Large backbone, as + described at `Searching for MobileNetV3 `__ and + `MobileNetV2: Inverted Residuals and Linear Bottlenecks `__. + + .. betastatus:: detection module + + See :func:`~torchvision.models.detection.ssd300_vgg16` for more details. + + Example: + + >>> model = torchvision.models.detection.ssdlite320_mobilenet_v3_large(weights=SSDLite320_MobileNet_V3_Large_Weights.DEFAULT) + >>> model.eval() + >>> x = [torch.rand(3, 320, 320), torch.rand(3, 500, 400)] + >>> predictions = model(x) + + Args: + weights (:class:`~torchvision.models.detection.SSDLite320_MobileNet_V3_Large_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.detection.SSDLite320_MobileNet_V3_Large_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model + (including the background). + weights_backbone (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The pretrained + weights for the backbone. + trainable_backbone_layers (int, optional): number of trainable (not frozen) layers + starting from final block. Valid values are between 0 and 6, with 6 meaning all + backbone layers are trainable. If ``None`` is passed (the default) this value is + set to 6. + norm_layer (callable, optional): Module specifying the normalization layer to use. + **kwargs: parameters passed to the ``torchvision.models.detection.ssd.SSD`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.detection.SSDLite320_MobileNet_V3_Large_Weights + :members: + """ + + weights = SSDLite320_MobileNet_V3_Large_Weights.verify(weights) + weights_backbone = MobileNet_V3_Large_Weights.verify(weights_backbone) + + if "size" in kwargs: + warnings.warn("The size of the model is already fixed; ignoring the parameter.") + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 91 + + trainable_backbone_layers = _validate_trainable_layers( + weights is not None or weights_backbone is not None, trainable_backbone_layers, 6, 6 + ) + + # Enable reduced tail if no pretrained backbone is selected. See Table 6 of MobileNetV3 paper. + reduce_tail = weights_backbone is None + + if norm_layer is None: + norm_layer = partial(nn.BatchNorm2d, eps=0.001, momentum=0.03) + + backbone = mobilenet_v3_large( + weights=weights_backbone, progress=progress, norm_layer=norm_layer, reduced_tail=reduce_tail, **kwargs + ) + if weights_backbone is None: + # Change the default initialization scheme if not pretrained + _normal_init(backbone) + backbone = _mobilenet_extractor( + backbone, + trainable_backbone_layers, + norm_layer, + ) + + size = (320, 320) + anchor_generator = DefaultBoxGenerator([[2, 3] for _ in range(6)], min_ratio=0.2, max_ratio=0.95) + out_channels = det_utils.retrieve_out_channels(backbone, size) + num_anchors = anchor_generator.num_anchors_per_location() + if len(out_channels) != len(anchor_generator.aspect_ratios): + raise ValueError( + f"The length of the output channels from the backbone {len(out_channels)} do not match the length of the anchor generator aspect ratios {len(anchor_generator.aspect_ratios)}" + ) + + defaults = { + "score_thresh": 0.001, + "nms_thresh": 0.55, + "detections_per_img": 300, + "topk_candidates": 300, + # Rescale the input in a way compatible to the backbone: + # The following mean/std rescale the data from [0, 1] to [-1, 1] + "image_mean": [0.5, 0.5, 0.5], + "image_std": [0.5, 0.5, 0.5], + } + kwargs: Any = {**defaults, **kwargs} + model = SSD( + backbone, + anchor_generator, + size, + num_classes, + head=SSDLiteHead(out_channels, num_anchors, num_classes, norm_layer), + **kwargs, + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/transform.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/transform.py new file mode 100644 index 0000000000000000000000000000000000000000..45f06529227082d2e1a854a9467b0d9c9a36fee9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/detection/transform.py @@ -0,0 +1,319 @@ +import math +from typing import Any, Dict, List, Optional, Tuple + +import torch +import torchvision +from torch import nn, Tensor + +from .image_list import ImageList +from .roi_heads import paste_masks_in_image + + +@torch.jit.unused +def _get_shape_onnx(image: Tensor) -> Tensor: + from torch.onnx import operators + + return operators.shape_as_tensor(image)[-2:] + + +@torch.jit.unused +def _fake_cast_onnx(v: Tensor) -> float: + # ONNX requires a tensor but here we fake its type for JIT. + return v + + +def _resize_image_and_masks( + image: Tensor, + self_min_size: int, + self_max_size: int, + target: Optional[Dict[str, Tensor]] = None, + fixed_size: Optional[Tuple[int, int]] = None, +) -> Tuple[Tensor, Optional[Dict[str, Tensor]]]: + if torchvision._is_tracing(): + im_shape = _get_shape_onnx(image) + elif torch.jit.is_scripting(): + im_shape = torch.tensor(image.shape[-2:]) + else: + im_shape = image.shape[-2:] + + size: Optional[List[int]] = None + scale_factor: Optional[float] = None + recompute_scale_factor: Optional[bool] = None + if fixed_size is not None: + size = [fixed_size[1], fixed_size[0]] + else: + if torch.jit.is_scripting() or torchvision._is_tracing(): + min_size = torch.min(im_shape).to(dtype=torch.float32) + max_size = torch.max(im_shape).to(dtype=torch.float32) + self_min_size_f = float(self_min_size) + self_max_size_f = float(self_max_size) + scale = torch.min(self_min_size_f / min_size, self_max_size_f / max_size) + + if torchvision._is_tracing(): + scale_factor = _fake_cast_onnx(scale) + else: + scale_factor = scale.item() + + else: + # Do it the normal way + min_size = min(im_shape) + max_size = max(im_shape) + scale_factor = min(self_min_size / min_size, self_max_size / max_size) + + recompute_scale_factor = True + + image = torch.nn.functional.interpolate( + image[None], + size=size, + scale_factor=scale_factor, + mode="bilinear", + recompute_scale_factor=recompute_scale_factor, + align_corners=False, + )[0] + + if target is None: + return image, target + + if "masks" in target: + mask = target["masks"] + mask = torch.nn.functional.interpolate( + mask[:, None].float(), size=size, scale_factor=scale_factor, recompute_scale_factor=recompute_scale_factor + )[:, 0].byte() + target["masks"] = mask + return image, target + + +class GeneralizedRCNNTransform(nn.Module): + """ + Performs input / target transformation before feeding the data to a GeneralizedRCNN + model. + + The transformations it performs are: + - input normalization (mean subtraction and std division) + - input / target resizing to match min_size / max_size + + It returns a ImageList for the inputs, and a List[Dict[Tensor]] for the targets + """ + + def __init__( + self, + min_size: int, + max_size: int, + image_mean: List[float], + image_std: List[float], + size_divisible: int = 32, + fixed_size: Optional[Tuple[int, int]] = None, + **kwargs: Any, + ): + super().__init__() + if not isinstance(min_size, (list, tuple)): + min_size = (min_size,) + self.min_size = min_size + self.max_size = max_size + self.image_mean = image_mean + self.image_std = image_std + self.size_divisible = size_divisible + self.fixed_size = fixed_size + self._skip_resize = kwargs.pop("_skip_resize", False) + + def forward( + self, images: List[Tensor], targets: Optional[List[Dict[str, Tensor]]] = None + ) -> Tuple[ImageList, Optional[List[Dict[str, Tensor]]]]: + images = [img for img in images] + if targets is not None: + # make a copy of targets to avoid modifying it in-place + # once torchscript supports dict comprehension + # this can be simplified as follows + # targets = [{k: v for k,v in t.items()} for t in targets] + targets_copy: List[Dict[str, Tensor]] = [] + for t in targets: + data: Dict[str, Tensor] = {} + for k, v in t.items(): + data[k] = v + targets_copy.append(data) + targets = targets_copy + for i in range(len(images)): + image = images[i] + target_index = targets[i] if targets is not None else None + + if image.dim() != 3: + raise ValueError(f"images is expected to be a list of 3d tensors of shape [C, H, W], got {image.shape}") + image = self.normalize(image) + image, target_index = self.resize(image, target_index) + images[i] = image + if targets is not None and target_index is not None: + targets[i] = target_index + + image_sizes = [img.shape[-2:] for img in images] + images = self.batch_images(images, size_divisible=self.size_divisible) + image_sizes_list: List[Tuple[int, int]] = [] + for image_size in image_sizes: + torch._assert( + len(image_size) == 2, + f"Input tensors expected to have in the last two elements H and W, instead got {image_size}", + ) + image_sizes_list.append((image_size[0], image_size[1])) + + image_list = ImageList(images, image_sizes_list) + return image_list, targets + + def normalize(self, image: Tensor) -> Tensor: + if not image.is_floating_point(): + raise TypeError( + f"Expected input images to be of floating type (in range [0, 1]), " + f"but found type {image.dtype} instead" + ) + dtype, device = image.dtype, image.device + mean = torch.as_tensor(self.image_mean, dtype=dtype, device=device) + std = torch.as_tensor(self.image_std, dtype=dtype, device=device) + return (image - mean[:, None, None]) / std[:, None, None] + + def torch_choice(self, k: List[int]) -> int: + """ + Implements `random.choice` via torch ops, so it can be compiled with + TorchScript and we use PyTorch's RNG (not native RNG) + """ + index = int(torch.empty(1).uniform_(0.0, float(len(k))).item()) + return k[index] + + def resize( + self, + image: Tensor, + target: Optional[Dict[str, Tensor]] = None, + ) -> Tuple[Tensor, Optional[Dict[str, Tensor]]]: + h, w = image.shape[-2:] + if self.training: + if self._skip_resize: + return image, target + size = self.torch_choice(self.min_size) + else: + size = self.min_size[-1] + image, target = _resize_image_and_masks(image, size, self.max_size, target, self.fixed_size) + + if target is None: + return image, target + + bbox = target["boxes"] + bbox = resize_boxes(bbox, (h, w), image.shape[-2:]) + target["boxes"] = bbox + + if "keypoints" in target: + keypoints = target["keypoints"] + keypoints = resize_keypoints(keypoints, (h, w), image.shape[-2:]) + target["keypoints"] = keypoints + return image, target + + # _onnx_batch_images() is an implementation of + # batch_images() that is supported by ONNX tracing. + @torch.jit.unused + def _onnx_batch_images(self, images: List[Tensor], size_divisible: int = 32) -> Tensor: + max_size = [] + for i in range(images[0].dim()): + max_size_i = torch.max(torch.stack([img.shape[i] for img in images]).to(torch.float32)).to(torch.int64) + max_size.append(max_size_i) + stride = size_divisible + max_size[1] = (torch.ceil((max_size[1].to(torch.float32)) / stride) * stride).to(torch.int64) + max_size[2] = (torch.ceil((max_size[2].to(torch.float32)) / stride) * stride).to(torch.int64) + max_size = tuple(max_size) + + # work around for + # pad_img[: img.shape[0], : img.shape[1], : img.shape[2]].copy_(img) + # which is not yet supported in onnx + padded_imgs = [] + for img in images: + padding = [(s1 - s2) for s1, s2 in zip(max_size, tuple(img.shape))] + padded_img = torch.nn.functional.pad(img, (0, padding[2], 0, padding[1], 0, padding[0])) + padded_imgs.append(padded_img) + + return torch.stack(padded_imgs) + + def max_by_axis(self, the_list: List[List[int]]) -> List[int]: + maxes = the_list[0] + for sublist in the_list[1:]: + for index, item in enumerate(sublist): + maxes[index] = max(maxes[index], item) + return maxes + + def batch_images(self, images: List[Tensor], size_divisible: int = 32) -> Tensor: + if torchvision._is_tracing(): + # batch_images() does not export well to ONNX + # call _onnx_batch_images() instead + return self._onnx_batch_images(images, size_divisible) + + max_size = self.max_by_axis([list(img.shape) for img in images]) + stride = float(size_divisible) + max_size = list(max_size) + max_size[1] = int(math.ceil(float(max_size[1]) / stride) * stride) + max_size[2] = int(math.ceil(float(max_size[2]) / stride) * stride) + + batch_shape = [len(images)] + max_size + batched_imgs = images[0].new_full(batch_shape, 0) + for i in range(batched_imgs.shape[0]): + img = images[i] + batched_imgs[i, : img.shape[0], : img.shape[1], : img.shape[2]].copy_(img) + + return batched_imgs + + def postprocess( + self, + result: List[Dict[str, Tensor]], + image_shapes: List[Tuple[int, int]], + original_image_sizes: List[Tuple[int, int]], + ) -> List[Dict[str, Tensor]]: + if self.training: + return result + for i, (pred, im_s, o_im_s) in enumerate(zip(result, image_shapes, original_image_sizes)): + boxes = pred["boxes"] + boxes = resize_boxes(boxes, im_s, o_im_s) + result[i]["boxes"] = boxes + if "masks" in pred: + masks = pred["masks"] + masks = paste_masks_in_image(masks, boxes, o_im_s) + result[i]["masks"] = masks + if "keypoints" in pred: + keypoints = pred["keypoints"] + keypoints = resize_keypoints(keypoints, im_s, o_im_s) + result[i]["keypoints"] = keypoints + return result + + def __repr__(self) -> str: + format_string = f"{self.__class__.__name__}(" + _indent = "\n " + format_string += f"{_indent}Normalize(mean={self.image_mean}, std={self.image_std})" + format_string += f"{_indent}Resize(min_size={self.min_size}, max_size={self.max_size}, mode='bilinear')" + format_string += "\n)" + return format_string + + +def resize_keypoints(keypoints: Tensor, original_size: List[int], new_size: List[int]) -> Tensor: + ratios = [ + torch.tensor(s, dtype=torch.float32, device=keypoints.device) + / torch.tensor(s_orig, dtype=torch.float32, device=keypoints.device) + for s, s_orig in zip(new_size, original_size) + ] + ratio_h, ratio_w = ratios + resized_data = keypoints.clone() + if torch._C._get_tracing_state(): + resized_data_0 = resized_data[:, :, 0] * ratio_w + resized_data_1 = resized_data[:, :, 1] * ratio_h + resized_data = torch.stack((resized_data_0, resized_data_1, resized_data[:, :, 2]), dim=2) + else: + resized_data[..., 0] *= ratio_w + resized_data[..., 1] *= ratio_h + return resized_data + + +def resize_boxes(boxes: Tensor, original_size: List[int], new_size: List[int]) -> Tensor: + ratios = [ + torch.tensor(s, dtype=torch.float32, device=boxes.device) + / torch.tensor(s_orig, dtype=torch.float32, device=boxes.device) + for s, s_orig in zip(new_size, original_size) + ] + ratio_height, ratio_width = ratios + xmin, ymin, xmax, ymax = boxes.unbind(1) + + xmin = xmin * ratio_width + xmax = xmax * ratio_width + ymin = ymin * ratio_height + ymax = ymax * ratio_height + return torch.stack((xmin, ymin, xmax, ymax), dim=1) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/efficientnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/efficientnet.py new file mode 100644 index 0000000000000000000000000000000000000000..b028be3ebd239fd91b145de5ddd297b1150be60c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/efficientnet.py @@ -0,0 +1,1131 @@ +import copy +import math +from dataclasses import dataclass +from functools import partial +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union + +import torch +from torch import nn, Tensor +from torchvision.ops import StochasticDepth + +from ..ops.misc import Conv2dNormActivation, SqueezeExcitation +from ..transforms._presets import ImageClassification, InterpolationMode +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _make_divisible, _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "EfficientNet", + "EfficientNet_B0_Weights", + "EfficientNet_B1_Weights", + "EfficientNet_B2_Weights", + "EfficientNet_B3_Weights", + "EfficientNet_B4_Weights", + "EfficientNet_B5_Weights", + "EfficientNet_B6_Weights", + "EfficientNet_B7_Weights", + "EfficientNet_V2_S_Weights", + "EfficientNet_V2_M_Weights", + "EfficientNet_V2_L_Weights", + "efficientnet_b0", + "efficientnet_b1", + "efficientnet_b2", + "efficientnet_b3", + "efficientnet_b4", + "efficientnet_b5", + "efficientnet_b6", + "efficientnet_b7", + "efficientnet_v2_s", + "efficientnet_v2_m", + "efficientnet_v2_l", +] + + +@dataclass +class _MBConvConfig: + expand_ratio: float + kernel: int + stride: int + input_channels: int + out_channels: int + num_layers: int + block: Callable[..., nn.Module] + + @staticmethod + def adjust_channels(channels: int, width_mult: float, min_value: Optional[int] = None) -> int: + return _make_divisible(channels * width_mult, 8, min_value) + + +class MBConvConfig(_MBConvConfig): + # Stores information listed at Table 1 of the EfficientNet paper & Table 4 of the EfficientNetV2 paper + def __init__( + self, + expand_ratio: float, + kernel: int, + stride: int, + input_channels: int, + out_channels: int, + num_layers: int, + width_mult: float = 1.0, + depth_mult: float = 1.0, + block: Optional[Callable[..., nn.Module]] = None, + ) -> None: + input_channels = self.adjust_channels(input_channels, width_mult) + out_channels = self.adjust_channels(out_channels, width_mult) + num_layers = self.adjust_depth(num_layers, depth_mult) + if block is None: + block = MBConv + super().__init__(expand_ratio, kernel, stride, input_channels, out_channels, num_layers, block) + + @staticmethod + def adjust_depth(num_layers: int, depth_mult: float): + return int(math.ceil(num_layers * depth_mult)) + + +class FusedMBConvConfig(_MBConvConfig): + # Stores information listed at Table 4 of the EfficientNetV2 paper + def __init__( + self, + expand_ratio: float, + kernel: int, + stride: int, + input_channels: int, + out_channels: int, + num_layers: int, + block: Optional[Callable[..., nn.Module]] = None, + ) -> None: + if block is None: + block = FusedMBConv + super().__init__(expand_ratio, kernel, stride, input_channels, out_channels, num_layers, block) + + +class MBConv(nn.Module): + def __init__( + self, + cnf: MBConvConfig, + stochastic_depth_prob: float, + norm_layer: Callable[..., nn.Module], + se_layer: Callable[..., nn.Module] = SqueezeExcitation, + ) -> None: + super().__init__() + + if not (1 <= cnf.stride <= 2): + raise ValueError("illegal stride value") + + self.use_res_connect = cnf.stride == 1 and cnf.input_channels == cnf.out_channels + + layers: List[nn.Module] = [] + activation_layer = nn.SiLU + + # expand + expanded_channels = cnf.adjust_channels(cnf.input_channels, cnf.expand_ratio) + if expanded_channels != cnf.input_channels: + layers.append( + Conv2dNormActivation( + cnf.input_channels, + expanded_channels, + kernel_size=1, + norm_layer=norm_layer, + activation_layer=activation_layer, + ) + ) + + # depthwise + layers.append( + Conv2dNormActivation( + expanded_channels, + expanded_channels, + kernel_size=cnf.kernel, + stride=cnf.stride, + groups=expanded_channels, + norm_layer=norm_layer, + activation_layer=activation_layer, + ) + ) + + # squeeze and excitation + squeeze_channels = max(1, cnf.input_channels // 4) + layers.append(se_layer(expanded_channels, squeeze_channels, activation=partial(nn.SiLU, inplace=True))) + + # project + layers.append( + Conv2dNormActivation( + expanded_channels, cnf.out_channels, kernel_size=1, norm_layer=norm_layer, activation_layer=None + ) + ) + + self.block = nn.Sequential(*layers) + self.stochastic_depth = StochasticDepth(stochastic_depth_prob, "row") + self.out_channels = cnf.out_channels + + def forward(self, input: Tensor) -> Tensor: + result = self.block(input) + if self.use_res_connect: + result = self.stochastic_depth(result) + result += input + return result + + +class FusedMBConv(nn.Module): + def __init__( + self, + cnf: FusedMBConvConfig, + stochastic_depth_prob: float, + norm_layer: Callable[..., nn.Module], + ) -> None: + super().__init__() + + if not (1 <= cnf.stride <= 2): + raise ValueError("illegal stride value") + + self.use_res_connect = cnf.stride == 1 and cnf.input_channels == cnf.out_channels + + layers: List[nn.Module] = [] + activation_layer = nn.SiLU + + expanded_channels = cnf.adjust_channels(cnf.input_channels, cnf.expand_ratio) + if expanded_channels != cnf.input_channels: + # fused expand + layers.append( + Conv2dNormActivation( + cnf.input_channels, + expanded_channels, + kernel_size=cnf.kernel, + stride=cnf.stride, + norm_layer=norm_layer, + activation_layer=activation_layer, + ) + ) + + # project + layers.append( + Conv2dNormActivation( + expanded_channels, cnf.out_channels, kernel_size=1, norm_layer=norm_layer, activation_layer=None + ) + ) + else: + layers.append( + Conv2dNormActivation( + cnf.input_channels, + cnf.out_channels, + kernel_size=cnf.kernel, + stride=cnf.stride, + norm_layer=norm_layer, + activation_layer=activation_layer, + ) + ) + + self.block = nn.Sequential(*layers) + self.stochastic_depth = StochasticDepth(stochastic_depth_prob, "row") + self.out_channels = cnf.out_channels + + def forward(self, input: Tensor) -> Tensor: + result = self.block(input) + if self.use_res_connect: + result = self.stochastic_depth(result) + result += input + return result + + +class EfficientNet(nn.Module): + def __init__( + self, + inverted_residual_setting: Sequence[Union[MBConvConfig, FusedMBConvConfig]], + dropout: float, + stochastic_depth_prob: float = 0.2, + num_classes: int = 1000, + norm_layer: Optional[Callable[..., nn.Module]] = None, + last_channel: Optional[int] = None, + ) -> None: + """ + EfficientNet V1 and V2 main class + + Args: + inverted_residual_setting (Sequence[Union[MBConvConfig, FusedMBConvConfig]]): Network structure + dropout (float): The droupout probability + stochastic_depth_prob (float): The stochastic depth probability + num_classes (int): Number of classes + norm_layer (Optional[Callable[..., nn.Module]]): Module specifying the normalization layer to use + last_channel (int): The number of channels on the penultimate layer + """ + super().__init__() + _log_api_usage_once(self) + + if not inverted_residual_setting: + raise ValueError("The inverted_residual_setting should not be empty") + elif not ( + isinstance(inverted_residual_setting, Sequence) + and all([isinstance(s, _MBConvConfig) for s in inverted_residual_setting]) + ): + raise TypeError("The inverted_residual_setting should be List[MBConvConfig]") + + if norm_layer is None: + norm_layer = nn.BatchNorm2d + + layers: List[nn.Module] = [] + + # building first layer + firstconv_output_channels = inverted_residual_setting[0].input_channels + layers.append( + Conv2dNormActivation( + 3, firstconv_output_channels, kernel_size=3, stride=2, norm_layer=norm_layer, activation_layer=nn.SiLU + ) + ) + + # building inverted residual blocks + total_stage_blocks = sum(cnf.num_layers for cnf in inverted_residual_setting) + stage_block_id = 0 + for cnf in inverted_residual_setting: + stage: List[nn.Module] = [] + for _ in range(cnf.num_layers): + # copy to avoid modifications. shallow copy is enough + block_cnf = copy.copy(cnf) + + # overwrite info if not the first conv in the stage + if stage: + block_cnf.input_channels = block_cnf.out_channels + block_cnf.stride = 1 + + # adjust stochastic depth probability based on the depth of the stage block + sd_prob = stochastic_depth_prob * float(stage_block_id) / total_stage_blocks + + stage.append(block_cnf.block(block_cnf, sd_prob, norm_layer)) + stage_block_id += 1 + + layers.append(nn.Sequential(*stage)) + + # building last several layers + lastconv_input_channels = inverted_residual_setting[-1].out_channels + lastconv_output_channels = last_channel if last_channel is not None else 4 * lastconv_input_channels + layers.append( + Conv2dNormActivation( + lastconv_input_channels, + lastconv_output_channels, + kernel_size=1, + norm_layer=norm_layer, + activation_layer=nn.SiLU, + ) + ) + + self.features = nn.Sequential(*layers) + self.avgpool = nn.AdaptiveAvgPool2d(1) + self.classifier = nn.Sequential( + nn.Dropout(p=dropout, inplace=True), + nn.Linear(lastconv_output_channels, num_classes), + ) + + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out") + if m.bias is not None: + nn.init.zeros_(m.bias) + elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)): + nn.init.ones_(m.weight) + nn.init.zeros_(m.bias) + elif isinstance(m, nn.Linear): + init_range = 1.0 / math.sqrt(m.out_features) + nn.init.uniform_(m.weight, -init_range, init_range) + nn.init.zeros_(m.bias) + + def _forward_impl(self, x: Tensor) -> Tensor: + x = self.features(x) + + x = self.avgpool(x) + x = torch.flatten(x, 1) + + x = self.classifier(x) + + return x + + def forward(self, x: Tensor) -> Tensor: + return self._forward_impl(x) + + +def _efficientnet( + inverted_residual_setting: Sequence[Union[MBConvConfig, FusedMBConvConfig]], + dropout: float, + last_channel: Optional[int], + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> EfficientNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = EfficientNet(inverted_residual_setting, dropout, last_channel=last_channel, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +def _efficientnet_conf( + arch: str, + **kwargs: Any, +) -> Tuple[Sequence[Union[MBConvConfig, FusedMBConvConfig]], Optional[int]]: + inverted_residual_setting: Sequence[Union[MBConvConfig, FusedMBConvConfig]] + if arch.startswith("efficientnet_b"): + bneck_conf = partial(MBConvConfig, width_mult=kwargs.pop("width_mult"), depth_mult=kwargs.pop("depth_mult")) + inverted_residual_setting = [ + bneck_conf(1, 3, 1, 32, 16, 1), + bneck_conf(6, 3, 2, 16, 24, 2), + bneck_conf(6, 5, 2, 24, 40, 2), + bneck_conf(6, 3, 2, 40, 80, 3), + bneck_conf(6, 5, 1, 80, 112, 3), + bneck_conf(6, 5, 2, 112, 192, 4), + bneck_conf(6, 3, 1, 192, 320, 1), + ] + last_channel = None + elif arch.startswith("efficientnet_v2_s"): + inverted_residual_setting = [ + FusedMBConvConfig(1, 3, 1, 24, 24, 2), + FusedMBConvConfig(4, 3, 2, 24, 48, 4), + FusedMBConvConfig(4, 3, 2, 48, 64, 4), + MBConvConfig(4, 3, 2, 64, 128, 6), + MBConvConfig(6, 3, 1, 128, 160, 9), + MBConvConfig(6, 3, 2, 160, 256, 15), + ] + last_channel = 1280 + elif arch.startswith("efficientnet_v2_m"): + inverted_residual_setting = [ + FusedMBConvConfig(1, 3, 1, 24, 24, 3), + FusedMBConvConfig(4, 3, 2, 24, 48, 5), + FusedMBConvConfig(4, 3, 2, 48, 80, 5), + MBConvConfig(4, 3, 2, 80, 160, 7), + MBConvConfig(6, 3, 1, 160, 176, 14), + MBConvConfig(6, 3, 2, 176, 304, 18), + MBConvConfig(6, 3, 1, 304, 512, 5), + ] + last_channel = 1280 + elif arch.startswith("efficientnet_v2_l"): + inverted_residual_setting = [ + FusedMBConvConfig(1, 3, 1, 32, 32, 4), + FusedMBConvConfig(4, 3, 2, 32, 64, 7), + FusedMBConvConfig(4, 3, 2, 64, 96, 7), + MBConvConfig(4, 3, 2, 96, 192, 10), + MBConvConfig(6, 3, 1, 192, 224, 19), + MBConvConfig(6, 3, 2, 224, 384, 25), + MBConvConfig(6, 3, 1, 384, 640, 7), + ] + last_channel = 1280 + else: + raise ValueError(f"Unsupported model type {arch}") + + return inverted_residual_setting, last_channel + + +_COMMON_META: Dict[str, Any] = { + "categories": _IMAGENET_CATEGORIES, +} + + +_COMMON_META_V1 = { + **_COMMON_META, + "min_size": (1, 1), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#efficientnet-v1", +} + + +_COMMON_META_V2 = { + **_COMMON_META, + "min_size": (33, 33), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#efficientnet-v2", +} + + +class EfficientNet_B0_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/rwightman/pytorch-image-models/ + url="https://download.pytorch.org/models/efficientnet_b0_rwightman-7f5810bc.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=256, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 5288548, + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.692, + "acc@5": 93.532, + } + }, + "_ops": 0.386, + "_file_size": 20.451, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_B1_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/rwightman/pytorch-image-models/ + url="https://download.pytorch.org/models/efficientnet_b1_rwightman-bac287d4.pth", + transforms=partial( + ImageClassification, crop_size=240, resize_size=256, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 7794184, + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.642, + "acc@5": 94.186, + } + }, + "_ops": 0.687, + "_file_size": 30.134, + "_docs": """These weights are ported from the original paper.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/efficientnet_b1-c27df63c.pth", + transforms=partial( + ImageClassification, crop_size=240, resize_size=255, interpolation=InterpolationMode.BILINEAR + ), + meta={ + **_COMMON_META_V1, + "num_params": 7794184, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-lr-wd-crop-tuning", + "_metrics": { + "ImageNet-1K": { + "acc@1": 79.838, + "acc@5": 94.934, + } + }, + "_ops": 0.687, + "_file_size": 30.136, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class EfficientNet_B2_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/rwightman/pytorch-image-models/ + url="https://download.pytorch.org/models/efficientnet_b2_rwightman-c35c1473.pth", + transforms=partial( + ImageClassification, crop_size=288, resize_size=288, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 9109994, + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.608, + "acc@5": 95.310, + } + }, + "_ops": 1.088, + "_file_size": 35.174, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_B3_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/rwightman/pytorch-image-models/ + url="https://download.pytorch.org/models/efficientnet_b3_rwightman-b3899882.pth", + transforms=partial( + ImageClassification, crop_size=300, resize_size=320, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 12233232, + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.008, + "acc@5": 96.054, + } + }, + "_ops": 1.827, + "_file_size": 47.184, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_B4_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/rwightman/pytorch-image-models/ + url="https://download.pytorch.org/models/efficientnet_b4_rwightman-23ab8bcd.pth", + transforms=partial( + ImageClassification, crop_size=380, resize_size=384, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 19341616, + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.384, + "acc@5": 96.594, + } + }, + "_ops": 4.394, + "_file_size": 74.489, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_B5_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/lukemelas/EfficientNet-PyTorch/ + url="https://download.pytorch.org/models/efficientnet_b5_lukemelas-1a07897c.pth", + transforms=partial( + ImageClassification, crop_size=456, resize_size=456, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 30389784, + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.444, + "acc@5": 96.628, + } + }, + "_ops": 10.266, + "_file_size": 116.864, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_B6_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/lukemelas/EfficientNet-PyTorch/ + url="https://download.pytorch.org/models/efficientnet_b6_lukemelas-24a108a5.pth", + transforms=partial( + ImageClassification, crop_size=528, resize_size=528, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 43040704, + "_metrics": { + "ImageNet-1K": { + "acc@1": 84.008, + "acc@5": 96.916, + } + }, + "_ops": 19.068, + "_file_size": 165.362, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_B7_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/lukemelas/EfficientNet-PyTorch/ + url="https://download.pytorch.org/models/efficientnet_b7_lukemelas-c5b4e57e.pth", + transforms=partial( + ImageClassification, crop_size=600, resize_size=600, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META_V1, + "num_params": 66347960, + "_metrics": { + "ImageNet-1K": { + "acc@1": 84.122, + "acc@5": 96.908, + } + }, + "_ops": 37.746, + "_file_size": 254.675, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_V2_S_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/efficientnet_v2_s-dd5fe13b.pth", + transforms=partial( + ImageClassification, + crop_size=384, + resize_size=384, + interpolation=InterpolationMode.BILINEAR, + ), + meta={ + **_COMMON_META_V2, + "num_params": 21458488, + "_metrics": { + "ImageNet-1K": { + "acc@1": 84.228, + "acc@5": 96.878, + } + }, + "_ops": 8.366, + "_file_size": 82.704, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_V2_M_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/efficientnet_v2_m-dc08266a.pth", + transforms=partial( + ImageClassification, + crop_size=480, + resize_size=480, + interpolation=InterpolationMode.BILINEAR, + ), + meta={ + **_COMMON_META_V2, + "num_params": 54139356, + "_metrics": { + "ImageNet-1K": { + "acc@1": 85.112, + "acc@5": 97.156, + } + }, + "_ops": 24.582, + "_file_size": 208.01, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class EfficientNet_V2_L_Weights(WeightsEnum): + # Weights ported from https://github.com/google/automl/tree/master/efficientnetv2 + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/efficientnet_v2_l-59c71312.pth", + transforms=partial( + ImageClassification, + crop_size=480, + resize_size=480, + interpolation=InterpolationMode.BICUBIC, + mean=(0.5, 0.5, 0.5), + std=(0.5, 0.5, 0.5), + ), + meta={ + **_COMMON_META_V2, + "num_params": 118515272, + "_metrics": { + "ImageNet-1K": { + "acc@1": 85.808, + "acc@5": 97.788, + } + }, + "_ops": 56.08, + "_file_size": 454.573, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B0_Weights.IMAGENET1K_V1)) +def efficientnet_b0( + *, weights: Optional[EfficientNet_B0_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B0 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B0_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B0_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B0_Weights + :members: + """ + weights = EfficientNet_B0_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b0", width_mult=1.0, depth_mult=1.0) + return _efficientnet( + inverted_residual_setting, kwargs.pop("dropout", 0.2), last_channel, weights, progress, **kwargs + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B1_Weights.IMAGENET1K_V1)) +def efficientnet_b1( + *, weights: Optional[EfficientNet_B1_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B1 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B1_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B1_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B1_Weights + :members: + """ + weights = EfficientNet_B1_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b1", width_mult=1.0, depth_mult=1.1) + return _efficientnet( + inverted_residual_setting, kwargs.pop("dropout", 0.2), last_channel, weights, progress, **kwargs + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B2_Weights.IMAGENET1K_V1)) +def efficientnet_b2( + *, weights: Optional[EfficientNet_B2_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B2 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B2_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B2_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B2_Weights + :members: + """ + weights = EfficientNet_B2_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b2", width_mult=1.1, depth_mult=1.2) + return _efficientnet( + inverted_residual_setting, kwargs.pop("dropout", 0.3), last_channel, weights, progress, **kwargs + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B3_Weights.IMAGENET1K_V1)) +def efficientnet_b3( + *, weights: Optional[EfficientNet_B3_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B3 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B3_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B3_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B3_Weights + :members: + """ + weights = EfficientNet_B3_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b3", width_mult=1.2, depth_mult=1.4) + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.3), + last_channel, + weights, + progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B4_Weights.IMAGENET1K_V1)) +def efficientnet_b4( + *, weights: Optional[EfficientNet_B4_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B4 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B4_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B4_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B4_Weights + :members: + """ + weights = EfficientNet_B4_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b4", width_mult=1.4, depth_mult=1.8) + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.4), + last_channel, + weights, + progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B5_Weights.IMAGENET1K_V1)) +def efficientnet_b5( + *, weights: Optional[EfficientNet_B5_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B5 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B5_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B5_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B5_Weights + :members: + """ + weights = EfficientNet_B5_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b5", width_mult=1.6, depth_mult=2.2) + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.4), + last_channel, + weights, + progress, + norm_layer=partial(nn.BatchNorm2d, eps=0.001, momentum=0.01), + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B6_Weights.IMAGENET1K_V1)) +def efficientnet_b6( + *, weights: Optional[EfficientNet_B6_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B6 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B6_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B6_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B6_Weights + :members: + """ + weights = EfficientNet_B6_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b6", width_mult=1.8, depth_mult=2.6) + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.5), + last_channel, + weights, + progress, + norm_layer=partial(nn.BatchNorm2d, eps=0.001, momentum=0.01), + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_B7_Weights.IMAGENET1K_V1)) +def efficientnet_b7( + *, weights: Optional[EfficientNet_B7_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """EfficientNet B7 model architecture from the `EfficientNet: Rethinking Model Scaling for Convolutional + Neural Networks `_ paper. + + Args: + weights (:class:`~torchvision.models.EfficientNet_B7_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_B7_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_B7_Weights + :members: + """ + weights = EfficientNet_B7_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_b7", width_mult=2.0, depth_mult=3.1) + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.5), + last_channel, + weights, + progress, + norm_layer=partial(nn.BatchNorm2d, eps=0.001, momentum=0.01), + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_V2_S_Weights.IMAGENET1K_V1)) +def efficientnet_v2_s( + *, weights: Optional[EfficientNet_V2_S_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """ + Constructs an EfficientNetV2-S architecture from + `EfficientNetV2: Smaller Models and Faster Training `_. + + Args: + weights (:class:`~torchvision.models.EfficientNet_V2_S_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_V2_S_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_V2_S_Weights + :members: + """ + weights = EfficientNet_V2_S_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_v2_s") + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.2), + last_channel, + weights, + progress, + norm_layer=partial(nn.BatchNorm2d, eps=1e-03), + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_V2_M_Weights.IMAGENET1K_V1)) +def efficientnet_v2_m( + *, weights: Optional[EfficientNet_V2_M_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """ + Constructs an EfficientNetV2-M architecture from + `EfficientNetV2: Smaller Models and Faster Training `_. + + Args: + weights (:class:`~torchvision.models.EfficientNet_V2_M_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_V2_M_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_V2_M_Weights + :members: + """ + weights = EfficientNet_V2_M_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_v2_m") + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.3), + last_channel, + weights, + progress, + norm_layer=partial(nn.BatchNorm2d, eps=1e-03), + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", EfficientNet_V2_L_Weights.IMAGENET1K_V1)) +def efficientnet_v2_l( + *, weights: Optional[EfficientNet_V2_L_Weights] = None, progress: bool = True, **kwargs: Any +) -> EfficientNet: + """ + Constructs an EfficientNetV2-L architecture from + `EfficientNetV2: Smaller Models and Faster Training `_. + + Args: + weights (:class:`~torchvision.models.EfficientNet_V2_L_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.EfficientNet_V2_L_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.efficientnet.EfficientNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.EfficientNet_V2_L_Weights + :members: + """ + weights = EfficientNet_V2_L_Weights.verify(weights) + + inverted_residual_setting, last_channel = _efficientnet_conf("efficientnet_v2_l") + return _efficientnet( + inverted_residual_setting, + kwargs.pop("dropout", 0.4), + last_channel, + weights, + progress, + norm_layer=partial(nn.BatchNorm2d, eps=1e-03), + **kwargs, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/feature_extraction.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/feature_extraction.py new file mode 100644 index 0000000000000000000000000000000000000000..31c63c472ae41cf54fea9034f34ca025e3981eea --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/feature_extraction.py @@ -0,0 +1,607 @@ +import copy +import inspect +import math +import re +import warnings +from collections import OrderedDict +from copy import deepcopy +from itertools import chain +from typing import Any, Callable, Dict, List, Optional, Tuple, Union + +import torch +import torchvision +from torch import fx, nn +from torch.fx.graph_module import _CodeOnlyModule, _copy_attr, _USER_PRESERVED_ATTRIBUTES_KEY + + +__all__ = ["create_feature_extractor", "get_graph_node_names"] + + +class LeafModuleAwareTracer(fx.Tracer): + """ + An fx.Tracer that allows the user to specify a set of leaf modules, i.e. + modules that are not to be traced through. The resulting graph ends up + having single nodes referencing calls to the leaf modules' forward methods. + """ + + def __init__(self, *args, **kwargs): + self.leaf_modules = {} + if "leaf_modules" in kwargs: + leaf_modules = kwargs.pop("leaf_modules") + self.leaf_modules = leaf_modules + super().__init__(*args, **kwargs) + + def is_leaf_module(self, m: nn.Module, module_qualname: str) -> bool: + if isinstance(m, tuple(self.leaf_modules)): + return True + return super().is_leaf_module(m, module_qualname) + + +class NodePathTracer(LeafModuleAwareTracer): + """ + NodePathTracer is an FX tracer that, for each operation, also records the + name of the Node from which the operation originated. A node name here is + a `.` separated path walking the hierarchy from top level module down to + leaf operation or leaf module. The name of the top level module is not + included as part of the node name. For example, if we trace a module whose + forward method applies a ReLU module, the name for that node will simply + be 'relu'. + + Some notes on the specifics: + - Nodes are recorded to `self.node_to_qualname` which is a dictionary + mapping a given Node object to its node name. + - Nodes are recorded in the order which they are executed during + tracing. + - When a duplicate node name is encountered, a suffix of the form + _{int} is added. The counter starts from 1. + """ + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + # Track the qualified name of the Node being traced + self.current_module_qualname = "" + # A map from FX Node to the qualified name\# + # NOTE: This is loosely like the "qualified name" mentioned in the + # torch.fx docs https://pytorch.org/docs/stable/fx.html but adapted + # for the purposes of the torchvision feature extractor + self.node_to_qualname = OrderedDict() + + def call_module(self, m: torch.nn.Module, forward: Callable, args, kwargs): + """ + Override of `fx.Tracer.call_module` + This override: + 1) Stores away the qualified name of the caller for restoration later + 2) Adds the qualified name of the caller to + `current_module_qualname` for retrieval by `create_proxy` + 3) Once a leaf module is reached, calls `create_proxy` + 4) Restores the caller's qualified name into current_module_qualname + """ + old_qualname = self.current_module_qualname + try: + module_qualname = self.path_of_module(m) + self.current_module_qualname = module_qualname + if not self.is_leaf_module(m, module_qualname): + out = forward(*args, **kwargs) + return out + return self.create_proxy("call_module", module_qualname, args, kwargs) + finally: + self.current_module_qualname = old_qualname + + def create_proxy( + self, kind: str, target: fx.node.Target, args, kwargs, name=None, type_expr=None, *_ + ) -> fx.proxy.Proxy: + """ + Override of `Tracer.create_proxy`. This override intercepts the recording + of every operation and stores away the current traced module's qualified + name in `node_to_qualname` + """ + proxy = super().create_proxy(kind, target, args, kwargs, name, type_expr) + self.node_to_qualname[proxy.node] = self._get_node_qualname(self.current_module_qualname, proxy.node) + return proxy + + def _get_node_qualname(self, module_qualname: str, node: fx.node.Node) -> str: + node_qualname = module_qualname + + if node.op != "call_module": + # In this case module_qualname from torch.fx doesn't go all the + # way to the leaf function/op, so we need to append it + if len(node_qualname) > 0: + # Only append '.' if we are deeper than the top level module + node_qualname += "." + node_qualname += str(node) + + # Now we need to add an _{index} postfix on any repeated node names + # For modules we do this from scratch + # But for anything else, torch.fx already has a globally scoped + # _{index} postfix. But we want it locally (relative to direct parent) + # scoped. So first we need to undo the torch.fx postfix + if re.match(r".+_[0-9]+$", node_qualname) is not None: + node_qualname = node_qualname.rsplit("_", 1)[0] + + # ... and now we add on our own postfix + for existing_qualname in reversed(self.node_to_qualname.values()): + # Check to see if existing_qualname is of the form + # {node_qualname} or {node_qualname}_{int} + if re.match(rf"{node_qualname}(_[0-9]+)?$", existing_qualname) is not None: + postfix = existing_qualname.replace(node_qualname, "") + if len(postfix): + # existing_qualname is of the form {node_qualname}_{int} + next_index = int(postfix[1:]) + 1 + else: + # existing_qualname is of the form {node_qualname} + next_index = 1 + node_qualname += f"_{next_index}" + break + + return node_qualname + + +def _is_subseq(x, y): + """Check if y is a subsequence of x + https://stackoverflow.com/a/24017747/4391249 + """ + iter_x = iter(x) + return all(any(x_item == y_item for x_item in iter_x) for y_item in y) + + +def _warn_graph_differences(train_tracer: NodePathTracer, eval_tracer: NodePathTracer): + """ + Utility function for warning the user if there are differences between + the train graph nodes and the eval graph nodes. + """ + train_nodes = list(train_tracer.node_to_qualname.values()) + eval_nodes = list(eval_tracer.node_to_qualname.values()) + + if len(train_nodes) == len(eval_nodes) and all(t == e for t, e in zip(train_nodes, eval_nodes)): + return + + suggestion_msg = ( + "When choosing nodes for feature extraction, you may need to specify " + "output nodes for train and eval mode separately." + ) + + if _is_subseq(train_nodes, eval_nodes): + msg = ( + "NOTE: The nodes obtained by tracing the model in eval mode " + "are a subsequence of those obtained in train mode. " + ) + elif _is_subseq(eval_nodes, train_nodes): + msg = ( + "NOTE: The nodes obtained by tracing the model in train mode " + "are a subsequence of those obtained in eval mode. " + ) + else: + msg = "The nodes obtained by tracing the model in train mode are different to those obtained in eval mode. " + warnings.warn(msg + suggestion_msg) + + +def _get_leaf_modules_for_ops() -> List[type]: + members = inspect.getmembers(torchvision.ops) + result = [] + for _, obj in members: + if inspect.isclass(obj) and issubclass(obj, torch.nn.Module): + result.append(obj) + return result + + +def _set_default_tracer_kwargs(original_tr_kwargs: Optional[Dict[str, Any]]) -> Dict[str, Any]: + default_autowrap_modules = (math, torchvision.ops) + default_leaf_modules = _get_leaf_modules_for_ops() + result_tracer_kwargs = {} if original_tr_kwargs is None else original_tr_kwargs + result_tracer_kwargs["autowrap_modules"] = ( + tuple(set(result_tracer_kwargs["autowrap_modules"] + default_autowrap_modules)) + if "autowrap_modules" in result_tracer_kwargs + else default_autowrap_modules + ) + result_tracer_kwargs["leaf_modules"] = ( + list(set(result_tracer_kwargs["leaf_modules"] + default_leaf_modules)) + if "leaf_modules" in result_tracer_kwargs + else default_leaf_modules + ) + return result_tracer_kwargs + + +def get_graph_node_names( + model: nn.Module, + tracer_kwargs: Optional[Dict[str, Any]] = None, + suppress_diff_warning: bool = False, + concrete_args: Optional[Dict[str, Any]] = None, +) -> Tuple[List[str], List[str]]: + """ + Dev utility to return node names in order of execution. See note on node + names under :func:`create_feature_extractor`. Useful for seeing which node + names are available for feature extraction. There are two reasons that + node names can't easily be read directly from the code for a model: + + 1. Not all submodules are traced through. Modules from ``torch.nn`` all + fall within this category. + 2. Nodes representing the repeated application of the same operation + or leaf module get a ``_{counter}`` postfix. + + The model is traced twice: once in train mode, and once in eval mode. Both + sets of node names are returned. + + For more details on the node naming conventions used here, please see the + :ref:`relevant subheading ` in the + `documentation `_. + + Args: + model (nn.Module): model for which we'd like to print node names + tracer_kwargs (dict, optional): a dictionary of keyword arguments for + ``NodePathTracer`` (they are eventually passed onto + `torch.fx.Tracer `_). + By default, it will be set to wrap and make leaf nodes all torchvision ops: + {"autowrap_modules": (math, torchvision.ops,),"leaf_modules": _get_leaf_modules_for_ops(),} + WARNING: In case the user provides tracer_kwargs, above default arguments will be appended to the user + provided dictionary. + suppress_diff_warning (bool, optional): whether to suppress a warning + when there are discrepancies between the train and eval version of + the graph. Defaults to False. + concrete_args (Optional[Dict[str, any]]): Concrete arguments that should + not be treated as Proxies. According to the `Pytorch docs + `_, + this parameter's API may not be guaranteed. + + Returns: + tuple(list, list): a list of node names from tracing the model in + train mode, and another from tracing the model in eval mode. + + Examples:: + + >>> model = torchvision.models.resnet18() + >>> train_nodes, eval_nodes = get_graph_node_names(model) + """ + tracer_kwargs = _set_default_tracer_kwargs(tracer_kwargs) + is_training = model.training + train_tracer = NodePathTracer(**tracer_kwargs) + train_tracer.trace(model.train(), concrete_args=concrete_args) + eval_tracer = NodePathTracer(**tracer_kwargs) + eval_tracer.trace(model.eval(), concrete_args=concrete_args) + train_nodes = list(train_tracer.node_to_qualname.values()) + eval_nodes = list(eval_tracer.node_to_qualname.values()) + if not suppress_diff_warning: + _warn_graph_differences(train_tracer, eval_tracer) + # Restore training state + model.train(is_training) + return train_nodes, eval_nodes + + +class DualGraphModule(fx.GraphModule): + """ + A derivative of `fx.GraphModule`. Differs in the following ways: + - Requires a train and eval version of the underlying graph + - Copies submodules according to the nodes of both train and eval graphs. + - Calling train(mode) switches between train graph and eval graph. + """ + + def __init__( + self, root: torch.nn.Module, train_graph: fx.Graph, eval_graph: fx.Graph, class_name: str = "GraphModule" + ): + """ + Args: + root (nn.Module): module from which the copied module hierarchy is + built + train_graph (fx.Graph): the graph that should be used in train mode + eval_graph (fx.Graph): the graph that should be used in eval mode + """ + super(fx.GraphModule, self).__init__() + + self.__class__.__name__ = class_name + + self.train_graph = train_graph + self.eval_graph = eval_graph + + # Copy all get_attr and call_module ops (indicated by BOTH train and + # eval graphs) + for node in chain(iter(train_graph.nodes), iter(eval_graph.nodes)): + if node.op in ["get_attr", "call_module"]: + if not isinstance(node.target, str): + raise TypeError(f"node.target should be of type str instead of {type(node.target)}") + _copy_attr(root, self, node.target) + + # train mode by default + self.train() + self.graph = train_graph + + # (borrowed from fx.GraphModule): + # Store the Tracer class responsible for creating a Graph separately as part of the + # GraphModule state, except when the Tracer is defined in a local namespace. + # Locally defined Tracers are not pickleable. This is needed because torch.package will + # serialize a GraphModule without retaining the Graph, and needs to use the correct Tracer + # to re-create the Graph during deserialization. + if self.eval_graph._tracer_cls != self.train_graph._tracer_cls: + raise TypeError( + f"Train mode and eval mode should use the same tracer class. Instead got {self.eval_graph._tracer_cls} for eval vs {self.train_graph._tracer_cls} for train" + ) + self._tracer_cls = None + if self.graph._tracer_cls and "" not in self.graph._tracer_cls.__qualname__: + self._tracer_cls = self.graph._tracer_cls + + def train(self, mode=True): + """ + Swap out the graph depending on the selected training mode. + NOTE this should be safe when calling model.eval() because that just + calls this with mode == False. + """ + # NOTE: Only set self.graph if the current graph is not the desired + # one. This saves us from recompiling the graph where not necessary. + if mode and not self.training: + self.graph = self.train_graph + elif not mode and self.training: + self.graph = self.eval_graph + return super().train(mode=mode) + + def _deepcopy_init(self): + # See __deepcopy__ below + return DualGraphModule.__init__ + + def __deepcopy__(self, memo): + # Same as the base class' __deepcopy__ from pytorch, with minor + # modification to account for train_graph and eval_graph + # https://github.com/pytorch/pytorch/blob/f684dbd0026f98f8fa291cab74dbc4d61ba30580/torch/fx/graph_module.py#L875 + # + # This is using a bunch of private stuff from torch, so if that breaks, + # we'll likely have to remove this, along with the associated + # non-regression test. + res = type(self).__new__(type(self)) + memo[id(self)] = res + fake_mod = _CodeOnlyModule(copy.deepcopy(self.__dict__, memo)) + self._deepcopy_init()(res, fake_mod, fake_mod.__dict__["train_graph"], fake_mod.__dict__["eval_graph"]) + + extra_preserved_attrs = [ + "_state_dict_hooks", + "_load_state_dict_pre_hooks", + "_load_state_dict_post_hooks", + "_replace_hook", + "_create_node_hooks", + "_erase_node_hooks", + ] + for attr in extra_preserved_attrs: + if attr in self.__dict__: + setattr(res, attr, copy.deepcopy(self.__dict__[attr], memo)) + res.meta = copy.deepcopy(getattr(self, "meta", {}), memo) + if _USER_PRESERVED_ATTRIBUTES_KEY in res.meta: + for attr_name, attr in res.meta[_USER_PRESERVED_ATTRIBUTES_KEY].items(): + setattr(res, attr_name, attr) + return res + + +def create_feature_extractor( + model: nn.Module, + return_nodes: Optional[Union[List[str], Dict[str, str]]] = None, + train_return_nodes: Optional[Union[List[str], Dict[str, str]]] = None, + eval_return_nodes: Optional[Union[List[str], Dict[str, str]]] = None, + tracer_kwargs: Optional[Dict[str, Any]] = None, + suppress_diff_warning: bool = False, + concrete_args: Optional[Dict[str, Any]] = None, +) -> fx.GraphModule: + """ + Creates a new graph module that returns intermediate nodes from a given + model as dictionary with user specified keys as strings, and the requested + outputs as values. This is achieved by re-writing the computation graph of + the model via FX to return the desired nodes as outputs. All unused nodes + are removed, together with their corresponding parameters. + + Desired output nodes must be specified as a ``.`` separated + path walking the module hierarchy from top level module down to leaf + operation or leaf module. For more details on the node naming conventions + used here, please see the :ref:`relevant subheading ` + in the `documentation `_. + + Not all models will be FX traceable, although with some massaging they can + be made to cooperate. Here's a (not exhaustive) list of tips: + + - If you don't need to trace through a particular, problematic + sub-module, turn it into a "leaf module" by passing a list of + ``leaf_modules`` as one of the ``tracer_kwargs`` (see example below). + It will not be traced through, but rather, the resulting graph will + hold a reference to that module's forward method. + - Likewise, you may turn functions into leaf functions by passing a + list of ``autowrap_functions`` as one of the ``tracer_kwargs`` (see + example below). + - Some inbuilt Python functions can be problematic. For instance, + ``int`` will raise an error during tracing. You may wrap them in your + own function and then pass that in ``autowrap_functions`` as one of + the ``tracer_kwargs``. + + For further information on FX see the + `torch.fx documentation `_. + + Args: + model (nn.Module): model on which we will extract the features + return_nodes (list or dict, optional): either a ``List`` or a ``Dict`` + containing the names (or partial names - see note above) + of the nodes for which the activations will be returned. If it is + a ``Dict``, the keys are the node names, and the values + are the user-specified keys for the graph module's returned + dictionary. If it is a ``List``, it is treated as a ``Dict`` mapping + node specification strings directly to output names. In the case + that ``train_return_nodes`` and ``eval_return_nodes`` are specified, + this should not be specified. + train_return_nodes (list or dict, optional): similar to + ``return_nodes``. This can be used if the return nodes + for train mode are different than those from eval mode. + If this is specified, ``eval_return_nodes`` must also be specified, + and ``return_nodes`` should not be specified. + eval_return_nodes (list or dict, optional): similar to + ``return_nodes``. This can be used if the return nodes + for train mode are different than those from eval mode. + If this is specified, ``train_return_nodes`` must also be specified, + and `return_nodes` should not be specified. + tracer_kwargs (dict, optional): a dictionary of keyword arguments for + ``NodePathTracer`` (which passes them onto it's parent class + `torch.fx.Tracer `_). + By default, it will be set to wrap and make leaf nodes all torchvision ops: + {"autowrap_modules": (math, torchvision.ops,),"leaf_modules": _get_leaf_modules_for_ops(),} + WARNING: In case the user provides tracer_kwargs, above default arguments will be appended to the user + provided dictionary. + suppress_diff_warning (bool, optional): whether to suppress a warning + when there are discrepancies between the train and eval version of + the graph. Defaults to False. + concrete_args (Optional[Dict[str, any]]): Concrete arguments that should + not be treated as Proxies. According to the `Pytorch docs + `_, + this parameter's API may not be guaranteed. + + Examples:: + + >>> # Feature extraction with resnet + >>> model = torchvision.models.resnet18() + >>> # extract layer1 and layer3, giving as names `feat1` and feat2` + >>> model = create_feature_extractor( + >>> model, {'layer1': 'feat1', 'layer3': 'feat2'}) + >>> out = model(torch.rand(1, 3, 224, 224)) + >>> print([(k, v.shape) for k, v in out.items()]) + >>> [('feat1', torch.Size([1, 64, 56, 56])), + >>> ('feat2', torch.Size([1, 256, 14, 14]))] + + >>> # Specifying leaf modules and leaf functions + >>> def leaf_function(x): + >>> # This would raise a TypeError if traced through + >>> return int(x) + >>> + >>> class LeafModule(torch.nn.Module): + >>> def forward(self, x): + >>> # This would raise a TypeError if traced through + >>> int(x.shape[0]) + >>> return torch.nn.functional.relu(x + 4) + >>> + >>> class MyModule(torch.nn.Module): + >>> def __init__(self): + >>> super().__init__() + >>> self.conv = torch.nn.Conv2d(3, 1, 3) + >>> self.leaf_module = LeafModule() + >>> + >>> def forward(self, x): + >>> leaf_function(x.shape[0]) + >>> x = self.conv(x) + >>> return self.leaf_module(x) + >>> + >>> model = create_feature_extractor( + >>> MyModule(), return_nodes=['leaf_module'], + >>> tracer_kwargs={'leaf_modules': [LeafModule], + >>> 'autowrap_functions': [leaf_function]}) + + """ + tracer_kwargs = _set_default_tracer_kwargs(tracer_kwargs) + is_training = model.training + + if all(arg is None for arg in [return_nodes, train_return_nodes, eval_return_nodes]): + + raise ValueError( + "Either `return_nodes` or `train_return_nodes` and `eval_return_nodes` together, should be specified" + ) + + if (train_return_nodes is None) ^ (eval_return_nodes is None): + raise ValueError( + "If any of `train_return_nodes` and `eval_return_nodes` are specified, then both should be specified" + ) + + if not ((return_nodes is None) ^ (train_return_nodes is None)): + raise ValueError("If `train_return_nodes` and `eval_return_nodes` are specified, then both should be specified") + + # Put *_return_nodes into Dict[str, str] format + def to_strdict(n) -> Dict[str, str]: + if isinstance(n, list): + return {str(i): str(i) for i in n} + return {str(k): str(v) for k, v in n.items()} + + if train_return_nodes is None: + return_nodes = to_strdict(return_nodes) + train_return_nodes = deepcopy(return_nodes) + eval_return_nodes = deepcopy(return_nodes) + else: + train_return_nodes = to_strdict(train_return_nodes) + eval_return_nodes = to_strdict(eval_return_nodes) + + # Repeat the tracing and graph rewriting for train and eval mode + tracers = {} + graphs = {} + mode_return_nodes: Dict[str, Dict[str, str]] = {"train": train_return_nodes, "eval": eval_return_nodes} + for mode in ["train", "eval"]: + if mode == "train": + model.train() + elif mode == "eval": + model.eval() + + # Instantiate our NodePathTracer and use that to trace the model + tracer = NodePathTracer(**tracer_kwargs) + graph = tracer.trace(model, concrete_args=concrete_args) + + name = model.__class__.__name__ if isinstance(model, nn.Module) else model.__name__ + graph_module = fx.GraphModule(tracer.root, graph, name) + + available_nodes = list(tracer.node_to_qualname.values()) + # FIXME We don't know if we should expect this to happen + if len(set(available_nodes)) != len(available_nodes): + raise ValueError( + "There are duplicate nodes! Please raise an issue https://github.com/pytorch/vision/issues" + ) + # Check that all outputs in return_nodes are present in the model + for query in mode_return_nodes[mode].keys(): + # To check if a query is available we need to check that at least + # one of the available names starts with it up to a . + if not any([re.match(rf"^{query}(\.|$)", n) is not None for n in available_nodes]): + raise ValueError( + f"node: '{query}' is not present in model. Hint: use " + "`get_graph_node_names` to make sure the " + "`return_nodes` you specified are present. It may even " + "be that you need to specify `train_return_nodes` and " + "`eval_return_nodes` separately." + ) + + # Remove existing output nodes (train mode) + orig_output_nodes = [] + for n in reversed(graph_module.graph.nodes): + if n.op == "output": + orig_output_nodes.append(n) + if not orig_output_nodes: + raise ValueError("No output nodes found in graph_module.graph.nodes") + + for n in orig_output_nodes: + graph_module.graph.erase_node(n) + + # Find nodes corresponding to return_nodes and make them into output_nodes + nodes = [n for n in graph_module.graph.nodes] + output_nodes = OrderedDict() + for n in reversed(nodes): + module_qualname = tracer.node_to_qualname.get(n) + if module_qualname is None: + # NOTE - Know cases where this happens: + # - Node representing creation of a tensor constant - probably + # not interesting as a return node + # - When packing outputs into a named tuple like in InceptionV3 + continue + for query in mode_return_nodes[mode]: + depth = query.count(".") + if ".".join(module_qualname.split(".")[: depth + 1]) == query: + output_nodes[mode_return_nodes[mode][query]] = n + mode_return_nodes[mode].pop(query) + break + output_nodes = OrderedDict(reversed(list(output_nodes.items()))) + + # And add them in the end of the graph + with graph_module.graph.inserting_after(nodes[-1]): + graph_module.graph.output(output_nodes) + + # Remove unused modules / parameters + graph_module.graph.eliminate_dead_code() + graph_module.recompile() + + # Keep track of the tracer and graph, so we can choose the main one + tracers[mode] = tracer + graphs[mode] = graph + + # Warn user if there are any discrepancies between the graphs of the + # train and eval modes + if not suppress_diff_warning: + _warn_graph_differences(tracers["train"], tracers["eval"]) + + # Build the final graph module + graph_module = DualGraphModule(model, graphs["train"], graphs["eval"], class_name=name) + + # Restore original training mode + model.train(is_training) + graph_module.train(is_training) + + return graph_module diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/googlenet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/googlenet.py new file mode 100644 index 0000000000000000000000000000000000000000..51a13c55b35f859116558ab77ae0c725ef28964d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/googlenet.py @@ -0,0 +1,345 @@ +import warnings +from collections import namedtuple +from functools import partial +from typing import Any, Callable, List, Optional, Tuple + +import torch +import torch.nn as nn +import torch.nn.functional as F +from torch import Tensor + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = ["GoogLeNet", "GoogLeNetOutputs", "_GoogLeNetOutputs", "GoogLeNet_Weights", "googlenet"] + + +GoogLeNetOutputs = namedtuple("GoogLeNetOutputs", ["logits", "aux_logits2", "aux_logits1"]) +GoogLeNetOutputs.__annotations__ = {"logits": Tensor, "aux_logits2": Optional[Tensor], "aux_logits1": Optional[Tensor]} + +# Script annotations failed with _GoogleNetOutputs = namedtuple ... +# _GoogLeNetOutputs set here for backwards compat +_GoogLeNetOutputs = GoogLeNetOutputs + + +class GoogLeNet(nn.Module): + __constants__ = ["aux_logits", "transform_input"] + + def __init__( + self, + num_classes: int = 1000, + aux_logits: bool = True, + transform_input: bool = False, + init_weights: Optional[bool] = None, + blocks: Optional[List[Callable[..., nn.Module]]] = None, + dropout: float = 0.2, + dropout_aux: float = 0.7, + ) -> None: + super().__init__() + _log_api_usage_once(self) + if blocks is None: + blocks = [BasicConv2d, Inception, InceptionAux] + if init_weights is None: + warnings.warn( + "The default weight initialization of GoogleNet will be changed in future releases of " + "torchvision. If you wish to keep the old behavior (which leads to long initialization times" + " due to scipy/scipy#11299), please set init_weights=True.", + FutureWarning, + ) + init_weights = True + if len(blocks) != 3: + raise ValueError(f"blocks length should be 3 instead of {len(blocks)}") + conv_block = blocks[0] + inception_block = blocks[1] + inception_aux_block = blocks[2] + + self.aux_logits = aux_logits + self.transform_input = transform_input + + self.conv1 = conv_block(3, 64, kernel_size=7, stride=2, padding=3) + self.maxpool1 = nn.MaxPool2d(3, stride=2, ceil_mode=True) + self.conv2 = conv_block(64, 64, kernel_size=1) + self.conv3 = conv_block(64, 192, kernel_size=3, padding=1) + self.maxpool2 = nn.MaxPool2d(3, stride=2, ceil_mode=True) + + self.inception3a = inception_block(192, 64, 96, 128, 16, 32, 32) + self.inception3b = inception_block(256, 128, 128, 192, 32, 96, 64) + self.maxpool3 = nn.MaxPool2d(3, stride=2, ceil_mode=True) + + self.inception4a = inception_block(480, 192, 96, 208, 16, 48, 64) + self.inception4b = inception_block(512, 160, 112, 224, 24, 64, 64) + self.inception4c = inception_block(512, 128, 128, 256, 24, 64, 64) + self.inception4d = inception_block(512, 112, 144, 288, 32, 64, 64) + self.inception4e = inception_block(528, 256, 160, 320, 32, 128, 128) + self.maxpool4 = nn.MaxPool2d(2, stride=2, ceil_mode=True) + + self.inception5a = inception_block(832, 256, 160, 320, 32, 128, 128) + self.inception5b = inception_block(832, 384, 192, 384, 48, 128, 128) + + if aux_logits: + self.aux1 = inception_aux_block(512, num_classes, dropout=dropout_aux) + self.aux2 = inception_aux_block(528, num_classes, dropout=dropout_aux) + else: + self.aux1 = None # type: ignore[assignment] + self.aux2 = None # type: ignore[assignment] + + self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) + self.dropout = nn.Dropout(p=dropout) + self.fc = nn.Linear(1024, num_classes) + + if init_weights: + for m in self.modules(): + if isinstance(m, nn.Conv2d) or isinstance(m, nn.Linear): + torch.nn.init.trunc_normal_(m.weight, mean=0.0, std=0.01, a=-2, b=2) + elif isinstance(m, nn.BatchNorm2d): + nn.init.constant_(m.weight, 1) + nn.init.constant_(m.bias, 0) + + def _transform_input(self, x: Tensor) -> Tensor: + if self.transform_input: + x_ch0 = torch.unsqueeze(x[:, 0], 1) * (0.229 / 0.5) + (0.485 - 0.5) / 0.5 + x_ch1 = torch.unsqueeze(x[:, 1], 1) * (0.224 / 0.5) + (0.456 - 0.5) / 0.5 + x_ch2 = torch.unsqueeze(x[:, 2], 1) * (0.225 / 0.5) + (0.406 - 0.5) / 0.5 + x = torch.cat((x_ch0, x_ch1, x_ch2), 1) + return x + + def _forward(self, x: Tensor) -> Tuple[Tensor, Optional[Tensor], Optional[Tensor]]: + # N x 3 x 224 x 224 + x = self.conv1(x) + # N x 64 x 112 x 112 + x = self.maxpool1(x) + # N x 64 x 56 x 56 + x = self.conv2(x) + # N x 64 x 56 x 56 + x = self.conv3(x) + # N x 192 x 56 x 56 + x = self.maxpool2(x) + + # N x 192 x 28 x 28 + x = self.inception3a(x) + # N x 256 x 28 x 28 + x = self.inception3b(x) + # N x 480 x 28 x 28 + x = self.maxpool3(x) + # N x 480 x 14 x 14 + x = self.inception4a(x) + # N x 512 x 14 x 14 + aux1: Optional[Tensor] = None + if self.aux1 is not None: + if self.training: + aux1 = self.aux1(x) + + x = self.inception4b(x) + # N x 512 x 14 x 14 + x = self.inception4c(x) + # N x 512 x 14 x 14 + x = self.inception4d(x) + # N x 528 x 14 x 14 + aux2: Optional[Tensor] = None + if self.aux2 is not None: + if self.training: + aux2 = self.aux2(x) + + x = self.inception4e(x) + # N x 832 x 14 x 14 + x = self.maxpool4(x) + # N x 832 x 7 x 7 + x = self.inception5a(x) + # N x 832 x 7 x 7 + x = self.inception5b(x) + # N x 1024 x 7 x 7 + + x = self.avgpool(x) + # N x 1024 x 1 x 1 + x = torch.flatten(x, 1) + # N x 1024 + x = self.dropout(x) + x = self.fc(x) + # N x 1000 (num_classes) + return x, aux2, aux1 + + @torch.jit.unused + def eager_outputs(self, x: Tensor, aux2: Tensor, aux1: Optional[Tensor]) -> GoogLeNetOutputs: + if self.training and self.aux_logits: + return _GoogLeNetOutputs(x, aux2, aux1) + else: + return x # type: ignore[return-value] + + def forward(self, x: Tensor) -> GoogLeNetOutputs: + x = self._transform_input(x) + x, aux2, aux1 = self._forward(x) + aux_defined = self.training and self.aux_logits + if torch.jit.is_scripting(): + if not aux_defined: + warnings.warn("Scripted GoogleNet always returns GoogleNetOutputs Tuple") + return GoogLeNetOutputs(x, aux2, aux1) + else: + return self.eager_outputs(x, aux2, aux1) + + +class Inception(nn.Module): + def __init__( + self, + in_channels: int, + ch1x1: int, + ch3x3red: int, + ch3x3: int, + ch5x5red: int, + ch5x5: int, + pool_proj: int, + conv_block: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.branch1 = conv_block(in_channels, ch1x1, kernel_size=1) + + self.branch2 = nn.Sequential( + conv_block(in_channels, ch3x3red, kernel_size=1), conv_block(ch3x3red, ch3x3, kernel_size=3, padding=1) + ) + + self.branch3 = nn.Sequential( + conv_block(in_channels, ch5x5red, kernel_size=1), + # Here, kernel_size=3 instead of kernel_size=5 is a known bug. + # Please see https://github.com/pytorch/vision/issues/906 for details. + conv_block(ch5x5red, ch5x5, kernel_size=3, padding=1), + ) + + self.branch4 = nn.Sequential( + nn.MaxPool2d(kernel_size=3, stride=1, padding=1, ceil_mode=True), + conv_block(in_channels, pool_proj, kernel_size=1), + ) + + def _forward(self, x: Tensor) -> List[Tensor]: + branch1 = self.branch1(x) + branch2 = self.branch2(x) + branch3 = self.branch3(x) + branch4 = self.branch4(x) + + outputs = [branch1, branch2, branch3, branch4] + return outputs + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return torch.cat(outputs, 1) + + +class InceptionAux(nn.Module): + def __init__( + self, + in_channels: int, + num_classes: int, + conv_block: Optional[Callable[..., nn.Module]] = None, + dropout: float = 0.7, + ) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.conv = conv_block(in_channels, 128, kernel_size=1) + + self.fc1 = nn.Linear(2048, 1024) + self.fc2 = nn.Linear(1024, num_classes) + self.dropout = nn.Dropout(p=dropout) + + def forward(self, x: Tensor) -> Tensor: + # aux1: N x 512 x 14 x 14, aux2: N x 528 x 14 x 14 + x = F.adaptive_avg_pool2d(x, (4, 4)) + # aux1: N x 512 x 4 x 4, aux2: N x 528 x 4 x 4 + x = self.conv(x) + # N x 128 x 4 x 4 + x = torch.flatten(x, 1) + # N x 2048 + x = F.relu(self.fc1(x), inplace=True) + # N x 1024 + x = self.dropout(x) + # N x 1024 + x = self.fc2(x) + # N x 1000 (num_classes) + + return x + + +class BasicConv2d(nn.Module): + def __init__(self, in_channels: int, out_channels: int, **kwargs: Any) -> None: + super().__init__() + self.conv = nn.Conv2d(in_channels, out_channels, bias=False, **kwargs) + self.bn = nn.BatchNorm2d(out_channels, eps=0.001) + + def forward(self, x: Tensor) -> Tensor: + x = self.conv(x) + x = self.bn(x) + return F.relu(x, inplace=True) + + +class GoogLeNet_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/googlenet-1378be20.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + "num_params": 6624904, + "min_size": (15, 15), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#googlenet", + "_metrics": { + "ImageNet-1K": { + "acc@1": 69.778, + "acc@5": 89.530, + } + }, + "_ops": 1.498, + "_file_size": 49.731, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", GoogLeNet_Weights.IMAGENET1K_V1)) +def googlenet(*, weights: Optional[GoogLeNet_Weights] = None, progress: bool = True, **kwargs: Any) -> GoogLeNet: + """GoogLeNet (Inception v1) model architecture from + `Going Deeper with Convolutions `_. + + Args: + weights (:class:`~torchvision.models.GoogLeNet_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.GoogLeNet_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.GoogLeNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.GoogLeNet_Weights + :members: + """ + weights = GoogLeNet_Weights.verify(weights) + + original_aux_logits = kwargs.get("aux_logits", False) + if weights is not None: + if "transform_input" not in kwargs: + _ovewrite_named_param(kwargs, "transform_input", True) + _ovewrite_named_param(kwargs, "aux_logits", True) + _ovewrite_named_param(kwargs, "init_weights", False) + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = GoogLeNet(**kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if not original_aux_logits: + model.aux_logits = False + model.aux1 = None # type: ignore[assignment] + model.aux2 = None # type: ignore[assignment] + else: + warnings.warn( + "auxiliary heads in the pretrained googlenet model are NOT pretrained, so make sure to train them" + ) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/inception.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/inception.py new file mode 100644 index 0000000000000000000000000000000000000000..730cd1786792a59476795d0e0b214cb50668411b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/inception.py @@ -0,0 +1,478 @@ +import warnings +from collections import namedtuple +from functools import partial +from typing import Any, Callable, List, Optional, Tuple + +import torch +import torch.nn.functional as F +from torch import nn, Tensor + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = ["Inception3", "InceptionOutputs", "_InceptionOutputs", "Inception_V3_Weights", "inception_v3"] + + +InceptionOutputs = namedtuple("InceptionOutputs", ["logits", "aux_logits"]) +InceptionOutputs.__annotations__ = {"logits": Tensor, "aux_logits": Optional[Tensor]} + +# Script annotations failed with _GoogleNetOutputs = namedtuple ... +# _InceptionOutputs set here for backwards compat +_InceptionOutputs = InceptionOutputs + + +class Inception3(nn.Module): + def __init__( + self, + num_classes: int = 1000, + aux_logits: bool = True, + transform_input: bool = False, + inception_blocks: Optional[List[Callable[..., nn.Module]]] = None, + init_weights: Optional[bool] = None, + dropout: float = 0.5, + ) -> None: + super().__init__() + _log_api_usage_once(self) + if inception_blocks is None: + inception_blocks = [BasicConv2d, InceptionA, InceptionB, InceptionC, InceptionD, InceptionE, InceptionAux] + if init_weights is None: + warnings.warn( + "The default weight initialization of inception_v3 will be changed in future releases of " + "torchvision. If you wish to keep the old behavior (which leads to long initialization times" + " due to scipy/scipy#11299), please set init_weights=True.", + FutureWarning, + ) + init_weights = True + if len(inception_blocks) != 7: + raise ValueError(f"length of inception_blocks should be 7 instead of {len(inception_blocks)}") + conv_block = inception_blocks[0] + inception_a = inception_blocks[1] + inception_b = inception_blocks[2] + inception_c = inception_blocks[3] + inception_d = inception_blocks[4] + inception_e = inception_blocks[5] + inception_aux = inception_blocks[6] + + self.aux_logits = aux_logits + self.transform_input = transform_input + self.Conv2d_1a_3x3 = conv_block(3, 32, kernel_size=3, stride=2) + self.Conv2d_2a_3x3 = conv_block(32, 32, kernel_size=3) + self.Conv2d_2b_3x3 = conv_block(32, 64, kernel_size=3, padding=1) + self.maxpool1 = nn.MaxPool2d(kernel_size=3, stride=2) + self.Conv2d_3b_1x1 = conv_block(64, 80, kernel_size=1) + self.Conv2d_4a_3x3 = conv_block(80, 192, kernel_size=3) + self.maxpool2 = nn.MaxPool2d(kernel_size=3, stride=2) + self.Mixed_5b = inception_a(192, pool_features=32) + self.Mixed_5c = inception_a(256, pool_features=64) + self.Mixed_5d = inception_a(288, pool_features=64) + self.Mixed_6a = inception_b(288) + self.Mixed_6b = inception_c(768, channels_7x7=128) + self.Mixed_6c = inception_c(768, channels_7x7=160) + self.Mixed_6d = inception_c(768, channels_7x7=160) + self.Mixed_6e = inception_c(768, channels_7x7=192) + self.AuxLogits: Optional[nn.Module] = None + if aux_logits: + self.AuxLogits = inception_aux(768, num_classes) + self.Mixed_7a = inception_d(768) + self.Mixed_7b = inception_e(1280) + self.Mixed_7c = inception_e(2048) + self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) + self.dropout = nn.Dropout(p=dropout) + self.fc = nn.Linear(2048, num_classes) + if init_weights: + for m in self.modules(): + if isinstance(m, nn.Conv2d) or isinstance(m, nn.Linear): + stddev = float(m.stddev) if hasattr(m, "stddev") else 0.1 # type: ignore + torch.nn.init.trunc_normal_(m.weight, mean=0.0, std=stddev, a=-2, b=2) + elif isinstance(m, nn.BatchNorm2d): + nn.init.constant_(m.weight, 1) + nn.init.constant_(m.bias, 0) + + def _transform_input(self, x: Tensor) -> Tensor: + if self.transform_input: + x_ch0 = torch.unsqueeze(x[:, 0], 1) * (0.229 / 0.5) + (0.485 - 0.5) / 0.5 + x_ch1 = torch.unsqueeze(x[:, 1], 1) * (0.224 / 0.5) + (0.456 - 0.5) / 0.5 + x_ch2 = torch.unsqueeze(x[:, 2], 1) * (0.225 / 0.5) + (0.406 - 0.5) / 0.5 + x = torch.cat((x_ch0, x_ch1, x_ch2), 1) + return x + + def _forward(self, x: Tensor) -> Tuple[Tensor, Optional[Tensor]]: + # N x 3 x 299 x 299 + x = self.Conv2d_1a_3x3(x) + # N x 32 x 149 x 149 + x = self.Conv2d_2a_3x3(x) + # N x 32 x 147 x 147 + x = self.Conv2d_2b_3x3(x) + # N x 64 x 147 x 147 + x = self.maxpool1(x) + # N x 64 x 73 x 73 + x = self.Conv2d_3b_1x1(x) + # N x 80 x 73 x 73 + x = self.Conv2d_4a_3x3(x) + # N x 192 x 71 x 71 + x = self.maxpool2(x) + # N x 192 x 35 x 35 + x = self.Mixed_5b(x) + # N x 256 x 35 x 35 + x = self.Mixed_5c(x) + # N x 288 x 35 x 35 + x = self.Mixed_5d(x) + # N x 288 x 35 x 35 + x = self.Mixed_6a(x) + # N x 768 x 17 x 17 + x = self.Mixed_6b(x) + # N x 768 x 17 x 17 + x = self.Mixed_6c(x) + # N x 768 x 17 x 17 + x = self.Mixed_6d(x) + # N x 768 x 17 x 17 + x = self.Mixed_6e(x) + # N x 768 x 17 x 17 + aux: Optional[Tensor] = None + if self.AuxLogits is not None: + if self.training: + aux = self.AuxLogits(x) + # N x 768 x 17 x 17 + x = self.Mixed_7a(x) + # N x 1280 x 8 x 8 + x = self.Mixed_7b(x) + # N x 2048 x 8 x 8 + x = self.Mixed_7c(x) + # N x 2048 x 8 x 8 + # Adaptive average pooling + x = self.avgpool(x) + # N x 2048 x 1 x 1 + x = self.dropout(x) + # N x 2048 x 1 x 1 + x = torch.flatten(x, 1) + # N x 2048 + x = self.fc(x) + # N x 1000 (num_classes) + return x, aux + + @torch.jit.unused + def eager_outputs(self, x: Tensor, aux: Optional[Tensor]) -> InceptionOutputs: + if self.training and self.aux_logits: + return InceptionOutputs(x, aux) + else: + return x # type: ignore[return-value] + + def forward(self, x: Tensor) -> InceptionOutputs: + x = self._transform_input(x) + x, aux = self._forward(x) + aux_defined = self.training and self.aux_logits + if torch.jit.is_scripting(): + if not aux_defined: + warnings.warn("Scripted Inception3 always returns Inception3 Tuple") + return InceptionOutputs(x, aux) + else: + return self.eager_outputs(x, aux) + + +class InceptionA(nn.Module): + def __init__( + self, in_channels: int, pool_features: int, conv_block: Optional[Callable[..., nn.Module]] = None + ) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.branch1x1 = conv_block(in_channels, 64, kernel_size=1) + + self.branch5x5_1 = conv_block(in_channels, 48, kernel_size=1) + self.branch5x5_2 = conv_block(48, 64, kernel_size=5, padding=2) + + self.branch3x3dbl_1 = conv_block(in_channels, 64, kernel_size=1) + self.branch3x3dbl_2 = conv_block(64, 96, kernel_size=3, padding=1) + self.branch3x3dbl_3 = conv_block(96, 96, kernel_size=3, padding=1) + + self.branch_pool = conv_block(in_channels, pool_features, kernel_size=1) + + def _forward(self, x: Tensor) -> List[Tensor]: + branch1x1 = self.branch1x1(x) + + branch5x5 = self.branch5x5_1(x) + branch5x5 = self.branch5x5_2(branch5x5) + + branch3x3dbl = self.branch3x3dbl_1(x) + branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl) + branch3x3dbl = self.branch3x3dbl_3(branch3x3dbl) + + branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1) + branch_pool = self.branch_pool(branch_pool) + + outputs = [branch1x1, branch5x5, branch3x3dbl, branch_pool] + return outputs + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return torch.cat(outputs, 1) + + +class InceptionB(nn.Module): + def __init__(self, in_channels: int, conv_block: Optional[Callable[..., nn.Module]] = None) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.branch3x3 = conv_block(in_channels, 384, kernel_size=3, stride=2) + + self.branch3x3dbl_1 = conv_block(in_channels, 64, kernel_size=1) + self.branch3x3dbl_2 = conv_block(64, 96, kernel_size=3, padding=1) + self.branch3x3dbl_3 = conv_block(96, 96, kernel_size=3, stride=2) + + def _forward(self, x: Tensor) -> List[Tensor]: + branch3x3 = self.branch3x3(x) + + branch3x3dbl = self.branch3x3dbl_1(x) + branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl) + branch3x3dbl = self.branch3x3dbl_3(branch3x3dbl) + + branch_pool = F.max_pool2d(x, kernel_size=3, stride=2) + + outputs = [branch3x3, branch3x3dbl, branch_pool] + return outputs + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return torch.cat(outputs, 1) + + +class InceptionC(nn.Module): + def __init__( + self, in_channels: int, channels_7x7: int, conv_block: Optional[Callable[..., nn.Module]] = None + ) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.branch1x1 = conv_block(in_channels, 192, kernel_size=1) + + c7 = channels_7x7 + self.branch7x7_1 = conv_block(in_channels, c7, kernel_size=1) + self.branch7x7_2 = conv_block(c7, c7, kernel_size=(1, 7), padding=(0, 3)) + self.branch7x7_3 = conv_block(c7, 192, kernel_size=(7, 1), padding=(3, 0)) + + self.branch7x7dbl_1 = conv_block(in_channels, c7, kernel_size=1) + self.branch7x7dbl_2 = conv_block(c7, c7, kernel_size=(7, 1), padding=(3, 0)) + self.branch7x7dbl_3 = conv_block(c7, c7, kernel_size=(1, 7), padding=(0, 3)) + self.branch7x7dbl_4 = conv_block(c7, c7, kernel_size=(7, 1), padding=(3, 0)) + self.branch7x7dbl_5 = conv_block(c7, 192, kernel_size=(1, 7), padding=(0, 3)) + + self.branch_pool = conv_block(in_channels, 192, kernel_size=1) + + def _forward(self, x: Tensor) -> List[Tensor]: + branch1x1 = self.branch1x1(x) + + branch7x7 = self.branch7x7_1(x) + branch7x7 = self.branch7x7_2(branch7x7) + branch7x7 = self.branch7x7_3(branch7x7) + + branch7x7dbl = self.branch7x7dbl_1(x) + branch7x7dbl = self.branch7x7dbl_2(branch7x7dbl) + branch7x7dbl = self.branch7x7dbl_3(branch7x7dbl) + branch7x7dbl = self.branch7x7dbl_4(branch7x7dbl) + branch7x7dbl = self.branch7x7dbl_5(branch7x7dbl) + + branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1) + branch_pool = self.branch_pool(branch_pool) + + outputs = [branch1x1, branch7x7, branch7x7dbl, branch_pool] + return outputs + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return torch.cat(outputs, 1) + + +class InceptionD(nn.Module): + def __init__(self, in_channels: int, conv_block: Optional[Callable[..., nn.Module]] = None) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.branch3x3_1 = conv_block(in_channels, 192, kernel_size=1) + self.branch3x3_2 = conv_block(192, 320, kernel_size=3, stride=2) + + self.branch7x7x3_1 = conv_block(in_channels, 192, kernel_size=1) + self.branch7x7x3_2 = conv_block(192, 192, kernel_size=(1, 7), padding=(0, 3)) + self.branch7x7x3_3 = conv_block(192, 192, kernel_size=(7, 1), padding=(3, 0)) + self.branch7x7x3_4 = conv_block(192, 192, kernel_size=3, stride=2) + + def _forward(self, x: Tensor) -> List[Tensor]: + branch3x3 = self.branch3x3_1(x) + branch3x3 = self.branch3x3_2(branch3x3) + + branch7x7x3 = self.branch7x7x3_1(x) + branch7x7x3 = self.branch7x7x3_2(branch7x7x3) + branch7x7x3 = self.branch7x7x3_3(branch7x7x3) + branch7x7x3 = self.branch7x7x3_4(branch7x7x3) + + branch_pool = F.max_pool2d(x, kernel_size=3, stride=2) + outputs = [branch3x3, branch7x7x3, branch_pool] + return outputs + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return torch.cat(outputs, 1) + + +class InceptionE(nn.Module): + def __init__(self, in_channels: int, conv_block: Optional[Callable[..., nn.Module]] = None) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.branch1x1 = conv_block(in_channels, 320, kernel_size=1) + + self.branch3x3_1 = conv_block(in_channels, 384, kernel_size=1) + self.branch3x3_2a = conv_block(384, 384, kernel_size=(1, 3), padding=(0, 1)) + self.branch3x3_2b = conv_block(384, 384, kernel_size=(3, 1), padding=(1, 0)) + + self.branch3x3dbl_1 = conv_block(in_channels, 448, kernel_size=1) + self.branch3x3dbl_2 = conv_block(448, 384, kernel_size=3, padding=1) + self.branch3x3dbl_3a = conv_block(384, 384, kernel_size=(1, 3), padding=(0, 1)) + self.branch3x3dbl_3b = conv_block(384, 384, kernel_size=(3, 1), padding=(1, 0)) + + self.branch_pool = conv_block(in_channels, 192, kernel_size=1) + + def _forward(self, x: Tensor) -> List[Tensor]: + branch1x1 = self.branch1x1(x) + + branch3x3 = self.branch3x3_1(x) + branch3x3 = [ + self.branch3x3_2a(branch3x3), + self.branch3x3_2b(branch3x3), + ] + branch3x3 = torch.cat(branch3x3, 1) + + branch3x3dbl = self.branch3x3dbl_1(x) + branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl) + branch3x3dbl = [ + self.branch3x3dbl_3a(branch3x3dbl), + self.branch3x3dbl_3b(branch3x3dbl), + ] + branch3x3dbl = torch.cat(branch3x3dbl, 1) + + branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1) + branch_pool = self.branch_pool(branch_pool) + + outputs = [branch1x1, branch3x3, branch3x3dbl, branch_pool] + return outputs + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return torch.cat(outputs, 1) + + +class InceptionAux(nn.Module): + def __init__( + self, in_channels: int, num_classes: int, conv_block: Optional[Callable[..., nn.Module]] = None + ) -> None: + super().__init__() + if conv_block is None: + conv_block = BasicConv2d + self.conv0 = conv_block(in_channels, 128, kernel_size=1) + self.conv1 = conv_block(128, 768, kernel_size=5) + self.conv1.stddev = 0.01 # type: ignore[assignment] + self.fc = nn.Linear(768, num_classes) + self.fc.stddev = 0.001 # type: ignore[assignment] + + def forward(self, x: Tensor) -> Tensor: + # N x 768 x 17 x 17 + x = F.avg_pool2d(x, kernel_size=5, stride=3) + # N x 768 x 5 x 5 + x = self.conv0(x) + # N x 128 x 5 x 5 + x = self.conv1(x) + # N x 768 x 1 x 1 + # Adaptive average pooling + x = F.adaptive_avg_pool2d(x, (1, 1)) + # N x 768 x 1 x 1 + x = torch.flatten(x, 1) + # N x 768 + x = self.fc(x) + # N x 1000 + return x + + +class BasicConv2d(nn.Module): + def __init__(self, in_channels: int, out_channels: int, **kwargs: Any) -> None: + super().__init__() + self.conv = nn.Conv2d(in_channels, out_channels, bias=False, **kwargs) + self.bn = nn.BatchNorm2d(out_channels, eps=0.001) + + def forward(self, x: Tensor) -> Tensor: + x = self.conv(x) + x = self.bn(x) + return F.relu(x, inplace=True) + + +class Inception_V3_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/inception_v3_google-0cc3c7bd.pth", + transforms=partial(ImageClassification, crop_size=299, resize_size=342), + meta={ + "num_params": 27161264, + "min_size": (75, 75), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#inception-v3", + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.294, + "acc@5": 93.450, + } + }, + "_ops": 5.713, + "_file_size": 103.903, + "_docs": """These weights are ported from the original paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Inception_V3_Weights.IMAGENET1K_V1)) +def inception_v3(*, weights: Optional[Inception_V3_Weights] = None, progress: bool = True, **kwargs: Any) -> Inception3: + """ + Inception v3 model architecture from + `Rethinking the Inception Architecture for Computer Vision `_. + + .. note:: + **Important**: In contrast to the other models the inception_v3 expects tensors with a size of + N x 3 x 299 x 299, so ensure your images are sized accordingly. + + Args: + weights (:class:`~torchvision.models.Inception_V3_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.Inception_V3_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.Inception3`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Inception_V3_Weights + :members: + """ + weights = Inception_V3_Weights.verify(weights) + + original_aux_logits = kwargs.get("aux_logits", True) + if weights is not None: + if "transform_input" not in kwargs: + _ovewrite_named_param(kwargs, "transform_input", True) + _ovewrite_named_param(kwargs, "aux_logits", True) + _ovewrite_named_param(kwargs, "init_weights", False) + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = Inception3(**kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if not original_aux_logits: + model.aux_logits = False + model.AuxLogits = None + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/maxvit.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/maxvit.py new file mode 100644 index 0000000000000000000000000000000000000000..584d6568656117751ddca42924c825b26b9d6967 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/maxvit.py @@ -0,0 +1,833 @@ +import math +from collections import OrderedDict +from functools import partial +from typing import Any, Callable, List, Optional, Sequence, Tuple + +import numpy as np +import torch +import torch.nn.functional as F +from torch import nn, Tensor +from torchvision.models._api import register_model, Weights, WeightsEnum +from torchvision.models._meta import _IMAGENET_CATEGORIES +from torchvision.models._utils import _ovewrite_named_param, handle_legacy_interface +from torchvision.ops.misc import Conv2dNormActivation, SqueezeExcitation +from torchvision.ops.stochastic_depth import StochasticDepth +from torchvision.transforms._presets import ImageClassification, InterpolationMode +from torchvision.utils import _log_api_usage_once + +__all__ = [ + "MaxVit", + "MaxVit_T_Weights", + "maxvit_t", +] + + +def _get_conv_output_shape(input_size: Tuple[int, int], kernel_size: int, stride: int, padding: int) -> Tuple[int, int]: + return ( + (input_size[0] - kernel_size + 2 * padding) // stride + 1, + (input_size[1] - kernel_size + 2 * padding) // stride + 1, + ) + + +def _make_block_input_shapes(input_size: Tuple[int, int], n_blocks: int) -> List[Tuple[int, int]]: + """Util function to check that the input size is correct for a MaxVit configuration.""" + shapes = [] + block_input_shape = _get_conv_output_shape(input_size, 3, 2, 1) + for _ in range(n_blocks): + block_input_shape = _get_conv_output_shape(block_input_shape, 3, 2, 1) + shapes.append(block_input_shape) + return shapes + + +def _get_relative_position_index(height: int, width: int) -> torch.Tensor: + coords = torch.stack(torch.meshgrid([torch.arange(height), torch.arange(width)], indexing="ij")) + coords_flat = torch.flatten(coords, 1) + relative_coords = coords_flat[:, :, None] - coords_flat[:, None, :] + relative_coords = relative_coords.permute(1, 2, 0).contiguous() + relative_coords[:, :, 0] += height - 1 + relative_coords[:, :, 1] += width - 1 + relative_coords[:, :, 0] *= 2 * width - 1 + return relative_coords.sum(-1) + + +class MBConv(nn.Module): + """MBConv: Mobile Inverted Residual Bottleneck. + + Args: + in_channels (int): Number of input channels. + out_channels (int): Number of output channels. + expansion_ratio (float): Expansion ratio in the bottleneck. + squeeze_ratio (float): Squeeze ratio in the SE Layer. + stride (int): Stride of the depthwise convolution. + activation_layer (Callable[..., nn.Module]): Activation function. + norm_layer (Callable[..., nn.Module]): Normalization function. + p_stochastic_dropout (float): Probability of stochastic depth. + """ + + def __init__( + self, + in_channels: int, + out_channels: int, + expansion_ratio: float, + squeeze_ratio: float, + stride: int, + activation_layer: Callable[..., nn.Module], + norm_layer: Callable[..., nn.Module], + p_stochastic_dropout: float = 0.0, + ) -> None: + super().__init__() + + proj: Sequence[nn.Module] + self.proj: nn.Module + + should_proj = stride != 1 or in_channels != out_channels + if should_proj: + proj = [nn.Conv2d(in_channels, out_channels, kernel_size=1, stride=1, bias=True)] + if stride == 2: + proj = [nn.AvgPool2d(kernel_size=3, stride=stride, padding=1)] + proj # type: ignore + self.proj = nn.Sequential(*proj) + else: + self.proj = nn.Identity() # type: ignore + + mid_channels = int(out_channels * expansion_ratio) + sqz_channels = int(out_channels * squeeze_ratio) + + if p_stochastic_dropout: + self.stochastic_depth = StochasticDepth(p_stochastic_dropout, mode="row") # type: ignore + else: + self.stochastic_depth = nn.Identity() # type: ignore + + _layers = OrderedDict() + _layers["pre_norm"] = norm_layer(in_channels) + _layers["conv_a"] = Conv2dNormActivation( + in_channels, + mid_channels, + kernel_size=1, + stride=1, + padding=0, + activation_layer=activation_layer, + norm_layer=norm_layer, + inplace=None, + ) + _layers["conv_b"] = Conv2dNormActivation( + mid_channels, + mid_channels, + kernel_size=3, + stride=stride, + padding=1, + activation_layer=activation_layer, + norm_layer=norm_layer, + groups=mid_channels, + inplace=None, + ) + _layers["squeeze_excitation"] = SqueezeExcitation(mid_channels, sqz_channels, activation=nn.SiLU) + _layers["conv_c"] = nn.Conv2d(in_channels=mid_channels, out_channels=out_channels, kernel_size=1, bias=True) + + self.layers = nn.Sequential(_layers) + + def forward(self, x: Tensor) -> Tensor: + """ + Args: + x (Tensor): Input tensor with expected layout of [B, C, H, W]. + Returns: + Tensor: Output tensor with expected layout of [B, C, H / stride, W / stride]. + """ + res = self.proj(x) + x = self.stochastic_depth(self.layers(x)) + return res + x + + +class RelativePositionalMultiHeadAttention(nn.Module): + """Relative Positional Multi-Head Attention. + + Args: + feat_dim (int): Number of input features. + head_dim (int): Number of features per head. + max_seq_len (int): Maximum sequence length. + """ + + def __init__( + self, + feat_dim: int, + head_dim: int, + max_seq_len: int, + ) -> None: + super().__init__() + + if feat_dim % head_dim != 0: + raise ValueError(f"feat_dim: {feat_dim} must be divisible by head_dim: {head_dim}") + + self.n_heads = feat_dim // head_dim + self.head_dim = head_dim + self.size = int(math.sqrt(max_seq_len)) + self.max_seq_len = max_seq_len + + self.to_qkv = nn.Linear(feat_dim, self.n_heads * self.head_dim * 3) + self.scale_factor = feat_dim**-0.5 + + self.merge = nn.Linear(self.head_dim * self.n_heads, feat_dim) + self.relative_position_bias_table = nn.parameter.Parameter( + torch.empty(((2 * self.size - 1) * (2 * self.size - 1), self.n_heads), dtype=torch.float32), + ) + + self.register_buffer("relative_position_index", _get_relative_position_index(self.size, self.size)) + # initialize with truncated normal the bias + torch.nn.init.trunc_normal_(self.relative_position_bias_table, std=0.02) + + def get_relative_positional_bias(self) -> torch.Tensor: + bias_index = self.relative_position_index.view(-1) # type: ignore + relative_bias = self.relative_position_bias_table[bias_index].view(self.max_seq_len, self.max_seq_len, -1) # type: ignore + relative_bias = relative_bias.permute(2, 0, 1).contiguous() + return relative_bias.unsqueeze(0) + + def forward(self, x: Tensor) -> Tensor: + """ + Args: + x (Tensor): Input tensor with expected layout of [B, G, P, D]. + Returns: + Tensor: Output tensor with expected layout of [B, G, P, D]. + """ + B, G, P, D = x.shape + H, DH = self.n_heads, self.head_dim + + qkv = self.to_qkv(x) + q, k, v = torch.chunk(qkv, 3, dim=-1) + + q = q.reshape(B, G, P, H, DH).permute(0, 1, 3, 2, 4) + k = k.reshape(B, G, P, H, DH).permute(0, 1, 3, 2, 4) + v = v.reshape(B, G, P, H, DH).permute(0, 1, 3, 2, 4) + + k = k * self.scale_factor + dot_prod = torch.einsum("B G H I D, B G H J D -> B G H I J", q, k) + pos_bias = self.get_relative_positional_bias() + + dot_prod = F.softmax(dot_prod + pos_bias, dim=-1) + + out = torch.einsum("B G H I J, B G H J D -> B G H I D", dot_prod, v) + out = out.permute(0, 1, 3, 2, 4).reshape(B, G, P, D) + + out = self.merge(out) + return out + + +class SwapAxes(nn.Module): + """Permute the axes of a tensor.""" + + def __init__(self, a: int, b: int) -> None: + super().__init__() + self.a = a + self.b = b + + def forward(self, x: torch.Tensor) -> torch.Tensor: + res = torch.swapaxes(x, self.a, self.b) + return res + + +class WindowPartition(nn.Module): + """ + Partition the input tensor into non-overlapping windows. + """ + + def __init__(self) -> None: + super().__init__() + + def forward(self, x: Tensor, p: int) -> Tensor: + """ + Args: + x (Tensor): Input tensor with expected layout of [B, C, H, W]. + p (int): Number of partitions. + Returns: + Tensor: Output tensor with expected layout of [B, H/P, W/P, P*P, C]. + """ + B, C, H, W = x.shape + P = p + # chunk up H and W dimensions + x = x.reshape(B, C, H // P, P, W // P, P) + x = x.permute(0, 2, 4, 3, 5, 1) + # colapse P * P dimension + x = x.reshape(B, (H // P) * (W // P), P * P, C) + return x + + +class WindowDepartition(nn.Module): + """ + Departition the input tensor of non-overlapping windows into a feature volume of layout [B, C, H, W]. + """ + + def __init__(self) -> None: + super().__init__() + + def forward(self, x: Tensor, p: int, h_partitions: int, w_partitions: int) -> Tensor: + """ + Args: + x (Tensor): Input tensor with expected layout of [B, (H/P * W/P), P*P, C]. + p (int): Number of partitions. + h_partitions (int): Number of vertical partitions. + w_partitions (int): Number of horizontal partitions. + Returns: + Tensor: Output tensor with expected layout of [B, C, H, W]. + """ + B, G, PP, C = x.shape + P = p + HP, WP = h_partitions, w_partitions + # split P * P dimension into 2 P tile dimensionsa + x = x.reshape(B, HP, WP, P, P, C) + # permute into B, C, HP, P, WP, P + x = x.permute(0, 5, 1, 3, 2, 4) + # reshape into B, C, H, W + x = x.reshape(B, C, HP * P, WP * P) + return x + + +class PartitionAttentionLayer(nn.Module): + """ + Layer for partitioning the input tensor into non-overlapping windows and applying attention to each window. + + Args: + in_channels (int): Number of input channels. + head_dim (int): Dimension of each attention head. + partition_size (int): Size of the partitions. + partition_type (str): Type of partitioning to use. Can be either "grid" or "window". + grid_size (Tuple[int, int]): Size of the grid to partition the input tensor into. + mlp_ratio (int): Ratio of the feature size expansion in the MLP layer. + activation_layer (Callable[..., nn.Module]): Activation function to use. + norm_layer (Callable[..., nn.Module]): Normalization function to use. + attention_dropout (float): Dropout probability for the attention layer. + mlp_dropout (float): Dropout probability for the MLP layer. + p_stochastic_dropout (float): Probability of dropping out a partition. + """ + + def __init__( + self, + in_channels: int, + head_dim: int, + # partitioning parameters + partition_size: int, + partition_type: str, + # grid size needs to be known at initialization time + # because we need to know hamy relative offsets there are in the grid + grid_size: Tuple[int, int], + mlp_ratio: int, + activation_layer: Callable[..., nn.Module], + norm_layer: Callable[..., nn.Module], + attention_dropout: float, + mlp_dropout: float, + p_stochastic_dropout: float, + ) -> None: + super().__init__() + + self.n_heads = in_channels // head_dim + self.head_dim = head_dim + self.n_partitions = grid_size[0] // partition_size + self.partition_type = partition_type + self.grid_size = grid_size + + if partition_type not in ["grid", "window"]: + raise ValueError("partition_type must be either 'grid' or 'window'") + + if partition_type == "window": + self.p, self.g = partition_size, self.n_partitions + else: + self.p, self.g = self.n_partitions, partition_size + + self.partition_op = WindowPartition() + self.departition_op = WindowDepartition() + self.partition_swap = SwapAxes(-2, -3) if partition_type == "grid" else nn.Identity() + self.departition_swap = SwapAxes(-2, -3) if partition_type == "grid" else nn.Identity() + + self.attn_layer = nn.Sequential( + norm_layer(in_channels), + # it's always going to be partition_size ** 2 because + # of the axis swap in the case of grid partitioning + RelativePositionalMultiHeadAttention(in_channels, head_dim, partition_size**2), + nn.Dropout(attention_dropout), + ) + + # pre-normalization similar to transformer layers + self.mlp_layer = nn.Sequential( + nn.LayerNorm(in_channels), + nn.Linear(in_channels, in_channels * mlp_ratio), + activation_layer(), + nn.Linear(in_channels * mlp_ratio, in_channels), + nn.Dropout(mlp_dropout), + ) + + # layer scale factors + self.stochastic_dropout = StochasticDepth(p_stochastic_dropout, mode="row") + + def forward(self, x: Tensor) -> Tensor: + """ + Args: + x (Tensor): Input tensor with expected layout of [B, C, H, W]. + Returns: + Tensor: Output tensor with expected layout of [B, C, H, W]. + """ + + # Undefined behavior if H or W are not divisible by p + # https://github.com/google-research/maxvit/blob/da76cf0d8a6ec668cc31b399c4126186da7da944/maxvit/models/maxvit.py#L766 + gh, gw = self.grid_size[0] // self.p, self.grid_size[1] // self.p + torch._assert( + self.grid_size[0] % self.p == 0 and self.grid_size[1] % self.p == 0, + "Grid size must be divisible by partition size. Got grid size of {} and partition size of {}".format( + self.grid_size, self.p + ), + ) + + x = self.partition_op(x, self.p) + x = self.partition_swap(x) + x = x + self.stochastic_dropout(self.attn_layer(x)) + x = x + self.stochastic_dropout(self.mlp_layer(x)) + x = self.departition_swap(x) + x = self.departition_op(x, self.p, gh, gw) + + return x + + +class MaxVitLayer(nn.Module): + """ + MaxVit layer consisting of a MBConv layer followed by a PartitionAttentionLayer with `window` and a PartitionAttentionLayer with `grid`. + + Args: + in_channels (int): Number of input channels. + out_channels (int): Number of output channels. + expansion_ratio (float): Expansion ratio in the bottleneck. + squeeze_ratio (float): Squeeze ratio in the SE Layer. + stride (int): Stride of the depthwise convolution. + activation_layer (Callable[..., nn.Module]): Activation function. + norm_layer (Callable[..., nn.Module]): Normalization function. + head_dim (int): Dimension of the attention heads. + mlp_ratio (int): Ratio of the MLP layer. + mlp_dropout (float): Dropout probability for the MLP layer. + attention_dropout (float): Dropout probability for the attention layer. + p_stochastic_dropout (float): Probability of stochastic depth. + partition_size (int): Size of the partitions. + grid_size (Tuple[int, int]): Size of the input feature grid. + """ + + def __init__( + self, + # conv parameters + in_channels: int, + out_channels: int, + squeeze_ratio: float, + expansion_ratio: float, + stride: int, + # conv + transformer parameters + norm_layer: Callable[..., nn.Module], + activation_layer: Callable[..., nn.Module], + # transformer parameters + head_dim: int, + mlp_ratio: int, + mlp_dropout: float, + attention_dropout: float, + p_stochastic_dropout: float, + # partitioning parameters + partition_size: int, + grid_size: Tuple[int, int], + ) -> None: + super().__init__() + + layers: OrderedDict = OrderedDict() + + # convolutional layer + layers["MBconv"] = MBConv( + in_channels=in_channels, + out_channels=out_channels, + expansion_ratio=expansion_ratio, + squeeze_ratio=squeeze_ratio, + stride=stride, + activation_layer=activation_layer, + norm_layer=norm_layer, + p_stochastic_dropout=p_stochastic_dropout, + ) + # attention layers, block -> grid + layers["window_attention"] = PartitionAttentionLayer( + in_channels=out_channels, + head_dim=head_dim, + partition_size=partition_size, + partition_type="window", + grid_size=grid_size, + mlp_ratio=mlp_ratio, + activation_layer=activation_layer, + norm_layer=nn.LayerNorm, + attention_dropout=attention_dropout, + mlp_dropout=mlp_dropout, + p_stochastic_dropout=p_stochastic_dropout, + ) + layers["grid_attention"] = PartitionAttentionLayer( + in_channels=out_channels, + head_dim=head_dim, + partition_size=partition_size, + partition_type="grid", + grid_size=grid_size, + mlp_ratio=mlp_ratio, + activation_layer=activation_layer, + norm_layer=nn.LayerNorm, + attention_dropout=attention_dropout, + mlp_dropout=mlp_dropout, + p_stochastic_dropout=p_stochastic_dropout, + ) + self.layers = nn.Sequential(layers) + + def forward(self, x: Tensor) -> Tensor: + """ + Args: + x (Tensor): Input tensor of shape (B, C, H, W). + Returns: + Tensor: Output tensor of shape (B, C, H, W). + """ + x = self.layers(x) + return x + + +class MaxVitBlock(nn.Module): + """ + A MaxVit block consisting of `n_layers` MaxVit layers. + + Args: + in_channels (int): Number of input channels. + out_channels (int): Number of output channels. + expansion_ratio (float): Expansion ratio in the bottleneck. + squeeze_ratio (float): Squeeze ratio in the SE Layer. + activation_layer (Callable[..., nn.Module]): Activation function. + norm_layer (Callable[..., nn.Module]): Normalization function. + head_dim (int): Dimension of the attention heads. + mlp_ratio (int): Ratio of the MLP layer. + mlp_dropout (float): Dropout probability for the MLP layer. + attention_dropout (float): Dropout probability for the attention layer. + p_stochastic_dropout (float): Probability of stochastic depth. + partition_size (int): Size of the partitions. + input_grid_size (Tuple[int, int]): Size of the input feature grid. + n_layers (int): Number of layers in the block. + p_stochastic (List[float]): List of probabilities for stochastic depth for each layer. + """ + + def __init__( + self, + # conv parameters + in_channels: int, + out_channels: int, + squeeze_ratio: float, + expansion_ratio: float, + # conv + transformer parameters + norm_layer: Callable[..., nn.Module], + activation_layer: Callable[..., nn.Module], + # transformer parameters + head_dim: int, + mlp_ratio: int, + mlp_dropout: float, + attention_dropout: float, + # partitioning parameters + partition_size: int, + input_grid_size: Tuple[int, int], + # number of layers + n_layers: int, + p_stochastic: List[float], + ) -> None: + super().__init__() + if not len(p_stochastic) == n_layers: + raise ValueError(f"p_stochastic must have length n_layers={n_layers}, got p_stochastic={p_stochastic}.") + + self.layers = nn.ModuleList() + # account for the first stride of the first layer + self.grid_size = _get_conv_output_shape(input_grid_size, kernel_size=3, stride=2, padding=1) + + for idx, p in enumerate(p_stochastic): + stride = 2 if idx == 0 else 1 + self.layers += [ + MaxVitLayer( + in_channels=in_channels if idx == 0 else out_channels, + out_channels=out_channels, + squeeze_ratio=squeeze_ratio, + expansion_ratio=expansion_ratio, + stride=stride, + norm_layer=norm_layer, + activation_layer=activation_layer, + head_dim=head_dim, + mlp_ratio=mlp_ratio, + mlp_dropout=mlp_dropout, + attention_dropout=attention_dropout, + partition_size=partition_size, + grid_size=self.grid_size, + p_stochastic_dropout=p, + ), + ] + + def forward(self, x: Tensor) -> Tensor: + """ + Args: + x (Tensor): Input tensor of shape (B, C, H, W). + Returns: + Tensor: Output tensor of shape (B, C, H, W). + """ + for layer in self.layers: + x = layer(x) + return x + + +class MaxVit(nn.Module): + """ + Implements MaxVit Transformer from the `MaxViT: Multi-Axis Vision Transformer `_ paper. + Args: + input_size (Tuple[int, int]): Size of the input image. + stem_channels (int): Number of channels in the stem. + partition_size (int): Size of the partitions. + block_channels (List[int]): Number of channels in each block. + block_layers (List[int]): Number of layers in each block. + stochastic_depth_prob (float): Probability of stochastic depth. Expands to a list of probabilities for each layer that scales linearly to the specified value. + squeeze_ratio (float): Squeeze ratio in the SE Layer. Default: 0.25. + expansion_ratio (float): Expansion ratio in the MBConv bottleneck. Default: 4. + norm_layer (Callable[..., nn.Module]): Normalization function. Default: None (setting to None will produce a `BatchNorm2d(eps=1e-3, momentum=0.01)`). + activation_layer (Callable[..., nn.Module]): Activation function Default: nn.GELU. + head_dim (int): Dimension of the attention heads. + mlp_ratio (int): Expansion ratio of the MLP layer. Default: 4. + mlp_dropout (float): Dropout probability for the MLP layer. Default: 0.0. + attention_dropout (float): Dropout probability for the attention layer. Default: 0.0. + num_classes (int): Number of classes. Default: 1000. + """ + + def __init__( + self, + # input size parameters + input_size: Tuple[int, int], + # stem and task parameters + stem_channels: int, + # partitioning parameters + partition_size: int, + # block parameters + block_channels: List[int], + block_layers: List[int], + # attention head dimensions + head_dim: int, + stochastic_depth_prob: float, + # conv + transformer parameters + # norm_layer is applied only to the conv layers + # activation_layer is applied both to conv and transformer layers + norm_layer: Optional[Callable[..., nn.Module]] = None, + activation_layer: Callable[..., nn.Module] = nn.GELU, + # conv parameters + squeeze_ratio: float = 0.25, + expansion_ratio: float = 4, + # transformer parameters + mlp_ratio: int = 4, + mlp_dropout: float = 0.0, + attention_dropout: float = 0.0, + # task parameters + num_classes: int = 1000, + ) -> None: + super().__init__() + _log_api_usage_once(self) + + input_channels = 3 + + # https://github.com/google-research/maxvit/blob/da76cf0d8a6ec668cc31b399c4126186da7da944/maxvit/models/maxvit.py#L1029-L1030 + # for the exact parameters used in batchnorm + if norm_layer is None: + norm_layer = partial(nn.BatchNorm2d, eps=1e-3, momentum=0.01) + + # Make sure input size will be divisible by the partition size in all blocks + # Undefined behavior if H or W are not divisible by p + # https://github.com/google-research/maxvit/blob/da76cf0d8a6ec668cc31b399c4126186da7da944/maxvit/models/maxvit.py#L766 + block_input_sizes = _make_block_input_shapes(input_size, len(block_channels)) + for idx, block_input_size in enumerate(block_input_sizes): + if block_input_size[0] % partition_size != 0 or block_input_size[1] % partition_size != 0: + raise ValueError( + f"Input size {block_input_size} of block {idx} is not divisible by partition size {partition_size}. " + f"Consider changing the partition size or the input size.\n" + f"Current configuration yields the following block input sizes: {block_input_sizes}." + ) + + # stem + self.stem = nn.Sequential( + Conv2dNormActivation( + input_channels, + stem_channels, + 3, + stride=2, + norm_layer=norm_layer, + activation_layer=activation_layer, + bias=False, + inplace=None, + ), + Conv2dNormActivation( + stem_channels, stem_channels, 3, stride=1, norm_layer=None, activation_layer=None, bias=True + ), + ) + + # account for stem stride + input_size = _get_conv_output_shape(input_size, kernel_size=3, stride=2, padding=1) + self.partition_size = partition_size + + # blocks + self.blocks = nn.ModuleList() + in_channels = [stem_channels] + block_channels[:-1] + out_channels = block_channels + + # precompute the stochastich depth probabilities from 0 to stochastic_depth_prob + # since we have N blocks with L layers, we will have N * L probabilities uniformly distributed + # over the range [0, stochastic_depth_prob] + p_stochastic = np.linspace(0, stochastic_depth_prob, sum(block_layers)).tolist() + + p_idx = 0 + for in_channel, out_channel, num_layers in zip(in_channels, out_channels, block_layers): + self.blocks.append( + MaxVitBlock( + in_channels=in_channel, + out_channels=out_channel, + squeeze_ratio=squeeze_ratio, + expansion_ratio=expansion_ratio, + norm_layer=norm_layer, + activation_layer=activation_layer, + head_dim=head_dim, + mlp_ratio=mlp_ratio, + mlp_dropout=mlp_dropout, + attention_dropout=attention_dropout, + partition_size=partition_size, + input_grid_size=input_size, + n_layers=num_layers, + p_stochastic=p_stochastic[p_idx : p_idx + num_layers], + ), + ) + input_size = self.blocks[-1].grid_size # type: ignore[assignment] + p_idx += num_layers + + # see https://github.com/google-research/maxvit/blob/da76cf0d8a6ec668cc31b399c4126186da7da944/maxvit/models/maxvit.py#L1137-L1158 + # for why there is Linear -> Tanh -> Linear + self.classifier = nn.Sequential( + nn.AdaptiveAvgPool2d(1), + nn.Flatten(), + nn.LayerNorm(block_channels[-1]), + nn.Linear(block_channels[-1], block_channels[-1]), + nn.Tanh(), + nn.Linear(block_channels[-1], num_classes, bias=False), + ) + + self._init_weights() + + def forward(self, x: Tensor) -> Tensor: + x = self.stem(x) + for block in self.blocks: + x = block(x) + x = self.classifier(x) + return x + + def _init_weights(self): + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.normal_(m.weight, std=0.02) + if m.bias is not None: + nn.init.zeros_(m.bias) + elif isinstance(m, nn.BatchNorm2d): + nn.init.constant_(m.weight, 1) + nn.init.constant_(m.bias, 0) + elif isinstance(m, nn.Linear): + nn.init.normal_(m.weight, std=0.02) + if m.bias is not None: + nn.init.zeros_(m.bias) + + +def _maxvit( + # stem parameters + stem_channels: int, + # block parameters + block_channels: List[int], + block_layers: List[int], + stochastic_depth_prob: float, + # partitioning parameters + partition_size: int, + # transformer parameters + head_dim: int, + # Weights API + weights: Optional[WeightsEnum] = None, + progress: bool = False, + # kwargs, + **kwargs: Any, +) -> MaxVit: + + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + assert weights.meta["min_size"][0] == weights.meta["min_size"][1] + _ovewrite_named_param(kwargs, "input_size", weights.meta["min_size"]) + + input_size = kwargs.pop("input_size", (224, 224)) + + model = MaxVit( + stem_channels=stem_channels, + block_channels=block_channels, + block_layers=block_layers, + stochastic_depth_prob=stochastic_depth_prob, + head_dim=head_dim, + partition_size=partition_size, + input_size=input_size, + **kwargs, + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +class MaxVit_T_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # URL empty until official release + url="https://download.pytorch.org/models/maxvit_t-bc5ab103.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=224, interpolation=InterpolationMode.BICUBIC + ), + meta={ + "categories": _IMAGENET_CATEGORIES, + "num_params": 30919624, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#maxvit", + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.700, + "acc@5": 96.722, + } + }, + "_ops": 5.558, + "_file_size": 118.769, + "_docs": """These weights reproduce closely the results of the paper using a similar training recipe. + They were trained with a BatchNorm2D momentum of 0.99 instead of the more correct 0.01.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MaxVit_T_Weights.IMAGENET1K_V1)) +def maxvit_t(*, weights: Optional[MaxVit_T_Weights] = None, progress: bool = True, **kwargs: Any) -> MaxVit: + """ + Constructs a maxvit_t architecture from + `MaxViT: Multi-Axis Vision Transformer `_. + + Args: + weights (:class:`~torchvision.models.MaxVit_T_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MaxVit_T_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.maxvit.MaxVit`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MaxVit_T_Weights + :members: + """ + weights = MaxVit_T_Weights.verify(weights) + + return _maxvit( + stem_channels=64, + block_channels=[64, 128, 256, 512], + block_layers=[2, 2, 5, 2], + head_dim=32, + stochastic_depth_prob=0.2, + partition_size=7, + weights=weights, + progress=progress, + **kwargs, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mnasnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mnasnet.py new file mode 100644 index 0000000000000000000000000000000000000000..25bf7accf7757a29aa0a5332bf6f0895c4b23fd0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mnasnet.py @@ -0,0 +1,434 @@ +import warnings +from functools import partial +from typing import Any, Dict, List, Optional + +import torch +import torch.nn as nn +from torch import Tensor + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "MNASNet", + "MNASNet0_5_Weights", + "MNASNet0_75_Weights", + "MNASNet1_0_Weights", + "MNASNet1_3_Weights", + "mnasnet0_5", + "mnasnet0_75", + "mnasnet1_0", + "mnasnet1_3", +] + + +# Paper suggests 0.9997 momentum, for TensorFlow. Equivalent PyTorch momentum is +# 1.0 - tensorflow. +_BN_MOMENTUM = 1 - 0.9997 + + +class _InvertedResidual(nn.Module): + def __init__( + self, in_ch: int, out_ch: int, kernel_size: int, stride: int, expansion_factor: int, bn_momentum: float = 0.1 + ) -> None: + super().__init__() + if stride not in [1, 2]: + raise ValueError(f"stride should be 1 or 2 instead of {stride}") + if kernel_size not in [3, 5]: + raise ValueError(f"kernel_size should be 3 or 5 instead of {kernel_size}") + mid_ch = in_ch * expansion_factor + self.apply_residual = in_ch == out_ch and stride == 1 + self.layers = nn.Sequential( + # Pointwise + nn.Conv2d(in_ch, mid_ch, 1, bias=False), + nn.BatchNorm2d(mid_ch, momentum=bn_momentum), + nn.ReLU(inplace=True), + # Depthwise + nn.Conv2d(mid_ch, mid_ch, kernel_size, padding=kernel_size // 2, stride=stride, groups=mid_ch, bias=False), + nn.BatchNorm2d(mid_ch, momentum=bn_momentum), + nn.ReLU(inplace=True), + # Linear pointwise. Note that there's no activation. + nn.Conv2d(mid_ch, out_ch, 1, bias=False), + nn.BatchNorm2d(out_ch, momentum=bn_momentum), + ) + + def forward(self, input: Tensor) -> Tensor: + if self.apply_residual: + return self.layers(input) + input + else: + return self.layers(input) + + +def _stack( + in_ch: int, out_ch: int, kernel_size: int, stride: int, exp_factor: int, repeats: int, bn_momentum: float +) -> nn.Sequential: + """Creates a stack of inverted residuals.""" + if repeats < 1: + raise ValueError(f"repeats should be >= 1, instead got {repeats}") + # First one has no skip, because feature map size changes. + first = _InvertedResidual(in_ch, out_ch, kernel_size, stride, exp_factor, bn_momentum=bn_momentum) + remaining = [] + for _ in range(1, repeats): + remaining.append(_InvertedResidual(out_ch, out_ch, kernel_size, 1, exp_factor, bn_momentum=bn_momentum)) + return nn.Sequential(first, *remaining) + + +def _round_to_multiple_of(val: float, divisor: int, round_up_bias: float = 0.9) -> int: + """Asymmetric rounding to make `val` divisible by `divisor`. With default + bias, will round up, unless the number is no more than 10% greater than the + smaller divisible value, i.e. (83, 8) -> 80, but (84, 8) -> 88.""" + if not 0.0 < round_up_bias < 1.0: + raise ValueError(f"round_up_bias should be greater than 0.0 and smaller than 1.0 instead of {round_up_bias}") + new_val = max(divisor, int(val + divisor / 2) // divisor * divisor) + return new_val if new_val >= round_up_bias * val else new_val + divisor + + +def _get_depths(alpha: float) -> List[int]: + """Scales tensor depths as in reference MobileNet code, prefers rounding up + rather than down.""" + depths = [32, 16, 24, 40, 80, 96, 192, 320] + return [_round_to_multiple_of(depth * alpha, 8) for depth in depths] + + +class MNASNet(torch.nn.Module): + """MNASNet, as described in https://arxiv.org/abs/1807.11626. This + implements the B1 variant of the model. + >>> model = MNASNet(1.0, num_classes=1000) + >>> x = torch.rand(1, 3, 224, 224) + >>> y = model(x) + >>> y.dim() + 2 + >>> y.nelement() + 1000 + """ + + # Version 2 adds depth scaling in the initial stages of the network. + _version = 2 + + def __init__(self, alpha: float, num_classes: int = 1000, dropout: float = 0.2) -> None: + super().__init__() + _log_api_usage_once(self) + if alpha <= 0.0: + raise ValueError(f"alpha should be greater than 0.0 instead of {alpha}") + self.alpha = alpha + self.num_classes = num_classes + depths = _get_depths(alpha) + layers = [ + # First layer: regular conv. + nn.Conv2d(3, depths[0], 3, padding=1, stride=2, bias=False), + nn.BatchNorm2d(depths[0], momentum=_BN_MOMENTUM), + nn.ReLU(inplace=True), + # Depthwise separable, no skip. + nn.Conv2d(depths[0], depths[0], 3, padding=1, stride=1, groups=depths[0], bias=False), + nn.BatchNorm2d(depths[0], momentum=_BN_MOMENTUM), + nn.ReLU(inplace=True), + nn.Conv2d(depths[0], depths[1], 1, padding=0, stride=1, bias=False), + nn.BatchNorm2d(depths[1], momentum=_BN_MOMENTUM), + # MNASNet blocks: stacks of inverted residuals. + _stack(depths[1], depths[2], 3, 2, 3, 3, _BN_MOMENTUM), + _stack(depths[2], depths[3], 5, 2, 3, 3, _BN_MOMENTUM), + _stack(depths[3], depths[4], 5, 2, 6, 3, _BN_MOMENTUM), + _stack(depths[4], depths[5], 3, 1, 6, 2, _BN_MOMENTUM), + _stack(depths[5], depths[6], 5, 2, 6, 4, _BN_MOMENTUM), + _stack(depths[6], depths[7], 3, 1, 6, 1, _BN_MOMENTUM), + # Final mapping to classifier input. + nn.Conv2d(depths[7], 1280, 1, padding=0, stride=1, bias=False), + nn.BatchNorm2d(1280, momentum=_BN_MOMENTUM), + nn.ReLU(inplace=True), + ] + self.layers = nn.Sequential(*layers) + self.classifier = nn.Sequential(nn.Dropout(p=dropout, inplace=True), nn.Linear(1280, num_classes)) + + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu") + if m.bias is not None: + nn.init.zeros_(m.bias) + elif isinstance(m, nn.BatchNorm2d): + nn.init.ones_(m.weight) + nn.init.zeros_(m.bias) + elif isinstance(m, nn.Linear): + nn.init.kaiming_uniform_(m.weight, mode="fan_out", nonlinearity="sigmoid") + nn.init.zeros_(m.bias) + + def forward(self, x: Tensor) -> Tensor: + x = self.layers(x) + # Equivalent to global avgpool and removing H and W dimensions. + x = x.mean([2, 3]) + return self.classifier(x) + + def _load_from_state_dict( + self, + state_dict: Dict, + prefix: str, + local_metadata: Dict, + strict: bool, + missing_keys: List[str], + unexpected_keys: List[str], + error_msgs: List[str], + ) -> None: + version = local_metadata.get("version", None) + if version not in [1, 2]: + raise ValueError(f"version shluld be set to 1 or 2 instead of {version}") + + if version == 1 and not self.alpha == 1.0: + # In the initial version of the model (v1), stem was fixed-size. + # All other layer configurations were the same. This will patch + # the model so that it's identical to v1. Model with alpha 1.0 is + # unaffected. + depths = _get_depths(self.alpha) + v1_stem = [ + nn.Conv2d(3, 32, 3, padding=1, stride=2, bias=False), + nn.BatchNorm2d(32, momentum=_BN_MOMENTUM), + nn.ReLU(inplace=True), + nn.Conv2d(32, 32, 3, padding=1, stride=1, groups=32, bias=False), + nn.BatchNorm2d(32, momentum=_BN_MOMENTUM), + nn.ReLU(inplace=True), + nn.Conv2d(32, 16, 1, padding=0, stride=1, bias=False), + nn.BatchNorm2d(16, momentum=_BN_MOMENTUM), + _stack(16, depths[2], 3, 2, 3, 3, _BN_MOMENTUM), + ] + for idx, layer in enumerate(v1_stem): + self.layers[idx] = layer + + # The model is now identical to v1, and must be saved as such. + self._version = 1 + warnings.warn( + "A new version of MNASNet model has been implemented. " + "Your checkpoint was saved using the previous version. " + "This checkpoint will load and work as before, but " + "you may want to upgrade by training a newer model or " + "transfer learning from an updated ImageNet checkpoint.", + UserWarning, + ) + + super()._load_from_state_dict( + state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs + ) + + +_COMMON_META = { + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/1e100/mnasnet_trainer", +} + + +class MNASNet0_5_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/mnasnet0.5_top1_67.823-3ffadce67e.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 2218512, + "_metrics": { + "ImageNet-1K": { + "acc@1": 67.734, + "acc@5": 87.490, + } + }, + "_ops": 0.104, + "_file_size": 8.591, + "_docs": """These weights reproduce closely the results of the paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class MNASNet0_75_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/mnasnet0_75-7090bc5f.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/pull/6019", + "num_params": 3170208, + "_metrics": { + "ImageNet-1K": { + "acc@1": 71.180, + "acc@5": 90.496, + } + }, + "_ops": 0.215, + "_file_size": 12.303, + "_docs": """ + These weights were trained from scratch by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class MNASNet1_0_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/mnasnet1.0_top1_73.512-f206786ef8.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 4383312, + "_metrics": { + "ImageNet-1K": { + "acc@1": 73.456, + "acc@5": 91.510, + } + }, + "_ops": 0.314, + "_file_size": 16.915, + "_docs": """These weights reproduce closely the results of the paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class MNASNet1_3_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/mnasnet1_3-a4c69d6f.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/pull/6019", + "num_params": 6282256, + "_metrics": { + "ImageNet-1K": { + "acc@1": 76.506, + "acc@5": 93.522, + } + }, + "_ops": 0.526, + "_file_size": 24.246, + "_docs": """ + These weights were trained from scratch by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +def _mnasnet(alpha: float, weights: Optional[WeightsEnum], progress: bool, **kwargs: Any) -> MNASNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = MNASNet(alpha, **kwargs) + + if weights: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MNASNet0_5_Weights.IMAGENET1K_V1)) +def mnasnet0_5(*, weights: Optional[MNASNet0_5_Weights] = None, progress: bool = True, **kwargs: Any) -> MNASNet: + """MNASNet with depth multiplier of 0.5 from + `MnasNet: Platform-Aware Neural Architecture Search for Mobile + `_ paper. + + Args: + weights (:class:`~torchvision.models.MNASNet0_5_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MNASNet0_5_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.mnasnet.MNASNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MNASNet0_5_Weights + :members: + """ + weights = MNASNet0_5_Weights.verify(weights) + + return _mnasnet(0.5, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MNASNet0_75_Weights.IMAGENET1K_V1)) +def mnasnet0_75(*, weights: Optional[MNASNet0_75_Weights] = None, progress: bool = True, **kwargs: Any) -> MNASNet: + """MNASNet with depth multiplier of 0.75 from + `MnasNet: Platform-Aware Neural Architecture Search for Mobile + `_ paper. + + Args: + weights (:class:`~torchvision.models.MNASNet0_75_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MNASNet0_75_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.mnasnet.MNASNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MNASNet0_75_Weights + :members: + """ + weights = MNASNet0_75_Weights.verify(weights) + + return _mnasnet(0.75, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MNASNet1_0_Weights.IMAGENET1K_V1)) +def mnasnet1_0(*, weights: Optional[MNASNet1_0_Weights] = None, progress: bool = True, **kwargs: Any) -> MNASNet: + """MNASNet with depth multiplier of 1.0 from + `MnasNet: Platform-Aware Neural Architecture Search for Mobile + `_ paper. + + Args: + weights (:class:`~torchvision.models.MNASNet1_0_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MNASNet1_0_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.mnasnet.MNASNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MNASNet1_0_Weights + :members: + """ + weights = MNASNet1_0_Weights.verify(weights) + + return _mnasnet(1.0, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MNASNet1_3_Weights.IMAGENET1K_V1)) +def mnasnet1_3(*, weights: Optional[MNASNet1_3_Weights] = None, progress: bool = True, **kwargs: Any) -> MNASNet: + """MNASNet with depth multiplier of 1.3 from + `MnasNet: Platform-Aware Neural Architecture Search for Mobile + `_ paper. + + Args: + weights (:class:`~torchvision.models.MNASNet1_3_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MNASNet1_3_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.mnasnet.MNASNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MNASNet1_3_Weights + :members: + """ + weights = MNASNet1_3_Weights.verify(weights) + + return _mnasnet(1.3, weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenet.py new file mode 100644 index 0000000000000000000000000000000000000000..98c00792aa997e26a000d3d3f4d1874484571d08 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenet.py @@ -0,0 +1,6 @@ +from .mobilenetv2 import * # noqa: F401, F403 +from .mobilenetv3 import * # noqa: F401, F403 +from .mobilenetv2 import __all__ as mv2_all +from .mobilenetv3 import __all__ as mv3_all + +__all__ = mv2_all + mv3_all diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenetv2.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenetv2.py new file mode 100644 index 0000000000000000000000000000000000000000..59e5fc146fc25ab423ba84a4969558200dc9b54d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenetv2.py @@ -0,0 +1,260 @@ +from functools import partial +from typing import Any, Callable, List, Optional + +import torch +from torch import nn, Tensor + +from ..ops.misc import Conv2dNormActivation +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _make_divisible, _ovewrite_named_param, handle_legacy_interface + + +__all__ = ["MobileNetV2", "MobileNet_V2_Weights", "mobilenet_v2"] + + +# necessary for backwards compatibility +class InvertedResidual(nn.Module): + def __init__( + self, inp: int, oup: int, stride: int, expand_ratio: int, norm_layer: Optional[Callable[..., nn.Module]] = None + ) -> None: + super().__init__() + self.stride = stride + if stride not in [1, 2]: + raise ValueError(f"stride should be 1 or 2 instead of {stride}") + + if norm_layer is None: + norm_layer = nn.BatchNorm2d + + hidden_dim = int(round(inp * expand_ratio)) + self.use_res_connect = self.stride == 1 and inp == oup + + layers: List[nn.Module] = [] + if expand_ratio != 1: + # pw + layers.append( + Conv2dNormActivation(inp, hidden_dim, kernel_size=1, norm_layer=norm_layer, activation_layer=nn.ReLU6) + ) + layers.extend( + [ + # dw + Conv2dNormActivation( + hidden_dim, + hidden_dim, + stride=stride, + groups=hidden_dim, + norm_layer=norm_layer, + activation_layer=nn.ReLU6, + ), + # pw-linear + nn.Conv2d(hidden_dim, oup, 1, 1, 0, bias=False), + norm_layer(oup), + ] + ) + self.conv = nn.Sequential(*layers) + self.out_channels = oup + self._is_cn = stride > 1 + + def forward(self, x: Tensor) -> Tensor: + if self.use_res_connect: + return x + self.conv(x) + else: + return self.conv(x) + + +class MobileNetV2(nn.Module): + def __init__( + self, + num_classes: int = 1000, + width_mult: float = 1.0, + inverted_residual_setting: Optional[List[List[int]]] = None, + round_nearest: int = 8, + block: Optional[Callable[..., nn.Module]] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + dropout: float = 0.2, + ) -> None: + """ + MobileNet V2 main class + + Args: + num_classes (int): Number of classes + width_mult (float): Width multiplier - adjusts number of channels in each layer by this amount + inverted_residual_setting: Network structure + round_nearest (int): Round the number of channels in each layer to be a multiple of this number + Set to 1 to turn off rounding + block: Module specifying inverted residual building block for mobilenet + norm_layer: Module specifying the normalization layer to use + dropout (float): The droupout probability + + """ + super().__init__() + _log_api_usage_once(self) + + if block is None: + block = InvertedResidual + + if norm_layer is None: + norm_layer = nn.BatchNorm2d + + input_channel = 32 + last_channel = 1280 + + if inverted_residual_setting is None: + inverted_residual_setting = [ + # t, c, n, s + [1, 16, 1, 1], + [6, 24, 2, 2], + [6, 32, 3, 2], + [6, 64, 4, 2], + [6, 96, 3, 1], + [6, 160, 3, 2], + [6, 320, 1, 1], + ] + + # only check the first element, assuming user knows t,c,n,s are required + if len(inverted_residual_setting) == 0 or len(inverted_residual_setting[0]) != 4: + raise ValueError( + f"inverted_residual_setting should be non-empty or a 4-element list, got {inverted_residual_setting}" + ) + + # building first layer + input_channel = _make_divisible(input_channel * width_mult, round_nearest) + self.last_channel = _make_divisible(last_channel * max(1.0, width_mult), round_nearest) + features: List[nn.Module] = [ + Conv2dNormActivation(3, input_channel, stride=2, norm_layer=norm_layer, activation_layer=nn.ReLU6) + ] + # building inverted residual blocks + for t, c, n, s in inverted_residual_setting: + output_channel = _make_divisible(c * width_mult, round_nearest) + for i in range(n): + stride = s if i == 0 else 1 + features.append(block(input_channel, output_channel, stride, expand_ratio=t, norm_layer=norm_layer)) + input_channel = output_channel + # building last several layers + features.append( + Conv2dNormActivation( + input_channel, self.last_channel, kernel_size=1, norm_layer=norm_layer, activation_layer=nn.ReLU6 + ) + ) + # make it nn.Sequential + self.features = nn.Sequential(*features) + + # building classifier + self.classifier = nn.Sequential( + nn.Dropout(p=dropout), + nn.Linear(self.last_channel, num_classes), + ) + + # weight initialization + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out") + if m.bias is not None: + nn.init.zeros_(m.bias) + elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)): + nn.init.ones_(m.weight) + nn.init.zeros_(m.bias) + elif isinstance(m, nn.Linear): + nn.init.normal_(m.weight, 0, 0.01) + nn.init.zeros_(m.bias) + + def _forward_impl(self, x: Tensor) -> Tensor: + # This exists since TorchScript doesn't support inheritance, so the superclass method + # (this one) needs to have a name other than `forward` that can be accessed in a subclass + x = self.features(x) + # Cannot use "squeeze" as batch-size can be 1 + x = nn.functional.adaptive_avg_pool2d(x, (1, 1)) + x = torch.flatten(x, 1) + x = self.classifier(x) + return x + + def forward(self, x: Tensor) -> Tensor: + return self._forward_impl(x) + + +_COMMON_META = { + "num_params": 3504872, + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, +} + + +class MobileNet_V2_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/mobilenet_v2-b0353104.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#mobilenetv2", + "_metrics": { + "ImageNet-1K": { + "acc@1": 71.878, + "acc@5": 90.286, + } + }, + "_ops": 0.301, + "_file_size": 13.555, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/mobilenet_v2-7ebf99e0.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-reg-tuning", + "_metrics": { + "ImageNet-1K": { + "acc@1": 72.154, + "acc@5": 90.822, + } + }, + "_ops": 0.301, + "_file_size": 13.598, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MobileNet_V2_Weights.IMAGENET1K_V1)) +def mobilenet_v2( + *, weights: Optional[MobileNet_V2_Weights] = None, progress: bool = True, **kwargs: Any +) -> MobileNetV2: + """MobileNetV2 architecture from the `MobileNetV2: Inverted Residuals and Linear + Bottlenecks `_ paper. + + Args: + weights (:class:`~torchvision.models.MobileNet_V2_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MobileNet_V2_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.mobilenetv2.MobileNetV2`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MobileNet_V2_Weights + :members: + """ + weights = MobileNet_V2_Weights.verify(weights) + + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = MobileNetV2(**kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenetv3.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenetv3.py new file mode 100644 index 0000000000000000000000000000000000000000..247e3ccd908db8819fd934ae7e673d36237427e8 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/mobilenetv3.py @@ -0,0 +1,423 @@ +from functools import partial +from typing import Any, Callable, List, Optional, Sequence + +import torch +from torch import nn, Tensor + +from ..ops.misc import Conv2dNormActivation, SqueezeExcitation as SElayer +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _make_divisible, _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "MobileNetV3", + "MobileNet_V3_Large_Weights", + "MobileNet_V3_Small_Weights", + "mobilenet_v3_large", + "mobilenet_v3_small", +] + + +class InvertedResidualConfig: + # Stores information listed at Tables 1 and 2 of the MobileNetV3 paper + def __init__( + self, + input_channels: int, + kernel: int, + expanded_channels: int, + out_channels: int, + use_se: bool, + activation: str, + stride: int, + dilation: int, + width_mult: float, + ): + self.input_channels = self.adjust_channels(input_channels, width_mult) + self.kernel = kernel + self.expanded_channels = self.adjust_channels(expanded_channels, width_mult) + self.out_channels = self.adjust_channels(out_channels, width_mult) + self.use_se = use_se + self.use_hs = activation == "HS" + self.stride = stride + self.dilation = dilation + + @staticmethod + def adjust_channels(channels: int, width_mult: float): + return _make_divisible(channels * width_mult, 8) + + +class InvertedResidual(nn.Module): + # Implemented as described at section 5 of MobileNetV3 paper + def __init__( + self, + cnf: InvertedResidualConfig, + norm_layer: Callable[..., nn.Module], + se_layer: Callable[..., nn.Module] = partial(SElayer, scale_activation=nn.Hardsigmoid), + ): + super().__init__() + if not (1 <= cnf.stride <= 2): + raise ValueError("illegal stride value") + + self.use_res_connect = cnf.stride == 1 and cnf.input_channels == cnf.out_channels + + layers: List[nn.Module] = [] + activation_layer = nn.Hardswish if cnf.use_hs else nn.ReLU + + # expand + if cnf.expanded_channels != cnf.input_channels: + layers.append( + Conv2dNormActivation( + cnf.input_channels, + cnf.expanded_channels, + kernel_size=1, + norm_layer=norm_layer, + activation_layer=activation_layer, + ) + ) + + # depthwise + stride = 1 if cnf.dilation > 1 else cnf.stride + layers.append( + Conv2dNormActivation( + cnf.expanded_channels, + cnf.expanded_channels, + kernel_size=cnf.kernel, + stride=stride, + dilation=cnf.dilation, + groups=cnf.expanded_channels, + norm_layer=norm_layer, + activation_layer=activation_layer, + ) + ) + if cnf.use_se: + squeeze_channels = _make_divisible(cnf.expanded_channels // 4, 8) + layers.append(se_layer(cnf.expanded_channels, squeeze_channels)) + + # project + layers.append( + Conv2dNormActivation( + cnf.expanded_channels, cnf.out_channels, kernel_size=1, norm_layer=norm_layer, activation_layer=None + ) + ) + + self.block = nn.Sequential(*layers) + self.out_channels = cnf.out_channels + self._is_cn = cnf.stride > 1 + + def forward(self, input: Tensor) -> Tensor: + result = self.block(input) + if self.use_res_connect: + result += input + return result + + +class MobileNetV3(nn.Module): + def __init__( + self, + inverted_residual_setting: List[InvertedResidualConfig], + last_channel: int, + num_classes: int = 1000, + block: Optional[Callable[..., nn.Module]] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + dropout: float = 0.2, + **kwargs: Any, + ) -> None: + """ + MobileNet V3 main class + + Args: + inverted_residual_setting (List[InvertedResidualConfig]): Network structure + last_channel (int): The number of channels on the penultimate layer + num_classes (int): Number of classes + block (Optional[Callable[..., nn.Module]]): Module specifying inverted residual building block for mobilenet + norm_layer (Optional[Callable[..., nn.Module]]): Module specifying the normalization layer to use + dropout (float): The droupout probability + """ + super().__init__() + _log_api_usage_once(self) + + if not inverted_residual_setting: + raise ValueError("The inverted_residual_setting should not be empty") + elif not ( + isinstance(inverted_residual_setting, Sequence) + and all([isinstance(s, InvertedResidualConfig) for s in inverted_residual_setting]) + ): + raise TypeError("The inverted_residual_setting should be List[InvertedResidualConfig]") + + if block is None: + block = InvertedResidual + + if norm_layer is None: + norm_layer = partial(nn.BatchNorm2d, eps=0.001, momentum=0.01) + + layers: List[nn.Module] = [] + + # building first layer + firstconv_output_channels = inverted_residual_setting[0].input_channels + layers.append( + Conv2dNormActivation( + 3, + firstconv_output_channels, + kernel_size=3, + stride=2, + norm_layer=norm_layer, + activation_layer=nn.Hardswish, + ) + ) + + # building inverted residual blocks + for cnf in inverted_residual_setting: + layers.append(block(cnf, norm_layer)) + + # building last several layers + lastconv_input_channels = inverted_residual_setting[-1].out_channels + lastconv_output_channels = 6 * lastconv_input_channels + layers.append( + Conv2dNormActivation( + lastconv_input_channels, + lastconv_output_channels, + kernel_size=1, + norm_layer=norm_layer, + activation_layer=nn.Hardswish, + ) + ) + + self.features = nn.Sequential(*layers) + self.avgpool = nn.AdaptiveAvgPool2d(1) + self.classifier = nn.Sequential( + nn.Linear(lastconv_output_channels, last_channel), + nn.Hardswish(inplace=True), + nn.Dropout(p=dropout, inplace=True), + nn.Linear(last_channel, num_classes), + ) + + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out") + if m.bias is not None: + nn.init.zeros_(m.bias) + elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)): + nn.init.ones_(m.weight) + nn.init.zeros_(m.bias) + elif isinstance(m, nn.Linear): + nn.init.normal_(m.weight, 0, 0.01) + nn.init.zeros_(m.bias) + + def _forward_impl(self, x: Tensor) -> Tensor: + x = self.features(x) + + x = self.avgpool(x) + x = torch.flatten(x, 1) + + x = self.classifier(x) + + return x + + def forward(self, x: Tensor) -> Tensor: + return self._forward_impl(x) + + +def _mobilenet_v3_conf( + arch: str, width_mult: float = 1.0, reduced_tail: bool = False, dilated: bool = False, **kwargs: Any +): + reduce_divider = 2 if reduced_tail else 1 + dilation = 2 if dilated else 1 + + bneck_conf = partial(InvertedResidualConfig, width_mult=width_mult) + adjust_channels = partial(InvertedResidualConfig.adjust_channels, width_mult=width_mult) + + if arch == "mobilenet_v3_large": + inverted_residual_setting = [ + bneck_conf(16, 3, 16, 16, False, "RE", 1, 1), + bneck_conf(16, 3, 64, 24, False, "RE", 2, 1), # C1 + bneck_conf(24, 3, 72, 24, False, "RE", 1, 1), + bneck_conf(24, 5, 72, 40, True, "RE", 2, 1), # C2 + bneck_conf(40, 5, 120, 40, True, "RE", 1, 1), + bneck_conf(40, 5, 120, 40, True, "RE", 1, 1), + bneck_conf(40, 3, 240, 80, False, "HS", 2, 1), # C3 + bneck_conf(80, 3, 200, 80, False, "HS", 1, 1), + bneck_conf(80, 3, 184, 80, False, "HS", 1, 1), + bneck_conf(80, 3, 184, 80, False, "HS", 1, 1), + bneck_conf(80, 3, 480, 112, True, "HS", 1, 1), + bneck_conf(112, 3, 672, 112, True, "HS", 1, 1), + bneck_conf(112, 5, 672, 160 // reduce_divider, True, "HS", 2, dilation), # C4 + bneck_conf(160 // reduce_divider, 5, 960 // reduce_divider, 160 // reduce_divider, True, "HS", 1, dilation), + bneck_conf(160 // reduce_divider, 5, 960 // reduce_divider, 160 // reduce_divider, True, "HS", 1, dilation), + ] + last_channel = adjust_channels(1280 // reduce_divider) # C5 + elif arch == "mobilenet_v3_small": + inverted_residual_setting = [ + bneck_conf(16, 3, 16, 16, True, "RE", 2, 1), # C1 + bneck_conf(16, 3, 72, 24, False, "RE", 2, 1), # C2 + bneck_conf(24, 3, 88, 24, False, "RE", 1, 1), + bneck_conf(24, 5, 96, 40, True, "HS", 2, 1), # C3 + bneck_conf(40, 5, 240, 40, True, "HS", 1, 1), + bneck_conf(40, 5, 240, 40, True, "HS", 1, 1), + bneck_conf(40, 5, 120, 48, True, "HS", 1, 1), + bneck_conf(48, 5, 144, 48, True, "HS", 1, 1), + bneck_conf(48, 5, 288, 96 // reduce_divider, True, "HS", 2, dilation), # C4 + bneck_conf(96 // reduce_divider, 5, 576 // reduce_divider, 96 // reduce_divider, True, "HS", 1, dilation), + bneck_conf(96 // reduce_divider, 5, 576 // reduce_divider, 96 // reduce_divider, True, "HS", 1, dilation), + ] + last_channel = adjust_channels(1024 // reduce_divider) # C5 + else: + raise ValueError(f"Unsupported model type {arch}") + + return inverted_residual_setting, last_channel + + +def _mobilenet_v3( + inverted_residual_setting: List[InvertedResidualConfig], + last_channel: int, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> MobileNetV3: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = MobileNetV3(inverted_residual_setting, last_channel, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, +} + + +class MobileNet_V3_Large_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/mobilenet_v3_large-8738ca79.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 5483032, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#mobilenetv3-large--small", + "_metrics": { + "ImageNet-1K": { + "acc@1": 74.042, + "acc@5": 91.340, + } + }, + "_ops": 0.217, + "_file_size": 21.114, + "_docs": """These weights were trained from scratch by using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/mobilenet_v3_large-5c1a4163.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 5483032, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-reg-tuning", + "_metrics": { + "ImageNet-1K": { + "acc@1": 75.274, + "acc@5": 92.566, + } + }, + "_ops": 0.217, + "_file_size": 21.107, + "_docs": """ + These weights improve marginally upon the results of the original paper by using a modified version of + TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class MobileNet_V3_Small_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/mobilenet_v3_small-047dcff4.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 2542856, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#mobilenetv3-large--small", + "_metrics": { + "ImageNet-1K": { + "acc@1": 67.668, + "acc@5": 87.402, + } + }, + "_ops": 0.057, + "_file_size": 9.829, + "_docs": """ + These weights improve upon the results of the original paper by using a simple training recipe. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MobileNet_V3_Large_Weights.IMAGENET1K_V1)) +def mobilenet_v3_large( + *, weights: Optional[MobileNet_V3_Large_Weights] = None, progress: bool = True, **kwargs: Any +) -> MobileNetV3: + """ + Constructs a large MobileNetV3 architecture from + `Searching for MobileNetV3 `__. + + Args: + weights (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MobileNet_V3_Large_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.mobilenet.MobileNetV3`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MobileNet_V3_Large_Weights + :members: + """ + weights = MobileNet_V3_Large_Weights.verify(weights) + + inverted_residual_setting, last_channel = _mobilenet_v3_conf("mobilenet_v3_large", **kwargs) + return _mobilenet_v3(inverted_residual_setting, last_channel, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MobileNet_V3_Small_Weights.IMAGENET1K_V1)) +def mobilenet_v3_small( + *, weights: Optional[MobileNet_V3_Small_Weights] = None, progress: bool = True, **kwargs: Any +) -> MobileNetV3: + """ + Constructs a small MobileNetV3 architecture from + `Searching for MobileNetV3 `__. + + Args: + weights (:class:`~torchvision.models.MobileNet_V3_Small_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.MobileNet_V3_Small_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.mobilenet.MobileNetV3`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.MobileNet_V3_Small_Weights + :members: + """ + weights = MobileNet_V3_Small_Weights.verify(weights) + + inverted_residual_setting, last_channel = _mobilenet_v3_conf("mobilenet_v3_small", **kwargs) + return _mobilenet_v3(inverted_residual_setting, last_channel, weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4f76a9b077b54d8f61d16b7e400359d6aab5084e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__init__.py @@ -0,0 +1 @@ +from .raft import * diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bcf9d60ca942056a1a090f7370c4bc9bf5f4af9d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..acc4369464735111209e9ffe5671fbcd5f8292db Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/raft.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/raft.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..18e2f3264521f9c2b0f9ca816fa02fa7198eb227 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/__pycache__/raft.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..1834d485083f0ce548082c4cf0b5f52c108f9753 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/_utils.py @@ -0,0 +1,48 @@ +from typing import Optional + +import torch +import torch.nn.functional as F +from torch import Tensor + + +def grid_sample(img: Tensor, absolute_grid: Tensor, mode: str = "bilinear", align_corners: Optional[bool] = None): + """Same as torch's grid_sample, with absolute pixel coordinates instead of normalized coordinates.""" + h, w = img.shape[-2:] + + xgrid, ygrid = absolute_grid.split([1, 1], dim=-1) + xgrid = 2 * xgrid / (w - 1) - 1 + # Adding condition if h > 1 to enable this function be reused in raft-stereo + if h > 1: + ygrid = 2 * ygrid / (h - 1) - 1 + normalized_grid = torch.cat([xgrid, ygrid], dim=-1) + + return F.grid_sample(img, normalized_grid, mode=mode, align_corners=align_corners) + + +def make_coords_grid(batch_size: int, h: int, w: int, device: str = "cpu"): + device = torch.device(device) + coords = torch.meshgrid(torch.arange(h, device=device), torch.arange(w, device=device), indexing="ij") + coords = torch.stack(coords[::-1], dim=0).float() + return coords[None].repeat(batch_size, 1, 1, 1) + + +def upsample_flow(flow, up_mask: Optional[Tensor] = None, factor: int = 8): + """Upsample flow by the input factor (default 8). + + If up_mask is None we just interpolate. + If up_mask is specified, we upsample using a convex combination of its weights. See paper page 8 and appendix B. + Note that in appendix B the picture assumes a downsample factor of 4 instead of 8. + """ + batch_size, num_channels, h, w = flow.shape + new_h, new_w = h * factor, w * factor + + if up_mask is None: + return factor * F.interpolate(flow, size=(new_h, new_w), mode="bilinear", align_corners=True) + + up_mask = up_mask.view(batch_size, 1, 9, factor, factor, h, w) + up_mask = torch.softmax(up_mask, dim=2) # "convex" == weights sum to 1 + + upsampled_flow = F.unfold(factor * flow, kernel_size=3, padding=1).view(batch_size, num_channels, 9, 1, 1, h, w) + upsampled_flow = torch.sum(up_mask * upsampled_flow, dim=2) + + return upsampled_flow.permute(0, 1, 4, 2, 5, 3).reshape(batch_size, num_channels, new_h, new_w) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/raft.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/raft.py new file mode 100644 index 0000000000000000000000000000000000000000..95753f45567a0c32481f4155bebda034a1c12c8f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/optical_flow/raft.py @@ -0,0 +1,947 @@ +from typing import List, Optional + +import torch +import torch.nn as nn +import torch.nn.functional as F +from torch import Tensor +from torch.nn.modules.batchnorm import BatchNorm2d +from torch.nn.modules.instancenorm import InstanceNorm2d +from torchvision.ops import Conv2dNormActivation + +from ...transforms._presets import OpticalFlow +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._utils import handle_legacy_interface +from ._utils import grid_sample, make_coords_grid, upsample_flow + + +__all__ = ( + "RAFT", + "raft_large", + "raft_small", + "Raft_Large_Weights", + "Raft_Small_Weights", +) + + +class ResidualBlock(nn.Module): + """Slightly modified Residual block with extra relu and biases.""" + + def __init__(self, in_channels, out_channels, *, norm_layer, stride=1, always_project: bool = False): + super().__init__() + + # Note regarding bias=True: + # Usually we can pass bias=False in conv layers followed by a norm layer. + # But in the RAFT training reference, the BatchNorm2d layers are only activated for the first dataset, + # and frozen for the rest of the training process (i.e. set as eval()). The bias term is thus still useful + # for the rest of the datasets. Technically, we could remove the bias for other norm layers like Instance norm + # because these aren't frozen, but we don't bother (also, we wouldn't be able to load the original weights). + self.convnormrelu1 = Conv2dNormActivation( + in_channels, out_channels, norm_layer=norm_layer, kernel_size=3, stride=stride, bias=True + ) + self.convnormrelu2 = Conv2dNormActivation( + out_channels, out_channels, norm_layer=norm_layer, kernel_size=3, bias=True + ) + + # make mypy happy + self.downsample: nn.Module + + if stride == 1 and not always_project: + self.downsample = nn.Identity() + else: + self.downsample = Conv2dNormActivation( + in_channels, + out_channels, + norm_layer=norm_layer, + kernel_size=1, + stride=stride, + bias=True, + activation_layer=None, + ) + + self.relu = nn.ReLU(inplace=True) + + def forward(self, x): + y = x + y = self.convnormrelu1(y) + y = self.convnormrelu2(y) + + x = self.downsample(x) + + return self.relu(x + y) + + +class BottleneckBlock(nn.Module): + """Slightly modified BottleNeck block (extra relu and biases)""" + + def __init__(self, in_channels, out_channels, *, norm_layer, stride=1): + super().__init__() + + # See note in ResidualBlock for the reason behind bias=True + self.convnormrelu1 = Conv2dNormActivation( + in_channels, out_channels // 4, norm_layer=norm_layer, kernel_size=1, bias=True + ) + self.convnormrelu2 = Conv2dNormActivation( + out_channels // 4, out_channels // 4, norm_layer=norm_layer, kernel_size=3, stride=stride, bias=True + ) + self.convnormrelu3 = Conv2dNormActivation( + out_channels // 4, out_channels, norm_layer=norm_layer, kernel_size=1, bias=True + ) + self.relu = nn.ReLU(inplace=True) + + if stride == 1: + self.downsample = nn.Identity() + else: + self.downsample = Conv2dNormActivation( + in_channels, + out_channels, + norm_layer=norm_layer, + kernel_size=1, + stride=stride, + bias=True, + activation_layer=None, + ) + + def forward(self, x): + y = x + y = self.convnormrelu1(y) + y = self.convnormrelu2(y) + y = self.convnormrelu3(y) + + x = self.downsample(x) + + return self.relu(x + y) + + +class FeatureEncoder(nn.Module): + """The feature encoder, used both as the actual feature encoder, and as the context encoder. + + It must downsample its input by 8. + """ + + def __init__( + self, *, block=ResidualBlock, layers=(64, 64, 96, 128, 256), strides=(2, 1, 2, 2), norm_layer=nn.BatchNorm2d + ): + super().__init__() + + if len(layers) != 5: + raise ValueError(f"The expected number of layers is 5, instead got {len(layers)}") + + # See note in ResidualBlock for the reason behind bias=True + self.convnormrelu = Conv2dNormActivation( + 3, layers[0], norm_layer=norm_layer, kernel_size=7, stride=strides[0], bias=True + ) + + self.layer1 = self._make_2_blocks(block, layers[0], layers[1], norm_layer=norm_layer, first_stride=strides[1]) + self.layer2 = self._make_2_blocks(block, layers[1], layers[2], norm_layer=norm_layer, first_stride=strides[2]) + self.layer3 = self._make_2_blocks(block, layers[2], layers[3], norm_layer=norm_layer, first_stride=strides[3]) + + self.conv = nn.Conv2d(layers[3], layers[4], kernel_size=1) + + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu") + elif isinstance(m, (nn.BatchNorm2d, nn.InstanceNorm2d)): + if m.weight is not None: + nn.init.constant_(m.weight, 1) + if m.bias is not None: + nn.init.constant_(m.bias, 0) + + num_downsamples = len(list(filter(lambda s: s == 2, strides))) + self.output_dim = layers[-1] + self.downsample_factor = 2**num_downsamples + + def _make_2_blocks(self, block, in_channels, out_channels, norm_layer, first_stride): + block1 = block(in_channels, out_channels, norm_layer=norm_layer, stride=first_stride) + block2 = block(out_channels, out_channels, norm_layer=norm_layer, stride=1) + return nn.Sequential(block1, block2) + + def forward(self, x): + x = self.convnormrelu(x) + + x = self.layer1(x) + x = self.layer2(x) + x = self.layer3(x) + + x = self.conv(x) + + return x + + +class MotionEncoder(nn.Module): + """The motion encoder, part of the update block. + + Takes the current predicted flow and the correlation features as input and returns an encoded version of these. + """ + + def __init__(self, *, in_channels_corr, corr_layers=(256, 192), flow_layers=(128, 64), out_channels=128): + super().__init__() + + if len(flow_layers) != 2: + raise ValueError(f"The expected number of flow_layers is 2, instead got {len(flow_layers)}") + if len(corr_layers) not in (1, 2): + raise ValueError(f"The number of corr_layers should be 1 or 2, instead got {len(corr_layers)}") + + self.convcorr1 = Conv2dNormActivation(in_channels_corr, corr_layers[0], norm_layer=None, kernel_size=1) + if len(corr_layers) == 2: + self.convcorr2 = Conv2dNormActivation(corr_layers[0], corr_layers[1], norm_layer=None, kernel_size=3) + else: + self.convcorr2 = nn.Identity() + + self.convflow1 = Conv2dNormActivation(2, flow_layers[0], norm_layer=None, kernel_size=7) + self.convflow2 = Conv2dNormActivation(flow_layers[0], flow_layers[1], norm_layer=None, kernel_size=3) + + # out_channels - 2 because we cat the flow (2 channels) at the end + self.conv = Conv2dNormActivation( + corr_layers[-1] + flow_layers[-1], out_channels - 2, norm_layer=None, kernel_size=3 + ) + + self.out_channels = out_channels + + def forward(self, flow, corr_features): + corr = self.convcorr1(corr_features) + corr = self.convcorr2(corr) + + flow_orig = flow + flow = self.convflow1(flow) + flow = self.convflow2(flow) + + corr_flow = torch.cat([corr, flow], dim=1) + corr_flow = self.conv(corr_flow) + return torch.cat([corr_flow, flow_orig], dim=1) + + +class ConvGRU(nn.Module): + """Convolutional Gru unit.""" + + def __init__(self, *, input_size, hidden_size, kernel_size, padding): + super().__init__() + self.convz = nn.Conv2d(hidden_size + input_size, hidden_size, kernel_size=kernel_size, padding=padding) + self.convr = nn.Conv2d(hidden_size + input_size, hidden_size, kernel_size=kernel_size, padding=padding) + self.convq = nn.Conv2d(hidden_size + input_size, hidden_size, kernel_size=kernel_size, padding=padding) + + def forward(self, h, x): + hx = torch.cat([h, x], dim=1) + z = torch.sigmoid(self.convz(hx)) + r = torch.sigmoid(self.convr(hx)) + q = torch.tanh(self.convq(torch.cat([r * h, x], dim=1))) + h = (1 - z) * h + z * q + return h + + +def _pass_through_h(h, _): + # Declared here for torchscript + return h + + +class RecurrentBlock(nn.Module): + """Recurrent block, part of the update block. + + Takes the current hidden state and the concatenation of (motion encoder output, context) as input. + Returns an updated hidden state. + """ + + def __init__(self, *, input_size, hidden_size, kernel_size=((1, 5), (5, 1)), padding=((0, 2), (2, 0))): + super().__init__() + + if len(kernel_size) != len(padding): + raise ValueError( + f"kernel_size should have the same length as padding, instead got len(kernel_size) = {len(kernel_size)} and len(padding) = {len(padding)}" + ) + if len(kernel_size) not in (1, 2): + raise ValueError(f"kernel_size should either 1 or 2, instead got {len(kernel_size)}") + + self.convgru1 = ConvGRU( + input_size=input_size, hidden_size=hidden_size, kernel_size=kernel_size[0], padding=padding[0] + ) + if len(kernel_size) == 2: + self.convgru2 = ConvGRU( + input_size=input_size, hidden_size=hidden_size, kernel_size=kernel_size[1], padding=padding[1] + ) + else: + self.convgru2 = _pass_through_h + + self.hidden_size = hidden_size + + def forward(self, h, x): + h = self.convgru1(h, x) + h = self.convgru2(h, x) + return h + + +class FlowHead(nn.Module): + """Flow head, part of the update block. + + Takes the hidden state of the recurrent unit as input, and outputs the predicted "delta flow". + """ + + def __init__(self, *, in_channels, hidden_size): + super().__init__() + self.conv1 = nn.Conv2d(in_channels, hidden_size, 3, padding=1) + self.conv2 = nn.Conv2d(hidden_size, 2, 3, padding=1) + self.relu = nn.ReLU(inplace=True) + + def forward(self, x): + return self.conv2(self.relu(self.conv1(x))) + + +class UpdateBlock(nn.Module): + """The update block which contains the motion encoder, the recurrent block, and the flow head. + + It must expose a ``hidden_state_size`` attribute which is the hidden state size of its recurrent block. + """ + + def __init__(self, *, motion_encoder, recurrent_block, flow_head): + super().__init__() + self.motion_encoder = motion_encoder + self.recurrent_block = recurrent_block + self.flow_head = flow_head + + self.hidden_state_size = recurrent_block.hidden_size + + def forward(self, hidden_state, context, corr_features, flow): + motion_features = self.motion_encoder(flow, corr_features) + x = torch.cat([context, motion_features], dim=1) + + hidden_state = self.recurrent_block(hidden_state, x) + delta_flow = self.flow_head(hidden_state) + return hidden_state, delta_flow + + +class MaskPredictor(nn.Module): + """Mask predictor to be used when upsampling the predicted flow. + + It takes the hidden state of the recurrent unit as input and outputs the mask. + This is not used in the raft-small model. + """ + + def __init__(self, *, in_channels, hidden_size, multiplier=0.25): + super().__init__() + self.convrelu = Conv2dNormActivation(in_channels, hidden_size, norm_layer=None, kernel_size=3) + # 8 * 8 * 9 because the predicted flow is downsampled by 8, from the downsampling of the initial FeatureEncoder, + # and we interpolate with all 9 surrounding neighbors. See paper and appendix B. + self.conv = nn.Conv2d(hidden_size, 8 * 8 * 9, 1, padding=0) + + # In the original code, they use a factor of 0.25 to "downweight the gradients" of that branch. + # See e.g. https://github.com/princeton-vl/RAFT/issues/119#issuecomment-953950419 + # or https://github.com/princeton-vl/RAFT/issues/24. + # It doesn't seem to affect epe significantly and can likely be set to 1. + self.multiplier = multiplier + + def forward(self, x): + x = self.convrelu(x) + x = self.conv(x) + return self.multiplier * x + + +class CorrBlock(nn.Module): + """The correlation block. + + Creates a correlation pyramid with ``num_levels`` levels from the outputs of the feature encoder, + and then indexes from this pyramid to create correlation features. + The "indexing" of a given centroid pixel x' is done by concatenating its surrounding neighbors that + are within a ``radius``, according to the infinity norm (see paper section 3.2). + Note: typo in the paper, it should be infinity norm, not 1-norm. + """ + + def __init__(self, *, num_levels: int = 4, radius: int = 4): + super().__init__() + self.num_levels = num_levels + self.radius = radius + + self.corr_pyramid: List[Tensor] = [torch.tensor(0)] # useless, but torchscript is otherwise confused :') + + # The neighborhood of a centroid pixel x' is {x' + delta, ||delta||_inf <= radius} + # so it's a square surrounding x', and its sides have a length of 2 * radius + 1 + # The paper claims that it's ||.||_1 instead of ||.||_inf but it's a typo: + # https://github.com/princeton-vl/RAFT/issues/122 + self.out_channels = num_levels * (2 * radius + 1) ** 2 + + def build_pyramid(self, fmap1, fmap2): + """Build the correlation pyramid from two feature maps. + + The correlation volume is first computed as the dot product of each pair (pixel_in_fmap1, pixel_in_fmap2) + The last 2 dimensions of the correlation volume are then pooled num_levels times at different resolutions + to build the correlation pyramid. + """ + + if fmap1.shape != fmap2.shape: + raise ValueError( + f"Input feature maps should have the same shape, instead got {fmap1.shape} (fmap1.shape) != {fmap2.shape} (fmap2.shape)" + ) + + # Explaining min_fmap_size below: the fmaps are down-sampled (num_levels - 1) times by a factor of 2. + # The last corr_volume most have at least 2 values (hence the 2* factor), otherwise grid_sample() would + # produce nans in its output. + min_fmap_size = 2 * (2 ** (self.num_levels - 1)) + if any(fmap_size < min_fmap_size for fmap_size in fmap1.shape[-2:]): + raise ValueError( + "Feature maps are too small to be down-sampled by the correlation pyramid. " + f"H and W of feature maps should be at least {min_fmap_size}; got: {fmap1.shape[-2:]}. " + "Remember that input images to the model are downsampled by 8, so that means their " + f"dimensions should be at least 8 * {min_fmap_size} = {8 * min_fmap_size}." + ) + + corr_volume = self._compute_corr_volume(fmap1, fmap2) + + batch_size, h, w, num_channels, _, _ = corr_volume.shape # _, _ = h, w + corr_volume = corr_volume.reshape(batch_size * h * w, num_channels, h, w) + self.corr_pyramid = [corr_volume] + for _ in range(self.num_levels - 1): + corr_volume = F.avg_pool2d(corr_volume, kernel_size=2, stride=2) + self.corr_pyramid.append(corr_volume) + + def index_pyramid(self, centroids_coords): + """Return correlation features by indexing from the pyramid.""" + neighborhood_side_len = 2 * self.radius + 1 # see note in __init__ about out_channels + di = torch.linspace(-self.radius, self.radius, neighborhood_side_len) + dj = torch.linspace(-self.radius, self.radius, neighborhood_side_len) + delta = torch.stack(torch.meshgrid(di, dj, indexing="ij"), dim=-1).to(centroids_coords.device) + delta = delta.view(1, neighborhood_side_len, neighborhood_side_len, 2) + + batch_size, _, h, w = centroids_coords.shape # _ = 2 + centroids_coords = centroids_coords.permute(0, 2, 3, 1).reshape(batch_size * h * w, 1, 1, 2) + + indexed_pyramid = [] + for corr_volume in self.corr_pyramid: + sampling_coords = centroids_coords + delta # end shape is (batch_size * h * w, side_len, side_len, 2) + indexed_corr_volume = grid_sample(corr_volume, sampling_coords, align_corners=True, mode="bilinear").view( + batch_size, h, w, -1 + ) + indexed_pyramid.append(indexed_corr_volume) + centroids_coords = centroids_coords / 2 + + corr_features = torch.cat(indexed_pyramid, dim=-1).permute(0, 3, 1, 2).contiguous() + + expected_output_shape = (batch_size, self.out_channels, h, w) + if corr_features.shape != expected_output_shape: + raise ValueError( + f"Output shape of index pyramid is incorrect. Should be {expected_output_shape}, got {corr_features.shape}" + ) + + return corr_features + + def _compute_corr_volume(self, fmap1, fmap2): + batch_size, num_channels, h, w = fmap1.shape + fmap1 = fmap1.view(batch_size, num_channels, h * w) + fmap2 = fmap2.view(batch_size, num_channels, h * w) + + corr = torch.matmul(fmap1.transpose(1, 2), fmap2) + corr = corr.view(batch_size, h, w, 1, h, w) + return corr / torch.sqrt(torch.tensor(num_channels)) + + +class RAFT(nn.Module): + def __init__(self, *, feature_encoder, context_encoder, corr_block, update_block, mask_predictor=None): + """RAFT model from + `RAFT: Recurrent All Pairs Field Transforms for Optical Flow `_. + + args: + feature_encoder (nn.Module): The feature encoder. It must downsample the input by 8. + Its input is the concatenation of ``image1`` and ``image2``. + context_encoder (nn.Module): The context encoder. It must downsample the input by 8. + Its input is ``image1``. As in the original implementation, its output will be split into 2 parts: + + - one part will be used as the actual "context", passed to the recurrent unit of the ``update_block`` + - one part will be used to initialize the hidden state of the recurrent unit of + the ``update_block`` + + These 2 parts are split according to the ``hidden_state_size`` of the ``update_block``, so the output + of the ``context_encoder`` must be strictly greater than ``hidden_state_size``. + + corr_block (nn.Module): The correlation block, which creates a correlation pyramid from the output of the + ``feature_encoder``, and then indexes from this pyramid to create correlation features. It must expose + 2 methods: + + - a ``build_pyramid`` method that takes ``feature_map_1`` and ``feature_map_2`` as input (these are the + output of the ``feature_encoder``). + - a ``index_pyramid`` method that takes the coordinates of the centroid pixels as input, and returns + the correlation features. See paper section 3.2. + + It must expose an ``out_channels`` attribute. + + update_block (nn.Module): The update block, which contains the motion encoder, the recurrent unit, and the + flow head. It takes as input the hidden state of its recurrent unit, the context, the correlation + features, and the current predicted flow. It outputs an updated hidden state, and the ``delta_flow`` + prediction (see paper appendix A). It must expose a ``hidden_state_size`` attribute. + mask_predictor (nn.Module, optional): Predicts the mask that will be used to upsample the predicted flow. + The output channel must be 8 * 8 * 9 - see paper section 3.3, and Appendix B. + If ``None`` (default), the flow is upsampled using interpolation. + """ + super().__init__() + _log_api_usage_once(self) + + self.feature_encoder = feature_encoder + self.context_encoder = context_encoder + self.corr_block = corr_block + self.update_block = update_block + + self.mask_predictor = mask_predictor + + if not hasattr(self.update_block, "hidden_state_size"): + raise ValueError("The update_block parameter should expose a 'hidden_state_size' attribute.") + + def forward(self, image1, image2, num_flow_updates: int = 12): + + batch_size, _, h, w = image1.shape + if (h, w) != image2.shape[-2:]: + raise ValueError(f"input images should have the same shape, instead got ({h}, {w}) != {image2.shape[-2:]}") + if not (h % 8 == 0) and (w % 8 == 0): + raise ValueError(f"input image H and W should be divisible by 8, instead got {h} (h) and {w} (w)") + + fmaps = self.feature_encoder(torch.cat([image1, image2], dim=0)) + fmap1, fmap2 = torch.chunk(fmaps, chunks=2, dim=0) + if fmap1.shape[-2:] != (h // 8, w // 8): + raise ValueError("The feature encoder should downsample H and W by 8") + + self.corr_block.build_pyramid(fmap1, fmap2) + + context_out = self.context_encoder(image1) + if context_out.shape[-2:] != (h // 8, w // 8): + raise ValueError("The context encoder should downsample H and W by 8") + + # As in the original paper, the actual output of the context encoder is split in 2 parts: + # - one part is used to initialize the hidden state of the recurent units of the update block + # - the rest is the "actual" context. + hidden_state_size = self.update_block.hidden_state_size + out_channels_context = context_out.shape[1] - hidden_state_size + if out_channels_context <= 0: + raise ValueError( + f"The context encoder outputs {context_out.shape[1]} channels, but it should have at strictly more than hidden_state={hidden_state_size} channels" + ) + hidden_state, context = torch.split(context_out, [hidden_state_size, out_channels_context], dim=1) + hidden_state = torch.tanh(hidden_state) + context = F.relu(context) + + coords0 = make_coords_grid(batch_size, h // 8, w // 8).to(fmap1.device) + coords1 = make_coords_grid(batch_size, h // 8, w // 8).to(fmap1.device) + + flow_predictions = [] + for _ in range(num_flow_updates): + coords1 = coords1.detach() # Don't backpropagate gradients through this branch, see paper + corr_features = self.corr_block.index_pyramid(centroids_coords=coords1) + + flow = coords1 - coords0 + hidden_state, delta_flow = self.update_block(hidden_state, context, corr_features, flow) + + coords1 = coords1 + delta_flow + + up_mask = None if self.mask_predictor is None else self.mask_predictor(hidden_state) + upsampled_flow = upsample_flow(flow=(coords1 - coords0), up_mask=up_mask) + flow_predictions.append(upsampled_flow) + + return flow_predictions + + +_COMMON_META = { + "min_size": (128, 128), +} + + +class Raft_Large_Weights(WeightsEnum): + """The metrics reported here are as follows. + + ``epe`` is the "end-point-error" and indicates how far (in pixels) the + predicted flow is from its true value. This is averaged over all pixels + of all images. ``per_image_epe`` is similar, but the average is different: + the epe is first computed on each image independently, and then averaged + over all images. This corresponds to "Fl-epe" (sometimes written "F1-epe") + in the original paper, and it's only used on Kitti. ``fl-all`` is also a + Kitti-specific metric, defined by the author of the dataset and used for the + Kitti leaderboard. It corresponds to the average of pixels whose epe is + either <3px, or <5% of flow's 2-norm. + """ + + C_T_V1 = Weights( + # Weights ported from https://github.com/princeton-vl/RAFT + url="https://download.pytorch.org/models/raft_large_C_T_V1-22a6c225.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 5257536, + "recipe": "https://github.com/princeton-vl/RAFT", + "_metrics": { + "Sintel-Train-Cleanpass": {"epe": 1.4411}, + "Sintel-Train-Finalpass": {"epe": 2.7894}, + "Kitti-Train": {"per_image_epe": 5.0172, "fl_all": 17.4506}, + }, + "_ops": 211.007, + "_file_size": 20.129, + "_docs": """These weights were ported from the original paper. They + are trained on :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D`.""", + }, + ) + + C_T_V2 = Weights( + url="https://download.pytorch.org/models/raft_large_C_T_V2-1bb1363a.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 5257536, + "recipe": "https://github.com/pytorch/vision/tree/main/references/optical_flow", + "_metrics": { + "Sintel-Train-Cleanpass": {"epe": 1.3822}, + "Sintel-Train-Finalpass": {"epe": 2.7161}, + "Kitti-Train": {"per_image_epe": 4.5118, "fl_all": 16.0679}, + }, + "_ops": 211.007, + "_file_size": 20.129, + "_docs": """These weights were trained from scratch on + :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D`.""", + }, + ) + + C_T_SKHT_V1 = Weights( + # Weights ported from https://github.com/princeton-vl/RAFT + url="https://download.pytorch.org/models/raft_large_C_T_SKHT_V1-0b8c9e55.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 5257536, + "recipe": "https://github.com/princeton-vl/RAFT", + "_metrics": { + "Sintel-Test-Cleanpass": {"epe": 1.94}, + "Sintel-Test-Finalpass": {"epe": 3.18}, + }, + "_ops": 211.007, + "_file_size": 20.129, + "_docs": """ + These weights were ported from the original paper. They are + trained on :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D` and fine-tuned on + Sintel. The Sintel fine-tuning step is a combination of + :class:`~torchvision.datasets.Sintel`, + :class:`~torchvision.datasets.KittiFlow`, + :class:`~torchvision.datasets.HD1K`, and + :class:`~torchvision.datasets.FlyingThings3D` (clean pass). + """, + }, + ) + + C_T_SKHT_V2 = Weights( + url="https://download.pytorch.org/models/raft_large_C_T_SKHT_V2-ff5fadd5.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 5257536, + "recipe": "https://github.com/pytorch/vision/tree/main/references/optical_flow", + "_metrics": { + "Sintel-Test-Cleanpass": {"epe": 1.819}, + "Sintel-Test-Finalpass": {"epe": 3.067}, + }, + "_ops": 211.007, + "_file_size": 20.129, + "_docs": """ + These weights were trained from scratch. They are + pre-trained on :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D` and then + fine-tuned on Sintel. The Sintel fine-tuning step is a + combination of :class:`~torchvision.datasets.Sintel`, + :class:`~torchvision.datasets.KittiFlow`, + :class:`~torchvision.datasets.HD1K`, and + :class:`~torchvision.datasets.FlyingThings3D` (clean pass). + """, + }, + ) + + C_T_SKHT_K_V1 = Weights( + # Weights ported from https://github.com/princeton-vl/RAFT + url="https://download.pytorch.org/models/raft_large_C_T_SKHT_K_V1-4a6a5039.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 5257536, + "recipe": "https://github.com/princeton-vl/RAFT", + "_metrics": { + "Kitti-Test": {"fl_all": 5.10}, + }, + "_ops": 211.007, + "_file_size": 20.129, + "_docs": """ + These weights were ported from the original paper. They are + pre-trained on :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D`, + fine-tuned on Sintel, and then fine-tuned on + :class:`~torchvision.datasets.KittiFlow`. The Sintel fine-tuning + step was described above. + """, + }, + ) + + C_T_SKHT_K_V2 = Weights( + url="https://download.pytorch.org/models/raft_large_C_T_SKHT_K_V2-b5c70766.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 5257536, + "recipe": "https://github.com/pytorch/vision/tree/main/references/optical_flow", + "_metrics": { + "Kitti-Test": {"fl_all": 5.19}, + }, + "_ops": 211.007, + "_file_size": 20.129, + "_docs": """ + These weights were trained from scratch. They are + pre-trained on :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D`, + fine-tuned on Sintel, and then fine-tuned on + :class:`~torchvision.datasets.KittiFlow`. The Sintel fine-tuning + step was described above. + """, + }, + ) + + DEFAULT = C_T_SKHT_V2 + + +class Raft_Small_Weights(WeightsEnum): + """The metrics reported here are as follows. + + ``epe`` is the "end-point-error" and indicates how far (in pixels) the + predicted flow is from its true value. This is averaged over all pixels + of all images. ``per_image_epe`` is similar, but the average is different: + the epe is first computed on each image independently, and then averaged + over all images. This corresponds to "Fl-epe" (sometimes written "F1-epe") + in the original paper, and it's only used on Kitti. ``fl-all`` is also a + Kitti-specific metric, defined by the author of the dataset and used for the + Kitti leaderboard. It corresponds to the average of pixels whose epe is + either <3px, or <5% of flow's 2-norm. + """ + + C_T_V1 = Weights( + # Weights ported from https://github.com/princeton-vl/RAFT + url="https://download.pytorch.org/models/raft_small_C_T_V1-ad48884c.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 990162, + "recipe": "https://github.com/princeton-vl/RAFT", + "_metrics": { + "Sintel-Train-Cleanpass": {"epe": 2.1231}, + "Sintel-Train-Finalpass": {"epe": 3.2790}, + "Kitti-Train": {"per_image_epe": 7.6557, "fl_all": 25.2801}, + }, + "_ops": 47.655, + "_file_size": 3.821, + "_docs": """These weights were ported from the original paper. They + are trained on :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D`.""", + }, + ) + C_T_V2 = Weights( + url="https://download.pytorch.org/models/raft_small_C_T_V2-01064c6d.pth", + transforms=OpticalFlow, + meta={ + **_COMMON_META, + "num_params": 990162, + "recipe": "https://github.com/pytorch/vision/tree/main/references/optical_flow", + "_metrics": { + "Sintel-Train-Cleanpass": {"epe": 1.9901}, + "Sintel-Train-Finalpass": {"epe": 3.2831}, + "Kitti-Train": {"per_image_epe": 7.5978, "fl_all": 25.2369}, + }, + "_ops": 47.655, + "_file_size": 3.821, + "_docs": """These weights were trained from scratch on + :class:`~torchvision.datasets.FlyingChairs` + + :class:`~torchvision.datasets.FlyingThings3D`.""", + }, + ) + + DEFAULT = C_T_V2 + + +def _raft( + *, + weights=None, + progress=False, + # Feature encoder + feature_encoder_layers, + feature_encoder_block, + feature_encoder_norm_layer, + # Context encoder + context_encoder_layers, + context_encoder_block, + context_encoder_norm_layer, + # Correlation block + corr_block_num_levels, + corr_block_radius, + # Motion encoder + motion_encoder_corr_layers, + motion_encoder_flow_layers, + motion_encoder_out_channels, + # Recurrent block + recurrent_block_hidden_state_size, + recurrent_block_kernel_size, + recurrent_block_padding, + # Flow Head + flow_head_hidden_size, + # Mask predictor + use_mask_predictor, + **kwargs, +): + feature_encoder = kwargs.pop("feature_encoder", None) or FeatureEncoder( + block=feature_encoder_block, layers=feature_encoder_layers, norm_layer=feature_encoder_norm_layer + ) + context_encoder = kwargs.pop("context_encoder", None) or FeatureEncoder( + block=context_encoder_block, layers=context_encoder_layers, norm_layer=context_encoder_norm_layer + ) + + corr_block = kwargs.pop("corr_block", None) or CorrBlock(num_levels=corr_block_num_levels, radius=corr_block_radius) + + update_block = kwargs.pop("update_block", None) + if update_block is None: + motion_encoder = MotionEncoder( + in_channels_corr=corr_block.out_channels, + corr_layers=motion_encoder_corr_layers, + flow_layers=motion_encoder_flow_layers, + out_channels=motion_encoder_out_channels, + ) + + # See comments in forward pass of RAFT class about why we split the output of the context encoder + out_channels_context = context_encoder_layers[-1] - recurrent_block_hidden_state_size + recurrent_block = RecurrentBlock( + input_size=motion_encoder.out_channels + out_channels_context, + hidden_size=recurrent_block_hidden_state_size, + kernel_size=recurrent_block_kernel_size, + padding=recurrent_block_padding, + ) + + flow_head = FlowHead(in_channels=recurrent_block_hidden_state_size, hidden_size=flow_head_hidden_size) + + update_block = UpdateBlock(motion_encoder=motion_encoder, recurrent_block=recurrent_block, flow_head=flow_head) + + mask_predictor = kwargs.pop("mask_predictor", None) + if mask_predictor is None and use_mask_predictor: + mask_predictor = MaskPredictor( + in_channels=recurrent_block_hidden_state_size, + hidden_size=256, + multiplier=0.25, # See comment in MaskPredictor about this + ) + + model = RAFT( + feature_encoder=feature_encoder, + context_encoder=context_encoder, + corr_block=corr_block, + update_block=update_block, + mask_predictor=mask_predictor, + **kwargs, # not really needed, all params should be consumed by now + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Raft_Large_Weights.C_T_SKHT_V2)) +def raft_large(*, weights: Optional[Raft_Large_Weights] = None, progress=True, **kwargs) -> RAFT: + """RAFT model from + `RAFT: Recurrent All Pairs Field Transforms for Optical Flow `_. + + Please see the example below for a tutorial on how to use this model. + + Args: + weights(:class:`~torchvision.models.optical_flow.Raft_Large_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.optical_flow.Raft_Large_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.optical_flow.RAFT`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.optical_flow.Raft_Large_Weights + :members: + """ + + weights = Raft_Large_Weights.verify(weights) + + return _raft( + weights=weights, + progress=progress, + # Feature encoder + feature_encoder_layers=(64, 64, 96, 128, 256), + feature_encoder_block=ResidualBlock, + feature_encoder_norm_layer=InstanceNorm2d, + # Context encoder + context_encoder_layers=(64, 64, 96, 128, 256), + context_encoder_block=ResidualBlock, + context_encoder_norm_layer=BatchNorm2d, + # Correlation block + corr_block_num_levels=4, + corr_block_radius=4, + # Motion encoder + motion_encoder_corr_layers=(256, 192), + motion_encoder_flow_layers=(128, 64), + motion_encoder_out_channels=128, + # Recurrent block + recurrent_block_hidden_state_size=128, + recurrent_block_kernel_size=((1, 5), (5, 1)), + recurrent_block_padding=((0, 2), (2, 0)), + # Flow head + flow_head_hidden_size=256, + # Mask predictor + use_mask_predictor=True, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Raft_Small_Weights.C_T_V2)) +def raft_small(*, weights: Optional[Raft_Small_Weights] = None, progress=True, **kwargs) -> RAFT: + """RAFT "small" model from + `RAFT: Recurrent All Pairs Field Transforms for Optical Flow `__. + + Please see the example below for a tutorial on how to use this model. + + Args: + weights(:class:`~torchvision.models.optical_flow.Raft_Small_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.optical_flow.Raft_Small_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.optical_flow.RAFT`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.optical_flow.Raft_Small_Weights + :members: + """ + weights = Raft_Small_Weights.verify(weights) + + return _raft( + weights=weights, + progress=progress, + # Feature encoder + feature_encoder_layers=(32, 32, 64, 96, 128), + feature_encoder_block=BottleneckBlock, + feature_encoder_norm_layer=InstanceNorm2d, + # Context encoder + context_encoder_layers=(32, 32, 64, 96, 160), + context_encoder_block=BottleneckBlock, + context_encoder_norm_layer=None, + # Correlation block + corr_block_num_levels=4, + corr_block_radius=3, + # Motion encoder + motion_encoder_corr_layers=(96,), + motion_encoder_flow_layers=(64, 32), + motion_encoder_out_channels=82, + # Recurrent block + recurrent_block_hidden_state_size=96, + recurrent_block_kernel_size=(3,), + recurrent_block_padding=(1,), + # Flow head + flow_head_hidden_size=128, + # Mask predictor + use_mask_predictor=False, + **kwargs, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9213929733945bf84096a6030413855e1dd4542e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__init__.py @@ -0,0 +1,5 @@ +from .googlenet import * +from .inception import * +from .mobilenet import * +from .resnet import * +from .shufflenetv2 import * diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5594b5d3561f4065b3bec266ffebef0beb2f9b3b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/googlenet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/googlenet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..53cdcef63390cf9f688939450612aa56ac883435 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/googlenet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/inception.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/inception.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c2651ac1382f3ba653df065a99cfd692df796ab2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/inception.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7925a9cbcff377b1ff3084357d0132059ebfbda3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenetv2.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenetv2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9e4d4ba884629668cff7b6afe16b6319be2d65ee Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenetv2.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenetv3.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenetv3.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2e79f5d594bcc209da66cd8c5678772f0079d334 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/mobilenetv3.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/resnet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/resnet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b45abbaf76fc33489fafdf22a6191e99f1ac6cfc Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/resnet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/shufflenetv2.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/shufflenetv2.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..417a0c1f52d597a993ed724e2783e42098ce9d06 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/shufflenetv2.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..179de0a3549199af00795ef126c26dcf69bc7d5b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/googlenet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/googlenet.py new file mode 100644 index 0000000000000000000000000000000000000000..151f9c627f4995de2a59251bf51008c65c27c85c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/googlenet.py @@ -0,0 +1,210 @@ +import warnings +from functools import partial +from typing import Any, Optional, Union + +import torch +import torch.nn as nn +from torch import Tensor +from torch.nn import functional as F + +from ...transforms._presets import ImageClassification +from .._api import register_model, Weights, WeightsEnum +from .._meta import _IMAGENET_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface +from ..googlenet import BasicConv2d, GoogLeNet, GoogLeNet_Weights, GoogLeNetOutputs, Inception, InceptionAux +from .utils import _fuse_modules, _replace_relu, quantize_model + + +__all__ = [ + "QuantizableGoogLeNet", + "GoogLeNet_QuantizedWeights", + "googlenet", +] + + +class QuantizableBasicConv2d(BasicConv2d): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.relu = nn.ReLU() + + def forward(self, x: Tensor) -> Tensor: + x = self.conv(x) + x = self.bn(x) + x = self.relu(x) + return x + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + _fuse_modules(self, ["conv", "bn", "relu"], is_qat, inplace=True) + + +class QuantizableInception(Inception): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + self.cat = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return self.cat.cat(outputs, 1) + + +class QuantizableInceptionAux(InceptionAux): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + self.relu = nn.ReLU() + + def forward(self, x: Tensor) -> Tensor: + # aux1: N x 512 x 14 x 14, aux2: N x 528 x 14 x 14 + x = F.adaptive_avg_pool2d(x, (4, 4)) + # aux1: N x 512 x 4 x 4, aux2: N x 528 x 4 x 4 + x = self.conv(x) + # N x 128 x 4 x 4 + x = torch.flatten(x, 1) + # N x 2048 + x = self.relu(self.fc1(x)) + # N x 1024 + x = self.dropout(x) + # N x 1024 + x = self.fc2(x) + # N x 1000 (num_classes) + + return x + + +class QuantizableGoogLeNet(GoogLeNet): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__( # type: ignore[misc] + *args, blocks=[QuantizableBasicConv2d, QuantizableInception, QuantizableInceptionAux], **kwargs + ) + self.quant = torch.ao.quantization.QuantStub() + self.dequant = torch.ao.quantization.DeQuantStub() + + def forward(self, x: Tensor) -> GoogLeNetOutputs: + x = self._transform_input(x) + x = self.quant(x) + x, aux1, aux2 = self._forward(x) + x = self.dequant(x) + aux_defined = self.training and self.aux_logits + if torch.jit.is_scripting(): + if not aux_defined: + warnings.warn("Scripted QuantizableGoogleNet always returns GoogleNetOutputs Tuple") + return GoogLeNetOutputs(x, aux2, aux1) + else: + return self.eager_outputs(x, aux2, aux1) + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + r"""Fuse conv/bn/relu modules in googlenet model + + Fuse conv+bn+relu/ conv+relu/conv+bn modules to prepare for quantization. + Model is modified in place. Note that this operation does not change numerics + and the model after modification is in floating point + """ + + for m in self.modules(): + if type(m) is QuantizableBasicConv2d: + m.fuse_model(is_qat) + + +class GoogLeNet_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/googlenet_fbgemm-c81f6644.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + "num_params": 6624904, + "min_size": (15, 15), + "categories": _IMAGENET_CATEGORIES, + "backend": "fbgemm", + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#post-training-quantized-models", + "unquantized": GoogLeNet_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 69.826, + "acc@5": 89.404, + } + }, + "_ops": 1.498, + "_file_size": 12.618, + "_docs": """ + These weights were produced by doing Post Training Quantization (eager mode) on top of the unquantized + weights listed below. + """, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +@register_model(name="quantized_googlenet") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: GoogLeNet_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else GoogLeNet_Weights.IMAGENET1K_V1, + ) +) +def googlenet( + *, + weights: Optional[Union[GoogLeNet_QuantizedWeights, GoogLeNet_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableGoogLeNet: + """GoogLeNet (Inception v1) model architecture from `Going Deeper with Convolutions `__. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.GoogLeNet_QuantizedWeights` or :class:`~torchvision.models.GoogLeNet_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.GoogLeNet_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + quantize (bool, optional): If True, return a quantized version of the model. Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableGoogLeNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.GoogLeNet_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.GoogLeNet_Weights + :members: + :noindex: + """ + weights = (GoogLeNet_QuantizedWeights if quantize else GoogLeNet_Weights).verify(weights) + + original_aux_logits = kwargs.get("aux_logits", False) + if weights is not None: + if "transform_input" not in kwargs: + _ovewrite_named_param(kwargs, "transform_input", True) + _ovewrite_named_param(kwargs, "aux_logits", True) + _ovewrite_named_param(kwargs, "init_weights", False) + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + if "backend" in weights.meta: + _ovewrite_named_param(kwargs, "backend", weights.meta["backend"]) + backend = kwargs.pop("backend", "fbgemm") + + model = QuantizableGoogLeNet(**kwargs) + _replace_relu(model) + if quantize: + quantize_model(model, backend) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if not original_aux_logits: + model.aux_logits = False + model.aux1 = None # type: ignore[assignment] + model.aux2 = None # type: ignore[assignment] + else: + warnings.warn( + "auxiliary heads in the pretrained googlenet model are NOT pretrained, so make sure to train them" + ) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/inception.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/inception.py new file mode 100644 index 0000000000000000000000000000000000000000..873c19627c9db277c08da01a5c5ae5578df65cc6 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/inception.py @@ -0,0 +1,273 @@ +import warnings +from functools import partial +from typing import Any, List, Optional, Union + +import torch +import torch.nn as nn +import torch.nn.functional as F +from torch import Tensor +from torchvision.models import inception as inception_module +from torchvision.models.inception import Inception_V3_Weights, InceptionOutputs + +from ...transforms._presets import ImageClassification +from .._api import register_model, Weights, WeightsEnum +from .._meta import _IMAGENET_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface +from .utils import _fuse_modules, _replace_relu, quantize_model + + +__all__ = [ + "QuantizableInception3", + "Inception_V3_QuantizedWeights", + "inception_v3", +] + + +class QuantizableBasicConv2d(inception_module.BasicConv2d): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.relu = nn.ReLU() + + def forward(self, x: Tensor) -> Tensor: + x = self.conv(x) + x = self.bn(x) + x = self.relu(x) + return x + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + _fuse_modules(self, ["conv", "bn", "relu"], is_qat, inplace=True) + + +class QuantizableInceptionA(inception_module.InceptionA): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + self.myop = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return self.myop.cat(outputs, 1) + + +class QuantizableInceptionB(inception_module.InceptionB): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + self.myop = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return self.myop.cat(outputs, 1) + + +class QuantizableInceptionC(inception_module.InceptionC): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + self.myop = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return self.myop.cat(outputs, 1) + + +class QuantizableInceptionD(inception_module.InceptionD): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + self.myop = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return self.myop.cat(outputs, 1) + + +class QuantizableInceptionE(inception_module.InceptionE): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + self.myop1 = nn.quantized.FloatFunctional() + self.myop2 = nn.quantized.FloatFunctional() + self.myop3 = nn.quantized.FloatFunctional() + + def _forward(self, x: Tensor) -> List[Tensor]: + branch1x1 = self.branch1x1(x) + + branch3x3 = self.branch3x3_1(x) + branch3x3 = [self.branch3x3_2a(branch3x3), self.branch3x3_2b(branch3x3)] + branch3x3 = self.myop1.cat(branch3x3, 1) + + branch3x3dbl = self.branch3x3dbl_1(x) + branch3x3dbl = self.branch3x3dbl_2(branch3x3dbl) + branch3x3dbl = [ + self.branch3x3dbl_3a(branch3x3dbl), + self.branch3x3dbl_3b(branch3x3dbl), + ] + branch3x3dbl = self.myop2.cat(branch3x3dbl, 1) + + branch_pool = F.avg_pool2d(x, kernel_size=3, stride=1, padding=1) + branch_pool = self.branch_pool(branch_pool) + + outputs = [branch1x1, branch3x3, branch3x3dbl, branch_pool] + return outputs + + def forward(self, x: Tensor) -> Tensor: + outputs = self._forward(x) + return self.myop3.cat(outputs, 1) + + +class QuantizableInceptionAux(inception_module.InceptionAux): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, conv_block=QuantizableBasicConv2d, **kwargs) # type: ignore[misc] + + +class QuantizableInception3(inception_module.Inception3): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__( # type: ignore[misc] + *args, + inception_blocks=[ + QuantizableBasicConv2d, + QuantizableInceptionA, + QuantizableInceptionB, + QuantizableInceptionC, + QuantizableInceptionD, + QuantizableInceptionE, + QuantizableInceptionAux, + ], + **kwargs, + ) + self.quant = torch.ao.quantization.QuantStub() + self.dequant = torch.ao.quantization.DeQuantStub() + + def forward(self, x: Tensor) -> InceptionOutputs: + x = self._transform_input(x) + x = self.quant(x) + x, aux = self._forward(x) + x = self.dequant(x) + aux_defined = self.training and self.aux_logits + if torch.jit.is_scripting(): + if not aux_defined: + warnings.warn("Scripted QuantizableInception3 always returns QuantizableInception3 Tuple") + return InceptionOutputs(x, aux) + else: + return self.eager_outputs(x, aux) + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + r"""Fuse conv/bn/relu modules in inception model + + Fuse conv+bn+relu/ conv+relu/conv+bn modules to prepare for quantization. + Model is modified in place. Note that this operation does not change numerics + and the model after modification is in floating point + """ + + for m in self.modules(): + if type(m) is QuantizableBasicConv2d: + m.fuse_model(is_qat) + + +class Inception_V3_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/inception_v3_google_fbgemm-a2837893.pth", + transforms=partial(ImageClassification, crop_size=299, resize_size=342), + meta={ + "num_params": 27161264, + "min_size": (75, 75), + "categories": _IMAGENET_CATEGORIES, + "backend": "fbgemm", + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#post-training-quantized-models", + "unquantized": Inception_V3_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.176, + "acc@5": 93.354, + } + }, + "_ops": 5.713, + "_file_size": 23.146, + "_docs": """ + These weights were produced by doing Post Training Quantization (eager mode) on top of the unquantized + weights listed below. + """, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +@register_model(name="quantized_inception_v3") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: Inception_V3_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else Inception_V3_Weights.IMAGENET1K_V1, + ) +) +def inception_v3( + *, + weights: Optional[Union[Inception_V3_QuantizedWeights, Inception_V3_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableInception3: + r"""Inception v3 model architecture from + `Rethinking the Inception Architecture for Computer Vision `__. + + .. note:: + **Important**: In contrast to the other models the inception_v3 expects tensors with a size of + N x 3 x 299 x 299, so ensure your images are sized accordingly. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.Inception_V3_QuantizedWeights` or :class:`~torchvision.models.Inception_V3_Weights`, optional): The pretrained + weights for the model. See + :class:`~torchvision.models.quantization.Inception_V3_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. + Default is True. + quantize (bool, optional): If True, return a quantized version of the model. + Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableInception3`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.Inception_V3_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.Inception_V3_Weights + :members: + :noindex: + """ + weights = (Inception_V3_QuantizedWeights if quantize else Inception_V3_Weights).verify(weights) + + original_aux_logits = kwargs.get("aux_logits", False) + if weights is not None: + if "transform_input" not in kwargs: + _ovewrite_named_param(kwargs, "transform_input", True) + _ovewrite_named_param(kwargs, "aux_logits", True) + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + if "backend" in weights.meta: + _ovewrite_named_param(kwargs, "backend", weights.meta["backend"]) + backend = kwargs.pop("backend", "fbgemm") + + model = QuantizableInception3(**kwargs) + _replace_relu(model) + if quantize: + quantize_model(model, backend) + + if weights is not None: + if quantize and not original_aux_logits: + model.aux_logits = False + model.AuxLogits = None + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + if not quantize and not original_aux_logits: + model.aux_logits = False + model.AuxLogits = None + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenet.py new file mode 100644 index 0000000000000000000000000000000000000000..98c00792aa997e26a000d3d3f4d1874484571d08 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenet.py @@ -0,0 +1,6 @@ +from .mobilenetv2 import * # noqa: F401, F403 +from .mobilenetv3 import * # noqa: F401, F403 +from .mobilenetv2 import __all__ as mv2_all +from .mobilenetv3 import __all__ as mv3_all + +__all__ = mv2_all + mv3_all diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenetv2.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenetv2.py new file mode 100644 index 0000000000000000000000000000000000000000..4111a70e07d3595ba0625943dbea074923ea9361 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenetv2.py @@ -0,0 +1,154 @@ +from functools import partial +from typing import Any, Optional, Union + +from torch import nn, Tensor +from torch.ao.quantization import DeQuantStub, QuantStub +from torchvision.models.mobilenetv2 import InvertedResidual, MobileNet_V2_Weights, MobileNetV2 + +from ...ops.misc import Conv2dNormActivation +from ...transforms._presets import ImageClassification +from .._api import register_model, Weights, WeightsEnum +from .._meta import _IMAGENET_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface +from .utils import _fuse_modules, _replace_relu, quantize_model + + +__all__ = [ + "QuantizableMobileNetV2", + "MobileNet_V2_QuantizedWeights", + "mobilenet_v2", +] + + +class QuantizableInvertedResidual(InvertedResidual): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.skip_add = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + if self.use_res_connect: + return self.skip_add.add(x, self.conv(x)) + else: + return self.conv(x) + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + for idx in range(len(self.conv)): + if type(self.conv[idx]) is nn.Conv2d: + _fuse_modules(self.conv, [str(idx), str(idx + 1)], is_qat, inplace=True) + + +class QuantizableMobileNetV2(MobileNetV2): + def __init__(self, *args: Any, **kwargs: Any) -> None: + """ + MobileNet V2 main class + + Args: + Inherits args from floating point MobileNetV2 + """ + super().__init__(*args, **kwargs) + self.quant = QuantStub() + self.dequant = DeQuantStub() + + def forward(self, x: Tensor) -> Tensor: + x = self.quant(x) + x = self._forward_impl(x) + x = self.dequant(x) + return x + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + for m in self.modules(): + if type(m) is Conv2dNormActivation: + _fuse_modules(m, ["0", "1", "2"], is_qat, inplace=True) + if type(m) is QuantizableInvertedResidual: + m.fuse_model(is_qat) + + +class MobileNet_V2_QuantizedWeights(WeightsEnum): + IMAGENET1K_QNNPACK_V1 = Weights( + url="https://download.pytorch.org/models/quantized/mobilenet_v2_qnnpack_37f702c5.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + "num_params": 3504872, + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, + "backend": "qnnpack", + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#qat-mobilenetv2", + "unquantized": MobileNet_V2_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 71.658, + "acc@5": 90.150, + } + }, + "_ops": 0.301, + "_file_size": 3.423, + "_docs": """ + These weights were produced by doing Quantization Aware Training (eager mode) on top of the unquantized + weights listed below. + """, + }, + ) + DEFAULT = IMAGENET1K_QNNPACK_V1 + + +@register_model(name="quantized_mobilenet_v2") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: MobileNet_V2_QuantizedWeights.IMAGENET1K_QNNPACK_V1 + if kwargs.get("quantize", False) + else MobileNet_V2_Weights.IMAGENET1K_V1, + ) +) +def mobilenet_v2( + *, + weights: Optional[Union[MobileNet_V2_QuantizedWeights, MobileNet_V2_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableMobileNetV2: + """ + Constructs a MobileNetV2 architecture from + `MobileNetV2: Inverted Residuals and Linear Bottlenecks + `_. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.MobileNet_V2_QuantizedWeights` or :class:`~torchvision.models.MobileNet_V2_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.MobileNet_V2_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + quantize (bool, optional): If True, returns a quantized version of the model. Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableMobileNetV2`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.quantization.MobileNet_V2_QuantizedWeights + :members: + .. autoclass:: torchvision.models.MobileNet_V2_Weights + :members: + :noindex: + """ + weights = (MobileNet_V2_QuantizedWeights if quantize else MobileNet_V2_Weights).verify(weights) + + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + if "backend" in weights.meta: + _ovewrite_named_param(kwargs, "backend", weights.meta["backend"]) + backend = kwargs.pop("backend", "qnnpack") + + model = QuantizableMobileNetV2(block=QuantizableInvertedResidual, **kwargs) + _replace_relu(model) + if quantize: + quantize_model(model, backend) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenetv3.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenetv3.py new file mode 100644 index 0000000000000000000000000000000000000000..f2f45e2e51a200b779a8bcd42c8b6087c3118c37 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/mobilenetv3.py @@ -0,0 +1,237 @@ +from functools import partial +from typing import Any, List, Optional, Union + +import torch +from torch import nn, Tensor +from torch.ao.quantization import DeQuantStub, QuantStub + +from ...ops.misc import Conv2dNormActivation, SqueezeExcitation +from ...transforms._presets import ImageClassification +from .._api import register_model, Weights, WeightsEnum +from .._meta import _IMAGENET_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface +from ..mobilenetv3 import ( + _mobilenet_v3_conf, + InvertedResidual, + InvertedResidualConfig, + MobileNet_V3_Large_Weights, + MobileNetV3, +) +from .utils import _fuse_modules, _replace_relu + + +__all__ = [ + "QuantizableMobileNetV3", + "MobileNet_V3_Large_QuantizedWeights", + "mobilenet_v3_large", +] + + +class QuantizableSqueezeExcitation(SqueezeExcitation): + _version = 2 + + def __init__(self, *args: Any, **kwargs: Any) -> None: + kwargs["scale_activation"] = nn.Hardsigmoid + super().__init__(*args, **kwargs) + self.skip_mul = nn.quantized.FloatFunctional() + + def forward(self, input: Tensor) -> Tensor: + return self.skip_mul.mul(self._scale(input), input) + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + _fuse_modules(self, ["fc1", "activation"], is_qat, inplace=True) + + def _load_from_state_dict( + self, + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ): + version = local_metadata.get("version", None) + + if hasattr(self, "qconfig") and (version is None or version < 2): + default_state_dict = { + "scale_activation.activation_post_process.scale": torch.tensor([1.0]), + "scale_activation.activation_post_process.activation_post_process.scale": torch.tensor([1.0]), + "scale_activation.activation_post_process.zero_point": torch.tensor([0], dtype=torch.int32), + "scale_activation.activation_post_process.activation_post_process.zero_point": torch.tensor( + [0], dtype=torch.int32 + ), + "scale_activation.activation_post_process.fake_quant_enabled": torch.tensor([1]), + "scale_activation.activation_post_process.observer_enabled": torch.tensor([1]), + } + for k, v in default_state_dict.items(): + full_key = prefix + k + if full_key not in state_dict: + state_dict[full_key] = v + + super()._load_from_state_dict( + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ) + + +class QuantizableInvertedResidual(InvertedResidual): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, se_layer=QuantizableSqueezeExcitation, **kwargs) # type: ignore[misc] + self.skip_add = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + if self.use_res_connect: + return self.skip_add.add(x, self.block(x)) + else: + return self.block(x) + + +class QuantizableMobileNetV3(MobileNetV3): + def __init__(self, *args: Any, **kwargs: Any) -> None: + """ + MobileNet V3 main class + + Args: + Inherits args from floating point MobileNetV3 + """ + super().__init__(*args, **kwargs) + self.quant = QuantStub() + self.dequant = DeQuantStub() + + def forward(self, x: Tensor) -> Tensor: + x = self.quant(x) + x = self._forward_impl(x) + x = self.dequant(x) + return x + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + for m in self.modules(): + if type(m) is Conv2dNormActivation: + modules_to_fuse = ["0", "1"] + if len(m) == 3 and type(m[2]) is nn.ReLU: + modules_to_fuse.append("2") + _fuse_modules(m, modules_to_fuse, is_qat, inplace=True) + elif type(m) is QuantizableSqueezeExcitation: + m.fuse_model(is_qat) + + +def _mobilenet_v3_model( + inverted_residual_setting: List[InvertedResidualConfig], + last_channel: int, + weights: Optional[WeightsEnum], + progress: bool, + quantize: bool, + **kwargs: Any, +) -> QuantizableMobileNetV3: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + if "backend" in weights.meta: + _ovewrite_named_param(kwargs, "backend", weights.meta["backend"]) + backend = kwargs.pop("backend", "qnnpack") + + model = QuantizableMobileNetV3(inverted_residual_setting, last_channel, block=QuantizableInvertedResidual, **kwargs) + _replace_relu(model) + + if quantize: + # Instead of quantizing the model and then loading the quantized weights we take a different approach. + # We prepare the QAT model, load the QAT weights from training and then convert it. + # This is done to avoid extremely low accuracies observed on the specific model. This is rather a workaround + # for an unresolved bug on the eager quantization API detailed at: https://github.com/pytorch/vision/issues/5890 + model.fuse_model(is_qat=True) + model.qconfig = torch.ao.quantization.get_default_qat_qconfig(backend) + torch.ao.quantization.prepare_qat(model, inplace=True) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + if quantize: + torch.ao.quantization.convert(model, inplace=True) + model.eval() + + return model + + +class MobileNet_V3_Large_QuantizedWeights(WeightsEnum): + IMAGENET1K_QNNPACK_V1 = Weights( + url="https://download.pytorch.org/models/quantized/mobilenet_v3_large_qnnpack-5bcacf28.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + "num_params": 5483032, + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, + "backend": "qnnpack", + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#qat-mobilenetv3", + "unquantized": MobileNet_V3_Large_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 73.004, + "acc@5": 90.858, + } + }, + "_ops": 0.217, + "_file_size": 21.554, + "_docs": """ + These weights were produced by doing Quantization Aware Training (eager mode) on top of the unquantized + weights listed below. + """, + }, + ) + DEFAULT = IMAGENET1K_QNNPACK_V1 + + +@register_model(name="quantized_mobilenet_v3_large") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: MobileNet_V3_Large_QuantizedWeights.IMAGENET1K_QNNPACK_V1 + if kwargs.get("quantize", False) + else MobileNet_V3_Large_Weights.IMAGENET1K_V1, + ) +) +def mobilenet_v3_large( + *, + weights: Optional[Union[MobileNet_V3_Large_QuantizedWeights, MobileNet_V3_Large_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableMobileNetV3: + """ + MobileNetV3 (Large) model from + `Searching for MobileNetV3 `_. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.MobileNet_V3_Large_QuantizedWeights` or :class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.MobileNet_V3_Large_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool): If True, displays a progress bar of the + download to stderr. Default is True. + quantize (bool): If True, return a quantized version of the model. Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.MobileNet_V3_Large_QuantizedWeights`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.MobileNet_V3_Large_QuantizedWeights + :members: + .. autoclass:: torchvision.models.MobileNet_V3_Large_Weights + :members: + :noindex: + """ + weights = (MobileNet_V3_Large_QuantizedWeights if quantize else MobileNet_V3_Large_Weights).verify(weights) + + inverted_residual_setting, last_channel = _mobilenet_v3_conf("mobilenet_v3_large", **kwargs) + return _mobilenet_v3_model(inverted_residual_setting, last_channel, weights, progress, quantize, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/resnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/resnet.py new file mode 100644 index 0000000000000000000000000000000000000000..375e5712f94330a17f974c755eddfdf5d28a027c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/resnet.py @@ -0,0 +1,484 @@ +from functools import partial +from typing import Any, List, Optional, Type, Union + +import torch +import torch.nn as nn +from torch import Tensor +from torchvision.models.resnet import ( + BasicBlock, + Bottleneck, + ResNet, + ResNet18_Weights, + ResNet50_Weights, + ResNeXt101_32X8D_Weights, + ResNeXt101_64X4D_Weights, +) + +from ...transforms._presets import ImageClassification +from .._api import register_model, Weights, WeightsEnum +from .._meta import _IMAGENET_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface +from .utils import _fuse_modules, _replace_relu, quantize_model + + +__all__ = [ + "QuantizableResNet", + "ResNet18_QuantizedWeights", + "ResNet50_QuantizedWeights", + "ResNeXt101_32X8D_QuantizedWeights", + "ResNeXt101_64X4D_QuantizedWeights", + "resnet18", + "resnet50", + "resnext101_32x8d", + "resnext101_64x4d", +] + + +class QuantizableBasicBlock(BasicBlock): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.add_relu = torch.nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + identity = x + + out = self.conv1(x) + out = self.bn1(out) + out = self.relu(out) + + out = self.conv2(out) + out = self.bn2(out) + + if self.downsample is not None: + identity = self.downsample(x) + + out = self.add_relu.add_relu(out, identity) + + return out + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + _fuse_modules(self, [["conv1", "bn1", "relu"], ["conv2", "bn2"]], is_qat, inplace=True) + if self.downsample: + _fuse_modules(self.downsample, ["0", "1"], is_qat, inplace=True) + + +class QuantizableBottleneck(Bottleneck): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.skip_add_relu = nn.quantized.FloatFunctional() + self.relu1 = nn.ReLU(inplace=False) + self.relu2 = nn.ReLU(inplace=False) + + def forward(self, x: Tensor) -> Tensor: + identity = x + out = self.conv1(x) + out = self.bn1(out) + out = self.relu1(out) + out = self.conv2(out) + out = self.bn2(out) + out = self.relu2(out) + + out = self.conv3(out) + out = self.bn3(out) + + if self.downsample is not None: + identity = self.downsample(x) + out = self.skip_add_relu.add_relu(out, identity) + + return out + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + _fuse_modules( + self, [["conv1", "bn1", "relu1"], ["conv2", "bn2", "relu2"], ["conv3", "bn3"]], is_qat, inplace=True + ) + if self.downsample: + _fuse_modules(self.downsample, ["0", "1"], is_qat, inplace=True) + + +class QuantizableResNet(ResNet): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + + self.quant = torch.ao.quantization.QuantStub() + self.dequant = torch.ao.quantization.DeQuantStub() + + def forward(self, x: Tensor) -> Tensor: + x = self.quant(x) + # Ensure scriptability + # super(QuantizableResNet,self).forward(x) + # is not scriptable + x = self._forward_impl(x) + x = self.dequant(x) + return x + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + r"""Fuse conv/bn/relu modules in resnet models + + Fuse conv+bn+relu/ Conv+relu/conv+Bn modules to prepare for quantization. + Model is modified in place. Note that this operation does not change numerics + and the model after modification is in floating point + """ + _fuse_modules(self, ["conv1", "bn1", "relu"], is_qat, inplace=True) + for m in self.modules(): + if type(m) is QuantizableBottleneck or type(m) is QuantizableBasicBlock: + m.fuse_model(is_qat) + + +def _resnet( + block: Type[Union[QuantizableBasicBlock, QuantizableBottleneck]], + layers: List[int], + weights: Optional[WeightsEnum], + progress: bool, + quantize: bool, + **kwargs: Any, +) -> QuantizableResNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + if "backend" in weights.meta: + _ovewrite_named_param(kwargs, "backend", weights.meta["backend"]) + backend = kwargs.pop("backend", "fbgemm") + + model = QuantizableResNet(block, layers, **kwargs) + _replace_relu(model) + if quantize: + quantize_model(model, backend) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, + "backend": "fbgemm", + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#post-training-quantized-models", + "_docs": """ + These weights were produced by doing Post Training Quantization (eager mode) on top of the unquantized + weights listed below. + """, +} + + +class ResNet18_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/resnet18_fbgemm_16fa66dd.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 11689512, + "unquantized": ResNet18_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 69.494, + "acc@5": 88.882, + } + }, + "_ops": 1.814, + "_file_size": 11.238, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +class ResNet50_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/resnet50_fbgemm_bf931d71.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 25557032, + "unquantized": ResNet50_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 75.920, + "acc@5": 92.814, + } + }, + "_ops": 4.089, + "_file_size": 24.759, + }, + ) + IMAGENET1K_FBGEMM_V2 = Weights( + url="https://download.pytorch.org/models/quantized/resnet50_fbgemm-23753f79.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 25557032, + "unquantized": ResNet50_Weights.IMAGENET1K_V2, + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.282, + "acc@5": 94.976, + } + }, + "_ops": 4.089, + "_file_size": 24.953, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V2 + + +class ResNeXt101_32X8D_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/resnext101_32x8_fbgemm_09835ccf.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 88791336, + "unquantized": ResNeXt101_32X8D_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.986, + "acc@5": 94.480, + } + }, + "_ops": 16.414, + "_file_size": 86.034, + }, + ) + IMAGENET1K_FBGEMM_V2 = Weights( + url="https://download.pytorch.org/models/quantized/resnext101_32x8_fbgemm-ee16d00c.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 88791336, + "unquantized": ResNeXt101_32X8D_Weights.IMAGENET1K_V2, + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.574, + "acc@5": 96.132, + } + }, + "_ops": 16.414, + "_file_size": 86.645, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V2 + + +class ResNeXt101_64X4D_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/resnext101_64x4d_fbgemm-605a1cb3.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 83455272, + "recipe": "https://github.com/pytorch/vision/pull/5935", + "unquantized": ResNeXt101_64X4D_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.898, + "acc@5": 96.326, + } + }, + "_ops": 15.46, + "_file_size": 81.556, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +@register_model(name="quantized_resnet18") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ResNet18_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ResNet18_Weights.IMAGENET1K_V1, + ) +) +def resnet18( + *, + weights: Optional[Union[ResNet18_QuantizedWeights, ResNet18_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableResNet: + """ResNet-18 model from + `Deep Residual Learning for Image Recognition `_ + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ResNet18_QuantizedWeights` or :class:`~torchvision.models.ResNet18_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ResNet18_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + quantize (bool, optional): If True, return a quantized version of the model. Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ResNet18_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ResNet18_Weights + :members: + :noindex: + """ + weights = (ResNet18_QuantizedWeights if quantize else ResNet18_Weights).verify(weights) + + return _resnet(QuantizableBasicBlock, [2, 2, 2, 2], weights, progress, quantize, **kwargs) + + +@register_model(name="quantized_resnet50") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ResNet50_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ResNet50_Weights.IMAGENET1K_V1, + ) +) +def resnet50( + *, + weights: Optional[Union[ResNet50_QuantizedWeights, ResNet50_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableResNet: + """ResNet-50 model from + `Deep Residual Learning for Image Recognition `_ + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ResNet50_QuantizedWeights` or :class:`~torchvision.models.ResNet50_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ResNet50_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + quantize (bool, optional): If True, return a quantized version of the model. Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ResNet50_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ResNet50_Weights + :members: + :noindex: + """ + weights = (ResNet50_QuantizedWeights if quantize else ResNet50_Weights).verify(weights) + + return _resnet(QuantizableBottleneck, [3, 4, 6, 3], weights, progress, quantize, **kwargs) + + +@register_model(name="quantized_resnext101_32x8d") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ResNeXt101_32X8D_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ResNeXt101_32X8D_Weights.IMAGENET1K_V1, + ) +) +def resnext101_32x8d( + *, + weights: Optional[Union[ResNeXt101_32X8D_QuantizedWeights, ResNeXt101_32X8D_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableResNet: + """ResNeXt-101 32x8d model from + `Aggregated Residual Transformation for Deep Neural Networks `_ + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ResNeXt101_32X8D_QuantizedWeights` or :class:`~torchvision.models.ResNeXt101_32X8D_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ResNet101_32X8D_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + quantize (bool, optional): If True, return a quantized version of the model. Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ResNeXt101_32X8D_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ResNeXt101_32X8D_Weights + :members: + :noindex: + """ + weights = (ResNeXt101_32X8D_QuantizedWeights if quantize else ResNeXt101_32X8D_Weights).verify(weights) + + _ovewrite_named_param(kwargs, "groups", 32) + _ovewrite_named_param(kwargs, "width_per_group", 8) + return _resnet(QuantizableBottleneck, [3, 4, 23, 3], weights, progress, quantize, **kwargs) + + +@register_model(name="quantized_resnext101_64x4d") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ResNeXt101_64X4D_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ResNeXt101_64X4D_Weights.IMAGENET1K_V1, + ) +) +def resnext101_64x4d( + *, + weights: Optional[Union[ResNeXt101_64X4D_QuantizedWeights, ResNeXt101_64X4D_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableResNet: + """ResNeXt-101 64x4d model from + `Aggregated Residual Transformation for Deep Neural Networks `_ + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ResNeXt101_64X4D_QuantizedWeights` or :class:`~torchvision.models.ResNeXt101_64X4D_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ResNet101_64X4D_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + quantize (bool, optional): If True, return a quantized version of the model. Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.QuantizableResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ResNeXt101_64X4D_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ResNeXt101_64X4D_Weights + :members: + :noindex: + """ + weights = (ResNeXt101_64X4D_QuantizedWeights if quantize else ResNeXt101_64X4D_Weights).verify(weights) + + _ovewrite_named_param(kwargs, "groups", 64) + _ovewrite_named_param(kwargs, "width_per_group", 4) + return _resnet(QuantizableBottleneck, [3, 4, 23, 3], weights, progress, quantize, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/shufflenetv2.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/shufflenetv2.py new file mode 100644 index 0000000000000000000000000000000000000000..426f142d86497b53b27f11980cecd84f0d55d145 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/shufflenetv2.py @@ -0,0 +1,427 @@ +from functools import partial +from typing import Any, List, Optional, Union + +import torch +import torch.nn as nn +from torch import Tensor +from torchvision.models import shufflenetv2 + +from ...transforms._presets import ImageClassification +from .._api import register_model, Weights, WeightsEnum +from .._meta import _IMAGENET_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface +from ..shufflenetv2 import ( + ShuffleNet_V2_X0_5_Weights, + ShuffleNet_V2_X1_0_Weights, + ShuffleNet_V2_X1_5_Weights, + ShuffleNet_V2_X2_0_Weights, +) +from .utils import _fuse_modules, _replace_relu, quantize_model + + +__all__ = [ + "QuantizableShuffleNetV2", + "ShuffleNet_V2_X0_5_QuantizedWeights", + "ShuffleNet_V2_X1_0_QuantizedWeights", + "ShuffleNet_V2_X1_5_QuantizedWeights", + "ShuffleNet_V2_X2_0_QuantizedWeights", + "shufflenet_v2_x0_5", + "shufflenet_v2_x1_0", + "shufflenet_v2_x1_5", + "shufflenet_v2_x2_0", +] + + +class QuantizableInvertedResidual(shufflenetv2.InvertedResidual): + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, **kwargs) + self.cat = nn.quantized.FloatFunctional() + + def forward(self, x: Tensor) -> Tensor: + if self.stride == 1: + x1, x2 = x.chunk(2, dim=1) + out = self.cat.cat([x1, self.branch2(x2)], dim=1) + else: + out = self.cat.cat([self.branch1(x), self.branch2(x)], dim=1) + + out = shufflenetv2.channel_shuffle(out, 2) + + return out + + +class QuantizableShuffleNetV2(shufflenetv2.ShuffleNetV2): + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + def __init__(self, *args: Any, **kwargs: Any) -> None: + super().__init__(*args, inverted_residual=QuantizableInvertedResidual, **kwargs) # type: ignore[misc] + self.quant = torch.ao.quantization.QuantStub() + self.dequant = torch.ao.quantization.DeQuantStub() + + def forward(self, x: Tensor) -> Tensor: + x = self.quant(x) + x = self._forward_impl(x) + x = self.dequant(x) + return x + + def fuse_model(self, is_qat: Optional[bool] = None) -> None: + r"""Fuse conv/bn/relu modules in shufflenetv2 model + + Fuse conv+bn+relu/ conv+relu/conv+bn modules to prepare for quantization. + Model is modified in place. + + .. note:: + Note that this operation does not change numerics + and the model after modification is in floating point + """ + for name, m in self._modules.items(): + if name in ["conv1", "conv5"] and m is not None: + _fuse_modules(m, [["0", "1", "2"]], is_qat, inplace=True) + for m in self.modules(): + if type(m) is QuantizableInvertedResidual: + if len(m.branch1._modules.items()) > 0: + _fuse_modules(m.branch1, [["0", "1"], ["2", "3", "4"]], is_qat, inplace=True) + _fuse_modules( + m.branch2, + [["0", "1", "2"], ["3", "4"], ["5", "6", "7"]], + is_qat, + inplace=True, + ) + + +def _shufflenetv2( + stages_repeats: List[int], + stages_out_channels: List[int], + *, + weights: Optional[WeightsEnum], + progress: bool, + quantize: bool, + **kwargs: Any, +) -> QuantizableShuffleNetV2: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + if "backend" in weights.meta: + _ovewrite_named_param(kwargs, "backend", weights.meta["backend"]) + backend = kwargs.pop("backend", "fbgemm") + + model = QuantizableShuffleNetV2(stages_repeats, stages_out_channels, **kwargs) + _replace_relu(model) + if quantize: + quantize_model(model, backend) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, + "backend": "fbgemm", + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#post-training-quantized-models", + "_docs": """ + These weights were produced by doing Post Training Quantization (eager mode) on top of the unquantized + weights listed below. + """, +} + + +class ShuffleNet_V2_X0_5_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/shufflenetv2_x0.5_fbgemm-00845098.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 1366792, + "unquantized": ShuffleNet_V2_X0_5_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 57.972, + "acc@5": 79.780, + } + }, + "_ops": 0.04, + "_file_size": 1.501, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +class ShuffleNet_V2_X1_0_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/shufflenetv2_x1_fbgemm-1e62bb32.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 2278604, + "unquantized": ShuffleNet_V2_X1_0_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 68.360, + "acc@5": 87.582, + } + }, + "_ops": 0.145, + "_file_size": 2.334, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +class ShuffleNet_V2_X1_5_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/shufflenetv2_x1_5_fbgemm-d7401f05.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/pull/5906", + "num_params": 3503624, + "unquantized": ShuffleNet_V2_X1_5_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 72.052, + "acc@5": 90.700, + } + }, + "_ops": 0.296, + "_file_size": 3.672, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +class ShuffleNet_V2_X2_0_QuantizedWeights(WeightsEnum): + IMAGENET1K_FBGEMM_V1 = Weights( + url="https://download.pytorch.org/models/quantized/shufflenetv2_x2_0_fbgemm-5cac526c.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/pull/5906", + "num_params": 7393996, + "unquantized": ShuffleNet_V2_X2_0_Weights.IMAGENET1K_V1, + "_metrics": { + "ImageNet-1K": { + "acc@1": 75.354, + "acc@5": 92.488, + } + }, + "_ops": 0.583, + "_file_size": 7.467, + }, + ) + DEFAULT = IMAGENET1K_FBGEMM_V1 + + +@register_model(name="quantized_shufflenet_v2_x0_5") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ShuffleNet_V2_X0_5_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ShuffleNet_V2_X0_5_Weights.IMAGENET1K_V1, + ) +) +def shufflenet_v2_x0_5( + *, + weights: Optional[Union[ShuffleNet_V2_X0_5_QuantizedWeights, ShuffleNet_V2_X0_5_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableShuffleNetV2: + """ + Constructs a ShuffleNetV2 with 0.5x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ShuffleNet_V2_X0_5_QuantizedWeights` or :class:`~torchvision.models.ShuffleNet_V2_X0_5_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ShuffleNet_V2_X0_5_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. + Default is True. + quantize (bool, optional): If True, return a quantized version of the model. + Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.ShuffleNet_V2_X0_5_QuantizedWeights`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ShuffleNet_V2_X0_5_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ShuffleNet_V2_X0_5_Weights + :members: + :noindex: + """ + weights = (ShuffleNet_V2_X0_5_QuantizedWeights if quantize else ShuffleNet_V2_X0_5_Weights).verify(weights) + return _shufflenetv2( + [4, 8, 4], [24, 48, 96, 192, 1024], weights=weights, progress=progress, quantize=quantize, **kwargs + ) + + +@register_model(name="quantized_shufflenet_v2_x1_0") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ShuffleNet_V2_X1_0_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ShuffleNet_V2_X1_0_Weights.IMAGENET1K_V1, + ) +) +def shufflenet_v2_x1_0( + *, + weights: Optional[Union[ShuffleNet_V2_X1_0_QuantizedWeights, ShuffleNet_V2_X1_0_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableShuffleNetV2: + """ + Constructs a ShuffleNetV2 with 1.0x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ShuffleNet_V2_X1_0_QuantizedWeights` or :class:`~torchvision.models.ShuffleNet_V2_X1_0_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ShuffleNet_V2_X1_0_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. + Default is True. + quantize (bool, optional): If True, return a quantized version of the model. + Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.ShuffleNet_V2_X1_0_QuantizedWeights`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ShuffleNet_V2_X1_0_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ShuffleNet_V2_X1_0_Weights + :members: + :noindex: + """ + weights = (ShuffleNet_V2_X1_0_QuantizedWeights if quantize else ShuffleNet_V2_X1_0_Weights).verify(weights) + return _shufflenetv2( + [4, 8, 4], [24, 116, 232, 464, 1024], weights=weights, progress=progress, quantize=quantize, **kwargs + ) + + +@register_model(name="quantized_shufflenet_v2_x1_5") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ShuffleNet_V2_X1_5_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ShuffleNet_V2_X1_5_Weights.IMAGENET1K_V1, + ) +) +def shufflenet_v2_x1_5( + *, + weights: Optional[Union[ShuffleNet_V2_X1_5_QuantizedWeights, ShuffleNet_V2_X1_5_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableShuffleNetV2: + """ + Constructs a ShuffleNetV2 with 1.5x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ShuffleNet_V2_X1_5_QuantizedWeights` or :class:`~torchvision.models.ShuffleNet_V2_X1_5_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ShuffleNet_V2_X1_5_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. + Default is True. + quantize (bool, optional): If True, return a quantized version of the model. + Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.ShuffleNet_V2_X1_5_QuantizedWeights`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ShuffleNet_V2_X1_5_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ShuffleNet_V2_X1_5_Weights + :members: + :noindex: + """ + weights = (ShuffleNet_V2_X1_5_QuantizedWeights if quantize else ShuffleNet_V2_X1_5_Weights).verify(weights) + return _shufflenetv2( + [4, 8, 4], [24, 176, 352, 704, 1024], weights=weights, progress=progress, quantize=quantize, **kwargs + ) + + +@register_model(name="quantized_shufflenet_v2_x2_0") +@handle_legacy_interface( + weights=( + "pretrained", + lambda kwargs: ShuffleNet_V2_X2_0_QuantizedWeights.IMAGENET1K_FBGEMM_V1 + if kwargs.get("quantize", False) + else ShuffleNet_V2_X2_0_Weights.IMAGENET1K_V1, + ) +) +def shufflenet_v2_x2_0( + *, + weights: Optional[Union[ShuffleNet_V2_X2_0_QuantizedWeights, ShuffleNet_V2_X2_0_Weights]] = None, + progress: bool = True, + quantize: bool = False, + **kwargs: Any, +) -> QuantizableShuffleNetV2: + """ + Constructs a ShuffleNetV2 with 2.0x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + .. note:: + Note that ``quantize = True`` returns a quantized model with 8 bit + weights. Quantized models only support inference and run on CPUs. + GPU inference is not yet supported. + + Args: + weights (:class:`~torchvision.models.quantization.ShuffleNet_V2_X2_0_QuantizedWeights` or :class:`~torchvision.models.ShuffleNet_V2_X2_0_Weights`, optional): The + pretrained weights for the model. See + :class:`~torchvision.models.quantization.ShuffleNet_V2_X2_0_QuantizedWeights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. + Default is True. + quantize (bool, optional): If True, return a quantized version of the model. + Default is False. + **kwargs: parameters passed to the ``torchvision.models.quantization.ShuffleNet_V2_X2_0_QuantizedWeights`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.quantization.ShuffleNet_V2_X2_0_QuantizedWeights + :members: + + .. autoclass:: torchvision.models.ShuffleNet_V2_X2_0_Weights + :members: + :noindex: + """ + weights = (ShuffleNet_V2_X2_0_QuantizedWeights if quantize else ShuffleNet_V2_X2_0_Weights).verify(weights) + return _shufflenetv2( + [4, 8, 4], [24, 244, 488, 976, 2048], weights=weights, progress=progress, quantize=quantize, **kwargs + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..c2e2a3b2c4a359947ad4f615b4322c9c93edf0d9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/quantization/utils.py @@ -0,0 +1,51 @@ +from typing import Any, List, Optional, Union + +import torch +from torch import nn + + +def _replace_relu(module: nn.Module) -> None: + reassign = {} + for name, mod in module.named_children(): + _replace_relu(mod) + # Checking for explicit type instead of instance + # as we only want to replace modules of the exact type + # not inherited classes + if type(mod) is nn.ReLU or type(mod) is nn.ReLU6: + reassign[name] = nn.ReLU(inplace=False) + + for key, value in reassign.items(): + module._modules[key] = value + + +def quantize_model(model: nn.Module, backend: str) -> None: + _dummy_input_data = torch.rand(1, 3, 299, 299) + if backend not in torch.backends.quantized.supported_engines: + raise RuntimeError("Quantized backend not supported ") + torch.backends.quantized.engine = backend + model.eval() + # Make sure that weight qconfig matches that of the serialized models + if backend == "fbgemm": + model.qconfig = torch.ao.quantization.QConfig( # type: ignore[assignment] + activation=torch.ao.quantization.default_observer, + weight=torch.ao.quantization.default_per_channel_weight_observer, + ) + elif backend == "qnnpack": + model.qconfig = torch.ao.quantization.QConfig( # type: ignore[assignment] + activation=torch.ao.quantization.default_observer, weight=torch.ao.quantization.default_weight_observer + ) + + # TODO https://github.com/pytorch/vision/pull/4232#pullrequestreview-730461659 + model.fuse_model() # type: ignore[operator] + torch.ao.quantization.prepare(model, inplace=True) + model(_dummy_input_data) + torch.ao.quantization.convert(model, inplace=True) + + +def _fuse_modules( + model: nn.Module, modules_to_fuse: Union[List[str], List[List[str]]], is_qat: Optional[bool], **kwargs: Any +): + if is_qat is None: + is_qat = model.training + method = torch.ao.quantization.fuse_modules_qat if is_qat else torch.ao.quantization.fuse_modules + return method(model, modules_to_fuse, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/regnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/regnet.py new file mode 100644 index 0000000000000000000000000000000000000000..0982355e179bab09cb0cd4908cc3f586206387d1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/regnet.py @@ -0,0 +1,1571 @@ +import math +from collections import OrderedDict +from functools import partial +from typing import Any, Callable, Dict, List, Optional, Tuple + +import torch +from torch import nn, Tensor + +from ..ops.misc import Conv2dNormActivation, SqueezeExcitation +from ..transforms._presets import ImageClassification, InterpolationMode +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _make_divisible, _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "RegNet", + "RegNet_Y_400MF_Weights", + "RegNet_Y_800MF_Weights", + "RegNet_Y_1_6GF_Weights", + "RegNet_Y_3_2GF_Weights", + "RegNet_Y_8GF_Weights", + "RegNet_Y_16GF_Weights", + "RegNet_Y_32GF_Weights", + "RegNet_Y_128GF_Weights", + "RegNet_X_400MF_Weights", + "RegNet_X_800MF_Weights", + "RegNet_X_1_6GF_Weights", + "RegNet_X_3_2GF_Weights", + "RegNet_X_8GF_Weights", + "RegNet_X_16GF_Weights", + "RegNet_X_32GF_Weights", + "regnet_y_400mf", + "regnet_y_800mf", + "regnet_y_1_6gf", + "regnet_y_3_2gf", + "regnet_y_8gf", + "regnet_y_16gf", + "regnet_y_32gf", + "regnet_y_128gf", + "regnet_x_400mf", + "regnet_x_800mf", + "regnet_x_1_6gf", + "regnet_x_3_2gf", + "regnet_x_8gf", + "regnet_x_16gf", + "regnet_x_32gf", +] + + +class SimpleStemIN(Conv2dNormActivation): + """Simple stem for ImageNet: 3x3, BN, ReLU.""" + + def __init__( + self, + width_in: int, + width_out: int, + norm_layer: Callable[..., nn.Module], + activation_layer: Callable[..., nn.Module], + ) -> None: + super().__init__( + width_in, width_out, kernel_size=3, stride=2, norm_layer=norm_layer, activation_layer=activation_layer + ) + + +class BottleneckTransform(nn.Sequential): + """Bottleneck transformation: 1x1, 3x3 [+SE], 1x1.""" + + def __init__( + self, + width_in: int, + width_out: int, + stride: int, + norm_layer: Callable[..., nn.Module], + activation_layer: Callable[..., nn.Module], + group_width: int, + bottleneck_multiplier: float, + se_ratio: Optional[float], + ) -> None: + layers: OrderedDict[str, nn.Module] = OrderedDict() + w_b = int(round(width_out * bottleneck_multiplier)) + g = w_b // group_width + + layers["a"] = Conv2dNormActivation( + width_in, w_b, kernel_size=1, stride=1, norm_layer=norm_layer, activation_layer=activation_layer + ) + layers["b"] = Conv2dNormActivation( + w_b, w_b, kernel_size=3, stride=stride, groups=g, norm_layer=norm_layer, activation_layer=activation_layer + ) + + if se_ratio: + # The SE reduction ratio is defined with respect to the + # beginning of the block + width_se_out = int(round(se_ratio * width_in)) + layers["se"] = SqueezeExcitation( + input_channels=w_b, + squeeze_channels=width_se_out, + activation=activation_layer, + ) + + layers["c"] = Conv2dNormActivation( + w_b, width_out, kernel_size=1, stride=1, norm_layer=norm_layer, activation_layer=None + ) + super().__init__(layers) + + +class ResBottleneckBlock(nn.Module): + """Residual bottleneck block: x + F(x), F = bottleneck transform.""" + + def __init__( + self, + width_in: int, + width_out: int, + stride: int, + norm_layer: Callable[..., nn.Module], + activation_layer: Callable[..., nn.Module], + group_width: int = 1, + bottleneck_multiplier: float = 1.0, + se_ratio: Optional[float] = None, + ) -> None: + super().__init__() + + # Use skip connection with projection if shape changes + self.proj = None + should_proj = (width_in != width_out) or (stride != 1) + if should_proj: + self.proj = Conv2dNormActivation( + width_in, width_out, kernel_size=1, stride=stride, norm_layer=norm_layer, activation_layer=None + ) + self.f = BottleneckTransform( + width_in, + width_out, + stride, + norm_layer, + activation_layer, + group_width, + bottleneck_multiplier, + se_ratio, + ) + self.activation = activation_layer(inplace=True) + + def forward(self, x: Tensor) -> Tensor: + if self.proj is not None: + x = self.proj(x) + self.f(x) + else: + x = x + self.f(x) + return self.activation(x) + + +class AnyStage(nn.Sequential): + """AnyNet stage (sequence of blocks w/ the same output shape).""" + + def __init__( + self, + width_in: int, + width_out: int, + stride: int, + depth: int, + block_constructor: Callable[..., nn.Module], + norm_layer: Callable[..., nn.Module], + activation_layer: Callable[..., nn.Module], + group_width: int, + bottleneck_multiplier: float, + se_ratio: Optional[float] = None, + stage_index: int = 0, + ) -> None: + super().__init__() + + for i in range(depth): + block = block_constructor( + width_in if i == 0 else width_out, + width_out, + stride if i == 0 else 1, + norm_layer, + activation_layer, + group_width, + bottleneck_multiplier, + se_ratio, + ) + + self.add_module(f"block{stage_index}-{i}", block) + + +class BlockParams: + def __init__( + self, + depths: List[int], + widths: List[int], + group_widths: List[int], + bottleneck_multipliers: List[float], + strides: List[int], + se_ratio: Optional[float] = None, + ) -> None: + self.depths = depths + self.widths = widths + self.group_widths = group_widths + self.bottleneck_multipliers = bottleneck_multipliers + self.strides = strides + self.se_ratio = se_ratio + + @classmethod + def from_init_params( + cls, + depth: int, + w_0: int, + w_a: float, + w_m: float, + group_width: int, + bottleneck_multiplier: float = 1.0, + se_ratio: Optional[float] = None, + **kwargs: Any, + ) -> "BlockParams": + """ + Programmatically compute all the per-block settings, + given the RegNet parameters. + + The first step is to compute the quantized linear block parameters, + in log space. Key parameters are: + - `w_a` is the width progression slope + - `w_0` is the initial width + - `w_m` is the width stepping in the log space + + In other terms + `log(block_width) = log(w_0) + w_m * block_capacity`, + with `bock_capacity` ramping up following the w_0 and w_a params. + This block width is finally quantized to multiples of 8. + + The second step is to compute the parameters per stage, + taking into account the skip connection and the final 1x1 convolutions. + We use the fact that the output width is constant within a stage. + """ + + QUANT = 8 + STRIDE = 2 + + if w_a < 0 or w_0 <= 0 or w_m <= 1 or w_0 % 8 != 0: + raise ValueError("Invalid RegNet settings") + # Compute the block widths. Each stage has one unique block width + widths_cont = torch.arange(depth) * w_a + w_0 + block_capacity = torch.round(torch.log(widths_cont / w_0) / math.log(w_m)) + block_widths = (torch.round(torch.divide(w_0 * torch.pow(w_m, block_capacity), QUANT)) * QUANT).int().tolist() + num_stages = len(set(block_widths)) + + # Convert to per stage parameters + split_helper = zip( + block_widths + [0], + [0] + block_widths, + block_widths + [0], + [0] + block_widths, + ) + splits = [w != wp or r != rp for w, wp, r, rp in split_helper] + + stage_widths = [w for w, t in zip(block_widths, splits[:-1]) if t] + stage_depths = torch.diff(torch.tensor([d for d, t in enumerate(splits) if t])).int().tolist() + + strides = [STRIDE] * num_stages + bottleneck_multipliers = [bottleneck_multiplier] * num_stages + group_widths = [group_width] * num_stages + + # Adjust the compatibility of stage widths and group widths + stage_widths, group_widths = cls._adjust_widths_groups_compatibilty( + stage_widths, bottleneck_multipliers, group_widths + ) + + return cls( + depths=stage_depths, + widths=stage_widths, + group_widths=group_widths, + bottleneck_multipliers=bottleneck_multipliers, + strides=strides, + se_ratio=se_ratio, + ) + + def _get_expanded_params(self): + return zip(self.widths, self.strides, self.depths, self.group_widths, self.bottleneck_multipliers) + + @staticmethod + def _adjust_widths_groups_compatibilty( + stage_widths: List[int], bottleneck_ratios: List[float], group_widths: List[int] + ) -> Tuple[List[int], List[int]]: + """ + Adjusts the compatibility of widths and groups, + depending on the bottleneck ratio. + """ + # Compute all widths for the current settings + widths = [int(w * b) for w, b in zip(stage_widths, bottleneck_ratios)] + group_widths_min = [min(g, w_bot) for g, w_bot in zip(group_widths, widths)] + + # Compute the adjusted widths so that stage and group widths fit + ws_bot = [_make_divisible(w_bot, g) for w_bot, g in zip(widths, group_widths_min)] + stage_widths = [int(w_bot / b) for w_bot, b in zip(ws_bot, bottleneck_ratios)] + return stage_widths, group_widths_min + + +class RegNet(nn.Module): + def __init__( + self, + block_params: BlockParams, + num_classes: int = 1000, + stem_width: int = 32, + stem_type: Optional[Callable[..., nn.Module]] = None, + block_type: Optional[Callable[..., nn.Module]] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + activation: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + _log_api_usage_once(self) + + if stem_type is None: + stem_type = SimpleStemIN + if norm_layer is None: + norm_layer = nn.BatchNorm2d + if block_type is None: + block_type = ResBottleneckBlock + if activation is None: + activation = nn.ReLU + + # Ad hoc stem + self.stem = stem_type( + 3, # width_in + stem_width, + norm_layer, + activation, + ) + + current_width = stem_width + + blocks = [] + for i, ( + width_out, + stride, + depth, + group_width, + bottleneck_multiplier, + ) in enumerate(block_params._get_expanded_params()): + blocks.append( + ( + f"block{i+1}", + AnyStage( + current_width, + width_out, + stride, + depth, + block_type, + norm_layer, + activation, + group_width, + bottleneck_multiplier, + block_params.se_ratio, + stage_index=i + 1, + ), + ) + ) + + current_width = width_out + + self.trunk_output = nn.Sequential(OrderedDict(blocks)) + + self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) + self.fc = nn.Linear(in_features=current_width, out_features=num_classes) + + # Performs ResNet-style weight initialization + for m in self.modules(): + if isinstance(m, nn.Conv2d): + # Note that there is no bias due to BN + fan_out = m.kernel_size[0] * m.kernel_size[1] * m.out_channels + nn.init.normal_(m.weight, mean=0.0, std=math.sqrt(2.0 / fan_out)) + elif isinstance(m, nn.BatchNorm2d): + nn.init.ones_(m.weight) + nn.init.zeros_(m.bias) + elif isinstance(m, nn.Linear): + nn.init.normal_(m.weight, mean=0.0, std=0.01) + nn.init.zeros_(m.bias) + + def forward(self, x: Tensor) -> Tensor: + x = self.stem(x) + x = self.trunk_output(x) + + x = self.avgpool(x) + x = x.flatten(start_dim=1) + x = self.fc(x) + + return x + + +def _regnet( + block_params: BlockParams, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> RegNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + norm_layer = kwargs.pop("norm_layer", partial(nn.BatchNorm2d, eps=1e-05, momentum=0.1)) + model = RegNet(block_params, norm_layer=norm_layer, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META: Dict[str, Any] = { + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, +} + +_COMMON_SWAG_META = { + **_COMMON_META, + "recipe": "https://github.com/facebookresearch/SWAG", + "license": "https://github.com/facebookresearch/SWAG/blob/main/LICENSE", +} + + +class RegNet_Y_400MF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_400mf-c65dace8.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 4344144, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#small-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 74.046, + "acc@5": 91.716, + } + }, + "_ops": 0.402, + "_file_size": 16.806, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_y_400mf-e6988f5f.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 4344144, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 75.804, + "acc@5": 92.742, + } + }, + "_ops": 0.402, + "_file_size": 16.806, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_Y_800MF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_800mf-1b27b58c.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 6432512, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#small-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 76.420, + "acc@5": 93.136, + } + }, + "_ops": 0.834, + "_file_size": 24.774, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_y_800mf-58fc7688.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 6432512, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.828, + "acc@5": 94.502, + } + }, + "_ops": 0.834, + "_file_size": 24.774, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_Y_1_6GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_1_6gf-b11a554e.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 11202430, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#small-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.950, + "acc@5": 93.966, + } + }, + "_ops": 1.612, + "_file_size": 43.152, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_y_1_6gf-0d7bc02a.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 11202430, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.876, + "acc@5": 95.444, + } + }, + "_ops": 1.612, + "_file_size": 43.152, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_Y_3_2GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_3_2gf-b5a9779c.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 19436338, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#medium-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.948, + "acc@5": 94.576, + } + }, + "_ops": 3.176, + "_file_size": 74.567, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_y_3_2gf-9180c971.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 19436338, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.982, + "acc@5": 95.972, + } + }, + "_ops": 3.176, + "_file_size": 74.567, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_Y_8GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_8gf-d0d0e4a8.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 39381472, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#medium-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.032, + "acc@5": 95.048, + } + }, + "_ops": 8.473, + "_file_size": 150.701, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_y_8gf-dc2b1b54.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 39381472, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.828, + "acc@5": 96.330, + } + }, + "_ops": 8.473, + "_file_size": 150.701, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_Y_16GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_16gf-9e6ed7dd.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 83590140, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#large-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.424, + "acc@5": 95.240, + } + }, + "_ops": 15.912, + "_file_size": 319.49, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_y_16gf-3e4a00f9.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 83590140, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.886, + "acc@5": 96.328, + } + }, + "_ops": 15.912, + "_file_size": 319.49, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + IMAGENET1K_SWAG_E2E_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_16gf_swag-43afe44d.pth", + transforms=partial( + ImageClassification, crop_size=384, resize_size=384, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_SWAG_META, + "num_params": 83590140, + "_metrics": { + "ImageNet-1K": { + "acc@1": 86.012, + "acc@5": 98.054, + } + }, + "_ops": 46.735, + "_file_size": 319.49, + "_docs": """ + These weights are learnt via transfer learning by end-to-end fine-tuning the original + `SWAG `_ weights on ImageNet-1K data. + """, + }, + ) + IMAGENET1K_SWAG_LINEAR_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_16gf_lc_swag-f3ec0043.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=224, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_SWAG_META, + "recipe": "https://github.com/pytorch/vision/pull/5793", + "num_params": 83590140, + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.976, + "acc@5": 97.244, + } + }, + "_ops": 15.912, + "_file_size": 319.49, + "_docs": """ + These weights are composed of the original frozen `SWAG `_ trunk + weights and a linear classifier learnt on top of them trained on ImageNet-1K data. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_Y_32GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_32gf-4dee3f7a.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 145046770, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#large-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.878, + "acc@5": 95.340, + } + }, + "_ops": 32.28, + "_file_size": 554.076, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_y_32gf-8db6d4b5.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 145046770, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.368, + "acc@5": 96.498, + } + }, + "_ops": 32.28, + "_file_size": 554.076, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + IMAGENET1K_SWAG_E2E_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_32gf_swag-04fdfa75.pth", + transforms=partial( + ImageClassification, crop_size=384, resize_size=384, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_SWAG_META, + "num_params": 145046770, + "_metrics": { + "ImageNet-1K": { + "acc@1": 86.838, + "acc@5": 98.362, + } + }, + "_ops": 94.826, + "_file_size": 554.076, + "_docs": """ + These weights are learnt via transfer learning by end-to-end fine-tuning the original + `SWAG `_ weights on ImageNet-1K data. + """, + }, + ) + IMAGENET1K_SWAG_LINEAR_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_32gf_lc_swag-e1583746.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=224, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_SWAG_META, + "recipe": "https://github.com/pytorch/vision/pull/5793", + "num_params": 145046770, + "_metrics": { + "ImageNet-1K": { + "acc@1": 84.622, + "acc@5": 97.480, + } + }, + "_ops": 32.28, + "_file_size": 554.076, + "_docs": """ + These weights are composed of the original frozen `SWAG `_ trunk + weights and a linear classifier learnt on top of them trained on ImageNet-1K data. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_Y_128GF_Weights(WeightsEnum): + IMAGENET1K_SWAG_E2E_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_128gf_swag-c8ce3e52.pth", + transforms=partial( + ImageClassification, crop_size=384, resize_size=384, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_SWAG_META, + "num_params": 644812894, + "_metrics": { + "ImageNet-1K": { + "acc@1": 88.228, + "acc@5": 98.682, + } + }, + "_ops": 374.57, + "_file_size": 2461.564, + "_docs": """ + These weights are learnt via transfer learning by end-to-end fine-tuning the original + `SWAG `_ weights on ImageNet-1K data. + """, + }, + ) + IMAGENET1K_SWAG_LINEAR_V1 = Weights( + url="https://download.pytorch.org/models/regnet_y_128gf_lc_swag-cbe8ce12.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=224, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_SWAG_META, + "recipe": "https://github.com/pytorch/vision/pull/5793", + "num_params": 644812894, + "_metrics": { + "ImageNet-1K": { + "acc@1": 86.068, + "acc@5": 97.844, + } + }, + "_ops": 127.518, + "_file_size": 2461.564, + "_docs": """ + These weights are composed of the original frozen `SWAG `_ trunk + weights and a linear classifier learnt on top of them trained on ImageNet-1K data. + """, + }, + ) + DEFAULT = IMAGENET1K_SWAG_E2E_V1 + + +class RegNet_X_400MF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_x_400mf-adf1edd5.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 5495976, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#small-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 72.834, + "acc@5": 90.950, + } + }, + "_ops": 0.414, + "_file_size": 21.258, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_x_400mf-62229a5f.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 5495976, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-fixres", + "_metrics": { + "ImageNet-1K": { + "acc@1": 74.864, + "acc@5": 92.322, + } + }, + "_ops": 0.414, + "_file_size": 21.257, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_X_800MF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_x_800mf-ad17e45c.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 7259656, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#small-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 75.212, + "acc@5": 92.348, + } + }, + "_ops": 0.8, + "_file_size": 27.945, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_x_800mf-94a99ebd.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 7259656, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-fixres", + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.522, + "acc@5": 93.826, + } + }, + "_ops": 0.8, + "_file_size": 27.945, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_X_1_6GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_x_1_6gf-e3633e7f.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 9190136, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#small-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.040, + "acc@5": 93.440, + } + }, + "_ops": 1.603, + "_file_size": 35.339, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_x_1_6gf-a12f2b72.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 9190136, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-fixres", + "_metrics": { + "ImageNet-1K": { + "acc@1": 79.668, + "acc@5": 94.922, + } + }, + "_ops": 1.603, + "_file_size": 35.339, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_X_3_2GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_x_3_2gf-f342aeae.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 15296552, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#medium-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.364, + "acc@5": 93.992, + } + }, + "_ops": 3.177, + "_file_size": 58.756, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_x_3_2gf-7071aa85.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 15296552, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.196, + "acc@5": 95.430, + } + }, + "_ops": 3.177, + "_file_size": 58.756, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_X_8GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_x_8gf-03ceed89.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 39572648, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#medium-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 79.344, + "acc@5": 94.686, + } + }, + "_ops": 7.995, + "_file_size": 151.456, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_x_8gf-2b70d774.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 39572648, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.682, + "acc@5": 95.678, + } + }, + "_ops": 7.995, + "_file_size": 151.456, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_X_16GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_x_16gf-2007eb11.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 54278536, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#medium-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.058, + "acc@5": 94.944, + } + }, + "_ops": 15.941, + "_file_size": 207.627, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_x_16gf-ba3796d7.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 54278536, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.716, + "acc@5": 96.196, + } + }, + "_ops": 15.941, + "_file_size": 207.627, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class RegNet_X_32GF_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/regnet_x_32gf-9d47f8d0.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 107811560, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#large-models", + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.622, + "acc@5": 95.248, + } + }, + "_ops": 31.736, + "_file_size": 412.039, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/regnet_x_32gf-6eb8fdc6.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 107811560, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.014, + "acc@5": 96.288, + } + }, + "_ops": 31.736, + "_file_size": 412.039, + "_docs": """ + These weights improve upon the results of the original paper by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_Y_400MF_Weights.IMAGENET1K_V1)) +def regnet_y_400mf(*, weights: Optional[RegNet_Y_400MF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_400MF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_400MF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_400MF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_400MF_Weights + :members: + """ + weights = RegNet_Y_400MF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=16, w_0=48, w_a=27.89, w_m=2.09, group_width=8, se_ratio=0.25, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_Y_800MF_Weights.IMAGENET1K_V1)) +def regnet_y_800mf(*, weights: Optional[RegNet_Y_800MF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_800MF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_800MF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_800MF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_800MF_Weights + :members: + """ + weights = RegNet_Y_800MF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=14, w_0=56, w_a=38.84, w_m=2.4, group_width=16, se_ratio=0.25, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_Y_1_6GF_Weights.IMAGENET1K_V1)) +def regnet_y_1_6gf(*, weights: Optional[RegNet_Y_1_6GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_1.6GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_1_6GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_1_6GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_1_6GF_Weights + :members: + """ + weights = RegNet_Y_1_6GF_Weights.verify(weights) + + params = BlockParams.from_init_params( + depth=27, w_0=48, w_a=20.71, w_m=2.65, group_width=24, se_ratio=0.25, **kwargs + ) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_Y_3_2GF_Weights.IMAGENET1K_V1)) +def regnet_y_3_2gf(*, weights: Optional[RegNet_Y_3_2GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_3.2GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_3_2GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_3_2GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_3_2GF_Weights + :members: + """ + weights = RegNet_Y_3_2GF_Weights.verify(weights) + + params = BlockParams.from_init_params( + depth=21, w_0=80, w_a=42.63, w_m=2.66, group_width=24, se_ratio=0.25, **kwargs + ) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_Y_8GF_Weights.IMAGENET1K_V1)) +def regnet_y_8gf(*, weights: Optional[RegNet_Y_8GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_8GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_8GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_8GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_8GF_Weights + :members: + """ + weights = RegNet_Y_8GF_Weights.verify(weights) + + params = BlockParams.from_init_params( + depth=17, w_0=192, w_a=76.82, w_m=2.19, group_width=56, se_ratio=0.25, **kwargs + ) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_Y_16GF_Weights.IMAGENET1K_V1)) +def regnet_y_16gf(*, weights: Optional[RegNet_Y_16GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_16GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_16GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_16GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_16GF_Weights + :members: + """ + weights = RegNet_Y_16GF_Weights.verify(weights) + + params = BlockParams.from_init_params( + depth=18, w_0=200, w_a=106.23, w_m=2.48, group_width=112, se_ratio=0.25, **kwargs + ) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_Y_32GF_Weights.IMAGENET1K_V1)) +def regnet_y_32gf(*, weights: Optional[RegNet_Y_32GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_32GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_32GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_32GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_32GF_Weights + :members: + """ + weights = RegNet_Y_32GF_Weights.verify(weights) + + params = BlockParams.from_init_params( + depth=20, w_0=232, w_a=115.89, w_m=2.53, group_width=232, se_ratio=0.25, **kwargs + ) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", None)) +def regnet_y_128gf(*, weights: Optional[RegNet_Y_128GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetY_128GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_Y_128GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_Y_128GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_Y_128GF_Weights + :members: + """ + weights = RegNet_Y_128GF_Weights.verify(weights) + + params = BlockParams.from_init_params( + depth=27, w_0=456, w_a=160.83, w_m=2.52, group_width=264, se_ratio=0.25, **kwargs + ) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_X_400MF_Weights.IMAGENET1K_V1)) +def regnet_x_400mf(*, weights: Optional[RegNet_X_400MF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetX_400MF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_X_400MF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_X_400MF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_X_400MF_Weights + :members: + """ + weights = RegNet_X_400MF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=22, w_0=24, w_a=24.48, w_m=2.54, group_width=16, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_X_800MF_Weights.IMAGENET1K_V1)) +def regnet_x_800mf(*, weights: Optional[RegNet_X_800MF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetX_800MF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_X_800MF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_X_800MF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_X_800MF_Weights + :members: + """ + weights = RegNet_X_800MF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=16, w_0=56, w_a=35.73, w_m=2.28, group_width=16, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_X_1_6GF_Weights.IMAGENET1K_V1)) +def regnet_x_1_6gf(*, weights: Optional[RegNet_X_1_6GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetX_1.6GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_X_1_6GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_X_1_6GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_X_1_6GF_Weights + :members: + """ + weights = RegNet_X_1_6GF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=18, w_0=80, w_a=34.01, w_m=2.25, group_width=24, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_X_3_2GF_Weights.IMAGENET1K_V1)) +def regnet_x_3_2gf(*, weights: Optional[RegNet_X_3_2GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetX_3.2GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_X_3_2GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_X_3_2GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_X_3_2GF_Weights + :members: + """ + weights = RegNet_X_3_2GF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=25, w_0=88, w_a=26.31, w_m=2.25, group_width=48, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_X_8GF_Weights.IMAGENET1K_V1)) +def regnet_x_8gf(*, weights: Optional[RegNet_X_8GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetX_8GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_X_8GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_X_8GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_X_8GF_Weights + :members: + """ + weights = RegNet_X_8GF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=23, w_0=80, w_a=49.56, w_m=2.88, group_width=120, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_X_16GF_Weights.IMAGENET1K_V1)) +def regnet_x_16gf(*, weights: Optional[RegNet_X_16GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetX_16GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_X_16GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_X_16GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_X_16GF_Weights + :members: + """ + weights = RegNet_X_16GF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=22, w_0=216, w_a=55.59, w_m=2.1, group_width=128, **kwargs) + return _regnet(params, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", RegNet_X_32GF_Weights.IMAGENET1K_V1)) +def regnet_x_32gf(*, weights: Optional[RegNet_X_32GF_Weights] = None, progress: bool = True, **kwargs: Any) -> RegNet: + """ + Constructs a RegNetX_32GF architecture from + `Designing Network Design Spaces `_. + + Args: + weights (:class:`~torchvision.models.RegNet_X_32GF_Weights`, optional): The pretrained weights to use. + See :class:`~torchvision.models.RegNet_X_32GF_Weights` below for more details and possible values. + By default, no pretrained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to either ``torchvision.models.regnet.RegNet`` or + ``torchvision.models.regnet.BlockParams`` class. Please refer to the `source code + `_ + for more detail about the classes. + + .. autoclass:: torchvision.models.RegNet_X_32GF_Weights + :members: + """ + weights = RegNet_X_32GF_Weights.verify(weights) + + params = BlockParams.from_init_params(depth=23, w_0=320, w_a=69.86, w_m=2.0, group_width=168, **kwargs) + return _regnet(params, weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/resnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/resnet.py new file mode 100644 index 0000000000000000000000000000000000000000..e76d089e5604a1be7fa156a975b90b8c9519fade --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/resnet.py @@ -0,0 +1,985 @@ +from functools import partial +from typing import Any, Callable, List, Optional, Type, Union + +import torch +import torch.nn as nn +from torch import Tensor + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "ResNet", + "ResNet18_Weights", + "ResNet34_Weights", + "ResNet50_Weights", + "ResNet101_Weights", + "ResNet152_Weights", + "ResNeXt50_32X4D_Weights", + "ResNeXt101_32X8D_Weights", + "ResNeXt101_64X4D_Weights", + "Wide_ResNet50_2_Weights", + "Wide_ResNet101_2_Weights", + "resnet18", + "resnet34", + "resnet50", + "resnet101", + "resnet152", + "resnext50_32x4d", + "resnext101_32x8d", + "resnext101_64x4d", + "wide_resnet50_2", + "wide_resnet101_2", +] + + +def conv3x3(in_planes: int, out_planes: int, stride: int = 1, groups: int = 1, dilation: int = 1) -> nn.Conv2d: + """3x3 convolution with padding""" + return nn.Conv2d( + in_planes, + out_planes, + kernel_size=3, + stride=stride, + padding=dilation, + groups=groups, + bias=False, + dilation=dilation, + ) + + +def conv1x1(in_planes: int, out_planes: int, stride: int = 1) -> nn.Conv2d: + """1x1 convolution""" + return nn.Conv2d(in_planes, out_planes, kernel_size=1, stride=stride, bias=False) + + +class BasicBlock(nn.Module): + expansion: int = 1 + + def __init__( + self, + inplanes: int, + planes: int, + stride: int = 1, + downsample: Optional[nn.Module] = None, + groups: int = 1, + base_width: int = 64, + dilation: int = 1, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + if norm_layer is None: + norm_layer = nn.BatchNorm2d + if groups != 1 or base_width != 64: + raise ValueError("BasicBlock only supports groups=1 and base_width=64") + if dilation > 1: + raise NotImplementedError("Dilation > 1 not supported in BasicBlock") + # Both self.conv1 and self.downsample layers downsample the input when stride != 1 + self.conv1 = conv3x3(inplanes, planes, stride) + self.bn1 = norm_layer(planes) + self.relu = nn.ReLU(inplace=True) + self.conv2 = conv3x3(planes, planes) + self.bn2 = norm_layer(planes) + self.downsample = downsample + self.stride = stride + + def forward(self, x: Tensor) -> Tensor: + identity = x + + out = self.conv1(x) + out = self.bn1(out) + out = self.relu(out) + + out = self.conv2(out) + out = self.bn2(out) + + if self.downsample is not None: + identity = self.downsample(x) + + out += identity + out = self.relu(out) + + return out + + +class Bottleneck(nn.Module): + # Bottleneck in torchvision places the stride for downsampling at 3x3 convolution(self.conv2) + # while original implementation places the stride at the first 1x1 convolution(self.conv1) + # according to "Deep residual learning for image recognition" https://arxiv.org/abs/1512.03385. + # This variant is also known as ResNet V1.5 and improves accuracy according to + # https://ngc.nvidia.com/catalog/model-scripts/nvidia:resnet_50_v1_5_for_pytorch. + + expansion: int = 4 + + def __init__( + self, + inplanes: int, + planes: int, + stride: int = 1, + downsample: Optional[nn.Module] = None, + groups: int = 1, + base_width: int = 64, + dilation: int = 1, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + if norm_layer is None: + norm_layer = nn.BatchNorm2d + width = int(planes * (base_width / 64.0)) * groups + # Both self.conv2 and self.downsample layers downsample the input when stride != 1 + self.conv1 = conv1x1(inplanes, width) + self.bn1 = norm_layer(width) + self.conv2 = conv3x3(width, width, stride, groups, dilation) + self.bn2 = norm_layer(width) + self.conv3 = conv1x1(width, planes * self.expansion) + self.bn3 = norm_layer(planes * self.expansion) + self.relu = nn.ReLU(inplace=True) + self.downsample = downsample + self.stride = stride + + def forward(self, x: Tensor) -> Tensor: + identity = x + + out = self.conv1(x) + out = self.bn1(out) + out = self.relu(out) + + out = self.conv2(out) + out = self.bn2(out) + out = self.relu(out) + + out = self.conv3(out) + out = self.bn3(out) + + if self.downsample is not None: + identity = self.downsample(x) + + out += identity + out = self.relu(out) + + return out + + +class ResNet(nn.Module): + def __init__( + self, + block: Type[Union[BasicBlock, Bottleneck]], + layers: List[int], + num_classes: int = 1000, + zero_init_residual: bool = False, + groups: int = 1, + width_per_group: int = 64, + replace_stride_with_dilation: Optional[List[bool]] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + _log_api_usage_once(self) + if norm_layer is None: + norm_layer = nn.BatchNorm2d + self._norm_layer = norm_layer + + self.inplanes = 64 + self.dilation = 1 + if replace_stride_with_dilation is None: + # each element in the tuple indicates if we should replace + # the 2x2 stride with a dilated convolution instead + replace_stride_with_dilation = [False, False, False] + if len(replace_stride_with_dilation) != 3: + raise ValueError( + "replace_stride_with_dilation should be None " + f"or a 3-element tuple, got {replace_stride_with_dilation}" + ) + self.groups = groups + self.base_width = width_per_group + self.conv1 = nn.Conv2d(3, self.inplanes, kernel_size=7, stride=2, padding=3, bias=False) + self.bn1 = norm_layer(self.inplanes) + self.relu = nn.ReLU(inplace=True) + self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1) + self.layer1 = self._make_layer(block, 64, layers[0]) + self.layer2 = self._make_layer(block, 128, layers[1], stride=2, dilate=replace_stride_with_dilation[0]) + self.layer3 = self._make_layer(block, 256, layers[2], stride=2, dilate=replace_stride_with_dilation[1]) + self.layer4 = self._make_layer(block, 512, layers[3], stride=2, dilate=replace_stride_with_dilation[2]) + self.avgpool = nn.AdaptiveAvgPool2d((1, 1)) + self.fc = nn.Linear(512 * block.expansion, num_classes) + + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu") + elif isinstance(m, (nn.BatchNorm2d, nn.GroupNorm)): + nn.init.constant_(m.weight, 1) + nn.init.constant_(m.bias, 0) + + # Zero-initialize the last BN in each residual branch, + # so that the residual branch starts with zeros, and each residual block behaves like an identity. + # This improves the model by 0.2~0.3% according to https://arxiv.org/abs/1706.02677 + if zero_init_residual: + for m in self.modules(): + if isinstance(m, Bottleneck) and m.bn3.weight is not None: + nn.init.constant_(m.bn3.weight, 0) # type: ignore[arg-type] + elif isinstance(m, BasicBlock) and m.bn2.weight is not None: + nn.init.constant_(m.bn2.weight, 0) # type: ignore[arg-type] + + def _make_layer( + self, + block: Type[Union[BasicBlock, Bottleneck]], + planes: int, + blocks: int, + stride: int = 1, + dilate: bool = False, + ) -> nn.Sequential: + norm_layer = self._norm_layer + downsample = None + previous_dilation = self.dilation + if dilate: + self.dilation *= stride + stride = 1 + if stride != 1 or self.inplanes != planes * block.expansion: + downsample = nn.Sequential( + conv1x1(self.inplanes, planes * block.expansion, stride), + norm_layer(planes * block.expansion), + ) + + layers = [] + layers.append( + block( + self.inplanes, planes, stride, downsample, self.groups, self.base_width, previous_dilation, norm_layer + ) + ) + self.inplanes = planes * block.expansion + for _ in range(1, blocks): + layers.append( + block( + self.inplanes, + planes, + groups=self.groups, + base_width=self.base_width, + dilation=self.dilation, + norm_layer=norm_layer, + ) + ) + + return nn.Sequential(*layers) + + def _forward_impl(self, x: Tensor) -> Tensor: + # See note [TorchScript super()] + x = self.conv1(x) + x = self.bn1(x) + x = self.relu(x) + x = self.maxpool(x) + + x = self.layer1(x) + x = self.layer2(x) + x = self.layer3(x) + x = self.layer4(x) + + x = self.avgpool(x) + x = torch.flatten(x, 1) + x = self.fc(x) + + return x + + def forward(self, x: Tensor) -> Tensor: + return self._forward_impl(x) + + +def _resnet( + block: Type[Union[BasicBlock, Bottleneck]], + layers: List[int], + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> ResNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = ResNet(block, layers, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, +} + + +class ResNet18_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnet18-f37072fd.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 11689512, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#resnet", + "_metrics": { + "ImageNet-1K": { + "acc@1": 69.758, + "acc@5": 89.078, + } + }, + "_ops": 1.814, + "_file_size": 44.661, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ResNet34_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnet34-b627a593.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 21797672, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#resnet", + "_metrics": { + "ImageNet-1K": { + "acc@1": 73.314, + "acc@5": 91.420, + } + }, + "_ops": 3.664, + "_file_size": 83.275, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ResNet50_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnet50-0676ba61.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 25557032, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#resnet", + "_metrics": { + "ImageNet-1K": { + "acc@1": 76.130, + "acc@5": 92.862, + } + }, + "_ops": 4.089, + "_file_size": 97.781, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/resnet50-11ad3fa6.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 25557032, + "recipe": "https://github.com/pytorch/vision/issues/3995#issuecomment-1013906621", + "_metrics": { + "ImageNet-1K": { + "acc@1": 80.858, + "acc@5": 95.434, + } + }, + "_ops": 4.089, + "_file_size": 97.79, + "_docs": """ + These weights improve upon the results of the original paper by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class ResNet101_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnet101-63fe2227.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 44549160, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#resnet", + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.374, + "acc@5": 93.546, + } + }, + "_ops": 7.801, + "_file_size": 170.511, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/resnet101-cd907fc2.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 44549160, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.886, + "acc@5": 95.780, + } + }, + "_ops": 7.801, + "_file_size": 170.53, + "_docs": """ + These weights improve upon the results of the original paper by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class ResNet152_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnet152-394f9c45.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 60192808, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#resnet", + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.312, + "acc@5": 94.046, + } + }, + "_ops": 11.514, + "_file_size": 230.434, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/resnet152-f82ba261.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 60192808, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.284, + "acc@5": 96.002, + } + }, + "_ops": 11.514, + "_file_size": 230.474, + "_docs": """ + These weights improve upon the results of the original paper by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class ResNeXt50_32X4D_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnext50_32x4d-7cdf4587.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 25028904, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#resnext", + "_metrics": { + "ImageNet-1K": { + "acc@1": 77.618, + "acc@5": 93.698, + } + }, + "_ops": 4.23, + "_file_size": 95.789, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/resnext50_32x4d-1a0047aa.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 25028904, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.198, + "acc@5": 95.340, + } + }, + "_ops": 4.23, + "_file_size": 95.833, + "_docs": """ + These weights improve upon the results of the original paper by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class ResNeXt101_32X8D_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnext101_32x8d-8ba56ff5.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 88791336, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#resnext", + "_metrics": { + "ImageNet-1K": { + "acc@1": 79.312, + "acc@5": 94.526, + } + }, + "_ops": 16.414, + "_file_size": 339.586, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/resnext101_32x8d-110c445d.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 88791336, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-fixres", + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.834, + "acc@5": 96.228, + } + }, + "_ops": 16.414, + "_file_size": 339.673, + "_docs": """ + These weights improve upon the results of the original paper by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class ResNeXt101_64X4D_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/resnext101_64x4d-173b62eb.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 83455272, + "recipe": "https://github.com/pytorch/vision/pull/5935", + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.246, + "acc@5": 96.454, + } + }, + "_ops": 15.46, + "_file_size": 319.318, + "_docs": """ + These weights were trained from scratch by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class Wide_ResNet50_2_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/wide_resnet50_2-95faca4d.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 68883240, + "recipe": "https://github.com/pytorch/vision/pull/912#issue-445437439", + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.468, + "acc@5": 94.086, + } + }, + "_ops": 11.398, + "_file_size": 131.82, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/wide_resnet50_2-9ba9bcbe.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 68883240, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe-with-fixres", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.602, + "acc@5": 95.758, + } + }, + "_ops": 11.398, + "_file_size": 263.124, + "_docs": """ + These weights improve upon the results of the original paper by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +class Wide_ResNet101_2_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/wide_resnet101_2-32ee1156.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 126886696, + "recipe": "https://github.com/pytorch/vision/pull/912#issue-445437439", + "_metrics": { + "ImageNet-1K": { + "acc@1": 78.848, + "acc@5": 94.284, + } + }, + "_ops": 22.753, + "_file_size": 242.896, + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", + }, + ) + IMAGENET1K_V2 = Weights( + url="https://download.pytorch.org/models/wide_resnet101_2-d733dc28.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "num_params": 126886696, + "recipe": "https://github.com/pytorch/vision/issues/3995#new-recipe", + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.510, + "acc@5": 96.020, + } + }, + "_ops": 22.753, + "_file_size": 484.747, + "_docs": """ + These weights improve upon the results of the original paper by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V2 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNet18_Weights.IMAGENET1K_V1)) +def resnet18(*, weights: Optional[ResNet18_Weights] = None, progress: bool = True, **kwargs: Any) -> ResNet: + """ResNet-18 from `Deep Residual Learning for Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.ResNet18_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNet18_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ResNet18_Weights + :members: + """ + weights = ResNet18_Weights.verify(weights) + + return _resnet(BasicBlock, [2, 2, 2, 2], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNet34_Weights.IMAGENET1K_V1)) +def resnet34(*, weights: Optional[ResNet34_Weights] = None, progress: bool = True, **kwargs: Any) -> ResNet: + """ResNet-34 from `Deep Residual Learning for Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.ResNet34_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNet34_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ResNet34_Weights + :members: + """ + weights = ResNet34_Weights.verify(weights) + + return _resnet(BasicBlock, [3, 4, 6, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNet50_Weights.IMAGENET1K_V1)) +def resnet50(*, weights: Optional[ResNet50_Weights] = None, progress: bool = True, **kwargs: Any) -> ResNet: + """ResNet-50 from `Deep Residual Learning for Image Recognition `__. + + .. note:: + The bottleneck of TorchVision places the stride for downsampling to the second 3x3 + convolution while the original paper places it to the first 1x1 convolution. + This variant improves the accuracy and is known as `ResNet V1.5 + `_. + + Args: + weights (:class:`~torchvision.models.ResNet50_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNet50_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ResNet50_Weights + :members: + """ + weights = ResNet50_Weights.verify(weights) + + return _resnet(Bottleneck, [3, 4, 6, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNet101_Weights.IMAGENET1K_V1)) +def resnet101(*, weights: Optional[ResNet101_Weights] = None, progress: bool = True, **kwargs: Any) -> ResNet: + """ResNet-101 from `Deep Residual Learning for Image Recognition `__. + + .. note:: + The bottleneck of TorchVision places the stride for downsampling to the second 3x3 + convolution while the original paper places it to the first 1x1 convolution. + This variant improves the accuracy and is known as `ResNet V1.5 + `_. + + Args: + weights (:class:`~torchvision.models.ResNet101_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNet101_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ResNet101_Weights + :members: + """ + weights = ResNet101_Weights.verify(weights) + + return _resnet(Bottleneck, [3, 4, 23, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNet152_Weights.IMAGENET1K_V1)) +def resnet152(*, weights: Optional[ResNet152_Weights] = None, progress: bool = True, **kwargs: Any) -> ResNet: + """ResNet-152 from `Deep Residual Learning for Image Recognition `__. + + .. note:: + The bottleneck of TorchVision places the stride for downsampling to the second 3x3 + convolution while the original paper places it to the first 1x1 convolution. + This variant improves the accuracy and is known as `ResNet V1.5 + `_. + + Args: + weights (:class:`~torchvision.models.ResNet152_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNet152_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ResNet152_Weights + :members: + """ + weights = ResNet152_Weights.verify(weights) + + return _resnet(Bottleneck, [3, 8, 36, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNeXt50_32X4D_Weights.IMAGENET1K_V1)) +def resnext50_32x4d( + *, weights: Optional[ResNeXt50_32X4D_Weights] = None, progress: bool = True, **kwargs: Any +) -> ResNet: + """ResNeXt-50 32x4d model from + `Aggregated Residual Transformation for Deep Neural Networks `_. + + Args: + weights (:class:`~torchvision.models.ResNeXt50_32X4D_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNext50_32X4D_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.ResNeXt50_32X4D_Weights + :members: + """ + weights = ResNeXt50_32X4D_Weights.verify(weights) + + _ovewrite_named_param(kwargs, "groups", 32) + _ovewrite_named_param(kwargs, "width_per_group", 4) + return _resnet(Bottleneck, [3, 4, 6, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNeXt101_32X8D_Weights.IMAGENET1K_V1)) +def resnext101_32x8d( + *, weights: Optional[ResNeXt101_32X8D_Weights] = None, progress: bool = True, **kwargs: Any +) -> ResNet: + """ResNeXt-101 32x8d model from + `Aggregated Residual Transformation for Deep Neural Networks `_. + + Args: + weights (:class:`~torchvision.models.ResNeXt101_32X8D_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNeXt101_32X8D_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.ResNeXt101_32X8D_Weights + :members: + """ + weights = ResNeXt101_32X8D_Weights.verify(weights) + + _ovewrite_named_param(kwargs, "groups", 32) + _ovewrite_named_param(kwargs, "width_per_group", 8) + return _resnet(Bottleneck, [3, 4, 23, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ResNeXt101_64X4D_Weights.IMAGENET1K_V1)) +def resnext101_64x4d( + *, weights: Optional[ResNeXt101_64X4D_Weights] = None, progress: bool = True, **kwargs: Any +) -> ResNet: + """ResNeXt-101 64x4d model from + `Aggregated Residual Transformation for Deep Neural Networks `_. + + Args: + weights (:class:`~torchvision.models.ResNeXt101_64X4D_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ResNeXt101_64X4D_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.ResNeXt101_64X4D_Weights + :members: + """ + weights = ResNeXt101_64X4D_Weights.verify(weights) + + _ovewrite_named_param(kwargs, "groups", 64) + _ovewrite_named_param(kwargs, "width_per_group", 4) + return _resnet(Bottleneck, [3, 4, 23, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Wide_ResNet50_2_Weights.IMAGENET1K_V1)) +def wide_resnet50_2( + *, weights: Optional[Wide_ResNet50_2_Weights] = None, progress: bool = True, **kwargs: Any +) -> ResNet: + """Wide ResNet-50-2 model from + `Wide Residual Networks `_. + + The model is the same as ResNet except for the bottleneck number of channels + which is twice larger in every block. The number of channels in outer 1x1 + convolutions is the same, e.g. last block in ResNet-50 has 2048-512-2048 + channels, and in Wide ResNet-50-2 has 2048-1024-2048. + + Args: + weights (:class:`~torchvision.models.Wide_ResNet50_2_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Wide_ResNet50_2_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.Wide_ResNet50_2_Weights + :members: + """ + weights = Wide_ResNet50_2_Weights.verify(weights) + + _ovewrite_named_param(kwargs, "width_per_group", 64 * 2) + return _resnet(Bottleneck, [3, 4, 6, 3], weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Wide_ResNet101_2_Weights.IMAGENET1K_V1)) +def wide_resnet101_2( + *, weights: Optional[Wide_ResNet101_2_Weights] = None, progress: bool = True, **kwargs: Any +) -> ResNet: + """Wide ResNet-101-2 model from + `Wide Residual Networks `_. + + The model is the same as ResNet except for the bottleneck number of channels + which is twice larger in every block. The number of channels in outer 1x1 + convolutions is the same, e.g. last block in ResNet-101 has 2048-512-2048 + channels, and in Wide ResNet-101-2 has 2048-1024-2048. + + Args: + weights (:class:`~torchvision.models.Wide_ResNet101_2_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Wide_ResNet101_2_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.resnet.ResNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + .. autoclass:: torchvision.models.Wide_ResNet101_2_Weights + :members: + """ + weights = Wide_ResNet101_2_Weights.verify(weights) + + _ovewrite_named_param(kwargs, "width_per_group", 64 * 2) + return _resnet(Bottleneck, [3, 4, 23, 3], weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..521d2522e631d7a127db42da0a1c8239180b61ce --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__init__.py @@ -0,0 +1,3 @@ +from .deeplabv3 import * +from .fcn import * +from .lraspp import * diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73e903863ca04f032507ebaa3224a5e0dd83d15c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae592ac29284175c51f0d498017c1135d76c0f32 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/deeplabv3.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/deeplabv3.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3d0c901f489d7f6c17e842e52a6ae8cfa376ce30 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/deeplabv3.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/fcn.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/fcn.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4e82d77a3692ee0aeccdc2607ed901f0917f5a00 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/fcn.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/lraspp.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/lraspp.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..50355e07860e45cad28883f0d9eea5fb0a6d983f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/__pycache__/lraspp.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ec81630a247ec7692a5826f23191ba05441e7e31 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/_utils.py @@ -0,0 +1,37 @@ +from collections import OrderedDict +from typing import Dict, Optional + +from torch import nn, Tensor +from torch.nn import functional as F + +from ...utils import _log_api_usage_once + + +class _SimpleSegmentationModel(nn.Module): + __constants__ = ["aux_classifier"] + + def __init__(self, backbone: nn.Module, classifier: nn.Module, aux_classifier: Optional[nn.Module] = None) -> None: + super().__init__() + _log_api_usage_once(self) + self.backbone = backbone + self.classifier = classifier + self.aux_classifier = aux_classifier + + def forward(self, x: Tensor) -> Dict[str, Tensor]: + input_shape = x.shape[-2:] + # contract: features is a dict of tensors + features = self.backbone(x) + + result = OrderedDict() + x = features["out"] + x = self.classifier(x) + x = F.interpolate(x, size=input_shape, mode="bilinear", align_corners=False) + result["out"] = x + + if self.aux_classifier is not None: + x = features["aux"] + x = self.aux_classifier(x) + x = F.interpolate(x, size=input_shape, mode="bilinear", align_corners=False) + result["aux"] = x + + return result diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/deeplabv3.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/deeplabv3.py new file mode 100644 index 0000000000000000000000000000000000000000..bf81828d312fbbdf10dd79a1d9c22b1b80d74411 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/deeplabv3.py @@ -0,0 +1,390 @@ +from functools import partial +from typing import Any, Optional, Sequence + +import torch +from torch import nn +from torch.nn import functional as F + +from ...transforms._presets import SemanticSegmentation +from .._api import register_model, Weights, WeightsEnum +from .._meta import _VOC_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface, IntermediateLayerGetter +from ..mobilenetv3 import mobilenet_v3_large, MobileNet_V3_Large_Weights, MobileNetV3 +from ..resnet import ResNet, resnet101, ResNet101_Weights, resnet50, ResNet50_Weights +from ._utils import _SimpleSegmentationModel +from .fcn import FCNHead + + +__all__ = [ + "DeepLabV3", + "DeepLabV3_ResNet50_Weights", + "DeepLabV3_ResNet101_Weights", + "DeepLabV3_MobileNet_V3_Large_Weights", + "deeplabv3_mobilenet_v3_large", + "deeplabv3_resnet50", + "deeplabv3_resnet101", +] + + +class DeepLabV3(_SimpleSegmentationModel): + """ + Implements DeepLabV3 model from + `"Rethinking Atrous Convolution for Semantic Image Segmentation" + `_. + + Args: + backbone (nn.Module): the network used to compute the features for the model. + The backbone should return an OrderedDict[Tensor], with the key being + "out" for the last feature map used, and "aux" if an auxiliary classifier + is used. + classifier (nn.Module): module that takes the "out" element returned from + the backbone and returns a dense prediction. + aux_classifier (nn.Module, optional): auxiliary classifier used during training + """ + + pass + + +class DeepLabHead(nn.Sequential): + def __init__(self, in_channels: int, num_classes: int, atrous_rates: Sequence[int] = (12, 24, 36)) -> None: + super().__init__( + ASPP(in_channels, atrous_rates), + nn.Conv2d(256, 256, 3, padding=1, bias=False), + nn.BatchNorm2d(256), + nn.ReLU(), + nn.Conv2d(256, num_classes, 1), + ) + + +class ASPPConv(nn.Sequential): + def __init__(self, in_channels: int, out_channels: int, dilation: int) -> None: + modules = [ + nn.Conv2d(in_channels, out_channels, 3, padding=dilation, dilation=dilation, bias=False), + nn.BatchNorm2d(out_channels), + nn.ReLU(), + ] + super().__init__(*modules) + + +class ASPPPooling(nn.Sequential): + def __init__(self, in_channels: int, out_channels: int) -> None: + super().__init__( + nn.AdaptiveAvgPool2d(1), + nn.Conv2d(in_channels, out_channels, 1, bias=False), + nn.BatchNorm2d(out_channels), + nn.ReLU(), + ) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + size = x.shape[-2:] + for mod in self: + x = mod(x) + return F.interpolate(x, size=size, mode="bilinear", align_corners=False) + + +class ASPP(nn.Module): + def __init__(self, in_channels: int, atrous_rates: Sequence[int], out_channels: int = 256) -> None: + super().__init__() + modules = [] + modules.append( + nn.Sequential(nn.Conv2d(in_channels, out_channels, 1, bias=False), nn.BatchNorm2d(out_channels), nn.ReLU()) + ) + + rates = tuple(atrous_rates) + for rate in rates: + modules.append(ASPPConv(in_channels, out_channels, rate)) + + modules.append(ASPPPooling(in_channels, out_channels)) + + self.convs = nn.ModuleList(modules) + + self.project = nn.Sequential( + nn.Conv2d(len(self.convs) * out_channels, out_channels, 1, bias=False), + nn.BatchNorm2d(out_channels), + nn.ReLU(), + nn.Dropout(0.5), + ) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + _res = [] + for conv in self.convs: + _res.append(conv(x)) + res = torch.cat(_res, dim=1) + return self.project(res) + + +def _deeplabv3_resnet( + backbone: ResNet, + num_classes: int, + aux: Optional[bool], +) -> DeepLabV3: + return_layers = {"layer4": "out"} + if aux: + return_layers["layer3"] = "aux" + backbone = IntermediateLayerGetter(backbone, return_layers=return_layers) + + aux_classifier = FCNHead(1024, num_classes) if aux else None + classifier = DeepLabHead(2048, num_classes) + return DeepLabV3(backbone, classifier, aux_classifier) + + +_COMMON_META = { + "categories": _VOC_CATEGORIES, + "min_size": (1, 1), + "_docs": """ + These weights were trained on a subset of COCO, using only the 20 categories that are present in the Pascal VOC + dataset. + """, +} + + +class DeepLabV3_ResNet50_Weights(WeightsEnum): + COCO_WITH_VOC_LABELS_V1 = Weights( + url="https://download.pytorch.org/models/deeplabv3_resnet50_coco-cd0a2569.pth", + transforms=partial(SemanticSegmentation, resize_size=520), + meta={ + **_COMMON_META, + "num_params": 42004074, + "recipe": "https://github.com/pytorch/vision/tree/main/references/segmentation#deeplabv3_resnet50", + "_metrics": { + "COCO-val2017-VOC-labels": { + "miou": 66.4, + "pixel_acc": 92.4, + } + }, + "_ops": 178.722, + "_file_size": 160.515, + }, + ) + DEFAULT = COCO_WITH_VOC_LABELS_V1 + + +class DeepLabV3_ResNet101_Weights(WeightsEnum): + COCO_WITH_VOC_LABELS_V1 = Weights( + url="https://download.pytorch.org/models/deeplabv3_resnet101_coco-586e9e4e.pth", + transforms=partial(SemanticSegmentation, resize_size=520), + meta={ + **_COMMON_META, + "num_params": 60996202, + "recipe": "https://github.com/pytorch/vision/tree/main/references/segmentation#fcn_resnet101", + "_metrics": { + "COCO-val2017-VOC-labels": { + "miou": 67.4, + "pixel_acc": 92.4, + } + }, + "_ops": 258.743, + "_file_size": 233.217, + }, + ) + DEFAULT = COCO_WITH_VOC_LABELS_V1 + + +class DeepLabV3_MobileNet_V3_Large_Weights(WeightsEnum): + COCO_WITH_VOC_LABELS_V1 = Weights( + url="https://download.pytorch.org/models/deeplabv3_mobilenet_v3_large-fc3c493d.pth", + transforms=partial(SemanticSegmentation, resize_size=520), + meta={ + **_COMMON_META, + "num_params": 11029328, + "recipe": "https://github.com/pytorch/vision/tree/main/references/segmentation#deeplabv3_mobilenet_v3_large", + "_metrics": { + "COCO-val2017-VOC-labels": { + "miou": 60.3, + "pixel_acc": 91.2, + } + }, + "_ops": 10.452, + "_file_size": 42.301, + }, + ) + DEFAULT = COCO_WITH_VOC_LABELS_V1 + + +def _deeplabv3_mobilenetv3( + backbone: MobileNetV3, + num_classes: int, + aux: Optional[bool], +) -> DeepLabV3: + backbone = backbone.features + # Gather the indices of blocks which are strided. These are the locations of C1, ..., Cn-1 blocks. + # The first and last blocks are always included because they are the C0 (conv1) and Cn. + stage_indices = [0] + [i for i, b in enumerate(backbone) if getattr(b, "_is_cn", False)] + [len(backbone) - 1] + out_pos = stage_indices[-1] # use C5 which has output_stride = 16 + out_inplanes = backbone[out_pos].out_channels + aux_pos = stage_indices[-4] # use C2 here which has output_stride = 8 + aux_inplanes = backbone[aux_pos].out_channels + return_layers = {str(out_pos): "out"} + if aux: + return_layers[str(aux_pos)] = "aux" + backbone = IntermediateLayerGetter(backbone, return_layers=return_layers) + + aux_classifier = FCNHead(aux_inplanes, num_classes) if aux else None + classifier = DeepLabHead(out_inplanes, num_classes) + return DeepLabV3(backbone, classifier, aux_classifier) + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", DeepLabV3_ResNet50_Weights.COCO_WITH_VOC_LABELS_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def deeplabv3_resnet50( + *, + weights: Optional[DeepLabV3_ResNet50_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + aux_loss: Optional[bool] = None, + weights_backbone: Optional[ResNet50_Weights] = ResNet50_Weights.IMAGENET1K_V1, + **kwargs: Any, +) -> DeepLabV3: + """Constructs a DeepLabV3 model with a ResNet-50 backbone. + + .. betastatus:: segmentation module + + Reference: `Rethinking Atrous Convolution for Semantic Image Segmentation `__. + + Args: + weights (:class:`~torchvision.models.segmentation.DeepLabV3_ResNet50_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.segmentation.DeepLabV3_ResNet50_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + aux_loss (bool, optional): If True, it uses an auxiliary loss + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained weights for the + backbone + **kwargs: unused + + .. autoclass:: torchvision.models.segmentation.DeepLabV3_ResNet50_Weights + :members: + """ + weights = DeepLabV3_ResNet50_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + aux_loss = _ovewrite_value_param("aux_loss", aux_loss, True) + elif num_classes is None: + num_classes = 21 + + backbone = resnet50(weights=weights_backbone, replace_stride_with_dilation=[False, True, True]) + model = _deeplabv3_resnet(backbone, num_classes, aux_loss) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", DeepLabV3_ResNet101_Weights.COCO_WITH_VOC_LABELS_V1), + weights_backbone=("pretrained_backbone", ResNet101_Weights.IMAGENET1K_V1), +) +def deeplabv3_resnet101( + *, + weights: Optional[DeepLabV3_ResNet101_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + aux_loss: Optional[bool] = None, + weights_backbone: Optional[ResNet101_Weights] = ResNet101_Weights.IMAGENET1K_V1, + **kwargs: Any, +) -> DeepLabV3: + """Constructs a DeepLabV3 model with a ResNet-101 backbone. + + .. betastatus:: segmentation module + + Reference: `Rethinking Atrous Convolution for Semantic Image Segmentation `__. + + Args: + weights (:class:`~torchvision.models.segmentation.DeepLabV3_ResNet101_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.segmentation.DeepLabV3_ResNet101_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + aux_loss (bool, optional): If True, it uses an auxiliary loss + weights_backbone (:class:`~torchvision.models.ResNet101_Weights`, optional): The pretrained weights for the + backbone + **kwargs: unused + + .. autoclass:: torchvision.models.segmentation.DeepLabV3_ResNet101_Weights + :members: + """ + weights = DeepLabV3_ResNet101_Weights.verify(weights) + weights_backbone = ResNet101_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + aux_loss = _ovewrite_value_param("aux_loss", aux_loss, True) + elif num_classes is None: + num_classes = 21 + + backbone = resnet101(weights=weights_backbone, replace_stride_with_dilation=[False, True, True]) + model = _deeplabv3_resnet(backbone, num_classes, aux_loss) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", DeepLabV3_MobileNet_V3_Large_Weights.COCO_WITH_VOC_LABELS_V1), + weights_backbone=("pretrained_backbone", MobileNet_V3_Large_Weights.IMAGENET1K_V1), +) +def deeplabv3_mobilenet_v3_large( + *, + weights: Optional[DeepLabV3_MobileNet_V3_Large_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + aux_loss: Optional[bool] = None, + weights_backbone: Optional[MobileNet_V3_Large_Weights] = MobileNet_V3_Large_Weights.IMAGENET1K_V1, + **kwargs: Any, +) -> DeepLabV3: + """Constructs a DeepLabV3 model with a MobileNetV3-Large backbone. + + Reference: `Rethinking Atrous Convolution for Semantic Image Segmentation `__. + + Args: + weights (:class:`~torchvision.models.segmentation.DeepLabV3_MobileNet_V3_Large_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.segmentation.DeepLabV3_MobileNet_V3_Large_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background) + aux_loss (bool, optional): If True, it uses an auxiliary loss + weights_backbone (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The pretrained weights + for the backbone + **kwargs: unused + + .. autoclass:: torchvision.models.segmentation.DeepLabV3_MobileNet_V3_Large_Weights + :members: + """ + weights = DeepLabV3_MobileNet_V3_Large_Weights.verify(weights) + weights_backbone = MobileNet_V3_Large_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + aux_loss = _ovewrite_value_param("aux_loss", aux_loss, True) + elif num_classes is None: + num_classes = 21 + + backbone = mobilenet_v3_large(weights=weights_backbone, dilated=True) + model = _deeplabv3_mobilenetv3(backbone, num_classes, aux_loss) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/fcn.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/fcn.py new file mode 100644 index 0000000000000000000000000000000000000000..2f08ca5e4287f0922150a3ae4e4220e9eca53e73 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/fcn.py @@ -0,0 +1,232 @@ +from functools import partial +from typing import Any, Optional + +from torch import nn + +from ...transforms._presets import SemanticSegmentation +from .._api import register_model, Weights, WeightsEnum +from .._meta import _VOC_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface, IntermediateLayerGetter +from ..resnet import ResNet, resnet101, ResNet101_Weights, resnet50, ResNet50_Weights +from ._utils import _SimpleSegmentationModel + + +__all__ = ["FCN", "FCN_ResNet50_Weights", "FCN_ResNet101_Weights", "fcn_resnet50", "fcn_resnet101"] + + +class FCN(_SimpleSegmentationModel): + """ + Implements FCN model from + `"Fully Convolutional Networks for Semantic Segmentation" + `_. + + Args: + backbone (nn.Module): the network used to compute the features for the model. + The backbone should return an OrderedDict[Tensor], with the key being + "out" for the last feature map used, and "aux" if an auxiliary classifier + is used. + classifier (nn.Module): module that takes the "out" element returned from + the backbone and returns a dense prediction. + aux_classifier (nn.Module, optional): auxiliary classifier used during training + """ + + pass + + +class FCNHead(nn.Sequential): + def __init__(self, in_channels: int, channels: int) -> None: + inter_channels = in_channels // 4 + layers = [ + nn.Conv2d(in_channels, inter_channels, 3, padding=1, bias=False), + nn.BatchNorm2d(inter_channels), + nn.ReLU(), + nn.Dropout(0.1), + nn.Conv2d(inter_channels, channels, 1), + ] + + super().__init__(*layers) + + +_COMMON_META = { + "categories": _VOC_CATEGORIES, + "min_size": (1, 1), + "_docs": """ + These weights were trained on a subset of COCO, using only the 20 categories that are present in the Pascal VOC + dataset. + """, +} + + +class FCN_ResNet50_Weights(WeightsEnum): + COCO_WITH_VOC_LABELS_V1 = Weights( + url="https://download.pytorch.org/models/fcn_resnet50_coco-1167a1af.pth", + transforms=partial(SemanticSegmentation, resize_size=520), + meta={ + **_COMMON_META, + "num_params": 35322218, + "recipe": "https://github.com/pytorch/vision/tree/main/references/segmentation#fcn_resnet50", + "_metrics": { + "COCO-val2017-VOC-labels": { + "miou": 60.5, + "pixel_acc": 91.4, + } + }, + "_ops": 152.717, + "_file_size": 135.009, + }, + ) + DEFAULT = COCO_WITH_VOC_LABELS_V1 + + +class FCN_ResNet101_Weights(WeightsEnum): + COCO_WITH_VOC_LABELS_V1 = Weights( + url="https://download.pytorch.org/models/fcn_resnet101_coco-7ecb50ca.pth", + transforms=partial(SemanticSegmentation, resize_size=520), + meta={ + **_COMMON_META, + "num_params": 54314346, + "recipe": "https://github.com/pytorch/vision/tree/main/references/segmentation#deeplabv3_resnet101", + "_metrics": { + "COCO-val2017-VOC-labels": { + "miou": 63.7, + "pixel_acc": 91.9, + } + }, + "_ops": 232.738, + "_file_size": 207.711, + }, + ) + DEFAULT = COCO_WITH_VOC_LABELS_V1 + + +def _fcn_resnet( + backbone: ResNet, + num_classes: int, + aux: Optional[bool], +) -> FCN: + return_layers = {"layer4": "out"} + if aux: + return_layers["layer3"] = "aux" + backbone = IntermediateLayerGetter(backbone, return_layers=return_layers) + + aux_classifier = FCNHead(1024, num_classes) if aux else None + classifier = FCNHead(2048, num_classes) + return FCN(backbone, classifier, aux_classifier) + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", FCN_ResNet50_Weights.COCO_WITH_VOC_LABELS_V1), + weights_backbone=("pretrained_backbone", ResNet50_Weights.IMAGENET1K_V1), +) +def fcn_resnet50( + *, + weights: Optional[FCN_ResNet50_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + aux_loss: Optional[bool] = None, + weights_backbone: Optional[ResNet50_Weights] = ResNet50_Weights.IMAGENET1K_V1, + **kwargs: Any, +) -> FCN: + """Fully-Convolutional Network model with a ResNet-50 backbone from the `Fully Convolutional + Networks for Semantic Segmentation `_ paper. + + .. betastatus:: segmentation module + + Args: + weights (:class:`~torchvision.models.segmentation.FCN_ResNet50_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.segmentation.FCN_ResNet50_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background). + aux_loss (bool, optional): If True, it uses an auxiliary loss. + weights_backbone (:class:`~torchvision.models.ResNet50_Weights`, optional): The pretrained + weights for the backbone. + **kwargs: parameters passed to the ``torchvision.models.segmentation.fcn.FCN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.segmentation.FCN_ResNet50_Weights + :members: + """ + + weights = FCN_ResNet50_Weights.verify(weights) + weights_backbone = ResNet50_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + aux_loss = _ovewrite_value_param("aux_loss", aux_loss, True) + elif num_classes is None: + num_classes = 21 + + backbone = resnet50(weights=weights_backbone, replace_stride_with_dilation=[False, True, True]) + model = _fcn_resnet(backbone, num_classes, aux_loss) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", FCN_ResNet101_Weights.COCO_WITH_VOC_LABELS_V1), + weights_backbone=("pretrained_backbone", ResNet101_Weights.IMAGENET1K_V1), +) +def fcn_resnet101( + *, + weights: Optional[FCN_ResNet101_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + aux_loss: Optional[bool] = None, + weights_backbone: Optional[ResNet101_Weights] = ResNet101_Weights.IMAGENET1K_V1, + **kwargs: Any, +) -> FCN: + """Fully-Convolutional Network model with a ResNet-101 backbone from the `Fully Convolutional + Networks for Semantic Segmentation `_ paper. + + .. betastatus:: segmentation module + + Args: + weights (:class:`~torchvision.models.segmentation.FCN_ResNet101_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.segmentation.FCN_ResNet101_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background). + aux_loss (bool, optional): If True, it uses an auxiliary loss. + weights_backbone (:class:`~torchvision.models.ResNet101_Weights`, optional): The pretrained + weights for the backbone. + **kwargs: parameters passed to the ``torchvision.models.segmentation.fcn.FCN`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.segmentation.FCN_ResNet101_Weights + :members: + """ + + weights = FCN_ResNet101_Weights.verify(weights) + weights_backbone = ResNet101_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + aux_loss = _ovewrite_value_param("aux_loss", aux_loss, True) + elif num_classes is None: + num_classes = 21 + + backbone = resnet101(weights=weights_backbone, replace_stride_with_dilation=[False, True, True]) + model = _fcn_resnet(backbone, num_classes, aux_loss) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/lraspp.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/lraspp.py new file mode 100644 index 0000000000000000000000000000000000000000..ad7085753e2760c3eb703303495a22dbffc920ba --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/segmentation/lraspp.py @@ -0,0 +1,178 @@ +from collections import OrderedDict +from functools import partial +from typing import Any, Dict, Optional + +from torch import nn, Tensor +from torch.nn import functional as F + +from ...transforms._presets import SemanticSegmentation +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._meta import _VOC_CATEGORIES +from .._utils import _ovewrite_value_param, handle_legacy_interface, IntermediateLayerGetter +from ..mobilenetv3 import mobilenet_v3_large, MobileNet_V3_Large_Weights, MobileNetV3 + + +__all__ = ["LRASPP", "LRASPP_MobileNet_V3_Large_Weights", "lraspp_mobilenet_v3_large"] + + +class LRASPP(nn.Module): + """ + Implements a Lite R-ASPP Network for semantic segmentation from + `"Searching for MobileNetV3" + `_. + + Args: + backbone (nn.Module): the network used to compute the features for the model. + The backbone should return an OrderedDict[Tensor], with the key being + "high" for the high level feature map and "low" for the low level feature map. + low_channels (int): the number of channels of the low level features. + high_channels (int): the number of channels of the high level features. + num_classes (int, optional): number of output classes of the model (including the background). + inter_channels (int, optional): the number of channels for intermediate computations. + """ + + def __init__( + self, backbone: nn.Module, low_channels: int, high_channels: int, num_classes: int, inter_channels: int = 128 + ) -> None: + super().__init__() + _log_api_usage_once(self) + self.backbone = backbone + self.classifier = LRASPPHead(low_channels, high_channels, num_classes, inter_channels) + + def forward(self, input: Tensor) -> Dict[str, Tensor]: + features = self.backbone(input) + out = self.classifier(features) + out = F.interpolate(out, size=input.shape[-2:], mode="bilinear", align_corners=False) + + result = OrderedDict() + result["out"] = out + + return result + + +class LRASPPHead(nn.Module): + def __init__(self, low_channels: int, high_channels: int, num_classes: int, inter_channels: int) -> None: + super().__init__() + self.cbr = nn.Sequential( + nn.Conv2d(high_channels, inter_channels, 1, bias=False), + nn.BatchNorm2d(inter_channels), + nn.ReLU(inplace=True), + ) + self.scale = nn.Sequential( + nn.AdaptiveAvgPool2d(1), + nn.Conv2d(high_channels, inter_channels, 1, bias=False), + nn.Sigmoid(), + ) + self.low_classifier = nn.Conv2d(low_channels, num_classes, 1) + self.high_classifier = nn.Conv2d(inter_channels, num_classes, 1) + + def forward(self, input: Dict[str, Tensor]) -> Tensor: + low = input["low"] + high = input["high"] + + x = self.cbr(high) + s = self.scale(high) + x = x * s + x = F.interpolate(x, size=low.shape[-2:], mode="bilinear", align_corners=False) + + return self.low_classifier(low) + self.high_classifier(x) + + +def _lraspp_mobilenetv3(backbone: MobileNetV3, num_classes: int) -> LRASPP: + backbone = backbone.features + # Gather the indices of blocks which are strided. These are the locations of C1, ..., Cn-1 blocks. + # The first and last blocks are always included because they are the C0 (conv1) and Cn. + stage_indices = [0] + [i for i, b in enumerate(backbone) if getattr(b, "_is_cn", False)] + [len(backbone) - 1] + low_pos = stage_indices[-4] # use C2 here which has output_stride = 8 + high_pos = stage_indices[-1] # use C5 which has output_stride = 16 + low_channels = backbone[low_pos].out_channels + high_channels = backbone[high_pos].out_channels + backbone = IntermediateLayerGetter(backbone, return_layers={str(low_pos): "low", str(high_pos): "high"}) + + return LRASPP(backbone, low_channels, high_channels, num_classes) + + +class LRASPP_MobileNet_V3_Large_Weights(WeightsEnum): + COCO_WITH_VOC_LABELS_V1 = Weights( + url="https://download.pytorch.org/models/lraspp_mobilenet_v3_large-d234d4ea.pth", + transforms=partial(SemanticSegmentation, resize_size=520), + meta={ + "num_params": 3221538, + "categories": _VOC_CATEGORIES, + "min_size": (1, 1), + "recipe": "https://github.com/pytorch/vision/tree/main/references/segmentation#lraspp_mobilenet_v3_large", + "_metrics": { + "COCO-val2017-VOC-labels": { + "miou": 57.9, + "pixel_acc": 91.2, + } + }, + "_ops": 2.086, + "_file_size": 12.49, + "_docs": """ + These weights were trained on a subset of COCO, using only the 20 categories that are present in the + Pascal VOC dataset. + """, + }, + ) + DEFAULT = COCO_WITH_VOC_LABELS_V1 + + +@register_model() +@handle_legacy_interface( + weights=("pretrained", LRASPP_MobileNet_V3_Large_Weights.COCO_WITH_VOC_LABELS_V1), + weights_backbone=("pretrained_backbone", MobileNet_V3_Large_Weights.IMAGENET1K_V1), +) +def lraspp_mobilenet_v3_large( + *, + weights: Optional[LRASPP_MobileNet_V3_Large_Weights] = None, + progress: bool = True, + num_classes: Optional[int] = None, + weights_backbone: Optional[MobileNet_V3_Large_Weights] = MobileNet_V3_Large_Weights.IMAGENET1K_V1, + **kwargs: Any, +) -> LRASPP: + """Constructs a Lite R-ASPP Network model with a MobileNetV3-Large backbone from + `Searching for MobileNetV3 `_ paper. + + .. betastatus:: segmentation module + + Args: + weights (:class:`~torchvision.models.segmentation.LRASPP_MobileNet_V3_Large_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.segmentation.LRASPP_MobileNet_V3_Large_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + num_classes (int, optional): number of output classes of the model (including the background). + aux_loss (bool, optional): If True, it uses an auxiliary loss. + weights_backbone (:class:`~torchvision.models.MobileNet_V3_Large_Weights`, optional): The pretrained + weights for the backbone. + **kwargs: parameters passed to the ``torchvision.models.segmentation.LRASPP`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.segmentation.LRASPP_MobileNet_V3_Large_Weights + :members: + """ + if kwargs.pop("aux_loss", False): + raise NotImplementedError("This model does not use auxiliary loss") + + weights = LRASPP_MobileNet_V3_Large_Weights.verify(weights) + weights_backbone = MobileNet_V3_Large_Weights.verify(weights_backbone) + + if weights is not None: + weights_backbone = None + num_classes = _ovewrite_value_param("num_classes", num_classes, len(weights.meta["categories"])) + elif num_classes is None: + num_classes = 21 + + backbone = mobilenet_v3_large(weights=weights_backbone, dilated=True) + model = _lraspp_mobilenetv3(backbone, num_classes) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/shufflenetv2.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/shufflenetv2.py new file mode 100644 index 0000000000000000000000000000000000000000..13ac9d2623e6006a918529f81bf24454f354175d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/shufflenetv2.py @@ -0,0 +1,408 @@ +from functools import partial +from typing import Any, Callable, List, Optional + +import torch +import torch.nn as nn +from torch import Tensor + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "ShuffleNetV2", + "ShuffleNet_V2_X0_5_Weights", + "ShuffleNet_V2_X1_0_Weights", + "ShuffleNet_V2_X1_5_Weights", + "ShuffleNet_V2_X2_0_Weights", + "shufflenet_v2_x0_5", + "shufflenet_v2_x1_0", + "shufflenet_v2_x1_5", + "shufflenet_v2_x2_0", +] + + +def channel_shuffle(x: Tensor, groups: int) -> Tensor: + batchsize, num_channels, height, width = x.size() + channels_per_group = num_channels // groups + + # reshape + x = x.view(batchsize, groups, channels_per_group, height, width) + + x = torch.transpose(x, 1, 2).contiguous() + + # flatten + x = x.view(batchsize, num_channels, height, width) + + return x + + +class InvertedResidual(nn.Module): + def __init__(self, inp: int, oup: int, stride: int) -> None: + super().__init__() + + if not (1 <= stride <= 3): + raise ValueError("illegal stride value") + self.stride = stride + + branch_features = oup // 2 + if (self.stride == 1) and (inp != branch_features << 1): + raise ValueError( + f"Invalid combination of stride {stride}, inp {inp} and oup {oup} values. If stride == 1 then inp should be equal to oup // 2 << 1." + ) + + if self.stride > 1: + self.branch1 = nn.Sequential( + self.depthwise_conv(inp, inp, kernel_size=3, stride=self.stride, padding=1), + nn.BatchNorm2d(inp), + nn.Conv2d(inp, branch_features, kernel_size=1, stride=1, padding=0, bias=False), + nn.BatchNorm2d(branch_features), + nn.ReLU(inplace=True), + ) + else: + self.branch1 = nn.Sequential() + + self.branch2 = nn.Sequential( + nn.Conv2d( + inp if (self.stride > 1) else branch_features, + branch_features, + kernel_size=1, + stride=1, + padding=0, + bias=False, + ), + nn.BatchNorm2d(branch_features), + nn.ReLU(inplace=True), + self.depthwise_conv(branch_features, branch_features, kernel_size=3, stride=self.stride, padding=1), + nn.BatchNorm2d(branch_features), + nn.Conv2d(branch_features, branch_features, kernel_size=1, stride=1, padding=0, bias=False), + nn.BatchNorm2d(branch_features), + nn.ReLU(inplace=True), + ) + + @staticmethod + def depthwise_conv( + i: int, o: int, kernel_size: int, stride: int = 1, padding: int = 0, bias: bool = False + ) -> nn.Conv2d: + return nn.Conv2d(i, o, kernel_size, stride, padding, bias=bias, groups=i) + + def forward(self, x: Tensor) -> Tensor: + if self.stride == 1: + x1, x2 = x.chunk(2, dim=1) + out = torch.cat((x1, self.branch2(x2)), dim=1) + else: + out = torch.cat((self.branch1(x), self.branch2(x)), dim=1) + + out = channel_shuffle(out, 2) + + return out + + +class ShuffleNetV2(nn.Module): + def __init__( + self, + stages_repeats: List[int], + stages_out_channels: List[int], + num_classes: int = 1000, + inverted_residual: Callable[..., nn.Module] = InvertedResidual, + ) -> None: + super().__init__() + _log_api_usage_once(self) + + if len(stages_repeats) != 3: + raise ValueError("expected stages_repeats as list of 3 positive ints") + if len(stages_out_channels) != 5: + raise ValueError("expected stages_out_channels as list of 5 positive ints") + self._stage_out_channels = stages_out_channels + + input_channels = 3 + output_channels = self._stage_out_channels[0] + self.conv1 = nn.Sequential( + nn.Conv2d(input_channels, output_channels, 3, 2, 1, bias=False), + nn.BatchNorm2d(output_channels), + nn.ReLU(inplace=True), + ) + input_channels = output_channels + + self.maxpool = nn.MaxPool2d(kernel_size=3, stride=2, padding=1) + + # Static annotations for mypy + self.stage2: nn.Sequential + self.stage3: nn.Sequential + self.stage4: nn.Sequential + stage_names = [f"stage{i}" for i in [2, 3, 4]] + for name, repeats, output_channels in zip(stage_names, stages_repeats, self._stage_out_channels[1:]): + seq = [inverted_residual(input_channels, output_channels, 2)] + for i in range(repeats - 1): + seq.append(inverted_residual(output_channels, output_channels, 1)) + setattr(self, name, nn.Sequential(*seq)) + input_channels = output_channels + + output_channels = self._stage_out_channels[-1] + self.conv5 = nn.Sequential( + nn.Conv2d(input_channels, output_channels, 1, 1, 0, bias=False), + nn.BatchNorm2d(output_channels), + nn.ReLU(inplace=True), + ) + + self.fc = nn.Linear(output_channels, num_classes) + + def _forward_impl(self, x: Tensor) -> Tensor: + # See note [TorchScript super()] + x = self.conv1(x) + x = self.maxpool(x) + x = self.stage2(x) + x = self.stage3(x) + x = self.stage4(x) + x = self.conv5(x) + x = x.mean([2, 3]) # globalpool + x = self.fc(x) + return x + + def forward(self, x: Tensor) -> Tensor: + return self._forward_impl(x) + + +def _shufflenetv2( + weights: Optional[WeightsEnum], + progress: bool, + *args: Any, + **kwargs: Any, +) -> ShuffleNetV2: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = ShuffleNetV2(*args, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "min_size": (1, 1), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/ericsun99/Shufflenet-v2-Pytorch", +} + + +class ShuffleNet_V2_X0_5_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/ericsun99/Shufflenet-v2-Pytorch + url="https://download.pytorch.org/models/shufflenetv2_x0.5-f707e7126e.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 1366792, + "_metrics": { + "ImageNet-1K": { + "acc@1": 60.552, + "acc@5": 81.746, + } + }, + "_ops": 0.04, + "_file_size": 5.282, + "_docs": """These weights were trained from scratch to reproduce closely the results of the paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ShuffleNet_V2_X1_0_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + # Weights ported from https://github.com/ericsun99/Shufflenet-v2-Pytorch + url="https://download.pytorch.org/models/shufflenetv2_x1-5666bf0f80.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 2278604, + "_metrics": { + "ImageNet-1K": { + "acc@1": 69.362, + "acc@5": 88.316, + } + }, + "_ops": 0.145, + "_file_size": 8.791, + "_docs": """These weights were trained from scratch to reproduce closely the results of the paper.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ShuffleNet_V2_X1_5_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/shufflenetv2_x1_5-3c479a10.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/pull/5906", + "num_params": 3503624, + "_metrics": { + "ImageNet-1K": { + "acc@1": 72.996, + "acc@5": 91.086, + } + }, + "_ops": 0.296, + "_file_size": 13.557, + "_docs": """ + These weights were trained from scratch by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ShuffleNet_V2_X2_0_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/shufflenetv2_x2_0-8be3c8ee.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=232), + meta={ + **_COMMON_META, + "recipe": "https://github.com/pytorch/vision/pull/5906", + "num_params": 7393996, + "_metrics": { + "ImageNet-1K": { + "acc@1": 76.230, + "acc@5": 93.006, + } + }, + "_ops": 0.583, + "_file_size": 28.433, + "_docs": """ + These weights were trained from scratch by using TorchVision's `new training recipe + `_. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ShuffleNet_V2_X0_5_Weights.IMAGENET1K_V1)) +def shufflenet_v2_x0_5( + *, weights: Optional[ShuffleNet_V2_X0_5_Weights] = None, progress: bool = True, **kwargs: Any +) -> ShuffleNetV2: + """ + Constructs a ShuffleNetV2 architecture with 0.5x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + Args: + weights (:class:`~torchvision.models.ShuffleNet_V2_X0_5_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ShuffleNet_V2_X0_5_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.shufflenetv2.ShuffleNetV2`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ShuffleNet_V2_X0_5_Weights + :members: + """ + weights = ShuffleNet_V2_X0_5_Weights.verify(weights) + + return _shufflenetv2(weights, progress, [4, 8, 4], [24, 48, 96, 192, 1024], **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ShuffleNet_V2_X1_0_Weights.IMAGENET1K_V1)) +def shufflenet_v2_x1_0( + *, weights: Optional[ShuffleNet_V2_X1_0_Weights] = None, progress: bool = True, **kwargs: Any +) -> ShuffleNetV2: + """ + Constructs a ShuffleNetV2 architecture with 1.0x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + Args: + weights (:class:`~torchvision.models.ShuffleNet_V2_X1_0_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ShuffleNet_V2_X1_0_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.shufflenetv2.ShuffleNetV2`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ShuffleNet_V2_X1_0_Weights + :members: + """ + weights = ShuffleNet_V2_X1_0_Weights.verify(weights) + + return _shufflenetv2(weights, progress, [4, 8, 4], [24, 116, 232, 464, 1024], **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ShuffleNet_V2_X1_5_Weights.IMAGENET1K_V1)) +def shufflenet_v2_x1_5( + *, weights: Optional[ShuffleNet_V2_X1_5_Weights] = None, progress: bool = True, **kwargs: Any +) -> ShuffleNetV2: + """ + Constructs a ShuffleNetV2 architecture with 1.5x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + Args: + weights (:class:`~torchvision.models.ShuffleNet_V2_X1_5_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ShuffleNet_V2_X1_5_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.shufflenetv2.ShuffleNetV2`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ShuffleNet_V2_X1_5_Weights + :members: + """ + weights = ShuffleNet_V2_X1_5_Weights.verify(weights) + + return _shufflenetv2(weights, progress, [4, 8, 4], [24, 176, 352, 704, 1024], **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ShuffleNet_V2_X2_0_Weights.IMAGENET1K_V1)) +def shufflenet_v2_x2_0( + *, weights: Optional[ShuffleNet_V2_X2_0_Weights] = None, progress: bool = True, **kwargs: Any +) -> ShuffleNetV2: + """ + Constructs a ShuffleNetV2 architecture with 2.0x output channels, as described in + `ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design + `__. + + Args: + weights (:class:`~torchvision.models.ShuffleNet_V2_X2_0_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.ShuffleNet_V2_X2_0_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.shufflenetv2.ShuffleNetV2`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ShuffleNet_V2_X2_0_Weights + :members: + """ + weights = ShuffleNet_V2_X2_0_Weights.verify(weights) + + return _shufflenetv2(weights, progress, [4, 8, 4], [24, 244, 488, 976, 2048], **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/squeezenet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/squeezenet.py new file mode 100644 index 0000000000000000000000000000000000000000..1e801b2890d4ad5ed468cf9963c75cc9a93172d0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/squeezenet.py @@ -0,0 +1,223 @@ +from functools import partial +from typing import Any, Optional + +import torch +import torch.nn as nn +import torch.nn.init as init + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = ["SqueezeNet", "SqueezeNet1_0_Weights", "SqueezeNet1_1_Weights", "squeezenet1_0", "squeezenet1_1"] + + +class Fire(nn.Module): + def __init__(self, inplanes: int, squeeze_planes: int, expand1x1_planes: int, expand3x3_planes: int) -> None: + super().__init__() + self.inplanes = inplanes + self.squeeze = nn.Conv2d(inplanes, squeeze_planes, kernel_size=1) + self.squeeze_activation = nn.ReLU(inplace=True) + self.expand1x1 = nn.Conv2d(squeeze_planes, expand1x1_planes, kernel_size=1) + self.expand1x1_activation = nn.ReLU(inplace=True) + self.expand3x3 = nn.Conv2d(squeeze_planes, expand3x3_planes, kernel_size=3, padding=1) + self.expand3x3_activation = nn.ReLU(inplace=True) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x = self.squeeze_activation(self.squeeze(x)) + return torch.cat( + [self.expand1x1_activation(self.expand1x1(x)), self.expand3x3_activation(self.expand3x3(x))], 1 + ) + + +class SqueezeNet(nn.Module): + def __init__(self, version: str = "1_0", num_classes: int = 1000, dropout: float = 0.5) -> None: + super().__init__() + _log_api_usage_once(self) + self.num_classes = num_classes + if version == "1_0": + self.features = nn.Sequential( + nn.Conv2d(3, 96, kernel_size=7, stride=2), + nn.ReLU(inplace=True), + nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True), + Fire(96, 16, 64, 64), + Fire(128, 16, 64, 64), + Fire(128, 32, 128, 128), + nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True), + Fire(256, 32, 128, 128), + Fire(256, 48, 192, 192), + Fire(384, 48, 192, 192), + Fire(384, 64, 256, 256), + nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True), + Fire(512, 64, 256, 256), + ) + elif version == "1_1": + self.features = nn.Sequential( + nn.Conv2d(3, 64, kernel_size=3, stride=2), + nn.ReLU(inplace=True), + nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True), + Fire(64, 16, 64, 64), + Fire(128, 16, 64, 64), + nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True), + Fire(128, 32, 128, 128), + Fire(256, 32, 128, 128), + nn.MaxPool2d(kernel_size=3, stride=2, ceil_mode=True), + Fire(256, 48, 192, 192), + Fire(384, 48, 192, 192), + Fire(384, 64, 256, 256), + Fire(512, 64, 256, 256), + ) + else: + # FIXME: Is this needed? SqueezeNet should only be called from the + # FIXME: squeezenet1_x() functions + # FIXME: This checking is not done for the other models + raise ValueError(f"Unsupported SqueezeNet version {version}: 1_0 or 1_1 expected") + + # Final convolution is initialized differently from the rest + final_conv = nn.Conv2d(512, self.num_classes, kernel_size=1) + self.classifier = nn.Sequential( + nn.Dropout(p=dropout), final_conv, nn.ReLU(inplace=True), nn.AdaptiveAvgPool2d((1, 1)) + ) + + for m in self.modules(): + if isinstance(m, nn.Conv2d): + if m is final_conv: + init.normal_(m.weight, mean=0.0, std=0.01) + else: + init.kaiming_uniform_(m.weight) + if m.bias is not None: + init.constant_(m.bias, 0) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x = self.features(x) + x = self.classifier(x) + return torch.flatten(x, 1) + + +def _squeezenet( + version: str, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> SqueezeNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = SqueezeNet(version, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/pull/49#issuecomment-277560717", + "_docs": """These weights reproduce closely the results of the paper using a simple training recipe.""", +} + + +class SqueezeNet1_0_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/squeezenet1_0-b66bff10.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "min_size": (21, 21), + "num_params": 1248424, + "_metrics": { + "ImageNet-1K": { + "acc@1": 58.092, + "acc@5": 80.420, + } + }, + "_ops": 0.819, + "_file_size": 4.778, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class SqueezeNet1_1_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/squeezenet1_1-b8a52dc0.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "min_size": (17, 17), + "num_params": 1235496, + "_metrics": { + "ImageNet-1K": { + "acc@1": 58.178, + "acc@5": 80.624, + } + }, + "_ops": 0.349, + "_file_size": 4.729, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", SqueezeNet1_0_Weights.IMAGENET1K_V1)) +def squeezenet1_0( + *, weights: Optional[SqueezeNet1_0_Weights] = None, progress: bool = True, **kwargs: Any +) -> SqueezeNet: + """SqueezeNet model architecture from the `SqueezeNet: AlexNet-level + accuracy with 50x fewer parameters and <0.5MB model size + `_ paper. + + Args: + weights (:class:`~torchvision.models.SqueezeNet1_0_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.SqueezeNet1_0_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.squeezenet.SqueezeNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.SqueezeNet1_0_Weights + :members: + """ + weights = SqueezeNet1_0_Weights.verify(weights) + return _squeezenet("1_0", weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", SqueezeNet1_1_Weights.IMAGENET1K_V1)) +def squeezenet1_1( + *, weights: Optional[SqueezeNet1_1_Weights] = None, progress: bool = True, **kwargs: Any +) -> SqueezeNet: + """SqueezeNet 1.1 model from the `official SqueezeNet repo + `_. + + SqueezeNet 1.1 has 2.4x less computation and slightly fewer parameters + than SqueezeNet 1.0, without sacrificing accuracy. + + Args: + weights (:class:`~torchvision.models.SqueezeNet1_1_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.SqueezeNet1_1_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.squeezenet.SqueezeNet`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.SqueezeNet1_1_Weights + :members: + """ + weights = SqueezeNet1_1_Weights.verify(weights) + return _squeezenet("1_1", weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/swin_transformer.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/swin_transformer.py new file mode 100644 index 0000000000000000000000000000000000000000..f3aaf4ce96fb6f95f4ff26adc3f944c938df1f94 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/swin_transformer.py @@ -0,0 +1,1033 @@ +import math +from functools import partial +from typing import Any, Callable, List, Optional + +import torch +import torch.nn.functional as F +from torch import nn, Tensor + +from ..ops.misc import MLP, Permute +from ..ops.stochastic_depth import StochasticDepth +from ..transforms._presets import ImageClassification, InterpolationMode +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "SwinTransformer", + "Swin_T_Weights", + "Swin_S_Weights", + "Swin_B_Weights", + "Swin_V2_T_Weights", + "Swin_V2_S_Weights", + "Swin_V2_B_Weights", + "swin_t", + "swin_s", + "swin_b", + "swin_v2_t", + "swin_v2_s", + "swin_v2_b", +] + + +def _patch_merging_pad(x: torch.Tensor) -> torch.Tensor: + H, W, _ = x.shape[-3:] + x = F.pad(x, (0, 0, 0, W % 2, 0, H % 2)) + x0 = x[..., 0::2, 0::2, :] # ... H/2 W/2 C + x1 = x[..., 1::2, 0::2, :] # ... H/2 W/2 C + x2 = x[..., 0::2, 1::2, :] # ... H/2 W/2 C + x3 = x[..., 1::2, 1::2, :] # ... H/2 W/2 C + x = torch.cat([x0, x1, x2, x3], -1) # ... H/2 W/2 4*C + return x + + +torch.fx.wrap("_patch_merging_pad") + + +def _get_relative_position_bias( + relative_position_bias_table: torch.Tensor, relative_position_index: torch.Tensor, window_size: List[int] +) -> torch.Tensor: + N = window_size[0] * window_size[1] + relative_position_bias = relative_position_bias_table[relative_position_index] # type: ignore[index] + relative_position_bias = relative_position_bias.view(N, N, -1) + relative_position_bias = relative_position_bias.permute(2, 0, 1).contiguous().unsqueeze(0) + return relative_position_bias + + +torch.fx.wrap("_get_relative_position_bias") + + +class PatchMerging(nn.Module): + """Patch Merging Layer. + Args: + dim (int): Number of input channels. + norm_layer (nn.Module): Normalization layer. Default: nn.LayerNorm. + """ + + def __init__(self, dim: int, norm_layer: Callable[..., nn.Module] = nn.LayerNorm): + super().__init__() + _log_api_usage_once(self) + self.dim = dim + self.reduction = nn.Linear(4 * dim, 2 * dim, bias=False) + self.norm = norm_layer(4 * dim) + + def forward(self, x: Tensor): + """ + Args: + x (Tensor): input tensor with expected layout of [..., H, W, C] + Returns: + Tensor with layout of [..., H/2, W/2, 2*C] + """ + x = _patch_merging_pad(x) + x = self.norm(x) + x = self.reduction(x) # ... H/2 W/2 2*C + return x + + +class PatchMergingV2(nn.Module): + """Patch Merging Layer for Swin Transformer V2. + Args: + dim (int): Number of input channels. + norm_layer (nn.Module): Normalization layer. Default: nn.LayerNorm. + """ + + def __init__(self, dim: int, norm_layer: Callable[..., nn.Module] = nn.LayerNorm): + super().__init__() + _log_api_usage_once(self) + self.dim = dim + self.reduction = nn.Linear(4 * dim, 2 * dim, bias=False) + self.norm = norm_layer(2 * dim) # difference + + def forward(self, x: Tensor): + """ + Args: + x (Tensor): input tensor with expected layout of [..., H, W, C] + Returns: + Tensor with layout of [..., H/2, W/2, 2*C] + """ + x = _patch_merging_pad(x) + x = self.reduction(x) # ... H/2 W/2 2*C + x = self.norm(x) + return x + + +def shifted_window_attention( + input: Tensor, + qkv_weight: Tensor, + proj_weight: Tensor, + relative_position_bias: Tensor, + window_size: List[int], + num_heads: int, + shift_size: List[int], + attention_dropout: float = 0.0, + dropout: float = 0.0, + qkv_bias: Optional[Tensor] = None, + proj_bias: Optional[Tensor] = None, + logit_scale: Optional[torch.Tensor] = None, + training: bool = True, +) -> Tensor: + """ + Window based multi-head self attention (W-MSA) module with relative position bias. + It supports both of shifted and non-shifted window. + Args: + input (Tensor[N, H, W, C]): The input tensor or 4-dimensions. + qkv_weight (Tensor[in_dim, out_dim]): The weight tensor of query, key, value. + proj_weight (Tensor[out_dim, out_dim]): The weight tensor of projection. + relative_position_bias (Tensor): The learned relative position bias added to attention. + window_size (List[int]): Window size. + num_heads (int): Number of attention heads. + shift_size (List[int]): Shift size for shifted window attention. + attention_dropout (float): Dropout ratio of attention weight. Default: 0.0. + dropout (float): Dropout ratio of output. Default: 0.0. + qkv_bias (Tensor[out_dim], optional): The bias tensor of query, key, value. Default: None. + proj_bias (Tensor[out_dim], optional): The bias tensor of projection. Default: None. + logit_scale (Tensor[out_dim], optional): Logit scale of cosine attention for Swin Transformer V2. Default: None. + training (bool, optional): Training flag used by the dropout parameters. Default: True. + Returns: + Tensor[N, H, W, C]: The output tensor after shifted window attention. + """ + B, H, W, C = input.shape + # pad feature maps to multiples of window size + pad_r = (window_size[1] - W % window_size[1]) % window_size[1] + pad_b = (window_size[0] - H % window_size[0]) % window_size[0] + x = F.pad(input, (0, 0, 0, pad_r, 0, pad_b)) + _, pad_H, pad_W, _ = x.shape + + shift_size = shift_size.copy() + # If window size is larger than feature size, there is no need to shift window + if window_size[0] >= pad_H: + shift_size[0] = 0 + if window_size[1] >= pad_W: + shift_size[1] = 0 + + # cyclic shift + if sum(shift_size) > 0: + x = torch.roll(x, shifts=(-shift_size[0], -shift_size[1]), dims=(1, 2)) + + # partition windows + num_windows = (pad_H // window_size[0]) * (pad_W // window_size[1]) + x = x.view(B, pad_H // window_size[0], window_size[0], pad_W // window_size[1], window_size[1], C) + x = x.permute(0, 1, 3, 2, 4, 5).reshape(B * num_windows, window_size[0] * window_size[1], C) # B*nW, Ws*Ws, C + + # multi-head attention + if logit_scale is not None and qkv_bias is not None: + qkv_bias = qkv_bias.clone() + length = qkv_bias.numel() // 3 + qkv_bias[length : 2 * length].zero_() + qkv = F.linear(x, qkv_weight, qkv_bias) + qkv = qkv.reshape(x.size(0), x.size(1), 3, num_heads, C // num_heads).permute(2, 0, 3, 1, 4) + q, k, v = qkv[0], qkv[1], qkv[2] + if logit_scale is not None: + # cosine attention + attn = F.normalize(q, dim=-1) @ F.normalize(k, dim=-1).transpose(-2, -1) + logit_scale = torch.clamp(logit_scale, max=math.log(100.0)).exp() + attn = attn * logit_scale + else: + q = q * (C // num_heads) ** -0.5 + attn = q.matmul(k.transpose(-2, -1)) + # add relative position bias + attn = attn + relative_position_bias + + if sum(shift_size) > 0: + # generate attention mask + attn_mask = x.new_zeros((pad_H, pad_W)) + h_slices = ((0, -window_size[0]), (-window_size[0], -shift_size[0]), (-shift_size[0], None)) + w_slices = ((0, -window_size[1]), (-window_size[1], -shift_size[1]), (-shift_size[1], None)) + count = 0 + for h in h_slices: + for w in w_slices: + attn_mask[h[0] : h[1], w[0] : w[1]] = count + count += 1 + attn_mask = attn_mask.view(pad_H // window_size[0], window_size[0], pad_W // window_size[1], window_size[1]) + attn_mask = attn_mask.permute(0, 2, 1, 3).reshape(num_windows, window_size[0] * window_size[1]) + attn_mask = attn_mask.unsqueeze(1) - attn_mask.unsqueeze(2) + attn_mask = attn_mask.masked_fill(attn_mask != 0, float(-100.0)).masked_fill(attn_mask == 0, float(0.0)) + attn = attn.view(x.size(0) // num_windows, num_windows, num_heads, x.size(1), x.size(1)) + attn = attn + attn_mask.unsqueeze(1).unsqueeze(0) + attn = attn.view(-1, num_heads, x.size(1), x.size(1)) + + attn = F.softmax(attn, dim=-1) + attn = F.dropout(attn, p=attention_dropout, training=training) + + x = attn.matmul(v).transpose(1, 2).reshape(x.size(0), x.size(1), C) + x = F.linear(x, proj_weight, proj_bias) + x = F.dropout(x, p=dropout, training=training) + + # reverse windows + x = x.view(B, pad_H // window_size[0], pad_W // window_size[1], window_size[0], window_size[1], C) + x = x.permute(0, 1, 3, 2, 4, 5).reshape(B, pad_H, pad_W, C) + + # reverse cyclic shift + if sum(shift_size) > 0: + x = torch.roll(x, shifts=(shift_size[0], shift_size[1]), dims=(1, 2)) + + # unpad features + x = x[:, :H, :W, :].contiguous() + return x + + +torch.fx.wrap("shifted_window_attention") + + +class ShiftedWindowAttention(nn.Module): + """ + See :func:`shifted_window_attention`. + """ + + def __init__( + self, + dim: int, + window_size: List[int], + shift_size: List[int], + num_heads: int, + qkv_bias: bool = True, + proj_bias: bool = True, + attention_dropout: float = 0.0, + dropout: float = 0.0, + ): + super().__init__() + if len(window_size) != 2 or len(shift_size) != 2: + raise ValueError("window_size and shift_size must be of length 2") + self.window_size = window_size + self.shift_size = shift_size + self.num_heads = num_heads + self.attention_dropout = attention_dropout + self.dropout = dropout + + self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias) + self.proj = nn.Linear(dim, dim, bias=proj_bias) + + self.define_relative_position_bias_table() + self.define_relative_position_index() + + def define_relative_position_bias_table(self): + # define a parameter table of relative position bias + self.relative_position_bias_table = nn.Parameter( + torch.zeros((2 * self.window_size[0] - 1) * (2 * self.window_size[1] - 1), self.num_heads) + ) # 2*Wh-1 * 2*Ww-1, nH + nn.init.trunc_normal_(self.relative_position_bias_table, std=0.02) + + def define_relative_position_index(self): + # get pair-wise relative position index for each token inside the window + coords_h = torch.arange(self.window_size[0]) + coords_w = torch.arange(self.window_size[1]) + coords = torch.stack(torch.meshgrid(coords_h, coords_w, indexing="ij")) # 2, Wh, Ww + coords_flatten = torch.flatten(coords, 1) # 2, Wh*Ww + relative_coords = coords_flatten[:, :, None] - coords_flatten[:, None, :] # 2, Wh*Ww, Wh*Ww + relative_coords = relative_coords.permute(1, 2, 0).contiguous() # Wh*Ww, Wh*Ww, 2 + relative_coords[:, :, 0] += self.window_size[0] - 1 # shift to start from 0 + relative_coords[:, :, 1] += self.window_size[1] - 1 + relative_coords[:, :, 0] *= 2 * self.window_size[1] - 1 + relative_position_index = relative_coords.sum(-1).flatten() # Wh*Ww*Wh*Ww + self.register_buffer("relative_position_index", relative_position_index) + + def get_relative_position_bias(self) -> torch.Tensor: + return _get_relative_position_bias( + self.relative_position_bias_table, self.relative_position_index, self.window_size # type: ignore[arg-type] + ) + + def forward(self, x: Tensor) -> Tensor: + """ + Args: + x (Tensor): Tensor with layout of [B, H, W, C] + Returns: + Tensor with same layout as input, i.e. [B, H, W, C] + """ + relative_position_bias = self.get_relative_position_bias() + return shifted_window_attention( + x, + self.qkv.weight, + self.proj.weight, + relative_position_bias, + self.window_size, + self.num_heads, + shift_size=self.shift_size, + attention_dropout=self.attention_dropout, + dropout=self.dropout, + qkv_bias=self.qkv.bias, + proj_bias=self.proj.bias, + training=self.training, + ) + + +class ShiftedWindowAttentionV2(ShiftedWindowAttention): + """ + See :func:`shifted_window_attention_v2`. + """ + + def __init__( + self, + dim: int, + window_size: List[int], + shift_size: List[int], + num_heads: int, + qkv_bias: bool = True, + proj_bias: bool = True, + attention_dropout: float = 0.0, + dropout: float = 0.0, + ): + super().__init__( + dim, + window_size, + shift_size, + num_heads, + qkv_bias=qkv_bias, + proj_bias=proj_bias, + attention_dropout=attention_dropout, + dropout=dropout, + ) + + self.logit_scale = nn.Parameter(torch.log(10 * torch.ones((num_heads, 1, 1)))) + # mlp to generate continuous relative position bias + self.cpb_mlp = nn.Sequential( + nn.Linear(2, 512, bias=True), nn.ReLU(inplace=True), nn.Linear(512, num_heads, bias=False) + ) + if qkv_bias: + length = self.qkv.bias.numel() // 3 + self.qkv.bias[length : 2 * length].data.zero_() + + def define_relative_position_bias_table(self): + # get relative_coords_table + relative_coords_h = torch.arange(-(self.window_size[0] - 1), self.window_size[0], dtype=torch.float32) + relative_coords_w = torch.arange(-(self.window_size[1] - 1), self.window_size[1], dtype=torch.float32) + relative_coords_table = torch.stack(torch.meshgrid([relative_coords_h, relative_coords_w], indexing="ij")) + relative_coords_table = relative_coords_table.permute(1, 2, 0).contiguous().unsqueeze(0) # 1, 2*Wh-1, 2*Ww-1, 2 + + relative_coords_table[:, :, :, 0] /= self.window_size[0] - 1 + relative_coords_table[:, :, :, 1] /= self.window_size[1] - 1 + + relative_coords_table *= 8 # normalize to -8, 8 + relative_coords_table = ( + torch.sign(relative_coords_table) * torch.log2(torch.abs(relative_coords_table) + 1.0) / 3.0 + ) + self.register_buffer("relative_coords_table", relative_coords_table) + + def get_relative_position_bias(self) -> torch.Tensor: + relative_position_bias = _get_relative_position_bias( + self.cpb_mlp(self.relative_coords_table).view(-1, self.num_heads), + self.relative_position_index, # type: ignore[arg-type] + self.window_size, + ) + relative_position_bias = 16 * torch.sigmoid(relative_position_bias) + return relative_position_bias + + def forward(self, x: Tensor): + """ + Args: + x (Tensor): Tensor with layout of [B, H, W, C] + Returns: + Tensor with same layout as input, i.e. [B, H, W, C] + """ + relative_position_bias = self.get_relative_position_bias() + return shifted_window_attention( + x, + self.qkv.weight, + self.proj.weight, + relative_position_bias, + self.window_size, + self.num_heads, + shift_size=self.shift_size, + attention_dropout=self.attention_dropout, + dropout=self.dropout, + qkv_bias=self.qkv.bias, + proj_bias=self.proj.bias, + logit_scale=self.logit_scale, + training=self.training, + ) + + +class SwinTransformerBlock(nn.Module): + """ + Swin Transformer Block. + Args: + dim (int): Number of input channels. + num_heads (int): Number of attention heads. + window_size (List[int]): Window size. + shift_size (List[int]): Shift size for shifted window attention. + mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. Default: 4.0. + dropout (float): Dropout rate. Default: 0.0. + attention_dropout (float): Attention dropout rate. Default: 0.0. + stochastic_depth_prob: (float): Stochastic depth rate. Default: 0.0. + norm_layer (nn.Module): Normalization layer. Default: nn.LayerNorm. + attn_layer (nn.Module): Attention layer. Default: ShiftedWindowAttention + """ + + def __init__( + self, + dim: int, + num_heads: int, + window_size: List[int], + shift_size: List[int], + mlp_ratio: float = 4.0, + dropout: float = 0.0, + attention_dropout: float = 0.0, + stochastic_depth_prob: float = 0.0, + norm_layer: Callable[..., nn.Module] = nn.LayerNorm, + attn_layer: Callable[..., nn.Module] = ShiftedWindowAttention, + ): + super().__init__() + _log_api_usage_once(self) + + self.norm1 = norm_layer(dim) + self.attn = attn_layer( + dim, + window_size, + shift_size, + num_heads, + attention_dropout=attention_dropout, + dropout=dropout, + ) + self.stochastic_depth = StochasticDepth(stochastic_depth_prob, "row") + self.norm2 = norm_layer(dim) + self.mlp = MLP(dim, [int(dim * mlp_ratio), dim], activation_layer=nn.GELU, inplace=None, dropout=dropout) + + for m in self.mlp.modules(): + if isinstance(m, nn.Linear): + nn.init.xavier_uniform_(m.weight) + if m.bias is not None: + nn.init.normal_(m.bias, std=1e-6) + + def forward(self, x: Tensor): + x = x + self.stochastic_depth(self.attn(self.norm1(x))) + x = x + self.stochastic_depth(self.mlp(self.norm2(x))) + return x + + +class SwinTransformerBlockV2(SwinTransformerBlock): + """ + Swin Transformer V2 Block. + Args: + dim (int): Number of input channels. + num_heads (int): Number of attention heads. + window_size (List[int]): Window size. + shift_size (List[int]): Shift size for shifted window attention. + mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. Default: 4.0. + dropout (float): Dropout rate. Default: 0.0. + attention_dropout (float): Attention dropout rate. Default: 0.0. + stochastic_depth_prob: (float): Stochastic depth rate. Default: 0.0. + norm_layer (nn.Module): Normalization layer. Default: nn.LayerNorm. + attn_layer (nn.Module): Attention layer. Default: ShiftedWindowAttentionV2. + """ + + def __init__( + self, + dim: int, + num_heads: int, + window_size: List[int], + shift_size: List[int], + mlp_ratio: float = 4.0, + dropout: float = 0.0, + attention_dropout: float = 0.0, + stochastic_depth_prob: float = 0.0, + norm_layer: Callable[..., nn.Module] = nn.LayerNorm, + attn_layer: Callable[..., nn.Module] = ShiftedWindowAttentionV2, + ): + super().__init__( + dim, + num_heads, + window_size, + shift_size, + mlp_ratio=mlp_ratio, + dropout=dropout, + attention_dropout=attention_dropout, + stochastic_depth_prob=stochastic_depth_prob, + norm_layer=norm_layer, + attn_layer=attn_layer, + ) + + def forward(self, x: Tensor): + # Here is the difference, we apply norm after the attention in V2. + # In V1 we applied norm before the attention. + x = x + self.stochastic_depth(self.norm1(self.attn(x))) + x = x + self.stochastic_depth(self.norm2(self.mlp(x))) + return x + + +class SwinTransformer(nn.Module): + """ + Implements Swin Transformer from the `"Swin Transformer: Hierarchical Vision Transformer using + Shifted Windows" `_ paper. + Args: + patch_size (List[int]): Patch size. + embed_dim (int): Patch embedding dimension. + depths (List(int)): Depth of each Swin Transformer layer. + num_heads (List(int)): Number of attention heads in different layers. + window_size (List[int]): Window size. + mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. Default: 4.0. + dropout (float): Dropout rate. Default: 0.0. + attention_dropout (float): Attention dropout rate. Default: 0.0. + stochastic_depth_prob (float): Stochastic depth rate. Default: 0.1. + num_classes (int): Number of classes for classification head. Default: 1000. + block (nn.Module, optional): SwinTransformer Block. Default: None. + norm_layer (nn.Module, optional): Normalization layer. Default: None. + downsample_layer (nn.Module): Downsample layer (patch merging). Default: PatchMerging. + """ + + def __init__( + self, + patch_size: List[int], + embed_dim: int, + depths: List[int], + num_heads: List[int], + window_size: List[int], + mlp_ratio: float = 4.0, + dropout: float = 0.0, + attention_dropout: float = 0.0, + stochastic_depth_prob: float = 0.1, + num_classes: int = 1000, + norm_layer: Optional[Callable[..., nn.Module]] = None, + block: Optional[Callable[..., nn.Module]] = None, + downsample_layer: Callable[..., nn.Module] = PatchMerging, + ): + super().__init__() + _log_api_usage_once(self) + self.num_classes = num_classes + + if block is None: + block = SwinTransformerBlock + if norm_layer is None: + norm_layer = partial(nn.LayerNorm, eps=1e-5) + + layers: List[nn.Module] = [] + # split image into non-overlapping patches + layers.append( + nn.Sequential( + nn.Conv2d( + 3, embed_dim, kernel_size=(patch_size[0], patch_size[1]), stride=(patch_size[0], patch_size[1]) + ), + Permute([0, 2, 3, 1]), + norm_layer(embed_dim), + ) + ) + + total_stage_blocks = sum(depths) + stage_block_id = 0 + # build SwinTransformer blocks + for i_stage in range(len(depths)): + stage: List[nn.Module] = [] + dim = embed_dim * 2**i_stage + for i_layer in range(depths[i_stage]): + # adjust stochastic depth probability based on the depth of the stage block + sd_prob = stochastic_depth_prob * float(stage_block_id) / (total_stage_blocks - 1) + stage.append( + block( + dim, + num_heads[i_stage], + window_size=window_size, + shift_size=[0 if i_layer % 2 == 0 else w // 2 for w in window_size], + mlp_ratio=mlp_ratio, + dropout=dropout, + attention_dropout=attention_dropout, + stochastic_depth_prob=sd_prob, + norm_layer=norm_layer, + ) + ) + stage_block_id += 1 + layers.append(nn.Sequential(*stage)) + # add patch merging layer + if i_stage < (len(depths) - 1): + layers.append(downsample_layer(dim, norm_layer)) + self.features = nn.Sequential(*layers) + + num_features = embed_dim * 2 ** (len(depths) - 1) + self.norm = norm_layer(num_features) + self.permute = Permute([0, 3, 1, 2]) # B H W C -> B C H W + self.avgpool = nn.AdaptiveAvgPool2d(1) + self.flatten = nn.Flatten(1) + self.head = nn.Linear(num_features, num_classes) + + for m in self.modules(): + if isinstance(m, nn.Linear): + nn.init.trunc_normal_(m.weight, std=0.02) + if m.bias is not None: + nn.init.zeros_(m.bias) + + def forward(self, x): + x = self.features(x) + x = self.norm(x) + x = self.permute(x) + x = self.avgpool(x) + x = self.flatten(x) + x = self.head(x) + return x + + +def _swin_transformer( + patch_size: List[int], + embed_dim: int, + depths: List[int], + num_heads: List[int], + window_size: List[int], + stochastic_depth_prob: float, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> SwinTransformer: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = SwinTransformer( + patch_size=patch_size, + embed_dim=embed_dim, + depths=depths, + num_heads=num_heads, + window_size=window_size, + stochastic_depth_prob=stochastic_depth_prob, + **kwargs, + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "categories": _IMAGENET_CATEGORIES, +} + + +class Swin_T_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/swin_t-704ceda3.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=232, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META, + "num_params": 28288354, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#swintransformer", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.474, + "acc@5": 95.776, + } + }, + "_ops": 4.491, + "_file_size": 108.19, + "_docs": """These weights reproduce closely the results of the paper using a similar training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class Swin_S_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/swin_s-5e29d889.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=246, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META, + "num_params": 49606258, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#swintransformer", + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.196, + "acc@5": 96.360, + } + }, + "_ops": 8.741, + "_file_size": 189.786, + "_docs": """These weights reproduce closely the results of the paper using a similar training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class Swin_B_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/swin_b-68c6b09e.pth", + transforms=partial( + ImageClassification, crop_size=224, resize_size=238, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META, + "num_params": 87768224, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#swintransformer", + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.582, + "acc@5": 96.640, + } + }, + "_ops": 15.431, + "_file_size": 335.364, + "_docs": """These weights reproduce closely the results of the paper using a similar training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class Swin_V2_T_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/swin_v2_t-b137f0e2.pth", + transforms=partial( + ImageClassification, crop_size=256, resize_size=260, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META, + "num_params": 28351570, + "min_size": (256, 256), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#swintransformer-v2", + "_metrics": { + "ImageNet-1K": { + "acc@1": 82.072, + "acc@5": 96.132, + } + }, + "_ops": 5.94, + "_file_size": 108.626, + "_docs": """These weights reproduce closely the results of the paper using a similar training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class Swin_V2_S_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/swin_v2_s-637d8ceb.pth", + transforms=partial( + ImageClassification, crop_size=256, resize_size=260, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META, + "num_params": 49737442, + "min_size": (256, 256), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#swintransformer-v2", + "_metrics": { + "ImageNet-1K": { + "acc@1": 83.712, + "acc@5": 96.816, + } + }, + "_ops": 11.546, + "_file_size": 190.675, + "_docs": """These weights reproduce closely the results of the paper using a similar training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class Swin_V2_B_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/swin_v2_b-781e5279.pth", + transforms=partial( + ImageClassification, crop_size=256, resize_size=272, interpolation=InterpolationMode.BICUBIC + ), + meta={ + **_COMMON_META, + "num_params": 87930848, + "min_size": (256, 256), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#swintransformer-v2", + "_metrics": { + "ImageNet-1K": { + "acc@1": 84.112, + "acc@5": 96.864, + } + }, + "_ops": 20.325, + "_file_size": 336.372, + "_docs": """These weights reproduce closely the results of the paper using a similar training recipe.""", + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin_T_Weights.IMAGENET1K_V1)) +def swin_t(*, weights: Optional[Swin_T_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer: + """ + Constructs a swin_tiny architecture from + `Swin Transformer: Hierarchical Vision Transformer using Shifted Windows `_. + + Args: + weights (:class:`~torchvision.models.Swin_T_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Swin_T_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Swin_T_Weights + :members: + """ + weights = Swin_T_Weights.verify(weights) + + return _swin_transformer( + patch_size=[4, 4], + embed_dim=96, + depths=[2, 2, 6, 2], + num_heads=[3, 6, 12, 24], + window_size=[7, 7], + stochastic_depth_prob=0.2, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin_S_Weights.IMAGENET1K_V1)) +def swin_s(*, weights: Optional[Swin_S_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer: + """ + Constructs a swin_small architecture from + `Swin Transformer: Hierarchical Vision Transformer using Shifted Windows `_. + + Args: + weights (:class:`~torchvision.models.Swin_S_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Swin_S_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Swin_S_Weights + :members: + """ + weights = Swin_S_Weights.verify(weights) + + return _swin_transformer( + patch_size=[4, 4], + embed_dim=96, + depths=[2, 2, 18, 2], + num_heads=[3, 6, 12, 24], + window_size=[7, 7], + stochastic_depth_prob=0.3, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin_B_Weights.IMAGENET1K_V1)) +def swin_b(*, weights: Optional[Swin_B_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer: + """ + Constructs a swin_base architecture from + `Swin Transformer: Hierarchical Vision Transformer using Shifted Windows `_. + + Args: + weights (:class:`~torchvision.models.Swin_B_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Swin_B_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Swin_B_Weights + :members: + """ + weights = Swin_B_Weights.verify(weights) + + return _swin_transformer( + patch_size=[4, 4], + embed_dim=128, + depths=[2, 2, 18, 2], + num_heads=[4, 8, 16, 32], + window_size=[7, 7], + stochastic_depth_prob=0.5, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin_V2_T_Weights.IMAGENET1K_V1)) +def swin_v2_t(*, weights: Optional[Swin_V2_T_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer: + """ + Constructs a swin_v2_tiny architecture from + `Swin Transformer V2: Scaling Up Capacity and Resolution `_. + + Args: + weights (:class:`~torchvision.models.Swin_V2_T_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Swin_V2_T_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Swin_V2_T_Weights + :members: + """ + weights = Swin_V2_T_Weights.verify(weights) + + return _swin_transformer( + patch_size=[4, 4], + embed_dim=96, + depths=[2, 2, 6, 2], + num_heads=[3, 6, 12, 24], + window_size=[8, 8], + stochastic_depth_prob=0.2, + weights=weights, + progress=progress, + block=SwinTransformerBlockV2, + downsample_layer=PatchMergingV2, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin_V2_S_Weights.IMAGENET1K_V1)) +def swin_v2_s(*, weights: Optional[Swin_V2_S_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer: + """ + Constructs a swin_v2_small architecture from + `Swin Transformer V2: Scaling Up Capacity and Resolution `_. + + Args: + weights (:class:`~torchvision.models.Swin_V2_S_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Swin_V2_S_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Swin_V2_S_Weights + :members: + """ + weights = Swin_V2_S_Weights.verify(weights) + + return _swin_transformer( + patch_size=[4, 4], + embed_dim=96, + depths=[2, 2, 18, 2], + num_heads=[3, 6, 12, 24], + window_size=[8, 8], + stochastic_depth_prob=0.3, + weights=weights, + progress=progress, + block=SwinTransformerBlockV2, + downsample_layer=PatchMergingV2, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin_V2_B_Weights.IMAGENET1K_V1)) +def swin_v2_b(*, weights: Optional[Swin_V2_B_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer: + """ + Constructs a swin_v2_base architecture from + `Swin Transformer V2: Scaling Up Capacity and Resolution `_. + + Args: + weights (:class:`~torchvision.models.Swin_V2_B_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.Swin_V2_B_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.Swin_V2_B_Weights + :members: + """ + weights = Swin_V2_B_Weights.verify(weights) + + return _swin_transformer( + patch_size=[4, 4], + embed_dim=128, + depths=[2, 2, 18, 2], + num_heads=[4, 8, 16, 32], + window_size=[8, 8], + stochastic_depth_prob=0.5, + weights=weights, + progress=progress, + block=SwinTransformerBlockV2, + downsample_layer=PatchMergingV2, + **kwargs, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/vgg.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/vgg.py new file mode 100644 index 0000000000000000000000000000000000000000..f9108e46ea4c6c8cf8ba1ae9e5d1fa592acfd74a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/vgg.py @@ -0,0 +1,511 @@ +from functools import partial +from typing import Any, cast, Dict, List, Optional, Union + +import torch +import torch.nn as nn + +from ..transforms._presets import ImageClassification +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "VGG", + "VGG11_Weights", + "VGG11_BN_Weights", + "VGG13_Weights", + "VGG13_BN_Weights", + "VGG16_Weights", + "VGG16_BN_Weights", + "VGG19_Weights", + "VGG19_BN_Weights", + "vgg11", + "vgg11_bn", + "vgg13", + "vgg13_bn", + "vgg16", + "vgg16_bn", + "vgg19", + "vgg19_bn", +] + + +class VGG(nn.Module): + def __init__( + self, features: nn.Module, num_classes: int = 1000, init_weights: bool = True, dropout: float = 0.5 + ) -> None: + super().__init__() + _log_api_usage_once(self) + self.features = features + self.avgpool = nn.AdaptiveAvgPool2d((7, 7)) + self.classifier = nn.Sequential( + nn.Linear(512 * 7 * 7, 4096), + nn.ReLU(True), + nn.Dropout(p=dropout), + nn.Linear(4096, 4096), + nn.ReLU(True), + nn.Dropout(p=dropout), + nn.Linear(4096, num_classes), + ) + if init_weights: + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu") + if m.bias is not None: + nn.init.constant_(m.bias, 0) + elif isinstance(m, nn.BatchNorm2d): + nn.init.constant_(m.weight, 1) + nn.init.constant_(m.bias, 0) + elif isinstance(m, nn.Linear): + nn.init.normal_(m.weight, 0, 0.01) + nn.init.constant_(m.bias, 0) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + x = self.features(x) + x = self.avgpool(x) + x = torch.flatten(x, 1) + x = self.classifier(x) + return x + + +def make_layers(cfg: List[Union[str, int]], batch_norm: bool = False) -> nn.Sequential: + layers: List[nn.Module] = [] + in_channels = 3 + for v in cfg: + if v == "M": + layers += [nn.MaxPool2d(kernel_size=2, stride=2)] + else: + v = cast(int, v) + conv2d = nn.Conv2d(in_channels, v, kernel_size=3, padding=1) + if batch_norm: + layers += [conv2d, nn.BatchNorm2d(v), nn.ReLU(inplace=True)] + else: + layers += [conv2d, nn.ReLU(inplace=True)] + in_channels = v + return nn.Sequential(*layers) + + +cfgs: Dict[str, List[Union[str, int]]] = { + "A": [64, "M", 128, "M", 256, 256, "M", 512, 512, "M", 512, 512, "M"], + "B": [64, 64, "M", 128, 128, "M", 256, 256, "M", 512, 512, "M", 512, 512, "M"], + "D": [64, 64, "M", 128, 128, "M", 256, 256, 256, "M", 512, 512, 512, "M", 512, 512, 512, "M"], + "E": [64, 64, "M", 128, 128, "M", 256, 256, 256, 256, "M", 512, 512, 512, 512, "M", 512, 512, 512, 512, "M"], +} + + +def _vgg(cfg: str, batch_norm: bool, weights: Optional[WeightsEnum], progress: bool, **kwargs: Any) -> VGG: + if weights is not None: + kwargs["init_weights"] = False + if weights.meta["categories"] is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + model = VGG(make_layers(cfgs[cfg], batch_norm=batch_norm), **kwargs) + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + return model + + +_COMMON_META = { + "min_size": (32, 32), + "categories": _IMAGENET_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#alexnet-and-vgg", + "_docs": """These weights were trained from scratch by using a simplified training recipe.""", +} + + +class VGG11_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg11-8a719046.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 132863336, + "_metrics": { + "ImageNet-1K": { + "acc@1": 69.020, + "acc@5": 88.628, + } + }, + "_ops": 7.609, + "_file_size": 506.84, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class VGG11_BN_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg11_bn-6002323d.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 132868840, + "_metrics": { + "ImageNet-1K": { + "acc@1": 70.370, + "acc@5": 89.810, + } + }, + "_ops": 7.609, + "_file_size": 506.881, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class VGG13_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg13-19584684.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 133047848, + "_metrics": { + "ImageNet-1K": { + "acc@1": 69.928, + "acc@5": 89.246, + } + }, + "_ops": 11.308, + "_file_size": 507.545, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class VGG13_BN_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg13_bn-abd245e5.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 133053736, + "_metrics": { + "ImageNet-1K": { + "acc@1": 71.586, + "acc@5": 90.374, + } + }, + "_ops": 11.308, + "_file_size": 507.59, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class VGG16_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg16-397923af.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 138357544, + "_metrics": { + "ImageNet-1K": { + "acc@1": 71.592, + "acc@5": 90.382, + } + }, + "_ops": 15.47, + "_file_size": 527.796, + }, + ) + IMAGENET1K_FEATURES = Weights( + # Weights ported from https://github.com/amdegroot/ssd.pytorch/ + url="https://download.pytorch.org/models/vgg16_features-amdegroot-88682ab5.pth", + transforms=partial( + ImageClassification, + crop_size=224, + mean=(0.48235, 0.45882, 0.40784), + std=(1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0), + ), + meta={ + **_COMMON_META, + "num_params": 138357544, + "categories": None, + "recipe": "https://github.com/amdegroot/ssd.pytorch#training-ssd", + "_metrics": { + "ImageNet-1K": { + "acc@1": float("nan"), + "acc@5": float("nan"), + } + }, + "_ops": 15.47, + "_file_size": 527.802, + "_docs": """ + These weights can't be used for classification because they are missing values in the `classifier` + module. Only the `features` module has valid values and can be used for feature extraction. The weights + were trained using the original input standardization method as described in the paper. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class VGG16_BN_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg16_bn-6c64b313.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 138365992, + "_metrics": { + "ImageNet-1K": { + "acc@1": 73.360, + "acc@5": 91.516, + } + }, + "_ops": 15.47, + "_file_size": 527.866, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class VGG19_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg19-dcbb9e9d.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 143667240, + "_metrics": { + "ImageNet-1K": { + "acc@1": 72.376, + "acc@5": 90.876, + } + }, + "_ops": 19.632, + "_file_size": 548.051, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class VGG19_BN_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vgg19_bn-c79401a0.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 143678248, + "_metrics": { + "ImageNet-1K": { + "acc@1": 74.218, + "acc@5": 91.842, + } + }, + "_ops": 19.632, + "_file_size": 548.143, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG11_Weights.IMAGENET1K_V1)) +def vgg11(*, weights: Optional[VGG11_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-11 from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG11_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG11_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG11_Weights + :members: + """ + weights = VGG11_Weights.verify(weights) + + return _vgg("A", False, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG11_BN_Weights.IMAGENET1K_V1)) +def vgg11_bn(*, weights: Optional[VGG11_BN_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-11-BN from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG11_BN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG11_BN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG11_BN_Weights + :members: + """ + weights = VGG11_BN_Weights.verify(weights) + + return _vgg("A", True, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG13_Weights.IMAGENET1K_V1)) +def vgg13(*, weights: Optional[VGG13_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-13 from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG13_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG13_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG13_Weights + :members: + """ + weights = VGG13_Weights.verify(weights) + + return _vgg("B", False, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG13_BN_Weights.IMAGENET1K_V1)) +def vgg13_bn(*, weights: Optional[VGG13_BN_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-13-BN from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG13_BN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG13_BN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG13_BN_Weights + :members: + """ + weights = VGG13_BN_Weights.verify(weights) + + return _vgg("B", True, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG16_Weights.IMAGENET1K_V1)) +def vgg16(*, weights: Optional[VGG16_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-16 from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG16_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG16_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG16_Weights + :members: + """ + weights = VGG16_Weights.verify(weights) + + return _vgg("D", False, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG16_BN_Weights.IMAGENET1K_V1)) +def vgg16_bn(*, weights: Optional[VGG16_BN_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-16-BN from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG16_BN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG16_BN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG16_BN_Weights + :members: + """ + weights = VGG16_BN_Weights.verify(weights) + + return _vgg("D", True, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG19_Weights.IMAGENET1K_V1)) +def vgg19(*, weights: Optional[VGG19_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-19 from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG19_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG19_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG19_Weights + :members: + """ + weights = VGG19_Weights.verify(weights) + + return _vgg("E", False, weights, progress, **kwargs) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", VGG19_BN_Weights.IMAGENET1K_V1)) +def vgg19_bn(*, weights: Optional[VGG19_BN_Weights] = None, progress: bool = True, **kwargs: Any) -> VGG: + """VGG-19_BN from `Very Deep Convolutional Networks for Large-Scale Image Recognition `__. + + Args: + weights (:class:`~torchvision.models.VGG19_BN_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.VGG19_BN_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vgg.VGG`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.VGG19_BN_Weights + :members: + """ + weights = VGG19_BN_Weights.verify(weights) + + return _vgg("E", True, weights, progress, **kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..785530182c5dae08df6c5d2e9ad9757613a61622 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__init__.py @@ -0,0 +1,4 @@ +from .mvit import * +from .resnet import * +from .s3d import * +from .swin_transformer import * diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..100ff05c6f1a5a40852a7e77550f3a1dbe77a03b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/mvit.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/mvit.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4d942c53df3d50821676128abca20541250d0125 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/mvit.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/resnet.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/resnet.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6a26d301c49b3fb24de49cfaf345eaedfb168843 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/resnet.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/s3d.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/s3d.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..75653a35bf37ca46f787cdafcd76d4b63b5c66ec Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/s3d.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/swin_transformer.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/swin_transformer.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e7a66bdaa0aa055b37e3fe3a4530580402f54ec9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/__pycache__/swin_transformer.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/mvit.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/mvit.py new file mode 100644 index 0000000000000000000000000000000000000000..b08edfdb923e0c1b4c166aa42447013cbf42df06 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/mvit.py @@ -0,0 +1,897 @@ +import math +from dataclasses import dataclass +from functools import partial +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple + +import torch +import torch.fx +import torch.nn as nn + +from ...ops import MLP, StochasticDepth +from ...transforms._presets import VideoClassification +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._meta import _KINETICS400_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "MViT", + "MViT_V1_B_Weights", + "mvit_v1_b", + "MViT_V2_S_Weights", + "mvit_v2_s", +] + + +@dataclass +class MSBlockConfig: + num_heads: int + input_channels: int + output_channels: int + kernel_q: List[int] + kernel_kv: List[int] + stride_q: List[int] + stride_kv: List[int] + + +def _prod(s: Sequence[int]) -> int: + product = 1 + for v in s: + product *= v + return product + + +def _unsqueeze(x: torch.Tensor, target_dim: int, expand_dim: int) -> Tuple[torch.Tensor, int]: + tensor_dim = x.dim() + if tensor_dim == target_dim - 1: + x = x.unsqueeze(expand_dim) + elif tensor_dim != target_dim: + raise ValueError(f"Unsupported input dimension {x.shape}") + return x, tensor_dim + + +def _squeeze(x: torch.Tensor, target_dim: int, expand_dim: int, tensor_dim: int) -> torch.Tensor: + if tensor_dim == target_dim - 1: + x = x.squeeze(expand_dim) + return x + + +torch.fx.wrap("_unsqueeze") +torch.fx.wrap("_squeeze") + + +class Pool(nn.Module): + def __init__( + self, + pool: nn.Module, + norm: Optional[nn.Module], + activation: Optional[nn.Module] = None, + norm_before_pool: bool = False, + ) -> None: + super().__init__() + self.pool = pool + layers = [] + if norm is not None: + layers.append(norm) + if activation is not None: + layers.append(activation) + self.norm_act = nn.Sequential(*layers) if layers else None + self.norm_before_pool = norm_before_pool + + def forward(self, x: torch.Tensor, thw: Tuple[int, int, int]) -> Tuple[torch.Tensor, Tuple[int, int, int]]: + x, tensor_dim = _unsqueeze(x, 4, 1) + + # Separate the class token and reshape the input + class_token, x = torch.tensor_split(x, indices=(1,), dim=2) + x = x.transpose(2, 3) + B, N, C = x.shape[:3] + x = x.reshape((B * N, C) + thw).contiguous() + + # normalizing prior pooling is useful when we use BN which can be absorbed to speed up inference + if self.norm_before_pool and self.norm_act is not None: + x = self.norm_act(x) + + # apply the pool on the input and add back the token + x = self.pool(x) + T, H, W = x.shape[2:] + x = x.reshape(B, N, C, -1).transpose(2, 3) + x = torch.cat((class_token, x), dim=2) + + if not self.norm_before_pool and self.norm_act is not None: + x = self.norm_act(x) + + x = _squeeze(x, 4, 1, tensor_dim) + return x, (T, H, W) + + +def _interpolate(embedding: torch.Tensor, d: int) -> torch.Tensor: + if embedding.shape[0] == d: + return embedding + + return ( + nn.functional.interpolate( + embedding.permute(1, 0).unsqueeze(0), + size=d, + mode="linear", + ) + .squeeze(0) + .permute(1, 0) + ) + + +def _add_rel_pos( + attn: torch.Tensor, + q: torch.Tensor, + q_thw: Tuple[int, int, int], + k_thw: Tuple[int, int, int], + rel_pos_h: torch.Tensor, + rel_pos_w: torch.Tensor, + rel_pos_t: torch.Tensor, +) -> torch.Tensor: + # Modified code from: https://github.com/facebookresearch/SlowFast/commit/1aebd71a2efad823d52b827a3deaf15a56cf4932 + q_t, q_h, q_w = q_thw + k_t, k_h, k_w = k_thw + dh = int(2 * max(q_h, k_h) - 1) + dw = int(2 * max(q_w, k_w) - 1) + dt = int(2 * max(q_t, k_t) - 1) + + # Scale up rel pos if shapes for q and k are different. + q_h_ratio = max(k_h / q_h, 1.0) + k_h_ratio = max(q_h / k_h, 1.0) + dist_h = torch.arange(q_h)[:, None] * q_h_ratio - (torch.arange(k_h)[None, :] + (1.0 - k_h)) * k_h_ratio + q_w_ratio = max(k_w / q_w, 1.0) + k_w_ratio = max(q_w / k_w, 1.0) + dist_w = torch.arange(q_w)[:, None] * q_w_ratio - (torch.arange(k_w)[None, :] + (1.0 - k_w)) * k_w_ratio + q_t_ratio = max(k_t / q_t, 1.0) + k_t_ratio = max(q_t / k_t, 1.0) + dist_t = torch.arange(q_t)[:, None] * q_t_ratio - (torch.arange(k_t)[None, :] + (1.0 - k_t)) * k_t_ratio + + # Interpolate rel pos if needed. + rel_pos_h = _interpolate(rel_pos_h, dh) + rel_pos_w = _interpolate(rel_pos_w, dw) + rel_pos_t = _interpolate(rel_pos_t, dt) + Rh = rel_pos_h[dist_h.long()] + Rw = rel_pos_w[dist_w.long()] + Rt = rel_pos_t[dist_t.long()] + + B, n_head, _, dim = q.shape + + r_q = q[:, :, 1:].reshape(B, n_head, q_t, q_h, q_w, dim) + rel_h_q = torch.einsum("bythwc,hkc->bythwk", r_q, Rh) # [B, H, q_t, qh, qw, k_h] + rel_w_q = torch.einsum("bythwc,wkc->bythwk", r_q, Rw) # [B, H, q_t, qh, qw, k_w] + # [B, H, q_t, q_h, q_w, dim] -> [q_t, B, H, q_h, q_w, dim] -> [q_t, B*H*q_h*q_w, dim] + r_q = r_q.permute(2, 0, 1, 3, 4, 5).reshape(q_t, B * n_head * q_h * q_w, dim) + # [q_t, B*H*q_h*q_w, dim] * [q_t, dim, k_t] = [q_t, B*H*q_h*q_w, k_t] -> [B*H*q_h*q_w, q_t, k_t] + rel_q_t = torch.matmul(r_q, Rt.transpose(1, 2)).transpose(0, 1) + # [B*H*q_h*q_w, q_t, k_t] -> [B, H, q_t, q_h, q_w, k_t] + rel_q_t = rel_q_t.view(B, n_head, q_h, q_w, q_t, k_t).permute(0, 1, 4, 2, 3, 5) + + # Combine rel pos. + rel_pos = ( + rel_h_q[:, :, :, :, :, None, :, None] + + rel_w_q[:, :, :, :, :, None, None, :] + + rel_q_t[:, :, :, :, :, :, None, None] + ).reshape(B, n_head, q_t * q_h * q_w, k_t * k_h * k_w) + + # Add it to attention + attn[:, :, 1:, 1:] += rel_pos + + return attn + + +def _add_shortcut(x: torch.Tensor, shortcut: torch.Tensor, residual_with_cls_embed: bool): + if residual_with_cls_embed: + x.add_(shortcut) + else: + x[:, :, 1:, :] += shortcut[:, :, 1:, :] + return x + + +torch.fx.wrap("_add_rel_pos") +torch.fx.wrap("_add_shortcut") + + +class MultiscaleAttention(nn.Module): + def __init__( + self, + input_size: List[int], + embed_dim: int, + output_dim: int, + num_heads: int, + kernel_q: List[int], + kernel_kv: List[int], + stride_q: List[int], + stride_kv: List[int], + residual_pool: bool, + residual_with_cls_embed: bool, + rel_pos_embed: bool, + dropout: float = 0.0, + norm_layer: Callable[..., nn.Module] = nn.LayerNorm, + ) -> None: + super().__init__() + self.embed_dim = embed_dim + self.output_dim = output_dim + self.num_heads = num_heads + self.head_dim = output_dim // num_heads + self.scaler = 1.0 / math.sqrt(self.head_dim) + self.residual_pool = residual_pool + self.residual_with_cls_embed = residual_with_cls_embed + + self.qkv = nn.Linear(embed_dim, 3 * output_dim) + layers: List[nn.Module] = [nn.Linear(output_dim, output_dim)] + if dropout > 0.0: + layers.append(nn.Dropout(dropout, inplace=True)) + self.project = nn.Sequential(*layers) + + self.pool_q: Optional[nn.Module] = None + if _prod(kernel_q) > 1 or _prod(stride_q) > 1: + padding_q = [int(q // 2) for q in kernel_q] + self.pool_q = Pool( + nn.Conv3d( + self.head_dim, + self.head_dim, + kernel_q, # type: ignore[arg-type] + stride=stride_q, # type: ignore[arg-type] + padding=padding_q, # type: ignore[arg-type] + groups=self.head_dim, + bias=False, + ), + norm_layer(self.head_dim), + ) + + self.pool_k: Optional[nn.Module] = None + self.pool_v: Optional[nn.Module] = None + if _prod(kernel_kv) > 1 or _prod(stride_kv) > 1: + padding_kv = [int(kv // 2) for kv in kernel_kv] + self.pool_k = Pool( + nn.Conv3d( + self.head_dim, + self.head_dim, + kernel_kv, # type: ignore[arg-type] + stride=stride_kv, # type: ignore[arg-type] + padding=padding_kv, # type: ignore[arg-type] + groups=self.head_dim, + bias=False, + ), + norm_layer(self.head_dim), + ) + self.pool_v = Pool( + nn.Conv3d( + self.head_dim, + self.head_dim, + kernel_kv, # type: ignore[arg-type] + stride=stride_kv, # type: ignore[arg-type] + padding=padding_kv, # type: ignore[arg-type] + groups=self.head_dim, + bias=False, + ), + norm_layer(self.head_dim), + ) + + self.rel_pos_h: Optional[nn.Parameter] = None + self.rel_pos_w: Optional[nn.Parameter] = None + self.rel_pos_t: Optional[nn.Parameter] = None + if rel_pos_embed: + size = max(input_size[1:]) + q_size = size // stride_q[1] if len(stride_q) > 0 else size + kv_size = size // stride_kv[1] if len(stride_kv) > 0 else size + spatial_dim = 2 * max(q_size, kv_size) - 1 + temporal_dim = 2 * input_size[0] - 1 + self.rel_pos_h = nn.Parameter(torch.zeros(spatial_dim, self.head_dim)) + self.rel_pos_w = nn.Parameter(torch.zeros(spatial_dim, self.head_dim)) + self.rel_pos_t = nn.Parameter(torch.zeros(temporal_dim, self.head_dim)) + nn.init.trunc_normal_(self.rel_pos_h, std=0.02) + nn.init.trunc_normal_(self.rel_pos_w, std=0.02) + nn.init.trunc_normal_(self.rel_pos_t, std=0.02) + + def forward(self, x: torch.Tensor, thw: Tuple[int, int, int]) -> Tuple[torch.Tensor, Tuple[int, int, int]]: + B, N, C = x.shape + q, k, v = self.qkv(x).reshape(B, N, 3, self.num_heads, self.head_dim).transpose(1, 3).unbind(dim=2) + + if self.pool_k is not None: + k, k_thw = self.pool_k(k, thw) + else: + k_thw = thw + if self.pool_v is not None: + v = self.pool_v(v, thw)[0] + if self.pool_q is not None: + q, thw = self.pool_q(q, thw) + + attn = torch.matmul(self.scaler * q, k.transpose(2, 3)) + if self.rel_pos_h is not None and self.rel_pos_w is not None and self.rel_pos_t is not None: + attn = _add_rel_pos( + attn, + q, + thw, + k_thw, + self.rel_pos_h, + self.rel_pos_w, + self.rel_pos_t, + ) + attn = attn.softmax(dim=-1) + + x = torch.matmul(attn, v) + if self.residual_pool: + _add_shortcut(x, q, self.residual_with_cls_embed) + x = x.transpose(1, 2).reshape(B, -1, self.output_dim) + x = self.project(x) + + return x, thw + + +class MultiscaleBlock(nn.Module): + def __init__( + self, + input_size: List[int], + cnf: MSBlockConfig, + residual_pool: bool, + residual_with_cls_embed: bool, + rel_pos_embed: bool, + proj_after_attn: bool, + dropout: float = 0.0, + stochastic_depth_prob: float = 0.0, + norm_layer: Callable[..., nn.Module] = nn.LayerNorm, + ) -> None: + super().__init__() + self.proj_after_attn = proj_after_attn + + self.pool_skip: Optional[nn.Module] = None + if _prod(cnf.stride_q) > 1: + kernel_skip = [s + 1 if s > 1 else s for s in cnf.stride_q] + padding_skip = [int(k // 2) for k in kernel_skip] + self.pool_skip = Pool( + nn.MaxPool3d(kernel_skip, stride=cnf.stride_q, padding=padding_skip), None # type: ignore[arg-type] + ) + + attn_dim = cnf.output_channels if proj_after_attn else cnf.input_channels + + self.norm1 = norm_layer(cnf.input_channels) + self.norm2 = norm_layer(attn_dim) + self.needs_transposal = isinstance(self.norm1, nn.BatchNorm1d) + + self.attn = MultiscaleAttention( + input_size, + cnf.input_channels, + attn_dim, + cnf.num_heads, + kernel_q=cnf.kernel_q, + kernel_kv=cnf.kernel_kv, + stride_q=cnf.stride_q, + stride_kv=cnf.stride_kv, + rel_pos_embed=rel_pos_embed, + residual_pool=residual_pool, + residual_with_cls_embed=residual_with_cls_embed, + dropout=dropout, + norm_layer=norm_layer, + ) + self.mlp = MLP( + attn_dim, + [4 * attn_dim, cnf.output_channels], + activation_layer=nn.GELU, + dropout=dropout, + inplace=None, + ) + + self.stochastic_depth = StochasticDepth(stochastic_depth_prob, "row") + + self.project: Optional[nn.Module] = None + if cnf.input_channels != cnf.output_channels: + self.project = nn.Linear(cnf.input_channels, cnf.output_channels) + + def forward(self, x: torch.Tensor, thw: Tuple[int, int, int]) -> Tuple[torch.Tensor, Tuple[int, int, int]]: + x_norm1 = self.norm1(x.transpose(1, 2)).transpose(1, 2) if self.needs_transposal else self.norm1(x) + x_attn, thw_new = self.attn(x_norm1, thw) + x = x if self.project is None or not self.proj_after_attn else self.project(x_norm1) + x_skip = x if self.pool_skip is None else self.pool_skip(x, thw)[0] + x = x_skip + self.stochastic_depth(x_attn) + + x_norm2 = self.norm2(x.transpose(1, 2)).transpose(1, 2) if self.needs_transposal else self.norm2(x) + x_proj = x if self.project is None or self.proj_after_attn else self.project(x_norm2) + + return x_proj + self.stochastic_depth(self.mlp(x_norm2)), thw_new + + +class PositionalEncoding(nn.Module): + def __init__(self, embed_size: int, spatial_size: Tuple[int, int], temporal_size: int, rel_pos_embed: bool) -> None: + super().__init__() + self.spatial_size = spatial_size + self.temporal_size = temporal_size + + self.class_token = nn.Parameter(torch.zeros(embed_size)) + self.spatial_pos: Optional[nn.Parameter] = None + self.temporal_pos: Optional[nn.Parameter] = None + self.class_pos: Optional[nn.Parameter] = None + if not rel_pos_embed: + self.spatial_pos = nn.Parameter(torch.zeros(self.spatial_size[0] * self.spatial_size[1], embed_size)) + self.temporal_pos = nn.Parameter(torch.zeros(self.temporal_size, embed_size)) + self.class_pos = nn.Parameter(torch.zeros(embed_size)) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + class_token = self.class_token.expand(x.size(0), -1).unsqueeze(1) + x = torch.cat((class_token, x), dim=1) + + if self.spatial_pos is not None and self.temporal_pos is not None and self.class_pos is not None: + hw_size, embed_size = self.spatial_pos.shape + pos_embedding = torch.repeat_interleave(self.temporal_pos, hw_size, dim=0) + pos_embedding.add_(self.spatial_pos.unsqueeze(0).expand(self.temporal_size, -1, -1).reshape(-1, embed_size)) + pos_embedding = torch.cat((self.class_pos.unsqueeze(0), pos_embedding), dim=0).unsqueeze(0) + x.add_(pos_embedding) + + return x + + +class MViT(nn.Module): + def __init__( + self, + spatial_size: Tuple[int, int], + temporal_size: int, + block_setting: Sequence[MSBlockConfig], + residual_pool: bool, + residual_with_cls_embed: bool, + rel_pos_embed: bool, + proj_after_attn: bool, + dropout: float = 0.5, + attention_dropout: float = 0.0, + stochastic_depth_prob: float = 0.0, + num_classes: int = 400, + block: Optional[Callable[..., nn.Module]] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + patch_embed_kernel: Tuple[int, int, int] = (3, 7, 7), + patch_embed_stride: Tuple[int, int, int] = (2, 4, 4), + patch_embed_padding: Tuple[int, int, int] = (1, 3, 3), + ) -> None: + """ + MViT main class. + + Args: + spatial_size (tuple of ints): The spacial size of the input as ``(H, W)``. + temporal_size (int): The temporal size ``T`` of the input. + block_setting (sequence of MSBlockConfig): The Network structure. + residual_pool (bool): If True, use MViTv2 pooling residual connection. + residual_with_cls_embed (bool): If True, the addition on the residual connection will include + the class embedding. + rel_pos_embed (bool): If True, use MViTv2's relative positional embeddings. + proj_after_attn (bool): If True, apply the projection after the attention. + dropout (float): Dropout rate. Default: 0.0. + attention_dropout (float): Attention dropout rate. Default: 0.0. + stochastic_depth_prob: (float): Stochastic depth rate. Default: 0.0. + num_classes (int): The number of classes. + block (callable, optional): Module specifying the layer which consists of the attention and mlp. + norm_layer (callable, optional): Module specifying the normalization layer to use. + patch_embed_kernel (tuple of ints): The kernel of the convolution that patchifies the input. + patch_embed_stride (tuple of ints): The stride of the convolution that patchifies the input. + patch_embed_padding (tuple of ints): The padding of the convolution that patchifies the input. + """ + super().__init__() + # This implementation employs a different parameterization scheme than the one used at PyTorch Video: + # https://github.com/facebookresearch/pytorchvideo/blob/718d0a4/pytorchvideo/models/vision_transformers.py + # We remove any experimental configuration that didn't make it to the final variants of the models. To represent + # the configuration of the architecture we use the simplified form suggested at Table 1 of the paper. + _log_api_usage_once(self) + total_stage_blocks = len(block_setting) + if total_stage_blocks == 0: + raise ValueError("The configuration parameter can't be empty.") + + if block is None: + block = MultiscaleBlock + + if norm_layer is None: + norm_layer = partial(nn.LayerNorm, eps=1e-6) + + # Patch Embedding module + self.conv_proj = nn.Conv3d( + in_channels=3, + out_channels=block_setting[0].input_channels, + kernel_size=patch_embed_kernel, + stride=patch_embed_stride, + padding=patch_embed_padding, + ) + + input_size = [size // stride for size, stride in zip((temporal_size,) + spatial_size, self.conv_proj.stride)] + + # Spatio-Temporal Class Positional Encoding + self.pos_encoding = PositionalEncoding( + embed_size=block_setting[0].input_channels, + spatial_size=(input_size[1], input_size[2]), + temporal_size=input_size[0], + rel_pos_embed=rel_pos_embed, + ) + + # Encoder module + self.blocks = nn.ModuleList() + for stage_block_id, cnf in enumerate(block_setting): + # adjust stochastic depth probability based on the depth of the stage block + sd_prob = stochastic_depth_prob * stage_block_id / (total_stage_blocks - 1.0) + + self.blocks.append( + block( + input_size=input_size, + cnf=cnf, + residual_pool=residual_pool, + residual_with_cls_embed=residual_with_cls_embed, + rel_pos_embed=rel_pos_embed, + proj_after_attn=proj_after_attn, + dropout=attention_dropout, + stochastic_depth_prob=sd_prob, + norm_layer=norm_layer, + ) + ) + + if len(cnf.stride_q) > 0: + input_size = [size // stride for size, stride in zip(input_size, cnf.stride_q)] + self.norm = norm_layer(block_setting[-1].output_channels) + + # Classifier module + self.head = nn.Sequential( + nn.Dropout(dropout, inplace=True), + nn.Linear(block_setting[-1].output_channels, num_classes), + ) + + for m in self.modules(): + if isinstance(m, nn.Linear): + nn.init.trunc_normal_(m.weight, std=0.02) + if isinstance(m, nn.Linear) and m.bias is not None: + nn.init.constant_(m.bias, 0.0) + elif isinstance(m, nn.LayerNorm): + if m.weight is not None: + nn.init.constant_(m.weight, 1.0) + if m.bias is not None: + nn.init.constant_(m.bias, 0.0) + elif isinstance(m, PositionalEncoding): + for weights in m.parameters(): + nn.init.trunc_normal_(weights, std=0.02) + + def forward(self, x: torch.Tensor) -> torch.Tensor: + # Convert if necessary (B, C, H, W) -> (B, C, 1, H, W) + x = _unsqueeze(x, 5, 2)[0] + # patchify and reshape: (B, C, T, H, W) -> (B, embed_channels[0], T', H', W') -> (B, THW', embed_channels[0]) + x = self.conv_proj(x) + x = x.flatten(2).transpose(1, 2) + + # add positional encoding + x = self.pos_encoding(x) + + # pass patches through the encoder + thw = (self.pos_encoding.temporal_size,) + self.pos_encoding.spatial_size + for block in self.blocks: + x, thw = block(x, thw) + x = self.norm(x) + + # classifier "token" as used by standard language architectures + x = x[:, 0] + x = self.head(x) + + return x + + +def _mvit( + block_setting: List[MSBlockConfig], + stochastic_depth_prob: float, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> MViT: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + assert weights.meta["min_size"][0] == weights.meta["min_size"][1] + _ovewrite_named_param(kwargs, "spatial_size", weights.meta["min_size"]) + _ovewrite_named_param(kwargs, "temporal_size", weights.meta["min_temporal_size"]) + spatial_size = kwargs.pop("spatial_size", (224, 224)) + temporal_size = kwargs.pop("temporal_size", 16) + + model = MViT( + spatial_size=spatial_size, + temporal_size=temporal_size, + block_setting=block_setting, + residual_pool=kwargs.pop("residual_pool", False), + residual_with_cls_embed=kwargs.pop("residual_with_cls_embed", True), + rel_pos_embed=kwargs.pop("rel_pos_embed", False), + proj_after_attn=kwargs.pop("proj_after_attn", False), + stochastic_depth_prob=stochastic_depth_prob, + **kwargs, + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +class MViT_V1_B_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/mvit_v1_b-dbeb1030.pth", + transforms=partial( + VideoClassification, + crop_size=(224, 224), + resize_size=(256,), + mean=(0.45, 0.45, 0.45), + std=(0.225, 0.225, 0.225), + ), + meta={ + "min_size": (224, 224), + "min_temporal_size": 16, + "categories": _KINETICS400_CATEGORIES, + "recipe": "https://github.com/facebookresearch/pytorchvideo/blob/main/docs/source/model_zoo.md", + "_docs": ( + "The weights were ported from the paper. The accuracies are estimated on video-level " + "with parameters `frame_rate=7.5`, `clips_per_video=5`, and `clip_len=16`" + ), + "num_params": 36610672, + "_metrics": { + "Kinetics-400": { + "acc@1": 78.477, + "acc@5": 93.582, + } + }, + "_ops": 70.599, + "_file_size": 139.764, + }, + ) + DEFAULT = KINETICS400_V1 + + +class MViT_V2_S_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/mvit_v2_s-ae3be167.pth", + transforms=partial( + VideoClassification, + crop_size=(224, 224), + resize_size=(256,), + mean=(0.45, 0.45, 0.45), + std=(0.225, 0.225, 0.225), + ), + meta={ + "min_size": (224, 224), + "min_temporal_size": 16, + "categories": _KINETICS400_CATEGORIES, + "recipe": "https://github.com/facebookresearch/SlowFast/blob/main/MODEL_ZOO.md", + "_docs": ( + "The weights were ported from the paper. The accuracies are estimated on video-level " + "with parameters `frame_rate=7.5`, `clips_per_video=5`, and `clip_len=16`" + ), + "num_params": 34537744, + "_metrics": { + "Kinetics-400": { + "acc@1": 80.757, + "acc@5": 94.665, + } + }, + "_ops": 64.224, + "_file_size": 131.884, + }, + ) + DEFAULT = KINETICS400_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MViT_V1_B_Weights.KINETICS400_V1)) +def mvit_v1_b(*, weights: Optional[MViT_V1_B_Weights] = None, progress: bool = True, **kwargs: Any) -> MViT: + """ + Constructs a base MViTV1 architecture from + `Multiscale Vision Transformers `__. + + .. betastatus:: video module + + Args: + weights (:class:`~torchvision.models.video.MViT_V1_B_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.MViT_V1_B_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.MViT`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.MViT_V1_B_Weights + :members: + """ + weights = MViT_V1_B_Weights.verify(weights) + + config: Dict[str, List] = { + "num_heads": [1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8], + "input_channels": [96, 192, 192, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 768, 768], + "output_channels": [192, 192, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 768, 768, 768], + "kernel_q": [[], [3, 3, 3], [], [3, 3, 3], [], [], [], [], [], [], [], [], [], [], [3, 3, 3], []], + "kernel_kv": [ + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + ], + "stride_q": [[], [1, 2, 2], [], [1, 2, 2], [], [], [], [], [], [], [], [], [], [], [1, 2, 2], []], + "stride_kv": [ + [1, 8, 8], + [1, 4, 4], + [1, 4, 4], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 1, 1], + [1, 1, 1], + ], + } + + block_setting = [] + for i in range(len(config["num_heads"])): + block_setting.append( + MSBlockConfig( + num_heads=config["num_heads"][i], + input_channels=config["input_channels"][i], + output_channels=config["output_channels"][i], + kernel_q=config["kernel_q"][i], + kernel_kv=config["kernel_kv"][i], + stride_q=config["stride_q"][i], + stride_kv=config["stride_kv"][i], + ) + ) + + return _mvit( + spatial_size=(224, 224), + temporal_size=16, + block_setting=block_setting, + residual_pool=False, + residual_with_cls_embed=False, + stochastic_depth_prob=kwargs.pop("stochastic_depth_prob", 0.2), + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MViT_V2_S_Weights.KINETICS400_V1)) +def mvit_v2_s(*, weights: Optional[MViT_V2_S_Weights] = None, progress: bool = True, **kwargs: Any) -> MViT: + """Constructs a small MViTV2 architecture from + `Multiscale Vision Transformers `__ and + `MViTv2: Improved Multiscale Vision Transformers for Classification + and Detection `__. + + .. betastatus:: video module + + Args: + weights (:class:`~torchvision.models.video.MViT_V2_S_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.MViT_V2_S_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.MViT`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.MViT_V2_S_Weights + :members: + """ + weights = MViT_V2_S_Weights.verify(weights) + + config: Dict[str, List] = { + "num_heads": [1, 2, 2, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8], + "input_channels": [96, 96, 192, 192, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 768], + "output_channels": [96, 192, 192, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 384, 768, 768], + "kernel_q": [ + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + ], + "kernel_kv": [ + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + [3, 3, 3], + ], + "stride_q": [ + [1, 1, 1], + [1, 2, 2], + [1, 1, 1], + [1, 2, 2], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 1, 1], + [1, 2, 2], + [1, 1, 1], + ], + "stride_kv": [ + [1, 8, 8], + [1, 4, 4], + [1, 4, 4], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 2, 2], + [1, 1, 1], + [1, 1, 1], + ], + } + + block_setting = [] + for i in range(len(config["num_heads"])): + block_setting.append( + MSBlockConfig( + num_heads=config["num_heads"][i], + input_channels=config["input_channels"][i], + output_channels=config["output_channels"][i], + kernel_q=config["kernel_q"][i], + kernel_kv=config["kernel_kv"][i], + stride_q=config["stride_q"][i], + stride_kv=config["stride_kv"][i], + ) + ) + + return _mvit( + spatial_size=(224, 224), + temporal_size=16, + block_setting=block_setting, + residual_pool=True, + residual_with_cls_embed=False, + rel_pos_embed=True, + proj_after_attn=True, + stochastic_depth_prob=kwargs.pop("stochastic_depth_prob", 0.2), + weights=weights, + progress=progress, + **kwargs, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/resnet.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/resnet.py new file mode 100644 index 0000000000000000000000000000000000000000..183bf16445d8b3c0ecf4d1d721d3844bdd1a8aed --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/resnet.py @@ -0,0 +1,503 @@ +from functools import partial +from typing import Any, Callable, List, Optional, Sequence, Tuple, Type, Union + +import torch.nn as nn +from torch import Tensor + +from ...transforms._presets import VideoClassification +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._meta import _KINETICS400_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "VideoResNet", + "R3D_18_Weights", + "MC3_18_Weights", + "R2Plus1D_18_Weights", + "r3d_18", + "mc3_18", + "r2plus1d_18", +] + + +class Conv3DSimple(nn.Conv3d): + def __init__( + self, in_planes: int, out_planes: int, midplanes: Optional[int] = None, stride: int = 1, padding: int = 1 + ) -> None: + + super().__init__( + in_channels=in_planes, + out_channels=out_planes, + kernel_size=(3, 3, 3), + stride=stride, + padding=padding, + bias=False, + ) + + @staticmethod + def get_downsample_stride(stride: int) -> Tuple[int, int, int]: + return stride, stride, stride + + +class Conv2Plus1D(nn.Sequential): + def __init__(self, in_planes: int, out_planes: int, midplanes: int, stride: int = 1, padding: int = 1) -> None: + super().__init__( + nn.Conv3d( + in_planes, + midplanes, + kernel_size=(1, 3, 3), + stride=(1, stride, stride), + padding=(0, padding, padding), + bias=False, + ), + nn.BatchNorm3d(midplanes), + nn.ReLU(inplace=True), + nn.Conv3d( + midplanes, out_planes, kernel_size=(3, 1, 1), stride=(stride, 1, 1), padding=(padding, 0, 0), bias=False + ), + ) + + @staticmethod + def get_downsample_stride(stride: int) -> Tuple[int, int, int]: + return stride, stride, stride + + +class Conv3DNoTemporal(nn.Conv3d): + def __init__( + self, in_planes: int, out_planes: int, midplanes: Optional[int] = None, stride: int = 1, padding: int = 1 + ) -> None: + + super().__init__( + in_channels=in_planes, + out_channels=out_planes, + kernel_size=(1, 3, 3), + stride=(1, stride, stride), + padding=(0, padding, padding), + bias=False, + ) + + @staticmethod + def get_downsample_stride(stride: int) -> Tuple[int, int, int]: + return 1, stride, stride + + +class BasicBlock(nn.Module): + + expansion = 1 + + def __init__( + self, + inplanes: int, + planes: int, + conv_builder: Callable[..., nn.Module], + stride: int = 1, + downsample: Optional[nn.Module] = None, + ) -> None: + midplanes = (inplanes * planes * 3 * 3 * 3) // (inplanes * 3 * 3 + 3 * planes) + + super().__init__() + self.conv1 = nn.Sequential( + conv_builder(inplanes, planes, midplanes, stride), nn.BatchNorm3d(planes), nn.ReLU(inplace=True) + ) + self.conv2 = nn.Sequential(conv_builder(planes, planes, midplanes), nn.BatchNorm3d(planes)) + self.relu = nn.ReLU(inplace=True) + self.downsample = downsample + self.stride = stride + + def forward(self, x: Tensor) -> Tensor: + residual = x + + out = self.conv1(x) + out = self.conv2(out) + if self.downsample is not None: + residual = self.downsample(x) + + out += residual + out = self.relu(out) + + return out + + +class Bottleneck(nn.Module): + expansion = 4 + + def __init__( + self, + inplanes: int, + planes: int, + conv_builder: Callable[..., nn.Module], + stride: int = 1, + downsample: Optional[nn.Module] = None, + ) -> None: + + super().__init__() + midplanes = (inplanes * planes * 3 * 3 * 3) // (inplanes * 3 * 3 + 3 * planes) + + # 1x1x1 + self.conv1 = nn.Sequential( + nn.Conv3d(inplanes, planes, kernel_size=1, bias=False), nn.BatchNorm3d(planes), nn.ReLU(inplace=True) + ) + # Second kernel + self.conv2 = nn.Sequential( + conv_builder(planes, planes, midplanes, stride), nn.BatchNorm3d(planes), nn.ReLU(inplace=True) + ) + + # 1x1x1 + self.conv3 = nn.Sequential( + nn.Conv3d(planes, planes * self.expansion, kernel_size=1, bias=False), + nn.BatchNorm3d(planes * self.expansion), + ) + self.relu = nn.ReLU(inplace=True) + self.downsample = downsample + self.stride = stride + + def forward(self, x: Tensor) -> Tensor: + residual = x + + out = self.conv1(x) + out = self.conv2(out) + out = self.conv3(out) + + if self.downsample is not None: + residual = self.downsample(x) + + out += residual + out = self.relu(out) + + return out + + +class BasicStem(nn.Sequential): + """The default conv-batchnorm-relu stem""" + + def __init__(self) -> None: + super().__init__( + nn.Conv3d(3, 64, kernel_size=(3, 7, 7), stride=(1, 2, 2), padding=(1, 3, 3), bias=False), + nn.BatchNorm3d(64), + nn.ReLU(inplace=True), + ) + + +class R2Plus1dStem(nn.Sequential): + """R(2+1)D stem is different than the default one as it uses separated 3D convolution""" + + def __init__(self) -> None: + super().__init__( + nn.Conv3d(3, 45, kernel_size=(1, 7, 7), stride=(1, 2, 2), padding=(0, 3, 3), bias=False), + nn.BatchNorm3d(45), + nn.ReLU(inplace=True), + nn.Conv3d(45, 64, kernel_size=(3, 1, 1), stride=(1, 1, 1), padding=(1, 0, 0), bias=False), + nn.BatchNorm3d(64), + nn.ReLU(inplace=True), + ) + + +class VideoResNet(nn.Module): + def __init__( + self, + block: Type[Union[BasicBlock, Bottleneck]], + conv_makers: Sequence[Type[Union[Conv3DSimple, Conv3DNoTemporal, Conv2Plus1D]]], + layers: List[int], + stem: Callable[..., nn.Module], + num_classes: int = 400, + zero_init_residual: bool = False, + ) -> None: + """Generic resnet video generator. + + Args: + block (Type[Union[BasicBlock, Bottleneck]]): resnet building block + conv_makers (List[Type[Union[Conv3DSimple, Conv3DNoTemporal, Conv2Plus1D]]]): generator + function for each layer + layers (List[int]): number of blocks per layer + stem (Callable[..., nn.Module]): module specifying the ResNet stem. + num_classes (int, optional): Dimension of the final FC layer. Defaults to 400. + zero_init_residual (bool, optional): Zero init bottleneck residual BN. Defaults to False. + """ + super().__init__() + _log_api_usage_once(self) + self.inplanes = 64 + + self.stem = stem() + + self.layer1 = self._make_layer(block, conv_makers[0], 64, layers[0], stride=1) + self.layer2 = self._make_layer(block, conv_makers[1], 128, layers[1], stride=2) + self.layer3 = self._make_layer(block, conv_makers[2], 256, layers[2], stride=2) + self.layer4 = self._make_layer(block, conv_makers[3], 512, layers[3], stride=2) + + self.avgpool = nn.AdaptiveAvgPool3d((1, 1, 1)) + self.fc = nn.Linear(512 * block.expansion, num_classes) + + # init weights + for m in self.modules(): + if isinstance(m, nn.Conv3d): + nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu") + if m.bias is not None: + nn.init.constant_(m.bias, 0) + elif isinstance(m, nn.BatchNorm3d): + nn.init.constant_(m.weight, 1) + nn.init.constant_(m.bias, 0) + elif isinstance(m, nn.Linear): + nn.init.normal_(m.weight, 0, 0.01) + nn.init.constant_(m.bias, 0) + + if zero_init_residual: + for m in self.modules(): + if isinstance(m, Bottleneck): + nn.init.constant_(m.bn3.weight, 0) # type: ignore[union-attr, arg-type] + + def forward(self, x: Tensor) -> Tensor: + x = self.stem(x) + + x = self.layer1(x) + x = self.layer2(x) + x = self.layer3(x) + x = self.layer4(x) + + x = self.avgpool(x) + # Flatten the layer to fc + x = x.flatten(1) + x = self.fc(x) + + return x + + def _make_layer( + self, + block: Type[Union[BasicBlock, Bottleneck]], + conv_builder: Type[Union[Conv3DSimple, Conv3DNoTemporal, Conv2Plus1D]], + planes: int, + blocks: int, + stride: int = 1, + ) -> nn.Sequential: + downsample = None + + if stride != 1 or self.inplanes != planes * block.expansion: + ds_stride = conv_builder.get_downsample_stride(stride) + downsample = nn.Sequential( + nn.Conv3d(self.inplanes, planes * block.expansion, kernel_size=1, stride=ds_stride, bias=False), + nn.BatchNorm3d(planes * block.expansion), + ) + layers = [] + layers.append(block(self.inplanes, planes, conv_builder, stride, downsample)) + + self.inplanes = planes * block.expansion + for i in range(1, blocks): + layers.append(block(self.inplanes, planes, conv_builder)) + + return nn.Sequential(*layers) + + +def _video_resnet( + block: Type[Union[BasicBlock, Bottleneck]], + conv_makers: Sequence[Type[Union[Conv3DSimple, Conv3DNoTemporal, Conv2Plus1D]]], + layers: List[int], + stem: Callable[..., nn.Module], + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> VideoResNet: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = VideoResNet(block, conv_makers, layers, stem, **kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "min_size": (1, 1), + "categories": _KINETICS400_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/tree/main/references/video_classification", + "_docs": ( + "The weights reproduce closely the accuracy of the paper. The accuracies are estimated on video-level " + "with parameters `frame_rate=15`, `clips_per_video=5`, and `clip_len=16`." + ), +} + + +class R3D_18_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/r3d_18-b3b3357e.pth", + transforms=partial(VideoClassification, crop_size=(112, 112), resize_size=(128, 171)), + meta={ + **_COMMON_META, + "num_params": 33371472, + "_metrics": { + "Kinetics-400": { + "acc@1": 63.200, + "acc@5": 83.479, + } + }, + "_ops": 40.697, + "_file_size": 127.359, + }, + ) + DEFAULT = KINETICS400_V1 + + +class MC3_18_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/mc3_18-a90a0ba3.pth", + transforms=partial(VideoClassification, crop_size=(112, 112), resize_size=(128, 171)), + meta={ + **_COMMON_META, + "num_params": 11695440, + "_metrics": { + "Kinetics-400": { + "acc@1": 63.960, + "acc@5": 84.130, + } + }, + "_ops": 43.343, + "_file_size": 44.672, + }, + ) + DEFAULT = KINETICS400_V1 + + +class R2Plus1D_18_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/r2plus1d_18-91a641e6.pth", + transforms=partial(VideoClassification, crop_size=(112, 112), resize_size=(128, 171)), + meta={ + **_COMMON_META, + "num_params": 31505325, + "_metrics": { + "Kinetics-400": { + "acc@1": 67.463, + "acc@5": 86.175, + } + }, + "_ops": 40.519, + "_file_size": 120.318, + }, + ) + DEFAULT = KINETICS400_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", R3D_18_Weights.KINETICS400_V1)) +def r3d_18(*, weights: Optional[R3D_18_Weights] = None, progress: bool = True, **kwargs: Any) -> VideoResNet: + """Construct 18 layer Resnet3D model. + + .. betastatus:: video module + + Reference: `A Closer Look at Spatiotemporal Convolutions for Action Recognition `__. + + Args: + weights (:class:`~torchvision.models.video.R3D_18_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.R3D_18_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.resnet.VideoResNet`` base class. + Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.R3D_18_Weights + :members: + """ + weights = R3D_18_Weights.verify(weights) + + return _video_resnet( + BasicBlock, + [Conv3DSimple] * 4, + [2, 2, 2, 2], + BasicStem, + weights, + progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", MC3_18_Weights.KINETICS400_V1)) +def mc3_18(*, weights: Optional[MC3_18_Weights] = None, progress: bool = True, **kwargs: Any) -> VideoResNet: + """Construct 18 layer Mixed Convolution network as in + + .. betastatus:: video module + + Reference: `A Closer Look at Spatiotemporal Convolutions for Action Recognition `__. + + Args: + weights (:class:`~torchvision.models.video.MC3_18_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.MC3_18_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.resnet.VideoResNet`` base class. + Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.MC3_18_Weights + :members: + """ + weights = MC3_18_Weights.verify(weights) + + return _video_resnet( + BasicBlock, + [Conv3DSimple] + [Conv3DNoTemporal] * 3, # type: ignore[list-item] + [2, 2, 2, 2], + BasicStem, + weights, + progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", R2Plus1D_18_Weights.KINETICS400_V1)) +def r2plus1d_18(*, weights: Optional[R2Plus1D_18_Weights] = None, progress: bool = True, **kwargs: Any) -> VideoResNet: + """Construct 18 layer deep R(2+1)D network as in + + .. betastatus:: video module + + Reference: `A Closer Look at Spatiotemporal Convolutions for Action Recognition `__. + + Args: + weights (:class:`~torchvision.models.video.R2Plus1D_18_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.R2Plus1D_18_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.resnet.VideoResNet`` base class. + Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.R2Plus1D_18_Weights + :members: + """ + weights = R2Plus1D_18_Weights.verify(weights) + + return _video_resnet( + BasicBlock, + [Conv2Plus1D] * 4, + [2, 2, 2, 2], + R2Plus1dStem, + weights, + progress, + **kwargs, + ) + + +# The dictionary below is internal implementation detail and will be removed in v0.15 +from .._utils import _ModelURLs + + +model_urls = _ModelURLs( + { + "r3d_18": R3D_18_Weights.KINETICS400_V1.url, + "mc3_18": MC3_18_Weights.KINETICS400_V1.url, + "r2plus1d_18": R2Plus1D_18_Weights.KINETICS400_V1.url, + } +) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/s3d.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/s3d.py new file mode 100644 index 0000000000000000000000000000000000000000..e95582302a91842dd073daf2c93a86285ab8af4d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/s3d.py @@ -0,0 +1,219 @@ +from functools import partial +from typing import Any, Callable, Optional + +import torch +from torch import nn +from torchvision.ops.misc import Conv3dNormActivation + +from ...transforms._presets import VideoClassification +from ...utils import _log_api_usage_once +from .._api import register_model, Weights, WeightsEnum +from .._meta import _KINETICS400_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "S3D", + "S3D_Weights", + "s3d", +] + + +class TemporalSeparableConv(nn.Sequential): + def __init__( + self, + in_planes: int, + out_planes: int, + kernel_size: int, + stride: int, + padding: int, + norm_layer: Callable[..., nn.Module], + ): + super().__init__( + Conv3dNormActivation( + in_planes, + out_planes, + kernel_size=(1, kernel_size, kernel_size), + stride=(1, stride, stride), + padding=(0, padding, padding), + bias=False, + norm_layer=norm_layer, + ), + Conv3dNormActivation( + out_planes, + out_planes, + kernel_size=(kernel_size, 1, 1), + stride=(stride, 1, 1), + padding=(padding, 0, 0), + bias=False, + norm_layer=norm_layer, + ), + ) + + +class SepInceptionBlock3D(nn.Module): + def __init__( + self, + in_planes: int, + b0_out: int, + b1_mid: int, + b1_out: int, + b2_mid: int, + b2_out: int, + b3_out: int, + norm_layer: Callable[..., nn.Module], + ): + super().__init__() + + self.branch0 = Conv3dNormActivation(in_planes, b0_out, kernel_size=1, stride=1, norm_layer=norm_layer) + self.branch1 = nn.Sequential( + Conv3dNormActivation(in_planes, b1_mid, kernel_size=1, stride=1, norm_layer=norm_layer), + TemporalSeparableConv(b1_mid, b1_out, kernel_size=3, stride=1, padding=1, norm_layer=norm_layer), + ) + self.branch2 = nn.Sequential( + Conv3dNormActivation(in_planes, b2_mid, kernel_size=1, stride=1, norm_layer=norm_layer), + TemporalSeparableConv(b2_mid, b2_out, kernel_size=3, stride=1, padding=1, norm_layer=norm_layer), + ) + self.branch3 = nn.Sequential( + nn.MaxPool3d(kernel_size=(3, 3, 3), stride=1, padding=1), + Conv3dNormActivation(in_planes, b3_out, kernel_size=1, stride=1, norm_layer=norm_layer), + ) + + def forward(self, x): + x0 = self.branch0(x) + x1 = self.branch1(x) + x2 = self.branch2(x) + x3 = self.branch3(x) + out = torch.cat((x0, x1, x2, x3), 1) + + return out + + +class S3D(nn.Module): + """S3D main class. + + Args: + num_class (int): number of classes for the classification task. + dropout (float): dropout probability. + norm_layer (Optional[Callable]): Module specifying the normalization layer to use. + + Inputs: + x (Tensor): batch of videos with dimensions (batch, channel, time, height, width) + """ + + def __init__( + self, + num_classes: int = 400, + dropout: float = 0.2, + norm_layer: Optional[Callable[..., torch.nn.Module]] = None, + ) -> None: + super().__init__() + _log_api_usage_once(self) + + if norm_layer is None: + norm_layer = partial(nn.BatchNorm3d, eps=0.001, momentum=0.001) + + self.features = nn.Sequential( + TemporalSeparableConv(3, 64, 7, 2, 3, norm_layer), + nn.MaxPool3d(kernel_size=(1, 3, 3), stride=(1, 2, 2), padding=(0, 1, 1)), + Conv3dNormActivation( + 64, + 64, + kernel_size=1, + stride=1, + norm_layer=norm_layer, + ), + TemporalSeparableConv(64, 192, 3, 1, 1, norm_layer), + nn.MaxPool3d(kernel_size=(1, 3, 3), stride=(1, 2, 2), padding=(0, 1, 1)), + SepInceptionBlock3D(192, 64, 96, 128, 16, 32, 32, norm_layer), + SepInceptionBlock3D(256, 128, 128, 192, 32, 96, 64, norm_layer), + nn.MaxPool3d(kernel_size=(3, 3, 3), stride=(2, 2, 2), padding=(1, 1, 1)), + SepInceptionBlock3D(480, 192, 96, 208, 16, 48, 64, norm_layer), + SepInceptionBlock3D(512, 160, 112, 224, 24, 64, 64, norm_layer), + SepInceptionBlock3D(512, 128, 128, 256, 24, 64, 64, norm_layer), + SepInceptionBlock3D(512, 112, 144, 288, 32, 64, 64, norm_layer), + SepInceptionBlock3D(528, 256, 160, 320, 32, 128, 128, norm_layer), + nn.MaxPool3d(kernel_size=(2, 2, 2), stride=(2, 2, 2), padding=(0, 0, 0)), + SepInceptionBlock3D(832, 256, 160, 320, 32, 128, 128, norm_layer), + SepInceptionBlock3D(832, 384, 192, 384, 48, 128, 128, norm_layer), + ) + self.avgpool = nn.AvgPool3d(kernel_size=(2, 7, 7), stride=1) + self.classifier = nn.Sequential( + nn.Dropout(p=dropout), + nn.Conv3d(1024, num_classes, kernel_size=1, stride=1, bias=True), + ) + + def forward(self, x): + x = self.features(x) + x = self.avgpool(x) + x = self.classifier(x) + x = torch.mean(x, dim=(2, 3, 4)) + return x + + +class S3D_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/s3d-d76dad2f.pth", + transforms=partial( + VideoClassification, + crop_size=(224, 224), + resize_size=(256, 256), + ), + meta={ + "min_size": (224, 224), + "min_temporal_size": 14, + "categories": _KINETICS400_CATEGORIES, + "recipe": "https://github.com/pytorch/vision/tree/main/references/video_classification#s3d", + "_docs": ( + "The weights aim to approximate the accuracy of the paper. The accuracies are estimated on clip-level " + "with parameters `frame_rate=15`, `clips_per_video=1`, and `clip_len=128`." + ), + "num_params": 8320048, + "_metrics": { + "Kinetics-400": { + "acc@1": 68.368, + "acc@5": 88.050, + } + }, + "_ops": 17.979, + "_file_size": 31.972, + }, + ) + DEFAULT = KINETICS400_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", S3D_Weights.KINETICS400_V1)) +def s3d(*, weights: Optional[S3D_Weights] = None, progress: bool = True, **kwargs: Any) -> S3D: + """Construct Separable 3D CNN model. + + Reference: `Rethinking Spatiotemporal Feature Learning `__. + + .. betastatus:: video module + + Args: + weights (:class:`~torchvision.models.video.S3D_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.S3D_Weights` + below for more details, and possible values. By default, no + pre-trained weights are used. + progress (bool): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.S3D`` base class. + Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.S3D_Weights + :members: + """ + weights = S3D_Weights.verify(weights) + + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = S3D(**kwargs) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/swin_transformer.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/swin_transformer.py new file mode 100644 index 0000000000000000000000000000000000000000..16281e6a283c54772cf653d21f8935ba7be2f4b9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/video/swin_transformer.py @@ -0,0 +1,743 @@ +# Modified from 2d Swin Transformers in torchvision: +# https://github.com/pytorch/vision/blob/main/torchvision/models/swin_transformer.py + +from functools import partial +from typing import Any, Callable, List, Optional, Tuple + +import torch +import torch.nn.functional as F +from torch import nn, Tensor + +from ...transforms._presets import VideoClassification + +from ...utils import _log_api_usage_once + +from .._api import register_model, Weights, WeightsEnum + +from .._meta import _KINETICS400_CATEGORIES +from .._utils import _ovewrite_named_param, handle_legacy_interface +from ..swin_transformer import PatchMerging, SwinTransformerBlock + +__all__ = [ + "SwinTransformer3d", + "Swin3D_T_Weights", + "Swin3D_S_Weights", + "Swin3D_B_Weights", + "swin3d_t", + "swin3d_s", + "swin3d_b", +] + + +def _get_window_and_shift_size( + shift_size: List[int], size_dhw: List[int], window_size: List[int] +) -> Tuple[List[int], List[int]]: + for i in range(3): + if size_dhw[i] <= window_size[i]: + # In this case, window_size will adapt to the input size, and no need to shift + window_size[i] = size_dhw[i] + shift_size[i] = 0 + + return window_size, shift_size + + +torch.fx.wrap("_get_window_and_shift_size") + + +def _get_relative_position_bias( + relative_position_bias_table: torch.Tensor, relative_position_index: torch.Tensor, window_size: List[int] +) -> Tensor: + window_vol = window_size[0] * window_size[1] * window_size[2] + # In 3d case we flatten the relative_position_bias + relative_position_bias = relative_position_bias_table[ + relative_position_index[:window_vol, :window_vol].flatten() # type: ignore[index] + ] + relative_position_bias = relative_position_bias.view(window_vol, window_vol, -1) + relative_position_bias = relative_position_bias.permute(2, 0, 1).contiguous().unsqueeze(0) + return relative_position_bias + + +torch.fx.wrap("_get_relative_position_bias") + + +def _compute_pad_size_3d(size_dhw: Tuple[int, int, int], patch_size: Tuple[int, int, int]) -> Tuple[int, int, int]: + pad_size = [(patch_size[i] - size_dhw[i] % patch_size[i]) % patch_size[i] for i in range(3)] + return pad_size[0], pad_size[1], pad_size[2] + + +torch.fx.wrap("_compute_pad_size_3d") + + +def _compute_attention_mask_3d( + x: Tensor, + size_dhw: Tuple[int, int, int], + window_size: Tuple[int, int, int], + shift_size: Tuple[int, int, int], +) -> Tensor: + # generate attention mask + attn_mask = x.new_zeros(*size_dhw) + num_windows = (size_dhw[0] // window_size[0]) * (size_dhw[1] // window_size[1]) * (size_dhw[2] // window_size[2]) + slices = [ + ( + (0, -window_size[i]), + (-window_size[i], -shift_size[i]), + (-shift_size[i], None), + ) + for i in range(3) + ] + count = 0 + for d in slices[0]: + for h in slices[1]: + for w in slices[2]: + attn_mask[d[0] : d[1], h[0] : h[1], w[0] : w[1]] = count + count += 1 + + # Partition window on attn_mask + attn_mask = attn_mask.view( + size_dhw[0] // window_size[0], + window_size[0], + size_dhw[1] // window_size[1], + window_size[1], + size_dhw[2] // window_size[2], + window_size[2], + ) + attn_mask = attn_mask.permute(0, 2, 4, 1, 3, 5).reshape( + num_windows, window_size[0] * window_size[1] * window_size[2] + ) + attn_mask = attn_mask.unsqueeze(1) - attn_mask.unsqueeze(2) + attn_mask = attn_mask.masked_fill(attn_mask != 0, float(-100.0)).masked_fill(attn_mask == 0, float(0.0)) + return attn_mask + + +torch.fx.wrap("_compute_attention_mask_3d") + + +def shifted_window_attention_3d( + input: Tensor, + qkv_weight: Tensor, + proj_weight: Tensor, + relative_position_bias: Tensor, + window_size: List[int], + num_heads: int, + shift_size: List[int], + attention_dropout: float = 0.0, + dropout: float = 0.0, + qkv_bias: Optional[Tensor] = None, + proj_bias: Optional[Tensor] = None, + training: bool = True, +) -> Tensor: + """ + Window based multi-head self attention (W-MSA) module with relative position bias. + It supports both of shifted and non-shifted window. + Args: + input (Tensor[B, T, H, W, C]): The input tensor, 5-dimensions. + qkv_weight (Tensor[in_dim, out_dim]): The weight tensor of query, key, value. + proj_weight (Tensor[out_dim, out_dim]): The weight tensor of projection. + relative_position_bias (Tensor): The learned relative position bias added to attention. + window_size (List[int]): 3-dimensions window size, T, H, W . + num_heads (int): Number of attention heads. + shift_size (List[int]): Shift size for shifted window attention (T, H, W). + attention_dropout (float): Dropout ratio of attention weight. Default: 0.0. + dropout (float): Dropout ratio of output. Default: 0.0. + qkv_bias (Tensor[out_dim], optional): The bias tensor of query, key, value. Default: None. + proj_bias (Tensor[out_dim], optional): The bias tensor of projection. Default: None. + training (bool, optional): Training flag used by the dropout parameters. Default: True. + Returns: + Tensor[B, T, H, W, C]: The output tensor after shifted window attention. + """ + b, t, h, w, c = input.shape + # pad feature maps to multiples of window size + pad_size = _compute_pad_size_3d((t, h, w), (window_size[0], window_size[1], window_size[2])) + x = F.pad(input, (0, 0, 0, pad_size[2], 0, pad_size[1], 0, pad_size[0])) + _, tp, hp, wp, _ = x.shape + padded_size = (tp, hp, wp) + + # cyclic shift + if sum(shift_size) > 0: + x = torch.roll(x, shifts=(-shift_size[0], -shift_size[1], -shift_size[2]), dims=(1, 2, 3)) + + # partition windows + num_windows = ( + (padded_size[0] // window_size[0]) * (padded_size[1] // window_size[1]) * (padded_size[2] // window_size[2]) + ) + x = x.view( + b, + padded_size[0] // window_size[0], + window_size[0], + padded_size[1] // window_size[1], + window_size[1], + padded_size[2] // window_size[2], + window_size[2], + c, + ) + x = x.permute(0, 1, 3, 5, 2, 4, 6, 7).reshape( + b * num_windows, window_size[0] * window_size[1] * window_size[2], c + ) # B*nW, Wd*Wh*Ww, C + + # multi-head attention + qkv = F.linear(x, qkv_weight, qkv_bias) + qkv = qkv.reshape(x.size(0), x.size(1), 3, num_heads, c // num_heads).permute(2, 0, 3, 1, 4) + q, k, v = qkv[0], qkv[1], qkv[2] + q = q * (c // num_heads) ** -0.5 + attn = q.matmul(k.transpose(-2, -1)) + # add relative position bias + attn = attn + relative_position_bias + + if sum(shift_size) > 0: + # generate attention mask to handle shifted windows with varying size + attn_mask = _compute_attention_mask_3d( + x, + (padded_size[0], padded_size[1], padded_size[2]), + (window_size[0], window_size[1], window_size[2]), + (shift_size[0], shift_size[1], shift_size[2]), + ) + attn = attn.view(x.size(0) // num_windows, num_windows, num_heads, x.size(1), x.size(1)) + attn = attn + attn_mask.unsqueeze(1).unsqueeze(0) + attn = attn.view(-1, num_heads, x.size(1), x.size(1)) + + attn = F.softmax(attn, dim=-1) + attn = F.dropout(attn, p=attention_dropout, training=training) + + x = attn.matmul(v).transpose(1, 2).reshape(x.size(0), x.size(1), c) + x = F.linear(x, proj_weight, proj_bias) + x = F.dropout(x, p=dropout, training=training) + + # reverse windows + x = x.view( + b, + padded_size[0] // window_size[0], + padded_size[1] // window_size[1], + padded_size[2] // window_size[2], + window_size[0], + window_size[1], + window_size[2], + c, + ) + x = x.permute(0, 1, 4, 2, 5, 3, 6, 7).reshape(b, tp, hp, wp, c) + + # reverse cyclic shift + if sum(shift_size) > 0: + x = torch.roll(x, shifts=(shift_size[0], shift_size[1], shift_size[2]), dims=(1, 2, 3)) + + # unpad features + x = x[:, :t, :h, :w, :].contiguous() + return x + + +torch.fx.wrap("shifted_window_attention_3d") + + +class ShiftedWindowAttention3d(nn.Module): + """ + See :func:`shifted_window_attention_3d`. + """ + + def __init__( + self, + dim: int, + window_size: List[int], + shift_size: List[int], + num_heads: int, + qkv_bias: bool = True, + proj_bias: bool = True, + attention_dropout: float = 0.0, + dropout: float = 0.0, + ) -> None: + super().__init__() + if len(window_size) != 3 or len(shift_size) != 3: + raise ValueError("window_size and shift_size must be of length 2") + + self.window_size = window_size # Wd, Wh, Ww + self.shift_size = shift_size + self.num_heads = num_heads + self.attention_dropout = attention_dropout + self.dropout = dropout + + self.qkv = nn.Linear(dim, dim * 3, bias=qkv_bias) + self.proj = nn.Linear(dim, dim, bias=proj_bias) + + self.define_relative_position_bias_table() + self.define_relative_position_index() + + def define_relative_position_bias_table(self) -> None: + # define a parameter table of relative position bias + self.relative_position_bias_table = nn.Parameter( + torch.zeros( + (2 * self.window_size[0] - 1) * (2 * self.window_size[1] - 1) * (2 * self.window_size[2] - 1), + self.num_heads, + ) + ) # 2*Wd-1 * 2*Wh-1 * 2*Ww-1, nH + nn.init.trunc_normal_(self.relative_position_bias_table, std=0.02) + + def define_relative_position_index(self) -> None: + # get pair-wise relative position index for each token inside the window + coords_dhw = [torch.arange(self.window_size[i]) for i in range(3)] + coords = torch.stack( + torch.meshgrid(coords_dhw[0], coords_dhw[1], coords_dhw[2], indexing="ij") + ) # 3, Wd, Wh, Ww + coords_flatten = torch.flatten(coords, 1) # 3, Wd*Wh*Ww + relative_coords = coords_flatten[:, :, None] - coords_flatten[:, None, :] # 3, Wd*Wh*Ww, Wd*Wh*Ww + relative_coords = relative_coords.permute(1, 2, 0).contiguous() # Wd*Wh*Ww, Wd*Wh*Ww, 3 + relative_coords[:, :, 0] += self.window_size[0] - 1 # shift to start from 0 + relative_coords[:, :, 1] += self.window_size[1] - 1 + relative_coords[:, :, 2] += self.window_size[2] - 1 + + relative_coords[:, :, 0] *= (2 * self.window_size[1] - 1) * (2 * self.window_size[2] - 1) + relative_coords[:, :, 1] *= 2 * self.window_size[2] - 1 + # We don't flatten the relative_position_index here in 3d case. + relative_position_index = relative_coords.sum(-1) # Wd*Wh*Ww, Wd*Wh*Ww + self.register_buffer("relative_position_index", relative_position_index) + + def get_relative_position_bias(self, window_size: List[int]) -> torch.Tensor: + return _get_relative_position_bias(self.relative_position_bias_table, self.relative_position_index, window_size) # type: ignore + + def forward(self, x: Tensor) -> Tensor: + _, t, h, w, _ = x.shape + size_dhw = [t, h, w] + window_size, shift_size = self.window_size.copy(), self.shift_size.copy() + # Handle case where window_size is larger than the input tensor + window_size, shift_size = _get_window_and_shift_size(shift_size, size_dhw, window_size) + + relative_position_bias = self.get_relative_position_bias(window_size) + + return shifted_window_attention_3d( + x, + self.qkv.weight, + self.proj.weight, + relative_position_bias, + window_size, + self.num_heads, + shift_size=shift_size, + attention_dropout=self.attention_dropout, + dropout=self.dropout, + qkv_bias=self.qkv.bias, + proj_bias=self.proj.bias, + training=self.training, + ) + + +# Modified from: +# https://github.com/SwinTransformer/Video-Swin-Transformer/blob/master/mmaction/models/backbones/swin_transformer.py +class PatchEmbed3d(nn.Module): + """Video to Patch Embedding. + + Args: + patch_size (List[int]): Patch token size. + in_channels (int): Number of input channels. Default: 3 + embed_dim (int): Number of linear projection output channels. Default: 96. + norm_layer (nn.Module, optional): Normalization layer. Default: None + """ + + def __init__( + self, + patch_size: List[int], + in_channels: int = 3, + embed_dim: int = 96, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + _log_api_usage_once(self) + self.tuple_patch_size = (patch_size[0], patch_size[1], patch_size[2]) + + self.proj = nn.Conv3d( + in_channels, + embed_dim, + kernel_size=self.tuple_patch_size, + stride=self.tuple_patch_size, + ) + if norm_layer is not None: + self.norm = norm_layer(embed_dim) + else: + self.norm = nn.Identity() + + def forward(self, x: Tensor) -> Tensor: + """Forward function.""" + # padding + _, _, t, h, w = x.size() + pad_size = _compute_pad_size_3d((t, h, w), self.tuple_patch_size) + x = F.pad(x, (0, pad_size[2], 0, pad_size[1], 0, pad_size[0])) + x = self.proj(x) # B C T Wh Ww + x = x.permute(0, 2, 3, 4, 1) # B T Wh Ww C + if self.norm is not None: + x = self.norm(x) + return x + + +class SwinTransformer3d(nn.Module): + """ + Implements 3D Swin Transformer from the `"Video Swin Transformer" `_ paper. + Args: + patch_size (List[int]): Patch size. + embed_dim (int): Patch embedding dimension. + depths (List(int)): Depth of each Swin Transformer layer. + num_heads (List(int)): Number of attention heads in different layers. + window_size (List[int]): Window size. + mlp_ratio (float): Ratio of mlp hidden dim to embedding dim. Default: 4.0. + dropout (float): Dropout rate. Default: 0.0. + attention_dropout (float): Attention dropout rate. Default: 0.0. + stochastic_depth_prob (float): Stochastic depth rate. Default: 0.1. + num_classes (int): Number of classes for classification head. Default: 400. + norm_layer (nn.Module, optional): Normalization layer. Default: None. + block (nn.Module, optional): SwinTransformer Block. Default: None. + downsample_layer (nn.Module): Downsample layer (patch merging). Default: PatchMerging. + patch_embed (nn.Module, optional): Patch Embedding layer. Default: None. + """ + + def __init__( + self, + patch_size: List[int], + embed_dim: int, + depths: List[int], + num_heads: List[int], + window_size: List[int], + mlp_ratio: float = 4.0, + dropout: float = 0.0, + attention_dropout: float = 0.0, + stochastic_depth_prob: float = 0.1, + num_classes: int = 400, + norm_layer: Optional[Callable[..., nn.Module]] = None, + block: Optional[Callable[..., nn.Module]] = None, + downsample_layer: Callable[..., nn.Module] = PatchMerging, + patch_embed: Optional[Callable[..., nn.Module]] = None, + ) -> None: + super().__init__() + _log_api_usage_once(self) + self.num_classes = num_classes + + if block is None: + block = partial(SwinTransformerBlock, attn_layer=ShiftedWindowAttention3d) + + if norm_layer is None: + norm_layer = partial(nn.LayerNorm, eps=1e-5) + + if patch_embed is None: + patch_embed = PatchEmbed3d + + # split image into non-overlapping patches + self.patch_embed = patch_embed(patch_size=patch_size, embed_dim=embed_dim, norm_layer=norm_layer) + self.pos_drop = nn.Dropout(p=dropout) + + layers: List[nn.Module] = [] + total_stage_blocks = sum(depths) + stage_block_id = 0 + # build SwinTransformer blocks + for i_stage in range(len(depths)): + stage: List[nn.Module] = [] + dim = embed_dim * 2**i_stage + for i_layer in range(depths[i_stage]): + # adjust stochastic depth probability based on the depth of the stage block + sd_prob = stochastic_depth_prob * float(stage_block_id) / (total_stage_blocks - 1) + stage.append( + block( + dim, + num_heads[i_stage], + window_size=window_size, + shift_size=[0 if i_layer % 2 == 0 else w // 2 for w in window_size], + mlp_ratio=mlp_ratio, + dropout=dropout, + attention_dropout=attention_dropout, + stochastic_depth_prob=sd_prob, + norm_layer=norm_layer, + attn_layer=ShiftedWindowAttention3d, + ) + ) + stage_block_id += 1 + layers.append(nn.Sequential(*stage)) + # add patch merging layer + if i_stage < (len(depths) - 1): + layers.append(downsample_layer(dim, norm_layer)) + self.features = nn.Sequential(*layers) + + self.num_features = embed_dim * 2 ** (len(depths) - 1) + self.norm = norm_layer(self.num_features) + self.avgpool = nn.AdaptiveAvgPool3d(1) + self.head = nn.Linear(self.num_features, num_classes) + + for m in self.modules(): + if isinstance(m, nn.Linear): + nn.init.trunc_normal_(m.weight, std=0.02) + if m.bias is not None: + nn.init.zeros_(m.bias) + + def forward(self, x: Tensor) -> Tensor: + # x: B C T H W + x = self.patch_embed(x) # B _T _H _W C + x = self.pos_drop(x) + x = self.features(x) # B _T _H _W C + x = self.norm(x) + x = x.permute(0, 4, 1, 2, 3) # B, C, _T, _H, _W + x = self.avgpool(x) + x = torch.flatten(x, 1) + x = self.head(x) + return x + + +def _swin_transformer3d( + patch_size: List[int], + embed_dim: int, + depths: List[int], + num_heads: List[int], + window_size: List[int], + stochastic_depth_prob: float, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> SwinTransformer3d: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + + model = SwinTransformer3d( + patch_size=patch_size, + embed_dim=embed_dim, + depths=depths, + num_heads=num_heads, + window_size=window_size, + stochastic_depth_prob=stochastic_depth_prob, + **kwargs, + ) + + if weights is not None: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META = { + "categories": _KINETICS400_CATEGORIES, + "min_size": (1, 1), + "min_temporal_size": 1, +} + + +class Swin3D_T_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/swin3d_t-7615ae03.pth", + transforms=partial( + VideoClassification, + crop_size=(224, 224), + resize_size=(256,), + mean=(0.4850, 0.4560, 0.4060), + std=(0.2290, 0.2240, 0.2250), + ), + meta={ + **_COMMON_META, + "recipe": "https://github.com/SwinTransformer/Video-Swin-Transformer#kinetics-400", + "_docs": ( + "The weights were ported from the paper. The accuracies are estimated on video-level " + "with parameters `frame_rate=15`, `clips_per_video=12`, and `clip_len=32`" + ), + "num_params": 28158070, + "_metrics": { + "Kinetics-400": { + "acc@1": 77.715, + "acc@5": 93.519, + } + }, + "_ops": 43.882, + "_file_size": 121.543, + }, + ) + DEFAULT = KINETICS400_V1 + + +class Swin3D_S_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/swin3d_s-da41c237.pth", + transforms=partial( + VideoClassification, + crop_size=(224, 224), + resize_size=(256,), + mean=(0.4850, 0.4560, 0.4060), + std=(0.2290, 0.2240, 0.2250), + ), + meta={ + **_COMMON_META, + "recipe": "https://github.com/SwinTransformer/Video-Swin-Transformer#kinetics-400", + "_docs": ( + "The weights were ported from the paper. The accuracies are estimated on video-level " + "with parameters `frame_rate=15`, `clips_per_video=12`, and `clip_len=32`" + ), + "num_params": 49816678, + "_metrics": { + "Kinetics-400": { + "acc@1": 79.521, + "acc@5": 94.158, + } + }, + "_ops": 82.841, + "_file_size": 218.288, + }, + ) + DEFAULT = KINETICS400_V1 + + +class Swin3D_B_Weights(WeightsEnum): + KINETICS400_V1 = Weights( + url="https://download.pytorch.org/models/swin3d_b_1k-24f7c7c6.pth", + transforms=partial( + VideoClassification, + crop_size=(224, 224), + resize_size=(256,), + mean=(0.4850, 0.4560, 0.4060), + std=(0.2290, 0.2240, 0.2250), + ), + meta={ + **_COMMON_META, + "recipe": "https://github.com/SwinTransformer/Video-Swin-Transformer#kinetics-400", + "_docs": ( + "The weights were ported from the paper. The accuracies are estimated on video-level " + "with parameters `frame_rate=15`, `clips_per_video=12`, and `clip_len=32`" + ), + "num_params": 88048984, + "_metrics": { + "Kinetics-400": { + "acc@1": 79.427, + "acc@5": 94.386, + } + }, + "_ops": 140.667, + "_file_size": 364.134, + }, + ) + KINETICS400_IMAGENET22K_V1 = Weights( + url="https://download.pytorch.org/models/swin3d_b_22k-7c6ae6fa.pth", + transforms=partial( + VideoClassification, + crop_size=(224, 224), + resize_size=(256,), + mean=(0.4850, 0.4560, 0.4060), + std=(0.2290, 0.2240, 0.2250), + ), + meta={ + **_COMMON_META, + "recipe": "https://github.com/SwinTransformer/Video-Swin-Transformer#kinetics-400", + "_docs": ( + "The weights were ported from the paper. The accuracies are estimated on video-level " + "with parameters `frame_rate=15`, `clips_per_video=12`, and `clip_len=32`" + ), + "num_params": 88048984, + "_metrics": { + "Kinetics-400": { + "acc@1": 81.643, + "acc@5": 95.574, + } + }, + "_ops": 140.667, + "_file_size": 364.134, + }, + ) + DEFAULT = KINETICS400_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin3D_T_Weights.KINETICS400_V1)) +def swin3d_t(*, weights: Optional[Swin3D_T_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer3d: + """ + Constructs a swin_tiny architecture from + `Video Swin Transformer `_. + + Args: + weights (:class:`~torchvision.models.video.Swin3D_T_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.Swin3D_T_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.Swin3D_T_Weights + :members: + """ + weights = Swin3D_T_Weights.verify(weights) + + return _swin_transformer3d( + patch_size=[2, 4, 4], + embed_dim=96, + depths=[2, 2, 6, 2], + num_heads=[3, 6, 12, 24], + window_size=[8, 7, 7], + stochastic_depth_prob=0.1, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin3D_S_Weights.KINETICS400_V1)) +def swin3d_s(*, weights: Optional[Swin3D_S_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer3d: + """ + Constructs a swin_small architecture from + `Video Swin Transformer `_. + + Args: + weights (:class:`~torchvision.models.video.Swin3D_S_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.Swin3D_S_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.Swin3D_S_Weights + :members: + """ + weights = Swin3D_S_Weights.verify(weights) + + return _swin_transformer3d( + patch_size=[2, 4, 4], + embed_dim=96, + depths=[2, 2, 18, 2], + num_heads=[3, 6, 12, 24], + window_size=[8, 7, 7], + stochastic_depth_prob=0.1, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", Swin3D_B_Weights.KINETICS400_V1)) +def swin3d_b(*, weights: Optional[Swin3D_B_Weights] = None, progress: bool = True, **kwargs: Any) -> SwinTransformer3d: + """ + Constructs a swin_base architecture from + `Video Swin Transformer `_. + + Args: + weights (:class:`~torchvision.models.video.Swin3D_B_Weights`, optional): The + pretrained weights to use. See + :class:`~torchvision.models.video.Swin3D_B_Weights` below for + more details, and possible values. By default, no pre-trained + weights are used. + progress (bool, optional): If True, displays a progress bar of the + download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.video.swin_transformer.SwinTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.video.Swin3D_B_Weights + :members: + """ + weights = Swin3D_B_Weights.verify(weights) + + return _swin_transformer3d( + patch_size=[2, 4, 4], + embed_dim=128, + depths=[2, 2, 18, 2], + num_heads=[4, 8, 16, 32], + window_size=[8, 7, 7], + stochastic_depth_prob=0.1, + weights=weights, + progress=progress, + **kwargs, + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/vision_transformer.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/vision_transformer.py new file mode 100644 index 0000000000000000000000000000000000000000..24bf187393653fc83bd778a19a44e6f779afe6c8 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/models/vision_transformer.py @@ -0,0 +1,864 @@ +import math +from collections import OrderedDict +from functools import partial +from typing import Any, Callable, Dict, List, NamedTuple, Optional + +import torch +import torch.nn as nn + +from ..ops.misc import Conv2dNormActivation, MLP +from ..transforms._presets import ImageClassification, InterpolationMode +from ..utils import _log_api_usage_once +from ._api import register_model, Weights, WeightsEnum +from ._meta import _IMAGENET_CATEGORIES +from ._utils import _ovewrite_named_param, handle_legacy_interface + + +__all__ = [ + "VisionTransformer", + "ViT_B_16_Weights", + "ViT_B_32_Weights", + "ViT_L_16_Weights", + "ViT_L_32_Weights", + "ViT_H_14_Weights", + "vit_b_16", + "vit_b_32", + "vit_l_16", + "vit_l_32", + "vit_h_14", +] + + +class ConvStemConfig(NamedTuple): + out_channels: int + kernel_size: int + stride: int + norm_layer: Callable[..., nn.Module] = nn.BatchNorm2d + activation_layer: Callable[..., nn.Module] = nn.ReLU + + +class MLPBlock(MLP): + """Transformer MLP block.""" + + _version = 2 + + def __init__(self, in_dim: int, mlp_dim: int, dropout: float): + super().__init__(in_dim, [mlp_dim, in_dim], activation_layer=nn.GELU, inplace=None, dropout=dropout) + + for m in self.modules(): + if isinstance(m, nn.Linear): + nn.init.xavier_uniform_(m.weight) + if m.bias is not None: + nn.init.normal_(m.bias, std=1e-6) + + def _load_from_state_dict( + self, + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ): + version = local_metadata.get("version", None) + + if version is None or version < 2: + # Replacing legacy MLPBlock with MLP. See https://github.com/pytorch/vision/pull/6053 + for i in range(2): + for type in ["weight", "bias"]: + old_key = f"{prefix}linear_{i+1}.{type}" + new_key = f"{prefix}{3*i}.{type}" + if old_key in state_dict: + state_dict[new_key] = state_dict.pop(old_key) + + super()._load_from_state_dict( + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ) + + +class EncoderBlock(nn.Module): + """Transformer encoder block.""" + + def __init__( + self, + num_heads: int, + hidden_dim: int, + mlp_dim: int, + dropout: float, + attention_dropout: float, + norm_layer: Callable[..., torch.nn.Module] = partial(nn.LayerNorm, eps=1e-6), + ): + super().__init__() + self.num_heads = num_heads + + # Attention block + self.ln_1 = norm_layer(hidden_dim) + self.self_attention = nn.MultiheadAttention(hidden_dim, num_heads, dropout=attention_dropout, batch_first=True) + self.dropout = nn.Dropout(dropout) + + # MLP block + self.ln_2 = norm_layer(hidden_dim) + self.mlp = MLPBlock(hidden_dim, mlp_dim, dropout) + + def forward(self, input: torch.Tensor): + torch._assert(input.dim() == 3, f"Expected (batch_size, seq_length, hidden_dim) got {input.shape}") + x = self.ln_1(input) + x, _ = self.self_attention(x, x, x, need_weights=False) + x = self.dropout(x) + x = x + input + + y = self.ln_2(x) + y = self.mlp(y) + return x + y + + +class Encoder(nn.Module): + """Transformer Model Encoder for sequence to sequence translation.""" + + def __init__( + self, + seq_length: int, + num_layers: int, + num_heads: int, + hidden_dim: int, + mlp_dim: int, + dropout: float, + attention_dropout: float, + norm_layer: Callable[..., torch.nn.Module] = partial(nn.LayerNorm, eps=1e-6), + ): + super().__init__() + # Note that batch_size is on the first dim because + # we have batch_first=True in nn.MultiAttention() by default + self.pos_embedding = nn.Parameter(torch.empty(1, seq_length, hidden_dim).normal_(std=0.02)) # from BERT + self.dropout = nn.Dropout(dropout) + layers: OrderedDict[str, nn.Module] = OrderedDict() + for i in range(num_layers): + layers[f"encoder_layer_{i}"] = EncoderBlock( + num_heads, + hidden_dim, + mlp_dim, + dropout, + attention_dropout, + norm_layer, + ) + self.layers = nn.Sequential(layers) + self.ln = norm_layer(hidden_dim) + + def forward(self, input: torch.Tensor): + torch._assert(input.dim() == 3, f"Expected (batch_size, seq_length, hidden_dim) got {input.shape}") + input = input + self.pos_embedding + return self.ln(self.layers(self.dropout(input))) + + +class VisionTransformer(nn.Module): + """Vision Transformer as per https://arxiv.org/abs/2010.11929.""" + + def __init__( + self, + image_size: int, + patch_size: int, + num_layers: int, + num_heads: int, + hidden_dim: int, + mlp_dim: int, + dropout: float = 0.0, + attention_dropout: float = 0.0, + num_classes: int = 1000, + representation_size: Optional[int] = None, + norm_layer: Callable[..., torch.nn.Module] = partial(nn.LayerNorm, eps=1e-6), + conv_stem_configs: Optional[List[ConvStemConfig]] = None, + ): + super().__init__() + _log_api_usage_once(self) + torch._assert(image_size % patch_size == 0, "Input shape indivisible by patch size!") + self.image_size = image_size + self.patch_size = patch_size + self.hidden_dim = hidden_dim + self.mlp_dim = mlp_dim + self.attention_dropout = attention_dropout + self.dropout = dropout + self.num_classes = num_classes + self.representation_size = representation_size + self.norm_layer = norm_layer + + if conv_stem_configs is not None: + # As per https://arxiv.org/abs/2106.14881 + seq_proj = nn.Sequential() + prev_channels = 3 + for i, conv_stem_layer_config in enumerate(conv_stem_configs): + seq_proj.add_module( + f"conv_bn_relu_{i}", + Conv2dNormActivation( + in_channels=prev_channels, + out_channels=conv_stem_layer_config.out_channels, + kernel_size=conv_stem_layer_config.kernel_size, + stride=conv_stem_layer_config.stride, + norm_layer=conv_stem_layer_config.norm_layer, + activation_layer=conv_stem_layer_config.activation_layer, + ), + ) + prev_channels = conv_stem_layer_config.out_channels + seq_proj.add_module( + "conv_last", nn.Conv2d(in_channels=prev_channels, out_channels=hidden_dim, kernel_size=1) + ) + self.conv_proj: nn.Module = seq_proj + else: + self.conv_proj = nn.Conv2d( + in_channels=3, out_channels=hidden_dim, kernel_size=patch_size, stride=patch_size + ) + + seq_length = (image_size // patch_size) ** 2 + + # Add a class token + self.class_token = nn.Parameter(torch.zeros(1, 1, hidden_dim)) + seq_length += 1 + + self.encoder = Encoder( + seq_length, + num_layers, + num_heads, + hidden_dim, + mlp_dim, + dropout, + attention_dropout, + norm_layer, + ) + self.seq_length = seq_length + + heads_layers: OrderedDict[str, nn.Module] = OrderedDict() + if representation_size is None: + heads_layers["head"] = nn.Linear(hidden_dim, num_classes) + else: + heads_layers["pre_logits"] = nn.Linear(hidden_dim, representation_size) + heads_layers["act"] = nn.Tanh() + heads_layers["head"] = nn.Linear(representation_size, num_classes) + + self.heads = nn.Sequential(heads_layers) + + if isinstance(self.conv_proj, nn.Conv2d): + # Init the patchify stem + fan_in = self.conv_proj.in_channels * self.conv_proj.kernel_size[0] * self.conv_proj.kernel_size[1] + nn.init.trunc_normal_(self.conv_proj.weight, std=math.sqrt(1 / fan_in)) + if self.conv_proj.bias is not None: + nn.init.zeros_(self.conv_proj.bias) + elif self.conv_proj.conv_last is not None and isinstance(self.conv_proj.conv_last, nn.Conv2d): + # Init the last 1x1 conv of the conv stem + nn.init.normal_( + self.conv_proj.conv_last.weight, mean=0.0, std=math.sqrt(2.0 / self.conv_proj.conv_last.out_channels) + ) + if self.conv_proj.conv_last.bias is not None: + nn.init.zeros_(self.conv_proj.conv_last.bias) + + if hasattr(self.heads, "pre_logits") and isinstance(self.heads.pre_logits, nn.Linear): + fan_in = self.heads.pre_logits.in_features + nn.init.trunc_normal_(self.heads.pre_logits.weight, std=math.sqrt(1 / fan_in)) + nn.init.zeros_(self.heads.pre_logits.bias) + + if isinstance(self.heads.head, nn.Linear): + nn.init.zeros_(self.heads.head.weight) + nn.init.zeros_(self.heads.head.bias) + + def _process_input(self, x: torch.Tensor) -> torch.Tensor: + n, c, h, w = x.shape + p = self.patch_size + torch._assert(h == self.image_size, f"Wrong image height! Expected {self.image_size} but got {h}!") + torch._assert(w == self.image_size, f"Wrong image width! Expected {self.image_size} but got {w}!") + n_h = h // p + n_w = w // p + + # (n, c, h, w) -> (n, hidden_dim, n_h, n_w) + x = self.conv_proj(x) + # (n, hidden_dim, n_h, n_w) -> (n, hidden_dim, (n_h * n_w)) + x = x.reshape(n, self.hidden_dim, n_h * n_w) + + # (n, hidden_dim, (n_h * n_w)) -> (n, (n_h * n_w), hidden_dim) + # The self attention layer expects inputs in the format (N, S, E) + # where S is the source sequence length, N is the batch size, E is the + # embedding dimension + x = x.permute(0, 2, 1) + + return x + + def forward(self, x: torch.Tensor): + # Reshape and permute the input tensor + x = self._process_input(x) + n = x.shape[0] + + # Expand the class token to the full batch + batch_class_token = self.class_token.expand(n, -1, -1) + x = torch.cat([batch_class_token, x], dim=1) + + x = self.encoder(x) + + # Classifier "token" as used by standard language architectures + x = x[:, 0] + + x = self.heads(x) + + return x + + +def _vision_transformer( + patch_size: int, + num_layers: int, + num_heads: int, + hidden_dim: int, + mlp_dim: int, + weights: Optional[WeightsEnum], + progress: bool, + **kwargs: Any, +) -> VisionTransformer: + if weights is not None: + _ovewrite_named_param(kwargs, "num_classes", len(weights.meta["categories"])) + assert weights.meta["min_size"][0] == weights.meta["min_size"][1] + _ovewrite_named_param(kwargs, "image_size", weights.meta["min_size"][0]) + image_size = kwargs.pop("image_size", 224) + + model = VisionTransformer( + image_size=image_size, + patch_size=patch_size, + num_layers=num_layers, + num_heads=num_heads, + hidden_dim=hidden_dim, + mlp_dim=mlp_dim, + **kwargs, + ) + + if weights: + model.load_state_dict(weights.get_state_dict(progress=progress, check_hash=True)) + + return model + + +_COMMON_META: Dict[str, Any] = { + "categories": _IMAGENET_CATEGORIES, +} + +_COMMON_SWAG_META = { + **_COMMON_META, + "recipe": "https://github.com/facebookresearch/SWAG", + "license": "https://github.com/facebookresearch/SWAG/blob/main/LICENSE", +} + + +class ViT_B_16_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vit_b_16-c867db91.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 86567656, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#vit_b_16", + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.072, + "acc@5": 95.318, + } + }, + "_ops": 17.564, + "_file_size": 330.285, + "_docs": """ + These weights were trained from scratch by using a modified version of `DeIT + `_'s training recipe. + """, + }, + ) + IMAGENET1K_SWAG_E2E_V1 = Weights( + url="https://download.pytorch.org/models/vit_b_16_swag-9ac1b537.pth", + transforms=partial( + ImageClassification, + crop_size=384, + resize_size=384, + interpolation=InterpolationMode.BICUBIC, + ), + meta={ + **_COMMON_SWAG_META, + "num_params": 86859496, + "min_size": (384, 384), + "_metrics": { + "ImageNet-1K": { + "acc@1": 85.304, + "acc@5": 97.650, + } + }, + "_ops": 55.484, + "_file_size": 331.398, + "_docs": """ + These weights are learnt via transfer learning by end-to-end fine-tuning the original + `SWAG `_ weights on ImageNet-1K data. + """, + }, + ) + IMAGENET1K_SWAG_LINEAR_V1 = Weights( + url="https://download.pytorch.org/models/vit_b_16_lc_swag-4e70ced5.pth", + transforms=partial( + ImageClassification, + crop_size=224, + resize_size=224, + interpolation=InterpolationMode.BICUBIC, + ), + meta={ + **_COMMON_SWAG_META, + "recipe": "https://github.com/pytorch/vision/pull/5793", + "num_params": 86567656, + "min_size": (224, 224), + "_metrics": { + "ImageNet-1K": { + "acc@1": 81.886, + "acc@5": 96.180, + } + }, + "_ops": 17.564, + "_file_size": 330.285, + "_docs": """ + These weights are composed of the original frozen `SWAG `_ trunk + weights and a linear classifier learnt on top of them trained on ImageNet-1K data. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ViT_B_32_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vit_b_32-d86f8d99.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 88224232, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#vit_b_32", + "_metrics": { + "ImageNet-1K": { + "acc@1": 75.912, + "acc@5": 92.466, + } + }, + "_ops": 4.409, + "_file_size": 336.604, + "_docs": """ + These weights were trained from scratch by using a modified version of `DeIT + `_'s training recipe. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ViT_L_16_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vit_l_16-852ce7e3.pth", + transforms=partial(ImageClassification, crop_size=224, resize_size=242), + meta={ + **_COMMON_META, + "num_params": 304326632, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#vit_l_16", + "_metrics": { + "ImageNet-1K": { + "acc@1": 79.662, + "acc@5": 94.638, + } + }, + "_ops": 61.555, + "_file_size": 1161.023, + "_docs": """ + These weights were trained from scratch by using a modified version of TorchVision's + `new training recipe + `_. + """, + }, + ) + IMAGENET1K_SWAG_E2E_V1 = Weights( + url="https://download.pytorch.org/models/vit_l_16_swag-4f3808c9.pth", + transforms=partial( + ImageClassification, + crop_size=512, + resize_size=512, + interpolation=InterpolationMode.BICUBIC, + ), + meta={ + **_COMMON_SWAG_META, + "num_params": 305174504, + "min_size": (512, 512), + "_metrics": { + "ImageNet-1K": { + "acc@1": 88.064, + "acc@5": 98.512, + } + }, + "_ops": 361.986, + "_file_size": 1164.258, + "_docs": """ + These weights are learnt via transfer learning by end-to-end fine-tuning the original + `SWAG `_ weights on ImageNet-1K data. + """, + }, + ) + IMAGENET1K_SWAG_LINEAR_V1 = Weights( + url="https://download.pytorch.org/models/vit_l_16_lc_swag-4d563306.pth", + transforms=partial( + ImageClassification, + crop_size=224, + resize_size=224, + interpolation=InterpolationMode.BICUBIC, + ), + meta={ + **_COMMON_SWAG_META, + "recipe": "https://github.com/pytorch/vision/pull/5793", + "num_params": 304326632, + "min_size": (224, 224), + "_metrics": { + "ImageNet-1K": { + "acc@1": 85.146, + "acc@5": 97.422, + } + }, + "_ops": 61.555, + "_file_size": 1161.023, + "_docs": """ + These weights are composed of the original frozen `SWAG `_ trunk + weights and a linear classifier learnt on top of them trained on ImageNet-1K data. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ViT_L_32_Weights(WeightsEnum): + IMAGENET1K_V1 = Weights( + url="https://download.pytorch.org/models/vit_l_32-c7638314.pth", + transforms=partial(ImageClassification, crop_size=224), + meta={ + **_COMMON_META, + "num_params": 306535400, + "min_size": (224, 224), + "recipe": "https://github.com/pytorch/vision/tree/main/references/classification#vit_l_32", + "_metrics": { + "ImageNet-1K": { + "acc@1": 76.972, + "acc@5": 93.07, + } + }, + "_ops": 15.378, + "_file_size": 1169.449, + "_docs": """ + These weights were trained from scratch by using a modified version of `DeIT + `_'s training recipe. + """, + }, + ) + DEFAULT = IMAGENET1K_V1 + + +class ViT_H_14_Weights(WeightsEnum): + IMAGENET1K_SWAG_E2E_V1 = Weights( + url="https://download.pytorch.org/models/vit_h_14_swag-80465313.pth", + transforms=partial( + ImageClassification, + crop_size=518, + resize_size=518, + interpolation=InterpolationMode.BICUBIC, + ), + meta={ + **_COMMON_SWAG_META, + "num_params": 633470440, + "min_size": (518, 518), + "_metrics": { + "ImageNet-1K": { + "acc@1": 88.552, + "acc@5": 98.694, + } + }, + "_ops": 1016.717, + "_file_size": 2416.643, + "_docs": """ + These weights are learnt via transfer learning by end-to-end fine-tuning the original + `SWAG `_ weights on ImageNet-1K data. + """, + }, + ) + IMAGENET1K_SWAG_LINEAR_V1 = Weights( + url="https://download.pytorch.org/models/vit_h_14_lc_swag-c1eb923e.pth", + transforms=partial( + ImageClassification, + crop_size=224, + resize_size=224, + interpolation=InterpolationMode.BICUBIC, + ), + meta={ + **_COMMON_SWAG_META, + "recipe": "https://github.com/pytorch/vision/pull/5793", + "num_params": 632045800, + "min_size": (224, 224), + "_metrics": { + "ImageNet-1K": { + "acc@1": 85.708, + "acc@5": 97.730, + } + }, + "_ops": 167.295, + "_file_size": 2411.209, + "_docs": """ + These weights are composed of the original frozen `SWAG `_ trunk + weights and a linear classifier learnt on top of them trained on ImageNet-1K data. + """, + }, + ) + DEFAULT = IMAGENET1K_SWAG_E2E_V1 + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ViT_B_16_Weights.IMAGENET1K_V1)) +def vit_b_16(*, weights: Optional[ViT_B_16_Weights] = None, progress: bool = True, **kwargs: Any) -> VisionTransformer: + """ + Constructs a vit_b_16 architecture from + `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale `_. + + Args: + weights (:class:`~torchvision.models.ViT_B_16_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.ViT_B_16_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ViT_B_16_Weights + :members: + """ + weights = ViT_B_16_Weights.verify(weights) + + return _vision_transformer( + patch_size=16, + num_layers=12, + num_heads=12, + hidden_dim=768, + mlp_dim=3072, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ViT_B_32_Weights.IMAGENET1K_V1)) +def vit_b_32(*, weights: Optional[ViT_B_32_Weights] = None, progress: bool = True, **kwargs: Any) -> VisionTransformer: + """ + Constructs a vit_b_32 architecture from + `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale `_. + + Args: + weights (:class:`~torchvision.models.ViT_B_32_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.ViT_B_32_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ViT_B_32_Weights + :members: + """ + weights = ViT_B_32_Weights.verify(weights) + + return _vision_transformer( + patch_size=32, + num_layers=12, + num_heads=12, + hidden_dim=768, + mlp_dim=3072, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ViT_L_16_Weights.IMAGENET1K_V1)) +def vit_l_16(*, weights: Optional[ViT_L_16_Weights] = None, progress: bool = True, **kwargs: Any) -> VisionTransformer: + """ + Constructs a vit_l_16 architecture from + `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale `_. + + Args: + weights (:class:`~torchvision.models.ViT_L_16_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.ViT_L_16_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ViT_L_16_Weights + :members: + """ + weights = ViT_L_16_Weights.verify(weights) + + return _vision_transformer( + patch_size=16, + num_layers=24, + num_heads=16, + hidden_dim=1024, + mlp_dim=4096, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", ViT_L_32_Weights.IMAGENET1K_V1)) +def vit_l_32(*, weights: Optional[ViT_L_32_Weights] = None, progress: bool = True, **kwargs: Any) -> VisionTransformer: + """ + Constructs a vit_l_32 architecture from + `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale `_. + + Args: + weights (:class:`~torchvision.models.ViT_L_32_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.ViT_L_32_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ViT_L_32_Weights + :members: + """ + weights = ViT_L_32_Weights.verify(weights) + + return _vision_transformer( + patch_size=32, + num_layers=24, + num_heads=16, + hidden_dim=1024, + mlp_dim=4096, + weights=weights, + progress=progress, + **kwargs, + ) + + +@register_model() +@handle_legacy_interface(weights=("pretrained", None)) +def vit_h_14(*, weights: Optional[ViT_H_14_Weights] = None, progress: bool = True, **kwargs: Any) -> VisionTransformer: + """ + Constructs a vit_h_14 architecture from + `An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale `_. + + Args: + weights (:class:`~torchvision.models.ViT_H_14_Weights`, optional): The pretrained + weights to use. See :class:`~torchvision.models.ViT_H_14_Weights` + below for more details and possible values. By default, no pre-trained weights are used. + progress (bool, optional): If True, displays a progress bar of the download to stderr. Default is True. + **kwargs: parameters passed to the ``torchvision.models.vision_transformer.VisionTransformer`` + base class. Please refer to the `source code + `_ + for more details about this class. + + .. autoclass:: torchvision.models.ViT_H_14_Weights + :members: + """ + weights = ViT_H_14_Weights.verify(weights) + + return _vision_transformer( + patch_size=14, + num_layers=32, + num_heads=16, + hidden_dim=1280, + mlp_dim=5120, + weights=weights, + progress=progress, + **kwargs, + ) + + +def interpolate_embeddings( + image_size: int, + patch_size: int, + model_state: "OrderedDict[str, torch.Tensor]", + interpolation_mode: str = "bicubic", + reset_heads: bool = False, +) -> "OrderedDict[str, torch.Tensor]": + """This function helps interpolate positional embeddings during checkpoint loading, + especially when you want to apply a pre-trained model on images with different resolution. + + Args: + image_size (int): Image size of the new model. + patch_size (int): Patch size of the new model. + model_state (OrderedDict[str, torch.Tensor]): State dict of the pre-trained model. + interpolation_mode (str): The algorithm used for upsampling. Default: bicubic. + reset_heads (bool): If true, not copying the state of heads. Default: False. + + Returns: + OrderedDict[str, torch.Tensor]: A state dict which can be loaded into the new model. + """ + # Shape of pos_embedding is (1, seq_length, hidden_dim) + pos_embedding = model_state["encoder.pos_embedding"] + n, seq_length, hidden_dim = pos_embedding.shape + if n != 1: + raise ValueError(f"Unexpected position embedding shape: {pos_embedding.shape}") + + new_seq_length = (image_size // patch_size) ** 2 + 1 + + # Need to interpolate the weights for the position embedding. + # We do this by reshaping the positions embeddings to a 2d grid, performing + # an interpolation in the (h, w) space and then reshaping back to a 1d grid. + if new_seq_length != seq_length: + # The class token embedding shouldn't be interpolated, so we split it up. + seq_length -= 1 + new_seq_length -= 1 + pos_embedding_token = pos_embedding[:, :1, :] + pos_embedding_img = pos_embedding[:, 1:, :] + + # (1, seq_length, hidden_dim) -> (1, hidden_dim, seq_length) + pos_embedding_img = pos_embedding_img.permute(0, 2, 1) + seq_length_1d = int(math.sqrt(seq_length)) + if seq_length_1d * seq_length_1d != seq_length: + raise ValueError( + f"seq_length is not a perfect square! Instead got seq_length_1d * seq_length_1d = {seq_length_1d * seq_length_1d } and seq_length = {seq_length}" + ) + + # (1, hidden_dim, seq_length) -> (1, hidden_dim, seq_l_1d, seq_l_1d) + pos_embedding_img = pos_embedding_img.reshape(1, hidden_dim, seq_length_1d, seq_length_1d) + new_seq_length_1d = image_size // patch_size + + # Perform interpolation. + # (1, hidden_dim, seq_l_1d, seq_l_1d) -> (1, hidden_dim, new_seq_l_1d, new_seq_l_1d) + new_pos_embedding_img = nn.functional.interpolate( + pos_embedding_img, + size=new_seq_length_1d, + mode=interpolation_mode, + align_corners=True, + ) + + # (1, hidden_dim, new_seq_l_1d, new_seq_l_1d) -> (1, hidden_dim, new_seq_length) + new_pos_embedding_img = new_pos_embedding_img.reshape(1, hidden_dim, new_seq_length) + + # (1, hidden_dim, new_seq_length) -> (1, new_seq_length, hidden_dim) + new_pos_embedding_img = new_pos_embedding_img.permute(0, 2, 1) + new_pos_embedding = torch.cat([pos_embedding_token, new_pos_embedding_img], dim=1) + + model_state["encoder.pos_embedding"] = new_pos_embedding + + if reset_heads: + model_state_copy: "OrderedDict[str, torch.Tensor]" = OrderedDict() + for k, v in model_state.items(): + if not k.startswith("heads"): + model_state_copy[k] = v + model_state = model_state_copy + + return model_state diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a0d162b4dd487e6d656d90c1f14dbd9cc297ead7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__init__.py @@ -0,0 +1,73 @@ +from ._register_onnx_ops import _register_custom_op +from .boxes import ( + batched_nms, + box_area, + box_convert, + box_iou, + clip_boxes_to_image, + complete_box_iou, + distance_box_iou, + generalized_box_iou, + masks_to_boxes, + nms, + remove_small_boxes, +) +from .ciou_loss import complete_box_iou_loss +from .deform_conv import deform_conv2d, DeformConv2d +from .diou_loss import distance_box_iou_loss +from .drop_block import drop_block2d, drop_block3d, DropBlock2d, DropBlock3d +from .feature_pyramid_network import FeaturePyramidNetwork +from .focal_loss import sigmoid_focal_loss +from .giou_loss import generalized_box_iou_loss +from .misc import Conv2dNormActivation, Conv3dNormActivation, FrozenBatchNorm2d, MLP, Permute, SqueezeExcitation +from .poolers import MultiScaleRoIAlign +from .ps_roi_align import ps_roi_align, PSRoIAlign +from .ps_roi_pool import ps_roi_pool, PSRoIPool +from .roi_align import roi_align, RoIAlign +from .roi_pool import roi_pool, RoIPool +from .stochastic_depth import stochastic_depth, StochasticDepth + +_register_custom_op() + + +__all__ = [ + "masks_to_boxes", + "deform_conv2d", + "DeformConv2d", + "nms", + "batched_nms", + "remove_small_boxes", + "clip_boxes_to_image", + "box_convert", + "box_area", + "box_iou", + "generalized_box_iou", + "distance_box_iou", + "complete_box_iou", + "roi_align", + "RoIAlign", + "roi_pool", + "RoIPool", + "ps_roi_align", + "PSRoIAlign", + "ps_roi_pool", + "PSRoIPool", + "MultiScaleRoIAlign", + "FeaturePyramidNetwork", + "sigmoid_focal_loss", + "stochastic_depth", + "StochasticDepth", + "FrozenBatchNorm2d", + "Conv2dNormActivation", + "Conv3dNormActivation", + "SqueezeExcitation", + "MLP", + "Permute", + "generalized_box_iou_loss", + "distance_box_iou_loss", + "complete_box_iou_loss", + "drop_block2d", + "DropBlock2d", + "drop_block3d", + "DropBlock3d", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c70d56d8c1fd7075c508659a67ed6e48e072684e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_box_convert.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_box_convert.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67d445a8f40719b2c7b6d96130f31fb5e2bd7750 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_box_convert.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_register_onnx_ops.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_register_onnx_ops.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c21c2b68d2185255ca24ad9d3c14a4f638e8a2c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_register_onnx_ops.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96e602a777f1a13f6bf8e767eb294c1d6766aed1 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/boxes.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/boxes.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..95c8a565049a98860596008eb8b88338ff4ba796 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/boxes.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ciou_loss.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ciou_loss.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fe05178273b930d0f829bc40498bd5976a22c697 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ciou_loss.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/deform_conv.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/deform_conv.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae592118bbf1bfcacf8410980feba376c45f7be7 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/deform_conv.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/diou_loss.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/diou_loss.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..263747baffdca016c6df48ca808cd12fd8bfb698 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/diou_loss.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/drop_block.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/drop_block.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b917a46e1751b5ff154dbb07e2aeb856da95cf13 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/drop_block.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/feature_pyramid_network.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/feature_pyramid_network.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c306559ca799aeb6e3b103d5f211af38621f9523 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/feature_pyramid_network.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/focal_loss.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/focal_loss.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..89feb7fa478d0ed52cd52216e53ff9df2c04ad8f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/focal_loss.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/giou_loss.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/giou_loss.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f68c91b0080641fa257b130c636a6148febea51 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/giou_loss.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/misc.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/misc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f8248365490bae9b5a7fb1a51d5bf4e87219e451 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/misc.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/poolers.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/poolers.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1e59e256202ed3cd95c858e87c7d7d5bc11025d6 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/poolers.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ps_roi_align.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ps_roi_align.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a30042ff2eb231b5ef9eb155390d5cc5003d432d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ps_roi_align.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ps_roi_pool.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ps_roi_pool.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..90b1539517be13aa1383878b142a815415fa4291 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/ps_roi_pool.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/roi_align.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/roi_align.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..91b8332b5e7cd9a183657b6b400b1aa14f9d43b9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/roi_align.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/roi_pool.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/roi_pool.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dfb1437dbb2cbe88542109f0c81642875fce8bcd Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/roi_pool.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/stochastic_depth.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/stochastic_depth.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eaa3a2aa022f8f6cd515d911262c1463c513d301 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/__pycache__/stochastic_depth.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_box_convert.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_box_convert.py new file mode 100644 index 0000000000000000000000000000000000000000..d2f47f2c0a15c030478a0750fcf211f540b0162f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_box_convert.py @@ -0,0 +1,81 @@ +import torch +from torch import Tensor + + +def _box_cxcywh_to_xyxy(boxes: Tensor) -> Tensor: + """ + Converts bounding boxes from (cx, cy, w, h) format to (x1, y1, x2, y2) format. + (cx, cy) refers to center of bounding box + (w, h) are width and height of bounding box + Args: + boxes (Tensor[N, 4]): boxes in (cx, cy, w, h) format which will be converted. + + Returns: + boxes (Tensor(N, 4)): boxes in (x1, y1, x2, y2) format. + """ + # We need to change all 4 of them so some temporary variable is needed. + cx, cy, w, h = boxes.unbind(-1) + x1 = cx - 0.5 * w + y1 = cy - 0.5 * h + x2 = cx + 0.5 * w + y2 = cy + 0.5 * h + + boxes = torch.stack((x1, y1, x2, y2), dim=-1) + + return boxes + + +def _box_xyxy_to_cxcywh(boxes: Tensor) -> Tensor: + """ + Converts bounding boxes from (x1, y1, x2, y2) format to (cx, cy, w, h) format. + (x1, y1) refer to top left of bounding box + (x2, y2) refer to bottom right of bounding box + Args: + boxes (Tensor[N, 4]): boxes in (x1, y1, x2, y2) format which will be converted. + + Returns: + boxes (Tensor(N, 4)): boxes in (cx, cy, w, h) format. + """ + x1, y1, x2, y2 = boxes.unbind(-1) + cx = (x1 + x2) / 2 + cy = (y1 + y2) / 2 + w = x2 - x1 + h = y2 - y1 + + boxes = torch.stack((cx, cy, w, h), dim=-1) + + return boxes + + +def _box_xywh_to_xyxy(boxes: Tensor) -> Tensor: + """ + Converts bounding boxes from (x, y, w, h) format to (x1, y1, x2, y2) format. + (x, y) refers to top left of bounding box. + (w, h) refers to width and height of box. + Args: + boxes (Tensor[N, 4]): boxes in (x, y, w, h) which will be converted. + + Returns: + boxes (Tensor[N, 4]): boxes in (x1, y1, x2, y2) format. + """ + x, y, w, h = boxes.unbind(-1) + boxes = torch.stack([x, y, x + w, y + h], dim=-1) + return boxes + + +def _box_xyxy_to_xywh(boxes: Tensor) -> Tensor: + """ + Converts bounding boxes from (x1, y1, x2, y2) format to (x, y, w, h) format. + (x1, y1) refer to top left of bounding box + (x2, y2) refer to bottom right of bounding box + Args: + boxes (Tensor[N, 4]): boxes in (x1, y1, x2, y2) which will be converted. + + Returns: + boxes (Tensor[N, 4]): boxes in (x, y, w, h) format. + """ + x1, y1, x2, y2 = boxes.unbind(-1) + w = x2 - x1 # x2 - x1 + h = y2 - y1 # y2 - y1 + boxes = torch.stack((x1, y1, w, h), dim=-1) + return boxes diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_register_onnx_ops.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_register_onnx_ops.py new file mode 100644 index 0000000000000000000000000000000000000000..1f32fc9bc0087155825fd2b03219fd47fbdc4c49 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_register_onnx_ops.py @@ -0,0 +1,107 @@ +import sys +import warnings + +import torch +from torch.onnx import symbolic_opset11 as opset11 +from torch.onnx.symbolic_helper import parse_args + +_ONNX_OPSET_VERSION_11 = 11 +_ONNX_OPSET_VERSION_16 = 16 +BASE_ONNX_OPSET_VERSION = _ONNX_OPSET_VERSION_11 + + +@parse_args("v", "v", "f") +def symbolic_multi_label_nms(g, boxes, scores, iou_threshold): + boxes = opset11.unsqueeze(g, boxes, 0) + scores = opset11.unsqueeze(g, opset11.unsqueeze(g, scores, 0), 0) + max_output_per_class = g.op("Constant", value_t=torch.tensor([sys.maxsize], dtype=torch.long)) + iou_threshold = g.op("Constant", value_t=torch.tensor([iou_threshold], dtype=torch.float)) + + # Cast boxes and scores to float32 in case they are float64 inputs + nms_out = g.op( + "NonMaxSuppression", + g.op("Cast", boxes, to_i=torch.onnx.TensorProtoDataType.FLOAT), + g.op("Cast", scores, to_i=torch.onnx.TensorProtoDataType.FLOAT), + max_output_per_class, + iou_threshold, + ) + return opset11.squeeze( + g, opset11.select(g, nms_out, 1, g.op("Constant", value_t=torch.tensor([2], dtype=torch.long))), 1 + ) + + +def _process_batch_indices_for_roi_align(g, rois): + indices = opset11.squeeze( + g, opset11.select(g, rois, 1, g.op("Constant", value_t=torch.tensor([0], dtype=torch.long))), 1 + ) + return g.op("Cast", indices, to_i=torch.onnx.TensorProtoDataType.INT64) + + +def _process_rois_for_roi_align(g, rois): + return opset11.select(g, rois, 1, g.op("Constant", value_t=torch.tensor([1, 2, 3, 4], dtype=torch.long))) + + +def _process_sampling_ratio_for_roi_align(g, sampling_ratio: int): + if sampling_ratio < 0: + warnings.warn( + "ONNX export for RoIAlign with a non-zero sampling_ratio is not supported. " + "The model will be exported with a sampling_ratio of 0." + ) + sampling_ratio = 0 + return sampling_ratio + + +@parse_args("v", "v", "f", "i", "i", "i", "i") +def roi_align_opset11(g, input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio, aligned): + batch_indices = _process_batch_indices_for_roi_align(g, rois) + rois = _process_rois_for_roi_align(g, rois) + if aligned: + warnings.warn( + "ROIAlign with aligned=True is only supported in opset >= 16. " + "Please export with opset 16 or higher, or use aligned=False." + ) + sampling_ratio = _process_sampling_ratio_for_roi_align(g, sampling_ratio) + return g.op( + "RoiAlign", + input, + rois, + batch_indices, + spatial_scale_f=spatial_scale, + output_height_i=pooled_height, + output_width_i=pooled_width, + sampling_ratio_i=sampling_ratio, + ) + + +@parse_args("v", "v", "f", "i", "i", "i", "i") +def roi_align_opset16(g, input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio, aligned): + batch_indices = _process_batch_indices_for_roi_align(g, rois) + rois = _process_rois_for_roi_align(g, rois) + coordinate_transformation_mode = "half_pixel" if aligned else "output_half_pixel" + sampling_ratio = _process_sampling_ratio_for_roi_align(g, sampling_ratio) + return g.op( + "RoiAlign", + input, + rois, + batch_indices, + coordinate_transformation_mode_s=coordinate_transformation_mode, + spatial_scale_f=spatial_scale, + output_height_i=pooled_height, + output_width_i=pooled_width, + sampling_ratio_i=sampling_ratio, + ) + + +@parse_args("v", "v", "f", "i", "i") +def roi_pool(g, input, rois, spatial_scale, pooled_height, pooled_width): + roi_pool = g.op( + "MaxRoiPool", input, rois, pooled_shape_i=(pooled_height, pooled_width), spatial_scale_f=spatial_scale + ) + return roi_pool, None + + +def _register_custom_op(): + torch.onnx.register_custom_op_symbolic("torchvision::nms", symbolic_multi_label_nms, _ONNX_OPSET_VERSION_11) + torch.onnx.register_custom_op_symbolic("torchvision::roi_align", roi_align_opset11, _ONNX_OPSET_VERSION_11) + torch.onnx.register_custom_op_symbolic("torchvision::roi_align", roi_align_opset16, _ONNX_OPSET_VERSION_16) + torch.onnx.register_custom_op_symbolic("torchvision::roi_pool", roi_pool, _ONNX_OPSET_VERSION_11) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..0fc95d9f7a1b1a2aba8418692e15883f1dd9af4e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/_utils.py @@ -0,0 +1,106 @@ +from typing import List, Optional, Tuple, Union + +import torch +from torch import nn, Tensor + + +def _cat(tensors: List[Tensor], dim: int = 0) -> Tensor: + """ + Efficient version of torch.cat that avoids a copy if there is only a single element in a list + """ + # TODO add back the assert + # assert isinstance(tensors, (list, tuple)) + if len(tensors) == 1: + return tensors[0] + return torch.cat(tensors, dim) + + +def convert_boxes_to_roi_format(boxes: List[Tensor]) -> Tensor: + concat_boxes = _cat([b for b in boxes], dim=0) + temp = [] + for i, b in enumerate(boxes): + temp.append(torch.full_like(b[:, :1], i)) + ids = _cat(temp, dim=0) + rois = torch.cat([ids, concat_boxes], dim=1) + return rois + + +def check_roi_boxes_shape(boxes: Union[Tensor, List[Tensor]]): + if isinstance(boxes, (list, tuple)): + for _tensor in boxes: + torch._assert( + _tensor.size(1) == 4, "The shape of the tensor in the boxes list is not correct as List[Tensor[L, 4]]" + ) + elif isinstance(boxes, torch.Tensor): + torch._assert(boxes.size(1) == 5, "The boxes tensor shape is not correct as Tensor[K, 5]") + else: + torch._assert(False, "boxes is expected to be a Tensor[L, 5] or a List[Tensor[K, 4]]") + return + + +def split_normalization_params( + model: nn.Module, norm_classes: Optional[List[type]] = None +) -> Tuple[List[Tensor], List[Tensor]]: + # Adapted from https://github.com/facebookresearch/ClassyVision/blob/659d7f78/classy_vision/generic/util.py#L501 + if not norm_classes: + norm_classes = [ + nn.modules.batchnorm._BatchNorm, + nn.LayerNorm, + nn.GroupNorm, + nn.modules.instancenorm._InstanceNorm, + nn.LocalResponseNorm, + ] + + for t in norm_classes: + if not issubclass(t, nn.Module): + raise ValueError(f"Class {t} is not a subclass of nn.Module.") + + classes = tuple(norm_classes) + + norm_params = [] + other_params = [] + for module in model.modules(): + if next(module.children(), None): + other_params.extend(p for p in module.parameters(recurse=False) if p.requires_grad) + elif isinstance(module, classes): + norm_params.extend(p for p in module.parameters() if p.requires_grad) + else: + other_params.extend(p for p in module.parameters() if p.requires_grad) + return norm_params, other_params + + +def _upcast(t: Tensor) -> Tensor: + # Protects from numerical overflows in multiplications by upcasting to the equivalent higher type + if t.is_floating_point(): + return t if t.dtype in (torch.float32, torch.float64) else t.float() + else: + return t if t.dtype in (torch.int32, torch.int64) else t.int() + + +def _upcast_non_float(t: Tensor) -> Tensor: + # Protects from numerical overflows in multiplications by upcasting to the equivalent higher type + if t.dtype not in (torch.float32, torch.float64): + return t.float() + return t + + +def _loss_inter_union( + boxes1: torch.Tensor, + boxes2: torch.Tensor, +) -> Tuple[torch.Tensor, torch.Tensor]: + + x1, y1, x2, y2 = boxes1.unbind(dim=-1) + x1g, y1g, x2g, y2g = boxes2.unbind(dim=-1) + + # Intersection keypoints + xkis1 = torch.max(x1, x1g) + ykis1 = torch.max(y1, y1g) + xkis2 = torch.min(x2, x2g) + ykis2 = torch.min(y2, y2g) + + intsctk = torch.zeros_like(x1) + mask = (ykis2 > ykis1) & (xkis2 > xkis1) + intsctk[mask] = (xkis2[mask] - xkis1[mask]) * (ykis2[mask] - ykis1[mask]) + unionk = (x2 - x1) * (y2 - y1) + (x2g - x1g) * (y2g - y1g) - intsctk + + return intsctk, unionk diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/boxes.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/boxes.py new file mode 100644 index 0000000000000000000000000000000000000000..9b92c42f43b4689fd8176d6015c6087f2afba4cd --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/boxes.py @@ -0,0 +1,439 @@ +from typing import Tuple + +import torch +import torchvision +from torch import Tensor +from torchvision.extension import _assert_has_ops + +from ..utils import _log_api_usage_once +from ._box_convert import _box_cxcywh_to_xyxy, _box_xywh_to_xyxy, _box_xyxy_to_cxcywh, _box_xyxy_to_xywh +from ._utils import _upcast + + +def nms(boxes: Tensor, scores: Tensor, iou_threshold: float) -> Tensor: + """ + Performs non-maximum suppression (NMS) on the boxes according + to their intersection-over-union (IoU). + + NMS iteratively removes lower scoring boxes which have an + IoU greater than ``iou_threshold`` with another (higher scoring) + box. + + If multiple boxes have the exact same score and satisfy the IoU + criterion with respect to a reference box, the selected box is + not guaranteed to be the same between CPU and GPU. This is similar + to the behavior of argsort in PyTorch when repeated values are present. + + Args: + boxes (Tensor[N, 4])): boxes to perform NMS on. They + are expected to be in ``(x1, y1, x2, y2)`` format with ``0 <= x1 < x2`` and + ``0 <= y1 < y2``. + scores (Tensor[N]): scores for each one of the boxes + iou_threshold (float): discards all overlapping boxes with IoU > iou_threshold + + Returns: + Tensor: int64 tensor with the indices of the elements that have been kept + by NMS, sorted in decreasing order of scores + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(nms) + _assert_has_ops() + return torch.ops.torchvision.nms(boxes, scores, iou_threshold) + + +def batched_nms( + boxes: Tensor, + scores: Tensor, + idxs: Tensor, + iou_threshold: float, +) -> Tensor: + """ + Performs non-maximum suppression in a batched fashion. + + Each index value correspond to a category, and NMS + will not be applied between elements of different categories. + + Args: + boxes (Tensor[N, 4]): boxes where NMS will be performed. They + are expected to be in ``(x1, y1, x2, y2)`` format with ``0 <= x1 < x2`` and + ``0 <= y1 < y2``. + scores (Tensor[N]): scores for each one of the boxes + idxs (Tensor[N]): indices of the categories for each one of the boxes. + iou_threshold (float): discards all overlapping boxes with IoU > iou_threshold + + Returns: + Tensor: int64 tensor with the indices of the elements that have been kept by NMS, sorted + in decreasing order of scores + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(batched_nms) + # Benchmarks that drove the following thresholds are at + # https://github.com/pytorch/vision/issues/1311#issuecomment-781329339 + if boxes.numel() > (4000 if boxes.device.type == "cpu" else 20000) and not torchvision._is_tracing(): + return _batched_nms_vanilla(boxes, scores, idxs, iou_threshold) + else: + return _batched_nms_coordinate_trick(boxes, scores, idxs, iou_threshold) + + +@torch.jit._script_if_tracing +def _batched_nms_coordinate_trick( + boxes: Tensor, + scores: Tensor, + idxs: Tensor, + iou_threshold: float, +) -> Tensor: + # strategy: in order to perform NMS independently per class, + # we add an offset to all the boxes. The offset is dependent + # only on the class idx, and is large enough so that boxes + # from different classes do not overlap + if boxes.numel() == 0: + return torch.empty((0,), dtype=torch.int64, device=boxes.device) + max_coordinate = boxes.max() + offsets = idxs.to(boxes) * (max_coordinate + torch.tensor(1).to(boxes)) + boxes_for_nms = boxes + offsets[:, None] + keep = nms(boxes_for_nms, scores, iou_threshold) + return keep + + +@torch.jit._script_if_tracing +def _batched_nms_vanilla( + boxes: Tensor, + scores: Tensor, + idxs: Tensor, + iou_threshold: float, +) -> Tensor: + # Based on Detectron2 implementation, just manually call nms() on each class independently + keep_mask = torch.zeros_like(scores, dtype=torch.bool) + for class_id in torch.unique(idxs): + curr_indices = torch.where(idxs == class_id)[0] + curr_keep_indices = nms(boxes[curr_indices], scores[curr_indices], iou_threshold) + keep_mask[curr_indices[curr_keep_indices]] = True + keep_indices = torch.where(keep_mask)[0] + return keep_indices[scores[keep_indices].sort(descending=True)[1]] + + +def remove_small_boxes(boxes: Tensor, min_size: float) -> Tensor: + """ + Remove every box from ``boxes`` which contains at least one side length + that is smaller than ``min_size``. + + .. note:: + For sanitizing a :class:`~torchvision.tv_tensors.BoundingBoxes` object, consider using + the transform :func:`~torchvision.transforms.v2.SanitizeBoundingBoxes` instead. + + Args: + boxes (Tensor[N, 4]): boxes in ``(x1, y1, x2, y2)`` format + with ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + min_size (float): minimum size + + Returns: + Tensor[K]: indices of the boxes that have both sides + larger than ``min_size`` + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(remove_small_boxes) + ws, hs = boxes[:, 2] - boxes[:, 0], boxes[:, 3] - boxes[:, 1] + keep = (ws >= min_size) & (hs >= min_size) + keep = torch.where(keep)[0] + return keep + + +def clip_boxes_to_image(boxes: Tensor, size: Tuple[int, int]) -> Tensor: + """ + Clip boxes so that they lie inside an image of size ``size``. + + .. note:: + For clipping a :class:`~torchvision.tv_tensors.BoundingBoxes` object, consider using + the transform :func:`~torchvision.transforms.v2.ClampBoundingBoxes` instead. + + Args: + boxes (Tensor[N, 4]): boxes in ``(x1, y1, x2, y2)`` format + with ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + size (Tuple[height, width]): size of the image + + Returns: + Tensor[N, 4]: clipped boxes + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(clip_boxes_to_image) + dim = boxes.dim() + boxes_x = boxes[..., 0::2] + boxes_y = boxes[..., 1::2] + height, width = size + + if torchvision._is_tracing(): + boxes_x = torch.max(boxes_x, torch.tensor(0, dtype=boxes.dtype, device=boxes.device)) + boxes_x = torch.min(boxes_x, torch.tensor(width, dtype=boxes.dtype, device=boxes.device)) + boxes_y = torch.max(boxes_y, torch.tensor(0, dtype=boxes.dtype, device=boxes.device)) + boxes_y = torch.min(boxes_y, torch.tensor(height, dtype=boxes.dtype, device=boxes.device)) + else: + boxes_x = boxes_x.clamp(min=0, max=width) + boxes_y = boxes_y.clamp(min=0, max=height) + + clipped_boxes = torch.stack((boxes_x, boxes_y), dim=dim) + return clipped_boxes.reshape(boxes.shape) + + +def box_convert(boxes: Tensor, in_fmt: str, out_fmt: str) -> Tensor: + """ + Converts :class:`torch.Tensor` boxes from a given ``in_fmt`` to ``out_fmt``. + + .. note:: + For converting a :class:`torch.Tensor` or a :class:`~torchvision.tv_tensors.BoundingBoxes` object + between different formats, + consider using :func:`~torchvision.transforms.v2.functional.convert_bounding_box_format` instead. + Or see the corresponding transform :func:`~torchvision.transforms.v2.ConvertBoundingBoxFormat`. + + Supported ``in_fmt`` and ``out_fmt`` strings are: + + ``'xyxy'``: boxes are represented via corners, x1, y1 being top left and x2, y2 being bottom right. + This is the format that torchvision utilities expect. + + ``'xywh'``: boxes are represented via corner, width and height, x1, y2 being top left, w, h being width and height. + + ``'cxcywh'``: boxes are represented via centre, width and height, cx, cy being center of box, w, h + being width and height. + + Args: + boxes (Tensor[N, 4]): boxes which will be converted. + in_fmt (str): Input format of given boxes. Supported formats are ['xyxy', 'xywh', 'cxcywh']. + out_fmt (str): Output format of given boxes. Supported formats are ['xyxy', 'xywh', 'cxcywh'] + + Returns: + Tensor[N, 4]: Boxes into converted format. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(box_convert) + allowed_fmts = ("xyxy", "xywh", "cxcywh") + if in_fmt not in allowed_fmts or out_fmt not in allowed_fmts: + raise ValueError("Unsupported Bounding Box Conversions for given in_fmt and out_fmt") + + if in_fmt == out_fmt: + return boxes.clone() + + if in_fmt != "xyxy" and out_fmt != "xyxy": + # convert to xyxy and change in_fmt xyxy + if in_fmt == "xywh": + boxes = _box_xywh_to_xyxy(boxes) + elif in_fmt == "cxcywh": + boxes = _box_cxcywh_to_xyxy(boxes) + in_fmt = "xyxy" + + if in_fmt == "xyxy": + if out_fmt == "xywh": + boxes = _box_xyxy_to_xywh(boxes) + elif out_fmt == "cxcywh": + boxes = _box_xyxy_to_cxcywh(boxes) + elif out_fmt == "xyxy": + if in_fmt == "xywh": + boxes = _box_xywh_to_xyxy(boxes) + elif in_fmt == "cxcywh": + boxes = _box_cxcywh_to_xyxy(boxes) + return boxes + + +def box_area(boxes: Tensor) -> Tensor: + """ + Computes the area of a set of bounding boxes, which are specified by their + (x1, y1, x2, y2) coordinates. + + Args: + boxes (Tensor[N, 4]): boxes for which the area will be computed. They + are expected to be in (x1, y1, x2, y2) format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + + Returns: + Tensor[N]: the area for each box + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(box_area) + boxes = _upcast(boxes) + return (boxes[:, 2] - boxes[:, 0]) * (boxes[:, 3] - boxes[:, 1]) + + +# implementation from https://github.com/kuangliu/torchcv/blob/master/torchcv/utils/box.py +# with slight modifications +def _box_inter_union(boxes1: Tensor, boxes2: Tensor) -> Tuple[Tensor, Tensor]: + area1 = box_area(boxes1) + area2 = box_area(boxes2) + + lt = torch.max(boxes1[:, None, :2], boxes2[:, :2]) # [N,M,2] + rb = torch.min(boxes1[:, None, 2:], boxes2[:, 2:]) # [N,M,2] + + wh = _upcast(rb - lt).clamp(min=0) # [N,M,2] + inter = wh[:, :, 0] * wh[:, :, 1] # [N,M] + + union = area1[:, None] + area2 - inter + + return inter, union + + +def box_iou(boxes1: Tensor, boxes2: Tensor) -> Tensor: + """ + Return intersection-over-union (Jaccard index) between two sets of boxes. + + Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + + Args: + boxes1 (Tensor[N, 4]): first set of boxes + boxes2 (Tensor[M, 4]): second set of boxes + + Returns: + Tensor[N, M]: the NxM matrix containing the pairwise IoU values for every element in boxes1 and boxes2 + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(box_iou) + inter, union = _box_inter_union(boxes1, boxes2) + iou = inter / union + return iou + + +# Implementation adapted from https://github.com/facebookresearch/detr/blob/master/util/box_ops.py +def generalized_box_iou(boxes1: Tensor, boxes2: Tensor) -> Tensor: + """ + Return generalized intersection-over-union (Jaccard index) between two sets of boxes. + + Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + + Args: + boxes1 (Tensor[N, 4]): first set of boxes + boxes2 (Tensor[M, 4]): second set of boxes + + Returns: + Tensor[N, M]: the NxM matrix containing the pairwise generalized IoU values + for every element in boxes1 and boxes2 + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(generalized_box_iou) + + inter, union = _box_inter_union(boxes1, boxes2) + iou = inter / union + + lti = torch.min(boxes1[:, None, :2], boxes2[:, :2]) + rbi = torch.max(boxes1[:, None, 2:], boxes2[:, 2:]) + + whi = _upcast(rbi - lti).clamp(min=0) # [N,M,2] + areai = whi[:, :, 0] * whi[:, :, 1] + + return iou - (areai - union) / areai + + +def complete_box_iou(boxes1: Tensor, boxes2: Tensor, eps: float = 1e-7) -> Tensor: + """ + Return complete intersection-over-union (Jaccard index) between two sets of boxes. + Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + Args: + boxes1 (Tensor[N, 4]): first set of boxes + boxes2 (Tensor[M, 4]): second set of boxes + eps (float, optional): small number to prevent division by zero. Default: 1e-7 + Returns: + Tensor[N, M]: the NxM matrix containing the pairwise complete IoU values + for every element in boxes1 and boxes2 + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(complete_box_iou) + + boxes1 = _upcast(boxes1) + boxes2 = _upcast(boxes2) + + diou, iou = _box_diou_iou(boxes1, boxes2, eps) + + w_pred = boxes1[:, None, 2] - boxes1[:, None, 0] + h_pred = boxes1[:, None, 3] - boxes1[:, None, 1] + + w_gt = boxes2[:, 2] - boxes2[:, 0] + h_gt = boxes2[:, 3] - boxes2[:, 1] + + v = (4 / (torch.pi**2)) * torch.pow(torch.atan(w_pred / h_pred) - torch.atan(w_gt / h_gt), 2) + with torch.no_grad(): + alpha = v / (1 - iou + v + eps) + return diou - alpha * v + + +def distance_box_iou(boxes1: Tensor, boxes2: Tensor, eps: float = 1e-7) -> Tensor: + """ + Return distance intersection-over-union (Jaccard index) between two sets of boxes. + + Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + + Args: + boxes1 (Tensor[N, 4]): first set of boxes + boxes2 (Tensor[M, 4]): second set of boxes + eps (float, optional): small number to prevent division by zero. Default: 1e-7 + + Returns: + Tensor[N, M]: the NxM matrix containing the pairwise distance IoU values + for every element in boxes1 and boxes2 + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(distance_box_iou) + + boxes1 = _upcast(boxes1) + boxes2 = _upcast(boxes2) + diou, _ = _box_diou_iou(boxes1, boxes2, eps=eps) + return diou + + +def _box_diou_iou(boxes1: Tensor, boxes2: Tensor, eps: float = 1e-7) -> Tuple[Tensor, Tensor]: + + iou = box_iou(boxes1, boxes2) + lti = torch.min(boxes1[:, None, :2], boxes2[:, :2]) + rbi = torch.max(boxes1[:, None, 2:], boxes2[:, 2:]) + whi = _upcast(rbi - lti).clamp(min=0) # [N,M,2] + diagonal_distance_squared = (whi[:, :, 0] ** 2) + (whi[:, :, 1] ** 2) + eps + # centers of boxes + x_p = (boxes1[:, 0] + boxes1[:, 2]) / 2 + y_p = (boxes1[:, 1] + boxes1[:, 3]) / 2 + x_g = (boxes2[:, 0] + boxes2[:, 2]) / 2 + y_g = (boxes2[:, 1] + boxes2[:, 3]) / 2 + # The distance between boxes' centers squared. + centers_distance_squared = (_upcast((x_p[:, None] - x_g[None, :])) ** 2) + ( + _upcast((y_p[:, None] - y_g[None, :])) ** 2 + ) + # The distance IoU is the IoU penalized by a normalized + # distance between boxes' centers squared. + return iou - (centers_distance_squared / diagonal_distance_squared), iou + + +def masks_to_boxes(masks: torch.Tensor) -> torch.Tensor: + """ + Compute the bounding boxes around the provided masks. + + Returns a [N, 4] tensor containing bounding boxes. The boxes are in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 <= x2`` and ``0 <= y1 <= y2``. + + .. warning:: + + In most cases the output will guarantee ``x1 < x2`` and ``y1 < y2``. But + if the input is degenerate, e.g. if a mask is a single row or a single + column, then the output may have x1 = x2 or y1 = y2. + + Args: + masks (Tensor[N, H, W]): masks to transform where N is the number of masks + and (H, W) are the spatial dimensions. + + Returns: + Tensor[N, 4]: bounding boxes + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(masks_to_boxes) + if masks.numel() == 0: + return torch.zeros((0, 4), device=masks.device, dtype=torch.float) + + n = masks.shape[0] + + bounding_boxes = torch.zeros((n, 4), device=masks.device, dtype=torch.float) + + for index, mask in enumerate(masks): + y, x = torch.where(mask != 0) + + bounding_boxes[index, 0] = torch.min(x) + bounding_boxes[index, 1] = torch.min(y) + bounding_boxes[index, 2] = torch.max(x) + bounding_boxes[index, 3] = torch.max(y) + + return bounding_boxes diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ciou_loss.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ciou_loss.py new file mode 100644 index 0000000000000000000000000000000000000000..ec93ae6029e33897ca91a5efe277bf49696de9ac --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ciou_loss.py @@ -0,0 +1,78 @@ +import torch + +from ..utils import _log_api_usage_once +from ._utils import _upcast_non_float +from .diou_loss import _diou_iou_loss + + +def complete_box_iou_loss( + boxes1: torch.Tensor, + boxes2: torch.Tensor, + reduction: str = "none", + eps: float = 1e-7, +) -> torch.Tensor: + + """ + Gradient-friendly IoU loss with an additional penalty that is non-zero when the + boxes do not overlap. This loss function considers important geometrical + factors such as overlap area, normalized central point distance and aspect ratio. + This loss is symmetric, so the boxes1 and boxes2 arguments are interchangeable. + + Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``, and The two boxes should have the + same dimensions. + + Args: + boxes1 : (Tensor[N, 4] or Tensor[4]) first set of boxes + boxes2 : (Tensor[N, 4] or Tensor[4]) second set of boxes + reduction : (string, optional) Specifies the reduction to apply to the output: + ``'none'`` | ``'mean'`` | ``'sum'``. ``'none'``: No reduction will be + applied to the output. ``'mean'``: The output will be averaged. + ``'sum'``: The output will be summed. Default: ``'none'`` + eps : (float): small number to prevent division by zero. Default: 1e-7 + + Returns: + Tensor: Loss tensor with the reduction option applied. + + Reference: + Zhaohui Zheng et al.: Complete Intersection over Union Loss: + https://arxiv.org/abs/1911.08287 + + """ + + # Original Implementation from https://github.com/facebookresearch/detectron2/blob/main/detectron2/layers/losses.py + + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(complete_box_iou_loss) + + boxes1 = _upcast_non_float(boxes1) + boxes2 = _upcast_non_float(boxes2) + + diou_loss, iou = _diou_iou_loss(boxes1, boxes2) + + x1, y1, x2, y2 = boxes1.unbind(dim=-1) + x1g, y1g, x2g, y2g = boxes2.unbind(dim=-1) + + # width and height of boxes + w_pred = x2 - x1 + h_pred = y2 - y1 + w_gt = x2g - x1g + h_gt = y2g - y1g + v = (4 / (torch.pi**2)) * torch.pow((torch.atan(w_gt / h_gt) - torch.atan(w_pred / h_pred)), 2) + with torch.no_grad(): + alpha = v / (1 - iou + v + eps) + + loss = diou_loss + alpha * v + + # Check reduction option and return loss accordingly + if reduction == "none": + pass + elif reduction == "mean": + loss = loss.mean() if loss.numel() > 0 else 0.0 * loss.sum() + elif reduction == "sum": + loss = loss.sum() + else: + raise ValueError( + f"Invalid Value for arg 'reduction': '{reduction} \n Supported reduction modes: 'none', 'mean', 'sum'" + ) + return loss diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/deform_conv.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/deform_conv.py new file mode 100644 index 0000000000000000000000000000000000000000..9050b0805f6511836c032c913257dfe99eb315ca --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/deform_conv.py @@ -0,0 +1,195 @@ +import math +from typing import Optional, Tuple + +import torch +from torch import nn, Tensor +from torch.nn import init +from torch.nn.modules.utils import _pair +from torch.nn.parameter import Parameter +from torchvision.extension import _assert_has_ops + +from ..utils import _log_api_usage_once + + +def deform_conv2d( + input: Tensor, + offset: Tensor, + weight: Tensor, + bias: Optional[Tensor] = None, + stride: Tuple[int, int] = (1, 1), + padding: Tuple[int, int] = (0, 0), + dilation: Tuple[int, int] = (1, 1), + mask: Optional[Tensor] = None, +) -> Tensor: + r""" + Performs Deformable Convolution v2, described in + `Deformable ConvNets v2: More Deformable, Better Results + `__ if :attr:`mask` is not ``None`` and + Performs Deformable Convolution, described in + `Deformable Convolutional Networks + `__ if :attr:`mask` is ``None``. + + Args: + input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor + offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, out_height, out_width]): + offsets to be applied for each position in the convolution kernel. + weight (Tensor[out_channels, in_channels // groups, kernel_height, kernel_width]): convolution weights, + split into groups of size (in_channels // groups) + bias (Tensor[out_channels]): optional bias of shape (out_channels,). Default: None + stride (int or Tuple[int, int]): distance between convolution centers. Default: 1 + padding (int or Tuple[int, int]): height/width of padding of zeroes around + each image. Default: 0 + dilation (int or Tuple[int, int]): the spacing between kernel elements. Default: 1 + mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width, out_height, out_width]): + masks to be applied for each position in the convolution kernel. Default: None + + Returns: + Tensor[batch_sz, out_channels, out_h, out_w]: result of convolution + + Examples:: + >>> input = torch.rand(4, 3, 10, 10) + >>> kh, kw = 3, 3 + >>> weight = torch.rand(5, 3, kh, kw) + >>> # offset and mask should have the same spatial size as the output + >>> # of the convolution. In this case, for an input of 10, stride of 1 + >>> # and kernel size of 3, without padding, the output size is 8 + >>> offset = torch.rand(4, 2 * kh * kw, 8, 8) + >>> mask = torch.rand(4, kh * kw, 8, 8) + >>> out = deform_conv2d(input, offset, weight, mask=mask) + >>> print(out.shape) + >>> # returns + >>> torch.Size([4, 5, 8, 8]) + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(deform_conv2d) + _assert_has_ops() + out_channels = weight.shape[0] + + use_mask = mask is not None + + if mask is None: + mask = torch.zeros((input.shape[0], 1), device=input.device, dtype=input.dtype) + + if bias is None: + bias = torch.zeros(out_channels, device=input.device, dtype=input.dtype) + + stride_h, stride_w = _pair(stride) + pad_h, pad_w = _pair(padding) + dil_h, dil_w = _pair(dilation) + weights_h, weights_w = weight.shape[-2:] + _, n_in_channels, _, _ = input.shape + + n_offset_grps = offset.shape[1] // (2 * weights_h * weights_w) + n_weight_grps = n_in_channels // weight.shape[1] + + if n_offset_grps == 0: + raise RuntimeError( + "the shape of the offset tensor at dimension 1 is not valid. It should " + "be a multiple of 2 * weight.size[2] * weight.size[3].\n" + f"Got offset.shape[1]={offset.shape[1]}, while 2 * weight.size[2] * weight.size[3]={2 * weights_h * weights_w}" + ) + + return torch.ops.torchvision.deform_conv2d( + input, + weight, + offset, + mask, + bias, + stride_h, + stride_w, + pad_h, + pad_w, + dil_h, + dil_w, + n_weight_grps, + n_offset_grps, + use_mask, + ) + + +class DeformConv2d(nn.Module): + """ + See :func:`deform_conv2d`. + """ + + def __init__( + self, + in_channels: int, + out_channels: int, + kernel_size: int, + stride: int = 1, + padding: int = 0, + dilation: int = 1, + groups: int = 1, + bias: bool = True, + ): + super().__init__() + _log_api_usage_once(self) + + if in_channels % groups != 0: + raise ValueError("in_channels must be divisible by groups") + if out_channels % groups != 0: + raise ValueError("out_channels must be divisible by groups") + + self.in_channels = in_channels + self.out_channels = out_channels + self.kernel_size = _pair(kernel_size) + self.stride = _pair(stride) + self.padding = _pair(padding) + self.dilation = _pair(dilation) + self.groups = groups + + self.weight = Parameter( + torch.empty(out_channels, in_channels // groups, self.kernel_size[0], self.kernel_size[1]) + ) + + if bias: + self.bias = Parameter(torch.empty(out_channels)) + else: + self.register_parameter("bias", None) + + self.reset_parameters() + + def reset_parameters(self) -> None: + init.kaiming_uniform_(self.weight, a=math.sqrt(5)) + + if self.bias is not None: + fan_in, _ = init._calculate_fan_in_and_fan_out(self.weight) + bound = 1 / math.sqrt(fan_in) + init.uniform_(self.bias, -bound, bound) + + def forward(self, input: Tensor, offset: Tensor, mask: Optional[Tensor] = None) -> Tensor: + """ + Args: + input (Tensor[batch_size, in_channels, in_height, in_width]): input tensor + offset (Tensor[batch_size, 2 * offset_groups * kernel_height * kernel_width, out_height, out_width]): + offsets to be applied for each position in the convolution kernel. + mask (Tensor[batch_size, offset_groups * kernel_height * kernel_width, out_height, out_width]): + masks to be applied for each position in the convolution kernel. + """ + return deform_conv2d( + input, + offset, + self.weight, + self.bias, + stride=self.stride, + padding=self.padding, + dilation=self.dilation, + mask=mask, + ) + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"{self.in_channels}" + f", {self.out_channels}" + f", kernel_size={self.kernel_size}" + f", stride={self.stride}" + ) + s += f", padding={self.padding}" if self.padding != (0, 0) else "" + s += f", dilation={self.dilation}" if self.dilation != (1, 1) else "" + s += f", groups={self.groups}" if self.groups != 1 else "" + s += ", bias=False" if self.bias is None else "" + s += ")" + + return s diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/diou_loss.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/diou_loss.py new file mode 100644 index 0000000000000000000000000000000000000000..53d95d05214f6c5cc7de46b8fc0bfb5a4e20c345 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/diou_loss.py @@ -0,0 +1,94 @@ +from typing import Tuple + +import torch + +from ..utils import _log_api_usage_once +from ._utils import _loss_inter_union, _upcast_non_float + + +def distance_box_iou_loss( + boxes1: torch.Tensor, + boxes2: torch.Tensor, + reduction: str = "none", + eps: float = 1e-7, +) -> torch.Tensor: + + """ + Gradient-friendly IoU loss with an additional penalty that is non-zero when the + distance between boxes' centers isn't zero. Indeed, for two exactly overlapping + boxes, the distance IoU is the same as the IoU loss. + This loss is symmetric, so the boxes1 and boxes2 arguments are interchangeable. + + Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``, and The two boxes should have the + same dimensions. + + Args: + boxes1 (Tensor[N, 4]): first set of boxes + boxes2 (Tensor[N, 4]): second set of boxes + reduction (string, optional): Specifies the reduction to apply to the output: + ``'none'`` | ``'mean'`` | ``'sum'``. ``'none'``: No reduction will be + applied to the output. ``'mean'``: The output will be averaged. + ``'sum'``: The output will be summed. Default: ``'none'`` + eps (float, optional): small number to prevent division by zero. Default: 1e-7 + + Returns: + Tensor: Loss tensor with the reduction option applied. + + Reference: + Zhaohui Zheng et al.: Distance Intersection over Union Loss: + https://arxiv.org/abs/1911.08287 + """ + + # Original Implementation from https://github.com/facebookresearch/detectron2/blob/main/detectron2/layers/losses.py + + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(distance_box_iou_loss) + + boxes1 = _upcast_non_float(boxes1) + boxes2 = _upcast_non_float(boxes2) + + loss, _ = _diou_iou_loss(boxes1, boxes2, eps) + + # Check reduction option and return loss accordingly + if reduction == "none": + pass + elif reduction == "mean": + loss = loss.mean() if loss.numel() > 0 else 0.0 * loss.sum() + elif reduction == "sum": + loss = loss.sum() + else: + raise ValueError( + f"Invalid Value for arg 'reduction': '{reduction} \n Supported reduction modes: 'none', 'mean', 'sum'" + ) + return loss + + +def _diou_iou_loss( + boxes1: torch.Tensor, + boxes2: torch.Tensor, + eps: float = 1e-7, +) -> Tuple[torch.Tensor, torch.Tensor]: + + intsct, union = _loss_inter_union(boxes1, boxes2) + iou = intsct / (union + eps) + # smallest enclosing box + x1, y1, x2, y2 = boxes1.unbind(dim=-1) + x1g, y1g, x2g, y2g = boxes2.unbind(dim=-1) + xc1 = torch.min(x1, x1g) + yc1 = torch.min(y1, y1g) + xc2 = torch.max(x2, x2g) + yc2 = torch.max(y2, y2g) + # The diagonal distance of the smallest enclosing box squared + diagonal_distance_squared = ((xc2 - xc1) ** 2) + ((yc2 - yc1) ** 2) + eps + # centers of boxes + x_p = (x2 + x1) / 2 + y_p = (y2 + y1) / 2 + x_g = (x1g + x2g) / 2 + y_g = (y1g + y2g) / 2 + # The distance between boxes' centers squared. + centers_distance_squared = ((x_p - x_g) ** 2) + ((y_p - y_g) ** 2) + # The distance IoU is the IoU penalized by a normalized + # distance between boxes' centers squared. + loss = 1 - iou + (centers_distance_squared / diagonal_distance_squared) + return loss, iou diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/drop_block.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/drop_block.py new file mode 100644 index 0000000000000000000000000000000000000000..d0e7bd86d3a08d5151f24b9e5d3e366a24818bfb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/drop_block.py @@ -0,0 +1,155 @@ +import torch +import torch.fx +import torch.nn.functional as F +from torch import nn, Tensor + +from ..utils import _log_api_usage_once + + +def drop_block2d( + input: Tensor, p: float, block_size: int, inplace: bool = False, eps: float = 1e-06, training: bool = True +) -> Tensor: + """ + Implements DropBlock2d from `"DropBlock: A regularization method for convolutional networks" + `. + + Args: + input (Tensor[N, C, H, W]): The input tensor or 4-dimensions with the first one + being its batch i.e. a batch with ``N`` rows. + p (float): Probability of an element to be dropped. + block_size (int): Size of the block to drop. + inplace (bool): If set to ``True``, will do this operation in-place. Default: ``False``. + eps (float): A value added to the denominator for numerical stability. Default: 1e-6. + training (bool): apply dropblock if is ``True``. Default: ``True``. + + Returns: + Tensor[N, C, H, W]: The randomly zeroed tensor after dropblock. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(drop_block2d) + if p < 0.0 or p > 1.0: + raise ValueError(f"drop probability has to be between 0 and 1, but got {p}.") + if input.ndim != 4: + raise ValueError(f"input should be 4 dimensional. Got {input.ndim} dimensions.") + if not training or p == 0.0: + return input + + N, C, H, W = input.size() + block_size = min(block_size, W, H) + # compute the gamma of Bernoulli distribution + gamma = (p * H * W) / ((block_size**2) * ((H - block_size + 1) * (W - block_size + 1))) + noise = torch.empty((N, C, H - block_size + 1, W - block_size + 1), dtype=input.dtype, device=input.device) + noise.bernoulli_(gamma) + + noise = F.pad(noise, [block_size // 2] * 4, value=0) + noise = F.max_pool2d(noise, stride=(1, 1), kernel_size=(block_size, block_size), padding=block_size // 2) + noise = 1 - noise + normalize_scale = noise.numel() / (eps + noise.sum()) + if inplace: + input.mul_(noise).mul_(normalize_scale) + else: + input = input * noise * normalize_scale + return input + + +def drop_block3d( + input: Tensor, p: float, block_size: int, inplace: bool = False, eps: float = 1e-06, training: bool = True +) -> Tensor: + """ + Implements DropBlock3d from `"DropBlock: A regularization method for convolutional networks" + `. + + Args: + input (Tensor[N, C, D, H, W]): The input tensor or 5-dimensions with the first one + being its batch i.e. a batch with ``N`` rows. + p (float): Probability of an element to be dropped. + block_size (int): Size of the block to drop. + inplace (bool): If set to ``True``, will do this operation in-place. Default: ``False``. + eps (float): A value added to the denominator for numerical stability. Default: 1e-6. + training (bool): apply dropblock if is ``True``. Default: ``True``. + + Returns: + Tensor[N, C, D, H, W]: The randomly zeroed tensor after dropblock. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(drop_block3d) + if p < 0.0 or p > 1.0: + raise ValueError(f"drop probability has to be between 0 and 1, but got {p}.") + if input.ndim != 5: + raise ValueError(f"input should be 5 dimensional. Got {input.ndim} dimensions.") + if not training or p == 0.0: + return input + + N, C, D, H, W = input.size() + block_size = min(block_size, D, H, W) + # compute the gamma of Bernoulli distribution + gamma = (p * D * H * W) / ((block_size**3) * ((D - block_size + 1) * (H - block_size + 1) * (W - block_size + 1))) + noise = torch.empty( + (N, C, D - block_size + 1, H - block_size + 1, W - block_size + 1), dtype=input.dtype, device=input.device + ) + noise.bernoulli_(gamma) + + noise = F.pad(noise, [block_size // 2] * 6, value=0) + noise = F.max_pool3d( + noise, stride=(1, 1, 1), kernel_size=(block_size, block_size, block_size), padding=block_size // 2 + ) + noise = 1 - noise + normalize_scale = noise.numel() / (eps + noise.sum()) + if inplace: + input.mul_(noise).mul_(normalize_scale) + else: + input = input * noise * normalize_scale + return input + + +torch.fx.wrap("drop_block2d") + + +class DropBlock2d(nn.Module): + """ + See :func:`drop_block2d`. + """ + + def __init__(self, p: float, block_size: int, inplace: bool = False, eps: float = 1e-06) -> None: + super().__init__() + + self.p = p + self.block_size = block_size + self.inplace = inplace + self.eps = eps + + def forward(self, input: Tensor) -> Tensor: + """ + Args: + input (Tensor): Input feature map on which some areas will be randomly + dropped. + Returns: + Tensor: The tensor after DropBlock layer. + """ + return drop_block2d(input, self.p, self.block_size, self.inplace, self.eps, self.training) + + def __repr__(self) -> str: + s = f"{self.__class__.__name__}(p={self.p}, block_size={self.block_size}, inplace={self.inplace})" + return s + + +torch.fx.wrap("drop_block3d") + + +class DropBlock3d(DropBlock2d): + """ + See :func:`drop_block3d`. + """ + + def __init__(self, p: float, block_size: int, inplace: bool = False, eps: float = 1e-06) -> None: + super().__init__(p, block_size, inplace, eps) + + def forward(self, input: Tensor) -> Tensor: + """ + Args: + input (Tensor): Input feature map on which some areas will be randomly + dropped. + Returns: + Tensor: The tensor after DropBlock layer. + """ + return drop_block3d(input, self.p, self.block_size, self.inplace, self.eps, self.training) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/feature_pyramid_network.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/feature_pyramid_network.py new file mode 100644 index 0000000000000000000000000000000000000000..7f38198851350b14bf82583798f464e016a1366b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/feature_pyramid_network.py @@ -0,0 +1,250 @@ +from collections import OrderedDict +from typing import Callable, Dict, List, Optional, Tuple + +import torch.nn.functional as F +from torch import nn, Tensor + +from ..ops.misc import Conv2dNormActivation +from ..utils import _log_api_usage_once + + +class ExtraFPNBlock(nn.Module): + """ + Base class for the extra block in the FPN. + + Args: + results (List[Tensor]): the result of the FPN + x (List[Tensor]): the original feature maps + names (List[str]): the names for each one of the + original feature maps + + Returns: + results (List[Tensor]): the extended set of results + of the FPN + names (List[str]): the extended set of names for the results + """ + + def forward( + self, + results: List[Tensor], + x: List[Tensor], + names: List[str], + ) -> Tuple[List[Tensor], List[str]]: + pass + + +class FeaturePyramidNetwork(nn.Module): + """ + Module that adds a FPN from on top of a set of feature maps. This is based on + `"Feature Pyramid Network for Object Detection" `_. + + The feature maps are currently supposed to be in increasing depth + order. + + The input to the model is expected to be an OrderedDict[Tensor], containing + the feature maps on top of which the FPN will be added. + + Args: + in_channels_list (list[int]): number of channels for each feature map that + is passed to the module + out_channels (int): number of channels of the FPN representation + extra_blocks (ExtraFPNBlock or None): if provided, extra operations will + be performed. It is expected to take the fpn features, the original + features and the names of the original features as input, and returns + a new list of feature maps and their corresponding names + norm_layer (callable, optional): Module specifying the normalization layer to use. Default: None + + Examples:: + + >>> m = torchvision.ops.FeaturePyramidNetwork([10, 20, 30], 5) + >>> # get some dummy data + >>> x = OrderedDict() + >>> x['feat0'] = torch.rand(1, 10, 64, 64) + >>> x['feat2'] = torch.rand(1, 20, 16, 16) + >>> x['feat3'] = torch.rand(1, 30, 8, 8) + >>> # compute the FPN on top of x + >>> output = m(x) + >>> print([(k, v.shape) for k, v in output.items()]) + >>> # returns + >>> [('feat0', torch.Size([1, 5, 64, 64])), + >>> ('feat2', torch.Size([1, 5, 16, 16])), + >>> ('feat3', torch.Size([1, 5, 8, 8]))] + + """ + + _version = 2 + + def __init__( + self, + in_channels_list: List[int], + out_channels: int, + extra_blocks: Optional[ExtraFPNBlock] = None, + norm_layer: Optional[Callable[..., nn.Module]] = None, + ): + super().__init__() + _log_api_usage_once(self) + self.inner_blocks = nn.ModuleList() + self.layer_blocks = nn.ModuleList() + for in_channels in in_channels_list: + if in_channels == 0: + raise ValueError("in_channels=0 is currently not supported") + inner_block_module = Conv2dNormActivation( + in_channels, out_channels, kernel_size=1, padding=0, norm_layer=norm_layer, activation_layer=None + ) + layer_block_module = Conv2dNormActivation( + out_channels, out_channels, kernel_size=3, norm_layer=norm_layer, activation_layer=None + ) + self.inner_blocks.append(inner_block_module) + self.layer_blocks.append(layer_block_module) + + # initialize parameters now to avoid modifying the initialization of top_blocks + for m in self.modules(): + if isinstance(m, nn.Conv2d): + nn.init.kaiming_uniform_(m.weight, a=1) + if m.bias is not None: + nn.init.constant_(m.bias, 0) + + if extra_blocks is not None: + if not isinstance(extra_blocks, ExtraFPNBlock): + raise TypeError(f"extra_blocks should be of type ExtraFPNBlock not {type(extra_blocks)}") + self.extra_blocks = extra_blocks + + def _load_from_state_dict( + self, + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ): + version = local_metadata.get("version", None) + + if version is None or version < 2: + num_blocks = len(self.inner_blocks) + for block in ["inner_blocks", "layer_blocks"]: + for i in range(num_blocks): + for type in ["weight", "bias"]: + old_key = f"{prefix}{block}.{i}.{type}" + new_key = f"{prefix}{block}.{i}.0.{type}" + if old_key in state_dict: + state_dict[new_key] = state_dict.pop(old_key) + + super()._load_from_state_dict( + state_dict, + prefix, + local_metadata, + strict, + missing_keys, + unexpected_keys, + error_msgs, + ) + + def get_result_from_inner_blocks(self, x: Tensor, idx: int) -> Tensor: + """ + This is equivalent to self.inner_blocks[idx](x), + but torchscript doesn't support this yet + """ + num_blocks = len(self.inner_blocks) + if idx < 0: + idx += num_blocks + out = x + for i, module in enumerate(self.inner_blocks): + if i == idx: + out = module(x) + return out + + def get_result_from_layer_blocks(self, x: Tensor, idx: int) -> Tensor: + """ + This is equivalent to self.layer_blocks[idx](x), + but torchscript doesn't support this yet + """ + num_blocks = len(self.layer_blocks) + if idx < 0: + idx += num_blocks + out = x + for i, module in enumerate(self.layer_blocks): + if i == idx: + out = module(x) + return out + + def forward(self, x: Dict[str, Tensor]) -> Dict[str, Tensor]: + """ + Computes the FPN for a set of feature maps. + + Args: + x (OrderedDict[Tensor]): feature maps for each feature level. + + Returns: + results (OrderedDict[Tensor]): feature maps after FPN layers. + They are ordered from the highest resolution first. + """ + # unpack OrderedDict into two lists for easier handling + names = list(x.keys()) + x = list(x.values()) + + last_inner = self.get_result_from_inner_blocks(x[-1], -1) + results = [] + results.append(self.get_result_from_layer_blocks(last_inner, -1)) + + for idx in range(len(x) - 2, -1, -1): + inner_lateral = self.get_result_from_inner_blocks(x[idx], idx) + feat_shape = inner_lateral.shape[-2:] + inner_top_down = F.interpolate(last_inner, size=feat_shape, mode="nearest") + last_inner = inner_lateral + inner_top_down + results.insert(0, self.get_result_from_layer_blocks(last_inner, idx)) + + if self.extra_blocks is not None: + results, names = self.extra_blocks(results, x, names) + + # make it back an OrderedDict + out = OrderedDict([(k, v) for k, v in zip(names, results)]) + + return out + + +class LastLevelMaxPool(ExtraFPNBlock): + """ + Applies a max_pool2d (not actual max_pool2d, we just subsample) on top of the last feature map + """ + + def forward( + self, + x: List[Tensor], + y: List[Tensor], + names: List[str], + ) -> Tuple[List[Tensor], List[str]]: + names.append("pool") + # Use max pooling to simulate stride 2 subsampling + x.append(F.max_pool2d(x[-1], kernel_size=1, stride=2, padding=0)) + return x, names + + +class LastLevelP6P7(ExtraFPNBlock): + """ + This module is used in RetinaNet to generate extra layers, P6 and P7. + """ + + def __init__(self, in_channels: int, out_channels: int): + super().__init__() + self.p6 = nn.Conv2d(in_channels, out_channels, 3, 2, 1) + self.p7 = nn.Conv2d(out_channels, out_channels, 3, 2, 1) + for module in [self.p6, self.p7]: + nn.init.kaiming_uniform_(module.weight, a=1) + nn.init.constant_(module.bias, 0) + self.use_P5 = in_channels == out_channels + + def forward( + self, + p: List[Tensor], + c: List[Tensor], + names: List[str], + ) -> Tuple[List[Tensor], List[str]]: + p5, c5 = p[-1], c[-1] + x = p5 if self.use_P5 else c5 + p6 = self.p6(x) + p7 = self.p7(F.relu(p6)) + p.extend([p6, p7]) + names.extend(["p6", "p7"]) + return p, names diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/focal_loss.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/focal_loss.py new file mode 100644 index 0000000000000000000000000000000000000000..d9d1eaa7e5fc2a891c3201b17eeba27a1a183e31 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/focal_loss.py @@ -0,0 +1,58 @@ +import torch +import torch.nn.functional as F + +from ..utils import _log_api_usage_once + + +def sigmoid_focal_loss( + inputs: torch.Tensor, + targets: torch.Tensor, + alpha: float = 0.25, + gamma: float = 2, + reduction: str = "none", +) -> torch.Tensor: + """ + Loss used in RetinaNet for dense detection: https://arxiv.org/abs/1708.02002. + + Args: + inputs (Tensor): A float tensor of arbitrary shape. + The predictions for each example. + targets (Tensor): A float tensor with the same shape as inputs. Stores the binary + classification label for each element in inputs + (0 for the negative class and 1 for the positive class). + alpha (float): Weighting factor in range (0,1) to balance + positive vs negative examples or -1 for ignore. Default: ``0.25``. + gamma (float): Exponent of the modulating factor (1 - p_t) to + balance easy vs hard examples. Default: ``2``. + reduction (string): ``'none'`` | ``'mean'`` | ``'sum'`` + ``'none'``: No reduction will be applied to the output. + ``'mean'``: The output will be averaged. + ``'sum'``: The output will be summed. Default: ``'none'``. + Returns: + Loss tensor with the reduction option applied. + """ + # Original implementation from https://github.com/facebookresearch/fvcore/blob/master/fvcore/nn/focal_loss.py + + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(sigmoid_focal_loss) + p = torch.sigmoid(inputs) + ce_loss = F.binary_cross_entropy_with_logits(inputs, targets, reduction="none") + p_t = p * targets + (1 - p) * (1 - targets) + loss = ce_loss * ((1 - p_t) ** gamma) + + if alpha >= 0: + alpha_t = alpha * targets + (1 - alpha) * (1 - targets) + loss = alpha_t * loss + + # Check reduction option and return loss accordingly + if reduction == "none": + pass + elif reduction == "mean": + loss = loss.mean() + elif reduction == "sum": + loss = loss.sum() + else: + raise ValueError( + f"Invalid Value for arg 'reduction': '{reduction} \n Supported reduction modes: 'none', 'mean', 'sum'" + ) + return loss diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/giou_loss.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/giou_loss.py new file mode 100644 index 0000000000000000000000000000000000000000..e727c62318820e2800a20d66dfa5b0152369e296 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/giou_loss.py @@ -0,0 +1,76 @@ +import torch + +from ..utils import _log_api_usage_once +from ._utils import _loss_inter_union, _upcast_non_float + + +def generalized_box_iou_loss( + boxes1: torch.Tensor, + boxes2: torch.Tensor, + reduction: str = "none", + eps: float = 1e-7, +) -> torch.Tensor: + + """ + Gradient-friendly IoU loss with an additional penalty that is non-zero when the + boxes do not overlap and scales with the size of their smallest enclosing box. + This loss is symmetric, so the boxes1 and boxes2 arguments are interchangeable. + + Both sets of boxes are expected to be in ``(x1, y1, x2, y2)`` format with + ``0 <= x1 < x2`` and ``0 <= y1 < y2``, and The two boxes should have the + same dimensions. + + Args: + boxes1 (Tensor[N, 4] or Tensor[4]): first set of boxes + boxes2 (Tensor[N, 4] or Tensor[4]): second set of boxes + reduction (string, optional): Specifies the reduction to apply to the output: + ``'none'`` | ``'mean'`` | ``'sum'``. ``'none'``: No reduction will be + applied to the output. ``'mean'``: The output will be averaged. + ``'sum'``: The output will be summed. Default: ``'none'`` + eps (float): small number to prevent division by zero. Default: 1e-7 + + Returns: + Tensor: Loss tensor with the reduction option applied. + + Reference: + Hamid Rezatofighi et al.: Generalized Intersection over Union: + A Metric and A Loss for Bounding Box Regression: + https://arxiv.org/abs/1902.09630 + """ + + # Original implementation from https://github.com/facebookresearch/fvcore/blob/bfff2ef/fvcore/nn/giou_loss.py + + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(generalized_box_iou_loss) + + boxes1 = _upcast_non_float(boxes1) + boxes2 = _upcast_non_float(boxes2) + intsctk, unionk = _loss_inter_union(boxes1, boxes2) + iouk = intsctk / (unionk + eps) + + x1, y1, x2, y2 = boxes1.unbind(dim=-1) + x1g, y1g, x2g, y2g = boxes2.unbind(dim=-1) + + # smallest enclosing box + xc1 = torch.min(x1, x1g) + yc1 = torch.min(y1, y1g) + xc2 = torch.max(x2, x2g) + yc2 = torch.max(y2, y2g) + + area_c = (xc2 - xc1) * (yc2 - yc1) + miouk = iouk - ((area_c - unionk) / (area_c + eps)) + + loss = 1 - miouk + + # Check reduction option and return loss accordingly + if reduction == "none": + pass + elif reduction == "mean": + loss = loss.mean() if loss.numel() > 0 else 0.0 * loss.sum() + elif reduction == "sum": + loss = loss.sum() + else: + raise ValueError( + f"Invalid Value for arg 'reduction': '{reduction} \n Supported reduction modes: 'none', 'mean', 'sum'" + ) + return loss diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/misc.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/misc.py new file mode 100644 index 0000000000000000000000000000000000000000..f1e85abf989d6d2e823422bd27a334ef0366a78a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/misc.py @@ -0,0 +1,320 @@ +import warnings +from typing import Callable, List, Optional, Sequence, Tuple, Union + +import torch +from torch import Tensor + +from ..utils import _log_api_usage_once, _make_ntuple + + +interpolate = torch.nn.functional.interpolate + + +class FrozenBatchNorm2d(torch.nn.Module): + """ + BatchNorm2d where the batch statistics and the affine parameters are fixed + + Args: + num_features (int): Number of features ``C`` from an expected input of size ``(N, C, H, W)`` + eps (float): a value added to the denominator for numerical stability. Default: 1e-5 + """ + + def __init__( + self, + num_features: int, + eps: float = 1e-5, + ): + super().__init__() + _log_api_usage_once(self) + self.eps = eps + self.register_buffer("weight", torch.ones(num_features)) + self.register_buffer("bias", torch.zeros(num_features)) + self.register_buffer("running_mean", torch.zeros(num_features)) + self.register_buffer("running_var", torch.ones(num_features)) + + def _load_from_state_dict( + self, + state_dict: dict, + prefix: str, + local_metadata: dict, + strict: bool, + missing_keys: List[str], + unexpected_keys: List[str], + error_msgs: List[str], + ): + num_batches_tracked_key = prefix + "num_batches_tracked" + if num_batches_tracked_key in state_dict: + del state_dict[num_batches_tracked_key] + + super()._load_from_state_dict( + state_dict, prefix, local_metadata, strict, missing_keys, unexpected_keys, error_msgs + ) + + def forward(self, x: Tensor) -> Tensor: + # move reshapes to the beginning + # to make it fuser-friendly + w = self.weight.reshape(1, -1, 1, 1) + b = self.bias.reshape(1, -1, 1, 1) + rv = self.running_var.reshape(1, -1, 1, 1) + rm = self.running_mean.reshape(1, -1, 1, 1) + scale = w * (rv + self.eps).rsqrt() + bias = b - rm * scale + return x * scale + bias + + def __repr__(self) -> str: + return f"{self.__class__.__name__}({self.weight.shape[0]}, eps={self.eps})" + + +class ConvNormActivation(torch.nn.Sequential): + def __init__( + self, + in_channels: int, + out_channels: int, + kernel_size: Union[int, Tuple[int, ...]] = 3, + stride: Union[int, Tuple[int, ...]] = 1, + padding: Optional[Union[int, Tuple[int, ...], str]] = None, + groups: int = 1, + norm_layer: Optional[Callable[..., torch.nn.Module]] = torch.nn.BatchNorm2d, + activation_layer: Optional[Callable[..., torch.nn.Module]] = torch.nn.ReLU, + dilation: Union[int, Tuple[int, ...]] = 1, + inplace: Optional[bool] = True, + bias: Optional[bool] = None, + conv_layer: Callable[..., torch.nn.Module] = torch.nn.Conv2d, + ) -> None: + + if padding is None: + if isinstance(kernel_size, int) and isinstance(dilation, int): + padding = (kernel_size - 1) // 2 * dilation + else: + _conv_dim = len(kernel_size) if isinstance(kernel_size, Sequence) else len(dilation) + kernel_size = _make_ntuple(kernel_size, _conv_dim) + dilation = _make_ntuple(dilation, _conv_dim) + padding = tuple((kernel_size[i] - 1) // 2 * dilation[i] for i in range(_conv_dim)) + if bias is None: + bias = norm_layer is None + + layers = [ + conv_layer( + in_channels, + out_channels, + kernel_size, + stride, + padding, + dilation=dilation, + groups=groups, + bias=bias, + ) + ] + + if norm_layer is not None: + layers.append(norm_layer(out_channels)) + + if activation_layer is not None: + params = {} if inplace is None else {"inplace": inplace} + layers.append(activation_layer(**params)) + super().__init__(*layers) + _log_api_usage_once(self) + self.out_channels = out_channels + + if self.__class__ == ConvNormActivation: + warnings.warn( + "Don't use ConvNormActivation directly, please use Conv2dNormActivation and Conv3dNormActivation instead." + ) + + +class Conv2dNormActivation(ConvNormActivation): + """ + Configurable block used for Convolution2d-Normalization-Activation blocks. + + Args: + in_channels (int): Number of channels in the input image + out_channels (int): Number of channels produced by the Convolution-Normalization-Activation block + kernel_size: (int, optional): Size of the convolving kernel. Default: 3 + stride (int, optional): Stride of the convolution. Default: 1 + padding (int, tuple or str, optional): Padding added to all four sides of the input. Default: None, in which case it will be calculated as ``padding = (kernel_size - 1) // 2 * dilation`` + groups (int, optional): Number of blocked connections from input channels to output channels. Default: 1 + norm_layer (Callable[..., torch.nn.Module], optional): Norm layer that will be stacked on top of the convolution layer. If ``None`` this layer won't be used. Default: ``torch.nn.BatchNorm2d`` + activation_layer (Callable[..., torch.nn.Module], optional): Activation function which will be stacked on top of the normalization layer (if not None), otherwise on top of the conv layer. If ``None`` this layer won't be used. Default: ``torch.nn.ReLU`` + dilation (int): Spacing between kernel elements. Default: 1 + inplace (bool): Parameter for the activation layer, which can optionally do the operation in-place. Default ``True`` + bias (bool, optional): Whether to use bias in the convolution layer. By default, biases are included if ``norm_layer is None``. + + """ + + def __init__( + self, + in_channels: int, + out_channels: int, + kernel_size: Union[int, Tuple[int, int]] = 3, + stride: Union[int, Tuple[int, int]] = 1, + padding: Optional[Union[int, Tuple[int, int], str]] = None, + groups: int = 1, + norm_layer: Optional[Callable[..., torch.nn.Module]] = torch.nn.BatchNorm2d, + activation_layer: Optional[Callable[..., torch.nn.Module]] = torch.nn.ReLU, + dilation: Union[int, Tuple[int, int]] = 1, + inplace: Optional[bool] = True, + bias: Optional[bool] = None, + ) -> None: + + super().__init__( + in_channels, + out_channels, + kernel_size, + stride, + padding, + groups, + norm_layer, + activation_layer, + dilation, + inplace, + bias, + torch.nn.Conv2d, + ) + + +class Conv3dNormActivation(ConvNormActivation): + """ + Configurable block used for Convolution3d-Normalization-Activation blocks. + + Args: + in_channels (int): Number of channels in the input video. + out_channels (int): Number of channels produced by the Convolution-Normalization-Activation block + kernel_size: (int, optional): Size of the convolving kernel. Default: 3 + stride (int, optional): Stride of the convolution. Default: 1 + padding (int, tuple or str, optional): Padding added to all four sides of the input. Default: None, in which case it will be calculated as ``padding = (kernel_size - 1) // 2 * dilation`` + groups (int, optional): Number of blocked connections from input channels to output channels. Default: 1 + norm_layer (Callable[..., torch.nn.Module], optional): Norm layer that will be stacked on top of the convolution layer. If ``None`` this layer won't be used. Default: ``torch.nn.BatchNorm3d`` + activation_layer (Callable[..., torch.nn.Module], optional): Activation function which will be stacked on top of the normalization layer (if not None), otherwise on top of the conv layer. If ``None`` this layer won't be used. Default: ``torch.nn.ReLU`` + dilation (int): Spacing between kernel elements. Default: 1 + inplace (bool): Parameter for the activation layer, which can optionally do the operation in-place. Default ``True`` + bias (bool, optional): Whether to use bias in the convolution layer. By default, biases are included if ``norm_layer is None``. + """ + + def __init__( + self, + in_channels: int, + out_channels: int, + kernel_size: Union[int, Tuple[int, int, int]] = 3, + stride: Union[int, Tuple[int, int, int]] = 1, + padding: Optional[Union[int, Tuple[int, int, int], str]] = None, + groups: int = 1, + norm_layer: Optional[Callable[..., torch.nn.Module]] = torch.nn.BatchNorm3d, + activation_layer: Optional[Callable[..., torch.nn.Module]] = torch.nn.ReLU, + dilation: Union[int, Tuple[int, int, int]] = 1, + inplace: Optional[bool] = True, + bias: Optional[bool] = None, + ) -> None: + + super().__init__( + in_channels, + out_channels, + kernel_size, + stride, + padding, + groups, + norm_layer, + activation_layer, + dilation, + inplace, + bias, + torch.nn.Conv3d, + ) + + +class SqueezeExcitation(torch.nn.Module): + """ + This block implements the Squeeze-and-Excitation block from https://arxiv.org/abs/1709.01507 (see Fig. 1). + Parameters ``activation``, and ``scale_activation`` correspond to ``delta`` and ``sigma`` in eq. 3. + + Args: + input_channels (int): Number of channels in the input image + squeeze_channels (int): Number of squeeze channels + activation (Callable[..., torch.nn.Module], optional): ``delta`` activation. Default: ``torch.nn.ReLU`` + scale_activation (Callable[..., torch.nn.Module]): ``sigma`` activation. Default: ``torch.nn.Sigmoid`` + """ + + def __init__( + self, + input_channels: int, + squeeze_channels: int, + activation: Callable[..., torch.nn.Module] = torch.nn.ReLU, + scale_activation: Callable[..., torch.nn.Module] = torch.nn.Sigmoid, + ) -> None: + super().__init__() + _log_api_usage_once(self) + self.avgpool = torch.nn.AdaptiveAvgPool2d(1) + self.fc1 = torch.nn.Conv2d(input_channels, squeeze_channels, 1) + self.fc2 = torch.nn.Conv2d(squeeze_channels, input_channels, 1) + self.activation = activation() + self.scale_activation = scale_activation() + + def _scale(self, input: Tensor) -> Tensor: + scale = self.avgpool(input) + scale = self.fc1(scale) + scale = self.activation(scale) + scale = self.fc2(scale) + return self.scale_activation(scale) + + def forward(self, input: Tensor) -> Tensor: + scale = self._scale(input) + return scale * input + + +class MLP(torch.nn.Sequential): + """This block implements the multi-layer perceptron (MLP) module. + + Args: + in_channels (int): Number of channels of the input + hidden_channels (List[int]): List of the hidden channel dimensions + norm_layer (Callable[..., torch.nn.Module], optional): Norm layer that will be stacked on top of the linear layer. If ``None`` this layer won't be used. Default: ``None`` + activation_layer (Callable[..., torch.nn.Module], optional): Activation function which will be stacked on top of the normalization layer (if not None), otherwise on top of the linear layer. If ``None`` this layer won't be used. Default: ``torch.nn.ReLU`` + inplace (bool, optional): Parameter for the activation layer, which can optionally do the operation in-place. + Default is ``None``, which uses the respective default values of the ``activation_layer`` and Dropout layer. + bias (bool): Whether to use bias in the linear layer. Default ``True`` + dropout (float): The probability for the dropout layer. Default: 0.0 + """ + + def __init__( + self, + in_channels: int, + hidden_channels: List[int], + norm_layer: Optional[Callable[..., torch.nn.Module]] = None, + activation_layer: Optional[Callable[..., torch.nn.Module]] = torch.nn.ReLU, + inplace: Optional[bool] = None, + bias: bool = True, + dropout: float = 0.0, + ): + # The addition of `norm_layer` is inspired from the implementation of TorchMultimodal: + # https://github.com/facebookresearch/multimodal/blob/5dec8a/torchmultimodal/modules/layers/mlp.py + params = {} if inplace is None else {"inplace": inplace} + + layers = [] + in_dim = in_channels + for hidden_dim in hidden_channels[:-1]: + layers.append(torch.nn.Linear(in_dim, hidden_dim, bias=bias)) + if norm_layer is not None: + layers.append(norm_layer(hidden_dim)) + layers.append(activation_layer(**params)) + layers.append(torch.nn.Dropout(dropout, **params)) + in_dim = hidden_dim + + layers.append(torch.nn.Linear(in_dim, hidden_channels[-1], bias=bias)) + layers.append(torch.nn.Dropout(dropout, **params)) + + super().__init__(*layers) + _log_api_usage_once(self) + + +class Permute(torch.nn.Module): + """This module returns a view of the tensor input with its dimensions permuted. + + Args: + dims (List[int]): The desired ordering of dimensions + """ + + def __init__(self, dims: List[int]): + super().__init__() + self.dims = dims + + def forward(self, x: Tensor) -> Tensor: + return torch.permute(x, self.dims) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/poolers.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/poolers.py new file mode 100644 index 0000000000000000000000000000000000000000..acac6e5afcd203b28b36974eb99cd54823de0fdf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/poolers.py @@ -0,0 +1,327 @@ +from typing import Dict, List, Optional, Tuple, Union + +import torch +import torch.fx +import torchvision +from torch import nn, Tensor +from torchvision.ops.boxes import box_area + +from ..utils import _log_api_usage_once +from .roi_align import roi_align + + +# copying result_idx_in_level to a specific index in result[] +# is not supported by ONNX tracing yet. +# _onnx_merge_levels() is an implementation supported by ONNX +# that merges the levels to the right indices +@torch.jit.unused +def _onnx_merge_levels(levels: Tensor, unmerged_results: List[Tensor]) -> Tensor: + first_result = unmerged_results[0] + dtype, device = first_result.dtype, first_result.device + res = torch.zeros( + (levels.size(0), first_result.size(1), first_result.size(2), first_result.size(3)), dtype=dtype, device=device + ) + for level in range(len(unmerged_results)): + index = torch.where(levels == level)[0].view(-1, 1, 1, 1) + index = index.expand( + index.size(0), + unmerged_results[level].size(1), + unmerged_results[level].size(2), + unmerged_results[level].size(3), + ) + res = res.scatter(0, index, unmerged_results[level]) + return res + + +# TODO: (eellison) T54974082 https://github.com/pytorch/pytorch/issues/26744/pytorch/issues/26744 +def initLevelMapper( + k_min: int, + k_max: int, + canonical_scale: int = 224, + canonical_level: int = 4, + eps: float = 1e-6, +): + return LevelMapper(k_min, k_max, canonical_scale, canonical_level, eps) + + +class LevelMapper: + """Determine which FPN level each RoI in a set of RoIs should map to based + on the heuristic in the FPN paper. + + Args: + k_min (int) + k_max (int) + canonical_scale (int) + canonical_level (int) + eps (float) + """ + + def __init__( + self, + k_min: int, + k_max: int, + canonical_scale: int = 224, + canonical_level: int = 4, + eps: float = 1e-6, + ): + self.k_min = k_min + self.k_max = k_max + self.s0 = canonical_scale + self.lvl0 = canonical_level + self.eps = eps + + def __call__(self, boxlists: List[Tensor]) -> Tensor: + """ + Args: + boxlists (list[BoxList]) + """ + # Compute level ids + s = torch.sqrt(torch.cat([box_area(boxlist) for boxlist in boxlists])) + + # Eqn.(1) in FPN paper + target_lvls = torch.floor(self.lvl0 + torch.log2(s / self.s0) + torch.tensor(self.eps, dtype=s.dtype)) + target_lvls = torch.clamp(target_lvls, min=self.k_min, max=self.k_max) + return (target_lvls.to(torch.int64) - self.k_min).to(torch.int64) + + +def _convert_to_roi_format(boxes: List[Tensor]) -> Tensor: + concat_boxes = torch.cat(boxes, dim=0) + device, dtype = concat_boxes.device, concat_boxes.dtype + ids = torch.cat( + [torch.full_like(b[:, :1], i, dtype=dtype, layout=torch.strided, device=device) for i, b in enumerate(boxes)], + dim=0, + ) + rois = torch.cat([ids, concat_boxes], dim=1) + return rois + + +def _infer_scale(feature: Tensor, original_size: List[int]) -> float: + # assumption: the scale is of the form 2 ** (-k), with k integer + size = feature.shape[-2:] + possible_scales: List[float] = [] + for s1, s2 in zip(size, original_size): + approx_scale = float(s1) / float(s2) + scale = 2 ** float(torch.tensor(approx_scale).log2().round()) + possible_scales.append(scale) + return possible_scales[0] + + +@torch.fx.wrap +def _setup_scales( + features: List[Tensor], image_shapes: List[Tuple[int, int]], canonical_scale: int, canonical_level: int +) -> Tuple[List[float], LevelMapper]: + if not image_shapes: + raise ValueError("images list should not be empty") + max_x = 0 + max_y = 0 + for shape in image_shapes: + max_x = max(shape[0], max_x) + max_y = max(shape[1], max_y) + original_input_shape = (max_x, max_y) + + scales = [_infer_scale(feat, original_input_shape) for feat in features] + # get the levels in the feature map by leveraging the fact that the network always + # downsamples by a factor of 2 at each level. + lvl_min = -torch.log2(torch.tensor(scales[0], dtype=torch.float32)).item() + lvl_max = -torch.log2(torch.tensor(scales[-1], dtype=torch.float32)).item() + + map_levels = initLevelMapper( + int(lvl_min), + int(lvl_max), + canonical_scale=canonical_scale, + canonical_level=canonical_level, + ) + return scales, map_levels + + +@torch.fx.wrap +def _filter_input(x: Dict[str, Tensor], featmap_names: List[str]) -> List[Tensor]: + x_filtered = [] + for k, v in x.items(): + if k in featmap_names: + x_filtered.append(v) + return x_filtered + + +@torch.fx.wrap +def _multiscale_roi_align( + x_filtered: List[Tensor], + boxes: List[Tensor], + output_size: List[int], + sampling_ratio: int, + scales: Optional[List[float]], + mapper: Optional[LevelMapper], +) -> Tensor: + """ + Args: + x_filtered (List[Tensor]): List of input tensors. + boxes (List[Tensor[N, 4]]): boxes to be used to perform the pooling operation, in + (x1, y1, x2, y2) format and in the image reference size, not the feature map + reference. The coordinate must satisfy ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + output_size (Union[List[Tuple[int, int]], List[int]]): size of the output + sampling_ratio (int): sampling ratio for ROIAlign + scales (Optional[List[float]]): If None, scales will be automatically inferred. Default value is None. + mapper (Optional[LevelMapper]): If none, mapper will be automatically inferred. Default value is None. + Returns: + result (Tensor) + """ + if scales is None or mapper is None: + raise ValueError("scales and mapper should not be None") + + num_levels = len(x_filtered) + rois = _convert_to_roi_format(boxes) + + if num_levels == 1: + return roi_align( + x_filtered[0], + rois, + output_size=output_size, + spatial_scale=scales[0], + sampling_ratio=sampling_ratio, + ) + + levels = mapper(boxes) + + num_rois = len(rois) + num_channels = x_filtered[0].shape[1] + + dtype, device = x_filtered[0].dtype, x_filtered[0].device + result = torch.zeros( + ( + num_rois, + num_channels, + ) + + output_size, + dtype=dtype, + device=device, + ) + + tracing_results = [] + for level, (per_level_feature, scale) in enumerate(zip(x_filtered, scales)): + idx_in_level = torch.where(levels == level)[0] + rois_per_level = rois[idx_in_level] + + result_idx_in_level = roi_align( + per_level_feature, + rois_per_level, + output_size=output_size, + spatial_scale=scale, + sampling_ratio=sampling_ratio, + ) + + if torchvision._is_tracing(): + tracing_results.append(result_idx_in_level.to(dtype)) + else: + # result and result_idx_in_level's dtypes are based on dtypes of different + # elements in x_filtered. x_filtered contains tensors output by different + # layers. When autocast is active, it may choose different dtypes for + # different layers' outputs. Therefore, we defensively match result's dtype + # before copying elements from result_idx_in_level in the following op. + # We need to cast manually (can't rely on autocast to cast for us) because + # the op acts on result in-place, and autocast only affects out-of-place ops. + result[idx_in_level] = result_idx_in_level.to(result.dtype) + + if torchvision._is_tracing(): + result = _onnx_merge_levels(levels, tracing_results) + + return result + + +class MultiScaleRoIAlign(nn.Module): + """ + Multi-scale RoIAlign pooling, which is useful for detection with or without FPN. + + It infers the scale of the pooling via the heuristics specified in eq. 1 + of the `Feature Pyramid Network paper `_. + They keyword-only parameters ``canonical_scale`` and ``canonical_level`` + correspond respectively to ``224`` and ``k0=4`` in eq. 1, and + have the following meaning: ``canonical_level`` is the target level of the pyramid from + which to pool a region of interest with ``w x h = canonical_scale x canonical_scale``. + + Args: + featmap_names (List[str]): the names of the feature maps that will be used + for the pooling. + output_size (List[Tuple[int, int]] or List[int]): output size for the pooled region + sampling_ratio (int): sampling ratio for ROIAlign + canonical_scale (int, optional): canonical_scale for LevelMapper + canonical_level (int, optional): canonical_level for LevelMapper + + Examples:: + + >>> m = torchvision.ops.MultiScaleRoIAlign(['feat1', 'feat3'], 3, 2) + >>> i = OrderedDict() + >>> i['feat1'] = torch.rand(1, 5, 64, 64) + >>> i['feat2'] = torch.rand(1, 5, 32, 32) # this feature won't be used in the pooling + >>> i['feat3'] = torch.rand(1, 5, 16, 16) + >>> # create some random bounding boxes + >>> boxes = torch.rand(6, 4) * 256; boxes[:, 2:] += boxes[:, :2] + >>> # original image size, before computing the feature maps + >>> image_sizes = [(512, 512)] + >>> output = m(i, [boxes], image_sizes) + >>> print(output.shape) + >>> torch.Size([6, 5, 3, 3]) + + """ + + __annotations__ = {"scales": Optional[List[float]], "map_levels": Optional[LevelMapper]} + + def __init__( + self, + featmap_names: List[str], + output_size: Union[int, Tuple[int], List[int]], + sampling_ratio: int, + *, + canonical_scale: int = 224, + canonical_level: int = 4, + ): + super().__init__() + _log_api_usage_once(self) + if isinstance(output_size, int): + output_size = (output_size, output_size) + self.featmap_names = featmap_names + self.sampling_ratio = sampling_ratio + self.output_size = tuple(output_size) + self.scales = None + self.map_levels = None + self.canonical_scale = canonical_scale + self.canonical_level = canonical_level + + def forward( + self, + x: Dict[str, Tensor], + boxes: List[Tensor], + image_shapes: List[Tuple[int, int]], + ) -> Tensor: + """ + Args: + x (OrderedDict[Tensor]): feature maps for each level. They are assumed to have + all the same number of channels, but they can have different sizes. + boxes (List[Tensor[N, 4]]): boxes to be used to perform the pooling operation, in + (x1, y1, x2, y2) format and in the image reference size, not the feature map + reference. The coordinate must satisfy ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + image_shapes (List[Tuple[height, width]]): the sizes of each image before they + have been fed to a CNN to obtain feature maps. This allows us to infer the + scale factor for each one of the levels to be pooled. + Returns: + result (Tensor) + """ + x_filtered = _filter_input(x, self.featmap_names) + if self.scales is None or self.map_levels is None: + self.scales, self.map_levels = _setup_scales( + x_filtered, image_shapes, self.canonical_scale, self.canonical_level + ) + + return _multiscale_roi_align( + x_filtered, + boxes, + self.output_size, + self.sampling_ratio, + self.scales, + self.map_levels, + ) + + def __repr__(self) -> str: + return ( + f"{self.__class__.__name__}(featmap_names={self.featmap_names}, " + f"output_size={self.output_size}, sampling_ratio={self.sampling_ratio})" + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ps_roi_align.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ps_roi_align.py new file mode 100644 index 0000000000000000000000000000000000000000..518b546d9163adeb29c81497e0cb21fd3a0c701d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ps_roi_align.py @@ -0,0 +1,90 @@ +import torch +import torch.fx +from torch import nn, Tensor +from torch.nn.modules.utils import _pair +from torchvision.extension import _assert_has_ops + +from ..utils import _log_api_usage_once +from ._utils import check_roi_boxes_shape, convert_boxes_to_roi_format + + +@torch.fx.wrap +def ps_roi_align( + input: Tensor, + boxes: Tensor, + output_size: int, + spatial_scale: float = 1.0, + sampling_ratio: int = -1, +) -> Tensor: + """ + Performs Position-Sensitive Region of Interest (RoI) Align operator + mentioned in Light-Head R-CNN. + + Args: + input (Tensor[N, C, H, W]): The input tensor, i.e. a batch with ``N`` elements. Each element + contains ``C`` feature maps of dimensions ``H x W``. + boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) + format where the regions will be taken from. + The coordinate must satisfy ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + If a single Tensor is passed, then the first column should + contain the index of the corresponding element in the batch, i.e. a number in ``[0, N - 1]``. + If a list of Tensors is passed, then each Tensor will correspond to the boxes for an element i + in the batch. + output_size (int or Tuple[int, int]): the size of the output (in bins or pixels) after the pooling + is performed, as (height, width). + spatial_scale (float): a scaling factor that maps the box coordinates to + the input coordinates. For example, if your boxes are defined on the scale + of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of + the original image), you'll want to set this to 0.5. Default: 1.0 + sampling_ratio (int): number of sampling points in the interpolation grid + used to compute the output value of each pooled output bin. If > 0, + then exactly ``sampling_ratio x sampling_ratio`` sampling points per bin are used. If + <= 0, then an adaptive number of grid points are used (computed as + ``ceil(roi_width / output_width)``, and likewise for height). Default: -1 + + Returns: + Tensor[K, C / (output_size[0] * output_size[1]), output_size[0], output_size[1]]: The pooled RoIs + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(ps_roi_align) + _assert_has_ops() + check_roi_boxes_shape(boxes) + rois = boxes + output_size = _pair(output_size) + if not isinstance(rois, torch.Tensor): + rois = convert_boxes_to_roi_format(rois) + output, _ = torch.ops.torchvision.ps_roi_align( + input, rois, spatial_scale, output_size[0], output_size[1], sampling_ratio + ) + return output + + +class PSRoIAlign(nn.Module): + """ + See :func:`ps_roi_align`. + """ + + def __init__( + self, + output_size: int, + spatial_scale: float, + sampling_ratio: int, + ): + super().__init__() + _log_api_usage_once(self) + self.output_size = output_size + self.spatial_scale = spatial_scale + self.sampling_ratio = sampling_ratio + + def forward(self, input: Tensor, rois: Tensor) -> Tensor: + return ps_roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio) + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"output_size={self.output_size}" + f", spatial_scale={self.spatial_scale}" + f", sampling_ratio={self.sampling_ratio}" + f")" + ) + return s diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ps_roi_pool.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ps_roi_pool.py new file mode 100644 index 0000000000000000000000000000000000000000..f1d6b3894cf3f2edd3022704519614ee20bfc884 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/ps_roi_pool.py @@ -0,0 +1,70 @@ +import torch +import torch.fx +from torch import nn, Tensor +from torch.nn.modules.utils import _pair +from torchvision.extension import _assert_has_ops + +from ..utils import _log_api_usage_once +from ._utils import check_roi_boxes_shape, convert_boxes_to_roi_format + + +@torch.fx.wrap +def ps_roi_pool( + input: Tensor, + boxes: Tensor, + output_size: int, + spatial_scale: float = 1.0, +) -> Tensor: + """ + Performs Position-Sensitive Region of Interest (RoI) Pool operator + described in R-FCN + + Args: + input (Tensor[N, C, H, W]): The input tensor, i.e. a batch with ``N`` elements. Each element + contains ``C`` feature maps of dimensions ``H x W``. + boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) + format where the regions will be taken from. + The coordinate must satisfy ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + If a single Tensor is passed, then the first column should + contain the index of the corresponding element in the batch, i.e. a number in ``[0, N - 1]``. + If a list of Tensors is passed, then each Tensor will correspond to the boxes for an element i + in the batch. + output_size (int or Tuple[int, int]): the size of the output (in bins or pixels) after the pooling + is performed, as (height, width). + spatial_scale (float): a scaling factor that maps the box coordinates to + the input coordinates. For example, if your boxes are defined on the scale + of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of + the original image), you'll want to set this to 0.5. Default: 1.0 + + Returns: + Tensor[K, C / (output_size[0] * output_size[1]), output_size[0], output_size[1]]: The pooled RoIs. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(ps_roi_pool) + _assert_has_ops() + check_roi_boxes_shape(boxes) + rois = boxes + output_size = _pair(output_size) + if not isinstance(rois, torch.Tensor): + rois = convert_boxes_to_roi_format(rois) + output, _ = torch.ops.torchvision.ps_roi_pool(input, rois, spatial_scale, output_size[0], output_size[1]) + return output + + +class PSRoIPool(nn.Module): + """ + See :func:`ps_roi_pool`. + """ + + def __init__(self, output_size: int, spatial_scale: float): + super().__init__() + _log_api_usage_once(self) + self.output_size = output_size + self.spatial_scale = spatial_scale + + def forward(self, input: Tensor, rois: Tensor) -> Tensor: + return ps_roi_pool(input, rois, self.output_size, self.spatial_scale) + + def __repr__(self) -> str: + s = f"{self.__class__.__name__}(output_size={self.output_size}, spatial_scale={self.spatial_scale})" + return s diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/roi_align.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/roi_align.py new file mode 100644 index 0000000000000000000000000000000000000000..6592b4056bbadfefec382a9696d02c8b55376765 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/roi_align.py @@ -0,0 +1,293 @@ +import functools +from typing import List, Union + +import torch +import torch.fx +from torch import nn, Tensor +from torch._dynamo.utils import is_compile_supported +from torch.jit.annotations import BroadcastingList2 +from torch.nn.modules.utils import _pair +from torchvision.extension import _assert_has_ops, _has_ops + +from ..utils import _log_api_usage_once +from ._utils import check_roi_boxes_shape, convert_boxes_to_roi_format + + +def lazy_compile(**compile_kwargs): + """Lazily wrap a function with torch.compile on the first call + + This avoids eagerly importing dynamo. + """ + + def decorate_fn(fn): + @functools.wraps(fn) + def compile_hook(*args, **kwargs): + compiled_fn = torch.compile(fn, **compile_kwargs) + globals()[fn.__name__] = functools.wraps(fn)(compiled_fn) + return compiled_fn(*args, **kwargs) + + return compile_hook + + return decorate_fn + + +# NB: all inputs are tensors +def _bilinear_interpolate( + input, # [N, C, H, W] + roi_batch_ind, # [K] + y, # [K, PH, IY] + x, # [K, PW, IX] + ymask, # [K, IY] + xmask, # [K, IX] +): + _, channels, height, width = input.size() + + # deal with inverse element out of feature map boundary + y = y.clamp(min=0) + x = x.clamp(min=0) + y_low = y.int() + x_low = x.int() + y_high = torch.where(y_low >= height - 1, height - 1, y_low + 1) + y_low = torch.where(y_low >= height - 1, height - 1, y_low) + y = torch.where(y_low >= height - 1, y.to(input.dtype), y) + + x_high = torch.where(x_low >= width - 1, width - 1, x_low + 1) + x_low = torch.where(x_low >= width - 1, width - 1, x_low) + x = torch.where(x_low >= width - 1, x.to(input.dtype), x) + + ly = y - y_low + lx = x - x_low + hy = 1.0 - ly + hx = 1.0 - lx + + # do bilinear interpolation, but respect the masking! + # TODO: It's possible the masking here is unnecessary if y and + # x were clamped appropriately; hard to tell + def masked_index( + y, # [K, PH, IY] + x, # [K, PW, IX] + ): + if ymask is not None: + assert xmask is not None + y = torch.where(ymask[:, None, :], y, 0) + x = torch.where(xmask[:, None, :], x, 0) + return input[ + roi_batch_ind[:, None, None, None, None, None], + torch.arange(channels, device=input.device)[None, :, None, None, None, None], + y[:, None, :, None, :, None], # prev [K, PH, IY] + x[:, None, None, :, None, :], # prev [K, PW, IX] + ] # [K, C, PH, PW, IY, IX] + + v1 = masked_index(y_low, x_low) + v2 = masked_index(y_low, x_high) + v3 = masked_index(y_high, x_low) + v4 = masked_index(y_high, x_high) + + # all ws preemptively [K, C, PH, PW, IY, IX] + def outer_prod(y, x): + return y[:, None, :, None, :, None] * x[:, None, None, :, None, :] + + w1 = outer_prod(hy, hx) + w2 = outer_prod(hy, lx) + w3 = outer_prod(ly, hx) + w4 = outer_prod(ly, lx) + + val = w1 * v1 + w2 * v2 + w3 * v3 + w4 * v4 + return val + + +# TODO: this doesn't actually cache +# TODO: main library should make this easier to do +def maybe_cast(tensor): + if torch.is_autocast_enabled() and tensor.is_cuda and tensor.dtype != torch.double: + return tensor.float() + else: + return tensor + + +# This is a pure Python and differentiable implementation of roi_align. When +# run in eager mode, it uses a lot of memory, but when compiled it has +# acceptable memory usage. The main point of this implementation is that +# its backwards is deterministic. +# It is transcribed directly off of the roi_align CUDA kernel, see +# https://dev-discuss.pytorch.org/t/a-pure-python-implementation-of-roi-align-that-looks-just-like-its-cuda-kernel/1266 +@lazy_compile(dynamic=True) +def _roi_align(input, rois, spatial_scale, pooled_height, pooled_width, sampling_ratio, aligned): + orig_dtype = input.dtype + + input = maybe_cast(input) + rois = maybe_cast(rois) + + _, _, height, width = input.size() + + ph = torch.arange(pooled_height, device=input.device) # [PH] + pw = torch.arange(pooled_width, device=input.device) # [PW] + + # input: [N, C, H, W] + # rois: [K, 5] + + roi_batch_ind = rois[:, 0].int() # [K] + offset = 0.5 if aligned else 0.0 + roi_start_w = rois[:, 1] * spatial_scale - offset # [K] + roi_start_h = rois[:, 2] * spatial_scale - offset # [K] + roi_end_w = rois[:, 3] * spatial_scale - offset # [K] + roi_end_h = rois[:, 4] * spatial_scale - offset # [K] + + roi_width = roi_end_w - roi_start_w # [K] + roi_height = roi_end_h - roi_start_h # [K] + if not aligned: + roi_width = torch.clamp(roi_width, min=1.0) # [K] + roi_height = torch.clamp(roi_height, min=1.0) # [K] + + bin_size_h = roi_height / pooled_height # [K] + bin_size_w = roi_width / pooled_width # [K] + + exact_sampling = sampling_ratio > 0 + + roi_bin_grid_h = sampling_ratio if exact_sampling else torch.ceil(roi_height / pooled_height) # scalar or [K] + roi_bin_grid_w = sampling_ratio if exact_sampling else torch.ceil(roi_width / pooled_width) # scalar or [K] + + """ + iy, ix = dims(2) + """ + + if exact_sampling: + count = max(roi_bin_grid_h * roi_bin_grid_w, 1) # scalar + iy = torch.arange(roi_bin_grid_h, device=input.device) # [IY] + ix = torch.arange(roi_bin_grid_w, device=input.device) # [IX] + ymask = None + xmask = None + else: + count = torch.clamp(roi_bin_grid_h * roi_bin_grid_w, min=1) # [K] + # When doing adaptive sampling, the number of samples we need to do + # is data-dependent based on how big the ROIs are. This is a bit + # awkward because first-class dims can't actually handle this. + # So instead, we inefficiently suppose that we needed to sample ALL + # the points and mask out things that turned out to be unnecessary + iy = torch.arange(height, device=input.device) # [IY] + ix = torch.arange(width, device=input.device) # [IX] + ymask = iy[None, :] < roi_bin_grid_h[:, None] # [K, IY] + xmask = ix[None, :] < roi_bin_grid_w[:, None] # [K, IX] + + def from_K(t): + return t[:, None, None] + + y = ( + from_K(roi_start_h) + + ph[None, :, None] * from_K(bin_size_h) + + (iy[None, None, :] + 0.5).to(input.dtype) * from_K(bin_size_h / roi_bin_grid_h) + ) # [K, PH, IY] + x = ( + from_K(roi_start_w) + + pw[None, :, None] * from_K(bin_size_w) + + (ix[None, None, :] + 0.5).to(input.dtype) * from_K(bin_size_w / roi_bin_grid_w) + ) # [K, PW, IX] + val = _bilinear_interpolate(input, roi_batch_ind, y, x, ymask, xmask) # [K, C, PH, PW, IY, IX] + + # Mask out samples that weren't actually adaptively needed + if not exact_sampling: + val = torch.where(ymask[:, None, None, None, :, None], val, 0) + val = torch.where(xmask[:, None, None, None, None, :], val, 0) + + output = val.sum((-1, -2)) # remove IY, IX ~> [K, C, PH, PW] + if isinstance(count, torch.Tensor): + output /= count[:, None, None, None] + else: + output /= count + + output = output.to(orig_dtype) + + return output + + +@torch.fx.wrap +def roi_align( + input: Tensor, + boxes: Union[Tensor, List[Tensor]], + output_size: BroadcastingList2[int], + spatial_scale: float = 1.0, + sampling_ratio: int = -1, + aligned: bool = False, +) -> Tensor: + """ + Performs Region of Interest (RoI) Align operator with average pooling, as described in Mask R-CNN. + + Args: + input (Tensor[N, C, H, W]): The input tensor, i.e. a batch with ``N`` elements. Each element + contains ``C`` feature maps of dimensions ``H x W``. + If the tensor is quantized, we expect a batch size of ``N == 1``. + boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) + format where the regions will be taken from. + The coordinate must satisfy ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + If a single Tensor is passed, then the first column should + contain the index of the corresponding element in the batch, i.e. a number in ``[0, N - 1]``. + If a list of Tensors is passed, then each Tensor will correspond to the boxes for an element i + in the batch. + output_size (int or Tuple[int, int]): the size of the output (in bins or pixels) after the pooling + is performed, as (height, width). + spatial_scale (float): a scaling factor that maps the box coordinates to + the input coordinates. For example, if your boxes are defined on the scale + of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of + the original image), you'll want to set this to 0.5. Default: 1.0 + sampling_ratio (int): number of sampling points in the interpolation grid + used to compute the output value of each pooled output bin. If > 0, + then exactly ``sampling_ratio x sampling_ratio`` sampling points per bin are used. If + <= 0, then an adaptive number of grid points are used (computed as + ``ceil(roi_width / output_width)``, and likewise for height). Default: -1 + aligned (bool): If False, use the legacy implementation. + If True, pixel shift the box coordinates it by -0.5 for a better alignment with the two + neighboring pixel indices. This version is used in Detectron2 + + Returns: + Tensor[K, C, output_size[0], output_size[1]]: The pooled RoIs. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(roi_align) + check_roi_boxes_shape(boxes) + rois = boxes + output_size = _pair(output_size) + if not isinstance(rois, torch.Tensor): + rois = convert_boxes_to_roi_format(rois) + if not torch.jit.is_scripting(): + if ( + not _has_ops() or (torch.are_deterministic_algorithms_enabled() and (input.is_cuda or input.is_mps)) + ) and is_compile_supported(input.device.type): + return _roi_align(input, rois, spatial_scale, output_size[0], output_size[1], sampling_ratio, aligned) + _assert_has_ops() + return torch.ops.torchvision.roi_align( + input, rois, spatial_scale, output_size[0], output_size[1], sampling_ratio, aligned + ) + + +class RoIAlign(nn.Module): + """ + See :func:`roi_align`. + """ + + def __init__( + self, + output_size: BroadcastingList2[int], + spatial_scale: float, + sampling_ratio: int, + aligned: bool = False, + ): + super().__init__() + _log_api_usage_once(self) + self.output_size = output_size + self.spatial_scale = spatial_scale + self.sampling_ratio = sampling_ratio + self.aligned = aligned + + def forward(self, input: Tensor, rois: Union[Tensor, List[Tensor]]) -> Tensor: + return roi_align(input, rois, self.output_size, self.spatial_scale, self.sampling_ratio, self.aligned) + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"output_size={self.output_size}" + f", spatial_scale={self.spatial_scale}" + f", sampling_ratio={self.sampling_ratio}" + f", aligned={self.aligned}" + f")" + ) + return s diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/roi_pool.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/roi_pool.py new file mode 100644 index 0000000000000000000000000000000000000000..c2f4fc3021d5835ba4c3d6bb9eda45c627b04246 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/roi_pool.py @@ -0,0 +1,72 @@ +from typing import List, Union + +import torch +import torch.fx +from torch import nn, Tensor +from torch.jit.annotations import BroadcastingList2 +from torch.nn.modules.utils import _pair +from torchvision.extension import _assert_has_ops + +from ..utils import _log_api_usage_once +from ._utils import check_roi_boxes_shape, convert_boxes_to_roi_format + + +@torch.fx.wrap +def roi_pool( + input: Tensor, + boxes: Union[Tensor, List[Tensor]], + output_size: BroadcastingList2[int], + spatial_scale: float = 1.0, +) -> Tensor: + """ + Performs Region of Interest (RoI) Pool operator described in Fast R-CNN + + Args: + input (Tensor[N, C, H, W]): The input tensor, i.e. a batch with ``N`` elements. Each element + contains ``C`` feature maps of dimensions ``H x W``. + boxes (Tensor[K, 5] or List[Tensor[L, 4]]): the box coordinates in (x1, y1, x2, y2) + format where the regions will be taken from. + The coordinate must satisfy ``0 <= x1 < x2`` and ``0 <= y1 < y2``. + If a single Tensor is passed, then the first column should + contain the index of the corresponding element in the batch, i.e. a number in ``[0, N - 1]``. + If a list of Tensors is passed, then each Tensor will correspond to the boxes for an element i + in the batch. + output_size (int or Tuple[int, int]): the size of the output after the cropping + is performed, as (height, width) + spatial_scale (float): a scaling factor that maps the box coordinates to + the input coordinates. For example, if your boxes are defined on the scale + of a 224x224 image and your input is a 112x112 feature map (resulting from a 0.5x scaling of + the original image), you'll want to set this to 0.5. Default: 1.0 + + Returns: + Tensor[K, C, output_size[0], output_size[1]]: The pooled RoIs. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(roi_pool) + _assert_has_ops() + check_roi_boxes_shape(boxes) + rois = boxes + output_size = _pair(output_size) + if not isinstance(rois, torch.Tensor): + rois = convert_boxes_to_roi_format(rois) + output, _ = torch.ops.torchvision.roi_pool(input, rois, spatial_scale, output_size[0], output_size[1]) + return output + + +class RoIPool(nn.Module): + """ + See :func:`roi_pool`. + """ + + def __init__(self, output_size: BroadcastingList2[int], spatial_scale: float): + super().__init__() + _log_api_usage_once(self) + self.output_size = output_size + self.spatial_scale = spatial_scale + + def forward(self, input: Tensor, rois: Union[Tensor, List[Tensor]]) -> Tensor: + return roi_pool(input, rois, self.output_size, self.spatial_scale) + + def __repr__(self) -> str: + s = f"{self.__class__.__name__}(output_size={self.output_size}, spatial_scale={self.spatial_scale})" + return s diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/stochastic_depth.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/stochastic_depth.py new file mode 100644 index 0000000000000000000000000000000000000000..bdc566fd7f2da8f98cf9301641aed60a8c6e2a48 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/ops/stochastic_depth.py @@ -0,0 +1,66 @@ +import torch +import torch.fx +from torch import nn, Tensor + +from ..utils import _log_api_usage_once + + +def stochastic_depth(input: Tensor, p: float, mode: str, training: bool = True) -> Tensor: + """ + Implements the Stochastic Depth from `"Deep Networks with Stochastic Depth" + `_ used for randomly dropping residual + branches of residual architectures. + + Args: + input (Tensor[N, ...]): The input tensor or arbitrary dimensions with the first one + being its batch i.e. a batch with ``N`` rows. + p (float): probability of the input to be zeroed. + mode (str): ``"batch"`` or ``"row"``. + ``"batch"`` randomly zeroes the entire input, ``"row"`` zeroes + randomly selected rows from the batch. + training: apply stochastic depth if is ``True``. Default: ``True`` + + Returns: + Tensor[N, ...]: The randomly zeroed tensor. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(stochastic_depth) + if p < 0.0 or p > 1.0: + raise ValueError(f"drop probability has to be between 0 and 1, but got {p}") + if mode not in ["batch", "row"]: + raise ValueError(f"mode has to be either 'batch' or 'row', but got {mode}") + if not training or p == 0.0: + return input + + survival_rate = 1.0 - p + if mode == "row": + size = [input.shape[0]] + [1] * (input.ndim - 1) + else: + size = [1] * input.ndim + noise = torch.empty(size, dtype=input.dtype, device=input.device) + noise = noise.bernoulli_(survival_rate) + if survival_rate > 0.0: + noise.div_(survival_rate) + return input * noise + + +torch.fx.wrap("stochastic_depth") + + +class StochasticDepth(nn.Module): + """ + See :func:`stochastic_depth`. + """ + + def __init__(self, p: float, mode: str) -> None: + super().__init__() + _log_api_usage_once(self) + self.p = p + self.mode = mode + + def forward(self, input: Tensor) -> Tensor: + return stochastic_depth(input, self.p, self.mode, self.training) + + def __repr__(self) -> str: + s = f"{self.__class__.__name__}(p={self.p}, mode={self.mode})" + return s diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..fc181e77deb08f39a54fe4ac1f11a2c4397c3384 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__init__.py @@ -0,0 +1,2 @@ +from .transforms import * +from .autoaugment import * diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d4d73ea99fc4d5eb74c6ffd39ae29658c81e3696 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_pil.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_pil.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ffe45828ee4ba081518b09dbabe091ef35d04812 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_pil.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_tensor.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_tensor.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d428ca3e81fe4e18be1937ea0c0c0f279e6f4693 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_tensor.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_video.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_video.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1bdcc6d516a0ad9f9c032c5d05a24b80fb80ccb6 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_functional_video.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_presets.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_presets.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..85058c22115e2a60b095bb0288d3cea79279bec1 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_presets.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_transforms_video.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_transforms_video.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d64c197316e2929696f3b94dbe3dc45dcd087963 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/_transforms_video.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/autoaugment.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/autoaugment.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dee7988da9ff6c0ee845ef35cfc6829421fae234 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/autoaugment.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/functional.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/functional.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1993bb927e2092fe4ce4c87a83b44e245e699a71 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/__pycache__/functional.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_pil.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_pil.py new file mode 100644 index 0000000000000000000000000000000000000000..14ad49a395d8f5db7ec05b11db6a83bbed0aa917 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_pil.py @@ -0,0 +1,393 @@ +import numbers +from typing import Any, Dict, List, Literal, Optional, Sequence, Tuple, Union + +import numpy as np +import torch +from PIL import Image, ImageEnhance, ImageOps + +try: + import accimage +except ImportError: + accimage = None + + +@torch.jit.unused +def _is_pil_image(img: Any) -> bool: + if accimage is not None: + return isinstance(img, (Image.Image, accimage.Image)) + else: + return isinstance(img, Image.Image) + + +@torch.jit.unused +def get_dimensions(img: Any) -> List[int]: + if _is_pil_image(img): + if hasattr(img, "getbands"): + channels = len(img.getbands()) + else: + channels = img.channels + width, height = img.size + return [channels, height, width] + raise TypeError(f"Unexpected type {type(img)}") + + +@torch.jit.unused +def get_image_size(img: Any) -> List[int]: + if _is_pil_image(img): + return list(img.size) + raise TypeError(f"Unexpected type {type(img)}") + + +@torch.jit.unused +def get_image_num_channels(img: Any) -> int: + if _is_pil_image(img): + if hasattr(img, "getbands"): + return len(img.getbands()) + else: + return img.channels + raise TypeError(f"Unexpected type {type(img)}") + + +@torch.jit.unused +def hflip(img: Image.Image) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + return img.transpose(Image.FLIP_LEFT_RIGHT) + + +@torch.jit.unused +def vflip(img: Image.Image) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + return img.transpose(Image.FLIP_TOP_BOTTOM) + + +@torch.jit.unused +def adjust_brightness(img: Image.Image, brightness_factor: float) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + enhancer = ImageEnhance.Brightness(img) + img = enhancer.enhance(brightness_factor) + return img + + +@torch.jit.unused +def adjust_contrast(img: Image.Image, contrast_factor: float) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + enhancer = ImageEnhance.Contrast(img) + img = enhancer.enhance(contrast_factor) + return img + + +@torch.jit.unused +def adjust_saturation(img: Image.Image, saturation_factor: float) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + enhancer = ImageEnhance.Color(img) + img = enhancer.enhance(saturation_factor) + return img + + +@torch.jit.unused +def adjust_hue(img: Image.Image, hue_factor: float) -> Image.Image: + if not (-0.5 <= hue_factor <= 0.5): + raise ValueError(f"hue_factor ({hue_factor}) is not in [-0.5, 0.5].") + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + input_mode = img.mode + if input_mode in {"L", "1", "I", "F"}: + return img + + h, s, v = img.convert("HSV").split() + + np_h = np.array(h, dtype=np.uint8) + # This will over/underflow, as desired + np_h += np.int32(hue_factor * 255).astype(np.uint8) + + h = Image.fromarray(np_h, "L") + + img = Image.merge("HSV", (h, s, v)).convert(input_mode) + return img + + +@torch.jit.unused +def adjust_gamma( + img: Image.Image, + gamma: float, + gain: float = 1.0, +) -> Image.Image: + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + if gamma < 0: + raise ValueError("Gamma should be a non-negative real number") + + input_mode = img.mode + img = img.convert("RGB") + gamma_map = [int((255 + 1 - 1e-3) * gain * pow(ele / 255.0, gamma)) for ele in range(256)] * 3 + img = img.point(gamma_map) # use PIL's point-function to accelerate this part + + img = img.convert(input_mode) + return img + + +@torch.jit.unused +def pad( + img: Image.Image, + padding: Union[int, List[int], Tuple[int, ...]], + fill: Optional[Union[float, List[float], Tuple[float, ...]]] = 0, + padding_mode: Literal["constant", "edge", "reflect", "symmetric"] = "constant", +) -> Image.Image: + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + if not isinstance(padding, (numbers.Number, tuple, list)): + raise TypeError("Got inappropriate padding arg") + if fill is not None and not isinstance(fill, (numbers.Number, tuple, list)): + raise TypeError("Got inappropriate fill arg") + if not isinstance(padding_mode, str): + raise TypeError("Got inappropriate padding_mode arg") + + if isinstance(padding, list): + padding = tuple(padding) + + if isinstance(padding, tuple) and len(padding) not in [1, 2, 4]: + raise ValueError(f"Padding must be an int or a 1, 2, or 4 element tuple, not a {len(padding)} element tuple") + + if isinstance(padding, tuple) and len(padding) == 1: + # Compatibility with `functional_tensor.pad` + padding = padding[0] + + if padding_mode not in ["constant", "edge", "reflect", "symmetric"]: + raise ValueError("Padding mode should be either constant, edge, reflect or symmetric") + + if padding_mode == "constant": + opts = _parse_fill(fill, img, name="fill") + if img.mode == "P": + palette = img.getpalette() + image = ImageOps.expand(img, border=padding, **opts) + image.putpalette(palette) + return image + + return ImageOps.expand(img, border=padding, **opts) + else: + if isinstance(padding, int): + pad_left = pad_right = pad_top = pad_bottom = padding + if isinstance(padding, tuple) and len(padding) == 2: + pad_left = pad_right = padding[0] + pad_top = pad_bottom = padding[1] + if isinstance(padding, tuple) and len(padding) == 4: + pad_left = padding[0] + pad_top = padding[1] + pad_right = padding[2] + pad_bottom = padding[3] + + p = [pad_left, pad_top, pad_right, pad_bottom] + cropping = -np.minimum(p, 0) + + if cropping.any(): + crop_left, crop_top, crop_right, crop_bottom = cropping + img = img.crop((crop_left, crop_top, img.width - crop_right, img.height - crop_bottom)) + + pad_left, pad_top, pad_right, pad_bottom = np.maximum(p, 0) + + if img.mode == "P": + palette = img.getpalette() + img = np.asarray(img) + img = np.pad(img, ((pad_top, pad_bottom), (pad_left, pad_right)), mode=padding_mode) + img = Image.fromarray(img) + img.putpalette(palette) + return img + + img = np.asarray(img) + # RGB image + if len(img.shape) == 3: + img = np.pad(img, ((pad_top, pad_bottom), (pad_left, pad_right), (0, 0)), padding_mode) + # Grayscale image + if len(img.shape) == 2: + img = np.pad(img, ((pad_top, pad_bottom), (pad_left, pad_right)), padding_mode) + + return Image.fromarray(img) + + +@torch.jit.unused +def crop( + img: Image.Image, + top: int, + left: int, + height: int, + width: int, +) -> Image.Image: + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + return img.crop((left, top, left + width, top + height)) + + +@torch.jit.unused +def resize( + img: Image.Image, + size: Union[List[int], int], + interpolation: int = Image.BILINEAR, +) -> Image.Image: + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + if not (isinstance(size, list) and len(size) == 2): + raise TypeError(f"Got inappropriate size arg: {size}") + + return img.resize(tuple(size[::-1]), interpolation) + + +@torch.jit.unused +def _parse_fill( + fill: Optional[Union[float, List[float], Tuple[float, ...]]], + img: Image.Image, + name: str = "fillcolor", +) -> Dict[str, Optional[Union[float, List[float], Tuple[float, ...]]]]: + + # Process fill color for affine transforms + num_channels = get_image_num_channels(img) + if fill is None: + fill = 0 + if isinstance(fill, (int, float)) and num_channels > 1: + fill = tuple([fill] * num_channels) + if isinstance(fill, (list, tuple)): + if len(fill) == 1: + fill = fill * num_channels + elif len(fill) != num_channels: + msg = "The number of elements in 'fill' does not match the number of channels of the image ({} != {})" + raise ValueError(msg.format(len(fill), num_channels)) + + fill = tuple(fill) # type: ignore[arg-type] + + if img.mode != "F": + if isinstance(fill, (list, tuple)): + fill = tuple(int(x) for x in fill) + else: + fill = int(fill) + + return {name: fill} + + +@torch.jit.unused +def affine( + img: Image.Image, + matrix: List[float], + interpolation: int = Image.NEAREST, + fill: Optional[Union[int, float, Sequence[int], Sequence[float]]] = None, +) -> Image.Image: + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + output_size = img.size + opts = _parse_fill(fill, img) + return img.transform(output_size, Image.AFFINE, matrix, interpolation, **opts) + + +@torch.jit.unused +def rotate( + img: Image.Image, + angle: float, + interpolation: int = Image.NEAREST, + expand: bool = False, + center: Optional[Tuple[int, int]] = None, + fill: Optional[Union[int, float, Sequence[int], Sequence[float]]] = None, +) -> Image.Image: + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + opts = _parse_fill(fill, img) + return img.rotate(angle, interpolation, expand, center, **opts) + + +@torch.jit.unused +def perspective( + img: Image.Image, + perspective_coeffs: List[float], + interpolation: int = Image.BICUBIC, + fill: Optional[Union[int, float, Sequence[int], Sequence[float]]] = None, +) -> Image.Image: + + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + opts = _parse_fill(fill, img) + + return img.transform(img.size, Image.PERSPECTIVE, perspective_coeffs, interpolation, **opts) + + +@torch.jit.unused +def to_grayscale(img: Image.Image, num_output_channels: int) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + if num_output_channels == 1: + img = img.convert("L") + elif num_output_channels == 3: + img = img.convert("L") + np_img = np.array(img, dtype=np.uint8) + np_img = np.dstack([np_img, np_img, np_img]) + img = Image.fromarray(np_img, "RGB") + else: + raise ValueError("num_output_channels should be either 1 or 3") + + return img + + +@torch.jit.unused +def invert(img: Image.Image) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + return ImageOps.invert(img) + + +@torch.jit.unused +def posterize(img: Image.Image, bits: int) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + return ImageOps.posterize(img, bits) + + +@torch.jit.unused +def solarize(img: Image.Image, threshold: int) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + return ImageOps.solarize(img, threshold) + + +@torch.jit.unused +def adjust_sharpness(img: Image.Image, sharpness_factor: float) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + + enhancer = ImageEnhance.Sharpness(img) + img = enhancer.enhance(sharpness_factor) + return img + + +@torch.jit.unused +def autocontrast(img: Image.Image) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + return ImageOps.autocontrast(img) + + +@torch.jit.unused +def equalize(img: Image.Image) -> Image.Image: + if not _is_pil_image(img): + raise TypeError(f"img should be PIL Image. Got {type(img)}") + return ImageOps.equalize(img) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_tensor.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_tensor.py new file mode 100644 index 0000000000000000000000000000000000000000..3f0e9d6f92b57a43532b46e735aac1a9e7818fbe --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_tensor.py @@ -0,0 +1,962 @@ +import warnings +from typing import List, Optional, Tuple, Union + +import torch +from torch import Tensor +from torch.nn.functional import conv2d, grid_sample, interpolate, pad as torch_pad + + +def _is_tensor_a_torch_image(x: Tensor) -> bool: + return x.ndim >= 2 + + +def _assert_image_tensor(img: Tensor) -> None: + if not _is_tensor_a_torch_image(img): + raise TypeError("Tensor is not a torch image.") + + +def get_dimensions(img: Tensor) -> List[int]: + _assert_image_tensor(img) + channels = 1 if img.ndim == 2 else img.shape[-3] + height, width = img.shape[-2:] + return [channels, height, width] + + +def get_image_size(img: Tensor) -> List[int]: + # Returns (w, h) of tensor image + _assert_image_tensor(img) + return [img.shape[-1], img.shape[-2]] + + +def get_image_num_channels(img: Tensor) -> int: + _assert_image_tensor(img) + if img.ndim == 2: + return 1 + elif img.ndim > 2: + return img.shape[-3] + + raise TypeError(f"Input ndim should be 2 or more. Got {img.ndim}") + + +def _max_value(dtype: torch.dtype) -> int: + if dtype == torch.uint8: + return 255 + elif dtype == torch.int8: + return 127 + elif dtype == torch.int16: + return 32767 + elif dtype == torch.uint16: + return 65535 + elif dtype == torch.int32: + return 2147483647 + elif dtype == torch.int64: + return 9223372036854775807 + else: + # This is only here for completeness. This value is implicitly assumed in a lot of places so changing it is not + # easy. + return 1 + + +def _assert_channels(img: Tensor, permitted: List[int]) -> None: + c = get_dimensions(img)[0] + if c not in permitted: + raise TypeError(f"Input image tensor permitted channel values are {permitted}, but found {c}") + + +def convert_image_dtype(image: torch.Tensor, dtype: torch.dtype = torch.float) -> torch.Tensor: + if image.dtype == dtype: + return image + + if image.is_floating_point(): + + # TODO: replace with dtype.is_floating_point when torchscript supports it + if torch.tensor(0, dtype=dtype).is_floating_point(): + return image.to(dtype) + + # float to int + if (image.dtype == torch.float32 and dtype in (torch.int32, torch.int64)) or ( + image.dtype == torch.float64 and dtype == torch.int64 + ): + msg = f"The cast from {image.dtype} to {dtype} cannot be performed safely." + raise RuntimeError(msg) + + # https://github.com/pytorch/vision/pull/2078#issuecomment-612045321 + # For data in the range 0-1, (float * 255).to(uint) is only 255 + # when float is exactly 1.0. + # `max + 1 - epsilon` provides more evenly distributed mapping of + # ranges of floats to ints. + eps = 1e-3 + max_val = float(_max_value(dtype)) + result = image.mul(max_val + 1.0 - eps) + return result.to(dtype) + else: + input_max = float(_max_value(image.dtype)) + + # int to float + # TODO: replace with dtype.is_floating_point when torchscript supports it + if torch.tensor(0, dtype=dtype).is_floating_point(): + image = image.to(dtype) + return image / input_max + + output_max = float(_max_value(dtype)) + + # int to int + if input_max > output_max: + # factor should be forced to int for torch jit script + # otherwise factor is a float and image // factor can produce different results + factor = int((input_max + 1) // (output_max + 1)) + image = torch.div(image, factor, rounding_mode="floor") + return image.to(dtype) + else: + # factor should be forced to int for torch jit script + # otherwise factor is a float and image * factor can produce different results + factor = int((output_max + 1) // (input_max + 1)) + image = image.to(dtype) + return image * factor + + +def vflip(img: Tensor) -> Tensor: + _assert_image_tensor(img) + + return img.flip(-2) + + +def hflip(img: Tensor) -> Tensor: + _assert_image_tensor(img) + + return img.flip(-1) + + +def crop(img: Tensor, top: int, left: int, height: int, width: int) -> Tensor: + _assert_image_tensor(img) + + _, h, w = get_dimensions(img) + right = left + width + bottom = top + height + + if left < 0 or top < 0 or right > w or bottom > h: + padding_ltrb = [ + max(-left + min(0, right), 0), + max(-top + min(0, bottom), 0), + max(right - max(w, left), 0), + max(bottom - max(h, top), 0), + ] + return pad(img[..., max(top, 0) : bottom, max(left, 0) : right], padding_ltrb, fill=0) + return img[..., top:bottom, left:right] + + +def rgb_to_grayscale(img: Tensor, num_output_channels: int = 1) -> Tensor: + if img.ndim < 3: + raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") + _assert_channels(img, [1, 3]) + + if num_output_channels not in (1, 3): + raise ValueError("num_output_channels should be either 1 or 3") + + if img.shape[-3] == 3: + r, g, b = img.unbind(dim=-3) + # This implementation closely follows the TF one: + # https://github.com/tensorflow/tensorflow/blob/v2.3.0/tensorflow/python/ops/image_ops_impl.py#L2105-L2138 + l_img = (0.2989 * r + 0.587 * g + 0.114 * b).to(img.dtype) + l_img = l_img.unsqueeze(dim=-3) + else: + l_img = img.clone() + + if num_output_channels == 3: + return l_img.expand(img.shape) + + return l_img + + +def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: + if brightness_factor < 0: + raise ValueError(f"brightness_factor ({brightness_factor}) is not non-negative.") + + _assert_image_tensor(img) + + _assert_channels(img, [1, 3]) + + return _blend(img, torch.zeros_like(img), brightness_factor) + + +def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: + if contrast_factor < 0: + raise ValueError(f"contrast_factor ({contrast_factor}) is not non-negative.") + + _assert_image_tensor(img) + + _assert_channels(img, [3, 1]) + c = get_dimensions(img)[0] + dtype = img.dtype if torch.is_floating_point(img) else torch.float32 + if c == 3: + mean = torch.mean(rgb_to_grayscale(img).to(dtype), dim=(-3, -2, -1), keepdim=True) + else: + mean = torch.mean(img.to(dtype), dim=(-3, -2, -1), keepdim=True) + + return _blend(img, mean, contrast_factor) + + +def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: + if not (-0.5 <= hue_factor <= 0.5): + raise ValueError(f"hue_factor ({hue_factor}) is not in [-0.5, 0.5].") + + if not (isinstance(img, torch.Tensor)): + raise TypeError("Input img should be Tensor image") + + _assert_image_tensor(img) + + _assert_channels(img, [1, 3]) + if get_dimensions(img)[0] == 1: # Match PIL behaviour + return img + + orig_dtype = img.dtype + img = convert_image_dtype(img, torch.float32) + + img = _rgb2hsv(img) + h, s, v = img.unbind(dim=-3) + h = (h + hue_factor) % 1.0 + img = torch.stack((h, s, v), dim=-3) + img_hue_adj = _hsv2rgb(img) + + return convert_image_dtype(img_hue_adj, orig_dtype) + + +def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: + if saturation_factor < 0: + raise ValueError(f"saturation_factor ({saturation_factor}) is not non-negative.") + + _assert_image_tensor(img) + + _assert_channels(img, [1, 3]) + + if get_dimensions(img)[0] == 1: # Match PIL behaviour + return img + + return _blend(img, rgb_to_grayscale(img), saturation_factor) + + +def adjust_gamma(img: Tensor, gamma: float, gain: float = 1) -> Tensor: + if not isinstance(img, torch.Tensor): + raise TypeError("Input img should be a Tensor.") + + _assert_channels(img, [1, 3]) + + if gamma < 0: + raise ValueError("Gamma should be a non-negative real number") + + result = img + dtype = img.dtype + if not torch.is_floating_point(img): + result = convert_image_dtype(result, torch.float32) + + result = (gain * result**gamma).clamp(0, 1) + + result = convert_image_dtype(result, dtype) + return result + + +def _blend(img1: Tensor, img2: Tensor, ratio: float) -> Tensor: + ratio = float(ratio) + bound = _max_value(img1.dtype) + return (ratio * img1 + (1.0 - ratio) * img2).clamp(0, bound).to(img1.dtype) + + +def _rgb2hsv(img: Tensor) -> Tensor: + r, g, b = img.unbind(dim=-3) + + # Implementation is based on https://github.com/python-pillow/Pillow/blob/4174d4267616897df3746d315d5a2d0f82c656ee/ + # src/libImaging/Convert.c#L330 + maxc = torch.max(img, dim=-3).values + minc = torch.min(img, dim=-3).values + + # The algorithm erases S and H channel where `maxc = minc`. This avoids NaN + # from happening in the results, because + # + S channel has division by `maxc`, which is zero only if `maxc = minc` + # + H channel has division by `(maxc - minc)`. + # + # Instead of overwriting NaN afterwards, we just prevent it from occurring, so + # we don't need to deal with it in case we save the NaN in a buffer in + # backprop, if it is ever supported, but it doesn't hurt to do so. + eqc = maxc == minc + + cr = maxc - minc + # Since `eqc => cr = 0`, replacing denominator with 1 when `eqc` is fine. + ones = torch.ones_like(maxc) + s = cr / torch.where(eqc, ones, maxc) + # Note that `eqc => maxc = minc = r = g = b`. So the following calculation + # of `h` would reduce to `bc - gc + 2 + rc - bc + 4 + rc - bc = 6` so it + # would not matter what values `rc`, `gc`, and `bc` have here, and thus + # replacing denominator with 1 when `eqc` is fine. + cr_divisor = torch.where(eqc, ones, cr) + rc = (maxc - r) / cr_divisor + gc = (maxc - g) / cr_divisor + bc = (maxc - b) / cr_divisor + + hr = (maxc == r) * (bc - gc) + hg = ((maxc == g) & (maxc != r)) * (2.0 + rc - bc) + hb = ((maxc != g) & (maxc != r)) * (4.0 + gc - rc) + h = hr + hg + hb + h = torch.fmod((h / 6.0 + 1.0), 1.0) + return torch.stack((h, s, maxc), dim=-3) + + +def _hsv2rgb(img: Tensor) -> Tensor: + h, s, v = img.unbind(dim=-3) + i = torch.floor(h * 6.0) + f = (h * 6.0) - i + i = i.to(dtype=torch.int32) + + p = torch.clamp((v * (1.0 - s)), 0.0, 1.0) + q = torch.clamp((v * (1.0 - s * f)), 0.0, 1.0) + t = torch.clamp((v * (1.0 - s * (1.0 - f))), 0.0, 1.0) + i = i % 6 + + mask = i.unsqueeze(dim=-3) == torch.arange(6, device=i.device).view(-1, 1, 1) + + a1 = torch.stack((v, q, p, p, t, v), dim=-3) + a2 = torch.stack((t, v, v, q, p, p), dim=-3) + a3 = torch.stack((p, p, t, v, v, q), dim=-3) + a4 = torch.stack((a1, a2, a3), dim=-4) + + return torch.einsum("...ijk, ...xijk -> ...xjk", mask.to(dtype=img.dtype), a4) + + +def _pad_symmetric(img: Tensor, padding: List[int]) -> Tensor: + # padding is left, right, top, bottom + + # crop if needed + if padding[0] < 0 or padding[1] < 0 or padding[2] < 0 or padding[3] < 0: + neg_min_padding = [-min(x, 0) for x in padding] + crop_left, crop_right, crop_top, crop_bottom = neg_min_padding + img = img[..., crop_top : img.shape[-2] - crop_bottom, crop_left : img.shape[-1] - crop_right] + padding = [max(x, 0) for x in padding] + + in_sizes = img.size() + + _x_indices = [i for i in range(in_sizes[-1])] # [0, 1, 2, 3, ...] + left_indices = [i for i in range(padding[0] - 1, -1, -1)] # e.g. [3, 2, 1, 0] + right_indices = [-(i + 1) for i in range(padding[1])] # e.g. [-1, -2, -3] + x_indices = torch.tensor(left_indices + _x_indices + right_indices, device=img.device) + + _y_indices = [i for i in range(in_sizes[-2])] + top_indices = [i for i in range(padding[2] - 1, -1, -1)] + bottom_indices = [-(i + 1) for i in range(padding[3])] + y_indices = torch.tensor(top_indices + _y_indices + bottom_indices, device=img.device) + + ndim = img.ndim + if ndim == 3: + return img[:, y_indices[:, None], x_indices[None, :]] + elif ndim == 4: + return img[:, :, y_indices[:, None], x_indices[None, :]] + else: + raise RuntimeError("Symmetric padding of N-D tensors are not supported yet") + + +def _parse_pad_padding(padding: Union[int, List[int]]) -> List[int]: + if isinstance(padding, int): + if torch.jit.is_scripting(): + # This maybe unreachable + raise ValueError("padding can't be an int while torchscripting, set it as a list [value, ]") + pad_left = pad_right = pad_top = pad_bottom = padding + elif len(padding) == 1: + pad_left = pad_right = pad_top = pad_bottom = padding[0] + elif len(padding) == 2: + pad_left = pad_right = padding[0] + pad_top = pad_bottom = padding[1] + else: + pad_left = padding[0] + pad_top = padding[1] + pad_right = padding[2] + pad_bottom = padding[3] + + return [pad_left, pad_right, pad_top, pad_bottom] + + +def pad( + img: Tensor, padding: Union[int, List[int]], fill: Optional[Union[int, float]] = 0, padding_mode: str = "constant" +) -> Tensor: + _assert_image_tensor(img) + + if fill is None: + fill = 0 + + if not isinstance(padding, (int, tuple, list)): + raise TypeError("Got inappropriate padding arg") + if not isinstance(fill, (int, float)): + raise TypeError("Got inappropriate fill arg") + if not isinstance(padding_mode, str): + raise TypeError("Got inappropriate padding_mode arg") + + if isinstance(padding, tuple): + padding = list(padding) + + if isinstance(padding, list): + # TODO: Jit is failing on loading this op when scripted and saved + # https://github.com/pytorch/pytorch/issues/81100 + if len(padding) not in [1, 2, 4]: + raise ValueError( + f"Padding must be an int or a 1, 2, or 4 element tuple, not a {len(padding)} element tuple" + ) + + if padding_mode not in ["constant", "edge", "reflect", "symmetric"]: + raise ValueError("Padding mode should be either constant, edge, reflect or symmetric") + + p = _parse_pad_padding(padding) + + if padding_mode == "edge": + # remap padding_mode str + padding_mode = "replicate" + elif padding_mode == "symmetric": + # route to another implementation + return _pad_symmetric(img, p) + + need_squeeze = False + if img.ndim < 4: + img = img.unsqueeze(dim=0) + need_squeeze = True + + out_dtype = img.dtype + need_cast = False + if (padding_mode != "constant") and img.dtype not in (torch.float32, torch.float64): + # Here we temporarily cast input tensor to float + # until pytorch issue is resolved : + # https://github.com/pytorch/pytorch/issues/40763 + need_cast = True + img = img.to(torch.float32) + + if padding_mode in ("reflect", "replicate"): + img = torch_pad(img, p, mode=padding_mode) + else: + img = torch_pad(img, p, mode=padding_mode, value=float(fill)) + + if need_squeeze: + img = img.squeeze(dim=0) + + if need_cast: + img = img.to(out_dtype) + + return img + + +def resize( + img: Tensor, + size: List[int], + interpolation: str = "bilinear", + antialias: Optional[bool] = True, +) -> Tensor: + _assert_image_tensor(img) + + if isinstance(size, tuple): + size = list(size) + + if antialias is None: + antialias = False + + if antialias and interpolation not in ["bilinear", "bicubic"]: + # We manually set it to False to avoid an error downstream in interpolate() + # This behaviour is documented: the parameter is irrelevant for modes + # that are not bilinear or bicubic. We used to raise an error here, but + # now we don't as True is the default. + antialias = False + + img, need_cast, need_squeeze, out_dtype = _cast_squeeze_in(img, [torch.float32, torch.float64]) + + # Define align_corners to avoid warnings + align_corners = False if interpolation in ["bilinear", "bicubic"] else None + + img = interpolate(img, size=size, mode=interpolation, align_corners=align_corners, antialias=antialias) + + if interpolation == "bicubic" and out_dtype == torch.uint8: + img = img.clamp(min=0, max=255) + + img = _cast_squeeze_out(img, need_cast=need_cast, need_squeeze=need_squeeze, out_dtype=out_dtype) + + return img + + +def _assert_grid_transform_inputs( + img: Tensor, + matrix: Optional[List[float]], + interpolation: str, + fill: Optional[Union[int, float, List[float]]], + supported_interpolation_modes: List[str], + coeffs: Optional[List[float]] = None, +) -> None: + + if not (isinstance(img, torch.Tensor)): + raise TypeError("Input img should be Tensor") + + _assert_image_tensor(img) + + if matrix is not None and not isinstance(matrix, list): + raise TypeError("Argument matrix should be a list") + + if matrix is not None and len(matrix) != 6: + raise ValueError("Argument matrix should have 6 float values") + + if coeffs is not None and len(coeffs) != 8: + raise ValueError("Argument coeffs should have 8 float values") + + if fill is not None and not isinstance(fill, (int, float, tuple, list)): + warnings.warn("Argument fill should be either int, float, tuple or list") + + # Check fill + num_channels = get_dimensions(img)[0] + if fill is not None and isinstance(fill, (tuple, list)) and len(fill) > 1 and len(fill) != num_channels: + msg = ( + "The number of elements in 'fill' cannot broadcast to match the number of " + "channels of the image ({} != {})" + ) + raise ValueError(msg.format(len(fill), num_channels)) + + if interpolation not in supported_interpolation_modes: + raise ValueError(f"Interpolation mode '{interpolation}' is unsupported with Tensor input") + + +def _cast_squeeze_in(img: Tensor, req_dtypes: List[torch.dtype]) -> Tuple[Tensor, bool, bool, torch.dtype]: + need_squeeze = False + # make image NCHW + if img.ndim < 4: + img = img.unsqueeze(dim=0) + need_squeeze = True + + out_dtype = img.dtype + need_cast = False + if out_dtype not in req_dtypes: + need_cast = True + req_dtype = req_dtypes[0] + img = img.to(req_dtype) + return img, need_cast, need_squeeze, out_dtype + + +def _cast_squeeze_out(img: Tensor, need_cast: bool, need_squeeze: bool, out_dtype: torch.dtype) -> Tensor: + if need_squeeze: + img = img.squeeze(dim=0) + + if need_cast: + if out_dtype in (torch.uint8, torch.int8, torch.int16, torch.int32, torch.int64): + # it is better to round before cast + img = torch.round(img) + img = img.to(out_dtype) + + return img + + +def _apply_grid_transform( + img: Tensor, grid: Tensor, mode: str, fill: Optional[Union[int, float, List[float]]] +) -> Tensor: + + img, need_cast, need_squeeze, out_dtype = _cast_squeeze_in(img, [grid.dtype]) + + if img.shape[0] > 1: + # Apply same grid to a batch of images + grid = grid.expand(img.shape[0], grid.shape[1], grid.shape[2], grid.shape[3]) + + # Append a dummy mask for customized fill colors, should be faster than grid_sample() twice + if fill is not None: + mask = torch.ones((img.shape[0], 1, img.shape[2], img.shape[3]), dtype=img.dtype, device=img.device) + img = torch.cat((img, mask), dim=1) + + img = grid_sample(img, grid, mode=mode, padding_mode="zeros", align_corners=False) + + # Fill with required color + if fill is not None: + mask = img[:, -1:, :, :] # N * 1 * H * W + img = img[:, :-1, :, :] # N * C * H * W + mask = mask.expand_as(img) + fill_list, len_fill = (fill, len(fill)) if isinstance(fill, (tuple, list)) else ([float(fill)], 1) + fill_img = torch.tensor(fill_list, dtype=img.dtype, device=img.device).view(1, len_fill, 1, 1).expand_as(img) + if mode == "nearest": + mask = mask < 0.5 + img[mask] = fill_img[mask] + else: # 'bilinear' + img = img * mask + (1.0 - mask) * fill_img + + img = _cast_squeeze_out(img, need_cast, need_squeeze, out_dtype) + return img + + +def _gen_affine_grid( + theta: Tensor, + w: int, + h: int, + ow: int, + oh: int, +) -> Tensor: + # https://github.com/pytorch/pytorch/blob/74b65c32be68b15dc7c9e8bb62459efbfbde33d8/aten/src/ATen/native/ + # AffineGridGenerator.cpp#L18 + # Difference with AffineGridGenerator is that: + # 1) we normalize grid values after applying theta + # 2) we can normalize by other image size, such that it covers "extend" option like in PIL.Image.rotate + + d = 0.5 + base_grid = torch.empty(1, oh, ow, 3, dtype=theta.dtype, device=theta.device) + x_grid = torch.linspace(-ow * 0.5 + d, ow * 0.5 + d - 1, steps=ow, device=theta.device) + base_grid[..., 0].copy_(x_grid) + y_grid = torch.linspace(-oh * 0.5 + d, oh * 0.5 + d - 1, steps=oh, device=theta.device).unsqueeze_(-1) + base_grid[..., 1].copy_(y_grid) + base_grid[..., 2].fill_(1) + + rescaled_theta = theta.transpose(1, 2) / torch.tensor([0.5 * w, 0.5 * h], dtype=theta.dtype, device=theta.device) + output_grid = base_grid.view(1, oh * ow, 3).bmm(rescaled_theta) + return output_grid.view(1, oh, ow, 2) + + +def affine( + img: Tensor, + matrix: List[float], + interpolation: str = "nearest", + fill: Optional[Union[int, float, List[float]]] = None, +) -> Tensor: + _assert_grid_transform_inputs(img, matrix, interpolation, fill, ["nearest", "bilinear"]) + + dtype = img.dtype if torch.is_floating_point(img) else torch.float32 + theta = torch.tensor(matrix, dtype=dtype, device=img.device).reshape(1, 2, 3) + shape = img.shape + # grid will be generated on the same device as theta and img + grid = _gen_affine_grid(theta, w=shape[-1], h=shape[-2], ow=shape[-1], oh=shape[-2]) + return _apply_grid_transform(img, grid, interpolation, fill=fill) + + +def _compute_affine_output_size(matrix: List[float], w: int, h: int) -> Tuple[int, int]: + + # Inspired of PIL implementation: + # https://github.com/python-pillow/Pillow/blob/11de3318867e4398057373ee9f12dcb33db7335c/src/PIL/Image.py#L2054 + + # pts are Top-Left, Top-Right, Bottom-Left, Bottom-Right points. + # Points are shifted due to affine matrix torch convention about + # the center point. Center is (0, 0) for image center pivot point (w * 0.5, h * 0.5) + pts = torch.tensor( + [ + [-0.5 * w, -0.5 * h, 1.0], + [-0.5 * w, 0.5 * h, 1.0], + [0.5 * w, 0.5 * h, 1.0], + [0.5 * w, -0.5 * h, 1.0], + ] + ) + theta = torch.tensor(matrix, dtype=torch.float).view(2, 3) + new_pts = torch.matmul(pts, theta.T) + min_vals, _ = new_pts.min(dim=0) + max_vals, _ = new_pts.max(dim=0) + + # shift points to [0, w] and [0, h] interval to match PIL results + min_vals += torch.tensor((w * 0.5, h * 0.5)) + max_vals += torch.tensor((w * 0.5, h * 0.5)) + + # Truncate precision to 1e-4 to avoid ceil of Xe-15 to 1.0 + tol = 1e-4 + cmax = torch.ceil((max_vals / tol).trunc_() * tol) + cmin = torch.floor((min_vals / tol).trunc_() * tol) + size = cmax - cmin + return int(size[0]), int(size[1]) # w, h + + +def rotate( + img: Tensor, + matrix: List[float], + interpolation: str = "nearest", + expand: bool = False, + fill: Optional[Union[int, float, List[float]]] = None, +) -> Tensor: + _assert_grid_transform_inputs(img, matrix, interpolation, fill, ["nearest", "bilinear"]) + w, h = img.shape[-1], img.shape[-2] + ow, oh = _compute_affine_output_size(matrix, w, h) if expand else (w, h) + dtype = img.dtype if torch.is_floating_point(img) else torch.float32 + theta = torch.tensor(matrix, dtype=dtype, device=img.device).reshape(1, 2, 3) + # grid will be generated on the same device as theta and img + grid = _gen_affine_grid(theta, w=w, h=h, ow=ow, oh=oh) + + return _apply_grid_transform(img, grid, interpolation, fill=fill) + + +def _perspective_grid(coeffs: List[float], ow: int, oh: int, dtype: torch.dtype, device: torch.device) -> Tensor: + # https://github.com/python-pillow/Pillow/blob/4634eafe3c695a014267eefdce830b4a825beed7/ + # src/libImaging/Geometry.c#L394 + + # + # x_out = (coeffs[0] * x + coeffs[1] * y + coeffs[2]) / (coeffs[6] * x + coeffs[7] * y + 1) + # y_out = (coeffs[3] * x + coeffs[4] * y + coeffs[5]) / (coeffs[6] * x + coeffs[7] * y + 1) + # + theta1 = torch.tensor( + [[[coeffs[0], coeffs[1], coeffs[2]], [coeffs[3], coeffs[4], coeffs[5]]]], dtype=dtype, device=device + ) + theta2 = torch.tensor([[[coeffs[6], coeffs[7], 1.0], [coeffs[6], coeffs[7], 1.0]]], dtype=dtype, device=device) + + d = 0.5 + base_grid = torch.empty(1, oh, ow, 3, dtype=dtype, device=device) + x_grid = torch.linspace(d, ow * 1.0 + d - 1.0, steps=ow, device=device) + base_grid[..., 0].copy_(x_grid) + y_grid = torch.linspace(d, oh * 1.0 + d - 1.0, steps=oh, device=device).unsqueeze_(-1) + base_grid[..., 1].copy_(y_grid) + base_grid[..., 2].fill_(1) + + rescaled_theta1 = theta1.transpose(1, 2) / torch.tensor([0.5 * ow, 0.5 * oh], dtype=dtype, device=device) + output_grid1 = base_grid.view(1, oh * ow, 3).bmm(rescaled_theta1) + output_grid2 = base_grid.view(1, oh * ow, 3).bmm(theta2.transpose(1, 2)) + + output_grid = output_grid1 / output_grid2 - 1.0 + return output_grid.view(1, oh, ow, 2) + + +def perspective( + img: Tensor, + perspective_coeffs: List[float], + interpolation: str = "bilinear", + fill: Optional[Union[int, float, List[float]]] = None, +) -> Tensor: + if not (isinstance(img, torch.Tensor)): + raise TypeError("Input img should be Tensor.") + + _assert_image_tensor(img) + + _assert_grid_transform_inputs( + img, + matrix=None, + interpolation=interpolation, + fill=fill, + supported_interpolation_modes=["nearest", "bilinear"], + coeffs=perspective_coeffs, + ) + + ow, oh = img.shape[-1], img.shape[-2] + dtype = img.dtype if torch.is_floating_point(img) else torch.float32 + grid = _perspective_grid(perspective_coeffs, ow=ow, oh=oh, dtype=dtype, device=img.device) + return _apply_grid_transform(img, grid, interpolation, fill=fill) + + +def _get_gaussian_kernel1d(kernel_size: int, sigma: float, dtype: torch.dtype, device: torch.device) -> Tensor: + ksize_half = (kernel_size - 1) * 0.5 + + x = torch.linspace(-ksize_half, ksize_half, steps=kernel_size, dtype=dtype, device=device) + pdf = torch.exp(-0.5 * (x / sigma).pow(2)) + kernel1d = pdf / pdf.sum() + + return kernel1d + + +def _get_gaussian_kernel2d( + kernel_size: List[int], sigma: List[float], dtype: torch.dtype, device: torch.device +) -> Tensor: + kernel1d_x = _get_gaussian_kernel1d(kernel_size[0], sigma[0], dtype, device) + kernel1d_y = _get_gaussian_kernel1d(kernel_size[1], sigma[1], dtype, device) + kernel2d = torch.mm(kernel1d_y[:, None], kernel1d_x[None, :]) + return kernel2d + + +def gaussian_blur(img: Tensor, kernel_size: List[int], sigma: List[float]) -> Tensor: + if not (isinstance(img, torch.Tensor)): + raise TypeError(f"img should be Tensor. Got {type(img)}") + + _assert_image_tensor(img) + + dtype = img.dtype if torch.is_floating_point(img) else torch.float32 + kernel = _get_gaussian_kernel2d(kernel_size, sigma, dtype=dtype, device=img.device) + kernel = kernel.expand(img.shape[-3], 1, kernel.shape[0], kernel.shape[1]) + + img, need_cast, need_squeeze, out_dtype = _cast_squeeze_in(img, [kernel.dtype]) + + # padding = (left, right, top, bottom) + padding = [kernel_size[0] // 2, kernel_size[0] // 2, kernel_size[1] // 2, kernel_size[1] // 2] + img = torch_pad(img, padding, mode="reflect") + img = conv2d(img, kernel, groups=img.shape[-3]) + + img = _cast_squeeze_out(img, need_cast, need_squeeze, out_dtype) + return img + + +def invert(img: Tensor) -> Tensor: + + _assert_image_tensor(img) + + if img.ndim < 3: + raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") + + _assert_channels(img, [1, 3]) + + return _max_value(img.dtype) - img + + +def posterize(img: Tensor, bits: int) -> Tensor: + + _assert_image_tensor(img) + + if img.ndim < 3: + raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") + if img.dtype != torch.uint8: + raise TypeError(f"Only torch.uint8 image tensors are supported, but found {img.dtype}") + + _assert_channels(img, [1, 3]) + mask = -int(2 ** (8 - bits)) # JIT-friendly for: ~(2 ** (8 - bits) - 1) + return img & mask + + +def solarize(img: Tensor, threshold: float) -> Tensor: + + _assert_image_tensor(img) + + if img.ndim < 3: + raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") + + _assert_channels(img, [1, 3]) + + if threshold > _max_value(img.dtype): + raise TypeError("Threshold should be less than bound of img.") + + inverted_img = invert(img) + return torch.where(img >= threshold, inverted_img, img) + + +def _blurred_degenerate_image(img: Tensor) -> Tensor: + dtype = img.dtype if torch.is_floating_point(img) else torch.float32 + + kernel = torch.ones((3, 3), dtype=dtype, device=img.device) + kernel[1, 1] = 5.0 + kernel /= kernel.sum() + kernel = kernel.expand(img.shape[-3], 1, kernel.shape[0], kernel.shape[1]) + + result_tmp, need_cast, need_squeeze, out_dtype = _cast_squeeze_in(img, [kernel.dtype]) + result_tmp = conv2d(result_tmp, kernel, groups=result_tmp.shape[-3]) + result_tmp = _cast_squeeze_out(result_tmp, need_cast, need_squeeze, out_dtype) + + result = img.clone() + result[..., 1:-1, 1:-1] = result_tmp + + return result + + +def adjust_sharpness(img: Tensor, sharpness_factor: float) -> Tensor: + if sharpness_factor < 0: + raise ValueError(f"sharpness_factor ({sharpness_factor}) is not non-negative.") + + _assert_image_tensor(img) + + _assert_channels(img, [1, 3]) + + if img.size(-1) <= 2 or img.size(-2) <= 2: + return img + + return _blend(img, _blurred_degenerate_image(img), sharpness_factor) + + +def autocontrast(img: Tensor) -> Tensor: + + _assert_image_tensor(img) + + if img.ndim < 3: + raise TypeError(f"Input image tensor should have at least 3 dimensions, but found {img.ndim}") + + _assert_channels(img, [1, 3]) + + bound = _max_value(img.dtype) + dtype = img.dtype if torch.is_floating_point(img) else torch.float32 + + minimum = img.amin(dim=(-2, -1), keepdim=True).to(dtype) + maximum = img.amax(dim=(-2, -1), keepdim=True).to(dtype) + scale = bound / (maximum - minimum) + eq_idxs = torch.isfinite(scale).logical_not() + minimum[eq_idxs] = 0 + scale[eq_idxs] = 1 + + return ((img - minimum) * scale).clamp(0, bound).to(img.dtype) + + +def _scale_channel(img_chan: Tensor) -> Tensor: + # TODO: we should expect bincount to always be faster than histc, but this + # isn't always the case. Once + # https://github.com/pytorch/pytorch/issues/53194 is fixed, remove the if + # block and only use bincount. + if img_chan.is_cuda: + hist = torch.histc(img_chan.to(torch.float32), bins=256, min=0, max=255) + else: + hist = torch.bincount(img_chan.reshape(-1), minlength=256) + + nonzero_hist = hist[hist != 0] + step = torch.div(nonzero_hist[:-1].sum(), 255, rounding_mode="floor") + if step == 0: + return img_chan + + lut = torch.div(torch.cumsum(hist, 0) + torch.div(step, 2, rounding_mode="floor"), step, rounding_mode="floor") + lut = torch.nn.functional.pad(lut, [1, 0])[:-1].clamp(0, 255) + + return lut[img_chan.to(torch.int64)].to(torch.uint8) + + +def _equalize_single_image(img: Tensor) -> Tensor: + return torch.stack([_scale_channel(img[c]) for c in range(img.size(0))]) + + +def equalize(img: Tensor) -> Tensor: + + _assert_image_tensor(img) + + if not (3 <= img.ndim <= 4): + raise TypeError(f"Input image tensor should have 3 or 4 dimensions, but found {img.ndim}") + if img.dtype != torch.uint8: + raise TypeError(f"Only torch.uint8 image tensors are supported, but found {img.dtype}") + + _assert_channels(img, [1, 3]) + + if img.ndim == 3: + return _equalize_single_image(img) + + return torch.stack([_equalize_single_image(x) for x in img]) + + +def normalize(tensor: Tensor, mean: List[float], std: List[float], inplace: bool = False) -> Tensor: + _assert_image_tensor(tensor) + + if not tensor.is_floating_point(): + raise TypeError(f"Input tensor should be a float tensor. Got {tensor.dtype}.") + + if tensor.ndim < 3: + raise ValueError( + f"Expected tensor to be a tensor image of size (..., C, H, W). Got tensor.size() = {tensor.size()}" + ) + + if not inplace: + tensor = tensor.clone() + + dtype = tensor.dtype + mean = torch.as_tensor(mean, dtype=dtype, device=tensor.device) + std = torch.as_tensor(std, dtype=dtype, device=tensor.device) + if (std == 0).any(): + raise ValueError(f"std evaluated to zero after conversion to {dtype}, leading to division by zero.") + if mean.ndim == 1: + mean = mean.view(-1, 1, 1) + if std.ndim == 1: + std = std.view(-1, 1, 1) + return tensor.sub_(mean).div_(std) + + +def erase(img: Tensor, i: int, j: int, h: int, w: int, v: Tensor, inplace: bool = False) -> Tensor: + _assert_image_tensor(img) + + if not inplace: + img = img.clone() + + img[..., i : i + h, j : j + w] = v + return img + + +def _create_identity_grid(size: List[int]) -> Tensor: + hw_space = [torch.linspace((-s + 1) / s, (s - 1) / s, s) for s in size] + grid_y, grid_x = torch.meshgrid(hw_space, indexing="ij") + return torch.stack([grid_x, grid_y], -1).unsqueeze(0) # 1 x H x W x 2 + + +def elastic_transform( + img: Tensor, + displacement: Tensor, + interpolation: str = "bilinear", + fill: Optional[Union[int, float, List[float]]] = None, +) -> Tensor: + + if not (isinstance(img, torch.Tensor)): + raise TypeError(f"img should be Tensor. Got {type(img)}") + + size = list(img.shape[-2:]) + displacement = displacement.to(img.device) + + identity_grid = _create_identity_grid(size) + grid = identity_grid.to(img.device) + displacement + return _apply_grid_transform(img, grid, interpolation, fill) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_video.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_video.py new file mode 100644 index 0000000000000000000000000000000000000000..e4821a9e403e6de4f4f0ef25f5d0cab7141802d2 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_functional_video.py @@ -0,0 +1,114 @@ +import warnings + +import torch + + +warnings.warn( + "The 'torchvision.transforms._functional_video' module is deprecated since 0.12 and will be removed in the future. " + "Please use the 'torchvision.transforms.functional' module instead." +) + + +def _is_tensor_video_clip(clip): + if not torch.is_tensor(clip): + raise TypeError("clip should be Tensor. Got %s" % type(clip)) + + if not clip.ndimension() == 4: + raise ValueError("clip should be 4D. Got %dD" % clip.dim()) + + return True + + +def crop(clip, i, j, h, w): + """ + Args: + clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W) + """ + if len(clip.size()) != 4: + raise ValueError("clip should be a 4D tensor") + return clip[..., i : i + h, j : j + w] + + +def resize(clip, target_size, interpolation_mode): + if len(target_size) != 2: + raise ValueError(f"target size should be tuple (height, width), instead got {target_size}") + return torch.nn.functional.interpolate(clip, size=target_size, mode=interpolation_mode, align_corners=False) + + +def resized_crop(clip, i, j, h, w, size, interpolation_mode="bilinear"): + """ + Do spatial cropping and resizing to the video clip + Args: + clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W) + i (int): i in (i,j) i.e coordinates of the upper left corner. + j (int): j in (i,j) i.e coordinates of the upper left corner. + h (int): Height of the cropped region. + w (int): Width of the cropped region. + size (tuple(int, int)): height and width of resized clip + Returns: + clip (torch.tensor): Resized and cropped clip. Size is (C, T, H, W) + """ + if not _is_tensor_video_clip(clip): + raise ValueError("clip should be a 4D torch.tensor") + clip = crop(clip, i, j, h, w) + clip = resize(clip, size, interpolation_mode) + return clip + + +def center_crop(clip, crop_size): + if not _is_tensor_video_clip(clip): + raise ValueError("clip should be a 4D torch.tensor") + h, w = clip.size(-2), clip.size(-1) + th, tw = crop_size + if h < th or w < tw: + raise ValueError("height and width must be no smaller than crop_size") + + i = int(round((h - th) / 2.0)) + j = int(round((w - tw) / 2.0)) + return crop(clip, i, j, th, tw) + + +def to_tensor(clip): + """ + Convert tensor data type from uint8 to float, divide value by 255.0 and + permute the dimensions of clip tensor + Args: + clip (torch.tensor, dtype=torch.uint8): Size is (T, H, W, C) + Return: + clip (torch.tensor, dtype=torch.float): Size is (C, T, H, W) + """ + _is_tensor_video_clip(clip) + if not clip.dtype == torch.uint8: + raise TypeError("clip tensor should have data type uint8. Got %s" % str(clip.dtype)) + return clip.float().permute(3, 0, 1, 2) / 255.0 + + +def normalize(clip, mean, std, inplace=False): + """ + Args: + clip (torch.tensor): Video clip to be normalized. Size is (C, T, H, W) + mean (tuple): pixel RGB mean. Size is (3) + std (tuple): pixel standard deviation. Size is (3) + Returns: + normalized clip (torch.tensor): Size is (C, T, H, W) + """ + if not _is_tensor_video_clip(clip): + raise ValueError("clip should be a 4D torch.tensor") + if not inplace: + clip = clip.clone() + mean = torch.as_tensor(mean, dtype=clip.dtype, device=clip.device) + std = torch.as_tensor(std, dtype=clip.dtype, device=clip.device) + clip.sub_(mean[:, None, None, None]).div_(std[:, None, None, None]) + return clip + + +def hflip(clip): + """ + Args: + clip (torch.tensor): Video clip to be normalized. Size is (C, T, H, W) + Returns: + flipped clip (torch.tensor): Size is (C, T, H, W) + """ + if not _is_tensor_video_clip(clip): + raise ValueError("clip should be a 4D torch.tensor") + return clip.flip(-1) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_presets.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_presets.py new file mode 100644 index 0000000000000000000000000000000000000000..3d3d5374e8d0d17358f98575647f2105a8c3a338 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_presets.py @@ -0,0 +1,216 @@ +""" +This file is part of the private API. Please do not use directly these classes as they will be modified on +future versions without warning. The classes should be accessed only via the transforms argument of Weights. +""" +from typing import Optional, Tuple, Union + +import torch +from torch import nn, Tensor + +from . import functional as F, InterpolationMode + + +__all__ = [ + "ObjectDetection", + "ImageClassification", + "VideoClassification", + "SemanticSegmentation", + "OpticalFlow", +] + + +class ObjectDetection(nn.Module): + def forward(self, img: Tensor) -> Tensor: + if not isinstance(img, Tensor): + img = F.pil_to_tensor(img) + return F.convert_image_dtype(img, torch.float) + + def __repr__(self) -> str: + return self.__class__.__name__ + "()" + + def describe(self) -> str: + return ( + "Accepts ``PIL.Image``, batched ``(B, C, H, W)`` and single ``(C, H, W)`` image ``torch.Tensor`` objects. " + "The images are rescaled to ``[0.0, 1.0]``." + ) + + +class ImageClassification(nn.Module): + def __init__( + self, + *, + crop_size: int, + resize_size: int = 256, + mean: Tuple[float, ...] = (0.485, 0.456, 0.406), + std: Tuple[float, ...] = (0.229, 0.224, 0.225), + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, + ) -> None: + super().__init__() + self.crop_size = [crop_size] + self.resize_size = [resize_size] + self.mean = list(mean) + self.std = list(std) + self.interpolation = interpolation + self.antialias = antialias + + def forward(self, img: Tensor) -> Tensor: + img = F.resize(img, self.resize_size, interpolation=self.interpolation, antialias=self.antialias) + img = F.center_crop(img, self.crop_size) + if not isinstance(img, Tensor): + img = F.pil_to_tensor(img) + img = F.convert_image_dtype(img, torch.float) + img = F.normalize(img, mean=self.mean, std=self.std) + return img + + def __repr__(self) -> str: + format_string = self.__class__.__name__ + "(" + format_string += f"\n crop_size={self.crop_size}" + format_string += f"\n resize_size={self.resize_size}" + format_string += f"\n mean={self.mean}" + format_string += f"\n std={self.std}" + format_string += f"\n interpolation={self.interpolation}" + format_string += "\n)" + return format_string + + def describe(self) -> str: + return ( + "Accepts ``PIL.Image``, batched ``(B, C, H, W)`` and single ``(C, H, W)`` image ``torch.Tensor`` objects. " + f"The images are resized to ``resize_size={self.resize_size}`` using ``interpolation={self.interpolation}``, " + f"followed by a central crop of ``crop_size={self.crop_size}``. Finally the values are first rescaled to " + f"``[0.0, 1.0]`` and then normalized using ``mean={self.mean}`` and ``std={self.std}``." + ) + + +class VideoClassification(nn.Module): + def __init__( + self, + *, + crop_size: Tuple[int, int], + resize_size: Union[Tuple[int], Tuple[int, int]], + mean: Tuple[float, ...] = (0.43216, 0.394666, 0.37645), + std: Tuple[float, ...] = (0.22803, 0.22145, 0.216989), + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + ) -> None: + super().__init__() + self.crop_size = list(crop_size) + self.resize_size = list(resize_size) + self.mean = list(mean) + self.std = list(std) + self.interpolation = interpolation + + def forward(self, vid: Tensor) -> Tensor: + need_squeeze = False + if vid.ndim < 5: + vid = vid.unsqueeze(dim=0) + need_squeeze = True + + N, T, C, H, W = vid.shape + vid = vid.view(-1, C, H, W) + # We hard-code antialias=False to preserve results after we changed + # its default from None to True (see + # https://github.com/pytorch/vision/pull/7160) + # TODO: we could re-train the video models with antialias=True? + vid = F.resize(vid, self.resize_size, interpolation=self.interpolation, antialias=False) + vid = F.center_crop(vid, self.crop_size) + vid = F.convert_image_dtype(vid, torch.float) + vid = F.normalize(vid, mean=self.mean, std=self.std) + H, W = self.crop_size + vid = vid.view(N, T, C, H, W) + vid = vid.permute(0, 2, 1, 3, 4) # (N, T, C, H, W) => (N, C, T, H, W) + + if need_squeeze: + vid = vid.squeeze(dim=0) + return vid + + def __repr__(self) -> str: + format_string = self.__class__.__name__ + "(" + format_string += f"\n crop_size={self.crop_size}" + format_string += f"\n resize_size={self.resize_size}" + format_string += f"\n mean={self.mean}" + format_string += f"\n std={self.std}" + format_string += f"\n interpolation={self.interpolation}" + format_string += "\n)" + return format_string + + def describe(self) -> str: + return ( + "Accepts batched ``(B, T, C, H, W)`` and single ``(T, C, H, W)`` video frame ``torch.Tensor`` objects. " + f"The frames are resized to ``resize_size={self.resize_size}`` using ``interpolation={self.interpolation}``, " + f"followed by a central crop of ``crop_size={self.crop_size}``. Finally the values are first rescaled to " + f"``[0.0, 1.0]`` and then normalized using ``mean={self.mean}`` and ``std={self.std}``. Finally the output " + "dimensions are permuted to ``(..., C, T, H, W)`` tensors." + ) + + +class SemanticSegmentation(nn.Module): + def __init__( + self, + *, + resize_size: Optional[int], + mean: Tuple[float, ...] = (0.485, 0.456, 0.406), + std: Tuple[float, ...] = (0.229, 0.224, 0.225), + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, + ) -> None: + super().__init__() + self.resize_size = [resize_size] if resize_size is not None else None + self.mean = list(mean) + self.std = list(std) + self.interpolation = interpolation + self.antialias = antialias + + def forward(self, img: Tensor) -> Tensor: + if isinstance(self.resize_size, list): + img = F.resize(img, self.resize_size, interpolation=self.interpolation, antialias=self.antialias) + if not isinstance(img, Tensor): + img = F.pil_to_tensor(img) + img = F.convert_image_dtype(img, torch.float) + img = F.normalize(img, mean=self.mean, std=self.std) + return img + + def __repr__(self) -> str: + format_string = self.__class__.__name__ + "(" + format_string += f"\n resize_size={self.resize_size}" + format_string += f"\n mean={self.mean}" + format_string += f"\n std={self.std}" + format_string += f"\n interpolation={self.interpolation}" + format_string += "\n)" + return format_string + + def describe(self) -> str: + return ( + "Accepts ``PIL.Image``, batched ``(B, C, H, W)`` and single ``(C, H, W)`` image ``torch.Tensor`` objects. " + f"The images are resized to ``resize_size={self.resize_size}`` using ``interpolation={self.interpolation}``. " + f"Finally the values are first rescaled to ``[0.0, 1.0]`` and then normalized using ``mean={self.mean}`` and " + f"``std={self.std}``." + ) + + +class OpticalFlow(nn.Module): + def forward(self, img1: Tensor, img2: Tensor) -> Tuple[Tensor, Tensor]: + if not isinstance(img1, Tensor): + img1 = F.pil_to_tensor(img1) + if not isinstance(img2, Tensor): + img2 = F.pil_to_tensor(img2) + + img1 = F.convert_image_dtype(img1, torch.float) + img2 = F.convert_image_dtype(img2, torch.float) + + # map [0, 1] into [-1, 1] + img1 = F.normalize(img1, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) + img2 = F.normalize(img2, mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) + + img1 = img1.contiguous() + img2 = img2.contiguous() + + return img1, img2 + + def __repr__(self) -> str: + return self.__class__.__name__ + "()" + + def describe(self) -> str: + return ( + "Accepts ``PIL.Image``, batched ``(B, C, H, W)`` and single ``(C, H, W)`` image ``torch.Tensor`` objects. " + "The images are rescaled to ``[-1.0, 1.0]``." + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_transforms_video.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_transforms_video.py new file mode 100644 index 0000000000000000000000000000000000000000..9cd2d7a67d710e4a13a07f20b3cbd42bb18ba97e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/_transforms_video.py @@ -0,0 +1,174 @@ +#!/usr/bin/env python3 + +import numbers +import random +import warnings + +from torchvision.transforms import RandomCrop, RandomResizedCrop + +from . import _functional_video as F + + +__all__ = [ + "RandomCropVideo", + "RandomResizedCropVideo", + "CenterCropVideo", + "NormalizeVideo", + "ToTensorVideo", + "RandomHorizontalFlipVideo", +] + + +warnings.warn( + "The 'torchvision.transforms._transforms_video' module is deprecated since 0.12 and will be removed in the future. " + "Please use the 'torchvision.transforms' module instead." +) + + +class RandomCropVideo(RandomCrop): + def __init__(self, size): + if isinstance(size, numbers.Number): + self.size = (int(size), int(size)) + else: + self.size = size + + def __call__(self, clip): + """ + Args: + clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W) + Returns: + torch.tensor: randomly cropped/resized video clip. + size is (C, T, OH, OW) + """ + i, j, h, w = self.get_params(clip, self.size) + return F.crop(clip, i, j, h, w) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(size={self.size})" + + +class RandomResizedCropVideo(RandomResizedCrop): + def __init__( + self, + size, + scale=(0.08, 1.0), + ratio=(3.0 / 4.0, 4.0 / 3.0), + interpolation_mode="bilinear", + ): + if isinstance(size, tuple): + if len(size) != 2: + raise ValueError(f"size should be tuple (height, width), instead got {size}") + self.size = size + else: + self.size = (size, size) + + self.interpolation_mode = interpolation_mode + self.scale = scale + self.ratio = ratio + + def __call__(self, clip): + """ + Args: + clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W) + Returns: + torch.tensor: randomly cropped/resized video clip. + size is (C, T, H, W) + """ + i, j, h, w = self.get_params(clip, self.scale, self.ratio) + return F.resized_crop(clip, i, j, h, w, self.size, self.interpolation_mode) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(size={self.size}, interpolation_mode={self.interpolation_mode}, scale={self.scale}, ratio={self.ratio})" + + +class CenterCropVideo: + def __init__(self, crop_size): + if isinstance(crop_size, numbers.Number): + self.crop_size = (int(crop_size), int(crop_size)) + else: + self.crop_size = crop_size + + def __call__(self, clip): + """ + Args: + clip (torch.tensor): Video clip to be cropped. Size is (C, T, H, W) + Returns: + torch.tensor: central cropping of video clip. Size is + (C, T, crop_size, crop_size) + """ + return F.center_crop(clip, self.crop_size) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(crop_size={self.crop_size})" + + +class NormalizeVideo: + """ + Normalize the video clip by mean subtraction and division by standard deviation + Args: + mean (3-tuple): pixel RGB mean + std (3-tuple): pixel RGB standard deviation + inplace (boolean): whether do in-place normalization + """ + + def __init__(self, mean, std, inplace=False): + self.mean = mean + self.std = std + self.inplace = inplace + + def __call__(self, clip): + """ + Args: + clip (torch.tensor): video clip to be normalized. Size is (C, T, H, W) + """ + return F.normalize(clip, self.mean, self.std, self.inplace) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(mean={self.mean}, std={self.std}, inplace={self.inplace})" + + +class ToTensorVideo: + """ + Convert tensor data type from uint8 to float, divide value by 255.0 and + permute the dimensions of clip tensor + """ + + def __init__(self): + pass + + def __call__(self, clip): + """ + Args: + clip (torch.tensor, dtype=torch.uint8): Size is (T, H, W, C) + Return: + clip (torch.tensor, dtype=torch.float): Size is (C, T, H, W) + """ + return F.to_tensor(clip) + + def __repr__(self) -> str: + return self.__class__.__name__ + + +class RandomHorizontalFlipVideo: + """ + Flip the video clip along the horizontal direction with a given probability + Args: + p (float): probability of the clip being flipped. Default value is 0.5 + """ + + def __init__(self, p=0.5): + self.p = p + + def __call__(self, clip): + """ + Args: + clip (torch.tensor): Size is (C, T, H, W) + Return: + clip (torch.tensor): Size is (C, T, H, W) + """ + if random.random() < self.p: + clip = F.hflip(clip) + return clip + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/autoaugment.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/autoaugment.py new file mode 100644 index 0000000000000000000000000000000000000000..8503b5ba72b4e8dd7d8d69ff4c07acb8e46ccb82 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/autoaugment.py @@ -0,0 +1,615 @@ +import math +from enum import Enum +from typing import Dict, List, Optional, Tuple + +import torch +from torch import Tensor + +from . import functional as F, InterpolationMode + +__all__ = ["AutoAugmentPolicy", "AutoAugment", "RandAugment", "TrivialAugmentWide", "AugMix"] + + +def _apply_op( + img: Tensor, op_name: str, magnitude: float, interpolation: InterpolationMode, fill: Optional[List[float]] +): + if op_name == "ShearX": + # magnitude should be arctan(magnitude) + # official autoaug: (1, level, 0, 0, 1, 0) + # https://github.com/tensorflow/models/blob/dd02069717128186b88afa8d857ce57d17957f03/research/autoaugment/augmentation_transforms.py#L290 + # compared to + # torchvision: (1, tan(level), 0, 0, 1, 0) + # https://github.com/pytorch/vision/blob/0c2373d0bba3499e95776e7936e207d8a1676e65/torchvision/transforms/functional.py#L976 + img = F.affine( + img, + angle=0.0, + translate=[0, 0], + scale=1.0, + shear=[math.degrees(math.atan(magnitude)), 0.0], + interpolation=interpolation, + fill=fill, + center=[0, 0], + ) + elif op_name == "ShearY": + # magnitude should be arctan(magnitude) + # See above + img = F.affine( + img, + angle=0.0, + translate=[0, 0], + scale=1.0, + shear=[0.0, math.degrees(math.atan(magnitude))], + interpolation=interpolation, + fill=fill, + center=[0, 0], + ) + elif op_name == "TranslateX": + img = F.affine( + img, + angle=0.0, + translate=[int(magnitude), 0], + scale=1.0, + interpolation=interpolation, + shear=[0.0, 0.0], + fill=fill, + ) + elif op_name == "TranslateY": + img = F.affine( + img, + angle=0.0, + translate=[0, int(magnitude)], + scale=1.0, + interpolation=interpolation, + shear=[0.0, 0.0], + fill=fill, + ) + elif op_name == "Rotate": + img = F.rotate(img, magnitude, interpolation=interpolation, fill=fill) + elif op_name == "Brightness": + img = F.adjust_brightness(img, 1.0 + magnitude) + elif op_name == "Color": + img = F.adjust_saturation(img, 1.0 + magnitude) + elif op_name == "Contrast": + img = F.adjust_contrast(img, 1.0 + magnitude) + elif op_name == "Sharpness": + img = F.adjust_sharpness(img, 1.0 + magnitude) + elif op_name == "Posterize": + img = F.posterize(img, int(magnitude)) + elif op_name == "Solarize": + img = F.solarize(img, magnitude) + elif op_name == "AutoContrast": + img = F.autocontrast(img) + elif op_name == "Equalize": + img = F.equalize(img) + elif op_name == "Invert": + img = F.invert(img) + elif op_name == "Identity": + pass + else: + raise ValueError(f"The provided operator {op_name} is not recognized.") + return img + + +class AutoAugmentPolicy(Enum): + """AutoAugment policies learned on different datasets. + Available policies are IMAGENET, CIFAR10 and SVHN. + """ + + IMAGENET = "imagenet" + CIFAR10 = "cifar10" + SVHN = "svhn" + + +# FIXME: Eliminate copy-pasted code for fill standardization and _augmentation_space() by moving stuff on a base class +class AutoAugment(torch.nn.Module): + r"""AutoAugment data augmentation method based on + `"AutoAugment: Learning Augmentation Strategies from Data" `_. + If the image is torch Tensor, it should be of type torch.uint8, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + policy (AutoAugmentPolicy): Desired policy enum defined by + :class:`torchvision.transforms.autoaugment.AutoAugmentPolicy`. Default is ``AutoAugmentPolicy.IMAGENET``. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + def __init__( + self, + policy: AutoAugmentPolicy = AutoAugmentPolicy.IMAGENET, + interpolation: InterpolationMode = InterpolationMode.NEAREST, + fill: Optional[List[float]] = None, + ) -> None: + super().__init__() + self.policy = policy + self.interpolation = interpolation + self.fill = fill + self.policies = self._get_policies(policy) + + def _get_policies( + self, policy: AutoAugmentPolicy + ) -> List[Tuple[Tuple[str, float, Optional[int]], Tuple[str, float, Optional[int]]]]: + if policy == AutoAugmentPolicy.IMAGENET: + return [ + (("Posterize", 0.4, 8), ("Rotate", 0.6, 9)), + (("Solarize", 0.6, 5), ("AutoContrast", 0.6, None)), + (("Equalize", 0.8, None), ("Equalize", 0.6, None)), + (("Posterize", 0.6, 7), ("Posterize", 0.6, 6)), + (("Equalize", 0.4, None), ("Solarize", 0.2, 4)), + (("Equalize", 0.4, None), ("Rotate", 0.8, 8)), + (("Solarize", 0.6, 3), ("Equalize", 0.6, None)), + (("Posterize", 0.8, 5), ("Equalize", 1.0, None)), + (("Rotate", 0.2, 3), ("Solarize", 0.6, 8)), + (("Equalize", 0.6, None), ("Posterize", 0.4, 6)), + (("Rotate", 0.8, 8), ("Color", 0.4, 0)), + (("Rotate", 0.4, 9), ("Equalize", 0.6, None)), + (("Equalize", 0.0, None), ("Equalize", 0.8, None)), + (("Invert", 0.6, None), ("Equalize", 1.0, None)), + (("Color", 0.6, 4), ("Contrast", 1.0, 8)), + (("Rotate", 0.8, 8), ("Color", 1.0, 2)), + (("Color", 0.8, 8), ("Solarize", 0.8, 7)), + (("Sharpness", 0.4, 7), ("Invert", 0.6, None)), + (("ShearX", 0.6, 5), ("Equalize", 1.0, None)), + (("Color", 0.4, 0), ("Equalize", 0.6, None)), + (("Equalize", 0.4, None), ("Solarize", 0.2, 4)), + (("Solarize", 0.6, 5), ("AutoContrast", 0.6, None)), + (("Invert", 0.6, None), ("Equalize", 1.0, None)), + (("Color", 0.6, 4), ("Contrast", 1.0, 8)), + (("Equalize", 0.8, None), ("Equalize", 0.6, None)), + ] + elif policy == AutoAugmentPolicy.CIFAR10: + return [ + (("Invert", 0.1, None), ("Contrast", 0.2, 6)), + (("Rotate", 0.7, 2), ("TranslateX", 0.3, 9)), + (("Sharpness", 0.8, 1), ("Sharpness", 0.9, 3)), + (("ShearY", 0.5, 8), ("TranslateY", 0.7, 9)), + (("AutoContrast", 0.5, None), ("Equalize", 0.9, None)), + (("ShearY", 0.2, 7), ("Posterize", 0.3, 7)), + (("Color", 0.4, 3), ("Brightness", 0.6, 7)), + (("Sharpness", 0.3, 9), ("Brightness", 0.7, 9)), + (("Equalize", 0.6, None), ("Equalize", 0.5, None)), + (("Contrast", 0.6, 7), ("Sharpness", 0.6, 5)), + (("Color", 0.7, 7), ("TranslateX", 0.5, 8)), + (("Equalize", 0.3, None), ("AutoContrast", 0.4, None)), + (("TranslateY", 0.4, 3), ("Sharpness", 0.2, 6)), + (("Brightness", 0.9, 6), ("Color", 0.2, 8)), + (("Solarize", 0.5, 2), ("Invert", 0.0, None)), + (("Equalize", 0.2, None), ("AutoContrast", 0.6, None)), + (("Equalize", 0.2, None), ("Equalize", 0.6, None)), + (("Color", 0.9, 9), ("Equalize", 0.6, None)), + (("AutoContrast", 0.8, None), ("Solarize", 0.2, 8)), + (("Brightness", 0.1, 3), ("Color", 0.7, 0)), + (("Solarize", 0.4, 5), ("AutoContrast", 0.9, None)), + (("TranslateY", 0.9, 9), ("TranslateY", 0.7, 9)), + (("AutoContrast", 0.9, None), ("Solarize", 0.8, 3)), + (("Equalize", 0.8, None), ("Invert", 0.1, None)), + (("TranslateY", 0.7, 9), ("AutoContrast", 0.9, None)), + ] + elif policy == AutoAugmentPolicy.SVHN: + return [ + (("ShearX", 0.9, 4), ("Invert", 0.2, None)), + (("ShearY", 0.9, 8), ("Invert", 0.7, None)), + (("Equalize", 0.6, None), ("Solarize", 0.6, 6)), + (("Invert", 0.9, None), ("Equalize", 0.6, None)), + (("Equalize", 0.6, None), ("Rotate", 0.9, 3)), + (("ShearX", 0.9, 4), ("AutoContrast", 0.8, None)), + (("ShearY", 0.9, 8), ("Invert", 0.4, None)), + (("ShearY", 0.9, 5), ("Solarize", 0.2, 6)), + (("Invert", 0.9, None), ("AutoContrast", 0.8, None)), + (("Equalize", 0.6, None), ("Rotate", 0.9, 3)), + (("ShearX", 0.9, 4), ("Solarize", 0.3, 3)), + (("ShearY", 0.8, 8), ("Invert", 0.7, None)), + (("Equalize", 0.9, None), ("TranslateY", 0.6, 6)), + (("Invert", 0.9, None), ("Equalize", 0.6, None)), + (("Contrast", 0.3, 3), ("Rotate", 0.8, 4)), + (("Invert", 0.8, None), ("TranslateY", 0.0, 2)), + (("ShearY", 0.7, 6), ("Solarize", 0.4, 8)), + (("Invert", 0.6, None), ("Rotate", 0.8, 4)), + (("ShearY", 0.3, 7), ("TranslateX", 0.9, 3)), + (("ShearX", 0.1, 6), ("Invert", 0.6, None)), + (("Solarize", 0.7, 2), ("TranslateY", 0.6, 7)), + (("ShearY", 0.8, 4), ("Invert", 0.8, None)), + (("ShearX", 0.7, 9), ("TranslateY", 0.8, 3)), + (("ShearY", 0.8, 5), ("AutoContrast", 0.7, None)), + (("ShearX", 0.7, 2), ("Invert", 0.1, None)), + ] + else: + raise ValueError(f"The provided policy {policy} is not recognized.") + + def _augmentation_space(self, num_bins: int, image_size: Tuple[int, int]) -> Dict[str, Tuple[Tensor, bool]]: + return { + # op_name: (magnitudes, signed) + "ShearX": (torch.linspace(0.0, 0.3, num_bins), True), + "ShearY": (torch.linspace(0.0, 0.3, num_bins), True), + "TranslateX": (torch.linspace(0.0, 150.0 / 331.0 * image_size[1], num_bins), True), + "TranslateY": (torch.linspace(0.0, 150.0 / 331.0 * image_size[0], num_bins), True), + "Rotate": (torch.linspace(0.0, 30.0, num_bins), True), + "Brightness": (torch.linspace(0.0, 0.9, num_bins), True), + "Color": (torch.linspace(0.0, 0.9, num_bins), True), + "Contrast": (torch.linspace(0.0, 0.9, num_bins), True), + "Sharpness": (torch.linspace(0.0, 0.9, num_bins), True), + "Posterize": (8 - (torch.arange(num_bins) / ((num_bins - 1) / 4)).round().int(), False), + "Solarize": (torch.linspace(255.0, 0.0, num_bins), False), + "AutoContrast": (torch.tensor(0.0), False), + "Equalize": (torch.tensor(0.0), False), + "Invert": (torch.tensor(0.0), False), + } + + @staticmethod + def get_params(transform_num: int) -> Tuple[int, Tensor, Tensor]: + """Get parameters for autoaugment transformation + + Returns: + params required by the autoaugment transformation + """ + policy_id = int(torch.randint(transform_num, (1,)).item()) + probs = torch.rand((2,)) + signs = torch.randint(2, (2,)) + + return policy_id, probs, signs + + def forward(self, img: Tensor) -> Tensor: + """ + img (PIL Image or Tensor): Image to be transformed. + + Returns: + PIL Image or Tensor: AutoAugmented image. + """ + fill = self.fill + channels, height, width = F.get_dimensions(img) + if isinstance(img, Tensor): + if isinstance(fill, (int, float)): + fill = [float(fill)] * channels + elif fill is not None: + fill = [float(f) for f in fill] + + transform_id, probs, signs = self.get_params(len(self.policies)) + + op_meta = self._augmentation_space(10, (height, width)) + for i, (op_name, p, magnitude_id) in enumerate(self.policies[transform_id]): + if probs[i] <= p: + magnitudes, signed = op_meta[op_name] + magnitude = float(magnitudes[magnitude_id].item()) if magnitude_id is not None else 0.0 + if signed and signs[i] == 0: + magnitude *= -1.0 + img = _apply_op(img, op_name, magnitude, interpolation=self.interpolation, fill=fill) + + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(policy={self.policy}, fill={self.fill})" + + +class RandAugment(torch.nn.Module): + r"""RandAugment data augmentation method based on + `"RandAugment: Practical automated data augmentation with a reduced search space" + `_. + If the image is torch Tensor, it should be of type torch.uint8, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + num_ops (int): Number of augmentation transformations to apply sequentially. + magnitude (int): Magnitude for all the transformations. + num_magnitude_bins (int): The number of different magnitude values. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + def __init__( + self, + num_ops: int = 2, + magnitude: int = 9, + num_magnitude_bins: int = 31, + interpolation: InterpolationMode = InterpolationMode.NEAREST, + fill: Optional[List[float]] = None, + ) -> None: + super().__init__() + self.num_ops = num_ops + self.magnitude = magnitude + self.num_magnitude_bins = num_magnitude_bins + self.interpolation = interpolation + self.fill = fill + + def _augmentation_space(self, num_bins: int, image_size: Tuple[int, int]) -> Dict[str, Tuple[Tensor, bool]]: + return { + # op_name: (magnitudes, signed) + "Identity": (torch.tensor(0.0), False), + "ShearX": (torch.linspace(0.0, 0.3, num_bins), True), + "ShearY": (torch.linspace(0.0, 0.3, num_bins), True), + "TranslateX": (torch.linspace(0.0, 150.0 / 331.0 * image_size[1], num_bins), True), + "TranslateY": (torch.linspace(0.0, 150.0 / 331.0 * image_size[0], num_bins), True), + "Rotate": (torch.linspace(0.0, 30.0, num_bins), True), + "Brightness": (torch.linspace(0.0, 0.9, num_bins), True), + "Color": (torch.linspace(0.0, 0.9, num_bins), True), + "Contrast": (torch.linspace(0.0, 0.9, num_bins), True), + "Sharpness": (torch.linspace(0.0, 0.9, num_bins), True), + "Posterize": (8 - (torch.arange(num_bins) / ((num_bins - 1) / 4)).round().int(), False), + "Solarize": (torch.linspace(255.0, 0.0, num_bins), False), + "AutoContrast": (torch.tensor(0.0), False), + "Equalize": (torch.tensor(0.0), False), + } + + def forward(self, img: Tensor) -> Tensor: + """ + img (PIL Image or Tensor): Image to be transformed. + + Returns: + PIL Image or Tensor: Transformed image. + """ + fill = self.fill + channels, height, width = F.get_dimensions(img) + if isinstance(img, Tensor): + if isinstance(fill, (int, float)): + fill = [float(fill)] * channels + elif fill is not None: + fill = [float(f) for f in fill] + + op_meta = self._augmentation_space(self.num_magnitude_bins, (height, width)) + for _ in range(self.num_ops): + op_index = int(torch.randint(len(op_meta), (1,)).item()) + op_name = list(op_meta.keys())[op_index] + magnitudes, signed = op_meta[op_name] + magnitude = float(magnitudes[self.magnitude].item()) if magnitudes.ndim > 0 else 0.0 + if signed and torch.randint(2, (1,)): + magnitude *= -1.0 + img = _apply_op(img, op_name, magnitude, interpolation=self.interpolation, fill=fill) + + return img + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"num_ops={self.num_ops}" + f", magnitude={self.magnitude}" + f", num_magnitude_bins={self.num_magnitude_bins}" + f", interpolation={self.interpolation}" + f", fill={self.fill}" + f")" + ) + return s + + +class TrivialAugmentWide(torch.nn.Module): + r"""Dataset-independent data-augmentation with TrivialAugment Wide, as described in + `"TrivialAugment: Tuning-free Yet State-of-the-Art Data Augmentation" `_. + If the image is torch Tensor, it should be of type torch.uint8, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + num_magnitude_bins (int): The number of different magnitude values. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + def __init__( + self, + num_magnitude_bins: int = 31, + interpolation: InterpolationMode = InterpolationMode.NEAREST, + fill: Optional[List[float]] = None, + ) -> None: + super().__init__() + self.num_magnitude_bins = num_magnitude_bins + self.interpolation = interpolation + self.fill = fill + + def _augmentation_space(self, num_bins: int) -> Dict[str, Tuple[Tensor, bool]]: + return { + # op_name: (magnitudes, signed) + "Identity": (torch.tensor(0.0), False), + "ShearX": (torch.linspace(0.0, 0.99, num_bins), True), + "ShearY": (torch.linspace(0.0, 0.99, num_bins), True), + "TranslateX": (torch.linspace(0.0, 32.0, num_bins), True), + "TranslateY": (torch.linspace(0.0, 32.0, num_bins), True), + "Rotate": (torch.linspace(0.0, 135.0, num_bins), True), + "Brightness": (torch.linspace(0.0, 0.99, num_bins), True), + "Color": (torch.linspace(0.0, 0.99, num_bins), True), + "Contrast": (torch.linspace(0.0, 0.99, num_bins), True), + "Sharpness": (torch.linspace(0.0, 0.99, num_bins), True), + "Posterize": (8 - (torch.arange(num_bins) / ((num_bins - 1) / 6)).round().int(), False), + "Solarize": (torch.linspace(255.0, 0.0, num_bins), False), + "AutoContrast": (torch.tensor(0.0), False), + "Equalize": (torch.tensor(0.0), False), + } + + def forward(self, img: Tensor) -> Tensor: + """ + img (PIL Image or Tensor): Image to be transformed. + + Returns: + PIL Image or Tensor: Transformed image. + """ + fill = self.fill + channels, height, width = F.get_dimensions(img) + if isinstance(img, Tensor): + if isinstance(fill, (int, float)): + fill = [float(fill)] * channels + elif fill is not None: + fill = [float(f) for f in fill] + + op_meta = self._augmentation_space(self.num_magnitude_bins) + op_index = int(torch.randint(len(op_meta), (1,)).item()) + op_name = list(op_meta.keys())[op_index] + magnitudes, signed = op_meta[op_name] + magnitude = ( + float(magnitudes[torch.randint(len(magnitudes), (1,), dtype=torch.long)].item()) + if magnitudes.ndim > 0 + else 0.0 + ) + if signed and torch.randint(2, (1,)): + magnitude *= -1.0 + + return _apply_op(img, op_name, magnitude, interpolation=self.interpolation, fill=fill) + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"num_magnitude_bins={self.num_magnitude_bins}" + f", interpolation={self.interpolation}" + f", fill={self.fill}" + f")" + ) + return s + + +class AugMix(torch.nn.Module): + r"""AugMix data augmentation method based on + `"AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty" `_. + If the image is torch Tensor, it should be of type torch.uint8, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + severity (int): The severity of base augmentation operators. Default is ``3``. + mixture_width (int): The number of augmentation chains. Default is ``3``. + chain_depth (int): The depth of augmentation chains. A negative value denotes stochastic depth sampled from the interval [1, 3]. + Default is ``-1``. + alpha (float): The hyperparameter for the probability distributions. Default is ``1.0``. + all_ops (bool): Use all operations (including brightness, contrast, color and sharpness). Default is ``True``. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + def __init__( + self, + severity: int = 3, + mixture_width: int = 3, + chain_depth: int = -1, + alpha: float = 1.0, + all_ops: bool = True, + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + fill: Optional[List[float]] = None, + ) -> None: + super().__init__() + self._PARAMETER_MAX = 10 + if not (1 <= severity <= self._PARAMETER_MAX): + raise ValueError(f"The severity must be between [1, {self._PARAMETER_MAX}]. Got {severity} instead.") + self.severity = severity + self.mixture_width = mixture_width + self.chain_depth = chain_depth + self.alpha = alpha + self.all_ops = all_ops + self.interpolation = interpolation + self.fill = fill + + def _augmentation_space(self, num_bins: int, image_size: Tuple[int, int]) -> Dict[str, Tuple[Tensor, bool]]: + s = { + # op_name: (magnitudes, signed) + "ShearX": (torch.linspace(0.0, 0.3, num_bins), True), + "ShearY": (torch.linspace(0.0, 0.3, num_bins), True), + "TranslateX": (torch.linspace(0.0, image_size[1] / 3.0, num_bins), True), + "TranslateY": (torch.linspace(0.0, image_size[0] / 3.0, num_bins), True), + "Rotate": (torch.linspace(0.0, 30.0, num_bins), True), + "Posterize": (4 - (torch.arange(num_bins) / ((num_bins - 1) / 4)).round().int(), False), + "Solarize": (torch.linspace(255.0, 0.0, num_bins), False), + "AutoContrast": (torch.tensor(0.0), False), + "Equalize": (torch.tensor(0.0), False), + } + if self.all_ops: + s.update( + { + "Brightness": (torch.linspace(0.0, 0.9, num_bins), True), + "Color": (torch.linspace(0.0, 0.9, num_bins), True), + "Contrast": (torch.linspace(0.0, 0.9, num_bins), True), + "Sharpness": (torch.linspace(0.0, 0.9, num_bins), True), + } + ) + return s + + @torch.jit.unused + def _pil_to_tensor(self, img) -> Tensor: + return F.pil_to_tensor(img) + + @torch.jit.unused + def _tensor_to_pil(self, img: Tensor): + return F.to_pil_image(img) + + def _sample_dirichlet(self, params: Tensor) -> Tensor: + # Must be on a separate method so that we can overwrite it in tests. + return torch._sample_dirichlet(params) + + def forward(self, orig_img: Tensor) -> Tensor: + """ + img (PIL Image or Tensor): Image to be transformed. + + Returns: + PIL Image or Tensor: Transformed image. + """ + fill = self.fill + channels, height, width = F.get_dimensions(orig_img) + if isinstance(orig_img, Tensor): + img = orig_img + if isinstance(fill, (int, float)): + fill = [float(fill)] * channels + elif fill is not None: + fill = [float(f) for f in fill] + else: + img = self._pil_to_tensor(orig_img) + + op_meta = self._augmentation_space(self._PARAMETER_MAX, (height, width)) + + orig_dims = list(img.shape) + batch = img.view([1] * max(4 - img.ndim, 0) + orig_dims) + batch_dims = [batch.size(0)] + [1] * (batch.ndim - 1) + + # Sample the beta weights for combining the original and augmented image. To get Beta, we use a Dirichlet + # with 2 parameters. The 1st column stores the weights of the original and the 2nd the ones of augmented image. + m = self._sample_dirichlet( + torch.tensor([self.alpha, self.alpha], device=batch.device).expand(batch_dims[0], -1) + ) + + # Sample the mixing weights and combine them with the ones sampled from Beta for the augmented images. + combined_weights = self._sample_dirichlet( + torch.tensor([self.alpha] * self.mixture_width, device=batch.device).expand(batch_dims[0], -1) + ) * m[:, 1].view([batch_dims[0], -1]) + + mix = m[:, 0].view(batch_dims) * batch + for i in range(self.mixture_width): + aug = batch + depth = self.chain_depth if self.chain_depth > 0 else int(torch.randint(low=1, high=4, size=(1,)).item()) + for _ in range(depth): + op_index = int(torch.randint(len(op_meta), (1,)).item()) + op_name = list(op_meta.keys())[op_index] + magnitudes, signed = op_meta[op_name] + magnitude = ( + float(magnitudes[torch.randint(self.severity, (1,), dtype=torch.long)].item()) + if magnitudes.ndim > 0 + else 0.0 + ) + if signed and torch.randint(2, (1,)): + magnitude *= -1.0 + aug = _apply_op(aug, op_name, magnitude, interpolation=self.interpolation, fill=fill) + mix.add_(combined_weights[:, i].view(batch_dims) * aug) + mix = mix.view(orig_dims).to(dtype=img.dtype) + + if not isinstance(orig_img, Tensor): + return self._tensor_to_pil(mix) + return mix + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"severity={self.severity}" + f", mixture_width={self.mixture_width}" + f", chain_depth={self.chain_depth}" + f", alpha={self.alpha}" + f", all_ops={self.all_ops}" + f", interpolation={self.interpolation}" + f", fill={self.fill}" + f")" + ) + return s diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/functional.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/functional.py new file mode 100644 index 0000000000000000000000000000000000000000..d4dd933e8aedc0882eb69f6748f06cd526179d53 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/functional.py @@ -0,0 +1,1586 @@ +import math +import numbers +import sys +import warnings +from enum import Enum +from typing import Any, List, Optional, Tuple, Union + +import numpy as np +import torch +from PIL import Image +from PIL.Image import Image as PILImage +from torch import Tensor + +try: + import accimage +except ImportError: + accimage = None + +from ..utils import _log_api_usage_once +from . import _functional_pil as F_pil, _functional_tensor as F_t + + +class InterpolationMode(Enum): + """Interpolation modes + Available interpolation methods are ``nearest``, ``nearest-exact``, ``bilinear``, ``bicubic``, ``box``, ``hamming``, + and ``lanczos``. + """ + + NEAREST = "nearest" + NEAREST_EXACT = "nearest-exact" + BILINEAR = "bilinear" + BICUBIC = "bicubic" + # For PIL compatibility + BOX = "box" + HAMMING = "hamming" + LANCZOS = "lanczos" + + +# TODO: Once torchscript supports Enums with staticmethod +# this can be put into InterpolationMode as staticmethod +def _interpolation_modes_from_int(i: int) -> InterpolationMode: + inverse_modes_mapping = { + 0: InterpolationMode.NEAREST, + 2: InterpolationMode.BILINEAR, + 3: InterpolationMode.BICUBIC, + 4: InterpolationMode.BOX, + 5: InterpolationMode.HAMMING, + 1: InterpolationMode.LANCZOS, + } + return inverse_modes_mapping[i] + + +pil_modes_mapping = { + InterpolationMode.NEAREST: 0, + InterpolationMode.BILINEAR: 2, + InterpolationMode.BICUBIC: 3, + InterpolationMode.NEAREST_EXACT: 0, + InterpolationMode.BOX: 4, + InterpolationMode.HAMMING: 5, + InterpolationMode.LANCZOS: 1, +} + +_is_pil_image = F_pil._is_pil_image + + +def get_dimensions(img: Tensor) -> List[int]: + """Returns the dimensions of an image as [channels, height, width]. + + Args: + img (PIL Image or Tensor): The image to be checked. + + Returns: + List[int]: The image dimensions. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(get_dimensions) + if isinstance(img, torch.Tensor): + return F_t.get_dimensions(img) + + return F_pil.get_dimensions(img) + + +def get_image_size(img: Tensor) -> List[int]: + """Returns the size of an image as [width, height]. + + Args: + img (PIL Image or Tensor): The image to be checked. + + Returns: + List[int]: The image size. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(get_image_size) + if isinstance(img, torch.Tensor): + return F_t.get_image_size(img) + + return F_pil.get_image_size(img) + + +def get_image_num_channels(img: Tensor) -> int: + """Returns the number of channels of an image. + + Args: + img (PIL Image or Tensor): The image to be checked. + + Returns: + int: The number of channels. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(get_image_num_channels) + if isinstance(img, torch.Tensor): + return F_t.get_image_num_channels(img) + + return F_pil.get_image_num_channels(img) + + +@torch.jit.unused +def _is_numpy(img: Any) -> bool: + return isinstance(img, np.ndarray) + + +@torch.jit.unused +def _is_numpy_image(img: Any) -> bool: + return img.ndim in {2, 3} + + +def to_tensor(pic: Union[PILImage, np.ndarray]) -> Tensor: + """Convert a ``PIL Image`` or ``numpy.ndarray`` to tensor. + This function does not support torchscript. + + See :class:`~torchvision.transforms.ToTensor` for more details. + + Args: + pic (PIL Image or numpy.ndarray): Image to be converted to tensor. + + Returns: + Tensor: Converted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(to_tensor) + if not (F_pil._is_pil_image(pic) or _is_numpy(pic)): + raise TypeError(f"pic should be PIL Image or ndarray. Got {type(pic)}") + + if _is_numpy(pic) and not _is_numpy_image(pic): + raise ValueError(f"pic should be 2/3 dimensional. Got {pic.ndim} dimensions.") + + default_float_dtype = torch.get_default_dtype() + + if isinstance(pic, np.ndarray): + # handle numpy array + if pic.ndim == 2: + pic = pic[:, :, None] + + img = torch.from_numpy(pic.transpose((2, 0, 1))).contiguous() + # backward compatibility + if isinstance(img, torch.ByteTensor): + return img.to(dtype=default_float_dtype).div(255) + else: + return img + + if accimage is not None and isinstance(pic, accimage.Image): + nppic = np.zeros([pic.channels, pic.height, pic.width], dtype=np.float32) + pic.copyto(nppic) + return torch.from_numpy(nppic).to(dtype=default_float_dtype) + + # handle PIL Image + mode_to_nptype = {"I": np.int32, "I;16" if sys.byteorder == "little" else "I;16B": np.int16, "F": np.float32} + img = torch.from_numpy(np.array(pic, mode_to_nptype.get(pic.mode, np.uint8), copy=True)) + + if pic.mode == "1": + img = 255 * img + img = img.view(pic.size[1], pic.size[0], F_pil.get_image_num_channels(pic)) + # put it from HWC to CHW format + img = img.permute((2, 0, 1)).contiguous() + if isinstance(img, torch.ByteTensor): + return img.to(dtype=default_float_dtype).div(255) + else: + return img + + +def pil_to_tensor(pic: Any) -> Tensor: + """Convert a ``PIL Image`` to a tensor of the same type. + This function does not support torchscript. + + See :class:`~torchvision.transforms.PILToTensor` for more details. + + .. note:: + + A deep copy of the underlying array is performed. + + Args: + pic (PIL Image): Image to be converted to tensor. + + Returns: + Tensor: Converted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(pil_to_tensor) + if not F_pil._is_pil_image(pic): + raise TypeError(f"pic should be PIL Image. Got {type(pic)}") + + if accimage is not None and isinstance(pic, accimage.Image): + # accimage format is always uint8 internally, so always return uint8 here + nppic = np.zeros([pic.channels, pic.height, pic.width], dtype=np.uint8) + pic.copyto(nppic) + return torch.as_tensor(nppic) + + # handle PIL Image + img = torch.as_tensor(np.array(pic, copy=True)) + img = img.view(pic.size[1], pic.size[0], F_pil.get_image_num_channels(pic)) + # put it from HWC to CHW format + img = img.permute((2, 0, 1)) + return img + + +def convert_image_dtype(image: torch.Tensor, dtype: torch.dtype = torch.float) -> torch.Tensor: + """Convert a tensor image to the given ``dtype`` and scale the values accordingly + This function does not support PIL Image. + + Args: + image (torch.Tensor): Image to be converted + dtype (torch.dtype): Desired data type of the output + + Returns: + Tensor: Converted image + + .. note:: + + When converting from a smaller to a larger integer ``dtype`` the maximum values are **not** mapped exactly. + If converted back and forth, this mismatch has no effect. + + Raises: + RuntimeError: When trying to cast :class:`torch.float32` to :class:`torch.int32` or :class:`torch.int64` as + well as for trying to cast :class:`torch.float64` to :class:`torch.int64`. These conversions might lead to + overflow errors since the floating point ``dtype`` cannot store consecutive integers over the whole range + of the integer ``dtype``. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(convert_image_dtype) + if not isinstance(image, torch.Tensor): + raise TypeError("Input img should be Tensor Image") + + return F_t.convert_image_dtype(image, dtype) + + +def to_pil_image(pic, mode=None): + """Convert a tensor or an ndarray to PIL Image. This function does not support torchscript. + + See :class:`~torchvision.transforms.ToPILImage` for more details. + + Args: + pic (Tensor or numpy.ndarray): Image to be converted to PIL Image. + mode (`PIL.Image mode`_): color space and pixel depth of input data (optional). + + .. _PIL.Image mode: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#concept-modes + + Returns: + PIL Image: Image converted to PIL Image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(to_pil_image) + + if isinstance(pic, torch.Tensor): + if pic.ndim == 3: + pic = pic.permute((1, 2, 0)) + pic = pic.numpy(force=True) + elif not isinstance(pic, np.ndarray): + raise TypeError(f"pic should be Tensor or ndarray. Got {type(pic)}.") + + if pic.ndim == 2: + # if 2D image, add channel dimension (HWC) + pic = np.expand_dims(pic, 2) + if pic.ndim != 3: + raise ValueError(f"pic should be 2/3 dimensional. Got {pic.ndim} dimensions.") + + if pic.shape[-1] > 4: + raise ValueError(f"pic should not have > 4 channels. Got {pic.shape[-1]} channels.") + + npimg = pic + + if np.issubdtype(npimg.dtype, np.floating) and mode != "F": + npimg = (npimg * 255).astype(np.uint8) + + if npimg.shape[2] == 1: + expected_mode = None + npimg = npimg[:, :, 0] + if npimg.dtype == np.uint8: + expected_mode = "L" + elif npimg.dtype == np.int16: + expected_mode = "I;16" if sys.byteorder == "little" else "I;16B" + elif npimg.dtype == np.int32: + expected_mode = "I" + elif npimg.dtype == np.float32: + expected_mode = "F" + if mode is not None and mode != expected_mode: + raise ValueError(f"Incorrect mode ({mode}) supplied for input type {np.dtype}. Should be {expected_mode}") + mode = expected_mode + + elif npimg.shape[2] == 2: + permitted_2_channel_modes = ["LA"] + if mode is not None and mode not in permitted_2_channel_modes: + raise ValueError(f"Only modes {permitted_2_channel_modes} are supported for 2D inputs") + + if mode is None and npimg.dtype == np.uint8: + mode = "LA" + + elif npimg.shape[2] == 4: + permitted_4_channel_modes = ["RGBA", "CMYK", "RGBX"] + if mode is not None and mode not in permitted_4_channel_modes: + raise ValueError(f"Only modes {permitted_4_channel_modes} are supported for 4D inputs") + + if mode is None and npimg.dtype == np.uint8: + mode = "RGBA" + else: + permitted_3_channel_modes = ["RGB", "YCbCr", "HSV"] + if mode is not None and mode not in permitted_3_channel_modes: + raise ValueError(f"Only modes {permitted_3_channel_modes} are supported for 3D inputs") + if mode is None and npimg.dtype == np.uint8: + mode = "RGB" + + if mode is None: + raise TypeError(f"Input type {npimg.dtype} is not supported") + + return Image.fromarray(npimg, mode=mode) + + +def normalize(tensor: Tensor, mean: List[float], std: List[float], inplace: bool = False) -> Tensor: + """Normalize a float tensor image with mean and standard deviation. + This transform does not support PIL Image. + + .. note:: + This transform acts out of place by default, i.e., it does not mutates the input tensor. + + See :class:`~torchvision.transforms.Normalize` for more details. + + Args: + tensor (Tensor): Float tensor image of size (C, H, W) or (B, C, H, W) to be normalized. + mean (sequence): Sequence of means for each channel. + std (sequence): Sequence of standard deviations for each channel. + inplace(bool,optional): Bool to make this operation inplace. + + Returns: + Tensor: Normalized Tensor image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(normalize) + if not isinstance(tensor, torch.Tensor): + raise TypeError(f"img should be Tensor Image. Got {type(tensor)}") + + return F_t.normalize(tensor, mean=mean, std=std, inplace=inplace) + + +def _compute_resized_output_size( + image_size: Tuple[int, int], + size: Optional[List[int]], + max_size: Optional[int] = None, + allow_size_none: bool = False, # only True in v2 +) -> List[int]: + h, w = image_size + short, long = (w, h) if w <= h else (h, w) + if size is None: + if not allow_size_none: + raise ValueError("This should never happen!!") + if not isinstance(max_size, int): + raise ValueError(f"max_size must be an integer when size is None, but got {max_size} instead.") + new_short, new_long = int(max_size * short / long), max_size + new_w, new_h = (new_short, new_long) if w <= h else (new_long, new_short) + elif len(size) == 1: # specified size only for the smallest edge + requested_new_short = size if isinstance(size, int) else size[0] + new_short, new_long = requested_new_short, int(requested_new_short * long / short) + + if max_size is not None: + if max_size <= requested_new_short: + raise ValueError( + f"max_size = {max_size} must be strictly greater than the requested " + f"size for the smaller edge size = {size}" + ) + if new_long > max_size: + new_short, new_long = int(max_size * new_short / new_long), max_size + + new_w, new_h = (new_short, new_long) if w <= h else (new_long, new_short) + else: # specified both h and w + new_w, new_h = size[1], size[0] + return [new_h, new_w] + + +def resize( + img: Tensor, + size: List[int], + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + max_size: Optional[int] = None, + antialias: Optional[bool] = True, +) -> Tensor: + r"""Resize the input image to the given size. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions + + Args: + img (PIL Image or Tensor): Image to be resized. + size (sequence or int): Desired output size. If size is a sequence like + (h, w), the output size will be matched to this. If size is an int, + the smaller edge of the image will be matched to this number maintaining + the aspect ratio. i.e, if height > width, then image will be rescaled to + :math:`\left(\text{size} \times \frac{\text{height}}{\text{width}}, \text{size}\right)`. + + .. note:: + In torchscript mode size as single int is not supported, use a sequence of length 1: ``[size, ]``. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. + Default is ``InterpolationMode.BILINEAR``. If input is Tensor, only ``InterpolationMode.NEAREST``, + ``InterpolationMode.NEAREST_EXACT``, ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are + supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + max_size (int, optional): The maximum allowed for the longer edge of + the resized image. If the longer edge of the image is greater + than ``max_size`` after being resized according to ``size``, + ``size`` will be overruled so that the longer edge is equal to + ``max_size``. + As a result, the smaller edge may be shorter than ``size``. This + is only supported if ``size`` is an int (or a sequence of length + 1 in torchscript mode). + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + + Returns: + PIL Image or Tensor: Resized image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(resize) + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + elif not isinstance(interpolation, InterpolationMode): + raise TypeError( + "Argument interpolation should be a InterpolationMode or a corresponding Pillow integer constant" + ) + + if isinstance(size, (list, tuple)): + if len(size) not in [1, 2]: + raise ValueError( + f"Size must be an int or a 1 or 2 element tuple/list, not a {len(size)} element tuple/list" + ) + if max_size is not None and len(size) != 1: + raise ValueError( + "max_size should only be passed if size specifies the length of the smaller edge, " + "i.e. size should be an int or a sequence of length 1 in torchscript mode." + ) + + _, image_height, image_width = get_dimensions(img) + if isinstance(size, int): + size = [size] + output_size = _compute_resized_output_size((image_height, image_width), size, max_size) + + if [image_height, image_width] == output_size: + return img + + if not isinstance(img, torch.Tensor): + if antialias is False: + warnings.warn("Anti-alias option is always applied for PIL Image input. Argument antialias is ignored.") + pil_interpolation = pil_modes_mapping[interpolation] + return F_pil.resize(img, size=output_size, interpolation=pil_interpolation) + + return F_t.resize(img, size=output_size, interpolation=interpolation.value, antialias=antialias) + + +def pad(img: Tensor, padding: List[int], fill: Union[int, float] = 0, padding_mode: str = "constant") -> Tensor: + r"""Pad the given image on all sides with the given "pad" value. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means at most 2 leading dimensions for mode reflect and symmetric, + at most 3 leading dimensions for mode edge, + and an arbitrary number of leading dimensions for mode constant + + Args: + img (PIL Image or Tensor): Image to be padded. + padding (int or sequence): Padding on each border. If a single int is provided this + is used to pad all borders. If sequence of length 2 is provided this is the padding + on left/right and top/bottom respectively. If a sequence of length 4 is provided + this is the padding for the left, top, right and bottom borders respectively. + + .. note:: + In torchscript mode padding as single int is not supported, use a sequence of + length 1: ``[padding, ]``. + fill (number or tuple): Pixel fill value for constant fill. Default is 0. + If a tuple of length 3, it is used to fill R, G, B channels respectively. + This value is only used when the padding_mode is constant. + Only number is supported for torch Tensor. + Only int or tuple value is supported for PIL Image. + padding_mode (str): Type of padding. Should be: constant, edge, reflect or symmetric. + Default is constant. + + - constant: pads with a constant value, this value is specified with fill + + - edge: pads with the last value at the edge of the image. + If input a 5D torch Tensor, the last 3 dimensions will be padded instead of the last 2 + + - reflect: pads with reflection of image without repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in reflect mode + will result in [3, 2, 1, 2, 3, 4, 3, 2] + + - symmetric: pads with reflection of image repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in symmetric mode + will result in [2, 1, 1, 2, 3, 4, 4, 3] + + Returns: + PIL Image or Tensor: Padded image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(pad) + if not isinstance(img, torch.Tensor): + return F_pil.pad(img, padding=padding, fill=fill, padding_mode=padding_mode) + + return F_t.pad(img, padding=padding, fill=fill, padding_mode=padding_mode) + + +def crop(img: Tensor, top: int, left: int, height: int, width: int) -> Tensor: + """Crop the given image at specified location and output size. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + If image size is smaller than output size along any edge, image is padded with 0 and then cropped. + + Args: + img (PIL Image or Tensor): Image to be cropped. (0,0) denotes the top left corner of the image. + top (int): Vertical component of the top left corner of the crop box. + left (int): Horizontal component of the top left corner of the crop box. + height (int): Height of the crop box. + width (int): Width of the crop box. + + Returns: + PIL Image or Tensor: Cropped image. + """ + + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(crop) + if not isinstance(img, torch.Tensor): + return F_pil.crop(img, top, left, height, width) + + return F_t.crop(img, top, left, height, width) + + +def center_crop(img: Tensor, output_size: List[int]) -> Tensor: + """Crops the given image at the center. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + If image size is smaller than output size along any edge, image is padded with 0 and then center cropped. + + Args: + img (PIL Image or Tensor): Image to be cropped. + output_size (sequence or int): (height, width) of the crop box. If int or sequence with single int, + it is used for both directions. + + Returns: + PIL Image or Tensor: Cropped image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(center_crop) + if isinstance(output_size, numbers.Number): + output_size = (int(output_size), int(output_size)) + elif isinstance(output_size, (tuple, list)) and len(output_size) == 1: + output_size = (output_size[0], output_size[0]) + + _, image_height, image_width = get_dimensions(img) + crop_height, crop_width = output_size + + if crop_width > image_width or crop_height > image_height: + padding_ltrb = [ + (crop_width - image_width) // 2 if crop_width > image_width else 0, + (crop_height - image_height) // 2 if crop_height > image_height else 0, + (crop_width - image_width + 1) // 2 if crop_width > image_width else 0, + (crop_height - image_height + 1) // 2 if crop_height > image_height else 0, + ] + img = pad(img, padding_ltrb, fill=0) # PIL uses fill value 0 + _, image_height, image_width = get_dimensions(img) + if crop_width == image_width and crop_height == image_height: + return img + + crop_top = int(round((image_height - crop_height) / 2.0)) + crop_left = int(round((image_width - crop_width) / 2.0)) + return crop(img, crop_top, crop_left, crop_height, crop_width) + + +def resized_crop( + img: Tensor, + top: int, + left: int, + height: int, + width: int, + size: List[int], + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, +) -> Tensor: + """Crop the given image and resize it to desired size. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions + + Notably used in :class:`~torchvision.transforms.RandomResizedCrop`. + + Args: + img (PIL Image or Tensor): Image to be cropped. (0,0) denotes the top left corner of the image. + top (int): Vertical component of the top left corner of the crop box. + left (int): Horizontal component of the top left corner of the crop box. + height (int): Height of the crop box. + width (int): Width of the crop box. + size (sequence or int): Desired output size. Same semantics as ``resize``. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. + Default is ``InterpolationMode.BILINEAR``. If input is Tensor, only ``InterpolationMode.NEAREST``, + ``InterpolationMode.NEAREST_EXACT``, ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are + supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + Returns: + PIL Image or Tensor: Cropped image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(resized_crop) + img = crop(img, top, left, height, width) + img = resize(img, size, interpolation, antialias=antialias) + return img + + +def hflip(img: Tensor) -> Tensor: + """Horizontally flip the given image. + + Args: + img (PIL Image or Tensor): Image to be flipped. If img + is a Tensor, it is expected to be in [..., H, W] format, + where ... means it can have an arbitrary number of leading + dimensions. + + Returns: + PIL Image or Tensor: Horizontally flipped image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(hflip) + if not isinstance(img, torch.Tensor): + return F_pil.hflip(img) + + return F_t.hflip(img) + + +def _get_perspective_coeffs(startpoints: List[List[int]], endpoints: List[List[int]]) -> List[float]: + """Helper function to get the coefficients (a, b, c, d, e, f, g, h) for the perspective transforms. + + In Perspective Transform each pixel (x, y) in the original image gets transformed as, + (x, y) -> ( (ax + by + c) / (gx + hy + 1), (dx + ey + f) / (gx + hy + 1) ) + + Args: + startpoints (list of list of ints): List containing four lists of two integers corresponding to four corners + ``[top-left, top-right, bottom-right, bottom-left]`` of the original image. + endpoints (list of list of ints): List containing four lists of two integers corresponding to four corners + ``[top-left, top-right, bottom-right, bottom-left]`` of the transformed image. + + Returns: + octuple (a, b, c, d, e, f, g, h) for transforming each pixel. + """ + if len(startpoints) != 4 or len(endpoints) != 4: + raise ValueError( + f"Please provide exactly four corners, got {len(startpoints)} startpoints and {len(endpoints)} endpoints." + ) + a_matrix = torch.zeros(2 * len(startpoints), 8, dtype=torch.float64) + + for i, (p1, p2) in enumerate(zip(endpoints, startpoints)): + a_matrix[2 * i, :] = torch.tensor([p1[0], p1[1], 1, 0, 0, 0, -p2[0] * p1[0], -p2[0] * p1[1]]) + a_matrix[2 * i + 1, :] = torch.tensor([0, 0, 0, p1[0], p1[1], 1, -p2[1] * p1[0], -p2[1] * p1[1]]) + + b_matrix = torch.tensor(startpoints, dtype=torch.float64).view(8) + # do least squares in double precision to prevent numerical issues + res = torch.linalg.lstsq(a_matrix, b_matrix, driver="gels").solution.to(torch.float32) + + output: List[float] = res.tolist() + return output + + +def perspective( + img: Tensor, + startpoints: List[List[int]], + endpoints: List[List[int]], + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + fill: Optional[List[float]] = None, +) -> Tensor: + """Perform perspective transform of the given image. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + img (PIL Image or Tensor): Image to be transformed. + startpoints (list of list of ints): List containing four lists of two integers corresponding to four corners + ``[top-left, top-right, bottom-right, bottom-left]`` of the original image. + endpoints (list of list of ints): List containing four lists of two integers corresponding to four corners + ``[top-left, top-right, bottom-right, bottom-left]`` of the transformed image. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + + .. note:: + In torchscript mode single int/float value is not supported, please use a sequence + of length 1: ``[value, ]``. + + Returns: + PIL Image or Tensor: transformed Image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(perspective) + + coeffs = _get_perspective_coeffs(startpoints, endpoints) + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + elif not isinstance(interpolation, InterpolationMode): + raise TypeError( + "Argument interpolation should be a InterpolationMode or a corresponding Pillow integer constant" + ) + + if not isinstance(img, torch.Tensor): + pil_interpolation = pil_modes_mapping[interpolation] + return F_pil.perspective(img, coeffs, interpolation=pil_interpolation, fill=fill) + + return F_t.perspective(img, coeffs, interpolation=interpolation.value, fill=fill) + + +def vflip(img: Tensor) -> Tensor: + """Vertically flip the given image. + + Args: + img (PIL Image or Tensor): Image to be flipped. If img + is a Tensor, it is expected to be in [..., H, W] format, + where ... means it can have an arbitrary number of leading + dimensions. + + Returns: + PIL Image or Tensor: Vertically flipped image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(vflip) + if not isinstance(img, torch.Tensor): + return F_pil.vflip(img) + + return F_t.vflip(img) + + +def five_crop(img: Tensor, size: List[int]) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor]: + """Crop the given image into four corners and the central crop. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions + + .. Note:: + This transform returns a tuple of images and there may be a + mismatch in the number of inputs and targets your ``Dataset`` returns. + + Args: + img (PIL Image or Tensor): Image to be cropped. + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + + Returns: + tuple: tuple (tl, tr, bl, br, center) + Corresponding top left, top right, bottom left, bottom right and center crop. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(five_crop) + if isinstance(size, numbers.Number): + size = (int(size), int(size)) + elif isinstance(size, (tuple, list)) and len(size) == 1: + size = (size[0], size[0]) + + if len(size) != 2: + raise ValueError("Please provide only two dimensions (h, w) for size.") + + _, image_height, image_width = get_dimensions(img) + crop_height, crop_width = size + if crop_width > image_width or crop_height > image_height: + msg = "Requested crop size {} is bigger than input size {}" + raise ValueError(msg.format(size, (image_height, image_width))) + + tl = crop(img, 0, 0, crop_height, crop_width) + tr = crop(img, 0, image_width - crop_width, crop_height, crop_width) + bl = crop(img, image_height - crop_height, 0, crop_height, crop_width) + br = crop(img, image_height - crop_height, image_width - crop_width, crop_height, crop_width) + + center = center_crop(img, [crop_height, crop_width]) + + return tl, tr, bl, br, center + + +def ten_crop( + img: Tensor, size: List[int], vertical_flip: bool = False +) -> Tuple[Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor, Tensor]: + """Generate ten cropped images from the given image. + Crop the given image into four corners and the central crop plus the + flipped version of these (horizontal flipping is used by default). + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions + + .. Note:: + This transform returns a tuple of images and there may be a + mismatch in the number of inputs and targets your ``Dataset`` returns. + + Args: + img (PIL Image or Tensor): Image to be cropped. + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + vertical_flip (bool): Use vertical flipping instead of horizontal + + Returns: + tuple: tuple (tl, tr, bl, br, center, tl_flip, tr_flip, bl_flip, br_flip, center_flip) + Corresponding top left, top right, bottom left, bottom right and + center crop and same for the flipped image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(ten_crop) + if isinstance(size, numbers.Number): + size = (int(size), int(size)) + elif isinstance(size, (tuple, list)) and len(size) == 1: + size = (size[0], size[0]) + + if len(size) != 2: + raise ValueError("Please provide only two dimensions (h, w) for size.") + + first_five = five_crop(img, size) + + if vertical_flip: + img = vflip(img) + else: + img = hflip(img) + + second_five = five_crop(img, size) + return first_five + second_five + + +def adjust_brightness(img: Tensor, brightness_factor: float) -> Tensor: + """Adjust brightness of an image. + + Args: + img (PIL Image or Tensor): Image to be adjusted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + brightness_factor (float): How much to adjust the brightness. Can be + any non-negative number. 0 gives a black image, 1 gives the + original image while 2 increases the brightness by a factor of 2. + + Returns: + PIL Image or Tensor: Brightness adjusted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(adjust_brightness) + if not isinstance(img, torch.Tensor): + return F_pil.adjust_brightness(img, brightness_factor) + + return F_t.adjust_brightness(img, brightness_factor) + + +def adjust_contrast(img: Tensor, contrast_factor: float) -> Tensor: + """Adjust contrast of an image. + + Args: + img (PIL Image or Tensor): Image to be adjusted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + contrast_factor (float): How much to adjust the contrast. Can be any + non-negative number. 0 gives a solid gray image, 1 gives the + original image while 2 increases the contrast by a factor of 2. + + Returns: + PIL Image or Tensor: Contrast adjusted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(adjust_contrast) + if not isinstance(img, torch.Tensor): + return F_pil.adjust_contrast(img, contrast_factor) + + return F_t.adjust_contrast(img, contrast_factor) + + +def adjust_saturation(img: Tensor, saturation_factor: float) -> Tensor: + """Adjust color saturation of an image. + + Args: + img (PIL Image or Tensor): Image to be adjusted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + saturation_factor (float): How much to adjust the saturation. 0 will + give a black and white image, 1 will give the original image while + 2 will enhance the saturation by a factor of 2. + + Returns: + PIL Image or Tensor: Saturation adjusted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(adjust_saturation) + if not isinstance(img, torch.Tensor): + return F_pil.adjust_saturation(img, saturation_factor) + + return F_t.adjust_saturation(img, saturation_factor) + + +def adjust_hue(img: Tensor, hue_factor: float) -> Tensor: + """Adjust hue of an image. + + The image hue is adjusted by converting the image to HSV and + cyclically shifting the intensities in the hue channel (H). + The image is then converted back to original image mode. + + `hue_factor` is the amount of shift in H channel and must be in the + interval `[-0.5, 0.5]`. + + See `Hue`_ for more details. + + .. _Hue: https://en.wikipedia.org/wiki/Hue + + Args: + img (PIL Image or Tensor): Image to be adjusted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image mode "1", "I", "F" and modes with transparency (alpha channel) are not supported. + Note: the pixel values of the input image has to be non-negative for conversion to HSV space; + thus it does not work if you normalize your image to an interval with negative values, + or use an interpolation that generates negative values before using this function. + hue_factor (float): How much to shift the hue channel. Should be in + [-0.5, 0.5]. 0.5 and -0.5 give complete reversal of hue channel in + HSV space in positive and negative direction respectively. + 0 means no shift. Therefore, both -0.5 and 0.5 will give an image + with complementary colors while 0 gives the original image. + + Returns: + PIL Image or Tensor: Hue adjusted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(adjust_hue) + if not isinstance(img, torch.Tensor): + return F_pil.adjust_hue(img, hue_factor) + + return F_t.adjust_hue(img, hue_factor) + + +def adjust_gamma(img: Tensor, gamma: float, gain: float = 1) -> Tensor: + r"""Perform gamma correction on an image. + + Also known as Power Law Transform. Intensities in RGB mode are adjusted + based on the following equation: + + .. math:: + I_{\text{out}} = 255 \times \text{gain} \times \left(\frac{I_{\text{in}}}{255}\right)^{\gamma} + + See `Gamma Correction`_ for more details. + + .. _Gamma Correction: https://en.wikipedia.org/wiki/Gamma_correction + + Args: + img (PIL Image or Tensor): PIL Image to be adjusted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, modes with transparency (alpha channel) are not supported. + gamma (float): Non negative real number, same as :math:`\gamma` in the equation. + gamma larger than 1 make the shadows darker, + while gamma smaller than 1 make dark regions lighter. + gain (float): The constant multiplier. + Returns: + PIL Image or Tensor: Gamma correction adjusted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(adjust_gamma) + if not isinstance(img, torch.Tensor): + return F_pil.adjust_gamma(img, gamma, gain) + + return F_t.adjust_gamma(img, gamma, gain) + + +def _get_inverse_affine_matrix( + center: List[float], angle: float, translate: List[float], scale: float, shear: List[float], inverted: bool = True +) -> List[float]: + # Helper method to compute inverse matrix for affine transformation + + # Pillow requires inverse affine transformation matrix: + # Affine matrix is : M = T * C * RotateScaleShear * C^-1 + # + # where T is translation matrix: [1, 0, tx | 0, 1, ty | 0, 0, 1] + # C is translation matrix to keep center: [1, 0, cx | 0, 1, cy | 0, 0, 1] + # RotateScaleShear is rotation with scale and shear matrix + # + # RotateScaleShear(a, s, (sx, sy)) = + # = R(a) * S(s) * SHy(sy) * SHx(sx) + # = [ s*cos(a - sy)/cos(sy), s*(-cos(a - sy)*tan(sx)/cos(sy) - sin(a)), 0 ] + # [ s*sin(a - sy)/cos(sy), s*(-sin(a - sy)*tan(sx)/cos(sy) + cos(a)), 0 ] + # [ 0 , 0 , 1 ] + # where R is a rotation matrix, S is a scaling matrix, and SHx and SHy are the shears: + # SHx(s) = [1, -tan(s)] and SHy(s) = [1 , 0] + # [0, 1 ] [-tan(s), 1] + # + # Thus, the inverse is M^-1 = C * RotateScaleShear^-1 * C^-1 * T^-1 + + rot = math.radians(angle) + sx = math.radians(shear[0]) + sy = math.radians(shear[1]) + + cx, cy = center + tx, ty = translate + + # RSS without scaling + a = math.cos(rot - sy) / math.cos(sy) + b = -math.cos(rot - sy) * math.tan(sx) / math.cos(sy) - math.sin(rot) + c = math.sin(rot - sy) / math.cos(sy) + d = -math.sin(rot - sy) * math.tan(sx) / math.cos(sy) + math.cos(rot) + + if inverted: + # Inverted rotation matrix with scale and shear + # det([[a, b], [c, d]]) == 1, since det(rotation) = 1 and det(shear) = 1 + matrix = [d, -b, 0.0, -c, a, 0.0] + matrix = [x / scale for x in matrix] + # Apply inverse of translation and of center translation: RSS^-1 * C^-1 * T^-1 + matrix[2] += matrix[0] * (-cx - tx) + matrix[1] * (-cy - ty) + matrix[5] += matrix[3] * (-cx - tx) + matrix[4] * (-cy - ty) + # Apply center translation: C * RSS^-1 * C^-1 * T^-1 + matrix[2] += cx + matrix[5] += cy + else: + matrix = [a, b, 0.0, c, d, 0.0] + matrix = [x * scale for x in matrix] + # Apply inverse of center translation: RSS * C^-1 + matrix[2] += matrix[0] * (-cx) + matrix[1] * (-cy) + matrix[5] += matrix[3] * (-cx) + matrix[4] * (-cy) + # Apply translation and center : T * C * RSS * C^-1 + matrix[2] += cx + tx + matrix[5] += cy + ty + + return matrix + + +def rotate( + img: Tensor, + angle: float, + interpolation: InterpolationMode = InterpolationMode.NEAREST, + expand: bool = False, + center: Optional[List[int]] = None, + fill: Optional[List[float]] = None, +) -> Tensor: + """Rotate the image by angle. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + img (PIL Image or Tensor): image to be rotated. + angle (number): rotation angle value in degrees, counter-clockwise. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + expand (bool, optional): Optional expansion flag. + If true, expands the output image to make it large enough to hold the entire rotated image. + If false or omitted, make the output image the same size as the input image. + Note that the expand flag assumes rotation around the center and no translation. + center (sequence, optional): Optional center of rotation. Origin is the upper left corner. + Default is the center of the image. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + + .. note:: + In torchscript mode single int/float value is not supported, please use a sequence + of length 1: ``[value, ]``. + Returns: + PIL Image or Tensor: Rotated image. + + .. _filters: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#filters + + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(rotate) + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + elif not isinstance(interpolation, InterpolationMode): + raise TypeError( + "Argument interpolation should be a InterpolationMode or a corresponding Pillow integer constant" + ) + + if not isinstance(angle, (int, float)): + raise TypeError("Argument angle should be int or float") + + if center is not None and not isinstance(center, (list, tuple)): + raise TypeError("Argument center should be a sequence") + + if not isinstance(img, torch.Tensor): + pil_interpolation = pil_modes_mapping[interpolation] + return F_pil.rotate(img, angle=angle, interpolation=pil_interpolation, expand=expand, center=center, fill=fill) + + center_f = [0.0, 0.0] + if center is not None: + _, height, width = get_dimensions(img) + # Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center. + center_f = [1.0 * (c - s * 0.5) for c, s in zip(center, [width, height])] + + # due to current incoherence of rotation angle direction between affine and rotate implementations + # we need to set -angle. + matrix = _get_inverse_affine_matrix(center_f, -angle, [0.0, 0.0], 1.0, [0.0, 0.0]) + return F_t.rotate(img, matrix=matrix, interpolation=interpolation.value, expand=expand, fill=fill) + + +def affine( + img: Tensor, + angle: float, + translate: List[int], + scale: float, + shear: List[float], + interpolation: InterpolationMode = InterpolationMode.NEAREST, + fill: Optional[List[float]] = None, + center: Optional[List[int]] = None, +) -> Tensor: + """Apply affine transformation on the image keeping image center invariant. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + img (PIL Image or Tensor): image to transform. + angle (number): rotation angle in degrees between -180 and 180, clockwise direction. + translate (sequence of integers): horizontal and vertical translations (post-rotation translation) + scale (float): overall scale + shear (float or sequence): shear angle value in degrees between -180 to 180, clockwise direction. + If a sequence is specified, the first value corresponds to a shear parallel to the x-axis, while + the second value corresponds to a shear parallel to the y-axis. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + + .. note:: + In torchscript mode single int/float value is not supported, please use a sequence + of length 1: ``[value, ]``. + center (sequence, optional): Optional center of rotation. Origin is the upper left corner. + Default is the center of the image. + + Returns: + PIL Image or Tensor: Transformed image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(affine) + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + elif not isinstance(interpolation, InterpolationMode): + raise TypeError( + "Argument interpolation should be a InterpolationMode or a corresponding Pillow integer constant" + ) + + if not isinstance(angle, (int, float)): + raise TypeError("Argument angle should be int or float") + + if not isinstance(translate, (list, tuple)): + raise TypeError("Argument translate should be a sequence") + + if len(translate) != 2: + raise ValueError("Argument translate should be a sequence of length 2") + + if scale <= 0.0: + raise ValueError("Argument scale should be positive") + + if not isinstance(shear, (numbers.Number, (list, tuple))): + raise TypeError("Shear should be either a single value or a sequence of two values") + + if isinstance(angle, int): + angle = float(angle) + + if isinstance(translate, tuple): + translate = list(translate) + + if isinstance(shear, numbers.Number): + shear = [shear, 0.0] + + if isinstance(shear, tuple): + shear = list(shear) + + if len(shear) == 1: + shear = [shear[0], shear[0]] + + if len(shear) != 2: + raise ValueError(f"Shear should be a sequence containing two values. Got {shear}") + + if center is not None and not isinstance(center, (list, tuple)): + raise TypeError("Argument center should be a sequence") + + _, height, width = get_dimensions(img) + if not isinstance(img, torch.Tensor): + # center = (width * 0.5 + 0.5, height * 0.5 + 0.5) + # it is visually better to estimate the center without 0.5 offset + # otherwise image rotated by 90 degrees is shifted vs output image of torch.rot90 or F_t.affine + if center is None: + center = [width * 0.5, height * 0.5] + matrix = _get_inverse_affine_matrix(center, angle, translate, scale, shear) + pil_interpolation = pil_modes_mapping[interpolation] + return F_pil.affine(img, matrix=matrix, interpolation=pil_interpolation, fill=fill) + + center_f = [0.0, 0.0] + if center is not None: + _, height, width = get_dimensions(img) + # Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center. + center_f = [1.0 * (c - s * 0.5) for c, s in zip(center, [width, height])] + + translate_f = [1.0 * t for t in translate] + matrix = _get_inverse_affine_matrix(center_f, angle, translate_f, scale, shear) + return F_t.affine(img, matrix=matrix, interpolation=interpolation.value, fill=fill) + + +# Looks like to_grayscale() is a stand-alone functional that is never called +# from the transform classes. Perhaps it's still here for BC? I can't be +# bothered to dig. +@torch.jit.unused +def to_grayscale(img, num_output_channels=1): + """Convert PIL image of any mode (RGB, HSV, LAB, etc) to grayscale version of image. + This transform does not support torch Tensor. + + Args: + img (PIL Image): PIL Image to be converted to grayscale. + num_output_channels (int): number of channels of the output image. Value can be 1 or 3. Default is 1. + + Returns: + PIL Image: Grayscale version of the image. + + - if num_output_channels = 1 : returned image is single channel + - if num_output_channels = 3 : returned image is 3 channel with r = g = b + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(to_grayscale) + if isinstance(img, Image.Image): + return F_pil.to_grayscale(img, num_output_channels) + + raise TypeError("Input should be PIL Image") + + +def rgb_to_grayscale(img: Tensor, num_output_channels: int = 1) -> Tensor: + """Convert RGB image to grayscale version of image. + If the image is torch Tensor, it is expected + to have [..., 3, H, W] shape, where ... means an arbitrary number of leading dimensions + + Note: + Please, note that this method supports only RGB images as input. For inputs in other color spaces, + please, consider using :meth:`~torchvision.transforms.functional.to_grayscale` with PIL Image. + + Args: + img (PIL Image or Tensor): RGB Image to be converted to grayscale. + num_output_channels (int): number of channels of the output image. Value can be 1 or 3. Default, 1. + + Returns: + PIL Image or Tensor: Grayscale version of the image. + + - if num_output_channels = 1 : returned image is single channel + - if num_output_channels = 3 : returned image is 3 channel with r = g = b + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(rgb_to_grayscale) + if not isinstance(img, torch.Tensor): + return F_pil.to_grayscale(img, num_output_channels) + + return F_t.rgb_to_grayscale(img, num_output_channels) + + +def erase(img: Tensor, i: int, j: int, h: int, w: int, v: Tensor, inplace: bool = False) -> Tensor: + """Erase the input Tensor Image with given value. + This transform does not support PIL Image. + + Args: + img (Tensor Image): Tensor image of size (C, H, W) to be erased + i (int): i in (i,j) i.e coordinates of the upper left corner. + j (int): j in (i,j) i.e coordinates of the upper left corner. + h (int): Height of the erased region. + w (int): Width of the erased region. + v: Erasing value. + inplace(bool, optional): For in-place operations. By default, is set False. + + Returns: + Tensor Image: Erased image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(erase) + if not isinstance(img, torch.Tensor): + raise TypeError(f"img should be Tensor Image. Got {type(img)}") + + return F_t.erase(img, i, j, h, w, v, inplace=inplace) + + +def gaussian_blur(img: Tensor, kernel_size: List[int], sigma: Optional[List[float]] = None) -> Tensor: + """Performs Gaussian blurring on the image by given kernel + + The convolution will be using reflection padding corresponding to the kernel size, to maintain the input shape. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means at most one leading dimension. + + Args: + img (PIL Image or Tensor): Image to be blurred + kernel_size (sequence of ints or int): Gaussian kernel size. Can be a sequence of integers + like ``(kx, ky)`` or a single integer for square kernels. + + .. note:: + In torchscript mode kernel_size as single int is not supported, use a sequence of + length 1: ``[ksize, ]``. + sigma (sequence of floats or float, optional): Gaussian kernel standard deviation. Can be a + sequence of floats like ``(sigma_x, sigma_y)`` or a single float to define the + same sigma in both X/Y directions. If None, then it is computed using + ``kernel_size`` as ``sigma = 0.3 * ((kernel_size - 1) * 0.5 - 1) + 0.8``. + Default, None. + + .. note:: + In torchscript mode sigma as single float is + not supported, use a sequence of length 1: ``[sigma, ]``. + + Returns: + PIL Image or Tensor: Gaussian Blurred version of the image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(gaussian_blur) + if not isinstance(kernel_size, (int, list, tuple)): + raise TypeError(f"kernel_size should be int or a sequence of integers. Got {type(kernel_size)}") + if isinstance(kernel_size, int): + kernel_size = [kernel_size, kernel_size] + if len(kernel_size) != 2: + raise ValueError(f"If kernel_size is a sequence its length should be 2. Got {len(kernel_size)}") + for ksize in kernel_size: + if ksize % 2 == 0 or ksize < 0: + raise ValueError(f"kernel_size should have odd and positive integers. Got {kernel_size}") + + if sigma is None: + sigma = [ksize * 0.15 + 0.35 for ksize in kernel_size] + + if sigma is not None and not isinstance(sigma, (int, float, list, tuple)): + raise TypeError(f"sigma should be either float or sequence of floats. Got {type(sigma)}") + if isinstance(sigma, (int, float)): + sigma = [float(sigma), float(sigma)] + if isinstance(sigma, (list, tuple)) and len(sigma) == 1: + sigma = [sigma[0], sigma[0]] + if len(sigma) != 2: + raise ValueError(f"If sigma is a sequence, its length should be 2. Got {len(sigma)}") + for s in sigma: + if s <= 0.0: + raise ValueError(f"sigma should have positive values. Got {sigma}") + + t_img = img + if not isinstance(img, torch.Tensor): + if not F_pil._is_pil_image(img): + raise TypeError(f"img should be PIL Image or Tensor. Got {type(img)}") + + t_img = pil_to_tensor(img) + + output = F_t.gaussian_blur(t_img, kernel_size, sigma) + + if not isinstance(img, torch.Tensor): + output = to_pil_image(output, mode=img.mode) + return output + + +def invert(img: Tensor) -> Tensor: + """Invert the colors of an RGB/grayscale image. + + Args: + img (PIL Image or Tensor): Image to have its colors inverted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Returns: + PIL Image or Tensor: Color inverted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(invert) + if not isinstance(img, torch.Tensor): + return F_pil.invert(img) + + return F_t.invert(img) + + +def posterize(img: Tensor, bits: int) -> Tensor: + """Posterize an image by reducing the number of bits for each color channel. + + Args: + img (PIL Image or Tensor): Image to have its colors posterized. + If img is torch Tensor, it should be of type torch.uint8, and + it is expected to be in [..., 1 or 3, H, W] format, where ... means + it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + bits (int): The number of bits to keep for each channel (0-8). + Returns: + PIL Image or Tensor: Posterized image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(posterize) + if not (0 <= bits <= 8): + raise ValueError(f"The number if bits should be between 0 and 8. Got {bits}") + + if not isinstance(img, torch.Tensor): + return F_pil.posterize(img, bits) + + return F_t.posterize(img, bits) + + +def solarize(img: Tensor, threshold: float) -> Tensor: + """Solarize an RGB/grayscale image by inverting all pixel values above a threshold. + + Args: + img (PIL Image or Tensor): Image to have its colors inverted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + threshold (float): All pixels equal or above this value are inverted. + Returns: + PIL Image or Tensor: Solarized image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(solarize) + if not isinstance(img, torch.Tensor): + return F_pil.solarize(img, threshold) + + return F_t.solarize(img, threshold) + + +def adjust_sharpness(img: Tensor, sharpness_factor: float) -> Tensor: + """Adjust the sharpness of an image. + + Args: + img (PIL Image or Tensor): Image to be adjusted. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + sharpness_factor (float): How much to adjust the sharpness. Can be + any non-negative number. 0 gives a blurred image, 1 gives the + original image while 2 increases the sharpness by a factor of 2. + + Returns: + PIL Image or Tensor: Sharpness adjusted image. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(adjust_sharpness) + if not isinstance(img, torch.Tensor): + return F_pil.adjust_sharpness(img, sharpness_factor) + + return F_t.adjust_sharpness(img, sharpness_factor) + + +def autocontrast(img: Tensor) -> Tensor: + """Maximize contrast of an image by remapping its + pixels per channel so that the lowest becomes black and the lightest + becomes white. + + Args: + img (PIL Image or Tensor): Image on which autocontrast is applied. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Returns: + PIL Image or Tensor: An image that was autocontrasted. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(autocontrast) + if not isinstance(img, torch.Tensor): + return F_pil.autocontrast(img) + + return F_t.autocontrast(img) + + +def equalize(img: Tensor) -> Tensor: + """Equalize the histogram of an image by applying + a non-linear mapping to the input in order to create a uniform + distribution of grayscale values in the output. + + Args: + img (PIL Image or Tensor): Image on which equalize is applied. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + The tensor dtype must be ``torch.uint8`` and values are expected to be in ``[0, 255]``. + If img is PIL Image, it is expected to be in mode "P", "L" or "RGB". + + Returns: + PIL Image or Tensor: An image that was equalized. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(equalize) + if not isinstance(img, torch.Tensor): + return F_pil.equalize(img) + + return F_t.equalize(img) + + +def elastic_transform( + img: Tensor, + displacement: Tensor, + interpolation: InterpolationMode = InterpolationMode.BILINEAR, + fill: Optional[List[float]] = None, +) -> Tensor: + """Transform a tensor image with elastic transformations. + Given alpha and sigma, it will generate displacement + vectors for all pixels based on random offsets. Alpha controls the strength + and sigma controls the smoothness of the displacements. + The displacements are added to an identity grid and the resulting grid is + used to grid_sample from the image. + + Applications: + Randomly transforms the morphology of objects in images and produces a + see-through-water-like effect. + + Args: + img (PIL Image or Tensor): Image on which elastic_transform is applied. + If img is torch Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "P", "L" or "RGB". + displacement (Tensor): The displacement field. Expected shape is [1, H, W, 2]. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. + Default is ``InterpolationMode.BILINEAR``. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (number or str or tuple): Pixel fill value for constant fill. Default is 0. + If a tuple of length 3, it is used to fill R, G, B channels respectively. + This value is only used when the padding_mode is constant. + """ + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(elastic_transform) + # Backward compatibility with integer value + if isinstance(interpolation, int): + warnings.warn( + "Argument interpolation should be of type InterpolationMode instead of int. " + "Please, use InterpolationMode enum." + ) + interpolation = _interpolation_modes_from_int(interpolation) + + if not isinstance(displacement, torch.Tensor): + raise TypeError("Argument displacement should be a Tensor") + + t_img = img + if not isinstance(img, torch.Tensor): + if not F_pil._is_pil_image(img): + raise TypeError(f"img should be PIL Image or Tensor. Got {type(img)}") + t_img = pil_to_tensor(img) + + shape = t_img.shape + shape = (1,) + shape[-2:] + (2,) + if shape != displacement.shape: + raise ValueError(f"Argument displacement shape should be {shape}, but given {displacement.shape}") + + # TODO: if image shape is [N1, N2, ..., C, H, W] and + # displacement is [1, H, W, 2] we need to reshape input image + # such grid_sampler takes internal code for 4D input + + output = F_t.elastic_transform( + t_img, + displacement, + interpolation=interpolation.value, + fill=fill, + ) + + if not isinstance(img, torch.Tensor): + output = to_pil_image(output, mode=img.mode) + return output diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/transforms.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/transforms.py new file mode 100644 index 0000000000000000000000000000000000000000..a762071833183c7eab3f0789cee6615222146d21 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/transforms.py @@ -0,0 +1,2153 @@ +import math +import numbers +import random +import warnings +from collections.abc import Sequence +from typing import List, Optional, Tuple, Union + +import torch +from torch import Tensor + +try: + import accimage +except ImportError: + accimage = None + +from ..utils import _log_api_usage_once +from . import functional as F +from .functional import _interpolation_modes_from_int, InterpolationMode + +__all__ = [ + "Compose", + "ToTensor", + "PILToTensor", + "ConvertImageDtype", + "ToPILImage", + "Normalize", + "Resize", + "CenterCrop", + "Pad", + "Lambda", + "RandomApply", + "RandomChoice", + "RandomOrder", + "RandomCrop", + "RandomHorizontalFlip", + "RandomVerticalFlip", + "RandomResizedCrop", + "FiveCrop", + "TenCrop", + "LinearTransformation", + "ColorJitter", + "RandomRotation", + "RandomAffine", + "Grayscale", + "RandomGrayscale", + "RandomPerspective", + "RandomErasing", + "GaussianBlur", + "InterpolationMode", + "RandomInvert", + "RandomPosterize", + "RandomSolarize", + "RandomAdjustSharpness", + "RandomAutocontrast", + "RandomEqualize", + "ElasticTransform", +] + + +class Compose: + """Composes several transforms together. This transform does not support torchscript. + Please, see the note below. + + Args: + transforms (list of ``Transform`` objects): list of transforms to compose. + + Example: + >>> transforms.Compose([ + >>> transforms.CenterCrop(10), + >>> transforms.PILToTensor(), + >>> transforms.ConvertImageDtype(torch.float), + >>> ]) + + .. note:: + In order to script the transformations, please use ``torch.nn.Sequential`` as below. + + >>> transforms = torch.nn.Sequential( + >>> transforms.CenterCrop(10), + >>> transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)), + >>> ) + >>> scripted_transforms = torch.jit.script(transforms) + + Make sure to use only scriptable transformations, i.e. that work with ``torch.Tensor``, does not require + `lambda` functions or ``PIL.Image``. + + """ + + def __init__(self, transforms): + if not torch.jit.is_scripting() and not torch.jit.is_tracing(): + _log_api_usage_once(self) + self.transforms = transforms + + def __call__(self, img): + for t in self.transforms: + img = t(img) + return img + + def __repr__(self) -> str: + format_string = self.__class__.__name__ + "(" + for t in self.transforms: + format_string += "\n" + format_string += f" {t}" + format_string += "\n)" + return format_string + + +class ToTensor: + """Convert a PIL Image or ndarray to tensor and scale the values accordingly. + + This transform does not support torchscript. + + Converts a PIL Image or numpy.ndarray (H x W x C) in the range + [0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0] + if the PIL Image belongs to one of the modes (L, LA, P, I, F, RGB, YCbCr, RGBA, CMYK, 1) + or if the numpy.ndarray has dtype = np.uint8 + + In the other cases, tensors are returned without scaling. + + .. note:: + Because the input image is scaled to [0.0, 1.0], this transformation should not be used when + transforming target image masks. See the `references`_ for implementing the transforms for image masks. + + .. _references: https://github.com/pytorch/vision/tree/main/references/segmentation + """ + + def __init__(self) -> None: + _log_api_usage_once(self) + + def __call__(self, pic): + """ + Args: + pic (PIL Image or numpy.ndarray): Image to be converted to tensor. + + Returns: + Tensor: Converted image. + """ + return F.to_tensor(pic) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}()" + + +class PILToTensor: + """Convert a PIL Image to a tensor of the same type - this does not scale values. + + This transform does not support torchscript. + + Converts a PIL Image (H x W x C) to a Tensor of shape (C x H x W). + """ + + def __init__(self) -> None: + _log_api_usage_once(self) + + def __call__(self, pic): + """ + .. note:: + + A deep copy of the underlying array is performed. + + Args: + pic (PIL Image): Image to be converted to tensor. + + Returns: + Tensor: Converted image. + """ + return F.pil_to_tensor(pic) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}()" + + +class ConvertImageDtype(torch.nn.Module): + """Convert a tensor image to the given ``dtype`` and scale the values accordingly. + + This function does not support PIL Image. + + Args: + dtype (torch.dtype): Desired data type of the output + + .. note:: + + When converting from a smaller to a larger integer ``dtype`` the maximum values are **not** mapped exactly. + If converted back and forth, this mismatch has no effect. + + Raises: + RuntimeError: When trying to cast :class:`torch.float32` to :class:`torch.int32` or :class:`torch.int64` as + well as for trying to cast :class:`torch.float64` to :class:`torch.int64`. These conversions might lead to + overflow errors since the floating point ``dtype`` cannot store consecutive integers over the whole range + of the integer ``dtype``. + """ + + def __init__(self, dtype: torch.dtype) -> None: + super().__init__() + _log_api_usage_once(self) + self.dtype = dtype + + def forward(self, image): + return F.convert_image_dtype(image, self.dtype) + + +class ToPILImage: + """Convert a tensor or an ndarray to PIL Image + + This transform does not support torchscript. + + Converts a torch.*Tensor of shape C x H x W or a numpy ndarray of shape + H x W x C to a PIL Image while adjusting the value range depending on the ``mode``. + + Args: + mode (`PIL.Image mode`_): color space and pixel depth of input data (optional). + If ``mode`` is ``None`` (default) there are some assumptions made about the input data: + + - If the input has 4 channels, the ``mode`` is assumed to be ``RGBA``. + - If the input has 3 channels, the ``mode`` is assumed to be ``RGB``. + - If the input has 2 channels, the ``mode`` is assumed to be ``LA``. + - If the input has 1 channel, the ``mode`` is determined by the data type (i.e ``int``, ``float``, ``short``). + + .. _PIL.Image mode: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#concept-modes + """ + + def __init__(self, mode=None): + _log_api_usage_once(self) + self.mode = mode + + def __call__(self, pic): + """ + Args: + pic (Tensor or numpy.ndarray): Image to be converted to PIL Image. + + Returns: + PIL Image: Image converted to PIL Image. + + """ + return F.to_pil_image(pic, self.mode) + + def __repr__(self) -> str: + format_string = self.__class__.__name__ + "(" + if self.mode is not None: + format_string += f"mode={self.mode}" + format_string += ")" + return format_string + + +class Normalize(torch.nn.Module): + """Normalize a tensor image with mean and standard deviation. + This transform does not support PIL Image. + Given mean: ``(mean[1],...,mean[n])`` and std: ``(std[1],..,std[n])`` for ``n`` + channels, this transform will normalize each channel of the input + ``torch.*Tensor`` i.e., + ``output[channel] = (input[channel] - mean[channel]) / std[channel]`` + + .. note:: + This transform acts out of place, i.e., it does not mutate the input tensor. + + Args: + mean (sequence): Sequence of means for each channel. + std (sequence): Sequence of standard deviations for each channel. + inplace(bool,optional): Bool to make this operation in-place. + + """ + + def __init__(self, mean, std, inplace=False): + super().__init__() + _log_api_usage_once(self) + self.mean = mean + self.std = std + self.inplace = inplace + + def forward(self, tensor: Tensor) -> Tensor: + """ + Args: + tensor (Tensor): Tensor image to be normalized. + + Returns: + Tensor: Normalized Tensor image. + """ + return F.normalize(tensor, self.mean, self.std, self.inplace) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(mean={self.mean}, std={self.std})" + + +class Resize(torch.nn.Module): + """Resize the input image to the given size. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means a maximum of two leading dimensions + + Args: + size (sequence or int): Desired output size. If size is a sequence like + (h, w), output size will be matched to this. If size is an int, + smaller edge of the image will be matched to this number. + i.e, if height > width, then image will be rescaled to + (size * height / width, size). + + .. note:: + In torchscript mode size as single int is not supported, use a sequence of length 1: ``[size, ]``. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.NEAREST_EXACT``, + ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + max_size (int, optional): The maximum allowed for the longer edge of + the resized image. If the longer edge of the image is greater + than ``max_size`` after being resized according to ``size``, + ``size`` will be overruled so that the longer edge is equal to + ``max_size``. + As a result, the smaller edge may be shorter than ``size``. This + is only supported if ``size`` is an int (or a sequence of length + 1 in torchscript mode). + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + """ + + def __init__(self, size, interpolation=InterpolationMode.BILINEAR, max_size=None, antialias=True): + super().__init__() + _log_api_usage_once(self) + if not isinstance(size, (int, Sequence)): + raise TypeError(f"Size should be int or sequence. Got {type(size)}") + if isinstance(size, Sequence) and len(size) not in (1, 2): + raise ValueError("If size is a sequence, it should have 1 or 2 values") + self.size = size + self.max_size = max_size + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + + self.interpolation = interpolation + self.antialias = antialias + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be scaled. + + Returns: + PIL Image or Tensor: Rescaled image. + """ + return F.resize(img, self.size, self.interpolation, self.max_size, self.antialias) + + def __repr__(self) -> str: + detail = f"(size={self.size}, interpolation={self.interpolation.value}, max_size={self.max_size}, antialias={self.antialias})" + return f"{self.__class__.__name__}{detail}" + + +class CenterCrop(torch.nn.Module): + """Crops the given image at the center. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + If image size is smaller than output size along any edge, image is padded with 0 and then center cropped. + + Args: + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + """ + + def __init__(self, size): + super().__init__() + _log_api_usage_once(self) + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be cropped. + + Returns: + PIL Image or Tensor: Cropped image. + """ + return F.center_crop(img, self.size) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(size={self.size})" + + +class Pad(torch.nn.Module): + """Pad the given image on all sides with the given "pad" value. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means at most 2 leading dimensions for mode reflect and symmetric, + at most 3 leading dimensions for mode edge, + and an arbitrary number of leading dimensions for mode constant + + Args: + padding (int or sequence): Padding on each border. If a single int is provided this + is used to pad all borders. If sequence of length 2 is provided this is the padding + on left/right and top/bottom respectively. If a sequence of length 4 is provided + this is the padding for the left, top, right and bottom borders respectively. + + .. note:: + In torchscript mode padding as single int is not supported, use a sequence of + length 1: ``[padding, ]``. + fill (number or tuple): Pixel fill value for constant fill. Default is 0. If a tuple of + length 3, it is used to fill R, G, B channels respectively. + This value is only used when the padding_mode is constant. + Only number is supported for torch Tensor. + Only int or tuple value is supported for PIL Image. + padding_mode (str): Type of padding. Should be: constant, edge, reflect or symmetric. + Default is constant. + + - constant: pads with a constant value, this value is specified with fill + + - edge: pads with the last value at the edge of the image. + If input a 5D torch Tensor, the last 3 dimensions will be padded instead of the last 2 + + - reflect: pads with reflection of image without repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in reflect mode + will result in [3, 2, 1, 2, 3, 4, 3, 2] + + - symmetric: pads with reflection of image repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in symmetric mode + will result in [2, 1, 1, 2, 3, 4, 4, 3] + """ + + def __init__(self, padding, fill=0, padding_mode="constant"): + super().__init__() + _log_api_usage_once(self) + if not isinstance(padding, (numbers.Number, tuple, list)): + raise TypeError("Got inappropriate padding arg") + + if not isinstance(fill, (numbers.Number, tuple, list)): + raise TypeError("Got inappropriate fill arg") + + if padding_mode not in ["constant", "edge", "reflect", "symmetric"]: + raise ValueError("Padding mode should be either constant, edge, reflect or symmetric") + + if isinstance(padding, Sequence) and len(padding) not in [1, 2, 4]: + raise ValueError( + f"Padding must be an int or a 1, 2, or 4 element tuple, not a {len(padding)} element tuple" + ) + + self.padding = padding + self.fill = fill + self.padding_mode = padding_mode + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be padded. + + Returns: + PIL Image or Tensor: Padded image. + """ + return F.pad(img, self.padding, self.fill, self.padding_mode) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(padding={self.padding}, fill={self.fill}, padding_mode={self.padding_mode})" + + +class Lambda: + """Apply a user-defined lambda as a transform. This transform does not support torchscript. + + Args: + lambd (function): Lambda/function to be used for transform. + """ + + def __init__(self, lambd): + _log_api_usage_once(self) + if not callable(lambd): + raise TypeError(f"Argument lambd should be callable, got {repr(type(lambd).__name__)}") + self.lambd = lambd + + def __call__(self, img): + return self.lambd(img) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}()" + + +class RandomTransforms: + """Base class for a list of transformations with randomness + + Args: + transforms (sequence): list of transformations + """ + + def __init__(self, transforms): + _log_api_usage_once(self) + if not isinstance(transforms, Sequence): + raise TypeError("Argument transforms should be a sequence") + self.transforms = transforms + + def __call__(self, *args, **kwargs): + raise NotImplementedError() + + def __repr__(self) -> str: + format_string = self.__class__.__name__ + "(" + for t in self.transforms: + format_string += "\n" + format_string += f" {t}" + format_string += "\n)" + return format_string + + +class RandomApply(torch.nn.Module): + """Apply randomly a list of transformations with a given probability. + + .. note:: + In order to script the transformation, please use ``torch.nn.ModuleList`` as input instead of list/tuple of + transforms as shown below: + + >>> transforms = transforms.RandomApply(torch.nn.ModuleList([ + >>> transforms.ColorJitter(), + >>> ]), p=0.3) + >>> scripted_transforms = torch.jit.script(transforms) + + Make sure to use only scriptable transformations, i.e. that work with ``torch.Tensor``, does not require + `lambda` functions or ``PIL.Image``. + + Args: + transforms (sequence or torch.nn.Module): list of transformations + p (float): probability + """ + + def __init__(self, transforms, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.transforms = transforms + self.p = p + + def forward(self, img): + if self.p < torch.rand(1): + return img + for t in self.transforms: + img = t(img) + return img + + def __repr__(self) -> str: + format_string = self.__class__.__name__ + "(" + format_string += f"\n p={self.p}" + for t in self.transforms: + format_string += "\n" + format_string += f" {t}" + format_string += "\n)" + return format_string + + +class RandomOrder(RandomTransforms): + """Apply a list of transformations in a random order. This transform does not support torchscript.""" + + def __call__(self, img): + order = list(range(len(self.transforms))) + random.shuffle(order) + for i in order: + img = self.transforms[i](img) + return img + + +class RandomChoice(RandomTransforms): + """Apply single transformation randomly picked from a list. This transform does not support torchscript.""" + + def __init__(self, transforms, p=None): + super().__init__(transforms) + if p is not None and not isinstance(p, Sequence): + raise TypeError("Argument p should be a sequence") + self.p = p + + def __call__(self, *args): + t = random.choices(self.transforms, weights=self.p)[0] + return t(*args) + + def __repr__(self) -> str: + return f"{super().__repr__()}(p={self.p})" + + +class RandomCrop(torch.nn.Module): + """Crop the given image at a random location. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions, + but if non-constant padding is used, the input is expected to have at most 2 leading dimensions + + Args: + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + padding (int or sequence, optional): Optional padding on each border + of the image. Default is None. If a single int is provided this + is used to pad all borders. If sequence of length 2 is provided this is the padding + on left/right and top/bottom respectively. If a sequence of length 4 is provided + this is the padding for the left, top, right and bottom borders respectively. + + .. note:: + In torchscript mode padding as single int is not supported, use a sequence of + length 1: ``[padding, ]``. + pad_if_needed (boolean): It will pad the image if smaller than the + desired size to avoid raising an exception. Since cropping is done + after padding, the padding seems to be done at a random offset. + fill (number or tuple): Pixel fill value for constant fill. Default is 0. If a tuple of + length 3, it is used to fill R, G, B channels respectively. + This value is only used when the padding_mode is constant. + Only number is supported for torch Tensor. + Only int or tuple value is supported for PIL Image. + padding_mode (str): Type of padding. Should be: constant, edge, reflect or symmetric. + Default is constant. + + - constant: pads with a constant value, this value is specified with fill + + - edge: pads with the last value at the edge of the image. + If input a 5D torch Tensor, the last 3 dimensions will be padded instead of the last 2 + + - reflect: pads with reflection of image without repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in reflect mode + will result in [3, 2, 1, 2, 3, 4, 3, 2] + + - symmetric: pads with reflection of image repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in symmetric mode + will result in [2, 1, 1, 2, 3, 4, 4, 3] + """ + + @staticmethod + def get_params(img: Tensor, output_size: Tuple[int, int]) -> Tuple[int, int, int, int]: + """Get parameters for ``crop`` for a random crop. + + Args: + img (PIL Image or Tensor): Image to be cropped. + output_size (tuple): Expected output size of the crop. + + Returns: + tuple: params (i, j, h, w) to be passed to ``crop`` for random crop. + """ + _, h, w = F.get_dimensions(img) + th, tw = output_size + + if h < th or w < tw: + raise ValueError(f"Required crop size {(th, tw)} is larger than input image size {(h, w)}") + + if w == tw and h == th: + return 0, 0, h, w + + i = torch.randint(0, h - th + 1, size=(1,)).item() + j = torch.randint(0, w - tw + 1, size=(1,)).item() + return i, j, th, tw + + def __init__(self, size, padding=None, pad_if_needed=False, fill=0, padding_mode="constant"): + super().__init__() + _log_api_usage_once(self) + + self.size = tuple(_setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.")) + + self.padding = padding + self.pad_if_needed = pad_if_needed + self.fill = fill + self.padding_mode = padding_mode + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be cropped. + + Returns: + PIL Image or Tensor: Cropped image. + """ + if self.padding is not None: + img = F.pad(img, self.padding, self.fill, self.padding_mode) + + _, height, width = F.get_dimensions(img) + # pad the width if needed + if self.pad_if_needed and width < self.size[1]: + padding = [self.size[1] - width, 0] + img = F.pad(img, padding, self.fill, self.padding_mode) + # pad the height if needed + if self.pad_if_needed and height < self.size[0]: + padding = [0, self.size[0] - height] + img = F.pad(img, padding, self.fill, self.padding_mode) + + i, j, h, w = self.get_params(img, self.size) + + return F.crop(img, i, j, h, w) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(size={self.size}, padding={self.padding})" + + +class RandomHorizontalFlip(torch.nn.Module): + """Horizontally flip the given image randomly with a given probability. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading + dimensions + + Args: + p (float): probability of the image being flipped. Default value is 0.5 + """ + + def __init__(self, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be flipped. + + Returns: + PIL Image or Tensor: Randomly flipped image. + """ + if torch.rand(1) < self.p: + return F.hflip(img) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" + + +class RandomVerticalFlip(torch.nn.Module): + """Vertically flip the given image randomly with a given probability. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading + dimensions + + Args: + p (float): probability of the image being flipped. Default value is 0.5 + """ + + def __init__(self, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be flipped. + + Returns: + PIL Image or Tensor: Randomly flipped image. + """ + if torch.rand(1) < self.p: + return F.vflip(img) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" + + +class RandomPerspective(torch.nn.Module): + """Performs a random perspective transformation of the given image with a given probability. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + distortion_scale (float): argument to control the degree of distortion and ranges from 0 to 1. + Default is 0.5. + p (float): probability of the image being transformed. Default is 0.5. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (sequence or number): Pixel fill value for the area outside the transformed + image. Default is ``0``. If given a number, the value is used for all bands respectively. + """ + + def __init__(self, distortion_scale=0.5, p=0.5, interpolation=InterpolationMode.BILINEAR, fill=0): + super().__init__() + _log_api_usage_once(self) + self.p = p + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + + self.interpolation = interpolation + self.distortion_scale = distortion_scale + + if fill is None: + fill = 0 + elif not isinstance(fill, (Sequence, numbers.Number)): + raise TypeError("Fill should be either a sequence or a number.") + + self.fill = fill + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be Perspectively transformed. + + Returns: + PIL Image or Tensor: Randomly transformed image. + """ + + fill = self.fill + channels, height, width = F.get_dimensions(img) + if isinstance(img, Tensor): + if isinstance(fill, (int, float)): + fill = [float(fill)] * channels + else: + fill = [float(f) for f in fill] + + if torch.rand(1) < self.p: + startpoints, endpoints = self.get_params(width, height, self.distortion_scale) + return F.perspective(img, startpoints, endpoints, self.interpolation, fill) + return img + + @staticmethod + def get_params(width: int, height: int, distortion_scale: float) -> Tuple[List[List[int]], List[List[int]]]: + """Get parameters for ``perspective`` for a random perspective transform. + + Args: + width (int): width of the image. + height (int): height of the image. + distortion_scale (float): argument to control the degree of distortion and ranges from 0 to 1. + + Returns: + List containing [top-left, top-right, bottom-right, bottom-left] of the original image, + List containing [top-left, top-right, bottom-right, bottom-left] of the transformed image. + """ + half_height = height // 2 + half_width = width // 2 + topleft = [ + int(torch.randint(0, int(distortion_scale * half_width) + 1, size=(1,)).item()), + int(torch.randint(0, int(distortion_scale * half_height) + 1, size=(1,)).item()), + ] + topright = [ + int(torch.randint(width - int(distortion_scale * half_width) - 1, width, size=(1,)).item()), + int(torch.randint(0, int(distortion_scale * half_height) + 1, size=(1,)).item()), + ] + botright = [ + int(torch.randint(width - int(distortion_scale * half_width) - 1, width, size=(1,)).item()), + int(torch.randint(height - int(distortion_scale * half_height) - 1, height, size=(1,)).item()), + ] + botleft = [ + int(torch.randint(0, int(distortion_scale * half_width) + 1, size=(1,)).item()), + int(torch.randint(height - int(distortion_scale * half_height) - 1, height, size=(1,)).item()), + ] + startpoints = [[0, 0], [width - 1, 0], [width - 1, height - 1], [0, height - 1]] + endpoints = [topleft, topright, botright, botleft] + return startpoints, endpoints + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" + + +class RandomResizedCrop(torch.nn.Module): + """Crop a random portion of image and resize it to a given size. + + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions + + A crop of the original image is made: the crop has a random area (H * W) + and a random aspect ratio. This crop is finally resized to the given + size. This is popularly used to train the Inception networks. + + Args: + size (int or sequence): expected output size of the crop, for each edge. If size is an + int instead of sequence like (h, w), a square output size ``(size, size)`` is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + + .. note:: + In torchscript mode size as single int is not supported, use a sequence of length 1: ``[size, ]``. + scale (tuple of float): Specifies the lower and upper bounds for the random area of the crop, + before resizing. The scale is defined with respect to the area of the original image. + ratio (tuple of float): lower and upper bounds for the random aspect ratio of the crop, before + resizing. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.NEAREST_EXACT``, + ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + """ + + def __init__( + self, + size, + scale=(0.08, 1.0), + ratio=(3.0 / 4.0, 4.0 / 3.0), + interpolation=InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, + ): + super().__init__() + _log_api_usage_once(self) + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + + if not isinstance(scale, Sequence): + raise TypeError("Scale should be a sequence") + if not isinstance(ratio, Sequence): + raise TypeError("Ratio should be a sequence") + if (scale[0] > scale[1]) or (ratio[0] > ratio[1]): + warnings.warn("Scale and ratio should be of kind (min, max)") + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + + self.interpolation = interpolation + self.antialias = antialias + self.scale = scale + self.ratio = ratio + + @staticmethod + def get_params(img: Tensor, scale: List[float], ratio: List[float]) -> Tuple[int, int, int, int]: + """Get parameters for ``crop`` for a random sized crop. + + Args: + img (PIL Image or Tensor): Input image. + scale (list): range of scale of the origin size cropped + ratio (list): range of aspect ratio of the origin aspect ratio cropped + + Returns: + tuple: params (i, j, h, w) to be passed to ``crop`` for a random + sized crop. + """ + _, height, width = F.get_dimensions(img) + area = height * width + + log_ratio = torch.log(torch.tensor(ratio)) + for _ in range(10): + target_area = area * torch.empty(1).uniform_(scale[0], scale[1]).item() + aspect_ratio = torch.exp(torch.empty(1).uniform_(log_ratio[0], log_ratio[1])).item() + + w = int(round(math.sqrt(target_area * aspect_ratio))) + h = int(round(math.sqrt(target_area / aspect_ratio))) + + if 0 < w <= width and 0 < h <= height: + i = torch.randint(0, height - h + 1, size=(1,)).item() + j = torch.randint(0, width - w + 1, size=(1,)).item() + return i, j, h, w + + # Fallback to central crop + in_ratio = float(width) / float(height) + if in_ratio < min(ratio): + w = width + h = int(round(w / min(ratio))) + elif in_ratio > max(ratio): + h = height + w = int(round(h * max(ratio))) + else: # whole image + w = width + h = height + i = (height - h) // 2 + j = (width - w) // 2 + return i, j, h, w + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be cropped and resized. + + Returns: + PIL Image or Tensor: Randomly cropped and resized image. + """ + i, j, h, w = self.get_params(img, self.scale, self.ratio) + return F.resized_crop(img, i, j, h, w, self.size, self.interpolation, antialias=self.antialias) + + def __repr__(self) -> str: + interpolate_str = self.interpolation.value + format_string = self.__class__.__name__ + f"(size={self.size}" + format_string += f", scale={tuple(round(s, 4) for s in self.scale)}" + format_string += f", ratio={tuple(round(r, 4) for r in self.ratio)}" + format_string += f", interpolation={interpolate_str}" + format_string += f", antialias={self.antialias})" + return format_string + + +class FiveCrop(torch.nn.Module): + """Crop the given image into four corners and the central crop. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading + dimensions + + .. Note:: + This transform returns a tuple of images and there may be a mismatch in the number of + inputs and targets your Dataset returns. See below for an example of how to deal with + this. + + Args: + size (sequence or int): Desired output size of the crop. If size is an ``int`` + instead of sequence like (h, w), a square crop of size (size, size) is made. + If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + + Example: + >>> transform = Compose([ + >>> FiveCrop(size), # this is a list of PIL Images + >>> Lambda(lambda crops: torch.stack([PILToTensor()(crop) for crop in crops])) # returns a 4D tensor + >>> ]) + >>> #In your test loop you can do the following: + >>> input, target = batch # input is a 5d tensor, target is 2d + >>> bs, ncrops, c, h, w = input.size() + >>> result = model(input.view(-1, c, h, w)) # fuse batch size and ncrops + >>> result_avg = result.view(bs, ncrops, -1).mean(1) # avg over crops + """ + + def __init__(self, size): + super().__init__() + _log_api_usage_once(self) + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be cropped. + + Returns: + tuple of 5 images. Image can be PIL Image or Tensor + """ + return F.five_crop(img, self.size) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(size={self.size})" + + +class TenCrop(torch.nn.Module): + """Crop the given image into four corners and the central crop plus the flipped version of + these (horizontal flipping is used by default). + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading + dimensions + + .. Note:: + This transform returns a tuple of images and there may be a mismatch in the number of + inputs and targets your Dataset returns. See below for an example of how to deal with + this. + + Args: + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + vertical_flip (bool): Use vertical flipping instead of horizontal + + Example: + >>> transform = Compose([ + >>> TenCrop(size), # this is a tuple of PIL Images + >>> Lambda(lambda crops: torch.stack([PILToTensor()(crop) for crop in crops])) # returns a 4D tensor + >>> ]) + >>> #In your test loop you can do the following: + >>> input, target = batch # input is a 5d tensor, target is 2d + >>> bs, ncrops, c, h, w = input.size() + >>> result = model(input.view(-1, c, h, w)) # fuse batch size and ncrops + >>> result_avg = result.view(bs, ncrops, -1).mean(1) # avg over crops + """ + + def __init__(self, size, vertical_flip=False): + super().__init__() + _log_api_usage_once(self) + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + self.vertical_flip = vertical_flip + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be cropped. + + Returns: + tuple of 10 images. Image can be PIL Image or Tensor + """ + return F.ten_crop(img, self.size, self.vertical_flip) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(size={self.size}, vertical_flip={self.vertical_flip})" + + +class LinearTransformation(torch.nn.Module): + """Transform a tensor image with a square transformation matrix and a mean_vector computed + offline. + This transform does not support PIL Image. + Given transformation_matrix and mean_vector, will flatten the torch.*Tensor and + subtract mean_vector from it which is then followed by computing the dot + product with the transformation matrix and then reshaping the tensor to its + original shape. + + Applications: + whitening transformation: Suppose X is a column vector zero-centered data. + Then compute the data covariance matrix [D x D] with torch.mm(X.t(), X), + perform SVD on this matrix and pass it as transformation_matrix. + + Args: + transformation_matrix (Tensor): tensor [D x D], D = C x H x W + mean_vector (Tensor): tensor [D], D = C x H x W + """ + + def __init__(self, transformation_matrix, mean_vector): + super().__init__() + _log_api_usage_once(self) + if transformation_matrix.size(0) != transformation_matrix.size(1): + raise ValueError( + "transformation_matrix should be square. Got " + f"{tuple(transformation_matrix.size())} rectangular matrix." + ) + + if mean_vector.size(0) != transformation_matrix.size(0): + raise ValueError( + f"mean_vector should have the same length {mean_vector.size(0)}" + f" as any one of the dimensions of the transformation_matrix [{tuple(transformation_matrix.size())}]" + ) + + if transformation_matrix.device != mean_vector.device: + raise ValueError( + f"Input tensors should be on the same device. Got {transformation_matrix.device} and {mean_vector.device}" + ) + + if transformation_matrix.dtype != mean_vector.dtype: + raise ValueError( + f"Input tensors should have the same dtype. Got {transformation_matrix.dtype} and {mean_vector.dtype}" + ) + + self.transformation_matrix = transformation_matrix + self.mean_vector = mean_vector + + def forward(self, tensor: Tensor) -> Tensor: + """ + Args: + tensor (Tensor): Tensor image to be whitened. + + Returns: + Tensor: Transformed image. + """ + shape = tensor.shape + n = shape[-3] * shape[-2] * shape[-1] + if n != self.transformation_matrix.shape[0]: + raise ValueError( + "Input tensor and transformation matrix have incompatible shape." + + f"[{shape[-3]} x {shape[-2]} x {shape[-1]}] != " + + f"{self.transformation_matrix.shape[0]}" + ) + + if tensor.device.type != self.mean_vector.device.type: + raise ValueError( + "Input tensor should be on the same device as transformation matrix and mean vector. " + f"Got {tensor.device} vs {self.mean_vector.device}" + ) + + flat_tensor = tensor.view(-1, n) - self.mean_vector + transformation_matrix = self.transformation_matrix.to(flat_tensor.dtype) + transformed_tensor = torch.mm(flat_tensor, transformation_matrix) + tensor = transformed_tensor.view(shape) + return tensor + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(transformation_matrix=" + f"{self.transformation_matrix.tolist()}" + f", mean_vector={self.mean_vector.tolist()})" + ) + return s + + +class ColorJitter(torch.nn.Module): + """Randomly change the brightness, contrast, saturation and hue of an image. + If the image is torch Tensor, it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, mode "1", "I", "F" and modes with transparency (alpha channel) are not supported. + + Args: + brightness (float or tuple of float (min, max)): How much to jitter brightness. + brightness_factor is chosen uniformly from [max(0, 1 - brightness), 1 + brightness] + or the given [min, max]. Should be non negative numbers. + contrast (float or tuple of float (min, max)): How much to jitter contrast. + contrast_factor is chosen uniformly from [max(0, 1 - contrast), 1 + contrast] + or the given [min, max]. Should be non-negative numbers. + saturation (float or tuple of float (min, max)): How much to jitter saturation. + saturation_factor is chosen uniformly from [max(0, 1 - saturation), 1 + saturation] + or the given [min, max]. Should be non negative numbers. + hue (float or tuple of float (min, max)): How much to jitter hue. + hue_factor is chosen uniformly from [-hue, hue] or the given [min, max]. + Should have 0<= hue <= 0.5 or -0.5 <= min <= max <= 0.5. + To jitter hue, the pixel values of the input image has to be non-negative for conversion to HSV space; + thus it does not work if you normalize your image to an interval with negative values, + or use an interpolation that generates negative values before using this function. + """ + + def __init__( + self, + brightness: Union[float, Tuple[float, float]] = 0, + contrast: Union[float, Tuple[float, float]] = 0, + saturation: Union[float, Tuple[float, float]] = 0, + hue: Union[float, Tuple[float, float]] = 0, + ) -> None: + super().__init__() + _log_api_usage_once(self) + self.brightness = self._check_input(brightness, "brightness") + self.contrast = self._check_input(contrast, "contrast") + self.saturation = self._check_input(saturation, "saturation") + self.hue = self._check_input(hue, "hue", center=0, bound=(-0.5, 0.5), clip_first_on_zero=False) + + @torch.jit.unused + def _check_input(self, value, name, center=1, bound=(0, float("inf")), clip_first_on_zero=True): + if isinstance(value, numbers.Number): + if value < 0: + raise ValueError(f"If {name} is a single number, it must be non negative.") + value = [center - float(value), center + float(value)] + if clip_first_on_zero: + value[0] = max(value[0], 0.0) + elif isinstance(value, (tuple, list)) and len(value) == 2: + value = [float(value[0]), float(value[1])] + else: + raise TypeError(f"{name} should be a single number or a list/tuple with length 2.") + + if not bound[0] <= value[0] <= value[1] <= bound[1]: + raise ValueError(f"{name} values should be between {bound}, but got {value}.") + + # if value is 0 or (1., 1.) for brightness/contrast/saturation + # or (0., 0.) for hue, do nothing + if value[0] == value[1] == center: + return None + else: + return tuple(value) + + @staticmethod + def get_params( + brightness: Optional[List[float]], + contrast: Optional[List[float]], + saturation: Optional[List[float]], + hue: Optional[List[float]], + ) -> Tuple[Tensor, Optional[float], Optional[float], Optional[float], Optional[float]]: + """Get the parameters for the randomized transform to be applied on image. + + Args: + brightness (tuple of float (min, max), optional): The range from which the brightness_factor is chosen + uniformly. Pass None to turn off the transformation. + contrast (tuple of float (min, max), optional): The range from which the contrast_factor is chosen + uniformly. Pass None to turn off the transformation. + saturation (tuple of float (min, max), optional): The range from which the saturation_factor is chosen + uniformly. Pass None to turn off the transformation. + hue (tuple of float (min, max), optional): The range from which the hue_factor is chosen uniformly. + Pass None to turn off the transformation. + + Returns: + tuple: The parameters used to apply the randomized transform + along with their random order. + """ + fn_idx = torch.randperm(4) + + b = None if brightness is None else float(torch.empty(1).uniform_(brightness[0], brightness[1])) + c = None if contrast is None else float(torch.empty(1).uniform_(contrast[0], contrast[1])) + s = None if saturation is None else float(torch.empty(1).uniform_(saturation[0], saturation[1])) + h = None if hue is None else float(torch.empty(1).uniform_(hue[0], hue[1])) + + return fn_idx, b, c, s, h + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Input image. + + Returns: + PIL Image or Tensor: Color jittered image. + """ + fn_idx, brightness_factor, contrast_factor, saturation_factor, hue_factor = self.get_params( + self.brightness, self.contrast, self.saturation, self.hue + ) + + for fn_id in fn_idx: + if fn_id == 0 and brightness_factor is not None: + img = F.adjust_brightness(img, brightness_factor) + elif fn_id == 1 and contrast_factor is not None: + img = F.adjust_contrast(img, contrast_factor) + elif fn_id == 2 and saturation_factor is not None: + img = F.adjust_saturation(img, saturation_factor) + elif fn_id == 3 and hue_factor is not None: + img = F.adjust_hue(img, hue_factor) + + return img + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}(" + f"brightness={self.brightness}" + f", contrast={self.contrast}" + f", saturation={self.saturation}" + f", hue={self.hue})" + ) + return s + + +class RandomRotation(torch.nn.Module): + """Rotate the image by angle. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + degrees (sequence or number): Range of degrees to select from. + If degrees is a number instead of sequence like (min, max), the range of degrees + will be (-degrees, +degrees). + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + expand (bool, optional): Optional expansion flag. + If true, expands the output to make it large enough to hold the entire rotated image. + If false or omitted, make the output image the same size as the input image. + Note that the expand flag assumes rotation around the center and no translation. + center (sequence, optional): Optional center of rotation, (x, y). Origin is the upper left corner. + Default is the center of the image. + fill (sequence or number): Pixel fill value for the area outside the rotated + image. Default is ``0``. If given a number, the value is used for all bands respectively. + + .. _filters: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#filters + + """ + + def __init__(self, degrees, interpolation=InterpolationMode.NEAREST, expand=False, center=None, fill=0): + super().__init__() + _log_api_usage_once(self) + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + + self.degrees = _setup_angle(degrees, name="degrees", req_sizes=(2,)) + + if center is not None: + _check_sequence_input(center, "center", req_sizes=(2,)) + + self.center = center + + self.interpolation = interpolation + self.expand = expand + + if fill is None: + fill = 0 + elif not isinstance(fill, (Sequence, numbers.Number)): + raise TypeError("Fill should be either a sequence or a number.") + + self.fill = fill + + @staticmethod + def get_params(degrees: List[float]) -> float: + """Get parameters for ``rotate`` for a random rotation. + + Returns: + float: angle parameter to be passed to ``rotate`` for random rotation. + """ + angle = float(torch.empty(1).uniform_(float(degrees[0]), float(degrees[1])).item()) + return angle + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be rotated. + + Returns: + PIL Image or Tensor: Rotated image. + """ + fill = self.fill + channels, _, _ = F.get_dimensions(img) + if isinstance(img, Tensor): + if isinstance(fill, (int, float)): + fill = [float(fill)] * channels + else: + fill = [float(f) for f in fill] + angle = self.get_params(self.degrees) + + return F.rotate(img, angle, self.interpolation, self.expand, self.center, fill) + + def __repr__(self) -> str: + interpolate_str = self.interpolation.value + format_string = self.__class__.__name__ + f"(degrees={self.degrees}" + format_string += f", interpolation={interpolate_str}" + format_string += f", expand={self.expand}" + if self.center is not None: + format_string += f", center={self.center}" + if self.fill is not None: + format_string += f", fill={self.fill}" + format_string += ")" + return format_string + + +class RandomAffine(torch.nn.Module): + """Random affine transformation of the image keeping center invariant. + If the image is torch Tensor, it is expected + to have [..., H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + degrees (sequence or number): Range of degrees to select from. + If degrees is a number instead of sequence like (min, max), the range of degrees + will be (-degrees, +degrees). Set to 0 to deactivate rotations. + translate (tuple, optional): tuple of maximum absolute fraction for horizontal + and vertical translations. For example translate=(a, b), then horizontal shift + is randomly sampled in the range -img_width * a < dx < img_width * a and vertical shift is + randomly sampled in the range -img_height * b < dy < img_height * b. Will not translate by default. + scale (tuple, optional): scaling factor interval, e.g (a, b), then scale is + randomly sampled from the range a <= scale <= b. Will keep original scale by default. + shear (sequence or number, optional): Range of degrees to select from. + If shear is a number, a shear parallel to the x-axis in the range (-shear, +shear) + will be applied. Else if shear is a sequence of 2 values a shear parallel to the x-axis in the + range (shear[0], shear[1]) will be applied. Else if shear is a sequence of 4 values, + an x-axis shear in (shear[0], shear[1]) and y-axis shear in (shear[2], shear[3]) will be applied. + Will not apply shear by default. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (sequence or number): Pixel fill value for the area outside the transformed + image. Default is ``0``. If given a number, the value is used for all bands respectively. + center (sequence, optional): Optional center of rotation, (x, y). Origin is the upper left corner. + Default is the center of the image. + + .. _filters: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#filters + + """ + + def __init__( + self, + degrees, + translate=None, + scale=None, + shear=None, + interpolation=InterpolationMode.NEAREST, + fill=0, + center=None, + ): + super().__init__() + _log_api_usage_once(self) + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + + self.degrees = _setup_angle(degrees, name="degrees", req_sizes=(2,)) + + if translate is not None: + _check_sequence_input(translate, "translate", req_sizes=(2,)) + for t in translate: + if not (0.0 <= t <= 1.0): + raise ValueError("translation values should be between 0 and 1") + self.translate = translate + + if scale is not None: + _check_sequence_input(scale, "scale", req_sizes=(2,)) + for s in scale: + if s <= 0: + raise ValueError("scale values should be positive") + self.scale = scale + + if shear is not None: + self.shear = _setup_angle(shear, name="shear", req_sizes=(2, 4)) + else: + self.shear = shear + + self.interpolation = interpolation + + if fill is None: + fill = 0 + elif not isinstance(fill, (Sequence, numbers.Number)): + raise TypeError("Fill should be either a sequence or a number.") + + self.fill = fill + + if center is not None: + _check_sequence_input(center, "center", req_sizes=(2,)) + + self.center = center + + @staticmethod + def get_params( + degrees: List[float], + translate: Optional[List[float]], + scale_ranges: Optional[List[float]], + shears: Optional[List[float]], + img_size: List[int], + ) -> Tuple[float, Tuple[int, int], float, Tuple[float, float]]: + """Get parameters for affine transformation + + Returns: + params to be passed to the affine transformation + """ + angle = float(torch.empty(1).uniform_(float(degrees[0]), float(degrees[1])).item()) + if translate is not None: + max_dx = float(translate[0] * img_size[0]) + max_dy = float(translate[1] * img_size[1]) + tx = int(round(torch.empty(1).uniform_(-max_dx, max_dx).item())) + ty = int(round(torch.empty(1).uniform_(-max_dy, max_dy).item())) + translations = (tx, ty) + else: + translations = (0, 0) + + if scale_ranges is not None: + scale = float(torch.empty(1).uniform_(scale_ranges[0], scale_ranges[1]).item()) + else: + scale = 1.0 + + shear_x = shear_y = 0.0 + if shears is not None: + shear_x = float(torch.empty(1).uniform_(shears[0], shears[1]).item()) + if len(shears) == 4: + shear_y = float(torch.empty(1).uniform_(shears[2], shears[3]).item()) + + shear = (shear_x, shear_y) + + return angle, translations, scale, shear + + def forward(self, img): + """ + img (PIL Image or Tensor): Image to be transformed. + + Returns: + PIL Image or Tensor: Affine transformed image. + """ + fill = self.fill + channels, height, width = F.get_dimensions(img) + if isinstance(img, Tensor): + if isinstance(fill, (int, float)): + fill = [float(fill)] * channels + else: + fill = [float(f) for f in fill] + + img_size = [width, height] # flip for keeping BC on get_params call + + ret = self.get_params(self.degrees, self.translate, self.scale, self.shear, img_size) + + return F.affine(img, *ret, interpolation=self.interpolation, fill=fill, center=self.center) + + def __repr__(self) -> str: + s = f"{self.__class__.__name__}(degrees={self.degrees}" + s += f", translate={self.translate}" if self.translate is not None else "" + s += f", scale={self.scale}" if self.scale is not None else "" + s += f", shear={self.shear}" if self.shear is not None else "" + s += f", interpolation={self.interpolation.value}" if self.interpolation != InterpolationMode.NEAREST else "" + s += f", fill={self.fill}" if self.fill != 0 else "" + s += f", center={self.center}" if self.center is not None else "" + s += ")" + + return s + + +class Grayscale(torch.nn.Module): + """Convert image to grayscale. + If the image is torch Tensor, it is expected + to have [..., 3, H, W] shape, where ... means an arbitrary number of leading dimensions + + Args: + num_output_channels (int): (1 or 3) number of channels desired for output image + + Returns: + PIL Image: Grayscale version of the input. + + - If ``num_output_channels == 1`` : returned image is single channel + - If ``num_output_channels == 3`` : returned image is 3 channel with r == g == b + + """ + + def __init__(self, num_output_channels=1): + super().__init__() + _log_api_usage_once(self) + self.num_output_channels = num_output_channels + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be converted to grayscale. + + Returns: + PIL Image or Tensor: Grayscaled image. + """ + return F.rgb_to_grayscale(img, num_output_channels=self.num_output_channels) + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(num_output_channels={self.num_output_channels})" + + +class RandomGrayscale(torch.nn.Module): + """Randomly convert image to grayscale with a probability of p (default 0.1). + If the image is torch Tensor, it is expected + to have [..., 3, H, W] shape, where ... means an arbitrary number of leading dimensions + + Args: + p (float): probability that image should be converted to grayscale. + + Returns: + PIL Image or Tensor: Grayscale version of the input image with probability p and unchanged + with probability (1-p). + - If input image is 1 channel: grayscale version is 1 channel + - If input image is 3 channel: grayscale version is 3 channel with r == g == b + + """ + + def __init__(self, p=0.1): + super().__init__() + _log_api_usage_once(self) + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be converted to grayscale. + + Returns: + PIL Image or Tensor: Randomly grayscaled image. + """ + num_output_channels, _, _ = F.get_dimensions(img) + if torch.rand(1) < self.p: + return F.rgb_to_grayscale(img, num_output_channels=num_output_channels) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" + + +class RandomErasing(torch.nn.Module): + """Randomly selects a rectangle region in a torch.Tensor image and erases its pixels. + This transform does not support PIL Image. + 'Random Erasing Data Augmentation' by Zhong et al. See https://arxiv.org/abs/1708.04896 + + Args: + p: probability that the random erasing operation will be performed. + scale: range of proportion of erased area against input image. + ratio: range of aspect ratio of erased area. + value: erasing value. Default is 0. If a single int, it is used to + erase all pixels. If a tuple of length 3, it is used to erase + R, G, B channels respectively. + If a str of 'random', erasing each pixel with random values. + inplace: boolean to make this transform inplace. Default set to False. + + Returns: + Erased Image. + + Example: + >>> transform = transforms.Compose([ + >>> transforms.RandomHorizontalFlip(), + >>> transforms.PILToTensor(), + >>> transforms.ConvertImageDtype(torch.float), + >>> transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)), + >>> transforms.RandomErasing(), + >>> ]) + """ + + def __init__(self, p=0.5, scale=(0.02, 0.33), ratio=(0.3, 3.3), value=0, inplace=False): + super().__init__() + _log_api_usage_once(self) + if not isinstance(value, (numbers.Number, str, tuple, list)): + raise TypeError("Argument value should be either a number or str or a sequence") + if isinstance(value, str) and value != "random": + raise ValueError("If value is str, it should be 'random'") + if not isinstance(scale, Sequence): + raise TypeError("Scale should be a sequence") + if not isinstance(ratio, Sequence): + raise TypeError("Ratio should be a sequence") + if (scale[0] > scale[1]) or (ratio[0] > ratio[1]): + warnings.warn("Scale and ratio should be of kind (min, max)") + if scale[0] < 0 or scale[1] > 1: + raise ValueError("Scale should be between 0 and 1") + if p < 0 or p > 1: + raise ValueError("Random erasing probability should be between 0 and 1") + + self.p = p + self.scale = scale + self.ratio = ratio + self.value = value + self.inplace = inplace + + @staticmethod + def get_params( + img: Tensor, scale: Tuple[float, float], ratio: Tuple[float, float], value: Optional[List[float]] = None + ) -> Tuple[int, int, int, int, Tensor]: + """Get parameters for ``erase`` for a random erasing. + + Args: + img (Tensor): Tensor image to be erased. + scale (sequence): range of proportion of erased area against input image. + ratio (sequence): range of aspect ratio of erased area. + value (list, optional): erasing value. If None, it is interpreted as "random" + (erasing each pixel with random values). If ``len(value)`` is 1, it is interpreted as a number, + i.e. ``value[0]``. + + Returns: + tuple: params (i, j, h, w, v) to be passed to ``erase`` for random erasing. + """ + img_c, img_h, img_w = img.shape[-3], img.shape[-2], img.shape[-1] + area = img_h * img_w + + log_ratio = torch.log(torch.tensor(ratio)) + for _ in range(10): + erase_area = area * torch.empty(1).uniform_(scale[0], scale[1]).item() + aspect_ratio = torch.exp(torch.empty(1).uniform_(log_ratio[0], log_ratio[1])).item() + + h = int(round(math.sqrt(erase_area * aspect_ratio))) + w = int(round(math.sqrt(erase_area / aspect_ratio))) + if not (h < img_h and w < img_w): + continue + + if value is None: + v = torch.empty([img_c, h, w], dtype=torch.float32).normal_() + else: + v = torch.tensor(value)[:, None, None] + + i = torch.randint(0, img_h - h + 1, size=(1,)).item() + j = torch.randint(0, img_w - w + 1, size=(1,)).item() + return i, j, h, w, v + + # Return original image + return 0, 0, img_h, img_w, img + + def forward(self, img): + """ + Args: + img (Tensor): Tensor image to be erased. + + Returns: + img (Tensor): Erased Tensor image. + """ + if torch.rand(1) < self.p: + + # cast self.value to script acceptable type + if isinstance(self.value, (int, float)): + value = [float(self.value)] + elif isinstance(self.value, str): + value = None + elif isinstance(self.value, (list, tuple)): + value = [float(v) for v in self.value] + else: + value = self.value + + if value is not None and not (len(value) in (1, img.shape[-3])): + raise ValueError( + "If value is a sequence, it should have either a single value or " + f"{img.shape[-3]} (number of input channels)" + ) + + x, y, h, w, v = self.get_params(img, scale=self.scale, ratio=self.ratio, value=value) + return F.erase(img, x, y, h, w, v, self.inplace) + return img + + def __repr__(self) -> str: + s = ( + f"{self.__class__.__name__}" + f"(p={self.p}, " + f"scale={self.scale}, " + f"ratio={self.ratio}, " + f"value={self.value}, " + f"inplace={self.inplace})" + ) + return s + + +class GaussianBlur(torch.nn.Module): + """Blurs image with randomly chosen Gaussian blur. + If the image is torch Tensor, it is expected + to have [..., C, H, W] shape, where ... means at most one leading dimension. + + Args: + kernel_size (int or sequence): Size of the Gaussian kernel. + sigma (float or tuple of float (min, max)): Standard deviation to be used for + creating kernel to perform blurring. If float, sigma is fixed. If it is tuple + of float (min, max), sigma is chosen uniformly at random to lie in the + given range. + + Returns: + PIL Image or Tensor: Gaussian blurred version of the input image. + + """ + + def __init__(self, kernel_size, sigma=(0.1, 2.0)): + super().__init__() + _log_api_usage_once(self) + self.kernel_size = _setup_size(kernel_size, "Kernel size should be a tuple/list of two integers") + for ks in self.kernel_size: + if ks <= 0 or ks % 2 == 0: + raise ValueError("Kernel size value should be an odd and positive number.") + + if isinstance(sigma, numbers.Number): + if sigma <= 0: + raise ValueError("If sigma is a single number, it must be positive.") + sigma = (sigma, sigma) + elif isinstance(sigma, Sequence) and len(sigma) == 2: + if not 0.0 < sigma[0] <= sigma[1]: + raise ValueError("sigma values should be positive and of the form (min, max).") + else: + raise ValueError("sigma should be a single number or a list/tuple with length 2.") + + self.sigma = sigma + + @staticmethod + def get_params(sigma_min: float, sigma_max: float) -> float: + """Choose sigma for random gaussian blurring. + + Args: + sigma_min (float): Minimum standard deviation that can be chosen for blurring kernel. + sigma_max (float): Maximum standard deviation that can be chosen for blurring kernel. + + Returns: + float: Standard deviation to be passed to calculate kernel for gaussian blurring. + """ + return torch.empty(1).uniform_(sigma_min, sigma_max).item() + + def forward(self, img: Tensor) -> Tensor: + """ + Args: + img (PIL Image or Tensor): image to be blurred. + + Returns: + PIL Image or Tensor: Gaussian blurred image + """ + sigma = self.get_params(self.sigma[0], self.sigma[1]) + return F.gaussian_blur(img, self.kernel_size, [sigma, sigma]) + + def __repr__(self) -> str: + s = f"{self.__class__.__name__}(kernel_size={self.kernel_size}, sigma={self.sigma})" + return s + + +def _setup_size(size, error_msg): + if isinstance(size, numbers.Number): + return int(size), int(size) + + if isinstance(size, Sequence) and len(size) == 1: + return size[0], size[0] + + if len(size) != 2: + raise ValueError(error_msg) + + return size + + +def _check_sequence_input(x, name, req_sizes): + msg = req_sizes[0] if len(req_sizes) < 2 else " or ".join([str(s) for s in req_sizes]) + if not isinstance(x, Sequence): + raise TypeError(f"{name} should be a sequence of length {msg}.") + if len(x) not in req_sizes: + raise ValueError(f"{name} should be a sequence of length {msg}.") + + +def _setup_angle(x, name, req_sizes=(2,)): + if isinstance(x, numbers.Number): + if x < 0: + raise ValueError(f"If {name} is a single number, it must be positive.") + x = [-x, x] + else: + _check_sequence_input(x, name, req_sizes) + + return [float(d) for d in x] + + +class RandomInvert(torch.nn.Module): + """Inverts the colors of the given image randomly with a given probability. + If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + p (float): probability of the image being color inverted. Default value is 0.5 + """ + + def __init__(self, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be inverted. + + Returns: + PIL Image or Tensor: Randomly color inverted image. + """ + if torch.rand(1).item() < self.p: + return F.invert(img) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" + + +class RandomPosterize(torch.nn.Module): + """Posterize the image randomly with a given probability by reducing the + number of bits for each color channel. If the image is torch Tensor, it should be of type torch.uint8, + and it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + bits (int): number of bits to keep for each channel (0-8) + p (float): probability of the image being posterized. Default value is 0.5 + """ + + def __init__(self, bits, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.bits = bits + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be posterized. + + Returns: + PIL Image or Tensor: Randomly posterized image. + """ + if torch.rand(1).item() < self.p: + return F.posterize(img, self.bits) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(bits={self.bits},p={self.p})" + + +class RandomSolarize(torch.nn.Module): + """Solarize the image randomly with a given probability by inverting all pixel + values above a threshold. If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + threshold (float): all pixels equal or above this value are inverted. + p (float): probability of the image being solarized. Default value is 0.5 + """ + + def __init__(self, threshold, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.threshold = threshold + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be solarized. + + Returns: + PIL Image or Tensor: Randomly solarized image. + """ + if torch.rand(1).item() < self.p: + return F.solarize(img, self.threshold) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(threshold={self.threshold},p={self.p})" + + +class RandomAdjustSharpness(torch.nn.Module): + """Adjust the sharpness of the image randomly with a given probability. If the image is torch Tensor, + it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + sharpness_factor (float): How much to adjust the sharpness. Can be + any non-negative number. 0 gives a blurred image, 1 gives the + original image while 2 increases the sharpness by a factor of 2. + p (float): probability of the image being sharpened. Default value is 0.5 + """ + + def __init__(self, sharpness_factor, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.sharpness_factor = sharpness_factor + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be sharpened. + + Returns: + PIL Image or Tensor: Randomly sharpened image. + """ + if torch.rand(1).item() < self.p: + return F.adjust_sharpness(img, self.sharpness_factor) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(sharpness_factor={self.sharpness_factor},p={self.p})" + + +class RandomAutocontrast(torch.nn.Module): + """Autocontrast the pixels of the given image randomly with a given probability. + If the image is torch Tensor, it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + p (float): probability of the image being autocontrasted. Default value is 0.5 + """ + + def __init__(self, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be autocontrasted. + + Returns: + PIL Image or Tensor: Randomly autocontrasted image. + """ + if torch.rand(1).item() < self.p: + return F.autocontrast(img) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" + + +class RandomEqualize(torch.nn.Module): + """Equalize the histogram of the given image randomly with a given probability. + If the image is torch Tensor, it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "P", "L" or "RGB". + + Args: + p (float): probability of the image being equalized. Default value is 0.5 + """ + + def __init__(self, p=0.5): + super().__init__() + _log_api_usage_once(self) + self.p = p + + def forward(self, img): + """ + Args: + img (PIL Image or Tensor): Image to be equalized. + + Returns: + PIL Image or Tensor: Randomly equalized image. + """ + if torch.rand(1).item() < self.p: + return F.equalize(img) + return img + + def __repr__(self) -> str: + return f"{self.__class__.__name__}(p={self.p})" + + +class ElasticTransform(torch.nn.Module): + """Transform a tensor image with elastic transformations. + Given alpha and sigma, it will generate displacement + vectors for all pixels based on random offsets. Alpha controls the strength + and sigma controls the smoothness of the displacements. + The displacements are added to an identity grid and the resulting grid is + used to grid_sample from the image. + + Applications: + Randomly transforms the morphology of objects in images and produces a + see-through-water-like effect. + + Args: + alpha (float or sequence of floats): Magnitude of displacements. Default is 50.0. + sigma (float or sequence of floats): Smoothness of displacements. Default is 5.0. + interpolation (InterpolationMode): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (sequence or number): Pixel fill value for the area outside the transformed + image. Default is ``0``. If given a number, the value is used for all bands respectively. + + """ + + def __init__(self, alpha=50.0, sigma=5.0, interpolation=InterpolationMode.BILINEAR, fill=0): + super().__init__() + _log_api_usage_once(self) + if not isinstance(alpha, (float, Sequence)): + raise TypeError(f"alpha should be float or a sequence of floats. Got {type(alpha)}") + if isinstance(alpha, Sequence) and len(alpha) != 2: + raise ValueError(f"If alpha is a sequence its length should be 2. Got {len(alpha)}") + if isinstance(alpha, Sequence): + for element in alpha: + if not isinstance(element, float): + raise TypeError(f"alpha should be a sequence of floats. Got {type(element)}") + + if isinstance(alpha, float): + alpha = [float(alpha), float(alpha)] + if isinstance(alpha, (list, tuple)) and len(alpha) == 1: + alpha = [alpha[0], alpha[0]] + + self.alpha = alpha + + if not isinstance(sigma, (float, Sequence)): + raise TypeError(f"sigma should be float or a sequence of floats. Got {type(sigma)}") + if isinstance(sigma, Sequence) and len(sigma) != 2: + raise ValueError(f"If sigma is a sequence its length should be 2. Got {len(sigma)}") + if isinstance(sigma, Sequence): + for element in sigma: + if not isinstance(element, float): + raise TypeError(f"sigma should be a sequence of floats. Got {type(element)}") + + if isinstance(sigma, float): + sigma = [float(sigma), float(sigma)] + if isinstance(sigma, (list, tuple)) and len(sigma) == 1: + sigma = [sigma[0], sigma[0]] + + self.sigma = sigma + + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + self.interpolation = interpolation + + if isinstance(fill, (int, float)): + fill = [float(fill)] + elif isinstance(fill, (list, tuple)): + fill = [float(f) for f in fill] + else: + raise TypeError(f"fill should be int or float or a list or tuple of them. Got {type(fill)}") + self.fill = fill + + @staticmethod + def get_params(alpha: List[float], sigma: List[float], size: List[int]) -> Tensor: + dx = torch.rand([1, 1] + size) * 2 - 1 + if sigma[0] > 0.0: + kx = int(8 * sigma[0] + 1) + # if kernel size is even we have to make it odd + if kx % 2 == 0: + kx += 1 + dx = F.gaussian_blur(dx, [kx, kx], sigma) + dx = dx * alpha[0] / size[0] + + dy = torch.rand([1, 1] + size) * 2 - 1 + if sigma[1] > 0.0: + ky = int(8 * sigma[1] + 1) + # if kernel size is even we have to make it odd + if ky % 2 == 0: + ky += 1 + dy = F.gaussian_blur(dy, [ky, ky], sigma) + dy = dy * alpha[1] / size[1] + return torch.concat([dx, dy], 1).permute([0, 2, 3, 1]) # 1 x H x W x 2 + + def forward(self, tensor: Tensor) -> Tensor: + """ + Args: + tensor (PIL Image or Tensor): Image to be transformed. + + Returns: + PIL Image or Tensor: Transformed image. + """ + _, height, width = F.get_dimensions(tensor) + displacement = self.get_params(self.alpha, self.sigma, [height, width]) + return F.elastic_transform(tensor, displacement, self.interpolation, self.fill) + + def __repr__(self): + format_string = self.__class__.__name__ + format_string += f"(alpha={self.alpha}" + format_string += f", sigma={self.sigma}" + format_string += f", interpolation={self.interpolation}" + format_string += f", fill={self.fill})" + return format_string diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..6802bf304f46d91f7382b2504ba40025f18e24b9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__init__.py @@ -0,0 +1,60 @@ +from torchvision.transforms import AutoAugmentPolicy, InterpolationMode # usort: skip + +from . import functional # usort: skip + +from ._transform import Transform # usort: skip + +from ._augment import CutMix, JPEG, MixUp, RandomErasing +from ._auto_augment import AugMix, AutoAugment, RandAugment, TrivialAugmentWide +from ._color import ( + ColorJitter, + Grayscale, + RandomAdjustSharpness, + RandomAutocontrast, + RandomChannelPermutation, + RandomEqualize, + RandomGrayscale, + RandomInvert, + RandomPhotometricDistort, + RandomPosterize, + RandomSolarize, + RGB, +) +from ._container import Compose, RandomApply, RandomChoice, RandomOrder +from ._geometry import ( + CenterCrop, + ElasticTransform, + FiveCrop, + Pad, + RandomAffine, + RandomCrop, + RandomHorizontalFlip, + RandomIoUCrop, + RandomPerspective, + RandomResize, + RandomResizedCrop, + RandomRotation, + RandomShortestSize, + RandomVerticalFlip, + RandomZoomOut, + Resize, + ScaleJitter, + TenCrop, +) +from ._meta import ClampBoundingBoxes, ConvertBoundingBoxFormat +from ._misc import ( + ConvertImageDtype, + GaussianBlur, + GaussianNoise, + Identity, + Lambda, + LinearTransformation, + Normalize, + SanitizeBoundingBoxes, + ToDtype, +) +from ._temporal import UniformTemporalSubsample +from ._type_conversion import PILToTensor, ToImage, ToPILImage, ToPureTensor +from ._utils import check_type, get_bounding_boxes, has_all, has_any, query_chw, query_size + +from ._deprecated import ToTensor # usort: skip diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1c4338285bde7d9d6964f51ba11ca56c6b8022ad Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_augment.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_augment.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..27a72a03c9a41c595c559a137118f093b700d633 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_augment.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_auto_augment.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_auto_augment.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1848d6ba3ebf0b7ea60fec72f265a10f908efd9e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_auto_augment.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_color.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_color.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8446cad264e1e7b635bde8ddfa042abcd38604ed Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_color.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_container.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_container.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a4450edb5af014bcc82789a0254217ba4c56f9b5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_container.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_deprecated.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_deprecated.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae9ae9924301793b7a93be8458df00848133a444 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_deprecated.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_geometry.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_geometry.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a1b8f3423789c60c6c41d5df03fe574e0ef343f5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_geometry.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_meta.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_meta.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ef8776a2672eda55bfc498da4f0047e044e2f9c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_meta.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_misc.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_misc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96fdfcf9fcacc16cbdb9bbc6765e6b6afa3233c3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_misc.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_temporal.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_temporal.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1d1e886aa47493e2486927be433701d85efff5e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_temporal.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_transform.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_transform.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a7887d1ad141b50672ad0c6d3030a871cb89c1a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_transform.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_type_conversion.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_type_conversion.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f4b519cb55a21c45548de35edcf1409b8fc2e185 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_type_conversion.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..185bcbb37c38eacfcaa58174a8859ad325262768 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_augment.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_augment.py new file mode 100644 index 0000000000000000000000000000000000000000..efa7beff6e14da7c93a12fd3f4de3db4394dfb1b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_augment.py @@ -0,0 +1,369 @@ +import math +import numbers +import warnings +from typing import Any, Callable, Dict, List, Optional, Sequence, Union + +import PIL.Image +import torch +from torch.nn.functional import one_hot +from torch.utils._pytree import tree_flatten, tree_unflatten +from torchvision import transforms as _transforms, tv_tensors +from torchvision.transforms.v2 import functional as F + +from ._transform import _RandomApplyTransform, Transform +from ._utils import _check_sequence_input, _parse_labels_getter, has_any, is_pure_tensor, query_chw, query_size + + +class RandomErasing(_RandomApplyTransform): + """Randomly select a rectangle region in the input image or video and erase its pixels. + + This transform does not support PIL Image. + 'Random Erasing Data Augmentation' by Zhong et al. See https://arxiv.org/abs/1708.04896 + + Args: + p (float, optional): probability that the random erasing operation will be performed. + scale (tuple of float, optional): range of proportion of erased area against input image. + ratio (tuple of float, optional): range of aspect ratio of erased area. + value (number or tuple of numbers): erasing value. Default is 0. If a single int, it is used to + erase all pixels. If a tuple of length 3, it is used to erase + R, G, B channels respectively. + If a str of 'random', erasing each pixel with random values. + inplace (bool, optional): boolean to make this transform inplace. Default set to False. + + Returns: + Erased input. + + Example: + >>> from torchvision.transforms import v2 as transforms + >>> + >>> transform = transforms.Compose([ + >>> transforms.RandomHorizontalFlip(), + >>> transforms.PILToTensor(), + >>> transforms.ConvertImageDtype(torch.float), + >>> transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)), + >>> transforms.RandomErasing(), + >>> ]) + """ + + _v1_transform_cls = _transforms.RandomErasing + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + return dict( + super()._extract_params_for_v1_transform(), + value="random" if self.value is None else self.value, + ) + + def __init__( + self, + p: float = 0.5, + scale: Sequence[float] = (0.02, 0.33), + ratio: Sequence[float] = (0.3, 3.3), + value: float = 0.0, + inplace: bool = False, + ): + super().__init__(p=p) + if not isinstance(value, (numbers.Number, str, tuple, list)): + raise TypeError("Argument value should be either a number or str or a sequence") + if isinstance(value, str) and value != "random": + raise ValueError("If value is str, it should be 'random'") + if not isinstance(scale, Sequence): + raise TypeError("Scale should be a sequence") + if not isinstance(ratio, Sequence): + raise TypeError("Ratio should be a sequence") + if (scale[0] > scale[1]) or (ratio[0] > ratio[1]): + warnings.warn("Scale and ratio should be of kind (min, max)") + if scale[0] < 0 or scale[1] > 1: + raise ValueError("Scale should be between 0 and 1") + self.scale = scale + self.ratio = ratio + if isinstance(value, (int, float)): + self.value = [float(value)] + elif isinstance(value, str): + self.value = None + elif isinstance(value, (list, tuple)): + self.value = [float(v) for v in value] + else: + self.value = value + self.inplace = inplace + + self._log_ratio = torch.log(torch.tensor(self.ratio)) + + def _call_kernel(self, functional: Callable, inpt: Any, *args: Any, **kwargs: Any) -> Any: + if isinstance(inpt, (tv_tensors.BoundingBoxes, tv_tensors.Mask)): + warnings.warn( + f"{type(self).__name__}() is currently passing through inputs of type " + f"tv_tensors.{type(inpt).__name__}. This will likely change in the future." + ) + return super()._call_kernel(functional, inpt, *args, **kwargs) + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + img_c, img_h, img_w = query_chw(flat_inputs) + + if self.value is not None and not (len(self.value) in (1, img_c)): + raise ValueError( + f"If value is a sequence, it should have either a single value or {img_c} (number of inpt channels)" + ) + + area = img_h * img_w + + log_ratio = self._log_ratio + for _ in range(10): + erase_area = area * torch.empty(1).uniform_(self.scale[0], self.scale[1]).item() + aspect_ratio = torch.exp( + torch.empty(1).uniform_( + log_ratio[0], # type: ignore[arg-type] + log_ratio[1], # type: ignore[arg-type] + ) + ).item() + + h = int(round(math.sqrt(erase_area * aspect_ratio))) + w = int(round(math.sqrt(erase_area / aspect_ratio))) + if not (h < img_h and w < img_w): + continue + + if self.value is None: + v = torch.empty([img_c, h, w], dtype=torch.float32).normal_() + else: + v = torch.tensor(self.value)[:, None, None] + + i = torch.randint(0, img_h - h + 1, size=(1,)).item() + j = torch.randint(0, img_w - w + 1, size=(1,)).item() + break + else: + i, j, h, w, v = 0, 0, img_h, img_w, None + + return dict(i=i, j=j, h=h, w=w, v=v) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + if params["v"] is not None: + inpt = self._call_kernel(F.erase, inpt, **params, inplace=self.inplace) + + return inpt + + +class _BaseMixUpCutMix(Transform): + def __init__(self, *, alpha: float = 1.0, num_classes: Optional[int] = None, labels_getter="default") -> None: + super().__init__() + self.alpha = float(alpha) + self._dist = torch.distributions.Beta(torch.tensor([alpha]), torch.tensor([alpha])) + + self.num_classes = num_classes + + self._labels_getter = _parse_labels_getter(labels_getter) + + def forward(self, *inputs): + inputs = inputs if len(inputs) > 1 else inputs[0] + flat_inputs, spec = tree_flatten(inputs) + needs_transform_list = self._needs_transform_list(flat_inputs) + + if has_any(flat_inputs, PIL.Image.Image, tv_tensors.BoundingBoxes, tv_tensors.Mask): + raise ValueError(f"{type(self).__name__}() does not support PIL images, bounding boxes and masks.") + + labels = self._labels_getter(inputs) + if not isinstance(labels, torch.Tensor): + raise ValueError(f"The labels must be a tensor, but got {type(labels)} instead.") + if labels.ndim not in (1, 2): + raise ValueError( + f"labels should be index based with shape (batch_size,) " + f"or probability based with shape (batch_size, num_classes), " + f"but got a tensor of shape {labels.shape} instead." + ) + if labels.ndim == 2 and self.num_classes is not None and labels.shape[-1] != self.num_classes: + raise ValueError( + f"When passing 2D labels, " + f"the number of elements in last dimension must match num_classes: " + f"{labels.shape[-1]} != {self.num_classes}. " + f"You can Leave num_classes to None." + ) + if labels.ndim == 1 and self.num_classes is None: + raise ValueError("num_classes must be passed if the labels are index-based (1D)") + + params = { + "labels": labels, + "batch_size": labels.shape[0], + **self.make_params( + [inpt for (inpt, needs_transform) in zip(flat_inputs, needs_transform_list) if needs_transform] + ), + } + + # By default, the labels will be False inside needs_transform_list, since they are a torch.Tensor coming + # after an image or video. However, we need to handle them in _transform, so we make sure to set them to True + needs_transform_list[next(idx for idx, inpt in enumerate(flat_inputs) if inpt is labels)] = True + flat_outputs = [ + self.transform(inpt, params) if needs_transform else inpt + for (inpt, needs_transform) in zip(flat_inputs, needs_transform_list) + ] + + return tree_unflatten(flat_outputs, spec) + + def _check_image_or_video(self, inpt: torch.Tensor, *, batch_size: int): + expected_num_dims = 5 if isinstance(inpt, tv_tensors.Video) else 4 + if inpt.ndim != expected_num_dims: + raise ValueError( + f"Expected a batched input with {expected_num_dims} dims, but got {inpt.ndim} dimensions instead." + ) + if inpt.shape[0] != batch_size: + raise ValueError( + f"The batch size of the image or video does not match the batch size of the labels: " + f"{inpt.shape[0]} != {batch_size}." + ) + + def _mixup_label(self, label: torch.Tensor, *, lam: float) -> torch.Tensor: + if label.ndim == 1: + label = one_hot(label, num_classes=self.num_classes) # type: ignore[arg-type] + if not label.dtype.is_floating_point: + label = label.float() + return label.roll(1, 0).mul_(1.0 - lam).add_(label.mul(lam)) + + +class MixUp(_BaseMixUpCutMix): + """Apply MixUp to the provided batch of images and labels. + + Paper: `mixup: Beyond Empirical Risk Minimization `_. + + .. note:: + This transform is meant to be used on **batches** of samples, not + individual images. See + :ref:`sphx_glr_auto_examples_transforms_plot_cutmix_mixup.py` for detailed usage + examples. + The sample pairing is deterministic and done by matching consecutive + samples in the batch, so the batch needs to be shuffled (this is an + implementation detail, not a guaranteed convention.) + + In the input, the labels are expected to be a tensor of shape ``(batch_size,)``. They will be transformed + into a tensor of shape ``(batch_size, num_classes)``. + + Args: + alpha (float, optional): hyperparameter of the Beta distribution used for mixup. Default is 1. + num_classes (int, optional): number of classes in the batch. Used for one-hot-encoding. + Can be None only if the labels are already one-hot-encoded. + labels_getter (callable or "default", optional): indicates how to identify the labels in the input. + By default, this will pick the second parameter as the labels if it's a tensor. This covers the most + common scenario where this transform is called as ``MixUp()(imgs_batch, labels_batch)``. + It can also be a callable that takes the same input as the transform, and returns the labels. + """ + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + return dict(lam=float(self._dist.sample(()))) # type: ignore[arg-type] + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + lam = params["lam"] + + if inpt is params["labels"]: + return self._mixup_label(inpt, lam=lam) + elif isinstance(inpt, (tv_tensors.Image, tv_tensors.Video)) or is_pure_tensor(inpt): + self._check_image_or_video(inpt, batch_size=params["batch_size"]) + + output = inpt.roll(1, 0).mul_(1.0 - lam).add_(inpt.mul(lam)) + + if isinstance(inpt, (tv_tensors.Image, tv_tensors.Video)): + output = tv_tensors.wrap(output, like=inpt) + + return output + else: + return inpt + + +class CutMix(_BaseMixUpCutMix): + """Apply CutMix to the provided batch of images and labels. + + Paper: `CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features + `_. + + .. note:: + This transform is meant to be used on **batches** of samples, not + individual images. See + :ref:`sphx_glr_auto_examples_transforms_plot_cutmix_mixup.py` for detailed usage + examples. + The sample pairing is deterministic and done by matching consecutive + samples in the batch, so the batch needs to be shuffled (this is an + implementation detail, not a guaranteed convention.) + + In the input, the labels are expected to be a tensor of shape ``(batch_size,)``. They will be transformed + into a tensor of shape ``(batch_size, num_classes)``. + + Args: + alpha (float, optional): hyperparameter of the Beta distribution used for mixup. Default is 1. + num_classes (int, optional): number of classes in the batch. Used for one-hot-encoding. + Can be None only if the labels are already one-hot-encoded. + labels_getter (callable or "default", optional): indicates how to identify the labels in the input. + By default, this will pick the second parameter as the labels if it's a tensor. This covers the most + common scenario where this transform is called as ``CutMix()(imgs_batch, labels_batch)``. + It can also be a callable that takes the same input as the transform, and returns the labels. + """ + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + lam = float(self._dist.sample(())) # type: ignore[arg-type] + + H, W = query_size(flat_inputs) + + r_x = torch.randint(W, size=(1,)) + r_y = torch.randint(H, size=(1,)) + + r = 0.5 * math.sqrt(1.0 - lam) + r_w_half = int(r * W) + r_h_half = int(r * H) + + x1 = int(torch.clamp(r_x - r_w_half, min=0)) + y1 = int(torch.clamp(r_y - r_h_half, min=0)) + x2 = int(torch.clamp(r_x + r_w_half, max=W)) + y2 = int(torch.clamp(r_y + r_h_half, max=H)) + box = (x1, y1, x2, y2) + + lam_adjusted = float(1.0 - (x2 - x1) * (y2 - y1) / (W * H)) + + return dict(box=box, lam_adjusted=lam_adjusted) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + if inpt is params["labels"]: + return self._mixup_label(inpt, lam=params["lam_adjusted"]) + elif isinstance(inpt, (tv_tensors.Image, tv_tensors.Video)) or is_pure_tensor(inpt): + self._check_image_or_video(inpt, batch_size=params["batch_size"]) + + x1, y1, x2, y2 = params["box"] + rolled = inpt.roll(1, 0) + output = inpt.clone() + output[..., y1:y2, x1:x2] = rolled[..., y1:y2, x1:x2] + + if isinstance(inpt, (tv_tensors.Image, tv_tensors.Video)): + output = tv_tensors.wrap(output, like=inpt) + + return output + else: + return inpt + + +class JPEG(Transform): + """Apply JPEG compression and decompression to the given images. + + If the input is a :class:`torch.Tensor`, it is expected + to be of dtype uint8, on CPU, and have [..., 3 or 1, H, W] shape, + where ... means an arbitrary number of leading dimensions. + + Args: + quality (sequence or number): JPEG quality, from 1 to 100. Lower means more compression. + If quality is a sequence like (min, max), it specifies the range of JPEG quality to + randomly select from (inclusive of both ends). + + Returns: + image with JPEG compression. + """ + + def __init__(self, quality: Union[int, Sequence[int]]): + super().__init__() + if isinstance(quality, int): + quality = [quality, quality] + else: + _check_sequence_input(quality, "quality", req_sizes=(2,)) + + if not (1 <= quality[0] <= quality[1] <= 100 and isinstance(quality[0], int) and isinstance(quality[1], int)): + raise ValueError(f"quality must be an integer from 1 to 100, got {quality =}") + + self.quality = quality + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + quality = torch.randint(self.quality[0], self.quality[1] + 1, ()).item() + return dict(quality=quality) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.jpeg, inpt, quality=params["quality"]) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_auto_augment.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_auto_augment.py new file mode 100644 index 0000000000000000000000000000000000000000..fe050d1885995602ad51e9a476b571cf5f8f845b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_auto_augment.py @@ -0,0 +1,627 @@ +import math +from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Type, Union + +import PIL.Image +import torch + +from torch.utils._pytree import tree_flatten, tree_unflatten, TreeSpec +from torchvision import transforms as _transforms, tv_tensors +from torchvision.transforms import _functional_tensor as _FT +from torchvision.transforms.v2 import AutoAugmentPolicy, functional as F, InterpolationMode, Transform +from torchvision.transforms.v2.functional._geometry import _check_interpolation +from torchvision.transforms.v2.functional._meta import get_size +from torchvision.transforms.v2.functional._utils import _FillType, _FillTypeJIT + +from ._utils import _get_fill, _setup_fill_arg, check_type, is_pure_tensor + + +ImageOrVideo = Union[torch.Tensor, PIL.Image.Image, tv_tensors.Image, tv_tensors.Video] + + +class _AutoAugmentBase(Transform): + def __init__( + self, + *, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = None, + ) -> None: + super().__init__() + self.interpolation = _check_interpolation(interpolation) + self.fill = fill + self._fill = _setup_fill_arg(fill) + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + params = super()._extract_params_for_v1_transform() + + if isinstance(params["fill"], dict): + raise ValueError(f"{type(self).__name__}() can not be scripted for when `fill` is a dictionary.") + + return params + + def _get_random_item(self, dct: Dict[str, Tuple[Callable, bool]]) -> Tuple[str, Tuple[Callable, bool]]: + keys = tuple(dct.keys()) + key = keys[int(torch.randint(len(keys), ()))] + return key, dct[key] + + def _flatten_and_extract_image_or_video( + self, + inputs: Any, + unsupported_types: Tuple[Type, ...] = (tv_tensors.BoundingBoxes, tv_tensors.Mask), + ) -> Tuple[Tuple[List[Any], TreeSpec, int], ImageOrVideo]: + flat_inputs, spec = tree_flatten(inputs if len(inputs) > 1 else inputs[0]) + needs_transform_list = self._needs_transform_list(flat_inputs) + + image_or_videos = [] + for idx, (inpt, needs_transform) in enumerate(zip(flat_inputs, needs_transform_list)): + if needs_transform and check_type( + inpt, + ( + tv_tensors.Image, + PIL.Image.Image, + is_pure_tensor, + tv_tensors.Video, + ), + ): + image_or_videos.append((idx, inpt)) + elif isinstance(inpt, unsupported_types): + raise TypeError(f"Inputs of type {type(inpt).__name__} are not supported by {type(self).__name__}()") + + if not image_or_videos: + raise TypeError("Found no image in the sample.") + if len(image_or_videos) > 1: + raise TypeError( + f"Auto augment transformations are only properly defined for a single image or video, " + f"but found {len(image_or_videos)}." + ) + + idx, image_or_video = image_or_videos[0] + return (flat_inputs, spec, idx), image_or_video + + def _unflatten_and_insert_image_or_video( + self, + flat_inputs_with_spec: Tuple[List[Any], TreeSpec, int], + image_or_video: ImageOrVideo, + ) -> Any: + flat_inputs, spec, idx = flat_inputs_with_spec + flat_inputs[idx] = image_or_video + return tree_unflatten(flat_inputs, spec) + + def _apply_image_or_video_transform( + self, + image: ImageOrVideo, + transform_id: str, + magnitude: float, + interpolation: Union[InterpolationMode, int], + fill: Dict[Union[Type, str], _FillTypeJIT], + ) -> ImageOrVideo: + # Note: this cast is wrong and is only here to make mypy happy (it disagrees with torchscript) + image = cast(torch.Tensor, image) + fill_ = _get_fill(fill, type(image)) + + if transform_id == "Identity": + return image + elif transform_id == "ShearX": + # magnitude should be arctan(magnitude) + # official autoaug: (1, level, 0, 0, 1, 0) + # https://github.com/tensorflow/models/blob/dd02069717128186b88afa8d857ce57d17957f03/research/autoaugment/augmentation_transforms.py#L290 + # compared to + # torchvision: (1, tan(level), 0, 0, 1, 0) + # https://github.com/pytorch/vision/blob/0c2373d0bba3499e95776e7936e207d8a1676e65/torchvision/transforms/functional.py#L976 + return F.affine( + image, + angle=0.0, + translate=[0, 0], + scale=1.0, + shear=[math.degrees(math.atan(magnitude)), 0.0], + interpolation=interpolation, + fill=fill_, + center=[0, 0], + ) + elif transform_id == "ShearY": + # magnitude should be arctan(magnitude) + # See above + return F.affine( + image, + angle=0.0, + translate=[0, 0], + scale=1.0, + shear=[0.0, math.degrees(math.atan(magnitude))], + interpolation=interpolation, + fill=fill_, + center=[0, 0], + ) + elif transform_id == "TranslateX": + return F.affine( + image, + angle=0.0, + translate=[int(magnitude), 0], + scale=1.0, + interpolation=interpolation, + shear=[0.0, 0.0], + fill=fill_, + ) + elif transform_id == "TranslateY": + return F.affine( + image, + angle=0.0, + translate=[0, int(magnitude)], + scale=1.0, + interpolation=interpolation, + shear=[0.0, 0.0], + fill=fill_, + ) + elif transform_id == "Rotate": + return F.rotate(image, angle=magnitude, interpolation=interpolation, fill=fill_) + elif transform_id == "Brightness": + return F.adjust_brightness(image, brightness_factor=1.0 + magnitude) + elif transform_id == "Color": + return F.adjust_saturation(image, saturation_factor=1.0 + magnitude) + elif transform_id == "Contrast": + return F.adjust_contrast(image, contrast_factor=1.0 + magnitude) + elif transform_id == "Sharpness": + return F.adjust_sharpness(image, sharpness_factor=1.0 + magnitude) + elif transform_id == "Posterize": + return F.posterize(image, bits=int(magnitude)) + elif transform_id == "Solarize": + bound = _FT._max_value(image.dtype) if isinstance(image, torch.Tensor) else 255.0 + return F.solarize(image, threshold=bound * magnitude) + elif transform_id == "AutoContrast": + return F.autocontrast(image) + elif transform_id == "Equalize": + return F.equalize(image) + elif transform_id == "Invert": + return F.invert(image) + else: + raise ValueError(f"No transform available for {transform_id}") + + +class AutoAugment(_AutoAugmentBase): + r"""AutoAugment data augmentation method based on + `"AutoAugment: Learning Augmentation Strategies from Data" `_. + + This transformation works on images and videos only. + + If the input is :class:`torch.Tensor`, it should be of type ``torch.uint8``, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + policy (AutoAugmentPolicy, optional): Desired policy enum defined by + :class:`torchvision.transforms.autoaugment.AutoAugmentPolicy`. Default is ``AutoAugmentPolicy.IMAGENET``. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + _v1_transform_cls = _transforms.AutoAugment + + _AUGMENTATION_SPACE = { + "ShearX": (lambda num_bins, height, width: torch.linspace(0.0, 0.3, num_bins), True), + "ShearY": (lambda num_bins, height, width: torch.linspace(0.0, 0.3, num_bins), True), + "TranslateX": ( + lambda num_bins, height, width: torch.linspace(0.0, 150.0 / 331.0 * width, num_bins), + True, + ), + "TranslateY": ( + lambda num_bins, height, width: torch.linspace(0.0, 150.0 / 331.0 * height, num_bins), + True, + ), + "Rotate": (lambda num_bins, height, width: torch.linspace(0.0, 30.0, num_bins), True), + "Brightness": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Color": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Contrast": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Sharpness": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Posterize": ( + lambda num_bins, height, width: (8 - (torch.arange(num_bins) / ((num_bins - 1) / 4))).round().int(), + False, + ), + "Solarize": (lambda num_bins, height, width: torch.linspace(1.0, 0.0, num_bins), False), + "AutoContrast": (lambda num_bins, height, width: None, False), + "Equalize": (lambda num_bins, height, width: None, False), + "Invert": (lambda num_bins, height, width: None, False), + } + + def __init__( + self, + policy: AutoAugmentPolicy = AutoAugmentPolicy.IMAGENET, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = None, + ) -> None: + super().__init__(interpolation=interpolation, fill=fill) + self.policy = policy + self._policies = self._get_policies(policy) + + def _get_policies( + self, policy: AutoAugmentPolicy + ) -> List[Tuple[Tuple[str, float, Optional[int]], Tuple[str, float, Optional[int]]]]: + if policy == AutoAugmentPolicy.IMAGENET: + return [ + (("Posterize", 0.4, 8), ("Rotate", 0.6, 9)), + (("Solarize", 0.6, 5), ("AutoContrast", 0.6, None)), + (("Equalize", 0.8, None), ("Equalize", 0.6, None)), + (("Posterize", 0.6, 7), ("Posterize", 0.6, 6)), + (("Equalize", 0.4, None), ("Solarize", 0.2, 4)), + (("Equalize", 0.4, None), ("Rotate", 0.8, 8)), + (("Solarize", 0.6, 3), ("Equalize", 0.6, None)), + (("Posterize", 0.8, 5), ("Equalize", 1.0, None)), + (("Rotate", 0.2, 3), ("Solarize", 0.6, 8)), + (("Equalize", 0.6, None), ("Posterize", 0.4, 6)), + (("Rotate", 0.8, 8), ("Color", 0.4, 0)), + (("Rotate", 0.4, 9), ("Equalize", 0.6, None)), + (("Equalize", 0.0, None), ("Equalize", 0.8, None)), + (("Invert", 0.6, None), ("Equalize", 1.0, None)), + (("Color", 0.6, 4), ("Contrast", 1.0, 8)), + (("Rotate", 0.8, 8), ("Color", 1.0, 2)), + (("Color", 0.8, 8), ("Solarize", 0.8, 7)), + (("Sharpness", 0.4, 7), ("Invert", 0.6, None)), + (("ShearX", 0.6, 5), ("Equalize", 1.0, None)), + (("Color", 0.4, 0), ("Equalize", 0.6, None)), + (("Equalize", 0.4, None), ("Solarize", 0.2, 4)), + (("Solarize", 0.6, 5), ("AutoContrast", 0.6, None)), + (("Invert", 0.6, None), ("Equalize", 1.0, None)), + (("Color", 0.6, 4), ("Contrast", 1.0, 8)), + (("Equalize", 0.8, None), ("Equalize", 0.6, None)), + ] + elif policy == AutoAugmentPolicy.CIFAR10: + return [ + (("Invert", 0.1, None), ("Contrast", 0.2, 6)), + (("Rotate", 0.7, 2), ("TranslateX", 0.3, 9)), + (("Sharpness", 0.8, 1), ("Sharpness", 0.9, 3)), + (("ShearY", 0.5, 8), ("TranslateY", 0.7, 9)), + (("AutoContrast", 0.5, None), ("Equalize", 0.9, None)), + (("ShearY", 0.2, 7), ("Posterize", 0.3, 7)), + (("Color", 0.4, 3), ("Brightness", 0.6, 7)), + (("Sharpness", 0.3, 9), ("Brightness", 0.7, 9)), + (("Equalize", 0.6, None), ("Equalize", 0.5, None)), + (("Contrast", 0.6, 7), ("Sharpness", 0.6, 5)), + (("Color", 0.7, 7), ("TranslateX", 0.5, 8)), + (("Equalize", 0.3, None), ("AutoContrast", 0.4, None)), + (("TranslateY", 0.4, 3), ("Sharpness", 0.2, 6)), + (("Brightness", 0.9, 6), ("Color", 0.2, 8)), + (("Solarize", 0.5, 2), ("Invert", 0.0, None)), + (("Equalize", 0.2, None), ("AutoContrast", 0.6, None)), + (("Equalize", 0.2, None), ("Equalize", 0.6, None)), + (("Color", 0.9, 9), ("Equalize", 0.6, None)), + (("AutoContrast", 0.8, None), ("Solarize", 0.2, 8)), + (("Brightness", 0.1, 3), ("Color", 0.7, 0)), + (("Solarize", 0.4, 5), ("AutoContrast", 0.9, None)), + (("TranslateY", 0.9, 9), ("TranslateY", 0.7, 9)), + (("AutoContrast", 0.9, None), ("Solarize", 0.8, 3)), + (("Equalize", 0.8, None), ("Invert", 0.1, None)), + (("TranslateY", 0.7, 9), ("AutoContrast", 0.9, None)), + ] + elif policy == AutoAugmentPolicy.SVHN: + return [ + (("ShearX", 0.9, 4), ("Invert", 0.2, None)), + (("ShearY", 0.9, 8), ("Invert", 0.7, None)), + (("Equalize", 0.6, None), ("Solarize", 0.6, 6)), + (("Invert", 0.9, None), ("Equalize", 0.6, None)), + (("Equalize", 0.6, None), ("Rotate", 0.9, 3)), + (("ShearX", 0.9, 4), ("AutoContrast", 0.8, None)), + (("ShearY", 0.9, 8), ("Invert", 0.4, None)), + (("ShearY", 0.9, 5), ("Solarize", 0.2, 6)), + (("Invert", 0.9, None), ("AutoContrast", 0.8, None)), + (("Equalize", 0.6, None), ("Rotate", 0.9, 3)), + (("ShearX", 0.9, 4), ("Solarize", 0.3, 3)), + (("ShearY", 0.8, 8), ("Invert", 0.7, None)), + (("Equalize", 0.9, None), ("TranslateY", 0.6, 6)), + (("Invert", 0.9, None), ("Equalize", 0.6, None)), + (("Contrast", 0.3, 3), ("Rotate", 0.8, 4)), + (("Invert", 0.8, None), ("TranslateY", 0.0, 2)), + (("ShearY", 0.7, 6), ("Solarize", 0.4, 8)), + (("Invert", 0.6, None), ("Rotate", 0.8, 4)), + (("ShearY", 0.3, 7), ("TranslateX", 0.9, 3)), + (("ShearX", 0.1, 6), ("Invert", 0.6, None)), + (("Solarize", 0.7, 2), ("TranslateY", 0.6, 7)), + (("ShearY", 0.8, 4), ("Invert", 0.8, None)), + (("ShearX", 0.7, 9), ("TranslateY", 0.8, 3)), + (("ShearY", 0.8, 5), ("AutoContrast", 0.7, None)), + (("ShearX", 0.7, 2), ("Invert", 0.1, None)), + ] + else: + raise ValueError(f"The provided policy {policy} is not recognized.") + + def forward(self, *inputs: Any) -> Any: + flat_inputs_with_spec, image_or_video = self._flatten_and_extract_image_or_video(inputs) + height, width = get_size(image_or_video) # type: ignore[arg-type] + + policy = self._policies[int(torch.randint(len(self._policies), ()))] + + for transform_id, probability, magnitude_idx in policy: + if not torch.rand(()) <= probability: + continue + + magnitudes_fn, signed = self._AUGMENTATION_SPACE[transform_id] + + magnitudes = magnitudes_fn(10, height, width) + if magnitudes is not None: + magnitude = float(magnitudes[magnitude_idx]) + if signed and torch.rand(()) <= 0.5: + magnitude *= -1 + else: + magnitude = 0.0 + + image_or_video = self._apply_image_or_video_transform( + image_or_video, transform_id, magnitude, interpolation=self.interpolation, fill=self._fill + ) + + return self._unflatten_and_insert_image_or_video(flat_inputs_with_spec, image_or_video) + + +class RandAugment(_AutoAugmentBase): + r"""RandAugment data augmentation method based on + `"RandAugment: Practical automated data augmentation with a reduced search space" + `_. + + This transformation works on images and videos only. + + If the input is :class:`torch.Tensor`, it should be of type ``torch.uint8``, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + num_ops (int, optional): Number of augmentation transformations to apply sequentially. + magnitude (int, optional): Magnitude for all the transformations. + num_magnitude_bins (int, optional): The number of different magnitude values. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + _v1_transform_cls = _transforms.RandAugment + _AUGMENTATION_SPACE = { + "Identity": (lambda num_bins, height, width: None, False), + "ShearX": (lambda num_bins, height, width: torch.linspace(0.0, 0.3, num_bins), True), + "ShearY": (lambda num_bins, height, width: torch.linspace(0.0, 0.3, num_bins), True), + "TranslateX": ( + lambda num_bins, height, width: torch.linspace(0.0, 150.0 / 331.0 * width, num_bins), + True, + ), + "TranslateY": ( + lambda num_bins, height, width: torch.linspace(0.0, 150.0 / 331.0 * height, num_bins), + True, + ), + "Rotate": (lambda num_bins, height, width: torch.linspace(0.0, 30.0, num_bins), True), + "Brightness": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Color": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Contrast": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Sharpness": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Posterize": ( + lambda num_bins, height, width: (8 - (torch.arange(num_bins) / ((num_bins - 1) / 4))).round().int(), + False, + ), + "Solarize": (lambda num_bins, height, width: torch.linspace(1.0, 0.0, num_bins), False), + "AutoContrast": (lambda num_bins, height, width: None, False), + "Equalize": (lambda num_bins, height, width: None, False), + } + + def __init__( + self, + num_ops: int = 2, + magnitude: int = 9, + num_magnitude_bins: int = 31, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = None, + ) -> None: + super().__init__(interpolation=interpolation, fill=fill) + self.num_ops = num_ops + self.magnitude = magnitude + self.num_magnitude_bins = num_magnitude_bins + + def forward(self, *inputs: Any) -> Any: + flat_inputs_with_spec, image_or_video = self._flatten_and_extract_image_or_video(inputs) + height, width = get_size(image_or_video) # type: ignore[arg-type] + + for _ in range(self.num_ops): + transform_id, (magnitudes_fn, signed) = self._get_random_item(self._AUGMENTATION_SPACE) + magnitudes = magnitudes_fn(self.num_magnitude_bins, height, width) + if magnitudes is not None: + magnitude = float(magnitudes[self.magnitude]) + if signed and torch.rand(()) <= 0.5: + magnitude *= -1 + else: + magnitude = 0.0 + image_or_video = self._apply_image_or_video_transform( + image_or_video, transform_id, magnitude, interpolation=self.interpolation, fill=self._fill + ) + + return self._unflatten_and_insert_image_or_video(flat_inputs_with_spec, image_or_video) + + +class TrivialAugmentWide(_AutoAugmentBase): + r"""Dataset-independent data-augmentation with TrivialAugment Wide, as described in + `"TrivialAugment: Tuning-free Yet State-of-the-Art Data Augmentation" `_. + + This transformation works on images and videos only. + + If the input is :class:`torch.Tensor`, it should be of type ``torch.uint8``, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + num_magnitude_bins (int, optional): The number of different magnitude values. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + _v1_transform_cls = _transforms.TrivialAugmentWide + _AUGMENTATION_SPACE = { + "Identity": (lambda num_bins, height, width: None, False), + "ShearX": (lambda num_bins, height, width: torch.linspace(0.0, 0.99, num_bins), True), + "ShearY": (lambda num_bins, height, width: torch.linspace(0.0, 0.99, num_bins), True), + "TranslateX": (lambda num_bins, height, width: torch.linspace(0.0, 32.0, num_bins), True), + "TranslateY": (lambda num_bins, height, width: torch.linspace(0.0, 32.0, num_bins), True), + "Rotate": (lambda num_bins, height, width: torch.linspace(0.0, 135.0, num_bins), True), + "Brightness": (lambda num_bins, height, width: torch.linspace(0.0, 0.99, num_bins), True), + "Color": (lambda num_bins, height, width: torch.linspace(0.0, 0.99, num_bins), True), + "Contrast": (lambda num_bins, height, width: torch.linspace(0.0, 0.99, num_bins), True), + "Sharpness": (lambda num_bins, height, width: torch.linspace(0.0, 0.99, num_bins), True), + "Posterize": ( + lambda num_bins, height, width: (8 - (torch.arange(num_bins) / ((num_bins - 1) / 6))).round().int(), + False, + ), + "Solarize": (lambda num_bins, height, width: torch.linspace(1.0, 0.0, num_bins), False), + "AutoContrast": (lambda num_bins, height, width: None, False), + "Equalize": (lambda num_bins, height, width: None, False), + } + + def __init__( + self, + num_magnitude_bins: int = 31, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = None, + ): + super().__init__(interpolation=interpolation, fill=fill) + self.num_magnitude_bins = num_magnitude_bins + + def forward(self, *inputs: Any) -> Any: + flat_inputs_with_spec, image_or_video = self._flatten_and_extract_image_or_video(inputs) + height, width = get_size(image_or_video) # type: ignore[arg-type] + + transform_id, (magnitudes_fn, signed) = self._get_random_item(self._AUGMENTATION_SPACE) + + magnitudes = magnitudes_fn(self.num_magnitude_bins, height, width) + if magnitudes is not None: + magnitude = float(magnitudes[int(torch.randint(self.num_magnitude_bins, ()))]) + if signed and torch.rand(()) <= 0.5: + magnitude *= -1 + else: + magnitude = 0.0 + + image_or_video = self._apply_image_or_video_transform( + image_or_video, transform_id, magnitude, interpolation=self.interpolation, fill=self._fill + ) + return self._unflatten_and_insert_image_or_video(flat_inputs_with_spec, image_or_video) + + +class AugMix(_AutoAugmentBase): + r"""AugMix data augmentation method based on + `"AugMix: A Simple Data Processing Method to Improve Robustness and Uncertainty" `_. + + This transformation works on images and videos only. + + If the input is :class:`torch.Tensor`, it should be of type ``torch.uint8``, and it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + severity (int, optional): The severity of base augmentation operators. Default is ``3``. + mixture_width (int, optional): The number of augmentation chains. Default is ``3``. + chain_depth (int, optional): The depth of augmentation chains. A negative value denotes stochastic depth sampled from the interval [1, 3]. + Default is ``-1``. + alpha (float, optional): The hyperparameter for the probability distributions. Default is ``1.0``. + all_ops (bool, optional): Use all operations (including brightness, contrast, color and sharpness). Default is ``True``. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + fill (sequence or number, optional): Pixel fill value for the area outside the transformed + image. If given a number, the value is used for all bands respectively. + """ + + _v1_transform_cls = _transforms.AugMix + + _PARTIAL_AUGMENTATION_SPACE = { + "ShearX": (lambda num_bins, height, width: torch.linspace(0.0, 0.3, num_bins), True), + "ShearY": (lambda num_bins, height, width: torch.linspace(0.0, 0.3, num_bins), True), + "TranslateX": (lambda num_bins, height, width: torch.linspace(0.0, width / 3.0, num_bins), True), + "TranslateY": (lambda num_bins, height, width: torch.linspace(0.0, height / 3.0, num_bins), True), + "Rotate": (lambda num_bins, height, width: torch.linspace(0.0, 30.0, num_bins), True), + "Posterize": ( + lambda num_bins, height, width: (4 - (torch.arange(num_bins) / ((num_bins - 1) / 4))).round().int(), + False, + ), + "Solarize": (lambda num_bins, height, width: torch.linspace(1.0, 0.0, num_bins), False), + "AutoContrast": (lambda num_bins, height, width: None, False), + "Equalize": (lambda num_bins, height, width: None, False), + } + _AUGMENTATION_SPACE: Dict[str, Tuple[Callable[[int, int, int], Optional[torch.Tensor]], bool]] = { + **_PARTIAL_AUGMENTATION_SPACE, + "Brightness": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Color": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Contrast": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + "Sharpness": (lambda num_bins, height, width: torch.linspace(0.0, 0.9, num_bins), True), + } + + def __init__( + self, + severity: int = 3, + mixture_width: int = 3, + chain_depth: int = -1, + alpha: float = 1.0, + all_ops: bool = True, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = None, + ) -> None: + super().__init__(interpolation=interpolation, fill=fill) + self._PARAMETER_MAX = 10 + if not (1 <= severity <= self._PARAMETER_MAX): + raise ValueError(f"The severity must be between [1, {self._PARAMETER_MAX}]. Got {severity} instead.") + self.severity = severity + self.mixture_width = mixture_width + self.chain_depth = chain_depth + self.alpha = alpha + self.all_ops = all_ops + + def _sample_dirichlet(self, params: torch.Tensor) -> torch.Tensor: + # Must be on a separate method so that we can overwrite it in tests. + return torch._sample_dirichlet(params) + + def forward(self, *inputs: Any) -> Any: + flat_inputs_with_spec, orig_image_or_video = self._flatten_and_extract_image_or_video(inputs) + height, width = get_size(orig_image_or_video) # type: ignore[arg-type] + + if isinstance(orig_image_or_video, torch.Tensor): + image_or_video = orig_image_or_video + else: # isinstance(inpt, PIL.Image.Image): + image_or_video = F.pil_to_tensor(orig_image_or_video) + + augmentation_space = self._AUGMENTATION_SPACE if self.all_ops else self._PARTIAL_AUGMENTATION_SPACE + + orig_dims = list(image_or_video.shape) + expected_ndim = 5 if isinstance(orig_image_or_video, tv_tensors.Video) else 4 + batch = image_or_video.reshape([1] * max(expected_ndim - image_or_video.ndim, 0) + orig_dims) + batch_dims = [batch.size(0)] + [1] * (batch.ndim - 1) + + # Sample the beta weights for combining the original and augmented image or video. To get Beta, we use a + # Dirichlet with 2 parameters. The 1st column stores the weights of the original and the 2nd the ones of + # augmented image or video. + m = self._sample_dirichlet( + torch.tensor([self.alpha, self.alpha], device=batch.device).expand(batch_dims[0], -1) + ) + + # Sample the mixing weights and combine them with the ones sampled from Beta for the augmented images or videos. + combined_weights = self._sample_dirichlet( + torch.tensor([self.alpha] * self.mixture_width, device=batch.device).expand(batch_dims[0], -1) + ) * m[:, 1].reshape([batch_dims[0], -1]) + + mix = m[:, 0].reshape(batch_dims) * batch + for i in range(self.mixture_width): + aug = batch + depth = self.chain_depth if self.chain_depth > 0 else int(torch.randint(low=1, high=4, size=(1,)).item()) + for _ in range(depth): + transform_id, (magnitudes_fn, signed) = self._get_random_item(augmentation_space) + + magnitudes = magnitudes_fn(self._PARAMETER_MAX, height, width) + if magnitudes is not None: + magnitude = float(magnitudes[int(torch.randint(self.severity, ()))]) + if signed and torch.rand(()) <= 0.5: + magnitude *= -1 + else: + magnitude = 0.0 + + aug = self._apply_image_or_video_transform(aug, transform_id, magnitude, interpolation=self.interpolation, fill=self._fill) # type: ignore[assignment] + mix.add_(combined_weights[:, i].reshape(batch_dims) * aug) + mix = mix.reshape(orig_dims).to(dtype=image_or_video.dtype) + + if isinstance(orig_image_or_video, (tv_tensors.Image, tv_tensors.Video)): + mix = tv_tensors.wrap(mix, like=orig_image_or_video) + elif isinstance(orig_image_or_video, PIL.Image.Image): + mix = F.to_pil_image(mix) + + return self._unflatten_and_insert_image_or_video(flat_inputs_with_spec, mix) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_color.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_color.py new file mode 100644 index 0000000000000000000000000000000000000000..dccf8454db5434f3219bc49b9f546f90f88d2109 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_color.py @@ -0,0 +1,376 @@ +import collections.abc +from typing import Any, Dict, List, Optional, Sequence, Tuple, Union + +import torch +from torchvision import transforms as _transforms +from torchvision.transforms.v2 import functional as F, Transform + +from ._transform import _RandomApplyTransform +from ._utils import query_chw + + +class Grayscale(Transform): + """Convert images or videos to grayscale. + + If the input is a :class:`torch.Tensor`, it is expected + to have [..., 3 or 1, H, W] shape, where ... means an arbitrary number of leading dimensions + + Args: + num_output_channels (int): (1 or 3) number of channels desired for output image + """ + + _v1_transform_cls = _transforms.Grayscale + + def __init__(self, num_output_channels: int = 1): + super().__init__() + self.num_output_channels = num_output_channels + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.rgb_to_grayscale, inpt, num_output_channels=self.num_output_channels) + + +class RandomGrayscale(_RandomApplyTransform): + """Randomly convert image or videos to grayscale with a probability of p (default 0.1). + + If the input is a :class:`torch.Tensor`, it is expected to have [..., 3 or 1, H, W] shape, + where ... means an arbitrary number of leading dimensions + + The output has the same number of channels as the input. + + Args: + p (float): probability that image should be converted to grayscale. + """ + + _v1_transform_cls = _transforms.RandomGrayscale + + def __init__(self, p: float = 0.1) -> None: + super().__init__(p=p) + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + num_input_channels, *_ = query_chw(flat_inputs) + return dict(num_input_channels=num_input_channels) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.rgb_to_grayscale, inpt, num_output_channels=params["num_input_channels"]) + + +class RGB(Transform): + """Convert images or videos to RGB (if they are already not RGB). + + If the input is a :class:`torch.Tensor`, it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions + """ + + def __init__(self): + super().__init__() + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.grayscale_to_rgb, inpt) + + +class ColorJitter(Transform): + """Randomly change the brightness, contrast, saturation and hue of an image or video. + + If the input is a :class:`torch.Tensor`, it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, mode "1", "I", "F" and modes with transparency (alpha channel) are not supported. + + Args: + brightness (float or tuple of float (min, max)): How much to jitter brightness. + brightness_factor is chosen uniformly from [max(0, 1 - brightness), 1 + brightness] + or the given [min, max]. Should be non negative numbers. + contrast (float or tuple of float (min, max)): How much to jitter contrast. + contrast_factor is chosen uniformly from [max(0, 1 - contrast), 1 + contrast] + or the given [min, max]. Should be non-negative numbers. + saturation (float or tuple of float (min, max)): How much to jitter saturation. + saturation_factor is chosen uniformly from [max(0, 1 - saturation), 1 + saturation] + or the given [min, max]. Should be non negative numbers. + hue (float or tuple of float (min, max)): How much to jitter hue. + hue_factor is chosen uniformly from [-hue, hue] or the given [min, max]. + Should have 0<= hue <= 0.5 or -0.5 <= min <= max <= 0.5. + To jitter hue, the pixel values of the input image has to be non-negative for conversion to HSV space; + thus it does not work if you normalize your image to an interval with negative values, + or use an interpolation that generates negative values before using this function. + """ + + _v1_transform_cls = _transforms.ColorJitter + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + return {attr: value or 0 for attr, value in super()._extract_params_for_v1_transform().items()} + + def __init__( + self, + brightness: Optional[Union[float, Sequence[float]]] = None, + contrast: Optional[Union[float, Sequence[float]]] = None, + saturation: Optional[Union[float, Sequence[float]]] = None, + hue: Optional[Union[float, Sequence[float]]] = None, + ) -> None: + super().__init__() + self.brightness = self._check_input(brightness, "brightness") + self.contrast = self._check_input(contrast, "contrast") + self.saturation = self._check_input(saturation, "saturation") + self.hue = self._check_input(hue, "hue", center=0, bound=(-0.5, 0.5), clip_first_on_zero=False) + + def _check_input( + self, + value: Optional[Union[float, Sequence[float]]], + name: str, + center: float = 1.0, + bound: Tuple[float, float] = (0, float("inf")), + clip_first_on_zero: bool = True, + ) -> Optional[Tuple[float, float]]: + if value is None: + return None + + if isinstance(value, (int, float)): + if value < 0: + raise ValueError(f"If {name} is a single number, it must be non negative.") + value = [center - value, center + value] + if clip_first_on_zero: + value[0] = max(value[0], 0.0) + elif isinstance(value, collections.abc.Sequence) and len(value) == 2: + value = [float(v) for v in value] + else: + raise TypeError(f"{name}={value} should be a single number or a sequence with length 2.") + + if not bound[0] <= value[0] <= value[1] <= bound[1]: + raise ValueError(f"{name} values should be between {bound}, but got {value}.") + + return None if value[0] == value[1] == center else (float(value[0]), float(value[1])) + + @staticmethod + def _generate_value(left: float, right: float) -> float: + return torch.empty(1).uniform_(left, right).item() + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + fn_idx = torch.randperm(4) + + b = None if self.brightness is None else self._generate_value(self.brightness[0], self.brightness[1]) + c = None if self.contrast is None else self._generate_value(self.contrast[0], self.contrast[1]) + s = None if self.saturation is None else self._generate_value(self.saturation[0], self.saturation[1]) + h = None if self.hue is None else self._generate_value(self.hue[0], self.hue[1]) + + return dict(fn_idx=fn_idx, brightness_factor=b, contrast_factor=c, saturation_factor=s, hue_factor=h) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + output = inpt + brightness_factor = params["brightness_factor"] + contrast_factor = params["contrast_factor"] + saturation_factor = params["saturation_factor"] + hue_factor = params["hue_factor"] + for fn_id in params["fn_idx"]: + if fn_id == 0 and brightness_factor is not None: + output = self._call_kernel(F.adjust_brightness, output, brightness_factor=brightness_factor) + elif fn_id == 1 and contrast_factor is not None: + output = self._call_kernel(F.adjust_contrast, output, contrast_factor=contrast_factor) + elif fn_id == 2 and saturation_factor is not None: + output = self._call_kernel(F.adjust_saturation, output, saturation_factor=saturation_factor) + elif fn_id == 3 and hue_factor is not None: + output = self._call_kernel(F.adjust_hue, output, hue_factor=hue_factor) + return output + + +class RandomChannelPermutation(Transform): + """Randomly permute the channels of an image or video""" + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + num_channels, *_ = query_chw(flat_inputs) + return dict(permutation=torch.randperm(num_channels)) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.permute_channels, inpt, params["permutation"]) + + +class RandomPhotometricDistort(Transform): + """Randomly distorts the image or video as used in `SSD: Single Shot + MultiBox Detector `_. + + This transform relies on :class:`~torchvision.transforms.v2.ColorJitter` + under the hood to adjust the contrast, saturation, hue, brightness, and also + randomly permutes channels. + + Args: + brightness (tuple of float (min, max), optional): How much to jitter brightness. + brightness_factor is chosen uniformly from [min, max]. Should be non negative numbers. + contrast (tuple of float (min, max), optional): How much to jitter contrast. + contrast_factor is chosen uniformly from [min, max]. Should be non-negative numbers. + saturation (tuple of float (min, max), optional): How much to jitter saturation. + saturation_factor is chosen uniformly from [min, max]. Should be non negative numbers. + hue (tuple of float (min, max), optional): How much to jitter hue. + hue_factor is chosen uniformly from [min, max]. Should have -0.5 <= min <= max <= 0.5. + To jitter hue, the pixel values of the input image has to be non-negative for conversion to HSV space; + thus it does not work if you normalize your image to an interval with negative values, + or use an interpolation that generates negative values before using this function. + p (float, optional) probability each distortion operation (contrast, saturation, ...) to be applied. + Default is 0.5. + """ + + def __init__( + self, + brightness: Tuple[float, float] = (0.875, 1.125), + contrast: Tuple[float, float] = (0.5, 1.5), + saturation: Tuple[float, float] = (0.5, 1.5), + hue: Tuple[float, float] = (-0.05, 0.05), + p: float = 0.5, + ): + super().__init__() + self.brightness = brightness + self.contrast = contrast + self.hue = hue + self.saturation = saturation + self.p = p + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + num_channels, *_ = query_chw(flat_inputs) + params: Dict[str, Any] = { + key: ColorJitter._generate_value(range[0], range[1]) if torch.rand(1) < self.p else None + for key, range in [ + ("brightness_factor", self.brightness), + ("contrast_factor", self.contrast), + ("saturation_factor", self.saturation), + ("hue_factor", self.hue), + ] + } + params["contrast_before"] = bool(torch.rand(()) < 0.5) + params["channel_permutation"] = torch.randperm(num_channels) if torch.rand(1) < self.p else None + return params + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + if params["brightness_factor"] is not None: + inpt = self._call_kernel(F.adjust_brightness, inpt, brightness_factor=params["brightness_factor"]) + if params["contrast_factor"] is not None and params["contrast_before"]: + inpt = self._call_kernel(F.adjust_contrast, inpt, contrast_factor=params["contrast_factor"]) + if params["saturation_factor"] is not None: + inpt = self._call_kernel(F.adjust_saturation, inpt, saturation_factor=params["saturation_factor"]) + if params["hue_factor"] is not None: + inpt = self._call_kernel(F.adjust_hue, inpt, hue_factor=params["hue_factor"]) + if params["contrast_factor"] is not None and not params["contrast_before"]: + inpt = self._call_kernel(F.adjust_contrast, inpt, contrast_factor=params["contrast_factor"]) + if params["channel_permutation"] is not None: + inpt = self._call_kernel(F.permute_channels, inpt, permutation=params["channel_permutation"]) + return inpt + + +class RandomEqualize(_RandomApplyTransform): + """Equalize the histogram of the given image or video with a given probability. + + If the input is a :class:`torch.Tensor`, it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "P", "L" or "RGB". + + Args: + p (float): probability of the image being equalized. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomEqualize + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.equalize, inpt) + + +class RandomInvert(_RandomApplyTransform): + """Inverts the colors of the given image or video with a given probability. + + If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + p (float): probability of the image being color inverted. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomInvert + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.invert, inpt) + + +class RandomPosterize(_RandomApplyTransform): + """Posterize the image or video with a given probability by reducing the + number of bits for each color channel. + + If the input is a :class:`torch.Tensor`, it should be of type torch.uint8, + and it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + bits (int): number of bits to keep for each channel (0-8) + p (float): probability of the image being posterized. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomPosterize + + def __init__(self, bits: int, p: float = 0.5) -> None: + super().__init__(p=p) + self.bits = bits + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.posterize, inpt, bits=self.bits) + + +class RandomSolarize(_RandomApplyTransform): + """Solarize the image or video with a given probability by inverting all pixel + values above a threshold. + + If img is a Tensor, it is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + threshold (float): all pixels equal or above this value are inverted. + p (float): probability of the image being solarized. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomSolarize + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + params = super()._extract_params_for_v1_transform() + params["threshold"] = float(params["threshold"]) + return params + + def __init__(self, threshold: float, p: float = 0.5) -> None: + super().__init__(p=p) + self.threshold = threshold + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.solarize, inpt, threshold=self.threshold) + + +class RandomAutocontrast(_RandomApplyTransform): + """Autocontrast the pixels of the given image or video with a given probability. + + If the input is a :class:`torch.Tensor`, it is expected + to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + If img is PIL Image, it is expected to be in mode "L" or "RGB". + + Args: + p (float): probability of the image being autocontrasted. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomAutocontrast + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.autocontrast, inpt) + + +class RandomAdjustSharpness(_RandomApplyTransform): + """Adjust the sharpness of the image or video with a given probability. + + If the input is a :class:`torch.Tensor`, + it is expected to have [..., 1 or 3, H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + sharpness_factor (float): How much to adjust the sharpness. Can be + any non-negative number. 0 gives a blurred image, 1 gives the + original image while 2 increases the sharpness by a factor of 2. + p (float): probability of the image being sharpened. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomAdjustSharpness + + def __init__(self, sharpness_factor: float, p: float = 0.5) -> None: + super().__init__(p=p) + self.sharpness_factor = sharpness_factor + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.adjust_sharpness, inpt, sharpness_factor=self.sharpness_factor) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_container.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_container.py new file mode 100644 index 0000000000000000000000000000000000000000..310e6d645bce5834a7fc62d680916061e8521186 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_container.py @@ -0,0 +1,174 @@ +from typing import Any, Callable, Dict, List, Optional, Sequence, Union + +import torch + +from torch import nn +from torchvision import transforms as _transforms +from torchvision.transforms.v2 import Transform + + +class Compose(Transform): + """Composes several transforms together. + + This transform does not support torchscript. + Please, see the note below. + + Args: + transforms (list of ``Transform`` objects): list of transforms to compose. + + Example: + >>> transforms.Compose([ + >>> transforms.CenterCrop(10), + >>> transforms.PILToTensor(), + >>> transforms.ConvertImageDtype(torch.float), + >>> ]) + + .. note:: + In order to script the transformations, please use ``torch.nn.Sequential`` as below. + + >>> transforms = torch.nn.Sequential( + >>> transforms.CenterCrop(10), + >>> transforms.Normalize((0.485, 0.456, 0.406), (0.229, 0.224, 0.225)), + >>> ) + >>> scripted_transforms = torch.jit.script(transforms) + + Make sure to use only scriptable transformations, i.e. that work with ``torch.Tensor``, does not require + `lambda` functions or ``PIL.Image``. + + """ + + def __init__(self, transforms: Sequence[Callable]) -> None: + super().__init__() + if not isinstance(transforms, Sequence): + raise TypeError("Argument transforms should be a sequence of callables") + elif not transforms: + raise ValueError("Pass at least one transform") + self.transforms = transforms + + def forward(self, *inputs: Any) -> Any: + needs_unpacking = len(inputs) > 1 + for transform in self.transforms: + outputs = transform(*inputs) + inputs = outputs if needs_unpacking else (outputs,) + return outputs + + def extra_repr(self) -> str: + format_string = [] + for t in self.transforms: + format_string.append(f" {t}") + return "\n".join(format_string) + + +class RandomApply(Transform): + """Apply randomly a list of transformations with a given probability. + + .. note:: + In order to script the transformation, please use ``torch.nn.ModuleList`` as input instead of list/tuple of + transforms as shown below: + + >>> transforms = transforms.RandomApply(torch.nn.ModuleList([ + >>> transforms.ColorJitter(), + >>> ]), p=0.3) + >>> scripted_transforms = torch.jit.script(transforms) + + Make sure to use only scriptable transformations, i.e. that work with ``torch.Tensor``, does not require + `lambda` functions or ``PIL.Image``. + + Args: + transforms (sequence or torch.nn.Module): list of transformations + p (float): probability of applying the list of transforms + """ + + _v1_transform_cls = _transforms.RandomApply + + def __init__(self, transforms: Union[Sequence[Callable], nn.ModuleList], p: float = 0.5) -> None: + super().__init__() + + if not isinstance(transforms, (Sequence, nn.ModuleList)): + raise TypeError("Argument transforms should be a sequence of callables or a `nn.ModuleList`") + self.transforms = transforms + + if not (0.0 <= p <= 1.0): + raise ValueError("`p` should be a floating point value in the interval [0.0, 1.0].") + self.p = p + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + return {"transforms": self.transforms, "p": self.p} + + def forward(self, *inputs: Any) -> Any: + needs_unpacking = len(inputs) > 1 + + if torch.rand(1) >= self.p: + return inputs if needs_unpacking else inputs[0] + + for transform in self.transforms: + outputs = transform(*inputs) + inputs = outputs if needs_unpacking else (outputs,) + return outputs + + def extra_repr(self) -> str: + format_string = [] + for t in self.transforms: + format_string.append(f" {t}") + return "\n".join(format_string) + + +class RandomChoice(Transform): + """Apply single transformation randomly picked from a list. + + This transform does not support torchscript. + + Args: + transforms (sequence or torch.nn.Module): list of transformations + p (list of floats or None, optional): probability of each transform being picked. + If ``p`` doesn't sum to 1, it is automatically normalized. If ``None`` + (default), all transforms have the same probability. + """ + + def __init__( + self, + transforms: Sequence[Callable], + p: Optional[List[float]] = None, + ) -> None: + if not isinstance(transforms, Sequence): + raise TypeError("Argument transforms should be a sequence of callables") + + if p is None: + p = [1] * len(transforms) + elif len(p) != len(transforms): + raise ValueError(f"Length of p doesn't match the number of transforms: {len(p)} != {len(transforms)}") + + super().__init__() + + self.transforms = transforms + total = sum(p) + self.p = [prob / total for prob in p] + + def forward(self, *inputs: Any) -> Any: + idx = int(torch.multinomial(torch.tensor(self.p), 1)) + transform = self.transforms[idx] + return transform(*inputs) + + +class RandomOrder(Transform): + """Apply a list of transformations in a random order. + + This transform does not support torchscript. + + Args: + transforms (sequence or torch.nn.Module): list of transformations + """ + + def __init__(self, transforms: Sequence[Callable]) -> None: + if not isinstance(transforms, Sequence): + raise TypeError("Argument transforms should be a sequence of callables") + super().__init__() + self.transforms = transforms + + def forward(self, *inputs: Any) -> Any: + needs_unpacking = len(inputs) > 1 + for idx in torch.randperm(len(self.transforms)): + transform = self.transforms[idx] + outputs = transform(*inputs) + inputs = outputs if needs_unpacking else (outputs,) + return outputs diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_deprecated.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_deprecated.py new file mode 100644 index 0000000000000000000000000000000000000000..89562c2cb52976f636e8b0b10fd5d6e477f8dcc7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_deprecated.py @@ -0,0 +1,50 @@ +import warnings +from typing import Any, Dict, Union + +import numpy as np +import PIL.Image +import torch +from torchvision.transforms import functional as _F + +from torchvision.transforms.v2 import Transform + + +class ToTensor(Transform): + """[DEPRECATED] Use ``v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`` instead. + + Convert a PIL Image or ndarray to tensor and scale the values accordingly. + + .. warning:: + :class:`v2.ToTensor` is deprecated and will be removed in a future release. + Please use instead ``v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])``. + Output is equivalent up to float precision. + + This transform does not support torchscript. + + + Converts a PIL Image or numpy.ndarray (H x W x C) in the range + [0, 255] to a torch.FloatTensor of shape (C x H x W) in the range [0.0, 1.0] + if the PIL Image belongs to one of the modes (L, LA, P, I, F, RGB, YCbCr, RGBA, CMYK, 1) + or if the numpy.ndarray has dtype = np.uint8 + + In the other cases, tensors are returned without scaling. + + .. note:: + Because the input image is scaled to [0.0, 1.0], this transformation should not be used when + transforming target image masks. See the `references`_ for implementing the transforms for image masks. + + .. _references: https://github.com/pytorch/vision/tree/main/references/segmentation + """ + + _transformed_types = (PIL.Image.Image, np.ndarray) + + def __init__(self) -> None: + warnings.warn( + "The transform `ToTensor()` is deprecated and will be removed in a future release. " + "Instead, please use `v2.Compose([v2.ToImage(), v2.ToDtype(torch.float32, scale=True)])`." + "Output is equivalent up to float precision." + ) + super().__init__() + + def transform(self, inpt: Union[PIL.Image.Image, np.ndarray], params: Dict[str, Any]) -> torch.Tensor: + return _F.to_tensor(inpt) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_geometry.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_geometry.py new file mode 100644 index 0000000000000000000000000000000000000000..98d76970614436330914668cf8544dc969d6ac42 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_geometry.py @@ -0,0 +1,1416 @@ +import math +import numbers +import warnings +from typing import Any, Callable, Dict, List, Literal, Optional, Sequence, Tuple, Type, Union + +import PIL.Image +import torch + +from torchvision import transforms as _transforms, tv_tensors +from torchvision.ops.boxes import box_iou +from torchvision.transforms.functional import _get_perspective_coeffs +from torchvision.transforms.v2 import functional as F, InterpolationMode, Transform +from torchvision.transforms.v2.functional._utils import _FillType + +from ._transform import _RandomApplyTransform +from ._utils import ( + _check_padding_arg, + _check_padding_mode_arg, + _check_sequence_input, + _get_fill, + _setup_angle, + _setup_fill_arg, + _setup_number_or_seq, + _setup_size, + get_bounding_boxes, + has_all, + has_any, + is_pure_tensor, + query_size, +) + + +class RandomHorizontalFlip(_RandomApplyTransform): + """Horizontally flip the input with a given probability. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + p (float, optional): probability of the input being flipped. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomHorizontalFlip + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.horizontal_flip, inpt) + + +class RandomVerticalFlip(_RandomApplyTransform): + """Vertically flip the input with a given probability. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + p (float, optional): probability of the input being flipped. Default value is 0.5 + """ + + _v1_transform_cls = _transforms.RandomVerticalFlip + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.vertical_flip, inpt) + + +class Resize(Transform): + """Resize the input to the given size. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + size (sequence, int, or None): Desired + output size. + + - If size is a sequence like (h, w), output size will be matched to this. + - If size is an int, smaller edge of the image will be matched to this + number. i.e, if height > width, then image will be rescaled to + (size * height / width, size). + - If size is None, the output shape is determined by the ``max_size`` + parameter. + + .. note:: + In torchscript mode size as single int is not supported, use a sequence of length 1: ``[size, ]``. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.NEAREST_EXACT``, + ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + max_size (int, optional): The maximum allowed for the longer edge of + the resized image. + + - If ``size`` is an int: if the longer edge of the image is greater + than ``max_size`` after being resized according to ``size``, + ``size`` will be overruled so that the longer edge is equal to + ``max_size``. As a result, the smaller edge may be shorter than + ``size``. This is only supported if ``size`` is an int (or a + sequence of length 1 in torchscript mode). + - If ``size`` is None: the longer edge of the image will be matched + to max_size. i.e, if height > width, then image will be rescaled + to (max_size, max_size * width / height). + + This should be left to ``None`` (default) when ``size`` is a + sequence. + + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + """ + + _v1_transform_cls = _transforms.Resize + + def __init__( + self, + size: Union[int, Sequence[int], None], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + max_size: Optional[int] = None, + antialias: Optional[bool] = True, + ) -> None: + super().__init__() + + if isinstance(size, int): + size = [size] + elif isinstance(size, Sequence) and len(size) in {1, 2}: + size = list(size) + elif size is None: + if not isinstance(max_size, int): + raise ValueError(f"max_size must be an integer when size is None, but got {max_size} instead.") + else: + raise ValueError( + f"size can be an integer, a sequence of one or two integers, or None, but got {size} instead." + ) + self.size = size + + self.interpolation = interpolation + self.max_size = max_size + self.antialias = antialias + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel( + F.resize, + inpt, + self.size, + interpolation=self.interpolation, + max_size=self.max_size, + antialias=self.antialias, + ) + + +class CenterCrop(Transform): + """Crop the input at the center. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + If image size is smaller than output size along any edge, image is padded with 0 and then center cropped. + + Args: + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + """ + + _v1_transform_cls = _transforms.CenterCrop + + def __init__(self, size: Union[int, Sequence[int]]): + super().__init__() + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.center_crop, inpt, output_size=self.size) + + +class RandomResizedCrop(Transform): + """Crop a random portion of the input and resize it to a given size. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + A crop of the original input is made: the crop has a random area (H * W) + and a random aspect ratio. This crop is finally resized to the given + size. This is popularly used to train the Inception networks. + + Args: + size (int or sequence): expected output size of the crop, for each edge. If size is an + int instead of sequence like (h, w), a square output size ``(size, size)`` is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + + .. note:: + In torchscript mode size as single int is not supported, use a sequence of length 1: ``[size, ]``. + scale (tuple of float, optional): Specifies the lower and upper bounds for the random area of the crop, + before resizing. The scale is defined with respect to the area of the original image. + ratio (tuple of float, optional): lower and upper bounds for the random aspect ratio of the crop, before + resizing. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.NEAREST_EXACT``, + ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + """ + + _v1_transform_cls = _transforms.RandomResizedCrop + + def __init__( + self, + size: Union[int, Sequence[int]], + scale: Tuple[float, float] = (0.08, 1.0), + ratio: Tuple[float, float] = (3.0 / 4.0, 4.0 / 3.0), + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, + ) -> None: + super().__init__() + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + + if not isinstance(scale, Sequence): + raise TypeError("Scale should be a sequence") + if not isinstance(ratio, Sequence): + raise TypeError("Ratio should be a sequence") + if (scale[0] > scale[1]) or (ratio[0] > ratio[1]): + warnings.warn("Scale and ratio should be of kind (min, max)") + + self.scale = scale + self.ratio = ratio + self.interpolation = interpolation + self.antialias = antialias + + self._log_ratio = torch.log(torch.tensor(self.ratio)) + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + height, width = query_size(flat_inputs) + area = height * width + + log_ratio = self._log_ratio + for _ in range(10): + target_area = area * torch.empty(1).uniform_(self.scale[0], self.scale[1]).item() + aspect_ratio = torch.exp( + torch.empty(1).uniform_( + log_ratio[0], # type: ignore[arg-type] + log_ratio[1], # type: ignore[arg-type] + ) + ).item() + + w = int(round(math.sqrt(target_area * aspect_ratio))) + h = int(round(math.sqrt(target_area / aspect_ratio))) + + if 0 < w <= width and 0 < h <= height: + i = torch.randint(0, height - h + 1, size=(1,)).item() + j = torch.randint(0, width - w + 1, size=(1,)).item() + break + else: + # Fallback to central crop + in_ratio = float(width) / float(height) + if in_ratio < min(self.ratio): + w = width + h = int(round(w / min(self.ratio))) + elif in_ratio > max(self.ratio): + h = height + w = int(round(h * max(self.ratio))) + else: # whole image + w = width + h = height + i = (height - h) // 2 + j = (width - w) // 2 + + return dict(top=i, left=j, height=h, width=w) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel( + F.resized_crop, inpt, **params, size=self.size, interpolation=self.interpolation, antialias=self.antialias + ) + + +class FiveCrop(Transform): + """Crop the image or video into four corners and the central crop. + + If the input is a :class:`torch.Tensor` or a :class:`~torchvision.tv_tensors.Image` or a + :class:`~torchvision.tv_tensors.Video` it can have arbitrary number of leading batch dimensions. + For example, the image can have ``[..., C, H, W]`` shape. + + .. Note:: + This transform returns a tuple of images and there may be a mismatch in the number of + inputs and targets your Dataset returns. See below for an example of how to deal with + this. + + Args: + size (sequence or int): Desired output size of the crop. If size is an ``int`` + instead of sequence like (h, w), a square crop of size (size, size) is made. + If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + + Example: + >>> class BatchMultiCrop(transforms.Transform): + ... def forward(self, sample: Tuple[Tuple[Union[tv_tensors.Image, tv_tensors.Video], ...], int]): + ... images_or_videos, labels = sample + ... batch_size = len(images_or_videos) + ... image_or_video = images_or_videos[0] + ... images_or_videos = tv_tensors.wrap(torch.stack(images_or_videos), like=image_or_video) + ... labels = torch.full((batch_size,), label, device=images_or_videos.device) + ... return images_or_videos, labels + ... + >>> image = tv_tensors.Image(torch.rand(3, 256, 256)) + >>> label = 3 + >>> transform = transforms.Compose([transforms.FiveCrop(224), BatchMultiCrop()]) + >>> images, labels = transform(image, label) + >>> images.shape + torch.Size([5, 3, 224, 224]) + >>> labels + tensor([3, 3, 3, 3, 3]) + """ + + _v1_transform_cls = _transforms.FiveCrop + + def __init__(self, size: Union[int, Sequence[int]]) -> None: + super().__init__() + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + + def _call_kernel(self, functional: Callable, inpt: Any, *args: Any, **kwargs: Any) -> Any: + if isinstance(inpt, (tv_tensors.BoundingBoxes, tv_tensors.Mask)): + warnings.warn( + f"{type(self).__name__}() is currently passing through inputs of type " + f"tv_tensors.{type(inpt).__name__}. This will likely change in the future." + ) + return super()._call_kernel(functional, inpt, *args, **kwargs) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.five_crop, inpt, self.size) + + def check_inputs(self, flat_inputs: List[Any]) -> None: + if has_any(flat_inputs, tv_tensors.BoundingBoxes, tv_tensors.Mask): + raise TypeError(f"BoundingBoxes'es and Mask's are not supported by {type(self).__name__}()") + + +class TenCrop(Transform): + """Crop the image or video into four corners and the central crop plus the flipped version of + these (horizontal flipping is used by default). + + If the input is a :class:`torch.Tensor` or a :class:`~torchvision.tv_tensors.Image` or a + :class:`~torchvision.tv_tensors.Video` it can have arbitrary number of leading batch dimensions. + For example, the image can have ``[..., C, H, W]`` shape. + + See :class:`~torchvision.transforms.v2.FiveCrop` for an example. + + .. Note:: + This transform returns a tuple of images and there may be a mismatch in the number of + inputs and targets your Dataset returns. See below for an example of how to deal with + this. + + Args: + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + vertical_flip (bool, optional): Use vertical flipping instead of horizontal + """ + + _v1_transform_cls = _transforms.TenCrop + + def __init__(self, size: Union[int, Sequence[int]], vertical_flip: bool = False) -> None: + super().__init__() + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + self.vertical_flip = vertical_flip + + def _call_kernel(self, functional: Callable, inpt: Any, *args: Any, **kwargs: Any) -> Any: + if isinstance(inpt, (tv_tensors.BoundingBoxes, tv_tensors.Mask)): + warnings.warn( + f"{type(self).__name__}() is currently passing through inputs of type " + f"tv_tensors.{type(inpt).__name__}. This will likely change in the future." + ) + return super()._call_kernel(functional, inpt, *args, **kwargs) + + def check_inputs(self, flat_inputs: List[Any]) -> None: + if has_any(flat_inputs, tv_tensors.BoundingBoxes, tv_tensors.Mask): + raise TypeError(f"BoundingBoxes'es and Mask's are not supported by {type(self).__name__}()") + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.ten_crop, inpt, self.size, vertical_flip=self.vertical_flip) + + +class Pad(Transform): + """Pad the input on all sides with the given "pad" value. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + padding (int or sequence): Padding on each border. If a single int is provided this + is used to pad all borders. If sequence of length 2 is provided this is the padding + on left/right and top/bottom respectively. If a sequence of length 4 is provided + this is the padding for the left, top, right and bottom borders respectively. + + .. note:: + In torchscript mode padding as single int is not supported, use a sequence of + length 1: ``[padding, ]``. + fill (number or tuple or dict, optional): Pixel fill value used when the ``padding_mode`` is constant. + Default is 0. If a tuple of length 3, it is used to fill R, G, B channels respectively. + Fill value can be also a dictionary mapping data type to the fill value, e.g. + ``fill={tv_tensors.Image: 127, tv_tensors.Mask: 0}`` where ``Image`` will be filled with 127 and + ``Mask`` will be filled with 0. + padding_mode (str, optional): Type of padding. Should be: constant, edge, reflect or symmetric. + Default is "constant". + + - constant: pads with a constant value, this value is specified with fill + + - edge: pads with the last value at the edge of the image. + + - reflect: pads with reflection of image without repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in reflect mode + will result in [3, 2, 1, 2, 3, 4, 3, 2] + + - symmetric: pads with reflection of image repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in symmetric mode + will result in [2, 1, 1, 2, 3, 4, 4, 3] + """ + + _v1_transform_cls = _transforms.Pad + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + params = super()._extract_params_for_v1_transform() + + if not (params["fill"] is None or isinstance(params["fill"], (int, float))): + raise ValueError(f"{type(self).__name__}() can only be scripted for a scalar `fill`, but got {self.fill}.") + + return params + + def __init__( + self, + padding: Union[int, Sequence[int]], + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = 0, + padding_mode: Literal["constant", "edge", "reflect", "symmetric"] = "constant", + ) -> None: + super().__init__() + + _check_padding_arg(padding) + _check_padding_mode_arg(padding_mode) + + # This cast does Sequence[int] -> List[int] and is required to make mypy happy + if not isinstance(padding, int): + padding = list(padding) + self.padding = padding + self.fill = fill + self._fill = _setup_fill_arg(fill) + self.padding_mode = padding_mode + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + fill = _get_fill(self._fill, type(inpt)) + return self._call_kernel(F.pad, inpt, padding=self.padding, fill=fill, padding_mode=self.padding_mode) # type: ignore[arg-type] + + +class RandomZoomOut(_RandomApplyTransform): + """ "Zoom out" transformation from + `"SSD: Single Shot MultiBox Detector" `_. + + This transformation randomly pads images, videos, bounding boxes and masks creating a zoom out effect. + Output spatial size is randomly sampled from original size up to a maximum size configured + with ``side_range`` parameter: + + .. code-block:: python + + r = uniform_sample(side_range[0], side_range[1]) + output_width = input_width * r + output_height = input_height * r + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + fill (number or tuple or dict, optional): Pixel fill value used when the ``padding_mode`` is constant. + Default is 0. If a tuple of length 3, it is used to fill R, G, B channels respectively. + Fill value can be also a dictionary mapping data type to the fill value, e.g. + ``fill={tv_tensors.Image: 127, tv_tensors.Mask: 0}`` where ``Image`` will be filled with 127 and + ``Mask`` will be filled with 0. + side_range (sequence of floats, optional): tuple of two floats defines minimum and maximum factors to + scale the input size. + p (float, optional): probability that the zoom operation will be performed. + """ + + def __init__( + self, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = 0, + side_range: Sequence[float] = (1.0, 4.0), + p: float = 0.5, + ) -> None: + super().__init__(p=p) + + self.fill = fill + self._fill = _setup_fill_arg(fill) + + _check_sequence_input(side_range, "side_range", req_sizes=(2,)) + + self.side_range = side_range + if side_range[0] < 1.0 or side_range[0] > side_range[1]: + raise ValueError(f"Invalid side range provided {side_range}.") + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + orig_h, orig_w = query_size(flat_inputs) + + r = self.side_range[0] + torch.rand(1) * (self.side_range[1] - self.side_range[0]) + canvas_width = int(orig_w * r) + canvas_height = int(orig_h * r) + + r = torch.rand(2) + left = int((canvas_width - orig_w) * r[0]) + top = int((canvas_height - orig_h) * r[1]) + right = canvas_width - (left + orig_w) + bottom = canvas_height - (top + orig_h) + padding = [left, top, right, bottom] + + return dict(padding=padding) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + fill = _get_fill(self._fill, type(inpt)) + return self._call_kernel(F.pad, inpt, **params, fill=fill) + + +class RandomRotation(Transform): + """Rotate the input by angle. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + degrees (sequence or number): Range of degrees to select from. + If degrees is a number instead of sequence like (min, max), the range of degrees + will be (-degrees, +degrees). + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + expand (bool, optional): Optional expansion flag. + If true, expands the output to make it large enough to hold the entire rotated image. + If false or omitted, make the output image the same size as the input image. + Note that the expand flag assumes rotation around the center (see note below) and no translation. + center (sequence, optional): Optional center of rotation, (x, y). Origin is the upper left corner. + Default is the center of the image. + + .. note:: + + In theory, setting ``center`` has no effect if ``expand=True``, since the image center will become the + center of rotation. In practice however, due to numerical precision, this can lead to off-by-one + differences of the resulting image size compared to using the image center in the first place. Thus, when + setting ``expand=True``, it's best to leave ``center=None`` (default). + fill (number or tuple or dict, optional): Pixel fill value used when the ``padding_mode`` is constant. + Default is 0. If a tuple of length 3, it is used to fill R, G, B channels respectively. + Fill value can be also a dictionary mapping data type to the fill value, e.g. + ``fill={tv_tensors.Image: 127, tv_tensors.Mask: 0}`` where ``Image`` will be filled with 127 and + ``Mask`` will be filled with 0. + + .. _filters: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#filters + + """ + + _v1_transform_cls = _transforms.RandomRotation + + def __init__( + self, + degrees: Union[numbers.Number, Sequence], + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + expand: bool = False, + center: Optional[List[float]] = None, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = 0, + ) -> None: + super().__init__() + self.degrees = _setup_angle(degrees, name="degrees", req_sizes=(2,)) + self.interpolation = interpolation + self.expand = expand + + self.fill = fill + self._fill = _setup_fill_arg(fill) + + if center is not None: + _check_sequence_input(center, "center", req_sizes=(2,)) + + self.center = center + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + angle = torch.empty(1).uniform_(self.degrees[0], self.degrees[1]).item() + return dict(angle=angle) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + fill = _get_fill(self._fill, type(inpt)) + return self._call_kernel( + F.rotate, + inpt, + **params, + interpolation=self.interpolation, + expand=self.expand, + center=self.center, + fill=fill, + ) + + +class RandomAffine(Transform): + """Random affine transformation the input keeping center invariant. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + degrees (sequence or number): Range of degrees to select from. + If degrees is a number instead of sequence like (min, max), the range of degrees + will be (-degrees, +degrees). Set to 0 to deactivate rotations. + translate (tuple, optional): tuple of maximum absolute fraction for horizontal + and vertical translations. For example translate=(a, b), then horizontal shift + is randomly sampled in the range -img_width * a < dx < img_width * a and vertical shift is + randomly sampled in the range -img_height * b < dy < img_height * b. Will not translate by default. + scale (tuple, optional): scaling factor interval, e.g (a, b), then scale is + randomly sampled from the range a <= scale <= b. Will keep original scale by default. + shear (sequence or number, optional): Range of degrees to select from. + If shear is a number, a shear parallel to the x-axis in the range (-shear, +shear) + will be applied. Else if shear is a sequence of 2 values a shear parallel to the x-axis in the + range (shear[0], shear[1]) will be applied. Else if shear is a sequence of 4 values, + an x-axis shear in (shear[0], shear[1]) and y-axis shear in (shear[2], shear[3]) will be applied. + Will not apply shear by default. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.NEAREST``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (number or tuple or dict, optional): Pixel fill value used when the ``padding_mode`` is constant. + Default is 0. If a tuple of length 3, it is used to fill R, G, B channels respectively. + Fill value can be also a dictionary mapping data type to the fill value, e.g. + ``fill={tv_tensors.Image: 127, tv_tensors.Mask: 0}`` where ``Image`` will be filled with 127 and + ``Mask`` will be filled with 0. + center (sequence, optional): Optional center of rotation, (x, y). Origin is the upper left corner. + Default is the center of the image. + + .. _filters: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#filters + + """ + + _v1_transform_cls = _transforms.RandomAffine + + def __init__( + self, + degrees: Union[numbers.Number, Sequence], + translate: Optional[Sequence[float]] = None, + scale: Optional[Sequence[float]] = None, + shear: Optional[Union[int, float, Sequence[float]]] = None, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = 0, + center: Optional[List[float]] = None, + ) -> None: + super().__init__() + self.degrees = _setup_angle(degrees, name="degrees", req_sizes=(2,)) + if translate is not None: + _check_sequence_input(translate, "translate", req_sizes=(2,)) + for t in translate: + if not (0.0 <= t <= 1.0): + raise ValueError("translation values should be between 0 and 1") + self.translate = translate + if scale is not None: + _check_sequence_input(scale, "scale", req_sizes=(2,)) + for s in scale: + if s <= 0: + raise ValueError("scale values should be positive") + self.scale = scale + + if shear is not None: + self.shear = _setup_angle(shear, name="shear", req_sizes=(2, 4)) + else: + self.shear = shear + + self.interpolation = interpolation + self.fill = fill + self._fill = _setup_fill_arg(fill) + + if center is not None: + _check_sequence_input(center, "center", req_sizes=(2,)) + + self.center = center + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + height, width = query_size(flat_inputs) + + angle = torch.empty(1).uniform_(self.degrees[0], self.degrees[1]).item() + if self.translate is not None: + max_dx = float(self.translate[0] * width) + max_dy = float(self.translate[1] * height) + tx = int(round(torch.empty(1).uniform_(-max_dx, max_dx).item())) + ty = int(round(torch.empty(1).uniform_(-max_dy, max_dy).item())) + translate = (tx, ty) + else: + translate = (0, 0) + + if self.scale is not None: + scale = torch.empty(1).uniform_(self.scale[0], self.scale[1]).item() + else: + scale = 1.0 + + shear_x = shear_y = 0.0 + if self.shear is not None: + shear_x = torch.empty(1).uniform_(self.shear[0], self.shear[1]).item() + if len(self.shear) == 4: + shear_y = torch.empty(1).uniform_(self.shear[2], self.shear[3]).item() + + shear = (shear_x, shear_y) + return dict(angle=angle, translate=translate, scale=scale, shear=shear) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + fill = _get_fill(self._fill, type(inpt)) + return self._call_kernel( + F.affine, + inpt, + **params, + interpolation=self.interpolation, + fill=fill, + center=self.center, + ) + + +class RandomCrop(Transform): + """Crop the input at a random location. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + size (sequence or int): Desired output size of the crop. If size is an + int instead of sequence like (h, w), a square crop (size, size) is + made. If provided a sequence of length 1, it will be interpreted as (size[0], size[0]). + padding (int or sequence, optional): Optional padding on each border + of the image. Default is None. If a single int is provided this + is used to pad all borders. If sequence of length 2 is provided this is the padding + on left/right and top/bottom respectively. If a sequence of length 4 is provided + this is the padding for the left, top, right and bottom borders respectively. + + .. note:: + In torchscript mode padding as single int is not supported, use a sequence of + length 1: ``[padding, ]``. + pad_if_needed (boolean, optional): It will pad the image if smaller than the + desired size to avoid raising an exception. Since cropping is done + after padding, the padding seems to be done at a random offset. + fill (number or tuple or dict, optional): Pixel fill value used when the ``padding_mode`` is constant. + Default is 0. If a tuple of length 3, it is used to fill R, G, B channels respectively. + Fill value can be also a dictionary mapping data type to the fill value, e.g. + ``fill={tv_tensors.Image: 127, tv_tensors.Mask: 0}`` where ``Image`` will be filled with 127 and + ``Mask`` will be filled with 0. + padding_mode (str, optional): Type of padding. Should be: constant, edge, reflect or symmetric. + Default is constant. + + - constant: pads with a constant value, this value is specified with fill + + - edge: pads with the last value at the edge of the image. + + - reflect: pads with reflection of image without repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in reflect mode + will result in [3, 2, 1, 2, 3, 4, 3, 2] + + - symmetric: pads with reflection of image repeating the last value on the edge. + For example, padding [1, 2, 3, 4] with 2 elements on both sides in symmetric mode + will result in [2, 1, 1, 2, 3, 4, 4, 3] + """ + + _v1_transform_cls = _transforms.RandomCrop + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + params = super()._extract_params_for_v1_transform() + + if not (params["fill"] is None or isinstance(params["fill"], (int, float))): + raise ValueError(f"{type(self).__name__}() can only be scripted for a scalar `fill`, but got {self.fill}.") + + padding = self.padding + if padding is not None: + pad_left, pad_right, pad_top, pad_bottom = padding + padding = [pad_left, pad_top, pad_right, pad_bottom] + params["padding"] = padding + + return params + + def __init__( + self, + size: Union[int, Sequence[int]], + padding: Optional[Union[int, Sequence[int]]] = None, + pad_if_needed: bool = False, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = 0, + padding_mode: Literal["constant", "edge", "reflect", "symmetric"] = "constant", + ) -> None: + super().__init__() + + self.size = _setup_size(size, error_msg="Please provide only two dimensions (h, w) for size.") + + if pad_if_needed or padding is not None: + if padding is not None: + _check_padding_arg(padding) + _check_padding_mode_arg(padding_mode) + + self.padding = F._geometry._parse_pad_padding(padding) if padding else None # type: ignore[arg-type] + self.pad_if_needed = pad_if_needed + self.fill = fill + self._fill = _setup_fill_arg(fill) + self.padding_mode = padding_mode + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + padded_height, padded_width = query_size(flat_inputs) + + if self.padding is not None: + pad_left, pad_right, pad_top, pad_bottom = self.padding + padded_height += pad_top + pad_bottom + padded_width += pad_left + pad_right + else: + pad_left = pad_right = pad_top = pad_bottom = 0 + + cropped_height, cropped_width = self.size + + if self.pad_if_needed: + if padded_height < cropped_height: + diff = cropped_height - padded_height + + pad_top += diff + pad_bottom += diff + padded_height += 2 * diff + + if padded_width < cropped_width: + diff = cropped_width - padded_width + + pad_left += diff + pad_right += diff + padded_width += 2 * diff + + if padded_height < cropped_height or padded_width < cropped_width: + raise ValueError( + f"Required crop size {(cropped_height, cropped_width)} is larger than " + f"{'padded ' if self.padding is not None else ''}input image size {(padded_height, padded_width)}." + ) + + # We need a different order here than we have in self.padding since this padding will be parsed again in `F.pad` + padding = [pad_left, pad_top, pad_right, pad_bottom] + needs_pad = any(padding) + + needs_vert_crop, top = ( + (True, int(torch.randint(0, padded_height - cropped_height + 1, size=()))) + if padded_height > cropped_height + else (False, 0) + ) + needs_horz_crop, left = ( + (True, int(torch.randint(0, padded_width - cropped_width + 1, size=()))) + if padded_width > cropped_width + else (False, 0) + ) + + return dict( + needs_crop=needs_vert_crop or needs_horz_crop, + top=top, + left=left, + height=cropped_height, + width=cropped_width, + needs_pad=needs_pad, + padding=padding, + ) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + if params["needs_pad"]: + fill = _get_fill(self._fill, type(inpt)) + inpt = self._call_kernel(F.pad, inpt, padding=params["padding"], fill=fill, padding_mode=self.padding_mode) + + if params["needs_crop"]: + inpt = self._call_kernel( + F.crop, inpt, top=params["top"], left=params["left"], height=params["height"], width=params["width"] + ) + + return inpt + + +class RandomPerspective(_RandomApplyTransform): + """Perform a random perspective transformation of the input with a given probability. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + distortion_scale (float, optional): argument to control the degree of distortion and ranges from 0 to 1. + Default is 0.5. + p (float, optional): probability of the input being transformed. Default is 0.5. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (number or tuple or dict, optional): Pixel fill value used when the ``padding_mode`` is constant. + Default is 0. If a tuple of length 3, it is used to fill R, G, B channels respectively. + Fill value can be also a dictionary mapping data type to the fill value, e.g. + ``fill={tv_tensors.Image: 127, tv_tensors.Mask: 0}`` where ``Image`` will be filled with 127 and + ``Mask`` will be filled with 0. + """ + + _v1_transform_cls = _transforms.RandomPerspective + + def __init__( + self, + distortion_scale: float = 0.5, + p: float = 0.5, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = 0, + ) -> None: + super().__init__(p=p) + + if not (0 <= distortion_scale <= 1): + raise ValueError("Argument distortion_scale value should be between 0 and 1") + + self.distortion_scale = distortion_scale + self.interpolation = interpolation + self.fill = fill + self._fill = _setup_fill_arg(fill) + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + height, width = query_size(flat_inputs) + + distortion_scale = self.distortion_scale + + half_height = height // 2 + half_width = width // 2 + bound_height = int(distortion_scale * half_height) + 1 + bound_width = int(distortion_scale * half_width) + 1 + topleft = [ + int(torch.randint(0, bound_width, size=(1,))), + int(torch.randint(0, bound_height, size=(1,))), + ] + topright = [ + int(torch.randint(width - bound_width, width, size=(1,))), + int(torch.randint(0, bound_height, size=(1,))), + ] + botright = [ + int(torch.randint(width - bound_width, width, size=(1,))), + int(torch.randint(height - bound_height, height, size=(1,))), + ] + botleft = [ + int(torch.randint(0, bound_width, size=(1,))), + int(torch.randint(height - bound_height, height, size=(1,))), + ] + startpoints = [[0, 0], [width - 1, 0], [width - 1, height - 1], [0, height - 1]] + endpoints = [topleft, topright, botright, botleft] + perspective_coeffs = _get_perspective_coeffs(startpoints, endpoints) + return dict(coefficients=perspective_coeffs) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + fill = _get_fill(self._fill, type(inpt)) + return self._call_kernel( + F.perspective, + inpt, + startpoints=None, + endpoints=None, + fill=fill, + interpolation=self.interpolation, + **params, + ) + + +class ElasticTransform(Transform): + """Transform the input with elastic transformations. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Given alpha and sigma, it will generate displacement + vectors for all pixels based on random offsets. Alpha controls the strength + and sigma controls the smoothness of the displacements. + The displacements are added to an identity grid and the resulting grid is + used to transform the input. + + .. note:: + Implementation to transform bounding boxes is approximative (not exact). + We construct an approximation of the inverse grid as ``inverse_grid = identity - displacement``. + This is not an exact inverse of the grid used to transform images, i.e. ``grid = identity + displacement``. + Our assumption is that ``displacement * displacement`` is small and can be ignored. + Large displacements would lead to large errors in the approximation. + + Applications: + Randomly transforms the morphology of objects in images and produces a + see-through-water-like effect. + + Args: + alpha (float or sequence of floats, optional): Magnitude of displacements. Default is 50.0. + sigma (float or sequence of floats, optional): Smoothness of displacements. Default is 5.0. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.BILINEAR`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + fill (number or tuple or dict, optional): Pixel fill value used when the ``padding_mode`` is constant. + Default is 0. If a tuple of length 3, it is used to fill R, G, B channels respectively. + Fill value can be also a dictionary mapping data type to the fill value, e.g. + ``fill={tv_tensors.Image: 127, tv_tensors.Mask: 0}`` where ``Image`` will be filled with 127 and + ``Mask`` will be filled with 0. + """ + + _v1_transform_cls = _transforms.ElasticTransform + + def __init__( + self, + alpha: Union[float, Sequence[float]] = 50.0, + sigma: Union[float, Sequence[float]] = 5.0, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: Union[_FillType, Dict[Union[Type, str], _FillType]] = 0, + ) -> None: + super().__init__() + self.alpha = _setup_number_or_seq(alpha, "alpha") + self.sigma = _setup_number_or_seq(sigma, "sigma") + + self.interpolation = interpolation + self.fill = fill + self._fill = _setup_fill_arg(fill) + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + size = list(query_size(flat_inputs)) + + dx = torch.rand([1, 1] + size) * 2 - 1 + if self.sigma[0] > 0.0: + kx = int(8 * self.sigma[0] + 1) + # if kernel size is even we have to make it odd + if kx % 2 == 0: + kx += 1 + dx = self._call_kernel(F.gaussian_blur, dx, [kx, kx], list(self.sigma)) + dx = dx * self.alpha[0] / size[0] + + dy = torch.rand([1, 1] + size) * 2 - 1 + if self.sigma[1] > 0.0: + ky = int(8 * self.sigma[1] + 1) + # if kernel size is even we have to make it odd + if ky % 2 == 0: + ky += 1 + dy = self._call_kernel(F.gaussian_blur, dy, [ky, ky], list(self.sigma)) + dy = dy * self.alpha[1] / size[1] + displacement = torch.concat([dx, dy], 1).permute([0, 2, 3, 1]) # 1 x H x W x 2 + return dict(displacement=displacement) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + fill = _get_fill(self._fill, type(inpt)) + return self._call_kernel( + F.elastic, + inpt, + **params, + fill=fill, + interpolation=self.interpolation, + ) + + +class RandomIoUCrop(Transform): + """Random IoU crop transformation from + `"SSD: Single Shot MultiBox Detector" `_. + + This transformation requires an image or video data and ``tv_tensors.BoundingBoxes`` in the input. + + .. warning:: + In order to properly remove the bounding boxes below the IoU threshold, `RandomIoUCrop` + must be followed by :class:`~torchvision.transforms.v2.SanitizeBoundingBoxes`, either immediately + after or later in the transforms pipeline. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + min_scale (float, optional): Minimum factors to scale the input size. + max_scale (float, optional): Maximum factors to scale the input size. + min_aspect_ratio (float, optional): Minimum aspect ratio for the cropped image or video. + max_aspect_ratio (float, optional): Maximum aspect ratio for the cropped image or video. + sampler_options (list of float, optional): List of minimal IoU (Jaccard) overlap between all the boxes and + a cropped image or video. Default, ``None`` which corresponds to ``[0.0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0]`` + trials (int, optional): Number of trials to find a crop for a given value of minimal IoU (Jaccard) overlap. + Default, 40. + """ + + def __init__( + self, + min_scale: float = 0.3, + max_scale: float = 1.0, + min_aspect_ratio: float = 0.5, + max_aspect_ratio: float = 2.0, + sampler_options: Optional[List[float]] = None, + trials: int = 40, + ): + super().__init__() + # Configuration similar to https://github.com/weiliu89/caffe/blob/ssd/examples/ssd/ssd_coco.py#L89-L174 + self.min_scale = min_scale + self.max_scale = max_scale + self.min_aspect_ratio = min_aspect_ratio + self.max_aspect_ratio = max_aspect_ratio + if sampler_options is None: + sampler_options = [0.0, 0.1, 0.3, 0.5, 0.7, 0.9, 1.0] + self.options = sampler_options + self.trials = trials + + def check_inputs(self, flat_inputs: List[Any]) -> None: + if not ( + has_all(flat_inputs, tv_tensors.BoundingBoxes) + and has_any(flat_inputs, PIL.Image.Image, tv_tensors.Image, is_pure_tensor) + ): + raise TypeError( + f"{type(self).__name__}() requires input sample to contain tensor or PIL images " + "and bounding boxes. Sample can also contain masks." + ) + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + orig_h, orig_w = query_size(flat_inputs) + bboxes = get_bounding_boxes(flat_inputs) + + while True: + # sample an option + idx = int(torch.randint(low=0, high=len(self.options), size=(1,))) + min_jaccard_overlap = self.options[idx] + if min_jaccard_overlap >= 1.0: # a value larger than 1 encodes the leave as-is option + return dict() + + for _ in range(self.trials): + # check the aspect ratio limitations + r = self.min_scale + (self.max_scale - self.min_scale) * torch.rand(2) + new_w = int(orig_w * r[0]) + new_h = int(orig_h * r[1]) + aspect_ratio = new_w / new_h + if not (self.min_aspect_ratio <= aspect_ratio <= self.max_aspect_ratio): + continue + + # check for 0 area crops + r = torch.rand(2) + left = int((orig_w - new_w) * r[0]) + top = int((orig_h - new_h) * r[1]) + right = left + new_w + bottom = top + new_h + if left == right or top == bottom: + continue + + # check for any valid boxes with centers within the crop area + xyxy_bboxes = F.convert_bounding_box_format( + bboxes.as_subclass(torch.Tensor), + bboxes.format, + tv_tensors.BoundingBoxFormat.XYXY, + ) + cx = 0.5 * (xyxy_bboxes[..., 0] + xyxy_bboxes[..., 2]) + cy = 0.5 * (xyxy_bboxes[..., 1] + xyxy_bboxes[..., 3]) + is_within_crop_area = (left < cx) & (cx < right) & (top < cy) & (cy < bottom) + if not is_within_crop_area.any(): + continue + + # check at least 1 box with jaccard limitations + xyxy_bboxes = xyxy_bboxes[is_within_crop_area] + ious = box_iou( + xyxy_bboxes, + torch.tensor([[left, top, right, bottom]], dtype=xyxy_bboxes.dtype, device=xyxy_bboxes.device), + ) + if ious.max() < min_jaccard_overlap: + continue + + return dict(top=top, left=left, height=new_h, width=new_w, is_within_crop_area=is_within_crop_area) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + + if len(params) < 1: + return inpt + + output = self._call_kernel( + F.crop, inpt, top=params["top"], left=params["left"], height=params["height"], width=params["width"] + ) + + if isinstance(output, tv_tensors.BoundingBoxes): + # We "mark" the invalid boxes as degenreate, and they can be + # removed by a later call to SanitizeBoundingBoxes() + output[~params["is_within_crop_area"]] = 0 + + return output + + +class ScaleJitter(Transform): + """Perform Large Scale Jitter on the input according to + `"Simple Copy-Paste is a Strong Data Augmentation Method for Instance Segmentation" `_. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + target_size (tuple of int): Target size. This parameter defines base scale for jittering, + e.g. ``min(target_size[0] / width, target_size[1] / height)``. + scale_range (tuple of float, optional): Minimum and maximum of the scale range. Default, ``(0.1, 2.0)``. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.NEAREST_EXACT``, + ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + """ + + def __init__( + self, + target_size: Tuple[int, int], + scale_range: Tuple[float, float] = (0.1, 2.0), + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, + ): + super().__init__() + self.target_size = target_size + self.scale_range = scale_range + self.interpolation = interpolation + self.antialias = antialias + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + orig_height, orig_width = query_size(flat_inputs) + + scale = self.scale_range[0] + torch.rand(1) * (self.scale_range[1] - self.scale_range[0]) + r = min(self.target_size[1] / orig_height, self.target_size[0] / orig_width) * scale + new_width = int(orig_width * r) + new_height = int(orig_height * r) + + return dict(size=(new_height, new_width)) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel( + F.resize, inpt, size=params["size"], interpolation=self.interpolation, antialias=self.antialias + ) + + +class RandomShortestSize(Transform): + """Randomly resize the input. + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + min_size (int or sequence of int): Minimum spatial size. Single integer value or a sequence of integer values. + max_size (int, optional): Maximum spatial size. Default, None. + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.NEAREST_EXACT``, + ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + """ + + def __init__( + self, + min_size: Union[List[int], Tuple[int], int], + max_size: Optional[int] = None, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, + ): + super().__init__() + self.min_size = [min_size] if isinstance(min_size, int) else list(min_size) + self.max_size = max_size + self.interpolation = interpolation + self.antialias = antialias + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + orig_height, orig_width = query_size(flat_inputs) + + min_size = self.min_size[int(torch.randint(len(self.min_size), ()))] + r = min_size / min(orig_height, orig_width) + if self.max_size is not None: + r = min(r, self.max_size / max(orig_height, orig_width)) + + new_width = int(orig_width * r) + new_height = int(orig_height * r) + + return dict(size=(new_height, new_width)) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel( + F.resize, inpt, size=params["size"], interpolation=self.interpolation, antialias=self.antialias + ) + + +class RandomResize(Transform): + """Randomly resize the input. + + This transformation can be used together with ``RandomCrop`` as data augmentations to train + models on image segmentation task. + + Output spatial size is randomly sampled from the interval ``[min_size, max_size]``: + + .. code-block:: python + + size = uniform_sample(min_size, max_size) + output_width = size + output_height = size + + If the input is a :class:`torch.Tensor` or a ``TVTensor`` (e.g. :class:`~torchvision.tv_tensors.Image`, + :class:`~torchvision.tv_tensors.Video`, :class:`~torchvision.tv_tensors.BoundingBoxes` etc.) + it can have arbitrary number of leading batch dimensions. For example, + the image can have ``[..., C, H, W]`` shape. A bounding box can have ``[..., 4]`` shape. + + Args: + min_size (int): Minimum output size for random sampling + max_size (int): Maximum output size for random sampling + interpolation (InterpolationMode, optional): Desired interpolation enum defined by + :class:`torchvision.transforms.InterpolationMode`. Default is ``InterpolationMode.BILINEAR``. + If input is Tensor, only ``InterpolationMode.NEAREST``, ``InterpolationMode.NEAREST_EXACT``, + ``InterpolationMode.BILINEAR`` and ``InterpolationMode.BICUBIC`` are supported. + The corresponding Pillow integer constants, e.g. ``PIL.Image.BILINEAR`` are accepted as well. + antialias (bool, optional): Whether to apply antialiasing. + It only affects **tensors** with bilinear or bicubic modes and it is + ignored otherwise: on PIL images, antialiasing is always applied on + bilinear or bicubic modes; on other modes (for PIL images and + tensors), antialiasing makes no sense and this parameter is ignored. + Possible values are: + + - ``True`` (default): will apply antialiasing for bilinear or bicubic modes. + Other mode aren't affected. This is probably what you want to use. + - ``False``: will not apply antialiasing for tensors on any mode. PIL + images are still antialiased on bilinear or bicubic modes, because + PIL doesn't support no antialias. + - ``None``: equivalent to ``False`` for tensors and ``True`` for + PIL images. This value exists for legacy reasons and you probably + don't want to use it unless you really know what you are doing. + + The default value changed from ``None`` to ``True`` in + v0.17, for the PIL and Tensor backends to be consistent. + """ + + def __init__( + self, + min_size: int, + max_size: int, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, + ) -> None: + super().__init__() + self.min_size = min_size + self.max_size = max_size + self.interpolation = interpolation + self.antialias = antialias + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + size = int(torch.randint(self.min_size, self.max_size, ())) + return dict(size=[size]) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel( + F.resize, inpt, params["size"], interpolation=self.interpolation, antialias=self.antialias + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_meta.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_meta.py new file mode 100644 index 0000000000000000000000000000000000000000..517512750e800f80f3baaa6b0e9681c8793e8eb0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_meta.py @@ -0,0 +1,36 @@ +from typing import Any, Dict, Union + +from torchvision import tv_tensors +from torchvision.transforms.v2 import functional as F, Transform + + +class ConvertBoundingBoxFormat(Transform): + """Convert bounding box coordinates to the given ``format``, eg from "CXCYWH" to "XYXY". + + Args: + format (str or tv_tensors.BoundingBoxFormat): output bounding box format. + Possible values are defined by :class:`~torchvision.tv_tensors.BoundingBoxFormat` and + string values match the enums, e.g. "XYXY" or "XYWH" etc. + """ + + _transformed_types = (tv_tensors.BoundingBoxes,) + + def __init__(self, format: Union[str, tv_tensors.BoundingBoxFormat]) -> None: + super().__init__() + self.format = format + + def transform(self, inpt: tv_tensors.BoundingBoxes, params: Dict[str, Any]) -> tv_tensors.BoundingBoxes: + return F.convert_bounding_box_format(inpt, new_format=self.format) # type: ignore[return-value, arg-type] + + +class ClampBoundingBoxes(Transform): + """Clamp bounding boxes to their corresponding image dimensions. + + The clamping is done according to the bounding boxes' ``canvas_size`` meta-data. + + """ + + _transformed_types = (tv_tensors.BoundingBoxes,) + + def transform(self, inpt: tv_tensors.BoundingBoxes, params: Dict[str, Any]) -> tv_tensors.BoundingBoxes: + return F.clamp_bounding_boxes(inpt) # type: ignore[return-value] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_misc.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_misc.py new file mode 100644 index 0000000000000000000000000000000000000000..42f3c86ec5e73b509027d5d380f2d4f2976f9bbd --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_misc.py @@ -0,0 +1,451 @@ +import warnings +from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union + +import PIL.Image + +import torch +from torch.utils._pytree import tree_flatten, tree_unflatten + +from torchvision import transforms as _transforms, tv_tensors +from torchvision.transforms.v2 import functional as F, Transform + +from ._utils import _parse_labels_getter, _setup_number_or_seq, _setup_size, get_bounding_boxes, has_any, is_pure_tensor + + +# TODO: do we want/need to expose this? +class Identity(Transform): + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return inpt + + +class Lambda(Transform): + """Apply a user-defined function as a transform. + + This transform does not support torchscript. + + Args: + lambd (function): Lambda/function to be used for transform. + """ + + _transformed_types = (object,) + + def __init__(self, lambd: Callable[[Any], Any], *types: Type): + super().__init__() + self.lambd = lambd + self.types = types or self._transformed_types + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + if isinstance(inpt, self.types): + return self.lambd(inpt) + else: + return inpt + + def extra_repr(self) -> str: + extras = [] + name = getattr(self.lambd, "__name__", None) + if name: + extras.append(name) + extras.append(f"types={[type.__name__ for type in self.types]}") + return ", ".join(extras) + + +class LinearTransformation(Transform): + """Transform a tensor image or video with a square transformation matrix and a mean_vector computed offline. + + This transform does not support PIL Image. + Given transformation_matrix and mean_vector, will flatten the torch.*Tensor and + subtract mean_vector from it which is then followed by computing the dot + product with the transformation matrix and then reshaping the tensor to its + original shape. + + Applications: + whitening transformation: Suppose X is a column vector zero-centered data. + Then compute the data covariance matrix [D x D] with torch.mm(X.t(), X), + perform SVD on this matrix and pass it as transformation_matrix. + + Args: + transformation_matrix (Tensor): tensor [D x D], D = C x H x W + mean_vector (Tensor): tensor [D], D = C x H x W + """ + + _v1_transform_cls = _transforms.LinearTransformation + + _transformed_types = (is_pure_tensor, tv_tensors.Image, tv_tensors.Video) + + def __init__(self, transformation_matrix: torch.Tensor, mean_vector: torch.Tensor): + super().__init__() + if transformation_matrix.size(0) != transformation_matrix.size(1): + raise ValueError( + "transformation_matrix should be square. Got " + f"{tuple(transformation_matrix.size())} rectangular matrix." + ) + + if mean_vector.size(0) != transformation_matrix.size(0): + raise ValueError( + f"mean_vector should have the same length {mean_vector.size(0)}" + f" as any one of the dimensions of the transformation_matrix [{tuple(transformation_matrix.size())}]" + ) + + if transformation_matrix.device != mean_vector.device: + raise ValueError( + f"Input tensors should be on the same device. Got {transformation_matrix.device} and {mean_vector.device}" + ) + + if transformation_matrix.dtype != mean_vector.dtype: + raise ValueError( + f"Input tensors should have the same dtype. Got {transformation_matrix.dtype} and {mean_vector.dtype}" + ) + + self.transformation_matrix = transformation_matrix + self.mean_vector = mean_vector + + def check_inputs(self, sample: Any) -> Any: + if has_any(sample, PIL.Image.Image): + raise TypeError(f"{type(self).__name__}() does not support PIL images.") + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + shape = inpt.shape + n = shape[-3] * shape[-2] * shape[-1] + if n != self.transformation_matrix.shape[0]: + raise ValueError( + "Input tensor and transformation matrix have incompatible shape." + + f"[{shape[-3]} x {shape[-2]} x {shape[-1]}] != " + + f"{self.transformation_matrix.shape[0]}" + ) + + if inpt.device.type != self.mean_vector.device.type: + raise ValueError( + "Input tensor should be on the same device as transformation matrix and mean vector. " + f"Got {inpt.device} vs {self.mean_vector.device}" + ) + + flat_inpt = inpt.reshape(-1, n) - self.mean_vector + + transformation_matrix = self.transformation_matrix.to(flat_inpt.dtype) + output = torch.mm(flat_inpt, transformation_matrix) + output = output.reshape(shape) + + if isinstance(inpt, (tv_tensors.Image, tv_tensors.Video)): + output = tv_tensors.wrap(output, like=inpt) + return output + + +class Normalize(Transform): + """Normalize a tensor image or video with mean and standard deviation. + + This transform does not support PIL Image. + Given mean: ``(mean[1],...,mean[n])`` and std: ``(std[1],..,std[n])`` for ``n`` + channels, this transform will normalize each channel of the input + ``torch.*Tensor`` i.e., + ``output[channel] = (input[channel] - mean[channel]) / std[channel]`` + + .. note:: + This transform acts out of place, i.e., it does not mutate the input tensor. + + Args: + mean (sequence): Sequence of means for each channel. + std (sequence): Sequence of standard deviations for each channel. + inplace(bool,optional): Bool to make this operation in-place. + + """ + + _v1_transform_cls = _transforms.Normalize + + def __init__(self, mean: Sequence[float], std: Sequence[float], inplace: bool = False): + super().__init__() + self.mean = list(mean) + self.std = list(std) + self.inplace = inplace + + def check_inputs(self, sample: Any) -> Any: + if has_any(sample, PIL.Image.Image): + raise TypeError(f"{type(self).__name__}() does not support PIL images.") + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.normalize, inpt, mean=self.mean, std=self.std, inplace=self.inplace) + + +class GaussianBlur(Transform): + """Blurs image with randomly chosen Gaussian blur kernel. + + The convolution will be using reflection padding corresponding to the kernel size, to maintain the input shape. + + If the input is a Tensor, it is expected + to have [..., C, H, W] shape, where ... means an arbitrary number of leading dimensions. + + Args: + kernel_size (int or sequence): Size of the Gaussian kernel. + sigma (float or tuple of float (min, max)): Standard deviation to be used for + creating kernel to perform blurring. If float, sigma is fixed. If it is tuple + of float (min, max), sigma is chosen uniformly at random to lie in the + given range. + """ + + _v1_transform_cls = _transforms.GaussianBlur + + def __init__( + self, kernel_size: Union[int, Sequence[int]], sigma: Union[int, float, Sequence[float]] = (0.1, 2.0) + ) -> None: + super().__init__() + self.kernel_size = _setup_size(kernel_size, "Kernel size should be a tuple/list of two integers") + for ks in self.kernel_size: + if ks <= 0 or ks % 2 == 0: + raise ValueError("Kernel size value should be an odd and positive number.") + + self.sigma = _setup_number_or_seq(sigma, "sigma") + + if not 0.0 < self.sigma[0] <= self.sigma[1]: + raise ValueError(f"sigma values should be positive and of the form (min, max). Got {self.sigma}") + + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + sigma = torch.empty(1).uniform_(self.sigma[0], self.sigma[1]).item() + return dict(sigma=[sigma, sigma]) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.gaussian_blur, inpt, self.kernel_size, **params) + + +class GaussianNoise(Transform): + """Add gaussian noise to images or videos. + + The input tensor is expected to be in [..., 1 or 3, H, W] format, + where ... means it can have an arbitrary number of leading dimensions. + Each image or frame in a batch will be transformed independently i.e. the + noise added to each image will be different. + + The input tensor is also expected to be of float dtype in ``[0, 1]``. + This transform does not support PIL images. + + Args: + mean (float): Mean of the sampled normal distribution. Default is 0. + sigma (float): Standard deviation of the sampled normal distribution. Default is 0.1. + clip (bool, optional): Whether to clip the values in ``[0, 1]`` after adding noise. Default is True. + """ + + def __init__(self, mean: float = 0.0, sigma: float = 0.1, clip=True) -> None: + super().__init__() + self.mean = mean + self.sigma = sigma + self.clip = clip + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.gaussian_noise, inpt, mean=self.mean, sigma=self.sigma, clip=self.clip) + + +class ToDtype(Transform): + """Converts the input to a specific dtype, optionally scaling the values for images or videos. + + .. note:: + ``ToDtype(dtype, scale=True)`` is the recommended replacement for ``ConvertImageDtype(dtype)``. + + Args: + dtype (``torch.dtype`` or dict of ``TVTensor`` -> ``torch.dtype``): The dtype to convert to. + If a ``torch.dtype`` is passed, e.g. ``torch.float32``, only images and videos will be converted + to that dtype: this is for compatibility with :class:`~torchvision.transforms.v2.ConvertImageDtype`. + A dict can be passed to specify per-tv_tensor conversions, e.g. + ``dtype={tv_tensors.Image: torch.float32, tv_tensors.Mask: torch.int64, "others":None}``. The "others" + key can be used as a catch-all for any other tv_tensor type, and ``None`` means no conversion. + scale (bool, optional): Whether to scale the values for images or videos. See :ref:`range_and_dtype`. + Default: ``False``. + """ + + _transformed_types = (torch.Tensor,) + + def __init__( + self, dtype: Union[torch.dtype, Dict[Union[Type, str], Optional[torch.dtype]]], scale: bool = False + ) -> None: + super().__init__() + + if not isinstance(dtype, (dict, torch.dtype)): + raise ValueError(f"dtype must be a dict or a torch.dtype, got {type(dtype)} instead") + + if ( + isinstance(dtype, dict) + and torch.Tensor in dtype + and any(cls in dtype for cls in [tv_tensors.Image, tv_tensors.Video]) + ): + warnings.warn( + "Got `dtype` values for `torch.Tensor` and either `tv_tensors.Image` or `tv_tensors.Video`. " + "Note that a plain `torch.Tensor` will *not* be transformed by this (or any other transformation) " + "in case a `tv_tensors.Image` or `tv_tensors.Video` is present in the input." + ) + self.dtype = dtype + self.scale = scale + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + if isinstance(self.dtype, torch.dtype): + # For consistency / BC with ConvertImageDtype, we only care about images or videos when dtype + # is a simple torch.dtype + if not is_pure_tensor(inpt) and not isinstance(inpt, (tv_tensors.Image, tv_tensors.Video)): + return inpt + + dtype: Optional[torch.dtype] = self.dtype + elif type(inpt) in self.dtype: + dtype = self.dtype[type(inpt)] + elif "others" in self.dtype: + dtype = self.dtype["others"] + else: + raise ValueError( + f"No dtype was specified for type {type(inpt)}. " + "If you only need to convert the dtype of images or videos, you can just pass e.g. dtype=torch.float32. " + "If you're passing a dict as dtype, " + 'you can use "others" as a catch-all key ' + 'e.g. dtype={tv_tensors.Mask: torch.int64, "others": None} to pass-through the rest of the inputs.' + ) + + supports_scaling = is_pure_tensor(inpt) or isinstance(inpt, (tv_tensors.Image, tv_tensors.Video)) + if dtype is None: + if self.scale and supports_scaling: + warnings.warn( + "scale was set to True but no dtype was specified for images or videos: no scaling will be done." + ) + return inpt + + return self._call_kernel(F.to_dtype, inpt, dtype=dtype, scale=self.scale) + + +class ConvertImageDtype(Transform): + """[DEPRECATED] Use ``v2.ToDtype(dtype, scale=True)`` instead. + + Convert input image to the given ``dtype`` and scale the values accordingly. + + .. warning:: + Consider using ``ToDtype(dtype, scale=True)`` instead. See :class:`~torchvision.transforms.v2.ToDtype`. + + This function does not support PIL Image. + + Args: + dtype (torch.dtype): Desired data type of the output + + .. note:: + + When converting from a smaller to a larger integer ``dtype`` the maximum values are **not** mapped exactly. + If converted back and forth, this mismatch has no effect. + + Raises: + RuntimeError: When trying to cast :class:`torch.float32` to :class:`torch.int32` or :class:`torch.int64` as + well as for trying to cast :class:`torch.float64` to :class:`torch.int64`. These conversions might lead to + overflow errors since the floating point ``dtype`` cannot store consecutive integers over the whole range + of the integer ``dtype``. + """ + + _v1_transform_cls = _transforms.ConvertImageDtype + + def __init__(self, dtype: torch.dtype = torch.float32) -> None: + super().__init__() + self.dtype = dtype + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.to_dtype, inpt, dtype=self.dtype, scale=True) + + +class SanitizeBoundingBoxes(Transform): + """Remove degenerate/invalid bounding boxes and their corresponding labels and masks. + + This transform removes bounding boxes and their associated labels/masks that: + + - are below a given ``min_size`` or ``min_area``: by default this also removes degenerate boxes that have e.g. X2 <= X1. + - have any coordinate outside of their corresponding image. You may want to + call :class:`~torchvision.transforms.v2.ClampBoundingBoxes` first to avoid undesired removals. + + It can also sanitize other tensors like the "iscrowd" or "area" properties from COCO + (see ``labels_getter`` parameter). + + It is recommended to call it at the end of a pipeline, before passing the + input to the models. It is critical to call this transform if + :class:`~torchvision.transforms.v2.RandomIoUCrop` was called. + If you want to be extra careful, you may call it after all transforms that + may modify bounding boxes but once at the end should be enough in most + cases. + + Args: + min_size (float, optional): The size below which bounding boxes are removed. Default is 1. + min_area (float, optional): The area below which bounding boxes are removed. Default is 1. + labels_getter (callable or str or None, optional): indicates how to identify the labels in the input + (or anything else that needs to be sanitized along with the bounding boxes). + By default, this will try to find a "labels" key in the input (case-insensitive), if + the input is a dict or it is a tuple whose second element is a dict. + This heuristic should work well with a lot of datasets, including the built-in torchvision datasets. + + It can also be a callable that takes the same input as the transform, and returns either: + + - A single tensor (the labels) + - A tuple/list of tensors, each of which will be subject to the same sanitization as the bounding boxes. + This is useful to sanitize multiple tensors like the labels, and the "iscrowd" or "area" properties + from COCO. + + If ``labels_getter`` is None then only bounding boxes are sanitized. + """ + + def __init__( + self, + min_size: float = 1.0, + min_area: float = 1.0, + labels_getter: Union[Callable[[Any], Any], str, None] = "default", + ) -> None: + super().__init__() + + if min_size < 1: + raise ValueError(f"min_size must be >= 1, got {min_size}.") + self.min_size = min_size + + if min_area < 1: + raise ValueError(f"min_area must be >= 1, got {min_area}.") + self.min_area = min_area + + self.labels_getter = labels_getter + self._labels_getter = _parse_labels_getter(labels_getter) + + def forward(self, *inputs: Any) -> Any: + inputs = inputs if len(inputs) > 1 else inputs[0] + + labels = self._labels_getter(inputs) + if labels is not None: + msg = "The labels in the input to forward() must be a tensor or None, got {type} instead." + if isinstance(labels, torch.Tensor): + labels = (labels,) + elif isinstance(labels, (tuple, list)): + for entry in labels: + if not isinstance(entry, torch.Tensor): + # TODO: we don't need to enforce tensors, just that entries are indexable as t[bool_mask] + raise ValueError(msg.format(type=type(entry))) + else: + raise ValueError(msg.format(type=type(labels))) + + flat_inputs, spec = tree_flatten(inputs) + boxes = get_bounding_boxes(flat_inputs) + + if labels is not None: + for label in labels: + if boxes.shape[0] != label.shape[0]: + raise ValueError( + f"Number of boxes (shape={boxes.shape}) and must match the number of labels." + f"Found labels with shape={label.shape})." + ) + + valid = F._misc._get_sanitize_bounding_boxes_mask( + boxes, + format=boxes.format, + canvas_size=boxes.canvas_size, + min_size=self.min_size, + min_area=self.min_area, + ) + + params = dict(valid=valid, labels=labels) + flat_outputs = [self.transform(inpt, params) for inpt in flat_inputs] + + return tree_unflatten(flat_outputs, spec) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + is_label = params["labels"] is not None and any(inpt is label for label in params["labels"]) + is_bounding_boxes_or_mask = isinstance(inpt, (tv_tensors.BoundingBoxes, tv_tensors.Mask)) + + if not (is_label or is_bounding_boxes_or_mask): + return inpt + + output = inpt[params["valid"]] + + if is_label: + return output + else: + return tv_tensors.wrap(output, like=inpt) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_temporal.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_temporal.py new file mode 100644 index 0000000000000000000000000000000000000000..dd088aa7c7d3053835310e52591c987fa58260f6 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_temporal.py @@ -0,0 +1,26 @@ +from typing import Any, Dict + +import torch +from torchvision.transforms.v2 import functional as F, Transform + + +class UniformTemporalSubsample(Transform): + """Uniformly subsample ``num_samples`` indices from the temporal dimension of the video. + + Videos are expected to be of shape ``[..., T, C, H, W]`` where ``T`` denotes the temporal dimension. + + When ``num_samples`` is larger than the size of temporal dimension of the video, it + will sample frames based on nearest neighbor interpolation. + + Args: + num_samples (int): The number of equispaced samples to be selected + """ + + _transformed_types = (torch.Tensor,) + + def __init__(self, num_samples: int): + super().__init__() + self.num_samples = num_samples + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + return self._call_kernel(F.uniform_temporal_subsample, inpt, self.num_samples) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_transform.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_transform.py new file mode 100644 index 0000000000000000000000000000000000000000..e96ee20bedd087947eda3f8fbd4f2a20de497613 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_transform.py @@ -0,0 +1,194 @@ +from __future__ import annotations + +import enum +from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union + +import PIL.Image +import torch +from torch import nn +from torch.utils._pytree import tree_flatten, tree_unflatten +from torchvision import tv_tensors +from torchvision.transforms.v2._utils import check_type, has_any, is_pure_tensor +from torchvision.utils import _log_api_usage_once + +from .functional._utils import _get_kernel + + +class Transform(nn.Module): + """Base class to implement your own v2 transforms. + + See :ref:`sphx_glr_auto_examples_transforms_plot_custom_transforms.py` for + more details. + """ + + # Class attribute defining transformed types. Other types are passed-through without any transformation + # We support both Types and callables that are able to do further checks on the type of the input. + _transformed_types: Tuple[Union[Type, Callable[[Any], bool]], ...] = (torch.Tensor, PIL.Image.Image) + + def __init__(self) -> None: + super().__init__() + _log_api_usage_once(self) + + def check_inputs(self, flat_inputs: List[Any]) -> None: + pass + + # When v2 was introduced, this method was private and called + # `_get_params()`. Now it's publicly exposed as `make_params()`. It cannot + # be exposed as `get_params()` because there is already a `get_params()` + # methods for v2 transforms: it's the v1's `get_params()` that we have to + # keep in order to guarantee 100% BC with v1. (It's defined in + # __init_subclass__ below). + def make_params(self, flat_inputs: List[Any]) -> Dict[str, Any]: + """Method to override for custom transforms. + + See :ref:`sphx_glr_auto_examples_transforms_plot_custom_transforms.py`""" + return dict() + + def _call_kernel(self, functional: Callable, inpt: Any, *args: Any, **kwargs: Any) -> Any: + kernel = _get_kernel(functional, type(inpt), allow_passthrough=True) + return kernel(inpt, *args, **kwargs) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> Any: + """Method to override for custom transforms. + + See :ref:`sphx_glr_auto_examples_transforms_plot_custom_transforms.py`""" + raise NotImplementedError + + def forward(self, *inputs: Any) -> Any: + """Do not override this! Use ``transform()`` instead.""" + flat_inputs, spec = tree_flatten(inputs if len(inputs) > 1 else inputs[0]) + + self.check_inputs(flat_inputs) + + needs_transform_list = self._needs_transform_list(flat_inputs) + params = self.make_params( + [inpt for (inpt, needs_transform) in zip(flat_inputs, needs_transform_list) if needs_transform] + ) + + flat_outputs = [ + self.transform(inpt, params) if needs_transform else inpt + for (inpt, needs_transform) in zip(flat_inputs, needs_transform_list) + ] + + return tree_unflatten(flat_outputs, spec) + + def _needs_transform_list(self, flat_inputs: List[Any]) -> List[bool]: + # Below is a heuristic on how to deal with pure tensor inputs: + # 1. Pure tensors, i.e. tensors that are not a tv_tensor, are passed through if there is an explicit image + # (`tv_tensors.Image` or `PIL.Image.Image`) or video (`tv_tensors.Video`) in the sample. + # 2. If there is no explicit image or video in the sample, only the first encountered pure tensor is + # transformed as image, while the rest is passed through. The order is defined by the returned `flat_inputs` + # of `tree_flatten`, which recurses depth-first through the input. + # + # This heuristic stems from two requirements: + # 1. We need to keep BC for single input pure tensors and treat them as images. + # 2. We don't want to treat all pure tensors as images, because some datasets like `CelebA` or `Widerface` + # return supplemental numerical data as tensors that cannot be transformed as images. + # + # The heuristic should work well for most people in practice. The only case where it doesn't is if someone + # tries to transform multiple pure tensors at the same time, expecting them all to be treated as images. + # However, this case wasn't supported by transforms v1 either, so there is no BC concern. + + needs_transform_list = [] + transform_pure_tensor = not has_any(flat_inputs, tv_tensors.Image, tv_tensors.Video, PIL.Image.Image) + for inpt in flat_inputs: + needs_transform = True + + if not check_type(inpt, self._transformed_types): + needs_transform = False + elif is_pure_tensor(inpt): + if transform_pure_tensor: + transform_pure_tensor = False + else: + needs_transform = False + needs_transform_list.append(needs_transform) + return needs_transform_list + + def extra_repr(self) -> str: + extra = [] + for name, value in self.__dict__.items(): + if name.startswith("_") or name == "training": + continue + + if not isinstance(value, (bool, int, float, str, tuple, list, enum.Enum)): + continue + + extra.append(f"{name}={value}") + + return ", ".join(extra) + + # This attribute should be set on all transforms that have a v1 equivalent. Doing so enables two things: + # 1. In case the v1 transform has a static `get_params` method, it will also be available under the same name on + # the v2 transform. See `__init_subclass__` for details. + # 2. The v2 transform will be JIT scriptable. See `_extract_params_for_v1_transform` and `__prepare_scriptable__` + # for details. + _v1_transform_cls: Optional[Type[nn.Module]] = None + + def __init_subclass__(cls) -> None: + # Since `get_params` is a `@staticmethod`, we have to bind it to the class itself rather than to an instance. + # This method is called after subclassing has happened, i.e. `cls` is the subclass, e.g. `Resize`. + if cls._v1_transform_cls is not None and hasattr(cls._v1_transform_cls, "get_params"): + cls.get_params = staticmethod(cls._v1_transform_cls.get_params) # type: ignore[attr-defined] + + def _extract_params_for_v1_transform(self) -> Dict[str, Any]: + # This method is called by `__prepare_scriptable__` to instantiate the equivalent v1 transform from the current + # v2 transform instance. It extracts all available public attributes that are specific to that transform and + # not `nn.Module` in general. + # Overwrite this method on the v2 transform class if the above is not sufficient. For example, this might happen + # if the v2 transform introduced new parameters that are not support by the v1 transform. + common_attrs = nn.Module().__dict__.keys() + return { + attr: value + for attr, value in self.__dict__.items() + if not attr.startswith("_") and attr not in common_attrs + } + + def __prepare_scriptable__(self) -> nn.Module: + # This method is called early on when `torch.jit.script`'ing an `nn.Module` instance. If it succeeds, the return + # value is used for scripting over the original object that should have been scripted. Since the v1 transforms + # are JIT scriptable, and we made sure that for single image inputs v1 and v2 are equivalent, we just return the + # equivalent v1 transform here. This of course only makes transforms v2 JIT scriptable as long as transforms v1 + # is around. + if self._v1_transform_cls is None: + raise RuntimeError( + f"Transform {type(self).__name__} cannot be JIT scripted. " + "torchscript is only supported for backward compatibility with transforms " + "which are already in torchvision.transforms. " + "For torchscript support (on tensors only), you can use the functional API instead." + ) + + return self._v1_transform_cls(**self._extract_params_for_v1_transform()) + + +class _RandomApplyTransform(Transform): + def __init__(self, p: float = 0.5) -> None: + if not (0.0 <= p <= 1.0): + raise ValueError("`p` should be a floating point value in the interval [0.0, 1.0].") + + super().__init__() + self.p = p + + def forward(self, *inputs: Any) -> Any: + # We need to almost duplicate `Transform.forward()` here since we always want to check the inputs, but return + # early afterwards in case the random check triggers. The same result could be achieved by calling + # `super().forward()` after the random check, but that would call `self.check_inputs` twice. + + inputs = inputs if len(inputs) > 1 else inputs[0] + flat_inputs, spec = tree_flatten(inputs) + + self.check_inputs(flat_inputs) + + if torch.rand(1) >= self.p: + return inputs + + needs_transform_list = self._needs_transform_list(flat_inputs) + params = self.make_params( + [inpt for (inpt, needs_transform) in zip(flat_inputs, needs_transform_list) if needs_transform] + ) + + flat_outputs = [ + self.transform(inpt, params) if needs_transform else inpt + for (inpt, needs_transform) in zip(flat_inputs, needs_transform_list) + ] + + return tree_unflatten(flat_outputs, spec) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_type_conversion.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_type_conversion.py new file mode 100644 index 0000000000000000000000000000000000000000..ad9d9b33c2f53dde6a83861b70efa14daf169bb5 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_type_conversion.py @@ -0,0 +1,84 @@ +from typing import Any, Dict, Optional, Union + +import numpy as np +import PIL.Image +import torch + +from torchvision import tv_tensors +from torchvision.transforms.v2 import functional as F, Transform + +from torchvision.transforms.v2._utils import is_pure_tensor + + +class PILToTensor(Transform): + """Convert a PIL Image to a tensor of the same type - this does not scale values. + + This transform does not support torchscript. + + Converts a PIL Image (H x W x C) to a Tensor of shape (C x H x W). + """ + + _transformed_types = (PIL.Image.Image,) + + def transform(self, inpt: PIL.Image.Image, params: Dict[str, Any]) -> torch.Tensor: + return F.pil_to_tensor(inpt) + + +class ToImage(Transform): + """Convert a tensor, ndarray, or PIL Image to :class:`~torchvision.tv_tensors.Image` + ; this does not scale values. + + This transform does not support torchscript. + """ + + _transformed_types = (is_pure_tensor, PIL.Image.Image, np.ndarray) + + def transform( + self, inpt: Union[torch.Tensor, PIL.Image.Image, np.ndarray], params: Dict[str, Any] + ) -> tv_tensors.Image: + return F.to_image(inpt) + + +class ToPILImage(Transform): + """Convert a tensor or an ndarray to PIL Image + + This transform does not support torchscript. + + Converts a torch.*Tensor of shape C x H x W or a numpy ndarray of shape + H x W x C to a PIL Image while adjusting the value range depending on the ``mode``. + + Args: + mode (`PIL.Image mode`_): color space and pixel depth of input data (optional). + If ``mode`` is ``None`` (default) there are some assumptions made about the input data: + + - If the input has 4 channels, the ``mode`` is assumed to be ``RGBA``. + - If the input has 3 channels, the ``mode`` is assumed to be ``RGB``. + - If the input has 2 channels, the ``mode`` is assumed to be ``LA``. + - If the input has 1 channel, the ``mode`` is determined by the data type (i.e ``int``, ``float``, + ``short``). + + .. _PIL.Image mode: https://pillow.readthedocs.io/en/latest/handbook/concepts.html#concept-modes + """ + + _transformed_types = (is_pure_tensor, tv_tensors.Image, np.ndarray) + + def __init__(self, mode: Optional[str] = None) -> None: + super().__init__() + self.mode = mode + + def transform( + self, inpt: Union[torch.Tensor, PIL.Image.Image, np.ndarray], params: Dict[str, Any] + ) -> PIL.Image.Image: + return F.to_pil_image(inpt, mode=self.mode) + + +class ToPureTensor(Transform): + """Convert all TVTensors to pure tensors, removing associated metadata (if any). + + This doesn't scale or change the values, only the type. + """ + + _transformed_types = (tv_tensors.TVTensor,) + + def transform(self, inpt: Any, params: Dict[str, Any]) -> torch.Tensor: + return inpt.as_subclass(torch.Tensor) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..e9f1625b7b50913eecd5235036f1909bcd7c002c --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/_utils.py @@ -0,0 +1,226 @@ +from __future__ import annotations + +import collections.abc +import numbers +from contextlib import suppress + +from typing import Any, Callable, Dict, List, Literal, Sequence, Tuple, Type, Union + +import PIL.Image +import torch + +from torchvision import tv_tensors + +from torchvision._utils import sequence_to_str + +from torchvision.transforms.transforms import _check_sequence_input, _setup_angle, _setup_size # noqa: F401 +from torchvision.transforms.v2.functional import get_dimensions, get_size, is_pure_tensor +from torchvision.transforms.v2.functional._utils import _FillType, _FillTypeJIT + + +def _setup_number_or_seq(arg: Union[int, float, Sequence[Union[int, float]]], name: str) -> Sequence[float]: + if not isinstance(arg, (int, float, Sequence)): + raise TypeError(f"{name} should be a number or a sequence of numbers. Got {type(arg)}") + if isinstance(arg, Sequence) and len(arg) not in (1, 2): + raise ValueError(f"If {name} is a sequence its length should be 1 or 2. Got {len(arg)}") + if isinstance(arg, Sequence): + for element in arg: + if not isinstance(element, (int, float)): + raise ValueError(f"{name} should be a sequence of numbers. Got {type(element)}") + + if isinstance(arg, (int, float)): + arg = [float(arg), float(arg)] + elif isinstance(arg, Sequence): + if len(arg) == 1: + arg = [float(arg[0]), float(arg[0])] + else: + arg = [float(arg[0]), float(arg[1])] + return arg + + +def _check_fill_arg(fill: Union[_FillType, Dict[Union[Type, str], _FillType]]) -> None: + if isinstance(fill, dict): + for value in fill.values(): + _check_fill_arg(value) + else: + if fill is not None and not isinstance(fill, (numbers.Number, tuple, list)): + raise TypeError("Got inappropriate fill arg, only Numbers, tuples, lists and dicts are allowed.") + + +def _convert_fill_arg(fill: _FillType) -> _FillTypeJIT: + # Fill = 0 is not equivalent to None, https://github.com/pytorch/vision/issues/6517 + # So, we can't reassign fill to 0 + # if fill is None: + # fill = 0 + if fill is None: + return fill + + if not isinstance(fill, (int, float)): + fill = [float(v) for v in list(fill)] + return fill # type: ignore[return-value] + + +def _setup_fill_arg(fill: Union[_FillType, Dict[Union[Type, str], _FillType]]) -> Dict[Union[Type, str], _FillTypeJIT]: + _check_fill_arg(fill) + + if isinstance(fill, dict): + for k, v in fill.items(): + fill[k] = _convert_fill_arg(v) + return fill # type: ignore[return-value] + else: + return {"others": _convert_fill_arg(fill)} + + +def _get_fill(fill_dict, inpt_type): + if inpt_type in fill_dict: + return fill_dict[inpt_type] + elif "others" in fill_dict: + return fill_dict["others"] + else: + RuntimeError("This should never happen, please open an issue on the torchvision repo if you hit this.") + + +def _check_padding_arg(padding: Union[int, Sequence[int]]) -> None: + if not isinstance(padding, (numbers.Number, tuple, list)): + raise TypeError("Got inappropriate padding arg") + + if isinstance(padding, (tuple, list)) and len(padding) not in [1, 2, 4]: + raise ValueError(f"Padding must be an int or a 1, 2, or 4 element tuple, not a {len(padding)} element tuple") + + +# TODO: let's use torchvision._utils.StrEnum to have the best of both worlds (strings and enums) +# https://github.com/pytorch/vision/issues/6250 +def _check_padding_mode_arg(padding_mode: Literal["constant", "edge", "reflect", "symmetric"]) -> None: + if padding_mode not in ["constant", "edge", "reflect", "symmetric"]: + raise ValueError("Padding mode should be either constant, edge, reflect or symmetric") + + +def _find_labels_default_heuristic(inputs: Any) -> torch.Tensor: + """ + This heuristic covers three cases: + + 1. The input is tuple or list whose second item is a labels tensor. This happens for already batched + classification inputs for MixUp and CutMix (typically after the Dataloder). + 2. The input is a tuple or list whose second item is a dictionary that contains the labels tensor + under a label-like (see below) key. This happens for the inputs of detection models. + 3. The input is a dictionary that is structured as the one from 2. + + What is "label-like" key? We first search for an case-insensitive match of 'labels' inside the keys of the + dictionary. This is the name our detection models expect. If we can't find that, we look for a case-insensitive + match of the term 'label' anywhere inside the key, i.e. 'FooLaBeLBar'. If we can't find that either, the dictionary + contains no "label-like" key. + """ + + if isinstance(inputs, (tuple, list)): + inputs = inputs[1] + + # MixUp, CutMix + if is_pure_tensor(inputs): + return inputs + + if not isinstance(inputs, collections.abc.Mapping): + raise ValueError( + f"When using the default labels_getter, the input passed to forward must be a dictionary or a two-tuple " + f"whose second item is a dictionary or a tensor, but got {inputs} instead." + ) + + candidate_key = None + with suppress(StopIteration): + candidate_key = next(key for key in inputs.keys() if key.lower() == "labels") + if candidate_key is None: + with suppress(StopIteration): + candidate_key = next(key for key in inputs.keys() if "label" in key.lower()) + if candidate_key is None: + raise ValueError( + "Could not infer where the labels are in the sample. Try passing a callable as the labels_getter parameter?" + "If there are no labels in the sample by design, pass labels_getter=None." + ) + + return inputs[candidate_key] + + +def _parse_labels_getter(labels_getter: Union[str, Callable[[Any], Any], None]) -> Callable[[Any], Any]: + if labels_getter == "default": + return _find_labels_default_heuristic + elif callable(labels_getter): + return labels_getter + elif labels_getter is None: + return lambda _: None + else: + raise ValueError(f"labels_getter should either be 'default', a callable, or None, but got {labels_getter}.") + + +def get_bounding_boxes(flat_inputs: List[Any]) -> tv_tensors.BoundingBoxes: + """Return the Bounding Boxes in the input. + + Assumes only one ``BoundingBoxes`` object is present. + """ + # This assumes there is only one bbox per sample as per the general convention + try: + return next(inpt for inpt in flat_inputs if isinstance(inpt, tv_tensors.BoundingBoxes)) + except StopIteration: + raise ValueError("No bounding boxes were found in the sample") + + +def query_chw(flat_inputs: List[Any]) -> Tuple[int, int, int]: + """Return Channel, Height, and Width.""" + chws = { + tuple(get_dimensions(inpt)) + for inpt in flat_inputs + if check_type(inpt, (is_pure_tensor, tv_tensors.Image, PIL.Image.Image, tv_tensors.Video)) + } + if not chws: + raise TypeError("No image or video was found in the sample") + elif len(chws) > 1: + raise ValueError(f"Found multiple CxHxW dimensions in the sample: {sequence_to_str(sorted(chws))}") + c, h, w = chws.pop() + return c, h, w + + +def query_size(flat_inputs: List[Any]) -> Tuple[int, int]: + """Return Height and Width.""" + sizes = { + tuple(get_size(inpt)) + for inpt in flat_inputs + if check_type( + inpt, + ( + is_pure_tensor, + tv_tensors.Image, + PIL.Image.Image, + tv_tensors.Video, + tv_tensors.Mask, + tv_tensors.BoundingBoxes, + ), + ) + } + if not sizes: + raise TypeError("No image, video, mask or bounding box was found in the sample") + elif len(sizes) > 1: + raise ValueError(f"Found multiple HxW dimensions in the sample: {sequence_to_str(sorted(sizes))}") + h, w = sizes.pop() + return h, w + + +def check_type(obj: Any, types_or_checks: Tuple[Union[Type, Callable[[Any], bool]], ...]) -> bool: + for type_or_check in types_or_checks: + if isinstance(obj, type_or_check) if isinstance(type_or_check, type) else type_or_check(obj): + return True + return False + + +def has_any(flat_inputs: List[Any], *types_or_checks: Union[Type, Callable[[Any], bool]]) -> bool: + for inpt in flat_inputs: + if check_type(inpt, types_or_checks): + return True + return False + + +def has_all(flat_inputs: List[Any], *types_or_checks: Union[Type, Callable[[Any], bool]]) -> bool: + for type_or_check in types_or_checks: + for inpt in flat_inputs: + if isinstance(inpt, type_or_check) if isinstance(type_or_check, type) else type_or_check(inpt): + break + else: + return False + return True diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..464bc42a2ec333f50116b6440e7c5891fe6525d9 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__init__.py @@ -0,0 +1,153 @@ +from torchvision.transforms import InterpolationMode # usort: skip + +from ._utils import is_pure_tensor, register_kernel # usort: skip + +from ._meta import ( + clamp_bounding_boxes, + convert_bounding_box_format, + get_dimensions_image, + get_dimensions_video, + get_dimensions, + get_num_frames_video, + get_num_frames, + get_image_num_channels, + get_num_channels_image, + get_num_channels_video, + get_num_channels, + get_size_bounding_boxes, + get_size_image, + get_size_mask, + get_size_video, + get_size, +) # usort: skip + +from ._augment import erase, erase_image, erase_video, jpeg, jpeg_image, jpeg_video +from ._color import ( + adjust_brightness, + adjust_brightness_image, + adjust_brightness_video, + adjust_contrast, + adjust_contrast_image, + adjust_contrast_video, + adjust_gamma, + adjust_gamma_image, + adjust_gamma_video, + adjust_hue, + adjust_hue_image, + adjust_hue_video, + adjust_saturation, + adjust_saturation_image, + adjust_saturation_video, + adjust_sharpness, + adjust_sharpness_image, + adjust_sharpness_video, + autocontrast, + autocontrast_image, + autocontrast_video, + equalize, + equalize_image, + equalize_video, + grayscale_to_rgb, + grayscale_to_rgb_image, + invert, + invert_image, + invert_video, + permute_channels, + permute_channels_image, + permute_channels_video, + posterize, + posterize_image, + posterize_video, + rgb_to_grayscale, + rgb_to_grayscale_image, + solarize, + solarize_image, + solarize_video, + to_grayscale, +) +from ._geometry import ( + affine, + affine_bounding_boxes, + affine_image, + affine_mask, + affine_video, + center_crop, + center_crop_bounding_boxes, + center_crop_image, + center_crop_mask, + center_crop_video, + crop, + crop_bounding_boxes, + crop_image, + crop_mask, + crop_video, + elastic, + elastic_bounding_boxes, + elastic_image, + elastic_mask, + elastic_transform, + elastic_video, + five_crop, + five_crop_image, + five_crop_video, + hflip, # TODO: Consider moving all pure alias definitions at the bottom of the file + horizontal_flip, + horizontal_flip_bounding_boxes, + horizontal_flip_image, + horizontal_flip_mask, + horizontal_flip_video, + pad, + pad_bounding_boxes, + pad_image, + pad_mask, + pad_video, + perspective, + perspective_bounding_boxes, + perspective_image, + perspective_mask, + perspective_video, + resize, + resize_bounding_boxes, + resize_image, + resize_mask, + resize_video, + resized_crop, + resized_crop_bounding_boxes, + resized_crop_image, + resized_crop_mask, + resized_crop_video, + rotate, + rotate_bounding_boxes, + rotate_image, + rotate_mask, + rotate_video, + ten_crop, + ten_crop_image, + ten_crop_video, + vertical_flip, + vertical_flip_bounding_boxes, + vertical_flip_image, + vertical_flip_mask, + vertical_flip_video, + vflip, +) +from ._misc import ( + convert_image_dtype, + gaussian_blur, + gaussian_blur_image, + gaussian_blur_video, + gaussian_noise, + gaussian_noise_image, + gaussian_noise_video, + normalize, + normalize_image, + normalize_video, + sanitize_bounding_boxes, + to_dtype, + to_dtype_image, + to_dtype_video, +) +from ._temporal import uniform_temporal_subsample, uniform_temporal_subsample_video +from ._type_conversion import pil_to_tensor, to_image, to_pil_image + +from ._deprecated import get_image_size, to_tensor # usort: skip diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96fc1a8105a8eee564494c5d54aa0e1bb33f3707 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_augment.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_augment.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a0899a116084bca6f39eea8fa47219ab9eaf87a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_augment.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_color.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_color.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a476ab5bb74e702f5b4a77fc1ac6069c20822e0 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_color.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_deprecated.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_deprecated.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d068f409afc789029894f8f0215e9d7d40fe289a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_deprecated.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_meta.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_meta.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5a617dcefd67740ecbd6709efacdcb26d554acf9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_meta.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_misc.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_misc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4c877cda5b7f9acd376df70094b17ec36ff26f1a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_misc.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_temporal.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_temporal.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eacd3d7f345347a54a4c00113abe7f20401b807d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_temporal.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_type_conversion.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_type_conversion.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..990bfb369df48e829f2e74107e9a0d8dceb442d0 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_type_conversion.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d8f9a69f4bbaa232a8a37f2283c5220c5d78c50d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_augment.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_augment.py new file mode 100644 index 0000000000000000000000000000000000000000..cc52ee7b82b7f81603432dab41114ade1efd74f0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_augment.py @@ -0,0 +1,106 @@ +import io + +import PIL.Image + +import torch +from torchvision import tv_tensors +from torchvision.io import decode_jpeg, encode_jpeg +from torchvision.transforms.functional import pil_to_tensor, to_pil_image +from torchvision.utils import _log_api_usage_once + +from ._utils import _get_kernel, _register_kernel_internal + + +def erase( + inpt: torch.Tensor, + i: int, + j: int, + h: int, + w: int, + v: torch.Tensor, + inplace: bool = False, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomErase` for details.""" + if torch.jit.is_scripting(): + return erase_image(inpt, i=i, j=j, h=h, w=w, v=v, inplace=inplace) + + _log_api_usage_once(erase) + + kernel = _get_kernel(erase, type(inpt)) + return kernel(inpt, i=i, j=j, h=h, w=w, v=v, inplace=inplace) + + +@_register_kernel_internal(erase, torch.Tensor) +@_register_kernel_internal(erase, tv_tensors.Image) +def erase_image( + image: torch.Tensor, i: int, j: int, h: int, w: int, v: torch.Tensor, inplace: bool = False +) -> torch.Tensor: + if not inplace: + image = image.clone() + + image[..., i : i + h, j : j + w] = v + return image + + +@_register_kernel_internal(erase, PIL.Image.Image) +def _erase_image_pil( + image: PIL.Image.Image, i: int, j: int, h: int, w: int, v: torch.Tensor, inplace: bool = False +) -> PIL.Image.Image: + t_img = pil_to_tensor(image) + output = erase_image(t_img, i=i, j=j, h=h, w=w, v=v, inplace=inplace) + return to_pil_image(output, mode=image.mode) + + +@_register_kernel_internal(erase, tv_tensors.Video) +def erase_video( + video: torch.Tensor, i: int, j: int, h: int, w: int, v: torch.Tensor, inplace: bool = False +) -> torch.Tensor: + return erase_image(video, i=i, j=j, h=h, w=w, v=v, inplace=inplace) + + +def jpeg(image: torch.Tensor, quality: int) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.JPEG` for details.""" + if torch.jit.is_scripting(): + return jpeg_image(image, quality=quality) + + _log_api_usage_once(jpeg) + + kernel = _get_kernel(jpeg, type(image)) + return kernel(image, quality=quality) + + +@_register_kernel_internal(jpeg, torch.Tensor) +@_register_kernel_internal(jpeg, tv_tensors.Image) +def jpeg_image(image: torch.Tensor, quality: int) -> torch.Tensor: + original_shape = image.shape + image = image.view((-1,) + image.shape[-3:]) + + if image.shape[0] == 0: # degenerate + return image.reshape(original_shape).clone() + + images = [] + for i in range(image.shape[0]): + # isinstance checks are needed for torchscript. + encoded_image = encode_jpeg(image[i], quality=quality) + assert isinstance(encoded_image, torch.Tensor) + decoded_image = decode_jpeg(encoded_image) + assert isinstance(decoded_image, torch.Tensor) + images.append(decoded_image) + + images = torch.stack(images, dim=0).view(original_shape) + return images + + +@_register_kernel_internal(jpeg, tv_tensors.Video) +def jpeg_video(video: torch.Tensor, quality: int) -> torch.Tensor: + return jpeg_image(video, quality=quality) + + +@_register_kernel_internal(jpeg, PIL.Image.Image) +def _jpeg_image_pil(image: PIL.Image.Image, quality: int) -> PIL.Image.Image: + raw_jpeg = io.BytesIO() + image.save(raw_jpeg, format="JPEG", quality=quality) + + # we need to copy since PIL.Image.open() will return PIL.JpegImagePlugin.JpegImageFile + # which is a sub-class of PIL.Image.Image. this will fail check_transform() test. + return PIL.Image.open(raw_jpeg).copy() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_color.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_color.py new file mode 100644 index 0000000000000000000000000000000000000000..a4331cf4e03e89e6ef406b4fcea865cc240914e1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_color.py @@ -0,0 +1,739 @@ +from typing import List + +import PIL.Image +import torch +from torch.nn.functional import conv2d +from torchvision import tv_tensors +from torchvision.transforms import _functional_pil as _FP +from torchvision.transforms._functional_tensor import _max_value + +from torchvision.utils import _log_api_usage_once + +from ._misc import _num_value_bits, to_dtype_image +from ._type_conversion import pil_to_tensor, to_pil_image +from ._utils import _get_kernel, _register_kernel_internal + + +def rgb_to_grayscale(inpt: torch.Tensor, num_output_channels: int = 1) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.Grayscale` for details.""" + if torch.jit.is_scripting(): + return rgb_to_grayscale_image(inpt, num_output_channels=num_output_channels) + + _log_api_usage_once(rgb_to_grayscale) + + kernel = _get_kernel(rgb_to_grayscale, type(inpt)) + return kernel(inpt, num_output_channels=num_output_channels) + + +# `to_grayscale` actually predates `rgb_to_grayscale` in v1, but only handles PIL images. Since `rgb_to_grayscale` is a +# superset in terms of functionality and has the same signature, we alias here to avoid disruption. +to_grayscale = rgb_to_grayscale + + +def _rgb_to_grayscale_image( + image: torch.Tensor, num_output_channels: int = 1, preserve_dtype: bool = True +) -> torch.Tensor: + # TODO: Maybe move the validation that num_output_channels is 1 or 3 to this function instead of callers. + if image.shape[-3] == 1 and num_output_channels == 1: + return image.clone() + if image.shape[-3] == 1 and num_output_channels == 3: + s = [1] * len(image.shape) + s[-3] = 3 + return image.repeat(s) + r, g, b = image.unbind(dim=-3) + l_img = r.mul(0.2989).add_(g, alpha=0.587).add_(b, alpha=0.114) + l_img = l_img.unsqueeze(dim=-3) + if preserve_dtype: + l_img = l_img.to(image.dtype) + if num_output_channels == 3: + l_img = l_img.expand(image.shape) + return l_img + + +@_register_kernel_internal(rgb_to_grayscale, torch.Tensor) +@_register_kernel_internal(rgb_to_grayscale, tv_tensors.Image) +def rgb_to_grayscale_image(image: torch.Tensor, num_output_channels: int = 1) -> torch.Tensor: + if num_output_channels not in (1, 3): + raise ValueError(f"num_output_channels must be 1 or 3, got {num_output_channels}.") + return _rgb_to_grayscale_image(image, num_output_channels=num_output_channels, preserve_dtype=True) + + +@_register_kernel_internal(rgb_to_grayscale, PIL.Image.Image) +def _rgb_to_grayscale_image_pil(image: PIL.Image.Image, num_output_channels: int = 1) -> PIL.Image.Image: + if num_output_channels not in (1, 3): + raise ValueError(f"num_output_channels must be 1 or 3, got {num_output_channels}.") + return _FP.to_grayscale(image, num_output_channels=num_output_channels) + + +def grayscale_to_rgb(inpt: torch.Tensor) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RGB` for details.""" + if torch.jit.is_scripting(): + return grayscale_to_rgb_image(inpt) + + _log_api_usage_once(grayscale_to_rgb) + + kernel = _get_kernel(grayscale_to_rgb, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(grayscale_to_rgb, torch.Tensor) +@_register_kernel_internal(grayscale_to_rgb, tv_tensors.Image) +def grayscale_to_rgb_image(image: torch.Tensor) -> torch.Tensor: + if image.shape[-3] >= 3: + # Image already has RGB channels. We don't need to do anything. + return image + # rgb_to_grayscale can be used to add channels so we reuse that function. + return _rgb_to_grayscale_image(image, num_output_channels=3, preserve_dtype=True) + + +@_register_kernel_internal(grayscale_to_rgb, PIL.Image.Image) +def grayscale_to_rgb_image_pil(image: PIL.Image.Image) -> PIL.Image.Image: + return image.convert(mode="RGB") + + +def _blend(image1: torch.Tensor, image2: torch.Tensor, ratio: float) -> torch.Tensor: + ratio = float(ratio) + fp = image1.is_floating_point() + bound = _max_value(image1.dtype) + output = image1.mul(ratio).add_(image2, alpha=(1.0 - ratio)).clamp_(0, bound) + return output if fp else output.to(image1.dtype) + + +def adjust_brightness(inpt: torch.Tensor, brightness_factor: float) -> torch.Tensor: + """Adjust brightness.""" + + if torch.jit.is_scripting(): + return adjust_brightness_image(inpt, brightness_factor=brightness_factor) + + _log_api_usage_once(adjust_brightness) + + kernel = _get_kernel(adjust_brightness, type(inpt)) + return kernel(inpt, brightness_factor=brightness_factor) + + +@_register_kernel_internal(adjust_brightness, torch.Tensor) +@_register_kernel_internal(adjust_brightness, tv_tensors.Image) +def adjust_brightness_image(image: torch.Tensor, brightness_factor: float) -> torch.Tensor: + if brightness_factor < 0: + raise ValueError(f"brightness_factor ({brightness_factor}) is not non-negative.") + + c = image.shape[-3] + if c not in [1, 3]: + raise TypeError(f"Input image tensor permitted channel values are 1 or 3, but found {c}") + + fp = image.is_floating_point() + bound = _max_value(image.dtype) + output = image.mul(brightness_factor).clamp_(0, bound) + return output if fp else output.to(image.dtype) + + +@_register_kernel_internal(adjust_brightness, PIL.Image.Image) +def _adjust_brightness_image_pil(image: PIL.Image.Image, brightness_factor: float) -> PIL.Image.Image: + return _FP.adjust_brightness(image, brightness_factor=brightness_factor) + + +@_register_kernel_internal(adjust_brightness, tv_tensors.Video) +def adjust_brightness_video(video: torch.Tensor, brightness_factor: float) -> torch.Tensor: + return adjust_brightness_image(video, brightness_factor=brightness_factor) + + +def adjust_saturation(inpt: torch.Tensor, saturation_factor: float) -> torch.Tensor: + """Adjust saturation.""" + if torch.jit.is_scripting(): + return adjust_saturation_image(inpt, saturation_factor=saturation_factor) + + _log_api_usage_once(adjust_saturation) + + kernel = _get_kernel(adjust_saturation, type(inpt)) + return kernel(inpt, saturation_factor=saturation_factor) + + +@_register_kernel_internal(adjust_saturation, torch.Tensor) +@_register_kernel_internal(adjust_saturation, tv_tensors.Image) +def adjust_saturation_image(image: torch.Tensor, saturation_factor: float) -> torch.Tensor: + if saturation_factor < 0: + raise ValueError(f"saturation_factor ({saturation_factor}) is not non-negative.") + + c = image.shape[-3] + if c not in [1, 3]: + raise TypeError(f"Input image tensor permitted channel values are 1 or 3, but found {c}") + + if c == 1: # Match PIL behaviour + return image + + grayscale_image = _rgb_to_grayscale_image(image, num_output_channels=1, preserve_dtype=False) + if not image.is_floating_point(): + grayscale_image = grayscale_image.floor_() + + return _blend(image, grayscale_image, saturation_factor) + + +_adjust_saturation_image_pil = _register_kernel_internal(adjust_saturation, PIL.Image.Image)(_FP.adjust_saturation) + + +@_register_kernel_internal(adjust_saturation, tv_tensors.Video) +def adjust_saturation_video(video: torch.Tensor, saturation_factor: float) -> torch.Tensor: + return adjust_saturation_image(video, saturation_factor=saturation_factor) + + +def adjust_contrast(inpt: torch.Tensor, contrast_factor: float) -> torch.Tensor: + """See :class:`~torchvision.transforms.RandomAutocontrast`""" + if torch.jit.is_scripting(): + return adjust_contrast_image(inpt, contrast_factor=contrast_factor) + + _log_api_usage_once(adjust_contrast) + + kernel = _get_kernel(adjust_contrast, type(inpt)) + return kernel(inpt, contrast_factor=contrast_factor) + + +@_register_kernel_internal(adjust_contrast, torch.Tensor) +@_register_kernel_internal(adjust_contrast, tv_tensors.Image) +def adjust_contrast_image(image: torch.Tensor, contrast_factor: float) -> torch.Tensor: + if contrast_factor < 0: + raise ValueError(f"contrast_factor ({contrast_factor}) is not non-negative.") + + c = image.shape[-3] + if c not in [1, 3]: + raise TypeError(f"Input image tensor permitted channel values are 1 or 3, but found {c}") + fp = image.is_floating_point() + if c == 3: + grayscale_image = _rgb_to_grayscale_image(image, num_output_channels=1, preserve_dtype=False) + if not fp: + grayscale_image = grayscale_image.floor_() + else: + grayscale_image = image if fp else image.to(torch.float32) + mean = torch.mean(grayscale_image, dim=(-3, -2, -1), keepdim=True) + return _blend(image, mean, contrast_factor) + + +_adjust_contrast_image_pil = _register_kernel_internal(adjust_contrast, PIL.Image.Image)(_FP.adjust_contrast) + + +@_register_kernel_internal(adjust_contrast, tv_tensors.Video) +def adjust_contrast_video(video: torch.Tensor, contrast_factor: float) -> torch.Tensor: + return adjust_contrast_image(video, contrast_factor=contrast_factor) + + +def adjust_sharpness(inpt: torch.Tensor, sharpness_factor: float) -> torch.Tensor: + """See :class:`~torchvision.transforms.RandomAdjustSharpness`""" + if torch.jit.is_scripting(): + return adjust_sharpness_image(inpt, sharpness_factor=sharpness_factor) + + _log_api_usage_once(adjust_sharpness) + + kernel = _get_kernel(adjust_sharpness, type(inpt)) + return kernel(inpt, sharpness_factor=sharpness_factor) + + +@_register_kernel_internal(adjust_sharpness, torch.Tensor) +@_register_kernel_internal(adjust_sharpness, tv_tensors.Image) +def adjust_sharpness_image(image: torch.Tensor, sharpness_factor: float) -> torch.Tensor: + num_channels, height, width = image.shape[-3:] + if num_channels not in (1, 3): + raise TypeError(f"Input image tensor can have 1 or 3 channels, but found {num_channels}") + + if sharpness_factor < 0: + raise ValueError(f"sharpness_factor ({sharpness_factor}) is not non-negative.") + + if image.numel() == 0 or height <= 2 or width <= 2: + return image + + bound = _max_value(image.dtype) + fp = image.is_floating_point() + shape = image.shape + + if image.ndim > 4: + image = image.reshape(-1, num_channels, height, width) + needs_unsquash = True + else: + needs_unsquash = False + + # The following is a normalized 3x3 kernel with 1s in the edges and a 5 in the middle. + kernel_dtype = image.dtype if fp else torch.float32 + a, b = 1.0 / 13.0, 5.0 / 13.0 + kernel = torch.tensor([[a, a, a], [a, b, a], [a, a, a]], dtype=kernel_dtype, device=image.device) + kernel = kernel.expand(num_channels, 1, 3, 3) + + # We copy and cast at the same time to avoid modifications on the original data + output = image.to(dtype=kernel_dtype, copy=True) + blurred_degenerate = conv2d(output, kernel, groups=num_channels) + if not fp: + # it is better to round before cast + blurred_degenerate = blurred_degenerate.round_() + + # Create a view on the underlying output while pointing at the same data. We do this to avoid indexing twice. + view = output[..., 1:-1, 1:-1] + + # We speed up blending by minimizing flops and doing in-place. The 2 blend options are mathematically equivalent: + # x+(1-r)*(y-x) = x + (1-r)*y - (1-r)*x = x*r + y*(1-r) + view.add_(blurred_degenerate.sub_(view), alpha=(1.0 - sharpness_factor)) + + # The actual data of output have been modified by the above. We only need to clamp and cast now. + output = output.clamp_(0, bound) + if not fp: + output = output.to(image.dtype) + + if needs_unsquash: + output = output.reshape(shape) + + return output + + +_adjust_sharpness_image_pil = _register_kernel_internal(adjust_sharpness, PIL.Image.Image)(_FP.adjust_sharpness) + + +@_register_kernel_internal(adjust_sharpness, tv_tensors.Video) +def adjust_sharpness_video(video: torch.Tensor, sharpness_factor: float) -> torch.Tensor: + return adjust_sharpness_image(video, sharpness_factor=sharpness_factor) + + +def adjust_hue(inpt: torch.Tensor, hue_factor: float) -> torch.Tensor: + """Adjust hue""" + if torch.jit.is_scripting(): + return adjust_hue_image(inpt, hue_factor=hue_factor) + + _log_api_usage_once(adjust_hue) + + kernel = _get_kernel(adjust_hue, type(inpt)) + return kernel(inpt, hue_factor=hue_factor) + + +def _rgb_to_hsv(image: torch.Tensor) -> torch.Tensor: + r, g, _ = image.unbind(dim=-3) + + # Implementation is based on + # https://github.com/python-pillow/Pillow/blob/4174d4267616897df3746d315d5a2d0f82c656ee/src/libImaging/Convert.c#L330 + minc, maxc = torch.aminmax(image, dim=-3) + + # The algorithm erases S and H channel where `maxc = minc`. This avoids NaN + # from happening in the results, because + # + S channel has division by `maxc`, which is zero only if `maxc = minc` + # + H channel has division by `(maxc - minc)`. + # + # Instead of overwriting NaN afterwards, we just prevent it from occurring so + # we don't need to deal with it in case we save the NaN in a buffer in + # backprop, if it is ever supported, but it doesn't hurt to do so. + eqc = maxc == minc + + channels_range = maxc - minc + # Since `eqc => channels_range = 0`, replacing denominator with 1 when `eqc` is fine. + ones = torch.ones_like(maxc) + s = channels_range / torch.where(eqc, ones, maxc) + # Note that `eqc => maxc = minc = r = g = b`. So the following calculation + # of `h` would reduce to `bc - gc + 2 + rc - bc + 4 + rc - bc = 6` so it + # would not matter what values `rc`, `gc`, and `bc` have here, and thus + # replacing denominator with 1 when `eqc` is fine. + channels_range_divisor = torch.where(eqc, ones, channels_range).unsqueeze_(dim=-3) + rc, gc, bc = ((maxc.unsqueeze(dim=-3) - image) / channels_range_divisor).unbind(dim=-3) + + mask_maxc_neq_r = maxc != r + mask_maxc_eq_g = maxc == g + + hg = rc.add(2.0).sub_(bc).mul_(mask_maxc_eq_g & mask_maxc_neq_r) + hr = bc.sub_(gc).mul_(~mask_maxc_neq_r) + hb = gc.add_(4.0).sub_(rc).mul_(mask_maxc_neq_r.logical_and_(mask_maxc_eq_g.logical_not_())) + + h = hr.add_(hg).add_(hb) + h = h.mul_(1.0 / 6.0).add_(1.0).fmod_(1.0) + return torch.stack((h, s, maxc), dim=-3) + + +def _hsv_to_rgb(img: torch.Tensor) -> torch.Tensor: + h, s, v = img.unbind(dim=-3) + h6 = h.mul(6) + i = torch.floor(h6) + f = h6.sub_(i) + i = i.to(dtype=torch.int32) + + sxf = s * f + one_minus_s = 1.0 - s + q = (1.0 - sxf).mul_(v).clamp_(0.0, 1.0) + t = sxf.add_(one_minus_s).mul_(v).clamp_(0.0, 1.0) + p = one_minus_s.mul_(v).clamp_(0.0, 1.0) + i.remainder_(6) + + vpqt = torch.stack((v, p, q, t), dim=-3) + + # vpqt -> rgb mapping based on i + select = torch.tensor([[0, 2, 1, 1, 3, 0], [3, 0, 0, 2, 1, 1], [1, 1, 3, 0, 0, 2]], dtype=torch.long) + select = select.to(device=img.device, non_blocking=True) + + select = select[:, i] + if select.ndim > 3: + # if input.shape is (B, ..., C, H, W) then + # select.shape is (C, B, ..., H, W) + # thus we move C axis to get (B, ..., C, H, W) + select = select.moveaxis(0, -3) + + return vpqt.gather(-3, select) + + +@_register_kernel_internal(adjust_hue, torch.Tensor) +@_register_kernel_internal(adjust_hue, tv_tensors.Image) +def adjust_hue_image(image: torch.Tensor, hue_factor: float) -> torch.Tensor: + if not (-0.5 <= hue_factor <= 0.5): + raise ValueError(f"hue_factor ({hue_factor}) is not in [-0.5, 0.5].") + + c = image.shape[-3] + if c not in [1, 3]: + raise TypeError(f"Input image tensor permitted channel values are 1 or 3, but found {c}") + + if c == 1: # Match PIL behaviour + return image + + if image.numel() == 0: + # exit earlier on empty images + return image + + orig_dtype = image.dtype + image = to_dtype_image(image, torch.float32, scale=True) + + image = _rgb_to_hsv(image) + h, s, v = image.unbind(dim=-3) + h.add_(hue_factor).remainder_(1.0) + image = torch.stack((h, s, v), dim=-3) + image_hue_adj = _hsv_to_rgb(image) + + return to_dtype_image(image_hue_adj, orig_dtype, scale=True) + + +_adjust_hue_image_pil = _register_kernel_internal(adjust_hue, PIL.Image.Image)(_FP.adjust_hue) + + +@_register_kernel_internal(adjust_hue, tv_tensors.Video) +def adjust_hue_video(video: torch.Tensor, hue_factor: float) -> torch.Tensor: + return adjust_hue_image(video, hue_factor=hue_factor) + + +def adjust_gamma(inpt: torch.Tensor, gamma: float, gain: float = 1) -> torch.Tensor: + """Adjust gamma.""" + if torch.jit.is_scripting(): + return adjust_gamma_image(inpt, gamma=gamma, gain=gain) + + _log_api_usage_once(adjust_gamma) + + kernel = _get_kernel(adjust_gamma, type(inpt)) + return kernel(inpt, gamma=gamma, gain=gain) + + +@_register_kernel_internal(adjust_gamma, torch.Tensor) +@_register_kernel_internal(adjust_gamma, tv_tensors.Image) +def adjust_gamma_image(image: torch.Tensor, gamma: float, gain: float = 1.0) -> torch.Tensor: + if gamma < 0: + raise ValueError("Gamma should be a non-negative real number") + + # The input image is either assumed to be at [0, 1] scale (if float) or is converted to that scale (if integer). + # Since the gamma is non-negative, the output remains at [0, 1] scale. + if not torch.is_floating_point(image): + output = to_dtype_image(image, torch.float32, scale=True).pow_(gamma) + else: + output = image.pow(gamma) + + if gain != 1.0: + # The clamp operation is needed only if multiplication is performed. It's only when gain != 1, that the scale + # of the output can go beyond [0, 1]. + output = output.mul_(gain).clamp_(0.0, 1.0) + + return to_dtype_image(output, image.dtype, scale=True) + + +_adjust_gamma_image_pil = _register_kernel_internal(adjust_gamma, PIL.Image.Image)(_FP.adjust_gamma) + + +@_register_kernel_internal(adjust_gamma, tv_tensors.Video) +def adjust_gamma_video(video: torch.Tensor, gamma: float, gain: float = 1) -> torch.Tensor: + return adjust_gamma_image(video, gamma=gamma, gain=gain) + + +def posterize(inpt: torch.Tensor, bits: int) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomPosterize` for details.""" + if torch.jit.is_scripting(): + return posterize_image(inpt, bits=bits) + + _log_api_usage_once(posterize) + + kernel = _get_kernel(posterize, type(inpt)) + return kernel(inpt, bits=bits) + + +@_register_kernel_internal(posterize, torch.Tensor) +@_register_kernel_internal(posterize, tv_tensors.Image) +def posterize_image(image: torch.Tensor, bits: int) -> torch.Tensor: + if image.is_floating_point(): + levels = 1 << bits + return image.mul(levels).floor_().clamp_(0, levels - 1).mul_(1.0 / levels) + else: + num_value_bits = _num_value_bits(image.dtype) + if bits >= num_value_bits: + return image + + mask = ((1 << bits) - 1) << (num_value_bits - bits) + return image & mask + + +_posterize_image_pil = _register_kernel_internal(posterize, PIL.Image.Image)(_FP.posterize) + + +@_register_kernel_internal(posterize, tv_tensors.Video) +def posterize_video(video: torch.Tensor, bits: int) -> torch.Tensor: + return posterize_image(video, bits=bits) + + +def solarize(inpt: torch.Tensor, threshold: float) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomSolarize` for details.""" + if torch.jit.is_scripting(): + return solarize_image(inpt, threshold=threshold) + + _log_api_usage_once(solarize) + + kernel = _get_kernel(solarize, type(inpt)) + return kernel(inpt, threshold=threshold) + + +@_register_kernel_internal(solarize, torch.Tensor) +@_register_kernel_internal(solarize, tv_tensors.Image) +def solarize_image(image: torch.Tensor, threshold: float) -> torch.Tensor: + if threshold > _max_value(image.dtype): + raise TypeError(f"Threshold should be less or equal the maximum value of the dtype, but got {threshold}") + + return torch.where(image >= threshold, invert_image(image), image) + + +_solarize_image_pil = _register_kernel_internal(solarize, PIL.Image.Image)(_FP.solarize) + + +@_register_kernel_internal(solarize, tv_tensors.Video) +def solarize_video(video: torch.Tensor, threshold: float) -> torch.Tensor: + return solarize_image(video, threshold=threshold) + + +def autocontrast(inpt: torch.Tensor) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomAutocontrast` for details.""" + if torch.jit.is_scripting(): + return autocontrast_image(inpt) + + _log_api_usage_once(autocontrast) + + kernel = _get_kernel(autocontrast, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(autocontrast, torch.Tensor) +@_register_kernel_internal(autocontrast, tv_tensors.Image) +def autocontrast_image(image: torch.Tensor) -> torch.Tensor: + c = image.shape[-3] + if c not in [1, 3]: + raise TypeError(f"Input image tensor permitted channel values are 1 or 3, but found {c}") + + if image.numel() == 0: + # exit earlier on empty images + return image + + bound = _max_value(image.dtype) + fp = image.is_floating_point() + float_image = image if fp else image.to(torch.float32) + + minimum = float_image.amin(dim=(-2, -1), keepdim=True) + maximum = float_image.amax(dim=(-2, -1), keepdim=True) + + eq_idxs = maximum == minimum + inv_scale = maximum.sub_(minimum).mul_(1.0 / bound) + minimum[eq_idxs] = 0.0 + inv_scale[eq_idxs] = 1.0 + + if fp: + diff = float_image.sub(minimum) + else: + diff = float_image.sub_(minimum) + + return diff.div_(inv_scale).clamp_(0, bound).to(image.dtype) + + +_autocontrast_image_pil = _register_kernel_internal(autocontrast, PIL.Image.Image)(_FP.autocontrast) + + +@_register_kernel_internal(autocontrast, tv_tensors.Video) +def autocontrast_video(video: torch.Tensor) -> torch.Tensor: + return autocontrast_image(video) + + +def equalize(inpt: torch.Tensor) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomEqualize` for details.""" + if torch.jit.is_scripting(): + return equalize_image(inpt) + + _log_api_usage_once(equalize) + + kernel = _get_kernel(equalize, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(equalize, torch.Tensor) +@_register_kernel_internal(equalize, tv_tensors.Image) +def equalize_image(image: torch.Tensor) -> torch.Tensor: + if image.numel() == 0: + return image + + # 1. The algorithm below can easily be extended to support arbitrary integer dtypes. However, the histogram that + # would be needed to computed will have at least `torch.iinfo(dtype).max + 1` values. That is perfectly fine for + # `torch.int8`, `torch.uint8`, and `torch.int16`, at least questionable for `torch.int32` and completely + # unfeasible for `torch.int64`. + # 2. Floating point inputs need to be binned for this algorithm. Apart from converting them to an integer dtype, we + # could also use PyTorch's builtin histogram functionality. However, that has its own set of issues: in addition + # to being slow in general, PyTorch's implementation also doesn't support batches. In total, that makes it slower + # and more complicated to implement than a simple conversion and a fast histogram implementation for integers. + # Since we need to convert in most cases anyway and out of the acceptable dtypes mentioned in 1. `torch.uint8` is + # by far the most common, we choose it as base. + output_dtype = image.dtype + image = to_dtype_image(image, torch.uint8, scale=True) + + # The histogram is computed by using the flattened image as index. For example, a pixel value of 127 in the image + # corresponds to adding 1 to index 127 in the histogram. + batch_shape = image.shape[:-2] + flat_image = image.flatten(start_dim=-2).to(torch.long) + hist = flat_image.new_zeros(batch_shape + (256,), dtype=torch.int32) + hist.scatter_add_(dim=-1, index=flat_image, src=hist.new_ones(1).expand_as(flat_image)) + cum_hist = hist.cumsum(dim=-1) + + # The simplest form of lookup-table (LUT) that also achieves histogram equalization is + # `lut = cum_hist / flat_image.shape[-1] * 255` + # However, PIL uses a more elaborate scheme: + # https://github.com/python-pillow/Pillow/blob/eb59cb61d5239ee69cbbf12709a0c6fd7314e6d7/src/PIL/ImageOps.py#L368-L385 + # `lut = ((cum_hist + num_non_max_pixels // (2 * 255)) // num_non_max_pixels) * 255` + + # The last non-zero element in the histogram is the first element in the cumulative histogram with the maximum + # value. Thus, the "max" in `num_non_max_pixels` does not refer to 255 as the maximum value of uint8 images, but + # rather the maximum value in the image, which might be or not be 255. + index = cum_hist.argmax(dim=-1) + num_non_max_pixels = flat_image.shape[-1] - hist.gather(dim=-1, index=index.unsqueeze_(-1)) + + # This is performance optimization that saves us one multiplication later. With this, the LUT computation simplifies + # to `lut = (cum_hist + step // 2) // step` and thus saving the final multiplication by 255 while keeping the + # division count the same. PIL uses the variable name `step` for this, so we keep that for easier comparison. + step = num_non_max_pixels.div_(255, rounding_mode="floor") + + # Although it looks like we could return early if we find `step == 0` like PIL does, that is unfortunately not as + # easy due to our support for batched images. We can only return early if `(step == 0).all()` holds. If it doesn't, + # we have to go through the computation below anyway. Since `step == 0` is an edge case anyway, it makes no sense to + # pay the runtime cost for checking it every time. + valid_equalization = step.ne(0).unsqueeze_(-1) + + # `lut[k]` is computed with `cum_hist[k-1]` with `lut[0] == (step // 2) // step == 0`. Thus, we perform the + # computation only for `lut[1:]` with `cum_hist[:-1]` and add `lut[0] == 0` afterwards. + cum_hist = cum_hist[..., :-1] + ( + cum_hist.add_(step // 2) + # We need the `clamp_`(min=1) call here to avoid zero division since they fail for integer dtypes. This has no + # effect on the returned result of this kernel since images inside the batch with `step == 0` are returned as is + # instead of equalized version. + .div_(step.clamp_(min=1), rounding_mode="floor") + # We need the `clamp_` call here since PILs LUT computation scheme can produce values outside the valid value + # range of uint8 images + .clamp_(0, 255) + ) + lut = cum_hist.to(torch.uint8) + lut = torch.cat([lut.new_zeros(1).expand(batch_shape + (1,)), lut], dim=-1) + equalized_image = lut.gather(dim=-1, index=flat_image).view_as(image) + + output = torch.where(valid_equalization, equalized_image, image) + return to_dtype_image(output, output_dtype, scale=True) + + +_equalize_image_pil = _register_kernel_internal(equalize, PIL.Image.Image)(_FP.equalize) + + +@_register_kernel_internal(equalize, tv_tensors.Video) +def equalize_video(video: torch.Tensor) -> torch.Tensor: + return equalize_image(video) + + +def invert(inpt: torch.Tensor) -> torch.Tensor: + """See :func:`~torchvision.transforms.v2.RandomInvert`.""" + if torch.jit.is_scripting(): + return invert_image(inpt) + + _log_api_usage_once(invert) + + kernel = _get_kernel(invert, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(invert, torch.Tensor) +@_register_kernel_internal(invert, tv_tensors.Image) +def invert_image(image: torch.Tensor) -> torch.Tensor: + if image.is_floating_point(): + return 1.0 - image + elif image.dtype == torch.uint8: + return image.bitwise_not() + else: # signed integer dtypes + # We can't use `Tensor.bitwise_not` here, since we want to retain the leading zero bit that encodes the sign + return image.bitwise_xor((1 << _num_value_bits(image.dtype)) - 1) + + +_invert_image_pil = _register_kernel_internal(invert, PIL.Image.Image)(_FP.invert) + + +@_register_kernel_internal(invert, tv_tensors.Video) +def invert_video(video: torch.Tensor) -> torch.Tensor: + return invert_image(video) + + +def permute_channels(inpt: torch.Tensor, permutation: List[int]) -> torch.Tensor: + """Permute the channels of the input according to the given permutation. + + This function supports plain :class:`~torch.Tensor`'s, :class:`PIL.Image.Image`'s, and + :class:`torchvision.tv_tensors.Image` and :class:`torchvision.tv_tensors.Video`. + + Example: + >>> rgb_image = torch.rand(3, 256, 256) + >>> bgr_image = F.permute_channels(rgb_image, permutation=[2, 1, 0]) + + Args: + permutation (List[int]): Valid permutation of the input channel indices. The index of the element determines the + channel index in the input and the value determines the channel index in the output. For example, + ``permutation=[2, 0 , 1]`` + + - takes ``ìnpt[..., 0, :, :]`` and puts it at ``output[..., 2, :, :]``, + - takes ``ìnpt[..., 1, :, :]`` and puts it at ``output[..., 0, :, :]``, and + - takes ``ìnpt[..., 2, :, :]`` and puts it at ``output[..., 1, :, :]``. + + Raises: + ValueError: If ``len(permutation)`` doesn't match the number of channels in the input. + """ + if torch.jit.is_scripting(): + return permute_channels_image(inpt, permutation=permutation) + + _log_api_usage_once(permute_channels) + + kernel = _get_kernel(permute_channels, type(inpt)) + return kernel(inpt, permutation=permutation) + + +@_register_kernel_internal(permute_channels, torch.Tensor) +@_register_kernel_internal(permute_channels, tv_tensors.Image) +def permute_channels_image(image: torch.Tensor, permutation: List[int]) -> torch.Tensor: + shape = image.shape + num_channels, height, width = shape[-3:] + + if len(permutation) != num_channels: + raise ValueError( + f"Length of permutation does not match number of channels: " f"{len(permutation)} != {num_channels}" + ) + + if image.numel() == 0: + return image + + image = image.reshape(-1, num_channels, height, width) + image = image[:, permutation, :, :] + return image.reshape(shape) + + +@_register_kernel_internal(permute_channels, PIL.Image.Image) +def _permute_channels_image_pil(image: PIL.Image.Image, permutation: List[int]) -> PIL.Image.Image: + return to_pil_image(permute_channels_image(pil_to_tensor(image), permutation=permutation)) + + +@_register_kernel_internal(permute_channels, tv_tensors.Video) +def permute_channels_video(video: torch.Tensor, permutation: List[int]) -> torch.Tensor: + return permute_channels_image(video, permutation=permutation) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_deprecated.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_deprecated.py new file mode 100644 index 0000000000000000000000000000000000000000..70f9e4e228dfcee1ad0457b1ebaa72a8b7d463cf --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_deprecated.py @@ -0,0 +1,24 @@ +import warnings +from typing import Any, List + +import torch + +from torchvision.transforms import functional as _F + + +@torch.jit.unused +def to_tensor(inpt: Any) -> torch.Tensor: + """[DEPREACTED] Use to_image() and to_dtype() instead.""" + warnings.warn( + "The function `to_tensor(...)` is deprecated and will be removed in a future release. " + "Instead, please use `to_image(...)` followed by `to_dtype(..., dtype=torch.float32, scale=True)`." + ) + return _F.to_tensor(inpt) + + +def get_image_size(inpt: torch.Tensor) -> List[int]: + warnings.warn( + "The function `get_image_size(...)` is deprecated and will be removed in a future release. " + "Instead, please use `get_size(...)` which returns `[h, w]` instead of `[w, h]`." + ) + return _F.get_image_size(inpt) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_geometry.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_geometry.py new file mode 100644 index 0000000000000000000000000000000000000000..a89de2aa6a0f18e8f5f137d516084905bdeaac7a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_geometry.py @@ -0,0 +1,2377 @@ +import math +import numbers +import warnings +from typing import Any, List, Optional, Sequence, Tuple, Union + +import PIL.Image +import torch +from torch.nn.functional import grid_sample, interpolate, pad as torch_pad + +from torchvision import tv_tensors +from torchvision.transforms import _functional_pil as _FP +from torchvision.transforms._functional_tensor import _pad_symmetric +from torchvision.transforms.functional import ( + _compute_resized_output_size as __compute_resized_output_size, + _get_perspective_coeffs, + _interpolation_modes_from_int, + InterpolationMode, + pil_modes_mapping, + pil_to_tensor, + to_pil_image, +) + +from torchvision.utils import _log_api_usage_once + +from ._meta import _get_size_image_pil, clamp_bounding_boxes, convert_bounding_box_format + +from ._utils import _FillTypeJIT, _get_kernel, _register_five_ten_crop_kernel_internal, _register_kernel_internal + + +def _check_interpolation(interpolation: Union[InterpolationMode, int]) -> InterpolationMode: + if isinstance(interpolation, int): + interpolation = _interpolation_modes_from_int(interpolation) + elif not isinstance(interpolation, InterpolationMode): + raise ValueError( + f"Argument interpolation should be an `InterpolationMode` or a corresponding Pillow integer constant, " + f"but got {interpolation}." + ) + return interpolation + + +def horizontal_flip(inpt: torch.Tensor) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomHorizontalFlip` for details.""" + if torch.jit.is_scripting(): + return horizontal_flip_image(inpt) + + _log_api_usage_once(horizontal_flip) + + kernel = _get_kernel(horizontal_flip, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(horizontal_flip, torch.Tensor) +@_register_kernel_internal(horizontal_flip, tv_tensors.Image) +def horizontal_flip_image(image: torch.Tensor) -> torch.Tensor: + return image.flip(-1) + + +@_register_kernel_internal(horizontal_flip, PIL.Image.Image) +def _horizontal_flip_image_pil(image: PIL.Image.Image) -> PIL.Image.Image: + return _FP.hflip(image) + + +@_register_kernel_internal(horizontal_flip, tv_tensors.Mask) +def horizontal_flip_mask(mask: torch.Tensor) -> torch.Tensor: + return horizontal_flip_image(mask) + + +def horizontal_flip_bounding_boxes( + bounding_boxes: torch.Tensor, format: tv_tensors.BoundingBoxFormat, canvas_size: Tuple[int, int] +) -> torch.Tensor: + shape = bounding_boxes.shape + + bounding_boxes = bounding_boxes.clone().reshape(-1, 4) + + if format == tv_tensors.BoundingBoxFormat.XYXY: + bounding_boxes[:, [2, 0]] = bounding_boxes[:, [0, 2]].sub_(canvas_size[1]).neg_() + elif format == tv_tensors.BoundingBoxFormat.XYWH: + bounding_boxes[:, 0].add_(bounding_boxes[:, 2]).sub_(canvas_size[1]).neg_() + else: # format == tv_tensors.BoundingBoxFormat.CXCYWH: + bounding_boxes[:, 0].sub_(canvas_size[1]).neg_() + + return bounding_boxes.reshape(shape) + + +@_register_kernel_internal(horizontal_flip, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _horizontal_flip_bounding_boxes_dispatch(inpt: tv_tensors.BoundingBoxes) -> tv_tensors.BoundingBoxes: + output = horizontal_flip_bounding_boxes( + inpt.as_subclass(torch.Tensor), format=inpt.format, canvas_size=inpt.canvas_size + ) + return tv_tensors.wrap(output, like=inpt) + + +@_register_kernel_internal(horizontal_flip, tv_tensors.Video) +def horizontal_flip_video(video: torch.Tensor) -> torch.Tensor: + return horizontal_flip_image(video) + + +def vertical_flip(inpt: torch.Tensor) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomVerticalFlip` for details.""" + if torch.jit.is_scripting(): + return vertical_flip_image(inpt) + + _log_api_usage_once(vertical_flip) + + kernel = _get_kernel(vertical_flip, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(vertical_flip, torch.Tensor) +@_register_kernel_internal(vertical_flip, tv_tensors.Image) +def vertical_flip_image(image: torch.Tensor) -> torch.Tensor: + return image.flip(-2) + + +@_register_kernel_internal(vertical_flip, PIL.Image.Image) +def _vertical_flip_image_pil(image: PIL.Image.Image) -> PIL.Image.Image: + return _FP.vflip(image) + + +@_register_kernel_internal(vertical_flip, tv_tensors.Mask) +def vertical_flip_mask(mask: torch.Tensor) -> torch.Tensor: + return vertical_flip_image(mask) + + +def vertical_flip_bounding_boxes( + bounding_boxes: torch.Tensor, format: tv_tensors.BoundingBoxFormat, canvas_size: Tuple[int, int] +) -> torch.Tensor: + shape = bounding_boxes.shape + + bounding_boxes = bounding_boxes.clone().reshape(-1, 4) + + if format == tv_tensors.BoundingBoxFormat.XYXY: + bounding_boxes[:, [1, 3]] = bounding_boxes[:, [3, 1]].sub_(canvas_size[0]).neg_() + elif format == tv_tensors.BoundingBoxFormat.XYWH: + bounding_boxes[:, 1].add_(bounding_boxes[:, 3]).sub_(canvas_size[0]).neg_() + else: # format == tv_tensors.BoundingBoxFormat.CXCYWH: + bounding_boxes[:, 1].sub_(canvas_size[0]).neg_() + + return bounding_boxes.reshape(shape) + + +@_register_kernel_internal(vertical_flip, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _vertical_flip_bounding_boxes_dispatch(inpt: tv_tensors.BoundingBoxes) -> tv_tensors.BoundingBoxes: + output = vertical_flip_bounding_boxes( + inpt.as_subclass(torch.Tensor), format=inpt.format, canvas_size=inpt.canvas_size + ) + return tv_tensors.wrap(output, like=inpt) + + +@_register_kernel_internal(vertical_flip, tv_tensors.Video) +def vertical_flip_video(video: torch.Tensor) -> torch.Tensor: + return vertical_flip_image(video) + + +# We changed the names to align them with the transforms, i.e. `RandomHorizontalFlip`. Still, `hflip` and `vflip` are +# prevalent and well understood. Thus, we just alias them without deprecating the old names. +hflip = horizontal_flip +vflip = vertical_flip + + +def _compute_resized_output_size( + canvas_size: Tuple[int, int], size: Optional[List[int]], max_size: Optional[int] = None +) -> List[int]: + if isinstance(size, int): + size = [size] + elif max_size is not None and size is not None and len(size) != 1: + raise ValueError( + "max_size should only be passed if size is None or specifies the length of the smaller edge, " + "i.e. size should be an int or a sequence of length 1 in torchscript mode." + ) + return __compute_resized_output_size(canvas_size, size=size, max_size=max_size, allow_size_none=True) + + +def resize( + inpt: torch.Tensor, + size: Optional[List[int]], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + max_size: Optional[int] = None, + antialias: Optional[bool] = True, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.Resize` for details.""" + if torch.jit.is_scripting(): + return resize_image(inpt, size=size, interpolation=interpolation, max_size=max_size, antialias=antialias) + + _log_api_usage_once(resize) + + kernel = _get_kernel(resize, type(inpt)) + return kernel(inpt, size=size, interpolation=interpolation, max_size=max_size, antialias=antialias) + + +# This is an internal helper method for resize_image. We should put it here instead of keeping it +# inside resize_image due to torchscript. +# uint8 dtype support for bilinear and bicubic is limited to cpu and +# according to our benchmarks on eager, non-AVX CPUs should still prefer u8->f32->interpolate->u8 path for bilinear +def _do_native_uint8_resize_on_cpu(interpolation: InterpolationMode) -> bool: + if interpolation == InterpolationMode.BILINEAR: + if torch.compiler.is_compiling(): + return True + else: + return "AVX2" in torch.backends.cpu.get_cpu_capability() + + return interpolation == InterpolationMode.BICUBIC + + +@_register_kernel_internal(resize, torch.Tensor) +@_register_kernel_internal(resize, tv_tensors.Image) +def resize_image( + image: torch.Tensor, + size: Optional[List[int]], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + max_size: Optional[int] = None, + antialias: Optional[bool] = True, +) -> torch.Tensor: + interpolation = _check_interpolation(interpolation) + antialias = False if antialias is None else antialias + align_corners: Optional[bool] = None + if interpolation == InterpolationMode.BILINEAR or interpolation == InterpolationMode.BICUBIC: + align_corners = False + else: + # The default of antialias is True from 0.17, so we don't warn or + # error if other interpolation modes are used. This is documented. + antialias = False + + shape = image.shape + numel = image.numel() + num_channels, old_height, old_width = shape[-3:] + new_height, new_width = _compute_resized_output_size((old_height, old_width), size=size, max_size=max_size) + + if (new_height, new_width) == (old_height, old_width): + return image + elif numel > 0: + dtype = image.dtype + acceptable_dtypes = [torch.float32, torch.float64] + if interpolation == InterpolationMode.NEAREST or interpolation == InterpolationMode.NEAREST_EXACT: + # uint8 dtype can be included for cpu and cuda input if nearest mode + acceptable_dtypes.append(torch.uint8) + elif image.device.type == "cpu": + if _do_native_uint8_resize_on_cpu(interpolation): + acceptable_dtypes.append(torch.uint8) + + image = image.reshape(-1, num_channels, old_height, old_width) + strides = image.stride() + if image.is_contiguous(memory_format=torch.channels_last) and image.shape[0] == 1 and numel != strides[0]: + # There is a weird behaviour in torch core where the output tensor of `interpolate()` can be allocated as + # contiguous even though the input is un-ambiguously channels_last (https://github.com/pytorch/pytorch/issues/68430). + # In particular this happens for the typical torchvision use-case of single CHW images where we fake the batch dim + # to become 1CHW. Below, we restride those tensors to trick torch core into properly allocating the output as + # channels_last, thus preserving the memory format of the input. This is not just for format consistency: + # for uint8 bilinear images, this also avoids an extra copy (re-packing) of the output and saves time. + # TODO: when https://github.com/pytorch/pytorch/issues/68430 is fixed (possibly by https://github.com/pytorch/pytorch/pull/100373), + # we should be able to remove this hack. + new_strides = list(strides) + new_strides[0] = numel + image = image.as_strided((1, num_channels, old_height, old_width), new_strides) + + need_cast = dtype not in acceptable_dtypes + if need_cast: + image = image.to(dtype=torch.float32) + + image = interpolate( + image, + size=[new_height, new_width], + mode=interpolation.value, + align_corners=align_corners, + antialias=antialias, + ) + + if need_cast: + if interpolation == InterpolationMode.BICUBIC and dtype == torch.uint8: + # This path is hit on non-AVX archs, or on GPU. + image = image.clamp_(min=0, max=255) + if dtype in (torch.uint8, torch.int8, torch.int16, torch.int32, torch.int64): + image = image.round_() + image = image.to(dtype=dtype) + + return image.reshape(shape[:-3] + (num_channels, new_height, new_width)) + + +def _resize_image_pil( + image: PIL.Image.Image, + size: Union[Sequence[int], int], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + max_size: Optional[int] = None, +) -> PIL.Image.Image: + old_height, old_width = image.height, image.width + new_height, new_width = _compute_resized_output_size( + (old_height, old_width), + size=size, # type: ignore[arg-type] + max_size=max_size, + ) + + interpolation = _check_interpolation(interpolation) + + if (new_height, new_width) == (old_height, old_width): + return image + + return image.resize((new_width, new_height), resample=pil_modes_mapping[interpolation]) + + +@_register_kernel_internal(resize, PIL.Image.Image) +def __resize_image_pil_dispatch( + image: PIL.Image.Image, + size: Union[Sequence[int], int], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + max_size: Optional[int] = None, + antialias: Optional[bool] = True, +) -> PIL.Image.Image: + if antialias is False: + warnings.warn("Anti-alias option is always applied for PIL Image input. Argument antialias is ignored.") + return _resize_image_pil(image, size=size, interpolation=interpolation, max_size=max_size) + + +def resize_mask(mask: torch.Tensor, size: Optional[List[int]], max_size: Optional[int] = None) -> torch.Tensor: + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = resize_image(mask, size=size, interpolation=InterpolationMode.NEAREST, max_size=max_size) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +@_register_kernel_internal(resize, tv_tensors.Mask, tv_tensor_wrapper=False) +def _resize_mask_dispatch( + inpt: tv_tensors.Mask, size: List[int], max_size: Optional[int] = None, **kwargs: Any +) -> tv_tensors.Mask: + output = resize_mask(inpt.as_subclass(torch.Tensor), size, max_size=max_size) + return tv_tensors.wrap(output, like=inpt) + + +def resize_bounding_boxes( + bounding_boxes: torch.Tensor, + canvas_size: Tuple[int, int], + size: Optional[List[int]], + max_size: Optional[int] = None, +) -> Tuple[torch.Tensor, Tuple[int, int]]: + old_height, old_width = canvas_size + new_height, new_width = _compute_resized_output_size(canvas_size, size=size, max_size=max_size) + + if (new_height, new_width) == (old_height, old_width): + return bounding_boxes, canvas_size + + w_ratio = new_width / old_width + h_ratio = new_height / old_height + ratios = torch.tensor([w_ratio, h_ratio, w_ratio, h_ratio], device=bounding_boxes.device) + return ( + bounding_boxes.mul(ratios).to(bounding_boxes.dtype), + (new_height, new_width), + ) + + +@_register_kernel_internal(resize, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _resize_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, size: Optional[List[int]], max_size: Optional[int] = None, **kwargs: Any +) -> tv_tensors.BoundingBoxes: + output, canvas_size = resize_bounding_boxes( + inpt.as_subclass(torch.Tensor), inpt.canvas_size, size, max_size=max_size + ) + return tv_tensors.wrap(output, like=inpt, canvas_size=canvas_size) + + +@_register_kernel_internal(resize, tv_tensors.Video) +def resize_video( + video: torch.Tensor, + size: Optional[List[int]], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + max_size: Optional[int] = None, + antialias: Optional[bool] = True, +) -> torch.Tensor: + return resize_image(video, size=size, interpolation=interpolation, max_size=max_size, antialias=antialias) + + +def affine( + inpt: torch.Tensor, + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: _FillTypeJIT = None, + center: Optional[List[float]] = None, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomAffine` for details.""" + if torch.jit.is_scripting(): + return affine_image( + inpt, + angle=angle, + translate=translate, + scale=scale, + shear=shear, + interpolation=interpolation, + fill=fill, + center=center, + ) + + _log_api_usage_once(affine) + + kernel = _get_kernel(affine, type(inpt)) + return kernel( + inpt, + angle=angle, + translate=translate, + scale=scale, + shear=shear, + interpolation=interpolation, + fill=fill, + center=center, + ) + + +def _affine_parse_args( + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + interpolation: InterpolationMode = InterpolationMode.NEAREST, + center: Optional[List[float]] = None, +) -> Tuple[float, List[float], List[float], Optional[List[float]]]: + if not isinstance(angle, (int, float)): + raise TypeError("Argument angle should be int or float") + + if not isinstance(translate, (list, tuple)): + raise TypeError("Argument translate should be a sequence") + + if len(translate) != 2: + raise ValueError("Argument translate should be a sequence of length 2") + + if scale <= 0.0: + raise ValueError("Argument scale should be positive") + + if not isinstance(shear, (numbers.Number, (list, tuple))): + raise TypeError("Shear should be either a single value or a sequence of two values") + + if not isinstance(interpolation, InterpolationMode): + raise TypeError("Argument interpolation should be a InterpolationMode") + + if isinstance(angle, int): + angle = float(angle) + + if isinstance(translate, tuple): + translate = list(translate) + + if isinstance(shear, numbers.Number): + shear = [shear, 0.0] + + if isinstance(shear, tuple): + shear = list(shear) + + if len(shear) == 1: + shear = [shear[0], shear[0]] + + if len(shear) != 2: + raise ValueError(f"Shear should be a sequence containing two values. Got {shear}") + + if center is not None: + if not isinstance(center, (list, tuple)): + raise TypeError("Argument center should be a sequence") + else: + center = [float(c) for c in center] + + return angle, translate, shear, center + + +def _get_inverse_affine_matrix( + center: List[float], angle: float, translate: List[float], scale: float, shear: List[float], inverted: bool = True +) -> List[float]: + # Helper method to compute inverse matrix for affine transformation + + # Pillow requires inverse affine transformation matrix: + # Affine matrix is : M = T * C * RotateScaleShear * C^-1 + # + # where T is translation matrix: [1, 0, tx | 0, 1, ty | 0, 0, 1] + # C is translation matrix to keep center: [1, 0, cx | 0, 1, cy | 0, 0, 1] + # RotateScaleShear is rotation with scale and shear matrix + # + # RotateScaleShear(a, s, (sx, sy)) = + # = R(a) * S(s) * SHy(sy) * SHx(sx) + # = [ s*cos(a - sy)/cos(sy), s*(-cos(a - sy)*tan(sx)/cos(sy) - sin(a)), 0 ] + # [ s*sin(a - sy)/cos(sy), s*(-sin(a - sy)*tan(sx)/cos(sy) + cos(a)), 0 ] + # [ 0 , 0 , 1 ] + # where R is a rotation matrix, S is a scaling matrix, and SHx and SHy are the shears: + # SHx(s) = [1, -tan(s)] and SHy(s) = [1 , 0] + # [0, 1 ] [-tan(s), 1] + # + # Thus, the inverse is M^-1 = C * RotateScaleShear^-1 * C^-1 * T^-1 + + rot = math.radians(angle) + sx = math.radians(shear[0]) + sy = math.radians(shear[1]) + + cx, cy = center + tx, ty = translate + + # Cached results + cos_sy = math.cos(sy) + tan_sx = math.tan(sx) + rot_minus_sy = rot - sy + cx_plus_tx = cx + tx + cy_plus_ty = cy + ty + + # Rotate Scale Shear (RSS) without scaling + a = math.cos(rot_minus_sy) / cos_sy + b = -(a * tan_sx + math.sin(rot)) + c = math.sin(rot_minus_sy) / cos_sy + d = math.cos(rot) - c * tan_sx + + if inverted: + # Inverted rotation matrix with scale and shear + # det([[a, b], [c, d]]) == 1, since det(rotation) = 1 and det(shear) = 1 + matrix = [d / scale, -b / scale, 0.0, -c / scale, a / scale, 0.0] + # Apply inverse of translation and of center translation: RSS^-1 * C^-1 * T^-1 + # and then apply center translation: C * RSS^-1 * C^-1 * T^-1 + matrix[2] += cx - matrix[0] * cx_plus_tx - matrix[1] * cy_plus_ty + matrix[5] += cy - matrix[3] * cx_plus_tx - matrix[4] * cy_plus_ty + else: + matrix = [a * scale, b * scale, 0.0, c * scale, d * scale, 0.0] + # Apply inverse of center translation: RSS * C^-1 + # and then apply translation and center : T * C * RSS * C^-1 + matrix[2] += cx_plus_tx - matrix[0] * cx - matrix[1] * cy + matrix[5] += cy_plus_ty - matrix[3] * cx - matrix[4] * cy + + return matrix + + +def _compute_affine_output_size(matrix: List[float], w: int, h: int) -> Tuple[int, int]: + if torch.compiler.is_compiling() and not torch.jit.is_scripting(): + return _compute_affine_output_size_python(matrix, w, h) + else: + return _compute_affine_output_size_tensor(matrix, w, h) + + +def _compute_affine_output_size_tensor(matrix: List[float], w: int, h: int) -> Tuple[int, int]: + # Inspired of PIL implementation: + # https://github.com/python-pillow/Pillow/blob/11de3318867e4398057373ee9f12dcb33db7335c/src/PIL/Image.py#L2054 + + # pts are Top-Left, Top-Right, Bottom-Left, Bottom-Right points. + # Points are shifted due to affine matrix torch convention about + # the center point. Center is (0, 0) for image center pivot point (w * 0.5, h * 0.5) + half_w = 0.5 * w + half_h = 0.5 * h + pts = torch.tensor( + [ + [-half_w, -half_h, 1.0], + [-half_w, half_h, 1.0], + [half_w, half_h, 1.0], + [half_w, -half_h, 1.0], + ] + ) + theta = torch.tensor(matrix, dtype=torch.float).view(2, 3) + new_pts = torch.matmul(pts, theta.T) + min_vals, max_vals = new_pts.aminmax(dim=0) + + # shift points to [0, w] and [0, h] interval to match PIL results + halfs = torch.tensor((half_w, half_h)) + min_vals.add_(halfs) + max_vals.add_(halfs) + + # Truncate precision to 1e-4 to avoid ceil of Xe-15 to 1.0 + tol = 1e-4 + inv_tol = 1.0 / tol + cmax = max_vals.mul_(inv_tol).trunc_().mul_(tol).ceil_() + cmin = min_vals.mul_(inv_tol).trunc_().mul_(tol).floor_() + size = cmax.sub_(cmin) + return int(size[0]), int(size[1]) # w, h + + +def _compute_affine_output_size_python(matrix: List[float], w: int, h: int) -> Tuple[int, int]: + # Mostly copied from PIL implementation: + # The only difference is with transformed points as input matrix has zero translation part here and + # PIL has a centered translation part. + # https://github.com/python-pillow/Pillow/blob/11de3318867e4398057373ee9f12dcb33db7335c/src/PIL/Image.py#L2054 + + a, b, c, d, e, f = matrix + xx = [] + yy = [] + + half_w = 0.5 * w + half_h = 0.5 * h + for x, y in ((-half_w, -half_h), (half_w, -half_h), (half_w, half_h), (-half_w, half_h)): + nx = a * x + b * y + c + ny = d * x + e * y + f + xx.append(nx + half_w) + yy.append(ny + half_h) + + nw = math.ceil(max(xx)) - math.floor(min(xx)) + nh = math.ceil(max(yy)) - math.floor(min(yy)) + return int(nw), int(nh) # w, h + + +def _apply_grid_transform(img: torch.Tensor, grid: torch.Tensor, mode: str, fill: _FillTypeJIT) -> torch.Tensor: + input_shape = img.shape + output_height, output_width = grid.shape[1], grid.shape[2] + num_channels, input_height, input_width = input_shape[-3:] + output_shape = input_shape[:-3] + (num_channels, output_height, output_width) + + if img.numel() == 0: + return img.reshape(output_shape) + + img = img.reshape(-1, num_channels, input_height, input_width) + squashed_batch_size = img.shape[0] + + # We are using context knowledge that grid should have float dtype + fp = img.dtype == grid.dtype + float_img = img if fp else img.to(grid.dtype) + + if squashed_batch_size > 1: + # Apply same grid to a batch of images + grid = grid.expand(squashed_batch_size, -1, -1, -1) + + # Append a dummy mask for customized fill colors, should be faster than grid_sample() twice + if fill is not None: + mask = torch.ones( + (squashed_batch_size, 1, input_height, input_width), dtype=float_img.dtype, device=float_img.device + ) + float_img = torch.cat((float_img, mask), dim=1) + + float_img = grid_sample(float_img, grid, mode=mode, padding_mode="zeros", align_corners=False) + + # Fill with required color + if fill is not None: + float_img, mask = torch.tensor_split(float_img, indices=(-1,), dim=-3) + mask = mask.expand_as(float_img) + fill_list = fill if isinstance(fill, (tuple, list)) else [float(fill)] # type: ignore[arg-type] + fill_img = torch.tensor(fill_list, dtype=float_img.dtype, device=float_img.device).view(1, -1, 1, 1) + if mode == "nearest": + float_img = torch.where(mask < 0.5, fill_img.expand_as(float_img), float_img) + else: # 'bilinear' + # The following is mathematically equivalent to: + # img * mask + (1.0 - mask) * fill = img * mask - fill * mask + fill = mask * (img - fill) + fill + float_img = float_img.sub_(fill_img).mul_(mask).add_(fill_img) + + img = float_img.round_().to(img.dtype) if not fp else float_img + + return img.reshape(output_shape) + + +def _assert_grid_transform_inputs( + image: torch.Tensor, + matrix: Optional[List[float]], + interpolation: str, + fill: _FillTypeJIT, + supported_interpolation_modes: List[str], + coeffs: Optional[List[float]] = None, +) -> None: + if matrix is not None: + if not isinstance(matrix, list): + raise TypeError("Argument matrix should be a list") + elif len(matrix) != 6: + raise ValueError("Argument matrix should have 6 float values") + + if coeffs is not None and len(coeffs) != 8: + raise ValueError("Argument coeffs should have 8 float values") + + if fill is not None: + if isinstance(fill, (tuple, list)): + length = len(fill) + num_channels = image.shape[-3] + if length > 1 and length != num_channels: + raise ValueError( + "The number of elements in 'fill' cannot broadcast to match the number of " + f"channels of the image ({length} != {num_channels})" + ) + elif not isinstance(fill, (int, float)): + raise ValueError("Argument fill should be either int, float, tuple or list") + + if interpolation not in supported_interpolation_modes: + raise ValueError(f"Interpolation mode '{interpolation}' is unsupported with Tensor input") + + +def _affine_grid( + theta: torch.Tensor, + w: int, + h: int, + ow: int, + oh: int, +) -> torch.Tensor: + # https://github.com/pytorch/pytorch/blob/74b65c32be68b15dc7c9e8bb62459efbfbde33d8/aten/src/ATen/native/ + # AffineGridGenerator.cpp#L18 + # Difference with AffineGridGenerator is that: + # 1) we normalize grid values after applying theta + # 2) we can normalize by other image size, such that it covers "extend" option like in PIL.Image.rotate + dtype = theta.dtype + device = theta.device + + base_grid = torch.empty(1, oh, ow, 3, dtype=dtype, device=device) + x_grid = torch.linspace((1.0 - ow) * 0.5, (ow - 1.0) * 0.5, steps=ow, device=device) + base_grid[..., 0].copy_(x_grid) + y_grid = torch.linspace((1.0 - oh) * 0.5, (oh - 1.0) * 0.5, steps=oh, device=device).unsqueeze_(-1) + base_grid[..., 1].copy_(y_grid) + base_grid[..., 2].fill_(1) + + rescaled_theta = theta.transpose(1, 2).div_(torch.tensor([0.5 * w, 0.5 * h], dtype=dtype, device=device)) + output_grid = base_grid.view(1, oh * ow, 3).bmm(rescaled_theta) + return output_grid.view(1, oh, ow, 2) + + +@_register_kernel_internal(affine, torch.Tensor) +@_register_kernel_internal(affine, tv_tensors.Image) +def affine_image( + image: torch.Tensor, + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: _FillTypeJIT = None, + center: Optional[List[float]] = None, +) -> torch.Tensor: + interpolation = _check_interpolation(interpolation) + + angle, translate, shear, center = _affine_parse_args(angle, translate, scale, shear, interpolation, center) + + height, width = image.shape[-2:] + + center_f = [0.0, 0.0] + if center is not None: + # Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center. + center_f = [(c - s * 0.5) for c, s in zip(center, [width, height])] + + translate_f = [float(t) for t in translate] + matrix = _get_inverse_affine_matrix(center_f, angle, translate_f, scale, shear) + + _assert_grid_transform_inputs(image, matrix, interpolation.value, fill, ["nearest", "bilinear"]) + + dtype = image.dtype if torch.is_floating_point(image) else torch.float32 + theta = torch.tensor(matrix, dtype=dtype, device=image.device).reshape(1, 2, 3) + grid = _affine_grid(theta, w=width, h=height, ow=width, oh=height) + return _apply_grid_transform(image, grid, interpolation.value, fill=fill) + + +@_register_kernel_internal(affine, PIL.Image.Image) +def _affine_image_pil( + image: PIL.Image.Image, + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: _FillTypeJIT = None, + center: Optional[List[float]] = None, +) -> PIL.Image.Image: + interpolation = _check_interpolation(interpolation) + angle, translate, shear, center = _affine_parse_args(angle, translate, scale, shear, interpolation, center) + + # center = (img_size[0] * 0.5 + 0.5, img_size[1] * 0.5 + 0.5) + # it is visually better to estimate the center without 0.5 offset + # otherwise image rotated by 90 degrees is shifted vs output image of torch.rot90 or F_t.affine + if center is None: + height, width = _get_size_image_pil(image) + center = [width * 0.5, height * 0.5] + matrix = _get_inverse_affine_matrix(center, angle, translate, scale, shear) + + return _FP.affine(image, matrix, interpolation=pil_modes_mapping[interpolation], fill=fill) + + +def _affine_bounding_boxes_with_expand( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + center: Optional[List[float]] = None, + expand: bool = False, +) -> Tuple[torch.Tensor, Tuple[int, int]]: + if bounding_boxes.numel() == 0: + return bounding_boxes, canvas_size + + original_shape = bounding_boxes.shape + original_dtype = bounding_boxes.dtype + bounding_boxes = bounding_boxes.clone() if bounding_boxes.is_floating_point() else bounding_boxes.float() + dtype = bounding_boxes.dtype + device = bounding_boxes.device + bounding_boxes = ( + convert_bounding_box_format( + bounding_boxes, old_format=format, new_format=tv_tensors.BoundingBoxFormat.XYXY, inplace=True + ) + ).reshape(-1, 4) + + angle, translate, shear, center = _affine_parse_args( + angle, translate, scale, shear, InterpolationMode.NEAREST, center + ) + + if center is None: + height, width = canvas_size + center = [width * 0.5, height * 0.5] + + affine_vector = _get_inverse_affine_matrix(center, angle, translate, scale, shear, inverted=False) + transposed_affine_matrix = ( + torch.tensor( + affine_vector, + dtype=dtype, + device=device, + ) + .reshape(2, 3) + .T + ) + # 1) Let's transform bboxes into a tensor of 4 points (top-left, top-right, bottom-left, bottom-right corners). + # Tensor of points has shape (N * 4, 3), where N is the number of bboxes + # Single point structure is similar to + # [(xmin, ymin, 1), (xmax, ymin, 1), (xmax, ymax, 1), (xmin, ymax, 1)] + points = bounding_boxes[:, [[0, 1], [2, 1], [2, 3], [0, 3]]].reshape(-1, 2) + points = torch.cat([points, torch.ones(points.shape[0], 1, device=device, dtype=dtype)], dim=-1) + # 2) Now let's transform the points using affine matrix + transformed_points = torch.matmul(points, transposed_affine_matrix) + # 3) Reshape transformed points to [N boxes, 4 points, x/y coords] + # and compute bounding box from 4 transformed points: + transformed_points = transformed_points.reshape(-1, 4, 2) + out_bbox_mins, out_bbox_maxs = torch.aminmax(transformed_points, dim=1) + out_bboxes = torch.cat([out_bbox_mins, out_bbox_maxs], dim=1) + + if expand: + # Compute minimum point for transformed image frame: + # Points are Top-Left, Top-Right, Bottom-Left, Bottom-Right points. + height, width = canvas_size + points = torch.tensor( + [ + [0.0, 0.0, 1.0], + [0.0, float(height), 1.0], + [float(width), float(height), 1.0], + [float(width), 0.0, 1.0], + ], + dtype=dtype, + device=device, + ) + new_points = torch.matmul(points, transposed_affine_matrix) + tr = torch.amin(new_points, dim=0, keepdim=True) + # Translate bounding boxes + out_bboxes.sub_(tr.repeat((1, 2))) + # Estimate meta-data for image with inverted=True + affine_vector = _get_inverse_affine_matrix(center, angle, translate, scale, shear) + new_width, new_height = _compute_affine_output_size(affine_vector, width, height) + canvas_size = (new_height, new_width) + + out_bboxes = clamp_bounding_boxes(out_bboxes, format=tv_tensors.BoundingBoxFormat.XYXY, canvas_size=canvas_size) + out_bboxes = convert_bounding_box_format( + out_bboxes, old_format=tv_tensors.BoundingBoxFormat.XYXY, new_format=format, inplace=True + ).reshape(original_shape) + + out_bboxes = out_bboxes.to(original_dtype) + return out_bboxes, canvas_size + + +def affine_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + center: Optional[List[float]] = None, +) -> torch.Tensor: + out_box, _ = _affine_bounding_boxes_with_expand( + bounding_boxes, + format=format, + canvas_size=canvas_size, + angle=angle, + translate=translate, + scale=scale, + shear=shear, + center=center, + expand=False, + ) + return out_box + + +@_register_kernel_internal(affine, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _affine_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + center: Optional[List[float]] = None, + **kwargs, +) -> tv_tensors.BoundingBoxes: + output = affine_bounding_boxes( + inpt.as_subclass(torch.Tensor), + format=inpt.format, + canvas_size=inpt.canvas_size, + angle=angle, + translate=translate, + scale=scale, + shear=shear, + center=center, + ) + return tv_tensors.wrap(output, like=inpt) + + +def affine_mask( + mask: torch.Tensor, + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + fill: _FillTypeJIT = None, + center: Optional[List[float]] = None, +) -> torch.Tensor: + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = affine_image( + mask, + angle=angle, + translate=translate, + scale=scale, + shear=shear, + interpolation=InterpolationMode.NEAREST, + fill=fill, + center=center, + ) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +@_register_kernel_internal(affine, tv_tensors.Mask, tv_tensor_wrapper=False) +def _affine_mask_dispatch( + inpt: tv_tensors.Mask, + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + fill: _FillTypeJIT = None, + center: Optional[List[float]] = None, + **kwargs, +) -> tv_tensors.Mask: + output = affine_mask( + inpt.as_subclass(torch.Tensor), + angle=angle, + translate=translate, + scale=scale, + shear=shear, + fill=fill, + center=center, + ) + return tv_tensors.wrap(output, like=inpt) + + +@_register_kernel_internal(affine, tv_tensors.Video) +def affine_video( + video: torch.Tensor, + angle: Union[int, float], + translate: List[float], + scale: float, + shear: List[float], + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + fill: _FillTypeJIT = None, + center: Optional[List[float]] = None, +) -> torch.Tensor: + return affine_image( + video, + angle=angle, + translate=translate, + scale=scale, + shear=shear, + interpolation=interpolation, + fill=fill, + center=center, + ) + + +def rotate( + inpt: torch.Tensor, + angle: float, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + expand: bool = False, + center: Optional[List[float]] = None, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomRotation` for details.""" + if torch.jit.is_scripting(): + return rotate_image(inpt, angle=angle, interpolation=interpolation, expand=expand, fill=fill, center=center) + + _log_api_usage_once(rotate) + + kernel = _get_kernel(rotate, type(inpt)) + return kernel(inpt, angle=angle, interpolation=interpolation, expand=expand, fill=fill, center=center) + + +@_register_kernel_internal(rotate, torch.Tensor) +@_register_kernel_internal(rotate, tv_tensors.Image) +def rotate_image( + image: torch.Tensor, + angle: float, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + expand: bool = False, + center: Optional[List[float]] = None, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + angle = angle % 360 # shift angle to [0, 360) range + + # fast path: transpose without affine transform + if center is None: + if angle == 0: + return image.clone() + if angle == 180: + return torch.rot90(image, k=2, dims=(-2, -1)) + + if expand or image.shape[-1] == image.shape[-2]: + if angle == 90: + return torch.rot90(image, k=1, dims=(-2, -1)) + if angle == 270: + return torch.rot90(image, k=3, dims=(-2, -1)) + + interpolation = _check_interpolation(interpolation) + + input_height, input_width = image.shape[-2:] + + center_f = [0.0, 0.0] + if center is not None: + # Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center. + center_f = [(c - s * 0.5) for c, s in zip(center, [input_width, input_height])] + + # due to current incoherence of rotation angle direction between affine and rotate implementations + # we need to set -angle. + matrix = _get_inverse_affine_matrix(center_f, -angle, [0.0, 0.0], 1.0, [0.0, 0.0]) + + _assert_grid_transform_inputs(image, matrix, interpolation.value, fill, ["nearest", "bilinear"]) + + output_width, output_height = ( + _compute_affine_output_size(matrix, input_width, input_height) if expand else (input_width, input_height) + ) + dtype = image.dtype if torch.is_floating_point(image) else torch.float32 + theta = torch.tensor(matrix, dtype=dtype, device=image.device).reshape(1, 2, 3) + grid = _affine_grid(theta, w=input_width, h=input_height, ow=output_width, oh=output_height) + return _apply_grid_transform(image, grid, interpolation.value, fill=fill) + + +@_register_kernel_internal(rotate, PIL.Image.Image) +def _rotate_image_pil( + image: PIL.Image.Image, + angle: float, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + expand: bool = False, + center: Optional[List[float]] = None, + fill: _FillTypeJIT = None, +) -> PIL.Image.Image: + interpolation = _check_interpolation(interpolation) + + return _FP.rotate( + image, angle, interpolation=pil_modes_mapping[interpolation], expand=expand, fill=fill, center=center + ) + + +def rotate_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + angle: float, + expand: bool = False, + center: Optional[List[float]] = None, +) -> Tuple[torch.Tensor, Tuple[int, int]]: + return _affine_bounding_boxes_with_expand( + bounding_boxes, + format=format, + canvas_size=canvas_size, + angle=-angle, + translate=[0.0, 0.0], + scale=1.0, + shear=[0.0, 0.0], + center=center, + expand=expand, + ) + + +@_register_kernel_internal(rotate, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _rotate_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, angle: float, expand: bool = False, center: Optional[List[float]] = None, **kwargs +) -> tv_tensors.BoundingBoxes: + output, canvas_size = rotate_bounding_boxes( + inpt.as_subclass(torch.Tensor), + format=inpt.format, + canvas_size=inpt.canvas_size, + angle=angle, + expand=expand, + center=center, + ) + return tv_tensors.wrap(output, like=inpt, canvas_size=canvas_size) + + +def rotate_mask( + mask: torch.Tensor, + angle: float, + expand: bool = False, + center: Optional[List[float]] = None, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = rotate_image( + mask, + angle=angle, + expand=expand, + interpolation=InterpolationMode.NEAREST, + fill=fill, + center=center, + ) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +@_register_kernel_internal(rotate, tv_tensors.Mask, tv_tensor_wrapper=False) +def _rotate_mask_dispatch( + inpt: tv_tensors.Mask, + angle: float, + expand: bool = False, + center: Optional[List[float]] = None, + fill: _FillTypeJIT = None, + **kwargs, +) -> tv_tensors.Mask: + output = rotate_mask(inpt.as_subclass(torch.Tensor), angle=angle, expand=expand, fill=fill, center=center) + return tv_tensors.wrap(output, like=inpt) + + +@_register_kernel_internal(rotate, tv_tensors.Video) +def rotate_video( + video: torch.Tensor, + angle: float, + interpolation: Union[InterpolationMode, int] = InterpolationMode.NEAREST, + expand: bool = False, + center: Optional[List[float]] = None, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + return rotate_image(video, angle, interpolation=interpolation, expand=expand, fill=fill, center=center) + + +def pad( + inpt: torch.Tensor, + padding: List[int], + fill: Optional[Union[int, float, List[float]]] = None, + padding_mode: str = "constant", +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.Pad` for details.""" + if torch.jit.is_scripting(): + return pad_image(inpt, padding=padding, fill=fill, padding_mode=padding_mode) + + _log_api_usage_once(pad) + + kernel = _get_kernel(pad, type(inpt)) + return kernel(inpt, padding=padding, fill=fill, padding_mode=padding_mode) + + +def _parse_pad_padding(padding: Union[int, List[int]]) -> List[int]: + if isinstance(padding, int): + pad_left = pad_right = pad_top = pad_bottom = padding + elif isinstance(padding, (tuple, list)): + if len(padding) == 1: + pad_left = pad_right = pad_top = pad_bottom = padding[0] + elif len(padding) == 2: + pad_left = pad_right = padding[0] + pad_top = pad_bottom = padding[1] + elif len(padding) == 4: + pad_left = padding[0] + pad_top = padding[1] + pad_right = padding[2] + pad_bottom = padding[3] + else: + raise ValueError( + f"Padding must be an int or a 1, 2, or 4 element tuple, not a {len(padding)} element tuple" + ) + else: + raise TypeError(f"`padding` should be an integer or tuple or list of integers, but got {padding}") + + return [pad_left, pad_right, pad_top, pad_bottom] + + +@_register_kernel_internal(pad, torch.Tensor) +@_register_kernel_internal(pad, tv_tensors.Image) +def pad_image( + image: torch.Tensor, + padding: List[int], + fill: Optional[Union[int, float, List[float]]] = None, + padding_mode: str = "constant", +) -> torch.Tensor: + # Be aware that while `padding` has order `[left, top, right, bottom]`, `torch_padding` uses + # `[left, right, top, bottom]`. This stems from the fact that we align our API with PIL, but need to use `torch_pad` + # internally. + torch_padding = _parse_pad_padding(padding) + + if padding_mode not in ("constant", "edge", "reflect", "symmetric"): + raise ValueError( + f"`padding_mode` should be either `'constant'`, `'edge'`, `'reflect'` or `'symmetric'`, " + f"but got `'{padding_mode}'`." + ) + + if fill is None: + fill = 0 + + if isinstance(fill, (int, float)): + return _pad_with_scalar_fill(image, torch_padding, fill=fill, padding_mode=padding_mode) + elif len(fill) == 1: + return _pad_with_scalar_fill(image, torch_padding, fill=fill[0], padding_mode=padding_mode) + else: + return _pad_with_vector_fill(image, torch_padding, fill=fill, padding_mode=padding_mode) + + +def _pad_with_scalar_fill( + image: torch.Tensor, + torch_padding: List[int], + fill: Union[int, float], + padding_mode: str, +) -> torch.Tensor: + shape = image.shape + num_channels, height, width = shape[-3:] + + batch_size = 1 + for s in shape[:-3]: + batch_size *= s + + image = image.reshape(batch_size, num_channels, height, width) + + if padding_mode == "edge": + # Similar to the padding order, `torch_pad`'s PIL's padding modes don't have the same names. Thus, we map + # the PIL name for the padding mode, which we are also using for our API, to the corresponding `torch_pad` + # name. + padding_mode = "replicate" + + if padding_mode == "constant": + image = torch_pad(image, torch_padding, mode=padding_mode, value=float(fill)) + elif padding_mode in ("reflect", "replicate"): + # `torch_pad` only supports `"reflect"` or `"replicate"` padding for floating point inputs. + # TODO: See https://github.com/pytorch/pytorch/issues/40763 + dtype = image.dtype + if not image.is_floating_point(): + needs_cast = True + image = image.to(torch.float32) + else: + needs_cast = False + + image = torch_pad(image, torch_padding, mode=padding_mode) + + if needs_cast: + image = image.to(dtype) + else: # padding_mode == "symmetric" + image = _pad_symmetric(image, torch_padding) + + new_height, new_width = image.shape[-2:] + + return image.reshape(shape[:-3] + (num_channels, new_height, new_width)) + + +# TODO: This should be removed once torch_pad supports non-scalar padding values +def _pad_with_vector_fill( + image: torch.Tensor, + torch_padding: List[int], + fill: List[float], + padding_mode: str, +) -> torch.Tensor: + if padding_mode != "constant": + raise ValueError(f"Padding mode '{padding_mode}' is not supported if fill is not scalar") + + output = _pad_with_scalar_fill(image, torch_padding, fill=0, padding_mode="constant") + left, right, top, bottom = torch_padding + + # We are creating the tensor in the autodetected dtype first and convert to the right one after to avoid an implicit + # float -> int conversion. That happens for example for the valid input of a uint8 image with floating point fill + # value. + fill = torch.tensor(fill, device=image.device).to(dtype=image.dtype).reshape(-1, 1, 1) + + if top > 0: + output[..., :top, :] = fill + if left > 0: + output[..., :, :left] = fill + if bottom > 0: + output[..., -bottom:, :] = fill + if right > 0: + output[..., :, -right:] = fill + return output + + +_pad_image_pil = _register_kernel_internal(pad, PIL.Image.Image)(_FP.pad) + + +@_register_kernel_internal(pad, tv_tensors.Mask) +def pad_mask( + mask: torch.Tensor, + padding: List[int], + fill: Optional[Union[int, float, List[float]]] = None, + padding_mode: str = "constant", +) -> torch.Tensor: + if fill is None: + fill = 0 + + if isinstance(fill, (tuple, list)): + raise ValueError("Non-scalar fill value is not supported") + + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = pad_image(mask, padding=padding, fill=fill, padding_mode=padding_mode) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +def pad_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + padding: List[int], + padding_mode: str = "constant", +) -> Tuple[torch.Tensor, Tuple[int, int]]: + if padding_mode not in ["constant"]: + # TODO: add support of other padding modes + raise ValueError(f"Padding mode '{padding_mode}' is not supported with bounding boxes") + + left, right, top, bottom = _parse_pad_padding(padding) + + if format == tv_tensors.BoundingBoxFormat.XYXY: + pad = [left, top, left, top] + else: + pad = [left, top, 0, 0] + bounding_boxes = bounding_boxes + torch.tensor(pad, dtype=bounding_boxes.dtype, device=bounding_boxes.device) + + height, width = canvas_size + height += top + bottom + width += left + right + canvas_size = (height, width) + + return clamp_bounding_boxes(bounding_boxes, format=format, canvas_size=canvas_size), canvas_size + + +@_register_kernel_internal(pad, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _pad_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, padding: List[int], padding_mode: str = "constant", **kwargs +) -> tv_tensors.BoundingBoxes: + output, canvas_size = pad_bounding_boxes( + inpt.as_subclass(torch.Tensor), + format=inpt.format, + canvas_size=inpt.canvas_size, + padding=padding, + padding_mode=padding_mode, + ) + return tv_tensors.wrap(output, like=inpt, canvas_size=canvas_size) + + +@_register_kernel_internal(pad, tv_tensors.Video) +def pad_video( + video: torch.Tensor, + padding: List[int], + fill: Optional[Union[int, float, List[float]]] = None, + padding_mode: str = "constant", +) -> torch.Tensor: + return pad_image(video, padding, fill=fill, padding_mode=padding_mode) + + +def crop(inpt: torch.Tensor, top: int, left: int, height: int, width: int) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomCrop` for details.""" + if torch.jit.is_scripting(): + return crop_image(inpt, top=top, left=left, height=height, width=width) + + _log_api_usage_once(crop) + + kernel = _get_kernel(crop, type(inpt)) + return kernel(inpt, top=top, left=left, height=height, width=width) + + +@_register_kernel_internal(crop, torch.Tensor) +@_register_kernel_internal(crop, tv_tensors.Image) +def crop_image(image: torch.Tensor, top: int, left: int, height: int, width: int) -> torch.Tensor: + h, w = image.shape[-2:] + + right = left + width + bottom = top + height + + if left < 0 or top < 0 or right > w or bottom > h: + image = image[..., max(top, 0) : bottom, max(left, 0) : right] + torch_padding = [ + max(min(right, 0) - left, 0), + max(right - max(w, left), 0), + max(min(bottom, 0) - top, 0), + max(bottom - max(h, top), 0), + ] + return _pad_with_scalar_fill(image, torch_padding, fill=0, padding_mode="constant") + return image[..., top:bottom, left:right] + + +_crop_image_pil = _FP.crop +_register_kernel_internal(crop, PIL.Image.Image)(_crop_image_pil) + + +def crop_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + top: int, + left: int, + height: int, + width: int, +) -> Tuple[torch.Tensor, Tuple[int, int]]: + + # Crop or implicit pad if left and/or top have negative values: + if format == tv_tensors.BoundingBoxFormat.XYXY: + sub = [left, top, left, top] + else: + sub = [left, top, 0, 0] + + bounding_boxes = bounding_boxes - torch.tensor(sub, dtype=bounding_boxes.dtype, device=bounding_boxes.device) + canvas_size = (height, width) + + return clamp_bounding_boxes(bounding_boxes, format=format, canvas_size=canvas_size), canvas_size + + +@_register_kernel_internal(crop, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _crop_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, top: int, left: int, height: int, width: int +) -> tv_tensors.BoundingBoxes: + output, canvas_size = crop_bounding_boxes( + inpt.as_subclass(torch.Tensor), format=inpt.format, top=top, left=left, height=height, width=width + ) + return tv_tensors.wrap(output, like=inpt, canvas_size=canvas_size) + + +@_register_kernel_internal(crop, tv_tensors.Mask) +def crop_mask(mask: torch.Tensor, top: int, left: int, height: int, width: int) -> torch.Tensor: + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = crop_image(mask, top, left, height, width) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +@_register_kernel_internal(crop, tv_tensors.Video) +def crop_video(video: torch.Tensor, top: int, left: int, height: int, width: int) -> torch.Tensor: + return crop_image(video, top, left, height, width) + + +def perspective( + inpt: torch.Tensor, + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, + coefficients: Optional[List[float]] = None, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomPerspective` for details.""" + if torch.jit.is_scripting(): + return perspective_image( + inpt, + startpoints=startpoints, + endpoints=endpoints, + interpolation=interpolation, + fill=fill, + coefficients=coefficients, + ) + + _log_api_usage_once(perspective) + + kernel = _get_kernel(perspective, type(inpt)) + return kernel( + inpt, + startpoints=startpoints, + endpoints=endpoints, + interpolation=interpolation, + fill=fill, + coefficients=coefficients, + ) + + +def _perspective_grid(coeffs: List[float], ow: int, oh: int, dtype: torch.dtype, device: torch.device) -> torch.Tensor: + # https://github.com/python-pillow/Pillow/blob/4634eafe3c695a014267eefdce830b4a825beed7/ + # src/libImaging/Geometry.c#L394 + + # + # x_out = (coeffs[0] * x + coeffs[1] * y + coeffs[2]) / (coeffs[6] * x + coeffs[7] * y + 1) + # y_out = (coeffs[3] * x + coeffs[4] * y + coeffs[5]) / (coeffs[6] * x + coeffs[7] * y + 1) + # + theta1 = torch.tensor( + [[[coeffs[0], coeffs[1], coeffs[2]], [coeffs[3], coeffs[4], coeffs[5]]]], dtype=dtype, device=device + ) + theta2 = torch.tensor([[[coeffs[6], coeffs[7], 1.0], [coeffs[6], coeffs[7], 1.0]]], dtype=dtype, device=device) + + d = 0.5 + base_grid = torch.empty(1, oh, ow, 3, dtype=dtype, device=device) + x_grid = torch.linspace(d, ow + d - 1.0, steps=ow, device=device, dtype=dtype) + base_grid[..., 0].copy_(x_grid) + y_grid = torch.linspace(d, oh + d - 1.0, steps=oh, device=device, dtype=dtype).unsqueeze_(-1) + base_grid[..., 1].copy_(y_grid) + base_grid[..., 2].fill_(1) + + rescaled_theta1 = theta1.transpose(1, 2).div_(torch.tensor([0.5 * ow, 0.5 * oh], dtype=dtype, device=device)) + shape = (1, oh * ow, 3) + output_grid1 = base_grid.view(shape).bmm(rescaled_theta1) + output_grid2 = base_grid.view(shape).bmm(theta2.transpose(1, 2)) + + output_grid = output_grid1.div_(output_grid2).sub_(1.0) + return output_grid.view(1, oh, ow, 2) + + +def _perspective_coefficients( + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + coefficients: Optional[List[float]], +) -> List[float]: + if coefficients is not None: + if startpoints is not None and endpoints is not None: + raise ValueError("The startpoints/endpoints and the coefficients shouldn't be defined concurrently.") + elif len(coefficients) != 8: + raise ValueError("Argument coefficients should have 8 float values") + return coefficients + elif startpoints is not None and endpoints is not None: + return _get_perspective_coeffs(startpoints, endpoints) + else: + raise ValueError("Either the startpoints/endpoints or the coefficients must have non `None` values.") + + +@_register_kernel_internal(perspective, torch.Tensor) +@_register_kernel_internal(perspective, tv_tensors.Image) +def perspective_image( + image: torch.Tensor, + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, + coefficients: Optional[List[float]] = None, +) -> torch.Tensor: + perspective_coeffs = _perspective_coefficients(startpoints, endpoints, coefficients) + interpolation = _check_interpolation(interpolation) + + _assert_grid_transform_inputs( + image, + matrix=None, + interpolation=interpolation.value, + fill=fill, + supported_interpolation_modes=["nearest", "bilinear"], + coeffs=perspective_coeffs, + ) + + oh, ow = image.shape[-2:] + dtype = image.dtype if torch.is_floating_point(image) else torch.float32 + grid = _perspective_grid(perspective_coeffs, ow=ow, oh=oh, dtype=dtype, device=image.device) + return _apply_grid_transform(image, grid, interpolation.value, fill=fill) + + +@_register_kernel_internal(perspective, PIL.Image.Image) +def _perspective_image_pil( + image: PIL.Image.Image, + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, + coefficients: Optional[List[float]] = None, +) -> PIL.Image.Image: + perspective_coeffs = _perspective_coefficients(startpoints, endpoints, coefficients) + interpolation = _check_interpolation(interpolation) + return _FP.perspective(image, perspective_coeffs, interpolation=pil_modes_mapping[interpolation], fill=fill) + + +def perspective_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + coefficients: Optional[List[float]] = None, +) -> torch.Tensor: + if bounding_boxes.numel() == 0: + return bounding_boxes + + perspective_coeffs = _perspective_coefficients(startpoints, endpoints, coefficients) + + original_shape = bounding_boxes.shape + # TODO: first cast to float if bbox is int64 before convert_bounding_box_format + bounding_boxes = ( + convert_bounding_box_format(bounding_boxes, old_format=format, new_format=tv_tensors.BoundingBoxFormat.XYXY) + ).reshape(-1, 4) + + dtype = bounding_boxes.dtype if torch.is_floating_point(bounding_boxes) else torch.float32 + device = bounding_boxes.device + + # perspective_coeffs are computed as endpoint -> start point + # We have to invert perspective_coeffs for bboxes: + # (x, y) - end point and (x_out, y_out) - start point + # x_out = (coeffs[0] * x + coeffs[1] * y + coeffs[2]) / (coeffs[6] * x + coeffs[7] * y + 1) + # y_out = (coeffs[3] * x + coeffs[4] * y + coeffs[5]) / (coeffs[6] * x + coeffs[7] * y + 1) + # and we would like to get: + # x = (inv_coeffs[0] * x_out + inv_coeffs[1] * y_out + inv_coeffs[2]) + # / (inv_coeffs[6] * x_out + inv_coeffs[7] * y_out + 1) + # y = (inv_coeffs[3] * x_out + inv_coeffs[4] * y_out + inv_coeffs[5]) + # / (inv_coeffs[6] * x_out + inv_coeffs[7] * y_out + 1) + # and compute inv_coeffs in terms of coeffs + + denom = perspective_coeffs[0] * perspective_coeffs[4] - perspective_coeffs[1] * perspective_coeffs[3] + if denom == 0: + raise RuntimeError( + f"Provided perspective_coeffs {perspective_coeffs} can not be inverted to transform bounding boxes. " + f"Denominator is zero, denom={denom}" + ) + + inv_coeffs = [ + (perspective_coeffs[4] - perspective_coeffs[5] * perspective_coeffs[7]) / denom, + (-perspective_coeffs[1] + perspective_coeffs[2] * perspective_coeffs[7]) / denom, + (perspective_coeffs[1] * perspective_coeffs[5] - perspective_coeffs[2] * perspective_coeffs[4]) / denom, + (-perspective_coeffs[3] + perspective_coeffs[5] * perspective_coeffs[6]) / denom, + (perspective_coeffs[0] - perspective_coeffs[2] * perspective_coeffs[6]) / denom, + (-perspective_coeffs[0] * perspective_coeffs[5] + perspective_coeffs[2] * perspective_coeffs[3]) / denom, + (-perspective_coeffs[4] * perspective_coeffs[6] + perspective_coeffs[3] * perspective_coeffs[7]) / denom, + (-perspective_coeffs[0] * perspective_coeffs[7] + perspective_coeffs[1] * perspective_coeffs[6]) / denom, + ] + + theta1 = torch.tensor( + [[inv_coeffs[0], inv_coeffs[1], inv_coeffs[2]], [inv_coeffs[3], inv_coeffs[4], inv_coeffs[5]]], + dtype=dtype, + device=device, + ) + + theta2 = torch.tensor( + [[inv_coeffs[6], inv_coeffs[7], 1.0], [inv_coeffs[6], inv_coeffs[7], 1.0]], dtype=dtype, device=device + ) + + # 1) Let's transform bboxes into a tensor of 4 points (top-left, top-right, bottom-left, bottom-right corners). + # Tensor of points has shape (N * 4, 3), where N is the number of bboxes + # Single point structure is similar to + # [(xmin, ymin, 1), (xmax, ymin, 1), (xmax, ymax, 1), (xmin, ymax, 1)] + points = bounding_boxes[:, [[0, 1], [2, 1], [2, 3], [0, 3]]].reshape(-1, 2) + points = torch.cat([points, torch.ones(points.shape[0], 1, device=points.device)], dim=-1) + # 2) Now let's transform the points using perspective matrices + # x_out = (coeffs[0] * x + coeffs[1] * y + coeffs[2]) / (coeffs[6] * x + coeffs[7] * y + 1) + # y_out = (coeffs[3] * x + coeffs[4] * y + coeffs[5]) / (coeffs[6] * x + coeffs[7] * y + 1) + + numer_points = torch.matmul(points, theta1.T) + denom_points = torch.matmul(points, theta2.T) + transformed_points = numer_points.div_(denom_points) + + # 3) Reshape transformed points to [N boxes, 4 points, x/y coords] + # and compute bounding box from 4 transformed points: + transformed_points = transformed_points.reshape(-1, 4, 2) + out_bbox_mins, out_bbox_maxs = torch.aminmax(transformed_points, dim=1) + + out_bboxes = clamp_bounding_boxes( + torch.cat([out_bbox_mins, out_bbox_maxs], dim=1).to(bounding_boxes.dtype), + format=tv_tensors.BoundingBoxFormat.XYXY, + canvas_size=canvas_size, + ) + + # out_bboxes should be of shape [N boxes, 4] + + return convert_bounding_box_format( + out_bboxes, old_format=tv_tensors.BoundingBoxFormat.XYXY, new_format=format, inplace=True + ).reshape(original_shape) + + +@_register_kernel_internal(perspective, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _perspective_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + coefficients: Optional[List[float]] = None, + **kwargs, +) -> tv_tensors.BoundingBoxes: + output = perspective_bounding_boxes( + inpt.as_subclass(torch.Tensor), + format=inpt.format, + canvas_size=inpt.canvas_size, + startpoints=startpoints, + endpoints=endpoints, + coefficients=coefficients, + ) + return tv_tensors.wrap(output, like=inpt) + + +def perspective_mask( + mask: torch.Tensor, + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + fill: _FillTypeJIT = None, + coefficients: Optional[List[float]] = None, +) -> torch.Tensor: + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = perspective_image( + mask, startpoints, endpoints, interpolation=InterpolationMode.NEAREST, fill=fill, coefficients=coefficients + ) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +@_register_kernel_internal(perspective, tv_tensors.Mask, tv_tensor_wrapper=False) +def _perspective_mask_dispatch( + inpt: tv_tensors.Mask, + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + fill: _FillTypeJIT = None, + coefficients: Optional[List[float]] = None, + **kwargs, +) -> tv_tensors.Mask: + output = perspective_mask( + inpt.as_subclass(torch.Tensor), + startpoints=startpoints, + endpoints=endpoints, + fill=fill, + coefficients=coefficients, + ) + return tv_tensors.wrap(output, like=inpt) + + +@_register_kernel_internal(perspective, tv_tensors.Video) +def perspective_video( + video: torch.Tensor, + startpoints: Optional[List[List[int]]], + endpoints: Optional[List[List[int]]], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, + coefficients: Optional[List[float]] = None, +) -> torch.Tensor: + return perspective_image( + video, startpoints, endpoints, interpolation=interpolation, fill=fill, coefficients=coefficients + ) + + +def elastic( + inpt: torch.Tensor, + displacement: torch.Tensor, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.ElasticTransform` for details.""" + if torch.jit.is_scripting(): + return elastic_image(inpt, displacement=displacement, interpolation=interpolation, fill=fill) + + _log_api_usage_once(elastic) + + kernel = _get_kernel(elastic, type(inpt)) + return kernel(inpt, displacement=displacement, interpolation=interpolation, fill=fill) + + +elastic_transform = elastic + + +@_register_kernel_internal(elastic, torch.Tensor) +@_register_kernel_internal(elastic, tv_tensors.Image) +def elastic_image( + image: torch.Tensor, + displacement: torch.Tensor, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + if not isinstance(displacement, torch.Tensor): + raise TypeError("Argument displacement should be a Tensor") + + interpolation = _check_interpolation(interpolation) + + height, width = image.shape[-2:] + device = image.device + dtype = image.dtype if torch.is_floating_point(image) else torch.float32 + + # Patch: elastic transform should support (cpu,f16) input + is_cpu_half = device.type == "cpu" and dtype == torch.float16 + if is_cpu_half: + image = image.to(torch.float32) + dtype = torch.float32 + + # We are aware that if input image dtype is uint8 and displacement is float64 then + # displacement will be cast to float32 and all computations will be done with float32 + # We can fix this later if needed + + expected_shape = (1, height, width, 2) + if expected_shape != displacement.shape: + raise ValueError(f"Argument displacement shape should be {expected_shape}, but given {displacement.shape}") + + grid = _create_identity_grid((height, width), device=device, dtype=dtype).add_( + displacement.to(dtype=dtype, device=device) + ) + output = _apply_grid_transform(image, grid, interpolation.value, fill=fill) + + if is_cpu_half: + output = output.to(torch.float16) + + return output + + +@_register_kernel_internal(elastic, PIL.Image.Image) +def _elastic_image_pil( + image: PIL.Image.Image, + displacement: torch.Tensor, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, +) -> PIL.Image.Image: + t_img = pil_to_tensor(image) + output = elastic_image(t_img, displacement, interpolation=interpolation, fill=fill) + return to_pil_image(output, mode=image.mode) + + +def _create_identity_grid(size: Tuple[int, int], device: torch.device, dtype: torch.dtype) -> torch.Tensor: + sy, sx = size + base_grid = torch.empty(1, sy, sx, 2, device=device, dtype=dtype) + x_grid = torch.linspace((-sx + 1) / sx, (sx - 1) / sx, sx, device=device, dtype=dtype) + base_grid[..., 0].copy_(x_grid) + + y_grid = torch.linspace((-sy + 1) / sy, (sy - 1) / sy, sy, device=device, dtype=dtype).unsqueeze_(-1) + base_grid[..., 1].copy_(y_grid) + + return base_grid + + +def elastic_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + displacement: torch.Tensor, +) -> torch.Tensor: + expected_shape = (1, canvas_size[0], canvas_size[1], 2) + if not isinstance(displacement, torch.Tensor): + raise TypeError("Argument displacement should be a Tensor") + elif displacement.shape != expected_shape: + raise ValueError(f"Argument displacement shape should be {expected_shape}, but given {displacement.shape}") + + if bounding_boxes.numel() == 0: + return bounding_boxes + + # TODO: add in docstring about approximation we are doing for grid inversion + device = bounding_boxes.device + dtype = bounding_boxes.dtype if torch.is_floating_point(bounding_boxes) else torch.float32 + + if displacement.dtype != dtype or displacement.device != device: + displacement = displacement.to(dtype=dtype, device=device) + + original_shape = bounding_boxes.shape + # TODO: first cast to float if bbox is int64 before convert_bounding_box_format + bounding_boxes = ( + convert_bounding_box_format(bounding_boxes, old_format=format, new_format=tv_tensors.BoundingBoxFormat.XYXY) + ).reshape(-1, 4) + + id_grid = _create_identity_grid(canvas_size, device=device, dtype=dtype) + # We construct an approximation of inverse grid as inv_grid = id_grid - displacement + # This is not an exact inverse of the grid + inv_grid = id_grid.sub_(displacement) + + # Get points from bboxes + points = bounding_boxes[:, [[0, 1], [2, 1], [2, 3], [0, 3]]].reshape(-1, 2) + if points.is_floating_point(): + points = points.ceil_() + index_xy = points.to(dtype=torch.long) + index_x, index_y = index_xy[:, 0], index_xy[:, 1] + + # Transform points: + t_size = torch.tensor(canvas_size[::-1], device=displacement.device, dtype=displacement.dtype) + transformed_points = inv_grid[0, index_y, index_x, :].add_(1).mul_(0.5 * t_size).sub_(0.5) + + transformed_points = transformed_points.reshape(-1, 4, 2) + out_bbox_mins, out_bbox_maxs = torch.aminmax(transformed_points, dim=1) + out_bboxes = clamp_bounding_boxes( + torch.cat([out_bbox_mins, out_bbox_maxs], dim=1).to(bounding_boxes.dtype), + format=tv_tensors.BoundingBoxFormat.XYXY, + canvas_size=canvas_size, + ) + + return convert_bounding_box_format( + out_bboxes, old_format=tv_tensors.BoundingBoxFormat.XYXY, new_format=format, inplace=True + ).reshape(original_shape) + + +@_register_kernel_internal(elastic, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _elastic_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, displacement: torch.Tensor, **kwargs +) -> tv_tensors.BoundingBoxes: + output = elastic_bounding_boxes( + inpt.as_subclass(torch.Tensor), format=inpt.format, canvas_size=inpt.canvas_size, displacement=displacement + ) + return tv_tensors.wrap(output, like=inpt) + + +def elastic_mask( + mask: torch.Tensor, + displacement: torch.Tensor, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = elastic_image(mask, displacement=displacement, interpolation=InterpolationMode.NEAREST, fill=fill) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +@_register_kernel_internal(elastic, tv_tensors.Mask, tv_tensor_wrapper=False) +def _elastic_mask_dispatch( + inpt: tv_tensors.Mask, displacement: torch.Tensor, fill: _FillTypeJIT = None, **kwargs +) -> tv_tensors.Mask: + output = elastic_mask(inpt.as_subclass(torch.Tensor), displacement=displacement, fill=fill) + return tv_tensors.wrap(output, like=inpt) + + +@_register_kernel_internal(elastic, tv_tensors.Video) +def elastic_video( + video: torch.Tensor, + displacement: torch.Tensor, + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + fill: _FillTypeJIT = None, +) -> torch.Tensor: + return elastic_image(video, displacement, interpolation=interpolation, fill=fill) + + +def center_crop(inpt: torch.Tensor, output_size: List[int]) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomCrop` for details.""" + if torch.jit.is_scripting(): + return center_crop_image(inpt, output_size=output_size) + + _log_api_usage_once(center_crop) + + kernel = _get_kernel(center_crop, type(inpt)) + return kernel(inpt, output_size=output_size) + + +def _center_crop_parse_output_size(output_size: List[int]) -> List[int]: + if isinstance(output_size, numbers.Number): + s = int(output_size) + return [s, s] + elif isinstance(output_size, (tuple, list)) and len(output_size) == 1: + return [output_size[0], output_size[0]] + else: + return list(output_size) + + +def _center_crop_compute_padding(crop_height: int, crop_width: int, image_height: int, image_width: int) -> List[int]: + return [ + (crop_width - image_width) // 2 if crop_width > image_width else 0, + (crop_height - image_height) // 2 if crop_height > image_height else 0, + (crop_width - image_width + 1) // 2 if crop_width > image_width else 0, + (crop_height - image_height + 1) // 2 if crop_height > image_height else 0, + ] + + +def _center_crop_compute_crop_anchor( + crop_height: int, crop_width: int, image_height: int, image_width: int +) -> Tuple[int, int]: + crop_top = int(round((image_height - crop_height) / 2.0)) + crop_left = int(round((image_width - crop_width) / 2.0)) + return crop_top, crop_left + + +@_register_kernel_internal(center_crop, torch.Tensor) +@_register_kernel_internal(center_crop, tv_tensors.Image) +def center_crop_image(image: torch.Tensor, output_size: List[int]) -> torch.Tensor: + crop_height, crop_width = _center_crop_parse_output_size(output_size) + shape = image.shape + if image.numel() == 0: + return image.reshape(shape[:-2] + (crop_height, crop_width)) + image_height, image_width = shape[-2:] + + if crop_height > image_height or crop_width > image_width: + padding_ltrb = _center_crop_compute_padding(crop_height, crop_width, image_height, image_width) + image = torch_pad(image, _parse_pad_padding(padding_ltrb), value=0.0) + + image_height, image_width = image.shape[-2:] + if crop_width == image_width and crop_height == image_height: + return image + + crop_top, crop_left = _center_crop_compute_crop_anchor(crop_height, crop_width, image_height, image_width) + return image[..., crop_top : (crop_top + crop_height), crop_left : (crop_left + crop_width)] + + +@_register_kernel_internal(center_crop, PIL.Image.Image) +def _center_crop_image_pil(image: PIL.Image.Image, output_size: List[int]) -> PIL.Image.Image: + crop_height, crop_width = _center_crop_parse_output_size(output_size) + image_height, image_width = _get_size_image_pil(image) + + if crop_height > image_height or crop_width > image_width: + padding_ltrb = _center_crop_compute_padding(crop_height, crop_width, image_height, image_width) + image = _pad_image_pil(image, padding_ltrb, fill=0) + + image_height, image_width = _get_size_image_pil(image) + if crop_width == image_width and crop_height == image_height: + return image + + crop_top, crop_left = _center_crop_compute_crop_anchor(crop_height, crop_width, image_height, image_width) + return _crop_image_pil(image, crop_top, crop_left, crop_height, crop_width) + + +def center_crop_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + output_size: List[int], +) -> Tuple[torch.Tensor, Tuple[int, int]]: + crop_height, crop_width = _center_crop_parse_output_size(output_size) + crop_top, crop_left = _center_crop_compute_crop_anchor(crop_height, crop_width, *canvas_size) + return crop_bounding_boxes( + bounding_boxes, format, top=crop_top, left=crop_left, height=crop_height, width=crop_width + ) + + +@_register_kernel_internal(center_crop, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _center_crop_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, output_size: List[int] +) -> tv_tensors.BoundingBoxes: + output, canvas_size = center_crop_bounding_boxes( + inpt.as_subclass(torch.Tensor), format=inpt.format, canvas_size=inpt.canvas_size, output_size=output_size + ) + return tv_tensors.wrap(output, like=inpt, canvas_size=canvas_size) + + +@_register_kernel_internal(center_crop, tv_tensors.Mask) +def center_crop_mask(mask: torch.Tensor, output_size: List[int]) -> torch.Tensor: + if mask.ndim < 3: + mask = mask.unsqueeze(0) + needs_squeeze = True + else: + needs_squeeze = False + + output = center_crop_image(image=mask, output_size=output_size) + + if needs_squeeze: + output = output.squeeze(0) + + return output + + +@_register_kernel_internal(center_crop, tv_tensors.Video) +def center_crop_video(video: torch.Tensor, output_size: List[int]) -> torch.Tensor: + return center_crop_image(video, output_size) + + +def resized_crop( + inpt: torch.Tensor, + top: int, + left: int, + height: int, + width: int, + size: List[int], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.RandomResizedCrop` for details.""" + if torch.jit.is_scripting(): + return resized_crop_image( + inpt, + top=top, + left=left, + height=height, + width=width, + size=size, + interpolation=interpolation, + antialias=antialias, + ) + + _log_api_usage_once(resized_crop) + + kernel = _get_kernel(resized_crop, type(inpt)) + return kernel( + inpt, + top=top, + left=left, + height=height, + width=width, + size=size, + interpolation=interpolation, + antialias=antialias, + ) + + +@_register_kernel_internal(resized_crop, torch.Tensor) +@_register_kernel_internal(resized_crop, tv_tensors.Image) +def resized_crop_image( + image: torch.Tensor, + top: int, + left: int, + height: int, + width: int, + size: List[int], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, +) -> torch.Tensor: + image = crop_image(image, top, left, height, width) + return resize_image(image, size, interpolation=interpolation, antialias=antialias) + + +def _resized_crop_image_pil( + image: PIL.Image.Image, + top: int, + left: int, + height: int, + width: int, + size: List[int], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, +) -> PIL.Image.Image: + image = _crop_image_pil(image, top, left, height, width) + return _resize_image_pil(image, size, interpolation=interpolation) + + +@_register_kernel_internal(resized_crop, PIL.Image.Image) +def _resized_crop_image_pil_dispatch( + image: PIL.Image.Image, + top: int, + left: int, + height: int, + width: int, + size: List[int], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, +) -> PIL.Image.Image: + if antialias is False: + warnings.warn("Anti-alias option is always applied for PIL Image input. Argument antialias is ignored.") + return _resized_crop_image_pil( + image, + top=top, + left=left, + height=height, + width=width, + size=size, + interpolation=interpolation, + ) + + +def resized_crop_bounding_boxes( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + top: int, + left: int, + height: int, + width: int, + size: List[int], +) -> Tuple[torch.Tensor, Tuple[int, int]]: + bounding_boxes, canvas_size = crop_bounding_boxes(bounding_boxes, format, top, left, height, width) + return resize_bounding_boxes(bounding_boxes, canvas_size=canvas_size, size=size) + + +@_register_kernel_internal(resized_crop, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def _resized_crop_bounding_boxes_dispatch( + inpt: tv_tensors.BoundingBoxes, top: int, left: int, height: int, width: int, size: List[int], **kwargs +) -> tv_tensors.BoundingBoxes: + output, canvas_size = resized_crop_bounding_boxes( + inpt.as_subclass(torch.Tensor), format=inpt.format, top=top, left=left, height=height, width=width, size=size + ) + return tv_tensors.wrap(output, like=inpt, canvas_size=canvas_size) + + +def resized_crop_mask( + mask: torch.Tensor, + top: int, + left: int, + height: int, + width: int, + size: List[int], +) -> torch.Tensor: + mask = crop_mask(mask, top, left, height, width) + return resize_mask(mask, size) + + +@_register_kernel_internal(resized_crop, tv_tensors.Mask, tv_tensor_wrapper=False) +def _resized_crop_mask_dispatch( + inpt: tv_tensors.Mask, top: int, left: int, height: int, width: int, size: List[int], **kwargs +) -> tv_tensors.Mask: + output = resized_crop_mask( + inpt.as_subclass(torch.Tensor), top=top, left=left, height=height, width=width, size=size + ) + return tv_tensors.wrap(output, like=inpt) + + +@_register_kernel_internal(resized_crop, tv_tensors.Video) +def resized_crop_video( + video: torch.Tensor, + top: int, + left: int, + height: int, + width: int, + size: List[int], + interpolation: Union[InterpolationMode, int] = InterpolationMode.BILINEAR, + antialias: Optional[bool] = True, +) -> torch.Tensor: + return resized_crop_image( + video, top, left, height, width, antialias=antialias, size=size, interpolation=interpolation + ) + + +def five_crop( + inpt: torch.Tensor, size: List[int] +) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + """See :class:`~torchvision.transforms.v2.FiveCrop` for details.""" + if torch.jit.is_scripting(): + return five_crop_image(inpt, size=size) + + _log_api_usage_once(five_crop) + + kernel = _get_kernel(five_crop, type(inpt)) + return kernel(inpt, size=size) + + +def _parse_five_crop_size(size: List[int]) -> List[int]: + if isinstance(size, numbers.Number): + s = int(size) + size = [s, s] + elif isinstance(size, (tuple, list)) and len(size) == 1: + s = size[0] + size = [s, s] + + if len(size) != 2: + raise ValueError("Please provide only two dimensions (h, w) for size.") + + return size + + +@_register_five_ten_crop_kernel_internal(five_crop, torch.Tensor) +@_register_five_ten_crop_kernel_internal(five_crop, tv_tensors.Image) +def five_crop_image( + image: torch.Tensor, size: List[int] +) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + crop_height, crop_width = _parse_five_crop_size(size) + image_height, image_width = image.shape[-2:] + + if crop_width > image_width or crop_height > image_height: + raise ValueError(f"Requested crop size {size} is bigger than input size {(image_height, image_width)}") + + tl = crop_image(image, 0, 0, crop_height, crop_width) + tr = crop_image(image, 0, image_width - crop_width, crop_height, crop_width) + bl = crop_image(image, image_height - crop_height, 0, crop_height, crop_width) + br = crop_image(image, image_height - crop_height, image_width - crop_width, crop_height, crop_width) + center = center_crop_image(image, [crop_height, crop_width]) + + return tl, tr, bl, br, center + + +@_register_five_ten_crop_kernel_internal(five_crop, PIL.Image.Image) +def _five_crop_image_pil( + image: PIL.Image.Image, size: List[int] +) -> Tuple[PIL.Image.Image, PIL.Image.Image, PIL.Image.Image, PIL.Image.Image, PIL.Image.Image]: + crop_height, crop_width = _parse_five_crop_size(size) + image_height, image_width = _get_size_image_pil(image) + + if crop_width > image_width or crop_height > image_height: + raise ValueError(f"Requested crop size {size} is bigger than input size {(image_height, image_width)}") + + tl = _crop_image_pil(image, 0, 0, crop_height, crop_width) + tr = _crop_image_pil(image, 0, image_width - crop_width, crop_height, crop_width) + bl = _crop_image_pil(image, image_height - crop_height, 0, crop_height, crop_width) + br = _crop_image_pil(image, image_height - crop_height, image_width - crop_width, crop_height, crop_width) + center = _center_crop_image_pil(image, [crop_height, crop_width]) + + return tl, tr, bl, br, center + + +@_register_five_ten_crop_kernel_internal(five_crop, tv_tensors.Video) +def five_crop_video( + video: torch.Tensor, size: List[int] +) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]: + return five_crop_image(video, size) + + +def ten_crop( + inpt: torch.Tensor, size: List[int], vertical_flip: bool = False +) -> Tuple[ + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, +]: + """See :class:`~torchvision.transforms.v2.TenCrop` for details.""" + if torch.jit.is_scripting(): + return ten_crop_image(inpt, size=size, vertical_flip=vertical_flip) + + _log_api_usage_once(ten_crop) + + kernel = _get_kernel(ten_crop, type(inpt)) + return kernel(inpt, size=size, vertical_flip=vertical_flip) + + +@_register_five_ten_crop_kernel_internal(ten_crop, torch.Tensor) +@_register_five_ten_crop_kernel_internal(ten_crop, tv_tensors.Image) +def ten_crop_image( + image: torch.Tensor, size: List[int], vertical_flip: bool = False +) -> Tuple[ + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, +]: + non_flipped = five_crop_image(image, size) + + if vertical_flip: + image = vertical_flip_image(image) + else: + image = horizontal_flip_image(image) + + flipped = five_crop_image(image, size) + + return non_flipped + flipped + + +@_register_five_ten_crop_kernel_internal(ten_crop, PIL.Image.Image) +def _ten_crop_image_pil( + image: PIL.Image.Image, size: List[int], vertical_flip: bool = False +) -> Tuple[ + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, + PIL.Image.Image, +]: + non_flipped = _five_crop_image_pil(image, size) + + if vertical_flip: + image = _vertical_flip_image_pil(image) + else: + image = _horizontal_flip_image_pil(image) + + flipped = _five_crop_image_pil(image, size) + + return non_flipped + flipped + + +@_register_five_ten_crop_kernel_internal(ten_crop, tv_tensors.Video) +def ten_crop_video( + video: torch.Tensor, size: List[int], vertical_flip: bool = False +) -> Tuple[ + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, + torch.Tensor, +]: + return ten_crop_image(video, size, vertical_flip=vertical_flip) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_meta.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_meta.py new file mode 100644 index 0000000000000000000000000000000000000000..07c54d2b571ec1b7fd7e4a31e90c97e908e78fe1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_meta.py @@ -0,0 +1,279 @@ +from typing import List, Optional, Tuple + +import PIL.Image +import torch +from torchvision import tv_tensors +from torchvision.transforms import _functional_pil as _FP +from torchvision.tv_tensors import BoundingBoxFormat + +from torchvision.utils import _log_api_usage_once + +from ._utils import _get_kernel, _register_kernel_internal, is_pure_tensor + + +def get_dimensions(inpt: torch.Tensor) -> List[int]: + if torch.jit.is_scripting(): + return get_dimensions_image(inpt) + + _log_api_usage_once(get_dimensions) + + kernel = _get_kernel(get_dimensions, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(get_dimensions, torch.Tensor) +@_register_kernel_internal(get_dimensions, tv_tensors.Image, tv_tensor_wrapper=False) +def get_dimensions_image(image: torch.Tensor) -> List[int]: + chw = list(image.shape[-3:]) + ndims = len(chw) + if ndims == 3: + return chw + elif ndims == 2: + chw.insert(0, 1) + return chw + else: + raise TypeError(f"Input tensor should have at least two dimensions, but got {ndims}") + + +_get_dimensions_image_pil = _register_kernel_internal(get_dimensions, PIL.Image.Image)(_FP.get_dimensions) + + +@_register_kernel_internal(get_dimensions, tv_tensors.Video, tv_tensor_wrapper=False) +def get_dimensions_video(video: torch.Tensor) -> List[int]: + return get_dimensions_image(video) + + +def get_num_channels(inpt: torch.Tensor) -> int: + if torch.jit.is_scripting(): + return get_num_channels_image(inpt) + + _log_api_usage_once(get_num_channels) + + kernel = _get_kernel(get_num_channels, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(get_num_channels, torch.Tensor) +@_register_kernel_internal(get_num_channels, tv_tensors.Image, tv_tensor_wrapper=False) +def get_num_channels_image(image: torch.Tensor) -> int: + chw = image.shape[-3:] + ndims = len(chw) + if ndims == 3: + return chw[0] + elif ndims == 2: + return 1 + else: + raise TypeError(f"Input tensor should have at least two dimensions, but got {ndims}") + + +_get_num_channels_image_pil = _register_kernel_internal(get_num_channels, PIL.Image.Image)(_FP.get_image_num_channels) + + +@_register_kernel_internal(get_num_channels, tv_tensors.Video, tv_tensor_wrapper=False) +def get_num_channels_video(video: torch.Tensor) -> int: + return get_num_channels_image(video) + + +# We changed the names to ensure it can be used not only for images but also videos. Thus, we just alias it without +# deprecating the old names. +get_image_num_channels = get_num_channels + + +def get_size(inpt: torch.Tensor) -> List[int]: + if torch.jit.is_scripting(): + return get_size_image(inpt) + + _log_api_usage_once(get_size) + + kernel = _get_kernel(get_size, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(get_size, torch.Tensor) +@_register_kernel_internal(get_size, tv_tensors.Image, tv_tensor_wrapper=False) +def get_size_image(image: torch.Tensor) -> List[int]: + hw = list(image.shape[-2:]) + ndims = len(hw) + if ndims == 2: + return hw + else: + raise TypeError(f"Input tensor should have at least two dimensions, but got {ndims}") + + +@_register_kernel_internal(get_size, PIL.Image.Image) +def _get_size_image_pil(image: PIL.Image.Image) -> List[int]: + width, height = _FP.get_image_size(image) + return [height, width] + + +@_register_kernel_internal(get_size, tv_tensors.Video, tv_tensor_wrapper=False) +def get_size_video(video: torch.Tensor) -> List[int]: + return get_size_image(video) + + +@_register_kernel_internal(get_size, tv_tensors.Mask, tv_tensor_wrapper=False) +def get_size_mask(mask: torch.Tensor) -> List[int]: + return get_size_image(mask) + + +@_register_kernel_internal(get_size, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +def get_size_bounding_boxes(bounding_box: tv_tensors.BoundingBoxes) -> List[int]: + return list(bounding_box.canvas_size) + + +def get_num_frames(inpt: torch.Tensor) -> int: + if torch.jit.is_scripting(): + return get_num_frames_video(inpt) + + _log_api_usage_once(get_num_frames) + + kernel = _get_kernel(get_num_frames, type(inpt)) + return kernel(inpt) + + +@_register_kernel_internal(get_num_frames, torch.Tensor) +@_register_kernel_internal(get_num_frames, tv_tensors.Video, tv_tensor_wrapper=False) +def get_num_frames_video(video: torch.Tensor) -> int: + return video.shape[-4] + + +def _xywh_to_xyxy(xywh: torch.Tensor, inplace: bool) -> torch.Tensor: + xyxy = xywh if inplace else xywh.clone() + xyxy[..., 2:] += xyxy[..., :2] + return xyxy + + +def _xyxy_to_xywh(xyxy: torch.Tensor, inplace: bool) -> torch.Tensor: + xywh = xyxy if inplace else xyxy.clone() + xywh[..., 2:] -= xywh[..., :2] + return xywh + + +def _cxcywh_to_xyxy(cxcywh: torch.Tensor, inplace: bool) -> torch.Tensor: + if not inplace: + cxcywh = cxcywh.clone() + + # Trick to do fast division by 2 and ceil, without casting. It produces the same result as + # `torchvision.ops._box_convert._box_cxcywh_to_xyxy`. + half_wh = cxcywh[..., 2:].div(-2, rounding_mode=None if cxcywh.is_floating_point() else "floor").abs_() + # (cx - width / 2) = x1, same for y1 + cxcywh[..., :2].sub_(half_wh) + # (x1 + width) = x2, same for y2 + cxcywh[..., 2:].add_(cxcywh[..., :2]) + + return cxcywh + + +def _xyxy_to_cxcywh(xyxy: torch.Tensor, inplace: bool) -> torch.Tensor: + if not inplace: + xyxy = xyxy.clone() + + # (x2 - x1) = width, same for height + xyxy[..., 2:].sub_(xyxy[..., :2]) + # (x1 * 2 + width) / 2 = x1 + width / 2 = x1 + (x2-x1)/2 = (x1 + x2)/2 = cx, same for cy + xyxy[..., :2].mul_(2).add_(xyxy[..., 2:]).div_(2, rounding_mode=None if xyxy.is_floating_point() else "floor") + + return xyxy + + +def _convert_bounding_box_format( + bounding_boxes: torch.Tensor, old_format: BoundingBoxFormat, new_format: BoundingBoxFormat, inplace: bool = False +) -> torch.Tensor: + + if new_format == old_format: + return bounding_boxes + + # TODO: Add _xywh_to_cxcywh and _cxcywh_to_xywh to improve performance + if old_format == BoundingBoxFormat.XYWH: + bounding_boxes = _xywh_to_xyxy(bounding_boxes, inplace) + elif old_format == BoundingBoxFormat.CXCYWH: + bounding_boxes = _cxcywh_to_xyxy(bounding_boxes, inplace) + + if new_format == BoundingBoxFormat.XYWH: + bounding_boxes = _xyxy_to_xywh(bounding_boxes, inplace) + elif new_format == BoundingBoxFormat.CXCYWH: + bounding_boxes = _xyxy_to_cxcywh(bounding_boxes, inplace) + + return bounding_boxes + + +def convert_bounding_box_format( + inpt: torch.Tensor, + old_format: Optional[BoundingBoxFormat] = None, + new_format: Optional[BoundingBoxFormat] = None, + inplace: bool = False, +) -> torch.Tensor: + """See :func:`~torchvision.transforms.v2.ConvertBoundingBoxFormat` for details.""" + # This being a kernel / functional hybrid, we need an option to pass `old_format` explicitly for pure tensor + # inputs as well as extract it from `tv_tensors.BoundingBoxes` inputs. However, putting a default value on + # `old_format` means we also need to put one on `new_format` to have syntactically correct Python. Here we mimic the + # default error that would be thrown if `new_format` had no default value. + if new_format is None: + raise TypeError("convert_bounding_box_format() missing 1 required argument: 'new_format'") + + if not torch.jit.is_scripting(): + _log_api_usage_once(convert_bounding_box_format) + + if isinstance(old_format, str): + old_format = BoundingBoxFormat[old_format.upper()] + if isinstance(new_format, str): + new_format = BoundingBoxFormat[new_format.upper()] + + if torch.jit.is_scripting() or is_pure_tensor(inpt): + if old_format is None: + raise ValueError("For pure tensor inputs, `old_format` has to be passed.") + return _convert_bounding_box_format(inpt, old_format=old_format, new_format=new_format, inplace=inplace) + elif isinstance(inpt, tv_tensors.BoundingBoxes): + if old_format is not None: + raise ValueError("For bounding box tv_tensor inputs, `old_format` must not be passed.") + output = _convert_bounding_box_format( + inpt.as_subclass(torch.Tensor), old_format=inpt.format, new_format=new_format, inplace=inplace + ) + return tv_tensors.wrap(output, like=inpt, format=new_format) + else: + raise TypeError( + f"Input can either be a plain tensor or a bounding box tv_tensor, but got {type(inpt)} instead." + ) + + +def _clamp_bounding_boxes( + bounding_boxes: torch.Tensor, format: BoundingBoxFormat, canvas_size: Tuple[int, int] +) -> torch.Tensor: + # TODO: Investigate if it makes sense from a performance perspective to have an implementation for every + # BoundingBoxFormat instead of converting back and forth + in_dtype = bounding_boxes.dtype + bounding_boxes = bounding_boxes.clone() if bounding_boxes.is_floating_point() else bounding_boxes.float() + xyxy_boxes = convert_bounding_box_format( + bounding_boxes, old_format=format, new_format=tv_tensors.BoundingBoxFormat.XYXY, inplace=True + ) + xyxy_boxes[..., 0::2].clamp_(min=0, max=canvas_size[1]) + xyxy_boxes[..., 1::2].clamp_(min=0, max=canvas_size[0]) + out_boxes = convert_bounding_box_format( + xyxy_boxes, old_format=BoundingBoxFormat.XYXY, new_format=format, inplace=True + ) + return out_boxes.to(in_dtype) + + +def clamp_bounding_boxes( + inpt: torch.Tensor, + format: Optional[BoundingBoxFormat] = None, + canvas_size: Optional[Tuple[int, int]] = None, +) -> torch.Tensor: + """See :func:`~torchvision.transforms.v2.ClampBoundingBoxes` for details.""" + if not torch.jit.is_scripting(): + _log_api_usage_once(clamp_bounding_boxes) + + if torch.jit.is_scripting() or is_pure_tensor(inpt): + + if format is None or canvas_size is None: + raise ValueError("For pure tensor inputs, `format` and `canvas_size` have to be passed.") + return _clamp_bounding_boxes(inpt, format=format, canvas_size=canvas_size) + elif isinstance(inpt, tv_tensors.BoundingBoxes): + if format is not None or canvas_size is not None: + raise ValueError("For bounding box tv_tensor inputs, `format` and `canvas_size` must not be passed.") + output = _clamp_bounding_boxes(inpt.as_subclass(torch.Tensor), format=inpt.format, canvas_size=inpt.canvas_size) + return tv_tensors.wrap(output, like=inpt) + else: + raise TypeError( + f"Input can either be a plain tensor or a bounding box tv_tensor, but got {type(inpt)} instead." + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_misc.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_misc.py new file mode 100644 index 0000000000000000000000000000000000000000..0770884360b10b6b1eef8bd8ad5555576d63d919 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_misc.py @@ -0,0 +1,420 @@ +import math +from typing import List, Optional, Tuple + +import PIL.Image +import torch +from torch.nn.functional import conv2d, pad as torch_pad + +from torchvision import tv_tensors +from torchvision.transforms._functional_tensor import _max_value +from torchvision.transforms.functional import pil_to_tensor, to_pil_image + +from torchvision.utils import _log_api_usage_once + +from ._meta import _convert_bounding_box_format + +from ._utils import _get_kernel, _register_kernel_internal, is_pure_tensor + + +def normalize( + inpt: torch.Tensor, + mean: List[float], + std: List[float], + inplace: bool = False, +) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.Normalize` for details.""" + if torch.jit.is_scripting(): + return normalize_image(inpt, mean=mean, std=std, inplace=inplace) + + _log_api_usage_once(normalize) + + kernel = _get_kernel(normalize, type(inpt)) + return kernel(inpt, mean=mean, std=std, inplace=inplace) + + +@_register_kernel_internal(normalize, torch.Tensor) +@_register_kernel_internal(normalize, tv_tensors.Image) +def normalize_image(image: torch.Tensor, mean: List[float], std: List[float], inplace: bool = False) -> torch.Tensor: + if not image.is_floating_point(): + raise TypeError(f"Input tensor should be a float tensor. Got {image.dtype}.") + + if image.ndim < 3: + raise ValueError(f"Expected tensor to be a tensor image of size (..., C, H, W). Got {image.shape}.") + + if isinstance(std, (tuple, list)): + divzero = not all(std) + elif isinstance(std, (int, float)): + divzero = std == 0 + else: + divzero = False + if divzero: + raise ValueError("std evaluated to zero, leading to division by zero.") + + dtype = image.dtype + device = image.device + mean = torch.as_tensor(mean, dtype=dtype, device=device) + std = torch.as_tensor(std, dtype=dtype, device=device) + if mean.ndim == 1: + mean = mean.view(-1, 1, 1) + if std.ndim == 1: + std = std.view(-1, 1, 1) + + if inplace: + image = image.sub_(mean) + else: + image = image.sub(mean) + + return image.div_(std) + + +@_register_kernel_internal(normalize, tv_tensors.Video) +def normalize_video(video: torch.Tensor, mean: List[float], std: List[float], inplace: bool = False) -> torch.Tensor: + return normalize_image(video, mean, std, inplace=inplace) + + +def gaussian_blur(inpt: torch.Tensor, kernel_size: List[int], sigma: Optional[List[float]] = None) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.GaussianBlur` for details.""" + if torch.jit.is_scripting(): + return gaussian_blur_image(inpt, kernel_size=kernel_size, sigma=sigma) + + _log_api_usage_once(gaussian_blur) + + kernel = _get_kernel(gaussian_blur, type(inpt)) + return kernel(inpt, kernel_size=kernel_size, sigma=sigma) + + +def _get_gaussian_kernel1d(kernel_size: int, sigma: float, dtype: torch.dtype, device: torch.device) -> torch.Tensor: + lim = (kernel_size - 1) / (2.0 * math.sqrt(2.0)) + x = torch.linspace(-lim, lim, steps=kernel_size, dtype=dtype, device=device) + kernel1d = torch.softmax(x.div(sigma).pow(2).neg(), dim=0) + return kernel1d + + +def _get_gaussian_kernel2d( + kernel_size: List[int], sigma: List[float], dtype: torch.dtype, device: torch.device +) -> torch.Tensor: + kernel1d_x = _get_gaussian_kernel1d(kernel_size[0], sigma[0], dtype, device) + kernel1d_y = _get_gaussian_kernel1d(kernel_size[1], sigma[1], dtype, device) + kernel2d = kernel1d_y.unsqueeze(-1) * kernel1d_x + return kernel2d + + +@_register_kernel_internal(gaussian_blur, torch.Tensor) +@_register_kernel_internal(gaussian_blur, tv_tensors.Image) +def gaussian_blur_image( + image: torch.Tensor, kernel_size: List[int], sigma: Optional[List[float]] = None +) -> torch.Tensor: + # TODO: consider deprecating integers from sigma on the future + if isinstance(kernel_size, int): + kernel_size = [kernel_size, kernel_size] + elif len(kernel_size) != 2: + raise ValueError(f"If kernel_size is a sequence its length should be 2. Got {len(kernel_size)}") + for ksize in kernel_size: + if ksize % 2 == 0 or ksize < 0: + raise ValueError(f"kernel_size should have odd and positive integers. Got {kernel_size}") + + if sigma is None: + sigma = [ksize * 0.15 + 0.35 for ksize in kernel_size] + else: + if isinstance(sigma, (list, tuple)): + length = len(sigma) + if length == 1: + s = sigma[0] + sigma = [s, s] + elif length != 2: + raise ValueError(f"If sigma is a sequence, its length should be 2. Got {length}") + elif isinstance(sigma, (int, float)): + s = float(sigma) + sigma = [s, s] + else: + raise TypeError(f"sigma should be either float or sequence of floats. Got {type(sigma)}") + for s in sigma: + if s <= 0.0: + raise ValueError(f"sigma should have positive values. Got {sigma}") + + if image.numel() == 0: + return image + + dtype = image.dtype + shape = image.shape + ndim = image.ndim + if ndim == 3: + image = image.unsqueeze(dim=0) + elif ndim > 4: + image = image.reshape((-1,) + shape[-3:]) + + fp = torch.is_floating_point(image) + kernel = _get_gaussian_kernel2d(kernel_size, sigma, dtype=dtype if fp else torch.float32, device=image.device) + kernel = kernel.expand(shape[-3], 1, kernel.shape[0], kernel.shape[1]) + + output = image if fp else image.to(dtype=torch.float32) + + # padding = (left, right, top, bottom) + padding = [kernel_size[0] // 2, kernel_size[0] // 2, kernel_size[1] // 2, kernel_size[1] // 2] + output = torch_pad(output, padding, mode="reflect") + output = conv2d(output, kernel, groups=shape[-3]) + + if ndim == 3: + output = output.squeeze(dim=0) + elif ndim > 4: + output = output.reshape(shape) + + if not fp: + output = output.round_().to(dtype=dtype) + + return output + + +@_register_kernel_internal(gaussian_blur, PIL.Image.Image) +def _gaussian_blur_image_pil( + image: PIL.Image.Image, kernel_size: List[int], sigma: Optional[List[float]] = None +) -> PIL.Image.Image: + t_img = pil_to_tensor(image) + output = gaussian_blur_image(t_img, kernel_size=kernel_size, sigma=sigma) + return to_pil_image(output, mode=image.mode) + + +@_register_kernel_internal(gaussian_blur, tv_tensors.Video) +def gaussian_blur_video( + video: torch.Tensor, kernel_size: List[int], sigma: Optional[List[float]] = None +) -> torch.Tensor: + return gaussian_blur_image(video, kernel_size, sigma) + + +def gaussian_noise(inpt: torch.Tensor, mean: float = 0.0, sigma: float = 0.1, clip: bool = True) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.GaussianNoise`""" + if torch.jit.is_scripting(): + return gaussian_noise_image(inpt, mean=mean, sigma=sigma) + + _log_api_usage_once(gaussian_noise) + + kernel = _get_kernel(gaussian_noise, type(inpt)) + return kernel(inpt, mean=mean, sigma=sigma, clip=clip) + + +@_register_kernel_internal(gaussian_noise, torch.Tensor) +@_register_kernel_internal(gaussian_noise, tv_tensors.Image) +def gaussian_noise_image(image: torch.Tensor, mean: float = 0.0, sigma: float = 0.1, clip: bool = True) -> torch.Tensor: + if not image.is_floating_point(): + raise ValueError(f"Input tensor is expected to be in float dtype, got dtype={image.dtype}") + if sigma < 0: + raise ValueError(f"sigma shouldn't be negative. Got {sigma}") + + noise = mean + torch.randn_like(image) * sigma + out = image + noise + if clip: + out = torch.clamp(out, 0, 1) + return out + + +@_register_kernel_internal(gaussian_noise, tv_tensors.Video) +def gaussian_noise_video(video: torch.Tensor, mean: float = 0.0, sigma: float = 0.1, clip: bool = True) -> torch.Tensor: + return gaussian_noise_image(video, mean=mean, sigma=sigma, clip=clip) + + +@_register_kernel_internal(gaussian_noise, PIL.Image.Image) +def _gaussian_noise_pil( + video: torch.Tensor, mean: float = 0.0, sigma: float = 0.1, clip: bool = True +) -> PIL.Image.Image: + raise ValueError("Gaussian Noise is not implemented for PIL images.") + + +def to_dtype(inpt: torch.Tensor, dtype: torch.dtype = torch.float, scale: bool = False) -> torch.Tensor: + """See :func:`~torchvision.transforms.v2.ToDtype` for details.""" + if torch.jit.is_scripting(): + return to_dtype_image(inpt, dtype=dtype, scale=scale) + + _log_api_usage_once(to_dtype) + + kernel = _get_kernel(to_dtype, type(inpt)) + return kernel(inpt, dtype=dtype, scale=scale) + + +def _num_value_bits(dtype: torch.dtype) -> int: + if dtype == torch.uint8: + return 8 + elif dtype == torch.int8: + return 7 + elif dtype == torch.int16: + return 15 + elif dtype == torch.uint16: + return 16 + elif dtype == torch.int32: + return 31 + elif dtype == torch.int64: + return 63 + else: + raise TypeError(f"Number of value bits is only defined for integer dtypes, but got {dtype}.") + + +@_register_kernel_internal(to_dtype, torch.Tensor) +@_register_kernel_internal(to_dtype, tv_tensors.Image) +def to_dtype_image(image: torch.Tensor, dtype: torch.dtype = torch.float, scale: bool = False) -> torch.Tensor: + + if image.dtype == dtype: + return image + elif not scale: + return image.to(dtype) + + float_input = image.is_floating_point() + if torch.jit.is_scripting(): + # TODO: remove this branch as soon as `dtype.is_floating_point` is supported by JIT + float_output = torch.tensor(0, dtype=dtype).is_floating_point() + else: + float_output = dtype.is_floating_point + + if float_input: + # float to float + if float_output: + return image.to(dtype) + + # float to int + if (image.dtype == torch.float32 and dtype in (torch.int32, torch.int64)) or ( + image.dtype == torch.float64 and dtype == torch.int64 + ): + raise RuntimeError(f"The conversion from {image.dtype} to {dtype} cannot be performed safely.") + + # For data in the range `[0.0, 1.0]`, just multiplying by the maximum value of the integer range and converting + # to the integer dtype is not sufficient. For example, `torch.rand(...).mul(255).to(torch.uint8)` will only + # be `255` if the input is exactly `1.0`. See https://github.com/pytorch/vision/pull/2078#issuecomment-612045321 + # for a detailed analysis. + # To mitigate this, we could round before we convert to the integer dtype, but this is an extra operation. + # Instead, we can also multiply by the maximum value plus something close to `1`. See + # https://github.com/pytorch/vision/pull/2078#issuecomment-613524965 for details. + eps = 1e-3 + max_value = float(_max_value(dtype)) + # We need to scale first since the conversion would otherwise turn the input range `[0.0, 1.0]` into the + # discrete set `{0, 1}`. + return image.mul(max_value + 1.0 - eps).to(dtype) + else: + # int to float + if float_output: + return image.to(dtype).mul_(1.0 / _max_value(image.dtype)) + + # int to int + num_value_bits_input = _num_value_bits(image.dtype) + num_value_bits_output = _num_value_bits(dtype) + + # TODO: Remove if/else inner blocks once uint16 dtype supports bitwise shift operations. + shift_by = abs(num_value_bits_input - num_value_bits_output) + if num_value_bits_input > num_value_bits_output: + if image.dtype == torch.uint16: + return (image / 2 ** (shift_by)).to(dtype) + else: + return image.bitwise_right_shift(shift_by).to(dtype) + else: + if dtype == torch.uint16: + return image.to(dtype) * 2 ** (shift_by) + else: + return image.to(dtype).bitwise_left_shift_(shift_by) + + +# We encourage users to use to_dtype() instead but we keep this for BC +def convert_image_dtype(image: torch.Tensor, dtype: torch.dtype = torch.float32) -> torch.Tensor: + """[DEPRECATED] Use to_dtype() instead.""" + return to_dtype_image(image, dtype=dtype, scale=True) + + +@_register_kernel_internal(to_dtype, tv_tensors.Video) +def to_dtype_video(video: torch.Tensor, dtype: torch.dtype = torch.float, scale: bool = False) -> torch.Tensor: + return to_dtype_image(video, dtype, scale=scale) + + +@_register_kernel_internal(to_dtype, tv_tensors.BoundingBoxes, tv_tensor_wrapper=False) +@_register_kernel_internal(to_dtype, tv_tensors.Mask, tv_tensor_wrapper=False) +def _to_dtype_tensor_dispatch(inpt: torch.Tensor, dtype: torch.dtype, scale: bool = False) -> torch.Tensor: + # We don't need to unwrap and rewrap here, since TVTensor.to() preserves the type + return inpt.to(dtype) + + +def sanitize_bounding_boxes( + bounding_boxes: torch.Tensor, + format: Optional[tv_tensors.BoundingBoxFormat] = None, + canvas_size: Optional[Tuple[int, int]] = None, + min_size: float = 1.0, + min_area: float = 1.0, +) -> Tuple[torch.Tensor, torch.Tensor]: + """Remove degenerate/invalid bounding boxes and return the corresponding indexing mask. + + This removes bounding boxes that: + + - are below a given ``min_size`` or ``min_area``: by default this also removes degenerate boxes that have e.g. X2 <= X1. + - have any coordinate outside of their corresponding image. You may want to + call :func:`~torchvision.transforms.v2.functional.clamp_bounding_boxes` first to avoid undesired removals. + + It is recommended to call it at the end of a pipeline, before passing the + input to the models. It is critical to call this transform if + :class:`~torchvision.transforms.v2.RandomIoUCrop` was called. + If you want to be extra careful, you may call it after all transforms that + may modify bounding boxes but once at the end should be enough in most + cases. + + Args: + bounding_boxes (Tensor or :class:`~torchvision.tv_tensors.BoundingBoxes`): The bounding boxes to be sanitized. + format (str or :class:`~torchvision.tv_tensors.BoundingBoxFormat`, optional): The format of the bounding boxes. + Must be left to none if ``bounding_boxes`` is a :class:`~torchvision.tv_tensors.BoundingBoxes` object. + canvas_size (tuple of int, optional): The canvas_size of the bounding boxes + (size of the corresponding image/video). + Must be left to none if ``bounding_boxes`` is a :class:`~torchvision.tv_tensors.BoundingBoxes` object. + min_size (float, optional) The size below which bounding boxes are removed. Default is 1. + min_area (float, optional) The area below which bounding boxes are removed. Default is 1. + + Returns: + out (tuple of Tensors): The subset of valid bounding boxes, and the corresponding indexing mask. + The mask can then be used to subset other tensors (e.g. labels) that are associated with the bounding boxes. + """ + if torch.jit.is_scripting() or is_pure_tensor(bounding_boxes): + if format is None or canvas_size is None: + raise ValueError( + "format and canvas_size cannot be None if bounding_boxes is a pure tensor. " + f"Got format={format} and canvas_size={canvas_size}." + "Set those to appropriate values or pass bounding_boxes as a tv_tensors.BoundingBoxes object." + ) + if isinstance(format, str): + format = tv_tensors.BoundingBoxFormat[format.upper()] + valid = _get_sanitize_bounding_boxes_mask( + bounding_boxes, format=format, canvas_size=canvas_size, min_size=min_size, min_area=min_area + ) + bounding_boxes = bounding_boxes[valid] + else: + if not isinstance(bounding_boxes, tv_tensors.BoundingBoxes): + raise ValueError("bounding_boxes must be a tv_tensors.BoundingBoxes instance or a pure tensor.") + if format is not None or canvas_size is not None: + raise ValueError( + "format and canvas_size must be None when bounding_boxes is a tv_tensors.BoundingBoxes instance. " + f"Got format={format} and canvas_size={canvas_size}. " + "Leave those to None or pass bounding_boxes as a pure tensor." + ) + valid = _get_sanitize_bounding_boxes_mask( + bounding_boxes, + format=bounding_boxes.format, + canvas_size=bounding_boxes.canvas_size, + min_size=min_size, + min_area=min_area, + ) + bounding_boxes = tv_tensors.wrap(bounding_boxes[valid], like=bounding_boxes) + + return bounding_boxes, valid + + +def _get_sanitize_bounding_boxes_mask( + bounding_boxes: torch.Tensor, + format: tv_tensors.BoundingBoxFormat, + canvas_size: Tuple[int, int], + min_size: float = 1.0, + min_area: float = 1.0, +) -> torch.Tensor: + + bounding_boxes = _convert_bounding_box_format( + bounding_boxes, new_format=tv_tensors.BoundingBoxFormat.XYXY, old_format=format + ) + + image_h, image_w = canvas_size + ws, hs = bounding_boxes[:, 2] - bounding_boxes[:, 0], bounding_boxes[:, 3] - bounding_boxes[:, 1] + valid = (ws >= min_size) & (hs >= min_size) & (bounding_boxes >= 0).all(dim=-1) & (ws * hs >= min_area) + # TODO: Do we really need to check for out of bounds here? All + # transforms should be clamping anyway, so this should never happen? + image_h, image_w = canvas_size + valid &= (bounding_boxes[:, 0] <= image_w) & (bounding_boxes[:, 2] <= image_w) + valid &= (bounding_boxes[:, 1] <= image_h) & (bounding_boxes[:, 3] <= image_h) + return valid diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_temporal.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_temporal.py new file mode 100644 index 0000000000000000000000000000000000000000..efcc4586d1101c848589af64a7054c7c3600bf90 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_temporal.py @@ -0,0 +1,27 @@ +import torch + +from torchvision import tv_tensors + +from torchvision.utils import _log_api_usage_once + +from ._utils import _get_kernel, _register_kernel_internal + + +def uniform_temporal_subsample(inpt: torch.Tensor, num_samples: int) -> torch.Tensor: + """See :class:`~torchvision.transforms.v2.UniformTemporalSubsample` for details.""" + if torch.jit.is_scripting(): + return uniform_temporal_subsample_video(inpt, num_samples=num_samples) + + _log_api_usage_once(uniform_temporal_subsample) + + kernel = _get_kernel(uniform_temporal_subsample, type(inpt)) + return kernel(inpt, num_samples=num_samples) + + +@_register_kernel_internal(uniform_temporal_subsample, torch.Tensor) +@_register_kernel_internal(uniform_temporal_subsample, tv_tensors.Video) +def uniform_temporal_subsample_video(video: torch.Tensor, num_samples: int) -> torch.Tensor: + # Reference: https://github.com/facebookresearch/pytorchvideo/blob/a0a131e/pytorchvideo/transforms/functional.py#L19 + t_max = video.shape[-4] - 1 + indices = torch.linspace(0, t_max, num_samples, device=video.device).long() + return torch.index_select(video, -4, indices) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_type_conversion.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_type_conversion.py new file mode 100644 index 0000000000000000000000000000000000000000..72aa07855f700cc2552835b24ea007af0fa932e7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_type_conversion.py @@ -0,0 +1,27 @@ +from typing import Union + +import numpy as np +import PIL.Image +import torch +from torchvision import tv_tensors +from torchvision.transforms import functional as _F + + +@torch.jit.unused +def to_image(inpt: Union[torch.Tensor, PIL.Image.Image, np.ndarray]) -> tv_tensors.Image: + """See :class:`~torchvision.transforms.v2.ToImage` for details.""" + if isinstance(inpt, np.ndarray): + output = torch.from_numpy(np.atleast_3d(inpt)).permute((2, 0, 1)).contiguous() + elif isinstance(inpt, PIL.Image.Image): + output = pil_to_tensor(inpt) + elif isinstance(inpt, torch.Tensor): + output = inpt + else: + raise TypeError( + f"Input can either be a pure Tensor, a numpy array, or a PIL image, but got {type(inpt)} instead." + ) + return tv_tensors.Image(output) + + +to_pil_image = _F.to_pil_image +pil_to_tensor = _F.pil_to_tensor diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..9940c4724696e7a85675ee38522340332fc64497 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/transforms/v2/functional/_utils.py @@ -0,0 +1,141 @@ +import functools +from typing import Any, Callable, Dict, List, Optional, Sequence, Type, Union + +import torch +from torchvision import tv_tensors + +_FillType = Union[int, float, Sequence[int], Sequence[float], None] +_FillTypeJIT = Optional[List[float]] + + +def is_pure_tensor(inpt: Any) -> bool: + return isinstance(inpt, torch.Tensor) and not isinstance(inpt, tv_tensors.TVTensor) + + +# {functional: {input_type: type_specific_kernel}} +_KERNEL_REGISTRY: Dict[Callable, Dict[Type, Callable]] = {} + + +def _kernel_tv_tensor_wrapper(kernel): + @functools.wraps(kernel) + def wrapper(inpt, *args, **kwargs): + # If you're wondering whether we could / should get rid of this wrapper, + # the answer is no: we want to pass pure Tensors to avoid the overhead + # of the __torch_function__ machinery. Note that this is always valid, + # regardless of whether we override __torch_function__ in our base class + # or not. + # Also, even if we didn't call `as_subclass` here, we would still need + # this wrapper to call wrap(), because the TVTensor type would be + # lost after the first operation due to our own __torch_function__ + # logic. + output = kernel(inpt.as_subclass(torch.Tensor), *args, **kwargs) + return tv_tensors.wrap(output, like=inpt) + + return wrapper + + +def _register_kernel_internal(functional, input_type, *, tv_tensor_wrapper=True): + registry = _KERNEL_REGISTRY.setdefault(functional, {}) + if input_type in registry: + raise ValueError(f"Functional {functional} already has a kernel registered for type {input_type}.") + + def decorator(kernel): + registry[input_type] = ( + _kernel_tv_tensor_wrapper(kernel) + if issubclass(input_type, tv_tensors.TVTensor) and tv_tensor_wrapper + else kernel + ) + return kernel + + return decorator + + +def _name_to_functional(name): + import torchvision.transforms.v2.functional # noqa + + try: + return getattr(torchvision.transforms.v2.functional, name) + except AttributeError: + raise ValueError( + f"Could not find functional with name '{name}' in torchvision.transforms.v2.functional." + ) from None + + +_BUILTIN_DATAPOINT_TYPES = { + obj for obj in tv_tensors.__dict__.values() if isinstance(obj, type) and issubclass(obj, tv_tensors.TVTensor) +} + + +def register_kernel(functional, tv_tensor_cls): + """Decorate a kernel to register it for a functional and a (custom) tv_tensor type. + + See :ref:`sphx_glr_auto_examples_transforms_plot_custom_tv_tensors.py` for usage + details. + """ + if isinstance(functional, str): + functional = _name_to_functional(name=functional) + elif not ( + callable(functional) + and getattr(functional, "__module__", "").startswith("torchvision.transforms.v2.functional") + ): + raise ValueError( + f"Kernels can only be registered on functionals from the torchvision.transforms.v2.functional namespace, " + f"but got {functional}." + ) + + if not (isinstance(tv_tensor_cls, type) and issubclass(tv_tensor_cls, tv_tensors.TVTensor)): + raise ValueError( + f"Kernels can only be registered for subclasses of torchvision.tv_tensors.TVTensor, " + f"but got {tv_tensor_cls}." + ) + + if tv_tensor_cls in _BUILTIN_DATAPOINT_TYPES: + raise ValueError(f"Kernels cannot be registered for the builtin tv_tensor classes, but got {tv_tensor_cls}") + + return _register_kernel_internal(functional, tv_tensor_cls, tv_tensor_wrapper=False) + + +def _get_kernel(functional, input_type, *, allow_passthrough=False): + registry = _KERNEL_REGISTRY.get(functional) + if not registry: + raise ValueError(f"No kernel registered for functional {functional.__name__}.") + + for cls in input_type.__mro__: + if cls in registry: + return registry[cls] + elif cls is tv_tensors.TVTensor: + # We don't want user-defined tv_tensors to dispatch to the pure Tensor kernels, so we explicit stop the + # MRO traversal before hitting torch.Tensor. We can even stop at tv_tensors.TVTensor, since we don't + # allow kernels to be registered for tv_tensors.TVTensor anyway. + break + + if allow_passthrough: + return lambda inpt, *args, **kwargs: inpt + + raise TypeError( + f"Functional F.{functional.__name__} supports inputs of type {registry.keys()}, " + f"but got {input_type} instead." + ) + + +# This basically replicates _register_kernel_internal, but with a specialized wrapper for five_crop / ten_crop +# We could get rid of this by letting _register_kernel_internal take arbitrary functionals rather than wrap_kernel: bool +def _register_five_ten_crop_kernel_internal(functional, input_type): + registry = _KERNEL_REGISTRY.setdefault(functional, {}) + if input_type in registry: + raise TypeError(f"Functional '{functional}' already has a kernel registered for type '{input_type}'.") + + def wrap(kernel): + @functools.wraps(kernel) + def wrapper(inpt, *args, **kwargs): + output = kernel(inpt, *args, **kwargs) + container_type = type(output) + return container_type(tv_tensors.wrap(o, like=inpt) for o in output) + + return wrapper + + def decorator(kernel): + registry[input_type] = wrap(kernel) if issubclass(input_type, tv_tensors.TVTensor) else kernel + return kernel + + return decorator diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..dce7f92fce0e4d90e930bb12a5e240ae94f42147 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__init__.py @@ -0,0 +1,35 @@ +import torch + +from ._bounding_boxes import BoundingBoxes, BoundingBoxFormat +from ._image import Image +from ._mask import Mask +from ._torch_function_helpers import set_return_type +from ._tv_tensor import TVTensor +from ._video import Video + + +# TODO: Fix this. We skip this method as it leads to +# RecursionError: maximum recursion depth exceeded while calling a Python object +# Until `disable` is removed, there will be graph breaks after all calls to functional transforms +@torch.compiler.disable +def wrap(wrappee, *, like, **kwargs): + """Convert a :class:`torch.Tensor` (``wrappee``) into the same :class:`~torchvision.tv_tensors.TVTensor` subclass as ``like``. + + If ``like`` is a :class:`~torchvision.tv_tensors.BoundingBoxes`, the ``format`` and ``canvas_size`` of + ``like`` are assigned to ``wrappee``, unless they are passed as ``kwargs``. + + Args: + wrappee (Tensor): The tensor to convert. + like (:class:`~torchvision.tv_tensors.TVTensor`): The reference. + ``wrappee`` will be converted into the same subclass as ``like``. + kwargs: Can contain "format" and "canvas_size" if ``like`` is a :class:`~torchvision.tv_tensor.BoundingBoxes`. + Ignored otherwise. + """ + if isinstance(like, BoundingBoxes): + return BoundingBoxes._wrap( + wrappee, + format=kwargs.get("format", like.format), + canvas_size=kwargs.get("canvas_size", like.canvas_size), + ) + else: + return wrappee.as_subclass(type(like)) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d8d0a0c2e1ef54c9d6ccb2344d5b08752ff1149c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_bounding_boxes.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_bounding_boxes.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7eebbd35386c4ee5a5c830f7e2fd63a853a40f70 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_bounding_boxes.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_dataset_wrapper.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_dataset_wrapper.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5cce80251c72c5567ad38f9ea89eeca28a4f3308 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_dataset_wrapper.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_image.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_image.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b4cd9ec987c6a18103369ae1c89ac322ff7b1d71 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_image.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_mask.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_mask.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c08c957d625f914f4a8cd492416c9601a8c63487 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_mask.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_torch_function_helpers.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_torch_function_helpers.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c4aa355f0671eec8b7a0c6a626d01d4d541e65f8 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_torch_function_helpers.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_tv_tensor.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_tv_tensor.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..55b07445f7fbe7fea31f292bd7acdcdb47309924 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_tv_tensor.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_video.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_video.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9c96b8f16f93753748ee01d5cdc1c8458acb9e37 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/__pycache__/_video.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_bounding_boxes.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_bounding_boxes.py new file mode 100644 index 0000000000000000000000000000000000000000..d9210ac83fd366a6e975df68a98e378bb4829dcb --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_bounding_boxes.py @@ -0,0 +1,103 @@ +from __future__ import annotations + +from enum import Enum +from typing import Any, Mapping, Optional, Sequence, Tuple, Union + +import torch +from torch.utils._pytree import tree_flatten + +from ._tv_tensor import TVTensor + + +class BoundingBoxFormat(Enum): + """Coordinate format of a bounding box. + + Available formats are + + * ``XYXY`` + * ``XYWH`` + * ``CXCYWH`` + """ + + XYXY = "XYXY" + XYWH = "XYWH" + CXCYWH = "CXCYWH" + + +class BoundingBoxes(TVTensor): + """:class:`torch.Tensor` subclass for bounding boxes with shape ``[N, 4]``. + + .. note:: + There should be only one :class:`~torchvision.tv_tensors.BoundingBoxes` + instance per sample e.g. ``{"img": img, "bbox": BoundingBoxes(...)}``, + although one :class:`~torchvision.tv_tensors.BoundingBoxes` object can + contain multiple bounding boxes. + + Args: + data: Any data that can be turned into a tensor with :func:`torch.as_tensor`. + format (BoundingBoxFormat, str): Format of the bounding box. + canvas_size (two-tuple of ints): Height and width of the corresponding image or video. + dtype (torch.dtype, optional): Desired data type of the bounding box. If omitted, will be inferred from + ``data``. + device (torch.device, optional): Desired device of the bounding box. If omitted and ``data`` is a + :class:`torch.Tensor`, the device is taken from it. Otherwise, the bounding box is constructed on the CPU. + requires_grad (bool, optional): Whether autograd should record operations on the bounding box. If omitted and + ``data`` is a :class:`torch.Tensor`, the value is taken from it. Otherwise, defaults to ``False``. + """ + + format: BoundingBoxFormat + canvas_size: Tuple[int, int] + + @classmethod + def _wrap(cls, tensor: torch.Tensor, *, format: Union[BoundingBoxFormat, str], canvas_size: Tuple[int, int], check_dims: bool = True) -> BoundingBoxes: # type: ignore[override] + if check_dims: + if tensor.ndim == 1: + tensor = tensor.unsqueeze(0) + elif tensor.ndim != 2: + raise ValueError(f"Expected a 1D or 2D tensor, got {tensor.ndim}D") + if isinstance(format, str): + format = BoundingBoxFormat[format.upper()] + bounding_boxes = tensor.as_subclass(cls) + bounding_boxes.format = format + bounding_boxes.canvas_size = canvas_size + return bounding_boxes + + def __new__( + cls, + data: Any, + *, + format: Union[BoundingBoxFormat, str], + canvas_size: Tuple[int, int], + dtype: Optional[torch.dtype] = None, + device: Optional[Union[torch.device, str, int]] = None, + requires_grad: Optional[bool] = None, + ) -> BoundingBoxes: + tensor = cls._to_tensor(data, dtype=dtype, device=device, requires_grad=requires_grad) + return cls._wrap(tensor, format=format, canvas_size=canvas_size) + + @classmethod + def _wrap_output( + cls, + output: torch.Tensor, + args: Sequence[Any] = (), + kwargs: Optional[Mapping[str, Any]] = None, + ) -> BoundingBoxes: + # If there are BoundingBoxes instances in the output, their metadata got lost when we called + # super().__torch_function__. We need to restore the metadata somehow, so we choose to take + # the metadata from the first bbox in the parameters. + # This should be what we want in most cases. When it's not, it's probably a mis-use anyway, e.g. + # something like some_xyxy_bbox + some_xywh_bbox; we don't guard against those cases. + flat_params, _ = tree_flatten(args + (tuple(kwargs.values()) if kwargs else ())) # type: ignore[operator] + first_bbox_from_args = next(x for x in flat_params if isinstance(x, BoundingBoxes)) + format, canvas_size = first_bbox_from_args.format, first_bbox_from_args.canvas_size + + if isinstance(output, torch.Tensor) and not isinstance(output, BoundingBoxes): + output = BoundingBoxes._wrap(output, format=format, canvas_size=canvas_size, check_dims=False) + elif isinstance(output, (tuple, list)): + output = type(output)( + BoundingBoxes._wrap(part, format=format, canvas_size=canvas_size, check_dims=False) for part in output + ) + return output + + def __repr__(self, *, tensor_contents: Any = None) -> str: # type: ignore[override] + return self._make_repr(format=self.format, canvas_size=self.canvas_size) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_dataset_wrapper.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_dataset_wrapper.py new file mode 100644 index 0000000000000000000000000000000000000000..9143a9a94dae3aae4e31c71a59be7297118ebeaa --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_dataset_wrapper.py @@ -0,0 +1,666 @@ +# type: ignore + +from __future__ import annotations + +import collections.abc + +import contextlib +from collections import defaultdict +from copy import copy + +import torch + +from torchvision import datasets, tv_tensors +from torchvision.transforms.v2 import functional as F + +__all__ = ["wrap_dataset_for_transforms_v2"] + + +def wrap_dataset_for_transforms_v2(dataset, target_keys=None): + """Wrap a ``torchvision.dataset`` for usage with :mod:`torchvision.transforms.v2`. + + Example: + >>> dataset = torchvision.datasets.CocoDetection(...) + >>> dataset = wrap_dataset_for_transforms_v2(dataset) + + .. note:: + + For now, only the most popular datasets are supported. Furthermore, the wrapper only supports dataset + configurations that are fully supported by ``torchvision.transforms.v2``. If you encounter an error prompting you + to raise an issue to ``torchvision`` for a dataset or configuration that you need, please do so. + + The dataset samples are wrapped according to the description below. + + Special cases: + + * :class:`~torchvision.datasets.CocoDetection`: Instead of returning the target as list of dicts, the wrapper + returns a dict of lists. In addition, the key-value-pairs ``"boxes"`` (in ``XYXY`` coordinate format), + ``"masks"`` and ``"labels"`` are added and wrap the data in the corresponding ``torchvision.tv_tensors``. + The original keys are preserved. If ``target_keys`` is omitted, returns only the values for the + ``"image_id"``, ``"boxes"``, and ``"labels"``. + * :class:`~torchvision.datasets.VOCDetection`: The key-value-pairs ``"boxes"`` and ``"labels"`` are added to + the target and wrap the data in the corresponding ``torchvision.tv_tensors``. The original keys are + preserved. If ``target_keys`` is omitted, returns only the values for the ``"boxes"`` and ``"labels"``. + * :class:`~torchvision.datasets.CelebA`: The target for ``target_type="bbox"`` is converted to the ``XYXY`` + coordinate format and wrapped into a :class:`~torchvision.tv_tensors.BoundingBoxes` tv_tensor. + * :class:`~torchvision.datasets.Kitti`: Instead returning the target as list of dicts, the wrapper returns a + dict of lists. In addition, the key-value-pairs ``"boxes"`` and ``"labels"`` are added and wrap the data + in the corresponding ``torchvision.tv_tensors``. The original keys are preserved. If ``target_keys`` is + omitted, returns only the values for the ``"boxes"`` and ``"labels"``. + * :class:`~torchvision.datasets.OxfordIIITPet`: The target for ``target_type="segmentation"`` is wrapped into a + :class:`~torchvision.tv_tensors.Mask` tv_tensor. + * :class:`~torchvision.datasets.Cityscapes`: The target for ``target_type="semantic"`` is wrapped into a + :class:`~torchvision.tv_tensors.Mask` tv_tensor. The target for ``target_type="instance"`` is *replaced* by + a dictionary with the key-value-pairs ``"masks"`` (as :class:`~torchvision.tv_tensors.Mask` tv_tensor) and + ``"labels"``. + * :class:`~torchvision.datasets.WIDERFace`: The value for key ``"bbox"`` in the target is converted to ``XYXY`` + coordinate format and wrapped into a :class:`~torchvision.tv_tensors.BoundingBoxes` tv_tensor. + + Image classification datasets + + This wrapper is a no-op for image classification datasets, since they were already fully supported by + :mod:`torchvision.transforms` and thus no change is needed for :mod:`torchvision.transforms.v2`. + + Segmentation datasets + + Segmentation datasets, e.g. :class:`~torchvision.datasets.VOCSegmentation`, return a two-tuple of + :class:`PIL.Image.Image`'s. This wrapper leaves the image as is (first item), while wrapping the + segmentation mask into a :class:`~torchvision.tv_tensors.Mask` (second item). + + Video classification datasets + + Video classification datasets, e.g. :class:`~torchvision.datasets.Kinetics`, return a three-tuple containing a + :class:`torch.Tensor` for the video and audio and a :class:`int` as label. This wrapper wraps the video into a + :class:`~torchvision.tv_tensors.Video` while leaving the other items as is. + + .. note:: + + Only datasets constructed with ``output_format="TCHW"`` are supported, since the alternative + ``output_format="THWC"`` is not supported by :mod:`torchvision.transforms.v2`. + + Args: + dataset: the dataset instance to wrap for compatibility with transforms v2. + target_keys: Target keys to return in case the target is a dictionary. If ``None`` (default), selected keys are + specific to the dataset. If ``"all"``, returns the full target. Can also be a collection of strings for + fine grained access. Currently only supported for :class:`~torchvision.datasets.CocoDetection`, + :class:`~torchvision.datasets.VOCDetection`, :class:`~torchvision.datasets.Kitti`, and + :class:`~torchvision.datasets.WIDERFace`. See above for details. + """ + if not ( + target_keys is None + or target_keys == "all" + or (isinstance(target_keys, collections.abc.Collection) and all(isinstance(key, str) for key in target_keys)) + ): + raise ValueError( + f"`target_keys` can be None, 'all', or a collection of strings denoting the keys to be returned, " + f"but got {target_keys}" + ) + + # Imagine we have isinstance(dataset, datasets.ImageNet). This will create a new class with the name + # "WrappedImageNet" at runtime that doubly inherits from VisionDatasetTVTensorWrapper (see below) as well as the + # original ImageNet class. This allows the user to do regular isinstance(wrapped_dataset, datasets.ImageNet) checks, + # while we can still inject everything that we need. + wrapped_dataset_cls = type(f"Wrapped{type(dataset).__name__}", (VisionDatasetTVTensorWrapper, type(dataset)), {}) + # Since VisionDatasetTVTensorWrapper comes before ImageNet in the MRO, calling the class hits + # VisionDatasetTVTensorWrapper.__init__ first. Since we are never doing super().__init__(...), the constructor of + # ImageNet is never hit. That is by design, since we don't want to create the dataset instance again, but rather + # have the existing instance as attribute on the new object. + return wrapped_dataset_cls(dataset, target_keys) + + +class WrapperFactories(dict): + def register(self, dataset_cls): + def decorator(wrapper_factory): + self[dataset_cls] = wrapper_factory + return wrapper_factory + + return decorator + + +# We need this two-stage design, i.e. a wrapper factory producing the actual wrapper, since some wrappers depend on the +# dataset instance rather than just the class, since they require the user defined instance attributes. Thus, we can +# provide a wrapping from the dataset class to the factory here, but can only instantiate the wrapper at runtime when +# we have access to the dataset instance. +WRAPPER_FACTORIES = WrapperFactories() + + +class VisionDatasetTVTensorWrapper: + def __init__(self, dataset, target_keys): + dataset_cls = type(dataset) + + if not isinstance(dataset, datasets.VisionDataset): + raise TypeError( + f"This wrapper is meant for subclasses of `torchvision.datasets.VisionDataset`, " + f"but got a '{dataset_cls.__name__}' instead.\n" + f"For an example of how to perform the wrapping for custom datasets, see\n\n" + "https://pytorch.org/vision/main/auto_examples/plot_tv_tensors.html#do-i-have-to-wrap-the-output-of-the-datasets-myself" + ) + + for cls in dataset_cls.mro(): + if cls in WRAPPER_FACTORIES: + wrapper_factory = WRAPPER_FACTORIES[cls] + if target_keys is not None and cls not in { + datasets.CocoDetection, + datasets.VOCDetection, + datasets.Kitti, + datasets.WIDERFace, + }: + raise ValueError( + f"`target_keys` is currently only supported for `CocoDetection`, `VOCDetection`, `Kitti`, " + f"and `WIDERFace`, but got {cls.__name__}." + ) + break + elif cls is datasets.VisionDataset: + # TODO: If we have documentation on how to do that, put a link in the error message. + msg = f"No wrapper exists for dataset class {dataset_cls.__name__}. Please wrap the output yourself." + if dataset_cls in datasets.__dict__.values(): + msg = ( + f"{msg} If an automated wrapper for this dataset would be useful for you, " + f"please open an issue at https://github.com/pytorch/vision/issues." + ) + raise TypeError(msg) + + self._dataset = dataset + self._target_keys = target_keys + self._wrapper = wrapper_factory(dataset, target_keys) + + # We need to disable the transforms on the dataset here to be able to inject the wrapping before we apply them. + # Although internally, `datasets.VisionDataset` merges `transform` and `target_transform` into the joint + # `transforms` + # https://github.com/pytorch/vision/blob/135a0f9ea9841b6324b4fe8974e2543cbb95709a/torchvision/datasets/vision.py#L52-L54 + # some (if not most) datasets still use `transform` and `target_transform` individually. Thus, we need to + # disable all three here to be able to extract the untransformed sample to wrap. + self.transform, dataset.transform = dataset.transform, None + self.target_transform, dataset.target_transform = dataset.target_transform, None + self.transforms, dataset.transforms = dataset.transforms, None + + def __getattr__(self, item): + with contextlib.suppress(AttributeError): + return object.__getattribute__(self, item) + + return getattr(self._dataset, item) + + def __getitem__(self, idx): + # This gets us the raw sample since we disabled the transforms for the underlying dataset in the constructor + # of this class + sample = self._dataset[idx] + + sample = self._wrapper(idx, sample) + + # Regardless of whether the user has supplied the transforms individually (`transform` and `target_transform`) + # or joint (`transforms`), we can access the full functionality through `transforms` + if self.transforms is not None: + sample = self.transforms(*sample) + + return sample + + def __len__(self): + return len(self._dataset) + + # TODO: maybe we should use __getstate__ and __setstate__ instead of __reduce__, as recommended in the docs. + def __reduce__(self): + # __reduce__ gets called when we try to pickle the dataset. + # In a DataLoader with spawn context, this gets called `num_workers` times from the main process. + + # We have to reset the [target_]transform[s] attributes of the dataset + # to their original values, because we previously set them to None in __init__(). + dataset = copy(self._dataset) + dataset.transform = self.transform + dataset.transforms = self.transforms + dataset.target_transform = self.target_transform + + return wrap_dataset_for_transforms_v2, (dataset, self._target_keys) + + +def raise_not_supported(description): + raise RuntimeError( + f"{description} is currently not supported by this wrapper. " + f"If this would be helpful for you, please open an issue at https://github.com/pytorch/vision/issues." + ) + + +def identity(item): + return item + + +def identity_wrapper_factory(dataset, target_keys): + def wrapper(idx, sample): + return sample + + return wrapper + + +def pil_image_to_mask(pil_image): + return tv_tensors.Mask(pil_image) + + +def parse_target_keys(target_keys, *, available, default): + if target_keys is None: + target_keys = default + if target_keys == "all": + target_keys = available + else: + target_keys = set(target_keys) + extra = target_keys - available + if extra: + raise ValueError(f"Target keys {sorted(extra)} are not available") + + return target_keys + + +def list_of_dicts_to_dict_of_lists(list_of_dicts): + dict_of_lists = defaultdict(list) + for dct in list_of_dicts: + for key, value in dct.items(): + dict_of_lists[key].append(value) + return dict(dict_of_lists) + + +def wrap_target_by_type(target, *, target_types, type_wrappers): + if not isinstance(target, (tuple, list)): + target = [target] + + wrapped_target = tuple( + type_wrappers.get(target_type, identity)(item) for target_type, item in zip(target_types, target) + ) + + if len(wrapped_target) == 1: + wrapped_target = wrapped_target[0] + + return wrapped_target + + +def classification_wrapper_factory(dataset, target_keys): + return identity_wrapper_factory(dataset, target_keys) + + +for dataset_cls in [ + datasets.Caltech256, + datasets.CIFAR10, + datasets.CIFAR100, + datasets.ImageNet, + datasets.MNIST, + datasets.FashionMNIST, + datasets.GTSRB, + datasets.DatasetFolder, + datasets.ImageFolder, + datasets.Imagenette, +]: + WRAPPER_FACTORIES.register(dataset_cls)(classification_wrapper_factory) + + +def segmentation_wrapper_factory(dataset, target_keys): + def wrapper(idx, sample): + image, mask = sample + return image, pil_image_to_mask(mask) + + return wrapper + + +for dataset_cls in [ + datasets.VOCSegmentation, +]: + WRAPPER_FACTORIES.register(dataset_cls)(segmentation_wrapper_factory) + + +def video_classification_wrapper_factory(dataset, target_keys): + if dataset.video_clips.output_format == "THWC": + raise RuntimeError( + f"{type(dataset).__name__} with `output_format='THWC'` is not supported by this wrapper, " + f"since it is not compatible with the transformations. Please use `output_format='TCHW'` instead." + ) + + def wrapper(idx, sample): + video, audio, label = sample + + video = tv_tensors.Video(video) + + return video, audio, label + + return wrapper + + +for dataset_cls in [ + datasets.HMDB51, + datasets.Kinetics, + datasets.UCF101, +]: + WRAPPER_FACTORIES.register(dataset_cls)(video_classification_wrapper_factory) + + +@WRAPPER_FACTORIES.register(datasets.Caltech101) +def caltech101_wrapper_factory(dataset, target_keys): + if "annotation" in dataset.target_type: + raise_not_supported("Caltech101 dataset with `target_type=['annotation', ...]`") + + return classification_wrapper_factory(dataset, target_keys) + + +@WRAPPER_FACTORIES.register(datasets.CocoDetection) +def coco_dectection_wrapper_factory(dataset, target_keys): + target_keys = parse_target_keys( + target_keys, + available={ + # native + "segmentation", + "area", + "iscrowd", + "image_id", + "bbox", + "category_id", + # added by the wrapper + "boxes", + "masks", + "labels", + }, + default={"image_id", "boxes", "labels"}, + ) + + def segmentation_to_mask(segmentation, *, canvas_size): + from pycocotools import mask + + if isinstance(segmentation, dict): + # if counts is a string, it is already an encoded RLE mask + if not isinstance(segmentation["counts"], str): + segmentation = mask.frPyObjects(segmentation, *canvas_size) + elif isinstance(segmentation, list): + segmentation = mask.merge(mask.frPyObjects(segmentation, *canvas_size)) + else: + raise ValueError(f"COCO segmentation expected to be a dict or a list, got {type(segmentation)}") + return torch.from_numpy(mask.decode(segmentation)) + + def wrapper(idx, sample): + image_id = dataset.ids[idx] + + image, target = sample + + if not target: + return image, dict(image_id=image_id) + + canvas_size = tuple(F.get_size(image)) + + batched_target = list_of_dicts_to_dict_of_lists(target) + target = {} + + if "image_id" in target_keys: + target["image_id"] = image_id + + if "boxes" in target_keys: + target["boxes"] = F.convert_bounding_box_format( + tv_tensors.BoundingBoxes( + batched_target["bbox"], + format=tv_tensors.BoundingBoxFormat.XYWH, + canvas_size=canvas_size, + ), + new_format=tv_tensors.BoundingBoxFormat.XYXY, + ) + + if "masks" in target_keys: + target["masks"] = tv_tensors.Mask( + torch.stack( + [ + segmentation_to_mask(segmentation, canvas_size=canvas_size) + for segmentation in batched_target["segmentation"] + ] + ), + ) + + if "labels" in target_keys: + target["labels"] = torch.tensor(batched_target["category_id"]) + + for target_key in target_keys - {"image_id", "boxes", "masks", "labels"}: + target[target_key] = batched_target[target_key] + + return image, target + + return wrapper + + +WRAPPER_FACTORIES.register(datasets.CocoCaptions)(identity_wrapper_factory) + + +VOC_DETECTION_CATEGORIES = [ + "__background__", + "aeroplane", + "bicycle", + "bird", + "boat", + "bottle", + "bus", + "car", + "cat", + "chair", + "cow", + "diningtable", + "dog", + "horse", + "motorbike", + "person", + "pottedplant", + "sheep", + "sofa", + "train", + "tvmonitor", +] +VOC_DETECTION_CATEGORY_TO_IDX = dict(zip(VOC_DETECTION_CATEGORIES, range(len(VOC_DETECTION_CATEGORIES)))) + + +@WRAPPER_FACTORIES.register(datasets.VOCDetection) +def voc_detection_wrapper_factory(dataset, target_keys): + target_keys = parse_target_keys( + target_keys, + available={ + # native + "annotation", + # added by the wrapper + "boxes", + "labels", + }, + default={"boxes", "labels"}, + ) + + def wrapper(idx, sample): + image, target = sample + + batched_instances = list_of_dicts_to_dict_of_lists(target["annotation"]["object"]) + + if "annotation" not in target_keys: + target = {} + + if "boxes" in target_keys: + target["boxes"] = tv_tensors.BoundingBoxes( + [ + [int(bndbox[part]) for part in ("xmin", "ymin", "xmax", "ymax")] + for bndbox in batched_instances["bndbox"] + ], + format=tv_tensors.BoundingBoxFormat.XYXY, + canvas_size=(image.height, image.width), + ) + + if "labels" in target_keys: + target["labels"] = torch.tensor( + [VOC_DETECTION_CATEGORY_TO_IDX[category] for category in batched_instances["name"]] + ) + + return image, target + + return wrapper + + +@WRAPPER_FACTORIES.register(datasets.SBDataset) +def sbd_wrapper(dataset, target_keys): + if dataset.mode == "boundaries": + raise_not_supported("SBDataset with mode='boundaries'") + + return segmentation_wrapper_factory(dataset, target_keys) + + +@WRAPPER_FACTORIES.register(datasets.CelebA) +def celeba_wrapper_factory(dataset, target_keys): + if any(target_type in dataset.target_type for target_type in ["attr", "landmarks"]): + raise_not_supported("`CelebA` dataset with `target_type=['attr', 'landmarks', ...]`") + + def wrapper(idx, sample): + image, target = sample + + target = wrap_target_by_type( + target, + target_types=dataset.target_type, + type_wrappers={ + "bbox": lambda item: F.convert_bounding_box_format( + tv_tensors.BoundingBoxes( + item, + format=tv_tensors.BoundingBoxFormat.XYWH, + canvas_size=(image.height, image.width), + ), + new_format=tv_tensors.BoundingBoxFormat.XYXY, + ), + }, + ) + + return image, target + + return wrapper + + +KITTI_CATEGORIES = ["Car", "Van", "Truck", "Pedestrian", "Person_sitting", "Cyclist", "Tram", "Misc", "DontCare"] +KITTI_CATEGORY_TO_IDX = dict(zip(KITTI_CATEGORIES, range(len(KITTI_CATEGORIES)))) + + +@WRAPPER_FACTORIES.register(datasets.Kitti) +def kitti_wrapper_factory(dataset, target_keys): + target_keys = parse_target_keys( + target_keys, + available={ + # native + "type", + "truncated", + "occluded", + "alpha", + "bbox", + "dimensions", + "location", + "rotation_y", + # added by the wrapper + "boxes", + "labels", + }, + default={"boxes", "labels"}, + ) + + def wrapper(idx, sample): + image, target = sample + + if target is None: + return image, target + + batched_target = list_of_dicts_to_dict_of_lists(target) + target = {} + + if "boxes" in target_keys: + target["boxes"] = tv_tensors.BoundingBoxes( + batched_target["bbox"], + format=tv_tensors.BoundingBoxFormat.XYXY, + canvas_size=(image.height, image.width), + ) + + if "labels" in target_keys: + target["labels"] = torch.tensor([KITTI_CATEGORY_TO_IDX[category] for category in batched_target["type"]]) + + for target_key in target_keys - {"boxes", "labels"}: + target[target_key] = batched_target[target_key] + + return image, target + + return wrapper + + +@WRAPPER_FACTORIES.register(datasets.OxfordIIITPet) +def oxford_iiit_pet_wrapper_factor(dataset, target_keys): + def wrapper(idx, sample): + image, target = sample + + if target is not None: + target = wrap_target_by_type( + target, + target_types=dataset._target_types, + type_wrappers={ + "segmentation": pil_image_to_mask, + }, + ) + + return image, target + + return wrapper + + +@WRAPPER_FACTORIES.register(datasets.Cityscapes) +def cityscapes_wrapper_factory(dataset, target_keys): + if any(target_type in dataset.target_type for target_type in ["polygon", "color"]): + raise_not_supported("`Cityscapes` dataset with `target_type=['polygon', 'color', ...]`") + + def instance_segmentation_wrapper(mask): + # See https://github.com/mcordts/cityscapesScripts/blob/8da5dd00c9069058ccc134654116aac52d4f6fa2/cityscapesscripts/preparation/json2instanceImg.py#L7-L21 + data = pil_image_to_mask(mask) + masks = [] + labels = [] + for id in data.unique(): + masks.append(data == id) + label = id + if label >= 1_000: + label //= 1_000 + labels.append(label) + return dict(masks=tv_tensors.Mask(torch.stack(masks)), labels=torch.stack(labels)) + + def wrapper(idx, sample): + image, target = sample + + target = wrap_target_by_type( + target, + target_types=dataset.target_type, + type_wrappers={ + "instance": instance_segmentation_wrapper, + "semantic": pil_image_to_mask, + }, + ) + + return image, target + + return wrapper + + +@WRAPPER_FACTORIES.register(datasets.WIDERFace) +def widerface_wrapper(dataset, target_keys): + target_keys = parse_target_keys( + target_keys, + available={ + "bbox", + "blur", + "expression", + "illumination", + "occlusion", + "pose", + "invalid", + }, + default="all", + ) + + def wrapper(idx, sample): + image, target = sample + + if target is None: + return image, target + + target = {key: target[key] for key in target_keys} + + if "bbox" in target_keys: + target["bbox"] = F.convert_bounding_box_format( + tv_tensors.BoundingBoxes( + target["bbox"], format=tv_tensors.BoundingBoxFormat.XYWH, canvas_size=(image.height, image.width) + ), + new_format=tv_tensors.BoundingBoxFormat.XYXY, + ) + + return image, target + + return wrapper diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_image.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_image.py new file mode 100644 index 0000000000000000000000000000000000000000..80b4f2db28790b683e3d18871097929ea50ad672 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_image.py @@ -0,0 +1,53 @@ +from __future__ import annotations + +from typing import Any, Optional, Union + +import PIL.Image +import torch + +from ._tv_tensor import TVTensor + + +class Image(TVTensor): + """:class:`torch.Tensor` subclass for images with shape ``[..., C, H, W]``. + + .. note:: + + In the :ref:`transforms `, ``Image`` instances are largely + interchangeable with pure :class:`torch.Tensor`. See + :ref:`this note ` for more details. + + Args: + data (tensor-like, PIL.Image.Image): Any data that can be turned into a tensor with :func:`torch.as_tensor` as + well as PIL images. + dtype (torch.dtype, optional): Desired data type. If omitted, will be inferred from + ``data``. + device (torch.device, optional): Desired device. If omitted and ``data`` is a + :class:`torch.Tensor`, the device is taken from it. Otherwise, the image is constructed on the CPU. + requires_grad (bool, optional): Whether autograd should record operations. If omitted and + ``data`` is a :class:`torch.Tensor`, the value is taken from it. Otherwise, defaults to ``False``. + """ + + def __new__( + cls, + data: Any, + *, + dtype: Optional[torch.dtype] = None, + device: Optional[Union[torch.device, str, int]] = None, + requires_grad: Optional[bool] = None, + ) -> Image: + if isinstance(data, PIL.Image.Image): + from torchvision.transforms.v2 import functional as F + + data = F.pil_to_tensor(data) + + tensor = cls._to_tensor(data, dtype=dtype, device=device, requires_grad=requires_grad) + if tensor.ndim < 2: + raise ValueError + elif tensor.ndim == 2: + tensor = tensor.unsqueeze(0) + + return tensor.as_subclass(cls) + + def __repr__(self, *, tensor_contents: Any = None) -> str: # type: ignore[override] + return self._make_repr() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_mask.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_mask.py new file mode 100644 index 0000000000000000000000000000000000000000..20099bb320f0247e091035371d120ef8faabf335 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_mask.py @@ -0,0 +1,39 @@ +from __future__ import annotations + +from typing import Any, Optional, Union + +import PIL.Image +import torch + +from ._tv_tensor import TVTensor + + +class Mask(TVTensor): + """:class:`torch.Tensor` subclass for segmentation and detection masks with shape ``[..., H, W]``. + + Args: + data (tensor-like, PIL.Image.Image): Any data that can be turned into a tensor with :func:`torch.as_tensor` as + well as PIL images. + dtype (torch.dtype, optional): Desired data type. If omitted, will be inferred from + ``data``. + device (torch.device, optional): Desired device. If omitted and ``data`` is a + :class:`torch.Tensor`, the device is taken from it. Otherwise, the mask is constructed on the CPU. + requires_grad (bool, optional): Whether autograd should record operations. If omitted and + ``data`` is a :class:`torch.Tensor`, the value is taken from it. Otherwise, defaults to ``False``. + """ + + def __new__( + cls, + data: Any, + *, + dtype: Optional[torch.dtype] = None, + device: Optional[Union[torch.device, str, int]] = None, + requires_grad: Optional[bool] = None, + ) -> Mask: + if isinstance(data, PIL.Image.Image): + from torchvision.transforms.v2 import functional as F + + data = F.pil_to_tensor(data) + + tensor = cls._to_tensor(data, dtype=dtype, device=device, requires_grad=requires_grad) + return tensor.as_subclass(cls) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_torch_function_helpers.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_torch_function_helpers.py new file mode 100644 index 0000000000000000000000000000000000000000..a8f06125d1d5c586e449e9c56aac3968d579d883 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_torch_function_helpers.py @@ -0,0 +1,72 @@ +import torch + +_TORCHFUNCTION_SUBCLASS = False + + +class _ReturnTypeCM: + def __init__(self, to_restore): + self.to_restore = to_restore + + def __enter__(self): + return self + + def __exit__(self, *args): + global _TORCHFUNCTION_SUBCLASS + _TORCHFUNCTION_SUBCLASS = self.to_restore + + +def set_return_type(return_type: str): + """Set the return type of torch operations on :class:`~torchvision.tv_tensors.TVTensor`. + + This only affects the behaviour of torch operations. It has no effect on + ``torchvision`` transforms or functionals, which will always return as + output the same type that was passed as input. + + .. warning:: + + We recommend using :class:`~torchvision.transforms.v2.ToPureTensor` at + the end of your transform pipelines if you use + ``set_return_type("TVTensor")``. This will avoid the + ``__torch_function__`` overhead in the models ``forward()``. + + Can be used as a global flag for the entire program: + + .. code:: python + + img = tv_tensors.Image(torch.rand(3, 5, 5)) + img + 2 # This is a pure Tensor (default behaviour) + + set_return_type("TVTensor") + img + 2 # This is an Image + + or as a context manager to restrict the scope: + + .. code:: python + + img = tv_tensors.Image(torch.rand(3, 5, 5)) + img + 2 # This is a pure Tensor + with set_return_type("TVTensor"): + img + 2 # This is an Image + img + 2 # This is a pure Tensor + + Args: + return_type (str): Can be "TVTensor" or "Tensor" (case-insensitive). + Default is "Tensor" (i.e. pure :class:`torch.Tensor`). + """ + global _TORCHFUNCTION_SUBCLASS + to_restore = _TORCHFUNCTION_SUBCLASS + + try: + _TORCHFUNCTION_SUBCLASS = {"tensor": False, "tvtensor": True}[return_type.lower()] + except KeyError: + raise ValueError(f"return_type must be 'TVTensor' or 'Tensor', got {return_type}") from None + + return _ReturnTypeCM(to_restore) + + +def _must_return_subclass(): + return _TORCHFUNCTION_SUBCLASS + + +# For those ops we always want to preserve the original subclass instead of returning a pure Tensor +_FORCE_TORCHFUNCTION_SUBCLASS = {torch.Tensor.clone, torch.Tensor.to, torch.Tensor.detach, torch.Tensor.requires_grad_} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_tv_tensor.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_tv_tensor.py new file mode 100644 index 0000000000000000000000000000000000000000..707086a4e6ff4101597cd19dd5a51e74d0bba1ba --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_tv_tensor.py @@ -0,0 +1,132 @@ +from __future__ import annotations + +from typing import Any, Callable, Dict, Mapping, Optional, Sequence, Tuple, Type, TypeVar, Union + +import torch +from torch._C import DisableTorchFunctionSubclass +from torch.types import _device, _dtype, _size + +from torchvision.tv_tensors._torch_function_helpers import _FORCE_TORCHFUNCTION_SUBCLASS, _must_return_subclass + + +D = TypeVar("D", bound="TVTensor") + + +class TVTensor(torch.Tensor): + """Base class for all TVTensors. + + You probably don't want to use this class unless you're defining your own + custom TVTensors. See + :ref:`sphx_glr_auto_examples_transforms_plot_custom_tv_tensors.py` for details. + """ + + @staticmethod + def _to_tensor( + data: Any, + dtype: Optional[torch.dtype] = None, + device: Optional[Union[torch.device, str, int]] = None, + requires_grad: Optional[bool] = None, + ) -> torch.Tensor: + if requires_grad is None: + requires_grad = data.requires_grad if isinstance(data, torch.Tensor) else False + return torch.as_tensor(data, dtype=dtype, device=device).requires_grad_(requires_grad) + + @classmethod + def _wrap_output( + cls, + output: torch.Tensor, + args: Sequence[Any] = (), + kwargs: Optional[Mapping[str, Any]] = None, + ) -> torch.Tensor: + # Same as torch._tensor._convert + if isinstance(output, torch.Tensor) and not isinstance(output, cls): + output = output.as_subclass(cls) + + if isinstance(output, (tuple, list)): + # Also handles things like namedtuples + output = type(output)(cls._wrap_output(part, args, kwargs) for part in output) + return output + + @classmethod + def __torch_function__( + cls, + func: Callable[..., torch.Tensor], + types: Tuple[Type[torch.Tensor], ...], + args: Sequence[Any] = (), + kwargs: Optional[Mapping[str, Any]] = None, + ) -> torch.Tensor: + """For general information about how the __torch_function__ protocol works, + see https://pytorch.org/docs/stable/notes/extending.html#extending-torch + + TL;DR: Every time a PyTorch operator is called, it goes through the inputs and looks for the + ``__torch_function__`` method. If one is found, it is invoked with the operator as ``func`` as well as the + ``args`` and ``kwargs`` of the original call. + + Why do we override this? Because the base implementation in torch.Tensor would preserve the TVTensor type + of the output. In our case, we want to return pure tensors instead (with a few exceptions). Refer to the + "TVTensors FAQ" gallery example for a rationale of this behaviour (TL;DR: perf + no silver bullet). + + Our implementation below is very similar to the base implementation in ``torch.Tensor`` - go check it out. + """ + if not all(issubclass(cls, t) for t in types): + return NotImplemented + + # Like in the base Tensor.__torch_function__ implementation, it's easier to always use + # DisableTorchFunctionSubclass and then manually re-wrap the output if necessary + with DisableTorchFunctionSubclass(): + output = func(*args, **kwargs or dict()) + + must_return_subclass = _must_return_subclass() + if must_return_subclass or (func in _FORCE_TORCHFUNCTION_SUBCLASS and isinstance(args[0], cls)): + # If you're wondering why we need the `isinstance(args[0], cls)` check, remove it and see what fails + # in test_to_tv_tensor_reference(). + # The __torch_function__ protocol will invoke the __torch_function__ method on *all* types involved in + # the computation by walking the MRO upwards. For example, + # `out = a_pure_tensor.to(an_image)` will invoke `Image.__torch_function__` with + # `args = (a_pure_tensor, an_image)` first. Without this guard, `out` would + # be wrapped into an `Image`. + return cls._wrap_output(output, args, kwargs) + + if not must_return_subclass and isinstance(output, cls): + # DisableTorchFunctionSubclass is ignored by inplace ops like `.add_(...)`, + # so for those, the output is still a TVTensor. Thus, we need to manually unwrap. + return output.as_subclass(torch.Tensor) + + return output + + def _make_repr(self, **kwargs: Any) -> str: + # This is a poor man's implementation of the proposal in https://github.com/pytorch/pytorch/issues/76532. + # If that ever gets implemented, remove this in favor of the solution on the `torch.Tensor` class. + extra_repr = ", ".join(f"{key}={value}" for key, value in kwargs.items()) + return f"{super().__repr__()[:-1]}, {extra_repr})" + + # Add properties for common attributes like shape, dtype, device, ndim etc + # this way we return the result without passing into __torch_function__ + @property + def shape(self) -> _size: # type: ignore[override] + with DisableTorchFunctionSubclass(): + return super().shape + + @property + def ndim(self) -> int: # type: ignore[override] + with DisableTorchFunctionSubclass(): + return super().ndim + + @property + def device(self, *args: Any, **kwargs: Any) -> _device: # type: ignore[override] + with DisableTorchFunctionSubclass(): + return super().device + + @property + def dtype(self) -> _dtype: # type: ignore[override] + with DisableTorchFunctionSubclass(): + return super().dtype + + def __deepcopy__(self: D, memo: Dict[int, Any]) -> D: + # We need to detach first, since a plain `Tensor.clone` will be part of the computation graph, which does + # *not* happen for `deepcopy(Tensor)`. A side-effect from detaching is that the `Tensor.requires_grad` + # attribute is cleared, so we need to refill it before we return. + # Note: We don't explicitly handle deep-copying of the metadata here. The only metadata we currently have is + # `BoundingBoxes.format` and `BoundingBoxes.canvas_size`, which are immutable and thus implicitly deep-copied by + # `BoundingBoxes.clone()`. + return self.detach().clone().requires_grad_(self.requires_grad) # type: ignore[return-value] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_video.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_video.py new file mode 100644 index 0000000000000000000000000000000000000000..c91ce8cf70d6b85806c93177d8816564d4471e2b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torchvision/tv_tensors/_video.py @@ -0,0 +1,37 @@ +from __future__ import annotations + +from typing import Any, Optional, Union + +import torch + +from ._tv_tensor import TVTensor + + +class Video(TVTensor): + """:class:`torch.Tensor` subclass for videos with shape ``[..., T, C, H, W]``. + + Args: + data (tensor-like): Any data that can be turned into a tensor with :func:`torch.as_tensor`. + dtype (torch.dtype, optional): Desired data type. If omitted, will be inferred from + ``data``. + device (torch.device, optional): Desired device. If omitted and ``data`` is a + :class:`torch.Tensor`, the device is taken from it. Otherwise, the video is constructed on the CPU. + requires_grad (bool, optional): Whether autograd should record operations. If omitted and + ``data`` is a :class:`torch.Tensor`, the value is taken from it. Otherwise, defaults to ``False``. + """ + + def __new__( + cls, + data: Any, + *, + dtype: Optional[torch.dtype] = None, + device: Optional[Union[torch.device, str, int]] = None, + requires_grad: Optional[bool] = None, + ) -> Video: + tensor = cls._to_tensor(data, dtype=dtype, device=device, requires_grad=requires_grad) + if data.ndim < 4: + raise ValueError + return tensor.as_subclass(cls) + + def __repr__(self, *, tensor_contents: Any = None) -> str: # type: ignore[override] + return self._make_repr() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b1187228251c1943885389222a5f5ba457662ba Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..47259d2925297f4243f8ef32a3b3a5b7f0cc5735 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__init__.py @@ -0,0 +1,13 @@ +from .utils import _init_ffmpeg, _LazyImporter + + +_FFMPEG_EXT = None + + +def lazy_import_ffmpeg_ext(): + """Load FFmpeg integration based on availability in lazy manner""" + + global _FFMPEG_EXT + if _FFMPEG_EXT is None: + _FFMPEG_EXT = _LazyImporter("_torio_ffmpeg", _init_ffmpeg) + return _FFMPEG_EXT diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fff23083da6d05a6a7ec526bf2f2e0ded002231e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c523d61bbfd9ae5d6ff5b117093cfd373c399b1b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..a6b3465c9c140862aff0eee8960df5f62fd61efe --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/_extension/utils.py @@ -0,0 +1,147 @@ +import importlib +import logging +import os +import types +from pathlib import Path + +import torch + +_LG = logging.getLogger(__name__) +_LIB_DIR = Path(__file__).parent.parent / "lib" + + +class _LazyImporter(types.ModuleType): + """Lazily import module/extension.""" + + def __init__(self, name, import_func): + super().__init__(name) + self.import_func = import_func + self.module = None + + # Note: + # Python caches what was retrieved with `__getattr__`, so this method will not be + # called again for the same item. + def __getattr__(self, item): + self._import_once() + return getattr(self.module, item) + + def __repr__(self): + if self.module is None: + return f"" + return repr(self.module) + + def __dir__(self): + self._import_once() + return dir(self.module) + + def _import_once(self): + if self.module is None: + self.module = self.import_func() + # Note: + # By attaching the module attributes to self, + # module attributes are directly accessible. + # This allows to avoid calling __getattr__ for every attribute access. + self.__dict__.update(self.module.__dict__) + + def is_available(self): + try: + self._import_once() + except Exception: + return False + return True + + +def _get_lib_path(lib: str): + suffix = "pyd" if os.name == "nt" else "so" + path = _LIB_DIR / f"{lib}.{suffix}" + return path + + +def _load_lib(lib: str) -> bool: + """Load extension module + + Note: + In case `torio` is deployed with `pex` format, the library file + is not in a standard location. + In this case, we expect that `libtorio` is available somewhere + in the search path of dynamic loading mechanism, so that importing + `_torio` will have library loader find and load `libtorio`. + This is the reason why the function should not raising an error when the library + file is not found. + + Returns: + bool: + True if the library file is found AND the library loaded without failure. + False if the library file is not found (like in the case where torio + is deployed with pex format, thus the shared library file is + in a non-standard location.). + If the library file is found but there is an issue loading the library, + (such as missing dependency) then this function raises the exception as-is. + + Raises: + Exception: + If the library file is found, but there is an issue loading the library file, + (when underlying `ctype.DLL` throws an exception), this function will pass + the exception as-is, instead of catching it and returning bool. + The expected case is `OSError` thrown by `ctype.DLL` when a dynamic dependency + is not found. + This behavior was chosen because the expected failure case is not recoverable. + If a dependency is missing, then users have to install it. + """ + path = _get_lib_path(lib) + if not path.exists(): + return False + torch.ops.load_library(path) + return True + + +_FFMPEG_VERS = ["6", "5", "4", ""] + + +def _find_versionsed_ffmpeg_extension(version: str): + ext = f"torio.lib._torio_ffmpeg{version}" + lib = f"libtorio_ffmpeg{version}" + + if not importlib.util.find_spec(ext): + raise RuntimeError(f"FFmpeg{version} extension is not available.") + + _load_lib(lib) + return importlib.import_module(ext) + + +def _find_ffmpeg_extension(ffmpeg_vers): + for ffmpeg_ver in ffmpeg_vers: + _LG.debug("Loading FFmpeg%s", ffmpeg_ver) + try: + ext = _find_versionsed_ffmpeg_extension(ffmpeg_ver) + _LG.debug("Successfully loaded FFmpeg%s", ffmpeg_ver) + return ext + except Exception: + _LG.debug("Failed to load FFmpeg%s extension.", ffmpeg_ver, exc_info=True) + continue + raise ImportError( + f"Failed to intialize FFmpeg extension. Tried versions: {ffmpeg_vers}. " + "Enable DEBUG logging to see more details about the error." + ) + + +def _get_ffmpeg_versions(): + ffmpeg_vers = _FFMPEG_VERS + # User override + if (ffmpeg_ver := os.environ.get("TORIO_USE_FFMPEG_VERSION")) is not None: + if ffmpeg_ver not in ffmpeg_vers: + raise ValueError( + f"The FFmpeg version '{ffmpeg_ver}' (read from TORIO_USE_FFMPEG_VERSION) " + f"is not one of supported values. Possible values are {ffmpeg_vers}" + ) + ffmpeg_vers = [ffmpeg_ver] + return ffmpeg_vers + + +def _init_ffmpeg(): + ffmpeg_vers = _get_ffmpeg_versions() + ext = _find_ffmpeg_extension(ffmpeg_vers) + ext.init() + if ext.get_log_level() > 8: + ext.set_log_level(8) + return ext diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3260f7e50026818f73d7731e1656ccc413912701 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__init__.py @@ -0,0 +1,9 @@ +from ._streaming_media_decoder import StreamingMediaDecoder +from ._streaming_media_encoder import CodecConfig, StreamingMediaEncoder + + +__all__ = [ + "StreamingMediaDecoder", + "CodecConfig", + "StreamingMediaEncoder", +] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..893becd161b423fa5459dc5370d05a835444dec9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/_streaming_media_decoder.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/_streaming_media_decoder.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0856550b764d5c64c14a0d2f9a106e18d477a47 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/_streaming_media_decoder.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/_streaming_media_encoder.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/_streaming_media_encoder.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..41a1305f5a531319225d013a095778ee5f3c0280 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/__pycache__/_streaming_media_encoder.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/_streaming_media_decoder.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/_streaming_media_decoder.py new file mode 100644 index 0000000000000000000000000000000000000000..d13404ab15db55e02c10913e196e4c1293a36dc3 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/_streaming_media_decoder.py @@ -0,0 +1,978 @@ +from __future__ import annotations + +import os +from dataclasses import dataclass +from pathlib import Path +from typing import BinaryIO, Dict, Iterator, Optional, Tuple, TypeVar, Union + +import torch +import torio +from torch.utils._pytree import tree_map + +ffmpeg_ext = torio._extension.lazy_import_ffmpeg_ext() + +__all__ = [ + "StreamingMediaDecoder", +] + + +@dataclass +class SourceStream: + """The metadata of a source stream, returned by :meth:`~torio.io.StreamingMediaDecoder.get_src_stream_info`. + + This class is used when representing streams of media type other than `audio` or `video`. + + When source stream is `audio` or `video` type, :class:`SourceAudioStream` and + :class:`SourceVideoStream`, which reports additional media-specific attributes, + are used respectively. + """ + + media_type: str + """The type of the stream. + One of ``"audio"``, ``"video"``, ``"data"``, ``"subtitle"``, ``"attachment"`` and empty string. + + .. note:: + Only audio and video streams are supported for output. + .. note:: + Still images, such as PNG and JPEG formats are reported as video. + """ + codec: str + """Short name of the codec. Such as ``"pcm_s16le"`` and ``"h264"``.""" + codec_long_name: str + """Detailed name of the codec. + + Such as "`PCM signed 16-bit little-endian`" and "`H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10`". + """ + format: Optional[str] + """Media format. Such as ``"s16"`` and ``"yuv420p"``. + + Commonly found audio values are; + + - ``"u8"``, ``"u8p"``: Unsigned 8-bit unsigned interger. + - ``"s16"``, ``"s16p"``: 16-bit signed integer. + - ``"s32"``, ``"s32p"``: 32-bit signed integer. + - ``"flt"``, ``"fltp"``: 32-bit floating-point. + + .. note:: + + `p` at the end indicates the format is `planar`. + Channels are grouped together instead of interspersed in memory. + """ + bit_rate: Optional[int] + """Bit rate of the stream in bits-per-second. + This is an estimated values based on the initial few frames of the stream. + For container formats and variable bit rate, it can be 0. + """ + num_frames: Optional[int] + """The number of frames in the stream""" + bits_per_sample: Optional[int] + """This is the number of valid bits in each output sample. + For compressed format, it can be 0. + """ + metadata: Dict[str, str] + """Metadata attached to the source stream.""" + + +@dataclass +class SourceAudioStream(SourceStream): + """The metadata of an audio source stream, returned by :meth:`~torio.io.StreamingMediaDecoder.get_src_stream_info`. + + This class is used when representing audio stream. + + In addition to the attributes reported by :class:`SourceStream`, + the following attributes are reported. + """ + + sample_rate: float + """Sample rate of the audio.""" + num_channels: int + """Number of channels.""" + + +@dataclass +class SourceVideoStream(SourceStream): + """The metadata of a video source stream, returned by :meth:`~torio.io.StreamingMediaDecoder.get_src_stream_info`. + + This class is used when representing video stream. + + In addition to the attributes reported by :class:`SourceStream`, + the following attributes are reported. + """ + + width: int + """Width of the video frame in pixel.""" + height: int + """Height of the video frame in pixel.""" + frame_rate: float + """Frame rate.""" + + +def _parse_si(i): + media_type = i.media_type + if media_type == "audio": + return SourceAudioStream( + media_type=i.media_type, + codec=i.codec_name, + codec_long_name=i.codec_long_name, + format=i.format, + bit_rate=i.bit_rate, + num_frames=i.num_frames, + bits_per_sample=i.bits_per_sample, + metadata=i.metadata, + sample_rate=i.sample_rate, + num_channels=i.num_channels, + ) + if media_type == "video": + return SourceVideoStream( + media_type=i.media_type, + codec=i.codec_name, + codec_long_name=i.codec_long_name, + format=i.format, + bit_rate=i.bit_rate, + num_frames=i.num_frames, + bits_per_sample=i.bits_per_sample, + metadata=i.metadata, + width=i.width, + height=i.height, + frame_rate=i.frame_rate, + ) + return SourceStream( + media_type=i.media_type, + codec=i.codec_name, + codec_long_name=i.codec_long_name, + format=None, + bit_rate=None, + num_frames=None, + bits_per_sample=None, + metadata=i.metadata, + ) + + +@dataclass +class OutputStream: + """Output stream configured on :class:`StreamingMediaDecoder`, + returned by :meth:`~torio.io.StreamingMediaDecoder.get_out_stream_info`. + """ + + source_index: int + """Index of the source stream that this output stream is connected.""" + filter_description: str + """Description of filter graph applied to the source stream.""" + media_type: str + """The type of the stream. ``"audio"`` or ``"video"``.""" + format: str + """Media format. Such as ``"s16"`` and ``"yuv420p"``. + + Commonly found audio values are; + + - ``"u8"``, ``"u8p"``: Unsigned 8-bit unsigned interger. + - ``"s16"``, ``"s16p"``: 16-bit signed integer. + - ``"s32"``, ``"s32p"``: 32-bit signed integer. + - ``"flt"``, ``"fltp"``: 32-bit floating-point. + + .. note:: + + `p` at the end indicates the format is `planar`. + Channels are grouped together instead of interspersed in memory.""" + + +@dataclass +class OutputAudioStream(OutputStream): + """Information about an audio output stream configured with + :meth:`~torio.io.StreamingMediaDecoder.add_audio_stream` or + :meth:`~torio.io.StreamingMediaDecoder.add_basic_audio_stream`. + + In addition to the attributes reported by :class:`OutputStream`, + the following attributes are reported. + """ + + sample_rate: float + """Sample rate of the audio.""" + num_channels: int + """Number of channels.""" + + +@dataclass +class OutputVideoStream(OutputStream): + """Information about a video output stream configured with + :meth:`~torio.io.StreamingMediaDecoder.add_video_stream` or + :meth:`~torio.io.StreamingMediaDecoder.add_basic_video_stream`. + + In addition to the attributes reported by :class:`OutputStream`, + the following attributes are reported. + """ + + width: int + """Width of the video frame in pixel.""" + height: int + """Height of the video frame in pixel.""" + frame_rate: float + """Frame rate.""" + + +def _parse_oi(i): + media_type = i.media_type + if media_type == "audio": + return OutputAudioStream( + source_index=i.source_index, + filter_description=i.filter_description, + media_type=i.media_type, + format=i.format, + sample_rate=i.sample_rate, + num_channels=i.num_channels, + ) + if media_type == "video": + return OutputVideoStream( + source_index=i.source_index, + filter_description=i.filter_description, + media_type=i.media_type, + format=i.format, + width=i.width, + height=i.height, + frame_rate=i.frame_rate, + ) + raise ValueError(f"Unexpected media_type: {i.media_type}({i})") + + +def _get_afilter_desc(sample_rate: Optional[int], fmt: Optional[str], num_channels: Optional[int]): + descs = [] + if sample_rate is not None: + descs.append(f"aresample={sample_rate}") + if fmt is not None or num_channels is not None: + parts = [] + if fmt is not None: + parts.append(f"sample_fmts={fmt}") + if num_channels is not None: + parts.append(f"channel_layouts={num_channels}c") + descs.append(f"aformat={':'.join(parts)}") + return ",".join(descs) if descs else None + + +def _get_vfilter_desc(frame_rate: Optional[float], width: Optional[int], height: Optional[int], fmt: Optional[str]): + descs = [] + if frame_rate is not None: + descs.append(f"fps={frame_rate}") + scales = [] + if width is not None: + scales.append(f"width={width}") + if height is not None: + scales.append(f"height={height}") + if scales: + descs.append(f"scale={':'.join(scales)}") + if fmt is not None: + descs.append(f"format=pix_fmts={fmt}") + return ",".join(descs) if descs else None + + +# Base class for ChunkTensor +# Based off of TrivialTensorViaComposition +# https://github.com/albanD/subclass_zoo/blob/0eeb1d68fb59879029c610bc407f2997ae43ba0a/trivial_tensors.py#L83 +class ChunkTensorBase(torch.Tensor): + __torch_function__ = torch._C._disabled_torch_function_impl + + @staticmethod + def __new__(cls, _elem, *_): + return super().__new__(cls, _elem) + + @classmethod + def __torch_dispatch__(cls, func, _, args=(), kwargs=None): + def unwrap(t): + return t._elem if isinstance(t, cls) else t + + return func(*tree_map(unwrap, args), **tree_map(unwrap, kwargs)) + + +@dataclass +class ChunkTensor(ChunkTensorBase): + """Decoded media frames with metadata. + + The instance of this class represents the decoded video/audio frames with + metadata, and the instance itself behave like :py:class:`~torch.Tensor`. + + Client codes can pass instance of this class as-if it's + :py:class:`~torch.Tensor` class, or call the methods defined on + :py:class:`~torch.Tensor` class. + + Example: + >>> # Define input streams + >>> reader = StreamingMediaDecoder(...) + >>> reader.add_audio_stream(frames_per_chunk=4000, sample_rate=8000) + >>> reader.add_video_stream(frames_per_chunk=7, frame_rate=28) + >>> # Decode the streams and fetch frames + >>> reader.fill_buffer() + >>> audio_chunk, video_chunk = reader.pop_chunks() + + >>> # Access metadata + >>> (audio_chunk.pts, video_chunks.pts) + (0.0, 0.0) + >>> + >>> # The second time the PTS is different + >>> reader.fill_buffer() + >>> audio_chunk, video_chunk = reader.pop_chunks() + >>> (audio_chunk.pts, video_chunks.pts) + (0.5, 0.25) + + >>> # Call PyTorch ops on chunk + >>> audio_chunk.shape + torch.Size([4000, 2] + >>> power = torch.pow(video_chunk, 2) + >>> + >>> # the result is a plain torch.Tensor class + >>> type(power) + + >>> + >>> # Metadata is not available on the result + >>> power.pts + AttributeError: 'Tensor' object has no attribute 'pts' + """ + + # Keep it private for now + _elem: torch.Tensor + + pts: float + """Presentation time stamp of the first frame in the chunk. + + Unit: second. + """ + + +def _format_doc(**kwargs): + def decorator(obj): + obj.__doc__ = obj.__doc__.format(**kwargs) + return obj + + return decorator + + +_frames_per_chunk = """Number of frames returned as one chunk. + If the source stream is exhausted before enough frames are buffered, + then the chunk is returned as-is. + + Providing ``-1`` disables chunking and :py:func:`pop_chunks` method + will concatenate all the buffered frames and return it.""" + +_buffer_chunk_size = """Internal buffer size. + When the number of chunks buffered exceeds this number, old frames are + dropped. For example, if ``frames_per_chunk`` is 5 and ``buffer_chunk_size`` is + 3, then frames older than ``15`` are dropped. + Providing ``-1`` disables this behavior. + + Default: ``3``.""" + +_audio_stream_index = """The source audio stream index. + If omitted, :py:attr:`default_audio_stream` is used.""" + + +_video_stream_index = """The source video stream index. + If omitted, :py:attr:`default_video_stream` is used.""" + +_decoder = """The name of the decoder to be used. + When provided, use the specified decoder instead of the default one. + + To list the available decoders, please use + :py:func:`~torio.utils.ffmpeg_utils.get_audio_decoders` for audio, and + :py:func:`~torio.utils.ffmpeg_utils.get_video_decoders` for video. + + Default: ``None``.""" + +_decoder_option = """Options passed to decoder. + Mapping from str to str. (Default: ``None``) + + To list decoder options for a decoder, you can use + ``ffmpeg -h decoder=`` command. + + | + + In addition to decoder-specific options, you can also pass options related + to multithreading. They are effective only if the decoder support them. + If neither of them are provided, StreamingMediaDecoder defaults to single thread. + + ``"threads"``: The number of threads (in str). + Providing the value ``"0"`` will let FFmpeg decides based on its heuristics. + + ``"thread_type"``: Which multithreading method to use. + The valid values are ``"frame"`` or ``"slice"``. + Note that each decoder supports different set of methods. + If not provided, a default value is used. + + - ``"frame"``: Decode more than one frame at once. + Each thread handles one frame. + This will increase decoding delay by one frame per thread + - ``"slice"``: Decode more than one part of a single frame at once. + + | + """ + + +_hw_accel = """Enable hardware acceleration. + + When video is decoded on CUDA hardware, for example + `decoder="h264_cuvid"`, passing CUDA device indicator to `hw_accel` + (i.e. `hw_accel="cuda:0"`) will make StreamingMediaDecoder place the resulting + frames directly on the specified CUDA device as CUDA tensor. + + If `None`, the frame will be moved to CPU memory. + Default: ``None``.""" + + +_format_audio_args = _format_doc( + frames_per_chunk=_frames_per_chunk, + buffer_chunk_size=_buffer_chunk_size, + stream_index=_audio_stream_index, + decoder=_decoder, + decoder_option=_decoder_option, +) + + +_format_video_args = _format_doc( + frames_per_chunk=_frames_per_chunk, + buffer_chunk_size=_buffer_chunk_size, + stream_index=_video_stream_index, + decoder=_decoder, + decoder_option=_decoder_option, + hw_accel=_hw_accel, +) + + +InputStreamTypes = TypeVar("InputStream", bound=SourceStream) +OutputStreamTypes = TypeVar("OutputStream", bound=OutputStream) + + +class StreamingMediaDecoder: + """Fetch and decode audio/video streams chunk by chunk. + + For the detailed usage of this class, please refer to the tutorial. + + Args: + src (str, path-like, bytes or file-like object): The media source. + If string-type, it must be a resource indicator that FFmpeg can + handle. This includes a file path, URL, device identifier or + filter expression. The supported value depends on the FFmpeg found + in the system. + + If bytes, it must be an encoded media data in contiguous memory. + + If file-like object, it must support `read` method with the signature + `read(size: int) -> bytes`. + Additionally, if the file-like object has `seek` method, it uses + the method when parsing media metadata. This improves the reliability + of codec detection. The signagure of `seek` method must be + `seek(offset: int, whence: int) -> int`. + + Please refer to the following for the expected signature and behavior + of `read` and `seek` method. + + - https://docs.python.org/3/library/io.html#io.BufferedIOBase.read + - https://docs.python.org/3/library/io.html#io.IOBase.seek + + format (str or None, optional): + Override the input format, or specify the source sound device. + Default: ``None`` (no override nor device input). + + This argument serves two different usecases. + + 1) Override the source format. + This is useful when the input data do not contain a header. + + 2) Specify the input source device. + This allows to load media stream from hardware devices, + such as microphone, camera and screen, or a virtual device. + + + .. note:: + + This option roughly corresponds to ``-f`` option of ``ffmpeg`` command. + Please refer to the ffmpeg documentations for the possible values. + + https://ffmpeg.org/ffmpeg-formats.html#Demuxers + + Please use :py:func:`~torio.utils.ffmpeg_utils.get_demuxers` to list the + demultiplexers available in the current environment. + + For device access, the available values vary based on hardware (AV device) and + software configuration (ffmpeg build). + + https://ffmpeg.org/ffmpeg-devices.html#Input-Devices + + Please use :py:func:`~torio.utils.ffmpeg_utils.get_input_devices` to list + the input devices available in the current environment. + + option (dict of str to str, optional): + Custom option passed when initializing format context (opening source). + + You can use this argument to change the input source before it is passed to decoder. + + Default: ``None``. + + buffer_size (int): + The internal buffer size in byte. Used only when `src` is file-like object. + + Default: `4096`. + """ + + def __init__( + self, + src: Union[str, Path, BinaryIO], + format: Optional[str] = None, + option: Optional[Dict[str, str]] = None, + buffer_size: int = 4096, + ): + self.src = src + if isinstance(src, bytes): + self._be = ffmpeg_ext.StreamingMediaDecoderBytes(src, format, option, buffer_size) + elif hasattr(src, "read"): + self._be = ffmpeg_ext.StreamingMediaDecoderFileObj(src, format, option, buffer_size) + else: + self._be = ffmpeg_ext.StreamingMediaDecoder(os.path.normpath(src), format, option) + + i = self._be.find_best_audio_stream() + self._default_audio_stream = None if i < 0 else i + i = self._be.find_best_video_stream() + self._default_video_stream = None if i < 0 else i + + @property + def num_src_streams(self): + """Number of streams found in the provided media source. + + :type: int + """ + return self._be.num_src_streams() + + @property + def num_out_streams(self): + """Number of output streams configured by client code. + + :type: int + """ + return self._be.num_out_streams() + + @property + def default_audio_stream(self): + """The index of default audio stream. ``None`` if there is no audio stream + + :type: Optional[int] + """ + return self._default_audio_stream + + @property + def default_video_stream(self): + """The index of default video stream. ``None`` if there is no video stream + + :type: Optional[int] + """ + return self._default_video_stream + + def get_metadata(self) -> Dict[str, str]: + """Get the metadata of the source media. + + Returns: + dict + """ + return self._be.get_metadata() + + def get_src_stream_info(self, i: int) -> InputStreamTypes: + """Get the metadata of source stream + + Args: + i (int): Stream index. + Returns: + InputStreamTypes: + Information about the source stream. + If the source stream is audio type, then + :class:`~torio.io._stream_reader.SourceAudioStream` is returned. + If it is video type, then + :class:`~torio.io._stream_reader.SourceVideoStream` is returned. + Otherwise :class:`~torio.io._stream_reader.SourceStream` class is returned. + """ + return _parse_si(self._be.get_src_stream_info(i)) + + def get_out_stream_info(self, i: int) -> OutputStreamTypes: + """Get the metadata of output stream + + Args: + i (int): Stream index. + Returns: + OutputStreamTypes + Information about the output stream. + If the output stream is audio type, then + :class:`~torio.io._stream_reader.OutputAudioStream` is returned. + If it is video type, then + :class:`~torio.io._stream_reader.OutputVideoStream` is returned. + """ + info = self._be.get_out_stream_info(i) + return _parse_oi(info) + + def seek(self, timestamp: float, mode: str = "precise"): + """Seek the stream to the given timestamp [second] + + Args: + timestamp (float): Target time in second. + mode (str): Controls how seek is done. + Valid choices are; + + * "key": Seek into the nearest key frame before the given timestamp. + * "any": Seek into any frame (including non-key frames) before the given timestamp. + * "precise": First seek into the nearest key frame before the given timestamp, then + decode frames until it reaches the closes frame to the given timestamp. + + Note: + All the modes invalidate and reset the internal state of decoder. + When using "any" mode and if it ends up seeking into non-key frame, + the image decoded may be invalid due to lack of key frame. + Using "precise" will workaround this issue by decoding frames from previous + key frame, but will be slower. + """ + modes = { + "key": 0, + "any": 1, + "precise": 2, + } + if mode not in modes: + raise ValueError(f"The value of mode must be one of {list(modes.keys())}. Found: {mode}") + self._be.seek(timestamp, modes[mode]) + + @_format_audio_args + def add_basic_audio_stream( + self, + frames_per_chunk: int, + buffer_chunk_size: int = 3, + *, + stream_index: Optional[int] = None, + decoder: Optional[str] = None, + decoder_option: Optional[Dict[str, str]] = None, + format: Optional[str] = "fltp", + sample_rate: Optional[int] = None, + num_channels: Optional[int] = None, + ): + """Add output audio stream + + Args: + frames_per_chunk (int): {frames_per_chunk} + + buffer_chunk_size (int, optional): {buffer_chunk_size} + + stream_index (int or None, optional): {stream_index} + + decoder (str or None, optional): {decoder} + + decoder_option (dict or None, optional): {decoder_option} + + format (str, optional): Output sample format (precision). + + If ``None``, the output chunk has dtype corresponding to + the precision of the source audio. + + Otherwise, the sample is converted and the output dtype is changed + as following. + + - ``"u8p"``: The output is ``torch.uint8`` type. + - ``"s16p"``: The output is ``torch.int16`` type. + - ``"s32p"``: The output is ``torch.int32`` type. + - ``"s64p"``: The output is ``torch.int64`` type. + - ``"fltp"``: The output is ``torch.float32`` type. + - ``"dblp"``: The output is ``torch.float64`` type. + + Default: ``"fltp"``. + + sample_rate (int or None, optional): If provided, resample the audio. + + num_channels (int, or None, optional): If provided, change the number of channels. + """ + self.add_audio_stream( + frames_per_chunk, + buffer_chunk_size, + stream_index=stream_index, + decoder=decoder, + decoder_option=decoder_option, + filter_desc=_get_afilter_desc(sample_rate, format, num_channels), + ) + + @_format_video_args + def add_basic_video_stream( + self, + frames_per_chunk: int, + buffer_chunk_size: int = 3, + *, + stream_index: Optional[int] = None, + decoder: Optional[str] = None, + decoder_option: Optional[Dict[str, str]] = None, + format: Optional[str] = "rgb24", + frame_rate: Optional[int] = None, + width: Optional[int] = None, + height: Optional[int] = None, + hw_accel: Optional[str] = None, + ): + """Add output video stream + + Args: + frames_per_chunk (int): {frames_per_chunk} + + buffer_chunk_size (int, optional): {buffer_chunk_size} + + stream_index (int or None, optional): {stream_index} + + decoder (str or None, optional): {decoder} + + decoder_option (dict or None, optional): {decoder_option} + + format (str, optional): Change the format of image channels. Valid values are, + + - ``"rgb24"``: 8 bits * 3 channels (R, G, B) + - ``"bgr24"``: 8 bits * 3 channels (B, G, R) + - ``"yuv420p"``: 8 bits * 3 channels (Y, U, V) + - ``"gray"``: 8 bits * 1 channels + + Default: ``"rgb24"``. + + frame_rate (int or None, optional): If provided, change the frame rate. + + width (int or None, optional): If provided, change the image width. Unit: Pixel. + + height (int or None, optional): If provided, change the image height. Unit: Pixel. + + hw_accel (str or None, optional): {hw_accel} + """ + self.add_video_stream( + frames_per_chunk, + buffer_chunk_size, + stream_index=stream_index, + decoder=decoder, + decoder_option=decoder_option, + filter_desc=_get_vfilter_desc(frame_rate, width, height, format), + hw_accel=hw_accel, + ) + + @_format_audio_args + def add_audio_stream( + self, + frames_per_chunk: int, + buffer_chunk_size: int = 3, + *, + stream_index: Optional[int] = None, + decoder: Optional[str] = None, + decoder_option: Optional[Dict[str, str]] = None, + filter_desc: Optional[str] = None, + ): + """Add output audio stream + + Args: + frames_per_chunk (int): {frames_per_chunk} + + buffer_chunk_size (int, optional): {buffer_chunk_size} + + stream_index (int or None, optional): {stream_index} + + decoder (str or None, optional): {decoder} + + decoder_option (dict or None, optional): {decoder_option} + + filter_desc (str or None, optional): Filter description. + The list of available filters can be found at + https://ffmpeg.org/ffmpeg-filters.html + Note that complex filters are not supported. + + """ + i = self.default_audio_stream if stream_index is None else stream_index + if i is None: + raise RuntimeError("There is no audio stream.") + self._be.add_audio_stream( + i, + frames_per_chunk, + buffer_chunk_size, + filter_desc, + decoder, + decoder_option or {}, + ) + + @_format_video_args + def add_video_stream( + self, + frames_per_chunk: int, + buffer_chunk_size: int = 3, + *, + stream_index: Optional[int] = None, + decoder: Optional[str] = None, + decoder_option: Optional[Dict[str, str]] = None, + filter_desc: Optional[str] = None, + hw_accel: Optional[str] = None, + ): + """Add output video stream + + Args: + frames_per_chunk (int): {frames_per_chunk} + + buffer_chunk_size (int, optional): {buffer_chunk_size} + + stream_index (int or None, optional): {stream_index} + + decoder (str or None, optional): {decoder} + + decoder_option (dict or None, optional): {decoder_option} + + hw_accel (str or None, optional): {hw_accel} + + filter_desc (str or None, optional): Filter description. + The list of available filters can be found at + https://ffmpeg.org/ffmpeg-filters.html + Note that complex filters are not supported. + """ + i = self.default_video_stream if stream_index is None else stream_index + if i is None: + raise RuntimeError("There is no video stream.") + self._be.add_video_stream( + i, + frames_per_chunk, + buffer_chunk_size, + filter_desc, + decoder, + decoder_option or {}, + hw_accel, + ) + + def remove_stream(self, i: int): + """Remove an output stream. + + Args: + i (int): Index of the output stream to be removed. + """ + self._be.remove_stream(i) + + def process_packet(self, timeout: Optional[float] = None, backoff: float = 10.0) -> int: + """Read the source media and process one packet. + + If a packet is read successfully, then the data in the packet will + be decoded and passed to corresponding output stream processors. + + If the packet belongs to a source stream that is not connected to + an output stream, then the data are discarded. + + When the source reaches EOF, then it triggers all the output stream + processors to enter drain mode. All the output stream processors + flush the pending frames. + + Args: + timeout (float or None, optional): Timeout in milli seconds. + + This argument changes the retry behavior when it failed to + process a packet due to the underlying media resource being + temporarily unavailable. + + When using a media device such as a microphone, there are cases + where the underlying buffer is not ready. + Calling this function in such case would cause the system to report + `EAGAIN (resource temporarily unavailable)`. + + * ``>=0``: Keep retrying until the given time passes. + + * ``0<``: Keep retrying forever. + + * ``None`` : No retrying and raise an exception immediately. + + Default: ``None``. + + Note: + + The retry behavior is applicable only when the reason is the + unavailable resource. It is not invoked if the reason of failure is + other. + + backoff (float, optional): Time to wait before retrying in milli seconds. + + This option is effective only when `timeout` is effective. (not ``None``) + + When `timeout` is effective, this `backoff` controls how long the function + should wait before retrying. Default: ``10.0``. + + Returns: + int: + ``0`` + A packet was processed properly. The caller can keep + calling this function to buffer more frames. + + ``1`` + The streamer reached EOF. All the output stream processors + flushed the pending frames. The caller should stop calling + this method. + """ + return self._be.process_packet(timeout, backoff) + + def process_all_packets(self): + """Process packets until it reaches EOF.""" + self._be.process_all_packets() + + def is_buffer_ready(self) -> bool: + """Returns true if all the output streams have at least one chunk filled.""" + return self._be.is_buffer_ready() + + def pop_chunks(self) -> Tuple[Optional[ChunkTensor]]: + """Pop one chunk from all the output stream buffers. + + Returns: + Tuple[Optional[ChunkTensor]]: + Buffer contents. + If a buffer does not contain any frame, then `None` is returned instead. + """ + ret = [] + for chunk in self._be.pop_chunks(): + if chunk is None: + ret.append(None) + else: + ret.append(ChunkTensor(chunk.frames, chunk.pts)) + return ret + + def fill_buffer(self, timeout: Optional[float] = None, backoff: float = 10.0) -> int: + """Keep processing packets until all buffers have at least one chunk + + Arguments: + timeout (float or None, optional): See + :py:func:`~StreamingMediaDecoder.process_packet`. (Default: ``None``) + + backoff (float, optional): See + :py:func:`~StreamingMediaDecoder.process_packet`. (Default: ``10.0``) + + Returns: + int: + ``0`` + Packets are processed properly and buffers are + ready to be popped once. + + ``1`` + The streamer reached EOF. All the output stream processors + flushed the pending frames. The caller should stop calling + this method. + """ + return self._be.fill_buffer(timeout, backoff) + + def stream( + self, timeout: Optional[float] = None, backoff: float = 10.0 + ) -> Iterator[Tuple[Optional[ChunkTensor], ...]]: + """Return an iterator that generates output tensors + + Arguments: + timeout (float or None, optional): See + :py:func:`~StreamingMediaDecoder.process_packet`. (Default: ``None``) + + backoff (float, optional): See + :py:func:`~StreamingMediaDecoder.process_packet`. (Default: ``10.0``) + + Returns: + Iterator[Tuple[Optional[ChunkTensor], ...]]: + Iterator that yields a tuple of chunks that correspond to the output + streams defined by client code. + If an output stream is exhausted, then the chunk Tensor is substituted + with ``None``. + The iterator stops if all the output streams are exhausted. + """ + if self.num_out_streams == 0: + raise RuntimeError("No output stream is configured.") + + while True: + if self.fill_buffer(timeout, backoff): + break + yield self.pop_chunks() + + while True: + chunks = self.pop_chunks() + if all(c is None for c in chunks): + return + yield chunks diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/_streaming_media_encoder.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/_streaming_media_encoder.py new file mode 100644 index 0000000000000000000000000000000000000000..6c6bba2f5a75a69c41344720009077a31998bf1e --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/io/_streaming_media_encoder.py @@ -0,0 +1,502 @@ +from dataclasses import dataclass +from pathlib import Path +from typing import BinaryIO, Dict, Optional, Union + +import torch +import torio + +ffmpeg_ext = torio._extension.lazy_import_ffmpeg_ext() + + +@dataclass +class CodecConfig: + """Codec configuration.""" + + bit_rate: int = -1 + """Bit rate""" + + compression_level: int = -1 + """Compression level""" + + qscale: Optional[int] = None + """Global quality factor. Enables variable bit rate. Valid values depend on encoder. + + For example: MP3 takes ``0`` - ``9`` (https://trac.ffmpeg.org/wiki/Encode/MP3) while + libvorbis takes ``-1`` - ``10``. + """ + + gop_size: int = -1 + """The number of pictures in a group of pictures, or 0 for intra_only""" + + max_b_frames: int = -1 + """maximum number of B-frames between non-B-frames.""" + + +def _convert_config(cfg: CodecConfig): + if cfg is None: + return None + # Convert the codecconfig to C++ compatible type. + # omitting the return type annotation so as not to access ffmpeg_ext here. + return ffmpeg_ext.CodecConfig( + cfg.bit_rate, + cfg.compression_level, + cfg.qscale, + cfg.gop_size, + cfg.max_b_frames, + ) + + +def _format_doc(**kwargs): + def decorator(obj): + obj.__doc__ = obj.__doc__.format(**kwargs) + return obj + + return decorator + + +_encoder = """The name of the encoder to be used. + When provided, use the specified encoder instead of the default one. + + To list the available encoders, please use + :py:func:`~torio.utils.ffmpeg_utils.get_audio_encoders` for audio, and + :py:func:`~torio.utils.ffmpeg_utils.get_video_encoders` for video. + + Default: ``None``.""" + + +_encoder_option = """Options passed to encoder. + Mapping from str to str. + + To list encoder options for a encoder, you can use + ``ffmpeg -h encoder=`` command. + + Default: ``None``. + + | + + In addition to encoder-specific options, you can also pass options related + to multithreading. They are effective only if the encoder support them. + If neither of them are provided, StreamReader defaults to single thread. + + ``"threads"``: The number of threads (in str). + Providing the value ``"0"`` will let FFmpeg decides based on its heuristics. + + ``"thread_type"``: Which multithreading method to use. + The valid values are ``"frame"`` or ``"slice"``. + Note that each encoder supports different set of methods. + If not provided, a default value is used. + + - ``"frame"``: Encode more than one frame at once. + Each thread handles one frame. + This will increase decoding delay by one frame per thread + - ``"slice"``: Encode more than one part of a single frame at once. + + | + """ + + +_encoder_format = """Format used to encode media. + When encoder supports multiple formats, passing this argument will override + the format used for encoding. + + To list supported formats for the encoder, you can use + ``ffmpeg -h encoder=`` command. + + Default: ``None``. + + Note: + When ``encoder_format`` option is not provided, encoder uses its default format. + + For example, when encoding audio into wav format, 16-bit signed integer is used, + and when encoding video into mp4 format (h264 encoder), one of YUV format is used. + + This is because typically, 32-bit or 16-bit floating point is used in audio models but + they are not commonly used in audio formats. Similarly, RGB24 is commonly used in vision + models, but video formats usually (and better) support YUV formats. + """ + +_codec_config = """Codec configuration. Please refer to :py:class:`CodecConfig` for + configuration options. + + Default: ``None``.""" + + +_filter_desc = """Additional processing to apply before encoding the input media. + """ + +_format_common_args = _format_doc( + encoder=_encoder, + encoder_option=_encoder_option, + encoder_format=_encoder_format, + codec_config=_codec_config, + filter_desc=_filter_desc, +) + + +class StreamingMediaEncoder: + """Encode and write audio/video streams chunk by chunk + + Args: + dst (str, path-like or file-like object): The destination where the encoded data are written. + If string-type, it must be a resource indicator that FFmpeg can + handle. The supported value depends on the FFmpeg found in the system. + + If file-like object, it must support `write` method with the signature + `write(data: bytes) -> int`. + + Please refer to the following for the expected signature and behavior of + `write` method. + + - https://docs.python.org/3/library/io.html#io.BufferedIOBase.write + + format (str or None, optional): + Override the output format, or specify the output media device. + Default: ``None`` (no override nor device output). + + This argument serves two different use cases. + + 1) Override the output format. + This is useful when writing raw data or in a format different from the extension. + + 2) Specify the output device. + This allows to output media streams to hardware devices, + such as speaker and video screen. + + .. note:: + + This option roughly corresponds to ``-f`` option of ``ffmpeg`` command. + Please refer to the ffmpeg documentations for possible values. + + https://ffmpeg.org/ffmpeg-formats.html#Muxers + + Please use :py:func:`~torio.utils.ffmpeg_utils.get_muxers` to list the + multiplexers available in the current environment. + + For device access, the available values vary based on hardware (AV device) and + software configuration (ffmpeg build). + Please refer to the ffmpeg documentations for possible values. + + https://ffmpeg.org/ffmpeg-devices.html#Output-Devices + + Please use :py:func:`~torio.utils.ffmpeg_utils.get_output_devices` to list + the output devices available in the current environment. + + buffer_size (int): + The internal buffer size in byte. Used only when `dst` is a file-like object. + + Default: `4096`. + """ + + def __init__( + self, + dst: Union[str, Path, BinaryIO], + format: Optional[str] = None, + buffer_size: int = 4096, + ): + if hasattr(dst, "write"): + self._s = ffmpeg_ext.StreamingMediaEncoderFileObj(dst, format, buffer_size) + else: + self._s = ffmpeg_ext.StreamingMediaEncoder(str(dst), format) + self._is_open = False + + @_format_common_args + def add_audio_stream( + self, + sample_rate: int, + num_channels: int, + format: str = "flt", + *, + encoder: Optional[str] = None, + encoder_option: Optional[Dict[str, str]] = None, + encoder_sample_rate: Optional[int] = None, + encoder_num_channels: Optional[int] = None, + encoder_format: Optional[str] = None, + codec_config: Optional[CodecConfig] = None, + filter_desc: Optional[str] = None, + ): + """Add an output audio stream. + + Args: + sample_rate (int): The sample rate. + + num_channels (int): The number of channels. + + format (str, optional): Input sample format, which determines the dtype + of the input tensor. + + - ``"u8"``: The input tensor must be ``torch.uint8`` type. + - ``"s16"``: The input tensor must be ``torch.int16`` type. + - ``"s32"``: The input tensor must be ``torch.int32`` type. + - ``"s64"``: The input tensor must be ``torch.int64`` type. + - ``"flt"``: The input tensor must be ``torch.float32`` type. + - ``"dbl"``: The input tensor must be ``torch.float64`` type. + + Default: ``"flt"``. + + encoder (str or None, optional): {encoder} + + encoder_option (dict or None, optional): {encoder_option} + + encoder_sample_rate (int or None, optional): Override the sample rate used for encoding time. + Some encoders pose restriction on the sample rate used for encoding. + If the source sample rate is not supported by the encoder, the source sample rate is used, + otherwise a default one is picked. + + For example, ``"opus"`` encoder only supports 48k Hz, so, when encoding a + waveform with ``"opus"`` encoder, it is always encoded as 48k Hz. + Meanwhile ``"mp3"`` (``"libmp3lame"``) supports 44.1k, 48k, 32k, 22.05k, + 24k, 16k, 11.025k, 12k and 8k Hz. + If the original sample rate is one of these, then the original sample rate + is used, otherwise it will be resampled to a default one (44.1k). + When encoding into WAV format, there is no restriction on sample rate, + so the original sample rate will be used. + + Providing ``encoder_sample_rate`` will override this behavior and + make encoder attempt to use the provided sample rate. + The provided value must be one support by the encoder. + + encoder_num_channels (int or None, optional): Override the number of channels used for encoding. + + Similar to sample rate, some encoders (such as ``"opus"``, + ``"vorbis"`` and ``"g722"``) pose restriction on + the numbe of channels that can be used for encoding. + + If the original number of channels is supported by encoder, + then it will be used, otherwise, the encoder attempts to + remix the channel to one of the supported ones. + + Providing ``encoder_num_channels`` will override this behavior and + make encoder attempt to use the provided number of channels. + The provided value must be one support by the encoder. + + encoder_format (str or None, optional): {encoder_format} + + codec_config (CodecConfig or None, optional): {codec_config} + + filter_desc (str or None, optional): {filter_desc} + """ + self._s.add_audio_stream( + sample_rate, + num_channels, + format, + encoder, + encoder_option, + encoder_format, + encoder_sample_rate, + encoder_num_channels, + _convert_config(codec_config), + filter_desc, + ) + + @_format_common_args + def add_video_stream( + self, + frame_rate: float, + width: int, + height: int, + format: str = "rgb24", + *, + encoder: Optional[str] = None, + encoder_option: Optional[Dict[str, str]] = None, + encoder_frame_rate: Optional[float] = None, + encoder_width: Optional[int] = None, + encoder_height: Optional[int] = None, + encoder_format: Optional[str] = None, + codec_config: Optional[CodecConfig] = None, + filter_desc: Optional[str] = None, + hw_accel: Optional[str] = None, + ): + """Add an output video stream. + + This method has to be called before `open` is called. + + Args: + frame_rate (float): Frame rate of the video. + + width (int): Width of the video frame. + + height (int): Height of the video frame. + + format (str, optional): Input pixel format, which determines the + color channel order of the input tensor. + + - ``"gray8"``: One channel, grayscale. + - ``"rgb24"``: Three channels in the order of RGB. + - ``"bgr24"``: Three channels in the order of BGR. + - ``"yuv444p"``: Three channels in the order of YUV. + + Default: ``"rgb24"``. + + In either case, the input tensor has to be ``torch.uint8`` type and + the shape must be (frame, channel, height, width). + + encoder (str or None, optional): {encoder} + + encoder_option (dict or None, optional): {encoder_option} + + encoder_frame_rate (float or None, optional): Override the frame rate used for encoding. + + Some encoders, (such as ``"mpeg1"`` and ``"mpeg2"``) pose restriction on the + frame rate that can be used for encoding. + If such case, if the source frame rate (provided as ``frame_rate``) is not + one of the supported frame rate, then a default one is picked, and the frame rate + is changed on-the-fly. Otherwise the source frame rate is used. + + Providing ``encoder_frame_rate`` will override this behavior and + make encoder attempts to use the provided sample rate. + The provided value must be one support by the encoder. + + encoder_width (int or None, optional): Width of the image used for encoding. + This allows to change the image size during encoding. + + encoder_height (int or None, optional): Height of the image used for encoding. + This allows to change the image size during encoding. + + encoder_format (str or None, optional): {encoder_format} + + codec_config (CodecConfig or None, optional): {codec_config} + + filter_desc (str or None, optional): {filter_desc} + + hw_accel (str or None, optional): Enable hardware acceleration. + + When video is encoded on CUDA hardware, for example + `encoder="h264_nvenc"`, passing CUDA device indicator to `hw_accel` + (i.e. `hw_accel="cuda:0"`) will make StreamingMediaEncoder expect video + chunk to be CUDA Tensor. Passing CPU Tensor will result in an error. + + If `None`, the video chunk Tensor has to be CPU Tensor. + Default: ``None``. + """ + self._s.add_video_stream( + frame_rate, + width, + height, + format, + encoder, + encoder_option, + encoder_format, + encoder_frame_rate, + encoder_width, + encoder_height, + hw_accel, + _convert_config(codec_config), + filter_desc, + ) + + def set_metadata(self, metadata: Dict[str, str]): + """Set file-level metadata + + Args: + metadata (dict or None, optional): File-level metadata. + """ + self._s.set_metadata(metadata) + + def _print_output_stream(self, i: int): + """[debug] Print the registered stream information to stdout.""" + self._s.dump_format(i) + + def open(self, option: Optional[Dict[str, str]] = None) -> "StreamingMediaEncoder": + """Open the output file / device and write the header. + + :py:class:`StreamingMediaEncoder` is also a context manager and therefore supports the + ``with`` statement. + This method returns the instance on which the method is called (i.e. `self`), + so that it can be used in `with` statement. + It is recommended to use context manager, as the file is closed automatically + when exiting from ``with`` clause. + + Args: + option (dict or None, optional): Private options for protocol, device and muxer. See example. + + Example - Protocol option + >>> s = StreamingMediaEncoder(dst="rtmp://localhost:1234/live/app", format="flv") + >>> s.add_video_stream(...) + >>> # Passing protocol option `listen=1` makes StreamingMediaEncoder act as RTMP server. + >>> with s.open(option={"listen": "1"}) as f: + >>> f.write_video_chunk(...) + + Example - Device option + >>> s = StreamingMediaEncoder("-", format="sdl") + >>> s.add_video_stream(..., encoder_format="rgb24") + >>> # Open SDL video player with fullscreen + >>> with s.open(option={"window_fullscreen": "1"}): + >>> f.write_video_chunk(...) + + Example - Muxer option + >>> s = StreamingMediaEncoder("foo.flac") + >>> s.add_audio_stream(...) + >>> s.set_metadata({"artist": "torio contributors"}) + >>> # FLAC muxer has a private option to not write the header. + >>> # The resulting file does not contain the above metadata. + >>> with s.open(option={"write_header": "false"}) as f: + >>> f.write_audio_chunk(...) + """ + if not self._is_open: + self._s.open(option) + self._is_open = True + return self + + def close(self): + """Close the output + + :py:class:`StreamingMediaEncoder` is also a context manager and therefore supports the + ``with`` statement. + It is recommended to use context manager, as the file is closed automatically + when exiting from ``with`` clause. + + See :py:meth:`StreamingMediaEncoder.open` for more detail. + """ + if self._is_open: + self._s.close() + self._is_open = False + + def write_audio_chunk(self, i: int, chunk: torch.Tensor, pts: Optional[float] = None): + """Write audio data + + Args: + i (int): Stream index. + chunk (Tensor): Waveform tensor. Shape: `(frame, channel)`. + The ``dtype`` must match what was passed to :py:meth:`add_audio_stream` method. + pts (float, optional, or None): If provided, overwrite the presentation timestamp. + + .. note:: + + The provided value is converted to integer value expressed in basis of + sample rate. Therefore, it is truncated to the nearest value of + ``n / sample_rate``. + """ + self._s.write_audio_chunk(i, chunk, pts) + + def write_video_chunk(self, i: int, chunk: torch.Tensor, pts: Optional[float] = None): + """Write video/image data + + Args: + i (int): Stream index. + chunk (Tensor): Video/image tensor. + Shape: `(time, channel, height, width)`. + The ``dtype`` must be ``torch.uint8``. + The shape (height, width and the number of channels) must match + what was configured when calling :py:meth:`add_video_stream` + pts (float, optional or None): If provided, overwrite the presentation timestamp. + + .. note:: + + The provided value is converted to integer value expressed in basis of + frame rate. Therefore, it is truncated to the nearest value of + ``n / frame_rate``. + """ + self._s.write_video_chunk(i, chunk, pts) + + def flush(self): + """Flush the frames from encoders and write the frames to the destination.""" + self._s.flush() + + def __enter__(self): + """Context manager so that the destination is closed and data are flushed automatically.""" + return self + + def __exit__(self, exception_type, exception_value, traceback): + """Context manager so that the destination is closed and data are flushed automatically.""" + self.flush() + self.close() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/lib/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/lib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/lib/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/lib/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9821d38928d9ad780bffc37ac8fe9219c6c26c73 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/lib/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..97c25eef8e8f4a1f413c4bf91b415d4ea308f121 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__init__.py @@ -0,0 +1,4 @@ +from . import ffmpeg_utils + + +__all__ = ["ffmpeg_utils"] diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..251b5c90a5c25e6e15f8c56b487774a01e072a4b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__pycache__/ffmpeg_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__pycache__/ffmpeg_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..710d4590293778261d88429519cce6b0f1041967 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/__pycache__/ffmpeg_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/ffmpeg_utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/ffmpeg_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..91ea2322837605a5a2c63fc65fc087d66f409455 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/torio/utils/ffmpeg_utils.py @@ -0,0 +1,247 @@ +"""Module to change the configuration of FFmpeg libraries (such as libavformat). + +It affects functionalities in :py:mod:`torio.io`. +""" +from typing import Dict, List, Tuple + +import torio + +ffmpeg_ext = torio._extension.lazy_import_ffmpeg_ext() + + +def get_versions() -> Dict[str, Tuple[int]]: + """Get the versions of FFmpeg libraries + + Returns: + dict: mapping from library names to version string, + i.e. `"libavutil": (56, 22, 100)`. + """ + return ffmpeg_ext.get_versions() + + +def get_log_level() -> int: + """Get the log level of FFmpeg. + + See :py:func:`set_log_level` for the detail. + """ + return ffmpeg_ext.get_log_level() + + +def set_log_level(level: int): + """Set the log level of FFmpeg (libavformat etc) + + Arguments: + level (int): Log level. The larger, the more verbose. + + The following values are common values, the corresponding ``ffmpeg``'s + ``-loglevel`` option value and desription. + + * ``-8`` (``quiet``): + Print no output. + * ``0`` (``panic``): + Something went really wrong and we will crash now. + * ``8`` (``fatal``): + Something went wrong and recovery is not possible. + For example, no header was found for a format which depends + on headers or an illegal combination of parameters is used. + * ``16`` (``error``): + Something went wrong and cannot losslessly be recovered. + However, not all future data is affected. + * ``24`` (``warning``): + Something somehow does not look correct. + This may or may not lead to problems. + * ``32`` (``info``): + Standard information. + * ``40`` (``verbose``): + Detailed information. + * ``48`` (``debug``): + Stuff which is only useful for libav* developers. + * ``56`` (``trace``): + Extremely verbose debugging, useful for libav* development. + + """ + ffmpeg_ext.set_log_level(level) + + +def get_demuxers() -> Dict[str, str]: + """Get the available demuxers. + + Returns: + Dict[str, str]: Mapping from demuxer (format) short name to long name. + + Example + >>> for k, v in get_demuxers().items(): + >>> print(f"{k}: {v}") + ... aa: Audible AA format files + ... aac: raw ADTS AAC (Advanced Audio Coding) + ... aax: CRI AAX + ... ac3: raw AC-3 + """ + return ffmpeg_ext.get_demuxers() + + +def get_muxers() -> Dict[str, str]: + """Get the available muxers. + + Returns: + Dict[str, str]: Mapping from muxer (format) short name to long name. + + Example + >>> for k, v in get_muxers().items(): + >>> print(f"{k}: {v}") + ... a64: a64 - video for Commodore 64 + ... ac3: raw AC-3 + ... adts: ADTS AAC (Advanced Audio Coding) + ... adx: CRI ADX + ... aiff: Audio IFF + """ + return ffmpeg_ext.get_muxers() + + +def get_audio_decoders() -> Dict[str, str]: + """Get the available audio decoders. + + Returns: + Dict[str, str]: Mapping from decoder short name to long name. + + Example + >>> for k, v in get_audio_decoders().items(): + >>> print(f"{k}: {v}") + ... a64: a64 - video for Commodore 64 + ... ac3: raw AC-3 + ... adts: ADTS AAC (Advanced Audio Coding) + ... adx: CRI ADX + ... aiff: Audio IFF + """ + return ffmpeg_ext.get_audio_decoders() + + +def get_audio_encoders() -> Dict[str, str]: + """Get the available audio encoders. + + Returns: + Dict[str, str]: Mapping from encoder short name to long name. + + Example + >>> for k, v in get_audio_encoders().items(): + >>> print(f"{k}: {v}") + ... comfortnoise: RFC 3389 comfort noise generator + ... s302m: SMPTE 302M + ... aac: AAC (Advanced Audio Coding) + ... ac3: ATSC A/52A (AC-3) + ... ac3_fixed: ATSC A/52A (AC-3) + ... alac: ALAC (Apple Lossless Audio Codec) + """ + return ffmpeg_ext.get_audio_encoders() + + +def get_video_decoders() -> Dict[str, str]: + """Get the available video decoders. + + Returns: + Dict[str, str]: Mapping from decoder short name to long name. + + Example + >>> for k, v in get_video_decoders().items(): + >>> print(f"{k}: {v}") + ... aasc: Autodesk RLE + ... aic: Apple Intermediate Codec + ... alias_pix: Alias/Wavefront PIX image + ... agm: Amuse Graphics Movie + ... amv: AMV Video + ... anm: Deluxe Paint Animation + """ + return ffmpeg_ext.get_video_decoders() + + +def get_video_encoders() -> Dict[str, str]: + """Get the available video encoders. + + Returns: + Dict[str, str]: Mapping from encoder short name to long name. + + Example + >>> for k, v in get_audio_encoders().items(): + >>> print(f"{k}: {v}") + ... a64multi: Multicolor charset for Commodore 64 + ... a64multi5: Multicolor charset for Commodore 64, extended with 5th color (colram) + ... alias_pix: Alias/Wavefront PIX image + ... amv: AMV Video + ... apng: APNG (Animated Portable Network Graphics) image + ... asv1: ASUS V1 + ... asv2: ASUS V2 + """ + return ffmpeg_ext.get_video_encoders() + + +def get_input_devices() -> Dict[str, str]: + """Get the available input devices. + + Returns: + Dict[str, str]: Mapping from device short name to long name. + + Example + >>> for k, v in get_input_devices().items(): + >>> print(f"{k}: {v}") + ... avfoundation: AVFoundation input device + ... lavfi: Libavfilter virtual input device + """ + return ffmpeg_ext.get_input_devices() + + +def get_output_devices() -> Dict[str, str]: + """Get the available output devices. + + Returns: + Dict[str, str]: Mapping from device short name to long name. + + Example + >>> for k, v in get_output_devices().items(): + >>> print(f"{k}: {v}") + ... audiotoolbox: AudioToolbox output device + """ + return ffmpeg_ext.get_output_devices() + + +def get_input_protocols() -> List[str]: + """Get the supported input protocols. + + Returns: + List[str]: The names of supported input protocols + + Example + >>> print(get_input_protocols()) + ... ['file', 'ftp', 'hls', 'http','https', 'pipe', 'rtmp', 'tcp', 'tls', 'udp', 'unix'] + """ + return ffmpeg_ext.get_input_protocols() + + +def get_output_protocols() -> List[str]: + """Get the supported output protocols. + + Returns: + list of str: The names of supported output protocols + + Example + >>> print(get_output_protocols()) + ... ['file', 'ftp', 'http', 'https', 'md5', 'pipe', 'prompeg', 'rtmp', 'tee', 'tcp', 'tls', 'udp', 'unix'] + """ + return ffmpeg_ext.get_output_protocols() + + +def get_build_config() -> str: + """Get the FFmpeg build configuration + + Returns: + str: Build configuration string. + + Example + >>> print(get_build_config()) + --prefix=/Users/runner/miniforge3 --cc=arm64-apple-darwin20.0.0-clang --enable-gpl --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-neon --enable-libx264 --enable-libx265 --enable-libaom --enable-libsvtav1 --enable-libxml2 --enable-libvpx --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame --pkg-config=/Users/runner/miniforge3/conda-bld/ffmpeg_1646229390493/_build_env/bin/pkg-config --enable-cross-compile --arch=arm64 --target-os=darwin --cross-prefix=arm64-apple-darwin20.0.0- --host-cc=/Users/runner/miniforge3/conda-bld/ffmpeg_1646229390493/_build_env/bin/x86_64-apple-darwin13.4.0-clang # noqa + """ + return ffmpeg_ext.get_build_config() + + +def clear_cuda_context_cache(): + """Clear the CUDA context used by CUDA Hardware accelerated video decoding""" + ffmpeg_ext.clear_cuda_context_cache() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE new file mode 100644 index 0000000000000000000000000000000000000000..194caf554f8f10ba4cac8a81b631a61d0d81f60d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm-4.67.3.dist-info/licenses/LICENCE @@ -0,0 +1,49 @@ +`tqdm` is a product of collaborative work. +Unless otherwise stated, all authors (see commit logs) retain copyright +for their respective work, and release the work under the MIT licence +(text below). + +Exceptions or notable authors are listed below +in reverse chronological order: + +* files: * + MPL-2.0 2015-2026 (c) Casper da Costa-Luis + [casperdcl](https://github.com/casperdcl). +* files: tqdm/_tqdm.py + MIT 2016 (c) [PR #96] on behalf of Google Inc. +* files: tqdm/_tqdm.py README.rst .gitignore + MIT 2013 (c) Noam Yorav-Raphael, original author. + +[PR #96]: https://github.com/tqdm/tqdm/pull/96 + + +Mozilla Public Licence (MPL) v. 2.0 - Exhibit A +----------------------------------------------- + +This Source Code Form is subject to the terms of the +Mozilla Public License, v. 2.0. +If a copy of the MPL was not distributed with this project, +You can obtain one at https://mozilla.org/MPL/2.0/. + + +MIT License (MIT) +----------------- + +Copyright (c) 2013 noamraph + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16f0ab66c6facd93e01ef9040a919733b5ed4b29 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/__main__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/__main__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4fd2ad2bd586f2acf34e879fea9bb754514dbf58 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/__main__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_main.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_main.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d397f17bddbd20d656ae2334a15c2cb975aabf19 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_main.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_monitor.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_monitor.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3df2d4ada612ade63456277f25b09c81beb06f67 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_monitor.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..37e9eb78a4e683fc9db85f83747cf0ddf0c30c6c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_gui.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_gui.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0f3dbe7b050370934c4120140e3005afc469ea11 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_gui.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_notebook.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_notebook.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..74178102c13489ee7f4ba26a3954196c7020714c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_notebook.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_pandas.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_pandas.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2997193f7144feec888a47607d527f721988d583 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_tqdm_pandas.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4602c8cbbdf0efccb81d511ff5d83859683a5562 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/asyncio.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/asyncio.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b899236c5dacab6ad07d371d0eb321e4aa86141 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/asyncio.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/auto.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/auto.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f9a9f7cf008d5bee4ebcf473d6df81c4bd9237a3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/auto.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/autonotebook.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/autonotebook.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..268485bd23f3923b12ce482c7161f95832da0686 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/autonotebook.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/cli.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/cli.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f6ac2b4c47c539d28b41add84acd45eb0e741745 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/cli.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/dask.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/dask.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..528bf5d55ba892546a9ab2fad84b74beb1d0d0eb Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/dask.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/gui.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/gui.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ebe1a4b8d373de6b218b9344525e1dc6d7505678 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/gui.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/keras.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/keras.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cbfcd22d404fa1d75499e5bed0a4761011700164 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/keras.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/notebook.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/notebook.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b8f6b39e6da3c12f09dffe2fba6deed45273bc10 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/notebook.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/rich.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/rich.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6627c9fe36686faeef7246b2d7e9242284199d78 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/rich.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/std.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/std.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..03ad70edf0d598b3c7ff14179cf658b577820ab9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/std.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/tk.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/tk.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..48eb93e93b9526edb2b9c1864a1536604708bea4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/tk.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7f1a21fbc65cadbf87876197e7c5073dc36d5ab5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/version.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/version.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..15ce98924061d9bda90d2456b8936b3c08c8c035 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/__pycache__/version.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..87ec4601fcff138e0882808237375aed93f5ef35 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__init__.py @@ -0,0 +1,91 @@ +""" +Thin wrappers around common functions. + +Subpackages contain potentially unstable extensions. +""" +from warnings import warn + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmDeprecationWarning, tqdm +from ..utils import ObjectWrapper + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['tenumerate', 'tzip', 'tmap'] + + +class DummyTqdmFile(ObjectWrapper): + """Dummy file-like that will write to tqdm""" + + def __init__(self, wrapped): + super().__init__(wrapped) + self._buf = [] + + def write(self, x, nolock=False): + nl = b"\n" if isinstance(x, bytes) else "\n" + pre, sep, post = x.rpartition(nl) + if sep: + blank = type(nl)() + tqdm.write(blank.join(self._buf + [pre, sep]), + end=blank, file=self._wrapped, nolock=nolock) + self._buf = [post] + else: + self._buf.append(x) + + def __del__(self): + if self._buf: + blank = type(self._buf[0])() + try: + tqdm.write(blank.join(self._buf), end=blank, file=self._wrapped) + except (OSError, ValueError): + pass + + +def builtin_iterable(func): + """Returns `func`""" + warn("This function has no effect, and will be removed in tqdm==5.0.0", + TqdmDeprecationWarning, stacklevel=2) + return func + + +def tenumerate(iterable, start=0, total=None, tqdm_class=tqdm_auto, **tqdm_kwargs): + """ + Equivalent of `numpy.ndenumerate` or builtin `enumerate`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + try: + import numpy as np + except ImportError: + pass + else: + if isinstance(iterable, np.ndarray): + return tqdm_class(np.ndenumerate(iterable), total=total or iterable.size, + **tqdm_kwargs) + return enumerate(tqdm_class(iterable, total=total, **tqdm_kwargs), start) + + +def tzip(iter1, *iter2plus, **tqdm_kwargs): + """ + Equivalent of builtin `zip`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + kwargs = tqdm_kwargs.copy() + tqdm_class = kwargs.pop("tqdm_class", tqdm_auto) + yield from zip(tqdm_class(iter1, **kwargs), *iter2plus) + + +def tmap(function, *sequences, **tqdm_kwargs): + """ + Equivalent of builtin `map`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + for i in tzip(*sequences, **tqdm_kwargs): + yield function(*i) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a2b3bf5239ccc3cb2bc91dfee1046dcab1866cb4 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/bells.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/bells.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..295095318d0196cf0e1e7d803dd51942f81a62d6 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/bells.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/concurrent.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/concurrent.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4174b210f36efb719703034122727622308bc463 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/concurrent.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/discord.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/discord.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..78266827b3e75761e7e785682747144f26f49ad0 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/discord.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/itertools.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/itertools.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..892aa4e6fbe6a02367768c9c270314fc2a93950d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/itertools.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/logging.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/logging.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aaa07dd90e444880c5f11faadafb76f040c09f53 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/logging.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/slack.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/slack.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a656fd98aac1485d97ad757383ff8ff0311b1e60 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/slack.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/telegram.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/telegram.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5917f0910f9e4def2dbe8acae37a53cea7a2d56d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/telegram.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/utils_worker.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/utils_worker.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..712c900d6c629ecff9cdfd9a936eb1f231b75d7d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/__pycache__/utils_worker.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/bells.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/bells.py new file mode 100644 index 0000000000000000000000000000000000000000..5b8f4b9ecd894f1edfaa08d9fe730b8d7c8b93e0 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/bells.py @@ -0,0 +1,26 @@ +""" +Even more features than `tqdm.auto` (all the bells & whistles): + +- `tqdm.auto` +- `tqdm.tqdm.pandas` +- `tqdm.contrib.telegram` + + uses `${TQDM_TELEGRAM_TOKEN}` and `${TQDM_TELEGRAM_CHAT_ID}` +- `tqdm.contrib.discord` + + uses `${TQDM_DISCORD_TOKEN}` and `${TQDM_DISCORD_CHANNEL_ID}` +""" +__all__ = ['tqdm', 'trange'] +import warnings +from os import getenv + +if getenv("TQDM_SLACK_TOKEN") and getenv("TQDM_SLACK_CHANNEL"): + from .slack import tqdm, trange +elif getenv("TQDM_TELEGRAM_TOKEN") and getenv("TQDM_TELEGRAM_CHAT_ID"): + from .telegram import tqdm, trange +elif getenv("TQDM_DISCORD_TOKEN") and getenv("TQDM_DISCORD_CHANNEL_ID"): + from .discord import tqdm, trange +else: + from ..auto import tqdm, trange + +with warnings.catch_warnings(): + warnings.simplefilter("ignore", category=FutureWarning) + tqdm.pandas() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/concurrent.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/concurrent.py new file mode 100644 index 0000000000000000000000000000000000000000..cd81d622a1309df179042159a56cef4f8c309224 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/concurrent.py @@ -0,0 +1,105 @@ +""" +Thin wrappers around `concurrent.futures`. +""" +from contextlib import contextmanager +from operator import length_hint +from os import cpu_count + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmWarning + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['thread_map', 'process_map'] + + +@contextmanager +def ensure_lock(tqdm_class, lock_name=""): + """get (create if necessary) and then restore `tqdm_class`'s lock""" + old_lock = getattr(tqdm_class, '_lock', None) # don't create a new lock + lock = old_lock or tqdm_class.get_lock() # maybe create a new lock + lock = getattr(lock, lock_name, lock) # maybe subtype + tqdm_class.set_lock(lock) + yield lock + if old_lock is None: + del tqdm_class._lock + else: + tqdm_class.set_lock(old_lock) + + +def _executor_map(PoolExecutor, fn, *iterables, **tqdm_kwargs): + """ + Implementation of `thread_map` and `process_map`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + max_workers : [default: min(32, cpu_count() + 4)]. + chunksize : [default: 1]. + lock_name : [default: "":str]. + """ + kwargs = tqdm_kwargs.copy() + if "total" not in kwargs: + kwargs["total"] = length_hint(iterables[0]) + tqdm_class = kwargs.pop("tqdm_class", tqdm_auto) + max_workers = kwargs.pop("max_workers", min(32, cpu_count() + 4)) + chunksize = kwargs.pop("chunksize", 1) + lock_name = kwargs.pop("lock_name", "") + with ensure_lock(tqdm_class, lock_name=lock_name) as lk: + # share lock in case workers are already using `tqdm` + with PoolExecutor(max_workers=max_workers, initializer=tqdm_class.set_lock, + initargs=(lk,)) as ex: + return list(tqdm_class(ex.map(fn, *iterables, chunksize=chunksize), **kwargs)) + + +def thread_map(fn, *iterables, **tqdm_kwargs): + """ + Equivalent of `list(map(fn, *iterables))` + driven by `concurrent.futures.ThreadPoolExecutor`. + + Parameters + ---------- + tqdm_class : optional + `tqdm` class to use for bars [default: tqdm.auto.tqdm]. + max_workers : int, optional + Maximum number of workers to spawn; passed to + `concurrent.futures.ThreadPoolExecutor.__init__`. + [default: max(32, cpu_count() + 4)]. + """ + from concurrent.futures import ThreadPoolExecutor + return _executor_map(ThreadPoolExecutor, fn, *iterables, **tqdm_kwargs) + + +def process_map(fn, *iterables, **tqdm_kwargs): + """ + Equivalent of `list(map(fn, *iterables))` + driven by `concurrent.futures.ProcessPoolExecutor`. + + Parameters + ---------- + tqdm_class : optional + `tqdm` class to use for bars [default: tqdm.auto.tqdm]. + max_workers : int, optional + Maximum number of workers to spawn; passed to + `concurrent.futures.ProcessPoolExecutor.__init__`. + [default: min(32, cpu_count() + 4)]. + chunksize : int, optional + Size of chunks sent to worker processes; passed to + `concurrent.futures.ProcessPoolExecutor.map`. [default: 1]. + lock_name : str, optional + Member of `tqdm_class.get_lock()` to use [default: mp_lock]. + """ + from concurrent.futures import ProcessPoolExecutor + if iterables and "chunksize" not in tqdm_kwargs: + # default `chunksize=1` has poor performance for large iterables + # (most time spent dispatching items to workers). + longest_iterable_len = max(map(length_hint, iterables)) + if longest_iterable_len > 1000: + from warnings import warn + warn("Iterable length %d > 1000 but `chunksize` is not set." + " This may seriously degrade multiprocess performance." + " Set `chunksize=1` or more." % longest_iterable_len, + TqdmWarning, stacklevel=2) + if "lock_name" not in tqdm_kwargs: + tqdm_kwargs = tqdm_kwargs.copy() + tqdm_kwargs["lock_name"] = "mp_lock" + return _executor_map(ProcessPoolExecutor, fn, *iterables, **tqdm_kwargs) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/discord.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/discord.py new file mode 100644 index 0000000000000000000000000000000000000000..574baa84bbbeb5afce4a49f23edac894d680ca82 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/discord.py @@ -0,0 +1,156 @@ +""" +Sends updates to a Discord bot. + +Usage: +>>> from tqdm.contrib.discord import tqdm, trange +>>> for i in trange(10, token='{token}', channel_id='{channel_id}'): +... ... + +![screenshot](https://tqdm.github.io/img/screenshot-discord.png) +""" +from os import getenv +from warnings import warn + +from requests import Session +from requests.utils import default_user_agent + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmWarning +from ..version import __version__ +from .utils_worker import MonoWorker + +__author__ = {"github.com/": ["casperdcl", "guigoruiz1"]} +__all__ = ['DiscordIO', 'tqdm_discord', 'tdrange', 'tqdm', 'trange'] + + +class DiscordIO(MonoWorker): + """Non-blocking file-like IO using a Discord Bot.""" + API = "https://discord.com/api/v10" + UA = f"tqdm (https://tqdm.github.io, {__version__}) {default_user_agent()}" + + def __init__(self, token, channel_id): + """Creates a new message in the given `channel_id`.""" + super().__init__() + self.token = token + self.channel_id = channel_id + self.session = Session() + self.text = self.__class__.__name__ + self.message_id + + @property + def message_id(self): + if hasattr(self, '_message_id'): + return self._message_id + try: + res = self.session.post( + f'{self.API}/channels/{self.channel_id}/messages', + headers={'Authorization': f'Bot {self.token}', 'User-Agent': self.UA}, + json={'content': f"`{self.text}`"}).json() + except Exception as e: + tqdm_auto.write(str(e)) + else: + if res.get('error_code') == 429: + warn("Creation rate limit: try increasing `mininterval`.", + TqdmWarning, stacklevel=2) + else: + self._message_id = res['id'] + return self._message_id + + def write(self, s): + """Replaces internal `message_id`'s text with `s`.""" + if not s: + s = "..." + s = s.replace('\r', '').strip() + if s == self.text: + return # avoid duplicate message Bot error + message_id = self.message_id + if message_id is None: + return + self.text = s + try: + future = self.submit( + self.session.patch, + f'{self.API}/channels/{self.channel_id}/messages/{message_id}', + headers={'Authorization': f'Bot {self.token}', 'User-Agent': self.UA}, + json={'content': f"`{self.text}`"}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + def delete(self): + """Deletes internal `message_id`.""" + try: + future = self.submit( + self.session.delete, + f'{self.API}/channels/{self.channel_id}/messages/{self.message_id}', + headers={'Authorization': f'Bot {self.token}', 'User-Agent': self.UA}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + +class tqdm_discord(tqdm_auto): + """ + Standard `tqdm.auto.tqdm` but also sends updates to a Discord Bot. + May take a few seconds to create (`__init__`). + + - create a discord bot (not public, no requirement of OAuth2 code + grant, only send message permissions) & invite it to a channel: + + - copy the bot `{token}` & `{channel_id}` and paste below + + >>> from tqdm.contrib.discord import tqdm, trange + >>> for i in tqdm(iterable, token='{token}', channel_id='{channel_id}'): + ... ... + """ + def __init__(self, *args, **kwargs): + """ + Parameters + ---------- + token : str, required. Discord bot token + [default: ${TQDM_DISCORD_TOKEN}]. + channel_id : int, required. Discord channel ID + [default: ${TQDM_DISCORD_CHANNEL_ID}]. + + See `tqdm.auto.tqdm.__init__` for other parameters. + """ + if not kwargs.get('disable'): + kwargs = kwargs.copy() + self.dio = DiscordIO( + kwargs.pop('token', getenv('TQDM_DISCORD_TOKEN')), + kwargs.pop('channel_id', getenv('TQDM_DISCORD_CHANNEL_ID'))) + super().__init__(*args, **kwargs) + + def display(self, **kwargs): + super().display(**kwargs) + fmt = self.format_dict + if fmt.get('bar_format', None): + fmt['bar_format'] = fmt['bar_format'].replace( + '', '{bar:10u}').replace('{bar}', '{bar:10u}') + else: + fmt['bar_format'] = '{l_bar}{bar:10u}{r_bar}' + self.dio.write(self.format_meter(**fmt)) + + def clear(self, *args, **kwargs): + super().clear(*args, **kwargs) + if not self.disable: + self.dio.write("") + + def close(self): + if self.disable: + return + super().close() + if not (self.leave or (self.leave is None and self.pos == 0)): + self.dio.delete() + + +def tdrange(*args, **kwargs): + """Shortcut for `tqdm.contrib.discord.tqdm(range(*args), **kwargs)`.""" + return tqdm_discord(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_discord +trange = tdrange diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/itertools.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/itertools.py new file mode 100644 index 0000000000000000000000000000000000000000..e67651a41a6b8760d9b928ea48239e4611d70315 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/itertools.py @@ -0,0 +1,35 @@ +""" +Thin wrappers around `itertools`. +""" +import itertools + +from ..auto import tqdm as tqdm_auto + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['product'] + + +def product(*iterables, **tqdm_kwargs): + """ + Equivalent of `itertools.product`. + + Parameters + ---------- + tqdm_class : [default: tqdm.auto.tqdm]. + """ + kwargs = tqdm_kwargs.copy() + tqdm_class = kwargs.pop("tqdm_class", tqdm_auto) + try: + lens = list(map(len, iterables)) + except TypeError: + total = None + else: + total = 1 + for i in lens: + total *= i + kwargs.setdefault("total", total) + with tqdm_class(**kwargs) as t: + it = itertools.product(*iterables) + for i in it: + yield i + t.update() diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/logging.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/logging.py new file mode 100644 index 0000000000000000000000000000000000000000..e06febe37b5d70b5296804c55dca48a397c250e3 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/logging.py @@ -0,0 +1,126 @@ +""" +Helper functionality for interoperability with stdlib `logging`. +""" +import logging +import sys +from contextlib import contextmanager + +try: + from typing import Iterator, List, Optional, Type # noqa: F401 +except ImportError: + pass + +from ..std import tqdm as std_tqdm + + +class _TqdmLoggingHandler(logging.StreamHandler): + def __init__( + self, + tqdm_class=std_tqdm # type: Type[std_tqdm] + ): + super().__init__() + self.tqdm_class = tqdm_class + + def emit(self, record): + try: + msg = self.format(record) + self.tqdm_class.write(msg, file=self.stream) + self.flush() + except (KeyboardInterrupt, SystemExit): + raise + except: # noqa pylint: disable=bare-except + self.handleError(record) + + +def _is_console_logging_handler(handler): + return (isinstance(handler, logging.StreamHandler) + and handler.stream in {sys.stdout, sys.stderr}) + + +def _get_first_found_console_logging_handler(handlers): + for handler in handlers: + if _is_console_logging_handler(handler): + return handler + + +@contextmanager +def logging_redirect_tqdm( + loggers=None, # type: Optional[List[logging.Logger]], + tqdm_class=std_tqdm # type: Type[std_tqdm] +): + # type: (...) -> Iterator[None] + """ + Context manager redirecting console logging to `tqdm.write()`, leaving + other logging handlers (e.g. log files) unaffected. + + Parameters + ---------- + loggers : list, optional + Which handlers to redirect (default: [logging.root]). + tqdm_class : optional + + Example + ------- + ```python + import logging + from tqdm import trange + from tqdm.contrib.logging import logging_redirect_tqdm + + LOG = logging.getLogger(__name__) + + if __name__ == '__main__': + logging.basicConfig(level=logging.INFO) + with logging_redirect_tqdm(): + for i in trange(9): + if i == 4: + LOG.info("console logging redirected to `tqdm.write()`") + # logging restored + ``` + """ + if loggers is None: + loggers = [logging.root] + original_handlers_list = [logger.handlers for logger in loggers] + try: + for logger in loggers: + tqdm_handler = _TqdmLoggingHandler(tqdm_class) + orig_handler = _get_first_found_console_logging_handler(logger.handlers) + if orig_handler is not None: + tqdm_handler.setFormatter(orig_handler.formatter) + tqdm_handler.stream = orig_handler.stream + logger.handlers = [ + handler for handler in logger.handlers + if not _is_console_logging_handler(handler)] + [tqdm_handler] + yield + finally: + for logger, original_handlers in zip(loggers, original_handlers_list): + logger.handlers = original_handlers + + +@contextmanager +def tqdm_logging_redirect( + *args, + # loggers=None, # type: Optional[List[logging.Logger]] + # tqdm=None, # type: Optional[Type[tqdm.tqdm]] + **kwargs +): + # type: (...) -> Iterator[None] + """ + Convenience shortcut for: + ```python + with tqdm_class(*args, **tqdm_kwargs) as pbar: + with logging_redirect_tqdm(loggers=loggers, tqdm_class=tqdm_class): + yield pbar + ``` + + Parameters + ---------- + tqdm_class : optional, (default: tqdm.std.tqdm). + loggers : optional, list. + **tqdm_kwargs : passed to `tqdm_class`. + """ + tqdm_kwargs = kwargs.copy() + loggers = tqdm_kwargs.pop('loggers', None) + tqdm_class = tqdm_kwargs.pop('tqdm_class', std_tqdm) + with tqdm_class(*args, **tqdm_kwargs) as pbar: + with logging_redirect_tqdm(loggers=loggers, tqdm_class=tqdm_class): + yield pbar diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/slack.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/slack.py new file mode 100644 index 0000000000000000000000000000000000000000..9bca8ee98904ce869a4f8d6417bbdc4f00b38751 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/slack.py @@ -0,0 +1,120 @@ +""" +Sends updates to a Slack app. + +Usage: +>>> from tqdm.contrib.slack import tqdm, trange +>>> for i in trange(10, token='{token}', channel='{channel}'): +... ... + +![screenshot](https://tqdm.github.io/img/screenshot-slack.png) +""" +import logging +from os import getenv + +try: + from slack_sdk import WebClient +except ImportError: + raise ImportError("Please `pip install slack-sdk`") + +from ..auto import tqdm as tqdm_auto +from .utils_worker import MonoWorker + +__author__ = {"github.com/": ["0x2b3bfa0", "casperdcl"]} +__all__ = ['SlackIO', 'tqdm_slack', 'tsrange', 'tqdm', 'trange'] + + +class SlackIO(MonoWorker): + """Non-blocking file-like IO using a Slack app.""" + def __init__(self, token, channel): + """Creates a new message in the given `channel`.""" + super().__init__() + self.client = WebClient(token=token) + self.text = self.__class__.__name__ + try: + self.message = self.client.chat_postMessage(channel=channel, text=self.text) + except Exception as e: + tqdm_auto.write(str(e)) + self.message = None + + def write(self, s): + """Replaces internal `message`'s text with `s`.""" + if not s: + s = "..." + s = s.replace('\r', '').strip() + if s == self.text: + return # skip duplicate message + message = self.message + if message is None: + return + self.text = s + try: + future = self.submit(self.client.chat_update, channel=message['channel'], + ts=message['ts'], text='`' + s + '`') + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + +class tqdm_slack(tqdm_auto): + """ + Standard `tqdm.auto.tqdm` but also sends updates to a Slack app. + May take a few seconds to create (`__init__`). + + - create a Slack app with the `chat:write` scope & invite it to a + channel: + - copy the bot `{token}` & `{channel}` and paste below + >>> from tqdm.contrib.slack import tqdm, trange + >>> for i in tqdm(iterable, token='{token}', channel='{channel}'): + ... ... + """ + def __init__(self, *args, **kwargs): + """ + Parameters + ---------- + token : str, required. Slack token + [default: ${TQDM_SLACK_TOKEN}]. + channel : int, required. Slack channel + [default: ${TQDM_SLACK_CHANNEL}]. + mininterval : float, optional. + Minimum of [default: 1.5] to avoid rate limit. + + See `tqdm.auto.tqdm.__init__` for other parameters. + """ + if not kwargs.get('disable'): + kwargs = kwargs.copy() + logging.getLogger("HTTPClient").setLevel(logging.WARNING) + self.sio = SlackIO( + kwargs.pop('token', getenv("TQDM_SLACK_TOKEN")), + kwargs.pop('channel', getenv("TQDM_SLACK_CHANNEL"))) + kwargs['mininterval'] = max(1.5, kwargs.get('mininterval', 1.5)) + super().__init__(*args, **kwargs) + + def display(self, **kwargs): + super().display(**kwargs) + fmt = self.format_dict + if fmt.get('bar_format', None): + fmt['bar_format'] = fmt['bar_format'].replace( + '', '`{bar:10}`').replace('{bar}', '`{bar:10u}`') + else: + fmt['bar_format'] = '{l_bar}`{bar:10}`{r_bar}' + if fmt['ascii'] is False: + fmt['ascii'] = [":black_square:", ":small_blue_diamond:", ":large_blue_diamond:", + ":large_blue_square:"] + fmt['ncols'] = 336 + self.sio.write(self.format_meter(**fmt)) + + def clear(self, *args, **kwargs): + super().clear(*args, **kwargs) + if not self.disable: + self.sio.write("") + + +def tsrange(*args, **kwargs): + """Shortcut for `tqdm.contrib.slack.tqdm(range(*args), **kwargs)`.""" + return tqdm_slack(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_slack +trange = tsrange diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/telegram.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/telegram.py new file mode 100644 index 0000000000000000000000000000000000000000..019151800bc0c4c4fc543314b6398aa602b0692a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/telegram.py @@ -0,0 +1,153 @@ +""" +Sends updates to a Telegram bot. + +Usage: +>>> from tqdm.contrib.telegram import tqdm, trange +>>> for i in trange(10, token='{token}', chat_id='{chat_id}'): +... ... + +![screenshot](https://tqdm.github.io/img/screenshot-telegram.gif) +""" +from os import getenv +from warnings import warn + +from requests import Session + +from ..auto import tqdm as tqdm_auto +from ..std import TqdmWarning +from .utils_worker import MonoWorker + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['TelegramIO', 'tqdm_telegram', 'ttgrange', 'tqdm', 'trange'] + + +class TelegramIO(MonoWorker): + """Non-blocking file-like IO using a Telegram Bot.""" + API = 'https://api.telegram.org/bot' + + def __init__(self, token, chat_id): + """Creates a new message in the given `chat_id`.""" + super().__init__() + self.token = token + self.chat_id = chat_id + self.session = Session() + self.text = self.__class__.__name__ + self.message_id + + @property + def message_id(self): + if hasattr(self, '_message_id'): + return self._message_id + try: + res = self.session.post( + self.API + '%s/sendMessage' % self.token, + data={'text': '`' + self.text + '`', 'chat_id': self.chat_id, + 'parse_mode': 'MarkdownV2'}).json() + except Exception as e: + tqdm_auto.write(str(e)) + else: + if res.get('error_code') == 429: + warn("Creation rate limit: try increasing `mininterval`.", + TqdmWarning, stacklevel=2) + else: + self._message_id = res['result']['message_id'] + return self._message_id + + def write(self, s): + """Replaces internal `message_id`'s text with `s`.""" + if not s: + s = "..." + s = s.replace('\r', '').strip() + if s == self.text: + return # avoid duplicate message Bot error + message_id = self.message_id + if message_id is None: + return + self.text = s + try: + future = self.submit( + self.session.post, self.API + '%s/editMessageText' % self.token, + data={'text': '`' + s + '`', 'chat_id': self.chat_id, + 'message_id': message_id, 'parse_mode': 'MarkdownV2'}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + def delete(self): + """Deletes internal `message_id`.""" + try: + future = self.submit( + self.session.post, self.API + '%s/deleteMessage' % self.token, + data={'chat_id': self.chat_id, 'message_id': self.message_id}) + except Exception as e: + tqdm_auto.write(str(e)) + else: + return future + + +class tqdm_telegram(tqdm_auto): + """ + Standard `tqdm.auto.tqdm` but also sends updates to a Telegram Bot. + May take a few seconds to create (`__init__`). + + - create a bot + - copy its `{token}` + - add the bot to a chat and send it a message such as `/start` + - go to to find out + the `{chat_id}` + - paste the `{token}` & `{chat_id}` below + + >>> from tqdm.contrib.telegram import tqdm, trange + >>> for i in tqdm(iterable, token='{token}', chat_id='{chat_id}'): + ... ... + """ + def __init__(self, *args, **kwargs): + """ + Parameters + ---------- + token : str, required. Telegram token + [default: ${TQDM_TELEGRAM_TOKEN}]. + chat_id : str, required. Telegram chat ID + [default: ${TQDM_TELEGRAM_CHAT_ID}]. + + See `tqdm.auto.tqdm.__init__` for other parameters. + """ + if not kwargs.get('disable'): + kwargs = kwargs.copy() + self.tgio = TelegramIO( + kwargs.pop('token', getenv('TQDM_TELEGRAM_TOKEN')), + kwargs.pop('chat_id', getenv('TQDM_TELEGRAM_CHAT_ID'))) + super().__init__(*args, **kwargs) + + def display(self, **kwargs): + super().display(**kwargs) + fmt = self.format_dict + if fmt.get('bar_format', None): + fmt['bar_format'] = fmt['bar_format'].replace( + '', '{bar:10u}').replace('{bar}', '{bar:10u}') + else: + fmt['bar_format'] = '{l_bar}{bar:10u}{r_bar}' + self.tgio.write(self.format_meter(**fmt)) + + def clear(self, *args, **kwargs): + super().clear(*args, **kwargs) + if not self.disable: + self.tgio.write("") + + def close(self): + if self.disable: + return + super().close() + if not (self.leave or (self.leave is None and self.pos == 0)): + self.tgio.delete() + + +def ttgrange(*args, **kwargs): + """Shortcut for `tqdm.contrib.telegram.tqdm(range(*args), **kwargs)`.""" + return tqdm_telegram(range(*args), **kwargs) + + +# Aliases +tqdm = tqdm_telegram +trange = ttgrange diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/utils_worker.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/utils_worker.py new file mode 100644 index 0000000000000000000000000000000000000000..89fafc8c92f8ed085077b37eb58329f2588bd5d7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/tqdm/contrib/utils_worker.py @@ -0,0 +1,38 @@ +""" +IO/concurrency helpers for `tqdm.contrib`. +""" +from collections import deque +from concurrent.futures import ThreadPoolExecutor + +from ..auto import tqdm as tqdm_auto + +__author__ = {"github.com/": ["casperdcl"]} +__all__ = ['MonoWorker'] + + +class MonoWorker: + """ + Supports one running task and one waiting task. + The waiting task is the most recent submitted (others are discarded). + """ + def __init__(self): + self.pool = ThreadPoolExecutor(max_workers=1) + self.futures = deque([], 2) + + def submit(self, func, *args, **kwargs): + """`func(*args, **kwargs)` may replace currently waiting task.""" + futures = self.futures + if len(futures) == futures.maxlen: + running = futures.popleft() + if not running.done(): + if len(futures): # clear waiting + waiting = futures.pop() + waiting.cancel() + futures.appendleft(running) # re-insert running + try: + waiting = self.pool.submit(func, *args, **kwargs) + except Exception as e: + tqdm_auto.write(str(e)) + else: + futures.append(waiting) + return waiting diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..297e925f51e9f6774c27b9dae0298442ee8e8be3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/add_new_model_like.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/add_new_model_like.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b6ee94f48e1ae8b210c106142eecaa831223525 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/add_new_model_like.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/chat.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/chat.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..449d931b4df10745446d64671b233bca7d1f96e9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/chat.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/download.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/download.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..81c760141ea93dc6ededbc4ebd1ce71903e68e0e Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/download.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/serve.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/serve.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4cc0396b1cc808d8af1e2071b117120545fd8c20 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/serve.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/system.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/system.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..794ac07d07788927a827c57682a1ecee89c26fed Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/system.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/transformers.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/transformers.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..73d1dacfe389fa1d37014a75094b16e77e8c1f67 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/__pycache__/transformers.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..118d3a9c2012e5b7e9f480928ff6f23e2d10ebd1 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__init__.py @@ -0,0 +1,17 @@ +# Copyright 2025 The HuggingFace Team. All rights reserved. +# +# 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. + +from .model_manager import ModelManager +from .server import build_server +from .utils import Modality diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bebd07c8dceb6801efb3fe3e1fc9a502f6b8345d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/chat_completion.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/chat_completion.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..179efe9a5dbdc7657ffc57566bbfa5ae144b5503 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/chat_completion.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/completion.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/completion.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a32350a5049e395701c522c2b635cb572682adcd Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/completion.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/model_manager.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/model_manager.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e51d5674d51cc9b6b291fa7dacd48304fd89dab3 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/model_manager.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/response.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/response.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..895947d9c9ea068a87df268cbfdafb7ceeb437f2 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/response.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/server.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/server.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1ab1e0bdb9fb68f6e0fbd05516b149af5d371dd7 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/server.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/transcription.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/transcription.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff2c29e0099e0f061e1bddcd8700cd5f92a525ce Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/transcription.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bb9e0445d0c177c2bb4cace848e5b1d0dbc76455 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/chat_completion.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/chat_completion.py new file mode 100644 index 0000000000000000000000000000000000000000..161a25a02f4191cce2d823d87d8417a0a32a4faa --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/chat_completion.py @@ -0,0 +1,427 @@ +# Copyright 2026 The HuggingFace Team. All rights reserved. +# +# 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. +""" +Handler for the /v1/chat/completions endpoint. + +Supports streaming (SSE via DirectStreamer) and non-streaming (JSON) responses. +""" + +import asyncio +import time +from collections.abc import AsyncGenerator +from typing import TYPE_CHECKING + +from ...utils import logging +from ...utils.import_utils import is_serve_available + + +if is_serve_available(): + from fastapi.responses import JSONResponse, StreamingResponse + from openai.types.chat import ChatCompletion, ChatCompletionMessage, ChatCompletionMessageToolCall + from openai.types.chat.chat_completion import Choice + from openai.types.chat.chat_completion_chunk import ChatCompletionChunk, ChoiceDelta, ChoiceDeltaToolCall + from openai.types.chat.chat_completion_chunk import Choice as ChoiceChunk + from openai.types.chat.completion_create_params import CompletionCreateParamsStreaming + from openai.types.completion_usage import CompletionUsage + + +from .utils import ( + BaseGenerateManager, + BaseHandler, + Modality, + _StreamError, + get_tool_call_config, + parse_tool_calls, +) + + +if TYPE_CHECKING: + from transformers import GenerationConfig, PreTrainedModel, PreTrainedTokenizerFast, ProcessorMixin + + +class TransformersCompletionCreateParamsStreaming(CompletionCreateParamsStreaming, total=False): + generation_config: str + seed: int + + +# Fields accepted by the OpenAI schema but not yet supported. +# Receiving these raises an error to avoid silent misbehaviour. +# NOTE: "stop" is NOT in this set — we map it to stop_strings. +UNUSED_CHAT_COMPLETION_FIELDS = { + "audio", + "function_call", + "functions", + "logprobs", + "max_completion_tokens", + "metadata", + "modalities", + "n", + "parallel_tool_calls", + "prediction", + "presence_penalty", + "reasoning_effort", + "response_format", + "service_tier", + "store", + "stream_options", + "tool_choice", + "top_logprobs", + "user", + "web_search_options", +} + + +logger = logging.get_logger(__name__) + + +class ChatCompletionHandler(BaseHandler): + """Handler for the `/v1/chat/completions` endpoint. + + Supports both streaming (SSE) and non-streaming (JSON) responses. + """ + + _valid_params_class = TransformersCompletionCreateParamsStreaming + _unused_fields = UNUSED_CHAT_COMPLETION_FIELDS + + async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse: + """Validate the request, load the model, and dispatch to streaming or non-streaming. + + Args: + body (`dict`): The raw JSON request body (OpenAI chat completion format). + request_id (`str`): Unique request identifier (from header or auto-generated). + + Returns: + `StreamingResponse | JSONResponse`: SSE stream or JSON depending on ``body["stream"]``. + """ + self._validate_request(body) + + model_id, model, processor = self._resolve_model(body) + modality = self.model_manager.get_model_modality(model, processor=processor) + use_cb = self.generation_state.use_continuous_batching(model, modality) + logger.warning(f"[Request received] Model: {model_id}, CB: {use_cb}") + gen_manager = self.generation_state.get_manager(model_id, use_cb=use_cb) + processor_inputs = self.get_processor_inputs_from_messages(body["messages"], modality) + + has_video = any( + c.get("type") == "video" + for msg in processor_inputs + for c in (msg.get("content") if isinstance(msg.get("content"), list) else []) + ) + # Default to 32 frames for video (Gemma 4 default); some processors load all frames otherwise + chat_template_kwargs = {} + if has_video: + chat_template_kwargs["num_frames"] = 32 + inputs = processor.apply_chat_template( + processor_inputs, + add_generation_prompt=True, + tools=body.get("tools"), + return_tensors=None if use_cb else "pt", + return_dict=True, + tokenize=True, + load_audio_from_video=modality == Modality.MULTIMODAL and has_video, + **chat_template_kwargs, + ) + if not use_cb: + inputs = inputs.to(model.device) # type: ignore[union-attr] + + gen_config = self._build_generation_config(body, model.generation_config, use_cb=use_cb) + # TODO: remove when CB supports per-request generation config + if use_cb: + gen_manager.init_cb(model, gen_config) + + tool_config = get_tool_call_config(processor, model) if body.get("tools") else None + + streaming = body.get("stream") + if streaming: + return self._streaming( + request_id, + model, + processor, + model_id, + inputs, + gen_config, + gen_manager=gen_manager, + tool_config=tool_config, + ) + else: + return await self._non_streaming( + request_id, + model, + processor, + model_id, + inputs, + gen_config, + gen_manager=gen_manager, + tool_config=tool_config, + ) + + # ----- streaming ----- + + def _streaming( + self, + request_id: str, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + model_id: str, + inputs: dict, + gen_config: "GenerationConfig", + gen_manager: BaseGenerateManager, + tool_config: dict | None = None, + ) -> StreamingResponse: + """Stream tokens as SSE via DirectStreamer.""" + queue, streamer = gen_manager.generate_streaming( + model, + processor, + inputs, + gen_config, + request_id=request_id, + tool_config=tool_config, + ) + input_ids = inputs["input_ids"] + # CB returns plain lists, regular path returns tensors + input_len = len(input_ids) if isinstance(input_ids, list) else input_ids.shape[-1] + + async def sse_gen() -> AsyncGenerator[str, None]: + try: + yield self._build_chunk_sse(request_id, role="assistant", model=model_id) + + done = False + while not done: + text = await queue.get() + batch = [text] + try: + while True: + batch.append(queue.get_nowait()) + except asyncio.QueueEmpty: + pass + + sse_parts: list[str] = [] + for text in batch: + if text is None: + done = True + break + if isinstance(text, _StreamError): + sse_parts.append(f'data: {{"error": "{text.msg}"}}\n\n') + yield "".join(sse_parts) + return + + sse_parts.append(self._build_chunk_sse(request_id, model=model_id, content=text)) + + if sse_parts: + yield "".join(sse_parts) + + # Tool calls are parsed after generation completes (not during streaming), + # because the full token sequence is needed for reliable parsing. + has_tool_calls = False + if tool_config: + parsed = parse_tool_calls(processor, streamer.generated_token_ids, tool_config["schema"]) + if parsed: + has_tool_calls = True + for i, tc in enumerate(parsed): + yield self._build_chunk_sse( + request_id, + model=model_id, + tool_calls=[ + ChoiceDeltaToolCall( + index=i, + type="function", + id=f"{request_id}_tool_call_{i}", + function={"name": tc["name"], "arguments": tc["arguments"]}, + ) + ], + ) + + hit_max = gen_config.max_new_tokens is not None and streamer.total_tokens >= gen_config.max_new_tokens + if has_tool_calls: + finish_reason = "tool_calls" + elif hit_max: + finish_reason = "length" + else: + finish_reason = "stop" + usage = CompletionUsage( + prompt_tokens=input_len, + completion_tokens=streamer.total_tokens, + total_tokens=input_len + streamer.total_tokens, + ) + yield self._build_chunk_sse( + request_id, + finish_reason=finish_reason, + model=model_id, + usage=usage, + ) + except (GeneratorExit, asyncio.CancelledError): + # Client disconnected — abort generation to free GPU. + # Re-raise is mandatory: Python raises RuntimeError if GeneratorExit is swallowed. + streamer.cancel() + raise + + return StreamingResponse(sse_gen(), media_type="text/event-stream") + + # ----- non-streaming ----- + + async def _non_streaming( + self, + request_id: str, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + model_id: str, + inputs: dict, + gen_config: "GenerationConfig", + gen_manager: BaseGenerateManager, + tool_config: dict | None = None, + ) -> JSONResponse: + """Run generation and return a JSONResponse.""" + content, input_len, generated_ids = await gen_manager.generate_non_streaming( + model, processor, inputs, gen_config, request_id=request_id + ) + + hit_max = gen_config.max_new_tokens is not None and len(generated_ids) >= gen_config.max_new_tokens + completion_tokens = len(generated_ids) + usage = CompletionUsage( + prompt_tokens=input_len, + completion_tokens=completion_tokens, + total_tokens=input_len + completion_tokens, + ) + + tool_calls = None + if tool_config is not None: + parsed = parse_tool_calls(processor, generated_ids, tool_config["schema"]) + if parsed: + tool_calls = [ + ChatCompletionMessageToolCall( + id=f"{request_id}_tool_call_{i}", + type="function", + function={"name": tc["name"], "arguments": tc["arguments"]}, + ) + for i, tc in enumerate(parsed) + ] + + if tool_calls is not None: + finish_reason = "tool_calls" + elif hit_max: + finish_reason = "length" + else: + finish_reason = "stop" + + return JSONResponse( + self._build_completion( + request_id, + content, + model_id, + finish_reason=finish_reason, + usage=usage, + tool_calls=tool_calls, + ), + media_type="application/json", + ) + + # ----- helpers ----- + + def _build_generation_config(self, body: dict, model_generation_config: "GenerationConfig", use_cb: bool = False): + """Apply Chat Completions params (``max_tokens``, ``frequency_penalty``, ``logit_bias``, + ``stop``) on top of the base generation config.""" + generation_config = super()._build_generation_config(body, model_generation_config, use_cb=use_cb) + + if body.get("max_tokens") is not None: + generation_config.max_new_tokens = int(body["max_tokens"]) + if body.get("frequency_penalty") is not None: + generation_config.repetition_penalty = 1.0 + float(body["frequency_penalty"]) + if body.get("logit_bias") is not None: + generation_config.sequence_bias = {(int(k),): v for k, v in body["logit_bias"].items()} + if body.get("stop") is not None: + generation_config.stop_strings = body["stop"] + + return generation_config + + # ----- response builders ----- + + def _build_completion( + self, + request_id: str, + content: str, + model_id: str, + finish_reason: str, + usage: CompletionUsage | None = None, + tool_calls: list[dict] | None = None, + ) -> dict: + """Build a non-streaming ChatCompletion response dict. + + Args: + request_id (`str`): Unique request identifier. + content (`str`): The generated text. + model_id (`str`): Model ID to include in the response. + finish_reason (`str`): Why generation stopped (``"stop"``, ``"length"``, ``"tool_calls"``). + usage (`CompletionUsage`, *optional*): Token usage statistics. + tool_calls (`list[dict]`, *optional*): Parsed tool calls, if any. + + Returns: + `dict`: Serialized ``ChatCompletion`` ready for JSON response. + """ + message = ChatCompletionMessage(content=content, role="assistant", tool_calls=tool_calls) + result = ChatCompletion( + id=request_id, + created=int(time.time()), + object="chat.completion", + model=model_id, + choices=[ + Choice( + index=0, + message=message, + finish_reason=finish_reason, + ) + ], + usage=usage, + ) + return result.model_dump(exclude_none=True) + + def _build_chunk_sse( + self, + request_id: str = "", + content: str | None = None, + model: str | None = None, + role: str | None = None, + finish_reason: str | None = None, + tool_calls: list | None = None, + usage: CompletionUsage | None = None, + ) -> str: + """Build a streaming ``ChatCompletionChunk`` and format it as an SSE ``data:`` line. + + Args: + request_id (`str`): Unique request identifier. + content (`str`, *optional*): Text content delta. + model (`str`, *optional*): Model ID. + role (`str`, *optional*): Role (only sent in the first chunk). + finish_reason (`str`, *optional*): Set on the final chunk. + tool_calls (`list`, *optional*): Tool call deltas. + usage (`CompletionUsage`, *optional*): Token usage (sent with the final chunk). + + Returns: + `str`: A formatted SSE event string. + """ + chunk = ChatCompletionChunk( + id=request_id, + created=int(time.time()), + model=model, + choices=[ + ChoiceChunk( + delta=ChoiceDelta(content=content, role=role, tool_calls=tool_calls), + index=0, + finish_reason=finish_reason, + ) + ], + usage=usage, + system_fingerprint="", + object="chat.completion.chunk", + ) + return self.chunk_to_sse(chunk) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/completion.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/completion.py new file mode 100644 index 0000000000000000000000000000000000000000..52c1f1b8471d0a15405a3bba923c3d15965a5a84 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/completion.py @@ -0,0 +1,275 @@ +# Copyright 2026 The HuggingFace Team. All rights reserved. +# +# 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. +""" +Handler for the /v1/completions endpoint (OpenAI legacy Completions API). + +Accepts a freeform text prompt (no chat template) and returns generated text +in choices[].text. Supports streaming and non-streaming modes, and suffix for +fill-in-the-middle text insertion. +""" + +import asyncio +import time +from collections.abc import AsyncGenerator +from typing import TYPE_CHECKING + +from ...utils import logging +from ...utils.import_utils import is_serve_available + + +if is_serve_available(): + from fastapi import HTTPException + from fastapi.responses import JSONResponse, StreamingResponse + from openai.types import Completion, CompletionChoice, CompletionUsage + from openai.types.completion_create_params import CompletionCreateParamsBase + + +from .utils import BaseGenerateManager, BaseHandler, _StreamError + + +if TYPE_CHECKING: + from transformers import GenerationConfig, PreTrainedModel, PreTrainedTokenizerFast, ProcessorMixin + + +class TransformersTextCompletionCreateParams(CompletionCreateParamsBase, total=False): + generation_config: str + seed: int + stream: bool + + +# Fields accepted by the OpenAI schema but not yet supported. +UNUSED_LEGACY_COMPLETION_FIELDS = { + "best_of", + "echo", + "logprobs", + "n", + "presence_penalty", + "stream_options", + "user", +} + + +logger = logging.get_logger(__name__) + + +class CompletionHandler(BaseHandler): + """Handler for the `/v1/completions` endpoint. + + Takes a raw text ``prompt`` (no chat template) and generates text returned in + ``choices[].text``. Supports streaming (SSE) and non-streaming (JSON) responses, + and ``suffix`` for fill-in-the-middle insertion. + """ + + _valid_params_class = TransformersTextCompletionCreateParams + _unused_fields = UNUSED_LEGACY_COMPLETION_FIELDS + + async def handle_request(self, body: dict, request_id: str) -> "StreamingResponse | JSONResponse": + """Validate the request, load the model, and dispatch to streaming or non-streaming. + + Args: + body (`dict`): The raw JSON request body (OpenAI legacy completions format). + request_id (`str`): Unique request identifier (from header or auto-generated). + + Returns: + `StreamingResponse | JSONResponse`: SSE stream or JSON depending on ``body["stream"]``. + """ + self._validate_request(body) + + prompt = body.get("prompt", "") + if not isinstance(prompt, str): + raise HTTPException(status_code=400, detail="prompt must be a string.") + + model_id, model, processor = self._resolve_model(body) + modality = self.model_manager.get_model_modality(model, processor=processor) + use_cb = self.generation_state.use_continuous_batching(model, modality) + logger.warning(f"[Request received] Model: {model_id}, CB: {use_cb}") + gen_manager = self.generation_state.get_manager(model_id, use_cb=use_cb) + + tokenizer = getattr(processor, "tokenizer", processor) + inputs = tokenizer(prompt, return_tensors=None if use_cb else "pt") + if not use_cb: + inputs = inputs.to(model.device) + + gen_config = self._build_generation_config(body, model.generation_config, use_cb=use_cb) + if use_cb: + gen_manager.init_cb(model, gen_config) + + suffix = body.get("suffix") + streaming = body.get("stream") + + if streaming: + return self._streaming(request_id, model, processor, model_id, inputs, gen_config, gen_manager, suffix) + else: + return await self._non_streaming( + request_id, model, processor, model_id, inputs, gen_config, gen_manager, suffix + ) + + # ----- streaming ----- + + def _streaming( + self, + request_id: str, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + model_id: str, + inputs: dict, + gen_config: "GenerationConfig", + gen_manager: BaseGenerateManager, + suffix: str | None = None, + ) -> "StreamingResponse": + """Stream tokens as SSE.""" + queue, streamer = gen_manager.generate_streaming(model, processor, inputs, gen_config, request_id=request_id) + input_ids = inputs["input_ids"] + input_len = len(input_ids) if isinstance(input_ids, list) else input_ids.shape[-1] + + async def sse_gen() -> AsyncGenerator[str, None]: + try: + done = False + while not done: + text = await queue.get() + batch = [text] + try: + while True: + batch.append(queue.get_nowait()) + except asyncio.QueueEmpty: + pass + + sse_parts: list[str] = [] + for text in batch: + if text is None: + done = True + break + if isinstance(text, _StreamError): + sse_parts.append(f'data: {{"error": "{text.msg}"}}\n\n') + yield "".join(sse_parts) + return + + sse_parts.append(self._build_chunk_sse(request_id, model_id, text=text)) + + if sse_parts: + yield "".join(sse_parts) + + hit_max = gen_config.max_new_tokens is not None and streamer.total_tokens >= gen_config.max_new_tokens + finish_reason = "length" if hit_max else "stop" + + if suffix is not None: + yield self._build_chunk_sse(request_id, model_id, text=suffix) + usage = CompletionUsage( + prompt_tokens=input_len, + completion_tokens=streamer.total_tokens, + total_tokens=input_len + streamer.total_tokens, + ) + yield self._build_chunk_sse(request_id, model_id, finish_reason=finish_reason, usage=usage) + except (GeneratorExit, asyncio.CancelledError): + streamer.cancel() + raise + + return StreamingResponse(sse_gen(), media_type="text/event-stream") + + # ----- non-streaming ----- + + async def _non_streaming( + self, + request_id: str, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + model_id: str, + inputs: dict, + gen_config: "GenerationConfig", + gen_manager: BaseGenerateManager, + suffix: str | None = None, + ) -> "JSONResponse": + """Run generation and return a JSONResponse.""" + text, input_len, generated_ids = await gen_manager.generate_non_streaming( + model, processor, inputs, gen_config, request_id=request_id + ) + + if suffix is not None: + text = text + suffix + + completion_tokens = len(generated_ids) + hit_max = gen_config.max_new_tokens is not None and completion_tokens >= gen_config.max_new_tokens + finish_reason = "length" if hit_max else "stop" + + usage = CompletionUsage( + prompt_tokens=input_len, + completion_tokens=completion_tokens, + total_tokens=input_len + completion_tokens, + ) + + result = Completion( + id=request_id, + created=int(time.time()), + model=model_id, + choices=[ + CompletionChoice( + text=text, + index=0, + logprobs=None, + finish_reason=finish_reason, + ) + ], + object="text_completion", + usage=usage, + ) + + return JSONResponse(result.model_dump(exclude_none=True), media_type="application/json") + + # ----- helpers ----- + + def _build_chunk_sse( + self, + request_id: str, + model_id: str, + text: str = "", + finish_reason: str | None = None, + usage: "CompletionUsage | None" = None, + ) -> str: + """Build a streaming ``Completion`` chunk and format it as an SSE ``data:`` line. + + Uses ``model_construct`` to bypass pydantic validation so that ``finish_reason`` + can be ``None`` for mid-stream chunks (the OpenAI SDK's ``CompletionChoice`` only + accepts literal values). + """ + chunk = Completion.model_construct( + id=request_id, + object="text_completion", + created=int(time.time()), + model=model_id, + choices=[ + CompletionChoice.model_construct( + text=text, + index=0, + logprobs=None, + finish_reason=finish_reason, + ) + ], + usage=usage, + ) + return self.chunk_to_sse(chunk) + + # ----- generation config ----- + + def _build_generation_config(self, body: dict, model_generation_config: "GenerationConfig", use_cb: bool = False): + """Apply legacy completion params (``max_tokens``, ``frequency_penalty``, ``stop``) on top of base config.""" + generation_config = super()._build_generation_config(body, model_generation_config, use_cb=use_cb) + + if body.get("max_tokens") is not None: + generation_config.max_new_tokens = int(body["max_tokens"]) + if body.get("frequency_penalty") is not None: + generation_config.repetition_penalty = 1.0 + float(body["frequency_penalty"]) + if body.get("stop") is not None: + generation_config.stop_strings = body["stop"] + + return generation_config diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/model_manager.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/model_manager.py new file mode 100644 index 0000000000000000000000000000000000000000..826199ee4b0185c227671380fabb27fca74332ca --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/model_manager.py @@ -0,0 +1,469 @@ +# Copyright 2026 The HuggingFace Team. All rights reserved. +# +# 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. +""" +Model loading, caching, and lifecycle management. +""" + +import asyncio +import gc +import json +import threading +from collections.abc import Callable +from functools import lru_cache +from typing import TYPE_CHECKING + +from huggingface_hub import scan_cache_dir +from tqdm import tqdm + +import transformers +from transformers import BitsAndBytesConfig, PreTrainedTokenizerBase + +from ...utils import logging +from .utils import Modality, make_progress_tqdm_class, reset_torch_cache + + +if TYPE_CHECKING: + from transformers import PreTrainedModel, PreTrainedTokenizerFast, ProcessorMixin + + +logger = logging.get_logger(__name__) + + +class TimedModel: + """Wraps a model + processor and auto-unloads them after a period of inactivity. + + Args: + model: The loaded model. + timeout_seconds: Seconds of inactivity before auto-unload. Use -1 to disable. + processor: The associated processor or tokenizer. + on_unload: Optional callback invoked after the model is unloaded from memory. + """ + + def __init__( + self, + model: "PreTrainedModel", + timeout_seconds: int, + processor: "ProcessorMixin | PreTrainedTokenizerFast | None" = None, + on_unload: "Callable | None" = None, + ): + self.model = model + self._name_or_path = str(model.name_or_path) + self.processor = processor + self.timeout_seconds = timeout_seconds + self._on_unload = on_unload + self._timer = threading.Timer(self.timeout_seconds, self._timeout_reached) + self._timer.start() + + def reset_timer(self) -> None: + """Reset the inactivity timer (called on each request).""" + self._timer.cancel() + self._timer = threading.Timer(self.timeout_seconds, self._timeout_reached) + self._timer.start() + + def delete_model(self) -> None: + """Delete the model and processor, free GPU memory.""" + if hasattr(self, "model") and self.model is not None: + del self.model + del self.processor + self.model = None + self.processor = None + gc.collect() + reset_torch_cache() + self._timer.cancel() + if self._on_unload is not None: + self._on_unload() + + def _timeout_reached(self) -> None: + if self.timeout_seconds > 0: + self.delete_model() + logger.info(f"{self._name_or_path} was removed from memory after {self.timeout_seconds}s of inactivity") + + +class ModelManager: + """Loads, caches, and manages the lifecycle of models. + + Handlers receive a reference to this and call `load_model_and_processor()` + to get a model ready for inference. + + Args: + device: Device to place models on (e.g. "auto", "cuda", "cpu"). + dtype: Torch dtype override. "auto" derives from model weights. + trust_remote_code: Whether to trust remote code when loading models. + attn_implementation: Attention implementation override (e.g. "flash_attention_2"). + quantization: Quantization method ("bnb-4bit" or "bnb-8bit"). + model_timeout: Seconds before an idle model is unloaded. -1 disables. + force_model: If set, preload this model at init time. + """ + + def __init__( + self, + device: str = "auto", + dtype: str | None = "auto", + trust_remote_code: bool = False, + attn_implementation: str | None = None, + quantization: str | None = None, + model_timeout: int = 300, + force_model: str | None = None, + ): + self.loaded_models: dict[str, TimedModel] = {} + + # Thread-safety for concurrent load_model_and_processor calls + self._model_locks: dict[str, threading.Lock] = {} + self._model_locks_guard = threading.Lock() + + # Tracks in-flight loads for fan-out to multiple SSE subscribers (used by load_model_streaming) + self._loading_subscribers: dict[str, list[asyncio.Queue[str | None]]] = {} + self._loading_tasks: dict[str, asyncio.Task] = {} + + # Convert numeric device strings (e.g. "0") to int so device_map works correctly + self.device = int(device) if device.isdigit() else device + self.dtype = self._resolve_dtype(dtype) + self.trust_remote_code = trust_remote_code + self.attn_implementation = attn_implementation + self.quantization = quantization + self.model_timeout = model_timeout + self.force_model = force_model + + self._validate_args() + + # Preloaded models should never be auto-unloaded + if force_model is not None: + self.model_timeout = -1 + + # Preload the forced model after all state is initialized + if force_model is not None: + self.load_model_and_processor(self.process_model_name(force_model)) + + @staticmethod + def _resolve_dtype(dtype: str | None): + import torch + + if dtype in ("auto", None): + return dtype + resolved = getattr(torch, dtype, None) + if not isinstance(resolved, torch.dtype): + raise ValueError( + f"Unsupported dtype: '{dtype}'. Must be 'auto' or a valid torch dtype (e.g. 'float16', 'bfloat16')." + ) + return resolved + + def _validate_args(self): + if self.quantization is not None and self.quantization not in ("bnb-4bit", "bnb-8bit"): + raise ValueError( + f"Unsupported quantization method: '{self.quantization}'. Must be 'bnb-4bit' or 'bnb-8bit'." + ) + VALID_ATTN_IMPLEMENTATIONS = {"eager", "sdpa", "flash_attention_2", "flash_attention_3", "flex_attention"} + is_kernels_community = self.attn_implementation is not None and self.attn_implementation.startswith( + "kernels-community/" + ) + if ( + self.attn_implementation is not None + and not is_kernels_community + and self.attn_implementation not in VALID_ATTN_IMPLEMENTATIONS + ): + raise ValueError( + f"Unsupported attention implementation: '{self.attn_implementation}'. " + f"Must be one of {VALID_ATTN_IMPLEMENTATIONS} or a kernels-community kernel (e.g. 'kernels-community/flash-attn2')." + ) + + @staticmethod + def process_model_name(model_id: str) -> str: + """Canonicalize to `'model_id@revision'` format. Defaults to `@main`.""" + if "@" in model_id: + return model_id + return f"{model_id}@main" + + def get_quantization_config(self) -> BitsAndBytesConfig | None: + """Return a BitsAndBytesConfig based on the `quantization` setting, or None.""" + if self.quantization == "bnb-4bit": + return BitsAndBytesConfig( + load_in_4bit=True, + bnb_4bit_quant_type="nf4", + bnb_4bit_use_double_quant=True, + ) + elif self.quantization == "bnb-8bit": + return BitsAndBytesConfig(load_in_8bit=True) + return None + + def _load_processor(self, model_id_and_revision: str) -> "ProcessorMixin | PreTrainedTokenizerFast": + """Load a processor for the given model. + + Args: + model_id_and_revision: Model ID in ``'model_id@revision'`` format. + """ + from transformers import AutoProcessor + + model_id, revision = model_id_and_revision.split("@", 1) + return AutoProcessor.from_pretrained(model_id, revision=revision, trust_remote_code=self.trust_remote_code) + + def _load_model( + self, model_id_and_revision: str, tqdm_class: type | None = None, progress_callback: Callable | None = None + ) -> "PreTrainedModel": + """Load a model. + + Args: + model_id_and_revision (`str`): Model ID in ``'model_id@revision'`` format. + tqdm_class (*optional*): tqdm subclass for progress bars during ``from_pretrained``. + progress_callback (`Callable`, *optional*): Called with progress dicts during loading. + + Returns: + `PreTrainedModel`: The loaded model. + """ + from transformers import AutoConfig + + model_id, revision = model_id_and_revision.split("@", 1) + + model_kwargs = { + "revision": revision, + "attn_implementation": self.attn_implementation, + "dtype": self.dtype, + "device_map": self.device, + "trust_remote_code": self.trust_remote_code, + "quantization_config": self.get_quantization_config(), + "tqdm_class": tqdm_class, + } + + if progress_callback is not None: + progress_callback({"status": "loading", "model": model_id_and_revision, "stage": "config"}) + config = AutoConfig.from_pretrained(model_id, **model_kwargs) + + from transformers.models.auto.modeling_auto import MODEL_FOR_MULTIMODAL_LM_MAPPING_NAMES + + if config.model_type in MODEL_FOR_MULTIMODAL_LM_MAPPING_NAMES: + from transformers import AutoModelForMultimodalLM + + return AutoModelForMultimodalLM.from_pretrained(model_id, **model_kwargs) + + architecture = getattr(transformers, config.architectures[0]) + return architecture.from_pretrained(model_id, **model_kwargs) + + def load_model_and_processor( + self, + model_id_and_revision: str, + progress_callback: Callable | None = None, + tqdm_class: type | None = None, + ) -> "tuple[PreTrainedModel, ProcessorMixin | PreTrainedTokenizerFast]": + """Load a model (or return it from cache), resetting its inactivity timer. + + Args: + model_id_and_revision: Model ID in ``'model_id@revision'`` format. + progress_callback: If provided, called with dicts like + ``{"status": "loading", "model": ..., "stage": ...}`` during loading. + tqdm_class: Optional tqdm subclass for progress bars during ``from_pretrained``. + """ + # Per-model lock prevents duplicate loads when concurrent requests arrive + with self._model_locks_guard: + lock = self._model_locks.setdefault(model_id_and_revision, threading.Lock()) + + with lock: + if model_id_and_revision not in self.loaded_models: + logger.warning(f"Loading {model_id_and_revision}") + if progress_callback is not None: + progress_callback({"status": "loading", "model": model_id_and_revision, "stage": "processor"}) + processor = self._load_processor(model_id_and_revision) + model = self._load_model( + model_id_and_revision, tqdm_class=tqdm_class, progress_callback=progress_callback + ) + self.loaded_models[model_id_and_revision] = TimedModel( + model, + timeout_seconds=self.model_timeout, + processor=processor, + on_unload=lambda key=model_id_and_revision: self.loaded_models.pop(key, None), + ) + if progress_callback is not None: + progress_callback({"status": "ready", "model": model_id_and_revision, "cached": False}) + else: + self.loaded_models[model_id_and_revision].reset_timer() + model = self.loaded_models[model_id_and_revision].model + processor = self.loaded_models[model_id_and_revision].processor + if progress_callback is not None: + progress_callback({"status": "ready", "model": model_id_and_revision, "cached": True}) + return model, processor + + async def load_model_streaming(self, model_id_and_revision: str): + """Load a model and stream progress as SSE events. + + Handles three cases: + 1. Model already cached → single ``ready`` event + 2. Load already in progress → join existing subscriber stream + 3. First request → start loading, broadcast to all subscribers + + Args: + model_id_and_revision (`str`): Model ID in ``'model_id@revision'`` format. + + Yields: + `str`: SSE ``data: ...`` lines with progress updates. + """ + mid = model_id_and_revision + queue: asyncio.Queue[str | None] = asyncio.Queue() + + # Case 1: already cached + if mid in self.loaded_models: + self.loaded_models[mid].reset_timer() + yield f"data: {json.dumps({'status': 'ready', 'model': mid, 'cached': True})}\n\n" + return + + # Case 2: load in progress — join existing subscribers + if mid in self._loading_tasks: + self._loading_subscribers[mid].append(queue) + while True: + item = await queue.get() + if item is None: + break + yield item + return + + # Case 3: first request — start the load + self._loading_subscribers[mid] = [queue] + loop = asyncio.get_running_loop() + + def enqueue(payload: dict): + msg = f"data: {json.dumps(payload)}\n\n" + + def broadcast(): + for q in self._loading_subscribers.get(mid, []): + q.put_nowait(msg) + + loop.call_soon_threadsafe(broadcast) + + tqdm_class = make_progress_tqdm_class(enqueue, mid) + + def _tqdm_hook(factory, args, kwargs): + return tqdm_class(*args, **kwargs) + + async def run_load(): + try: + # Install a global tqdm hook so the "Loading weights" bar in + # core_model_loading.py (which uses logging.tqdm) routes through + # our ProgressTqdm. The tqdm_class kwarg only covers download bars. + previous_hook = logging.set_tqdm_hook(_tqdm_hook) + try: + await asyncio.to_thread( + self.load_model_and_processor, + mid, + progress_callback=enqueue, + tqdm_class=tqdm_class, + ) + finally: + logging.set_tqdm_hook(previous_hook) + except Exception as e: + logger.error(f"Failed to load {mid}: {e}", exc_info=True) + enqueue({"status": "error", "model": mid, "message": str(e)}) + finally: + + def _send_sentinel(): + for q in self._loading_subscribers.pop(mid, []): + q.put_nowait(None) + self._loading_tasks.pop(mid, None) + + loop.call_soon_threadsafe(_send_sentinel) + + self._loading_tasks[mid] = asyncio.create_task(run_load()) + + while True: + item = await queue.get() + if item is None: + break + yield item + + def shutdown(self) -> None: + """Delete all loaded models and free resources.""" + for timed in list(self.loaded_models.values()): + timed.delete_model() + + @staticmethod + def get_model_modality( + model: "PreTrainedModel", processor: "ProcessorMixin | PreTrainedTokenizerFast | None" = None + ) -> Modality: + """Detect whether a model is an LLM or VLM based on its architecture. + + Args: + model (`PreTrainedModel`): The loaded model. + processor (`ProcessorMixin | PreTrainedTokenizerFast`, *optional*): + If a plain tokenizer (not a multi-modal processor), short-circuits to LLM. + + Returns: + `Modality`: The detected modality (``Modality.LLM``, ``Modality.VLM``, or ``Modality.MULTIMODAL``). + """ + if processor is not None and isinstance(processor, PreTrainedTokenizerBase): + return Modality.LLM + + from transformers.models.auto.modeling_auto import ( + MODEL_FOR_CAUSAL_LM_MAPPING_NAMES, + MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES, + MODEL_FOR_MULTIMODAL_LM_MAPPING_NAMES, + ) + + model_classname = model.__class__.__name__ + if model_classname in MODEL_FOR_MULTIMODAL_LM_MAPPING_NAMES.values(): + return Modality.MULTIMODAL + elif model_classname in MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES.values(): + return Modality.VLM + elif model_classname in MODEL_FOR_CAUSAL_LM_MAPPING_NAMES.values(): + return Modality.LLM + else: + raise ValueError(f"Unknown modality for: {model_classname}") + + @staticmethod + @lru_cache + def get_gen_models(cache_dir: str | None = None) -> list[dict]: + """List generative models (LLMs and VLMs) available in the HuggingFace cache. + + Args: + cache_dir (`str`, *optional*): Path to the HuggingFace cache directory. + Defaults to the standard cache location. + + Returns: + `list[dict]`: OpenAI-compatible model list entries with ``id``, ``object``, etc. + """ + from transformers.models.auto.modeling_auto import ( + MODEL_FOR_CAUSAL_LM_MAPPING_NAMES, + MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES, + MODEL_FOR_MULTIMODAL_LM_MAPPING_NAMES, + ) + + generative_models = [] + logger.warning("Scanning the cache directory for LLMs and VLMs.") + + for repo in tqdm(scan_cache_dir(cache_dir).repos): + if repo.repo_type != "model": + continue + + for ref, revision_info in repo.refs.items(): + config_path = next((f.file_path for f in revision_info.files if f.file_name == "config.json"), None) + if not config_path: + continue + + config = json.loads(config_path.open().read()) + if not (isinstance(config, dict) and "architectures" in config): + continue + + architectures = config["architectures"] + llms = MODEL_FOR_CAUSAL_LM_MAPPING_NAMES.values() + vlms = MODEL_FOR_IMAGE_TEXT_TO_TEXT_MAPPING_NAMES.values() + multimodal = MODEL_FOR_MULTIMODAL_LM_MAPPING_NAMES.values() + + if any(arch for arch in architectures if arch in [*llms, *vlms, *multimodal]): + author = repo.repo_id.split("/") if "/" in repo.repo_id else "" + repo_handle = repo.repo_id + (f"@{ref}" if ref != "main" else "") + generative_models.append( + { + "owned_by": author, + "id": repo_handle, + "object": "model", + "created": repo.last_modified, + } + ) + + return generative_models diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/response.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/response.py new file mode 100644 index 0000000000000000000000000000000000000000..4d29dfd1d6a288f8247f71cb8b4a935eb43b0c8d --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/response.py @@ -0,0 +1,645 @@ +# Copyright 2026 The HuggingFace Team. All rights reserved. +# +# 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. +""" +Handler for the /v1/responses endpoint (OpenAI Responses API). + +Supports streaming (SSE) and non-streaming (JSON) responses. +""" + +import asyncio +import time +from collections.abc import AsyncGenerator +from typing import TYPE_CHECKING + +from ...utils import logging +from ...utils.import_utils import is_serve_available + + +if is_serve_available(): + from fastapi import HTTPException + from fastapi.responses import JSONResponse, StreamingResponse + from openai.types.responses import ( + Response, + ResponseCompletedEvent, + ResponseContentPartAddedEvent, + ResponseContentPartDoneEvent, + ResponseCreatedEvent, + ResponseError, + ResponseErrorEvent, + ResponseFailedEvent, + ResponseFunctionCallArgumentsDoneEvent, + ResponseFunctionToolCall, + ResponseInProgressEvent, + ResponseOutputItemAddedEvent, + ResponseOutputItemDoneEvent, + ResponseOutputMessage, + ResponseOutputText, + ResponseTextDeltaEvent, + ResponseTextDoneEvent, + ) + from openai.types.responses.response_create_params import ResponseCreateParamsStreaming + from openai.types.responses.response_usage import InputTokensDetails, OutputTokensDetails, ResponseUsage + + +from .utils import ( + BaseGenerateManager, + BaseHandler, + Modality, + _StreamError, + get_tool_call_config, + parse_tool_calls, +) + + +if TYPE_CHECKING: + from transformers import GenerationConfig, PreTrainedModel, PreTrainedTokenizerFast, ProcessorMixin + + +logger = logging.get_logger(__name__) + + +class TransformersResponseCreateParamsStreaming(ResponseCreateParamsStreaming, total=False): + generation_config: str + seed: int + + +UNUSED_RESPONSE_FIELDS = { + "background", + "include", + "max_tool_calls", + "previous_response_id", + "prompt", + "reasoning", + "service_tier", + "store", + "text", + "tool_choice", + "top_logprobs", + "truncation", + "user", +} + + +class ResponseHandler(BaseHandler): + """Handler for the ``/v1/responses`` endpoint.""" + + _valid_params_class = TransformersResponseCreateParamsStreaming + _unused_fields = UNUSED_RESPONSE_FIELDS + + async def handle_request(self, body: dict, request_id: str) -> StreamingResponse | JSONResponse: + """Validate, load model, dispatch to streaming or non-streaming. + + Args: + body (`dict`): The raw JSON request body (OpenAI Responses API format). + request_id (`str`): Unique request identifier (from header or auto-generated). + + Returns: + `StreamingResponse | JSONResponse`: SSE stream or JSON depending on ``body["stream"]``. + """ + self._validate_request(body) + + model_id, model, processor = self._resolve_model(body) + modality = self.model_manager.get_model_modality(model, processor=processor) + use_cb = self.generation_state.use_continuous_batching(model, modality) + logger.warning(f"[Request received] Model: {model_id}, CB: {use_cb}") + gen_manager = self.generation_state.get_manager(model_id, use_cb=use_cb) + + # Two-step input conversion (chat completions skips step 1 since messages are already standard): + # 1. Normalize Responses API input (string/list/dict + instructions) → standard messages list + # 2. Transform message content for the HF processor (VLM image handling, text joining, etc.) + messages = self._normalize_input(body) + processor_inputs = self.get_processor_inputs_from_messages(messages, modality) + + has_video = any( + c.get("type") == "video" + for msg in processor_inputs + for c in (msg.get("content") if isinstance(msg.get("content"), list) else []) + ) + + # Default to 32 frames for video (Gemma 4 default); some processors load all frames otherwise + chat_template_kwargs = {} + if has_video: + chat_template_kwargs["num_frames"] = 32 + # updates the flat tool structure to the one expected by the `apply_chat_template` method. + tools = self._normalize_tools(body.get("tools")) + inputs = processor.apply_chat_template( + processor_inputs, + add_generation_prompt=True, + tools=tools, + return_tensors=None if use_cb else "pt", + return_dict=True, + tokenize=True, + load_audio_from_video=modality == Modality.MULTIMODAL and has_video, + **chat_template_kwargs, + ) + if not use_cb: + inputs = inputs.to(model.device) # type: ignore[union-attr] + + gen_config = self._build_generation_config(body, model.generation_config, use_cb=use_cb) + # TODO: remove when CB supports per-request generation config + if use_cb: + gen_manager.init_cb(model, gen_config) + tool_config = get_tool_call_config(processor, model) if body.get("tools") else None + + streaming = body.get("stream", True) + if streaming: + return self._streaming( + request_id, + model, + processor, + model_id, + body, + inputs, + gen_config, + gen_manager=gen_manager, + tool_config=tool_config, + ) + else: + return await self._non_streaming( + request_id, + model, + processor, + model_id, + body, + inputs, + gen_config, + gen_manager=gen_manager, + tool_config=tool_config, + ) + + # ----- input conversion ----- + + @staticmethod + def _normalize_tools(tools: list[dict] | None) -> list[dict] | None: + """Normalize Responses API tool definitions for ``apply_chat_template``. + + The Responses API uses a flat format: ``{"type": "function", "name": ..., "parameters": ...}`` + while ``apply_chat_template`` expects a nested format: + ``{"type": "function", "function": {"name": ..., "parameters": ...}}``. + Already-nested tools are passed through unchanged. + """ + if not tools: + return tools + return [ + {"type": "function", "function": {k: v for k, v in t.items() if k != "type"}} if "function" not in t else t + for t in tools + ] + + @staticmethod + def _normalize_input(body: dict) -> list[dict]: + """Normalize the Responses API ``input`` field into chat messages. + + The Responses API accepts multiple input formats. This method converts them + into a structure close to what ``apply_chat_template`` expects (messages with + ``role``, ``content``, ``tool_calls``, ``tool_call_id``). Further processing + is done by ``get_processor_inputs_from_messages``. + + NOTE: if this conversion logic grows too complex, consider having separate + ``get_processor_inputs_from_messages`` implementations for chat completions + and the Responses API instead of funneling both through the same path. + + Formats handled: + - **String** → single user message. + - **Flat content list** (``input_text``, ``input_image``, no ``role``) → user message. + - **Multi-turn list** — messages and tool call items (``function_call``, + ``function_call_output``) from a previous response, converted via + :meth:`_normalize_response_items`. + + If ``instructions`` is present, it is prepended as a system message. + """ + inp = body["input"] + instructions = body.get("instructions") + + if isinstance(inp, str): + messages = [{"role": "user", "content": inp}] + elif isinstance(inp, list): + if inp and "role" not in inp[0]: + # Flat content list (single-turn, e.g. input_text/input_image) + messages = [{"role": "user", "content": inp}] + else: + messages = ResponseHandler._normalize_response_items(inp) + else: + raise HTTPException(status_code=422, detail="'input' must be a string or list") + + # Prepend instructions as a system message + if instructions: + if messages and messages[0]["role"] == "system": + messages[0]["content"] = instructions + else: + messages.insert(0, {"role": "system", "content": instructions}) + + return messages + + @staticmethod + def _normalize_response_items(items: list[dict]) -> list[dict]: + """Convert a list of Responses API items into chat messages. + + Input items may be a mix of: + - Messages (``EasyInputMessageParam`` with ``role``, or ``type: "message"``). + - ``function_call`` — merged as ``tool_calls`` onto the preceding assistant message. + - ``function_call_output`` — converted to ``role: "tool"`` messages. + """ + messages = [] + + for item in items: + item_type = item.get("type") + + if "role" in item: + messages.append({"role": item["role"], "content": item.get("content", "")}) + + elif item_type == "function_call": + tc = { + "id": item["call_id"], + "function": {"name": item["name"], "arguments": item["arguments"]}, + } + if messages and messages[-1]["role"] == "assistant": + messages[-1].setdefault("tool_calls", []).append(tc) + else: + messages.append({"role": "assistant", "tool_calls": [tc]}) + + elif item_type == "function_call_output": + messages.append( + { + "role": "tool", + "tool_call_id": item["call_id"], + "content": item["output"], + } + ) + + else: + raise HTTPException(status_code=422, detail=f"Unsupported input item type: {item_type!r}") + + return messages + + # ----- streaming ----- + + def _streaming( + self, + request_id: str, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + model_id: str, + body: dict, + inputs: dict, + gen_config: "GenerationConfig", + gen_manager: BaseGenerateManager, + tool_config: dict | None = None, + ) -> StreamingResponse: + """Generate a streaming Responses API reply (SSE) using DirectStreamer.""" + queue, streamer = gen_manager.generate_streaming( + model, + processor, + inputs, + gen_config, + request_id=request_id, + tool_config=tool_config, + ) + input_ids = inputs["input_ids"] + # CB returns plain lists, regular path returns tensors + input_len = len(input_ids) if isinstance(input_ids, list) else input_ids.shape[-1] + + seq = 0 + output_index = 0 + created_at = time.time() + resp_id = f"resp_{request_id}" + msg_id = f"msg_{request_id}" + + response_base = { + "id": resp_id, + "created_at": created_at, + "model": model_id, + "object": "response", + # Required by pydantic but not used — echo request config back + "tools": [], + "parallel_tool_calls": body.get("parallel_tool_calls", False), + "tool_choice": "auto", + } + + async def event_stream() -> AsyncGenerator[str, None]: + nonlocal seq, output_index + + try: + # 1. Created + In progress + yield self.chunk_to_sse( + ResponseCreatedEvent( + type="response.created", + sequence_number=seq, + response=Response(**response_base, status="queued", output=[]), + ) + ) + seq += 1 + yield self.chunk_to_sse( + ResponseInProgressEvent( + type="response.in_progress", + sequence_number=seq, + response=Response(**response_base, status="in_progress", output=[]), + ) + ) + seq += 1 + + # 2. Output item added (message) + yield self.chunk_to_sse( + ResponseOutputItemAddedEvent( + type="response.output_item.added", + sequence_number=seq, + output_index=output_index, + item=ResponseOutputMessage( + id=msg_id, + type="message", + status="in_progress", + role="assistant", + content=[], + ), + ) + ) + seq += 1 + + # 3. Content part added + yield self.chunk_to_sse( + ResponseContentPartAddedEvent( + type="response.content_part.added", + item_id=msg_id, + sequence_number=seq, + output_index=output_index, + content_index=0, + part=ResponseOutputText(type="output_text", text="", annotations=[]), + ) + ) + seq += 1 + + # 4. Stream tokens — drain queue to batch HTTP writes + full_text = "" + tool_calls = [] + done = False + + while not done: + text = await queue.get() + # Drain all available tokens for one batched HTTP write + batch = [text] + try: + while True: + batch.append(queue.get_nowait()) + except asyncio.QueueEmpty: + pass + + sse_parts: list[str] = [] + for text in batch: + if text is None: + done = True + break + if isinstance(text, _StreamError): + logger.error(f"Exception in response generation: {text.msg}") + sse_parts.append( + self.chunk_to_sse( + ResponseErrorEvent(type="error", sequence_number=seq, message=text.msg) + ) + ) + seq += 1 + sse_parts.append( + self.chunk_to_sse( + ResponseFailedEvent( + type="response.failed", + sequence_number=seq, + response=Response( + **response_base, + status="failed", + output=[], + error=ResponseError(code="server_error", message=text.msg), + ), + ) + ) + ) + yield "".join(sse_parts) + return + + full_text += text + sse_parts.append( + self.chunk_to_sse( + ResponseTextDeltaEvent( + type="response.output_text.delta", + item_id=msg_id, + sequence_number=seq, + output_index=0, + content_index=0, + delta=text, + logprobs=[], + ) + ) + ) + seq += 1 + + if sse_parts: + yield "".join(sse_parts) + + # 5. Tool calls are parsed after generation completes (not during streaming), + # because the full token sequence is needed for reliable parsing. + if tool_config: + parsed = parse_tool_calls(processor, streamer.generated_token_ids, tool_config["schema"]) + if parsed: + for i, tc in enumerate(parsed): + tc_id = f"{request_id}_tool_call_{i}" + tc_item = ResponseFunctionToolCall( + id=tc_id, + call_id=tc_id, + type="function_call", + name=tc["name"], + arguments=tc["arguments"], + status="completed", + ) + tool_calls.append(tc_item) + output_index += 1 + yield self.chunk_to_sse( + ResponseOutputItemAddedEvent( + type="response.output_item.added", + sequence_number=seq, + output_index=output_index, + item=tc_item, + ) + ) + seq += 1 + yield self.chunk_to_sse( + ResponseFunctionCallArgumentsDoneEvent( + type="response.function_call_arguments.done", + sequence_number=seq, + item_id=tc_id, + output_index=output_index, + arguments=tc["arguments"], + name=tc["name"], + ) + ) + seq += 1 + yield self.chunk_to_sse( + ResponseOutputItemDoneEvent( + type="response.output_item.done", + sequence_number=seq, + output_index=output_index, + item=tc_item, + ) + ) + seq += 1 + + # 6. Close text output + output_text_part = ResponseOutputText(type="output_text", text=full_text, annotations=[]) + yield self.chunk_to_sse( + ResponseTextDoneEvent( + type="response.output_text.done", + item_id=msg_id, + sequence_number=seq, + output_index=0, + content_index=0, + text=full_text, + logprobs=[], + ) + ) + seq += 1 + yield self.chunk_to_sse( + ResponseContentPartDoneEvent( + type="response.content_part.done", + item_id=msg_id, + sequence_number=seq, + output_index=0, + content_index=0, + part=output_text_part, + ) + ) + seq += 1 + + msg_item = ResponseOutputMessage( + id=msg_id, + type="message", + status="completed", + role="assistant", + content=[output_text_part], + annotations=[], # type: ignore[call-arg] + ) + yield self.chunk_to_sse( + ResponseOutputItemDoneEvent( + type="response.output_item.done", + sequence_number=seq, + output_index=0, + item=msg_item, + ) + ) + seq += 1 + + # 7. Completed + all_output = [msg_item] + list(tool_calls) + usage = compute_usage(input_len, streamer.total_tokens) + yield self.chunk_to_sse( + ResponseCompletedEvent( + type="response.completed", + sequence_number=seq, + response=Response(**response_base, status="completed", output=all_output, usage=usage), + ) + ) + seq += 1 + except (GeneratorExit, asyncio.CancelledError): + # Client disconnected — abort generation to free GPU. + # Re-raise is mandatory: Python raises RuntimeError if GeneratorExit is swallowed. + streamer.cancel() + raise + + return StreamingResponse(event_stream(), media_type="text/event-stream") + + # ----- non-streaming ----- + + async def _non_streaming( + self, + request_id: str, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + model_id: str, + body: dict, + inputs: dict, + gen_config: "GenerationConfig", + gen_manager: BaseGenerateManager, + tool_config: dict | None = None, + ) -> JSONResponse: + """Generate a non-streaming Responses API reply (single JSON).""" + full_text, input_len, generated_ids = await gen_manager.generate_non_streaming( + model, processor, inputs, gen_config, request_id=request_id + ) + + output_items = [ + ResponseOutputMessage( + id=f"msg_{request_id}", + type="message", + status="completed", + role="assistant", + content=[ResponseOutputText(type="output_text", text=full_text, annotations=[])], + annotations=[], # type: ignore[call-arg] + ) + ] + + if tool_config is not None: + parsed = parse_tool_calls(processor, generated_ids, tool_config["schema"]) + if parsed: + for i, tc in enumerate(parsed): + tc_id = f"{request_id}_tool_call_{i}" + output_items.append( + ResponseFunctionToolCall( + id=tc_id, + call_id=tc_id, + type="function_call", + name=tc["name"], + arguments=tc["arguments"], + status="completed", + ) + ) + + usage = compute_usage(input_len, len(generated_ids)) + response = Response( + id=f"resp_{request_id}", + created_at=time.time(), + status="completed", + model=model_id, + output=output_items, + object="response", + usage=usage, + # Required by pydantic but not used — echo request config back + tools=[], + parallel_tool_calls=body.get("parallel_tool_calls", False), + tool_choice="auto", + ) + return JSONResponse(response.model_dump(exclude_none=True)) + + # ----- helpers ----- + + def _build_generation_config(self, body: dict, model_generation_config: "GenerationConfig", use_cb: bool = False): + """Apply Responses API params (``max_output_tokens``) on top of the base generation config.""" + generation_config = super()._build_generation_config(body, model_generation_config, use_cb=use_cb) + + if body.get("max_output_tokens") is not None: + generation_config.max_new_tokens = int(body["max_output_tokens"]) + + return generation_config + + +def compute_usage(input_tokens: int, output_tokens: int) -> ResponseUsage: + """Build a ``ResponseUsage`` object for a Responses API reply. + + Args: + input_tokens (`int`): Number of prompt tokens. + output_tokens (`int`): Number of generated tokens. + + Returns: + `ResponseUsage`: Usage statistics with zero-filled detail fields. + """ + return ResponseUsage( + input_tokens=input_tokens, + output_tokens=output_tokens, + total_tokens=input_tokens + output_tokens, + input_tokens_details=InputTokensDetails(cached_tokens=0), + output_tokens_details=OutputTokensDetails(reasoning_tokens=0), + ) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/server.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/server.py new file mode 100644 index 0000000000000000000000000000000000000000..0e8a4d5bea443663e77fbe0cd5bd4e7b22ed8505 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/server.py @@ -0,0 +1,144 @@ +# Copyright 2026 The HuggingFace Team. All rights reserved. +# +# 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. +""" +FastAPI app factory. +""" + +import uuid +from contextlib import asynccontextmanager + +from ...utils import logging +from ...utils.import_utils import is_serve_available + + +if is_serve_available(): + from fastapi import FastAPI, Request + from fastapi.middleware.cors import CORSMiddleware + from fastapi.responses import JSONResponse, StreamingResponse + +from .chat_completion import ChatCompletionHandler +from .completion import CompletionHandler +from .model_manager import ModelManager +from .response import ResponseHandler +from .transcription import TranscriptionHandler +from .utils import X_REQUEST_ID, CBWorkerDeadError, GenerationState + + +logger = logging.get_logger(__name__) + + +def build_server( + model_manager: ModelManager, + chat_handler: ChatCompletionHandler, + completion_handler: CompletionHandler, + response_handler: ResponseHandler, + transcription_handler: TranscriptionHandler, + generation_state: GenerationState, + enable_cors: bool = False, +) -> FastAPI: + """Build and return a configured FastAPI application. + + Args: + model_manager: Handles model loading, caching, and cleanup. + chat_handler: Handles `/v1/chat/completions` requests. + response_handler: Handles `/v1/responses` requests. + generation_state: Owns the per-model generation managers (regular and CB). Passed + in here so `/health` can check whether the CB worker has died and respond with + 503 instead of a misleading 200. + enable_cors: If `True`, adds permissive CORS middleware (allow all origins). + + Returns: + A FastAPI app ready to be passed to uvicorn. + """ + + @asynccontextmanager + async def lifespan(app: FastAPI): + yield + model_manager.shutdown() + + app = FastAPI(lifespan=lifespan) + + @app.exception_handler(CBWorkerDeadError) + async def _cb_dead_handler(_request: Request, exc: CBWorkerDeadError): + # Map CBWorkerDeadError to 503; otherwise it'd fall through to Starlette's default 500. + return JSONResponse({"error": str(exc)}, status_code=503) + + if enable_cors: + app.add_middleware( + CORSMiddleware, + allow_origins=["*"], + allow_credentials=True, + allow_methods=["*"], + allow_headers=["*"], + ) + logger.warning_once("CORS allow origin is set to `*`. Not recommended for production.") + + # ---- Middleware ---- + + @app.middleware("http") + async def request_id_middleware(request: Request, call_next): + """Get or set the request ID in the header.""" + request_id = request.headers.get(X_REQUEST_ID) or str(uuid.uuid4()) + request.state.request_id = request_id + response = await call_next(request) + response.headers[X_REQUEST_ID] = request_id + return response + + # ---- Routes ---- + + @app.post("/v1/chat/completions") + async def chat_completions(request: Request, body: dict): + return await chat_handler.handle_request(body, request.state.request_id) + + @app.post("/v1/completions") + async def completions(request: Request, body: dict): + return await completion_handler.handle_request(body, request.state.request_id) + + @app.post("/v1/responses") + async def responses(request: Request, body: dict): + return await response_handler.handle_request(body, request.state.request_id) + + @app.post("/v1/audio/transcriptions") + async def audio_transcriptions(request: Request): + return await transcription_handler.handle_request(request) + + @app.post("/load_model") + async def load_model(body: dict): + from fastapi import HTTPException + + model = body.get("model") + if model is None: + raise HTTPException(status_code=422, detail="Missing `model` field in the request body.") + model_id_and_revision = model_manager.process_model_name(model) + return StreamingResponse( + model_manager.load_model_streaming(model_id_and_revision), media_type="text/event-stream" + ) + + @app.post("/reset") + def reset(): + model_manager.shutdown() + return JSONResponse({"status": "ok"}) + + @app.get("/v1/models") + @app.options("/v1/models") + def list_models(): + return JSONResponse({"object": "list", "data": model_manager.get_gen_models()}) + + @app.get("/health") + def health(): + if not generation_state.is_cb_alive(): + return JSONResponse({"status": "unhealthy", "reason": "cb_worker_dead"}, status_code=503) + return JSONResponse({"status": "ok"}) + + return app diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/transcription.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/transcription.py new file mode 100644 index 0000000000000000000000000000000000000000..5865dc77029fd32ac768467dbc7064af2beb6e48 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/transcription.py @@ -0,0 +1,193 @@ +# Copyright 2026 The HuggingFace Team. All rights reserved. +# +# 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. +""" +Handler for the /v1/audio/transcriptions endpoint. +""" + +import io +from typing import TYPE_CHECKING + +from ...utils import logging +from ...utils.import_utils import is_serve_available + + +if is_serve_available(): + from fastapi import HTTPException, Request + from fastapi.responses import JSONResponse, StreamingResponse + from openai.types.audio.transcription_create_params import TranscriptionCreateParamsBase + +from .model_manager import ModelManager +from .utils import DirectStreamer, GenerateManager, GenerationState, _StreamError + + +if TYPE_CHECKING: + from transformers import PreTrainedModel, ProcessorMixin + + +logger = logging.get_logger(__name__) + + +class TransformersTranscriptionCreateParams(TranscriptionCreateParamsBase, total=False): + stream: bool + + +UNUSED_TRANSCRIPTION_FIELDS = { + "chunking_strategy", + "include", + "language", + "prompt", + "response_format", + "temperature", + "timestamp_granularities", +} + + +class TranscriptionHandler: + """Handler for ``POST /v1/audio/transcriptions``. + + Accepts a multipart/form-data request with an audio file and model name, + runs speech-to-text, and returns an OpenAI-compatible Transcription response. + + Standalone (does not extend :class:`BaseHandler`) because audio requests use + multipart form data, not JSON bodies, and don't need generation config or + validation. Shares the :class:`GenerationState` for thread safety. + """ + + def __init__(self, model_manager: ModelManager, generation_state: GenerationState): + """ + Args: + model_manager (`ModelManager`): Handles model loading, caching, and lifecycle. + generation_state (`GenerationState`): Shared generation state for thread safety. + """ + self.model_manager = model_manager + self.generation_state = generation_state + + def _validate_request(self, form_keys: set[str]) -> None: + """Validate transcription request fields.""" + unexpected = form_keys - getattr(TransformersTranscriptionCreateParams, "__mutable_keys__", set()) + if unexpected: + raise HTTPException(status_code=422, detail=f"Unexpected fields in the request: {unexpected}") + unused = form_keys & UNUSED_TRANSCRIPTION_FIELDS + if unused: + logger.warning_once(f"Ignoring unsupported fields in the request: {unused}") + + async def handle_request(self, request: Request) -> JSONResponse | StreamingResponse: + """Parse multipart form, run transcription, return result. + + Args: + request (`Request`): FastAPI request containing multipart form data with + ``file`` (audio bytes), ``model`` (model ID), and optional ``stream`` flag. + + Returns: + `JSONResponse | StreamingResponse`: Transcription result or SSE stream. + """ + from transformers.utils.import_utils import is_librosa_available, is_multipart_available + + if not is_librosa_available(): + raise ImportError("Missing librosa dependency for audio transcription. Install with `pip install librosa`") + if not is_multipart_available(): + raise ImportError( + "Missing python-multipart dependency for file uploads. Install with `pip install python-multipart`" + ) + + async with request.form() as form: + self._validate_request(set(form.keys())) + file_field = form["file"] + if isinstance(file_field, str): + raise HTTPException(status_code=422, detail="Expected file upload, got string") + file_bytes = await file_field.read() + model = form["model"] + if not isinstance(model, str): + raise HTTPException(status_code=422, detail="Expected model name as string") + stream = str(form.get("stream", "false")).lower() == "true" + + model_id_and_revision = self.model_manager.process_model_name(model) + audio_model, audio_processor = self.model_manager.load_model_and_processor(model_id_and_revision) + base_manager = self.generation_state.get_manager(model_id_and_revision) + if not isinstance(base_manager, GenerateManager): + raise HTTPException(status_code=400, detail="Audio transcription requires sequential generation (not CB)") + gen_manager = base_manager + audio_inputs = self._prepare_audio_inputs(file_bytes, audio_processor, audio_model) + + if stream: + return self._streaming(gen_manager, audio_model, audio_processor, audio_inputs) + return await self._non_streaming(gen_manager, audio_model, audio_processor, audio_inputs) + + @staticmethod + def _prepare_audio_inputs( + file_bytes: bytes, audio_processor: "ProcessorMixin", audio_model: "PreTrainedModel" + ) -> dict: + """Load audio bytes and convert to model inputs.""" + import librosa + + sampling_rate = audio_processor.feature_extractor.sampling_rate + audio_array, _ = librosa.load(io.BytesIO(file_bytes), sr=sampling_rate, mono=True) + audio_inputs = audio_processor(audio_array, sampling_rate=sampling_rate, return_tensors="pt").to( + audio_model.device + ) + audio_inputs["input_features"] = audio_inputs["input_features"].to(audio_model.dtype) + return audio_inputs + + async def _non_streaming( + self, + gen_manager: GenerateManager, + audio_model: "PreTrainedModel", + audio_processor: "ProcessorMixin", + audio_inputs: dict, + ) -> JSONResponse: + # Audio models have different inputs (input_features) and decode (batch_decode) + # than text models, so we use async_submit() directly instead of + # generate_non_streaming() + from openai.types.audio import Transcription + + generated_ids = await gen_manager.async_submit(audio_model.generate, **audio_inputs) + text = audio_processor.batch_decode(generated_ids, skip_special_tokens=True)[0] + return JSONResponse(Transcription(text=text).model_dump(exclude_none=True)) + + def _streaming( + self, + gen_manager: GenerateManager, + audio_model: "PreTrainedModel", + audio_processor: "ProcessorMixin", + audio_inputs: dict, + ) -> StreamingResponse: + # Same as _non_streaming — uses submit() directly because audio inputs + # differ from text. + import asyncio + + tokenizer = audio_processor.tokenizer if hasattr(audio_processor, "tokenizer") else audio_processor + loop = asyncio.get_running_loop() + queue: asyncio.Queue = asyncio.Queue() + streamer = DirectStreamer(tokenizer._tokenizer, loop, queue, skip_special_tokens=True) + gen_kwargs = {**audio_inputs, "streamer": streamer} + + def _run(): + try: + audio_model.generate(**gen_kwargs) + except Exception as e: + loop.call_soon_threadsafe(queue.put_nowait, _StreamError(str(e))) + + gen_manager.submit(_run) + + async def sse_gen(): + while True: + text = await queue.get() + if text is None: + break + if isinstance(text, _StreamError): + yield f'data: {{"error": "{text.msg}"}}\n\n' + return + yield f"data: {text}\n\n" + + return StreamingResponse(sse_gen(), media_type="text/event-stream") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..7a276806cc9161119ba21bb4f8c30f706f4aedb4 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/cli/serving/utils.py @@ -0,0 +1,1028 @@ +# Copyright 2026 The HuggingFace Team. All rights reserved. +# +# 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. +""" +Shared types, constants, and utilities for the serving layer. +""" + +import asyncio +import copy +import enum +import json +import threading +from abc import ABC, abstractmethod +from collections.abc import Callable +from concurrent.futures import Future +from queue import Queue +from typing import TYPE_CHECKING + +from transformers.utils import logging + + +if TYPE_CHECKING: + import pydantic + import tokenizers + import torch + + from transformers import ( + ContinuousBatchingConfig, + GenerationConfig, + PreTrainedModel, + PreTrainedTokenizerFast, + ProcessorMixin, + ) + from transformers.generation.continuous_batching.continuous_api import ContinuousBatchingManager + from transformers.generation.continuous_batching.requests import GenerationOutput + from transformers.generation.continuous_batching.scheduler import Scheduler + + from .model_manager import ModelManager + + +logger = logging.get_logger(__name__) + + +X_REQUEST_ID = "x-request-id" + + +class Modality(enum.Enum): + LLM = "LLM" + VLM = "VLM" + MULTIMODAL = "MULTIMODAL" # supports text, image, video, and audio + STT = "STT" + TTS = "TTS" + + +class _StreamError: + """Sentinel to signal an error from the generate thread.""" + + def __init__(self, msg: str): + self.msg = msg + + +class _GenerationCancelled(Exception): + """Raised inside ``DirectStreamer.put()`` to abort ``model.generate()``.""" + + +class CBWorkerDeadError(RuntimeError): + """Raised when a request is submitted to a CB worker that has died. + + Surfaced as 503 by the FastAPI exception handler. Carries the original error message + that killed the worker so the client knows why the server is in this state. + """ + + +# Fallback tool call configs for models that don't declare stc_token/etc_token/response_schema +# on their tokenizer. +# Keys are matched via substring against model_type (e.g. "qwen" matches "qwen2", "qwen3_vl", etc.). +# If a model family changes its tool call format, split into separate keys (e.g. "qwen2", "qwen3"). +_TOOL_CALL_FALLBACKS = { + "qwen": { + "stc": "", + "etc": "", + "schema": { + "x-regex-iterator": r"(.*?)", + "type": "array", + "items": {"type": "object", "x-parser": "json"}, + }, + }, +} + + +def get_tool_call_config(processor, model: "PreTrainedModel") -> dict | None: + """Return tool call config for the model, or ``None`` if tool calls are not supported. + + Returns a dict with: + - ``schema`` (`dict`): Schema to pass to ``tokenizer.parse_response(block, schema)``. + - ``stc_id`` (`int`): Token ID of the start-of-tool-call delimiter. + - ``etc_id`` (`int`): Token ID of the end-of-tool-call delimiter. + """ + tokenizer = getattr(processor, "tokenizer", processor) + stc = getattr(tokenizer, "stc_token", None) + etc = getattr(tokenizer, "etc_token", None) + response_schema = getattr(tokenizer, "response_schema", None) + + # Models with full tokenizer config (e.g. Gemma 4) + if stc and etc and response_schema: + schema = response_schema["properties"]["tool_calls"] + else: + # Fallback: known model families without full tokenizer config + fallback = next((v for k, v in _TOOL_CALL_FALLBACKS.items() if k in model.config.model_type), None) + if fallback is None: + return None + stc, etc, schema = fallback["stc"], fallback["etc"], fallback["schema"] + + stc_id = tokenizer.convert_tokens_to_ids(stc) + etc_id = tokenizer.convert_tokens_to_ids(etc) + return {"schema": schema, "stc_id": stc_id, "etc_id": etc_id} + + +def _normalize_tool_call(tool_call: dict) -> dict: + """Normalize a parsed tool call to ``{"name": str, "arguments": str}``. + + Different models return different structures from ``parse_response``: + - Gemma: ``{"function": {"name": ..., "arguments": {...}}}`` (nested, arguments as dict) + - Qwen: ``{"name": ..., "arguments": {...}}`` (flat, arguments as dict) + + The OpenAI API expects ``arguments`` as a JSON **string**, so we ``json.dumps`` it. + """ + function = tool_call.get("function", tool_call) + arguments = function.get("arguments", {}) + return { + "name": function["name"], + "arguments": json.dumps(arguments) if not isinstance(arguments, str) else arguments, + } + + +def parse_tool_calls(processor, generated_ids, schema: dict) -> list[dict] | None: + """Parse tool calls from generated token IDs using ``tokenizer.parse_response``. + + Args: + processor: The processor or tokenizer. + generated_ids: Token IDs from generation. Passed directly to ``parse_response`` + which decodes them internally, preserving special tokens that + ``skip_special_tokens=True`` would strip (e.g. Gemma's ``<|tool_call>``). + schema: The tool call schema (from ``response_schema`` or ``_TOOL_CALL_FALLBACKS``). + + Returns a list of ``{"name": str, "arguments": str}`` dicts, or ``None`` if none found. + """ + parsed = processor.parse_response(generated_ids, schema) + if not parsed: + return None + if not isinstance(parsed, list): + parsed = [parsed] + tool_calls = [_normalize_tool_call(tool_call) for tool_call in parsed] + return tool_calls if tool_calls else None + + +class DownloadAggregator: + """Aggregates byte-progress across multiple concurrent download tqdm bars. + + huggingface_hub opens one tqdm bar per file shard. This class tracks them all and emits + a single aggregate ``{"stage": "download", "progress": {...}}`` event whenever any updates. + """ + + def __init__(self, enqueue: Callable, model_id: str): + self.enqueue = enqueue + self.model = model_id + self.bars: dict[int, tuple[int, int | None]] = {} + self.last_emitted_current: int | None = None + + def register(self, bar_id: int, total: int | None) -> None: + """Register a new download bar with its total byte count.""" + self.bars[bar_id] = (0, total) + self._emit() + + def update(self, bar_id: int, current: int, total: int | None) -> None: + """Update a bar's current byte count and emit aggregate progress.""" + self.bars[bar_id] = (current, total) + self._emit() + + def close(self, bar_id: int) -> None: + pass # keep the bar so totals remain correct + + def _emit(self) -> None: + agg_current = sum(c for c, _ in self.bars.values()) + if agg_current == self.last_emitted_current: + return + self.last_emitted_current = agg_current + totals = [t for _, t in self.bars.values() if t is not None] + agg_total = sum(totals) if totals else None + self.enqueue( + { + "status": "loading", + "model": self.model, + "stage": "download", + "progress": {"current": agg_current, "total": agg_total}, + } + ) + + +def make_progress_tqdm_class(callback: Callable, model_id: str) -> type: + """Create a tqdm subclass that routes progress to a callback. + + Bars with ``unit="B"`` are download bars — aggregated via ``DownloadAggregator``. + Other bars (e.g. "Loading weights") emit ``weights`` stage events. + + Args: + callback (`callable`): Called with a dict payload + ``{"status": "loading", "model": ..., "stage": ..., "progress": ...}``. + model_id (`str`): The model ID (included in progress payloads). + + Returns: + A tqdm subclass that forwards progress to *callback*. + """ + from tqdm.auto import tqdm as base_tqdm + + download_aggregator = DownloadAggregator(callback, model_id) + + class ProgressTqdm(base_tqdm): # type: ignore[misc] + def __init__(self, *args, **kwargs): + self.sse_unit = kwargs.get("unit") or "it" + kwargs["disable"] = True + super().__init__(*args, **kwargs) + self.n = 0 + self.last_emitted = -1 + if self.sse_unit == "B": + self._bar_id = id(self) + download_aggregator.register(self._bar_id, self.total) + + def update(self, n=1): + if n is None: + n = 1 + self.n += n + if self.sse_unit == "B": + download_aggregator.update(self._bar_id, self.n, self.total) + elif self.n != self.last_emitted: + self.last_emitted = self.n + callback( + { + "status": "loading", + "model": model_id, + "stage": "weights", + "progress": {"current": self.n, "total": self.total}, + } + ) + + def __iter__(self): + for item in self.iterable: + self.n += 1 + if self.sse_unit == "B": + download_aggregator.update(self._bar_id, self.n, self.total) + elif self.n != self.last_emitted: + self.last_emitted = self.n + callback( + { + "status": "loading", + "model": model_id, + "stage": "weights", + "progress": {"current": self.n, "total": self.total}, + } + ) + yield item + + def close(self): + if self.sse_unit == "B": + download_aggregator.close(self._bar_id) + super().close() + + return ProgressTqdm + + +class DirectStreamer: + """Streamer for ``model.generate()`` (used by :class:`GenerateManager`). + + Implements the ``put``/``end`` protocol that ``model.generate()`` expects: + generate calls ``put(token_tensor)`` after each decode step, and ``end()`` + when generation is complete. Tokens are decoded incrementally via the Rust + ``DecodeStream`` (O(1) per token) and pushed as text to an asyncio.Queue. + """ + + def __init__( + self, + tokenizer: "tokenizers.Tokenizer", + loop: asyncio.AbstractEventLoop, + queue: asyncio.Queue, + skip_special_tokens: bool = True, + tool_config: dict | None = None, + ): + """ + Args: + tokenizer: The Rust tokenizer (``tokenizer._tokenizer``). + loop (`asyncio.AbstractEventLoop`): The event loop to push decoded text to. + queue (`asyncio.Queue`): The queue that receives decoded text chunks. + skip_special_tokens (`bool`, *optional*, defaults to `True`): + Whether to strip special tokens during decoding. + tool_config (`dict`, *optional*): Tool call config from ``get_tool_call_config``. + When set, tokens between stc/etc delimiters (inclusive) are suppressed + from the queue so tool call markup is never streamed to the client. + """ + from tokenizers.decoders import DecodeStream + + self._tokenizer = tokenizer + self._loop = loop + self._queue = queue + self._decode_stream = DecodeStream([], skip_special_tokens) + self._stc_id = tool_config["stc_id"] if tool_config else None + self._etc_id = tool_config["etc_id"] if tool_config else None + self._inside_tool_call = False + self._first = True + self._cancelled = threading.Event() + self.total_tokens = 0 + self.generated_token_ids: list[int] = [] + + def put(self, value: "torch.Tensor") -> None: + """Called by ``model.generate()`` after each decode step with new token(s).""" + if self._cancelled.is_set(): + raise _GenerationCancelled() + # The first put() contains the prompt tokens — skip since we only stream generated tokens. + if self._first: + self._first = False + return + for token_id in value.tolist(): + self.total_tokens += 1 + self.generated_token_ids.append(token_id) + + if token_id == self._stc_id: + self._inside_tool_call = True + elif token_id == self._etc_id: + self._inside_tool_call = False + + text = self._decode_stream.step(self._tokenizer, token_id) + if text is not None and not self._inside_tool_call and token_id != self._etc_id: + self._loop.call_soon_threadsafe(self._queue.put_nowait, text) + + def end(self) -> None: + """Called by ``model.generate()`` when generation is complete.""" + self._loop.call_soon_threadsafe(self._queue.put_nowait, None) + + def cancel(self) -> None: + """Signal cancellation. The next ``put()`` call will raise and abort ``model.generate()``.""" + self._cancelled.set() + + +class CBStreamer: + """Streamer for continuous batching (used by :class:`CBGenerateManager`). + + Same ``put``/``end`` protocol as :class:`DirectStreamer`, but called manually + by :class:`CBGenerateManager` instead of by ``model.generate()``: + ``put(output)`` receives a CB ``GenerationOutput``, decodes new tokens, and + pushes text to the asyncio.Queue. ``end()`` signals the stream is complete. + """ + + def __init__( + self, + cb_manager: "ContinuousBatchingManager", + request_id: str, + tokenizer: "tokenizers.Tokenizer", + loop: asyncio.AbstractEventLoop, + queue: asyncio.Queue, + tool_config: dict | None = None, + ): + """ + Args: + cb_manager (`ContinuousBatchingManager`): The CB manager instance. + request_id (`str`): The request ID to track in the CB scheduler. + tokenizer: The Rust tokenizer (``tokenizer._tokenizer``). + loop (`asyncio.AbstractEventLoop`): The event loop to push decoded text to. + queue (`asyncio.Queue`): The queue that receives decoded text chunks. + tool_config (`dict`, *optional*): Tool call config (see ``DirectStreamer``). + """ + from tokenizers.decoders import DecodeStream + + self._cb = cb_manager + self._request_id = request_id + self._loop = loop + self._queue = queue + self._tokenizer = tokenizer + self._decode_stream = DecodeStream([], True) + self._stc_id = tool_config["stc_id"] if tool_config else None + self._etc_id = tool_config["etc_id"] if tool_config else None + self._inside_tool_call = False + self._prev_len = 0 + self.total_tokens = 0 + self.generated_token_ids: list[int] = [] + + def put(self, output: "GenerationOutput") -> None: + """Decode new tokens from a CB ``GenerationOutput`` and push text to the queue.""" + new_tokens = output.generated_tokens[self._prev_len :] + self._prev_len = len(output.generated_tokens) + for token_id in new_tokens: + self.total_tokens += 1 + self.generated_token_ids.append(token_id) + + if token_id == self._stc_id: + self._inside_tool_call = True + elif token_id == self._etc_id: + self._inside_tool_call = False + + text = self._decode_stream.step(self._tokenizer, token_id) + if text is not None and not self._inside_tool_call and token_id != self._etc_id: + self._queue.put_nowait(text) + + def end(self) -> None: + """Signal end of stream.""" + self._queue.put_nowait(None) + + def cancel(self) -> None: + """Cancel the CB request.""" + self._cb.cancel_request(self._request_id) + + +def set_torch_seed(seed: int) -> None: + """Set the PyTorch random seed for reproducible generation.""" + import torch + + torch.manual_seed(seed) + + +def reset_torch_cache() -> None: + """Empty the CUDA cache if a GPU is available.""" + import torch + + if torch.cuda.is_available(): + torch.cuda.empty_cache() + + +class InferenceThread: + """Persistent thread for ``model.generate()`` calls. + + ``torch.compile`` with CUDA graphs stores state in thread-local storage. + All inference must run on the same thread to avoid corrupted graph state. + """ + + def __init__(self): + self._queue: Queue = Queue() + self._thread = threading.Thread(target=self._run, daemon=True) + self._thread.start() + + def _run(self) -> None: + while True: + fn, args, kwargs, future, loop = self._queue.get() + try: + result = fn(*args, **kwargs) + if loop is not None: + loop.call_soon_threadsafe(future.set_result, result) + else: + future.set_result(result) + except Exception as e: + if loop is not None: + loop.call_soon_threadsafe(future.set_exception, e) + else: + future.set_exception(e) + + def submit(self, fn, *args, **kwargs) -> Future: + """Submit a callable to the inference thread. Returns a blocking Future.""" + future: Future = Future() + self._queue.put((fn, args, kwargs, future, None)) + return future + + def async_submit(self, fn, *args, **kwargs) -> asyncio.Future: + """Submit a callable to the inference thread. Returns an awaitable asyncio.Future.""" + loop = asyncio.get_running_loop() + future = loop.create_future() + self._queue.put((fn, args, kwargs, future, loop)) + return future + + +class BaseGenerateManager(ABC): + """Base class for generation managers. + + Subclasses: + - :class:`GenerateManager` — sequential ``model.generate()`` on a persistent thread. + - :class:`CBGenerateManager` — continuous batching with paged attention. + """ + + def init_cb(self, model: "PreTrainedModel", gen_config: "GenerationConfig") -> None: + """Initialize continuous batching. No-op for non-CB managers.""" + + @abstractmethod + def generate_streaming( + self, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + inputs: dict, + gen_config: "GenerationConfig", + request_id: str, + tool_config: dict | None = None, + ) -> tuple[asyncio.Queue, "DirectStreamer | CBStreamer"]: + """Start streaming generation. + + Args: + model (`PreTrainedModel`): The loaded model. + processor: The processor or tokenizer for decoding. + inputs (`dict`): Tokenized inputs (tensors for sequential, lists for CB). + gen_config (`GenerationConfig`): Generation parameters. + request_id (`str`): Unique request identifier. + tool_config (`dict`, *optional*): Tool call config from ``get_tool_call_config``. + When set, tool call tokens (between stc/etc) are suppressed from output. + + Returns: + `tuple[asyncio.Queue, DirectStreamer | CBStreamer]`: A ``(queue, streamer)`` pair + where *queue* yields ``str | _StreamError | None`` and *streamer* exposes + ``.total_tokens`` and ``.cancel()``. + """ + + @abstractmethod + async def generate_non_streaming( + self, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + inputs: dict, + gen_config: "GenerationConfig", + request_id: str, + ) -> tuple[str, int, list[int]]: + """Run generation to completion. + + Args: + model (`PreTrainedModel`): The loaded model. + processor: The processor or tokenizer for decoding. + inputs (`dict`): Tokenized inputs (tensors for sequential, lists for CB). + gen_config (`GenerationConfig`): Generation parameters. + request_id (`str`): Unique request identifier. + + Returns: + `tuple[str, int, list[int]]`: ``(text, input_len, generated_ids)``. + """ + + @abstractmethod + def stop(self) -> None: + """Stop the generation manager and free resources.""" + + +class GenerateManager(BaseGenerateManager): + """Sequential generation via ``model.generate()`` on a persistent thread.""" + + def __init__(self): + self._thread = InferenceThread() + + def generate_streaming( + self, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + inputs: dict, + gen_config: "GenerationConfig", + request_id: str, + tool_config: dict | None = None, + ) -> tuple[asyncio.Queue, DirectStreamer]: + """Start streaming generation via ``model.generate()`` on the inference thread.""" + loop = asyncio.get_running_loop() + queue: asyncio.Queue = asyncio.Queue() + # ProcessorMixin exposes the fast tokenizer as .tokenizer; PreTrainedTokenizerFast is already one. + rust_tokenizer = getattr(processor, "tokenizer", processor)._tokenizer # type: ignore[union-attr] + streamer = DirectStreamer(rust_tokenizer, loop, queue, tool_config=tool_config) + gen_kwargs = {**inputs, "streamer": streamer, "generation_config": gen_config, "tokenizer": processor} + if hasattr(model, "has_talker"): + gen_kwargs["generation_mode"] = "text" + + def _run() -> None: + try: + model.generate(**gen_kwargs) + except _GenerationCancelled: + loop.call_soon_threadsafe(queue.put_nowait, None) + except Exception as e: + loop.call_soon_threadsafe(queue.put_nowait, _StreamError(str(e))) + + self.submit(_run) + return queue, streamer + + async def generate_non_streaming( + self, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + inputs: dict, + gen_config: "GenerationConfig", + request_id: str, + ) -> tuple[str, int, "torch.Tensor"]: + """Run generation to completion via ``model.generate()`` on the inference thread.""" + # Multimodal models (e.g. Qwen2.5-Omni) may generate audio alongside text by default; + # force text-only output since the serve layer only handles text + generate_kwargs = {**inputs, "generation_config": gen_config, "tokenizer": processor} + if hasattr(model, "has_talker"): + generate_kwargs["generation_mode"] = "text" + sequences = await self.async_submit(model.generate, **generate_kwargs) + input_len = inputs["input_ids"].shape[-1] + generated_ids = sequences[0, input_len:] + text = processor.decode(generated_ids, skip_special_tokens=True) + return text, input_len, generated_ids + + def submit(self, fn: Callable, *args, **kwargs) -> Future: + """Submit a callable to the inference thread. Returns a blocking Future.""" + return self._thread.submit(fn, *args, **kwargs) + + def async_submit(self, fn: Callable, *args, **kwargs) -> asyncio.Future: + """Submit a callable to the inference thread. Returns an awaitable asyncio.Future.""" + return self._thread.async_submit(fn, *args, **kwargs) + + def stop(self) -> None: + pass # inference thread is a daemon + + +class CBGenerateManager(BaseGenerateManager): + """Continuous batching generation via paged attention. + + Translates between the handler's text-level asyncio.Queue and CB's + token-level interface. Per-request: ``max_new_tokens``, ``eos_token_id``. + + The CB manager is initialized lazily on the first request via + :meth:`ensure_initialized`, using that request's ``gen_config`` for shared + sampling params (temperature, top_p, do_sample). + + .. todo:: Remove :meth:`init_cb` when CB supports per-request + generation config. At that point, ``gen_config`` can be passed directly + to ``add_request`` and the CB manager no longer needs a shared config. + """ + + def __init__(self, cb_config: "ContinuousBatchingConfig | None" = None): + self._cb: ContinuousBatchingManager | None = None + self._cb_config = cb_config + + def init_cb(self, model: "PreTrainedModel", gen_config: "GenerationConfig") -> None: + """Initialize the CB manager on first call with the request's generation config. + + .. todo:: Remove when CB supports per-request generation config. + + Args: + model (`PreTrainedModel`): The loaded model (must support ``init_continuous_batching``). + gen_config (`GenerationConfig`): Generation config used for shared sampling params. + """ + if self._cb is not None: + return + + self._cb = model.init_continuous_batching( + generation_config=gen_config, continuous_batching_config=self._cb_config + ) + self._cb.start() + + def is_alive(self) -> bool: + """Whether the CB worker is healthy. ``True`` before ``init_cb()`` is called.""" + return self._cb is None or self._cb.fatal_error is None + + def _check_alive(self, request_id: str) -> None: + """Raise :class:`CBWorkerDeadError` if the CB worker has died. + + Called at request entry to fail fast — submitting to a dead worker would otherwise + enqueue the request into a void where it never gets processed. + """ + if self._cb is not None and self._cb.fatal_error is not None: + raise CBWorkerDeadError( + f"CB worker is dead and cannot accept request {request_id}: {self._cb.fatal_error}" + ) + + def generate_streaming( + self, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + inputs: dict, + gen_config: "GenerationConfig", + request_id: str, + tool_config: dict | None = None, + ) -> tuple[asyncio.Queue, CBStreamer]: + """Start streaming CB generation. Registers a per-request output handler.""" + cb = self._cb + if cb is None: + raise RuntimeError("CB manager not initialized. Call `init_cb()` first.") + self._check_alive(request_id) + + loop = asyncio.get_running_loop() + text_queue: asyncio.Queue = asyncio.Queue() + + input_ids = inputs["input_ids"] + request_id = cb.add_request( + input_ids, + request_id=request_id, + streaming=True, + max_new_tokens=gen_config.max_new_tokens, + eos_token_id=gen_config.eos_token_id, + ) + # ProcessorMixin exposes the fast tokenizer as .tokenizer; PreTrainedTokenizerFast is already one. + rust_tokenizer = getattr(processor, "tokenizer", processor)._tokenizer # type: ignore[union-attr] + streamer = CBStreamer(self._cb, request_id, rust_tokenizer, loop, text_queue, tool_config=tool_config) + + # Register a direct callback: the dispatcher calls this on the event loop with each GenerationOutput. + # This decodes tokens and pushes text straight to the SSE text_queue + def _on_output(output): + try: + streamer.put(output) + # ``error`` is set together with ``status = FAILED`` in CB's _handle_request_error. + # Surface it as an end-of-stream error so the SSE handler can emit it and close, + # instead of leaving the client hanging on a stream that will never end. + if output.error is not None: + text_queue.put_nowait(_StreamError(output.error)) + streamer.end() + elif output.is_finished(): + streamer.end() + except Exception as e: + text_queue.put_nowait(_StreamError(str(e))) + + cb.register_result_handler(request_id, _on_output) + return text_queue, streamer + + async def generate_non_streaming( + self, + model: "PreTrainedModel", + processor: "ProcessorMixin | PreTrainedTokenizerFast", + inputs: dict, + gen_config: "GenerationConfig", + request_id: str, + ) -> tuple[str, int, list[int]]: + """Run non-streaming CB generation. Registers a handler that resolves an asyncio.Future on completion.""" + cb = self._cb + if cb is None: + raise RuntimeError("CB manager not initialized. Call `init_cb()` first.") + self._check_alive(request_id) + + input_ids = inputs["input_ids"] + input_len = len(input_ids) + + # Register future BEFORE add_request to avoid race with fast completion + loop = asyncio.get_running_loop() + future = loop.create_future() + + def _on_result(result): + if not future.done(): + future.set_result(result) + + cb.register_result_handler(request_id, _on_result) + + cb.add_request( + input_ids, + request_id=request_id, + max_new_tokens=gen_config.max_new_tokens, + streaming=False, + eos_token_id=gen_config.eos_token_id, + ) + result = await future + # CB signals a failed request by setting ``error`` (and ``status = FAILED``) on the + # delivered GenerationOutput, often with empty ``generated_tokens``. Surface it instead + # of returning an empty success that downstream parsing/decoding would silently mask. + # If the worker itself died, route to CBWorkerDeadError so the client gets the same 503 + # as requests submitted post-crash; otherwise it's a per-request failure (e.g. unsupported + # logit-processor kwarg) and a plain RuntimeError -> 500 is appropriate. + if result.error is not None: + if cb.fatal_error is not None: + raise CBWorkerDeadError(f"CB worker died during request {request_id}: {result.error}") + raise RuntimeError(f"CB generation failed for {request_id}: {result.error}") + generated_ids = result.generated_tokens + text = processor.decode(generated_ids, skip_special_tokens=True) + return text, input_len, generated_ids + + @property + def scheduler(self) -> "Scheduler": + """The CB scheduler (for testing/monitoring).""" + if self._cb is None or self._cb.batch_processor is None: + raise RuntimeError("Continuous batching processor not initialized.") + return self._cb.batch_processor.scheduler + + def stop(self) -> None: + if self._cb is not None: + self._cb.stop(block=True, timeout=2) + + +class GenerationState: + """Shared generation state across all handlers. + + Manages per-model :class:`GenerateManager` instances (each with its own + :class:`InferenceThread` so different models can run concurrently while + ``torch.compile`` / CUDA graphs require same-model-same-thread) and a + single :class:`CBGenerateManager` for continuous batching. + + Args: + continuous_batching (`bool`, *optional*, defaults to `False`): + Whether to use continuous batching with paged attention instead of + sequential ``model.generate()`` calls. + """ + + def __init__( + self, + continuous_batching: bool = False, + compile: bool = False, + cb_config: "ContinuousBatchingConfig | None" = None, + ): + self._continuous_batching = continuous_batching + self._compile = compile + self._cb_config = cb_config + self._generate_managers: dict[str, GenerateManager] = {} + self._cb_manager: CBGenerateManager | None = None + self._cb_model_id: str | None = None + + def use_continuous_batching(self, model: "PreTrainedModel", modality: Modality) -> bool: + """Check if continuous batching can be used for this model and modality. + + Args: + model (`PreTrainedModel`): The loaded model. + modality (`Modality`): The detected model modality (LLM, VLM, etc.). + + Returns: + `bool`: ``True`` if CB is enabled and the model supports it, ``False`` otherwise. + """ + if not self._continuous_batching: + return False + can = hasattr(model, "init_continuous_batching") and modality == Modality.LLM + if not can: + logger.warning_once( + f"{model.__class__.__name__} does not support continuous batching. " + "Falling back to sequential generation." + ) + return can + + def get_manager(self, model_id: str, use_cb: bool = False) -> BaseGenerateManager: + """Return a per-model generation manager, lazily created on first request. + + Args: + model_id (`str`): The model ID in ``'model_id@revision'`` format. + use_cb (`bool`): Whether to return a CB manager or a sequential one. + + Returns: + `BaseGenerateManager`: Either a `GenerateManager` or `CBGenerateManager`. + """ + if use_cb: + if self._cb_model_id != model_id: + if self._cb_manager is not None: + self._cb_manager.stop() + self._cb_manager = None + if self._cb_manager is None: + self._cb_manager = CBGenerateManager(cb_config=self._cb_config) + self._cb_model_id = model_id + return self._cb_manager + if model_id not in self._generate_managers: + self._generate_managers[model_id] = GenerateManager() + return self._generate_managers[model_id] + + def shutdown(self) -> None: + """Stop any active generation managers.""" + if self._cb_manager is not None: + self._cb_manager.stop() + self._cb_manager = None + + def is_cb_alive(self) -> bool: + """Whether the CB worker is healthy. ``True`` if CB is disabled or not yet initialized.""" + return self._cb_manager is None or self._cb_manager.is_alive() + + +class BaseHandler: + """Shared logic for chat completion and responses handlers. + + Provides model resolution, generation config building, and SSE formatting. + Generation is delegated to the shared :class:`GenerationState`. + + Args: + model_manager (`ModelManager`): + Handles model loading, caching, and lifecycle. + generation_state (`GenerationState`): + Shared state managing per-model generation managers. + """ + + _valid_params_class: type | None = None + _unused_fields: set[str] = set() + + def __init__( + self, + model_manager: "ModelManager", + generation_state: GenerationState, + ): + self.model_manager = model_manager + self.generation_state = generation_state + + def _validate_request(self, body: dict) -> None: + """Validate request fields against the handler's params class and unused fields.""" + from fastapi import HTTPException + + input_keys = set(body.keys()) + if self._valid_params_class is not None: + unexpected = input_keys - getattr(self._valid_params_class, "__mutable_keys__", set()) + if unexpected: + raise HTTPException(status_code=422, detail=f"Unexpected fields in the request: {unexpected}") + unused = input_keys & self._unused_fields + if unused: + logger.warning_once(f"Ignoring unsupported fields in the request: {unused}") + + @staticmethod + def chunk_to_sse(chunk: "str | pydantic.BaseModel") -> str: + """Format a pydantic model or string as an SSE ``data:`` line.""" + if isinstance(chunk, str): + return chunk if chunk.startswith("data: ") else f"data: {chunk}\n\n" + return f"data: {chunk.model_dump_json(exclude_none=True)}\n\n" + + def _resolve_model(self, body: dict) -> tuple[str, "PreTrainedModel", "ProcessorMixin | PreTrainedTokenizerFast"]: + """Apply force_model, load model + processor. + + Returns ``(model_id, model, processor)``. + """ + from fastapi import HTTPException + + if self.model_manager.force_model is not None: + requested = body.get("model") + if requested is not None and requested != self.model_manager.force_model: + raise HTTPException( + status_code=400, + detail=(f"Server is pinned to '{self.model_manager.force_model}'; requested '{requested}'."), + ) + body["model"] = self.model_manager.force_model + + model_id = self.model_manager.process_model_name(body["model"]) + model, processor = self.model_manager.load_model_and_processor(model_id) + + return model_id, model, processor + + def _build_generation_config( + self, body: dict, model_generation_config: "GenerationConfig", use_cb: bool = False + ) -> "GenerationConfig": + """Build a GenerationConfig from shared params (temperature, top_p, seed, generation_config JSON). + + Subclasses should call ``super()._build_generation_config(...)`` then apply + endpoint-specific params (``max_tokens``, ``max_output_tokens``, etc.). + + Args: + body (`dict`): + The raw request body. + model_generation_config (`GenerationConfig`): + The model's default generation config (will be deep-copied). + use_cb (`bool`, *optional*, defaults to `False`): + Whether continuous batching is active. If ``True``, disables the model's + internal KV cache (CB manages its own paged cache). + + Returns: + `GenerationConfig`: A new config with request-specific overrides applied. + """ + from transformers import GenerationConfig + + if body.get("generation_config") is not None: + generation_config = GenerationConfig(**json.loads(body["generation_config"])) + else: + generation_config = copy.deepcopy(model_generation_config) + if generation_config.max_new_tokens is None or generation_config.max_new_tokens < 1024: + generation_config.max_new_tokens = 1024 + + if body.get("temperature") is not None: + generation_config.temperature = float(body["temperature"]) + if float(body["temperature"]) == 0.0: + generation_config.do_sample = False + if body.get("top_p") is not None: + generation_config.top_p = float(body["top_p"]) + if body.get("seed") is not None: + set_torch_seed(body["seed"]) + + # --compile flag: use static cache + torch.compile for faster decode + if self.generation_state._compile and generation_config.cache_implementation is None: + generation_config.cache_implementation = "static" + + # CB manages its own paged KV cache + if use_cb: + generation_config.use_cache = False + + # TODO: add prefix caching for the non-CB path (reuse KV cache across multi-turn conversations) + + return generation_config + + @staticmethod + def get_processor_inputs_from_messages(messages: list[dict], modality: Modality) -> list[dict]: + """Convert OpenAI-format messages to the format expected by HF processors. + + All modalities extract text. VLM additionally handles ``image_url`` and ``video_url``. + MULTIMODAL handles all of the above plus ``input_audio`` and ``audio_url``. + For LLMs, the content parts are collapsed into a plain text string. + + Args: + messages (`list[dict]`): OpenAI-format chat messages. + modality (`Modality`): The model modality (LLM, VLM, or MULTIMODAL). + + Returns: + `list[dict]`: Processor-compatible messages. + """ + processor_inputs = [] + + for message in messages: + parsed = {"role": message["role"], "content": []} + + # Forward tool-use fields so apply_chat_template can handle multi-turn tool conversations + if "tool_calls" in message: + parsed["tool_calls"] = message["tool_calls"] + if "tool_call_id" in message: + parsed["tool_call_id"] = message["tool_call_id"] + + # When tool_calls are present, ignore content — it's either empty or contains + # raw tool call markup that would confuse the chat template if rendered. + raw_content = [] if "tool_calls" in message else (message.get("content") or []) + if isinstance(raw_content, str): + raw_content = [{"type": "text", "text": raw_content}] + + for content in raw_content: + content_type = content["type"] + # Text: chat completions ("text") and Responses API ("input_text") + if content_type in ("text", "input_text", "output_text"): + parsed["content"].append({"type": "text", "text": content["text"]}) + # Image: chat completions ("image_url") and Responses API ("input_image") + elif content_type in ("image_url", "input_image") and modality in (Modality.VLM, Modality.MULTIMODAL): + # chat completions: {"image_url": {"url": "..."}}, Responses API: {"image_url": "..."} + url = content["image_url"] + if isinstance(url, dict): + url = url["url"] + parsed["content"].append({"type": "image", "url": url}) + # Audio: unlike images, load_audio doesn't accept raw base64 — wrap as a data URI + elif content_type == "input_audio" and modality == Modality.MULTIMODAL: + input_audio = content["input_audio"] + fmt = input_audio.get("format", "wav") if isinstance(input_audio, dict) else "wav" + audio_b64 = input_audio["data"] + parsed["content"].append({"type": "audio", "url": f"data:audio/{fmt};base64,{audio_b64}"}) + # Extensions (not part of the OpenAI API standard) + elif content_type == "video_url" and modality in (Modality.VLM, Modality.MULTIMODAL): + parsed["content"].append({"type": "video", "url": content["video_url"]["url"]}) + elif content_type == "audio_url" and modality == Modality.MULTIMODAL: + parsed["content"].append({"type": "audio", "url": content["audio_url"]["url"]}) + + # LLMs expect plain text, not a list of content parts + if modality == Modality.LLM: + parsed["content"] = " ".join(c["text"] for c in parsed["content"]) + + processor_inputs.append(parsed) + return processor_inputs diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b2c278f4d5754afdf5a34c5d7e26f7d836c494c6 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/__pycache__/data_collator.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/__pycache__/data_collator.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f16cfe81a4e44d8acbff10e1d7f4d6c0d9cbd35c Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/__pycache__/data_collator.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..83d14268a6aca724467c5e967e5849954eda3798 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__init__.py @@ -0,0 +1,16 @@ +# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# 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. + +from .glue import GlueDataset, GlueDataTrainingArguments +from .squad import SquadDataset, SquadDataTrainingArguments diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..07082bc3f05584f9f7b38b2f0b0e78fd1bd05e94 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/glue.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/glue.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d1b82063c9358da0c64c51017881326434168231 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/glue.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/squad.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/squad.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad993a2a2b3997f38174440394d3dfc966a5b9d9 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/__pycache__/squad.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/glue.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/glue.py new file mode 100644 index 0000000000000000000000000000000000000000..644c582b5ed1eeeff8fd6ac77881e00e21abd114 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/glue.py @@ -0,0 +1,156 @@ +# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# 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. + +import os +import time +import warnings +from dataclasses import dataclass, field +from enum import Enum + +import torch +from filelock import FileLock +from torch.utils.data import Dataset + +from ...tokenization_utils_base import PreTrainedTokenizerBase +from ...utils import check_torch_load_is_safe, logging +from ..processors.glue import glue_convert_examples_to_features, glue_output_modes, glue_processors +from ..processors.utils import InputFeatures + + +logger = logging.get_logger(__name__) + + +@dataclass +class GlueDataTrainingArguments: + """ + Arguments pertaining to what data we are going to input our model for training and eval. + + Using `HfArgumentParser` we can turn this class into argparse arguments to be able to specify them on the command + line. + """ + + task_name: str = field(metadata={"help": "The name of the task to train on: " + ", ".join(glue_processors.keys())}) + data_dir: str = field( + metadata={"help": "The input data dir. Should contain the .tsv files (or other data files) for the task."} + ) + max_seq_length: int = field( + default=128, + metadata={ + "help": ( + "The maximum total input sequence length after tokenization. Sequences longer " + "than this will be truncated, sequences shorter will be padded." + ) + }, + ) + overwrite_cache: bool = field( + default=False, metadata={"help": "Overwrite the cached training and evaluation sets"} + ) + + def __post_init__(self): + self.task_name = self.task_name.lower() + + +class Split(Enum): + train = "train" + dev = "dev" + test = "test" + + +class GlueDataset(Dataset): + args: GlueDataTrainingArguments + output_mode: str + features: list[InputFeatures] + + def __init__( + self, + args: GlueDataTrainingArguments, + tokenizer: PreTrainedTokenizerBase, + limit_length: int | None = None, + mode: str | Split = Split.train, + cache_dir: str | None = None, + ): + warnings.warn( + "This dataset will be removed from the library soon, preprocessing should be handled with the Hugging Face Datasets " + "library. You can have a look at this example script for pointers: " + "https://github.com/huggingface/transformers/blob/main/examples/pytorch/text-classification/run_glue.py", + FutureWarning, + ) + self.args = args + self.processor = glue_processors[args.task_name]() + self.output_mode = glue_output_modes[args.task_name] + if isinstance(mode, str): + try: + mode = Split[mode] + except KeyError: + raise KeyError("mode is not a valid split name") + # Load data features from cache or dataset file + cached_features_file = os.path.join( + cache_dir if cache_dir is not None else args.data_dir, + f"cached_{mode.value}_{tokenizer.__class__.__name__}_{args.max_seq_length}_{args.task_name}", + ) + label_list = self.processor.get_labels() + if args.task_name in ["mnli", "mnli-mm"] and tokenizer.__class__.__name__ in ( + "RobertaTokenizer", + "XLMRobertaTokenizer", + "BartTokenizer", + "BartTokenizerFast", + ): + # HACK(label indices are swapped in RoBERTa pretrained model) + label_list[1], label_list[2] = label_list[2], label_list[1] + self.label_list = label_list + + # Make sure only the first process in distributed training processes the dataset, + # and the others will use the cache. + lock_path = cached_features_file + ".lock" + with FileLock(lock_path): + if os.path.exists(cached_features_file) and not args.overwrite_cache: + start = time.time() + check_torch_load_is_safe() + self.features = torch.load(cached_features_file, weights_only=True) + logger.info( + f"Loading features from cached file {cached_features_file} [took %.3f s]", time.time() - start + ) + else: + logger.info(f"Creating features from dataset file at {args.data_dir}") + + if mode == Split.dev: + examples = self.processor.get_dev_examples(args.data_dir) + elif mode == Split.test: + examples = self.processor.get_test_examples(args.data_dir) + else: + examples = self.processor.get_train_examples(args.data_dir) + if limit_length is not None: + examples = examples[:limit_length] + self.features = glue_convert_examples_to_features( + examples, + tokenizer, + max_length=args.max_seq_length, + label_list=label_list, + output_mode=self.output_mode, + ) + start = time.time() + torch.save(self.features, cached_features_file) + # ^ This seems to take a lot of time so I want to investigate why and how we can improve. + logger.info( + f"Saving features into cached file {cached_features_file} [took {time.time() - start:.3f} s]" + ) + + def __len__(self): + return len(self.features) + + def __getitem__(self, i) -> InputFeatures: + return self.features[i] + + def get_labels(self): + return self.label_list diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/squad.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/squad.py new file mode 100644 index 0000000000000000000000000000000000000000..ba8936a5d64223156ea9635048f969df72d87bae --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/datasets/squad.py @@ -0,0 +1,225 @@ +# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# 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. + +import os +import time +from dataclasses import dataclass, field +from enum import Enum + +import torch +from filelock import FileLock +from torch.utils.data import Dataset + +from ...models.auto.modeling_auto import MODEL_FOR_QUESTION_ANSWERING_MAPPING +from ...tokenization_python import PreTrainedTokenizer +from ...utils import check_torch_load_is_safe, logging +from ..processors.squad import SquadFeatures, SquadV1Processor, SquadV2Processor, squad_convert_examples_to_features + + +logger = logging.get_logger(__name__) + +MODEL_CONFIG_CLASSES = list(MODEL_FOR_QUESTION_ANSWERING_MAPPING.keys()) +MODEL_TYPES = tuple(conf.model_type for conf in MODEL_CONFIG_CLASSES) + + +@dataclass +class SquadDataTrainingArguments: + """ + Arguments pertaining to what data we are going to input our model for training and eval. + """ + + model_type: str = field( + default=None, metadata={"help": "Model type selected in the list: " + ", ".join(MODEL_TYPES)} + ) + data_dir: str = field( + default=None, metadata={"help": "The input data dir. Should contain the .json files for the SQuAD task."} + ) + max_seq_length: int = field( + default=128, + metadata={ + "help": ( + "The maximum total input sequence length after tokenization. Sequences longer " + "than this will be truncated, sequences shorter will be padded." + ) + }, + ) + doc_stride: int = field( + default=128, + metadata={"help": "When splitting up a long document into chunks, how much stride to take between chunks."}, + ) + max_query_length: int = field( + default=64, + metadata={ + "help": ( + "The maximum number of tokens for the question. Questions longer than this will " + "be truncated to this length." + ) + }, + ) + max_answer_length: int = field( + default=30, + metadata={ + "help": ( + "The maximum length of an answer that can be generated. This is needed because the start " + "and end predictions are not conditioned on one another." + ) + }, + ) + overwrite_cache: bool = field( + default=False, metadata={"help": "Overwrite the cached training and evaluation sets"} + ) + version_2_with_negative: bool = field( + default=False, metadata={"help": "If true, the SQuAD examples contain some that do not have an answer."} + ) + null_score_diff_threshold: float = field( + default=0.0, metadata={"help": "If null_score - best_non_null is greater than the threshold predict null."} + ) + n_best_size: int = field( + default=20, metadata={"help": "If null_score - best_non_null is greater than the threshold predict null."} + ) + lang_id: int = field( + default=0, + metadata={ + "help": ( + "language id of input for language-specific xlm models (see" + " tokenization_xlm.PRETRAINED_INIT_CONFIGURATION)" + ) + }, + ) + threads: int = field(default=1, metadata={"help": "multiple threads for converting example to features"}) + + +class Split(Enum): + train = "train" + dev = "dev" + + +class SquadDataset(Dataset): + args: SquadDataTrainingArguments + features: list[SquadFeatures] + mode: Split + is_language_sensitive: bool + + def __init__( + self, + args: SquadDataTrainingArguments, + tokenizer: PreTrainedTokenizer, + limit_length: int | None = None, + mode: str | Split = Split.train, + is_language_sensitive: bool = False, + cache_dir: str | None = None, + dataset_format: str = "pt", + ): + self.args = args + self.is_language_sensitive = is_language_sensitive + self.processor = SquadV2Processor() if args.version_2_with_negative else SquadV1Processor() + if isinstance(mode, str): + try: + mode = Split[mode] + except KeyError: + raise KeyError("mode is not a valid split name") + self.mode = mode + # Load data features from cache or dataset file + version_tag = "v2" if args.version_2_with_negative else "v1" + cached_features_file = os.path.join( + cache_dir if cache_dir is not None else args.data_dir, + f"cached_{mode.value}_{tokenizer.__class__.__name__}_{args.max_seq_length}_{version_tag}", + ) + + # Make sure only the first process in distributed training processes the dataset, + # and the others will use the cache. + lock_path = cached_features_file + ".lock" + with FileLock(lock_path): + if os.path.exists(cached_features_file) and not args.overwrite_cache: + start = time.time() + check_torch_load_is_safe() + self.old_features = torch.load(cached_features_file, weights_only=True) + + # Legacy cache files have only features, while new cache files + # will have dataset and examples also. + self.features = self.old_features["features"] + self.dataset = self.old_features.get("dataset", None) + self.examples = self.old_features.get("examples", None) + logger.info( + f"Loading features from cached file {cached_features_file} [took %.3f s]", time.time() - start + ) + + if self.dataset is None or self.examples is None: + logger.warning( + f"Deleting cached file {cached_features_file} will allow dataset and examples to be cached in" + " future run" + ) + else: + if mode == Split.dev: + self.examples = self.processor.get_dev_examples(args.data_dir) + else: + self.examples = self.processor.get_train_examples(args.data_dir) + + self.features, self.dataset = squad_convert_examples_to_features( + examples=self.examples, + tokenizer=tokenizer, + max_seq_length=args.max_seq_length, + doc_stride=args.doc_stride, + max_query_length=args.max_query_length, + is_training=mode == Split.train, + threads=args.threads, + return_dataset=dataset_format, + ) + + start = time.time() + torch.save( + {"features": self.features, "dataset": self.dataset, "examples": self.examples}, + cached_features_file, + ) + # ^ This seems to take a lot of time so I want to investigate why and how we can improve. + logger.info( + f"Saving features into cached file {cached_features_file} [took {time.time() - start:.3f} s]" + ) + + def __len__(self): + return len(self.features) + + def __getitem__(self, i) -> dict[str, torch.Tensor]: + # Convert to Tensors and build dataset + feature = self.features[i] + + input_ids = torch.tensor(feature.input_ids, dtype=torch.long) + attention_mask = torch.tensor(feature.attention_mask, dtype=torch.long) + token_type_ids = torch.tensor(feature.token_type_ids, dtype=torch.long) + cls_index = torch.tensor(feature.cls_index, dtype=torch.long) + p_mask = torch.tensor(feature.p_mask, dtype=torch.float) + is_impossible = torch.tensor(feature.is_impossible, dtype=torch.float) + + inputs = { + "input_ids": input_ids, + "attention_mask": attention_mask, + "token_type_ids": token_type_ids, + } + + if self.args.model_type in ["xlm", "roberta", "distilbert", "camembert"]: + del inputs["token_type_ids"] + + if self.args.model_type in ["xlnet", "xlm"]: + inputs.update({"cls_index": cls_index, "p_mask": p_mask}) + if self.args.version_2_with_negative: + inputs.update({"is_impossible": is_impossible}) + if self.is_language_sensitive: + inputs.update({"langs": (torch.ones(input_ids.shape, dtype=torch.int64) * self.args.lang_id)}) + + if self.mode == Split.train: + start_positions = torch.tensor(feature.start_position, dtype=torch.long) + end_positions = torch.tensor(feature.end_position, dtype=torch.long) + inputs.update({"start_positions": start_positions, "end_positions": end_positions}) + + return inputs diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f8a48ef7dcde7b02bd846c46045b60e54e165e5f --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__init__.py @@ -0,0 +1,98 @@ +# 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. + +import warnings + +from ...utils import is_sklearn_available, requires_backends + + +if is_sklearn_available(): + from scipy.stats import pearsonr, spearmanr + from sklearn.metrics import f1_score, matthews_corrcoef + + +DEPRECATION_WARNING = ( + "This metric will be removed from the library soon, metrics should be handled with the Hugging Face Evaluate " + "library. You can have a look at this example script for pointers: " + "https://github.com/huggingface/transformers/blob/main/examples/pytorch/text-classification/run_glue.py" +) + + +def simple_accuracy(preds, labels): + warnings.warn(DEPRECATION_WARNING, FutureWarning) + requires_backends(simple_accuracy, "sklearn") + return (preds == labels).mean() + + +def acc_and_f1(preds, labels): + warnings.warn(DEPRECATION_WARNING, FutureWarning) + requires_backends(acc_and_f1, "sklearn") + acc = simple_accuracy(preds, labels) + f1 = f1_score(y_true=labels, y_pred=preds) + return { + "acc": acc, + "f1": f1, + "acc_and_f1": (acc + f1) / 2, + } + + +def pearson_and_spearman(preds, labels): + warnings.warn(DEPRECATION_WARNING, FutureWarning) + requires_backends(pearson_and_spearman, "sklearn") + pearson_corr = pearsonr(preds, labels)[0] + spearman_corr = spearmanr(preds, labels)[0] + return { + "pearson": pearson_corr, + "spearmanr": spearman_corr, + "corr": (pearson_corr + spearman_corr) / 2, + } + + +def glue_compute_metrics(task_name, preds, labels): + warnings.warn(DEPRECATION_WARNING, FutureWarning) + requires_backends(glue_compute_metrics, "sklearn") + assert len(preds) == len(labels), f"Predictions and labels have mismatched lengths {len(preds)} and {len(labels)}" + if task_name == "cola": + return {"mcc": matthews_corrcoef(labels, preds)} + elif task_name == "sst-2": + return {"acc": simple_accuracy(preds, labels)} + elif task_name == "mrpc": + return acc_and_f1(preds, labels) + elif task_name == "sts-b": + return pearson_and_spearman(preds, labels) + elif task_name == "qqp": + return acc_and_f1(preds, labels) + elif task_name == "mnli": + return {"mnli/acc": simple_accuracy(preds, labels)} + elif task_name == "mnli-mm": + return {"mnli-mm/acc": simple_accuracy(preds, labels)} + elif task_name == "qnli": + return {"acc": simple_accuracy(preds, labels)} + elif task_name == "rte": + return {"acc": simple_accuracy(preds, labels)} + elif task_name == "wnli": + return {"acc": simple_accuracy(preds, labels)} + elif task_name == "hans": + return {"acc": simple_accuracy(preds, labels)} + else: + raise KeyError(task_name) + + +def xnli_compute_metrics(task_name, preds, labels): + warnings.warn(DEPRECATION_WARNING, FutureWarning) + requires_backends(xnli_compute_metrics, "sklearn") + if len(preds) != len(labels): + raise ValueError(f"Predictions and labels have mismatched lengths {len(preds)} and {len(labels)}") + if task_name == "xnli": + return {"acc": simple_accuracy(preds, labels)} + else: + raise KeyError(task_name) diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..54f7b10d8b28121a68ed5485de86128f77bcc4ae Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__pycache__/squad_metrics.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__pycache__/squad_metrics.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..60c47b4f03f2a90ec8f0f35404f63f4a21bfbf09 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/__pycache__/squad_metrics.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/squad_metrics.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/squad_metrics.py new file mode 100644 index 0000000000000000000000000000000000000000..0ffc025b65a0451523004df12f5a4ae5e9d17b9a --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/metrics/squad_metrics.py @@ -0,0 +1,779 @@ +# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# 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. +""" +Very heavily inspired by the official evaluation script for SQuAD version 2.0 which was modified by XLNet authors to +update `find_best_threshold` scripts for SQuAD V2.0 + +In addition to basic functionality, we also compute additional statistics and plot precision-recall curves if an +additional na_prob.json file is provided. This file is expected to map question ID's to the model's predicted +probability that a question is unanswerable. +""" + +import collections +import json +import math +import re +import string + +from ...models.bert import BasicTokenizer +from ...utils import logging + + +logger = logging.get_logger(__name__) + + +def normalize_answer(s): + """Lower text and remove punctuation, articles and extra whitespace.""" + + def remove_articles(text): + regex = re.compile(r"\b(a|an|the)\b", re.UNICODE) + return re.sub(regex, " ", text) + + def white_space_fix(text): + return " ".join(text.split()) + + def remove_punc(text): + exclude = set(string.punctuation) + return "".join(ch for ch in text if ch not in exclude) + + def lower(text): + return text.lower() + + return white_space_fix(remove_articles(remove_punc(lower(s)))) + + +def get_tokens(s): + if not s: + return [] + return normalize_answer(s).split() + + +def compute_exact(a_gold, a_pred): + return int(normalize_answer(a_gold) == normalize_answer(a_pred)) + + +def compute_f1(a_gold, a_pred): + gold_toks = get_tokens(a_gold) + pred_toks = get_tokens(a_pred) + common = collections.Counter(gold_toks) & collections.Counter(pred_toks) + num_same = sum(common.values()) + if len(gold_toks) == 0 or len(pred_toks) == 0: + # If either is no-answer, then F1 is 1 if they agree, 0 otherwise + return int(gold_toks == pred_toks) + if num_same == 0: + return 0 + precision = 1.0 * num_same / len(pred_toks) + recall = 1.0 * num_same / len(gold_toks) + f1 = (2 * precision * recall) / (precision + recall) + return f1 + + +def get_raw_scores(examples, preds): + """ + Computes the exact and f1 scores from the examples and the model predictions + """ + exact_scores = {} + f1_scores = {} + + for example in examples: + qas_id = example.qas_id + gold_answers = [answer["text"] for answer in example.answers if normalize_answer(answer["text"])] + + if not gold_answers: + # For unanswerable questions, only correct answer is empty string + gold_answers = [""] + + if qas_id not in preds: + print(f"Missing prediction for {qas_id}") + continue + + prediction = preds[qas_id] + exact_scores[qas_id] = max(compute_exact(a, prediction) for a in gold_answers) + f1_scores[qas_id] = max(compute_f1(a, prediction) for a in gold_answers) + + return exact_scores, f1_scores + + +def apply_no_ans_threshold(scores, na_probs, qid_to_has_ans, na_prob_thresh): + new_scores = {} + for qid, s in scores.items(): + pred_na = na_probs[qid] > na_prob_thresh + if pred_na: + new_scores[qid] = float(not qid_to_has_ans[qid]) + else: + new_scores[qid] = s + return new_scores + + +def make_eval_dict(exact_scores, f1_scores, qid_list=None): + if not qid_list: + total = len(exact_scores) + return collections.OrderedDict( + [ + ("exact", 100.0 * sum(exact_scores.values()) / total), + ("f1", 100.0 * sum(f1_scores.values()) / total), + ("total", total), + ] + ) + else: + total = len(qid_list) + return collections.OrderedDict( + [ + ("exact", 100.0 * sum(exact_scores[k] for k in qid_list) / total), + ("f1", 100.0 * sum(f1_scores[k] for k in qid_list) / total), + ("total", total), + ] + ) + + +def merge_eval(main_eval, new_eval, prefix): + for k in new_eval: + main_eval[f"{prefix}_{k}"] = new_eval[k] + + +def find_best_thresh_v2(preds, scores, na_probs, qid_to_has_ans): + num_no_ans = sum(1 for k in qid_to_has_ans if not qid_to_has_ans[k]) + cur_score = num_no_ans + best_score = cur_score + best_thresh = 0.0 + qid_list = sorted(na_probs, key=lambda k: na_probs[k]) + for qid in qid_list: + if qid not in scores: + continue + if qid_to_has_ans[qid]: + diff = scores[qid] + else: + if preds[qid]: + diff = -1 + else: + diff = 0 + cur_score += diff + if cur_score > best_score: + best_score = cur_score + best_thresh = na_probs[qid] + + has_ans_score, has_ans_cnt = 0, 0 + for qid in qid_list: + if not qid_to_has_ans[qid]: + continue + has_ans_cnt += 1 + + if qid not in scores: + continue + has_ans_score += scores[qid] + + return 100.0 * best_score / len(scores), best_thresh, 1.0 * has_ans_score / has_ans_cnt + + +def find_all_best_thresh_v2(main_eval, preds, exact_raw, f1_raw, na_probs, qid_to_has_ans): + best_exact, exact_thresh, has_ans_exact = find_best_thresh_v2(preds, exact_raw, na_probs, qid_to_has_ans) + best_f1, f1_thresh, has_ans_f1 = find_best_thresh_v2(preds, f1_raw, na_probs, qid_to_has_ans) + main_eval["best_exact"] = best_exact + main_eval["best_exact_thresh"] = exact_thresh + main_eval["best_f1"] = best_f1 + main_eval["best_f1_thresh"] = f1_thresh + main_eval["has_ans_exact"] = has_ans_exact + main_eval["has_ans_f1"] = has_ans_f1 + + +def find_best_thresh(preds, scores, na_probs, qid_to_has_ans): + num_no_ans = sum(1 for k in qid_to_has_ans if not qid_to_has_ans[k]) + cur_score = num_no_ans + best_score = cur_score + best_thresh = 0.0 + qid_list = sorted(na_probs, key=lambda k: na_probs[k]) + for _, qid in enumerate(qid_list): + if qid not in scores: + continue + if qid_to_has_ans[qid]: + diff = scores[qid] + else: + if preds[qid]: + diff = -1 + else: + diff = 0 + cur_score += diff + if cur_score > best_score: + best_score = cur_score + best_thresh = na_probs[qid] + return 100.0 * best_score / len(scores), best_thresh + + +def find_all_best_thresh(main_eval, preds, exact_raw, f1_raw, na_probs, qid_to_has_ans): + best_exact, exact_thresh = find_best_thresh(preds, exact_raw, na_probs, qid_to_has_ans) + best_f1, f1_thresh = find_best_thresh(preds, f1_raw, na_probs, qid_to_has_ans) + + main_eval["best_exact"] = best_exact + main_eval["best_exact_thresh"] = exact_thresh + main_eval["best_f1"] = best_f1 + main_eval["best_f1_thresh"] = f1_thresh + + +def squad_evaluate(examples, preds, no_answer_probs=None, no_answer_probability_threshold=1.0): + qas_id_to_has_answer = {example.qas_id: bool(example.answers) for example in examples} + has_answer_qids = [qas_id for qas_id, has_answer in qas_id_to_has_answer.items() if has_answer] + no_answer_qids = [qas_id for qas_id, has_answer in qas_id_to_has_answer.items() if not has_answer] + + if no_answer_probs is None: + no_answer_probs = dict.fromkeys(preds, 0.0) + + exact, f1 = get_raw_scores(examples, preds) + + exact_threshold = apply_no_ans_threshold( + exact, no_answer_probs, qas_id_to_has_answer, no_answer_probability_threshold + ) + f1_threshold = apply_no_ans_threshold(f1, no_answer_probs, qas_id_to_has_answer, no_answer_probability_threshold) + + evaluation = make_eval_dict(exact_threshold, f1_threshold) + + if has_answer_qids: + has_ans_eval = make_eval_dict(exact_threshold, f1_threshold, qid_list=has_answer_qids) + merge_eval(evaluation, has_ans_eval, "HasAns") + + if no_answer_qids: + no_ans_eval = make_eval_dict(exact_threshold, f1_threshold, qid_list=no_answer_qids) + merge_eval(evaluation, no_ans_eval, "NoAns") + + if no_answer_probs: + find_all_best_thresh(evaluation, preds, exact, f1, no_answer_probs, qas_id_to_has_answer) + + return evaluation + + +def get_final_text(pred_text, orig_text, do_lower_case, verbose_logging=False): + """Project the tokenized prediction back to the original text.""" + + # When we created the data, we kept track of the alignment between original + # (whitespace tokenized) tokens and our WordPiece tokenized tokens. So + # now `orig_text` contains the span of our original text corresponding to the + # span that we predicted. + # + # However, `orig_text` may contain extra characters that we don't want in + # our prediction. + # + # For example, let's say: + # pred_text = steve smith + # orig_text = Steve Smith's + # + # We don't want to return `orig_text` because it contains the extra "'s". + # + # We don't want to return `pred_text` because it's already been normalized + # (the SQuAD eval script also does punctuation stripping/lower casing but + # our tokenizer does additional normalization like stripping accent + # characters). + # + # What we really want to return is "Steve Smith". + # + # Therefore, we have to apply a semi-complicated alignment heuristic between + # `pred_text` and `orig_text` to get a character-to-character alignment. This + # can fail in certain cases in which case we just return `orig_text`. + + def _strip_spaces(text): + ns_chars = [] + ns_to_s_map = collections.OrderedDict() + for i, c in enumerate(text): + if c == " ": + continue + ns_to_s_map[len(ns_chars)] = i + ns_chars.append(c) + ns_text = "".join(ns_chars) + return (ns_text, ns_to_s_map) + + # We first tokenize `orig_text`, strip whitespace from the result + # and `pred_text`, and check if they are the same length. If they are + # NOT the same length, the heuristic has failed. If they are the same + # length, we assume the characters are one-to-one aligned. + tokenizer = BasicTokenizer(do_lower_case=do_lower_case) + + tok_text = " ".join(tokenizer.tokenize(orig_text)) + + start_position = tok_text.find(pred_text) + if start_position == -1: + if verbose_logging: + logger.info(f"Unable to find text: '{pred_text}' in '{orig_text}'") + return orig_text + end_position = start_position + len(pred_text) - 1 + + (orig_ns_text, orig_ns_to_s_map) = _strip_spaces(orig_text) + (tok_ns_text, tok_ns_to_s_map) = _strip_spaces(tok_text) + + if len(orig_ns_text) != len(tok_ns_text): + if verbose_logging: + logger.info(f"Length not equal after stripping spaces: '{orig_ns_text}' vs '{tok_ns_text}'") + return orig_text + + # We then project the characters in `pred_text` back to `orig_text` using + # the character-to-character alignment. + tok_s_to_ns_map = {} + for i, tok_index in tok_ns_to_s_map.items(): + tok_s_to_ns_map[tok_index] = i + + orig_start_position = None + if start_position in tok_s_to_ns_map: + ns_start_position = tok_s_to_ns_map[start_position] + if ns_start_position in orig_ns_to_s_map: + orig_start_position = orig_ns_to_s_map[ns_start_position] + + if orig_start_position is None: + if verbose_logging: + logger.info("Couldn't map start position") + return orig_text + + orig_end_position = None + if end_position in tok_s_to_ns_map: + ns_end_position = tok_s_to_ns_map[end_position] + if ns_end_position in orig_ns_to_s_map: + orig_end_position = orig_ns_to_s_map[ns_end_position] + + if orig_end_position is None: + if verbose_logging: + logger.info("Couldn't map end position") + return orig_text + + output_text = orig_text[orig_start_position : (orig_end_position + 1)] + return output_text + + +def _get_best_indexes(logits, n_best_size): + """Get the n-best logits from a list.""" + index_and_score = sorted(enumerate(logits), key=lambda x: x[1], reverse=True) + + best_indexes = [] + for i in range(len(index_and_score)): + if i >= n_best_size: + break + best_indexes.append(index_and_score[i][0]) + return best_indexes + + +def _compute_softmax(scores): + """Compute softmax probability over raw logits.""" + if not scores: + return [] + + max_score = None + for score in scores: + if max_score is None or score > max_score: + max_score = score + + exp_scores = [] + total_sum = 0.0 + for score in scores: + x = math.exp(score - max_score) + exp_scores.append(x) + total_sum += x + + probs = [] + for score in exp_scores: + probs.append(score / total_sum) + return probs + + +def compute_predictions_logits( + all_examples, + all_features, + all_results, + n_best_size, + max_answer_length, + do_lower_case, + output_prediction_file, + output_nbest_file, + output_null_log_odds_file, + verbose_logging, + version_2_with_negative, + null_score_diff_threshold, + tokenizer, +): + """Write final predictions to the json file and log-odds of null if needed.""" + if output_prediction_file: + logger.info(f"Writing predictions to: {output_prediction_file}") + if output_nbest_file: + logger.info(f"Writing nbest to: {output_nbest_file}") + if output_null_log_odds_file and version_2_with_negative: + logger.info(f"Writing null_log_odds to: {output_null_log_odds_file}") + + example_index_to_features = collections.defaultdict(list) + for feature in all_features: + example_index_to_features[feature.example_index].append(feature) + + unique_id_to_result = {} + for result in all_results: + unique_id_to_result[result.unique_id] = result + + _PrelimPrediction = collections.namedtuple( # pylint: disable=invalid-name + "PrelimPrediction", ["feature_index", "start_index", "end_index", "start_logit", "end_logit"] + ) + + all_predictions = collections.OrderedDict() + all_nbest_json = collections.OrderedDict() + scores_diff_json = collections.OrderedDict() + + for example_index, example in enumerate(all_examples): + features = example_index_to_features[example_index] + + prelim_predictions = [] + # keep track of the minimum score of null start+end of position 0 + score_null = 1000000 # large and positive + min_null_feature_index = 0 # the paragraph slice with min null score + null_start_logit = 0 # the start logit at the slice with min null score + null_end_logit = 0 # the end logit at the slice with min null score + for feature_index, feature in enumerate(features): + result = unique_id_to_result[feature.unique_id] + start_indexes = _get_best_indexes(result.start_logits, n_best_size) + end_indexes = _get_best_indexes(result.end_logits, n_best_size) + # if we could have irrelevant answers, get the min score of irrelevant + if version_2_with_negative: + feature_null_score = result.start_logits[0] + result.end_logits[0] + if feature_null_score < score_null: + score_null = feature_null_score + min_null_feature_index = feature_index + null_start_logit = result.start_logits[0] + null_end_logit = result.end_logits[0] + for start_index in start_indexes: + for end_index in end_indexes: + # We could hypothetically create invalid predictions, e.g., predict + # that the start of the span is in the question. We throw out all + # invalid predictions. + if start_index >= len(feature.tokens): + continue + if end_index >= len(feature.tokens): + continue + if start_index not in feature.token_to_orig_map: + continue + if end_index not in feature.token_to_orig_map: + continue + if not feature.token_is_max_context.get(start_index, False): + continue + if end_index < start_index: + continue + length = end_index - start_index + 1 + if length > max_answer_length: + continue + prelim_predictions.append( + _PrelimPrediction( + feature_index=feature_index, + start_index=start_index, + end_index=end_index, + start_logit=result.start_logits[start_index], + end_logit=result.end_logits[end_index], + ) + ) + if version_2_with_negative: + prelim_predictions.append( + _PrelimPrediction( + feature_index=min_null_feature_index, + start_index=0, + end_index=0, + start_logit=null_start_logit, + end_logit=null_end_logit, + ) + ) + prelim_predictions = sorted(prelim_predictions, key=lambda x: (x.start_logit + x.end_logit), reverse=True) + + _NbestPrediction = collections.namedtuple( # pylint: disable=invalid-name + "NbestPrediction", ["text", "start_logit", "end_logit"] + ) + + seen_predictions = {} + nbest = [] + for pred in prelim_predictions: + if len(nbest) >= n_best_size: + break + feature = features[pred.feature_index] + if pred.start_index > 0: # this is a non-null prediction + tok_tokens = feature.tokens[pred.start_index : (pred.end_index + 1)] + orig_doc_start = feature.token_to_orig_map[pred.start_index] + orig_doc_end = feature.token_to_orig_map[pred.end_index] + orig_tokens = example.doc_tokens[orig_doc_start : (orig_doc_end + 1)] + + tok_text = tokenizer.convert_tokens_to_string(tok_tokens) + + # tok_text = " ".join(tok_tokens) + # + # # De-tokenize WordPieces that have been split off. + # tok_text = tok_text.replace(" ##", "") + # tok_text = tok_text.replace("##", "") + + # Clean whitespace + tok_text = tok_text.strip() + tok_text = " ".join(tok_text.split()) + orig_text = " ".join(orig_tokens) + + final_text = get_final_text(tok_text, orig_text, do_lower_case, verbose_logging) + if final_text in seen_predictions: + continue + + seen_predictions[final_text] = True + else: + final_text = "" + seen_predictions[final_text] = True + + nbest.append(_NbestPrediction(text=final_text, start_logit=pred.start_logit, end_logit=pred.end_logit)) + # if we didn't include the empty option in the n-best, include it + if version_2_with_negative: + if "" not in seen_predictions: + nbest.append(_NbestPrediction(text="", start_logit=null_start_logit, end_logit=null_end_logit)) + + # In very rare edge cases we could only have single null prediction. + # So we just create a nonce prediction in this case to avoid failure. + if len(nbest) == 1: + nbest.insert(0, _NbestPrediction(text="empty", start_logit=0.0, end_logit=0.0)) + + # In very rare edge cases we could have no valid predictions. So we + # just create a nonce prediction in this case to avoid failure. + if not nbest: + nbest.append(_NbestPrediction(text="empty", start_logit=0.0, end_logit=0.0)) + + if len(nbest) < 1: + raise ValueError("No valid predictions") + + total_scores = [] + best_non_null_entry = None + for entry in nbest: + total_scores.append(entry.start_logit + entry.end_logit) + if not best_non_null_entry: + if entry.text: + best_non_null_entry = entry + + probs = _compute_softmax(total_scores) + + nbest_json = [] + for i, entry in enumerate(nbest): + output = collections.OrderedDict() + output["text"] = entry.text + output["probability"] = probs[i] + output["start_logit"] = entry.start_logit + output["end_logit"] = entry.end_logit + nbest_json.append(output) + + if len(nbest_json) < 1: + raise ValueError("No valid predictions") + + if not version_2_with_negative: + all_predictions[example.qas_id] = nbest_json[0]["text"] + else: + # predict "" iff the null score - the score of best non-null > threshold + score_diff = score_null - best_non_null_entry.start_logit - (best_non_null_entry.end_logit) + scores_diff_json[example.qas_id] = score_diff + if score_diff > null_score_diff_threshold: + all_predictions[example.qas_id] = "" + else: + all_predictions[example.qas_id] = best_non_null_entry.text + all_nbest_json[example.qas_id] = nbest_json + + if output_prediction_file: + with open(output_prediction_file, "w") as writer: + writer.write(json.dumps(all_predictions, indent=4) + "\n") + + if output_nbest_file: + with open(output_nbest_file, "w") as writer: + writer.write(json.dumps(all_nbest_json, indent=4) + "\n") + + if output_null_log_odds_file and version_2_with_negative: + with open(output_null_log_odds_file, "w") as writer: + writer.write(json.dumps(scores_diff_json, indent=4) + "\n") + + return all_predictions + + +def compute_predictions_log_probs( + all_examples, + all_features, + all_results, + n_best_size, + max_answer_length, + output_prediction_file, + output_nbest_file, + output_null_log_odds_file, + start_n_top, + end_n_top, + version_2_with_negative, + tokenizer, + verbose_logging, +): + """ + XLNet write prediction logic (more complex than Bert's). Write final predictions to the json file and log-odds of + null if needed. + + Requires utils_squad_evaluate.py + """ + _PrelimPrediction = collections.namedtuple( # pylint: disable=invalid-name + "PrelimPrediction", ["feature_index", "start_index", "end_index", "start_log_prob", "end_log_prob"] + ) + + _NbestPrediction = collections.namedtuple( # pylint: disable=invalid-name + "NbestPrediction", ["text", "start_log_prob", "end_log_prob"] + ) + + logger.info(f"Writing predictions to: {output_prediction_file}") + + example_index_to_features = collections.defaultdict(list) + for feature in all_features: + example_index_to_features[feature.example_index].append(feature) + + unique_id_to_result = {} + for result in all_results: + unique_id_to_result[result.unique_id] = result + + all_predictions = collections.OrderedDict() + all_nbest_json = collections.OrderedDict() + scores_diff_json = collections.OrderedDict() + + for example_index, example in enumerate(all_examples): + features = example_index_to_features[example_index] + + prelim_predictions = [] + # keep track of the minimum score of null start+end of position 0 + score_null = 1000000 # large and positive + + for feature_index, feature in enumerate(features): + result = unique_id_to_result[feature.unique_id] + + cur_null_score = result.cls_logits + + # if we could have irrelevant answers, get the min score of irrelevant + score_null = min(score_null, cur_null_score) + + for i in range(start_n_top): + for j in range(end_n_top): + start_log_prob = result.start_logits[i] + start_index = result.start_top_index[i] + + j_index = i * end_n_top + j + + end_log_prob = result.end_logits[j_index] + end_index = result.end_top_index[j_index] + + # We could hypothetically create invalid predictions, e.g., predict + # that the start of the span is in the question. We throw out all + # invalid predictions. + if start_index >= feature.paragraph_len - 1: + continue + if end_index >= feature.paragraph_len - 1: + continue + + if not feature.token_is_max_context.get(start_index, False): + continue + if end_index < start_index: + continue + length = end_index - start_index + 1 + if length > max_answer_length: + continue + + prelim_predictions.append( + _PrelimPrediction( + feature_index=feature_index, + start_index=start_index, + end_index=end_index, + start_log_prob=start_log_prob, + end_log_prob=end_log_prob, + ) + ) + + prelim_predictions = sorted( + prelim_predictions, key=lambda x: (x.start_log_prob + x.end_log_prob), reverse=True + ) + + seen_predictions = {} + nbest = [] + for pred in prelim_predictions: + if len(nbest) >= n_best_size: + break + feature = features[pred.feature_index] + + # XLNet un-tokenizer + # Let's keep it simple for now and see if we need all this later. + # + # tok_start_to_orig_index = feature.tok_start_to_orig_index + # tok_end_to_orig_index = feature.tok_end_to_orig_index + # start_orig_pos = tok_start_to_orig_index[pred.start_index] + # end_orig_pos = tok_end_to_orig_index[pred.end_index] + # paragraph_text = example.paragraph_text + # final_text = paragraph_text[start_orig_pos: end_orig_pos + 1].strip() + + # Previously used Bert untokenizer + tok_tokens = feature.tokens[pred.start_index : (pred.end_index + 1)] + orig_doc_start = feature.token_to_orig_map[pred.start_index] + orig_doc_end = feature.token_to_orig_map[pred.end_index] + orig_tokens = example.doc_tokens[orig_doc_start : (orig_doc_end + 1)] + tok_text = tokenizer.convert_tokens_to_string(tok_tokens) + + # Clean whitespace + tok_text = tok_text.strip() + tok_text = " ".join(tok_text.split()) + orig_text = " ".join(orig_tokens) + + if hasattr(tokenizer, "do_lower_case"): + do_lower_case = tokenizer.do_lower_case + else: + do_lower_case = tokenizer.do_lowercase_and_remove_accent + + final_text = get_final_text(tok_text, orig_text, do_lower_case, verbose_logging) + + if final_text in seen_predictions: + continue + + seen_predictions[final_text] = True + + nbest.append( + _NbestPrediction(text=final_text, start_log_prob=pred.start_log_prob, end_log_prob=pred.end_log_prob) + ) + + # In very rare edge cases we could have no valid predictions. So we + # just create a nonce prediction in this case to avoid failure. + if not nbest: + nbest.append(_NbestPrediction(text="", start_log_prob=-1e6, end_log_prob=-1e6)) + + total_scores = [] + best_non_null_entry = None + for entry in nbest: + total_scores.append(entry.start_log_prob + entry.end_log_prob) + if not best_non_null_entry: + best_non_null_entry = entry + + probs = _compute_softmax(total_scores) + + nbest_json = [] + for i, entry in enumerate(nbest): + output = collections.OrderedDict() + output["text"] = entry.text + output["probability"] = probs[i] + output["start_log_prob"] = entry.start_log_prob + output["end_log_prob"] = entry.end_log_prob + nbest_json.append(output) + + if len(nbest_json) < 1: + raise ValueError("No valid predictions") + if best_non_null_entry is None: + raise ValueError("No valid predictions") + + score_diff = score_null + scores_diff_json[example.qas_id] = score_diff + # note(zhiliny): always predict best_non_null_entry + # and the evaluation script will search for the best threshold + all_predictions[example.qas_id] = best_non_null_entry.text + + all_nbest_json[example.qas_id] = nbest_json + + with open(output_prediction_file, "w") as writer: + writer.write(json.dumps(all_predictions, indent=4) + "\n") + + with open(output_nbest_file, "w") as writer: + writer.write(json.dumps(all_nbest_json, indent=4) + "\n") + + if version_2_with_negative: + with open(output_null_log_odds_file, "w") as writer: + writer.write(json.dumps(scores_diff_json, indent=4) + "\n") + + return all_predictions diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__init__.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..a26ab5776d74715428b10c4d9cd943e53b253785 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__init__.py @@ -0,0 +1,18 @@ +# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# 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. + +from .glue import glue_convert_examples_to_features, glue_output_modes, glue_processors, glue_tasks_num_labels +from .squad import SquadExample, SquadFeatures, SquadV1Processor, SquadV2Processor, squad_convert_examples_to_features +from .utils import DataProcessor, InputExample, InputFeatures, SingleSentenceClassificationProcessor +from .xnli import xnli_output_modes, xnli_processors, xnli_tasks_num_labels diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aaac1765c0f520a00c1efe583c501001352bdee1 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/glue.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/glue.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e721380c84af98c7d40cb8967eb7c9aaa61d2261 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/glue.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/squad.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/squad.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..94365027417ac2889599ea55421e392a73946a60 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/squad.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3f111c4abe8da6885f891f4de43e65cd3ab13d77 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/xnli.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/xnli.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a81635f102dd0604f11b8bc85f142c07ff68f03d Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/__pycache__/xnli.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/glue.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/glue.py new file mode 100644 index 0000000000000000000000000000000000000000..9e792369d41ca762bdb93bb38092dc439928bf9b --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/glue.py @@ -0,0 +1,598 @@ +# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# 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. +"""GLUE processors and helpers""" + +import os +import warnings +from enum import Enum + +from ...tokenization_python import PreTrainedTokenizer +from ...utils import logging +from .utils import DataProcessor, InputExample, InputFeatures + + +logger = logging.get_logger(__name__) + +DEPRECATION_WARNING = ( + "This {0} will be removed from the library soon, preprocessing should be handled with the Hugging Face Datasets " + "library. You can have a look at this example script for pointers: " + "https://github.com/huggingface/transformers/blob/main/examples/pytorch/text-classification/run_glue.py" +) + + +def glue_convert_examples_to_features( + examples: list[InputExample], + tokenizer: PreTrainedTokenizer, + max_length: int | None = None, + task=None, + label_list=None, + output_mode=None, +): + """ + Loads a data file into a list of `InputFeatures` + + Args: + examples: List of `InputExamples` containing the examples. + tokenizer: Instance of a tokenizer that will tokenize the examples + max_length: Maximum example length. Defaults to the tokenizer's max_len + task: GLUE task + label_list: List of labels. Can be obtained from the processor using the `processor.get_labels()` method + output_mode: String indicating the output mode. Either `regression` or `classification` + + Returns: + Will return a list of task-specific `InputFeatures` which can be fed to the model. + + """ + warnings.warn(DEPRECATION_WARNING.format("function"), FutureWarning) + return _glue_convert_examples_to_features( + examples, tokenizer, max_length=max_length, task=task, label_list=label_list, output_mode=output_mode + ) + + +def _glue_convert_examples_to_features( + examples: list[InputExample], + tokenizer: PreTrainedTokenizer, + max_length: int | None = None, + task=None, + label_list=None, + output_mode=None, +): + if max_length is None: + max_length = tokenizer.model_max_length + + if task is not None: + processor = glue_processors[task]() + if label_list is None: + label_list = processor.get_labels() + logger.info(f"Using label list {label_list} for task {task}") + if output_mode is None: + output_mode = glue_output_modes[task] + logger.info(f"Using output mode {output_mode} for task {task}") + + label_map = {label: i for i, label in enumerate(label_list)} + + def label_from_example(example: InputExample) -> int | float | None: + if example.label is None: + return None + if output_mode == "classification": + return label_map[example.label] + elif output_mode == "regression": + return float(example.label) + raise KeyError(output_mode) + + labels = [label_from_example(example) for example in examples] + + batch_encoding = tokenizer( + [(example.text_a, example.text_b) for example in examples], + max_length=max_length, + padding="max_length", + truncation=True, + ) + + features = [] + for i in range(len(examples)): + inputs = {k: batch_encoding[k][i] for k in batch_encoding} + + feature = InputFeatures(**inputs, label=labels[i]) + features.append(feature) + + for i, example in enumerate(examples[:5]): + logger.info("*** Example ***") + logger.info(f"guid: {example.guid}") + logger.info(f"features: {features[i]}") + + return features + + +class OutputMode(Enum): + classification = "classification" + regression = "regression" + + +class MrpcProcessor(DataProcessor): + """Processor for the MRPC data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["sentence1"].numpy().decode("utf-8"), + tensor_dict["sentence2"].numpy().decode("utf-8"), + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + logger.info(f"LOOKING AT {os.path.join(data_dir, 'train.tsv')}") + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return ["0", "1"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{i}" + text_a = line[3] + text_b = line[4] + label = None if set_type == "test" else line[0] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + +class MnliProcessor(DataProcessor): + """Processor for the MultiNLI data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["premise"].numpy().decode("utf-8"), + tensor_dict["hypothesis"].numpy().decode("utf-8"), + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev_matched.tsv")), "dev_matched") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test_matched.tsv")), "test_matched") + + def get_labels(self): + """See base class.""" + return ["contradiction", "entailment", "neutral"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{line[0]}" + text_a = line[8] + text_b = line[9] + label = None if set_type.startswith("test") else line[-1] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + +class MnliMismatchedProcessor(MnliProcessor): + """Processor for the MultiNLI Mismatched data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev_mismatched.tsv")), "dev_mismatched") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test_mismatched.tsv")), "test_mismatched") + + +class ColaProcessor(DataProcessor): + """Processor for the CoLA data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["sentence"].numpy().decode("utf-8"), + None, + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return ["0", "1"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + test_mode = set_type == "test" + if test_mode: + lines = lines[1:] + text_index = 1 if test_mode else 3 + examples = [] + for i, line in enumerate(lines): + guid = f"{set_type}-{i}" + text_a = line[text_index] + label = None if test_mode else line[1] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=None, label=label)) + return examples + + +class Sst2Processor(DataProcessor): + """Processor for the SST-2 data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["sentence"].numpy().decode("utf-8"), + None, + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return ["0", "1"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + examples = [] + text_index = 1 if set_type == "test" else 0 + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{i}" + text_a = line[text_index] + label = None if set_type == "test" else line[1] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=None, label=label)) + return examples + + +class StsbProcessor(DataProcessor): + """Processor for the STS-B data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["sentence1"].numpy().decode("utf-8"), + tensor_dict["sentence2"].numpy().decode("utf-8"), + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return [None] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{line[0]}" + text_a = line[7] + text_b = line[8] + label = None if set_type == "test" else line[-1] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + +class QqpProcessor(DataProcessor): + """Processor for the QQP data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["question1"].numpy().decode("utf-8"), + tensor_dict["question2"].numpy().decode("utf-8"), + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return ["0", "1"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + test_mode = set_type == "test" + q1_index = 1 if test_mode else 3 + q2_index = 2 if test_mode else 4 + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{line[0]}" + try: + text_a = line[q1_index] + text_b = line[q2_index] + label = None if test_mode else line[5] + except IndexError: + continue + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + +class QnliProcessor(DataProcessor): + """Processor for the QNLI data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["question"].numpy().decode("utf-8"), + tensor_dict["sentence"].numpy().decode("utf-8"), + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return ["entailment", "not_entailment"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{line[0]}" + text_a = line[1] + text_b = line[2] + label = None if set_type == "test" else line[-1] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + +class RteProcessor(DataProcessor): + """Processor for the RTE data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["sentence1"].numpy().decode("utf-8"), + tensor_dict["sentence2"].numpy().decode("utf-8"), + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return ["entailment", "not_entailment"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{line[0]}" + text_a = line[1] + text_b = line[2] + label = None if set_type == "test" else line[-1] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + +class WnliProcessor(DataProcessor): + """Processor for the WNLI data set (GLUE version).""" + + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + warnings.warn(DEPRECATION_WARNING.format("processor"), FutureWarning) + + def get_example_from_tensor_dict(self, tensor_dict): + """See base class.""" + return InputExample( + tensor_dict["idx"].numpy(), + tensor_dict["sentence1"].numpy().decode("utf-8"), + tensor_dict["sentence2"].numpy().decode("utf-8"), + str(tensor_dict["label"].numpy()), + ) + + def get_train_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "train.tsv")), "train") + + def get_dev_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "dev.tsv")), "dev") + + def get_test_examples(self, data_dir): + """See base class.""" + return self._create_examples(self._read_tsv(os.path.join(data_dir, "test.tsv")), "test") + + def get_labels(self): + """See base class.""" + return ["0", "1"] + + def _create_examples(self, lines, set_type): + """Creates examples for the training, dev and test sets.""" + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"{set_type}-{line[0]}" + text_a = line[1] + text_b = line[2] + label = None if set_type == "test" else line[-1] + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + +glue_tasks_num_labels = { + "cola": 2, + "mnli": 3, + "mrpc": 2, + "sst-2": 2, + "sts-b": 1, + "qqp": 2, + "qnli": 2, + "rte": 2, + "wnli": 2, +} + +glue_processors = { + "cola": ColaProcessor, + "mnli": MnliProcessor, + "mnli-mm": MnliMismatchedProcessor, + "mrpc": MrpcProcessor, + "sst-2": Sst2Processor, + "sts-b": StsbProcessor, + "qqp": QqpProcessor, + "qnli": QnliProcessor, + "rte": RteProcessor, + "wnli": WnliProcessor, +} + +glue_output_modes = { + "cola": "classification", + "mnli": "classification", + "mnli-mm": "classification", + "mrpc": "classification", + "sst-2": "classification", + "sts-b": "regression", + "qqp": "classification", + "qnli": "classification", + "rte": "classification", + "wnli": "classification", +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/squad.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/squad.py new file mode 100644 index 0000000000000000000000000000000000000000..bc40f6b3ad391364ae60ee513cefa68f21428f81 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/squad.py @@ -0,0 +1,737 @@ +# Copyright 2020 The HuggingFace Team. All rights reserved. +# +# 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. + +import json +import os +from functools import partial +from multiprocessing import Pool, cpu_count +from multiprocessing.pool import ThreadPool + +import numpy as np +from tqdm import tqdm + +from ...models.bert.tokenization_bert_legacy import whitespace_tokenize +from ...tokenization_utils_base import BatchEncoding, PreTrainedTokenizerBase, TruncationStrategy +from ...utils import is_torch_available, is_torch_hpu_available, logging +from .utils import DataProcessor + + +# Store the tokenizers which insert 2 separators tokens +MULTI_SEP_TOKENS_TOKENIZERS_SET = {"roberta", "camembert", "bart", "mpnet"} + + +if is_torch_available(): + import torch + from torch.utils.data import TensorDataset + + +logger = logging.get_logger(__name__) + + +def _improve_answer_span(doc_tokens, input_start, input_end, tokenizer, orig_answer_text): + """Returns tokenized answer spans that better match the annotated answer.""" + tok_answer_text = " ".join(tokenizer.tokenize(orig_answer_text)) + + for new_start in range(input_start, input_end + 1): + for new_end in range(input_end, new_start - 1, -1): + text_span = " ".join(doc_tokens[new_start : (new_end + 1)]) + if text_span == tok_answer_text: + return (new_start, new_end) + + return (input_start, input_end) + + +def _check_is_max_context(doc_spans, cur_span_index, position): + """Check if this is the 'max context' doc span for the token.""" + best_score = None + best_span_index = None + for span_index, doc_span in enumerate(doc_spans): + end = doc_span.start + doc_span.length - 1 + if position < doc_span.start: + continue + if position > end: + continue + num_left_context = position - doc_span.start + num_right_context = end - position + score = min(num_left_context, num_right_context) + 0.01 * doc_span.length + if best_score is None or score > best_score: + best_score = score + best_span_index = span_index + + return cur_span_index == best_span_index + + +def _new_check_is_max_context(doc_spans, cur_span_index, position): + """Check if this is the 'max context' doc span for the token.""" + # if len(doc_spans) == 1: + # return True + best_score = None + best_span_index = None + for span_index, doc_span in enumerate(doc_spans): + end = doc_span["start"] + doc_span["length"] - 1 + if position < doc_span["start"]: + continue + if position > end: + continue + num_left_context = position - doc_span["start"] + num_right_context = end - position + score = min(num_left_context, num_right_context) + 0.01 * doc_span["length"] + if best_score is None or score > best_score: + best_score = score + best_span_index = span_index + + return cur_span_index == best_span_index + + +def _is_whitespace(c): + if c == " " or c == "\t" or c == "\r" or c == "\n" or ord(c) == 0x202F: + return True + return False + + +def squad_convert_example_to_features( + example, max_seq_length, doc_stride, max_query_length, padding_strategy, is_training +): + features = [] + if is_training and not example.is_impossible: + # Get start and end position + start_position = example.start_position + end_position = example.end_position + + # If the answer cannot be found in the text, then skip this example. + actual_text = " ".join(example.doc_tokens[start_position : (end_position + 1)]) + cleaned_answer_text = " ".join(whitespace_tokenize(example.answer_text)) + if actual_text.find(cleaned_answer_text) == -1: + logger.warning(f"Could not find answer: '{actual_text}' vs. '{cleaned_answer_text}'") + return [] + + tok_to_orig_index = [] + orig_to_tok_index = [] + all_doc_tokens = [] + for i, token in enumerate(example.doc_tokens): + orig_to_tok_index.append(len(all_doc_tokens)) + if tokenizer.__class__.__name__ in [ + "RobertaTokenizer", + "LongformerTokenizer", + "BartTokenizer", + "LongformerTokenizerFast", + "BartTokenizerFast", + ]: + sub_tokens = tokenizer.tokenize(token, add_prefix_space=True) + else: + sub_tokens = tokenizer.tokenize(token) + for sub_token in sub_tokens: + tok_to_orig_index.append(i) + all_doc_tokens.append(sub_token) + + if is_training and not example.is_impossible: + tok_start_position = orig_to_tok_index[example.start_position] + if example.end_position < len(example.doc_tokens) - 1: + tok_end_position = orig_to_tok_index[example.end_position + 1] - 1 + else: + tok_end_position = len(all_doc_tokens) - 1 + + (tok_start_position, tok_end_position) = _improve_answer_span( + all_doc_tokens, tok_start_position, tok_end_position, tokenizer, example.answer_text + ) + + spans = [] + + truncated_query = tokenizer.encode( + example.question_text, add_special_tokens=False, truncation=True, max_length=max_query_length + ) + + # Tokenizers who insert 2 SEP tokens in-between & need to have special handling + # in the way they compute mask of added tokens. + tokenizer_type = type(tokenizer).__name__.replace("Tokenizer", "").lower() + sequence_added_tokens = ( + tokenizer.model_max_length - tokenizer.max_len_single_sentence + 1 + if tokenizer_type in MULTI_SEP_TOKENS_TOKENIZERS_SET + else tokenizer.model_max_length - tokenizer.max_len_single_sentence + ) + max_len_sentences_pair = tokenizer.model_max_length - tokenizer.num_special_tokens_to_add(pair=True) + sequence_pair_added_tokens = tokenizer.model_max_length - max_len_sentences_pair + + span_doc_tokens = all_doc_tokens + while len(spans) * doc_stride < len(all_doc_tokens): + # Define the side we want to truncate / pad and the text/pair sorting + if tokenizer.padding_side == "right": + texts = truncated_query + pairs = span_doc_tokens + truncation = TruncationStrategy.ONLY_SECOND.value + else: + texts = span_doc_tokens + pairs = truncated_query + truncation = TruncationStrategy.ONLY_FIRST.value + + encoded_dict = tokenizer( # TODO(thom) update this logic + texts, + pairs, + truncation=truncation, + padding=padding_strategy, + max_length=max_seq_length, + return_overflowing_tokens=True, + stride=max_seq_length - doc_stride - len(truncated_query) - sequence_pair_added_tokens, + return_token_type_ids=True, + ) + + paragraph_len = min( + len(all_doc_tokens) - len(spans) * doc_stride, + max_seq_length - len(truncated_query) - sequence_pair_added_tokens, + ) + + if tokenizer.pad_token_id in encoded_dict["input_ids"]: + if tokenizer.padding_side == "right": + non_padded_ids = encoded_dict["input_ids"][: encoded_dict["input_ids"].index(tokenizer.pad_token_id)] + else: + last_padding_id_position = ( + len(encoded_dict["input_ids"]) - 1 - encoded_dict["input_ids"][::-1].index(tokenizer.pad_token_id) + ) + non_padded_ids = encoded_dict["input_ids"][last_padding_id_position + 1 :] + + else: + non_padded_ids = encoded_dict["input_ids"] + + tokens = tokenizer.convert_ids_to_tokens(non_padded_ids) + + token_to_orig_map = {} + for i in range(paragraph_len): + index = len(truncated_query) + sequence_added_tokens + i if tokenizer.padding_side == "right" else i + token_to_orig_map[index] = tok_to_orig_index[len(spans) * doc_stride + i] + + encoded_dict["paragraph_len"] = paragraph_len + encoded_dict["tokens"] = tokens + encoded_dict["token_to_orig_map"] = token_to_orig_map + encoded_dict["truncated_query_with_special_tokens_length"] = len(truncated_query) + sequence_added_tokens + encoded_dict["token_is_max_context"] = {} + encoded_dict["start"] = len(spans) * doc_stride + encoded_dict["length"] = paragraph_len + + spans.append(encoded_dict) + + if "overflowing_tokens" not in encoded_dict or ( + "overflowing_tokens" in encoded_dict and len(encoded_dict["overflowing_tokens"]) == 0 + ): + break + span_doc_tokens = encoded_dict["overflowing_tokens"] + + for doc_span_index in range(len(spans)): + for j in range(spans[doc_span_index]["paragraph_len"]): + is_max_context = _new_check_is_max_context(spans, doc_span_index, doc_span_index * doc_stride + j) + index = ( + j + if tokenizer.padding_side == "left" + else spans[doc_span_index]["truncated_query_with_special_tokens_length"] + j + ) + spans[doc_span_index]["token_is_max_context"][index] = is_max_context + + for span in spans: + # Identify the position of the CLS token + cls_index = span["input_ids"].index(tokenizer.cls_token_id) + + # p_mask: mask with 1 for token than cannot be in the answer (0 for token which can be in an answer) + p_mask = np.ones_like(span["token_type_ids"]) + if tokenizer.padding_side == "right": + p_mask[len(truncated_query) + sequence_added_tokens :] = 0 + else: + p_mask[-len(span["tokens"]) : -(len(truncated_query) + sequence_added_tokens)] = 0 + + pad_token_indices = np.where(np.atleast_1d(span["input_ids"] == tokenizer.pad_token_id)) + special_token_indices = np.asarray( + tokenizer.get_special_tokens_mask(span["input_ids"], already_has_special_tokens=True) + ).nonzero() + + p_mask[pad_token_indices] = 1 + p_mask[special_token_indices] = 1 + + # Set the cls index to 0: the CLS index can be used for impossible answers + p_mask[cls_index] = 0 + + span_is_impossible = example.is_impossible + start_position = 0 + end_position = 0 + if is_training and not span_is_impossible: + # For training, if our document chunk does not contain an annotation + # we throw it out, since there is nothing to predict. + doc_start = span["start"] + doc_end = span["start"] + span["length"] - 1 + out_of_span = False + + if not (tok_start_position >= doc_start and tok_end_position <= doc_end): + out_of_span = True + + if out_of_span: + start_position = cls_index + end_position = cls_index + span_is_impossible = True + else: + if tokenizer.padding_side == "left": + doc_offset = 0 + else: + doc_offset = len(truncated_query) + sequence_added_tokens + + start_position = tok_start_position - doc_start + doc_offset + end_position = tok_end_position - doc_start + doc_offset + features.append( + SquadFeatures( + span["input_ids"], + span["attention_mask"], + span["token_type_ids"], + cls_index, + p_mask.tolist(), + example_index=0, # Can not set unique_id and example_index here. They will be set after multiple processing. + unique_id=0, + paragraph_len=span["paragraph_len"], + token_is_max_context=span["token_is_max_context"], + tokens=span["tokens"], + token_to_orig_map=span["token_to_orig_map"], + start_position=start_position, + end_position=end_position, + is_impossible=span_is_impossible, + qas_id=example.qas_id, + ) + ) + return features + + +def squad_convert_example_to_features_init(tokenizer_for_convert: PreTrainedTokenizerBase): + global tokenizer + tokenizer = tokenizer_for_convert + + +def squad_convert_examples_to_features( + examples, + tokenizer, + max_seq_length, + doc_stride, + max_query_length, + is_training, + padding_strategy="max_length", + return_dataset=False, + threads=1, + tqdm_enabled=True, +): + """ + Converts a list of examples into a list of features that can be directly given as input to a model. It is + model-dependant and takes advantage of many of the tokenizer's features to create the model's inputs. + + Args: + examples: list of [`~data.processors.squad.SquadExample`] + tokenizer: an instance of a child of [`PreTrainedTokenizer`] + max_seq_length: The maximum sequence length of the inputs. + doc_stride: The stride used when the context is too large and is split across several features. + max_query_length: The maximum length of the query. + is_training: whether to create features for model evaluation or model training. + padding_strategy: Default to "max_length". Which padding strategy to use + return_dataset: Default False. Can also be 'pt'. + if 'pt': returns a torch.data.TensorDataset. + threads: multiple processing threads. + + + Returns: + list of [`~data.processors.squad.SquadFeatures`] + + Example: + + ```python + processor = SquadV2Processor() + examples = processor.get_dev_examples(data_dir) + + features = squad_convert_examples_to_features( + examples=examples, + tokenizer=tokenizer, + max_seq_length=args.max_seq_length, + doc_stride=args.doc_stride, + max_query_length=args.max_query_length, + is_training=not evaluate, + ) + ```""" + + threads = min(threads, cpu_count()) + pool_cls = ThreadPool if is_torch_hpu_available() else Pool + with pool_cls(threads, initializer=squad_convert_example_to_features_init, initargs=(tokenizer,)) as p: + annotate_ = partial( + squad_convert_example_to_features, + max_seq_length=max_seq_length, + doc_stride=doc_stride, + max_query_length=max_query_length, + padding_strategy=padding_strategy, + is_training=is_training, + ) + features = list( + tqdm( + p.imap(annotate_, examples, chunksize=32), + total=len(examples), + desc="convert squad examples to features", + disable=not tqdm_enabled, + ) + ) + + new_features = [] + unique_id = 1000000000 + example_index = 0 + for example_features in tqdm( + features, total=len(features), desc="add example index and unique id", disable=not tqdm_enabled + ): + if not example_features: + continue + for example_feature in example_features: + example_feature.example_index = example_index + example_feature.unique_id = unique_id + new_features.append(example_feature) + unique_id += 1 + example_index += 1 + features = new_features + del new_features + if return_dataset == "pt": + if not is_torch_available(): + raise RuntimeError("PyTorch must be installed to return a PyTorch dataset.") + + # Convert to Tensors and build dataset + all_input_ids = torch.tensor([f.input_ids for f in features], dtype=torch.long) + all_attention_masks = torch.tensor([f.attention_mask for f in features], dtype=torch.long) + all_token_type_ids = torch.tensor([f.token_type_ids for f in features], dtype=torch.long) + all_cls_index = torch.tensor([f.cls_index for f in features], dtype=torch.long) + all_p_mask = torch.tensor([f.p_mask for f in features], dtype=torch.float) + all_is_impossible = torch.tensor([f.is_impossible for f in features], dtype=torch.float) + + if not is_training: + all_feature_index = torch.arange(all_input_ids.size(0), dtype=torch.long) + dataset = TensorDataset( + all_input_ids, all_attention_masks, all_token_type_ids, all_feature_index, all_cls_index, all_p_mask + ) + else: + all_start_positions = torch.tensor([f.start_position for f in features], dtype=torch.long) + all_end_positions = torch.tensor([f.end_position for f in features], dtype=torch.long) + dataset = TensorDataset( + all_input_ids, + all_attention_masks, + all_token_type_ids, + all_start_positions, + all_end_positions, + all_cls_index, + all_p_mask, + all_is_impossible, + ) + + return features, dataset + else: + return features + + +class SquadProcessor(DataProcessor): + """ + Processor for the SQuAD data set. overridden by SquadV1Processor and SquadV2Processor, used by the version 1.1 and + version 2.0 of SQuAD, respectively. + """ + + train_file = None + dev_file = None + + def _get_example_from_tensor_dict(self, tensor_dict, evaluate=False): + if not evaluate: + answer = tensor_dict["answers"]["text"][0].numpy().decode("utf-8") + answer_start = tensor_dict["answers"]["answer_start"][0].numpy() + answers = [] + else: + answers = [ + {"answer_start": start.numpy(), "text": text.numpy().decode("utf-8")} + for start, text in zip(tensor_dict["answers"]["answer_start"], tensor_dict["answers"]["text"]) + ] + + answer = None + answer_start = None + + return SquadExample( + qas_id=tensor_dict["id"].numpy().decode("utf-8"), + question_text=tensor_dict["question"].numpy().decode("utf-8"), + context_text=tensor_dict["context"].numpy().decode("utf-8"), + answer_text=answer, + start_position_character=answer_start, + title=tensor_dict["title"].numpy().decode("utf-8"), + answers=answers, + ) + + def get_examples_from_dataset(self, dataset, evaluate=False): + """ + Creates a list of [`~data.processors.squad.SquadExample`] using a TFDS dataset. + + Args: + dataset: The tfds dataset loaded from *tensorflow_datasets.load("squad")* + evaluate: Boolean specifying if in evaluation mode or in training mode + + Returns: + List of SquadExample + + Examples: + + ```python + >>> import tensorflow_datasets as tfds + + >>> dataset = tfds.load("squad") + + >>> training_examples = get_examples_from_dataset(dataset, evaluate=False) + >>> evaluation_examples = get_examples_from_dataset(dataset, evaluate=True) + ```""" + + if evaluate: + dataset = dataset["validation"] + else: + dataset = dataset["train"] + + examples = [] + for tensor_dict in tqdm(dataset): + examples.append(self._get_example_from_tensor_dict(tensor_dict, evaluate=evaluate)) + + return examples + + def get_train_examples(self, data_dir, filename=None): + """ + Returns the training examples from the data directory. + + Args: + data_dir: Directory containing the data files used for training and evaluating. + filename: None by default, specify this if the training file has a different name than the original one + which is `train-v1.1.json` and `train-v2.0.json` for squad versions 1.1 and 2.0 respectively. + + """ + if data_dir is None: + data_dir = "" + + if self.train_file is None: + raise ValueError("SquadProcessor should be instantiated via SquadV1Processor or SquadV2Processor") + + with open( + os.path.join(data_dir, self.train_file if filename is None else filename), "r", encoding="utf-8" + ) as reader: + input_data = json.load(reader)["data"] + return self._create_examples(input_data, "train") + + def get_dev_examples(self, data_dir, filename=None): + """ + Returns the evaluation example from the data directory. + + Args: + data_dir: Directory containing the data files used for training and evaluating. + filename: None by default, specify this if the evaluation file has a different name than the original one + which is `dev-v1.1.json` and `dev-v2.0.json` for squad versions 1.1 and 2.0 respectively. + """ + if data_dir is None: + data_dir = "" + + if self.dev_file is None: + raise ValueError("SquadProcessor should be instantiated via SquadV1Processor or SquadV2Processor") + + with open( + os.path.join(data_dir, self.dev_file if filename is None else filename), "r", encoding="utf-8" + ) as reader: + input_data = json.load(reader)["data"] + return self._create_examples(input_data, "dev") + + def _create_examples(self, input_data, set_type): + is_training = set_type == "train" + examples = [] + for entry in tqdm(input_data): + title = entry["title"] + for paragraph in entry["paragraphs"]: + context_text = paragraph["context"] + for qa in paragraph["qas"]: + qas_id = qa["id"] + question_text = qa["question"] + start_position_character = None + answer_text = None + answers = [] + + is_impossible = qa.get("is_impossible", False) + if not is_impossible: + if is_training: + answer = qa["answers"][0] + answer_text = answer["text"] + start_position_character = answer["answer_start"] + else: + answers = qa["answers"] + + example = SquadExample( + qas_id=qas_id, + question_text=question_text, + context_text=context_text, + answer_text=answer_text, + start_position_character=start_position_character, + title=title, + is_impossible=is_impossible, + answers=answers, + ) + examples.append(example) + return examples + + +class SquadV1Processor(SquadProcessor): + train_file = "train-v1.1.json" + dev_file = "dev-v1.1.json" + + +class SquadV2Processor(SquadProcessor): + train_file = "train-v2.0.json" + dev_file = "dev-v2.0.json" + + +class SquadExample: + """ + A single training/test example for the Squad dataset, as loaded from disk. + + Args: + qas_id: The example's unique identifier + question_text: The question string + context_text: The context string + answer_text: The answer string + start_position_character: The character position of the start of the answer + title: The title of the example + answers: None by default, this is used during evaluation. Holds answers as well as their start positions. + is_impossible: False by default, set to True if the example has no possible answer. + """ + + def __init__( + self, + qas_id, + question_text, + context_text, + answer_text, + start_position_character, + title, + answers=[], + is_impossible=False, + ): + self.qas_id = qas_id + self.question_text = question_text + self.context_text = context_text + self.answer_text = answer_text + self.title = title + self.is_impossible = is_impossible + self.answers = answers + + self.start_position, self.end_position = 0, 0 + + doc_tokens = [] + char_to_word_offset = [] + prev_is_whitespace = True + + # Split on whitespace so that different tokens may be attributed to their original position. + for c in self.context_text: + if _is_whitespace(c): + prev_is_whitespace = True + else: + if prev_is_whitespace: + doc_tokens.append(c) + else: + doc_tokens[-1] += c + prev_is_whitespace = False + char_to_word_offset.append(len(doc_tokens) - 1) + + self.doc_tokens = doc_tokens + self.char_to_word_offset = char_to_word_offset + + # Start and end positions only has a value during evaluation. + if start_position_character is not None and not is_impossible: + self.start_position = char_to_word_offset[start_position_character] + self.end_position = char_to_word_offset[ + min(start_position_character + len(answer_text) - 1, len(char_to_word_offset) - 1) + ] + + +class SquadFeatures: + """ + Single squad example features to be fed to a model. Those features are model-specific and can be crafted from + [`~data.processors.squad.SquadExample`] using the + :method:*~transformers.data.processors.squad.squad_convert_examples_to_features* method. + + Args: + input_ids: Indices of input sequence tokens in the vocabulary. + attention_mask: Mask to avoid performing attention on padding token indices. + token_type_ids: Segment token indices to indicate first and second portions of the inputs. + cls_index: the index of the CLS token. + p_mask: Mask identifying tokens that can be answers vs. tokens that cannot. + Mask with 1 for tokens than cannot be in the answer and 0 for token that can be in an answer + example_index: the index of the example + unique_id: The unique Feature identifier + paragraph_len: The length of the context + token_is_max_context: + List of booleans identifying which tokens have their maximum context in this feature object. If a token + does not have their maximum context in this feature object, it means that another feature object has more + information related to that token and should be prioritized over this feature for that token. + tokens: list of tokens corresponding to the input ids + token_to_orig_map: mapping between the tokens and the original text, needed in order to identify the answer. + start_position: start of the answer token index + end_position: end of the answer token index + encoding: optionally store the BatchEncoding with the fast-tokenizer alignment methods. + """ + + def __init__( + self, + input_ids, + attention_mask, + token_type_ids, + cls_index, + p_mask, + example_index, + unique_id, + paragraph_len, + token_is_max_context, + tokens, + token_to_orig_map, + start_position, + end_position, + is_impossible, + qas_id: str | None = None, + encoding: BatchEncoding | None = None, + ): + self.input_ids = input_ids + self.attention_mask = attention_mask + self.token_type_ids = token_type_ids + self.cls_index = cls_index + self.p_mask = p_mask + + self.example_index = example_index + self.unique_id = unique_id + self.paragraph_len = paragraph_len + self.token_is_max_context = token_is_max_context + self.tokens = tokens + self.token_to_orig_map = token_to_orig_map + + self.start_position = start_position + self.end_position = end_position + self.is_impossible = is_impossible + self.qas_id = qas_id + + self.encoding = encoding + + +class SquadResult: + """ + Constructs a SquadResult which can be used to evaluate a model's output on the SQuAD dataset. + + Args: + unique_id: The unique identifier corresponding to that example. + start_logits: The logits corresponding to the start of the answer + end_logits: The logits corresponding to the end of the answer + """ + + def __init__(self, unique_id, start_logits, end_logits, start_top_index=None, end_top_index=None, cls_logits=None): + self.start_logits = start_logits + self.end_logits = end_logits + self.unique_id = unique_id + + if start_top_index: + self.start_top_index = start_top_index + self.end_top_index = end_top_index + self.cls_logits = cls_logits diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/utils.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..cf40aeff7500d08bb35c42ca8afa199a4db5d0a7 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/utils.py @@ -0,0 +1,330 @@ +# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# 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. + +import csv +import dataclasses +import json +from dataclasses import dataclass + +from ...utils import is_torch_available, logging + + +logger = logging.get_logger(__name__) + + +@dataclass +class InputExample: + """ + A single training/test example for simple sequence classification. + + Args: + guid: Unique id for the example. + text_a: string. The untokenized text of the first sequence. For single + sequence tasks, only this sequence must be specified. + text_b: (Optional) string. The untokenized text of the second sequence. + Only must be specified for sequence pair tasks. + label: (Optional) string. The label of the example. This should be + specified for train and dev examples, but not for test examples. + """ + + guid: str + text_a: str + text_b: str | None = None + label: str | None = None + + def to_json_string(self): + """Serializes this instance to a JSON string.""" + return json.dumps(dataclasses.asdict(self), indent=2) + "\n" + + +@dataclass(frozen=True) +class InputFeatures: + """ + A single set of features of data. Property names are the same names as the corresponding inputs to a model. + + Args: + input_ids: Indices of input sequence tokens in the vocabulary. + attention_mask: Mask to avoid performing attention on padding token indices. + Mask values selected in `[0, 1]`: Usually `1` for tokens that are NOT MASKED, `0` for MASKED (padded) + tokens. + token_type_ids: (Optional) Segment token indices to indicate first and second + portions of the inputs. Only some models use them. + label: (Optional) Label corresponding to the input. Int for classification problems, + float for regression problems. + """ + + input_ids: list[int] + attention_mask: list[int] | None = None + token_type_ids: list[int] | None = None + label: int | float | None = None + + def to_json_string(self): + """Serializes this instance to a JSON string.""" + return json.dumps(dataclasses.asdict(self)) + "\n" + + +class DataProcessor: + """Base class for data converters for sequence classification data sets.""" + + def get_example_from_tensor_dict(self, tensor_dict): + """ + Gets an example from a dict. + + Args: + tensor_dict: Keys and values should match the corresponding Glue + tensorflow_dataset examples. + """ + raise NotImplementedError() + + def get_train_examples(self, data_dir): + """Gets a collection of [`InputExample`] for the train set.""" + raise NotImplementedError() + + def get_dev_examples(self, data_dir): + """Gets a collection of [`InputExample`] for the dev set.""" + raise NotImplementedError() + + def get_test_examples(self, data_dir): + """Gets a collection of [`InputExample`] for the test set.""" + raise NotImplementedError() + + def get_labels(self): + """Gets the list of labels for this data set.""" + raise NotImplementedError() + + def tfds_map(self, example): + """ + Some tensorflow_datasets datasets are not formatted the same way the GLUE datasets are. This method converts + examples to the correct format. + """ + if len(self.get_labels()) > 1: + example.label = self.get_labels()[int(example.label)] + return example + + @classmethod + def _read_tsv(cls, input_file, quotechar=None): + """Reads a tab separated value file.""" + with open(input_file, "r", encoding="utf-8-sig") as f: + return list(csv.reader(f, delimiter="\t", quotechar=quotechar)) + + +class SingleSentenceClassificationProcessor(DataProcessor): + """Generic processor for a single sentence classification data set.""" + + def __init__(self, labels=None, examples=None, mode="classification", verbose=False): + self.labels = [] if labels is None else labels + self.examples = [] if examples is None else examples + self.mode = mode + self.verbose = verbose + + def __len__(self): + return len(self.examples) + + def __getitem__(self, idx): + if isinstance(idx, slice): + return SingleSentenceClassificationProcessor(labels=self.labels, examples=self.examples[idx]) + return self.examples[idx] + + @classmethod + def create_from_csv( + cls, file_name, split_name="", column_label=0, column_text=1, column_id=None, skip_first_row=False, **kwargs + ): + processor = cls(**kwargs) + processor.add_examples_from_csv( + file_name, + split_name=split_name, + column_label=column_label, + column_text=column_text, + column_id=column_id, + skip_first_row=skip_first_row, + overwrite_labels=True, + overwrite_examples=True, + ) + return processor + + @classmethod + def create_from_examples(cls, texts_or_text_and_labels, labels=None, **kwargs): + processor = cls(**kwargs) + processor.add_examples(texts_or_text_and_labels, labels=labels) + return processor + + def add_examples_from_csv( + self, + file_name, + split_name="", + column_label=0, + column_text=1, + column_id=None, + skip_first_row=False, + overwrite_labels=False, + overwrite_examples=False, + ): + lines = self._read_tsv(file_name) + if skip_first_row: + lines = lines[1:] + texts = [] + labels = [] + ids = [] + for i, line in enumerate(lines): + texts.append(line[column_text]) + labels.append(line[column_label]) + if column_id is not None: + ids.append(line[column_id]) + else: + guid = f"{split_name}-{i}" if split_name else str(i) + ids.append(guid) + + return self.add_examples( + texts, labels, ids, overwrite_labels=overwrite_labels, overwrite_examples=overwrite_examples + ) + + def add_examples( + self, texts_or_text_and_labels, labels=None, ids=None, overwrite_labels=False, overwrite_examples=False + ): + if labels is not None and len(texts_or_text_and_labels) != len(labels): + raise ValueError( + f"Text and labels have mismatched lengths {len(texts_or_text_and_labels)} and {len(labels)}" + ) + if ids is not None and len(texts_or_text_and_labels) != len(ids): + raise ValueError(f"Text and ids have mismatched lengths {len(texts_or_text_and_labels)} and {len(ids)}") + if ids is None: + ids = [None] * len(texts_or_text_and_labels) + if labels is None: + labels = [None] * len(texts_or_text_and_labels) + examples = [] + added_labels = set() + for text_or_text_and_label, label, guid in zip(texts_or_text_and_labels, labels, ids): + if isinstance(text_or_text_and_label, (tuple, list)) and label is None: + text, label = text_or_text_and_label + else: + text = text_or_text_and_label + added_labels.add(label) + examples.append(InputExample(guid=guid, text_a=text, text_b=None, label=label)) + + # Update examples + if overwrite_examples: + self.examples = examples + else: + self.examples.extend(examples) + + # Update labels + if overwrite_labels: + self.labels = list(added_labels) + else: + self.labels = list(set(self.labels).union(added_labels)) + + return self.examples + + def get_features( + self, + tokenizer, + max_length=None, + pad_on_left=False, + pad_token=0, + mask_padding_with_zero=True, + return_tensors=None, + ): + """ + Convert examples in a list of `InputFeatures` + + Args: + tokenizer: Instance of a tokenizer that will tokenize the examples + max_length: Maximum example length + pad_on_left: If set to `True`, the examples will be padded on the left rather than on the right (default) + pad_token: Padding token + mask_padding_with_zero: If set to `True`, the attention mask will be filled by `1` for actual values + and by `0` for padded values. If set to `False`, inverts it (`1` for padded values, `0` for actual + values) + + Returns: + Will return a list of task-specific `InputFeatures` which can be fed to the model. + + """ + if max_length is None: + max_length = tokenizer.max_len + + label_map = {label: i for i, label in enumerate(self.labels)} + + all_input_ids = [] + for ex_index, example in enumerate(self.examples): + if ex_index % 10000 == 0: + logger.info(f"Tokenizing example {ex_index}") + + input_ids = tokenizer.encode( + example.text_a, + add_special_tokens=True, + max_length=min(max_length, tokenizer.max_len), + ) + all_input_ids.append(input_ids) + + batch_length = max(len(input_ids) for input_ids in all_input_ids) + + features = [] + for ex_index, (input_ids, example) in enumerate(zip(all_input_ids, self.examples)): + if ex_index % 10000 == 0: + logger.info(f"Writing example {ex_index}/{len(self.examples)}") + # The mask has 1 for real tokens and 0 for padding tokens. Only real + # tokens are attended to. + attention_mask = [1 if mask_padding_with_zero else 0] * len(input_ids) + + # Zero-pad up to the sequence length. + padding_length = batch_length - len(input_ids) + if pad_on_left: + input_ids = ([pad_token] * padding_length) + input_ids + attention_mask = ([0 if mask_padding_with_zero else 1] * padding_length) + attention_mask + else: + input_ids = input_ids + ([pad_token] * padding_length) + attention_mask = attention_mask + ([0 if mask_padding_with_zero else 1] * padding_length) + + if len(input_ids) != batch_length: + raise ValueError(f"Error with input length {len(input_ids)} vs {batch_length}") + if len(attention_mask) != batch_length: + raise ValueError(f"Error with input length {len(attention_mask)} vs {batch_length}") + + if self.mode == "classification": + label = label_map[example.label] + elif self.mode == "regression": + label = float(example.label) + else: + raise ValueError(self.mode) + + if ex_index < 5 and self.verbose: + logger.info("*** Example ***") + logger.info(f"guid: {example.guid}") + logger.info(f"input_ids: {' '.join([str(x) for x in input_ids])}") + logger.info(f"attention_mask: {' '.join([str(x) for x in attention_mask])}") + logger.info(f"label: {example.label} (id = {label})") + + features.append(InputFeatures(input_ids=input_ids, attention_mask=attention_mask, label=label)) + + if return_tensors is None: + return features + elif return_tensors == "pt": + if not is_torch_available(): + raise RuntimeError("return_tensors set to 'pt' but PyTorch can't be imported") + import torch + from torch.utils.data import TensorDataset + + all_input_ids = torch.tensor([f.input_ids for f in features], dtype=torch.long) + all_attention_mask = torch.tensor([f.attention_mask for f in features], dtype=torch.long) + if self.mode == "classification": + all_labels = torch.tensor([f.label for f in features], dtype=torch.long) + elif self.mode == "regression": + all_labels = torch.tensor([f.label for f in features], dtype=torch.float) + + dataset = TensorDataset(all_input_ids, all_attention_mask, all_labels) + return dataset + else: + raise ValueError("return_tensors should be `'pt'` or `None`") diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/xnli.py b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/xnli.py new file mode 100644 index 0000000000000000000000000000000000000000..d3667ea2697c4115061f0e5f5d26ebb2c1842f44 --- /dev/null +++ b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/data/processors/xnli.py @@ -0,0 +1,95 @@ +# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. +# Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved. +# +# 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. +"""XNLI utils (dataset loading and evaluation)""" + +import os + +from ...utils import logging +from .utils import DataProcessor, InputExample + + +logger = logging.get_logger(__name__) + + +class XnliProcessor(DataProcessor): + """ + Processor for the XNLI dataset. Adapted from + https://github.com/google-research/bert/blob/f39e881b169b9d53bea03d2d341b31707a6c052b/run_classifier.py#L207 + """ + + def __init__(self, language, train_language=None): + self.language = language + self.train_language = train_language + + def get_train_examples(self, data_dir): + """See base class.""" + lg = self.language if self.train_language is None else self.train_language + lines = self._read_tsv(os.path.join(data_dir, f"XNLI-MT-1.0/multinli/multinli.train.{lg}.tsv")) + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + guid = f"train-{i}" + text_a = line[0] + text_b = line[1] + label = "contradiction" if line[2] == "contradictory" else line[2] + if not isinstance(text_a, str): + raise TypeError(f"Training input {text_a} is not a string") + if not isinstance(text_b, str): + raise TypeError(f"Training input {text_b} is not a string") + if not isinstance(label, str): + raise TypeError(f"Training label {label} is not a string") + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + def get_test_examples(self, data_dir): + """See base class.""" + lines = self._read_tsv(os.path.join(data_dir, "XNLI-1.0/xnli.test.tsv")) + examples = [] + for i, line in enumerate(lines): + if i == 0: + continue + language = line[0] + if language != self.language: + continue + guid = f"test-{i}" + text_a = line[6] + text_b = line[7] + label = line[1] + if not isinstance(text_a, str): + raise TypeError(f"Training input {text_a} is not a string") + if not isinstance(text_b, str): + raise TypeError(f"Training input {text_b} is not a string") + if not isinstance(label, str): + raise TypeError(f"Training label {label} is not a string") + examples.append(InputExample(guid=guid, text_a=text_a, text_b=text_b, label=label)) + return examples + + def get_labels(self): + """See base class.""" + return ["contradiction", "entailment", "neutral"] + + +xnli_processors = { + "xnli": XnliProcessor, +} + +xnli_output_modes = { + "xnli": "classification", +} + +xnli_tasks_num_labels = { + "xnli": 3, +} diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/distributed/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/distributed/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2b5485e4b4cb721771b3457093ef1975341bb4b5 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/distributed/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/distributed/__pycache__/configuration_utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/distributed/__pycache__/configuration_utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b3469ef89714efaf2ff7590dfe797b2836967f99 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/distributed/__pycache__/configuration_utils.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/__init__.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f7d473db5d433fa6d6e34802248d1eb4c4c08b5f Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/__init__.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/input_outputs.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/input_outputs.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a41590361c89f354913cfa2e80525d3be6ce907a Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/input_outputs.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/offloading_manager.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/offloading_manager.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8df7eeacc735a78f60eba4a163369084b2dc527b Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/offloading_manager.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/requests.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/requests.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6d1010354405f42a0634492a704dbd7145064800 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/requests.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/scheduler.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/scheduler.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eeb367ae704d4e62651287cfb8d82992270b1628 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/scheduler.cpython-311.pyc differ diff --git a/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/utils.cpython-311.pyc b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/utils.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ad4fc0d1c38f9981a473f606816de764c8f7ac09 Binary files /dev/null and b/micromamba_root/envs/pytorch_env/Lib/site-packages/transformers/generation/continuous_batching/__pycache__/utils.cpython-311.pyc differ diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/annotations.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/annotations.proto new file mode 100644 index 0000000000000000000000000000000000000000..efdab3db6ca845d96b12f398e22ba22579692028 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/annotations.proto @@ -0,0 +1,31 @@ +// Copyright 2015 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. + +syntax = "proto3"; + +package google.api; + +import "google/api/http.proto"; +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "AnnotationsProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // See `HttpRule`. + HttpRule http = 72295728; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/annotations_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/annotations_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..fb0e4f3806b1384e429368604ed6a98eb96e0345 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/annotations_pb2.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/annotations.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import http_pb2 as google_dot_api_dot_http__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1cgoogle/api/annotations.proto\x12\ngoogle.api\x1a\x15google/api/http.proto\x1a google/protobuf/descriptor.proto:E\n\x04http\x12\x1e.google.protobuf.MethodOptions\x18\xb0\xca\xbc" \x01(\x0b\x32\x14.google.api.HttpRuleBn\n\x0e\x63om.google.apiB\x10\x41nnotationsProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3' +) + + +HTTP_FIELD_NUMBER = 72295728 +http = DESCRIPTOR.extensions_by_name["http"] + +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(http) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\020AnnotationsProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI" +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/auth.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/auth.proto new file mode 100644 index 0000000000000000000000000000000000000000..ca91bb1bf06938fc1934d953a3ccc76b79f7efb6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/auth.proto @@ -0,0 +1,237 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "AuthProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// `Authentication` defines the authentication configuration for API methods +// provided by an API service. +// +// Example: +// +// name: calendar.googleapis.com +// authentication: +// providers: +// - id: google_calendar_auth +// jwks_uri: https://www.googleapis.com/oauth2/v1/certs +// issuer: https://securetoken.google.com +// rules: +// - selector: "*" +// requirements: +// provider_id: google_calendar_auth +// - selector: google.calendar.Delegate +// oauth: +// canonical_scopes: https://www.googleapis.com/auth/calendar.read +message Authentication { + // A list of authentication rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated AuthenticationRule rules = 3; + + // Defines a set of authentication providers that a service supports. + repeated AuthProvider providers = 4; +} + +// Authentication rules for the service. +// +// By default, if a method has any authentication requirements, every request +// must include a valid credential matching one of the requirements. +// It's an error to include more than one kind of credential in a single +// request. +// +// If a method doesn't have any auth requirements, request credentials will be +// ignored. +message AuthenticationRule { + // Selects the methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + string selector = 1; + + // The requirements for OAuth credentials. + OAuthRequirements oauth = 2; + + // If true, the service accepts API keys without any other credential. + // This flag only applies to HTTP and gRPC requests. + bool allow_without_credential = 5; + + // Requirements for additional authentication providers. + repeated AuthRequirement requirements = 7; +} + +// Specifies a location to extract JWT from an API request. +message JwtLocation { + oneof in { + // Specifies HTTP header name to extract JWT token. + string header = 1; + + // Specifies URL query parameter name to extract JWT token. + string query = 2; + + // Specifies cookie name to extract JWT token. + string cookie = 4; + } + + // The value prefix. The value format is "value_prefix{token}" + // Only applies to "in" header type. Must be empty for "in" query type. + // If not empty, the header value has to match (case sensitive) this prefix. + // If not matched, JWT will not be extracted. If matched, JWT will be + // extracted after the prefix is removed. + // + // For example, for "Authorization: Bearer {JWT}", + // value_prefix="Bearer " with a space at the end. + string value_prefix = 3; +} + +// Configuration for an authentication provider, including support for +// [JSON Web Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +message AuthProvider { + // The unique identifier of the auth provider. It will be referred to by + // `AuthRequirement.provider_id`. + // + // Example: "bookstore_auth". + string id = 1; + + // Identifies the principal that issued the JWT. See + // https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 + // Usually a URL or an email address. + // + // Example: https://securetoken.google.com + // Example: 1234567-compute@developer.gserviceaccount.com + string issuer = 2; + + // URL of the provider's public key set to validate signature of the JWT. See + // [OpenID + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). + // Optional if the key set document: + // - can be retrieved from + // [OpenID + // Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) + // of the issuer. + // - can be inferred from the email domain of the issuer (e.g. a Google + // service account). + // + // Example: https://www.googleapis.com/oauth2/v1/certs + string jwks_uri = 3; + + // The list of JWT + // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + // that are allowed to access. A JWT containing any of these audiences will + // be accepted. When this setting is absent, JWTs with audiences: + // - "https://[service.name]/[google.protobuf.Api.name]" + // - "https://[service.name]/" + // will be accepted. + // For example, if no audiences are in the setting, LibraryService API will + // accept JWTs with the following audiences: + // - + // https://library-example.googleapis.com/google.example.library.v1.LibraryService + // - https://library-example.googleapis.com/ + // + // Example: + // + // audiences: bookstore_android.apps.googleusercontent.com, + // bookstore_web.apps.googleusercontent.com + string audiences = 4; + + // Redirect URL if JWT token is required but not present or is expired. + // Implement authorizationUrl of securityDefinitions in OpenAPI spec. + string authorization_url = 5; + + // Defines the locations to extract the JWT. For now it is only used by the + // Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] + // (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) + // + // JWT locations can be one of HTTP headers, URL query parameters or + // cookies. The rule is that the first match wins. + // + // If not specified, default to use following 3 locations: + // 1) Authorization: Bearer + // 2) x-goog-iap-jwt-assertion + // 3) access_token query parameter + // + // Default locations can be specified as followings: + // jwt_locations: + // - header: Authorization + // value_prefix: "Bearer " + // - header: x-goog-iap-jwt-assertion + // - query: access_token + repeated JwtLocation jwt_locations = 6; +} + +// OAuth scopes are a way to define data and permissions on data. For example, +// there are scopes defined for "Read-only access to Google Calendar" and +// "Access to Cloud Platform". Users can consent to a scope for an application, +// giving it permission to access that data on their behalf. +// +// OAuth scope specifications should be fairly coarse grained; a user will need +// to see and understand the text description of what your scope means. +// +// In most cases: use one or at most two OAuth scopes for an entire family of +// products. If your product has multiple APIs, you should probably be sharing +// the OAuth scope across all of those APIs. +// +// When you need finer grained OAuth consent screens: talk with your product +// management about how developers will use them in practice. +// +// Please note that even though each of the canonical scopes is enough for a +// request to be accepted and passed to the backend, a request can still fail +// due to the backend requiring additional scopes or permissions. +message OAuthRequirements { + // The list of publicly documented OAuth scopes that are allowed access. An + // OAuth token containing any of these scopes will be accepted. + // + // Example: + // + // canonical_scopes: https://www.googleapis.com/auth/calendar, + // https://www.googleapis.com/auth/calendar.read + string canonical_scopes = 1; +} + +// User-defined authentication requirements, including support for +// [JSON Web Token +// (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32). +message AuthRequirement { + // [id][google.api.AuthProvider.id] from authentication provider. + // + // Example: + // + // provider_id: bookstore_auth + string provider_id = 1; + + // NOTE: This will be deprecated soon, once AuthProvider.audiences is + // implemented and accepted in all the runtime components. + // + // The list of JWT + // [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). + // that are allowed to access. A JWT containing any of these audiences will + // be accepted. When this setting is absent, only JWTs with audience + // "https://[Service_name][google.api.Service.name]/[API_name][google.protobuf.Api.name]" + // will be accepted. For example, if no audiences are in the setting, + // LibraryService API will only accept JWTs with the following audience + // "https://library-example.googleapis.com/google.example.library.v1.LibraryService". + // + // Example: + // + // audiences: bookstore_android.apps.googleusercontent.com, + // bookstore_web.apps.googleusercontent.com + string audiences = 2; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/auth_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/auth_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..ef4f6e4c0ad8c3e5c62754461c71b72319d44ad3 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/auth_pb2.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/auth.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x15google/api/auth.proto\x12\ngoogle.api"l\n\x0e\x41uthentication\x12-\n\x05rules\x18\x03 \x03(\x0b\x32\x1e.google.api.AuthenticationRule\x12+\n\tproviders\x18\x04 \x03(\x0b\x32\x18.google.api.AuthProvider"\xa9\x01\n\x12\x41uthenticationRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12,\n\x05oauth\x18\x02 \x01(\x0b\x32\x1d.google.api.OAuthRequirements\x12 \n\x18\x61llow_without_credential\x18\x05 \x01(\x08\x12\x31\n\x0crequirements\x18\x07 \x03(\x0b\x32\x1b.google.api.AuthRequirement"^\n\x0bJwtLocation\x12\x10\n\x06header\x18\x01 \x01(\tH\x00\x12\x0f\n\x05query\x18\x02 \x01(\tH\x00\x12\x10\n\x06\x63ookie\x18\x04 \x01(\tH\x00\x12\x14\n\x0cvalue_prefix\x18\x03 \x01(\tB\x04\n\x02in"\x9a\x01\n\x0c\x41uthProvider\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06issuer\x18\x02 \x01(\t\x12\x10\n\x08jwks_uri\x18\x03 \x01(\t\x12\x11\n\taudiences\x18\x04 \x01(\t\x12\x19\n\x11\x61uthorization_url\x18\x05 \x01(\t\x12.\n\rjwt_locations\x18\x06 \x03(\x0b\x32\x17.google.api.JwtLocation"-\n\x11OAuthRequirements\x12\x18\n\x10\x63\x61nonical_scopes\x18\x01 \x01(\t"9\n\x0f\x41uthRequirement\x12\x13\n\x0bprovider_id\x18\x01 \x01(\t\x12\x11\n\taudiences\x18\x02 \x01(\tBk\n\x0e\x63om.google.apiB\tAuthProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_AUTHENTICATION = DESCRIPTOR.message_types_by_name["Authentication"] +_AUTHENTICATIONRULE = DESCRIPTOR.message_types_by_name["AuthenticationRule"] +_JWTLOCATION = DESCRIPTOR.message_types_by_name["JwtLocation"] +_AUTHPROVIDER = DESCRIPTOR.message_types_by_name["AuthProvider"] +_OAUTHREQUIREMENTS = DESCRIPTOR.message_types_by_name["OAuthRequirements"] +_AUTHREQUIREMENT = DESCRIPTOR.message_types_by_name["AuthRequirement"] +Authentication = _reflection.GeneratedProtocolMessageType( + "Authentication", + (_message.Message,), + { + "DESCRIPTOR": _AUTHENTICATION, + "__module__": "google.api.auth_pb2" + # @@protoc_insertion_point(class_scope:google.api.Authentication) + }, +) +_sym_db.RegisterMessage(Authentication) + +AuthenticationRule = _reflection.GeneratedProtocolMessageType( + "AuthenticationRule", + (_message.Message,), + { + "DESCRIPTOR": _AUTHENTICATIONRULE, + "__module__": "google.api.auth_pb2" + # @@protoc_insertion_point(class_scope:google.api.AuthenticationRule) + }, +) +_sym_db.RegisterMessage(AuthenticationRule) + +JwtLocation = _reflection.GeneratedProtocolMessageType( + "JwtLocation", + (_message.Message,), + { + "DESCRIPTOR": _JWTLOCATION, + "__module__": "google.api.auth_pb2" + # @@protoc_insertion_point(class_scope:google.api.JwtLocation) + }, +) +_sym_db.RegisterMessage(JwtLocation) + +AuthProvider = _reflection.GeneratedProtocolMessageType( + "AuthProvider", + (_message.Message,), + { + "DESCRIPTOR": _AUTHPROVIDER, + "__module__": "google.api.auth_pb2" + # @@protoc_insertion_point(class_scope:google.api.AuthProvider) + }, +) +_sym_db.RegisterMessage(AuthProvider) + +OAuthRequirements = _reflection.GeneratedProtocolMessageType( + "OAuthRequirements", + (_message.Message,), + { + "DESCRIPTOR": _OAUTHREQUIREMENTS, + "__module__": "google.api.auth_pb2" + # @@protoc_insertion_point(class_scope:google.api.OAuthRequirements) + }, +) +_sym_db.RegisterMessage(OAuthRequirements) + +AuthRequirement = _reflection.GeneratedProtocolMessageType( + "AuthRequirement", + (_message.Message,), + { + "DESCRIPTOR": _AUTHREQUIREMENT, + "__module__": "google.api.auth_pb2" + # @@protoc_insertion_point(class_scope:google.api.AuthRequirement) + }, +) +_sym_db.RegisterMessage(AuthRequirement) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\tAuthProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _AUTHENTICATION._serialized_start = 37 + _AUTHENTICATION._serialized_end = 145 + _AUTHENTICATIONRULE._serialized_start = 148 + _AUTHENTICATIONRULE._serialized_end = 317 + _JWTLOCATION._serialized_start = 319 + _JWTLOCATION._serialized_end = 413 + _AUTHPROVIDER._serialized_start = 416 + _AUTHPROVIDER._serialized_end = 570 + _OAUTHREQUIREMENTS._serialized_start = 572 + _OAUTHREQUIREMENTS._serialized_end = 617 + _AUTHREQUIREMENT._serialized_start = 619 + _AUTHREQUIREMENT._serialized_end = 676 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/backend.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/backend.proto new file mode 100644 index 0000000000000000000000000000000000000000..6ff68878b6e3e8999df3172ca88208aa03865186 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/backend.proto @@ -0,0 +1,185 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "BackendProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// `Backend` defines the backend configuration for a service. +message Backend { + // A list of API backend rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated BackendRule rules = 1; +} + +// A backend rule provides configuration for an individual API element. +message BackendRule { + // Path Translation specifies how to combine the backend address with the + // request path in order to produce the appropriate forwarding URL for the + // request. + // + // Path Translation is applicable only to HTTP-based backends. Backends which + // do not accept requests over HTTP/HTTPS should leave `path_translation` + // unspecified. + enum PathTranslation { + PATH_TRANSLATION_UNSPECIFIED = 0; + + // Use the backend address as-is, with no modification to the path. If the + // URL pattern contains variables, the variable names and values will be + // appended to the query string. If a query string parameter and a URL + // pattern variable have the same name, this may result in duplicate keys in + // the query string. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: https://example.cloudfunctions.net/getUser + // + // Requests to the following request paths will call the backend at the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe + CONSTANT_ADDRESS = 1; + + // The request path will be appended to the backend address. + // + // # Examples + // + // Given the following operation config: + // + // Method path: /api/company/{cid}/user/{uid} + // Backend address: https://example.appspot.com + // + // Requests to the following request paths will call the backend at the + // translated path: + // + // Request path: /api/company/widgetworks/user/johndoe + // Translated: + // https://example.appspot.com/api/company/widgetworks/user/johndoe + // + // Request path: /api/company/widgetworks/user/johndoe?timezone=EST + // Translated: + // https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST + APPEND_PATH_TO_ADDRESS = 2; + } + + // Selects the methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + string selector = 1; + + // The address of the API backend. + // + // The scheme is used to determine the backend protocol and security. + // The following schemes are accepted: + // + // SCHEME PROTOCOL SECURITY + // http:// HTTP None + // https:// HTTP TLS + // grpc:// gRPC None + // grpcs:// gRPC TLS + // + // It is recommended to explicitly include a scheme. Leaving out the scheme + // may cause constrasting behaviors across platforms. + // + // If the port is unspecified, the default is: + // - 80 for schemes without TLS + // - 443 for schemes with TLS + // + // For HTTP backends, use [protocol][google.api.BackendRule.protocol] + // to specify the protocol version. + string address = 2; + + // The number of seconds to wait for a response from a request. The default + // varies based on the request protocol and deployment environment. + double deadline = 3; + + // Deprecated, do not use. + double min_deadline = 4 [deprecated = true]; + + // The number of seconds to wait for the completion of a long running + // operation. The default is no deadline. + double operation_deadline = 5; + + PathTranslation path_translation = 6; + + // Authentication settings used by the backend. + // + // These are typically used to provide service management functionality to + // a backend served on a publicly-routable URL. The `authentication` + // details should match the authentication behavior used by the backend. + // + // For example, specifying `jwt_audience` implies that the backend expects + // authentication via a JWT. + // + // When authentication is unspecified, the resulting behavior is the same + // as `disable_auth` set to `true`. + // + // Refer to https://developers.google.com/identity/protocols/OpenIDConnect for + // JWT ID token. + oneof authentication { + // The JWT audience is used when generating a JWT ID token for the backend. + // This ID token will be added in the HTTP "authorization" header, and sent + // to the backend. + string jwt_audience = 7; + + // When disable_auth is true, a JWT ID token won't be generated and the + // original "Authorization" HTTP header will be preserved. If the header is + // used to carry the original token and is expected by the backend, this + // field must be set to true to preserve the header. + bool disable_auth = 8; + } + + // The protocol used for sending a request to the backend. + // The supported values are "http/1.1" and "h2". + // + // The default value is inferred from the scheme in the + // [address][google.api.BackendRule.address] field: + // + // SCHEME PROTOCOL + // http:// http/1.1 + // https:// http/1.1 + // grpc:// h2 + // grpcs:// h2 + // + // For secure HTTP backends (https://) that support HTTP/2, set this field + // to "h2" for improved performance. + // + // Configuring this field to non-default values is only supported for secure + // HTTP backends. This field will be ignored for all other backends. + // + // See + // https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids + // for more details on the supported values. + string protocol = 9; + + // The map between request protocol and the backend address. + map overrides_by_request_protocol = 10; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/backend_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/backend_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..437bebb6193fd323e937c9a286816c2740a784e2 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/backend_pb2.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/backend.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x18google/api/backend.proto\x12\ngoogle.api"1\n\x07\x42\x61\x63kend\x12&\n\x05rules\x18\x01 \x03(\x0b\x32\x17.google.api.BackendRule"\xb2\x04\n\x0b\x42\x61\x63kendRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t\x12\x10\n\x08\x64\x65\x61\x64line\x18\x03 \x01(\x01\x12\x18\n\x0cmin_deadline\x18\x04 \x01(\x01\x42\x02\x18\x01\x12\x1a\n\x12operation_deadline\x18\x05 \x01(\x01\x12\x41\n\x10path_translation\x18\x06 \x01(\x0e\x32\'.google.api.BackendRule.PathTranslation\x12\x16\n\x0cjwt_audience\x18\x07 \x01(\tH\x00\x12\x16\n\x0c\x64isable_auth\x18\x08 \x01(\x08H\x00\x12\x10\n\x08protocol\x18\t \x01(\t\x12^\n\x1doverrides_by_request_protocol\x18\n \x03(\x0b\x32\x37.google.api.BackendRule.OverridesByRequestProtocolEntry\x1aZ\n\x1fOverridesByRequestProtocolEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.google.api.BackendRule:\x02\x38\x01"e\n\x0fPathTranslation\x12 \n\x1cPATH_TRANSLATION_UNSPECIFIED\x10\x00\x12\x14\n\x10\x43ONSTANT_ADDRESS\x10\x01\x12\x1a\n\x16\x41PPEND_PATH_TO_ADDRESS\x10\x02\x42\x10\n\x0e\x61uthenticationBn\n\x0e\x63om.google.apiB\x0c\x42\x61\x63kendProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_BACKEND = DESCRIPTOR.message_types_by_name["Backend"] +_BACKENDRULE = DESCRIPTOR.message_types_by_name["BackendRule"] +_BACKENDRULE_OVERRIDESBYREQUESTPROTOCOLENTRY = _BACKENDRULE.nested_types_by_name[ + "OverridesByRequestProtocolEntry" +] +_BACKENDRULE_PATHTRANSLATION = _BACKENDRULE.enum_types_by_name["PathTranslation"] +Backend = _reflection.GeneratedProtocolMessageType( + "Backend", + (_message.Message,), + { + "DESCRIPTOR": _BACKEND, + "__module__": "google.api.backend_pb2" + # @@protoc_insertion_point(class_scope:google.api.Backend) + }, +) +_sym_db.RegisterMessage(Backend) + +BackendRule = _reflection.GeneratedProtocolMessageType( + "BackendRule", + (_message.Message,), + { + "OverridesByRequestProtocolEntry": _reflection.GeneratedProtocolMessageType( + "OverridesByRequestProtocolEntry", + (_message.Message,), + { + "DESCRIPTOR": _BACKENDRULE_OVERRIDESBYREQUESTPROTOCOLENTRY, + "__module__": "google.api.backend_pb2" + # @@protoc_insertion_point(class_scope:google.api.BackendRule.OverridesByRequestProtocolEntry) + }, + ), + "DESCRIPTOR": _BACKENDRULE, + "__module__": "google.api.backend_pb2" + # @@protoc_insertion_point(class_scope:google.api.BackendRule) + }, +) +_sym_db.RegisterMessage(BackendRule) +_sym_db.RegisterMessage(BackendRule.OverridesByRequestProtocolEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\014BackendProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _BACKENDRULE_OVERRIDESBYREQUESTPROTOCOLENTRY._options = None + _BACKENDRULE_OVERRIDESBYREQUESTPROTOCOLENTRY._serialized_options = b"8\001" + _BACKENDRULE.fields_by_name["min_deadline"]._options = None + _BACKENDRULE.fields_by_name["min_deadline"]._serialized_options = b"\030\001" + _BACKEND._serialized_start = 40 + _BACKEND._serialized_end = 89 + _BACKENDRULE._serialized_start = 92 + _BACKENDRULE._serialized_end = 654 + _BACKENDRULE_OVERRIDESBYREQUESTPROTOCOLENTRY._serialized_start = 443 + _BACKENDRULE_OVERRIDESBYREQUESTPROTOCOLENTRY._serialized_end = 533 + _BACKENDRULE_PATHTRANSLATION._serialized_start = 535 + _BACKENDRULE_PATHTRANSLATION._serialized_end = 636 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/billing.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/billing.proto new file mode 100644 index 0000000000000000000000000000000000000000..8b75452fbcf906647b08c733109e0ddf489745f7 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/billing.proto @@ -0,0 +1,77 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "BillingProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Billing related configuration of the service. +// +// The following example shows how to configure monitored resources and metrics +// for billing, `consumer_destinations` is the only supported destination and +// the monitored resources need at least one label key +// `cloud.googleapis.com/location` to indicate the location of the billing +// usage, using different monitored resources between monitoring and billing is +// recommended so they can be evolved independently: +// +// +// monitored_resources: +// - type: library.googleapis.com/billing_branch +// labels: +// - key: cloud.googleapis.com/location +// description: | +// Predefined label to support billing location restriction. +// - key: city +// description: | +// Custom label to define the city where the library branch is located +// in. +// - key: name +// description: Custom label to define the name of the library branch. +// metrics: +// - name: library.googleapis.com/book/borrowed_count +// metric_kind: DELTA +// value_type: INT64 +// unit: "1" +// billing: +// consumer_destinations: +// - monitored_resource: library.googleapis.com/billing_branch +// metrics: +// - library.googleapis.com/book/borrowed_count +message Billing { + // Configuration of a specific billing destination (Currently only support + // bill against consumer project). + message BillingDestination { + // The monitored resource type. The type must be defined in + // [Service.monitored_resources][google.api.Service.monitored_resources] + // section. + string monitored_resource = 1; + + // Names of the metrics to report to this billing destination. + // Each name must be defined in + // [Service.metrics][google.api.Service.metrics] section. + repeated string metrics = 2; + } + + // Billing configurations for sending metrics to the consumer project. + // There can be multiple consumer destinations per service, each one must have + // a different monitored resource type. A metric can be used in at most + // one consumer destination. + repeated BillingDestination consumer_destinations = 8; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/billing_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/billing_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..a273e25bc01231981f006d455121ce8b5665e854 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/billing_pb2.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/billing.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x18google/api/billing.proto\x12\ngoogle.api"\x93\x01\n\x07\x42illing\x12\x45\n\x15\x63onsumer_destinations\x18\x08 \x03(\x0b\x32&.google.api.Billing.BillingDestination\x1a\x41\n\x12\x42illingDestination\x12\x1a\n\x12monitored_resource\x18\x01 \x01(\t\x12\x0f\n\x07metrics\x18\x02 \x03(\tBn\n\x0e\x63om.google.apiB\x0c\x42illingProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_BILLING = DESCRIPTOR.message_types_by_name["Billing"] +_BILLING_BILLINGDESTINATION = _BILLING.nested_types_by_name["BillingDestination"] +Billing = _reflection.GeneratedProtocolMessageType( + "Billing", + (_message.Message,), + { + "BillingDestination": _reflection.GeneratedProtocolMessageType( + "BillingDestination", + (_message.Message,), + { + "DESCRIPTOR": _BILLING_BILLINGDESTINATION, + "__module__": "google.api.billing_pb2" + # @@protoc_insertion_point(class_scope:google.api.Billing.BillingDestination) + }, + ), + "DESCRIPTOR": _BILLING, + "__module__": "google.api.billing_pb2" + # @@protoc_insertion_point(class_scope:google.api.Billing) + }, +) +_sym_db.RegisterMessage(Billing) +_sym_db.RegisterMessage(Billing.BillingDestination) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\014BillingProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _BILLING._serialized_start = 41 + _BILLING._serialized_end = 188 + _BILLING_BILLINGDESTINATION._serialized_start = 123 + _BILLING_BILLINGDESTINATION._serialized_end = 188 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/client.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/client.proto new file mode 100644 index 0000000000000000000000000000000000000000..0952e8373c7395aa027215b070bd7edae2c360b1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/client.proto @@ -0,0 +1,427 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/api/launch_stage.proto"; +import "google/protobuf/descriptor.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "ClientProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.MethodOptions { + // A definition of a client library method signature. + // + // In client libraries, each proto RPC corresponds to one or more methods + // which the end user is able to call, and calls the underlying RPC. + // Normally, this method receives a single argument (a struct or instance + // corresponding to the RPC request object). Defining this field will + // add one or more overloads providing flattened or simpler method signatures + // in some languages. + // + // The fields on the method signature are provided as a comma-separated + // string. + // + // For example, the proto RPC and annotation: + // + // rpc CreateSubscription(CreateSubscriptionRequest) + // returns (Subscription) { + // option (google.api.method_signature) = "name,topic"; + // } + // + // Would add the following Java overload (in addition to the method accepting + // the request object): + // + // public final Subscription createSubscription(String name, String topic) + // + // The following backwards-compatibility guidelines apply: + // + // * Adding this annotation to an unannotated method is backwards + // compatible. + // * Adding this annotation to a method which already has existing + // method signature annotations is backwards compatible if and only if + // the new method signature annotation is last in the sequence. + // * Modifying or removing an existing method signature annotation is + // a breaking change. + // * Re-ordering existing method signature annotations is a breaking + // change. + repeated string method_signature = 1051; +} + +extend google.protobuf.ServiceOptions { + // The hostname for this service. + // This should be specified with no prefix or protocol. + // + // Example: + // + // service Foo { + // option (google.api.default_host) = "foo.googleapi.com"; + // ... + // } + string default_host = 1049; + + // OAuth scopes needed for the client. + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform"; + // ... + // } + // + // If there is more than one scope, use a comma-separated string: + // + // Example: + // + // service Foo { + // option (google.api.oauth_scopes) = \ + // "https://www.googleapis.com/auth/cloud-platform," + // "https://www.googleapis.com/auth/monitoring"; + // ... + // } + string oauth_scopes = 1050; + + // The API version of this service, which should be sent by version-aware + // clients to the service. This allows services to abide by the schema and + // behavior of the service at the time this API version was deployed. + // The format of the API version must be treated as opaque by clients. + // Services may use a format with an apparent structure, but clients must + // not rely on this to determine components within an API version, or attempt + // to construct other valid API versions. Note that this is for upcoming + // functionality and may not be implemented for all services. + // + // Example: + // + // service Foo { + // option (google.api.api_version) = "v1_20230821_preview"; + // } + string api_version = 525000001; +} + +// Required information for every language. +message CommonLanguageSettings { + // Link to automatically generated reference documentation. Example: + // https://cloud.google.com/nodejs/docs/reference/asset/latest + string reference_docs_uri = 1 [deprecated = true]; + + // The destination where API teams want this client library to be published. + repeated ClientLibraryDestination destinations = 2; +} + +// Details about how and where to publish client libraries. +message ClientLibrarySettings { + // Version of the API to apply these settings to. This is the full protobuf + // package for the API, ending in the version element. + // Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1". + string version = 1; + + // Launch stage of this version of the API. + LaunchStage launch_stage = 2; + + // When using transport=rest, the client request will encode enums as + // numbers rather than strings. + bool rest_numeric_enums = 3; + + // Settings for legacy Java features, supported in the Service YAML. + JavaSettings java_settings = 21; + + // Settings for C++ client libraries. + CppSettings cpp_settings = 22; + + // Settings for PHP client libraries. + PhpSettings php_settings = 23; + + // Settings for Python client libraries. + PythonSettings python_settings = 24; + + // Settings for Node client libraries. + NodeSettings node_settings = 25; + + // Settings for .NET client libraries. + DotnetSettings dotnet_settings = 26; + + // Settings for Ruby client libraries. + RubySettings ruby_settings = 27; + + // Settings for Go client libraries. + GoSettings go_settings = 28; +} + +// This message configures the settings for publishing [Google Cloud Client +// libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) +// generated from the service config. +message Publishing { + // A list of API method settings, e.g. the behavior for methods that use the + // long-running operation pattern. + repeated MethodSettings method_settings = 2; + + // Link to a *public* URI where users can report issues. Example: + // https://issuetracker.google.com/issues/new?component=190865&template=1161103 + string new_issue_uri = 101; + + // Link to product home page. Example: + // https://cloud.google.com/asset-inventory/docs/overview + string documentation_uri = 102; + + // Used as a tracking tag when collecting data about the APIs developer + // relations artifacts like docs, packages delivered to package managers, + // etc. Example: "speech". + string api_short_name = 103; + + // GitHub label to apply to issues and pull requests opened for this API. + string github_label = 104; + + // GitHub teams to be added to CODEOWNERS in the directory in GitHub + // containing source code for the client libraries for this API. + repeated string codeowner_github_teams = 105; + + // A prefix used in sample code when demarking regions to be included in + // documentation. + string doc_tag_prefix = 106; + + // For whom the client library is being published. + ClientLibraryOrganization organization = 107; + + // Client library settings. If the same version string appears multiple + // times in this list, then the last one wins. Settings from earlier + // settings with the same version string are discarded. + repeated ClientLibrarySettings library_settings = 109; + + // Optional link to proto reference documentation. Example: + // https://cloud.google.com/pubsub/lite/docs/reference/rpc + string proto_reference_documentation_uri = 110; + + // Optional link to REST reference documentation. Example: + // https://cloud.google.com/pubsub/lite/docs/reference/rest + string rest_reference_documentation_uri = 111; +} + +// Settings for Java client libraries. +message JavaSettings { + // The package name to use in Java. Clobbers the java_package option + // set in the protobuf. This should be used **only** by APIs + // who have already set the language_settings.java.package_name" field + // in gapic.yaml. API teams should use the protobuf java_package option + // where possible. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // library_package: com.google.cloud.pubsub.v1 + string library_package = 1; + + // Configure the Java class name to use instead of the service's for its + // corresponding generated GAPIC client. Keys are fully-qualified + // service names as they appear in the protobuf (including the full + // the language_settings.java.interface_names" field in gapic.yaml. API + // teams should otherwise use the service name as it appears in the + // protobuf. + // + // Example of a YAML configuration:: + // + // publishing: + // java_settings: + // service_class_names: + // - google.pubsub.v1.Publisher: TopicAdmin + // - google.pubsub.v1.Subscriber: SubscriptionAdmin + map service_class_names = 2; + + // Some settings. + CommonLanguageSettings common = 3; +} + +// Settings for C++ client libraries. +message CppSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Php client libraries. +message PhpSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Python client libraries. +message PythonSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Node client libraries. +message NodeSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Dotnet client libraries. +message DotnetSettings { + // Some settings. + CommonLanguageSettings common = 1; + + // Map from original service names to renamed versions. + // This is used when the default generated types + // would cause a naming conflict. (Neither name is + // fully-qualified.) + // Example: Subscriber to SubscriberServiceApi. + map renamed_services = 2; + + // Map from full resource types to the effective short name + // for the resource. This is used when otherwise resource + // named from different services would cause naming collisions. + // Example entry: + // "datalabeling.googleapis.com/Dataset": "DataLabelingDataset" + map renamed_resources = 3; + + // List of full resource types to ignore during generation. + // This is typically used for API-specific Location resources, + // which should be handled by the generator as if they were actually + // the common Location resources. + // Example entry: "documentai.googleapis.com/Location" + repeated string ignored_resources = 4; + + // Namespaces which must be aliased in snippets due to + // a known (but non-generator-predictable) naming collision + repeated string forced_namespace_aliases = 5; + + // Method signatures (in the form "service.method(signature)") + // which are provided separately, so shouldn't be generated. + // Snippets *calling* these methods are still generated, however. + repeated string handwritten_signatures = 6; +} + +// Settings for Ruby client libraries. +message RubySettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Settings for Go client libraries. +message GoSettings { + // Some settings. + CommonLanguageSettings common = 1; +} + +// Describes the generator configuration for a method. +message MethodSettings { + // Describes settings to use when generating API methods that use the + // long-running operation pattern. + // All default values below are from those used in the client library + // generators (e.g. + // [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)). + message LongRunning { + // Initial delay after which the first poll request will be made. + // Default value: 5 seconds. + google.protobuf.Duration initial_poll_delay = 1; + + // Multiplier to gradually increase delay between subsequent polls until it + // reaches max_poll_delay. + // Default value: 1.5. + float poll_delay_multiplier = 2; + + // Maximum time between two subsequent poll requests. + // Default value: 45 seconds. + google.protobuf.Duration max_poll_delay = 3; + + // Total polling timeout. + // Default value: 5 minutes. + google.protobuf.Duration total_poll_timeout = 4; + } + + // The fully qualified name of the method, for which the options below apply. + // This is used to find the method to apply the options. + string selector = 1; + + // Describes settings to use for long-running operations when generating + // API methods for RPCs. Complements RPCs that use the annotations in + // google/longrunning/operations.proto. + // + // Example of a YAML configuration:: + // + // publishing: + // method_settings: + // - selector: google.cloud.speech.v2.Speech.BatchRecognize + // long_running: + // initial_poll_delay: + // seconds: 60 # 1 minute + // poll_delay_multiplier: 1.5 + // max_poll_delay: + // seconds: 360 # 6 minutes + // total_poll_timeout: + // seconds: 54000 # 90 minutes + LongRunning long_running = 2; + + // List of top-level fields of the request message, that should be + // automatically populated by the client libraries based on their + // (google.api.field_info).format. Currently supported format: UUID4. + // + // Example of a YAML configuration: + // + // publishing: + // method_settings: + // - selector: google.example.v1.ExampleService.CreateExample + // auto_populated_fields: + // - request_id + repeated string auto_populated_fields = 3; +} + +// The organization for which the client libraries are being published. +// Affects the url where generated docs are published, etc. +enum ClientLibraryOrganization { + // Not useful. + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0; + + // Google Cloud Platform Org. + CLOUD = 1; + + // Ads (Advertising) Org. + ADS = 2; + + // Photos Org. + PHOTOS = 3; + + // Street View Org. + STREET_VIEW = 4; + + // Shopping Org. + SHOPPING = 5; + + // Geo Org. + GEO = 6; + + // Generative AI - https://developers.generativeai.google + GENERATIVE_AI = 7; +} + +// To where should client libraries be published? +enum ClientLibraryDestination { + // Client libraries will neither be generated nor published to package + // managers. + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0; + + // Generate the client library in a repo under github.com/googleapis, + // but don't publish it to package managers. + GITHUB = 10; + + // Publish the library to package managers like nuget.org and npmjs.com. + PACKAGE_MANAGER = 20; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/client_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/client_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..ca812b4fd51ee8b400e004b3b0634d4c6f839fbc --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/client_pb2.py @@ -0,0 +1,324 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/client.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import launch_stage_pb2 as google_dot_api_dot_launch__stage__pb2 +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x17google/api/client.proto\x12\ngoogle.api\x1a\x1dgoogle/api/launch_stage.proto\x1a google/protobuf/descriptor.proto\x1a\x1egoogle/protobuf/duration.proto"t\n\x16\x43ommonLanguageSettings\x12\x1e\n\x12reference_docs_uri\x18\x01 \x01(\tB\x02\x18\x01\x12:\n\x0c\x64\x65stinations\x18\x02 \x03(\x0e\x32$.google.api.ClientLibraryDestination"\xfb\x03\n\x15\x43lientLibrarySettings\x12\x0f\n\x07version\x18\x01 \x01(\t\x12-\n\x0claunch_stage\x18\x02 \x01(\x0e\x32\x17.google.api.LaunchStage\x12\x1a\n\x12rest_numeric_enums\x18\x03 \x01(\x08\x12/\n\rjava_settings\x18\x15 \x01(\x0b\x32\x18.google.api.JavaSettings\x12-\n\x0c\x63pp_settings\x18\x16 \x01(\x0b\x32\x17.google.api.CppSettings\x12-\n\x0cphp_settings\x18\x17 \x01(\x0b\x32\x17.google.api.PhpSettings\x12\x33\n\x0fpython_settings\x18\x18 \x01(\x0b\x32\x1a.google.api.PythonSettings\x12/\n\rnode_settings\x18\x19 \x01(\x0b\x32\x18.google.api.NodeSettings\x12\x33\n\x0f\x64otnet_settings\x18\x1a \x01(\x0b\x32\x1a.google.api.DotnetSettings\x12/\n\rruby_settings\x18\x1b \x01(\x0b\x32\x18.google.api.RubySettings\x12+\n\x0bgo_settings\x18\x1c \x01(\x0b\x32\x16.google.api.GoSettings"\xa8\x03\n\nPublishing\x12\x33\n\x0fmethod_settings\x18\x02 \x03(\x0b\x32\x1a.google.api.MethodSettings\x12\x15\n\rnew_issue_uri\x18\x65 \x01(\t\x12\x19\n\x11\x64ocumentation_uri\x18\x66 \x01(\t\x12\x16\n\x0e\x61pi_short_name\x18g \x01(\t\x12\x14\n\x0cgithub_label\x18h \x01(\t\x12\x1e\n\x16\x63odeowner_github_teams\x18i \x03(\t\x12\x16\n\x0e\x64oc_tag_prefix\x18j \x01(\t\x12;\n\x0corganization\x18k \x01(\x0e\x32%.google.api.ClientLibraryOrganization\x12;\n\x10library_settings\x18m \x03(\x0b\x32!.google.api.ClientLibrarySettings\x12)\n!proto_reference_documentation_uri\x18n \x01(\t\x12(\n rest_reference_documentation_uri\x18o \x01(\t"\xe3\x01\n\x0cJavaSettings\x12\x17\n\x0flibrary_package\x18\x01 \x01(\t\x12L\n\x13service_class_names\x18\x02 \x03(\x0b\x32/.google.api.JavaSettings.ServiceClassNamesEntry\x12\x32\n\x06\x63ommon\x18\x03 \x01(\x0b\x32".google.api.CommonLanguageSettings\x1a\x38\n\x16ServiceClassNamesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"A\n\x0b\x43ppSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"A\n\x0bPhpSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"D\n\x0ePythonSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"B\n\x0cNodeSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"\xaa\x03\n\x0e\x44otnetSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings\x12I\n\x10renamed_services\x18\x02 \x03(\x0b\x32/.google.api.DotnetSettings.RenamedServicesEntry\x12K\n\x11renamed_resources\x18\x03 \x03(\x0b\x32\x30.google.api.DotnetSettings.RenamedResourcesEntry\x12\x19\n\x11ignored_resources\x18\x04 \x03(\t\x12 \n\x18\x66orced_namespace_aliases\x18\x05 \x03(\t\x12\x1e\n\x16handwritten_signatures\x18\x06 \x03(\t\x1a\x36\n\x14RenamedServicesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x37\n\x15RenamedResourcesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"B\n\x0cRubySettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"@\n\nGoSettings\x12\x32\n\x06\x63ommon\x18\x01 \x01(\x0b\x32".google.api.CommonLanguageSettings"\xcf\x02\n\x0eMethodSettings\x12\x10\n\x08selector\x18\x01 \x01(\t\x12<\n\x0clong_running\x18\x02 \x01(\x0b\x32&.google.api.MethodSettings.LongRunning\x12\x1d\n\x15\x61uto_populated_fields\x18\x03 \x03(\t\x1a\xcd\x01\n\x0bLongRunning\x12\x35\n\x12initial_poll_delay\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1d\n\x15poll_delay_multiplier\x18\x02 \x01(\x02\x12\x31\n\x0emax_poll_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x35\n\x12total_poll_timeout\x18\x04 \x01(\x0b\x32\x19.google.protobuf.Duration*\xa3\x01\n\x19\x43lientLibraryOrganization\x12+\n\'CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED\x10\x00\x12\t\n\x05\x43LOUD\x10\x01\x12\x07\n\x03\x41\x44S\x10\x02\x12\n\n\x06PHOTOS\x10\x03\x12\x0f\n\x0bSTREET_VIEW\x10\x04\x12\x0c\n\x08SHOPPING\x10\x05\x12\x07\n\x03GEO\x10\x06\x12\x11\n\rGENERATIVE_AI\x10\x07*g\n\x18\x43lientLibraryDestination\x12*\n&CLIENT_LIBRARY_DESTINATION_UNSPECIFIED\x10\x00\x12\n\n\x06GITHUB\x10\n\x12\x13\n\x0fPACKAGE_MANAGER\x10\x14:9\n\x10method_signature\x12\x1e.google.protobuf.MethodOptions\x18\x9b\x08 \x03(\t:6\n\x0c\x64\x65\x66\x61ult_host\x12\x1f.google.protobuf.ServiceOptions\x18\x99\x08 \x01(\t:6\n\x0coauth_scopes\x12\x1f.google.protobuf.ServiceOptions\x18\x9a\x08 \x01(\t:8\n\x0b\x61pi_version\x12\x1f.google.protobuf.ServiceOptions\x18\xc1\xba\xab\xfa\x01 \x01(\tBi\n\x0e\x63om.google.apiB\x0b\x43lientProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3' +) + +_CLIENTLIBRARYORGANIZATION = DESCRIPTOR.enum_types_by_name["ClientLibraryOrganization"] +ClientLibraryOrganization = enum_type_wrapper.EnumTypeWrapper( + _CLIENTLIBRARYORGANIZATION +) +_CLIENTLIBRARYDESTINATION = DESCRIPTOR.enum_types_by_name["ClientLibraryDestination"] +ClientLibraryDestination = enum_type_wrapper.EnumTypeWrapper(_CLIENTLIBRARYDESTINATION) +CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0 +CLOUD = 1 +ADS = 2 +PHOTOS = 3 +STREET_VIEW = 4 +SHOPPING = 5 +GEO = 6 +GENERATIVE_AI = 7 +CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0 +GITHUB = 10 +PACKAGE_MANAGER = 20 + +METHOD_SIGNATURE_FIELD_NUMBER = 1051 +method_signature = DESCRIPTOR.extensions_by_name["method_signature"] +DEFAULT_HOST_FIELD_NUMBER = 1049 +default_host = DESCRIPTOR.extensions_by_name["default_host"] +OAUTH_SCOPES_FIELD_NUMBER = 1050 +oauth_scopes = DESCRIPTOR.extensions_by_name["oauth_scopes"] +API_VERSION_FIELD_NUMBER = 525000001 +api_version = DESCRIPTOR.extensions_by_name["api_version"] + +_COMMONLANGUAGESETTINGS = DESCRIPTOR.message_types_by_name["CommonLanguageSettings"] +_CLIENTLIBRARYSETTINGS = DESCRIPTOR.message_types_by_name["ClientLibrarySettings"] +_PUBLISHING = DESCRIPTOR.message_types_by_name["Publishing"] +_JAVASETTINGS = DESCRIPTOR.message_types_by_name["JavaSettings"] +_JAVASETTINGS_SERVICECLASSNAMESENTRY = _JAVASETTINGS.nested_types_by_name[ + "ServiceClassNamesEntry" +] +_CPPSETTINGS = DESCRIPTOR.message_types_by_name["CppSettings"] +_PHPSETTINGS = DESCRIPTOR.message_types_by_name["PhpSettings"] +_PYTHONSETTINGS = DESCRIPTOR.message_types_by_name["PythonSettings"] +_NODESETTINGS = DESCRIPTOR.message_types_by_name["NodeSettings"] +_DOTNETSETTINGS = DESCRIPTOR.message_types_by_name["DotnetSettings"] +_DOTNETSETTINGS_RENAMEDSERVICESENTRY = _DOTNETSETTINGS.nested_types_by_name[ + "RenamedServicesEntry" +] +_DOTNETSETTINGS_RENAMEDRESOURCESENTRY = _DOTNETSETTINGS.nested_types_by_name[ + "RenamedResourcesEntry" +] +_RUBYSETTINGS = DESCRIPTOR.message_types_by_name["RubySettings"] +_GOSETTINGS = DESCRIPTOR.message_types_by_name["GoSettings"] +_METHODSETTINGS = DESCRIPTOR.message_types_by_name["MethodSettings"] +_METHODSETTINGS_LONGRUNNING = _METHODSETTINGS.nested_types_by_name["LongRunning"] +CommonLanguageSettings = _reflection.GeneratedProtocolMessageType( + "CommonLanguageSettings", + (_message.Message,), + { + "DESCRIPTOR": _COMMONLANGUAGESETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.CommonLanguageSettings) + }, +) +_sym_db.RegisterMessage(CommonLanguageSettings) + +ClientLibrarySettings = _reflection.GeneratedProtocolMessageType( + "ClientLibrarySettings", + (_message.Message,), + { + "DESCRIPTOR": _CLIENTLIBRARYSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.ClientLibrarySettings) + }, +) +_sym_db.RegisterMessage(ClientLibrarySettings) + +Publishing = _reflection.GeneratedProtocolMessageType( + "Publishing", + (_message.Message,), + { + "DESCRIPTOR": _PUBLISHING, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.Publishing) + }, +) +_sym_db.RegisterMessage(Publishing) + +JavaSettings = _reflection.GeneratedProtocolMessageType( + "JavaSettings", + (_message.Message,), + { + "ServiceClassNamesEntry": _reflection.GeneratedProtocolMessageType( + "ServiceClassNamesEntry", + (_message.Message,), + { + "DESCRIPTOR": _JAVASETTINGS_SERVICECLASSNAMESENTRY, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.JavaSettings.ServiceClassNamesEntry) + }, + ), + "DESCRIPTOR": _JAVASETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.JavaSettings) + }, +) +_sym_db.RegisterMessage(JavaSettings) +_sym_db.RegisterMessage(JavaSettings.ServiceClassNamesEntry) + +CppSettings = _reflection.GeneratedProtocolMessageType( + "CppSettings", + (_message.Message,), + { + "DESCRIPTOR": _CPPSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.CppSettings) + }, +) +_sym_db.RegisterMessage(CppSettings) + +PhpSettings = _reflection.GeneratedProtocolMessageType( + "PhpSettings", + (_message.Message,), + { + "DESCRIPTOR": _PHPSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.PhpSettings) + }, +) +_sym_db.RegisterMessage(PhpSettings) + +PythonSettings = _reflection.GeneratedProtocolMessageType( + "PythonSettings", + (_message.Message,), + { + "DESCRIPTOR": _PYTHONSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.PythonSettings) + }, +) +_sym_db.RegisterMessage(PythonSettings) + +NodeSettings = _reflection.GeneratedProtocolMessageType( + "NodeSettings", + (_message.Message,), + { + "DESCRIPTOR": _NODESETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.NodeSettings) + }, +) +_sym_db.RegisterMessage(NodeSettings) + +DotnetSettings = _reflection.GeneratedProtocolMessageType( + "DotnetSettings", + (_message.Message,), + { + "RenamedServicesEntry": _reflection.GeneratedProtocolMessageType( + "RenamedServicesEntry", + (_message.Message,), + { + "DESCRIPTOR": _DOTNETSETTINGS_RENAMEDSERVICESENTRY, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.DotnetSettings.RenamedServicesEntry) + }, + ), + "RenamedResourcesEntry": _reflection.GeneratedProtocolMessageType( + "RenamedResourcesEntry", + (_message.Message,), + { + "DESCRIPTOR": _DOTNETSETTINGS_RENAMEDRESOURCESENTRY, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.DotnetSettings.RenamedResourcesEntry) + }, + ), + "DESCRIPTOR": _DOTNETSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.DotnetSettings) + }, +) +_sym_db.RegisterMessage(DotnetSettings) +_sym_db.RegisterMessage(DotnetSettings.RenamedServicesEntry) +_sym_db.RegisterMessage(DotnetSettings.RenamedResourcesEntry) + +RubySettings = _reflection.GeneratedProtocolMessageType( + "RubySettings", + (_message.Message,), + { + "DESCRIPTOR": _RUBYSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.RubySettings) + }, +) +_sym_db.RegisterMessage(RubySettings) + +GoSettings = _reflection.GeneratedProtocolMessageType( + "GoSettings", + (_message.Message,), + { + "DESCRIPTOR": _GOSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.GoSettings) + }, +) +_sym_db.RegisterMessage(GoSettings) + +MethodSettings = _reflection.GeneratedProtocolMessageType( + "MethodSettings", + (_message.Message,), + { + "LongRunning": _reflection.GeneratedProtocolMessageType( + "LongRunning", + (_message.Message,), + { + "DESCRIPTOR": _METHODSETTINGS_LONGRUNNING, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.MethodSettings.LongRunning) + }, + ), + "DESCRIPTOR": _METHODSETTINGS, + "__module__": "google.api.client_pb2" + # @@protoc_insertion_point(class_scope:google.api.MethodSettings) + }, +) +_sym_db.RegisterMessage(MethodSettings) +_sym_db.RegisterMessage(MethodSettings.LongRunning) + +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension( + method_signature + ) + google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension( + default_host + ) + google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension( + oauth_scopes + ) + google_dot_protobuf_dot_descriptor__pb2.ServiceOptions.RegisterExtension( + api_version + ) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\013ClientProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI" + _COMMONLANGUAGESETTINGS.fields_by_name["reference_docs_uri"]._options = None + _COMMONLANGUAGESETTINGS.fields_by_name[ + "reference_docs_uri" + ]._serialized_options = b"\030\001" + _JAVASETTINGS_SERVICECLASSNAMESENTRY._options = None + _JAVASETTINGS_SERVICECLASSNAMESENTRY._serialized_options = b"8\001" + _DOTNETSETTINGS_RENAMEDSERVICESENTRY._options = None + _DOTNETSETTINGS_RENAMEDSERVICESENTRY._serialized_options = b"8\001" + _DOTNETSETTINGS_RENAMEDRESOURCESENTRY._options = None + _DOTNETSETTINGS_RENAMEDRESOURCESENTRY._serialized_options = b"8\001" + _CLIENTLIBRARYORGANIZATION._serialized_start = 2595 + _CLIENTLIBRARYORGANIZATION._serialized_end = 2758 + _CLIENTLIBRARYDESTINATION._serialized_start = 2760 + _CLIENTLIBRARYDESTINATION._serialized_end = 2863 + _COMMONLANGUAGESETTINGS._serialized_start = 136 + _COMMONLANGUAGESETTINGS._serialized_end = 252 + _CLIENTLIBRARYSETTINGS._serialized_start = 255 + _CLIENTLIBRARYSETTINGS._serialized_end = 762 + _PUBLISHING._serialized_start = 765 + _PUBLISHING._serialized_end = 1189 + _JAVASETTINGS._serialized_start = 1192 + _JAVASETTINGS._serialized_end = 1419 + _JAVASETTINGS_SERVICECLASSNAMESENTRY._serialized_start = 1363 + _JAVASETTINGS_SERVICECLASSNAMESENTRY._serialized_end = 1419 + _CPPSETTINGS._serialized_start = 1421 + _CPPSETTINGS._serialized_end = 1486 + _PHPSETTINGS._serialized_start = 1488 + _PHPSETTINGS._serialized_end = 1553 + _PYTHONSETTINGS._serialized_start = 1555 + _PYTHONSETTINGS._serialized_end = 1623 + _NODESETTINGS._serialized_start = 1625 + _NODESETTINGS._serialized_end = 1691 + _DOTNETSETTINGS._serialized_start = 1694 + _DOTNETSETTINGS._serialized_end = 2120 + _DOTNETSETTINGS_RENAMEDSERVICESENTRY._serialized_start = 2009 + _DOTNETSETTINGS_RENAMEDSERVICESENTRY._serialized_end = 2063 + _DOTNETSETTINGS_RENAMEDRESOURCESENTRY._serialized_start = 2065 + _DOTNETSETTINGS_RENAMEDRESOURCESENTRY._serialized_end = 2120 + _RUBYSETTINGS._serialized_start = 2122 + _RUBYSETTINGS._serialized_end = 2188 + _GOSETTINGS._serialized_start = 2190 + _GOSETTINGS._serialized_end = 2254 + _METHODSETTINGS._serialized_start = 2257 + _METHODSETTINGS._serialized_end = 2592 + _METHODSETTINGS_LONGRUNNING._serialized_start = 2387 + _METHODSETTINGS_LONGRUNNING._serialized_end = 2592 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/config_change.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/config_change.proto new file mode 100644 index 0000000000000000000000000000000000000000..1dc8044b9053b09bcf7b8b55a1feee3ae47e4f53 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/config_change.proto @@ -0,0 +1,84 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/configchange;configchange"; +option java_multiple_files = true; +option java_outer_classname = "ConfigChangeProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Output generated from semantically comparing two versions of a service +// configuration. +// +// Includes detailed information about a field that have changed with +// applicable advice about potential consequences for the change, such as +// backwards-incompatibility. +message ConfigChange { + // Object hierarchy path to the change, with levels separated by a '.' + // character. For repeated fields, an applicable unique identifier field is + // used for the index (usually selector, name, or id). For maps, the term + // 'key' is used. If the field has no unique identifier, the numeric index + // is used. + // Examples: + // - visibility.rules[selector=="google.LibraryService.ListBooks"].restriction + // - quota.metric_rules[selector=="google"].metric_costs[key=="reads"].value + // - logging.producer_destinations[0] + string element = 1; + + // Value of the changed object in the old Service configuration, + // in JSON format. This field will not be populated if ChangeType == ADDED. + string old_value = 2; + + // Value of the changed object in the new Service configuration, + // in JSON format. This field will not be populated if ChangeType == REMOVED. + string new_value = 3; + + // The type for this change, either ADDED, REMOVED, or MODIFIED. + ChangeType change_type = 4; + + // Collection of advice provided for this change, useful for determining the + // possible impact of this change. + repeated Advice advices = 5; +} + +// Generated advice about this change, used for providing more +// information about how a change will affect the existing service. +message Advice { + // Useful description for why this advice was applied and what actions should + // be taken to mitigate any implied risks. + string description = 2; +} + +// Classifies set of possible modifications to an object in the service +// configuration. +enum ChangeType { + // No value was provided. + CHANGE_TYPE_UNSPECIFIED = 0; + + // The changed object exists in the 'new' service configuration, but not + // in the 'old' service configuration. + ADDED = 1; + + // The changed object exists in the 'old' service configuration, but not + // in the 'new' service configuration. + REMOVED = 2; + + // The changed object exists in both service configurations, but its value + // is different. + MODIFIED = 3; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/config_change_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/config_change_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..316c3f0f95cda9c5315ae96595c9b40a59b1d31e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/config_change_pb2.py @@ -0,0 +1,78 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/config_change.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1egoogle/api/config_change.proto\x12\ngoogle.api"\x97\x01\n\x0c\x43onfigChange\x12\x0f\n\x07\x65lement\x18\x01 \x01(\t\x12\x11\n\told_value\x18\x02 \x01(\t\x12\x11\n\tnew_value\x18\x03 \x01(\t\x12+\n\x0b\x63hange_type\x18\x04 \x01(\x0e\x32\x16.google.api.ChangeType\x12#\n\x07\x61\x64vices\x18\x05 \x03(\x0b\x32\x12.google.api.Advice"\x1d\n\x06\x41\x64vice\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t*O\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05\x41\x44\x44\x45\x44\x10\x01\x12\x0b\n\x07REMOVED\x10\x02\x12\x0c\n\x08MODIFIED\x10\x03\x42q\n\x0e\x63om.google.apiB\x11\x43onfigChangeProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/configchange;configchange\xa2\x02\x04GAPIb\x06proto3' +) + +_CHANGETYPE = DESCRIPTOR.enum_types_by_name["ChangeType"] +ChangeType = enum_type_wrapper.EnumTypeWrapper(_CHANGETYPE) +CHANGE_TYPE_UNSPECIFIED = 0 +ADDED = 1 +REMOVED = 2 +MODIFIED = 3 + + +_CONFIGCHANGE = DESCRIPTOR.message_types_by_name["ConfigChange"] +_ADVICE = DESCRIPTOR.message_types_by_name["Advice"] +ConfigChange = _reflection.GeneratedProtocolMessageType( + "ConfigChange", + (_message.Message,), + { + "DESCRIPTOR": _CONFIGCHANGE, + "__module__": "google.api.config_change_pb2" + # @@protoc_insertion_point(class_scope:google.api.ConfigChange) + }, +) +_sym_db.RegisterMessage(ConfigChange) + +Advice = _reflection.GeneratedProtocolMessageType( + "Advice", + (_message.Message,), + { + "DESCRIPTOR": _ADVICE, + "__module__": "google.api.config_change_pb2" + # @@protoc_insertion_point(class_scope:google.api.Advice) + }, +) +_sym_db.RegisterMessage(Advice) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\021ConfigChangeProtoP\001ZCgoogle.golang.org/genproto/googleapis/api/configchange;configchange\242\002\004GAPI" + _CHANGETYPE._serialized_start = 231 + _CHANGETYPE._serialized_end = 310 + _CONFIGCHANGE._serialized_start = 47 + _CONFIGCHANGE._serialized_end = 198 + _ADVICE._serialized_start = 200 + _ADVICE._serialized_end = 229 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/consumer.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/consumer.proto new file mode 100644 index 0000000000000000000000000000000000000000..b7e5df1c8df578036823b492fb03ebf2c2b40b6d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/consumer.proto @@ -0,0 +1,82 @@ +// Copyright 2016 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "ConsumerProto"; +option java_package = "com.google.api"; + +// A descriptor for defining project properties for a service. One service may +// have many consumer projects, and the service may want to behave differently +// depending on some properties on the project. For example, a project may be +// associated with a school, or a business, or a government agency, a business +// type property on the project may affect how a service responds to the client. +// This descriptor defines which properties are allowed to be set on a project. +// +// Example: +// +// project_properties: +// properties: +// - name: NO_WATERMARK +// type: BOOL +// description: Allows usage of the API without watermarks. +// - name: EXTENDED_TILE_CACHE_PERIOD +// type: INT64 +message ProjectProperties { + // List of per consumer project-specific properties. + repeated Property properties = 1; +} + +// Defines project properties. +// +// API services can define properties that can be assigned to consumer projects +// so that backends can perform response customization without having to make +// additional calls or maintain additional storage. For example, Maps API +// defines properties that controls map tile cache period, or whether to embed a +// watermark in a result. +// +// These values can be set via API producer console. Only API providers can +// define and set these properties. +message Property { + // Supported data type of the property values + enum PropertyType { + // The type is unspecified, and will result in an error. + UNSPECIFIED = 0; + + // The type is `int64`. + INT64 = 1; + + // The type is `bool`. + BOOL = 2; + + // The type is `string`. + STRING = 3; + + // The type is 'double'. + DOUBLE = 4; + } + + // The name of the property (a.k.a key). + string name = 1; + + // The type of this property. + PropertyType type = 2; + + // The description of the property + string description = 3; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/consumer_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/consumer_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..c9924d97ff56bcb814b1de4c1b8d27240aab3143 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/consumer_pb2.py @@ -0,0 +1,71 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/consumer.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x19google/api/consumer.proto\x12\ngoogle.api"=\n\x11ProjectProperties\x12(\n\nproperties\x18\x01 \x03(\x0b\x32\x14.google.api.Property"\xac\x01\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x04type\x18\x02 \x01(\x0e\x32!.google.api.Property.PropertyType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t"L\n\x0cPropertyType\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\t\n\x05INT64\x10\x01\x12\x08\n\x04\x42OOL\x10\x02\x12\n\n\x06STRING\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x42h\n\x0e\x63om.google.apiB\rConsumerProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfigb\x06proto3' +) + + +_PROJECTPROPERTIES = DESCRIPTOR.message_types_by_name["ProjectProperties"] +_PROPERTY = DESCRIPTOR.message_types_by_name["Property"] +_PROPERTY_PROPERTYTYPE = _PROPERTY.enum_types_by_name["PropertyType"] +ProjectProperties = _reflection.GeneratedProtocolMessageType( + "ProjectProperties", + (_message.Message,), + { + "DESCRIPTOR": _PROJECTPROPERTIES, + "__module__": "google.api.consumer_pb2" + # @@protoc_insertion_point(class_scope:google.api.ProjectProperties) + }, +) +_sym_db.RegisterMessage(ProjectProperties) + +Property = _reflection.GeneratedProtocolMessageType( + "Property", + (_message.Message,), + { + "DESCRIPTOR": _PROPERTY, + "__module__": "google.api.consumer_pb2" + # @@protoc_insertion_point(class_scope:google.api.Property) + }, +) +_sym_db.RegisterMessage(Property) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\rConsumerProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig" + _PROJECTPROPERTIES._serialized_start = 41 + _PROJECTPROPERTIES._serialized_end = 102 + _PROPERTY._serialized_start = 105 + _PROPERTY._serialized_end = 277 + _PROPERTY_PROPERTYTYPE._serialized_start = 201 + _PROPERTY_PROPERTYTYPE._serialized_end = 277 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/context.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/context.proto new file mode 100644 index 0000000000000000000000000000000000000000..1b1651780e7fbb2fae33828eab296bb5a8f3adcb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/context.proto @@ -0,0 +1,90 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "ContextProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// `Context` defines which contexts an API requests. +// +// Example: +// +// context: +// rules: +// - selector: "*" +// requested: +// - google.rpc.context.ProjectContext +// - google.rpc.context.OriginContext +// +// The above specifies that all methods in the API request +// `google.rpc.context.ProjectContext` and +// `google.rpc.context.OriginContext`. +// +// Available context types are defined in package +// `google.rpc.context`. +// +// This also provides mechanism to allowlist any protobuf message extension that +// can be sent in grpc metadata using “x-goog-ext--bin” and +// “x-goog-ext--jspb” format. For example, list any service +// specific protobuf types that can appear in grpc metadata as follows in your +// yaml file: +// +// Example: +// +// context: +// rules: +// - selector: "google.example.library.v1.LibraryService.CreateBook" +// allowed_request_extensions: +// - google.foo.v1.NewExtension +// allowed_response_extensions: +// - google.foo.v1.NewExtension +// +// You can also specify extension ID instead of fully qualified extension name +// here. +message Context { + // A list of RPC context rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated ContextRule rules = 1; +} + +// A context rule provides information about the context for an individual API +// element. +message ContextRule { + // Selects the methods to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + string selector = 1; + + // A list of full type names of requested contexts. + repeated string requested = 2; + + // A list of full type names of provided contexts. + repeated string provided = 3; + + // A list of full type names or extension IDs of extensions allowed in grpc + // side channel from client to backend. + repeated string allowed_request_extensions = 4; + + // A list of full type names or extension IDs of extensions allowed in grpc + // side channel from backend to client. + repeated string allowed_response_extensions = 5; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/context_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/context_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..e3b9299a0fb6a41f25b5df80808a91ac1e282dab --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/context_pb2.py @@ -0,0 +1,68 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/context.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x18google/api/context.proto\x12\ngoogle.api"1\n\x07\x43ontext\x12&\n\x05rules\x18\x01 \x03(\x0b\x32\x17.google.api.ContextRule"\x8d\x01\n\x0b\x43ontextRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x11\n\trequested\x18\x02 \x03(\t\x12\x10\n\x08provided\x18\x03 \x03(\t\x12"\n\x1a\x61llowed_request_extensions\x18\x04 \x03(\t\x12#\n\x1b\x61llowed_response_extensions\x18\x05 \x03(\tBn\n\x0e\x63om.google.apiB\x0c\x43ontextProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_CONTEXT = DESCRIPTOR.message_types_by_name["Context"] +_CONTEXTRULE = DESCRIPTOR.message_types_by_name["ContextRule"] +Context = _reflection.GeneratedProtocolMessageType( + "Context", + (_message.Message,), + { + "DESCRIPTOR": _CONTEXT, + "__module__": "google.api.context_pb2" + # @@protoc_insertion_point(class_scope:google.api.Context) + }, +) +_sym_db.RegisterMessage(Context) + +ContextRule = _reflection.GeneratedProtocolMessageType( + "ContextRule", + (_message.Message,), + { + "DESCRIPTOR": _CONTEXTRULE, + "__module__": "google.api.context_pb2" + # @@protoc_insertion_point(class_scope:google.api.ContextRule) + }, +) +_sym_db.RegisterMessage(ContextRule) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\014ContextProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _CONTEXT._serialized_start = 40 + _CONTEXT._serialized_end = 89 + _CONTEXTRULE._serialized_start = 92 + _CONTEXTRULE._serialized_end = 233 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/control.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/control.proto new file mode 100644 index 0000000000000000000000000000000000000000..cbbce6f61f9b5b7c1a86c045c89662cd9e5fa713 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/control.proto @@ -0,0 +1,41 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/api/policy.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "ControlProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Selects and configures the service controller used by the service. +// +// Example: +// +// control: +// environment: servicecontrol.googleapis.com +message Control { + // The service controller environment to use. If empty, no control plane + // feature (like quota and billing) will be enabled. The recommended value for + // most services is servicecontrol.googleapis.com + string environment = 1; + + // Defines policies applying to the API methods of the service. + repeated MethodPolicy method_policies = 4; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/control_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/control_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..2747458cf4cb1f8163625de37a54b2cda67bcbc3 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/control_pb2.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/control.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import policy_pb2 as google_dot_api_dot_policy__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x18google/api/control.proto\x12\ngoogle.api\x1a\x17google/api/policy.proto"Q\n\x07\x43ontrol\x12\x13\n\x0b\x65nvironment\x18\x01 \x01(\t\x12\x31\n\x0fmethod_policies\x18\x04 \x03(\x0b\x32\x18.google.api.MethodPolicyBn\n\x0e\x63om.google.apiB\x0c\x43ontrolProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_CONTROL = DESCRIPTOR.message_types_by_name["Control"] +Control = _reflection.GeneratedProtocolMessageType( + "Control", + (_message.Message,), + { + "DESCRIPTOR": _CONTROL, + "__module__": "google.api.control_pb2" + # @@protoc_insertion_point(class_scope:google.api.Control) + }, +) +_sym_db.RegisterMessage(Control) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\014ControlProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _CONTROL._serialized_start = 65 + _CONTROL._serialized_end = 146 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/distribution.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/distribution.proto new file mode 100644 index 0000000000000000000000000000000000000000..b0bc4930f79e913907963f05d8c0207b60159b96 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/distribution.proto @@ -0,0 +1,213 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/distribution;distribution"; +option java_multiple_files = true; +option java_outer_classname = "DistributionProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// `Distribution` contains summary statistics for a population of values. It +// optionally contains a histogram representing the distribution of those values +// across a set of buckets. +// +// The summary statistics are the count, mean, sum of the squared deviation from +// the mean, the minimum, and the maximum of the set of population of values. +// The histogram is based on a sequence of buckets and gives a count of values +// that fall into each bucket. The boundaries of the buckets are given either +// explicitly or by formulas for buckets of fixed or exponentially increasing +// widths. +// +// Although it is not forbidden, it is generally a bad idea to include +// non-finite values (infinities or NaNs) in the population of values, as this +// will render the `mean` and `sum_of_squared_deviation` fields meaningless. +message Distribution { + // The range of the population values. + message Range { + // The minimum of the population values. + double min = 1; + + // The maximum of the population values. + double max = 2; + } + + // `BucketOptions` describes the bucket boundaries used to create a histogram + // for the distribution. The buckets can be in a linear sequence, an + // exponential sequence, or each bucket can be specified explicitly. + // `BucketOptions` does not include the number of values in each bucket. + // + // A bucket has an inclusive lower bound and exclusive upper bound for the + // values that are counted for that bucket. The upper bound of a bucket must + // be strictly greater than the lower bound. The sequence of N buckets for a + // distribution consists of an underflow bucket (number 0), zero or more + // finite buckets (number 1 through N - 2) and an overflow bucket (number N - + // 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the + // same as the upper bound of bucket i - 1. The buckets span the whole range + // of finite values: lower bound of the underflow bucket is -infinity and the + // upper bound of the overflow bucket is +infinity. The finite buckets are + // so-called because both bounds are finite. + message BucketOptions { + // Specifies a linear sequence of buckets that all have the same width + // (except overflow and underflow). Each bucket represents a constant + // absolute uncertainty on the specific value in the bucket. + // + // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + // following boundaries: + // + // Upper bound (0 <= i < N-1): offset + (width * i). + // + // Lower bound (1 <= i < N): offset + (width * (i - 1)). + message Linear { + // Must be greater than 0. + int32 num_finite_buckets = 1; + + // Must be greater than 0. + double width = 2; + + // Lower bound of the first bucket. + double offset = 3; + } + + // Specifies an exponential sequence of buckets that have a width that is + // proportional to the value of the lower bound. Each bucket represents a + // constant relative uncertainty on a specific value in the bucket. + // + // There are `num_finite_buckets + 2` (= N) buckets. Bucket `i` has the + // following boundaries: + // + // Upper bound (0 <= i < N-1): scale * (growth_factor ^ i). + // + // Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)). + message Exponential { + // Must be greater than 0. + int32 num_finite_buckets = 1; + + // Must be greater than 1. + double growth_factor = 2; + + // Must be greater than 0. + double scale = 3; + } + + // Specifies a set of buckets with arbitrary widths. + // + // There are `size(bounds) + 1` (= N) buckets. Bucket `i` has the following + // boundaries: + // + // Upper bound (0 <= i < N-1): bounds[i] + // Lower bound (1 <= i < N); bounds[i - 1] + // + // The `bounds` field must contain at least one element. If `bounds` has + // only one element, then there are no finite buckets, and that single + // element is the common boundary of the overflow and underflow buckets. + message Explicit { + // The values must be monotonically increasing. + repeated double bounds = 1; + } + + // Exactly one of these three fields must be set. + oneof options { + // The linear bucket. + Linear linear_buckets = 1; + + // The exponential buckets. + Exponential exponential_buckets = 2; + + // The explicit buckets. + Explicit explicit_buckets = 3; + } + } + + // Exemplars are example points that may be used to annotate aggregated + // distribution values. They are metadata that gives information about a + // particular value added to a Distribution bucket, such as a trace ID that + // was active when a value was added. They may contain further information, + // such as a example values and timestamps, origin, etc. + message Exemplar { + // Value of the exemplar point. This value determines to which bucket the + // exemplar belongs. + double value = 1; + + // The observation (sampling) time of the above value. + google.protobuf.Timestamp timestamp = 2; + + // Contextual information about the example value. Examples are: + // + // Trace: type.googleapis.com/google.monitoring.v3.SpanContext + // + // Literal string: type.googleapis.com/google.protobuf.StringValue + // + // Labels dropped during aggregation: + // type.googleapis.com/google.monitoring.v3.DroppedLabels + // + // There may be only a single attachment of any given message type in a + // single exemplar, and this is enforced by the system. + repeated google.protobuf.Any attachments = 3; + } + + // The number of values in the population. Must be non-negative. This value + // must equal the sum of the values in `bucket_counts` if a histogram is + // provided. + int64 count = 1; + + // The arithmetic mean of the values in the population. If `count` is zero + // then this field must be zero. + double mean = 2; + + // The sum of squared deviations from the mean of the values in the + // population. For values x_i this is: + // + // Sum[i=1..n]((x_i - mean)^2) + // + // Knuth, "The Art of Computer Programming", Vol. 2, page 232, 3rd edition + // describes Welford's method for accumulating this sum in one pass. + // + // If `count` is zero then this field must be zero. + double sum_of_squared_deviation = 3; + + // If specified, contains the range of the population values. The field + // must not be present if the `count` is zero. + Range range = 4; + + // Defines the histogram bucket boundaries. If the distribution does not + // contain a histogram, then omit this field. + BucketOptions bucket_options = 6; + + // The number of values in each bucket of the histogram, as described in + // `bucket_options`. If the distribution does not have a histogram, then omit + // this field. If there is a histogram, then the sum of the values in + // `bucket_counts` must equal the value in the `count` field of the + // distribution. + // + // If present, `bucket_counts` should contain N values, where N is the number + // of buckets specified in `bucket_options`. If you supply fewer than N + // values, the remaining values are assumed to be 0. + // + // The order of the values in `bucket_counts` follows the bucket numbering + // schemes described for the three bucket types. The first value must be the + // count for the underflow bucket (number 0). The next N-2 values are the + // counts for the finite buckets (number 1 through N-2). The N'th value in + // `bucket_counts` is the count for the overflow bucket (number N-1). + repeated int64 bucket_counts = 7; + + // Must be in increasing order of `value` field. + repeated Exemplar exemplars = 10; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/distribution_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/distribution_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..744e4984ff012742056d40420506abfd3cf276a3 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/distribution_pb2.py @@ -0,0 +1,142 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/distribution.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 +from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1dgoogle/api/distribution.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto"\xd9\x06\n\x0c\x44istribution\x12\r\n\x05\x63ount\x18\x01 \x01(\x03\x12\x0c\n\x04mean\x18\x02 \x01(\x01\x12 \n\x18sum_of_squared_deviation\x18\x03 \x01(\x01\x12-\n\x05range\x18\x04 \x01(\x0b\x32\x1e.google.api.Distribution.Range\x12>\n\x0e\x62ucket_options\x18\x06 \x01(\x0b\x32&.google.api.Distribution.BucketOptions\x12\x15\n\rbucket_counts\x18\x07 \x03(\x03\x12\x34\n\texemplars\x18\n \x03(\x0b\x32!.google.api.Distribution.Exemplar\x1a!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\x01\x12\x0b\n\x03max\x18\x02 \x01(\x01\x1a\xb5\x03\n\rBucketOptions\x12G\n\x0elinear_buckets\x18\x01 \x01(\x0b\x32-.google.api.Distribution.BucketOptions.LinearH\x00\x12Q\n\x13\x65xponential_buckets\x18\x02 \x01(\x0b\x32\x32.google.api.Distribution.BucketOptions.ExponentialH\x00\x12K\n\x10\x65xplicit_buckets\x18\x03 \x01(\x0b\x32/.google.api.Distribution.BucketOptions.ExplicitH\x00\x1a\x43\n\x06Linear\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x01\x12\x0e\n\x06offset\x18\x03 \x01(\x01\x1aO\n\x0b\x45xponential\x12\x1a\n\x12num_finite_buckets\x18\x01 \x01(\x05\x12\x15\n\rgrowth_factor\x18\x02 \x01(\x01\x12\r\n\x05scale\x18\x03 \x01(\x01\x1a\x1a\n\x08\x45xplicit\x12\x0e\n\x06\x62ounds\x18\x01 \x03(\x01\x42\t\n\x07options\x1as\n\x08\x45xemplar\x12\r\n\x05value\x18\x01 \x01(\x01\x12-\n\ttimestamp\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x0b\x61ttachments\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBq\n\x0e\x63om.google.apiB\x11\x44istributionProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/distribution;distribution\xa2\x02\x04GAPIb\x06proto3' +) + + +_DISTRIBUTION = DESCRIPTOR.message_types_by_name["Distribution"] +_DISTRIBUTION_RANGE = _DISTRIBUTION.nested_types_by_name["Range"] +_DISTRIBUTION_BUCKETOPTIONS = _DISTRIBUTION.nested_types_by_name["BucketOptions"] +_DISTRIBUTION_BUCKETOPTIONS_LINEAR = _DISTRIBUTION_BUCKETOPTIONS.nested_types_by_name[ + "Linear" +] +_DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL = ( + _DISTRIBUTION_BUCKETOPTIONS.nested_types_by_name["Exponential"] +) +_DISTRIBUTION_BUCKETOPTIONS_EXPLICIT = _DISTRIBUTION_BUCKETOPTIONS.nested_types_by_name[ + "Explicit" +] +_DISTRIBUTION_EXEMPLAR = _DISTRIBUTION.nested_types_by_name["Exemplar"] +Distribution = _reflection.GeneratedProtocolMessageType( + "Distribution", + (_message.Message,), + { + "Range": _reflection.GeneratedProtocolMessageType( + "Range", + (_message.Message,), + { + "DESCRIPTOR": _DISTRIBUTION_RANGE, + "__module__": "google.api.distribution_pb2" + # @@protoc_insertion_point(class_scope:google.api.Distribution.Range) + }, + ), + "BucketOptions": _reflection.GeneratedProtocolMessageType( + "BucketOptions", + (_message.Message,), + { + "Linear": _reflection.GeneratedProtocolMessageType( + "Linear", + (_message.Message,), + { + "DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS_LINEAR, + "__module__": "google.api.distribution_pb2" + # @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Linear) + }, + ), + "Exponential": _reflection.GeneratedProtocolMessageType( + "Exponential", + (_message.Message,), + { + "DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL, + "__module__": "google.api.distribution_pb2" + # @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Exponential) + }, + ), + "Explicit": _reflection.GeneratedProtocolMessageType( + "Explicit", + (_message.Message,), + { + "DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS_EXPLICIT, + "__module__": "google.api.distribution_pb2" + # @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions.Explicit) + }, + ), + "DESCRIPTOR": _DISTRIBUTION_BUCKETOPTIONS, + "__module__": "google.api.distribution_pb2" + # @@protoc_insertion_point(class_scope:google.api.Distribution.BucketOptions) + }, + ), + "Exemplar": _reflection.GeneratedProtocolMessageType( + "Exemplar", + (_message.Message,), + { + "DESCRIPTOR": _DISTRIBUTION_EXEMPLAR, + "__module__": "google.api.distribution_pb2" + # @@protoc_insertion_point(class_scope:google.api.Distribution.Exemplar) + }, + ), + "DESCRIPTOR": _DISTRIBUTION, + "__module__": "google.api.distribution_pb2" + # @@protoc_insertion_point(class_scope:google.api.Distribution) + }, +) +_sym_db.RegisterMessage(Distribution) +_sym_db.RegisterMessage(Distribution.Range) +_sym_db.RegisterMessage(Distribution.BucketOptions) +_sym_db.RegisterMessage(Distribution.BucketOptions.Linear) +_sym_db.RegisterMessage(Distribution.BucketOptions.Exponential) +_sym_db.RegisterMessage(Distribution.BucketOptions.Explicit) +_sym_db.RegisterMessage(Distribution.Exemplar) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\021DistributionProtoP\001ZCgoogle.golang.org/genproto/googleapis/api/distribution;distribution\242\002\004GAPI" + _DISTRIBUTION._serialized_start = 106 + _DISTRIBUTION._serialized_end = 963 + _DISTRIBUTION_RANGE._serialized_start = 373 + _DISTRIBUTION_RANGE._serialized_end = 406 + _DISTRIBUTION_BUCKETOPTIONS._serialized_start = 409 + _DISTRIBUTION_BUCKETOPTIONS._serialized_end = 846 + _DISTRIBUTION_BUCKETOPTIONS_LINEAR._serialized_start = 659 + _DISTRIBUTION_BUCKETOPTIONS_LINEAR._serialized_end = 726 + _DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL._serialized_start = 728 + _DISTRIBUTION_BUCKETOPTIONS_EXPONENTIAL._serialized_end = 807 + _DISTRIBUTION_BUCKETOPTIONS_EXPLICIT._serialized_start = 809 + _DISTRIBUTION_BUCKETOPTIONS_EXPLICIT._serialized_end = 835 + _DISTRIBUTION_EXEMPLAR._serialized_start = 848 + _DISTRIBUTION_EXEMPLAR._serialized_end = 963 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/documentation.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/documentation.proto new file mode 100644 index 0000000000000000000000000000000000000000..12936c701b427be5feb56e89afef7a2d7c43de8f --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/documentation.proto @@ -0,0 +1,168 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "DocumentationProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// `Documentation` provides the information for describing a service. +// +// Example: +//

documentation:
+//   summary: >
+//     The Google Calendar API gives access
+//     to most calendar features.
+//   pages:
+//   - name: Overview
+//     content: (== include google/foo/overview.md ==)
+//   - name: Tutorial
+//     content: (== include google/foo/tutorial.md ==)
+//     subpages:
+//     - name: Java
+//       content: (== include google/foo/tutorial_java.md ==)
+//   rules:
+//   - selector: google.calendar.Calendar.Get
+//     description: >
+//       ...
+//   - selector: google.calendar.Calendar.Put
+//     description: >
+//       ...
+// 
+// Documentation is provided in markdown syntax. In addition to +// standard markdown features, definition lists, tables and fenced +// code blocks are supported. Section headers can be provided and are +// interpreted relative to the section nesting of the context where +// a documentation fragment is embedded. +// +// Documentation from the IDL is merged with documentation defined +// via the config at normalization time, where documentation provided +// by config rules overrides IDL provided. +// +// A number of constructs specific to the API platform are supported +// in documentation text. +// +// In order to reference a proto element, the following +// notation can be used: +//
[fully.qualified.proto.name][]
+// To override the display text used for the link, this can be used: +//
[display text][fully.qualified.proto.name]
+// Text can be excluded from doc using the following notation: +//
(-- internal comment --)
+// +// A few directives are available in documentation. Note that +// directives must appear on a single line to be properly +// identified. The `include` directive includes a markdown file from +// an external source: +//
(== include path/to/file ==)
+// The `resource_for` directive marks a message to be the resource of +// a collection in REST view. If it is not specified, tools attempt +// to infer the resource from the operations in a collection: +//
(== resource_for v1.shelves.books ==)
+// The directive `suppress_warning` does not directly affect documentation +// and is documented together with service config validation. +message Documentation { + // A short description of what the service does. The summary must be plain + // text. It becomes the overview of the service displayed in Google Cloud + // Console. + // NOTE: This field is equivalent to the standard field `description`. + string summary = 1; + + // The top level pages for the documentation set. + repeated Page pages = 5; + + // A list of documentation rules that apply to individual API elements. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated DocumentationRule rules = 3; + + // The URL to the root of documentation. + string documentation_root_url = 4; + + // Specifies the service root url if the default one (the service name + // from the yaml file) is not suitable. This can be seen in any fully + // specified service urls as well as sections that show a base that other + // urls are relative to. + string service_root_url = 6; + + // Declares a single overview page. For example: + //
documentation:
+  //   summary: ...
+  //   overview: (== include overview.md ==)
+  // 
+ // This is a shortcut for the following declaration (using pages style): + //
documentation:
+  //   summary: ...
+  //   pages:
+  //   - name: Overview
+  //     content: (== include overview.md ==)
+  // 
+ // Note: you cannot specify both `overview` field and `pages` field. + string overview = 2; +} + +// A documentation rule provides information about individual API elements. +message DocumentationRule { + // The selector is a comma-separated list of patterns for any element such as + // a method, a field, an enum value. Each pattern is a qualified name of the + // element which may end in "*", indicating a wildcard. Wildcards are only + // allowed at the end and for a whole component of the qualified name, + // i.e. "foo.*" is ok, but not "foo.b*" or "foo.*.bar". A wildcard will match + // one or more components. To specify a default for all applicable elements, + // the whole pattern "*" is used. + string selector = 1; + + // Description of the selected proto element (e.g. a message, a method, a + // 'service' definition, or a field). Defaults to leading & trailing comments + // taken from the proto source definition of the proto element. + string description = 2; + + // Deprecation description of the selected element(s). It can be provided if + // an element is marked as `deprecated`. + string deprecation_description = 3; +} + +// Represents a documentation page. A page can contain subpages to represent +// nested documentation set structure. +message Page { + // The name of the page. It will be used as an identity of the page to + // generate URI of the page, text of the link to this page in navigation, + // etc. The full page name (start from the root page name to this page + // concatenated with `.`) can be used as reference to the page in your + // documentation. For example: + //
pages:
+  // - name: Tutorial
+  //   content: (== include tutorial.md ==)
+  //   subpages:
+  //   - name: Java
+  //     content: (== include tutorial_java.md ==)
+  // 
+ // You can reference `Java` page using Markdown reference link syntax: + // `[Java][Tutorial.Java]`. + string name = 1; + + // The Markdown content of the page. You can use (== include {path} + // ==) to include content from a Markdown file. The content can be + // used to produce the documentation page such as HTML format page. + string content = 2; + + // Subpages of this page. The order of subpages specified here will be + // honored in the generated docset. + repeated Page subpages = 3; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/documentation_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/documentation_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..4e6def5f59e51b57158f97542cae9e17ea32d8e6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/documentation_pb2.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/documentation.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1egoogle/api/documentation.proto\x12\ngoogle.api"\xbb\x01\n\rDocumentation\x12\x0f\n\x07summary\x18\x01 \x01(\t\x12\x1f\n\x05pages\x18\x05 \x03(\x0b\x32\x10.google.api.Page\x12,\n\x05rules\x18\x03 \x03(\x0b\x32\x1d.google.api.DocumentationRule\x12\x1e\n\x16\x64ocumentation_root_url\x18\x04 \x01(\t\x12\x18\n\x10service_root_url\x18\x06 \x01(\t\x12\x10\n\x08overview\x18\x02 \x01(\t"[\n\x11\x44ocumentationRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1f\n\x17\x64\x65precation_description\x18\x03 \x01(\t"I\n\x04Page\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x63ontent\x18\x02 \x01(\t\x12"\n\x08subpages\x18\x03 \x03(\x0b\x32\x10.google.api.PageBt\n\x0e\x63om.google.apiB\x12\x44ocumentationProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_DOCUMENTATION = DESCRIPTOR.message_types_by_name["Documentation"] +_DOCUMENTATIONRULE = DESCRIPTOR.message_types_by_name["DocumentationRule"] +_PAGE = DESCRIPTOR.message_types_by_name["Page"] +Documentation = _reflection.GeneratedProtocolMessageType( + "Documentation", + (_message.Message,), + { + "DESCRIPTOR": _DOCUMENTATION, + "__module__": "google.api.documentation_pb2" + # @@protoc_insertion_point(class_scope:google.api.Documentation) + }, +) +_sym_db.RegisterMessage(Documentation) + +DocumentationRule = _reflection.GeneratedProtocolMessageType( + "DocumentationRule", + (_message.Message,), + { + "DESCRIPTOR": _DOCUMENTATIONRULE, + "__module__": "google.api.documentation_pb2" + # @@protoc_insertion_point(class_scope:google.api.DocumentationRule) + }, +) +_sym_db.RegisterMessage(DocumentationRule) + +Page = _reflection.GeneratedProtocolMessageType( + "Page", + (_message.Message,), + { + "DESCRIPTOR": _PAGE, + "__module__": "google.api.documentation_pb2" + # @@protoc_insertion_point(class_scope:google.api.Page) + }, +) +_sym_db.RegisterMessage(Page) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\022DocumentationProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _DOCUMENTATION._serialized_start = 47 + _DOCUMENTATION._serialized_end = 234 + _DOCUMENTATIONRULE._serialized_start = 236 + _DOCUMENTATIONRULE._serialized_end = 327 + _PAGE._serialized_start = 329 + _PAGE._serialized_end = 402 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/endpoint.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/endpoint.proto new file mode 100644 index 0000000000000000000000000000000000000000..7f6dca7c16c6f0ba4410cbc68085e845a6a11f30 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/endpoint.proto @@ -0,0 +1,73 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "EndpointProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// `Endpoint` describes a network address of a service that serves a set of +// APIs. It is commonly known as a service endpoint. A service may expose +// any number of service endpoints, and all service endpoints share the same +// service definition, such as quota limits and monitoring metrics. +// +// Example: +// +// type: google.api.Service +// name: library-example.googleapis.com +// endpoints: +// # Declares network address `https://library-example.googleapis.com` +// # for service `library-example.googleapis.com`. The `https` scheme +// # is implicit for all service endpoints. Other schemes may be +// # supported in the future. +// - name: library-example.googleapis.com +// allow_cors: false +// - name: content-staging-library-example.googleapis.com +// # Allows HTTP OPTIONS calls to be passed to the API frontend, for it +// # to decide whether the subsequent cross-origin request is allowed +// # to proceed. +// allow_cors: true +message Endpoint { + // The canonical name of this endpoint. + string name = 1; + + // Unimplemented. Dot not use. + // + // DEPRECATED: This field is no longer supported. Instead of using aliases, + // please specify multiple [google.api.Endpoint][google.api.Endpoint] for each + // of the intended aliases. + // + // Additional names that this endpoint will be hosted on. + repeated string aliases = 2 [deprecated = true]; + + // The specification of an Internet routable address of API frontend that will + // handle requests to this [API + // Endpoint](https://cloud.google.com/apis/design/glossary). It should be + // either a valid IPv4 address or a fully-qualified domain name. For example, + // "8.8.8.8" or "myservice.appspot.com". + string target = 101; + + // Allowing + // [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka + // cross-domain traffic, would allow the backends served from this endpoint to + // receive and respond to HTTP OPTIONS requests. The response will be used by + // the browser to determine whether the subsequent cross-origin request is + // allowed to proceed. + bool allow_cors = 5; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/endpoint_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/endpoint_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..3d46005b3600734b0bcebcfd16c970f5678aefdb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/endpoint_pb2.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/endpoint.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x19google/api/endpoint.proto\x12\ngoogle.api"Q\n\x08\x45ndpoint\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x07\x61liases\x18\x02 \x03(\tB\x02\x18\x01\x12\x0e\n\x06target\x18\x65 \x01(\t\x12\x12\n\nallow_cors\x18\x05 \x01(\x08\x42o\n\x0e\x63om.google.apiB\rEndpointProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_ENDPOINT = DESCRIPTOR.message_types_by_name["Endpoint"] +Endpoint = _reflection.GeneratedProtocolMessageType( + "Endpoint", + (_message.Message,), + { + "DESCRIPTOR": _ENDPOINT, + "__module__": "google.api.endpoint_pb2" + # @@protoc_insertion_point(class_scope:google.api.Endpoint) + }, +) +_sym_db.RegisterMessage(Endpoint) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\rEndpointProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _ENDPOINT.fields_by_name["aliases"]._options = None + _ENDPOINT.fields_by_name["aliases"]._serialized_options = b"\030\001" + _ENDPOINT._serialized_start = 41 + _ENDPOINT._serialized_end = 122 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/error_reason.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/error_reason.proto new file mode 100644 index 0000000000000000000000000000000000000000..cf806698dacb0063d96d4d726e98f875c604ccd8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/error_reason.proto @@ -0,0 +1,589 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/error_reason;error_reason"; +option java_multiple_files = true; +option java_outer_classname = "ErrorReasonProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines the supported values for `google.rpc.ErrorInfo.reason` for the +// `googleapis.com` error domain. This error domain is reserved for [Service +// Infrastructure](https://cloud.google.com/service-infrastructure/docs/overview). +// For each error info of this domain, the metadata key "service" refers to the +// logical identifier of an API service, such as "pubsub.googleapis.com". The +// "consumer" refers to the entity that consumes an API Service. It typically is +// a Google project that owns the client application or the server resource, +// such as "projects/123". Other metadata keys are specific to each error +// reason. For more information, see the definition of the specific error +// reason. +enum ErrorReason { + // Do not use this default value. + ERROR_REASON_UNSPECIFIED = 0; + + // The request is calling a disabled service for a consumer. + // + // Example of an ErrorInfo when the consumer "projects/123" contacting + // "pubsub.googleapis.com" service which is disabled: + // + // { "reason": "SERVICE_DISABLED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "pubsub.googleapis.com" + // } + // } + // + // This response indicates the "pubsub.googleapis.com" has been disabled in + // "projects/123". + SERVICE_DISABLED = 1; + + // The request whose associated billing account is disabled. + // + // Example of an ErrorInfo when the consumer "projects/123" fails to contact + // "pubsub.googleapis.com" service because the associated billing account is + // disabled: + // + // { "reason": "BILLING_DISABLED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "pubsub.googleapis.com" + // } + // } + // + // This response indicates the billing account associated has been disabled. + BILLING_DISABLED = 2; + + // The request is denied because the provided [API + // key](https://cloud.google.com/docs/authentication/api-keys) is invalid. It + // may be in a bad format, cannot be found, or has been expired). + // + // Example of an ErrorInfo when the request is contacting + // "storage.googleapis.com" service with an invalid API key: + // + // { "reason": "API_KEY_INVALID", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // } + // } + API_KEY_INVALID = 3; + + // The request is denied because it violates [API key API + // restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_api_restrictions). + // + // Example of an ErrorInfo when the consumer "projects/123" fails to call the + // "storage.googleapis.com" service because this service is restricted in the + // API key: + // + // { "reason": "API_KEY_SERVICE_BLOCKED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com" + // } + // } + API_KEY_SERVICE_BLOCKED = 4; + + // The request is denied because it violates [API key HTTP + // restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_http_restrictions). + // + // Example of an ErrorInfo when the consumer "projects/123" fails to call + // "storage.googleapis.com" service because the http referrer of the request + // violates API key HTTP restrictions: + // + // { "reason": "API_KEY_HTTP_REFERRER_BLOCKED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com", + // } + // } + API_KEY_HTTP_REFERRER_BLOCKED = 7; + + // The request is denied because it violates [API key IP address + // restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions). + // + // Example of an ErrorInfo when the consumer "projects/123" fails to call + // "storage.googleapis.com" service because the caller IP of the request + // violates API key IP address restrictions: + // + // { "reason": "API_KEY_IP_ADDRESS_BLOCKED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com", + // } + // } + API_KEY_IP_ADDRESS_BLOCKED = 8; + + // The request is denied because it violates [API key Android application + // restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions). + // + // Example of an ErrorInfo when the consumer "projects/123" fails to call + // "storage.googleapis.com" service because the request from the Android apps + // violates the API key Android application restrictions: + // + // { "reason": "API_KEY_ANDROID_APP_BLOCKED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com" + // } + // } + API_KEY_ANDROID_APP_BLOCKED = 9; + + // The request is denied because it violates [API key iOS application + // restrictions](https://cloud.google.com/docs/authentication/api-keys#adding_application_restrictions). + // + // Example of an ErrorInfo when the consumer "projects/123" fails to call + // "storage.googleapis.com" service because the request from the iOS apps + // violates the API key iOS application restrictions: + // + // { "reason": "API_KEY_IOS_APP_BLOCKED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com" + // } + // } + API_KEY_IOS_APP_BLOCKED = 13; + + // The request is denied because there is not enough rate quota for the + // consumer. + // + // Example of an ErrorInfo when the consumer "projects/123" fails to contact + // "pubsub.googleapis.com" service because consumer's rate quota usage has + // reached the maximum value set for the quota limit + // "ReadsPerMinutePerProject" on the quota metric + // "pubsub.googleapis.com/read_requests": + // + // { "reason": "RATE_LIMIT_EXCEEDED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "pubsub.googleapis.com", + // "quota_metric": "pubsub.googleapis.com/read_requests", + // "quota_limit": "ReadsPerMinutePerProject" + // } + // } + // + // Example of an ErrorInfo when the consumer "projects/123" checks quota on + // the service "dataflow.googleapis.com" and hits the organization quota + // limit "DefaultRequestsPerMinutePerOrganization" on the metric + // "dataflow.googleapis.com/default_requests". + // + // { "reason": "RATE_LIMIT_EXCEEDED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "dataflow.googleapis.com", + // "quota_metric": "dataflow.googleapis.com/default_requests", + // "quota_limit": "DefaultRequestsPerMinutePerOrganization" + // } + // } + RATE_LIMIT_EXCEEDED = 5; + + // The request is denied because there is not enough resource quota for the + // consumer. + // + // Example of an ErrorInfo when the consumer "projects/123" fails to contact + // "compute.googleapis.com" service because consumer's resource quota usage + // has reached the maximum value set for the quota limit "VMsPerProject" + // on the quota metric "compute.googleapis.com/vms": + // + // { "reason": "RESOURCE_QUOTA_EXCEEDED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "compute.googleapis.com", + // "quota_metric": "compute.googleapis.com/vms", + // "quota_limit": "VMsPerProject" + // } + // } + // + // Example of an ErrorInfo when the consumer "projects/123" checks resource + // quota on the service "dataflow.googleapis.com" and hits the organization + // quota limit "jobs-per-organization" on the metric + // "dataflow.googleapis.com/job_count". + // + // { "reason": "RESOURCE_QUOTA_EXCEEDED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "dataflow.googleapis.com", + // "quota_metric": "dataflow.googleapis.com/job_count", + // "quota_limit": "jobs-per-organization" + // } + // } + RESOURCE_QUOTA_EXCEEDED = 6; + + // The request whose associated billing account address is in a tax restricted + // location, violates the local tax restrictions when creating resources in + // the restricted region. + // + // Example of an ErrorInfo when creating the Cloud Storage Bucket in the + // container "projects/123" under a tax restricted region + // "locations/asia-northeast3": + // + // { "reason": "LOCATION_TAX_POLICY_VIOLATED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com", + // "location": "locations/asia-northeast3" + // } + // } + // + // This response indicates creating the Cloud Storage Bucket in + // "locations/asia-northeast3" violates the location tax restriction. + LOCATION_TAX_POLICY_VIOLATED = 10; + + // The request is denied because the caller does not have required permission + // on the user project "projects/123" or the user project is invalid. For more + // information, check the [userProject System + // Parameters](https://cloud.google.com/apis/docs/system-parameters). + // + // Example of an ErrorInfo when the caller is calling Cloud Storage service + // with insufficient permissions on the user project: + // + // { "reason": "USER_PROJECT_DENIED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com" + // } + // } + USER_PROJECT_DENIED = 11; + + // The request is denied because the consumer "projects/123" is suspended due + // to Terms of Service(Tos) violations. Check [Project suspension + // guidelines](https://cloud.google.com/resource-manager/docs/project-suspension-guidelines) + // for more information. + // + // Example of an ErrorInfo when calling Cloud Storage service with the + // suspended consumer "projects/123": + // + // { "reason": "CONSUMER_SUSPENDED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com" + // } + // } + CONSUMER_SUSPENDED = 12; + + // The request is denied because the associated consumer is invalid. It may be + // in a bad format, cannot be found, or have been deleted. + // + // Example of an ErrorInfo when calling Cloud Storage service with the + // invalid consumer "projects/123": + // + // { "reason": "CONSUMER_INVALID", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com" + // } + // } + CONSUMER_INVALID = 14; + + // The request is denied because it violates [VPC Service + // Controls](https://cloud.google.com/vpc-service-controls/docs/overview). + // The 'uid' field is a random generated identifier that customer can use it + // to search the audit log for a request rejected by VPC Service Controls. For + // more information, please refer [VPC Service Controls + // Troubleshooting](https://cloud.google.com/vpc-service-controls/docs/troubleshooting#unique-id) + // + // Example of an ErrorInfo when the consumer "projects/123" fails to call + // Cloud Storage service because the request is prohibited by the VPC Service + // Controls. + // + // { "reason": "SECURITY_POLICY_VIOLATED", + // "domain": "googleapis.com", + // "metadata": { + // "uid": "123456789abcde", + // "consumer": "projects/123", + // "service": "storage.googleapis.com" + // } + // } + SECURITY_POLICY_VIOLATED = 15; + + // The request is denied because the provided access token has expired. + // + // Example of an ErrorInfo when the request is calling Cloud Storage service + // with an expired access token: + // + // { "reason": "ACCESS_TOKEN_EXPIRED", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // "method": "google.storage.v1.Storage.GetObject" + // } + // } + ACCESS_TOKEN_EXPIRED = 16; + + // The request is denied because the provided access token doesn't have at + // least one of the acceptable scopes required for the API. Please check + // [OAuth 2.0 Scopes for Google + // APIs](https://developers.google.com/identity/protocols/oauth2/scopes) for + // the list of the OAuth 2.0 scopes that you might need to request to access + // the API. + // + // Example of an ErrorInfo when the request is calling Cloud Storage service + // with an access token that is missing required scopes: + // + // { "reason": "ACCESS_TOKEN_SCOPE_INSUFFICIENT", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // "method": "google.storage.v1.Storage.GetObject" + // } + // } + ACCESS_TOKEN_SCOPE_INSUFFICIENT = 17; + + // The request is denied because the account associated with the provided + // access token is in an invalid state, such as disabled or deleted. + // For more information, see https://cloud.google.com/docs/authentication. + // + // Warning: For privacy reasons, the server may not be able to disclose the + // email address for some accounts. The client MUST NOT depend on the + // availability of the `email` attribute. + // + // Example of an ErrorInfo when the request is to the Cloud Storage API with + // an access token that is associated with a disabled or deleted [service + // account](http://cloud/iam/docs/service-accounts): + // + // { "reason": "ACCOUNT_STATE_INVALID", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // "method": "google.storage.v1.Storage.GetObject", + // "email": "user@123.iam.gserviceaccount.com" + // } + // } + ACCOUNT_STATE_INVALID = 18; + + // The request is denied because the type of the provided access token is not + // supported by the API being called. + // + // Example of an ErrorInfo when the request is to the Cloud Storage API with + // an unsupported token type. + // + // { "reason": "ACCESS_TOKEN_TYPE_UNSUPPORTED", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // "method": "google.storage.v1.Storage.GetObject" + // } + // } + ACCESS_TOKEN_TYPE_UNSUPPORTED = 19; + + // The request is denied because the request doesn't have any authentication + // credentials. For more information regarding the supported authentication + // strategies for Google Cloud APIs, see + // https://cloud.google.com/docs/authentication. + // + // Example of an ErrorInfo when the request is to the Cloud Storage API + // without any authentication credentials. + // + // { "reason": "CREDENTIALS_MISSING", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // "method": "google.storage.v1.Storage.GetObject" + // } + // } + CREDENTIALS_MISSING = 20; + + // The request is denied because the provided project owning the resource + // which acts as the [API + // consumer](https://cloud.google.com/apis/design/glossary#api_consumer) is + // invalid. It may be in a bad format or empty. + // + // Example of an ErrorInfo when the request is to the Cloud Functions API, + // but the offered resource project in the request in a bad format which can't + // perform the ListFunctions method. + // + // { "reason": "RESOURCE_PROJECT_INVALID", + // "domain": "googleapis.com", + // "metadata": { + // "service": "cloudfunctions.googleapis.com", + // "method": + // "google.cloud.functions.v1.CloudFunctionsService.ListFunctions" + // } + // } + RESOURCE_PROJECT_INVALID = 21; + + // The request is denied because the provided session cookie is missing, + // invalid or failed to decode. + // + // Example of an ErrorInfo when the request is calling Cloud Storage service + // with a SID cookie which can't be decoded. + // + // { "reason": "SESSION_COOKIE_INVALID", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // "method": "google.storage.v1.Storage.GetObject", + // "cookie": "SID" + // } + // } + SESSION_COOKIE_INVALID = 23; + + // The request is denied because the user is from a Google Workspace customer + // that blocks their users from accessing a particular service. + // + // Example scenario: https://support.google.com/a/answer/9197205?hl=en + // + // Example of an ErrorInfo when access to Google Cloud Storage service is + // blocked by the Google Workspace administrator: + // + // { "reason": "USER_BLOCKED_BY_ADMIN", + // "domain": "googleapis.com", + // "metadata": { + // "service": "storage.googleapis.com", + // "method": "google.storage.v1.Storage.GetObject", + // } + // } + USER_BLOCKED_BY_ADMIN = 24; + + // The request is denied because the resource service usage is restricted + // by administrators according to the organization policy constraint. + // For more information see + // https://cloud.google.com/resource-manager/docs/organization-policy/restricting-services. + // + // Example of an ErrorInfo when access to Google Cloud Storage service is + // restricted by Resource Usage Restriction policy: + // + // { "reason": "RESOURCE_USAGE_RESTRICTION_VIOLATED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/project-123", + // "service": "storage.googleapis.com" + // } + // } + RESOURCE_USAGE_RESTRICTION_VIOLATED = 25; + + // Unimplemented. Do not use. + // + // The request is denied because it contains unsupported system parameters in + // URL query parameters or HTTP headers. For more information, + // see https://cloud.google.com/apis/docs/system-parameters + // + // Example of an ErrorInfo when access "pubsub.googleapis.com" service with + // a request header of "x-goog-user-ip": + // + // { "reason": "SYSTEM_PARAMETER_UNSUPPORTED", + // "domain": "googleapis.com", + // "metadata": { + // "service": "pubsub.googleapis.com" + // "parameter": "x-goog-user-ip" + // } + // } + SYSTEM_PARAMETER_UNSUPPORTED = 26; + + // The request is denied because it violates Org Restriction: the requested + // resource does not belong to allowed organizations specified in + // "X-Goog-Allowed-Resources" header. + // + // Example of an ErrorInfo when accessing a GCP resource that is restricted by + // Org Restriction for "pubsub.googleapis.com" service. + // + // { + // reason: "ORG_RESTRICTION_VIOLATION" + // domain: "googleapis.com" + // metadata { + // "consumer":"projects/123456" + // "service": "pubsub.googleapis.com" + // } + // } + ORG_RESTRICTION_VIOLATION = 27; + + // The request is denied because "X-Goog-Allowed-Resources" header is in a bad + // format. + // + // Example of an ErrorInfo when + // accessing "pubsub.googleapis.com" service with an invalid + // "X-Goog-Allowed-Resources" request header. + // + // { + // reason: "ORG_RESTRICTION_HEADER_INVALID" + // domain: "googleapis.com" + // metadata { + // "consumer":"projects/123456" + // "service": "pubsub.googleapis.com" + // } + // } + ORG_RESTRICTION_HEADER_INVALID = 28; + + // Unimplemented. Do not use. + // + // The request is calling a service that is not visible to the consumer. + // + // Example of an ErrorInfo when the consumer "projects/123" contacting + // "pubsub.googleapis.com" service which is not visible to the consumer. + // + // { "reason": "SERVICE_NOT_VISIBLE", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "pubsub.googleapis.com" + // } + // } + // + // This response indicates the "pubsub.googleapis.com" is not visible to + // "projects/123" (or it may not exist). + SERVICE_NOT_VISIBLE = 29; + + // The request is related to a project for which GCP access is suspended. + // + // Example of an ErrorInfo when the consumer "projects/123" fails to contact + // "pubsub.googleapis.com" service because GCP access is suspended: + // + // { "reason": "GCP_SUSPENDED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "pubsub.googleapis.com" + // } + // } + // + // This response indicates the associated GCP account has been suspended. + GCP_SUSPENDED = 30; + + // The request violates the location policies when creating resources in + // the restricted region. + // + // Example of an ErrorInfo when creating the Cloud Storage Bucket by + // "projects/123" for service storage.googleapis.com: + // + // { "reason": "LOCATION_POLICY_VIOLATED", + // "domain": "googleapis.com", + // "metadata": { + // "consumer": "projects/123", + // "service": "storage.googleapis.com", + // } + // } + // + // This response indicates creating the Cloud Storage Bucket in + // "locations/asia-northeast3" violates at least one location policy. + // The troubleshooting guidance is provided in the Help links. + LOCATION_POLICY_VIOLATED = 31; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/error_reason_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/error_reason_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..aaf360db70f9c7726cbbe9a4eac0f9b83d53fad1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/error_reason_pb2.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/error_reason.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b"\n\x1dgoogle/api/error_reason.proto\x12\ngoogle.api*\x8a\x07\n\x0b\x45rrorReason\x12\x1c\n\x18\x45RROR_REASON_UNSPECIFIED\x10\x00\x12\x14\n\x10SERVICE_DISABLED\x10\x01\x12\x14\n\x10\x42ILLING_DISABLED\x10\x02\x12\x13\n\x0f\x41PI_KEY_INVALID\x10\x03\x12\x1b\n\x17\x41PI_KEY_SERVICE_BLOCKED\x10\x04\x12!\n\x1d\x41PI_KEY_HTTP_REFERRER_BLOCKED\x10\x07\x12\x1e\n\x1a\x41PI_KEY_IP_ADDRESS_BLOCKED\x10\x08\x12\x1f\n\x1b\x41PI_KEY_ANDROID_APP_BLOCKED\x10\t\x12\x1b\n\x17\x41PI_KEY_IOS_APP_BLOCKED\x10\r\x12\x17\n\x13RATE_LIMIT_EXCEEDED\x10\x05\x12\x1b\n\x17RESOURCE_QUOTA_EXCEEDED\x10\x06\x12 \n\x1cLOCATION_TAX_POLICY_VIOLATED\x10\n\x12\x17\n\x13USER_PROJECT_DENIED\x10\x0b\x12\x16\n\x12\x43ONSUMER_SUSPENDED\x10\x0c\x12\x14\n\x10\x43ONSUMER_INVALID\x10\x0e\x12\x1c\n\x18SECURITY_POLICY_VIOLATED\x10\x0f\x12\x18\n\x14\x41\x43\x43\x45SS_TOKEN_EXPIRED\x10\x10\x12#\n\x1f\x41\x43\x43\x45SS_TOKEN_SCOPE_INSUFFICIENT\x10\x11\x12\x19\n\x15\x41\x43\x43OUNT_STATE_INVALID\x10\x12\x12!\n\x1d\x41\x43\x43\x45SS_TOKEN_TYPE_UNSUPPORTED\x10\x13\x12\x17\n\x13\x43REDENTIALS_MISSING\x10\x14\x12\x1c\n\x18RESOURCE_PROJECT_INVALID\x10\x15\x12\x1a\n\x16SESSION_COOKIE_INVALID\x10\x17\x12\x19\n\x15USER_BLOCKED_BY_ADMIN\x10\x18\x12'\n#RESOURCE_USAGE_RESTRICTION_VIOLATED\x10\x19\x12 \n\x1cSYSTEM_PARAMETER_UNSUPPORTED\x10\x1a\x12\x1d\n\x19ORG_RESTRICTION_VIOLATION\x10\x1b\x12\"\n\x1eORG_RESTRICTION_HEADER_INVALID\x10\x1c\x12\x17\n\x13SERVICE_NOT_VISIBLE\x10\x1d\x12\x11\n\rGCP_SUSPENDED\x10\x1e\x12\x1c\n\x18LOCATION_POLICY_VIOLATED\x10\x1f\x42p\n\x0e\x63om.google.apiB\x10\x45rrorReasonProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/error_reason;error_reason\xa2\x02\x04GAPIb\x06proto3" +) + +_ERRORREASON = DESCRIPTOR.enum_types_by_name["ErrorReason"] +ErrorReason = enum_type_wrapper.EnumTypeWrapper(_ERRORREASON) +ERROR_REASON_UNSPECIFIED = 0 +SERVICE_DISABLED = 1 +BILLING_DISABLED = 2 +API_KEY_INVALID = 3 +API_KEY_SERVICE_BLOCKED = 4 +API_KEY_HTTP_REFERRER_BLOCKED = 7 +API_KEY_IP_ADDRESS_BLOCKED = 8 +API_KEY_ANDROID_APP_BLOCKED = 9 +API_KEY_IOS_APP_BLOCKED = 13 +RATE_LIMIT_EXCEEDED = 5 +RESOURCE_QUOTA_EXCEEDED = 6 +LOCATION_TAX_POLICY_VIOLATED = 10 +USER_PROJECT_DENIED = 11 +CONSUMER_SUSPENDED = 12 +CONSUMER_INVALID = 14 +SECURITY_POLICY_VIOLATED = 15 +ACCESS_TOKEN_EXPIRED = 16 +ACCESS_TOKEN_SCOPE_INSUFFICIENT = 17 +ACCOUNT_STATE_INVALID = 18 +ACCESS_TOKEN_TYPE_UNSUPPORTED = 19 +CREDENTIALS_MISSING = 20 +RESOURCE_PROJECT_INVALID = 21 +SESSION_COOKIE_INVALID = 23 +USER_BLOCKED_BY_ADMIN = 24 +RESOURCE_USAGE_RESTRICTION_VIOLATED = 25 +SYSTEM_PARAMETER_UNSUPPORTED = 26 +ORG_RESTRICTION_VIOLATION = 27 +ORG_RESTRICTION_HEADER_INVALID = 28 +SERVICE_NOT_VISIBLE = 29 +GCP_SUSPENDED = 30 +LOCATION_POLICY_VIOLATED = 31 + + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\020ErrorReasonProtoP\001ZCgoogle.golang.org/genproto/googleapis/api/error_reason;error_reason\242\002\004GAPI" + _ERRORREASON._serialized_start = 46 + _ERRORREASON._serialized_end = 952 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_behavior.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_behavior.proto new file mode 100644 index 0000000000000000000000000000000000000000..21895bf552788c829f3e20f4d53a5f4a33c9dbcf --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_behavior.proto @@ -0,0 +1,104 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "FieldBehaviorProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.FieldOptions { + // A designation of a specific field behavior (required, output only, etc.) + // in protobuf messages. + // + // Examples: + // + // string name = 1 [(google.api.field_behavior) = REQUIRED]; + // State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + // google.protobuf.Duration ttl = 1 + // [(google.api.field_behavior) = INPUT_ONLY]; + // google.protobuf.Timestamp expire_time = 1 + // [(google.api.field_behavior) = OUTPUT_ONLY, + // (google.api.field_behavior) = IMMUTABLE]; + repeated google.api.FieldBehavior field_behavior = 1052 [packed = false]; +} + +// An indicator of the behavior of a given field (for example, that a field +// is required in requests, or given as output but ignored as input). +// This **does not** change the behavior in protocol buffers itself; it only +// denotes the behavior and may affect how API tooling handles the field. +// +// Note: This enum **may** receive new values in the future. +enum FieldBehavior { + // Conventional default for enums. Do not use this. + FIELD_BEHAVIOR_UNSPECIFIED = 0; + + // Specifically denotes a field as optional. + // While all fields in protocol buffers are optional, this may be specified + // for emphasis if appropriate. + OPTIONAL = 1; + + // Denotes a field as required. + // This indicates that the field **must** be provided as part of the request, + // and failure to do so will cause an error (usually `INVALID_ARGUMENT`). + REQUIRED = 2; + + // Denotes a field as output only. + // This indicates that the field is provided in responses, but including the + // field in a request does nothing (the server *must* ignore it and + // *must not* throw an error as a result of the field's presence). + OUTPUT_ONLY = 3; + + // Denotes a field as input only. + // This indicates that the field is provided in requests, and the + // corresponding field is not included in output. + INPUT_ONLY = 4; + + // Denotes a field as immutable. + // This indicates that the field may be set once in a request to create a + // resource, but may not be changed thereafter. + IMMUTABLE = 5; + + // Denotes that a (repeated) field is an unordered list. + // This indicates that the service may provide the elements of the list + // in any arbitrary order, rather than the order the user originally + // provided. Additionally, the list's order may or may not be stable. + UNORDERED_LIST = 6; + + // Denotes that this field returns a non-empty default value if not set. + // This indicates that if the user provides the empty value in a request, + // a non-empty value will be returned. The user will not be aware of what + // non-empty value to expect. + NON_EMPTY_DEFAULT = 7; + + // Denotes that the field in a resource (a message annotated with + // google.api.resource) is used in the resource name to uniquely identify the + // resource. For AIP-compliant APIs, this should only be applied to the + // `name` field on the resource. + // + // This behavior should not be applied to references to other resources within + // the message. + // + // The identifier field of resources often have different field behavior + // depending on the request it is embedded in (e.g. for Create methods name + // is optional and unused, while for Update methods it is required). Instead + // of method-specific annotations, only `IDENTIFIER` is required. + IDENTIFIER = 8; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_behavior_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_behavior_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..ae16770b4462b8dcfe2e8efdd6d7263e379354fc --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_behavior_pb2.py @@ -0,0 +1,65 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/field_behavior.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b"\n\x1fgoogle/api/field_behavior.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto*\xb6\x01\n\rFieldBehavior\x12\x1e\n\x1a\x46IELD_BEHAVIOR_UNSPECIFIED\x10\x00\x12\x0c\n\x08OPTIONAL\x10\x01\x12\x0c\n\x08REQUIRED\x10\x02\x12\x0f\n\x0bOUTPUT_ONLY\x10\x03\x12\x0e\n\nINPUT_ONLY\x10\x04\x12\r\n\tIMMUTABLE\x10\x05\x12\x12\n\x0eUNORDERED_LIST\x10\x06\x12\x15\n\x11NON_EMPTY_DEFAULT\x10\x07\x12\x0e\n\nIDENTIFIER\x10\x08:U\n\x0e\x66ield_behavior\x12\x1d.google.protobuf.FieldOptions\x18\x9c\x08 \x03(\x0e\x32\x19.google.api.FieldBehaviorB\x02\x10\x00\x42p\n\x0e\x63om.google.apiB\x12\x46ieldBehaviorProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3" +) + +_FIELDBEHAVIOR = DESCRIPTOR.enum_types_by_name["FieldBehavior"] +FieldBehavior = enum_type_wrapper.EnumTypeWrapper(_FIELDBEHAVIOR) +FIELD_BEHAVIOR_UNSPECIFIED = 0 +OPTIONAL = 1 +REQUIRED = 2 +OUTPUT_ONLY = 3 +INPUT_ONLY = 4 +IMMUTABLE = 5 +UNORDERED_LIST = 6 +NON_EMPTY_DEFAULT = 7 +IDENTIFIER = 8 + +FIELD_BEHAVIOR_FIELD_NUMBER = 1052 +field_behavior = DESCRIPTOR.extensions_by_name["field_behavior"] + +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension( + field_behavior + ) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\022FieldBehaviorProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI" + field_behavior._options = None + field_behavior._serialized_options = b"\020\000" + _FIELDBEHAVIOR._serialized_start = 82 + _FIELDBEHAVIOR._serialized_end = 264 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_info.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_info.proto new file mode 100644 index 0000000000000000000000000000000000000000..e62d84579d416d5d83defaaa37368c1844b3a3bd --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_info.proto @@ -0,0 +1,79 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/descriptor.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "FieldInfoProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +extend google.protobuf.FieldOptions { + // Rich semantic descriptor of an API field beyond the basic typing. + // + // Examples: + // + // string request_id = 1 [(google.api.field_info).format = UUID4]; + // string old_ip_address = 2 [(google.api.field_info).format = IPV4]; + // string new_ip_address = 3 [(google.api.field_info).format = IPV6]; + // string actual_ip_address = 4 [ + // (google.api.field_info).format = IPV4_OR_IPV6 + // ]; + google.api.FieldInfo field_info = 291403980; +} + +// Rich semantic information of an API field beyond basic typing. +message FieldInfo { + // The standard format of a field value. The supported formats are all backed + // by either an RFC defined by the IETF or a Google-defined AIP. + enum Format { + // Default, unspecified value. + FORMAT_UNSPECIFIED = 0; + + // Universally Unique Identifier, version 4, value as defined by + // https://datatracker.ietf.org/doc/html/rfc4122. The value may be + // normalized to entirely lowercase letters. For example, the value + // `F47AC10B-58CC-0372-8567-0E02B2C3D479` would be normalized to + // `f47ac10b-58cc-0372-8567-0e02b2c3d479`. + UUID4 = 1; + + // Internet Protocol v4 value as defined by [RFC + // 791](https://datatracker.ietf.org/doc/html/rfc791). The value may be + // condensed, with leading zeros in each octet stripped. For example, + // `001.022.233.040` would be condensed to `1.22.233.40`. + IPV4 = 2; + + // Internet Protocol v6 value as defined by [RFC + // 2460](https://datatracker.ietf.org/doc/html/rfc2460). The value may be + // normalized to entirely lowercase letters with zeros compressed, following + // [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952). For example, + // the value `2001:0DB8:0::0` would be normalized to `2001:db8::`. + IPV6 = 3; + + // An IP address in either v4 or v6 format as described by the individual + // values defined herein. See the comments on the IPV4 and IPV6 types for + // allowed normalizations of each. + IPV4_OR_IPV6 = 4; + } + + // The standard format of a field value. This does not explicitly configure + // any API consumer, just documents the API's format for the field it is + // applied to. + Format format = 1; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_info_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_info_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..2c80b38972425c543f41b89c6a6cc2be98c5a8b2 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/field_info_pb2.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/field_info.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import descriptor_pb2 as google_dot_protobuf_dot_descriptor__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x1bgoogle/api/field_info.proto\x12\ngoogle.api\x1a google/protobuf/descriptor.proto"\x8c\x01\n\tFieldInfo\x12,\n\x06\x66ormat\x18\x01 \x01(\x0e\x32\x1c.google.api.FieldInfo.Format"Q\n\x06\x46ormat\x12\x16\n\x12\x46ORMAT_UNSPECIFIED\x10\x00\x12\t\n\x05UUID4\x10\x01\x12\x08\n\x04IPV4\x10\x02\x12\x08\n\x04IPV6\x10\x03\x12\x10\n\x0cIPV4_OR_IPV6\x10\x04:L\n\nfield_info\x12\x1d.google.protobuf.FieldOptions\x18\xcc\xf1\xf9\x8a\x01 \x01(\x0b\x32\x15.google.api.FieldInfoBl\n\x0e\x63om.google.apiB\x0e\x46ieldInfoProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xa2\x02\x04GAPIb\x06proto3' +) + + +FIELD_INFO_FIELD_NUMBER = 291403980 +field_info = DESCRIPTOR.extensions_by_name["field_info"] + +_FIELDINFO = DESCRIPTOR.message_types_by_name["FieldInfo"] +_FIELDINFO_FORMAT = _FIELDINFO.enum_types_by_name["Format"] +FieldInfo = _reflection.GeneratedProtocolMessageType( + "FieldInfo", + (_message.Message,), + { + "DESCRIPTOR": _FIELDINFO, + "__module__": "google.api.field_info_pb2" + # @@protoc_insertion_point(class_scope:google.api.FieldInfo) + }, +) +_sym_db.RegisterMessage(FieldInfo) + +if _descriptor._USE_C_DESCRIPTORS == False: + google_dot_protobuf_dot_descriptor__pb2.FieldOptions.RegisterExtension(field_info) + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\016FieldInfoProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\242\002\004GAPI" + _FIELDINFO._serialized_start = 78 + _FIELDINFO._serialized_end = 218 + _FIELDINFO_FORMAT._serialized_start = 137 + _FIELDINFO_FORMAT._serialized_end = 218 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/http.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/http.proto new file mode 100644 index 0000000000000000000000000000000000000000..31d867a27d5a73ca2e553605c0b03e0eab17015c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/http.proto @@ -0,0 +1,379 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/annotations;annotations"; +option java_multiple_files = true; +option java_outer_classname = "HttpProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines the HTTP configuration for an API service. It contains a list of +// [HttpRule][google.api.HttpRule], each specifying the mapping of an RPC method +// to one or more HTTP REST API methods. +message Http { + // A list of HTTP configuration rules that apply to individual API methods. + // + // **NOTE:** All service configuration rules follow "last one wins" order. + repeated HttpRule rules = 1; + + // When set to true, URL path parameters will be fully URI-decoded except in + // cases of single segment matches in reserved expansion, where "%2F" will be + // left encoded. + // + // The default behavior is to not decode RFC 6570 reserved characters in multi + // segment matches. + bool fully_decode_reserved_expansion = 2; +} + +// # gRPC Transcoding +// +// gRPC Transcoding is a feature for mapping between a gRPC method and one or +// more HTTP REST endpoints. It allows developers to build a single API service +// that supports both gRPC APIs and REST APIs. Many systems, including [Google +// APIs](https://github.com/googleapis/googleapis), +// [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC +// Gateway](https://github.com/grpc-ecosystem/grpc-gateway), +// and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature +// and use it for large scale production services. +// +// `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies +// how different portions of the gRPC request message are mapped to the URL +// path, URL query parameters, and HTTP request body. It also controls how the +// gRPC response message is mapped to the HTTP response body. `HttpRule` is +// typically specified as an `google.api.http` annotation on the gRPC method. +// +// Each mapping specifies a URL path template and an HTTP method. The path +// template may refer to one or more fields in the gRPC request message, as long +// as each field is a non-repeated field with a primitive (non-message) type. +// The path template controls how fields of the request message are mapped to +// the URL path. +// +// Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/{name=messages/*}" +// }; +// } +// } +// message GetMessageRequest { +// string name = 1; // Mapped to URL path. +// } +// message Message { +// string text = 1; // The resource content. +// } +// +// This enables an HTTP REST to gRPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(name: "messages/123456")` +// +// Any fields in the request message which are not bound by the path template +// automatically become HTTP query parameters if there is no HTTP request body. +// For example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get:"/v1/messages/{message_id}" +// }; +// } +// } +// message GetMessageRequest { +// message SubMessage { +// string subfield = 1; +// } +// string message_id = 1; // Mapped to URL path. +// int64 revision = 2; // Mapped to URL query parameter `revision`. +// SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. +// } +// +// This enables a HTTP JSON to RPC mapping as below: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456?revision=2&sub.subfield=foo` | +// `GetMessage(message_id: "123456" revision: 2 sub: SubMessage(subfield: +// "foo"))` +// +// Note that fields which are mapped to URL query parameters must have a +// primitive type or a repeated primitive type or a non-repeated message type. +// In the case of a repeated type, the parameter can be repeated in the URL +// as `...?param=A¶m=B`. In the case of a message type, each field of the +// message is mapped to a separate parameter, such as +// `...?foo.a=A&foo.b=B&foo.c=C`. +// +// For HTTP methods that allow a request body, the `body` field +// specifies the mapping. Consider a REST update method on the +// message resource collection: +// +// service Messaging { +// rpc UpdateMessage(UpdateMessageRequest) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "message" +// }; +// } +// } +// message UpdateMessageRequest { +// string message_id = 1; // mapped to the URL +// Message message = 2; // mapped to the body +// } +// +// The following HTTP JSON to RPC mapping is enabled, where the +// representation of the JSON in the request body is determined by +// protos JSON encoding: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" message { text: "Hi!" })` +// +// The special name `*` can be used in the body mapping to define that +// every field not bound by the path template should be mapped to the +// request body. This enables the following alternative definition of +// the update method: +// +// service Messaging { +// rpc UpdateMessage(Message) returns (Message) { +// option (google.api.http) = { +// patch: "/v1/messages/{message_id}" +// body: "*" +// }; +// } +// } +// message Message { +// string message_id = 1; +// string text = 2; +// } +// +// +// The following HTTP JSON to RPC mapping is enabled: +// +// HTTP | gRPC +// -----|----- +// `PATCH /v1/messages/123456 { "text": "Hi!" }` | `UpdateMessage(message_id: +// "123456" text: "Hi!")` +// +// Note that when using `*` in the body mapping, it is not possible to +// have HTTP parameters, as all fields not bound by the path end in +// the body. This makes this option more rarely used in practice when +// defining REST APIs. The common usage of `*` is in custom methods +// which don't use the URL at all for transferring data. +// +// It is possible to define multiple HTTP methods for one RPC by using +// the `additional_bindings` option. Example: +// +// service Messaging { +// rpc GetMessage(GetMessageRequest) returns (Message) { +// option (google.api.http) = { +// get: "/v1/messages/{message_id}" +// additional_bindings { +// get: "/v1/users/{user_id}/messages/{message_id}" +// } +// }; +// } +// } +// message GetMessageRequest { +// string message_id = 1; +// string user_id = 2; +// } +// +// This enables the following two alternative HTTP JSON to RPC mappings: +// +// HTTP | gRPC +// -----|----- +// `GET /v1/messages/123456` | `GetMessage(message_id: "123456")` +// `GET /v1/users/me/messages/123456` | `GetMessage(user_id: "me" message_id: +// "123456")` +// +// ## Rules for HTTP mapping +// +// 1. Leaf request fields (recursive expansion nested messages in the request +// message) are classified into three categories: +// - Fields referred by the path template. They are passed via the URL path. +// - Fields referred by the [HttpRule.body][google.api.HttpRule.body]. They +// are passed via the HTTP +// request body. +// - All other fields are passed via the URL query parameters, and the +// parameter name is the field path in the request message. A repeated +// field can be represented as multiple query parameters under the same +// name. +// 2. If [HttpRule.body][google.api.HttpRule.body] is "*", there is no URL +// query parameter, all fields +// are passed via URL path and HTTP request body. +// 3. If [HttpRule.body][google.api.HttpRule.body] is omitted, there is no HTTP +// request body, all +// fields are passed via URL path and URL query parameters. +// +// ### Path template syntax +// +// Template = "/" Segments [ Verb ] ; +// Segments = Segment { "/" Segment } ; +// Segment = "*" | "**" | LITERAL | Variable ; +// Variable = "{" FieldPath [ "=" Segments ] "}" ; +// FieldPath = IDENT { "." IDENT } ; +// Verb = ":" LITERAL ; +// +// The syntax `*` matches a single URL path segment. The syntax `**` matches +// zero or more URL path segments, which must be the last part of the URL path +// except the `Verb`. +// +// The syntax `Variable` matches part of the URL path as specified by its +// template. A variable template must not contain other variables. If a variable +// matches a single path segment, its template may be omitted, e.g. `{var}` +// is equivalent to `{var=*}`. +// +// The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` +// contains any reserved character, such characters should be percent-encoded +// before the matching. +// +// If a variable contains exactly one path segment, such as `"{var}"` or +// `"{var=*}"`, when such a variable is expanded into a URL path on the client +// side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The +// server side does the reverse decoding. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{var}`. +// +// If a variable contains multiple path segments, such as `"{var=foo/*}"` +// or `"{var=**}"`, when such a variable is expanded into a URL path on the +// client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. +// The server side does the reverse decoding, except "%2F" and "%2f" are left +// unchanged. Such variables show up in the +// [Discovery +// Document](https://developers.google.com/discovery/v1/reference/apis) as +// `{+var}`. +// +// ## Using gRPC API Service Configuration +// +// gRPC API Service Configuration (service config) is a configuration language +// for configuring a gRPC service to become a user-facing product. The +// service config is simply the YAML representation of the `google.api.Service` +// proto message. +// +// As an alternative to annotating your proto file, you can configure gRPC +// transcoding in your service config YAML files. You do this by specifying a +// `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same +// effect as the proto annotation. This can be particularly useful if you +// have a proto that is reused in multiple services. Note that any transcoding +// specified in the service config will override any matching transcoding +// configuration in the proto. +// +// Example: +// +// http: +// rules: +// # Selects a gRPC method and applies HttpRule to it. +// - selector: example.v1.Messaging.GetMessage +// get: /v1/messages/{message_id}/{sub.subfield} +// +// ## Special notes +// +// When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the +// proto to JSON conversion must follow the [proto3 +// specification](https://developers.google.com/protocol-buffers/docs/proto3#json). +// +// While the single segment variable follows the semantics of +// [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String +// Expansion, the multi segment variable **does not** follow RFC 6570 Section +// 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion +// does not expand special characters like `?` and `#`, which would lead +// to invalid URLs. As the result, gRPC Transcoding uses a custom encoding +// for multi segment variables. +// +// The path variables **must not** refer to any repeated or mapped field, +// because client libraries are not capable of handling such variable expansion. +// +// The path variables **must not** capture the leading "/" character. The reason +// is that the most common use case "{var}" does not capture the leading "/" +// character. For consistency, all path variables must share the same behavior. +// +// Repeated message fields must not be mapped to URL query parameters, because +// no client library can support such complicated mapping. +// +// If an API needs to use a JSON array for request or response body, it can map +// the request or response body to a repeated field. However, some gRPC +// Transcoding implementations may not support this feature. +message HttpRule { + // Selects a method to which this rule applies. + // + // Refer to [selector][google.api.DocumentationRule.selector] for syntax + // details. + string selector = 1; + + // Determines the URL pattern is matched by this rules. This pattern can be + // used with any of the {get|put|post|delete|patch} methods. A custom method + // can be defined using the 'custom' field. + oneof pattern { + // Maps to HTTP GET. Used for listing and getting information about + // resources. + string get = 2; + + // Maps to HTTP PUT. Used for replacing a resource. + string put = 3; + + // Maps to HTTP POST. Used for creating a resource or performing an action. + string post = 4; + + // Maps to HTTP DELETE. Used for deleting a resource. + string delete = 5; + + // Maps to HTTP PATCH. Used for updating a resource. + string patch = 6; + + // The custom pattern is used for specifying an HTTP method that is not + // included in the `pattern` field, such as HEAD, or "*" to leave the + // HTTP method unspecified for this rule. The wild-card rule is useful + // for services that provide content to Web (HTML) clients. + CustomHttpPattern custom = 8; + } + + // The name of the request field whose value is mapped to the HTTP request + // body, or `*` for mapping all request fields not captured by the path + // pattern to the HTTP body, or omitted for not having any HTTP request body. + // + // NOTE: the referred field must be present at the top-level of the request + // message type. + string body = 7; + + // Optional. The name of the response field whose value is mapped to the HTTP + // response body. When omitted, the entire response message will be used + // as the HTTP response body. + // + // NOTE: The referred field must be present at the top-level of the response + // message type. + string response_body = 12; + + // Additional HTTP bindings for the selector. Nested bindings must + // not contain an `additional_bindings` field themselves (that is, + // the nesting may only be one level deep). + repeated HttpRule additional_bindings = 11; +} + +// A custom pattern is used for defining custom HTTP verb. +message CustomHttpPattern { + // The name of this custom HTTP verb. + string kind = 1; + + // The path matched by this custom verb. + string path = 2; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/http_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/http_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..c0d4c4c64b43b3c6f84ef4295d4f96e65d85564a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/http_pb2.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/http.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x15google/api/http.proto\x12\ngoogle.api"T\n\x04Http\x12#\n\x05rules\x18\x01 \x03(\x0b\x32\x14.google.api.HttpRule\x12\'\n\x1f\x66ully_decode_reserved_expansion\x18\x02 \x01(\x08"\x81\x02\n\x08HttpRule\x12\x10\n\x08selector\x18\x01 \x01(\t\x12\r\n\x03get\x18\x02 \x01(\tH\x00\x12\r\n\x03put\x18\x03 \x01(\tH\x00\x12\x0e\n\x04post\x18\x04 \x01(\tH\x00\x12\x10\n\x06\x64\x65lete\x18\x05 \x01(\tH\x00\x12\x0f\n\x05patch\x18\x06 \x01(\tH\x00\x12/\n\x06\x63ustom\x18\x08 \x01(\x0b\x32\x1d.google.api.CustomHttpPatternH\x00\x12\x0c\n\x04\x62ody\x18\x07 \x01(\t\x12\x15\n\rresponse_body\x18\x0c \x01(\t\x12\x31\n\x13\x61\x64\x64itional_bindings\x18\x0b \x03(\x0b\x32\x14.google.api.HttpRuleB\t\n\x07pattern"/\n\x11\x43ustomHttpPattern\x12\x0c\n\x04kind\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\tBj\n\x0e\x63om.google.apiB\tHttpProtoP\x01ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3' +) + + +_HTTP = DESCRIPTOR.message_types_by_name["Http"] +_HTTPRULE = DESCRIPTOR.message_types_by_name["HttpRule"] +_CUSTOMHTTPPATTERN = DESCRIPTOR.message_types_by_name["CustomHttpPattern"] +Http = _reflection.GeneratedProtocolMessageType( + "Http", + (_message.Message,), + { + "DESCRIPTOR": _HTTP, + "__module__": "google.api.http_pb2" + # @@protoc_insertion_point(class_scope:google.api.Http) + }, +) +_sym_db.RegisterMessage(Http) + +HttpRule = _reflection.GeneratedProtocolMessageType( + "HttpRule", + (_message.Message,), + { + "DESCRIPTOR": _HTTPRULE, + "__module__": "google.api.http_pb2" + # @@protoc_insertion_point(class_scope:google.api.HttpRule) + }, +) +_sym_db.RegisterMessage(HttpRule) + +CustomHttpPattern = _reflection.GeneratedProtocolMessageType( + "CustomHttpPattern", + (_message.Message,), + { + "DESCRIPTOR": _CUSTOMHTTPPATTERN, + "__module__": "google.api.http_pb2" + # @@protoc_insertion_point(class_scope:google.api.CustomHttpPattern) + }, +) +_sym_db.RegisterMessage(CustomHttpPattern) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\tHttpProtoP\001ZAgoogle.golang.org/genproto/googleapis/api/annotations;annotations\370\001\001\242\002\004GAPI" + _HTTP._serialized_start = 37 + _HTTP._serialized_end = 121 + _HTTPRULE._serialized_start = 124 + _HTTPRULE._serialized_end = 381 + _CUSTOMHTTPPATTERN._serialized_start = 383 + _CUSTOMHTTPPATTERN._serialized_end = 430 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/httpbody.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/httpbody.proto new file mode 100644 index 0000000000000000000000000000000000000000..7f1685e8089cc4c4d12ed03c84ceeca563c0df90 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/httpbody.proto @@ -0,0 +1,81 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/protobuf/any.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/httpbody;httpbody"; +option java_multiple_files = true; +option java_outer_classname = "HttpBodyProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Message that represents an arbitrary HTTP body. It should only be used for +// payload formats that can't be represented as JSON, such as raw binary or +// an HTML page. +// +// +// This message can be used both in streaming and non-streaming API methods in +// the request as well as the response. +// +// It can be used as a top-level request field, which is convenient if one +// wants to extract parameters from either the URL or HTTP template into the +// request fields and also want access to the raw HTTP body. +// +// Example: +// +// message GetResourceRequest { +// // A unique request id. +// string request_id = 1; +// +// // The raw HTTP body is bound to this field. +// google.api.HttpBody http_body = 2; +// +// } +// +// service ResourceService { +// rpc GetResource(GetResourceRequest) +// returns (google.api.HttpBody); +// rpc UpdateResource(google.api.HttpBody) +// returns (google.protobuf.Empty); +// +// } +// +// Example with streaming methods: +// +// service CaldavService { +// rpc GetCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// rpc UpdateCalendar(stream google.api.HttpBody) +// returns (stream google.api.HttpBody); +// +// } +// +// Use of this type only changes how the request and response bodies are +// handled, all other features will continue to work unchanged. +message HttpBody { + // The HTTP Content-Type header value specifying the content type of the body. + string content_type = 1; + + // The HTTP request/response body as raw binary. + bytes data = 2; + + // Application specific response metadata. Must be set in the first response + // for streaming APIs. + repeated google.protobuf.Any extensions = 3; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/httpbody_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/httpbody_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..dfb52aba8930a483f6b06d1eacfc931743c9a45a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/httpbody_pb2.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/httpbody.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x19google/api/httpbody.proto\x12\ngoogle.api\x1a\x19google/protobuf/any.proto"X\n\x08HttpBody\x12\x14\n\x0c\x63ontent_type\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12(\n\nextensions\x18\x03 \x03(\x0b\x32\x14.google.protobuf.AnyBh\n\x0e\x63om.google.apiB\rHttpBodyProtoP\x01Z;google.golang.org/genproto/googleapis/api/httpbody;httpbody\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3' +) + + +_HTTPBODY = DESCRIPTOR.message_types_by_name["HttpBody"] +HttpBody = _reflection.GeneratedProtocolMessageType( + "HttpBody", + (_message.Message,), + { + "DESCRIPTOR": _HTTPBODY, + "__module__": "google.api.httpbody_pb2" + # @@protoc_insertion_point(class_scope:google.api.HttpBody) + }, +) +_sym_db.RegisterMessage(HttpBody) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\rHttpBodyProtoP\001Z;google.golang.org/genproto/googleapis/api/httpbody;httpbody\370\001\001\242\002\004GAPI" + _HTTPBODY._serialized_start = 68 + _HTTPBODY._serialized_end = 156 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/label.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/label.proto new file mode 100644 index 0000000000000000000000000000000000000000..698f6bd4deed5a947523e3f1f4304aafbcef98ef --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/label.proto @@ -0,0 +1,48 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/label;label"; +option java_multiple_files = true; +option java_outer_classname = "LabelProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// A description of a label. +message LabelDescriptor { + // Value types that can be used as label values. + enum ValueType { + // A variable-length string. This is the default. + STRING = 0; + + // Boolean; true or false. + BOOL = 1; + + // A 64-bit signed integer. + INT64 = 2; + } + + // The label key. + string key = 1; + + // The type of data that can be assigned to the label. + ValueType value_type = 2; + + // A human-readable description for the label. + string description = 3; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/label_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/label_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..6741941dd704f93b285b80142fd25f144a1e2bbb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/label_pb2.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/label.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x16google/api/label.proto\x12\ngoogle.api"\x9c\x01\n\x0fLabelDescriptor\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x39\n\nvalue_type\x18\x02 \x01(\x0e\x32%.google.api.LabelDescriptor.ValueType\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t",\n\tValueType\x12\n\n\x06STRING\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x42_\n\x0e\x63om.google.apiB\nLabelProtoP\x01Z5google.golang.org/genproto/googleapis/api/label;label\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3' +) + + +_LABELDESCRIPTOR = DESCRIPTOR.message_types_by_name["LabelDescriptor"] +_LABELDESCRIPTOR_VALUETYPE = _LABELDESCRIPTOR.enum_types_by_name["ValueType"] +LabelDescriptor = _reflection.GeneratedProtocolMessageType( + "LabelDescriptor", + (_message.Message,), + { + "DESCRIPTOR": _LABELDESCRIPTOR, + "__module__": "google.api.label_pb2" + # @@protoc_insertion_point(class_scope:google.api.LabelDescriptor) + }, +) +_sym_db.RegisterMessage(LabelDescriptor) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\nLabelProtoP\001Z5google.golang.org/genproto/googleapis/api/label;label\370\001\001\242\002\004GAPI" + _LABELDESCRIPTOR._serialized_start = 39 + _LABELDESCRIPTOR._serialized_end = 195 + _LABELDESCRIPTOR_VALUETYPE._serialized_start = 151 + _LABELDESCRIPTOR_VALUETYPE._serialized_end = 195 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/launch_stage.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/launch_stage.proto new file mode 100644 index 0000000000000000000000000000000000000000..9802de79526aaec16fa85a388c44c975578c3aec --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/launch_stage.proto @@ -0,0 +1,72 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api;api"; +option java_multiple_files = true; +option java_outer_classname = "LaunchStageProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// The launch stage as defined by [Google Cloud Platform +// Launch Stages](https://cloud.google.com/terms/launch-stages). +enum LaunchStage { + // Do not use this default value. + LAUNCH_STAGE_UNSPECIFIED = 0; + + // The feature is not yet implemented. Users can not use it. + UNIMPLEMENTED = 6; + + // Prelaunch features are hidden from users and are only visible internally. + PRELAUNCH = 7; + + // Early Access features are limited to a closed group of testers. To use + // these features, you must sign up in advance and sign a Trusted Tester + // agreement (which includes confidentiality provisions). These features may + // be unstable, changed in backward-incompatible ways, and are not + // guaranteed to be released. + EARLY_ACCESS = 1; + + // Alpha is a limited availability test for releases before they are cleared + // for widespread use. By Alpha, all significant design issues are resolved + // and we are in the process of verifying functionality. Alpha customers + // need to apply for access, agree to applicable terms, and have their + // projects allowlisted. Alpha releases don't have to be feature complete, + // no SLAs are provided, and there are no technical support obligations, but + // they will be far enough along that customers can actually use them in + // test environments or for limited-use tests -- just like they would in + // normal production cases. + ALPHA = 2; + + // Beta is the point at which we are ready to open a release for any + // customer to use. There are no SLA or technical support obligations in a + // Beta release. Products will be complete from a feature perspective, but + // may have some open outstanding issues. Beta releases are suitable for + // limited production use cases. + BETA = 3; + + // GA features are open to all developers and are considered stable and + // fully qualified for production use. + GA = 4; + + // Deprecated features are scheduled to be shut down and removed. For more + // information, see the "Deprecation Policy" section of our [Terms of + // Service](https://cloud.google.com/terms/) + // and the [Google Cloud Platform Subject to the Deprecation + // Policy](https://cloud.google.com/terms/deprecation) documentation. + DEPRECATED = 5; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/launch_stage_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/launch_stage_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..f4ba6af7200b83d057a084bae0e16f1c4d17985d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/launch_stage_pb2.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/launch_stage.proto +"""Generated protocol buffer code.""" +from google.protobuf.internal import enum_type_wrapper +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b"\n\x1dgoogle/api/launch_stage.proto\x12\ngoogle.api*\x8c\x01\n\x0bLaunchStage\x12\x1c\n\x18LAUNCH_STAGE_UNSPECIFIED\x10\x00\x12\x11\n\rUNIMPLEMENTED\x10\x06\x12\r\n\tPRELAUNCH\x10\x07\x12\x10\n\x0c\x45\x41RLY_ACCESS\x10\x01\x12\t\n\x05\x41LPHA\x10\x02\x12\x08\n\x04\x42\x45TA\x10\x03\x12\x06\n\x02GA\x10\x04\x12\x0e\n\nDEPRECATED\x10\x05\x42Z\n\x0e\x63om.google.apiB\x10LaunchStageProtoP\x01Z-google.golang.org/genproto/googleapis/api;api\xa2\x02\x04GAPIb\x06proto3" +) + +_LAUNCHSTAGE = DESCRIPTOR.enum_types_by_name["LaunchStage"] +LaunchStage = enum_type_wrapper.EnumTypeWrapper(_LAUNCHSTAGE) +LAUNCH_STAGE_UNSPECIFIED = 0 +UNIMPLEMENTED = 6 +PRELAUNCH = 7 +EARLY_ACCESS = 1 +ALPHA = 2 +BETA = 3 +GA = 4 +DEPRECATED = 5 + + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\020LaunchStageProtoP\001Z-google.golang.org/genproto/googleapis/api;api\242\002\004GAPI" + _LAUNCHSTAGE._serialized_start = 46 + _LAUNCHSTAGE._serialized_end = 186 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/log.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/log.proto new file mode 100644 index 0000000000000000000000000000000000000000..416c4f6c2f06c1aa759c341fc9e4633b19c032e1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/log.proto @@ -0,0 +1,54 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/api/label.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "LogProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// A description of a log type. Example in YAML format: +// +// - name: library.googleapis.com/activity_history +// description: The history of borrowing and returning library items. +// display_name: Activity +// labels: +// - key: /customer_id +// description: Identifier of a library customer +message LogDescriptor { + // The name of the log. It must be less than 512 characters long and can + // include the following characters: upper- and lower-case alphanumeric + // characters [A-Za-z0-9], and punctuation characters including + // slash, underscore, hyphen, period [/_-.]. + string name = 1; + + // The set of labels that are available to describe a specific log entry. + // Runtime requests that contain labels not specified here are + // considered invalid. + repeated LabelDescriptor labels = 2; + + // A human-readable description of this log. This information appears in + // the documentation and can contain details. + string description = 3; + + // The human-readable name for this log. This information appears on + // the user interface and should be concise. + string display_name = 4; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/log_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/log_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..775b3dff0b63e073e4913557f1e10885cb47d1dd --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/log_pb2.py @@ -0,0 +1,57 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/log.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import label_pb2 as google_dot_api_dot_label__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x14google/api/log.proto\x12\ngoogle.api\x1a\x16google/api/label.proto"u\n\rLogDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12+\n\x06labels\x18\x02 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x04 \x01(\tBj\n\x0e\x63om.google.apiB\x08LogProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_LOGDESCRIPTOR = DESCRIPTOR.message_types_by_name["LogDescriptor"] +LogDescriptor = _reflection.GeneratedProtocolMessageType( + "LogDescriptor", + (_message.Message,), + { + "DESCRIPTOR": _LOGDESCRIPTOR, + "__module__": "google.api.log_pb2" + # @@protoc_insertion_point(class_scope:google.api.LogDescriptor) + }, +) +_sym_db.RegisterMessage(LogDescriptor) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\010LogProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _LOGDESCRIPTOR._serialized_start = 60 + _LOGDESCRIPTOR._serialized_end = 177 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/logging.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/logging.proto new file mode 100644 index 0000000000000000000000000000000000000000..650786fdedc5ac4a0075a87bea908d821e1c51fd --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/logging.proto @@ -0,0 +1,81 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "LoggingProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Logging configuration of the service. +// +// The following example shows how to configure logs to be sent to the +// producer and consumer projects. In the example, the `activity_history` +// log is sent to both the producer and consumer projects, whereas the +// `purchase_history` log is only sent to the producer project. +// +// monitored_resources: +// - type: library.googleapis.com/branch +// labels: +// - key: /city +// description: The city where the library branch is located in. +// - key: /name +// description: The name of the branch. +// logs: +// - name: activity_history +// labels: +// - key: /customer_id +// - name: purchase_history +// logging: +// producer_destinations: +// - monitored_resource: library.googleapis.com/branch +// logs: +// - activity_history +// - purchase_history +// consumer_destinations: +// - monitored_resource: library.googleapis.com/branch +// logs: +// - activity_history +message Logging { + // Configuration of a specific logging destination (the producer project + // or the consumer project). + message LoggingDestination { + // The monitored resource type. The type must be defined in the + // [Service.monitored_resources][google.api.Service.monitored_resources] + // section. + string monitored_resource = 3; + + // Names of the logs to be sent to this destination. Each name must + // be defined in the [Service.logs][google.api.Service.logs] section. If the + // log name is not a domain scoped name, it will be automatically prefixed + // with the service name followed by "/". + repeated string logs = 1; + } + + // Logging configurations for sending logs to the producer project. + // There can be multiple producer destinations, each one must have a + // different monitored resource type. A log can be used in at most + // one producer destination. + repeated LoggingDestination producer_destinations = 1; + + // Logging configurations for sending logs to the consumer project. + // There can be multiple consumer destinations, each one must have a + // different monitored resource type. A log can be used in at most + // one consumer destination. + repeated LoggingDestination consumer_destinations = 2; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/logging_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/logging_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..c9cd00e09e5eb5e351353155ff2cf4d6ac79e13e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/logging_pb2.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/logging.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x18google/api/logging.proto\x12\ngoogle.api"\xd7\x01\n\x07Logging\x12\x45\n\x15producer_destinations\x18\x01 \x03(\x0b\x32&.google.api.Logging.LoggingDestination\x12\x45\n\x15\x63onsumer_destinations\x18\x02 \x03(\x0b\x32&.google.api.Logging.LoggingDestination\x1a>\n\x12LoggingDestination\x12\x1a\n\x12monitored_resource\x18\x03 \x01(\t\x12\x0c\n\x04logs\x18\x01 \x03(\tBn\n\x0e\x63om.google.apiB\x0cLoggingProtoP\x01ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\xa2\x02\x04GAPIb\x06proto3' +) + + +_LOGGING = DESCRIPTOR.message_types_by_name["Logging"] +_LOGGING_LOGGINGDESTINATION = _LOGGING.nested_types_by_name["LoggingDestination"] +Logging = _reflection.GeneratedProtocolMessageType( + "Logging", + (_message.Message,), + { + "LoggingDestination": _reflection.GeneratedProtocolMessageType( + "LoggingDestination", + (_message.Message,), + { + "DESCRIPTOR": _LOGGING_LOGGINGDESTINATION, + "__module__": "google.api.logging_pb2" + # @@protoc_insertion_point(class_scope:google.api.Logging.LoggingDestination) + }, + ), + "DESCRIPTOR": _LOGGING, + "__module__": "google.api.logging_pb2" + # @@protoc_insertion_point(class_scope:google.api.Logging) + }, +) +_sym_db.RegisterMessage(Logging) +_sym_db.RegisterMessage(Logging.LoggingDestination) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\014LoggingProtoP\001ZEgoogle.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig\242\002\004GAPI" + _LOGGING._serialized_start = 41 + _LOGGING._serialized_end = 256 + _LOGGING_LOGGINGDESTINATION._serialized_start = 194 + _LOGGING_LOGGINGDESTINATION._serialized_end = 256 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/metric.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/metric.proto new file mode 100644 index 0000000000000000000000000000000000000000..9bf043c493ebb6d589d8a7e8d75f6142e8059256 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/metric.proto @@ -0,0 +1,268 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/api/label.proto"; +import "google/api/launch_stage.proto"; +import "google/protobuf/duration.proto"; + +option go_package = "google.golang.org/genproto/googleapis/api/metric;metric"; +option java_multiple_files = true; +option java_outer_classname = "MetricProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Defines a metric type and its schema. Once a metric descriptor is created, +// deleting or altering it stops data collection and makes the metric type's +// existing data unusable. +// +message MetricDescriptor { + // The kind of measurement. It describes how the data is reported. + // For information on setting the start time and end time based on + // the MetricKind, see [TimeInterval][google.monitoring.v3.TimeInterval]. + enum MetricKind { + // Do not use this default value. + METRIC_KIND_UNSPECIFIED = 0; + + // An instantaneous measurement of a value. + GAUGE = 1; + + // The change in a value during a time interval. + DELTA = 2; + + // A value accumulated over a time interval. Cumulative + // measurements in a time series should have the same start time + // and increasing end times, until an event resets the cumulative + // value to zero and sets a new start time for the following + // points. + CUMULATIVE = 3; + } + + // The value type of a metric. + enum ValueType { + // Do not use this default value. + VALUE_TYPE_UNSPECIFIED = 0; + + // The value is a boolean. + // This value type can be used only if the metric kind is `GAUGE`. + BOOL = 1; + + // The value is a signed 64-bit integer. + INT64 = 2; + + // The value is a double precision floating point number. + DOUBLE = 3; + + // The value is a text string. + // This value type can be used only if the metric kind is `GAUGE`. + STRING = 4; + + // The value is a [`Distribution`][google.api.Distribution]. + DISTRIBUTION = 5; + + // The value is money. + MONEY = 6; + } + + // Additional annotations that can be used to guide the usage of a metric. + message MetricDescriptorMetadata { + // Deprecated. Must use the + // [MetricDescriptor.launch_stage][google.api.MetricDescriptor.launch_stage] + // instead. + LaunchStage launch_stage = 1 [deprecated = true]; + + // The sampling period of metric data points. For metrics which are written + // periodically, consecutive data points are stored at this time interval, + // excluding data loss due to errors. Metrics with a higher granularity have + // a smaller sampling period. + google.protobuf.Duration sample_period = 2; + + // The delay of data points caused by ingestion. Data points older than this + // age are guaranteed to be ingested and available to be read, excluding + // data loss due to errors. + google.protobuf.Duration ingest_delay = 3; + } + + // The resource name of the metric descriptor. + string name = 1; + + // The metric type, including its DNS name prefix. The type is not + // URL-encoded. All user-defined metric types have the DNS name + // `custom.googleapis.com` or `external.googleapis.com`. Metric types should + // use a natural hierarchical grouping. For example: + // + // "custom.googleapis.com/invoice/paid/amount" + // "external.googleapis.com/prometheus/up" + // "appengine.googleapis.com/http/server/response_latencies" + string type = 8; + + // The set of labels that can be used to describe a specific + // instance of this metric type. For example, the + // `appengine.googleapis.com/http/server/response_latencies` metric + // type has a label for the HTTP response code, `response_code`, so + // you can look at latencies for successful responses or just + // for responses that failed. + repeated LabelDescriptor labels = 2; + + // Whether the metric records instantaneous values, changes to a value, etc. + // Some combinations of `metric_kind` and `value_type` might not be supported. + MetricKind metric_kind = 3; + + // Whether the measurement is an integer, a floating-point number, etc. + // Some combinations of `metric_kind` and `value_type` might not be supported. + ValueType value_type = 4; + + // The units in which the metric value is reported. It is only applicable + // if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` + // defines the representation of the stored metric values. + // + // Different systems might scale the values to be more easily displayed (so a + // value of `0.02kBy` _might_ be displayed as `20By`, and a value of + // `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is + // `kBy`, then the value of the metric is always in thousands of bytes, no + // matter how it might be displayed. + // + // If you want a custom metric to record the exact number of CPU-seconds used + // by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is + // `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 + // CPU-seconds, then the value is written as `12005`. + // + // Alternatively, if you want a custom metric to record data in a more + // granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is + // `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), + // or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). + // + // The supported units are a subset of [The Unified Code for Units of + // Measure](https://unitsofmeasure.org/ucum.html) standard: + // + // **Basic units (UNIT)** + // + // * `bit` bit + // * `By` byte + // * `s` second + // * `min` minute + // * `h` hour + // * `d` day + // * `1` dimensionless + // + // **Prefixes (PREFIX)** + // + // * `k` kilo (10^3) + // * `M` mega (10^6) + // * `G` giga (10^9) + // * `T` tera (10^12) + // * `P` peta (10^15) + // * `E` exa (10^18) + // * `Z` zetta (10^21) + // * `Y` yotta (10^24) + // + // * `m` milli (10^-3) + // * `u` micro (10^-6) + // * `n` nano (10^-9) + // * `p` pico (10^-12) + // * `f` femto (10^-15) + // * `a` atto (10^-18) + // * `z` zepto (10^-21) + // * `y` yocto (10^-24) + // + // * `Ki` kibi (2^10) + // * `Mi` mebi (2^20) + // * `Gi` gibi (2^30) + // * `Ti` tebi (2^40) + // * `Pi` pebi (2^50) + // + // **Grammar** + // + // The grammar also includes these connectors: + // + // * `/` division or ratio (as an infix operator). For examples, + // `kBy/{email}` or `MiBy/10ms` (although you should almost never + // have `/s` in a metric `unit`; rates should always be computed at + // query time from the underlying cumulative or delta value). + // * `.` multiplication or composition (as an infix operator). For + // examples, `GBy.d` or `k{watt}.h`. + // + // The grammar for a unit is as follows: + // + // Expression = Component { "." Component } { "/" Component } ; + // + // Component = ( [ PREFIX ] UNIT | "%" ) [ Annotation ] + // | Annotation + // | "1" + // ; + // + // Annotation = "{" NAME "}" ; + // + // Notes: + // + // * `Annotation` is just a comment if it follows a `UNIT`. If the annotation + // is used alone, then the unit is equivalent to `1`. For examples, + // `{request}/s == 1/s`, `By{transmitted}/s == By/s`. + // * `NAME` is a sequence of non-blank printable ASCII characters not + // containing `{` or `}`. + // * `1` represents a unitary [dimensionless + // unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such + // as in `1/s`. It is typically used when none of the basic units are + // appropriate. For example, "new users per day" can be represented as + // `1/d` or `{new-users}/d` (and a metric value `5` would mean "5 new + // users). Alternatively, "thousands of page views per day" would be + // represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric + // value of `5.3` would mean "5300 page views per day"). + // * `%` represents dimensionless value of 1/100, and annotates values giving + // a percentage (so the metric values are typically in the range of 0..100, + // and a metric value `3` means "3 percent"). + // * `10^2.%` indicates a metric contains a ratio, typically in the range + // 0..1, that will be multiplied by 100 and displayed as a percentage + // (so a metric value `0.03` means "3 percent"). + string unit = 5; + + // A detailed description of the metric, which can be used in documentation. + string description = 6; + + // A concise name for the metric, which can be displayed in user interfaces. + // Use sentence case without an ending period, for example "Request count". + // This field is optional but it is recommended to be set for any metrics + // associated with user-visible concepts, such as Quota. + string display_name = 7; + + // Optional. Metadata which can be used to guide usage of the metric. + MetricDescriptorMetadata metadata = 10; + + // Optional. The launch stage of the metric definition. + LaunchStage launch_stage = 12; + + // Read-only. If present, then a [time + // series][google.monitoring.v3.TimeSeries], which is identified partially by + // a metric type and a + // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor], that + // is associated with this metric type can only be associated with one of the + // monitored resource types listed here. + repeated string monitored_resource_types = 13; +} + +// A specific metric, identified by specifying values for all of the +// labels of a [`MetricDescriptor`][google.api.MetricDescriptor]. +message Metric { + // An existing metric type, see + // [google.api.MetricDescriptor][google.api.MetricDescriptor]. For example, + // `custom.googleapis.com/invoice/paid/amount`. + string type = 3; + + // The set of label values that uniquely identify this metric. All + // labels listed in the `MetricDescriptor` must be assigned values. + map labels = 2; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/metric_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/metric_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..c0b62eeb8665f18143cf9b6676a0d7eec2714a01 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/metric_pb2.py @@ -0,0 +1,115 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/metric.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import label_pb2 as google_dot_api_dot_label__pb2 +from google.api import launch_stage_pb2 as google_dot_api_dot_launch__stage__pb2 +from google.protobuf import duration_pb2 as google_dot_protobuf_dot_duration__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n\x17google/api/metric.proto\x12\ngoogle.api\x1a\x16google/api/label.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x1egoogle/protobuf/duration.proto"\x9f\x06\n\x10MetricDescriptor\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x08 \x01(\t\x12+\n\x06labels\x18\x02 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12<\n\x0bmetric_kind\x18\x03 \x01(\x0e\x32\'.google.api.MetricDescriptor.MetricKind\x12:\n\nvalue_type\x18\x04 \x01(\x0e\x32&.google.api.MetricDescriptor.ValueType\x12\x0c\n\x04unit\x18\x05 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x06 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x07 \x01(\t\x12G\n\x08metadata\x18\n \x01(\x0b\x32\x35.google.api.MetricDescriptor.MetricDescriptorMetadata\x12-\n\x0claunch_stage\x18\x0c \x01(\x0e\x32\x17.google.api.LaunchStage\x12 \n\x18monitored_resource_types\x18\r \x03(\t\x1a\xb0\x01\n\x18MetricDescriptorMetadata\x12\x31\n\x0claunch_stage\x18\x01 \x01(\x0e\x32\x17.google.api.LaunchStageB\x02\x18\x01\x12\x30\n\rsample_period\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration\x12/\n\x0cingest_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.Duration"O\n\nMetricKind\x12\x1b\n\x17METRIC_KIND_UNSPECIFIED\x10\x00\x12\t\n\x05GAUGE\x10\x01\x12\t\n\x05\x44\x45LTA\x10\x02\x12\x0e\n\nCUMULATIVE\x10\x03"q\n\tValueType\x12\x1a\n\x16VALUE_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\t\n\x05INT64\x10\x02\x12\n\n\x06\x44OUBLE\x10\x03\x12\n\n\x06STRING\x10\x04\x12\x10\n\x0c\x44ISTRIBUTION\x10\x05\x12\t\n\x05MONEY\x10\x06"u\n\x06Metric\x12\x0c\n\x04type\x18\x03 \x01(\t\x12.\n\x06labels\x18\x02 \x03(\x0b\x32\x1e.google.api.Metric.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42_\n\x0e\x63om.google.apiB\x0bMetricProtoP\x01Z7google.golang.org/genproto/googleapis/api/metric;metric\xa2\x02\x04GAPIb\x06proto3' +) + + +_METRICDESCRIPTOR = DESCRIPTOR.message_types_by_name["MetricDescriptor"] +_METRICDESCRIPTOR_METRICDESCRIPTORMETADATA = _METRICDESCRIPTOR.nested_types_by_name[ + "MetricDescriptorMetadata" +] +_METRIC = DESCRIPTOR.message_types_by_name["Metric"] +_METRIC_LABELSENTRY = _METRIC.nested_types_by_name["LabelsEntry"] +_METRICDESCRIPTOR_METRICKIND = _METRICDESCRIPTOR.enum_types_by_name["MetricKind"] +_METRICDESCRIPTOR_VALUETYPE = _METRICDESCRIPTOR.enum_types_by_name["ValueType"] +MetricDescriptor = _reflection.GeneratedProtocolMessageType( + "MetricDescriptor", + (_message.Message,), + { + "MetricDescriptorMetadata": _reflection.GeneratedProtocolMessageType( + "MetricDescriptorMetadata", + (_message.Message,), + { + "DESCRIPTOR": _METRICDESCRIPTOR_METRICDESCRIPTORMETADATA, + "__module__": "google.api.metric_pb2" + # @@protoc_insertion_point(class_scope:google.api.MetricDescriptor.MetricDescriptorMetadata) + }, + ), + "DESCRIPTOR": _METRICDESCRIPTOR, + "__module__": "google.api.metric_pb2" + # @@protoc_insertion_point(class_scope:google.api.MetricDescriptor) + }, +) +_sym_db.RegisterMessage(MetricDescriptor) +_sym_db.RegisterMessage(MetricDescriptor.MetricDescriptorMetadata) + +Metric = _reflection.GeneratedProtocolMessageType( + "Metric", + (_message.Message,), + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( + "LabelsEntry", + (_message.Message,), + { + "DESCRIPTOR": _METRIC_LABELSENTRY, + "__module__": "google.api.metric_pb2" + # @@protoc_insertion_point(class_scope:google.api.Metric.LabelsEntry) + }, + ), + "DESCRIPTOR": _METRIC, + "__module__": "google.api.metric_pb2" + # @@protoc_insertion_point(class_scope:google.api.Metric) + }, +) +_sym_db.RegisterMessage(Metric) +_sym_db.RegisterMessage(Metric.LabelsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\013MetricProtoP\001Z7google.golang.org/genproto/googleapis/api/metric;metric\242\002\004GAPI" + _METRICDESCRIPTOR_METRICDESCRIPTORMETADATA.fields_by_name[ + "launch_stage" + ]._options = None + _METRICDESCRIPTOR_METRICDESCRIPTORMETADATA.fields_by_name[ + "launch_stage" + ]._serialized_options = b"\030\001" + _METRIC_LABELSENTRY._options = None + _METRIC_LABELSENTRY._serialized_options = b"8\001" + _METRICDESCRIPTOR._serialized_start = 127 + _METRICDESCRIPTOR._serialized_end = 926 + _METRICDESCRIPTOR_METRICDESCRIPTORMETADATA._serialized_start = 554 + _METRICDESCRIPTOR_METRICDESCRIPTORMETADATA._serialized_end = 730 + _METRICDESCRIPTOR_METRICKIND._serialized_start = 732 + _METRICDESCRIPTOR_METRICKIND._serialized_end = 811 + _METRICDESCRIPTOR_VALUETYPE._serialized_start = 813 + _METRICDESCRIPTOR_VALUETYPE._serialized_end = 926 + _METRIC._serialized_start = 928 + _METRIC._serialized_end = 1045 + _METRIC_LABELSENTRY._serialized_start = 1000 + _METRIC_LABELSENTRY._serialized_end = 1045 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitored_resource.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitored_resource.proto new file mode 100644 index 0000000000000000000000000000000000000000..08bc39b1c230f42d86ed6008590441247c4c8093 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitored_resource.proto @@ -0,0 +1,130 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +import "google/api/label.proto"; +import "google/api/launch_stage.proto"; +import "google/protobuf/struct.proto"; + +option cc_enable_arenas = true; +option go_package = "google.golang.org/genproto/googleapis/api/monitoredres;monitoredres"; +option java_multiple_files = true; +option java_outer_classname = "MonitoredResourceProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// An object that describes the schema of a +// [MonitoredResource][google.api.MonitoredResource] object using a type name +// and a set of labels. For example, the monitored resource descriptor for +// Google Compute Engine VM instances has a type of +// `"gce_instance"` and specifies the use of the labels `"instance_id"` and +// `"zone"` to identify particular VM instances. +// +// Different APIs can support different monitored resource types. APIs generally +// provide a `list` method that returns the monitored resource descriptors used +// by the API. +// +message MonitoredResourceDescriptor { + // Optional. The resource name of the monitored resource descriptor: + // `"projects/{project_id}/monitoredResourceDescriptors/{type}"` where + // {type} is the value of the `type` field in this object and + // {project_id} is a project ID that provides API-specific context for + // accessing the type. APIs that do not use project information can use the + // resource name format `"monitoredResourceDescriptors/{type}"`. + string name = 5; + + // Required. The monitored resource type. For example, the type + // `"cloudsql_database"` represents databases in Google Cloud SQL. + // For a list of types, see [Monitored resource + // types](https://cloud.google.com/monitoring/api/resources) + // and [Logging resource + // types](https://cloud.google.com/logging/docs/api/v2/resource-list). + string type = 1; + + // Optional. A concise name for the monitored resource type that might be + // displayed in user interfaces. It should be a Title Cased Noun Phrase, + // without any article or other determiners. For example, + // `"Google Cloud SQL Database"`. + string display_name = 2; + + // Optional. A detailed description of the monitored resource type that might + // be used in documentation. + string description = 3; + + // Required. A set of labels used to describe instances of this monitored + // resource type. For example, an individual Google Cloud SQL database is + // identified by values for the labels `"database_id"` and `"zone"`. + repeated LabelDescriptor labels = 4; + + // Optional. The launch stage of the monitored resource definition. + LaunchStage launch_stage = 7; +} + +// An object representing a resource that can be used for monitoring, logging, +// billing, or other purposes. Examples include virtual machine instances, +// databases, and storage devices such as disks. The `type` field identifies a +// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] object +// that describes the resource's schema. Information in the `labels` field +// identifies the actual resource and its attributes according to the schema. +// For example, a particular Compute Engine VM instance could be represented by +// the following object, because the +// [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] for +// `"gce_instance"` has labels +// `"project_id"`, `"instance_id"` and `"zone"`: +// +// { "type": "gce_instance", +// "labels": { "project_id": "my-project", +// "instance_id": "12345678901234", +// "zone": "us-central1-a" }} +message MonitoredResource { + // Required. The monitored resource type. This field must match + // the `type` field of a + // [MonitoredResourceDescriptor][google.api.MonitoredResourceDescriptor] + // object. For example, the type of a Compute Engine VM instance is + // `gce_instance`. Some descriptors include the service name in the type; for + // example, the type of a Datastream stream is + // `datastream.googleapis.com/Stream`. + string type = 1; + + // Required. Values for all of the labels listed in the associated monitored + // resource descriptor. For example, Compute Engine VM instances use the + // labels `"project_id"`, `"instance_id"`, and `"zone"`. + map labels = 2; +} + +// Auxiliary metadata for a [MonitoredResource][google.api.MonitoredResource] +// object. [MonitoredResource][google.api.MonitoredResource] objects contain the +// minimum set of information to uniquely identify a monitored resource +// instance. There is some other useful auxiliary metadata. Monitoring and +// Logging use an ingestion pipeline to extract metadata for cloud resources of +// all types, and store the metadata in this message. +message MonitoredResourceMetadata { + // Output only. Values for predefined system metadata labels. + // System labels are a kind of metadata extracted by Google, including + // "machine_image", "vpc", "subnet_id", + // "security_group", "name", etc. + // System label values can be only strings, Boolean values, or a list of + // strings. For example: + // + // { "name": "my-test-instance", + // "security_group": ["a", "b", "c"], + // "spot_instance": false } + google.protobuf.Struct system_labels = 1; + + // Output only. A map of user-defined metadata labels. + map user_labels = 2; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitored_resource_pb2.py b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitored_resource_pb2.py new file mode 100644 index 0000000000000000000000000000000000000000..07be8aa5fc1166d4164f36c2a9250db14acda7f2 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitored_resource_pb2.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- + +# 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. + +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/api/monitored_resource.proto +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import message as _message +from google.protobuf import reflection as _reflection +from google.protobuf import symbol_database as _symbol_database + +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +from google.api import label_pb2 as google_dot_api_dot_label__pb2 +from google.api import launch_stage_pb2 as google_dot_api_dot_launch__stage__pb2 +from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( + b'\n#google/api/monitored_resource.proto\x12\ngoogle.api\x1a\x16google/api/label.proto\x1a\x1dgoogle/api/launch_stage.proto\x1a\x1cgoogle/protobuf/struct.proto"\xc0\x01\n\x1bMonitoredResourceDescriptor\x12\x0c\n\x04name\x18\x05 \x01(\t\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12+\n\x06labels\x18\x04 \x03(\x0b\x32\x1b.google.api.LabelDescriptor\x12-\n\x0claunch_stage\x18\x07 \x01(\x0e\x32\x17.google.api.LaunchStage"\x8b\x01\n\x11MonitoredResource\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x39\n\x06labels\x18\x02 \x03(\x0b\x32).google.api.MonitoredResource.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\xca\x01\n\x19MonitoredResourceMetadata\x12.\n\rsystem_labels\x18\x01 \x01(\x0b\x32\x17.google.protobuf.Struct\x12J\n\x0buser_labels\x18\x02 \x03(\x0b\x32\x35.google.api.MonitoredResourceMetadata.UserLabelsEntry\x1a\x31\n\x0fUserLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42y\n\x0e\x63om.google.apiB\x16MonitoredResourceProtoP\x01ZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monitoredres\xf8\x01\x01\xa2\x02\x04GAPIb\x06proto3' +) + + +_MONITOREDRESOURCEDESCRIPTOR = DESCRIPTOR.message_types_by_name[ + "MonitoredResourceDescriptor" +] +_MONITOREDRESOURCE = DESCRIPTOR.message_types_by_name["MonitoredResource"] +_MONITOREDRESOURCE_LABELSENTRY = _MONITOREDRESOURCE.nested_types_by_name["LabelsEntry"] +_MONITOREDRESOURCEMETADATA = DESCRIPTOR.message_types_by_name[ + "MonitoredResourceMetadata" +] +_MONITOREDRESOURCEMETADATA_USERLABELSENTRY = ( + _MONITOREDRESOURCEMETADATA.nested_types_by_name["UserLabelsEntry"] +) +MonitoredResourceDescriptor = _reflection.GeneratedProtocolMessageType( + "MonitoredResourceDescriptor", + (_message.Message,), + { + "DESCRIPTOR": _MONITOREDRESOURCEDESCRIPTOR, + "__module__": "google.api.monitored_resource_pb2" + # @@protoc_insertion_point(class_scope:google.api.MonitoredResourceDescriptor) + }, +) +_sym_db.RegisterMessage(MonitoredResourceDescriptor) + +MonitoredResource = _reflection.GeneratedProtocolMessageType( + "MonitoredResource", + (_message.Message,), + { + "LabelsEntry": _reflection.GeneratedProtocolMessageType( + "LabelsEntry", + (_message.Message,), + { + "DESCRIPTOR": _MONITOREDRESOURCE_LABELSENTRY, + "__module__": "google.api.monitored_resource_pb2" + # @@protoc_insertion_point(class_scope:google.api.MonitoredResource.LabelsEntry) + }, + ), + "DESCRIPTOR": _MONITOREDRESOURCE, + "__module__": "google.api.monitored_resource_pb2" + # @@protoc_insertion_point(class_scope:google.api.MonitoredResource) + }, +) +_sym_db.RegisterMessage(MonitoredResource) +_sym_db.RegisterMessage(MonitoredResource.LabelsEntry) + +MonitoredResourceMetadata = _reflection.GeneratedProtocolMessageType( + "MonitoredResourceMetadata", + (_message.Message,), + { + "UserLabelsEntry": _reflection.GeneratedProtocolMessageType( + "UserLabelsEntry", + (_message.Message,), + { + "DESCRIPTOR": _MONITOREDRESOURCEMETADATA_USERLABELSENTRY, + "__module__": "google.api.monitored_resource_pb2" + # @@protoc_insertion_point(class_scope:google.api.MonitoredResourceMetadata.UserLabelsEntry) + }, + ), + "DESCRIPTOR": _MONITOREDRESOURCEMETADATA, + "__module__": "google.api.monitored_resource_pb2" + # @@protoc_insertion_point(class_scope:google.api.MonitoredResourceMetadata) + }, +) +_sym_db.RegisterMessage(MonitoredResourceMetadata) +_sym_db.RegisterMessage(MonitoredResourceMetadata.UserLabelsEntry) + +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b"\n\016com.google.apiB\026MonitoredResourceProtoP\001ZCgoogle.golang.org/genproto/googleapis/api/monitoredres;monitoredres\370\001\001\242\002\004GAPI" + _MONITOREDRESOURCE_LABELSENTRY._options = None + _MONITOREDRESOURCE_LABELSENTRY._serialized_options = b"8\001" + _MONITOREDRESOURCEMETADATA_USERLABELSENTRY._options = None + _MONITOREDRESOURCEMETADATA_USERLABELSENTRY._serialized_options = b"8\001" + _MONITOREDRESOURCEDESCRIPTOR._serialized_start = 137 + _MONITOREDRESOURCEDESCRIPTOR._serialized_end = 329 + _MONITOREDRESOURCE._serialized_start = 332 + _MONITOREDRESOURCE._serialized_end = 471 + _MONITOREDRESOURCE_LABELSENTRY._serialized_start = 426 + _MONITOREDRESOURCE_LABELSENTRY._serialized_end = 471 + _MONITOREDRESOURCEMETADATA._serialized_start = 474 + _MONITOREDRESOURCEMETADATA._serialized_end = 676 + _MONITOREDRESOURCEMETADATA_USERLABELSENTRY._serialized_start = 627 + _MONITOREDRESOURCEMETADATA_USERLABELSENTRY._serialized_end = 676 +# @@protoc_insertion_point(module_scope) diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitoring.proto b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitoring.proto new file mode 100644 index 0000000000000000000000000000000000000000..753703e5450164227f13cb5e5b1077bb114e5112 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/google/api/monitoring.proto @@ -0,0 +1,107 @@ +// Copyright 2023 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. + +syntax = "proto3"; + +package google.api; + +option go_package = "google.golang.org/genproto/googleapis/api/serviceconfig;serviceconfig"; +option java_multiple_files = true; +option java_outer_classname = "MonitoringProto"; +option java_package = "com.google.api"; +option objc_class_prefix = "GAPI"; + +// Monitoring configuration of the service. +// +// The example below shows how to configure monitored resources and metrics +// for monitoring. In the example, a monitored resource and two metrics are +// defined. The `library.googleapis.com/book/returned_count` metric is sent +// to both producer and consumer projects, whereas the +// `library.googleapis.com/book/num_overdue` metric is only sent to the +// consumer project. +// +// monitored_resources: +// - type: library.googleapis.com/Branch +// display_name: "Library Branch" +// description: "A branch of a library." +// launch_stage: GA +// labels: +// - key: resource_container +// description: "The Cloud container (ie. project id) for the Branch." +// - key: location +// description: "The location of the library branch." +// - key: branch_id +// description: "The id of the branch." +// metrics: +// - name: library.googleapis.com/book/returned_count +// display_name: "Books Returned" +// description: "The count of books that have been returned." +// launch_stage: GA +// metric_kind: DELTA +// value_type: INT64 +// unit: "1" +// labels: +// - key: customer_id +// description: "The id of the customer." +// - name: library.googleapis.com/book/num_overdue +// display_name: "Books Overdue" +// description: "The current number of overdue books." +// launch_stage: GA +// metric_kind: GAUGE +// value_type: INT64 +// unit: "1" +// labels: +// - key: customer_id +// description: "The id of the customer." +// monitoring: +// producer_destinations: +// - monitored_resource: library.googleapis.com/Branch +// metrics: +// - library.googleapis.com/book/returned_count +// consumer_destinations: +// - monitored_resource: library.googleapis.com/Branch +// metrics: +// - library.googleapis.com/book/returned_count +// - library.googleapis.com/book/num_overdue +message Monitoring { + // Configuration of a specific monitoring destination (the producer project + // or the consumer project). + message MonitoringDestination { + // The monitored resource type. The type must be defined in + // [Service.monitored_resources][google.api.Service.monitored_resources] + // section. + string monitored_resource = 1; + + // Types of the metrics to report to this monitoring destination. + // Each type must be defined in + // [Service.metrics][google.api.Service.metrics] section. + repeated string metrics = 2; + } + + // Monitoring configurations for sending metrics to the producer project. + // There can be multiple producer destinations. A monitored resource type may + // appear in multiple monitoring destinations if different aggregations are + // needed for different sets of metrics associated with that monitored + // resource type. A monitored resource and metric pair may only be used once + // in the Monitoring configuration. + repeated MonitoringDestination producer_destinations = 1; + + // Monitoring configurations for sending metrics to the consumer project. + // There can be multiple consumer destinations. A monitored resource type may + // appear in multiple monitoring destinations if different aggregations are + // needed for different sets of metrics associated with that monitored + // resource type. A monitored resource and metric pair may only be used once + // in the Monitoring configuration. + repeated MonitoringDestination consumer_destinations = 2; +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ml.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ml.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..b94106fa06f96e2ccb0f6f87d4e0cbd9e1d3dd8c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ml.v1.json @@ -0,0 +1,3914 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +} +} +} +}, +"basePath": "", +"baseUrl": "https://ml.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Machine Learning Engine", +"description": "An API to enable creating and using machine learning models.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/ml/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "ml:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://ml.mtls.googleapis.com/", +"name": "ml", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"methods": { +"explain": { +"description": "Performs explanation on the data in the request. {% dynamic include \"/ai-platform/includes/___explain-request\" %} ", +"flatPath": "v1/projects/{projectsId}:explain", +"httpMethod": "POST", +"id": "ml.projects.explain", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of a model or a version. Authorization: requires the `predict` permission on the specified resource.", +"location": "path", +"pattern": "^projects/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:explain", +"request": { +"$ref": "GoogleCloudMlV1__ExplainRequest" +}, +"response": { +"$ref": "GoogleApi__HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getConfig": { +"description": "Get the service account information associated with your project. You need this information in order to grant the service account permissions for the Google Cloud Storage location where you put your model training code for training the model with Google Cloud Machine Learning.", +"flatPath": "v1/projects/{projectsId}:getConfig", +"httpMethod": "GET", +"id": "ml.projects.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project name.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:getConfig", +"response": { +"$ref": "GoogleCloudMlV1__GetConfigResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"predict": { +"description": "Performs online prediction on the data in the request. {% dynamic include \"/ai-platform/includes/___predict-request\" %} ", +"flatPath": "v1/projects/{projectsId}:predict", +"httpMethod": "POST", +"id": "ml.projects.predict", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of a model or a version. Authorization: requires the `predict` permission on the specified resource.", +"location": "path", +"pattern": "^projects/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:predict", +"request": { +"$ref": "GoogleCloudMlV1__PredictRequest" +}, +"response": { +"$ref": "GoogleApi__HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"jobs": { +"methods": { +"cancel": { +"description": "Cancels a running job.", +"flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:cancel", +"httpMethod": "POST", +"id": "ml.projects.jobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the job to cancel.", +"location": "path", +"pattern": "^projects/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "GoogleCloudMlV1__CancelJobRequest" +}, +"response": { +"$ref": "GoogleProtobuf__Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a training or a batch prediction job.", +"flatPath": "v1/projects/{projectsId}/jobs", +"httpMethod": "POST", +"id": "ml.projects.jobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project name.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/jobs", +"request": { +"$ref": "GoogleCloudMlV1__Job" +}, +"response": { +"$ref": "GoogleCloudMlV1__Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Describes a job.", +"flatPath": "v1/projects/{projectsId}/jobs/{jobsId}", +"httpMethod": "GET", +"id": "ml.projects.jobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the job to get the description of.", +"location": "path", +"pattern": "^projects/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudMlV1__Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:getIamPolicy", +"httpMethod": "GET", +"id": "ml.projects.jobs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1__Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the jobs in the project. If there are no jobs that match the request parameters, the list request returns an empty response body: {}.", +"flatPath": "v1/projects/{projectsId}/jobs", +"httpMethod": "GET", +"id": "ml.projects.jobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Specifies the subset of jobs to retrieve. You can filter on the value of one or more attributes of the job object. For example, retrieve jobs with a job identifier that starts with 'census': gcloud ai-platform jobs list --filter='jobId:census*' List all failed jobs with names that start with 'rnn': gcloud ai-platform jobs list --filter='jobId:rnn* AND state:FAILED' For more examples, see the guide to monitoring jobs.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The number of jobs to retrieve per \"page\" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project for which to list jobs.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/jobs", +"response": { +"$ref": "GoogleCloudMlV1__ListJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"patch": { +"description": "Updates a specific job resource. Currently the only supported fields to update are `labels`.", +"flatPath": "v1/projects/{projectsId}/jobs/{jobsId}", +"httpMethod": "PATCH", +"id": "ml.projects.jobs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The job name.", +"location": "path", +"pattern": "^projects/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the path, relative to `Job`, of the field to update. To adopt etag mechanism, include `etag` field in the mask, and include the `etag` value in your job resource. For example, to change the labels of a job, the `update_mask` parameter would be specified as `labels`, `etag`, and the `PATCH` request body would specify the new value, as follows: { \"labels\": { \"owner\": \"Google\", \"color\": \"Blue\" } \"etag\": \"33a64df551425fcc55e4d42a148795d9f25f89d4\" } If `etag` matches the one on the server, the labels of the job will be replaced with the given ones, and the server end `etag` will be recalculated. Currently the only supported update masks are `labels` and `etag`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudMlV1__Job" +}, +"response": { +"$ref": "GoogleCloudMlV1__Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:setIamPolicy", +"httpMethod": "POST", +"id": "ml.projects.jobs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1__SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1__Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/jobs/{jobsId}:testIamPermissions", +"httpMethod": "POST", +"id": "ml.projects.jobs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1__TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1__TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"locations": { +"methods": { +"get": { +"description": "Get the complete list of CMLE capabilities in a location, along with their location-specific properties.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "ml.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudMlV1__Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"list": { +"description": "List all locations that provides at least one type of CMLE capability.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "ml.projects.locations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The number of locations to retrieve per \"page\" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project for which available locations are to be listed (since some locations might be whitelisted for specific projects).", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/locations", +"response": { +"$ref": "GoogleCloudMlV1__ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +} +}, +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "ml.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "GoogleProtobuf__Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "ml.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"studies": { +"methods": { +"create": { +"description": "Creates a study.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"studyId": { +"description": "Required. The ID to use for the study, which will become the final component of the study's resource name.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/studies", +"request": { +"$ref": "GoogleCloudMlV1__Study" +}, +"response": { +"$ref": "GoogleCloudMlV1__Study" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a study.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}", +"httpMethod": "DELETE", +"id": "ml.projects.locations.studies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The study name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleProtobuf__Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a study.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}", +"httpMethod": "GET", +"id": "ml.projects.locations.studies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The study name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudMlV1__Study" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the studies in a region for an associated project.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies", +"httpMethod": "GET", +"id": "ml.projects.locations.studies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project and location that the study belongs to. Format: projects/{project}/locations/{location}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/studies", +"response": { +"$ref": "GoogleCloudMlV1__ListStudiesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"trials": { +"methods": { +"addMeasurement": { +"description": "Adds a measurement of the objective metrics to a trial. This measurement is assumed to have been taken before the trial is complete.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials/{trialsId}:addMeasurement", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.trials.addMeasurement", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The trial name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:addMeasurement", +"request": { +"$ref": "GoogleCloudMlV1__AddTrialMeasurementRequest" +}, +"response": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"checkEarlyStoppingState": { +"description": "Checks whether a trial should stop or not. Returns a long-running operation. When the operation is successful, it will contain a CheckTrialEarlyStoppingStateResponse.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials/{trialsId}:checkEarlyStoppingState", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.trials.checkEarlyStoppingState", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The trial name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:checkEarlyStoppingState", +"request": { +"$ref": "GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest" +}, +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"complete": { +"description": "Marks a trial as complete.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials/{trialsId}:complete", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.trials.complete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The trial name.metat", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:complete", +"request": { +"$ref": "GoogleCloudMlV1__CompleteTrialRequest" +}, +"response": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Adds a user provided trial to a study.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.trials.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the study that the trial belongs to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/trials", +"request": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"response": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a trial.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials/{trialsId}", +"httpMethod": "DELETE", +"id": "ml.projects.locations.studies.trials.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The trial name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleProtobuf__Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a trial.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials/{trialsId}", +"httpMethod": "GET", +"id": "ml.projects.locations.studies.trials.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The trial name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the trials associated with a study.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials", +"httpMethod": "GET", +"id": "ml.projects.locations.studies.trials.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the study that the trial belongs to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/trials", +"response": { +"$ref": "GoogleCloudMlV1__ListTrialsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listOptimalTrials": { +"description": "Lists the pareto-optimal trials for multi-objective study or the optimal trials for single-objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials:listOptimalTrials", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.trials.listOptimalTrials", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the study that the pareto-optimal trial belongs to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/trials:listOptimalTrials", +"request": { +"$ref": "GoogleCloudMlV1__ListOptimalTrialsRequest" +}, +"response": { +"$ref": "GoogleCloudMlV1__ListOptimalTrialsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a trial.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials/{trialsId}:stop", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.trials.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The trial name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+/trials/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:stop", +"request": { +"$ref": "GoogleCloudMlV1__StopTrialRequest" +}, +"response": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"suggest": { +"description": "Adds one or more trials to a study, with parameter values suggested by AI Platform Vizier. Returns a long-running operation associated with the generation of trial suggestions. When this long-running operation succeeds, it will contain a SuggestTrialsResponse.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/studies/{studiesId}/trials:suggest", +"httpMethod": "POST", +"id": "ml.projects.locations.studies.trials.suggest", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the study that the trial belongs to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/studies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/trials:suggest", +"request": { +"$ref": "GoogleCloudMlV1__SuggestTrialsRequest" +}, +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"models": { +"methods": { +"create": { +"description": "Creates a model which will later contain one or more versions. You must add at least one version before you can request predictions from the model. Add versions by calling projects.models.versions.create.", +"flatPath": "v1/projects/{projectsId}/models", +"httpMethod": "POST", +"id": "ml.projects.models.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project name.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/models", +"request": { +"$ref": "GoogleCloudMlV1__Model" +}, +"response": { +"$ref": "GoogleCloudMlV1__Model" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a model. You can only delete a model if there are no versions in it. You can delete versions by calling projects.models.versions.delete.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}", +"httpMethod": "DELETE", +"id": "ml.projects.models.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a model, including its name, the description (if set), and the default version (if at least one version of the model has been deployed).", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}", +"httpMethod": "GET", +"id": "ml.projects.models.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudMlV1__Model" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}:getIamPolicy", +"httpMethod": "GET", +"id": "ml.projects.models.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1__Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the models in a project. Each project can contain multiple models, and each model can have multiple versions. If there are no models that match the request parameters, the list request returns an empty response body: {}.", +"flatPath": "v1/projects/{projectsId}/models", +"httpMethod": "GET", +"id": "ml.projects.models.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Specifies the subset of models to retrieve.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The number of models to retrieve per \"page\" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project whose models are to be listed.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/models", +"response": { +"$ref": "GoogleCloudMlV1__ListModelsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"patch": { +"description": "Updates a specific model resource. Currently the only supported fields to update are `description` and `default_version.name`.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}", +"httpMethod": "PATCH", +"id": "ml.projects.models.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project name.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the path, relative to `Model`, of the field to update. For example, to change the description of a model to \"foo\" and set its default version to \"version_1\", the `update_mask` parameter would be specified as `description`, `default_version.name`, and the `PATCH` request body would specify the new value, as follows: { \"description\": \"foo\", \"defaultVersion\": { \"name\":\"version_1\" } } Currently the supported update masks are `description` and `default_version.name`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudMlV1__Model" +}, +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}:setIamPolicy", +"httpMethod": "POST", +"id": "ml.projects.models.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1__SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1__Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}:testIamPermissions", +"httpMethod": "POST", +"id": "ml.projects.models.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1__TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1__TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"versions": { +"methods": { +"create": { +"description": "Creates a new version of a model from a trained TensorFlow model. If the version created in the cloud by this call is the first deployed version of the specified model, it will be made the default version of the model. When you add a version to a model that already has one or more versions, the default version does not automatically change. If you want a new version to be the default, you must call projects.models.versions.setDefault.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions", +"httpMethod": "POST", +"id": "ml.projects.models.versions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the model.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/versions", +"request": { +"$ref": "GoogleCloudMlV1__Version" +}, +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a model version. Each model can have multiple versions deployed and in use at any given time. Use this method to remove a single version. Note: You cannot delete the version that is set as the default version of the model unless it is the only remaining version.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", +"httpMethod": "DELETE", +"id": "ml.projects.models.versions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the version. You can get the names of all the versions of a model by calling projects.models.versions.list.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a model version. Models can have multiple versions. You can call projects.models.versions.list to get the same information that this method returns for all of the versions of a model.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", +"httpMethod": "GET", +"id": "ml.projects.models.versions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the version.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudMlV1__Version" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Gets basic information about all the versions of a model. If you expect that a model has many versions, or if you need to handle only a limited number of results at a time, you can request that the list be retrieved in batches (called pages). If there are no versions that match the request parameters, the list request returns an empty response body: {}.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions", +"httpMethod": "GET", +"id": "ml.projects.models.versions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Specifies the subset of versions to retrieve.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The number of versions to retrieve per \"page\" of results. If there are more remaining results than this number, the response message will contain a valid value in the `next_page_token` field. The default value is 20, and the maximum page size is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token to request the next page of results. You get the token from the `next_page_token` field of the response from the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the model for which to list the version.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/versions", +"response": { +"$ref": "GoogleCloudMlV1__ListVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"patch": { +"description": "Updates the specified Version resource. Currently the only update-able fields are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and `manualScaling.nodes`.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}", +"httpMethod": "PATCH", +"id": "ml.projects.models.versions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the path, relative to `Version`, of the field to update. Must be present and non-empty. For example, to change the description of a version to \"foo\", the `update_mask` parameter would be specified as `description`, and the `PATCH` request body would specify the new value, as follows: ``` { \"description\": \"foo\" } ``` Currently the only supported update mask fields are `description`, `requestLoggingConfig`, `autoScaling.minNodes`, and `manualScaling.nodes`. However, you can only update `manualScaling.nodes` if the version uses a [Compute Engine (N1) machine type](/ml-engine/docs/machine-types-online-prediction).", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudMlV1__Version" +}, +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setDefault": { +"description": "Designates a version to be the default for the model. The default version is used for prediction requests made against the model that don't specify a version. The first version to be created for a model is automatically set as the default. You must make any subsequent changes to the default version setting manually using this method.", +"flatPath": "v1/projects/{projectsId}/models/{modelsId}/versions/{versionsId}:setDefault", +"httpMethod": "POST", +"id": "ml.projects.models.versions.setDefault", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the version to make the default for the model. You can get the names of all the versions of a model by calling projects.models.versions.list.", +"location": "path", +"pattern": "^projects/[^/]+/models/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setDefault", +"request": { +"$ref": "GoogleCloudMlV1__SetDefaultVersionRequest" +}, +"response": { +"$ref": "GoogleCloudMlV1__Version" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "ml.projects.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "GoogleProtobuf__Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "ml.projects.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunning__Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/operations", +"httpMethod": "GET", +"id": "ml.projects.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunning__ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240311", +"rootUrl": "https://ml.googleapis.com/", +"schemas": { +"GoogleApi__HttpBody": { +"description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", +"id": "GoogleApi__HttpBody", +"properties": { +"contentType": { +"description": "The HTTP Content-Type header value specifying the content type of the body.", +"type": "string" +}, +"data": { +"description": "The HTTP request/response body as raw binary.", +"format": "byte", +"type": "string" +}, +"extensions": { +"description": "Application specific response metadata. Must be set in the first response for streaming APIs.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_AutomatedStoppingConfig_DecayCurveAutomatedStoppingConfig": { +"id": "GoogleCloudMlV1_AutomatedStoppingConfig_DecayCurveAutomatedStoppingConfig", +"properties": { +"useElapsedTime": { +"description": "If true, measurement.elapsed_time is used as the x-axis of each Trials Decay Curve. Otherwise, Measurement.steps will be used as the x-axis.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_AutomatedStoppingConfig_MedianAutomatedStoppingConfig": { +"description": "The median automated stopping rule stops a pending trial if the trial's best objective_value is strictly below the median 'performance' of all completed trials reported up to the trial's last measurement. Currently, 'performance' refers to the running average of the objective values reported by the trial in each measurement.", +"id": "GoogleCloudMlV1_AutomatedStoppingConfig_MedianAutomatedStoppingConfig", +"properties": { +"useElapsedTime": { +"description": "If true, the median automated stopping rule applies to measurement.use_elapsed_time, which means the elapsed_time field of the current trial's latest measurement is used to compute the median objective value for each completed trial.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric": { +"description": "An observed value of a metric.", +"id": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric", +"properties": { +"objectiveValue": { +"description": "The objective value at this training step.", +"format": "double", +"type": "number" +}, +"trainingStep": { +"description": "The global training step for this metric.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_Measurement_Metric": { +"description": "A message representing a metric in the measurement.", +"id": "GoogleCloudMlV1_Measurement_Metric", +"properties": { +"metric": { +"description": "Required. Metric name.", +"type": "string" +}, +"value": { +"description": "Required. The value for this metric.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfigParameterSpec_CategoricalValueSpec": { +"id": "GoogleCloudMlV1_StudyConfigParameterSpec_CategoricalValueSpec", +"properties": { +"values": { +"description": "Must be specified if type is `CATEGORICAL`. The list of possible categories.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfigParameterSpec_DiscreteValueSpec": { +"id": "GoogleCloudMlV1_StudyConfigParameterSpec_DiscreteValueSpec", +"properties": { +"values": { +"description": "Must be specified if type is `DISCRETE`. A list of feasible points. The list should be in strictly increasing order. For instance, this parameter might have possible settings of 1.5, 2.5, and 4.0. This list should not contain more than 1,000 values.", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfigParameterSpec_DoubleValueSpec": { +"id": "GoogleCloudMlV1_StudyConfigParameterSpec_DoubleValueSpec", +"properties": { +"maxValue": { +"description": "Must be specified if type is `DOUBLE`. Maximum value of the parameter.", +"format": "double", +"type": "number" +}, +"minValue": { +"description": "Must be specified if type is `DOUBLE`. Minimum value of the parameter.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfigParameterSpec_IntegerValueSpec": { +"id": "GoogleCloudMlV1_StudyConfigParameterSpec_IntegerValueSpec", +"properties": { +"maxValue": { +"description": "Must be specified if type is `INTEGER`. Maximum value of the parameter.", +"format": "int64", +"type": "string" +}, +"minValue": { +"description": "Must be specified if type is `INTEGER`. Minimum value of the parameter.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentCategoricalValueSpec": { +"description": "Represents the spec to match categorical values from parent parameter.", +"id": "GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentCategoricalValueSpec", +"properties": { +"values": { +"description": "Matches values of the parent parameter with type 'CATEGORICAL'. All values must exist in `categorical_value_spec` of parent parameter.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentDiscreteValueSpec": { +"description": "Represents the spec to match discrete values from parent parameter.", +"id": "GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentDiscreteValueSpec", +"properties": { +"values": { +"description": "Matches values of the parent parameter with type 'DISCRETE'. All values must exist in `discrete_value_spec` of parent parameter.", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentIntValueSpec": { +"description": "Represents the spec to match integer values from parent parameter.", +"id": "GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentIntValueSpec", +"properties": { +"values": { +"description": "Matches values of the parent parameter with type 'INTEGER'. All values must lie in `integer_value_spec` of parent parameter.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfig_MetricSpec": { +"description": "Represents a metric to optimize.", +"id": "GoogleCloudMlV1_StudyConfig_MetricSpec", +"properties": { +"goal": { +"description": "Required. The optimization goal of the metric.", +"enum": [ +"GOAL_TYPE_UNSPECIFIED", +"MAXIMIZE", +"MINIMIZE" +], +"enumDescriptions": [ +"Goal Type will default to maximize.", +"Maximize the goal metric.", +"Minimize the goal metric." +], +"type": "string" +}, +"metric": { +"description": "Required. The name of the metric.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_StudyConfig_ParameterSpec": { +"description": "Represents a single parameter to optimize.", +"id": "GoogleCloudMlV1_StudyConfig_ParameterSpec", +"properties": { +"categoricalValueSpec": { +"$ref": "GoogleCloudMlV1_StudyConfigParameterSpec_CategoricalValueSpec", +"description": "The value spec for a 'CATEGORICAL' parameter." +}, +"childParameterSpecs": { +"description": "A child node is active if the parameter's value matches the child node's matching_parent_values. If two items in child_parameter_specs have the same name, they must have disjoint matching_parent_values.", +"items": { +"$ref": "GoogleCloudMlV1_StudyConfig_ParameterSpec" +}, +"type": "array" +}, +"discreteValueSpec": { +"$ref": "GoogleCloudMlV1_StudyConfigParameterSpec_DiscreteValueSpec", +"description": "The value spec for a 'DISCRETE' parameter." +}, +"doubleValueSpec": { +"$ref": "GoogleCloudMlV1_StudyConfigParameterSpec_DoubleValueSpec", +"description": "The value spec for a 'DOUBLE' parameter." +}, +"integerValueSpec": { +"$ref": "GoogleCloudMlV1_StudyConfigParameterSpec_IntegerValueSpec", +"description": "The value spec for an 'INTEGER' parameter." +}, +"parameter": { +"description": "Required. The parameter name must be unique amongst all ParameterSpecs.", +"type": "string" +}, +"parentCategoricalValues": { +"$ref": "GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentCategoricalValueSpec" +}, +"parentDiscreteValues": { +"$ref": "GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentDiscreteValueSpec" +}, +"parentIntValues": { +"$ref": "GoogleCloudMlV1_StudyConfigParameterSpec_MatchingParentIntValueSpec" +}, +"scaleType": { +"description": "How the parameter should be scaled. Leave unset for categorical parameters.", +"enum": [ +"SCALE_TYPE_UNSPECIFIED", +"UNIT_LINEAR_SCALE", +"UNIT_LOG_SCALE", +"UNIT_REVERSE_LOG_SCALE" +], +"enumDescriptions": [ +"By default, no scaling is applied.", +"Scales the feasible space to (0, 1) linearly.", +"Scales the feasible space logarithmically to (0, 1). The entire feasible space must be strictly positive.", +"Scales the feasible space \"reverse\" logarithmically to (0, 1). The result is that values close to the top of the feasible space are spread out more than points near the bottom. The entire feasible space must be strictly positive." +], +"type": "string" +}, +"type": { +"description": "Required. The type of the parameter.", +"enum": [ +"PARAMETER_TYPE_UNSPECIFIED", +"DOUBLE", +"INTEGER", +"CATEGORICAL", +"DISCRETE" +], +"enumDescriptions": [ +"You must specify a valid type. Using this unspecified type will result in an error.", +"Type for real-valued parameters.", +"Type for integral parameters.", +"The parameter is categorical, with a value chosen from the categories field.", +"The parameter is real valued, with a fixed set of feasible points. If `type==DISCRETE`, feasible_points must be provided, and {`min_value`, `max_value`} will be ignored." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1_Trial_Parameter": { +"description": "A message representing a parameter to be tuned. Contains the name of the parameter and the suggested value to use for this trial.", +"id": "GoogleCloudMlV1_Trial_Parameter", +"properties": { +"floatValue": { +"description": "Must be set if ParameterType is DOUBLE or DISCRETE.", +"format": "double", +"type": "number" +}, +"intValue": { +"description": "Must be set if ParameterType is INTEGER", +"format": "int64", +"type": "string" +}, +"parameter": { +"description": "The name of the parameter.", +"type": "string" +}, +"stringValue": { +"description": "Must be set if ParameterTypeis CATEGORICAL", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__AcceleratorConfig": { +"description": "Represents a hardware accelerator request config. Note that the AcceleratorConfig can be used in both Jobs and Versions. Learn more about [accelerators for training](/ml-engine/docs/using-gpus) and [accelerators for online prediction](/ml-engine/docs/machine-types-online-prediction#gpus).", +"id": "GoogleCloudMlV1__AcceleratorConfig", +"properties": { +"count": { +"description": "The number of accelerators to attach to each machine running the job.", +"format": "int64", +"type": "string" +}, +"type": { +"description": "The type of accelerator to use.", +"enum": [ +"ACCELERATOR_TYPE_UNSPECIFIED", +"NVIDIA_TESLA_K80", +"NVIDIA_TESLA_P100", +"NVIDIA_TESLA_V100", +"NVIDIA_TESLA_P4", +"NVIDIA_TESLA_T4", +"NVIDIA_TESLA_A100", +"TPU_V2", +"TPU_V3", +"TPU_V2_POD", +"TPU_V3_POD", +"TPU_V4_POD" +], +"enumDescriptions": [ +"Unspecified accelerator type. Default to no GPU.", +"Nvidia Tesla K80 GPU.", +"Nvidia Tesla P100 GPU.", +"Nvidia V100 GPU.", +"Nvidia Tesla P4 GPU.", +"Nvidia T4 GPU.", +"Nvidia A100 GPU.", +"TPU v2.", +"TPU v3.", +"TPU v2 POD.", +"TPU v3 POD.", +"TPU v4 POD." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__AddTrialMeasurementRequest": { +"description": "The request message for the AddTrialMeasurement service method.", +"id": "GoogleCloudMlV1__AddTrialMeasurementRequest", +"properties": { +"measurement": { +"$ref": "GoogleCloudMlV1__Measurement", +"description": "Required. The measurement to be added to a trial." +} +}, +"type": "object" +}, +"GoogleCloudMlV1__AutoScaling": { +"description": "Options for automatically scaling a model.", +"id": "GoogleCloudMlV1__AutoScaling", +"properties": { +"maxNodes": { +"description": "The maximum number of nodes to scale this model under load. The actual value will depend on resource quota and availability.", +"format": "int32", +"type": "integer" +}, +"metrics": { +"description": "MetricSpec contains the specifications to use to calculate the desired nodes count.", +"items": { +"$ref": "GoogleCloudMlV1__MetricSpec" +}, +"type": "array" +}, +"minNodes": { +"description": "Optional. The minimum number of nodes to allocate for this model. These nodes are always up, starting from the time the model is deployed. Therefore, the cost of operating this model will be at least `rate` * `min_nodes` * number of hours since last billing cycle, where `rate` is the cost per node-hour as documented in the [pricing guide](/ml-engine/docs/pricing), even if no predictions are performed. There is additional cost for each prediction performed. Unlike manual scaling, if the load gets too heavy for the nodes that are up, the service will automatically add nodes to handle the increased load as well as scale back as traffic drops, always maintaining at least `min_nodes`. You will be charged for the time in which additional nodes are used. If `min_nodes` is not specified and AutoScaling is used with a [legacy (MLS1) machine type](/ml-engine/docs/machine-types-online-prediction), `min_nodes` defaults to 0, in which case, when traffic to a model stops (and after a cool-down period), nodes will be shut down and no charges will be incurred until traffic to the model resumes. If `min_nodes` is not specified and AutoScaling is used with a [Compute Engine (N1) machine type](/ml-engine/docs/machine-types-online-prediction), `min_nodes` defaults to 1. `min_nodes` must be at least 1 for use with a Compute Engine machine type. You can set `min_nodes` when creating the model version, and you can also update `min_nodes` for an existing version: update_body.json: { 'autoScaling': { 'minNodes': 5 } } HTTP request: PATCH https://ml.googleapis.com/v1/{name=projects/*/models/*/versions/*}?update_mask=autoScaling.minNodes -d @./update_body.json ", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__AutomatedStoppingConfig": { +"description": "Configuration for Automated Early Stopping of Trials. If no implementation_config is set, automated early stopping will not be run.", +"id": "GoogleCloudMlV1__AutomatedStoppingConfig", +"properties": { +"decayCurveStoppingConfig": { +"$ref": "GoogleCloudMlV1_AutomatedStoppingConfig_DecayCurveAutomatedStoppingConfig" +}, +"medianAutomatedStoppingConfig": { +"$ref": "GoogleCloudMlV1_AutomatedStoppingConfig_MedianAutomatedStoppingConfig" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__BuiltInAlgorithmOutput": { +"description": "Represents output related to a built-in algorithm Job.", +"id": "GoogleCloudMlV1__BuiltInAlgorithmOutput", +"properties": { +"framework": { +"description": "Framework on which the built-in algorithm was trained.", +"type": "string" +}, +"modelPath": { +"description": "The Cloud Storage path to the `model/` directory where the training job saves the trained model. Only set for successful jobs that don't use hyperparameter tuning.", +"type": "string" +}, +"pythonVersion": { +"description": "Python version on which the built-in algorithm was trained.", +"type": "string" +}, +"runtimeVersion": { +"description": "AI Platform runtime version on which the built-in algorithm was trained.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__CancelJobRequest": { +"description": "Request message for the CancelJob method.", +"id": "GoogleCloudMlV1__CancelJobRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudMlV1__Capability": { +"id": "GoogleCloudMlV1__Capability", +"properties": { +"availableAccelerators": { +"description": "Available accelerators for the capability.", +"items": { +"enum": [ +"ACCELERATOR_TYPE_UNSPECIFIED", +"NVIDIA_TESLA_K80", +"NVIDIA_TESLA_P100", +"NVIDIA_TESLA_V100", +"NVIDIA_TESLA_P4", +"NVIDIA_TESLA_T4", +"NVIDIA_TESLA_A100", +"TPU_V2", +"TPU_V3", +"TPU_V2_POD", +"TPU_V3_POD", +"TPU_V4_POD" +], +"enumDescriptions": [ +"Unspecified accelerator type. Default to no GPU.", +"Nvidia Tesla K80 GPU.", +"Nvidia Tesla P100 GPU.", +"Nvidia V100 GPU.", +"Nvidia Tesla P4 GPU.", +"Nvidia T4 GPU.", +"Nvidia A100 GPU.", +"TPU v2.", +"TPU v3.", +"TPU v2 POD.", +"TPU v3 POD.", +"TPU v4 POD." +], +"type": "string" +}, +"type": "array" +}, +"type": { +"enum": [ +"TYPE_UNSPECIFIED", +"TRAINING", +"BATCH_PREDICTION", +"ONLINE_PREDICTION" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata": { +"description": "This message will be placed in the metadata field of a google.longrunning.Operation associated with a CheckTrialEarlyStoppingState request.", +"id": "GoogleCloudMlV1__CheckTrialEarlyStoppingStateMetatdata", +"properties": { +"createTime": { +"description": "The time at which the operation was submitted.", +"format": "google-datetime", +"type": "string" +}, +"study": { +"description": "The name of the study that the trial belongs to.", +"type": "string" +}, +"trial": { +"description": "The trial name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest": { +"description": "The request message for the CheckTrialEarlyStoppingState service method.", +"id": "GoogleCloudMlV1__CheckTrialEarlyStoppingStateRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse": { +"description": "The message will be placed in the response field of a completed google.longrunning.Operation associated with a CheckTrialEarlyStoppingState request.", +"id": "GoogleCloudMlV1__CheckTrialEarlyStoppingStateResponse", +"properties": { +"endTime": { +"description": "The time at which operation processing completed.", +"format": "google-datetime", +"type": "string" +}, +"shouldStop": { +"description": "True if the Trial should stop.", +"type": "boolean" +}, +"startTime": { +"description": "The time at which the operation was started.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__CompleteTrialRequest": { +"description": "The request message for the CompleteTrial service method.", +"id": "GoogleCloudMlV1__CompleteTrialRequest", +"properties": { +"finalMeasurement": { +"$ref": "GoogleCloudMlV1__Measurement", +"description": "Optional. If provided, it will be used as the completed trial's final_measurement; Otherwise, the service will auto-select a previously reported measurement as the final-measurement" +}, +"infeasibleReason": { +"description": "Optional. A human readable reason why the trial was infeasible. This should only be provided if `trial_infeasible` is true.", +"type": "string" +}, +"trialInfeasible": { +"description": "Optional. True if the trial cannot be run with the given Parameter, and final_measurement will be ignored.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Config": { +"id": "GoogleCloudMlV1__Config", +"properties": { +"tpuServiceAccount": { +"description": "The service account Cloud ML uses to run on TPU node.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ContainerPort": { +"description": "Represents a network port in a single container. This message is a subset of the [Kubernetes ContainerPort v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#containerport-v1-core).", +"id": "GoogleCloudMlV1__ContainerPort", +"properties": { +"containerPort": { +"description": "Number of the port to expose on the container. This must be a valid port number: 0 < PORT_NUMBER < 65536.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ContainerSpec": { +"description": "Specification of a custom container for serving predictions. This message is a subset of the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).", +"id": "GoogleCloudMlV1__ContainerSpec", +"properties": { +"args": { +"description": "Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd). Specify this field as an array of executable and arguments, similar to a Docker `CMD`'s \"default parameters\" form. If you don't specify this field but do specify the command field, then the command from the `command` field runs without any additional arguments. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `commmand` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the [Docker documentation about how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by AI Platform Prediction](/ai-platform/prediction/docs/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `args` field of the [Kubernetes Containers v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).", +"items": { +"type": "string" +}, +"type": "array" +}, +"command": { +"description": "Immutable. Specifies the command that runs when the container starts. This overrides the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#entrypoint). Specify this field as an array of executable and arguments, similar to a Docker `ENTRYPOINT`'s \"exec\" form, not its \"shell\" form. If you do not specify this field, then the container's `ENTRYPOINT` runs, in conjunction with the args field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#cmd), if either exists. If this field is not specified and the container does not have an `ENTRYPOINT`, then refer to the [Docker documentation about how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). If you specify this field, then you can also specify the `args` field to provide additional arguments for this command. However, if you specify this field, then the container's `CMD` is ignored. See the [Kubernetes documentation about how the `command` and `args` fields interact with a container's `ENTRYPOINT` and `CMD`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by AI Platform Prediction](/ai-platform/prediction/docs/custom-container-requirements#aip-variables) and environment variables set in the env field. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $( VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME) This field corresponds to the `command` field of the [Kubernetes Containers v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).", +"items": { +"type": "string" +}, +"type": "array" +}, +"env": { +"description": "Immutable. List of environment variables to set in the container. After the container starts running, code running in the container can read these environment variables. Additionally, the command and args fields can reference these variables. Later entries in this list can also reference earlier entries. For example, the following example sets the variable `VAR_2` to have the value `foo bar`: ```json [ { \"name\": \"VAR_1\", \"value\": \"foo\" }, { \"name\": \"VAR_2\", \"value\": \"$(VAR_1) bar\" } ] ``` If you switch the order of the variables in the example, then the expansion does not occur. This field corresponds to the `env` field of the [Kubernetes Containers v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).", +"items": { +"$ref": "GoogleCloudMlV1__EnvVar" +}, +"type": "array" +}, +"image": { +"description": "URI of the Docker image to be used as the custom container for serving predictions. This URI must identify [an image in Artifact Registry](/artifact-registry/docs/overview) and begin with the hostname `{REGION}-docker.pkg.dev`, where `{REGION}` is replaced by the region that matches AI Platform Prediction [regional endpoint](/ai-platform/prediction/docs/regional-endpoints) that you are using. For example, if you are using the `us-central1-ml.googleapis.com` endpoint, then this URI must begin with `us-central1-docker.pkg.dev`. To use a custom container, the [AI Platform Google-managed service account](/ai-platform/prediction/docs/custom-service-account#default) must have permission to pull (read) the Docker image at this URI. The AI Platform Google-managed service account has the following format: `service-{PROJECT_NUMBER}@cloud-ml.google.com.iam.gserviceaccount.com` {PROJECT_NUMBER} is replaced by your Google Cloud project number. By default, this service account has necessary permissions to pull an Artifact Registry image in the same Google Cloud project where you are using AI Platform Prediction. In this case, no configuration is necessary. If you want to use an image from a different Google Cloud project, learn how to [grant the Artifact Registry Reader (roles/artifactregistry.reader) role for a repository](/artifact-registry/docs/access-control#grant-repo) to your projet's AI Platform Google-managed service account. To learn about the requirements for the Docker image itself, read [Custom container requirements](/ai-platform/prediction/docs/custom-container-requirements).", +"type": "string" +}, +"ports": { +"description": "Immutable. List of ports to expose from the container. AI Platform Prediction sends any prediction requests that it receives to the first port on this list. AI Platform Prediction also sends [liveness and health checks](/ai-platform/prediction/docs/custom-container-requirements#health) to this port. If you do not specify this field, it defaults to following value: ```json [ { \"containerPort\": 8080 } ] ``` AI Platform Prediction does not use ports other than the first one listed. This field corresponds to the `ports` field of the [Kubernetes Containers v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#container-v1-core).", +"items": { +"$ref": "GoogleCloudMlV1__ContainerPort" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__DiskConfig": { +"description": "Represents the config of disk options.", +"id": "GoogleCloudMlV1__DiskConfig", +"properties": { +"bootDiskSizeGb": { +"description": "Size in GB of the boot disk (default is 100GB).", +"format": "int32", +"type": "integer" +}, +"bootDiskType": { +"description": "Type of the boot disk (default is \"pd-ssd\"). Valid values: \"pd-ssd\" (Persistent Disk Solid State Drive) or \"pd-standard\" (Persistent Disk Hard Disk Drive).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__EncryptionConfig": { +"description": "Represents a custom encryption key configuration that can be applied to a resource.", +"id": "GoogleCloudMlV1__EncryptionConfig", +"properties": { +"kmsKeyName": { +"description": "The Cloud KMS resource identifier of the customer-managed encryption key used to protect a resource, such as a training job. It has the following format: `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__EnvVar": { +"description": "Represents an environment variable to be made available in a container. This message is a subset of the [Kubernetes EnvVar v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.18/#envvar-v1-core).", +"id": "GoogleCloudMlV1__EnvVar", +"properties": { +"name": { +"description": "Name of the environment variable. Must be a [valid C identifier](https://github.com/kubernetes/kubernetes/blob/v1.18.8/staging/src/k8s.io/apimachinery/pkg/util/validation/validation.go#L258) and must not begin with the prefix `AIP_`.", +"type": "string" +}, +"value": { +"description": "Value of the environment variable. Defaults to an empty string. In this field, you can reference [environment variables set by AI Platform Prediction](/ai-platform/prediction/docs/custom-container-requirements#aip-variables) and environment variables set earlier in the same env field as where this message occurs. You cannot reference environment variables set in the Docker image. In order for environment variables to be expanded, reference them by using the following syntax: $(VARIABLE_NAME) Note that this differs from Bash variable expansion, which does not use parentheses. If a variable cannot be resolved, the reference in the input string is used unchanged. To avoid variable expansion, you can escape this syntax with `$$`; for example: $$(VARIABLE_NAME)", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ExplainRequest": { +"description": "Request for explanations to be issued against a trained model.", +"id": "GoogleCloudMlV1__ExplainRequest", +"properties": { +"httpBody": { +"$ref": "GoogleApi__HttpBody", +"description": "Required. The explanation request body." +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ExplanationConfig": { +"description": "Message holding configuration options for explaining model predictions. There are three feature attribution methods supported for TensorFlow models: integrated gradients, sampled Shapley, and XRAI. [Learn more about feature attributions.](/ai-platform/prediction/docs/ai-explanations/overview)", +"id": "GoogleCloudMlV1__ExplanationConfig", +"properties": { +"integratedGradientsAttribution": { +"$ref": "GoogleCloudMlV1__IntegratedGradientsAttribution", +"description": "Attributes credit by computing the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365" +}, +"sampledShapleyAttribution": { +"$ref": "GoogleCloudMlV1__SampledShapleyAttribution", +"description": "An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features." +}, +"xraiAttribution": { +"$ref": "GoogleCloudMlV1__XraiAttribution", +"description": "Attributes credit by computing the XRAI taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Currently only implemented for models with natural image inputs." +} +}, +"type": "object" +}, +"GoogleCloudMlV1__GetConfigResponse": { +"description": "Returns service account information associated with a project.", +"id": "GoogleCloudMlV1__GetConfigResponse", +"properties": { +"config": { +"$ref": "GoogleCloudMlV1__Config" +}, +"serviceAccount": { +"description": "The service account Cloud ML uses to access resources in the project.", +"type": "string" +}, +"serviceAccountProject": { +"description": "The project number for `service_account`.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__HyperparameterOutput": { +"description": "Represents the result of a single hyperparameter tuning trial from a training job. The TrainingOutput object that is returned on successful completion of a training job with hyperparameter tuning includes a list of HyperparameterOutput objects, one for each successful trial.", +"id": "GoogleCloudMlV1__HyperparameterOutput", +"properties": { +"allMetrics": { +"description": "All recorded object metrics for this trial. This field is not currently populated.", +"items": { +"$ref": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric" +}, +"type": "array" +}, +"builtInAlgorithmOutput": { +"$ref": "GoogleCloudMlV1__BuiltInAlgorithmOutput", +"description": "Details related to built-in algorithms jobs. Only set for trials of built-in algorithms jobs that have succeeded." +}, +"endTime": { +"description": "Output only. End time for the trial.", +"format": "google-datetime", +"type": "string" +}, +"finalMetric": { +"$ref": "GoogleCloudMlV1_HyperparameterOutput_HyperparameterMetric", +"description": "The final objective metric seen for this trial." +}, +"hyperparameters": { +"additionalProperties": { +"type": "string" +}, +"description": "The hyperparameters given to this trial.", +"type": "object" +}, +"isTrialStoppedEarly": { +"description": "True if the trial is stopped early.", +"type": "boolean" +}, +"startTime": { +"description": "Output only. Start time for the trial.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The detailed state of the trial.", +"enum": [ +"STATE_UNSPECIFIED", +"QUEUED", +"PREPARING", +"RUNNING", +"SUCCEEDED", +"FAILED", +"CANCELLING", +"CANCELLED" +], +"enumDescriptions": [ +"The job state is unspecified.", +"The job has been just created and processing has not yet begun.", +"The service is preparing to run the job.", +"The job is in progress.", +"The job completed successfully.", +"The job failed. `error_message` should contain the details of the failure.", +"The job is being cancelled. `error_message` should describe the reason for the cancellation.", +"The job has been cancelled. `error_message` should describe the reason for the cancellation." +], +"type": "string" +}, +"trialId": { +"description": "The trial id for these results.", +"type": "string" +}, +"webAccessUris": { +"additionalProperties": { +"type": "string" +}, +"description": "URIs for accessing [interactive shells](https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell) (one URI for each training node). Only available if this trial is part of a hyperparameter tuning job and the job's training_input.enable_web_access is `true`. The keys are names of each node in the training job; for example, `master-replica-0` for the master node, `worker-replica-0` for the first worker, and `ps-replica-0` for the first parameter server. The values are the URIs for each node's interactive shell.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__HyperparameterSpec": { +"description": "Represents a set of hyperparameters to optimize.", +"id": "GoogleCloudMlV1__HyperparameterSpec", +"properties": { +"algorithm": { +"description": "Optional. The search algorithm specified for the hyperparameter tuning job. Uses the default AI Platform hyperparameter tuning algorithm if unspecified.", +"enum": [ +"ALGORITHM_UNSPECIFIED", +"GRID_SEARCH", +"RANDOM_SEARCH" +], +"enumDescriptions": [ +"The default algorithm used by the hyperparameter tuning service. This is a Bayesian optimization algorithm.", +"Simple grid search within the feasible space. To use grid search, all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.", +"Simple random search within the feasible space." +], +"type": "string" +}, +"enableTrialEarlyStopping": { +"description": "Optional. Indicates if the hyperparameter tuning job enables auto trial early stopping.", +"type": "boolean" +}, +"goal": { +"description": "Required. The type of goal to use for tuning. Available types are `MAXIMIZE` and `MINIMIZE`. Defaults to `MAXIMIZE`.", +"enum": [ +"GOAL_TYPE_UNSPECIFIED", +"MAXIMIZE", +"MINIMIZE" +], +"enumDescriptions": [ +"Goal Type will default to maximize.", +"Maximize the goal metric.", +"Minimize the goal metric." +], +"type": "string" +}, +"hyperparameterMetricTag": { +"description": "Optional. The TensorFlow summary tag name to use for optimizing trials. For current versions of TensorFlow, this tag name should exactly match what is shown in TensorBoard, including all scopes. For versions of TensorFlow prior to 0.12, this should be only the tag passed to tf.Summary. By default, \"training/hptuning/metric\" will be used.", +"type": "string" +}, +"maxFailedTrials": { +"description": "Optional. The number of failed trials that need to be seen before failing the hyperparameter tuning job. You can specify this field to override the default failing criteria for AI Platform hyperparameter tuning jobs. Defaults to zero, which means the service decides when a hyperparameter job should fail.", +"format": "int32", +"type": "integer" +}, +"maxParallelTrials": { +"description": "Optional. The number of training trials to run concurrently. You can reduce the time it takes to perform hyperparameter tuning by adding trials in parallel. However, each trail only benefits from the information gained in completed trials. That means that a trial does not get access to the results of trials running at the same time, which could reduce the quality of the overall optimization. Each trial will use the same scale tier and machine types. Defaults to one.", +"format": "int32", +"type": "integer" +}, +"maxTrials": { +"description": "Optional. How many training trials should be attempted to optimize the specified hyperparameters. Defaults to one.", +"format": "int32", +"type": "integer" +}, +"params": { +"description": "Required. The set of parameters to tune.", +"items": { +"$ref": "GoogleCloudMlV1__ParameterSpec" +}, +"type": "array" +}, +"resumePreviousJobId": { +"description": "Optional. The prior hyperparameter tuning job id that users hope to continue with. The job id will be used to find the corresponding vizier study guid and resume the study.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__IntegratedGradientsAttribution": { +"description": "Attributes credit by computing the Aumann-Shapley value taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1703.01365", +"id": "GoogleCloudMlV1__IntegratedGradientsAttribution", +"properties": { +"numIntegralSteps": { +"description": "Number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Job": { +"description": "Represents a training or prediction job.", +"id": "GoogleCloudMlV1__Job", +"properties": { +"createTime": { +"description": "Output only. When the job was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "Output only. When the job processing was completed.", +"format": "google-datetime", +"type": "string" +}, +"errorMessage": { +"description": "Output only. The details of a failure or a cancellation.", +"type": "string" +}, +"etag": { +"description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a job from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform job updates in order to avoid race conditions: An `etag` is returned in the response to `GetJob`, and systems are expected to put that etag in the request to `UpdateJob` to ensure that their change will be applied to the same version of the job.", +"format": "byte", +"type": "string" +}, +"jobId": { +"description": "Required. The user-specified id of the job.", +"type": "string" +}, +"jobPosition": { +"description": "Output only. It's only effect when the job is in QUEUED state. If it's positive, it indicates the job's position in the job scheduler. It's 0 when the job is already scheduled.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. One or more labels that you can add, to organize your jobs. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels.", +"type": "object" +}, +"predictionInput": { +"$ref": "GoogleCloudMlV1__PredictionInput", +"description": "Input parameters to create a prediction job." +}, +"predictionOutput": { +"$ref": "GoogleCloudMlV1__PredictionOutput", +"description": "The current prediction job result." +}, +"startTime": { +"description": "Output only. When the job processing was started.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The detailed state of a job.", +"enum": [ +"STATE_UNSPECIFIED", +"QUEUED", +"PREPARING", +"RUNNING", +"SUCCEEDED", +"FAILED", +"CANCELLING", +"CANCELLED" +], +"enumDescriptions": [ +"The job state is unspecified.", +"The job has been just created and processing has not yet begun.", +"The service is preparing to run the job.", +"The job is in progress.", +"The job completed successfully.", +"The job failed. `error_message` should contain the details of the failure.", +"The job is being cancelled. `error_message` should describe the reason for the cancellation.", +"The job has been cancelled. `error_message` should describe the reason for the cancellation." +], +"type": "string" +}, +"trainingInput": { +"$ref": "GoogleCloudMlV1__TrainingInput", +"description": "Input parameters to create a training job." +}, +"trainingOutput": { +"$ref": "GoogleCloudMlV1__TrainingOutput", +"description": "The current training job result." +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ListJobsResponse": { +"description": "Response message for the ListJobs method.", +"id": "GoogleCloudMlV1__ListJobsResponse", +"properties": { +"jobs": { +"description": "The list of jobs.", +"items": { +"$ref": "GoogleCloudMlV1__Job" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Optional. Pass this token as the `page_token` field of the request for a subsequent call.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ListLocationsResponse": { +"id": "GoogleCloudMlV1__ListLocationsResponse", +"properties": { +"locations": { +"description": "Locations where at least one type of CMLE capability is available.", +"items": { +"$ref": "GoogleCloudMlV1__Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Optional. Pass this token as the `page_token` field of the request for a subsequent call.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ListModelsResponse": { +"description": "Response message for the ListModels method.", +"id": "GoogleCloudMlV1__ListModelsResponse", +"properties": { +"models": { +"description": "The list of models.", +"items": { +"$ref": "GoogleCloudMlV1__Model" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Optional. Pass this token as the `page_token` field of the request for a subsequent call.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ListOptimalTrialsRequest": { +"description": "The request message for the ListTrials service method.", +"id": "GoogleCloudMlV1__ListOptimalTrialsRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudMlV1__ListOptimalTrialsResponse": { +"description": "The response message for the ListOptimalTrials method.", +"id": "GoogleCloudMlV1__ListOptimalTrialsResponse", +"properties": { +"trials": { +"description": "The pareto-optimal trials for multiple objective study or the optimal trial for single objective study. The definition of pareto-optimal can be checked in wiki page. https://en.wikipedia.org/wiki/Pareto_efficiency", +"items": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ListStudiesResponse": { +"id": "GoogleCloudMlV1__ListStudiesResponse", +"properties": { +"studies": { +"description": "The studies associated with the project.", +"items": { +"$ref": "GoogleCloudMlV1__Study" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ListTrialsResponse": { +"description": "The response message for the ListTrials method.", +"id": "GoogleCloudMlV1__ListTrialsResponse", +"properties": { +"trials": { +"description": "The trials associated with the study.", +"items": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ListVersionsResponse": { +"description": "Response message for the ListVersions method.", +"id": "GoogleCloudMlV1__ListVersionsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. Pass this token as the `page_token` field of the request for a subsequent call.", +"type": "string" +}, +"versions": { +"description": "The list of versions.", +"items": { +"$ref": "GoogleCloudMlV1__Version" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Location": { +"id": "GoogleCloudMlV1__Location", +"properties": { +"capabilities": { +"description": "Capabilities available in the location.", +"items": { +"$ref": "GoogleCloudMlV1__Capability" +}, +"type": "array" +}, +"name": { +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ManualScaling": { +"description": "Options for manually scaling a model.", +"id": "GoogleCloudMlV1__ManualScaling", +"properties": { +"nodes": { +"description": "The number of nodes to allocate for this model. These nodes are always up, starting from the time the model is deployed, so the cost of operating this model will be proportional to `nodes` * number of hours since last billing cycle plus the cost for each prediction performed.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Measurement": { +"description": "A message representing a measurement.", +"id": "GoogleCloudMlV1__Measurement", +"properties": { +"elapsedTime": { +"description": "Output only. Time that the trial has been running at the point of this measurement.", +"format": "google-duration", +"type": "string" +}, +"metrics": { +"description": "Provides a list of metrics that act as inputs into the objective function.", +"items": { +"$ref": "GoogleCloudMlV1_Measurement_Metric" +}, +"type": "array" +}, +"stepCount": { +"description": "The number of steps a machine learning model has been trained for. Must be non-negative.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__MetricSpec": { +"description": "MetricSpec contains the specifications to use to calculate the desired nodes count when autoscaling is enabled.", +"id": "GoogleCloudMlV1__MetricSpec", +"properties": { +"name": { +"description": "metric name.", +"enum": [ +"METRIC_NAME_UNSPECIFIED", +"CPU_USAGE", +"GPU_DUTY_CYCLE" +], +"enumDescriptions": [ +"Unspecified MetricName.", +"CPU usage.", +"GPU duty cycle." +], +"type": "string" +}, +"target": { +"description": "Target specifies the target value for the given metric; once real metric deviates from the threshold by a certain percentage, the node count changes.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Model": { +"description": "Represents a machine learning solution. A model can have multiple versions, each of which is a deployed, trained model ready to receive prediction requests. The model itself is just a container.", +"id": "GoogleCloudMlV1__Model", +"properties": { +"defaultVersion": { +"$ref": "GoogleCloudMlV1__Version", +"description": "Output only. The default version of the model. This version will be used to handle prediction requests that do not specify a version. You can change the default version by calling projects.models.versions.setDefault." +}, +"description": { +"description": "Optional. The description specified for the model when it was created.", +"type": "string" +}, +"etag": { +"description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a model from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform model updates in order to avoid race conditions: An `etag` is returned in the response to `GetModel`, and systems are expected to put that etag in the request to `UpdateModel` to ensure that their change will be applied to the model as intended.", +"format": "byte", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. One or more labels that you can add, to organize your models. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels. Note that this field is not updatable for mls1* models.", +"type": "object" +}, +"name": { +"description": "Required. The name specified for the model when it was created. The model name must be unique within the project it is created in.", +"type": "string" +}, +"onlinePredictionConsoleLogging": { +"description": "Optional. If true, online prediction nodes send `stderr` and `stdout` streams to Cloud Logging. These can be more verbose than the standard access logs (see `onlinePredictionLogging`) and can incur higher cost. However, they are helpful for debugging. Note that [logs may incur a cost](/stackdriver/pricing), especially if your project receives prediction requests at a high QPS. Estimate your costs before enabling this option. Default is false.", +"type": "boolean" +}, +"onlinePredictionLogging": { +"description": "Optional. If true, online prediction access logs are sent to Cloud Logging. These logs are like standard server access logs, containing information like timestamp and latency for each request. Note that [logs may incur a cost](/stackdriver/pricing), especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option. Default is false.", +"type": "boolean" +}, +"regions": { +"description": "Optional. The list of regions where the model is going to be deployed. Only one region per model is supported. Defaults to 'us-central1' if nothing is set. See the available regions for AI Platform services. Note: * No matter where a model is deployed, it can always be accessed by users from anywhere, both for online and batch prediction. * The region for a batch prediction job is set by the region field when submitting the batch prediction job and does not take its value from this field.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "GoogleCloudMlV1__OperationMetadata", +"properties": { +"createTime": { +"description": "The time the operation was submitted.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time operation processing completed.", +"format": "google-datetime", +"type": "string" +}, +"isCancellationRequested": { +"description": "Indicates whether a request to cancel this operation has been made.", +"type": "boolean" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The user labels, inherited from the model or the model version being operated on.", +"type": "object" +}, +"modelName": { +"description": "Contains the name of the model associated with the operation.", +"type": "string" +}, +"operationType": { +"description": "The operation type.", +"enum": [ +"OPERATION_TYPE_UNSPECIFIED", +"CREATE_VERSION", +"DELETE_VERSION", +"DELETE_MODEL", +"UPDATE_MODEL", +"UPDATE_VERSION", +"UPDATE_CONFIG" +], +"enumDescriptions": [ +"Unspecified operation type.", +"An operation to create a new version.", +"An operation to delete an existing version.", +"An operation to delete an existing model.", +"An operation to update an existing model.", +"An operation to update an existing version.", +"An operation to update project configuration." +], +"type": "string" +}, +"projectNumber": { +"description": "Contains the project number associated with the operation.", +"format": "int64", +"type": "string" +}, +"startTime": { +"description": "The time operation processing started.", +"format": "google-datetime", +"type": "string" +}, +"version": { +"$ref": "GoogleCloudMlV1__Version", +"description": "Contains the version associated with the operation." +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ParameterSpec": { +"description": "Represents a single hyperparameter to optimize.", +"id": "GoogleCloudMlV1__ParameterSpec", +"properties": { +"categoricalValues": { +"description": "Required if type is `CATEGORICAL`. The list of possible categories.", +"items": { +"type": "string" +}, +"type": "array" +}, +"discreteValues": { +"description": "Required if type is `DISCRETE`. A list of feasible points. The list should be in strictly increasing order. For instance, this parameter might have possible settings of 1.5, 2.5, and 4.0. This list should not contain more than 1,000 values.", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +}, +"maxValue": { +"description": "Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type is `CATEGORICAL`. This value should be integers if type is `INTEGER`.", +"format": "double", +"type": "number" +}, +"minValue": { +"description": "Required if type is `DOUBLE` or `INTEGER`. This field should be unset if type is `CATEGORICAL`. This value should be integers if type is INTEGER.", +"format": "double", +"type": "number" +}, +"parameterName": { +"description": "Required. The parameter name must be unique amongst all ParameterConfigs in a HyperparameterSpec message. E.g., \"learning_rate\".", +"type": "string" +}, +"scaleType": { +"description": "Optional. How the parameter should be scaled to the hypercube. Leave unset for categorical parameters. Some kind of scaling is strongly recommended for real or integral parameters (e.g., `UNIT_LINEAR_SCALE`).", +"enum": [ +"NONE", +"UNIT_LINEAR_SCALE", +"UNIT_LOG_SCALE", +"UNIT_REVERSE_LOG_SCALE" +], +"enumDescriptions": [ +"By default, no scaling is applied.", +"Scales the feasible space to (0, 1) linearly.", +"Scales the feasible space logarithmically to (0, 1). The entire feasible space must be strictly positive.", +"Scales the feasible space \"reverse\" logarithmically to (0, 1). The result is that values close to the top of the feasible space are spread out more than points near the bottom. The entire feasible space must be strictly positive." +], +"type": "string" +}, +"type": { +"description": "Required. The type of the parameter.", +"enum": [ +"PARAMETER_TYPE_UNSPECIFIED", +"DOUBLE", +"INTEGER", +"CATEGORICAL", +"DISCRETE" +], +"enumDescriptions": [ +"You must specify a valid type. Using this unspecified type will result in an error.", +"Type for real-valued parameters.", +"Type for integral parameters.", +"The parameter is categorical, with a value chosen from the categories field.", +"The parameter is real valued, with a fixed set of feasible points. If `type==DISCRETE`, feasible_points must be provided, and {`min_value`, `max_value`} will be ignored." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__PredictRequest": { +"description": "Request for predictions to be issued against a trained model.", +"id": "GoogleCloudMlV1__PredictRequest", +"properties": { +"httpBody": { +"$ref": "GoogleApi__HttpBody", +"description": " Required. The prediction request body. Refer to the [request body details section](#request-body-details) for more information on how to structure your request." +} +}, +"type": "object" +}, +"GoogleCloudMlV1__PredictionInput": { +"description": "Represents input parameters for a prediction job.", +"id": "GoogleCloudMlV1__PredictionInput", +"properties": { +"batchSize": { +"description": "Optional. Number of records per batch, defaults to 64. The service will buffer batch_size number of records in memory before invoking one Tensorflow prediction call internally. So take the record size and memory available into consideration when setting this parameter.", +"format": "int64", +"type": "string" +}, +"dataFormat": { +"description": "Required. The format of the input data files.", +"enum": [ +"DATA_FORMAT_UNSPECIFIED", +"JSON", +"TEXT", +"TF_RECORD", +"TF_RECORD_GZIP", +"CSV" +], +"enumDescriptions": [ +"Unspecified format.", +"Each line of the file is a JSON dictionary representing one record.", +"Deprecated. Use JSON instead.", +"The source file is a TFRecord file. Currently available only for input data.", +"The source file is a GZIP-compressed TFRecord file. Currently available only for input data.", +"Values are comma-separated rows, with keys in a separate file. Currently available only for output data." +], +"type": "string" +}, +"inputPaths": { +"description": "Required. The Cloud Storage location of the input data files. May contain wildcards.", +"items": { +"type": "string" +}, +"type": "array" +}, +"maxWorkerCount": { +"description": "Optional. The maximum number of workers to be used for parallel processing. Defaults to 10 if not specified.", +"format": "int64", +"type": "string" +}, +"modelName": { +"description": "Use this field if you want to use the default version for the specified model. The string must use the following format: `\"projects/YOUR_PROJECT/models/YOUR_MODEL\"`", +"type": "string" +}, +"outputDataFormat": { +"description": "Optional. Format of the output data files, defaults to JSON.", +"enum": [ +"DATA_FORMAT_UNSPECIFIED", +"JSON", +"TEXT", +"TF_RECORD", +"TF_RECORD_GZIP", +"CSV" +], +"enumDescriptions": [ +"Unspecified format.", +"Each line of the file is a JSON dictionary representing one record.", +"Deprecated. Use JSON instead.", +"The source file is a TFRecord file. Currently available only for input data.", +"The source file is a GZIP-compressed TFRecord file. Currently available only for input data.", +"Values are comma-separated rows, with keys in a separate file. Currently available only for output data." +], +"type": "string" +}, +"outputPath": { +"description": "Required. The output Google Cloud Storage location.", +"type": "string" +}, +"region": { +"description": "Required. The Google Compute Engine region to run the prediction job in. See the available regions for AI Platform services.", +"type": "string" +}, +"runtimeVersion": { +"description": "Optional. The AI Platform runtime version to use for this batch prediction. If not set, AI Platform will pick the runtime version used during the CreateVersion request for this model version, or choose the latest stable version when model version information is not available such as when the model is specified by uri.", +"type": "string" +}, +"signatureName": { +"description": "Optional. The name of the signature defined in the SavedModel to use for this job. Please refer to [SavedModel](https://tensorflow.github.io/serving/serving_basic.html) for information about how to use signatures. Defaults to [DEFAULT_SERVING_SIGNATURE_DEF_KEY](https://www.tensorflow.org/api_docs/python/tf/saved_model/signature_constants) , which is \"serving_default\".", +"type": "string" +}, +"uri": { +"description": "Use this field if you want to specify a Google Cloud Storage path for the model to use.", +"type": "string" +}, +"versionName": { +"description": "Use this field if you want to specify a version of the model to use. The string is formatted the same way as `model_version`, with the addition of the version information: `\"projects/YOUR_PROJECT/models/YOUR_MODEL/versions/YOUR_VERSION\"`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__PredictionOutput": { +"description": "Represents results of a prediction job.", +"id": "GoogleCloudMlV1__PredictionOutput", +"properties": { +"errorCount": { +"description": "The number of data instances which resulted in errors.", +"format": "int64", +"type": "string" +}, +"nodeHours": { +"description": "Node hours used by the batch prediction job.", +"format": "double", +"type": "number" +}, +"outputPath": { +"description": "The output Google Cloud Storage location provided at the job creation time.", +"type": "string" +}, +"predictionCount": { +"description": "The number of generated predictions.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__ReplicaConfig": { +"description": "Represents the configuration for a replica in a cluster.", +"id": "GoogleCloudMlV1__ReplicaConfig", +"properties": { +"acceleratorConfig": { +"$ref": "GoogleCloudMlV1__AcceleratorConfig", +"description": "Represents the type and number of accelerators used by the replica. [Learn about restrictions on accelerator configurations for training.](/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu)" +}, +"containerArgs": { +"description": "Arguments to the entrypoint command. The following rules apply for container_command and container_args: - If you do not supply command or args: The defaults defined in the Docker image are used. - If you supply a command but no args: The default EntryPoint and the default Cmd defined in the Docker image are ignored. Your command is run without any arguments. - If you supply only args: The default Entrypoint defined in the Docker image is run with the args that you supplied. - If you supply a command and args: The default Entrypoint and the default Cmd defined in the Docker image are ignored. Your command is run with your args. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.", +"items": { +"type": "string" +}, +"type": "array" +}, +"containerCommand": { +"description": "The command with which the replica's custom container is run. If provided, it will override default ENTRYPOINT of the docker image. If not provided, the docker image's ENTRYPOINT is used. It cannot be set if custom container image is not provided. Note that this field and [TrainingInput.args] are mutually exclusive, i.e., both cannot be set at the same time.", +"items": { +"type": "string" +}, +"type": "array" +}, +"diskConfig": { +"$ref": "GoogleCloudMlV1__DiskConfig", +"description": "Represents the configuration of disk options." +}, +"imageUri": { +"description": "The Docker image to run on the replica. This image must be in Container Registry. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers).", +"type": "string" +}, +"tpuTfVersion": { +"description": "The AI Platform runtime version that includes a TensorFlow version matching the one used in the custom container. This field is required if the replica is a TPU worker that uses a custom container. Otherwise, do not specify this field. This must be a [runtime version that currently supports training with TPUs](/ml-engine/docs/tensorflow/runtime-version-list#tpu-support). Note that the version of TensorFlow included in a runtime version may differ from the numbering of the runtime version itself, because it may have a different [patch version](https://www.tensorflow.org/guide/version_compat#semantic_versioning_20). In this field, you must specify the runtime version (TensorFlow minor version). For example, if your custom container runs TensorFlow `1.x.y`, specify `1.x`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__RequestLoggingConfig": { +"description": "Configuration for logging request-response pairs to a BigQuery table. Online prediction requests to a model version and the responses to these requests are converted to raw strings and saved to the specified BigQuery table. Logging is constrained by [BigQuery quotas and limits](/bigquery/quotas). If your project exceeds BigQuery quotas or limits, AI Platform Prediction does not log request-response pairs, but it continues to serve predictions. If you are using [continuous evaluation](/ml-engine/docs/continuous-evaluation/), you do not need to specify this configuration manually. Setting up continuous evaluation automatically enables logging of request-response pairs.", +"id": "GoogleCloudMlV1__RequestLoggingConfig", +"properties": { +"bigqueryTableName": { +"description": "Required. Fully qualified BigQuery table name in the following format: \" project_id.dataset_name.table_name\" The specified table must already exist, and the \"Cloud ML Service Agent\" for your project must have permission to write to it. The table must have the following [schema](/bigquery/docs/schemas): Field nameType Mode model STRING REQUIRED model_version STRING REQUIRED time TIMESTAMP REQUIRED raw_data STRING REQUIRED raw_prediction STRING NULLABLE groundtruth STRING NULLABLE ", +"type": "string" +}, +"samplingPercentage": { +"description": "Percentage of requests to be logged, expressed as a fraction from 0 to 1. For example, if you want to log 10% of requests, enter `0.1`. The sampling window is the lifetime of the model version. Defaults to 0.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__RouteMap": { +"description": "Specifies HTTP paths served by a custom container. AI Platform Prediction sends requests to these paths on the container; the custom container must run an HTTP server that responds to these requests with appropriate responses. Read [Custom container requirements](/ai-platform/prediction/docs/custom-container-requirements) for details on how to create your container image to meet these requirements.", +"id": "GoogleCloudMlV1__RouteMap", +"properties": { +"health": { +"description": "HTTP path on the container to send health checkss to. AI Platform Prediction intermittently sends GET requests to this path on the container's IP address and port to check that the container is healthy. Read more about [health checks](/ai-platform/prediction/docs/custom-container-requirements#checks). For example, if you set this field to `/bar`, then AI Platform Prediction intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of Version.container.ports. If you don't specify this field, it defaults to the following value: /v1/models/ MODEL/versions/VERSION The placeholders in this value are replaced as follows: * MODEL: The name of the parent Model. This does not include the \"projects/PROJECT_ID/models/\" prefix that the API returns in output; it is the bare model name, as provided to projects.models.create. * VERSION: The name of the model version. This does not include the \"projects/PROJECT_ID /models/MODEL/versions/\" prefix that the API returns in output; it is the bare version name, as provided to projects.models.versions.create.", +"type": "string" +}, +"predict": { +"description": "HTTP path on the container to send prediction requests to. AI Platform Prediction forwards requests sent using projects.predict to this path on the container's IP address and port. AI Platform Prediction then returns the container's response in the API response. For example, if you set this field to `/foo`, then when AI Platform Prediction receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of Version.container.ports. If you don't specify this field, it defaults to the following value: /v1/models/MODEL/versions/VERSION:predict The placeholders in this value are replaced as follows: * MODEL: The name of the parent Model. This does not include the \"projects/PROJECT_ID/models/\" prefix that the API returns in output; it is the bare model name, as provided to projects.models.create. * VERSION: The name of the model version. This does not include the \"projects/PROJECT_ID/models/MODEL/versions/\" prefix that the API returns in output; it is the bare version name, as provided to projects.models.versions.create.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__SampledShapleyAttribution": { +"description": "An attribution method that approximates Shapley values for features that contribute to the label being predicted. A sampling strategy is used to approximate the value rather than considering all subsets of features.", +"id": "GoogleCloudMlV1__SampledShapleyAttribution", +"properties": { +"numPaths": { +"description": "The number of feature permutations to consider when approximating the Shapley values.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Scheduling": { +"description": "All parameters related to scheduling of training jobs.", +"id": "GoogleCloudMlV1__Scheduling", +"properties": { +"maxRunningTime": { +"description": "Optional. The maximum job running time, expressed in seconds. The field can contain up to nine fractional digits, terminated by `s`. If not specified, this field defaults to `604800s` (seven days). If the training job is still running after this duration, AI Platform Training cancels it. The duration is measured from when the job enters the `RUNNING` state; therefore it does not overlap with the duration limited by Scheduling.max_wait_time. For example, if you want to ensure your job runs for no more than 2 hours, set this field to `7200s` (2 hours * 60 minutes / hour * 60 seconds / minute). If you submit your training job using the `gcloud` tool, you can [specify this field in a `config.yaml` file](/ai-platform/training/docs/training-jobs#formatting_your_configuration_parameters). For example: ```yaml trainingInput: scheduling: maxRunningTime: 7200s ```", +"format": "google-duration", +"type": "string" +}, +"maxWaitTime": { +"description": "Optional. The maximum job wait time, expressed in seconds. The field can contain up to nine fractional digits, terminated by `s`. If not specified, there is no limit to the wait time. The minimum for this field is `1800s` (30 minutes). If the training job has not entered the `RUNNING` state after this duration, AI Platform Training cancels it. After the job begins running, it can no longer be cancelled due to the maximum wait time. Therefore the duration limited by this field does not overlap with the duration limited by Scheduling.max_running_time. For example, if the job temporarily stops running and retries due to a [VM restart](/ai-platform/training/docs/overview#restarts), this cannot lead to a maximum wait time cancellation. However, independently of this constraint, AI Platform Training might stop a job if there are too many retries due to exhausted resources in a region. The following example describes how you might use this field: To cancel your job if it doesn't start running within 1 hour, set this field to `3600s` (1 hour * 60 minutes / hour * 60 seconds / minute). If the job is still in the `QUEUED` or `PREPARING` state after an hour of waiting, AI Platform Training cancels the job. If you submit your training job using the `gcloud` tool, you can [specify this field in a `config.yaml` file](/ai-platform/training/docs/training-jobs#formatting_your_configuration_parameters). For example: ```yaml trainingInput: scheduling: maxWaitTime: 3600s ```", +"format": "google-duration", +"type": "string" +}, +"priority": { +"description": "Optional. Job scheduling will be based on this priority, which in the range [0, 1000]. The bigger the number, the higher the priority. Default to 0 if not set. If there are multiple jobs requesting same type of accelerators, the high priority job will be scheduled prior to ones with low priority.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__SetDefaultVersionRequest": { +"description": "Request message for the SetDefaultVersion request.", +"id": "GoogleCloudMlV1__SetDefaultVersionRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudMlV1__StopTrialRequest": { +"id": "GoogleCloudMlV1__StopTrialRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudMlV1__Study": { +"description": "A message representing a Study.", +"id": "GoogleCloudMlV1__Study", +"properties": { +"createTime": { +"description": "Output only. Time at which the study was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"inactiveReason": { +"description": "Output only. A human readable reason why the Study is inactive. This should be empty if a study is ACTIVE or COMPLETED.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The name of a study.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The detailed state of a study.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE", +"COMPLETED" +], +"enumDescriptions": [ +"The study state is unspecified.", +"The study is active.", +"The study is stopped due to an internal error.", +"The study is done when the service exhausts the parameter search space or max_trial_count is reached." +], +"readOnly": true, +"type": "string" +}, +"studyConfig": { +"$ref": "GoogleCloudMlV1__StudyConfig", +"description": "Required. Configuration of the study." +} +}, +"type": "object" +}, +"GoogleCloudMlV1__StudyConfig": { +"description": "Represents configuration of a study.", +"id": "GoogleCloudMlV1__StudyConfig", +"properties": { +"algorithm": { +"description": "The search algorithm specified for the study.", +"enum": [ +"ALGORITHM_UNSPECIFIED", +"GAUSSIAN_PROCESS_BANDIT", +"GRID_SEARCH", +"RANDOM_SEARCH" +], +"enumDescriptions": [ +"The default algorithm used by the Cloud AI Platform Vizier service.", +"Gaussian Process Bandit.", +"Simple grid search within the feasible space. To use grid search, all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.", +"Simple random search within the feasible space." +], +"type": "string" +}, +"automatedStoppingConfig": { +"$ref": "GoogleCloudMlV1__AutomatedStoppingConfig", +"description": "Configuration for automated stopping of unpromising Trials." +}, +"metrics": { +"description": "Metric specs for the study.", +"items": { +"$ref": "GoogleCloudMlV1_StudyConfig_MetricSpec" +}, +"type": "array" +}, +"parameters": { +"description": "Required. The set of parameters to tune.", +"items": { +"$ref": "GoogleCloudMlV1_StudyConfig_ParameterSpec" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__SuggestTrialsMetadata": { +"description": "Metadata field of a google.longrunning.Operation associated with a SuggestTrialsRequest.", +"id": "GoogleCloudMlV1__SuggestTrialsMetadata", +"properties": { +"clientId": { +"description": "The identifier of the client that is requesting the suggestion.", +"type": "string" +}, +"createTime": { +"description": "The time operation was submitted.", +"format": "google-datetime", +"type": "string" +}, +"study": { +"description": "The name of the study that the trial belongs to.", +"type": "string" +}, +"suggestionCount": { +"description": "The number of suggestions requested.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__SuggestTrialsRequest": { +"description": "The request message for the SuggestTrial service method.", +"id": "GoogleCloudMlV1__SuggestTrialsRequest", +"properties": { +"clientId": { +"description": "Required. The identifier of the client that is requesting the suggestion. If multiple SuggestTrialsRequests have the same `client_id`, the service will return the identical suggested trial if the trial is pending, and provide a new trial if the last suggested trial was completed.", +"type": "string" +}, +"suggestionCount": { +"description": "Required. The number of suggestions requested.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__SuggestTrialsResponse": { +"description": "This message will be placed in the response field of a completed google.longrunning.Operation associated with a SuggestTrials request.", +"id": "GoogleCloudMlV1__SuggestTrialsResponse", +"properties": { +"endTime": { +"description": "The time at which operation processing completed.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The time at which the operation was started.", +"format": "google-datetime", +"type": "string" +}, +"studyState": { +"description": "The state of the study.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE", +"COMPLETED" +], +"enumDescriptions": [ +"The study state is unspecified.", +"The study is active.", +"The study is stopped due to an internal error.", +"The study is done when the service exhausts the parameter search space or max_trial_count is reached." +], +"type": "string" +}, +"trials": { +"description": "A list of trials.", +"items": { +"$ref": "GoogleCloudMlV1__Trial" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__TrainingInput": { +"description": "Represents input parameters for a training job. When using the gcloud command to submit your training job, you can specify the input parameters as command-line arguments and/or in a YAML configuration file referenced from the --config command-line argument. For details, see the guide to [submitting a training job](/ai-platform/training/docs/training-jobs).", +"id": "GoogleCloudMlV1__TrainingInput", +"properties": { +"args": { +"description": "Optional. Command-line arguments passed to the training application when it starts. If your job uses a custom container, then the arguments are passed to the container's `ENTRYPOINT` command.", +"items": { +"type": "string" +}, +"type": "array" +}, +"enableWebAccess": { +"description": "Optional. Whether you want AI Platform Training to enable [interactive shell access](https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell) to training containers. If set to `true`, you can access interactive shells at the URIs given by TrainingOutput.web_access_uris or HyperparameterOutput.web_access_uris (within TrainingOutput.trials).", +"type": "boolean" +}, +"encryptionConfig": { +"$ref": "GoogleCloudMlV1__EncryptionConfig", +"description": "Optional. Options for using customer-managed encryption keys (CMEK) to protect resources created by a training job, instead of using Google's default encryption. If this is set, then all resources created by the training job will be encrypted with the customer-managed encryption key that you specify. [Learn how and when to use CMEK with AI Platform Training](/ai-platform/training/docs/cmek)." +}, +"evaluatorConfig": { +"$ref": "GoogleCloudMlV1__ReplicaConfig", +"description": "Optional. The configuration for evaluators. You should only set `evaluatorConfig.acceleratorConfig` if `evaluatorType` is set to a Compute Engine machine type. [Learn about restrictions on accelerator configurations for training.](/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu) Set `evaluatorConfig.imageUri` only if you build a custom image for your evaluator. If `evaluatorConfig.imageUri` has not been set, AI Platform uses the value of `masterConfig.imageUri`. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers)." +}, +"evaluatorCount": { +"description": "Optional. The number of evaluator replicas to use for the training job. Each replica in the cluster will be of the type specified in `evaluator_type`. This value can only be used when `scale_tier` is set to `CUSTOM`. If you set this value, you must also set `evaluator_type`. The default value is zero.", +"format": "int64", +"type": "string" +}, +"evaluatorType": { +"description": "Optional. Specifies the type of virtual machine to use for your training job's evaluator nodes. The supported values are the same as those described in the entry for `masterType`. This value must be consistent with the category of machine type that `masterType` uses. In other words, both must be Compute Engine machine types or both must be legacy machine types. This value must be present when `scaleTier` is set to `CUSTOM` and `evaluatorCount` is greater than zero.", +"type": "string" +}, +"hyperparameters": { +"$ref": "GoogleCloudMlV1__HyperparameterSpec", +"description": "Optional. The set of Hyperparameters to tune." +}, +"jobDir": { +"description": "Optional. A Google Cloud Storage path in which to store training outputs and other data needed for training. This path is passed to your TensorFlow program as the '--job-dir' command-line argument. The benefit of specifying this field is that Cloud ML validates the path for use in training.", +"type": "string" +}, +"masterConfig": { +"$ref": "GoogleCloudMlV1__ReplicaConfig", +"description": "Optional. The configuration for your master worker. You should only set `masterConfig.acceleratorConfig` if `masterType` is set to a Compute Engine machine type. Learn about [restrictions on accelerator configurations for training.](/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu) Set `masterConfig.imageUri` only if you build a custom image. Only one of `masterConfig.imageUri` and `runtimeVersion` should be set. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers)." +}, +"masterType": { +"description": "Optional. Specifies the type of virtual machine to use for your training job's master worker. You must specify this field when `scaleTier` is set to `CUSTOM`. You can use certain Compute Engine machine types directly in this field. See the [list of compatible Compute Engine machine types](/ai-platform/training/docs/machine-types#compute-engine-machine-types). Alternatively, you can use the certain legacy machine types in this field. See the [list of legacy machine types](/ai-platform/training/docs/machine-types#legacy-machine-types). Finally, if you want to use a TPU for training, specify `cloud_tpu` in this field. Learn more about the [special configuration options for training with TPUs](/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).", +"type": "string" +}, +"network": { +"description": "Optional. The full name of the [Compute Engine network](/vpc/docs/vpc) to which the Job is peered. For example, `projects/12345/global/networks/myVPC`. The format of this field is `projects/{project}/global/networks/{network}`, where {project} is a project number (like `12345`) and {network} is network name. Private services access must already be configured for the network. If left unspecified, the Job is not peered with any network. [Learn about using VPC Network Peering.](/ai-platform/training/docs/vpc-peering).", +"type": "string" +}, +"packageUris": { +"description": "Required. The Google Cloud Storage location of the packages with the training program and any additional dependencies. The maximum number of package URIs is 100.", +"items": { +"type": "string" +}, +"type": "array" +}, +"parameterServerConfig": { +"$ref": "GoogleCloudMlV1__ReplicaConfig", +"description": "Optional. The configuration for parameter servers. You should only set `parameterServerConfig.acceleratorConfig` if `parameterServerType` is set to a Compute Engine machine type. [Learn about restrictions on accelerator configurations for training.](/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu) Set `parameterServerConfig.imageUri` only if you build a custom image for your parameter server. If `parameterServerConfig.imageUri` has not been set, AI Platform uses the value of `masterConfig.imageUri`. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers)." +}, +"parameterServerCount": { +"description": "Optional. The number of parameter server replicas to use for the training job. Each replica in the cluster will be of the type specified in `parameter_server_type`. This value can only be used when `scale_tier` is set to `CUSTOM`. If you set this value, you must also set `parameter_server_type`. The default value is zero.", +"format": "int64", +"type": "string" +}, +"parameterServerType": { +"description": "Optional. Specifies the type of virtual machine to use for your training job's parameter server. The supported values are the same as those described in the entry for `master_type`. This value must be consistent with the category of machine type that `masterType` uses. In other words, both must be Compute Engine machine types or both must be legacy machine types. This value must be present when `scaleTier` is set to `CUSTOM` and `parameter_server_count` is greater than zero.", +"type": "string" +}, +"pythonModule": { +"description": "Required. The Python module name to run after installing the packages.", +"type": "string" +}, +"pythonVersion": { +"description": "Optional. The version of Python used in training. You must either specify this field or specify `masterConfig.imageUri`. The following Python versions are available: * Python '3.7' is available when `runtime_version` is set to '1.15' or later. * Python '3.5' is available when `runtime_version` is set to a version from '1.4' to '1.14'. * Python '2.7' is available when `runtime_version` is set to '1.15' or earlier. Read more about the Python versions available for [each runtime version](/ml-engine/docs/runtime-version-list).", +"type": "string" +}, +"region": { +"description": "Required. The region to run the training job in. See the [available regions](/ai-platform/training/docs/regions) for AI Platform Training.", +"type": "string" +}, +"runtimeVersion": { +"description": "Optional. The AI Platform runtime version to use for training. You must either specify this field or specify `masterConfig.imageUri`. For more information, see the [runtime version list](/ai-platform/training/docs/runtime-version-list) and learn [how to manage runtime versions](/ai-platform/training/docs/versioning).", +"type": "string" +}, +"scaleTier": { +"description": "Required. Specifies the machine types, the number of replicas for workers and parameter servers.", +"enum": [ +"BASIC", +"STANDARD_1", +"PREMIUM_1", +"BASIC_GPU", +"BASIC_TPU", +"CUSTOM" +], +"enumDescriptions": [ +"A single worker instance. This tier is suitable for learning how to use Cloud ML, and for experimenting with new models using small datasets.", +"Many workers and a few parameter servers.", +"A large number of workers with many parameter servers.", +"A single worker instance [with a GPU](/ai-platform/training/docs/using-gpus).", +"A single worker instance with a [Cloud TPU](/ml-engine/docs/tensorflow/using-tpus).", +"The CUSTOM tier is not a set tier, but rather enables you to use your own cluster specification. When you use this tier, set values to configure your processing cluster according to these guidelines: * You _must_ set `TrainingInput.masterType` to specify the type of machine to use for your master node. This is the only required setting. * You _may_ set `TrainingInput.workerCount` to specify the number of workers to use. If you specify one or more workers, you _must_ also set `TrainingInput.workerType` to specify the type of machine to use for your worker nodes. * You _may_ set `TrainingInput.parameterServerCount` to specify the number of parameter servers to use. If you specify one or more parameter servers, you _must_ also set `TrainingInput.parameterServerType` to specify the type of machine to use for your parameter servers. Note that all of your workers must use the same machine type, which can be different from your parameter server type and master type. Your parameter servers must likewise use the same machine type, which can be different from your worker type and master type." +], +"type": "string" +}, +"scheduling": { +"$ref": "GoogleCloudMlV1__Scheduling", +"description": "Optional. Scheduling options for a training job." +}, +"serviceAccount": { +"description": "Optional. The email address of a service account to use when running the training appplication. You must have the `iam.serviceAccounts.actAs` permission for the specified service account. In addition, the AI Platform Training Google-managed service account must have the `roles/iam.serviceAccountAdmin` role for the specified service account. [Learn more about configuring a service account.](/ai-platform/training/docs/custom-service-account) If not specified, the AI Platform Training Google-managed service account is used by default.", +"type": "string" +}, +"useChiefInTfConfig": { +"description": "Optional. Use `chief` instead of `master` in the `TF_CONFIG` environment variable when training with a custom container. Defaults to `false`. [Learn more about this field.](/ai-platform/training/docs/distributed-training-details#chief-versus-master) This field has no effect for training jobs that don't use a custom container.", +"type": "boolean" +}, +"workerConfig": { +"$ref": "GoogleCloudMlV1__ReplicaConfig", +"description": "Optional. The configuration for workers. You should only set `workerConfig.acceleratorConfig` if `workerType` is set to a Compute Engine machine type. [Learn about restrictions on accelerator configurations for training.](/ai-platform/training/docs/using-gpus#compute-engine-machine-types-with-gpu) Set `workerConfig.imageUri` only if you build a custom image for your worker. If `workerConfig.imageUri` has not been set, AI Platform uses the value of `masterConfig.imageUri`. Learn more about [configuring custom containers](/ai-platform/training/docs/distributed-training-containers)." +}, +"workerCount": { +"description": "Optional. The number of worker replicas to use for the training job. Each replica in the cluster will be of the type specified in `worker_type`. This value can only be used when `scale_tier` is set to `CUSTOM`. If you set this value, you must also set `worker_type`. The default value is zero.", +"format": "int64", +"type": "string" +}, +"workerType": { +"description": "Optional. Specifies the type of virtual machine to use for your training job's worker nodes. The supported values are the same as those described in the entry for `masterType`. This value must be consistent with the category of machine type that `masterType` uses. In other words, both must be Compute Engine machine types or both must be legacy machine types. If you use `cloud_tpu` for this value, see special instructions for [configuring a custom TPU machine](/ml-engine/docs/tensorflow/using-tpus#configuring_a_custom_tpu_machine). This value must be present when `scaleTier` is set to `CUSTOM` and `workerCount` is greater than zero.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__TrainingOutput": { +"description": "Represents results of a training job. Output only.", +"id": "GoogleCloudMlV1__TrainingOutput", +"properties": { +"builtInAlgorithmOutput": { +"$ref": "GoogleCloudMlV1__BuiltInAlgorithmOutput", +"description": "Details related to built-in algorithms jobs. Only set for built-in algorithms jobs." +}, +"completedTrialCount": { +"description": "The number of hyperparameter tuning trials that completed successfully. Only set for hyperparameter tuning jobs.", +"format": "int64", +"type": "string" +}, +"consumedMLUnits": { +"description": "The amount of ML units consumed by the job.", +"format": "double", +"type": "number" +}, +"hyperparameterMetricTag": { +"description": "The TensorFlow summary tag name used for optimizing hyperparameter tuning trials. See [`HyperparameterSpec.hyperparameterMetricTag`](#HyperparameterSpec.FIELDS.hyperparameter_metric_tag) for more information. Only set for hyperparameter tuning jobs.", +"type": "string" +}, +"isBuiltInAlgorithmJob": { +"description": "Whether this job is a built-in Algorithm job.", +"type": "boolean" +}, +"isHyperparameterTuningJob": { +"description": "Whether this job is a hyperparameter tuning job.", +"type": "boolean" +}, +"trials": { +"description": "Results for individual Hyperparameter trials. Only set for hyperparameter tuning jobs.", +"items": { +"$ref": "GoogleCloudMlV1__HyperparameterOutput" +}, +"type": "array" +}, +"webAccessUris": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. URIs for accessing [interactive shells](https://cloud.google.com/ai-platform/training/docs/monitor-debug-interactive-shell) (one URI for each training node). Only available if training_input.enable_web_access is `true`. The keys are names of each node in the training job; for example, `master-replica-0` for the master node, `worker-replica-0` for the first worker, and `ps-replica-0` for the first parameter server. The values are the URIs for each node's interactive shell.", +"readOnly": true, +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Trial": { +"description": "A message representing a trial.", +"id": "GoogleCloudMlV1__Trial", +"properties": { +"clientId": { +"description": "Output only. The identifier of the client that originally requested this trial.", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Time at which the trial's status changed to COMPLETED.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"finalMeasurement": { +"$ref": "GoogleCloudMlV1__Measurement", +"description": "The final measurement containing the objective value." +}, +"infeasibleReason": { +"description": "Output only. A human readable string describing why the trial is infeasible. This should only be set if trial_infeasible is true.", +"readOnly": true, +"type": "string" +}, +"measurements": { +"description": "A list of measurements that are strictly lexicographically ordered by their induced tuples (steps, elapsed_time). These are used for early stopping computations.", +"items": { +"$ref": "GoogleCloudMlV1__Measurement" +}, +"type": "array" +}, +"name": { +"description": "Output only. Name of the trial assigned by the service.", +"readOnly": true, +"type": "string" +}, +"parameters": { +"description": "The parameters of the trial.", +"items": { +"$ref": "GoogleCloudMlV1_Trial_Parameter" +}, +"type": "array" +}, +"startTime": { +"description": "Output only. Time at which the trial was started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "The detailed state of a trial.", +"enum": [ +"STATE_UNSPECIFIED", +"REQUESTED", +"ACTIVE", +"COMPLETED", +"STOPPING" +], +"enumDescriptions": [ +"The trial state is unspecified.", +"Indicates that a specific trial has been requested, but it has not yet been suggested by the service.", +"Indicates that the trial has been suggested.", +"Indicates that the trial is done, and either has a final_measurement set, or is marked as trial_infeasible.", +"Indicates that the trial should stop according to the service." +], +"type": "string" +}, +"trialInfeasible": { +"description": "Output only. If true, the parameters in this trial are not attempted again.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__Version": { +"description": "Represents a version of the model. Each version is a trained model deployed in the cloud, ready to handle prediction requests. A model can have multiple versions. You can get information about all of the versions of a given model by calling projects.models.versions.list.", +"id": "GoogleCloudMlV1__Version", +"properties": { +"acceleratorConfig": { +"$ref": "GoogleCloudMlV1__AcceleratorConfig", +"description": "Optional. Accelerator config for using GPUs for online prediction (beta). Only specify this field if you have specified a Compute Engine (N1) machine type in the `machineType` field. Learn more about [using GPUs for online prediction](/ml-engine/docs/machine-types-online-prediction#gpus)." +}, +"autoScaling": { +"$ref": "GoogleCloudMlV1__AutoScaling", +"description": "Automatically scale the number of nodes used to serve the model in response to increases and decreases in traffic. Care should be taken to ramp up traffic according to the model's ability to scale or you will start seeing increases in latency and 429 response codes." +}, +"container": { +"$ref": "GoogleCloudMlV1__ContainerSpec", +"description": "Optional. Specifies a custom container to use for serving predictions. If you specify this field, then `machineType` is required. If you specify this field, then `deploymentUri` is optional. If you specify this field, then you must not specify `runtimeVersion`, `packageUris`, `framework`, `pythonVersion`, or `predictionClass`." +}, +"createTime": { +"description": "Output only. The time the version was created.", +"format": "google-datetime", +"type": "string" +}, +"deploymentUri": { +"description": "The Cloud Storage URI of a directory containing trained model artifacts to be used to create the model version. See the [guide to deploying models](/ai-platform/prediction/docs/deploying-models) for more information. The total number of files under this directory must not exceed 1000. During projects.models.versions.create, AI Platform Prediction copies all files from the specified directory to a location managed by the service. From then on, AI Platform Prediction uses these copies of the model artifacts to serve predictions, not the original files in Cloud Storage, so this location is useful only as a historical record. If you specify container, then this field is optional. Otherwise, it is required. Learn [how to use this field with a custom container](/ai-platform/prediction/docs/custom-container-requirements#artifacts).", +"type": "string" +}, +"description": { +"description": "Optional. The description specified for the version when it was created.", +"type": "string" +}, +"errorMessage": { +"description": "Output only. The details of a failure or a cancellation.", +"type": "string" +}, +"etag": { +"description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a model from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform model updates in order to avoid race conditions: An `etag` is returned in the response to `GetVersion`, and systems are expected to put that etag in the request to `UpdateVersion` to ensure that their change will be applied to the model as intended.", +"format": "byte", +"type": "string" +}, +"explanationConfig": { +"$ref": "GoogleCloudMlV1__ExplanationConfig", +"description": "Optional. Configures explainability features on the model's version. Some explanation features require additional metadata to be loaded as part of the model payload." +}, +"framework": { +"description": "Optional. The machine learning framework AI Platform uses to train this version of the model. Valid values are `TENSORFLOW`, `SCIKIT_LEARN`, `XGBOOST`. If you do not specify a framework, AI Platform will analyze files in the deployment_uri to determine a framework. If you choose `SCIKIT_LEARN` or `XGBOOST`, you must also set the runtime version of the model to 1.4 or greater. Do **not** specify a framework if you're deploying a [custom prediction routine](/ai-platform/prediction/docs/custom-prediction-routines) or if you're using a [custom container](/ai-platform/prediction/docs/use-custom-container).", +"enum": [ +"FRAMEWORK_UNSPECIFIED", +"TENSORFLOW", +"SCIKIT_LEARN", +"XGBOOST" +], +"enumDescriptions": [ +"Unspecified framework. Assigns a value based on the file suffix.", +"Tensorflow framework.", +"Scikit-learn framework.", +"XGBoost framework." +], +"type": "string" +}, +"isDefault": { +"description": "Output only. If true, this version will be used to handle prediction requests that do not specify a version. You can change the default version by calling projects.methods.versions.setDefault.", +"type": "boolean" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. One or more labels that you can add, to organize your model versions. Each label is a key-value pair, where both the key and the value are arbitrary strings that you supply. For more information, see the documentation on using labels. Note that this field is not updatable for mls1* models.", +"type": "object" +}, +"lastMigrationModelId": { +"description": "Output only. The [AI Platform (Unified) `Model`](https://cloud.google.com/ai-platform-unified/docs/reference/rest/v1beta1/projects.locations.models) ID for the last [model migration](https://cloud.google.com/ai-platform-unified/docs/start/migrating-to-ai-platform-unified).", +"readOnly": true, +"type": "string" +}, +"lastMigrationTime": { +"description": "Output only. The last time this version was successfully [migrated to AI Platform (Unified)](https://cloud.google.com/ai-platform-unified/docs/start/migrating-to-ai-platform-unified).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"lastUseTime": { +"description": "Output only. The time the version was last used for prediction.", +"format": "google-datetime", +"type": "string" +}, +"machineType": { +"description": "Optional. The type of machine on which to serve the model. Currently only applies to online prediction service. To learn about valid values for this field, read [Choosing a machine type for online prediction](/ai-platform/prediction/docs/machine-types-online-prediction). If this field is not specified and you are using a [regional endpoint](/ai-platform/prediction/docs/regional-endpoints), then the machine type defaults to `n1-standard-2`. If this field is not specified and you are using the global endpoint (`ml.googleapis.com`), then the machine type defaults to `mls1-c1-m2`.", +"type": "string" +}, +"manualScaling": { +"$ref": "GoogleCloudMlV1__ManualScaling", +"description": "Manually select the number of nodes to use for serving the model. You should generally use `auto_scaling` with an appropriate `min_nodes` instead, but this option is available if you want more predictable billing. Beware that latency and error rates will increase if the traffic exceeds that capability of the system to serve it based on the selected number of nodes." +}, +"name": { +"description": "Required. The name specified for the version when it was created. The version name must be unique within the model it is created in.", +"type": "string" +}, +"packageUris": { +"description": "Optional. Cloud Storage paths (`gs://\u2026`) of packages for [custom prediction routines](/ml-engine/docs/tensorflow/custom-prediction-routines) or [scikit-learn pipelines with custom code](/ml-engine/docs/scikit/exporting-for-prediction#custom-pipeline-code). For a custom prediction routine, one of these packages must contain your Predictor class (see [`predictionClass`](#Version.FIELDS.prediction_class)). Additionally, include any dependencies used by your Predictor or scikit-learn pipeline uses that are not already included in your selected [runtime version](/ml-engine/docs/tensorflow/runtime-version-list). If you specify this field, you must also set [`runtimeVersion`](#Version.FIELDS.runtime_version) to 1.4 or greater.", +"items": { +"type": "string" +}, +"type": "array" +}, +"predictionClass": { +"description": "Optional. The fully qualified name (module_name.class_name) of a class that implements the Predictor interface described in this reference field. The module containing this class should be included in a package provided to the [`packageUris` field](#Version.FIELDS.package_uris). Specify this field if and only if you are deploying a [custom prediction routine (beta)](/ml-engine/docs/tensorflow/custom-prediction-routines). If you specify this field, you must set [`runtimeVersion`](#Version.FIELDS.runtime_version) to 1.4 or greater and you must set `machineType` to a [legacy (MLS1) machine type](/ml-engine/docs/machine-types-online-prediction). The following code sample provides the Predictor interface: class Predictor(object): \"\"\"Interface for constructing custom predictors.\"\"\" def predict(self, instances, **kwargs): \"\"\"Performs custom prediction. Instances are the decoded values from the request. They have already been deserialized from JSON. Args: instances: A list of prediction input instances. **kwargs: A dictionary of keyword args provided as additional fields on the predict request body. Returns: A list of outputs containing the prediction results. This list must be JSON serializable. \"\"\" raise NotImplementedError() @classmethod def from_path(cls, model_dir): \"\"\"Creates an instance of Predictor using the given path. Loading of the predictor should be done in this method. Args: model_dir: The local directory that contains the exported model file along with any additional files uploaded when creating the version resource. Returns: An instance implementing this Predictor class. \"\"\" raise NotImplementedError() Learn more about [the Predictor interface and custom prediction routines](/ml-engine/docs/tensorflow/custom-prediction-routines).", +"type": "string" +}, +"pythonVersion": { +"description": "Required. The version of Python used in prediction. The following Python versions are available: * Python '3.7' is available when `runtime_version` is set to '1.15' or later. * Python '3.5' is available when `runtime_version` is set to a version from '1.4' to '1.14'. * Python '2.7' is available when `runtime_version` is set to '1.15' or earlier. Read more about the Python versions available for [each runtime version](/ml-engine/docs/runtime-version-list).", +"type": "string" +}, +"requestLoggingConfig": { +"$ref": "GoogleCloudMlV1__RequestLoggingConfig", +"description": "Optional. *Only* specify this field in a projects.models.versions.patch request. Specifying it in a projects.models.versions.create request has no effect. Configures the request-response pair logging on predictions from this Version." +}, +"routes": { +"$ref": "GoogleCloudMlV1__RouteMap", +"description": "Optional. Specifies paths on a custom container's HTTP server where AI Platform Prediction sends certain requests. If you specify this field, then you must also specify the `container` field. If you specify the `container` field and do not specify this field, it defaults to the following: ```json { \"predict\": \"/v1/models/MODEL/versions/VERSION:predict\", \"health\": \"/v1/models/MODEL/versions/VERSION\" } ``` See RouteMap for more details about these default values." +}, +"runtimeVersion": { +"description": "Required. The AI Platform runtime version to use for this deployment. For more information, see the [runtime version list](/ml-engine/docs/runtime-version-list) and [how to manage runtime versions](/ml-engine/docs/versioning).", +"type": "string" +}, +"serviceAccount": { +"description": "Optional. Specifies the service account for resource access control. If you specify this field, then you must also specify either the `containerSpec` or the `predictionClass` field. Learn more about [using a custom service account](/ai-platform/prediction/docs/custom-service-account).", +"type": "string" +}, +"state": { +"description": "Output only. The state of a version.", +"enum": [ +"UNKNOWN", +"READY", +"CREATING", +"FAILED", +"DELETING", +"UPDATING" +], +"enumDescriptions": [ +"The version state is unspecified.", +"The version is ready for prediction.", +"The version is being created. New UpdateVersion and DeleteVersion requests will fail if a version is in the CREATING state.", +"The version failed to be created, possibly cancelled. `error_message` should contain the details of the failure.", +"The version is being deleted. New UpdateVersion and DeleteVersion requests will fail if a version is in the DELETING state.", +"The version is being updated. New UpdateVersion and DeleteVersion requests will fail if a version is in the UPDATING state." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudMlV1__XraiAttribution": { +"description": "Attributes credit by computing the XRAI taking advantage of the model's fully differentiable structure. Refer to this paper for more details: https://arxiv.org/abs/1906.02825 Currently only implemented for models with natural image inputs.", +"id": "GoogleCloudMlV1__XraiAttribution", +"properties": { +"numIntegralSteps": { +"description": "Number of steps for approximating the path integral. A good value to start is 50 and gradually increase until the sum to diff property is met within the desired error range.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleIamV1__AuditConfig": { +"description": "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.", +"id": "GoogleIamV1__AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1__AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1__AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1__AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1__Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1__Binding", +"properties": { +"condition": { +"$ref": "GoogleType__Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1__Policy": { +"description": "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/).", +"id": "GoogleIamV1__Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1__AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1__Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleIamV1__SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "GoogleIamV1__SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "GoogleIamV1__Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1__TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "GoogleIamV1__TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIamV1__TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "GoogleIamV1__TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunning__ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunning__ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunning__Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunning__Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunning__Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpc__Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleProtobuf__Empty": { +"description": "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); }", +"id": "GoogleProtobuf__Empty", +"properties": {}, +"type": "object" +}, +"GoogleRpc__Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpc__Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleType__Expr": { +"description": "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.", +"id": "GoogleType__Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "AI Platform Training & Prediction API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/monitoring.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/monitoring.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..208996a941e8a6a95f78a8224f1c1e995b278a34 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/monitoring.v1.json @@ -0,0 +1,2759 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/monitoring": { +"description": "View and write monitoring data for all of your Google and third-party Cloud and API projects" +}, +"https://www.googleapis.com/auth/monitoring.read": { +"description": "View monitoring data for all of your Google Cloud and third-party projects" +}, +"https://www.googleapis.com/auth/monitoring.write": { +"description": "Publish metric data to your Google Cloud projects" +} +} +} +}, +"basePath": "", +"baseUrl": "https://monitoring.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Monitoring", +"description": "Manages your Cloud Monitoring data and configurations.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/monitoring/api/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "monitoring:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://monitoring.mtls.googleapis.com/", +"name": "monitoring", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"locations": { +"resources": { +"global": { +"resources": { +"metricsScopes": { +"methods": { +"get": { +"description": "Returns a specific Metrics Scope, including the list of projects monitored by the specified Metrics Scope.", +"flatPath": "v1/locations/global/metricsScopes/{metricsScopesId}", +"httpMethod": "GET", +"id": "monitoring.locations.global.metricsScopes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Metrics Scope. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}", +"location": "path", +"pattern": "^locations/global/metricsScopes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "MetricsScope" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"listMetricsScopesByMonitoredProject": { +"description": "Returns a list of every Metrics Scope that a specific MonitoredProject has been added to. The metrics scope representing the specified monitored project will always be the first entry in the response.", +"flatPath": "v1/locations/global/metricsScopes:listMetricsScopesByMonitoredProject", +"httpMethod": "GET", +"id": "monitoring.locations.global.metricsScopes.listMetricsScopesByMonitoredProject", +"parameterOrder": [], +"parameters": { +"monitoredResourceContainer": { +"description": "Required. The resource name of the Monitored Project being requested. Example: projects/{MONITORED_PROJECT_ID_OR_NUMBER}", +"location": "query", +"type": "string" +} +}, +"path": "v1/locations/global/metricsScopes:listMetricsScopesByMonitoredProject", +"response": { +"$ref": "ListMetricsScopesByMonitoredProjectResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +}, +"resources": { +"projects": { +"methods": { +"create": { +"description": "Adds a MonitoredProject with the given project ID to the specified Metrics Scope.", +"flatPath": "v1/locations/global/metricsScopes/{metricsScopesId}/projects", +"httpMethod": "POST", +"id": "monitoring.locations.global.metricsScopes.projects.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the existing Metrics Scope that will monitor this project. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}", +"location": "path", +"pattern": "^locations/global/metricsScopes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/projects", +"request": { +"$ref": "MonitoredProject" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"delete": { +"description": "Deletes a MonitoredProject from the specified Metrics Scope.", +"flatPath": "v1/locations/global/metricsScopes/{metricsScopesId}/projects/{projectsId}", +"httpMethod": "DELETE", +"id": "monitoring.locations.global.metricsScopes.projects.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the MonitoredProject. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}Authorization requires the following Google IAM (https://cloud.google.com/iam) permissions on both the Metrics Scope and on the MonitoredProject: monitoring.metricsScopes.link", +"location": "path", +"pattern": "^locations/global/metricsScopes/[^/]+/projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +} +} +} +} +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "monitoring.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +}, +"projects": { +"resources": { +"dashboards": { +"methods": { +"create": { +"description": "Creates a new custom dashboard. For examples on how you can use this API to create dashboards, see Managing dashboards by API (https://cloud.google.com/monitoring/dashboards/api-dashboard). This method requires the monitoring.dashboards.create permission on the specified project. For more information about permissions, see Cloud Identity and Access Management (https://cloud.google.com/iam).", +"flatPath": "v1/projects/{projectsId}/dashboards", +"httpMethod": "POST", +"id": "monitoring.projects.dashboards.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] The [PROJECT_ID_OR_NUMBER] must match the dashboard resource name.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "If set, validate the request and preview the review, but do not actually save it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/dashboards", +"request": { +"$ref": "Dashboard" +}, +"response": { +"$ref": "Dashboard" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"delete": { +"description": "Deletes an existing custom dashboard.This method requires the monitoring.dashboards.delete permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", +"flatPath": "v1/projects/{projectsId}/dashboards/{dashboardsId}", +"httpMethod": "DELETE", +"id": "monitoring.projects.dashboards.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Dashboard. The format is: projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/dashboards/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"get": { +"description": "Fetches a specific dashboard.This method requires the monitoring.dashboards.get permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", +"flatPath": "v1/projects/{projectsId}/dashboards/{dashboardsId}", +"httpMethod": "GET", +"id": "monitoring.projects.dashboards.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Dashboard. The format is one of: dashboards/[DASHBOARD_ID] (for system dashboards) projects/[PROJECT_ID_OR_NUMBER]/dashboards/[DASHBOARD_ID] (for custom dashboards).", +"location": "path", +"pattern": "^projects/[^/]+/dashboards/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Dashboard" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "Lists the existing dashboards.This method requires the monitoring.dashboards.list permission on the specified project. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", +"flatPath": "v1/projects/{projectsId}/dashboards", +"httpMethod": "GET", +"id": "monitoring.projects.dashboards.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "A positive number that is the maximum number of results to return. If unspecified, a default of 1000 is used.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The scope of the dashboards to list. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/dashboards", +"response": { +"$ref": "ListDashboardsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"patch": { +"description": "Replaces an existing custom dashboard with a new definition.This method requires the monitoring.dashboards.update permission on the specified dashboard. For more information, see Cloud Identity and Access Management (https://cloud.google.com/iam).", +"flatPath": "v1/projects/{projectsId}/dashboards/{dashboardsId}", +"httpMethod": "PATCH", +"id": "monitoring.projects.dashboards.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Identifier. The resource name of the dashboard.", +"location": "path", +"pattern": "^projects/[^/]+/dashboards/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "If set, validate the request and preview the review, but do not actually save it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Dashboard" +}, +"response": { +"$ref": "Dashboard" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +} +} +}, +"location": { +"resources": { +"prometheus": { +"resources": { +"api": { +"resources": { +"v1": { +"methods": { +"labels": { +"description": "Lists labels for metrics.", +"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/labels", +"httpMethod": "POST", +"id": "monitoring.projects.location.prometheus.api.v1.labels", +"parameterOrder": [ +"name", +"location" +], +"parameters": { +"location": { +"description": "Location of the resource information. Has to be \"global\" now.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/location/{location}/prometheus/api/v1/labels", +"request": { +"$ref": "QueryLabelsRequest" +}, +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"query": { +"description": "Evaluate a PromQL query at a single point in time.", +"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/query", +"httpMethod": "POST", +"id": "monitoring.projects.location.prometheus.api.v1.query", +"parameterOrder": [ +"name", +"location" +], +"parameters": { +"location": { +"description": "Location of the resource information. Has to be \"global\" now.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "The project on which to execute the request. Data associcated with the project's workspace stored under the The format is: projects/PROJECT_ID_OR_NUMBER. Open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/location/{location}/prometheus/api/v1/query", +"request": { +"$ref": "QueryInstantRequest" +}, +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"query_exemplars": { +"description": "Lists exemplars relevant to a given PromQL query,", +"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/query_exemplars", +"httpMethod": "POST", +"id": "monitoring.projects.location.prometheus.api.v1.query_exemplars", +"parameterOrder": [ +"name", +"location" +], +"parameters": { +"location": { +"description": "Location of the resource information. Has to be \"global\" now.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "The project on which to execute the request. Data associcated with the project's workspace stored under the The format is: projects/PROJECT_ID_OR_NUMBER. Open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/location/{location}/prometheus/api/v1/query_exemplars", +"request": { +"$ref": "QueryExemplarsRequest" +}, +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"query_range": { +"description": "Evaluate a PromQL query with start, end time range.", +"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/query_range", +"httpMethod": "POST", +"id": "monitoring.projects.location.prometheus.api.v1.query_range", +"parameterOrder": [ +"name", +"location" +], +"parameters": { +"location": { +"description": "Location of the resource information. Has to be \"global\" now.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "The project on which to execute the request. Data associcated with the project's workspace stored under the The format is: projects/PROJECT_ID_OR_NUMBER. Open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/location/{location}/prometheus/api/v1/query_range", +"request": { +"$ref": "QueryRangeRequest" +}, +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"series": { +"description": "Lists metadata for metrics.", +"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/series", +"httpMethod": "POST", +"id": "monitoring.projects.location.prometheus.api.v1.series", +"parameterOrder": [ +"name", +"location" +], +"parameters": { +"location": { +"description": "Location of the resource information. Has to be \"global\" for now.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "Required. The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/location/{location}/prometheus/api/v1/series", +"request": { +"$ref": "QuerySeriesRequest" +}, +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +}, +"resources": { +"label": { +"methods": { +"values": { +"description": "Lists possible values for a given label name.", +"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/label/{label}/values", +"httpMethod": "GET", +"id": "monitoring.projects.location.prometheus.api.v1.label.values", +"parameterOrder": [ +"name", +"location", +"label" +], +"parameters": { +"end": { +"description": "The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"location": "query", +"type": "string" +}, +"label": { +"description": "The label name for which values are queried.", +"location": "path", +"required": true, +"type": "string" +}, +"location": { +"description": "Location of the resource information. Has to be \"global\" now.", +"location": "path", +"required": true, +"type": "string" +}, +"match": { +"description": "A list of matchers encoded in the Prometheus label matcher format to constrain the values to series that satisfy them.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"start": { +"description": "The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/location/{location}/prometheus/api/v1/label/{label}/values", +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +}, +"metadata": { +"methods": { +"list": { +"description": "Lists metadata for metrics.", +"flatPath": "v1/projects/{projectsId}/location/{location}/prometheus/api/v1/metadata", +"httpMethod": "GET", +"id": "monitoring.projects.location.prometheus.api.v1.metadata.list", +"parameterOrder": [ +"name", +"location" +], +"parameters": { +"limit": { +"description": "Maximum number of metrics to return.", +"format": "int64", +"location": "query", +"type": "string" +}, +"location": { +"description": "Location of the resource information. Has to be \"global\" for now.", +"location": "path", +"required": true, +"type": "string" +}, +"metric": { +"description": "The metric name for which to query metadata. If unset, all metric metadata is returned.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus instances of Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/location/{location}/prometheus/api/v1/metadata", +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +} +} +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://monitoring.googleapis.com/", +"schemas": { +"Aggregation": { +"description": "Describes how to combine multiple time series to provide a different view of the data. Aggregation of time series is done in two steps. First, each time series in the set is aligned to the same time interval boundaries, then the set of time series is optionally reduced in number.Alignment consists of applying the per_series_aligner operation to each time series after its data has been divided into regular alignment_period time intervals. This process takes all of the data points in an alignment period, applies a mathematical transformation such as averaging, minimum, maximum, delta, etc., and converts them into a single data point per period.Reduction is when the aligned and transformed time series can optionally be combined, reducing the number of time series through similar mathematical transformations. Reduction involves applying a cross_series_reducer to all the time series, optionally sorting the time series into subsets with group_by_fields, and applying the reducer to each subset.The raw time series data can contain a huge amount of information from multiple sources. Alignment and reduction transforms this mass of data into a more manageable and representative collection of data, for example \"the 95% latency across the average of all tasks in a cluster\". This representative data can be more easily graphed and comprehended, and the individual time series data is still available for later drilldown. For more details, see Filtering and aggregation (https://cloud.google.com/monitoring/api/v3/aggregation).", +"id": "Aggregation", +"properties": { +"alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 2 years, or 104 weeks.", +"format": "google-duration", +"type": "string" +}, +"crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"type": "string" +}, +"groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"items": { +"type": "string" +}, +"type": "array" +}, +"perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"type": "string" +} +}, +"type": "object" +}, +"AggregationFunction": { +"description": "Preview: An identifier for an aggregation function. Aggregation functions are SQL functions that group or transform data from multiple points to a single point. This is a preview feature and may be subject to change before final release.", +"id": "AggregationFunction", +"properties": { +"parameters": { +"description": "Optional. Parameters applied to the aggregation function. Only used for functions that require them.", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"type": { +"description": "Required. The type of aggregation function, must be one of the following: \"none\" - no function. \"percentile\" - APPROX_QUANTILES() - 1 parameter numeric value \"average\" - AVG() \"count\" - COUNT() \"count-distinct\" - COUNT(DISTINCT) \"count-distinct-approx\" - APPROX_COUNT_DISTINCT() \"max\" - MAX() \"min\" - MIN() \"sum\" - SUM()", +"type": "string" +} +}, +"type": "object" +}, +"AlertChart": { +"description": "A chart that displays alert policy data.", +"id": "AlertChart", +"properties": { +"name": { +"description": "Required. The resource name of the alert policy. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] ", +"type": "string" +} +}, +"type": "object" +}, +"Axis": { +"description": "A chart axis.", +"id": "Axis", +"properties": { +"label": { +"description": "The label of the axis.", +"type": "string" +}, +"scale": { +"description": "The axis scale. By default, a linear scale is used.", +"enum": [ +"SCALE_UNSPECIFIED", +"LINEAR", +"LOG10" +], +"enumDescriptions": [ +"Scale is unspecified. The view will default to LINEAR.", +"Linear scale.", +"Logarithmic scale (base 10)." +], +"type": "string" +} +}, +"type": "object" +}, +"Breakdown": { +"description": "Preview: A breakdown is an aggregation applied to the measures over a specified column. A breakdown can result in multiple series across a category for the provided measure. This is a preview feature and may be subject to change before final release.", +"id": "Breakdown", +"properties": { +"aggregationFunction": { +"$ref": "AggregationFunction", +"description": "Required. The Aggregation function is applied across all data in each breakdown created." +}, +"column": { +"description": "Required. The name of the column in the dataset containing the breakdown values.", +"type": "string" +}, +"limit": { +"description": "Required. A limit to the number of breakdowns. If set to zero then all possible breakdowns are applied. The list of breakdowns is dependent on the value of the sort_order field.", +"format": "int32", +"type": "integer" +}, +"sortOrder": { +"description": "Required. The sort order is applied to the values of the breakdown column.", +"enum": [ +"SORT_ORDER_UNSPECIFIED", +"SORT_ORDER_NONE", +"SORT_ORDER_ASCENDING", +"SORT_ORDER_DESCENDING" +], +"enumDescriptions": [ +"An unspecified sort order. This option is invalid when sorting is required.", +"No sorting is applied.", +"The lowest-valued entries are selected first.", +"The highest-valued entries are selected first." +], +"type": "string" +} +}, +"type": "object" +}, +"ChartOptions": { +"description": "Options to control visual rendering of a chart.", +"id": "ChartOptions", +"properties": { +"displayHorizontal": { +"description": "Preview: Configures whether the charted values are shown on the horizontal or vertical axis. By default, values are represented the vertical axis. This is a preview feature and may be subject to change before final release.", +"type": "boolean" +}, +"mode": { +"description": "The chart mode.", +"enum": [ +"MODE_UNSPECIFIED", +"COLOR", +"X_RAY", +"STATS" +], +"enumDescriptions": [ +"Mode is unspecified. The view will default to COLOR.", +"The chart distinguishes data series using different color. Line colors may get reused when there are many lines in the chart.", +"The chart uses the Stackdriver x-ray mode, in which each data set is plotted using the same semi-transparent color.", +"The chart displays statistics such as average, median, 95th percentile, and more." +], +"type": "string" +} +}, +"type": "object" +}, +"CollapsibleGroup": { +"description": "A widget that groups the other widgets. All widgets that are within the area spanned by the grouping widget are considered member widgets.", +"id": "CollapsibleGroup", +"properties": { +"collapsed": { +"description": "The collapsed state of the widget on first page load.", +"type": "boolean" +} +}, +"type": "object" +}, +"Column": { +"description": "Defines the layout properties and content for a column.", +"id": "Column", +"properties": { +"weight": { +"description": "The relative weight of this column. The column weight is used to adjust the width of columns on the screen (relative to peers). Greater the weight, greater the width of the column on the screen. If omitted, a value of 1 is used while rendering.", +"format": "int64", +"type": "string" +}, +"widgets": { +"description": "The display widgets arranged vertically in this column.", +"items": { +"$ref": "Widget" +}, +"type": "array" +} +}, +"type": "object" +}, +"ColumnLayout": { +"description": "A simplified layout that divides the available space into vertical columns and arranges a set of widgets vertically in each column.", +"id": "ColumnLayout", +"properties": { +"columns": { +"description": "The columns of content to display.", +"items": { +"$ref": "Column" +}, +"type": "array" +} +}, +"type": "object" +}, +"ColumnSettings": { +"description": "The persistent settings for a table's columns.", +"id": "ColumnSettings", +"properties": { +"column": { +"description": "Required. The id of the column.", +"type": "string" +}, +"visible": { +"description": "Required. Whether the column should be visible on page load.", +"type": "boolean" +} +}, +"type": "object" +}, +"Dashboard": { +"description": "A Google Stackdriver dashboard. Dashboards define the content and layout of pages in the Stackdriver web application.", +"id": "Dashboard", +"properties": { +"columnLayout": { +"$ref": "ColumnLayout", +"description": "The content is divided into equally spaced columns and the widgets are arranged vertically." +}, +"dashboardFilters": { +"description": "Filters to reduce the amount of data charted based on the filter criteria.", +"items": { +"$ref": "DashboardFilter" +}, +"type": "array" +}, +"displayName": { +"description": "Required. The mutable, human-readable name.", +"type": "string" +}, +"etag": { +"description": "etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. An etag is returned in the response to GetDashboard, and users are expected to put that etag in the request to UpdateDashboard to ensure that their change will be applied to the same version of the Dashboard configuration. The field should not be passed during dashboard creation.", +"type": "string" +}, +"gridLayout": { +"$ref": "GridLayout", +"description": "Content is arranged with a basic layout that re-flows a simple list of informational elements like widgets or tiles." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels applied to the dashboard", +"type": "object" +}, +"mosaicLayout": { +"$ref": "MosaicLayout", +"description": "The content is arranged as a grid of tiles, with each content widget occupying one or more grid blocks." +}, +"name": { +"description": "Identifier. The resource name of the dashboard.", +"type": "string" +}, +"rowLayout": { +"$ref": "RowLayout", +"description": "The content is divided into equally spaced rows and the widgets are arranged horizontally." +} +}, +"type": "object" +}, +"DashboardFilter": { +"description": "A filter to reduce the amount of data charted in relevant widgets.", +"id": "DashboardFilter", +"properties": { +"filterType": { +"description": "The specified filter type", +"enum": [ +"FILTER_TYPE_UNSPECIFIED", +"RESOURCE_LABEL", +"METRIC_LABEL", +"USER_METADATA_LABEL", +"SYSTEM_METADATA_LABEL", +"GROUP" +], +"enumDescriptions": [ +"Filter type is unspecified. This is not valid in a well-formed request.", +"Filter on a resource label value", +"Filter on a metrics label value", +"Filter on a user metadata label value", +"Filter on a system metadata label value", +"Filter on a group id" +], +"type": "string" +}, +"labelKey": { +"description": "Required. The key for the label", +"type": "string" +}, +"stringValue": { +"description": "A variable-length string value.", +"type": "string" +}, +"templateVariable": { +"description": "The placeholder text that can be referenced in a filter string or MQL query. If omitted, the dashboard filter will be applied to all relevant widgets in the dashboard.", +"type": "string" +} +}, +"type": "object" +}, +"DataSet": { +"description": "Groups a time series query definition with charting options.", +"id": "DataSet", +"properties": { +"breakdowns": { +"description": "Optional. The collection of breakdowns to be applied to the dataset.", +"items": { +"$ref": "Breakdown" +}, +"type": "array" +}, +"dimensions": { +"description": "Optional. A collection of dimension columns.", +"items": { +"$ref": "Dimension" +}, +"type": "array" +}, +"legendTemplate": { +"description": "A template string for naming TimeSeries in the resulting data set. This should be a string with interpolations of the form ${label_name}, which will resolve to the label's value.", +"type": "string" +}, +"measures": { +"description": "Optional. A collection of measures.", +"items": { +"$ref": "Measure" +}, +"type": "array" +}, +"minAlignmentPeriod": { +"description": "Optional. The lower bound on data point frequency for this data set, implemented by specifying the minimum alignment period to use in a time series query For example, if the data is published once every 10 minutes, the min_alignment_period should be at least 10 minutes. It would not make sense to fetch and align data at one minute intervals.", +"format": "google-duration", +"type": "string" +}, +"plotType": { +"description": "How this data should be plotted on the chart.", +"enum": [ +"PLOT_TYPE_UNSPECIFIED", +"LINE", +"STACKED_AREA", +"STACKED_BAR", +"HEATMAP" +], +"enumDescriptions": [ +"Plot type is unspecified. The view will default to LINE.", +"The data is plotted as a set of lines (one line per series).", +"The data is plotted as a set of filled areas (one area per series), with the areas stacked vertically (the base of each area is the top of its predecessor, and the base of the first area is the x-axis). Since the areas do not overlap, each is filled with a different opaque color.", +"The data is plotted as a set of rectangular boxes (one box per series), with the boxes stacked vertically (the base of each box is the top of its predecessor, and the base of the first box is the x-axis). Since the boxes do not overlap, each is filled with a different opaque color.", +"The data is plotted as a heatmap. The series being plotted must have a DISTRIBUTION value type. The value of each bucket in the distribution is displayed as a color. This type is not currently available in the Stackdriver Monitoring application." +], +"type": "string" +}, +"targetAxis": { +"description": "Optional. The target axis to use for plotting the metric.", +"enum": [ +"TARGET_AXIS_UNSPECIFIED", +"Y1", +"Y2" +], +"enumDescriptions": [ +"The target axis was not specified. Defaults to Y1.", +"The y_axis (the right axis of chart).", +"The y2_axis (the left axis of chart)." +], +"type": "string" +}, +"timeSeriesQuery": { +"$ref": "TimeSeriesQuery", +"description": "Required. Fields for querying time series data from the Stackdriver metrics API." +} +}, +"type": "object" +}, +"Dimension": { +"description": "A chart dimension. Dimensions are a structured label, class, or category for a set of measurements in your data.", +"id": "Dimension", +"properties": { +"column": { +"description": "Required. The name of the column in the source SQL query that is used to chart the dimension.", +"type": "string" +}, +"columnType": { +"description": "Optional. The type of the dimension column. This is relevant only if one of the bin_size fields is set. If it is empty, the type TIMESTAMP or INT64 will be assumed based on which bin_size field is set. If populated, this should be set to one of the following types: DATE, TIME, DATETIME, TIMESTAMP, BIGNUMERIC, INT64, NUMERIC, FLOAT64.", +"type": "string" +}, +"floatBinSize": { +"description": "Optional. float_bin_size is used when the column type used for a dimension is a floating point numeric column.", +"format": "double", +"type": "number" +}, +"maxBinCount": { +"description": "A limit to the number of bins generated. When 0 is specified, the maximum count is not enforced.", +"format": "int32", +"type": "integer" +}, +"numericBinSize": { +"description": "numeric_bin_size is used when the column type used for a dimension is numeric or string.", +"format": "int32", +"type": "integer" +}, +"sortColumn": { +"description": "The column name to sort on for binning. This column can be the same column as this dimension or any other column used as a measure in the results. If sort_order is set to NONE, then this value is not used.", +"type": "string" +}, +"sortOrder": { +"description": "The sort order applied to the sort column.", +"enum": [ +"SORT_ORDER_UNSPECIFIED", +"SORT_ORDER_NONE", +"SORT_ORDER_ASCENDING", +"SORT_ORDER_DESCENDING" +], +"enumDescriptions": [ +"An unspecified sort order. This option is invalid when sorting is required.", +"No sorting is applied.", +"The lowest-valued entries are selected first.", +"The highest-valued entries are selected first." +], +"type": "string" +}, +"timeBinSize": { +"description": "time_bin_size is used when the data type specified by column is a time type and the bin size is determined by a time duration. If column_type is DATE, this must be a whole value multiple of 1 day. If column_type is TIME, this must be less than or equal to 24 hours.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"DroppedLabels": { +"description": "A set of (label, value) pairs that were removed from a Distribution time series during aggregation and then added as an attachment to a Distribution.Exemplar.The full label set for the exemplars is constructed by using the dropped pairs in combination with the label values that remain on the aggregated Distribution time series. The constructed full label set can be used to identify the specific entity, such as the instance or job, which might be contributing to a long-tail. However, with dropped labels, the storage requirements are reduced because only the aggregated distribution values for a large group of time series are stored.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.", +"id": "DroppedLabels", +"properties": { +"label": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from label to its value, for all labels dropped in any aggregation.", +"type": "object" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); } ", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ErrorReportingPanel": { +"description": "A widget that displays a list of error groups.", +"id": "ErrorReportingPanel", +"properties": { +"projectNames": { +"description": "The resource name of the Google Cloud Platform project. Written as projects/{projectID} or projects/{projectNumber}, where {projectID} and {projectNumber} can be found in the Google Cloud console (https://support.google.com/cloud/answer/6158840).Examples: projects/my-project-123, projects/5551234.", +"items": { +"type": "string" +}, +"type": "array" +}, +"services": { +"description": "An identifier of the service, such as the name of the executable, job, or Google App Engine service name. This field is expected to have a low number of values that are relatively stable over time, as opposed to version, which can be changed whenever new code is deployed.Contains the service name for error reports extracted from Google App Engine logs or default if the App Engine default service is used.", +"items": { +"type": "string" +}, +"type": "array" +}, +"versions": { +"description": "Represents the source code version that the developer provided, which could represent a version label or a Git SHA-1 hash, for example. For App Engine standard environment, the version is set to the version of the app.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: \"type.googleapis.com/google.protobuf.Timestamp\".", +"type": "string" +} +}, +"type": "object" +}, +"GaugeView": { +"description": "A gauge chart shows where the current value sits within a pre-defined range. The upper and lower bounds should define the possible range of values for the scorecard's query (inclusive).", +"id": "GaugeView", +"properties": { +"lowerBound": { +"description": "The lower bound for this gauge chart. The value of the chart should always be greater than or equal to this.", +"format": "double", +"type": "number" +}, +"upperBound": { +"description": "The upper bound for this gauge chart. The value of the chart should always be less than or equal to this.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GridLayout": { +"description": "A basic layout divides the available space into vertical columns of equal width and arranges a list of widgets using a row-first strategy.", +"id": "GridLayout", +"properties": { +"columns": { +"description": "The number of columns into which the view's width is divided. If omitted or set to zero, a system default will be used while rendering.", +"format": "int64", +"type": "string" +}, +"widgets": { +"description": "The informational elements that are arranged into the columns row-first.", +"items": { +"$ref": "Widget" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpBody": { +"description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page.This message can be used both in streaming and non-streaming API methods in the request as well as the response.It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body.Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", +"id": "HttpBody", +"properties": { +"contentType": { +"description": "The HTTP Content-Type header value specifying the content type of the body.", +"type": "string" +}, +"data": { +"description": "The HTTP request/response body as raw binary.", +"format": "byte", +"type": "string" +}, +"extensions": { +"description": "Application specific response metadata. Must be set in the first response for streaming APIs.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"IncidentList": { +"description": "A widget that displays a list of incidents", +"id": "IncidentList", +"properties": { +"monitoredResources": { +"description": "Optional. The monitored resource for which incidents are listed. The resource doesn't need to be fully specified. That is, you can specify the resource type but not the values of the resource labels. The resource type and labels are used for filtering.", +"items": { +"$ref": "MonitoredResource" +}, +"type": "array" +}, +"policyNames": { +"description": "Optional. A list of alert policy names to filter the incident list by. Don't include the project ID prefix in the policy name. For example, use alertPolicies/utilization.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Interval": { +"description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive).The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", +"id": "Interval", +"properties": { +"endTime": { +"description": "Optional. Exclusive end of the interval.If specified, a Timestamp matching this interval will have to be before the end.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Optional. Inclusive start of the interval.If specified, a Timestamp matching this interval will have to be the same or after the start.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ListDashboardsResponse": { +"description": "The ListDashboards request.", +"id": "ListDashboardsResponse", +"properties": { +"dashboards": { +"description": "The list of requested dashboards.", +"items": { +"$ref": "Dashboard" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +} +}, +"type": "object" +}, +"ListMetricsScopesByMonitoredProjectResponse": { +"description": "Response for the ListMetricsScopesByMonitoredProject method.", +"id": "ListMetricsScopesByMonitoredProjectResponse", +"properties": { +"metricsScopes": { +"description": "A set of all metrics scopes that the specified monitored project has been added to.", +"items": { +"$ref": "MetricsScope" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogsPanel": { +"description": "A widget that displays a stream of log.", +"id": "LogsPanel", +"properties": { +"filter": { +"description": "A filter that chooses which log entries to return. See Advanced Logs Queries (https://cloud.google.com/logging/docs/view/advanced-queries). Only log entries that match the filter are returned. An empty filter matches all log entries.", +"type": "string" +}, +"resourceNames": { +"description": "The names of logging resources to collect logs for. Currently only projects are supported. If empty, the widget will default to the host project.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Measure": { +"description": "A chart measure. Measures represent a measured property in your chart data such as rainfall in inches, number of units sold, revenue gained, etc.", +"id": "Measure", +"properties": { +"aggregationFunction": { +"$ref": "AggregationFunction", +"description": "Required. The aggregation function applied to the input column. This must not be set to \"none\" unless binning is disabled on the dimension. The aggregation function is used to group points on the dimension bins." +}, +"column": { +"description": "Required. The column name within in the dataset used for the measure.", +"type": "string" +} +}, +"type": "object" +}, +"MetricsScope": { +"description": "Represents a Metrics Scope (https://cloud.google.com/monitoring/settings#concept-scope) in Cloud Monitoring, which specifies one or more Google projects and zero or more AWS accounts to monitor together.", +"id": "MetricsScope", +"properties": { +"createTime": { +"description": "Output only. The time when this Metrics Scope was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"monitoredProjects": { +"description": "Output only. The list of projects monitored by this Metrics Scope.", +"items": { +"$ref": "MonitoredProject" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Immutable. The resource name of the Monitoring Metrics Scope. On input, the resource name can be specified with the scoping project ID or number. On output, the resource name is specified with the scoping project number. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time when this Metrics Scope record was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"MonitoredProject": { +"description": "A project being monitored (https://cloud.google.com/monitoring/settings/multiple-projects#create-multi) by a Metrics Scope.", +"id": "MonitoredProject", +"properties": { +"createTime": { +"description": "Output only. The time when this MonitoredProject was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the MonitoredProject. On input, the resource name includes the scoping project ID and monitored project ID. On output, it contains the equivalent project numbers. Example: locations/global/metricsScopes/{SCOPING_PROJECT_ID_OR_NUMBER}/projects/{MONITORED_PROJECT_ID_OR_NUMBER}", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResource": { +"description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"project_id\", \"instance_id\" and \"zone\": { \"type\": \"gce_instance\", \"labels\": { \"project_id\": \"my-project\", \"instance_id\": \"12345678901234\", \"zone\": \"us-central1-a\" }} ", +"id": "MonitoredResource", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels \"project_id\", \"instance_id\", and \"zone\".", +"type": "object" +}, +"type": { +"description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"MosaicLayout": { +"description": "A mosaic layout divides the available space into a grid of blocks, and overlays the grid with tiles. Unlike GridLayout, tiles may span multiple grid blocks and can be placed at arbitrary locations in the grid.", +"id": "MosaicLayout", +"properties": { +"columns": { +"description": "The number of columns in the mosaic grid. The number of columns must be between 1 and 12, inclusive.", +"format": "int32", +"type": "integer" +}, +"tiles": { +"description": "The tiles to display.", +"items": { +"$ref": "Tile" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the name should be a resource name ending with operations/{unique_id}.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type XxxResponse, where Xxx is the original method name. For example, if the original method name is TakeSnapshot(), the inferred response type is TakeSnapshotResponse.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Contains metadata for longrunning operation for the edit Metrics Scope endpoints.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request has been received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OpsAnalyticsQuery": { +"description": "Preview: A query that produces an aggregated response and supporting data. This is a preview feature and may be subject to change before final release.", +"id": "OpsAnalyticsQuery", +"properties": { +"sql": { +"description": "A SQL query to fetch time series, category series, or numeric series data.", +"type": "string" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, \"map_entry\". For custom options, it should be the fully-qualified name. For example, \"google.api.http\".", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"Parameter": { +"description": "Preview: Parameter value applied to the aggregation function. This is a preview feature and may be subject to change before final release.", +"id": "Parameter", +"properties": { +"doubleValue": { +"description": "A floating-point parameter value.", +"format": "double", +"type": "number" +}, +"intValue": { +"description": "An integer parameter value.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PickTimeSeriesFilter": { +"description": "Describes a ranking-based time series filter. Each input time series is ranked with an aligner. The filter will allow up to num_time_series time series to pass through it, selecting them based on the relative ranking.For example, if ranking_method is METHOD_MEAN,direction is BOTTOM, and num_time_series is 3, then the 3 times series with the lowest mean values will pass through the filter.", +"id": "PickTimeSeriesFilter", +"properties": { +"direction": { +"description": "How to use the ranking to select time series that pass through the filter.", +"enum": [ +"DIRECTION_UNSPECIFIED", +"TOP", +"BOTTOM" +], +"enumDescriptions": [ +"Not allowed. You must specify a different Direction if you specify a PickTimeSeriesFilter.", +"Pass the highest num_time_series ranking inputs.", +"Pass the lowest num_time_series ranking inputs." +], +"type": "string" +}, +"interval": { +"$ref": "Interval", +"description": "Select the top N streams/time series within this time interval" +}, +"numTimeSeries": { +"description": "How many time series to allow to pass through the filter.", +"format": "int32", +"type": "integer" +}, +"rankingMethod": { +"description": "ranking_method is applied to each time series independently to produce the value which will be used to compare the time series to other time series.", +"enum": [ +"METHOD_UNSPECIFIED", +"METHOD_MEAN", +"METHOD_MAX", +"METHOD_MIN", +"METHOD_SUM", +"METHOD_LATEST" +], +"enumDescriptions": [ +"Not allowed. You must specify a different Method if you specify a PickTimeSeriesFilter.", +"Select the mean of all values.", +"Select the maximum value.", +"Select the minimum value.", +"Compute the sum of all values.", +"Select the most recent value." +], +"type": "string" +} +}, +"type": "object" +}, +"PieChart": { +"description": "A widget that displays timeseries data as a pie or a donut.", +"id": "PieChart", +"properties": { +"chartType": { +"description": "Required. Indicates the visualization type for the PieChart.", +"enum": [ +"PIE_CHART_TYPE_UNSPECIFIED", +"PIE", +"DONUT" +], +"enumDescriptions": [ +"The zero value. No type specified. Do not use.", +"A Pie type PieChart.", +"Similar to PIE, but the DONUT type PieChart has a hole in the middle." +], +"type": "string" +}, +"dataSets": { +"description": "Required. The queries for the chart's data.", +"items": { +"$ref": "PieChartDataSet" +}, +"type": "array" +}, +"showLabels": { +"description": "Optional. Indicates whether or not the pie chart should show slices' labels", +"type": "boolean" +} +}, +"type": "object" +}, +"PieChartDataSet": { +"description": "Groups a time series query definition.", +"id": "PieChartDataSet", +"properties": { +"dimensions": { +"description": "A dimension is a structured label, class, or category for a set of measurements in your data.", +"items": { +"$ref": "Dimension" +}, +"type": "array" +}, +"measures": { +"description": "A measure is a measured value of a property in your data. For example, rainfall in inches, number of units sold, revenue gained, etc.", +"items": { +"$ref": "Measure" +}, +"type": "array" +}, +"minAlignmentPeriod": { +"description": "Optional. The lower bound on data point frequency for this data set, implemented by specifying the minimum alignment period to use in a time series query. For example, if the data is published once every 10 minutes, the min_alignment_period should be at least 10 minutes. It would not make sense to fetch and align data at one minute intervals.", +"format": "google-duration", +"type": "string" +}, +"sliceNameTemplate": { +"description": "Optional. A template for the name of the slice. This name will be displayed in the legend and the tooltip of the pie chart. It replaces the auto-generated names for the slices. For example, if the template is set to ${resource.labels.zone}, the zone's value will be used for the name instead of the default name.", +"type": "string" +}, +"timeSeriesQuery": { +"$ref": "TimeSeriesQuery", +"description": "Required. The query for the PieChart. See, google.monitoring.dashboard.v1.TimeSeriesQuery." +} +}, +"type": "object" +}, +"QueryExemplarsRequest": { +"description": "QueryExemplarsRequest holds all parameters of the Prometheus upstream API for querying exemplars.", +"id": "QueryExemplarsRequest", +"properties": { +"end": { +"description": "The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +}, +"query": { +"description": "A PromQL query string. Query lanauge documentation: https://prometheus.io/docs/prometheus/latest/querying/basics/.", +"type": "string" +}, +"start": { +"description": "The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +} +}, +"type": "object" +}, +"QueryInstantRequest": { +"description": "QueryInstantRequest holds all parameters of the Prometheus upstream instant query API plus GCM specific parameters.", +"id": "QueryInstantRequest", +"properties": { +"query": { +"description": "A PromQL query string. Query lanauge documentation: https://prometheus.io/docs/prometheus/latest/querying/basics/.", +"type": "string" +}, +"time": { +"description": "The single point in time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +}, +"timeout": { +"description": "An upper bound timeout for the query. Either a Prometheus duration string (https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) or floating point seconds. This non-standard encoding must be used for compatibility with the open source API. Clients may still implement timeouts at the connection level while ignoring this field.", +"type": "string" +} +}, +"type": "object" +}, +"QueryLabelsRequest": { +"description": "QueryLabelsRequest holds all parameters of the Prometheus upstream API for returning a list of label names.", +"id": "QueryLabelsRequest", +"properties": { +"end": { +"description": "The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +}, +"match": { +"description": "A list of matchers encoded in the Prometheus label matcher format to constrain the values to series that satisfy them.", +"type": "string" +}, +"start": { +"description": "The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +} +}, +"type": "object" +}, +"QueryRangeRequest": { +"description": "QueryRangeRequest holds all parameters of the Prometheus upstream range query API plus GCM specific parameters.", +"id": "QueryRangeRequest", +"properties": { +"end": { +"description": "The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +}, +"query": { +"description": "A PromQL query string. Query lanauge documentation: https://prometheus.io/docs/prometheus/latest/querying/basics/.", +"type": "string" +}, +"start": { +"description": "The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +}, +"step": { +"description": "The resolution of query result. Either a Prometheus duration string (https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) or floating point seconds. This non-standard encoding must be used for compatibility with the open source API. Clients may still implement timeouts at the connection level while ignoring this field.", +"type": "string" +}, +"timeout": { +"description": "An upper bound timeout for the query. Either a Prometheus duration string (https://prometheus.io/docs/prometheus/latest/querying/basics/#time-durations) or floating point seconds. This non-standard encoding must be used for compatibility with the open source API. Clients may still implement timeouts at the connection level while ignoring this field.", +"type": "string" +} +}, +"type": "object" +}, +"QuerySeriesRequest": { +"description": "QuerySeries holds all parameters of the Prometheus upstream API for querying series.", +"id": "QuerySeriesRequest", +"properties": { +"end": { +"description": "The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +}, +"start": { +"description": "The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp.", +"type": "string" +} +}, +"type": "object" +}, +"RatioPart": { +"description": "Describes a query to build the numerator or denominator of a TimeSeriesFilterRatio.", +"id": "RatioPart", +"properties": { +"aggregation": { +"$ref": "Aggregation", +"description": "By default, the raw time series data is returned. Use this field to combine multiple time series for different views of the data." +}, +"filter": { +"description": "Required. The monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies the metric types, resources, and projects to query.", +"type": "string" +} +}, +"type": "object" +}, +"Row": { +"description": "Defines the layout properties and content for a row.", +"id": "Row", +"properties": { +"weight": { +"description": "The relative weight of this row. The row weight is used to adjust the height of rows on the screen (relative to peers). Greater the weight, greater the height of the row on the screen. If omitted, a value of 1 is used while rendering.", +"format": "int64", +"type": "string" +}, +"widgets": { +"description": "The display widgets arranged horizontally in this row.", +"items": { +"$ref": "Widget" +}, +"type": "array" +} +}, +"type": "object" +}, +"RowLayout": { +"description": "A simplified layout that divides the available space into rows and arranges a set of widgets horizontally in each row.", +"id": "RowLayout", +"properties": { +"rows": { +"description": "The rows of content to display.", +"items": { +"$ref": "Row" +}, +"type": "array" +} +}, +"type": "object" +}, +"Scorecard": { +"description": "A widget showing the latest value of a metric, and how this value relates to one or more thresholds.", +"id": "Scorecard", +"properties": { +"blankView": { +"$ref": "Empty", +"description": "Will cause the Scorecard to show only the value, with no indicator to its value relative to its thresholds." +}, +"gaugeView": { +"$ref": "GaugeView", +"description": "Will cause the scorecard to show a gauge chart." +}, +"sparkChartView": { +"$ref": "SparkChartView", +"description": "Will cause the scorecard to show a spark chart." +}, +"thresholds": { +"description": "The thresholds used to determine the state of the scorecard given the time series' current value. For an actual value x, the scorecard is in a danger state if x is less than or equal to a danger threshold that triggers below, or greater than or equal to a danger threshold that triggers above. Similarly, if x is above/below a warning threshold that triggers above/below, then the scorecard is in a warning state - unless x also puts it in a danger state. (Danger trumps warning.)As an example, consider a scorecard with the following four thresholds: { value: 90, category: 'DANGER', trigger: 'ABOVE', }, { value: 70, category: 'WARNING', trigger: 'ABOVE', }, { value: 10, category: 'DANGER', trigger: 'BELOW', }, { value: 20, category: 'WARNING', trigger: 'BELOW', } Then: values less than or equal to 10 would put the scorecard in a DANGER state, values greater than 10 but less than or equal to 20 a WARNING state, values strictly between 20 and 70 an OK state, values greater than or equal to 70 but less than 90 a WARNING state, and values greater than or equal to 90 a DANGER state.", +"items": { +"$ref": "Threshold" +}, +"type": "array" +}, +"timeSeriesQuery": { +"$ref": "TimeSeriesQuery", +"description": "Required. Fields for querying time series data from the Stackdriver metrics API." +} +}, +"type": "object" +}, +"SectionHeader": { +"description": "A widget that defines a new section header. Sections populate a table of contents and allow easier navigation of long-form content.", +"id": "SectionHeader", +"properties": { +"dividerBelow": { +"description": "Whether to insert a divider below the section in the table of contents", +"type": "boolean" +}, +"subtitle": { +"description": "The subtitle of the section", +"type": "string" +} +}, +"type": "object" +}, +"SingleViewGroup": { +"description": "A widget that groups the other widgets by using a dropdown menu. All widgets that are within the area spanned by the grouping widget are considered member widgets.", +"id": "SingleViewGroup", +"properties": {}, +"type": "object" +}, +"SourceContext": { +"description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: \"google/protobuf/source_context.proto\".", +"type": "string" +} +}, +"type": "object" +}, +"SpanContext": { +"description": "The context of a span. This is attached to an Exemplar in Distribution values during aggregation.It contains the name of a span with format: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] ", +"id": "SpanContext", +"properties": { +"spanName": { +"description": "The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array.[SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.", +"type": "string" +} +}, +"type": "object" +}, +"SparkChartView": { +"description": "A sparkChart is a small chart suitable for inclusion in a table-cell or inline in text. This message contains the configuration for a sparkChart to show up on a Scorecard, showing recent trends of the scorecard's timeseries.", +"id": "SparkChartView", +"properties": { +"minAlignmentPeriod": { +"description": "The lower bound on data point frequency in the chart implemented by specifying the minimum alignment period to use in a time series query. For example, if the data is published once every 10 minutes it would not make sense to fetch and align data at one minute intervals. This field is optional and exists only as a hint.", +"format": "google-duration", +"type": "string" +}, +"sparkChartType": { +"description": "Required. The type of sparkchart to show in this chartView.", +"enum": [ +"SPARK_CHART_TYPE_UNSPECIFIED", +"SPARK_LINE", +"SPARK_BAR" +], +"enumDescriptions": [ +"Not allowed in well-formed requests.", +"The sparkline will be rendered as a small line chart.", +"The sparkbar will be rendered as a small bar chart." +], +"type": "string" +} +}, +"type": "object" +}, +"StatisticalTimeSeriesFilter": { +"description": "A filter that ranks streams based on their statistical relation to other streams in a request. Note: This field is deprecated and completely ignored by the API.", +"id": "StatisticalTimeSeriesFilter", +"properties": { +"numTimeSeries": { +"description": "How many time series to output.", +"format": "int32", +"type": "integer" +}, +"rankingMethod": { +"description": "rankingMethod is applied to a set of time series, and then the produced value for each individual time series is used to compare a given time series to others. These are methods that cannot be applied stream-by-stream, but rather require the full context of a request to evaluate time series.", +"enum": [ +"METHOD_UNSPECIFIED", +"METHOD_CLUSTER_OUTLIER" +], +"enumDescriptions": [ +"Not allowed in well-formed requests.", +"Compute the outlier score of each stream." +], +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TableDataSet": { +"description": "Groups a time series query definition with table options.", +"id": "TableDataSet", +"properties": { +"minAlignmentPeriod": { +"description": "Optional. The lower bound on data point frequency for this data set, implemented by specifying the minimum alignment period to use in a time series query For example, if the data is published once every 10 minutes, the min_alignment_period should be at least 10 minutes. It would not make sense to fetch and align data at one minute intervals.", +"format": "google-duration", +"type": "string" +}, +"tableDisplayOptions": { +"$ref": "TableDisplayOptions", +"description": "Optional. Table display options for configuring how the table is rendered." +}, +"tableTemplate": { +"description": "Optional. A template string for naming TimeSeries in the resulting data set. This should be a string with interpolations of the form ${label_name}, which will resolve to the label's value i.e. \"${resource.labels.project_id}.\"", +"type": "string" +}, +"timeSeriesQuery": { +"$ref": "TimeSeriesQuery", +"description": "Required. Fields for querying time series data from the Stackdriver metrics API." +} +}, +"type": "object" +}, +"TableDisplayOptions": { +"description": "Table display options that can be reused.", +"id": "TableDisplayOptions", +"properties": { +"shownColumns": { +"deprecated": true, +"description": "Optional. This field is unused and has been replaced by TimeSeriesTable.column_settings", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Text": { +"description": "A widget that displays textual content.", +"id": "Text", +"properties": { +"content": { +"description": "The text content to be displayed.", +"type": "string" +}, +"format": { +"description": "How the text content is formatted.", +"enum": [ +"FORMAT_UNSPECIFIED", +"MARKDOWN", +"RAW" +], +"enumDescriptions": [ +"Format is unspecified. Defaults to MARKDOWN.", +"The text contains Markdown formatting.", +"The text contains no special formatting." +], +"type": "string" +}, +"style": { +"$ref": "TextStyle", +"description": "How the text is styled" +} +}, +"type": "object" +}, +"TextStyle": { +"description": "Properties that determine how the title and content are styled", +"id": "TextStyle", +"properties": { +"backgroundColor": { +"description": "The background color as a hex string. \"#RRGGBB\" or \"#RGB\"", +"type": "string" +}, +"fontSize": { +"description": "Font sizes for both the title and content. The title will still be larger relative to the content.", +"enum": [ +"FONT_SIZE_UNSPECIFIED", +"FS_EXTRA_SMALL", +"FS_SMALL", +"FS_MEDIUM", +"FS_LARGE", +"FS_EXTRA_LARGE" +], +"enumDescriptions": [ +"No font size specified, will default to FS_LARGE", +"Extra small font size", +"Small font size", +"Medium font size", +"Large font size", +"Extra large font size" +], +"type": "string" +}, +"horizontalAlignment": { +"description": "The horizontal alignment of both the title and content", +"enum": [ +"HORIZONTAL_ALIGNMENT_UNSPECIFIED", +"H_LEFT", +"H_CENTER", +"H_RIGHT" +], +"enumDescriptions": [ +"No horizontal alignment specified, will default to H_LEFT", +"Left-align", +"Center-align", +"Right-align" +], +"type": "string" +}, +"padding": { +"description": "The amount of padding around the widget", +"enum": [ +"PADDING_SIZE_UNSPECIFIED", +"P_EXTRA_SMALL", +"P_SMALL", +"P_MEDIUM", +"P_LARGE", +"P_EXTRA_LARGE" +], +"enumDescriptions": [ +"No padding size specified, will default to P_EXTRA_SMALL", +"Extra small padding", +"Small padding", +"Medium padding", +"Large padding", +"Extra large padding" +], +"type": "string" +}, +"pointerLocation": { +"description": "The pointer location for this widget (also sometimes called a \"tail\")", +"enum": [ +"POINTER_LOCATION_UNSPECIFIED", +"PL_TOP", +"PL_RIGHT", +"PL_BOTTOM", +"PL_LEFT", +"PL_TOP_LEFT", +"PL_TOP_RIGHT", +"PL_RIGHT_TOP", +"PL_RIGHT_BOTTOM", +"PL_BOTTOM_RIGHT", +"PL_BOTTOM_LEFT", +"PL_LEFT_BOTTOM", +"PL_LEFT_TOP" +], +"enumDescriptions": [ +"No visual pointer", +"Placed in the middle of the top of the widget", +"Placed in the middle of the right side of the widget", +"Placed in the middle of the bottom of the widget", +"Placed in the middle of the left side of the widget", +"Placed on the left side of the top of the widget", +"Placed on the right side of the top of the widget", +"Placed on the top of the right side of the widget", +"Placed on the bottom of the right side of the widget", +"Placed on the right side of the bottom of the widget", +"Placed on the left side of the bottom of the widget", +"Placed on the bottom of the left side of the widget", +"Placed on the top of the left side of the widget" +], +"type": "string" +}, +"textColor": { +"description": "The text color as a hex string. \"#RRGGBB\" or \"#RGB\"", +"type": "string" +}, +"verticalAlignment": { +"description": "The vertical alignment of both the title and content", +"enum": [ +"VERTICAL_ALIGNMENT_UNSPECIFIED", +"V_TOP", +"V_CENTER", +"V_BOTTOM" +], +"enumDescriptions": [ +"No vertical alignment specified, will default to V_TOP", +"Top-align", +"Center-align", +"Bottom-align" +], +"type": "string" +} +}, +"type": "object" +}, +"Threshold": { +"description": "Defines a threshold for categorizing time series values.", +"id": "Threshold", +"properties": { +"color": { +"description": "The state color for this threshold. Color is not allowed in a XyChart.", +"enum": [ +"COLOR_UNSPECIFIED", +"YELLOW", +"RED" +], +"enumDescriptions": [ +"Color is unspecified. Not allowed in well-formed requests.", +"Crossing the threshold is \"concerning\" behavior.", +"Crossing the threshold is \"emergency\" behavior." +], +"type": "string" +}, +"direction": { +"description": "The direction for the current threshold. Direction is not allowed in a XyChart.", +"enum": [ +"DIRECTION_UNSPECIFIED", +"ABOVE", +"BELOW" +], +"enumDescriptions": [ +"Not allowed in well-formed requests.", +"The threshold will be considered crossed if the actual value is above the threshold value.", +"The threshold will be considered crossed if the actual value is below the threshold value." +], +"type": "string" +}, +"label": { +"description": "A label for the threshold.", +"type": "string" +}, +"targetAxis": { +"description": "The target axis to use for plotting the threshold. Target axis is not allowed in a Scorecard.", +"enum": [ +"TARGET_AXIS_UNSPECIFIED", +"Y1", +"Y2" +], +"enumDescriptions": [ +"The target axis was not specified. Defaults to Y1.", +"The y_axis (the right axis of chart).", +"The y2_axis (the left axis of chart)." +], +"type": "string" +}, +"value": { +"description": "The value of the threshold. The value should be defined in the native scale of the metric.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Tile": { +"description": "A single tile in the mosaic. The placement and size of the tile are configurable.", +"id": "Tile", +"properties": { +"height": { +"description": "The height of the tile, measured in grid blocks. Tiles must have a minimum height of 1.", +"format": "int32", +"type": "integer" +}, +"widget": { +"$ref": "Widget", +"description": "The informational widget contained in the tile. For example an XyChart." +}, +"width": { +"description": "The width of the tile, measured in grid blocks. Tiles must have a minimum width of 1.", +"format": "int32", +"type": "integer" +}, +"xPos": { +"description": "The zero-indexed position of the tile in grid blocks relative to the left edge of the grid. Tiles must be contained within the specified number of columns. x_pos cannot be negative.", +"format": "int32", +"type": "integer" +}, +"yPos": { +"description": "The zero-indexed position of the tile in grid blocks relative to the top edge of the grid. y_pos cannot be negative.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TimeSeriesFilter": { +"description": "A filter that defines a subset of time series data that is displayed in a widget. Time series data is fetched using the ListTimeSeries (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) method.", +"id": "TimeSeriesFilter", +"properties": { +"aggregation": { +"$ref": "Aggregation", +"description": "By default, the raw time series data is returned. Use this field to combine multiple time series for different views of the data." +}, +"filter": { +"description": "Required. The monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies the metric types, resources, and projects to query.", +"type": "string" +}, +"pickTimeSeriesFilter": { +"$ref": "PickTimeSeriesFilter", +"description": "Ranking based time series filter." +}, +"secondaryAggregation": { +"$ref": "Aggregation", +"description": "Apply a second aggregation after aggregation is applied." +}, +"statisticalTimeSeriesFilter": { +"$ref": "StatisticalTimeSeriesFilter", +"deprecated": true, +"description": "Statistics based time series filter. Note: This field is deprecated and completely ignored by the API." +} +}, +"type": "object" +}, +"TimeSeriesFilterRatio": { +"description": "A pair of time series filters that define a ratio computation. The output time series is the pair-wise division of each aligned element from the numerator and denominator time series.", +"id": "TimeSeriesFilterRatio", +"properties": { +"denominator": { +"$ref": "RatioPart", +"description": "The denominator of the ratio." +}, +"numerator": { +"$ref": "RatioPart", +"description": "The numerator of the ratio." +}, +"pickTimeSeriesFilter": { +"$ref": "PickTimeSeriesFilter", +"description": "Ranking based time series filter." +}, +"secondaryAggregation": { +"$ref": "Aggregation", +"description": "Apply a second aggregation after the ratio is computed." +}, +"statisticalTimeSeriesFilter": { +"$ref": "StatisticalTimeSeriesFilter", +"deprecated": true, +"description": "Statistics based time series filter. Note: This field is deprecated and completely ignored by the API." +} +}, +"type": "object" +}, +"TimeSeriesQuery": { +"description": "TimeSeriesQuery collects the set of supported methods for querying time series data from the Stackdriver metrics API.", +"id": "TimeSeriesQuery", +"properties": { +"opsAnalyticsQuery": { +"$ref": "OpsAnalyticsQuery", +"description": "Preview: A query used to fetch a time series, category series, or numeric series with SQL. This is a preview feature and may be subject to change before final release." +}, +"outputFullDuration": { +"description": "Optional. If set, Cloud Monitoring will treat the full query duration as the alignment period so that there will be only 1 output value.*Note: This could override the configured alignment period except for the cases where a series of data points are expected, like - XyChart - Scorecard's spark chart", +"type": "boolean" +}, +"prometheusQuery": { +"description": "A query used to fetch time series with PromQL.", +"type": "string" +}, +"timeSeriesFilter": { +"$ref": "TimeSeriesFilter", +"description": "Filter parameters to fetch time series." +}, +"timeSeriesFilterRatio": { +"$ref": "TimeSeriesFilterRatio", +"description": "Parameters to fetch a ratio between two time series filters." +}, +"timeSeriesQueryLanguage": { +"description": "A query used to fetch time series with MQL.", +"type": "string" +}, +"unitOverride": { +"description": "The unit of data contained in fetched time series. If non-empty, this unit will override any unit that accompanies fetched data. The format is the same as the unit (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors) field in MetricDescriptor.", +"type": "string" +} +}, +"type": "object" +}, +"TimeSeriesTable": { +"description": "A table that displays time series data.", +"id": "TimeSeriesTable", +"properties": { +"columnSettings": { +"description": "Optional. The list of the persistent column settings for the table.", +"items": { +"$ref": "ColumnSettings" +}, +"type": "array" +}, +"dataSets": { +"description": "Required. The data displayed in this table.", +"items": { +"$ref": "TableDataSet" +}, +"type": "array" +}, +"metricVisualization": { +"description": "Optional. Store rendering strategy", +"enum": [ +"METRIC_VISUALIZATION_UNSPECIFIED", +"NUMBER", +"BAR" +], +"enumDescriptions": [ +"Unspecified state", +"Default text rendering", +"Horizontal bar rendering" +], +"type": "string" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in oneof definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax proto2.", +"Syntax proto3.", +"Syntax editions." +], +"type": "string" +} +}, +"type": "object" +}, +"Widget": { +"description": "Widget contains a single dashboard component and configuration of how to present the component in the dashboard.", +"id": "Widget", +"properties": { +"alertChart": { +"$ref": "AlertChart", +"description": "A chart of alert policy data." +}, +"blank": { +"$ref": "Empty", +"description": "A blank space." +}, +"collapsibleGroup": { +"$ref": "CollapsibleGroup", +"description": "A widget that groups the other widgets. All widgets that are within the area spanned by the grouping widget are considered member widgets." +}, +"errorReportingPanel": { +"$ref": "ErrorReportingPanel", +"description": "A widget that displays a list of error groups." +}, +"id": { +"description": "Optional. The widget id. Ids may be made up of alphanumerics, dashes and underscores. Widget ids are optional.", +"type": "string" +}, +"incidentList": { +"$ref": "IncidentList", +"description": "A widget that shows list of incidents." +}, +"logsPanel": { +"$ref": "LogsPanel", +"description": "A widget that shows a stream of logs." +}, +"pieChart": { +"$ref": "PieChart", +"description": "A widget that displays timeseries data as a pie chart." +}, +"scorecard": { +"$ref": "Scorecard", +"description": "A scorecard summarizing time series data." +}, +"sectionHeader": { +"$ref": "SectionHeader", +"description": "A widget that defines a section header for easier navigation of the dashboard." +}, +"singleViewGroup": { +"$ref": "SingleViewGroup", +"description": "A widget that groups the other widgets by using a dropdown menu." +}, +"text": { +"$ref": "Text", +"description": "A raw string or markdown displaying textual content." +}, +"timeSeriesTable": { +"$ref": "TimeSeriesTable", +"description": "A widget that displays time series data in a tabular format." +}, +"title": { +"description": "Optional. The title of the widget.", +"type": "string" +}, +"xyChart": { +"$ref": "XyChart", +"description": "A chart of time series data." +} +}, +"type": "object" +}, +"XyChart": { +"description": "A chart that displays data on a 2D (X and Y axes) plane.", +"id": "XyChart", +"properties": { +"chartOptions": { +"$ref": "ChartOptions", +"description": "Display options for the chart." +}, +"dataSets": { +"description": "Required. The data displayed in this chart.", +"items": { +"$ref": "DataSet" +}, +"type": "array" +}, +"thresholds": { +"description": "Threshold lines drawn horizontally across the chart.", +"items": { +"$ref": "Threshold" +}, +"type": "array" +}, +"timeshiftDuration": { +"description": "The duration used to display a comparison chart. A comparison chart simultaneously shows values from two similar-length time periods (e.g., week-over-week metrics). The duration must be positive, and it can only be applied to charts with data sets of LINE plot type.", +"format": "google-duration", +"type": "string" +}, +"xAxis": { +"$ref": "Axis", +"description": "The properties applied to the x-axis." +}, +"y2Axis": { +"$ref": "Axis", +"description": "The properties applied to the y2-axis." +}, +"yAxis": { +"$ref": "Axis", +"description": "The properties applied to the y-axis." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Monitoring API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/monitoring.v3.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/monitoring.v3.json new file mode 100644 index 0000000000000000000000000000000000000000..b984278557073d9cda428e1d7655f53e4be0ccd0 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/monitoring.v3.json @@ -0,0 +1,6094 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/monitoring": { +"description": "View and write monitoring data for all of your Google and third-party Cloud and API projects" +}, +"https://www.googleapis.com/auth/monitoring.read": { +"description": "View monitoring data for all of your Google Cloud and third-party projects" +}, +"https://www.googleapis.com/auth/monitoring.write": { +"description": "Publish metric data to your Google Cloud projects" +} +} +} +}, +"basePath": "", +"baseUrl": "https://monitoring.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Monitoring", +"description": "Manages your Cloud Monitoring data and configurations.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/monitoring/api/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "monitoring:v3", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://monitoring.mtls.googleapis.com/", +"name": "monitoring", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"resources": { +"timeSeries": { +"methods": { +"list": { +"description": "Lists time series that match a filter.", +"flatPath": "v3/folders/{foldersId}/timeSeries", +"httpMethod": "GET", +"id": "monitoring.folders.timeSeries.list", +"parameterOrder": [ +"name" +], +"parameters": { +"aggregation.alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 104 weeks (2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"aggregation.crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"location": "query", +"type": "string" +}, +"aggregation.groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"location": "query", +"repeated": true, +"type": "string" +}, +"aggregation.perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"location": "query", +"type": "string" +}, +"filter": { +"description": "Required. A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND metric.labels.instance_name = \"my-instance-name\" ", +"location": "query", +"type": "string" +}, +"interval.endTime": { +"description": "Required. The end of the time interval.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"interval.startTime": { +"description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name), organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] ", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "Unsupported: must be left blank. The points in each time series are currently returned in reverse time order (most recent to oldest).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +}, +"secondaryAggregation.alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 104 weeks (2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"secondaryAggregation.crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"location": "query", +"type": "string" +}, +"secondaryAggregation.groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"location": "query", +"repeated": true, +"type": "string" +}, +"secondaryAggregation.perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"location": "query", +"type": "string" +}, +"view": { +"description": "Required. Specifies which information is returned about the time series.", +"enum": [ +"FULL", +"HEADERS" +], +"enumDescriptions": [ +"Returns the identity of the metric(s), the time series, and the time series data.", +"Returns the identity of the metric and the time series resource, but not the time series data." +], +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/timeSeries", +"response": { +"$ref": "ListTimeSeriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +} +} +}, +"organizations": { +"resources": { +"timeSeries": { +"methods": { +"list": { +"description": "Lists time series that match a filter.", +"flatPath": "v3/organizations/{organizationsId}/timeSeries", +"httpMethod": "GET", +"id": "monitoring.organizations.timeSeries.list", +"parameterOrder": [ +"name" +], +"parameters": { +"aggregation.alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 104 weeks (2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"aggregation.crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"location": "query", +"type": "string" +}, +"aggregation.groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"location": "query", +"repeated": true, +"type": "string" +}, +"aggregation.perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"location": "query", +"type": "string" +}, +"filter": { +"description": "Required. A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND metric.labels.instance_name = \"my-instance-name\" ", +"location": "query", +"type": "string" +}, +"interval.endTime": { +"description": "Required. The end of the time interval.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"interval.startTime": { +"description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name), organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] ", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "Unsupported: must be left blank. The points in each time series are currently returned in reverse time order (most recent to oldest).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +}, +"secondaryAggregation.alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 104 weeks (2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"secondaryAggregation.crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"location": "query", +"type": "string" +}, +"secondaryAggregation.groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"location": "query", +"repeated": true, +"type": "string" +}, +"secondaryAggregation.perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"location": "query", +"type": "string" +}, +"view": { +"description": "Required. Specifies which information is returned about the time series.", +"enum": [ +"FULL", +"HEADERS" +], +"enumDescriptions": [ +"Returns the identity of the metric(s), the time series, and the time series data.", +"Returns the identity of the metric and the time series resource, but not the time series data." +], +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/timeSeries", +"response": { +"$ref": "ListTimeSeriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +} +} +}, +"projects": { +"resources": { +"alertPolicies": { +"methods": { +"create": { +"description": "Creates a new alerting policy.Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.", +"flatPath": "v3/projects/{projectsId}/alertPolicies", +"httpMethod": "POST", +"id": "monitoring.projects.alertPolicies.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) in which to create the alerting policy. The format is: projects/[PROJECT_ID_OR_NUMBER] Note that this field names the parent container in which the alerting policy will be written, not the name of the created policy. |name| must be a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will return. The alerting policy that is returned will have a name that contains a normalized representation of this name as a prefix but adds a suffix of the form /alertPolicies/[ALERT_POLICY_ID], identifying the policy in the container.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}/alertPolicies", +"request": { +"$ref": "AlertPolicy" +}, +"response": { +"$ref": "AlertPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"delete": { +"description": "Deletes an alerting policy.Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.", +"flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", +"httpMethod": "DELETE", +"id": "monitoring.projects.alertPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The alerting policy to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] For more information, see AlertPolicy.", +"location": "path", +"pattern": "^projects/[^/]+/alertPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Gets a single alerting policy.", +"flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", +"httpMethod": "GET", +"id": "monitoring.projects.alertPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The alerting policy to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/alertPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "AlertPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "Lists the existing alerting policies for the workspace.", +"flatPath": "v3/projects/{projectsId}/alertPolicies", +"httpMethod": "GET", +"id": "monitoring.projects.alertPolicies.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by alert policies to be included in the response.For more details, see sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) whose alert policies are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] Note that this field names the parent container in which the alerting policies to be listed are stored. To retrieve a single alerting policy by name, use the GetAlertPolicy operation, instead.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "A comma-separated list of fields by which to sort the result. Supports the same set of field references as the filter field. Entries can be prefixed with a minus sign to sort by the field in descending order.For more details, see sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/alertPolicies", +"response": { +"$ref": "ListAlertPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"patch": { +"description": "Updates an alerting policy. You can either replace the entire policy with a new one or replace only certain fields in the current alerting policy by specifying the fields to be updated via updateMask. Returns the updated alerting policy.Design your application to single-thread API calls that modify the state of alerting policies in a single project. This includes calls to CreateAlertPolicy, DeleteAlertPolicy and UpdateAlertPolicy.", +"flatPath": "v3/projects/{projectsId}/alertPolicies/{alertPoliciesId}", +"httpMethod": "PATCH", +"id": "monitoring.projects.alertPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required if the policy exists. The resource name for this policy. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.", +"location": "path", +"pattern": "^projects/[^/]+/alertPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. A list of alerting policy field names. If this field is not empty, each listed field in the existing alerting policy is set to the value of the corresponding field in the supplied policy (alert_policy), or to the field's default value if the field is not in the supplied alerting policy. Fields not listed retain their previous value.Examples of valid field masks include display_name, documentation, documentation.content, documentation.mime_type, user_labels, user_label.nameofkey, enabled, conditions, combiner, etc.If this field is empty, then the supplied alerting policy replaces the existing policy. It is the same as deleting the existing policy and adding the supplied policy, except for the following: The new policy will have the same [ALERT_POLICY_ID] as the former policy. This gives you continuity with the former policy in your notifications and incidents. Conditions in the new policy will keep their former [CONDITION_ID] if the supplied condition includes the name field with that [CONDITION_ID]. If the supplied condition omits the name field, then a new [CONDITION_ID] is created.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "AlertPolicy" +}, +"response": { +"$ref": "AlertPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +} +} +}, +"collectdTimeSeries": { +"methods": { +"create": { +"description": "Cloud Monitoring Agent only: Creates a new time series.This method is only for use by the Cloud Monitoring Agent. Use projects.timeSeries.create instead.", +"flatPath": "v3/projects/{projectsId}/collectdTimeSeries", +"httpMethod": "POST", +"id": "monitoring.projects.collectdTimeSeries.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The project (https://cloud.google.com/monitoring/api/v3#project_name) in which to create the time series. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}/collectdTimeSeries", +"request": { +"$ref": "CreateCollectdTimeSeriesRequest" +}, +"response": { +"$ref": "CreateCollectdTimeSeriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +} +} +}, +"groups": { +"methods": { +"create": { +"description": "Creates a new group.", +"flatPath": "v3/projects/{projectsId}/groups", +"httpMethod": "POST", +"id": "monitoring.projects.groups.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) in which to create the group. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "If true, validate this request but do not create the group.", +"location": "query", +"type": "boolean" +} +}, +"path": "v3/{+name}/groups", +"request": { +"$ref": "Group" +}, +"response": { +"$ref": "Group" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"delete": { +"description": "Deletes an existing group.", +"flatPath": "v3/projects/{projectsId}/groups/{groupsId}", +"httpMethod": "DELETE", +"id": "monitoring.projects.groups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The group to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +}, +"recursive": { +"description": "If this field is true, then the request means to delete a group with all its descendants. Otherwise, the request means to delete a group only when it has no descendants. The default value is false.", +"location": "query", +"type": "boolean" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Gets a single group.", +"flatPath": "v3/projects/{projectsId}/groups/{groupsId}", +"httpMethod": "GET", +"id": "monitoring.projects.groups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The group to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Group" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "Lists the existing groups.", +"flatPath": "v3/projects/{projectsId}/groups", +"httpMethod": "GET", +"id": "monitoring.projects.groups.list", +"parameterOrder": [ +"name" +], +"parameters": { +"ancestorsOfGroup": { +"description": "A group name. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] Returns groups that are ancestors of the specified group. The groups are returned in order, starting with the immediate parent and ending with the most distant ancestor. If the specified group has no immediate parent, the results are empty.", +"location": "query", +"type": "string" +}, +"childrenOfGroup": { +"description": "A group name. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] Returns groups whose parent_name field contains the group name. If no groups have this parent, the results are empty.", +"location": "query", +"type": "string" +}, +"descendantsOfGroup": { +"description": "A group name. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] Returns the descendants of the specified group. This is a superset of the results returned by the children_of_group filter, and includes children-of-children, and so forth.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) whose groups are to be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "A positive number that is the maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the next_page_token value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/groups", +"response": { +"$ref": "ListGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"update": { +"description": "Updates an existing group. You can change any group attributes except name.", +"flatPath": "v3/projects/{projectsId}/groups/{groupsId}", +"httpMethod": "PUT", +"id": "monitoring.projects.groups.update", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique [GROUP_ID] that is generated automatically.", +"location": "path", +"pattern": "^projects/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "If true, validate this request but do not update the existing group.", +"location": "query", +"type": "boolean" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "Group" +}, +"response": { +"$ref": "Group" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +} +}, +"resources": { +"members": { +"methods": { +"list": { +"description": "Lists the monitored resources that are members of a group.", +"flatPath": "v3/projects/{projectsId}/groups/{groupsId}/members", +"httpMethod": "GET", +"id": "monitoring.projects.groups.members.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "An optional list filter (https://cloud.google.com/monitoring/api/learn_more#filtering) describing the members to be returned. The filter may reference the type, labels, and metadata of monitored resources that comprise the group. For example, to return only resources representing Compute Engine VM instances, use this filter: `resource.type = \"gce_instance\"` ", +"location": "query", +"type": "string" +}, +"interval.endTime": { +"description": "Required. The end of the time interval.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"interval.startTime": { +"description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The group whose members are listed. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "A positive number that is the maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the next_page_token value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/members", +"response": { +"$ref": "ListGroupMembersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +} +} +}, +"metricDescriptors": { +"methods": { +"create": { +"description": "Creates a new metric descriptor. The creation is executed asynchronously. User-created metric descriptors define custom metrics (https://cloud.google.com/monitoring/custom-metrics). The metric descriptor is updated if it already exists, except that metric labels are never removed.", +"flatPath": "v3/projects/{projectsId}/metricDescriptors", +"httpMethod": "POST", +"id": "monitoring.projects.metricDescriptors.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: 4 projects/PROJECT_ID_OR_NUMBER", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}/metricDescriptors", +"request": { +"$ref": "MetricDescriptor" +}, +"response": { +"$ref": "MetricDescriptor" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"delete": { +"description": "Deletes a metric descriptor. Only user-created custom metrics (https://cloud.google.com/monitoring/custom-metrics) can be deleted.", +"flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", +"httpMethod": "DELETE", +"id": "monitoring.projects.metricDescriptors.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example of [METRIC_ID] is: \"custom.googleapis.com/my_test_metric\".", +"location": "path", +"pattern": "^projects/[^/]+/metricDescriptors/.*$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Gets a single metric descriptor.", +"flatPath": "v3/projects/{projectsId}/metricDescriptors/{metricDescriptorsId}", +"httpMethod": "GET", +"id": "monitoring.projects.metricDescriptors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The metric descriptor on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/metricDescriptors/[METRIC_ID] An example value of [METRIC_ID] is \"compute.googleapis.com/instance/disk/read_bytes_count\".", +"location": "path", +"pattern": "^projects/[^/]+/metricDescriptors/.*$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "MetricDescriptor" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"list": { +"description": "Lists metric descriptors that match a filter.", +"flatPath": "v3/projects/{projectsId}/metricDescriptors", +"httpMethod": "GET", +"id": "monitoring.projects.metricDescriptors.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "If this field is empty, all custom and system-defined metric descriptors are returned. Otherwise, the filter (https://cloud.google.com/monitoring/api/v3/filters) specifies which metric descriptors are to be returned. For example, the following filter matches all custom metrics (https://cloud.google.com/monitoring/custom-metrics): metric.type = starts_with(\"custom.googleapis.com/\") ", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "A positive number that is the maximum number of results to return. The default and maximum value is 10,000. If a page_size <= 0 or > 10,000 is submitted, will instead return a maximum of 10,000 results.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/metricDescriptors", +"response": { +"$ref": "ListMetricDescriptorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read", +"https://www.googleapis.com/auth/monitoring.write" +] +} +} +}, +"monitoredResourceDescriptors": { +"methods": { +"get": { +"description": "Gets a single monitored resource descriptor.", +"flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors/{monitoredResourceDescriptorsId}", +"httpMethod": "GET", +"id": "monitoring.projects.monitoredResourceDescriptors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The monitored resource descriptor to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/monitoredResourceDescriptors/[RESOURCE_TYPE] The [RESOURCE_TYPE] is a predefined type, such as cloudsql_database.", +"location": "path", +"pattern": "^projects/[^/]+/monitoredResourceDescriptors/.*$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "MonitoredResourceDescriptor" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"list": { +"description": "Lists monitored resource descriptors that match a filter.", +"flatPath": "v3/projects/{projectsId}/monitoredResourceDescriptors", +"httpMethod": "GET", +"id": "monitoring.projects.monitoredResourceDescriptors.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "An optional filter (https://cloud.google.com/monitoring/api/v3/filters) describing the descriptors to be returned. The filter can reference the descriptor's type and labels. For example, the following filter returns only Google Compute Engine descriptors that have an id label: resource.type = starts_with(\"gce_\") AND resource.label:id ", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "A positive number that is the maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/monitoredResourceDescriptors", +"response": { +"$ref": "ListMonitoredResourceDescriptorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read", +"https://www.googleapis.com/auth/monitoring.write" +] +} +} +}, +"notificationChannelDescriptors": { +"methods": { +"get": { +"description": "Gets a single channel descriptor. The descriptor indicates which fields are expected / permitted for a notification channel of the given type.", +"flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors/{notificationChannelDescriptorsId}", +"httpMethod": "GET", +"id": "monitoring.projects.notificationChannelDescriptors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The channel type for which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE] ", +"location": "path", +"pattern": "^projects/[^/]+/notificationChannelDescriptors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "NotificationChannelDescriptor" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "Lists the descriptors for supported channel types. The use of descriptors makes it possible for new channel types to be dynamically added.", +"flatPath": "v3/projects/{projectsId}/notificationChannelDescriptors", +"httpMethod": "GET", +"id": "monitoring.projects.notificationChannelDescriptors.list", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The REST resource name of the parent from which to retrieve the notification channel descriptors. The expected syntax is: projects/[PROJECT_ID_OR_NUMBER] Note that this names (https://cloud.google.com/monitoring/api/v3#project_name) the parent container in which to look for the descriptors; to retrieve a single descriptor by name, use the GetNotificationChannelDescriptor operation, instead.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/notificationChannelDescriptors", +"response": { +"$ref": "ListNotificationChannelDescriptorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +}, +"notificationChannels": { +"methods": { +"create": { +"description": "Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.", +"flatPath": "v3/projects/{projectsId}/notificationChannels", +"httpMethod": "POST", +"id": "monitoring.projects.notificationChannels.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/[CHANNEL_ID] to identify the channel.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}/notificationChannels", +"request": { +"$ref": "NotificationChannel" +}, +"response": { +"$ref": "NotificationChannel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"delete": { +"description": "Deletes a notification channel.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.", +"flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", +"httpMethod": "DELETE", +"id": "monitoring.projects.notificationChannels.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The channel for which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/notificationChannels/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.", +"flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", +"httpMethod": "GET", +"id": "monitoring.projects.notificationChannels.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The channel for which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/notificationChannels/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "NotificationChannel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"getVerificationCode": { +"description": "Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as \"G-123456\") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.", +"flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:getVerificationCode", +"httpMethod": "POST", +"id": "monitoring.projects.notificationChannels.getVerificationCode", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail.", +"location": "path", +"pattern": "^projects/[^/]+/notificationChannels/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}:getVerificationCode", +"request": { +"$ref": "GetNotificationChannelVerificationCodeRequest" +}, +"response": { +"$ref": "GetNotificationChannelVerificationCodeResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"list": { +"description": "Lists the notification channels that have been created for the project. To list the types of notification channels that are supported, use the ListNotificationChannelDescriptors method.", +"flatPath": "v3/projects/{projectsId}/notificationChannels", +"httpMethod": "GET", +"id": "monitoring.projects.notificationChannels.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by notification channels to be included in the response.For more details, see sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "A comma-separated list of fields by which to sort the result. Supports the same set of fields as in filter. Entries can be prefixed with a minus sign to sort in descending rather than ascending order.For more details, see sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/notificationChannels", +"response": { +"$ref": "ListNotificationChannelsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"patch": { +"description": "Updates a notification channel. Fields not specified in the field mask remain unchanged.Design your application to single-thread API calls that modify the state of notification channels in a single project. This includes calls to CreateNotificationChannel, DeleteNotificationChannel and UpdateNotificationChannel.", +"flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}", +"httpMethod": "PATCH", +"id": "monitoring.projects.notificationChannels.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The full REST resource name for this channel. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] The [CHANNEL_ID] is automatically assigned by the server on creation.", +"location": "path", +"pattern": "^projects/[^/]+/notificationChannels/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The fields to update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "NotificationChannel" +}, +"response": { +"$ref": "NotificationChannel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"sendVerificationCode": { +"description": "Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.", +"flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:sendVerificationCode", +"httpMethod": "POST", +"id": "monitoring.projects.notificationChannels.sendVerificationCode", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The notification channel to which to send a verification code.", +"location": "path", +"pattern": "^projects/[^/]+/notificationChannels/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}:sendVerificationCode", +"request": { +"$ref": "SendNotificationChannelVerificationCodeRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"verify": { +"description": "Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.", +"flatPath": "v3/projects/{projectsId}/notificationChannels/{notificationChannelsId}:verify", +"httpMethod": "POST", +"id": "monitoring.projects.notificationChannels.verify", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The notification channel to verify.", +"location": "path", +"pattern": "^projects/[^/]+/notificationChannels/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}:verify", +"request": { +"$ref": "VerifyNotificationChannelRequest" +}, +"response": { +"$ref": "NotificationChannel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +} +} +}, +"snoozes": { +"methods": { +"create": { +"description": "Creates a Snooze that will prevent alerts, which match the provided criteria, from being opened. The Snooze applies for a specific time interval.", +"flatPath": "v3/projects/{projectsId}/snoozes", +"httpMethod": "POST", +"id": "monitoring.projects.snoozes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) in which a Snooze should be created. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/snoozes", +"request": { +"$ref": "Snooze" +}, +"response": { +"$ref": "Snooze" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Retrieves a Snooze by name.", +"flatPath": "v3/projects/{projectsId}/snoozes/{snoozesId}", +"httpMethod": "GET", +"id": "monitoring.projects.snoozes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ID of the Snooze to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/snoozes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Snooze" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "Lists the Snoozes associated with a project. Can optionally pass in filter, which specifies predicates to match Snoozes.", +"flatPath": "v3/projects/{projectsId}/snoozes", +"httpMethod": "GET", +"id": "monitoring.projects.snoozes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Optional filter to restrict results to the given criteria. The following fields are supported. interval.start_time interval.end_timeFor example: ``` interval.start_time > \"2022-03-11T00:00:00-08:00\" AND interval.end_time < \"2022-03-12T00:00:00-08:00\" ``` ", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return for a single query. The server may further constrain the maximum number of results returned in a single page. The value should be in the range 1, 1000. If the value given is outside this range, the server will decide the number of results to be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token from a previous call to ListSnoozesRequest to get the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) whose Snoozes should be listed. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/snoozes", +"response": { +"$ref": "ListSnoozesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"patch": { +"description": "Updates a Snooze, identified by its name, with the parameters in the given Snooze object.", +"flatPath": "v3/projects/{projectsId}/snoozes/{snoozesId}", +"httpMethod": "PATCH", +"id": "monitoring.projects.snoozes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.", +"location": "path", +"pattern": "^projects/[^/]+/snoozes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The fields to update.For each field listed in update_mask: If the Snooze object supplied in the UpdateSnoozeRequest has a value for that field, the value of the field in the existing Snooze will be set to the value of the field in the supplied Snooze. If the field does not have a value in the supplied Snooze, the field in the existing Snooze is set to its default value.Fields not listed retain their existing value.The following are the field names that are accepted in update_mask: display_name interval.start_time interval.end_timeThat said, the start time and end time of the Snooze determines which fields can legally be updated. Before attempting an update, users should consult the documentation for UpdateSnoozeRequest, which talks about which fields can be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "Snooze" +}, +"response": { +"$ref": "Snooze" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +} +} +}, +"timeSeries": { +"methods": { +"create": { +"description": "Creates or adds data to one or more time series. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. This method does not support resource locations constraint of an organization policy (https://cloud.google.com/resource-manager/docs/organization-policy/defining-locations#setting_the_organization_policy).", +"flatPath": "v3/projects/{projectsId}/timeSeries", +"httpMethod": "POST", +"id": "monitoring.projects.timeSeries.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}/timeSeries", +"request": { +"$ref": "CreateTimeSeriesRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"createService": { +"description": "Creates or adds data to one or more service time series. A service time series is a time series for a metric from a Google Cloud service. The response is empty if all time series in the request were written. If any time series could not be written, a corresponding failure message is included in the error response. This endpoint rejects writes to user-defined metrics. This method is only for use by Google Cloud services. Use projects.timeSeries.create instead.", +"flatPath": "v3/projects/{projectsId}/timeSeries:createService", +"httpMethod": "POST", +"id": "monitoring.projects.timeSeries.createService", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}/timeSeries:createService", +"request": { +"$ref": "CreateTimeSeriesRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.write" +] +}, +"list": { +"description": "Lists time series that match a filter.", +"flatPath": "v3/projects/{projectsId}/timeSeries", +"httpMethod": "GET", +"id": "monitoring.projects.timeSeries.list", +"parameterOrder": [ +"name" +], +"parameters": { +"aggregation.alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 104 weeks (2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"aggregation.crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"location": "query", +"type": "string" +}, +"aggregation.groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"location": "query", +"repeated": true, +"type": "string" +}, +"aggregation.perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"location": "query", +"type": "string" +}, +"filter": { +"description": "Required. A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) that specifies which time series should be returned. The filter must specify a single metric type, and can additionally specify metric labels and other information. For example: metric.type = \"compute.googleapis.com/instance/cpu/usage_time\" AND metric.labels.instance_name = \"my-instance-name\" ", +"location": "query", +"type": "string" +}, +"interval.endTime": { +"description": "Required. The end of the time interval.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"interval.startTime": { +"description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name), organization or folder on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] organizations/[ORGANIZATION_ID] folders/[FOLDER_ID] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "Unsupported: must be left blank. The points in each time series are currently returned in reverse time order (most recent to oldest).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "A positive number that is the maximum number of results to return. If page_size is empty or more than 100,000 results, the effective page_size is 100,000 results. If view is set to FULL, this is the maximum number of Points returned. If view is set to HEADERS, this is the maximum number of TimeSeries returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +}, +"secondaryAggregation.alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 104 weeks (2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"secondaryAggregation.crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"location": "query", +"type": "string" +}, +"secondaryAggregation.groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"location": "query", +"repeated": true, +"type": "string" +}, +"secondaryAggregation.perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"location": "query", +"type": "string" +}, +"view": { +"description": "Required. Specifies which information is returned about the time series.", +"enum": [ +"FULL", +"HEADERS" +], +"enumDescriptions": [ +"Returns the identity of the metric(s), the time series, and the time series data.", +"Returns the identity of the metric and the time series resource, but not the time series data." +], +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/timeSeries", +"response": { +"$ref": "ListTimeSeriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"query": { +"description": "Queries time series using Monitoring Query Language.", +"flatPath": "v3/projects/{projectsId}/timeSeries:query", +"httpMethod": "POST", +"id": "monitoring.projects.timeSeries.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}/timeSeries:query", +"request": { +"$ref": "QueryTimeSeriesRequest" +}, +"response": { +"$ref": "QueryTimeSeriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +}, +"uptimeCheckConfigs": { +"methods": { +"create": { +"description": "Creates a new Uptime check configuration.", +"flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs", +"httpMethod": "POST", +"id": "monitoring.projects.uptimeCheckConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) in which to create the Uptime check. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/uptimeCheckConfigs", +"request": { +"$ref": "UptimeCheckConfig" +}, +"response": { +"$ref": "UptimeCheckConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"delete": { +"description": "Deletes an Uptime check configuration. Note that this method will fail if the Uptime check configuration is referenced by an alert policy or other dependent configs that would be rendered invalid by the deletion.", +"flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", +"httpMethod": "DELETE", +"id": "monitoring.projects.uptimeCheckConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Uptime check configuration to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Gets a single Uptime check configuration.", +"flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", +"httpMethod": "GET", +"id": "monitoring.projects.uptimeCheckConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Uptime check configuration to retrieve. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] ", +"location": "path", +"pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "UptimeCheckConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "Lists the existing valid Uptime check configurations for the project (leaving out any invalid configurations).", +"flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs", +"httpMethod": "GET", +"id": "monitoring.projects.uptimeCheckConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by uptime checks to be included in the response.For more details, see Filtering syntax (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering#filter_syntax).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is <=0, the server will decide the number of results to be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project (https://cloud.google.com/monitoring/api/v3#project_name) whose Uptime check configurations are listed. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/uptimeCheckConfigs", +"response": { +"$ref": "ListUptimeCheckConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"patch": { +"description": "Updates an Uptime check configuration. You can either replace the entire configuration with a new one or replace only certain fields in the current configuration by specifying the fields to be updated via updateMask. Returns the updated configuration.", +"flatPath": "v3/projects/{projectsId}/uptimeCheckConfigs/{uptimeCheckConfigsId}", +"httpMethod": "PATCH", +"id": "monitoring.projects.uptimeCheckConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Identifier. A unique resource name for this Uptime check configuration. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] [PROJECT_ID_OR_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response.", +"location": "path", +"pattern": "^projects/[^/]+/uptimeCheckConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. If present, only the listed fields in the current Uptime check configuration are updated with values from the new configuration. If this field is empty, then the current configuration is completely replaced with the new configuration.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "UptimeCheckConfig" +}, +"response": { +"$ref": "UptimeCheckConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +} +} +} +} +}, +"services": { +"methods": { +"create": { +"description": "Create a Service.", +"flatPath": "v3/{v3Id}/{v3Id1}/services", +"httpMethod": "POST", +"id": "monitoring.services.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name (https://cloud.google.com/monitoring/api/v3#project_name) of the parent Metrics Scope. The format is: projects/[PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^[^/]+/[^/]+$", +"required": true, +"type": "string" +}, +"serviceId": { +"description": "Optional. The Service id to use for this Service. If omitted, an id will be generated instead. Must match the pattern [a-z0-9\\-]+", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+parent}/services", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"delete": { +"description": "Soft delete this Service.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}", +"httpMethod": "DELETE", +"id": "monitoring.services.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the Service to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Get the named Service.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}", +"httpMethod": "GET", +"id": "monitoring.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "List Services for this Metrics Scope.", +"flatPath": "v3/{v3Id}/{v3Id1}/services", +"httpMethod": "GET", +"id": "monitoring.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter specifying what Services to return. The filter supports filtering on a particular service-identifier type or one of its attributes.To filter on a particular service-identifier type, the identifier_case refers to which option in the identifier field is populated. For example, the filter identifier_case = \"CUSTOM\" would match all services with a value for the custom field. Valid options include \"CUSTOM\", \"APP_ENGINE\", \"MESH_ISTIO\", and the other options listed at https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#ServiceTo filter on an attribute of a service-identifier type, apply the filter name by using the snake case of the service-identifier type and the attribute of that service-identifier type, and join the two with a period. For example, to filter by the meshUid field of the MeshIstio service-identifier type, you must filter on mesh_istio.mesh_uid = \"123\" to match all services with mesh UID \"123\". Service-identifier types and their attributes are described at https://cloud.google.com/monitoring/api/ref_v3/rest/v3/services#Service", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "A non-negative number that is the maximum number of results to return. When 0, use default page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the parent containing the listed services, either a project (https://cloud.google.com/monitoring/api/v3#project_name) or a Monitoring Metrics Scope. The formats are: projects/[PROJECT_ID_OR_NUMBER] workspaces/[HOST_PROJECT_ID_OR_NUMBER] ", +"location": "path", +"pattern": "^[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"patch": { +"description": "Update this Service.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}", +"httpMethod": "PATCH", +"id": "monitoring.services.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Identifier. Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "A set of field paths defining which fields to use for the update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +} +}, +"resources": { +"serviceLevelObjectives": { +"methods": { +"create": { +"description": "Create a ServiceLevelObjective for the given Service.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}/serviceLevelObjectives", +"httpMethod": "POST", +"id": "monitoring.services.serviceLevelObjectives.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the parent Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"serviceLevelObjectiveId": { +"description": "Optional. The ServiceLevelObjective id to use for this ServiceLevelObjective. If omitted, an id will be generated instead. Must match the pattern ^[a-zA-Z0-9-_:.]+$", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+parent}/serviceLevelObjectives", +"request": { +"$ref": "ServiceLevelObjective" +}, +"response": { +"$ref": "ServiceLevelObjective" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"delete": { +"description": "Delete the given ServiceLevelObjective.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}/serviceLevelObjectives/{serviceLevelObjectivesId}", +"httpMethod": "DELETE", +"id": "monitoring.services.serviceLevelObjectives.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the ServiceLevelObjective to delete. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/serviceLevelObjectives/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +}, +"get": { +"description": "Get a ServiceLevelObjective by name.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}/serviceLevelObjectives/{serviceLevelObjectivesId}", +"httpMethod": "GET", +"id": "monitoring.services.serviceLevelObjectives.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the ServiceLevelObjective to get. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/serviceLevelObjectives/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "View of the ServiceLevelObjective to return. If DEFAULT, return the ServiceLevelObjective as originally defined. If EXPLICIT and the ServiceLevelObjective is defined in terms of a BasicSli, replace the BasicSli with a RequestBasedSli spelling out how the SLI is computed.", +"enum": [ +"VIEW_UNSPECIFIED", +"FULL", +"EXPLICIT" +], +"enumDescriptions": [ +"Same as FULL.", +"Return the embedded ServiceLevelIndicator in the form in which it was defined. If it was defined using a BasicSli, return that BasicSli.", +"For ServiceLevelIndicators using BasicSli articulation, instead return the ServiceLevelIndicator with its mode of computation fully spelled out as a RequestBasedSli. For ServiceLevelIndicators using RequestBasedSli or WindowsBasedSli, return the ServiceLevelIndicator as it was provided." +], +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "ServiceLevelObjective" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"list": { +"description": "List the ServiceLevelObjectives for the given Service.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}/serviceLevelObjectives", +"httpMethod": "GET", +"id": "monitoring.services.serviceLevelObjectives.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter specifying what ServiceLevelObjectives to return.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "A non-negative number that is the maximum number of results to return. When 0, use default page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the parent containing the listed SLOs, either a project or a Monitoring Metrics Scope. The formats are: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] workspaces/[HOST_PROJECT_ID_OR_NUMBER]/services/- ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "View of the ServiceLevelObjectives to return. If DEFAULT, return each ServiceLevelObjective as originally defined. If EXPLICIT and the ServiceLevelObjective is defined in terms of a BasicSli, replace the BasicSli with a RequestBasedSli spelling out how the SLI is computed.", +"enum": [ +"VIEW_UNSPECIFIED", +"FULL", +"EXPLICIT" +], +"enumDescriptions": [ +"Same as FULL.", +"Return the embedded ServiceLevelIndicator in the form in which it was defined. If it was defined using a BasicSli, return that BasicSli.", +"For ServiceLevelIndicators using BasicSli articulation, instead return the ServiceLevelIndicator with its mode of computation fully spelled out as a RequestBasedSli. For ServiceLevelIndicators using RequestBasedSli or WindowsBasedSli, return the ServiceLevelIndicator as it was provided." +], +"location": "query", +"type": "string" +} +}, +"path": "v3/{+parent}/serviceLevelObjectives", +"response": { +"$ref": "ListServiceLevelObjectivesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +}, +"patch": { +"description": "Update the given ServiceLevelObjective.", +"flatPath": "v3/{v3Id}/{v3Id1}/services/{servicesId}/serviceLevelObjectives/{serviceLevelObjectivesId}", +"httpMethod": "PATCH", +"id": "monitoring.services.serviceLevelObjectives.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/serviceLevelObjectives/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "A set of field paths defining which fields to use for the update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "ServiceLevelObjective" +}, +"response": { +"$ref": "ServiceLevelObjective" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring" +] +} +} +} +} +}, +"uptimeCheckIps": { +"methods": { +"list": { +"description": "Returns the list of IP addresses that checkers run from", +"flatPath": "v3/uptimeCheckIps", +"httpMethod": "GET", +"id": "monitoring.uptimeCheckIps.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. The server may further constrain the maximum number of results returned in a single page. If the page_size is <=0, the server will decide the number of results to be returned. NOTE: this field is not yet implemented", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return more results from the previous method call. NOTE: this field is not yet implemented", +"location": "query", +"type": "string" +} +}, +"path": "v3/uptimeCheckIps", +"response": { +"$ref": "ListUptimeCheckIpsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/monitoring", +"https://www.googleapis.com/auth/monitoring.read" +] +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://monitoring.googleapis.com/", +"schemas": { +"Aggregation": { +"description": "Describes how to combine multiple time series to provide a different view of the data. Aggregation of time series is done in two steps. First, each time series in the set is aligned to the same time interval boundaries, then the set of time series is optionally reduced in number.Alignment consists of applying the per_series_aligner operation to each time series after its data has been divided into regular alignment_period time intervals. This process takes all of the data points in an alignment period, applies a mathematical transformation such as averaging, minimum, maximum, delta, etc., and converts them into a single data point per period.Reduction is when the aligned and transformed time series can optionally be combined, reducing the number of time series through similar mathematical transformations. Reduction involves applying a cross_series_reducer to all the time series, optionally sorting the time series into subsets with group_by_fields, and applying the reducer to each subset.The raw time series data can contain a huge amount of information from multiple sources. Alignment and reduction transforms this mass of data into a more manageable and representative collection of data, for example \"the 95% latency across the average of all tasks in a cluster\". This representative data can be more easily graphed and comprehended, and the individual time series data is still available for later drilldown. For more details, see Filtering and aggregation (https://cloud.google.com/monitoring/api/v3/aggregation).", +"id": "Aggregation", +"properties": { +"alignmentPeriod": { +"description": "The alignment_period specifies a time interval, in seconds, that is used to divide the data in all the time series into consistent blocks of time. This will be done before the per-series aligner can be applied to the data.The value must be at least 60 seconds. If a per-series aligner other than ALIGN_NONE is specified, this field is required or an error is returned. If no per-series aligner is specified, or the aligner ALIGN_NONE is specified, then this field is ignored.The maximum value of the alignment_period is 104 weeks (2 years) for charts, and 90,000 seconds (25 hours) for alerting policies.", +"format": "google-duration", +"type": "string" +}, +"crossSeriesReducer": { +"description": "The reduction operation to be used to combine time series into a single time series, where the value of each data point in the resulting series is a function of all the already aligned values in the input time series.Not all reducer operations can be applied to all time series. The valid choices depend on the metric_kind and the value_type of the original time series. Reduction can yield a time series with a different metric_kind or value_type than the input time series.Time series data must first be aligned (see per_series_aligner) in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified, and must not be ALIGN_NONE. An alignment_period must also be specified; otherwise, an error is returned.", +"enum": [ +"REDUCE_NONE", +"REDUCE_MEAN", +"REDUCE_MIN", +"REDUCE_MAX", +"REDUCE_SUM", +"REDUCE_STDDEV", +"REDUCE_COUNT", +"REDUCE_COUNT_TRUE", +"REDUCE_COUNT_FALSE", +"REDUCE_FRACTION_TRUE", +"REDUCE_PERCENTILE_99", +"REDUCE_PERCENTILE_95", +"REDUCE_PERCENTILE_50", +"REDUCE_PERCENTILE_05" +], +"enumDescriptions": [ +"No cross-time series reduction. The output of the Aligner is returned.", +"Reduce by computing the mean value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the minimum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the maximum value across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the sum across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric and distribution values. The value_type of the output is the same as the value_type of the input.", +"Reduce by computing the standard deviation across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics with numeric or distribution values. The value_type of the output is DOUBLE.", +"Reduce by computing the number of data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of numeric, Boolean, distribution, and string value_type. The value_type of the output is INT64.", +"Reduce by computing the number of True-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the number of False-valued data points across time series for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The value_type of the output is INT64.", +"Reduce by computing the ratio of the number of True-valued data points to the total number of data points for each alignment period. This reducer is valid for DELTA and GAUGE metrics of Boolean value_type. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Reduce by computing the 99th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 95th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 50th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE.", +"Reduce by computing the 5th percentile (https://en.wikipedia.org/wiki/Percentile) of data points across time series for each alignment period. This reducer is valid for GAUGE and DELTA metrics of numeric and distribution type. The value of the output is DOUBLE." +], +"type": "string" +}, +"groupByFields": { +"description": "The set of fields to preserve when cross_series_reducer is specified. The group_by_fields determine how the time series are partitioned into subsets prior to applying the aggregation operation. Each subset contains time series that have the same value for each of the grouping fields. Each individual time series is a member of exactly one subset. The cross_series_reducer is applied to each subset of time series. It is not possible to reduce across different resource types, so this field implicitly contains resource.type. Fields not specified in group_by_fields are aggregated away. If group_by_fields is not specified and all the time series have the same resource type, then the time series are aggregated into a single output time series. If cross_series_reducer is not defined, this field is ignored.", +"items": { +"type": "string" +}, +"type": "array" +}, +"perSeriesAligner": { +"description": "An Aligner describes how to bring the data points in a single time series into temporal alignment. Except for ALIGN_NONE, all alignments cause all the data points in an alignment_period to be mathematically grouped together, resulting in a single data point for each alignment_period with end timestamp at the end of the period.Not all alignment operations may be applied to all time series. The valid choices depend on the metric_kind and value_type of the original time series. Alignment can change the metric_kind or the value_type of the time series.Time series data must be aligned in order to perform cross-time series reduction. If cross_series_reducer is specified, then per_series_aligner must be specified and not equal to ALIGN_NONE and alignment_period must be specified; otherwise, an error is returned.", +"enum": [ +"ALIGN_NONE", +"ALIGN_DELTA", +"ALIGN_RATE", +"ALIGN_INTERPOLATE", +"ALIGN_NEXT_OLDER", +"ALIGN_MIN", +"ALIGN_MAX", +"ALIGN_MEAN", +"ALIGN_COUNT", +"ALIGN_SUM", +"ALIGN_STDDEV", +"ALIGN_COUNT_TRUE", +"ALIGN_COUNT_FALSE", +"ALIGN_FRACTION_TRUE", +"ALIGN_PERCENTILE_99", +"ALIGN_PERCENTILE_95", +"ALIGN_PERCENTILE_50", +"ALIGN_PERCENTILE_05", +"ALIGN_PERCENT_CHANGE" +], +"enumDescriptions": [ +"No alignment. Raw data is returned. Not valid if cross-series reduction is requested. The value_type of the result is the same as the value_type of the input.", +"Align and convert to DELTA. The output is delta = y1 - y0.This alignment is valid for CUMULATIVE and DELTA metrics. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The value_type of the aligned result is the same as the value_type of the input.", +"Align and convert to a rate. The result is computed as rate = (y1 - y0)/(t1 - t0), or \"delta over time\". Think of this aligner as providing the slope of the line that passes through the value at the start and at the end of the alignment_period.This aligner is valid for CUMULATIVE and DELTA metrics with numeric values. If the selected alignment period results in periods with no data, then the aligned value for such a period is created by interpolation. The output is a GAUGE metric with value_type DOUBLE.If, by \"rate\", you mean \"percentage change\", see the ALIGN_PERCENT_CHANGE aligner instead.", +"Align by interpolating between adjacent points around the alignment period boundary. This aligner is valid for GAUGE metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align by moving the most recent data point before the end of the alignment period to the boundary at the end of the alignment period. This aligner is valid for GAUGE metrics. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the minimum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the maximum value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the mean value in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the aligned result is DOUBLE.", +"Align the time series by returning the number of values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric or Boolean values. The value_type of the aligned result is INT64.", +"Align the time series by returning the sum of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric and distribution values. The value_type of the aligned result is the same as the value_type of the input.", +"Align the time series by returning the standard deviation of the values in each alignment period. This aligner is valid for GAUGE and DELTA metrics with numeric values. The value_type of the output is DOUBLE.", +"Align the time series by returning the number of True values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the number of False values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The value_type of the output is INT64.", +"Align the time series by returning the ratio of the number of True values to the total number of values in each alignment period. This aligner is valid for GAUGE metrics with Boolean values. The output value is in the range 0.0, 1.0 and has value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 99th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 95th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 50th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align the time series by using percentile aggregation (https://en.wikipedia.org/wiki/Percentile). The resulting data point in each alignment period is the 5th percentile of all data points in the period. This aligner is valid for GAUGE and DELTA metrics with distribution values. The output is a GAUGE metric with value_type DOUBLE.", +"Align and convert to a percentage change. This aligner is valid for GAUGE and DELTA metrics with numeric values. This alignment returns ((current - previous)/previous) * 100, where the value of previous is determined based on the alignment_period.If the values of current and previous are both 0, then the returned value is 0. If only previous is 0, the returned value is infinity.A 10-minute moving mean is computed at each point of the alignment period prior to the above calculation to smooth the metric and prevent false positives from very short-lived spikes. The moving mean is only applicable for data whose values are >= 0. Any values < 0 are treated as a missing datapoint, and are ignored. While DELTA metrics are accepted by this alignment, special care should be taken that the values for the metric will always be positive. The output is a GAUGE metric with value_type DOUBLE." +], +"type": "string" +} +}, +"type": "object" +}, +"AlertPolicy": { +"description": "A description of the conditions under which some aspect of your system is considered to be \"unhealthy\" and the ways to notify people or services about this state. For an overview of alert policies, see Introduction to Alerting (https://cloud.google.com/monitoring/alerts/).", +"id": "AlertPolicy", +"properties": { +"alertStrategy": { +"$ref": "AlertStrategy", +"description": "Control over how this alert policy's notification channels are notified." +}, +"combiner": { +"description": "How to combine the results of multiple conditions to determine if an incident should be opened. If condition_time_series_query_language is present, this must be COMBINE_UNSPECIFIED.", +"enum": [ +"COMBINE_UNSPECIFIED", +"AND", +"OR", +"AND_WITH_MATCHING_RESOURCE" +], +"enumDescriptions": [ +"An unspecified combiner.", +"Combine conditions using the logical AND operator. An incident is created only if all the conditions are met simultaneously. This combiner is satisfied if all conditions are met, even if they are met on completely different resources.", +"Combine conditions using the logical OR operator. An incident is created if any of the listed conditions is met.", +"Combine conditions using logical AND operator, but unlike the regular AND option, an incident is created only if all conditions are met simultaneously on at least one resource." +], +"type": "string" +}, +"conditions": { +"description": "A list of conditions for the policy. The conditions are combined by AND or OR according to the combiner field. If the combined conditions evaluate to true, then an incident is created. A policy can have from one to six conditions. If condition_time_series_query_language is present, it must be the only condition. If condition_monitoring_query_language is present, it must be the only condition.", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"creationRecord": { +"$ref": "MutationRecord", +"description": "A read-only record of the creation of the alerting policy. If provided in a call to create or update, this field will be ignored." +}, +"displayName": { +"description": "A short name or phrase used to identify the policy in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple policies in the same project. The name is limited to 512 Unicode characters.The convention for the display_name of a PrometheusQueryLanguageCondition is \"{rule group name}/{alert name}\", where the {rule group name} and {alert name} should be taken from the corresponding Prometheus configuration file. This convention is not enforced. In any case the display_name is not a unique key of the AlertPolicy.", +"type": "string" +}, +"documentation": { +"$ref": "Documentation", +"description": "Documentation that is included with notifications and incidents related to this policy. Best practice is for the documentation to include information to help responders understand, mitigate, escalate, and correct the underlying problems detected by the alerting policy. Notification channels that have limited capacity might not show this documentation." +}, +"enabled": { +"description": "Whether or not the policy is enabled. On write, the default interpretation if unset is that the policy is enabled. On read, clients should not make any assumption about the state if it has not been populated. The field should always be populated on List and Get operations, unless a field projection has been specified that strips it out.", +"type": "boolean" +}, +"mutationRecord": { +"$ref": "MutationRecord", +"description": "A read-only record of the most recent change to the alerting policy. If provided in a call to create or update, this field will be ignored." +}, +"name": { +"description": "Required if the policy exists. The resource name for this policy. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[ALERT_POLICY_ID] [ALERT_POLICY_ID] is assigned by Cloud Monitoring when the policy is created. When calling the alertPolicies.create method, do not include the name field in the alerting policy passed as part of the request.", +"type": "string" +}, +"notificationChannels": { +"description": "Identifies the notification channels to which notifications should be sent when incidents are opened or closed or when new violations occur on an already opened incident. Each element of this array corresponds to the name field in each of the NotificationChannel objects that are returned from the ListNotificationChannels method. The format of the entries in this field is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] ", +"items": { +"type": "string" +}, +"type": "array" +}, +"severity": { +"description": "Optional. The severity of an alert policy indicates how important incidents generated by that policy are. The severity level will be displayed on the Incident detail page and in notifications.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"ERROR", +"WARNING" +], +"enumDescriptions": [ +"No severity is specified. This is the default value.", +"This is the highest severity level. Use this if the problem could cause significant damage or downtime.", +"This is the medium severity level. Use this if the problem could cause minor damage or downtime.", +"This is the lowest severity level. Use this if the problem is not causing any damage or downtime, but could potentially lead to a problem in the future." +], +"type": "string" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-supplied key/value data to be used for organizing and identifying the AlertPolicy objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.Note that Prometheus {alert name} is a valid Prometheus label names (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels), whereas Prometheus {rule group} is an unrestricted UTF-8 string. This means that they cannot be stored as-is in user labels, because they may contain characters that are not allowed in user-label values.", +"type": "object" +}, +"validity": { +"$ref": "Status", +"description": "Read-only description of how the alert policy is invalid. This field is only set when the alert policy is invalid. An invalid alert policy will not generate incidents." +} +}, +"type": "object" +}, +"AlertStrategy": { +"description": "Control over how the notification channels in notification_channels are notified when this alert fires.", +"id": "AlertStrategy", +"properties": { +"autoClose": { +"description": "If an alert policy that was active has no data for this long, any open incidents will close", +"format": "google-duration", +"type": "string" +}, +"notificationChannelStrategy": { +"description": "Control how notifications will be sent out, on a per-channel basis.", +"items": { +"$ref": "NotificationChannelStrategy" +}, +"type": "array" +}, +"notificationRateLimit": { +"$ref": "NotificationRateLimit", +"description": "Required for alert policies with a LogMatch condition.This limit is not implemented for alert policies that are not log-based." +} +}, +"type": "object" +}, +"AppEngine": { +"description": "App Engine service. Learn more at https://cloud.google.com/appengine.", +"id": "AppEngine", +"properties": { +"moduleId": { +"description": "The ID of the App Engine module underlying this service. Corresponds to the module_id resource label in the gae_app monitored resource (https://cloud.google.com/monitoring/api/resources#tag_gae_app).", +"type": "string" +} +}, +"type": "object" +}, +"AvailabilityCriteria": { +"description": "Future parameters for the availability SLI.", +"id": "AvailabilityCriteria", +"properties": {}, +"type": "object" +}, +"BasicAuthentication": { +"description": "The authentication parameters to provide to the specified resource or URL that requires a username and password. Currently, only Basic HTTP authentication (https://tools.ietf.org/html/rfc7617) is supported in Uptime checks.", +"id": "BasicAuthentication", +"properties": { +"password": { +"description": "The password to use when authenticating with the HTTP server.", +"type": "string" +}, +"username": { +"description": "The username to use when authenticating with the HTTP server.", +"type": "string" +} +}, +"type": "object" +}, +"BasicService": { +"description": "A well-known service type, defined by its service type and service labels. Documentation and examples here (https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).", +"id": "BasicService", +"properties": { +"serviceLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels that specify the resource that emits the monitoring data which is used for SLO reporting of this Service. Documentation and valid values for given service types here (https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).", +"type": "object" +}, +"serviceType": { +"description": "The type of service that this basic service defines, e.g. APP_ENGINE service type. Documentation and valid values here (https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli).", +"type": "string" +} +}, +"type": "object" +}, +"BasicSli": { +"description": "An SLI measuring performance on a well-known service type. Performance will be computed on the basis of pre-defined metrics. The type of the service_resource determines the metrics to use and the service_resource.labels and metric_labels are used to construct a monitoring filter to filter that metric down to just the data relevant to this service.", +"id": "BasicSli", +"properties": { +"availability": { +"$ref": "AvailabilityCriteria", +"description": "Good service is defined to be the count of requests made to this service that return successfully." +}, +"latency": { +"$ref": "LatencyCriteria", +"description": "Good service is defined to be the count of requests made to this service that are fast enough with respect to latency.threshold." +}, +"location": { +"description": "OPTIONAL: The set of locations to which this SLI is relevant. Telemetry from other locations will not be used to calculate performance for this SLI. If omitted, this SLI applies to all locations in which the Service has activity. For service types that don't support breaking down by location, setting this field will result in an error.", +"items": { +"type": "string" +}, +"type": "array" +}, +"method": { +"description": "OPTIONAL: The set of RPCs to which this SLI is relevant. Telemetry from other methods will not be used to calculate performance for this SLI. If omitted, this SLI applies to all the Service's methods. For service types that don't support breaking down by method, setting this field will result in an error.", +"items": { +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "OPTIONAL: The set of API versions to which this SLI is relevant. Telemetry from other API versions will not be used to calculate performance for this SLI. If omitted, this SLI applies to all API versions. For service types that don't support breaking down by version, setting this field will result in an error.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BucketOptions": { +"description": "BucketOptions describes the bucket boundaries used to create a histogram for the distribution. The buckets can be in a linear sequence, an exponential sequence, or each bucket can be specified explicitly. BucketOptions does not include the number of values in each bucket.A bucket has an inclusive lower bound and exclusive upper bound for the values that are counted for that bucket. The upper bound of a bucket must be strictly greater than the lower bound. The sequence of N buckets for a distribution consists of an underflow bucket (number 0), zero or more finite buckets (number 1 through N - 2) and an overflow bucket (number N - 1). The buckets are contiguous: the lower bound of bucket i (i > 0) is the same as the upper bound of bucket i - 1. The buckets span the whole range of finite values: lower bound of the underflow bucket is -infinity and the upper bound of the overflow bucket is +infinity. The finite buckets are so-called because both bounds are finite.", +"id": "BucketOptions", +"properties": { +"explicitBuckets": { +"$ref": "Explicit", +"description": "The explicit buckets." +}, +"exponentialBuckets": { +"$ref": "Exponential", +"description": "The exponential buckets." +}, +"linearBuckets": { +"$ref": "Linear", +"description": "The linear bucket." +} +}, +"type": "object" +}, +"CloudEndpoints": { +"description": "Cloud Endpoints service. Learn more at https://cloud.google.com/endpoints.", +"id": "CloudEndpoints", +"properties": { +"service": { +"description": "The name of the Cloud Endpoints service underlying this service. Corresponds to the service resource label in the api monitored resource (https://cloud.google.com/monitoring/api/resources#tag_api).", +"type": "string" +} +}, +"type": "object" +}, +"CloudFunctionV2Target": { +"description": "A Synthetic Monitor deployed to a Cloud Functions V2 instance.", +"id": "CloudFunctionV2Target", +"properties": { +"cloudRunRevision": { +"$ref": "MonitoredResource", +"description": "Output only. The cloud_run_revision Monitored Resource associated with the GCFv2. The Synthetic Monitor execution results (metrics, logs, and spans) are reported against this Monitored Resource. This field is output only.", +"readOnly": true +}, +"name": { +"description": "Required. Fully qualified GCFv2 resource name i.e. projects/{project}/locations/{location}/functions/{function} Required.", +"type": "string" +} +}, +"type": "object" +}, +"CloudRun": { +"description": "Cloud Run service. Learn more at https://cloud.google.com/run.", +"id": "CloudRun", +"properties": { +"location": { +"description": "The location the service is run. Corresponds to the location resource label in the cloud_run_revision monitored resource (https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision).", +"type": "string" +}, +"serviceName": { +"description": "The name of the Cloud Run service. Corresponds to the service_name resource label in the cloud_run_revision monitored resource (https://cloud.google.com/monitoring/api/resources#tag_cloud_run_revision).", +"type": "string" +} +}, +"type": "object" +}, +"ClusterIstio": { +"description": "Istio service scoped to a single Kubernetes cluster. Learn more at https://istio.io. Clusters running OSS Istio will have their services ingested as this type.", +"id": "ClusterIstio", +"properties": { +"clusterName": { +"description": "The name of the Kubernetes cluster in which this Istio service is defined. Corresponds to the cluster_name resource label in k8s_cluster resources.", +"type": "string" +}, +"location": { +"description": "The location of the Kubernetes cluster in which this Istio service is defined. Corresponds to the location resource label in k8s_cluster resources.", +"type": "string" +}, +"serviceName": { +"description": "The name of the Istio service underlying this service. Corresponds to the destination_service_name metric label in Istio metrics.", +"type": "string" +}, +"serviceNamespace": { +"description": "The namespace of the Istio service underlying this service. Corresponds to the destination_service_namespace metric label in Istio metrics.", +"type": "string" +} +}, +"type": "object" +}, +"CollectdPayload": { +"description": "A collection of data points sent from a collectd-based plugin. See the collectd documentation for more information.", +"id": "CollectdPayload", +"properties": { +"endTime": { +"description": "The end time of the interval.", +"format": "google-datetime", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"$ref": "TypedValue" +}, +"description": "The measurement metadata. Example: \"process_id\" -> 12345", +"type": "object" +}, +"plugin": { +"description": "The name of the plugin. Example: \"disk\".", +"type": "string" +}, +"pluginInstance": { +"description": "The instance name of the plugin Example: \"hdcl\".", +"type": "string" +}, +"startTime": { +"description": "The start time of the interval.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "The measurement type. Example: \"memory\".", +"type": "string" +}, +"typeInstance": { +"description": "The measurement type instance. Example: \"used\".", +"type": "string" +}, +"values": { +"description": "The measured values during this time interval. Each value must have a different data_source_name.", +"items": { +"$ref": "CollectdValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"CollectdPayloadError": { +"description": "Describes the error status for payloads that were not written.", +"id": "CollectdPayloadError", +"properties": { +"error": { +"$ref": "Status", +"description": "Records the error status for the payload. If this field is present, the partial errors for nested values won't be populated." +}, +"index": { +"description": "The zero-based index in CreateCollectdTimeSeriesRequest.collectd_payloads.", +"format": "int32", +"type": "integer" +}, +"valueErrors": { +"description": "Records the error status for values that were not written due to an error.Failed payloads for which nothing is written will not include partial value errors.", +"items": { +"$ref": "CollectdValueError" +}, +"type": "array" +} +}, +"type": "object" +}, +"CollectdValue": { +"description": "A single data point from a collectd-based plugin.", +"id": "CollectdValue", +"properties": { +"dataSourceName": { +"description": "The data source for the collectd value. For example, there are two data sources for network measurements: \"rx\" and \"tx\".", +"type": "string" +}, +"dataSourceType": { +"description": "The type of measurement.", +"enum": [ +"UNSPECIFIED_DATA_SOURCE_TYPE", +"GAUGE", +"COUNTER", +"DERIVE", +"ABSOLUTE" +], +"enumDescriptions": [ +"An unspecified data source type. This corresponds to google.api.MetricDescriptor.MetricKind.METRIC_KIND_UNSPECIFIED.", +"An instantaneous measurement of a varying quantity. This corresponds to google.api.MetricDescriptor.MetricKind.GAUGE.", +"A cumulative value over time. This corresponds to google.api.MetricDescriptor.MetricKind.CUMULATIVE.", +"A rate of change of the measurement.", +"An amount of change since the last measurement interval. This corresponds to google.api.MetricDescriptor.MetricKind.DELTA." +], +"type": "string" +}, +"value": { +"$ref": "TypedValue", +"description": "The measurement value." +} +}, +"type": "object" +}, +"CollectdValueError": { +"description": "Describes the error status for values that were not written.", +"id": "CollectdValueError", +"properties": { +"error": { +"$ref": "Status", +"description": "Records the error status for the value." +}, +"index": { +"description": "The zero-based index in CollectdPayload.values within the parent CreateCollectdTimeSeriesRequest.collectd_payloads.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Condition": { +"description": "A condition is a true/false test that determines when an alerting policy should open an incident. If a condition evaluates to true, it signifies that something is wrong.", +"id": "Condition", +"properties": { +"conditionAbsent": { +"$ref": "MetricAbsence", +"description": "A condition that checks that a time series continues to receive new data points." +}, +"conditionMatchedLog": { +"$ref": "LogMatch", +"description": "A condition that checks for log messages matching given constraints. If set, no other conditions can be present." +}, +"conditionMonitoringQueryLanguage": { +"$ref": "MonitoringQueryLanguageCondition", +"description": "A condition that uses the Monitoring Query Language to define alerts." +}, +"conditionPrometheusQueryLanguage": { +"$ref": "PrometheusQueryLanguageCondition", +"description": "A condition that uses the Prometheus query language to define alerts." +}, +"conditionThreshold": { +"$ref": "MetricThreshold", +"description": "A condition that compares a time series against a threshold." +}, +"displayName": { +"description": "A short name or phrase used to identify the condition in dashboards, notifications, and incidents. To avoid confusion, don't use the same display name for multiple conditions in the same policy.", +"type": "string" +}, +"name": { +"description": "Required if the condition exists. The unique resource name for this condition. Its format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID]/conditions/[CONDITION_ID] [CONDITION_ID] is assigned by Cloud Monitoring when the condition is created as part of a new or updated alerting policy.When calling the alertPolicies.create method, do not include the name field in the conditions of the requested alerting policy. Cloud Monitoring creates the condition identifiers and includes them in the new policy.When calling the alertPolicies.update method to update a policy, including a condition name causes the existing condition to be updated. Conditions without names are added to the updated policy. Existing conditions are deleted if they are not updated.Best practice is to preserve [CONDITION_ID] if you make only small changes, such as those to condition thresholds, durations, or trigger values. Otherwise, treat the change as a new condition and let the existing condition be deleted.", +"type": "string" +} +}, +"type": "object" +}, +"ContentMatcher": { +"description": "Optional. Used to perform content matching. This allows matching based on substrings and regular expressions, together with their negations. Only the first 4 MB of an HTTP or HTTPS check's response (and the first 1 MB of a TCP check's response) are examined for purposes of content matching.", +"id": "ContentMatcher", +"properties": { +"content": { +"description": "String, regex or JSON content to match. Maximum 1024 bytes. An empty content string indicates no content matching is to be performed.", +"type": "string" +}, +"jsonPathMatcher": { +"$ref": "JsonPathMatcher", +"description": "Matcher information for MATCHES_JSON_PATH and NOT_MATCHES_JSON_PATH" +}, +"matcher": { +"description": "The type of content matcher that will be applied to the server output, compared to the content string when the check is run.", +"enum": [ +"CONTENT_MATCHER_OPTION_UNSPECIFIED", +"CONTAINS_STRING", +"NOT_CONTAINS_STRING", +"MATCHES_REGEX", +"NOT_MATCHES_REGEX", +"MATCHES_JSON_PATH", +"NOT_MATCHES_JSON_PATH" +], +"enumDescriptions": [ +"No content matcher type specified (maintained for backward compatibility, but deprecated for future use). Treated as CONTAINS_STRING.", +"Selects substring matching. The match succeeds if the output contains the content string. This is the default value for checks without a matcher option, or where the value of matcher is CONTENT_MATCHER_OPTION_UNSPECIFIED.", +"Selects negation of substring matching. The match succeeds if the output does NOT contain the content string.", +"Selects regular-expression matching. The match succeeds if the output matches the regular expression specified in the content string. Regex matching is only supported for HTTP/HTTPS checks.", +"Selects negation of regular-expression matching. The match succeeds if the output does NOT match the regular expression specified in the content string. Regex matching is only supported for HTTP/HTTPS checks.", +"Selects JSONPath matching. See JsonPathMatcher for details on when the match succeeds. JSONPath matching is only supported for HTTP/HTTPS checks.", +"Selects JSONPath matching. See JsonPathMatcher for details on when the match succeeds. Succeeds when output does NOT match as specified. JSONPath is only supported for HTTP/HTTPS checks." +], +"type": "string" +} +}, +"type": "object" +}, +"CreateCollectdTimeSeriesRequest": { +"description": "The CreateCollectdTimeSeries request.", +"id": "CreateCollectdTimeSeriesRequest", +"properties": { +"collectdPayloads": { +"description": "The collectd payloads representing the time series data. You must not include more than a single point for each time series, so no two payloads can have the same values for all of the fields plugin, plugin_instance, type, and type_instance.", +"items": { +"$ref": "CollectdPayload" +}, +"type": "array" +}, +"collectdVersion": { +"description": "The version of collectd that collected the data. Example: \"5.3.0-192.el6\".", +"type": "string" +}, +"resource": { +"$ref": "MonitoredResource", +"description": "The monitored resource associated with the time series." +} +}, +"type": "object" +}, +"CreateCollectdTimeSeriesResponse": { +"description": "The CreateCollectdTimeSeries response.", +"id": "CreateCollectdTimeSeriesResponse", +"properties": { +"payloadErrors": { +"description": "Records the error status for points that were not written due to an error in the request.Failed requests for which nothing is written will return an error response instead. Requests where data points were rejected by the backend will set summary instead.", +"items": { +"$ref": "CollectdPayloadError" +}, +"type": "array" +}, +"summary": { +"$ref": "CreateTimeSeriesSummary", +"description": "Aggregate statistics from writing the payloads. This field is omitted if all points were successfully written, so that the response is empty. This is for backwards compatibility with clients that log errors on any non-empty response." +} +}, +"type": "object" +}, +"CreateTimeSeriesRequest": { +"description": "The CreateTimeSeries request.", +"id": "CreateTimeSeriesRequest", +"properties": { +"timeSeries": { +"description": "Required. The new data to be added to a list of time series. Adds at most one data point to each of several time series. The new data point must be more recent than any other point in its time series. Each TimeSeries value must fully specify a unique time series by supplying all label values for the metric and the monitored resource.The maximum number of TimeSeries objects per Create request is 200.", +"items": { +"$ref": "TimeSeries" +}, +"type": "array" +} +}, +"type": "object" +}, +"CreateTimeSeriesSummary": { +"description": "Summary of the result of a failed request to write data to a time series.", +"id": "CreateTimeSeriesSummary", +"properties": { +"errors": { +"description": "The number of points that failed to be written. Order is not guaranteed.", +"items": { +"$ref": "Error" +}, +"type": "array" +}, +"successPointCount": { +"description": "The number of points that were successfully written.", +"format": "int32", +"type": "integer" +}, +"totalPointCount": { +"description": "The number of points in the request.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Criteria": { +"description": "Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied.", +"id": "Criteria", +"properties": { +"policies": { +"description": "The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Custom": { +"description": "Use a custom service to designate a service that you want to monitor when none of the other service types (like App Engine, Cloud Run, or a GKE type) matches your intended service.", +"id": "Custom", +"properties": {}, +"type": "object" +}, +"Distribution": { +"description": "Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.The summary statistics are the count, mean, sum of the squared deviation from the mean, the minimum, and the maximum of the set of population of values. The histogram is based on a sequence of buckets and gives a count of values that fall into each bucket. The boundaries of the buckets are given either explicitly or by formulas for buckets of fixed or exponentially increasing widths.Although it is not forbidden, it is generally a bad idea to include non-finite values (infinities or NaNs) in the population of values, as this will render the mean and sum_of_squared_deviation fields meaningless.", +"id": "Distribution", +"properties": { +"bucketCounts": { +"description": "Required in the Cloud Monitoring API v3. The values for each bucket specified in bucket_options. The sum of the values in bucketCounts must equal the value in the count field of the Distribution object. The order of the bucket counts follows the numbering schemes described for the three bucket types. The underflow bucket has number 0; the finite buckets, if any, have numbers 1 through N-2; and the overflow bucket has number N-1. The size of bucket_counts must not be greater than N. If the size is less than N, then the remaining buckets are assigned values of zero.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"bucketOptions": { +"$ref": "BucketOptions", +"description": "Required in the Cloud Monitoring API v3. Defines the histogram bucket boundaries." +}, +"count": { +"description": "The number of values in the population. Must be non-negative. This value must equal the sum of the values in bucket_counts if a histogram is provided.", +"format": "int64", +"type": "string" +}, +"exemplars": { +"description": "Must be in increasing order of value field.", +"items": { +"$ref": "Exemplar" +}, +"type": "array" +}, +"mean": { +"description": "The arithmetic mean of the values in the population. If count is zero then this field must be zero.", +"format": "double", +"type": "number" +}, +"range": { +"$ref": "Range", +"description": "If specified, contains the range of the population values. The field must not be present if the count is zero. This field is presently ignored by the Cloud Monitoring API v3." +}, +"sumOfSquaredDeviation": { +"description": "The sum of squared deviations from the mean of the values in the population. For values x_i this is: Sum[i=1..n]((x_i - mean)^2) Knuth, \"The Art of Computer Programming\", Vol. 2, page 232, 3rd edition describes Welford's method for accumulating this sum in one pass.If count is zero then this field must be zero.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"DistributionCut": { +"description": "A DistributionCut defines a TimeSeries and thresholds used for measuring good service and total service. The TimeSeries must have ValueType = DISTRIBUTION and MetricKind = DELTA or MetricKind = CUMULATIVE. The computed good_service will be the estimated count of values in the Distribution that fall within the specified min and max.", +"id": "DistributionCut", +"properties": { +"distributionFilter": { +"description": "A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries aggregating values. Must have ValueType = DISTRIBUTION and MetricKind = DELTA or MetricKind = CUMULATIVE.", +"type": "string" +}, +"range": { +"$ref": "GoogleMonitoringV3Range", +"description": "Range of values considered \"good.\" For a one-sided range, set one bound to an infinite value." +} +}, +"type": "object" +}, +"Documentation": { +"description": "Documentation that is included in the notifications and incidents pertaining to this policy.", +"id": "Documentation", +"properties": { +"content": { +"description": "The body of the documentation, interpreted according to mime_type. The content may not exceed 8,192 Unicode characters and may not exceed more than 10,240 bytes when encoded in UTF-8 format, whichever is smaller. This text can be templatized by using variables (https://cloud.google.com/monitoring/alerts/doc-variables).", +"type": "string" +}, +"mimeType": { +"description": "The format of the content field. Presently, only the value \"text/markdown\" is supported. See Markdown (https://en.wikipedia.org/wiki/Markdown) for more information.", +"type": "string" +}, +"subject": { +"description": "Optional. The subject line of the notification. The subject line may not exceed 10,240 bytes. In notifications generated by this policy, the contents of the subject line after variable expansion will be truncated to 255 bytes or shorter at the latest UTF-8 character boundary. The 255-byte limit is recommended by this thread (https://stackoverflow.com/questions/1592291/what-is-the-email-subject-length-limit). It is both the limit imposed by some third-party ticketing products and it is common to define textual fields in databases as VARCHAR(255).The contents of the subject line can be templatized by using variables (https://cloud.google.com/monitoring/alerts/doc-variables). If this field is missing or empty, a default subject line will be generated.", +"type": "string" +} +}, +"type": "object" +}, +"DroppedLabels": { +"description": "A set of (label, value) pairs that were removed from a Distribution time series during aggregation and then added as an attachment to a Distribution.Exemplar.The full label set for the exemplars is constructed by using the dropped pairs in combination with the label values that remain on the aggregated Distribution time series. The constructed full label set can be used to identify the specific entity, such as the instance or job, which might be contributing to a long-tail. However, with dropped labels, the storage requirements are reduced because only the aggregated distribution values for a large group of time series are stored.Note that there are no guarantees on ordering of the labels from exemplar-to-exemplar and from distribution-to-distribution in the same stream, and there may be duplicates. It is up to clients to resolve any ambiguities.", +"id": "DroppedLabels", +"properties": { +"label": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from label to its value, for all labels dropped in any aggregation.", +"type": "object" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); } ", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Error": { +"description": "Detailed information about an error category.", +"id": "Error", +"properties": { +"pointCount": { +"description": "The number of points that couldn't be written because of status.", +"format": "int32", +"type": "integer" +}, +"status": { +"$ref": "Status", +"description": "The status of the requested write operation." +} +}, +"type": "object" +}, +"Exemplar": { +"description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.", +"id": "Exemplar", +"properties": { +"attachments": { +"description": "Contextual information about the example value. Examples are:Trace: type.googleapis.com/google.monitoring.v3.SpanContextLiteral string: type.googleapis.com/google.protobuf.StringValueLabels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabelsThere may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"timestamp": { +"description": "The observation (sampling) time of the above value.", +"format": "google-datetime", +"type": "string" +}, +"value": { +"description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Explicit": { +"description": "Specifies a set of buckets with arbitrary widths.There are size(bounds) + 1 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): boundsi Lower bound (1 <= i < N); boundsi - 1The bounds field must contain at least one element. If bounds has only one element, then there are no finite buckets, and that single element is the common boundary of the overflow and underflow buckets.", +"id": "Explicit", +"properties": { +"bounds": { +"description": "The values must be monotonically increasing.", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"Exponential": { +"description": "Specifies an exponential sequence of buckets that have a width that is proportional to the value of the lower bound. Each bucket represents a constant relative uncertainty on a specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): scale * (growth_factor ^ i).Lower bound (1 <= i < N): scale * (growth_factor ^ (i - 1)).", +"id": "Exponential", +"properties": { +"growthFactor": { +"description": "Must be greater than 1.", +"format": "double", +"type": "number" +}, +"numFiniteBuckets": { +"description": "Must be greater than 0.", +"format": "int32", +"type": "integer" +}, +"scale": { +"description": "Must be greater than 0.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in Type.oneofs, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: \"type.googleapis.com/google.protobuf.Timestamp\".", +"type": "string" +} +}, +"type": "object" +}, +"ForecastOptions": { +"description": "Options used when forecasting the time series and testing the predicted value against the threshold.", +"id": "ForecastOptions", +"properties": { +"forecastHorizon": { +"description": "Required. The length of time into the future to forecast whether a time series will violate the threshold. If the predicted value is found to violate the threshold, and the violation is observed in all forecasts made for the configured duration, then the time series is considered to be failing. The forecast horizon can range from 1 hour to 60 hours.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GetNotificationChannelVerificationCodeRequest": { +"description": "The GetNotificationChannelVerificationCode request.", +"id": "GetNotificationChannelVerificationCodeRequest", +"properties": { +"expireTime": { +"description": "The desired expiration time. If specified, the API will guarantee that the returned code will not be valid after the specified timestamp; however, the API cannot guarantee that the returned code will be valid for at least as long as the requested time (the API puts an upper bound on the amount of time for which a code may be valid). If omitted, a default expiration will be used, which may be less than the max permissible expiration (so specifying an expiration may extend the code's lifetime over omitting an expiration, even though the API does impose an upper limit on the maximum expiration that is permitted).", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GetNotificationChannelVerificationCodeResponse": { +"description": "The GetNotificationChannelVerificationCode request.", +"id": "GetNotificationChannelVerificationCodeResponse", +"properties": { +"code": { +"description": "The verification code, which may be used to verify other channels that have an equivalent identity (i.e. other channels of the same type with the same fingerprint such as other email channels with the same email address or other sms channels with the same number).", +"type": "string" +}, +"expireTime": { +"description": "The expiration time associated with the code that was returned. If an expiration was provided in the request, this is the minimum of the requested expiration in the request and the max permitted expiration.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GkeNamespace": { +"description": "GKE Namespace. The field names correspond to the resource metadata labels on monitored resources that fall under a namespace (for example, k8s_container or k8s_pod).", +"id": "GkeNamespace", +"properties": { +"clusterName": { +"description": "The name of the parent cluster.", +"type": "string" +}, +"location": { +"description": "The location of the parent cluster. This may be a zone or region.", +"type": "string" +}, +"namespaceName": { +"description": "The name of this namespace.", +"type": "string" +}, +"projectId": { +"description": "Output only. The project this resource lives in. For legacy services migrated from the Custom type, this may be a distinct project from the one parenting the service itself.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GkeService": { +"description": "GKE Service. The \"service\" here represents a Kubernetes service object (https://kubernetes.io/docs/concepts/services-networking/service). The field names correspond to the resource labels on k8s_service monitored resources (https://cloud.google.com/monitoring/api/resources#tag_k8s_service).", +"id": "GkeService", +"properties": { +"clusterName": { +"description": "The name of the parent cluster.", +"type": "string" +}, +"location": { +"description": "The location of the parent cluster. This may be a zone or region.", +"type": "string" +}, +"namespaceName": { +"description": "The name of the parent namespace.", +"type": "string" +}, +"projectId": { +"description": "Output only. The project this resource lives in. For legacy services migrated from the Custom type, this may be a distinct project from the one parenting the service itself.", +"readOnly": true, +"type": "string" +}, +"serviceName": { +"description": "The name of this service.", +"type": "string" +} +}, +"type": "object" +}, +"GkeWorkload": { +"description": "A GKE Workload (Deployment, StatefulSet, etc). The field names correspond to the metadata labels on monitored resources that fall under a workload (for example, k8s_container or k8s_pod).", +"id": "GkeWorkload", +"properties": { +"clusterName": { +"description": "The name of the parent cluster.", +"type": "string" +}, +"location": { +"description": "The location of the parent cluster. This may be a zone or region.", +"type": "string" +}, +"namespaceName": { +"description": "The name of the parent namespace.", +"type": "string" +}, +"projectId": { +"description": "Output only. The project this resource lives in. For legacy services migrated from the Custom type, this may be a distinct project from the one parenting the service itself.", +"readOnly": true, +"type": "string" +}, +"topLevelControllerName": { +"description": "The name of this workload.", +"type": "string" +}, +"topLevelControllerType": { +"description": "The type of this workload (for example, \"Deployment\" or \"DaemonSet\")", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMonitoringV3Range": { +"description": "Range of numerical values within min and max.", +"id": "GoogleMonitoringV3Range", +"properties": { +"max": { +"description": "Range maximum.", +"format": "double", +"type": "number" +}, +"min": { +"description": "Range minimum.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Group": { +"description": "The description of a dynamic collection of monitored resources. Each group has a filter that is matched against monitored resources and their associated metadata. If a group's filter matches an available monitored resource, then that resource is a member of that group. Groups can contain any number of monitored resources, and each monitored resource can be a member of any number of groups.Groups can be nested in parent-child hierarchies. The parentName field identifies an optional parent for each group. If a group has a parent, then the only monitored resources available to be matched by the group's filter are the resources contained in the parent group. In other words, a group contains the monitored resources that match its filter and the filters of all the group's ancestors. A group without a parent can contain any monitored resource.For example, consider an infrastructure running a set of instances with two user-defined tags: \"environment\" and \"role\". A parent group has a filter, environment=\"production\". A child of that parent group has a filter, role=\"transcoder\". The parent group contains all instances in the production environment, regardless of their roles. The child group contains instances that have the transcoder role and are in the production environment.The monitored resources contained in a group can change at any moment, depending on what resources exist and what filters are associated with the group and its ancestors.", +"id": "Group", +"properties": { +"displayName": { +"description": "A user-assigned name for this group, used only for display purposes.", +"type": "string" +}, +"filter": { +"description": "The filter used to determine which monitored resources belong to this group.", +"type": "string" +}, +"isCluster": { +"description": "If true, the members of this group are considered to be a cluster. The system can perform additional analysis on groups that are clusters.", +"type": "boolean" +}, +"name": { +"description": "Output only. The name of this group. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] When creating a group, this field is ignored and a new name is created consisting of the project specified in the call to CreateGroup and a unique [GROUP_ID] that is generated automatically.", +"type": "string" +}, +"parentName": { +"description": "The name of the group's parent, if it has one. The format is: projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID] For groups with no parent, parent_name is the empty string, \"\".", +"type": "string" +} +}, +"type": "object" +}, +"HttpCheck": { +"description": "Information involved in an HTTP/HTTPS Uptime check request.", +"id": "HttpCheck", +"properties": { +"acceptedResponseStatusCodes": { +"description": "If present, the check will only pass if the HTTP response status code is in this set of status codes. If empty, the HTTP status code will only pass if the HTTP status code is 200-299.", +"items": { +"$ref": "ResponseStatusCode" +}, +"type": "array" +}, +"authInfo": { +"$ref": "BasicAuthentication", +"description": "The authentication information. Optional when creating an HTTP check; defaults to empty. Do not set both auth_method and auth_info." +}, +"body": { +"description": "The request body associated with the HTTP POST request. If content_type is URL_ENCODED, the body passed in must be URL-encoded. Users can provide a Content-Length header via the headers field or the API will do so. If the request_method is GET and body is not empty, the API will return an error. The maximum byte size is 1 megabyte.Note: If client libraries aren't used (which performs the conversion automatically) base64 encode your body data since the field is of bytes type.", +"format": "byte", +"type": "string" +}, +"contentType": { +"description": "The content type header to use for the check. The following configurations result in errors: 1. Content type is specified in both the headers field and the content_type field. 2. Request method is GET and content_type is not TYPE_UNSPECIFIED 3. Request method is POST and content_type is TYPE_UNSPECIFIED. 4. Request method is POST and a \"Content-Type\" header is provided via headers field. The content_type field should be used instead.", +"enum": [ +"TYPE_UNSPECIFIED", +"URL_ENCODED", +"USER_PROVIDED" +], +"enumDescriptions": [ +"No content type specified.", +"body is in URL-encoded form. Equivalent to setting the Content-Type to application/x-www-form-urlencoded in the HTTP request.", +"body is in custom_content_type form. Equivalent to setting the Content-Type to the contents of custom_content_type in the HTTP request." +], +"type": "string" +}, +"customContentType": { +"description": "A user provided content type header to use for the check. The invalid configurations outlined in the content_type field apply to custom_content_type, as well as the following: 1. content_type is URL_ENCODED and custom_content_type is set. 2. content_type is USER_PROVIDED and custom_content_type is not set.", +"type": "string" +}, +"headers": { +"additionalProperties": { +"type": "string" +}, +"description": "The list of headers to send as part of the Uptime check request. If two headers have the same key and different values, they should be entered as a single header, with the value being a comma-separated list of all the desired values as described at https://www.w3.org/Protocols/rfc2616/rfc2616.txt (page 31). Entering two separate headers with the same key in a Create call will cause the first to be overwritten by the second. The maximum number of headers allowed is 100.", +"type": "object" +}, +"maskHeaders": { +"description": "Boolean specifying whether to encrypt the header information. Encryption should be specified for any headers related to authentication that you do not wish to be seen when retrieving the configuration. The server will be responsible for encrypting the headers. On Get/List calls, if mask_headers is set to true then the headers will be obscured with ******.", +"type": "boolean" +}, +"path": { +"description": "Optional (defaults to \"/\"). The path to the page against which to run the check. Will be combined with the host (specified within the monitored_resource) and port to construct the full URL. If the provided path does not begin with \"/\", a \"/\" will be prepended automatically.", +"type": "string" +}, +"pingConfig": { +"$ref": "PingConfig", +"description": "Contains information needed to add pings to an HTTP check." +}, +"port": { +"description": "Optional (defaults to 80 when use_ssl is false, and 443 when use_ssl is true). The TCP port on the HTTP server against which to run the check. Will be combined with host (specified within the monitored_resource) and path to construct the full URL.", +"format": "int32", +"type": "integer" +}, +"requestMethod": { +"description": "The HTTP request method to use for the check. If set to METHOD_UNSPECIFIED then request_method defaults to GET.", +"enum": [ +"METHOD_UNSPECIFIED", +"GET", +"POST" +], +"enumDescriptions": [ +"No request method specified.", +"GET request.", +"POST request." +], +"type": "string" +}, +"serviceAgentAuthentication": { +"$ref": "ServiceAgentAuthentication", +"description": "If specified, Uptime will generate and attach an OIDC JWT token for the Monitoring service agent service account as an Authorization header in the HTTP request when probing." +}, +"useSsl": { +"description": "If true, use HTTPS instead of HTTP to run the check.", +"type": "boolean" +}, +"validateSsl": { +"description": "Boolean specifying whether to include SSL certificate validation as a part of the Uptime check. Only applies to checks where monitored_resource is set to uptime_url. If use_ssl is false, setting validate_ssl to true has no effect.", +"type": "boolean" +} +}, +"type": "object" +}, +"InternalChecker": { +"deprecated": true, +"description": "An internal checker allows Uptime checks to run on private/internal GCP resources.", +"id": "InternalChecker", +"properties": { +"displayName": { +"description": "The checker's human-readable name. The display name should be unique within a Cloud Monitoring Metrics Scope in order to make it easier to identify; however, uniqueness is not enforced.", +"type": "string" +}, +"gcpZone": { +"description": "The GCP zone the Uptime check should egress from. Only respected for internal Uptime checks, where internal_network is specified.", +"type": "string" +}, +"name": { +"description": "A unique resource name for this InternalChecker. The format is: projects/[PROJECT_ID_OR_NUMBER]/internalCheckers/[INTERNAL_CHECKER_ID] [PROJECT_ID_OR_NUMBER] is the Cloud Monitoring Metrics Scope project for the Uptime check config associated with the internal checker.", +"type": "string" +}, +"network": { +"description": "The GCP VPC network (https://cloud.google.com/vpc/docs/vpc) where the internal resource lives (ex: \"default\").", +"type": "string" +}, +"peerProjectId": { +"description": "The GCP project ID where the internal checker lives. Not necessary the same as the Metrics Scope project.", +"type": "string" +}, +"state": { +"description": "The current operational state of the internal checker.", +"enum": [ +"UNSPECIFIED", +"CREATING", +"RUNNING" +], +"enumDescriptions": [ +"An internal checker should never be in the unspecified state.", +"The checker is being created, provisioned, and configured. A checker in this state can be returned by ListInternalCheckers or GetInternalChecker, as well as by examining the long running Operation (https://cloud.google.com/apis/design/design_patterns#long_running_operations) that created it.", +"The checker is running and available for use. A checker in this state can be returned by ListInternalCheckers or GetInternalChecker as well as by examining the long running Operation (https://cloud.google.com/apis/design/design_patterns#long_running_operations) that created it. If a checker is being torn down, it is neither visible nor usable, so there is no \"deleting\" or \"down\" state." +], +"type": "string" +} +}, +"type": "object" +}, +"IstioCanonicalService": { +"description": "Canonical service scoped to an Istio mesh. Anthos clusters running ASM >= 1.6.8 will have their services ingested as this type.", +"id": "IstioCanonicalService", +"properties": { +"canonicalService": { +"description": "The name of the canonical service underlying this service. Corresponds to the destination_canonical_service_name metric label in label in Istio metrics (https://cloud.google.com/monitoring/api/metrics_istio).", +"type": "string" +}, +"canonicalServiceNamespace": { +"description": "The namespace of the canonical service underlying this service. Corresponds to the destination_canonical_service_namespace metric label in Istio metrics (https://cloud.google.com/monitoring/api/metrics_istio).", +"type": "string" +}, +"meshUid": { +"description": "Identifier for the Istio mesh in which this canonical service is defined. Corresponds to the mesh_uid metric label in Istio metrics (https://cloud.google.com/monitoring/api/metrics_istio).", +"type": "string" +} +}, +"type": "object" +}, +"JsonPathMatcher": { +"description": "Information needed to perform a JSONPath content match. Used for ContentMatcherOption::MATCHES_JSON_PATH and ContentMatcherOption::NOT_MATCHES_JSON_PATH.", +"id": "JsonPathMatcher", +"properties": { +"jsonMatcher": { +"description": "The type of JSONPath match that will be applied to the JSON output (ContentMatcher.content)", +"enum": [ +"JSON_PATH_MATCHER_OPTION_UNSPECIFIED", +"EXACT_MATCH", +"REGEX_MATCH" +], +"enumDescriptions": [ +"No JSONPath matcher type specified (not valid).", +"Selects 'exact string' matching. The match succeeds if the content at the json_path within the output is exactly the same as the content string.", +"Selects regular-expression matching. The match succeeds if the content at the json_path within the output matches the regular expression specified in the content string." +], +"type": "string" +}, +"jsonPath": { +"description": "JSONPath within the response output pointing to the expected ContentMatcher::content to match against.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The key for this label. The key must meet the following criteria: Does not exceed 100 characters. Matches the following regular expression: [a-zA-Z][a-zA-Z0-9_]* The first character must be an upper- or lower-case letter. The remaining characters must be letters, digits, or underscores.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string, not to exceed 1,024 characters. This is the default value type.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"LabelValue": { +"description": "A label value.", +"id": "LabelValue", +"properties": { +"boolValue": { +"description": "A bool label value.", +"type": "boolean" +}, +"int64Value": { +"description": "An int64 label value.", +"format": "int64", +"type": "string" +}, +"stringValue": { +"description": "A string label value.", +"type": "string" +} +}, +"type": "object" +}, +"LatencyCriteria": { +"description": "Parameters for a latency threshold SLI.", +"id": "LatencyCriteria", +"properties": { +"threshold": { +"description": "Good service is defined to be the count of requests made to this service that return in no more than threshold.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Linear": { +"description": "Specifies a linear sequence of buckets that all have the same width (except overflow and underflow). Each bucket represents a constant absolute uncertainty on the specific value in the bucket.There are num_finite_buckets + 2 (= N) buckets. Bucket i has the following boundaries:Upper bound (0 <= i < N-1): offset + (width * i).Lower bound (1 <= i < N): offset + (width * (i - 1)).", +"id": "Linear", +"properties": { +"numFiniteBuckets": { +"description": "Must be greater than 0.", +"format": "int32", +"type": "integer" +}, +"offset": { +"description": "Lower bound of the first bucket.", +"format": "double", +"type": "number" +}, +"width": { +"description": "Must be greater than 0.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ListAlertPoliciesResponse": { +"description": "The protocol for the ListAlertPolicies response.", +"id": "ListAlertPoliciesResponse", +"properties": { +"alertPolicies": { +"description": "The returned alert policies.", +"items": { +"$ref": "AlertPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than were returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +}, +"totalSize": { +"description": "The total number of alert policies in all pages. This number is only an estimate, and may change in subsequent pages. https://aip.dev/158", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListGroupMembersResponse": { +"description": "The ListGroupMembers response.", +"id": "ListGroupMembersResponse", +"properties": { +"members": { +"description": "A set of monitored resources in the group.", +"items": { +"$ref": "MonitoredResource" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +}, +"totalSize": { +"description": "The total number of elements matching this request.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListGroupsResponse": { +"description": "The ListGroups response.", +"id": "ListGroupsResponse", +"properties": { +"group": { +"description": "The groups that match the specified filters.", +"items": { +"$ref": "Group" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +} +}, +"type": "object" +}, +"ListMetricDescriptorsResponse": { +"description": "The ListMetricDescriptors response.", +"id": "ListMetricDescriptorsResponse", +"properties": { +"metricDescriptors": { +"description": "The metric descriptors that are available to the project and that match the value of filter, if present.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +} +}, +"type": "object" +}, +"ListMonitoredResourceDescriptorsResponse": { +"description": "The ListMonitoredResourceDescriptors response.", +"id": "ListMonitoredResourceDescriptorsResponse", +"properties": { +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +}, +"resourceDescriptors": { +"description": "The monitored resource descriptors that are available to this project and that match filter, if present.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListNotificationChannelDescriptorsResponse": { +"description": "The ListNotificationChannelDescriptors response.", +"id": "ListNotificationChannelDescriptorsResponse", +"properties": { +"channelDescriptors": { +"description": "The monitored resource descriptors supported for the specified project, optionally filtered.", +"items": { +"$ref": "NotificationChannelDescriptor" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned.", +"type": "string" +} +}, +"type": "object" +}, +"ListNotificationChannelsResponse": { +"description": "The ListNotificationChannels response.", +"id": "ListNotificationChannelsResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there may be more results that match the request. Use the value in the page_token field in a subsequent request to fetch the next set of results. If empty, all results have been returned.", +"type": "string" +}, +"notificationChannels": { +"description": "The notification channels defined for the specified project.", +"items": { +"$ref": "NotificationChannel" +}, +"type": "array" +}, +"totalSize": { +"description": "The total number of notification channels in all pages. This number is only an estimate, and may change in subsequent pages. https://aip.dev/158", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListServiceLevelObjectivesResponse": { +"description": "The ListServiceLevelObjectives response.", +"id": "ListServiceLevelObjectivesResponse", +"properties": { +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +}, +"serviceLevelObjectives": { +"description": "The ServiceLevelObjectives matching the specified filter.", +"items": { +"$ref": "ServiceLevelObjective" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServicesResponse": { +"description": "The ListServices response.", +"id": "ListServicesResponse", +"properties": { +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +}, +"services": { +"description": "The Services matching the specified filter.", +"items": { +"$ref": "Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSnoozesResponse": { +"description": "The results of a successful ListSnoozes call, containing the matching Snoozes.", +"id": "ListSnoozesResponse", +"properties": { +"nextPageToken": { +"description": "Page token for repeated calls to ListSnoozes, to fetch additional pages of results. If this is empty or missing, there are no more pages.", +"type": "string" +}, +"snoozes": { +"description": "Snoozes matching this list call.", +"items": { +"$ref": "Snooze" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTimeSeriesResponse": { +"description": "The ListTimeSeries response.", +"id": "ListTimeSeriesResponse", +"properties": { +"executionErrors": { +"description": "Query execution errors that may have caused the time series data returned to be incomplete.", +"items": { +"$ref": "Status" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +}, +"timeSeries": { +"description": "One or more time series that match the filter included in the request.", +"items": { +"$ref": "TimeSeries" +}, +"type": "array" +}, +"unit": { +"description": "The unit in which all time_series point values are reported. unit follows the UCUM format for units as seen in https://unitsofmeasure.org/ucum.html. If different time_series have different units (for example, because they come from different metric types, or a unit is absent), then unit will be \"{not_a_unit}\".", +"type": "string" +} +}, +"type": "object" +}, +"ListUptimeCheckConfigsResponse": { +"description": "The protocol for the ListUptimeCheckConfigs response.", +"id": "ListUptimeCheckConfigsResponse", +"properties": { +"nextPageToken": { +"description": "This field represents the pagination token to retrieve the next page of results. If the value is empty, it means no further results for the request. To retrieve the next page of results, the value of the next_page_token is passed to the subsequent List method call (in the request message's page_token field).", +"type": "string" +}, +"totalSize": { +"description": "The total number of Uptime check configurations for the project, irrespective of any pagination.", +"format": "int32", +"type": "integer" +}, +"uptimeCheckConfigs": { +"description": "The returned Uptime check configurations.", +"items": { +"$ref": "UptimeCheckConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUptimeCheckIpsResponse": { +"description": "The protocol for the ListUptimeCheckIps response.", +"id": "ListUptimeCheckIpsResponse", +"properties": { +"nextPageToken": { +"description": "This field represents the pagination token to retrieve the next page of results. If the value is empty, it means no further results for the request. To retrieve the next page of results, the value of the next_page_token is passed to the subsequent List method call (in the request message's page_token field). NOTE: this field is not yet implemented", +"type": "string" +}, +"uptimeCheckIps": { +"description": "The returned list of IP addresses (including region and location) that the checkers run from.", +"items": { +"$ref": "UptimeCheckIp" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogMatch": { +"description": "A condition type that checks whether a log message in the scoping project (https://cloud.google.com/monitoring/api/v3#project_name) satisfies the given filter. Logs from other projects in the metrics scope are not evaluated.", +"id": "LogMatch", +"properties": { +"filter": { +"description": "Required. A logs-based filter. See Advanced Logs Queries (https://cloud.google.com/logging/docs/view/advanced-queries) for how this filter should be constructed.", +"type": "string" +}, +"labelExtractors": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. A map from a label key to an extractor expression, which is used to extract the value for this label key. Each entry in this map is a specification for how data should be extracted from log entries that match filter. Each combination of extracted values is treated as a separate rule for the purposes of triggering notifications. Label keys and corresponding values can be used in notifications generated by this condition.Please see the documentation on logs-based metric valueExtractors (https://cloud.google.com/logging/docs/reference/v2/rest/v2/projects.metrics#LogMetric.FIELDS.value_extractor) for syntax and examples.", +"type": "object" +} +}, +"type": "object" +}, +"MeshIstio": { +"description": "Istio service scoped to an Istio mesh. Anthos clusters running ASM < 1.6.8 will have their services ingested as this type.", +"id": "MeshIstio", +"properties": { +"meshUid": { +"description": "Identifier for the mesh in which this Istio service is defined. Corresponds to the mesh_uid metric label in Istio metrics.", +"type": "string" +}, +"serviceName": { +"description": "The name of the Istio service underlying this service. Corresponds to the destination_service_name metric label in Istio metrics.", +"type": "string" +}, +"serviceNamespace": { +"description": "The namespace of the Istio service underlying this service. Corresponds to the destination_service_namespace metric label in Istio metrics.", +"type": "string" +} +}, +"type": "object" +}, +"Metric": { +"description": "A specific metric, identified by specifying values for all of the labels of a MetricDescriptor.", +"id": "Metric", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The set of label values that uniquely identify this metric. All labels listed in the MetricDescriptor must be assigned values.", +"type": "object" +}, +"type": { +"description": "An existing metric type, see google.api.MetricDescriptor. For example, custom.googleapis.com/invoice/paid/amount.", +"type": "string" +} +}, +"type": "object" +}, +"MetricAbsence": { +"description": "A condition type that checks that monitored resources are reporting data. The configuration defines a metric and a set of monitored resources. The predicate is considered in violation when a time series for the specified metric of a monitored resource does not include any data in the specified duration.", +"id": "MetricAbsence", +"properties": { +"aggregations": { +"description": "Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources). Multiple aggregations are applied in the order specified.This field is similar to the one in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It is advisable to use the ListTimeSeries method when debugging this field.", +"items": { +"$ref": "Aggregation" +}, +"type": "array" +}, +"duration": { +"description": "The amount of time that a time series must fail to report new data to be considered failing. The minimum value of this field is 120 seconds. Larger values that are a multiple of a minute--for example, 240 or 300 seconds--are supported. If an invalid value is given, an error will be returned. The Duration.nanos field is ignored.", +"format": "google-duration", +"type": "string" +}, +"filter": { +"description": "Required. A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that call is useful to verify the time series that will be retrieved / processed). The filter must specify the metric type and the resource type. Optionally, it can specify resource labels and metric labels. This field must not exceed 2048 Unicode characters in length.", +"type": "string" +}, +"trigger": { +"$ref": "Trigger", +"description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations." +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable.", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the appengine.googleapis.com/http/server/response_latencies metric type has a label for the HTTP response code, response_code, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our Terms of Service (https://cloud.google.com/terms/) and the Google Cloud Platform Subject to the Deprecation Policy (https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of metric_kind and value_type might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name custom.googleapis.com or external.googleapis.com. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\" ", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.Different systems might scale the values to be more easily displayed (so a value of 0.02kBy might be displayed as 20By, and a value of 3523kBy might be displayed as 3.5MBy). However, if the unit is kBy, then the value of the metric is always in thousands of bytes, no matter how it might be displayed.If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an INT64 CUMULATIVE metric whose unit is s{CPU} (or equivalently 1s{CPU} or just s). If the job uses 12,005 CPU-seconds, then the value is written as 12005.Alternatively, if you want a custom metric to record data in a more granular way, you can create a DOUBLE CUMULATIVE metric whose unit is ks{CPU}, and then write the value 12.005 (which is 12005/1000), or use Kis{CPU} and write 11.723 (which is 12005/1024).The supported units are a subset of The Unified Code for Units of Measure (https://unitsofmeasure.org/ucum.html) standard:Basic units (UNIT) bit bit By byte s second min minute h hour d day 1 dimensionlessPrefixes (PREFIX) k kilo (10^3) M mega (10^6) G giga (10^9) T tera (10^12) P peta (10^15) E exa (10^18) Z zetta (10^21) Y yotta (10^24) m milli (10^-3) u micro (10^-6) n nano (10^-9) p pico (10^-12) f femto (10^-15) a atto (10^-18) z zepto (10^-21) y yocto (10^-24) Ki kibi (2^10) Mi mebi (2^20) Gi gibi (2^30) Ti tebi (2^40) Pi pebi (2^50)GrammarThe grammar also includes these connectors: / division or ratio (as an infix operator). For examples, kBy/{email} or MiBy/10ms (although you should almost never have /s in a metric unit; rates should always be computed at query time from the underlying cumulative or delta value). . multiplication or composition (as an infix operator). For examples, GBy.d or k{watt}.h.The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: Annotation is just a comment if it follows a UNIT. If the annotation is used alone, then the unit is equivalent to 1. For examples, {request}/s == 1/s, By{transmitted}/s == By/s. NAME is a sequence of non-blank printable ASCII characters not containing { or }. 1 represents a unitary dimensionless unit (https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in 1/s. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as 1/d or {new-users}/d (and a metric value 5 would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as 1000/d or k1/d or k{page_views}/d (and a metric value of 5.3 would mean \"5300 page views per day\"). % represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value 3 means \"3 percent\"). 10^2.% indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value 0.03 means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of metric_kind and value_type might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is GAUGE.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is GAUGE.", +"The value is a Distribution.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our Terms of Service (https://cloud.google.com/terms/) and the Google Cloud Platform Subject to the Deprecation Policy (https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRange": { +"description": "A MetricRange is used when each window is good when the value x of a single TimeSeries satisfies range.min <= x <= range.max. The provided TimeSeries must have ValueType = INT64 or ValueType = DOUBLE and MetricKind = GAUGE.", +"id": "MetricRange", +"properties": { +"range": { +"$ref": "GoogleMonitoringV3Range", +"description": "Range of values considered \"good.\" For a one-sided range, set one bound to an infinite value." +}, +"timeSeries": { +"description": "A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying the TimeSeries to use for evaluating window quality.", +"type": "string" +} +}, +"type": "object" +}, +"MetricThreshold": { +"description": "A condition type that compares a collection of time series against a threshold.", +"id": "MetricThreshold", +"properties": { +"aggregations": { +"description": "Specifies the alignment of data points in individual time series as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources). Multiple aggregations are applied in the order specified.This field is similar to the one in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list). It is advisable to use the ListTimeSeries method when debugging this field.", +"items": { +"$ref": "Aggregation" +}, +"type": "array" +}, +"comparison": { +"description": "The comparison to apply between the time series (indicated by filter and aggregation) and the threshold (indicated by threshold_value). The comparison is applied on each time series, with the time series on the left-hand side and the threshold on the right-hand side.Only COMPARISON_LT and COMPARISON_GT are supported currently.", +"enum": [ +"COMPARISON_UNSPECIFIED", +"COMPARISON_GT", +"COMPARISON_GE", +"COMPARISON_LT", +"COMPARISON_LE", +"COMPARISON_EQ", +"COMPARISON_NE" +], +"enumDescriptions": [ +"No ordering relationship is specified.", +"True if the left argument is greater than the right argument.", +"True if the left argument is greater than or equal to the right argument.", +"True if the left argument is less than the right argument.", +"True if the left argument is less than or equal to the right argument.", +"True if the left argument is equal to the right argument.", +"True if the left argument is not equal to the right argument." +], +"type": "string" +}, +"denominatorAggregations": { +"description": "Specifies the alignment of data points in individual time series selected by denominatorFilter as well as how to combine the retrieved time series together (such as when aggregating multiple streams on each resource to a single stream for each resource or when aggregating streams across all members of a group of resources).When computing ratios, the aggregations and denominator_aggregations fields must use the same alignment period and produce time series that have the same periodicity and labels.", +"items": { +"$ref": "Aggregation" +}, +"type": "array" +}, +"denominatorFilter": { +"description": "A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies a time series that should be used as the denominator of a ratio that will be compared with the threshold. If a denominator_filter is specified, the time series specified by the filter field will be used as the numerator.The filter must specify the metric type and optionally may contain restrictions on resource type, resource labels, and metric labels. This field may not exceed 2048 Unicode characters in length.", +"type": "string" +}, +"duration": { +"description": "The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregations field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly.", +"format": "google-duration", +"type": "string" +}, +"evaluationMissingData": { +"description": "A condition control that determines how metric-threshold conditions are evaluated when data stops arriving. To use this control, the value of the duration field must be greater than or equal to 60 seconds.", +"enum": [ +"EVALUATION_MISSING_DATA_UNSPECIFIED", +"EVALUATION_MISSING_DATA_INACTIVE", +"EVALUATION_MISSING_DATA_ACTIVE", +"EVALUATION_MISSING_DATA_NO_OP" +], +"enumDescriptions": [ +"An unspecified evaluation missing data option. Equivalent to EVALUATION_MISSING_DATA_NO_OP.", +"If there is no data to evaluate the condition, then evaluate the condition as false.", +"If there is no data to evaluate the condition, then evaluate the condition as true.", +"Do not evaluate the condition to any value if there is no data." +], +"type": "string" +}, +"filter": { +"description": "Required. A filter (https://cloud.google.com/monitoring/api/v3/filters) that identifies which time series should be compared with the threshold.The filter is similar to the one that is specified in the ListTimeSeries request (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.timeSeries/list) (that call is useful to verify the time series that will be retrieved / processed). The filter must specify the metric type and the resource type. Optionally, it can specify resource labels and metric labels. This field must not exceed 2048 Unicode characters in length.", +"type": "string" +}, +"forecastOptions": { +"$ref": "ForecastOptions", +"description": "When this field is present, the MetricThreshold condition forecasts whether the time series is predicted to violate the threshold within the forecast_horizon. When this field is not set, the MetricThreshold tests the current value of the timeseries against the threshold." +}, +"thresholdValue": { +"description": "A value against which to compare the time series.", +"format": "double", +"type": "number" +}, +"trigger": { +"$ref": "Trigger", +"description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified." +} +}, +"type": "object" +}, +"MonitoredResource": { +"description": "An object representing a resource that can be used for monitoring, logging, billing, or other purposes. Examples include virtual machine instances, databases, and storage devices such as disks. The type field identifies a MonitoredResourceDescriptor object that describes the resource's schema. Information in the labels field identifies the actual resource and its attributes according to the schema. For example, a particular Compute Engine VM instance could be represented by the following object, because the MonitoredResourceDescriptor for \"gce_instance\" has labels \"project_id\", \"instance_id\" and \"zone\": { \"type\": \"gce_instance\", \"labels\": { \"project_id\": \"my-project\", \"instance_id\": \"12345678901234\", \"zone\": \"us-central1-a\" }} ", +"id": "MonitoredResource", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Required. Values for all of the labels listed in the associated monitored resource descriptor. For example, Compute Engine VM instances use the labels \"project_id\", \"instance_id\", and \"zone\".", +"type": "object" +}, +"type": { +"description": "Required. The monitored resource type. This field must match the type field of a MonitoredResourceDescriptor object. For example, the type of a Compute Engine VM instance is gce_instance. For a list of types, see Monitoring resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of \"gce_instance\" and specifies the use of the labels \"instance_id\" and \"zone\" to identify particular VM instances.Different APIs can support different monitored resource types. APIs generally provide a list method that returns the monitored resource descriptors used by the API.", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, \"Google Cloud SQL Database\".", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels \"database_id\" and \"zone\".", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our Terms of Service (https://cloud.google.com/terms/) and the Google Cloud Platform Subject to the Deprecation Policy (https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: \"projects/{project_id}/monitoredResourceDescriptors/{type}\" where {type} is the value of the type field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format \"monitoredResourceDescriptors/{type}\".", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type \"cloudsql_database\" represents databases in Google Cloud SQL. For a list of types, see Monitored resource types (https://cloud.google.com/monitoring/api/resources) and Logging resource types (https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceMetadata": { +"description": "Auxiliary metadata for a MonitoredResource object. MonitoredResource objects contain the minimum set of information to uniquely identify a monitored resource instance. There is some other useful auxiliary metadata. Monitoring and Logging use an ingestion pipeline to extract metadata for cloud resources of all types, and store the metadata in this message.", +"id": "MonitoredResourceMetadata", +"properties": { +"systemLabels": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Output only. Values for predefined system metadata labels. System labels are a kind of metadata extracted by Google, including \"machine_image\", \"vpc\", \"subnet_id\", \"security_group\", \"name\", etc. System label values can be only strings, Boolean values, or a list of strings. For example: { \"name\": \"my-test-instance\", \"security_group\": [\"a\", \"b\", \"c\"], \"spot_instance\": false } ", +"type": "object" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. A map of user-defined metadata labels.", +"type": "object" +} +}, +"type": "object" +}, +"MonitoringQueryLanguageCondition": { +"description": "A condition type that allows alert policies to be defined using Monitoring Query Language (https://cloud.google.com/monitoring/mql).", +"id": "MonitoringQueryLanguageCondition", +"properties": { +"duration": { +"description": "The amount of time that a time series must violate the threshold to be considered failing. Currently, only values that are a multiple of a minute--e.g., 0, 60, 120, or 300 seconds--are supported. If an invalid value is given, an error will be returned. When choosing a duration, it is useful to keep in mind the frequency of the underlying time series data (which may also be affected by any alignments specified in the aggregations field); a good duration is long enough so that a single outlier does not generate spurious alerts, but short enough that unhealthy states are detected and alerted on quickly.", +"format": "google-duration", +"type": "string" +}, +"evaluationMissingData": { +"description": "A condition control that determines how metric-threshold conditions are evaluated when data stops arriving.", +"enum": [ +"EVALUATION_MISSING_DATA_UNSPECIFIED", +"EVALUATION_MISSING_DATA_INACTIVE", +"EVALUATION_MISSING_DATA_ACTIVE", +"EVALUATION_MISSING_DATA_NO_OP" +], +"enumDescriptions": [ +"An unspecified evaluation missing data option. Equivalent to EVALUATION_MISSING_DATA_NO_OP.", +"If there is no data to evaluate the condition, then evaluate the condition as false.", +"If there is no data to evaluate the condition, then evaluate the condition as true.", +"Do not evaluate the condition to any value if there is no data." +], +"type": "string" +}, +"query": { +"description": "Monitoring Query Language (https://cloud.google.com/monitoring/mql) query that outputs a boolean stream.", +"type": "string" +}, +"trigger": { +"$ref": "Trigger", +"description": "The number/percent of time series for which the comparison must hold in order for the condition to trigger. If unspecified, then the condition will trigger if the comparison is true for any of the time series that have been identified by filter and aggregations, or by the ratio, if denominator_filter and denominator_aggregations are specified." +} +}, +"type": "object" +}, +"MutationRecord": { +"description": "Describes a change made to a configuration.", +"id": "MutationRecord", +"properties": { +"mutateTime": { +"description": "When the change occurred.", +"format": "google-datetime", +"type": "string" +}, +"mutatedBy": { +"description": "The email address of the user making the change.", +"type": "string" +} +}, +"type": "object" +}, +"NotificationChannel": { +"description": "A NotificationChannel is a medium through which an alert is delivered when a policy violation is detected. Examples of channels include email, SMS, and third-party messaging applications. Fields containing sensitive information like authentication tokens or contact info are only partially populated on retrieval.", +"id": "NotificationChannel", +"properties": { +"creationRecord": { +"$ref": "MutationRecord", +"description": "Record of the creation of this channel." +}, +"description": { +"description": "An optional human-readable description of this notification channel. This description may provide additional details, beyond the display name, for the channel. This may not exceed 1024 Unicode characters.", +"type": "string" +}, +"displayName": { +"description": "An optional human-readable name for this notification channel. It is recommended that you specify a non-empty and unique name in order to make it easier to identify the channels in your project, though this is not enforced. The display name is limited to 512 Unicode characters.", +"type": "string" +}, +"enabled": { +"description": "Whether notifications are forwarded to the described channel. This makes it possible to disable delivery of notifications to a particular channel without removing the channel from all alerting policies that reference the channel. This is a more convenient approach when the change is temporary and you want to receive notifications from the same set of alerting policies on the channel at some point in the future.", +"type": "boolean" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Configuration fields that define the channel and its behavior. The permissible and required labels are specified in the NotificationChannelDescriptor.labels of the NotificationChannelDescriptor corresponding to the type field.", +"type": "object" +}, +"mutationRecords": { +"description": "Records of the modification of this channel.", +"items": { +"$ref": "MutationRecord" +}, +"type": "array" +}, +"name": { +"description": "The full REST resource name for this channel. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] The [CHANNEL_ID] is automatically assigned by the server on creation.", +"type": "string" +}, +"type": { +"description": "The type of the notification channel. This field matches the value of the NotificationChannelDescriptor.type field.", +"type": "string" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-supplied key/value data that does not need to conform to the corresponding NotificationChannelDescriptor's schema, unlike the labels field. This field is intended to be used for organizing and identifying the NotificationChannel objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.", +"type": "object" +}, +"verificationStatus": { +"description": "Indicates whether this channel has been verified or not. On a ListNotificationChannels or GetNotificationChannel operation, this field is expected to be populated.If the value is UNVERIFIED, then it indicates that the channel is non-functioning (it both requires verification and lacks verification); otherwise, it is assumed that the channel works.If the channel is neither VERIFIED nor UNVERIFIED, it implies that the channel is of a type that does not require verification or that this specific channel has been exempted from verification because it was created prior to verification being required for channels of this type.This field cannot be modified using a standard UpdateNotificationChannel operation. To change the value of this field, you must call VerifyNotificationChannel.", +"enum": [ +"VERIFICATION_STATUS_UNSPECIFIED", +"UNVERIFIED", +"VERIFIED" +], +"enumDescriptions": [ +"Sentinel value used to indicate that the state is unknown, omitted, or is not applicable (as in the case of channels that neither support nor require verification in order to function).", +"The channel has yet to be verified and requires verification to function. Note that this state also applies to the case where the verification process has been initiated by sending a verification code but where the verification code has not been submitted to complete the process.", +"It has been proven that notifications can be received on this notification channel and that someone on the project has access to messages that are delivered to that channel." +], +"type": "string" +} +}, +"type": "object" +}, +"NotificationChannelDescriptor": { +"description": "A description of a notification channel. The descriptor includes the properties of the channel and the set of labels or fields that must be specified to configure channels of a given type.", +"id": "NotificationChannelDescriptor", +"properties": { +"description": { +"description": "A human-readable description of the notification channel type. The description may include a description of the properties of the channel and pointers to external documentation.", +"type": "string" +}, +"displayName": { +"description": "A human-readable name for the notification channel type. This form of the name is suitable for a user interface.", +"type": "string" +}, +"labels": { +"description": "The set of labels that must be defined to identify a particular channel of the corresponding type. Each label includes a description for how that field should be populated.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "The product launch stage for channels of this type.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our Terms of Service (https://cloud.google.com/terms/) and the Google Cloud Platform Subject to the Deprecation Policy (https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "The full REST resource name for this descriptor. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[TYPE] In the above, [TYPE] is the value of the type field.", +"type": "string" +}, +"supportedTiers": { +"deprecated": true, +"description": "The tiers that support this notification channel; the project service tier must be one of the supported_tiers.", +"items": { +"enum": [ +"SERVICE_TIER_UNSPECIFIED", +"SERVICE_TIER_BASIC", +"SERVICE_TIER_PREMIUM" +], +"enumDescriptions": [ +"An invalid sentinel value, used to indicate that a tier has not been provided explicitly.", +"The Cloud Monitoring Basic tier, a free tier of service that provides basic features, a moderate allotment of logs, and access to built-in metrics. A number of features are not available in this tier. For more details, see the service tiers documentation (https://cloud.google.com/monitoring/workspaces/tiers).", +"The Cloud Monitoring Premium tier, a higher, more expensive tier of service that provides access to all Cloud Monitoring features, lets you use Cloud Monitoring with AWS accounts, and has a larger allotments for logs and metrics. For more details, see the service tiers documentation (https://cloud.google.com/monitoring/workspaces/tiers)." +], +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "The type of notification channel, such as \"email\" and \"sms\". To view the full list of channels, see Channel descriptors (https://cloud.google.com/monitoring/alerts/using-channels-api#ncd). Notification channel types are globally unique.", +"type": "string" +} +}, +"type": "object" +}, +"NotificationChannelStrategy": { +"description": "Control over how the notification channels in notification_channels are notified when this alert fires, on a per-channel basis.", +"id": "NotificationChannelStrategy", +"properties": { +"notificationChannelNames": { +"description": "The full REST resource name for the notification channels that these settings apply to. Each of these correspond to the name field in one of the NotificationChannel objects referenced in the notification_channels field of this AlertPolicy. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] ", +"items": { +"type": "string" +}, +"type": "array" +}, +"renotifyInterval": { +"description": "The frequency at which to send reminder notifications for open incidents.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"NotificationRateLimit": { +"description": "Control over the rate of notifications sent to this alert policy's notification channels.", +"id": "NotificationRateLimit", +"properties": { +"period": { +"description": "Not more than one notification per period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Contains metadata for longrunning operation for the edit Metrics Scope endpoints.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request has been received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, \"map_entry\". For custom options, it should be the fully-qualified name. For example, \"google.api.http\".", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"PerformanceThreshold": { +"description": "A PerformanceThreshold is used when each window is good when that window has a sufficiently high performance.", +"id": "PerformanceThreshold", +"properties": { +"basicSliPerformance": { +"$ref": "BasicSli", +"description": "BasicSli to evaluate to judge window quality." +}, +"performance": { +"$ref": "RequestBasedSli", +"description": "RequestBasedSli to evaluate to judge window quality." +}, +"threshold": { +"description": "If window performance >= threshold, the window is counted as good.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"PingConfig": { +"description": "Information involved in sending ICMP pings alongside public HTTP/TCP checks. For HTTP, the pings are performed for each part of the redirect chain.", +"id": "PingConfig", +"properties": { +"pingsCount": { +"description": "Number of ICMP pings. A maximum of 3 ICMP pings is currently supported.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Point": { +"description": "A single data point in a time series.", +"id": "Point", +"properties": { +"interval": { +"$ref": "TimeInterval", +"description": "The time interval to which the data point applies. For GAUGE metrics, the start time is optional, but if it is supplied, it must equal the end time. For DELTA metrics, the start and end time should specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For CUMULATIVE metrics, the start and end time should specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +}, +"value": { +"$ref": "TypedValue", +"description": "The value of the data point." +} +}, +"type": "object" +}, +"PointData": { +"description": "A point's value columns and time interval. Each point has one or more point values corresponding to the entries in point_descriptors field in the TimeSeriesDescriptor associated with this object.", +"id": "PointData", +"properties": { +"timeInterval": { +"$ref": "TimeInterval", +"description": "The time interval associated with the point." +}, +"values": { +"description": "The values that make up the point.", +"items": { +"$ref": "TypedValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"PrometheusQueryLanguageCondition": { +"description": "A condition type that allows alert policies to be defined using Prometheus Query Language (PromQL) (https://prometheus.io/docs/prometheus/latest/querying/basics/).The PrometheusQueryLanguageCondition message contains information from a Prometheus alerting rule and its associated rule group.A Prometheus alerting rule is described here (https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/). The semantics of a Prometheus alerting rule is described here (https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#rule).A Prometheus rule group is described here (https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/). The semantics of a Prometheus rule group is described here (https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/#rule_group).Because Cloud Alerting has no representation of a Prometheus rule group resource, we must embed the information of the parent rule group inside each of the conditions that refer to it. We must also update the contents of all Prometheus alerts in case the information of their rule group changes.The PrometheusQueryLanguageCondition protocol buffer combines the information of the corresponding rule group and alerting rule. The structure of the PrometheusQueryLanguageCondition protocol buffer does NOT mimic the structure of the Prometheus rule group and alerting rule YAML declarations. The PrometheusQueryLanguageCondition protocol buffer may change in the future to support future rule group and/or alerting rule features. There are no new such features at the present time (2023-06-26).", +"id": "PrometheusQueryLanguageCondition", +"properties": { +"alertRule": { +"description": "Optional. The alerting rule name of this alert in the corresponding Prometheus configuration file.Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future.This field is optional. If this field is not empty, then it must be a valid Prometheus label name (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). This field may not exceed 2048 Unicode characters in length.", +"type": "string" +}, +"duration": { +"description": "Optional. Alerts are considered firing once their PromQL expression was evaluated to be \"true\" for this long. Alerts whose PromQL expression was not evaluated to be \"true\" for long enough are considered pending. Must be a non-negative duration or missing. This field is optional. Its default value is zero.", +"format": "google-duration", +"type": "string" +}, +"evaluationInterval": { +"description": "Optional. How often this rule should be evaluated. Must be a positive multiple of 30 seconds or missing. This field is optional. Its default value is 30 seconds. If this PrometheusQueryLanguageCondition was generated from a Prometheus alerting rule, then this value should be taken from the enclosing rule group.", +"format": "google-duration", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels to add to or overwrite in the PromQL query result. Label names must be valid (https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels). Label values can be templatized by using variables (https://cloud.google.com/monitoring/alerts/doc-variables). The only available variable names are the names of the labels in the PromQL result, including \"__name__\" and \"value\". \"labels\" may be empty.", +"type": "object" +}, +"query": { +"description": "Required. The PromQL expression to evaluate. Every evaluation cycle this expression is evaluated at the current time, and all resultant time series become pending/firing alerts. This field must not be empty.", +"type": "string" +}, +"ruleGroup": { +"description": "Optional. The rule group name of this alert in the corresponding Prometheus configuration file.Some external tools may require this field to be populated correctly in order to refer to the original Prometheus configuration file. The rule group name and the alert name are necessary to update the relevant AlertPolicies in case the definition of the rule group changes in the future.This field is optional. If this field is not empty, then it must contain a valid UTF-8 string. This field may not exceed 2048 Unicode characters in length.", +"type": "string" +} +}, +"type": "object" +}, +"QueryTimeSeriesRequest": { +"description": "The QueryTimeSeries request.", +"id": "QueryTimeSeriesRequest", +"properties": { +"pageSize": { +"description": "A positive number that is the maximum number of time_series_data to return.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "If this field is not empty then it must contain the nextPageToken value returned by a previous call to this method. Using this field causes the method to return additional results from the previous method call.", +"type": "string" +}, +"query": { +"description": "Required. The query in the Monitoring Query Language (https://cloud.google.com/monitoring/mql/reference) format. The default time zone is in UTC.", +"type": "string" +} +}, +"type": "object" +}, +"QueryTimeSeriesResponse": { +"description": "The QueryTimeSeries response.", +"id": "QueryTimeSeriesResponse", +"properties": { +"nextPageToken": { +"description": "If there are more results than have been returned, then this field is set to a non-empty value. To see the additional results, use that value as page_token in the next call to this method.", +"type": "string" +}, +"partialErrors": { +"description": "Query execution errors that may have caused the time series data returned to be incomplete. The available data will be available in the response.", +"items": { +"$ref": "Status" +}, +"type": "array" +}, +"timeSeriesData": { +"description": "The time series data.", +"items": { +"$ref": "TimeSeriesData" +}, +"type": "array" +}, +"timeSeriesDescriptor": { +"$ref": "TimeSeriesDescriptor", +"description": "The descriptor for the time series data." +} +}, +"type": "object" +}, +"Range": { +"description": "The range of the population values.", +"id": "Range", +"properties": { +"max": { +"description": "The maximum of the population values.", +"format": "double", +"type": "number" +}, +"min": { +"description": "The minimum of the population values.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"RequestBasedSli": { +"description": "Service Level Indicators for which atomic units of service are counted directly.", +"id": "RequestBasedSli", +"properties": { +"distributionCut": { +"$ref": "DistributionCut", +"description": "distribution_cut is used when good_service is a count of values aggregated in a Distribution that fall into a good range. The total_service is the total count of all values aggregated in the Distribution." +}, +"goodTotalRatio": { +"$ref": "TimeSeriesRatio", +"description": "good_total_ratio is used when the ratio of good_service to total_service is computed from two TimeSeries." +} +}, +"type": "object" +}, +"ResourceGroup": { +"description": "The resource submessage for group checks. It can be used instead of a monitored resource, when multiple resources are being monitored.", +"id": "ResourceGroup", +"properties": { +"groupId": { +"description": "The group of resources being monitored. Should be only the [GROUP_ID], and not the full-path projects/[PROJECT_ID_OR_NUMBER]/groups/[GROUP_ID].", +"type": "string" +}, +"resourceType": { +"description": "The resource type of the group members.", +"enum": [ +"RESOURCE_TYPE_UNSPECIFIED", +"INSTANCE", +"AWS_ELB_LOAD_BALANCER" +], +"enumDescriptions": [ +"Default value (not valid).", +"A group of instances from Google Cloud Platform (GCP) or Amazon Web Services (AWS).", +"A group of Amazon ELB load balancers." +], +"type": "string" +} +}, +"type": "object" +}, +"ResponseStatusCode": { +"description": "A status to accept. Either a status code class like \"2xx\", or an integer status code like \"200\".", +"id": "ResponseStatusCode", +"properties": { +"statusClass": { +"description": "A class of status codes to accept.", +"enum": [ +"STATUS_CLASS_UNSPECIFIED", +"STATUS_CLASS_1XX", +"STATUS_CLASS_2XX", +"STATUS_CLASS_3XX", +"STATUS_CLASS_4XX", +"STATUS_CLASS_5XX", +"STATUS_CLASS_ANY" +], +"enumDescriptions": [ +"Default value that matches no status codes.", +"The class of status codes between 100 and 199.", +"The class of status codes between 200 and 299.", +"The class of status codes between 300 and 399.", +"The class of status codes between 400 and 499.", +"The class of status codes between 500 and 599.", +"The class of all status codes." +], +"type": "string" +}, +"statusValue": { +"description": "A status code to accept.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"SendNotificationChannelVerificationCodeRequest": { +"description": "The SendNotificationChannelVerificationCode request.", +"id": "SendNotificationChannelVerificationCodeRequest", +"properties": {}, +"type": "object" +}, +"Service": { +"description": "A Service is a discrete, autonomous, and network-accessible unit, designed to solve an individual concern (Wikipedia (https://en.wikipedia.org/wiki/Service-orientation)). In Cloud Monitoring, a Service acts as the root resource under which operational aspects of the service are accessible.", +"id": "Service", +"properties": { +"appEngine": { +"$ref": "AppEngine", +"description": "Type used for App Engine services." +}, +"basicService": { +"$ref": "BasicService", +"description": "Message that contains the service type and service labels of this service if it is a basic service. Documentation and examples here (https://cloud.google.com/stackdriver/docs/solutions/slo-monitoring/api/api-structures#basic-svc-w-basic-sli)." +}, +"cloudEndpoints": { +"$ref": "CloudEndpoints", +"description": "Type used for Cloud Endpoints services." +}, +"cloudRun": { +"$ref": "CloudRun", +"description": "Type used for Cloud Run services." +}, +"clusterIstio": { +"$ref": "ClusterIstio", +"description": "Type used for Istio services that live in a Kubernetes cluster." +}, +"custom": { +"$ref": "Custom", +"description": "Custom service type." +}, +"displayName": { +"description": "Name used for UI elements listing this Service.", +"type": "string" +}, +"gkeNamespace": { +"$ref": "GkeNamespace", +"description": "Type used for GKE Namespaces." +}, +"gkeService": { +"$ref": "GkeService", +"description": "Type used for GKE Services (the Kubernetes concept of a service)." +}, +"gkeWorkload": { +"$ref": "GkeWorkload", +"description": "Type used for GKE Workloads." +}, +"istioCanonicalService": { +"$ref": "IstioCanonicalService", +"description": "Type used for canonical services scoped to an Istio mesh. Metrics for Istio are documented here (https://istio.io/latest/docs/reference/config/metrics/)" +}, +"meshIstio": { +"$ref": "MeshIstio", +"description": "Type used for Istio services scoped to an Istio mesh." +}, +"name": { +"description": "Identifier. Resource name for this Service. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID] ", +"type": "string" +}, +"telemetry": { +"$ref": "Telemetry", +"description": "Configuration for how to query telemetry on a Service." +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels which have been used to annotate the service. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.", +"type": "object" +} +}, +"type": "object" +}, +"ServiceAgentAuthentication": { +"description": "Contains information needed for generating an OpenID Connect token (https://developers.google.com/identity/protocols/OpenIDConnect). The OIDC token will be generated for the Monitoring service agent service account.", +"id": "ServiceAgentAuthentication", +"properties": { +"type": { +"description": "Type of authentication.", +"enum": [ +"SERVICE_AGENT_AUTHENTICATION_TYPE_UNSPECIFIED", +"OIDC_TOKEN" +], +"enumDescriptions": [ +"Default value, will result in OIDC Authentication.", +"OIDC Authentication" +], +"type": "string" +} +}, +"type": "object" +}, +"ServiceLevelIndicator": { +"description": "A Service-Level Indicator (SLI) describes the \"performance\" of a service. For some services, the SLI is well-defined. In such cases, the SLI can be described easily by referencing the well-known SLI and providing the needed parameters. Alternatively, a \"custom\" SLI can be defined with a query to the underlying metric store. An SLI is defined to be good_service / total_service over any queried time interval. The value of performance always falls into the range 0 <= performance <= 1. A custom SLI describes how to compute this ratio, whether this is by dividing values from a pair of time series, cutting a Distribution into good and bad counts, or counting time windows in which the service complies with a criterion. For separation of concerns, a single Service-Level Indicator measures performance for only one aspect of service quality, such as fraction of successful queries or fast-enough queries.", +"id": "ServiceLevelIndicator", +"properties": { +"basicSli": { +"$ref": "BasicSli", +"description": "Basic SLI on a well-known service type." +}, +"requestBased": { +"$ref": "RequestBasedSli", +"description": "Request-based SLIs" +}, +"windowsBased": { +"$ref": "WindowsBasedSli", +"description": "Windows-based SLIs" +} +}, +"type": "object" +}, +"ServiceLevelObjective": { +"description": "A Service-Level Objective (SLO) describes a level of desired good service. It consists of a service-level indicator (SLI), a performance goal, and a period over which the objective is to be evaluated against that goal. The SLO can use SLIs defined in a number of different manners. Typical SLOs might include \"99% of requests in each rolling week have latency below 200 milliseconds\" or \"99.5% of requests in each calendar month return successfully.\"", +"id": "ServiceLevelObjective", +"properties": { +"calendarPeriod": { +"description": "A calendar period, semantically \"since the start of the current \". At this time, only DAY, WEEK, FORTNIGHT, and MONTH are supported.", +"enum": [ +"CALENDAR_PERIOD_UNSPECIFIED", +"DAY", +"WEEK", +"FORTNIGHT", +"MONTH", +"QUARTER", +"HALF", +"YEAR" +], +"enumDescriptions": [ +"Undefined period, raises an error.", +"A day.", +"A week. Weeks begin on Monday, following ISO 8601 (https://en.wikipedia.org/wiki/ISO_week_date).", +"A fortnight. The first calendar fortnight of the year begins at the start of week 1 according to ISO 8601 (https://en.wikipedia.org/wiki/ISO_week_date).", +"A month.", +"A quarter. Quarters start on dates 1-Jan, 1-Apr, 1-Jul, and 1-Oct of each year.", +"A half-year. Half-years start on dates 1-Jan and 1-Jul.", +"A year." +], +"type": "string" +}, +"displayName": { +"description": "Name used for UI elements listing this SLO.", +"type": "string" +}, +"goal": { +"description": "The fraction of service that must be good in order for this objective to be met. 0 < goal <= 0.999.", +"format": "double", +"type": "number" +}, +"name": { +"description": "Identifier. Resource name for this ServiceLevelObjective. The format is: projects/[PROJECT_ID_OR_NUMBER]/services/[SERVICE_ID]/serviceLevelObjectives/[SLO_NAME] ", +"type": "string" +}, +"rollingPeriod": { +"description": "A rolling time period, semantically \"in the past \". Must be an integer multiple of 1 day no larger than 30 days.", +"format": "google-duration", +"type": "string" +}, +"serviceLevelIndicator": { +"$ref": "ServiceLevelIndicator", +"description": "The definition of good service, used to measure and calculate the quality of the Service's performance with respect to a single aspect of service quality." +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels which have been used to annotate the service-level objective. Label keys must start with a letter. Label keys and values may contain lowercase letters, numbers, underscores, and dashes. Label keys and values have a maximum length of 63 characters, and must be less than 128 bytes in size. Up to 64 label entries may be stored. For labels which do not have a semantic value, the empty string may be supplied for the label value.", +"type": "object" +} +}, +"type": "object" +}, +"Snooze": { +"description": "A Snooze will prevent any alerts from being opened, and close any that are already open. The Snooze will work on alerts that match the criteria defined in the Snooze. The Snooze will be active from interval.start_time through interval.end_time.", +"id": "Snooze", +"properties": { +"criteria": { +"$ref": "Criteria", +"description": "Required. This defines the criteria for applying the Snooze. See Criteria for more information." +}, +"displayName": { +"description": "Required. A display name for the Snooze. This can be, at most, 512 unicode characters.", +"type": "string" +}, +"interval": { +"$ref": "TimeInterval", +"description": "Required. The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI." +}, +"name": { +"description": "Required. The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.", +"type": "string" +} +}, +"type": "object" +}, +"SourceContext": { +"description": "SourceContext represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: \"google/protobuf/source_context.proto\".", +"type": "string" +} +}, +"type": "object" +}, +"SpanContext": { +"description": "The context of a span. This is attached to an Exemplar in Distribution values during aggregation.It contains the name of a span with format: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] ", +"id": "SpanContext", +"properties": { +"spanName": { +"description": "The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array.[SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details.You can find out more about this error model and how to work with it in the API Design Guide (https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SyntheticMonitorTarget": { +"description": "Describes a Synthetic Monitor to be invoked by Uptime.", +"id": "SyntheticMonitorTarget", +"properties": { +"cloudFunctionV2": { +"$ref": "CloudFunctionV2Target", +"description": "Target a Synthetic Monitor GCFv2 instance." +} +}, +"type": "object" +}, +"TcpCheck": { +"description": "Information required for a TCP Uptime check request.", +"id": "TcpCheck", +"properties": { +"pingConfig": { +"$ref": "PingConfig", +"description": "Contains information needed to add pings to a TCP check." +}, +"port": { +"description": "The TCP port on the server against which to run the check. Will be combined with host (specified within the monitored_resource) to construct the full URL. Required.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Telemetry": { +"description": "Configuration for how to query telemetry on a Service.", +"id": "Telemetry", +"properties": { +"resourceName": { +"description": "The full name of the resource that defines this service. Formatted as described in https://cloud.google.com/apis/design/resource_names.", +"type": "string" +} +}, +"type": "object" +}, +"TimeInterval": { +"description": "Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: [startTime, endTime]. Valid time intervals depend on the MetricKind (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. The end time must not be earlier than the start time, and the end time must not be more than 25 hours in the past or more than five minutes in the future. For GAUGE metrics, the startTime value is technically optional; if no value is specified, the start time defaults to the value of the end time, and the interval represents a single point in time. If both start and end times are specified, they must be identical. Such an interval is valid only for GAUGE metrics, which are point-in-time measurements. The end time of a new interval must be at least a millisecond after the end time of the previous interval. For DELTA metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For DELTA metrics, the start time of the next interval must be at least a millisecond after the end time of the previous interval. For CUMULATIVE metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points. The new start time must be at least a millisecond after the end time of the previous interval. The start time of a new interval must be at least a millisecond after the end time of the previous interval because intervals are closed. If the start time of a new interval is the same as the end time of the previous interval, then data written at the new start time could overwrite data written at the previous end time.", +"id": "TimeInterval", +"properties": { +"endTime": { +"description": "Required. The end of the time interval.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"TimeSeries": { +"description": "A collection of data points that describes the time-varying values of a metric. A time series is identified by a combination of a fully-specified monitored resource and a fully-specified metric. This type is used for both listing and creating time series.", +"id": "TimeSeries", +"properties": { +"metadata": { +"$ref": "MonitoredResourceMetadata", +"description": "Output only. The associated monitored resource metadata. When reading a time series, this field will include metadata labels that are explicitly named in the reduction. When creating a time series, this field is ignored." +}, +"metric": { +"$ref": "Metric", +"description": "The associated metric. A fully-specified metric used to identify the time series." +}, +"metricKind": { +"description": "The metric kind of the time series. When listing time series, this metric kind might be different from the metric kind of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the metric kind of the associated metric. If the associated metric's descriptor must be auto-created, then this field specifies the metric kind of the new descriptor and must be either GAUGE (the default) or CUMULATIVE.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"points": { +"description": "The data points of this time series. When listing time series, points are returned in reverse time order.When creating a time series, this field must contain exactly one point and the point's type must be the same as the value type of the associated metric. If the associated metric's descriptor must be auto-created, then the value type of the descriptor is determined by the point's type, which must be BOOL, INT64, DOUBLE, or DISTRIBUTION.", +"items": { +"$ref": "Point" +}, +"type": "array" +}, +"resource": { +"$ref": "MonitoredResource", +"description": "The associated monitored resource. Custom metrics can use only certain monitored resource types in their time series data. For more information, see Monitored resources for custom metrics (https://cloud.google.com/monitoring/custom-metrics/creating-metrics#custom-metric-resources)." +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the value_type is INT64, DOUBLE, or DISTRIBUTION. The unit defines the representation of the stored metric values.", +"type": "string" +}, +"valueType": { +"description": "The value type of the time series. When listing time series, this value type might be different from the value type of the associated metric if this time series is an alignment or reduction of other time series.When creating a time series, this field is optional. If present, it must be the same as the type of the data in the points field.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is GAUGE.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is GAUGE.", +"The value is a Distribution.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"TimeSeriesData": { +"description": "Represents the values of a time series associated with a TimeSeriesDescriptor.", +"id": "TimeSeriesData", +"properties": { +"labelValues": { +"description": "The values of the labels in the time series identifier, given in the same order as the label_descriptors field of the TimeSeriesDescriptor associated with this object. Each value must have a value of the type given in the corresponding entry of label_descriptors.", +"items": { +"$ref": "LabelValue" +}, +"type": "array" +}, +"pointData": { +"description": "The points in the time series.", +"items": { +"$ref": "PointData" +}, +"type": "array" +} +}, +"type": "object" +}, +"TimeSeriesDescriptor": { +"description": "A descriptor for the labels and points in a time series.", +"id": "TimeSeriesDescriptor", +"properties": { +"labelDescriptors": { +"description": "Descriptors for the labels.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"pointDescriptors": { +"description": "Descriptors for the point data value columns.", +"items": { +"$ref": "ValueDescriptor" +}, +"type": "array" +} +}, +"type": "object" +}, +"TimeSeriesRatio": { +"description": "A TimeSeriesRatio specifies two TimeSeries to use for computing the good_service / total_service ratio. The specified TimeSeries must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE. The TimeSeriesRatio must specify exactly two of good, bad, and total, and the relationship good_service + bad_service = total_service will be assumed.", +"id": "TimeSeriesRatio", +"properties": { +"badServiceFilter": { +"description": "A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying bad service, either demanded service that was not provided or demanded service that was of inadequate quality. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.", +"type": "string" +}, +"goodServiceFilter": { +"description": "A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying good service provided. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.", +"type": "string" +}, +"totalServiceFilter": { +"description": "A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries quantifying total demanded service. Must have ValueType = DOUBLE or ValueType = INT64 and must have MetricKind = DELTA or MetricKind = CUMULATIVE.", +"type": "string" +} +}, +"type": "object" +}, +"Trigger": { +"description": "Specifies how many time series must fail a predicate to trigger a condition. If not specified, then a {count: 1} trigger is used.", +"id": "Trigger", +"properties": { +"count": { +"description": "The absolute number of time series that must fail the predicate for the condition to be triggered.", +"format": "int32", +"type": "integer" +}, +"percent": { +"description": "The percentage of time series that must fail the predicate for the condition to be triggered.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in oneof definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax proto2.", +"Syntax proto3.", +"Syntax editions." +], +"type": "string" +} +}, +"type": "object" +}, +"TypedValue": { +"description": "A single strongly-typed value.", +"id": "TypedValue", +"properties": { +"boolValue": { +"description": "A Boolean value: true or false.", +"type": "boolean" +}, +"distributionValue": { +"$ref": "Distribution", +"description": "A distribution value." +}, +"doubleValue": { +"description": "A 64-bit double-precision floating-point number. Its magnitude is approximately \u00b110\u00b1300 and it has 16 significant digits of precision.", +"format": "double", +"type": "number" +}, +"int64Value": { +"description": "A 64-bit integer. Its range is approximately \u00b19.2x1018.", +"format": "int64", +"type": "string" +}, +"stringValue": { +"description": "A variable-length string value.", +"type": "string" +} +}, +"type": "object" +}, +"UptimeCheckConfig": { +"description": "This message configures which resources and services to monitor for availability.", +"id": "UptimeCheckConfig", +"properties": { +"checkerType": { +"description": "The type of checkers to use to execute the Uptime check.", +"enum": [ +"CHECKER_TYPE_UNSPECIFIED", +"STATIC_IP_CHECKERS", +"VPC_CHECKERS" +], +"enumDescriptions": [ +"The default checker type. Currently converted to STATIC_IP_CHECKERS on creation, the default conversion behavior may change in the future.", +"STATIC_IP_CHECKERS are used for uptime checks that perform egress across the public internet. STATIC_IP_CHECKERS use the static IP addresses returned by ListUptimeCheckIps.", +"VPC_CHECKERS are used for uptime checks that perform egress using Service Directory and private network access. When using VPC_CHECKERS, the monitored resource type must be servicedirectory_service." +], +"type": "string" +}, +"contentMatchers": { +"description": "The content that is expected to appear in the data returned by the target server against which the check is run. Currently, only the first entry in the content_matchers list is supported, and additional entries will be ignored. This field is optional and should only be specified if a content match is required as part of the/ Uptime check.", +"items": { +"$ref": "ContentMatcher" +}, +"type": "array" +}, +"displayName": { +"description": "A human-friendly name for the Uptime check configuration. The display name should be unique within a Cloud Monitoring Workspace in order to make it easier to identify; however, uniqueness is not enforced. Required.", +"type": "string" +}, +"httpCheck": { +"$ref": "HttpCheck", +"description": "Contains information needed to make an HTTP or HTTPS check." +}, +"internalCheckers": { +"deprecated": true, +"description": "The internal checkers that this check will egress from. If is_internal is true and this list is empty, the check will egress from all the InternalCheckers configured for the project that owns this UptimeCheckConfig.", +"items": { +"$ref": "InternalChecker" +}, +"type": "array" +}, +"isInternal": { +"deprecated": true, +"description": "If this is true, then checks are made only from the 'internal_checkers'. If it is false, then checks are made only from the 'selected_regions'. It is an error to provide 'selected_regions' when is_internal is true, or to provide 'internal_checkers' when is_internal is false.", +"type": "boolean" +}, +"monitoredResource": { +"$ref": "MonitoredResource", +"description": "The monitored resource (https://cloud.google.com/monitoring/api/resources) associated with the configuration. The following monitored resource types are valid for this field: uptime_url, gce_instance, gae_app, aws_ec2_instance, aws_elb_load_balancer k8s_service servicedirectory_service cloud_run_revision" +}, +"name": { +"description": "Identifier. A unique resource name for this Uptime check configuration. The format is: projects/[PROJECT_ID_OR_NUMBER]/uptimeCheckConfigs/[UPTIME_CHECK_ID] [PROJECT_ID_OR_NUMBER] is the Workspace host project associated with the Uptime check.This field should be omitted when creating the Uptime check configuration; on create, the resource name is assigned by the server and included in the response.", +"type": "string" +}, +"period": { +"description": "How often, in seconds, the Uptime check is performed. Currently, the only supported values are 60s (1 minute), 300s (5 minutes), 600s (10 minutes), and 900s (15 minutes). Optional, defaults to 60s.", +"format": "google-duration", +"type": "string" +}, +"resourceGroup": { +"$ref": "ResourceGroup", +"description": "The group resource associated with the configuration." +}, +"selectedRegions": { +"description": "The list of regions from which the check will be run. Some regions contain one location, and others contain more than one. If this field is specified, enough regions must be provided to include a minimum of 3 locations. Not specifying this field will result in Uptime checks running from all available regions.", +"items": { +"enum": [ +"REGION_UNSPECIFIED", +"USA", +"EUROPE", +"SOUTH_AMERICA", +"ASIA_PACIFIC", +"USA_OREGON", +"USA_IOWA", +"USA_VIRGINIA" +], +"enumDescriptions": [ +"Default value if no region is specified. Will result in Uptime checks running from all regions.", +"Allows checks to run from locations within the United States of America.", +"Allows checks to run from locations within the continent of Europe.", +"Allows checks to run from locations within the continent of South America.", +"Allows checks to run from locations within the Asia Pacific area (ex: Singapore).", +"Allows checks to run from locations within the western United States of America", +"Allows checks to run from locations within the central United States of America", +"Allows checks to run from locations within the eastern United States of America" +], +"type": "string" +}, +"type": "array" +}, +"syntheticMonitor": { +"$ref": "SyntheticMonitorTarget", +"description": "Specifies a Synthetic Monitor to invoke." +}, +"tcpCheck": { +"$ref": "TcpCheck", +"description": "Contains information needed to make a TCP check." +}, +"timeout": { +"description": "The maximum amount of time to wait for the request to complete (must be between 1 and 60 seconds). Required.", +"format": "google-duration", +"type": "string" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-supplied key/value data to be used for organizing and identifying the UptimeCheckConfig objects.The field can contain up to 64 entries. Each key and value is limited to 63 Unicode characters or 128 bytes, whichever is smaller. Labels and values can contain only lowercase letters, numerals, underscores, and dashes. Keys must begin with a letter.", +"type": "object" +} +}, +"type": "object" +}, +"UptimeCheckIp": { +"description": "Contains the region, location, and list of IP addresses where checkers in the location run from.", +"id": "UptimeCheckIp", +"properties": { +"ipAddress": { +"description": "The IP address from which the Uptime check originates. This is a fully specified IP address (not an IP address range). Most IP addresses, as of this publication, are in IPv4 format; however, one should not rely on the IP addresses being in IPv4 format indefinitely, and should support interpreting this field in either IPv4 or IPv6 format.", +"type": "string" +}, +"location": { +"description": "A more specific location within the region that typically encodes a particular city/town/metro (and its containing state/province or country) within the broader umbrella region category.", +"type": "string" +}, +"region": { +"description": "A broad region category in which the IP address is located.", +"enum": [ +"REGION_UNSPECIFIED", +"USA", +"EUROPE", +"SOUTH_AMERICA", +"ASIA_PACIFIC", +"USA_OREGON", +"USA_IOWA", +"USA_VIRGINIA" +], +"enumDescriptions": [ +"Default value if no region is specified. Will result in Uptime checks running from all regions.", +"Allows checks to run from locations within the United States of America.", +"Allows checks to run from locations within the continent of Europe.", +"Allows checks to run from locations within the continent of South America.", +"Allows checks to run from locations within the Asia Pacific area (ex: Singapore).", +"Allows checks to run from locations within the western United States of America", +"Allows checks to run from locations within the central United States of America", +"Allows checks to run from locations within the eastern United States of America" +], +"type": "string" +} +}, +"type": "object" +}, +"ValueDescriptor": { +"description": "A descriptor for the value columns in a data point.", +"id": "ValueDescriptor", +"properties": { +"key": { +"description": "The value key.", +"type": "string" +}, +"metricKind": { +"description": "The value stream kind.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"unit": { +"description": "The unit in which time_series point values are reported. unit follows the UCUM format for units as seen in https://unitsofmeasure.org/ucum.html. unit is only valid if value_type is INTEGER, DOUBLE, DISTRIBUTION.", +"type": "string" +}, +"valueType": { +"description": "The value type.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is GAUGE.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is GAUGE.", +"The value is a Distribution.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"VerifyNotificationChannelRequest": { +"description": "The VerifyNotificationChannel request.", +"id": "VerifyNotificationChannelRequest", +"properties": { +"code": { +"description": "Required. The verification code that was delivered to the channel as a result of invoking the SendNotificationChannelVerificationCode API method or that was retrieved from a verified channel via GetNotificationChannelVerificationCode. For example, one might have \"G-123456\" or \"TKNZGhhd2EyN3I1MnRnMjRv\" (in general, one is only guaranteed that the code is valid UTF-8; one should not make any assumptions regarding the structure or format of the code).", +"type": "string" +} +}, +"type": "object" +}, +"WindowsBasedSli": { +"description": "A WindowsBasedSli defines good_service as the count of time windows for which the provided service was of good quality. Criteria for determining if service was good are embedded in the window_criterion.", +"id": "WindowsBasedSli", +"properties": { +"goodBadMetricFilter": { +"description": "A monitoring filter (https://cloud.google.com/monitoring/api/v3/filters) specifying a TimeSeries with ValueType = BOOL. The window is good if any true values appear in the window.", +"type": "string" +}, +"goodTotalRatioThreshold": { +"$ref": "PerformanceThreshold", +"description": "A window is good if its performance is high enough." +}, +"metricMeanInRange": { +"$ref": "MetricRange", +"description": "A window is good if the metric's value is in a good range, averaged across returned streams." +}, +"metricSumInRange": { +"$ref": "MetricRange", +"description": "A window is good if the metric's value is in a good range, summed across returned streams." +}, +"windowPeriod": { +"description": "Duration over which window quality is evaluated. Must be an integer fraction of a day and at least 60s.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Monitoring API", +"version": "v3", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessaccountmanagement.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessaccountmanagement.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..a7e272f7e1026ea9b0475060c37c178af5f9e6e4 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessaccountmanagement.v1.json @@ -0,0 +1,935 @@ +{ +"basePath": "", +"baseUrl": "https://mybusinessaccountmanagement.googleapis.com/", +"batchPath": "batch", +"canonicalName": "My Business Account Management", +"description": "The My Business Account Management API provides an interface for managing access to a location on Google. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/my-business/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "mybusinessaccountmanagement:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://mybusinessaccountmanagement.mtls.googleapis.com/", +"name": "mybusinessaccountmanagement", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"accounts": { +"methods": { +"create": { +"description": "Creates an account with the specified name and type under the given parent. - Personal accounts and Organizations cannot be created. - User Groups cannot be created with a Personal account as primary owner. - Location Groups cannot be created with a primary owner of a Personal account if the Personal account is in an Organization. - Location Groups cannot own Location Groups.", +"flatPath": "v1/accounts", +"httpMethod": "POST", +"id": "mybusinessaccountmanagement.accounts.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/accounts", +"request": { +"$ref": "Account" +}, +"response": { +"$ref": "Account" +} +}, +"get": { +"description": "Gets the specified account. Returns `NOT_FOUND` if the account does not exist or if the caller does not have access rights to it.", +"flatPath": "v1/accounts/{accountsId}", +"httpMethod": "GET", +"id": "mybusinessaccountmanagement.accounts.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the account to fetch.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Account" +} +}, +"list": { +"description": "Lists all of the accounts for the authenticated user. This includes all accounts that the user owns, as well as any accounts for which the user has management rights.", +"flatPath": "v1/accounts", +"httpMethod": "GET", +"id": "mybusinessaccountmanagement.accounts.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "Optional. A filter constraining the accounts to return. The response includes only entries that match the filter. If `filter` is empty, then no constraints are applied and all accounts (paginated) are retrieved for the requested account. For example, a request with the filter `type=USER_GROUP` will only return user groups. The `type` field is the only supported filter.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. How many accounts to fetch per page. The default and maximum is 20.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If specified, the next page of accounts is retrieved. The `pageToken` is returned when a call to `accounts.list` returns more results than can fit into the requested page size.", +"location": "query", +"type": "string" +}, +"parentAccount": { +"description": "Optional. The resource name of the account for which the list of directly accessible accounts is to be retrieved. This only makes sense for Organizations and User Groups. If empty, will return `ListAccounts` for the authenticated user. `accounts/{account_id}`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/accounts", +"response": { +"$ref": "ListAccountsResponse" +} +}, +"patch": { +"description": "Updates the specified business account. Personal accounts cannot be updated using this method.", +"flatPath": "v1/accounts/{accountsId}", +"httpMethod": "PATCH", +"id": "mybusinessaccountmanagement.accounts.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name, in the format `accounts/{account_id}`.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields that should be updated. The only editable field is `accountName`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If true, the request is validated without actually updating the account.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Account" +}, +"response": { +"$ref": "Account" +} +} +}, +"resources": { +"admins": { +"methods": { +"create": { +"description": "Invites the specified user to become an administrator for the specified account. The invitee must accept the invitation in order to be granted access to the account. See AcceptInvitation to programmatically accept an invitation.", +"flatPath": "v1/accounts/{accountsId}/admins", +"httpMethod": "POST", +"id": "mybusinessaccountmanagement.accounts.admins.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the account this admin is created for. `accounts/{account_id}`.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/admins", +"request": { +"$ref": "Admin" +}, +"response": { +"$ref": "Admin" +} +}, +"delete": { +"description": "Removes the specified admin from the specified account.", +"flatPath": "v1/accounts/{accountsId}/admins/{adminsId}", +"httpMethod": "DELETE", +"id": "mybusinessaccountmanagement.accounts.admins.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the admin to remove from the account. `accounts/{account_id}/admins/{admin_id}`.", +"location": "path", +"pattern": "^accounts/[^/]+/admins/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +} +}, +"list": { +"description": "Lists the admins for the specified account.", +"flatPath": "v1/accounts/{accountsId}/admins", +"httpMethod": "GET", +"id": "mybusinessaccountmanagement.accounts.admins.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the account from which to retrieve a list of admins. `accounts/{account_id}/admins`.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/admins", +"response": { +"$ref": "ListAccountAdminsResponse" +} +}, +"patch": { +"description": "Updates the Admin for the specified Account Admin.", +"flatPath": "v1/accounts/{accountsId}/admins/{adminsId}", +"httpMethod": "PATCH", +"id": "mybusinessaccountmanagement.accounts.admins.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name. For account admins, this is in the form: `accounts/{account_id}/admins/{admin_id}` For location admins, this is in the form: `locations/{location_id}/admins/{admin_id}` This field will be ignored if set during admin creation.", +"location": "path", +"pattern": "^accounts/[^/]+/admins/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields that should be updated. The only editable field is role.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Admin" +}, +"response": { +"$ref": "Admin" +} +} +} +}, +"invitations": { +"methods": { +"accept": { +"description": "Accepts the specified invitation.", +"flatPath": "v1/accounts/{accountsId}/invitations/{invitationsId}:accept", +"httpMethod": "POST", +"id": "mybusinessaccountmanagement.accounts.invitations.accept", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the invitation that is being accepted. `accounts/{account_id}/invitations/{invitation_id}`", +"location": "path", +"pattern": "^accounts/[^/]+/invitations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:accept", +"request": { +"$ref": "AcceptInvitationRequest" +}, +"response": { +"$ref": "Empty" +} +}, +"decline": { +"description": "Declines the specified invitation.", +"flatPath": "v1/accounts/{accountsId}/invitations/{invitationsId}:decline", +"httpMethod": "POST", +"id": "mybusinessaccountmanagement.accounts.invitations.decline", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the account invitation that is being declined. `accounts/{account_id}/invitations/{invitation_id}`", +"location": "path", +"pattern": "^accounts/[^/]+/invitations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:decline", +"request": { +"$ref": "DeclineInvitationRequest" +}, +"response": { +"$ref": "Empty" +} +}, +"list": { +"description": "Lists pending invitations for the specified account.", +"flatPath": "v1/accounts/{accountsId}/invitations", +"httpMethod": "GET", +"id": "mybusinessaccountmanagement.accounts.invitations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering the response is supported via the Invitation.target_type field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the account from which the list of invitations is being retrieved. `accounts/{account_id}/invitations`", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/invitations", +"response": { +"$ref": "ListInvitationsResponse" +} +} +} +} +} +}, +"locations": { +"methods": { +"transfer": { +"description": "Moves a location from an account that the user owns to another account that the same user administers. The user must be an owner of the account the location is currently associated with and must also be at least a manager of the destination account.", +"flatPath": "v1/locations/{locationsId}:transfer", +"httpMethod": "POST", +"id": "mybusinessaccountmanagement.locations.transfer", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the location to transfer. `locations/{location_id}`.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:transfer", +"request": { +"$ref": "TransferLocationRequest" +}, +"response": { +"$ref": "Empty" +} +} +}, +"resources": { +"admins": { +"methods": { +"create": { +"description": "Invites the specified user to become an administrator for the specified location. The invitee must accept the invitation in order to be granted access to the location. See AcceptInvitation to programmatically accept an invitation.", +"flatPath": "v1/locations/{locationsId}/admins", +"httpMethod": "POST", +"id": "mybusinessaccountmanagement.locations.admins.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the location this admin is created for. `locations/{location_id}/admins`.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/admins", +"request": { +"$ref": "Admin" +}, +"response": { +"$ref": "Admin" +} +}, +"delete": { +"description": "Removes the specified admin as a manager of the specified location.", +"flatPath": "v1/locations/{locationsId}/admins/{adminsId}", +"httpMethod": "DELETE", +"id": "mybusinessaccountmanagement.locations.admins.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the admin to remove from the location.", +"location": "path", +"pattern": "^locations/[^/]+/admins/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +} +}, +"list": { +"description": "Lists all of the admins for the specified location.", +"flatPath": "v1/locations/{locationsId}/admins", +"httpMethod": "GET", +"id": "mybusinessaccountmanagement.locations.admins.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the location to list admins of. `locations/{location_id}/admins`.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/admins", +"response": { +"$ref": "ListLocationAdminsResponse" +} +}, +"patch": { +"description": "Updates the Admin for the specified location. Only the AdminRole of the Admin can be updated.", +"flatPath": "v1/locations/{locationsId}/admins/{adminsId}", +"httpMethod": "PATCH", +"id": "mybusinessaccountmanagement.locations.admins.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name. For account admins, this is in the form: `accounts/{account_id}/admins/{admin_id}` For location admins, this is in the form: `locations/{location_id}/admins/{admin_id}` This field will be ignored if set during admin creation.", +"location": "path", +"pattern": "^locations/[^/]+/admins/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields that should be updated. The only editable field is role.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Admin" +}, +"response": { +"$ref": "Admin" +} +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://mybusinessaccountmanagement.googleapis.com/", +"schemas": { +"AcceptInvitationRequest": { +"description": "Request message for AccessControl.AcceptInvitation.", +"id": "AcceptInvitationRequest", +"properties": {}, +"type": "object" +}, +"Account": { +"description": "An account is a container for your location. If you are the only user who manages locations for your business, you can use your personal Google Account. To share management of locations with multiple users, [create a business account] (https://support.google.com/business/answer/6085339?ref_topic=6085325).", +"id": "Account", +"properties": { +"accountName": { +"description": "Required. The name of the account. For an account of type `PERSONAL`, this is the first and last name of the user account.", +"type": "string" +}, +"accountNumber": { +"description": "Output only. Account reference number if provisioned.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The resource name, in the format `accounts/{account_id}`.", +"type": "string" +}, +"organizationInfo": { +"$ref": "OrganizationInfo", +"description": "Output only. Additional info for an organization. This is populated only for an organization account.", +"readOnly": true +}, +"permissionLevel": { +"description": "Output only. Specifies the permission level the user has for this account.", +"enum": [ +"PERMISSION_LEVEL_UNSPECIFIED", +"OWNER_LEVEL", +"MEMBER_LEVEL" +], +"enumDescriptions": [ +"Not specified.", +"The user has owner level permission.", +"The user has member level permission." +], +"readOnly": true, +"type": "string" +}, +"primaryOwner": { +"description": "Required. Input only. The resource name of the account which will be the primary owner of the account being created. It should be of the form `accounts/{account_id}`.", +"type": "string" +}, +"role": { +"description": "Output only. Specifies the AccountRole of this account.", +"enum": [ +"ACCOUNT_ROLE_UNSPECIFIED", +"PRIMARY_OWNER", +"OWNER", +"MANAGER", +"SITE_MANAGER" +], +"enumDescriptions": [ +"Not specified.", +"The user is the primary owner this account.", +"The user owner of the account.", +"The user can manage this account.", +"The user can manage a limited set of features for the account." +], +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. Contains the type of account. Accounts of type PERSONAL and ORGANIZATION cannot be created using this API.", +"enum": [ +"ACCOUNT_TYPE_UNSPECIFIED", +"PERSONAL", +"LOCATION_GROUP", +"USER_GROUP", +"ORGANIZATION" +], +"enumDescriptions": [ +"Not specified.", +"An end-user account.", +"A group of Locations. For more information, see the [help center article] (https://support.google.com/business/answer/6085326)", +"A User Group for segregating organization staff in groups. For more information, see the [help center article](https://support.google.com/business/answer/7655731)", +"An organization representing a company. For more information, see the [help center article](https://support.google.com/business/answer/7663063)" +], +"type": "string" +}, +"verificationState": { +"description": "Output only. If verified, future locations that are created are automatically connected to Google Maps, and have Google+ pages created, without requiring moderation.", +"enum": [ +"VERIFICATION_STATE_UNSPECIFIED", +"VERIFIED", +"UNVERIFIED", +"VERIFICATION_REQUESTED" +], +"enumDescriptions": [ +"Not specified.", +"Verified account.", +"Account that is not verified, and verification has not been requested.", +"Account that is not verified, but verification has been requested." +], +"readOnly": true, +"type": "string" +}, +"vettedState": { +"description": "Output only. Indicates whether the account is vetted by Google. A vetted account is able to verify locations via the VETTED_PARTNER method.", +"enum": [ +"VETTED_STATE_UNSPECIFIED", +"NOT_VETTED", +"VETTED", +"INVALID" +], +"enumDescriptions": [ +"Not Specified", +"The account is not vetted by Google.", +"The account is vetted by Google and in a valid state. An account is automatically vetted if it has direct access to a vetted group account.", +"The account is vetted but in an invalid state. The account will behave like an unvetted account." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Admin": { +"description": "An administrator of an Account or a location.", +"id": "Admin", +"properties": { +"account": { +"description": "Immutable. The name of the Account resource that this Admin refers to. Used when calling locations.admins.create to invite a LocationGroup as an admin. If both this field and `admin` are set on `CREATE` requests, this field takes precedence and the email address in `admin` will be ignored. Format: `accounts/{account}`.", +"type": "string" +}, +"admin": { +"description": "Optional. The name of the admin. When making the initial invitation, this is the invitee's email address. On `GET` calls, the user's email address is returned if the invitation is still pending. Otherwise, it contains the user's first and last names. This field is only needed to be set during admin creation.", +"type": "string" +}, +"name": { +"description": "Immutable. The resource name. For account admins, this is in the form: `accounts/{account_id}/admins/{admin_id}` For location admins, this is in the form: `locations/{location_id}/admins/{admin_id}` This field will be ignored if set during admin creation.", +"type": "string" +}, +"pendingInvitation": { +"description": "Output only. Indicates whether this admin has a pending invitation for the specified resource.", +"readOnly": true, +"type": "boolean" +}, +"role": { +"description": "Required. Specifies the role that this admin uses with the specified Account or Location.", +"enum": [ +"ADMIN_ROLE_UNSPECIFIED", +"PRIMARY_OWNER", +"OWNER", +"MANAGER", +"SITE_MANAGER" +], +"enumDescriptions": [ +"Not specified.", +"The admin has owner-level access and is the primary owner. (Displays as 'Primary Owner' in UI).", +"The admin has owner-level access. (Displays as 'Owner' in UI).", +"The admin has managerial access.", +"The admin can manage social (Google+) pages. (Displays as 'Site Manager' in UI). This API doesn't allow creating an account admin with a SITE_MANAGER role." +], +"type": "string" +} +}, +"type": "object" +}, +"DeclineInvitationRequest": { +"description": "Request message for AccessControl.DeclineInvitation.", +"id": "DeclineInvitationRequest", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Invitation": { +"description": "Represents a pending invitation.", +"id": "Invitation", +"properties": { +"name": { +"description": "Required. The resource name for the invitation. `accounts/{account_id}/invitations/{invitation_id}`.", +"type": "string" +}, +"role": { +"description": "Output only. The invited role on the account.", +"enum": [ +"ADMIN_ROLE_UNSPECIFIED", +"PRIMARY_OWNER", +"OWNER", +"MANAGER", +"SITE_MANAGER" +], +"enumDescriptions": [ +"Not specified.", +"The admin has owner-level access and is the primary owner. (Displays as 'Primary Owner' in UI).", +"The admin has owner-level access. (Displays as 'Owner' in UI).", +"The admin has managerial access.", +"The admin can manage social (Google+) pages. (Displays as 'Site Manager' in UI). This API doesn't allow creating an account admin with a SITE_MANAGER role." +], +"readOnly": true, +"type": "string" +}, +"targetAccount": { +"$ref": "Account", +"description": "The sparsely populated account this invitation is for." +}, +"targetLocation": { +"$ref": "TargetLocation", +"description": "The target location this invitation is for." +}, +"targetType": { +"description": "Output only. Specifies which target types should appear in the response.", +"enum": [ +"TARGET_TYPE_UNSPECIFIED", +"ACCOUNTS_ONLY", +"LOCATIONS_ONLY" +], +"enumDescriptions": [ +"Set when target type is unspecified.", +"List invitations only for targets of type Account.", +"List invitations only for targets of type Location." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ListAccountAdminsResponse": { +"description": "Response message for AccessControl.ListAccountAdmins.", +"id": "ListAccountAdminsResponse", +"properties": { +"accountAdmins": { +"description": "A collection of Admin instances.", +"items": { +"$ref": "Admin" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListAccountsResponse": { +"description": "Response message for Accounts.ListAccounts.", +"id": "ListAccountsResponse", +"properties": { +"accounts": { +"description": "A collection of accounts to which the user has access. The personal account of the user doing the query will always be the first item of the result, unless it is filtered out.", +"items": { +"$ref": "Account" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If the number of accounts exceeds the requested page size, this field is populated with a token to fetch the next page of accounts on a subsequent call to `accounts.list`. If there are no more accounts, this field is not present in the response.", +"type": "string" +} +}, +"type": "object" +}, +"ListInvitationsResponse": { +"description": "Response message for AccessControl.ListInvitations.", +"id": "ListInvitationsResponse", +"properties": { +"invitations": { +"description": "A collection of invitations that are pending for the account. The number of invitations listed here cannot exceed 1000.", +"items": { +"$ref": "Invitation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationAdminsResponse": { +"description": "Response message for AccessControl.ListLocationAdmins.", +"id": "ListLocationAdminsResponse", +"properties": { +"admins": { +"description": "A collection of Admins.", +"items": { +"$ref": "Admin" +}, +"type": "array" +} +}, +"type": "object" +}, +"OrganizationInfo": { +"description": "Additional information stored for an organization.", +"id": "OrganizationInfo", +"properties": { +"address": { +"$ref": "PostalAddress", +"description": "Output only. The postal address for the account.", +"readOnly": true +}, +"phoneNumber": { +"description": "Output only. The contact number for the organization.", +"readOnly": true, +"type": "string" +}, +"registeredDomain": { +"description": "Output only. The registered domain for the account.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PostalAddress": { +"description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", +"id": "PostalAddress", +"properties": { +"addressLines": { +"description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", +"items": { +"type": "string" +}, +"type": "array" +}, +"administrativeArea": { +"description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.", +"type": "string" +}, +"languageCode": { +"description": "Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: \"zh-Hant\", \"ja\", \"ja-Latn\", \"en\".", +"type": "string" +}, +"locality": { +"description": "Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.", +"type": "string" +}, +"organization": { +"description": "Optional. The name of the organization at the address.", +"type": "string" +}, +"postalCode": { +"description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).", +"type": "string" +}, +"recipients": { +"description": "Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain \"care of\" information.", +"items": { +"type": "string" +}, +"type": "array" +}, +"regionCode": { +"description": "Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland.", +"type": "string" +}, +"revision": { +"description": "The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.", +"format": "int32", +"type": "integer" +}, +"sortingCode": { +"description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (e.g. \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (e.g. C\u00f4te d'Ivoire).", +"type": "string" +}, +"sublocality": { +"description": "Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.", +"type": "string" +} +}, +"type": "object" +}, +"TargetLocation": { +"description": "Represents a target location for a pending invitation.", +"id": "TargetLocation", +"properties": { +"address": { +"description": "The address of the location to which the user is invited.", +"type": "string" +}, +"locationName": { +"description": "The name of the location to which the user is invited.", +"type": "string" +} +}, +"type": "object" +}, +"TransferLocationRequest": { +"description": "Request message for AccessControl.TransferLocation.", +"id": "TransferLocationRequest", +"properties": { +"destinationAccount": { +"description": "Required. Name of the account resource to transfer the location to (for example, \"accounts/{account}\").", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "My Business Account Management API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessbusinesscalls.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessbusinesscalls.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..bbcea6b39fc0a425128fde672d0e55203212e4a4 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessbusinesscalls.v1.json @@ -0,0 +1,398 @@ +{ + "basePath": "", + "baseUrl": "https://mybusinessbusinesscalls.googleapis.com/", + "batchPath": "batch", + "canonicalName": "My Business Business Calls", + "description": "The My Business Business Calls API manages business calls information of a location on Google and collect insights like the number of missed calls to their location. Additional information about Business calls can be found at https://support.google.com/business/answer/9688285?p=call_history. If the Google Business Profile links to a Google Ads account and call history is turned on, calls that last longer than a specific time, and that can be attributed to an ad interaction, will show in the linked Google Ads account under the \"Calls from Ads\" conversion. If smart bidding and call conversions are used in the optimization strategy, there could be a change in ad spend. Learn more about smart bidding. To view and perform actions on a location's calls, you need to be a `OWNER`, `CO_OWNER` or `MANAGER` of the location. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/my-business/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "mybusinessbusinesscalls:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://mybusinessbusinesscalls.mtls.googleapis.com/", + "name": "mybusinessbusinesscalls", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "locations": { + "methods": { + "getBusinesscallssettings": { + "description": "Returns the Business calls settings resource for the given location.", + "flatPath": "v1/locations/{locationsId}/businesscallssettings", + "httpMethod": "GET", + "id": "mybusinessbusinesscalls.locations.getBusinesscallssettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The BusinessCallsSettings to get. The `name` field is used to identify the business call settings to get. Format: locations/{location_id}/businesscallssettings.", + "location": "path", + "pattern": "^locations/[^/]+/businesscallssettings$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "BusinessCallsSettings" + } + }, + "updateBusinesscallssettings": { + "description": "Updates the Business call settings for the specified location.", + "flatPath": "v1/locations/{locationsId}/businesscallssettings", + "httpMethod": "PATCH", + "id": "mybusinessbusinesscalls.locations.updateBusinesscallssettings", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The resource name of the calls settings. Format: locations/{location}/businesscallssettings", + "location": "path", + "pattern": "^locations/[^/]+/businesscallssettings$", + "required": true, + "type": "string" + }, + "updateMask": { + "description": "Required. The list of fields to update.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "request": { + "$ref": "BusinessCallsSettings" + }, + "response": { + "$ref": "BusinessCallsSettings" + } + } + }, + "resources": { + "businesscallsinsights": { + "methods": { + "list": { + "description": "Returns insights for Business calls for a location.", + "flatPath": "v1/locations/{locationsId}/businesscallsinsights", + "httpMethod": "GET", + "id": "mybusinessbusinesscalls.locations.businesscallsinsights.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter constraining the calls insights to return. The response includes only entries that match the filter. If the MetricType is not provided, AGGREGATE_COUNT is returned. If no end_date is provided, the last date for which data is available is used. If no start_date is provided, we will default to the first date for which data is available, which is currently 6 months. If start_date is before the date when data is available, data is returned starting from the date when it is available. At this time we support following filters. 1. start_date=\"DATE\" where date is in YYYY-MM-DD format. 2. end_date=\"DATE\" where date is in YYYY-MM-DD format. 3. metric_type=XYZ where XYZ is a valid MetricType. 4. Conjunctions(AND) of all of the above. e.g., \"start_date=2021-08-01 AND end_date=2021-08-10 AND metric_type=AGGREGATE_COUNT\" The AGGREGATE_COUNT metric_type ignores the DD part of the date.", + "location": "query", + "type": "string" + }, + "pageSize": { + "description": "Optional. The maximum number of BusinessCallsInsights to return. If unspecified, at most 20 will be returned. Some of the metric_types(e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the page_size is ignored.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "Optional. A page token, received from a previous `ListBusinessCallsInsights` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBusinessCallsInsights` must match the call that provided the page token. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the pake_token is ignored.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location to fetch calls insights for. Format: locations/{location_id}", + "location": "path", + "pattern": "^locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+parent}/businesscallsinsights", + "response": { + "$ref": "ListBusinessCallsInsightsResponse" + } + } + } + } + } + } + }, + "revision": "20230603", + "rootUrl": "https://mybusinessbusinesscalls.googleapis.com/", + "schemas": { + "AggregateMetrics": { + "description": "Metrics aggregated over the input time range.", + "id": "AggregateMetrics", + "properties": { + "answeredCallsCount": { + "description": "Total count of answered calls.", + "format": "int32", + "type": "integer" + }, + "endDate": { + "$ref": "Date", + "description": "End date for this metric." + }, + "hourlyMetrics": { + "description": "A list of metrics by hour of day.", + "items": { + "$ref": "HourlyMetrics" + }, + "type": "array" + }, + "missedCallsCount": { + "description": "Total count of missed calls.", + "format": "int32", + "type": "integer" + }, + "startDate": { + "$ref": "Date", + "description": "Date for this metric. If metric is monthly, only year and month are used." + }, + "weekdayMetrics": { + "description": "A list of metrics by day of week.", + "items": { + "$ref": "WeekDayMetrics" + }, + "type": "array" + } + }, + "type": "object" + }, + "BusinessCallsInsights": { + "description": "Insights for calls made to a location.", + "id": "BusinessCallsInsights", + "properties": { + "aggregateMetrics": { + "$ref": "AggregateMetrics", + "description": "Metric for the time range based on start_date and end_date." + }, + "metricType": { + "description": "The metric for which the value applies.", + "enum": [ + "METRIC_TYPE_UNSPECIFIED", + "AGGREGATE_COUNT" + ], + "enumDescriptions": [ + "Type of metric is unspecified.", + "The metrics provided are counts aggregated over the input time_range." + ], + "type": "string" + }, + "name": { + "description": "Required. The resource name of the calls insights. Format: locations/{location}/businesscallsinsights", + "type": "string" + } + }, + "type": "object" + }, + "BusinessCallsSettings": { + "description": "Business calls settings for a location.", + "id": "BusinessCallsSettings", + "properties": { + "callsState": { + "description": "Required. The state of this location's enrollment in Business calls.", + "enum": [ + "CALLS_STATE_UNSPECIFIED", + "ENABLED", + "DISABLED" + ], + "enumDescriptions": [ + "Unspecified.", + "Business calls is enabled for the location.", + "Business calls is disabled for the location." + ], + "type": "string" + }, + "consentTime": { + "description": "Input only. Time when the end user provided consent to the API user to enable business calls.", + "format": "google-datetime", + "type": "string" + }, + "name": { + "description": "Required. The resource name of the calls settings. Format: locations/{location}/businesscallssettings", + "type": "string" + } + }, + "type": "object" + }, + "Date": { + "description": "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, 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", + "id": "Date", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "HourlyMetrics": { + "description": "Metrics for an hour.", + "id": "HourlyMetrics", + "properties": { + "hour": { + "description": "Hour of the day. Allowed values are 0-23.", + "format": "int32", + "type": "integer" + }, + "missedCallsCount": { + "description": "Total count of missed calls for this hour.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ListBusinessCallsInsightsResponse": { + "description": "Response message for ListBusinessCallsInsights.", + "id": "ListBusinessCallsInsightsResponse", + "properties": { + "businessCallsInsights": { + "description": "A collection of business calls insights for the location.", + "items": { + "$ref": "BusinessCallsInsights" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. Some of the metric_types (e.g, AGGREGATE_COUNT) returns a single page. For these metrics, the next_page_token will be empty.", + "type": "string" + } + }, + "type": "object" + }, + "WeekDayMetrics": { + "description": "Metrics for a week day.", + "id": "WeekDayMetrics", + "properties": { + "day": { + "description": "Day of the week. Allowed values are Sunday - Saturday.", + "enum": [ + "DAY_OF_WEEK_UNSPECIFIED", + "MONDAY", + "TUESDAY", + "WEDNESDAY", + "THURSDAY", + "FRIDAY", + "SATURDAY", + "SUNDAY" + ], + "enumDescriptions": [ + "The day of the week is unspecified.", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "type": "string" + }, + "missedCallsCount": { + "description": "Total count of missed calls for this hour.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "My Business Business Calls API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessbusinessinformation.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessbusinessinformation.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..36119fc348f7b72f6bccd805543128431fe4dc15 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessbusinessinformation.v1.json @@ -0,0 +1,1800 @@ +{ +"basePath": "", +"baseUrl": "https://mybusinessbusinessinformation.googleapis.com/", +"batchPath": "batch", +"canonicalName": "My Business Business Information", +"description": "The My Business Business Information API provides an interface for managing business information. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/my-business/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "mybusinessbusinessinformation:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://mybusinessbusinessinformation.mtls.googleapis.com/", +"name": "mybusinessbusinessinformation", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"accounts": { +"resources": { +"locations": { +"methods": { +"create": { +"description": "Creates a new Location that will be owned by the logged in user.", +"flatPath": "v1/accounts/{accountsId}/locations", +"httpMethod": "POST", +"id": "mybusinessbusinessinformation.accounts.locations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the account in which to create this location.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A unique request ID for the server to detect duplicated requests. We recommend using UUIDs. Max length is 50 characters.", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If true, the request is validated without actually creating the location.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/locations", +"request": { +"$ref": "Location" +}, +"response": { +"$ref": "Location" +} +}, +"list": { +"description": "Lists the locations for the specified account.", +"flatPath": "v1/accounts/{accountsId}/locations", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.accounts.locations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. A filter constraining the locations to return. The response includes only entries that match the filter. If `filter` is empty, then constraints are applied and all locations (paginated) are retrieved for the requested account. For more information about valid fields and example usage, see [Work with Location Data Guide](https://developers.google.com/my-business/content/location-data#filter_results_when_you_list_locations).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Sorting order for the request. Multiple fields should be comma-separated, following SQL syntax. The default sorting order is ascending. To specify descending order, a suffix \" desc\" should be added. Valid fields to order_by are title and store_code. For example: \"title, store_code desc\" or \"title\" or \"store_code desc\"", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. How many locations to fetch per page. Default value is 10 if not set. Minimum is 1, and maximum page size is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If specified, it fetches the next `page` of locations. The page token is returned by previous calls to `ListLocations` when there were more locations than could fit in the requested page size.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the account to fetch locations from. If the parent Account is of AccountType PERSONAL, only Locations that are directly owned by the Account are returned, otherwise it will return all accessible locations from the Account, either directly or indirectly.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "Required. Read mask to specify what fields will be returned in the response.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/locations", +"response": { +"$ref": "ListLocationsResponse" +} +} +} +} +} +}, +"attributes": { +"methods": { +"list": { +"description": "Returns the list of attributes that would be available for a location with the given primary category and country.", +"flatPath": "v1/attributes", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.attributes.list", +"parameterOrder": [], +"parameters": { +"categoryName": { +"description": "The primary category stable ID to find available attributes. Must be of the format categories/{category_id}.", +"location": "query", +"type": "string" +}, +"languageCode": { +"description": "The BCP 47 code of language to get attribute display names in. If this language is not available, they will be provided in English.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "How many attributes to include per page. Default is 200, minimum is 1.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If specified, the next page of attribute metadata is retrieved.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Resource name of the location to look up available attributes. If this field is set, category_name, region_code, language_code and show_all are not required and must not be set.", +"location": "query", +"type": "string" +}, +"regionCode": { +"description": "The ISO 3166-1 alpha-2 country code to find available attributes.", +"location": "query", +"type": "string" +}, +"showAll": { +"description": "Metadata for all available attributes are returned when this field is set to true, disregarding parent and category_name fields. language_code and region_code are required when show_all is set to true.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/attributes", +"response": { +"$ref": "ListAttributeMetadataResponse" +} +} +} +}, +"categories": { +"methods": { +"batchGet": { +"description": "Returns a list of business categories for the provided language and GConcept ids.", +"flatPath": "v1/categories:batchGet", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.categories.batchGet", +"parameterOrder": [], +"parameters": { +"languageCode": { +"description": "Required. The BCP 47 code of language that the category names should be returned in.", +"location": "query", +"type": "string" +}, +"names": { +"description": "Required. At least one name must be set. The GConcept ids the localized category names should be returned for. To return details for more than one category, repeat this parameter in the request.", +"location": "query", +"repeated": true, +"type": "string" +}, +"regionCode": { +"description": "Optional. The ISO 3166-1 alpha-2 country code used to infer non-standard language.", +"location": "query", +"type": "string" +}, +"view": { +"description": "Required. Specifies which parts to the Category resource should be returned in the response.", +"enum": [ +"CATEGORY_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"Not specified, equivalent to CATEGORY_METADATA_ONLY.", +"The server response will only include Category fields display_name, category_id and language_code. It omits any service type metadata related fields.", +"Returns all the fields in the response." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/categories:batchGet", +"response": { +"$ref": "BatchGetCategoriesResponse" +} +}, +"list": { +"description": "Returns a list of business categories. Search will match the category name but not the category ID. Search only matches the front of a category name (that is, 'food' may return 'Food Court' but not 'Fast Food Restaurant').", +"flatPath": "v1/categories", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.categories.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "Optional. Filter string from user. The only field that supported is `displayName`. Eg: `filter=displayName=foo`.", +"location": "query", +"type": "string" +}, +"languageCode": { +"description": "Required. The BCP 47 code of language.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. How many categories to fetch per page. Default is 100, minimum is 1, and maximum page size is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If specified, the next page of categories will be fetched.", +"location": "query", +"type": "string" +}, +"regionCode": { +"description": "Required. The ISO 3166-1 alpha-2 country code.", +"location": "query", +"type": "string" +}, +"view": { +"description": "Required. Specifies which parts to the Category resource should be returned in the response.", +"enum": [ +"CATEGORY_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"Not specified, equivalent to CATEGORY_METADATA_ONLY.", +"The server response will only include Category fields display_name, category_id and language_code. It omits any service type metadata related fields.", +"Returns all the fields in the response." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/categories", +"response": { +"$ref": "ListCategoriesResponse" +} +} +} +}, +"chains": { +"methods": { +"get": { +"description": "Gets the specified chain. Returns `NOT_FOUND` if the chain does not exist.", +"flatPath": "v1/chains/{chainsId}", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.chains.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The chain's resource name, in the format `chains/{chain_place_id}`.", +"location": "path", +"pattern": "^chains/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Chain" +} +}, +"search": { +"description": "Searches the chain based on chain name.", +"flatPath": "v1/chains:search", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.chains.search", +"parameterOrder": [], +"parameters": { +"chainName": { +"description": "Required. Search for a chain by its name. Exact/partial/fuzzy/related queries are supported. Examples: \"walmart\", \"wal-mart\", \"walmmmart\", \"\u6c83\u5c14\u739b\"", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of matched chains to return from this query. The default is 10. The maximum possible value is 500.", +"format": "int32", +"location": "query", +"type": "integer" +} +}, +"path": "v1/chains:search", +"response": { +"$ref": "SearchChainsResponse" +} +} +} +}, +"googleLocations": { +"methods": { +"search": { +"description": "Search all of the possible locations that are a match to the specified request.", +"flatPath": "v1/googleLocations:search", +"httpMethod": "POST", +"id": "mybusinessbusinessinformation.googleLocations.search", +"parameterOrder": [], +"parameters": {}, +"path": "v1/googleLocations:search", +"request": { +"$ref": "SearchGoogleLocationsRequest" +}, +"response": { +"$ref": "SearchGoogleLocationsResponse" +} +} +} +}, +"locations": { +"methods": { +"delete": { +"description": "Deletes a location. If this location cannot be deleted using the API and it is marked so in the `google.mybusiness.businessinformation.v1.LocationState`, use the [Google Business Profile](https://business.google.com/manage/) website.", +"flatPath": "v1/locations/{locationsId}", +"httpMethod": "DELETE", +"id": "mybusinessbusinessinformation.locations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the location to delete.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +} +}, +"get": { +"description": "Returns the specified location.", +"flatPath": "v1/locations/{locationsId}", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the location to fetch.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "Required. Read mask to specify what fields will be returned in the response.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +} +}, +"getAttributes": { +"description": "Looks up all the attributes set for a given location.", +"flatPath": "v1/locations/{locationsId}/attributes", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.locations.getAttributes", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Google identifier for this location in the form of `locations/{location_id}/attributes`.", +"location": "path", +"pattern": "^locations/[^/]+/attributes$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Attributes" +} +}, +"getGoogleUpdated": { +"description": "Gets the Google-updated version of the specified location.", +"flatPath": "v1/locations/{locationsId}:getGoogleUpdated", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.locations.getGoogleUpdated", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the location to fetch.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "Required. Read mask to specify what fields will be returned in the response.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:getGoogleUpdated", +"response": { +"$ref": "GoogleUpdatedLocation" +} +}, +"patch": { +"description": "Updates the specified location.", +"flatPath": "v1/locations/{locationsId}", +"httpMethod": "PATCH", +"id": "mybusinessbusinessinformation.locations.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Google identifier for this location in the form: `locations/{location_id}`.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields to update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If true, the request is validated without actually updating the location. When this field is set, we will only return validation errors if there were any. The response will be empty if no errors were found.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Location" +}, +"response": { +"$ref": "Location" +} +}, +"updateAttributes": { +"description": "Update attributes for a given location.", +"flatPath": "v1/locations/{locationsId}/attributes", +"httpMethod": "PATCH", +"id": "mybusinessbusinessinformation.locations.updateAttributes", +"parameterOrder": [ +"name" +], +"parameters": { +"attributeMask": { +"description": "Required. Attribute name of attributes that you'd like to update. Represented by `attributes/{attribute}`. Updates: All attributes provided in the attributes field that you would like to update must be set in the `attribute_mask`. Attributes set in the above list but not in the `attribute_mask` will be ignored. Deletes: If you'd like to delete certain attributes, they must be specified in the `attribute_mask` with no matching entry in the attributes list. If you'd like to delete all attributes set on a location, you should look up all the applicable attributes for the location and then add them to the `attribute_mask` with an empty attributes field.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. Google identifier for this location in the form of `locations/{location_id}/attributes`.", +"location": "path", +"pattern": "^locations/[^/]+/attributes$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Attributes" +}, +"response": { +"$ref": "Attributes" +} +} +}, +"resources": { +"attributes": { +"methods": { +"getGoogleUpdated": { +"description": "Gets the Google-updated version of the specified location.", +"flatPath": "v1/locations/{locationsId}/attributes:getGoogleUpdated", +"httpMethod": "GET", +"id": "mybusinessbusinessinformation.locations.attributes.getGoogleUpdated", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Google identifier for this location in the form of `locations/{location_id}/attributes`.", +"location": "path", +"pattern": "^locations/[^/]+/attributes$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:getGoogleUpdated", +"response": { +"$ref": "Attributes" +} +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://mybusinessbusinessinformation.googleapis.com/", +"schemas": { +"AdWordsLocationExtensions": { +"description": "Additional information that is surfaced in AdWords.", +"id": "AdWordsLocationExtensions", +"properties": { +"adPhone": { +"description": "Required. An alternate phone number to display on AdWords location extensions instead of the location's primary phone number.", +"type": "string" +} +}, +"type": "object" +}, +"Attribute": { +"description": "A location attribute. Attributes provide additional information about a location. The attributes that can be set on a location may vary based on the properties of that location (for example, category). Available attributes are determined by Google and may be added and removed without API changes.", +"id": "Attribute", +"properties": { +"name": { +"description": "Required. The resource name for this attribute.", +"type": "string" +}, +"repeatedEnumValue": { +"$ref": "RepeatedEnumAttributeValue", +"description": "When the attribute value type is REPEATED_ENUM, this contains the attribute value, and the other values fields must be empty." +}, +"uriValues": { +"description": "When the attribute value type is URL, this field contains the value(s) for this attribute, and the other values fields must be empty.", +"items": { +"$ref": "UriAttributeValue" +}, +"type": "array" +}, +"valueType": { +"description": "Output only. The type of value that this attribute contains. This should be used to determine how to interpret the value.", +"enum": [ +"ATTRIBUTE_VALUE_TYPE_UNSPECIFIED", +"BOOL", +"ENUM", +"URL", +"REPEATED_ENUM" +], +"enumDescriptions": [ +"Not specified.", +"The values for this attribute are boolean values.", +"The attribute has a predetermined list of available values that can be used. Metadata for this attribute will list these values.", +"The values for this attribute are URLs.", +"The attribute value is an enum with multiple possible values that can be explicitly set or unset." +], +"readOnly": true, +"type": "string" +}, +"values": { +"description": "The values for this attribute. The type of the values supplied must match that expected for that attribute. This is a repeated field where multiple attribute values may be provided. Attribute types only support one value.", +"items": { +"type": "any" +}, +"type": "array" +} +}, +"type": "object" +}, +"AttributeMetadata": { +"description": "Metadata for an attribute. Contains display information for the attribute, including a localized name and a heading for grouping related attributes together.", +"id": "AttributeMetadata", +"properties": { +"deprecated": { +"description": "If true, the attribute is deprecated and should no longer be used. If deprecated, updating this attribute will not result in an error, but updates will not be saved. At some point after being deprecated, the attribute will be removed entirely and it will become an error.", +"type": "boolean" +}, +"displayName": { +"description": "The localized display name for the attribute, if available; otherwise, the English display name.", +"type": "string" +}, +"groupDisplayName": { +"description": "The localized display name of the group that contains this attribute, if available; otherwise, the English group name. Related attributes are collected into a group and should be displayed together under the heading given here.", +"type": "string" +}, +"parent": { +"description": "The unique identifier for the attribute.", +"type": "string" +}, +"repeatable": { +"description": "If true, the attribute supports multiple values. If false, only a single value should be provided.", +"type": "boolean" +}, +"valueMetadata": { +"description": "For some types of attributes (for example, enums), a list of supported values and corresponding display names for those values is provided.", +"items": { +"$ref": "AttributeValueMetadata" +}, +"type": "array" +}, +"valueType": { +"description": "The value type for the attribute. Values set and retrieved should be expected to be of this type.", +"enum": [ +"ATTRIBUTE_VALUE_TYPE_UNSPECIFIED", +"BOOL", +"ENUM", +"URL", +"REPEATED_ENUM" +], +"enumDescriptions": [ +"Not specified.", +"The values for this attribute are boolean values.", +"The attribute has a predetermined list of available values that can be used. Metadata for this attribute will list these values.", +"The values for this attribute are URLs.", +"The attribute value is an enum with multiple possible values that can be explicitly set or unset." +], +"type": "string" +} +}, +"type": "object" +}, +"AttributeValueMetadata": { +"description": "Metadata for supported attribute values.", +"id": "AttributeValueMetadata", +"properties": { +"displayName": { +"description": "The display name for this value, localized where available; otherwise, in English. The value display name is intended to be used in context with the attribute display name. For example, for a \"WiFi\" enum attribute, this could contain \"Paid\" to represent paid Wi-Fi.", +"type": "string" +}, +"value": { +"description": "The attribute value.", +"type": "any" +} +}, +"type": "object" +}, +"Attributes": { +"description": "A container for all the attributes for a given location.", +"id": "Attributes", +"properties": { +"attributes": { +"description": "A collection of attributes that need to be updated.", +"items": { +"$ref": "Attribute" +}, +"type": "array" +}, +"name": { +"description": "Required. Google identifier for this location in the form of `locations/{location_id}/attributes`.", +"type": "string" +} +}, +"type": "object" +}, +"BatchGetCategoriesResponse": { +"description": "Response message for BusinessCategories.BatchGetBusinessCategories.", +"id": "BatchGetCategoriesResponse", +"properties": { +"categories": { +"description": "Categories that match the GConcept ids provided in the request. They will not come in the same order as category ids in the request.", +"items": { +"$ref": "Category" +}, +"type": "array" +} +}, +"type": "object" +}, +"BusinessHours": { +"description": "Represents the time periods that this location is open for business. Holds a collection of TimePeriod instances.", +"id": "BusinessHours", +"properties": { +"periods": { +"description": "Required. A collection of times that this location is open for business. Each period represents a range of hours when the location is open during the week.", +"items": { +"$ref": "TimePeriod" +}, +"type": "array" +} +}, +"type": "object" +}, +"Categories": { +"description": "A collection of categories that describes the business. During updates, both fields must be set. Clients are prohibited from individually updating the primary or additional categories using the update mask.", +"id": "Categories", +"properties": { +"additionalCategories": { +"description": "Optional. Additional categories to describe your business. Categories help your customers find accurate, specific results for services they're interested in. To keep your business information accurate and live, make sure that you use as few categories as possible to describe your overall core business. Choose categories that are as specific as possible, but representative of your main business.", +"items": { +"$ref": "Category" +}, +"type": "array" +}, +"primaryCategory": { +"$ref": "Category", +"description": "Required. Category that best describes the core business this location engages in." +} +}, +"type": "object" +}, +"Category": { +"description": "A category describing what this business is (not what it does). For a list of valid category IDs, and the mappings to their human-readable names, see `categories.list`.", +"id": "Category", +"properties": { +"displayName": { +"description": "Output only. The human-readable name of the category. This is set when reading the location. When modifying the location, `category_id` must be set.", +"readOnly": true, +"type": "string" +}, +"moreHoursTypes": { +"description": "Output only. More hours types that are available for this business category.", +"items": { +"$ref": "MoreHoursType" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Required. A stable ID (provided by Google) for this category. The value must be specified when modifying the category (when creating or updating a location).", +"type": "string" +}, +"serviceTypes": { +"description": "Output only. A list of all the service types that are available for this business category.", +"items": { +"$ref": "ServiceType" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"Chain": { +"description": "A chain is a brand that your business's locations can be affiliated with.", +"id": "Chain", +"properties": { +"chainNames": { +"description": "Names of the chain.", +"items": { +"$ref": "ChainName" +}, +"type": "array" +}, +"locationCount": { +"description": "Number of locations that are part of this chain.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. The chain's resource name, in the format `chains/{chain_id}`.", +"type": "string" +}, +"websites": { +"description": "Websites of the chain.", +"items": { +"$ref": "ChainUri" +}, +"type": "array" +} +}, +"type": "object" +}, +"ChainName": { +"description": "Name to be used when displaying the chain.", +"id": "ChainName", +"properties": { +"displayName": { +"description": "The display name for this chain.", +"type": "string" +}, +"languageCode": { +"description": "The BCP 47 code of language of the name.", +"type": "string" +} +}, +"type": "object" +}, +"ChainUri": { +"description": "Url to be used when displaying the chain.", +"id": "ChainUri", +"properties": { +"uri": { +"description": "The uri for this chain.", +"type": "string" +} +}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"FreeFormServiceItem": { +"description": "Represents a free-form service offered by the merchant. These are services that are not exposed as part of our structure service data. The merchant manually enters the names for of such services via a geomerchant surface.", +"id": "FreeFormServiceItem", +"properties": { +"category": { +"description": "Required. This field represents the category name (i.e. the category's stable ID). The `category` and `service_type_id` should match the possible combinations provided in the `Category` message.", +"type": "string" +}, +"label": { +"$ref": "Label", +"description": "Required. Language-tagged labels for the item. We recommend that item names be 140 characters or less, and descriptions 250 characters or less. This field should only be set if the input is a custom service item. Standardized service types should be updated via service_type_id." +} +}, +"type": "object" +}, +"GoogleLocation": { +"description": "Represents a Location that is present on Google. This can be a location that has been claimed by the user, someone else, or could be unclaimed.", +"id": "GoogleLocation", +"properties": { +"location": { +"$ref": "Location", +"description": "The sparsely populated Location information. This field can be re-used in CreateLocation if it is not currently claimed by a user." +}, +"name": { +"description": "Resource name of this GoogleLocation, in the format `googleLocations/{googleLocationId}`.", +"type": "string" +}, +"requestAdminRightsUri": { +"description": "A URL that will redirect the user to the request admin rights UI. This field is only present if the location has already been claimed by any user, including the current user.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleUpdatedLocation": { +"description": "Represents a location that was modified by Google.", +"id": "GoogleUpdatedLocation", +"properties": { +"diffMask": { +"description": "The fields that Google updated.", +"format": "google-fieldmask", +"type": "string" +}, +"location": { +"$ref": "Location", +"description": "The Google-updated version of this location." +}, +"pendingMask": { +"description": "The fields that have pending edits that haven't yet been pushed to Maps and Search.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Label": { +"description": "Label to be used when displaying the price list, section, or item.", +"id": "Label", +"properties": { +"description": { +"description": "Optional. Description of the price list, section, or item.", +"type": "string" +}, +"displayName": { +"description": "Required. Display name for the price list, section, or item.", +"type": "string" +}, +"languageCode": { +"description": "Optional. The BCP-47 language code that these strings apply for. Only one set of labels may be set per language.", +"type": "string" +} +}, +"type": "object" +}, +"LatLng": { +"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", +"id": "LatLng", +"properties": { +"latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ListAttributeMetadataResponse": { +"description": "Response for AttributesService.ListAttributeMetadata.", +"id": "ListAttributeMetadataResponse", +"properties": { +"attributeMetadata": { +"description": "A collection of attribute metadata for the available attributes.", +"items": { +"$ref": "AttributeMetadata" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If the number of attributes exceeded the requested page size, this field will be populated with a token to fetch the next page of attributes on a subsequent call to `attributes.list`. If there are no more attributes, this field will not be present in the response.", +"type": "string" +} +}, +"type": "object" +}, +"ListCategoriesResponse": { +"description": "Response message for BusinessCategories.ListCategories.", +"id": "ListCategoriesResponse", +"properties": { +"categories": { +"description": "The matching categories based on the requested parameters.", +"items": { +"$ref": "Category" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If the number of categories exceeded the requested page size, this field will be populated with a token to fetch the next page of categories on a subsequent call to `ListCategories`.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "Response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "The locations.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If the number of locations exceeded the requested page size, this field is populated with a token to fetch the next page of locations on a subsequent call to `ListLocations`. If there are no more locations, this field is not present in the response.", +"type": "string" +}, +"totalSize": { +"description": "The approximate number of Locations in the list irrespective of pagination. This field will only be returned if `filter` is used as a query parameter.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Location": { +"description": "A location. See the [help center article] (https://support.google.com/business/answer/3038177) for a detailed description of these fields, or the [category endpoint](/my-business/reference/rest/v4/categories) for a list of valid business categories.", +"id": "Location", +"properties": { +"adWordsLocationExtensions": { +"$ref": "AdWordsLocationExtensions", +"description": "Optional. Additional information that is surfaced in AdWords." +}, +"categories": { +"$ref": "Categories", +"description": "Optional. The different categories that describe the business." +}, +"labels": { +"description": "Optional. A collection of free-form strings to allow you to tag your business. These labels are NOT user facing; only you can see them. Must be between 1-255 characters per label.", +"items": { +"type": "string" +}, +"type": "array" +}, +"languageCode": { +"description": "Immutable. The language of the location. Set during creation and not updateable.", +"type": "string" +}, +"latlng": { +"$ref": "LatLng", +"description": "Optional. User-provided latitude and longitude. When creating a location, this field is ignored if the provided address geocodes successfully. This field is only returned on get requests if the user-provided `latlng` value was accepted during create, or the `latlng` value was updated through the Google Business Profile website. This field can only be updated by approved clients." +}, +"metadata": { +"$ref": "Metadata", +"description": "Output only. Additional non-user-editable information.", +"readOnly": true +}, +"moreHours": { +"description": "Optional. More hours for a business's different departments or specific customers.", +"items": { +"$ref": "MoreHours" +}, +"type": "array" +}, +"name": { +"description": "Google identifier for this location in the form: `locations/{location_id}`.", +"type": "string" +}, +"openInfo": { +"$ref": "OpenInfo", +"description": "Optional. A flag that indicates whether the location is currently open for business." +}, +"phoneNumbers": { +"$ref": "PhoneNumbers", +"description": "Optional. The different phone numbers that customers can use to get in touch with the business." +}, +"profile": { +"$ref": "Profile", +"description": "Optional. Describes your business in your own voice and shares with users the unique story of your business and offerings. This field is required for all categories except lodging categories (e.g. hotels, motels, inns)." +}, +"regularHours": { +"$ref": "BusinessHours", +"description": "Optional. Operating hours for the business." +}, +"relationshipData": { +"$ref": "RelationshipData", +"description": "Optional. All locations and chain related to this one." +}, +"serviceArea": { +"$ref": "ServiceAreaBusiness", +"description": "Optional. Service area businesses provide their service at the customer's location. If this business is a service area business, this field describes the area(s) serviced by the business." +}, +"serviceItems": { +"description": "Optional. List of services supported by merchants. A service can be haircut, install water heater, etc. Duplicated service items will be removed automatically.", +"items": { +"$ref": "ServiceItem" +}, +"type": "array" +}, +"specialHours": { +"$ref": "SpecialHours", +"description": "Optional. Special hours for the business. This typically includes holiday hours, and other times outside of regular operating hours. These override regular business hours. This field cannot be set without regular hours." +}, +"storeCode": { +"description": "Optional. External identifier for this location, which must be unique within a given account. This is a means of associating the location with your own records.", +"type": "string" +}, +"storefrontAddress": { +"$ref": "PostalAddress", +"description": "Optional. A precise, accurate address to describe your business location. PO boxes or mailboxes located at remote locations are not acceptable. At this time, you can specify a maximum of five `address_lines` values in the address. This field should only be set for businesses that have a storefront. This field should not be set for locations of type `CUSTOMER_LOCATION_ONLY` but if set, any value provided will be discarded." +}, +"title": { +"description": "Required. Location name should reflect your business's real-world name, as used consistently on your storefront, website, and stationery, and as known to customers. Any additional information, when relevant, can be included in other fields of the resource (for example, `Address`, `Categories`). Don't add unnecessary information to your name (for example, prefer \"Google\" over \"Google Inc. - Mountain View Corporate Headquarters\"). Don't include marketing taglines, store codes, special characters, hours or closed/open status, phone numbers, website URLs, service/product information, location/address or directions, or containment information (for example, \"Chase ATM in Duane Reade\").", +"type": "string" +}, +"websiteUri": { +"description": "Optional. A URL for this business. If possible, use a URL that represents this individual business location instead of a generic website/URL that represents all locations, or the brand.", +"type": "string" +} +}, +"type": "object" +}, +"Metadata": { +"description": "Additional non-user-editable information about the location.", +"id": "Metadata", +"properties": { +"canDelete": { +"description": "Output only. Indicates whether the location can be deleted using the API.", +"readOnly": true, +"type": "boolean" +}, +"canHaveBusinessCalls": { +"description": "Output only. Indicates if the listing is eligible for business calls.", +"readOnly": true, +"type": "boolean" +}, +"canHaveFoodMenus": { +"description": "Output only. Indicates if the listing is eligible for food menu.", +"readOnly": true, +"type": "boolean" +}, +"canModifyServiceList": { +"description": "Output only. Indicates if the listing can modify the service list.", +"readOnly": true, +"type": "boolean" +}, +"canOperateHealthData": { +"description": "Output only. Indicates whether the location can operate on Health data.", +"readOnly": true, +"type": "boolean" +}, +"canOperateLocalPost": { +"description": "Output only. Indicates if the listing can manage local posts.", +"readOnly": true, +"type": "boolean" +}, +"canOperateLodgingData": { +"description": "Output only. Indicates whether the location can operate on Lodging data.", +"readOnly": true, +"type": "boolean" +}, +"duplicateLocation": { +"description": "Output only. The location resource that this location duplicates.", +"readOnly": true, +"type": "string" +}, +"hasGoogleUpdated": { +"description": "Output only. Indicates whether the place ID associated with this location has updates that need to be updated or rejected by the client. If this boolean is set, you should call the `getGoogleUpdated` method to lookup information that's needs to be verified.", +"readOnly": true, +"type": "boolean" +}, +"hasPendingEdits": { +"description": "Output only. Indicates whether any of this Location's properties are in the edit pending state.", +"readOnly": true, +"type": "boolean" +}, +"hasVoiceOfMerchant": { +"description": "Output only. Indicates if the listing has Voice of Merchant. If this boolean is false, you should call the locations.getVoiceOfMerchantState API to get details as to why they do not have Voice of Merchant.", +"readOnly": true, +"type": "boolean" +}, +"mapsUri": { +"description": "Output only. A link to the location on Maps.", +"readOnly": true, +"type": "string" +}, +"newReviewUri": { +"description": "Output only. A link to the page on Google Search where a customer can leave a review for the location.", +"readOnly": true, +"type": "string" +}, +"placeId": { +"description": "Output only. If this locationappears on Google Maps, this field is populated with the place ID for the location. This ID can be used in various Places APIs. This field can be set during Create calls, but not for Update.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Money": { +"description": "Represents an amount of money with its currency type.", +"id": "Money", +"properties": { +"currencyCode": { +"description": "The three-letter currency code defined in ISO 4217.", +"type": "string" +}, +"nanos": { +"description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", +"format": "int32", +"type": "integer" +}, +"units": { +"description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"MoreHours": { +"description": "The time periods during which a location is open for certain types of business.", +"id": "MoreHours", +"properties": { +"hoursTypeId": { +"description": "Required. Type of hours. Clients should call {#link businessCategories:BatchGet} to get supported hours types for categories of their locations.", +"type": "string" +}, +"periods": { +"description": "Required. A collection of times that this location is open. Each period represents a range of hours when the location is open during the week.", +"items": { +"$ref": "TimePeriod" +}, +"type": "array" +} +}, +"type": "object" +}, +"MoreHoursType": { +"description": "More hours types that a business can offers, in addition to its regular hours.", +"id": "MoreHoursType", +"properties": { +"displayName": { +"description": "Output only. The human-readable English display name for the hours type.", +"readOnly": true, +"type": "string" +}, +"hoursTypeId": { +"description": "Output only. A stable ID provided by Google for this hours type.", +"readOnly": true, +"type": "string" +}, +"localizedDisplayName": { +"description": "Output only. The human-readable localized display name for the hours type.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OpenInfo": { +"description": "Information related to the opening state of the business.", +"id": "OpenInfo", +"properties": { +"canReopen": { +"description": "Output only. Indicates whether this business is eligible for re-open.", +"readOnly": true, +"type": "boolean" +}, +"openingDate": { +"$ref": "Date", +"description": "Optional. The date on which the location first opened. If the exact day is not known, month and year only can be provided. The date must be in the past or be no more than one year in the future." +}, +"status": { +"description": "Required. Indicates whether or not the Location is currently open for business. All locations are open by default, unless updated to be closed.", +"enum": [ +"OPEN_FOR_BUSINESS_UNSPECIFIED", +"OPEN", +"CLOSED_PERMANENTLY", +"CLOSED_TEMPORARILY" +], +"enumDescriptions": [ +"Not specified.", +"Indicates that the location is open.", +"Indicates that the location has been permanently closed.", +"Indicates that the location has been temporarily closed." +], +"type": "string" +} +}, +"type": "object" +}, +"PhoneNumbers": { +"description": "A collection of phone numbers for the business. During updates, both fields must be set. Clients may not update just the primary or additional phone numbers using the update mask. International phone format is preferred, such as \"+1 415 555 0132\", see more in (https://developers.google.com/style/phone-numbers#international-phone-numbers).", +"id": "PhoneNumbers", +"properties": { +"additionalPhones": { +"description": "Optional. Up to two phone numbers (mobile or landline, no fax) at which your business can be called, in addition to your primary phone number.", +"items": { +"type": "string" +}, +"type": "array" +}, +"primaryPhone": { +"description": "Required. A phone number that connects to your individual business location as directly as possible. Use a local phone number instead of a central, call center helpline number whenever possible.", +"type": "string" +} +}, +"type": "object" +}, +"PlaceInfo": { +"description": "Defines an area that's represented by a place ID.", +"id": "PlaceInfo", +"properties": { +"placeId": { +"description": "Required. The ID of the place. Must correspond to a region. (https://developers.google.com/places/web-service/supported_types#table3)", +"type": "string" +}, +"placeName": { +"description": "Required. The localized name of the place. For example, `Scottsdale, AZ`.", +"type": "string" +} +}, +"type": "object" +}, +"Places": { +"description": "Defines the union of areas represented by a set of places.", +"id": "Places", +"properties": { +"placeInfos": { +"description": "The areas represented by place IDs. Limited to a maximum of 20 places.", +"items": { +"$ref": "PlaceInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"PostalAddress": { +"description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", +"id": "PostalAddress", +"properties": { +"addressLines": { +"description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", +"items": { +"type": "string" +}, +"type": "array" +}, +"administrativeArea": { +"description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.", +"type": "string" +}, +"languageCode": { +"description": "Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: \"zh-Hant\", \"ja\", \"ja-Latn\", \"en\".", +"type": "string" +}, +"locality": { +"description": "Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.", +"type": "string" +}, +"organization": { +"description": "Optional. The name of the organization at the address.", +"type": "string" +}, +"postalCode": { +"description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).", +"type": "string" +}, +"recipients": { +"description": "Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain \"care of\" information.", +"items": { +"type": "string" +}, +"type": "array" +}, +"regionCode": { +"description": "Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland.", +"type": "string" +}, +"revision": { +"description": "The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.", +"format": "int32", +"type": "integer" +}, +"sortingCode": { +"description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (e.g. \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (e.g. C\u00f4te d'Ivoire).", +"type": "string" +}, +"sublocality": { +"description": "Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.", +"type": "string" +} +}, +"type": "object" +}, +"Profile": { +"description": "All information pertaining to the location's profile.", +"id": "Profile", +"properties": { +"description": { +"description": "Required. Description of the location in your own voice, not editable by anyone else.", +"type": "string" +} +}, +"type": "object" +}, +"RelationshipData": { +"description": "Information of all parent and children locations related to this one.", +"id": "RelationshipData", +"properties": { +"childrenLocations": { +"description": "The list of children locations that this location has relations with.", +"items": { +"$ref": "RelevantLocation" +}, +"type": "array" +}, +"parentChain": { +"description": "The resource name of the Chain that this location is member of. How to find Chain ID", +"type": "string" +}, +"parentLocation": { +"$ref": "RelevantLocation", +"description": "The parent location that this location has relations with." +} +}, +"type": "object" +}, +"RelevantLocation": { +"description": "Information about another location that is related to current one. The relation can be any one of DEPARTMENT_OF or INDEPENDENT_ESTABLISHMENT_OF, and the location specified here can be on either side (parent/child) of the location.", +"id": "RelevantLocation", +"properties": { +"placeId": { +"description": "Required. Specify the location that is on the other side of the relation by its placeID.", +"type": "string" +}, +"relationType": { +"description": "Required. The type of the relationship.", +"enum": [ +"RELATION_TYPE_UNSPECIFIED", +"DEPARTMENT_OF", +"INDEPENDENT_ESTABLISHMENT_IN" +], +"enumDescriptions": [ +"Type unspecified.", +"This represents a relation between 2 locations which share one physical area, same brand/upper management/organization, but with different key attributes like store hours or phone numbers. For example, Costco Pharmacy is a department in Costco Wholesale.", +"This represents the cases where 2 locations are co-located in the same physical location, but from different companies (e.g. Starbucks in a Safeway, shops in a mall)." +], +"type": "string" +} +}, +"type": "object" +}, +"RepeatedEnumAttributeValue": { +"description": "Values for an attribute with a `value_type` of REPEATED_ENUM. This consists of two lists of value IDs: those that are set (true) and those that are unset (false). Values absent are considered unknown. At least one value must be specified.", +"id": "RepeatedEnumAttributeValue", +"properties": { +"setValues": { +"description": "Enum values that are set.", +"items": { +"type": "string" +}, +"type": "array" +}, +"unsetValues": { +"description": "Enum values that are unset.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SearchChainsResponse": { +"description": "Response message for Locations.SearchChains.", +"id": "SearchChainsResponse", +"properties": { +"chains": { +"description": "Chains that match the queried chain_display_name in SearchChainsRequest. If there are no matches, this field will be empty. Results are listed in order of relevance.", +"items": { +"$ref": "Chain" +}, +"type": "array" +} +}, +"type": "object" +}, +"SearchGoogleLocationsRequest": { +"description": "Request message for GoogleLocations.SearchGoogleLocations.", +"id": "SearchGoogleLocationsRequest", +"properties": { +"location": { +"$ref": "Location", +"description": "Location to search for. If provided, will find locations which match the provided location details." +}, +"pageSize": { +"description": "The number of matches to return. The default value is 3, with a maximum of 10. Note that latency may increase if more are requested. There is no pagination.", +"format": "int32", +"type": "integer" +}, +"query": { +"description": "Text query to search for. The search results from a query string will be less accurate than if providing an exact location, but can provide more inexact matches.", +"type": "string" +} +}, +"type": "object" +}, +"SearchGoogleLocationsResponse": { +"description": "Response message for GoogleLocations.SearchGoogleLocations.", +"id": "SearchGoogleLocationsResponse", +"properties": { +"googleLocations": { +"description": "A collection of GoogleLocations that are potential matches to the specified request, listed in order from most to least accuracy.", +"items": { +"$ref": "GoogleLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ServiceAreaBusiness": { +"description": "Service area businesses provide their service at the customer's location (for example, a locksmith or plumber).", +"id": "ServiceAreaBusiness", +"properties": { +"businessType": { +"description": "Required. Indicates the type of the service area business.", +"enum": [ +"BUSINESS_TYPE_UNSPECIFIED", +"CUSTOMER_LOCATION_ONLY", +"CUSTOMER_AND_BUSINESS_LOCATION" +], +"enumDescriptions": [ +"Output only. Not specified.", +"Offers service only in the surrounding area (not at the business address). If a business is being updated from a CUSTOMER_AND_BUSINESS_LOCATION to a CUSTOMER_LOCATION_ONLY, the location update must include field mask `storefront_address` and set the field to empty.", +"Offers service at the business address and the surrounding area." +], +"type": "string" +}, +"places": { +"$ref": "Places", +"description": "The area that this business serves defined through a set of places." +}, +"regionCode": { +"description": "Immutable. CLDR region code of the country/region that this service area business is based in. See http://cldr.unicode.org/ and http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland. This field is required for CUSTOMER_LOCATION_ONLY businesses, and is ignored otherwise. The region specified here can be different from regions for the areas that this business serves (e.g. service area businesses that provide services in regions other than the one that they are based in). If this location requires verification after creation, the address provided for verification purposes *must* be located within this region, and the business owner or their authorized representative *must* be able to receive postal mail at the provided verification address.", +"type": "string" +} +}, +"type": "object" +}, +"ServiceItem": { +"description": "A message that describes a single service item. It is used to describe the type of service that the merchant provides. For example, haircut can be a service.", +"id": "ServiceItem", +"properties": { +"freeFormServiceItem": { +"$ref": "FreeFormServiceItem", +"description": "Optional. This field will be set case of free-form services data." +}, +"price": { +"$ref": "Money", +"description": "Optional. Represents the monetary price of the service item. We recommend that currency_code and units should be set when including a price. This will be treated as a fixed price for the service item." +}, +"structuredServiceItem": { +"$ref": "StructuredServiceItem", +"description": "Optional. This field will be set case of structured services data." +} +}, +"type": "object" +}, +"ServiceType": { +"description": "A message describing a service type that the business offers.", +"id": "ServiceType", +"properties": { +"displayName": { +"description": "Output only. The human-readable display name for the service type.", +"readOnly": true, +"type": "string" +}, +"serviceTypeId": { +"description": "Output only. A stable ID (provided by Google) for this service type.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SpecialHourPeriod": { +"description": "Represents a single time period when a location's operational hours differ from its normal business hours. A special hour period must represent a range of less than 24 hours. The `open_time` and `start_date` must predate the `close_time` and `end_date`. The `close_time` and `end_date` can extend to 11:59 a.m. on the day after the specified `start_date`. For example, the following inputs are valid: start_date=2015-11-23, open_time=08:00, close_time=18:00 start_date=2015-11-23, end_date=2015-11-23, open_time=08:00, close_time=18:00 start_date=2015-11-23, end_date=2015-11-24, open_time=13:00, close_time=11:59 The following inputs are not valid: start_date=2015-11-23, open_time=13:00, close_time=11:59 start_date=2015-11-23, end_date=2015-11-24, open_time=13:00, close_time=12:00 start_date=2015-11-23, end_date=2015-11-25, open_time=08:00, close_time=18:00", +"id": "SpecialHourPeriod", +"properties": { +"closeTime": { +"$ref": "TimeOfDay", +"description": "Optional. Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field. Must be specified if `closed` is false." +}, +"closed": { +"description": "Optional. If true, `end_date`, `open_time`, and `close_time` are ignored, and the date specified in `start_date` is treated as the location being closed for the entire day.", +"type": "boolean" +}, +"endDate": { +"$ref": "Date", +"description": "Optional. The calendar date this special hour period ends on. If `end_date` field is not set, default to the date specified in `start_date`. If set, this field must be equal to or at most 1 day after `start_date`." +}, +"openTime": { +"$ref": "TimeOfDay", +"description": "Optional. Valid values are 00:00-24:00 where 24:00 represents midnight at the end of the specified day field. Must be specified if `closed` is false." +}, +"startDate": { +"$ref": "Date", +"description": "Required. The calendar date this special hour period starts on." +} +}, +"type": "object" +}, +"SpecialHours": { +"description": "Represents a set of time periods when a location's operational hours differ from its normal business hours.", +"id": "SpecialHours", +"properties": { +"specialHourPeriods": { +"description": "Required. A list of exceptions to the business's regular hours.", +"items": { +"$ref": "SpecialHourPeriod" +}, +"type": "array" +} +}, +"type": "object" +}, +"StructuredServiceItem": { +"description": "Represents a structured service offered by the merchant. For eg: toilet_installation.", +"id": "StructuredServiceItem", +"properties": { +"description": { +"description": "Optional. Description of structured service item. The character limit is 300.", +"type": "string" +}, +"serviceTypeId": { +"description": "Required. The `service_type_id` field is a Google provided unique ID that can be found in `ServiceType`. This information is provided by `BatchGetCategories` rpc service.", +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TimePeriod": { +"description": "Represents a span of time that the business is open, starting on the specified open day/time and closing on the specified close day/time. The closing time must occur after the opening time, for example later in the same day, or on a subsequent day.", +"id": "TimePeriod", +"properties": { +"closeDay": { +"description": "Required. Indicates the day of the week this period ends on.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +}, +"closeTime": { +"$ref": "TimeOfDay", +"description": "Required. Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field." +}, +"openDay": { +"description": "Required. Indicates the day of the week this period starts on.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +}, +"openTime": { +"$ref": "TimeOfDay", +"description": "Required. Valid values are 00:00-24:00, where 24:00 represents midnight at the end of the specified day field." +} +}, +"type": "object" +}, +"UriAttributeValue": { +"description": "Values for an attribute with a `value_type` of URL.", +"id": "UriAttributeValue", +"properties": { +"uri": { +"description": "Required. The proposed URI value for this attribute.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "My Business Business Information API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinesslodging.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinesslodging.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..bb02607914af2f3c80a311cb3f78f8b9b41c0f86 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinesslodging.v1.json @@ -0,0 +1,6240 @@ +{ +"basePath": "", +"baseUrl": "https://mybusinesslodging.googleapis.com/", +"batchPath": "batch", +"canonicalName": "My Business Lodging", +"description": "The My Business Lodging API enables managing lodging business information on Google. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/my-business/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "mybusinesslodging:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://mybusinesslodging.mtls.googleapis.com/", +"name": "mybusinesslodging", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"locations": { +"methods": { +"getLodging": { +"description": "Returns the Lodging of a specific location.", +"flatPath": "v1/locations/{locationsId}/lodging", +"httpMethod": "GET", +"id": "mybusinesslodging.locations.getLodging", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Google identifier for this location in the form: `locations/{location_id}/lodging`", +"location": "path", +"pattern": "^locations/[^/]+/lodging$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "Required. The specific fields to return. Use \"*\" to include all fields. Repeated field items cannot be individually specified.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Lodging" +} +}, +"updateLodging": { +"description": "Updates the Lodging of a specific location.", +"flatPath": "v1/locations/{locationsId}/lodging", +"httpMethod": "PATCH", +"id": "mybusinesslodging.locations.updateLodging", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Google identifier for this location in the form: `locations/{location_id}/lodging`", +"location": "path", +"pattern": "^locations/[^/]+/lodging$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields to update. Use \"*\" to update all fields, which may include unsetting empty fields in the request. Repeated field items cannot be individually updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Lodging" +}, +"response": { +"$ref": "Lodging" +} +} +}, +"resources": { +"lodging": { +"methods": { +"getGoogleUpdated": { +"description": "Returns the Google updated Lodging of a specific location.", +"flatPath": "v1/locations/{locationsId}/lodging:getGoogleUpdated", +"httpMethod": "GET", +"id": "mybusinesslodging.locations.lodging.getGoogleUpdated", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Google identifier for this location in the form: `locations/{location_id}/lodging`", +"location": "path", +"pattern": "^locations/[^/]+/lodging$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "Required. The specific fields to return. Use \"*\" to include all fields. Repeated field items cannot be individually specified.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:getGoogleUpdated", +"response": { +"$ref": "GetGoogleUpdatedLodgingResponse" +} +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://mybusinesslodging.googleapis.com/", +"schemas": { +"Accessibility": { +"description": "Physical adaptations made to the property in consideration of varying levels of human physical ability.", +"id": "Accessibility", +"properties": { +"mobilityAccessible": { +"description": "Mobility accessible. Throughout the property there are physical adaptations to ease the stay of a person in a wheelchair, such as auto-opening doors, wide elevators, wide bathrooms or ramps.", +"type": "boolean" +}, +"mobilityAccessibleElevator": { +"description": "Mobility accessible elevator. A lift that transports people from one level to another and is built to accommodate a wheelchair-using passenger owing to the width of its doors and placement of call buttons.", +"type": "boolean" +}, +"mobilityAccessibleElevatorException": { +"description": "Mobility accessible elevator exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobilityAccessibleException": { +"description": "Mobility accessible exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobilityAccessibleParking": { +"description": "Mobility accessible parking. The presence of a marked, designated area of prescribed size in which only registered, labeled vehicles transporting a person with physical challenges may park.", +"type": "boolean" +}, +"mobilityAccessibleParkingException": { +"description": "Mobility accessible parking exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobilityAccessiblePool": { +"description": "Mobility accessible pool. A swimming pool equipped with a mechanical chair that can be lowered and raised for the purpose of moving physically challenged guests into and out of the pool. May be powered by electricity or water. Also known as pool lift.", +"type": "boolean" +}, +"mobilityAccessiblePoolException": { +"description": "Mobility accessible pool exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Activities": { +"description": "Amenities and features related to leisure and play.", +"id": "Activities", +"properties": { +"beachAccess": { +"description": "Beach access. The hotel property is in close proximity to a beach and offers a way to get to that beach. This can include a route to the beach such as stairs down if hotel is on a bluff, or a short trail. Not the same as beachfront (with beach access, the hotel's proximity is close to but not right on the beach).", +"type": "boolean" +}, +"beachAccessException": { +"description": "Beach access exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"beachFront": { +"description": "Breach front. The hotel property is physically located on the beach alongside an ocean, sea, gulf, or bay. It is not on a lake, river, stream, or pond. The hotel is not separated from the beach by a public road allowing vehicular, pedestrian, or bicycle traffic.", +"type": "boolean" +}, +"beachFrontException": { +"description": "Beach front exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"bicycleRental": { +"description": "Bicycle rental. The hotel owns bicycles that it permits guests to borrow and use. Can be free or for a fee.", +"type": "boolean" +}, +"bicycleRentalException": { +"description": "Bicycle rental exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"boutiqueStores": { +"description": "Boutique stores. There are stores selling clothing, jewelry, art and decor either on hotel premises or very close by. Does not refer to the hotel gift shop or convenience store.", +"type": "boolean" +}, +"boutiqueStoresException": { +"description": "Boutique stores exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"casino": { +"description": "Casino. A space designated for gambling and gaming featuring croupier-run table and card games, as well as electronic slot machines. May be on hotel premises or located nearby.", +"type": "boolean" +}, +"casinoException": { +"description": "Casino exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeBicycleRental": { +"description": "Free bicycle rental. The hotel owns bicycles that it permits guests to borrow and use for free.", +"type": "boolean" +}, +"freeBicycleRentalException": { +"description": "Free bicycle rental exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeWatercraftRental": { +"description": "Free watercraft rental. The hotel owns watercraft that it permits guests to borrow and use for free.", +"type": "boolean" +}, +"freeWatercraftRentalException": { +"description": "Free Watercraft rental exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"gameRoom": { +"description": "Game room. There is a room at the hotel containing electronic machines for play such as pinball, prize machines, driving simulators, and other items commonly found at a family fun center or arcade. May also include non-electronic games like pool, foosball, darts, and more. May or may not be designed for children. Also known as arcade, fun room, or family fun center.", +"type": "boolean" +}, +"gameRoomException": { +"description": "Game room exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"golf": { +"description": "Golf. There is a golf course on hotel grounds or there is a nearby, independently run golf course that allows use by hotel guests. Can be free or for a fee.", +"type": "boolean" +}, +"golfException": { +"description": "Golf exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"horsebackRiding": { +"description": "Horseback riding. The hotel has a horse barn onsite or an affiliation with a nearby barn to allow for guests to sit astride a horse and direct it to walk, trot, cantor, gallop and/or jump. Can be in a riding ring, on designated paths, or in the wilderness. May or may not involve instruction.", +"type": "boolean" +}, +"horsebackRidingException": { +"description": "Horseback riding exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"nightclub": { +"description": "Nightclub. There is a room at the hotel with a bar, a dance floor, and seating where designated staffers play dance music. There may also be a designated area for the performance of live music, singing and comedy acts.", +"type": "boolean" +}, +"nightclubException": { +"description": "Nightclub exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"privateBeach": { +"description": "Private beach. The beach which is in close proximity to the hotel is open only to guests.", +"type": "boolean" +}, +"privateBeachException": { +"description": "Private beach exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"scuba": { +"description": "Scuba. The provision for guests to dive under naturally occurring water fitted with a self-contained underwater breathing apparatus (SCUBA) for the purpose of exploring underwater life. Apparatus consists of a tank providing oxygen to the diver through a mask. Requires certification of the diver and supervision. The hotel may have the activity at its own waterfront or have an affiliation with a nearby facility. Required equipment is most often supplied to guests. Can be free or for a fee. Not snorkeling. Not done in a swimming pool.", +"type": "boolean" +}, +"scubaException": { +"description": "Scuba exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"snorkeling": { +"description": "Snorkeling. The provision for guests to participate in a recreational water activity in which swimmers wear a diving mask, a simple, shaped breathing tube and flippers/swim fins for the purpose of exploring below the surface of an ocean, gulf or lake. Does not usually require user certification or professional supervision. Equipment may or may not be available for rent or purchase. Not scuba diving.", +"type": "boolean" +}, +"snorkelingException": { +"description": "Snorkeling exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"tennis": { +"description": "Tennis. The hotel has the requisite court(s) on site or has an affiliation with a nearby facility for the purpose of providing guests with the opportunity to play a two-sided court-based game in which players use a stringed racquet to hit a ball across a net to the side of the opposing player. The court can be indoors or outdoors. Instructors, racquets and balls may or may not be provided.", +"type": "boolean" +}, +"tennisException": { +"description": "Tennis exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"waterSkiing": { +"description": "Water skiing. The provision of giving guests the opportunity to be pulled across naturally occurring water while standing on skis and holding a tow rope attached to a motorboat. Can occur on hotel premises or at a nearby waterfront. Most often performed in a lake or ocean.", +"type": "boolean" +}, +"waterSkiingException": { +"description": "Water skiing exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"watercraftRental": { +"description": "Watercraft rental. The hotel owns water vessels that it permits guests to borrow and use. Can be free or for a fee. Watercraft may include boats, pedal boats, rowboats, sailboats, powerboats, canoes, kayaks, or personal watercraft (such as a Jet Ski).", +"type": "boolean" +}, +"watercraftRentalException": { +"description": "Watercraft rental exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Business": { +"description": "Features of the property of specific interest to the business traveler.", +"id": "Business", +"properties": { +"businessCenter": { +"description": "Business center. A designated room at the hotel with one or more desks and equipped with guest-use computers, printers, fax machines and/or photocopiers. May or may not be open 24/7. May or may not require a key to access. Not a meeting room or conference room.", +"type": "boolean" +}, +"businessCenterException": { +"description": "Business center exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"meetingRooms": { +"description": "Meeting rooms. Rooms at the hotel designated for business-related gatherings. Rooms are usually equipped with tables or desks, office chairs and audio/visual facilities to allow for presentations and conference calls. Also known as conference rooms.", +"type": "boolean" +}, +"meetingRoomsCount": { +"description": "Meeting rooms count. The number of meeting rooms at the property.", +"format": "int32", +"type": "integer" +}, +"meetingRoomsCountException": { +"description": "Meeting rooms count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"meetingRoomsException": { +"description": "Meeting rooms exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Connectivity": { +"description": "The ways in which the property provides guests with the ability to access the internet.", +"id": "Connectivity", +"properties": { +"freeWifi": { +"description": "Free wifi. The hotel offers guests wifi for free.", +"type": "boolean" +}, +"freeWifiException": { +"description": "Free wifi exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"publicAreaWifiAvailable": { +"description": "Public area wifi available. Guests have the ability to wirelessly connect to the internet in the areas of the hotel accessible to anyone. Can be free or for a fee.", +"type": "boolean" +}, +"publicAreaWifiAvailableException": { +"description": "Public area wifi available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"publicInternetTerminal": { +"description": "Public internet terminal. An area of the hotel supplied with computers and designated for the purpose of providing guests with the ability to access the internet.", +"type": "boolean" +}, +"publicInternetTerminalException": { +"description": "Public internet terminal exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"wifiAvailable": { +"description": "Wifi available. The hotel provides the ability for guests to wirelessly connect to the internet. Can be in the public areas of the hotel and/or in the guest rooms. Can be free or for a fee.", +"type": "boolean" +}, +"wifiAvailableException": { +"description": "Wifi available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"EcoCertification": { +"deprecated": true, +"description": "An eco certificate awarded to the hotel. Deprecated: this message is no longer populated. All certification data is now provided by BeCause.", +"id": "EcoCertification", +"properties": { +"awarded": { +"description": "Whether the eco certificate was awarded or not.", +"type": "boolean" +}, +"awardedException": { +"description": "Awarded exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"ecoCertificate": { +"description": "Required. The eco certificate.", +"enum": [ +"ECO_CERTIFICATE_UNSPECIFIED", +"ISO14001", +"ISO50001", +"ASIAN_ECOTOURISM", +"BIOSPHERE_RESPOSNIBLE_TOURISM", +"BUREAU_VERITAS", +"CONTROL_UNION", +"EARTHCHECK", +"ECO_CERTIFICATION_MALTA", +"ECOTOURISM_AUSTRALIAS_ECO", +"GREAT_GREEN_DEAL", +"GREEN_GLOBE", +"GREEN_GROWTH2050", +"GREEN_KEY", +"GREEN_KEY_ECO_RATING", +"GREEN_SEAL", +"GREEN_STAR", +"GREEN_TOURISM_ACTIVE", +"HILTON_LIGHTSTAY", +"HOSTELLING_INTERNATIONALS_QUALITY_AND_SUSTAINABILITY", +"HOTELES_MAS_VERDES", +"NORDIC_SWAN_ECOLABEL", +"PREFERRED_BY_NATURE_SUSTAINABLE_TOURISM", +"SUSTAINABLE_TRAVEL_IRELAND", +"TOF_TIGERS_INITITIVES_PUG", +"TRAVELIFE", +"UNITED_CERTIFICATION_SYSTEMS_LIMITED", +"VIREO_SRL" +], +"enumDescriptions": [ +"Default EcoCertificate. Do not use.", +"ISO14001.", +"ISO50001.", +"Asian Ecotourism Standard for Accommodations (AESA).", +"Biosphere Responsible Tourism Standard.", +"Bureau Veritas.", +"Control Union.", +"EarthCheck.", +"Eco-Certification Malta Standard.", +"Ecotourism Australia's ECO Certification Standard.", +"GREAT Green Deal Certification.", +"Green Globe.", +"Green Growth 2050 Standard.", +"Green Key.", +"Geen Key Eco Rating.", +"Green Seal.", +"Green Star Hotel Standard.", +"Green Tourism Active Standard.", +"Hilton LightStay.", +"Hostelling International's Quality and Sustainability Standard.", +"Hoteles m\u00e1s Verdes (AHT) Standard.", +"Nordic Swan Ecolabel.", +"Preferred by Nature Sustainable Tourism Standard for Accommodation.", +"Sustainable Travel Ireland \u2013 GSTC Industry Criteria.", +"TOFTigers Initiative's Pug Standard.", +"Travelife Standard for Hotels & Accommodations.", +"United Certification Systems Limited.", +"Vireo Srl." +], +"type": "string" +} +}, +"type": "object" +}, +"EnergyEfficiency": { +"description": "Energy efficiency practices implemented at the hotel.", +"id": "EnergyEfficiency", +"properties": { +"carbonFreeEnergySources": { +"description": "Carbon free energy sources. Property sources carbon-free electricity via at least one of the following methods: on-site clean energy generation, power purchase agreement(s) with clean energy generators, green power provided by electricity supplier, or purchases of Energy Attribute Certificates (such as Renewable Energy Certificates or Guarantees of Origin).", +"type": "boolean" +}, +"carbonFreeEnergySourcesException": { +"description": "Carbon free energy sources exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"energyConservationProgram": { +"description": "Energy conservation program. The property tracks corporate-level Scope 1 and 2 GHG emissions, and Scope 3 emissions if available. The property has a commitment to implement initiatives that reduce GHG emissions year over year. The property has shown an absolute reduction in emissions for at least 2 years. Emissions are either verfied by a third-party and/or published in external communications.", +"type": "boolean" +}, +"energyConservationProgramException": { +"description": "Energy conservation program exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"energyEfficientHeatingAndCoolingSystems": { +"description": "Energy efficient heating and cooling systems. The property doesn't use chlorofluorocarbon (CFC)-based refrigerants in heating, ventilating, and air-conditioning systems unless a third-party audit shows it's not economically feasible. The CFC-based refrigerants which are used should have a Global Warming Potential (GWP) \u2264 10. The property uses occupancy sensors on HVAC systems in back-of-house spaces, meeting rooms, and other low-traffic areas.", +"type": "boolean" +}, +"energyEfficientHeatingAndCoolingSystemsException": { +"description": "Energy efficient heating and cooling systems exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"energyEfficientLighting": { +"description": "Energy efficient lighting. At least 75% of the property's lighting is energy efficient, using lighting that is more than 45 lumens per watt \u2013 typically LED or CFL lightbulbs.", +"type": "boolean" +}, +"energyEfficientLightingException": { +"description": "Energy efficient lighting exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"energySavingThermostats": { +"description": "Energy saving thermostats. The property installed energy-saving thermostats throughout the building to conserve energy when rooms or areas are not in use. Energy-saving thermostats are devices that control heating/cooling in the building by learning temperature preferences and automatically adjusting to energy-saving temperatures as the default. The thermostats are automatically set to a temperature between 68-78 degrees F (20-26 \u00b0C), depending on seasonality. In the winter, set the thermostat to 68\u00b0F (20\u00b0C) when the room is occupied, lowering room temperature when unoccupied. In the summer, set the thermostat to 78\u00b0F (26\u00b0C) when the room is occupied.", +"type": "boolean" +}, +"energySavingThermostatsException": { +"description": "Energy saving thermostats exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"greenBuildingDesign": { +"description": "Output only. Green building design. True if the property has been awarded a relevant certification.", +"readOnly": true, +"type": "boolean" +}, +"greenBuildingDesignException": { +"description": "Output only. Green building design exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"readOnly": true, +"type": "string" +}, +"independentOrganizationAuditsEnergyUse": { +"description": "Independent organization audits energy use. The property conducts an energy audit at least every 5 years, the results of which are either verified by a third-party and/or published in external communications. An energy audit is a detailed assessment of the facility which provides recommendations to existing operations and procedures to improve energy efficiency, available incentives or rebates,and opportunities for improvements through renovations or upgrades. Examples of organizations that conduct credible third party audits include: Engie Impact, DNV GL (EU), Dexma, and local utility providers (they often provide energy and water audits).", +"type": "boolean" +}, +"independentOrganizationAuditsEnergyUseException": { +"description": "Independent organization audits energy use exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"EnhancedCleaning": { +"description": "Enhanced cleaning measures implemented by the hotel during COVID-19.", +"id": "EnhancedCleaning", +"properties": { +"commercialGradeDisinfectantCleaning": { +"description": "Commercial-grade disinfectant used to clean the property.", +"type": "boolean" +}, +"commercialGradeDisinfectantCleaningException": { +"description": "Commercial grade disinfectant cleaning exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"commonAreasEnhancedCleaning": { +"description": "Enhanced cleaning of common areas.", +"type": "boolean" +}, +"commonAreasEnhancedCleaningException": { +"description": "Common areas enhanced cleaning exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"employeesTrainedCleaningProcedures": { +"description": "Employees trained in COVID-19 cleaning procedures.", +"type": "boolean" +}, +"employeesTrainedCleaningProceduresException": { +"description": "Employees trained cleaning procedures exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"employeesTrainedThoroughHandWashing": { +"description": "Employees trained in thorough hand-washing.", +"type": "boolean" +}, +"employeesTrainedThoroughHandWashingException": { +"description": "Employees trained thorough hand washing exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"employeesWearProtectiveEquipment": { +"description": "Employees wear masks, face shields, and/or gloves.", +"type": "boolean" +}, +"employeesWearProtectiveEquipmentException": { +"description": "Employees wear protective equipment exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"guestRoomsEnhancedCleaning": { +"description": "Enhanced cleaning of guest rooms.", +"type": "boolean" +}, +"guestRoomsEnhancedCleaningException": { +"description": "Guest rooms enhanced cleaning exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Families": { +"description": "Services and amenities for families and young guests.", +"id": "Families", +"properties": { +"babysitting": { +"description": "Babysitting. Child care that is offered by hotel staffers or coordinated by hotel staffers with local child care professionals. Can be free or for a fee.", +"type": "boolean" +}, +"babysittingException": { +"description": "Babysitting exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"kidsActivities": { +"description": "Kids activities. Recreational options such as sports, films, crafts and games designed for the enjoyment of children and offered at the hotel. May or may not be supervised. May or may not be at a designated time or place. Cab be free or for a fee.", +"type": "boolean" +}, +"kidsActivitiesException": { +"description": "Kids activities exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"kidsClub": { +"description": "Kids club. An organized program of group activities held at the hotel and designed for the enjoyment of children. Facilitated by hotel staff (or staff procured by the hotel) in an area(s) designated for the purpose of entertaining children without their parents. May include games, outings, water sports, team sports, arts and crafts, and films. Usually has set hours. Can be free or for a fee. Also known as Kids Camp or Kids program.", +"type": "boolean" +}, +"kidsClubException": { +"description": "Kids club exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"kidsFriendly": { +"description": "Kids friendly. The hotel has one or more special features for families with children, such as reduced rates, child-sized beds, kids' club, babysitting service, or suitable place to play on premises.", +"type": "boolean" +}, +"kidsFriendlyException": { +"description": "Kids friendly exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"FoodAndDrink": { +"description": "Meals, snacks, and beverages available at the property.", +"id": "FoodAndDrink", +"properties": { +"bar": { +"description": "Bar. A designated room, lounge or area of an on-site restaurant with seating at a counter behind which a hotel staffer takes the guest's order and provides the requested alcoholic drink. Can be indoors or outdoors. Also known as Pub.", +"type": "boolean" +}, +"barException": { +"description": "Bar exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"breakfastAvailable": { +"description": "Breakfast available. The morning meal is offered to all guests. Can be free or for a fee.", +"type": "boolean" +}, +"breakfastAvailableException": { +"description": "Breakfast available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"breakfastBuffet": { +"description": "Breakfast buffet. Breakfast meal service where guests serve themselves from a variety of dishes/foods that are put out on a table.", +"type": "boolean" +}, +"breakfastBuffetException": { +"description": "Breakfast buffet exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"buffet": { +"description": "Buffet. A type of meal where guests serve themselves from a variety of dishes/foods that are put out on a table. Includes lunch and/or dinner meals. A breakfast-only buffet is not sufficient.", +"type": "boolean" +}, +"buffetException": { +"description": "Buffet exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"dinnerBuffet": { +"description": "Dinner buffet. Dinner meal service where guests serve themselves from a variety of dishes/foods that are put out on a table.", +"type": "boolean" +}, +"dinnerBuffetException": { +"description": "Dinner buffet exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeBreakfast": { +"description": "Free breakfast. Breakfast is offered for free to all guests. Does not apply if limited to certain room packages.", +"type": "boolean" +}, +"freeBreakfastException": { +"description": "Free breakfast exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"restaurant": { +"description": "Restaurant. A business onsite at the hotel that is open to the public as well as guests, and offers meals and beverages to consume at tables or counters. May or may not include table service. Also known as cafe, buffet, eatery. A \"breakfast room\" where the hotel serves breakfast only to guests (not the general public) does not count as a restaurant.", +"type": "boolean" +}, +"restaurantException": { +"description": "Restaurant exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"restaurantsCount": { +"description": "Restaurants count. The number of restaurants at the hotel.", +"format": "int32", +"type": "integer" +}, +"restaurantsCountException": { +"description": "Restaurants count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"roomService": { +"description": "Room service. A hotel staffer delivers meals prepared onsite to a guest's room as per their request. May or may not be available during specific hours. Services should be available to all guests (not based on rate/room booked/reward program, etc).", +"type": "boolean" +}, +"roomServiceException": { +"description": "Room service exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"tableService": { +"description": "Table service. A restaurant in which a staff member is assigned to a guest's table to take their order, deliver and clear away food, and deliver the bill, if applicable. Also known as sit-down restaurant.", +"type": "boolean" +}, +"tableServiceException": { +"description": "Table service exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"twentyFourHourRoomService": { +"description": "24hr room service. Room service is available 24 hours a day.", +"type": "boolean" +}, +"twentyFourHourRoomServiceException": { +"description": "24hr room service exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"vendingMachine": { +"description": "Vending machine. A glass-fronted mechanized cabinet displaying and dispensing snacks and beverages for purchase by coins, paper money and/or credit cards.", +"type": "boolean" +}, +"vendingMachineException": { +"description": "Vending machine exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"GetGoogleUpdatedLodgingResponse": { +"description": "Response message for LodgingService.GetGoogleUpdatedLodging", +"id": "GetGoogleUpdatedLodgingResponse", +"properties": { +"diffMask": { +"description": "Required. The fields in the Lodging that have been updated by Google. Repeated field items are not individually specified.", +"format": "google-fieldmask", +"type": "string" +}, +"lodging": { +"$ref": "Lodging", +"description": "Required. The Google updated Lodging." +} +}, +"type": "object" +}, +"GuestUnitFeatures": { +"description": "Features and available amenities in the guest unit.", +"id": "GuestUnitFeatures", +"properties": { +"bungalowOrVilla": { +"description": "Bungalow or villa. An independent structure that is part of a hotel or resort that is rented to one party for a vacation stay. The hotel or resort may be completely comprised of bungalows or villas, or they may be one of several guestroom options. Guests in the bungalows or villas most often have the same, if not more, amenities and services offered to guests in other guestroom types.", +"type": "boolean" +}, +"bungalowOrVillaException": { +"description": "Bungalow or villa exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"connectingUnitAvailable": { +"description": "Connecting unit available. A guestroom type that features access to an adjacent guestroom for the purpose of booking both rooms. Most often used by families who need more than one room to accommodate the number of people in their group.", +"type": "boolean" +}, +"connectingUnitAvailableException": { +"description": "Connecting unit available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"executiveFloor": { +"description": "Executive floor. A floor of the hotel where the guestrooms are only bookable by members of the hotel's frequent guest membership program. Benefits of this room class include access to a designated lounge which may or may not feature free breakfast, cocktails or other perks specific to members of the program.", +"type": "boolean" +}, +"executiveFloorException": { +"description": "Executive floor exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"maxAdultOccupantsCount": { +"description": "Max adult occupants count. The total number of adult guests allowed to stay overnight in the guestroom.", +"format": "int32", +"type": "integer" +}, +"maxAdultOccupantsCountException": { +"description": "Max adult occupants count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"maxChildOccupantsCount": { +"description": "Max child occupants count. The total number of children allowed to stay overnight in the room.", +"format": "int32", +"type": "integer" +}, +"maxChildOccupantsCountException": { +"description": "Max child occupants count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"maxOccupantsCount": { +"description": "Max occupants count. The total number of guests allowed to stay overnight in the guestroom.", +"format": "int32", +"type": "integer" +}, +"maxOccupantsCountException": { +"description": "Max occupants count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"privateHome": { +"description": "Private home. A privately owned home (house, townhouse, apartment, cabin, bungalow etc) that may or not serve as the owner's residence, but is rented out in its entirety or by the room(s) to paying guest(s) for vacation stays. Not for lease-based, long-term residency.", +"type": "boolean" +}, +"privateHomeException": { +"description": "Private home exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"suite": { +"description": "Suite. A guestroom category that implies both a bedroom area and a separate living area. There may or may not be full walls and doors separating the two areas, but regardless, they are very distinct. Does not mean a couch or chair in a bedroom.", +"type": "boolean" +}, +"suiteException": { +"description": "Suite exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"tier": { +"description": "Tier. Classification of the unit based on available features/amenities. A non-standard tier is only permitted if at least one other unit type falls under the standard tier.", +"enum": [ +"UNIT_TIER_UNSPECIFIED", +"STANDARD_UNIT", +"DELUXE_UNIT" +], +"enumDescriptions": [ +"Default tier. Equivalent to STANDARD. Prefer using STANDARD directly.", +"Standard unit. The predominant and most basic guestroom type available at the hotel. All other guestroom types include the features/amenities of this room, as well as additional features/amenities.", +"Deluxe unit. A guestroom type that builds on the features of the standard guestroom by offering additional amenities and/or more space, and/or views. The room rate is higher than that of the standard room type. Also known as Superior. Only allowed if another unit type is a standard tier." +], +"type": "string" +}, +"tierException": { +"description": "Tier exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"totalLivingAreas": { +"$ref": "LivingArea", +"description": "Features available in the living areas in the guest unit." +}, +"views": { +"$ref": "ViewsFromUnit", +"description": "Views available from the guest unit itself." +} +}, +"type": "object" +}, +"GuestUnitType": { +"description": "A specific type of unit primarily defined by its features.", +"id": "GuestUnitType", +"properties": { +"codes": { +"description": "Required. Unit or room code identifiers for a single GuestUnitType. Each code must be unique within a Lodging instance.", +"items": { +"type": "string" +}, +"type": "array" +}, +"features": { +"$ref": "GuestUnitFeatures", +"description": "Features and available amenities of the GuestUnitType." +}, +"label": { +"description": "Required. Short, English label or name of the GuestUnitType. Target <50 chars.", +"type": "string" +} +}, +"type": "object" +}, +"HealthAndSafety": { +"description": "Health and safety measures implemented by the hotel during COVID-19.", +"id": "HealthAndSafety", +"properties": { +"enhancedCleaning": { +"$ref": "EnhancedCleaning", +"description": "Enhanced cleaning measures implemented by the hotel during COVID-19." +}, +"increasedFoodSafety": { +"$ref": "IncreasedFoodSafety", +"description": "Increased food safety measures implemented by the hotel during COVID-19." +}, +"minimizedContact": { +"$ref": "MinimizedContact", +"description": "Minimized contact measures implemented by the hotel during COVID-19." +}, +"personalProtection": { +"$ref": "PersonalProtection", +"description": "Personal protection measures implemented by the hotel during COVID-19." +}, +"physicalDistancing": { +"$ref": "PhysicalDistancing", +"description": "Physical distancing measures implemented by the hotel during COVID-19." +} +}, +"type": "object" +}, +"Housekeeping": { +"description": "Conveniences provided in guest units to facilitate an easier, more comfortable stay.", +"id": "Housekeeping", +"properties": { +"dailyHousekeeping": { +"description": "Daily housekeeping. Guest units are cleaned by hotel staff daily during guest's stay.", +"type": "boolean" +}, +"dailyHousekeepingException": { +"description": "Daily housekeeping exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"housekeepingAvailable": { +"description": "Housekeeping available. Guest units are cleaned by hotel staff during guest's stay. Schedule may vary from daily, weekly, or specific days of the week.", +"type": "boolean" +}, +"housekeepingAvailableException": { +"description": "Housekeeping available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"turndownService": { +"description": "Turndown service. Hotel staff enters guest units to prepare the bed for sleep use. May or may not include some light housekeeping. May or may not include an evening snack or candy. Also known as evening service.", +"type": "boolean" +}, +"turndownServiceException": { +"description": "Turndown service exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"IncreasedFoodSafety": { +"description": "Increased food safety measures implemented by the hotel during COVID-19.", +"id": "IncreasedFoodSafety", +"properties": { +"diningAreasAdditionalSanitation": { +"description": "Additional sanitation in dining areas.", +"type": "boolean" +}, +"diningAreasAdditionalSanitationException": { +"description": "Dining areas additional sanitation exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"disposableFlatware": { +"description": "Disposable flatware.", +"type": "boolean" +}, +"disposableFlatwareException": { +"description": "Disposable flatware exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"foodPreparationAndServingAdditionalSafety": { +"description": "Additional safety measures during food prep and serving.", +"type": "boolean" +}, +"foodPreparationAndServingAdditionalSafetyException": { +"description": "Food preparation and serving additional safety exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"individualPackagedMeals": { +"description": "Individually-packaged meals.", +"type": "boolean" +}, +"individualPackagedMealsException": { +"description": "Individual packaged meals exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"singleUseFoodMenus": { +"description": "Single-use menus.", +"type": "boolean" +}, +"singleUseFoodMenusException": { +"description": "Single use food menus exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"LanguageSpoken": { +"description": "Language spoken by at least one staff member.", +"id": "LanguageSpoken", +"properties": { +"languageCode": { +"description": "Required. The BCP-47 language code for the spoken language. Currently accepted codes: ar, de, en, es, fil, fr, hi, id, it, ja, ko, nl, pt, ru, vi, yue, zh.", +"type": "string" +}, +"spoken": { +"description": "At least one member of the staff can speak the language.", +"type": "boolean" +}, +"spokenException": { +"description": "Spoken exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"LivingArea": { +"description": "An individual room, such as kitchen, bathroom, bedroom, within a bookable guest unit.", +"id": "LivingArea", +"properties": { +"accessibility": { +"$ref": "LivingAreaAccessibility", +"description": "Accessibility features of the living area." +}, +"eating": { +"$ref": "LivingAreaEating", +"description": "Information about eating features in the living area." +}, +"features": { +"$ref": "LivingAreaFeatures", +"description": "Features in the living area." +}, +"layout": { +"$ref": "LivingAreaLayout", +"description": "Information about the layout of the living area." +}, +"sleeping": { +"$ref": "LivingAreaSleeping", +"description": "Information about sleeping features in the living area." +} +}, +"type": "object" +}, +"LivingAreaAccessibility": { +"description": "Accessibility features of the living area.", +"id": "LivingAreaAccessibility", +"properties": { +"adaCompliantUnit": { +"description": "ADA compliant unit. A guestroom designed to accommodate the physical challenges of a guest with mobility and/or auditory and/or visual issues, as determined by legislative policy. Usually features enlarged doorways, roll-in showers with seats, bathroom grab bars, and communication equipment for the hearing and sight challenged.", +"type": "boolean" +}, +"adaCompliantUnitException": { +"description": "ADA compliant unit exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"hearingAccessibleDoorbell": { +"description": "Hearing-accessible doorbell. A visual indicator(s) of a knock or ring at the door.", +"type": "boolean" +}, +"hearingAccessibleDoorbellException": { +"description": "Hearing-accessible doorbell exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"hearingAccessibleFireAlarm": { +"description": "Hearing-accessible fire alarm. A device that gives warning of a fire through flashing lights.", +"type": "boolean" +}, +"hearingAccessibleFireAlarmException": { +"description": "Hearing-accessible fire alarm exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"hearingAccessibleUnit": { +"description": "Hearing-accessible unit. A guestroom designed to accommodate the physical challenges of a guest with auditory issues.", +"type": "boolean" +}, +"hearingAccessibleUnitException": { +"description": "Hearing-accessible unit exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobilityAccessibleBathtub": { +"description": "Mobility-accessible bathtub. A bathtub that accomodates the physically challenged with additional railings or hand grips, a transfer seat or lift, and/or a door to enable walking into the tub.", +"type": "boolean" +}, +"mobilityAccessibleBathtubException": { +"description": "Mobility-accessible bathtub exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobilityAccessibleShower": { +"description": "Mobility-accessible shower. A shower with an enlarged door or access point to accommodate a wheelchair or a waterproof seat for the physically challenged.", +"type": "boolean" +}, +"mobilityAccessibleShowerException": { +"description": "Mobility-accessible shower exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobilityAccessibleToilet": { +"description": "Mobility-accessible toilet. A toilet with a higher seat, grab bars, and/or a larger area around it to accommodate the physically challenged.", +"type": "boolean" +}, +"mobilityAccessibleToiletException": { +"description": "Mobility-accessible toilet exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobilityAccessibleUnit": { +"description": "Mobility-accessible unit. A guestroom designed to accommodate the physical challenges of a guest with mobility and/or auditory and/or visual issues. Usually features enlarged doorways, roll-in showers with seats, bathroom grab bars, and communication equipment for the hearing and sight challenged.", +"type": "boolean" +}, +"mobilityAccessibleUnitException": { +"description": "Mobility-accessible unit exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"LivingAreaEating": { +"description": "Information about eating features in the living area.", +"id": "LivingAreaEating", +"properties": { +"coffeeMaker": { +"description": "Coffee maker. An electric appliance that brews coffee by heating and forcing water through ground coffee.", +"type": "boolean" +}, +"coffeeMakerException": { +"description": "Coffee maker exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"cookware": { +"description": "Cookware. Kitchen pots, pans and utensils used in connection with the preparation of food.", +"type": "boolean" +}, +"cookwareException": { +"description": "Cookware exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"dishwasher": { +"description": "Dishwasher. A counter-height electrical cabinet containing racks for dirty dishware, cookware and cutlery, and a dispenser for soap built into the pull-down door. The cabinet is attached to the plumbing system to facilitate the automatic cleaning of its contents.", +"type": "boolean" +}, +"dishwasherException": { +"description": "Dishwasher exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"indoorGrill": { +"description": "Indoor grill. Metal grates built into an indoor cooktop on which food is cooked over an open flame or electric heat source.", +"type": "boolean" +}, +"indoorGrillException": { +"description": "Indoor grill exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"kettle": { +"description": "Kettle. A covered container with a handle and a spout used for boiling water.", +"type": "boolean" +}, +"kettleException": { +"description": "Kettle exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"kitchenAvailable": { +"description": "Kitchen available. An area of the guestroom designated for the preparation and storage of food via the presence of a refrigerator, cook top, oven and sink, as well as cutlery, dishes and cookware. Usually includes small appliances such a coffee maker and a microwave. May or may not include an automatic dishwasher.", +"type": "boolean" +}, +"kitchenAvailableException": { +"description": "Kitchen available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"microwave": { +"description": "Microwave. An electric oven that quickly cooks and heats food by microwave energy. Smaller than a standing or wall mounted oven. Usually placed on a kitchen counter, a shelf or tabletop or mounted above a cooktop.", +"type": "boolean" +}, +"microwaveException": { +"description": "Microwave exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"minibar": { +"description": "Minibar. A small refrigerated cabinet in the guestroom containing bottles/cans of soft drinks, mini bottles of alcohol, and snacks. The items are most commonly available for a fee.", +"type": "boolean" +}, +"minibarException": { +"description": "Minibar exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"outdoorGrill": { +"description": "Outdoor grill. Metal grates on which food is cooked over an open flame or electric heat source. Part of an outdoor apparatus that supports the grates. Also known as barbecue grill or barbecue.", +"type": "boolean" +}, +"outdoorGrillException": { +"description": "Outdoor grill exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"oven": { +"description": "Oven. A temperature controlled, heated metal cabinet powered by gas or electricity in which food is placed for the purpose of cooking or reheating.", +"type": "boolean" +}, +"ovenException": { +"description": "Oven exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"refrigerator": { +"description": "Refrigerator. A large, climate-controlled electrical cabinet with vertical doors. Built for the purpose of chilling and storing perishable foods.", +"type": "boolean" +}, +"refrigeratorException": { +"description": "Refrigerator exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"sink": { +"description": "Sink. A basin with a faucet attached to a water source and used for the purpose of washing and rinsing.", +"type": "boolean" +}, +"sinkException": { +"description": "Sink exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"snackbar": { +"description": "Snackbar. A small cabinet in the guestroom containing snacks. The items are most commonly available for a fee.", +"type": "boolean" +}, +"snackbarException": { +"description": "Snackbar exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"stove": { +"description": "Stove. A kitchen appliance powered by gas or electricity for the purpose of creating a flame or hot surface on which pots of food can be cooked. Also known as cooktop or hob.", +"type": "boolean" +}, +"stoveException": { +"description": "Stove exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"teaStation": { +"description": "Tea station. A small area with the supplies needed to heat water and make tea.", +"type": "boolean" +}, +"teaStationException": { +"description": "Tea station exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"toaster": { +"description": "Toaster. A small, temperature controlled electric appliance with rectangular slots at the top that are lined with heated coils for the purpose of browning slices of bread products.", +"type": "boolean" +}, +"toasterException": { +"description": "Toaster exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"LivingAreaFeatures": { +"description": "Features in the living area.", +"id": "LivingAreaFeatures", +"properties": { +"airConditioning": { +"description": "Air conditioning. An electrical machine used to cool the temperature of the guestroom.", +"type": "boolean" +}, +"airConditioningException": { +"description": "Air conditioning exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"bathtub": { +"description": "Bathtub. A fixed plumbing feature set on the floor and consisting of a large container that accommodates the body of an adult for the purpose of seated bathing. Includes knobs or fixtures to control the temperature of the water, a faucet through which the water flows, and a drain that can be closed for filling and opened for draining.", +"type": "boolean" +}, +"bathtubException": { +"description": "Bathtub exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"bidet": { +"description": "Bidet. A plumbing fixture attached to a toilet or a low, fixed sink designed for the purpose of washing after toilet use.", +"type": "boolean" +}, +"bidetException": { +"description": "Bidet exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"dryer": { +"description": "Dryer. An electrical machine designed to dry clothing.", +"type": "boolean" +}, +"dryerException": { +"description": "Dryer exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"electronicRoomKey": { +"description": "Electronic room key. A card coded by the check-in computer that is read by the lock on the hotel guestroom door to allow for entry.", +"type": "boolean" +}, +"electronicRoomKeyException": { +"description": "Electronic room key exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"fireplace": { +"description": "Fireplace. A framed opening (aka hearth) at the base of a chimney in which logs or an electrical fire feature are burned to provide a relaxing ambiance or to heat the room. Often made of bricks or stone.", +"type": "boolean" +}, +"fireplaceException": { +"description": "Fireplace exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"hairdryer": { +"description": "Hairdryer. A handheld electric appliance that blows temperature-controlled air for the purpose of drying wet hair. Can be mounted to a bathroom wall or a freestanding device stored in the guestroom's bathroom or closet.", +"type": "boolean" +}, +"hairdryerException": { +"description": "Hairdryer exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"heating": { +"description": "Heating. An electrical machine used to warm the temperature of the guestroom.", +"type": "boolean" +}, +"heatingException": { +"description": "Heating exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"inunitSafe": { +"description": "In-unit safe. A strong fireproof cabinet with a programmable lock, used for the protected storage of valuables in a guestroom. Often built into a closet.", +"type": "boolean" +}, +"inunitSafeException": { +"description": "In-unit safe exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"inunitWifiAvailable": { +"description": "In-unit Wifi available. Guests can wirelessly connect to the Internet in the guestroom. Can be free or for a fee.", +"type": "boolean" +}, +"inunitWifiAvailableException": { +"description": "In-unit Wifi available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"ironingEquipment": { +"description": "Ironing equipment. A device, usually with a flat metal base, that is heated to smooth, finish, or press clothes and a flat, padded, cloth-covered surface on which the clothes are worked.", +"type": "boolean" +}, +"ironingEquipmentException": { +"description": "Ironing equipment exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"payPerViewMovies": { +"description": "Pay per view movies. Televisions with channels that offer films that can be viewed for a fee, and have an interface to allow the viewer to accept the terms and approve payment.", +"type": "boolean" +}, +"payPerViewMoviesException": { +"description": "Pay per view movies exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"privateBathroom": { +"description": "Private bathroom. A bathroom designated for the express use of the guests staying in a specific guestroom.", +"type": "boolean" +}, +"privateBathroomException": { +"description": "Private bathroom exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"shower": { +"description": "Shower. A fixed plumbing fixture for standing bathing that features a tall spray spout or faucet through which water flows, a knob or knobs that control the water's temperature, and a drain in the floor.", +"type": "boolean" +}, +"showerException": { +"description": "Shower exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"toilet": { +"description": "Toilet. A fixed bathroom feature connected to a sewer or septic system and consisting of a water-flushed bowl with a seat, as well as a device that elicites the water-flushing action. Used for the process and disposal of human waste.", +"type": "boolean" +}, +"toiletException": { +"description": "Toilet exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"tv": { +"description": "TV. A television is available in the guestroom.", +"type": "boolean" +}, +"tvCasting": { +"description": "TV casting. A television equipped with a device through which the video entertainment accessed on a personal computer, phone or tablet can be wirelessly delivered to and viewed on the guestroom's television.", +"type": "boolean" +}, +"tvCastingException": { +"description": "TV exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"tvException": { +"description": "TV exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"tvStreaming": { +"description": "TV streaming. Televisions that embed a range of web-based apps to allow for watching media from those apps.", +"type": "boolean" +}, +"tvStreamingException": { +"description": "TV streaming exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"universalPowerAdapters": { +"description": "Universal power adapters. A power supply for electronic devices which plugs into a wall for the purpose of converting AC to a single DC voltage. Also know as AC adapter or charger.", +"type": "boolean" +}, +"universalPowerAdaptersException": { +"description": "Universal power adapters exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"washer": { +"description": "Washer. An electrical machine connected to a running water source designed to launder clothing.", +"type": "boolean" +}, +"washerException": { +"description": "Washer exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"LivingAreaLayout": { +"description": "Information about the layout of the living area.", +"id": "LivingAreaLayout", +"properties": { +"balcony": { +"description": "Balcony. An outdoor platform attached to a building and surrounded by a short wall, fence or other safety railing. The balcony is accessed through a door in a guestroom or suite and is for use by the guest staying in that room. May or may not include seating or outdoor furniture. Is not located on the ground floor. Also lanai.", +"type": "boolean" +}, +"balconyException": { +"description": "Balcony exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"livingAreaSqMeters": { +"description": "Living area sq meters. The measurement in meters of the area of a guestroom's living space.", +"format": "float", +"type": "number" +}, +"livingAreaSqMetersException": { +"description": "Living area sq meters exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"loft": { +"description": "Loft. A three-walled upper area accessed by stairs or a ladder that overlooks the lower area of a room.", +"type": "boolean" +}, +"loftException": { +"description": "Loft exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"nonSmoking": { +"description": "Non smoking. A guestroom in which the smoking of cigarettes, cigars and pipes is prohibited.", +"type": "boolean" +}, +"nonSmokingException": { +"description": "Non smoking exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"patio": { +"description": "Patio. A paved, outdoor area with seating attached to and accessed through a ground-floor guestroom for use by the occupants of the guestroom.", +"type": "boolean" +}, +"patioException": { +"description": "Patio exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"stairs": { +"description": "Stairs. There are steps leading from one level or story to another in the unit.", +"type": "boolean" +}, +"stairsException": { +"description": "Stairs exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"LivingAreaSleeping": { +"description": "Information about sleeping features in the living area.", +"id": "LivingAreaSleeping", +"properties": { +"bedsCount": { +"description": "Beds count. The number of permanent beds present in a guestroom. Does not include rollaway beds, cribs or sofabeds.", +"format": "int32", +"type": "integer" +}, +"bedsCountException": { +"description": "Beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"bunkBedsCount": { +"description": "Bunk beds count. The number of furniture pieces in which one framed mattress is fixed directly above another by means of a physical frame. This allows one person(s) to sleep in the bottom bunk and one person(s) to sleep in the top bunk. Also known as double decker bed.", +"format": "int32", +"type": "integer" +}, +"bunkBedsCountException": { +"description": "Bunk beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"cribsCount": { +"description": "Cribs count. The number of small beds for an infant or toddler that the guestroom can obtain. The bed is surrounded by a high railing to prevent the child from falling or climbing out of the bed", +"format": "int32", +"type": "integer" +}, +"cribsCountException": { +"description": "Cribs count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"doubleBedsCount": { +"description": "Double beds count. The number of medium beds measuring 53\"W x 75\"L (135cm x 191cm). Also known as full size bed.", +"format": "int32", +"type": "integer" +}, +"doubleBedsCountException": { +"description": "Double beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"featherPillows": { +"description": "Feather pillows. The option for guests to obtain bed pillows that are stuffed with the feathers and down of ducks or geese.", +"type": "boolean" +}, +"featherPillowsException": { +"description": "Feather pillows exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"hypoallergenicBedding": { +"description": "Hypoallergenic bedding. Bedding such as linens, pillows, mattress covers and/or mattresses that are made of materials known to be resistant to allergens such as mold, dust and dander.", +"type": "boolean" +}, +"hypoallergenicBeddingException": { +"description": "Hypoallergenic bedding exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"kingBedsCount": { +"description": "King beds count. The number of large beds measuring 76\"W x 80\"L (193cm x 102cm). Most often meant to accompany two people. Includes California king and super king.", +"format": "int32", +"type": "integer" +}, +"kingBedsCountException": { +"description": "King beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"memoryFoamPillows": { +"description": "Memory foam pillows. The option for guests to obtain bed pillows that are stuffed with a man-made foam that responds to body heat by conforming to the body closely, and then recovers its shape when the pillow cools down.", +"type": "boolean" +}, +"memoryFoamPillowsException": { +"description": "Memory foam pillows exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"otherBedsCount": { +"description": "Other beds count. The number of beds that are not standard mattress and boxspring setups such as Japanese tatami mats, trundle beds, air mattresses and cots.", +"format": "int32", +"type": "integer" +}, +"otherBedsCountException": { +"description": "Other beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"queenBedsCount": { +"description": "Queen beds count. The number of medium-large beds measuring 60\"W x 80\"L (152cm x 102cm).", +"format": "int32", +"type": "integer" +}, +"queenBedsCountException": { +"description": "Queen beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"rollAwayBedsCount": { +"description": "Roll away beds count. The number of mattresses on wheeled frames that can be folded in half and rolled away for easy storage that the guestroom can obtain upon request.", +"format": "int32", +"type": "integer" +}, +"rollAwayBedsCountException": { +"description": "Roll away beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"singleOrTwinBedsCount": { +"description": "Single or twin count beds. The number of smaller beds measuring 38\"W x 75\"L (97cm x 191cm) that can accommodate one adult.", +"format": "int32", +"type": "integer" +}, +"singleOrTwinBedsCountException": { +"description": "Single or twin beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"sofaBedsCount": { +"description": "Sofa beds count. The number of specially designed sofas that can be made to serve as a bed by lowering its hinged upholstered back to horizontal position or by pulling out a concealed mattress.", +"format": "int32", +"type": "integer" +}, +"sofaBedsCountException": { +"description": "Sofa beds count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"syntheticPillows": { +"description": "Synthetic pillows. The option for guests to obtain bed pillows stuffed with polyester material crafted to reproduce the feel of a pillow stuffed with down and feathers.", +"type": "boolean" +}, +"syntheticPillowsException": { +"description": "Synthetic pillows exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Lodging": { +"description": "Lodging of a location that provides accomodations.", +"id": "Lodging", +"properties": { +"accessibility": { +"$ref": "Accessibility", +"description": "Physical adaptations made to the property in consideration of varying levels of human physical ability." +}, +"activities": { +"$ref": "Activities", +"description": "Amenities and features related to leisure and play." +}, +"allUnits": { +"$ref": "GuestUnitFeatures", +"description": "Output only. All units on the property have at least these attributes.", +"readOnly": true +}, +"business": { +"$ref": "Business", +"description": "Features of the property of specific interest to the business traveler." +}, +"commonLivingArea": { +"$ref": "LivingArea", +"description": "Features of the shared living areas available in this Lodging." +}, +"connectivity": { +"$ref": "Connectivity", +"description": "The ways in which the property provides guests with the ability to access the internet." +}, +"families": { +"$ref": "Families", +"description": "Services and amenities for families and young guests." +}, +"foodAndDrink": { +"$ref": "FoodAndDrink", +"description": "Meals, snacks, and beverages available at the property." +}, +"guestUnits": { +"description": "Individual GuestUnitTypes that are available in this Lodging.", +"items": { +"$ref": "GuestUnitType" +}, +"type": "array" +}, +"healthAndSafety": { +"$ref": "HealthAndSafety", +"description": "Health and safety measures implemented by the hotel during COVID-19." +}, +"housekeeping": { +"$ref": "Housekeeping", +"description": "Conveniences provided in guest units to facilitate an easier, more comfortable stay." +}, +"metadata": { +"$ref": "LodgingMetadata", +"description": "Required. Metadata for the lodging." +}, +"name": { +"description": "Required. Google identifier for this location in the form: `locations/{location_id}/lodging`", +"type": "string" +}, +"parking": { +"$ref": "Parking", +"description": "Parking options at the property." +}, +"pets": { +"$ref": "Pets", +"description": "Policies regarding guest-owned animals." +}, +"policies": { +"$ref": "Policies", +"description": "Property rules that impact guests." +}, +"pools": { +"$ref": "Pools", +"description": "Swimming pool or recreational water facilities available at the hotel." +}, +"property": { +"$ref": "Property", +"description": "General factual information about the property's physical structure and important dates." +}, +"services": { +"$ref": "Services", +"description": "Conveniences or help provided by the property to facilitate an easier, more comfortable stay." +}, +"someUnits": { +"$ref": "GuestUnitFeatures", +"description": "Output only. Some units on the property have as much as these attributes.", +"readOnly": true +}, +"sustainability": { +"$ref": "Sustainability", +"description": "Sustainability practices implemented at the hotel." +}, +"transportation": { +"$ref": "Transportation", +"description": "Vehicles or vehicular services facilitated or owned by the property." +}, +"wellness": { +"$ref": "Wellness", +"description": "Guest facilities at the property to promote or maintain health, beauty, and fitness." +} +}, +"type": "object" +}, +"LodgingMetadata": { +"description": "Metadata for the Lodging.", +"id": "LodgingMetadata", +"properties": { +"updateTime": { +"description": "Required. The latest time at which the Lodging data is asserted to be true in the real world. This is not necessarily the time at which the request is made.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"MinimizedContact": { +"description": "Minimized contact measures implemented by the hotel during COVID-19.", +"id": "MinimizedContact", +"properties": { +"contactlessCheckinCheckout": { +"description": "No-contact check-in and check-out.", +"type": "boolean" +}, +"contactlessCheckinCheckoutException": { +"description": "Contactless check-in check-out exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"digitalGuestRoomKeys": { +"description": "Keyless mobile entry to guest rooms.", +"type": "boolean" +}, +"digitalGuestRoomKeysException": { +"description": "Digital guest room keys exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"housekeepingScheduledRequestOnly": { +"description": "Housekeeping scheduled by request only.", +"type": "boolean" +}, +"housekeepingScheduledRequestOnlyException": { +"description": "Housekeeping scheduled request only exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"noHighTouchItemsCommonAreas": { +"description": "High-touch items, such as magazines, removed from common areas.", +"type": "boolean" +}, +"noHighTouchItemsCommonAreasException": { +"description": "No high touch items common areas exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"noHighTouchItemsGuestRooms": { +"description": "High-touch items, such as decorative pillows, removed from guest rooms.", +"type": "boolean" +}, +"noHighTouchItemsGuestRoomsException": { +"description": "No high touch items guest rooms exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"plasticKeycardsDisinfected": { +"description": "Plastic key cards are disinfected or discarded.", +"type": "boolean" +}, +"plasticKeycardsDisinfectedException": { +"description": "Plastic keycards disinfected exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"roomBookingsBuffer": { +"description": "Buffer maintained between room bookings.", +"type": "boolean" +}, +"roomBookingsBufferException": { +"description": "Room bookings buffer exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Parking": { +"description": "Parking options at the property.", +"id": "Parking", +"properties": { +"electricCarChargingStations": { +"description": "Electric car charging stations. Electric power stations, usually located outdoors, into which guests plug their electric cars to receive a charge.", +"type": "boolean" +}, +"electricCarChargingStationsException": { +"description": "Electric car charging stations exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeParking": { +"description": "Free parking. The hotel allows the cars of guests to be parked for free. Parking facility may be an outdoor lot or an indoor garage, but must be onsite. Nearby parking does not apply. Parking may be performed by the guest or by hotel staff. Free parking must be available to all guests (limited conditions does not apply).", +"type": "boolean" +}, +"freeParkingException": { +"description": "Free parking exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeSelfParking": { +"description": "Free self parking. Guests park their own cars for free. Parking facility may be an outdoor lot or an indoor garage, but must be onsite. Nearby parking does not apply.", +"type": "boolean" +}, +"freeSelfParkingException": { +"description": "Free self parking exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeValetParking": { +"description": "Free valet parking. Hotel staff member parks the cars of guests. Parking with this service is free.", +"type": "boolean" +}, +"freeValetParkingException": { +"description": "Free valet parking exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"parkingAvailable": { +"description": "Parking available. The hotel allows the cars of guests to be parked. Can be free or for a fee. Parking facility may be an outdoor lot or an indoor garage, but must be onsite. Nearby parking does not apply. Parking may be performed by the guest or by hotel staff.", +"type": "boolean" +}, +"parkingAvailableException": { +"description": "Parking available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"selfParkingAvailable": { +"description": "Self parking available. Guests park their own cars. Parking facility may be an outdoor lot or an indoor garage, but must be onsite. Nearby parking does not apply. Can be free or for a fee.", +"type": "boolean" +}, +"selfParkingAvailableException": { +"description": "Self parking available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"valetParkingAvailable": { +"description": "Valet parking available. Hotel staff member parks the cars of guests. Parking with this service can be free or for a fee.", +"type": "boolean" +}, +"valetParkingAvailableException": { +"description": "Valet parking available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"PaymentOptions": { +"description": "Forms of payment accepted at the property.", +"id": "PaymentOptions", +"properties": { +"cash": { +"description": "Cash. The hotel accepts payment by paper/coin currency.", +"type": "boolean" +}, +"cashException": { +"description": "Cash exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"cheque": { +"description": "Cheque. The hotel accepts a printed document issued by the guest's bank in the guest's name as a form of payment.", +"type": "boolean" +}, +"chequeException": { +"description": "Cheque exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"creditCard": { +"description": "Credit card. The hotel accepts payment by a card issued by a bank or credit card company. Also known as charge card, debit card, bank card, or charge plate.", +"type": "boolean" +}, +"creditCardException": { +"description": "Credit card exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"debitCard": { +"description": "Debit card. The hotel accepts a bank-issued card that immediately deducts the charged funds from the guest's bank account upon processing.", +"type": "boolean" +}, +"debitCardException": { +"description": "Debit card exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"mobileNfc": { +"description": "Mobile nfc. The hotel has the compatible computer hardware terminal that reads and charges a payment app on the guest's smartphone without requiring the two devices to make physical contact. Also known as Apple Pay, Google Pay, Samsung Pay.", +"type": "boolean" +}, +"mobileNfcException": { +"description": "Mobile nfc exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"PersonalProtection": { +"description": "Personal protection measures implemented by the hotel during COVID-19.", +"id": "PersonalProtection", +"properties": { +"commonAreasOfferSanitizingItems": { +"description": "Hand-sanitizer and/or sanitizing wipes are offered in common areas.", +"type": "boolean" +}, +"commonAreasOfferSanitizingItemsException": { +"description": "Common areas offer sanitizing items exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"faceMaskRequired": { +"description": "Masks required on the property.", +"type": "boolean" +}, +"faceMaskRequiredException": { +"description": "Face mask required exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"guestRoomHygieneKitsAvailable": { +"description": "In-room hygiene kits with masks, hand sanitizer, and/or antibacterial wipes.", +"type": "boolean" +}, +"guestRoomHygieneKitsAvailableException": { +"description": "Guest room hygiene kits available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"protectiveEquipmentAvailable": { +"description": "Masks and/or gloves available for guests.", +"type": "boolean" +}, +"protectiveEquipmentAvailableException": { +"description": "Protective equipment available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Pets": { +"description": "Policies regarding guest-owned animals.", +"id": "Pets", +"properties": { +"catsAllowed": { +"description": "Cats allowed. Domesticated felines are permitted at the property and allowed to stay in the guest room of their owner. May or may not require a fee.", +"type": "boolean" +}, +"catsAllowedException": { +"description": "Cats allowed exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"dogsAllowed": { +"description": "Dogs allowed. Domesticated canines are permitted at the property and allowed to stay in the guest room of their owner. May or may not require a fee.", +"type": "boolean" +}, +"dogsAllowedException": { +"description": "Dogs allowed exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"petsAllowed": { +"description": "Pets allowed. Household animals are allowed at the property and in the specific guest room of their owner. May or may not include dogs, cats, reptiles and/or fish. May or may not require a fee. Service animals are not considered to be pets, so not governed by this policy.", +"type": "boolean" +}, +"petsAllowedException": { +"description": "Pets allowed exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"petsAllowedFree": { +"description": "Pets allowed free. Household animals are allowed at the property and in the specific guest room of their owner for free. May or may not include dogs, cats, reptiles, and/or fish.", +"type": "boolean" +}, +"petsAllowedFreeException": { +"description": "Pets allowed free exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"PhysicalDistancing": { +"description": "Physical distancing measures implemented by the hotel during COVID-19.", +"id": "PhysicalDistancing", +"properties": { +"commonAreasPhysicalDistancingArranged": { +"description": "Common areas arranged to maintain physical distancing.", +"type": "boolean" +}, +"commonAreasPhysicalDistancingArrangedException": { +"description": "Common areas physical distancing arranged exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"physicalDistancingRequired": { +"description": "Physical distancing required.", +"type": "boolean" +}, +"physicalDistancingRequiredException": { +"description": "Physical distancing required exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"safetyDividers": { +"description": "Safety dividers at front desk and other locations.", +"type": "boolean" +}, +"safetyDividersException": { +"description": "Safety dividers exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"sharedAreasLimitedOccupancy": { +"description": "Guest occupancy limited within shared facilities.", +"type": "boolean" +}, +"sharedAreasLimitedOccupancyException": { +"description": "Shared areas limited occupancy exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"wellnessAreasHavePrivateSpaces": { +"description": "Private spaces designated in spa and wellness areas.", +"type": "boolean" +}, +"wellnessAreasHavePrivateSpacesException": { +"description": "Wellness areas have private spaces exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Policies": { +"description": "Property rules that impact guests.", +"id": "Policies", +"properties": { +"allInclusiveAvailable": { +"description": "All inclusive available. The hotel offers a rate option that includes the cost of the room, meals, activities, and other amenities that might otherwise be charged separately.", +"type": "boolean" +}, +"allInclusiveAvailableException": { +"description": "All inclusive available exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"allInclusiveOnly": { +"description": "All inclusive only. The only rate option offered by the hotel is a rate that includes the cost of the room, meals, activities and other amenities that might otherwise be charged separately.", +"type": "boolean" +}, +"allInclusiveOnlyException": { +"description": "All inclusive only exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"checkinTime": { +"$ref": "TimeOfDay", +"description": "Check-in time. The time of the day at which the hotel begins providing guests access to their unit at the beginning of their stay." +}, +"checkinTimeException": { +"description": "Check-in time exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"checkoutTime": { +"$ref": "TimeOfDay", +"description": "Check-out time. The time of the day on the last day of a guest's reserved stay at which the guest must vacate their room and settle their bill. Some hotels may offer late or early check out for a fee." +}, +"checkoutTimeException": { +"description": "Check-out time exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"kidsStayFree": { +"description": "Kids stay free. The children of guests are allowed to stay in the room/suite of a parent or adult without an additional fee. The policy may or may not stipulate a limit of the child's age or the overall number of children allowed.", +"type": "boolean" +}, +"kidsStayFreeException": { +"description": "Kids stay free exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"maxChildAge": { +"description": "Max child age. The hotel allows children up to a certain age to stay in the room/suite of a parent or adult without an additional fee.", +"format": "int32", +"type": "integer" +}, +"maxChildAgeException": { +"description": "Max child age exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"maxKidsStayFreeCount": { +"description": "Max kids stay free count. The hotel allows a specific, defined number of children to stay in the room/suite of a parent or adult without an additional fee.", +"format": "int32", +"type": "integer" +}, +"maxKidsStayFreeCountException": { +"description": "Max kids stay free count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"paymentOptions": { +"$ref": "PaymentOptions", +"description": "Forms of payment accepted at the property." +}, +"smokeFreeProperty": { +"description": "Smoke free property. Smoking is not allowed inside the building, on balconies, or in outside spaces. Hotels that offer a designated area for guests to smoke are not considered smoke-free properties.", +"type": "boolean" +}, +"smokeFreePropertyException": { +"description": "Smoke free property exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Pools": { +"description": "Swimming pool or recreational water facilities available at the hotel.", +"id": "Pools", +"properties": { +"adultPool": { +"description": "Adult pool. A pool restricted for use by adults only. Can be indoors or outdoors.", +"type": "boolean" +}, +"adultPoolException": { +"description": "Adult pool exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"hotTub": { +"description": "Hot tub. A man-made pool containing bubbling water maintained at a higher temperature and circulated by aerating jets for the purpose of soaking, relaxation and hydrotherapy. Can be indoors or outdoors. Not used for active swimming. Also known as Jacuzzi. Hot tub must be in a common area where all guests can access it. Does not apply to room-specific hot tubs that are only accessible to guest occupying that room.", +"type": "boolean" +}, +"hotTubException": { +"description": "Hot tub exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"indoorPool": { +"description": "Indoor pool. A pool located inside the hotel and available for guests to use for swimming and/or soaking. Use may or may not be restricted to adults and/or children.", +"type": "boolean" +}, +"indoorPoolException": { +"description": "Indoor pool exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"indoorPoolsCount": { +"description": "Indoor pools count. The sum of all indoor pools at the hotel.", +"format": "int32", +"type": "integer" +}, +"indoorPoolsCountException": { +"description": "Indoor pools count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"lazyRiver": { +"description": "Lazy river. A man-made pool or several interconnected recreational pools built to mimic the shape and current of a winding river where guests float in the water on inflated rubber tubes. Can be indoors or outdoors.", +"type": "boolean" +}, +"lazyRiverException": { +"description": "Lazy river exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"lifeguard": { +"description": "Lifeguard. A trained member of the hotel staff stationed by the hotel's indoor or outdoor swimming area and responsible for the safety of swimming guests.", +"type": "boolean" +}, +"lifeguardException": { +"description": "Lifeguard exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"outdoorPool": { +"description": "Outdoor pool. A pool located outside on the grounds of the hotel and available for guests to use for swimming, soaking or recreation. Use may or may not be restricted to adults and/or children.", +"type": "boolean" +}, +"outdoorPoolException": { +"description": "Outdoor pool exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"outdoorPoolsCount": { +"description": "Outdoor pools count. The sum of all outdoor pools at the hotel.", +"format": "int32", +"type": "integer" +}, +"outdoorPoolsCountException": { +"description": "Outdoor pools count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"pool": { +"description": "Pool. The presence of a pool, either indoors or outdoors, for guests to use for swimming and/or soaking. Use may or may not be restricted to adults and/or children.", +"type": "boolean" +}, +"poolException": { +"description": "Pool exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"poolsCount": { +"description": "Pools count. The sum of all pools at the hotel.", +"format": "int32", +"type": "integer" +}, +"poolsCountException": { +"description": "Pools count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"wadingPool": { +"description": "Wading pool. A shallow pool designed for small children to play in. Can be indoors or outdoors. Also known as kiddie pool.", +"type": "boolean" +}, +"wadingPoolException": { +"description": "Wading pool exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"waterPark": { +"description": "Water park. An aquatic recreation area with a large pool or series of pools that has features such as a water slide or tube, wavepool, fountains, rope swings, and/or obstacle course. Can be indoors or outdoors. Also known as adventure pool.", +"type": "boolean" +}, +"waterParkException": { +"description": "Water park exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"waterslide": { +"description": "Waterslide. A continuously wetted chute positioned by an indoor or outdoor pool which people slide down into the water.", +"type": "boolean" +}, +"waterslideException": { +"description": "Waterslide exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"wavePool": { +"description": "Wave pool. A large indoor or outdoor pool with a machine that produces water currents to mimic the ocean's crests.", +"type": "boolean" +}, +"wavePoolException": { +"description": "Wave pool exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Property": { +"description": "General factual information about the property's physical structure and important dates.", +"id": "Property", +"properties": { +"builtYear": { +"description": "Built year. The year that construction of the property was completed.", +"format": "int32", +"type": "integer" +}, +"builtYearException": { +"description": "Built year exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"floorsCount": { +"description": "Floors count. The number of stories the building has from the ground floor to the top floor that are accessible to guests.", +"format": "int32", +"type": "integer" +}, +"floorsCountException": { +"description": "Floors count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"lastRenovatedYear": { +"description": "Last renovated year. The year when the most recent renovation of the property was completed. Renovation may include all or any combination of the following: the units, the public spaces, the exterior, or the interior.", +"format": "int32", +"type": "integer" +}, +"lastRenovatedYearException": { +"description": "Last renovated year exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"roomsCount": { +"description": "Rooms count. The total number of rooms and suites bookable by guests for an overnight stay. Does not include event space, public spaces, conference rooms, fitness rooms, business centers, spa, salon, restaurants/bars, or shops.", +"format": "int32", +"type": "integer" +}, +"roomsCountException": { +"description": "Rooms count exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Services": { +"description": "Conveniences or help provided by the property to facilitate an easier, more comfortable stay.", +"id": "Services", +"properties": { +"baggageStorage": { +"description": "Baggage storage. A provision for guests to leave their bags at the hotel when they arrive for their stay before the official check-in time. May or may not apply for guests who wish to leave their bags after check-out and before departing the locale. Also known as bag dropoff.", +"type": "boolean" +}, +"baggageStorageException": { +"description": "Baggage storage exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"concierge": { +"description": "Concierge. Hotel staff member(s) responsible for facilitating an easy, comfortable stay through making reservations for meals, sourcing theater tickets, arranging tours, finding a doctor, making recommendations, and answering questions.", +"type": "boolean" +}, +"conciergeException": { +"description": "Concierge exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"convenienceStore": { +"description": "Convenience store. A shop at the hotel primarily selling snacks, drinks, non-prescription medicines, health and beauty aids, magazines and newspapers.", +"type": "boolean" +}, +"convenienceStoreException": { +"description": "Convenience store exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"currencyExchange": { +"description": "Currency exchange. A staff member or automated machine tasked with the transaction of providing the native currency of the hotel's locale in exchange for the foreign currency provided by a guest.", +"type": "boolean" +}, +"currencyExchangeException": { +"description": "Currency exchange exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"elevator": { +"description": "Elevator. A passenger elevator that transports guests from one story to another. Also known as lift.", +"type": "boolean" +}, +"elevatorException": { +"description": "Elevator exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"frontDesk": { +"description": "Front desk. A counter or desk in the lobby or the immediate interior of the hotel where a member of the staff greets guests and processes the information related to their stay (including check-in and check-out). May or may not be manned and open 24/7.", +"type": "boolean" +}, +"frontDeskException": { +"description": "Front desk exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"fullServiceLaundry": { +"description": "Full service laundry. Laundry and dry cleaning facilitated and handled by the hotel on behalf of the guest. Does not include the provision for guests to do their own laundry in on-site machines.", +"type": "boolean" +}, +"fullServiceLaundryException": { +"description": "Full service laundry exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"giftShop": { +"description": "Gift shop. An on-site store primarily selling souvenirs, mementos and other gift items. May or may not also sell sundries, magazines and newspapers, clothing, or snacks.", +"type": "boolean" +}, +"giftShopException": { +"description": "Gift shop exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"languagesSpoken": { +"description": "Languages spoken by at least one staff member.", +"items": { +"$ref": "LanguageSpoken" +}, +"type": "array" +}, +"selfServiceLaundry": { +"description": "Self service laundry. On-site clothes washers and dryers accessible to guests for the purpose of washing and drying their own clothes. May or may not require payment to use the machines.", +"type": "boolean" +}, +"selfServiceLaundryException": { +"description": "Self service laundry exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"socialHour": { +"description": "Social hour. A reception with complimentary soft drinks, tea, coffee, wine and/or cocktails in the afternoon or evening. Can be hosted by hotel staff or guests may serve themselves. Also known as wine hour. The availability of coffee/tea in the lobby throughout the day does not constitute a social or wine hour.", +"type": "boolean" +}, +"socialHourException": { +"description": "Social hour exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"twentyFourHourFrontDesk": { +"description": "24hr front desk. Front desk is staffed 24 hours a day.", +"type": "boolean" +}, +"twentyFourHourFrontDeskException": { +"description": "24hr front desk exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"wakeUpCalls": { +"description": "Wake up calls. By direction of the guest, a hotel staff member will phone the guest unit at the requested hour. Also known as morning call.", +"type": "boolean" +}, +"wakeUpCallsException": { +"description": "Wake up calls exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Sustainability": { +"description": "Sustainability practices implemented at the hotel.", +"id": "Sustainability", +"properties": { +"energyEfficiency": { +"$ref": "EnergyEfficiency", +"description": "Energy efficiency practices implemented at the hotel." +}, +"sustainabilityCertifications": { +"$ref": "SustainabilityCertifications", +"deprecated": true, +"description": "Sustainability certifications the hotel has been awarded. Deprecated: this field is no longer populated. All certification data is now provided by BeCause." +}, +"sustainableSourcing": { +"$ref": "SustainableSourcing", +"description": "Sustainable sourcing practices implemented at the hotel." +}, +"wasteReduction": { +"$ref": "WasteReduction", +"description": "Waste reduction practices implemented at the hotel." +}, +"waterConservation": { +"$ref": "WaterConservation", +"description": "Water conservation practices implemented at the hotel." +} +}, +"type": "object" +}, +"SustainabilityCertifications": { +"deprecated": true, +"description": "Sustainability certifications the hotel has been awarded. Deprecated: this message is no longer populated. All certification data is now provided by BeCause.", +"id": "SustainabilityCertifications", +"properties": { +"breeamCertification": { +"description": "BREEAM certification.", +"enum": [ +"BREEAM_CERTIFICATION_UNSPECIFIED", +"NO_BREEAM_CERTIFICATION", +"BREEAM_PASS", +"BREEAM_GOOD", +"BREEAM_VERY_GOOD", +"BREEAM_EXCELLENT", +"BREEAM_OUTSTANDING" +], +"enumDescriptions": [ +"Default BreeamCertification. Do not use.", +"Not certified.", +"BREEAM Pass.", +"BREEAM Good.", +"BREEAM Very Good.", +"BREEAM Excellent.", +"BREEAM Outstanding." +], +"type": "string" +}, +"breeamCertificationException": { +"description": "BREEAM certification exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"ecoCertifications": { +"description": "The eco certificates awarded to the hotel.", +"items": { +"$ref": "EcoCertification" +}, +"type": "array" +}, +"leedCertification": { +"description": "LEED certification.", +"enum": [ +"LEED_CERTIFICATION_UNSPECIFIED", +"NO_LEED_CERTIFICATION", +"LEED_CERTIFIED", +"LEED_SILVER", +"LEED_GOLD", +"LEED_PLATINUM" +], +"enumDescriptions": [ +"Default LeedCertification. Do not use.", +"Not certified.", +"LEED Certified.", +"LEED Silver.", +"LEED Gold.", +"LEED Platinum." +], +"type": "string" +}, +"leedCertificationException": { +"description": "LEED certification exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"SustainableSourcing": { +"description": "Sustainable sourcing practices implemented at the hotel.", +"id": "SustainableSourcing", +"properties": { +"ecoFriendlyToiletries": { +"description": "Eco friendly toiletries. Soap, shampoo, lotion, and other toiletries provided for guests have a nationally or internationally recognized sustainability certification, such as USDA Organic, EU Organic, or cruelty-free.", +"type": "boolean" +}, +"ecoFriendlyToiletriesException": { +"description": "Eco friendly toiletries exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"locallySourcedFoodAndBeverages": { +"description": "Locally sourced food and beverages. Property sources locally in order to lower the environmental footprint from reduced transportation and to stimulate the local economy. Products produced less than 62 miles from the establishment are normally considered as locally produced.", +"type": "boolean" +}, +"locallySourcedFoodAndBeveragesException": { +"description": "Locally sourced food and beverages exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"organicCageFreeEggs": { +"description": "Organic cage free eggs. The property sources 100% certified organic and cage-free eggs (shell, liquid, and egg products). Cage-free means hens are able to walk, spread their wings and lay their eggs in nests).", +"type": "boolean" +}, +"organicCageFreeEggsException": { +"description": "Organic cage free eggs exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"organicFoodAndBeverages": { +"description": "Organic food and beverages. At least 25% of food and beverages, by spend, are certified organic. Organic means products that are certified to one of the organic standard listed in the IFOAM family of standards. Qualifying certifications include USDA Organic and EU Organic, among others.", +"type": "boolean" +}, +"organicFoodAndBeveragesException": { +"description": "Organic food and beverages exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"responsiblePurchasingPolicy": { +"description": "Responsible purchasing policy. The property has a responsible procurement policy in place. Responsible means integration of social, ethical, and/or environmental performance factors into the procurement process when selecting suppliers.", +"type": "boolean" +}, +"responsiblePurchasingPolicyException": { +"description": "Responsible purchasing policy exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"responsiblySourcesSeafood": { +"description": "Responsibly sources seafood. The property does not source seafood from the Monterey Bay Aquarium Seafood Watch \"avoid\" list, and must sustainably source seafood listed as \"good alternative,\" \"eco-certified,\" and \"best choice\". The property has a policy outlining a commitment to source Marine Stewardship Council (MSC) and/or Aquaculture Stewardship Council (ASC) Chain of Custody certified seafood.", +"type": "boolean" +}, +"responsiblySourcesSeafoodException": { +"description": "Responsibly sources seafood exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"veganMeals": { +"description": "Vegan meals. The property provides vegan menu options for guests. Vegan food does not contain animal products or byproducts.", +"type": "boolean" +}, +"veganMealsException": { +"description": "Vegan meals exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"vegetarianMeals": { +"description": "Vegetarian meals. The property provides vegetarian menu options for guests. Vegetarian food does not contain meat, poultry, fish, or seafood.", +"type": "boolean" +}, +"vegetarianMealsException": { +"description": "Vegetarian meals exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Transportation": { +"description": "Vehicles or vehicular services facilitated or owned by the property.", +"id": "Transportation", +"properties": { +"airportShuttle": { +"description": "Airport shuttle. The hotel provides guests with a chauffeured van or bus to and from the airport. Can be free or for a fee. Guests may share the vehicle with other guests unknown to them. Applies if the hotel has a third-party shuttle service (office/desk etc.) within the hotel. As long as hotel provides this service, it doesn't matter if it's directly with them or a third party they work with. Does not apply if guest has to coordinate with an entity outside/other than the hotel.", +"type": "boolean" +}, +"airportShuttleException": { +"description": "Airport shuttle exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"carRentalOnProperty": { +"description": "Car rental on property. A branch of a rental car company with a processing desk in the hotel. Available cars for rent may be awaiting at the hotel or in a nearby lot.", +"type": "boolean" +}, +"carRentalOnPropertyException": { +"description": "Car rental on property exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeAirportShuttle": { +"description": "Free airport shuttle. Airport shuttle is free to guests. Must be free to all guests without any conditions.", +"type": "boolean" +}, +"freeAirportShuttleException": { +"description": "Free airport shuttle exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freePrivateCarService": { +"description": "Free private car service. Private chauffeured car service is free to guests.", +"type": "boolean" +}, +"freePrivateCarServiceException": { +"description": "Free private car service exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"localShuttle": { +"description": "Local shuttle. A car, van or bus provided by the hotel to transport guests to destinations within a specified range of distance around the hotel. Usually shopping and/or convention centers, downtown districts, or beaches. Can be free or for a fee.", +"type": "boolean" +}, +"localShuttleException": { +"description": "Local shuttle exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"privateCarService": { +"description": "Private car service. Hotel provides a private chauffeured car to transport guests to destinations. Passengers in the car are either alone or are known to one another and have requested the car together. Service can be free or for a fee and travel distance is usually limited to a specific range. Not a taxi.", +"type": "boolean" +}, +"privateCarServiceException": { +"description": "Private car service exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"transfer": { +"description": "Transfer. Hotel provides a shuttle service or car service to take guests to and from the nearest airport or train station. Can be free or for a fee. Guests may share the vehicle with other guests unknown to them.", +"type": "boolean" +}, +"transferException": { +"description": "Transfer exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"ViewsFromUnit": { +"description": "Views available from the guest unit itself.", +"id": "ViewsFromUnit", +"properties": { +"beachView": { +"description": "Beach view. A guestroom that features a window through which guests can see the beach.", +"type": "boolean" +}, +"beachViewException": { +"description": "Beach view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"cityView": { +"description": "City view. A guestroom that features a window through which guests can see the buildings, parks and/or streets of the city.", +"type": "boolean" +}, +"cityViewException": { +"description": "City view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"gardenView": { +"description": "Garden view. A guestroom that features a window through which guests can see a garden.", +"type": "boolean" +}, +"gardenViewException": { +"description": "Garden view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"lakeView": { +"description": "Lake view.", +"type": "boolean" +}, +"lakeViewException": { +"description": "Lake view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"landmarkView": { +"description": "Landmark view. A guestroom that features a window through which guests can see a landmark such as the countryside, a golf course, the forest, a park, a rain forst, a mountain or a slope.", +"type": "boolean" +}, +"landmarkViewException": { +"description": "Landmark view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"oceanView": { +"description": "Ocean view. A guestroom that features a window through which guests can see the ocean.", +"type": "boolean" +}, +"oceanViewException": { +"description": "Ocean view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"poolView": { +"description": "Pool view. A guestroom that features a window through which guests can see the hotel's swimming pool.", +"type": "boolean" +}, +"poolViewException": { +"description": "Pool view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"valleyView": { +"description": "Valley view. A guestroom that features a window through which guests can see over a valley.", +"type": "boolean" +}, +"valleyViewException": { +"description": "Valley view exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"WasteReduction": { +"description": "Waste reduction practices implemented at the hotel.", +"id": "WasteReduction", +"properties": { +"compostableFoodContainersAndCutlery": { +"description": "Compostable food containers and cutlery. 100% of food service containers and to-go cutlery are compostable, and reusable utensils are offered wherever possible. Compostable materials are capable of undergoing biological decomposition in a compost site, such that material is not visually distinguishable and breaks down into carbon dioxide, water, inorganic compounds, and biomass.", +"type": "boolean" +}, +"compostableFoodContainersAndCutleryException": { +"description": "Compostable food containers and cutlery exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"compostsExcessFood": { +"description": "Composts excess food. The property has a program and/or policy for diverting waste from landfill by composting food and yard waste, either through compost collection and off-site processing or on-site compost processing.", +"type": "boolean" +}, +"compostsExcessFoodException": { +"description": "Composts excess food exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"donatesExcessFood": { +"description": "Donates excess food. The property has a program and/or policy for diverting waste from landfill that may include efforts to donate for human consumption or divert food for animal feed.", +"type": "boolean" +}, +"donatesExcessFoodException": { +"description": "Donates excess food exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"foodWasteReductionProgram": { +"description": "Food waste reduction program. The property has established a food waste reduction and donation program, aiming to reduce food waste by half. These programs typically use tools such as the Hotel Kitchen Toolkit and others to track waste and measure progress.", +"type": "boolean" +}, +"foodWasteReductionProgramException": { +"description": "Food waste reduction program exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"noSingleUsePlasticStraws": { +"description": "No single use plastic straws. The property bans single-use plastic straws.", +"type": "boolean" +}, +"noSingleUsePlasticStrawsException": { +"description": "No single use plastic straws exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"noSingleUsePlasticWaterBottles": { +"description": "No single use plastic water bottles. The property bans single-use plastic water bottles.", +"type": "boolean" +}, +"noSingleUsePlasticWaterBottlesException": { +"description": "No single use plastic water bottles exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"noStyrofoamFoodContainers": { +"description": "No styrofoam food containers. The property eliminates the use of Styrofoam in disposable food service items.", +"type": "boolean" +}, +"noStyrofoamFoodContainersException": { +"description": "No styrofoam food containers exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"recyclingProgram": { +"description": "Recycling program. The property has a recycling program, aligned with LEED waste requirements, and a policy outlining efforts to send less than 50% of waste to landfill. The recycling program includes storage locations for recyclable materials, including mixed paper, corrugated cardboard, glass, plastics, and metals.", +"type": "boolean" +}, +"recyclingProgramException": { +"description": "Recycling program exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"refillableToiletryContainers": { +"description": "Refillable toiletry containers. The property has replaced miniature individual containers with refillable amenity dispensers for shampoo, conditioner, soap, and lotion.", +"type": "boolean" +}, +"refillableToiletryContainersException": { +"description": "Refillable toiletry containers exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"safelyDisposesBatteries": { +"description": "Safely disposes batteries. The property safely stores and disposes batteries.", +"type": "boolean" +}, +"safelyDisposesBatteriesException": { +"description": "Safely disposes batteries exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"safelyDisposesElectronics": { +"description": "Safely disposes electronics. The property has a reputable recycling program that keeps hazardous electronic parts and chemical compounds out of landfills, dumps and other unauthorized abandonment sites, and recycles/reuses applicable materials. (e.g. certified electronics recyclers).", +"type": "boolean" +}, +"safelyDisposesElectronicsException": { +"description": "Safely disposes electronics exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"safelyDisposesLightbulbs": { +"description": "Safely disposes lightbulbs. The property safely stores and disposes lightbulbs.", +"type": "boolean" +}, +"safelyDisposesLightbulbsException": { +"description": "Safely disposes lightbulbs exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"safelyHandlesHazardousSubstances": { +"description": "Safely handles hazardous substances. The property has a hazardous waste management program aligned wit GreenSeal and LEED requirements, and meets all regulatory requirements for hazardous waste disposal and recycling. Hazardous means substances that are classified as \"hazardous\" by an authoritative body (such as OSHA or DOT), are labeled with signal words such as \"Danger,\" \"Caution,\" \"Warning,\" or are flammable, corrosive, or ignitable. Requirements include: - The property shall maintain records of the efforts it has made to replace the hazardous substances it uses with less hazardous alternatives. - An inventory of the hazardous materials stored on-site. - Products intended for cleaning, dishwashing, laundry, and pool maintenance shall be stored in clearly labeled containers. These containers shall be checked regularly for leaks, and replaced a necessary. - Spill containment devices shall be installed to collect spills, drips, or leaching of chemicals.", +"type": "boolean" +}, +"safelyHandlesHazardousSubstancesException": { +"description": "Safely handles hazardous substances exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"soapDonationProgram": { +"description": "Soap donation program. The property participates in a soap donation program such as Clean the World or something similar.", +"type": "boolean" +}, +"soapDonationProgramException": { +"description": "Soap donation program exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"toiletryDonationProgram": { +"description": "Toiletry donation program. The property participates in a toiletry donation program such as Clean the World or something similar.", +"type": "boolean" +}, +"toiletryDonationProgramException": { +"description": "Toiletry donation program exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"waterBottleFillingStations": { +"description": "Water bottle filling stations. The property offers water stations throughout the building for guest use.", +"type": "boolean" +}, +"waterBottleFillingStationsException": { +"description": "Water bottle filling stations exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"WaterConservation": { +"description": "Water conservation practices implemented at the hotel.", +"id": "WaterConservation", +"properties": { +"independentOrganizationAuditsWaterUse": { +"description": "Independent organization audits water use. The property conducts a water conservation audit every 5 years, the results of which are either verified by a third-party and/or published in external communications. A water conservation audit is a detailed assessment of the facility, providing recommendations to existing operations and procedures to improve water efficiency, available incentives or rebates, and opportunities for improvements through renovations or upgrades. Examples of organizations who conduct credible third party audits include: Engie Impact, and local utility providers (they often provide energy and water audits).", +"type": "boolean" +}, +"independentOrganizationAuditsWaterUseException": { +"description": "Independent organization audits water use exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"linenReuseProgram": { +"description": "Linen reuse program. The property offers a linen reuse program.", +"type": "boolean" +}, +"linenReuseProgramException": { +"description": "Linen reuse program exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"towelReuseProgram": { +"description": "Towel reuse program. The property offers a towel reuse program.", +"type": "boolean" +}, +"towelReuseProgramException": { +"description": "Towel reuse program exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"waterSavingShowers": { +"description": "Water saving showers. All of the property's guest rooms have shower heads that use no more than 2.0 gallons per minute (gpm).", +"type": "boolean" +}, +"waterSavingShowersException": { +"description": "Water saving showers exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"waterSavingSinks": { +"description": "Water saving sinks. All of the property's guest rooms have bathroom faucets that use a maximum of 1.5 gallons per minute (gpm), public restroom faucets do not exceed 0.5 gpm, and kitchen faucets (excluding faucets used exclusively for filling operations) do not exceed 2.2 gpm.", +"type": "boolean" +}, +"waterSavingSinksException": { +"description": "Water saving sinks exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"waterSavingToilets": { +"description": "Water saving toilets. All of the property's toilets use 1.6 gallons per flush, or less.", +"type": "boolean" +}, +"waterSavingToiletsException": { +"description": "Water saving toilets exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +}, +"Wellness": { +"description": "Guest facilities at the property to promote or maintain health, beauty, and fitness.", +"id": "Wellness", +"properties": { +"doctorOnCall": { +"description": "Doctor on call. The hotel has a contract with a medical professional who provides services to hotel guests should they fall ill during their stay. The doctor may or may not have an on-site office or be at the hotel at all times.", +"type": "boolean" +}, +"doctorOnCallException": { +"description": "Doctor on call exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"ellipticalMachine": { +"description": "Elliptical machine. An electric, stationary fitness machine with pedals that simulates climbing, walking or running and provides a user-controlled range of speeds and tensions. May not have arm-controlled levers to work out the upper body as well. Commonly found in a gym, fitness room, health center, or health club.", +"type": "boolean" +}, +"ellipticalMachineException": { +"description": "Elliptical machine exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"fitnessCenter": { +"description": "Fitness center. A room or building at the hotel containing equipment to promote physical activity, such as treadmills, elliptical machines, stationary bikes, weight machines, free weights, and/or stretching mats. Use of the fitness center can be free or for a fee. May or may not be staffed. May or may not offer instructor-led classes in various styles of physical conditioning. May or may not be open 24/7. May or may not include locker rooms and showers. Also known as health club, gym, fitness room, health center.", +"type": "boolean" +}, +"fitnessCenterException": { +"description": "Fitness center exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeFitnessCenter": { +"description": "Free fitness center. Guests may use the fitness center for free.", +"type": "boolean" +}, +"freeFitnessCenterException": { +"description": "Free fitness center exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"freeWeights": { +"description": "Free weights. Individual handheld fitness equipment of varied weights used for upper body strength training or bodybuilding. Also known as barbells, dumbbells, or kettlebells. Often stored on a rack with the weights arranged from light to heavy. Commonly found in a gym, fitness room, health center, or health club.", +"type": "boolean" +}, +"freeWeightsException": { +"description": "Free weights exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"massage": { +"description": "Massage. A service provided by a trained massage therapist involving the physical manipulation of a guest's muscles in order to achieve relaxation or pain relief.", +"type": "boolean" +}, +"massageException": { +"description": "Massage exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"salon": { +"description": "Salon. A room at the hotel where professionals provide hair styling services such as shampooing, blow drying, hair dos, hair cutting and hair coloring. Also known as hairdresser or beauty salon.", +"type": "boolean" +}, +"salonException": { +"description": "Salon exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"sauna": { +"description": "Sauna. A wood-paneled room heated to a high temperature where guests sit on built-in wood benches for the purpose of perspiring and relaxing their muscles. Can be dry or slightly wet heat. Not a steam room.", +"type": "boolean" +}, +"saunaException": { +"description": "Sauna exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"spa": { +"description": "Spa. A designated area, room or building at the hotel offering health and beauty treatment through such means as steam baths, exercise equipment, and massage. May also offer facials, nail care, and hair care. Services are usually available by appointment and for an additional fee. Does not apply if hotel only offers a steam room; must offer other beauty and/or health treatments as well.", +"type": "boolean" +}, +"spaException": { +"description": "Spa exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"treadmill": { +"description": "Treadmill. An electric stationary fitness machine that simulates a moving path to promote walking or running within a range of user-controlled speeds and inclines. Also known as running machine. Commonly found in a gym, fitness room, health center, or health club.", +"type": "boolean" +}, +"treadmillException": { +"description": "Treadmill exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +}, +"weightMachine": { +"description": "Weight machine. Non-electronic fitness equipment designed for the user to target the exertion of different muscles. Usually incorporates a padded seat, a stack of flat weights and various bars and pulleys. May be designed for toning a specific part of the body or may involve different user-controlled settings, hardware and pulleys so as to provide an overall workout in one machine. Commonly found in a gym, fitness center, fitness room, or health club.", +"type": "boolean" +}, +"weightMachineException": { +"description": "Weight machine exception.", +"enum": [ +"EXCEPTION_UNSPECIFIED", +"UNDER_CONSTRUCTION", +"DEPENDENT_ON_SEASON", +"DEPENDENT_ON_DAY_OF_WEEK" +], +"enumDescriptions": [ +"Default unspecified exception. Use this only if a more specific exception does not match.", +"Amenity or service is unavailable due to ongoing work orders.", +"Amenity or service availability is seasonal.", +"Amenity or service availability depends on the day of the week." +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "My Business Lodging API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessnotifications.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessnotifications.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..00bb7ecd4a0fe4858af1f2dab12ed83b192e2153 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessnotifications.v1.json @@ -0,0 +1,229 @@ +{ +"basePath": "", +"baseUrl": "https://mybusinessnotifications.googleapis.com/", +"batchPath": "batch", +"canonicalName": "My Business Notification Settings", +"description": "The My Business Notification Settings API enables managing notification settings for business accounts. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/my-business/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "mybusinessnotifications:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://mybusinessnotifications.mtls.googleapis.com/", +"name": "mybusinessnotifications", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"accounts": { +"methods": { +"getNotificationSetting": { +"description": "Returns the pubsub notification settings for the account.", +"flatPath": "v1/accounts/{accountsId}/notificationSetting", +"httpMethod": "GET", +"id": "mybusinessnotifications.accounts.getNotificationSetting", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the notification setting we are trying to fetch.", +"location": "path", +"pattern": "^accounts/[^/]+/notificationSetting$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "NotificationSetting" +} +}, +"updateNotificationSetting": { +"description": "Sets the pubsub notification setting for the account informing Google which topic to send pubsub notifications for. Use the notification_types field within notification_setting to manipulate the events an account wants to subscribe to. An account will only have one notification setting resource, and only one pubsub topic can be set. To delete the setting, update with an empty notification_types", +"flatPath": "v1/accounts/{accountsId}/notificationSetting", +"httpMethod": "PATCH", +"id": "mybusinessnotifications.accounts.updateNotificationSetting", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name this setting is for. This is of the form `accounts/{account_id}/notificationSetting`.", +"location": "path", +"pattern": "^accounts/[^/]+/notificationSetting$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields that should be updated. The only editable field is notification_setting.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "NotificationSetting" +}, +"response": { +"$ref": "NotificationSetting" +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://mybusinessnotifications.googleapis.com/", +"schemas": { +"NotificationSetting": { +"description": "A Google Pub/Sub topic where notifications can be published when a location is updated or has a new review. There will be only one notification setting resource per-account.", +"id": "NotificationSetting", +"properties": { +"name": { +"description": "Required. The resource name this setting is for. This is of the form `accounts/{account_id}/notificationSetting`.", +"type": "string" +}, +"notificationTypes": { +"description": "The types of notifications that will be sent to the Pub/Sub topic. To stop receiving notifications entirely, use NotificationSettings.UpdateNotificationSetting with an empty notification_types or set the pubsub_topic to an empty string.", +"items": { +"enum": [ +"NOTIFICATION_TYPE_UNSPECIFIED", +"GOOGLE_UPDATE", +"NEW_REVIEW", +"UPDATED_REVIEW", +"NEW_CUSTOMER_MEDIA", +"NEW_QUESTION", +"UPDATED_QUESTION", +"NEW_ANSWER", +"UPDATED_ANSWER", +"DUPLICATE_LOCATION", +"LOSS_OF_VOICE_OF_MERCHANT", +"VOICE_OF_MERCHANT_UPDATED" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false +], +"enumDescriptions": [ +"No notification type. Will not match any notifications.", +"The location has Google updates for review. The location_name field on the notification will provide the resource name of the location with Google updates.", +"A new review has been added to the location. The review_name field on the notification will provide the resource name of the review that was added, and location_name will have the location's resource name.", +"A review on the location has been updated. The review_name field on the notification will provide the resource name of the review that was added, and location_name will have the location's resource name.", +"A new media item has been added to the location by a Google Maps user. The notification will provide the resource name of the new media item.", +"A new question is added to the location. The notification will provide the resource name of question.", +"A question of the location is updated. The notification will provide the resource name of question.", +"A new answer is added to the location. The notification will provide the resource name of question and answer.", +"An answer of the location is updated. The notification will provide the resource name of question and answer.", +"Indicates whether there is a change in location metadata's duplicate location field.", +"Deprecated: Migrate the existing usages of this value to the more expanded \"VOICE_OF_MERCHANT_UPDATED\".", +"Indicates whether the location has an update in Voice of Merchant (VOM) status. VOM dictates whether the location is in good standing and the merchant has control over the business on Google. Any edits made to the location will propagate to Maps after passing the review phase. Call GetVoiceOfMerchantState rpc for more details." +], +"type": "string" +}, +"type": "array" +}, +"pubsubTopic": { +"description": "Optional. The Google Pub/Sub topic that will receive notifications when locations managed by this account are updated. If unset, no notifications will be posted. The account mybusiness-api-pubsub@system.gserviceaccount.com must have at least Publish permissions on the Pub/Sub topic.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "My Business Notifications API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessplaceactions.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessplaceactions.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..e21822562a05e4017c8f61f24e4494d7e4df5b59 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessplaceactions.v1.json @@ -0,0 +1,444 @@ +{ +"basePath": "", +"baseUrl": "https://mybusinessplaceactions.googleapis.com/", +"batchPath": "batch", +"canonicalName": "My Business Place Actions", +"description": "The My Business Place Actions API provides an interface for managing place action links of a location on Google. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/my-business/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "mybusinessplaceactions:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://mybusinessplaceactions.mtls.googleapis.com/", +"name": "mybusinessplaceactions", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"locations": { +"resources": { +"placeActionLinks": { +"methods": { +"create": { +"description": "Creates a place action link associated with the specified location, and returns it. The request is considered duplicate if the `parent`, `place_action_link.uri` and `place_action_link.place_action_type` are the same as a previous request.", +"flatPath": "v1/locations/{locationsId}/placeActionLinks", +"httpMethod": "POST", +"id": "mybusinessplaceactions.locations.placeActionLinks.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the location where to create this place action link. `locations/{location_id}`.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/placeActionLinks", +"request": { +"$ref": "PlaceActionLink" +}, +"response": { +"$ref": "PlaceActionLink" +} +}, +"delete": { +"description": "Deletes a place action link from the specified location.", +"flatPath": "v1/locations/{locationsId}/placeActionLinks/{placeActionLinksId}", +"httpMethod": "DELETE", +"id": "mybusinessplaceactions.locations.placeActionLinks.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the place action link to remove from the location.", +"location": "path", +"pattern": "^locations/[^/]+/placeActionLinks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +} +}, +"get": { +"description": "Gets the specified place action link.", +"flatPath": "v1/locations/{locationsId}/placeActionLinks/{placeActionLinksId}", +"httpMethod": "GET", +"id": "mybusinessplaceactions.locations.placeActionLinks.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the place action link to fetch.", +"location": "path", +"pattern": "^locations/[^/]+/placeActionLinks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PlaceActionLink" +} +}, +"list": { +"description": "Lists the place action links for the specified location.", +"flatPath": "v1/locations/{locationsId}/placeActionLinks", +"httpMethod": "GET", +"id": "mybusinessplaceactions.locations.placeActionLinks.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. A filter constraining the place action links to return. The response includes entries that match the filter. We support only the following filter: 1. place_action_type=XYZ where XYZ is a valid PlaceActionType.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. How many place action links to return per page. Default of 10. The minimum is 1.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If specified, returns the next page of place action links.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the location whose place action links will be listed. `locations/{location_id}`.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/placeActionLinks", +"response": { +"$ref": "ListPlaceActionLinksResponse" +} +}, +"patch": { +"description": "Updates the specified place action link and returns it.", +"flatPath": "v1/locations/{locationsId}/placeActionLinks/{placeActionLinksId}", +"httpMethod": "PATCH", +"id": "mybusinessplaceactions.locations.placeActionLinks.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Optional. The resource name, in the format `locations/{location_id}/placeActionLinks/{place_action_link_id}`. The name field will only be considered in UpdatePlaceActionLink and DeletePlaceActionLink requests for updating and deleting links respectively. However, it will be ignored in CreatePlaceActionLink request, where `place_action_link_id` will be assigned by the server on successful creation of a new link and returned as part of the response.", +"location": "path", +"pattern": "^locations/[^/]+/placeActionLinks/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields to update. The only editable fields are `uri`, `place_action_type` and `is_preferred`. If the updated link already exists at the same location with the same `place_action_type` and `uri`, fails with an `ALREADY_EXISTS` error.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "PlaceActionLink" +}, +"response": { +"$ref": "PlaceActionLink" +} +} +} +} +} +}, +"placeActionTypeMetadata": { +"methods": { +"list": { +"description": "Returns the list of available place action types for a location or country.", +"flatPath": "v1/placeActionTypeMetadata", +"httpMethod": "GET", +"id": "mybusinessplaceactions.placeActionTypeMetadata.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "Optional. A filter constraining the place action types to return metadata for. The response includes entries that match the filter. We support only the following filters: 1. location=XYZ where XYZ is a string indicating the resource name of a location, in the format `locations/{location_id}`. 2. region_code=XYZ where XYZ is a Unicode CLDR region code to find available action types. If no filter is provided, all place action types are returned.", +"location": "query", +"type": "string" +}, +"languageCode": { +"description": "Optional. The IETF BCP-47 code of language to get display names in. If this language is not available, they will be provided in English.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. How many action types to include per page. Default is 10, minimum is 1.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If specified, the next page of place action type metadata is retrieved. The `pageToken` is returned when a call to `placeActionTypeMetadata.list` returns more results than can fit into the requested page size.", +"location": "query", +"type": "string" +} +}, +"path": "v1/placeActionTypeMetadata", +"response": { +"$ref": "ListPlaceActionTypeMetadataResponse" +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://mybusinessplaceactions.googleapis.com/", +"schemas": { +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ListPlaceActionLinksResponse": { +"description": "Response message for PlaceActions.ListPlaceActionLinks.", +"id": "ListPlaceActionLinksResponse", +"properties": { +"nextPageToken": { +"description": "If there are more place action links than the requested page size, then this field is populated with a token to fetch the next page of results.", +"type": "string" +}, +"placeActionLinks": { +"description": "The returned list of place action links.", +"items": { +"$ref": "PlaceActionLink" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPlaceActionTypeMetadataResponse": { +"description": "Response message for PlaceActions.ListPlaceActionTypeMetadata.", +"id": "ListPlaceActionTypeMetadataResponse", +"properties": { +"nextPageToken": { +"description": "If the number of action types exceeded the requested page size, this field will be populated with a token to fetch the next page on a subsequent call to `placeActionTypeMetadata.list`. If there are no more results, this field will not be present in the response.", +"type": "string" +}, +"placeActionTypeMetadata": { +"description": "A collection of metadata for the available place action types.", +"items": { +"$ref": "PlaceActionTypeMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"PlaceActionLink": { +"description": "Represents a place action link and its attributes.", +"id": "PlaceActionLink", +"properties": { +"createTime": { +"description": "Output only. The time when the place action link was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"isEditable": { +"description": "Output only. Indicates whether this link can be edited by the client.", +"readOnly": true, +"type": "boolean" +}, +"isPreferred": { +"description": "Optional. Whether this link is preferred by the merchant. Only one link can be marked as preferred per place action type at a location. If a future request marks a different link as preferred for the same place action type, then the current preferred link (if any exists) will lose its preference.", +"type": "boolean" +}, +"name": { +"description": "Optional. The resource name, in the format `locations/{location_id}/placeActionLinks/{place_action_link_id}`. The name field will only be considered in UpdatePlaceActionLink and DeletePlaceActionLink requests for updating and deleting links respectively. However, it will be ignored in CreatePlaceActionLink request, where `place_action_link_id` will be assigned by the server on successful creation of a new link and returned as part of the response.", +"type": "string" +}, +"placeActionType": { +"description": "Required. The type of place action that can be performed using this link.", +"enum": [ +"PLACE_ACTION_TYPE_UNSPECIFIED", +"APPOINTMENT", +"ONLINE_APPOINTMENT", +"DINING_RESERVATION", +"FOOD_ORDERING", +"FOOD_DELIVERY", +"FOOD_TAKEOUT", +"SHOP_ONLINE" +], +"enumDescriptions": [ +"Not specified.", +"The action type is booking an appointment.", +"The action type is booking an online appointment.", +"The action type is making a dining reservation.", +"The action type is ordering food for delivery and/or takeout.", +"The action type is ordering food for delivery.", +"The action type is ordering food for takeout.", +"The action type is shopping, that can be delivery and/or pickup." +], +"type": "string" +}, +"providerType": { +"description": "Output only. Specifies the provider type.", +"enum": [ +"PROVIDER_TYPE_UNSPECIFIED", +"MERCHANT", +"AGGREGATOR_3P" +], +"enumDescriptions": [ +"Not specified.", +"A 1P provider such as a merchant, or an agency on behalf of a merchant.", +"A 3P aggregator, such as a `Reserve with Google` partner." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time when the place action link was last modified.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"uri": { +"description": "Required. The link uri. The same uri can be reused for different action types across different locations. However, only one place action link is allowed for each unique combination of (uri, place action type, location).", +"type": "string" +} +}, +"type": "object" +}, +"PlaceActionTypeMetadata": { +"description": "Metadata for supported place action types.", +"id": "PlaceActionTypeMetadata", +"properties": { +"displayName": { +"description": "The localized display name for the attribute, if available; otherwise, the English display name.", +"type": "string" +}, +"placeActionType": { +"description": "The place action type.", +"enum": [ +"PLACE_ACTION_TYPE_UNSPECIFIED", +"APPOINTMENT", +"ONLINE_APPOINTMENT", +"DINING_RESERVATION", +"FOOD_ORDERING", +"FOOD_DELIVERY", +"FOOD_TAKEOUT", +"SHOP_ONLINE" +], +"enumDescriptions": [ +"Not specified.", +"The action type is booking an appointment.", +"The action type is booking an online appointment.", +"The action type is making a dining reservation.", +"The action type is ordering food for delivery and/or takeout.", +"The action type is ordering food for delivery.", +"The action type is ordering food for takeout.", +"The action type is shopping, that can be delivery and/or pickup." +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "My Business Place Actions API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessqanda.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessqanda.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..497f4eedcc55d7f3d99508763a0a8b104b062d7f --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessqanda.v1.json @@ -0,0 +1,519 @@ +{ +"basePath": "", +"baseUrl": "https://mybusinessqanda.googleapis.com/", +"batchPath": "batch", +"canonicalName": "My Business Q&A", +"description": "The My Business Q&A API allows questions and answers to be posted for specific listings. Note - If you have a quota of 0 after enabling the API, please request for GBP API access.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/my-business/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "mybusinessqanda:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://mybusinessqanda.mtls.googleapis.com/", +"name": "mybusinessqanda", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"locations": { +"resources": { +"questions": { +"methods": { +"create": { +"description": "Adds a question for the specified location.", +"flatPath": "v1/locations/{locationsId}/questions", +"httpMethod": "POST", +"id": "mybusinessqanda.locations.questions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the location to write a question for.", +"location": "path", +"pattern": "^locations/[^/]+/questions$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}", +"request": { +"$ref": "Question" +}, +"response": { +"$ref": "Question" +} +}, +"delete": { +"description": "Deletes a specific question written by the current user.", +"flatPath": "v1/locations/{locationsId}/questions/{questionsId}", +"httpMethod": "DELETE", +"id": "mybusinessqanda.locations.questions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the question to delete.", +"location": "path", +"pattern": "^locations/[^/]+/questions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +} +}, +"list": { +"description": "Returns the paginated list of questions and some of its answers for a specified location. This operation is only valid if the specified location is verified.", +"flatPath": "v1/locations/{locationsId}/questions", +"httpMethod": "GET", +"id": "mybusinessqanda.locations.questions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"answersPerQuestion": { +"description": "Optional. How many answers to fetch per question. The default and maximum `answers_per_question` values are 10.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"filter": { +"description": "Optional. A filter constraining the questions to return. The only filter currently supported is \"ignore_answered=true\"", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order to return the questions. Valid options include 'update_time desc' and 'upvote_count desc', which will return the questions sorted descendingly by the requested field. The default sort order is 'update_time desc'.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. How many questions to fetch per page. The default and maximum `page_size` values are 10.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If specified, the next page of questions is retrieved.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the location to fetch questions for.", +"location": "path", +"pattern": "^locations/[^/]+/questions$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}", +"response": { +"$ref": "ListQuestionsResponse" +} +}, +"patch": { +"description": "Updates a specific question written by the current user.", +"flatPath": "v1/locations/{locationsId}/questions/{questionsId}", +"httpMethod": "PATCH", +"id": "mybusinessqanda.locations.questions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The unique name for the question. locations/*/questions/* This field will be ignored if set during question creation.", +"location": "path", +"pattern": "^locations/[^/]+/questions/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The specific fields to update. Only question text can be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Question" +}, +"response": { +"$ref": "Question" +} +} +}, +"resources": { +"answers": { +"methods": { +"delete": { +"description": "Deletes the answer written by the current user to a question.", +"flatPath": "v1/locations/{locationsId}/questions/{questionsId}/answers:delete", +"httpMethod": "DELETE", +"id": "mybusinessqanda.locations.questions.answers.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the question to delete an answer for.", +"location": "path", +"pattern": "^locations/[^/]+/questions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/answers:delete", +"response": { +"$ref": "Empty" +} +}, +"list": { +"description": "Returns the paginated list of answers for a specified question.", +"flatPath": "v1/locations/{locationsId}/questions/{questionsId}/answers", +"httpMethod": "GET", +"id": "mybusinessqanda.locations.questions.answers.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"orderBy": { +"description": "Optional. The order to return the answers. Valid options include 'update_time desc' and 'upvote_count desc', which will return the answers sorted descendingly by the requested field. The default sort order is 'update_time desc'.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. How many answers to fetch per page. The default and maximum `page_size` values are 10.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If specified, the next page of answers is retrieved.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the question to fetch answers for.", +"location": "path", +"pattern": "^locations/[^/]+/questions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/answers", +"response": { +"$ref": "ListAnswersResponse" +} +}, +"upsert": { +"description": "Creates an answer or updates the existing answer written by the user for the specified question. A user can only create one answer per question.", +"flatPath": "v1/locations/{locationsId}/questions/{questionsId}/answers:upsert", +"httpMethod": "POST", +"id": "mybusinessqanda.locations.questions.answers.upsert", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the question to write an answer for.", +"location": "path", +"pattern": "^locations/[^/]+/questions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/answers:upsert", +"request": { +"$ref": "UpsertAnswerRequest" +}, +"response": { +"$ref": "Answer" +} +} +} +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://mybusinessqanda.googleapis.com/", +"schemas": { +"Answer": { +"description": "Represents an answer to a question", +"id": "Answer", +"properties": { +"author": { +"$ref": "Author", +"description": "Output only. The author of the answer. Will only be set during list operations.", +"readOnly": true +}, +"createTime": { +"description": "Output only. The timestamp for when the answer was written. Only retrieved during ListResponse fetching.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The unique name for the answer locations/*/questions/*/answers/*", +"readOnly": true, +"type": "string" +}, +"text": { +"description": "Required. The text of the answer. It should contain at least one non-whitespace character. The maximum length is 4096 characters.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp for when the answer was last modified.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upvoteCount": { +"description": "Output only. The number of upvotes for the answer.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"Author": { +"description": "Represents the author of a question or answer", +"id": "Author", +"properties": { +"displayName": { +"description": "The display name of the user", +"type": "string" +}, +"profilePhotoUri": { +"description": "The profile photo URI of the user.", +"type": "string" +}, +"type": { +"description": "The type of user the author is.", +"enum": [ +"AUTHOR_TYPE_UNSPECIFIED", +"REGULAR_USER", +"LOCAL_GUIDE", +"MERCHANT" +], +"enumDescriptions": [ +"This should not be used.", +"A regular user.", +"A Local Guide", +"The owner/manager of the location" +], +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ListAnswersResponse": { +"description": "Response message for QuestionsAndAnswers.ListAnswers", +"id": "ListAnswersResponse", +"properties": { +"answers": { +"description": "The requested answers.", +"items": { +"$ref": "Answer" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If the number of answers exceeds the requested max page size, this field is populated with a token to fetch the next page of answers on a subsequent call. If there are no more answers, this field is not present in the response.", +"type": "string" +}, +"totalSize": { +"description": "The total number of answers posted for this question across all pages.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListQuestionsResponse": { +"description": "Response message for QuestionsAndAnswers.ListQuestions", +"id": "ListQuestionsResponse", +"properties": { +"nextPageToken": { +"description": "If the number of questions exceeds the requested max page size, this field is populated with a token to fetch the next page of questions on a subsequent call. If there are no more questions, this field is not present in the response.", +"type": "string" +}, +"questions": { +"description": "The requested questions,", +"items": { +"$ref": "Question" +}, +"type": "array" +}, +"totalSize": { +"description": "The total number of questions posted for this location across all pages.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Question": { +"description": "Represents a single question and some of its answers.", +"id": "Question", +"properties": { +"author": { +"$ref": "Author", +"description": "Output only. The author of the question.", +"readOnly": true +}, +"createTime": { +"description": "Output only. The timestamp for when the question was written.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The unique name for the question. locations/*/questions/* This field will be ignored if set during question creation.", +"type": "string" +}, +"text": { +"description": "Required. The text of the question. It should contain at least three words and the total length should be greater than or equal to 10 characters. The maximum length is 4096 characters.", +"type": "string" +}, +"topAnswers": { +"description": "Output only. A list of answers to the question, sorted by upvotes. This may not be a complete list of answers depending on the request parameters (answers_per_question)", +"items": { +"$ref": "Answer" +}, +"readOnly": true, +"type": "array" +}, +"totalAnswerCount": { +"description": "Output only. The total number of answers posted for this question.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"updateTime": { +"description": "Output only. The timestamp for when the question was last modified.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upvoteCount": { +"description": "Output only. The number of upvotes for the question.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"UpsertAnswerRequest": { +"description": "Request message for QuestionsAndAnswers.UpsertAnswer", +"id": "UpsertAnswerRequest", +"properties": { +"answer": { +"$ref": "Answer", +"description": "Required. The new answer." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "My Business Q&A API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessverifications.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessverifications.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..34bc783d8df4355a8e1420e1f003491a587fef6c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/mybusinessverifications.v1.json @@ -0,0 +1,678 @@ +{ +"basePath": "", +"baseUrl": "https://mybusinessverifications.googleapis.com/", +"batchPath": "batch", +"canonicalName": "My Business Verifications", +"description": "The My Business Verifications API provides an interface for taking verifications related actions for locations.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/my-business/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "mybusinessverifications:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://mybusinessverifications.mtls.googleapis.com/", +"name": "mybusinessverifications", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"locations": { +"methods": { +"fetchVerificationOptions": { +"description": "Reports all eligible verification options for a location in a specific language.", +"flatPath": "v1/locations/{locationsId}:fetchVerificationOptions", +"httpMethod": "POST", +"id": "mybusinessverifications.locations.fetchVerificationOptions", +"parameterOrder": [ +"location" +], +"parameters": { +"location": { +"description": "Required. The location to verify.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+location}:fetchVerificationOptions", +"request": { +"$ref": "FetchVerificationOptionsRequest" +}, +"response": { +"$ref": "FetchVerificationOptionsResponse" +} +}, +"getVoiceOfMerchantState": { +"description": "Gets the VoiceOfMerchant state.", +"flatPath": "v1/locations/{locationsId}/VoiceOfMerchantState", +"httpMethod": "GET", +"id": "mybusinessverifications.locations.getVoiceOfMerchantState", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the location.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/VoiceOfMerchantState", +"response": { +"$ref": "VoiceOfMerchantState" +} +}, +"verify": { +"description": "Starts the verification process for a location.", +"flatPath": "v1/locations/{locationsId}:verify", +"httpMethod": "POST", +"id": "mybusinessverifications.locations.verify", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the location to verify.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:verify", +"request": { +"$ref": "VerifyLocationRequest" +}, +"response": { +"$ref": "VerifyLocationResponse" +} +} +}, +"resources": { +"verifications": { +"methods": { +"complete": { +"description": "Completes a `PENDING` verification. It is only necessary for non `AUTO` verification methods. `AUTO` verification request is instantly `VERIFIED` upon creation.", +"flatPath": "v1/locations/{locationsId}/verifications/{verificationsId}:complete", +"httpMethod": "POST", +"id": "mybusinessverifications.locations.verifications.complete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the verification to complete.", +"location": "path", +"pattern": "^locations/[^/]+/verifications/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:complete", +"request": { +"$ref": "CompleteVerificationRequest" +}, +"response": { +"$ref": "CompleteVerificationResponse" +} +}, +"list": { +"description": "List verifications of a location, ordered by create time.", +"flatPath": "v1/locations/{locationsId}/verifications", +"httpMethod": "GET", +"id": "mybusinessverifications.locations.verifications.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "How many verification to include per page. Minimum is 1, and the default and maximum page size is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If specified, returns the next page of verifications.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the location that verification requests belong to.", +"location": "path", +"pattern": "^locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/verifications", +"response": { +"$ref": "ListVerificationsResponse" +} +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://mybusinessverifications.googleapis.com/", +"schemas": { +"AddressVerificationData": { +"description": "Display data for verifications through postcard.", +"id": "AddressVerificationData", +"properties": { +"address": { +"$ref": "PostalAddress", +"description": "Address that a postcard can be sent to." +}, +"business": { +"description": "Merchant's business name.", +"type": "string" +}, +"expectedDeliveryDaysRegion": { +"description": "Expected number of days it takes to deliver a postcard to the address's region.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"CompleteVerificationRequest": { +"description": "Request message for Verifications.CompleteVerificationAction.", +"id": "CompleteVerificationRequest", +"properties": { +"pin": { +"description": "Required. PIN code received by the merchant to complete the verification.", +"type": "string" +} +}, +"type": "object" +}, +"CompleteVerificationResponse": { +"description": "Response message for Verifications.CompleteVerificationAction.", +"id": "CompleteVerificationResponse", +"properties": { +"verification": { +"$ref": "Verification", +"description": "The completed verification." +} +}, +"type": "object" +}, +"ComplyWithGuidelines": { +"description": "Indicates that the location fails to comply with our [guidelines](https://support.google.com/business/answer/3038177).", +"id": "ComplyWithGuidelines", +"properties": { +"recommendationReason": { +"description": "The reason why the location is being recommended to comply with guidelines.", +"enum": [ +"RECOMMENDATION_REASON_UNSPECIFIED", +"BUSINESS_LOCATION_SUSPENDED", +"BUSINESS_LOCATION_DISABLED" +], +"enumDescriptions": [ +"Not specified.", +"The business location is suspended. To fix this issue, consult the [Help Center article](https://support.google.com/business/answer/4569145).", +"The business location is disabled. To fix this issue, consult the [Help Center article](https://support.google.com/business/answer/9334246)." +], +"type": "string" +} +}, +"type": "object" +}, +"EmailVerificationData": { +"description": "Display data for verifications through email.", +"id": "EmailVerificationData", +"properties": { +"domain": { +"description": "Domain name in the email address. e.g. \"gmail.com\" in foo@gmail.com", +"type": "string" +}, +"isUserNameEditable": { +"description": "Whether client is allowed to provide a different user name.", +"type": "boolean" +}, +"user": { +"description": "User name in the email address. e.g. \"foo\" in foo@gmail.com", +"type": "string" +} +}, +"type": "object" +}, +"FetchVerificationOptionsRequest": { +"description": "Request message for Verifications.FetchVerificationOptions.", +"id": "FetchVerificationOptionsRequest", +"properties": { +"context": { +"$ref": "ServiceBusinessContext", +"description": "Optional. Extra context information for the verification of service businesses. Can only be applied to the locations whose business type is CUSTOMER_LOCATION_ONLY. Specifying an accurate address could enable more options. INVALID_ARGUMENT will be thrown if it is set for other business types of locations." +}, +"languageCode": { +"description": "Required. The BCP 47 language code representing the language that is to be used for the verification process. Available options vary by language.", +"type": "string" +} +}, +"type": "object" +}, +"FetchVerificationOptionsResponse": { +"description": "Response message for Verifications.FetchVerificationOptions.", +"id": "FetchVerificationOptionsResponse", +"properties": { +"options": { +"description": "The available verification options.", +"items": { +"$ref": "VerificationOption" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVerificationsResponse": { +"description": "Response message for Verifications.ListVerifications.", +"id": "ListVerificationsResponse", +"properties": { +"nextPageToken": { +"description": "If the number of verifications exceeded the requested page size, this field will be populated with a token to fetch the next page of verification on a subsequent call. If there are no more attributes, this field will not be present in the response.", +"type": "string" +}, +"verifications": { +"description": "List of the verifications.", +"items": { +"$ref": "Verification" +}, +"type": "array" +} +}, +"type": "object" +}, +"PostalAddress": { +"description": "Represents a postal address, e.g. for postal delivery or payments addresses. Given a postal address, a postal service can deliver items to a premise, P.O. Box or similar. It is not intended to model geographical locations (roads, towns, mountains). In typical usage an address would be created via user input or from importing existing data, depending on the type of process. Advice on address input / editing: - Use an internationalization-ready address widget such as https://github.com/google/libaddressinput) - Users should not be presented with UI elements for input or editing of fields outside countries where that field is used. For more guidance on how to use this schema, please see: https://support.google.com/business/answer/6397478", +"id": "PostalAddress", +"properties": { +"addressLines": { +"description": "Unstructured address lines describing the lower levels of an address. Because values in address_lines do not have type information and may sometimes contain multiple values in a single field (e.g. \"Austin, TX\"), it is important that the line order is clear. The order of address lines should be \"envelope order\" for the country/region of the address. In places where this can vary (e.g. Japan), address_language is used to make it explicit (e.g. \"ja\" for large-to-small ordering and \"ja-Latn\" or \"en\" for small-to-large). This way, the most specific line of an address can be selected based on the language. The minimum permitted structural representation of an address consists of a region_code with all remaining information placed in the address_lines. It would be possible to format such an address very approximately without geocoding, but no semantic reasoning could be made about any of the address components until it was at least partially resolved. Creating an address only containing a region_code and address_lines, and then geocoding is the recommended way to handle completely unstructured addresses (as opposed to guessing which parts of the address should be localities or administrative areas).", +"items": { +"type": "string" +}, +"type": "array" +}, +"administrativeArea": { +"description": "Optional. Highest administrative subdivision which is used for postal addresses of a country or region. For example, this can be a state, a province, an oblast, or a prefecture. Specifically, for Spain this is the province and not the autonomous community (e.g. \"Barcelona\" and not \"Catalonia\"). Many countries don't use an administrative area in postal addresses. E.g. in Switzerland this should be left unpopulated.", +"type": "string" +}, +"languageCode": { +"description": "Optional. BCP-47 language code of the contents of this address (if known). This is often the UI language of the input form or is expected to match one of the languages used in the address' country/region, or their transliterated equivalents. This can affect formatting in certain countries, but is not critical to the correctness of the data and will never affect any validation or other non-formatting related operations. If this value is not known, it should be omitted (rather than specifying a possibly incorrect default). Examples: \"zh-Hant\", \"ja\", \"ja-Latn\", \"en\".", +"type": "string" +}, +"locality": { +"description": "Optional. Generally refers to the city/town portion of the address. Examples: US city, IT comune, UK post town. In regions of the world where localities are not well defined or do not fit into this structure well, leave locality empty and use address_lines.", +"type": "string" +}, +"organization": { +"description": "Optional. The name of the organization at the address.", +"type": "string" +}, +"postalCode": { +"description": "Optional. Postal code of the address. Not all countries use or require postal codes to be present, but where they are used, they may trigger additional validation with other parts of the address (e.g. state/zip validation in the U.S.A.).", +"type": "string" +}, +"recipients": { +"description": "Optional. The recipient at the address. This field may, under certain circumstances, contain multiline information. For example, it might contain \"care of\" information.", +"items": { +"type": "string" +}, +"type": "array" +}, +"regionCode": { +"description": "Required. CLDR region code of the country/region of the address. This is never inferred and it is up to the user to ensure the value is correct. See https://cldr.unicode.org/ and https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html for details. Example: \"CH\" for Switzerland.", +"type": "string" +}, +"revision": { +"description": "The schema revision of the `PostalAddress`. This must be set to 0, which is the latest revision. All new revisions **must** be backward compatible with old revisions.", +"format": "int32", +"type": "integer" +}, +"sortingCode": { +"description": "Optional. Additional, country-specific, sorting code. This is not used in most regions. Where it is used, the value is either a string like \"CEDEX\", optionally followed by a number (e.g. \"CEDEX 7\"), or just a number alone, representing the \"sector code\" (Jamaica), \"delivery area indicator\" (Malawi) or \"post office indicator\" (e.g. C\u00f4te d'Ivoire).", +"type": "string" +}, +"sublocality": { +"description": "Optional. Sublocality of the address. For example, this can be neighborhoods, boroughs, districts.", +"type": "string" +} +}, +"type": "object" +}, +"ResolveOwnershipConflict": { +"description": "Indicates that the location duplicates another location that is in good standing.", +"id": "ResolveOwnershipConflict", +"properties": {}, +"type": "object" +}, +"ServiceBusinessContext": { +"description": "Additional data for service business verification.", +"id": "ServiceBusinessContext", +"properties": { +"address": { +"$ref": "PostalAddress", +"description": "The verification address of the location. It is used to either enable more verification options or send a postcard." +} +}, +"type": "object" +}, +"Verification": { +"description": "A verification represents a verification attempt on a location.", +"id": "Verification", +"properties": { +"announcement": { +"description": "Optional. Response announcement set only if the method is VETTED_PARTNER.", +"type": "string" +}, +"createTime": { +"description": "The timestamp when the verification is requested.", +"format": "google-datetime", +"type": "string" +}, +"method": { +"description": "The method of the verification.", +"enum": [ +"VERIFICATION_METHOD_UNSPECIFIED", +"ADDRESS", +"EMAIL", +"PHONE_CALL", +"SMS", +"AUTO", +"VETTED_PARTNER" +], +"enumDescriptions": [ +"Default value, will result in errors.", +"Send a postcard with a verification PIN to a specific mailing address. The PIN is used to complete verification with Google.", +"Send an email with a verification PIN to a specific email address. The PIN is used to complete verification with Google.", +"Make a phone call with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", +"Send an SMS with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", +"Verify the location without additional user action. This option may not be available for all locations.", +"This option may not be available for all locations." +], +"type": "string" +}, +"name": { +"description": "Resource name of the verification.", +"type": "string" +}, +"state": { +"description": "The state of the verification.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"COMPLETED", +"FAILED" +], +"enumDescriptions": [ +"Default value, will result in errors.", +"The verification is pending.", +"The verification is completed.", +"The verification is failed." +], +"type": "string" +} +}, +"type": "object" +}, +"VerificationOption": { +"description": "The verification option represents how to verify the location (indicated by verification method) and where the verification will be sent to (indicated by display data).", +"id": "VerificationOption", +"properties": { +"addressData": { +"$ref": "AddressVerificationData", +"description": "Set only if the method is MAIL." +}, +"announcement": { +"description": "Set only if the method is VETTED_PARTNER.", +"type": "string" +}, +"emailData": { +"$ref": "EmailVerificationData", +"description": "Set only if the method is EMAIL." +}, +"phoneNumber": { +"description": "Set only if the method is PHONE_CALL or SMS. Phone number that the PIN will be sent to.", +"type": "string" +}, +"verificationMethod": { +"description": "Method to verify the location.", +"enum": [ +"VERIFICATION_METHOD_UNSPECIFIED", +"ADDRESS", +"EMAIL", +"PHONE_CALL", +"SMS", +"AUTO", +"VETTED_PARTNER" +], +"enumDescriptions": [ +"Default value, will result in errors.", +"Send a postcard with a verification PIN to a specific mailing address. The PIN is used to complete verification with Google.", +"Send an email with a verification PIN to a specific email address. The PIN is used to complete verification with Google.", +"Make a phone call with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", +"Send an SMS with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", +"Verify the location without additional user action. This option may not be available for all locations.", +"This option may not be available for all locations." +], +"type": "string" +} +}, +"type": "object" +}, +"VerificationToken": { +"description": "Token generated by a vetted [partner](https://support.google.com/business/answer/7674102).", +"id": "VerificationToken", +"properties": { +"tokenString": { +"description": "The token string.", +"type": "string" +} +}, +"type": "object" +}, +"Verify": { +"description": "Indicates that the location requires verification. Contains information about the current verification actions performed on the location.", +"id": "Verify", +"properties": { +"hasPendingVerification": { +"description": "Indicates whether a verification process has already started, and can be completed by the location.", +"type": "boolean" +} +}, +"type": "object" +}, +"VerifyLocationRequest": { +"description": "Request message for Verifications.VerifyLocation.", +"id": "VerifyLocationRequest", +"properties": { +"context": { +"$ref": "ServiceBusinessContext", +"description": "Optional. Extra context information for the verification of service businesses. It is only required for the locations whose business type is CUSTOMER_LOCATION_ONLY. For ADDRESS verification, the address will be used to send out postcard. For other methods, it should be the same as the one that is passed to GetVerificationOptions. INVALID_ARGUMENT will be thrown if it is set for other types of business locations." +}, +"emailAddress": { +"description": "Optional. The input for EMAIL method. Email address where the PIN should be sent to. An email address is accepted only if it is one of the addresses provided by FetchVerificationOptions. If the EmailVerificationData has is_user_name_editable set to true, the client may specify a different user name (local-part) but must match the domain name.", +"type": "string" +}, +"languageCode": { +"description": "Optional. The BCP 47 language code representing the language that is to be used for the verification process.", +"type": "string" +}, +"mailerContact": { +"description": "Optional. The input for ADDRESS method. Contact name the mail should be sent to.", +"type": "string" +}, +"method": { +"description": "Required. Verification method.", +"enum": [ +"VERIFICATION_METHOD_UNSPECIFIED", +"ADDRESS", +"EMAIL", +"PHONE_CALL", +"SMS", +"AUTO", +"VETTED_PARTNER" +], +"enumDescriptions": [ +"Default value, will result in errors.", +"Send a postcard with a verification PIN to a specific mailing address. The PIN is used to complete verification with Google.", +"Send an email with a verification PIN to a specific email address. The PIN is used to complete verification with Google.", +"Make a phone call with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", +"Send an SMS with a verification PIN to a specific phone number. The PIN is used to complete verification with Google.", +"Verify the location without additional user action. This option may not be available for all locations.", +"This option may not be available for all locations." +], +"type": "string" +}, +"phoneNumber": { +"description": "Optional. The input for PHONE_CALL/SMS method The phone number that should be called or be sent SMS to. It must be one of the phone numbers in the eligible options.", +"type": "string" +}, +"token": { +"$ref": "VerificationToken", +"description": "Optional. The input for VETTED_PARTNER method available to select [partners.](https://support.google.com/business/answer/7674102) The input is not needed for a vetted account. Token that is associated to the location. Token that is associated to the location." +} +}, +"type": "object" +}, +"VerifyLocationResponse": { +"description": "Response message for Verifications.VerifyLocation.", +"id": "VerifyLocationResponse", +"properties": { +"verification": { +"$ref": "Verification", +"description": "The created verification request." +} +}, +"type": "object" +}, +"VoiceOfMerchantState": { +"description": "Response message for VoiceOfMerchant.GetVoiceOfMerchantState.", +"id": "VoiceOfMerchantState", +"properties": { +"complyWithGuidelines": { +"$ref": "ComplyWithGuidelines", +"description": "The location fails to comply with our [guidelines](https://support.google.com/business/answer/3038177) and requires additional steps for reinstatement. To fix this issue, consult the [Help Center Article](https://support.google.com/business/answer/4569145)." +}, +"hasBusinessAuthority": { +"description": "Indicates whether the location has the authority (ownership) over the business on Google. If true, another location cannot take over and become the dominant listing on Maps. However, edits will not become live unless Voice of Merchant is gained (i.e. has_voice_of_merchant is true).", +"type": "boolean" +}, +"hasVoiceOfMerchant": { +"description": "Indicates whether the location is in good standing and has control over the business on Google. Any edits made to the location will propagate to Maps after passing the review phase.", +"type": "boolean" +}, +"resolveOwnershipConflict": { +"$ref": "ResolveOwnershipConflict", +"description": "This location duplicates another location that is in good standing. If you have access to the location in good standing, use that location's id to perform operations. Otherwise, request access from the current owner." +}, +"verify": { +"$ref": "Verify", +"description": "Start or continue the verification process." +}, +"waitForVoiceOfMerchant": { +"$ref": "WaitForVoiceOfMerchant", +"description": "Wait to gain Voice of Merchant. The location is under review for quality purposes." +} +}, +"type": "object" +}, +"WaitForVoiceOfMerchant": { +"description": "Indicates that the location will gain voice of merchant after passing review.", +"id": "WaitForVoiceOfMerchant", +"properties": {}, +"type": "object" +} +}, +"servicePath": "", +"title": "My Business Verifications API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkconnectivity.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkconnectivity.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..9edade32fd2b5b7cf988fc58590a7f67e5fb5c36 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkconnectivity.v1.json @@ -0,0 +1,4893 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networkconnectivity.googleapis.com/", +"batchPath": "batch", +"canonicalName": "networkconnectivity", +"description": "This API enables connectivity with and between Google Cloud resources.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networkconnectivity:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networkconnectivity.mtls.googleapis.com/", +"name": "networkconnectivity", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"global": { +"resources": { +"hubs": { +"methods": { +"acceptSpoke": { +"description": "Accepts a proposal to attach a Network Connectivity Center spoke to a hub.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}:acceptSpoke", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.acceptSpoke", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the hub into which to accept the spoke.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:acceptSpoke", +"request": { +"$ref": "AcceptHubSpokeRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Network Connectivity Center hub in the specified project.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"hubId": { +"description": "Required. A unique identifier for the hub.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/hubs", +"request": { +"$ref": "Hub" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Network Connectivity Center hub.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.global.hubs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the hub to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details about a Network Connectivity Center hub.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the hub resource to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Hub" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the Network Connectivity Center hubs associated with a given project.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/hubs", +"response": { +"$ref": "ListHubsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listSpokes": { +"description": "Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}:listSpokes", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.listSpokes", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of results.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the hub.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "Sort the results by name or create_time.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"spokeLocations": { +"description": "A list of locations. Specify one of the following: `[global]`, a single region (for example, `[us-central1]`), or a combination of values (for example, `[global, us-central1, us-west1]`). If the spoke_locations field is populated, the list of results includes only spokes in the specified location. If the spoke_locations field is not populated, the list of results includes spokes in all locations.", +"location": "query", +"repeated": true, +"type": "string" +}, +"view": { +"description": "The view of the spoke to return. The view that you use determines which spoke fields are included in the response.", +"enum": [ +"SPOKE_VIEW_UNSPECIFIED", +"BASIC", +"DETAILED" +], +"enumDescriptions": [ +"The spoke view is unspecified. When the spoke view is unspecified, the API returns the same fields as the `BASIC` view.", +"Includes `name`, `create_time`, `hub`, `unique_id`, `state`, `reasons`, and `spoke_type`. This is the default value.", +"Includes all spoke fields except `labels`. You can use the `DETAILED` view only when you set the `spoke_locations` field to `[global]`." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:listSpokes", +"response": { +"$ref": "ListHubSpokesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the description and/or labels of a Network Connectivity Center hub.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.global.hubs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of the hub. Hub names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. In the case of an update to an existing hub, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Hub" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rejectSpoke": { +"description": "Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the `ACTIVE` state, it transitions to the `INACTIVE` state and is no longer able to connect to other spokes that are attached to the hub.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}:rejectSpoke", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.rejectSpoke", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the hub from which to reject the spoke.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:rejectSpoke", +"request": { +"$ref": "RejectHubSpokeRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"groups": { +"methods": { +"get": { +"description": "Gets details about a Network Connectivity Center group.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups/{groupsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.groups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the route table resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Group" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups/{groupsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.groups.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists groups in a given hub.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.groups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/groups", +"response": { +"$ref": "ListGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups/{groupsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.groups.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/groups/{groupsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.groups.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"routeTables": { +"methods": { +"get": { +"description": "Gets details about a Network Connectivity Center route table.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/routeTables/{routeTablesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.routeTables.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the route table resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/routeTables/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "RouteTable" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists route tables in a given hub.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/routeTables", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.routeTables.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/routeTables", +"response": { +"$ref": "ListRouteTablesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"routes": { +"methods": { +"get": { +"description": "Gets details about the specified route.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/routeTables/{routeTablesId}/routes/{routesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.routeTables.routes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the route resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/routeTables/[^/]+/routes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Route" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists routes in a given route table.", +"flatPath": "v1/projects/{projectsId}/locations/global/hubs/{hubsId}/routeTables/{routeTablesId}/routes", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.routeTables.routes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+/routeTables/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/routes", +"response": { +"$ref": "ListRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"policyBasedRoutes": { +"methods": { +"create": { +"description": "Creates a new policy-based route in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.policyBasedRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource's name of the PolicyBasedRoute.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +}, +"policyBasedRouteId": { +"description": "Required. Unique id for the policy-based route to create.", +"location": "query", +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/policyBasedRoutes", +"request": { +"$ref": "PolicyBasedRoute" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single policy-based route.", +"flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.global.policyBasedRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the policy-based route resource to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single policy-based route.", +"flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.policyBasedRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the PolicyBasedRoute resource to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PolicyBasedRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.policyBasedRoutes.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists policy-based routes in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.policyBasedRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/policyBasedRoutes", +"response": { +"$ref": "ListPolicyBasedRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.policyBasedRoutes.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/global/policyBasedRoutes/{policyBasedRoutesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.policyBasedRoutes.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/policyBasedRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"internalRanges": { +"methods": { +"create": { +"description": "Creates a new internal range in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.internalRanges.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"internalRangeId": { +"description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name of the internal range.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/internalRanges", +"request": { +"$ref": "InternalRange" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single internal range.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.internalRanges.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the internal range to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single internal range.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.internalRanges.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InternalRange to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "InternalRange" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists internal ranges in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.internalRanges.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/internalRanges", +"response": { +"$ref": "ListInternalRangesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single internal range.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.internalRanges.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the InternalRange resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "InternalRange" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "GoogleLongrunningCancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceClasses": { +"methods": { +"delete": { +"description": "Deletes a single ServiceClass.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.serviceClasses.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the ServiceClass to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceClass.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceClasses.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServiceClass to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ServiceClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceClasses.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceClasses in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceClasses.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/serviceClasses", +"response": { +"$ref": "ListServiceClassesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ServiceClass.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.serviceClasses.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceClass resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ServiceClass" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceClasses.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceClasses/{serviceClassesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceClasses.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceConnectionMaps": { +"methods": { +"create": { +"description": "Creates a new ServiceConnectionMap in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource's name of the ServiceConnectionMap. ex. projects/123/locations/us-east1", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"serviceConnectionMapId": { +"description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionMaps/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/serviceConnectionMaps", +"request": { +"$ref": "ServiceConnectionMap" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServiceConnectionMap.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the ServiceConnectionMap to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceConnectionMap.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServiceConnectionMap to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ServiceConnectionMap" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceConnectionMaps in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/serviceConnectionMaps", +"response": { +"$ref": "ListServiceConnectionMapsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ServiceConnectionMap.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: https://google.aip.dev/122#fields-representing-resource-names", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionMap resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ServiceConnectionMap" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionMaps/{serviceConnectionMapsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceConnectionMaps.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionMaps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceConnectionPolicies": { +"methods": { +"create": { +"description": "Creates a new ServiceConnectionPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource's name of the ServiceConnectionPolicy. ex. projects/123/locations/us-east1", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"serviceConnectionPolicyId": { +"description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/serviceConnectionPolicies/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/serviceConnectionPolicies", +"request": { +"$ref": "ServiceConnectionPolicy" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServiceConnectionPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the ServiceConnectionPolicy to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceConnectionPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServiceConnectionPolicy to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ServiceConnectionPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceConnectionPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/serviceConnectionPolicies", +"response": { +"$ref": "ListServiceConnectionPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ServiceConnectionPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceConnectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ServiceConnectionPolicy" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionPolicies/{serviceConnectionPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceConnectionPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceConnectionTokens": { +"methods": { +"create": { +"description": "Creates a new ServiceConnectionToken in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.serviceConnectionTokens.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource's name of the ServiceConnectionToken. ex. projects/123/locations/us-east1", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"serviceConnectionTokenId": { +"description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/ServiceConnectionTokens/foo') See https://google.aip.dev/122#resource-id-segments Unique per location. If one is not provided, one will be generated.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/serviceConnectionTokens", +"request": { +"$ref": "ServiceConnectionToken" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServiceConnectionToken.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens/{serviceConnectionTokensId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.serviceConnectionTokens.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the ServiceConnectionToken to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionTokens/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceConnectionToken.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens/{serviceConnectionTokensId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionTokens.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServiceConnectionToken to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceConnectionTokens/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ServiceConnectionToken" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceConnectionTokens in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceConnectionTokens", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.serviceConnectionTokens.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name. ex. projects/123/locations/us-east1", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/serviceConnectionTokens", +"response": { +"$ref": "ListServiceConnectionTokensResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"spokes": { +"methods": { +"create": { +"description": "Creates a Network Connectivity Center spoke.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.spokes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"spokeId": { +"description": "Required. Unique id for the spoke to create.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/spokes", +"request": { +"$ref": "Spoke" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Network Connectivity Center spoke.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.spokes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the spoke to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details about a Network Connectivity Center spoke.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.spokes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the spoke resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Spoke" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.spokes.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the Network Connectivity Center spokes in a specified project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.spokes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/spokes", +"response": { +"$ref": "ListSpokesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a Network Connectivity Center spoke.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.spokes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of the spoke. Spoke names must be unique. They use the following form: `projects/{project_number}/locations/{region}/spokes/{spoke_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Spoke" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.spokes.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.spokes.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240313", +"rootUrl": "https://networkconnectivity.googleapis.com/", +"schemas": { +"AcceptHubSpokeRequest": { +"description": "The request for HubService.AcceptHubSpoke.", +"id": "AcceptHubSpokeRequest", +"properties": { +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +}, +"spokeUri": { +"description": "Required. The URI of the spoke to accept into the hub.", +"type": "string" +} +}, +"type": "object" +}, +"AcceptHubSpokeResponse": { +"description": "The response for HubService.AcceptHubSpoke.", +"id": "AcceptHubSpokeResponse", +"properties": { +"spoke": { +"$ref": "Spoke", +"description": "The spoke that was operated on." +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"ConsumerPscConfig": { +"description": "Allow the producer to specify which consumers can connect to it.", +"id": "ConsumerPscConfig", +"properties": { +"disableGlobalAccess": { +"description": "This is used in PSC consumer ForwardingRule to control whether the PSC endpoint can be accessed from another region.", +"type": "boolean" +}, +"network": { +"description": "The resource path of the consumer network where PSC connections are allowed to be created in. Note, this network does not need be in the ConsumerPscConfig.project in the case of SharedVPC. Example: projects/{projectNumOrId}/global/networks/{networkId}.", +"type": "string" +}, +"project": { +"description": "The consumer project where PSC connections are allowed to be created in.", +"type": "string" +}, +"state": { +"description": "Output only. Overall state of PSC Connections management for this consumer psc config.", +"enum": [ +"STATE_UNSPECIFIED", +"VALID", +"CONNECTION_POLICY_MISSING", +"POLICY_LIMIT_REACHED" +], +"enumDescriptions": [ +"Default state, when Connection Map is created initially.", +"Set when policy and map configuration is valid, and their matching can lead to allowing creation of PSC Connections subject to other constraints like connections limit.", +"No Service Connection Policy found for this network and Service Class", +"Service Connection Policy limit reached for this network and Service Class" +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ConsumerPscConnection": { +"description": "PSC connection details on consumer side.", +"id": "ConsumerPscConnection", +"properties": { +"error": { +"$ref": "GoogleRpcStatus", +"deprecated": true, +"description": "The most recent error during operating this connection." +}, +"errorInfo": { +"$ref": "GoogleRpcErrorInfo", +"description": "Output only. The error info for the latest error during operating this connection.", +"readOnly": true +}, +"errorType": { +"description": "The error type indicates whether the error is consumer facing, producer facing or system internal.", +"enum": [ +"CONNECTION_ERROR_TYPE_UNSPECIFIED", +"ERROR_INTERNAL", +"ERROR_CONSUMER_SIDE", +"ERROR_PRODUCER_SIDE" +], +"enumDescriptions": [ +"An invalid error type as the default case.", +"The error is due to Service Automation system internal.", +"The error is due to the setup on consumer side.", +"The error is due to the setup on producer side." +], +"type": "string" +}, +"forwardingRule": { +"description": "The URI of the consumer forwarding rule created. Example: projects/{projectNumOrId}/regions/us-east1/networks/{resourceId}.", +"type": "string" +}, +"gceOperation": { +"description": "The last Compute Engine operation to setup PSC connection.", +"type": "string" +}, +"ip": { +"description": "The IP literal allocated on the consumer network for the PSC forwarding rule that is created to connect to the producer service attachment in this service connection map.", +"type": "string" +}, +"network": { +"description": "The consumer network whose PSC forwarding rule is connected to the service attachments in this service connection map. Note that the network could be on a different project (shared VPC).", +"type": "string" +}, +"project": { +"description": "The consumer project whose PSC forwarding rule is connected to the service attachments in this service connection map.", +"type": "string" +}, +"pscConnectionId": { +"description": "The PSC connection id of the PSC forwarding rule connected to the service attachments in this service connection map.", +"type": "string" +}, +"selectedSubnetwork": { +"description": "Output only. The URI of the selected subnetwork selected to allocate IP address for this connection.", +"readOnly": true, +"type": "string" +}, +"serviceAttachmentUri": { +"description": "The URI of a service attachment which is the target of the PSC connection.", +"type": "string" +}, +"state": { +"description": "The state of the PSC connection.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"FAILED", +"CREATING", +"DELETING" +], +"enumDescriptions": [ +"An invalid state as the default case.", +"The connection is fully established and ready to use.", +"The connection is not functional since some resources on the connection fail to be created.", +"The connection is being created.", +"The connection is being deleted." +], +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"Filter": { +"description": "Filter matches L4 traffic.", +"id": "Filter", +"properties": { +"destRange": { +"description": "Optional. The destination IP range of outgoing packets that this policy-based route applies to. Default is \"0.0.0.0/0\" if protocol version is IPv4.", +"type": "string" +}, +"ipProtocol": { +"description": "Optional. The IP protocol that this policy-based route applies to. Valid values are 'TCP', 'UDP', and 'ALL'. Default is 'ALL'.", +"type": "string" +}, +"protocolVersion": { +"description": "Required. Internet protocol versions this policy-based route applies to. For this version, only IPV4 is supported.", +"enum": [ +"PROTOCOL_VERSION_UNSPECIFIED", +"IPV4" +], +"enumDescriptions": [ +"Default value.", +"The PBR is for IPv4 internet protocol traffic." +], +"type": "string" +}, +"srcRange": { +"description": "Optional. The source IP range of outgoing packets that this policy-based route applies to. Default is \"0.0.0.0/0\" if protocol version is IPv4.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningCancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "GoogleLongrunningCancelOperationRequest", +"properties": {}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpcErrorInfo": { +"description": "Describes the cause of the error with structured details. Example of an error when contacting the \"pubsub.googleapis.com\" API when it is not enabled: { \"reason\": \"API_DISABLED\" \"domain\": \"googleapis.com\" \"metadata\": { \"resource\": \"projects/123\", \"service\": \"pubsub.googleapis.com\" } } This response indicates that the pubsub.googleapis.com API is not enabled. Example of an error that is returned when attempting to create a Spanner instance in a region that is out of stock: { \"reason\": \"STOCKOUT\" \"domain\": \"spanner.googleapis.com\", \"metadata\": { \"availableRegions\": \"us-central1,us-east2\" } }", +"id": "GoogleRpcErrorInfo", +"properties": { +"domain": { +"description": "The logical grouping to which the \"reason\" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: \"pubsub.googleapis.com\". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is \"googleapis.com\".", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Additional structured details about this error. Keys should match /[a-zA-Z0-9-_]/ and be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {\"instanceLimit\": \"100/request\"}, should be returned as, {\"instanceLimitPerRequest\": \"100\"}, if the client exceeds the number of instances that can be created in a single (batch) request.", +"type": "object" +}, +"reason": { +"description": "The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of `A-Z+[A-Z0-9]`, which represents UPPER_SNAKE_CASE.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Group": { +"description": "A group represents a subset of spokes attached to a hub.", +"id": "Group", +"properties": { +"createTime": { +"description": "Output only. The time the group was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. The description of the group.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).", +"type": "object" +}, +"name": { +"description": "Immutable. The name of the group. Group names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub}/groups/{group_id}`", +"type": "string" +}, +"state": { +"description": "Output only. The current lifecycle state of this group.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"ACCEPTING", +"REJECTING", +"UPDATING", +"INACTIVE", +"OBSOLETE" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress.", +"The resource is active", +"The resource's delete operation is in progress.", +"The resource's accept operation is in progress.", +"The resource's reject operation is in progress.", +"The resource's update operation is in progress.", +"The resource is inactive.", +"The hub associated with this spoke resource has been deleted. This state applies to spoke resources only." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. The Google-generated UUID for the group. This value is unique across all group resources. If a group is deleted and another with the same name is created, the new route table is assigned a different unique_id.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the group was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Hub": { +"description": "A Network Connectivity Center hub is a global management resource to which you attach spokes. A single hub can contain spokes from multiple regions. However, if any of a hub's spokes use the site-to-site data transfer feature, the resources associated with those spokes must all be in the same VPC network. Spokes that do not use site-to-site data transfer can be associated with any VPC network in your project.", +"id": "Hub", +"properties": { +"createTime": { +"description": "Output only. The time the hub was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "An optional description of the hub.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).", +"type": "object" +}, +"name": { +"description": "Immutable. The name of the hub. Hub names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}`", +"type": "string" +}, +"routeTables": { +"description": "Output only. The route tables that belong to this hub. They use the following form: `projects/{project_number}/locations/global/hubs/{hub_id}/routeTables/{route_table_id}` This field is read-only. Network Connectivity Center automatically populates it based on the route tables nested under the hub.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"routingVpcs": { +"description": "The VPC networks associated with this hub's spokes. This field is read-only. Network Connectivity Center automatically populates it based on the set of spokes attached to the hub.", +"items": { +"$ref": "RoutingVPC" +}, +"type": "array" +}, +"spokeSummary": { +"$ref": "SpokeSummary", +"description": "Output only. A summary of the spokes associated with a hub. The summary includes a count of spokes according to type and according to state. If any spokes are inactive, the summary also lists the reasons they are inactive, including a count for each reason.", +"readOnly": true +}, +"state": { +"description": "Output only. The current lifecycle state of this hub.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"ACCEPTING", +"REJECTING", +"UPDATING", +"INACTIVE", +"OBSOLETE" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress.", +"The resource is active", +"The resource's delete operation is in progress.", +"The resource's accept operation is in progress.", +"The resource's reject operation is in progress.", +"The resource's update operation is in progress.", +"The resource is inactive.", +"The hub associated with this spoke resource has been deleted. This state applies to spoke resources only." +], +"readOnly": true, +"type": "string" +}, +"uniqueId": { +"description": "Output only. The Google-generated UUID for the hub. This value is unique across all hub resources. If a hub is deleted and another with the same name is created, the new hub is assigned a different unique_id.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the hub was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InterconnectAttachment": { +"description": "InterconnectAttachment that this route applies to.", +"id": "InterconnectAttachment", +"properties": { +"region": { +"description": "Optional. Cloud region to install this policy-based route on interconnect attachment. Use `all` to install it on all interconnect attachments.", +"type": "string" +} +}, +"type": "object" +}, +"InternalRange": { +"description": "The internal range resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (its usage and peering behavior). Networking resources can link to this range if they are created as belonging to it.", +"id": "InternalRange", +"properties": { +"createTime": { +"description": "Time when the internal range was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "A description of this resource.", +"type": "string" +}, +"ipCidrRange": { +"description": "The IP range that this internal range defines.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", +"type": "string" +}, +"network": { +"description": "The URL or resource ID of the network in which to reserve the internal range. The network cannot be deleted if there are any reserved internal ranges referring to it. Legacy networks are not supported. This can only be specified for a global internal address. Example: - URL: /compute/v1/projects/{project}/global/networks/{resourceId} - ID: network123", +"type": "string" +}, +"overlaps": { +"description": "Optional. Types of resources that are allowed to overlap with the current internal range.", +"items": { +"enum": [ +"OVERLAP_UNSPECIFIED", +"OVERLAP_ROUTE_RANGE", +"OVERLAP_EXISTING_SUBNET_RANGE" +], +"enumDescriptions": [ +"No overlap overrides.", +"Allow creation of static routes more specific that the current internal range.", +"Allow creation of internal ranges that overlap with existing subnets." +], +"type": "string" +}, +"type": "array" +}, +"peering": { +"description": "The type of peering set for this internal range.", +"enum": [ +"PEERING_UNSPECIFIED", +"FOR_SELF", +"FOR_PEER", +"NOT_SHARED" +], +"enumDescriptions": [ +"If Peering is left unspecified in CreateInternalRange or UpdateInternalRange, it will be defaulted to FOR_SELF.", +"This is the default behavior and represents the case that this internal range is intended to be used in the VPC in which it is created and is accessible from its peers. This implies that peers or peers-of-peers cannot use this range.", +"This behavior can be set when the internal range is being reserved for usage by peers. This means that no resource within the VPC in which it is being created can use this to associate with a VPC resource, but one of the peers can. This represents donating a range for peers to use.", +"This behavior can be set when the internal range is being reserved for usage by the VPC in which it is created, but not shared with peers. In a sense, it is local to the VPC. This can be used to create internal ranges for various purposes like HTTP_INTERNAL_LOAD_BALANCER or for Interconnect routes that are not shared with peers. This also implies that peers cannot use this range in a way that is visible to this VPC, but can re-use this range as long as it is NOT_SHARED from the peer VPC, too." +], +"type": "string" +}, +"prefixLength": { +"description": "An alternate to ip_cidr_range. Can be set when trying to create a reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size.", +"format": "int32", +"type": "integer" +}, +"targetCidrRange": { +"description": "Optional. Can be set to narrow down or pick a different address space while searching for a free range. If not set, defaults to the \"10.0.0.0/8\" address space. This can be used to search in other rfc-1918 address spaces like \"172.16.0.0/12\" and \"192.168.0.0/16\" or non-rfc-1918 address spaces used in the VPC.", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Time when the internal range was updated.", +"format": "google-datetime", +"type": "string" +}, +"usage": { +"description": "The type of usage set for this InternalRange.", +"enum": [ +"USAGE_UNSPECIFIED", +"FOR_VPC", +"EXTERNAL_TO_VPC" +], +"enumDescriptions": [ +"Unspecified usage is allowed in calls which identify the resource by other fields and do not need Usage set to complete. These are, i.e.: GetInternalRange and DeleteInternalRange. Usage needs to be specified explicitly in CreateInternalRange or UpdateInternalRange calls.", +"A VPC resource can use the reserved CIDR block by associating it with the internal range resource if usage is set to FOR_VPC.", +"Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases, like for example, usage on-prem, with dynamic route announcements via interconnect." +], +"type": "string" +}, +"users": { +"description": "Output only. The list of resources that refer to this internal range. Resources that use the internal range for their range allocation are referred to as users of the range. Other resources mark themselves as users while doing so by creating a reference to this internal range. Having a user, based on this reference, prevents deletion of the internal range referred to. Can be empty.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"LinkedInterconnectAttachments": { +"description": "A collection of VLAN attachment resources. These resources should be redundant attachments that all advertise the same prefixes to Google Cloud. Alternatively, in active/passive configurations, all attachments should be capable of advertising the same prefixes.", +"id": "LinkedInterconnectAttachments", +"properties": { +"siteToSiteDataTransfer": { +"description": "A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).", +"type": "boolean" +}, +"uris": { +"description": "The URIs of linked interconnect attachment resources", +"items": { +"type": "string" +}, +"type": "array" +}, +"vpcNetwork": { +"description": "Output only. The VPC network where these VLAN attachments are located.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"LinkedRouterApplianceInstances": { +"description": "A collection of router appliance instances. If you configure multiple router appliance instances to receive data from the same set of sites outside of Google Cloud, we recommend that you associate those instances with the same spoke.", +"id": "LinkedRouterApplianceInstances", +"properties": { +"instances": { +"description": "The list of router appliance instances.", +"items": { +"$ref": "RouterApplianceInstance" +}, +"type": "array" +}, +"siteToSiteDataTransfer": { +"description": "A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).", +"type": "boolean" +}, +"vpcNetwork": { +"description": "Output only. The VPC network where these router appliance instances are located.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"LinkedVpcNetwork": { +"description": "An existing VPC network.", +"id": "LinkedVpcNetwork", +"properties": { +"excludeExportRanges": { +"description": "Optional. IP ranges encompassing the subnets to be excluded from peering.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uri": { +"description": "Required. The URI of the VPC network resource.", +"type": "string" +} +}, +"type": "object" +}, +"LinkedVpnTunnels": { +"description": "A collection of Cloud VPN tunnel resources. These resources should be redundant HA VPN tunnels that all advertise the same prefixes to Google Cloud. Alternatively, in a passive/active configuration, all tunnels should be capable of advertising the same prefixes.", +"id": "LinkedVpnTunnels", +"properties": { +"siteToSiteDataTransfer": { +"description": "A value that controls whether site-to-site data transfer is enabled for these resources. Data transfer is available only in [supported locations](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/locations).", +"type": "boolean" +}, +"uris": { +"description": "The URIs of linked VPN tunnel resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"vpcNetwork": { +"description": "Output only. The VPC network where these VPN tunnels are located.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ListGroupsResponse": { +"description": "Response for HubService.ListGroups method.", +"id": "ListGroupsResponse", +"properties": { +"groups": { +"description": "The requested groups.", +"items": { +"$ref": "Group" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.", +"type": "string" +}, +"unreachable": { +"description": "Hubs that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListHubSpokesResponse": { +"description": "The response for HubService.ListHubSpokes.", +"id": "ListHubSpokesResponse", +"properties": { +"nextPageToken": { +"description": "The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.", +"type": "string" +}, +"spokes": { +"description": "The requested spokes. The spoke fields can be partially populated based on the `view` field in the request message.", +"items": { +"$ref": "Spoke" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListHubsResponse": { +"description": "Response for HubService.ListHubs method.", +"id": "ListHubsResponse", +"properties": { +"hubs": { +"description": "The requested hubs.", +"items": { +"$ref": "Hub" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInternalRangesResponse": { +"description": "Response for InternalRange.ListInternalRanges", +"id": "ListInternalRangesResponse", +"properties": { +"internalRanges": { +"description": "Internal ranges to be returned.", +"items": { +"$ref": "InternalRange" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListPolicyBasedRoutesResponse": { +"description": "Response for PolicyBasedRouting.ListPolicyBasedRoutes method.", +"id": "ListPolicyBasedRoutesResponse", +"properties": { +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"policyBasedRoutes": { +"description": "Policy-based routes to be returned.", +"items": { +"$ref": "PolicyBasedRoute" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListRouteTablesResponse": { +"description": "Response for HubService.ListRouteTables method.", +"id": "ListRouteTablesResponse", +"properties": { +"nextPageToken": { +"description": "The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.", +"type": "string" +}, +"routeTables": { +"description": "The requested route tables.", +"items": { +"$ref": "RouteTable" +}, +"type": "array" +}, +"unreachable": { +"description": "Hubs that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListRoutesResponse": { +"description": "Response for HubService.ListRoutes method.", +"id": "ListRoutesResponse", +"properties": { +"nextPageToken": { +"description": "The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.", +"type": "string" +}, +"routes": { +"description": "The requested routes.", +"items": { +"$ref": "Route" +}, +"type": "array" +}, +"unreachable": { +"description": "RouteTables that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceClassesResponse": { +"description": "Response for ListServiceClasses.", +"id": "ListServiceClassesResponse", +"properties": { +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"serviceClasses": { +"description": "ServiceClasses to be returned.", +"items": { +"$ref": "ServiceClass" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceConnectionMapsResponse": { +"description": "Response for ListServiceConnectionMaps.", +"id": "ListServiceConnectionMapsResponse", +"properties": { +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"serviceConnectionMaps": { +"description": "ServiceConnectionMaps to be returned.", +"items": { +"$ref": "ServiceConnectionMap" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceConnectionPoliciesResponse": { +"description": "Response for ListServiceConnectionPolicies.", +"id": "ListServiceConnectionPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"serviceConnectionPolicies": { +"description": "ServiceConnectionPolicies to be returned.", +"items": { +"$ref": "ServiceConnectionPolicy" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceConnectionTokensResponse": { +"description": "Response for ListServiceConnectionTokens.", +"id": "ListServiceConnectionTokensResponse", +"properties": { +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"serviceConnectionTokens": { +"description": "ServiceConnectionTokens to be returned.", +"items": { +"$ref": "ServiceConnectionToken" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSpokesResponse": { +"description": "The response for HubService.ListSpokes.", +"id": "ListSpokesResponse", +"properties": { +"nextPageToken": { +"description": "The token for the next page of the response. To see more results, use this value as the page_token for your next request. If this value is empty, there are no more results.", +"type": "string" +}, +"spokes": { +"description": "The requested spokes.", +"items": { +"$ref": "Spoke" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"LocationMetadata": { +"description": "Metadata about locations", +"id": "LocationMetadata", +"properties": { +"locationFeatures": { +"description": "List of supported features", +"items": { +"enum": [ +"LOCATION_FEATURE_UNSPECIFIED", +"SITE_TO_CLOUD_SPOKES", +"SITE_TO_SITE_SPOKES" +], +"enumDescriptions": [ +"No publicly supported feature in this location", +"Site-to-cloud spokes are supported in this location", +"Site-to-site spokes are supported in this location" +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"NextHopVpcNetwork": { +"id": "NextHopVpcNetwork", +"properties": { +"uri": { +"description": "The URI of the VPC network resource", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PolicyBasedRoute": { +"description": "Policy-based routes route L4 network traffic based on not just destination IP address, but also source IP address, protocol, and more. If a policy-based route conflicts with other types of routes, the policy-based route always take precedence.", +"id": "PolicyBasedRoute", +"properties": { +"createTime": { +"description": "Output only. Time when the policy-based route was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. An optional description of this resource. Provide this field when you create the resource.", +"type": "string" +}, +"filter": { +"$ref": "Filter", +"description": "Required. The filter to match L4 traffic." +}, +"interconnectAttachment": { +"$ref": "InterconnectAttachment", +"description": "Optional. The interconnect attachments that this policy-based route applies to." +}, +"kind": { +"description": "Output only. Type of this resource. Always networkconnectivity#policyBasedRoute for policy-based Route resources.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. A unique name of the resource in the form of `projects/{project_number}/locations/global/PolicyBasedRoutes/{policy_based_route_id}`", +"type": "string" +}, +"network": { +"description": "Required. Fully-qualified URL of the network that this route applies to, for example: projects/my-project/global/networks/my-network.", +"type": "string" +}, +"nextHopIlbIp": { +"description": "Optional. The IP address of a global-access-enabled L4 ILB that is the next hop for matching packets. For this version, only nextHopIlbIp is supported.", +"type": "string" +}, +"nextHopOtherRoutes": { +"description": "Optional. Other routes that will be referenced to determine the next hop of the packet.", +"enum": [ +"OTHER_ROUTES_UNSPECIFIED", +"DEFAULT_ROUTING" +], +"enumDescriptions": [ +"Default value.", +"Use the routes from the default routing tables (system-generated routes, custom routes, peering route) to determine the next hop. This will effectively exclude matching packets being applied on other PBRs with a lower priority." +], +"type": "string" +}, +"priority": { +"description": "Optional. The priority of this policy-based route. Priority is used to break ties in cases where there are more than one matching policy-based routes found. In cases where multiple policy-based routes are matched, the one with the lowest-numbered priority value wins. The default value is 1000. The priority value must be from 1 to 65535, inclusive.", +"format": "int32", +"type": "integer" +}, +"selfLink": { +"description": "Output only. Server-defined fully-qualified URL for this resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when the policy-based route was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"virtualMachine": { +"$ref": "VirtualMachine", +"description": "Optional. VM instances to which this policy-based route applies to." +}, +"warnings": { +"description": "Output only. If potential misconfigurations are detected for this route, this field will be populated with warning messages.", +"items": { +"$ref": "Warnings" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ProducerPscConfig": { +"description": "The PSC configurations on producer side.", +"id": "ProducerPscConfig", +"properties": { +"serviceAttachmentUri": { +"description": "The resource path of a service attachment. Example: projects/{projectNumOrId}/regions/{region}/serviceAttachments/{resourceId}.", +"type": "string" +} +}, +"type": "object" +}, +"PscConfig": { +"description": "Configuration used for Private Service Connect connections. Used when Infrastructure is PSC.", +"id": "PscConfig", +"properties": { +"limit": { +"description": "Optional. Max number of PSC connections for this policy.", +"format": "int64", +"type": "string" +}, +"subnetworks": { +"description": "The resource paths of subnetworks to use for IP address management. Example: projects/{projectNumOrId}/regions/{region}/subnetworks/{resourceId}.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PscConnection": { +"description": "Information about a specific Private Service Connect connection.", +"id": "PscConnection", +"properties": { +"consumerAddress": { +"description": "The resource reference of the consumer address.", +"type": "string" +}, +"consumerForwardingRule": { +"description": "The resource reference of the PSC Forwarding Rule within the consumer VPC.", +"type": "string" +}, +"consumerTargetProject": { +"description": "The project where the PSC connection is created.", +"type": "string" +}, +"error": { +"$ref": "GoogleRpcStatus", +"deprecated": true, +"description": "The most recent error during operating this connection." +}, +"errorInfo": { +"$ref": "GoogleRpcErrorInfo", +"description": "Output only. The error info for the latest error during operating this connection.", +"readOnly": true +}, +"errorType": { +"description": "The error type indicates whether the error is consumer facing, producer facing or system internal.", +"enum": [ +"CONNECTION_ERROR_TYPE_UNSPECIFIED", +"ERROR_INTERNAL", +"ERROR_CONSUMER_SIDE", +"ERROR_PRODUCER_SIDE" +], +"enumDescriptions": [ +"An invalid error type as the default case.", +"The error is due to Service Automation system internal.", +"The error is due to the setup on consumer side.", +"The error is due to the setup on producer side." +], +"type": "string" +}, +"gceOperation": { +"description": "The last Compute Engine operation to setup PSC connection.", +"type": "string" +}, +"pscConnectionId": { +"description": "The PSC connection id of the PSC forwarding rule.", +"type": "string" +}, +"selectedSubnetwork": { +"description": "Output only. The URI of the subnetwork selected to allocate IP address for this connection.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "State of the PSC Connection", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"FAILED", +"CREATING", +"DELETING" +], +"enumDescriptions": [ +"An invalid state as the default case.", +"The connection is fully established and ready to use.", +"The connection is not functional since some resources on the connection fail to be created.", +"The connection is being created.", +"The connection is being deleted." +], +"type": "string" +} +}, +"type": "object" +}, +"RejectHubSpokeRequest": { +"description": "The request for HubService.RejectHubSpoke.", +"id": "RejectHubSpokeRequest", +"properties": { +"details": { +"description": "Optional. Additional information provided by the hub administrator.", +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server knows to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check to see whether the original operation was received. If it was, the server ignores the second request. This behavior prevents clients from mistakenly creating duplicate commitments. The request ID must be a valid UUID, with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +}, +"spokeUri": { +"description": "Required. The URI of the spoke to reject from the hub.", +"type": "string" +} +}, +"type": "object" +}, +"RejectHubSpokeResponse": { +"description": "The response for HubService.RejectHubSpoke.", +"id": "RejectHubSpokeResponse", +"properties": { +"spoke": { +"$ref": "Spoke", +"description": "The spoke that was operated on." +} +}, +"type": "object" +}, +"Route": { +"description": "A route defines a path from VM instances within a spoke to a specific destination resource. Only VPC spokes have routes.", +"id": "Route", +"properties": { +"createTime": { +"description": "Output only. The time the route was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "An optional description of the route.", +"type": "string" +}, +"ipCidrRange": { +"description": "The destination IP address range.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).", +"type": "object" +}, +"location": { +"description": "Output only. The origin location of the route. Uses the following form: \"projects/{project}/locations/{location}\" Example: projects/1234/locations/us-central1", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The name of the route. Route names must be unique. Route names use the following form: `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}/routes/{route_id}`", +"type": "string" +}, +"nextHopVpcNetwork": { +"$ref": "NextHopVpcNetwork", +"description": "Immutable. The destination VPC network for packets on this route." +}, +"spoke": { +"description": "Immutable. The spoke that this route leads to. Example: projects/12345/locations/global/spokes/SPOKE", +"type": "string" +}, +"state": { +"description": "Output only. The current lifecycle state of the route.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"ACCEPTING", +"REJECTING", +"UPDATING", +"INACTIVE", +"OBSOLETE" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress.", +"The resource is active", +"The resource's delete operation is in progress.", +"The resource's accept operation is in progress.", +"The resource's reject operation is in progress.", +"The resource's update operation is in progress.", +"The resource is inactive.", +"The hub associated with this spoke resource has been deleted. This state applies to spoke resources only." +], +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Output only. The route's type. Its type is determined by the properties of its IP address range.", +"enum": [ +"ROUTE_TYPE_UNSPECIFIED", +"VPC_PRIMARY_SUBNET", +"VPC_SECONDARY_SUBNET" +], +"enumDescriptions": [ +"No route type information specified", +"The route leads to a destination within the primary address range of the VPC network's subnet.", +"The route leads to a destination within the secondary address range of the VPC network's subnet." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. The Google-generated UUID for the route. This value is unique across all Network Connectivity Center route resources. If a route is deleted and another with the same name is created, the new route is assigned a different `uid`.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the route was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RouteTable": { +"id": "RouteTable", +"properties": { +"createTime": { +"description": "Output only. The time the route table was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "An optional description of the route table.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).", +"type": "object" +}, +"name": { +"description": "Immutable. The name of the route table. Route table names must be unique. They use the following form: `projects/{project_number}/locations/global/hubs/{hub}/routeTables/{route_table_id}`", +"type": "string" +}, +"state": { +"description": "Output only. The current lifecycle state of this route table.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"ACCEPTING", +"REJECTING", +"UPDATING", +"INACTIVE", +"OBSOLETE" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress.", +"The resource is active", +"The resource's delete operation is in progress.", +"The resource's accept operation is in progress.", +"The resource's reject operation is in progress.", +"The resource's update operation is in progress.", +"The resource is inactive.", +"The hub associated with this spoke resource has been deleted. This state applies to spoke resources only." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. The Google-generated UUID for the route table. This value is unique across all route table resources. If a route table is deleted and another with the same name is created, the new route table is assigned a different `uid`.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the route table was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RouterApplianceInstance": { +"description": "A router appliance instance is a Compute Engine virtual machine (VM) instance that acts as a BGP speaker. A router appliance instance is specified by the URI of the VM and the internal IP address of one of the VM's network interfaces.", +"id": "RouterApplianceInstance", +"properties": { +"ipAddress": { +"description": "The IP address on the VM to use for peering.", +"type": "string" +}, +"virtualMachine": { +"description": "The URI of the VM.", +"type": "string" +} +}, +"type": "object" +}, +"RoutingVPC": { +"description": "RoutingVPC contains information about the VPC networks associated with the spokes of a Network Connectivity Center hub.", +"id": "RoutingVPC", +"properties": { +"requiredForNewSiteToSiteDataTransferSpokes": { +"description": "Output only. If true, indicates that this VPC network is currently associated with spokes that use the data transfer feature (spokes where the site_to_site_data_transfer field is set to true). If you create new spokes that use data transfer, they must be associated with this VPC network. At most, one VPC network will have this field set to true.", +"readOnly": true, +"type": "boolean" +}, +"uri": { +"description": "The URI of the VPC network.", +"type": "string" +} +}, +"type": "object" +}, +"ServiceClass": { +"description": "The ServiceClass resource. Next id: 9", +"id": "ServiceClass", +"properties": { +"createTime": { +"description": "Output only. Time when the ServiceClass was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of this resource.", +"type": "string" +}, +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. The name of a ServiceClass resource. Format: projects/{project}/locations/{location}/serviceClasses/{service_class} See: https://google.aip.dev/122#fields-representing-resource-names", +"type": "string" +}, +"serviceClass": { +"description": "Output only. The generated service class name. Use this name to refer to the Service class in Service Connection Maps and Service Connection Policies.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when the ServiceClass was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServiceConnectionMap": { +"description": "The ServiceConnectionMap resource. Next id: 15", +"id": "ServiceConnectionMap", +"properties": { +"consumerPscConfigs": { +"description": "The PSC configurations on consumer side.", +"items": { +"$ref": "ConsumerPscConfig" +}, +"type": "array" +}, +"consumerPscConnections": { +"description": "Output only. PSC connection details on consumer side.", +"items": { +"$ref": "ConsumerPscConnection" +}, +"readOnly": true, +"type": "array" +}, +"createTime": { +"description": "Output only. Time when the ServiceConnectionMap was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of this resource.", +"type": "string" +}, +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"infrastructure": { +"description": "Output only. The infrastructure used for connections between consumers/producers.", +"enum": [ +"INFRASTRUCTURE_UNSPECIFIED", +"PSC" +], +"enumDescriptions": [ +"An invalid infrastructure as the default case.", +"Private Service Connect is used for connections." +], +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. The name of a ServiceConnectionMap. Format: projects/{project}/locations/{location}/serviceConnectionMaps/{service_connection_map} See: https://google.aip.dev/122#fields-representing-resource-names", +"type": "string" +}, +"producerPscConfigs": { +"description": "The PSC configurations on producer side.", +"items": { +"$ref": "ProducerPscConfig" +}, +"type": "array" +}, +"serviceClass": { +"description": "The service class identifier this ServiceConnectionMap is for. The user of ServiceConnectionMap create API needs to have networkconnecitivty.serviceclasses.use iam permission for the service class.", +"type": "string" +}, +"serviceClassUri": { +"description": "Output only. The service class uri this ServiceConnectionMap is for.", +"readOnly": true, +"type": "string" +}, +"token": { +"description": "The token provided by the consumer. This token authenticates that the consumer can create a connecton within the specified project and network.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when the ServiceConnectionMap was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServiceConnectionPolicy": { +"description": "The ServiceConnectionPolicy resource. Next id: 12", +"id": "ServiceConnectionPolicy", +"properties": { +"createTime": { +"description": "Output only. Time when the ServiceConnectionMap was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of this resource.", +"type": "string" +}, +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"infrastructure": { +"description": "Output only. The type of underlying resources used to create the connection.", +"enum": [ +"INFRASTRUCTURE_UNSPECIFIED", +"PSC" +], +"enumDescriptions": [ +"An invalid infrastructure as the default case.", +"Private Service Connect is used for connections." +], +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. The name of a ServiceConnectionPolicy. Format: projects/{project}/locations/{location}/serviceConnectionPolicies/{service_connection_policy} See: https://google.aip.dev/122#fields-representing-resource-names", +"type": "string" +}, +"network": { +"description": "The resource path of the consumer network. Example: - projects/{projectNumOrId}/global/networks/{resourceId}.", +"type": "string" +}, +"pscConfig": { +"$ref": "PscConfig", +"description": "Configuration used for Private Service Connect connections. Used when Infrastructure is PSC." +}, +"pscConnections": { +"description": "Output only. [Output only] Information about each Private Service Connect connection.", +"items": { +"$ref": "PscConnection" +}, +"readOnly": true, +"type": "array" +}, +"serviceClass": { +"description": "The service class identifier for which this ServiceConnectionPolicy is for. The service class identifier is a unique, symbolic representation of a ServiceClass. It is provided by the Service Producer. Google services have a prefix of gcp. For example, gcp-cloud-sql. 3rd party services do not. For example, test-service-a3dfcx.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when the ServiceConnectionMap was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServiceConnectionToken": { +"description": "The ServiceConnectionToken resource. Next id: 10", +"id": "ServiceConnectionToken", +"properties": { +"createTime": { +"description": "Output only. Time when the ServiceConnectionToken was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of this resource.", +"type": "string" +}, +"etag": { +"description": "Optional. The etag is computed by the server, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"expireTime": { +"description": "Output only. The time to which this token is valid.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. The name of a ServiceConnectionToken. Format: projects/{project}/locations/{location}/ServiceConnectionTokens/{service_connection_token} See: https://google.aip.dev/122#fields-representing-resource-names", +"type": "string" +}, +"network": { +"description": "The resource path of the network associated with this token. Example: projects/{projectNumOrId}/global/networks/{resourceId}.", +"type": "string" +}, +"token": { +"description": "Output only. The token generated by Automation.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when the ServiceConnectionToken was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Spoke": { +"description": "A Network Connectivity Center spoke represents one or more network connectivity resources. When you create a spoke, you associate it with a hub. You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels * linked_interconnect_attachments * linked_router_appliance_instances * linked_vpc_network", +"id": "Spoke", +"properties": { +"createTime": { +"description": "Output only. The time the spoke was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "An optional description of the spoke.", +"type": "string" +}, +"group": { +"description": "Optional. The name of the group that this spoke is associated with.", +"type": "string" +}, +"hub": { +"description": "Immutable. The name of the hub that this spoke is attached to.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional labels in key-value pair format. For more information about labels, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).", +"type": "object" +}, +"linkedInterconnectAttachments": { +"$ref": "LinkedInterconnectAttachments", +"description": "VLAN attachments that are associated with the spoke." +}, +"linkedRouterApplianceInstances": { +"$ref": "LinkedRouterApplianceInstances", +"description": "Router appliance instances that are associated with the spoke." +}, +"linkedVpcNetwork": { +"$ref": "LinkedVpcNetwork", +"description": "Optional. VPC network that is associated with the spoke." +}, +"linkedVpnTunnels": { +"$ref": "LinkedVpnTunnels", +"description": "VPN tunnels that are associated with the spoke." +}, +"name": { +"description": "Immutable. The name of the spoke. Spoke names must be unique. They use the following form: `projects/{project_number}/locations/{region}/spokes/{spoke_id}`", +"type": "string" +}, +"reasons": { +"description": "Output only. The reasons for current state of the spoke. Only present when the spoke is in the `INACTIVE` state.", +"items": { +"$ref": "StateReason" +}, +"readOnly": true, +"type": "array" +}, +"spokeType": { +"description": "Output only. The type of resource associated with the spoke.", +"enum": [ +"SPOKE_TYPE_UNSPECIFIED", +"VPN_TUNNEL", +"INTERCONNECT_ATTACHMENT", +"ROUTER_APPLIANCE", +"VPC_NETWORK" +], +"enumDescriptions": [ +"Unspecified spoke type.", +"Spokes associated with VPN tunnels.", +"Spokes associated with VLAN attachments.", +"Spokes associated with router appliance instances.", +"Spokes associated with VPC networks." +], +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current lifecycle state of this spoke.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"ACCEPTING", +"REJECTING", +"UPDATING", +"INACTIVE", +"OBSOLETE" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress.", +"The resource is active", +"The resource's delete operation is in progress.", +"The resource's accept operation is in progress.", +"The resource's reject operation is in progress.", +"The resource's update operation is in progress.", +"The resource is inactive.", +"The hub associated with this spoke resource has been deleted. This state applies to spoke resources only." +], +"readOnly": true, +"type": "string" +}, +"uniqueId": { +"description": "Output only. The Google-generated UUID for the spoke. This value is unique across all spoke resources. If a spoke is deleted and another with the same name is created, the new spoke is assigned a different `unique_id`.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the spoke was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SpokeStateCount": { +"description": "The number of spokes that are in a particular state and associated with a given hub.", +"id": "SpokeStateCount", +"properties": { +"count": { +"description": "Output only. The total number of spokes that are in this state and associated with a given hub.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the spokes.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"ACCEPTING", +"REJECTING", +"UPDATING", +"INACTIVE", +"OBSOLETE" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress.", +"The resource is active", +"The resource's delete operation is in progress.", +"The resource's accept operation is in progress.", +"The resource's reject operation is in progress.", +"The resource's update operation is in progress.", +"The resource is inactive.", +"The hub associated with this spoke resource has been deleted. This state applies to spoke resources only." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SpokeStateReasonCount": { +"description": "The number of spokes in the hub that are inactive for this reason.", +"id": "SpokeStateReasonCount", +"properties": { +"count": { +"description": "Output only. The total number of spokes that are inactive for a particular reason and associated with a given hub.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"stateReasonCode": { +"description": "Output only. The reason that a spoke is inactive.", +"enum": [ +"CODE_UNSPECIFIED", +"PENDING_REVIEW", +"REJECTED", +"PAUSED", +"FAILED" +], +"enumDescriptions": [ +"No information available.", +"The proposed spoke is pending review.", +"The proposed spoke has been rejected by the hub administrator.", +"The spoke has been deactivated internally.", +"Network Connectivity Center encountered errors while accepting the spoke." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SpokeSummary": { +"description": "Summarizes information about the spokes associated with a hub. The summary includes a count of spokes according to type and according to state. If any spokes are inactive, the summary also lists the reasons they are inactive, including a count for each reason.", +"id": "SpokeSummary", +"properties": { +"spokeStateCounts": { +"description": "Output only. Counts the number of spokes that are in each state and associated with a given hub.", +"items": { +"$ref": "SpokeStateCount" +}, +"readOnly": true, +"type": "array" +}, +"spokeStateReasonCounts": { +"description": "Output only. Counts the number of spokes that are inactive for each possible reason and associated with a given hub.", +"items": { +"$ref": "SpokeStateReasonCount" +}, +"readOnly": true, +"type": "array" +}, +"spokeTypeCounts": { +"description": "Output only. Counts the number of spokes of each type that are associated with a specific hub.", +"items": { +"$ref": "SpokeTypeCount" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"SpokeTypeCount": { +"description": "The number of spokes of a given type that are associated with a specific hub. The type indicates what kind of resource is associated with the spoke.", +"id": "SpokeTypeCount", +"properties": { +"count": { +"description": "Output only. The total number of spokes of this type that are associated with the hub.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"spokeType": { +"description": "Output only. The type of the spokes.", +"enum": [ +"SPOKE_TYPE_UNSPECIFIED", +"VPN_TUNNEL", +"INTERCONNECT_ATTACHMENT", +"ROUTER_APPLIANCE", +"VPC_NETWORK" +], +"enumDescriptions": [ +"Unspecified spoke type.", +"Spokes associated with VPN tunnels.", +"Spokes associated with VLAN attachments.", +"Spokes associated with router appliance instances.", +"Spokes associated with VPC networks." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"StateReason": { +"description": "The reason a spoke is inactive.", +"id": "StateReason", +"properties": { +"code": { +"description": "The code associated with this reason.", +"enum": [ +"CODE_UNSPECIFIED", +"PENDING_REVIEW", +"REJECTED", +"PAUSED", +"FAILED" +], +"enumDescriptions": [ +"No information available.", +"The proposed spoke is pending review.", +"The proposed spoke has been rejected by the hub administrator.", +"The spoke has been deactivated internally.", +"Network Connectivity Center encountered errors while accepting the spoke." +], +"type": "string" +}, +"message": { +"description": "Human-readable details about this reason.", +"type": "string" +}, +"userDetails": { +"description": "Additional information provided by the user in the RejectSpoke call.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"VirtualMachine": { +"description": "VM instances to which this policy-based route applies to.", +"id": "VirtualMachine", +"properties": { +"tags": { +"description": "Optional. A list of VM instance tags the this policy-based route applies to. VM instances that have ANY of tags specified here will install this PBR.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Warnings": { +"description": "Informational warning message.", +"id": "Warnings", +"properties": { +"code": { +"description": "Output only. A warning code, if applicable.", +"enum": [ +"WARNING_UNSPECIFIED", +"RESOURCE_NOT_ACTIVE", +"RESOURCE_BEING_MODIFIED" +], +"enumDescriptions": [ +"Default value.", +"The policy-based route is not active and functioning. Common causes are the dependent network was deleted or the resource project was turned off.", +"The policy-based route is being modified (e.g. created/deleted) at this time." +], +"readOnly": true, +"type": "string" +}, +"data": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Metadata about this warning in key: value format. The key should provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement.", +"readOnly": true, +"type": "object" +}, +"warningMessage": { +"description": "Output only. A human-readable description of the warning code.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Connectivity API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkconnectivity.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkconnectivity.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..9ddbff046905aca7d397d1b5466f80cf6e8b100d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkconnectivity.v1alpha1.json @@ -0,0 +1,1830 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networkconnectivity.googleapis.com/", +"batchPath": "batch", +"canonicalName": "networkconnectivity", +"description": "This API enables connectivity with and between Google Cloud resources.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/network-connectivity/docs/reference/networkconnectivity/rest", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networkconnectivity:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networkconnectivity.mtls.googleapis.com/", +"name": "networkconnectivity", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1alpha1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"global": { +"resources": { +"hubs": { +"methods": { +"create": { +"description": "Creates a new Network Connectivity Center hub in the specified project.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"hubId": { +"description": "Optional. Unique id for the Hub to create.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name of the Hub.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/hubs", +"request": { +"$ref": "Hub" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Network Connectivity Center hub.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.global.hubs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Hub to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details about a Network Connectivity Center hub.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Hub resource to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Hub" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the Network Connectivity Center hubs associated with a given project.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.global.hubs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/hubs", +"response": { +"$ref": "ListHubsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the description and/or labels of a Network Connectivity Center hub.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.global.hubs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of a Hub resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the Hub resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "Hub" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/global/hubs/{hubsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.global.hubs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/hubs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"internalRanges": { +"methods": { +"create": { +"description": "Creates a new internal range in a given project and location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.internalRanges.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"internalRangeId": { +"description": "Optional. Resource ID (i.e. 'foo' in '[...]/projects/p/locations/l/internalRanges/foo') See https://google.aip.dev/122#resource-id-segments Unique per location.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name of the InternalRange.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/internalRanges", +"request": { +"$ref": "InternalRange" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single internal range.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.internalRanges.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the InternalRange to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single internal range.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.internalRanges.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InternalRange to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "InternalRange" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.internalRanges.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists internal ranges in a given project and location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.internalRanges.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource's name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/internalRanges", +"response": { +"$ref": "ListInternalRangesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single internal range.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.internalRanges.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the internal range resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "InternalRange" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.internalRanges.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/internalRanges/{internalRangesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.internalRanges.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/internalRanges/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:cancel", +"request": { +"$ref": "GoogleLongrunningCancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"spokes": { +"methods": { +"create": { +"description": "Creates a Network Connectivity Center spoke.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.spokes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent's resource name of the Spoke.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"spokeId": { +"description": "Optional. Unique id for the Spoke to create.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/spokes", +"request": { +"$ref": "Spoke" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Network Connectivity Center spoke.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", +"httpMethod": "DELETE", +"id": "networkconnectivity.projects.locations.spokes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Spoke to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details about a Network Connectivity Center spoke.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.spokes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of Spoke resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Spoke" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.spokes.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the Network Connectivity Center spokes in a specified project and location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes", +"httpMethod": "GET", +"id": "networkconnectivity.projects.locations.spokes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters the results listed in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort the results by a certain order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results per page that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent's resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/spokes", +"response": { +"$ref": "ListSpokesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a Network Connectivity Center spoke.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}", +"httpMethod": "PATCH", +"id": "networkconnectivity.projects.locations.spokes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The name of a Spoke resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the Spoke resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "Spoke" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.spokes.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/spokes/{spokesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkconnectivity.projects.locations.spokes.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/spokes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240313", +"rootUrl": "https://networkconnectivity.googleapis.com/", +"schemas": { +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningCancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "GoogleLongrunningCancelOperationRequest", +"properties": {}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Hub": { +"description": "Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model. Following is the resource message of a hub.", +"id": "Hub", +"properties": { +"createTime": { +"description": "Time when the Hub was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "Short description of the hub resource.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. The name of a Hub resource.", +"type": "string" +}, +"spokes": { +"deprecated": true, +"description": "Output only. A list of the URIs of all attached spokes. This field is deprecated and will not be included in future API versions. Call ListSpokes on each region instead.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"state": { +"description": "Output only. The current lifecycle state of this Hub.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"UPDATING" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress", +"The resource is active", +"The resource's Delete operation is in progress", +"The resource's Update operation is in progress" +], +"readOnly": true, +"type": "string" +}, +"uniqueId": { +"description": "Output only. Google-generated UUID for this resource. This is unique across all Hub resources. If a Hub resource is deleted and another with the same name is created, it gets a different unique_id.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Time when the Hub was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"InternalRange": { +"description": "The internal range resource for IPAM operations within a VPC network. Used to represent a private address range along with behavioral characterstics of that range (its usage and peering behavior). Networking resources can link to this range if they are created as belonging to it.", +"id": "InternalRange", +"properties": { +"createTime": { +"description": "Time when the internal range was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "A description of this resource.", +"type": "string" +}, +"ipCidrRange": { +"description": "IP range that this internal range defines.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"name": { +"description": "Immutable. The name of an internal range. Format: projects/{project}/locations/{location}/internalRanges/{internal_range} See: https://google.aip.dev/122#fields-representing-resource-names", +"type": "string" +}, +"network": { +"description": "The URL or resource ID of the network in which to reserve the internal range. The network cannot be deleted if there are any reserved internal ranges referring to it. Legacy networks are not supported. This can only be specified for a global internal address. Example: - URL: /compute/v1/projects/{project}/global/networks/{resourceId} - ID: network123", +"type": "string" +}, +"overlaps": { +"description": "Optional. Types of resources that are allowed to overlap with the current internal range.", +"items": { +"enum": [ +"OVERLAP_UNSPECIFIED", +"OVERLAP_ROUTE_RANGE", +"OVERLAP_EXISTING_SUBNET_RANGE" +], +"enumDescriptions": [ +"No overlap overrides.", +"Allow creation of static routes more specific than the current internal range.", +"Allow creation of internal ranges that overlap with existing subnets." +], +"type": "string" +}, +"type": "array" +}, +"peering": { +"description": "The type of peering set for this internal range.", +"enum": [ +"PEERING_UNSPECIFIED", +"FOR_SELF", +"FOR_PEER", +"NOT_SHARED" +], +"enumDescriptions": [ +"If Peering is left unspecified in CreateInternalRange or UpdateInternalRange, it will be defaulted to FOR_SELF.", +"This is the default behavior and represents the case that this internal range is intended to be used in the VPC in which it is created and is accessible from its peers. This implies that peers or peers-of-peers cannot use this range.", +"This behavior can be set when the internal range is being reserved for usage by the peers. This means that no resource within the VPC in which it is being created can use this to associate with a VPC resource, but one of the peers can. This represents donating a range for peers to use.", +"This behavior can be set when the internal range is being reserved for usage by the VPC in which it is created but not shared with the peers. In a sense it is local to the VPC. This can be used to create internal ranges for various purposes like HTTP_INTERNAL_LOAD_BALANCER or for Interconnect routes that are not shared with peers. This also implies that peers cannot use this range in a way that is visible to this VPC, but can re-use this range as long as it is NOT_SHARED from the peer VPC, too." +], +"type": "string" +}, +"prefixLength": { +"description": "An alternative to ip_cidr_range. Can be set when trying to create a reservation that automatically finds a free range of the given size. If both ip_cidr_range and prefix_length are set, there is an error if the range sizes do not match. Can also be used during updates to change the range size.", +"format": "int32", +"type": "integer" +}, +"targetCidrRange": { +"description": "Optional. Can be set to narrow down or pick a different address space while searching for a free range. If not set, defaults to the \"10.0.0.0/8\" address space. This can be used to search in other rfc-1918 address spaces like \"172.16.0.0/12\" and \"192.168.0.0/16\" or non-rfc-1918 address spaces used in the VPC.", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Time when the internal range was updated.", +"format": "google-datetime", +"type": "string" +}, +"usage": { +"description": "The type of usage set for this internal range.", +"enum": [ +"USAGE_UNSPECIFIED", +"FOR_VPC", +"EXTERNAL_TO_VPC" +], +"enumDescriptions": [ +"Unspecified usage is allowed in calls which identify the resource by other fields and do not need Usage set to complete. These are, i.e.: GetInternalRange and DeleteInternalRange. Usage needs to be specified explicitly in CreateInternalRange or UpdateInternalRange calls.", +"A VPC resource can use the reserved CIDR block by associating it with the internal range resource if usage is set to FOR_VPC.", +"Ranges created with EXTERNAL_TO_VPC cannot be associated with VPC resources and are meant to block out address ranges for various use cases such as usage on-premises, with dynamic route announcements via Interconnect." +], +"type": "string" +}, +"users": { +"description": "Output only. The list of resources that refer to this internal range. Resources that use the internal range for their range allocation are referred to as users of the range. Other resources mark themselves as users while doing so by creating a reference to this internal range. Having a user, based on this reference, prevents deletion of the internal range that is referred to. Can be empty.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListHubsResponse": { +"description": "Response for HubService.ListHubs method.", +"id": "ListHubsResponse", +"properties": { +"hubs": { +"description": "Hubs to be returned.", +"items": { +"$ref": "Hub" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInternalRangesResponse": { +"description": "Response for InternalRange.ListInternalRanges", +"id": "ListInternalRangesResponse", +"properties": { +"internalRanges": { +"description": "Internal range to be returned.", +"items": { +"$ref": "InternalRange" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListSpokesResponse": { +"description": "The response for HubService.ListSpokes.", +"id": "ListSpokesResponse", +"properties": { +"nextPageToken": { +"description": "The next pagination token in the List response. It should be used as page_token for the following request. An empty value means no more result.", +"type": "string" +}, +"spokes": { +"description": "Spokes to be returned.", +"items": { +"$ref": "Spoke" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"RouterApplianceInstance": { +"description": "RouterAppliance represents a Router appliance which is specified by a VM URI and a NIC address.", +"id": "RouterApplianceInstance", +"properties": { +"ipAddress": { +"description": "The IP address of the network interface to use for peering.", +"type": "string" +}, +"networkInterface": { +"deprecated": true, +"type": "string" +}, +"virtualMachine": { +"description": "The URI of the virtual machine resource", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Spoke": { +"description": "A Spoke is an abstraction of a network attachment being attached to a Hub. A Spoke can be underlying a VPN tunnel, a VLAN (interconnect) attachment, a Router appliance, etc.", +"id": "Spoke", +"properties": { +"createTime": { +"description": "The time when the Spoke was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "Short description of the spoke resource", +"type": "string" +}, +"hub": { +"description": "The resource URL of the hub resource that the spoke is attached to", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-defined labels.", +"type": "object" +}, +"linkedInterconnectAttachments": { +"description": "The URIs of linked interconnect attachment resources", +"items": { +"type": "string" +}, +"type": "array" +}, +"linkedRouterApplianceInstances": { +"description": "The URIs of linked Router appliance resources", +"items": { +"$ref": "RouterApplianceInstance" +}, +"type": "array" +}, +"linkedVpnTunnels": { +"description": "The URIs of linked VPN tunnel resources", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. The name of a Spoke resource.", +"type": "string" +}, +"state": { +"description": "Output only. The current lifecycle state of this Hub.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"UPDATING" +], +"enumDescriptions": [ +"No state information available", +"The resource's create operation is in progress", +"The resource is active", +"The resource's Delete operation is in progress", +"The resource's Update operation is in progress" +], +"readOnly": true, +"type": "string" +}, +"uniqueId": { +"description": "Output only. Google-generated UUID for this resource. This is unique across all Spoke resources. If a Spoke resource is deleted and another with the same name is created, it gets a different unique_id.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "The time when the Spoke was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Connectivity API", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkmanagement.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkmanagement.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..f273123819d1f9abdc36e33fd69dc8f4154c44ed --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkmanagement.v1.json @@ -0,0 +1,2917 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networkmanagement.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Network Management", +"description": "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networkmanagement:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networkmanagement.mtls.googleapis.com/", +"name": "networkmanagement", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"global": { +"resources": { +"connectivityTests": { +"methods": { +"create": { +"description": "Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the Connectivity Test to create: `projects/{project_id}/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +}, +"testId": { +"description": "Required. The logical name of the Connectivity Test in your project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/connectivityTests", +"request": { +"$ref": "ConnectivityTest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a specific `ConnectivityTest`.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", +"httpMethod": "DELETE", +"id": "networkmanagement.projects.locations.global.connectivityTests.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Connectivity Test resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a specific Connectivity Test.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.connectivityTests.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. `ConnectivityTest` resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ConnectivityTest" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.connectivityTests.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Connectivity Tests owned by a project.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.connectivityTests.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Lists the `ConnectivityTests` that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form ` ` where operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/proj-1/locations/global/connectivityTests/test-1 - Filter by labels: - Resources that have a key called `foo` labels.foo:* - Resources that have a key called `foo` whose value is `bar` labels.foo = bar", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Field to use to sort the list.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of `ConnectivityTests` to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token from an earlier query, as returned in `next_page_token`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the Connectivity Tests: `projects/{project_id}/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/connectivityTests", +"response": { +"$ref": "ListConnectivityTestsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", +"httpMethod": "PATCH", +"id": "networkmanagement.projects.locations.global.connectivityTests.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Unique name of the resource using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields to update. At least one path must be supplied in this field.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ConnectivityTest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rerun": { +"description": "Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:rerun", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.rerun", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Connectivity Test resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:rerun", +"request": { +"$ref": "RerunConnectivityTestRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/global/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networkmanagement.projects.locations.global.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/global/operations/{operationsId}", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/global/operations", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://networkmanagement.googleapis.com/", +"schemas": { +"AbortInfo": { +"description": "Details of the final state \"abort\" and associated resource.", +"id": "AbortInfo", +"properties": { +"cause": { +"description": "Causes that the analysis is aborted.", +"enum": [ +"CAUSE_UNSPECIFIED", +"UNKNOWN_NETWORK", +"UNKNOWN_PROJECT", +"NO_EXTERNAL_IP", +"UNINTENDED_DESTINATION", +"SOURCE_ENDPOINT_NOT_FOUND", +"MISMATCHED_SOURCE_NETWORK", +"DESTINATION_ENDPOINT_NOT_FOUND", +"MISMATCHED_DESTINATION_NETWORK", +"UNKNOWN_IP", +"SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK", +"PERMISSION_DENIED", +"PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS", +"PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS", +"NO_SOURCE_LOCATION", +"INVALID_ARGUMENT", +"TRACE_TOO_LONG", +"INTERNAL_ERROR", +"UNSUPPORTED", +"MISMATCHED_IP_VERSION", +"GKE_KONNECTIVITY_PROXY_UNSUPPORTED", +"RESOURCE_CONFIG_NOT_FOUND", +"VM_INSTANCE_CONFIG_NOT_FOUND", +"NETWORK_CONFIG_NOT_FOUND", +"FIREWALL_CONFIG_NOT_FOUND", +"ROUTE_CONFIG_NOT_FOUND", +"GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", +"SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", +"SOURCE_FORWARDING_RULE_UNSUPPORTED", +"NON_ROUTABLE_IP_ADDRESS", +"UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT", +"UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG" +], +"enumDeprecated": [ +false, +true, +true, +true, +true, +true, +true, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Cause is unspecified.", +"Aborted due to unknown network. Deprecated, not used in the new tests.", +"Aborted because no project information can be derived from the test input. Deprecated, not used in the new tests.", +"Aborted because traffic is sent from a public IP to an instance without an external IP. Deprecated, not used in the new tests.", +"Aborted because none of the traces matches destination information specified in the input test request. Deprecated, not used in the new tests.", +"Aborted because the source endpoint could not be found. Deprecated, not used in the new tests.", +"Aborted because the source network does not match the source endpoint. Deprecated, not used in the new tests.", +"Aborted because the destination endpoint could not be found. Deprecated, not used in the new tests.", +"Aborted because the destination network does not match the destination endpoint. Deprecated, not used in the new tests.", +"Aborted because no endpoint with the packet's destination IP address is found.", +"Aborted because the source IP address doesn't belong to any of the subnets of the source VPC network.", +"Aborted because user lacks permission to access all or part of the network configurations required to run the test.", +"Aborted because user lacks permission to access Cloud NAT configs required to run the test.", +"Aborted because user lacks permission to access Network endpoint group endpoint configs required to run the test.", +"Aborted because no valid source or destination endpoint is derived from the input test request.", +"Aborted because the source or destination endpoint specified in the request is invalid. Some examples: - The request might contain malformed resource URI, project ID, or IP address. - The request might contain inconsistent information (for example, the request might include both the instance and the network, but the instance might not have a NIC in that network).", +"Aborted because the number of steps in the trace exceeds a certain limit. It might be caused by a routing loop.", +"Aborted due to internal server error.", +"Aborted because the test scenario is not supported.", +"Aborted because the source and destination resources have no common IP version.", +"Aborted because the connection between the control plane and the node of the source cluster is initiated by the node and managed by the Konnectivity proxy.", +"Aborted because expected resource configuration was missing.", +"Aborted because expected VM instance configuration was missing.", +"Aborted because expected network configuration was missing.", +"Aborted because expected firewall configuration was missing.", +"Aborted because expected route configuration was missing.", +"Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", +"Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", +"Aborted because tests with a forwarding rule as a source are not supported.", +"Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc).", +"Aborted due to an unknown issue in the Google-managed project.", +"Aborted due to an unsupported configuration of the Google-managed project." +], +"type": "string" +}, +"ipAddress": { +"description": "IP address that caused the abort.", +"type": "string" +}, +"projectsMissingPermission": { +"description": "List of project IDs the user specified in the request but lacks access to. In this case, analysis is aborted with the PERMISSION_DENIED cause.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resourceUri": { +"description": "URI of the resource that caused the abort.", +"type": "string" +} +}, +"type": "object" +}, +"AppEngineVersionEndpoint": { +"description": "Wrapper for the App Engine service version attributes.", +"id": "AppEngineVersionEndpoint", +"properties": { +"uri": { +"description": "An [App Engine](https://cloud.google.com/appengine) [service version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) name.", +"type": "string" +} +}, +"type": "object" +}, +"AppEngineVersionInfo": { +"description": "For display only. Metadata associated with an App Engine version.", +"id": "AppEngineVersionInfo", +"properties": { +"displayName": { +"description": "Name of an App Engine version.", +"type": "string" +}, +"environment": { +"description": "App Engine execution environment for a version.", +"type": "string" +}, +"runtime": { +"description": "Runtime of the App Engine version.", +"type": "string" +}, +"uri": { +"description": "URI of an App Engine version.", +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CloudFunctionEndpoint": { +"description": "Wrapper for Cloud Function attributes.", +"id": "CloudFunctionEndpoint", +"properties": { +"uri": { +"description": "A [Cloud Function](https://cloud.google.com/functions) name.", +"type": "string" +} +}, +"type": "object" +}, +"CloudFunctionInfo": { +"description": "For display only. Metadata associated with a Cloud Function.", +"id": "CloudFunctionInfo", +"properties": { +"displayName": { +"description": "Name of a Cloud Function.", +"type": "string" +}, +"location": { +"description": "Location in which the Cloud Function is deployed.", +"type": "string" +}, +"uri": { +"description": "URI of a Cloud Function.", +"type": "string" +}, +"versionId": { +"description": "Latest successfully deployed version id of the Cloud Function.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CloudRunRevisionEndpoint": { +"description": "Wrapper for Cloud Run revision attributes.", +"id": "CloudRunRevisionEndpoint", +"properties": { +"uri": { +"description": "A [Cloud Run](https://cloud.google.com/run) [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) URI. The format is: projects/{project}/locations/{location}/revisions/{revision}", +"type": "string" +} +}, +"type": "object" +}, +"CloudRunRevisionInfo": { +"description": "For display only. Metadata associated with a Cloud Run revision.", +"id": "CloudRunRevisionInfo", +"properties": { +"displayName": { +"description": "Name of a Cloud Run revision.", +"type": "string" +}, +"location": { +"description": "Location in which this revision is deployed.", +"type": "string" +}, +"serviceUri": { +"description": "URI of Cloud Run service this revision belongs to.", +"type": "string" +}, +"uri": { +"description": "URI of a Cloud Run revision.", +"type": "string" +} +}, +"type": "object" +}, +"CloudSQLInstanceInfo": { +"description": "For display only. Metadata associated with a Cloud SQL instance.", +"id": "CloudSQLInstanceInfo", +"properties": { +"displayName": { +"description": "Name of a Cloud SQL instance.", +"type": "string" +}, +"externalIp": { +"description": "External IP address of a Cloud SQL instance.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of a Cloud SQL instance.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Cloud SQL instance network or empty string if the instance does not have one.", +"type": "string" +}, +"region": { +"description": "Region in which the Cloud SQL instance is running.", +"type": "string" +}, +"uri": { +"description": "URI of a Cloud SQL instance.", +"type": "string" +} +}, +"type": "object" +}, +"ConnectivityTest": { +"description": "A Connectivity Test for a network reachability analysis.", +"id": "ConnectivityTest", +"properties": { +"bypassFirewallChecks": { +"description": "Whether the test should skip firewall checking. If not provided, we assume false.", +"type": "boolean" +}, +"createTime": { +"description": "Output only. The time the test was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "The user-supplied description of the Connectivity Test. Maximum of 512 characters.", +"type": "string" +}, +"destination": { +"$ref": "Endpoint", +"description": "Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test." +}, +"displayName": { +"description": "Output only. The display name of a Connectivity Test.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user-provided metadata.", +"type": "object" +}, +"name": { +"description": "Required. Unique name of the resource using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"type": "string" +}, +"probingDetails": { +"$ref": "ProbingDetails", +"description": "Output only. The probing details of this test from the latest run, present for applicable tests only. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", +"readOnly": true +}, +"protocol": { +"description": "IP Protocol of the test. When not provided, \"TCP\" is assumed.", +"type": "string" +}, +"reachabilityDetails": { +"$ref": "ReachabilityDetails", +"description": "Output only. The reachability details of this test from the latest run. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", +"readOnly": true +}, +"relatedProjects": { +"description": "Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.", +"items": { +"type": "string" +}, +"type": "array" +}, +"source": { +"$ref": "Endpoint", +"description": "Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test." +}, +"updateTime": { +"description": "Output only. The time the test's configuration was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"DeliverInfo": { +"description": "Details of the final state \"deliver\" and associated resource.", +"id": "DeliverInfo", +"properties": { +"ipAddress": { +"description": "IP address of the target (if applicable).", +"type": "string" +}, +"resourceUri": { +"description": "URI of the resource that the packet is delivered to.", +"type": "string" +}, +"target": { +"description": "Target type where the packet is delivered to.", +"enum": [ +"TARGET_UNSPECIFIED", +"INSTANCE", +"INTERNET", +"GOOGLE_API", +"GKE_MASTER", +"CLOUD_SQL_INSTANCE", +"PSC_PUBLISHED_SERVICE", +"PSC_GOOGLE_API", +"PSC_VPC_SC", +"SERVERLESS_NEG", +"STORAGE_BUCKET", +"PRIVATE_NETWORK", +"CLOUD_FUNCTION", +"APP_ENGINE_VERSION", +"CLOUD_RUN_REVISION" +], +"enumDescriptions": [ +"Target not specified.", +"Target is a Compute Engine instance.", +"Target is the internet.", +"Target is a Google API.", +"Target is a Google Kubernetes Engine cluster master.", +"Target is a Cloud SQL instance.", +"Target is a published service that uses [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).", +"Target is all Google APIs that use [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).", +"Target is a VPC-SC that uses [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).", +"Target is a serverless network endpoint group.", +"Target is a Cloud Storage bucket.", +"Target is a private network. Used only for return traces.", +"Target is a Cloud Function. Used only for return traces.", +"Target is a App Engine service version. Used only for return traces.", +"Target is a Cloud Run revision. Used only for return traces." +], +"type": "string" +} +}, +"type": "object" +}, +"DropInfo": { +"description": "Details of the final state \"drop\" and associated resource.", +"id": "DropInfo", +"properties": { +"cause": { +"description": "Cause that the packet is dropped.", +"enum": [ +"CAUSE_UNSPECIFIED", +"UNKNOWN_EXTERNAL_ADDRESS", +"FOREIGN_IP_DISALLOWED", +"FIREWALL_RULE", +"NO_ROUTE", +"ROUTE_BLACKHOLE", +"ROUTE_WRONG_NETWORK", +"ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED", +"ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND", +"ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK", +"ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP", +"ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH", +"ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED", +"ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID", +"NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS", +"VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH", +"VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH", +"PRIVATE_TRAFFIC_TO_INTERNET", +"PRIVATE_GOOGLE_ACCESS_DISALLOWED", +"PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED", +"NO_EXTERNAL_ADDRESS", +"UNKNOWN_INTERNAL_ADDRESS", +"FORWARDING_RULE_MISMATCH", +"FORWARDING_RULE_NO_INSTANCES", +"FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK", +"INSTANCE_NOT_RUNNING", +"GKE_CLUSTER_NOT_RUNNING", +"CLOUD_SQL_INSTANCE_NOT_RUNNING", +"TRAFFIC_TYPE_BLOCKED", +"GKE_MASTER_UNAUTHORIZED_ACCESS", +"CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS", +"DROPPED_INSIDE_GKE_SERVICE", +"DROPPED_INSIDE_CLOUD_SQL_SERVICE", +"GOOGLE_MANAGED_SERVICE_NO_PEERING", +"GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT", +"GKE_PSC_ENDPOINT_MISSING", +"CLOUD_SQL_INSTANCE_NO_IP_ADDRESS", +"GKE_CONTROL_PLANE_REGION_MISMATCH", +"PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION", +"GKE_CONTROL_PLANE_NO_ROUTE", +"CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC", +"PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION", +"CLOUD_SQL_INSTANCE_NO_ROUTE", +"CLOUD_FUNCTION_NOT_ACTIVE", +"VPC_CONNECTOR_NOT_SET", +"VPC_CONNECTOR_NOT_RUNNING", +"FORWARDING_RULE_REGION_MISMATCH", +"PSC_CONNECTION_NOT_ACCEPTED", +"PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", +"PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", +"PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", +"CLOUD_SQL_PSC_NEG_UNSUPPORTED", +"NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT", +"HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", +"HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", +"CLOUD_RUN_REVISION_NOT_READY", +"DROPPED_INSIDE_PSC_SERVICE_PRODUCER", +"LOAD_BALANCER_HAS_NO_PROXY_SUBNET", +"CLOUD_NAT_NO_ADDRESSES", +"ROUTING_LOOP" +], +"enumDescriptions": [ +"Cause is unspecified.", +"Destination external address cannot be resolved to a known target. If the address is used in a Google Cloud project, provide the project ID as test input.", +"A Compute Engine instance can only send or receive a packet with a foreign IP address if ip_forward is enabled.", +"Dropped due to a firewall rule, unless allowed due to connection tracking.", +"Dropped due to no matching routes.", +"Dropped due to invalid route. Route's next hop is a blackhole.", +"Packet is sent to a wrong (unintended) network. Example: you trace a packet from VM1:Network1 to VM2:Network2, however, the route configured in Network1 sends the packet destined for VM2's IP address to Network3.", +"Route's next hop IP address cannot be resolved to a GCP resource.", +"Route's next hop resource is not found.", +"Route's next hop instance doesn't have a NIC in the route's network.", +"Route's next hop IP address is not a primary IP address of the next hop instance.", +"Route's next hop forwarding rule doesn't match next hop IP address.", +"Route's next hop VPN tunnel is down (does not have valid IKE SAs).", +"Route's next hop forwarding rule type is invalid (it's not a forwarding rule of the internal passthrough load balancer).", +"Packet is sent from the Internet to the private IPv6 address.", +"The packet does not match a policy-based VPN tunnel local selector.", +"The packet does not match a policy-based VPN tunnel remote selector.", +"Packet with internal destination address sent to the internet gateway.", +"Instance with only an internal IP address tries to access Google API and services, but private Google access is not enabled in the subnet.", +"Source endpoint tries to access Google API and services through the VPN tunnel to another network, but Private Google Access needs to be enabled in the source endpoint network.", +"Instance with only an internal IP address tries to access external hosts, but Cloud NAT is not enabled in the subnet, unless special configurations on a VM allow this connection.", +"Destination internal address cannot be resolved to a known target. If this is a shared VPC scenario, verify if the service project ID is provided as test input. Otherwise, verify if the IP address is being used in the project.", +"Forwarding rule's protocol and ports do not match the packet header.", +"Forwarding rule does not have backends configured.", +"Firewalls block the health check probes to the backends and cause the backends to be unavailable for traffic from the load balancer. For more details, see [Health check firewall rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).", +"Packet is sent from or to a Compute Engine instance that is not in a running state.", +"Packet sent from or to a GKE cluster that is not in running state.", +"Packet sent from or to a Cloud SQL instance that is not in running state.", +"The type of traffic is blocked and the user cannot configure a firewall rule to enable it. See [Always blocked traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for more details.", +"Access to Google Kubernetes Engine cluster master's endpoint is not authorized. See [Access to the cluster endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) for more details.", +"Access to the Cloud SQL instance endpoint is not authorized. See [Authorizing with authorized networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for more details.", +"Packet was dropped inside Google Kubernetes Engine Service.", +"Packet was dropped inside Cloud SQL Service.", +"Packet was dropped because there is no peering between the originating network and the Google Managed Services Network.", +"Packet was dropped because the Google-managed service uses Private Service Connect (PSC), but the PSC endpoint is not found in the project.", +"Packet was dropped because the GKE cluster uses Private Service Connect (PSC), but the PSC endpoint is not found in the project.", +"Packet was dropped because the Cloud SQL instance has neither a private nor a public IP address.", +"Packet was dropped because a GKE cluster private endpoint is unreachable from a region different from the cluster's region.", +"Packet sent from a public GKE cluster control plane to a private IP address.", +"Packet was dropped because there is no route from a GKE cluster control plane to a destination network.", +"Packet sent from a Cloud SQL instance to an external IP address is not allowed. The Cloud SQL instance is not configured to send packets to external IP addresses.", +"Packet sent from a Cloud SQL instance with only a public IP address to a private IP address.", +"Packet was dropped because there is no route from a Cloud SQL instance to a destination network.", +"Packet could be dropped because the Cloud Function is not in an active status.", +"Packet could be dropped because no VPC connector is set.", +"Packet could be dropped because the VPC connector is not in a running state.", +"Packet could be dropped because it was sent from a different region to a regional forwarding without global access.", +"The Private Service Connect endpoint is in a project that is not approved to connect to the service.", +"The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", +"The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", +"The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", +"The packet is sent to the Private Service Connect backend (network endpoint group) targeting a Cloud SQL service attachment, but this configuration is not supported.", +"No NAT subnets are defined for the PSC service attachment.", +"The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", +"The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", +"Packet sent from a Cloud Run revision that is not ready.", +"Packet was dropped inside Private Service Connect service producer.", +"Packet sent to a load balancer, which requires a proxy-only subnet and the subnet is not found.", +"Packet sent to Cloud Nat without active NAT IPs.", +"Packet is stuck in a routing loop." +], +"type": "string" +}, +"destinationIp": { +"description": "Destination IP address of the dropped packet (if relevant).", +"type": "string" +}, +"region": { +"description": "Region of the dropped packet (if relevant).", +"type": "string" +}, +"resourceUri": { +"description": "URI of the resource that caused the drop.", +"type": "string" +}, +"sourceIp": { +"description": "Source IP address of the dropped packet (if relevant).", +"type": "string" +} +}, +"type": "object" +}, +"EdgeLocation": { +"description": "Representation of a network edge location as per https://cloud.google.com/vpc/docs/edge-locations.", +"id": "EdgeLocation", +"properties": { +"metropolitanArea": { +"description": "Name of the metropolitan area.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "Source or destination of the Connectivity Test.", +"id": "Endpoint", +"properties": { +"appEngineVersion": { +"$ref": "AppEngineVersionEndpoint", +"description": "An [App Engine](https://cloud.google.com/appengine) [service version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)." +}, +"cloudFunction": { +"$ref": "CloudFunctionEndpoint", +"description": "A [Cloud Function](https://cloud.google.com/functions)." +}, +"cloudRunRevision": { +"$ref": "CloudRunRevisionEndpoint", +"description": "A [Cloud Run](https://cloud.google.com/run) [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)" +}, +"cloudSqlInstance": { +"description": "A [Cloud SQL](https://cloud.google.com/sql) instance URI.", +"type": "string" +}, +"forwardingRule": { +"description": "A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules are also used for protocol forwarding, Private Service Connect and other network services to provide forwarding information in the control plane. Format: projects/{project}/global/forwardingRules/{id} or projects/{project}/regions/{region}/forwardingRules/{id}", +"type": "string" +}, +"forwardingRuleTarget": { +"description": "Output only. Specifies the type of the target of the forwarding rule.", +"enum": [ +"FORWARDING_RULE_TARGET_UNSPECIFIED", +"INSTANCE", +"LOAD_BALANCER", +"VPN_GATEWAY", +"PSC" +], +"enumDescriptions": [ +"Forwarding rule target is unknown.", +"Compute Engine instance for protocol forwarding.", +"Load Balancer. The specific type can be found from load_balancer_type.", +"Classic Cloud VPN Gateway.", +"Forwarding Rule is a Private Service Connect endpoint." +], +"readOnly": true, +"type": "string" +}, +"gkeMasterCluster": { +"description": "A cluster URI for [Google Kubernetes Engine master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).", +"type": "string" +}, +"instance": { +"description": "A Compute Engine instance URI.", +"type": "string" +}, +"ipAddress": { +"description": "The IP address of the endpoint, which can be an external or internal IP.", +"type": "string" +}, +"loadBalancerId": { +"description": "Output only. ID of the load balancer the forwarding rule points to. Empty for forwarding rules not related to load balancers.", +"readOnly": true, +"type": "string" +}, +"loadBalancerType": { +"description": "Output only. Type of the load balancer the forwarding rule points to.", +"enum": [ +"LOAD_BALANCER_TYPE_UNSPECIFIED", +"HTTPS_ADVANCED_LOAD_BALANCER", +"HTTPS_LOAD_BALANCER", +"REGIONAL_HTTPS_LOAD_BALANCER", +"INTERNAL_HTTPS_LOAD_BALANCER", +"SSL_PROXY_LOAD_BALANCER", +"TCP_PROXY_LOAD_BALANCER", +"INTERNAL_TCP_PROXY_LOAD_BALANCER", +"NETWORK_LOAD_BALANCER", +"LEGACY_NETWORK_LOAD_BALANCER", +"TCP_UDP_INTERNAL_LOAD_BALANCER" +], +"enumDescriptions": [ +"Forwarding rule points to a different target than a load balancer or a load balancer type is unknown.", +"Global external HTTP(S) load balancer.", +"Global external HTTP(S) load balancer (classic)", +"Regional external HTTP(S) load balancer.", +"Internal HTTP(S) load balancer.", +"External SSL proxy load balancer.", +"External TCP proxy load balancer.", +"Internal regional TCP proxy load balancer.", +"External TCP/UDP Network load balancer.", +"Target-pool based external TCP/UDP Network load balancer.", +"Internal TCP/UDP load balancer." +], +"readOnly": true, +"type": "string" +}, +"network": { +"description": "A Compute Engine network URI.", +"type": "string" +}, +"networkType": { +"description": "Type of the network where the endpoint is located. Applicable only to source endpoint, as destination network type can be inferred from the source.", +"enum": [ +"NETWORK_TYPE_UNSPECIFIED", +"GCP_NETWORK", +"NON_GCP_NETWORK" +], +"enumDescriptions": [ +"Default type if unspecified.", +"A network hosted within Google Cloud. To receive more detailed output, specify the URI for the source or destination network.", +"A network hosted outside of Google Cloud. This can be an on-premises network, or a network hosted by another cloud provider." +], +"type": "string" +}, +"port": { +"description": "The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"projectId": { +"description": "Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID: 1. Only the IP address is specified, and the IP address is within a Google Cloud project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.", +"type": "string" +} +}, +"type": "object" +}, +"EndpointInfo": { +"description": "For display only. The specification of the endpoints for the test. EndpointInfo is derived from source and destination Endpoint and validated by the backend data plane model.", +"id": "EndpointInfo", +"properties": { +"destinationIp": { +"description": "Destination IP address.", +"type": "string" +}, +"destinationNetworkUri": { +"description": "URI of the network where this packet is sent to.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IP protocol in string format, for example: \"TCP\", \"UDP\", \"ICMP\".", +"type": "string" +}, +"sourceAgentUri": { +"description": "URI of the source telemetry agent this packet originates from.", +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourceNetworkUri": { +"description": "URI of the network where this packet originates from.", +"type": "string" +}, +"sourcePort": { +"description": "Source port. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"FirewallInfo": { +"description": "For display only. Metadata associated with a VPC firewall rule, an implied VPC firewall rule, or a hierarchical firewall policy rule.", +"id": "FirewallInfo", +"properties": { +"action": { +"description": "Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP", +"type": "string" +}, +"direction": { +"description": "Possible values: INGRESS, EGRESS", +"type": "string" +}, +"displayName": { +"description": "The display name of the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", +"type": "string" +}, +"firewallRuleType": { +"description": "The firewall rule's type.", +"enum": [ +"FIREWALL_RULE_TYPE_UNSPECIFIED", +"HIERARCHICAL_FIREWALL_POLICY_RULE", +"VPC_FIREWALL_RULE", +"IMPLIED_VPC_FIREWALL_RULE", +"SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE", +"NETWORK_FIREWALL_POLICY_RULE", +"NETWORK_REGIONAL_FIREWALL_POLICY_RULE", +"UNSUPPORTED_FIREWALL_POLICY_RULE", +"TRACKING_STATE" +], +"enumDescriptions": [ +"Unspecified type.", +"Hierarchical firewall policy rule. For details, see [Hierarchical firewall policies overview](https://cloud.google.com/vpc/docs/firewall-policies).", +"VPC firewall rule. For details, see [VPC firewall rules overview](https://cloud.google.com/vpc/docs/firewalls).", +"Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).", +"Implicit firewall rules that are managed by serverless VPC access to allow ingress access. They are not visible in the Google Cloud console. For details, see [VPC connector's implicit rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).", +"Global network firewall policy rule. For details, see [Network firewall policies](https://cloud.google.com/vpc/docs/network-firewall-policies).", +"Regional network firewall policy rule. For details, see [Regional network firewall policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).", +"Firewall policy rule containing attributes not yet supported in Connectivity tests. Firewall analysis is skipped if such a rule can potentially be matched. Please see the [list of unsupported configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs).", +"Tracking state for response traffic created when request traffic goes through allow firewall rule. For details, see [firewall rules specifications](https://cloud.google.com/firewall/docs/firewalls#specifications)" +], +"type": "string" +}, +"networkUri": { +"description": "The URI of the VPC network that the firewall rule is associated with. This field is not applicable to hierarchical firewall policy rules.", +"type": "string" +}, +"policy": { +"description": "The hierarchical firewall policy that this rule is associated with. This field is not applicable to VPC firewall rules.", +"type": "string" +}, +"priority": { +"description": "The priority of the firewall rule.", +"format": "int32", +"type": "integer" +}, +"targetServiceAccounts": { +"description": "The target service accounts specified by the firewall rule.", +"items": { +"type": "string" +}, +"type": "array" +}, +"targetTags": { +"description": "The target tags defined by the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uri": { +"description": "The URI of the VPC firewall rule. This field is not applicable to implied firewall rules or hierarchical firewall policy rules.", +"type": "string" +} +}, +"type": "object" +}, +"ForwardInfo": { +"description": "Details of the final state \"forward\" and associated resource.", +"id": "ForwardInfo", +"properties": { +"ipAddress": { +"description": "IP address of the target (if applicable).", +"type": "string" +}, +"resourceUri": { +"description": "URI of the resource that the packet is forwarded to.", +"type": "string" +}, +"target": { +"description": "Target type where this packet is forwarded to.", +"enum": [ +"TARGET_UNSPECIFIED", +"PEERING_VPC", +"VPN_GATEWAY", +"INTERCONNECT", +"GKE_MASTER", +"IMPORTED_CUSTOM_ROUTE_NEXT_HOP", +"CLOUD_SQL_INSTANCE", +"ANOTHER_PROJECT", +"NCC_HUB", +"ROUTER_APPLIANCE" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +false, +true, +false, +false, +false +], +"enumDescriptions": [ +"Target not specified.", +"Forwarded to a VPC peering network.", +"Forwarded to a Cloud VPN gateway.", +"Forwarded to a Cloud Interconnect connection.", +"Forwarded to a Google Kubernetes Engine Container cluster master.", +"Forwarded to the next hop of a custom route imported from a peering VPC.", +"Forwarded to a Cloud SQL instance.", +"Forwarded to a VPC network in another project.", +"Forwarded to an NCC Hub.", +"Forwarded to a router appliance." +], +"type": "string" +} +}, +"type": "object" +}, +"ForwardingRuleInfo": { +"description": "For display only. Metadata associated with a Compute Engine forwarding rule.", +"id": "ForwardingRuleInfo", +"properties": { +"displayName": { +"description": "Name of a Compute Engine forwarding rule.", +"type": "string" +}, +"matchedPortRange": { +"description": "Port range defined in the forwarding rule that matches the test.", +"type": "string" +}, +"matchedProtocol": { +"description": "Protocol defined in the forwarding rule that matches the test.", +"type": "string" +}, +"networkUri": { +"description": "Network URI. Only valid for Internal Load Balancer.", +"type": "string" +}, +"target": { +"description": "Target type of the forwarding rule.", +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine forwarding rule.", +"type": "string" +}, +"vip": { +"description": "VIP of the forwarding rule.", +"type": "string" +} +}, +"type": "object" +}, +"GKEMasterInfo": { +"description": "For display only. Metadata associated with a Google Kubernetes Engine (GKE) cluster master.", +"id": "GKEMasterInfo", +"properties": { +"clusterNetworkUri": { +"description": "URI of a GKE cluster network.", +"type": "string" +}, +"clusterUri": { +"description": "URI of a GKE cluster.", +"type": "string" +}, +"externalIp": { +"description": "External IP address of a GKE cluster master.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of a GKE cluster master.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleServiceInfo": { +"description": "For display only. Details of a Google Service sending packets to a VPC network. Although the source IP might be a publicly routable address, some Google Services use special routes within Google production infrastructure to reach Compute Engine Instances. https://cloud.google.com/vpc/docs/routes#special_return_paths", +"id": "GoogleServiceInfo", +"properties": { +"googleServiceType": { +"description": "Recognized type of a Google Service.", +"enum": [ +"GOOGLE_SERVICE_TYPE_UNSPECIFIED", +"IAP", +"GFE_PROXY_OR_HEALTH_CHECK_PROBER", +"CLOUD_DNS", +"GOOGLE_API", +"GOOGLE_API_PSC", +"GOOGLE_API_VPC_SC" +], +"enumDescriptions": [ +"Unspecified Google Service.", +"Identity aware proxy. https://cloud.google.com/iap/docs/using-tcp-forwarding", +"One of two services sharing IP ranges: * Load Balancer proxy * Centralized Health Check prober https://cloud.google.com/load-balancing/docs/firewall-rules", +"Connectivity from Cloud DNS to forwarding targets or alternate name servers that use private routing. https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules https://cloud.google.com/dns/docs/policies#firewall-rules", +"private.googleapis.com and restricted.googleapis.com", +"Google API via Private Service Connect. https://cloud.google.com/vpc/docs/configure-private-service-connect-apis", +"Google API via VPC Service Controls. https://cloud.google.com/vpc/docs/configure-private-service-connect-apis" +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +} +}, +"type": "object" +}, +"InstanceInfo": { +"description": "For display only. Metadata associated with a Compute Engine instance.", +"id": "InstanceInfo", +"properties": { +"displayName": { +"description": "Name of a Compute Engine instance.", +"type": "string" +}, +"externalIp": { +"description": "External IP address of the network interface.", +"type": "string" +}, +"interface": { +"description": "Name of the network interface of a Compute Engine instance.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of the network interface.", +"type": "string" +}, +"networkTags": { +"description": "Network tags configured on the instance.", +"items": { +"type": "string" +}, +"type": "array" +}, +"networkUri": { +"description": "URI of a Compute Engine network.", +"type": "string" +}, +"serviceAccount": { +"deprecated": true, +"description": "Service account authorized for the instance.", +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine instance.", +"type": "string" +} +}, +"type": "object" +}, +"LatencyDistribution": { +"description": "Describes measured latency distribution.", +"id": "LatencyDistribution", +"properties": { +"latencyPercentiles": { +"description": "Representative latency percentiles.", +"items": { +"$ref": "LatencyPercentile" +}, +"type": "array" +} +}, +"type": "object" +}, +"LatencyPercentile": { +"description": "Latency percentile rank and value.", +"id": "LatencyPercentile", +"properties": { +"latencyMicros": { +"description": "percent-th percentile of latency observed, in microseconds. Fraction of percent/100 of samples have latency lower or equal to the value of this field.", +"format": "int64", +"type": "string" +}, +"percent": { +"description": "Percentage of samples this data point applies to.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListConnectivityTestsResponse": { +"description": "Response for the `ListConnectivityTests` method.", +"id": "ListConnectivityTestsResponse", +"properties": { +"nextPageToken": { +"description": "Page token to fetch the next set of Connectivity Tests.", +"type": "string" +}, +"resources": { +"description": "List of Connectivity Tests.", +"items": { +"$ref": "ConnectivityTest" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached (when querying all locations with `-`).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoadBalancerBackend": { +"description": "For display only. Metadata associated with a specific load balancer backend.", +"id": "LoadBalancerBackend", +"properties": { +"displayName": { +"description": "Name of a Compute Engine instance or network endpoint.", +"type": "string" +}, +"healthCheckAllowingFirewallRules": { +"description": "A list of firewall rule URIs allowing probes from health check IP ranges.", +"items": { +"type": "string" +}, +"type": "array" +}, +"healthCheckBlockingFirewallRules": { +"description": "A list of firewall rule URIs blocking probes from health check IP ranges.", +"items": { +"type": "string" +}, +"type": "array" +}, +"healthCheckFirewallState": { +"description": "State of the health check firewall configuration.", +"enum": [ +"HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED", +"CONFIGURED", +"MISCONFIGURED" +], +"enumDescriptions": [ +"State is unspecified. Default state if not populated.", +"There are configured firewall rules to allow health check probes to the backend.", +"There are firewall rules configured to allow partial health check ranges or block all health check ranges. If a health check probe is sent from denied IP ranges, the health check to the backend will fail. Then, the backend will be marked unhealthy and will not receive traffic sent to the load balancer." +], +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine instance or network endpoint.", +"type": "string" +} +}, +"type": "object" +}, +"LoadBalancerBackendInfo": { +"description": "For display only. Metadata associated with the load balancer backend.", +"id": "LoadBalancerBackendInfo", +"properties": { +"backendBucketUri": { +"description": "URI of the backend bucket this backend targets (if applicable).", +"type": "string" +}, +"backendServiceUri": { +"description": "URI of the backend service this backend belongs to (if applicable).", +"type": "string" +}, +"healthCheckFirewallsConfigState": { +"description": "Output only. Health check firewalls configuration state for the backend. This is a result of the static firewall analysis (verifying that health check traffic from required IP ranges to the backend is allowed or not). The backend might still be unhealthy even if these firewalls are configured. Please refer to the documentation for more information: https://cloud.google.com/load-balancing/docs/firewall-rules", +"enum": [ +"HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED", +"FIREWALLS_CONFIGURED", +"FIREWALLS_PARTIALLY_CONFIGURED", +"FIREWALLS_NOT_CONFIGURED", +"FIREWALLS_UNSUPPORTED" +], +"enumDescriptions": [ +"Configuration state unspecified. It usually means that the backend has no health check attached, or there was an unexpected configuration error preventing Connectivity tests from verifying health check configuration.", +"Firewall rules (policies) allowing health check traffic from all required IP ranges to the backend are configured.", +"Firewall rules (policies) allow health check traffic only from a part of required IP ranges.", +"Firewall rules (policies) deny health check traffic from all required IP ranges to the backend.", +"The network contains firewall rules of unsupported types, so Connectivity tests were not able to verify health check configuration status. Please refer to the documentation for the list of unsupported configurations: https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs" +], +"readOnly": true, +"type": "string" +}, +"healthCheckUri": { +"description": "URI of the health check attached to this backend (if applicable).", +"type": "string" +}, +"instanceGroupUri": { +"description": "URI of the instance group this backend belongs to (if applicable).", +"type": "string" +}, +"instanceUri": { +"description": "URI of the backend instance (if applicable). Populated for instance group backends, and zonal NEG backends.", +"type": "string" +}, +"name": { +"description": "Display name of the backend. For example, it might be an instance name for the instance group backends, or an IP address and port for zonal network endpoint group backends.", +"type": "string" +}, +"networkEndpointGroupUri": { +"description": "URI of the network endpoint group this backend belongs to (if applicable).", +"type": "string" +}, +"pscGoogleApiTarget": { +"description": "PSC Google API target this PSC NEG backend targets (if applicable).", +"type": "string" +}, +"pscServiceAttachmentUri": { +"description": "URI of the PSC service attachment this PSC NEG backend targets (if applicable).", +"type": "string" +} +}, +"type": "object" +}, +"LoadBalancerInfo": { +"description": "For display only. Metadata associated with a load balancer.", +"id": "LoadBalancerInfo", +"properties": { +"backendType": { +"description": "Type of load balancer's backend configuration.", +"enum": [ +"BACKEND_TYPE_UNSPECIFIED", +"BACKEND_SERVICE", +"TARGET_POOL", +"TARGET_INSTANCE" +], +"enumDescriptions": [ +"Type is unspecified.", +"Backend Service as the load balancer's backend.", +"Target Pool as the load balancer's backend.", +"Target Instance as the load balancer's backend." +], +"type": "string" +}, +"backendUri": { +"description": "Backend configuration URI.", +"type": "string" +}, +"backends": { +"description": "Information for the loadbalancer backends.", +"items": { +"$ref": "LoadBalancerBackend" +}, +"type": "array" +}, +"healthCheckUri": { +"deprecated": true, +"description": "URI of the health check for the load balancer. Deprecated and no longer populated as different load balancer backends might have different health checks.", +"type": "string" +}, +"loadBalancerType": { +"description": "Type of the load balancer.", +"enum": [ +"LOAD_BALANCER_TYPE_UNSPECIFIED", +"INTERNAL_TCP_UDP", +"NETWORK_TCP_UDP", +"HTTP_PROXY", +"TCP_PROXY", +"SSL_PROXY" +], +"enumDescriptions": [ +"Type is unspecified.", +"Internal TCP/UDP load balancer.", +"Network TCP/UDP load balancer.", +"HTTP(S) proxy load balancer.", +"TCP proxy load balancer.", +"SSL proxy load balancer." +], +"type": "string" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"NatInfo": { +"description": "For display only. Metadata associated with NAT.", +"id": "NatInfo", +"properties": { +"natGatewayName": { +"description": "The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.", +"type": "string" +}, +"networkUri": { +"description": "URI of the network where NAT translation takes place.", +"type": "string" +}, +"newDestinationIp": { +"description": "Destination IP address after NAT translation.", +"type": "string" +}, +"newDestinationPort": { +"description": "Destination port after NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"newSourceIp": { +"description": "Source IP address after NAT translation.", +"type": "string" +}, +"newSourcePort": { +"description": "Source port after NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldDestinationIp": { +"description": "Destination IP address before NAT translation.", +"type": "string" +}, +"oldDestinationPort": { +"description": "Destination port before NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldSourceIp": { +"description": "Source IP address before NAT translation.", +"type": "string" +}, +"oldSourcePort": { +"description": "Source port before NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IP protocol in string format, for example: \"TCP\", \"UDP\", \"ICMP\".", +"type": "string" +}, +"routerUri": { +"description": "Uri of the Cloud Router. Only valid when type is CLOUD_NAT.", +"type": "string" +}, +"type": { +"description": "Type of NAT.", +"enum": [ +"TYPE_UNSPECIFIED", +"INTERNAL_TO_EXTERNAL", +"EXTERNAL_TO_INTERNAL", +"CLOUD_NAT", +"PRIVATE_SERVICE_CONNECT" +], +"enumDescriptions": [ +"Type is unspecified.", +"From Compute Engine instance's internal address to external address.", +"From Compute Engine instance's external address to internal address.", +"Cloud NAT Gateway.", +"Private service connect NAT." +], +"type": "string" +} +}, +"type": "object" +}, +"NetworkInfo": { +"description": "For display only. Metadata associated with a Compute Engine network.", +"id": "NetworkInfo", +"properties": { +"displayName": { +"description": "Name of a Compute Engine network.", +"type": "string" +}, +"matchedIpRange": { +"description": "The IP range that matches the test.", +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine network.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata describing an Operation", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version.", +"type": "string" +}, +"cancelRequested": { +"description": "Specifies if cancellation was requested for the operation.", +"type": "boolean" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"statusDetail": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Target of the operation - for example projects/project-1/locations/global/connectivityTests/test-1", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ProbingDetails": { +"description": "Results of active probing from the last run of the test.", +"id": "ProbingDetails", +"properties": { +"abortCause": { +"description": "The reason probing was aborted.", +"enum": [ +"PROBING_ABORT_CAUSE_UNSPECIFIED", +"PERMISSION_DENIED", +"NO_SOURCE_LOCATION" +], +"enumDescriptions": [ +"No reason was specified.", +"The user lacks permission to access some of the network resources required to run the test.", +"No valid source endpoint could be derived from the request." +], +"type": "string" +}, +"destinationEgressLocation": { +"$ref": "EdgeLocation", +"description": "The EdgeLocation from which a packet destined for/originating from the internet will egress/ingress the Google network. This will only be populated for a connectivity test which has an internet destination/source address. The absence of this field *must not* be used as an indication that the destination/source is part of the Google network." +}, +"endpointInfo": { +"$ref": "EndpointInfo", +"description": "The source and destination endpoints derived from the test input and used for active probing." +}, +"error": { +"$ref": "Status", +"description": "Details about an internal failure or the cancellation of active probing." +}, +"probingLatency": { +"$ref": "LatencyDistribution", +"description": "Latency as measured by active probing in one direction: from the source to the destination endpoint." +}, +"result": { +"description": "The overall result of active probing.", +"enum": [ +"PROBING_RESULT_UNSPECIFIED", +"REACHABLE", +"UNREACHABLE", +"REACHABILITY_INCONSISTENT", +"UNDETERMINED" +], +"enumDescriptions": [ +"No result was specified.", +"At least 95% of packets reached the destination.", +"No packets reached the destination.", +"Less than 95% of packets reached the destination.", +"Reachability could not be determined. Possible reasons are: * The user lacks permission to access some of the network resources required to run the test. * No valid source endpoint could be derived from the request. * An internal error occurred." +], +"type": "string" +}, +"sentProbeCount": { +"description": "Number of probes sent.", +"format": "int32", +"type": "integer" +}, +"successfulProbeCount": { +"description": "Number of probes that reached the destination.", +"format": "int32", +"type": "integer" +}, +"verifyTime": { +"description": "The time that reachability was assessed through active probing.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ProxyConnectionInfo": { +"description": "For display only. Metadata associated with ProxyConnection.", +"id": "ProxyConnectionInfo", +"properties": { +"networkUri": { +"description": "URI of the network where connection is proxied.", +"type": "string" +}, +"newDestinationIp": { +"description": "Destination IP address of a new connection.", +"type": "string" +}, +"newDestinationPort": { +"description": "Destination port of a new connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"newSourceIp": { +"description": "Source IP address of a new connection.", +"type": "string" +}, +"newSourcePort": { +"description": "Source port of a new connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldDestinationIp": { +"description": "Destination IP address of an original connection", +"type": "string" +}, +"oldDestinationPort": { +"description": "Destination port of an original connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldSourceIp": { +"description": "Source IP address of an original connection.", +"type": "string" +}, +"oldSourcePort": { +"description": "Source port of an original connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IP protocol in string format, for example: \"TCP\", \"UDP\", \"ICMP\".", +"type": "string" +}, +"subnetUri": { +"description": "Uri of proxy subnet.", +"type": "string" +} +}, +"type": "object" +}, +"ReachabilityDetails": { +"description": "Results of the configuration analysis from the last run of the test.", +"id": "ReachabilityDetails", +"properties": { +"error": { +"$ref": "Status", +"description": "The details of a failure or a cancellation of reachability analysis." +}, +"result": { +"description": "The overall result of the test's configuration analysis.", +"enum": [ +"RESULT_UNSPECIFIED", +"REACHABLE", +"UNREACHABLE", +"AMBIGUOUS", +"UNDETERMINED" +], +"enumDescriptions": [ +"No result was specified.", +"Possible scenarios are: * The configuration analysis determined that a packet originating from the source is expected to reach the destination. * The analysis didn't complete because the user lacks permission for some of the resources in the trace. However, at the time the user's permission became insufficient, the trace had been successful so far.", +"A packet originating from the source is expected to be dropped before reaching the destination.", +"The source and destination endpoints do not uniquely identify the test location in the network, and the reachability result contains multiple traces. For some traces, a packet could be delivered, and for others, it would not be. This result is also assigned to configuration analysis of return path if on its own it should be REACHABLE, but configuration analysis of forward path is AMBIGUOUS.", +"The configuration analysis did not complete. Possible reasons are: * A permissions error occurred--for example, the user might not have read permission for all of the resources named in the test. * An internal error occurred. * The analyzer received an invalid or unsupported argument or was unable to identify a known endpoint." +], +"type": "string" +}, +"traces": { +"description": "Result may contain a list of traces if a test has multiple possible paths in the network, such as when destination endpoint is a load balancer with multiple backends.", +"items": { +"$ref": "Trace" +}, +"type": "array" +}, +"verifyTime": { +"description": "The time of the configuration analysis.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RerunConnectivityTestRequest": { +"description": "Request for the `RerunConnectivityTest` method.", +"id": "RerunConnectivityTestRequest", +"properties": {}, +"type": "object" +}, +"RouteInfo": { +"description": "For display only. Metadata associated with a Compute Engine route.", +"id": "RouteInfo", +"properties": { +"destIpRange": { +"description": "Destination IP range of the route.", +"type": "string" +}, +"destPortRanges": { +"description": "Destination port ranges of the route. Policy based routes only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Name of a route.", +"type": "string" +}, +"instanceTags": { +"description": "Instance tags of the route.", +"items": { +"type": "string" +}, +"type": "array" +}, +"nccHubUri": { +"description": "URI of a NCC Hub. NCC_HUB routes only.", +"type": "string" +}, +"nccSpokeUri": { +"description": "URI of a NCC Spoke. NCC_HUB routes only.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Compute Engine network. NETWORK routes only.", +"type": "string" +}, +"nextHop": { +"description": "Next hop of the route.", +"type": "string" +}, +"nextHopType": { +"description": "Type of next hop.", +"enum": [ +"NEXT_HOP_TYPE_UNSPECIFIED", +"NEXT_HOP_IP", +"NEXT_HOP_INSTANCE", +"NEXT_HOP_NETWORK", +"NEXT_HOP_PEERING", +"NEXT_HOP_INTERCONNECT", +"NEXT_HOP_VPN_TUNNEL", +"NEXT_HOP_VPN_GATEWAY", +"NEXT_HOP_INTERNET_GATEWAY", +"NEXT_HOP_BLACKHOLE", +"NEXT_HOP_ILB", +"NEXT_HOP_ROUTER_APPLIANCE", +"NEXT_HOP_NCC_HUB" +], +"enumDescriptions": [ +"Unspecified type. Default value.", +"Next hop is an IP address.", +"Next hop is a Compute Engine instance.", +"Next hop is a VPC network gateway.", +"Next hop is a peering VPC.", +"Next hop is an interconnect.", +"Next hop is a VPN tunnel.", +"Next hop is a VPN gateway. This scenario only happens when tracing connectivity from an on-premises network to Google Cloud through a VPN. The analysis simulates a packet departing from the on-premises network through a VPN tunnel and arriving at a Cloud VPN gateway.", +"Next hop is an internet gateway.", +"Next hop is blackhole; that is, the next hop either does not exist or is not running.", +"Next hop is the forwarding rule of an Internal Load Balancer.", +"Next hop is a [router appliance instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).", +"Next hop is an NCC hub." +], +"type": "string" +}, +"priority": { +"description": "Priority of the route.", +"format": "int32", +"type": "integer" +}, +"protocols": { +"description": "Protocols of the route. Policy based routes only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"routeScope": { +"description": "Indicates where route is applicable.", +"enum": [ +"ROUTE_SCOPE_UNSPECIFIED", +"NETWORK", +"NCC_HUB" +], +"enumDescriptions": [ +"Unspecified scope. Default value.", +"Route is applicable to packets in Network.", +"Route is applicable to packets using NCC Hub's routing table." +], +"type": "string" +}, +"routeType": { +"description": "Type of route.", +"enum": [ +"ROUTE_TYPE_UNSPECIFIED", +"SUBNET", +"STATIC", +"DYNAMIC", +"PEERING_SUBNET", +"PEERING_STATIC", +"PEERING_DYNAMIC", +"POLICY_BASED" +], +"enumDescriptions": [ +"Unspecified type. Default value.", +"Route is a subnet route automatically created by the system.", +"Static route created by the user, including the default route to the internet.", +"Dynamic route exchanged between BGP peers.", +"A subnet route received from peering network.", +"A static route received from peering network.", +"A dynamic route received from peering network.", +"Policy based route." +], +"type": "string" +}, +"srcIpRange": { +"description": "Source IP address range of the route. Policy based routes only.", +"type": "string" +}, +"srcPortRanges": { +"description": "Source port ranges of the route. Policy based routes only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uri": { +"description": "URI of a route. Dynamic, peering static and peering dynamic routes do not have an URI. Advertised route from Google Cloud VPC to on-premises network also does not have an URI.", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Step": { +"description": "A simulated forwarding path is composed of multiple steps. Each step has a well-defined state and an associated configuration.", +"id": "Step", +"properties": { +"abort": { +"$ref": "AbortInfo", +"description": "Display information of the final state \"abort\" and reason." +}, +"appEngineVersion": { +"$ref": "AppEngineVersionInfo", +"description": "Display information of an App Engine service version." +}, +"causesDrop": { +"description": "This is a step that leads to the final state Drop.", +"type": "boolean" +}, +"cloudFunction": { +"$ref": "CloudFunctionInfo", +"description": "Display information of a Cloud Function." +}, +"cloudRunRevision": { +"$ref": "CloudRunRevisionInfo", +"description": "Display information of a Cloud Run revision." +}, +"cloudSqlInstance": { +"$ref": "CloudSQLInstanceInfo", +"description": "Display information of a Cloud SQL instance." +}, +"deliver": { +"$ref": "DeliverInfo", +"description": "Display information of the final state \"deliver\" and reason." +}, +"description": { +"description": "A description of the step. Usually this is a summary of the state.", +"type": "string" +}, +"drop": { +"$ref": "DropInfo", +"description": "Display information of the final state \"drop\" and reason." +}, +"endpoint": { +"$ref": "EndpointInfo", +"description": "Display information of the source and destination under analysis. The endpoint information in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy." +}, +"firewall": { +"$ref": "FirewallInfo", +"description": "Display information of a Compute Engine firewall rule." +}, +"forward": { +"$ref": "ForwardInfo", +"description": "Display information of the final state \"forward\" and reason." +}, +"forwardingRule": { +"$ref": "ForwardingRuleInfo", +"description": "Display information of a Compute Engine forwarding rule." +}, +"gkeMaster": { +"$ref": "GKEMasterInfo", +"description": "Display information of a Google Kubernetes Engine cluster master." +}, +"googleService": { +"$ref": "GoogleServiceInfo", +"description": "Display information of a Google service" +}, +"instance": { +"$ref": "InstanceInfo", +"description": "Display information of a Compute Engine instance." +}, +"loadBalancer": { +"$ref": "LoadBalancerInfo", +"deprecated": true, +"description": "Display information of the load balancers. Deprecated in favor of the `load_balancer_backend_info` field, not used in new tests." +}, +"loadBalancerBackendInfo": { +"$ref": "LoadBalancerBackendInfo", +"description": "Display information of a specific load balancer backend." +}, +"nat": { +"$ref": "NatInfo", +"description": "Display information of a NAT." +}, +"network": { +"$ref": "NetworkInfo", +"description": "Display information of a Google Cloud network." +}, +"projectId": { +"description": "Project ID that contains the configuration this step is validating.", +"type": "string" +}, +"proxyConnection": { +"$ref": "ProxyConnectionInfo", +"description": "Display information of a ProxyConnection." +}, +"route": { +"$ref": "RouteInfo", +"description": "Display information of a Compute Engine route." +}, +"state": { +"description": "Each step is in one of the pre-defined states.", +"enum": [ +"STATE_UNSPECIFIED", +"START_FROM_INSTANCE", +"START_FROM_INTERNET", +"START_FROM_GOOGLE_SERVICE", +"START_FROM_PRIVATE_NETWORK", +"START_FROM_GKE_MASTER", +"START_FROM_CLOUD_SQL_INSTANCE", +"START_FROM_CLOUD_FUNCTION", +"START_FROM_APP_ENGINE_VERSION", +"START_FROM_CLOUD_RUN_REVISION", +"START_FROM_STORAGE_BUCKET", +"START_FROM_PSC_PUBLISHED_SERVICE", +"APPLY_INGRESS_FIREWALL_RULE", +"APPLY_EGRESS_FIREWALL_RULE", +"APPLY_ROUTE", +"APPLY_FORWARDING_RULE", +"ANALYZE_LOAD_BALANCER_BACKEND", +"SPOOFING_APPROVED", +"ARRIVE_AT_INSTANCE", +"ARRIVE_AT_INTERNAL_LOAD_BALANCER", +"ARRIVE_AT_EXTERNAL_LOAD_BALANCER", +"ARRIVE_AT_VPN_GATEWAY", +"ARRIVE_AT_VPN_TUNNEL", +"ARRIVE_AT_VPC_CONNECTOR", +"NAT", +"PROXY_CONNECTION", +"DELIVER", +"DROP", +"FORWARD", +"ABORT", +"VIEWER_PERMISSION_MISSING" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unspecified state.", +"Initial state: packet originating from a Compute Engine instance. An InstanceInfo is populated with starting instance information.", +"Initial state: packet originating from the internet. The endpoint information is populated.", +"Initial state: packet originating from a Google service. The google_service information is populated.", +"Initial state: packet originating from a VPC or on-premises network with internal source IP. If the source is a VPC network visible to the user, a NetworkInfo is populated with details of the network.", +"Initial state: packet originating from a Google Kubernetes Engine cluster master. A GKEMasterInfo is populated with starting instance information.", +"Initial state: packet originating from a Cloud SQL instance. A CloudSQLInstanceInfo is populated with starting instance information.", +"Initial state: packet originating from a Cloud Function. A CloudFunctionInfo is populated with starting function information.", +"Initial state: packet originating from an App Engine service version. An AppEngineVersionInfo is populated with starting version information.", +"Initial state: packet originating from a Cloud Run revision. A CloudRunRevisionInfo is populated with starting revision information.", +"Initial state: packet originating from a Storage Bucket. Used only for return traces. The storage_bucket information is populated.", +"Initial state: packet originating from a published service that uses Private Service Connect. Used only for return traces.", +"Config checking state: verify ingress firewall rule.", +"Config checking state: verify egress firewall rule.", +"Config checking state: verify route.", +"Config checking state: match forwarding rule.", +"Config checking state: verify load balancer backend configuration.", +"Config checking state: packet sent or received under foreign IP address and allowed.", +"Forwarding state: arriving at a Compute Engine instance.", +"Forwarding state: arriving at a Compute Engine internal load balancer.", +"Forwarding state: arriving at a Compute Engine external load balancer.", +"Forwarding state: arriving at a Cloud VPN gateway.", +"Forwarding state: arriving at a Cloud VPN tunnel.", +"Forwarding state: arriving at a VPC connector.", +"Transition state: packet header translated.", +"Transition state: original connection is terminated and a new proxied connection is initiated.", +"Final state: packet could be delivered.", +"Final state: packet could be dropped.", +"Final state: packet could be forwarded to a network with an unknown configuration.", +"Final state: analysis is aborted.", +"Special state: viewer of the test result does not have permission to see the configuration in this step." +], +"type": "string" +}, +"storageBucket": { +"$ref": "StorageBucketInfo", +"description": "Display information of a Storage Bucket. Used only for return traces." +}, +"vpcConnector": { +"$ref": "VpcConnectorInfo", +"description": "Display information of a VPC connector." +}, +"vpnGateway": { +"$ref": "VpnGatewayInfo", +"description": "Display information of a Compute Engine VPN gateway." +}, +"vpnTunnel": { +"$ref": "VpnTunnelInfo", +"description": "Display information of a Compute Engine VPN tunnel." +} +}, +"type": "object" +}, +"StorageBucketInfo": { +"description": "For display only. Metadata associated with Storage Bucket.", +"id": "StorageBucketInfo", +"properties": { +"bucket": { +"description": "Cloud Storage Bucket name.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Trace": { +"description": "Trace represents one simulated packet forwarding path. * Each trace contains multiple ordered steps. * Each step is in a particular state with associated configuration. * State is categorized as final or non-final states. * Each final state has a reason associated. * Each trace must end with a final state (the last step). ``` |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ```", +"id": "Trace", +"properties": { +"endpointInfo": { +"$ref": "EndpointInfo", +"description": "Derived from the source and destination endpoints definition specified by user request, and validated by the data plane model. If there are multiple traces starting from different source locations, then the endpoint_info may be different between traces." +}, +"forwardTraceId": { +"description": "ID of trace. For forward traces, this ID is unique for each trace. For return traces, it matches ID of associated forward trace. A single forward trace can be associated with none, one or more than one return trace.", +"format": "int32", +"type": "integer" +}, +"steps": { +"description": "A trace of a test contains multiple steps from the initial state to the final state (delivered, dropped, forwarded, or aborted). The steps are ordered by the processing sequence within the simulated network state machine. It is critical to preserve the order of the steps and avoid reordering or sorting them.", +"items": { +"$ref": "Step" +}, +"type": "array" +} +}, +"type": "object" +}, +"VpcConnectorInfo": { +"description": "For display only. Metadata associated with a VPC connector.", +"id": "VpcConnectorInfo", +"properties": { +"displayName": { +"description": "Name of a VPC connector.", +"type": "string" +}, +"location": { +"description": "Location in which the VPC connector is deployed.", +"type": "string" +}, +"uri": { +"description": "URI of a VPC connector.", +"type": "string" +} +}, +"type": "object" +}, +"VpnGatewayInfo": { +"description": "For display only. Metadata associated with a Compute Engine VPN gateway.", +"id": "VpnGatewayInfo", +"properties": { +"displayName": { +"description": "Name of a VPN gateway.", +"type": "string" +}, +"ipAddress": { +"description": "IP address of the VPN gateway.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Compute Engine network where the VPN gateway is configured.", +"type": "string" +}, +"region": { +"description": "Name of a Google Cloud region where this VPN gateway is configured.", +"type": "string" +}, +"uri": { +"description": "URI of a VPN gateway.", +"type": "string" +}, +"vpnTunnelUri": { +"description": "A VPN tunnel that is associated with this VPN gateway. There may be multiple VPN tunnels configured on a VPN gateway, and only the one relevant to the test is displayed.", +"type": "string" +} +}, +"type": "object" +}, +"VpnTunnelInfo": { +"description": "For display only. Metadata associated with a Compute Engine VPN tunnel.", +"id": "VpnTunnelInfo", +"properties": { +"displayName": { +"description": "Name of a VPN tunnel.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Compute Engine network where the VPN tunnel is configured.", +"type": "string" +}, +"region": { +"description": "Name of a Google Cloud region where this VPN tunnel is configured.", +"type": "string" +}, +"remoteGateway": { +"description": "URI of a VPN gateway at remote end of the tunnel.", +"type": "string" +}, +"remoteGatewayIp": { +"description": "Remote VPN gateway's IP address.", +"type": "string" +}, +"routingType": { +"description": "Type of the routing policy.", +"enum": [ +"ROUTING_TYPE_UNSPECIFIED", +"ROUTE_BASED", +"POLICY_BASED", +"DYNAMIC" +], +"enumDescriptions": [ +"Unspecified type. Default value.", +"Route based VPN.", +"Policy based routing.", +"Dynamic (BGP) routing." +], +"type": "string" +}, +"sourceGateway": { +"description": "URI of the VPN gateway at local end of the tunnel.", +"type": "string" +}, +"sourceGatewayIp": { +"description": "Local VPN gateway's IP address.", +"type": "string" +}, +"uri": { +"description": "URI of a VPN tunnel.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Management API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkmanagement.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkmanagement.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..4544bd65c5f8141cd4f1a6e5260920b017363100 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkmanagement.v1beta1.json @@ -0,0 +1,3220 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networkmanagement.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Network Management", +"description": "The Network Management API provides a collection of network performance monitoring and diagnostic capabilities.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networkmanagement:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networkmanagement.mtls.googleapis.com/", +"name": "networkmanagement", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"global": { +"resources": { +"connectivityTests": { +"methods": { +"create": { +"description": "Creates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in `ConnectivityTest` are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the Connectivity Test to create: `projects/{project_id}/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +}, +"testId": { +"description": "Required. The logical name of the Connectivity Test in your project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/connectivityTests", +"request": { +"$ref": "ConnectivityTest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a specific `ConnectivityTest`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", +"httpMethod": "DELETE", +"id": "networkmanagement.projects.locations.global.connectivityTests.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Connectivity Test resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a specific Connectivity Test.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.connectivityTests.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. `ConnectivityTest` resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ConnectivityTest" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.connectivityTests.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Connectivity Tests owned by a project.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.connectivityTests.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Lists the `ConnectivityTests` that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form ` ` where operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/proj-1/locations/global/connectivityTests/test-1 - Filter by labels: - Resources that have a key called `foo` labels.foo:* - Resources that have a key called `foo` whose value is `bar` labels.foo = bar", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Field to use to sort the list.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of `ConnectivityTests` to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token from an earlier query, as returned in `next_page_token`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the Connectivity Tests: `projects/{project_id}/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/connectivityTests", +"response": { +"$ref": "ListConnectivityTestsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the configuration of an existing `ConnectivityTest`. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in `ConnectivityTest` are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in `ConnectivityTest` are incomplete, the reachability result returns a value of `AMBIGUOUS`. See the documentation in `ConnectivityTest` for more details.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}", +"httpMethod": "PATCH", +"id": "networkmanagement.projects.locations.global.connectivityTests.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Unique name of the resource using the form: `projects/{project_id}/locations/global/connectivityTests/{test}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields to update. At least one path must be supplied in this field.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "ConnectivityTest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rerun": { +"description": "Rerun an existing `ConnectivityTest`. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in `ConnectivityTest` become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of `UNKNOWN`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:rerun", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.rerun", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Connectivity Test resource name using the form: `projects/{project_id}/locations/global/connectivityTests/{test_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:rerun", +"request": { +"$ref": "RerunConnectivityTestRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/connectivityTests/{connectivityTestsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.connectivityTests.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/connectivityTests/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.global.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networkmanagement.projects.locations.global.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/operations/{operationsId}", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/global/operations", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.global.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"vpcFlowLogsConfigs": { +"methods": { +"create": { +"description": "Creates a new VPC Flow Logs configuration. If a configuration with the exact same settings already exists, the creation fails.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", +"httpMethod": "POST", +"id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the VPC Flow Logs configuration to create: `projects/{project_id}/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"vpcFlowLogsConfigId": { +"description": "Required. ID of the VpcFlowLogsConfig.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/vpcFlowLogsConfigs", +"request": { +"$ref": "VpcFlowLogsConfig" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a specific VpcFlowLog configuration.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", +"httpMethod": "DELETE", +"id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. VpcFlowLogsConfig name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a specific VPC Flow Log configuration.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. `VpcFlowLog` resource name using the form: `projects/{project_id}/locations/global/vpcFlowLogsConfigs/{vpc_flow_logs_config}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "VpcFlowLogsConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all VPC Flow Logs configurations in a given project.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs", +"httpMethod": "GET", +"id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Lists the `VpcFlowLogsConfig`s that match the filter expression. A filter expression filters the resources listed in the response. The expression must be of the form ` ` where operators: `<`, `>`, `<=`, `>=`, `!=`, `=`, `:` are supported (colon `:` represents a HAS operator which is roughly synonymous with equality). can refer to a proto or JSON field, or a synthetic field. Field names can be camelCase or snake_case. Examples: - Filter by name: name = \"projects/proj-1/locations/global/vpcFlowLogsConfigs/config-1 - Filter by target resource: - Configurations at the VPC network level target_resource.network:* - Configurations for a VPC network called `vpc-1` target_resource.network = vpc-1", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Field to use to sort the list.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Number of `VpcFlowLogsConfig`s to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Page token from an earlier query, as returned in `next_page_token`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the VpcFlowLogsConfig: `projects/{project_id}/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/vpcFlowLogsConfigs", +"response": { +"$ref": "ListVpcFlowLogsConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing VpcFlowLogsConfig. If a configuration with the exact same settings already exists, the creation fails.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/vpcFlowLogsConfigs/{vpcFlowLogsConfigsId}", +"httpMethod": "PATCH", +"id": "networkmanagement.projects.locations.vpcFlowLogsConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Identifier. Unique name of the configuration using the form: `projects/{project_id}/locations/global/vpcFlowLogs/{vpc_flow_log}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/vpcFlowLogsConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields to update. At least one path must be supplied in this field.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "VpcFlowLogsConfig" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://networkmanagement.googleapis.com/", +"schemas": { +"AbortInfo": { +"description": "Details of the final state \"abort\" and associated resource.", +"id": "AbortInfo", +"properties": { +"cause": { +"description": "Causes that the analysis is aborted.", +"enum": [ +"CAUSE_UNSPECIFIED", +"UNKNOWN_NETWORK", +"UNKNOWN_PROJECT", +"NO_EXTERNAL_IP", +"UNINTENDED_DESTINATION", +"SOURCE_ENDPOINT_NOT_FOUND", +"MISMATCHED_SOURCE_NETWORK", +"DESTINATION_ENDPOINT_NOT_FOUND", +"MISMATCHED_DESTINATION_NETWORK", +"UNKNOWN_IP", +"SOURCE_IP_ADDRESS_NOT_IN_SOURCE_NETWORK", +"PERMISSION_DENIED", +"PERMISSION_DENIED_NO_CLOUD_NAT_CONFIGS", +"PERMISSION_DENIED_NO_NEG_ENDPOINT_CONFIGS", +"NO_SOURCE_LOCATION", +"INVALID_ARGUMENT", +"TRACE_TOO_LONG", +"INTERNAL_ERROR", +"UNSUPPORTED", +"MISMATCHED_IP_VERSION", +"GKE_KONNECTIVITY_PROXY_UNSUPPORTED", +"RESOURCE_CONFIG_NOT_FOUND", +"VM_INSTANCE_CONFIG_NOT_FOUND", +"NETWORK_CONFIG_NOT_FOUND", +"FIREWALL_CONFIG_NOT_FOUND", +"ROUTE_CONFIG_NOT_FOUND", +"GOOGLE_MANAGED_SERVICE_AMBIGUOUS_PSC_ENDPOINT", +"SOURCE_PSC_CLOUD_SQL_UNSUPPORTED", +"SOURCE_FORWARDING_RULE_UNSUPPORTED", +"NON_ROUTABLE_IP_ADDRESS", +"UNKNOWN_ISSUE_IN_GOOGLE_MANAGED_PROJECT", +"UNSUPPORTED_GOOGLE_MANAGED_PROJECT_CONFIG" +], +"enumDeprecated": [ +false, +true, +true, +true, +true, +true, +true, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Cause is unspecified.", +"Aborted due to unknown network. Deprecated, not used in the new tests.", +"Aborted because no project information can be derived from the test input. Deprecated, not used in the new tests.", +"Aborted because traffic is sent from a public IP to an instance without an external IP. Deprecated, not used in the new tests.", +"Aborted because none of the traces matches destination information specified in the input test request. Deprecated, not used in the new tests.", +"Aborted because the source endpoint could not be found. Deprecated, not used in the new tests.", +"Aborted because the source network does not match the source endpoint. Deprecated, not used in the new tests.", +"Aborted because the destination endpoint could not be found. Deprecated, not used in the new tests.", +"Aborted because the destination network does not match the destination endpoint. Deprecated, not used in the new tests.", +"Aborted because no endpoint with the packet's destination IP address is found.", +"Aborted because the source IP address doesn't belong to any of the subnets of the source VPC network.", +"Aborted because user lacks permission to access all or part of the network configurations required to run the test.", +"Aborted because user lacks permission to access Cloud NAT configs required to run the test.", +"Aborted because user lacks permission to access Network endpoint group endpoint configs required to run the test.", +"Aborted because no valid source or destination endpoint is derived from the input test request.", +"Aborted because the source or destination endpoint specified in the request is invalid. Some examples: - The request might contain malformed resource URI, project ID, or IP address. - The request might contain inconsistent information (for example, the request might include both the instance and the network, but the instance might not have a NIC in that network).", +"Aborted because the number of steps in the trace exceeds a certain limit. It might be caused by a routing loop.", +"Aborted due to internal server error.", +"Aborted because the test scenario is not supported.", +"Aborted because the source and destination resources have no common IP version.", +"Aborted because the connection between the control plane and the node of the source cluster is initiated by the node and managed by the Konnectivity proxy.", +"Aborted because expected resource configuration was missing.", +"Aborted because expected VM instance configuration was missing.", +"Aborted because expected network configuration was missing.", +"Aborted because expected firewall configuration was missing.", +"Aborted because expected route configuration was missing.", +"Aborted because a PSC endpoint selection for the Google-managed service is ambiguous (several PSC endpoints satisfy test input).", +"Aborted because tests with a PSC-based Cloud SQL instance as a source are not supported.", +"Aborted because tests with a forwarding rule as a source are not supported.", +"Aborted because one of the endpoints is a non-routable IP address (loopback, link-local, etc).", +"Aborted due to an unknown issue in the Google-managed project.", +"Aborted due to an unsupported configuration of the Google-managed project." +], +"type": "string" +}, +"ipAddress": { +"description": "IP address that caused the abort.", +"type": "string" +}, +"projectsMissingPermission": { +"description": "List of project IDs the user specified in the request but lacks access to. In this case, analysis is aborted with the PERMISSION_DENIED cause.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resourceUri": { +"description": "URI of the resource that caused the abort.", +"type": "string" +} +}, +"type": "object" +}, +"AppEngineVersionEndpoint": { +"description": "Wrapper for the App Engine service version attributes.", +"id": "AppEngineVersionEndpoint", +"properties": { +"uri": { +"description": "An [App Engine](https://cloud.google.com/appengine) [service version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions) name.", +"type": "string" +} +}, +"type": "object" +}, +"AppEngineVersionInfo": { +"description": "For display only. Metadata associated with an App Engine version.", +"id": "AppEngineVersionInfo", +"properties": { +"displayName": { +"description": "Name of an App Engine version.", +"type": "string" +}, +"environment": { +"description": "App Engine execution environment for a version.", +"type": "string" +}, +"runtime": { +"description": "Runtime of the App Engine version.", +"type": "string" +}, +"uri": { +"description": "URI of an App Engine version.", +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CloudFunctionEndpoint": { +"description": "Wrapper for Cloud Function attributes.", +"id": "CloudFunctionEndpoint", +"properties": { +"uri": { +"description": "A [Cloud Function](https://cloud.google.com/functions) name.", +"type": "string" +} +}, +"type": "object" +}, +"CloudFunctionInfo": { +"description": "For display only. Metadata associated with a Cloud Function.", +"id": "CloudFunctionInfo", +"properties": { +"displayName": { +"description": "Name of a Cloud Function.", +"type": "string" +}, +"location": { +"description": "Location in which the Cloud Function is deployed.", +"type": "string" +}, +"uri": { +"description": "URI of a Cloud Function.", +"type": "string" +}, +"versionId": { +"description": "Latest successfully deployed version id of the Cloud Function.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CloudRunRevisionEndpoint": { +"description": "Wrapper for Cloud Run revision attributes.", +"id": "CloudRunRevisionEndpoint", +"properties": { +"uri": { +"description": "A [Cloud Run](https://cloud.google.com/run) [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get) URI. The format is: projects/{project}/locations/{location}/revisions/{revision}", +"type": "string" +} +}, +"type": "object" +}, +"CloudRunRevisionInfo": { +"description": "For display only. Metadata associated with a Cloud Run revision.", +"id": "CloudRunRevisionInfo", +"properties": { +"displayName": { +"description": "Name of a Cloud Run revision.", +"type": "string" +}, +"location": { +"description": "Location in which this revision is deployed.", +"type": "string" +}, +"serviceUri": { +"description": "URI of Cloud Run service this revision belongs to.", +"type": "string" +}, +"uri": { +"description": "URI of a Cloud Run revision.", +"type": "string" +} +}, +"type": "object" +}, +"CloudSQLInstanceInfo": { +"description": "For display only. Metadata associated with a Cloud SQL instance.", +"id": "CloudSQLInstanceInfo", +"properties": { +"displayName": { +"description": "Name of a Cloud SQL instance.", +"type": "string" +}, +"externalIp": { +"description": "External IP address of a Cloud SQL instance.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of a Cloud SQL instance.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Cloud SQL instance network or empty string if the instance does not have one.", +"type": "string" +}, +"region": { +"description": "Region in which the Cloud SQL instance is running.", +"type": "string" +}, +"uri": { +"description": "URI of a Cloud SQL instance.", +"type": "string" +} +}, +"type": "object" +}, +"ConnectivityTest": { +"description": "A Connectivity Test for a network reachability analysis.", +"id": "ConnectivityTest", +"properties": { +"bypassFirewallChecks": { +"description": "Whether the test should skip firewall checking. If not provided, we assume false.", +"type": "boolean" +}, +"createTime": { +"description": "Output only. The time the test was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "The user-supplied description of the Connectivity Test. Maximum of 512 characters.", +"type": "string" +}, +"destination": { +"$ref": "Endpoint", +"description": "Required. Destination specification of the Connectivity Test. You can use a combination of destination IP address, Compute Engine VM instance, or VPC network to uniquely identify the destination location. Even if the destination IP address is not unique, the source IP location is unique. Usually, the analysis can infer the destination endpoint from route information. If the destination you specify is a VM instance and the instance has multiple network interfaces, then you must also specify either a destination IP address or VPC network to identify the destination interface. A reachability analysis proceeds even if the destination location is ambiguous. However, the result can include endpoints that you don't intend to test." +}, +"displayName": { +"description": "Output only. The display name of a Connectivity Test.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user-provided metadata.", +"type": "object" +}, +"name": { +"description": "Required. Unique name of the resource using the form: `projects/{project_id}/locations/global/connectivityTests/{test}`", +"type": "string" +}, +"probingDetails": { +"$ref": "ProbingDetails", +"description": "Output only. The probing details of this test from the latest run, present for applicable tests only. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", +"readOnly": true +}, +"protocol": { +"description": "IP Protocol of the test. When not provided, \"TCP\" is assumed.", +"type": "string" +}, +"reachabilityDetails": { +"$ref": "ReachabilityDetails", +"description": "Output only. The reachability details of this test from the latest run. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test.", +"readOnly": true +}, +"relatedProjects": { +"description": "Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.", +"items": { +"type": "string" +}, +"type": "array" +}, +"source": { +"$ref": "Endpoint", +"description": "Required. Source specification of the Connectivity Test. You can use a combination of source IP address, virtual machine (VM) instance, or Compute Engine network to uniquely identify the source location. Examples: If the source IP address is an internal IP address within a Google Cloud Virtual Private Cloud (VPC) network, then you must also specify the VPC network. Otherwise, specify the VM instance, which already contains its internal IP address and VPC network information. If the source of the test is within an on-premises network, then you must provide the destination VPC network. If the source endpoint is a Compute Engine VM instance with multiple network interfaces, the instance itself is not sufficient to identify the endpoint. So, you must also specify the source IP address or VPC network. A reachability analysis proceeds even if the source location is ambiguous. However, the test result may include endpoints that you don't intend to test." +}, +"updateTime": { +"description": "Output only. The time the test's configuration was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"DeliverInfo": { +"description": "Details of the final state \"deliver\" and associated resource.", +"id": "DeliverInfo", +"properties": { +"ipAddress": { +"description": "IP address of the target (if applicable).", +"type": "string" +}, +"resourceUri": { +"description": "URI of the resource that the packet is delivered to.", +"type": "string" +}, +"target": { +"description": "Target type where the packet is delivered to.", +"enum": [ +"TARGET_UNSPECIFIED", +"INSTANCE", +"INTERNET", +"GOOGLE_API", +"GKE_MASTER", +"CLOUD_SQL_INSTANCE", +"PSC_PUBLISHED_SERVICE", +"PSC_GOOGLE_API", +"PSC_VPC_SC", +"SERVERLESS_NEG", +"STORAGE_BUCKET", +"PRIVATE_NETWORK", +"CLOUD_FUNCTION", +"APP_ENGINE_VERSION", +"CLOUD_RUN_REVISION" +], +"enumDescriptions": [ +"Target not specified.", +"Target is a Compute Engine instance.", +"Target is the internet.", +"Target is a Google API.", +"Target is a Google Kubernetes Engine cluster master.", +"Target is a Cloud SQL instance.", +"Target is a published service that uses [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).", +"Target is all Google APIs that use [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).", +"Target is a VPC-SC that uses [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).", +"Target is a serverless network endpoint group.", +"Target is a Cloud Storage bucket.", +"Target is a private network. Used only for return traces.", +"Target is a Cloud Function. Used only for return traces.", +"Target is a App Engine service version. Used only for return traces.", +"Target is a Cloud Run revision. Used only for return traces." +], +"type": "string" +} +}, +"type": "object" +}, +"DropInfo": { +"description": "Details of the final state \"drop\" and associated resource.", +"id": "DropInfo", +"properties": { +"cause": { +"description": "Cause that the packet is dropped.", +"enum": [ +"CAUSE_UNSPECIFIED", +"UNKNOWN_EXTERNAL_ADDRESS", +"FOREIGN_IP_DISALLOWED", +"FIREWALL_RULE", +"NO_ROUTE", +"ROUTE_BLACKHOLE", +"ROUTE_WRONG_NETWORK", +"ROUTE_NEXT_HOP_IP_ADDRESS_NOT_RESOLVED", +"ROUTE_NEXT_HOP_RESOURCE_NOT_FOUND", +"ROUTE_NEXT_HOP_INSTANCE_WRONG_NETWORK", +"ROUTE_NEXT_HOP_INSTANCE_NON_PRIMARY_IP", +"ROUTE_NEXT_HOP_FORWARDING_RULE_IP_MISMATCH", +"ROUTE_NEXT_HOP_VPN_TUNNEL_NOT_ESTABLISHED", +"ROUTE_NEXT_HOP_FORWARDING_RULE_TYPE_INVALID", +"NO_ROUTE_FROM_INTERNET_TO_PRIVATE_IPV6_ADDRESS", +"VPN_TUNNEL_LOCAL_SELECTOR_MISMATCH", +"VPN_TUNNEL_REMOTE_SELECTOR_MISMATCH", +"PRIVATE_TRAFFIC_TO_INTERNET", +"PRIVATE_GOOGLE_ACCESS_DISALLOWED", +"PRIVATE_GOOGLE_ACCESS_VIA_VPN_TUNNEL_UNSUPPORTED", +"NO_EXTERNAL_ADDRESS", +"UNKNOWN_INTERNAL_ADDRESS", +"FORWARDING_RULE_MISMATCH", +"FORWARDING_RULE_NO_INSTANCES", +"FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK", +"INSTANCE_NOT_RUNNING", +"GKE_CLUSTER_NOT_RUNNING", +"CLOUD_SQL_INSTANCE_NOT_RUNNING", +"TRAFFIC_TYPE_BLOCKED", +"GKE_MASTER_UNAUTHORIZED_ACCESS", +"CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS", +"DROPPED_INSIDE_GKE_SERVICE", +"DROPPED_INSIDE_CLOUD_SQL_SERVICE", +"GOOGLE_MANAGED_SERVICE_NO_PEERING", +"GOOGLE_MANAGED_SERVICE_NO_PSC_ENDPOINT", +"GKE_PSC_ENDPOINT_MISSING", +"CLOUD_SQL_INSTANCE_NO_IP_ADDRESS", +"GKE_CONTROL_PLANE_REGION_MISMATCH", +"PUBLIC_GKE_CONTROL_PLANE_TO_PRIVATE_DESTINATION", +"GKE_CONTROL_PLANE_NO_ROUTE", +"CLOUD_SQL_INSTANCE_NOT_CONFIGURED_FOR_EXTERNAL_TRAFFIC", +"PUBLIC_CLOUD_SQL_INSTANCE_TO_PRIVATE_DESTINATION", +"CLOUD_SQL_INSTANCE_NO_ROUTE", +"CLOUD_FUNCTION_NOT_ACTIVE", +"VPC_CONNECTOR_NOT_SET", +"VPC_CONNECTOR_NOT_RUNNING", +"FORWARDING_RULE_REGION_MISMATCH", +"PSC_CONNECTION_NOT_ACCEPTED", +"PSC_ENDPOINT_ACCESSED_FROM_PEERED_NETWORK", +"PSC_NEG_PRODUCER_ENDPOINT_NO_GLOBAL_ACCESS", +"PSC_NEG_PRODUCER_FORWARDING_RULE_MULTIPLE_PORTS", +"CLOUD_SQL_PSC_NEG_UNSUPPORTED", +"NO_NAT_SUBNETS_FOR_PSC_SERVICE_ATTACHMENT", +"HYBRID_NEG_NON_DYNAMIC_ROUTE_MATCHED", +"HYBRID_NEG_NON_LOCAL_DYNAMIC_ROUTE_MATCHED", +"CLOUD_RUN_REVISION_NOT_READY", +"DROPPED_INSIDE_PSC_SERVICE_PRODUCER", +"LOAD_BALANCER_HAS_NO_PROXY_SUBNET", +"CLOUD_NAT_NO_ADDRESSES", +"ROUTING_LOOP" +], +"enumDescriptions": [ +"Cause is unspecified.", +"Destination external address cannot be resolved to a known target. If the address is used in a Google Cloud project, provide the project ID as test input.", +"A Compute Engine instance can only send or receive a packet with a foreign IP address if ip_forward is enabled.", +"Dropped due to a firewall rule, unless allowed due to connection tracking.", +"Dropped due to no matching routes.", +"Dropped due to invalid route. Route's next hop is a blackhole.", +"Packet is sent to a wrong (unintended) network. Example: you trace a packet from VM1:Network1 to VM2:Network2, however, the route configured in Network1 sends the packet destined for VM2's IP address to Network3.", +"Route's next hop IP address cannot be resolved to a GCP resource.", +"Route's next hop resource is not found.", +"Route's next hop instance doesn't have a NIC in the route's network.", +"Route's next hop IP address is not a primary IP address of the next hop instance.", +"Route's next hop forwarding rule doesn't match next hop IP address.", +"Route's next hop VPN tunnel is down (does not have valid IKE SAs).", +"Route's next hop forwarding rule type is invalid (it's not a forwarding rule of the internal passthrough load balancer).", +"Packet is sent from the Internet to the private IPv6 address.", +"The packet does not match a policy-based VPN tunnel local selector.", +"The packet does not match a policy-based VPN tunnel remote selector.", +"Packet with internal destination address sent to the internet gateway.", +"Instance with only an internal IP address tries to access Google API and services, but private Google access is not enabled in the subnet.", +"Source endpoint tries to access Google API and services through the VPN tunnel to another network, but Private Google Access needs to be enabled in the source endpoint network.", +"Instance with only an internal IP address tries to access external hosts, but Cloud NAT is not enabled in the subnet, unless special configurations on a VM allow this connection.", +"Destination internal address cannot be resolved to a known target. If this is a shared VPC scenario, verify if the service project ID is provided as test input. Otherwise, verify if the IP address is being used in the project.", +"Forwarding rule's protocol and ports do not match the packet header.", +"Forwarding rule does not have backends configured.", +"Firewalls block the health check probes to the backends and cause the backends to be unavailable for traffic from the load balancer. For more details, see [Health check firewall rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).", +"Packet is sent from or to a Compute Engine instance that is not in a running state.", +"Packet sent from or to a GKE cluster that is not in running state.", +"Packet sent from or to a Cloud SQL instance that is not in running state.", +"The type of traffic is blocked and the user cannot configure a firewall rule to enable it. See [Always blocked traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for more details.", +"Access to Google Kubernetes Engine cluster master's endpoint is not authorized. See [Access to the cluster endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints) for more details.", +"Access to the Cloud SQL instance endpoint is not authorized. See [Authorizing with authorized networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for more details.", +"Packet was dropped inside Google Kubernetes Engine Service.", +"Packet was dropped inside Cloud SQL Service.", +"Packet was dropped because there is no peering between the originating network and the Google Managed Services Network.", +"Packet was dropped because the Google-managed service uses Private Service Connect (PSC), but the PSC endpoint is not found in the project.", +"Packet was dropped because the GKE cluster uses Private Service Connect (PSC), but the PSC endpoint is not found in the project.", +"Packet was dropped because the Cloud SQL instance has neither a private nor a public IP address.", +"Packet was dropped because a GKE cluster private endpoint is unreachable from a region different from the cluster's region.", +"Packet sent from a public GKE cluster control plane to a private IP address.", +"Packet was dropped because there is no route from a GKE cluster control plane to a destination network.", +"Packet sent from a Cloud SQL instance to an external IP address is not allowed. The Cloud SQL instance is not configured to send packets to external IP addresses.", +"Packet sent from a Cloud SQL instance with only a public IP address to a private IP address.", +"Packet was dropped because there is no route from a Cloud SQL instance to a destination network.", +"Packet could be dropped because the Cloud Function is not in an active status.", +"Packet could be dropped because no VPC connector is set.", +"Packet could be dropped because the VPC connector is not in a running state.", +"Packet could be dropped because it was sent from a different region to a regional forwarding without global access.", +"The Private Service Connect endpoint is in a project that is not approved to connect to the service.", +"The packet is sent to the Private Service Connect endpoint over the peering, but [it's not supported](https://cloud.google.com/vpc/docs/configure-private-service-connect-services#on-premises).", +"The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule does not have global access enabled.", +"The packet is sent to the Private Service Connect backend (network endpoint group), but the producer PSC forwarding rule has multiple ports specified.", +"The packet is sent to the Private Service Connect backend (network endpoint group) targeting a Cloud SQL service attachment, but this configuration is not supported.", +"No NAT subnets are defined for the PSC service attachment.", +"The packet sent from the hybrid NEG proxy matches a non-dynamic route, but such a configuration is not supported.", +"The packet sent from the hybrid NEG proxy matches a dynamic route with a next hop in a different region, but such a configuration is not supported.", +"Packet sent from a Cloud Run revision that is not ready.", +"Packet was dropped inside Private Service Connect service producer.", +"Packet sent to a load balancer, which requires a proxy-only subnet and the subnet is not found.", +"Packet sent to Cloud Nat without active NAT IPs.", +"Packet is stuck in a routing loop." +], +"type": "string" +}, +"destinationIp": { +"description": "Destination IP address of the dropped packet (if relevant).", +"type": "string" +}, +"region": { +"description": "Region of the dropped packet (if relevant).", +"type": "string" +}, +"resourceUri": { +"description": "URI of the resource that caused the drop.", +"type": "string" +}, +"sourceIp": { +"description": "Source IP address of the dropped packet (if relevant).", +"type": "string" +} +}, +"type": "object" +}, +"EdgeLocation": { +"description": "Representation of a network edge location as per https://cloud.google.com/vpc/docs/edge-locations.", +"id": "EdgeLocation", +"properties": { +"metropolitanArea": { +"description": "Name of the metropolitan area.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "Source or destination of the Connectivity Test.", +"id": "Endpoint", +"properties": { +"appEngineVersion": { +"$ref": "AppEngineVersionEndpoint", +"description": "An [App Engine](https://cloud.google.com/appengine) [service version](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.services.versions)." +}, +"cloudFunction": { +"$ref": "CloudFunctionEndpoint", +"description": "A [Cloud Function](https://cloud.google.com/functions)." +}, +"cloudRunRevision": { +"$ref": "CloudRunRevisionEndpoint", +"description": "A [Cloud Run](https://cloud.google.com/run) [revision](https://cloud.google.com/run/docs/reference/rest/v1/namespaces.revisions/get)" +}, +"cloudSqlInstance": { +"description": "A [Cloud SQL](https://cloud.google.com/sql) instance URI.", +"type": "string" +}, +"forwardingRule": { +"description": "A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules are also used for protocol forwarding, Private Service Connect and other network services to provide forwarding information in the control plane. Format: projects/{project}/global/forwardingRules/{id} or projects/{project}/regions/{region}/forwardingRules/{id}", +"type": "string" +}, +"forwardingRuleTarget": { +"description": "Output only. Specifies the type of the target of the forwarding rule.", +"enum": [ +"FORWARDING_RULE_TARGET_UNSPECIFIED", +"INSTANCE", +"LOAD_BALANCER", +"VPN_GATEWAY", +"PSC" +], +"enumDescriptions": [ +"Forwarding rule target is unknown.", +"Compute Engine instance for protocol forwarding.", +"Load Balancer. The specific type can be found from load_balancer_type.", +"Classic Cloud VPN Gateway.", +"Forwarding Rule is a Private Service Connect endpoint." +], +"readOnly": true, +"type": "string" +}, +"gkeMasterCluster": { +"description": "A cluster URI for [Google Kubernetes Engine master](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture).", +"type": "string" +}, +"instance": { +"description": "A Compute Engine instance URI.", +"type": "string" +}, +"ipAddress": { +"description": "The IP address of the endpoint, which can be an external or internal IP.", +"type": "string" +}, +"loadBalancerId": { +"description": "Output only. ID of the load balancer the forwarding rule points to. Empty for forwarding rules not related to load balancers.", +"readOnly": true, +"type": "string" +}, +"loadBalancerType": { +"description": "Output only. Type of the load balancer the forwarding rule points to.", +"enum": [ +"LOAD_BALANCER_TYPE_UNSPECIFIED", +"HTTPS_ADVANCED_LOAD_BALANCER", +"HTTPS_LOAD_BALANCER", +"REGIONAL_HTTPS_LOAD_BALANCER", +"INTERNAL_HTTPS_LOAD_BALANCER", +"SSL_PROXY_LOAD_BALANCER", +"TCP_PROXY_LOAD_BALANCER", +"INTERNAL_TCP_PROXY_LOAD_BALANCER", +"NETWORK_LOAD_BALANCER", +"LEGACY_NETWORK_LOAD_BALANCER", +"TCP_UDP_INTERNAL_LOAD_BALANCER" +], +"enumDescriptions": [ +"Forwarding rule points to a different target than a load balancer or a load balancer type is unknown.", +"Global external HTTP(S) load balancer.", +"Global external HTTP(S) load balancer (classic)", +"Regional external HTTP(S) load balancer.", +"Internal HTTP(S) load balancer.", +"External SSL proxy load balancer.", +"External TCP proxy load balancer.", +"Internal regional TCP proxy load balancer.", +"External TCP/UDP Network load balancer.", +"Target-pool based external TCP/UDP Network load balancer.", +"Internal TCP/UDP load balancer." +], +"readOnly": true, +"type": "string" +}, +"network": { +"description": "A Compute Engine network URI.", +"type": "string" +}, +"networkType": { +"description": "Type of the network where the endpoint is located. Applicable only to source endpoint, as destination network type can be inferred from the source.", +"enum": [ +"NETWORK_TYPE_UNSPECIFIED", +"GCP_NETWORK", +"NON_GCP_NETWORK" +], +"enumDescriptions": [ +"Default type if unspecified.", +"A network hosted within Google Cloud. To receive more detailed output, specify the URI for the source or destination network.", +"A network hosted outside of Google Cloud. This can be an on-premises network, or a network hosted by another cloud provider." +], +"type": "string" +}, +"port": { +"description": "The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"projectId": { +"description": "Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID: 1. Only the IP address is specified, and the IP address is within a Google Cloud project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.", +"type": "string" +} +}, +"type": "object" +}, +"EndpointInfo": { +"description": "For display only. The specification of the endpoints for the test. EndpointInfo is derived from source and destination Endpoint and validated by the backend data plane model.", +"id": "EndpointInfo", +"properties": { +"destinationIp": { +"description": "Destination IP address.", +"type": "string" +}, +"destinationNetworkUri": { +"description": "URI of the network where this packet is sent to.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IP protocol in string format, for example: \"TCP\", \"UDP\", \"ICMP\".", +"type": "string" +}, +"sourceAgentUri": { +"description": "URI of the source telemetry agent this packet originates from.", +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourceNetworkUri": { +"description": "URI of the network where this packet originates from.", +"type": "string" +}, +"sourcePort": { +"description": "Source port. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"FirewallInfo": { +"description": "For display only. Metadata associated with a VPC firewall rule, an implied VPC firewall rule, or a hierarchical firewall policy rule.", +"id": "FirewallInfo", +"properties": { +"action": { +"description": "Possible values: ALLOW, DENY, APPLY_SECURITY_PROFILE_GROUP", +"type": "string" +}, +"direction": { +"description": "Possible values: INGRESS, EGRESS", +"type": "string" +}, +"displayName": { +"description": "The display name of the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", +"type": "string" +}, +"firewallRuleType": { +"description": "The firewall rule's type.", +"enum": [ +"FIREWALL_RULE_TYPE_UNSPECIFIED", +"HIERARCHICAL_FIREWALL_POLICY_RULE", +"VPC_FIREWALL_RULE", +"IMPLIED_VPC_FIREWALL_RULE", +"SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE", +"NETWORK_FIREWALL_POLICY_RULE", +"NETWORK_REGIONAL_FIREWALL_POLICY_RULE", +"UNSUPPORTED_FIREWALL_POLICY_RULE", +"TRACKING_STATE" +], +"enumDescriptions": [ +"Unspecified type.", +"Hierarchical firewall policy rule. For details, see [Hierarchical firewall policies overview](https://cloud.google.com/vpc/docs/firewall-policies).", +"VPC firewall rule. For details, see [VPC firewall rules overview](https://cloud.google.com/vpc/docs/firewalls).", +"Implied VPC firewall rule. For details, see [Implied rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).", +"Implicit firewall rules that are managed by serverless VPC access to allow ingress access. They are not visible in the Google Cloud console. For details, see [VPC connector's implicit rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).", +"Global network firewall policy rule. For details, see [Network firewall policies](https://cloud.google.com/vpc/docs/network-firewall-policies).", +"Regional network firewall policy rule. For details, see [Regional network firewall policies](https://cloud.google.com/firewall/docs/regional-firewall-policies).", +"Firewall policy rule containing attributes not yet supported in Connectivity tests. Firewall analysis is skipped if such a rule can potentially be matched. Please see the [list of unsupported configurations](https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs).", +"Tracking state for response traffic created when request traffic goes through allow firewall rule. For details, see [firewall rules specifications](https://cloud.google.com/firewall/docs/firewalls#specifications)" +], +"type": "string" +}, +"networkUri": { +"description": "The URI of the VPC network that the firewall rule is associated with. This field is not applicable to hierarchical firewall policy rules.", +"type": "string" +}, +"policy": { +"description": "The hierarchical firewall policy that this rule is associated with. This field is not applicable to VPC firewall rules.", +"type": "string" +}, +"priority": { +"description": "The priority of the firewall rule.", +"format": "int32", +"type": "integer" +}, +"targetServiceAccounts": { +"description": "The target service accounts specified by the firewall rule.", +"items": { +"type": "string" +}, +"type": "array" +}, +"targetTags": { +"description": "The target tags defined by the VPC firewall rule. This field is not applicable to hierarchical firewall policy rules.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uri": { +"description": "The URI of the VPC firewall rule. This field is not applicable to implied firewall rules or hierarchical firewall policy rules.", +"type": "string" +} +}, +"type": "object" +}, +"ForwardInfo": { +"description": "Details of the final state \"forward\" and associated resource.", +"id": "ForwardInfo", +"properties": { +"ipAddress": { +"description": "IP address of the target (if applicable).", +"type": "string" +}, +"resourceUri": { +"description": "URI of the resource that the packet is forwarded to.", +"type": "string" +}, +"target": { +"description": "Target type where this packet is forwarded to.", +"enum": [ +"TARGET_UNSPECIFIED", +"PEERING_VPC", +"VPN_GATEWAY", +"INTERCONNECT", +"GKE_MASTER", +"IMPORTED_CUSTOM_ROUTE_NEXT_HOP", +"CLOUD_SQL_INSTANCE", +"ANOTHER_PROJECT", +"NCC_HUB", +"ROUTER_APPLIANCE" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +false, +true, +false, +false, +false +], +"enumDescriptions": [ +"Target not specified.", +"Forwarded to a VPC peering network.", +"Forwarded to a Cloud VPN gateway.", +"Forwarded to a Cloud Interconnect connection.", +"Forwarded to a Google Kubernetes Engine Container cluster master.", +"Forwarded to the next hop of a custom route imported from a peering VPC.", +"Forwarded to a Cloud SQL instance.", +"Forwarded to a VPC network in another project.", +"Forwarded to an NCC Hub.", +"Forwarded to a router appliance." +], +"type": "string" +} +}, +"type": "object" +}, +"ForwardingRuleInfo": { +"description": "For display only. Metadata associated with a Compute Engine forwarding rule.", +"id": "ForwardingRuleInfo", +"properties": { +"displayName": { +"description": "Name of a Compute Engine forwarding rule.", +"type": "string" +}, +"matchedPortRange": { +"description": "Port range defined in the forwarding rule that matches the test.", +"type": "string" +}, +"matchedProtocol": { +"description": "Protocol defined in the forwarding rule that matches the test.", +"type": "string" +}, +"networkUri": { +"description": "Network URI. Only valid for Internal Load Balancer.", +"type": "string" +}, +"target": { +"description": "Target type of the forwarding rule.", +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine forwarding rule.", +"type": "string" +}, +"vip": { +"description": "VIP of the forwarding rule.", +"type": "string" +} +}, +"type": "object" +}, +"GKEMasterInfo": { +"description": "For display only. Metadata associated with a Google Kubernetes Engine (GKE) cluster master.", +"id": "GKEMasterInfo", +"properties": { +"clusterNetworkUri": { +"description": "URI of a GKE cluster network.", +"type": "string" +}, +"clusterUri": { +"description": "URI of a GKE cluster.", +"type": "string" +}, +"externalIp": { +"description": "External IP address of a GKE cluster master.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of a GKE cluster master.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleServiceInfo": { +"description": "For display only. Details of a Google Service sending packets to a VPC network. Although the source IP might be a publicly routable address, some Google Services use special routes within Google production infrastructure to reach Compute Engine Instances. https://cloud.google.com/vpc/docs/routes#special_return_paths", +"id": "GoogleServiceInfo", +"properties": { +"googleServiceType": { +"description": "Recognized type of a Google Service.", +"enum": [ +"GOOGLE_SERVICE_TYPE_UNSPECIFIED", +"IAP", +"GFE_PROXY_OR_HEALTH_CHECK_PROBER", +"CLOUD_DNS", +"GOOGLE_API", +"GOOGLE_API_PSC", +"GOOGLE_API_VPC_SC" +], +"enumDescriptions": [ +"Unspecified Google Service.", +"Identity aware proxy. https://cloud.google.com/iap/docs/using-tcp-forwarding", +"One of two services sharing IP ranges: * Load Balancer proxy * Centralized Health Check prober https://cloud.google.com/load-balancing/docs/firewall-rules", +"Connectivity from Cloud DNS to forwarding targets or alternate name servers that use private routing. https://cloud.google.com/dns/docs/zones/forwarding-zones#firewall-rules https://cloud.google.com/dns/docs/policies#firewall-rules", +"private.googleapis.com and restricted.googleapis.com", +"Google API via Private Service Connect. https://cloud.google.com/vpc/docs/configure-private-service-connect-apis", +"Google API via VPC Service Controls. https://cloud.google.com/vpc/docs/configure-private-service-connect-apis" +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +} +}, +"type": "object" +}, +"InstanceInfo": { +"description": "For display only. Metadata associated with a Compute Engine instance.", +"id": "InstanceInfo", +"properties": { +"displayName": { +"description": "Name of a Compute Engine instance.", +"type": "string" +}, +"externalIp": { +"description": "External IP address of the network interface.", +"type": "string" +}, +"interface": { +"description": "Name of the network interface of a Compute Engine instance.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of the network interface.", +"type": "string" +}, +"networkTags": { +"description": "Network tags configured on the instance.", +"items": { +"type": "string" +}, +"type": "array" +}, +"networkUri": { +"description": "URI of a Compute Engine network.", +"type": "string" +}, +"serviceAccount": { +"deprecated": true, +"description": "Service account authorized for the instance.", +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine instance.", +"type": "string" +} +}, +"type": "object" +}, +"LatencyDistribution": { +"description": "Describes measured latency distribution.", +"id": "LatencyDistribution", +"properties": { +"latencyPercentiles": { +"description": "Representative latency percentiles.", +"items": { +"$ref": "LatencyPercentile" +}, +"type": "array" +} +}, +"type": "object" +}, +"LatencyPercentile": { +"description": "Latency percentile rank and value.", +"id": "LatencyPercentile", +"properties": { +"latencyMicros": { +"description": "percent-th percentile of latency observed, in microseconds. Fraction of percent/100 of samples have latency lower or equal to the value of this field.", +"format": "int64", +"type": "string" +}, +"percent": { +"description": "Percentage of samples this data point applies to.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListConnectivityTestsResponse": { +"description": "Response for the `ListConnectivityTests` method.", +"id": "ListConnectivityTestsResponse", +"properties": { +"nextPageToken": { +"description": "Page token to fetch the next set of Connectivity Tests.", +"type": "string" +}, +"resources": { +"description": "List of Connectivity Tests.", +"items": { +"$ref": "ConnectivityTest" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached (when querying all locations with `-`).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVpcFlowLogsConfigsResponse": { +"description": "Response for the `ListVpcFlowLogsConfigs` method.", +"id": "ListVpcFlowLogsConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Page token to fetch the next set of configurations.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached (when querying all locations with `-`).", +"items": { +"type": "string" +}, +"type": "array" +}, +"vpcFlowLogsConfigs": { +"description": "List of VPC Flow Log configurations.", +"items": { +"$ref": "VpcFlowLogsConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoadBalancerBackend": { +"description": "For display only. Metadata associated with a specific load balancer backend.", +"id": "LoadBalancerBackend", +"properties": { +"displayName": { +"description": "Name of a Compute Engine instance or network endpoint.", +"type": "string" +}, +"healthCheckAllowingFirewallRules": { +"description": "A list of firewall rule URIs allowing probes from health check IP ranges.", +"items": { +"type": "string" +}, +"type": "array" +}, +"healthCheckBlockingFirewallRules": { +"description": "A list of firewall rule URIs blocking probes from health check IP ranges.", +"items": { +"type": "string" +}, +"type": "array" +}, +"healthCheckFirewallState": { +"description": "State of the health check firewall configuration.", +"enum": [ +"HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED", +"CONFIGURED", +"MISCONFIGURED" +], +"enumDescriptions": [ +"State is unspecified. Default state if not populated.", +"There are configured firewall rules to allow health check probes to the backend.", +"There are firewall rules configured to allow partial health check ranges or block all health check ranges. If a health check probe is sent from denied IP ranges, the health check to the backend will fail. Then, the backend will be marked unhealthy and will not receive traffic sent to the load balancer." +], +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine instance or network endpoint.", +"type": "string" +} +}, +"type": "object" +}, +"LoadBalancerBackendInfo": { +"description": "For display only. Metadata associated with the load balancer backend.", +"id": "LoadBalancerBackendInfo", +"properties": { +"backendBucketUri": { +"description": "URI of the backend bucket this backend targets (if applicable).", +"type": "string" +}, +"backendServiceUri": { +"description": "URI of the backend service this backend belongs to (if applicable).", +"type": "string" +}, +"healthCheckFirewallsConfigState": { +"description": "Output only. Health check firewalls configuration state for the backend. This is a result of the static firewall analysis (verifying that health check traffic from required IP ranges to the backend is allowed or not). The backend might still be unhealthy even if these firewalls are configured. Please refer to the documentation for more information: https://cloud.google.com/load-balancing/docs/firewall-rules", +"enum": [ +"HEALTH_CHECK_FIREWALLS_CONFIG_STATE_UNSPECIFIED", +"FIREWALLS_CONFIGURED", +"FIREWALLS_PARTIALLY_CONFIGURED", +"FIREWALLS_NOT_CONFIGURED", +"FIREWALLS_UNSUPPORTED" +], +"enumDescriptions": [ +"Configuration state unspecified. It usually means that the backend has no health check attached, or there was an unexpected configuration error preventing Connectivity tests from verifying health check configuration.", +"Firewall rules (policies) allowing health check traffic from all required IP ranges to the backend are configured.", +"Firewall rules (policies) allow health check traffic only from a part of required IP ranges.", +"Firewall rules (policies) deny health check traffic from all required IP ranges to the backend.", +"The network contains firewall rules of unsupported types, so Connectivity tests were not able to verify health check configuration status. Please refer to the documentation for the list of unsupported configurations: https://cloud.google.com/network-intelligence-center/docs/connectivity-tests/concepts/overview#unsupported-configs" +], +"readOnly": true, +"type": "string" +}, +"healthCheckUri": { +"description": "URI of the health check attached to this backend (if applicable).", +"type": "string" +}, +"instanceGroupUri": { +"description": "URI of the instance group this backend belongs to (if applicable).", +"type": "string" +}, +"instanceUri": { +"description": "URI of the backend instance (if applicable). Populated for instance group backends, and zonal NEG backends.", +"type": "string" +}, +"name": { +"description": "Display name of the backend. For example, it might be an instance name for the instance group backends, or an IP address and port for zonal network endpoint group backends.", +"type": "string" +}, +"networkEndpointGroupUri": { +"description": "URI of the network endpoint group this backend belongs to (if applicable).", +"type": "string" +}, +"pscGoogleApiTarget": { +"description": "PSC Google API target this PSC NEG backend targets (if applicable).", +"type": "string" +}, +"pscServiceAttachmentUri": { +"description": "URI of the PSC service attachment this PSC NEG backend targets (if applicable).", +"type": "string" +} +}, +"type": "object" +}, +"LoadBalancerInfo": { +"description": "For display only. Metadata associated with a load balancer.", +"id": "LoadBalancerInfo", +"properties": { +"backendType": { +"description": "Type of load balancer's backend configuration.", +"enum": [ +"BACKEND_TYPE_UNSPECIFIED", +"BACKEND_SERVICE", +"TARGET_POOL", +"TARGET_INSTANCE" +], +"enumDescriptions": [ +"Type is unspecified.", +"Backend Service as the load balancer's backend.", +"Target Pool as the load balancer's backend.", +"Target Instance as the load balancer's backend." +], +"type": "string" +}, +"backendUri": { +"description": "Backend configuration URI.", +"type": "string" +}, +"backends": { +"description": "Information for the loadbalancer backends.", +"items": { +"$ref": "LoadBalancerBackend" +}, +"type": "array" +}, +"healthCheckUri": { +"deprecated": true, +"description": "URI of the health check for the load balancer. Deprecated and no longer populated as different load balancer backends might have different health checks.", +"type": "string" +}, +"loadBalancerType": { +"description": "Type of the load balancer.", +"enum": [ +"LOAD_BALANCER_TYPE_UNSPECIFIED", +"INTERNAL_TCP_UDP", +"NETWORK_TCP_UDP", +"HTTP_PROXY", +"TCP_PROXY", +"SSL_PROXY" +], +"enumDescriptions": [ +"Type is unspecified.", +"Internal TCP/UDP load balancer.", +"Network TCP/UDP load balancer.", +"HTTP(S) proxy load balancer.", +"TCP proxy load balancer.", +"SSL proxy load balancer." +], +"type": "string" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"NatInfo": { +"description": "For display only. Metadata associated with NAT.", +"id": "NatInfo", +"properties": { +"natGatewayName": { +"description": "The name of Cloud NAT Gateway. Only valid when type is CLOUD_NAT.", +"type": "string" +}, +"networkUri": { +"description": "URI of the network where NAT translation takes place.", +"type": "string" +}, +"newDestinationIp": { +"description": "Destination IP address after NAT translation.", +"type": "string" +}, +"newDestinationPort": { +"description": "Destination port after NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"newSourceIp": { +"description": "Source IP address after NAT translation.", +"type": "string" +}, +"newSourcePort": { +"description": "Source port after NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldDestinationIp": { +"description": "Destination IP address before NAT translation.", +"type": "string" +}, +"oldDestinationPort": { +"description": "Destination port before NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldSourceIp": { +"description": "Source IP address before NAT translation.", +"type": "string" +}, +"oldSourcePort": { +"description": "Source port before NAT translation. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IP protocol in string format, for example: \"TCP\", \"UDP\", \"ICMP\".", +"type": "string" +}, +"routerUri": { +"description": "Uri of the Cloud Router. Only valid when type is CLOUD_NAT.", +"type": "string" +}, +"type": { +"description": "Type of NAT.", +"enum": [ +"TYPE_UNSPECIFIED", +"INTERNAL_TO_EXTERNAL", +"EXTERNAL_TO_INTERNAL", +"CLOUD_NAT", +"PRIVATE_SERVICE_CONNECT" +], +"enumDescriptions": [ +"Type is unspecified.", +"From Compute Engine instance's internal address to external address.", +"From Compute Engine instance's external address to internal address.", +"Cloud NAT Gateway.", +"Private service connect NAT." +], +"type": "string" +} +}, +"type": "object" +}, +"NetworkInfo": { +"description": "For display only. Metadata associated with a Compute Engine network.", +"id": "NetworkInfo", +"properties": { +"displayName": { +"description": "Name of a Compute Engine network.", +"type": "string" +}, +"matchedIpRange": { +"description": "The IP range that matches the test.", +"type": "string" +}, +"uri": { +"description": "URI of a Compute Engine network.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata describing an Operation", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version.", +"type": "string" +}, +"cancelRequested": { +"description": "Specifies if cancellation was requested for the operation.", +"type": "boolean" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"statusDetail": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Target of the operation - for example projects/project-1/locations/global/connectivityTests/test-1", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ProbingDetails": { +"description": "Results of active probing from the last run of the test.", +"id": "ProbingDetails", +"properties": { +"abortCause": { +"description": "The reason probing was aborted.", +"enum": [ +"PROBING_ABORT_CAUSE_UNSPECIFIED", +"PERMISSION_DENIED", +"NO_SOURCE_LOCATION" +], +"enumDescriptions": [ +"No reason was specified.", +"The user lacks permission to access some of the network resources required to run the test.", +"No valid source endpoint could be derived from the request." +], +"type": "string" +}, +"destinationEgressLocation": { +"$ref": "EdgeLocation", +"description": "The EdgeLocation from which a packet destined for/originating from the internet will egress/ingress the Google network. This will only be populated for a connectivity test which has an internet destination/source address. The absence of this field *must not* be used as an indication that the destination/source is part of the Google network." +}, +"endpointInfo": { +"$ref": "EndpointInfo", +"description": "The source and destination endpoints derived from the test input and used for active probing." +}, +"error": { +"$ref": "Status", +"description": "Details about an internal failure or the cancellation of active probing." +}, +"probingLatency": { +"$ref": "LatencyDistribution", +"description": "Latency as measured by active probing in one direction: from the source to the destination endpoint." +}, +"result": { +"description": "The overall result of active probing.", +"enum": [ +"PROBING_RESULT_UNSPECIFIED", +"REACHABLE", +"UNREACHABLE", +"REACHABILITY_INCONSISTENT", +"UNDETERMINED" +], +"enumDescriptions": [ +"No result was specified.", +"At least 95% of packets reached the destination.", +"No packets reached the destination.", +"Less than 95% of packets reached the destination.", +"Reachability could not be determined. Possible reasons are: * The user lacks permission to access some of the network resources required to run the test. * No valid source endpoint could be derived from the request. * An internal error occurred." +], +"type": "string" +}, +"sentProbeCount": { +"description": "Number of probes sent.", +"format": "int32", +"type": "integer" +}, +"successfulProbeCount": { +"description": "Number of probes that reached the destination.", +"format": "int32", +"type": "integer" +}, +"verifyTime": { +"description": "The time that reachability was assessed through active probing.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ProxyConnectionInfo": { +"description": "For display only. Metadata associated with ProxyConnection.", +"id": "ProxyConnectionInfo", +"properties": { +"networkUri": { +"description": "URI of the network where connection is proxied.", +"type": "string" +}, +"newDestinationIp": { +"description": "Destination IP address of a new connection.", +"type": "string" +}, +"newDestinationPort": { +"description": "Destination port of a new connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"newSourceIp": { +"description": "Source IP address of a new connection.", +"type": "string" +}, +"newSourcePort": { +"description": "Source port of a new connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldDestinationIp": { +"description": "Destination IP address of an original connection", +"type": "string" +}, +"oldDestinationPort": { +"description": "Destination port of an original connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"oldSourceIp": { +"description": "Source IP address of an original connection.", +"type": "string" +}, +"oldSourcePort": { +"description": "Source port of an original connection. Only valid when protocol is TCP or UDP.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IP protocol in string format, for example: \"TCP\", \"UDP\", \"ICMP\".", +"type": "string" +}, +"subnetUri": { +"description": "Uri of proxy subnet.", +"type": "string" +} +}, +"type": "object" +}, +"ReachabilityDetails": { +"description": "Results of the configuration analysis from the last run of the test.", +"id": "ReachabilityDetails", +"properties": { +"error": { +"$ref": "Status", +"description": "The details of a failure or a cancellation of reachability analysis." +}, +"result": { +"description": "The overall result of the test's configuration analysis.", +"enum": [ +"RESULT_UNSPECIFIED", +"REACHABLE", +"UNREACHABLE", +"AMBIGUOUS", +"UNDETERMINED" +], +"enumDescriptions": [ +"No result was specified.", +"Possible scenarios are: * The configuration analysis determined that a packet originating from the source is expected to reach the destination. * The analysis didn't complete because the user lacks permission for some of the resources in the trace. However, at the time the user's permission became insufficient, the trace had been successful so far.", +"A packet originating from the source is expected to be dropped before reaching the destination.", +"The source and destination endpoints do not uniquely identify the test location in the network, and the reachability result contains multiple traces. For some traces, a packet could be delivered, and for others, it would not be. This result is also assigned to configuration analysis of return path if on its own it should be REACHABLE, but configuration analysis of forward path is AMBIGUOUS.", +"The configuration analysis did not complete. Possible reasons are: * A permissions error occurred--for example, the user might not have read permission for all of the resources named in the test. * An internal error occurred. * The analyzer received an invalid or unsupported argument or was unable to identify a known endpoint." +], +"type": "string" +}, +"traces": { +"description": "Result may contain a list of traces if a test has multiple possible paths in the network, such as when destination endpoint is a load balancer with multiple backends.", +"items": { +"$ref": "Trace" +}, +"type": "array" +}, +"verifyTime": { +"description": "The time of the configuration analysis.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RerunConnectivityTestRequest": { +"description": "Request for the `RerunConnectivityTest` method.", +"id": "RerunConnectivityTestRequest", +"properties": {}, +"type": "object" +}, +"RouteInfo": { +"description": "For display only. Metadata associated with a Compute Engine route.", +"id": "RouteInfo", +"properties": { +"destIpRange": { +"description": "Destination IP range of the route.", +"type": "string" +}, +"destPortRanges": { +"description": "Destination port ranges of the route. Policy based routes only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Name of a route.", +"type": "string" +}, +"instanceTags": { +"description": "Instance tags of the route.", +"items": { +"type": "string" +}, +"type": "array" +}, +"nccHubUri": { +"description": "URI of a NCC Hub. NCC_HUB routes only.", +"type": "string" +}, +"nccSpokeUri": { +"description": "URI of a NCC Spoke. NCC_HUB routes only.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Compute Engine network. NETWORK routes only.", +"type": "string" +}, +"nextHop": { +"description": "Next hop of the route.", +"type": "string" +}, +"nextHopType": { +"description": "Type of next hop.", +"enum": [ +"NEXT_HOP_TYPE_UNSPECIFIED", +"NEXT_HOP_IP", +"NEXT_HOP_INSTANCE", +"NEXT_HOP_NETWORK", +"NEXT_HOP_PEERING", +"NEXT_HOP_INTERCONNECT", +"NEXT_HOP_VPN_TUNNEL", +"NEXT_HOP_VPN_GATEWAY", +"NEXT_HOP_INTERNET_GATEWAY", +"NEXT_HOP_BLACKHOLE", +"NEXT_HOP_ILB", +"NEXT_HOP_ROUTER_APPLIANCE", +"NEXT_HOP_NCC_HUB" +], +"enumDescriptions": [ +"Unspecified type. Default value.", +"Next hop is an IP address.", +"Next hop is a Compute Engine instance.", +"Next hop is a VPC network gateway.", +"Next hop is a peering VPC.", +"Next hop is an interconnect.", +"Next hop is a VPN tunnel.", +"Next hop is a VPN gateway. This scenario only happens when tracing connectivity from an on-premises network to Google Cloud through a VPN. The analysis simulates a packet departing from the on-premises network through a VPN tunnel and arriving at a Cloud VPN gateway.", +"Next hop is an internet gateway.", +"Next hop is blackhole; that is, the next hop either does not exist or is not running.", +"Next hop is the forwarding rule of an Internal Load Balancer.", +"Next hop is a [router appliance instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).", +"Next hop is an NCC hub." +], +"type": "string" +}, +"priority": { +"description": "Priority of the route.", +"format": "int32", +"type": "integer" +}, +"protocols": { +"description": "Protocols of the route. Policy based routes only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"routeScope": { +"description": "Indicates where route is applicable.", +"enum": [ +"ROUTE_SCOPE_UNSPECIFIED", +"NETWORK", +"NCC_HUB" +], +"enumDescriptions": [ +"Unspecified scope. Default value.", +"Route is applicable to packets in Network.", +"Route is applicable to packets using NCC Hub's routing table." +], +"type": "string" +}, +"routeType": { +"description": "Type of route.", +"enum": [ +"ROUTE_TYPE_UNSPECIFIED", +"SUBNET", +"STATIC", +"DYNAMIC", +"PEERING_SUBNET", +"PEERING_STATIC", +"PEERING_DYNAMIC", +"POLICY_BASED" +], +"enumDescriptions": [ +"Unspecified type. Default value.", +"Route is a subnet route automatically created by the system.", +"Static route created by the user, including the default route to the internet.", +"Dynamic route exchanged between BGP peers.", +"A subnet route received from peering network.", +"A static route received from peering network.", +"A dynamic route received from peering network.", +"Policy based route." +], +"type": "string" +}, +"srcIpRange": { +"description": "Source IP address range of the route. Policy based routes only.", +"type": "string" +}, +"srcPortRanges": { +"description": "Source port ranges of the route. Policy based routes only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uri": { +"description": "URI of a route. Dynamic, peering static and peering dynamic routes do not have an URI. Advertised route from Google Cloud VPC to on-premises network also does not have an URI.", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Step": { +"description": "A simulated forwarding path is composed of multiple steps. Each step has a well-defined state and an associated configuration.", +"id": "Step", +"properties": { +"abort": { +"$ref": "AbortInfo", +"description": "Display information of the final state \"abort\" and reason." +}, +"appEngineVersion": { +"$ref": "AppEngineVersionInfo", +"description": "Display information of an App Engine service version." +}, +"causesDrop": { +"description": "This is a step that leads to the final state Drop.", +"type": "boolean" +}, +"cloudFunction": { +"$ref": "CloudFunctionInfo", +"description": "Display information of a Cloud Function." +}, +"cloudRunRevision": { +"$ref": "CloudRunRevisionInfo", +"description": "Display information of a Cloud Run revision." +}, +"cloudSqlInstance": { +"$ref": "CloudSQLInstanceInfo", +"description": "Display information of a Cloud SQL instance." +}, +"deliver": { +"$ref": "DeliverInfo", +"description": "Display information of the final state \"deliver\" and reason." +}, +"description": { +"description": "A description of the step. Usually this is a summary of the state.", +"type": "string" +}, +"drop": { +"$ref": "DropInfo", +"description": "Display information of the final state \"drop\" and reason." +}, +"endpoint": { +"$ref": "EndpointInfo", +"description": "Display information of the source and destination under analysis. The endpoint information in an intermediate state may differ with the initial input, as it might be modified by state like NAT, or Connection Proxy." +}, +"firewall": { +"$ref": "FirewallInfo", +"description": "Display information of a Compute Engine firewall rule." +}, +"forward": { +"$ref": "ForwardInfo", +"description": "Display information of the final state \"forward\" and reason." +}, +"forwardingRule": { +"$ref": "ForwardingRuleInfo", +"description": "Display information of a Compute Engine forwarding rule." +}, +"gkeMaster": { +"$ref": "GKEMasterInfo", +"description": "Display information of a Google Kubernetes Engine cluster master." +}, +"googleService": { +"$ref": "GoogleServiceInfo", +"description": "Display information of a Google service" +}, +"instance": { +"$ref": "InstanceInfo", +"description": "Display information of a Compute Engine instance." +}, +"loadBalancer": { +"$ref": "LoadBalancerInfo", +"deprecated": true, +"description": "Display information of the load balancers. Deprecated in favor of the `load_balancer_backend_info` field, not used in new tests." +}, +"loadBalancerBackendInfo": { +"$ref": "LoadBalancerBackendInfo", +"description": "Display information of a specific load balancer backend." +}, +"nat": { +"$ref": "NatInfo", +"description": "Display information of a NAT." +}, +"network": { +"$ref": "NetworkInfo", +"description": "Display information of a Google Cloud network." +}, +"projectId": { +"description": "Project ID that contains the configuration this step is validating.", +"type": "string" +}, +"proxyConnection": { +"$ref": "ProxyConnectionInfo", +"description": "Display information of a ProxyConnection." +}, +"route": { +"$ref": "RouteInfo", +"description": "Display information of a Compute Engine route." +}, +"state": { +"description": "Each step is in one of the pre-defined states.", +"enum": [ +"STATE_UNSPECIFIED", +"START_FROM_INSTANCE", +"START_FROM_INTERNET", +"START_FROM_GOOGLE_SERVICE", +"START_FROM_PRIVATE_NETWORK", +"START_FROM_GKE_MASTER", +"START_FROM_CLOUD_SQL_INSTANCE", +"START_FROM_CLOUD_FUNCTION", +"START_FROM_APP_ENGINE_VERSION", +"START_FROM_CLOUD_RUN_REVISION", +"START_FROM_STORAGE_BUCKET", +"START_FROM_PSC_PUBLISHED_SERVICE", +"APPLY_INGRESS_FIREWALL_RULE", +"APPLY_EGRESS_FIREWALL_RULE", +"APPLY_ROUTE", +"APPLY_FORWARDING_RULE", +"ANALYZE_LOAD_BALANCER_BACKEND", +"SPOOFING_APPROVED", +"ARRIVE_AT_INSTANCE", +"ARRIVE_AT_INTERNAL_LOAD_BALANCER", +"ARRIVE_AT_EXTERNAL_LOAD_BALANCER", +"ARRIVE_AT_VPN_GATEWAY", +"ARRIVE_AT_VPN_TUNNEL", +"ARRIVE_AT_VPC_CONNECTOR", +"NAT", +"PROXY_CONNECTION", +"DELIVER", +"DROP", +"FORWARD", +"ABORT", +"VIEWER_PERMISSION_MISSING" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unspecified state.", +"Initial state: packet originating from a Compute Engine instance. An InstanceInfo is populated with starting instance information.", +"Initial state: packet originating from the internet. The endpoint information is populated.", +"Initial state: packet originating from a Google service. The google_service information is populated.", +"Initial state: packet originating from a VPC or on-premises network with internal source IP. If the source is a VPC network visible to the user, a NetworkInfo is populated with details of the network.", +"Initial state: packet originating from a Google Kubernetes Engine cluster master. A GKEMasterInfo is populated with starting instance information.", +"Initial state: packet originating from a Cloud SQL instance. A CloudSQLInstanceInfo is populated with starting instance information.", +"Initial state: packet originating from a Cloud Function. A CloudFunctionInfo is populated with starting function information.", +"Initial state: packet originating from an App Engine service version. An AppEngineVersionInfo is populated with starting version information.", +"Initial state: packet originating from a Cloud Run revision. A CloudRunRevisionInfo is populated with starting revision information.", +"Initial state: packet originating from a Storage Bucket. Used only for return traces. The storage_bucket information is populated.", +"Initial state: packet originating from a published service that uses Private Service Connect. Used only for return traces.", +"Config checking state: verify ingress firewall rule.", +"Config checking state: verify egress firewall rule.", +"Config checking state: verify route.", +"Config checking state: match forwarding rule.", +"Config checking state: verify load balancer backend configuration.", +"Config checking state: packet sent or received under foreign IP address and allowed.", +"Forwarding state: arriving at a Compute Engine instance.", +"Forwarding state: arriving at a Compute Engine internal load balancer. Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not used in new tests.", +"Forwarding state: arriving at a Compute Engine external load balancer. Deprecated in favor of the `ANALYZE_LOAD_BALANCER_BACKEND` state, not used in new tests.", +"Forwarding state: arriving at a Cloud VPN gateway.", +"Forwarding state: arriving at a Cloud VPN tunnel.", +"Forwarding state: arriving at a VPC connector.", +"Transition state: packet header translated.", +"Transition state: original connection is terminated and a new proxied connection is initiated.", +"Final state: packet could be delivered.", +"Final state: packet could be dropped.", +"Final state: packet could be forwarded to a network with an unknown configuration.", +"Final state: analysis is aborted.", +"Special state: viewer of the test result does not have permission to see the configuration in this step." +], +"type": "string" +}, +"storageBucket": { +"$ref": "StorageBucketInfo", +"description": "Display information of a Storage Bucket. Used only for return traces." +}, +"vpcConnector": { +"$ref": "VpcConnectorInfo", +"description": "Display information of a VPC connector." +}, +"vpnGateway": { +"$ref": "VpnGatewayInfo", +"description": "Display information of a Compute Engine VPN gateway." +}, +"vpnTunnel": { +"$ref": "VpnTunnelInfo", +"description": "Display information of a Compute Engine VPN tunnel." +} +}, +"type": "object" +}, +"StorageBucketInfo": { +"description": "For display only. Metadata associated with Storage Bucket.", +"id": "StorageBucketInfo", +"properties": { +"bucket": { +"description": "Cloud Storage Bucket name.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Trace": { +"description": "Trace represents one simulated packet forwarding path. * Each trace contains multiple ordered steps. * Each step is in a particular state with associated configuration. * State is categorized as final or non-final states. * Each final state has a reason associated. * Each trace must end with a final state (the last step). ``` |---------------------Trace----------------------| Step1(State) Step2(State) --- StepN(State(final)) ```", +"id": "Trace", +"properties": { +"endpointInfo": { +"$ref": "EndpointInfo", +"description": "Derived from the source and destination endpoints definition specified by user request, and validated by the data plane model. If there are multiple traces starting from different source locations, then the endpoint_info may be different between traces." +}, +"forwardTraceId": { +"description": "ID of trace. For forward traces, this ID is unique for each trace. For return traces, it matches ID of associated forward trace. A single forward trace can be associated with none, one or more than one return trace.", +"format": "int32", +"type": "integer" +}, +"steps": { +"description": "A trace of a test contains multiple steps from the initial state to the final state (delivered, dropped, forwarded, or aborted). The steps are ordered by the processing sequence within the simulated network state machine. It is critical to preserve the order of the steps and avoid reordering or sorting them.", +"items": { +"$ref": "Step" +}, +"type": "array" +} +}, +"type": "object" +}, +"VpcConnectorInfo": { +"description": "For display only. Metadata associated with a VPC connector.", +"id": "VpcConnectorInfo", +"properties": { +"displayName": { +"description": "Name of a VPC connector.", +"type": "string" +}, +"location": { +"description": "Location in which the VPC connector is deployed.", +"type": "string" +}, +"uri": { +"description": "URI of a VPC connector.", +"type": "string" +} +}, +"type": "object" +}, +"VpcFlowLogsConfig": { +"description": "A configuration to generate VPC Flow Logs.", +"id": "VpcFlowLogsConfig", +"properties": { +"aggregationInterval": { +"description": "Optional. The aggregation interval for the logs. Default value is INTERVAL_5_SEC.", +"enum": [ +"AGGREGATION_INTERVAL_UNSPECIFIED", +"INTERVAL_5_SEC", +"INTERVAL_30_SEC", +"INTERVAL_1_MIN", +"INTERVAL_5_MIN", +"INTERVAL_10_MIN", +"INTERVAL_15_MIN" +], +"enumDescriptions": [ +"If not specified, will default to INTERVAL_5_SEC.", +"Aggregate logs in 5s intervals.", +"Aggregate logs in 30s intervals.", +"Aggregate logs in 1m intervals.", +"Aggregate logs in 5m intervals.", +"Aggregate logs in 10m intervals.", +"Aggregate logs in 15m intervals." +], +"type": "string" +}, +"createTime": { +"description": "Output only. The time the config was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. The user-supplied description of the VPC Flow Logs configuration. Maximum of 512 characters.", +"type": "string" +}, +"filterExpr": { +"description": "Export filter used to define which VPC flow logs should be logged.", +"type": "string" +}, +"flowSampling": { +"description": "Optional. The value of the field must be in [0, 1]. The sampling rate of VPC flow logs within the subnetwork where 1.0 means all collected logs are reported and 0.0 means no logs are reported. Default value is 1.0.", +"format": "float", +"type": "number" +}, +"interconnectAttachment": { +"description": "Traffic will be logged from the Interconnect Attachment. Format: projects/{project_id}/locations/{region}/interconnectAttachments/{name}", +"type": "string" +}, +"metadata": { +"description": "Optional. Configures whether all, none or a subset of metadata fields should be added to the reported VPC flow logs. Default value is INCLUDE_ALL_METADATA.", +"enum": [ +"METADATA_UNSPECIFIED", +"INCLUDE_ALL_METADATA", +"EXCLUDE_ALL_METADATA", +"CUSTOM_METADATA" +], +"enumDescriptions": [ +"If not specified, will default to INCLUDE_ALL_METADATA.", +"Include all metadata fields.", +"Exclude all metadata fields.", +"Include only custom fields (specified in metadata_fields)." +], +"type": "string" +}, +"metadataFields": { +"description": "Optional. Custom metadata fields to include in the reported VPC flow logs. Can only be specified if \"metadata\" was set to CUSTOM_METADATA.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Identifier. Unique name of the configuration using the form: `projects/{project_id}/locations/global/vpcFlowLogs/{vpc_flow_log}`", +"type": "string" +}, +"network": { +"description": "Traffic will be logged from VMs, VPN tunnels and Interconnect Attachments within the network. Format: projects/{project_id}/networks/{name}", +"type": "string" +}, +"state": { +"description": "Optional. The state of the VPC Flow Log. Default value is ENABLED.", +"enum": [ +"STATE_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"If not specified, will default to ENABLED.", +"When ENABLED, this configuration will generate logs.", +"When DISABLED, this configuration will not generate logs." +], +"type": "string" +}, +"subnet": { +"description": "Traffic will be logged from VMs within the subnetwork. Format: projects/{project_id}/locations/{region}/subnetworks/{name}", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the config was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vpnTunnel": { +"description": "Traffic will be logged from the VPN Tunnel. Format: projects/{project_id}/locations/{region}/vpnTunnels/{name}", +"type": "string" +} +}, +"type": "object" +}, +"VpnGatewayInfo": { +"description": "For display only. Metadata associated with a Compute Engine VPN gateway.", +"id": "VpnGatewayInfo", +"properties": { +"displayName": { +"description": "Name of a VPN gateway.", +"type": "string" +}, +"ipAddress": { +"description": "IP address of the VPN gateway.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Compute Engine network where the VPN gateway is configured.", +"type": "string" +}, +"region": { +"description": "Name of a Google Cloud region where this VPN gateway is configured.", +"type": "string" +}, +"uri": { +"description": "URI of a VPN gateway.", +"type": "string" +}, +"vpnTunnelUri": { +"description": "A VPN tunnel that is associated with this VPN gateway. There may be multiple VPN tunnels configured on a VPN gateway, and only the one relevant to the test is displayed.", +"type": "string" +} +}, +"type": "object" +}, +"VpnTunnelInfo": { +"description": "For display only. Metadata associated with a Compute Engine VPN tunnel.", +"id": "VpnTunnelInfo", +"properties": { +"displayName": { +"description": "Name of a VPN tunnel.", +"type": "string" +}, +"networkUri": { +"description": "URI of a Compute Engine network where the VPN tunnel is configured.", +"type": "string" +}, +"region": { +"description": "Name of a Google Cloud region where this VPN tunnel is configured.", +"type": "string" +}, +"remoteGateway": { +"description": "URI of a VPN gateway at remote end of the tunnel.", +"type": "string" +}, +"remoteGatewayIp": { +"description": "Remote VPN gateway's IP address.", +"type": "string" +}, +"routingType": { +"description": "Type of the routing policy.", +"enum": [ +"ROUTING_TYPE_UNSPECIFIED", +"ROUTE_BASED", +"POLICY_BASED", +"DYNAMIC" +], +"enumDescriptions": [ +"Unspecified type. Default value.", +"Route based VPN.", +"Policy based routing.", +"Dynamic (BGP) routing." +], +"type": "string" +}, +"sourceGateway": { +"description": "URI of the VPN gateway at local end of the tunnel.", +"type": "string" +}, +"sourceGatewayIp": { +"description": "Local VPN gateway's IP address.", +"type": "string" +}, +"uri": { +"description": "URI of a VPN tunnel.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Management API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networksecurity.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networksecurity.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..b028c1a2bc0d921fe7f8a5992b038f92f7c03d9e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networksecurity.v1.json @@ -0,0 +1,4854 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networksecurity.googleapis.com/", +"batchPath": "batch", +"canonicalName": "NetworkSecurity", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/networking", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networksecurity:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networksecurity.mtls.googleapis.com/", +"name": "networksecurity", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"organizations": { +"resources": { +"locations": { +"resources": { +"addressGroups": { +"methods": { +"addItems": { +"description": "Adds items to an address group.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.addItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+addressGroup}:addItems", +"request": { +"$ref": "AddAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"cloneItems": { +"description": "Clones items from one address group to another.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.cloneItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+addressGroup}:cloneItems", +"request": { +"$ref": "CloneAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new address group in a given project and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"addressGroupId": { +"description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/addressGroups", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an address group.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.addressGroups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single address group.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.addressGroups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "AddressGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists address groups in a given project and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.addressGroups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of AddressGroups to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/addressGroups", +"response": { +"$ref": "ListAddressGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listReferences": { +"description": "Lists references of an address group.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.addressGroups.listReferences", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+addressGroup}:listReferences", +"response": { +"$ref": "ListAddressGroupReferencesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates parameters of an address group.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.addressGroups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeItems": { +"description": "Removes items from an address group.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.removeItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+addressGroup}:removeItems", +"request": { +"$ref": "RemoveAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"firewallEndpoints": { +"methods": { +"create": { +"description": "Creates a new FirewallEndpoint in a given project and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.firewallEndpoints.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"firewallEndpointId": { +"description": "Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Value for parent.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/firewallEndpoints", +"request": { +"$ref": "FirewallEndpoint" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Endpoint.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints/{firewallEndpointsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.firewallEndpoints.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/firewallEndpoints/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Endpoint.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints/{firewallEndpointsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.firewallEndpoints.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/firewallEndpoints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "FirewallEndpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists FirewallEndpoints in a given project and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.firewallEndpoints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Hint for how to order the results", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent value for ListEndpointsRequest", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/firewallEndpoints", +"response": { +"$ref": "ListFirewallEndpointsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a single Endpoint.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints/{firewallEndpointsId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.firewallEndpoints.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. name of resource", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/firewallEndpoints/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the Endpoint resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "FirewallEndpoint" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityProfileGroups": { +"methods": { +"create": { +"description": "Creates a new SecurityProfileGroup in a given organization and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.securityProfileGroups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the SecurityProfileGroup. Must be in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"securityProfileGroupId": { +"description": "Required. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile_group1\".", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/securityProfileGroups", +"request": { +"$ref": "SecurityProfileGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single SecurityProfileGroup.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.securityProfileGroups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. A name of the SecurityProfileGroup to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single SecurityProfileGroup.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfileGroups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the SecurityProfileGroup to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "SecurityProfileGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecurityProfileGroups in a given organization and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfileGroups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of SecurityProfileGroups to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSecurityProfileGroupsResponse` Indicates that this is a continuation of a prior `ListSecurityProfileGroups` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project or organization and location from which the SecurityProfileGroups should be listed, specified in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/securityProfileGroups", +"response": { +"$ref": "ListSecurityProfileGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single SecurityProfileGroup.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.securityProfileGroups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfileGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityProfileGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityProfiles": { +"methods": { +"create": { +"description": "Creates a new SecurityProfile in a given organization and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.securityProfiles.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the SecurityProfile. Must be in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"securityProfileId": { +"description": "Required. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile1\".", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/securityProfiles", +"request": { +"$ref": "SecurityProfile" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single SecurityProfile.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.securityProfiles.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. A name of the SecurityProfile to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single SecurityProfile.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfiles.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the SecurityProfile to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "SecurityProfile" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecurityProfiles in a given organization and location.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfiles.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of SecurityProfiles to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSecurityProfilesResponse` Indicates that this is a continuation of a prior `ListSecurityProfiles` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project or organization and location from which the SecurityProfiles should be listed, specified in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/securityProfiles", +"response": { +"$ref": "ListSecurityProfilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single SecurityProfile.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.securityProfiles.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfile resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityProfile" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"addressGroups": { +"methods": { +"addItems": { +"description": "Adds items to an address group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.addItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+addressGroup}:addItems", +"request": { +"$ref": "AddAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"cloneItems": { +"description": "Clones items from one address group to another.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.cloneItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+addressGroup}:cloneItems", +"request": { +"$ref": "CloneAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new address group in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"addressGroupId": { +"description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/addressGroups", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single address group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.addressGroups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single address group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "AddressGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists address groups in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of AddressGroups to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/addressGroups", +"response": { +"$ref": "ListAddressGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listReferences": { +"description": "Lists references of an address group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.listReferences", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+addressGroup}:listReferences", +"response": { +"$ref": "ListAddressGroupReferencesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single address group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.addressGroups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeItems": { +"description": "Removes items from an address group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.removeItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+addressGroup}:removeItems", +"request": { +"$ref": "RemoveAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"authorizationPolicies": { +"methods": { +"create": { +"description": "Creates a new AuthorizationPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.authorizationPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"authorizationPolicyId": { +"description": "Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the AuthorizationPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/authorizationPolicies", +"request": { +"$ref": "AuthorizationPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single AuthorizationPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.authorizationPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AuthorizationPolicy to delete. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single AuthorizationPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.authorizationPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AuthorizationPolicy to get. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "AuthorizationPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.authorizationPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists AuthorizationPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.authorizationPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of AuthorizationPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAuthorizationPoliciesResponse` Indicates that this is a continuation of a prior `ListAuthorizationPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the AuthorizationPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/authorizationPolicies", +"response": { +"$ref": "ListAuthorizationPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single AuthorizationPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.authorizationPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "AuthorizationPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.authorizationPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.authorizationPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"clientTlsPolicies": { +"methods": { +"create": { +"description": "Creates a new ClientTlsPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.clientTlsPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"clientTlsPolicyId": { +"description": "Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"client_mtls_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the ClientTlsPolicy. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/clientTlsPolicies", +"request": { +"$ref": "ClientTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ClientTlsPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.clientTlsPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ClientTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ClientTlsPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.clientTlsPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ClientTlsPolicy to get. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ClientTlsPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.clientTlsPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ClientTlsPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.clientTlsPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ClientTlsPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListClientTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListClientTlsPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ClientTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/clientTlsPolicies", +"response": { +"$ref": "ListClientTlsPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ClientTlsPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.clientTlsPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ClientTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.clientTlsPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.clientTlsPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"firewallEndpointAssociations": { +"methods": { +"create": { +"description": "Creates a new FirewallEndpointAssociation in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"firewallEndpointAssociationId": { +"description": "Optional. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_association_id from the method_signature of Create RPC.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Value for parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/firewallEndpointAssociations", +"request": { +"$ref": "FirewallEndpointAssociation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single FirewallEndpointAssociation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations/{firewallEndpointAssociationsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/firewallEndpointAssociations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single FirewallEndpointAssociation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations/{firewallEndpointAssociationsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/firewallEndpointAssociations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "FirewallEndpointAssociation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Associations in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Hint for how to order the results", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent value for ListAssociationsRequest", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/firewallEndpointAssociations", +"response": { +"$ref": "ListFirewallEndpointAssociationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a single FirewallEndpointAssociation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations/{firewallEndpointAssociationsId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. name of resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/firewallEndpointAssociations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the Association resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "FirewallEndpointAssociation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"gatewaySecurityPolicies": { +"methods": { +"create": { +"description": "Creates a new GatewaySecurityPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"gatewaySecurityPolicyId": { +"description": "Required. Short name of the GatewaySecurityPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"gateway_security_policy1\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the GatewaySecurityPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/gatewaySecurityPolicies", +"request": { +"$ref": "GatewaySecurityPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single GatewaySecurityPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GatewaySecurityPolicy to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single GatewaySecurityPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GatewaySecurityPolicy to get. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GatewaySecurityPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists GatewaySecurityPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of GatewaySecurityPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicies' call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the GatewaySecurityPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/gatewaySecurityPolicies", +"response": { +"$ref": "ListGatewaySecurityPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single GatewaySecurityPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GatewaySecurityPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"rules": { +"methods": { +"create": { +"description": "Creates a new GatewaySecurityPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"gatewaySecurityPolicyRuleId": { +"description": "The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent where this rule will be created. Format : projects/{project}/location/{location}/gatewaySecurityPolicies/*", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/rules", +"request": { +"$ref": "GatewaySecurityPolicyRule" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single GatewaySecurityPolicyRule.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GatewaySecurityPolicyRule to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single GatewaySecurityPolicyRule.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the GatewaySecurityPolicyRule to retrieve. Format: projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GatewaySecurityPolicyRule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists GatewaySecurityPolicyRules in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of GatewaySecurityPolicyRules to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project, location and GatewaySecurityPolicy from which the GatewaySecurityPolicyRules should be listed, specified in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/rules", +"response": { +"$ref": "ListGatewaySecurityPolicyRulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single GatewaySecurityPolicyRule.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GatewaySecurityPolicyRule" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serverTlsPolicies": { +"methods": { +"create": { +"description": "Creates a new ServerTlsPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.serverTlsPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"serverTlsPolicyId": { +"description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/serverTlsPolicies", +"request": { +"$ref": "ServerTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServerTlsPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.serverTlsPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServerTlsPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.serverTlsPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ServerTlsPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServerTlsPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.serverTlsPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ServerTlsPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/serverTlsPolicies", +"response": { +"$ref": "ListServerTlsPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ServerTlsPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.serverTlsPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ServerTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tlsInspectionPolicies": { +"methods": { +"create": { +"description": "Creates a new TlsInspectionPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"tlsInspectionPolicyId": { +"description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/tlsInspectionPolicies", +"request": { +"$ref": "TlsInspectionPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TlsInspectionPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TlsInspectionPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "TlsInspectionPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TlsInspectionPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of TlsInspectionPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/tlsInspectionPolicies", +"response": { +"$ref": "ListTlsInspectionPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TlsInspectionPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "TlsInspectionPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"urlLists": { +"methods": { +"create": { +"description": "Creates a new UrlList in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.urlLists.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"urlListId": { +"description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/urlLists", +"request": { +"$ref": "UrlList" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single UrlList.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.urlLists.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single UrlList.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.urlLists.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "UrlList" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists UrlLists in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.urlLists.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of UrlLists to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/urlLists", +"response": { +"$ref": "ListUrlListsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single UrlList.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.urlLists.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UrlList" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240320", +"rootUrl": "https://networksecurity.googleapis.com/", +"schemas": { +"AddAddressGroupItemsRequest": { +"description": "Request used by the AddAddressGroupItems method.", +"id": "AddAddressGroupItemsRequest", +"properties": { +"items": { +"description": "Required. List of items to add.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"AddressGroup": { +"description": "AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.", +"id": "AddressGroup", +"properties": { +"capacity": { +"description": "Required. Capacity of the Address Group", +"format": "int32", +"type": "integer" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"items": { +"description": "Optional. List of items.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the AddressGroup resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", +"type": "string" +}, +"selfLink": { +"description": "Output only. Server-defined fully-qualified URL for this resource.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of the Address Group. Possible values are \"IPv4\" or \"IPV6\".", +"enum": [ +"TYPE_UNSPECIFIED", +"IPV4", +"IPV6" +], +"enumDescriptions": [ +"Default value.", +"IP v4 ranges.", +"IP v6 ranges." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AuthorizationPolicy": { +"description": "AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.", +"id": "AuthorizationPolicy", +"properties": { +"action": { +"description": "Required. The action to take when a rule match is found. Possible values are \"ALLOW\" or \"DENY\".", +"enum": [ +"ACTION_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Default value.", +"Grant access.", +"Deny access. Deny rules should be avoided unless they are used to provide a default \"deny all\" fallback." +], +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the AuthorizationPolicy resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", +"type": "string" +}, +"rules": { +"description": "Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the `action` field will be applied on every request.", +"items": { +"$ref": "Rule" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CertificateProviderInstance": { +"description": "Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.", +"id": "CertificateProviderInstance", +"properties": { +"pluginInstance": { +"description": "Required. Plugin instance name, used to locate and load CertificateProvider instance configuration. Set to \"google_cloud_private_spiffe\" to use Certificate Authority Service certificate provider instance.", +"type": "string" +} +}, +"type": "object" +}, +"ClientTlsPolicy": { +"description": "ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.", +"id": "ClientTlsPolicy", +"properties": { +"clientCertificate": { +"$ref": "GoogleCloudNetworksecurityV1CertificateProvider", +"description": "Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS." +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", +"type": "string" +}, +"serverValidationCa": { +"description": "Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.", +"items": { +"$ref": "ValidationCA" +}, +"type": "array" +}, +"sni": { +"description": "Optional. Server Name Indication string to present to the server during TLS handshake. E.g: \"secure.example.com\".", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CloneAddressGroupItemsRequest": { +"description": "Request used by the CloneAddressGroupItems method.", +"id": "CloneAddressGroupItemsRequest", +"properties": { +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +}, +"sourceAddressGroup": { +"description": "Required. Source address group to clone items from.", +"type": "string" +} +}, +"type": "object" +}, +"Destination": { +"description": "Specification of traffic destination attributes.", +"id": "Destination", +"properties": { +"hosts": { +"description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"httpHeaderMatch": { +"$ref": "HttpHeaderMatch", +"description": "Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy." +}, +"methods": { +"description": "Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ports": { +"description": "Required. List of destination ports to match. At least one port should match.", +"items": { +"format": "uint32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"FirewallEndpoint": { +"description": "Message describing Endpoint object", +"id": "FirewallEndpoint", +"properties": { +"associatedNetworks": { +"deprecated": true, +"description": "Output only. List of networks that are associated with this endpoint in the local zone. This is a projection of the FirewallEndpointAssociations pointing at this endpoint. A network will only appear in this list after traffic routing is fully configured. Format: projects/{project}/global/networks/{name}.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"associations": { +"description": "Output only. List of FirewallEndpointAssociations that are associated to this endpoint. An association will only appear in this list after traffic routing is fully configured.", +"items": { +"$ref": "FirewallEndpointAssociationReference" +}, +"readOnly": true, +"type": "array" +}, +"billingProjectId": { +"description": "Required. Project to bill on endpoint uptime usage.", +"type": "string" +}, +"createTime": { +"description": "Output only. Create time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Description of the firewall endpoint. Max length 2048 characters.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. name of resource", +"type": "string" +}, +"reconciling": { +"description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. Current state of the endpoint.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"INACTIVE" +], +"enumDescriptions": [ +"Not set.", +"Being created.", +"Processing configuration updates.", +"Being deleted.", +"Down or in an error state." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Update time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"FirewallEndpointAssociation": { +"description": "Message describing Association object", +"id": "FirewallEndpointAssociation", +"properties": { +"createTime": { +"description": "Output only. Create time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"disabled": { +"description": "Optional. Whether the association is disabled. True indicates that traffic won't be intercepted", +"type": "boolean" +}, +"firewallEndpoint": { +"description": "Required. The URL of the FirewallEndpoint that is being associated.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. name of resource", +"type": "string" +}, +"network": { +"description": "Required. The URL of the network that is being associated.", +"type": "string" +}, +"reconciling": { +"description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. Current state of the association.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"INACTIVE" +], +"enumDescriptions": [ +"Not set.", +"Being created.", +"Active and ready for traffic.", +"Being deleted.", +"Down or in an error state." +], +"readOnly": true, +"type": "string" +}, +"tlsInspectionPolicy": { +"description": "Optional. The URL of the TlsInspectionPolicy that is being associated.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Update time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"FirewallEndpointAssociationReference": { +"description": "This is a subset of the FirewallEndpointAssociation message, containing fields to be used by the consumer.", +"id": "FirewallEndpointAssociationReference", +"properties": { +"name": { +"description": "Output only. The resource name of the FirewallEndpointAssociation. Format: projects/{project}/locations/{location}/firewallEndpointAssociations/{id}", +"readOnly": true, +"type": "string" +}, +"network": { +"description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GatewaySecurityPolicy": { +"description": "The GatewaySecurityPolicy resource contains a collection of GatewaySecurityPolicyRules and associated metadata.", +"id": "GatewaySecurityPolicy", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"tlsInspectionPolicy": { +"description": "Optional. Name of a TLS Inspection Policy resource that defines how TLS inspection will be performed for any rule(s) which enables it.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GatewaySecurityPolicyRule": { +"description": "The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.", +"id": "GatewaySecurityPolicyRule", +"properties": { +"applicationMatcher": { +"description": "Optional. CEL expression for matching on L7/application level criteria.", +"type": "string" +}, +"basicProfile": { +"description": "Required. Profile which tells what the primitive action should be.", +"enum": [ +"BASIC_PROFILE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"If there is not a mentioned action for the target.", +"Allow the matched traffic.", +"Deny the matched traffic." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Time when the rule was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"enabled": { +"description": "Required. Whether the rule is enforced.", +"type": "boolean" +}, +"name": { +"description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"priority": { +"description": "Required. Priority of the rule. Lower number corresponds to higher precedence.", +"format": "int32", +"type": "integer" +}, +"sessionMatcher": { +"description": "Required. CEL expression for matching on session criteria.", +"type": "string" +}, +"tlsInspectionEnabled": { +"description": "Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.", +"type": "boolean" +}, +"updateTime": { +"description": "Output only. Time when the rule was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudNetworksecurityV1CertificateProvider": { +"description": "Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.", +"id": "GoogleCloudNetworksecurityV1CertificateProvider", +"properties": { +"certificateProviderInstance": { +"$ref": "CertificateProviderInstance", +"description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." +}, +"grpcEndpoint": { +"$ref": "GoogleCloudNetworksecurityV1GrpcEndpoint", +"description": "gRPC specific configuration to access the gRPC server to obtain the cert and private key." +} +}, +"type": "object" +}, +"GoogleCloudNetworksecurityV1GrpcEndpoint": { +"description": "Specification of the GRPC Endpoint.", +"id": "GoogleCloudNetworksecurityV1GrpcEndpoint", +"properties": { +"targetUri": { +"description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleIamV1SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "GoogleIamV1SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "GoogleIamV1TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIamV1TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "GoogleIamV1TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpHeaderMatch": { +"description": "Specification of HTTP header match attributes.", +"id": "HttpHeaderMatch", +"properties": { +"headerName": { +"description": "Required. The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\".", +"type": "string" +}, +"regexMatch": { +"description": "Required. The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to Host and a regular expression that satisfies the RFC2616 Host header's port specifier.", +"type": "string" +} +}, +"type": "object" +}, +"ListAddressGroupReferencesResponse": { +"description": "Response of the ListAddressGroupReferences method.", +"id": "ListAddressGroupReferencesResponse", +"properties": { +"addressGroupReferences": { +"description": "A list of references that matches the specified filter in the request.", +"items": { +"$ref": "ListAddressGroupReferencesResponseAddressGroupReference" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListAddressGroupReferencesResponseAddressGroupReference": { +"description": "The Reference of AddressGroup.", +"id": "ListAddressGroupReferencesResponseAddressGroupReference", +"properties": { +"firewallPolicy": { +"description": "FirewallPolicy that is using the Address Group.", +"type": "string" +}, +"rulePriority": { +"description": "Rule priority of the FirewallPolicy that is using the Address Group.", +"format": "int32", +"type": "integer" +}, +"securityPolicy": { +"description": "Cloud Armor SecurityPolicy that is using the Address Group.", +"type": "string" +} +}, +"type": "object" +}, +"ListAddressGroupsResponse": { +"description": "Response returned by the ListAddressGroups method.", +"id": "ListAddressGroupsResponse", +"properties": { +"addressGroups": { +"description": "List of AddressGroups resources.", +"items": { +"$ref": "AddressGroup" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListAuthorizationPoliciesResponse": { +"description": "Response returned by the ListAuthorizationPolicies method.", +"id": "ListAuthorizationPoliciesResponse", +"properties": { +"authorizationPolicies": { +"description": "List of AuthorizationPolicies resources.", +"items": { +"$ref": "AuthorizationPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListClientTlsPoliciesResponse": { +"description": "Response returned by the ListClientTlsPolicies method.", +"id": "ListClientTlsPoliciesResponse", +"properties": { +"clientTlsPolicies": { +"description": "List of ClientTlsPolicy resources.", +"items": { +"$ref": "ClientTlsPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListFirewallEndpointAssociationsResponse": { +"description": "Message for response to listing Associations", +"id": "ListFirewallEndpointAssociationsResponse", +"properties": { +"firewallEndpointAssociations": { +"description": "The list of Association", +"items": { +"$ref": "FirewallEndpointAssociation" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListFirewallEndpointsResponse": { +"description": "Message for response to listing Endpoints", +"id": "ListFirewallEndpointsResponse", +"properties": { +"firewallEndpoints": { +"description": "The list of Endpoint", +"items": { +"$ref": "FirewallEndpoint" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListGatewaySecurityPoliciesResponse": { +"description": "Response returned by the ListGatewaySecurityPolicies method.", +"id": "ListGatewaySecurityPoliciesResponse", +"properties": { +"gatewaySecurityPolicies": { +"description": "List of GatewaySecurityPolicies resources.", +"items": { +"$ref": "GatewaySecurityPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListGatewaySecurityPolicyRulesResponse": { +"description": "Response returned by the ListGatewaySecurityPolicyRules method.", +"id": "ListGatewaySecurityPolicyRulesResponse", +"properties": { +"gatewaySecurityPolicyRules": { +"description": "List of GatewaySecurityPolicyRule resources.", +"items": { +"$ref": "GatewaySecurityPolicyRule" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecurityProfileGroupsResponse": { +"description": "Response returned by the ListSecurityProfileGroups method.", +"id": "ListSecurityProfileGroupsResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"securityProfileGroups": { +"description": "List of SecurityProfileGroups resources.", +"items": { +"$ref": "SecurityProfileGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecurityProfilesResponse": { +"description": "Response returned by the ListSecurityProfiles method.", +"id": "ListSecurityProfilesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"securityProfiles": { +"description": "List of SecurityProfile resources.", +"items": { +"$ref": "SecurityProfile" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServerTlsPoliciesResponse": { +"description": "Response returned by the ListServerTlsPolicies method.", +"id": "ListServerTlsPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"serverTlsPolicies": { +"description": "List of ServerTlsPolicy resources.", +"items": { +"$ref": "ServerTlsPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTlsInspectionPoliciesResponse": { +"description": "Response returned by the ListTlsInspectionPolicies method.", +"id": "ListTlsInspectionPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", +"type": "string" +}, +"tlsInspectionPolicies": { +"description": "List of TlsInspectionPolicies resources.", +"items": { +"$ref": "TlsInspectionPolicy" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUrlListsResponse": { +"description": "Response returned by the ListUrlLists method.", +"id": "ListUrlListsResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +}, +"urlLists": { +"description": "List of UrlList resources.", +"items": { +"$ref": "UrlList" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"MTLSPolicy": { +"description": "Specification of the MTLSPolicy.", +"id": "MTLSPolicy", +"properties": { +"clientValidationCa": { +"description": "Required if the policy is to be used with Traffic Director. For external HTTPS load balancers it must be empty. Defines the mechanism to obtain the Certificate Authority certificate to validate the client certificate.", +"items": { +"$ref": "ValidationCA" +}, +"type": "array" +}, +"clientValidationMode": { +"description": "When the client presents an invalid certificate or no certificate to the load balancer, the `client_validation_mode` specifies how the client connection is handled. Required if the policy is to be used with the external HTTPS load balancing. For Traffic Director it must be empty.", +"enum": [ +"CLIENT_VALIDATION_MODE_UNSPECIFIED", +"ALLOW_INVALID_OR_MISSING_CLIENT_CERT", +"REJECT_INVALID" +], +"enumDescriptions": [ +"Not allowed.", +"Allow connection even if certificate chain validation of the client certificate failed or no client certificate was presented. The proof of possession of the private key is always checked if client certificate was presented. This mode requires the backend to implement processing of data extracted from a client certificate to authenticate the peer, or to reject connections if the client certificate fingerprint is missing.", +"Require a client certificate and allow connection to the backend only if validation of the client certificate passed. If set, requires a reference to non-empty TrustConfig specified in `client_validation_trust_config`." +], +"type": "string" +}, +"clientValidationTrustConfig": { +"description": "Reference to the TrustConfig from certificatemanager.googleapis.com namespace. If specified, the chain validation will be performed against certificates configured in the given TrustConfig. Allowed only if the policy is to be used with external HTTPS load balancers.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RemoveAddressGroupItemsRequest": { +"description": "Request used by the RemoveAddressGroupItems method.", +"id": "RemoveAddressGroupItemsRequest", +"properties": { +"items": { +"description": "Required. List of items to remove.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"Rule": { +"description": "Specification of rules.", +"id": "Rule", +"properties": { +"destinations": { +"description": "Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.", +"items": { +"$ref": "Destination" +}, +"type": "array" +}, +"sources": { +"description": "Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.", +"items": { +"$ref": "Source" +}, +"type": "array" +} +}, +"type": "object" +}, +"SecurityProfile": { +"description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes. Next ID: 9", +"id": "SecurityProfile", +"properties": { +"createTime": { +"description": "Output only. Resource creation timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. An optional description of the profile. Max length 512 characters.", +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs.", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", +"type": "string" +}, +"threatPreventionProfile": { +"$ref": "ThreatPreventionProfile", +"description": "The threat prevention configuration for the SecurityProfile." +}, +"type": { +"description": "Immutable. The single ProfileType that the SecurityProfile resource configures.", +"enum": [ +"PROFILE_TYPE_UNSPECIFIED", +"THREAT_PREVENTION" +], +"enumDescriptions": [ +"Profile type not specified.", +"Profile type for threat prevention." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. Last resource update timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SecurityProfileGroup": { +"description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes. Next ID: 8", +"id": "SecurityProfileGroup", +"properties": { +"createTime": { +"description": "Output only. Resource creation timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. An optional description of the profile group. Max length 2048 characters.", +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs.", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"type": "string" +}, +"threatPreventionProfile": { +"description": "Optional. Reference to a SecurityProfile with the threat prevention configuration for the SecurityProfileGroup.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Last resource update timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServerTlsPolicy": { +"description": "ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is attached to a target HTTPS proxy or endpoint config selector resource. ServerTlsPolicy in the form accepted by external HTTPS load balancers can be attached only to TargetHttpsProxy with an `EXTERNAL` or `EXTERNAL_MANAGED` load balancing scheme. Traffic Director compatible ServerTlsPolicies can be attached to EndpointPolicy and TargetHttpsProxy with Traffic Director `INTERNAL_SELF_MANAGED` load balancing scheme.", +"id": "ServerTlsPolicy", +"properties": { +"allowOpen": { +"description": "This field applies only for Traffic Director policies. It is must be set to false for external HTTPS load balancer policies. Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility. Consider using it if you wish to upgrade in place your deployment to TLS while having mixed TLS and non-TLS traffic reaching port :80.", +"type": "boolean" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Free-text description of the resource.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Set of label tags associated with the resource.", +"type": "object" +}, +"mtlsPolicy": { +"$ref": "MTLSPolicy", +"description": "This field is required if the policy is used with external HTTPS load balancers. This field can be empty for Traffic Director. Defines a mechanism to provision peer validation certificates for peer to peer authentication (Mutual TLS - mTLS). If not specified, client certificate will not be requested. The connection is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections." +}, +"name": { +"description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", +"type": "string" +}, +"serverCertificate": { +"$ref": "GoogleCloudNetworksecurityV1CertificateProvider", +"description": "Optional if policy is to be used with Traffic Director. For external HTTPS load balancer must be empty. Defines a mechanism to provision server identity (public and private keys). Cannot be combined with `allow_open` as a permissive mode that allows both plain text and TLS is not supported." +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SeverityOverride": { +"description": "Defines what action to take for a specific severity match.", +"id": "SeverityOverride", +"properties": { +"action": { +"description": "Required. Threat action override.", +"enum": [ +"THREAT_ACTION_UNSPECIFIED", +"DEFAULT_ACTION", +"ALLOW", +"ALERT", +"DENY" +], +"enumDescriptions": [ +"Threat action not specified.", +"The default action (as specified by the vendor) is taken.", +"The packet matching this rule will be allowed to transmit.", +"The packet matching this rule will be allowed to transmit, but a threat_log entry will be sent to the consumer project.", +"The packet matching this rule will be dropped, and a threat_log entry will be sent to the consumer project." +], +"type": "string" +}, +"severity": { +"description": "Required. Severity level to match.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"INFORMATIONAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Severity level not specified.", +"Suspicious events that do not pose an immediate threat, but that are reported to call attention to deeper problems that could possibly exist.", +"Warning-level threats that have very little impact on an organization's infrastructure. They usually require local or physical system access and may often result in victim privacy issues and information leakage.", +"Minor threats in which impact is minimized, that do not compromise the target or exploits that require an attacker to reside on the same local network as the victim, affect only non-standard configurations or obscure applications, or provide very limited access.", +"Threats that have the ability to become critical but have mitigating factors; for example, they may be difficult to exploit, do not result in elevated privileges, or do not have a large victim pool.", +"Serious threats, such as those that affect default installations of widely deployed software, result in root compromise of servers, and the exploit code is widely available to attackers. The attacker usually does not need any special authentication credentials or knowledge about the individual victims and the target does not need to be manipulated into performing any special functions." +], +"type": "string" +} +}, +"type": "object" +}, +"Source": { +"description": "Specification of traffic source attributes.", +"id": "Source", +"properties": { +"ipBlocks": { +"description": "Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., \"1.2.3.4\") and CIDR (e.g., \"1.2.3.0/24\") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.", +"items": { +"type": "string" +}, +"type": "array" +}, +"principals": { +"description": "Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, \"namespace/*\") or a suffix match (example, \"*/service-account\") or a presence match \"*\". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"ThreatOverride": { +"description": "Defines what action to take for a specific threat_id match.", +"id": "ThreatOverride", +"properties": { +"action": { +"description": "Required. Threat action override. For some threat types, only a subset of actions applies.", +"enum": [ +"THREAT_ACTION_UNSPECIFIED", +"DEFAULT_ACTION", +"ALLOW", +"ALERT", +"DENY" +], +"enumDescriptions": [ +"Threat action not specified.", +"The default action (as specified by the vendor) is taken.", +"The packet matching this rule will be allowed to transmit.", +"The packet matching this rule will be allowed to transmit, but a threat_log entry will be sent to the consumer project.", +"The packet matching this rule will be dropped, and a threat_log entry will be sent to the consumer project." +], +"type": "string" +}, +"threatId": { +"description": "Required. Vendor-specific ID of a threat to override.", +"type": "string" +}, +"type": { +"description": "Output only. Type of the threat (read only).", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"UNKNOWN", +"VULNERABILITY", +"ANTIVIRUS", +"SPYWARE", +"DNS" +], +"enumDescriptions": [ +"Type of threat not specified.", +"Type of threat is not derivable from threat ID. An override will be created for all types. Firewall will ignore overridden signature ID's that don't exist in the specific type.", +"Threats related to system flaws that an attacker might otherwise attempt to exploit.", +"Threats related to viruses and malware found in executables and file types.", +"Threats related to command-and-control (C2) activity, where spyware on an infected client is collecting data without the user's consent and/or communicating with a remote attacker.", +"Threats related to DNS." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ThreatPreventionProfile": { +"description": "ThreatPreventionProfile defines an action for specific threat signatures or severity levels.", +"id": "ThreatPreventionProfile", +"properties": { +"severityOverrides": { +"description": "Optional. Configuration for overriding threats actions by severity match.", +"items": { +"$ref": "SeverityOverride" +}, +"type": "array" +}, +"threatOverrides": { +"description": "Optional. Configuration for overriding threats actions by threat_id match. If a threat is matched both by configuration provided in severity_overrides and threat_overrides, the threat_overrides action is applied.", +"items": { +"$ref": "ThreatOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"TlsInspectionPolicy": { +"description": "The TlsInspectionPolicy resource contains references to CA pools in Certificate Authority Service and associated metadata.", +"id": "TlsInspectionPolicy", +"properties": { +"caPool": { +"description": "Required. A CA pool resource used to issue interception certificates. The CA pool string has a relative resource path following the form \"projects/{project}/locations/{location}/caPools/{ca_pool}\".", +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customTlsFeatures": { +"description": "Optional. List of custom TLS cipher suites selected. This field is valid only if the selected tls_feature_profile is CUSTOM. The compute.SslPoliciesService.ListAvailableFeatures method returns the set of features that can be specified in this list. Note that Secure Web Proxy does not yet honor this field.", +"items": { +"type": "string" +}, +"type": "array" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"excludePublicCaSet": { +"description": "Optional. If FALSE (the default), use our default set of public CAs in addition to any CAs specified in trust_config. These public CAs are currently based on the Mozilla Root Program and are subject to change over time. If TRUE, do not accept our default set of public CAs. Only CAs specified in trust_config will be accepted. This defaults to FALSE (use public CAs in addition to trust_config) for backwards compatibility, but trusting public root CAs is *not recommended* unless the traffic in question is outbound to public web servers. When possible, prefer setting this to \"false\" and explicitly specifying trusted CAs and certificates in a TrustConfig. Note that Secure Web Proxy does not yet honor this field.", +"type": "boolean" +}, +"minTlsVersion": { +"description": "Optional. Minimum TLS version that the firewall should use when negotiating connections with both clients and servers. If this is not set, then the default value is to allow the broadest set of clients and servers (TLS 1.0 or higher). Setting this to more restrictive values may improve security, but may also prevent the firewall from connecting to some clients or servers. Note that Secure Web Proxy does not yet honor this field.", +"enum": [ +"TLS_VERSION_UNSPECIFIED", +"TLS_1_0", +"TLS_1_1", +"TLS_1_2", +"TLS_1_3" +], +"enumDescriptions": [ +"Indicates no TLS version was specified.", +"TLS 1.0", +"TLS 1.1", +"TLS 1.2", +"TLS 1.3" +], +"type": "string" +}, +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"tlsFeatureProfile": { +"description": "Optional. The selected Profile. If this is not set, then the default value is to allow the broadest set of clients and servers (\"PROFILE_COMPATIBLE\"). Setting this to more restrictive values may improve security, but may also prevent the TLS inspection proxy from connecting to some clients or servers. Note that Secure Web Proxy does not yet honor this field.", +"enum": [ +"PROFILE_UNSPECIFIED", +"PROFILE_COMPATIBLE", +"PROFILE_MODERN", +"PROFILE_RESTRICTED", +"PROFILE_CUSTOM" +], +"enumDescriptions": [ +"Indicates no profile was specified.", +"Compatible profile. Allows the broadest set of clients, even those which support only out-of-date SSL features to negotiate with the TLS inspection proxy.", +"Modern profile. Supports a wide set of SSL features, allowing modern clients to negotiate SSL with the TLS inspection proxy.", +"Restricted profile. Supports a reduced set of SSL features, intended to meet stricter compliance requirements.", +"Custom profile. Allow only the set of allowed SSL features specified in the custom_features field of SslPolicy." +], +"type": "string" +}, +"trustConfig": { +"description": "Optional. A TrustConfig resource used when making a connection to the TLS server. This is a relative resource path following the form \"projects/{project}/locations/{location}/trustConfigs/{trust_config}\". This is necessary to intercept TLS connections to servers with certificates signed by a private CA or self-signed certificates. Note that Secure Web Proxy does not yet honor this field.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"UrlList": { +"description": "UrlList proto helps users to set reusable, independently manageable lists of hosts, host patterns, URLs, URL patterns.", +"id": "UrlList", +"properties": { +"createTime": { +"description": "Output only. Time when the security policy was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"name": { +"description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when the security policy was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"values": { +"description": "Required. FQDNs and URLs.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ValidationCA": { +"description": "Specification of ValidationCA. Defines the mechanism to obtain the Certificate Authority certificate to validate the peer certificate.", +"id": "ValidationCA", +"properties": { +"certificateProviderInstance": { +"$ref": "CertificateProviderInstance", +"description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." +}, +"grpcEndpoint": { +"$ref": "GoogleCloudNetworksecurityV1GrpcEndpoint", +"description": "gRPC specific configuration to access the gRPC server to obtain the CA certificate." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Security API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networksecurity.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networksecurity.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..9f173a99f7ba8e9af3f02dc5e2325477eef7db6d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networksecurity.v1beta1.json @@ -0,0 +1,4854 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networksecurity.googleapis.com/", +"batchPath": "batch", +"canonicalName": "NetworkSecurity", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/networking", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networksecurity:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networksecurity.mtls.googleapis.com/", +"name": "networksecurity", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"organizations": { +"resources": { +"locations": { +"resources": { +"addressGroups": { +"methods": { +"addItems": { +"description": "Adds items to an address group.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.addItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:addItems", +"request": { +"$ref": "AddAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"cloneItems": { +"description": "Clones items from one address group to another.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.cloneItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:cloneItems", +"request": { +"$ref": "CloneAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new address group in a given project and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"addressGroupId": { +"description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/addressGroups", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an address group.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.addressGroups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single address group.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.addressGroups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "AddressGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists address groups in a given project and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.addressGroups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of AddressGroups to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/addressGroups", +"response": { +"$ref": "ListAddressGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listReferences": { +"description": "Lists references of an address group.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.addressGroups.listReferences", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:listReferences", +"response": { +"$ref": "ListAddressGroupReferencesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates parameters of an address group.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.addressGroups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeItems": { +"description": "Removes items from an address group.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.addressGroups.removeItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:removeItems", +"request": { +"$ref": "RemoveAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"firewallEndpoints": { +"methods": { +"create": { +"description": "Creates a new FirewallEndpoint in a given project and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.firewallEndpoints.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"firewallEndpointId": { +"description": "Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Value for parent.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/firewallEndpoints", +"request": { +"$ref": "FirewallEndpoint" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Endpoint.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints/{firewallEndpointsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.firewallEndpoints.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/firewallEndpoints/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Endpoint.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints/{firewallEndpointsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.firewallEndpoints.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/firewallEndpoints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "FirewallEndpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists FirewallEndpoints in a given project and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.firewallEndpoints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Hint for how to order the results", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent value for ListEndpointsRequest", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/firewallEndpoints", +"response": { +"$ref": "ListFirewallEndpointsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a single Endpoint.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/firewallEndpoints/{firewallEndpointsId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.firewallEndpoints.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. name of resource", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/firewallEndpoints/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the Endpoint resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "FirewallEndpoint" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityProfileGroups": { +"methods": { +"create": { +"description": "Creates a new SecurityProfileGroup in a given organization and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.securityProfileGroups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the SecurityProfileGroup. Must be in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"securityProfileGroupId": { +"description": "Required. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile_group1\".", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/securityProfileGroups", +"request": { +"$ref": "SecurityProfileGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single SecurityProfileGroup.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.securityProfileGroups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. A name of the SecurityProfileGroup to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single SecurityProfileGroup.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfileGroups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the SecurityProfileGroup to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "SecurityProfileGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecurityProfileGroups in a given organization and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfileGroups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of SecurityProfileGroups to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSecurityProfileGroupsResponse` Indicates that this is a continuation of a prior `ListSecurityProfileGroups` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project or organization and location from which the SecurityProfileGroups should be listed, specified in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/securityProfileGroups", +"response": { +"$ref": "ListSecurityProfileGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single SecurityProfileGroup.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfileGroups/{securityProfileGroupsId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.securityProfileGroups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfileGroups/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfileGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "SecurityProfileGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityProfiles": { +"methods": { +"create": { +"description": "Creates a new SecurityProfile in a given organization and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", +"httpMethod": "POST", +"id": "networksecurity.organizations.locations.securityProfiles.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the SecurityProfile. Must be in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"securityProfileId": { +"description": "Required. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"security_profile1\".", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/securityProfiles", +"request": { +"$ref": "SecurityProfile" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single SecurityProfile.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", +"httpMethod": "DELETE", +"id": "networksecurity.organizations.locations.securityProfiles.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If client provided etag is out of date, delete will return FAILED_PRECONDITION error.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. A name of the SecurityProfile to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single SecurityProfile.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfiles.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the SecurityProfile to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "SecurityProfile" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecurityProfiles in a given organization and location.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles", +"httpMethod": "GET", +"id": "networksecurity.organizations.locations.securityProfiles.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of SecurityProfiles to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSecurityProfilesResponse` Indicates that this is a continuation of a prior `ListSecurityProfiles` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project or organization and location from which the SecurityProfiles should be listed, specified in the format `projects|organizations/*/locations/{location}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/securityProfiles", +"response": { +"$ref": "ListSecurityProfilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single SecurityProfile.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/securityProfiles/{securityProfilesId}", +"httpMethod": "PATCH", +"id": "networksecurity.organizations.locations.securityProfiles.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/securityProfiles/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the SecurityProfile resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "SecurityProfile" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"addressGroups": { +"methods": { +"addItems": { +"description": "Adds items to an address group.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:addItems", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.addItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to add items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:addItems", +"request": { +"$ref": "AddAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"cloneItems": { +"description": "Clones items from one address group to another.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:cloneItems", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.cloneItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:cloneItems", +"request": { +"$ref": "CloneAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new address group in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"addressGroupId": { +"description": "Required. Short name of the AddressGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the AddressGroup. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/addressGroups", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single address group.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.addressGroups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to delete. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single address group.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AddressGroup to get. Must be in the format `projects/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "AddressGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists address groups in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of AddressGroups to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAddressGroupsResponse` Indicates that this is a continuation of a prior `ListAddressGroups` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the AddressGroups should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/addressGroups", +"response": { +"$ref": "ListAddressGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listReferences": { +"description": "Lists references of an address group.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:listReferences", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.addressGroups.listReferences", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to clone items to. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of references to return. If unspecified, server will pick an appropriate default. Server may return fewer items than requested. A caller should only rely on response's next_page_token to determine if there are more AddressGroupUsers left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:listReferences", +"response": { +"$ref": "ListAddressGroupReferencesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single address group.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.addressGroups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the AddressGroup resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "AddressGroup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeItems": { +"description": "Removes items from an address group.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:removeItems", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.removeItems", +"parameterOrder": [ +"addressGroup" +], +"parameters": { +"addressGroup": { +"description": "Required. A name of the AddressGroup to remove items from. Must be in the format `projects|organization/*/locations/{location}/addressGroups/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+addressGroup}:removeItems", +"request": { +"$ref": "RemoveAddressGroupItemsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/addressGroups/{addressGroupsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.addressGroups.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/addressGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"authorizationPolicies": { +"methods": { +"create": { +"description": "Creates a new AuthorizationPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.authorizationPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"authorizationPolicyId": { +"description": "Required. Short name of the AuthorizationPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"authz_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the AuthorizationPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/authorizationPolicies", +"request": { +"$ref": "AuthorizationPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single AuthorizationPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.authorizationPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AuthorizationPolicy to delete. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single AuthorizationPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.authorizationPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the AuthorizationPolicy to get. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "AuthorizationPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.authorizationPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists AuthorizationPolicies in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.authorizationPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of AuthorizationPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAuthorizationPoliciesResponse` Indicates that this is a continuation of a prior `ListAuthorizationPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the AuthorizationPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/authorizationPolicies", +"response": { +"$ref": "ListAuthorizationPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single AuthorizationPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.authorizationPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "AuthorizationPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.authorizationPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/authorizationPolicies/{authorizationPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.authorizationPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/authorizationPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"clientTlsPolicies": { +"methods": { +"create": { +"description": "Creates a new ClientTlsPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.clientTlsPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"clientTlsPolicyId": { +"description": "Required. Short name of the ClientTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"client_mtls_policy\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the ClientTlsPolicy. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/clientTlsPolicies", +"request": { +"$ref": "ClientTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ClientTlsPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.clientTlsPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ClientTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ClientTlsPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.clientTlsPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ClientTlsPolicy to get. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ClientTlsPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.clientTlsPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ClientTlsPolicies in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.clientTlsPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ClientTlsPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListClientTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListClientTlsPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ClientTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/clientTlsPolicies", +"response": { +"$ref": "ListClientTlsPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ClientTlsPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.clientTlsPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "ClientTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.clientTlsPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clientTlsPolicies/{clientTlsPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.clientTlsPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clientTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"firewallEndpointAssociations": { +"methods": { +"create": { +"description": "Creates a new FirewallEndpointAssociation in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"firewallEndpointAssociationId": { +"description": "Optional. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_association_id from the method_signature of Create RPC.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Value for parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/firewallEndpointAssociations", +"request": { +"$ref": "FirewallEndpointAssociation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single FirewallEndpointAssociation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations/{firewallEndpointAssociationsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/firewallEndpointAssociations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single FirewallEndpointAssociation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations/{firewallEndpointAssociationsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/firewallEndpointAssociations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "FirewallEndpointAssociation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Associations in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Hint for how to order the results", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent value for ListAssociationsRequest", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/firewallEndpointAssociations", +"response": { +"$ref": "ListFirewallEndpointAssociationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a single FirewallEndpointAssociation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/firewallEndpointAssociations/{firewallEndpointAssociationsId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.firewallEndpointAssociations.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Identifier. name of resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/firewallEndpointAssociations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the Association resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "FirewallEndpointAssociation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"gatewaySecurityPolicies": { +"methods": { +"create": { +"description": "Creates a new GatewaySecurityPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"gatewaySecurityPolicyId": { +"description": "Required. Short name of the GatewaySecurityPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"gateway_security_policy1\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the GatewaySecurityPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/gatewaySecurityPolicies", +"request": { +"$ref": "GatewaySecurityPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single GatewaySecurityPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GatewaySecurityPolicy to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single GatewaySecurityPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GatewaySecurityPolicy to get. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GatewaySecurityPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists GatewaySecurityPolicies in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of GatewaySecurityPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last 'ListGatewaySecurityPoliciesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicies' call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the GatewaySecurityPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/gatewaySecurityPolicies", +"response": { +"$ref": "ListGatewaySecurityPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single GatewaySecurityPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GatewaySecurityPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"rules": { +"methods": { +"create": { +"description": "Creates a new GatewaySecurityPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"gatewaySecurityPolicyRuleId": { +"description": "The ID to use for the rule, which will become the final component of the rule's resource name. This value should be 4-63 characters, and valid characters are /a-z-/.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent where this rule will be created. Format : projects/{project}/location/{location}/gatewaySecurityPolicies/*", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/rules", +"request": { +"$ref": "GatewaySecurityPolicyRule" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single GatewaySecurityPolicyRule.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GatewaySecurityPolicyRule to delete. Must be in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}/rules/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single GatewaySecurityPolicyRule.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the GatewaySecurityPolicyRule to retrieve. Format: projects/{project}/location/{location}/gatewaySecurityPolicies/*/rules/*", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GatewaySecurityPolicyRule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists GatewaySecurityPolicyRules in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of GatewaySecurityPolicyRules to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last 'ListGatewaySecurityPolicyRulesResponse' Indicates that this is a continuation of a prior 'ListGatewaySecurityPolicyRules' call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project, location and GatewaySecurityPolicy from which the GatewaySecurityPolicyRules should be listed, specified in the format `projects/{project}/locations/{location}/gatewaySecurityPolicies/{gatewaySecurityPolicy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/rules", +"response": { +"$ref": "ListGatewaySecurityPolicyRulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single GatewaySecurityPolicyRule.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gatewaySecurityPolicies/{gatewaySecurityPoliciesId}/rules/{rulesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.gatewaySecurityPolicies.rules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gatewaySecurityPolicies/[^/]+/rules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the GatewaySecurityPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GatewaySecurityPolicyRule" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serverTlsPolicies": { +"methods": { +"create": { +"description": "Creates a new ServerTlsPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.serverTlsPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"serverTlsPolicyId": { +"description": "Required. Short name of the ServerTlsPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"server_mtls_policy\".", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/serverTlsPolicies", +"request": { +"$ref": "ServerTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServerTlsPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.serverTlsPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServerTlsPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.serverTlsPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ServerTlsPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.serverTlsPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServerTlsPolicies in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.serverTlsPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ServerTlsPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListServerTlsPoliciesResponse` Indicates that this is a continuation of a prior `ListServerTlsPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/serverTlsPolicies", +"response": { +"$ref": "ListServerTlsPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ServerTlsPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.serverTlsPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "ServerTlsPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.serverTlsPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serverTlsPolicies/{serverTlsPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.serverTlsPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serverTlsPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tlsInspectionPolicies": { +"methods": { +"create": { +"description": "Creates a new TlsInspectionPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the TlsInspectionPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"tlsInspectionPolicyId": { +"description": "Required. Short name of the TlsInspectionPolicy resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"tls_inspection_policy1\".", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/tlsInspectionPolicies", +"request": { +"$ref": "TlsInspectionPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TlsInspectionPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "If set to true, any rules for this TlsInspectionPolicy will also be deleted. (Otherwise, the request will only work if the TlsInspectionPolicy has no rules.)", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. A name of the TlsInspectionPolicy to delete. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TlsInspectionPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TlsInspectionPolicy to get. Must be in the format `projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "TlsInspectionPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TlsInspectionPolicies in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of TlsInspectionPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of a prior 'ListTlsInspectionPolicies' call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the TlsInspectionPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/tlsInspectionPolicies", +"response": { +"$ref": "ListTlsInspectionPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TlsInspectionPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsInspectionPolicies/{tlsInspectionPoliciesId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.tlsInspectionPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsInspectionPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsInspectionPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "TlsInspectionPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"urlLists": { +"methods": { +"create": { +"description": "Creates a new UrlList in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", +"httpMethod": "POST", +"id": "networksecurity.projects.locations.urlLists.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the UrlList. Must be in the format `projects/*/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"urlListId": { +"description": "Required. Short name of the UrlList resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. \"url_list\".", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/urlLists", +"request": { +"$ref": "UrlList" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single UrlList.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", +"httpMethod": "DELETE", +"id": "networksecurity.projects.locations.urlLists.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the UrlList to delete. Must be in the format `projects/*/locations/{location}/urlLists/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single UrlList.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.urlLists.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the UrlList to get. Must be in the format `projects/*/locations/{location}/urlLists/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "UrlList" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists UrlLists in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists", +"httpMethod": "GET", +"id": "networksecurity.projects.locations.urlLists.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of UrlLists to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListUrlListsResponse` Indicates that this is a continuation of a prior `ListUrlLists` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the UrlLists should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/urlLists", +"response": { +"$ref": "ListUrlListsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single UrlList.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/urlLists/{urlListsId}", +"httpMethod": "PATCH", +"id": "networksecurity.projects.locations.urlLists.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/urlLists/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the UrlList resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "UrlList" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240320", +"rootUrl": "https://networksecurity.googleapis.com/", +"schemas": { +"AddAddressGroupItemsRequest": { +"description": "Request used by the AddAddressGroupItems method.", +"id": "AddAddressGroupItemsRequest", +"properties": { +"items": { +"description": "Required. List of items to add.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"AddressGroup": { +"description": "AddressGroup is a resource that specifies how a collection of IP/DNS used in Firewall Policy.", +"id": "AddressGroup", +"properties": { +"capacity": { +"description": "Required. Capacity of the Address Group", +"format": "int32", +"type": "integer" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"items": { +"description": "Optional. List of items.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the AddressGroup resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the AddressGroup resource. It matches pattern `projects/*/locations/{location}/addressGroups/`.", +"type": "string" +}, +"selfLink": { +"description": "Output only. Server-defined fully-qualified URL for this resource.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of the Address Group. Possible values are \"IPv4\" or \"IPV6\".", +"enum": [ +"TYPE_UNSPECIFIED", +"IPV4", +"IPV6" +], +"enumDescriptions": [ +"Default value.", +"IP v4 ranges.", +"IP v6 ranges." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AuthorizationPolicy": { +"description": "AuthorizationPolicy is a resource that specifies how a server should authorize incoming connections. This resource in itself does not change the configuration unless it's attached to a target https proxy or endpoint config selector resource.", +"id": "AuthorizationPolicy", +"properties": { +"action": { +"description": "Required. The action to take when a rule match is found. Possible values are \"ALLOW\" or \"DENY\".", +"enum": [ +"ACTION_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Default value.", +"Grant access.", +"Deny access. Deny rules should be avoided unless they are used to provide a default \"deny all\" fallback." +], +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the AuthorizationPolicy resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the AuthorizationPolicy resource. It matches pattern `projects/{project}/locations/{location}/authorizationPolicies/`.", +"type": "string" +}, +"rules": { +"description": "Optional. List of rules to match. Note that at least one of the rules must match in order for the action specified in the 'action' field to be taken. A rule is a match if there is a matching source and destination. If left blank, the action specified in the `action` field will be applied on every request.", +"items": { +"$ref": "Rule" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CertificateProviderInstance": { +"description": "Specification of a TLS certificate provider instance. Workloads may have one or more CertificateProvider instances (plugins) and one of them is enabled and configured by specifying this message. Workloads use the values from this message to locate and load the CertificateProvider instance configuration.", +"id": "CertificateProviderInstance", +"properties": { +"pluginInstance": { +"description": "Required. Plugin instance name, used to locate and load CertificateProvider instance configuration. Set to \"google_cloud_private_spiffe\" to use Certificate Authority Service certificate provider instance.", +"type": "string" +} +}, +"type": "object" +}, +"ClientTlsPolicy": { +"description": "ClientTlsPolicy is a resource that specifies how a client should authenticate connections to backends of a service. This resource itself does not affect configuration unless it is attached to a backend service resource.", +"id": "ClientTlsPolicy", +"properties": { +"clientCertificate": { +"$ref": "GoogleCloudNetworksecurityV1beta1CertificateProvider", +"description": "Optional. Defines a mechanism to provision client identity (public and private keys) for peer to peer authentication. The presence of this dictates mTLS." +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the ClientTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/clientTlsPolicies/{client_tls_policy}`", +"type": "string" +}, +"serverValidationCa": { +"description": "Optional. Defines the mechanism to obtain the Certificate Authority certificate to validate the server certificate. If empty, client does not validate the server certificate.", +"items": { +"$ref": "ValidationCA" +}, +"type": "array" +}, +"sni": { +"description": "Optional. Server Name Indication string to present to the server during TLS handshake. E.g: \"secure.example.com\".", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CloneAddressGroupItemsRequest": { +"description": "Request used by the CloneAddressGroupItems method.", +"id": "CloneAddressGroupItemsRequest", +"properties": { +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +}, +"sourceAddressGroup": { +"description": "Required. Source address group to clone items from.", +"type": "string" +} +}, +"type": "object" +}, +"Destination": { +"description": "Specification of traffic destination attributes.", +"id": "Destination", +"properties": { +"hosts": { +"description": "Required. List of host names to match. Matched against the \":authority\" header in http requests. At least one host should match. Each host can be an exact match, or a prefix match (example \"mydomain.*\") or a suffix match (example \"*.myorg.com\") or a presence (any) match \"*\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"httpHeaderMatch": { +"$ref": "HttpHeaderMatch", +"description": "Optional. Match against key:value pair in http header. Provides a flexible match based on HTTP headers, for potentially advanced use cases. At least one header should match. Avoid using header matches to make authorization decisions unless there is a strong guarantee that requests arrive through a trusted client or proxy." +}, +"methods": { +"description": "Optional. A list of HTTP methods to match. At least one method should match. Should not be set for gRPC services.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ports": { +"description": "Required. List of destination ports to match. At least one port should match.", +"items": { +"format": "uint32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"FirewallEndpoint": { +"description": "Message describing Endpoint object", +"id": "FirewallEndpoint", +"properties": { +"associatedNetworks": { +"deprecated": true, +"description": "Output only. List of networks that are associated with this endpoint in the local zone. This is a projection of the FirewallEndpointAssociations pointing at this endpoint. A network will only appear in this list after traffic routing is fully configured. Format: projects/{project}/global/networks/{name}.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"associations": { +"description": "Output only. List of FirewallEndpointAssociations that are associated to this endpoint. An association will only appear in this list after traffic routing is fully configured.", +"items": { +"$ref": "FirewallEndpointAssociationReference" +}, +"readOnly": true, +"type": "array" +}, +"billingProjectId": { +"description": "Required. Project to bill on endpoint uptime usage.", +"type": "string" +}, +"createTime": { +"description": "Output only. Create time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Description of the firewall endpoint. Max length 2048 characters.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. name of resource", +"type": "string" +}, +"reconciling": { +"description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. Current state of the endpoint.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"INACTIVE" +], +"enumDescriptions": [ +"Not set.", +"Being created.", +"Processing configuration updates.", +"Being deleted.", +"Down or in an error state." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Update time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"FirewallEndpointAssociation": { +"description": "Message describing Association object", +"id": "FirewallEndpointAssociation", +"properties": { +"createTime": { +"description": "Output only. Create time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"disabled": { +"description": "Optional. Whether the association is disabled. True indicates that traffic won't be intercepted", +"type": "boolean" +}, +"firewallEndpoint": { +"description": "Required. The URL of the FirewallEndpoint that is being associated.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. name of resource", +"type": "string" +}, +"network": { +"description": "Required. The URL of the network that is being associated.", +"type": "string" +}, +"reconciling": { +"description": "Output only. Whether reconciling is in progress, recommended per https://google.aip.dev/128.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. Current state of the association.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING", +"INACTIVE" +], +"enumDescriptions": [ +"Not set.", +"Being created.", +"Active and ready for traffic.", +"Being deleted.", +"Down or in an error state." +], +"readOnly": true, +"type": "string" +}, +"tlsInspectionPolicy": { +"description": "Optional. The URL of the TlsInspectionPolicy that is being associated.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Update time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"FirewallEndpointAssociationReference": { +"description": "This is a subset of the FirewallEndpointAssociation message, containing fields to be used by the consumer.", +"id": "FirewallEndpointAssociationReference", +"properties": { +"name": { +"description": "Output only. The resource name of the FirewallEndpointAssociation. Format: projects/{project}/locations/{location}/firewallEndpointAssociations/{id}", +"readOnly": true, +"type": "string" +}, +"network": { +"description": "Output only. The VPC network associated. Format: projects/{project}/global/networks/{name}.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GatewaySecurityPolicy": { +"description": "The GatewaySecurityPolicy resource contains a collection of GatewaySecurityPolicyRules and associated metadata.", +"id": "GatewaySecurityPolicy", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy} gateway_security_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"tlsInspectionPolicy": { +"description": "Optional. Name of a TLS Inspection Policy resource that defines how TLS inspection will be performed for any rule(s) which enables it.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GatewaySecurityPolicyRule": { +"description": "The GatewaySecurityPolicyRule resource is in a nested collection within a GatewaySecurityPolicy and represents a traffic matching condition and associated action to perform.", +"id": "GatewaySecurityPolicyRule", +"properties": { +"applicationMatcher": { +"description": "Optional. CEL expression for matching on L7/application level criteria.", +"type": "string" +}, +"basicProfile": { +"description": "Required. Profile which tells what the primitive action should be.", +"enum": [ +"BASIC_PROFILE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"If there is not a mentioned action for the target.", +"Allow the matched traffic.", +"Deny the matched traffic." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Time when the rule was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"enabled": { +"description": "Required. Whether the rule is enforced.", +"type": "boolean" +}, +"name": { +"description": "Required. Immutable. Name of the resource. ame is the full resource name so projects/{project}/locations/{location}/gatewaySecurityPolicies/{gateway_security_policy}/rules/{rule} rule should match the pattern: (^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"priority": { +"description": "Required. Priority of the rule. Lower number corresponds to higher precedence.", +"format": "int32", +"type": "integer" +}, +"sessionMatcher": { +"description": "Required. CEL expression for matching on session criteria.", +"type": "string" +}, +"tlsInspectionEnabled": { +"description": "Optional. Flag to enable TLS inspection of traffic matching on , can only be true if the parent GatewaySecurityPolicy references a TLSInspectionConfig.", +"type": "boolean" +}, +"updateTime": { +"description": "Output only. Time when the rule was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudNetworksecurityV1beta1CertificateProvider": { +"description": "Specification of certificate provider. Defines the mechanism to obtain the certificate and private key for peer to peer authentication.", +"id": "GoogleCloudNetworksecurityV1beta1CertificateProvider", +"properties": { +"certificateProviderInstance": { +"$ref": "CertificateProviderInstance", +"description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." +}, +"grpcEndpoint": { +"$ref": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", +"description": "gRPC specific configuration to access the gRPC server to obtain the cert and private key." +} +}, +"type": "object" +}, +"GoogleCloudNetworksecurityV1beta1GrpcEndpoint": { +"description": "Specification of the GRPC Endpoint.", +"id": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", +"properties": { +"targetUri": { +"description": "Required. The target URI of the gRPC endpoint. Only UDS path is supported, and should start with \"unix:\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleIamV1SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "GoogleIamV1SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "GoogleIamV1TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIamV1TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "GoogleIamV1TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpHeaderMatch": { +"description": "Specification of HTTP header match attributes.", +"id": "HttpHeaderMatch", +"properties": { +"headerName": { +"description": "Required. The name of the HTTP header to match. For matching against the HTTP request's authority, use a headerMatch with the header name \":authority\". For matching a request's method, use the headerName \":method\".", +"type": "string" +}, +"regexMatch": { +"description": "Required. The value of the header must match the regular expression specified in regexMatch. For regular expression grammar, please see: en.cppreference.com/w/cpp/regex/ecmascript For matching against a port specified in the HTTP request, use a headerMatch with headerName set to Host and a regular expression that satisfies the RFC2616 Host header's port specifier.", +"type": "string" +} +}, +"type": "object" +}, +"ListAddressGroupReferencesResponse": { +"description": "Response of the ListAddressGroupReferences method.", +"id": "ListAddressGroupReferencesResponse", +"properties": { +"addressGroupReferences": { +"description": "A list of references that matches the specified filter in the request.", +"items": { +"$ref": "ListAddressGroupReferencesResponseAddressGroupReference" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListAddressGroupReferencesResponseAddressGroupReference": { +"description": "The Reference of AddressGroup.", +"id": "ListAddressGroupReferencesResponseAddressGroupReference", +"properties": { +"firewallPolicy": { +"description": "FirewallPolicy that is using the Address Group.", +"type": "string" +}, +"rulePriority": { +"description": "Rule priority of the FirewallPolicy that is using the Address Group.", +"format": "int32", +"type": "integer" +}, +"securityPolicy": { +"description": "Cloud Armor SecurityPolicy that is using the Address Group.", +"type": "string" +} +}, +"type": "object" +}, +"ListAddressGroupsResponse": { +"description": "Response returned by the ListAddressGroups method.", +"id": "ListAddressGroupsResponse", +"properties": { +"addressGroups": { +"description": "List of AddressGroups resources.", +"items": { +"$ref": "AddressGroup" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListAuthorizationPoliciesResponse": { +"description": "Response returned by the ListAuthorizationPolicies method.", +"id": "ListAuthorizationPoliciesResponse", +"properties": { +"authorizationPolicies": { +"description": "List of AuthorizationPolicies resources.", +"items": { +"$ref": "AuthorizationPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListClientTlsPoliciesResponse": { +"description": "Response returned by the ListClientTlsPolicies method.", +"id": "ListClientTlsPoliciesResponse", +"properties": { +"clientTlsPolicies": { +"description": "List of ClientTlsPolicy resources.", +"items": { +"$ref": "ClientTlsPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListFirewallEndpointAssociationsResponse": { +"description": "Message for response to listing Associations", +"id": "ListFirewallEndpointAssociationsResponse", +"properties": { +"firewallEndpointAssociations": { +"description": "The list of Association", +"items": { +"$ref": "FirewallEndpointAssociation" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListFirewallEndpointsResponse": { +"description": "Message for response to listing Endpoints", +"id": "ListFirewallEndpointsResponse", +"properties": { +"firewallEndpoints": { +"description": "The list of Endpoint", +"items": { +"$ref": "FirewallEndpoint" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListGatewaySecurityPoliciesResponse": { +"description": "Response returned by the ListGatewaySecurityPolicies method.", +"id": "ListGatewaySecurityPoliciesResponse", +"properties": { +"gatewaySecurityPolicies": { +"description": "List of GatewaySecurityPolicies resources.", +"items": { +"$ref": "GatewaySecurityPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListGatewaySecurityPolicyRulesResponse": { +"description": "Response returned by the ListGatewaySecurityPolicyRules method.", +"id": "ListGatewaySecurityPolicyRulesResponse", +"properties": { +"gatewaySecurityPolicyRules": { +"description": "List of GatewaySecurityPolicyRule resources.", +"items": { +"$ref": "GatewaySecurityPolicyRule" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecurityProfileGroupsResponse": { +"description": "Response returned by the ListSecurityProfileGroups method.", +"id": "ListSecurityProfileGroupsResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"securityProfileGroups": { +"description": "List of SecurityProfileGroups resources.", +"items": { +"$ref": "SecurityProfileGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecurityProfilesResponse": { +"description": "Response returned by the ListSecurityProfiles method.", +"id": "ListSecurityProfilesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"securityProfiles": { +"description": "List of SecurityProfile resources.", +"items": { +"$ref": "SecurityProfile" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServerTlsPoliciesResponse": { +"description": "Response returned by the ListServerTlsPolicies method.", +"id": "ListServerTlsPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"serverTlsPolicies": { +"description": "List of ServerTlsPolicy resources.", +"items": { +"$ref": "ServerTlsPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTlsInspectionPoliciesResponse": { +"description": "Response returned by the ListTlsInspectionPolicies method.", +"id": "ListTlsInspectionPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then 'next_page_token' is included. To get the next set of results, call this method again using the value of 'next_page_token' as 'page_token'.", +"type": "string" +}, +"tlsInspectionPolicies": { +"description": "List of TlsInspectionPolicies resources.", +"items": { +"$ref": "TlsInspectionPolicy" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUrlListsResponse": { +"description": "Response returned by the ListUrlLists method.", +"id": "ListUrlListsResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +}, +"urlLists": { +"description": "List of UrlList resources.", +"items": { +"$ref": "UrlList" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"MTLSPolicy": { +"description": "Specification of the MTLSPolicy.", +"id": "MTLSPolicy", +"properties": { +"clientValidationCa": { +"description": "Required if the policy is to be used with Traffic Director. For external HTTPS load balancers it must be empty. Defines the mechanism to obtain the Certificate Authority certificate to validate the client certificate.", +"items": { +"$ref": "ValidationCA" +}, +"type": "array" +}, +"clientValidationMode": { +"description": "When the client presents an invalid certificate or no certificate to the load balancer, the `client_validation_mode` specifies how the client connection is handled. Required if the policy is to be used with the external HTTPS load balancing. For Traffic Director it must be empty.", +"enum": [ +"CLIENT_VALIDATION_MODE_UNSPECIFIED", +"ALLOW_INVALID_OR_MISSING_CLIENT_CERT", +"REJECT_INVALID" +], +"enumDescriptions": [ +"Not allowed.", +"Allow connection even if certificate chain validation of the client certificate failed or no client certificate was presented. The proof of possession of the private key is always checked if client certificate was presented. This mode requires the backend to implement processing of data extracted from a client certificate to authenticate the peer, or to reject connections if the client certificate fingerprint is missing.", +"Require a client certificate and allow connection to the backend only if validation of the client certificate passed. If set, requires a reference to non-empty TrustConfig specified in `client_validation_trust_config`." +], +"type": "string" +}, +"clientValidationTrustConfig": { +"description": "Reference to the TrustConfig from certificatemanager.googleapis.com namespace. If specified, the chain validation will be performed against certificates configured in the given TrustConfig. Allowed only if the policy is to be used with external HTTPS load balancers.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RemoveAddressGroupItemsRequest": { +"description": "Request used by the RemoveAddressGroupItems method.", +"id": "RemoveAddressGroupItemsRequest", +"properties": { +"items": { +"description": "Required. List of items to remove.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"Rule": { +"description": "Specification of rules.", +"id": "Rule", +"properties": { +"destinations": { +"description": "Optional. List of attributes for the traffic destination. All of the destinations must match. A destination is a match if a request matches all the specified hosts, ports, methods and headers. If not set, the action specified in the 'action' field will be applied without any rule checks for the destination.", +"items": { +"$ref": "Destination" +}, +"type": "array" +}, +"sources": { +"description": "Optional. List of attributes for the traffic source. All of the sources must match. A source is a match if both principals and ip_blocks match. If not set, the action specified in the 'action' field will be applied without any rule checks for the source.", +"items": { +"$ref": "Source" +}, +"type": "array" +} +}, +"type": "object" +}, +"SecurityProfile": { +"description": "SecurityProfile is a resource that defines the behavior for one of many ProfileTypes. Next ID: 9", +"id": "SecurityProfile", +"properties": { +"createTime": { +"description": "Output only. Resource creation timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. An optional description of the profile. Max length 512 characters.", +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs.", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfile resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfiles/{security_profile}`.", +"type": "string" +}, +"threatPreventionProfile": { +"$ref": "ThreatPreventionProfile", +"description": "The threat prevention configuration for the SecurityProfile." +}, +"type": { +"description": "Immutable. The single ProfileType that the SecurityProfile resource configures.", +"enum": [ +"PROFILE_TYPE_UNSPECIFIED", +"THREAT_PREVENTION" +], +"enumDescriptions": [ +"Profile type not specified.", +"Profile type for threat prevention." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. Last resource update timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SecurityProfileGroup": { +"description": "SecurityProfileGroup is a resource that defines the behavior for various ProfileTypes. Next ID: 8", +"id": "SecurityProfileGroup", +"properties": { +"createTime": { +"description": "Output only. Resource creation timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. An optional description of the profile group. Max length 2048 characters.", +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels as key value pairs.", +"type": "object" +}, +"name": { +"description": "Immutable. Identifier. Name of the SecurityProfileGroup resource. It matches pattern `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.", +"type": "string" +}, +"threatPreventionProfile": { +"description": "Optional. Reference to a SecurityProfile with the threat prevention configuration for the SecurityProfileGroup.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Last resource update timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServerTlsPolicy": { +"description": "ServerTlsPolicy is a resource that specifies how a server should authenticate incoming requests. This resource itself does not affect configuration unless it is attached to a target HTTPS proxy or endpoint config selector resource. ServerTlsPolicy in the form accepted by external HTTPS load balancers can be attached only to TargetHttpsProxy with an `EXTERNAL` or `EXTERNAL_MANAGED` load balancing scheme. Traffic Director compatible ServerTlsPolicies can be attached to EndpointPolicy and TargetHttpsProxy with Traffic Director `INTERNAL_SELF_MANAGED` load balancing scheme.", +"id": "ServerTlsPolicy", +"properties": { +"allowOpen": { +"description": "This field applies only for Traffic Director policies. It is must be set to false for external HTTPS load balancer policies. Determines if server allows plaintext connections. If set to true, server allows plain text connections. By default, it is set to false. This setting is not exclusive of other encryption modes. For example, if `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections. See documentation of other encryption modes to confirm compatibility. Consider using it if you wish to upgrade in place your deployment to TLS while having mixed TLS and non-TLS traffic reaching port :80.", +"type": "boolean" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Free-text description of the resource.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Set of label tags associated with the resource.", +"type": "object" +}, +"mtlsPolicy": { +"$ref": "MTLSPolicy", +"description": "This field is required if the policy is used with external HTTPS load balancers. This field can be empty for Traffic Director. Defines a mechanism to provision peer validation certificates for peer to peer authentication (Mutual TLS - mTLS). If not specified, client certificate will not be requested. The connection is treated as TLS and not mTLS. If `allow_open` and `mtls_policy` are set, server allows both plain text and mTLS connections." +}, +"name": { +"description": "Required. Name of the ServerTlsPolicy resource. It matches the pattern `projects/*/locations/{location}/serverTlsPolicies/{server_tls_policy}`", +"type": "string" +}, +"serverCertificate": { +"$ref": "GoogleCloudNetworksecurityV1beta1CertificateProvider", +"description": "Optional if policy is to be used with Traffic Director. For external HTTPS load balancer must be empty. Defines a mechanism to provision server identity (public and private keys). Cannot be combined with `allow_open` as a permissive mode that allows both plain text and TLS is not supported." +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SeverityOverride": { +"description": "Defines what action to take for a specific severity match.", +"id": "SeverityOverride", +"properties": { +"action": { +"description": "Required. Threat action override.", +"enum": [ +"THREAT_ACTION_UNSPECIFIED", +"DEFAULT_ACTION", +"ALLOW", +"ALERT", +"DENY" +], +"enumDescriptions": [ +"Threat action not specified.", +"The default action (as specified by the vendor) is taken.", +"The packet matching this rule will be allowed to transmit.", +"The packet matching this rule will be allowed to transmit, but a threat_log entry will be sent to the consumer project.", +"The packet matching this rule will be dropped, and a threat_log entry will be sent to the consumer project." +], +"type": "string" +}, +"severity": { +"description": "Required. Severity level to match.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"INFORMATIONAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Severity level not specified.", +"Suspicious events that do not pose an immediate threat, but that are reported to call attention to deeper problems that could possibly exist.", +"Warning-level threats that have very little impact on an organization's infrastructure. They usually require local or physical system access and may often result in victim privacy issues and information leakage.", +"Minor threats in which impact is minimized, that do not compromise the target or exploits that require an attacker to reside on the same local network as the victim, affect only non-standard configurations or obscure applications, or provide very limited access.", +"Threats that have the ability to become critical but have mitigating factors; for example, they may be difficult to exploit, do not result in elevated privileges, or do not have a large victim pool.", +"Serious threats, such as those that affect default installations of widely deployed software, result in root compromise of servers, and the exploit code is widely available to attackers. The attacker usually does not need any special authentication credentials or knowledge about the individual victims and the target does not need to be manipulated into performing any special functions." +], +"type": "string" +} +}, +"type": "object" +}, +"Source": { +"description": "Specification of traffic source attributes.", +"id": "Source", +"properties": { +"ipBlocks": { +"description": "Optional. List of CIDR ranges to match based on source IP address. At least one IP block should match. Single IP (e.g., \"1.2.3.4\") and CIDR (e.g., \"1.2.3.0/24\") are supported. Authorization based on source IP alone should be avoided. The IP addresses of any load balancers or proxies should be considered untrusted.", +"items": { +"type": "string" +}, +"type": "array" +}, +"principals": { +"description": "Optional. List of peer identities to match for authorization. At least one principal should match. Each peer can be an exact match, or a prefix match (example, \"namespace/*\") or a suffix match (example, \"*/service-account\") or a presence match \"*\". Authorization based on the principal name without certificate validation (configured by ServerTlsPolicy resource) is considered insecure.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"ThreatOverride": { +"description": "Defines what action to take for a specific threat_id match.", +"id": "ThreatOverride", +"properties": { +"action": { +"description": "Required. Threat action override. For some threat types, only a subset of actions applies.", +"enum": [ +"THREAT_ACTION_UNSPECIFIED", +"DEFAULT_ACTION", +"ALLOW", +"ALERT", +"DENY" +], +"enumDescriptions": [ +"Threat action not specified.", +"The default action (as specified by the vendor) is taken.", +"The packet matching this rule will be allowed to transmit.", +"The packet matching this rule will be allowed to transmit, but a threat_log entry will be sent to the consumer project.", +"The packet matching this rule will be dropped, and a threat_log entry will be sent to the consumer project." +], +"type": "string" +}, +"threatId": { +"description": "Required. Vendor-specific ID of a threat to override.", +"type": "string" +}, +"type": { +"description": "Output only. Type of the threat (read only).", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"UNKNOWN", +"VULNERABILITY", +"ANTIVIRUS", +"SPYWARE", +"DNS" +], +"enumDescriptions": [ +"Type of threat not specified.", +"Type of threat is not derivable from threat ID. An override will be created for all types. Firewall will ignore overridden signature ID's that don't exist in the specific type.", +"Threats related to system flaws that an attacker might otherwise attempt to exploit.", +"Threats related to viruses and malware found in executables and file types.", +"Threats related to command-and-control (C2) activity, where spyware on an infected client is collecting data without the user's consent and/or communicating with a remote attacker.", +"Threats related to DNS." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ThreatPreventionProfile": { +"description": "ThreatPreventionProfile defines an action for specific threat signatures or severity levels.", +"id": "ThreatPreventionProfile", +"properties": { +"severityOverrides": { +"description": "Optional. Configuration for overriding threats actions by severity match.", +"items": { +"$ref": "SeverityOverride" +}, +"type": "array" +}, +"threatOverrides": { +"description": "Optional. Configuration for overriding threats actions by threat_id match. If a threat is matched both by configuration provided in severity_overrides and threat_overrides, the threat_overrides action is applied.", +"items": { +"$ref": "ThreatOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"TlsInspectionPolicy": { +"description": "The TlsInspectionPolicy resource contains references to CA pools in Certificate Authority Service and associated metadata.", +"id": "TlsInspectionPolicy", +"properties": { +"caPool": { +"description": "Required. A CA pool resource used to issue interception certificates. The CA pool string has a relative resource path following the form \"projects/{project}/locations/{location}/caPools/{ca_pool}\".", +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customTlsFeatures": { +"description": "Optional. List of custom TLS cipher suites selected. This field is valid only if the selected tls_feature_profile is CUSTOM. The compute.SslPoliciesService.ListAvailableFeatures method returns the set of features that can be specified in this list. Note that Secure Web Proxy does not yet honor this field.", +"items": { +"type": "string" +}, +"type": "array" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"excludePublicCaSet": { +"description": "Optional. If FALSE (the default), use our default set of public CAs in addition to any CAs specified in trust_config. These public CAs are currently based on the Mozilla Root Program and are subject to change over time. If TRUE, do not accept our default set of public CAs. Only CAs specified in trust_config will be accepted. This defaults to FALSE (use public CAs in addition to trust_config) for backwards compatibility, but trusting public root CAs is *not recommended* unless the traffic in question is outbound to public web servers. When possible, prefer setting this to \"false\" and explicitly specifying trusted CAs and certificates in a TrustConfig. Note that Secure Web Proxy does not yet honor this field.", +"type": "boolean" +}, +"minTlsVersion": { +"description": "Optional. Minimum TLS version that the firewall should use when negotiating connections with both clients and servers. If this is not set, then the default value is to allow the broadest set of clients and servers (TLS 1.0 or higher). Setting this to more restrictive values may improve security, but may also prevent the firewall from connecting to some clients or servers. Note that Secure Web Proxy does not yet honor this field.", +"enum": [ +"TLS_VERSION_UNSPECIFIED", +"TLS_1_0", +"TLS_1_1", +"TLS_1_2", +"TLS_1_3" +], +"enumDescriptions": [ +"Indicates no TLS version was specified.", +"TLS 1.0", +"TLS 1.1", +"TLS 1.2", +"TLS 1.3" +], +"type": "string" +}, +"name": { +"description": "Required. Name of the resource. Name is of the form projects/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_policy} tls_inspection_policy should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"tlsFeatureProfile": { +"description": "Optional. The selected Profile. If this is not set, then the default value is to allow the broadest set of clients and servers (\"PROFILE_COMPATIBLE\"). Setting this to more restrictive values may improve security, but may also prevent the TLS inspection proxy from connecting to some clients or servers. Note that Secure Web Proxy does not yet honor this field.", +"enum": [ +"PROFILE_UNSPECIFIED", +"PROFILE_COMPATIBLE", +"PROFILE_MODERN", +"PROFILE_RESTRICTED", +"PROFILE_CUSTOM" +], +"enumDescriptions": [ +"Indicates no profile was specified.", +"Compatible profile. Allows the broadest set of clients, even those which support only out-of-date SSL features to negotiate with the TLS inspection proxy.", +"Modern profile. Supports a wide set of SSL features, allowing modern clients to negotiate SSL with the TLS inspection proxy.", +"Restricted profile. Supports a reduced set of SSL features, intended to meet stricter compliance requirements.", +"Custom profile. Allow only the set of allowed SSL features specified in the custom_features field of SslPolicy." +], +"type": "string" +}, +"trustConfig": { +"description": "Optional. A TrustConfig resource used when making a connection to the TLS server. This is a relative resource path following the form \"projects/{project}/locations/{location}/trustConfigs/{trust_config}\". This is necessary to intercept TLS connections to servers with certificates signed by a private CA or self-signed certificates. Note that Secure Web Proxy does not yet honor this field.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"UrlList": { +"description": "UrlList proto helps users to set reusable, independently manageable lists of hosts, host patterns, URLs, URL patterns.", +"id": "UrlList", +"properties": { +"createTime": { +"description": "Output only. Time when the security policy was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Free-text description of the resource.", +"type": "string" +}, +"name": { +"description": "Required. Name of the resource provided by the user. Name is of the form projects/{project}/locations/{location}/urlLists/{url_list} url_list should match the pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).", +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when the security policy was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"values": { +"description": "Required. FQDNs and URLs.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ValidationCA": { +"description": "Specification of ValidationCA. Defines the mechanism to obtain the Certificate Authority certificate to validate the peer certificate.", +"id": "ValidationCA", +"properties": { +"certificateProviderInstance": { +"$ref": "CertificateProviderInstance", +"description": "The certificate provider instance specification that will be passed to the data plane, which will be used to load necessary credential information." +}, +"grpcEndpoint": { +"$ref": "GoogleCloudNetworksecurityV1beta1GrpcEndpoint", +"description": "gRPC specific configuration to access the gRPC server to obtain the CA certificate." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Security API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkservices.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkservices.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..326adb12e5aa18b27dbd319750718928fe893784 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkservices.v1.json @@ -0,0 +1,5125 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networkservices.googleapis.com/", +"batchPath": "batch", +"canonicalName": "NetworkServices", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/networking", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networkservices:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networkservices.mtls.googleapis.com/", +"name": "networkservices", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networkservices.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"edgeCacheKeysets": { +"methods": { +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheKeysets/{edgeCacheKeysetsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.edgeCacheKeysets.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheKeysets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheKeysets/{edgeCacheKeysetsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.edgeCacheKeysets.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheKeysets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheKeysets/{edgeCacheKeysetsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.edgeCacheKeysets.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheKeysets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"edgeCacheOrigins": { +"methods": { +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheOrigins/{edgeCacheOriginsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.edgeCacheOrigins.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheOrigins/{edgeCacheOriginsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.edgeCacheOrigins.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheOrigins/{edgeCacheOriginsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.edgeCacheOrigins.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheOrigins/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"edgeCacheServices": { +"methods": { +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheServices/{edgeCacheServicesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.edgeCacheServices.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheServices/{edgeCacheServicesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.edgeCacheServices.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/edgeCacheServices/{edgeCacheServicesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.edgeCacheServices.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/edgeCacheServices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"endpointPolicies": { +"methods": { +"create": { +"description": "Creates a new EndpointPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", +"httpMethod": "POST", +"id": "networkservices.projects.locations.endpointPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"endpointPolicyId": { +"description": "Required. Short name of the EndpointPolicy resource to be created. E.g. \"CustomECS\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/endpointPolicies", +"request": { +"$ref": "EndpointPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single EndpointPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.endpointPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single EndpointPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.endpointPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "EndpointPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.endpointPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists EndpointPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", +"httpMethod": "GET", +"id": "networkservices.projects.locations.endpointPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of EndpointPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListEndpointPoliciesResponse` Indicates that this is a continuation of a prior `ListEndpointPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/endpointPolicies", +"response": { +"$ref": "ListEndpointPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single EndpointPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.endpointPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "EndpointPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.endpointPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.endpointPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"gateways": { +"methods": { +"create": { +"description": "Creates a new Gateway in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways", +"httpMethod": "POST", +"id": "networkservices.projects.locations.gateways.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"gatewayId": { +"description": "Required. Short name of the Gateway resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/gateways", +"request": { +"$ref": "Gateway" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Gateway.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.gateways.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Gateway.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.gateways.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Gateway" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.gateways.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Gateways in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways", +"httpMethod": "GET", +"id": "networkservices.projects.locations.gateways.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Gateways to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListGatewaysResponse` Indicates that this is a continuation of a prior `ListGateways` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/gateways", +"response": { +"$ref": "ListGatewaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Gateway.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.gateways.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Gateway" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.gateways.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.gateways.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"grpcRoutes": { +"methods": { +"create": { +"description": "Creates a new GrpcRoute in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.grpcRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"grpcRouteId": { +"description": "Required. Short name of the GrpcRoute resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/grpcRoutes", +"request": { +"$ref": "GrpcRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single GrpcRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.grpcRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single GrpcRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.grpcRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GrpcRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists GrpcRoutes in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.grpcRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of GrpcRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListGrpcRoutesResponse` Indicates that this is a continuation of a prior `ListGrpcRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/grpcRoutes", +"response": { +"$ref": "ListGrpcRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single GrpcRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.grpcRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/global/grpcRoutes/`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GrpcRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"httpRoutes": { +"methods": { +"create": { +"description": "Creates a new HttpRoute in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.httpRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"httpRouteId": { +"description": "Required. Short name of the HttpRoute resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/httpRoutes", +"request": { +"$ref": "HttpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single HttpRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.httpRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single HttpRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.httpRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "HttpRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists HttpRoute in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.httpRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of HttpRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListHttpRoutesResponse` Indicates that this is a continuation of a prior `ListHttpRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/httpRoutes", +"response": { +"$ref": "ListHttpRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single HttpRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.httpRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name>`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "HttpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"lbRouteExtensions": { +"methods": { +"create": { +"description": "Creates a new `LbRouteExtension` resource in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.lbRouteExtensions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"lbRouteExtensionId": { +"description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/lbRouteExtensions", +"request": { +"$ref": "LbRouteExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified `LbRouteExtension` resource.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.lbRouteExtensions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of the specified `LbRouteExtension` resource.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbRouteExtensions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "LbRouteExtension" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `LbRouteExtension` resources in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbRouteExtensions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Hint for how to order the results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results that the server returns.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/lbRouteExtensions", +"response": { +"$ref": "ListLbRouteExtensionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of the specified `LbRouteExtension` resource.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.lbRouteExtensions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "LbRouteExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"lbTrafficExtensions": { +"methods": { +"create": { +"description": "Creates a new `LbTrafficExtension` resource in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.lbTrafficExtensions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"lbTrafficExtensionId": { +"description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/lbTrafficExtensions", +"request": { +"$ref": "LbTrafficExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified `LbTrafficExtension` resource.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.lbTrafficExtensions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of the specified `LbTrafficExtension` resource.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbTrafficExtensions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "LbTrafficExtension" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `LbTrafficExtension` resources in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbTrafficExtensions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Hint for how to order the results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results that the server returns.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/lbTrafficExtensions", +"response": { +"$ref": "ListLbTrafficExtensionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of the specified `LbTrafficExtension` resource.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.lbTrafficExtensions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "LbTrafficExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"meshes": { +"methods": { +"create": { +"description": "Creates a new Mesh in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.meshes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"meshId": { +"description": "Required. Short name of the Mesh resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/meshes", +"request": { +"$ref": "Mesh" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Mesh.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.meshes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Mesh.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.meshes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Mesh" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.meshes.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Meshes in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.meshes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Meshes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/meshes", +"response": { +"$ref": "ListMeshesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Mesh.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.meshes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Mesh" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.meshes.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.meshes.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networkservices.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networkservices.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceBindings": { +"methods": { +"create": { +"description": "Creates a new ServiceBinding in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceBindings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"serviceBindingId": { +"description": "Required. Short name of the ServiceBinding resource to be created.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/serviceBindings", +"request": { +"$ref": "ServiceBinding" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServiceBinding.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.serviceBindings.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceBinding.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceBindings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ServiceBinding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceBindings.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceBinding in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceBindings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ServiceBindings to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/serviceBindings", +"response": { +"$ref": "ListServiceBindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceBindings.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceBindings.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceLbPolicies": { +"methods": { +"create": { +"description": "Creates a new ServiceLbPolicy in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceLbPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"serviceLbPolicyId": { +"description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/serviceLbPolicies", +"request": { +"$ref": "ServiceLbPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServiceLbPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.serviceLbPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceLbPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceLbPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ServiceLbPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceLbPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceLbPolicies in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceLbPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ServiceLbPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/serviceLbPolicies", +"response": { +"$ref": "ListServiceLbPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ServiceLbPolicy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.serviceLbPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ServiceLbPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceLbPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceLbPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tcpRoutes": { +"methods": { +"create": { +"description": "Creates a new TcpRoute in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.tcpRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"tcpRouteId": { +"description": "Required. Short name of the TcpRoute resource to be created.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/tcpRoutes", +"request": { +"$ref": "TcpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TcpRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.tcpRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TcpRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tcpRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "TcpRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TcpRoute in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tcpRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of TcpRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListTcpRoutesResponse` Indicates that this is a continuation of a prior `ListTcpRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/tcpRoutes", +"response": { +"$ref": "ListTcpRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TcpRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.tcpRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name>`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "TcpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tlsRoutes": { +"methods": { +"create": { +"description": "Creates a new TlsRoute in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.tlsRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"tlsRouteId": { +"description": "Required. Short name of the TlsRoute resource to be created.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/tlsRoutes", +"request": { +"$ref": "TlsRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TlsRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.tlsRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TlsRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tlsRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "TlsRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TlsRoute in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tlsRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of TlsRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListTlsRoutesResponse` Indicates that this is a continuation of a prior `ListTlsRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/tlsRoutes", +"response": { +"$ref": "ListTlsRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TlsRoute.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.tlsRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name>`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "TlsRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://networkservices.googleapis.com/", +"schemas": { +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EndpointMatcher": { +"description": "A definition of a matcher that selects endpoints to which the policies should be applied.", +"id": "EndpointMatcher", +"properties": { +"metadataLabelMatcher": { +"$ref": "EndpointMatcherMetadataLabelMatcher", +"description": "The matcher is based on node metadata presented by xDS clients." +} +}, +"type": "object" +}, +"EndpointMatcherMetadataLabelMatcher": { +"description": "The matcher that is based on node metadata presented by xDS clients.", +"id": "EndpointMatcherMetadataLabelMatcher", +"properties": { +"metadataLabelMatchCriteria": { +"description": "Specifies how matching should be done. Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here. The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client with label connects, the config from P1 will be selected. If a client with label connects, the config from P2 will be selected. If a client with label connects, the config from P3 will be selected. If there is more than one best match, (for example, if a config P4 with selector exists and if a client with label connects), pick up the one with older creation time.", +"enum": [ +"METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED", +"MATCH_ANY", +"MATCH_ALL" +], +"enumDescriptions": [ +"Default value. Should not be used.", +"At least one of the Labels specified in the matcher should match the metadata presented by xDS client.", +"The metadata presented by the xDS client should contain all of the labels specified here." +], +"type": "string" +}, +"metadataLabels": { +"description": "The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).", +"items": { +"$ref": "EndpointMatcherMetadataLabelMatcherMetadataLabels" +}, +"type": "array" +} +}, +"type": "object" +}, +"EndpointMatcherMetadataLabelMatcherMetadataLabels": { +"description": "Defines a name-pair value for a single label.", +"id": "EndpointMatcherMetadataLabelMatcherMetadataLabels", +"properties": { +"labelName": { +"description": "Required. Label name presented as key in xDS Node Metadata.", +"type": "string" +}, +"labelValue": { +"description": "Required. Label value presented as value corresponding to the above key, in xDS Node Metadata.", +"type": "string" +} +}, +"type": "object" +}, +"EndpointPolicy": { +"description": "EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply \"authentication config\" an all endpoints that serve on port 8080.", +"id": "EndpointPolicy", +"properties": { +"authorizationPolicy": { +"description": "Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint.", +"type": "string" +}, +"clientTlsPolicy": { +"description": "Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY.", +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"endpointMatcher": { +"$ref": "EndpointMatcher", +"description": "Required. A matcher that selects endpoints to which the policies should be applied." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the EndpointPolicy resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", +"type": "string" +}, +"serverTlsPolicy": { +"description": "Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint.", +"type": "string" +}, +"trafficPortSelector": { +"$ref": "TrafficPortSelector", +"description": "Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports." +}, +"type": { +"description": "Required. The type of endpoint policy. This is primarily used to validate the configuration.", +"enum": [ +"ENDPOINT_POLICY_TYPE_UNSPECIFIED", +"SIDECAR_PROXY", +"GRPC_SERVER" +], +"enumDescriptions": [ +"Default value. Must not be used.", +"Represents a proxy deployed as a sidecar.", +"Represents a proxyless gRPC backend." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ExtensionChain": { +"description": "A single extension chain wrapper that contains the match conditions and extensions to execute.", +"id": "ExtensionChain", +"properties": { +"extensions": { +"description": "Required. A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for `LbTrafficExtension` resource. `LbRouteExtension` chains are limited to 1 extension per extension chain.", +"items": { +"$ref": "ExtensionChainExtension" +}, +"type": "array" +}, +"matchCondition": { +"$ref": "ExtensionChainMatchCondition", +"description": "Required. Conditions under which this chain is invoked for a request." +}, +"name": { +"description": "Required. The name for this extension chain. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", +"type": "string" +} +}, +"type": "object" +}, +"ExtensionChainExtension": { +"description": "A single extension in the chain to execute for the matching request.", +"id": "ExtensionChainExtension", +"properties": { +"authority": { +"description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service. Required for Callout extensions.", +"type": "string" +}, +"failOpen": { +"description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE` or the default setting of `FALSE` is used, one of the following happens: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset.", +"type": "boolean" +}, +"forwardHeaders": { +"description": "Optional. List of the HTTP headers to forward to the extension (from the client or backend). If omitted, all headers are sent. Each element is a string indicating the header name.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. The name for this extension. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", +"type": "string" +}, +"service": { +"description": "Required. The reference to the service that runs the extension. Currently only callout extensions are supported here. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", +"type": "string" +}, +"supportedEvents": { +"description": "Optional. A set of events during request or response processing for which this extension is called. This field is required for the `LbTrafficExtension` resource. It's not relevant for the `LbRouteExtension` resource.", +"items": { +"enum": [ +"EVENT_TYPE_UNSPECIFIED", +"REQUEST_HEADERS", +"REQUEST_BODY", +"RESPONSE_HEADERS", +"RESPONSE_BODY", +"REQUEST_TRAILERS", +"RESPONSE_TRAILERS" +], +"enumDescriptions": [ +"Unspecified value. Do not use.", +"If included in `supported_events`, the extension is called when the HTTP request headers arrive.", +"If included in `supported_events`, the extension is called when the HTTP request body arrives.", +"If included in `supported_events`, the extension is called when the HTTP response headers arrive.", +"If included in `supported_events`, the extension is called when the HTTP response body arrives.", +"If included in `supported_events`, the extension is called when the HTTP request trailers arrives.", +"If included in `supported_events`, the extension is called when the HTTP response trailers arrives." +], +"type": "string" +}, +"type": "array" +}, +"timeout": { +"description": "Optional. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds. Required for Callout extensions.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"ExtensionChainMatchCondition": { +"description": "Conditions under which this chain is invoked for a request.", +"id": "ExtensionChainMatchCondition", +"properties": { +"celExpression": { +"description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", +"type": "string" +} +}, +"type": "object" +}, +"Gateway": { +"description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 32", +"id": "Gateway", +"properties": { +"addresses": { +"description": "Optional. Zero or one IPv4 or IPv6 address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6.", +"items": { +"type": "string" +}, +"type": "array" +}, +"certificateUrls": { +"description": "Optional. A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.", +"items": { +"type": "string" +}, +"type": "array" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"envoyHeaders": { +"description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", +"enum": [ +"ENVOY_HEADERS_UNSPECIFIED", +"NONE", +"DEBUG_HEADERS" +], +"enumDescriptions": [ +"Defaults to NONE.", +"Suppress envoy debug headers.", +"Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" +], +"type": "string" +}, +"gatewaySecurityPolicy": { +"description": "Optional. A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.", +"type": "string" +}, +"ipVersion": { +"description": "Optional. The IP Version that will be used by this gateway. Valid options are IPV4 or IPV6. Default is IPV4.", +"enum": [ +"IP_VERSION_UNSPECIFIED", +"IPV4", +"IPV6" +], +"enumDescriptions": [ +"The type when IP version is not specified. Defaults to IPV4.", +"The type for IP version 4.", +"The type for IP version 6." +], +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the Gateway resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", +"type": "string" +}, +"network": { +"description": "Optional. The relative resource name identifying the VPC network that is using this configuration. For example: `projects/*/global/networks/network-1`. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.", +"type": "string" +}, +"ports": { +"description": "Required. One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple ports.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"scope": { +"description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", +"type": "string" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"serverTlsPolicy": { +"description": "Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.", +"type": "string" +}, +"subnetwork": { +"description": "Optional. The relative resource name identifying the subnetwork in which this SWG is allocated. For example: `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY\".", +"type": "string" +}, +"type": { +"description": "Immutable. The type of the customer managed gateway. This field is required. If unspecified, an error is returned.", +"enum": [ +"TYPE_UNSPECIFIED", +"OPEN_MESH", +"SECURE_WEB_GATEWAY" +], +"enumDescriptions": [ +"The type of the customer managed gateway is unspecified.", +"The type of the customer managed gateway is TrafficDirector Open Mesh.", +"The type of the customer managed gateway is SecureWebGateway (SWG)." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GrpcRoute": { +"description": "GrpcRoute is the resource defining how gRPC traffic routed by a Mesh or Gateway resource is routed.", +"id": "GrpcRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"hostnames": { +"description": "Required. Service hostnames with an optional port for which this route describes traffic. Format: [:] Hostname is the fully qualified domain name of a network host. This matches the RFC 1123 definition of a hostname with 2 notable exceptions: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateway must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`. If a port is specified, then gRPC clients must use the channel URI with the port to match this rule (i.e. \"xds:///service:123\"), otherwise they must supply the URI without a port (i.e. \"xds:///service\").", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the GrpcRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/global/grpcRoutes/`", +"type": "string" +}, +"rules": { +"description": "Required. A list of detailed rules defining how to route traffic. Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the first matching GrpcRoute.RouteRule will be executed. At least one rule must be supplied.", +"items": { +"$ref": "GrpcRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteDestination": { +"description": "The destination to which traffic will be routed.", +"id": "GrpcRouteDestination", +"properties": { +"serviceName": { +"description": "Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.", +"type": "string" +}, +"weight": { +"description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GrpcRouteFaultInjectionPolicy": { +"description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests.", +"id": "GrpcRouteFaultInjectionPolicy", +"properties": { +"abort": { +"$ref": "GrpcRouteFaultInjectionPolicyAbort", +"description": "The specification for aborting to client requests." +}, +"delay": { +"$ref": "GrpcRouteFaultInjectionPolicyDelay", +"description": "The specification for injecting delay to client requests." +} +}, +"type": "object" +}, +"GrpcRouteFaultInjectionPolicyAbort": { +"description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", +"id": "GrpcRouteFaultInjectionPolicyAbort", +"properties": { +"httpStatus": { +"description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", +"format": "int32", +"type": "integer" +}, +"percentage": { +"description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GrpcRouteFaultInjectionPolicyDelay": { +"description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", +"id": "GrpcRouteFaultInjectionPolicyDelay", +"properties": { +"fixedDelay": { +"description": "Specify a fixed delay before forwarding the request.", +"format": "google-duration", +"type": "string" +}, +"percentage": { +"description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GrpcRouteHeaderMatch": { +"description": "A match against a collection of headers.", +"id": "GrpcRouteHeaderMatch", +"properties": { +"key": { +"description": "Required. The key of the header.", +"type": "string" +}, +"type": { +"description": "Optional. Specifies how to match against the value of the header. If not specified, a default value of EXACT is used.", +"enum": [ +"TYPE_UNSPECIFIED", +"EXACT", +"REGULAR_EXPRESSION" +], +"enumDescriptions": [ +"Unspecified.", +"Will only match the exact value provided.", +"Will match paths conforming to the prefix specified by value. RE2 syntax is supported." +], +"type": "string" +}, +"value": { +"description": "Required. The value of the header.", +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteMethodMatch": { +"description": "Specifies a match against a method.", +"id": "GrpcRouteMethodMatch", +"properties": { +"caseSensitive": { +"description": "Optional. Specifies that matches are case sensitive. The default value is true. case_sensitive must not be used with a type of REGULAR_EXPRESSION.", +"type": "boolean" +}, +"grpcMethod": { +"description": "Required. Name of the method to match against. If unspecified, will match all methods.", +"type": "string" +}, +"grpcService": { +"description": "Required. Name of the service to match against. If unspecified, will match all services.", +"type": "string" +}, +"type": { +"description": "Optional. Specifies how to match against the name. If not specified, a default value of \"EXACT\" is used.", +"enum": [ +"TYPE_UNSPECIFIED", +"EXACT", +"REGULAR_EXPRESSION" +], +"enumDescriptions": [ +"Unspecified.", +"Will only match the exact name provided.", +"Will interpret grpc_method and grpc_service as regexes. RE2 syntax is supported." +], +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteRetryPolicy": { +"description": "The specifications for retries.", +"id": "GrpcRouteRetryPolicy", +"properties": { +"numRetries": { +"description": "Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.", +"format": "uint32", +"type": "integer" +}, +"retryConditions": { +"description": "- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GrpcRouteRouteAction": { +"description": "Specifies how to route matched traffic.", +"id": "GrpcRouteRouteAction", +"properties": { +"destinations": { +"description": "Optional. The destination services to which traffic should be forwarded. If multiple destinations are specified, traffic will be split between Backend Service(s) according to the weight field of these destinations.", +"items": { +"$ref": "GrpcRouteDestination" +}, +"type": "array" +}, +"faultInjectionPolicy": { +"$ref": "GrpcRouteFaultInjectionPolicy", +"description": "Optional. The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +}, +"retryPolicy": { +"$ref": "GrpcRouteRetryPolicy", +"description": "Optional. Specifies the retry policy associated with this route." +}, +"statefulSessionAffinity": { +"$ref": "GrpcRouteStatefulSessionAffinityPolicy", +"description": "Optional. Specifies cookie-based stateful session affinity." +}, +"timeout": { +"description": "Optional. Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteRouteMatch": { +"description": "Criteria for matching traffic. A RouteMatch will be considered to match when all supplied fields match.", +"id": "GrpcRouteRouteMatch", +"properties": { +"headers": { +"description": "Optional. Specifies a collection of headers to match.", +"items": { +"$ref": "GrpcRouteHeaderMatch" +}, +"type": "array" +}, +"method": { +"$ref": "GrpcRouteMethodMatch", +"description": "Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods." +} +}, +"type": "object" +}, +"GrpcRouteRouteRule": { +"description": "Describes how to route traffic.", +"id": "GrpcRouteRouteRule", +"properties": { +"action": { +"$ref": "GrpcRouteRouteAction", +"description": "Required. A detailed rule defining how to route traffic. This field is required." +}, +"matches": { +"description": "Optional. Matches define conditions used for matching the rule against incoming gRPC requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic.", +"items": { +"$ref": "GrpcRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"GrpcRouteStatefulSessionAffinityPolicy": { +"description": "The specification for cookie-based stateful session affinity where the date plane supplies a \u201csession cookie\u201d with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", +"id": "GrpcRouteStatefulSessionAffinityPolicy", +"properties": { +"cookieTtl": { +"description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"HttpRoute": { +"description": "HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh or Gateway resource.", +"id": "HttpRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"hostnames": { +"description": "Required. Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the HttpRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name>`.", +"type": "string" +}, +"rules": { +"description": "Required. Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.", +"items": { +"$ref": "HttpRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteCorsPolicy": { +"description": "The Specification for allowing client side cross-origin requests.", +"id": "HttpRouteCorsPolicy", +"properties": { +"allowCredentials": { +"description": "In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.", +"type": "boolean" +}, +"allowHeaders": { +"description": "Specifies the content for Access-Control-Allow-Headers header.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowMethods": { +"description": "Specifies the content for Access-Control-Allow-Methods header.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowOriginRegexes": { +"description": "Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowOrigins": { +"description": "Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.", +"items": { +"type": "string" +}, +"type": "array" +}, +"disabled": { +"description": "If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.", +"type": "boolean" +}, +"exposeHeaders": { +"description": "Specifies the content for Access-Control-Expose-Headers header.", +"items": { +"type": "string" +}, +"type": "array" +}, +"maxAge": { +"description": "Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteDestination": { +"description": "Specifications of a destination to which the request should be routed to.", +"id": "HttpRouteDestination", +"properties": { +"requestHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"responseHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"serviceName": { +"description": "The URL of a BackendService to route traffic to.", +"type": "string" +}, +"weight": { +"description": "Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteFaultInjectionPolicy": { +"description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced by client proxy on a percentage of requests before sending those requests to the destination service. Similarly requests can be aborted by client proxy for a percentage of requests.", +"id": "HttpRouteFaultInjectionPolicy", +"properties": { +"abort": { +"$ref": "HttpRouteFaultInjectionPolicyAbort", +"description": "The specification for aborting to client requests." +}, +"delay": { +"$ref": "HttpRouteFaultInjectionPolicyDelay", +"description": "The specification for injecting delay to client requests." +} +}, +"type": "object" +}, +"HttpRouteFaultInjectionPolicyAbort": { +"description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", +"id": "HttpRouteFaultInjectionPolicyAbort", +"properties": { +"httpStatus": { +"description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", +"format": "int32", +"type": "integer" +}, +"percentage": { +"description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteFaultInjectionPolicyDelay": { +"description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", +"id": "HttpRouteFaultInjectionPolicyDelay", +"properties": { +"fixedDelay": { +"description": "Specify a fixed delay before forwarding the request.", +"format": "google-duration", +"type": "string" +}, +"percentage": { +"description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteHeaderMatch": { +"description": "Specifies how to select a route rule based on HTTP request headers.", +"id": "HttpRouteHeaderMatch", +"properties": { +"exactMatch": { +"description": "The value of the header should match exactly the content of exact_match.", +"type": "string" +}, +"header": { +"description": "The name of the HTTP header to match against.", +"type": "string" +}, +"invertMatch": { +"description": "If specified, the match result will be inverted before checking. Default value is set to false.", +"type": "boolean" +}, +"prefixMatch": { +"description": "The value of the header must start with the contents of prefix_match.", +"type": "string" +}, +"presentMatch": { +"description": "A header with header_name must exist. The match takes place whether or not the header has a value.", +"type": "boolean" +}, +"rangeMatch": { +"$ref": "HttpRouteHeaderMatchIntegerRange", +"description": "If specified, the rule will match if the request header value is within the range." +}, +"regexMatch": { +"description": "The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax", +"type": "string" +}, +"suffixMatch": { +"description": "The value of the header must end with the contents of suffix_match.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteHeaderMatchIntegerRange": { +"description": "Represents an integer value range.", +"id": "HttpRouteHeaderMatchIntegerRange", +"properties": { +"end": { +"description": "End of the range (exclusive)", +"format": "int32", +"type": "integer" +}, +"start": { +"description": "Start of the range (inclusive)", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteHeaderModifier": { +"description": "The specification for modifying HTTP header in HTTP request and HTTP response.", +"id": "HttpRouteHeaderModifier", +"properties": { +"add": { +"additionalProperties": { +"type": "string" +}, +"description": "Add the headers with given map where key is the name of the header, value is the value of the header.", +"type": "object" +}, +"remove": { +"description": "Remove headers (matching by header names) specified in the list.", +"items": { +"type": "string" +}, +"type": "array" +}, +"set": { +"additionalProperties": { +"type": "string" +}, +"description": "Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.", +"type": "object" +} +}, +"type": "object" +}, +"HttpRouteHttpDirectResponse": { +"description": "Static HTTP response object to be returned.", +"id": "HttpRouteHttpDirectResponse", +"properties": { +"bytesBody": { +"description": "Optional. Response body as bytes. Maximum body size is 4096B.", +"format": "byte", +"type": "string" +}, +"status": { +"description": "Required. Status to return as part of HTTP Response. Must be a positive integer.", +"format": "int32", +"type": "integer" +}, +"stringBody": { +"description": "Optional. Response body as a string. Maximum body length is 1024 characters.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteQueryParameterMatch": { +"description": "Specifications to match a query parameter in the request.", +"id": "HttpRouteQueryParameterMatch", +"properties": { +"exactMatch": { +"description": "The value of the query parameter must exactly match the contents of exact_match. Only one of exact_match, regex_match, or present_match must be set.", +"type": "string" +}, +"presentMatch": { +"description": "Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not. Only one of exact_match, regex_match, or present_match must be set.", +"type": "boolean" +}, +"queryParameter": { +"description": "The name of the query parameter to match.", +"type": "string" +}, +"regexMatch": { +"description": "The value of the query parameter must match the regular expression specified by regex_match. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of exact_match, regex_match, or present_match must be set.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteRedirect": { +"description": "The specification for redirecting traffic.", +"id": "HttpRouteRedirect", +"properties": { +"hostRedirect": { +"description": "The host that will be used in the redirect response instead of the one that was supplied in the request.", +"type": "string" +}, +"httpsRedirect": { +"description": "If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.", +"type": "boolean" +}, +"pathRedirect": { +"description": "The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.", +"type": "string" +}, +"portRedirect": { +"description": "The port that will be used in the redirected request instead of the one that was supplied in the request.", +"format": "int32", +"type": "integer" +}, +"prefixRewrite": { +"description": "Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.", +"type": "string" +}, +"responseCode": { +"description": "The HTTP Status code to use for the redirect.", +"enum": [ +"RESPONSE_CODE_UNSPECIFIED", +"MOVED_PERMANENTLY_DEFAULT", +"FOUND", +"SEE_OTHER", +"TEMPORARY_REDIRECT", +"PERMANENT_REDIRECT" +], +"enumDescriptions": [ +"Default value", +"Corresponds to 301.", +"Corresponds to 302.", +"Corresponds to 303.", +"Corresponds to 307. In this case, the request method will be retained.", +"Corresponds to 308. In this case, the request method will be retained." +], +"type": "string" +}, +"stripQuery": { +"description": "if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.", +"type": "boolean" +} +}, +"type": "object" +}, +"HttpRouteRequestMirrorPolicy": { +"description": "Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow.", +"id": "HttpRouteRequestMirrorPolicy", +"properties": { +"destination": { +"$ref": "HttpRouteDestination", +"description": "The destination the requests will be mirrored to. The weight of the destination will be ignored." +}, +"mirrorPercent": { +"description": "Optional. The percentage of requests to get mirrored to the desired destination.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"HttpRouteRetryPolicy": { +"description": "The specifications for retries.", +"id": "HttpRouteRetryPolicy", +"properties": { +"numRetries": { +"description": "Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.", +"format": "int32", +"type": "integer" +}, +"perTryTimeout": { +"description": "Specifies a non-zero timeout per retry attempt.", +"format": "google-duration", +"type": "string" +}, +"retryConditions": { +"description": "Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRouteRouteAction": { +"description": "The specifications for routing traffic and applying associated policies.", +"id": "HttpRouteRouteAction", +"properties": { +"corsPolicy": { +"$ref": "HttpRouteCorsPolicy", +"description": "The specification for allowing client side cross-origin requests." +}, +"destinations": { +"description": "The destination to which traffic should be forwarded.", +"items": { +"$ref": "HttpRouteDestination" +}, +"type": "array" +}, +"directResponse": { +"$ref": "HttpRouteHttpDirectResponse", +"description": "Optional. Static HTTP Response object to be returned regardless of the request." +}, +"faultInjectionPolicy": { +"$ref": "HttpRouteFaultInjectionPolicy", +"description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +}, +"redirect": { +"$ref": "HttpRouteRedirect", +"description": "If set, the request is directed as configured by this field." +}, +"requestHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"requestMirrorPolicy": { +"$ref": "HttpRouteRequestMirrorPolicy", +"description": "Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Proxy will not wait for the shadow destination to respond before returning the response. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow." +}, +"responseHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"retryPolicy": { +"$ref": "HttpRouteRetryPolicy", +"description": "Specifies the retry policy associated with this route." +}, +"statefulSessionAffinity": { +"$ref": "HttpRouteStatefulSessionAffinityPolicy", +"description": "Optional. Specifies cookie-based stateful session affinity." +}, +"timeout": { +"description": "Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", +"format": "google-duration", +"type": "string" +}, +"urlRewrite": { +"$ref": "HttpRouteURLRewrite", +"description": "The specification for rewrite URL before forwarding requests to the destination." +} +}, +"type": "object" +}, +"HttpRouteRouteMatch": { +"description": "RouteMatch defines specifications used to match requests. If multiple match types are set, this RouteMatch will match if ALL type of matches are matched.", +"id": "HttpRouteRouteMatch", +"properties": { +"fullPathMatch": { +"description": "The HTTP request path value should exactly match this value. Only one of full_path_match, prefix_match, or regex_match should be used.", +"type": "string" +}, +"headers": { +"description": "Specifies a list of HTTP request headers to match against. ALL of the supplied headers must be matched.", +"items": { +"$ref": "HttpRouteHeaderMatch" +}, +"type": "array" +}, +"ignoreCase": { +"description": "Specifies if prefix_match and full_path_match matches are case sensitive. The default value is false.", +"type": "boolean" +}, +"prefixMatch": { +"description": "The HTTP request path value must begin with specified prefix_match. prefix_match must begin with a /. Only one of full_path_match, prefix_match, or regex_match should be used.", +"type": "string" +}, +"queryParameters": { +"description": "Specifies a list of query parameters to match against. ALL of the query parameters must be matched.", +"items": { +"$ref": "HttpRouteQueryParameterMatch" +}, +"type": "array" +}, +"regexMatch": { +"description": "The HTTP request path value must satisfy the regular expression specified by regex_match after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of full_path_match, prefix_match, or regex_match should be used.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteRouteRule": { +"description": "Specifies how to match traffic and how to route traffic when traffic is matched.", +"id": "HttpRouteRouteRule", +"properties": { +"action": { +"$ref": "HttpRouteRouteAction", +"description": "The detailed rule defining how to route matched traffic." +}, +"matches": { +"description": "A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.", +"items": { +"$ref": "HttpRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRouteStatefulSessionAffinityPolicy": { +"description": "The specification for cookie-based stateful session affinity where the date plane supplies a \u201csession cookie\u201d with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", +"id": "HttpRouteStatefulSessionAffinityPolicy", +"properties": { +"cookieTtl": { +"description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteURLRewrite": { +"description": "The specification for modifying the URL of the request, prior to forwarding the request to the destination.", +"id": "HttpRouteURLRewrite", +"properties": { +"hostRewrite": { +"description": "Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.", +"type": "string" +}, +"pathPrefixRewrite": { +"description": "Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.", +"type": "string" +} +}, +"type": "object" +}, +"LbRouteExtension": { +"description": "`LbRouteExtension` is a resource that lets you control where traffic is routed to for a given request.", +"id": "LbRouteExtension", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A human-readable description of the resource.", +"type": "string" +}, +"extensionChains": { +"description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", +"items": { +"$ref": "ExtensionChain" +}, +"type": "array" +}, +"forwardingRules": { +"description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LbRouteExtension` resource per forwarding rule.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", +"type": "object" +}, +"loadBalancingScheme": { +"description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", +"enum": [ +"LOAD_BALANCING_SCHEME_UNSPECIFIED", +"INTERNAL_MANAGED", +"EXTERNAL_MANAGED" +], +"enumDescriptions": [ +"Default value. Do not use.", +"Signifies that this is used for Internal HTTP(S) Load Balancing.", +"Signifies that this is used for External Managed HTTP(S) Load Balancing." +], +"type": "string" +}, +"name": { +"description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"LbTrafficExtension": { +"description": "`LbTrafficExtension` is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service.", +"id": "LbTrafficExtension", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A human-readable description of the resource.", +"type": "string" +}, +"extensionChains": { +"description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", +"items": { +"$ref": "ExtensionChain" +}, +"type": "array" +}, +"forwardingRules": { +"description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LBTrafficExtension` resource per forwarding rule.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", +"type": "object" +}, +"loadBalancingScheme": { +"description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", +"enum": [ +"LOAD_BALANCING_SCHEME_UNSPECIFIED", +"INTERNAL_MANAGED", +"EXTERNAL_MANAGED" +], +"enumDescriptions": [ +"Default value. Do not use.", +"Signifies that this is used for Internal HTTP(S) Load Balancing.", +"Signifies that this is used for External Managed HTTP(S) Load Balancing." +], +"type": "string" +}, +"name": { +"description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ListEndpointPoliciesResponse": { +"description": "Response returned by the ListEndpointPolicies method.", +"id": "ListEndpointPoliciesResponse", +"properties": { +"endpointPolicies": { +"description": "List of EndpointPolicy resources.", +"items": { +"$ref": "EndpointPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListGatewaysResponse": { +"description": "Response returned by the ListGateways method.", +"id": "ListGatewaysResponse", +"properties": { +"gateways": { +"description": "List of Gateway resources.", +"items": { +"$ref": "Gateway" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListGrpcRoutesResponse": { +"description": "Response returned by the ListGrpcRoutes method.", +"id": "ListGrpcRoutesResponse", +"properties": { +"grpcRoutes": { +"description": "List of GrpcRoute resources.", +"items": { +"$ref": "GrpcRoute" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListHttpRoutesResponse": { +"description": "Response returned by the ListHttpRoutes method.", +"id": "ListHttpRoutesResponse", +"properties": { +"httpRoutes": { +"description": "List of HttpRoute resources.", +"items": { +"$ref": "HttpRoute" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListLbRouteExtensionsResponse": { +"description": "Message for response to listing `LbRouteExtension` resources.", +"id": "ListLbRouteExtensionsResponse", +"properties": { +"lbRouteExtensions": { +"description": "The list of `LbRouteExtension` resources.", +"items": { +"$ref": "LbRouteExtension" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results that the server returns.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLbTrafficExtensionsResponse": { +"description": "Message for response to listing `LbTrafficExtension` resources.", +"id": "ListLbTrafficExtensionsResponse", +"properties": { +"lbTrafficExtensions": { +"description": "The list of `LbTrafficExtension` resources.", +"items": { +"$ref": "LbTrafficExtension" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results that the server returns.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListMeshesResponse": { +"description": "Response returned by the ListMeshes method.", +"id": "ListMeshesResponse", +"properties": { +"meshes": { +"description": "List of Mesh resources.", +"items": { +"$ref": "Mesh" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceBindingsResponse": { +"description": "Response returned by the ListServiceBindings method.", +"id": "ListServiceBindingsResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"serviceBindings": { +"description": "List of ServiceBinding resources.", +"items": { +"$ref": "ServiceBinding" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceLbPoliciesResponse": { +"description": "Response returned by the ListServiceLbPolicies method.", +"id": "ListServiceLbPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"serviceLbPolicies": { +"description": "List of ServiceLbPolicy resources.", +"items": { +"$ref": "ServiceLbPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTcpRoutesResponse": { +"description": "Response returned by the ListTcpRoutes method.", +"id": "ListTcpRoutesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"tcpRoutes": { +"description": "List of TcpRoute resources.", +"items": { +"$ref": "TcpRoute" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTlsRoutesResponse": { +"description": "Response returned by the ListTlsRoutes method.", +"id": "ListTlsRoutesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"tlsRoutes": { +"description": "List of TlsRoute resources.", +"items": { +"$ref": "TlsRoute" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Mesh": { +"description": "Mesh represents a logical configuration grouping for workload to workload communication within a service mesh. Routes that point to mesh dictate how requests are routed within this logical mesh boundary.", +"id": "Mesh", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"envoyHeaders": { +"description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", +"enum": [ +"ENVOY_HEADERS_UNSPECIFIED", +"NONE", +"DEBUG_HEADERS" +], +"enumDescriptions": [ +"Defaults to NONE.", +"Suppress envoy debug headers.", +"Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" +], +"type": "string" +}, +"interceptionPort": { +"description": "Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This is applicable only for sidecar proxy deployments.", +"format": "int32", +"type": "integer" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the Mesh resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", +"type": "string" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ServiceBinding": { +"description": "ServiceBinding is the resource that defines a Service Directory Service to be used in a BackendService resource.", +"id": "ServiceBinding", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the ServiceBinding resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/global/serviceBindings/service_binding_name`.", +"type": "string" +}, +"service": { +"description": "Required. The full Service Directory Service name of the format projects/*/locations/*/namespaces/*/services/*", +"type": "string" +}, +"serviceId": { +"description": "Output only. The unique identifier of the Service Directory Service against which the Service Binding resource is validated. This is populated when the Service Binding resource is used in another resource (like Backend Service). This is of the UUID4 format.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServiceLbPolicy": { +"description": "ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.", +"id": "ServiceLbPolicy", +"properties": { +"autoCapacityDrain": { +"$ref": "ServiceLbPolicyAutoCapacityDrain", +"description": "Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service." +}, +"createTime": { +"description": "Output only. The timestamp when this resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"failoverConfig": { +"$ref": "ServiceLbPolicyFailoverConfig", +"description": "Optional. Configuration related to health based failover." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the ServiceLbPolicy resource.", +"type": "object" +}, +"loadBalancingAlgorithm": { +"description": "Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.", +"enum": [ +"LOAD_BALANCING_ALGORITHM_UNSPECIFIED", +"SPRAY_TO_WORLD", +"SPRAY_TO_REGION", +"WATERFALL_BY_REGION", +"WATERFALL_BY_ZONE" +], +"enumDescriptions": [ +"The type of the loadbalancing algorithm is unspecified.", +"Balance traffic across all backends across the world proportionally based on capacity.", +"Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions and spread the traffic from each client to all the MIGs/NEGs in a region.", +"Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions. All MIGs/NEGs within a region are evenly loaded but each client might not spread the traffic to all the MIGs/NEGs in the region.", +"Attempt to keep traffic in a single zone closest to the client, before spilling over to other zones." +], +"type": "string" +}, +"name": { +"description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when this resource was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServiceLbPolicyAutoCapacityDrain": { +"description": "Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing.", +"id": "ServiceLbPolicyAutoCapacityDrain", +"properties": { +"enable": { +"description": "Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy. - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.", +"type": "boolean" +} +}, +"type": "object" +}, +"ServiceLbPolicyFailoverConfig": { +"description": "Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy.", +"id": "ServiceLbPolicyFailoverConfig", +"properties": { +"failoverHealthThreshold": { +"description": "Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TcpRoute": { +"description": "TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/Gateway resource.", +"id": "TcpRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the TcpRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name>`.", +"type": "string" +}, +"rules": { +"description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", +"items": { +"$ref": "TcpRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"TcpRouteRouteAction": { +"description": "The specifications for routing traffic and applying associated policies.", +"id": "TcpRouteRouteAction", +"properties": { +"destinations": { +"description": "Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.", +"items": { +"$ref": "TcpRouteRouteDestination" +}, +"type": "array" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +}, +"originalDestination": { +"description": "Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.", +"type": "boolean" +} +}, +"type": "object" +}, +"TcpRouteRouteDestination": { +"description": "Describe the destination for traffic to be routed to.", +"id": "TcpRouteRouteDestination", +"properties": { +"serviceName": { +"description": "Required. The URL of a BackendService to route traffic to.", +"type": "string" +}, +"weight": { +"description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TcpRouteRouteMatch": { +"description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", +"id": "TcpRouteRouteMatch", +"properties": { +"address": { +"description": "Required. Must be specified in the CIDR range format. A CIDR range consists of an IP Address and a prefix length to construct the subnet mask. By default, the prefix length is 32 (i.e. matches a single IP address). Only IPV4 addresses are supported. Examples: \"10.0.0.1\" - matches against this exact IP address. \"10.0.0.0/8\" - matches against any IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. \"0.0.0.0/0\" - matches against any IP address'.", +"type": "string" +}, +"port": { +"description": "Required. Specifies the destination port to match against.", +"type": "string" +} +}, +"type": "object" +}, +"TcpRouteRouteRule": { +"description": "Specifies how to match traffic and how to route traffic when traffic is matched.", +"id": "TcpRouteRouteRule", +"properties": { +"action": { +"$ref": "TcpRouteRouteAction", +"description": "Required. The detailed rule defining how to route matched traffic." +}, +"matches": { +"description": "Optional. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", +"items": { +"$ref": "TcpRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TlsRoute": { +"description": "TlsRoute defines how traffic should be routed based on SNI and other matching L3 attributes.", +"id": "TlsRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the TlsRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name>`.", +"type": "string" +}, +"rules": { +"description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", +"items": { +"$ref": "TlsRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"TlsRouteRouteAction": { +"description": "The specifications for routing traffic and applying associated policies.", +"id": "TlsRouteRouteAction", +"properties": { +"destinations": { +"description": "Required. The destination services to which traffic should be forwarded. At least one destination service is required.", +"items": { +"$ref": "TlsRouteRouteDestination" +}, +"type": "array" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"TlsRouteRouteDestination": { +"description": "Describe the destination for traffic to be routed to.", +"id": "TlsRouteRouteDestination", +"properties": { +"serviceName": { +"description": "Required. The URL of a BackendService to route traffic to.", +"type": "string" +}, +"weight": { +"description": "Optional. Specifies the proportion of requests forwareded to the backend referenced by the service_name field. This is computed as: - weight/Sum(weights in destinations) Weights in all destinations does not need to sum up to 100.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TlsRouteRouteMatch": { +"description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"AND\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", +"id": "TlsRouteRouteMatch", +"properties": { +"alpn": { +"description": "Optional. ALPN (Application-Layer Protocol Negotiation) to match against. Examples: \"http/1.1\", \"h2\". At least one of sni_host and alpn is required. Up to 5 alpns across all matches can be set.", +"items": { +"type": "string" +}, +"type": "array" +}, +"sniHost": { +"description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts across all matches can be set.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TlsRouteRouteRule": { +"description": "Specifies how to match traffic and how to route traffic when traffic is matched.", +"id": "TlsRouteRouteRule", +"properties": { +"action": { +"$ref": "TlsRouteRouteAction", +"description": "Required. The detailed rule defining how to route matched traffic." +}, +"matches": { +"description": "Required. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation.", +"items": { +"$ref": "TlsRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"TrafficPortSelector": { +"description": "Specification of a port-based selector.", +"id": "TrafficPortSelector", +"properties": { +"ports": { +"description": "Optional. A list of ports. Can be port numbers or port range (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or named ports or * to specify all ports. If the list is empty, all ports are selected.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Services API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkservices.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkservices.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..7ee082a4eedbedc7fe6ba71d74583dc4e953823c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/networkservices.v1beta1.json @@ -0,0 +1,4852 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://networkservices.googleapis.com/", +"batchPath": "batch", +"canonicalName": "NetworkServices", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/networking", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "networkservices:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://networkservices.mtls.googleapis.com/", +"name": "networkservices", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "networkservices.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"endpointPolicies": { +"methods": { +"create": { +"description": "Creates a new EndpointPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", +"httpMethod": "POST", +"id": "networkservices.projects.locations.endpointPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"endpointPolicyId": { +"description": "Required. Short name of the EndpointPolicy resource to be created. E.g. \"CustomECS\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the EndpointPolicy. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/endpointPolicies", +"request": { +"$ref": "EndpointPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single EndpointPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.endpointPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the EndpointPolicy to delete. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single EndpointPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.endpointPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the EndpointPolicy to get. Must be in the format `projects/*/locations/global/endpointPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "EndpointPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.endpointPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists EndpointPolicies in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies", +"httpMethod": "GET", +"id": "networkservices.projects.locations.endpointPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of EndpointPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListEndpointPoliciesResponse` Indicates that this is a continuation of a prior `ListEndpointPolicies` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the EndpointPolicies should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/endpointPolicies", +"response": { +"$ref": "ListEndpointPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single EndpointPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.endpointPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the EndpointPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "EndpointPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.endpointPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/endpointPolicies/{endpointPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.endpointPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/endpointPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"gateways": { +"methods": { +"create": { +"description": "Creates a new Gateway in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", +"httpMethod": "POST", +"id": "networkservices.projects.locations.gateways.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"gatewayId": { +"description": "Required. Short name of the Gateway resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the Gateway. Must be in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/gateways", +"request": { +"$ref": "Gateway" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Gateway.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.gateways.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Gateway to delete. Must be in the format `projects/*/locations/*/gateways/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Gateway.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.gateways.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Gateway to get. Must be in the format `projects/*/locations/*/gateways/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Gateway" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.gateways.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Gateways in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways", +"httpMethod": "GET", +"id": "networkservices.projects.locations.gateways.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Gateways to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListGatewaysResponse` Indicates that this is a continuation of a prior `ListGateways` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the Gateways should be listed, specified in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/gateways", +"response": { +"$ref": "ListGatewaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Gateway.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.gateways.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the Gateway resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Gateway" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.gateways.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/gateways/{gatewaysId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.gateways.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/gateways/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"grpcRoutes": { +"methods": { +"create": { +"description": "Creates a new GrpcRoute in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.grpcRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"grpcRouteId": { +"description": "Required. Short name of the GrpcRoute resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the GrpcRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/grpcRoutes", +"request": { +"$ref": "GrpcRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single GrpcRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.grpcRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GrpcRoute to delete. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single GrpcRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.grpcRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the GrpcRoute to get. Must be in the format `projects/*/locations/global/grpcRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GrpcRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists GrpcRoutes in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.grpcRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of GrpcRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListGrpcRoutesResponse` Indicates that this is a continuation of a prior `ListGrpcRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the GrpcRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/grpcRoutes", +"response": { +"$ref": "ListGrpcRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single GrpcRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/grpcRoutes/{grpcRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.grpcRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/global/grpcRoutes/`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/grpcRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the GrpcRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GrpcRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"httpRoutes": { +"methods": { +"create": { +"description": "Creates a new HttpRoute in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.httpRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"httpRouteId": { +"description": "Required. Short name of the HttpRoute resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the HttpRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/httpRoutes", +"request": { +"$ref": "HttpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single HttpRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.httpRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the HttpRoute to delete. Must be in the format `projects/*/locations/global/httpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single HttpRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.httpRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the HttpRoute to get. Must be in the format `projects/*/locations/global/httpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "HttpRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists HttpRoute in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.httpRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of HttpRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListHttpRoutesResponse` Indicates that this is a continuation of a prior `ListHttpRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the HttpRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/httpRoutes", +"response": { +"$ref": "ListHttpRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single HttpRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/httpRoutes/{httpRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.httpRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name>`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/httpRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the HttpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "HttpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"lbRouteExtensions": { +"methods": { +"create": { +"description": "Creates a new `LbRouteExtension` resource in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.lbRouteExtensions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"lbRouteExtensionId": { +"description": "Required. User-provided ID of the `LbRouteExtension` resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the `LbRouteExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/lbRouteExtensions", +"request": { +"$ref": "LbRouteExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified `LbRouteExtension` resource.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.lbRouteExtensions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the `LbRouteExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of the specified `LbRouteExtension` resource.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbRouteExtensions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the `LbRouteExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "LbRouteExtension" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `LbRouteExtension` resources in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbRouteExtensions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Hint for how to order the results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results that the server returns.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the `LbRouteExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/lbRouteExtensions", +"response": { +"$ref": "ListLbRouteExtensionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of the specified `LbRouteExtension` resource.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbRouteExtensions/{lbRouteExtensionsId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.lbRouteExtensions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbRouteExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Used to specify the fields to be overwritten in the `LbRouteExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "LbRouteExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"lbTrafficExtensions": { +"methods": { +"create": { +"description": "Creates a new `LbTrafficExtension` resource in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.lbTrafficExtensions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"lbTrafficExtensionId": { +"description": "Required. User-provided ID of the `LbTrafficExtension` resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the `LbTrafficExtension` resource. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/lbTrafficExtensions", +"request": { +"$ref": "LbTrafficExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified `LbTrafficExtension` resource.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.lbTrafficExtensions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the `LbTrafficExtension` resource to delete. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of the specified `LbTrafficExtension` resource.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbTrafficExtensions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the `LbTrafficExtension` resource to get. Must be in the format `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "LbTrafficExtension" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `LbTrafficExtension` resources in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions", +"httpMethod": "GET", +"id": "networkservices.projects.locations.lbTrafficExtensions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Hint for how to order the results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server might return fewer items than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results that the server returns.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the `LbTrafficExtension` resources are listed, specified in the following format: `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/lbTrafficExtensions", +"response": { +"$ref": "ListLbTrafficExtensionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of the specified `LbTrafficExtension` resource.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/lbTrafficExtensions/{lbTrafficExtensionsId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.lbTrafficExtensions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/lbTrafficExtensions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server can ignore the request if it has already been completed. The server guarantees that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, ignores the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Optional. Used to specify the fields to be overwritten in the `LbTrafficExtension` resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not specify a mask, then all fields are overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "LbTrafficExtension" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"meshes": { +"methods": { +"create": { +"description": "Creates a new Mesh in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.meshes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"meshId": { +"description": "Required. Short name of the Mesh resource to be created.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource of the Mesh. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/meshes", +"request": { +"$ref": "Mesh" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Mesh.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.meshes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Mesh to delete. Must be in the format `projects/*/locations/global/meshes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Mesh.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.meshes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the Mesh to get. Must be in the format `projects/*/locations/global/meshes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Mesh" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.meshes.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Meshes in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.meshes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Meshes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListMeshesResponse` Indicates that this is a continuation of a prior `ListMeshes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the Meshes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/meshes", +"response": { +"$ref": "ListMeshesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Mesh.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.meshes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the Mesh resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Mesh" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.meshes.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/meshes/{meshesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.meshes.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/meshes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "networkservices.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "networkservices.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceBindings": { +"methods": { +"create": { +"description": "Creates a new ServiceBinding in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceBindings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the ServiceBinding. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"serviceBindingId": { +"description": "Required. Short name of the ServiceBinding resource to be created.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/serviceBindings", +"request": { +"$ref": "ServiceBinding" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServiceBinding.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.serviceBindings.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceBinding to delete. Must be in the format `projects/*/locations/global/serviceBindings/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceBinding.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceBindings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceBinding to get. Must be in the format `projects/*/locations/global/serviceBindings/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ServiceBinding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceBindings.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceBinding in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceBindings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ServiceBindings to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListServiceBindingsResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ServiceBindings should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/serviceBindings", +"response": { +"$ref": "ListServiceBindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceBindings.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceBindings/{serviceBindingsId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceBindings.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"serviceLbPolicies": { +"methods": { +"create": { +"description": "Creates a new ServiceLbPolicy in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceLbPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the ServiceLbPolicy. Must be in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"serviceLbPolicyId": { +"description": "Required. Short name of the ServiceLbPolicy resource to be created. E.g. for resource name `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`. the id is value of {service_lb_policy_name}", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/serviceLbPolicies", +"request": { +"$ref": "ServiceLbPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ServiceLbPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.serviceLbPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceLbPolicy to delete. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ServiceLbPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceLbPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the ServiceLbPolicy to get. Must be in the format `projects/{project}/locations/{location}/serviceLbPolicies/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ServiceLbPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:getIamPolicy", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceLbPolicies.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ServiceLbPolicies in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies", +"httpMethod": "GET", +"id": "networkservices.projects.locations.serviceLbPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of ServiceLbPolicies to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListServiceLbPoliciesResponse` Indicates that this is a continuation of a prior `ListRouters` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the ServiceLbPolicies should be listed, specified in the format `projects/{project}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/serviceLbPolicies", +"response": { +"$ref": "ListServiceLbPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single ServiceLbPolicy.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.serviceLbPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the ServiceLbPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "ServiceLbPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:setIamPolicy", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceLbPolicies.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/serviceLbPolicies/{serviceLbPoliciesId}:testIamPermissions", +"httpMethod": "POST", +"id": "networkservices.projects.locations.serviceLbPolicies.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/serviceLbPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tcpRoutes": { +"methods": { +"create": { +"description": "Creates a new TcpRoute in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.tcpRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the TcpRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"tcpRouteId": { +"description": "Required. Short name of the TcpRoute resource to be created.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/tcpRoutes", +"request": { +"$ref": "TcpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TcpRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.tcpRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TcpRoute to delete. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TcpRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tcpRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TcpRoute to get. Must be in the format `projects/*/locations/global/tcpRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "TcpRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TcpRoute in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tcpRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of TcpRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListTcpRoutesResponse` Indicates that this is a continuation of a prior `ListTcpRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the TcpRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/tcpRoutes", +"response": { +"$ref": "ListTcpRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TcpRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tcpRoutes/{tcpRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.tcpRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name>`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tcpRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the TcpRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "TcpRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tlsRoutes": { +"methods": { +"create": { +"description": "Creates a new TlsRoute in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", +"httpMethod": "POST", +"id": "networkservices.projects.locations.tlsRoutes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource of the TlsRoute. Must be in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"tlsRouteId": { +"description": "Required. Short name of the TlsRoute resource to be created.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/tlsRoutes", +"request": { +"$ref": "TlsRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TlsRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", +"httpMethod": "DELETE", +"id": "networkservices.projects.locations.tlsRoutes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TlsRoute to delete. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TlsRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tlsRoutes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A name of the TlsRoute to get. Must be in the format `projects/*/locations/global/tlsRoutes/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "TlsRoute" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TlsRoute in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes", +"httpMethod": "GET", +"id": "networkservices.projects.locations.tlsRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of TlsRoutes to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListTlsRoutesResponse` Indicates that this is a continuation of a prior `ListTlsRoutes` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the TlsRoutes should be listed, specified in the format `projects/*/locations/global`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/tlsRoutes", +"response": { +"$ref": "ListTlsRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TlsRoute.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/tlsRoutes/{tlsRoutesId}", +"httpMethod": "PATCH", +"id": "networkservices.projects.locations.tlsRoutes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name>`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tlsRoutes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask is used to specify the fields to be overwritten in the TlsRoute resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "TlsRoute" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://networkservices.googleapis.com/", +"schemas": { +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EndpointMatcher": { +"description": "A definition of a matcher that selects endpoints to which the policies should be applied.", +"id": "EndpointMatcher", +"properties": { +"metadataLabelMatcher": { +"$ref": "MetadataLabelMatcher", +"description": "The matcher is based on node metadata presented by xDS clients." +} +}, +"type": "object" +}, +"EndpointPolicy": { +"description": "EndpointPolicy is a resource that helps apply desired configuration on the endpoints that match specific criteria. For example, this resource can be used to apply \"authentication config\" an all endpoints that serve on port 8080.", +"id": "EndpointPolicy", +"properties": { +"authorizationPolicy": { +"description": "Optional. This field specifies the URL of AuthorizationPolicy resource that applies authorization policies to the inbound traffic at the matched endpoints. Refer to Authorization. If this field is not specified, authorization is disabled(no authz checks) for this endpoint.", +"type": "string" +}, +"clientTlsPolicy": { +"description": "Optional. A URL referring to a ClientTlsPolicy resource. ClientTlsPolicy can be set to specify the authentication for traffic from the proxy to the actual endpoints. More specifically, it is applied to the outgoing traffic from the proxy to the endpoint. This is typically used for sidecar model where the proxy identifies itself as endpoint to the control plane, with the connection between sidecar and endpoint requiring authentication. If this field is not set, authentication is disabled(open). Applicable only when EndpointPolicyType is SIDECAR_PROXY.", +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"endpointMatcher": { +"$ref": "EndpointMatcher", +"description": "Required. A matcher that selects endpoints to which the policies should be applied." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the EndpointPolicy resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the EndpointPolicy resource. It matches pattern `projects/{project}/locations/global/endpointPolicies/{endpoint_policy}`.", +"type": "string" +}, +"serverTlsPolicy": { +"description": "Optional. A URL referring to ServerTlsPolicy resource. ServerTlsPolicy is used to determine the authentication policy to be applied to terminate the inbound traffic at the identified backends. If this field is not set, authentication is disabled(open) for this endpoint.", +"type": "string" +}, +"trafficPortSelector": { +"$ref": "TrafficPortSelector", +"description": "Optional. Port selector for the (matched) endpoints. If no port selector is provided, the matched config is applied to all ports." +}, +"type": { +"description": "Required. The type of endpoint policy. This is primarily used to validate the configuration.", +"enum": [ +"ENDPOINT_POLICY_TYPE_UNSPECIFIED", +"SIDECAR_PROXY", +"GRPC_SERVER" +], +"enumDescriptions": [ +"Default value. Must not be used.", +"Represents a proxy deployed as a sidecar.", +"Represents a proxyless gRPC backend." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ExtensionChain": { +"description": "A single extension chain wrapper that contains the match conditions and extensions to execute.", +"id": "ExtensionChain", +"properties": { +"extensions": { +"description": "Required. A set of extensions to execute for the matching request. At least one extension is required. Up to 3 extensions can be defined for each extension chain for `LbTrafficExtension` resource. `LbRouteExtension` chains are limited to 1 extension per extension chain.", +"items": { +"$ref": "ExtensionChainExtension" +}, +"type": "array" +}, +"matchCondition": { +"$ref": "ExtensionChainMatchCondition", +"description": "Required. Conditions under which this chain is invoked for a request." +}, +"name": { +"description": "Required. The name for this extension chain. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", +"type": "string" +} +}, +"type": "object" +}, +"ExtensionChainExtension": { +"description": "A single extension in the chain to execute for the matching request.", +"id": "ExtensionChainExtension", +"properties": { +"authority": { +"description": "Optional. The `:authority` header in the gRPC request sent from Envoy to the extension service. Required for Callout extensions.", +"type": "string" +}, +"failOpen": { +"description": "Optional. Determines how the proxy behaves if the call to the extension fails or times out. When set to `TRUE`, request or response processing continues without error. Any subsequent extensions in the extension chain are also executed. When set to `FALSE` or the default setting of `FALSE` is used, one of the following happens: * If response headers have not been delivered to the downstream client, a generic 500 error is returned to the client. The error response can be tailored by configuring a custom error response in the load balancer. * If response headers have been delivered, then the HTTP stream to the downstream client is reset.", +"type": "boolean" +}, +"forwardHeaders": { +"description": "Optional. List of the HTTP headers to forward to the extension (from the client or backend). If omitted, all headers are sent. Each element is a string indicating the header name.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. The name for this extension. The name is logged as part of the HTTP request logs. The name must conform with RFC-1034, is restricted to lower-cased letters, numbers and hyphens, and can have a maximum length of 63 characters. Additionally, the first character must be a letter and the last a letter or a number.", +"type": "string" +}, +"service": { +"description": "Required. The reference to the service that runs the extension. Currently only callout extensions are supported here. To configure a callout extension, `service` must be a fully-qualified reference to a [backend service](https://cloud.google.com/compute/docs/reference/rest/v1/backendServices) in the format: `https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/backendServices/{backendService}` or `https://www.googleapis.com/compute/v1/projects/{project}/global/backendServices/{backendService}`.", +"type": "string" +}, +"supportedEvents": { +"description": "Optional. A set of events during request or response processing for which this extension is called. This field is required for the `LbTrafficExtension` resource. It's not relevant for the `LbRouteExtension` resource.", +"items": { +"enum": [ +"EVENT_TYPE_UNSPECIFIED", +"REQUEST_HEADERS", +"REQUEST_BODY", +"RESPONSE_HEADERS", +"RESPONSE_BODY", +"REQUEST_TRAILERS", +"RESPONSE_TRAILERS" +], +"enumDescriptions": [ +"Unspecified value. Do not use.", +"If included in `supported_events`, the extension is called when the HTTP request headers arrive.", +"If included in `supported_events`, the extension is called when the HTTP request body arrives.", +"If included in `supported_events`, the extension is called when the HTTP response headers arrive.", +"If included in `supported_events`, the extension is called when the HTTP response body arrives.", +"If included in `supported_events`, the extension is called when the HTTP request trailers arrives.", +"If included in `supported_events`, the extension is called when the HTTP response trailers arrives." +], +"type": "string" +}, +"type": "array" +}, +"timeout": { +"description": "Optional. Specifies the timeout for each individual message on the stream. The timeout must be between 10-1000 milliseconds. Required for Callout extensions.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"ExtensionChainMatchCondition": { +"description": "Conditions under which this chain is invoked for a request.", +"id": "ExtensionChainMatchCondition", +"properties": { +"celExpression": { +"description": "Required. A Common Expression Language (CEL) expression that is used to match requests for which the extension chain is executed. For more information, see [CEL matcher language reference](https://cloud.google.com/service-extensions/docs/cel-matcher-language-reference).", +"type": "string" +} +}, +"type": "object" +}, +"Gateway": { +"description": "Gateway represents the configuration for a proxy, typically a load balancer. It captures the ip:port over which the services are exposed by the proxy, along with any policy configurations. Routes have reference to to Gateways to dictate how requests should be routed by this Gateway. Next id: 32", +"id": "Gateway", +"properties": { +"addresses": { +"description": "Optional. Zero or one IPv4 or IPv6 address on which the Gateway will receive the traffic. When no address is provided, an IP from the subnetwork is allocated This field only applies to gateways of type 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6.", +"items": { +"type": "string" +}, +"type": "array" +}, +"certificateUrls": { +"description": "Optional. A fully-qualified Certificates URL reference. The proxy presents a Certificate (selected based on SNI) when establishing a TLS connection. This feature only applies to gateways of type 'SECURE_WEB_GATEWAY'.", +"items": { +"type": "string" +}, +"type": "array" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"envoyHeaders": { +"description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", +"enum": [ +"ENVOY_HEADERS_UNSPECIFIED", +"NONE", +"DEBUG_HEADERS" +], +"enumDescriptions": [ +"Defaults to NONE.", +"Suppress envoy debug headers.", +"Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" +], +"type": "string" +}, +"gatewaySecurityPolicy": { +"description": "Optional. A fully-qualified GatewaySecurityPolicy URL reference. Defines how a server should apply security policy to inbound (VM to Proxy) initiated connections. For example: `projects/*/locations/*/gatewaySecurityPolicies/swg-policy`. This policy is specific to gateways of type 'SECURE_WEB_GATEWAY'.", +"type": "string" +}, +"ipVersion": { +"description": "Optional. The IP Version that will be used by this gateway. Valid options are IPV4 or IPV6. Default is IPV4.", +"enum": [ +"IP_VERSION_UNSPECIFIED", +"IPV4", +"IPV6" +], +"enumDescriptions": [ +"The type when IP version is not specified. Defaults to IPV4.", +"The type for IP version 4.", +"The type for IP version 6." +], +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the Gateway resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the Gateway resource. It matches pattern `projects/*/locations/*/gateways/`.", +"type": "string" +}, +"network": { +"description": "Optional. The relative resource name identifying the VPC network that is using this configuration. For example: `projects/*/global/networks/network-1`. Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY'.", +"type": "string" +}, +"ports": { +"description": "Required. One or more port numbers (1-65535), on which the Gateway will receive traffic. The proxy binds to the specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are limited to 1 port. Gateways of type 'OPEN_MESH' listen on 0.0.0.0 for IPv4 and :: for IPv6 and support multiple ports.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"scope": { +"description": "Optional. Scope determines how configuration across multiple Gateway instances are merged. The configuration for multiple Gateway instances with the same scope will be merged as presented as a single coniguration to the proxy/load balancer. Max length 64 characters. Scope should start with a letter and can only have letters, numbers, hyphens.", +"type": "string" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"serverTlsPolicy": { +"description": "Optional. A fully-qualified ServerTLSPolicy URL reference. Specifies how TLS traffic is terminated. If empty, TLS termination is disabled.", +"type": "string" +}, +"subnetwork": { +"description": "Optional. The relative resource name identifying the subnetwork in which this SWG is allocated. For example: `projects/*/regions/us-central1/subnetworks/network-1` Currently, this field is specific to gateways of type 'SECURE_WEB_GATEWAY\".", +"type": "string" +}, +"type": { +"description": "Immutable. The type of the customer managed gateway. This field is required. If unspecified, an error is returned.", +"enum": [ +"TYPE_UNSPECIFIED", +"OPEN_MESH", +"SECURE_WEB_GATEWAY" +], +"enumDescriptions": [ +"The type of the customer managed gateway is unspecified.", +"The type of the customer managed gateway is TrafficDirector Open Mesh.", +"The type of the customer managed gateway is SecureWebGateway (SWG)." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GrpcRoute": { +"description": "GrpcRoute is the resource defining how gRPC traffic routed by a Mesh or Gateway resource is routed.", +"id": "GrpcRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this GrpcRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"hostnames": { +"description": "Required. Service hostnames with an optional port for which this route describes traffic. Format: [:] Hostname is the fully qualified domain name of a network host. This matches the RFC 1123 definition of a hostname with 2 notable exceptions: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateway must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same route, it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`. If a port is specified, then gRPC clients must use the channel URI with the port to match this rule (i.e. \"xds:///service:123\"), otherwise they must supply the URI without a port (i.e. \"xds:///service\").", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the GrpcRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this GrpcRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the GrpcRoute resource. It matches pattern `projects/*/locations/global/grpcRoutes/`", +"type": "string" +}, +"rules": { +"description": "Required. A list of detailed rules defining how to route traffic. Within a single GrpcRoute, the GrpcRoute.RouteAction associated with the first matching GrpcRoute.RouteRule will be executed. At least one rule must be supplied.", +"items": { +"$ref": "GrpcRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteDestination": { +"description": "The destination to which traffic will be routed.", +"id": "GrpcRouteDestination", +"properties": { +"serviceName": { +"description": "Required. The URL of a destination service to which to route traffic. Must refer to either a BackendService or ServiceDirectoryService.", +"type": "string" +}, +"weight": { +"description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GrpcRouteFaultInjectionPolicy": { +"description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests.", +"id": "GrpcRouteFaultInjectionPolicy", +"properties": { +"abort": { +"$ref": "GrpcRouteFaultInjectionPolicyAbort", +"description": "The specification for aborting to client requests." +}, +"delay": { +"$ref": "GrpcRouteFaultInjectionPolicyDelay", +"description": "The specification for injecting delay to client requests." +} +}, +"type": "object" +}, +"GrpcRouteFaultInjectionPolicyAbort": { +"description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", +"id": "GrpcRouteFaultInjectionPolicyAbort", +"properties": { +"httpStatus": { +"description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", +"format": "int32", +"type": "integer" +}, +"percentage": { +"description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GrpcRouteFaultInjectionPolicyDelay": { +"description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", +"id": "GrpcRouteFaultInjectionPolicyDelay", +"properties": { +"fixedDelay": { +"description": "Specify a fixed delay before forwarding the request.", +"format": "google-duration", +"type": "string" +}, +"percentage": { +"description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GrpcRouteHeaderMatch": { +"description": "A match against a collection of headers.", +"id": "GrpcRouteHeaderMatch", +"properties": { +"key": { +"description": "Required. The key of the header.", +"type": "string" +}, +"type": { +"description": "Optional. Specifies how to match against the value of the header. If not specified, a default value of EXACT is used.", +"enum": [ +"TYPE_UNSPECIFIED", +"EXACT", +"REGULAR_EXPRESSION" +], +"enumDescriptions": [ +"Unspecified.", +"Will only match the exact value provided.", +"Will match paths conforming to the prefix specified by value. RE2 syntax is supported." +], +"type": "string" +}, +"value": { +"description": "Required. The value of the header.", +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteMethodMatch": { +"description": "Specifies a match against a method.", +"id": "GrpcRouteMethodMatch", +"properties": { +"caseSensitive": { +"description": "Optional. Specifies that matches are case sensitive. The default value is true. case_sensitive must not be used with a type of REGULAR_EXPRESSION.", +"type": "boolean" +}, +"grpcMethod": { +"description": "Required. Name of the method to match against. If unspecified, will match all methods.", +"type": "string" +}, +"grpcService": { +"description": "Required. Name of the service to match against. If unspecified, will match all services.", +"type": "string" +}, +"type": { +"description": "Optional. Specifies how to match against the name. If not specified, a default value of \"EXACT\" is used.", +"enum": [ +"TYPE_UNSPECIFIED", +"EXACT", +"REGULAR_EXPRESSION" +], +"enumDescriptions": [ +"Unspecified.", +"Will only match the exact name provided.", +"Will interpret grpc_method and grpc_service as regexes. RE2 syntax is supported." +], +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteRetryPolicy": { +"description": "The specifications for retries.", +"id": "GrpcRouteRetryPolicy", +"properties": { +"numRetries": { +"description": "Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.", +"format": "uint32", +"type": "integer" +}, +"retryConditions": { +"description": "- connect-failure: Router will retry on failures connecting to Backend Services, for example due to connection timeouts. - refused-stream: Router will retry if the backend service resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry. - cancelled: Router will retry if the gRPC status code in the response header is set to cancelled - deadline-exceeded: Router will retry if the gRPC status code in the response header is set to deadline-exceeded - resource-exhausted: Router will retry if the gRPC status code in the response header is set to resource-exhausted - unavailable: Router will retry if the gRPC status code in the response header is set to unavailable", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GrpcRouteRouteAction": { +"description": "Specifies how to route matched traffic.", +"id": "GrpcRouteRouteAction", +"properties": { +"destinations": { +"description": "Optional. The destination services to which traffic should be forwarded. If multiple destinations are specified, traffic will be split between Backend Service(s) according to the weight field of these destinations.", +"items": { +"$ref": "GrpcRouteDestination" +}, +"type": "array" +}, +"faultInjectionPolicy": { +"$ref": "GrpcRouteFaultInjectionPolicy", +"description": "Optional. The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced on a percentage of requests before sending those requests to the destination service. Similarly requests from clients can be aborted by for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +}, +"retryPolicy": { +"$ref": "GrpcRouteRetryPolicy", +"description": "Optional. Specifies the retry policy associated with this route." +}, +"statefulSessionAffinity": { +"$ref": "GrpcRouteStatefulSessionAffinityPolicy", +"description": "Optional. Specifies cookie-based stateful session affinity." +}, +"timeout": { +"description": "Optional. Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GrpcRouteRouteMatch": { +"description": "Criteria for matching traffic. A RouteMatch will be considered to match when all supplied fields match.", +"id": "GrpcRouteRouteMatch", +"properties": { +"headers": { +"description": "Optional. Specifies a collection of headers to match.", +"items": { +"$ref": "GrpcRouteHeaderMatch" +}, +"type": "array" +}, +"method": { +"$ref": "GrpcRouteMethodMatch", +"description": "Optional. A gRPC method to match against. If this field is empty or omitted, will match all methods." +} +}, +"type": "object" +}, +"GrpcRouteRouteRule": { +"description": "Describes how to route traffic.", +"id": "GrpcRouteRouteRule", +"properties": { +"action": { +"$ref": "GrpcRouteRouteAction", +"description": "Required. A detailed rule defining how to route traffic. This field is required." +}, +"matches": { +"description": "Optional. Matches define conditions used for matching the rule against incoming gRPC requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic.", +"items": { +"$ref": "GrpcRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"GrpcRouteStatefulSessionAffinityPolicy": { +"description": "The specification for cookie-based stateful session affinity where the date plane supplies a \u201csession cookie\u201d with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", +"id": "GrpcRouteStatefulSessionAffinityPolicy", +"properties": { +"cookieTtl": { +"description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"HttpRoute": { +"description": "HttpRoute is the resource defining how HTTP traffic should be routed by a Mesh or Gateway resource.", +"id": "HttpRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this HttpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"hostnames": { +"description": "Required. Hostnames define a set of hosts that should match against the HTTP host header to select a HttpRoute to process the request. Hostname is the fully qualified domain name of a network host, as defined by RFC 1123 with the exception that: - IPs are not allowed. - A hostname may be prefixed with a wildcard label (`*.`). The wildcard label must appear by itself as the first label. Hostname can be \"precise\" which is a domain name without the terminating dot of a network host (e.g. `foo.example.com`) or \"wildcard\", which is a domain name prefixed with a single wildcard label (e.g. `*.example.com`). Note that as per RFC1035 and RFC1123, a label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character. No other punctuation is allowed. The routes associated with a Mesh or Gateways must have unique hostnames. If you attempt to attach multiple routes with conflicting hostnames, the configuration will be rejected. For example, while it is acceptable for routes for the hostnames `*.foo.bar.com` and `*.bar.com` to be associated with the same Mesh (or Gateways under the same scope), it is not possible to associate two routes both with `*.bar.com` or both with `bar.com`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the HttpRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this HttpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the HttpRoute resource. It matches pattern `projects/*/locations/global/httpRoutes/http_route_name>`.", +"type": "string" +}, +"rules": { +"description": "Required. Rules that define how traffic is routed and handled. Rules will be matched sequentially based on the RouteMatch specified for the rule.", +"items": { +"$ref": "HttpRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteCorsPolicy": { +"description": "The Specification for allowing client side cross-origin requests.", +"id": "HttpRouteCorsPolicy", +"properties": { +"allowCredentials": { +"description": "In response to a preflight request, setting this to true indicates that the actual request can include user credentials. This translates to the Access-Control-Allow-Credentials header. Default value is false.", +"type": "boolean" +}, +"allowHeaders": { +"description": "Specifies the content for Access-Control-Allow-Headers header.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowMethods": { +"description": "Specifies the content for Access-Control-Allow-Methods header.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowOriginRegexes": { +"description": "Specifies the regular expression patterns that match allowed origins. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowOrigins": { +"description": "Specifies the list of origins that will be allowed to do CORS requests. An origin is allowed if it matches either an item in allow_origins or an item in allow_origin_regexes.", +"items": { +"type": "string" +}, +"type": "array" +}, +"disabled": { +"description": "If true, the CORS policy is disabled. The default value is false, which indicates that the CORS policy is in effect.", +"type": "boolean" +}, +"exposeHeaders": { +"description": "Specifies the content for Access-Control-Expose-Headers header.", +"items": { +"type": "string" +}, +"type": "array" +}, +"maxAge": { +"description": "Specifies how long result of a preflight request can be cached in seconds. This translates to the Access-Control-Max-Age header.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteDestination": { +"description": "Specifications of a destination to which the request should be routed to.", +"id": "HttpRouteDestination", +"properties": { +"requestHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "Optional. The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"responseHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "Optional. The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"serviceName": { +"description": "The URL of a BackendService to route traffic to.", +"type": "string" +}, +"weight": { +"description": "Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteFaultInjectionPolicy": { +"description": "The specification for fault injection introduced into traffic to test the resiliency of clients to destination service failure. As part of fault injection, when clients send requests to a destination, delays can be introduced by client proxy on a percentage of requests before sending those requests to the destination service. Similarly requests can be aborted by client proxy for a percentage of requests.", +"id": "HttpRouteFaultInjectionPolicy", +"properties": { +"abort": { +"$ref": "HttpRouteFaultInjectionPolicyAbort", +"description": "The specification for aborting to client requests." +}, +"delay": { +"$ref": "HttpRouteFaultInjectionPolicyDelay", +"description": "The specification for injecting delay to client requests." +} +}, +"type": "object" +}, +"HttpRouteFaultInjectionPolicyAbort": { +"description": "Specification of how client requests are aborted as part of fault injection before being sent to a destination.", +"id": "HttpRouteFaultInjectionPolicyAbort", +"properties": { +"httpStatus": { +"description": "The HTTP status code used to abort the request. The value must be between 200 and 599 inclusive.", +"format": "int32", +"type": "integer" +}, +"percentage": { +"description": "The percentage of traffic which will be aborted. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteFaultInjectionPolicyDelay": { +"description": "Specification of how client requests are delayed as part of fault injection before being sent to a destination.", +"id": "HttpRouteFaultInjectionPolicyDelay", +"properties": { +"fixedDelay": { +"description": "Specify a fixed delay before forwarding the request.", +"format": "google-duration", +"type": "string" +}, +"percentage": { +"description": "The percentage of traffic on which delay will be injected. The value must be between [0, 100]", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteHeaderMatch": { +"description": "Specifies how to select a route rule based on HTTP request headers.", +"id": "HttpRouteHeaderMatch", +"properties": { +"exactMatch": { +"description": "The value of the header should match exactly the content of exact_match.", +"type": "string" +}, +"header": { +"description": "The name of the HTTP header to match against.", +"type": "string" +}, +"invertMatch": { +"description": "If specified, the match result will be inverted before checking. Default value is set to false.", +"type": "boolean" +}, +"prefixMatch": { +"description": "The value of the header must start with the contents of prefix_match.", +"type": "string" +}, +"presentMatch": { +"description": "A header with header_name must exist. The match takes place whether or not the header has a value.", +"type": "boolean" +}, +"rangeMatch": { +"$ref": "HttpRouteHeaderMatchIntegerRange", +"description": "If specified, the rule will match if the request header value is within the range." +}, +"regexMatch": { +"description": "The value of the header must match the regular expression specified in regex_match. For regular expression grammar, please see: https://github.com/google/re2/wiki/Syntax", +"type": "string" +}, +"suffixMatch": { +"description": "The value of the header must end with the contents of suffix_match.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteHeaderMatchIntegerRange": { +"description": "Represents an integer value range.", +"id": "HttpRouteHeaderMatchIntegerRange", +"properties": { +"end": { +"description": "End of the range (exclusive)", +"format": "int32", +"type": "integer" +}, +"start": { +"description": "Start of the range (inclusive)", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpRouteHeaderModifier": { +"description": "The specification for modifying HTTP header in HTTP request and HTTP response.", +"id": "HttpRouteHeaderModifier", +"properties": { +"add": { +"additionalProperties": { +"type": "string" +}, +"description": "Add the headers with given map where key is the name of the header, value is the value of the header.", +"type": "object" +}, +"remove": { +"description": "Remove headers (matching by header names) specified in the list.", +"items": { +"type": "string" +}, +"type": "array" +}, +"set": { +"additionalProperties": { +"type": "string" +}, +"description": "Completely overwrite/replace the headers with given map where key is the name of the header, value is the value of the header.", +"type": "object" +} +}, +"type": "object" +}, +"HttpRouteHttpDirectResponse": { +"description": "Static HTTP response object to be returned.", +"id": "HttpRouteHttpDirectResponse", +"properties": { +"bytesBody": { +"description": "Optional. Response body as bytes. Maximum body size is 4096B.", +"format": "byte", +"type": "string" +}, +"status": { +"description": "Required. Status to return as part of HTTP Response. Must be a positive integer.", +"format": "int32", +"type": "integer" +}, +"stringBody": { +"description": "Optional. Response body as a string. Maximum body length is 1024 characters.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteQueryParameterMatch": { +"description": "Specifications to match a query parameter in the request.", +"id": "HttpRouteQueryParameterMatch", +"properties": { +"exactMatch": { +"description": "The value of the query parameter must exactly match the contents of exact_match. Only one of exact_match, regex_match, or present_match must be set.", +"type": "string" +}, +"presentMatch": { +"description": "Specifies that the QueryParameterMatcher matches if request contains query parameter, irrespective of whether the parameter has a value or not. Only one of exact_match, regex_match, or present_match must be set.", +"type": "boolean" +}, +"queryParameter": { +"description": "The name of the query parameter to match.", +"type": "string" +}, +"regexMatch": { +"description": "The value of the query parameter must match the regular expression specified by regex_match. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of exact_match, regex_match, or present_match must be set.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteRedirect": { +"description": "The specification for redirecting traffic.", +"id": "HttpRouteRedirect", +"properties": { +"hostRedirect": { +"description": "The host that will be used in the redirect response instead of the one that was supplied in the request.", +"type": "string" +}, +"httpsRedirect": { +"description": "If set to true, the URL scheme in the redirected request is set to https. If set to false, the URL scheme of the redirected request will remain the same as that of the request. The default is set to false.", +"type": "boolean" +}, +"pathRedirect": { +"description": "The path that will be used in the redirect response instead of the one that was supplied in the request. path_redirect can not be supplied together with prefix_redirect. Supply one alone or neither. If neither is supplied, the path of the original request will be used for the redirect.", +"type": "string" +}, +"portRedirect": { +"description": "The port that will be used in the redirected request instead of the one that was supplied in the request.", +"format": "int32", +"type": "integer" +}, +"prefixRewrite": { +"description": "Indicates that during redirection, the matched prefix (or path) should be swapped with this value. This option allows URLs be dynamically created based on the request.", +"type": "string" +}, +"responseCode": { +"description": "The HTTP Status code to use for the redirect.", +"enum": [ +"RESPONSE_CODE_UNSPECIFIED", +"MOVED_PERMANENTLY_DEFAULT", +"FOUND", +"SEE_OTHER", +"TEMPORARY_REDIRECT", +"PERMANENT_REDIRECT" +], +"enumDescriptions": [ +"Default value", +"Corresponds to 301.", +"Corresponds to 302.", +"Corresponds to 303.", +"Corresponds to 307. In this case, the request method will be retained.", +"Corresponds to 308. In this case, the request method will be retained." +], +"type": "string" +}, +"stripQuery": { +"description": "if set to true, any accompanying query portion of the original URL is removed prior to redirecting the request. If set to false, the query portion of the original URL is retained. The default is set to false.", +"type": "boolean" +} +}, +"type": "object" +}, +"HttpRouteRequestMirrorPolicy": { +"description": "Specifies the policy on how requests are shadowed to a separate mirrored destination service. The proxy does not wait for responses from the shadow service. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow.", +"id": "HttpRouteRequestMirrorPolicy", +"properties": { +"destination": { +"$ref": "HttpRouteDestination", +"description": "The destination the requests will be mirrored to. The weight of the destination will be ignored." +}, +"mirrorPercent": { +"description": "Optional. The percentage of requests to get mirrored to the desired destination.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"HttpRouteRetryPolicy": { +"description": "The specifications for retries.", +"id": "HttpRouteRetryPolicy", +"properties": { +"numRetries": { +"description": "Specifies the allowed number of retries. This number must be > 0. If not specified, default to 1.", +"format": "int32", +"type": "integer" +}, +"perTryTimeout": { +"description": "Specifies a non-zero timeout per retry attempt.", +"format": "google-duration", +"type": "string" +}, +"retryConditions": { +"description": "Specifies one or more conditions when this retry policy applies. Valid values are: 5xx: Proxy will attempt a retry if the destination service responds with any 5xx response code, of if the destination service does not respond at all, example: disconnect, reset, read timeout, connection failure and refused streams. gateway-error: Similar to 5xx, but only applies to response codes 502, 503, 504. reset: Proxy will attempt a retry if the destination service does not respond at all (disconnect/reset/read timeout) connect-failure: Proxy will retry on failures connecting to destination for example due to connection timeouts. retriable-4xx: Proxy will retry fro retriable 4xx response codes. Currently the only retriable error supported is 409. refused-stream: Proxy will retry if the destination resets the stream with a REFUSED_STREAM error code. This reset type indicates that it is safe to retry.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRouteRouteAction": { +"description": "The specifications for routing traffic and applying associated policies.", +"id": "HttpRouteRouteAction", +"properties": { +"corsPolicy": { +"$ref": "HttpRouteCorsPolicy", +"description": "The specification for allowing client side cross-origin requests." +}, +"destinations": { +"description": "The destination to which traffic should be forwarded.", +"items": { +"$ref": "HttpRouteDestination" +}, +"type": "array" +}, +"directResponse": { +"$ref": "HttpRouteHttpDirectResponse", +"description": "Optional. Static HTTP Response object to be returned regardless of the request." +}, +"faultInjectionPolicy": { +"$ref": "HttpRouteFaultInjectionPolicy", +"description": "The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure. As part of fault injection, when clients send requests to a backend service, delays can be introduced on a percentage of requests before sending those requests to the backend service. Similarly requests from clients can be aborted for a percentage of requests. timeout and retry_policy will be ignored by clients that are configured with a fault_injection_policy" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +}, +"redirect": { +"$ref": "HttpRouteRedirect", +"description": "If set, the request is directed as configured by this field." +}, +"requestHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "The specification for modifying the headers of a matching request prior to delivery of the request to the destination. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"requestMirrorPolicy": { +"$ref": "HttpRouteRequestMirrorPolicy", +"description": "Specifies the policy on how requests intended for the routes destination are shadowed to a separate mirrored destination. Proxy will not wait for the shadow destination to respond before returning the response. Prior to sending traffic to the shadow service, the host/authority header is suffixed with -shadow." +}, +"responseHeaderModifier": { +"$ref": "HttpRouteHeaderModifier", +"description": "The specification for modifying the headers of a response prior to sending the response back to the client. If HeaderModifiers are set on both the Destination and the RouteAction, they will be merged. Conflicts between the two will not be resolved on the configuration." +}, +"retryPolicy": { +"$ref": "HttpRouteRetryPolicy", +"description": "Specifies the retry policy associated with this route." +}, +"statefulSessionAffinity": { +"$ref": "HttpRouteStatefulSessionAffinityPolicy", +"description": "Optional. Specifies cookie-based stateful session affinity." +}, +"timeout": { +"description": "Specifies the timeout for selected route. Timeout is computed from the time the request has been fully processed (i.e. end of stream) up until the response has been completely processed. Timeout includes all retries.", +"format": "google-duration", +"type": "string" +}, +"urlRewrite": { +"$ref": "HttpRouteURLRewrite", +"description": "The specification for rewrite URL before forwarding requests to the destination." +} +}, +"type": "object" +}, +"HttpRouteRouteMatch": { +"description": "RouteMatch defines specifications used to match requests. If multiple match types are set, this RouteMatch will match if ALL type of matches are matched.", +"id": "HttpRouteRouteMatch", +"properties": { +"fullPathMatch": { +"description": "The HTTP request path value should exactly match this value. Only one of full_path_match, prefix_match, or regex_match should be used.", +"type": "string" +}, +"headers": { +"description": "Specifies a list of HTTP request headers to match against. ALL of the supplied headers must be matched.", +"items": { +"$ref": "HttpRouteHeaderMatch" +}, +"type": "array" +}, +"ignoreCase": { +"description": "Specifies if prefix_match and full_path_match matches are case sensitive. The default value is false.", +"type": "boolean" +}, +"prefixMatch": { +"description": "The HTTP request path value must begin with specified prefix_match. prefix_match must begin with a /. Only one of full_path_match, prefix_match, or regex_match should be used.", +"type": "string" +}, +"queryParameters": { +"description": "Specifies a list of query parameters to match against. ALL of the query parameters must be matched.", +"items": { +"$ref": "HttpRouteQueryParameterMatch" +}, +"type": "array" +}, +"regexMatch": { +"description": "The HTTP request path value must satisfy the regular expression specified by regex_match after removing any query parameters and anchor supplied with the original URL. For regular expression grammar, please see https://github.com/google/re2/wiki/Syntax Only one of full_path_match, prefix_match, or regex_match should be used.", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteRouteRule": { +"description": "Specifies how to match traffic and how to route traffic when traffic is matched.", +"id": "HttpRouteRouteRule", +"properties": { +"action": { +"$ref": "HttpRouteRouteAction", +"description": "The detailed rule defining how to route matched traffic." +}, +"matches": { +"description": "A list of matches define conditions used for matching the rule against incoming HTTP requests. Each match is independent, i.e. this rule will be matched if ANY one of the matches is satisfied. If no matches field is specified, this rule will unconditionally match traffic. If a default rule is desired to be configured, add a rule with no matches specified to the end of the rules list.", +"items": { +"$ref": "HttpRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRouteStatefulSessionAffinityPolicy": { +"description": "The specification for cookie-based stateful session affinity where the date plane supplies a \u201csession cookie\u201d with the name \"GSSA\" which encodes a specific destination host and each request containing that cookie will be directed to that host as long as the destination host remains up and healthy. The gRPC proxyless mesh library or sidecar proxy will manage the session cookie but the client application code is responsible for copying the cookie from each RPC in the session to the next.", +"id": "HttpRouteStatefulSessionAffinityPolicy", +"properties": { +"cookieTtl": { +"description": "Required. The cookie TTL value for the Set-Cookie header generated by the data plane. The lifetime of the cookie may be set to a value from 1 to 86400 seconds (24 hours) inclusive.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"HttpRouteURLRewrite": { +"description": "The specification for modifying the URL of the request, prior to forwarding the request to the destination.", +"id": "HttpRouteURLRewrite", +"properties": { +"hostRewrite": { +"description": "Prior to forwarding the request to the selected destination, the requests host header is replaced by this value.", +"type": "string" +}, +"pathPrefixRewrite": { +"description": "Prior to forwarding the request to the selected destination, the matching portion of the requests path is replaced by this value.", +"type": "string" +} +}, +"type": "object" +}, +"LbRouteExtension": { +"description": "`LbRouteExtension` is a resource that lets you control where traffic is routed to for a given request.", +"id": "LbRouteExtension", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A human-readable description of the resource.", +"type": "string" +}, +"extensionChains": { +"description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", +"items": { +"$ref": "ExtensionChain" +}, +"type": "array" +}, +"forwardingRules": { +"description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LbRouteExtension` resource per forwarding rule.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of labels associated with the `LbRouteExtension` resource. The format must comply with [the requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", +"type": "object" +}, +"loadBalancingScheme": { +"description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", +"enum": [ +"LOAD_BALANCING_SCHEME_UNSPECIFIED", +"INTERNAL_MANAGED", +"EXTERNAL_MANAGED" +], +"enumDescriptions": [ +"Default value. Do not use.", +"Signifies that this is used for Internal HTTP(S) Load Balancing.", +"Signifies that this is used for External Managed HTTP(S) Load Balancing." +], +"type": "string" +}, +"name": { +"description": "Required. Identifier. Name of the `LbRouteExtension` resource in the following format: `projects/{project}/locations/{location}/lbRouteExtensions/{lb_route_extension}`.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"LbTrafficExtension": { +"description": "`LbTrafficExtension` is a resource that lets the extension service modify the headers and payloads of both requests and responses without impacting the choice of backend services or any other security policies associated with the backend service.", +"id": "LbTrafficExtension", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A human-readable description of the resource.", +"type": "string" +}, +"extensionChains": { +"description": "Required. A set of ordered extension chains that contain the match conditions and extensions to execute. Match conditions for each extension chain are evaluated in sequence for a given request. The first extension chain that has a condition that matches the request is executed. Any subsequent extension chains do not execute. Limited to 5 extension chains per resource.", +"items": { +"$ref": "ExtensionChain" +}, +"type": "array" +}, +"forwardingRules": { +"description": "Required. A list of references to the forwarding rules to which this service extension is attached to. At least one forwarding rule is required. There can be only one `LBTrafficExtension` resource per forwarding rule.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of labels associated with the `LbTrafficExtension` resource. The format must comply with [the requirements for labels](https://cloud.google.com/compute/docs/labeling-resources#requirements) for Google Cloud resources.", +"type": "object" +}, +"loadBalancingScheme": { +"description": "Required. All backend services and forwarding rules referenced by this extension must share the same load balancing scheme. Supported values: `INTERNAL_MANAGED`, `EXTERNAL_MANAGED`. For more information, refer to [Choosing a load balancer](https://cloud.google.com/load-balancing/docs/backend-service).", +"enum": [ +"LOAD_BALANCING_SCHEME_UNSPECIFIED", +"INTERNAL_MANAGED", +"EXTERNAL_MANAGED" +], +"enumDescriptions": [ +"Default value. Do not use.", +"Signifies that this is used for Internal HTTP(S) Load Balancing.", +"Signifies that this is used for External Managed HTTP(S) Load Balancing." +], +"type": "string" +}, +"name": { +"description": "Required. Identifier. Name of the `LbTrafficExtension` resource in the following format: `projects/{project}/locations/{location}/lbTrafficExtensions/{lb_traffic_extension}`.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ListEndpointPoliciesResponse": { +"description": "Response returned by the ListEndpointPolicies method.", +"id": "ListEndpointPoliciesResponse", +"properties": { +"endpointPolicies": { +"description": "List of EndpointPolicy resources.", +"items": { +"$ref": "EndpointPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListGatewaysResponse": { +"description": "Response returned by the ListGateways method.", +"id": "ListGatewaysResponse", +"properties": { +"gateways": { +"description": "List of Gateway resources.", +"items": { +"$ref": "Gateway" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListGrpcRoutesResponse": { +"description": "Response returned by the ListGrpcRoutes method.", +"id": "ListGrpcRoutesResponse", +"properties": { +"grpcRoutes": { +"description": "List of GrpcRoute resources.", +"items": { +"$ref": "GrpcRoute" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListHttpRoutesResponse": { +"description": "Response returned by the ListHttpRoutes method.", +"id": "ListHttpRoutesResponse", +"properties": { +"httpRoutes": { +"description": "List of HttpRoute resources.", +"items": { +"$ref": "HttpRoute" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListLbRouteExtensionsResponse": { +"description": "Message for response to listing `LbRouteExtension` resources.", +"id": "ListLbRouteExtensionsResponse", +"properties": { +"lbRouteExtensions": { +"description": "The list of `LbRouteExtension` resources.", +"items": { +"$ref": "LbRouteExtension" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results that the server returns.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLbTrafficExtensionsResponse": { +"description": "Message for response to listing `LbTrafficExtension` resources.", +"id": "ListLbTrafficExtensionsResponse", +"properties": { +"lbTrafficExtensions": { +"description": "The list of `LbTrafficExtension` resources.", +"items": { +"$ref": "LbTrafficExtension" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results that the server returns.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListMeshesResponse": { +"description": "Response returned by the ListMeshes method.", +"id": "ListMeshesResponse", +"properties": { +"meshes": { +"description": "List of Mesh resources.", +"items": { +"$ref": "Mesh" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceBindingsResponse": { +"description": "Response returned by the ListServiceBindings method.", +"id": "ListServiceBindingsResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"serviceBindings": { +"description": "List of ServiceBinding resources.", +"items": { +"$ref": "ServiceBinding" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceLbPoliciesResponse": { +"description": "Response returned by the ListServiceLbPolicies method.", +"id": "ListServiceLbPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"serviceLbPolicies": { +"description": "List of ServiceLbPolicy resources.", +"items": { +"$ref": "ServiceLbPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTcpRoutesResponse": { +"description": "Response returned by the ListTcpRoutes method.", +"id": "ListTcpRoutesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"tcpRoutes": { +"description": "List of TcpRoute resources.", +"items": { +"$ref": "TcpRoute" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTlsRoutesResponse": { +"description": "Response returned by the ListTlsRoutes method.", +"id": "ListTlsRoutesResponse", +"properties": { +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `next_page_token` is included. To get the next set of results, call this method again using the value of `next_page_token` as `page_token`.", +"type": "string" +}, +"tlsRoutes": { +"description": "List of TlsRoute resources.", +"items": { +"$ref": "TlsRoute" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Mesh": { +"description": "Mesh represents a logical configuration grouping for workload to workload communication within a service mesh. Routes that point to mesh dictate how requests are routed within this logical mesh boundary.", +"id": "Mesh", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"envoyHeaders": { +"description": "Optional. Determines if envoy will insert internal debug headers into upstream requests. Other Envoy headers may still be injected. By default, envoy will not insert any debug headers.", +"enum": [ +"ENVOY_HEADERS_UNSPECIFIED", +"NONE", +"DEBUG_HEADERS" +], +"enumDescriptions": [ +"Defaults to NONE.", +"Suppress envoy debug headers.", +"Envoy will insert default internal debug headers into upstream requests: x-envoy-attempt-count x-envoy-is-timeout-retry x-envoy-expected-rq-timeout-ms x-envoy-original-path x-envoy-upstream-stream-duration-ms" +], +"type": "string" +}, +"interceptionPort": { +"description": "Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to be redirected to this port regardless of its actual ip:port destination. If unset, a port '15001' is used as the interception port. This is applicable only for sidecar proxy deployments.", +"format": "int32", +"type": "integer" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the Mesh resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the Mesh resource. It matches pattern `projects/*/locations/global/meshes/`.", +"type": "string" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"MetadataLabelMatcher": { +"description": "The matcher that is based on node metadata presented by xDS clients.", +"id": "MetadataLabelMatcher", +"properties": { +"metadataLabelMatchCriteria": { +"description": "Specifies how matching should be done. Supported values are: MATCH_ANY: At least one of the Labels specified in the matcher should match the metadata presented by xDS client. MATCH_ALL: The metadata presented by the xDS client should contain all of the labels specified here. The selection is determined based on the best match. For example, suppose there are three EndpointPolicy resources P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL . If a client with label connects, the config from P1 will be selected. If a client with label connects, the config from P2 will be selected. If a client with label connects, the config from P3 will be selected. If there is more than one best match, (for example, if a config P4 with selector exists and if a client with label connects), pick up the one with older creation time.", +"enum": [ +"METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED", +"MATCH_ANY", +"MATCH_ALL" +], +"enumDescriptions": [ +"Default value. Should not be used.", +"At least one of the Labels specified in the matcher should match the metadata presented by xDS client.", +"The metadata presented by the xDS client should contain all of the labels specified here." +], +"type": "string" +}, +"metadataLabels": { +"description": "The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list can have at most 64 entries. The list can be empty if the match criteria is MATCH_ANY, to specify a wildcard match (i.e this matches any client).", +"items": { +"$ref": "MetadataLabels" +}, +"type": "array" +} +}, +"type": "object" +}, +"MetadataLabels": { +"description": "Defines a name-pair value for a single label.", +"id": "MetadataLabels", +"properties": { +"labelName": { +"description": "Required. Label name presented as key in xDS Node Metadata.", +"type": "string" +}, +"labelValue": { +"description": "Required. Label value presented as value corresponding to the above key, in xDS Node Metadata.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ServiceBinding": { +"description": "ServiceBinding is the resource that defines a Service Directory Service to be used in a BackendService resource.", +"id": "ServiceBinding", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the ServiceBinding resource.", +"type": "object" +}, +"name": { +"description": "Required. Name of the ServiceBinding resource. It matches pattern `projects/*/locations/global/serviceBindings/service_binding_name`.", +"type": "string" +}, +"service": { +"description": "Required. The full Service Directory Service name of the format projects/*/locations/*/namespaces/*/services/*", +"type": "string" +}, +"serviceId": { +"description": "Output only. The unique identifier of the Service Directory Service against which the Service Binding resource is validated. This is populated when the Service Binding resource is used in another resource (like Backend Service). This is of the UUID4 format.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServiceLbPolicy": { +"description": "ServiceLbPolicy holds global load balancing and traffic distribution configuration that can be applied to a BackendService.", +"id": "ServiceLbPolicy", +"properties": { +"autoCapacityDrain": { +"$ref": "ServiceLbPolicyAutoCapacityDrain", +"description": "Optional. Configuration to automatically move traffic away for unhealthy IG/NEG for the associated Backend Service." +}, +"createTime": { +"description": "Output only. The timestamp when this resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"failoverConfig": { +"$ref": "ServiceLbPolicyFailoverConfig", +"description": "Optional. Configuration related to health based failover." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the ServiceLbPolicy resource.", +"type": "object" +}, +"loadBalancingAlgorithm": { +"description": "Optional. The type of load balancing algorithm to be used. The default behavior is WATERFALL_BY_REGION.", +"enum": [ +"LOAD_BALANCING_ALGORITHM_UNSPECIFIED", +"SPRAY_TO_WORLD", +"SPRAY_TO_REGION", +"WATERFALL_BY_REGION", +"WATERFALL_BY_ZONE" +], +"enumDescriptions": [ +"The type of the loadbalancing algorithm is unspecified.", +"Balance traffic across all backends across the world proportionally based on capacity.", +"Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions and spread the traffic from each client to all the MIGs/NEGs in a region.", +"Direct traffic to the nearest region with endpoints and capacity before spilling over to other regions. All MIGs/NEGs within a region are evenly loaded but each client might not spread the traffic to all the MIGs/NEGs in the region.", +"Attempt to keep traffic in a single zone closest to the client, before spilling over to other zones." +], +"type": "string" +}, +"name": { +"description": "Required. Name of the ServiceLbPolicy resource. It matches pattern `projects/{project}/locations/{location}/serviceLbPolicies/{service_lb_policy_name}`.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when this resource was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ServiceLbPolicyAutoCapacityDrain": { +"description": "Option to specify if an unhealthy IG/NEG should be considered for global load balancing and traffic routing.", +"id": "ServiceLbPolicyAutoCapacityDrain", +"properties": { +"enable": { +"description": "Optional. If set to 'True', an unhealthy IG/NEG will be set as drained. - An IG/NEG is considered unhealthy if less than 25% of the instances/endpoints in the IG/NEG are healthy. - This option will never result in draining more than 50% of the configured IGs/NEGs for the Backend Service.", +"type": "boolean" +} +}, +"type": "object" +}, +"ServiceLbPolicyFailoverConfig": { +"description": "Option to specify health based failover behavior. This is not related to Network load balancer FailoverPolicy.", +"id": "ServiceLbPolicyFailoverConfig", +"properties": { +"failoverHealthThreshold": { +"description": "Optional. The percentage threshold that a load balancer will begin to send traffic to failover backends. If the percentage of endpoints in a MIG/NEG is smaller than this value, traffic would be sent to failover backends if possible. This field should be set to a value between 1 and 99. The default value is 50 for Global external HTTP(S) load balancer (classic) and Proxyless service mesh, and 70 for others.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TcpRoute": { +"description": "TcpRoute is the resource defining how TCP traffic should be routed by a Mesh/Gateway resource.", +"id": "TcpRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this TcpRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the TcpRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this TcpRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the TcpRoute resource. It matches pattern `projects/*/locations/global/tcpRoutes/tcp_route_name>`.", +"type": "string" +}, +"rules": { +"description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", +"items": { +"$ref": "TcpRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"TcpRouteRouteAction": { +"description": "The specifications for routing traffic and applying associated policies.", +"id": "TcpRouteRouteAction", +"properties": { +"destinations": { +"description": "Optional. The destination services to which traffic should be forwarded. At least one destination service is required. Only one of route destination or original destination can be set.", +"items": { +"$ref": "TcpRouteRouteDestination" +}, +"type": "array" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 30 seconds. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +}, +"originalDestination": { +"description": "Optional. If true, Router will use the destination IP and port of the original connection as the destination of the request. Default is false. Only one of route destinations or original destination can be set.", +"type": "boolean" +} +}, +"type": "object" +}, +"TcpRouteRouteDestination": { +"description": "Describe the destination for traffic to be routed to.", +"id": "TcpRouteRouteDestination", +"properties": { +"serviceName": { +"description": "Required. The URL of a BackendService to route traffic to.", +"type": "string" +}, +"weight": { +"description": "Optional. Specifies the proportion of requests forwarded to the backend referenced by the serviceName field. This is computed as: - weight/Sum(weights in this destination list). For non-zero values, there may be some epsilon from the exact proportion defined here depending on the precision an implementation supports. If only one serviceName is specified and it has a weight greater than 0, 100% of the traffic is forwarded to that backend. If weights are specified for any one service name, they need to be specified for all of them. If weights are unspecified for all services, then, traffic is distributed in equal proportions to all of them.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TcpRouteRouteMatch": { +"description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", +"id": "TcpRouteRouteMatch", +"properties": { +"address": { +"description": "Required. Must be specified in the CIDR range format. A CIDR range consists of an IP Address and a prefix length to construct the subnet mask. By default, the prefix length is 32 (i.e. matches a single IP address). Only IPV4 addresses are supported. Examples: \"10.0.0.1\" - matches against this exact IP address. \"10.0.0.0/8\" - matches against any IP address within the 10.0.0.0 subnet and 255.255.255.0 mask. \"0.0.0.0/0\" - matches against any IP address'.", +"type": "string" +}, +"port": { +"description": "Required. Specifies the destination port to match against.", +"type": "string" +} +}, +"type": "object" +}, +"TcpRouteRouteRule": { +"description": "Specifies how to match traffic and how to route traffic when traffic is matched.", +"id": "TcpRouteRouteRule", +"properties": { +"action": { +"$ref": "TcpRouteRouteAction", +"description": "Required. The detailed rule defining how to route matched traffic." +}, +"matches": { +"description": "Optional. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", +"items": { +"$ref": "TcpRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TlsRoute": { +"description": "TlsRoute defines how traffic should be routed based on SNI and other matching L3 attributes.", +"id": "TlsRoute", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the resource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A free-text description of the resource. Max length 1024 characters.", +"type": "string" +}, +"gateways": { +"description": "Optional. Gateways defines a list of gateways this TlsRoute is attached to, as one of the routing rules to route the requests served by the gateway. Each gateway reference should match the pattern: `projects/*/locations/global/gateways/`", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Set of label tags associated with the TlsRoute resource.", +"type": "object" +}, +"meshes": { +"description": "Optional. Meshes defines a list of meshes this TlsRoute is attached to, as one of the routing rules to route the requests served by the mesh. Each mesh reference should match the pattern: `projects/*/locations/global/meshes/` The attached Mesh should be of a type SIDECAR", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Required. Name of the TlsRoute resource. It matches pattern `projects/*/locations/global/tlsRoutes/tls_route_name>`.", +"type": "string" +}, +"rules": { +"description": "Required. Rules that define how traffic is routed and handled. At least one RouteRule must be supplied. If there are multiple rules then the action taken will be the first rule to match.", +"items": { +"$ref": "TlsRouteRouteRule" +}, +"type": "array" +}, +"selfLink": { +"description": "Output only. Server-defined URL of this resource", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"TlsRouteRouteAction": { +"description": "The specifications for routing traffic and applying associated policies.", +"id": "TlsRouteRouteAction", +"properties": { +"destinations": { +"description": "Required. The destination services to which traffic should be forwarded. At least one destination service is required.", +"items": { +"$ref": "TlsRouteRouteDestination" +}, +"type": "array" +}, +"idleTimeout": { +"description": "Optional. Specifies the idle timeout for the selected route. The idle timeout is defined as the period in which there are no bytes sent or received on either the upstream or downstream connection. If not set, the default idle timeout is 1 hour. If set to 0s, the timeout will be disabled.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"TlsRouteRouteDestination": { +"description": "Describe the destination for traffic to be routed to.", +"id": "TlsRouteRouteDestination", +"properties": { +"serviceName": { +"description": "Required. The URL of a BackendService to route traffic to.", +"type": "string" +}, +"weight": { +"description": "Optional. Specifies the proportion of requests forwareded to the backend referenced by the service_name field. This is computed as: - weight/Sum(weights in destinations) Weights in all destinations does not need to sum up to 100.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TlsRouteRouteMatch": { +"description": "RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"AND\"ed for evaluation. If no routeMatch field is specified, this rule will unconditionally match traffic.", +"id": "TlsRouteRouteMatch", +"properties": { +"alpn": { +"description": "Optional. ALPN (Application-Layer Protocol Negotiation) to match against. Examples: \"http/1.1\", \"h2\". At least one of sni_host and alpn is required. Up to 5 alpns across all matches can be set.", +"items": { +"type": "string" +}, +"type": "array" +}, +"sniHost": { +"description": "Optional. SNI (server name indicator) to match against. SNI will be matched against all wildcard domains, i.e. `www.example.com` will be first matched against `www.example.com`, then `*.example.com`, then `*.com.` Partial wildcards are not supported, and values like *w.example.com are invalid. At least one of sni_host and alpn is required. Up to 100 sni hosts across all matches can be set.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TlsRouteRouteRule": { +"description": "Specifies how to match traffic and how to route traffic when traffic is matched.", +"id": "TlsRouteRouteRule", +"properties": { +"action": { +"$ref": "TlsRouteRouteAction", +"description": "Required. The detailed rule defining how to route matched traffic." +}, +"matches": { +"description": "Required. RouteMatch defines the predicate used to match requests to a given action. Multiple match types are \"OR\"ed for evaluation.", +"items": { +"$ref": "TlsRouteRouteMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"TrafficPortSelector": { +"description": "Specification of a port-based selector.", +"id": "TrafficPortSelector", +"properties": { +"ports": { +"description": "Optional. A list of ports. Can be port numbers or port range (example, [80-90] specifies all ports from 80 to 90, including 80 and 90) or named ports or * to specify all ports. If the list is empty, all ports are selected.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Network Services API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/notebooks.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/notebooks.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..d6939d17e782c3016c878212aec67e1df481e2ca --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/notebooks.v1.json @@ -0,0 +1,4594 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://notebooks.googleapis.com/", +"batchPath": "batch", +"canonicalName": "AI Platform Notebooks", +"description": "Notebooks API is used to manage notebook resources in Google Cloud.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/notebooks/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "notebooks:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://notebooks.mtls.googleapis.com/", +"name": "notebooks", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "notebooks.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"environments": { +"methods": { +"create": { +"description": "Creates a new Environment.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/environments", +"httpMethod": "POST", +"id": "notebooks.projects.locations.environments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"environmentId": { +"description": "Required. User-defined unique ID of this environment. The `environment_id` must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/environments", +"request": { +"$ref": "Environment" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Environment.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.environments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/environments/{environment_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Environment.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.environments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/environments/{environment_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/environments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists environments in a project.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/environments", +"httpMethod": "GET", +"id": "notebooks.projects.locations.environments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum return size of the list call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previous returned page token that can be used to continue listing from the last result.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/environments", +"response": { +"$ref": "ListEnvironmentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"executions": { +"methods": { +"create": { +"description": "Creates a new Execution in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/executions", +"httpMethod": "POST", +"id": "notebooks.projects.locations.executions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"executionId": { +"description": "Required. User-defined unique ID of this execution.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/executions", +"request": { +"$ref": "Execution" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes execution", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/executions/{executionsId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.executions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/executions/{execution_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of executions", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/executions/{executionsId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.executions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/executions/{execution_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists executions in a given project and location", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/executions", +"httpMethod": "GET", +"id": "notebooks.projects.locations.executions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter applied to resulting executions. Currently only supports filtering executions by a specified `schedule_id`. Format: `schedule_id=`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort by field.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum return size of the list call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previous returned page token that can be used to continue listing from the last result.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/executions", +"response": { +"$ref": "ListExecutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"instances": { +"methods": { +"create": { +"description": "Creates a new Instance in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"instanceId": { +"description": "Required. User-defined unique ID of this instance.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instances", +"request": { +"$ref": "Instance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.instances.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"diagnose": { +"description": "Creates a Diagnostic File and runs Diagnostic Tool given an Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:diagnose", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.diagnose", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:diagnose", +"request": { +"$ref": "DiagnoseInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Instance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:getIamPolicy", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getInstanceHealth": { +"description": "Checks whether a notebook instance is healthy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:getInstanceHealth", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.getInstanceHealth", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:getInstanceHealth", +"response": { +"$ref": "GetInstanceHealthResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"isUpgradeable": { +"description": "Checks whether a notebook instance is upgradable.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:isUpgradeable", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.isUpgradeable", +"parameterOrder": [ +"notebookInstance" +], +"parameters": { +"notebookInstance": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +}, +"type": { +"description": "Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.", +"enum": [ +"UPGRADE_TYPE_UNSPECIFIED", +"UPGRADE_FRAMEWORK", +"UPGRADE_OS", +"UPGRADE_CUDA", +"UPGRADE_ALL" +], +"enumDescriptions": [ +"Upgrade type is not specified.", +"Upgrade ML framework.", +"Upgrade Operating System.", +"Upgrade CUDA.", +"Upgrade All (OS, Framework and CUDA)." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+notebookInstance}:isUpgradeable", +"response": { +"$ref": "IsInstanceUpgradeableResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists instances in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum return size of the list call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previous returned page token that can be used to continue listing from the last result.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instances", +"response": { +"$ref": "ListInstancesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"migrate": { +"description": "Migrates an existing User-Managed Notebook to Workbench Instances.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:migrate", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.migrate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:migrate", +"request": { +"$ref": "MigrateInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"register": { +"description": "Registers an existing legacy notebook instance to the Notebooks API server. Legacy instances are instances created with the legacy Compute Engine calls. They are not manageable by the Notebooks API out of the box. This call makes these instances manageable by the Notebooks API.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances:register", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.register", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instances:register", +"request": { +"$ref": "RegisterInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"report": { +"description": "Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:report", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.report", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:report", +"request": { +"$ref": "ReportInstanceInfoRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reportEvent": { +"description": "Reports and processes an instance event.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reportEvent", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.reportEvent", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:reportEvent", +"request": { +"$ref": "ReportInstanceEventRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reset": { +"description": "Resets a notebook instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reset", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.reset", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:reset", +"request": { +"$ref": "ResetInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rollback": { +"description": "Rollbacks a notebook instance to the previous version.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:rollback", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.rollback", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:rollback", +"request": { +"$ref": "RollbackInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setAccelerator": { +"description": "Updates the guest accelerators of a single Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:setAccelerator", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.instances.setAccelerator", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setAccelerator", +"request": { +"$ref": "SetInstanceAcceleratorRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:setIamPolicy", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setLabels": { +"description": "Replaces all the labels of an Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:setLabels", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.instances.setLabels", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setLabels", +"request": { +"$ref": "SetInstanceLabelsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setMachineType": { +"description": "Updates the machine type of a single Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:setMachineType", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.instances.setMachineType", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setMachineType", +"request": { +"$ref": "SetInstanceMachineTypeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts a notebook instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:start", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:start", +"request": { +"$ref": "StartInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a notebook instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:stop", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:stop", +"request": { +"$ref": "StopInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:testIamPermissions", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Update Notebook Instance configurations.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:updateConfig", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.instances.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:updateConfig", +"request": { +"$ref": "UpdateInstanceConfigRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateMetadataItems": { +"description": "Add/update metadata items for an instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:updateMetadataItems", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.instances.updateMetadataItems", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:updateMetadataItems", +"request": { +"$ref": "UpdateInstanceMetadataItemsRequest" +}, +"response": { +"$ref": "UpdateInstanceMetadataItemsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateShieldedInstanceConfig": { +"description": "Updates the Shielded instance configuration of a single Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:updateShieldedInstanceConfig", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.instances.updateShieldedInstanceConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:updateShieldedInstanceConfig", +"request": { +"$ref": "UpdateShieldedInstanceConfigRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgrade": { +"description": "Upgrades a notebook instance to the latest version.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:upgrade", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.upgrade", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:upgrade", +"request": { +"$ref": "UpgradeInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgradeInternal": { +"description": "Allows notebook instances to call this endpoint to upgrade themselves. Do not use this method directly.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:upgradeInternal", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.upgradeInternal", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:upgradeInternal", +"request": { +"$ref": "UpgradeInstanceInternalRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "notebooks.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "notebooks.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"runtimes": { +"methods": { +"create": { +"description": "Creates a new Runtime in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +}, +"runtimeId": { +"description": "Required. User-defined unique ID of this Runtime.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/runtimes", +"request": { +"$ref": "Runtime" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Runtime.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.runtimes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"diagnose": { +"description": "Creates a Diagnostic File and runs Diagnostic Tool given a Runtime.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:diagnose", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.diagnose", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtimes_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:diagnose", +"request": { +"$ref": "DiagnoseRuntimeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Runtime. The location must be a regional endpoint rather than zonal.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.runtimes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Runtime" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:getIamPolicy", +"httpMethod": "GET", +"id": "notebooks.projects.locations.runtimes.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Runtimes in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes", +"httpMethod": "GET", +"id": "notebooks.projects.locations.runtimes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum return size of the list call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previous returned page token that can be used to continue listing from the last result.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/runtimes", +"response": { +"$ref": "ListRuntimesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"migrate": { +"description": "Migrate an existing Runtime to a new Workbench Instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:migrate", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.migrate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:migrate", +"request": { +"$ref": "MigrateRuntimeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update Notebook Runtime configuration.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.runtimes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the runtime. Format: `projects/{project}/locations/{location}/runtimes/{runtimeId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the path, relative to `Runtime`, of the field to update. For example, to change the software configuration kernels, the `update_mask` parameter would be specified as `software_config.kernels`, and the `PATCH` request body would specify the new value, as follows: { \"software_config\":{ \"kernels\": [{ 'repository': 'gcr.io/deeplearning-platform-release/pytorch-gpu', 'tag': 'latest' }], } } Currently, only the following fields can be updated: - `software_config.kernels` - `software_config.post_startup_script` - `software_config.custom_gpu_driver_path` - `software_config.idle_shutdown` - `software_config.idle_shutdown_timeout` - `software_config.disable_terminal` - `labels`", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Runtime" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"refreshRuntimeTokenInternal": { +"description": "Gets an access token for the consumer service account that the customer attached to the runtime. Only accessible from the tenant instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:refreshRuntimeTokenInternal", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.refreshRuntimeTokenInternal", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:refreshRuntimeTokenInternal", +"request": { +"$ref": "RefreshRuntimeTokenInternalRequest" +}, +"response": { +"$ref": "RefreshRuntimeTokenInternalResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reportEvent": { +"description": "Reports and processes a runtime event.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:reportEvent", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.reportEvent", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:reportEvent", +"request": { +"$ref": "ReportRuntimeEventRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reset": { +"description": "Resets a Managed Notebook Runtime.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:reset", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.reset", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:reset", +"request": { +"$ref": "ResetRuntimeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:setIamPolicy", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts a Managed Notebook Runtime. Perform \"Start\" on GPU instances; \"Resume\" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:start", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:start", +"request": { +"$ref": "StartRuntimeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a Managed Notebook Runtime. Perform \"Stop\" on GPU instances; \"Suspend\" on CPU instances See: https://cloud.google.com/compute/docs/instances/stop-start-instance https://cloud.google.com/compute/docs/instances/suspend-resume-instance", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:stop", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:stop", +"request": { +"$ref": "StopRuntimeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"switch": { +"description": "Switch a Managed Notebook Runtime.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:switch", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.switch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:switch", +"request": { +"$ref": "SwitchRuntimeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:testIamPermissions", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgrade": { +"description": "Upgrades a Managed Notebook Runtime to the latest version.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/runtimes/{runtimesId}:upgrade", +"httpMethod": "POST", +"id": "notebooks.projects.locations.runtimes.upgrade", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/runtimes/{runtime_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:upgrade", +"request": { +"$ref": "UpgradeRuntimeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"schedules": { +"methods": { +"create": { +"description": "Creates a new Scheduled Notebook in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/schedules", +"httpMethod": "POST", +"id": "notebooks.projects.locations.schedules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"scheduleId": { +"description": "Required. User-defined unique ID of this schedule.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/schedules", +"request": { +"$ref": "Schedule" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes schedule and all underlying jobs", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/schedules/{schedulesId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.schedules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/schedules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of schedule", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/schedules/{schedulesId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.schedules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/schedules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Schedule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists schedules in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/schedules", +"httpMethod": "GET", +"id": "notebooks.projects.locations.schedules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter applied to resulting schedules.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Field to order results by.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum return size of the list call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previous returned page token that can be used to continue listing from the last result.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/schedules", +"response": { +"$ref": "ListSchedulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"trigger": { +"description": "Triggers execution of an existing schedule.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/schedules/{schedulesId}:trigger", +"httpMethod": "POST", +"id": "notebooks.projects.locations.schedules.trigger", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}/schedules/{schedule_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/schedules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:trigger", +"request": { +"$ref": "TriggerScheduleRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240320", +"rootUrl": "https://notebooks.googleapis.com/", +"schemas": { +"AcceleratorConfig": { +"description": "Definition of a hardware accelerator. Note that not all combinations of `type` and `core_count` are valid. See [GPUs on Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a valid combination. TPUs are not supported.", +"id": "AcceleratorConfig", +"properties": { +"coreCount": { +"description": "Count of cores of this accelerator.", +"format": "int64", +"type": "string" +}, +"type": { +"description": "Type of this accelerator.", +"enum": [ +"ACCELERATOR_TYPE_UNSPECIFIED", +"NVIDIA_TESLA_K80", +"NVIDIA_TESLA_P100", +"NVIDIA_TESLA_V100", +"NVIDIA_TESLA_P4", +"NVIDIA_TESLA_T4", +"NVIDIA_TESLA_A100", +"NVIDIA_L4", +"NVIDIA_A100_80GB", +"NVIDIA_TESLA_T4_VWS", +"NVIDIA_TESLA_P100_VWS", +"NVIDIA_TESLA_P4_VWS", +"TPU_V2", +"TPU_V3" +], +"enumDescriptions": [ +"Accelerator type is not specified.", +"Accelerator type is Nvidia Tesla K80.", +"Accelerator type is Nvidia Tesla P100.", +"Accelerator type is Nvidia Tesla V100.", +"Accelerator type is Nvidia Tesla P4.", +"Accelerator type is Nvidia Tesla T4.", +"Accelerator type is Nvidia Tesla A100.", +"Accelerator type is Nvidia Tesla L4.", +"Accelerator type is Nvidia Tesla A100 80GB.", +"Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", +"(Coming soon) Accelerator type is TPU V2.", +"(Coming soon) Accelerator type is TPU V3." +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"BootImage": { +"description": "Definition of the boot image used by the Runtime. Used to facilitate runtime upgradeability.", +"id": "BootImage", +"properties": {}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"ContainerImage": { +"description": "Definition of a container image for starting a notebook instance with the environment installed in a container.", +"id": "ContainerImage", +"properties": { +"repository": { +"description": "Required. The path to the container image repository. For example: `gcr.io/{project_id}/{image_name}`", +"type": "string" +}, +"tag": { +"description": "The tag of the container image. If not specified, this defaults to the latest tag.", +"type": "string" +} +}, +"type": "object" +}, +"DataprocParameters": { +"description": "Parameters used in Dataproc JobType executions.", +"id": "DataprocParameters", +"properties": { +"cluster": { +"description": "URI for cluster used to run Dataproc execution. Format: `projects/{PROJECT_ID}/regions/{REGION}/clusters/{CLUSTER_NAME}`", +"type": "string" +} +}, +"type": "object" +}, +"DiagnoseInstanceRequest": { +"description": "Request for creating a notebook instance diagnostic file.", +"id": "DiagnoseInstanceRequest", +"properties": { +"diagnosticConfig": { +"$ref": "DiagnosticConfig", +"description": "Required. Defines flags that are used to run the diagnostic tool" +}, +"timeoutMinutes": { +"description": "Optional. Maxmium amount of time in minutes before the operation times out.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DiagnoseRuntimeRequest": { +"description": "Request for creating a notebook instance diagnostic file.", +"id": "DiagnoseRuntimeRequest", +"properties": { +"diagnosticConfig": { +"$ref": "DiagnosticConfig", +"description": "Required. Defines flags that are used to run the diagnostic tool" +}, +"timeoutMinutes": { +"description": "Optional. Maxmium amount of time in minutes before the operation times out.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DiagnosticConfig": { +"description": "Defines flags that are used to run the diagnostic tool", +"id": "DiagnosticConfig", +"properties": { +"copyHomeFilesFlagEnabled": { +"description": "Optional. Enables flag to copy all `/home/jupyter` folder contents", +"type": "boolean" +}, +"gcsBucket": { +"description": "Required. User Cloud Storage bucket location (REQUIRED). Must be formatted with path prefix (`gs://$GCS_BUCKET`). Permissions: User Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account attached to VM. Google Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account or user credentials attached to VM depending on authentication mode. Cloud Storage bucket Log file will be written to `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz`", +"type": "string" +}, +"packetCaptureFlagEnabled": { +"description": "Optional. Enables flag to capture packets from the instance for 30 seconds", +"type": "boolean" +}, +"relativePath": { +"description": "Optional. Defines the relative storage path in the Cloud Storage bucket where the diagnostic logs will be written: Default path will be the root directory of the Cloud Storage bucket (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/`", +"type": "string" +}, +"repairFlagEnabled": { +"description": "Optional. Enables flag to repair service for instance", +"type": "boolean" +} +}, +"type": "object" +}, +"Disk": { +"description": "An instance-attached disk resource.", +"id": "Disk", +"properties": { +"autoDelete": { +"description": "Indicates whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).", +"type": "boolean" +}, +"boot": { +"description": "Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.", +"type": "boolean" +}, +"deviceName": { +"description": "Indicates a unique device name of your choice that is reflected into the `/dev/disk/by-id/google-*` tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine.This field is only applicable for persistent disks.", +"type": "string" +}, +"diskSizeGb": { +"description": "Indicates the size of the disk in base-2 GB.", +"format": "int64", +"type": "string" +}, +"guestOsFeatures": { +"description": "Indicates a list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.", +"items": { +"$ref": "GuestOsFeature" +}, +"type": "array" +}, +"index": { +"description": "A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.", +"format": "int64", +"type": "string" +}, +"interface": { +"description": "Indicates the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. Valid values: * `NVME` * `SCSI`", +"type": "string" +}, +"kind": { +"description": "Type of the resource. Always compute#attachedDisk for attached disks.", +"type": "string" +}, +"licenses": { +"description": "A list of publicly visible licenses. Reserved for Google's use. A License represents billing and aggregate usage data for public and marketplace images.", +"items": { +"type": "string" +}, +"type": "array" +}, +"mode": { +"description": "The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. If not specified, the default is to attach the disk in `READ_WRITE` mode. Valid values: * `READ_ONLY` * `READ_WRITE`", +"type": "string" +}, +"source": { +"description": "Indicates a valid partial or full URL to an existing Persistent Disk resource.", +"type": "string" +}, +"type": { +"description": "Indicates the type of the disk, either `SCRATCH` or `PERSISTENT`. Valid values: * `PERSISTENT` * `SCRATCH`", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EncryptionConfig": { +"description": "Represents a custom encryption key configuration that can be applied to a resource. This will encrypt all disks in Virtual Machine.", +"id": "EncryptionConfig", +"properties": { +"kmsKey": { +"description": "The Cloud KMS resource identifier of the customer-managed encryption key used to protect a resource, such as a disks. It has the following format: `projects/{PROJECT_ID}/locations/{REGION}/keyRings/{KEY_RING_NAME}/cryptoKeys/{KEY_NAME}`", +"type": "string" +} +}, +"type": "object" +}, +"Environment": { +"description": "Definition of a software environment that is used to start a notebook instance.", +"id": "Environment", +"properties": { +"containerImage": { +"$ref": "ContainerImage", +"description": "Use a container image to start the notebook instance." +}, +"createTime": { +"description": "Output only. The time at which this environment was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A brief description of this environment.", +"type": "string" +}, +"displayName": { +"description": "Display name of this environment for the UI.", +"type": "string" +}, +"name": { +"description": "Output only. Name of this environment. Format: `projects/{project_id}/locations/{location}/environments/{environment_id}`", +"readOnly": true, +"type": "string" +}, +"postStartupScript": { +"description": "Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path. Example: `\"gs://path-to-file/file-name\"`", +"type": "string" +}, +"vmImage": { +"$ref": "VmImage", +"description": "Use a Compute Engine VM image to start the notebook instance." +} +}, +"type": "object" +}, +"Event": { +"description": "The definition of an Event for a managed / semi-managed notebook instance.", +"id": "Event", +"properties": { +"details": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Event details. This field is used to pass event information.", +"type": "object" +}, +"reportTime": { +"description": "Event report time.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "Event type.", +"enum": [ +"EVENT_TYPE_UNSPECIFIED", +"IDLE", +"HEARTBEAT", +"HEALTH", +"MAINTENANCE" +], +"enumDescriptions": [ +"Event is not specified.", +"The instance / runtime is idle", +"The instance / runtime is available. This event indicates that instance / runtime underlying compute is operational.", +"The instance / runtime health is available. This event indicates that instance / runtime health information.", +"The instance / runtime is available. This event allows instance / runtime to send Host maintenance information to Control Plane. https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance" +], +"type": "string" +} +}, +"type": "object" +}, +"Execution": { +"description": "The definition of a single executed notebook.", +"id": "Execution", +"properties": { +"createTime": { +"description": "Output only. Time the Execution was instantiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A brief description of this execution.", +"type": "string" +}, +"displayName": { +"description": "Output only. Name used for UI purposes. Name can only contain alphanumeric characters and underscores '_'.", +"readOnly": true, +"type": "string" +}, +"executionTemplate": { +"$ref": "ExecutionTemplate", +"description": "execute metadata including name, hardware spec, region, labels, etc." +}, +"jobUri": { +"description": "Output only. The URI of the external job used to execute the notebook.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the execute. Format: `projects/{project_id}/locations/{location}/executions/{execution_id}`", +"readOnly": true, +"type": "string" +}, +"outputNotebookFile": { +"description": "Output notebook file generated by this execution", +"type": "string" +}, +"state": { +"description": "Output only. State of the underlying AI Platform job.", +"enum": [ +"STATE_UNSPECIFIED", +"QUEUED", +"PREPARING", +"RUNNING", +"SUCCEEDED", +"FAILED", +"CANCELLING", +"CANCELLED", +"EXPIRED", +"INITIALIZING" +], +"enumDescriptions": [ +"The job state is unspecified.", +"The job has been just created and processing has not yet begun.", +"The service is preparing to execution the job.", +"The job is in progress.", +"The job completed successfully.", +"The job failed. `error_message` should contain the details of the failure.", +"The job is being cancelled. `error_message` should describe the reason for the cancellation.", +"The job has been cancelled. `error_message` should describe the reason for the cancellation.", +"The job has become expired (relevant to Vertex AI jobs) https://cloud.google.com/vertex-ai/docs/reference/rest/v1/JobState", +"The Execution is being created." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time the Execution was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExecutionTemplate": { +"description": "The description a notebook execution workload.", +"id": "ExecutionTemplate", +"properties": { +"acceleratorConfig": { +"$ref": "SchedulerAcceleratorConfig", +"description": "Configuration (count and accelerator type) for hardware running notebook execution." +}, +"containerImageUri": { +"description": "Container Image URI to a DLVM Example: 'gcr.io/deeplearning-platform-release/base-cu100' More examples can be found at: https://cloud.google.com/ai-platform/deep-learning-containers/docs/choosing-container", +"type": "string" +}, +"dataprocParameters": { +"$ref": "DataprocParameters", +"description": "Parameters used in Dataproc JobType executions." +}, +"inputNotebookFile": { +"description": "Path to the notebook file to execute. Must be in a Google Cloud Storage bucket. Format: `gs://{bucket_name}/{folder}/{notebook_file_name}` Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook.ipynb`", +"type": "string" +}, +"jobType": { +"description": "The type of Job to be used on this execution.", +"enum": [ +"JOB_TYPE_UNSPECIFIED", +"VERTEX_AI", +"DATAPROC" +], +"enumDescriptions": [ +"No type specified.", +"Custom Job in `aiplatform.googleapis.com`. Default value for an execution.", +"Run execution on a cluster with Dataproc as a job. https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs" +], +"type": "string" +}, +"kernelSpec": { +"description": "Name of the kernel spec to use. This must be specified if the kernel spec name on the execution target does not match the name in the input notebook file.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels for execution. If execution is scheduled, a field included will be 'nbs-scheduled'. Otherwise, it is an immediate execution, and an included field will be 'nbs-immediate'. Use fields to efficiently index between various types of executions.", +"type": "object" +}, +"masterType": { +"description": "Specifies the type of virtual machine to use for your training job's master worker. You must specify this field when `scaleTier` is set to `CUSTOM`. You can use certain Compute Engine machine types directly in this field. The following types are supported: - `n1-standard-4` - `n1-standard-8` - `n1-standard-16` - `n1-standard-32` - `n1-standard-64` - `n1-standard-96` - `n1-highmem-2` - `n1-highmem-4` - `n1-highmem-8` - `n1-highmem-16` - `n1-highmem-32` - `n1-highmem-64` - `n1-highmem-96` - `n1-highcpu-16` - `n1-highcpu-32` - `n1-highcpu-64` - `n1-highcpu-96` Alternatively, you can use the following legacy machine types: - `standard` - `large_model` - `complex_model_s` - `complex_model_m` - `complex_model_l` - `standard_gpu` - `complex_model_m_gpu` - `complex_model_l_gpu` - `standard_p100` - `complex_model_m_p100` - `standard_v100` - `large_model_v100` - `complex_model_m_v100` - `complex_model_l_v100` Finally, if you want to use a TPU for training, specify `cloud_tpu` in this field. Learn more about the [special configuration options for training with TPU](https://cloud.google.com/ai-platform/training/docs/using-tpus#configuring_a_custom_tpu_machine).", +"type": "string" +}, +"outputNotebookFolder": { +"description": "Path to the notebook folder to write to. Must be in a Google Cloud Storage bucket path. Format: `gs://{bucket_name}/{folder}` Ex: `gs://notebook_user/scheduled_notebooks`", +"type": "string" +}, +"parameters": { +"description": "Parameters used within the 'input_notebook_file' notebook.", +"type": "string" +}, +"paramsYamlFile": { +"description": "Parameters to be overridden in the notebook during execution. Ref https://papermill.readthedocs.io/en/latest/usage-parameterize.html on how to specifying parameters in the input notebook and pass them here in an YAML file. Ex: `gs://notebook_user/scheduled_notebooks/sentiment_notebook_params.yaml`", +"type": "string" +}, +"scaleTier": { +"deprecated": true, +"description": "Required. Scale tier of the hardware used for notebook execution. DEPRECATED Will be discontinued. As right now only CUSTOM is supported.", +"enum": [ +"SCALE_TIER_UNSPECIFIED", +"BASIC", +"STANDARD_1", +"PREMIUM_1", +"BASIC_GPU", +"BASIC_TPU", +"CUSTOM" +], +"enumDescriptions": [ +"Unspecified Scale Tier.", +"A single worker instance. This tier is suitable for learning how to use Cloud ML, and for experimenting with new models using small datasets.", +"Many workers and a few parameter servers.", +"A large number of workers with many parameter servers.", +"A single worker instance with a K80 GPU.", +"A single worker instance with a Cloud TPU.", +"The CUSTOM tier is not a set tier, but rather enables you to use your own cluster specification. When you use this tier, set values to configure your processing cluster according to these guidelines: * You _must_ set `ExecutionTemplate.masterType` to specify the type of machine to use for your master node. This is the only required setting." +], +"type": "string" +}, +"serviceAccount": { +"description": "The email address of a service account to use when running the execution. You must have the `iam.serviceAccounts.actAs` permission for the specified service account.", +"type": "string" +}, +"tensorboard": { +"description": "The name of a Vertex AI [Tensorboard] resource to which this execution will upload Tensorboard logs. Format: `projects/{project}/locations/{location}/tensorboards/{tensorboard}`", +"type": "string" +}, +"vertexAiParameters": { +"$ref": "VertexAIParameters", +"description": "Parameters used in Vertex AI JobType executions." +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GetInstanceHealthResponse": { +"description": "Response for checking if a notebook instance is healthy.", +"id": "GetInstanceHealthResponse", +"properties": { +"healthInfo": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Additional information about instance health. Example: healthInfo\": { \"docker_proxy_agent_status\": \"1\", \"docker_status\": \"1\", \"jupyterlab_api_status\": \"-1\", \"jupyterlab_status\": \"-1\", \"updated\": \"2020-10-18 09:40:03.573409\" }", +"readOnly": true, +"type": "object" +}, +"healthState": { +"description": "Output only. Runtime health_state.", +"enum": [ +"HEALTH_STATE_UNSPECIFIED", +"HEALTHY", +"UNHEALTHY", +"AGENT_NOT_INSTALLED", +"AGENT_NOT_RUNNING" +], +"enumDescriptions": [ +"The instance substate is unknown.", +"The instance is known to be in an healthy state (for example, critical daemons are running) Applies to ACTIVE state.", +"The instance is known to be in an unhealthy state (for example, critical daemons are not running) Applies to ACTIVE state.", +"The instance has not installed health monitoring agent. Applies to ACTIVE state.", +"The instance health monitoring agent is not running. Applies to ACTIVE state." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GuestOsFeature": { +"description": "Guest OS features for boot disk.", +"id": "GuestOsFeature", +"properties": { +"type": { +"description": "The ID of a supported feature. Read Enabling guest operating system features to see a list of available options. Valid values: * `FEATURE_TYPE_UNSPECIFIED` * `MULTI_IP_SUBNET` * `SECURE_BOOT` * `UEFI_COMPATIBLE` * `VIRTIO_SCSI_MULTIQUEUE` * `WINDOWS`", +"type": "string" +} +}, +"type": "object" +}, +"Instance": { +"description": "The definition of a notebook instance.", +"id": "Instance", +"properties": { +"acceleratorConfig": { +"$ref": "AcceleratorConfig", +"description": "The hardware accelerator used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list)." +}, +"bootDiskSizeGb": { +"description": "Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.", +"format": "int64", +"type": "string" +}, +"bootDiskType": { +"description": "Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).", +"enum": [ +"DISK_TYPE_UNSPECIFIED", +"PD_STANDARD", +"PD_SSD", +"PD_BALANCED", +"PD_EXTREME" +], +"enumDescriptions": [ +"Disk type not set.", +"Standard persistent disk type.", +"SSD persistent disk type.", +"Balanced persistent disk type.", +"Extreme persistent disk type." +], +"type": "string" +}, +"canIpForward": { +"description": "Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward", +"type": "boolean" +}, +"containerImage": { +"$ref": "ContainerImage", +"description": "Use a container image to start the notebook instance." +}, +"createTime": { +"description": "Output only. Instance creation time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"creator": { +"description": "Output only. Email address of entity that sent original CreateInstance request.", +"readOnly": true, +"type": "string" +}, +"customGpuDriverPath": { +"description": "Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.", +"type": "string" +}, +"dataDiskSizeGb": { +"description": "Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.", +"format": "int64", +"type": "string" +}, +"dataDiskType": { +"description": "Input only. The type of the data disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).", +"enum": [ +"DISK_TYPE_UNSPECIFIED", +"PD_STANDARD", +"PD_SSD", +"PD_BALANCED", +"PD_EXTREME" +], +"enumDescriptions": [ +"Disk type not set.", +"Standard persistent disk type.", +"SSD persistent disk type.", +"Balanced persistent disk type.", +"Extreme persistent disk type." +], +"type": "string" +}, +"diskEncryption": { +"description": "Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.", +"enum": [ +"DISK_ENCRYPTION_UNSPECIFIED", +"GMEK", +"CMEK" +], +"enumDescriptions": [ +"Disk encryption is not specified.", +"Use Google managed encryption keys to encrypt the boot disk.", +"Use customer managed encryption keys to encrypt the boot disk." +], +"type": "string" +}, +"disks": { +"description": "Output only. Attached disks to notebook instance.", +"items": { +"$ref": "Disk" +}, +"readOnly": true, +"type": "array" +}, +"installGpuDriver": { +"description": "Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.", +"type": "boolean" +}, +"instanceMigrationEligibility": { +"$ref": "InstanceMigrationEligibility", +"description": "Output only. Checks how feasible a migration from UmN to WbI is.", +"readOnly": true +}, +"instanceOwners": { +"description": "Input only. The owner of this instance after creation. Format: `alias@example.com` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.", +"items": { +"type": "string" +}, +"type": "array" +}, +"kmsKey": { +"description": "Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about [using your own encryption keys](/kms/docs/quickstart).", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels to apply to this instance. These can be later modified by the setLabels method.", +"type": "object" +}, +"machineType": { +"description": "Required. The [Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types) of this instance.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Custom metadata to apply to this instance. For example, to specify a Cloud Storage bucket for automatic backup, you can use the `gcs-data-bucket` metadata tag. Format: `\"--metadata=gcs-data-bucket=BUCKET\"`.", +"type": "object" +}, +"migrated": { +"description": "Output only. Bool indicating whether this notebook has been migrated to a Workbench Instance", +"readOnly": true, +"type": "boolean" +}, +"name": { +"description": "Output only. The name of this notebook instance. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"readOnly": true, +"type": "string" +}, +"network": { +"description": "The name of the VPC that this instance is in. Format: `projects/{project_id}/global/networks/{network_id}`", +"type": "string" +}, +"nicType": { +"description": "Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.", +"enum": [ +"UNSPECIFIED_NIC_TYPE", +"VIRTIO_NET", +"GVNIC" +], +"enumDescriptions": [ +"No type specified.", +"VIRTIO", +"GVNIC" +], +"type": "string" +}, +"noProxyAccess": { +"description": "If true, the notebook instance will not register with the proxy.", +"type": "boolean" +}, +"noPublicIp": { +"description": "If true, no external IP will be assigned to this instance.", +"type": "boolean" +}, +"noRemoveDataDisk": { +"description": "Input only. If true, the data disk will not be auto deleted when deleting the instance.", +"type": "boolean" +}, +"postStartupScript": { +"description": "Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).", +"type": "string" +}, +"proxyUri": { +"description": "Output only. The proxy endpoint that is used to access the Jupyter notebook.", +"readOnly": true, +"type": "string" +}, +"reservationAffinity": { +"$ref": "ReservationAffinity", +"description": "Optional. The optional reservation affinity. Setting this field will apply the specified [Zonal Compute Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) to this notebook instance." +}, +"serviceAccount": { +"description": "The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.", +"type": "string" +}, +"serviceAccountScopes": { +"description": "Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute", +"items": { +"type": "string" +}, +"type": "array" +}, +"shieldedInstanceConfig": { +"$ref": "ShieldedInstanceConfig", +"description": "Optional. Shielded VM configuration. [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm)." +}, +"state": { +"description": "Output only. The state of this instance.", +"enum": [ +"STATE_UNSPECIFIED", +"STARTING", +"PROVISIONING", +"ACTIVE", +"STOPPING", +"STOPPED", +"DELETED", +"UPGRADING", +"INITIALIZING", +"REGISTERING", +"SUSPENDING", +"SUSPENDED" +], +"enumDescriptions": [ +"State is not specified.", +"The control logic is starting the instance.", +"The control logic is installing required frameworks and registering the instance with notebook proxy", +"The instance is running.", +"The control logic is stopping the instance.", +"The instance is stopped.", +"The instance is deleted.", +"The instance is upgrading.", +"The instance is being created.", +"The instance is getting registered.", +"The instance is suspending.", +"The instance is suspended." +], +"readOnly": true, +"type": "string" +}, +"subnet": { +"description": "The name of the subnet that this instance is in. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`", +"type": "string" +}, +"tags": { +"description": "Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Instance update time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upgradeHistory": { +"description": "The upgrade history of this instance.", +"items": { +"$ref": "UpgradeHistoryEntry" +}, +"type": "array" +}, +"vmImage": { +"$ref": "VmImage", +"description": "Use a Compute Engine VM image to start the notebook instance." +} +}, +"type": "object" +}, +"InstanceConfig": { +"description": "Notebook instance configurations that can be updated.", +"id": "InstanceConfig", +"properties": { +"enableHealthMonitoring": { +"description": "Verifies core internal services are running.", +"type": "boolean" +}, +"notebookUpgradeSchedule": { +"description": "Cron expression in UTC timezone, used to schedule instance auto upgrade. Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).", +"type": "string" +} +}, +"type": "object" +}, +"InstanceMigrationEligibility": { +"description": "InstanceMigrationEligibility represents the feasibility information of a migration from UmN to WbI.", +"id": "InstanceMigrationEligibility", +"properties": { +"errors": { +"description": "Output only. Certain configurations make the UmN ineligible for an automatic migration. A manual migration is required.", +"items": { +"enum": [ +"ERROR_UNSPECIFIED", +"DATAPROC_HUB" +], +"enumDescriptions": [ +"Default type.", +"The UmN uses Dataproc Hub and cannot be migrated." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"warnings": { +"description": "Output only. Certain configurations will be defaulted during the migration.", +"items": { +"enum": [ +"WARNING_UNSPECIFIED", +"UNSUPPORTED_MACHINE_TYPE", +"UNSUPPORTED_ACCELERATOR_TYPE", +"UNSUPPORTED_OS", +"NO_REMOVE_DATA_DISK", +"GCS_BACKUP", +"POST_STARTUP_SCRIPT" +], +"enumDescriptions": [ +"Default type.", +"The UmN uses an machine type that's unsupported in WbI. It will be migrated with the default machine type e2-standard-4. Users can change the machine type after the migration.", +"The UmN uses an accelerator type that's unsupported in WbI. It will be migrated without an accelerator. User can attach an accelerator after the migration.", +"The UmN uses an operating system that's unsupported in WbI (e.g. Debian 10, Ubuntu). It will be replaced with Debian 11 in WbI.", +"This UmN is configured with no_remove_data_disk, which is no longer available in WbI.", +"This UmN is configured with the Cloud Storage backup feature, which is no longer available in WbI.", +"This UmN is configured with a post startup script. Please optionally provide the `post_startup_script_option` for the migration." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"IsInstanceUpgradeableResponse": { +"description": "Response for checking if a notebook instance is upgradeable.", +"id": "IsInstanceUpgradeableResponse", +"properties": { +"upgradeImage": { +"description": "The new image self link this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true.", +"type": "string" +}, +"upgradeInfo": { +"description": "Additional information about upgrade.", +"type": "string" +}, +"upgradeVersion": { +"description": "The version this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true.", +"type": "string" +}, +"upgradeable": { +"description": "If an instance is upgradeable.", +"type": "boolean" +} +}, +"type": "object" +}, +"ListEnvironmentsResponse": { +"description": "Response for listing environments.", +"id": "ListEnvironmentsResponse", +"properties": { +"environments": { +"description": "A list of returned environments.", +"items": { +"$ref": "Environment" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A page token that can be used to continue listing from the last result in the next list call.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListExecutionsResponse": { +"description": "Response for listing scheduled notebook executions", +"id": "ListExecutionsResponse", +"properties": { +"executions": { +"description": "A list of returned instances.", +"items": { +"$ref": "Execution" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token that can be used to continue listing from the last result in the next list call.", +"type": "string" +}, +"unreachable": { +"description": "Executions IDs that could not be reached. For example: ['projects/{project_id}/location/{location}/executions/imagenet_test1', 'projects/{project_id}/location/{location}/executions/classifier_train1']", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInstancesResponse": { +"description": "Response for listing notebook instances.", +"id": "ListInstancesResponse", +"properties": { +"instances": { +"description": "A list of returned instances.", +"items": { +"$ref": "Instance" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token that can be used to continue listing from the last result in the next list call.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached. For example, `['us-west1-a', 'us-central1-b']`. A ListInstancesResponse will only contain either instances or unreachables,", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListRuntimesResponse": { +"description": "Response for listing Managed Notebook Runtimes.", +"id": "ListRuntimesResponse", +"properties": { +"nextPageToken": { +"description": "Page token that can be used to continue listing from the last result in the next list call.", +"type": "string" +}, +"runtimes": { +"description": "A list of returned Runtimes.", +"items": { +"$ref": "Runtime" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached. For example, `['us-west1', 'us-central1']`. A ListRuntimesResponse will only contain either runtimes or unreachables,", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSchedulesResponse": { +"description": "Response for listing scheduled notebook job.", +"id": "ListSchedulesResponse", +"properties": { +"nextPageToken": { +"description": "Page token that can be used to continue listing from the last result in the next list call.", +"type": "string" +}, +"schedules": { +"description": "A list of returned instances.", +"items": { +"$ref": "Schedule" +}, +"type": "array" +}, +"unreachable": { +"description": "Schedules that could not be reached. For example: ['projects/{project_id}/location/{location}/schedules/monthly_digest', 'projects/{project_id}/location/{location}/schedules/weekly_sentiment']", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"LocalDisk": { +"description": "A Local attached disk resource.", +"id": "LocalDisk", +"properties": { +"autoDelete": { +"description": "Optional. Output only. Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).", +"readOnly": true, +"type": "boolean" +}, +"boot": { +"description": "Optional. Output only. Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.", +"readOnly": true, +"type": "boolean" +}, +"deviceName": { +"description": "Optional. Output only. Specifies a unique device name of your choice that is reflected into the `/dev/disk/by-id/google-*` tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", +"readOnly": true, +"type": "string" +}, +"guestOsFeatures": { +"description": "Output only. Indicates a list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.", +"items": { +"$ref": "RuntimeGuestOsFeature" +}, +"readOnly": true, +"type": "array" +}, +"index": { +"description": "Output only. A zero-based index to this disk, where 0 is reserved for the boot disk. If you have many disks attached to an instance, each disk would have a unique index number.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"initializeParams": { +"$ref": "LocalDiskInitializeParams", +"description": "Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance. This property is mutually exclusive with the source property; you can only define one or the other, but not both." +}, +"interface": { +"description": "Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance. Valid values: * `NVME` * `SCSI`", +"type": "string" +}, +"kind": { +"description": "Output only. Type of the resource. Always compute#attachedDisk for attached disks.", +"readOnly": true, +"type": "string" +}, +"licenses": { +"description": "Output only. Any valid publicly visible licenses.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"mode": { +"description": "The mode in which to attach this disk, either `READ_WRITE` or `READ_ONLY`. If not specified, the default is to attach the disk in `READ_WRITE` mode. Valid values: * `READ_ONLY` * `READ_WRITE`", +"type": "string" +}, +"source": { +"description": "Specifies a valid partial or full URL to an existing Persistent Disk resource.", +"type": "string" +}, +"type": { +"description": "Specifies the type of the disk, either `SCRATCH` or `PERSISTENT`. If not specified, the default is `PERSISTENT`. Valid values: * `PERSISTENT` * `SCRATCH`", +"type": "string" +} +}, +"type": "object" +}, +"LocalDiskInitializeParams": { +"description": "Input only. Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new runtime. This property is mutually exclusive with the source property; you can only define one or the other, but not both.", +"id": "LocalDiskInitializeParams", +"properties": { +"description": { +"description": "Optional. Provide this property when creating the disk.", +"type": "string" +}, +"diskName": { +"description": "Optional. Specifies the disk name. If not specified, the default is to use the name of the instance. If the disk with the instance name exists already in the given zone/region, a new name will be automatically generated.", +"type": "string" +}, +"diskSizeGb": { +"description": "Optional. Specifies the size of the disk in base-2 GB. If not specified, the disk will be the same size as the image (usually 10GB). If specified, the size must be equal to or larger than 10GB. Default 100 GB.", +"format": "int64", +"type": "string" +}, +"diskType": { +"description": "Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).", +"enum": [ +"DISK_TYPE_UNSPECIFIED", +"PD_STANDARD", +"PD_SSD", +"PD_BALANCED", +"PD_EXTREME" +], +"enumDescriptions": [ +"Disk type not set.", +"Standard persistent disk type.", +"SSD persistent disk type.", +"Balanced persistent disk type.", +"Extreme persistent disk type." +], +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels to apply to this disk. These can be later modified by the disks.setLabels method. This field is only applicable for persistent disks.", +"type": "object" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"MigrateInstanceRequest": { +"description": "Request for migrating a User-Managed Notebook to Workbench Instances.", +"id": "MigrateInstanceRequest", +"properties": { +"postStartupScriptOption": { +"description": "Optional. Specifies the behavior of post startup script during migration.", +"enum": [ +"POST_STARTUP_SCRIPT_OPTION_UNSPECIFIED", +"POST_STARTUP_SCRIPT_OPTION_SKIP", +"POST_STARTUP_SCRIPT_OPTION_RERUN" +], +"enumDescriptions": [ +"Post startup script option is not specified. Default is POST_STARTUP_SCRIPT_OPTION_SKIP.", +"Not migrate the post startup script to the new Workbench Instance.", +"Redownload and rerun the same post startup script as the User-Managed Notebook." +], +"type": "string" +} +}, +"type": "object" +}, +"MigrateRuntimeRequest": { +"description": "Request for migrating a Runtime to a Workbench Instance.", +"id": "MigrateRuntimeRequest", +"properties": { +"network": { +"description": "Optional. Name of the VPC that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same VPC, and this field must be empty. Format: `projects/{project_id}/global/networks/{network_id}`", +"type": "string" +}, +"postStartupScriptOption": { +"description": "Optional. Specifies the behavior of post startup script during migration.", +"enum": [ +"POST_STARTUP_SCRIPT_OPTION_UNSPECIFIED", +"POST_STARTUP_SCRIPT_OPTION_SKIP", +"POST_STARTUP_SCRIPT_OPTION_RERUN" +], +"enumDescriptions": [ +"Post startup script option is not specified. Default is POST_STARTUP_SCRIPT_OPTION_SKIP.", +"Not migrate the post startup script to the new Workbench Instance.", +"Redownload and rerun the same post startup script as the Google-Managed Notebook." +], +"type": "string" +}, +"requestId": { +"description": "Optional. Idempotent request UUID.", +"type": "string" +}, +"serviceAccount": { +"description": "Optional. The service account to be included in the Compute Engine instance of the new Workbench Instance when the Runtime uses \"single user only\" mode for permission. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used. When the Runtime uses service account mode for permission, it will reuse the same service account, and this field must be empty.", +"type": "string" +}, +"subnet": { +"description": "Optional. Name of the subnet that the new Instance is in. This is required if the Runtime uses google-managed network. If the Runtime uses customer-owned network, it will reuse the same subnet, and this field must be empty. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version used to start the operation.", +"type": "string" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"endpoint": { +"description": "API endpoint name of this operation.", +"type": "string" +}, +"requestedCancellation": { +"description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"type": "boolean" +}, +"statusMessage": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Server-defined resource path for the target of the operation.", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"RefreshRuntimeTokenInternalRequest": { +"description": "Request for getting a new access token.", +"id": "RefreshRuntimeTokenInternalRequest", +"properties": { +"vmId": { +"description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", +"type": "string" +} +}, +"type": "object" +}, +"RefreshRuntimeTokenInternalResponse": { +"description": "Response with a new access token.", +"id": "RefreshRuntimeTokenInternalResponse", +"properties": { +"accessToken": { +"description": "The OAuth 2.0 access token.", +"type": "string" +}, +"expireTime": { +"description": "Output only. Token expiration time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RegisterInstanceRequest": { +"description": "Request for registering a notebook instance.", +"id": "RegisterInstanceRequest", +"properties": { +"instanceId": { +"description": "Required. User defined unique ID of this instance. The `instance_id` must be 1 to 63 characters long and contain only lowercase letters, numeric characters, and dashes. The first character must be a lowercase letter and the last character cannot be a dash.", +"type": "string" +} +}, +"type": "object" +}, +"ReportInstanceEventRequest": { +"description": "Request for reporting a Managed Notebook Event.", +"id": "ReportInstanceEventRequest", +"properties": { +"event": { +"$ref": "Event", +"description": "Required. The Event to be reported." +}, +"vmId": { +"description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", +"type": "string" +} +}, +"type": "object" +}, +"ReportInstanceInfoRequest": { +"description": "Request for notebook instances to report information to Notebooks API.", +"id": "ReportInstanceInfoRequest", +"properties": { +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "The metadata reported to Notebooks API. This will be merged to the instance metadata store", +"type": "object" +}, +"vmId": { +"description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", +"type": "string" +} +}, +"type": "object" +}, +"ReportRuntimeEventRequest": { +"description": "Request for reporting a Managed Notebook Event.", +"id": "ReportRuntimeEventRequest", +"properties": { +"event": { +"$ref": "Event", +"description": "Required. The Event to be reported." +}, +"vmId": { +"description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", +"type": "string" +} +}, +"type": "object" +}, +"ReservationAffinity": { +"description": "Reservation Affinity for consuming Zonal reservation.", +"id": "ReservationAffinity", +"properties": { +"consumeReservationType": { +"description": "Optional. Type of reservation to consume", +"enum": [ +"TYPE_UNSPECIFIED", +"NO_RESERVATION", +"ANY_RESERVATION", +"SPECIFIC_RESERVATION" +], +"enumDescriptions": [ +"Default type.", +"Do not consume from any allocated capacity.", +"Consume any reservation available.", +"Must consume from a specific reservation. Must specify key value fields for specifying the reservations." +], +"type": "string" +}, +"key": { +"description": "Optional. Corresponds to the label key of reservation resource.", +"type": "string" +}, +"values": { +"description": "Optional. Corresponds to the label values of reservation resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ResetInstanceRequest": { +"description": "Request for resetting a notebook instance", +"id": "ResetInstanceRequest", +"properties": {}, +"type": "object" +}, +"ResetRuntimeRequest": { +"description": "Request for resetting a Managed Notebook Runtime.", +"id": "ResetRuntimeRequest", +"properties": { +"requestId": { +"description": "Idempotent request UUID.", +"type": "string" +} +}, +"type": "object" +}, +"RollbackInstanceRequest": { +"description": "Request for rollbacking a notebook instance", +"id": "RollbackInstanceRequest", +"properties": { +"targetSnapshot": { +"description": "Required. The snapshot for rollback. Example: `projects/test-project/global/snapshots/krwlzipynril`.", +"type": "string" +} +}, +"type": "object" +}, +"Runtime": { +"description": "The definition of a Runtime for a managed notebook instance.", +"id": "Runtime", +"properties": { +"accessConfig": { +"$ref": "RuntimeAccessConfig", +"description": "The config settings for accessing runtime." +}, +"createTime": { +"description": "Output only. Runtime creation time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"healthState": { +"description": "Output only. Runtime health_state.", +"enum": [ +"HEALTH_STATE_UNSPECIFIED", +"HEALTHY", +"UNHEALTHY", +"AGENT_NOT_INSTALLED", +"AGENT_NOT_RUNNING" +], +"enumDescriptions": [ +"The runtime substate is unknown.", +"The runtime is known to be in an healthy state (for example, critical daemons are running) Applies to ACTIVE state.", +"The runtime is known to be in an unhealthy state (for example, critical daemons are not running) Applies to ACTIVE state.", +"The runtime has not installed health monitoring agent. Applies to ACTIVE state.", +"The runtime health monitoring agent is not running. Applies to ACTIVE state." +], +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels to associate with this Managed Notebook or Runtime. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", +"type": "object" +}, +"metrics": { +"$ref": "RuntimeMetrics", +"description": "Output only. Contains Runtime daemon metrics such as Service status and JupyterLab stats.", +"readOnly": true +}, +"migrated": { +"description": "Output only. Bool indicating whether this notebook has been migrated to a Workbench Instance", +"readOnly": true, +"type": "boolean" +}, +"name": { +"description": "Output only. The resource name of the runtime. Format: `projects/{project}/locations/{location}/runtimes/{runtimeId}`", +"readOnly": true, +"type": "string" +}, +"runtimeMigrationEligibility": { +"$ref": "RuntimeMigrationEligibility", +"description": "Output only. Checks how feasible a migration from GmN to WbI is.", +"readOnly": true +}, +"softwareConfig": { +"$ref": "RuntimeSoftwareConfig", +"description": "The config settings for software inside the runtime." +}, +"state": { +"description": "Output only. Runtime state.", +"enum": [ +"STATE_UNSPECIFIED", +"STARTING", +"PROVISIONING", +"ACTIVE", +"STOPPING", +"STOPPED", +"DELETING", +"UPGRADING", +"INITIALIZING" +], +"enumDescriptions": [ +"State is not specified.", +"The compute layer is starting the runtime. It is not ready for use.", +"The compute layer is installing required frameworks and registering the runtime with notebook proxy. It cannot be used.", +"The runtime is currently running. It is ready for use.", +"The control logic is stopping the runtime. It cannot be used.", +"The runtime is stopped. It cannot be used.", +"The runtime is being deleted. It cannot be used.", +"The runtime is upgrading. It cannot be used.", +"The runtime is being created and set up. It is not ready for use." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Runtime update time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"virtualMachine": { +"$ref": "VirtualMachine", +"description": "Use a Compute Engine VM image to start the managed notebook instance." +} +}, +"type": "object" +}, +"RuntimeAcceleratorConfig": { +"description": "Definition of the types of hardware accelerators that can be used. See [Compute Engine AcceleratorTypes](https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes). Examples: * `nvidia-tesla-k80` * `nvidia-tesla-p100` * `nvidia-tesla-v100` * `nvidia-tesla-p4` * `nvidia-tesla-t4` * `nvidia-tesla-a100`", +"id": "RuntimeAcceleratorConfig", +"properties": { +"coreCount": { +"description": "Count of cores of this accelerator.", +"format": "int64", +"type": "string" +}, +"type": { +"description": "Accelerator model.", +"enum": [ +"ACCELERATOR_TYPE_UNSPECIFIED", +"NVIDIA_TESLA_K80", +"NVIDIA_TESLA_P100", +"NVIDIA_TESLA_V100", +"NVIDIA_TESLA_P4", +"NVIDIA_TESLA_T4", +"NVIDIA_TESLA_A100", +"NVIDIA_L4", +"TPU_V2", +"TPU_V3", +"NVIDIA_TESLA_T4_VWS", +"NVIDIA_TESLA_P100_VWS", +"NVIDIA_TESLA_P4_VWS" +], +"enumDeprecated": [ +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Accelerator type is not specified.", +"Accelerator type is Nvidia Tesla K80.", +"Accelerator type is Nvidia Tesla P100.", +"Accelerator type is Nvidia Tesla V100.", +"Accelerator type is Nvidia Tesla P4.", +"Accelerator type is Nvidia Tesla T4.", +"Accelerator type is Nvidia Tesla A100 - 40GB.", +"Accelerator type is Nvidia L4.", +"(Coming soon) Accelerator type is TPU V2.", +"(Coming soon) Accelerator type is TPU V3.", +"Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P4 Virtual Workstations." +], +"type": "string" +} +}, +"type": "object" +}, +"RuntimeAccessConfig": { +"description": "Specifies the login configuration for Runtime", +"id": "RuntimeAccessConfig", +"properties": { +"accessType": { +"description": "The type of access mode this instance.", +"enum": [ +"RUNTIME_ACCESS_TYPE_UNSPECIFIED", +"SINGLE_USER", +"SERVICE_ACCOUNT" +], +"enumDescriptions": [ +"Unspecified access.", +"Single user login.", +"Service Account mode. In Service Account mode, Runtime creator will specify a SA that exists in the consumer project. Using Runtime Service Account field. Users accessing the Runtime need ActAs (Service Account User) permission." +], +"type": "string" +}, +"proxyUri": { +"description": "Output only. The proxy endpoint that is used to access the runtime.", +"readOnly": true, +"type": "string" +}, +"runtimeOwner": { +"description": "The owner of this runtime after creation. Format: `alias@example.com` Currently supports one owner only.", +"type": "string" +} +}, +"type": "object" +}, +"RuntimeGuestOsFeature": { +"description": "Optional. A list of features to enable on the guest operating system. Applicable only for bootable images. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. Guest OS features for boot disk.", +"id": "RuntimeGuestOsFeature", +"properties": { +"type": { +"description": "The ID of a supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. Valid values: * `FEATURE_TYPE_UNSPECIFIED` * `MULTI_IP_SUBNET` * `SECURE_BOOT` * `UEFI_COMPATIBLE` * `VIRTIO_SCSI_MULTIQUEUE` * `WINDOWS`", +"type": "string" +} +}, +"type": "object" +}, +"RuntimeMetrics": { +"description": "Contains runtime daemon metrics, such as OS and kernels and sessions stats.", +"id": "RuntimeMetrics", +"properties": { +"systemMetrics": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. The system metrics.", +"readOnly": true, +"type": "object" +} +}, +"type": "object" +}, +"RuntimeMigrationEligibility": { +"description": "RuntimeMigrationEligibility represents the feasibility information of a migration from GmN to WbI.", +"id": "RuntimeMigrationEligibility", +"properties": { +"errors": { +"description": "Output only. Certain configurations make the GmN ineligible for an automatic migration. A manual migration is required.", +"items": { +"enum": [ +"ERROR_UNSPECIFIED", +"CUSTOM_CONTAINER" +], +"enumDescriptions": [ +"Default type.", +"The GmN is configured with custom container(s) and cannot be migrated." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"warnings": { +"description": "Output only. Certain configurations will be defaulted during the migration.", +"items": { +"enum": [ +"WARNING_UNSPECIFIED", +"UNSUPPORTED_ACCELERATOR_TYPE", +"UNSUPPORTED_OS", +"RESERVED_IP_RANGE", +"GOOGLE_MANAGED_NETWORK", +"POST_STARTUP_SCRIPT", +"SINGLE_USER" +], +"enumDescriptions": [ +"Default type.", +"The GmN uses an accelerator type that's unsupported in WbI. It will be migrated without an accelerator. Users can attach an accelerator after the migration.", +"The GmN uses an operating system that's unsupported in WbI (e.g. Debian 10). It will be replaced with Debian 11 in WbI.", +"This GmN is configured with reserved IP range, which is no longer applicable in WbI.", +"This GmN is configured with a Google managed network. Please provide the `network` and `subnet` options for the migration.", +"This GmN is configured with a post startup script. Please optionally provide the `post_startup_script_option` for the migration.", +"This GmN is configured with single user mode. Please optionally provide the `service_account` option for the migration." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"RuntimeShieldedInstanceConfig": { +"description": "A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). Not all combinations are valid.", +"id": "RuntimeShieldedInstanceConfig", +"properties": { +"enableIntegrityMonitoring": { +"description": "Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. Enabled by default.", +"type": "boolean" +}, +"enableSecureBoot": { +"description": "Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. Disabled by default.", +"type": "boolean" +}, +"enableVtpm": { +"description": "Defines whether the instance has the vTPM enabled. Enabled by default.", +"type": "boolean" +} +}, +"type": "object" +}, +"RuntimeSoftwareConfig": { +"description": "Specifies the selection and configuration of software inside the runtime. The properties to set on runtime. Properties keys are specified in `key:value` format, for example: * `idle_shutdown: true` * `idle_shutdown_timeout: 180` * `enable_health_monitoring: true`", +"id": "RuntimeSoftwareConfig", +"properties": { +"customGpuDriverPath": { +"description": "Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.", +"type": "string" +}, +"disableTerminal": { +"description": "Bool indicating whether JupyterLab terminal will be available or not. Default: False", +"type": "boolean" +}, +"enableHealthMonitoring": { +"description": "Verifies core internal services are running. Default: True", +"type": "boolean" +}, +"idleShutdown": { +"description": "Runtime will automatically shutdown after idle_shutdown_time. Default: True", +"type": "boolean" +}, +"idleShutdownTimeout": { +"description": "Time in minutes to wait before shutting down runtime. Default: 180 minutes", +"format": "int32", +"type": "integer" +}, +"installGpuDriver": { +"description": "Install Nvidia Driver automatically. Default: True", +"type": "boolean" +}, +"kernels": { +"description": "Optional. Use a list of container images to use as Kernels in the notebook instance.", +"items": { +"$ref": "ContainerImage" +}, +"type": "array" +}, +"mixerDisabled": { +"description": "Bool indicating whether mixer client should be disabled. Default: False", +"type": "boolean" +}, +"notebookUpgradeSchedule": { +"description": "Cron expression in UTC timezone, used to schedule instance auto upgrade. Please follow the [cron format](https://en.wikipedia.org/wiki/Cron).", +"type": "string" +}, +"postStartupScript": { +"description": "Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).", +"type": "string" +}, +"postStartupScriptBehavior": { +"description": "Behavior for the post startup script.", +"enum": [ +"POST_STARTUP_SCRIPT_BEHAVIOR_UNSPECIFIED", +"RUN_EVERY_START", +"DOWNLOAD_AND_RUN_EVERY_START" +], +"enumDescriptions": [ +"Unspecified post startup script behavior. Will run only once at creation.", +"Runs the post startup script provided during creation at every start.", +"Downloads and runs the provided post startup script at every start." +], +"type": "string" +}, +"upgradeable": { +"description": "Output only. Bool indicating whether an newer image is available in an image family.", +"readOnly": true, +"type": "boolean" +}, +"version": { +"description": "Output only. version of boot image such as M100, from release label of the image.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Schedule": { +"description": "The definition of a schedule.", +"id": "Schedule", +"properties": { +"createTime": { +"description": "Output only. Time the schedule was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"cronSchedule": { +"description": "Cron-tab formatted schedule by which the job will execute. Format: minute, hour, day of month, month, day of week, e.g. `0 0 * * WED` = every Wednesday More examples: https://crontab.guru/examples.html", +"type": "string" +}, +"description": { +"description": "A brief description of this environment.", +"type": "string" +}, +"displayName": { +"description": "Output only. Display name used for UI purposes. Name can only contain alphanumeric characters, hyphens `-`, and underscores `_`.", +"readOnly": true, +"type": "string" +}, +"executionTemplate": { +"$ref": "ExecutionTemplate", +"description": "Notebook Execution Template corresponding to this schedule." +}, +"name": { +"description": "Output only. The name of this schedule. Format: `projects/{project_id}/locations/{location}/schedules/{schedule_id}`", +"readOnly": true, +"type": "string" +}, +"recentExecutions": { +"description": "Output only. The most recent execution names triggered from this schedule and their corresponding states.", +"items": { +"$ref": "Execution" +}, +"readOnly": true, +"type": "array" +}, +"state": { +"enum": [ +"STATE_UNSPECIFIED", +"ENABLED", +"PAUSED", +"DISABLED", +"UPDATE_FAILED", +"INITIALIZING", +"DELETING" +], +"enumDescriptions": [ +"Unspecified state.", +"The job is executing normally.", +"The job is paused by the user. It will not execute. A user can intentionally pause the job using PauseJobRequest.", +"The job is disabled by the system due to error. The user cannot directly set a job to be disabled.", +"The job state resulting from a failed CloudScheduler.UpdateJob operation. To recover a job from this state, retry CloudScheduler.UpdateJob until a successful response is received.", +"The schedule resource is being created.", +"The schedule resource is being deleted." +], +"type": "string" +}, +"timeZone": { +"description": "Timezone on which the cron_schedule. The value of this field must be a time zone name from the tz database. TZ Database: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones Note that some time zones include a provision for daylight savings time. The rules for daylight saving time are determined by the chosen tz. For UTC use the string \"utc\". If a time zone is not specified, the default will be in UTC (also known as GMT).", +"type": "string" +}, +"updateTime": { +"description": "Output only. Time the schedule was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SchedulerAcceleratorConfig": { +"description": "Definition of a hardware accelerator. Note that not all combinations of `type` and `core_count` are valid. See [GPUs on Compute Engine](https://cloud.google.com/compute/docs/gpus) to find a valid combination. TPUs are not supported.", +"id": "SchedulerAcceleratorConfig", +"properties": { +"coreCount": { +"description": "Count of cores of this accelerator.", +"format": "int64", +"type": "string" +}, +"type": { +"description": "Type of this accelerator.", +"enum": [ +"SCHEDULER_ACCELERATOR_TYPE_UNSPECIFIED", +"NVIDIA_TESLA_K80", +"NVIDIA_TESLA_P100", +"NVIDIA_TESLA_V100", +"NVIDIA_TESLA_P4", +"NVIDIA_TESLA_T4", +"NVIDIA_TESLA_A100", +"TPU_V2", +"TPU_V3" +], +"enumDescriptions": [ +"Unspecified accelerator type. Default to no GPU.", +"Nvidia Tesla K80 GPU.", +"Nvidia Tesla P100 GPU.", +"Nvidia Tesla V100 GPU.", +"Nvidia Tesla P4 GPU.", +"Nvidia Tesla T4 GPU.", +"Nvidia Tesla A100 GPU.", +"TPU v2.", +"TPU v3." +], +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"SetInstanceAcceleratorRequest": { +"description": "Request for setting instance accelerator.", +"id": "SetInstanceAcceleratorRequest", +"properties": { +"coreCount": { +"description": "Required. Count of cores of this accelerator. Note that not all combinations of `type` and `core_count` are valid. See [GPUs on Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a valid combination. TPUs are not supported.", +"format": "int64", +"type": "string" +}, +"type": { +"description": "Required. Type of this accelerator.", +"enum": [ +"ACCELERATOR_TYPE_UNSPECIFIED", +"NVIDIA_TESLA_K80", +"NVIDIA_TESLA_P100", +"NVIDIA_TESLA_V100", +"NVIDIA_TESLA_P4", +"NVIDIA_TESLA_T4", +"NVIDIA_TESLA_A100", +"NVIDIA_L4", +"NVIDIA_A100_80GB", +"NVIDIA_TESLA_T4_VWS", +"NVIDIA_TESLA_P100_VWS", +"NVIDIA_TESLA_P4_VWS", +"TPU_V2", +"TPU_V3" +], +"enumDescriptions": [ +"Accelerator type is not specified.", +"Accelerator type is Nvidia Tesla K80.", +"Accelerator type is Nvidia Tesla P100.", +"Accelerator type is Nvidia Tesla V100.", +"Accelerator type is Nvidia Tesla P4.", +"Accelerator type is Nvidia Tesla T4.", +"Accelerator type is Nvidia Tesla A100.", +"Accelerator type is Nvidia Tesla L4.", +"Accelerator type is Nvidia Tesla A100 80GB.", +"Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P4 Virtual Workstations.", +"(Coming soon) Accelerator type is TPU V2.", +"(Coming soon) Accelerator type is TPU V3." +], +"type": "string" +} +}, +"type": "object" +}, +"SetInstanceLabelsRequest": { +"description": "Request for setting instance labels.", +"id": "SetInstanceLabelsRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels to apply to this instance. These can be later modified by the setLabels method", +"type": "object" +} +}, +"type": "object" +}, +"SetInstanceMachineTypeRequest": { +"description": "Request for setting instance machine type.", +"id": "SetInstanceMachineTypeRequest", +"properties": { +"machineType": { +"description": "Required. The [Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types).", +"type": "string" +} +}, +"type": "object" +}, +"ShieldedInstanceConfig": { +"description": "A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). Not all combinations are valid.", +"id": "ShieldedInstanceConfig", +"properties": { +"enableIntegrityMonitoring": { +"description": "Defines whether the instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the instance is created. Enabled by default.", +"type": "boolean" +}, +"enableSecureBoot": { +"description": "Defines whether the instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. Disabled by default.", +"type": "boolean" +}, +"enableVtpm": { +"description": "Defines whether the instance has the vTPM enabled. Enabled by default.", +"type": "boolean" +} +}, +"type": "object" +}, +"StartInstanceRequest": { +"description": "Request for starting a notebook instance", +"id": "StartInstanceRequest", +"properties": {}, +"type": "object" +}, +"StartRuntimeRequest": { +"description": "Request for starting a Managed Notebook Runtime.", +"id": "StartRuntimeRequest", +"properties": { +"requestId": { +"description": "Idempotent request UUID.", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopInstanceRequest": { +"description": "Request for stopping a notebook instance", +"id": "StopInstanceRequest", +"properties": {}, +"type": "object" +}, +"StopRuntimeRequest": { +"description": "Request for stopping a Managed Notebook Runtime.", +"id": "StopRuntimeRequest", +"properties": { +"requestId": { +"description": "Idempotent request UUID.", +"type": "string" +} +}, +"type": "object" +}, +"SwitchRuntimeRequest": { +"description": "Request for switching a Managed Notebook Runtime.", +"id": "SwitchRuntimeRequest", +"properties": { +"acceleratorConfig": { +"$ref": "RuntimeAcceleratorConfig", +"description": "accelerator config." +}, +"machineType": { +"description": "machine type.", +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TriggerScheduleRequest": { +"description": "Request for created scheduled notebooks", +"id": "TriggerScheduleRequest", +"properties": {}, +"type": "object" +}, +"UpdateInstanceConfigRequest": { +"description": "Request for updating instance configurations.", +"id": "UpdateInstanceConfigRequest", +"properties": { +"config": { +"$ref": "InstanceConfig", +"description": "The instance configurations to be updated." +} +}, +"type": "object" +}, +"UpdateInstanceMetadataItemsRequest": { +"description": "Request for adding/changing metadata items for an instance.", +"id": "UpdateInstanceMetadataItemsRequest", +"properties": { +"items": { +"additionalProperties": { +"type": "string" +}, +"description": "Metadata items to add/update for the instance.", +"type": "object" +} +}, +"type": "object" +}, +"UpdateInstanceMetadataItemsResponse": { +"description": "Response for adding/changing metadata items for an instance.", +"id": "UpdateInstanceMetadataItemsResponse", +"properties": { +"items": { +"additionalProperties": { +"type": "string" +}, +"description": "Map of items that were added/updated to/in the metadata.", +"type": "object" +} +}, +"type": "object" +}, +"UpdateShieldedInstanceConfigRequest": { +"description": "Request for updating the Shielded Instance config for a notebook instance. You can only use this method on a stopped instance", +"id": "UpdateShieldedInstanceConfigRequest", +"properties": { +"shieldedInstanceConfig": { +"$ref": "ShieldedInstanceConfig", +"description": "ShieldedInstance configuration to be updated." +} +}, +"type": "object" +}, +"UpgradeHistoryEntry": { +"description": "The entry of VM image upgrade history.", +"id": "UpgradeHistoryEntry", +"properties": { +"action": { +"description": "Action. Rolloback or Upgrade.", +"enum": [ +"ACTION_UNSPECIFIED", +"UPGRADE", +"ROLLBACK" +], +"enumDescriptions": [ +"Operation is not specified.", +"Upgrade.", +"Rollback." +], +"type": "string" +}, +"containerImage": { +"description": "The container image before this instance upgrade.", +"type": "string" +}, +"createTime": { +"description": "The time that this instance upgrade history entry is created.", +"format": "google-datetime", +"type": "string" +}, +"framework": { +"description": "The framework of this notebook instance.", +"type": "string" +}, +"snapshot": { +"description": "The snapshot of the boot disk of this notebook instance before upgrade.", +"type": "string" +}, +"state": { +"description": "The state of this instance upgrade history entry.", +"enum": [ +"STATE_UNSPECIFIED", +"STARTED", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"State is not specified.", +"The instance upgrade is started.", +"The instance upgrade is succeeded.", +"The instance upgrade is failed." +], +"type": "string" +}, +"targetImage": { +"deprecated": true, +"description": "Target VM Image. Format: `ainotebooks-vm/project/image-name/name`.", +"type": "string" +}, +"targetVersion": { +"description": "Target VM Version, like m63.", +"type": "string" +}, +"version": { +"description": "The version of the notebook instance before this upgrade.", +"type": "string" +}, +"vmImage": { +"description": "The VM image before this instance upgrade.", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeInstanceInternalRequest": { +"description": "Request for upgrading a notebook instance from within the VM", +"id": "UpgradeInstanceInternalRequest", +"properties": { +"type": { +"description": "Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.", +"enum": [ +"UPGRADE_TYPE_UNSPECIFIED", +"UPGRADE_FRAMEWORK", +"UPGRADE_OS", +"UPGRADE_CUDA", +"UPGRADE_ALL" +], +"enumDescriptions": [ +"Upgrade type is not specified.", +"Upgrade ML framework.", +"Upgrade Operating System.", +"Upgrade CUDA.", +"Upgrade All (OS, Framework and CUDA)." +], +"type": "string" +}, +"vmId": { +"description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeInstanceRequest": { +"description": "Request for upgrading a notebook instance", +"id": "UpgradeInstanceRequest", +"properties": { +"type": { +"description": "Optional. The optional UpgradeType. Setting this field will search for additional compute images to upgrade this instance.", +"enum": [ +"UPGRADE_TYPE_UNSPECIFIED", +"UPGRADE_FRAMEWORK", +"UPGRADE_OS", +"UPGRADE_CUDA", +"UPGRADE_ALL" +], +"enumDescriptions": [ +"Upgrade type is not specified.", +"Upgrade ML framework.", +"Upgrade Operating System.", +"Upgrade CUDA.", +"Upgrade All (OS, Framework and CUDA)." +], +"type": "string" +} +}, +"type": "object" +}, +"UpgradeRuntimeRequest": { +"description": "Request for upgrading a Managed Notebook Runtime to the latest version. option (google.api.message_visibility).restriction = \"TRUSTED_TESTER,SPECIAL_TESTER\";", +"id": "UpgradeRuntimeRequest", +"properties": { +"requestId": { +"description": "Idempotent request UUID.", +"type": "string" +} +}, +"type": "object" +}, +"VertexAIParameters": { +"description": "Parameters used in Vertex AI JobType executions.", +"id": "VertexAIParameters", +"properties": { +"env": { +"additionalProperties": { +"type": "string" +}, +"description": "Environment variables. At most 100 environment variables can be specified and unique. Example: `GCP_BUCKET=gs://my-bucket/samples/`", +"type": "object" +}, +"network": { +"description": "The full name of the Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks) to which the Job should be peered. For example, `projects/12345/global/networks/myVPC`. [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert) is of the form `projects/{project}/global/networks/{network}`. Where `{project}` is a project number, as in `12345`, and `{network}` is a network name. Private services access must already be configured for the network. If left unspecified, the job is not peered with any network.", +"type": "string" +} +}, +"type": "object" +}, +"VirtualMachine": { +"description": "Runtime using Virtual Machine for computing.", +"id": "VirtualMachine", +"properties": { +"instanceId": { +"description": "Output only. The unique identifier of the Managed Compute Engine instance.", +"readOnly": true, +"type": "string" +}, +"instanceName": { +"description": "Output only. The user-friendly name of the Managed Compute Engine instance.", +"readOnly": true, +"type": "string" +}, +"virtualMachineConfig": { +"$ref": "VirtualMachineConfig", +"description": "Virtual Machine configuration settings." +} +}, +"type": "object" +}, +"VirtualMachineConfig": { +"description": "The config settings for virtual machine.", +"id": "VirtualMachineConfig", +"properties": { +"acceleratorConfig": { +"$ref": "RuntimeAcceleratorConfig", +"description": "Optional. The Compute Engine accelerator configuration for this runtime." +}, +"bootImage": { +"$ref": "BootImage", +"description": "Optional. Boot image metadata used for runtime upgradeability." +}, +"containerImages": { +"description": "Optional. Use a list of container images to use as Kernels in the notebook instance.", +"items": { +"$ref": "ContainerImage" +}, +"type": "array" +}, +"dataDisk": { +"$ref": "LocalDisk", +"description": "Required. Data disk option configuration settings." +}, +"encryptionConfig": { +"$ref": "EncryptionConfig", +"description": "Optional. Encryption settings for virtual machine data disk." +}, +"guestAttributes": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. The Compute Engine guest attributes. (see [Project and instance guest attributes](https://cloud.google.com/compute/docs/storing-retrieving-metadata#guest_attributes)).", +"readOnly": true, +"type": "object" +}, +"internalIpOnly": { +"description": "Optional. If true, runtime will only have internal IP addresses. By default, runtimes are not restricted to internal IP addresses, and will have ephemeral external IP addresses assigned to each vm. This `internal_ip_only` restriction can only be enabled for subnetwork enabled networks, and all dependencies must be configured to be accessible without external IP addresses.", +"type": "boolean" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels to associate with this runtime. Label **keys** must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). Label **values** may be empty, but, if present, must contain 1 to 63 characters, and must conform to [RFC 1035](https://www.ietf.org/rfc/rfc1035.txt). No more than 32 labels can be associated with a cluster.", +"type": "object" +}, +"machineType": { +"description": "Required. The Compute Engine machine type used for runtimes. Short name is valid. Examples: * `n1-standard-2` * `e2-standard-8`", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The Compute Engine metadata entries to add to virtual machine. (see [Project and instance metadata](https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).", +"type": "object" +}, +"network": { +"description": "Optional. The Compute Engine network to be used for machine communications. Cannot be specified with subnetwork. If neither `network` nor `subnet` is specified, the \"default\" network of the project is used, if it exists. A full URL or partial URI. Examples: * `https://www.googleapis.com/compute/v1/projects/[project_id]/global/networks/default` * `projects/[project_id]/global/networks/default` Runtimes are managed resources inside Google Infrastructure. Runtimes support the following network configurations: * Google Managed Network (Network & subnet are empty) * Consumer Project VPC (network & subnet are required). Requires configuring Private Service Access. * Shared VPC (network & subnet are required). Requires configuring Private Service Access.", +"type": "string" +}, +"nicType": { +"description": "Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.", +"enum": [ +"UNSPECIFIED_NIC_TYPE", +"VIRTIO_NET", +"GVNIC" +], +"enumDescriptions": [ +"No type specified.", +"VIRTIO", +"GVNIC" +], +"type": "string" +}, +"reservedIpRange": { +"description": "Optional. Reserved IP Range name is used for VPC Peering. The subnetwork allocation will use the range *name* if it's assigned. Example: managed-notebooks-range-c PEERING_RANGE_NAME_3=managed-notebooks-range-c gcloud compute addresses create $PEERING_RANGE_NAME_3 \\ --global \\ --prefix-length=24 \\ --description=\"Google Cloud Managed Notebooks Range 24 c\" \\ --network=$NETWORK \\ --addresses=192.168.0.0 \\ --purpose=VPC_PEERING Field value will be: `managed-notebooks-range-c`", +"type": "string" +}, +"shieldedInstanceConfig": { +"$ref": "RuntimeShieldedInstanceConfig", +"description": "Optional. Shielded VM Instance configuration settings." +}, +"subnet": { +"description": "Optional. The Compute Engine subnetwork to be used for machine communications. Cannot be specified with network. A full URL or partial URI are valid. Examples: * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0` * `projects/[project_id]/regions/us-east1/subnetworks/sub0`", +"type": "string" +}, +"tags": { +"description": "Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).", +"items": { +"type": "string" +}, +"type": "array" +}, +"zone": { +"description": "Output only. The zone where the virtual machine is located. If using regional request, the notebooks service will pick a location in the corresponding runtime region. On a get request, zone will always be present. Example: * `us-central1-b`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"VmImage": { +"description": "Definition of a custom Compute Engine virtual machine image for starting a notebook instance with the environment installed directly on the VM.", +"id": "VmImage", +"properties": { +"imageFamily": { +"description": "Use this VM image family to find the image; the newest image in this family will be used.", +"type": "string" +}, +"imageName": { +"description": "Use VM image name to find the image.", +"type": "string" +}, +"project": { +"description": "Required. The name of the Google Cloud project that this VM image belongs to. Format: `{project_id}`", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Notebooks API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/notebooks.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/notebooks.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..090b5fa1751db866013c9980ecc3a285f226f868 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/notebooks.v2.json @@ -0,0 +1,2002 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://notebooks.googleapis.com/", +"batchPath": "batch", +"canonicalName": "AI Platform Notebooks", +"description": "Notebooks API is used to manage notebook resources in Google Cloud.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/notebooks/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "notebooks:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://notebooks.mtls.googleapis.com/", +"name": "notebooks", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v2/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "notebooks.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"instances": { +"methods": { +"checkUpgradability": { +"description": "Checks whether a notebook instance is upgradable.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:checkUpgradability", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.checkUpgradability", +"parameterOrder": [ +"notebookInstance" +], +"parameters": { +"notebookInstance": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+notebookInstance}:checkUpgradability", +"response": { +"$ref": "CheckInstanceUpgradabilityResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Instance in a given project and location.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"instanceId": { +"description": "Required. User-defined unique ID of this instance.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+parent}/instances", +"request": { +"$ref": "Instance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.instances.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"diagnose": { +"description": "Creates a Diagnostic File and runs Diagnostic Tool given an Instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:diagnose", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.diagnose", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:diagnose", +"request": { +"$ref": "DiagnoseInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Instance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getConfig": { +"description": "Gets general backend configurations that might also affect the frontend. Location is required by CCFE. Although we could bypass it to send location- less request directly to the backend job, we would need CPE (go/cloud-cpe). Having the location might also be useful depending on the query.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances:getConfig", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}/instances:getConfig", +"response": { +"$ref": "Config" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:getIamPolicy", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists instances in a given project and location.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "GET", +"id": "notebooks.projects.locations.instances.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Sort results. Supported values are \"name\", \"name desc\" or \"\" (unsorted).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Maximum return size of the list call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A previous returned page token that can be used to continue listing from the last result.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `parent=projects/{project_id}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/instances", +"response": { +"$ref": "ListInstancesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "UpdateInstance updates an Instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "PATCH", +"id": "notebooks.projects.locations.instances.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The name of this notebook instance. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. Idempotent request UUID.", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Mask used to update an instance", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "Instance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reportInfoSystem": { +"description": "Allows notebook instances to report their latest instance information to the Notebooks API server. The server will merge the reported information to the instance metadata store. Do not use this method directly.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reportInfoSystem", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.reportInfoSystem", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:reportInfoSystem", +"request": { +"$ref": "ReportInstanceInfoSystemRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reset": { +"description": "Resets a notebook instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:reset", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.reset", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:reset", +"request": { +"$ref": "ResetInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resizeDisk": { +"description": "Resize a notebook instance disk to a higher capacity.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:resizeDisk", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.resizeDisk", +"parameterOrder": [ +"notebookInstance" +], +"parameters": { +"notebookInstance": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+notebookInstance}:resizeDisk", +"request": { +"$ref": "ResizeDiskRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rollback": { +"description": "Rollbacks a notebook instance to the previous version.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:rollback", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.rollback", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:rollback", +"request": { +"$ref": "RollbackInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:setIamPolicy", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts a notebook instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:start", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:start", +"request": { +"$ref": "StartInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a notebook instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:stop", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:stop", +"request": { +"$ref": "StopInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:testIamPermissions", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgrade": { +"description": "Upgrades a notebook instance to the latest version.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:upgrade", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.upgrade", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:upgrade", +"request": { +"$ref": "UpgradeInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgradeSystem": { +"description": "Allows notebook instances to upgrade themselves. Do not use this method directly.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:upgradeSystem", +"httpMethod": "POST", +"id": "notebooks.projects.locations.instances.upgradeSystem", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:upgradeSystem", +"request": { +"$ref": "UpgradeInstanceSystemRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "notebooks.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "notebooks.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "notebooks.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "notebooks.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240403", +"rootUrl": "https://notebooks.googleapis.com/", +"schemas": { +"AcceleratorConfig": { +"description": "An accelerator configuration for a VM instance Definition of a hardware accelerator. Note that there is no check on `type` and `core_count` combinations. TPUs are not supported. See [GPUs on Compute Engine](https://cloud.google.com/compute/docs/gpus/#gpus-list) to find a valid combination.", +"id": "AcceleratorConfig", +"properties": { +"coreCount": { +"description": "Optional. Count of cores of this accelerator.", +"format": "int64", +"type": "string" +}, +"type": { +"description": "Optional. Type of this accelerator.", +"enum": [ +"ACCELERATOR_TYPE_UNSPECIFIED", +"NVIDIA_TESLA_P100", +"NVIDIA_TESLA_V100", +"NVIDIA_TESLA_P4", +"NVIDIA_TESLA_T4", +"NVIDIA_TESLA_A100", +"NVIDIA_A100_80GB", +"NVIDIA_L4", +"NVIDIA_TESLA_T4_VWS", +"NVIDIA_TESLA_P100_VWS", +"NVIDIA_TESLA_P4_VWS" +], +"enumDescriptions": [ +"Accelerator type is not specified.", +"Accelerator type is Nvidia Tesla P100.", +"Accelerator type is Nvidia Tesla V100.", +"Accelerator type is Nvidia Tesla P4.", +"Accelerator type is Nvidia Tesla T4.", +"Accelerator type is Nvidia Tesla A100 - 40GB.", +"Accelerator type is Nvidia Tesla A100 - 80GB.", +"Accelerator type is Nvidia Tesla L4.", +"Accelerator type is NVIDIA Tesla T4 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P100 Virtual Workstations.", +"Accelerator type is NVIDIA Tesla P4 Virtual Workstations." +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"BootDisk": { +"description": "The definition of a boot disk.", +"id": "BootDisk", +"properties": { +"diskEncryption": { +"description": "Optional. Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.", +"enum": [ +"DISK_ENCRYPTION_UNSPECIFIED", +"GMEK", +"CMEK" +], +"enumDescriptions": [ +"Disk encryption is not specified.", +"Use Google managed encryption keys to encrypt the boot disk.", +"Use customer managed encryption keys to encrypt the boot disk." +], +"type": "string" +}, +"diskSizeGb": { +"description": "Optional. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to the recommended value of 150GB.", +"format": "int64", +"type": "string" +}, +"diskType": { +"description": "Optional. Indicates the type of the disk.", +"enum": [ +"DISK_TYPE_UNSPECIFIED", +"PD_STANDARD", +"PD_SSD", +"PD_BALANCED", +"PD_EXTREME" +], +"enumDescriptions": [ +"Disk type not set.", +"Standard persistent disk type.", +"SSD persistent disk type.", +"Balanced persistent disk type.", +"Extreme persistent disk type." +], +"type": "string" +}, +"kmsKey": { +"description": "Optional. Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about using your own encryption keys.", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CheckInstanceUpgradabilityResponse": { +"description": "Response for checking if a notebook instance is upgradeable.", +"id": "CheckInstanceUpgradabilityResponse", +"properties": { +"upgradeImage": { +"description": "The new image self link this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true.", +"type": "string" +}, +"upgradeInfo": { +"description": "Additional information about upgrade.", +"type": "string" +}, +"upgradeVersion": { +"description": "The version this instance will be upgraded to if calling the upgrade endpoint. This field will only be populated if field upgradeable is true.", +"type": "string" +}, +"upgradeable": { +"description": "If an instance is upgradeable.", +"type": "boolean" +} +}, +"type": "object" +}, +"Config": { +"description": "Response for getting WbI configurations in a location", +"id": "Config", +"properties": { +"availableImages": { +"description": "Output only. The list of available images to create a WbI.", +"items": { +"$ref": "ImageRelease" +}, +"readOnly": true, +"type": "array" +}, +"defaultValues": { +"$ref": "DefaultValues", +"description": "Output only. The default values for configuration.", +"readOnly": true +}, +"supportedValues": { +"$ref": "SupportedValues", +"description": "Output only. The supported values for configuration.", +"readOnly": true +} +}, +"type": "object" +}, +"ContainerImage": { +"description": "Definition of a container image for starting a notebook instance with the environment installed in a container.", +"id": "ContainerImage", +"properties": { +"repository": { +"description": "Required. The path to the container image repository. For example: `gcr.io/{project_id}/{image_name}`", +"type": "string" +}, +"tag": { +"description": "Optional. The tag of the container image. If not specified, this defaults to the latest tag.", +"type": "string" +} +}, +"type": "object" +}, +"DataDisk": { +"description": "An instance-attached disk resource.", +"id": "DataDisk", +"properties": { +"diskEncryption": { +"description": "Optional. Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.", +"enum": [ +"DISK_ENCRYPTION_UNSPECIFIED", +"GMEK", +"CMEK" +], +"enumDescriptions": [ +"Disk encryption is not specified.", +"Use Google managed encryption keys to encrypt the boot disk.", +"Use customer managed encryption keys to encrypt the boot disk." +], +"type": "string" +}, +"diskSizeGb": { +"description": "Optional. The size of the disk in GB attached to this VM instance, up to a maximum of 64000 GB (64 TB). If not specified, this defaults to 100.", +"format": "int64", +"type": "string" +}, +"diskType": { +"description": "Optional. Input only. Indicates the type of the disk.", +"enum": [ +"DISK_TYPE_UNSPECIFIED", +"PD_STANDARD", +"PD_SSD", +"PD_BALANCED", +"PD_EXTREME" +], +"enumDescriptions": [ +"Disk type not set.", +"Standard persistent disk type.", +"SSD persistent disk type.", +"Balanced persistent disk type.", +"Extreme persistent disk type." +], +"type": "string" +}, +"kmsKey": { +"description": "Optional. Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about using your own encryption keys.", +"type": "string" +} +}, +"type": "object" +}, +"DefaultValues": { +"description": "DefaultValues represents the default configuration values.", +"id": "DefaultValues", +"properties": { +"machineType": { +"description": "Output only. The default machine type used by the backend if not provided by the user.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"DiagnoseInstanceRequest": { +"description": "Request for creating a notebook instance diagnostic file.", +"id": "DiagnoseInstanceRequest", +"properties": { +"diagnosticConfig": { +"$ref": "DiagnosticConfig", +"description": "Required. Defines flags that are used to run the diagnostic tool" +}, +"timeoutMinutes": { +"description": "Optional. Maxmium amount of time in minutes before the operation times out.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DiagnosticConfig": { +"description": "Defines flags that are used to run the diagnostic tool", +"id": "DiagnosticConfig", +"properties": { +"enableCopyHomeFilesFlag": { +"description": "Optional. Enables flag to copy all `/home/jupyter` folder contents", +"type": "boolean" +}, +"enablePacketCaptureFlag": { +"description": "Optional. Enables flag to capture packets from the instance for 30 seconds", +"type": "boolean" +}, +"enableRepairFlag": { +"description": "Optional. Enables flag to repair service for instance", +"type": "boolean" +}, +"gcsBucket": { +"description": "Required. User Cloud Storage bucket location (REQUIRED). Must be formatted with path prefix (`gs://$GCS_BUCKET`). Permissions: User Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account attached to VM. Google Managed Notebooks: - storage.buckets.writer: Must be given to the project's service account or user credentials attached to VM depending on authentication mode. Cloud Storage bucket Log file will be written to `gs://$GCS_BUCKET/$RELATIVE_PATH/$VM_DATE_$TIME.tar.gz`", +"type": "string" +}, +"relativePath": { +"description": "Optional. Defines the relative storage path in the Cloud Storage bucket where the diagnostic logs will be written: Default path will be the root directory of the Cloud Storage bucket (`gs://$GCS_BUCKET/$DATE_$TIME.tar.gz`) Example of full path where Log file will be written: `gs://$GCS_BUCKET/$RELATIVE_PATH/`", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Event": { +"description": "The definition of an Event for a managed / semi-managed notebook instance.", +"id": "Event", +"properties": { +"details": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Event details. This field is used to pass event information.", +"type": "object" +}, +"reportTime": { +"description": "Optional. Event report time.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "Optional. Event type.", +"enum": [ +"EVENT_TYPE_UNSPECIFIED", +"IDLE", +"HEARTBEAT", +"HEALTH", +"MAINTENANCE", +"METADATA_CHANGE" +], +"enumDescriptions": [ +"Event is not specified.", +"The instance / runtime is idle", +"The instance / runtime is available. This event indicates that instance / runtime underlying compute is operational.", +"The instance / runtime health is available. This event indicates that instance / runtime health information.", +"The instance / runtime is available. This event allows instance / runtime to send Host maintenance information to Control Plane. https://cloud.google.com/compute/docs/gpus/gpu-host-maintenance", +"The instance / runtime is available. This event indicates that the instance had metadata that needs to be modified." +], +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GPUDriverConfig": { +"description": "A GPU driver configuration", +"id": "GPUDriverConfig", +"properties": { +"customGpuDriverPath": { +"description": "Optional. Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.", +"type": "string" +}, +"enableGpuDriver": { +"description": "Optional. Whether the end user authorizes Google Cloud to install GPU driver on this VM instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.", +"type": "boolean" +} +}, +"type": "object" +}, +"GceSetup": { +"description": "The definition of how to configure a VM instance outside of Resources and Identity.", +"id": "GceSetup", +"properties": { +"acceleratorConfigs": { +"description": "Optional. The hardware accelerators used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list). Currently supports only one accelerator configuration.", +"items": { +"$ref": "AcceleratorConfig" +}, +"type": "array" +}, +"bootDisk": { +"$ref": "BootDisk", +"description": "Optional. The boot disk for the VM." +}, +"containerImage": { +"$ref": "ContainerImage", +"description": "Optional. Use a container image to start the notebook instance." +}, +"dataDisks": { +"description": "Optional. Data disks attached to the VM instance. Currently supports only one data disk.", +"items": { +"$ref": "DataDisk" +}, +"type": "array" +}, +"disablePublicIp": { +"description": "Optional. If true, no external IP will be assigned to this VM instance.", +"type": "boolean" +}, +"enableIpForwarding": { +"description": "Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward", +"type": "boolean" +}, +"gpuDriverConfig": { +"$ref": "GPUDriverConfig", +"description": "Optional. Configuration for GPU drivers." +}, +"machineType": { +"description": "Optional. The machine type of the VM instance. https://cloud.google.com/compute/docs/machine-resource", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Custom metadata to apply to this instance.", +"type": "object" +}, +"networkInterfaces": { +"description": "Optional. The network interfaces for the VM. Supports only one interface.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"serviceAccounts": { +"description": "Optional. The service account that serves as an identity for the VM instance. Currently supports only one service account.", +"items": { +"$ref": "ServiceAccount" +}, +"type": "array" +}, +"shieldedInstanceConfig": { +"$ref": "ShieldedInstanceConfig", +"description": "Optional. Shielded VM configuration. [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm)." +}, +"tags": { +"description": "Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).", +"items": { +"type": "string" +}, +"type": "array" +}, +"vmImage": { +"$ref": "VmImage", +"description": "Optional. Use a Compute Engine VM image to start the notebook instance." +} +}, +"type": "object" +}, +"ImageRelease": { +"description": "ConfigImage represents an image release available to create a WbI", +"id": "ImageRelease", +"properties": { +"imageName": { +"description": "Output only. The name of the image of the form workbench-instances-vYYYYmmdd--", +"readOnly": true, +"type": "string" +}, +"releaseName": { +"description": "Output only. The release of the image of the form m123", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Instance": { +"description": "The definition of a notebook instance.", +"id": "Instance", +"properties": { +"createTime": { +"description": "Output only. Instance creation time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"creator": { +"description": "Output only. Email address of entity that sent original CreateInstance request.", +"readOnly": true, +"type": "string" +}, +"disableProxyAccess": { +"description": "Optional. If true, the notebook instance will not register with the proxy.", +"type": "boolean" +}, +"gceSetup": { +"$ref": "GceSetup", +"description": "Optional. Compute Engine setup for the notebook. Uses notebook-defined fields." +}, +"healthInfo": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Additional information about instance health. Example: healthInfo\": { \"docker_proxy_agent_status\": \"1\", \"docker_status\": \"1\", \"jupyterlab_api_status\": \"-1\", \"jupyterlab_status\": \"-1\", \"updated\": \"2020-10-18 09:40:03.573409\" }", +"readOnly": true, +"type": "object" +}, +"healthState": { +"description": "Output only. Instance health_state.", +"enum": [ +"HEALTH_STATE_UNSPECIFIED", +"HEALTHY", +"UNHEALTHY", +"AGENT_NOT_INSTALLED", +"AGENT_NOT_RUNNING" +], +"enumDescriptions": [ +"The instance substate is unknown.", +"The instance is known to be in an healthy state (for example, critical daemons are running) Applies to ACTIVE state.", +"The instance is known to be in an unhealthy state (for example, critical daemons are not running) Applies to ACTIVE state.", +"The instance has not installed health monitoring agent. Applies to ACTIVE state.", +"The instance health monitoring agent is not running. Applies to ACTIVE state." +], +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. Unique ID of the resource.", +"readOnly": true, +"type": "string" +}, +"instanceOwners": { +"description": "Optional. Input only. The owner of this instance after creation. Format: `alias@example.com` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.", +"items": { +"type": "string" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels to apply to this instance. These can be later modified by the UpdateInstance method.", +"type": "object" +}, +"name": { +"description": "Output only. The name of this notebook instance. Format: `projects/{project_id}/locations/{location}/instances/{instance_id}`", +"readOnly": true, +"type": "string" +}, +"proxyUri": { +"description": "Output only. The proxy endpoint that is used to access the Jupyter notebook.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of this instance.", +"enum": [ +"STATE_UNSPECIFIED", +"STARTING", +"PROVISIONING", +"ACTIVE", +"STOPPING", +"STOPPED", +"DELETED", +"UPGRADING", +"INITIALIZING", +"SUSPENDING", +"SUSPENDED" +], +"enumDescriptions": [ +"State is not specified.", +"The control logic is starting the instance.", +"The control logic is installing required frameworks and registering the instance with notebook proxy", +"The instance is running.", +"The control logic is stopping the instance.", +"The instance is stopped.", +"The instance is deleted.", +"The instance is upgrading.", +"The instance is being created.", +"The instance is suspending.", +"The instance is suspended." +], +"readOnly": true, +"type": "string" +}, +"thirdPartyProxyUrl": { +"description": "Output only. The workforce pools proxy endpoint that is used to access the Jupyter notebook.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Instance update time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upgradeHistory": { +"description": "Output only. The upgrade history of this instance.", +"items": { +"$ref": "UpgradeHistoryEntry" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListInstancesResponse": { +"description": "Response for listing notebook instances.", +"id": "ListInstancesResponse", +"properties": { +"instances": { +"description": "A list of returned instances.", +"items": { +"$ref": "Instance" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token that can be used to continue listing from the last result in the next list call.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached. For example, ['us-west1-a', 'us-central1-b']. A ListInstancesResponse will only contain either instances or unreachables,", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"NetworkInterface": { +"description": "The definition of a network interface resource attached to a VM.", +"id": "NetworkInterface", +"properties": { +"network": { +"description": "Optional. The name of the VPC that this VM instance is in. Format: `projects/{project_id}/global/networks/{network_id}`", +"type": "string" +}, +"nicType": { +"description": "Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.", +"enum": [ +"NIC_TYPE_UNSPECIFIED", +"VIRTIO_NET", +"GVNIC" +], +"enumDescriptions": [ +"No type specified.", +"VIRTIO", +"GVNIC" +], +"type": "string" +}, +"subnet": { +"description": "Optional. The name of the subnet that this VM instance is in. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version used to start the operation.", +"type": "string" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"endpoint": { +"description": "API endpoint name of this operation.", +"type": "string" +}, +"requestedCancellation": { +"description": "Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"type": "boolean" +}, +"statusMessage": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Server-defined resource path for the target of the operation.", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ReportInstanceInfoSystemRequest": { +"description": "Request for notebook instances to report information to Notebooks API.", +"id": "ReportInstanceInfoSystemRequest", +"properties": { +"event": { +"$ref": "Event", +"description": "Required. The Event to be reported." +}, +"vmId": { +"description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", +"type": "string" +} +}, +"type": "object" +}, +"ResetInstanceRequest": { +"description": "Request for resetting a notebook instance", +"id": "ResetInstanceRequest", +"properties": {}, +"type": "object" +}, +"ResizeDiskRequest": { +"description": "Request for resizing the notebook instance disks", +"id": "ResizeDiskRequest", +"properties": { +"bootDisk": { +"$ref": "BootDisk", +"description": "Required. The boot disk to be resized. Only disk_size_gb will be used." +}, +"dataDisk": { +"$ref": "DataDisk", +"description": "Required. The data disk to be resized. Only disk_size_gb will be used." +} +}, +"type": "object" +}, +"RollbackInstanceRequest": { +"description": "Request for rollbacking a notebook instance", +"id": "RollbackInstanceRequest", +"properties": { +"revisionId": { +"description": "Required. Output only. Revision Id", +"readOnly": true, +"type": "string" +}, +"targetSnapshot": { +"description": "Required. The snapshot for rollback. Example: \"projects/test-project/global/snapshots/krwlzipynril\".", +"type": "string" +} +}, +"type": "object" +}, +"ServiceAccount": { +"description": "A service account that acts as an identity.", +"id": "ServiceAccount", +"properties": { +"email": { +"description": "Optional. Email address of the service account.", +"type": "string" +}, +"scopes": { +"description": "Output only. The list of scopes to be made available for this service account. Set by the CLH to https://www.googleapis.com/auth/cloud-platform", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"ShieldedInstanceConfig": { +"description": "A set of Shielded Instance options. See [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm). Not all combinations are valid.", +"id": "ShieldedInstanceConfig", +"properties": { +"enableIntegrityMonitoring": { +"description": "Optional. Defines whether the VM instance has integrity monitoring enabled. Enables monitoring and attestation of the boot integrity of the VM instance. The attestation is performed against the integrity policy baseline. This baseline is initially derived from the implicitly trusted boot image when the VM instance is created. Enabled by default.", +"type": "boolean" +}, +"enableSecureBoot": { +"description": "Optional. Defines whether the VM instance has Secure Boot enabled. Secure Boot helps ensure that the system only runs authentic software by verifying the digital signature of all boot components, and halting the boot process if signature verification fails. Disabled by default.", +"type": "boolean" +}, +"enableVtpm": { +"description": "Optional. Defines whether the VM instance has the vTPM enabled. Enabled by default.", +"type": "boolean" +} +}, +"type": "object" +}, +"StartInstanceRequest": { +"description": "Request for starting a notebook instance", +"id": "StartInstanceRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopInstanceRequest": { +"description": "Request for stopping a notebook instance", +"id": "StopInstanceRequest", +"properties": {}, +"type": "object" +}, +"SupportedValues": { +"description": "SupportedValues represents the values supported by the configuration.", +"id": "SupportedValues", +"properties": { +"acceleratorTypes": { +"description": "Output only. The accelerator types supported by WbI.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"machineTypes": { +"description": "Output only. The machine types supported by WbI.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UpgradeHistoryEntry": { +"description": "The entry of VM image upgrade history.", +"id": "UpgradeHistoryEntry", +"properties": { +"action": { +"description": "Optional. Action. Rolloback or Upgrade.", +"enum": [ +"ACTION_UNSPECIFIED", +"UPGRADE", +"ROLLBACK" +], +"enumDescriptions": [ +"Operation is not specified.", +"Upgrade.", +"Rollback." +], +"type": "string" +}, +"containerImage": { +"description": "Optional. The container image before this instance upgrade.", +"type": "string" +}, +"createTime": { +"description": "Immutable. The time that this instance upgrade history entry is created.", +"format": "google-datetime", +"type": "string" +}, +"framework": { +"description": "Optional. The framework of this notebook instance.", +"type": "string" +}, +"snapshot": { +"description": "Optional. The snapshot of the boot disk of this notebook instance before upgrade.", +"type": "string" +}, +"state": { +"description": "Output only. The state of this instance upgrade history entry.", +"enum": [ +"STATE_UNSPECIFIED", +"STARTED", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"State is not specified.", +"The instance upgrade is started.", +"The instance upgrade is succeeded.", +"The instance upgrade is failed." +], +"readOnly": true, +"type": "string" +}, +"targetVersion": { +"description": "Optional. Target VM Version, like m63.", +"type": "string" +}, +"version": { +"description": "Optional. The version of the notebook instance before this upgrade.", +"type": "string" +}, +"vmImage": { +"description": "Optional. The VM image before this instance upgrade.", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeInstanceRequest": { +"description": "Request for upgrading a notebook instance", +"id": "UpgradeInstanceRequest", +"properties": {}, +"type": "object" +}, +"UpgradeInstanceSystemRequest": { +"description": "Request for upgrading a notebook instance from within the VM", +"id": "UpgradeInstanceSystemRequest", +"properties": { +"vmId": { +"description": "Required. The VM hardware token for authenticating the VM. https://cloud.google.com/compute/docs/instances/verifying-instance-identity", +"type": "string" +} +}, +"type": "object" +}, +"VmImage": { +"description": "Definition of a custom Compute Engine virtual machine image for starting a notebook instance with the environment installed directly on the VM.", +"id": "VmImage", +"properties": { +"family": { +"description": "Optional. Use this VM image family to find the image; the newest image in this family will be used.", +"type": "string" +}, +"name": { +"description": "Optional. Use VM image name to find the image.", +"type": "string" +}, +"project": { +"description": "Required. The name of the Google Cloud project that this VM image belongs to. Format: `{project_id}`", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Notebooks API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oauth2.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oauth2.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..0b5c818c6e5f0f2a6a71f0c0b61a355f06ff8104 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oauth2.v2.json @@ -0,0 +1,293 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/userinfo.email": { +"description": "See your primary Google Account email address" +}, +"https://www.googleapis.com/auth/userinfo.profile": { +"description": "See your personal info, including any personal info you've made publicly available" +}, +"openid": { +"description": "Associate you with your personal info on Google" +} +} +} +}, +"basePath": "/", +"baseUrl": "https://www.googleapis.com/", +"batchPath": "batch/oauth2/v2", +"description": "Obtains end-user authorization grants for use with other Google APIs.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/identity/protocols/oauth2/", +"etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/VCyF6WfWVwIuhIs_gw3LA4B3w1E\"", +"icons": { +"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", +"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" +}, +"id": "oauth2:v2", +"kind": "discovery#restDescription", +"methods": { +"tokeninfo": { +"httpMethod": "POST", +"id": "oauth2.tokeninfo", +"parameters": { +"access_token": { +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for the response.", +"enum": [ +"json" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json" +], +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"id_token": { +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"pp": { +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", +"location": "query", +"type": "string" +}, +"strict": { +"location": "query", +"type": "string" +}, +"trace": { +"location": "query", +"type": "string" +}, +"userIp": { +"description": "Deprecated. Please use quotaUser instead.", +"location": "query", +"type": "string" +}, +"userip": { +"location": "query", +"type": "string" +} +}, +"path": "oauth2/v2/tokeninfo", +"response": { +"$ref": "Tokeninfo" +} +} +}, +"name": "oauth2", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"alt": { +"default": "json", +"description": "Data format for the response.", +"enum": [ +"json" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json" +], +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", +"location": "query", +"type": "string" +}, +"userIp": { +"description": "Deprecated. Please use quotaUser instead.", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"userinfo": { +"methods": { +"get": { +"httpMethod": "GET", +"id": "oauth2.userinfo.get", +"path": "oauth2/v2/userinfo", +"response": { +"$ref": "Userinfo" +}, +"scopes": [ +"openid", +"https://www.googleapis.com/auth/userinfo.email", +"https://www.googleapis.com/auth/userinfo.profile" +] +} +}, +"resources": { +"v2": { +"resources": { +"me": { +"methods": { +"get": { +"httpMethod": "GET", +"id": "oauth2.userinfo.v2.me.get", +"path": "userinfo/v2/me", +"response": { +"$ref": "Userinfo" +}, +"scopes": [ +"openid", +"https://www.googleapis.com/auth/userinfo.email", +"https://www.googleapis.com/auth/userinfo.profile" +] +} +} +} +} +} +} +} +}, +"revision": "20200213", +"rootUrl": "https://www.googleapis.com/", +"schemas": { +"Tokeninfo": { +"id": "Tokeninfo", +"properties": { +"audience": { +"description": "Who is the intended audience for this token. In general the same as issued_to.", +"type": "string" +}, +"email": { +"description": "The email address of the user. Present only if the email scope is present in the request.", +"type": "string" +}, +"expires_in": { +"description": "The expiry time of the token, as number of seconds left until expiry.", +"format": "int32", +"type": "integer" +}, +"issued_to": { +"description": "To whom was the token issued to. In general the same as audience.", +"type": "string" +}, +"scope": { +"description": "The space separated list of scopes granted to this token.", +"type": "string" +}, +"user_id": { +"description": "The obfuscated user id.", +"type": "string" +}, +"verified_email": { +"description": "Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request.", +"type": "boolean" +} +}, +"type": "object" +}, +"Userinfo": { +"id": "Userinfo", +"properties": { +"email": { +"description": "The user's email address.", +"type": "string" +}, +"family_name": { +"description": "The user's last name.", +"type": "string" +}, +"gender": { +"description": "The user's gender.", +"type": "string" +}, +"given_name": { +"description": "The user's first name.", +"type": "string" +}, +"hd": { +"description": "The hosted domain e.g. example.com if the user is Google apps user.", +"type": "string" +}, +"id": { +"description": "The obfuscated ID of the user.", +"type": "string" +}, +"link": { +"description": "URL of the profile page.", +"type": "string" +}, +"locale": { +"description": "The user's preferred locale.", +"type": "string" +}, +"name": { +"description": "The user's full name.", +"type": "string" +}, +"picture": { +"description": "URL of the user's picture image.", +"type": "string" +}, +"verified_email": { +"default": "true", +"description": "Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address.", +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google OAuth2 API", +"version": "v2" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ondemandscanning.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ondemandscanning.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..45be985f3b9ecba5610bf653016e1bedbc6eba80 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ondemandscanning.v1.json @@ -0,0 +1,2980 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://ondemandscanning.googleapis.com/", +"batchPath": "batch", +"canonicalName": "On-Demand Scanning", +"description": "A service to scan container images for vulnerabilities.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/container-analysis/docs/on-demand-scanning/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "ondemandscanning:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://ondemandscanning.mtls.googleapis.com/", +"name": "ondemandscanning", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "ondemandscanning.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "ondemandscanning.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "ondemandscanning.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "ondemandscanning.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"wait": { +"description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:wait", +"httpMethod": "POST", +"id": "ondemandscanning.projects.locations.operations.wait", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to wait on.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +}, +"timeout": { +"description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", +"format": "google-duration", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:wait", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"scans": { +"methods": { +"analyzePackages": { +"description": "Initiates an analysis of the provided packages.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scans:analyzePackages", +"httpMethod": "POST", +"id": "ondemandscanning.projects.locations.scans.analyzePackages", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent of the resource for which analysis is requested. Format: projects/[project_name]/locations/[location]", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/scans:analyzePackages", +"request": { +"$ref": "AnalyzePackagesRequestV1" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"vulnerabilities": { +"methods": { +"list": { +"description": "Lists vulnerabilities resulting from a successfully completed scan.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/scans/{scansId}/vulnerabilities", +"httpMethod": "GET", +"id": "ondemandscanning.projects.locations.scans.vulnerabilities.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The number of vulnerabilities to retrieve.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token, resulting from a previous call to ListVulnerabilities.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent of the collection of Vulnerabilities being requested. Format: projects/[project_name]/locations/[location]/scans/[scan_id]", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/scans/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/vulnerabilities", +"response": { +"$ref": "ListVulnerabilitiesResponseV1" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://ondemandscanning.googleapis.com/", +"schemas": { +"AliasContext": { +"description": "An alias to a repo revision.", +"id": "AliasContext", +"properties": { +"kind": { +"description": "The alias kind.", +"enum": [ +"KIND_UNSPECIFIED", +"FIXED", +"MOVABLE", +"OTHER" +], +"enumDescriptions": [ +"Unknown.", +"Git tag.", +"Git branch.", +"Used to specify non-standard aliases. For example, if a Git repo has a ref named \"refs/foo/bar\"." +], +"type": "string" +}, +"name": { +"description": "The alias name.", +"type": "string" +} +}, +"type": "object" +}, +"AnalysisCompleted": { +"description": "Indicates which analysis completed successfully. Multiple types of analysis can be performed on a single resource.", +"id": "AnalysisCompleted", +"properties": { +"analysisType": { +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AnalyzePackagesMetadata": { +"description": "AnalyzePackagesMetadata contains metadata for an active scan of a container image.", +"id": "AnalyzePackagesMetadata", +"properties": { +"createTime": { +"description": "When the scan was created.", +"format": "google-datetime", +"type": "string" +}, +"resourceUri": { +"description": "The resource URI of the container image being scanned.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesMetadataV1": { +"description": "AnalyzePackagesMetadata contains metadata for an active scan of a container image.", +"id": "AnalyzePackagesMetadataV1", +"properties": { +"createTime": { +"description": "When the scan was created.", +"format": "google-datetime", +"type": "string" +}, +"resourceUri": { +"description": "The resource URI of the container image being scanned.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesRequestV1": { +"description": "AnalyzePackagesRequest is the request to analyze a list of packages and create Vulnerability Occurrences for it.", +"id": "AnalyzePackagesRequestV1", +"properties": { +"includeOsvData": { +"deprecated": true, +"description": "[DEPRECATED] Whether to include OSV data in the scan. For backwards compatibility reasons, this field can be neither removed nor renamed.", +"type": "boolean" +}, +"packages": { +"description": "The packages to analyze.", +"items": { +"$ref": "PackageData" +}, +"type": "array" +}, +"resourceUri": { +"description": "Required. The resource URI of the container image being scanned.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesResponse": { +"description": "AnalyzePackagesResponse contains the information necessary to find results for the given scan.", +"id": "AnalyzePackagesResponse", +"properties": { +"scan": { +"description": "The name of the scan resource created by this successful scan.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesResponseV1": { +"description": "AnalyzePackagesResponse contains the information necessary to find results for the given scan.", +"id": "AnalyzePackagesResponseV1", +"properties": { +"scan": { +"description": "The name of the scan resource created by this successful scan.", +"type": "string" +} +}, +"type": "object" +}, +"Artifact": { +"description": "Artifact describes a build product.", +"id": "Artifact", +"properties": { +"checksum": { +"description": "Hash or checksum value of a binary, or Docker Registry 2.0 digest of a container.", +"type": "string" +}, +"id": { +"description": "Artifact ID, if any; for container images, this will be a URL by digest like `gcr.io/projectID/imagename@sha256:123456`.", +"type": "string" +}, +"names": { +"description": "Related artifact names. This may be the path to a binary or jar file, or in the case of a container build, the name used to push the container image to Google Container Registry, as presented to `docker push`. Note that a single Artifact ID can have multiple names, for example if two tags are applied to one image.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AttestationOccurrence": { +"description": "Occurrence that represents a single \"attestation\". The authenticity of an attestation can be verified using the attached signature. If the verifier trusts the public key of the signer, then verifying the signature is sufficient to establish trust. In this circumstance, the authority to which this attestation is attached is primarily useful for lookup (how to find this attestation if you already know the authority and artifact to be verified) and intent (for which authority this attestation was intended to sign.", +"id": "AttestationOccurrence", +"properties": { +"jwts": { +"description": "One or more JWTs encoding a self-contained attestation. Each JWT encodes the payload that it verifies within the JWT itself. Verifier implementation SHOULD ignore the `serialized_payload` field when verifying these JWTs. If only JWTs are present on this AttestationOccurrence, then the `serialized_payload` SHOULD be left empty. Each JWT SHOULD encode a claim specific to the `resource_uri` of this Occurrence, but this is not validated by Grafeas metadata API implementations. The JWT itself is opaque to Grafeas.", +"items": { +"$ref": "Jwt" +}, +"type": "array" +}, +"serializedPayload": { +"description": "Required. The serialized payload that is verified by one or more `signatures`.", +"format": "byte", +"type": "string" +}, +"signatures": { +"description": "One or more signatures over `serialized_payload`. Verifier implementations should consider this attestation message verified if at least one `signature` verifies `serialized_payload`. See `Signature` in common.proto for more details on signature structure and verification.", +"items": { +"$ref": "Signature" +}, +"type": "array" +} +}, +"type": "object" +}, +"BinarySourceInfo": { +"id": "BinarySourceInfo", +"properties": { +"binaryVersion": { +"$ref": "PackageVersion", +"description": "The binary package. This is significant when the source is different than the binary itself. Historically if they've differed, we've stored the name of the source and its version in the package/version fields, but we should also store the binary package info, as that's what's actually installed. See b/175908657#comment15." +}, +"sourceVersion": { +"$ref": "PackageVersion", +"description": "The source package. Similar to the above, this is significant when the source is different than the binary itself. Since the top-level package/version fields are based on an if/else, we need a separate field for both binary and source if we want to know definitively where the data is coming from." +} +}, +"type": "object" +}, +"BuildDefinition": { +"id": "BuildDefinition", +"properties": { +"buildType": { +"type": "string" +}, +"externalParameters": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"internalParameters": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"resolvedDependencies": { +"items": { +"$ref": "ResourceDescriptor" +}, +"type": "array" +} +}, +"type": "object" +}, +"BuildMetadata": { +"id": "BuildMetadata", +"properties": { +"finishedOn": { +"format": "google-datetime", +"type": "string" +}, +"invocationId": { +"type": "string" +}, +"startedOn": { +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"BuildOccurrence": { +"description": "Details of a build occurrence.", +"id": "BuildOccurrence", +"properties": { +"inTotoSlsaProvenanceV1": { +"$ref": "InTotoSlsaProvenanceV1", +"description": "In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa spec, wrapped in an in-toto statement. This allows for direct jsonification of a to-spec in-toto slsa statement with a to-spec slsa provenance." +}, +"intotoProvenance": { +"$ref": "InTotoProvenance", +"description": "Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec." +}, +"intotoStatement": { +"$ref": "InTotoStatement", +"description": "In-toto Statement representation as defined in spec. The intoto_statement can contain any type of provenance. The serialized payload of the statement can be stored and signed in the Occurrence's envelope." +}, +"provenance": { +"$ref": "BuildProvenance", +"description": "The actual provenance for the build." +}, +"provenanceBytes": { +"description": "Serialized JSON representation of the provenance, used in generating the build signature in the corresponding build note. After verifying the signature, `provenance_bytes` can be unmarshalled and compared to the provenance to confirm that it is unchanged. A base64-encoded string representation of the provenance bytes is used for the signature in order to interoperate with openssl which expects this format for signature verification. The serialized form is captured both to avoid ambiguity in how the provenance is marshalled to json as well to prevent incompatibilities with future changes.", +"type": "string" +} +}, +"type": "object" +}, +"BuildProvenance": { +"description": "Provenance of a build. Contains all information needed to verify the full details about the build from source to completion.", +"id": "BuildProvenance", +"properties": { +"buildOptions": { +"additionalProperties": { +"type": "string" +}, +"description": "Special options applied to this build. This is a catch-all field where build providers can enter any desired additional details.", +"type": "object" +}, +"builderVersion": { +"description": "Version string of the builder at the time this build was executed.", +"type": "string" +}, +"builtArtifacts": { +"description": "Output of the build.", +"items": { +"$ref": "Artifact" +}, +"type": "array" +}, +"commands": { +"description": "Commands requested by the build.", +"items": { +"$ref": "Command" +}, +"type": "array" +}, +"createTime": { +"description": "Time at which the build was created.", +"format": "google-datetime", +"type": "string" +}, +"creator": { +"description": "E-mail address of the user who initiated this build. Note that this was the user's e-mail address at the time the build was initiated; this address may not represent the same end-user for all time.", +"type": "string" +}, +"endTime": { +"description": "Time at which execution of the build was finished.", +"format": "google-datetime", +"type": "string" +}, +"id": { +"description": "Required. Unique identifier of the build.", +"type": "string" +}, +"logsUri": { +"description": "URI where any logs for this provenance were written.", +"type": "string" +}, +"projectId": { +"description": "ID of the project.", +"type": "string" +}, +"sourceProvenance": { +"$ref": "Source", +"description": "Details of the Source input to the build." +}, +"startTime": { +"description": "Time at which execution of the build was started.", +"format": "google-datetime", +"type": "string" +}, +"triggerId": { +"description": "Trigger identifier if the build was triggered automatically; empty if not.", +"type": "string" +} +}, +"type": "object" +}, +"BuilderConfig": { +"id": "BuilderConfig", +"properties": { +"id": { +"type": "string" +} +}, +"type": "object" +}, +"CVSS": { +"description": "Common Vulnerability Scoring System. For details, see https://www.first.org/cvss/specification-document This is a message we will try to use for storing various versions of CVSS rather than making a separate proto for storing a specific version.", +"id": "CVSS", +"properties": { +"attackComplexity": { +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH", +"ATTACK_COMPLEXITY_MEDIUM" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +}, +"authentication": { +"enum": [ +"AUTHENTICATION_UNSPECIFIED", +"AUTHENTICATION_MULTIPLE", +"AUTHENTICATION_SINGLE", +"AUTHENTICATION_NONE" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"availabilityImpact": { +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE", +"IMPACT_PARTIAL", +"IMPACT_COMPLETE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "float", +"type": "number" +}, +"confidentialityImpact": { +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE", +"IMPACT_PARTIAL", +"IMPACT_COMPLETE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"exploitabilityScore": { +"format": "float", +"type": "number" +}, +"impactScore": { +"format": "float", +"type": "number" +}, +"integrityImpact": { +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE", +"IMPACT_PARTIAL", +"IMPACT_COMPLETE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"privilegesRequired": { +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"scope": { +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"userInteraction": { +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"Category": { +"description": "The category to which the update belongs.", +"id": "Category", +"properties": { +"categoryId": { +"description": "The identifier of the category.", +"type": "string" +}, +"name": { +"description": "The localized name of the category.", +"type": "string" +} +}, +"type": "object" +}, +"CloudRepoSourceContext": { +"description": "A CloudRepoSourceContext denotes a particular revision in a Google Cloud Source Repo.", +"id": "CloudRepoSourceContext", +"properties": { +"aliasContext": { +"$ref": "AliasContext", +"description": "An alias, which may be a branch or tag." +}, +"repoId": { +"$ref": "RepoId", +"description": "The ID of the repo." +}, +"revisionId": { +"description": "A revision ID.", +"type": "string" +} +}, +"type": "object" +}, +"Command": { +"description": "Command describes a step performed as part of the build pipeline.", +"id": "Command", +"properties": { +"args": { +"description": "Command-line arguments used when executing this command.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dir": { +"description": "Working directory (relative to project source root) used when running this command.", +"type": "string" +}, +"env": { +"description": "Environment variables set before running this command.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Optional unique identifier for this command, used in wait_for to reference this command as a dependency.", +"type": "string" +}, +"name": { +"description": "Required. Name of the command, as presented on the command line, or if the command is packaged as a Docker container, as presented to `docker pull`.", +"type": "string" +}, +"waitFor": { +"description": "The ID(s) of the command(s) that this command depends on.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Completeness": { +"description": "Indicates that the builder claims certain fields in this message to be complete.", +"id": "Completeness", +"properties": { +"arguments": { +"description": "If true, the builder claims that recipe.arguments is complete, meaning that all external inputs are properly captured in the recipe.", +"type": "boolean" +}, +"environment": { +"description": "If true, the builder claims that recipe.environment is claimed to be complete.", +"type": "boolean" +}, +"materials": { +"description": "If true, the builder claims that materials are complete, usually through some controls to prevent network access. Sometimes called \"hermetic\".", +"type": "boolean" +} +}, +"type": "object" +}, +"ComplianceOccurrence": { +"description": "An indication that the compliance checks in the associated ComplianceNote were not satisfied for particular resources or a specified reason.", +"id": "ComplianceOccurrence", +"properties": { +"nonComplianceReason": { +"type": "string" +}, +"nonCompliantFiles": { +"items": { +"$ref": "NonCompliantFile" +}, +"type": "array" +} +}, +"type": "object" +}, +"DSSEAttestationOccurrence": { +"description": "Deprecated. Prefer to use a regular Occurrence, and populate the Envelope at the top level of the Occurrence.", +"id": "DSSEAttestationOccurrence", +"properties": { +"envelope": { +"$ref": "Envelope", +"description": "If doing something security critical, make sure to verify the signatures in this metadata." +}, +"statement": { +"$ref": "InTotoStatement" +} +}, +"type": "object" +}, +"DeploymentOccurrence": { +"description": "The period during which some deployable was active in a runtime.", +"id": "DeploymentOccurrence", +"properties": { +"address": { +"description": "Address of the runtime element hosting this deployment.", +"type": "string" +}, +"config": { +"description": "Configuration used to create this deployment.", +"type": "string" +}, +"deployTime": { +"description": "Required. Beginning of the lifetime of this deployment.", +"format": "google-datetime", +"type": "string" +}, +"platform": { +"description": "Platform hosting this deployment.", +"enum": [ +"PLATFORM_UNSPECIFIED", +"GKE", +"FLEX", +"CUSTOM" +], +"enumDescriptions": [ +"Unknown.", +"Google Container Engine.", +"Google App Engine: Flexible Environment.", +"Custom user-defined platform." +], +"type": "string" +}, +"resourceUri": { +"description": "Output only. Resource URI for the artifact being deployed taken from the deployable field with the same name.", +"items": { +"type": "string" +}, +"type": "array" +}, +"undeployTime": { +"description": "End of the lifetime of this deployment.", +"format": "google-datetime", +"type": "string" +}, +"userEmail": { +"description": "Identity of the user that triggered this deployment.", +"type": "string" +} +}, +"type": "object" +}, +"DiscoveryOccurrence": { +"description": "Provides information about the analysis status of a discovered resource.", +"id": "DiscoveryOccurrence", +"properties": { +"analysisCompleted": { +"$ref": "AnalysisCompleted" +}, +"analysisError": { +"description": "Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.", +"items": { +"$ref": "Status" +}, +"type": "array" +}, +"analysisStatus": { +"description": "The status of discovery for the resource.", +"enum": [ +"ANALYSIS_STATUS_UNSPECIFIED", +"PENDING", +"SCANNING", +"FINISHED_SUCCESS", +"COMPLETE", +"FINISHED_FAILED", +"FINISHED_UNSUPPORTED" +], +"enumDescriptions": [ +"Unknown.", +"Resource is known but no action has been taken yet.", +"Resource is being analyzed.", +"Analysis has finished successfully.", +"Analysis has completed.", +"Analysis has finished unsuccessfully, the analysis itself is in a bad state.", +"The resource is known not to be supported." +], +"type": "string" +}, +"analysisStatusError": { +"$ref": "Status", +"description": "When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API." +}, +"archiveTime": { +"description": "Output only. The time occurrences related to this discovery occurrence were archived.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"continuousAnalysis": { +"description": "Whether the resource is continuously analyzed.", +"enum": [ +"CONTINUOUS_ANALYSIS_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unknown.", +"The resource is continuously analyzed.", +"The resource is ignored for continuous analysis." +], +"type": "string" +}, +"cpe": { +"description": "The CPE of the resource being scanned.", +"type": "string" +}, +"lastScanTime": { +"description": "The last time this resource was scanned.", +"format": "google-datetime", +"type": "string" +}, +"sbomStatus": { +"$ref": "SBOMStatus", +"description": "The status of an SBOM generation." +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Envelope": { +"description": "MUST match https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An authenticated message of arbitrary type.", +"id": "Envelope", +"properties": { +"payload": { +"format": "byte", +"type": "string" +}, +"payloadType": { +"type": "string" +}, +"signatures": { +"items": { +"$ref": "EnvelopeSignature" +}, +"type": "array" +} +}, +"type": "object" +}, +"EnvelopeSignature": { +"id": "EnvelopeSignature", +"properties": { +"keyid": { +"type": "string" +}, +"sig": { +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"FileHashes": { +"description": "Container message for hashes of byte content of files, used in source messages to verify integrity of source input to the build.", +"id": "FileHashes", +"properties": { +"fileHash": { +"description": "Required. Collection of file hashes.", +"items": { +"$ref": "Hash" +}, +"type": "array" +} +}, +"type": "object" +}, +"FileLocation": { +"description": "Indicates the location at which a package was found.", +"id": "FileLocation", +"properties": { +"filePath": { +"description": "For jars that are contained inside .war files, this filepath can indicate the path to war file combined with the path to jar file.", +"type": "string" +} +}, +"type": "object" +}, +"Fingerprint": { +"description": "A set of properties that uniquely identify a given Docker image.", +"id": "Fingerprint", +"properties": { +"v1Name": { +"description": "Required. The layer ID of the final layer in the Docker image's v1 representation.", +"type": "string" +}, +"v2Blob": { +"description": "Required. The ordered list of v2 blobs that represent a given image.", +"items": { +"type": "string" +}, +"type": "array" +}, +"v2Name": { +"description": "Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + \" \" + v2_name[N+1]) Only the name of the final blob is kept.", +"type": "string" +} +}, +"type": "object" +}, +"GerritSourceContext": { +"description": "A SourceContext referring to a Gerrit project.", +"id": "GerritSourceContext", +"properties": { +"aliasContext": { +"$ref": "AliasContext", +"description": "An alias, which may be a branch or tag." +}, +"gerritProject": { +"description": "The full project name within the host. Projects may be nested, so \"project/subproject\" is a valid project name. The \"repo name\" is the hostURI/project.", +"type": "string" +}, +"hostUri": { +"description": "The URI of a running Gerrit instance.", +"type": "string" +}, +"revisionId": { +"description": "A revision (commit) ID.", +"type": "string" +} +}, +"type": "object" +}, +"GitSourceContext": { +"description": "A GitSourceContext denotes a particular revision in a third party Git repository (e.g., GitHub).", +"id": "GitSourceContext", +"properties": { +"revisionId": { +"description": "Git commit hash.", +"type": "string" +}, +"url": { +"description": "Git repository URL.", +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1FileLocation": { +"description": "Indicates the location at which a package was found.", +"id": "GrafeasV1FileLocation", +"properties": { +"filePath": { +"description": "For jars that are contained inside .war files, this filepath can indicate the path to war file combined with the path to jar file.", +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder": { +"description": "Identifies the entity that executed the recipe, which is trusted to have correctly performed the operation and populated this provenance.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder", +"properties": { +"id": { +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness": { +"description": "Indicates that the builder claims certain fields in this message to be complete.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness", +"properties": { +"environment": { +"type": "boolean" +}, +"materials": { +"type": "boolean" +}, +"parameters": { +"type": "boolean" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource": { +"description": "Describes where the config file that kicked off the build came from. This is effectively a pointer to the source where buildConfig came from.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"entryPoint": { +"type": "string" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation": { +"description": "Identifies the event that kicked off the build.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation", +"properties": { +"configSource": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource" +}, +"environment": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"parameters": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial": { +"description": "The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata": { +"description": "Other properties of the build.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata", +"properties": { +"buildFinishedOn": { +"format": "google-datetime", +"type": "string" +}, +"buildInvocationId": { +"type": "string" +}, +"buildStartedOn": { +"format": "google-datetime", +"type": "string" +}, +"completeness": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness" +}, +"reproducible": { +"type": "boolean" +} +}, +"type": "object" +}, +"Hash": { +"description": "Container message for hash values.", +"id": "Hash", +"properties": { +"type": { +"description": "Required. The type of hash that was performed, e.g. \"SHA-256\".", +"type": "string" +}, +"value": { +"description": "Required. The hash value.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"Identity": { +"description": "The unique identifier of the update.", +"id": "Identity", +"properties": { +"revision": { +"description": "The revision number of the update.", +"format": "int32", +"type": "integer" +}, +"updateId": { +"description": "The revision independent identifier of the update.", +"type": "string" +} +}, +"type": "object" +}, +"ImageOccurrence": { +"description": "Details of the derived image portion of the DockerImage relationship. This image would be produced from a Dockerfile with FROM .", +"id": "ImageOccurrence", +"properties": { +"baseResourceUrl": { +"description": "Output only. This contains the base image URL for the derived image occurrence.", +"type": "string" +}, +"distance": { +"description": "Output only. The number of layers by which this image differs from the associated image basis.", +"format": "int32", +"type": "integer" +}, +"fingerprint": { +"$ref": "Fingerprint", +"description": "Required. The fingerprint of the derived image." +}, +"layerInfo": { +"description": "This contains layer-specific metadata, if populated it has length \"distance\" and is ordered with [distance] being the layer immediately following the base image and [1] being the final layer.", +"items": { +"$ref": "Layer" +}, +"type": "array" +} +}, +"type": "object" +}, +"InTotoProvenance": { +"id": "InTotoProvenance", +"properties": { +"builderConfig": { +"$ref": "BuilderConfig", +"description": "required" +}, +"materials": { +"description": "The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on. This is considered to be incomplete unless metadata.completeness.materials is true. Unset or null is equivalent to empty.", +"items": { +"type": "string" +}, +"type": "array" +}, +"metadata": { +"$ref": "Metadata" +}, +"recipe": { +"$ref": "Recipe", +"description": "Identifies the configuration used for the build. When combined with materials, this SHOULD fully describe the build, such that re-running this recipe results in bit-for-bit identical output (if the build is reproducible). required" +} +}, +"type": "object" +}, +"InTotoSlsaProvenanceV1": { +"id": "InTotoSlsaProvenanceV1", +"properties": { +"_type": { +"description": "InToto spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement", +"type": "string" +}, +"predicate": { +"$ref": "SlsaProvenanceV1" +}, +"predicateType": { +"type": "string" +}, +"subject": { +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"InTotoStatement": { +"description": "Spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement The serialized InTotoStatement will be stored as Envelope.payload. Envelope.payloadType is always \"application/vnd.in-toto+json\".", +"id": "InTotoStatement", +"properties": { +"_type": { +"description": "Always `https://in-toto.io/Statement/v0.1`.", +"type": "string" +}, +"predicateType": { +"description": "`https://slsa.dev/provenance/v0.1` for SlsaProvenance.", +"type": "string" +}, +"provenance": { +"$ref": "InTotoProvenance" +}, +"slsaProvenance": { +"$ref": "SlsaProvenance" +}, +"slsaProvenanceZeroTwo": { +"$ref": "SlsaProvenanceZeroTwo" +}, +"subject": { +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"Justification": { +"description": "Justification provides the justification when the state of the assessment if NOT_AFFECTED.", +"id": "Justification", +"properties": { +"details": { +"description": "Additional details on why this justification was chosen.", +"type": "string" +}, +"justificationType": { +"description": "The justification type for this vulnerability.", +"enum": [ +"JUSTIFICATION_TYPE_UNSPECIFIED", +"COMPONENT_NOT_PRESENT", +"VULNERABLE_CODE_NOT_PRESENT", +"VULNERABLE_CODE_NOT_IN_EXECUTE_PATH", +"VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY", +"INLINE_MITIGATIONS_ALREADY_EXIST" +], +"enumDescriptions": [ +"JUSTIFICATION_TYPE_UNSPECIFIED.", +"The vulnerable component is not present in the product.", +"The vulnerable code is not present. Typically this case occurs when source code is configured or built in a way that excludes the vulnerable code.", +"The vulnerable code can not be executed. Typically this case occurs when the product includes the vulnerable code but does not call or use the vulnerable code.", +"The vulnerable code cannot be controlled by an attacker to exploit the vulnerability.", +"The product includes built-in protections or features that prevent exploitation of the vulnerability. These built-in protections cannot be subverted by the attacker and cannot be configured or disabled by the user. These mitigations completely prevent exploitation based on known attack vectors." +], +"type": "string" +} +}, +"type": "object" +}, +"Jwt": { +"id": "Jwt", +"properties": { +"compactJwt": { +"description": "The compact encoding of a JWS, which is always three base64 encoded strings joined by periods. For details, see: https://tools.ietf.org/html/rfc7515.html#section-3.1", +"type": "string" +} +}, +"type": "object" +}, +"LanguagePackageDependency": { +"description": "Indicates a language package available between this package and the customer's resource artifact.", +"id": "LanguagePackageDependency", +"properties": { +"package": { +"type": "string" +}, +"version": { +"type": "string" +} +}, +"type": "object" +}, +"Layer": { +"description": "Layer holds metadata specific to a layer of a Docker image.", +"id": "Layer", +"properties": { +"arguments": { +"description": "The recovered arguments to the Dockerfile directive.", +"type": "string" +}, +"directive": { +"description": "Required. The recovered Dockerfile directive used to construct this layer. See https://docs.docker.com/engine/reference/builder/ for more information.", +"type": "string" +} +}, +"type": "object" +}, +"License": { +"description": "License information.", +"id": "License", +"properties": { +"comments": { +"description": "Comments", +"type": "string" +}, +"expression": { +"description": "Often a single license can be used to represent the licensing terms. Sometimes it is necessary to include a choice of one or more licenses or some combination of license identifiers. Examples: \"LGPL-2.1-only OR MIT\", \"LGPL-2.1-only AND MIT\", \"GPL-2.0-or-later WITH Bison-exception-2.2\".", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVulnerabilitiesResponseV1": { +"description": "ListVulnerabilitiesResponse contains a single page of vulnerabilities resulting from a scan.", +"id": "ListVulnerabilitiesResponseV1", +"properties": { +"nextPageToken": { +"description": "A page token that can be used in a subsequent call to ListVulnerabilities to continue retrieving results.", +"type": "string" +}, +"occurrences": { +"description": "The list of Vulnerability Occurrences resulting from a scan.", +"items": { +"$ref": "Occurrence" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "An occurrence of a particular package installation found within a system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.", +"id": "Location", +"properties": { +"cpeUri": { +"description": "Deprecated. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)", +"type": "string" +}, +"path": { +"description": "The path from which we gathered that this package/version is installed.", +"type": "string" +}, +"version": { +"$ref": "Version", +"description": "Deprecated. The version installed at this location." +} +}, +"type": "object" +}, +"Maintainer": { +"id": "Maintainer", +"properties": { +"email": { +"type": "string" +}, +"kind": { +"type": "string" +}, +"name": { +"type": "string" +}, +"url": { +"type": "string" +} +}, +"type": "object" +}, +"Material": { +"id": "Material", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"Metadata": { +"description": "Other properties of the build.", +"id": "Metadata", +"properties": { +"buildFinishedOn": { +"description": "The timestamp of when the build completed.", +"format": "google-datetime", +"type": "string" +}, +"buildInvocationId": { +"description": "Identifies the particular build invocation, which can be useful for finding associated logs or other ad-hoc analysis. The value SHOULD be globally unique, per in-toto Provenance spec.", +"type": "string" +}, +"buildStartedOn": { +"description": "The timestamp of when the build started.", +"format": "google-datetime", +"type": "string" +}, +"completeness": { +"$ref": "Completeness", +"description": "Indicates that the builder claims certain fields in this message to be complete." +}, +"reproducible": { +"description": "If true, the builder claims that running the recipe on materials will produce bit-for-bit identical output.", +"type": "boolean" +} +}, +"type": "object" +}, +"NonCompliantFile": { +"description": "Details about files that caused a compliance check to fail. display_command is a single command that can be used to display a list of non compliant files. When there is no such command, we can also iterate a list of non compliant file using 'path'.", +"id": "NonCompliantFile", +"properties": { +"displayCommand": { +"description": "Command to display the non-compliant files.", +"type": "string" +}, +"path": { +"description": "Empty if `display_command` is set.", +"type": "string" +}, +"reason": { +"description": "Explains why a file is non compliant for a CIS check.", +"type": "string" +} +}, +"type": "object" +}, +"Occurrence": { +"description": "An instance of an analysis type that has been found on a resource.", +"id": "Occurrence", +"properties": { +"attestation": { +"$ref": "AttestationOccurrence", +"description": "Describes an attestation of an artifact." +}, +"build": { +"$ref": "BuildOccurrence", +"description": "Describes a verifiable build." +}, +"compliance": { +"$ref": "ComplianceOccurrence", +"description": "Describes a compliance violation on a linked resource." +}, +"createTime": { +"description": "Output only. The time this occurrence was created.", +"format": "google-datetime", +"type": "string" +}, +"deployment": { +"$ref": "DeploymentOccurrence", +"description": "Describes the deployment of an artifact on a runtime." +}, +"discovery": { +"$ref": "DiscoveryOccurrence", +"description": "Describes when a resource was discovered." +}, +"dsseAttestation": { +"$ref": "DSSEAttestationOccurrence", +"description": "Describes an attestation of an artifact using dsse." +}, +"envelope": { +"$ref": "Envelope", +"description": "https://github.com/secure-systems-lab/dsse" +}, +"image": { +"$ref": "ImageOccurrence", +"description": "Describes how this resource derives from the basis in the associated note." +}, +"kind": { +"description": "Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests.", +"enum": [ +"NOTE_KIND_UNSPECIFIED", +"VULNERABILITY", +"BUILD", +"IMAGE", +"PACKAGE", +"DEPLOYMENT", +"DISCOVERY", +"ATTESTATION", +"UPGRADE", +"COMPLIANCE", +"DSSE_ATTESTATION", +"VULNERABILITY_ASSESSMENT", +"SBOM_REFERENCE" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The note and occurrence represent a package vulnerability.", +"The note and occurrence assert build provenance.", +"This represents an image basis relationship.", +"This represents a package installed via a package manager.", +"The note and occurrence track deployment events.", +"The note and occurrence track the initial discovery status of a resource.", +"This represents a logical \"role\" that can attest to artifacts.", +"This represents an available package upgrade.", +"This represents a Compliance Note", +"This represents a DSSE attestation Note", +"This represents a Vulnerability Assessment.", +"This represents an SBOM Reference." +], +"type": "string" +}, +"name": { +"description": "Output only. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.", +"type": "string" +}, +"noteName": { +"description": "Required. Immutable. The analysis note associated with this occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used as a filter in list requests.", +"type": "string" +}, +"package": { +"$ref": "PackageOccurrence", +"description": "Describes the installation of a package on the linked resource." +}, +"remediation": { +"description": "A description of actions that can be taken to remedy the note.", +"type": "string" +}, +"resourceUri": { +"description": "Required. Immutable. A URI that represents the resource for which the occurrence applies. For example, `https://gcr.io/project/image@sha256:123abc` for a Docker image.", +"type": "string" +}, +"sbomReference": { +"$ref": "SBOMReferenceOccurrence", +"description": "Describes a specific SBOM reference occurrences." +}, +"updateTime": { +"description": "Output only. The time this occurrence was last updated.", +"format": "google-datetime", +"type": "string" +}, +"upgrade": { +"$ref": "UpgradeOccurrence", +"description": "Describes an available package upgrade on the linked resource." +}, +"vulnerability": { +"$ref": "VulnerabilityOccurrence", +"description": "Describes a security vulnerability." +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"PackageData": { +"id": "PackageData", +"properties": { +"architecture": { +"description": "The architecture of the package.", +"type": "string" +}, +"binarySourceInfo": { +"description": "A bundle containing the binary and source information.", +"items": { +"$ref": "BinarySourceInfo" +}, +"type": "array" +}, +"binaryVersion": { +"$ref": "PackageVersion", +"description": "DEPRECATED" +}, +"cpeUri": { +"description": "The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in which the vulnerability may manifest. Examples include distro or storage location for vulnerable jar.", +"type": "string" +}, +"dependencyChain": { +"description": "The dependency chain between this package and the user's artifact. List in order from the customer's package under review first, to the current package last. Inclusive of the original package and the current package.", +"items": { +"$ref": "LanguagePackageDependency" +}, +"type": "array" +}, +"fileLocation": { +"description": "The path to the jar file / go binary file.", +"items": { +"$ref": "FileLocation" +}, +"type": "array" +}, +"hashDigest": { +"description": "HashDigest stores the SHA512 hash digest of the jar file if the package is of type Maven. This field will be unset for non Maven packages.", +"type": "string" +}, +"licenses": { +"description": "The list of licenses found that are related to a given package. Note that licenses may also be stored on the BinarySourceInfo. If there is no BinarySourceInfo (because there's no concept of source vs binary), then it will be stored here, while if there are BinarySourceInfos, it will be stored there, as one source can have multiple binaries with different licenses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"maintainer": { +"$ref": "Maintainer", +"description": "The maintainer of the package." +}, +"os": { +"description": "The OS affected by a vulnerability Used to generate the cpe_uri for OS packages", +"type": "string" +}, +"osVersion": { +"description": "The version of the OS Used to generate the cpe_uri for OS packages", +"type": "string" +}, +"package": { +"description": "The package being analysed for vulnerabilities", +"type": "string" +}, +"packageType": { +"description": "The type of package: os, maven, go, etc.", +"enum": [ +"PACKAGE_TYPE_UNSPECIFIED", +"OS", +"MAVEN", +"GO", +"GO_STDLIB", +"PYPI", +"NPM", +"NUGET", +"RUBYGEMS", +"RUST", +"COMPOSER" +], +"enumDescriptions": [ +"", +"Operating System", +"Java packages from Maven.", +"Go third-party packages.", +"Go toolchain + standard library packages.", +"Python packages.", +"NPM packages.", +"Nuget (C#/.NET) packages.", +"Ruby packges (from RubyGems package manager).", +"Rust packages from Cargo (Github ecosystem is `RUST`).", +"PHP packages from Composer package manager." +], +"type": "string" +}, +"patchedCve": { +"description": "CVEs that this package is no longer vulnerable to go/drydock-dd-custom-binary-scanning", +"items": { +"type": "string" +}, +"type": "array" +}, +"sourceVersion": { +"$ref": "PackageVersion", +"description": "DEPRECATED" +}, +"unused": { +"type": "string" +}, +"version": { +"description": "The version of the package being analysed", +"type": "string" +} +}, +"type": "object" +}, +"PackageIssue": { +"description": "A detail for a distro and package this vulnerability occurrence was found in and its associated fix (if one is available).", +"id": "PackageIssue", +"properties": { +"affectedCpeUri": { +"description": "Required. The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was found in.", +"type": "string" +}, +"affectedPackage": { +"description": "Required. The package this vulnerability was found in.", +"type": "string" +}, +"affectedVersion": { +"$ref": "Version", +"description": "Required. The version of the package that is installed on the resource affected by this vulnerability." +}, +"effectiveSeverity": { +"description": "Output only. The distro or language system assigned severity for this vulnerability when that is available and note provider assigned severity when it is not available.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"MINIMAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Unknown.", +"Minimal severity.", +"Low severity.", +"Medium severity.", +"High severity.", +"Critical severity." +], +"readOnly": true, +"type": "string" +}, +"fileLocation": { +"description": "The location at which this package was found.", +"items": { +"$ref": "GrafeasV1FileLocation" +}, +"type": "array" +}, +"fixAvailable": { +"description": "Output only. Whether a fix is available for this package.", +"type": "boolean" +}, +"fixedCpeUri": { +"description": "The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was fixed in. It is possible for this to be different from the affected_cpe_uri.", +"type": "string" +}, +"fixedPackage": { +"description": "The package this vulnerability was fixed in. It is possible for this to be different from the affected_package.", +"type": "string" +}, +"fixedVersion": { +"$ref": "Version", +"description": "Required. The version of the package this vulnerability was fixed in. Setting this to VersionKind.MAXIMUM means no fix is yet available." +}, +"packageType": { +"description": "The type of package (e.g. OS, MAVEN, GO).", +"type": "string" +} +}, +"type": "object" +}, +"PackageOccurrence": { +"description": "Details on how a particular software package was installed on a system.", +"id": "PackageOccurrence", +"properties": { +"architecture": { +"description": "Output only. The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.", +"enum": [ +"ARCHITECTURE_UNSPECIFIED", +"X86", +"X64" +], +"enumDescriptions": [ +"Unknown architecture.", +"X86 architecture.", +"X64 architecture." +], +"readOnly": true, +"type": "string" +}, +"cpeUri": { +"description": "Output only. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. The cpe_uri will be blank for language packages.", +"readOnly": true, +"type": "string" +}, +"license": { +"$ref": "License", +"description": "Licenses that have been declared by the authors of the package." +}, +"location": { +"description": "All of the places within the filesystem versions of this package have been found.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"name": { +"description": "Required. Output only. The name of the installed package.", +"readOnly": true, +"type": "string" +}, +"packageType": { +"description": "Output only. The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).", +"readOnly": true, +"type": "string" +}, +"version": { +"$ref": "Version", +"description": "Output only. The version of the package.", +"readOnly": true +} +}, +"type": "object" +}, +"PackageVersion": { +"id": "PackageVersion", +"properties": { +"licenses": { +"description": "The licenses associated with this package. Note that this has to go on the PackageVersion level, because we can have cases with images with the same source having different licences. E.g. in Alpine, musl and musl-utils both have the same origin musl, but have different sets of licenses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"type": "string" +}, +"version": { +"type": "string" +} +}, +"type": "object" +}, +"ProjectRepoId": { +"description": "Selects a repo using a Google Cloud Platform project ID (e.g., winged-cargo-31) and a repo name within that project.", +"id": "ProjectRepoId", +"properties": { +"projectId": { +"description": "The ID of the project.", +"type": "string" +}, +"repoName": { +"description": "The name of the repo. Leave empty for the default repo.", +"type": "string" +} +}, +"type": "object" +}, +"ProvenanceBuilder": { +"id": "ProvenanceBuilder", +"properties": { +"builderDependencies": { +"items": { +"$ref": "ResourceDescriptor" +}, +"type": "array" +}, +"id": { +"type": "string" +}, +"version": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +} +}, +"type": "object" +}, +"Recipe": { +"description": "Steps taken to build the artifact. For a TaskRun, typically each container corresponds to one step in the recipe.", +"id": "Recipe", +"properties": { +"arguments": { +"description": "Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were \"make\", then this might be the flags passed to make aside from the target, which is captured in recipe.entryPoint. Since the arguments field can greatly vary in structure, depending on the builder and recipe type, this is of form \"Any\".", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"definedInMaterial": { +"description": "Index in materials containing the recipe steps that are not implied by recipe.type. For example, if the recipe type were \"make\", then this would point to the source containing the Makefile, not the make program itself. Set to -1 if the recipe doesn't come from a material, as zero is default unset value for int64.", +"format": "int64", +"type": "string" +}, +"entryPoint": { +"description": "String identifying the entry point into the build. This is often a path to a configuration file and/or a target label within that file. The syntax and meaning are defined by recipe.type. For example, if the recipe type were \"make\", then this would reference the directory in which to run make as well as which target to use.", +"type": "string" +}, +"environment": { +"description": "Any other builder-controlled inputs necessary for correctly evaluating the recipe. Usually only needed for reproducing the build but not evaluated as part of policy. Since the environment field can greatly vary in structure, depending on the builder and recipe type, this is of form \"Any\".", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"type": { +"description": "URI indicating what type of recipe was performed. It determines the meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.", +"type": "string" +} +}, +"type": "object" +}, +"RelatedUrl": { +"description": "Metadata for any related URL information.", +"id": "RelatedUrl", +"properties": { +"label": { +"description": "Label to describe usage of the URL.", +"type": "string" +}, +"url": { +"description": "Specific URL associated with the resource.", +"type": "string" +} +}, +"type": "object" +}, +"Remediation": { +"description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", +"id": "Remediation", +"properties": { +"details": { +"description": "Contains a comprehensive human-readable discussion of the remediation.", +"type": "string" +}, +"remediationType": { +"description": "The type of remediation that can be applied.", +"enum": [ +"REMEDIATION_TYPE_UNSPECIFIED", +"MITIGATION", +"NO_FIX_PLANNED", +"NONE_AVAILABLE", +"VENDOR_FIX", +"WORKAROUND" +], +"enumDescriptions": [ +"No remediation type specified.", +"A MITIGATION is available.", +"No fix is planned.", +"Not available.", +"A vendor fix is available.", +"A workaround is available." +], +"type": "string" +}, +"remediationUri": { +"$ref": "RelatedUrl", +"description": "Contains the URL where to obtain the remediation." +} +}, +"type": "object" +}, +"RepoId": { +"description": "A unique identifier for a Cloud Repo.", +"id": "RepoId", +"properties": { +"projectRepoId": { +"$ref": "ProjectRepoId", +"description": "A combination of a project ID and a repo name." +}, +"uid": { +"description": "A server-assigned, globally unique identifier.", +"type": "string" +} +}, +"type": "object" +}, +"ResourceDescriptor": { +"id": "ResourceDescriptor", +"properties": { +"annotations": { +"additionalProperties": { +"type": "any" +}, +"type": "object" +}, +"content": { +"format": "byte", +"type": "string" +}, +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"downloadLocation": { +"type": "string" +}, +"mediaType": { +"type": "string" +}, +"name": { +"type": "string" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"RunDetails": { +"id": "RunDetails", +"properties": { +"builder": { +"$ref": "ProvenanceBuilder" +}, +"byproducts": { +"items": { +"$ref": "ResourceDescriptor" +}, +"type": "array" +}, +"metadata": { +"$ref": "BuildMetadata" +} +}, +"type": "object" +}, +"SBOMReferenceOccurrence": { +"description": "The occurrence representing an SBOM reference as applied to a specific resource. The occurrence follows the DSSE specification. See https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more details.", +"id": "SBOMReferenceOccurrence", +"properties": { +"payload": { +"$ref": "SbomReferenceIntotoPayload", +"description": "The actual payload that contains the SBOM reference data." +}, +"payloadType": { +"description": "The kind of payload that SbomReferenceIntotoPayload takes. Since it's in the intoto format, this value is expected to be 'application/vnd.in-toto+json'.", +"type": "string" +}, +"signatures": { +"description": "The signatures over the payload.", +"items": { +"$ref": "EnvelopeSignature" +}, +"type": "array" +} +}, +"type": "object" +}, +"SBOMStatus": { +"description": "The status of an SBOM generation.", +"id": "SBOMStatus", +"properties": { +"error": { +"description": "If there was an error generating an SBOM, this will indicate what that error was.", +"type": "string" +}, +"sbomState": { +"description": "The progress of the SBOM generation.", +"enum": [ +"SBOM_STATE_UNSPECIFIED", +"PENDING", +"COMPLETE" +], +"enumDescriptions": [ +"Default unknown state.", +"SBOM scanning is pending.", +"SBOM scanning has completed." +], +"type": "string" +} +}, +"type": "object" +}, +"SbomReferenceIntotoPayload": { +"description": "The actual payload that contains the SBOM Reference data. The payload follows the intoto statement specification. See https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for more details.", +"id": "SbomReferenceIntotoPayload", +"properties": { +"_type": { +"description": "Identifier for the schema of the Statement.", +"type": "string" +}, +"predicate": { +"$ref": "SbomReferenceIntotoPredicate", +"description": "Additional parameters of the Predicate. Includes the actual data about the SBOM." +}, +"predicateType": { +"description": "URI identifying the type of the Predicate.", +"type": "string" +}, +"subject": { +"description": "Set of software artifacts that the attestation applies to. Each element represents a single software artifact.", +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"SbomReferenceIntotoPredicate": { +"description": "A predicate which describes the SBOM being referenced.", +"id": "SbomReferenceIntotoPredicate", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of algorithm to digest of the contents of the SBOM.", +"type": "object" +}, +"location": { +"description": "The location of the SBOM.", +"type": "string" +}, +"mimeType": { +"description": "The mime type of the SBOM.", +"type": "string" +}, +"referrerId": { +"description": "The person or system referring this predicate to the consumer.", +"type": "string" +} +}, +"type": "object" +}, +"Signature": { +"description": "Verifiers (e.g. Kritis implementations) MUST verify signatures with respect to the trust anchors defined in policy (e.g. a Kritis policy). Typically this means that the verifier has been configured with a map from `public_key_id` to public key material (and any required parameters, e.g. signing algorithm). In particular, verification implementations MUST NOT treat the signature `public_key_id` as anything more than a key lookup hint. The `public_key_id` DOES NOT validate or authenticate a public key; it only provides a mechanism for quickly selecting a public key ALREADY CONFIGURED on the verifier through a trusted channel. Verification implementations MUST reject signatures in any of the following circumstances: * The `public_key_id` is not recognized by the verifier. * The public key that `public_key_id` refers to does not verify the signature with respect to the payload. The `signature` contents SHOULD NOT be \"attached\" (where the payload is included with the serialized `signature` bytes). Verifiers MUST ignore any \"attached\" payload and only verify signatures with respect to explicitly provided payload (e.g. a `payload` field on the proto message that holds this Signature, or the canonical serialization of the proto message that holds this signature).", +"id": "Signature", +"properties": { +"publicKeyId": { +"description": "The identifier for the public key that verifies this signature. * The `public_key_id` is required. * The `public_key_id` SHOULD be an RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an immutable reference, such as a cryptographic digest. Examples of valid `public_key_id`s: OpenPGP V4 public key fingerprint: * \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\" See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER serialization): * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\" * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\"", +"type": "string" +}, +"signature": { +"description": "The content of the signature, an opaque bytestring. The payload that this signature verifies MUST be unambiguously provided with the Signature during verification. A wrapper message might provide the payload explicitly. Alternatively, a message might have a canonical serialization that can always be unambiguously computed to derive the payload.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"SlsaBuilder": { +"id": "SlsaBuilder", +"properties": { +"id": { +"type": "string" +} +}, +"type": "object" +}, +"SlsaCompleteness": { +"description": "Indicates that the builder claims certain fields in this message to be complete.", +"id": "SlsaCompleteness", +"properties": { +"arguments": { +"description": "If true, the builder claims that recipe.arguments is complete, meaning that all external inputs are properly captured in the recipe.", +"type": "boolean" +}, +"environment": { +"description": "If true, the builder claims that recipe.environment is claimed to be complete.", +"type": "boolean" +}, +"materials": { +"description": "If true, the builder claims that materials are complete, usually through some controls to prevent network access. Sometimes called \"hermetic\".", +"type": "boolean" +} +}, +"type": "object" +}, +"SlsaMetadata": { +"description": "Other properties of the build.", +"id": "SlsaMetadata", +"properties": { +"buildFinishedOn": { +"description": "The timestamp of when the build completed.", +"format": "google-datetime", +"type": "string" +}, +"buildInvocationId": { +"description": "Identifies the particular build invocation, which can be useful for finding associated logs or other ad-hoc analysis. The value SHOULD be globally unique, per in-toto Provenance spec.", +"type": "string" +}, +"buildStartedOn": { +"description": "The timestamp of when the build started.", +"format": "google-datetime", +"type": "string" +}, +"completeness": { +"$ref": "SlsaCompleteness", +"description": "Indicates that the builder claims certain fields in this message to be complete." +}, +"reproducible": { +"description": "If true, the builder claims that running the recipe on materials will produce bit-for-bit identical output.", +"type": "boolean" +} +}, +"type": "object" +}, +"SlsaProvenance": { +"id": "SlsaProvenance", +"properties": { +"builder": { +"$ref": "SlsaBuilder", +"description": "required" +}, +"materials": { +"description": "The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on. This is considered to be incomplete unless metadata.completeness.materials is true. Unset or null is equivalent to empty.", +"items": { +"$ref": "Material" +}, +"type": "array" +}, +"metadata": { +"$ref": "SlsaMetadata" +}, +"recipe": { +"$ref": "SlsaRecipe", +"description": "Identifies the configuration used for the build. When combined with materials, this SHOULD fully describe the build, such that re-running this recipe results in bit-for-bit identical output (if the build is reproducible). required" +} +}, +"type": "object" +}, +"SlsaProvenanceV1": { +"description": "Keep in sync with schema at https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto Builder renamed to ProvenanceBuilder because of Java conflicts.", +"id": "SlsaProvenanceV1", +"properties": { +"buildDefinition": { +"$ref": "BuildDefinition" +}, +"runDetails": { +"$ref": "RunDetails" +} +}, +"type": "object" +}, +"SlsaProvenanceZeroTwo": { +"description": "See full explanation of fields at slsa.dev/provenance/v0.2.", +"id": "SlsaProvenanceZeroTwo", +"properties": { +"buildConfig": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"buildType": { +"type": "string" +}, +"builder": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder" +}, +"invocation": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation" +}, +"materials": { +"items": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial" +}, +"type": "array" +}, +"metadata": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata" +} +}, +"type": "object" +}, +"SlsaRecipe": { +"description": "Steps taken to build the artifact. For a TaskRun, typically each container corresponds to one step in the recipe.", +"id": "SlsaRecipe", +"properties": { +"arguments": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were \"make\", then this might be the flags passed to make aside from the target, which is captured in recipe.entryPoint. Depending on the recipe Type, the structure may be different.", +"type": "object" +}, +"definedInMaterial": { +"description": "Index in materials containing the recipe steps that are not implied by recipe.type. For example, if the recipe type were \"make\", then this would point to the source containing the Makefile, not the make program itself. Set to -1 if the recipe doesn't come from a material, as zero is default unset value for int64.", +"format": "int64", +"type": "string" +}, +"entryPoint": { +"description": "String identifying the entry point into the build. This is often a path to a configuration file and/or a target label within that file. The syntax and meaning are defined by recipe.type. For example, if the recipe type were \"make\", then this would reference the directory in which to run make as well as which target to use.", +"type": "string" +}, +"environment": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Any other builder-controlled inputs necessary for correctly evaluating the recipe. Usually only needed for reproducing the build but not evaluated as part of policy. Depending on the recipe Type, the structure may be different.", +"type": "object" +}, +"type": { +"description": "URI indicating what type of recipe was performed. It determines the meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.", +"type": "string" +} +}, +"type": "object" +}, +"Source": { +"description": "Source describes the location of the source used for the build.", +"id": "Source", +"properties": { +"additionalContexts": { +"description": "If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.", +"items": { +"$ref": "SourceContext" +}, +"type": "array" +}, +"artifactStorageSourceUri": { +"description": "If provided, the input binary artifacts for the build came from this location.", +"type": "string" +}, +"context": { +"$ref": "SourceContext", +"description": "If provided, the source code used for the build came from this location." +}, +"fileHashes": { +"additionalProperties": { +"$ref": "FileHashes" +}, +"description": "Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.", +"type": "object" +} +}, +"type": "object" +}, +"SourceContext": { +"description": "A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory.", +"id": "SourceContext", +"properties": { +"cloudRepo": { +"$ref": "CloudRepoSourceContext", +"description": "A SourceContext referring to a revision in a Google Cloud Source Repo." +}, +"gerrit": { +"$ref": "GerritSourceContext", +"description": "A SourceContext referring to a Gerrit project." +}, +"git": { +"$ref": "GitSourceContext", +"description": "A SourceContext referring to any third party Git repo (e.g., GitHub)." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels with user defined metadata.", +"type": "object" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subject": { +"id": "Subject", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"description": "`\"\": \"\"` Algorithms can be e.g. sha256, sha512 See https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet", +"type": "object" +}, +"name": { +"type": "string" +} +}, +"type": "object" +}, +"UpgradeDistribution": { +"description": "The Upgrade Distribution represents metadata about the Upgrade for each operating system (CPE). Some distributions have additional metadata around updates, classifying them into various categories and severities.", +"id": "UpgradeDistribution", +"properties": { +"classification": { +"description": "The operating system classification of this Upgrade, as specified by the upstream operating system upgrade feed. For Windows the classification is one of the category_ids listed at https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)", +"type": "string" +}, +"cpeUri": { +"description": "Required - The specific operating system this metadata applies to. See https://cpe.mitre.org/specification/.", +"type": "string" +}, +"cve": { +"description": "The cve tied to this Upgrade.", +"items": { +"type": "string" +}, +"type": "array" +}, +"severity": { +"description": "The severity as specified by the upstream operating system.", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeOccurrence": { +"description": "An Upgrade Occurrence represents that a specific resource_url could install a specific upgrade. This presence is supplied via local sources (i.e. it is present in the mirror and the running system has noticed its availability). For Windows, both distribution and windows_update contain information for the Windows update.", +"id": "UpgradeOccurrence", +"properties": { +"distribution": { +"$ref": "UpgradeDistribution", +"description": "Metadata about the upgrade for available for the specific operating system for the resource_url. This allows efficient filtering, as well as making it easier to use the occurrence." +}, +"package": { +"description": "Required for non-Windows OS. The package this Upgrade is for.", +"type": "string" +}, +"parsedVersion": { +"$ref": "Version", +"description": "Required for non-Windows OS. The version of the package in a machine + human readable form." +}, +"windowsUpdate": { +"$ref": "WindowsUpdate", +"description": "Required for Windows OS. Represents the metadata about the Windows update." +} +}, +"type": "object" +}, +"Version": { +"description": "Version contains structured information about the version of a package.", +"id": "Version", +"properties": { +"epoch": { +"description": "Used to correct mistakes in the version numbering scheme.", +"format": "int32", +"type": "integer" +}, +"fullName": { +"description": "Human readable version string. This string is of the form :- and is only set when kind is NORMAL.", +"type": "string" +}, +"inclusive": { +"description": "Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range.", +"type": "boolean" +}, +"kind": { +"description": "Required. Distinguishes between sentinel MIN/MAX versions and normal versions.", +"enum": [ +"VERSION_KIND_UNSPECIFIED", +"NORMAL", +"MINIMUM", +"MAXIMUM" +], +"enumDescriptions": [ +"Unknown.", +"A standard package version.", +"A special version representing negative infinity.", +"A special version representing positive infinity." +], +"type": "string" +}, +"name": { +"description": "Required only when version kind is NORMAL. The main part of the version name.", +"type": "string" +}, +"revision": { +"description": "The iteration of the package build from the above version.", +"type": "string" +} +}, +"type": "object" +}, +"VexAssessment": { +"description": "VexAssessment provides all publisher provided Vex information that is related to this vulnerability.", +"id": "VexAssessment", +"properties": { +"cve": { +"deprecated": true, +"description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. Deprecated: Use vulnerability_id instead to denote CVEs.", +"type": "string" +}, +"impacts": { +"description": "Contains information about the impact of this vulnerability, this will change with time.", +"items": { +"type": "string" +}, +"type": "array" +}, +"justification": { +"$ref": "Justification", +"description": "Justification provides the justification when the state of the assessment if NOT_AFFECTED." +}, +"noteName": { +"description": "The VulnerabilityAssessment note from which this VexAssessment was generated. This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.", +"type": "string" +}, +"relatedUris": { +"description": "Holds a list of references associated with this vulnerability item and assessment.", +"items": { +"$ref": "RelatedUrl" +}, +"type": "array" +}, +"remediations": { +"description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", +"items": { +"$ref": "Remediation" +}, +"type": "array" +}, +"state": { +"description": "Provides the state of this Vulnerability assessment.", +"enum": [ +"STATE_UNSPECIFIED", +"AFFECTED", +"NOT_AFFECTED", +"FIXED", +"UNDER_INVESTIGATION" +], +"enumDescriptions": [ +"No state is specified.", +"This product is known to be affected by this vulnerability.", +"This product is known to be not affected by this vulnerability.", +"This product contains a fix for this vulnerability.", +"It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation." +], +"type": "string" +}, +"vulnerabilityId": { +"description": "The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityOccurrence": { +"description": "An occurrence of a severity vulnerability on a resource.", +"id": "VulnerabilityOccurrence", +"properties": { +"cvssScore": { +"description": "Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity.", +"format": "float", +"type": "number" +}, +"cvssV2": { +"$ref": "CVSS", +"description": "The cvss v2 score for the vulnerability." +}, +"cvssVersion": { +"description": "Output only. CVSS version used to populate cvss_score and severity.", +"enum": [ +"CVSS_VERSION_UNSPECIFIED", +"CVSS_VERSION_2", +"CVSS_VERSION_3" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"cvssv3": { +"$ref": "CVSS", +"description": "The cvss v3 score for the vulnerability." +}, +"effectiveSeverity": { +"description": "The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"MINIMAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Unknown.", +"Minimal severity.", +"Low severity.", +"Medium severity.", +"High severity.", +"Critical severity." +], +"type": "string" +}, +"extraDetails": { +"description": "Occurrence-specific extra details about the vulnerability.", +"type": "string" +}, +"fixAvailable": { +"description": "Output only. Whether at least one of the affected packages has a fix available.", +"type": "boolean" +}, +"longDescription": { +"description": "Output only. A detailed description of this vulnerability.", +"type": "string" +}, +"packageIssue": { +"description": "Required. The set of affected locations and their fixes (if available) within the associated resource.", +"items": { +"$ref": "PackageIssue" +}, +"type": "array" +}, +"relatedUrls": { +"description": "Output only. URLs related to this vulnerability.", +"items": { +"$ref": "RelatedUrl" +}, +"type": "array" +}, +"severity": { +"description": "Output only. The note provider assigned severity of this vulnerability.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"MINIMAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Unknown.", +"Minimal severity.", +"Low severity.", +"Medium severity.", +"High severity.", +"Critical severity." +], +"type": "string" +}, +"shortDescription": { +"description": "Output only. A one sentence description of this vulnerability.", +"type": "string" +}, +"type": { +"description": "The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).", +"type": "string" +}, +"vexAssessment": { +"$ref": "VexAssessment" +} +}, +"type": "object" +}, +"WindowsUpdate": { +"description": "Windows Update represents the metadata about the update for the Windows operating system. The fields in this message come from the Windows Update API documented at https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.", +"id": "WindowsUpdate", +"properties": { +"categories": { +"description": "The list of categories to which the update belongs.", +"items": { +"$ref": "Category" +}, +"type": "array" +}, +"description": { +"description": "The localized description of the update.", +"type": "string" +}, +"identity": { +"$ref": "Identity", +"description": "Required - The unique identifier for the update." +}, +"kbArticleIds": { +"description": "The Microsoft Knowledge Base article IDs that are associated with the update.", +"items": { +"type": "string" +}, +"type": "array" +}, +"lastPublishedTimestamp": { +"description": "The last published timestamp of the update.", +"format": "google-datetime", +"type": "string" +}, +"supportUrl": { +"description": "The hyperlink to the support information for the update.", +"type": "string" +}, +"title": { +"description": "The localized title of the update.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "On-Demand Scanning API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ondemandscanning.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ondemandscanning.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..543551a38efce5b965779c36e3c5636ba22f6eb6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/ondemandscanning.v1beta1.json @@ -0,0 +1,2975 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://ondemandscanning.googleapis.com/", +"batchPath": "batch", +"canonicalName": "On-Demand Scanning", +"description": "A service to scan container images for vulnerabilities.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/container-analysis/docs/on-demand-scanning/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "ondemandscanning:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://ondemandscanning.mtls.googleapis.com/", +"name": "ondemandscanning", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "ondemandscanning.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "ondemandscanning.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "ondemandscanning.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "ondemandscanning.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"wait": { +"description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:wait", +"httpMethod": "POST", +"id": "ondemandscanning.projects.locations.operations.wait", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to wait on.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +}, +"timeout": { +"description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", +"format": "google-duration", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}:wait", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"scans": { +"methods": { +"analyzePackages": { +"description": "Initiates an analysis of the provided packages.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/scans:analyzePackages", +"httpMethod": "POST", +"id": "ondemandscanning.projects.locations.scans.analyzePackages", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent of the resource for which analysis is requested. Format: projects/[project_name]/locations/[location]", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/scans:analyzePackages", +"request": { +"$ref": "AnalyzePackagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"vulnerabilities": { +"methods": { +"list": { +"description": "Lists vulnerabilities resulting from a successfully completed scan.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/scans/{scansId}/vulnerabilities", +"httpMethod": "GET", +"id": "ondemandscanning.projects.locations.scans.vulnerabilities.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The number of vulnerabilities to retrieve.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token, resulting from a previous call to ListVulnerabilities.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent of the collection of Vulnerabilities being requested. Format: projects/[project_name]/locations/[location]/scans/[scan_id]", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/scans/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/vulnerabilities", +"response": { +"$ref": "ListVulnerabilitiesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://ondemandscanning.googleapis.com/", +"schemas": { +"AliasContext": { +"description": "An alias to a repo revision.", +"id": "AliasContext", +"properties": { +"kind": { +"description": "The alias kind.", +"enum": [ +"KIND_UNSPECIFIED", +"FIXED", +"MOVABLE", +"OTHER" +], +"enumDescriptions": [ +"Unknown.", +"Git tag.", +"Git branch.", +"Used to specify non-standard aliases. For example, if a Git repo has a ref named \"refs/foo/bar\"." +], +"type": "string" +}, +"name": { +"description": "The alias name.", +"type": "string" +} +}, +"type": "object" +}, +"AnalysisCompleted": { +"description": "Indicates which analysis completed successfully. Multiple types of analysis can be performed on a single resource.", +"id": "AnalysisCompleted", +"properties": { +"analysisType": { +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AnalyzePackagesMetadata": { +"description": "AnalyzePackagesMetadata contains metadata for an active scan of a container image.", +"id": "AnalyzePackagesMetadata", +"properties": { +"createTime": { +"description": "When the scan was created.", +"format": "google-datetime", +"type": "string" +}, +"resourceUri": { +"description": "The resource URI of the container image being scanned.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesMetadataV1": { +"description": "AnalyzePackagesMetadata contains metadata for an active scan of a container image.", +"id": "AnalyzePackagesMetadataV1", +"properties": { +"createTime": { +"description": "When the scan was created.", +"format": "google-datetime", +"type": "string" +}, +"resourceUri": { +"description": "The resource URI of the container image being scanned.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesRequest": { +"description": "AnalyzePackagesRequest is the request to analyze a list of packages and create Vulnerability Occurrences for it.", +"id": "AnalyzePackagesRequest", +"properties": { +"packages": { +"description": "The packages to analyze.", +"items": { +"$ref": "PackageData" +}, +"type": "array" +}, +"resourceUri": { +"description": "Required. The resource URI of the container image being scanned.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesResponse": { +"description": "AnalyzePackagesResponse contains the information necessary to find results for the given scan.", +"id": "AnalyzePackagesResponse", +"properties": { +"scan": { +"description": "The name of the scan resource created by this successful scan.", +"type": "string" +} +}, +"type": "object" +}, +"AnalyzePackagesResponseV1": { +"description": "AnalyzePackagesResponse contains the information necessary to find results for the given scan.", +"id": "AnalyzePackagesResponseV1", +"properties": { +"scan": { +"description": "The name of the scan resource created by this successful scan.", +"type": "string" +} +}, +"type": "object" +}, +"Artifact": { +"description": "Artifact describes a build product.", +"id": "Artifact", +"properties": { +"checksum": { +"description": "Hash or checksum value of a binary, or Docker Registry 2.0 digest of a container.", +"type": "string" +}, +"id": { +"description": "Artifact ID, if any; for container images, this will be a URL by digest like `gcr.io/projectID/imagename@sha256:123456`.", +"type": "string" +}, +"names": { +"description": "Related artifact names. This may be the path to a binary or jar file, or in the case of a container build, the name used to push the container image to Google Container Registry, as presented to `docker push`. Note that a single Artifact ID can have multiple names, for example if two tags are applied to one image.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AttestationOccurrence": { +"description": "Occurrence that represents a single \"attestation\". The authenticity of an attestation can be verified using the attached signature. If the verifier trusts the public key of the signer, then verifying the signature is sufficient to establish trust. In this circumstance, the authority to which this attestation is attached is primarily useful for lookup (how to find this attestation if you already know the authority and artifact to be verified) and intent (for which authority this attestation was intended to sign.", +"id": "AttestationOccurrence", +"properties": { +"jwts": { +"description": "One or more JWTs encoding a self-contained attestation. Each JWT encodes the payload that it verifies within the JWT itself. Verifier implementation SHOULD ignore the `serialized_payload` field when verifying these JWTs. If only JWTs are present on this AttestationOccurrence, then the `serialized_payload` SHOULD be left empty. Each JWT SHOULD encode a claim specific to the `resource_uri` of this Occurrence, but this is not validated by Grafeas metadata API implementations. The JWT itself is opaque to Grafeas.", +"items": { +"$ref": "Jwt" +}, +"type": "array" +}, +"serializedPayload": { +"description": "Required. The serialized payload that is verified by one or more `signatures`.", +"format": "byte", +"type": "string" +}, +"signatures": { +"description": "One or more signatures over `serialized_payload`. Verifier implementations should consider this attestation message verified if at least one `signature` verifies `serialized_payload`. See `Signature` in common.proto for more details on signature structure and verification.", +"items": { +"$ref": "Signature" +}, +"type": "array" +} +}, +"type": "object" +}, +"BinarySourceInfo": { +"id": "BinarySourceInfo", +"properties": { +"binaryVersion": { +"$ref": "PackageVersion", +"description": "The binary package. This is significant when the source is different than the binary itself. Historically if they've differed, we've stored the name of the source and its version in the package/version fields, but we should also store the binary package info, as that's what's actually installed. See b/175908657#comment15." +}, +"sourceVersion": { +"$ref": "PackageVersion", +"description": "The source package. Similar to the above, this is significant when the source is different than the binary itself. Since the top-level package/version fields are based on an if/else, we need a separate field for both binary and source if we want to know definitively where the data is coming from." +} +}, +"type": "object" +}, +"BuildDefinition": { +"id": "BuildDefinition", +"properties": { +"buildType": { +"type": "string" +}, +"externalParameters": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"internalParameters": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"resolvedDependencies": { +"items": { +"$ref": "ResourceDescriptor" +}, +"type": "array" +} +}, +"type": "object" +}, +"BuildMetadata": { +"id": "BuildMetadata", +"properties": { +"finishedOn": { +"format": "google-datetime", +"type": "string" +}, +"invocationId": { +"type": "string" +}, +"startedOn": { +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"BuildOccurrence": { +"description": "Details of a build occurrence.", +"id": "BuildOccurrence", +"properties": { +"inTotoSlsaProvenanceV1": { +"$ref": "InTotoSlsaProvenanceV1", +"description": "In-Toto Slsa Provenance V1 represents a slsa provenance meeting the slsa spec, wrapped in an in-toto statement. This allows for direct jsonification of a to-spec in-toto slsa statement with a to-spec slsa provenance." +}, +"intotoProvenance": { +"$ref": "InTotoProvenance", +"description": "Deprecated. See InTotoStatement for the replacement. In-toto Provenance representation as defined in spec." +}, +"intotoStatement": { +"$ref": "InTotoStatement", +"description": "In-toto Statement representation as defined in spec. The intoto_statement can contain any type of provenance. The serialized payload of the statement can be stored and signed in the Occurrence's envelope." +}, +"provenance": { +"$ref": "BuildProvenance", +"description": "The actual provenance for the build." +}, +"provenanceBytes": { +"description": "Serialized JSON representation of the provenance, used in generating the build signature in the corresponding build note. After verifying the signature, `provenance_bytes` can be unmarshalled and compared to the provenance to confirm that it is unchanged. A base64-encoded string representation of the provenance bytes is used for the signature in order to interoperate with openssl which expects this format for signature verification. The serialized form is captured both to avoid ambiguity in how the provenance is marshalled to json as well to prevent incompatibilities with future changes.", +"type": "string" +} +}, +"type": "object" +}, +"BuildProvenance": { +"description": "Provenance of a build. Contains all information needed to verify the full details about the build from source to completion.", +"id": "BuildProvenance", +"properties": { +"buildOptions": { +"additionalProperties": { +"type": "string" +}, +"description": "Special options applied to this build. This is a catch-all field where build providers can enter any desired additional details.", +"type": "object" +}, +"builderVersion": { +"description": "Version string of the builder at the time this build was executed.", +"type": "string" +}, +"builtArtifacts": { +"description": "Output of the build.", +"items": { +"$ref": "Artifact" +}, +"type": "array" +}, +"commands": { +"description": "Commands requested by the build.", +"items": { +"$ref": "Command" +}, +"type": "array" +}, +"createTime": { +"description": "Time at which the build was created.", +"format": "google-datetime", +"type": "string" +}, +"creator": { +"description": "E-mail address of the user who initiated this build. Note that this was the user's e-mail address at the time the build was initiated; this address may not represent the same end-user for all time.", +"type": "string" +}, +"endTime": { +"description": "Time at which execution of the build was finished.", +"format": "google-datetime", +"type": "string" +}, +"id": { +"description": "Required. Unique identifier of the build.", +"type": "string" +}, +"logsUri": { +"description": "URI where any logs for this provenance were written.", +"type": "string" +}, +"projectId": { +"description": "ID of the project.", +"type": "string" +}, +"sourceProvenance": { +"$ref": "Source", +"description": "Details of the Source input to the build." +}, +"startTime": { +"description": "Time at which execution of the build was started.", +"format": "google-datetime", +"type": "string" +}, +"triggerId": { +"description": "Trigger identifier if the build was triggered automatically; empty if not.", +"type": "string" +} +}, +"type": "object" +}, +"BuilderConfig": { +"id": "BuilderConfig", +"properties": { +"id": { +"type": "string" +} +}, +"type": "object" +}, +"CVSS": { +"description": "Common Vulnerability Scoring System. For details, see https://www.first.org/cvss/specification-document This is a message we will try to use for storing various versions of CVSS rather than making a separate proto for storing a specific version.", +"id": "CVSS", +"properties": { +"attackComplexity": { +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH", +"ATTACK_COMPLEXITY_MEDIUM" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +}, +"authentication": { +"enum": [ +"AUTHENTICATION_UNSPECIFIED", +"AUTHENTICATION_MULTIPLE", +"AUTHENTICATION_SINGLE", +"AUTHENTICATION_NONE" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"availabilityImpact": { +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE", +"IMPACT_PARTIAL", +"IMPACT_COMPLETE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "float", +"type": "number" +}, +"confidentialityImpact": { +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE", +"IMPACT_PARTIAL", +"IMPACT_COMPLETE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"exploitabilityScore": { +"format": "float", +"type": "number" +}, +"impactScore": { +"format": "float", +"type": "number" +}, +"integrityImpact": { +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE", +"IMPACT_PARTIAL", +"IMPACT_COMPLETE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"privilegesRequired": { +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"scope": { +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"userInteraction": { +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"Category": { +"description": "The category to which the update belongs.", +"id": "Category", +"properties": { +"categoryId": { +"description": "The identifier of the category.", +"type": "string" +}, +"name": { +"description": "The localized name of the category.", +"type": "string" +} +}, +"type": "object" +}, +"CloudRepoSourceContext": { +"description": "A CloudRepoSourceContext denotes a particular revision in a Google Cloud Source Repo.", +"id": "CloudRepoSourceContext", +"properties": { +"aliasContext": { +"$ref": "AliasContext", +"description": "An alias, which may be a branch or tag." +}, +"repoId": { +"$ref": "RepoId", +"description": "The ID of the repo." +}, +"revisionId": { +"description": "A revision ID.", +"type": "string" +} +}, +"type": "object" +}, +"Command": { +"description": "Command describes a step performed as part of the build pipeline.", +"id": "Command", +"properties": { +"args": { +"description": "Command-line arguments used when executing this command.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dir": { +"description": "Working directory (relative to project source root) used when running this command.", +"type": "string" +}, +"env": { +"description": "Environment variables set before running this command.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Optional unique identifier for this command, used in wait_for to reference this command as a dependency.", +"type": "string" +}, +"name": { +"description": "Required. Name of the command, as presented on the command line, or if the command is packaged as a Docker container, as presented to `docker pull`.", +"type": "string" +}, +"waitFor": { +"description": "The ID(s) of the command(s) that this command depends on.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Completeness": { +"description": "Indicates that the builder claims certain fields in this message to be complete.", +"id": "Completeness", +"properties": { +"arguments": { +"description": "If true, the builder claims that recipe.arguments is complete, meaning that all external inputs are properly captured in the recipe.", +"type": "boolean" +}, +"environment": { +"description": "If true, the builder claims that recipe.environment is claimed to be complete.", +"type": "boolean" +}, +"materials": { +"description": "If true, the builder claims that materials are complete, usually through some controls to prevent network access. Sometimes called \"hermetic\".", +"type": "boolean" +} +}, +"type": "object" +}, +"ComplianceOccurrence": { +"description": "An indication that the compliance checks in the associated ComplianceNote were not satisfied for particular resources or a specified reason.", +"id": "ComplianceOccurrence", +"properties": { +"nonComplianceReason": { +"type": "string" +}, +"nonCompliantFiles": { +"items": { +"$ref": "NonCompliantFile" +}, +"type": "array" +} +}, +"type": "object" +}, +"DSSEAttestationOccurrence": { +"description": "Deprecated. Prefer to use a regular Occurrence, and populate the Envelope at the top level of the Occurrence.", +"id": "DSSEAttestationOccurrence", +"properties": { +"envelope": { +"$ref": "Envelope", +"description": "If doing something security critical, make sure to verify the signatures in this metadata." +}, +"statement": { +"$ref": "InTotoStatement" +} +}, +"type": "object" +}, +"DeploymentOccurrence": { +"description": "The period during which some deployable was active in a runtime.", +"id": "DeploymentOccurrence", +"properties": { +"address": { +"description": "Address of the runtime element hosting this deployment.", +"type": "string" +}, +"config": { +"description": "Configuration used to create this deployment.", +"type": "string" +}, +"deployTime": { +"description": "Required. Beginning of the lifetime of this deployment.", +"format": "google-datetime", +"type": "string" +}, +"platform": { +"description": "Platform hosting this deployment.", +"enum": [ +"PLATFORM_UNSPECIFIED", +"GKE", +"FLEX", +"CUSTOM" +], +"enumDescriptions": [ +"Unknown.", +"Google Container Engine.", +"Google App Engine: Flexible Environment.", +"Custom user-defined platform." +], +"type": "string" +}, +"resourceUri": { +"description": "Output only. Resource URI for the artifact being deployed taken from the deployable field with the same name.", +"items": { +"type": "string" +}, +"type": "array" +}, +"undeployTime": { +"description": "End of the lifetime of this deployment.", +"format": "google-datetime", +"type": "string" +}, +"userEmail": { +"description": "Identity of the user that triggered this deployment.", +"type": "string" +} +}, +"type": "object" +}, +"DiscoveryOccurrence": { +"description": "Provides information about the analysis status of a discovered resource.", +"id": "DiscoveryOccurrence", +"properties": { +"analysisCompleted": { +"$ref": "AnalysisCompleted" +}, +"analysisError": { +"description": "Indicates any errors encountered during analysis of a resource. There could be 0 or more of these errors.", +"items": { +"$ref": "Status" +}, +"type": "array" +}, +"analysisStatus": { +"description": "The status of discovery for the resource.", +"enum": [ +"ANALYSIS_STATUS_UNSPECIFIED", +"PENDING", +"SCANNING", +"FINISHED_SUCCESS", +"COMPLETE", +"FINISHED_FAILED", +"FINISHED_UNSUPPORTED" +], +"enumDescriptions": [ +"Unknown.", +"Resource is known but no action has been taken yet.", +"Resource is being analyzed.", +"Analysis has finished successfully.", +"Analysis has completed.", +"Analysis has finished unsuccessfully, the analysis itself is in a bad state.", +"The resource is known not to be supported." +], +"type": "string" +}, +"analysisStatusError": { +"$ref": "Status", +"description": "When an error is encountered this will contain a LocalizedMessage under details to show to the user. The LocalizedMessage is output only and populated by the API." +}, +"archiveTime": { +"description": "Output only. The time occurrences related to this discovery occurrence were archived.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"continuousAnalysis": { +"description": "Whether the resource is continuously analyzed.", +"enum": [ +"CONTINUOUS_ANALYSIS_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unknown.", +"The resource is continuously analyzed.", +"The resource is ignored for continuous analysis." +], +"type": "string" +}, +"cpe": { +"description": "The CPE of the resource being scanned.", +"type": "string" +}, +"lastScanTime": { +"description": "The last time this resource was scanned.", +"format": "google-datetime", +"type": "string" +}, +"sbomStatus": { +"$ref": "SBOMStatus", +"description": "The status of an SBOM generation." +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Envelope": { +"description": "MUST match https://github.com/secure-systems-lab/dsse/blob/master/envelope.proto. An authenticated message of arbitrary type.", +"id": "Envelope", +"properties": { +"payload": { +"format": "byte", +"type": "string" +}, +"payloadType": { +"type": "string" +}, +"signatures": { +"items": { +"$ref": "EnvelopeSignature" +}, +"type": "array" +} +}, +"type": "object" +}, +"EnvelopeSignature": { +"id": "EnvelopeSignature", +"properties": { +"keyid": { +"type": "string" +}, +"sig": { +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"FileHashes": { +"description": "Container message for hashes of byte content of files, used in source messages to verify integrity of source input to the build.", +"id": "FileHashes", +"properties": { +"fileHash": { +"description": "Required. Collection of file hashes.", +"items": { +"$ref": "Hash" +}, +"type": "array" +} +}, +"type": "object" +}, +"FileLocation": { +"description": "Indicates the location at which a package was found.", +"id": "FileLocation", +"properties": { +"filePath": { +"description": "For jars that are contained inside .war files, this filepath can indicate the path to war file combined with the path to jar file.", +"type": "string" +} +}, +"type": "object" +}, +"Fingerprint": { +"description": "A set of properties that uniquely identify a given Docker image.", +"id": "Fingerprint", +"properties": { +"v1Name": { +"description": "Required. The layer ID of the final layer in the Docker image's v1 representation.", +"type": "string" +}, +"v2Blob": { +"description": "Required. The ordered list of v2 blobs that represent a given image.", +"items": { +"type": "string" +}, +"type": "array" +}, +"v2Name": { +"description": "Output only. The name of the image's v2 blobs computed via: [bottom] := v2_blobbottom := sha256(v2_blob[N] + \" \" + v2_name[N+1]) Only the name of the final blob is kept.", +"type": "string" +} +}, +"type": "object" +}, +"GerritSourceContext": { +"description": "A SourceContext referring to a Gerrit project.", +"id": "GerritSourceContext", +"properties": { +"aliasContext": { +"$ref": "AliasContext", +"description": "An alias, which may be a branch or tag." +}, +"gerritProject": { +"description": "The full project name within the host. Projects may be nested, so \"project/subproject\" is a valid project name. The \"repo name\" is the hostURI/project.", +"type": "string" +}, +"hostUri": { +"description": "The URI of a running Gerrit instance.", +"type": "string" +}, +"revisionId": { +"description": "A revision (commit) ID.", +"type": "string" +} +}, +"type": "object" +}, +"GitSourceContext": { +"description": "A GitSourceContext denotes a particular revision in a third party Git repository (e.g., GitHub).", +"id": "GitSourceContext", +"properties": { +"revisionId": { +"description": "Git commit hash.", +"type": "string" +}, +"url": { +"description": "Git repository URL.", +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1FileLocation": { +"description": "Indicates the location at which a package was found.", +"id": "GrafeasV1FileLocation", +"properties": { +"filePath": { +"description": "For jars that are contained inside .war files, this filepath can indicate the path to war file combined with the path to jar file.", +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder": { +"description": "Identifies the entity that executed the recipe, which is trusted to have correctly performed the operation and populated this provenance.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder", +"properties": { +"id": { +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness": { +"description": "Indicates that the builder claims certain fields in this message to be complete.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness", +"properties": { +"environment": { +"type": "boolean" +}, +"materials": { +"type": "boolean" +}, +"parameters": { +"type": "boolean" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource": { +"description": "Describes where the config file that kicked off the build came from. This is effectively a pointer to the source where buildConfig came from.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"entryPoint": { +"type": "string" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation": { +"description": "Identifies the event that kicked off the build.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation", +"properties": { +"configSource": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaConfigSource" +}, +"environment": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"parameters": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial": { +"description": "The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata": { +"description": "Other properties of the build.", +"id": "GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata", +"properties": { +"buildFinishedOn": { +"format": "google-datetime", +"type": "string" +}, +"buildInvocationId": { +"type": "string" +}, +"buildStartedOn": { +"format": "google-datetime", +"type": "string" +}, +"completeness": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaCompleteness" +}, +"reproducible": { +"type": "boolean" +} +}, +"type": "object" +}, +"Hash": { +"description": "Container message for hash values.", +"id": "Hash", +"properties": { +"type": { +"description": "Required. The type of hash that was performed, e.g. \"SHA-256\".", +"type": "string" +}, +"value": { +"description": "Required. The hash value.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"Identity": { +"description": "The unique identifier of the update.", +"id": "Identity", +"properties": { +"revision": { +"description": "The revision number of the update.", +"format": "int32", +"type": "integer" +}, +"updateId": { +"description": "The revision independent identifier of the update.", +"type": "string" +} +}, +"type": "object" +}, +"ImageOccurrence": { +"description": "Details of the derived image portion of the DockerImage relationship. This image would be produced from a Dockerfile with FROM .", +"id": "ImageOccurrence", +"properties": { +"baseResourceUrl": { +"description": "Output only. This contains the base image URL for the derived image occurrence.", +"type": "string" +}, +"distance": { +"description": "Output only. The number of layers by which this image differs from the associated image basis.", +"format": "int32", +"type": "integer" +}, +"fingerprint": { +"$ref": "Fingerprint", +"description": "Required. The fingerprint of the derived image." +}, +"layerInfo": { +"description": "This contains layer-specific metadata, if populated it has length \"distance\" and is ordered with [distance] being the layer immediately following the base image and [1] being the final layer.", +"items": { +"$ref": "Layer" +}, +"type": "array" +} +}, +"type": "object" +}, +"InTotoProvenance": { +"id": "InTotoProvenance", +"properties": { +"builderConfig": { +"$ref": "BuilderConfig", +"description": "required" +}, +"materials": { +"description": "The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on. This is considered to be incomplete unless metadata.completeness.materials is true. Unset or null is equivalent to empty.", +"items": { +"type": "string" +}, +"type": "array" +}, +"metadata": { +"$ref": "Metadata" +}, +"recipe": { +"$ref": "Recipe", +"description": "Identifies the configuration used for the build. When combined with materials, this SHOULD fully describe the build, such that re-running this recipe results in bit-for-bit identical output (if the build is reproducible). required" +} +}, +"type": "object" +}, +"InTotoSlsaProvenanceV1": { +"id": "InTotoSlsaProvenanceV1", +"properties": { +"_type": { +"description": "InToto spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement", +"type": "string" +}, +"predicate": { +"$ref": "SlsaProvenanceV1" +}, +"predicateType": { +"type": "string" +}, +"subject": { +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"InTotoStatement": { +"description": "Spec defined at https://github.com/in-toto/attestation/tree/main/spec#statement The serialized InTotoStatement will be stored as Envelope.payload. Envelope.payloadType is always \"application/vnd.in-toto+json\".", +"id": "InTotoStatement", +"properties": { +"_type": { +"description": "Always `https://in-toto.io/Statement/v0.1`.", +"type": "string" +}, +"predicateType": { +"description": "`https://slsa.dev/provenance/v0.1` for SlsaProvenance.", +"type": "string" +}, +"provenance": { +"$ref": "InTotoProvenance" +}, +"slsaProvenance": { +"$ref": "SlsaProvenance" +}, +"slsaProvenanceZeroTwo": { +"$ref": "SlsaProvenanceZeroTwo" +}, +"subject": { +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"Justification": { +"description": "Justification provides the justification when the state of the assessment if NOT_AFFECTED.", +"id": "Justification", +"properties": { +"details": { +"description": "Additional details on why this justification was chosen.", +"type": "string" +}, +"justificationType": { +"description": "The justification type for this vulnerability.", +"enum": [ +"JUSTIFICATION_TYPE_UNSPECIFIED", +"COMPONENT_NOT_PRESENT", +"VULNERABLE_CODE_NOT_PRESENT", +"VULNERABLE_CODE_NOT_IN_EXECUTE_PATH", +"VULNERABLE_CODE_CANNOT_BE_CONTROLLED_BY_ADVERSARY", +"INLINE_MITIGATIONS_ALREADY_EXIST" +], +"enumDescriptions": [ +"JUSTIFICATION_TYPE_UNSPECIFIED.", +"The vulnerable component is not present in the product.", +"The vulnerable code is not present. Typically this case occurs when source code is configured or built in a way that excludes the vulnerable code.", +"The vulnerable code can not be executed. Typically this case occurs when the product includes the vulnerable code but does not call or use the vulnerable code.", +"The vulnerable code cannot be controlled by an attacker to exploit the vulnerability.", +"The product includes built-in protections or features that prevent exploitation of the vulnerability. These built-in protections cannot be subverted by the attacker and cannot be configured or disabled by the user. These mitigations completely prevent exploitation based on known attack vectors." +], +"type": "string" +} +}, +"type": "object" +}, +"Jwt": { +"id": "Jwt", +"properties": { +"compactJwt": { +"description": "The compact encoding of a JWS, which is always three base64 encoded strings joined by periods. For details, see: https://tools.ietf.org/html/rfc7515.html#section-3.1", +"type": "string" +} +}, +"type": "object" +}, +"LanguagePackageDependency": { +"description": "Indicates a language package available between this package and the customer's resource artifact.", +"id": "LanguagePackageDependency", +"properties": { +"package": { +"type": "string" +}, +"version": { +"type": "string" +} +}, +"type": "object" +}, +"Layer": { +"description": "Layer holds metadata specific to a layer of a Docker image.", +"id": "Layer", +"properties": { +"arguments": { +"description": "The recovered arguments to the Dockerfile directive.", +"type": "string" +}, +"directive": { +"description": "Required. The recovered Dockerfile directive used to construct this layer. See https://docs.docker.com/engine/reference/builder/ for more information.", +"type": "string" +} +}, +"type": "object" +}, +"License": { +"description": "License information.", +"id": "License", +"properties": { +"comments": { +"description": "Comments", +"type": "string" +}, +"expression": { +"description": "Often a single license can be used to represent the licensing terms. Sometimes it is necessary to include a choice of one or more licenses or some combination of license identifiers. Examples: \"LGPL-2.1-only OR MIT\", \"LGPL-2.1-only AND MIT\", \"GPL-2.0-or-later WITH Bison-exception-2.2\".", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVulnerabilitiesResponse": { +"description": "ListVulnerabilitiesResponse contains a single page of vulnerabilities resulting from a scan.", +"id": "ListVulnerabilitiesResponse", +"properties": { +"nextPageToken": { +"description": "A page token that can be used in a subsequent call to ListVulnerabilities to continue retrieving results.", +"type": "string" +}, +"occurrences": { +"description": "The list of Vulnerability Occurrences resulting from a scan.", +"items": { +"$ref": "Occurrence" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "An occurrence of a particular package installation found within a system's filesystem. E.g., glibc was found in `/var/lib/dpkg/status`.", +"id": "Location", +"properties": { +"cpeUri": { +"description": "Deprecated. The CPE URI in [CPE format](https://cpe.mitre.org/specification/)", +"type": "string" +}, +"path": { +"description": "The path from which we gathered that this package/version is installed.", +"type": "string" +}, +"version": { +"$ref": "Version", +"description": "Deprecated. The version installed at this location." +} +}, +"type": "object" +}, +"Maintainer": { +"id": "Maintainer", +"properties": { +"email": { +"type": "string" +}, +"kind": { +"type": "string" +}, +"name": { +"type": "string" +}, +"url": { +"type": "string" +} +}, +"type": "object" +}, +"Material": { +"id": "Material", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"Metadata": { +"description": "Other properties of the build.", +"id": "Metadata", +"properties": { +"buildFinishedOn": { +"description": "The timestamp of when the build completed.", +"format": "google-datetime", +"type": "string" +}, +"buildInvocationId": { +"description": "Identifies the particular build invocation, which can be useful for finding associated logs or other ad-hoc analysis. The value SHOULD be globally unique, per in-toto Provenance spec.", +"type": "string" +}, +"buildStartedOn": { +"description": "The timestamp of when the build started.", +"format": "google-datetime", +"type": "string" +}, +"completeness": { +"$ref": "Completeness", +"description": "Indicates that the builder claims certain fields in this message to be complete." +}, +"reproducible": { +"description": "If true, the builder claims that running the recipe on materials will produce bit-for-bit identical output.", +"type": "boolean" +} +}, +"type": "object" +}, +"NonCompliantFile": { +"description": "Details about files that caused a compliance check to fail. display_command is a single command that can be used to display a list of non compliant files. When there is no such command, we can also iterate a list of non compliant file using 'path'.", +"id": "NonCompliantFile", +"properties": { +"displayCommand": { +"description": "Command to display the non-compliant files.", +"type": "string" +}, +"path": { +"description": "Empty if `display_command` is set.", +"type": "string" +}, +"reason": { +"description": "Explains why a file is non compliant for a CIS check.", +"type": "string" +} +}, +"type": "object" +}, +"Occurrence": { +"description": "An instance of an analysis type that has been found on a resource.", +"id": "Occurrence", +"properties": { +"attestation": { +"$ref": "AttestationOccurrence", +"description": "Describes an attestation of an artifact." +}, +"build": { +"$ref": "BuildOccurrence", +"description": "Describes a verifiable build." +}, +"compliance": { +"$ref": "ComplianceOccurrence", +"description": "Describes a compliance violation on a linked resource." +}, +"createTime": { +"description": "Output only. The time this occurrence was created.", +"format": "google-datetime", +"type": "string" +}, +"deployment": { +"$ref": "DeploymentOccurrence", +"description": "Describes the deployment of an artifact on a runtime." +}, +"discovery": { +"$ref": "DiscoveryOccurrence", +"description": "Describes when a resource was discovered." +}, +"dsseAttestation": { +"$ref": "DSSEAttestationOccurrence", +"description": "Describes an attestation of an artifact using dsse." +}, +"envelope": { +"$ref": "Envelope", +"description": "https://github.com/secure-systems-lab/dsse" +}, +"image": { +"$ref": "ImageOccurrence", +"description": "Describes how this resource derives from the basis in the associated note." +}, +"kind": { +"description": "Output only. This explicitly denotes which of the occurrence details are specified. This field can be used as a filter in list requests.", +"enum": [ +"NOTE_KIND_UNSPECIFIED", +"VULNERABILITY", +"BUILD", +"IMAGE", +"PACKAGE", +"DEPLOYMENT", +"DISCOVERY", +"ATTESTATION", +"UPGRADE", +"COMPLIANCE", +"DSSE_ATTESTATION", +"VULNERABILITY_ASSESSMENT", +"SBOM_REFERENCE" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The note and occurrence represent a package vulnerability.", +"The note and occurrence assert build provenance.", +"This represents an image basis relationship.", +"This represents a package installed via a package manager.", +"The note and occurrence track deployment events.", +"The note and occurrence track the initial discovery status of a resource.", +"This represents a logical \"role\" that can attest to artifacts.", +"This represents an available package upgrade.", +"This represents a Compliance Note", +"This represents a DSSE attestation Note", +"This represents a Vulnerability Assessment.", +"This represents an SBOM Reference." +], +"type": "string" +}, +"name": { +"description": "Output only. The name of the occurrence in the form of `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`.", +"type": "string" +}, +"noteName": { +"description": "Required. Immutable. The analysis note associated with this occurrence, in the form of `projects/[PROVIDER_ID]/notes/[NOTE_ID]`. This field can be used as a filter in list requests.", +"type": "string" +}, +"package": { +"$ref": "PackageOccurrence", +"description": "Describes the installation of a package on the linked resource." +}, +"remediation": { +"description": "A description of actions that can be taken to remedy the note.", +"type": "string" +}, +"resourceUri": { +"description": "Required. Immutable. A URI that represents the resource for which the occurrence applies. For example, `https://gcr.io/project/image@sha256:123abc` for a Docker image.", +"type": "string" +}, +"sbomReference": { +"$ref": "SBOMReferenceOccurrence", +"description": "Describes a specific SBOM reference occurrences." +}, +"updateTime": { +"description": "Output only. The time this occurrence was last updated.", +"format": "google-datetime", +"type": "string" +}, +"upgrade": { +"$ref": "UpgradeOccurrence", +"description": "Describes an available package upgrade on the linked resource." +}, +"vulnerability": { +"$ref": "VulnerabilityOccurrence", +"description": "Describes a security vulnerability." +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"PackageData": { +"id": "PackageData", +"properties": { +"architecture": { +"description": "The architecture of the package.", +"type": "string" +}, +"binarySourceInfo": { +"description": "A bundle containing the binary and source information.", +"items": { +"$ref": "BinarySourceInfo" +}, +"type": "array" +}, +"binaryVersion": { +"$ref": "PackageVersion", +"description": "DEPRECATED" +}, +"cpeUri": { +"description": "The cpe_uri in [cpe format] (https://cpe.mitre.org/specification/) in which the vulnerability may manifest. Examples include distro or storage location for vulnerable jar.", +"type": "string" +}, +"dependencyChain": { +"description": "The dependency chain between this package and the user's artifact. List in order from the customer's package under review first, to the current package last. Inclusive of the original package and the current package.", +"items": { +"$ref": "LanguagePackageDependency" +}, +"type": "array" +}, +"fileLocation": { +"description": "The path to the jar file / go binary file.", +"items": { +"$ref": "FileLocation" +}, +"type": "array" +}, +"hashDigest": { +"description": "HashDigest stores the SHA512 hash digest of the jar file if the package is of type Maven. This field will be unset for non Maven packages.", +"type": "string" +}, +"licenses": { +"description": "The list of licenses found that are related to a given package. Note that licenses may also be stored on the BinarySourceInfo. If there is no BinarySourceInfo (because there's no concept of source vs binary), then it will be stored here, while if there are BinarySourceInfos, it will be stored there, as one source can have multiple binaries with different licenses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"maintainer": { +"$ref": "Maintainer", +"description": "The maintainer of the package." +}, +"os": { +"description": "The OS affected by a vulnerability Used to generate the cpe_uri for OS packages", +"type": "string" +}, +"osVersion": { +"description": "The version of the OS Used to generate the cpe_uri for OS packages", +"type": "string" +}, +"package": { +"description": "The package being analysed for vulnerabilities", +"type": "string" +}, +"packageType": { +"description": "The type of package: os, maven, go, etc.", +"enum": [ +"PACKAGE_TYPE_UNSPECIFIED", +"OS", +"MAVEN", +"GO", +"GO_STDLIB", +"PYPI", +"NPM", +"NUGET", +"RUBYGEMS", +"RUST", +"COMPOSER" +], +"enumDescriptions": [ +"", +"Operating System", +"Java packages from Maven.", +"Go third-party packages.", +"Go toolchain + standard library packages.", +"Python packages.", +"NPM packages.", +"Nuget (C#/.NET) packages.", +"Ruby packges (from RubyGems package manager).", +"Rust packages from Cargo (Github ecosystem is `RUST`).", +"PHP packages from Composer package manager." +], +"type": "string" +}, +"patchedCve": { +"description": "CVEs that this package is no longer vulnerable to go/drydock-dd-custom-binary-scanning", +"items": { +"type": "string" +}, +"type": "array" +}, +"sourceVersion": { +"$ref": "PackageVersion", +"description": "DEPRECATED" +}, +"unused": { +"type": "string" +}, +"version": { +"description": "The version of the package being analysed", +"type": "string" +} +}, +"type": "object" +}, +"PackageIssue": { +"description": "A detail for a distro and package this vulnerability occurrence was found in and its associated fix (if one is available).", +"id": "PackageIssue", +"properties": { +"affectedCpeUri": { +"description": "Required. The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was found in.", +"type": "string" +}, +"affectedPackage": { +"description": "Required. The package this vulnerability was found in.", +"type": "string" +}, +"affectedVersion": { +"$ref": "Version", +"description": "Required. The version of the package that is installed on the resource affected by this vulnerability." +}, +"effectiveSeverity": { +"description": "Output only. The distro or language system assigned severity for this vulnerability when that is available and note provider assigned severity when it is not available.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"MINIMAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Unknown.", +"Minimal severity.", +"Low severity.", +"Medium severity.", +"High severity.", +"Critical severity." +], +"readOnly": true, +"type": "string" +}, +"fileLocation": { +"description": "The location at which this package was found.", +"items": { +"$ref": "GrafeasV1FileLocation" +}, +"type": "array" +}, +"fixAvailable": { +"description": "Output only. Whether a fix is available for this package.", +"type": "boolean" +}, +"fixedCpeUri": { +"description": "The [CPE URI](https://cpe.mitre.org/specification/) this vulnerability was fixed in. It is possible for this to be different from the affected_cpe_uri.", +"type": "string" +}, +"fixedPackage": { +"description": "The package this vulnerability was fixed in. It is possible for this to be different from the affected_package.", +"type": "string" +}, +"fixedVersion": { +"$ref": "Version", +"description": "Required. The version of the package this vulnerability was fixed in. Setting this to VersionKind.MAXIMUM means no fix is yet available." +}, +"packageType": { +"description": "The type of package (e.g. OS, MAVEN, GO).", +"type": "string" +} +}, +"type": "object" +}, +"PackageOccurrence": { +"description": "Details on how a particular software package was installed on a system.", +"id": "PackageOccurrence", +"properties": { +"architecture": { +"description": "Output only. The CPU architecture for which packages in this distribution channel were built. Architecture will be blank for language packages.", +"enum": [ +"ARCHITECTURE_UNSPECIFIED", +"X86", +"X64" +], +"enumDescriptions": [ +"Unknown architecture.", +"X86 architecture.", +"X64 architecture." +], +"readOnly": true, +"type": "string" +}, +"cpeUri": { +"description": "Output only. The cpe_uri in [CPE format](https://cpe.mitre.org/specification/) denoting the package manager version distributing a package. The cpe_uri will be blank for language packages.", +"readOnly": true, +"type": "string" +}, +"license": { +"$ref": "License", +"description": "Licenses that have been declared by the authors of the package." +}, +"location": { +"description": "All of the places within the filesystem versions of this package have been found.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"name": { +"description": "Required. Output only. The name of the installed package.", +"readOnly": true, +"type": "string" +}, +"packageType": { +"description": "Output only. The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).", +"readOnly": true, +"type": "string" +}, +"version": { +"$ref": "Version", +"description": "Output only. The version of the package.", +"readOnly": true +} +}, +"type": "object" +}, +"PackageVersion": { +"id": "PackageVersion", +"properties": { +"licenses": { +"description": "The licenses associated with this package. Note that this has to go on the PackageVersion level, because we can have cases with images with the same source having different licences. E.g. in Alpine, musl and musl-utils both have the same origin musl, but have different sets of licenses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"type": "string" +}, +"version": { +"type": "string" +} +}, +"type": "object" +}, +"ProjectRepoId": { +"description": "Selects a repo using a Google Cloud Platform project ID (e.g., winged-cargo-31) and a repo name within that project.", +"id": "ProjectRepoId", +"properties": { +"projectId": { +"description": "The ID of the project.", +"type": "string" +}, +"repoName": { +"description": "The name of the repo. Leave empty for the default repo.", +"type": "string" +} +}, +"type": "object" +}, +"ProvenanceBuilder": { +"id": "ProvenanceBuilder", +"properties": { +"builderDependencies": { +"items": { +"$ref": "ResourceDescriptor" +}, +"type": "array" +}, +"id": { +"type": "string" +}, +"version": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +} +}, +"type": "object" +}, +"Recipe": { +"description": "Steps taken to build the artifact. For a TaskRun, typically each container corresponds to one step in the recipe.", +"id": "Recipe", +"properties": { +"arguments": { +"description": "Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were \"make\", then this might be the flags passed to make aside from the target, which is captured in recipe.entryPoint. Since the arguments field can greatly vary in structure, depending on the builder and recipe type, this is of form \"Any\".", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"definedInMaterial": { +"description": "Index in materials containing the recipe steps that are not implied by recipe.type. For example, if the recipe type were \"make\", then this would point to the source containing the Makefile, not the make program itself. Set to -1 if the recipe doesn't come from a material, as zero is default unset value for int64.", +"format": "int64", +"type": "string" +}, +"entryPoint": { +"description": "String identifying the entry point into the build. This is often a path to a configuration file and/or a target label within that file. The syntax and meaning are defined by recipe.type. For example, if the recipe type were \"make\", then this would reference the directory in which to run make as well as which target to use.", +"type": "string" +}, +"environment": { +"description": "Any other builder-controlled inputs necessary for correctly evaluating the recipe. Usually only needed for reproducing the build but not evaluated as part of policy. Since the environment field can greatly vary in structure, depending on the builder and recipe type, this is of form \"Any\".", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"type": { +"description": "URI indicating what type of recipe was performed. It determines the meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.", +"type": "string" +} +}, +"type": "object" +}, +"RelatedUrl": { +"description": "Metadata for any related URL information.", +"id": "RelatedUrl", +"properties": { +"label": { +"description": "Label to describe usage of the URL.", +"type": "string" +}, +"url": { +"description": "Specific URL associated with the resource.", +"type": "string" +} +}, +"type": "object" +}, +"Remediation": { +"description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", +"id": "Remediation", +"properties": { +"details": { +"description": "Contains a comprehensive human-readable discussion of the remediation.", +"type": "string" +}, +"remediationType": { +"description": "The type of remediation that can be applied.", +"enum": [ +"REMEDIATION_TYPE_UNSPECIFIED", +"MITIGATION", +"NO_FIX_PLANNED", +"NONE_AVAILABLE", +"VENDOR_FIX", +"WORKAROUND" +], +"enumDescriptions": [ +"No remediation type specified.", +"A MITIGATION is available.", +"No fix is planned.", +"Not available.", +"A vendor fix is available.", +"A workaround is available." +], +"type": "string" +}, +"remediationUri": { +"$ref": "RelatedUrl", +"description": "Contains the URL where to obtain the remediation." +} +}, +"type": "object" +}, +"RepoId": { +"description": "A unique identifier for a Cloud Repo.", +"id": "RepoId", +"properties": { +"projectRepoId": { +"$ref": "ProjectRepoId", +"description": "A combination of a project ID and a repo name." +}, +"uid": { +"description": "A server-assigned, globally unique identifier.", +"type": "string" +} +}, +"type": "object" +}, +"ResourceDescriptor": { +"id": "ResourceDescriptor", +"properties": { +"annotations": { +"additionalProperties": { +"type": "any" +}, +"type": "object" +}, +"content": { +"format": "byte", +"type": "string" +}, +"digest": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +}, +"downloadLocation": { +"type": "string" +}, +"mediaType": { +"type": "string" +}, +"name": { +"type": "string" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"RunDetails": { +"id": "RunDetails", +"properties": { +"builder": { +"$ref": "ProvenanceBuilder" +}, +"byproducts": { +"items": { +"$ref": "ResourceDescriptor" +}, +"type": "array" +}, +"metadata": { +"$ref": "BuildMetadata" +} +}, +"type": "object" +}, +"SBOMReferenceOccurrence": { +"description": "The occurrence representing an SBOM reference as applied to a specific resource. The occurrence follows the DSSE specification. See https://github.com/secure-systems-lab/dsse/blob/master/envelope.md for more details.", +"id": "SBOMReferenceOccurrence", +"properties": { +"payload": { +"$ref": "SbomReferenceIntotoPayload", +"description": "The actual payload that contains the SBOM reference data." +}, +"payloadType": { +"description": "The kind of payload that SbomReferenceIntotoPayload takes. Since it's in the intoto format, this value is expected to be 'application/vnd.in-toto+json'.", +"type": "string" +}, +"signatures": { +"description": "The signatures over the payload.", +"items": { +"$ref": "EnvelopeSignature" +}, +"type": "array" +} +}, +"type": "object" +}, +"SBOMStatus": { +"description": "The status of an SBOM generation.", +"id": "SBOMStatus", +"properties": { +"error": { +"description": "If there was an error generating an SBOM, this will indicate what that error was.", +"type": "string" +}, +"sbomState": { +"description": "The progress of the SBOM generation.", +"enum": [ +"SBOM_STATE_UNSPECIFIED", +"PENDING", +"COMPLETE" +], +"enumDescriptions": [ +"Default unknown state.", +"SBOM scanning is pending.", +"SBOM scanning has completed." +], +"type": "string" +} +}, +"type": "object" +}, +"SbomReferenceIntotoPayload": { +"description": "The actual payload that contains the SBOM Reference data. The payload follows the intoto statement specification. See https://github.com/in-toto/attestation/blob/main/spec/v1.0/statement.md for more details.", +"id": "SbomReferenceIntotoPayload", +"properties": { +"_type": { +"description": "Identifier for the schema of the Statement.", +"type": "string" +}, +"predicate": { +"$ref": "SbomReferenceIntotoPredicate", +"description": "Additional parameters of the Predicate. Includes the actual data about the SBOM." +}, +"predicateType": { +"description": "URI identifying the type of the Predicate.", +"type": "string" +}, +"subject": { +"description": "Set of software artifacts that the attestation applies to. Each element represents a single software artifact.", +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"SbomReferenceIntotoPredicate": { +"description": "A predicate which describes the SBOM being referenced.", +"id": "SbomReferenceIntotoPredicate", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of algorithm to digest of the contents of the SBOM.", +"type": "object" +}, +"location": { +"description": "The location of the SBOM.", +"type": "string" +}, +"mimeType": { +"description": "The mime type of the SBOM.", +"type": "string" +}, +"referrerId": { +"description": "The person or system referring this predicate to the consumer.", +"type": "string" +} +}, +"type": "object" +}, +"Signature": { +"description": "Verifiers (e.g. Kritis implementations) MUST verify signatures with respect to the trust anchors defined in policy (e.g. a Kritis policy). Typically this means that the verifier has been configured with a map from `public_key_id` to public key material (and any required parameters, e.g. signing algorithm). In particular, verification implementations MUST NOT treat the signature `public_key_id` as anything more than a key lookup hint. The `public_key_id` DOES NOT validate or authenticate a public key; it only provides a mechanism for quickly selecting a public key ALREADY CONFIGURED on the verifier through a trusted channel. Verification implementations MUST reject signatures in any of the following circumstances: * The `public_key_id` is not recognized by the verifier. * The public key that `public_key_id` refers to does not verify the signature with respect to the payload. The `signature` contents SHOULD NOT be \"attached\" (where the payload is included with the serialized `signature` bytes). Verifiers MUST ignore any \"attached\" payload and only verify signatures with respect to explicitly provided payload (e.g. a `payload` field on the proto message that holds this Signature, or the canonical serialization of the proto message that holds this signature).", +"id": "Signature", +"properties": { +"publicKeyId": { +"description": "The identifier for the public key that verifies this signature. * The `public_key_id` is required. * The `public_key_id` SHOULD be an RFC3986 conformant URI. * When possible, the `public_key_id` SHOULD be an immutable reference, such as a cryptographic digest. Examples of valid `public_key_id`s: OpenPGP V4 public key fingerprint: * \"openpgp4fpr:74FAF3B861BDA0870C7B6DEF607E48D2A663AEEA\" See https://www.iana.org/assignments/uri-schemes/prov/openpgp4fpr for more details on this scheme. RFC6920 digest-named SubjectPublicKeyInfo (digest of the DER serialization): * \"ni:///sha-256;cD9o9Cq6LG3jD0iKXqEi_vdjJGecm_iXkbqVoScViaU\" * \"nih:///sha-256;703f68f42aba2c6de30f488a5ea122fef76324679c9bf89791ba95a1271589a5\"", +"type": "string" +}, +"signature": { +"description": "The content of the signature, an opaque bytestring. The payload that this signature verifies MUST be unambiguously provided with the Signature during verification. A wrapper message might provide the payload explicitly. Alternatively, a message might have a canonical serialization that can always be unambiguously computed to derive the payload.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"SlsaBuilder": { +"id": "SlsaBuilder", +"properties": { +"id": { +"type": "string" +} +}, +"type": "object" +}, +"SlsaCompleteness": { +"description": "Indicates that the builder claims certain fields in this message to be complete.", +"id": "SlsaCompleteness", +"properties": { +"arguments": { +"description": "If true, the builder claims that recipe.arguments is complete, meaning that all external inputs are properly captured in the recipe.", +"type": "boolean" +}, +"environment": { +"description": "If true, the builder claims that recipe.environment is claimed to be complete.", +"type": "boolean" +}, +"materials": { +"description": "If true, the builder claims that materials are complete, usually through some controls to prevent network access. Sometimes called \"hermetic\".", +"type": "boolean" +} +}, +"type": "object" +}, +"SlsaMetadata": { +"description": "Other properties of the build.", +"id": "SlsaMetadata", +"properties": { +"buildFinishedOn": { +"description": "The timestamp of when the build completed.", +"format": "google-datetime", +"type": "string" +}, +"buildInvocationId": { +"description": "Identifies the particular build invocation, which can be useful for finding associated logs or other ad-hoc analysis. The value SHOULD be globally unique, per in-toto Provenance spec.", +"type": "string" +}, +"buildStartedOn": { +"description": "The timestamp of when the build started.", +"format": "google-datetime", +"type": "string" +}, +"completeness": { +"$ref": "SlsaCompleteness", +"description": "Indicates that the builder claims certain fields in this message to be complete." +}, +"reproducible": { +"description": "If true, the builder claims that running the recipe on materials will produce bit-for-bit identical output.", +"type": "boolean" +} +}, +"type": "object" +}, +"SlsaProvenance": { +"id": "SlsaProvenance", +"properties": { +"builder": { +"$ref": "SlsaBuilder", +"description": "required" +}, +"materials": { +"description": "The collection of artifacts that influenced the build including sources, dependencies, build tools, base images, and so on. This is considered to be incomplete unless metadata.completeness.materials is true. Unset or null is equivalent to empty.", +"items": { +"$ref": "Material" +}, +"type": "array" +}, +"metadata": { +"$ref": "SlsaMetadata" +}, +"recipe": { +"$ref": "SlsaRecipe", +"description": "Identifies the configuration used for the build. When combined with materials, this SHOULD fully describe the build, such that re-running this recipe results in bit-for-bit identical output (if the build is reproducible). required" +} +}, +"type": "object" +}, +"SlsaProvenanceV1": { +"description": "Keep in sync with schema at https://github.com/slsa-framework/slsa/blob/main/docs/provenance/schema/v1/provenance.proto Builder renamed to ProvenanceBuilder because of Java conflicts.", +"id": "SlsaProvenanceV1", +"properties": { +"buildDefinition": { +"$ref": "BuildDefinition" +}, +"runDetails": { +"$ref": "RunDetails" +} +}, +"type": "object" +}, +"SlsaProvenanceZeroTwo": { +"description": "See full explanation of fields at slsa.dev/provenance/v0.2.", +"id": "SlsaProvenanceZeroTwo", +"properties": { +"buildConfig": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"type": "object" +}, +"buildType": { +"type": "string" +}, +"builder": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaBuilder" +}, +"invocation": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaInvocation" +}, +"materials": { +"items": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaMaterial" +}, +"type": "array" +}, +"metadata": { +"$ref": "GrafeasV1SlsaProvenanceZeroTwoSlsaMetadata" +} +}, +"type": "object" +}, +"SlsaRecipe": { +"description": "Steps taken to build the artifact. For a TaskRun, typically each container corresponds to one step in the recipe.", +"id": "SlsaRecipe", +"properties": { +"arguments": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Collection of all external inputs that influenced the build on top of recipe.definedInMaterial and recipe.entryPoint. For example, if the recipe type were \"make\", then this might be the flags passed to make aside from the target, which is captured in recipe.entryPoint. Depending on the recipe Type, the structure may be different.", +"type": "object" +}, +"definedInMaterial": { +"description": "Index in materials containing the recipe steps that are not implied by recipe.type. For example, if the recipe type were \"make\", then this would point to the source containing the Makefile, not the make program itself. Set to -1 if the recipe doesn't come from a material, as zero is default unset value for int64.", +"format": "int64", +"type": "string" +}, +"entryPoint": { +"description": "String identifying the entry point into the build. This is often a path to a configuration file and/or a target label within that file. The syntax and meaning are defined by recipe.type. For example, if the recipe type were \"make\", then this would reference the directory in which to run make as well as which target to use.", +"type": "string" +}, +"environment": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Any other builder-controlled inputs necessary for correctly evaluating the recipe. Usually only needed for reproducing the build but not evaluated as part of policy. Depending on the recipe Type, the structure may be different.", +"type": "object" +}, +"type": { +"description": "URI indicating what type of recipe was performed. It determines the meaning of recipe.entryPoint, recipe.arguments, recipe.environment, and materials.", +"type": "string" +} +}, +"type": "object" +}, +"Source": { +"description": "Source describes the location of the source used for the build.", +"id": "Source", +"properties": { +"additionalContexts": { +"description": "If provided, some of the source code used for the build may be found in these locations, in the case where the source repository had multiple remotes or submodules. This list will not include the context specified in the context field.", +"items": { +"$ref": "SourceContext" +}, +"type": "array" +}, +"artifactStorageSourceUri": { +"description": "If provided, the input binary artifacts for the build came from this location.", +"type": "string" +}, +"context": { +"$ref": "SourceContext", +"description": "If provided, the source code used for the build came from this location." +}, +"fileHashes": { +"additionalProperties": { +"$ref": "FileHashes" +}, +"description": "Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (.tar.gz), the FileHash will be for the single path to that file.", +"type": "object" +} +}, +"type": "object" +}, +"SourceContext": { +"description": "A SourceContext is a reference to a tree of files. A SourceContext together with a path point to a unique revision of a single file or directory.", +"id": "SourceContext", +"properties": { +"cloudRepo": { +"$ref": "CloudRepoSourceContext", +"description": "A SourceContext referring to a revision in a Google Cloud Source Repo." +}, +"gerrit": { +"$ref": "GerritSourceContext", +"description": "A SourceContext referring to a Gerrit project." +}, +"git": { +"$ref": "GitSourceContext", +"description": "A SourceContext referring to any third party Git repo (e.g., GitHub)." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels with user defined metadata.", +"type": "object" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subject": { +"id": "Subject", +"properties": { +"digest": { +"additionalProperties": { +"type": "string" +}, +"description": "`\"\": \"\"` Algorithms can be e.g. sha256, sha512 See https://github.com/in-toto/attestation/blob/main/spec/field_types.md#DigestSet", +"type": "object" +}, +"name": { +"type": "string" +} +}, +"type": "object" +}, +"UpgradeDistribution": { +"description": "The Upgrade Distribution represents metadata about the Upgrade for each operating system (CPE). Some distributions have additional metadata around updates, classifying them into various categories and severities.", +"id": "UpgradeDistribution", +"properties": { +"classification": { +"description": "The operating system classification of this Upgrade, as specified by the upstream operating system upgrade feed. For Windows the classification is one of the category_ids listed at https://docs.microsoft.com/en-us/previous-versions/windows/desktop/ff357803(v=vs.85)", +"type": "string" +}, +"cpeUri": { +"description": "Required - The specific operating system this metadata applies to. See https://cpe.mitre.org/specification/.", +"type": "string" +}, +"cve": { +"description": "The cve tied to this Upgrade.", +"items": { +"type": "string" +}, +"type": "array" +}, +"severity": { +"description": "The severity as specified by the upstream operating system.", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeOccurrence": { +"description": "An Upgrade Occurrence represents that a specific resource_url could install a specific upgrade. This presence is supplied via local sources (i.e. it is present in the mirror and the running system has noticed its availability). For Windows, both distribution and windows_update contain information for the Windows update.", +"id": "UpgradeOccurrence", +"properties": { +"distribution": { +"$ref": "UpgradeDistribution", +"description": "Metadata about the upgrade for available for the specific operating system for the resource_url. This allows efficient filtering, as well as making it easier to use the occurrence." +}, +"package": { +"description": "Required for non-Windows OS. The package this Upgrade is for.", +"type": "string" +}, +"parsedVersion": { +"$ref": "Version", +"description": "Required for non-Windows OS. The version of the package in a machine + human readable form." +}, +"windowsUpdate": { +"$ref": "WindowsUpdate", +"description": "Required for Windows OS. Represents the metadata about the Windows update." +} +}, +"type": "object" +}, +"Version": { +"description": "Version contains structured information about the version of a package.", +"id": "Version", +"properties": { +"epoch": { +"description": "Used to correct mistakes in the version numbering scheme.", +"format": "int32", +"type": "integer" +}, +"fullName": { +"description": "Human readable version string. This string is of the form :- and is only set when kind is NORMAL.", +"type": "string" +}, +"inclusive": { +"description": "Whether this version is specifying part of an inclusive range. Grafeas does not have the capability to specify version ranges; instead we have fields that specify start version and end versions. At times this is insufficient - we also need to specify whether the version is included in the range or is excluded from the range. This boolean is expected to be set to true when the version is included in a range.", +"type": "boolean" +}, +"kind": { +"description": "Required. Distinguishes between sentinel MIN/MAX versions and normal versions.", +"enum": [ +"VERSION_KIND_UNSPECIFIED", +"NORMAL", +"MINIMUM", +"MAXIMUM" +], +"enumDescriptions": [ +"Unknown.", +"A standard package version.", +"A special version representing negative infinity.", +"A special version representing positive infinity." +], +"type": "string" +}, +"name": { +"description": "Required only when version kind is NORMAL. The main part of the version name.", +"type": "string" +}, +"revision": { +"description": "The iteration of the package build from the above version.", +"type": "string" +} +}, +"type": "object" +}, +"VexAssessment": { +"description": "VexAssessment provides all publisher provided Vex information that is related to this vulnerability.", +"id": "VexAssessment", +"properties": { +"cve": { +"deprecated": true, +"description": "Holds the MITRE standard Common Vulnerabilities and Exposures (CVE) tracking number for the vulnerability. Deprecated: Use vulnerability_id instead to denote CVEs.", +"type": "string" +}, +"impacts": { +"description": "Contains information about the impact of this vulnerability, this will change with time.", +"items": { +"type": "string" +}, +"type": "array" +}, +"justification": { +"$ref": "Justification", +"description": "Justification provides the justification when the state of the assessment if NOT_AFFECTED." +}, +"noteName": { +"description": "The VulnerabilityAssessment note from which this VexAssessment was generated. This will be of the form: `projects/[PROJECT_ID]/notes/[NOTE_ID]`.", +"type": "string" +}, +"relatedUris": { +"description": "Holds a list of references associated with this vulnerability item and assessment.", +"items": { +"$ref": "RelatedUrl" +}, +"type": "array" +}, +"remediations": { +"description": "Specifies details on how to handle (and presumably, fix) a vulnerability.", +"items": { +"$ref": "Remediation" +}, +"type": "array" +}, +"state": { +"description": "Provides the state of this Vulnerability assessment.", +"enum": [ +"STATE_UNSPECIFIED", +"AFFECTED", +"NOT_AFFECTED", +"FIXED", +"UNDER_INVESTIGATION" +], +"enumDescriptions": [ +"No state is specified.", +"This product is known to be affected by this vulnerability.", +"This product is known to be not affected by this vulnerability.", +"This product contains a fix for this vulnerability.", +"It is not known yet whether these versions are or are not affected by the vulnerability. However, it is still under investigation." +], +"type": "string" +}, +"vulnerabilityId": { +"description": "The vulnerability identifier for this Assessment. Will hold one of common identifiers e.g. CVE, GHSA etc.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityOccurrence": { +"description": "An occurrence of a severity vulnerability on a resource.", +"id": "VulnerabilityOccurrence", +"properties": { +"cvssScore": { +"description": "Output only. The CVSS score of this vulnerability. CVSS score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity.", +"format": "float", +"type": "number" +}, +"cvssV2": { +"$ref": "CVSS", +"description": "The cvss v2 score for the vulnerability." +}, +"cvssVersion": { +"description": "Output only. CVSS version used to populate cvss_score and severity.", +"enum": [ +"CVSS_VERSION_UNSPECIFIED", +"CVSS_VERSION_2", +"CVSS_VERSION_3" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"cvssv3": { +"$ref": "CVSS", +"description": "The cvss v3 score for the vulnerability." +}, +"effectiveSeverity": { +"description": "The distro assigned severity for this vulnerability when it is available, otherwise this is the note provider assigned severity. When there are multiple PackageIssues for this vulnerability, they can have different effective severities because some might be provided by the distro while others are provided by the language ecosystem for a language pack. For this reason, it is advised to use the effective severity on the PackageIssue level. In the case where multiple PackageIssues have differing effective severities, this field should be the highest severity for any of the PackageIssues.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"MINIMAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Unknown.", +"Minimal severity.", +"Low severity.", +"Medium severity.", +"High severity.", +"Critical severity." +], +"type": "string" +}, +"extraDetails": { +"description": "Occurrence-specific extra details about the vulnerability.", +"type": "string" +}, +"fixAvailable": { +"description": "Output only. Whether at least one of the affected packages has a fix available.", +"type": "boolean" +}, +"longDescription": { +"description": "Output only. A detailed description of this vulnerability.", +"type": "string" +}, +"packageIssue": { +"description": "Required. The set of affected locations and their fixes (if available) within the associated resource.", +"items": { +"$ref": "PackageIssue" +}, +"type": "array" +}, +"relatedUrls": { +"description": "Output only. URLs related to this vulnerability.", +"items": { +"$ref": "RelatedUrl" +}, +"type": "array" +}, +"severity": { +"description": "Output only. The note provider assigned severity of this vulnerability.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"MINIMAL", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Unknown.", +"Minimal severity.", +"Low severity.", +"Medium severity.", +"High severity.", +"Critical severity." +], +"type": "string" +}, +"shortDescription": { +"description": "Output only. A one sentence description of this vulnerability.", +"type": "string" +}, +"type": { +"description": "The type of package; whether native or non native (e.g., ruby gems, node.js packages, etc.).", +"type": "string" +}, +"vexAssessment": { +"$ref": "VexAssessment" +} +}, +"type": "object" +}, +"WindowsUpdate": { +"description": "Windows Update represents the metadata about the update for the Windows operating system. The fields in this message come from the Windows Update API documented at https://docs.microsoft.com/en-us/windows/win32/api/wuapi/nn-wuapi-iupdate.", +"id": "WindowsUpdate", +"properties": { +"categories": { +"description": "The list of categories to which the update belongs.", +"items": { +"$ref": "Category" +}, +"type": "array" +}, +"description": { +"description": "The localized description of the update.", +"type": "string" +}, +"identity": { +"$ref": "Identity", +"description": "Required - The unique identifier for the update." +}, +"kbArticleIds": { +"description": "The Microsoft Knowledge Base article IDs that are associated with the update.", +"items": { +"type": "string" +}, +"type": "array" +}, +"lastPublishedTimestamp": { +"description": "The last published timestamp of the update.", +"format": "google-datetime", +"type": "string" +}, +"supportUrl": { +"description": "The hyperlink to the support information for the update.", +"type": "string" +}, +"title": { +"description": "The localized title of the update.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "On-Demand Scanning API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/orgpolicy.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/orgpolicy.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..b12bf2657a47053f61e71fed83d72bc01c16da1d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/orgpolicy.v2.json @@ -0,0 +1,1337 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://orgpolicy.googleapis.com/", +"batchPath": "batch", +"canonicalName": "OrgPolicy API", +"description": "The Organization Policy API allows users to configure governance rules on their Google Cloud resources across the resource hierarchy.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/orgpolicy/docs/reference/rest/index.html", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "orgpolicy:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://orgpolicy.mtls.googleapis.com/", +"name": "orgpolicy", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"resources": { +"constraints": { +"methods": { +"list": { +"description": "Lists constraints that could be applied on the specified resource.", +"flatPath": "v2/folders/{foldersId}/constraints", +"httpMethod": "GET", +"id": "orgpolicy.folders.constraints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/constraints", +"response": { +"$ref": "GoogleCloudOrgpolicyV2ListConstraintsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"policies": { +"methods": { +"create": { +"description": "Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.", +"flatPath": "v2/folders/{foldersId}/policies", +"httpMethod": "POST", +"id": "orgpolicy.folders.policies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/policies", +"request": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.", +"flatPath": "v2/folders/{foldersId}/policies/{policiesId}", +"httpMethod": "DELETE", +"id": "orgpolicy.folders.policies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. The current etag of policy. If an etag is provided and does not match the current etag of the policy, deletion will be blocked and an ABORTED error will be returned.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. Name of the policy to delete. See the policy entry for naming rules.", +"location": "path", +"pattern": "^folders/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.", +"flatPath": "v2/folders/{foldersId}/policies/{policiesId}", +"httpMethod": "GET", +"id": "orgpolicy.folders.policies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the policy. See Policy for naming requirements.", +"location": "path", +"pattern": "^folders/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getEffectivePolicy": { +"description": "Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.", +"flatPath": "v2/folders/{foldersId}/policies/{policiesId}:getEffectivePolicy", +"httpMethod": "GET", +"id": "orgpolicy.folders.policies.getEffectivePolicy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The effective policy to compute. See Policy for naming requirements.", +"location": "path", +"pattern": "^folders/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:getEffectivePolicy", +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Retrieves all of the policies that exist on a particular resource.", +"flatPath": "v2/folders/{foldersId}/policies", +"httpMethod": "GET", +"id": "orgpolicy.folders.policies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The target Google Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/policies", +"response": { +"$ref": "GoogleCloudOrgpolicyV2ListPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.", +"flatPath": "v2/folders/{foldersId}/policies/{policiesId}", +"httpMethod": "PATCH", +"id": "orgpolicy.folders.policies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", +"location": "path", +"pattern": "^folders/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"organizations": { +"resources": { +"constraints": { +"methods": { +"list": { +"description": "Lists constraints that could be applied on the specified resource.", +"flatPath": "v2/organizations/{organizationsId}/constraints", +"httpMethod": "GET", +"id": "orgpolicy.organizations.constraints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/constraints", +"response": { +"$ref": "GoogleCloudOrgpolicyV2ListConstraintsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"customConstraints": { +"methods": { +"create": { +"description": "Creates a custom constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the organization does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the constraint already exists on the given organization.", +"flatPath": "v2/organizations/{organizationsId}/customConstraints", +"httpMethod": "POST", +"id": "orgpolicy.organizations.customConstraints.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Must be in the following form: * `organizations/{organization_id}`", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/customConstraints", +"request": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a custom constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist.", +"flatPath": "v2/organizations/{organizationsId}/customConstraints/{customConstraintsId}", +"httpMethod": "DELETE", +"id": "orgpolicy.organizations.customConstraints.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom constraint to delete. See the custom constraint entry for naming rules.", +"location": "path", +"pattern": "^organizations/[^/]+/customConstraints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a custom constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the custom constraint does not exist.", +"flatPath": "v2/organizations/{organizationsId}/customConstraints/{customConstraintsId}", +"httpMethod": "GET", +"id": "orgpolicy.organizations.customConstraints.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the custom constraint. See the custom constraint entry for naming requirements.", +"location": "path", +"pattern": "^organizations/[^/]+/customConstraints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Retrieves all of the custom constraints that exist on a particular organization resource.", +"flatPath": "v2/organizations/{organizationsId}/customConstraints", +"httpMethod": "GET", +"id": "orgpolicy.organizations.customConstraints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The target Google Cloud resource that parents the set of custom constraints that will be returned from this call. Must be in one of the following forms: * `organizations/{organization_id}`", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/customConstraints", +"response": { +"$ref": "GoogleCloudOrgpolicyV2ListCustomConstraintsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a custom constraint. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Note: the supplied policy will perform a full overwrite of all fields.", +"flatPath": "v2/organizations/{organizationsId}/customConstraints/{customConstraintsId}", +"httpMethod": "PATCH", +"id": "orgpolicy.organizations.customConstraints.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", +"location": "path", +"pattern": "^organizations/[^/]+/customConstraints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"policies": { +"methods": { +"create": { +"description": "Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.", +"flatPath": "v2/organizations/{organizationsId}/policies", +"httpMethod": "POST", +"id": "orgpolicy.organizations.policies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/policies", +"request": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.", +"flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}", +"httpMethod": "DELETE", +"id": "orgpolicy.organizations.policies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. The current etag of policy. If an etag is provided and does not match the current etag of the policy, deletion will be blocked and an ABORTED error will be returned.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. Name of the policy to delete. See the policy entry for naming rules.", +"location": "path", +"pattern": "^organizations/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.", +"flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}", +"httpMethod": "GET", +"id": "orgpolicy.organizations.policies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the policy. See Policy for naming requirements.", +"location": "path", +"pattern": "^organizations/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getEffectivePolicy": { +"description": "Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.", +"flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}:getEffectivePolicy", +"httpMethod": "GET", +"id": "orgpolicy.organizations.policies.getEffectivePolicy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The effective policy to compute. See Policy for naming requirements.", +"location": "path", +"pattern": "^organizations/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:getEffectivePolicy", +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Retrieves all of the policies that exist on a particular resource.", +"flatPath": "v2/organizations/{organizationsId}/policies", +"httpMethod": "GET", +"id": "orgpolicy.organizations.policies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The target Google Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/policies", +"response": { +"$ref": "GoogleCloudOrgpolicyV2ListPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.", +"flatPath": "v2/organizations/{organizationsId}/policies/{policiesId}", +"httpMethod": "PATCH", +"id": "orgpolicy.organizations.policies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", +"location": "path", +"pattern": "^organizations/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"projects": { +"resources": { +"constraints": { +"methods": { +"list": { +"description": "Lists constraints that could be applied on the specified resource.", +"flatPath": "v2/projects/{projectsId}/constraints", +"httpMethod": "GET", +"id": "orgpolicy.projects.constraints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Google Cloud resource that parents the constraint. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/constraints", +"response": { +"$ref": "GoogleCloudOrgpolicyV2ListConstraintsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"policies": { +"methods": { +"create": { +"description": "Creates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ALREADY_EXISTS` if the policy already exists on the given Google Cloud resource.", +"flatPath": "v2/projects/{projectsId}/policies", +"httpMethod": "POST", +"id": "orgpolicy.projects.policies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Google Cloud resource that will parent the new policy. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/policies", +"request": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or organization policy does not exist.", +"flatPath": "v2/projects/{projectsId}/policies/{policiesId}", +"httpMethod": "DELETE", +"id": "orgpolicy.projects.policies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. The current etag of policy. If an etag is provided and does not match the current etag of the policy, deletion will be blocked and an ABORTED error will be returned.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. Name of the policy to delete. See the policy entry for naming rules.", +"location": "path", +"pattern": "^projects/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a policy on a resource. If no policy is set on the resource, `NOT_FOUND` is returned. The `etag` value can be used with `UpdatePolicy()` to update a policy during read-modify-write.", +"flatPath": "v2/projects/{projectsId}/policies/{policiesId}", +"httpMethod": "GET", +"id": "orgpolicy.projects.policies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the policy. See Policy for naming requirements.", +"location": "path", +"pattern": "^projects/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getEffectivePolicy": { +"description": "Gets the effective policy on a resource. This is the result of merging policies in the resource hierarchy and evaluating conditions. The returned policy will not have an `etag` or `condition` set because it is an evaluated policy across multiple resources. Subtrees of Resource Manager resource hierarchy with 'under:' prefix will not be expanded.", +"flatPath": "v2/projects/{projectsId}/policies/{policiesId}:getEffectivePolicy", +"httpMethod": "GET", +"id": "orgpolicy.projects.policies.getEffectivePolicy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The effective policy to compute. See Policy for naming requirements.", +"location": "path", +"pattern": "^projects/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:getEffectivePolicy", +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Retrieves all of the policies that exist on a particular resource.", +"flatPath": "v2/projects/{projectsId}/policies", +"httpMethod": "GET", +"id": "orgpolicy.projects.policies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Size of the pages to be returned. This is currently unsupported and will be ignored. The server may at any point start using this field to limit page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Page token used to retrieve the next page. This is currently unsupported and will be ignored. The server may at any point start using this field.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The target Google Cloud resource that parents the set of constraints and policies that will be returned from this call. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/policies", +"response": { +"$ref": "GoogleCloudOrgpolicyV2ListPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a policy. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy do not exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the policy Note: the supplied policy will perform a full overwrite of all fields.", +"flatPath": "v2/projects/{projectsId}/policies/{policiesId}", +"httpMethod": "PATCH", +"id": "orgpolicy.projects.policies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", +"location": "path", +"pattern": "^projects/[^/]+/policies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Field mask used to specify the fields to be overwritten in the policy by the set. The fields specified in the update_mask are relative to the policy, not the full request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"response": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240325", +"rootUrl": "https://orgpolicy.googleapis.com/", +"schemas": { +"GoogleCloudOrgpolicyV2AlternatePolicySpec": { +"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.", +"id": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"properties": { +"launch": { +"description": "Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Specify constraint for configurations of Google Cloud resources." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2Constraint": { +"description": "A constraint describes a way to restrict resource's configuration. For example, you could enforce a constraint that controls which Google Cloud services can be activated across an organization, or whether a Compute Engine instance can have serial port connections established. Constraints can be configured by the organization policy administrator to fit the needs of the organization by setting a policy that includes constraints at different locations in the organization's resource hierarchy. Policies are inherited down the resource hierarchy from higher levels, but can also be overridden. For details about the inheritance rules please read about `policies`. Constraints have a default behavior determined by the `constraint_default` field, which is the enforcement behavior that is used in the absence of a policy being defined or inherited for the resource in question.", +"id": "GoogleCloudOrgpolicyV2Constraint", +"properties": { +"booleanConstraint": { +"$ref": "GoogleCloudOrgpolicyV2ConstraintBooleanConstraint", +"description": "Defines this constraint as being a BooleanConstraint." +}, +"constraintDefault": { +"description": "The evaluation behavior of this constraint in the absence of a policy.", +"enum": [ +"CONSTRAINT_DEFAULT_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"This is only used for distinguishing unset values and should never be used.", +"Indicate that all values are allowed for list constraints. Indicate that enforcement is off for boolean constraints.", +"Indicate that all values are denied for list constraints. Indicate that enforcement is on for boolean constraints." +], +"type": "string" +}, +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint", +"description": "Defines this constraint as being a CustomConstraint." +}, +"description": { +"description": "Detailed description of what this constraint controls as well as how and where it is enforced. Mutable.", +"type": "string" +}, +"displayName": { +"description": "The human readable name. Mutable.", +"type": "string" +}, +"listConstraint": { +"$ref": "GoogleCloudOrgpolicyV2ConstraintListConstraint", +"description": "Defines this constraint as being a ListConstraint." +}, +"name": { +"description": "Immutable. The resource name of the constraint. Must be in one of the following forms: * `projects/{project_number}/constraints/{constraint_name}` * `folders/{folder_id}/constraints/{constraint_name}` * `organizations/{organization_id}/constraints/{constraint_name}` For example, \"/projects/123/constraints/compute.disableSerialPortAccess\".", +"type": "string" +}, +"supportsDryRun": { +"description": "Shows if dry run is supported for this constraint or not.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2ConstraintBooleanConstraint": { +"description": "A constraint that is either enforced or not. For example, a constraint `constraints/compute.disableSerialPortAccess`. If it is enforced on a VM instance, serial port connections will not be opened to that instance.", +"id": "GoogleCloudOrgpolicyV2ConstraintBooleanConstraint", +"properties": {}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint": { +"description": "A Google defined custom constraint. This represents a subset of fields missing from Constraint proto that are required to describe CustomConstraint", +"id": "GoogleCloudOrgpolicyV2ConstraintGoogleDefinedCustomConstraint", +"properties": { +"actionType": { +"description": "Allow or deny type.", +"enum": [ +"ACTION_TYPE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Allowed action type.", +"Deny action type." +], +"type": "string" +}, +"condition": { +"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", +"type": "string" +}, +"methodTypes": { +"description": "All the operations being applied for this constraint.", +"items": { +"enum": [ +"METHOD_TYPE_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Constraint applied when creating the resource.", +"Constraint applied when updating the resource.", +"Constraint applied when deleting the resource. Not supported yet." +], +"type": "string" +}, +"type": "array" +}, +"resourceTypes": { +"description": "The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2ConstraintListConstraint": { +"description": "A constraint that allows or disallows a list of string values, which are configured by an Organization Policy administrator with a policy.", +"id": "GoogleCloudOrgpolicyV2ConstraintListConstraint", +"properties": { +"supportsIn": { +"description": "Indicates whether values grouped into categories can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `\"in:Python\"` would match any value in the 'Python' group.", +"type": "boolean" +}, +"supportsUnder": { +"description": "Indicates whether subtrees of the Resource Manager resource hierarchy can be used in `Policy.allowed_values` and `Policy.denied_values`. For example, `\"under:folders/123\"` would match any resource under the 'folders/123' folder.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2CustomConstraint": { +"description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.", +"id": "GoogleCloudOrgpolicyV2CustomConstraint", +"properties": { +"actionType": { +"description": "Allow or deny type.", +"enum": [ +"ACTION_TYPE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Allowed action type.", +"Deny action type." +], +"type": "string" +}, +"condition": { +"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", +"type": "string" +}, +"description": { +"description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters.", +"type": "string" +}, +"displayName": { +"description": "One line display name for the UI. The max length of the display_name is 200 characters.", +"type": "string" +}, +"methodTypes": { +"description": "All the operations being applied for this constraint.", +"items": { +"enum": [ +"METHOD_TYPE_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Constraint applied when creating the resource.", +"Constraint applied when updating the resource.", +"Constraint applied when deleting the resource. Not supported yet." +], +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", +"type": "string" +}, +"resourceTypes": { +"description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2ListConstraintsResponse": { +"description": "The response returned from the ListConstraints method.", +"id": "GoogleCloudOrgpolicyV2ListConstraintsResponse", +"properties": { +"constraints": { +"description": "The collection of constraints that are available on the targeted resource.", +"items": { +"$ref": "GoogleCloudOrgpolicyV2Constraint" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token used to retrieve the next page. This is currently not used.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2ListCustomConstraintsResponse": { +"description": "The response returned from the ListCustomConstraints method. It will be empty if no custom constraints are set on the organization resource.", +"id": "GoogleCloudOrgpolicyV2ListCustomConstraintsResponse", +"properties": { +"customConstraints": { +"description": "All custom constraints that exist on the organization resource. It will be empty if no custom constraints are set.", +"items": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2ListPoliciesResponse": { +"description": "The response returned from the ListPolicies method. It will be empty if no policies are set on the resource.", +"id": "GoogleCloudOrgpolicyV2ListPoliciesResponse", +"properties": { +"nextPageToken": { +"description": "Page token used to retrieve the next page. This is currently not used, but the server may at any point start supplying a valid token.", +"type": "string" +}, +"policies": { +"description": "All policies that exist on the resource. It will be empty if no policies are set.", +"items": { +"$ref": "GoogleCloudOrgpolicyV2Policy" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2Policy": { +"description": "Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2Policy", +"properties": { +"alternate": { +"$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"deprecated": true, +"description": "Deprecated." +}, +"dryRunSpec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced." +}, +"etag": { +"description": "Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Basic information about the Organization Policy." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpec": { +"description": "Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2PolicySpec", +"properties": { +"etag": { +"description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", +"type": "string" +}, +"inheritFromParent": { +"description": "Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.", +"type": "boolean" +}, +"reset": { +"description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", +"type": "boolean" +}, +"rules": { +"description": "In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.", +"items": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { +"description": "A rule used to express this policy.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", +"properties": { +"allowAll": { +"description": "Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"&&\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." +}, +"denyAll": { +"description": "Setting this to true means that all values are denied. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"enforce": { +"description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", +"type": "boolean" +}, +"values": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { +"description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"properties": { +"allowedValues": { +"description": "List of values allowed at this resource.", +"items": { +"type": "string" +}, +"type": "array" +}, +"deniedValues": { +"description": "List of values denied at this resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Organization Policy API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..bf2c0e4a821ba070d615d42914da5ed28d2785f8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1.json @@ -0,0 +1,3864 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://osconfig.googleapis.com/", +"batchPath": "batch", +"canonicalName": "OS Config", +"description": "OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/compute/docs/osconfig/rest", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "osconfig:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://osconfig.mtls.googleapis.com/", +"name": "osconfig", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"global": { +"methods": { +"getProjectFeatureSettings": { +"description": "GetProjectFeatureSettings returns the VM Manager feature settings for a project.", +"flatPath": "v1/projects/{projectsId}/locations/global/projectFeatureSettings", +"httpMethod": "GET", +"id": "osconfig.projects.locations.global.getProjectFeatureSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name specifies the URL for the ProjectFeatureSettings resource: projects/project_id/locations/global/projectFeatureSettings.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/projectFeatureSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ProjectFeatureSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateProjectFeatureSettings": { +"description": "UpdateProjectFeatureSettings sets the VM Manager features for a project.", +"flatPath": "v1/projects/{projectsId}/locations/global/projectFeatureSettings", +"httpMethod": "PATCH", +"id": "osconfig.projects.locations.global.updateProjectFeatureSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. Name specifies the URL for the ProjectFeatureSettings resource: projects/project_id/locations/global/projectFeatureSettings.", +"location": "path", +"pattern": "^projects/[^/]+/locations/global/projectFeatureSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask that controls which fields of the ProjectFeatureSettings should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ProjectFeatureSettings" +}, +"response": { +"$ref": "ProjectFeatureSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"instances": { +"resources": { +"inventories": { +"methods": { +"get": { +"description": "Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/inventory", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.inventories.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. API resource name for inventory resource. Format: `projects/{project}/locations/{location}/instances/{instance}/inventory` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/inventory$", +"required": true, +"type": "string" +}, +"view": { +"description": "Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.", +"enum": [ +"INVENTORY_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default value. The API defaults to the BASIC view.", +"Returns the basic inventory information that includes `os_info`.", +"Returns all fields." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Inventory" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List inventory data for all VM instances in the specified zone.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/inventories", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.inventories.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by a `Inventory` API resource to be included in the response.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListInventories` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-` For `{project}`, either `project-number` or `project-id` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.", +"enum": [ +"INVENTORY_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default value. The API defaults to the BASIC view.", +"Returns the basic inventory information that includes `os_info`.", +"Returns all fields." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/inventories", +"response": { +"$ref": "ListInventoriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"osPolicyAssignments": { +"resources": { +"reports": { +"methods": { +"get": { +"description": "Get the OS policy assignment report for the specified Compute Engine VM instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/osPolicyAssignments/{osPolicyAssignmentsId}/report", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.osPolicyAssignments.reports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. API resource name for OS policy assignment report. Format: `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` can be provided. For `{assignment_id}`, the OSPolicyAssignment id must be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+/report$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "OSPolicyAssignmentReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List OS policy assignment reports for all Compute Engine VM instances in the specified zone.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/osPolicyAssignments/{osPolicyAssignmentsId}/reports", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.osPolicyAssignments.reports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by the `OSPolicyAssignmentReport` API resource that is included in the response.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to the `ListOSPolicyAssignmentReports` method that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either `instance-name`, `instance-id`, or `-` can be provided. If '-' is provided, the response will include OSPolicyAssignmentReports for all instances in the project/location. For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' is provided, the response will include OSPolicyAssignmentReports for all OSPolicyAssignments in the project/location. Either {instance} or {assignment} must be `-`. For example: `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` returns all reports for the instance `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` returns all the reports for the given assignment across all instances. `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` returns all the reports for all assignments across all instances.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/reports", +"response": { +"$ref": "ListOSPolicyAssignmentReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"vulnerabilityReports": { +"methods": { +"get": { +"description": "Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/vulnerabilityReport", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.vulnerabilityReports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. API resource name for vulnerability resource. Format: `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/vulnerabilityReport$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "VulnerabilityReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List vulnerability reports for all VM instances in the specified zone.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/vulnerabilityReports", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.vulnerabilityReports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "This field supports filtering by the severity level for the vulnerability. For a list of severity levels, see [Severity levels for vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities). The filter field follows the rules described in the [AIP-160](https://google.aip.dev/160) guidelines as follows: + **Filter for a specific severity type**: you can list reports that contain vulnerabilities that are classified as medium by specifying `vulnerabilities.details.severity:MEDIUM`. + **Filter for a range of severities** : you can list reports that have vulnerabilities that are classified as critical or high by specifying `vulnerabilities.details.severity:HIGH OR vulnerabilities.details.severity:CRITICAL`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListVulnerabilityReports` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-` For `{project}`, either `project-number` or `project-id` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/vulnerabilityReports", +"response": { +"$ref": "ListVulnerabilityReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"osPolicyAssignments": { +"methods": { +"create": { +"description": "Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments", +"httpMethod": "POST", +"id": "osconfig.projects.locations.osPolicyAssignments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"osPolicyAssignmentId": { +"description": "Required. The logical name of the OS policy assignment in the project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name in the form: projects/{project}/locations/{location}. Note: Specify the zone of your VMs as the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/osPolicyAssignments", +"request": { +"$ref": "OSPolicyAssignment" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}", +"httpMethod": "DELETE", +"id": "osconfig.projects.locations.osPolicyAssignments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the OS policy assignment to be deleted", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of OS policy assignment. Format: `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "OSPolicyAssignment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of assignments to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListOSPolicyAssignments` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/osPolicyAssignments", +"response": { +"$ref": "ListOSPolicyAssignmentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listRevisions": { +"description": "List the OS policy assignment revisions for a given OS policy assignment.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}:listRevisions", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.listRevisions", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the OS policy assignment to list revisions for.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of revisions to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:listRevisions", +"response": { +"$ref": "ListOSPolicyAssignmentRevisionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1/projects.locations.osPolicyAssignments.operations/cancel).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}", +"httpMethod": "PATCH", +"id": "osconfig.projects.locations.osPolicyAssignments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask that controls which fields of the assignment should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "OSPolicyAssignment" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "osconfig.projects.locations.osPolicyAssignments.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"patchDeployments": { +"methods": { +"create": { +"description": "Create an OS Config patch deployment.", +"flatPath": "v1/projects/{projectsId}/patchDeployments", +"httpMethod": "POST", +"id": "osconfig.projects.patchDeployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project to apply this patch deployment to in the form `projects/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"patchDeploymentId": { +"description": "Required. A name for the patch deployment in the project. When creating a name the following rules apply: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/patchDeployments", +"request": { +"$ref": "PatchDeployment" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete an OS Config patch deployment.", +"flatPath": "v1/projects/{projectsId}/patchDeployments/{patchDeploymentsId}", +"httpMethod": "DELETE", +"id": "osconfig.projects.patchDeployments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get an OS Config patch deployment.", +"flatPath": "v1/projects/{projectsId}/patchDeployments/{patchDeploymentsId}", +"httpMethod": "GET", +"id": "osconfig.projects.patchDeployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Get a page of OS Config patch deployments.", +"flatPath": "v1/projects/{projectsId}/patchDeployments", +"httpMethod": "GET", +"id": "osconfig.projects.patchDeployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of patch deployments to return. Default is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A pagination token returned from a previous call to ListPatchDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the parent in the form `projects/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/patchDeployments", +"response": { +"$ref": "ListPatchDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update an OS Config patch deployment.", +"flatPath": "v1/projects/{projectsId}/patchDeployments/{patchDeploymentsId}", +"httpMethod": "PATCH", +"id": "osconfig.projects.patchDeployments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Unique name for the patch deployment resource in a project. The patch deployment name is in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when you create a new patch deployment.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask that controls which fields of the patch deployment should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "PatchDeployment" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pause": { +"description": "Change state of patch deployment to \"PAUSED\". Patch deployment in paused state doesn't generate patch jobs.", +"flatPath": "v1/projects/{projectsId}/patchDeployments/{patchDeploymentsId}:pause", +"httpMethod": "POST", +"id": "osconfig.projects.patchDeployments.pause", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:pause", +"request": { +"$ref": "PausePatchDeploymentRequest" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resume": { +"description": "Change state of patch deployment back to \"ACTIVE\". Patch deployment in active state continues to generate patch jobs.", +"flatPath": "v1/projects/{projectsId}/patchDeployments/{patchDeploymentsId}:resume", +"httpMethod": "POST", +"id": "osconfig.projects.patchDeployments.resume", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:resume", +"request": { +"$ref": "ResumePatchDeploymentRequest" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"patchJobs": { +"methods": { +"cancel": { +"description": "Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.", +"flatPath": "v1/projects/{projectsId}/patchJobs/{patchJobsId}:cancel", +"httpMethod": "POST", +"id": "osconfig.projects.patchJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the patch in the form `projects/*/patchJobs/*`", +"location": "path", +"pattern": "^projects/[^/]+/patchJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelPatchJobRequest" +}, +"response": { +"$ref": "PatchJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"execute": { +"description": "Patch VM instances by creating and running a patch job.", +"flatPath": "v1/projects/{projectsId}/patchJobs:execute", +"httpMethod": "POST", +"id": "osconfig.projects.patchJobs.execute", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project in which to run this patch in the form `projects/*`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/patchJobs:execute", +"request": { +"$ref": "ExecutePatchJobRequest" +}, +"response": { +"$ref": "PatchJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.", +"flatPath": "v1/projects/{projectsId}/patchJobs/{patchJobsId}", +"httpMethod": "GET", +"id": "osconfig.projects.patchJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the patch in the form `projects/*/patchJobs/*`", +"location": "path", +"pattern": "^projects/[^/]+/patchJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PatchJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Get a list of patch jobs.", +"flatPath": "v1/projects/{projectsId}/patchJobs", +"httpMethod": "GET", +"id": "osconfig.projects.patchJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by patch jobs to be included in the response. Currently, filtering is only available on the patch_deployment field.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of instance status to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. In the form of `projects/*`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/patchJobs", +"response": { +"$ref": "ListPatchJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"instanceDetails": { +"methods": { +"list": { +"description": "Get a list of instance details for a given patch job.", +"flatPath": "v1/projects/{projectsId}/patchJobs/{patchJobsId}/instanceDetails", +"httpMethod": "GET", +"id": "osconfig.projects.patchJobs.instanceDetails.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters results listed in the response. This field supports filtering results by instance zone, name, state, or `failure_reason`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of instance details records to return. Default is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instanceDetails", +"response": { +"$ref": "ListPatchJobInstanceDetailsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://osconfig.googleapis.com/", +"schemas": { +"AptSettings": { +"description": "Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed.", +"id": "AptSettings", +"properties": { +"excludes": { +"description": "List of packages to exclude from update. These packages will be excluded", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePackages": { +"description": "An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.", +"enum": [ +"TYPE_UNSPECIFIED", +"DIST", +"UPGRADE" +], +"enumDescriptions": [ +"By default, upgrade will be performed.", +"Runs `apt-get dist-upgrade`.", +"Runs `apt-get upgrade`." +], +"type": "string" +} +}, +"type": "object" +}, +"CVSSv3": { +"description": "Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document", +"id": "CVSSv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores. https://www.first.org/cvss/specification-document#Base-Metrics", +"format": "float", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"exploitabilityScore": { +"description": "The Exploitability sub-score equation is derived from the Base Exploitability metrics. https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics", +"format": "float", +"type": "number" +}, +"impactScore": { +"description": "The Impact sub-score equation is derived from the Base Impact metrics.", +"format": "float", +"type": "number" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CancelPatchJobRequest": { +"description": "Message for canceling a patch job.", +"id": "CancelPatchJobRequest", +"properties": {}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ExecStep": { +"description": "A step that runs an executable for a PatchJob.", +"id": "ExecStep", +"properties": { +"linuxExecStepConfig": { +"$ref": "ExecStepConfig", +"description": "The ExecStepConfig for all Linux VMs targeted by the PatchJob." +}, +"windowsExecStepConfig": { +"$ref": "ExecStepConfig", +"description": "The ExecStepConfig for all Windows VMs targeted by the PatchJob." +} +}, +"type": "object" +}, +"ExecStepConfig": { +"description": "Common configurations for an ExecStep.", +"id": "ExecStepConfig", +"properties": { +"allowedSuccessCodes": { +"description": "Defaults to [0]. A list of possible return values that the execution can return to indicate a success.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"gcsObject": { +"$ref": "GcsObject", +"description": "A Cloud Storage object containing the executable." +}, +"interpreter": { +"description": "The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\\(Unix\\)).", +"enum": [ +"INTERPRETER_UNSPECIFIED", +"NONE", +"SHELL", +"POWERSHELL" +], +"enumDescriptions": [ +"If the interpreter is not specified, the value defaults to `NONE`.", +"Indicates that the file is run as follows on each operating system: + For Linux VMs, the file is ran as an executable and the interpreter might be parsed from the [shebang line](https://wikipedia.org/wiki/Shebang_(Unix)) of the file. + For Windows VM, this value is not supported.", +"Indicates that the file is run with `/bin/sh` on Linux and `cmd` on Windows.", +"Indicates that the file is run with PowerShell." +], +"type": "string" +}, +"localPath": { +"description": "An absolute path to the executable on the VM.", +"type": "string" +} +}, +"type": "object" +}, +"ExecutePatchJobRequest": { +"description": "A request message to initiate patching across Compute Engine instances.", +"id": "ExecutePatchJobRequest", +"properties": { +"description": { +"description": "Description of the patch job. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"displayName": { +"description": "Display name for this patch job. This does not have to be unique.", +"type": "string" +}, +"dryRun": { +"description": "If this patch is a dry-run only, instances are contacted but will do nothing.", +"type": "boolean" +}, +"duration": { +"description": "Duration of the patch job. After the duration ends, the patch job times out.", +"format": "google-duration", +"type": "string" +}, +"instanceFilter": { +"$ref": "PatchInstanceFilter", +"description": "Required. Instances to patch, either explicitly or filtered by some criteria such as zone or labels." +}, +"patchConfig": { +"$ref": "PatchConfig", +"description": "Patch configuration being applied. If omitted, instances are patched using the default configurations." +}, +"rollout": { +"$ref": "PatchRollout", +"description": "Rollout strategy of the patch job." +} +}, +"type": "object" +}, +"FixedOrPercent": { +"description": "Message encapsulating a value that can be either absolute (\"fixed\") or relative (\"percent\") to a value.", +"id": "FixedOrPercent", +"properties": { +"fixed": { +"description": "Specifies a fixed value.", +"format": "int32", +"type": "integer" +}, +"percent": { +"description": "Specifies the relative value defined as a percentage, which will be multiplied by a reference value.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GcsObject": { +"description": "Cloud Storage object representation.", +"id": "GcsObject", +"properties": { +"bucket": { +"description": "Required. Bucket of the Cloud Storage object.", +"type": "string" +}, +"generationNumber": { +"description": "Required. Generation number of the Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Required. Name of the Cloud Storage object.", +"type": "string" +} +}, +"type": "object" +}, +"GooSettings": { +"description": "Googet patching is performed by running `googet update`.", +"id": "GooSettings", +"properties": {}, +"type": "object" +}, +"GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata": { +"description": "OS policy assignment operation metadata provided by OS policy assignment API methods that return long running operations.", +"id": "GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata", +"properties": { +"apiMethod": { +"description": "The OS policy assignment API method.", +"enum": [ +"API_METHOD_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Invalid value", +"Create OS policy assignment API method", +"Update OS policy assignment API method", +"Delete OS policy assignment API method" +], +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"rolloutStartTime": { +"description": "Rollout start time", +"format": "google-datetime", +"type": "string" +}, +"rolloutState": { +"description": "State of the rollout", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"type": "string" +}, +"rolloutUpdateTime": { +"description": "Rollout update time", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Inventory": { +"description": "This API resource represents the available inventory data for a Compute Engine virtual machine (VM) instance at a given point in time. You can use this API resource to determine the inventory data of your VM. For more information, see [Information provided by OS inventory management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).", +"id": "Inventory", +"properties": { +"items": { +"additionalProperties": { +"$ref": "InventoryItem" +}, +"description": "Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.", +"type": "object" +}, +"name": { +"description": "Output only. The `Inventory` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`", +"readOnly": true, +"type": "string" +}, +"osInfo": { +"$ref": "InventoryOsInfo", +"description": "Base level operating system information for the VM." +}, +"updateTime": { +"description": "Output only. Timestamp of the last reported inventory for the VM.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InventoryItem": { +"description": "A single piece of inventory on a VM.", +"id": "InventoryItem", +"properties": { +"availablePackage": { +"$ref": "InventorySoftwarePackage", +"description": "Software package available to be installed on the VM instance." +}, +"createTime": { +"description": "When this inventory item was first detected.", +"format": "google-datetime", +"type": "string" +}, +"id": { +"description": "Identifier for this item, unique across items for this VM.", +"type": "string" +}, +"installedPackage": { +"$ref": "InventorySoftwarePackage", +"description": "Software package present on the VM instance." +}, +"originType": { +"description": "The origin of this inventory item.", +"enum": [ +"ORIGIN_TYPE_UNSPECIFIED", +"INVENTORY_REPORT" +], +"enumDescriptions": [ +"Invalid. An origin type must be specified.", +"This inventory item was discovered as the result of the agent reporting inventory via the reporting API." +], +"type": "string" +}, +"type": { +"description": "The specific type of inventory, correlating to its specific details.", +"enum": [ +"TYPE_UNSPECIFIED", +"INSTALLED_PACKAGE", +"AVAILABLE_PACKAGE" +], +"enumDescriptions": [ +"Invalid. An type must be specified.", +"This represents a package that is installed on the VM.", +"This represents an update that is available for a package." +], +"type": "string" +}, +"updateTime": { +"description": "When this inventory item was last modified.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"InventoryOsInfo": { +"description": "Operating system information for the VM.", +"id": "InventoryOsInfo", +"properties": { +"architecture": { +"description": "The system architecture of the operating system.", +"type": "string" +}, +"hostname": { +"description": "The VM hostname.", +"type": "string" +}, +"kernelRelease": { +"description": "The kernel release of the operating system.", +"type": "string" +}, +"kernelVersion": { +"description": "The kernel version of the operating system.", +"type": "string" +}, +"longName": { +"description": "The operating system long name. For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 Datacenter'.", +"type": "string" +}, +"osconfigAgentVersion": { +"description": "The current version of the OS Config agent running on the VM.", +"type": "string" +}, +"shortName": { +"description": "The operating system short name. For example, 'windows' or 'debian'.", +"type": "string" +}, +"version": { +"description": "The version of the operating system.", +"type": "string" +} +}, +"type": "object" +}, +"InventorySoftwarePackage": { +"description": "Software package information of the operating system.", +"id": "InventorySoftwarePackage", +"properties": { +"aptPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of an APT package. For details about the apt package manager, see https://wiki.debian.org/Apt." +}, +"cosPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of a COS package." +}, +"googetPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of a Googet package. For details about the googet package manager, see https://github.com/google/googet." +}, +"qfePackage": { +"$ref": "InventoryWindowsQuickFixEngineeringPackage", +"description": "Details of a Windows Quick Fix engineering package. See https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering for info in Windows Quick Fix Engineering." +}, +"windowsApplication": { +"$ref": "InventoryWindowsApplication", +"description": "Details of Windows Application." +}, +"wuaPackage": { +"$ref": "InventoryWindowsUpdatePackage", +"description": "Details of a Windows Update package. See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for information about Windows Update." +}, +"yumPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Yum package info. For details about the yum package manager, see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum." +}, +"zypperPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of a Zypper package. For details about the Zypper package manager, see https://en.opensuse.org/SDB:Zypper_manual." +}, +"zypperPatch": { +"$ref": "InventoryZypperPatch", +"description": "Details of a Zypper patch. For details about the Zypper package manager, see https://en.opensuse.org/SDB:Zypper_manual." +} +}, +"type": "object" +}, +"InventoryVersionedPackage": { +"description": "Information related to the a standard versioned package. This includes package info for APT, Yum, Zypper, and Googet package managers.", +"id": "InventoryVersionedPackage", +"properties": { +"architecture": { +"description": "The system architecture this package is intended for.", +"type": "string" +}, +"packageName": { +"description": "The name of the package.", +"type": "string" +}, +"version": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsApplication": { +"description": "Contains information about a Windows application that is retrieved from the Windows Registry. For more information about these fields, see: https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key", +"id": "InventoryWindowsApplication", +"properties": { +"displayName": { +"description": "The name of the application or product.", +"type": "string" +}, +"displayVersion": { +"description": "The version of the product or application in string format.", +"type": "string" +}, +"helpLink": { +"description": "The internet address for technical support.", +"type": "string" +}, +"installDate": { +"$ref": "Date", +"description": "The last time this product received service. The value of this property is replaced each time a patch is applied or removed from the product or the command-line option is used to repair the product." +}, +"publisher": { +"description": "The name of the manufacturer for the product or application.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsQuickFixEngineeringPackage": { +"description": "Information related to a Quick Fix Engineering package. Fields are taken from Windows QuickFixEngineering Interface and match the source names: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering", +"id": "InventoryWindowsQuickFixEngineeringPackage", +"properties": { +"caption": { +"description": "A short textual description of the QFE update.", +"type": "string" +}, +"description": { +"description": "A textual description of the QFE update.", +"type": "string" +}, +"hotFixId": { +"description": "Unique identifier associated with a particular QFE update.", +"type": "string" +}, +"installTime": { +"description": "Date that the QFE update was installed. Mapped from installed_on field.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsUpdatePackage": { +"description": "Details related to a Windows Update package. Field data and names are taken from Windows Update API IUpdate Interface: https://docs.microsoft.com/en-us/windows/win32/api/_wua/ Descriptive fields like title, and description are localized based on the locale of the VM being updated.", +"id": "InventoryWindowsUpdatePackage", +"properties": { +"categories": { +"description": "The categories that are associated with this update package.", +"items": { +"$ref": "InventoryWindowsUpdatePackageWindowsUpdateCategory" +}, +"type": "array" +}, +"description": { +"description": "The localized description of the update package.", +"type": "string" +}, +"kbArticleIds": { +"description": "A collection of Microsoft Knowledge Base article IDs that are associated with the update package.", +"items": { +"type": "string" +}, +"type": "array" +}, +"lastDeploymentChangeTime": { +"description": "The last published date of the update, in (UTC) date and time.", +"format": "google-datetime", +"type": "string" +}, +"moreInfoUrls": { +"description": "A collection of URLs that provide more information about the update package.", +"items": { +"type": "string" +}, +"type": "array" +}, +"revisionNumber": { +"description": "The revision number of this update package.", +"format": "int32", +"type": "integer" +}, +"supportUrl": { +"description": "A hyperlink to the language-specific support information for the update.", +"type": "string" +}, +"title": { +"description": "The localized title of the update package.", +"type": "string" +}, +"updateId": { +"description": "Gets the identifier of an update package. Stays the same across revisions.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsUpdatePackageWindowsUpdateCategory": { +"description": "Categories specified by the Windows Update.", +"id": "InventoryWindowsUpdatePackageWindowsUpdateCategory", +"properties": { +"id": { +"description": "The identifier of the windows update category.", +"type": "string" +}, +"name": { +"description": "The name of the windows update category.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryZypperPatch": { +"description": "Details related to a Zypper Patch.", +"id": "InventoryZypperPatch", +"properties": { +"category": { +"description": "The category of the patch.", +"type": "string" +}, +"patchName": { +"description": "The name of the patch.", +"type": "string" +}, +"severity": { +"description": "The severity specified for this patch", +"type": "string" +}, +"summary": { +"description": "Any summary information provided about this patch.", +"type": "string" +} +}, +"type": "object" +}, +"ListInventoriesResponse": { +"description": "A response message for listing inventory data for all VMs in a specified location.", +"id": "ListInventoriesResponse", +"properties": { +"inventories": { +"description": "List of inventory objects.", +"items": { +"$ref": "Inventory" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The pagination token to retrieve the next page of inventory objects.", +"type": "string" +} +}, +"type": "object" +}, +"ListOSPolicyAssignmentReportsResponse": { +"description": "A response message for listing OS Policy assignment reports including the page of results and page token.", +"id": "ListOSPolicyAssignmentReportsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of OS policy assignment report objects.", +"type": "string" +}, +"osPolicyAssignmentReports": { +"description": "List of OS policy assignment reports.", +"items": { +"$ref": "OSPolicyAssignmentReport" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOSPolicyAssignmentRevisionsResponse": { +"description": "A response message for listing all revisions for a OS policy assignment.", +"id": "ListOSPolicyAssignmentRevisionsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of OS policy assignment revisions.", +"type": "string" +}, +"osPolicyAssignments": { +"description": "The OS policy assignment revisions", +"items": { +"$ref": "OSPolicyAssignment" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOSPolicyAssignmentsResponse": { +"description": "A response message for listing all assignments under given parent.", +"id": "ListOSPolicyAssignmentsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of OS policy assignments.", +"type": "string" +}, +"osPolicyAssignments": { +"description": "The list of assignments", +"items": { +"$ref": "OSPolicyAssignment" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPatchDeploymentsResponse": { +"description": "A response message for listing patch deployments.", +"id": "ListPatchDeploymentsResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token that can be used to get the next page of patch deployments.", +"type": "string" +}, +"patchDeployments": { +"description": "The list of patch deployments.", +"items": { +"$ref": "PatchDeployment" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPatchJobInstanceDetailsResponse": { +"description": "A response message for listing the instances details for a patch job.", +"id": "ListPatchJobInstanceDetailsResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token that can be used to get the next page of results.", +"type": "string" +}, +"patchJobInstanceDetails": { +"description": "A list of instance status.", +"items": { +"$ref": "PatchJobInstanceDetails" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPatchJobsResponse": { +"description": "A response message for listing patch jobs.", +"id": "ListPatchJobsResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token that can be used to get the next page of results.", +"type": "string" +}, +"patchJobs": { +"description": "The list of patch jobs.", +"items": { +"$ref": "PatchJob" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVulnerabilityReportsResponse": { +"description": "A response message for listing vulnerability reports for all VM instances in the specified location.", +"id": "ListVulnerabilityReportsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of vulnerabilityReports object.", +"type": "string" +}, +"vulnerabilityReports": { +"description": "List of vulnerabilityReport objects.", +"items": { +"$ref": "VulnerabilityReport" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonthlySchedule": { +"description": "Represents a monthly schedule. An example of a valid monthly schedule is \"on the third Tuesday of the month\" or \"on the 15th of the month\".", +"id": "MonthlySchedule", +"properties": { +"monthDay": { +"description": "Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 indicates the last day of the month. Months without the target day will be skipped. For example, a schedule to run \"every month on the 31st\" will not run in February, April, June, etc.", +"format": "int32", +"type": "integer" +}, +"weekDayOfMonth": { +"$ref": "WeekDayOfMonth", +"description": "Required. Week day in a month." +} +}, +"type": "object" +}, +"OSPolicy": { +"description": "An OS policy defines the desired state configuration for a VM.", +"id": "OSPolicy", +"properties": { +"allowNoResourceGroupMatch": { +"description": "This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce.", +"type": "boolean" +}, +"description": { +"description": "Policy description. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"id": { +"description": "Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.", +"type": "string" +}, +"mode": { +"description": "Required. Policy mode", +"enum": [ +"MODE_UNSPECIFIED", +"VALIDATION", +"ENFORCEMENT" +], +"enumDescriptions": [ +"Invalid mode", +"This mode checks if the configuration resources in the policy are in their desired state. No actions are performed if they are not in the desired state. This mode is used for reporting purposes.", +"This mode checks if the configuration resources in the policy are in their desired state, and if not, enforces the desired state." +], +"type": "string" +}, +"resourceGroups": { +"description": "Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match`", +"items": { +"$ref": "OSPolicyResourceGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyAssignment": { +"description": "OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information about the OS policy resource definitions and examples, see [OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).", +"id": "OSPolicyAssignment", +"properties": { +"baseline": { +"description": "Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field.", +"readOnly": true, +"type": "boolean" +}, +"deleted": { +"description": "Output only. Indicates that this revision deletes the OS policy assignment.", +"readOnly": true, +"type": "boolean" +}, +"description": { +"description": "OS policy assignment description. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"etag": { +"description": "The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.", +"type": "string" +}, +"instanceFilter": { +"$ref": "OSPolicyAssignmentInstanceFilter", +"description": "Required. Filter to select VMs." +}, +"name": { +"description": "Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.", +"type": "string" +}, +"osPolicies": { +"description": "Required. List of OS policies to be applied to the VMs.", +"items": { +"$ref": "OSPolicy" +}, +"type": "array" +}, +"reconciling": { +"description": "Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING", +"readOnly": true, +"type": "boolean" +}, +"revisionCreateTime": { +"description": "Output only. The timestamp that the revision was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"revisionId": { +"description": "Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment", +"readOnly": true, +"type": "string" +}, +"rollout": { +"$ref": "OSPolicyAssignmentRollout", +"description": "Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted." +}, +"rolloutState": { +"description": "Output only. OS policy assignment rollout state", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. Server generated unique id for the OS policy assignment resource.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentInstanceFilter": { +"description": "Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them.", +"id": "OSPolicyAssignmentInstanceFilter", +"properties": { +"all": { +"description": "Target all VMs in the project. If true, no other criteria is permitted.", +"type": "boolean" +}, +"exclusionLabels": { +"description": "List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM.", +"items": { +"$ref": "OSPolicyAssignmentLabelSet" +}, +"type": "array" +}, +"inclusionLabels": { +"description": "List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM.", +"items": { +"$ref": "OSPolicyAssignmentLabelSet" +}, +"type": "array" +}, +"inventories": { +"description": "List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories.", +"items": { +"$ref": "OSPolicyAssignmentInstanceFilterInventory" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyAssignmentInstanceFilterInventory": { +"description": "VM inventory details.", +"id": "OSPolicyAssignmentInstanceFilterInventory", +"properties": { +"osShortName": { +"description": "Required. The OS short name", +"type": "string" +}, +"osVersion": { +"description": "The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentLabelSet": { +"description": "Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.", +"id": "OSPolicyAssignmentLabelSet", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.", +"type": "object" +} +}, +"type": "object" +}, +"OSPolicyAssignmentOperationMetadata": { +"description": "OS policy assignment operation metadata provided by OS policy assignment API methods that return long running operations.", +"id": "OSPolicyAssignmentOperationMetadata", +"properties": { +"apiMethod": { +"description": "The OS policy assignment API method.", +"enum": [ +"API_METHOD_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Invalid value", +"Create OS policy assignment API method", +"Update OS policy assignment API method", +"Delete OS policy assignment API method" +], +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"rolloutStartTime": { +"description": "Rollout start time", +"format": "google-datetime", +"type": "string" +}, +"rolloutState": { +"description": "State of the rollout", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"type": "string" +}, +"rolloutUpdateTime": { +"description": "Rollout update time", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReport": { +"description": "A report of the OS policy assignment status for a given instance.", +"id": "OSPolicyAssignmentReport", +"properties": { +"instance": { +"description": "The Compute Engine VM instance name.", +"type": "string" +}, +"lastRunId": { +"description": "Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM. This ID is logged by the OS Config agent while applying the OS policies associated with this assignment on the VM. NOTE: If the service is unable to successfully connect to the agent for this run, then this id will not be available in the agent logs.", +"type": "string" +}, +"name": { +"description": "The `OSPolicyAssignmentReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`", +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"osPolicyCompliances": { +"description": "Compliance data for each `OSPolicy` that is applied to the VM.", +"items": { +"$ref": "OSPolicyAssignmentReportOSPolicyCompliance" +}, +"type": "array" +}, +"updateTime": { +"description": "Timestamp for when the report was last generated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyCompliance": { +"description": "Compliance data for an OS policy", +"id": "OSPolicyAssignmentReportOSPolicyCompliance", +"properties": { +"complianceState": { +"description": "The compliance state of the OS policy.", +"enum": [ +"UNKNOWN", +"COMPLIANT", +"NON_COMPLIANT" +], +"enumDescriptions": [ +"The policy is in an unknown compliance state. Refer to the field `compliance_state_reason` to learn the exact reason for the policy to be in this compliance state.", +"Policy is compliant. The policy is compliant if all the underlying resources are also compliant.", +"Policy is non-compliant. The policy is non-compliant if one or more underlying resources are non-compliant." +], +"type": "string" +}, +"complianceStateReason": { +"description": "The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy.", +"type": "string" +}, +"osPolicyId": { +"description": "The OS policy id", +"type": "string" +}, +"osPolicyResourceCompliances": { +"description": "Compliance data for each resource within the policy that is applied to the VM.", +"items": { +"$ref": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance": { +"description": "Compliance data for an OS policy resource.", +"id": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance", +"properties": { +"complianceState": { +"description": "The compliance state of the resource.", +"enum": [ +"UNKNOWN", +"COMPLIANT", +"NON_COMPLIANT" +], +"enumDescriptions": [ +"The resource is in an unknown compliance state. To get more details about why the policy is in this state, review the output of the `compliance_state_reason` field.", +"Resource is compliant.", +"Resource is non-compliant." +], +"type": "string" +}, +"complianceStateReason": { +"description": "A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined.", +"type": "string" +}, +"configSteps": { +"description": "Ordered list of configuration completed by the agent for the OS policy resource.", +"items": { +"$ref": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep" +}, +"type": "array" +}, +"execResourceOutput": { +"$ref": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput", +"description": "ExecResource specific output." +}, +"osPolicyResourceId": { +"description": "The ID of the OS policy resource.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput": { +"description": "ExecResource specific output.", +"id": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput", +"properties": { +"enforcementOutput": { +"description": "Output from enforcement phase output file (if run). Output size is limited to 100K bytes.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep": { +"description": "Step performed by the OS Config agent for configuring an `OSPolicy` resource to its desired state.", +"id": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep", +"properties": { +"errorMessage": { +"description": "An error message recorded during the execution of this step. Only populated if errors were encountered during this step execution.", +"type": "string" +}, +"type": { +"description": "Configuration step type.", +"enum": [ +"TYPE_UNSPECIFIED", +"VALIDATION", +"DESIRED_STATE_CHECK", +"DESIRED_STATE_ENFORCEMENT", +"DESIRED_STATE_CHECK_POST_ENFORCEMENT" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Checks for resource conflicts such as schema errors.", +"Checks the current status of the desired state for a resource.", +"Enforces the desired state for a resource that is not in desired state.", +"Re-checks the status of the desired state. This check is done for a resource after the enforcement of all OS policies. This step is used to determine the final desired state status for the resource. It accounts for any resources that might have drifted from their desired state due to side effects from executing other resources." +], +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentRollout": { +"description": "Message to configure the rollout at the zonal level for the OS policy assignment.", +"id": "OSPolicyAssignmentRollout", +"properties": { +"disruptionBudget": { +"$ref": "FixedOrPercent", +"description": "Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment." +}, +"minWaitDuration": { +"description": "Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyInventoryFilter": { +"description": "Filtering criteria to select VMs based on inventory details.", +"id": "OSPolicyInventoryFilter", +"properties": { +"osShortName": { +"description": "Required. The OS short name", +"type": "string" +}, +"osVersion": { +"description": "The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResource": { +"description": "An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.", +"id": "OSPolicyResource", +"properties": { +"exec": { +"$ref": "OSPolicyResourceExecResource", +"description": "Exec resource" +}, +"file": { +"$ref": "OSPolicyResourceFileResource", +"description": "File resource" +}, +"id": { +"description": "Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy.", +"type": "string" +}, +"pkg": { +"$ref": "OSPolicyResourcePackageResource", +"description": "Package resource" +}, +"repository": { +"$ref": "OSPolicyResourceRepositoryResource", +"description": "Package repository resource" +} +}, +"type": "object" +}, +"OSPolicyResourceExecResource": { +"description": "A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen.", +"id": "OSPolicyResourceExecResource", +"properties": { +"enforce": { +"$ref": "OSPolicyResourceExecResourceExec", +"description": "What to run to bring this resource into the desired state. An exit code of 100 indicates \"success\", any other exit code indicates a failure running enforce." +}, +"validate": { +"$ref": "OSPolicyResourceExecResourceExec", +"description": "Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates \"in desired state\", and exit code of 101 indicates \"not in desired state\". Any other exit code indicates a failure running validate." +} +}, +"type": "object" +}, +"OSPolicyResourceExecResourceExec": { +"description": "A file or script to execute.", +"id": "OSPolicyResourceExecResourceExec", +"properties": { +"args": { +"description": "Optional arguments to pass to the source during execution.", +"items": { +"type": "string" +}, +"type": "array" +}, +"file": { +"$ref": "OSPolicyResourceFile", +"description": "A remote or local file." +}, +"interpreter": { +"description": "Required. The script interpreter to use.", +"enum": [ +"INTERPRETER_UNSPECIFIED", +"NONE", +"SHELL", +"POWERSHELL" +], +"enumDescriptions": [ +"Invalid value, the request will return validation error.", +"If an interpreter is not specified, the source is executed directly. This execution, without an interpreter, only succeeds for executables and scripts that have shebang lines.", +"Indicates that the script runs with `/bin/sh` on Linux and `cmd.exe` on Windows.", +"Indicates that the script runs with PowerShell." +], +"type": "string" +}, +"outputFilePath": { +"description": "Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.", +"type": "string" +}, +"script": { +"description": "An inline script. The size of the script is limited to 32KiB.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceFile": { +"description": "A remote or local file.", +"id": "OSPolicyResourceFile", +"properties": { +"allowInsecure": { +"description": "Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.", +"type": "boolean" +}, +"gcs": { +"$ref": "OSPolicyResourceFileGcs", +"description": "A Cloud Storage object." +}, +"localPath": { +"description": "A local path within the VM to use.", +"type": "string" +}, +"remote": { +"$ref": "OSPolicyResourceFileRemote", +"description": "A generic remote file." +} +}, +"type": "object" +}, +"OSPolicyResourceFileGcs": { +"description": "Specifies a file available as a Cloud Storage Object.", +"id": "OSPolicyResourceFileGcs", +"properties": { +"bucket": { +"description": "Required. Bucket of the Cloud Storage object.", +"type": "string" +}, +"generation": { +"description": "Generation number of the Cloud Storage object.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Required. Name of the Cloud Storage object.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceFileRemote": { +"description": "Specifies a file available via some URI.", +"id": "OSPolicyResourceFileRemote", +"properties": { +"sha256Checksum": { +"description": "SHA256 checksum of the remote file.", +"type": "string" +}, +"uri": { +"description": "Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceFileResource": { +"description": "A resource that manages the state of a file.", +"id": "OSPolicyResourceFileResource", +"properties": { +"content": { +"description": "A a file with this content. The size of the content is limited to 32KiB.", +"type": "string" +}, +"file": { +"$ref": "OSPolicyResourceFile", +"description": "A remote or local source." +}, +"path": { +"description": "Required. The absolute path of the file within the VM.", +"type": "string" +}, +"permissions": { +"description": "Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4", +"type": "string" +}, +"state": { +"description": "Required. Desired state of the file.", +"enum": [ +"DESIRED_STATE_UNSPECIFIED", +"PRESENT", +"ABSENT", +"CONTENTS_MATCH" +], +"enumDescriptions": [ +"Unspecified is invalid.", +"Ensure file at path is present.", +"Ensure file at path is absent.", +"Ensure the contents of the file at path matches. If the file does not exist it will be created." +], +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceGroup": { +"description": "Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group.", +"id": "OSPolicyResourceGroup", +"properties": { +"inventoryFilters": { +"description": "List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally.", +"items": { +"$ref": "OSPolicyInventoryFilter" +}, +"type": "array" +}, +"resources": { +"description": "Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.", +"items": { +"$ref": "OSPolicyResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResource": { +"description": "A resource that manages a system package.", +"id": "OSPolicyResourcePackageResource", +"properties": { +"apt": { +"$ref": "OSPolicyResourcePackageResourceAPT", +"description": "A package managed by Apt." +}, +"deb": { +"$ref": "OSPolicyResourcePackageResourceDeb", +"description": "A deb package file." +}, +"desiredState": { +"description": "Required. The desired state the agent should maintain for this package.", +"enum": [ +"DESIRED_STATE_UNSPECIFIED", +"INSTALLED", +"REMOVED" +], +"enumDescriptions": [ +"Unspecified is invalid.", +"Ensure that the package is installed.", +"The agent ensures that the package is not installed and uninstalls it if detected." +], +"type": "string" +}, +"googet": { +"$ref": "OSPolicyResourcePackageResourceGooGet", +"description": "A package managed by GooGet." +}, +"msi": { +"$ref": "OSPolicyResourcePackageResourceMSI", +"description": "An MSI package." +}, +"rpm": { +"$ref": "OSPolicyResourcePackageResourceRPM", +"description": "An rpm package file." +}, +"yum": { +"$ref": "OSPolicyResourcePackageResourceYUM", +"description": "A package managed by YUM." +}, +"zypper": { +"$ref": "OSPolicyResourcePackageResourceZypper", +"description": "A package managed by Zypper." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceAPT": { +"description": "A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]`", +"id": "OSPolicyResourcePackageResourceAPT", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceDeb": { +"description": "A deb package file. dpkg packages only support INSTALLED state.", +"id": "OSPolicyResourcePackageResourceDeb", +"properties": { +"pullDeps": { +"description": "Whether dependencies should also be installed. - install when false: `dpkg -i package` - install when true: `apt-get update && apt-get -y install package.deb`", +"type": "boolean" +}, +"source": { +"$ref": "OSPolicyResourceFile", +"description": "Required. A deb package." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceGooGet": { +"description": "A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package`", +"id": "OSPolicyResourcePackageResourceGooGet", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceMSI": { +"description": "An MSI package. MSI packages only support INSTALLED state.", +"id": "OSPolicyResourcePackageResourceMSI", +"properties": { +"properties": { +"description": "Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"source": { +"$ref": "OSPolicyResourceFile", +"description": "Required. The MSI package." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceRPM": { +"description": "An RPM package file. RPM packages only support INSTALLED state.", +"id": "OSPolicyResourcePackageResourceRPM", +"properties": { +"pullDeps": { +"description": "Whether dependencies should also be installed. - install when false: `rpm --upgrade --replacepkgs package.rpm` - install when true: `yum -y install package.rpm` or `zypper -y install package.rpm`", +"type": "boolean" +}, +"source": { +"$ref": "OSPolicyResourceFile", +"description": "Required. An rpm package." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceYUM": { +"description": "A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package`", +"id": "OSPolicyResourcePackageResourceYUM", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceZypper": { +"description": "A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package`", +"id": "OSPolicyResourcePackageResourceZypper", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResource": { +"description": "A resource that manages a package repository.", +"id": "OSPolicyResourceRepositoryResource", +"properties": { +"apt": { +"$ref": "OSPolicyResourceRepositoryResourceAptRepository", +"description": "An Apt Repository." +}, +"goo": { +"$ref": "OSPolicyResourceRepositoryResourceGooRepository", +"description": "A Goo Repository." +}, +"yum": { +"$ref": "OSPolicyResourceRepositoryResourceYumRepository", +"description": "A Yum Repository." +}, +"zypper": { +"$ref": "OSPolicyResourceRepositoryResourceZypperRepository", +"description": "A Zypper Repository." +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceAptRepository": { +"description": "Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.", +"id": "OSPolicyResourceRepositoryResourceAptRepository", +"properties": { +"archiveType": { +"description": "Required. Type of archive files in this repository.", +"enum": [ +"ARCHIVE_TYPE_UNSPECIFIED", +"DEB", +"DEB_SRC" +], +"enumDescriptions": [ +"Unspecified is invalid.", +"Deb indicates that the archive contains binary files.", +"Deb-src indicates that the archive contains source files." +], +"type": "string" +}, +"components": { +"description": "Required. List of components for this repository. Must contain at least one item.", +"items": { +"type": "string" +}, +"type": "array" +}, +"distribution": { +"description": "Required. Distribution of this repository.", +"type": "string" +}, +"gpgKey": { +"description": "URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.", +"type": "string" +}, +"uri": { +"description": "Required. URI for this repository.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceGooRepository": { +"description": "Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.", +"id": "OSPolicyResourceRepositoryResourceGooRepository", +"properties": { +"name": { +"description": "Required. The name of the repository.", +"type": "string" +}, +"url": { +"description": "Required. The url of the repository.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceYumRepository": { +"description": "Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`.", +"id": "OSPolicyResourceRepositoryResourceYumRepository", +"properties": { +"baseUrl": { +"description": "Required. The location of the repository directory.", +"type": "string" +}, +"displayName": { +"description": "The display name of the repository.", +"type": "string" +}, +"gpgKeys": { +"description": "URIs of GPG keys.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceZypperRepository": { +"description": "Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.", +"id": "OSPolicyResourceRepositoryResourceZypperRepository", +"properties": { +"baseUrl": { +"description": "Required. The location of the repository directory.", +"type": "string" +}, +"displayName": { +"description": "The display name of the repository.", +"type": "string" +}, +"gpgKeys": { +"description": "URIs of GPG keys.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.", +"type": "string" +} +}, +"type": "object" +}, +"OneTimeSchedule": { +"description": "Sets the time for a one time patch deployment. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"id": "OneTimeSchedule", +"properties": { +"executeTime": { +"description": "Required. The desired patch job execution time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"PatchConfig": { +"description": "Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance.", +"id": "PatchConfig", +"properties": { +"apt": { +"$ref": "AptSettings", +"description": "Apt update settings. Use this setting to override the default `apt` patch rules." +}, +"goo": { +"$ref": "GooSettings", +"description": "Goo update settings. Use this setting to override the default `goo` patch rules." +}, +"migInstancesAllowed": { +"description": "Allows the patch job to run on Managed instance groups (MIGs).", +"type": "boolean" +}, +"postStep": { +"$ref": "ExecStep", +"description": "The `ExecStep` to run after the patch update." +}, +"preStep": { +"$ref": "ExecStep", +"description": "The `ExecStep` to run before the patch update." +}, +"rebootConfig": { +"description": "Post-patch reboot settings.", +"enum": [ +"REBOOT_CONFIG_UNSPECIFIED", +"DEFAULT", +"ALWAYS", +"NEVER" +], +"enumDescriptions": [ +"The default behavior is DEFAULT.", +"The agent decides if a reboot is necessary by checking signals such as registry keys on Windows or `/var/run/reboot-required` on APT based systems. On RPM based systems, a set of core system package install times are compared with system boot time.", +"Always reboot the machine after the update completes.", +"Never reboot the machine after the update completes." +], +"type": "string" +}, +"windowsUpdate": { +"$ref": "WindowsUpdateSettings", +"description": "Windows update settings. Use this override the default windows patch rules." +}, +"yum": { +"$ref": "YumSettings", +"description": "Yum update settings. Use this setting to override the default `yum` patch rules." +}, +"zypper": { +"$ref": "ZypperSettings", +"description": "Zypper update settings. Use this setting to override the default `zypper` patch rules." +} +}, +"type": "object" +}, +"PatchDeployment": { +"description": "Patch deployments are configurations that individual patch jobs use to complete a patch. These configurations include instance filter, package repository settings, and a schedule. For more information about creating and managing patch deployments, see [Scheduling patch jobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs).", +"id": "PatchDeployment", +"properties": { +"createTime": { +"description": "Output only. Time the patch deployment was created. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Description of the patch deployment. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"duration": { +"description": "Optional. Duration of the patch. After the duration ends, the patch times out.", +"format": "google-duration", +"type": "string" +}, +"instanceFilter": { +"$ref": "PatchInstanceFilter", +"description": "Required. VM instances to patch." +}, +"lastExecuteTime": { +"description": "Output only. The last time a patch job was started by this deployment. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Unique name for the patch deployment resource in a project. The patch deployment name is in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when you create a new patch deployment.", +"type": "string" +}, +"oneTimeSchedule": { +"$ref": "OneTimeSchedule", +"description": "Required. Schedule a one-time execution." +}, +"patchConfig": { +"$ref": "PatchConfig", +"description": "Optional. Patch configuration that is applied." +}, +"recurringSchedule": { +"$ref": "RecurringSchedule", +"description": "Required. Schedule recurring executions." +}, +"rollout": { +"$ref": "PatchRollout", +"description": "Optional. Rollout strategy of the patch job." +}, +"state": { +"description": "Output only. Current state of the patch deployment.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"PAUSED" +], +"enumDescriptions": [ +"The default value. This value is used if the state is omitted.", +"Active value means that patch deployment generates Patch Jobs.", +"Paused value means that patch deployment does not generate Patch jobs. Requires user action to move in and out from this state." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time the patch deployment was last updated. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PatchInstanceFilter": { +"description": "A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.", +"id": "PatchInstanceFilter", +"properties": { +"all": { +"description": "Target all VM instances in the project. If true, no other criteria is permitted.", +"type": "boolean" +}, +"groupLabels": { +"description": "Targets VM instances matching ANY of these GroupLabels. This allows targeting of disparate groups of VM instances.", +"items": { +"$ref": "PatchInstanceFilterGroupLabel" +}, +"type": "array" +}, +"instanceNamePrefixes": { +"description": "Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=\"prod-\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"instances": { +"description": "Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`", +"items": { +"type": "string" +}, +"type": "array" +}, +"zones": { +"description": "Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PatchInstanceFilterGroupLabel": { +"description": "Targets a group of VM instances by using their [assigned labels](https://cloud.google.com/compute/docs/labeling-resources). Labels are key-value pairs. A `GroupLabel` is a combination of labels that is used to target VMs for a patch job. For example, a patch job can target VMs that have the following `GroupLabel`: `{\"env\":\"test\", \"app\":\"web\"}`. This means that the patch job is applied to VMs that have both the labels `env=test` and `app=web`.", +"id": "PatchInstanceFilterGroupLabel", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.", +"type": "object" +} +}, +"type": "object" +}, +"PatchJob": { +"description": "A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).", +"id": "PatchJob", +"properties": { +"createTime": { +"description": "Time this patch job was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "Description of the patch job. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"displayName": { +"description": "Display name for this patch job. This is not a unique identifier.", +"type": "string" +}, +"dryRun": { +"description": "If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.", +"type": "boolean" +}, +"duration": { +"description": "Duration of the patch job. After the duration ends, the patch job times out.", +"format": "google-duration", +"type": "string" +}, +"errorMessage": { +"description": "If this patch job failed, this message provides information about the failure.", +"type": "string" +}, +"instanceDetailsSummary": { +"$ref": "PatchJobInstanceDetailsSummary", +"description": "Summary of instance details." +}, +"instanceFilter": { +"$ref": "PatchInstanceFilter", +"description": "Instances to patch." +}, +"name": { +"description": "Unique identifier for this patch job in the form `projects/*/patchJobs/*`", +"type": "string" +}, +"patchConfig": { +"$ref": "PatchConfig", +"description": "Patch configuration being applied." +}, +"patchDeployment": { +"description": "Output only. Name of the patch deployment that created this patch job.", +"readOnly": true, +"type": "string" +}, +"percentComplete": { +"description": "Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.", +"format": "double", +"type": "number" +}, +"rollout": { +"$ref": "PatchRollout", +"description": "Rollout strategy being applied." +}, +"state": { +"description": "The current state of the PatchJob.", +"enum": [ +"STATE_UNSPECIFIED", +"STARTED", +"INSTANCE_LOOKUP", +"PATCHING", +"SUCCEEDED", +"COMPLETED_WITH_ERRORS", +"CANCELED", +"TIMED_OUT" +], +"enumDescriptions": [ +"State must be specified.", +"The patch job was successfully initiated.", +"The patch job is looking up instances to run the patch on.", +"Instances are being patched.", +"Patch job completed successfully.", +"Patch job completed but there were errors.", +"The patch job was canceled.", +"The patch job timed out." +], +"type": "string" +}, +"updateTime": { +"description": "Last time this patch job was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"PatchJobInstanceDetails": { +"description": "Patch details for a VM instance. For more information about reviewing VM instance details, see [Listing all VM instance details for a specific patch job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details).", +"id": "PatchJobInstanceDetails", +"properties": { +"attemptCount": { +"description": "The number of times the agent that the agent attempts to apply the patch.", +"format": "int64", +"type": "string" +}, +"failureReason": { +"description": "If the patch fails, this field provides the reason.", +"type": "string" +}, +"instanceSystemId": { +"description": "The unique identifier for the instance. This identifier is defined by the server.", +"type": "string" +}, +"name": { +"description": "The instance name in the form `projects/*/zones/*/instances/*`", +"type": "string" +}, +"state": { +"description": "Current state of instance patch.", +"enum": [ +"PATCH_STATE_UNSPECIFIED", +"PENDING", +"INACTIVE", +"NOTIFIED", +"STARTED", +"DOWNLOADING_PATCHES", +"APPLYING_PATCHES", +"REBOOTING", +"SUCCEEDED", +"SUCCEEDED_REBOOT_REQUIRED", +"FAILED", +"ACKED", +"TIMED_OUT", +"RUNNING_PRE_PATCH_STEP", +"RUNNING_POST_PATCH_STEP", +"NO_AGENT_DETECTED" +], +"enumDescriptions": [ +"Unspecified.", +"The instance is not yet notified.", +"Instance is inactive and cannot be patched.", +"The instance is notified that it should be patched.", +"The instance has started the patching process.", +"The instance is downloading patches.", +"The instance is applying patches.", +"The instance is rebooting.", +"The instance has completed applying patches.", +"The instance has completed applying patches but a reboot is required.", +"The instance has failed to apply the patch.", +"The instance acked the notification and will start shortly.", +"The instance exceeded the time out while applying the patch.", +"The instance is running the pre-patch step.", +"The instance is running the post-patch step.", +"The service could not detect the presence of the agent. Check to ensure that the agent is installed, running, and able to communicate with the service." +], +"type": "string" +} +}, +"type": "object" +}, +"PatchJobInstanceDetailsSummary": { +"description": "A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance.", +"id": "PatchJobInstanceDetailsSummary", +"properties": { +"ackedInstanceCount": { +"description": "Number of instances that have acked and will start shortly.", +"format": "int64", +"type": "string" +}, +"applyingPatchesInstanceCount": { +"description": "Number of instances that are applying patches.", +"format": "int64", +"type": "string" +}, +"downloadingPatchesInstanceCount": { +"description": "Number of instances that are downloading patches.", +"format": "int64", +"type": "string" +}, +"failedInstanceCount": { +"description": "Number of instances that failed.", +"format": "int64", +"type": "string" +}, +"inactiveInstanceCount": { +"description": "Number of instances that are inactive.", +"format": "int64", +"type": "string" +}, +"noAgentDetectedInstanceCount": { +"description": "Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.", +"format": "int64", +"type": "string" +}, +"notifiedInstanceCount": { +"description": "Number of instances notified about patch job.", +"format": "int64", +"type": "string" +}, +"pendingInstanceCount": { +"description": "Number of instances pending patch job.", +"format": "int64", +"type": "string" +}, +"postPatchStepInstanceCount": { +"description": "Number of instances that are running the post-patch step.", +"format": "int64", +"type": "string" +}, +"prePatchStepInstanceCount": { +"description": "Number of instances that are running the pre-patch step.", +"format": "int64", +"type": "string" +}, +"rebootingInstanceCount": { +"description": "Number of instances rebooting.", +"format": "int64", +"type": "string" +}, +"startedInstanceCount": { +"description": "Number of instances that have started.", +"format": "int64", +"type": "string" +}, +"succeededInstanceCount": { +"description": "Number of instances that have completed successfully.", +"format": "int64", +"type": "string" +}, +"succeededRebootRequiredInstanceCount": { +"description": "Number of instances that require reboot.", +"format": "int64", +"type": "string" +}, +"timedOutInstanceCount": { +"description": "Number of instances that exceeded the time out while applying the patch.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PatchRollout": { +"description": "Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs.", +"id": "PatchRollout", +"properties": { +"disruptionBudget": { +"$ref": "FixedOrPercent", +"description": "The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops." +}, +"mode": { +"description": "Mode of the patch rollout.", +"enum": [ +"MODE_UNSPECIFIED", +"ZONE_BY_ZONE", +"CONCURRENT_ZONES" +], +"enumDescriptions": [ +"Mode must be specified.", +"Patches are applied one zone at a time. The patch job begins in the region with the lowest number of targeted VMs. Within the region, patching begins in the zone with the lowest number of targeted VMs. If multiple regions (or zones within a region) have the same number of targeted VMs, a tie-breaker is achieved by sorting the regions or zones in alphabetical order.", +"Patches are applied to VMs in all zones at the same time." +], +"type": "string" +} +}, +"type": "object" +}, +"PausePatchDeploymentRequest": { +"description": "A request message for pausing a patch deployment.", +"id": "PausePatchDeploymentRequest", +"properties": {}, +"type": "object" +}, +"ProjectFeatureSettings": { +"description": "ProjectFeatureSettings represents the VM Manager feature settings in a project. For more information, see Enable full VM Manager functionality.", +"id": "ProjectFeatureSettings", +"properties": { +"name": { +"description": "Required. Immutable. Name specifies the URL for the ProjectFeatureSettings resource: projects/project_id/locations/global/projectFeatureSettings.", +"type": "string" +}, +"patchAndConfigFeatureSet": { +"description": "Set PatchAndConfigFeatureSet for the project.", +"enum": [ +"PATCH_AND_CONFIG_FEATURE_SET_UNSPECIFIED", +"OSCONFIG_B", +"OSCONFIG_C" +], +"enumDescriptions": [ +"Not specified placeholder", +"Enables only the basic set of VM Manager features in the project.", +"Enables all VM Manager features in the project." +], +"type": "string" +} +}, +"type": "object" +}, +"RecurringSchedule": { +"description": "Sets the time for recurring patch deployments.", +"id": "RecurringSchedule", +"properties": { +"endTime": { +"description": "Optional. The end time at which a recurring patch deployment schedule is no longer active.", +"format": "google-datetime", +"type": "string" +}, +"frequency": { +"description": "Required. The frequency unit of this recurring schedule.", +"enum": [ +"FREQUENCY_UNSPECIFIED", +"WEEKLY", +"MONTHLY", +"DAILY" +], +"enumDescriptions": [ +"Invalid. A frequency must be specified.", +"Indicates that the frequency of recurrence should be expressed in terms of weeks.", +"Indicates that the frequency of recurrence should be expressed in terms of months.", +"Indicates that the frequency of recurrence should be expressed in terms of days." +], +"type": "string" +}, +"lastExecuteTime": { +"description": "Output only. The time the last patch job ran successfully.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"monthly": { +"$ref": "MonthlySchedule", +"description": "Required. Schedule with monthly executions." +}, +"nextExecuteTime": { +"description": "Output only. The time the next patch job is scheduled to run.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"startTime": { +"description": "Optional. The time that the recurring schedule becomes effective. Defaults to `create_time` of the patch deployment.", +"format": "google-datetime", +"type": "string" +}, +"timeOfDay": { +"$ref": "TimeOfDay", +"description": "Required. Time of the day to run a recurring deployment." +}, +"timeZone": { +"$ref": "TimeZone", +"description": "Required. Defines the time zone that `time_of_day` is relative to. The rules for daylight saving time are determined by the chosen time zone." +}, +"weekly": { +"$ref": "WeeklySchedule", +"description": "Required. Schedule with weekly executions." +} +}, +"type": "object" +}, +"ResumePatchDeploymentRequest": { +"description": "A request message for resuming a patch deployment.", +"id": "ResumePatchDeploymentRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TimeZone": { +"description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", +"id": "TimeZone", +"properties": { +"id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"type": "string" +}, +"version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReport": { +"description": "This API resource represents the vulnerability report for a specified Compute Engine virtual machine (VM) instance at a given point in time. For more information, see [Vulnerability reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).", +"id": "VulnerabilityReport", +"properties": { +"name": { +"description": "Output only. The `vulnerabilityReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp for when the last vulnerability report was generated for the VM.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vulnerabilities": { +"description": "Output only. List of vulnerabilities affecting the VM.", +"items": { +"$ref": "VulnerabilityReportVulnerability" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerability": { +"description": "A vulnerability affecting the VM instance.", +"id": "VulnerabilityReportVulnerability", +"properties": { +"availableInventoryItemIds": { +"deprecated": true, +"description": "Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. If there is no available fix, the field is empty. The `inventory_item` value specifies the latest `SoftwarePackage` available to the VM that fixes the vulnerability.", +"items": { +"type": "string" +}, +"type": "array" +}, +"createTime": { +"description": "The timestamp for when the vulnerability was first detected.", +"format": "google-datetime", +"type": "string" +}, +"details": { +"$ref": "VulnerabilityReportVulnerabilityDetails", +"description": "Contains metadata as per the upstream feed of the operating system and NVD." +}, +"installedInventoryItemIds": { +"deprecated": true, +"description": "Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field displays the inventory items affected by this vulnerability. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. For some distros, this field may be empty.", +"items": { +"type": "string" +}, +"type": "array" +}, +"items": { +"description": "List of items affected by the vulnerability.", +"items": { +"$ref": "VulnerabilityReportVulnerabilityItem" +}, +"type": "array" +}, +"updateTime": { +"description": "The timestamp for when the vulnerability was last modified.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerabilityDetails": { +"description": "Contains metadata information for the vulnerability. This information is collected from the upstream feed of the operating system.", +"id": "VulnerabilityReportVulnerabilityDetails", +"properties": { +"cve": { +"description": "The CVE of the vulnerability. CVE cannot be empty and the combination of should be unique across vulnerabilities for a VM.", +"type": "string" +}, +"cvssV2Score": { +"description": "The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity.", +"format": "float", +"type": "number" +}, +"cvssV3": { +"$ref": "CVSSv3", +"description": "The full description of the CVSSv3 for this vulnerability from NVD." +}, +"description": { +"description": "The note or description describing the vulnerability from the distro.", +"type": "string" +}, +"references": { +"description": "Corresponds to the references attached to the `VulnerabilityDetails`.", +"items": { +"$ref": "VulnerabilityReportVulnerabilityDetailsReference" +}, +"type": "array" +}, +"severity": { +"description": "Assigned severity/impact ranking from the distro.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerabilityDetailsReference": { +"description": "A reference for this vulnerability.", +"id": "VulnerabilityReportVulnerabilityDetailsReference", +"properties": { +"source": { +"description": "The source of the reference e.g. NVD.", +"type": "string" +}, +"url": { +"description": "The url of the reference.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerabilityItem": { +"description": "OS inventory item that is affected by a vulnerability or fixed as a result of a vulnerability.", +"id": "VulnerabilityReportVulnerabilityItem", +"properties": { +"availableInventoryItemId": { +"description": "Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. If there is no available fix, the field is empty. The `inventory_item` value specifies the latest `SoftwarePackage` available to the VM that fixes the vulnerability.", +"type": "string" +}, +"fixedCpeUri": { +"description": "The recommended [CPE URI](https://cpe.mitre.org/specification/) update that contains a fix for this vulnerability.", +"type": "string" +}, +"installedInventoryItemId": { +"description": "Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field displays the inventory items affected by this vulnerability. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. For some operating systems, this field might be empty.", +"type": "string" +}, +"upstreamFix": { +"description": "The upstream OS patch, packages or KB that fixes the vulnerability.", +"type": "string" +} +}, +"type": "object" +}, +"WeekDayOfMonth": { +"description": "Represents one week day in a month. An example is \"the 4th Sunday\".", +"id": "WeekDayOfMonth", +"properties": { +"dayOfWeek": { +"description": "Required. A day of the week.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +}, +"dayOffset": { +"description": "Optional. Represents the number of days before or after the given week day of month that the patch deployment is scheduled for. For example if `week_ordinal` and `day_of_week` values point to the second Tuesday of the month and the `day_offset` value is set to `3`, patch deployment takes place three days after the second Tuesday of the month. If this value is negative, for example -5, patches are deployed five days before the second Tuesday of the month. Allowed values are in range [-30, 30].", +"format": "int32", +"type": "integer" +}, +"weekOrdinal": { +"description": "Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 indicates the last week of the month.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"WeeklySchedule": { +"description": "Represents a weekly schedule.", +"id": "WeeklySchedule", +"properties": { +"dayOfWeek": { +"description": "Required. Day of the week.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +} +}, +"type": "object" +}, +"WindowsUpdateSettings": { +"description": "Windows patching is performed using the Windows Update Agent.", +"id": "WindowsUpdateSettings", +"properties": { +"classifications": { +"description": "Only apply updates of these windows update classifications. If empty, all updates are applied.", +"items": { +"enum": [ +"CLASSIFICATION_UNSPECIFIED", +"CRITICAL", +"SECURITY", +"DEFINITION", +"DRIVER", +"FEATURE_PACK", +"SERVICE_PACK", +"TOOL", +"UPDATE_ROLLUP", +"UPDATE" +], +"enumDescriptions": [ +"Invalid. If classifications are included, they must be specified.", +"\"A widely released fix for a specific problem that addresses a critical, non-security-related bug.\" [1]", +"\"A widely released fix for a product-specific, security-related vulnerability. Security vulnerabilities are rated by their severity. The severity rating is indicated in the Microsoft security bulletin as critical, important, moderate, or low.\" [1]", +"\"A widely released and frequent software update that contains additions to a product's definition database. Definition databases are often used to detect objects that have specific attributes, such as malicious code, phishing websites, or junk mail.\" [1]", +"\"Software that controls the input and output of a device.\" [1]", +"\"New product functionality that is first distributed outside the context of a product release and that is typically included in the next full product release.\" [1]", +"\"A tested, cumulative set of all hotfixes, security updates, critical updates, and updates. Additionally, service packs may contain additional fixes for problems that are found internally since the release of the product. Service packs my also contain a limited number of customer-requested design changes or features.\" [1]", +"\"A utility or feature that helps complete a task or set of tasks.\" [1]", +"\"A tested, cumulative set of hotfixes, security updates, critical updates, and updates that are packaged together for easy deployment. A rollup generally targets a specific area, such as security, or a component of a product, such as Internet Information Services (IIS).\" [1]", +"\"A widely released fix for a specific problem. An update addresses a noncritical, non-security-related bug.\" [1]" +], +"type": "string" +}, +"type": "array" +}, +"excludes": { +"description": "List of KBs to exclude from update.", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePatches": { +"description": "An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"YumSettings": { +"description": "Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms.", +"id": "YumSettings", +"properties": { +"excludes": { +"description": "List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePackages": { +"description": "An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.", +"items": { +"type": "string" +}, +"type": "array" +}, +"minimal": { +"description": "Will cause patch to run `yum update-minimal` instead.", +"type": "boolean" +}, +"security": { +"description": "Adds the `--security` flag to `yum update`. Not supported on all platforms.", +"type": "boolean" +} +}, +"type": "object" +}, +"ZypperSettings": { +"description": "Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual.", +"id": "ZypperSettings", +"properties": { +"categories": { +"description": "Install only patches with these categories. Common categories include security, recommended, and feature.", +"items": { +"type": "string" +}, +"type": "array" +}, +"excludes": { +"description": "List of patches to exclude from update.", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePatches": { +"description": "An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields.", +"items": { +"type": "string" +}, +"type": "array" +}, +"severities": { +"description": "Install only patches with these severities. Common severities include critical, important, moderate, and low.", +"items": { +"type": "string" +}, +"type": "array" +}, +"withOptional": { +"description": "Adds the `--with-optional` flag to `zypper patch`.", +"type": "boolean" +}, +"withUpdate": { +"description": "Adds the `--with-update` flag, to `zypper patch`.", +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "OS Config API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1alpha.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1alpha.json new file mode 100644 index 0000000000000000000000000000000000000000..8ebfa3c829ab878dd4424a66d16fa9a6762dc9c1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1alpha.json @@ -0,0 +1,2723 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://osconfig.googleapis.com/", +"batchPath": "batch", +"canonicalName": "OS Config", +"description": "OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/compute/docs/osconfig/rest", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "osconfig:v1alpha", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://osconfig.mtls.googleapis.com/", +"name": "osconfig", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"instanceOSPoliciesCompliances": { +"deprecated": true, +"methods": { +"get": { +"deprecated": true, +"description": "Get OS policies compliance data for the specified Compute Engine VM instance.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instanceOSPoliciesCompliances/{instanceOSPoliciesCompliancesId}", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instanceOSPoliciesCompliances.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. API resource name for instance OS policies compliance resource. Format: `projects/{project}/locations/{location}/instanceOSPoliciesCompliances/{instance}` For `{project}`, either Compute Engine project-number or project-id can be provided. For `{instance}`, either Compute Engine VM instance-id or instance-name can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instanceOSPoliciesCompliances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "InstanceOSPoliciesCompliance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"deprecated": true, +"description": "List OS policies compliance data for all Compute Engine VM instances in the specified zone.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instanceOSPoliciesCompliances", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instanceOSPoliciesCompliances.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by a `InstanceOSPoliciesCompliance` API resource to be included in the response.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListInstanceOSPoliciesCompliances` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}` For `{project}`, either Compute Engine project-number or project-id can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/instanceOSPoliciesCompliances", +"response": { +"$ref": "ListInstanceOSPoliciesCompliancesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"instances": { +"resources": { +"inventories": { +"methods": { +"get": { +"description": "Get inventory data for the specified VM instance. If the VM has no associated inventory, the message `NOT_FOUND` is returned.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/inventory", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.inventories.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. API resource name for inventory resource. Format: `projects/{project}/locations/{location}/instances/{instance}/inventory` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/inventory$", +"required": true, +"type": "string" +}, +"view": { +"description": "Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.", +"enum": [ +"INVENTORY_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default value. The API defaults to the BASIC view.", +"Returns the basic inventory information that includes `os_info`.", +"Returns all fields." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "Inventory" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List inventory data for all VM instances in the specified zone.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/inventories", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.inventories.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by a `Inventory` API resource to be included in the response.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListInventories` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-` For `{project}`, either `project-number` or `project-id` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Inventory view indicating what information should be included in the inventory resource. If unspecified, the default view is BASIC.", +"enum": [ +"INVENTORY_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default value. The API defaults to the BASIC view.", +"Returns the basic inventory information that includes `os_info`.", +"Returns all fields." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+parent}/inventories", +"response": { +"$ref": "ListInventoriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"osPolicyAssignments": { +"resources": { +"reports": { +"methods": { +"get": { +"description": "Get the OS policy assignment report for the specified Compute Engine VM instance.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/osPolicyAssignments/{osPolicyAssignmentsId}/report", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.osPolicyAssignments.reports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. API resource name for OS policy assignment report. Format: `/projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/report` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance_id}`, either Compute Engine `instance-id` or `instance-name` can be provided. For `{assignment_id}`, the OSPolicyAssignment id must be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+/report$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "OSPolicyAssignmentReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List OS policy assignment reports for all Compute Engine VM instances in the specified zone.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/osPolicyAssignments/{osPolicyAssignmentsId}/reports", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.osPolicyAssignments.reports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by the `OSPolicyAssignmentReport` API resource that is included in the response.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to the `ListOSPolicyAssignmentReports` method that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assignment}/reports` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either `instance-name`, `instance-id`, or `-` can be provided. If '-' is provided, the response will include OSPolicyAssignmentReports for all instances in the project/location. For `{assignment}`, either `assignment-id` or `-` can be provided. If '-' is provided, the response will include OSPolicyAssignmentReports for all OSPolicyAssignments in the project/location. Either {instance} or {assignment} must be `-`. For example: `projects/{project}/locations/{location}/instances/{instance}/osPolicyAssignments/-/reports` returns all reports for the instance `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/{assignment-id}/reports` returns all the reports for the given assignment across all instances. `projects/{project}/locations/{location}/instances/-/osPolicyAssignments/-/reports` returns all the reports for all assignments across all instances.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/reports", +"response": { +"$ref": "ListOSPolicyAssignmentReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"vulnerabilityReports": { +"methods": { +"get": { +"description": "Gets the vulnerability report for the specified VM instance. Only VMs with inventory data have vulnerability reports associated with them.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/vulnerabilityReport", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.vulnerabilityReports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. API resource name for vulnerability resource. Format: `projects/{project}/locations/{location}/instances/{instance}/vulnerabilityReport` For `{project}`, either `project-number` or `project-id` can be provided. For `{instance}`, either Compute Engine `instance-id` or `instance-name` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+/vulnerabilityReport$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "VulnerabilityReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List vulnerability reports for all VM instances in the specified zone.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/vulnerabilityReports", +"httpMethod": "GET", +"id": "osconfig.projects.locations.instances.vulnerabilityReports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "This field supports filtering by the severity level for the vulnerability. For a list of severity levels, see [Severity levels for vulnerabilities](https://cloud.google.com/container-analysis/docs/container-scanning-overview#severity_levels_for_vulnerabilities). The filter field follows the rules described in the [AIP-160](https://google.aip.dev/160) guidelines as follows: + **Filter for a specific severity type**: you can list reports that contain vulnerabilities that are classified as medium by specifying `vulnerabilities.details.severity:MEDIUM`. + **Filter for a range of severities** : you can list reports that have vulnerabilities that are classified as critical or high by specifying `vulnerabilities.details.severity:HIGH OR vulnerabilities.details.severity:CRITICAL`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListVulnerabilityReports` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name. Format: `projects/{project}/locations/{location}/instances/-` For `{project}`, either `project-number` or `project-id` can be provided.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/vulnerabilityReports", +"response": { +"$ref": "ListVulnerabilityReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"osPolicyAssignments": { +"methods": { +"create": { +"description": "Create an OS policy assignment. This method also creates the first revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments", +"httpMethod": "POST", +"id": "osconfig.projects.locations.osPolicyAssignments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"osPolicyAssignmentId": { +"description": "Required. The logical name of the OS policy assignment in the project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name in the form: projects/{project}/locations/{location}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/osPolicyAssignments", +"request": { +"$ref": "OSPolicyAssignment" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete the OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. If the LRO completes and is not cancelled, all revisions associated with the OS policy assignment are deleted. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}", +"httpMethod": "DELETE", +"id": "osconfig.projects.locations.osPolicyAssignments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the OS policy assignment to be deleted", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieve an existing OS policy assignment. This method always returns the latest revision. In order to retrieve a previous revision of the assignment, also provide the revision ID in the `name` parameter.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of OS policy assignment. Format: `projects/{project}/locations/{location}/osPolicyAssignments/{os_policy_assignment}@{revisionId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "OSPolicyAssignment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List the OS policy assignments under the parent resource. For each OS policy assignment, the latest revision is returned.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of assignments to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListOSPolicyAssignments` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/osPolicyAssignments", +"response": { +"$ref": "ListOSPolicyAssignmentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listRevisions": { +"description": "List the OS policy assignment revisions for a given OS policy assignment.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}:listRevisions", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.listRevisions", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the OS policy assignment to list revisions for.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of revisions to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListOSPolicyAssignmentRevisions` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}:listRevisions", +"response": { +"$ref": "ListOSPolicyAssignmentRevisionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update an existing OS policy assignment. This method creates a new revision of the OS policy assignment. This method returns a long running operation (LRO) that contains the rollout details. The rollout can be cancelled by cancelling the LRO. For more information, see [Method: projects.locations.osPolicyAssignments.operations.cancel](https://cloud.google.com/compute/docs/osconfig/rest/v1alpha/projects.locations.osPolicyAssignments.operations/cancel).", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}", +"httpMethod": "PATCH", +"id": "osconfig.projects.locations.osPolicyAssignments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask that controls which fields of the assignment should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"request": { +"$ref": "OSPolicyAssignment" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "osconfig.projects.locations.osPolicyAssignments.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/osPolicyAssignments/{osPolicyAssignmentsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "osconfig.projects.locations.osPolicyAssignments.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/osPolicyAssignments/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://osconfig.googleapis.com/", +"schemas": { +"CVSSv3": { +"description": "Common Vulnerability Scoring System version 3. For details, see https://www.first.org/cvss/specification-document", +"id": "CVSSv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores. https://www.first.org/cvss/specification-document#Base-Metrics", +"format": "float", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"exploitabilityScore": { +"description": "The Exploitability sub-score equation is derived from the Base Exploitability metrics. https://www.first.org/cvss/specification-document#2-1-Exploitability-Metrics", +"format": "float", +"type": "number" +}, +"impactScore": { +"description": "The Impact sub-score equation is derived from the Base Impact metrics.", +"format": "float", +"type": "number" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"FixedOrPercent": { +"description": "Message encapsulating a value that can be either absolute (\"fixed\") or relative (\"percent\") to a value.", +"id": "FixedOrPercent", +"properties": { +"fixed": { +"description": "Specifies a fixed value.", +"format": "int32", +"type": "integer" +}, +"percent": { +"description": "Specifies the relative value defined as a percentage, which will be multiplied by a reference value.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata": { +"description": "OS policy assignment operation metadata provided by OS policy assignment API methods that return long running operations.", +"id": "GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata", +"properties": { +"apiMethod": { +"description": "The OS policy assignment API method.", +"enum": [ +"API_METHOD_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Invalid value", +"Create OS policy assignment API method", +"Update OS policy assignment API method", +"Delete OS policy assignment API method" +], +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"rolloutStartTime": { +"description": "Rollout start time", +"format": "google-datetime", +"type": "string" +}, +"rolloutState": { +"description": "State of the rollout", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"type": "string" +}, +"rolloutUpdateTime": { +"description": "Rollout update time", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"InstanceOSPoliciesCompliance": { +"deprecated": true, +"description": "This API resource represents the OS policies compliance data for a Compute Engine virtual machine (VM) instance at a given point in time. A Compute Engine VM can have multiple OS policy assignments, and each assignment can have multiple OS policies. As a result, multiple OS policies could be applied to a single VM. You can use this API resource to determine both the compliance state of your VM as well as the compliance state of an individual OS policy. For more information, see [View compliance](https://cloud.google.com/compute/docs/os-configuration-management/view-compliance).", +"id": "InstanceOSPoliciesCompliance", +"properties": { +"detailedState": { +"description": "Output only. Detailed compliance state of the VM. This field is populated only when compliance state is `UNKNOWN`. It may contain one of the following values: * `no-compliance-data`: Compliance data is not available for this VM. * `no-agent-detected`: OS Config agent is not detected for this VM. * `config-not-supported-by-agent`: The version of the OS Config agent running on this VM does not support configuration management. * `inactive`: VM is not running. * `internal-service-errors`: There were internal service errors encountered while enforcing compliance. * `agent-errors`: OS config agent encountered errors while enforcing compliance.", +"readOnly": true, +"type": "string" +}, +"detailedStateReason": { +"description": "Output only. The reason for the `detailed_state` of the VM (if any).", +"readOnly": true, +"type": "string" +}, +"instance": { +"description": "Output only. The Compute Engine VM instance name.", +"readOnly": true, +"type": "string" +}, +"lastComplianceCheckTime": { +"description": "Output only. Timestamp of the last compliance check for the VM.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"lastComplianceRunId": { +"description": "Output only. Unique identifier for the last compliance run. This id will be logged by the OS config agent during a compliance run and can be used for debugging and tracing purpose.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The `InstanceOSPoliciesCompliance` API resource name. Format: `projects/{project_number}/locations/{location}/instanceOSPoliciesCompliances/{instance_id}`", +"readOnly": true, +"type": "string" +}, +"osPolicyCompliances": { +"description": "Output only. Compliance data for each `OSPolicy` that is applied to the VM.", +"items": { +"$ref": "InstanceOSPoliciesComplianceOSPolicyCompliance" +}, +"readOnly": true, +"type": "array" +}, +"state": { +"description": "Output only. Compliance state of the VM.", +"enum": [ +"OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED", +"COMPLIANT", +"NON_COMPLIANT", +"UNKNOWN", +"NO_OS_POLICIES_APPLICABLE" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Compliant state.", +"Non-compliant state", +"Unknown compliance state.", +"No applicable OS policies were found for the instance. This state is only applicable to the instance." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InstanceOSPoliciesComplianceOSPolicyCompliance": { +"deprecated": true, +"description": "Compliance data for an OS policy", +"id": "InstanceOSPoliciesComplianceOSPolicyCompliance", +"properties": { +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"osPolicyId": { +"description": "The OS policy id", +"type": "string" +}, +"osPolicyResourceCompliances": { +"description": "Compliance data for each `OSPolicyResource` that is applied to the VM.", +"items": { +"$ref": "OSPolicyResourceCompliance" +}, +"type": "array" +}, +"state": { +"description": "Compliance state of the OS policy.", +"enum": [ +"OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED", +"COMPLIANT", +"NON_COMPLIANT", +"UNKNOWN", +"NO_OS_POLICIES_APPLICABLE" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Compliant state.", +"Non-compliant state", +"Unknown compliance state.", +"No applicable OS policies were found for the instance. This state is only applicable to the instance." +], +"type": "string" +} +}, +"type": "object" +}, +"Inventory": { +"description": "This API resource represents the available inventory data for a Compute Engine virtual machine (VM) instance at a given point in time. You can use this API resource to determine the inventory data of your VM. For more information, see [Information provided by OS inventory management](https://cloud.google.com/compute/docs/instances/os-inventory-management#data-collected).", +"id": "Inventory", +"properties": { +"items": { +"additionalProperties": { +"$ref": "InventoryItem" +}, +"description": "Output only. Inventory items related to the VM keyed by an opaque unique identifier for each inventory item. The identifier is unique to each distinct and addressable inventory item and will change, when there is a new package version.", +"readOnly": true, +"type": "object" +}, +"name": { +"description": "Output only. The `Inventory` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/inventory`", +"readOnly": true, +"type": "string" +}, +"osInfo": { +"$ref": "InventoryOsInfo", +"description": "Output only. Base level operating system information for the VM.", +"readOnly": true +}, +"updateTime": { +"description": "Output only. Timestamp of the last reported inventory for the VM.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InventoryItem": { +"description": "A single piece of inventory on a VM.", +"id": "InventoryItem", +"properties": { +"availablePackage": { +"$ref": "InventorySoftwarePackage", +"description": "Software package available to be installed on the VM instance." +}, +"createTime": { +"description": "When this inventory item was first detected.", +"format": "google-datetime", +"type": "string" +}, +"id": { +"description": "Identifier for this item, unique across items for this VM.", +"type": "string" +}, +"installedPackage": { +"$ref": "InventorySoftwarePackage", +"description": "Software package present on the VM instance." +}, +"originType": { +"description": "The origin of this inventory item.", +"enum": [ +"ORIGIN_TYPE_UNSPECIFIED", +"INVENTORY_REPORT" +], +"enumDescriptions": [ +"Invalid. An origin type must be specified.", +"This inventory item was discovered as the result of the agent reporting inventory via the reporting API." +], +"type": "string" +}, +"type": { +"description": "The specific type of inventory, correlating to its specific details.", +"enum": [ +"TYPE_UNSPECIFIED", +"INSTALLED_PACKAGE", +"AVAILABLE_PACKAGE" +], +"enumDescriptions": [ +"Invalid. An type must be specified.", +"This represents a package that is installed on the VM.", +"This represents an update that is available for a package." +], +"type": "string" +}, +"updateTime": { +"description": "When this inventory item was last modified.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"InventoryOsInfo": { +"description": "Operating system information for the VM.", +"id": "InventoryOsInfo", +"properties": { +"architecture": { +"description": "The system architecture of the operating system.", +"type": "string" +}, +"hostname": { +"description": "The VM hostname.", +"type": "string" +}, +"kernelRelease": { +"description": "The kernel release of the operating system.", +"type": "string" +}, +"kernelVersion": { +"description": "The kernel version of the operating system.", +"type": "string" +}, +"longName": { +"description": "The operating system long name. For example 'Debian GNU/Linux 9' or 'Microsoft Window Server 2019 Datacenter'.", +"type": "string" +}, +"osconfigAgentVersion": { +"description": "The current version of the OS Config agent running on the VM.", +"type": "string" +}, +"shortName": { +"description": "The operating system short name. For example, 'windows' or 'debian'.", +"type": "string" +}, +"version": { +"description": "The version of the operating system.", +"type": "string" +} +}, +"type": "object" +}, +"InventorySoftwarePackage": { +"description": "Software package information of the operating system.", +"id": "InventorySoftwarePackage", +"properties": { +"aptPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of an APT package. For details about the apt package manager, see https://wiki.debian.org/Apt." +}, +"cosPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of a COS package." +}, +"googetPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of a Googet package. For details about the googet package manager, see https://github.com/google/googet." +}, +"qfePackage": { +"$ref": "InventoryWindowsQuickFixEngineeringPackage", +"description": "Details of a Windows Quick Fix engineering package. See https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering for info in Windows Quick Fix Engineering." +}, +"windowsApplication": { +"$ref": "InventoryWindowsApplication", +"description": "Details of Windows Application." +}, +"wuaPackage": { +"$ref": "InventoryWindowsUpdatePackage", +"description": "Details of a Windows Update package. See https://docs.microsoft.com/en-us/windows/win32/api/_wua/ for information about Windows Update." +}, +"yumPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Yum package info. For details about the yum package manager, see https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum." +}, +"zypperPackage": { +"$ref": "InventoryVersionedPackage", +"description": "Details of a Zypper package. For details about the Zypper package manager, see https://en.opensuse.org/SDB:Zypper_manual." +}, +"zypperPatch": { +"$ref": "InventoryZypperPatch", +"description": "Details of a Zypper patch. For details about the Zypper package manager, see https://en.opensuse.org/SDB:Zypper_manual." +} +}, +"type": "object" +}, +"InventoryVersionedPackage": { +"description": "Information related to the a standard versioned package. This includes package info for APT, Yum, Zypper, and Googet package managers.", +"id": "InventoryVersionedPackage", +"properties": { +"architecture": { +"description": "The system architecture this package is intended for.", +"type": "string" +}, +"packageName": { +"description": "The name of the package.", +"type": "string" +}, +"version": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsApplication": { +"description": "Contains information about a Windows application that is retrieved from the Windows Registry. For more information about these fields, see: https://docs.microsoft.com/en-us/windows/win32/msi/uninstall-registry-key", +"id": "InventoryWindowsApplication", +"properties": { +"displayName": { +"description": "The name of the application or product.", +"type": "string" +}, +"displayVersion": { +"description": "The version of the product or application in string format.", +"type": "string" +}, +"helpLink": { +"description": "The internet address for technical support.", +"type": "string" +}, +"installDate": { +"$ref": "Date", +"description": "The last time this product received service. The value of this property is replaced each time a patch is applied or removed from the product or the command-line option is used to repair the product." +}, +"publisher": { +"description": "The name of the manufacturer for the product or application.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsQuickFixEngineeringPackage": { +"description": "Information related to a Quick Fix Engineering package. Fields are taken from Windows QuickFixEngineering Interface and match the source names: https://docs.microsoft.com/en-us/windows/win32/cimwin32prov/win32-quickfixengineering", +"id": "InventoryWindowsQuickFixEngineeringPackage", +"properties": { +"caption": { +"description": "A short textual description of the QFE update.", +"type": "string" +}, +"description": { +"description": "A textual description of the QFE update.", +"type": "string" +}, +"hotFixId": { +"description": "Unique identifier associated with a particular QFE update.", +"type": "string" +}, +"installTime": { +"description": "Date that the QFE update was installed. Mapped from installed_on field.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsUpdatePackage": { +"description": "Details related to a Windows Update package. Field data and names are taken from Windows Update API IUpdate Interface: https://docs.microsoft.com/en-us/windows/win32/api/_wua/ Descriptive fields like title, and description are localized based on the locale of the VM being updated.", +"id": "InventoryWindowsUpdatePackage", +"properties": { +"categories": { +"description": "The categories that are associated with this update package.", +"items": { +"$ref": "InventoryWindowsUpdatePackageWindowsUpdateCategory" +}, +"type": "array" +}, +"description": { +"description": "The localized description of the update package.", +"type": "string" +}, +"kbArticleIds": { +"description": "A collection of Microsoft Knowledge Base article IDs that are associated with the update package.", +"items": { +"type": "string" +}, +"type": "array" +}, +"lastDeploymentChangeTime": { +"description": "The last published date of the update, in (UTC) date and time.", +"format": "google-datetime", +"type": "string" +}, +"moreInfoUrls": { +"description": "A collection of URLs that provide more information about the update package.", +"items": { +"type": "string" +}, +"type": "array" +}, +"revisionNumber": { +"description": "The revision number of this update package.", +"format": "int32", +"type": "integer" +}, +"supportUrl": { +"description": "A hyperlink to the language-specific support information for the update.", +"type": "string" +}, +"title": { +"description": "The localized title of the update package.", +"type": "string" +}, +"updateId": { +"description": "Gets the identifier of an update package. Stays the same across revisions.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryWindowsUpdatePackageWindowsUpdateCategory": { +"description": "Categories specified by the Windows Update.", +"id": "InventoryWindowsUpdatePackageWindowsUpdateCategory", +"properties": { +"id": { +"description": "The identifier of the windows update category.", +"type": "string" +}, +"name": { +"description": "The name of the windows update category.", +"type": "string" +} +}, +"type": "object" +}, +"InventoryZypperPatch": { +"description": "Details related to a Zypper Patch.", +"id": "InventoryZypperPatch", +"properties": { +"category": { +"description": "The category of the patch.", +"type": "string" +}, +"patchName": { +"description": "The name of the patch.", +"type": "string" +}, +"severity": { +"description": "The severity specified for this patch", +"type": "string" +}, +"summary": { +"description": "Any summary information provided about this patch.", +"type": "string" +} +}, +"type": "object" +}, +"ListInstanceOSPoliciesCompliancesResponse": { +"deprecated": true, +"description": "A response message for listing OS policies compliance data for all Compute Engine VMs in the given location.", +"id": "ListInstanceOSPoliciesCompliancesResponse", +"properties": { +"instanceOsPoliciesCompliances": { +"description": "List of instance OS policies compliance objects.", +"items": { +"$ref": "InstanceOSPoliciesCompliance" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The pagination token to retrieve the next page of instance OS policies compliance objects.", +"type": "string" +} +}, +"type": "object" +}, +"ListInventoriesResponse": { +"description": "A response message for listing inventory data for all VMs in a specified location.", +"id": "ListInventoriesResponse", +"properties": { +"inventories": { +"description": "List of inventory objects.", +"items": { +"$ref": "Inventory" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The pagination token to retrieve the next page of inventory objects.", +"type": "string" +} +}, +"type": "object" +}, +"ListOSPolicyAssignmentReportsResponse": { +"description": "A response message for listing OS Policy assignment reports including the page of results and page token.", +"id": "ListOSPolicyAssignmentReportsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of OS policy assignment report objects.", +"type": "string" +}, +"osPolicyAssignmentReports": { +"description": "List of OS policy assignment reports.", +"items": { +"$ref": "OSPolicyAssignmentReport" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOSPolicyAssignmentRevisionsResponse": { +"description": "A response message for listing all revisions for a OS policy assignment.", +"id": "ListOSPolicyAssignmentRevisionsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of OS policy assignment revisions.", +"type": "string" +}, +"osPolicyAssignments": { +"description": "The OS policy assignment revisions", +"items": { +"$ref": "OSPolicyAssignment" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOSPolicyAssignmentsResponse": { +"description": "A response message for listing all assignments under given parent.", +"id": "ListOSPolicyAssignmentsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of OS policy assignments.", +"type": "string" +}, +"osPolicyAssignments": { +"description": "The list of assignments", +"items": { +"$ref": "OSPolicyAssignment" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVulnerabilityReportsResponse": { +"description": "A response message for listing vulnerability reports for all VM instances in the specified location.", +"id": "ListVulnerabilityReportsResponse", +"properties": { +"nextPageToken": { +"description": "The pagination token to retrieve the next page of vulnerabilityReports object.", +"type": "string" +}, +"vulnerabilityReports": { +"description": "List of vulnerabilityReport objects.", +"items": { +"$ref": "VulnerabilityReport" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicy": { +"description": "An OS policy defines the desired state configuration for a VM.", +"id": "OSPolicy", +"properties": { +"allowNoResourceGroupMatch": { +"description": "This flag determines the OS policy compliance status when none of the resource groups within the policy are applicable for a VM. Set this value to `true` if the policy needs to be reported as compliant even if the policy has nothing to validate or enforce.", +"type": "boolean" +}, +"description": { +"description": "Policy description. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"id": { +"description": "Required. The id of the OS policy with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the assignment.", +"type": "string" +}, +"mode": { +"description": "Required. Policy mode", +"enum": [ +"MODE_UNSPECIFIED", +"VALIDATION", +"ENFORCEMENT" +], +"enumDescriptions": [ +"Invalid mode", +"This mode checks if the configuration resources in the policy are in their desired state. No actions are performed if they are not in the desired state. This mode is used for reporting purposes.", +"This mode checks if the configuration resources in the policy are in their desired state, and if not, enforces the desired state." +], +"type": "string" +}, +"resourceGroups": { +"description": "Required. List of resource groups for the policy. For a particular VM, resource groups are evaluated in the order specified and the first resource group that is applicable is selected and the rest are ignored. If none of the resource groups are applicable for a VM, the VM is considered to be non-compliant w.r.t this policy. This behavior can be toggled by the flag `allow_no_resource_group_match`", +"items": { +"$ref": "OSPolicyResourceGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyAssignment": { +"description": "OS policy assignment is an API resource that is used to apply a set of OS policies to a dynamically targeted group of Compute Engine VM instances. An OS policy is used to define the desired state configuration for a Compute Engine VM instance through a set of configuration resources that provide capabilities such as installing or removing software packages, or executing a script. For more information, see [OS policy and OS policy assignment](https://cloud.google.com/compute/docs/os-configuration-management/working-with-os-policies).", +"id": "OSPolicyAssignment", +"properties": { +"baseline": { +"description": "Output only. Indicates that this revision has been successfully rolled out in this zone and new VMs will be assigned OS policies from this revision. For a given OS policy assignment, there is only one revision with a value of `true` for this field.", +"readOnly": true, +"type": "boolean" +}, +"deleted": { +"description": "Output only. Indicates that this revision deletes the OS policy assignment.", +"readOnly": true, +"type": "boolean" +}, +"description": { +"description": "OS policy assignment description. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"etag": { +"description": "The etag for this OS policy assignment. If this is provided on update, it must match the server's etag.", +"type": "string" +}, +"instanceFilter": { +"$ref": "OSPolicyAssignmentInstanceFilter", +"description": "Required. Filter to select VMs." +}, +"name": { +"description": "Resource name. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id}` This field is ignored when you create an OS policy assignment.", +"type": "string" +}, +"osPolicies": { +"description": "Required. List of OS policies to be applied to the VMs.", +"items": { +"$ref": "OSPolicy" +}, +"type": "array" +}, +"reconciling": { +"description": "Output only. Indicates that reconciliation is in progress for the revision. This value is `true` when the `rollout_state` is one of: * IN_PROGRESS * CANCELLING", +"readOnly": true, +"type": "boolean" +}, +"revisionCreateTime": { +"description": "Output only. The timestamp that the revision was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"revisionId": { +"description": "Output only. The assignment revision ID A new revision is committed whenever a rollout is triggered for a OS policy assignment", +"readOnly": true, +"type": "string" +}, +"rollout": { +"$ref": "OSPolicyAssignmentRollout", +"description": "Required. Rollout to deploy the OS policy assignment. A rollout is triggered in the following situations: 1) OSPolicyAssignment is created. 2) OSPolicyAssignment is updated and the update contains changes to one of the following fields: - instance_filter - os_policies 3) OSPolicyAssignment is deleted." +}, +"rolloutState": { +"description": "Output only. OS policy assignment rollout state", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. Server generated unique id for the OS policy assignment resource.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentInstanceFilter": { +"description": "Filters to select target VMs for an assignment. If more than one filter criteria is specified below, a VM will be selected if and only if it satisfies all of them.", +"id": "OSPolicyAssignmentInstanceFilter", +"properties": { +"all": { +"description": "Target all VMs in the project. If true, no other criteria is permitted.", +"type": "boolean" +}, +"exclusionLabels": { +"description": "List of label sets used for VM exclusion. If the list has more than one label set, the VM is excluded if any of the label sets are applicable for the VM.", +"items": { +"$ref": "OSPolicyAssignmentLabelSet" +}, +"type": "array" +}, +"inclusionLabels": { +"description": "List of label sets used for VM inclusion. If the list has more than one `LabelSet`, the VM is included if any of the label sets are applicable for the VM.", +"items": { +"$ref": "OSPolicyAssignmentLabelSet" +}, +"type": "array" +}, +"inventories": { +"description": "List of inventories to select VMs. A VM is selected if its inventory data matches at least one of the following inventories.", +"items": { +"$ref": "OSPolicyAssignmentInstanceFilterInventory" +}, +"type": "array" +}, +"osShortNames": { +"deprecated": true, +"description": "Deprecated. Use the `inventories` field instead. A VM is selected if it's OS short name matches with any of the values provided in this list.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyAssignmentInstanceFilterInventory": { +"description": "VM inventory details.", +"id": "OSPolicyAssignmentInstanceFilterInventory", +"properties": { +"osShortName": { +"description": "Required. The OS short name", +"type": "string" +}, +"osVersion": { +"description": "The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentLabelSet": { +"description": "Message representing label set. * A label is a key value pair set for a VM. * A LabelSet is a set of labels. * Labels within a LabelSet are ANDed. In other words, a LabelSet is applicable for a VM only if it matches all the labels in the LabelSet. * Example: A LabelSet with 2 labels: `env=prod` and `type=webserver` will only be applicable for those VMs with both labels present.", +"id": "OSPolicyAssignmentLabelSet", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels are identified by key/value pairs in this map. A VM should contain all the key/value pairs specified in this map to be selected.", +"type": "object" +} +}, +"type": "object" +}, +"OSPolicyAssignmentOperationMetadata": { +"description": "OS policy assignment operation metadata provided by OS policy assignment API methods that return long running operations.", +"id": "OSPolicyAssignmentOperationMetadata", +"properties": { +"apiMethod": { +"description": "The OS policy assignment API method.", +"enum": [ +"API_METHOD_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Invalid value", +"Create OS policy assignment API method", +"Update OS policy assignment API method", +"Delete OS policy assignment API method" +], +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"rolloutStartTime": { +"description": "Rollout start time", +"format": "google-datetime", +"type": "string" +}, +"rolloutState": { +"description": "State of the rollout", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"type": "string" +}, +"rolloutUpdateTime": { +"description": "Rollout update time", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReport": { +"description": "A report of the OS policy assignment status for a given instance.", +"id": "OSPolicyAssignmentReport", +"properties": { +"instance": { +"description": "The Compute Engine VM instance name.", +"type": "string" +}, +"lastRunId": { +"description": "Unique identifier of the last attempted run to apply the OS policies associated with this assignment on the VM. This ID is logged by the OS Config agent while applying the OS policies associated with this assignment on the VM. NOTE: If the service is unable to successfully connect to the agent for this run, then this id will not be available in the agent logs.", +"type": "string" +}, +"name": { +"description": "The `OSPolicyAssignmentReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/osPolicyAssignments/{os_policy_assignment_id}/report`", +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource that the `OSPolicy` belongs to. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"osPolicyCompliances": { +"description": "Compliance data for each `OSPolicy` that is applied to the VM.", +"items": { +"$ref": "OSPolicyAssignmentReportOSPolicyCompliance" +}, +"type": "array" +}, +"updateTime": { +"description": "Timestamp for when the report was last generated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyCompliance": { +"description": "Compliance data for an OS policy", +"id": "OSPolicyAssignmentReportOSPolicyCompliance", +"properties": { +"complianceState": { +"description": "The compliance state of the OS policy.", +"enum": [ +"UNKNOWN", +"COMPLIANT", +"NON_COMPLIANT" +], +"enumDescriptions": [ +"The policy is in an unknown compliance state. Refer to the field `compliance_state_reason` to learn the exact reason for the policy to be in this compliance state.", +"Policy is compliant. The policy is compliant if all the underlying resources are also compliant.", +"Policy is non-compliant. The policy is non-compliant if one or more underlying resources are non-compliant." +], +"type": "string" +}, +"complianceStateReason": { +"description": "The reason for the OS policy to be in an unknown compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. If populated, the field can contain one of the following values: * `vm-not-running`: The VM was not running. * `os-policies-not-supported-by-agent`: The version of the OS Config agent running on the VM does not support running OS policies. * `no-agent-detected`: The OS Config agent is not detected for the VM. * `resource-execution-errors`: The OS Config agent encountered errors while executing one or more resources in the policy. See `os_policy_resource_compliances` for details. * `task-timeout`: The task sent to the agent to apply the policy timed out. * `unexpected-agent-state`: The OS Config agent did not report the final status of the task that attempted to apply the policy. Instead, the agent unexpectedly started working on a different task. This mostly happens when the agent or VM unexpectedly restarts while applying OS policies. * `internal-service-errors`: Internal service errors were encountered while attempting to apply the policy.", +"type": "string" +}, +"osPolicyId": { +"description": "The OS policy id", +"type": "string" +}, +"osPolicyResourceCompliances": { +"description": "Compliance data for each resource within the policy that is applied to the VM.", +"items": { +"$ref": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance": { +"description": "Compliance data for an OS policy resource.", +"id": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceCompliance", +"properties": { +"complianceState": { +"description": "The compliance state of the resource.", +"enum": [ +"UNKNOWN", +"COMPLIANT", +"NON_COMPLIANT" +], +"enumDescriptions": [ +"The resource is in an unknown compliance state. To get more details about why the policy is in this state, review the output of the `compliance_state_reason` field.", +"Resource is compliant.", +"Resource is non-compliant." +], +"type": "string" +}, +"complianceStateReason": { +"description": "A reason for the resource to be in the given compliance state. This field is always populated when `compliance_state` is `UNKNOWN`. The following values are supported when `compliance_state == UNKNOWN` * `execution-errors`: Errors were encountered by the agent while executing the resource and the compliance state couldn't be determined. * `execution-skipped-by-agent`: Resource execution was skipped by the agent because errors were encountered while executing prior resources in the OS policy. * `os-policy-execution-attempt-failed`: The execution of the OS policy containing this resource failed and the compliance state couldn't be determined.", +"type": "string" +}, +"configSteps": { +"description": "Ordered list of configuration completed by the agent for the OS policy resource.", +"items": { +"$ref": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep" +}, +"type": "array" +}, +"execResourceOutput": { +"$ref": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput", +"description": "ExecResource specific output." +}, +"osPolicyResourceId": { +"description": "The ID of the OS policy resource.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput": { +"description": "ExecResource specific output.", +"id": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceExecResourceOutput", +"properties": { +"enforcementOutput": { +"description": "Output from enforcement phase output file (if run). Output size is limited to 100K bytes.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep": { +"description": "Step performed by the OS Config agent for configuring an `OSPolicy` resource to its desired state.", +"id": "OSPolicyAssignmentReportOSPolicyComplianceOSPolicyResourceComplianceOSPolicyResourceConfigStep", +"properties": { +"errorMessage": { +"description": "An error message recorded during the execution of this step. Only populated if errors were encountered during this step execution.", +"type": "string" +}, +"type": { +"description": "Configuration step type.", +"enum": [ +"TYPE_UNSPECIFIED", +"VALIDATION", +"DESIRED_STATE_CHECK", +"DESIRED_STATE_ENFORCEMENT", +"DESIRED_STATE_CHECK_POST_ENFORCEMENT" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Checks for resource conflicts such as schema errors.", +"Checks the current status of the desired state for a resource.", +"Enforces the desired state for a resource that is not in desired state.", +"Re-checks the status of the desired state. This check is done for a resource after the enforcement of all OS policies. This step is used to determine the final desired state status for the resource. It accounts for any resources that might have drifted from their desired state due to side effects from executing other resources." +], +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyAssignmentRollout": { +"description": "Message to configure the rollout at the zonal level for the OS policy assignment.", +"id": "OSPolicyAssignmentRollout", +"properties": { +"disruptionBudget": { +"$ref": "FixedOrPercent", +"description": "Required. The maximum number (or percentage) of VMs per zone to disrupt at any given moment." +}, +"minWaitDuration": { +"description": "Required. This determines the minimum duration of time to wait after the configuration changes are applied through the current rollout. A VM continues to count towards the `disruption_budget` at least until this duration of time has passed after configuration changes are applied.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyInventoryFilter": { +"description": "Filtering criteria to select VMs based on inventory details.", +"id": "OSPolicyInventoryFilter", +"properties": { +"osShortName": { +"description": "Required. The OS short name", +"type": "string" +}, +"osVersion": { +"description": "The OS version Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*` An empty string matches all OS versions.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyOSFilter": { +"description": "Filtering criteria to select VMs based on OS details.", +"id": "OSPolicyOSFilter", +"properties": { +"osShortName": { +"description": "This should match OS short name emitted by the OS inventory agent. An empty value matches any OS.", +"type": "string" +}, +"osVersion": { +"description": "This value should match the version emitted by the OS inventory agent. Prefix matches are supported if asterisk(*) is provided as the last character. For example, to match all versions with a major version of `7`, specify the following value for this field `7.*`", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResource": { +"description": "An OS policy resource is used to define the desired state configuration and provides a specific functionality like installing/removing packages, executing a script etc. The system ensures that resources are always in their desired state by taking necessary actions if they have drifted from their desired state.", +"id": "OSPolicyResource", +"properties": { +"exec": { +"$ref": "OSPolicyResourceExecResource", +"description": "Exec resource" +}, +"file": { +"$ref": "OSPolicyResourceFileResource", +"description": "File resource" +}, +"id": { +"description": "Required. The id of the resource with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the OS policy.", +"type": "string" +}, +"pkg": { +"$ref": "OSPolicyResourcePackageResource", +"description": "Package resource" +}, +"repository": { +"$ref": "OSPolicyResourceRepositoryResource", +"description": "Package repository resource" +} +}, +"type": "object" +}, +"OSPolicyResourceCompliance": { +"deprecated": true, +"description": "Compliance data for an OS policy resource.", +"id": "OSPolicyResourceCompliance", +"properties": { +"configSteps": { +"description": "Ordered list of configuration steps taken by the agent for the OS policy resource.", +"items": { +"$ref": "OSPolicyResourceConfigStep" +}, +"type": "array" +}, +"execResourceOutput": { +"$ref": "OSPolicyResourceComplianceExecResourceOutput", +"description": "ExecResource specific output." +}, +"osPolicyResourceId": { +"description": "The id of the OS policy resource.", +"type": "string" +}, +"state": { +"description": "Compliance state of the OS policy resource.", +"enum": [ +"OS_POLICY_COMPLIANCE_STATE_UNSPECIFIED", +"COMPLIANT", +"NON_COMPLIANT", +"UNKNOWN", +"NO_OS_POLICIES_APPLICABLE" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Compliant state.", +"Non-compliant state", +"Unknown compliance state.", +"No applicable OS policies were found for the instance. This state is only applicable to the instance." +], +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceComplianceExecResourceOutput": { +"deprecated": true, +"description": "ExecResource specific output.", +"id": "OSPolicyResourceComplianceExecResourceOutput", +"properties": { +"enforcementOutput": { +"description": "Output from Enforcement phase output file (if run). Output size is limited to 100K bytes.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceConfigStep": { +"deprecated": true, +"description": "Step performed by the OS Config agent for configuring an `OSPolicyResource` to its desired state.", +"id": "OSPolicyResourceConfigStep", +"properties": { +"errorMessage": { +"description": "An error message recorded during the execution of this step. Only populated when outcome is FAILED.", +"type": "string" +}, +"outcome": { +"description": "Outcome of the configuration step.", +"enum": [ +"OUTCOME_UNSPECIFIED", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The step succeeded.", +"The step failed." +], +"type": "string" +}, +"type": { +"description": "Configuration step type.", +"enum": [ +"TYPE_UNSPECIFIED", +"VALIDATION", +"DESIRED_STATE_CHECK", +"DESIRED_STATE_ENFORCEMENT", +"DESIRED_STATE_CHECK_POST_ENFORCEMENT" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Validation to detect resource conflicts, schema errors, etc.", +"Check the current desired state status of the resource.", +"Enforce the desired state for a resource that is not in desired state.", +"Re-check desired state status for a resource after enforcement of all resources in the current configuration run. This step is used to determine the final desired state status for the resource. It accounts for any resources that might have drifted from their desired state due to side effects from configuring other resources during the current configuration run." +], +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceExecResource": { +"description": "A resource that allows executing scripts on the VM. The `ExecResource` has 2 stages: `validate` and `enforce` and both stages accept a script as an argument to execute. When the `ExecResource` is applied by the agent, it first executes the script in the `validate` stage. The `validate` stage can signal that the `ExecResource` is already in the desired state by returning an exit code of `100`. If the `ExecResource` is not in the desired state, it should return an exit code of `101`. Any other exit code returned by this stage is considered an error. If the `ExecResource` is not in the desired state based on the exit code from the `validate` stage, the agent proceeds to execute the script from the `enforce` stage. If the `ExecResource` is already in the desired state, the `enforce` stage will not be run. Similar to `validate` stage, the `enforce` stage should return an exit code of `100` to indicate that the resource in now in its desired state. Any other exit code is considered an error. NOTE: An exit code of `100` was chosen over `0` (and `101` vs `1`) to have an explicit indicator of `in desired state`, `not in desired state` and errors. Because, for example, Powershell will always return an exit code of `0` unless an `exit` statement is provided in the script. So, for reasons of consistency and being explicit, exit codes `100` and `101` were chosen.", +"id": "OSPolicyResourceExecResource", +"properties": { +"enforce": { +"$ref": "OSPolicyResourceExecResourceExec", +"description": "What to run to bring this resource into the desired state. An exit code of 100 indicates \"success\", any other exit code indicates a failure running enforce." +}, +"validate": { +"$ref": "OSPolicyResourceExecResourceExec", +"description": "Required. What to run to validate this resource is in the desired state. An exit code of 100 indicates \"in desired state\", and exit code of 101 indicates \"not in desired state\". Any other exit code indicates a failure running validate." +} +}, +"type": "object" +}, +"OSPolicyResourceExecResourceExec": { +"description": "A file or script to execute.", +"id": "OSPolicyResourceExecResourceExec", +"properties": { +"args": { +"description": "Optional arguments to pass to the source during execution.", +"items": { +"type": "string" +}, +"type": "array" +}, +"file": { +"$ref": "OSPolicyResourceFile", +"description": "A remote or local file." +}, +"interpreter": { +"description": "Required. The script interpreter to use.", +"enum": [ +"INTERPRETER_UNSPECIFIED", +"NONE", +"SHELL", +"POWERSHELL" +], +"enumDescriptions": [ +"Invalid value, the request will return validation error.", +"If an interpreter is not specified, the source is executed directly. This execution, without an interpreter, only succeeds for executables and scripts that have shebang lines.", +"Indicates that the script runs with `/bin/sh` on Linux and `cmd.exe` on Windows.", +"Indicates that the script runs with PowerShell." +], +"type": "string" +}, +"outputFilePath": { +"description": "Only recorded for enforce Exec. Path to an output file (that is created by this Exec) whose content will be recorded in OSPolicyResourceCompliance after a successful run. Absence or failure to read this file will result in this ExecResource being non-compliant. Output file size is limited to 100K bytes.", +"type": "string" +}, +"script": { +"description": "An inline script. The size of the script is limited to 32KiB.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceFile": { +"description": "A remote or local file.", +"id": "OSPolicyResourceFile", +"properties": { +"allowInsecure": { +"description": "Defaults to false. When false, files are subject to validations based on the file type: Remote: A checksum must be specified. Cloud Storage: An object generation number must be specified.", +"type": "boolean" +}, +"gcs": { +"$ref": "OSPolicyResourceFileGcs", +"description": "A Cloud Storage object." +}, +"localPath": { +"description": "A local path within the VM to use.", +"type": "string" +}, +"remote": { +"$ref": "OSPolicyResourceFileRemote", +"description": "A generic remote file." +} +}, +"type": "object" +}, +"OSPolicyResourceFileGcs": { +"description": "Specifies a file available as a Cloud Storage Object.", +"id": "OSPolicyResourceFileGcs", +"properties": { +"bucket": { +"description": "Required. Bucket of the Cloud Storage object.", +"type": "string" +}, +"generation": { +"description": "Generation number of the Cloud Storage object.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Required. Name of the Cloud Storage object.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceFileRemote": { +"description": "Specifies a file available via some URI.", +"id": "OSPolicyResourceFileRemote", +"properties": { +"sha256Checksum": { +"description": "SHA256 checksum of the remote file.", +"type": "string" +}, +"uri": { +"description": "Required. URI from which to fetch the object. It should contain both the protocol and path following the format `{protocol}://{location}`.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceFileResource": { +"description": "A resource that manages the state of a file.", +"id": "OSPolicyResourceFileResource", +"properties": { +"content": { +"description": "A a file with this content. The size of the content is limited to 32KiB.", +"type": "string" +}, +"file": { +"$ref": "OSPolicyResourceFile", +"description": "A remote or local source." +}, +"path": { +"description": "Required. The absolute path of the file within the VM.", +"type": "string" +}, +"permissions": { +"description": "Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4", +"type": "string" +}, +"state": { +"description": "Required. Desired state of the file.", +"enum": [ +"DESIRED_STATE_UNSPECIFIED", +"PRESENT", +"ABSENT", +"CONTENTS_MATCH" +], +"enumDescriptions": [ +"Unspecified is invalid.", +"Ensure file at path is present.", +"Ensure file at path is absent.", +"Ensure the contents of the file at path matches. If the file does not exist it will be created." +], +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceGroup": { +"description": "Resource groups provide a mechanism to group OS policy resources. Resource groups enable OS policy authors to create a single OS policy to be applied to VMs running different operating Systems. When the OS policy is applied to a target VM, the appropriate resource group within the OS policy is selected based on the `OSFilter` specified within the resource group.", +"id": "OSPolicyResourceGroup", +"properties": { +"inventoryFilters": { +"description": "List of inventory filters for the resource group. The resources in this resource group are applied to the target VM if it satisfies at least one of the following inventory filters. For example, to apply this resource group to VMs running either `RHEL` or `CentOS` operating systems, specify 2 items for the list with following values: inventory_filters[0].os_short_name='rhel' and inventory_filters[1].os_short_name='centos' If the list is empty, this resource group will be applied to the target VM unconditionally.", +"items": { +"$ref": "OSPolicyInventoryFilter" +}, +"type": "array" +}, +"osFilter": { +"$ref": "OSPolicyOSFilter", +"deprecated": true, +"description": "Deprecated. Use the `inventory_filters` field instead. Used to specify the OS filter for a resource group" +}, +"resources": { +"description": "Required. List of resources configured for this resource group. The resources are executed in the exact order specified here.", +"items": { +"$ref": "OSPolicyResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResource": { +"description": "A resource that manages a system package.", +"id": "OSPolicyResourcePackageResource", +"properties": { +"apt": { +"$ref": "OSPolicyResourcePackageResourceAPT", +"description": "A package managed by Apt." +}, +"deb": { +"$ref": "OSPolicyResourcePackageResourceDeb", +"description": "A deb package file." +}, +"desiredState": { +"description": "Required. The desired state the agent should maintain for this package.", +"enum": [ +"DESIRED_STATE_UNSPECIFIED", +"INSTALLED", +"REMOVED" +], +"enumDescriptions": [ +"Unspecified is invalid.", +"Ensure that the package is installed.", +"The agent ensures that the package is not installed and uninstalls it if detected." +], +"type": "string" +}, +"googet": { +"$ref": "OSPolicyResourcePackageResourceGooGet", +"description": "A package managed by GooGet." +}, +"msi": { +"$ref": "OSPolicyResourcePackageResourceMSI", +"description": "An MSI package." +}, +"rpm": { +"$ref": "OSPolicyResourcePackageResourceRPM", +"description": "An rpm package file." +}, +"yum": { +"$ref": "OSPolicyResourcePackageResourceYUM", +"description": "A package managed by YUM." +}, +"zypper": { +"$ref": "OSPolicyResourcePackageResourceZypper", +"description": "A package managed by Zypper." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceAPT": { +"description": "A package managed by APT. - install: `apt-get update && apt-get -y install [name]` - remove: `apt-get -y remove [name]`", +"id": "OSPolicyResourcePackageResourceAPT", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceDeb": { +"description": "A deb package file. dpkg packages only support INSTALLED state.", +"id": "OSPolicyResourcePackageResourceDeb", +"properties": { +"pullDeps": { +"description": "Whether dependencies should also be installed. - install when false: `dpkg -i package` - install when true: `apt-get update && apt-get -y install package.deb`", +"type": "boolean" +}, +"source": { +"$ref": "OSPolicyResourceFile", +"description": "Required. A deb package." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceGooGet": { +"description": "A package managed by GooGet. - install: `googet -noconfirm install package` - remove: `googet -noconfirm remove package`", +"id": "OSPolicyResourcePackageResourceGooGet", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceMSI": { +"description": "An MSI package. MSI packages only support INSTALLED state.", +"id": "OSPolicyResourcePackageResourceMSI", +"properties": { +"properties": { +"description": "Additional properties to use during installation. This should be in the format of Property=Setting. Appended to the defaults of `ACTION=INSTALL REBOOT=ReallySuppress`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"source": { +"$ref": "OSPolicyResourceFile", +"description": "Required. The MSI package." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceRPM": { +"description": "An RPM package file. RPM packages only support INSTALLED state.", +"id": "OSPolicyResourcePackageResourceRPM", +"properties": { +"pullDeps": { +"description": "Whether dependencies should also be installed. - install when false: `rpm --upgrade --replacepkgs package.rpm` - install when true: `yum -y install package.rpm` or `zypper -y install package.rpm`", +"type": "boolean" +}, +"source": { +"$ref": "OSPolicyResourceFile", +"description": "Required. An rpm package." +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceYUM": { +"description": "A package managed by YUM. - install: `yum -y install package` - remove: `yum -y remove package`", +"id": "OSPolicyResourcePackageResourceYUM", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourcePackageResourceZypper": { +"description": "A package managed by Zypper. - install: `zypper -y install package` - remove: `zypper -y rm package`", +"id": "OSPolicyResourcePackageResourceZypper", +"properties": { +"name": { +"description": "Required. Package name.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResource": { +"description": "A resource that manages a package repository.", +"id": "OSPolicyResourceRepositoryResource", +"properties": { +"apt": { +"$ref": "OSPolicyResourceRepositoryResourceAptRepository", +"description": "An Apt Repository." +}, +"goo": { +"$ref": "OSPolicyResourceRepositoryResourceGooRepository", +"description": "A Goo Repository." +}, +"yum": { +"$ref": "OSPolicyResourceRepositoryResourceYumRepository", +"description": "A Yum Repository." +}, +"zypper": { +"$ref": "OSPolicyResourceRepositoryResourceZypperRepository", +"description": "A Zypper Repository." +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceAptRepository": { +"description": "Represents a single apt package repository. These will be added to a repo file that will be managed at `/etc/apt/sources.list.d/google_osconfig.list`.", +"id": "OSPolicyResourceRepositoryResourceAptRepository", +"properties": { +"archiveType": { +"description": "Required. Type of archive files in this repository.", +"enum": [ +"ARCHIVE_TYPE_UNSPECIFIED", +"DEB", +"DEB_SRC" +], +"enumDescriptions": [ +"Unspecified is invalid.", +"Deb indicates that the archive contains binary files.", +"Deb-src indicates that the archive contains source files." +], +"type": "string" +}, +"components": { +"description": "Required. List of components for this repository. Must contain at least one item.", +"items": { +"type": "string" +}, +"type": "array" +}, +"distribution": { +"description": "Required. Distribution of this repository.", +"type": "string" +}, +"gpgKey": { +"description": "URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg`.", +"type": "string" +}, +"uri": { +"description": "Required. URI for this repository.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceGooRepository": { +"description": "Represents a Goo package repository. These are added to a repo file that is managed at `C:/ProgramData/GooGet/repos/google_osconfig.repo`.", +"id": "OSPolicyResourceRepositoryResourceGooRepository", +"properties": { +"name": { +"description": "Required. The name of the repository.", +"type": "string" +}, +"url": { +"description": "Required. The url of the repository.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceYumRepository": { +"description": "Represents a single yum package repository. These are added to a repo file that is managed at `/etc/yum.repos.d/google_osconfig.repo`.", +"id": "OSPolicyResourceRepositoryResourceYumRepository", +"properties": { +"baseUrl": { +"description": "Required. The location of the repository directory.", +"type": "string" +}, +"displayName": { +"description": "The display name of the repository.", +"type": "string" +}, +"gpgKeys": { +"description": "URIs of GPG keys.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Required. A one word, unique name for this repository. This is the `repo id` in the yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for resource conflicts.", +"type": "string" +} +}, +"type": "object" +}, +"OSPolicyResourceRepositoryResourceZypperRepository": { +"description": "Represents a single zypper package repository. These are added to a repo file that is managed at `/etc/zypp/repos.d/google_osconfig.repo`.", +"id": "OSPolicyResourceRepositoryResourceZypperRepository", +"properties": { +"baseUrl": { +"description": "Required. The location of the repository directory.", +"type": "string" +}, +"displayName": { +"description": "The display name of the repository.", +"type": "string" +}, +"gpgKeys": { +"description": "URIs of GPG keys.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for GuestPolicy conflicts.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReport": { +"description": "This API resource represents the vulnerability report for a specified Compute Engine virtual machine (VM) instance at a given point in time. For more information, see [Vulnerability reports](https://cloud.google.com/compute/docs/instances/os-inventory-management#vulnerability-reports).", +"id": "VulnerabilityReport", +"properties": { +"name": { +"description": "Output only. The `vulnerabilityReport` API resource name. Format: `projects/{project_number}/locations/{location}/instances/{instance_id}/vulnerabilityReport`", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp for when the last vulnerability report was generated for the VM.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vulnerabilities": { +"description": "Output only. List of vulnerabilities affecting the VM.", +"items": { +"$ref": "VulnerabilityReportVulnerability" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerability": { +"description": "A vulnerability affecting the VM instance.", +"id": "VulnerabilityReportVulnerability", +"properties": { +"availableInventoryItemIds": { +"deprecated": true, +"description": "Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. If there is no available fix, the field is empty. The `inventory_item` value specifies the latest `SoftwarePackage` available to the VM that fixes the vulnerability.", +"items": { +"type": "string" +}, +"type": "array" +}, +"createTime": { +"description": "The timestamp for when the vulnerability was first detected.", +"format": "google-datetime", +"type": "string" +}, +"details": { +"$ref": "VulnerabilityReportVulnerabilityDetails", +"description": "Contains metadata as per the upstream feed of the operating system and NVD." +}, +"installedInventoryItemIds": { +"deprecated": true, +"description": "Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field displays the inventory items affected by this vulnerability. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. For some distros, this field may be empty.", +"items": { +"type": "string" +}, +"type": "array" +}, +"items": { +"description": "List of items affected by the vulnerability.", +"items": { +"$ref": "VulnerabilityReportVulnerabilityItem" +}, +"type": "array" +}, +"updateTime": { +"description": "The timestamp for when the vulnerability was last modified.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerabilityDetails": { +"description": "Contains metadata information for the vulnerability. This information is collected from the upstream feed of the operating system.", +"id": "VulnerabilityReportVulnerabilityDetails", +"properties": { +"cve": { +"description": "The CVE of the vulnerability. CVE cannot be empty and the combination of should be unique across vulnerabilities for a VM.", +"type": "string" +}, +"cvssV2Score": { +"description": "The CVSS V2 score of this vulnerability. CVSS V2 score is on a scale of 0 - 10 where 0 indicates low severity and 10 indicates high severity.", +"format": "float", +"type": "number" +}, +"cvssV3": { +"$ref": "CVSSv3", +"description": "The full description of the CVSSv3 for this vulnerability from NVD." +}, +"description": { +"description": "The note or description describing the vulnerability from the distro.", +"type": "string" +}, +"references": { +"description": "Corresponds to the references attached to the `VulnerabilityDetails`.", +"items": { +"$ref": "VulnerabilityReportVulnerabilityDetailsReference" +}, +"type": "array" +}, +"severity": { +"description": "Assigned severity/impact ranking from the distro.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerabilityDetailsReference": { +"description": "A reference for this vulnerability.", +"id": "VulnerabilityReportVulnerabilityDetailsReference", +"properties": { +"source": { +"description": "The source of the reference e.g. NVD.", +"type": "string" +}, +"url": { +"description": "The url of the reference.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerabilityReportVulnerabilityItem": { +"description": "OS inventory item that is affected by a vulnerability or fixed as a result of a vulnerability.", +"id": "VulnerabilityReportVulnerabilityItem", +"properties": { +"availableInventoryItemId": { +"description": "Corresponds to the `AVAILABLE_PACKAGE` inventory item on the VM. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. If there is no available fix, the field is empty. The `inventory_item` value specifies the latest `SoftwarePackage` available to the VM that fixes the vulnerability.", +"type": "string" +}, +"fixedCpeUri": { +"description": "The recommended [CPE URI](https://cpe.mitre.org/specification/) update that contains a fix for this vulnerability.", +"type": "string" +}, +"installedInventoryItemId": { +"description": "Corresponds to the `INSTALLED_PACKAGE` inventory item on the VM. This field displays the inventory items affected by this vulnerability. If the vulnerability report was not updated after the VM inventory update, these values might not display in VM inventory. For some operating systems, this field might be empty.", +"type": "string" +}, +"upstreamFix": { +"description": "The upstream OS patch, packages or KB that fixes the vulnerability.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "OS Config API", +"version": "v1alpha", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..ac37c7697d4660d4aefee31d5678ea3bf0582981 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/osconfig.v1beta.json @@ -0,0 +1,2561 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://osconfig.googleapis.com/", +"batchPath": "batch", +"canonicalName": "OS Config", +"description": "OS management tools that can be used for patch management, patch compliance, and configuration management on VM instances.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/compute/docs/osconfig/rest", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "osconfig:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://osconfig.mtls.googleapis.com/", +"name": "osconfig", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"guestPolicies": { +"methods": { +"create": { +"description": "Create an OS Config guest policy.", +"flatPath": "v1beta/projects/{projectsId}/guestPolicies", +"httpMethod": "POST", +"id": "osconfig.projects.guestPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"guestPolicyId": { +"description": "Required. The logical name of the guest policy in the project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the parent using one of the following forms: `projects/{project_number}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/guestPolicies", +"request": { +"$ref": "GuestPolicy" +}, +"response": { +"$ref": "GuestPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete an OS Config guest policy.", +"flatPath": "v1beta/projects/{projectsId}/guestPolicies/{guestPoliciesId}", +"httpMethod": "DELETE", +"id": "osconfig.projects.guestPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the guest policy using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`.", +"location": "path", +"pattern": "^projects/[^/]+/guestPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get an OS Config guest policy.", +"flatPath": "v1beta/projects/{projectsId}/guestPolicies/{guestPoliciesId}", +"httpMethod": "GET", +"id": "osconfig.projects.guestPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the guest policy using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`.", +"location": "path", +"pattern": "^projects/[^/]+/guestPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GuestPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Get a page of OS Config guest policies.", +"flatPath": "v1beta/projects/{projectsId}/guestPolicies", +"httpMethod": "GET", +"id": "osconfig.projects.guestPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of guest policies to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to `ListGuestPolicies` that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the parent using one of the following forms: `projects/{project_number}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/guestPolicies", +"response": { +"$ref": "ListGuestPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update an OS Config guest policy.", +"flatPath": "v1beta/projects/{projectsId}/guestPolicies/{guestPoliciesId}", +"httpMethod": "PATCH", +"id": "osconfig.projects.guestPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Unique name of the resource in this project using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`.", +"location": "path", +"pattern": "^projects/[^/]+/guestPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Field mask that controls which fields of the guest policy should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "GuestPolicy" +}, +"response": { +"$ref": "GuestPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"patchDeployments": { +"methods": { +"create": { +"description": "Create an OS Config patch deployment.", +"flatPath": "v1beta/projects/{projectsId}/patchDeployments", +"httpMethod": "POST", +"id": "osconfig.projects.patchDeployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project to apply this patch deployment to in the form `projects/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"patchDeploymentId": { +"description": "Required. A name for the patch deployment in the project. When creating a name the following rules apply: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the project.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+parent}/patchDeployments", +"request": { +"$ref": "PatchDeployment" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete an OS Config patch deployment.", +"flatPath": "v1beta/projects/{projectsId}/patchDeployments/{patchDeploymentsId}", +"httpMethod": "DELETE", +"id": "osconfig.projects.patchDeployments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get an OS Config patch deployment.", +"flatPath": "v1beta/projects/{projectsId}/patchDeployments/{patchDeploymentsId}", +"httpMethod": "GET", +"id": "osconfig.projects.patchDeployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Get a page of OS Config patch deployments.", +"flatPath": "v1beta/projects/{projectsId}/patchDeployments", +"httpMethod": "GET", +"id": "osconfig.projects.patchDeployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of patch deployments to return. Default is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A pagination token returned from a previous call to ListPatchDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the parent in the form `projects/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/patchDeployments", +"response": { +"$ref": "ListPatchDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update an OS Config patch deployment.", +"flatPath": "v1beta/projects/{projectsId}/patchDeployments/{patchDeploymentsId}", +"httpMethod": "PATCH", +"id": "osconfig.projects.patchDeployments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Unique name for the patch deployment resource in a project. The patch deployment name is in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when you create a new patch deployment.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Field mask that controls which fields of the patch deployment should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "PatchDeployment" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pause": { +"description": "Change state of patch deployment to \"PAUSED\". Patch deployment in paused state doesn't generate patch jobs.", +"flatPath": "v1beta/projects/{projectsId}/patchDeployments/{patchDeploymentsId}:pause", +"httpMethod": "POST", +"id": "osconfig.projects.patchDeployments.pause", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:pause", +"request": { +"$ref": "PausePatchDeploymentRequest" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resume": { +"description": "Change state of patch deployment back to \"ACTIVE\". Patch deployment in active state continues to generate patch jobs.", +"flatPath": "v1beta/projects/{projectsId}/patchDeployments/{patchDeploymentsId}:resume", +"httpMethod": "POST", +"id": "osconfig.projects.patchDeployments.resume", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the patch deployment in the form `projects/*/patchDeployments/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchDeployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:resume", +"request": { +"$ref": "ResumePatchDeploymentRequest" +}, +"response": { +"$ref": "PatchDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"patchJobs": { +"methods": { +"cancel": { +"description": "Cancel a patch job. The patch job must be active. Canceled patch jobs cannot be restarted.", +"flatPath": "v1beta/projects/{projectsId}/patchJobs/{patchJobsId}:cancel", +"httpMethod": "POST", +"id": "osconfig.projects.patchJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the patch in the form `projects/*/patchJobs/*`", +"location": "path", +"pattern": "^projects/[^/]+/patchJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:cancel", +"request": { +"$ref": "CancelPatchJobRequest" +}, +"response": { +"$ref": "PatchJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"execute": { +"description": "Patch VM instances by creating and running a patch job.", +"flatPath": "v1beta/projects/{projectsId}/patchJobs:execute", +"httpMethod": "POST", +"id": "osconfig.projects.patchJobs.execute", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project in which to run this patch in the form `projects/*`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/patchJobs:execute", +"request": { +"$ref": "ExecutePatchJobRequest" +}, +"response": { +"$ref": "PatchJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get the patch job. This can be used to track the progress of an ongoing patch job or review the details of completed jobs.", +"flatPath": "v1beta/projects/{projectsId}/patchJobs/{patchJobsId}", +"httpMethod": "GET", +"id": "osconfig.projects.patchJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the patch in the form `projects/*/patchJobs/*`", +"location": "path", +"pattern": "^projects/[^/]+/patchJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "PatchJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Get a list of patch jobs.", +"flatPath": "v1beta/projects/{projectsId}/patchJobs", +"httpMethod": "GET", +"id": "osconfig.projects.patchJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "If provided, this field specifies the criteria that must be met by patch jobs to be included in the response. Currently, filtering is only available on the patch_deployment field.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of instance status to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. In the form of `projects/*`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/patchJobs", +"response": { +"$ref": "ListPatchJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"instanceDetails": { +"methods": { +"list": { +"description": "Get a list of instance details for a given patch job.", +"flatPath": "v1beta/projects/{projectsId}/patchJobs/{patchJobsId}/instanceDetails", +"httpMethod": "GET", +"id": "osconfig.projects.patchJobs.instanceDetails.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that filters results listed in the response. This field supports filtering results by instance zone, name, state, or `failure_reason`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of instance details records to return. Default is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent for the instances are in the form of `projects/*/patchJobs/*`.", +"location": "path", +"pattern": "^projects/[^/]+/patchJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/instanceDetails", +"response": { +"$ref": "ListPatchJobInstanceDetailsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"zones": { +"resources": { +"instances": { +"methods": { +"lookupEffectiveGuestPolicy": { +"description": "Lookup the effective guest policy that applies to a VM instance. This lookup merges all policies that are assigned to the instance ancestry.", +"flatPath": "v1beta/projects/{projectsId}/zones/{zonesId}/instances/{instancesId}:lookupEffectiveGuestPolicy", +"httpMethod": "POST", +"id": "osconfig.projects.zones.instances.lookupEffectiveGuestPolicy", +"parameterOrder": [ +"instance" +], +"parameters": { +"instance": { +"description": "Required. The VM instance whose policies are being looked up.", +"location": "path", +"pattern": "^projects/[^/]+/zones/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+instance}:lookupEffectiveGuestPolicy", +"request": { +"$ref": "LookupEffectiveGuestPolicyRequest" +}, +"response": { +"$ref": "EffectiveGuestPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://osconfig.googleapis.com/", +"schemas": { +"AptRepository": { +"description": "Represents a single Apt package repository. This repository is added to a repo file that is stored at `/etc/apt/sources.list.d/google_osconfig.list`.", +"id": "AptRepository", +"properties": { +"archiveType": { +"description": "Type of archive files in this repository. The default behavior is DEB.", +"enum": [ +"ARCHIVE_TYPE_UNSPECIFIED", +"DEB", +"DEB_SRC" +], +"enumDescriptions": [ +"Unspecified.", +"DEB indicates that the archive contains binary files.", +"DEB_SRC indicates that the archive contains source files." +], +"type": "string" +}, +"components": { +"description": "Required. List of components for this repository. Must contain at least one item.", +"items": { +"type": "string" +}, +"type": "array" +}, +"distribution": { +"description": "Required. Distribution of this repository.", +"type": "string" +}, +"gpgKey": { +"description": "URI of the key file for this repository. The agent maintains a keyring at `/etc/apt/trusted.gpg.d/osconfig_agent_managed.gpg` containing all the keys in any applied guest policy.", +"type": "string" +}, +"uri": { +"description": "Required. URI for this repository.", +"type": "string" +} +}, +"type": "object" +}, +"AptSettings": { +"description": "Apt patching is completed by executing `apt-get update && apt-get upgrade`. Additional options can be set to control how this is executed.", +"id": "AptSettings", +"properties": { +"excludes": { +"description": "List of packages to exclude from update. These packages will be excluded", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePackages": { +"description": "An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field cannot be specified with any other patch configuration fields.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "By changing the type to DIST, the patching is performed using `apt-get dist-upgrade` instead.", +"enum": [ +"TYPE_UNSPECIFIED", +"DIST", +"UPGRADE" +], +"enumDescriptions": [ +"By default, upgrade will be performed.", +"Runs `apt-get dist-upgrade`.", +"Runs `apt-get upgrade`." +], +"type": "string" +} +}, +"type": "object" +}, +"Assignment": { +"description": "An assignment represents the group or groups of VM instances that the policy applies to. If an assignment is empty, it applies to all VM instances. Otherwise, the targeted VM instances must meet all the criteria specified. So if both labels and zones are specified, the policy applies to VM instances with those labels and in those zones.", +"id": "Assignment", +"properties": { +"groupLabels": { +"description": "Targets instances matching at least one of these label sets. This allows an assignment to target disparate groups, for example \"env=prod or env=staging\".", +"items": { +"$ref": "AssignmentGroupLabel" +}, +"type": "array" +}, +"instanceNamePrefixes": { +"description": "Targets VM instances whose name starts with one of these prefixes. Like labels, this is another way to group VM instances when targeting configs, for example prefix=\"prod-\". Only supported for project-level policies.", +"items": { +"type": "string" +}, +"type": "array" +}, +"instances": { +"description": "Targets any of the instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`. Instance targeting is uncommon and is supported to facilitate the management of changes by the instance or to target specific VM instances for development and testing. Only supported for project-level policies and must reference instances within this project.", +"items": { +"type": "string" +}, +"type": "array" +}, +"osTypes": { +"description": "Targets VM instances matching at least one of the following OS types. VM instances must match all supplied criteria for a given OsType to be included.", +"items": { +"$ref": "AssignmentOsType" +}, +"type": "array" +}, +"zones": { +"description": "Targets instances in any of these zones. Leave empty to target instances in any zone. Zonal targeting is uncommon and is supported to facilitate the management of changes by zone.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AssignmentGroupLabel": { +"description": "Represents a group of VM intances that can be identified as having all these labels, for example \"env=prod and app=web\".", +"id": "AssignmentGroupLabel", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Google Compute Engine instance labels that must be present for an instance to be included in this assignment group.", +"type": "object" +} +}, +"type": "object" +}, +"AssignmentOsType": { +"description": "Defines the criteria for selecting VM Instances by OS type.", +"id": "AssignmentOsType", +"properties": { +"osArchitecture": { +"description": "Targets VM instances with OS Inventory enabled and having the following OS architecture.", +"type": "string" +}, +"osShortName": { +"description": "Targets VM instances with OS Inventory enabled and having the following OS short name, for example \"debian\" or \"windows\".", +"type": "string" +}, +"osVersion": { +"description": "Targets VM instances with OS Inventory enabled and having the following following OS version.", +"type": "string" +} +}, +"type": "object" +}, +"CancelPatchJobRequest": { +"description": "Message for canceling a patch job.", +"id": "CancelPatchJobRequest", +"properties": {}, +"type": "object" +}, +"EffectiveGuestPolicy": { +"description": "The effective guest policy that applies to a VM instance.", +"id": "EffectiveGuestPolicy", +"properties": { +"packageRepositories": { +"description": "List of package repository configurations assigned to the VM instance.", +"items": { +"$ref": "EffectiveGuestPolicySourcedPackageRepository" +}, +"type": "array" +}, +"packages": { +"description": "List of package configurations assigned to the VM instance.", +"items": { +"$ref": "EffectiveGuestPolicySourcedPackage" +}, +"type": "array" +}, +"softwareRecipes": { +"description": "List of recipes assigned to the VM instance.", +"items": { +"$ref": "EffectiveGuestPolicySourcedSoftwareRecipe" +}, +"type": "array" +} +}, +"type": "object" +}, +"EffectiveGuestPolicySourcedPackage": { +"description": "A guest policy package including its source.", +"id": "EffectiveGuestPolicySourcedPackage", +"properties": { +"package": { +"$ref": "Package", +"description": "A software package to configure on the VM instance." +}, +"source": { +"description": "Name of the guest policy providing this config.", +"type": "string" +} +}, +"type": "object" +}, +"EffectiveGuestPolicySourcedPackageRepository": { +"description": "A guest policy package repository including its source.", +"id": "EffectiveGuestPolicySourcedPackageRepository", +"properties": { +"packageRepository": { +"$ref": "PackageRepository", +"description": "A software package repository to configure on the VM instance." +}, +"source": { +"description": "Name of the guest policy providing this config.", +"type": "string" +} +}, +"type": "object" +}, +"EffectiveGuestPolicySourcedSoftwareRecipe": { +"description": "A guest policy recipe including its source.", +"id": "EffectiveGuestPolicySourcedSoftwareRecipe", +"properties": { +"softwareRecipe": { +"$ref": "SoftwareRecipe", +"description": "A software recipe to configure on the VM instance." +}, +"source": { +"description": "Name of the guest policy providing this config.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ExecStep": { +"description": "A step that runs an executable for a PatchJob.", +"id": "ExecStep", +"properties": { +"linuxExecStepConfig": { +"$ref": "ExecStepConfig", +"description": "The ExecStepConfig for all Linux VMs targeted by the PatchJob." +}, +"windowsExecStepConfig": { +"$ref": "ExecStepConfig", +"description": "The ExecStepConfig for all Windows VMs targeted by the PatchJob." +} +}, +"type": "object" +}, +"ExecStepConfig": { +"description": "Common configurations for an ExecStep.", +"id": "ExecStepConfig", +"properties": { +"allowedSuccessCodes": { +"description": "Defaults to [0]. A list of possible return values that the execution can return to indicate a success.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"gcsObject": { +"$ref": "GcsObject", +"description": "A Google Cloud Storage object containing the executable." +}, +"interpreter": { +"description": "The script interpreter to use to run the script. If no interpreter is specified the script will be executed directly, which will likely only succeed for scripts with [shebang lines] (https://en.wikipedia.org/wiki/Shebang_\\(Unix\\)).", +"enum": [ +"INTERPRETER_UNSPECIFIED", +"NONE", +"SHELL", +"POWERSHELL" +], +"enumDescriptions": [ +"If the interpreter is not specified, the value defaults to `NONE`.", +"Indicates that the file is run as follows on each operating system: + For Linux VMs, the file is ran as an executable and the interpreter might be parsed from the [shebang line](https://wikipedia.org/wiki/Shebang_(Unix)) of the file. + For Windows VM, this value is not supported.", +"Indicates that the file is run with `/bin/sh` on Linux and `cmd` on Windows.", +"Indicates that the file is run with PowerShell." +], +"type": "string" +}, +"localPath": { +"description": "An absolute path to the executable on the VM.", +"type": "string" +} +}, +"type": "object" +}, +"ExecutePatchJobRequest": { +"description": "A request message to initiate patching across Compute Engine instances.", +"id": "ExecutePatchJobRequest", +"properties": { +"description": { +"description": "Description of the patch job. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"displayName": { +"description": "Display name for this patch job. This does not have to be unique.", +"type": "string" +}, +"dryRun": { +"description": "If this patch is a dry-run only, instances are contacted but will do nothing.", +"type": "boolean" +}, +"duration": { +"description": "Duration of the patch job. After the duration ends, the patch job times out.", +"format": "google-duration", +"type": "string" +}, +"instanceFilter": { +"$ref": "PatchInstanceFilter", +"description": "Required. Instances to patch, either explicitly or filtered by some criteria such as zone or labels." +}, +"patchConfig": { +"$ref": "PatchConfig", +"description": "Patch configuration being applied. If omitted, instances are patched using the default configurations." +}, +"rollout": { +"$ref": "PatchRollout", +"description": "Rollout strategy of the patch job." +} +}, +"type": "object" +}, +"FixedOrPercent": { +"description": "Message encapsulating a value that can be either absolute (\"fixed\") or relative (\"percent\") to a value.", +"id": "FixedOrPercent", +"properties": { +"fixed": { +"description": "Specifies a fixed value.", +"format": "int32", +"type": "integer" +}, +"percent": { +"description": "Specifies the relative value defined as a percentage, which will be multiplied by a reference value.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GcsObject": { +"description": "Google Cloud Storage object representation.", +"id": "GcsObject", +"properties": { +"bucket": { +"description": "Required. Bucket of the Google Cloud Storage object.", +"type": "string" +}, +"generationNumber": { +"description": "Required. Generation number of the Google Cloud Storage object. This is used to ensure that the ExecStep specified by this PatchJob does not change.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Required. Name of the Google Cloud Storage object.", +"type": "string" +} +}, +"type": "object" +}, +"GooRepository": { +"description": "Represents a Goo package repository. These is added to a repo file that is stored at C:/ProgramData/GooGet/repos/google_osconfig.repo.", +"id": "GooRepository", +"properties": { +"name": { +"description": "Required. The name of the repository.", +"type": "string" +}, +"url": { +"description": "Required. The url of the repository.", +"type": "string" +} +}, +"type": "object" +}, +"GooSettings": { +"description": "Googet patching is performed by running `googet update`.", +"id": "GooSettings", +"properties": {}, +"type": "object" +}, +"GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata": { +"description": "OS policy assignment operation metadata provided by OS policy assignment API methods that return long running operations.", +"id": "GoogleCloudOsconfigV1__OSPolicyAssignmentOperationMetadata", +"properties": { +"apiMethod": { +"description": "The OS policy assignment API method.", +"enum": [ +"API_METHOD_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Invalid value", +"Create OS policy assignment API method", +"Update OS policy assignment API method", +"Delete OS policy assignment API method" +], +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"rolloutStartTime": { +"description": "Rollout start time", +"format": "google-datetime", +"type": "string" +}, +"rolloutState": { +"description": "State of the rollout", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"type": "string" +}, +"rolloutUpdateTime": { +"description": "Rollout update time", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GuestPolicy": { +"description": "An OS Config resource representing a guest configuration policy. These policies represent the desired state for VM instance guest environments including packages to install or remove, package repository configurations, and software to install.", +"id": "GuestPolicy", +"properties": { +"assignment": { +"$ref": "Assignment", +"description": "Required. Specifies the VM instances that are assigned to this policy. This allows you to target sets or groups of VM instances by different parameters such as labels, names, OS, or zones. If left empty, all VM instances underneath this policy are targeted. At the same level in the resource hierarchy (that is within a project), the service prevents the creation of multiple policies that conflict with each other. For more information, see how the service [handles assignment conflicts](/compute/docs/os-config-management/create-guest-policy#handle-conflicts)." +}, +"createTime": { +"description": "Output only. Time this guest policy was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the guest policy. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"etag": { +"description": "The etag for this guest policy. If this is provided on update, it must match the server's etag.", +"type": "string" +}, +"name": { +"description": "Required. Unique name of the resource in this project using one of the following forms: `projects/{project_number}/guestPolicies/{guest_policy_id}`.", +"type": "string" +}, +"packageRepositories": { +"description": "A list of package repositories to configure on the VM instance. This is done before any other configs are applied so they can use these repos. Package repositories are only configured if the corresponding package manager(s) are available.", +"items": { +"$ref": "PackageRepository" +}, +"type": "array" +}, +"packages": { +"description": "The software packages to be managed by this policy.", +"items": { +"$ref": "Package" +}, +"type": "array" +}, +"recipes": { +"description": "A list of Recipes to install on the VM instance.", +"items": { +"$ref": "SoftwareRecipe" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Last time this guest policy was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ListGuestPoliciesResponse": { +"description": "A response message for listing guest policies.", +"id": "ListGuestPoliciesResponse", +"properties": { +"guestPolicies": { +"description": "The list of GuestPolicies.", +"items": { +"$ref": "GuestPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A pagination token that can be used to get the next page of guest policies.", +"type": "string" +} +}, +"type": "object" +}, +"ListPatchDeploymentsResponse": { +"description": "A response message for listing patch deployments.", +"id": "ListPatchDeploymentsResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token that can be used to get the next page of patch deployments.", +"type": "string" +}, +"patchDeployments": { +"description": "The list of patch deployments.", +"items": { +"$ref": "PatchDeployment" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPatchJobInstanceDetailsResponse": { +"description": "A response message for listing the instances details for a patch job.", +"id": "ListPatchJobInstanceDetailsResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token that can be used to get the next page of results.", +"type": "string" +}, +"patchJobInstanceDetails": { +"description": "A list of instance status.", +"items": { +"$ref": "PatchJobInstanceDetails" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPatchJobsResponse": { +"description": "A response message for listing patch jobs.", +"id": "ListPatchJobsResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token that can be used to get the next page of results.", +"type": "string" +}, +"patchJobs": { +"description": "The list of patch jobs.", +"items": { +"$ref": "PatchJob" +}, +"type": "array" +} +}, +"type": "object" +}, +"LookupEffectiveGuestPolicyRequest": { +"description": "A request message for getting the effective guest policy assigned to the instance.", +"id": "LookupEffectiveGuestPolicyRequest", +"properties": { +"osArchitecture": { +"description": "Architecture of OS running on the instance. The OS Config agent only provides this field for targeting if OS Inventory is enabled for that instance.", +"type": "string" +}, +"osShortName": { +"description": "Short name of the OS running on the instance. The OS Config agent only provides this field for targeting if OS Inventory is enabled for that instance.", +"type": "string" +}, +"osVersion": { +"description": "Version of the OS running on the instance. The OS Config agent only provides this field for targeting if OS Inventory is enabled for that VM instance.", +"type": "string" +} +}, +"type": "object" +}, +"MonthlySchedule": { +"description": "Represents a monthly schedule. An example of a valid monthly schedule is \"on the third Tuesday of the month\" or \"on the 15th of the month\".", +"id": "MonthlySchedule", +"properties": { +"monthDay": { +"description": "Required. One day of the month. 1-31 indicates the 1st to the 31st day. -1 indicates the last day of the month. Months without the target day will be skipped. For example, a schedule to run \"every month on the 31st\" will not run in February, April, June, etc.", +"format": "int32", +"type": "integer" +}, +"weekDayOfMonth": { +"$ref": "WeekDayOfMonth", +"description": "Required. Week day in a month." +} +}, +"type": "object" +}, +"OSPolicyAssignmentOperationMetadata": { +"description": "OS policy assignment operation metadata provided by OS policy assignment API methods that return long running operations.", +"id": "OSPolicyAssignmentOperationMetadata", +"properties": { +"apiMethod": { +"description": "The OS policy assignment API method.", +"enum": [ +"API_METHOD_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Invalid value", +"Create OS policy assignment API method", +"Update OS policy assignment API method", +"Delete OS policy assignment API method" +], +"type": "string" +}, +"osPolicyAssignment": { +"description": "Reference to the `OSPolicyAssignment` API resource. Format: `projects/{project_number}/locations/{location}/osPolicyAssignments/{os_policy_assignment_id@revision_id}`", +"type": "string" +}, +"rolloutStartTime": { +"description": "Rollout start time", +"format": "google-datetime", +"type": "string" +}, +"rolloutState": { +"description": "State of the rollout", +"enum": [ +"ROLLOUT_STATE_UNSPECIFIED", +"IN_PROGRESS", +"CANCELLING", +"CANCELLED", +"SUCCEEDED" +], +"enumDescriptions": [ +"Invalid value", +"The rollout is in progress.", +"The rollout is being cancelled.", +"The rollout is cancelled.", +"The rollout has completed successfully." +], +"type": "string" +}, +"rolloutUpdateTime": { +"description": "Rollout update time", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OneTimeSchedule": { +"description": "Sets the time for a one time patch deployment. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"id": "OneTimeSchedule", +"properties": { +"executeTime": { +"description": "Required. The desired patch job execution time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Package": { +"description": "Package is a reference to the software package to be installed or removed. The agent on the VM instance uses the system package manager to apply the config. These are the commands that the agent uses to install or remove packages. Apt install: `apt-get update && apt-get -y install package1 package2 package3` remove: `apt-get -y remove package1 package2 package3` Yum install: `yum -y install package1 package2 package3` remove: `yum -y remove package1 package2 package3` Zypper install: `zypper install package1 package2 package3` remove: `zypper rm package1 package2` Googet install: `googet -noconfirm install package1 package2 package3` remove: `googet -noconfirm remove package1 package2 package3`", +"id": "Package", +"properties": { +"desiredState": { +"description": "The desired_state the agent should maintain for this package. The default is to ensure the package is installed.", +"enum": [ +"DESIRED_STATE_UNSPECIFIED", +"INSTALLED", +"UPDATED", +"REMOVED" +], +"enumDescriptions": [ +"The default is to ensure the package is installed.", +"The agent ensures that the package is installed.", +"The agent ensures that the package is installed and periodically checks for and install any updates.", +"The agent ensures that the package is not installed and uninstall it if detected." +], +"type": "string" +}, +"manager": { +"description": "Type of package manager that can be used to install this package. If a system does not have the package manager, the package is not installed or removed no error message is returned. By default, or if you specify `ANY`, the agent attempts to install and remove this package using the default package manager. This is useful when creating a policy that applies to different types of systems. The default behavior is ANY.", +"enum": [ +"MANAGER_UNSPECIFIED", +"ANY", +"APT", +"YUM", +"ZYPPER", +"GOO" +], +"enumDescriptions": [ +"The default behavior is ANY.", +"Apply this package config using the default system package manager.", +"Apply this package config only if Apt is available on the system.", +"Apply this package config only if Yum is available on the system.", +"Apply this package config only if Zypper is available on the system.", +"Apply this package config only if GooGet is available on the system." +], +"type": "string" +}, +"name": { +"description": "Required. The name of the package. A package is uniquely identified for conflict validation by checking the package name and the manager(s) that the package targets.", +"type": "string" +} +}, +"type": "object" +}, +"PackageRepository": { +"description": "A package repository.", +"id": "PackageRepository", +"properties": { +"apt": { +"$ref": "AptRepository", +"description": "An Apt Repository." +}, +"goo": { +"$ref": "GooRepository", +"description": "A Goo Repository." +}, +"yum": { +"$ref": "YumRepository", +"description": "A Yum Repository." +}, +"zypper": { +"$ref": "ZypperRepository", +"description": "A Zypper Repository." +} +}, +"type": "object" +}, +"PatchConfig": { +"description": "Patch configuration specifications. Contains details on how to apply the patch(es) to a VM instance.", +"id": "PatchConfig", +"properties": { +"apt": { +"$ref": "AptSettings", +"description": "Apt update settings. Use this setting to override the default `apt` patch rules." +}, +"goo": { +"$ref": "GooSettings", +"description": "Goo update settings. Use this setting to override the default `goo` patch rules." +}, +"migInstancesAllowed": { +"description": "Allows the patch job to run on Managed instance groups (MIGs).", +"type": "boolean" +}, +"postStep": { +"$ref": "ExecStep", +"description": "The `ExecStep` to run after the patch update." +}, +"preStep": { +"$ref": "ExecStep", +"description": "The `ExecStep` to run before the patch update." +}, +"rebootConfig": { +"description": "Post-patch reboot settings.", +"enum": [ +"REBOOT_CONFIG_UNSPECIFIED", +"DEFAULT", +"ALWAYS", +"NEVER" +], +"enumDescriptions": [ +"The default behavior is DEFAULT.", +"The agent decides if a reboot is necessary by checking signals such as registry keys on Windows or `/var/run/reboot-required` on APT based systems. On RPM based systems, a set of core system package install times are compared with system boot time.", +"Always reboot the machine after the update completes.", +"Never reboot the machine after the update completes." +], +"type": "string" +}, +"windowsUpdate": { +"$ref": "WindowsUpdateSettings", +"description": "Windows update settings. Use this override the default windows patch rules." +}, +"yum": { +"$ref": "YumSettings", +"description": "Yum update settings. Use this setting to override the default `yum` patch rules." +}, +"zypper": { +"$ref": "ZypperSettings", +"description": "Zypper update settings. Use this setting to override the default `zypper` patch rules." +} +}, +"type": "object" +}, +"PatchDeployment": { +"description": "Patch deployments are configurations that individual patch jobs use to complete a patch. These configurations include instance filter, package repository settings, and a schedule. For more information about creating and managing patch deployments, see [Scheduling patch jobs](https://cloud.google.com/compute/docs/os-patch-management/schedule-patch-jobs).", +"id": "PatchDeployment", +"properties": { +"createTime": { +"description": "Output only. Time the patch deployment was created. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Description of the patch deployment. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"duration": { +"description": "Optional. Duration of the patch. After the duration ends, the patch times out.", +"format": "google-duration", +"type": "string" +}, +"instanceFilter": { +"$ref": "PatchInstanceFilter", +"description": "Required. VM instances to patch." +}, +"lastExecuteTime": { +"description": "Output only. The last time a patch job was started by this deployment. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Unique name for the patch deployment resource in a project. The patch deployment name is in the form: `projects/{project_id}/patchDeployments/{patch_deployment_id}`. This field is ignored when you create a new patch deployment.", +"type": "string" +}, +"oneTimeSchedule": { +"$ref": "OneTimeSchedule", +"description": "Required. Schedule a one-time execution." +}, +"patchConfig": { +"$ref": "PatchConfig", +"description": "Optional. Patch configuration that is applied." +}, +"recurringSchedule": { +"$ref": "RecurringSchedule", +"description": "Required. Schedule recurring executions." +}, +"rollout": { +"$ref": "PatchRollout", +"description": "Optional. Rollout strategy of the patch job." +}, +"state": { +"description": "Output only. Current state of the patch deployment.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"PAUSED" +], +"enumDescriptions": [ +"The default value. This value is used if the state is omitted.", +"Active value means that patch deployment generates Patch Jobs.", +"Paused value means that patch deployment does not generate Patch jobs. Requires user action to move in and out from this state." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time the patch deployment was last updated. Timestamp is in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PatchInstanceFilter": { +"description": "A filter to target VM instances for patching. The targeted VMs must meet all criteria specified. So if both labels and zones are specified, the patch job targets only VMs with those labels and in those zones.", +"id": "PatchInstanceFilter", +"properties": { +"all": { +"description": "Target all VM instances in the project. If true, no other criteria is permitted.", +"type": "boolean" +}, +"groupLabels": { +"description": "Targets VM instances matching at least one of these label sets. This allows targeting of disparate groups, for example \"env=prod or env=staging\".", +"items": { +"$ref": "PatchInstanceFilterGroupLabel" +}, +"type": "array" +}, +"instanceNamePrefixes": { +"description": "Targets VMs whose name starts with one of these prefixes. Similar to labels, this is another way to group VMs when targeting configs, for example prefix=\"prod-\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"instances": { +"description": "Targets any of the VM instances specified. Instances are specified by their URI in the form `zones/[ZONE]/instances/[INSTANCE_NAME]`, `projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`, or `https://www.googleapis.com/compute/v1/projects/[PROJECT_ID]/zones/[ZONE]/instances/[INSTANCE_NAME]`", +"items": { +"type": "string" +}, +"type": "array" +}, +"zones": { +"description": "Targets VM instances in ANY of these zones. Leave empty to target VM instances in any zone.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PatchInstanceFilterGroupLabel": { +"description": "Represents a group of VMs that can be identified as having all these labels, for example \"env=prod and app=web\".", +"id": "PatchInstanceFilterGroupLabel", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Compute Engine instance labels that must be present for a VM instance to be targeted by this filter.", +"type": "object" +} +}, +"type": "object" +}, +"PatchJob": { +"description": "A high level representation of a patch job that is either in progress or has completed. Instance details are not included in the job. To paginate through instance details, use `ListPatchJobInstanceDetails`. For more information about patch jobs, see [Creating patch jobs](https://cloud.google.com/compute/docs/os-patch-management/create-patch-job).", +"id": "PatchJob", +"properties": { +"createTime": { +"description": "Time this patch job was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "Description of the patch job. Length of the description is limited to 1024 characters.", +"type": "string" +}, +"displayName": { +"description": "Display name for this patch job. This is not a unique identifier.", +"type": "string" +}, +"dryRun": { +"description": "If this patch job is a dry run, the agent reports that it has finished without running any updates on the VM instance.", +"type": "boolean" +}, +"duration": { +"description": "Duration of the patch job. After the duration ends, the patch job times out.", +"format": "google-duration", +"type": "string" +}, +"errorMessage": { +"description": "If this patch job failed, this message provides information about the failure.", +"type": "string" +}, +"instanceDetailsSummary": { +"$ref": "PatchJobInstanceDetailsSummary", +"description": "Summary of instance details." +}, +"instanceFilter": { +"$ref": "PatchInstanceFilter", +"description": "Instances to patch." +}, +"name": { +"description": "Unique identifier for this patch job in the form `projects/*/patchJobs/*`", +"type": "string" +}, +"patchConfig": { +"$ref": "PatchConfig", +"description": "Patch configuration being applied." +}, +"patchDeployment": { +"description": "Output only. Name of the patch deployment that created this patch job.", +"readOnly": true, +"type": "string" +}, +"percentComplete": { +"description": "Reflects the overall progress of the patch job in the range of 0.0 being no progress to 100.0 being complete.", +"format": "double", +"type": "number" +}, +"rollout": { +"$ref": "PatchRollout", +"description": "Rollout strategy being applied." +}, +"state": { +"description": "The current state of the PatchJob.", +"enum": [ +"STATE_UNSPECIFIED", +"STARTED", +"INSTANCE_LOOKUP", +"PATCHING", +"SUCCEEDED", +"COMPLETED_WITH_ERRORS", +"CANCELED", +"TIMED_OUT" +], +"enumDescriptions": [ +"State must be specified.", +"The patch job was successfully initiated.", +"The patch job is looking up instances to run the patch on.", +"Instances are being patched.", +"Patch job completed successfully.", +"Patch job completed but there were errors.", +"The patch job was canceled.", +"The patch job timed out." +], +"type": "string" +}, +"updateTime": { +"description": "Last time this patch job was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"PatchJobInstanceDetails": { +"description": "Patch details for a VM instance. For more information about reviewing VM instance details, see [Listing all VM instance details for a specific patch job](https://cloud.google.com/compute/docs/os-patch-management/manage-patch-jobs#list-instance-details).", +"id": "PatchJobInstanceDetails", +"properties": { +"attemptCount": { +"description": "The number of times the agent that the agent attempts to apply the patch.", +"format": "int64", +"type": "string" +}, +"failureReason": { +"description": "If the patch fails, this field provides the reason.", +"type": "string" +}, +"instanceSystemId": { +"description": "The unique identifier for the instance. This identifier is defined by the server.", +"type": "string" +}, +"name": { +"description": "The instance name in the form `projects/*/zones/*/instances/*`", +"type": "string" +}, +"state": { +"description": "Current state of instance patch.", +"enum": [ +"PATCH_STATE_UNSPECIFIED", +"PENDING", +"INACTIVE", +"NOTIFIED", +"STARTED", +"DOWNLOADING_PATCHES", +"APPLYING_PATCHES", +"REBOOTING", +"SUCCEEDED", +"SUCCEEDED_REBOOT_REQUIRED", +"FAILED", +"ACKED", +"TIMED_OUT", +"RUNNING_PRE_PATCH_STEP", +"RUNNING_POST_PATCH_STEP", +"NO_AGENT_DETECTED" +], +"enumDescriptions": [ +"Unspecified.", +"The instance is not yet notified.", +"Instance is inactive and cannot be patched.", +"The instance is notified that it should be patched.", +"The instance has started the patching process.", +"The instance is downloading patches.", +"The instance is applying patches.", +"The instance is rebooting.", +"The instance has completed applying patches.", +"The instance has completed applying patches but a reboot is required.", +"The instance has failed to apply the patch.", +"The instance acked the notification and will start shortly.", +"The instance exceeded the time out while applying the patch.", +"The instance is running the pre-patch step.", +"The instance is running the post-patch step.", +"The service could not detect the presence of the agent. Check to ensure that the agent is installed, running, and able to communicate with the service." +], +"type": "string" +} +}, +"type": "object" +}, +"PatchJobInstanceDetailsSummary": { +"description": "A summary of the current patch state across all instances that this patch job affects. Contains counts of instances in different states. These states map to `InstancePatchState`. List patch job instance details to see the specific states of each instance.", +"id": "PatchJobInstanceDetailsSummary", +"properties": { +"ackedInstanceCount": { +"description": "Number of instances that have acked and will start shortly.", +"format": "int64", +"type": "string" +}, +"applyingPatchesInstanceCount": { +"description": "Number of instances that are applying patches.", +"format": "int64", +"type": "string" +}, +"downloadingPatchesInstanceCount": { +"description": "Number of instances that are downloading patches.", +"format": "int64", +"type": "string" +}, +"failedInstanceCount": { +"description": "Number of instances that failed.", +"format": "int64", +"type": "string" +}, +"inactiveInstanceCount": { +"description": "Number of instances that are inactive.", +"format": "int64", +"type": "string" +}, +"noAgentDetectedInstanceCount": { +"description": "Number of instances that do not appear to be running the agent. Check to ensure that the agent is installed, running, and able to communicate with the service.", +"format": "int64", +"type": "string" +}, +"notifiedInstanceCount": { +"description": "Number of instances notified about patch job.", +"format": "int64", +"type": "string" +}, +"pendingInstanceCount": { +"description": "Number of instances pending patch job.", +"format": "int64", +"type": "string" +}, +"postPatchStepInstanceCount": { +"description": "Number of instances that are running the post-patch step.", +"format": "int64", +"type": "string" +}, +"prePatchStepInstanceCount": { +"description": "Number of instances that are running the pre-patch step.", +"format": "int64", +"type": "string" +}, +"rebootingInstanceCount": { +"description": "Number of instances rebooting.", +"format": "int64", +"type": "string" +}, +"startedInstanceCount": { +"description": "Number of instances that have started.", +"format": "int64", +"type": "string" +}, +"succeededInstanceCount": { +"description": "Number of instances that have completed successfully.", +"format": "int64", +"type": "string" +}, +"succeededRebootRequiredInstanceCount": { +"description": "Number of instances that require reboot.", +"format": "int64", +"type": "string" +}, +"timedOutInstanceCount": { +"description": "Number of instances that exceeded the time out while applying the patch.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PatchRollout": { +"description": "Patch rollout configuration specifications. Contains details on the concurrency control when applying patch(es) to all targeted VMs.", +"id": "PatchRollout", +"properties": { +"disruptionBudget": { +"$ref": "FixedOrPercent", +"description": "The maximum number (or percentage) of VMs per zone to disrupt at any given moment. The number of VMs calculated from multiplying the percentage by the total number of VMs in a zone is rounded up. During patching, a VM is considered disrupted from the time the agent is notified to begin until patching has completed. This disruption time includes the time to complete reboot and any post-patch steps. A VM contributes to the disruption budget if its patching operation fails either when applying the patches, running pre or post patch steps, or if it fails to respond with a success notification before timing out. VMs that are not running or do not have an active agent do not count toward this disruption budget. For zone-by-zone rollouts, if the disruption budget in a zone is exceeded, the patch job stops, because continuing to the next zone requires completion of the patch process in the previous zone. For example, if the disruption budget has a fixed value of `10`, and 8 VMs fail to patch in the current zone, the patch job continues to patch 2 VMs at a time until the zone is completed. When that zone is completed successfully, patching begins with 10 VMs at a time in the next zone. If 10 VMs in the next zone fail to patch, the patch job stops." +}, +"mode": { +"description": "Mode of the patch rollout.", +"enum": [ +"MODE_UNSPECIFIED", +"ZONE_BY_ZONE", +"CONCURRENT_ZONES" +], +"enumDescriptions": [ +"Mode must be specified.", +"Patches are applied one zone at a time. The patch job begins in the region with the lowest number of targeted VMs. Within the region, patching begins in the zone with the lowest number of targeted VMs. If multiple regions (or zones within a region) have the same number of targeted VMs, a tie-breaker is achieved by sorting the regions or zones in alphabetical order.", +"Patches are applied to VMs in all zones at the same time." +], +"type": "string" +} +}, +"type": "object" +}, +"PausePatchDeploymentRequest": { +"description": "A request message for pausing a patch deployment.", +"id": "PausePatchDeploymentRequest", +"properties": {}, +"type": "object" +}, +"RecurringSchedule": { +"description": "Sets the time for recurring patch deployments.", +"id": "RecurringSchedule", +"properties": { +"endTime": { +"description": "Optional. The end time at which a recurring patch deployment schedule is no longer active.", +"format": "google-datetime", +"type": "string" +}, +"frequency": { +"description": "Required. The frequency unit of this recurring schedule.", +"enum": [ +"FREQUENCY_UNSPECIFIED", +"WEEKLY", +"MONTHLY", +"DAILY" +], +"enumDescriptions": [ +"Invalid. A frequency must be specified.", +"Indicates that the frequency of recurrence should be expressed in terms of weeks.", +"Indicates that the frequency of recurrence should be expressed in terms of months.", +"Indicates that the frequency of recurrence should be expressed in terms of days." +], +"type": "string" +}, +"lastExecuteTime": { +"description": "Output only. The time the last patch job ran successfully.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"monthly": { +"$ref": "MonthlySchedule", +"description": "Required. Schedule with monthly executions." +}, +"nextExecuteTime": { +"description": "Output only. The time the next patch job is scheduled to run.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"startTime": { +"description": "Optional. The time that the recurring schedule becomes effective. Defaults to `create_time` of the patch deployment.", +"format": "google-datetime", +"type": "string" +}, +"timeOfDay": { +"$ref": "TimeOfDay", +"description": "Required. Time of the day to run a recurring deployment." +}, +"timeZone": { +"$ref": "TimeZone", +"description": "Required. Defines the time zone that `time_of_day` is relative to. The rules for daylight saving time are determined by the chosen time zone." +}, +"weekly": { +"$ref": "WeeklySchedule", +"description": "Required. Schedule with weekly executions." +} +}, +"type": "object" +}, +"ResumePatchDeploymentRequest": { +"description": "A request message for resuming a patch deployment.", +"id": "ResumePatchDeploymentRequest", +"properties": {}, +"type": "object" +}, +"SoftwareRecipe": { +"description": "A software recipe is a set of instructions for installing and configuring a piece of software. It consists of a set of artifacts that are downloaded, and a set of steps that install, configure, and/or update the software. Recipes support installing and updating software from artifacts in the following formats: Zip archive, Tar archive, Windows MSI, Debian package, and RPM package. Additionally, recipes support executing a script (either defined in a file or directly in this api) in bash, sh, cmd, and powershell. Updating a software recipe If a recipe is assigned to an instance and there is a recipe with the same name but a lower version already installed and the assigned state of the recipe is `UPDATED`, then the recipe is updated to the new version. Script Working Directories Each script or execution step is run in its own temporary directory which is deleted after completing the step.", +"id": "SoftwareRecipe", +"properties": { +"artifacts": { +"description": "Resources available to be used in the steps in the recipe.", +"items": { +"$ref": "SoftwareRecipeArtifact" +}, +"type": "array" +}, +"desiredState": { +"description": "Default is INSTALLED. The desired state the agent should maintain for this recipe. INSTALLED: The software recipe is installed on the instance but won't be updated to new versions. UPDATED: The software recipe is installed on the instance. The recipe is updated to a higher version, if a higher version of the recipe is assigned to this instance. REMOVE: Remove is unsupported for software recipes and attempts to create or update a recipe to the REMOVE state is rejected.", +"enum": [ +"DESIRED_STATE_UNSPECIFIED", +"INSTALLED", +"UPDATED", +"REMOVED" +], +"enumDescriptions": [ +"The default is to ensure the package is installed.", +"The agent ensures that the package is installed.", +"The agent ensures that the package is installed and periodically checks for and install any updates.", +"The agent ensures that the package is not installed and uninstall it if detected." +], +"type": "string" +}, +"installSteps": { +"description": "Actions to be taken for installing this recipe. On failure it stops executing steps and does not attempt another installation. Any steps taken (including partially completed steps) are not rolled back.", +"items": { +"$ref": "SoftwareRecipeStep" +}, +"type": "array" +}, +"name": { +"description": "Required. Unique identifier for the recipe. Only one recipe with a given name is installed on an instance. Names are also used to identify resources which helps to determine whether guest policies have conflicts. This means that requests to create multiple recipes with the same name and version are rejected since they could potentially have conflicting assignments.", +"type": "string" +}, +"updateSteps": { +"description": "Actions to be taken for updating this recipe. On failure it stops executing steps and does not attempt another update for this recipe. Any steps taken (including partially completed steps) are not rolled back.", +"items": { +"$ref": "SoftwareRecipeStep" +}, +"type": "array" +}, +"version": { +"description": "The version of this software recipe. Version can be up to 4 period separated numbers (e.g. 12.34.56.78).", +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeArtifact": { +"description": "Specifies a resource to be used in the recipe.", +"id": "SoftwareRecipeArtifact", +"properties": { +"allowInsecure": { +"description": "Defaults to false. When false, recipes are subject to validations based on the artifact type: Remote: A checksum must be specified, and only protocols with transport-layer security are permitted. GCS: An object generation number must be specified.", +"type": "boolean" +}, +"gcs": { +"$ref": "SoftwareRecipeArtifactGcs", +"description": "A Google Cloud Storage artifact." +}, +"id": { +"description": "Required. Id of the artifact, which the installation and update steps of this recipe can reference. Artifacts in a recipe cannot have the same id.", +"type": "string" +}, +"remote": { +"$ref": "SoftwareRecipeArtifactRemote", +"description": "A generic remote artifact." +} +}, +"type": "object" +}, +"SoftwareRecipeArtifactGcs": { +"description": "Specifies an artifact available as a Google Cloud Storage object.", +"id": "SoftwareRecipeArtifactGcs", +"properties": { +"bucket": { +"description": "Bucket of the Google Cloud Storage object. Given an example URL: `https://storage.googleapis.com/my-bucket/foo/bar#1234567` this value would be `my-bucket`.", +"type": "string" +}, +"generation": { +"description": "Must be provided if allow_insecure is false. Generation number of the Google Cloud Storage object. `https://storage.googleapis.com/my-bucket/foo/bar#1234567` this value would be `1234567`.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Name of the Google Cloud Storage object. As specified [here] (https://cloud.google.com/storage/docs/naming#objectnames) Given an example URL: `https://storage.googleapis.com/my-bucket/foo/bar#1234567` this value would be `foo/bar`.", +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeArtifactRemote": { +"description": "Specifies an artifact available via some URI.", +"id": "SoftwareRecipeArtifactRemote", +"properties": { +"checksum": { +"description": "Must be provided if `allow_insecure` is `false`. SHA256 checksum in hex format, to compare to the checksum of the artifact. If the checksum is not empty and it doesn't match the artifact then the recipe installation fails before running any of the steps.", +"type": "string" +}, +"uri": { +"description": "URI from which to fetch the object. It should contain both the protocol and path following the format {protocol}://{location}.", +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeStep": { +"description": "An action that can be taken as part of installing or updating a recipe.", +"id": "SoftwareRecipeStep", +"properties": { +"archiveExtraction": { +"$ref": "SoftwareRecipeStepExtractArchive", +"description": "Extracts an archive into the specified directory." +}, +"dpkgInstallation": { +"$ref": "SoftwareRecipeStepInstallDpkg", +"description": "Installs a deb file via dpkg." +}, +"fileCopy": { +"$ref": "SoftwareRecipeStepCopyFile", +"description": "Copies a file onto the instance." +}, +"fileExec": { +"$ref": "SoftwareRecipeStepExecFile", +"description": "Executes an artifact or local file." +}, +"msiInstallation": { +"$ref": "SoftwareRecipeStepInstallMsi", +"description": "Installs an MSI file." +}, +"rpmInstallation": { +"$ref": "SoftwareRecipeStepInstallRpm", +"description": "Installs an rpm file via the rpm utility." +}, +"scriptRun": { +"$ref": "SoftwareRecipeStepRunScript", +"description": "Runs commands in a shell." +} +}, +"type": "object" +}, +"SoftwareRecipeStepCopyFile": { +"description": "Copies the artifact to the specified path on the instance.", +"id": "SoftwareRecipeStepCopyFile", +"properties": { +"artifactId": { +"description": "Required. The id of the relevant artifact in the recipe.", +"type": "string" +}, +"destination": { +"description": "Required. The absolute path on the instance to put the file.", +"type": "string" +}, +"overwrite": { +"description": "Whether to allow this step to overwrite existing files. If this is false and the file already exists the file is not overwritten and the step is considered a success. Defaults to false.", +"type": "boolean" +}, +"permissions": { +"description": "Consists of three octal digits which represent, in order, the permissions of the owner, group, and other users for the file (similarly to the numeric mode used in the linux chmod utility). Each digit represents a three bit number with the 4 bit corresponding to the read permissions, the 2 bit corresponds to the write bit, and the one bit corresponds to the execute permission. Default behavior is 755. Below are some examples of permissions and their associated values: read, write, and execute: 7 read and execute: 5 read and write: 6 read only: 4", +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeStepExecFile": { +"description": "Executes an artifact or local file.", +"id": "SoftwareRecipeStepExecFile", +"properties": { +"allowedExitCodes": { +"description": "Defaults to [0]. A list of possible return values that the program can return to indicate a success.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"args": { +"description": "Arguments to be passed to the provided executable.", +"items": { +"type": "string" +}, +"type": "array" +}, +"artifactId": { +"description": "The id of the relevant artifact in the recipe.", +"type": "string" +}, +"localPath": { +"description": "The absolute path of the file on the local filesystem.", +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeStepExtractArchive": { +"description": "Extracts an archive of the type specified in the specified directory.", +"id": "SoftwareRecipeStepExtractArchive", +"properties": { +"artifactId": { +"description": "Required. The id of the relevant artifact in the recipe.", +"type": "string" +}, +"destination": { +"description": "Directory to extract archive to. Defaults to `/` on Linux or `C:\\` on Windows.", +"type": "string" +}, +"type": { +"description": "Required. The type of the archive to extract.", +"enum": [ +"ARCHIVE_TYPE_UNSPECIFIED", +"TAR", +"TAR_GZIP", +"TAR_BZIP", +"TAR_LZMA", +"TAR_XZ", +"ZIP" +], +"enumDescriptions": [ +"Indicates that the archive type isn't specified.", +"Indicates that the archive is a tar archive with no encryption.", +"Indicates that the archive is a tar archive with gzip encryption.", +"Indicates that the archive is a tar archive with bzip encryption.", +"Indicates that the archive is a tar archive with lzma encryption.", +"Indicates that the archive is a tar archive with xz encryption.", +"Indicates that the archive is a zip archive." +], +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeStepInstallDpkg": { +"description": "Installs a deb via dpkg.", +"id": "SoftwareRecipeStepInstallDpkg", +"properties": { +"artifactId": { +"description": "Required. The id of the relevant artifact in the recipe.", +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeStepInstallMsi": { +"description": "Installs an MSI file.", +"id": "SoftwareRecipeStepInstallMsi", +"properties": { +"allowedExitCodes": { +"description": "Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0]", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"artifactId": { +"description": "Required. The id of the relevant artifact in the recipe.", +"type": "string" +}, +"flags": { +"description": "The flags to use when installing the MSI defaults to [\"/i\"] (i.e. the install flag).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SoftwareRecipeStepInstallRpm": { +"description": "Installs an rpm file via the rpm utility.", +"id": "SoftwareRecipeStepInstallRpm", +"properties": { +"artifactId": { +"description": "Required. The id of the relevant artifact in the recipe.", +"type": "string" +} +}, +"type": "object" +}, +"SoftwareRecipeStepRunScript": { +"description": "Runs a script through an interpreter.", +"id": "SoftwareRecipeStepRunScript", +"properties": { +"allowedExitCodes": { +"description": "Return codes that indicate that the software installed or updated successfully. Behaviour defaults to [0]", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"interpreter": { +"description": "The script interpreter to use to run the script. If no interpreter is specified the script is executed directly, which likely only succeed for scripts with [shebang lines](https://en.wikipedia.org/wiki/Shebang_\\(Unix\\)).", +"enum": [ +"INTERPRETER_UNSPECIFIED", +"SHELL", +"POWERSHELL" +], +"enumDescriptions": [ +"Default value for ScriptType.", +"Indicates that the script is run with `/bin/sh` on Linux and `cmd` on windows.", +"Indicates that the script is run with powershell." +], +"type": "string" +}, +"script": { +"description": "Required. The shell script to be executed.", +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TimeZone": { +"description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", +"id": "TimeZone", +"properties": { +"id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"type": "string" +}, +"version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"type": "string" +} +}, +"type": "object" +}, +"WeekDayOfMonth": { +"description": "Represents one week day in a month. An example is \"the 4th Sunday\".", +"id": "WeekDayOfMonth", +"properties": { +"dayOfWeek": { +"description": "Required. A day of the week.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +}, +"dayOffset": { +"description": "Optional. Represents the number of days before or after the given week day of month that the patch deployment is scheduled for. For example if `week_ordinal` and `day_of_week` values point to the second day of the month and this `day_offset` value is set to `3`, the patch deployment takes place three days after the second Tuesday of the month. If this value is negative, for example -5, the patches are deployed five days before before the second Tuesday of the month. Allowed values are in range [-30, 30].", +"format": "int32", +"type": "integer" +}, +"weekOrdinal": { +"description": "Required. Week number in a month. 1-4 indicates the 1st to 4th week of the month. -1 indicates the last week of the month.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"WeeklySchedule": { +"description": "Represents a weekly schedule.", +"id": "WeeklySchedule", +"properties": { +"dayOfWeek": { +"description": "Required. Day of the week.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +} +}, +"type": "object" +}, +"WindowsUpdateSettings": { +"description": "Windows patching is performed using the Windows Update Agent.", +"id": "WindowsUpdateSettings", +"properties": { +"classifications": { +"description": "Only apply updates of these windows update classifications. If empty, all updates are applied.", +"items": { +"enum": [ +"CLASSIFICATION_UNSPECIFIED", +"CRITICAL", +"SECURITY", +"DEFINITION", +"DRIVER", +"FEATURE_PACK", +"SERVICE_PACK", +"TOOL", +"UPDATE_ROLLUP", +"UPDATE" +], +"enumDescriptions": [ +"Invalid. If classifications are included, they must be specified.", +"\"A widely released fix for a specific problem that addresses a critical, non-security-related bug.\" [1]", +"\"A widely released fix for a product-specific, security-related vulnerability. Security vulnerabilities are rated by their severity. The severity rating is indicated in the Microsoft security bulletin as critical, important, moderate, or low.\" [1]", +"\"A widely released and frequent software update that contains additions to a product's definition database. Definition databases are often used to detect objects that have specific attributes, such as malicious code, phishing websites, or junk mail.\" [1]", +"\"Software that controls the input and output of a device.\" [1]", +"\"New product functionality that is first distributed outside the context of a product release and that is typically included in the next full product release.\" [1]", +"\"A tested, cumulative set of all hotfixes, security updates, critical updates, and updates. Additionally, service packs may contain additional fixes for problems that are found internally since the release of the product. Service packs my also contain a limited number of customer-requested design changes or features.\" [1]", +"\"A utility or feature that helps complete a task or set of tasks.\" [1]", +"\"A tested, cumulative set of hotfixes, security updates, critical updates, and updates that are packaged together for easy deployment. A rollup generally targets a specific area, such as security, or a component of a product, such as Internet Information Services (IIS).\" [1]", +"\"A widely released fix for a specific problem. An update addresses a noncritical, non-security-related bug.\" [1]" +], +"type": "string" +}, +"type": "array" +}, +"excludes": { +"description": "List of KBs to exclude from update.", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePatches": { +"description": "An exclusive list of kbs to be updated. These are the only patches that will be updated. This field must not be used with other patch configurations.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"YumRepository": { +"description": "Represents a single Yum package repository. This repository is added to a repo file that is stored at `/etc/yum.repos.d/google_osconfig.repo`.", +"id": "YumRepository", +"properties": { +"baseUrl": { +"description": "Required. The location of the repository directory.", +"type": "string" +}, +"displayName": { +"description": "The display name of the repository.", +"type": "string" +}, +"gpgKeys": { +"description": "URIs of GPG keys.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Required. A one word, unique name for this repository. This is the `repo id` in the Yum config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for guest policy conflicts.", +"type": "string" +} +}, +"type": "object" +}, +"YumSettings": { +"description": "Yum patching is performed by executing `yum update`. Additional options can be set to control how this is executed. Note that not all settings are supported on all platforms.", +"id": "YumSettings", +"properties": { +"excludes": { +"description": "List of packages to exclude from update. These packages are excluded by using the yum `--exclude` flag.", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePackages": { +"description": "An exclusive list of packages to be updated. These are the only packages that will be updated. If these packages are not installed, they will be ignored. This field must not be specified with any other patch configuration fields.", +"items": { +"type": "string" +}, +"type": "array" +}, +"minimal": { +"description": "Will cause patch to run `yum update-minimal` instead.", +"type": "boolean" +}, +"security": { +"description": "Adds the `--security` flag to `yum update`. Not supported on all platforms.", +"type": "boolean" +} +}, +"type": "object" +}, +"ZypperRepository": { +"description": "Represents a single Zypper package repository. This repository is added to a repo file that is stored at `/etc/zypp/repos.d/google_osconfig.repo`.", +"id": "ZypperRepository", +"properties": { +"baseUrl": { +"description": "Required. The location of the repository directory.", +"type": "string" +}, +"displayName": { +"description": "The display name of the repository.", +"type": "string" +}, +"gpgKeys": { +"description": "URIs of GPG keys.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Required. A one word, unique name for this repository. This is the `repo id` in the zypper config file and also the `display_name` if `display_name` is omitted. This id is also used as the unique identifier when checking for guest policy conflicts.", +"type": "string" +} +}, +"type": "object" +}, +"ZypperSettings": { +"description": "Zypper patching is performed by running `zypper patch`. See also https://en.opensuse.org/SDB:Zypper_manual.", +"id": "ZypperSettings", +"properties": { +"categories": { +"description": "Install only patches with these categories. Common categories include security, recommended, and feature.", +"items": { +"type": "string" +}, +"type": "array" +}, +"excludes": { +"description": "List of patches to exclude from update.", +"items": { +"type": "string" +}, +"type": "array" +}, +"exclusivePatches": { +"description": "An exclusive list of patches to be updated. These are the only patches that will be installed using 'zypper patch patch:' command. This field must not be used with any other patch configuration fields.", +"items": { +"type": "string" +}, +"type": "array" +}, +"severities": { +"description": "Install only patches with these severities. Common severities include critical, important, moderate, and low.", +"items": { +"type": "string" +}, +"type": "array" +}, +"withOptional": { +"description": "Adds the `--with-optional` flag to `zypper patch`.", +"type": "boolean" +}, +"withUpdate": { +"description": "Adds the `--with-update` flag, to `zypper patch`.", +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "OS Config API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..5fc45263c2ca14d9921127aba28491cbe75d61cd --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1.json @@ -0,0 +1,497 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +}, +"https://www.googleapis.com/auth/compute": { +"description": "View and manage your Google Compute Engine resources" +}, +"https://www.googleapis.com/auth/compute.readonly": { +"description": "View your Google Compute Engine resources" +} +} +} +}, +"basePath": "", +"baseUrl": "https://oslogin.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud OS Login", +"description": "You can use OS Login to manage access to your VM instances using IAM roles.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/compute/docs/oslogin/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "oslogin:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://oslogin.mtls.googleapis.com/", +"name": "oslogin", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"users": { +"methods": { +"getLoginProfile": { +"description": "Retrieves the profile information used for logging in to a virtual machine on Google Compute Engine.", +"flatPath": "v1/users/{usersId}/loginProfile", +"httpMethod": "GET", +"id": "oslogin.users.getLoginProfile", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The project ID of the Google Cloud Platform project.", +"location": "query", +"type": "string" +}, +"systemId": { +"description": "A system ID for filtering the results of the request.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/loginProfile", +"response": { +"$ref": "LoginProfile" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/compute", +"https://www.googleapis.com/auth/compute.readonly" +] +}, +"importSshPublicKey": { +"description": "Adds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile.", +"flatPath": "v1/users/{usersId}:importSshPublicKey", +"httpMethod": "POST", +"id": "oslogin.users.importSshPublicKey", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The project ID of the Google Cloud Platform project.", +"location": "query", +"type": "string" +}, +"regions": { +"description": "Optional. The regions to which to assert that the key was written. If unspecified, defaults to all regions. Regions are listed at https://cloud.google.com/about/locations#region.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/{+parent}:importSshPublicKey", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "ImportSshPublicKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +}, +"resources": { +"projects": { +"methods": { +"delete": { +"description": "Deletes a POSIX account.", +"flatPath": "v1/users/{usersId}/projects/{projectsId}", +"httpMethod": "DELETE", +"id": "oslogin.users.projects.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format `users/{user}/projects/{project}`.", +"location": "path", +"pattern": "^users/[^/]+/projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +}, +"sshPublicKeys": { +"methods": { +"create": { +"description": "Create an SSH public key", +"flatPath": "v1/users/{usersId}/sshPublicKeys", +"httpMethod": "POST", +"id": "oslogin.users.sshPublicKeys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/sshPublicKeys", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"delete": { +"description": "Deletes an SSH public key.", +"flatPath": "v1/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "DELETE", +"id": "oslogin.users.sshPublicKeys.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"get": { +"description": "Retrieves an SSH public key.", +"flatPath": "v1/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "GET", +"id": "oslogin.users.sshPublicKeys.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"patch": { +"description": "Updates an SSH public key and returns the profile information. This method supports patch semantics.", +"flatPath": "v1/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "PATCH", +"id": "oslogin.users.sshPublicKeys.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Mask to control which fields get updated. Updates all if not present.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://oslogin.googleapis.com/", +"schemas": { +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ImportSshPublicKeyResponse": { +"description": "A response message for importing an SSH public key.", +"id": "ImportSshPublicKeyResponse", +"properties": { +"details": { +"description": "Detailed information about import results.", +"type": "string" +}, +"loginProfile": { +"$ref": "LoginProfile", +"description": "The login profile information for the user." +} +}, +"type": "object" +}, +"LoginProfile": { +"description": "The user profile information used for logging in to a virtual machine on Google Compute Engine.", +"id": "LoginProfile", +"properties": { +"name": { +"description": "Required. A unique user ID.", +"type": "string" +}, +"posixAccounts": { +"description": "The list of POSIX accounts associated with the user.", +"items": { +"$ref": "PosixAccount" +}, +"type": "array" +}, +"sshPublicKeys": { +"additionalProperties": { +"$ref": "SshPublicKey" +}, +"description": "A map from SSH public key fingerprint to the associated key object.", +"type": "object" +} +}, +"type": "object" +}, +"PosixAccount": { +"description": "The POSIX account information associated with a Google account.", +"id": "PosixAccount", +"properties": { +"accountId": { +"description": "Output only. A POSIX account identifier.", +"readOnly": true, +"type": "string" +}, +"gecos": { +"description": "The GECOS (user information) entry for this account.", +"type": "string" +}, +"gid": { +"description": "The default group ID.", +"format": "int64", +"type": "string" +}, +"homeDirectory": { +"description": "The path to the home directory for this account.", +"type": "string" +}, +"name": { +"description": "Output only. The canonical resource name.", +"readOnly": true, +"type": "string" +}, +"operatingSystemType": { +"description": "The operating system type where this account applies.", +"enum": [ +"OPERATING_SYSTEM_TYPE_UNSPECIFIED", +"LINUX", +"WINDOWS" +], +"enumDescriptions": [ +"The operating system type associated with the user account information is unspecified.", +"Linux user account information.", +"Windows user account information." +], +"type": "string" +}, +"primary": { +"description": "Only one POSIX account can be marked as primary.", +"type": "boolean" +}, +"shell": { +"description": "The path to the logic shell for this account.", +"type": "string" +}, +"systemId": { +"description": "System identifier for which account the username or uid applies to. By default, the empty value is used.", +"type": "string" +}, +"uid": { +"description": "The user ID.", +"format": "int64", +"type": "string" +}, +"username": { +"description": "The username of the POSIX account.", +"type": "string" +} +}, +"type": "object" +}, +"SshPublicKey": { +"description": "The SSH public key information associated with a Google account.", +"id": "SshPublicKey", +"properties": { +"expirationTimeUsec": { +"description": "An expiration time in microseconds since epoch.", +"format": "int64", +"type": "string" +}, +"fingerprint": { +"description": "Output only. The SHA-256 fingerprint of the SSH public key.", +"readOnly": true, +"type": "string" +}, +"key": { +"description": "Public key text in SSH format, defined by RFC4253 section 6.6.", +"type": "string" +}, +"name": { +"description": "Output only. The canonical resource name.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud OS Login API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1alpha.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1alpha.json new file mode 100644 index 0000000000000000000000000000000000000000..5f9ecd79845bcb52f940e2ff10271346cb20a5d3 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1alpha.json @@ -0,0 +1,701 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +}, +"https://www.googleapis.com/auth/compute": { +"description": "View and manage your Google Compute Engine resources" +}, +"https://www.googleapis.com/auth/compute.readonly": { +"description": "View your Google Compute Engine resources" +} +} +} +}, +"basePath": "", +"baseUrl": "https://oslogin.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud OS Login", +"description": "You can use OS Login to manage access to your VM instances using IAM roles.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/compute/docs/oslogin/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "oslogin:v1alpha", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://oslogin.mtls.googleapis.com/", +"name": "oslogin", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"users": { +"methods": { +"getLoginProfile": { +"description": "Retrieves the profile information used for logging in to a virtual machine on Google Compute Engine.", +"flatPath": "v1alpha/users/{usersId}/loginProfile", +"httpMethod": "GET", +"id": "oslogin.users.getLoginProfile", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"operatingSystemType": { +"description": "The type of operating system associated with the account.", +"enum": [ +"OPERATING_SYSTEM_TYPE_UNSPECIFIED", +"LINUX", +"WINDOWS" +], +"enumDescriptions": [ +"The operating system type associated with the user account information is unspecified.", +"Linux user account information.", +"Windows user account information." +], +"location": "query", +"type": "string" +}, +"projectId": { +"description": "The project ID of the Google Cloud Platform project.", +"location": "query", +"type": "string" +}, +"systemId": { +"description": "A system ID for filtering the results of the request.", +"location": "query", +"type": "string" +}, +"view": { +"description": "The view configures whether to retrieve security keys information.", +"enum": [ +"LOGIN_PROFILE_VIEW_UNSPECIFIED", +"BASIC", +"SECURITY_KEY" +], +"enumDescriptions": [ +"The default login profile view. The API defaults to the BASIC view.", +"Includes POSIX and SSH key information.", +"Include security key information for the user." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}/loginProfile", +"response": { +"$ref": "LoginProfile" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/compute", +"https://www.googleapis.com/auth/compute.readonly" +] +}, +"importSshPublicKey": { +"description": "Adds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile.", +"flatPath": "v1alpha/users/{usersId}:importSshPublicKey", +"httpMethod": "POST", +"id": "oslogin.users.importSshPublicKey", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The project ID of the Google Cloud Platform project.", +"location": "query", +"type": "string" +}, +"regions": { +"description": "Optional. The regions to which to assert that the key was written. If unspecified, defaults to all regions. Regions are listed at https://cloud.google.com/about/locations#region.", +"location": "query", +"repeated": true, +"type": "string" +}, +"view": { +"description": "The view configures whether to retrieve security keys information.", +"enum": [ +"LOGIN_PROFILE_VIEW_UNSPECIFIED", +"BASIC", +"SECURITY_KEY" +], +"enumDescriptions": [ +"The default login profile view. The API defaults to the BASIC view.", +"Includes POSIX and SSH key information.", +"Include security key information for the user." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+parent}:importSshPublicKey", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "ImportSshPublicKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +}, +"resources": { +"projects": { +"methods": { +"delete": { +"description": "Deletes a POSIX account.", +"flatPath": "v1alpha/users/{usersId}/projects/{projectsId}", +"httpMethod": "DELETE", +"id": "oslogin.users.projects.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format `users/{user}/projects/{project}`.", +"location": "path", +"pattern": "^users/[^/]+/projects/[^/]+$", +"required": true, +"type": "string" +}, +"operatingSystemType": { +"description": "The type of operating system associated with the account.", +"enum": [ +"OPERATING_SYSTEM_TYPE_UNSPECIFIED", +"LINUX", +"WINDOWS" +], +"enumDescriptions": [ +"The operating system type associated with the user account information is unspecified.", +"Linux user account information.", +"Windows user account information." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +}, +"resources": { +"locations": { +"methods": { +"signSshPublicKey": { +"description": "Signs an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.", +"flatPath": "v1alpha/users/{usersId}/projects/{projectsId}/locations/{locationsId}:signSshPublicKey", +"httpMethod": "POST", +"id": "oslogin.users.projects.locations.signSshPublicKey", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The parent project and zone for the signing request. This is needed to properly ensure per-organization ISS processing and potentially to provide for the possibility of zone-specific certificates used in the signing process.", +"location": "path", +"pattern": "^users/[^/]+/projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}:signSshPublicKey", +"request": { +"$ref": "SignSshPublicKeyRequest" +}, +"response": { +"$ref": "SignSshPublicKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +}, +"zones": { +"methods": { +"signSshPublicKey": { +"description": "Signs an SSH public key for a user to authenticate to a virtual machine on Google Compute Engine.", +"flatPath": "v1alpha/users/{usersId}/projects/{projectsId}/zones/{zonesId}:signSshPublicKey", +"httpMethod": "POST", +"id": "oslogin.users.projects.zones.signSshPublicKey", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The parent project and zone for the signing request. This is needed to properly ensure per-organization ISS processing and potentially to provide for the possibility of zone-specific certificates used in the signing process.", +"location": "path", +"pattern": "^users/[^/]+/projects/[^/]+/zones/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}:signSshPublicKey", +"request": { +"$ref": "SignSshPublicKeyRequest" +}, +"response": { +"$ref": "SignSshPublicKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +} +} +}, +"sshPublicKeys": { +"methods": { +"create": { +"description": "Create an SSH public key", +"flatPath": "v1alpha/users/{usersId}/sshPublicKeys", +"httpMethod": "POST", +"id": "oslogin.users.sshPublicKeys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/sshPublicKeys", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"delete": { +"description": "Deletes an SSH public key.", +"flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "DELETE", +"id": "oslogin.users.sshPublicKeys.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"get": { +"description": "Retrieves an SSH public key.", +"flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "GET", +"id": "oslogin.users.sshPublicKeys.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"patch": { +"description": "Updates an SSH public key and returns the profile information. This method supports patch semantics.", +"flatPath": "v1alpha/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "PATCH", +"id": "oslogin.users.sshPublicKeys.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Mask to control which fields get updated. Updates all if not present.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://oslogin.googleapis.com/", +"schemas": { +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ImportSshPublicKeyResponse": { +"description": "A response message for importing an SSH public key.", +"id": "ImportSshPublicKeyResponse", +"properties": { +"details": { +"description": "Detailed information about import results.", +"type": "string" +}, +"loginProfile": { +"$ref": "LoginProfile", +"description": "The login profile information for the user." +} +}, +"type": "object" +}, +"LoginProfile": { +"description": "The user profile information used for logging in to a virtual machine on Google Compute Engine.", +"id": "LoginProfile", +"properties": { +"name": { +"description": "Required. A unique user ID.", +"type": "string" +}, +"posixAccounts": { +"description": "The list of POSIX accounts associated with the user.", +"items": { +"$ref": "PosixAccount" +}, +"type": "array" +}, +"securityKeys": { +"description": "The registered security key credentials for a user.", +"items": { +"$ref": "SecurityKey" +}, +"type": "array" +}, +"sshPublicKeys": { +"additionalProperties": { +"$ref": "SshPublicKey" +}, +"description": "A map from SSH public key fingerprint to the associated key object.", +"type": "object" +} +}, +"type": "object" +}, +"PosixAccount": { +"description": "The POSIX account information associated with a Google account.", +"id": "PosixAccount", +"properties": { +"accountId": { +"description": "Output only. A POSIX account identifier.", +"readOnly": true, +"type": "string" +}, +"gecos": { +"description": "The GECOS (user information) entry for this account.", +"type": "string" +}, +"gid": { +"description": "The default group ID.", +"format": "int64", +"type": "string" +}, +"homeDirectory": { +"description": "The path to the home directory for this account.", +"type": "string" +}, +"name": { +"description": "Output only. The canonical resource name.", +"readOnly": true, +"type": "string" +}, +"operatingSystemType": { +"description": "The operating system type where this account applies.", +"enum": [ +"OPERATING_SYSTEM_TYPE_UNSPECIFIED", +"LINUX", +"WINDOWS" +], +"enumDescriptions": [ +"The operating system type associated with the user account information is unspecified.", +"Linux user account information.", +"Windows user account information." +], +"type": "string" +}, +"primary": { +"description": "Only one POSIX account can be marked as primary.", +"type": "boolean" +}, +"shell": { +"description": "The path to the logic shell for this account.", +"type": "string" +}, +"systemId": { +"description": "System identifier for which account the username or uid applies to. By default, the empty value is used.", +"type": "string" +}, +"uid": { +"description": "The user ID.", +"format": "int64", +"type": "string" +}, +"username": { +"description": "The username of the POSIX account.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityKey": { +"description": "The credential information for a Google registered security key.", +"id": "SecurityKey", +"properties": { +"deviceNickname": { +"description": "The security key nickname explicitly set by the user.", +"type": "string" +}, +"privateKey": { +"description": "Hardware-backed private key text in SSH format.", +"type": "string" +}, +"publicKey": { +"description": "Public key text in SSH format, defined by [RFC4253](\"https://www.ietf.org/rfc/rfc4253.txt\") section 6.6.", +"type": "string" +}, +"universalTwoFactor": { +"$ref": "UniversalTwoFactor", +"description": "The U2F protocol type." +}, +"webAuthn": { +"$ref": "WebAuthn", +"description": "The Web Authentication protocol type." +} +}, +"type": "object" +}, +"SignSshPublicKeyRequest": { +"id": "SignSshPublicKeyRequest", +"properties": { +"sshPublicKey": { +"description": "The SSH public key to sign.", +"type": "string" +} +}, +"type": "object" +}, +"SignSshPublicKeyResponse": { +"id": "SignSshPublicKeyResponse", +"properties": { +"signedSshPublicKey": { +"description": "The signed SSH public key to use in the SSH handshake.", +"type": "string" +} +}, +"type": "object" +}, +"SshPublicKey": { +"description": "The SSH public key information associated with a Google account.", +"id": "SshPublicKey", +"properties": { +"expirationTimeUsec": { +"description": "An expiration time in microseconds since epoch.", +"format": "int64", +"type": "string" +}, +"fingerprint": { +"description": "Output only. The SHA-256 fingerprint of the SSH public key.", +"readOnly": true, +"type": "string" +}, +"key": { +"description": "Public key text in SSH format, defined by RFC4253 section 6.6.", +"type": "string" +}, +"name": { +"description": "Output only. The canonical resource name.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"UniversalTwoFactor": { +"description": "Security key information specific to the U2F protocol.", +"id": "UniversalTwoFactor", +"properties": { +"appId": { +"description": "Application ID for the U2F protocol.", +"type": "string" +} +}, +"type": "object" +}, +"WebAuthn": { +"description": "Security key information specific to the Web Authentication protocol.", +"id": "WebAuthn", +"properties": { +"rpId": { +"description": "Relying party ID for Web Authentication.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud OS Login API", +"version": "v1alpha", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..82c9ff865bcc7aa5f7b177858bffb9355c0434bd --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/oslogin.v1beta.json @@ -0,0 +1,671 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +}, +"https://www.googleapis.com/auth/compute": { +"description": "View and manage your Google Compute Engine resources" +}, +"https://www.googleapis.com/auth/compute.readonly": { +"description": "View your Google Compute Engine resources" +} +} +} +}, +"basePath": "", +"baseUrl": "https://oslogin.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud OS Login", +"description": "You can use OS Login to manage access to your VM instances using IAM roles.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/compute/docs/oslogin/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "oslogin:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://oslogin.mtls.googleapis.com/", +"name": "oslogin", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"users": { +"methods": { +"getLoginProfile": { +"description": "Retrieves the profile information used for logging in to a virtual machine on Google Compute Engine.", +"flatPath": "v1beta/users/{usersId}/loginProfile", +"httpMethod": "GET", +"id": "oslogin.users.getLoginProfile", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The project ID of the Google Cloud Platform project.", +"location": "query", +"type": "string" +}, +"systemId": { +"description": "A system ID for filtering the results of the request.", +"location": "query", +"type": "string" +}, +"view": { +"description": "The view configures whether to retrieve security keys information.", +"enum": [ +"LOGIN_PROFILE_VIEW_UNSPECIFIED", +"BASIC", +"SECURITY_KEY" +], +"enumDescriptions": [ +"The default login profile view. The API defaults to the BASIC view.", +"Includes POSIX and SSH key information.", +"Include security key information for the user." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}/loginProfile", +"response": { +"$ref": "LoginProfile" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/compute", +"https://www.googleapis.com/auth/compute.readonly" +] +}, +"importSshPublicKey": { +"description": "Adds an SSH public key and returns the profile information. Default POSIX account information is set when no username and UID exist as part of the login profile.", +"flatPath": "v1beta/users/{usersId}:importSshPublicKey", +"httpMethod": "POST", +"id": "oslogin.users.importSshPublicKey", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The project ID of the Google Cloud Platform project.", +"location": "query", +"type": "string" +}, +"regions": { +"description": "Optional. The regions to which to assert that the key was written. If unspecified, defaults to all regions. Regions are listed at https://cloud.google.com/about/locations#region.", +"location": "query", +"repeated": true, +"type": "string" +}, +"view": { +"description": "The view configures whether to retrieve security keys information.", +"enum": [ +"LOGIN_PROFILE_VIEW_UNSPECIFIED", +"BASIC", +"SECURITY_KEY" +], +"enumDescriptions": [ +"The default login profile view. The API defaults to the BASIC view.", +"Includes POSIX and SSH key information.", +"Include security key information for the user." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+parent}:importSshPublicKey", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "ImportSshPublicKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +}, +"resources": { +"projects": { +"methods": { +"delete": { +"description": "Deletes a POSIX account.", +"flatPath": "v1beta/users/{usersId}/projects/{projectsId}", +"httpMethod": "DELETE", +"id": "oslogin.users.projects.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A reference to the POSIX account to update. POSIX accounts are identified by the project ID they are associated with. A reference to the POSIX account is in format `users/{user}/projects/{project}`.", +"location": "path", +"pattern": "^users/[^/]+/projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +}, +"resources": { +"locations": { +"methods": { +"signSshPublicKey": { +"description": "Signs an SSH public key for a user to authenticate to an instance.", +"flatPath": "v1beta/users/{usersId}/projects/{projectsId}/locations/{locationsId}:signSshPublicKey", +"httpMethod": "POST", +"id": "oslogin.users.projects.locations.signSshPublicKey", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The parent project and zone for the signing request. This is needed to properly ensure per-organization ISS processing and potentially to provide for the possibility of zone-specific certificates used in the signing process.", +"location": "path", +"pattern": "^users/[^/]+/projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}:signSshPublicKey", +"request": { +"$ref": "SignSshPublicKeyRequest" +}, +"response": { +"$ref": "SignSshPublicKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +}, +"zones": { +"methods": { +"signSshPublicKey": { +"description": "Signs an SSH public key for a user to authenticate to an instance.", +"flatPath": "v1beta/users/{usersId}/projects/{projectsId}/zones/{zonesId}:signSshPublicKey", +"httpMethod": "POST", +"id": "oslogin.users.projects.zones.signSshPublicKey", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The parent project and zone for the signing request. This is needed to properly ensure per-organization ISS processing and potentially to provide for the possibility of zone-specific certificates used in the signing process.", +"location": "path", +"pattern": "^users/[^/]+/projects/[^/]+/zones/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}:signSshPublicKey", +"request": { +"$ref": "SignSshPublicKeyRequest" +}, +"response": { +"$ref": "SignSshPublicKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +} +} +}, +"sshPublicKeys": { +"methods": { +"create": { +"description": "Create an SSH public key", +"flatPath": "v1beta/users/{usersId}/sshPublicKeys", +"httpMethod": "POST", +"id": "oslogin.users.sshPublicKeys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The unique ID for the user in format `users/{user}`.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/sshPublicKeys", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"delete": { +"description": "Deletes an SSH public key.", +"flatPath": "v1beta/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "DELETE", +"id": "oslogin.users.sshPublicKeys.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"get": { +"description": "Retrieves an SSH public key.", +"flatPath": "v1beta/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "GET", +"id": "oslogin.users.sshPublicKeys.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to retrieve. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +}, +"patch": { +"description": "Updates an SSH public key and returns the profile information. This method supports patch semantics.", +"flatPath": "v1beta/users/{usersId}/sshPublicKeys/{sshPublicKeysId}", +"httpMethod": "PATCH", +"id": "oslogin.users.sshPublicKeys.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fingerprint of the public key to update. Public keys are identified by their SHA-256 fingerprint. The fingerprint of the public key is in format `users/{user}/sshPublicKeys/{fingerprint}`.", +"location": "path", +"pattern": "^users/[^/]+/sshPublicKeys/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Mask to control which fields get updated. Updates all if not present.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "SshPublicKey" +}, +"response": { +"$ref": "SshPublicKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/compute" +] +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://oslogin.googleapis.com/", +"schemas": { +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ImportSshPublicKeyResponse": { +"description": "A response message for importing an SSH public key.", +"id": "ImportSshPublicKeyResponse", +"properties": { +"details": { +"description": "Detailed information about import results.", +"type": "string" +}, +"loginProfile": { +"$ref": "LoginProfile", +"description": "The login profile information for the user." +} +}, +"type": "object" +}, +"LoginProfile": { +"description": "The user profile information used for logging in to a virtual machine on Google Compute Engine.", +"id": "LoginProfile", +"properties": { +"name": { +"description": "Required. A unique user ID.", +"type": "string" +}, +"posixAccounts": { +"description": "The list of POSIX accounts associated with the user.", +"items": { +"$ref": "PosixAccount" +}, +"type": "array" +}, +"securityKeys": { +"description": "The registered security key credentials for a user.", +"items": { +"$ref": "SecurityKey" +}, +"type": "array" +}, +"sshPublicKeys": { +"additionalProperties": { +"$ref": "SshPublicKey" +}, +"description": "A map from SSH public key fingerprint to the associated key object.", +"type": "object" +} +}, +"type": "object" +}, +"PosixAccount": { +"description": "The POSIX account information associated with a Google account.", +"id": "PosixAccount", +"properties": { +"accountId": { +"description": "Output only. A POSIX account identifier.", +"readOnly": true, +"type": "string" +}, +"gecos": { +"description": "The GECOS (user information) entry for this account.", +"type": "string" +}, +"gid": { +"description": "The default group ID.", +"format": "int64", +"type": "string" +}, +"homeDirectory": { +"description": "The path to the home directory for this account.", +"type": "string" +}, +"name": { +"description": "Output only. The canonical resource name.", +"readOnly": true, +"type": "string" +}, +"operatingSystemType": { +"description": "The operating system type where this account applies.", +"enum": [ +"OPERATING_SYSTEM_TYPE_UNSPECIFIED", +"LINUX", +"WINDOWS" +], +"enumDescriptions": [ +"The operating system type associated with the user account information is unspecified.", +"Linux user account information.", +"Windows user account information." +], +"type": "string" +}, +"primary": { +"description": "Only one POSIX account can be marked as primary.", +"type": "boolean" +}, +"shell": { +"description": "The path to the logic shell for this account.", +"type": "string" +}, +"systemId": { +"description": "System identifier for which account the username or uid applies to. By default, the empty value is used.", +"type": "string" +}, +"uid": { +"description": "The user ID.", +"format": "int64", +"type": "string" +}, +"username": { +"description": "The username of the POSIX account.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityKey": { +"description": "The credential information for a Google registered security key.", +"id": "SecurityKey", +"properties": { +"deviceNickname": { +"description": "The security key nickname explicitly set by the user.", +"type": "string" +}, +"privateKey": { +"description": "Hardware-backed private key text in SSH format.", +"type": "string" +}, +"publicKey": { +"description": "Public key text in SSH format, defined by [RFC4253](\"https://www.ietf.org/rfc/rfc4253.txt\") section 6.6.", +"type": "string" +}, +"universalTwoFactor": { +"$ref": "UniversalTwoFactor", +"description": "The U2F protocol type." +}, +"webAuthn": { +"$ref": "WebAuthn", +"description": "The Web Authentication protocol type." +} +}, +"type": "object" +}, +"SignSshPublicKeyRequest": { +"id": "SignSshPublicKeyRequest", +"properties": { +"sshPublicKey": { +"description": "The SSH public key to sign.", +"type": "string" +} +}, +"type": "object" +}, +"SignSshPublicKeyResponse": { +"id": "SignSshPublicKeyResponse", +"properties": { +"signedSshPublicKey": { +"description": "The signed SSH public key to use in the SSH handshake.", +"type": "string" +} +}, +"type": "object" +}, +"SshPublicKey": { +"description": "The SSH public key information associated with a Google account.", +"id": "SshPublicKey", +"properties": { +"expirationTimeUsec": { +"description": "An expiration time in microseconds since epoch.", +"format": "int64", +"type": "string" +}, +"fingerprint": { +"description": "Output only. The SHA-256 fingerprint of the SSH public key.", +"readOnly": true, +"type": "string" +}, +"key": { +"description": "Public key text in SSH format, defined by RFC4253 section 6.6.", +"type": "string" +}, +"name": { +"description": "Output only. The canonical resource name.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"UniversalTwoFactor": { +"description": "Security key information specific to the U2F protocol.", +"id": "UniversalTwoFactor", +"properties": { +"appId": { +"description": "Application ID for the U2F protocol.", +"type": "string" +} +}, +"type": "object" +}, +"WebAuthn": { +"description": "Security key information specific to the Web Authentication protocol.", +"id": "WebAuthn", +"properties": { +"rpId": { +"description": "Relying party ID for Web Authentication.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud OS Login API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pagespeedonline.v5.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pagespeedonline.v5.json new file mode 100644 index 0000000000000000000000000000000000000000..70713b1c33d313a22e7e688985cd8aa30a8194a1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pagespeedonline.v5.json @@ -0,0 +1,963 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"openid": { +"description": "Associate you with your personal info on Google" +} +} +} +}, +"basePath": "", +"baseUrl": "https://pagespeedonline.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Pagespeed Insights", +"description": "The PageSpeed Insights API lets you analyze the performance of your website with a simple API. It offers tailored suggestions for how you can optimize your site, and lets you easily integrate PageSpeed Insights analysis into your development tools and workflow. ", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/speed/docs/insights/v5/about", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "pagespeedonline:v5", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://pagespeedonline.mtls.googleapis.com/", +"name": "pagespeedonline", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"pagespeedapi": { +"methods": { +"runpagespeed": { +"description": "Runs PageSpeed analysis on the page at the specified URL, and returns PageSpeed scores, a list of suggestions to make that page faster, and other information.", +"flatPath": "pagespeedonline/v5/runPagespeed", +"httpMethod": "GET", +"id": "pagespeedonline.pagespeedapi.runpagespeed", +"parameterOrder": [ +"url" +], +"parameters": { +"captchaToken": { +"description": "The captcha token passed when filling out a captcha.", +"location": "query", +"type": "string" +}, +"category": { +"description": "A Lighthouse category to run; if none are given, only Performance category will be run", +"enum": [ +"CATEGORY_UNSPECIFIED", +"ACCESSIBILITY", +"BEST_PRACTICES", +"PERFORMANCE", +"PWA", +"SEO" +], +"enumDescriptions": [ +"Default UNDEFINED category.", +"Accessibility (a11y), category pertaining to a website's capacity to be accessible to all users.", +"Best Practices, category pertaining to a website's conformance to web best practice.", +"Performance, category pertaining to a website's performance.", +"Progressive Web App (PWA), category pertaining to a website's ability to be run as a PWA.", +"Search Engine Optimization (SEO), category pertaining to a website's ability to be indexed by search engines." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"locale": { +"description": "The locale used to localize formatted results", +"location": "query", +"pattern": "[a-zA-Z]+((_|-)[a-zA-Z]+)?", +"type": "string" +}, +"strategy": { +"description": "The analysis strategy (desktop or mobile) to use, and desktop is the default", +"enum": [ +"STRATEGY_UNSPECIFIED", +"DESKTOP", +"MOBILE" +], +"enumDescriptions": [ +"UNDEFINED.", +"Fetch and analyze the URL for desktop browsers.", +"Fetch and analyze the URL for mobile devices." +], +"location": "query", +"type": "string" +}, +"url": { +"description": "Required. The URL to fetch and analyze", +"location": "query", +"pattern": "(?i)(url:|origin:)?http(s)?://.*", +"required": true, +"type": "string" +}, +"utm_campaign": { +"description": "Campaign name for analytics.", +"location": "query", +"type": "string" +}, +"utm_source": { +"description": "Campaign source for analytics.", +"location": "query", +"type": "string" +} +}, +"path": "pagespeedonline/v5/runPagespeed", +"response": { +"$ref": "PagespeedApiPagespeedResponseV5" +}, +"scopes": [ +"openid" +] +} +} +} +}, +"revision": "20240419", +"rootUrl": "https://pagespeedonline.googleapis.com/", +"schemas": { +"AuditRefs": { +"description": "A light reference to an audit by id, used to group and weight audits in a given category.", +"id": "AuditRefs", +"properties": { +"acronym": { +"description": "The conventional acronym for the audit/metric.", +"type": "string" +}, +"group": { +"description": "The category group that the audit belongs to (optional).", +"type": "string" +}, +"id": { +"description": "The audit ref id.", +"type": "string" +}, +"relevantAudits": { +"description": "Any audit IDs closely relevant to this one.", +"items": { +"type": "string" +}, +"type": "array" +}, +"weight": { +"description": "The weight this audit's score has on the overall category score.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Bucket": { +"description": "A proportion of data in the total distribution, bucketed by a min/max percentage. Each bucket's range is bounded by min <= x < max, In millisecond.", +"id": "Bucket", +"properties": { +"max": { +"description": "Upper bound for a bucket's range.", +"format": "int32", +"type": "integer" +}, +"min": { +"description": "Lower bound for a bucket's range.", +"format": "int32", +"type": "integer" +}, +"proportion": { +"description": "The proportion of data in this bucket.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Categories": { +"description": "The categories in a Lighthouse run.", +"id": "Categories", +"properties": { +"accessibility": { +"$ref": "LighthouseCategoryV5", +"description": "The accessibility category, containing all accessibility related audits." +}, +"best-practices": { +"$ref": "LighthouseCategoryV5", +"description": "The best practices category, containing all best practices related audits." +}, +"performance": { +"$ref": "LighthouseCategoryV5", +"description": "The performance category, containing all performance related audits." +}, +"pwa": { +"$ref": "LighthouseCategoryV5", +"description": "The Progressive-Web-App (PWA) category, containing all pwa related audits." +}, +"seo": { +"$ref": "LighthouseCategoryV5", +"description": "The Search-Engine-Optimization (SEO) category, containing all seo related audits." +} +}, +"type": "object" +}, +"CategoryGroupV5": { +"description": "Message containing a category", +"id": "CategoryGroupV5", +"properties": { +"description": { +"description": "The description of what the category is grouping", +"type": "string" +}, +"title": { +"description": "The human readable title of the group", +"type": "string" +} +}, +"type": "object" +}, +"ConfigSettings": { +"description": "Message containing the configuration settings for the Lighthouse run.", +"id": "ConfigSettings", +"properties": { +"channel": { +"description": "How Lighthouse was run, e.g. from the Chrome extension or from the npm module.", +"type": "string" +}, +"emulatedFormFactor": { +"deprecated": true, +"description": "The form factor the emulation should use. This field is deprecated, form_factor should be used instead.", +"type": "string" +}, +"formFactor": { +"description": "How Lighthouse should interpret this run in regards to scoring performance metrics and skipping mobile-only tests in desktop.", +"type": "string" +}, +"locale": { +"description": "The locale setting.", +"type": "string" +}, +"onlyCategories": { +"description": "List of categories of audits the run should conduct.", +"type": "any" +} +}, +"type": "object" +}, +"Environment": { +"description": "Message containing environment configuration for a Lighthouse run.", +"id": "Environment", +"properties": { +"benchmarkIndex": { +"description": "The benchmark index number that indicates rough device class.", +"format": "double", +"type": "number" +}, +"credits": { +"additionalProperties": { +"type": "string" +}, +"description": "The version of libraries with which these results were generated. Ex: axe-core.", +"type": "object" +}, +"hostUserAgent": { +"description": "The user agent string of the version of Chrome used.", +"type": "string" +}, +"networkUserAgent": { +"description": "The user agent string that was sent over the network.", +"type": "string" +} +}, +"type": "object" +}, +"I18n": { +"description": "Message containing the i18n data for the LHR - Version 1.", +"id": "I18n", +"properties": { +"rendererFormattedStrings": { +"$ref": "RendererFormattedStrings", +"description": "Internationalized strings that are formatted to the locale in configSettings." +} +}, +"type": "object" +}, +"LhrEntity": { +"description": "Message containing an Entity.", +"id": "LhrEntity", +"properties": { +"category": { +"description": "Optional. An optional category name for the entity.", +"type": "string" +}, +"homepage": { +"description": "Optional. An optional homepage URL of the entity.", +"type": "string" +}, +"isFirstParty": { +"description": "Optional. An optional flag indicating if the entity is the first party.", +"type": "boolean" +}, +"isUnrecognized": { +"description": "Optional. An optional flag indicating if the entity is not recognized.", +"type": "boolean" +}, +"name": { +"description": "Required. Name of the entity.", +"type": "string" +}, +"origins": { +"description": "Required. A list of URL origin strings that belong to this entity.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"LighthouseAuditResultV5": { +"description": "An audit's result object in a Lighthouse result.", +"id": "LighthouseAuditResultV5", +"properties": { +"description": { +"description": "The description of the audit.", +"type": "string" +}, +"details": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Freeform details section of the audit.", +"type": "object" +}, +"displayValue": { +"description": "The value that should be displayed on the UI for this audit.", +"type": "string" +}, +"errorMessage": { +"description": "An error message from a thrown error inside the audit.", +"type": "string" +}, +"explanation": { +"description": "An explanation of the errors in the audit.", +"type": "string" +}, +"id": { +"description": "The audit's id.", +"type": "string" +}, +"numericUnit": { +"description": "The unit of the numeric_value field. Used to format the numeric value for display.", +"type": "string" +}, +"numericValue": { +"description": "A numeric value that has a meaning specific to the audit, e.g. the number of nodes in the DOM or the timestamp of a specific load event. More information can be found in the audit details, if present.", +"format": "double", +"type": "number" +}, +"score": { +"description": "The score of the audit, can be null.", +"type": "any" +}, +"scoreDisplayMode": { +"description": "The enumerated score display mode.", +"type": "string" +}, +"title": { +"description": "The human readable title.", +"type": "string" +}, +"warnings": { +"description": "Possible warnings that occurred in the audit, can be null.", +"type": "any" +} +}, +"type": "object" +}, +"LighthouseCategoryV5": { +"description": "A Lighthouse category.", +"id": "LighthouseCategoryV5", +"properties": { +"auditRefs": { +"description": "An array of references to all the audit members of this category.", +"items": { +"$ref": "AuditRefs" +}, +"type": "array" +}, +"description": { +"description": "A more detailed description of the category and its importance.", +"type": "string" +}, +"id": { +"description": "The string identifier of the category.", +"type": "string" +}, +"manualDescription": { +"description": "A description for the manual audits in the category.", +"type": "string" +}, +"score": { +"description": "The overall score of the category, the weighted average of all its audits. (The category's score, can be null.)", +"type": "any" +}, +"title": { +"description": "The human-friendly name of the category.", +"type": "string" +} +}, +"type": "object" +}, +"LighthouseResultV5": { +"description": "The Lighthouse result object.", +"id": "LighthouseResultV5", +"properties": { +"audits": { +"additionalProperties": { +"$ref": "LighthouseAuditResultV5" +}, +"description": "Map of audits in the LHR.", +"type": "object" +}, +"categories": { +"$ref": "Categories", +"description": "Map of categories in the LHR." +}, +"categoryGroups": { +"additionalProperties": { +"$ref": "CategoryGroupV5" +}, +"description": "Map of category groups in the LHR.", +"type": "object" +}, +"configSettings": { +"$ref": "ConfigSettings", +"description": "The configuration settings for this LHR." +}, +"entities": { +"description": "Entity classification data.", +"items": { +"$ref": "LhrEntity" +}, +"type": "array" +}, +"environment": { +"$ref": "Environment", +"description": "Environment settings that were used when making this LHR." +}, +"fetchTime": { +"description": "The time that this run was fetched.", +"type": "string" +}, +"finalDisplayedUrl": { +"description": "URL displayed on the page after Lighthouse finishes.", +"type": "string" +}, +"finalUrl": { +"description": "The final resolved url that was audited.", +"type": "string" +}, +"fullPageScreenshot": { +"description": "Screenshot data of the full page, along with node rects relevant to the audit results.", +"type": "any" +}, +"i18n": { +"$ref": "I18n", +"description": "The internationalization strings that are required to render the LHR." +}, +"lighthouseVersion": { +"description": "The lighthouse version that was used to generate this LHR.", +"type": "string" +}, +"mainDocumentUrl": { +"description": "URL of the main document request of the final navigation.", +"type": "string" +}, +"requestedUrl": { +"description": "The original requested url.", +"type": "string" +}, +"runWarnings": { +"description": "List of all run warnings in the LHR. Will always output to at least `[]`.", +"items": { +"type": "any" +}, +"type": "array" +}, +"runtimeError": { +"$ref": "RuntimeError", +"description": "A top-level error message that, if present, indicates a serious enough problem that this Lighthouse result may need to be discarded." +}, +"stackPacks": { +"description": "The Stack Pack advice strings.", +"items": { +"$ref": "StackPack" +}, +"type": "array" +}, +"timing": { +"$ref": "Timing", +"description": "Timing information for this LHR." +}, +"userAgent": { +"description": "The user agent that was used to run this LHR.", +"type": "string" +} +}, +"type": "object" +}, +"PagespeedApiLoadingExperienceV5": { +"description": "The CrUX loading experience object that contains CrUX data breakdowns.", +"id": "PagespeedApiLoadingExperienceV5", +"properties": { +"id": { +"description": "The url, pattern or origin which the metrics are on.", +"type": "string" +}, +"initial_url": { +"description": "The requested URL, which may differ from the resolved \"id\".", +"type": "string" +}, +"metrics": { +"additionalProperties": { +"$ref": "UserPageLoadMetricV5" +}, +"description": "The map of .", +"type": "object" +}, +"origin_fallback": { +"description": "True if the result is an origin fallback from a page, false otherwise.", +"type": "boolean" +}, +"overall_category": { +"description": "The human readable speed \"category\" of the id.", +"type": "string" +} +}, +"type": "object" +}, +"PagespeedApiPagespeedResponseV5": { +"description": "The Pagespeed API response object.", +"id": "PagespeedApiPagespeedResponseV5", +"properties": { +"analysisUTCTimestamp": { +"description": "The UTC timestamp of this analysis.", +"type": "string" +}, +"captchaResult": { +"description": "The captcha verify result", +"type": "string" +}, +"id": { +"description": "Canonicalized and final URL for the document, after following page redirects (if any).", +"type": "string" +}, +"kind": { +"description": "Kind of result.", +"type": "string" +}, +"lighthouseResult": { +"$ref": "LighthouseResultV5", +"description": "Lighthouse response for the audit url as an object." +}, +"loadingExperience": { +"$ref": "PagespeedApiLoadingExperienceV5", +"description": "Metrics of end users' page loading experience." +}, +"originLoadingExperience": { +"$ref": "PagespeedApiLoadingExperienceV5", +"description": "Metrics of the aggregated page loading experience of the origin" +}, +"version": { +"$ref": "PagespeedVersion", +"description": "The version of PageSpeed used to generate these results." +} +}, +"type": "object" +}, +"PagespeedVersion": { +"description": "The Pagespeed Version object.", +"id": "PagespeedVersion", +"properties": { +"major": { +"description": "The major version number of PageSpeed used to generate these results.", +"type": "string" +}, +"minor": { +"description": "The minor version number of PageSpeed used to generate these results.", +"type": "string" +} +}, +"type": "object" +}, +"RendererFormattedStrings": { +"description": "Message holding the formatted strings used in the renderer.", +"id": "RendererFormattedStrings", +"properties": { +"auditGroupExpandTooltip": { +"description": "The tooltip text on an expandable chevron icon.", +"type": "string" +}, +"calculatorLink": { +"description": "Text link pointing to the Lighthouse scoring calculator. This link immediately follows a sentence stating the performance score is calculated from the perf metrics.", +"type": "string" +}, +"crcInitialNavigation": { +"description": "The label for the initial request in a critical request chain.", +"type": "string" +}, +"crcLongestDurationLabel": { +"description": "The label for values shown in the summary of critical request chains.", +"type": "string" +}, +"dropdownCopyJSON": { +"description": "Option in a dropdown menu that copies the Lighthouse JSON object to the system clipboard.", +"type": "string" +}, +"dropdownDarkTheme": { +"description": "Option in a dropdown menu that toggles the themeing of the report between Light(default) and Dark themes.", +"type": "string" +}, +"dropdownPrintExpanded": { +"description": "Option in a dropdown menu that opens a full Lighthouse report in a print dialog.", +"type": "string" +}, +"dropdownPrintSummary": { +"description": "Option in a dropdown menu that opens a small, summary report in a print dialog.", +"type": "string" +}, +"dropdownSaveGist": { +"description": "Option in a dropdown menu that saves the current report as a new GitHub Gist.", +"type": "string" +}, +"dropdownSaveHTML": { +"description": "Option in a dropdown menu that saves the Lighthouse report HTML locally to the system as a '.html' file.", +"type": "string" +}, +"dropdownSaveJSON": { +"description": "Option in a dropdown menu that saves the Lighthouse JSON object to the local system as a '.json' file.", +"type": "string" +}, +"dropdownViewer": { +"description": "Option in a dropdown menu that opens the current report in the Lighthouse Viewer Application.", +"type": "string" +}, +"errorLabel": { +"description": "The label shown next to an audit or metric that has had an error.", +"type": "string" +}, +"errorMissingAuditInfo": { +"description": "The error string shown next to an erroring audit.", +"type": "string" +}, +"footerIssue": { +"description": "Label for button to create an issue against the Lighthouse GitHub project.", +"type": "string" +}, +"labDataTitle": { +"description": "The title of the lab data performance category.", +"type": "string" +}, +"lsPerformanceCategoryDescription": { +"description": "The disclaimer shown under performance explaining that the network can vary.", +"type": "string" +}, +"manualAuditsGroupTitle": { +"description": "The heading shown above a list of audits that were not computerd in the run.", +"type": "string" +}, +"notApplicableAuditsGroupTitle": { +"description": "The heading shown above a list of audits that do not apply to a page.", +"type": "string" +}, +"opportunityResourceColumnLabel": { +"description": "The heading for the estimated page load savings opportunity of an audit.", +"type": "string" +}, +"opportunitySavingsColumnLabel": { +"description": "The heading for the estimated page load savings of opportunity audits.", +"type": "string" +}, +"passedAuditsGroupTitle": { +"description": "The heading that is shown above a list of audits that are passing.", +"type": "string" +}, +"runtimeDesktopEmulation": { +"description": "Descriptive explanation for emulation setting when emulating a generic desktop form factor, as opposed to a mobile-device like form factor.", +"type": "string" +}, +"runtimeMobileEmulation": { +"description": "Descriptive explanation for emulation setting when emulating a Nexus 5X mobile device.", +"type": "string" +}, +"runtimeNoEmulation": { +"description": "Descriptive explanation for emulation setting when no device emulation is set.", +"type": "string" +}, +"runtimeSettingsAxeVersion": { +"description": "Label for a row in a table that shows the version of the Axe library used", +"type": "string" +}, +"runtimeSettingsBenchmark": { +"description": "Label for a row in a table that shows the estimated CPU power of the machine running Lighthouse. Example row values: 532, 1492, 783.", +"type": "string" +}, +"runtimeSettingsCPUThrottling": { +"description": "Label for a row in a table that describes the CPU throttling conditions that were used during a Lighthouse run, if any.", +"type": "string" +}, +"runtimeSettingsChannel": { +"description": "Label for a row in a table that shows in what tool Lighthouse is being run (e.g. The lighthouse CLI, Chrome DevTools, Lightrider, WebPageTest, etc).", +"type": "string" +}, +"runtimeSettingsDevice": { +"description": "Label for a row in a table that describes the kind of device that was emulated for the Lighthouse run. Example values for row elements: 'No Emulation', 'Emulated Desktop', etc.", +"type": "string" +}, +"runtimeSettingsFetchTime": { +"description": "Label for a row in a table that shows the time at which a Lighthouse run was conducted; formatted as a timestamp, e.g. Jan 1, 1970 12:00 AM UTC.", +"type": "string" +}, +"runtimeSettingsNetworkThrottling": { +"description": "Label for a row in a table that describes the network throttling conditions that were used during a Lighthouse run, if any.", +"type": "string" +}, +"runtimeSettingsTitle": { +"description": "Title of the Runtime settings table in a Lighthouse report. Runtime settings are the environment configurations that a specific report used at auditing time.", +"type": "string" +}, +"runtimeSettingsUA": { +"description": "Label for a row in a table that shows the User Agent that was detected on the Host machine that ran Lighthouse.", +"type": "string" +}, +"runtimeSettingsUANetwork": { +"description": "Label for a row in a table that shows the User Agent that was used to send out all network requests during the Lighthouse run.", +"type": "string" +}, +"runtimeSettingsUrl": { +"description": "Label for a row in a table that shows the URL that was audited during a Lighthouse run.", +"type": "string" +}, +"runtimeUnknown": { +"description": "Descriptive explanation for a runtime setting that is set to an unknown value.", +"type": "string" +}, +"scorescaleLabel": { +"description": "The label that explains the score gauges scale (0-49, 50-89, 90-100).", +"type": "string" +}, +"showRelevantAudits": { +"description": "Label preceding a radio control for filtering the list of audits. The radio choices are various performance metrics (FCP, LCP, TBT), and if chosen, the audits in the report are hidden if they are not relevant to the selected metric.", +"type": "string" +}, +"snippetCollapseButtonLabel": { +"description": "The label for the button to show only a few lines of a snippet", +"type": "string" +}, +"snippetExpandButtonLabel": { +"description": "The label for the button to show all lines of a snippet", +"type": "string" +}, +"thirdPartyResourcesLabel": { +"description": "This label is for a filter checkbox above a table of items", +"type": "string" +}, +"throttlingProvided": { +"description": "Descriptive explanation for environment throttling that was provided by the runtime environment instead of provided by Lighthouse throttling.", +"type": "string" +}, +"toplevelWarningsMessage": { +"description": "The label shown preceding important warnings that may have invalidated an entire report.", +"type": "string" +}, +"varianceDisclaimer": { +"description": "The disclaimer shown below a performance metric value.", +"type": "string" +}, +"viewTreemapLabel": { +"description": "Label for a button that opens the Treemap App", +"type": "string" +}, +"warningAuditsGroupTitle": { +"description": "The heading that is shown above a list of audits that have warnings", +"type": "string" +}, +"warningHeader": { +"description": "The label shown above a bulleted list of warnings.", +"type": "string" +} +}, +"type": "object" +}, +"RuntimeError": { +"description": "Message containing a runtime error config.", +"id": "RuntimeError", +"properties": { +"code": { +"description": "The enumerated Lighthouse Error code.", +"type": "string" +}, +"message": { +"description": "A human readable message explaining the error code.", +"type": "string" +} +}, +"type": "object" +}, +"StackPack": { +"description": "Message containing Stack Pack information.", +"id": "StackPack", +"properties": { +"descriptions": { +"additionalProperties": { +"type": "string" +}, +"description": "The stack pack advice strings.", +"type": "object" +}, +"iconDataURL": { +"description": "The stack pack icon data uri.", +"type": "string" +}, +"id": { +"description": "The stack pack id.", +"type": "string" +}, +"title": { +"description": "The stack pack title.", +"type": "string" +} +}, +"type": "object" +}, +"Timing": { +"description": "Message containing the performance timing data for the Lighthouse run.", +"id": "Timing", +"properties": { +"total": { +"description": "The total duration of Lighthouse's run.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"UserPageLoadMetricV5": { +"description": "A CrUX metric object for a single metric and form factor.", +"id": "UserPageLoadMetricV5", +"properties": { +"category": { +"description": "The category of the specific time metric.", +"type": "string" +}, +"distributions": { +"description": "Metric distributions. Proportions should sum up to 1.", +"items": { +"$ref": "Bucket" +}, +"type": "array" +}, +"formFactor": { +"description": "Identifies the form factor of the metric being collected.", +"type": "string" +}, +"median": { +"description": "The median number of the metric, in millisecond.", +"format": "int32", +"type": "integer" +}, +"metricId": { +"description": "Identifies the type of the metric.", +"type": "string" +}, +"percentile": { +"description": "We use this field to store certain percentile value for this metric. For v4, this field contains pc50. For v5, this field contains pc90.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "PageSpeed Insights API", +"version": "v5", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/paymentsresellersubscription.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/paymentsresellersubscription.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..c9ed7b471c4a12b7cd8bf4a9ad95df3821886a87 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/paymentsresellersubscription.v1.json @@ -0,0 +1,1508 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"openid": { +"description": "Associate you with your personal info on Google" +} +} +} +}, +"basePath": "", +"baseUrl": "https://paymentsresellersubscription.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Payments Reseller Subscription", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/payments/reseller/subscription/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "paymentsresellersubscription:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://paymentsresellersubscription.mtls.googleapis.com/", +"name": "paymentsresellersubscription", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"partners": { +"resources": { +"products": { +"methods": { +"list": { +"description": "To retrieve the products that can be resold by the partner. It should be autenticated with a service account.", +"flatPath": "v1/partners/{partnersId}/products", +"httpMethod": "GET", +"id": "paymentsresellersubscription.partners.products.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Specifies the filters for the product results. The syntax is defined in https://google.aip.dev/160 with the following caveats: 1. Only the following features are supported: - Logical operator `AND` - Comparison operator `=` (no wildcards `*`) - Traversal operator `.` - Has operator `:` (no wildcards `*`) 2. Only the following fields are supported: - `regionCodes` - `youtubePayload.partnerEligibilityId` - `youtubePayload.postalCode` 3. Unless explicitly mentioned above, other features are not supported. Example: `regionCodes:US AND youtubePayload.postalCode=94043 AND youtubePayload.partnerEligibilityId=eligibility-id`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of products to return. The service may return fewer than this value. If unspecified, at most 50 products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListProducts` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListProducts` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, the partner that can resell. Format: partners/{partner}", +"location": "path", +"pattern": "^partners/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/products", +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse" +}, +"scopes": [ +"openid" +] +} +} +}, +"promotions": { +"methods": { +"findEligible": { +"description": "To find eligible promotions for the current user. The API requires user authorization via OAuth. The bare minimum oauth scope `openid` is sufficient, which will skip the consent screen.", +"flatPath": "v1/partners/{partnersId}/promotions:findEligible", +"httpMethod": "POST", +"id": "paymentsresellersubscription.partners.promotions.findEligible", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent, the partner that can resell. Format: partners/{partner}", +"location": "path", +"pattern": "^partners/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/promotions:findEligible", +"request": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest" +}, +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse" +}, +"scopes": [ +"openid" +] +}, +"list": { +"description": "To retrieve the promotions, such as free trial, that can be used by the partner. It should be autenticated with a service account.", +"flatPath": "v1/partners/{partnersId}/promotions", +"httpMethod": "GET", +"id": "paymentsresellersubscription.partners.promotions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Specifies the filters for the promotion results. The syntax is defined in https://google.aip.dev/160 with the following caveats: 1. Only the following features are supported: - Logical operator `AND` - Comparison operator `=` (no wildcards `*`) - Traversal operator `.` - Has operator `:` (no wildcards `*`) 2. Only the following fields are supported: - `applicableProducts` - `regionCodes` - `youtubePayload.partnerEligibilityId` - `youtubePayload.postalCode` 3. Unless explicitly mentioned above, other features are not supported. Example: `applicableProducts:partners/partner1/products/product1 AND regionCodes:US AND youtubePayload.postalCode=94043 AND youtubePayload.partnerEligibilityId=eligibility-id`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, the partner that can resell. Format: partners/{partner}", +"location": "path", +"pattern": "^partners/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/promotions", +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ListPromotionsResponse" +}, +"scopes": [ +"openid" +] +} +} +}, +"subscriptions": { +"methods": { +"cancel": { +"description": "Used by partners to cancel a subscription service either immediately or by the end of the current billing cycle for their customers. It should be called directly by the partner using service accounts.", +"flatPath": "v1/partners/{partnersId}/subscriptions/{subscriptionsId}:cancel", +"httpMethod": "POST", +"id": "paymentsresellersubscription.partners.subscriptions.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription resource to be cancelled. It will have the format of \"partners/{partner_id}/subscriptions/{subscription_id}\"", +"location": "path", +"pattern": "^partners/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest" +}, +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse" +}, +"scopes": [ +"openid" +] +}, +"create": { +"description": "Used by partners to create a subscription for their customers. The created subscription is associated with the end user inferred from the end user credentials. This API must be authorized by the end user using OAuth.", +"flatPath": "v1/partners/{partnersId}/subscriptions", +"httpMethod": "POST", +"id": "paymentsresellersubscription.partners.subscriptions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name, which is the identifier of the partner. It will have the format of \"partners/{partner_id}\".", +"location": "path", +"pattern": "^partners/[^/]+$", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscription_id, we will directly return that one.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/subscriptions", +"request": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription" +}, +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription" +}, +"scopes": [ +"openid" +] +}, +"entitle": { +"description": "Used by partners to entitle a previously provisioned subscription to the current end user. The end user identity is inferred from the authorized credential of the request. This API must be authorized by the end user using OAuth.", +"flatPath": "v1/partners/{partnersId}/subscriptions/{subscriptionsId}:entitle", +"httpMethod": "POST", +"id": "paymentsresellersubscription.partners.subscriptions.entitle", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription resource that is entitled to the current end user. It will have the format of \"partners/{partner_id}/subscriptions/{subscription_id}\"", +"location": "path", +"pattern": "^partners/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:entitle", +"request": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest" +}, +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse" +}, +"scopes": [ +"openid" +] +}, +"extend": { +"description": "[Opt-in only] Most partners should be on auto-extend by default. Used by partners to extend a subscription service for their customers on an ongoing basis for the subscription to remain active and renewable. It should be called directly by the partner using service accounts.", +"flatPath": "v1/partners/{partnersId}/subscriptions/{subscriptionsId}:extend", +"httpMethod": "POST", +"id": "paymentsresellersubscription.partners.subscriptions.extend", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription resource to be extended. It will have the format of \"partners/{partner_id}/subscriptions/{subscription_id}\".", +"location": "path", +"pattern": "^partners/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:extend", +"request": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest" +}, +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse" +}, +"scopes": [ +"openid" +] +}, +"get": { +"description": "Used by partners to get a subscription by id. It should be called directly by the partner using service accounts.", +"flatPath": "v1/partners/{partnersId}/subscriptions/{subscriptionsId}", +"httpMethod": "GET", +"id": "paymentsresellersubscription.partners.subscriptions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription resource to retrieve. It will have the format of \"partners/{partner_id}/subscriptions/{subscription_id}\"", +"location": "path", +"pattern": "^partners/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription" +}, +"scopes": [ +"openid" +] +}, +"provision": { +"description": "Used by partners to provision a subscription for their customers. This creates a subscription without associating it with the end user account. EntitleSubscription must be called separately using OAuth in order for the end user account to be associated with the subscription. It should be called directly by the partner using service accounts.", +"flatPath": "v1/partners/{partnersId}/subscriptions:provision", +"httpMethod": "POST", +"id": "paymentsresellersubscription.partners.subscriptions.provision", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name, which is the identifier of the partner. It will have the format of \"partners/{partner_id}\".", +"location": "path", +"pattern": "^partners/[^/]+$", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "Required. Identifies the subscription resource on the Partner side. The value is restricted to 63 ASCII characters at the maximum. If a subscription was previously created with the same subscription_id, we will directly return that one.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/subscriptions:provision", +"request": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription" +}, +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription" +}, +"scopes": [ +"openid" +] +}, +"undoCancel": { +"description": "Used by partners to revoke the pending cancellation of a subscription, which is currently in `STATE_CANCEL_AT_END_OF_CYCLE` state. If the subscription is already cancelled, the request will fail. It should be called directly by the partner using service accounts.", +"flatPath": "v1/partners/{partnersId}/subscriptions/{subscriptionsId}:undoCancel", +"httpMethod": "POST", +"id": "paymentsresellersubscription.partners.subscriptions.undoCancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription resource whose pending cancellation needs to be undone. It will have the format of \"partners/{partner_id}/subscriptions/{subscription_id}\"", +"location": "path", +"pattern": "^partners/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:undoCancel", +"request": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest" +}, +"response": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse" +}, +"scopes": [ +"openid" +] +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://paymentsresellersubscription.googleapis.com/", +"schemas": { +"GoogleCloudPaymentsResellerSubscriptionV1Amount": { +"description": "Describes the amount unit including the currency code.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1Amount", +"properties": { +"amountMicros": { +"description": "Required. Amount in micros (1_000_000 micros = 1 currency unit)", +"format": "int64", +"type": "string" +}, +"currencyCode": { +"description": "Required. Currency codes in accordance with [ISO-4217 Currency Codes] (https://en.wikipedia.org/wiki/ISO_4217). For example, USD.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest": { +"description": "Request to cancel a subscription.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionRequest", +"properties": { +"cancelImmediately": { +"description": "Optional. If true, Google will cancel the subscription immediately, and may or may not (based on the contract) issue a prorated refund for the remainder of the billing cycle. Otherwise, Google defers the cancelation at renewal_time, and will not issue a refund.", +"type": "boolean" +}, +"cancellationReason": { +"description": "Specifies the reason for the cancellation.", +"enum": [ +"CANCELLATION_REASON_UNSPECIFIED", +"CANCELLATION_REASON_FRAUD", +"CANCELLATION_REASON_REMORSE", +"CANCELLATION_REASON_ACCIDENTAL_PURCHASE", +"CANCELLATION_REASON_PAST_DUE", +"CANCELLATION_REASON_ACCOUNT_CLOSED", +"CANCELLATION_REASON_UPGRADE_DOWNGRADE", +"CANCELLATION_REASON_USER_DELINQUENCY", +"CANCELLATION_REASON_SYSTEM_ERROR", +"CANCELLATION_REASON_SYSTEM_CANCEL", +"CANCELLATION_REASON_OTHER" +], +"enumDescriptions": [ +"Reason is unspecified.", +"Fraudualant transaction.", +"Buyer's remorse.", +"Accidential purchase.", +"Payment is past due.", +"Used for notification only, do not use in Cancel API. User account closed.", +"Used for notification only, do not use in Cancel API. Cancellation due to upgrade or downgrade.", +"Cancellation due to user delinquency", +"Used for notification only, do not use in Cancel API. Cancellation due to an unrecoverable system error.", +"Used for notification only, do not use in Cancel API. The subscription is cancelled by Google automatically since it is no longer valid.", +"Other reason." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse": { +"description": "Response that contains the cancelled subscription resource.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1CancelSubscriptionResponse", +"properties": { +"subscription": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription", +"description": "The cancelled subscription resource." +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1Duration": { +"description": "Describes the length of a period of a time.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1Duration", +"properties": { +"count": { +"description": "number of duration units to be included.", +"format": "int32", +"type": "integer" +}, +"unit": { +"description": "The unit used for the duration", +"enum": [ +"UNIT_UNSPECIFIED", +"MONTH", +"DAY", +"HOUR" +], +"enumDescriptions": [ +"Default value, reserved as an invalid or an unexpected value.", +"Unit of a calendar month.", +"Unit of a day.", +"Unit of an hour. It is used for testing." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest": { +"description": "Partner request for entitling the previously provisioned subscription to an end user. The end user identity is inferred from the request OAuth context.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequest", +"properties": { +"lineItemEntitlementDetails": { +"description": "Optional. The line items to be entitled. If unspecified, all line items will be entitled.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails": { +"description": "The details of the line item to be entitled.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionRequestLineItemEntitlementDetails", +"properties": { +"lineItemIndex": { +"description": "Required. The index of the line item to be entitled.", +"format": "int32", +"type": "integer" +}, +"products": { +"description": "Optional. Only applicable if the line item corresponds to a hard bundle. Product resource names that identify the bundle elements to be entitled in the line item. If unspecified, all bundle elements will be entitled. The format is 'partners/{partner_id}/products/{product_id}'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse": { +"description": "Response that contains the entitled subscription resource.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1EntitleSubscriptionResponse", +"properties": { +"subscription": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription", +"description": "The subscription that has user linked to it." +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest": { +"description": "Request message for extending a Subscription resource. A new recurrence will be made based on the subscription schedule defined by the original product.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionRequest", +"properties": { +"extension": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Extension", +"description": "Required. Specifies details of the extension. Currently, the duration of the extension must be exactly one billing cycle of the original subscription." +}, +"requestId": { +"description": "Required. Restricted to 36 ASCII characters. A random UUID is recommended. The idempotency key for the request. The ID generation logic is controlled by the partner. request_id should be the same as on retries of the same request. A different request_id must be used for a extension of a different cycle.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse": { +"description": "Response that contains the timestamps after the extension.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ExtendSubscriptionResponse", +"properties": { +"cycleEndTime": { +"description": "The time at which the subscription is expected to be extended, in ISO 8061 format. UTC timezone. Example, \"cycleEndTime\":\"2019-08-31T17:28:54.564Z\"", +"format": "google-datetime", +"type": "string" +}, +"freeTrialEndTime": { +"description": "End of the free trial period, in ISO 8061 format. UTC timezone. Example, \"freeTrialEndTime\":\"2019-08-31T17:28:54.564Z\" This time will be set the same as initial subscription creation time if no free trial period is offered to the partner.", +"format": "google-datetime", +"type": "string" +}, +"renewalTime": { +"description": "Output only. The time at which the subscription is expected to be renewed by Google - a new charge will be incurred and the service entitlement will be renewed. A non-immediate cancellation will take place at this time too, before which, the service entitlement for the end user will remain valid. UTC timezone in ISO 8061 format. For example: \"2019-08-31T17:28:54.564Z\"", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1Extension": { +"description": "Describes the details of an extension request.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1Extension", +"properties": { +"duration": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Duration", +"description": "Required. Specifies the period of access the subscription should grant." +}, +"partnerUserToken": { +"description": "Required. Identifier of the end-user in partner\u2019s system.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest": { +"description": "Request to find eligible promotions for the current user.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsRequest", +"properties": { +"filter": { +"description": "Optional. Specifies the filters for the promotion results. The syntax is defined in https://google.aip.dev/160 with the following caveats: 1. Only the following features are supported: - Logical operator `AND` - Comparison operator `=` (no wildcards `*`) - Traversal operator `.` - Has operator `:` (no wildcards `*`) 2. Only the following fields are supported: - `applicableProducts` - `regionCodes` - `youtubePayload.partnerEligibilityId` - `youtubePayload.postalCode` 3. Unless explicitly mentioned above, other features are not supported. Example: `applicableProducts:partners/partner1/products/product1 AND regionCodes:US AND youtubePayload.postalCode=94043 AND youtubePayload.partnerEligibilityId=eligibility-id`", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of promotions to return. The service may return fewer than this value. If unspecified, at most 50 products will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListPromotions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPromotions` must match the call that provided the page token.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse": { +"description": "Response containing the found promotions for the current user.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1FindEligiblePromotionsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages.", +"type": "string" +}, +"promotions": { +"description": "The promotions for the current user.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Promotion" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1FiniteBillingCycleDetails": { +"description": "Details for a subscriptiin line item with finite billing cycles.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1FiniteBillingCycleDetails", +"properties": { +"billingCycleCountLimit": { +"description": "Required. The number of a subscription line item billing cycles after which billing will stop automatically.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1GoogleOnePayload": { +"description": "Payload specific to Google One products.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1GoogleOnePayload", +"properties": { +"campaigns": { +"description": "Campaign attributed to sales of this subscription.", +"items": { +"type": "string" +}, +"type": "array" +}, +"offering": { +"description": "The type of offering the subscription was sold by the partner. e.g. VAS.", +"enum": [ +"OFFERING_UNSPECIFIED", +"OFFERING_VAS_BUNDLE", +"OFFERING_VAS_STANDALONE", +"OFFERING_HARD_BUNDLE", +"OFFERING_SOFT_BUNDLE" +], +"enumDescriptions": [ +"The type of partner offering is unspecified.", +"Google One product purchased as a Value added service in addition to existing partner's products. Customer pays additional amount for Google One product.", +"Google One product purchased by itself by customer as a value add service. Customer pays additional amount for Google One product.", +"Product purchased as part of a hard bundle where Google One was included with the bundle. Google One pricing is included in the bundle.", +"Purchased as part of a bundle where Google One was provided as an option. Google One pricing is included in the bundle." +], +"type": "string" +}, +"salesChannel": { +"description": "The type of sales channel through which the subscription was sold.", +"enum": [ +"CHANNEL_UNSPECIFIED", +"CHANNEL_RETAIL", +"CHANNEL_ONLINE_WEB", +"CHANNEL_ONLINE_ANDROID_APP", +"CHANNEL_ONLINE_IOS_APP" +], +"enumDescriptions": [ +"The channel type is unspecified.", +"Sold at store.", +"Sold through partner website.", +"Sold through partner android app.", +"Sold through partner iOS app." +], +"type": "string" +}, +"storeId": { +"description": "The identifier for the partner store where the subscription was sold.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse": { +"description": "Response that contains the products.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ListProductsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages.", +"type": "string" +}, +"products": { +"description": "The products for the specified partner.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Product" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ListPromotionsResponse": { +"description": "Response that contains the promotions.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ListPromotionsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages.", +"type": "string" +}, +"promotions": { +"description": "The promotions for the specified partner.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Promotion" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1Location": { +"description": "Describes a location of an end user.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1Location", +"properties": { +"postalCode": { +"description": "The postal code this location refers to. Ex. \"94043\"", +"type": "string" +}, +"regionCode": { +"description": "2-letter ISO region code for current content region. Ex. \u201cUS\u201d Please refers to: https://en.wikipedia.org/wiki/ISO_3166-1", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1Product": { +"description": "A Product resource that defines a subscription service that can be resold.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1Product", +"properties": { +"bundleDetails": { +"$ref": "ProductBundleDetails", +"description": "Output only. Output Only. Specifies the details for a bundle product.", +"readOnly": true +}, +"finiteBillingCycleDetails": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1FiniteBillingCycleDetails", +"description": "Optional. Details for a subscription line item with finite billing cycles. If unset, the line item will be charged indefinitely." +}, +"name": { +"description": "Identifier. Response only. Resource name of the product. It will have the format of \"partners/{partner_id}/products/{product_id}\"", +"type": "string" +}, +"priceConfigs": { +"description": "Output only. Price configs for the product in the available regions.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ProductPriceConfig" +}, +"readOnly": true, +"type": "array" +}, +"productType": { +"description": "Output only. Output Only. Specifies the type of the product.", +"enum": [ +"PRODUCT_TYPE_UNSPECIFIED", +"PRODUCT_TYPE_SUBSCRIPTION", +"PRODUCT_TYPE_BUNDLE_SUBSCRIPTION" +], +"enumDescriptions": [ +"Unspecified. It's reserved as an unexpected value, should not be used.", +"The product is a subscription.", +"The product is a bundled subscription plan, which includes multiple subscription elements." +], +"readOnly": true, +"type": "string" +}, +"regionCodes": { +"description": "Output only. 2-letter ISO region code where the product is available in. Ex. \"US\" Please refers to: https://en.wikipedia.org/wiki/ISO_3166-1", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"subscriptionBillingCycleDuration": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Duration", +"description": "Output only. Specifies the length of the billing cycle of the subscription.", +"readOnly": true +}, +"titles": { +"description": "Output only. Localized human readable name of the product.", +"items": { +"$ref": "GoogleTypeLocalizedText" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ProductBundleDetailsBundleElement": { +"description": "The individual product that is included in the bundle.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ProductBundleDetailsBundleElement", +"properties": { +"product": { +"description": "Required. Output only. Product resource name that identifies the bundle element. The format is 'partners/{partner_id}/products/{product_id}'.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ProductPayload": { +"description": "Specifies product specific payload.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ProductPayload", +"properties": { +"googleOnePayload": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1GoogleOnePayload", +"description": "Product-specific payloads. Payload specific to Google One products." +}, +"youtubePayload": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1YoutubePayload", +"description": "Payload specific to Youtube products." +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ProductPriceConfig": { +"description": "Configs the prices in an available region.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ProductPriceConfig", +"properties": { +"amount": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Amount", +"description": "Output only. The price in the region.", +"readOnly": true +}, +"regionCode": { +"description": "Output only. 2-letter ISO region code where the product is available in. Ex. \"US\".", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1Promotion": { +"description": "A Promotion resource that defines a promotion for a subscription that can be resold.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1Promotion", +"properties": { +"applicableProducts": { +"description": "Output only. The product ids this promotion can be applied to.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"endTime": { +"description": "Optional. Specifies the end time (exclusive) of the period that the promotion is available in. If unset, the promotion is available indefinitely.", +"format": "google-datetime", +"type": "string" +}, +"freeTrialDuration": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Duration", +"description": "Optional. Specifies the duration of the free trial of the subscription when promotion_type is PROMOTION_TYPE_FREE_TRIAL" +}, +"introductoryPricingDetails": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails", +"description": "Optional. Specifies the introductory pricing details when the promotion_type is PROMOTION_TYPE_INTRODUCTORY_PRICING." +}, +"name": { +"description": "Identifier. Response only. Resource name of the subscription promotion. It will have the format of \"partners/{partner_id}/promotion/{promotion_id}\"", +"type": "string" +}, +"promotionType": { +"description": "Output only. Output Only. Specifies the type of the promotion.", +"enum": [ +"PROMOTION_TYPE_UNSPECIFIED", +"PROMOTION_TYPE_FREE_TRIAL", +"PROMOTION_TYPE_INTRODUCTORY_PRICING" +], +"enumDescriptions": [ +"The promotion type is unspecified.", +"The promotion is a free trial.", +"The promotion is a reduced introductory pricing." +], +"readOnly": true, +"type": "string" +}, +"regionCodes": { +"description": "Output only. 2-letter ISO region code where the promotion is available in. Ex. \"US\" Please refers to: https://en.wikipedia.org/wiki/ISO_3166-1", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"startTime": { +"description": "Optional. Specifies the start time (inclusive) of the period that the promotion is available in.", +"format": "google-datetime", +"type": "string" +}, +"titles": { +"description": "Output only. Localized human readable name of the promotion.", +"items": { +"$ref": "GoogleTypeLocalizedText" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails": { +"description": "The details of a introductory pricing promotion.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails", +"properties": { +"introductoryPricingSpecs": { +"description": "Output only. Specifies the introductory pricing periods.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetailsIntroductoryPricingSpec" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetailsIntroductoryPricingSpec": { +"description": "The duration of an introductory pricing promotion.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetailsIntroductoryPricingSpec", +"properties": { +"discountAmount": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Amount", +"description": "Output only. The discount amount. The value is positive.", +"readOnly": true +}, +"discountRatioMicros": { +"description": "Output only. The discount percentage in micros. For example, 50,000 represents 5%.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"recurrenceCount": { +"description": "Output only. Output Only. The duration of an introductory offer in billing cycles.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"regionCode": { +"description": "Output only. 2-letter ISO region code where the product is available in. Ex. \"US\".", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1ServicePeriod": { +"description": "A description of what time period or moment in time the product or service is being delivered over.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1ServicePeriod", +"properties": { +"endTime": { +"description": "Optional. The end time of the service period. Time is exclusive.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Required. The start time of the service period. Time is inclusive.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1Subscription": { +"description": "A subscription serves as a central billing entity between an external partner and Google. The underlying Google services rely on the subscription state to grant or revoke the user's service entitlement. It's important to note that the subscription state may not always perfectly align with the user's service entitlement. For example, some Google services may continue providing access to the user until the current billing cycle ends, even if the subscription has been immediately canceled. However, other services may not do the same. To fully understand the specific details, please consult the relevant contract or product policy.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1Subscription", +"properties": { +"cancellationDetails": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionCancellationDetails", +"description": "Output only. Describes the details of a cancelled subscription. Only applicable to subscription of state `STATE_CANCELLED`.", +"readOnly": true +}, +"createTime": { +"description": "Output only. System generated timestamp when the subscription is created. UTC timezone.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"cycleEndTime": { +"description": "Output only. The time at which the subscription is expected to be extended, in ISO 8061 format. UTC timezone. For example: \"2019-08-31T17:28:54.564Z\"", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endUserEntitled": { +"description": "Output only. Indicates if the subscription is entitled to the end user.", +"readOnly": true, +"type": "boolean" +}, +"freeTrialEndTime": { +"description": "Output only. End of the free trial period, in ISO 8061 format. For example, \"2019-08-31T17:28:54.564Z\". It will be set the same as createTime if no free trial promotion is specified.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"lineItems": { +"description": "Required. The line items of the subscription.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem" +}, +"type": "array" +}, +"name": { +"description": "Identifier. Resource name of the subscription. It will have the format of \"partners/{partner_id}/subscriptions/{subscription_id}\". This is available for authorizeAddon, but otherwise is response only.", +"type": "string" +}, +"partnerUserToken": { +"description": "Required. Identifier of the end-user in partner\u2019s system. The value is restricted to 63 ASCII characters at the maximum.", +"type": "string" +}, +"processingState": { +"description": "Output only. Describes the processing state of the subscription. See more details at [the lifecycle of a subscription](/payments/reseller/subscription/reference/index/Receive.Notifications#payments-subscription-lifecycle).", +"enum": [ +"PROCESSING_STATE_UNSPECIFIED", +"PROCESSING_STATE_CANCELLING", +"PROCESSING_STATE_RECURRING" +], +"enumDescriptions": [ +"The processing state is unspecified.", +"The subscription is being cancelled.", +"The subscription is recurring." +], +"readOnly": true, +"type": "string" +}, +"products": { +"description": "Optional. Deprecated: consider using `line_items` as the input. Required. Resource name that identifies the purchased products. The format will be 'partners/{partner_id}/products/{product_id}'.", +"items": { +"type": "string" +}, +"type": "array" +}, +"promotionSpecs": { +"description": "Optional. Subscription-level promotions. Only free trial is supported on this level. It determines the first renewal time of the subscription to be the end of the free trial period. Specify the promotion resource name only when used as input.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec" +}, +"type": "array" +}, +"promotions": { +"description": "Optional. Deprecated: consider using the top-level `promotion_specs` as the input. Optional. Resource name that identifies one or more promotions that can be applied on the product. A typical promotion for a subscription is Free trial. The format will be 'partners/{partner_id}/promotions/{promotion_id}'.", +"items": { +"type": "string" +}, +"type": "array" +}, +"purchaseTime": { +"description": "Optional. The timestamp when the user transaction was made with the Partner. Specify for the case of \"bundle with choice\", and it must be before the provision_time (when the user makes a selection).", +"format": "google-datetime", +"type": "string" +}, +"redirectUri": { +"description": "Output only. The place where partners should redirect the end-user to after creation. This field might also be populated when creation failed. However, Partners should always prepare a default URL to redirect the user in case this field is empty.", +"readOnly": true, +"type": "string" +}, +"renewalTime": { +"description": "Output only. The time at which the subscription is expected to be renewed by Google - a new charge will be incurred and the service entitlement will be renewed. A non-immediate cancellation will take place at this time too, before which, the service entitlement for the end user will remain valid. UTC timezone in ISO 8061 format. For example: \"2019-08-31T17:28:54.564Z\"", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"serviceLocation": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Location", +"description": "Required. The location that the service is provided as indicated by the partner." +}, +"state": { +"description": "Output only. Describes the state of the subscription. See more details at [the lifecycle of a subscription](/payments/reseller/subscription/reference/index/Receive.Notifications#payments-subscription-lifecycle).", +"enum": [ +"STATE_UNSPECIFIED", +"STATE_CREATED", +"STATE_ACTIVE", +"STATE_CANCELLED", +"STATE_IN_GRACE_PERIOD", +"STATE_CANCEL_AT_END_OF_CYCLE", +"STATE_SUSPENDED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The subscription is created, a state before it is moved to STATE_ACTIVE.", +"The subscription is active.", +"The subscription is cancelled. This is the final state of the subscription, as it can no longer be modified or reactivated.", +"The subscription is in grace period. It can happen: 1) in manual extend mode, the subscription is not extended by the partner at the end of current cycle. 2) for outbound authorization enabled partners, a renewal purchase order is rejected.", +"The subscription is waiting to be cancelled by the next recurrence cycle.", +"The subscription is suspended." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. System generated timestamp when the subscription is most recently updated. UTC timezone.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upgradeDowngradeDetails": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionUpgradeDowngradeDetails", +"description": "Optional. Details about the previous subscription that this new subscription upgrades/downgrades from. Only populated if this subscription is an upgrade/downgrade from another subscription." +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1SubscriptionCancellationDetails": { +"description": "Describes the details of a cancelled or cancelling subscription.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionCancellationDetails", +"properties": { +"reason": { +"description": "Output only. The reason of the cancellation.", +"enum": [ +"CANCELLATION_REASON_UNSPECIFIED", +"CANCELLATION_REASON_FRAUD", +"CANCELLATION_REASON_REMORSE", +"CANCELLATION_REASON_ACCIDENTAL_PURCHASE", +"CANCELLATION_REASON_PAST_DUE", +"CANCELLATION_REASON_ACCOUNT_CLOSED", +"CANCELLATION_REASON_UPGRADE_DOWNGRADE", +"CANCELLATION_REASON_USER_DELINQUENCY", +"CANCELLATION_REASON_SYSTEM_ERROR", +"CANCELLATION_REASON_SYSTEM_CANCEL", +"CANCELLATION_REASON_OTHER" +], +"enumDescriptions": [ +"Reason is unspecified.", +"Fraudualant transaction.", +"Buyer's remorse.", +"Accidential purchase.", +"Payment is past due.", +"Used for notification only, do not use in Cancel API. User account closed.", +"Used for notification only, do not use in Cancel API. Cancellation due to upgrade or downgrade.", +"Cancellation due to user delinquency", +"Used for notification only, do not use in Cancel API. Cancellation due to an unrecoverable system error.", +"Used for notification only, do not use in Cancel API. The subscription is cancelled by Google automatically since it is no longer valid.", +"Other reason." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem": { +"description": "Individual line item definition of a subscription.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItem", +"properties": { +"amount": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Amount", +"description": "Output only. The price of the product/service in this line item. The amount could be the wholesale price, or it can include a cost of sale based on the contract.", +"readOnly": true +}, +"bundleDetails": { +"$ref": "SubscriptionLineItemBundleDetails", +"description": "Output only. The bundle details for the line item. Only populated if the line item corresponds to a hard bundle.", +"readOnly": true +}, +"description": { +"description": "Output only. Description of this line item.", +"readOnly": true, +"type": "string" +}, +"finiteBillingCycleDetails": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1FiniteBillingCycleDetails", +"description": "Optional. Details for a subscription line item with finite billing cycles. If unset, the line item will be charged indefinitely. Used only with LINE_ITEM_RECURRENCE_TYPE_PERIODIC." +}, +"lineItemFreeTrialEndTime": { +"description": "Output only. The free trial end time will be populated after the line item is successfully processed. End time of the line item free trial period, in ISO 8061 format. For example, \"2019-08-31T17:28:54.564Z\". It will be set the same as createTime if no free trial promotion is specified.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"lineItemIndex": { +"description": "Output only. A unique index of the subscription line item.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"lineItemPromotionSpecs": { +"description": "Optional. The promotions applied on the line item. It can be: - an introductory pricing promotion. - a free trial promotion. This feature is not enabled. If used, the request will be rejected. When used as input in Create or Provision API, specify its resource name only.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec" +}, +"type": "array" +}, +"oneTimeRecurrenceDetails": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItemOneTimeRecurrenceDetails", +"description": "Output only. Details only set for a ONE_TIME recurrence line item.", +"readOnly": true +}, +"product": { +"description": "Required. Product resource name that identifies one the line item The format is 'partners/{partner_id}/products/{product_id}'.", +"type": "string" +}, +"productPayload": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ProductPayload", +"description": "Optional. Product specific payload for this line item." +}, +"recurrenceType": { +"description": "Output only. The recurrence type of the line item.", +"enum": [ +"LINE_ITEM_RECURRENCE_TYPE_UNSPECIFIED", +"LINE_ITEM_RECURRENCE_TYPE_PERIODIC", +"LINE_ITEM_RECURRENCE_TYPE_ONE_TIME" +], +"enumDescriptions": [ +"The line item recurrence type is unspecified.", +"The line item recurs periodically.", +"The line item does not recur in the future." +], +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the line item.", +"enum": [ +"LINE_ITEM_STATE_UNSPECIFIED", +"LINE_ITEM_STATE_ACTIVE", +"LINE_ITEM_STATE_INACTIVE", +"LINE_ITEM_STATE_NEW", +"LINE_ITEM_STATE_ACTIVATING", +"LINE_ITEM_STATE_DEACTIVATING", +"LINE_ITEM_STATE_WAITING_TO_DEACTIVATE", +"LINE_ITEM_STATE_OFF_CYCLE_CHARGING" +], +"enumDescriptions": [ +"Unspecified state.", +"The line item is in ACTIVE state. If the subscription is cancelled or suspended, the line item will not be charged even if the line item is active.", +"The line item is in INACTIVE state.", +"The line item is new, and is not activated or charged yet.", +"The line item is being activated in order to be charged. If a free trial applies to the line item, the line item is pending a prorated charge at the end of the free trial period, as indicated by `line_item_free_trial_end_time`.", +"The line item is being deactivated, and a prorated refund in being processed.", +"The line item is scheduled to be deactivated at the end of the current cycle.", +"Line item is being charged off-cycle." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItemBundleDetailsBundleElementDetails": { +"description": "The details for an element in the hard bundle.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItemBundleDetailsBundleElementDetails", +"properties": { +"product": { +"description": "Output only. Product resource name that identifies the bundle element. The format is 'partners/{partner_id}/products/{product_id}'.", +"readOnly": true, +"type": "string" +}, +"userAccountLinkedTime": { +"description": "Output only. The time when this product is linked to an end user.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItemOneTimeRecurrenceDetails": { +"description": "Details for a ONE_TIME recurrence line item.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItemOneTimeRecurrenceDetails", +"properties": { +"servicePeriod": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ServicePeriod", +"description": "Output only. The service period of the ONE_TIME line item.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec": { +"description": "Describes the spec for one promotion.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionPromotionSpec", +"properties": { +"freeTrialDuration": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Duration", +"description": "Output only. The duration of the free trial if the promotion is of type FREE_TRIAL.", +"readOnly": true +}, +"introductoryPricingDetails": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails", +"description": "Output only. The details of the introductory pricing spec if the promotion is of type INTRODUCTORY_PRICING.", +"readOnly": true +}, +"promotion": { +"description": "Required. Promotion resource name that identifies a promotion. The format is 'partners/{partner_id}/promotions/{promotion_id}'.", +"type": "string" +}, +"type": { +"description": "Output only. The type of the promotion for the spec.", +"enum": [ +"PROMOTION_TYPE_UNSPECIFIED", +"PROMOTION_TYPE_FREE_TRIAL", +"PROMOTION_TYPE_INTRODUCTORY_PRICING" +], +"enumDescriptions": [ +"The promotion type is unspecified.", +"The promotion is a free trial.", +"The promotion is a reduced introductory pricing." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1SubscriptionUpgradeDowngradeDetails": { +"description": "Details about the previous subscription that this new subscription upgrades/downgrades from.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionUpgradeDowngradeDetails", +"properties": { +"billingCycleSpec": { +"description": "Required. Specifies the billing cycle spec for the new upgraded/downgraded subscription.", +"enum": [ +"BILLING_CYCLE_SPEC_UNSPECIFIED", +"BILLING_CYCLE_SPEC_ALIGN_WITH_PREVIOUS_SUBSCRIPTION", +"BILLING_CYCLE_SPEC_START_IMMEDIATELY" +], +"enumDescriptions": [ +"Billing cycle spec is not specified.", +"The billing cycle of the new subscription aligns with the previous subscription it upgrades or downgrades from.", +"The billing cycle of the new subscription starts immediately." +], +"type": "string" +}, +"previousSubscriptionId": { +"description": "Required. The previous subscription id to be replaced. This is not the full resource name, use the subscription_id segment only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest": { +"description": "Request to revoke a cancellation request.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse": { +"description": "Response that contains the updated subscription resource.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1UndoCancelSubscriptionResponse", +"properties": { +"subscription": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1Subscription", +"description": "The updated subscription resource." +} +}, +"type": "object" +}, +"GoogleCloudPaymentsResellerSubscriptionV1YoutubePayload": { +"description": "Payload specific to Youtube products.", +"id": "GoogleCloudPaymentsResellerSubscriptionV1YoutubePayload", +"properties": { +"accessEndTime": { +"description": "Output only. The access expiration time for this line item.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"partnerEligibilityIds": { +"description": "The list of eligibility_ids which are applicable for the line item.", +"items": { +"type": "string" +}, +"type": "array" +}, +"partnerPlanType": { +"description": "Optional. Specifies the plan type offered to the end user by the partner.", +"enum": [ +"PARTNER_PLAN_TYPE_UNSPECIFIED", +"PARTNER_PLAN_TYPE_STANDALONE", +"PARTNER_PLAN_TYPE_HARD_BUNDLE", +"PARTNER_PLAN_TYPE_SOFT_BUNDLE" +], +"enumDescriptions": [ +"Unspecified. Should not use, reserved as an invalid value.", +"This item is offered as a standalone product to the user.", +"This item is bundled with another partner offering, the item is provisioned at purchase time.", +"This item is bundled with another partner offering, the item is provisioned after puchase, when the user opts in this Google service." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeLocalizedText": { +"description": "Localized variant of a text in a particular language.", +"id": "GoogleTypeLocalizedText", +"properties": { +"languageCode": { +"description": "The text's BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"text": { +"description": "Localized string in the language corresponding to language_code below.", +"type": "string" +} +}, +"type": "object" +}, +"ProductBundleDetails": { +"description": "Details for a bundle product.", +"id": "ProductBundleDetails", +"properties": { +"bundleElements": { +"description": "The individual products that are included in the bundle.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1ProductBundleDetailsBundleElement" +}, +"type": "array" +}, +"entitlementMode": { +"description": "The entitlement mode of the bundle product.", +"enum": [ +"ENTITLEMENT_MODE_UNSPECIFIED", +"ENTITLEMENT_MODE_FULL", +"ENTITLEMENT_MODE_INCREMENTAL" +], +"enumDescriptions": [ +"Unspecified. It's reserved as an unexpected value, should not be used.", +"All the bundle elements must be fully activated in a single request.", +"The bundle elements could be incrementally activated." +], +"type": "string" +} +}, +"type": "object" +}, +"SubscriptionLineItemBundleDetails": { +"description": "The bundle details for a line item corresponding to a hard bundle.", +"id": "SubscriptionLineItemBundleDetails", +"properties": { +"bundleElementDetails": { +"description": "Output only. The details for each element in the hard bundle.", +"items": { +"$ref": "GoogleCloudPaymentsResellerSubscriptionV1SubscriptionLineItemBundleDetailsBundleElementDetails" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Payments Reseller Subscription API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/people.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/people.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..d0e4525d0345b27724f539fc503cefa0b96b7835 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/people.v1.json @@ -0,0 +1,3313 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/contacts": { +"description": "See, edit, download, and permanently delete your contacts" +}, +"https://www.googleapis.com/auth/contacts.other.readonly": { +"description": "See and download contact info automatically saved in your \"Other contacts\"" +}, +"https://www.googleapis.com/auth/contacts.readonly": { +"description": "See and download your contacts" +}, +"https://www.googleapis.com/auth/directory.readonly": { +"description": "See and download your organization's GSuite directory" +}, +"https://www.googleapis.com/auth/user.addresses.read": { +"description": "View your street addresses" +}, +"https://www.googleapis.com/auth/user.birthday.read": { +"description": "See and download your exact date of birth" +}, +"https://www.googleapis.com/auth/user.emails.read": { +"description": "See and download all of your Google Account email addresses" +}, +"https://www.googleapis.com/auth/user.gender.read": { +"description": "See your gender" +}, +"https://www.googleapis.com/auth/user.organization.read": { +"description": "See your education, work history and org info" +}, +"https://www.googleapis.com/auth/user.phonenumbers.read": { +"description": "See and download your personal phone numbers" +}, +"https://www.googleapis.com/auth/userinfo.email": { +"description": "See your primary Google Account email address" +}, +"https://www.googleapis.com/auth/userinfo.profile": { +"description": "See your personal info, including any personal info you've made publicly available" +} +} +} +}, +"basePath": "", +"baseUrl": "https://people.googleapis.com/", +"batchPath": "batch", +"canonicalName": "People Service", +"description": "Provides access to information about profiles and contacts.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/people/", +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "people:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://people.mtls.googleapis.com/", +"name": "people", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"contactGroups": { +"methods": { +"batchGet": { +"description": "Get a list of contact groups owned by the authenticated user by specifying a list of contact group resource names.", +"flatPath": "v1/contactGroups:batchGet", +"httpMethod": "GET", +"id": "people.contactGroups.batchGet", +"parameterOrder": [], +"parameters": { +"groupFields": { +"description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"maxMembers": { +"description": "Optional. Specifies the maximum number of members to return for each group. Defaults to 0 if not set, which will return zero members.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resourceNames": { +"description": "Required. The resource names of the contact groups to get. There is a maximum of 200 resource names.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/contactGroups:batchGet", +"response": { +"$ref": "BatchGetContactGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.readonly" +] +}, +"create": { +"description": "Create a new contact group owned by the authenticated user. Created contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/contactGroups", +"httpMethod": "POST", +"id": "people.contactGroups.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/contactGroups", +"request": { +"$ref": "CreateContactGroupRequest" +}, +"response": { +"$ref": "ContactGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"delete": { +"description": "Delete an existing contact group owned by the authenticated user by specifying a contact group resource name. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/contactGroups/{contactGroupsId}", +"httpMethod": "DELETE", +"id": "people.contactGroups.delete", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"deleteContacts": { +"description": "Optional. Set to true to also delete the contacts in the specified group.", +"location": "query", +"type": "boolean" +}, +"resourceName": { +"description": "Required. The resource name of the contact group to delete.", +"location": "path", +"pattern": "^contactGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"get": { +"description": "Get a specific contact group owned by the authenticated user by specifying a contact group resource name.", +"flatPath": "v1/contactGroups/{contactGroupsId}", +"httpMethod": "GET", +"id": "people.contactGroups.get", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"groupFields": { +"description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"maxMembers": { +"description": "Optional. Specifies the maximum number of members to return. Defaults to 0 if not set, which will return zero members.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resourceName": { +"description": "Required. The resource name of the contact group to get.", +"location": "path", +"pattern": "^contactGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}", +"response": { +"$ref": "ContactGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.readonly" +] +}, +"list": { +"description": "List all contact groups owned by the authenticated user. Members of the contact groups are not populated.", +"flatPath": "v1/contactGroups", +"httpMethod": "GET", +"id": "people.contactGroups.list", +"parameterOrder": [], +"parameters": { +"groupFields": { +"description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, `memberCount`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of resources to return. Valid values are between 1 and 1000, inclusive. Defaults to 30 if not set or set to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous call to [ListContactGroups](/people/api/rest/v1/contactgroups/list). Requests the next page of resources.", +"location": "query", +"type": "string" +}, +"syncToken": { +"description": "Optional. A sync token, returned by a previous call to `contactgroups.list`. Only resources changed since the sync token was created will be returned.", +"location": "query", +"type": "string" +} +}, +"path": "v1/contactGroups", +"response": { +"$ref": "ListContactGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.readonly" +] +}, +"update": { +"description": "Update the name of an existing contact group owned by the authenticated user. Updated contact group names must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/contactGroups/{contactGroupsId}", +"httpMethod": "PUT", +"id": "people.contactGroups.update", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"resourceName": { +"description": "The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contact_group_id}`.", +"location": "path", +"pattern": "^contactGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}", +"request": { +"$ref": "UpdateContactGroupRequest" +}, +"response": { +"$ref": "ContactGroup" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +} +}, +"resources": { +"members": { +"methods": { +"modify": { +"description": "Modify the members of a contact group owned by the authenticated user. The only system contact groups that can have members added are `contactGroups/myContacts` and `contactGroups/starred`. Other system contact groups are deprecated and can only have contacts removed.", +"flatPath": "v1/contactGroups/{contactGroupsId}/members:modify", +"httpMethod": "POST", +"id": "people.contactGroups.members.modify", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"resourceName": { +"description": "Required. The resource name of the contact group to modify.", +"location": "path", +"pattern": "^contactGroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}/members:modify", +"request": { +"$ref": "ModifyContactGroupMembersRequest" +}, +"response": { +"$ref": "ModifyContactGroupMembersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +} +} +} +} +}, +"otherContacts": { +"methods": { +"copyOtherContactToMyContactsGroup": { +"description": "Copies an \"Other contact\" to a new contact in the user's \"myContacts\" group Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/otherContacts/{otherContactsId}:copyOtherContactToMyContactsGroup", +"httpMethod": "POST", +"id": "people.otherContacts.copyOtherContactToMyContactsGroup", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"resourceName": { +"description": "Required. The resource name of the \"Other contact\" to copy.", +"location": "path", +"pattern": "^otherContacts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}:copyOtherContactToMyContactsGroup", +"request": { +"$ref": "CopyOtherContactToMyContactsGroupRequest" +}, +"response": { +"$ref": "Person" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.other.readonly" +] +}, +"list": { +"description": "List all \"Other contacts\", that is contacts that are not in a contact group. \"Other contacts\" are typically auto created contacts from interactions. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an [google.rpc.ErrorInfo](https://cloud.google.com/apis/design/errors#error_info) with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's other contacts that have changed](/people/v1/other-contacts#list_the_users_other_contacts_that_have_changed).", +"flatPath": "v1/otherContacts", +"httpMethod": "GET", +"id": "people.otherContacts.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "Optional. The number of \"Other contacts\" to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `otherContacts.list` must match the first call that provided the page token.", +"location": "query", +"type": "string" +}, +"readMask": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. What values are valid depend on what ReadSourceType is used. If READ_SOURCE_TYPE_CONTACT is used, valid values are: * emailAddresses * metadata * names * phoneNumbers * photos If READ_SOURCE_TYPE_PROFILE is used, valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"requestSyncToken": { +"description": "Optional. Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `otherContacts.list`.", +"location": "query", +"type": "boolean" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set. Possible values for this field are: * READ_SOURCE_TYPE_CONTACT * READ_SOURCE_TYPE_CONTACT,READ_SOURCE_TYPE_PROFILE Specifying READ_SOURCE_TYPE_PROFILE without specifying READ_SOURCE_TYPE_CONTACT is not permitted.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"syncToken": { +"description": "Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `otherContacts.list` must match the first call that provided the sync token. More details about sync behavior at `otherContacts.list`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/otherContacts", +"response": { +"$ref": "ListOtherContactsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts.other.readonly" +] +}, +"search": { +"description": "Provides a list of contacts in the authenticated user's other contacts that matches the search query. The query matches on a contact's `names`, `emailAddresses`, and `phoneNumbers` fields that are from the OTHER_CONTACT source. **IMPORTANT**: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/other-contacts#search_the_users_other_contacts", +"flatPath": "v1/otherContacts:search", +"httpMethod": "GET", +"id": "people.otherContacts.search", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "Optional. The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"query": { +"description": "Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name \"foo name\" matches queries such as \"f\", \"fo\", \"foo\", \"foo n\", \"nam\", etc., but not \"oo n\".", +"location": "query", +"type": "string" +}, +"readMask": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * emailAddresses * metadata * names * phoneNumbers", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/otherContacts:search", +"response": { +"$ref": "SearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts.other.readonly" +] +} +} +}, +"people": { +"methods": { +"batchCreateContacts": { +"description": "Create a batch of new contacts and return the PersonResponses for the newly Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/people:batchCreateContacts", +"httpMethod": "POST", +"id": "people.people.batchCreateContacts", +"parameterOrder": [], +"parameters": {}, +"path": "v1/people:batchCreateContacts", +"request": { +"$ref": "BatchCreateContactsRequest" +}, +"response": { +"$ref": "BatchCreateContactsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"batchDeleteContacts": { +"description": "Delete a batch of contacts. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/people:batchDeleteContacts", +"httpMethod": "POST", +"id": "people.people.batchDeleteContacts", +"parameterOrder": [], +"parameters": {}, +"path": "v1/people:batchDeleteContacts", +"request": { +"$ref": "BatchDeleteContactsRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"batchUpdateContacts": { +"description": "Update a batch of contacts and return a map of resource names to PersonResponses for the updated contacts. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/people:batchUpdateContacts", +"httpMethod": "POST", +"id": "people.people.batchUpdateContacts", +"parameterOrder": [], +"parameters": {}, +"path": "v1/people:batchUpdateContacts", +"request": { +"$ref": "BatchUpdateContactsRequest" +}, +"response": { +"$ref": "BatchUpdateContactsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"createContact": { +"description": "Create a new contact and return the person resource for that contact. The request returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/people:createContact", +"httpMethod": "POST", +"id": "people.people.createContact", +"parameterOrder": [], +"parameters": { +"personFields": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fields if not set. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/people:createContact", +"request": { +"$ref": "Person" +}, +"response": { +"$ref": "Person" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"deleteContact": { +"description": "Delete a contact person. Any non-contact data will not be deleted. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/people/{peopleId}:deleteContact", +"httpMethod": "DELETE", +"id": "people.people.deleteContact", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"resourceName": { +"description": "Required. The resource name of the contact to delete.", +"location": "path", +"pattern": "^people/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}:deleteContact", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"deleteContactPhoto": { +"description": "Delete a contact's photo. Mutate requests for the same user should be done sequentially to avoid // lock contention.", +"flatPath": "v1/people/{peopleId}:deleteContactPhoto", +"httpMethod": "DELETE", +"id": "people.people.deleteContactPhoto", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"personFields": { +"description": "Optional. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Defaults to empty if not set, which will skip the post mutate get. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"resourceName": { +"description": "Required. The resource name of the contact whose photo will be deleted.", +"location": "path", +"pattern": "^people/[^/]+$", +"required": true, +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}:deleteContactPhoto", +"response": { +"$ref": "DeleteContactPhotoResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"get": { +"description": "Provides information about a person by specifying a resource name. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.", +"flatPath": "v1/people/{peopleId}", +"httpMethod": "GET", +"id": "people.people.get", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"personFields": { +"description": "Required. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"requestMask.includeField": { +"description": "Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"resourceName": { +"description": "Required. The resource name of the person to provide information about. - To get information about the authenticated user, specify `people/me`. - To get information about a google account, specify `people/{account_id}`. - To get information about a contact, specify the resource name that identifies the contact as returned by `people.connections.list`.", +"location": "path", +"pattern": "^people/[^/]+$", +"required": true, +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_PROFILE and READ_SOURCE_TYPE_CONTACT if not set.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}", +"response": { +"$ref": "Person" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.other.readonly", +"https://www.googleapis.com/auth/contacts.readonly", +"https://www.googleapis.com/auth/directory.readonly", +"https://www.googleapis.com/auth/user.addresses.read", +"https://www.googleapis.com/auth/user.birthday.read", +"https://www.googleapis.com/auth/user.emails.read", +"https://www.googleapis.com/auth/user.gender.read", +"https://www.googleapis.com/auth/user.organization.read", +"https://www.googleapis.com/auth/user.phonenumbers.read", +"https://www.googleapis.com/auth/userinfo.email", +"https://www.googleapis.com/auth/userinfo.profile" +] +}, +"getBatchGet": { +"description": "Provides information about a list of specific people by specifying a list of requested resource names. Use `people/me` to indicate the authenticated user. The request returns a 400 error if 'personFields' is not specified.", +"flatPath": "v1/people:batchGet", +"httpMethod": "GET", +"id": "people.people.getBatchGet", +"parameterOrder": [], +"parameters": { +"personFields": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"requestMask.includeField": { +"description": "Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"resourceNames": { +"description": "Required. The resource names of the people to provide information about. It's repeatable. The URL query parameter should be resourceNames=&resourceNames=&... - To get information about the authenticated user, specify `people/me`. - To get information about a google account, specify `people/{account_id}`. - To get information about a contact, specify the resource name that identifies the contact as returned by `people.connections.list`. There is a maximum of 200 resource names.", +"location": "query", +"repeated": true, +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/people:batchGet", +"response": { +"$ref": "GetPeopleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.other.readonly", +"https://www.googleapis.com/auth/contacts.readonly", +"https://www.googleapis.com/auth/directory.readonly", +"https://www.googleapis.com/auth/user.addresses.read", +"https://www.googleapis.com/auth/user.birthday.read", +"https://www.googleapis.com/auth/user.emails.read", +"https://www.googleapis.com/auth/user.gender.read", +"https://www.googleapis.com/auth/user.organization.read", +"https://www.googleapis.com/auth/user.phonenumbers.read", +"https://www.googleapis.com/auth/userinfo.email", +"https://www.googleapis.com/auth/userinfo.profile" +] +}, +"listDirectoryPeople": { +"description": "Provides a list of domain profiles and domain contacts in the authenticated user's domain directory. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the directory people that have changed](/people/v1/directory#list_the_directory_people_that_have_changed).", +"flatPath": "v1/people:listDirectoryPeople", +"httpMethod": "GET", +"id": "people.people.listDirectoryPeople", +"parameterOrder": [], +"parameters": { +"mergeSources": { +"description": "Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.", +"enum": [ +"DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED", +"DIRECTORY_MERGE_SOURCE_TYPE_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"User owned contact." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"pageSize": { +"description": "Optional. The number of people to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `people.listDirectoryPeople` must match the first call that provided the page token.", +"location": "query", +"type": "string" +}, +"readMask": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"requestSyncToken": { +"description": "Optional. Whether the response should return `next_sync_token`. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `people.listDirectoryPeople`.", +"location": "query", +"type": "boolean" +}, +"sources": { +"description": "Required. Directory sources to return.", +"enum": [ +"DIRECTORY_SOURCE_TYPE_UNSPECIFIED", +"DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT", +"DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE" +], +"enumDescriptions": [ +"Unspecified.", +"Google Workspace domain shared contact.", +"Google Workspace domain profile." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"syncToken": { +"description": "Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `people.listDirectoryPeople` must match the first call that provided the sync token. More details about sync behavior at `people.listDirectoryPeople`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/people:listDirectoryPeople", +"response": { +"$ref": "ListDirectoryPeopleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/directory.readonly" +] +}, +"searchContacts": { +"description": "Provides a list of contacts in the authenticated user's grouped contacts that matches the search query. The query matches on a contact's `names`, `nickNames`, `emailAddresses`, `phoneNumbers`, and `organizations` fields that are from the CONTACT source. **IMPORTANT**: Before searching, clients should send a warmup request with an empty query to update the cache. See https://developers.google.com/people/v1/contacts#search_the_users_contacts", +"flatPath": "v1/people:searchContacts", +"httpMethod": "GET", +"id": "people.people.searchContacts", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "Optional. The number of results to return. Defaults to 10 if field is not set, or set to 0. Values greater than 30 will be capped to 30.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"query": { +"description": "Required. The plain-text query for the request. The query is used to match prefix phrases of the fields on a person. For example, a person with name \"foo name\" matches queries such as \"f\", \"fo\", \"foo\", \"foo n\", \"nam\", etc., but not \"oo n\".", +"location": "query", +"type": "string" +}, +"readMask": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT if not set.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/people:searchContacts", +"response": { +"$ref": "SearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.readonly" +] +}, +"searchDirectoryPeople": { +"description": "Provides a list of domain profiles and domain contacts in the authenticated user's domain directory that match the search query.", +"flatPath": "v1/people:searchDirectoryPeople", +"httpMethod": "GET", +"id": "people.people.searchDirectoryPeople", +"parameterOrder": [], +"parameters": { +"mergeSources": { +"description": "Optional. Additional data to merge into the directory sources if they are connected through verified join keys such as email addresses or phone numbers.", +"enum": [ +"DIRECTORY_MERGE_SOURCE_TYPE_UNSPECIFIED", +"DIRECTORY_MERGE_SOURCE_TYPE_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"User owned contact." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"pageSize": { +"description": "Optional. The number of people to include in the response. Valid values are between 1 and 500, inclusive. Defaults to 100 if not set or set to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchDirectoryPeople` must match the first call that provided the page token.", +"location": "query", +"type": "string" +}, +"query": { +"description": "Required. Prefix query that matches fields in the person. Does NOT use the read_mask for determining what fields to match.", +"location": "query", +"type": "string" +}, +"readMask": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"sources": { +"description": "Required. Directory sources to return.", +"enum": [ +"DIRECTORY_SOURCE_TYPE_UNSPECIFIED", +"DIRECTORY_SOURCE_TYPE_DOMAIN_CONTACT", +"DIRECTORY_SOURCE_TYPE_DOMAIN_PROFILE" +], +"enumDescriptions": [ +"Unspecified.", +"Google Workspace domain shared contact.", +"Google Workspace domain profile." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/people:searchDirectoryPeople", +"response": { +"$ref": "SearchDirectoryPeopleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/directory.readonly" +] +}, +"updateContact": { +"description": "Update contact data for an existing contact person. Any non-contact data will not be modified. Any non-contact data in the person to update will be ignored. All fields specified in the `update_mask` will be replaced. The server returns a 400 error if `person.metadata.sources` is not specified for the contact to be updated or if there is no contact source. The server returns a 400 error with reason `\"failedPrecondition\"` if `person.metadata.sources.etag` is different than the contact's etag, which indicates the contact has changed since its data was read. Clients should get the latest person and merge their updates into the latest person. The server returns a 400 error if `memberships` are being updated and there are no contact group memberships specified on the person. The server returns a 400 error if more than one field is specified on a field that is a singleton for contact sources: * biographies * birthdays * genders * names Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/people/{peopleId}:updateContact", +"httpMethod": "PATCH", +"id": "people.people.updateContact", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"personFields": { +"description": "Optional. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Defaults to all fields if not set. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"resourceName": { +"description": "The resource name for the person, assigned by the server. An ASCII string in the form of `people/{person_id}`.", +"location": "path", +"pattern": "^people/[^/]+$", +"required": true, +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"updatePersonFields": { +"description": "Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All updated fields will be replaced. Valid values are: * addresses * biographies * birthdays * calendarUrls * clientData * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * relations * sipAddresses * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+resourceName}:updateContact", +"request": { +"$ref": "Person" +}, +"response": { +"$ref": "Person" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +}, +"updateContactPhoto": { +"description": "Update a contact's photo. Mutate requests for the same user should be sent sequentially to avoid increased latency and failures.", +"flatPath": "v1/people/{peopleId}:updateContactPhoto", +"httpMethod": "PATCH", +"id": "people.people.updateContactPhoto", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"resourceName": { +"description": "Required. Person resource name", +"location": "path", +"pattern": "^people/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resourceName}:updateContactPhoto", +"request": { +"$ref": "UpdateContactPhotoRequest" +}, +"response": { +"$ref": "UpdateContactPhotoResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts" +] +} +}, +"resources": { +"connections": { +"methods": { +"list": { +"description": "Provides a list of the authenticated user's contacts. Sync tokens expire 7 days after the full sync. A request with an expired sync token will get an error with an [google.rpc.ErrorInfo](https://cloud.google.com/apis/design/errors#error_info) with reason \"EXPIRED_SYNC_TOKEN\". In the case of such an error clients should make a full sync request without a `sync_token`. The first page of a full sync request has an additional quota. If the quota is exceeded, a 429 error will be returned. This quota is fixed and can not be increased. When the `sync_token` is specified, resources deleted since the last sync will be returned as a person with `PersonMetadata.deleted` set to true. When the `page_token` or `sync_token` is specified, all other request parameters must match the first call. Writes may have a propagation delay of several minutes for sync requests. Incremental syncs are not intended for read-after-write use cases. See example usage at [List the user's contacts that have changed](/people/v1/contacts#list_the_users_contacts_that_have_changed).", +"flatPath": "v1/people/{peopleId}/connections", +"httpMethod": "GET", +"id": "people.people.connections.list", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"pageSize": { +"description": "Optional. The number of connections to include in the response. Valid values are between 1 and 1000, inclusive. Defaults to 100 if not set or set to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous response `next_page_token`. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `people.connections.list` must match the first call that provided the page token.", +"location": "query", +"type": "string" +}, +"personFields": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"requestMask.includeField": { +"description": "Required. Comma-separated list of person fields to be included in the response. Each path should start with `person.`: for example, `person.names` or `person.photos`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"requestSyncToken": { +"description": "Optional. Whether the response should return `next_sync_token` on the last page of results. It can be used to get incremental changes since the last request by setting it on the request `sync_token`. More details about sync behavior at `people.connections.list`.", +"location": "query", +"type": "boolean" +}, +"resourceName": { +"description": "Required. The resource name to return connections for. Only `people/me` is valid.", +"location": "path", +"pattern": "^people/[^/]+$", +"required": true, +"type": "string" +}, +"sortOrder": { +"description": "Optional. The order in which the connections should be sorted. Defaults to `LAST_MODIFIED_ASCENDING`.", +"enum": [ +"LAST_MODIFIED_ASCENDING", +"LAST_MODIFIED_DESCENDING", +"FIRST_NAME_ASCENDING", +"LAST_NAME_ASCENDING" +], +"enumDescriptions": [ +"Sort people by when they were changed; older entries first.", +"Sort people by when they were changed; newer entries first.", +"Sort people by first name.", +"Sort people by last name." +], +"location": "query", +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"syncToken": { +"description": "Optional. A sync token, received from a previous response `next_sync_token` Provide this to retrieve only the resources changed since the last request. When syncing, all other parameters provided to `people.connections.list` must match the first call that provided the sync token. More details about sync behavior at `people.connections.list`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+resourceName}/connections", +"response": { +"$ref": "ListConnectionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/contacts", +"https://www.googleapis.com/auth/contacts.readonly" +] +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://people.googleapis.com/", +"schemas": { +"Address": { +"description": "A person's physical address. May be a P.O. box or street address. All fields are optional.", +"id": "Address", +"properties": { +"city": { +"description": "The city of the address.", +"type": "string" +}, +"country": { +"description": "The country of the address.", +"type": "string" +}, +"countryCode": { +"description": "The [ISO 3166-1 alpha-2](http://www.iso.org/iso/country_codes.htm) country code of the address.", +"type": "string" +}, +"extendedAddress": { +"description": "The extended address of the address; for example, the apartment number.", +"type": "string" +}, +"formattedType": { +"description": "Output only. The type of the address translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"formattedValue": { +"description": "The unstructured value of the address. If this is not set by the user it will be automatically constructed from structured values.", +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the address." +}, +"poBox": { +"description": "The P.O. box of the address.", +"type": "string" +}, +"postalCode": { +"description": "The postal code of the address.", +"type": "string" +}, +"region": { +"description": "The region of the address; for example, the state or province.", +"type": "string" +}, +"streetAddress": { +"description": "The street address.", +"type": "string" +}, +"type": { +"description": "The type of the address. The type can be custom or one of these predefined values: * `home` * `work` * `other`", +"type": "string" +} +}, +"type": "object" +}, +"AgeRangeType": { +"description": "A person's age range.", +"id": "AgeRangeType", +"properties": { +"ageRange": { +"description": "The age range.", +"enum": [ +"AGE_RANGE_UNSPECIFIED", +"LESS_THAN_EIGHTEEN", +"EIGHTEEN_TO_TWENTY", +"TWENTY_ONE_OR_OLDER" +], +"enumDescriptions": [ +"Unspecified.", +"Younger than eighteen.", +"Between eighteen and twenty.", +"Twenty-one and older." +], +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the age range." +} +}, +"type": "object" +}, +"BatchCreateContactsRequest": { +"description": "A request to create a batch of contacts.", +"id": "BatchCreateContactsRequest", +"properties": { +"contacts": { +"description": "Required. The contact to create. Allows up to 200 contacts in a single request.", +"items": { +"$ref": "ContactToCreate" +}, +"type": "array" +}, +"readMask": { +"description": "Required. A field mask to restrict which fields on each person are returned in the response. Multiple fields can be specified by separating them with commas. If read mask is left empty, the post-mutate-get is skipped and no data will be returned in the response. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return in the post mutate read. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"items": { +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchCreateContactsResponse": { +"description": "If not successful, returns BatchCreateContactsErrorDetails which contains a list of errors for each invalid contact. The response to a request to create a batch of contacts.", +"id": "BatchCreateContactsResponse", +"properties": { +"createdPeople": { +"description": "The contacts that were created, unless the request `read_mask` is empty.", +"items": { +"$ref": "PersonResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchDeleteContactsRequest": { +"description": "A request to delete a batch of existing contacts.", +"id": "BatchDeleteContactsRequest", +"properties": { +"resourceNames": { +"description": "Required. The resource names of the contact to delete. It's repeatable. Allows up to 500 resource names in a single request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchGetContactGroupsResponse": { +"description": "The response to a batch get contact groups request.", +"id": "BatchGetContactGroupsResponse", +"properties": { +"responses": { +"description": "The list of responses for each requested contact group resource.", +"items": { +"$ref": "ContactGroupResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchUpdateContactsRequest": { +"description": "A request to update a batch of contacts.", +"id": "BatchUpdateContactsRequest", +"properties": { +"contacts": { +"additionalProperties": { +"$ref": "Person" +}, +"description": "Required. A map of resource names to the person data to be updated. Allows up to 200 contacts in a single request.", +"type": "object" +}, +"readMask": { +"description": "Required. A field mask to restrict which fields on each person are returned. Multiple fields can be specified by separating them with commas. If read mask is left empty, the post-mutate-get is skipped and no data will be returned in the response. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"items": { +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"type": "string" +}, +"type": "array" +}, +"updateMask": { +"description": "Required. A field mask to restrict which fields on the person are updated. Multiple fields can be specified by separating them with commas. All specified fields will be replaced, or cleared if left empty for each person. Valid values are: * addresses * biographies * birthdays * calendarUrls * clientData * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * relations * sipAddresses * urls * userDefined", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"BatchUpdateContactsResponse": { +"description": "If not successful, returns BatchUpdateContactsErrorDetails, a list of errors corresponding to each contact. The response to a request to update a batch of contacts.", +"id": "BatchUpdateContactsResponse", +"properties": { +"updateResult": { +"additionalProperties": { +"$ref": "PersonResponse" +}, +"description": "A map of resource names to the contacts that were updated, unless the request `read_mask` is empty.", +"type": "object" +} +}, +"type": "object" +}, +"Biography": { +"description": "A person's short biography.", +"id": "Biography", +"properties": { +"contentType": { +"description": "The content type of the biography.", +"enum": [ +"CONTENT_TYPE_UNSPECIFIED", +"TEXT_PLAIN", +"TEXT_HTML" +], +"enumDescriptions": [ +"Unspecified.", +"Plain text.", +"HTML text." +], +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the biography." +}, +"value": { +"description": "The short biography.", +"type": "string" +} +}, +"type": "object" +}, +"Birthday": { +"description": "A person's birthday. At least one of the `date` and `text` fields are specified. The `date` and `text` fields typically represent the same date, but are not guaranteed to. Clients should always set the `date` field when mutating birthdays.", +"id": "Birthday", +"properties": { +"date": { +"$ref": "Date", +"description": "The structured date of the birthday." +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the birthday." +}, +"text": { +"deprecated": true, +"description": "Prefer to use the `date` field if set. A free-form string representing the user's birthday. This value is not validated.", +"type": "string" +} +}, +"type": "object" +}, +"BraggingRights": { +"deprecated": true, +"description": "**DEPRECATED**: No data will be returned A person's bragging rights.", +"id": "BraggingRights", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the bragging rights." +}, +"value": { +"description": "The bragging rights; for example, `climbed mount everest`.", +"type": "string" +} +}, +"type": "object" +}, +"CalendarUrl": { +"description": "A person's calendar URL.", +"id": "CalendarUrl", +"properties": { +"formattedType": { +"description": "Output only. The type of the calendar URL translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the calendar URL." +}, +"type": { +"description": "The type of the calendar URL. The type can be custom or one of these predefined values: * `home` * `freeBusy` * `work`", +"type": "string" +}, +"url": { +"description": "The calendar URL.", +"type": "string" +} +}, +"type": "object" +}, +"ClientData": { +"description": "Arbitrary client data that is populated by clients. Duplicate keys and values are allowed.", +"id": "ClientData", +"properties": { +"key": { +"description": "The client specified key of the client data.", +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the client data." +}, +"value": { +"description": "The client specified value of the client data.", +"type": "string" +} +}, +"type": "object" +}, +"ContactGroup": { +"description": "A contact group.", +"id": "ContactGroup", +"properties": { +"clientData": { +"description": "The group's client data.", +"items": { +"$ref": "GroupClientData" +}, +"type": "array" +}, +"etag": { +"description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource. Used for web cache validation.", +"type": "string" +}, +"formattedName": { +"description": "Output only. The name translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale for system groups names. Group names set by the owner are the same as name.", +"readOnly": true, +"type": "string" +}, +"groupType": { +"description": "Output only. The contact group type.", +"enum": [ +"GROUP_TYPE_UNSPECIFIED", +"USER_CONTACT_GROUP", +"SYSTEM_CONTACT_GROUP" +], +"enumDescriptions": [ +"Unspecified.", +"User defined contact group.", +"System defined contact group." +], +"readOnly": true, +"type": "string" +}, +"memberCount": { +"description": "Output only. The total number of contacts in the group irrespective of max members in specified in the request.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"memberResourceNames": { +"description": "Output only. The list of contact person resource names that are members of the contact group. The field is only populated for GET requests and will only return as many members as `maxMembers` in the get request.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"metadata": { +"$ref": "ContactGroupMetadata", +"description": "Output only. Metadata about the contact group.", +"readOnly": true +}, +"name": { +"description": "The contact group name set by the group owner or a system provided name for system groups. For [`contactGroups.create`](/people/api/rest/v1/contactGroups/create) or [`contactGroups.update`](/people/api/rest/v1/contactGroups/update) the name must be unique to the users contact groups. Attempting to create a group with a duplicate name will return a HTTP 409 error.", +"type": "string" +}, +"resourceName": { +"description": "The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contact_group_id}`.", +"type": "string" +} +}, +"type": "object" +}, +"ContactGroupMembership": { +"description": "A Google contact group membership.", +"id": "ContactGroupMembership", +"properties": { +"contactGroupId": { +"deprecated": true, +"description": "Output only. The contact group ID for the contact group membership.", +"readOnly": true, +"type": "string" +}, +"contactGroupResourceName": { +"description": "The resource name for the contact group, assigned by the server. An ASCII string, in the form of `contactGroups/{contact_group_id}`. Only contact_group_resource_name can be used for modifying memberships. Any contact group membership can be removed, but only user group or \"myContacts\" or \"starred\" system groups memberships can be added. A contact must always have at least one contact group membership.", +"type": "string" +} +}, +"type": "object" +}, +"ContactGroupMetadata": { +"description": "The metadata about a contact group.", +"id": "ContactGroupMetadata", +"properties": { +"deleted": { +"description": "Output only. True if the contact group resource has been deleted. Populated only for [`ListContactGroups`](/people/api/rest/v1/contactgroups/list) requests that include a sync token.", +"readOnly": true, +"type": "boolean" +}, +"updateTime": { +"description": "Output only. The time the group was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ContactGroupResponse": { +"description": "The response for a specific contact group.", +"id": "ContactGroupResponse", +"properties": { +"contactGroup": { +"$ref": "ContactGroup", +"description": "The contact group." +}, +"requestedResourceName": { +"description": "The original requested resource name.", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "The status of the response." +} +}, +"type": "object" +}, +"ContactToCreate": { +"description": "A wrapper that contains the person data to populate a newly created source.", +"id": "ContactToCreate", +"properties": { +"contactPerson": { +"$ref": "Person", +"description": "Required. The person data to populate a newly created source." +} +}, +"type": "object" +}, +"CopyOtherContactToMyContactsGroupRequest": { +"description": "A request to copy an \"Other contact\" to my contacts group.", +"id": "CopyOtherContactToMyContactsGroupRequest", +"properties": { +"copyMask": { +"description": "Required. A field mask to restrict which fields are copied into the new contact. Valid values are: * emailAddresses * names * phoneNumbers", +"format": "google-fieldmask", +"type": "string" +}, +"readMask": { +"description": "Optional. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Defaults to the copy mask with metadata and membership fields if not set. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"items": { +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CoverPhoto": { +"description": "A person's cover photo. A large image shown on the person's profile page that represents who they are or what they care about.", +"id": "CoverPhoto", +"properties": { +"default": { +"description": "True if the cover photo is the default cover photo; false if the cover photo is a user-provided cover photo.", +"type": "boolean" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the cover photo." +}, +"url": { +"description": "The URL of the cover photo.", +"type": "string" +} +}, +"type": "object" +}, +"CreateContactGroupRequest": { +"description": "A request to create a new contact group.", +"id": "CreateContactGroupRequest", +"properties": { +"contactGroup": { +"$ref": "ContactGroup", +"description": "Required. The contact group to create." +}, +"readGroupFields": { +"description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * metadata * name", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeleteContactPhotoResponse": { +"description": "The response for deleting a contact's photo.", +"id": "DeleteContactPhotoResponse", +"properties": { +"person": { +"$ref": "Person", +"description": "The updated person, if person_fields is set in the DeleteContactPhotoRequest; otherwise this will be unset." +} +}, +"type": "object" +}, +"DomainMembership": { +"description": "A Google Workspace Domain membership.", +"id": "DomainMembership", +"properties": { +"inViewerDomain": { +"description": "True if the person is in the viewer's Google Workspace domain.", +"type": "boolean" +} +}, +"type": "object" +}, +"EmailAddress": { +"description": "A person's email address.", +"id": "EmailAddress", +"properties": { +"displayName": { +"description": "The display name of the email.", +"type": "string" +}, +"formattedType": { +"description": "Output only. The type of the email address translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the email address." +}, +"type": { +"description": "The type of the email address. The type can be custom or one of these predefined values: * `home` * `work` * `other`", +"type": "string" +}, +"value": { +"description": "The email address.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Event": { +"description": "An event related to the person.", +"id": "Event", +"properties": { +"date": { +"$ref": "Date", +"description": "The date of the event." +}, +"formattedType": { +"description": "Output only. The type of the event translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the event." +}, +"type": { +"description": "The type of the event. The type can be custom or one of these predefined values: * `anniversary` * `other`", +"type": "string" +} +}, +"type": "object" +}, +"ExternalId": { +"description": "An identifier from an external entity related to the person.", +"id": "ExternalId", +"properties": { +"formattedType": { +"description": "Output only. The type of the event translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the external ID." +}, +"type": { +"description": "The type of the external ID. The type can be custom or one of these predefined values: * `account` * `customer` * `loginId` * `network` * `organization`", +"type": "string" +}, +"value": { +"description": "The value of the external ID.", +"type": "string" +} +}, +"type": "object" +}, +"FieldMetadata": { +"description": "Metadata about a field.", +"id": "FieldMetadata", +"properties": { +"primary": { +"description": "Output only. True if the field is the primary field for all sources in the person. Each person will have at most one field with `primary` set to true.", +"readOnly": true, +"type": "boolean" +}, +"source": { +"$ref": "Source", +"description": "The source of the field." +}, +"sourcePrimary": { +"description": "True if the field is the primary field for the source. Each source must have at most one field with `source_primary` set to true.", +"type": "boolean" +}, +"verified": { +"description": "Output only. True if the field is verified; false if the field is unverified. A verified field is typically a name, email address, phone number, or website that has been confirmed to be owned by the person.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"FileAs": { +"description": "The name that should be used to sort the person in a list.", +"id": "FileAs", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the file-as." +}, +"value": { +"description": "The file-as value", +"type": "string" +} +}, +"type": "object" +}, +"Gender": { +"description": "A person's gender.", +"id": "Gender", +"properties": { +"addressMeAs": { +"description": "Free form text field for pronouns that should be used to address the person. Common values are: * `he`/`him` * `she`/`her` * `they`/`them`", +"type": "string" +}, +"formattedValue": { +"description": "Output only. The value of the gender translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale. Unspecified or custom value are not localized.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the gender." +}, +"value": { +"description": "The gender for the person. The gender can be custom or one of these predefined values: * `male` * `female` * `unspecified`", +"type": "string" +} +}, +"type": "object" +}, +"GetPeopleResponse": { +"description": "The response to a get request for a list of people by resource name.", +"id": "GetPeopleResponse", +"properties": { +"responses": { +"description": "The response for each requested resource name.", +"items": { +"$ref": "PersonResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GroupClientData": { +"description": "Arbitrary client data that is populated by clients. Duplicate keys and values are allowed.", +"id": "GroupClientData", +"properties": { +"key": { +"description": "The client specified key of the client data.", +"type": "string" +}, +"value": { +"description": "The client specified value of the client data.", +"type": "string" +} +}, +"type": "object" +}, +"ImClient": { +"description": "A person's instant messaging client.", +"id": "ImClient", +"properties": { +"formattedProtocol": { +"description": "Output only. The protocol of the IM client formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"formattedType": { +"description": "Output only. The type of the IM client translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the IM client." +}, +"protocol": { +"description": "The protocol of the IM client. The protocol can be custom or one of these predefined values: * `aim` * `msn` * `yahoo` * `skype` * `qq` * `googleTalk` * `icq` * `jabber` * `netMeeting`", +"type": "string" +}, +"type": { +"description": "The type of the IM client. The type can be custom or one of these predefined values: * `home` * `work` * `other`", +"type": "string" +}, +"username": { +"description": "The user name used in the IM client.", +"type": "string" +} +}, +"type": "object" +}, +"Interest": { +"description": "One of the person's interests.", +"id": "Interest", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the interest." +}, +"value": { +"description": "The interest; for example, `stargazing`.", +"type": "string" +} +}, +"type": "object" +}, +"ListConnectionsResponse": { +"description": "The response to a request for the authenticated user's connections.", +"id": "ListConnectionsResponse", +"properties": { +"connections": { +"description": "The list of people that the requestor is connected to.", +"items": { +"$ref": "Person" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"nextSyncToken": { +"description": "A token, which can be sent as `sync_token` to retrieve changes since the last request. Request must set `request_sync_token` to return the sync token. When the response is paginated, only the last page will contain `nextSyncToken`.", +"type": "string" +}, +"totalItems": { +"description": "The total number of items in the list without pagination.", +"format": "int32", +"type": "integer" +}, +"totalPeople": { +"deprecated": true, +"description": "**DEPRECATED** (Please use totalItems) The total number of people in the list without pagination.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListContactGroupsResponse": { +"description": "The response to a list contact groups request.", +"id": "ListContactGroupsResponse", +"properties": { +"contactGroups": { +"description": "The list of contact groups. Members of the contact groups are not populated.", +"items": { +"$ref": "ContactGroup" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The token that can be used to retrieve the next page of results.", +"type": "string" +}, +"nextSyncToken": { +"description": "The token that can be used to retrieve changes since the last request.", +"type": "string" +}, +"totalItems": { +"description": "The total number of items in the list without pagination.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListDirectoryPeopleResponse": { +"description": "The response to a request for the authenticated user's domain directory.", +"id": "ListDirectoryPeopleResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"nextSyncToken": { +"description": "A token, which can be sent as `sync_token` to retrieve changes since the last request. Request must set `request_sync_token` to return the sync token.", +"type": "string" +}, +"people": { +"description": "The list of people in the domain directory.", +"items": { +"$ref": "Person" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOtherContactsResponse": { +"description": "The response to a request for the authenticated user's \"Other contacts\".", +"id": "ListOtherContactsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"nextSyncToken": { +"description": "A token, which can be sent as `sync_token` to retrieve changes since the last request. Request must set `request_sync_token` to return the sync token.", +"type": "string" +}, +"otherContacts": { +"description": "The list of \"Other contacts\" returned as Person resources. \"Other contacts\" support a limited subset of fields. See ListOtherContactsRequest.request_mask for more detailed information.", +"items": { +"$ref": "Person" +}, +"type": "array" +}, +"totalSize": { +"description": "The total number of other contacts in the list without pagination.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Locale": { +"description": "A person's locale preference.", +"id": "Locale", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the locale." +}, +"value": { +"description": "The well-formed [IETF BCP 47](https://tools.ietf.org/html/bcp47) language tag representing the locale.", +"type": "string" +} +}, +"type": "object" +}, +"Location": { +"description": "A person's location.", +"id": "Location", +"properties": { +"buildingId": { +"description": "The building identifier.", +"type": "string" +}, +"current": { +"description": "Whether the location is the current location.", +"type": "boolean" +}, +"deskCode": { +"description": "The individual desk location.", +"type": "string" +}, +"floor": { +"description": "The floor name or number.", +"type": "string" +}, +"floorSection": { +"description": "The floor section in `floor_name`.", +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the location." +}, +"type": { +"description": "The type of the location. The type can be custom or one of these predefined values: * `desk` * `grewUp`", +"type": "string" +}, +"value": { +"description": "The free-form value of the location.", +"type": "string" +} +}, +"type": "object" +}, +"Membership": { +"description": "A person's membership in a group. Only contact group memberships can be modified.", +"id": "Membership", +"properties": { +"contactGroupMembership": { +"$ref": "ContactGroupMembership", +"description": "The contact group membership." +}, +"domainMembership": { +"$ref": "DomainMembership", +"description": "Output only. The domain membership.", +"readOnly": true +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the membership." +} +}, +"type": "object" +}, +"MiscKeyword": { +"description": "A person's miscellaneous keyword.", +"id": "MiscKeyword", +"properties": { +"formattedType": { +"description": "Output only. The type of the miscellaneous keyword translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the miscellaneous keyword." +}, +"type": { +"description": "The miscellaneous keyword type.", +"enum": [ +"TYPE_UNSPECIFIED", +"OUTLOOK_BILLING_INFORMATION", +"OUTLOOK_DIRECTORY_SERVER", +"OUTLOOK_KEYWORD", +"OUTLOOK_MILEAGE", +"OUTLOOK_PRIORITY", +"OUTLOOK_SENSITIVITY", +"OUTLOOK_SUBJECT", +"OUTLOOK_USER", +"HOME", +"WORK", +"OTHER" +], +"enumDescriptions": [ +"Unspecified.", +"Outlook field for billing information.", +"Outlook field for directory server.", +"Outlook field for keyword.", +"Outlook field for mileage.", +"Outlook field for priority.", +"Outlook field for sensitivity.", +"Outlook field for subject.", +"Outlook field for user.", +"Home.", +"Work.", +"Other." +], +"type": "string" +}, +"value": { +"description": "The value of the miscellaneous keyword.", +"type": "string" +} +}, +"type": "object" +}, +"ModifyContactGroupMembersRequest": { +"description": "A request to modify an existing contact group's members. Contacts can be removed from any group but they can only be added to a user group or \"myContacts\" or \"starred\" system groups.", +"id": "ModifyContactGroupMembersRequest", +"properties": { +"resourceNamesToAdd": { +"description": "Optional. The resource names of the contact people to add in the form of `people/{person_id}`. The total number of resource names in `resource_names_to_add` and `resource_names_to_remove` must be less than or equal to 1000.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resourceNamesToRemove": { +"description": "Optional. The resource names of the contact people to remove in the form of `people/{person_id}`. The total number of resource names in `resource_names_to_add` and `resource_names_to_remove` must be less than or equal to 1000.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ModifyContactGroupMembersResponse": { +"description": "The response to a modify contact group members request.", +"id": "ModifyContactGroupMembersResponse", +"properties": { +"canNotRemoveLastContactGroupResourceNames": { +"description": "The contact people resource names that cannot be removed from their last contact group.", +"items": { +"type": "string" +}, +"type": "array" +}, +"notFoundResourceNames": { +"description": "The contact people resource names that were not found.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Name": { +"description": "A person's name. If the name is a mononym, the family name is empty.", +"id": "Name", +"properties": { +"displayName": { +"description": "Output only. The display name formatted according to the locale specified by the viewer's account or the `Accept-Language` HTTP header.", +"readOnly": true, +"type": "string" +}, +"displayNameLastFirst": { +"description": "Output only. The display name with the last name first formatted according to the locale specified by the viewer's account or the `Accept-Language` HTTP header.", +"readOnly": true, +"type": "string" +}, +"familyName": { +"description": "The family name.", +"type": "string" +}, +"givenName": { +"description": "The given name.", +"type": "string" +}, +"honorificPrefix": { +"description": "The honorific prefixes, such as `Mrs.` or `Dr.`", +"type": "string" +}, +"honorificSuffix": { +"description": "The honorific suffixes, such as `Jr.`", +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the name." +}, +"middleName": { +"description": "The middle name(s).", +"type": "string" +}, +"phoneticFamilyName": { +"description": "The family name spelled as it sounds.", +"type": "string" +}, +"phoneticFullName": { +"description": "The full name spelled as it sounds.", +"type": "string" +}, +"phoneticGivenName": { +"description": "The given name spelled as it sounds.", +"type": "string" +}, +"phoneticHonorificPrefix": { +"description": "The honorific prefixes spelled as they sound.", +"type": "string" +}, +"phoneticHonorificSuffix": { +"description": "The honorific suffixes spelled as they sound.", +"type": "string" +}, +"phoneticMiddleName": { +"description": "The middle name(s) spelled as they sound.", +"type": "string" +}, +"unstructuredName": { +"description": "The free form name value.", +"type": "string" +} +}, +"type": "object" +}, +"Nickname": { +"description": "A person's nickname.", +"id": "Nickname", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the nickname." +}, +"type": { +"description": "The type of the nickname.", +"enum": [ +"DEFAULT", +"MAIDEN_NAME", +"INITIALS", +"GPLUS", +"OTHER_NAME", +"ALTERNATE_NAME", +"SHORT_NAME" +], +"enumDeprecated": [ +false, +true, +true, +true, +true, +false, +true +], +"enumDescriptions": [ +"Generic nickname.", +"Maiden name or birth family name. Used when the person's family name has changed as a result of marriage.", +"Initials.", +"Google+ profile nickname.", +"A professional affiliation or other name; for example, `Dr. Smith.`", +"Alternate name person is known by.", +"A shorter version of the person's name." +], +"type": "string" +}, +"value": { +"description": "The nickname.", +"type": "string" +} +}, +"type": "object" +}, +"Occupation": { +"description": "A person's occupation.", +"id": "Occupation", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the occupation." +}, +"value": { +"description": "The occupation; for example, `carpenter`.", +"type": "string" +} +}, +"type": "object" +}, +"Organization": { +"description": "A person's past or current organization. Overlapping date ranges are permitted.", +"id": "Organization", +"properties": { +"costCenter": { +"description": "The person's cost center at the organization.", +"type": "string" +}, +"current": { +"description": "True if the organization is the person's current organization; false if the organization is a past organization.", +"type": "boolean" +}, +"department": { +"description": "The person's department at the organization.", +"type": "string" +}, +"domain": { +"description": "The domain name associated with the organization; for example, `google.com`.", +"type": "string" +}, +"endDate": { +"$ref": "Date", +"description": "The end date when the person left the organization." +}, +"formattedType": { +"description": "Output only. The type of the organization translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"fullTimeEquivalentMillipercent": { +"description": "The person's full-time equivalent millipercent within the organization (100000 = 100%).", +"format": "int32", +"type": "integer" +}, +"jobDescription": { +"description": "The person's job description at the organization.", +"type": "string" +}, +"location": { +"description": "The location of the organization office the person works at.", +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the organization." +}, +"name": { +"description": "The name of the organization.", +"type": "string" +}, +"phoneticName": { +"description": "The phonetic name of the organization.", +"type": "string" +}, +"startDate": { +"$ref": "Date", +"description": "The start date when the person joined the organization." +}, +"symbol": { +"description": "The symbol associated with the organization; for example, a stock ticker symbol, abbreviation, or acronym.", +"type": "string" +}, +"title": { +"description": "The person's job title at the organization.", +"type": "string" +}, +"type": { +"description": "The type of the organization. The type can be custom or one of these predefined values: * `work` * `school`", +"type": "string" +} +}, +"type": "object" +}, +"Person": { +"description": "Information about a person merged from various data sources such as the authenticated user's contacts and profile data. Most fields can have multiple items. The items in a field have no guaranteed order, but each non-empty field is guaranteed to have exactly one field with `metadata.primary` set to true.", +"id": "Person", +"properties": { +"addresses": { +"description": "The person's street addresses.", +"items": { +"$ref": "Address" +}, +"type": "array" +}, +"ageRange": { +"deprecated": true, +"description": "Output only. **DEPRECATED** (Please use `person.ageRanges` instead) The person's age range.", +"enum": [ +"AGE_RANGE_UNSPECIFIED", +"LESS_THAN_EIGHTEEN", +"EIGHTEEN_TO_TWENTY", +"TWENTY_ONE_OR_OLDER" +], +"enumDescriptions": [ +"Unspecified.", +"Younger than eighteen.", +"Between eighteen and twenty.", +"Twenty-one and older." +], +"readOnly": true, +"type": "string" +}, +"ageRanges": { +"description": "Output only. The person's age ranges.", +"items": { +"$ref": "AgeRangeType" +}, +"readOnly": true, +"type": "array" +}, +"biographies": { +"description": "The person's biographies. This field is a singleton for contact sources.", +"items": { +"$ref": "Biography" +}, +"type": "array" +}, +"birthdays": { +"description": "The person's birthdays. This field is a singleton for contact sources.", +"items": { +"$ref": "Birthday" +}, +"type": "array" +}, +"braggingRights": { +"deprecated": true, +"description": "**DEPRECATED**: No data will be returned The person's bragging rights.", +"items": { +"$ref": "BraggingRights" +}, +"type": "array" +}, +"calendarUrls": { +"description": "The person's calendar URLs.", +"items": { +"$ref": "CalendarUrl" +}, +"type": "array" +}, +"clientData": { +"description": "The person's client data.", +"items": { +"$ref": "ClientData" +}, +"type": "array" +}, +"coverPhotos": { +"description": "Output only. The person's cover photos.", +"items": { +"$ref": "CoverPhoto" +}, +"readOnly": true, +"type": "array" +}, +"emailAddresses": { +"description": "The person's email addresses. For `people.connections.list` and `otherContacts.list` the number of email addresses is limited to 100. If a Person has more email addresses the entire set can be obtained by calling GetPeople.", +"items": { +"$ref": "EmailAddress" +}, +"type": "array" +}, +"etag": { +"description": "The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the resource. Used for web cache validation.", +"type": "string" +}, +"events": { +"description": "The person's events.", +"items": { +"$ref": "Event" +}, +"type": "array" +}, +"externalIds": { +"description": "The person's external IDs.", +"items": { +"$ref": "ExternalId" +}, +"type": "array" +}, +"fileAses": { +"description": "The person's file-ases.", +"items": { +"$ref": "FileAs" +}, +"type": "array" +}, +"genders": { +"description": "The person's genders. This field is a singleton for contact sources.", +"items": { +"$ref": "Gender" +}, +"type": "array" +}, +"imClients": { +"description": "The person's instant messaging clients.", +"items": { +"$ref": "ImClient" +}, +"type": "array" +}, +"interests": { +"description": "The person's interests.", +"items": { +"$ref": "Interest" +}, +"type": "array" +}, +"locales": { +"description": "The person's locale preferences.", +"items": { +"$ref": "Locale" +}, +"type": "array" +}, +"locations": { +"description": "The person's locations.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"memberships": { +"description": "The person's group memberships.", +"items": { +"$ref": "Membership" +}, +"type": "array" +}, +"metadata": { +"$ref": "PersonMetadata", +"description": "Output only. Metadata about the person.", +"readOnly": true +}, +"miscKeywords": { +"description": "The person's miscellaneous keywords.", +"items": { +"$ref": "MiscKeyword" +}, +"type": "array" +}, +"names": { +"description": "The person's names. This field is a singleton for contact sources.", +"items": { +"$ref": "Name" +}, +"type": "array" +}, +"nicknames": { +"description": "The person's nicknames.", +"items": { +"$ref": "Nickname" +}, +"type": "array" +}, +"occupations": { +"description": "The person's occupations.", +"items": { +"$ref": "Occupation" +}, +"type": "array" +}, +"organizations": { +"description": "The person's past or current organizations.", +"items": { +"$ref": "Organization" +}, +"type": "array" +}, +"phoneNumbers": { +"description": "The person's phone numbers. For `people.connections.list` and `otherContacts.list` the number of phone numbers is limited to 100. If a Person has more phone numbers the entire set can be obtained by calling GetPeople.", +"items": { +"$ref": "PhoneNumber" +}, +"type": "array" +}, +"photos": { +"description": "Output only. The person's photos.", +"items": { +"$ref": "Photo" +}, +"readOnly": true, +"type": "array" +}, +"relations": { +"description": "The person's relations.", +"items": { +"$ref": "Relation" +}, +"type": "array" +}, +"relationshipInterests": { +"deprecated": true, +"description": "Output only. **DEPRECATED**: No data will be returned The person's relationship interests.", +"items": { +"$ref": "RelationshipInterest" +}, +"readOnly": true, +"type": "array" +}, +"relationshipStatuses": { +"deprecated": true, +"description": "Output only. **DEPRECATED**: No data will be returned The person's relationship statuses.", +"items": { +"$ref": "RelationshipStatus" +}, +"readOnly": true, +"type": "array" +}, +"residences": { +"deprecated": true, +"description": "**DEPRECATED**: (Please use `person.locations` instead) The person's residences.", +"items": { +"$ref": "Residence" +}, +"type": "array" +}, +"resourceName": { +"description": "The resource name for the person, assigned by the server. An ASCII string in the form of `people/{person_id}`.", +"type": "string" +}, +"sipAddresses": { +"description": "The person's SIP addresses.", +"items": { +"$ref": "SipAddress" +}, +"type": "array" +}, +"skills": { +"description": "The person's skills.", +"items": { +"$ref": "Skill" +}, +"type": "array" +}, +"taglines": { +"deprecated": true, +"description": "Output only. **DEPRECATED**: No data will be returned The person's taglines.", +"items": { +"$ref": "Tagline" +}, +"readOnly": true, +"type": "array" +}, +"urls": { +"description": "The person's associated URLs.", +"items": { +"$ref": "Url" +}, +"type": "array" +}, +"userDefined": { +"description": "The person's user defined data.", +"items": { +"$ref": "UserDefined" +}, +"type": "array" +} +}, +"type": "object" +}, +"PersonMetadata": { +"description": "The metadata about a person.", +"id": "PersonMetadata", +"properties": { +"deleted": { +"description": "Output only. True if the person resource has been deleted. Populated only for `people.connections.list` and `otherContacts.list` sync requests.", +"readOnly": true, +"type": "boolean" +}, +"linkedPeopleResourceNames": { +"description": "Output only. Resource names of people linked to this resource.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"objectType": { +"deprecated": true, +"description": "Output only. **DEPRECATED** (Please use `person.metadata.sources.profileMetadata.objectType` instead) The type of the person object.", +"enum": [ +"OBJECT_TYPE_UNSPECIFIED", +"PERSON", +"PAGE" +], +"enumDescriptions": [ +"Unspecified.", +"Person.", +"[Currents Page.](https://workspace.google.com/products/currents/)" +], +"readOnly": true, +"type": "string" +}, +"previousResourceNames": { +"description": "Output only. Any former resource names this person has had. Populated only for `people.connections.list` requests that include a sync token. The resource name may change when adding or removing fields that link a contact and profile such as a verified email, verified phone number, or profile URL.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"sources": { +"description": "The sources of data for the person.", +"items": { +"$ref": "Source" +}, +"type": "array" +} +}, +"type": "object" +}, +"PersonResponse": { +"description": "The response for a single person", +"id": "PersonResponse", +"properties": { +"httpStatusCode": { +"deprecated": true, +"description": "**DEPRECATED** (Please use status instead) [HTTP 1.1 status code] (http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html).", +"format": "int32", +"type": "integer" +}, +"person": { +"$ref": "Person", +"description": "The person." +}, +"requestedResourceName": { +"description": "The original requested resource name. May be different than the resource name on the returned person. The resource name can change when adding or removing fields that link a contact and profile such as a verified email, verified phone number, or a profile URL.", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "The status of the response." +} +}, +"type": "object" +}, +"PhoneNumber": { +"description": "A person's phone number.", +"id": "PhoneNumber", +"properties": { +"canonicalForm": { +"description": "Output only. The canonicalized [ITU-T E.164](https://law.resource.org/pub/us/cfr/ibr/004/itu-t.E.164.1.2008.pdf) form of the phone number.", +"readOnly": true, +"type": "string" +}, +"formattedType": { +"description": "Output only. The type of the phone number translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the phone number." +}, +"type": { +"description": "The type of the phone number. The type can be custom or one of these predefined values: * `home` * `work` * `mobile` * `homeFax` * `workFax` * `otherFax` * `pager` * `workMobile` * `workPager` * `main` * `googleVoice` * `other`", +"type": "string" +}, +"value": { +"description": "The phone number.", +"type": "string" +} +}, +"type": "object" +}, +"Photo": { +"description": "A person's photo. A picture shown next to the person's name to help others recognize the person.", +"id": "Photo", +"properties": { +"default": { +"description": "True if the photo is a default photo; false if the photo is a user-provided photo.", +"type": "boolean" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the photo." +}, +"url": { +"description": "The URL of the photo. You can change the desired size by appending a query parameter `sz={size}` at the end of the url, where {size} is the size in pixels. Example: https://lh3.googleusercontent.com/-T_wVWLlmg7w/AAAAAAAAAAI/AAAAAAAABa8/00gzXvDBYqw/s100/photo.jpg?sz=50", +"type": "string" +} +}, +"type": "object" +}, +"ProfileMetadata": { +"description": "The metadata about a profile.", +"id": "ProfileMetadata", +"properties": { +"objectType": { +"description": "Output only. The profile object type.", +"enum": [ +"OBJECT_TYPE_UNSPECIFIED", +"PERSON", +"PAGE" +], +"enumDescriptions": [ +"Unspecified.", +"Person.", +"[Currents Page.](https://workspace.google.com/products/currents/)" +], +"readOnly": true, +"type": "string" +}, +"userTypes": { +"description": "Output only. The user types.", +"items": { +"enum": [ +"USER_TYPE_UNKNOWN", +"GOOGLE_USER", +"GPLUS_USER", +"GOOGLE_APPS_USER" +], +"enumDescriptions": [ +"The user type is not known.", +"The user is a Google user.", +"The user is a Currents user.", +"The user is a Google Workspace user." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"Relation": { +"description": "A person's relation to another person.", +"id": "Relation", +"properties": { +"formattedType": { +"description": "Output only. The type of the relation translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the relation." +}, +"person": { +"description": "The name of the other person this relation refers to.", +"type": "string" +}, +"type": { +"description": "The person's relation to the other person. The type can be custom or one of these predefined values: * `spouse` * `child` * `mother` * `father` * `parent` * `brother` * `sister` * `friend` * `relative` * `domesticPartner` * `manager` * `assistant` * `referredBy` * `partner`", +"type": "string" +} +}, +"type": "object" +}, +"RelationshipInterest": { +"deprecated": true, +"description": "**DEPRECATED**: No data will be returned A person's relationship interest .", +"id": "RelationshipInterest", +"properties": { +"formattedValue": { +"description": "Output only. The value of the relationship interest translated and formatted in the viewer's account locale or the locale specified in the Accept-Language HTTP header.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the relationship interest." +}, +"value": { +"description": "The kind of relationship the person is looking for. The value can be custom or one of these predefined values: * `friend` * `date` * `relationship` * `networking`", +"type": "string" +} +}, +"type": "object" +}, +"RelationshipStatus": { +"deprecated": true, +"description": "**DEPRECATED**: No data will be returned A person's relationship status.", +"id": "RelationshipStatus", +"properties": { +"formattedValue": { +"description": "Output only. The value of the relationship status translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the relationship status." +}, +"value": { +"description": "The relationship status. The value can be custom or one of these predefined values: * `single` * `inARelationship` * `engaged` * `married` * `itsComplicated` * `openRelationship` * `widowed` * `inDomesticPartnership` * `inCivilUnion`", +"type": "string" +} +}, +"type": "object" +}, +"Residence": { +"deprecated": true, +"description": "**DEPRECATED**: Please use `person.locations` instead. A person's past or current residence.", +"id": "Residence", +"properties": { +"current": { +"description": "True if the residence is the person's current residence; false if the residence is a past residence.", +"type": "boolean" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the residence." +}, +"value": { +"description": "The address of the residence.", +"type": "string" +} +}, +"type": "object" +}, +"SearchDirectoryPeopleResponse": { +"description": "The response to a request for people in the authenticated user's domain directory that match the specified query.", +"id": "SearchDirectoryPeopleResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"people": { +"description": "The list of people in the domain directory that match the query.", +"items": { +"$ref": "Person" +}, +"type": "array" +}, +"totalSize": { +"description": "The total number of items in the list without pagination.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"SearchResponse": { +"description": "The response to a search request for the authenticated user, given a query.", +"id": "SearchResponse", +"properties": { +"results": { +"description": "The results of the request.", +"items": { +"$ref": "SearchResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"SearchResult": { +"description": "A result of a search query.", +"id": "SearchResult", +"properties": { +"person": { +"$ref": "Person", +"description": "The matched Person." +} +}, +"type": "object" +}, +"SipAddress": { +"description": "A person's SIP address. Session Initial Protocol addresses are used for VoIP communications to make voice or video calls over the internet.", +"id": "SipAddress", +"properties": { +"formattedType": { +"description": "Output only. The type of the SIP address translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the SIP address." +}, +"type": { +"description": "The type of the SIP address. The type can be custom or or one of these predefined values: * `home` * `work` * `mobile` * `other`", +"type": "string" +}, +"value": { +"description": "The SIP address in the [RFC 3261 19.1](https://tools.ietf.org/html/rfc3261#section-19.1) SIP URI format.", +"type": "string" +} +}, +"type": "object" +}, +"Skill": { +"description": "A skill that the person has.", +"id": "Skill", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the skill." +}, +"value": { +"description": "The skill; for example, `underwater basket weaving`.", +"type": "string" +} +}, +"type": "object" +}, +"Source": { +"description": "The source of a field.", +"id": "Source", +"properties": { +"etag": { +"description": "**Only populated in `person.metadata.sources`.** The [HTTP entity tag](https://en.wikipedia.org/wiki/HTTP_ETag) of the source. Used for web cache validation.", +"type": "string" +}, +"id": { +"description": "The unique identifier within the source type generated by the server.", +"type": "string" +}, +"profileMetadata": { +"$ref": "ProfileMetadata", +"description": "Output only. **Only populated in `person.metadata.sources`.** Metadata about a source of type PROFILE.", +"readOnly": true +}, +"type": { +"description": "The source type.", +"enum": [ +"SOURCE_TYPE_UNSPECIFIED", +"ACCOUNT", +"PROFILE", +"DOMAIN_PROFILE", +"CONTACT", +"OTHER_CONTACT", +"DOMAIN_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"[Google Account](https://accounts.google.com).", +"[Google profile](https://profiles.google.com). You can view the profile at [https://profiles.google.com/](https://profiles.google.com/){id}, where {id} is the source id.", +"[Google Workspace domain profile](https://support.google.com/a/answer/1628008).", +"[Google contact](https://contacts.google.com). You can view the contact at [https://contact.google.com/](https://contact.google.com/){id}, where {id} is the source id.", +"[Google \"Other contact\"](https://contacts.google.com/other).", +"[Google Workspace domain shared contact](https://support.google.com/a/answer/9281635)." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. **Only populated in `person.metadata.sources`.** Last update timestamp of this source.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Tagline": { +"deprecated": true, +"description": "**DEPRECATED**: No data will be returned A brief one-line description of the person.", +"id": "Tagline", +"properties": { +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the tagline." +}, +"value": { +"description": "The tagline.", +"type": "string" +} +}, +"type": "object" +}, +"UpdateContactGroupRequest": { +"description": "A request to update an existing user contact group. All updated fields will be replaced.", +"id": "UpdateContactGroupRequest", +"properties": { +"contactGroup": { +"$ref": "ContactGroup", +"description": "Required. The contact group to update." +}, +"readGroupFields": { +"description": "Optional. A field mask to restrict which fields on the group are returned. Defaults to `metadata`, `groupType`, and `name` if not set or set to empty. Valid fields are: * clientData * groupType * memberCount * metadata * name", +"format": "google-fieldmask", +"type": "string" +}, +"updateGroupFields": { +"description": "Optional. A field mask to restrict which fields on the group are updated. Multiple fields can be specified by separating them with commas. Defaults to `name` if not set or set to empty. Updated fields are replaced. Valid values are: * clientData * name", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateContactPhotoRequest": { +"description": "A request to update an existing contact's photo. All requests must have a valid photo format: JPEG or PNG.", +"id": "UpdateContactPhotoRequest", +"properties": { +"personFields": { +"description": "Optional. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Defaults to empty if not set, which will skip the post mutate get. Valid values are: * addresses * ageRanges * biographies * birthdays * calendarUrls * clientData * coverPhotos * emailAddresses * events * externalIds * genders * imClients * interests * locales * locations * memberships * metadata * miscKeywords * names * nicknames * occupations * organizations * phoneNumbers * photos * relations * sipAddresses * skills * urls * userDefined", +"format": "google-fieldmask", +"type": "string" +}, +"photoBytes": { +"description": "Required. Raw photo bytes", +"format": "byte", +"type": "string" +}, +"sources": { +"description": "Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_CONTACT and READ_SOURCE_TYPE_PROFILE if not set.", +"items": { +"enum": [ +"READ_SOURCE_TYPE_UNSPECIFIED", +"READ_SOURCE_TYPE_PROFILE", +"READ_SOURCE_TYPE_CONTACT", +"READ_SOURCE_TYPE_DOMAIN_CONTACT", +"READ_SOURCE_TYPE_OTHER_CONTACT" +], +"enumDescriptions": [ +"Unspecified.", +"Returns SourceType.ACCOUNT, SourceType.DOMAIN_PROFILE, and SourceType.PROFILE.", +"Returns SourceType.CONTACT.", +"Returns SourceType.DOMAIN_CONTACT.", +"Returns SourceType.OTHER_CONTACT." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UpdateContactPhotoResponse": { +"description": "The response for updating a contact's photo.", +"id": "UpdateContactPhotoResponse", +"properties": { +"person": { +"$ref": "Person", +"description": "The updated person, if person_fields is set in the UpdateContactPhotoRequest; otherwise this will be unset." +} +}, +"type": "object" +}, +"Url": { +"description": "A person's associated URLs.", +"id": "Url", +"properties": { +"formattedType": { +"description": "Output only. The type of the URL translated and formatted in the viewer's account locale or the `Accept-Language` HTTP header locale.", +"readOnly": true, +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the URL." +}, +"type": { +"description": "The type of the URL. The type can be custom or one of these predefined values: * `home` * `work` * `blog` * `profile` * `homePage` * `ftp` * `reservations` * `appInstallPage`: website for a Currents application. * `other`", +"type": "string" +}, +"value": { +"description": "The URL.", +"type": "string" +} +}, +"type": "object" +}, +"UserDefined": { +"description": "Arbitrary user data that is populated by the end users.", +"id": "UserDefined", +"properties": { +"key": { +"description": "The end user specified key of the user defined data.", +"type": "string" +}, +"metadata": { +"$ref": "FieldMetadata", +"description": "Metadata about the user defined data." +}, +"value": { +"description": "The end user specified value of the user defined data.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "People API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/places.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/places.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..e016575573e01e82b20d79f6ff52027437c1927d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/places.v1.json @@ -0,0 +1,1710 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/maps-platform.places": { +"description": "Private Service: https://www.googleapis.com/auth/maps-platform.places" +}, +"https://www.googleapis.com/auth/maps-platform.places.autocomplete": { +"description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.autocomplete" +}, +"https://www.googleapis.com/auth/maps-platform.places.details": { +"description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.details" +}, +"https://www.googleapis.com/auth/maps-platform.places.nearbysearch": { +"description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.nearbysearch" +}, +"https://www.googleapis.com/auth/maps-platform.places.textsearch": { +"description": "Private Service: https://www.googleapis.com/auth/maps-platform.places.textsearch" +} +} +} +}, +"basePath": "", +"baseUrl": "https://places.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Maps Places", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://mapsplatform.google.com/maps-products/#places-section", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "places:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://places.mtls.googleapis.com/", +"name": "places", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"places": { +"methods": { +"autocomplete": { +"description": "Returns predictions for the given input.", +"flatPath": "v1/places:autocomplete", +"httpMethod": "POST", +"id": "places.places.autocomplete", +"parameterOrder": [], +"parameters": {}, +"path": "v1/places:autocomplete", +"request": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesRequest" +}, +"response": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/maps-platform.places", +"https://www.googleapis.com/auth/maps-platform.places.autocomplete" +] +}, +"get": { +"description": "Get the details of a place based on its resource name, which is a string in the `places/{place_id}` format.", +"flatPath": "v1/places/{placesId}", +"httpMethod": "GET", +"id": "places.places.get", +"parameterOrder": [ +"name" +], +"parameters": { +"languageCode": { +"description": "Optional. Place details will be displayed with the preferred language if available. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The resource name of a place, in the `places/{place_id}` format.", +"location": "path", +"pattern": "^places/[^/]+$", +"required": true, +"type": "string" +}, +"regionCode": { +"description": "Optional. The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.", +"location": "query", +"type": "string" +}, +"sessionToken": { +"description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleMapsPlacesV1Place" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/maps-platform.places", +"https://www.googleapis.com/auth/maps-platform.places.details" +] +}, +"searchNearby": { +"description": "Search for places near locations.", +"flatPath": "v1/places:searchNearby", +"httpMethod": "POST", +"id": "places.places.searchNearby", +"parameterOrder": [], +"parameters": {}, +"path": "v1/places:searchNearby", +"request": { +"$ref": "GoogleMapsPlacesV1SearchNearbyRequest" +}, +"response": { +"$ref": "GoogleMapsPlacesV1SearchNearbyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/maps-platform.places", +"https://www.googleapis.com/auth/maps-platform.places.nearbysearch" +] +}, +"searchText": { +"description": "Text query based place search.", +"flatPath": "v1/places:searchText", +"httpMethod": "POST", +"id": "places.places.searchText", +"parameterOrder": [], +"parameters": {}, +"path": "v1/places:searchText", +"request": { +"$ref": "GoogleMapsPlacesV1SearchTextRequest" +}, +"response": { +"$ref": "GoogleMapsPlacesV1SearchTextResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/maps-platform.places", +"https://www.googleapis.com/auth/maps-platform.places.textsearch" +] +} +}, +"resources": { +"photos": { +"methods": { +"getMedia": { +"description": "Get a photo media with a photo reference string.", +"flatPath": "v1/places/{placesId}/photos/{photosId}/media", +"httpMethod": "GET", +"id": "places.places.photos.getMedia", +"parameterOrder": [ +"name" +], +"parameters": { +"maxHeightPx": { +"description": "Optional. Specifies the maximum desired height, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned. At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"maxWidthPx": { +"description": "Optional. Specifies the maximum desired width, in pixels, of the image. If the image is smaller than the values specified, the original image will be returned. If the image is larger in either dimension, it will be scaled to match the smaller of the two dimensions, restricted to its original aspect ratio. Both the max_height_px and max_width_px properties accept an integer between 1 and 4800, inclusively. If the value is not within the allowed range, an INVALID_ARGUMENT error will be returned. At least one of max_height_px or max_width_px needs to be specified. If neither max_height_px nor max_width_px is specified, an INVALID_ARGUMENT error will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"name": { +"description": "Required. The resource name of a photo media in the format: `places/{place_id}/photos/{photo_reference}/media`. The resource name of a photo as returned in a Place object's `photos.name` field comes with the format `places/{place_id}/photos/{photo_reference}`. You need to append `/media` at the end of the photo resource to get the photo media resource name.", +"location": "path", +"pattern": "^places/[^/]+/photos/[^/]+/media$", +"required": true, +"type": "string" +}, +"skipHttpRedirect": { +"description": "Optional. If set, skip the default HTTP redirect behavior and render a text format (for example, in JSON format for HTTP use case) response. If not set, an HTTP redirect will be issued to redirect the call to the image media. This option is ignored for non-HTTP requests.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleMapsPlacesV1PhotoMedia" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/maps-platform.places" +] +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://places.googleapis.com/", +"schemas": { +"GoogleGeoTypeViewport": { +"description": "A latitude-longitude viewport, represented as two diagonally opposite `low` and `high` points. A viewport is considered a closed region, i.e. it includes its boundary. The latitude bounds must range between -90 to 90 degrees inclusive, and the longitude bounds must range between -180 to 180 degrees inclusive. Various cases include: - If `low` = `high`, the viewport consists of that single point. - If `low.longitude` > `high.longitude`, the longitude range is inverted (the viewport crosses the 180 degree longitude line). - If `low.longitude` = -180 degrees and `high.longitude` = 180 degrees, the viewport includes all longitudes. - If `low.longitude` = 180 degrees and `high.longitude` = -180 degrees, the longitude range is empty. - If `low.latitude` > `high.latitude`, the latitude range is empty. Both `low` and `high` must be populated, and the represented box cannot be empty (as specified by the definitions above). An empty viewport will result in an error. For example, this viewport fully encloses New York City: { \"low\": { \"latitude\": 40.477398, \"longitude\": -74.259087 }, \"high\": { \"latitude\": 40.91618, \"longitude\": -73.70018 } }", +"id": "GoogleGeoTypeViewport", +"properties": { +"high": { +"$ref": "GoogleTypeLatLng", +"description": "Required. The high point of the viewport." +}, +"low": { +"$ref": "GoogleTypeLatLng", +"description": "Required. The low point of the viewport." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AuthorAttribution": { +"description": "Information about the author of the UGC data. Used in Photo, and Review.", +"id": "GoogleMapsPlacesV1AuthorAttribution", +"properties": { +"displayName": { +"description": "Name of the author of the Photo or Review.", +"type": "string" +}, +"photoUri": { +"description": "Profile photo URI of the author of the Photo or Review.", +"type": "string" +}, +"uri": { +"description": "URI of the author of the Photo or Review.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesRequest": { +"description": "Request proto for AutocompletePlaces.", +"id": "GoogleMapsPlacesV1AutocompletePlacesRequest", +"properties": { +"includeQueryPredictions": { +"description": "Optional. If true, the response will include both Place and query predictions. Otherwise the response will only return Place predictions.", +"type": "boolean" +}, +"includedPrimaryTypes": { +"description": "Optional. Included primary Place type (for example, \"restaurant\" or \"gas_station\") from https://developers.google.com/maps/documentation/places/web-service/place-types. A Place is only returned if its primary type is included in this list. Up to 5 values can be specified. If no types are specified, all Place types are returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"includedRegionCodes": { +"description": "Optional. Only include results in the specified regions, specified as up to 15 CLDR two-character region codes. An empty set will not restrict the results. If both `location_restriction` and `included_region_codes` are set, the results will be located in the area of intersection.", +"items": { +"type": "string" +}, +"type": "array" +}, +"input": { +"description": "Required. The text string on which to search.", +"type": "string" +}, +"inputOffset": { +"description": "Optional. A zero-based Unicode character offset of `input` indicating the cursor position in `input`. The cursor position may influence what predictions are returned. If empty, defaults to the length of `input`.", +"format": "int32", +"type": "integer" +}, +"languageCode": { +"description": "Optional. The language in which to return results. Defaults to en-US. The results may be in mixed languages if the language used in `input` is different from `language_code` or if the returned Place does not have a translation from the local language to `language_code`.", +"type": "string" +}, +"locationBias": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias", +"description": "Optional. Bias results to a specified location. At most one of `location_bias` or `location_restriction` should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal." +}, +"locationRestriction": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction", +"description": "Optional. Restrict results to a specified location. At most one of `location_bias` or `location_restriction` should be set. If neither are set, the results will be biased by IP address, meaning the IP address will be mapped to an imprecise location and used as a biasing signal." +}, +"origin": { +"$ref": "GoogleTypeLatLng", +"description": "Optional. The origin point from which to calculate geodesic distance to the destination (returned as `distance_meters`). If this value is omitted, geodesic distance will not be returned." +}, +"regionCode": { +"description": "Optional. The region code, specified as a CLDR two-character region code. This affects address formatting, result ranking, and may influence what results are returned. This does not restrict results to the specified region. To restrict results to a region, use `region_code_restriction`.", +"type": "string" +}, +"sessionToken": { +"description": "Optional. A string which identifies an Autocomplete session for billing purposes. Must be a URL and filename safe base64 string with at most 36 ASCII characters in length. Otherwise an INVALID_ARGUMENT error is returned. The session begins when the user starts typing a query, and concludes when they select a place and a call to Place Details or Address Validation is made. Each session can have multiple queries, followed by one Place Details or Address Validation request. The credentials used for each request within a session must belong to the same Google Cloud Console project. Once a session has concluded, the token is no longer valid; your app must generate a fresh token for each session. If the `session_token` parameter is omitted, or if you reuse a session token, the session is charged as if no session token was provided (each request is billed separately). We recommend the following guidelines: * Use session tokens for all Place Autocomplete calls. * Generate a fresh token for each session. Using a version 4 UUID is recommended. * Ensure that the credentials used for all Place Autocomplete, Place Details, and Address Validation requests within a session belong to the same Cloud Console project. * Be sure to pass a unique session token for each new session. Using the same token for more than one session will result in each request being billed individually.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias": { +"description": "The region to search. The results may be biased around the specified region.", +"id": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationBias", +"properties": { +"circle": { +"$ref": "GoogleMapsPlacesV1Circle", +"description": "A circle defined by a center point and radius." +}, +"rectangle": { +"$ref": "GoogleGeoTypeViewport", +"description": "A viewport defined by a northeast and a southwest corner." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction": { +"description": "The region to search. The results will be restricted to the specified region.", +"id": "GoogleMapsPlacesV1AutocompletePlacesRequestLocationRestriction", +"properties": { +"circle": { +"$ref": "GoogleMapsPlacesV1Circle", +"description": "A circle defined by a center point and radius." +}, +"rectangle": { +"$ref": "GoogleGeoTypeViewport", +"description": "A viewport defined by a northeast and a southwest corner." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesResponse": { +"description": "Response proto for AutocompletePlaces.", +"id": "GoogleMapsPlacesV1AutocompletePlacesResponse", +"properties": { +"suggestions": { +"description": "Contains a list of suggestions, ordered in descending order of relevance.", +"items": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion": { +"description": "An Autocomplete suggestion result.", +"id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestion", +"properties": { +"placePrediction": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction", +"description": "A prediction for a Place." +}, +"queryPrediction": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction", +"description": "A prediction for a query." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText": { +"description": "Text representing a Place or query prediction. The text may be used as is or formatted.", +"id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", +"properties": { +"matches": { +"description": "A list of string ranges identifying where the input request matched in `text`. The ranges can be used to format specific parts of `text`. The substrings may not be exact matches of `input` if the matching was determined by criteria other than string matching (for example, spell corrections or transliterations). These values are Unicode character offsets of `text`. The ranges are guaranteed to be ordered in increasing offset values.", +"items": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange" +}, +"type": "array" +}, +"text": { +"description": "Text that may be used as is or formatted with `matches`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction": { +"description": "Prediction results for a Place Autocomplete prediction.", +"id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionPlacePrediction", +"properties": { +"distanceMeters": { +"description": "The length of the geodesic in meters from `origin` if `origin` is specified. Certain predictions such as routes may not populate this field.", +"format": "int32", +"type": "integer" +}, +"place": { +"description": "The resource name of the suggested Place. This name can be used in other APIs that accept Place names.", +"type": "string" +}, +"placeId": { +"description": "The unique identifier of the suggested Place. This identifier can be used in other APIs that accept Place IDs.", +"type": "string" +}, +"structuredFormat": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", +"description": "A breakdown of the Place prediction into main text containing the name of the Place and secondary text containing additional disambiguating features (such as a city or region). `structured_format` is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to use `text` instead. They are two different ways to represent a Place prediction. Users should not try to parse `structured_format` into `text` or vice versa." +}, +"text": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", +"description": "Contains the human-readable name for the returned result. For establishment results, this is usually the business name and address. `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a Place prediction. Users should not try to parse `structured_format` into `text` or vice versa. This text may be different from the `display_name` returned by GetPlace. May be in mixed languages if the request `input` and `language_code` are in different languages or if the Place does not have a translation from the local language to `language_code`." +}, +"types": { +"description": "List of types that apply to this Place from Table A or Table B in https://developers.google.com/maps/documentation/places/web-service/place-types. A type is a categorization of a Place. Places with shared types will share similar characteristics.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction": { +"description": "Prediction results for a Query Autocomplete prediction.", +"id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionQueryPrediction", +"properties": { +"structuredFormat": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", +"description": "A breakdown of the query prediction into main text containing the query and secondary text containing additional disambiguating features (such as a city or region). `structured_format` is recommended for developers who wish to show two separate, but related, UI elements. Developers who wish to show a single UI element may want to use `text` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa." +}, +"text": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", +"description": "The predicted text. This text does not represent a Place, but rather a text query that could be used in a search endpoint (for example, Text Search). `text` is recommended for developers who wish to show a single UI element. Developers who wish to show two separate, but related, UI elements may want to use `structured_format` instead. They are two different ways to represent a query prediction. Users should not try to parse `structured_format` into `text` or vice versa. May be in mixed languages if the request `input` and `language_code` are in different languages or if part of the query does not have a translation from the local language to `language_code`." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange": { +"description": "Identifies a substring within a given text.", +"id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStringRange", +"properties": { +"endOffset": { +"description": "Zero-based offset of the last Unicode character (exclusive).", +"format": "int32", +"type": "integer" +}, +"startOffset": { +"description": "Zero-based offset of the first Unicode character of the string (inclusive).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat": { +"description": "Contains a breakdown of a Place or query prediction into main text and secondary text. For Place predictions, the main text contains the specific name of the Place. For query predictions, the main text contains the query. The secondary text contains additional disambiguating features (such as a city or region) to further identify the Place or refine the query.", +"id": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionStructuredFormat", +"properties": { +"mainText": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", +"description": "Represents the name of the Place or query." +}, +"secondaryText": { +"$ref": "GoogleMapsPlacesV1AutocompletePlacesResponseSuggestionFormattableText", +"description": "Represents additional disambiguating features (such as a city or region) to further identify the Place or refine the query." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1Circle": { +"description": "Circle with a LatLng as center and radius.", +"id": "GoogleMapsPlacesV1Circle", +"properties": { +"center": { +"$ref": "GoogleTypeLatLng", +"description": "Required. Center latitude and longitude. The range of latitude must be within [-90.0, 90.0]. The range of the longitude must be within [-180.0, 180.0]." +}, +"radius": { +"description": "Required. Radius measured in meters. The radius must be within [0.0, 50000.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1EVChargeOptions": { +"description": "Information about the EV Charge Station hosted in Place. Terminology follows https://afdc.energy.gov/fuels/electricity_infrastructure.html One port could charge one car at a time. One port has one or more connectors. One station has one or more ports.", +"id": "GoogleMapsPlacesV1EVChargeOptions", +"properties": { +"connectorAggregation": { +"description": "A list of EV charging connector aggregations that contain connectors of the same type and same charge rate.", +"items": { +"$ref": "GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation" +}, +"type": "array" +}, +"connectorCount": { +"description": "Number of connectors at this station. However, because some ports can have multiple connectors but only be able to charge one car at a time (e.g.) the number of connectors may be greater than the total number of cars which can charge simultaneously.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation": { +"description": "EV charging information grouped by [type, max_charge_rate_kw]. Shows EV charge aggregation of connectors that have the same type and max charge rate in kw.", +"id": "GoogleMapsPlacesV1EVChargeOptionsConnectorAggregation", +"properties": { +"availabilityLastUpdateTime": { +"description": "The timestamp when the connector availability information in this aggregation was last updated.", +"format": "google-datetime", +"type": "string" +}, +"availableCount": { +"description": "Number of connectors in this aggregation that are currently available.", +"format": "int32", +"type": "integer" +}, +"count": { +"description": "Number of connectors in this aggregation.", +"format": "int32", +"type": "integer" +}, +"maxChargeRateKw": { +"description": "The static max charging rate in kw of each connector in the aggregation.", +"format": "double", +"type": "number" +}, +"outOfServiceCount": { +"description": "Number of connectors in this aggregation that are currently out of service.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "The connector type of this aggregation.", +"enum": [ +"EV_CONNECTOR_TYPE_UNSPECIFIED", +"EV_CONNECTOR_TYPE_OTHER", +"EV_CONNECTOR_TYPE_J1772", +"EV_CONNECTOR_TYPE_TYPE_2", +"EV_CONNECTOR_TYPE_CHADEMO", +"EV_CONNECTOR_TYPE_CCS_COMBO_1", +"EV_CONNECTOR_TYPE_CCS_COMBO_2", +"EV_CONNECTOR_TYPE_TESLA", +"EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T", +"EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET" +], +"enumDescriptions": [ +"Unspecified connector.", +"Other connector types.", +"J1772 type 1 connector.", +"IEC 62196 type 2 connector. Often referred to as MENNEKES.", +"CHAdeMO type connector.", +"Combined Charging System (AC and DC). Based on SAE. Type-1 J-1772 connector", +"Combined Charging System (AC and DC). Based on Type-2 Mennekes connector", +"The generic TESLA connector. This is NACS in the North America but can be non-NACS in other parts of the world (e.g. CCS Combo 2 (CCS2) or GB/T). This value is less representative of an actual connector type, and more represents the ability to charge a Tesla brand vehicle at a Tesla owned charging station.", +"GB/T type corresponds to the GB/T standard in China. This type covers all GB_T types.", +"Unspecified wall outlet." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1FuelOptions": { +"description": "The most recent information about fuel options in a gas station. This information is updated regularly.", +"id": "GoogleMapsPlacesV1FuelOptions", +"properties": { +"fuelPrices": { +"description": "The last known fuel price for each type of fuel this station has. There is one entry per fuel type this station has. Order is not important.", +"items": { +"$ref": "GoogleMapsPlacesV1FuelOptionsFuelPrice" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1FuelOptionsFuelPrice": { +"description": "Fuel price information for a given type.", +"id": "GoogleMapsPlacesV1FuelOptionsFuelPrice", +"properties": { +"price": { +"$ref": "GoogleTypeMoney", +"description": "The price of the fuel." +}, +"type": { +"description": "The type of fuel.", +"enum": [ +"FUEL_TYPE_UNSPECIFIED", +"DIESEL", +"REGULAR_UNLEADED", +"MIDGRADE", +"PREMIUM", +"SP91", +"SP91_E10", +"SP92", +"SP95", +"SP95_E10", +"SP98", +"SP99", +"SP100", +"LPG", +"E80", +"E85", +"METHANE", +"BIO_DIESEL", +"TRUCK_DIESEL" +], +"enumDescriptions": [ +"Unspecified fuel type.", +"Diesel fuel.", +"Regular unleaded.", +"Midgrade.", +"Premium.", +"SP 91.", +"SP 91 E10.", +"SP 92.", +"SP 95.", +"SP95 E10.", +"SP 98.", +"SP 99.", +"SP 100.", +"LPG.", +"E 80.", +"E 85.", +"Methane.", +"Bio-diesel.", +"Truck diesel." +], +"type": "string" +}, +"updateTime": { +"description": "The time the fuel price was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1Photo": { +"description": "Information about a photo of a place.", +"id": "GoogleMapsPlacesV1Photo", +"properties": { +"authorAttributions": { +"description": "This photo's authors.", +"items": { +"$ref": "GoogleMapsPlacesV1AuthorAttribution" +}, +"type": "array" +}, +"heightPx": { +"description": "The maximum available height, in pixels.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Identifier. A reference representing this place photo which may be used to look up this place photo again (also called the API \"resource\" name: `places/{place_id}/photos/{photo}`).", +"type": "string" +}, +"widthPx": { +"description": "The maximum available width, in pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PhotoMedia": { +"description": "A photo media from Places API.", +"id": "GoogleMapsPlacesV1PhotoMedia", +"properties": { +"name": { +"description": "The resource name of a photo media in the format: `places/{place_id}/photos/{photo_reference}/media`.", +"type": "string" +}, +"photoUri": { +"description": "A short-lived uri that can be used to render the photo.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1Place": { +"description": "All the information representing a Place.", +"id": "GoogleMapsPlacesV1Place", +"properties": { +"accessibilityOptions": { +"$ref": "GoogleMapsPlacesV1PlaceAccessibilityOptions", +"description": "Information about the accessibility options a place offers." +}, +"addressComponents": { +"description": "Repeated components for each locality level. Note the following facts about the address_components[] array: - The array of address components may contain more components than the formatted_address. - The array does not necessarily include all the political entities that contain an address, apart from those included in the formatted_address. To retrieve all the political entities that contain a specific address, you should use reverse geocoding, passing the latitude/longitude of the address as a parameter to the request. - The format of the response is not guaranteed to remain the same between requests. In particular, the number of address_components varies based on the address requested and can change over time for the same address. A component can change position in the array. The type of the component can change. A particular component may be missing in a later response.", +"items": { +"$ref": "GoogleMapsPlacesV1PlaceAddressComponent" +}, +"type": "array" +}, +"adrFormatAddress": { +"description": "The place's address in adr microformat: http://microformats.org/wiki/adr.", +"type": "string" +}, +"allowsDogs": { +"description": "Place allows dogs.", +"type": "boolean" +}, +"attributions": { +"description": "A set of data provider that must be shown with this result.", +"items": { +"$ref": "GoogleMapsPlacesV1PlaceAttribution" +}, +"type": "array" +}, +"businessStatus": { +"description": "The business status for the place.", +"enum": [ +"BUSINESS_STATUS_UNSPECIFIED", +"OPERATIONAL", +"CLOSED_TEMPORARILY", +"CLOSED_PERMANENTLY" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The establishment is operational, not necessarily open now.", +"The establishment is temporarily closed.", +"The establishment is permanently closed." +], +"type": "string" +}, +"curbsidePickup": { +"description": "Specifies if the business supports curbside pickup.", +"type": "boolean" +}, +"currentOpeningHours": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHours", +"description": "The hours of operation for the next seven days (including today). The time period starts at midnight on the date of the request and ends at 11:59 pm six days later. This field includes the special_days subfield of all hours, set for dates that have exceptional hours." +}, +"currentSecondaryOpeningHours": { +"description": "Contains an array of entries for the next seven days including information about secondary hours of a business. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place. This field includes the special_days subfield of all hours, set for dates that have exceptional hours.", +"items": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHours" +}, +"type": "array" +}, +"delivery": { +"description": "Specifies if the business supports delivery.", +"type": "boolean" +}, +"dineIn": { +"description": "Specifies if the business supports indoor or outdoor seating options.", +"type": "boolean" +}, +"displayName": { +"$ref": "GoogleTypeLocalizedText", +"description": "The localized name of the place, suitable as a short human-readable description. For example, \"Google Sydney\", \"Starbucks\", \"Pyrmont\", etc." +}, +"editorialSummary": { +"$ref": "GoogleTypeLocalizedText", +"description": "Contains a summary of the place. A summary is comprised of a textual overview, and also includes the language code for these if applicable. Summary text must be presented as-is and can not be modified or altered." +}, +"evChargeOptions": { +"$ref": "GoogleMapsPlacesV1EVChargeOptions", +"description": "Information of ev charging options." +}, +"formattedAddress": { +"description": "A full, human-readable address for this place.", +"type": "string" +}, +"fuelOptions": { +"$ref": "GoogleMapsPlacesV1FuelOptions", +"description": "The most recent information about fuel options in a gas station. This information is updated regularly." +}, +"goodForChildren": { +"description": "Place is good for children.", +"type": "boolean" +}, +"goodForGroups": { +"description": "Place accommodates groups.", +"type": "boolean" +}, +"goodForWatchingSports": { +"description": "Place is suitable for watching sports.", +"type": "boolean" +}, +"googleMapsUri": { +"description": "A URL providing more information about this place.", +"type": "string" +}, +"iconBackgroundColor": { +"description": "Background color for icon_mask in hex format, e.g. #909CE1.", +"type": "string" +}, +"iconMaskBaseUri": { +"description": "A truncated URL to an icon mask. User can access different icon type by appending type suffix to the end (eg, \".svg\" or \".png\").", +"type": "string" +}, +"id": { +"description": "The unique identifier of a place.", +"type": "string" +}, +"internationalPhoneNumber": { +"description": "A human-readable phone number for the place, in international format.", +"type": "string" +}, +"liveMusic": { +"description": "Place provides live music.", +"type": "boolean" +}, +"location": { +"$ref": "GoogleTypeLatLng", +"description": "The position of this place." +}, +"menuForChildren": { +"description": "Place has a children's menu.", +"type": "boolean" +}, +"name": { +"description": "This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place.", +"type": "string" +}, +"nationalPhoneNumber": { +"description": "A human-readable phone number for the place, in national format.", +"type": "string" +}, +"outdoorSeating": { +"description": "Place provides outdoor seating.", +"type": "boolean" +}, +"parkingOptions": { +"$ref": "GoogleMapsPlacesV1PlaceParkingOptions", +"description": "Options of parking provided by the place." +}, +"paymentOptions": { +"$ref": "GoogleMapsPlacesV1PlacePaymentOptions", +"description": "Payment options the place accepts. If a payment option data is not available, the payment option field will be unset." +}, +"photos": { +"description": "Information (including references) about photos of this place. A maximum of 10 photos can be returned.", +"items": { +"$ref": "GoogleMapsPlacesV1Photo" +}, +"type": "array" +}, +"plusCode": { +"$ref": "GoogleMapsPlacesV1PlacePlusCode", +"description": "Plus code of the place location lat/long." +}, +"priceLevel": { +"description": "Price level of the place.", +"enum": [ +"PRICE_LEVEL_UNSPECIFIED", +"PRICE_LEVEL_FREE", +"PRICE_LEVEL_INEXPENSIVE", +"PRICE_LEVEL_MODERATE", +"PRICE_LEVEL_EXPENSIVE", +"PRICE_LEVEL_VERY_EXPENSIVE" +], +"enumDescriptions": [ +"Place price level is unspecified or unknown.", +"Place provides free services.", +"Place provides inexpensive services.", +"Place provides moderately priced services.", +"Place provides expensive services.", +"Place provides very expensive services." +], +"type": "string" +}, +"primaryType": { +"description": "The primary type of the given result. This type must one of the Places API supported types. For example, \"restaurant\", \"cafe\", \"airport\", etc. A place can only have a single primary type. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types", +"type": "string" +}, +"primaryTypeDisplayName": { +"$ref": "GoogleTypeLocalizedText", +"description": "The display name of the primary type, localized to the request language if applicable. For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types" +}, +"rating": { +"description": "A rating between 1.0 and 5.0, based on user reviews of this place.", +"format": "double", +"type": "number" +}, +"regularOpeningHours": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHours", +"description": "The regular hours of operation." +}, +"regularSecondaryOpeningHours": { +"description": "Contains an array of entries for information about regular secondary hours of a business. Secondary hours are different from a business's main hours. For example, a restaurant can specify drive through hours or delivery hours as its secondary hours. This field populates the type subfield, which draws from a predefined list of opening hours types (such as DRIVE_THROUGH, PICKUP, or TAKEOUT) based on the types of the place.", +"items": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHours" +}, +"type": "array" +}, +"reservable": { +"description": "Specifies if the place supports reservations.", +"type": "boolean" +}, +"restroom": { +"description": "Place has restroom.", +"type": "boolean" +}, +"reviews": { +"description": "List of reviews about this place, sorted by relevance. A maximum of 5 reviews can be returned.", +"items": { +"$ref": "GoogleMapsPlacesV1Review" +}, +"type": "array" +}, +"servesBeer": { +"description": "Specifies if the place serves beer.", +"type": "boolean" +}, +"servesBreakfast": { +"description": "Specifies if the place serves breakfast.", +"type": "boolean" +}, +"servesBrunch": { +"description": "Specifies if the place serves brunch.", +"type": "boolean" +}, +"servesCocktails": { +"description": "Place serves cocktails.", +"type": "boolean" +}, +"servesCoffee": { +"description": "Place serves coffee.", +"type": "boolean" +}, +"servesDessert": { +"description": "Place serves dessert.", +"type": "boolean" +}, +"servesDinner": { +"description": "Specifies if the place serves dinner.", +"type": "boolean" +}, +"servesLunch": { +"description": "Specifies if the place serves lunch.", +"type": "boolean" +}, +"servesVegetarianFood": { +"description": "Specifies if the place serves vegetarian food.", +"type": "boolean" +}, +"servesWine": { +"description": "Specifies if the place serves wine.", +"type": "boolean" +}, +"shortFormattedAddress": { +"description": "A short, human-readable address for this place.", +"type": "string" +}, +"subDestinations": { +"description": "A list of sub destinations related to the place.", +"items": { +"$ref": "GoogleMapsPlacesV1PlaceSubDestination" +}, +"type": "array" +}, +"takeout": { +"description": "Specifies if the business supports takeout.", +"type": "boolean" +}, +"types": { +"description": "A set of type tags for this result. For example, \"political\" and \"locality\". For the complete list of possible values, see Table A and Table B at https://developers.google.com/maps/documentation/places/web-service/place-types", +"items": { +"type": "string" +}, +"type": "array" +}, +"userRatingCount": { +"description": "The total number of reviews (with or without text) for this place.", +"format": "int32", +"type": "integer" +}, +"utcOffsetMinutes": { +"description": "Number of minutes this place's timezone is currently offset from UTC. This is expressed in minutes to support timezones that are offset by fractions of an hour, e.g. X hours and 15 minutes.", +"format": "int32", +"type": "integer" +}, +"viewport": { +"$ref": "GoogleGeoTypeViewport", +"description": "A viewport suitable for displaying the place on an average-sized map." +}, +"websiteUri": { +"description": "The authoritative website for this place, e.g. a business' homepage. Note that for places that are part of a chain (e.g. an IKEA store), this will usually be the website for the individual store, not the overall chain.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceAccessibilityOptions": { +"description": "Information about the accessibility options a place offers.", +"id": "GoogleMapsPlacesV1PlaceAccessibilityOptions", +"properties": { +"wheelchairAccessibleEntrance": { +"description": "Places has wheelchair accessible entrance.", +"type": "boolean" +}, +"wheelchairAccessibleParking": { +"description": "Place offers wheelchair accessible parking.", +"type": "boolean" +}, +"wheelchairAccessibleRestroom": { +"description": "Place has wheelchair accessible restroom.", +"type": "boolean" +}, +"wheelchairAccessibleSeating": { +"description": "Place has wheelchair accessible seating.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceAddressComponent": { +"description": "The structured components that form the formatted address, if this information is available.", +"id": "GoogleMapsPlacesV1PlaceAddressComponent", +"properties": { +"languageCode": { +"description": "The language used to format this components, in CLDR notation.", +"type": "string" +}, +"longText": { +"description": "The full text description or name of the address component. For example, an address component for the country Australia may have a long_name of \"Australia\".", +"type": "string" +}, +"shortText": { +"description": "An abbreviated textual name for the address component, if available. For example, an address component for the country of Australia may have a short_name of \"AU\".", +"type": "string" +}, +"types": { +"description": "An array indicating the type(s) of the address component.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceAttribution": { +"description": "Information about data providers of this place.", +"id": "GoogleMapsPlacesV1PlaceAttribution", +"properties": { +"provider": { +"description": "Name of the Place's data provider.", +"type": "string" +}, +"providerUri": { +"description": "URI to the Place's data provider.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceOpeningHours": { +"description": "Information about business hour of the place.", +"id": "GoogleMapsPlacesV1PlaceOpeningHours", +"properties": { +"openNow": { +"description": "Is this place open right now? Always present unless we lack time-of-day or timezone data for these opening hours.", +"type": "boolean" +}, +"periods": { +"description": "The periods that this place is open during the week. The periods are in chronological order, starting with Sunday in the place-local timezone. An empty (but not absent) value indicates a place that is never open, e.g. because it is closed temporarily for renovations.", +"items": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHoursPeriod" +}, +"type": "array" +}, +"secondaryHoursType": { +"description": "A type string used to identify the type of secondary hours.", +"enum": [ +"SECONDARY_HOURS_TYPE_UNSPECIFIED", +"DRIVE_THROUGH", +"HAPPY_HOUR", +"DELIVERY", +"TAKEOUT", +"KITCHEN", +"BREAKFAST", +"LUNCH", +"DINNER", +"BRUNCH", +"PICKUP", +"ACCESS", +"SENIOR_HOURS", +"ONLINE_SERVICE_HOURS" +], +"enumDescriptions": [ +"Default value when secondary hour type is not specified.", +"The drive-through hour for banks, restaurants, or pharmacies.", +"The happy hour.", +"The delivery hour.", +"The takeout hour.", +"The kitchen hour.", +"The breakfast hour.", +"The lunch hour.", +"The dinner hour.", +"The brunch hour.", +"The pickup hour.", +"The access hours for storage places.", +"The special hours for seniors.", +"The online service hours." +], +"type": "string" +}, +"specialDays": { +"description": "Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, e.g. Christmas day. Set for current_opening_hours and current_secondary_opening_hours if there are exceptional hours.", +"items": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay" +}, +"type": "array" +}, +"weekdayDescriptions": { +"description": "Localized strings describing the opening hours of this place, one string for each day of the week. Will be empty if the hours are unknown or could not be converted to localized text. Example: \"Sun: 18:00\u201306:00\"", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceOpeningHoursPeriod": { +"description": "A period the place remains in open_now status.", +"id": "GoogleMapsPlacesV1PlaceOpeningHoursPeriod", +"properties": { +"close": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint", +"description": "The time that the place starts to be closed." +}, +"open": { +"$ref": "GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint", +"description": "The time that the place starts to be open." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint": { +"description": "Status changing points.", +"id": "GoogleMapsPlacesV1PlaceOpeningHoursPeriodPoint", +"properties": { +"date": { +"$ref": "GoogleTypeDate", +"description": "Date in the local timezone for the place." +}, +"day": { +"description": "A day of the week, as an integer in the range 0-6. 0 is Sunday, 1 is Monday, etc.", +"format": "int32", +"type": "integer" +}, +"hour": { +"description": "The hour in 2 digits. Ranges from 00 to 23.", +"format": "int32", +"type": "integer" +}, +"minute": { +"description": "The minute in 2 digits. Ranges from 00 to 59.", +"format": "int32", +"type": "integer" +}, +"truncated": { +"description": "Whether or not this endpoint was truncated. Truncation occurs when the real hours are outside the times we are willing to return hours between, so we truncate the hours back to these boundaries. This ensures that at most 24 * 7 hours from midnight of the day of the request are returned.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay": { +"description": "Structured information for special days that fall within the period that the returned opening hours cover. Special days are days that could impact the business hours of a place, e.g. Christmas day.", +"id": "GoogleMapsPlacesV1PlaceOpeningHoursSpecialDay", +"properties": { +"date": { +"$ref": "GoogleTypeDate", +"description": "The date of this special day." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceParkingOptions": { +"description": "Information about parking options for the place. A parking lot could support more than one option at the same time.", +"id": "GoogleMapsPlacesV1PlaceParkingOptions", +"properties": { +"freeGarageParking": { +"description": "Place offers free garage parking.", +"type": "boolean" +}, +"freeParkingLot": { +"description": "Place offers free parking lots.", +"type": "boolean" +}, +"freeStreetParking": { +"description": "Place offers free street parking.", +"type": "boolean" +}, +"paidGarageParking": { +"description": "Place offers paid garage parking.", +"type": "boolean" +}, +"paidParkingLot": { +"description": "Place offers paid parking lots.", +"type": "boolean" +}, +"paidStreetParking": { +"description": "Place offers paid street parking.", +"type": "boolean" +}, +"valetParking": { +"description": "Place offers valet parking.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlacePaymentOptions": { +"description": "Payment options the place accepts.", +"id": "GoogleMapsPlacesV1PlacePaymentOptions", +"properties": { +"acceptsCashOnly": { +"description": "Place accepts cash only as payment. Places with this attribute may still accept other payment methods.", +"type": "boolean" +}, +"acceptsCreditCards": { +"description": "Place accepts credit cards as payment.", +"type": "boolean" +}, +"acceptsDebitCards": { +"description": "Place accepts debit cards as payment.", +"type": "boolean" +}, +"acceptsNfc": { +"description": "Place accepts NFC payments.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlacePlusCode": { +"description": "Plus code (http://plus.codes) is a location reference with two formats: global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle, and compound code, replacing the prefix with a reference location.", +"id": "GoogleMapsPlacesV1PlacePlusCode", +"properties": { +"compoundCode": { +"description": "Place's compound code, such as \"33GV+HQ, Ramberg, Norway\", containing the suffix of the global code and replacing the prefix with a formatted name of a reference entity.", +"type": "string" +}, +"globalCode": { +"description": "Place's global (full) code, such as \"9FWM33GV+HQ\", representing an 1/8000 by 1/8000 degree area (~14 by 14 meters).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1PlaceSubDestination": { +"description": "Place resource name and id of sub destinations that relate to the place. For example, different terminals are different destinations of an airport.", +"id": "GoogleMapsPlacesV1PlaceSubDestination", +"properties": { +"id": { +"description": "The place id of the sub destination.", +"type": "string" +}, +"name": { +"description": "The resource name of the sub destination.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1Review": { +"description": "Information about a review of a place.", +"id": "GoogleMapsPlacesV1Review", +"properties": { +"authorAttribution": { +"$ref": "GoogleMapsPlacesV1AuthorAttribution", +"description": "This review's author." +}, +"name": { +"description": "A reference representing this place review which may be used to look up this place review again (also called the API \"resource\" name: `places/{place_id}/reviews/{review}`).", +"type": "string" +}, +"originalText": { +"$ref": "GoogleTypeLocalizedText", +"description": "The review text in its original language." +}, +"publishTime": { +"description": "Timestamp for the review.", +"format": "google-datetime", +"type": "string" +}, +"rating": { +"description": "A number between 1.0 and 5.0, also called the number of stars.", +"format": "double", +"type": "number" +}, +"relativePublishTimeDescription": { +"description": "A string of formatted recent time, expressing the review time relative to the current time in a form appropriate for the language and country.", +"type": "string" +}, +"text": { +"$ref": "GoogleTypeLocalizedText", +"description": "The localized text of the review." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchNearbyRequest": { +"description": "Request proto for Search Nearby. ", +"id": "GoogleMapsPlacesV1SearchNearbyRequest", +"properties": { +"excludedPrimaryTypes": { +"description": "Excluded primary Place type (e.g. \"restaurant\" or \"gas_station\") from https://developers.google.com/maps/documentation/places/web-service/place-types. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [\"restaurant\"], excluded_primary_types = [\"restaurant\"]}, the returned places provide \"restaurant\" related services but do not operate primarily as \"restaurants\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"excludedTypes": { +"description": "Excluded Place type (eg, \"restaurant\" or \"gas_station\") from https://developers.google.com/maps/documentation/places/web-service/place-types. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If the client provides both included_types (e.g. restaurant) and excluded_types (e.g. cafe), then the response should include places that are restaurant but not cafe. The response includes places that match at least one of the included_types and none of the excluded_types. If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [\"restaurant\"], excluded_primary_types = [\"restaurant\"]}, the returned places provide \"restaurant\" related services but do not operate primarily as \"restaurants\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"includedPrimaryTypes": { +"description": "Included primary Place type (e.g. \"restaurant\" or \"gas_station\") from https://developers.google.com/maps/documentation/places/web-service/place-types. A place can only have a single primary type from the supported types table associated with it. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If there are any conflicting primary types, i.e. a type appears in both included_primary_types and excluded_primary_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [\"restaurant\"], excluded_primary_types = [\"restaurant\"]}, the returned places provide \"restaurant\" related services but do not operate primarily as \"restaurants\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"includedTypes": { +"description": "Included Place type (eg, \"restaurant\" or \"gas_station\") from https://developers.google.com/maps/documentation/places/web-service/place-types. Up to 50 types from [Table A](https://developers.google.com/maps/documentation/places/web-service/place-types#table-a) may be specified. If there are any conflicting types, i.e. a type appears in both included_types and excluded_types, an INVALID_ARGUMENT error is returned. If a Place type is specified with multiple type restrictions, only places that satisfy all of the restrictions are returned. For example, if we have {included_types = [\"restaurant\"], excluded_primary_types = [\"restaurant\"]}, the returned places provide \"restaurant\" related services but do not operate primarily as \"restaurants\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"languageCode": { +"description": "Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.", +"type": "string" +}, +"locationRestriction": { +"$ref": "GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction", +"description": "Required. The region to search." +}, +"maxResultCount": { +"description": "Maximum number of results to return. It must be between 1 and 20 (default), inclusively. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"rankPreference": { +"description": "How results will be ranked in the response.", +"enum": [ +"RANK_PREFERENCE_UNSPECIFIED", +"DISTANCE", +"POPULARITY" +], +"enumDescriptions": [ +"RankPreference value not set. Will use rank by POPULARITY by default.", +"Ranks results by distance.", +"Ranks results by popularity." +], +"type": "string" +}, +"regionCode": { +"description": "The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction": { +"description": "The region to search.", +"id": "GoogleMapsPlacesV1SearchNearbyRequestLocationRestriction", +"properties": { +"circle": { +"$ref": "GoogleMapsPlacesV1Circle", +"description": "A circle defined by center point and radius." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchNearbyResponse": { +"description": "Response proto for Search Nearby. ", +"id": "GoogleMapsPlacesV1SearchNearbyResponse", +"properties": { +"places": { +"description": "A list of places that meets user's requirements like places types, number of places and specific location restriction.", +"items": { +"$ref": "GoogleMapsPlacesV1Place" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchTextRequest": { +"description": "Request proto for SearchText. ", +"id": "GoogleMapsPlacesV1SearchTextRequest", +"properties": { +"evOptions": { +"$ref": "GoogleMapsPlacesV1SearchTextRequestEVOptions", +"description": "Optional. Set the searchable EV options of a place search request." +}, +"includedType": { +"description": "The requested place type. Full list of types supported: https://developers.google.com/maps/documentation/places/web-service/place-types. Only support one included type.", +"type": "string" +}, +"languageCode": { +"description": "Place details will be displayed with the preferred language if available. If the language code is unspecified or unrecognized, place details of any language may be returned, with a preference for English if such details exist. Current list of supported languages: https://developers.google.com/maps/faq#languagesupport.", +"type": "string" +}, +"locationBias": { +"$ref": "GoogleMapsPlacesV1SearchTextRequestLocationBias", +"description": "The region to search. This location serves as a bias which means results around given location might be returned. Cannot be set along with location_restriction." +}, +"locationRestriction": { +"$ref": "GoogleMapsPlacesV1SearchTextRequestLocationRestriction", +"description": "The region to search. This location serves as a restriction which means results outside given location will not be returned. Cannot be set along with location_bias." +}, +"maxResultCount": { +"description": "Maximum number of results to return. It must be between 1 and 20, inclusively. The default is 20. If the number is unset, it falls back to the upper limit. If the number is set to negative or exceeds the upper limit, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"minRating": { +"description": "Filter out results whose average user rating is strictly less than this limit. A valid value must be a float between 0 and 5 (inclusively) at a 0.5 cadence i.e. [0, 0.5, 1.0, ... , 5.0] inclusively. The input rating will round up to the nearest 0.5(ceiling). For instance, a rating of 0.6 will eliminate all results with a less than 1.0 rating.", +"format": "double", +"type": "number" +}, +"openNow": { +"description": "Used to restrict the search to places that are currently open. The default is false.", +"type": "boolean" +}, +"priceLevels": { +"description": "Used to restrict the search to places that are marked as certain price levels. Users can choose any combinations of price levels. Default to select all price levels.", +"items": { +"enum": [ +"PRICE_LEVEL_UNSPECIFIED", +"PRICE_LEVEL_FREE", +"PRICE_LEVEL_INEXPENSIVE", +"PRICE_LEVEL_MODERATE", +"PRICE_LEVEL_EXPENSIVE", +"PRICE_LEVEL_VERY_EXPENSIVE" +], +"enumDescriptions": [ +"Place price level is unspecified or unknown.", +"Place provides free services.", +"Place provides inexpensive services.", +"Place provides moderately priced services.", +"Place provides expensive services.", +"Place provides very expensive services." +], +"type": "string" +}, +"type": "array" +}, +"rankPreference": { +"description": "How results will be ranked in the response.", +"enum": [ +"RANK_PREFERENCE_UNSPECIFIED", +"DISTANCE", +"RELEVANCE" +], +"enumDescriptions": [ +"RankPreference value not set. Will default to DISTANCE.", +"Ranks results by distance.", +"Ranks results by relevance. Sort order determined by normal ranking stack." +], +"type": "string" +}, +"regionCode": { +"description": "The Unicode country/region code (CLDR) of the location where the request is coming from. This parameter is used to display the place details, like region-specific place name, if available. The parameter can affect results based on applicable law. For more information, see https://www.unicode.org/cldr/charts/latest/supplemental/territory_language_information.html. Note that 3-digit region codes are not currently supported.", +"type": "string" +}, +"strictTypeFiltering": { +"description": "Used to set strict type filtering for included_type. If set to true, only results of the same type will be returned. Default to false.", +"type": "boolean" +}, +"textQuery": { +"description": "Required. The text query for textual search.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchTextRequestEVOptions": { +"description": "Searchable EV options of a place search request.", +"id": "GoogleMapsPlacesV1SearchTextRequestEVOptions", +"properties": { +"connectorTypes": { +"description": "Optional. The list of preferred EV connector types. A place that does not support any of the listed connector types is filtered out.", +"items": { +"enum": [ +"EV_CONNECTOR_TYPE_UNSPECIFIED", +"EV_CONNECTOR_TYPE_OTHER", +"EV_CONNECTOR_TYPE_J1772", +"EV_CONNECTOR_TYPE_TYPE_2", +"EV_CONNECTOR_TYPE_CHADEMO", +"EV_CONNECTOR_TYPE_CCS_COMBO_1", +"EV_CONNECTOR_TYPE_CCS_COMBO_2", +"EV_CONNECTOR_TYPE_TESLA", +"EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T", +"EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET" +], +"enumDescriptions": [ +"Unspecified connector.", +"Other connector types.", +"J1772 type 1 connector.", +"IEC 62196 type 2 connector. Often referred to as MENNEKES.", +"CHAdeMO type connector.", +"Combined Charging System (AC and DC). Based on SAE. Type-1 J-1772 connector", +"Combined Charging System (AC and DC). Based on Type-2 Mennekes connector", +"The generic TESLA connector. This is NACS in the North America but can be non-NACS in other parts of the world (e.g. CCS Combo 2 (CCS2) or GB/T). This value is less representative of an actual connector type, and more represents the ability to charge a Tesla brand vehicle at a Tesla owned charging station.", +"GB/T type corresponds to the GB/T standard in China. This type covers all GB_T types.", +"Unspecified wall outlet." +], +"type": "string" +}, +"type": "array" +}, +"minimumChargingRateKw": { +"description": "Optional. Minimum required charging rate in kilowatts. A place with a charging rate less than the specified rate is filtered out.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchTextRequestLocationBias": { +"description": "The region to search. This location serves as a bias which means results around given location might be returned.", +"id": "GoogleMapsPlacesV1SearchTextRequestLocationBias", +"properties": { +"circle": { +"$ref": "GoogleMapsPlacesV1Circle", +"description": "A circle defined by center point and radius." +}, +"rectangle": { +"$ref": "GoogleGeoTypeViewport", +"description": "A rectangle box defined by northeast and southwest corner. `rectangle.high()` must be the northeast point of the rectangle viewport. `rectangle.low()` must be the southwest point of the rectangle viewport. `rectangle.low().latitude()` cannot be greater than `rectangle.high().latitude()`. This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchTextRequestLocationRestriction": { +"description": "The region to search. This location serves as a restriction which means results outside given location will not be returned.", +"id": "GoogleMapsPlacesV1SearchTextRequestLocationRestriction", +"properties": { +"rectangle": { +"$ref": "GoogleGeoTypeViewport", +"description": "A rectangle box defined by northeast and southwest corner. `rectangle.high()` must be the northeast point of the rectangle viewport. `rectangle.low()` must be the southwest point of the rectangle viewport. `rectangle.low().latitude()` cannot be greater than `rectangle.high().latitude()`. This will result in an empty latitude range. A rectangle viewport cannot be wider than 180 degrees." +} +}, +"type": "object" +}, +"GoogleMapsPlacesV1SearchTextResponse": { +"description": "Response proto for SearchText. ", +"id": "GoogleMapsPlacesV1SearchTextResponse", +"properties": { +"places": { +"description": "A list of places that meet the user's text search criteria.", +"items": { +"$ref": "GoogleMapsPlacesV1Place" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleTypeDate": { +"description": "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, 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", +"id": "GoogleTypeDate", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleTypeLatLng": { +"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", +"id": "GoogleTypeLatLng", +"properties": { +"latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleTypeLocalizedText": { +"description": "Localized variant of a text in a particular language.", +"id": "GoogleTypeLocalizedText", +"properties": { +"languageCode": { +"description": "The text's BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"text": { +"description": "Localized string in the language corresponding to language_code below.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeMoney": { +"description": "Represents an amount of money with its currency type.", +"id": "GoogleTypeMoney", +"properties": { +"currencyCode": { +"description": "The three-letter currency code defined in ISO 4217.", +"type": "string" +}, +"nanos": { +"description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", +"format": "int32", +"type": "integer" +}, +"units": { +"description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Places API (New)", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playablelocations.v3.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playablelocations.v3.json new file mode 100644 index 0000000000000000000000000000000000000000..4ced29754fcf0d1c2677769da505488662456894 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playablelocations.v3.json @@ -0,0 +1,528 @@ +{ + "basePath": "", + "baseUrl": "https://playablelocations.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Playable Locations", + "description": "", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/maps/contact-sales/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "playablelocations:v3", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://playablelocations.mtls.googleapis.com/", + "name": "playablelocations", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "v3": { + "methods": { + "logImpressions": { + "description": "Logs new events when playable locations are displayed, and when they are interacted with. Impressions are not partially saved; either all impressions are saved and this request succeeds, or no impressions are saved, and this request fails.", + "flatPath": "v3:logImpressions", + "httpMethod": "POST", + "id": "playablelocations.logImpressions", + "parameterOrder": [], + "parameters": {}, + "path": "v3:logImpressions", + "request": { + "$ref": "GoogleMapsPlayablelocationsV3LogImpressionsRequest" + }, + "response": { + "$ref": "GoogleMapsPlayablelocationsV3LogImpressionsResponse" + } + }, + "logPlayerReports": { + "description": "Logs bad playable location reports submitted by players. Reports are not partially saved; either all reports are saved and this request succeeds, or no reports are saved, and this request fails.", + "flatPath": "v3:logPlayerReports", + "httpMethod": "POST", + "id": "playablelocations.logPlayerReports", + "parameterOrder": [], + "parameters": {}, + "path": "v3:logPlayerReports", + "request": { + "$ref": "GoogleMapsPlayablelocationsV3LogPlayerReportsRequest" + }, + "response": { + "$ref": "GoogleMapsPlayablelocationsV3LogPlayerReportsResponse" + } + }, + "samplePlayableLocations": { + "description": "Returns a set of playable locations that lie within a specified area, that satisfy optional filter criteria. Note: Identical `SamplePlayableLocations` requests can return different results as the state of the world changes over time.", + "flatPath": "v3:samplePlayableLocations", + "httpMethod": "POST", + "id": "playablelocations.samplePlayableLocations", + "parameterOrder": [], + "parameters": {}, + "path": "v3:samplePlayableLocations", + "request": { + "$ref": "GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest" + }, + "response": { + "$ref": "GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse" + } + } + } + } + }, + "revision": "20211008", + "rootUrl": "https://playablelocations.googleapis.com/", + "schemas": { + "GoogleMapsPlayablelocationsV3Impression": { + "description": "Encapsulates impression event details.", + "id": "GoogleMapsPlayablelocationsV3Impression", + "properties": { + "gameObjectType": { + "description": "An arbitrary, developer-defined type identifier for each type of game object used in your game. Since players interact with differ types of game objects in different ways, this field allows you to segregate impression data by type for analysis. You should assign a unique `game_object_type` ID to represent a distinct type of game object in your game. For example, 1=monster location, 2=powerup location.", + "format": "int32", + "type": "integer" + }, + "impressionType": { + "description": "Required. The type of impression event.", + "enum": [ + "IMPRESSION_TYPE_UNSPECIFIED", + "PRESENTED", + "INTERACTED" + ], + "enumDescriptions": [ + "Unspecified type. Do not use.", + "The playable location was presented to a player.", + "A player interacted with the playable location." + ], + "type": "string" + }, + "locationName": { + "description": "Required. The name of the playable location.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3LogImpressionsRequest": { + "description": "A request for logging impressions.", + "id": "GoogleMapsPlayablelocationsV3LogImpressionsRequest", + "properties": { + "clientInfo": { + "$ref": "GoogleMapsUnityClientInfo", + "description": "Required. Information about the client device. For example, device model and operating system." + }, + "impressions": { + "description": "Required. Impression event details. The maximum number of impression reports that you can log at once is 50.", + "items": { + "$ref": "GoogleMapsPlayablelocationsV3Impression" + }, + "type": "array" + }, + "requestId": { + "description": "Required. A string that uniquely identifies the log impressions request. This allows you to detect duplicate requests. We recommend that you use UUIDs for this value. The value must not exceed 50 characters. You should reuse the `request_id` only when retrying a request in case of failure. In this case, the request must be identical to the one that failed.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3LogImpressionsResponse": { + "description": "A response for the LogImpressions method. This method returns no data upon success.", + "id": "GoogleMapsPlayablelocationsV3LogImpressionsResponse", + "properties": {}, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3LogPlayerReportsRequest": { + "description": "A request for logging your player's bad location reports.", + "id": "GoogleMapsPlayablelocationsV3LogPlayerReportsRequest", + "properties": { + "clientInfo": { + "$ref": "GoogleMapsUnityClientInfo", + "description": "Required. Information about the client device (for example, device model and operating system)." + }, + "playerReports": { + "description": "Required. Player reports. The maximum number of player reports that you can log at once is 50.", + "items": { + "$ref": "GoogleMapsPlayablelocationsV3PlayerReport" + }, + "type": "array" + }, + "requestId": { + "description": "Required. A string that uniquely identifies the log player reports request. This allows you to detect duplicate requests. We recommend that you use UUIDs for this value. The value must not exceed 50 characters. You should reuse the `request_id` only when retrying a request in the case of a failure. In that case, the request must be identical to the one that failed.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3LogPlayerReportsResponse": { + "description": "A response for the LogPlayerReports method. This method returns no data upon success.", + "id": "GoogleMapsPlayablelocationsV3LogPlayerReportsResponse", + "properties": {}, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3PlayerReport": { + "description": "A report submitted by a player about a playable location that is considered inappropriate for use in the game.", + "id": "GoogleMapsPlayablelocationsV3PlayerReport", + "properties": { + "languageCode": { + "description": "Language code (in BCP-47 format) indicating the language of the freeform description provided in `reason_details`. Examples are \"en\", \"en-US\" or \"ja-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "type": "string" + }, + "locationName": { + "description": "Required. The name of the playable location.", + "type": "string" + }, + "reasonDetails": { + "description": "Required. A free-form description detailing why the playable location is considered bad.", + "type": "string" + }, + "reasons": { + "description": "Required. One or more reasons why this playable location is considered bad.", + "items": { + "enum": [ + "BAD_LOCATION_REASON_UNSPECIFIED", + "OTHER", + "NOT_PEDESTRIAN_ACCESSIBLE", + "NOT_OPEN_TO_PUBLIC", + "PERMANENTLY_CLOSED", + "TEMPORARILY_INACCESSIBLE" + ], + "enumDescriptions": [ + "Unspecified reason. Do not use.", + "The reason isn't one of the reasons in this enumeration.", + "The playable location isn't accessible to pedestrians. For example, if it's in the middle of a highway.", + "The playable location isn't open to the public. For example, a private office building.", + "The playable location is permanently closed. For example, when a business has been shut down.", + "The playable location is temporarily inaccessible. For example, when a business has closed for renovations." + ], + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SampleAreaFilter": { + "description": "Specifies the area to search for playable locations.", + "id": "GoogleMapsPlayablelocationsV3SampleAreaFilter", + "properties": { + "s2CellId": { + "description": "Required. The S2 cell ID of the area you want. This must be between cell level 11 and 14 (inclusive). S2 cells are 64-bit integers that identify areas on the Earth. They are hierarchical, and can therefore be used for spatial indexing. The S2 geometry library is available in a number of languages: * [C++](https://github.com/google/s2geometry) * [Java](https://github.com/google/s2-geometry-library-java) * [Go](https://github.com/golang/geo) * [Python](https://github.com/google/s2geometry/tree/master/src/python)", + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SampleCriterion": { + "description": "Encapsulates a filter criterion for searching for a set of playable locations.", + "id": "GoogleMapsPlayablelocationsV3SampleCriterion", + "properties": { + "fieldsToReturn": { + "description": "Specifies which `PlayableLocation` fields are returned. `name` (which is used for logging impressions), `center_point` and `place_id` (or `plus_code`) are always returned. The following fields are omitted unless you specify them here: * snapped_point * types Note: The more fields you include, the more expensive in terms of data and associated latency your query will be.", + "format": "google-fieldmask", + "type": "string" + }, + "filter": { + "$ref": "GoogleMapsPlayablelocationsV3SampleFilter", + "description": "Specifies filtering options, and specifies what will be included in the result set." + }, + "gameObjectType": { + "description": "Required. An arbitrary, developer-defined identifier of the type of game object that the playable location is used for. This field allows you to specify criteria per game object type when searching for playable locations. You should assign a unique `game_object_type` ID across all `request_criteria` to represent a distinct type of game object. For example, 1=monster location, 2=powerup location. The response contains a map.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SampleFilter": { + "description": "Specifies the filters to use when searching for playable locations.", + "id": "GoogleMapsPlayablelocationsV3SampleFilter", + "properties": { + "includedTypes": { + "description": "Restricts the set of playable locations to just the [types](/maps/documentation/gaming/tt/types) that you want.", + "items": { + "type": "string" + }, + "type": "array" + }, + "maxLocationCount": { + "description": "Specifies the maximum number of playable locations to return. This value must not be greater than 1000. The default value is 100. Only the top-ranking playable locations are returned.", + "format": "int32", + "type": "integer" + }, + "spacing": { + "$ref": "GoogleMapsPlayablelocationsV3SampleSpacingOptions", + "description": "A set of options that control the spacing between playable locations. By default the minimum distance between locations is 200m." + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SamplePlayableLocation": { + "description": "A geographical point suitable for placing game objects in location-based games.", + "id": "GoogleMapsPlayablelocationsV3SamplePlayableLocation", + "properties": { + "centerPoint": { + "$ref": "GoogleTypeLatLng", + "description": "Required. The latitude and longitude associated with the center of the playable location. By default, the set of playable locations returned from SamplePlayableLocations use center-point coordinates." + }, + "name": { + "description": "Required. The name of this playable location.", + "type": "string" + }, + "placeId": { + "description": "A [place ID] (https://developers.google.com/places/place-id)", + "type": "string" + }, + "plusCode": { + "description": "A [plus code] (http://openlocationcode.com)", + "type": "string" + }, + "snappedPoint": { + "$ref": "GoogleTypeLatLng", + "description": "The playable location's coordinates, snapped to the sidewalk of the nearest road, if a nearby road exists." + }, + "types": { + "description": "A collection of [Playable Location Types](/maps/documentation/gaming/tt/types) for this playable location. The first type in the collection is the primary type. Type information might not be available for all playable locations.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SamplePlayableLocationList": { + "description": "A list of PlayableLocation objects that satisfies a single Criterion.", + "id": "GoogleMapsPlayablelocationsV3SamplePlayableLocationList", + "properties": { + "locations": { + "description": "A list of playable locations for this game object type.", + "items": { + "$ref": "GoogleMapsPlayablelocationsV3SamplePlayableLocation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest": { + "description": " Life of a query: - When a game starts in a new location, your game server issues a SamplePlayableLocations request. The request specifies the S2 cell, and contains one or more \"criteria\" for filtering: - Criterion 0: i locations for long-lived bases, or level 0 monsters, or... - Criterion 1: j locations for short-lived bases, or level 1 monsters, ... - Criterion 2: k locations for random objects. - etc (up to 5 criterion may be specified). `PlayableLocationList` will then contain mutually exclusive lists of `PlayableLocation` objects that satisfy each of the criteria. Think of it as a collection of real-world locations that you can then associate with your game state. Note: These points are impermanent in nature. E.g, parks can close, and places can be removed. The response specifies how long you can expect the playable locations to last. Once they expire, you should query the `samplePlayableLocations` API again to get a fresh view of the real world.", + "id": "GoogleMapsPlayablelocationsV3SamplePlayableLocationsRequest", + "properties": { + "areaFilter": { + "$ref": "GoogleMapsPlayablelocationsV3SampleAreaFilter", + "description": "Required. Specifies the area to search within for playable locations." + }, + "criteria": { + "description": "Required. Specifies one or more (up to 5) criteria for filtering the returned playable locations.", + "items": { + "$ref": "GoogleMapsPlayablelocationsV3SampleCriterion" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse": { + "description": " Response for the SamplePlayableLocations method.", + "id": "GoogleMapsPlayablelocationsV3SamplePlayableLocationsResponse", + "properties": { + "locationsPerGameObjectType": { + "additionalProperties": { + "$ref": "GoogleMapsPlayablelocationsV3SamplePlayableLocationList" + }, + "description": "Each PlayableLocation object corresponds to a game_object_type specified in the request.", + "type": "object" + }, + "ttl": { + "description": "Required. Specifies the \"time-to-live\" for the set of playable locations. You can use this value to determine how long to cache the set of playable locations. After this length of time, your back-end game server should issue a new SamplePlayableLocations request to get a fresh set of playable locations (because for example, they might have been removed, a park might have closed for the day, a business might have closed permanently).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsPlayablelocationsV3SampleSpacingOptions": { + "description": "A set of options that specifies the separation between playable locations.", + "id": "GoogleMapsPlayablelocationsV3SampleSpacingOptions", + "properties": { + "minSpacingMeters": { + "description": "Required. The minimum spacing between any two playable locations, measured in meters. The minimum value is 30. The maximum value is 1000. Inputs will be rounded up to the next 10 meter interval. The default value is 200m. Set this field to remove tight clusters of playable locations. Note: The spacing is a greedy algorithm. It optimizes for selecting the highest ranking locations first, not to maximize the number of locations selected. Consider the following scenario: * Rank: A: 2, B: 1, C: 3. * Distance: A--200m--B--200m--C If spacing=250, it will pick the highest ranked location [B], not [A, C]. Note: Spacing works within the game object type itself, as well as the previous ones. Suppose three game object types, each with the following spacing: * X: 400m, Y: undefined, Z: 200m. 1. Add locations for X, within 400m of each other. 2. Add locations for Y, without any spacing. 3. Finally, add locations for Z within 200m of each other as well X and Y. The distance diagram between those locations end up as: * From->To. * X->X: 400m * Y->X, Y->Y: unspecified. * Z->X, Z->Y, Z->Z: 200m.", + "format": "double", + "type": "number" + }, + "pointType": { + "description": "Specifies whether the minimum spacing constraint applies to the center-point or to the snapped point of playable locations. The default value is `CENTER_POINT`. If a snapped point is not available for a playable location, its center-point is used instead. Set this to the point type used in your game.", + "enum": [ + "POINT_TYPE_UNSPECIFIED", + "CENTER_POINT", + "SNAPPED_POINT" + ], + "enumDescriptions": [ + "Unspecified point type. Do not use this value.", + "The geographic coordinates correspond to the center of the location.", + "The geographic coordinates correspond to the location snapped to the sidewalk of the nearest road (when a nearby road exists)." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleMapsUnityClientInfo": { + "description": "Client information.", + "id": "GoogleMapsUnityClientInfo", + "properties": { + "apiClient": { + "description": "API client name and version. For example, the SDK calling the API. The exact format is up to the client.", + "type": "string" + }, + "applicationId": { + "description": "Application ID, such as the package name on Android and the bundle identifier on iOS platforms.", + "type": "string" + }, + "applicationVersion": { + "description": "Application version number, such as \"1.2.3\". The exact format is application-dependent.", + "type": "string" + }, + "deviceModel": { + "description": "Device model as reported by the device. The exact format is platform-dependent.", + "type": "string" + }, + "languageCode": { + "description": "Language code (in BCP-47 format) indicating the UI language of the client. Examples are \"en\", \"en-US\" or \"ja-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "type": "string" + }, + "operatingSystem": { + "description": "Operating system name and version as reported by the OS. For example, \"Mac OS X 10.10.4\". The exact format is platform-dependent.", + "type": "string" + }, + "operatingSystemBuild": { + "description": "Build number/version of the operating system. e.g., the contents of android.os.Build.ID in Android, or the contents of sysctl \"kern.osversion\" in iOS.", + "type": "string" + }, + "platform": { + "description": "Platform where the application is running.", + "enum": [ + "PLATFORM_UNSPECIFIED", + "EDITOR", + "MAC_OS", + "WINDOWS", + "LINUX", + "ANDROID", + "IOS", + "WEB_GL" + ], + "enumDescriptions": [ + "Unspecified or unknown OS.", + "Development environment.", + "macOS.", + "Windows.", + "Linux", + "Android", + "iOS", + "WebGL." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeLatLng": { + "description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", + "id": "GoogleTypeLatLng", + "properties": { + "latitude": { + "description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", + "format": "double", + "type": "number" + }, + "longitude": { + "description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", + "format": "double", + "type": "number" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Playable Locations API", + "version": "v3", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playcustomapp.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playcustomapp.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..4e46a98e15a7651cbf58c732c19e338373784898 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playcustomapp.v1.json @@ -0,0 +1,210 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/androidpublisher": { +"description": "View and manage your Google Play Developer account" +} +} +} +}, +"basePath": "", +"baseUrl": "https://playcustomapp.googleapis.com/", +"batchPath": "batch", +"description": "API to create and publish custom Android apps", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/android/work/play/custom-app-api/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "playcustomapp:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://playcustomapp.mtls.googleapis.com/", +"name": "playcustomapp", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"accounts": { +"resources": { +"customApps": { +"methods": { +"create": { +"description": "Creates a new custom app.", +"flatPath": "playcustomapp/v1/accounts/{account}/customApps", +"httpMethod": "POST", +"id": "playcustomapp.accounts.customApps.create", +"mediaUpload": { +"accept": [ +"*/*" +], +"maxSize": "10737418240", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/playcustomapp/v1/accounts/{account}/customApps" +}, +"simple": { +"multipart": true, +"path": "/upload/playcustomapp/v1/accounts/{account}/customApps" +} +} +}, +"parameterOrder": [ +"account" +], +"parameters": { +"account": { +"description": "Developer account ID.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "playcustomapp/v1/accounts/{account}/customApps", +"request": { +"$ref": "CustomApp" +}, +"response": { +"$ref": "CustomApp" +}, +"scopes": [ +"https://www.googleapis.com/auth/androidpublisher" +], +"supportsMediaUpload": true +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://playcustomapp.googleapis.com/", +"schemas": { +"CustomApp": { +"description": "This resource represents a custom app.", +"id": "CustomApp", +"properties": { +"languageCode": { +"description": "Default listing language in BCP 47 format.", +"type": "string" +}, +"organizations": { +"description": "Organizations to which the custom app should be made available. If the request contains any organizations, then the app will be restricted to only these organizations. To support the organization linked to the developer account, the organization ID should be provided explicitly together with other organizations. If no organizations are provided, then the app is only available to the organization linked to the developer account.", +"items": { +"$ref": "Organization" +}, +"type": "array" +}, +"packageName": { +"description": "Output only. Package name of the created Android app. Only present in the API response.", +"readOnly": true, +"type": "string" +}, +"title": { +"description": "Title for the Android app.", +"type": "string" +} +}, +"type": "object" +}, +"Organization": { +"description": "Represents an organization that can access a custom app.", +"id": "Organization", +"properties": { +"organizationId": { +"description": "Required. ID of the organization.", +"type": "string" +}, +"organizationName": { +"description": "Optional. A human-readable name of the organization, to help recognize the organization.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Play Custom App Publishing API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playdeveloperreporting.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playdeveloperreporting.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..6051b10476934138cb4e73fd77e3872e373713a2 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playdeveloperreporting.v1alpha1.json @@ -0,0 +1,2167 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/playdeveloperreporting": { +"description": "See metrics and data about the apps in your Google Play Developer account" +} +} +} +}, +"basePath": "", +"baseUrl": "https://playdeveloperreporting.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Playdeveloperreporting", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/play/developer/reporting", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "playdeveloperreporting:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://playdeveloperreporting.mtls.googleapis.com/", +"name": "playdeveloperreporting", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"anomalies": { +"methods": { +"list": { +"description": "Lists anomalies in any of the datasets.", +"flatPath": "v1alpha1/apps/{appsId}/anomalies", +"httpMethod": "GET", +"id": "playdeveloperreporting.anomalies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filtering criteria for anomalies. For basic filter guidance, please check: https://google.aip.dev/160. **Supported functions:** * `activeBetween(startTime, endTime)`: If specified, only list anomalies that were active in between `startTime` (inclusive) and `endTime` (exclusive). Both parameters are expected to conform to an RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC offsets are supported. Both `startTime` and `endTime` accept the special value `UNBOUNDED`, to signify intervals with no lower or upper bound, respectively. Examples: * `activeBetween(\"2021-04-21T11:30:00Z\", \"2021-07-21T00:00:00Z\")` * `activeBetween(UNBOUNDED, \"2021-11-21T00:00:00-04:00\")` * `activeBetween(\"2021-07-21T00:00:00-04:00\", UNBOUNDED)`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 10 anomalies will be returned. The maximum value is 100; values above 100 will be coerced to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListErrorReports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent app for which anomalies were detected. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/anomalies", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"apps": { +"methods": { +"fetchReleaseFilterOptions": { +"description": "Describes filtering options for releases.", +"flatPath": "v1alpha1/apps/{appsId}:fetchReleaseFilterOptions", +"httpMethod": "GET", +"id": "playdeveloperreporting.apps.fetchReleaseFilterOptions", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource, i.e. app the filtering options are for. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:fetchReleaseFilterOptions", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1ReleaseFilterOptions" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"search": { +"description": "Searches for Apps accessible by the user.", +"flatPath": "v1alpha1/apps:search", +"httpMethod": "GET", +"id": "playdeveloperreporting.apps.search", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of apps to return. The service may return fewer than this value. If unspecified, at most 50 apps will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `SearchAccessibleApps` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchAccessibleApps` must match the call that provided the page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/apps:search", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1SearchAccessibleAppsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"vitals": { +"resources": { +"anrrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/anrRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.anrrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/anrRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/anrRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.anrrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/anrRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"crashrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/crashRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.crashrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/crashRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/crashRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.crashrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/crashRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"errors": { +"resources": { +"counts": { +"methods": { +"get": { +"description": "Describes the properties of the metrics set.", +"flatPath": "v1alpha1/apps/{appsId}/errorCountMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.errors.counts.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the errors metric set. Format: apps/{app}/errorCountMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/errorCountMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metrics set.", +"flatPath": "v1alpha1/apps/{appsId}/errorCountMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.errors.counts.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/errorCountMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/errorCountMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"issues": { +"methods": { +"search": { +"description": "Searches all error issues in which reports have been grouped.", +"flatPath": "v1alpha1/apps/{appsId}/errorIssues:search", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.errors.issues.search", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A selection predicate to retrieve only a subset of the issues. Counts in the returned error issues will only reflect occurrences that matched the filter. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error issues that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error issues that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error issues that occurred in the requested devices. Example: `deviceModel = \"google/walleye\" OR deviceModel = \"google/marlin\"`. * `deviceBrand`: Matches error issues that occurred in the requested device brands. Example: `deviceBrand = \"Google\". * `deviceType`: Matches error issues that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error issues of the requested types only. Valid candidates: `CRASH`, `ANR`. Example: `errorIssueType = CRASH OR errorIssueType = ANR`. * `appProcessState`: Matches error issues on the process state of an app, indicating whether an app runs in the foreground (user-visible) or background. Valid candidates: `FOREGROUND`, `BACKGROUND`. Example: `appProcessState = FOREGROUND`. * `isUserPerceived`: Matches error issues that are user-perceived. It is not accompanied by any operators. Example: `isUserPerceived`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR errorIssueType = ANR` is not a valid filter. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", +"location": "query", +"type": "string" +}, +"interval.endTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.endTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.endTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.endTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.startTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.startTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.startTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"orderBy": { +"description": "Specifies a field that will be used to order the results. ** Supported dimensions:** * `errorReportCount`: Orders issues by number of error reports. * `distinctUsers`: Orders issues by number of unique affected users. ** Supported operations:** * `asc` for ascending order. * `desc` for descending order. Format: A field and an operation, e.g., `errorReportCount desc` *Note:* currently only one field is supported at a time.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of error issues to return. The service may return fewer than this value. If unspecified, at most 50 error issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource of the error issues, indicating the application for which they were received. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +}, +"sampleErrorReportLimit": { +"description": "Optional. Number of sample error reports to return per ErrorIssue. If unspecified, 0 will be used. *Note:* currently only 0 and 1 are supported.", +"format": "int32", +"location": "query", +"type": "integer" +} +}, +"path": "v1alpha1/{+parent}/errorIssues:search", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"reports": { +"methods": { +"search": { +"description": "Searches all error reports received for an app.", +"flatPath": "v1alpha1/apps/{appsId}/errorReports:search", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.errors.reports.search", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A selection predicate to retrieve only a subset of the reports. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error reports that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error reports that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error issues that occurred in the requested devices. Example: `deviceModel = \"google/walleye\" OR deviceModel = \"google/marlin\"`. * `deviceBrand`: Matches error issues that occurred in the requested device brands. Example: `deviceBrand = \"Google\". * `deviceType`: Matches error reports that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error reports of the requested types only. Valid candidates: `JAVA_CRASH`, `NATIVE_CRASH`, `ANR`. Example: `errorIssueType = JAVA_CRASH OR errorIssueType = NATIVE_CRASH`. * `errorIssueId`: Matches error reports belonging to the requested error issue ids only. Example: `errorIssueId = 1234 OR errorIssueId = 4567`. * `errorReportId`: Matches error reports with the requested error report id. Example: `errorReportId = 1234 OR errorReportId = 4567`. * `appProcessState`: Matches error reports on the process state of an app, indicating whether an app runs in the foreground (user-visible) or background. Valid candidates: `FOREGROUND`, `BACKGROUND`. Example: `appProcessState = FOREGROUND`. * `isUserPerceived`: Matches error reports that are user-perceived. It is not accompanied by any operators. Example: `isUserPerceived`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR versionCode = ANR`. The filter expression `versionCode = 123 OR errorIssueType = ANR` is not valid. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", +"location": "query", +"type": "string" +}, +"interval.endTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.endTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.endTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.endTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.startTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.startTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.startTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageSize": { +"description": "The maximum number of reports to return. The service may return fewer than this value. If unspecified, at most 50 reports will be returned. The maximum value is 100; values above 100 will be coerced to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `SearchErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchErrorReports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource of the reports, indicating the application for which they were received. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/errorReports:search", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +} +} +}, +"excessivewakeuprate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/excessiveWakeupRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.excessivewakeuprate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/excessiveWakeupRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.excessivewakeuprate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"slowrenderingrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/slowRenderingRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.slowrenderingrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowRenderingRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowRenderingRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1SlowRenderingRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/slowRenderingRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.slowrenderingrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowRenderingRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowRenderingRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QuerySlowRenderingRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QuerySlowRenderingRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"slowstartrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/slowStartRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.slowstartrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowStartRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowStartRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1SlowStartRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/slowStartRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.slowstartrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowStartRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowStartRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QuerySlowStartRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QuerySlowStartRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"stuckbackgroundwakelockrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1alpha1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://playdeveloperreporting.googleapis.com/", +"schemas": { +"GooglePlayDeveloperReportingV1alpha1Anomaly": { +"description": "Represents an anomaly detected in a dataset. Our anomaly detection systems flag datapoints in a time series that fall outside of and expected range derived from historical data. Although those expected ranges have an upper and a lower bound, we only flag anomalies when the data has become unexpectedly _worse_, which usually corresponds to the case where the metric crosses the upper bound. Multiple contiguous datapoints in a timeline outside of the expected range will be grouped into a single anomaly. Therefore, an anomaly represents effectively a segment of a metric's timeline. The information stored in the `timeline_spec`, `dimensions` and `metric` can be used to fetch a full timeline with extended ragne for context. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1alpha1Anomaly", +"properties": { +"dimensions": { +"description": "Combination of dimensions in which the anomaly was detected.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1DimensionValue" +}, +"type": "array" +}, +"metric": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricValue", +"description": "Metric where the anomaly was detected, together with the anomalous value." +}, +"metricSet": { +"description": "Metric set resource where the anomaly was detected.", +"type": "string" +}, +"name": { +"description": "Identifier. Name of the anomaly. Format: apps/{app}/anomalies/{anomaly}", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Timeline specification that covers the anomaly period." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet": { +"description": "Singleton resource representing the set of ANR (Application not responding) metrics. This metric set contains ANRs data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one user-perceived ANR. User-perceived ANRs are currently those of 'Input dispatching' type. * `userPerceivedAnrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` and `userPerceivedAnrRate` metrics. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about crashes, another stability metric.", +"id": "GooglePlayDeveloperReportingV1alpha1AnrRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/anrRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1App": { +"description": "A representation of an app in the Play Store.", +"id": "GooglePlayDeveloperReportingV1alpha1App", +"properties": { +"displayName": { +"description": "Title of the app. This is the latest title as set in the Play Console and may not yet have been reviewed, so might not match the Play Store. Example: `Google Maps`.", +"type": "string" +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}", +"type": "string" +}, +"packageName": { +"description": "Package name of the app. Example: `com.example.app123`.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1AppVersion": { +"description": "Representations of an app version.", +"id": "GooglePlayDeveloperReportingV1alpha1AppVersion", +"properties": { +"versionCode": { +"description": "Numeric version code of the app version (set by the app's developer).", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet": { +"description": "Singleton resource representing the set of crashrate metrics. This metric set contains crashes data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash while they were actively using your app (a user-perceived crash). An app is considered to be in active use if it is displaying any activity or executing any foreground service. * `userPerceivedCrashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` and `userPerceivedCrashRate` metrics. A user is counted in this metric if they used the app actively during the aggregation period. An app is considered to be in active use if it is displaying any activity or executing any foreground service. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about ANRs, another stability metric.", +"id": "GooglePlayDeveloperReportingV1alpha1CrashRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/crashRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1DecimalConfidenceInterval": { +"description": "Represents the confidence interval of a metric.", +"id": "GooglePlayDeveloperReportingV1alpha1DecimalConfidenceInterval", +"properties": { +"lowerBound": { +"$ref": "GoogleTypeDecimal", +"description": "The confidence interval's lower bound." +}, +"upperBound": { +"$ref": "GoogleTypeDecimal", +"description": "The confidence interval's upper bound." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1DeviceId": { +"description": "Identifier of a device.", +"id": "GooglePlayDeveloperReportingV1alpha1DeviceId", +"properties": { +"buildBrand": { +"description": "Value of Build.BRAND.", +"type": "string" +}, +"buildDevice": { +"description": "Value of Build.DEVICE.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1DeviceModelSummary": { +"description": "Summary of a device", +"id": "GooglePlayDeveloperReportingV1alpha1DeviceModelSummary", +"properties": { +"deviceId": { +"$ref": "GooglePlayDeveloperReportingV1alpha1DeviceId", +"description": "Identifier of the device." +}, +"deviceUri": { +"description": "Link to the device in Play Device Catalog.", +"type": "string" +}, +"marketingName": { +"description": "Display name of the device.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1DimensionValue": { +"description": "Represents the value of a single dimension.", +"id": "GooglePlayDeveloperReportingV1alpha1DimensionValue", +"properties": { +"dimension": { +"description": "Name of the dimension.", +"type": "string" +}, +"int64Value": { +"description": "Actual value, represented as an int64.", +"format": "int64", +"type": "string" +}, +"stringValue": { +"description": "Actual value, represented as a string.", +"type": "string" +}, +"valueLabel": { +"description": "Optional. Human-friendly label for the value, always in English. For example, 'Spain' for the 'ES' country code. Whereas the dimension value is stable, this value label is subject to change. Do not assume that the (value, value_label) relationship is stable. For example, the ISO country code 'MK' changed its name recently to 'North Macedonia'.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet": { +"description": "Singleton resource representing the set of error report metrics. This metric set contains un-normalized error report counts. **Supported aggregation periods:** * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation. **Required dimension:** This dimension must be always specified in all requests in the `dimensions` field in query requests. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors.counts contains normalized metrics about Crashes, another stability metric. * vitals.errors.counts contains normalized metrics about ANRs, another stability metric.", +"id": "GooglePlayDeveloperReportingV1alpha1ErrorCountMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "The resource name. Format: apps/{app}/errorCountMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1ErrorIssue": { +"description": "A group of related ErrorReports received for an app. Similar error reports are grouped together into issues with a likely identical root cause. **Please note:** this resource is currently in Alpha. There could be changes to the issue grouping that would result in similar but more recent error reports being assigned to different issues. This could also cause some issues disappearing entirely and being replaced by new ones. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1alpha1ErrorIssue", +"properties": { +"cause": { +"description": "Cause of the issue. Depending on the type this can be either: * APPLICATION_NOT_RESPONDING: the type of ANR that occurred, e.g., 'Input dispatching timed out'. * CRASH: for Java unhandled exception errors, the type of the innermost exception that was thrown, e.g., IllegalArgumentException. For signals in native code, the signal that was raised, e.g. SIGSEGV.", +"type": "string" +}, +"distinctUsers": { +"description": "An estimate of the number of unique users who have experienced this issue (only considering occurrences matching the filters and within the requested time period).", +"format": "int64", +"type": "string" +}, +"distinctUsersPercent": { +"$ref": "GoogleTypeDecimal", +"description": "An estimated percentage of users affected by any issue that are affected by this issue (only considering occurrences matching the filters and within the requested time period)." +}, +"errorReportCount": { +"description": "The total number of error reports in this issue (only considering occurrences matching the filters and within the requested time period).", +"format": "int64", +"type": "string" +}, +"firstAppVersion": { +"$ref": "GooglePlayDeveloperReportingV1alpha1AppVersion", +"description": "The earliest (inclusive) app version appearing in this ErrorIssue in the requested time period (only considering occurrences matching the filters)." +}, +"firstOsVersion": { +"$ref": "GooglePlayDeveloperReportingV1alpha1OsVersion", +"description": "The smallest OS version in which this error cluster has occurred in the requested time period (only considering occurrences matching the filters and within the requested time period)." +}, +"issueUri": { +"description": "Link to the issue in Android vitals in the Play Console.", +"type": "string" +}, +"lastAppVersion": { +"$ref": "GooglePlayDeveloperReportingV1alpha1AppVersion", +"description": "The latest (inclusive) app version appearing in this ErrorIssue in the requested time period (only considering occurrences matching the filters)." +}, +"lastErrorReportTime": { +"description": "Start of the hour during which the last error report in this issue occurred.", +"format": "google-datetime", +"type": "string" +}, +"lastOsVersion": { +"$ref": "GooglePlayDeveloperReportingV1alpha1OsVersion", +"description": "The latest OS version in which this error cluster has occurred in the requested time period (only considering occurrences matching the filters and within the requested time period)." +}, +"location": { +"description": "Location where the issue happened. Depending on the type this can be either: * APPLICATION_NOT_RESPONDING: the name of the activity or service that stopped responding. * CRASH: the likely method name that caused the error.", +"type": "string" +}, +"name": { +"description": "Identifier. The resource name of the issue. Format: apps/{app}/{issue}", +"type": "string" +}, +"sampleErrorReports": { +"description": "Output only. Sample error reports which belong to this ErrorIssue. *Note:* currently a maximum of 1 per ErrorIssue is supported. Format: \"apps/{app}/{report}\"", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"type": { +"description": "Type of the errors grouped in this issue.", +"enum": [ +"ERROR_TYPE_UNSPECIFIED", +"APPLICATION_NOT_RESPONDING", +"CRASH" +], +"enumDescriptions": [ +"Unspecified error type.", +"Application Not Responding (ANR) error. To learn more about this type of errors visit the corresponding Android Developers documentation.", +"Crash caused by an unhandled exception in Java (or Kotlin or any other JVM language) or a signal in native code such as SIGSEGV." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1ErrorReport": { +"description": "An error report received for an app. There reports are produced by the Android platform code when a (potentially fatal) error condition is detected. Identical reports from many users will be deduplicated and coalesced into a single ErrorReport. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1alpha1ErrorReport", +"properties": { +"appVersion": { +"$ref": "GooglePlayDeveloperReportingV1alpha1AppVersion", +"description": "The app version on which an event in this error report occurred on." +}, +"deviceModel": { +"$ref": "GooglePlayDeveloperReportingV1alpha1DeviceModelSummary", +"description": "A device model on which an event in this error report occurred on." +}, +"eventTime": { +"description": "Start of the hour during which the latest event in this error report occurred.", +"format": "google-datetime", +"type": "string" +}, +"issue": { +"description": "The issue this report was associated with. **Please note:** this resource is currently in Alpha. There could be changes to the issue grouping that would result in similar but more recent error reports being assigned to a different issue.", +"type": "string" +}, +"name": { +"description": "The resource name of the report. Format: apps/{app}/{report}", +"type": "string" +}, +"osVersion": { +"$ref": "GooglePlayDeveloperReportingV1alpha1OsVersion", +"description": "The OS version on which an event in this error report occurred on." +}, +"reportText": { +"description": "Textual representation of the error report. These textual reports are produced by the platform. The reports are then sanitized and filtered to remove any potentially sensitive information. Although their format is fairly stable, they are not entirely meant for machine consumption and we cannot guarantee that there won't be subtle changes to the formatting that may break systems trying to parse information out of the reports.", +"type": "string" +}, +"type": { +"description": "Type of the error for which this report was generated.", +"enum": [ +"ERROR_TYPE_UNSPECIFIED", +"APPLICATION_NOT_RESPONDING", +"CRASH" +], +"enumDescriptions": [ +"Unspecified error type.", +"Application Not Responding (ANR) error. To learn more about this type of errors visit the corresponding Android Developers documentation.", +"Crash caused by an unhandled exception in Java (or Kotlin or any other JVM language) or a signal in native code such as SIGSEGV." +], +"type": "string" +}, +"vcsInformation": { +"description": "Version control system information from BUNDLE-METADATA/version-control-info.textproto or META-INF/version-control-info.textproto of the app bundle or APK, respectively.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet": { +"description": "Singleton resource representing the set of Excessive Weakeups metrics. This metric set contains AlarmManager wakeup counts data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1alpha1ExcessiveWakeupRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1FreshnessInfo": { +"description": "Represents the latest available time that can be requested in a TimelineSpec. Different aggregation periods have different freshness. For example, `DAILY` aggregation may lag behind `HOURLY` in cases where such aggregation is computed only once at the end of the day.", +"id": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"properties": { +"freshnesses": { +"description": "Information about data freshness for every supported aggregation period. This field has set semantics, keyed by the `aggregation_period` field.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness": { +"description": "Information about data freshness for a single aggregation period.", +"id": "GooglePlayDeveloperReportingV1alpha1FreshnessInfoFreshness", +"properties": { +"aggregationPeriod": { +"description": "Aggregation period for which data is available.", +"enum": [ +"AGGREGATION_PERIOD_UNSPECIFIED", +"HOURLY", +"DAILY", +"FULL_RANGE" +], +"enumDescriptions": [ +"Unspecified granularity.", +"Data is aggregated in hourly intervals.", +"Data is aggregated in daily intervals.", +"Data is aggregated over the full timeline range. Effectively this produces a single value rather than a timeline." +], +"type": "string" +}, +"latestEndTime": { +"$ref": "GoogleTypeDateTime", +"description": "Latest end time for which data is available, for the aggregation period. The time is specified in the metric set's default timezone. *Note:* time ranges in TimelineSpec are represented as `start_time, end_time)`. For example, if the latest available timeline data point for a `DAILY` aggregation period is `2021-06-23 00:00:00 America/Los_Angeles`, the value of this field would be `2021-06-24 00:00:00 America/Los_Angeles` so it can be easily reused in [TimelineSpec.end_time." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse": { +"description": "Response with a list of anomalies in datasets.", +"id": "GooglePlayDeveloperReportingV1alpha1ListAnomaliesResponse", +"properties": { +"anomalies": { +"description": "Anomalies that were found.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1Anomaly" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1MetricValue": { +"description": "Represents the value of a metric.", +"id": "GooglePlayDeveloperReportingV1alpha1MetricValue", +"properties": { +"decimalValue": { +"$ref": "GoogleTypeDecimal", +"description": "Actual value, represented as a decimal number." +}, +"decimalValueConfidenceInterval": { +"$ref": "GooglePlayDeveloperReportingV1alpha1DecimalConfidenceInterval", +"description": "Confidence interval of a value that is of type `type.Decimal`." +}, +"metric": { +"description": "Name of the metric.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1MetricsRow": { +"description": "Represents a row of dimensions and metrics.", +"id": "GooglePlayDeveloperReportingV1alpha1MetricsRow", +"properties": { +"aggregationPeriod": { +"description": "Granularity of the aggregation period of the row.", +"enum": [ +"AGGREGATION_PERIOD_UNSPECIFIED", +"HOURLY", +"DAILY", +"FULL_RANGE" +], +"enumDescriptions": [ +"Unspecified granularity.", +"Data is aggregated in hourly intervals.", +"Data is aggregated in daily intervals.", +"Data is aggregated over the full timeline range. Effectively this produces a single value rather than a timeline." +], +"type": "string" +}, +"dimensions": { +"description": "Dimension columns in the row.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1DimensionValue" +}, +"type": "array" +}, +"metrics": { +"description": "Metric columns in the row.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricValue" +}, +"type": "array" +}, +"startTime": { +"$ref": "GoogleTypeDateTime", +"description": "Starting date (and time for hourly aggregation) of the period covered by this row." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1OsVersion": { +"description": "Representation of an OS version.", +"id": "GooglePlayDeveloperReportingV1alpha1OsVersion", +"properties": { +"apiLevel": { +"description": "Numeric version code of the OS - API level", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest": { +"description": "Request message for QueryAnrRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one user-perceived ANR. User-perceived ANRs are currently those of 'Input dispatching' type. * `userPerceivedAnrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not . supported in HOURLY granularity. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` and `userPerceivedAnrRate` metrics. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse": { +"description": "Response message for QueryAnrRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryAnrRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest": { +"description": "Request message for QueryCrashRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash while they were actively using your app (a user-perceived crash). An app is considered to be in active use if it is displaying any activity or executing any foreground service. * `userPerceivedCrashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` and `userPerceivedCrashRate` metrics. A user is counted in this metric if they used the app actively during the aggregation period. An app is considered to be in active use if it is displaying any activity or executing any foreground service. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse": { +"description": "Response message for QueryCrashRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryCrashRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest": { +"description": "Request message for QueryErrorCountMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. * `isUserPerceived` (string): denotes whether error is user perceived or not, USER_PERCEIVED or NOT_USER_PERCEIVED. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse": { +"description": "Error counts query response.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryErrorCountMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest": { +"description": "Request message for QueryExcessiveWakeupRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse": { +"description": "Response message for QueryExcessiveWakeupRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryExcessiveWakeupRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QuerySlowRenderingRateMetricSetRequest": { +"description": "Request message for QuerySlowRenderingRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QuerySlowRenderingRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `slowRenderingRate20Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow rendering. * `slowRenderingRate20Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate20Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow rendering. * `slowRenderingRate30Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowRenderingRate20Fps`/`slowRenderingRate30Fps` metric. A user is counted in this metric if their app was launched in the device. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta Android versions only, excluding data from released Android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QuerySlowRenderingRateMetricSetResponse": { +"description": "Response message for QuerySlowRenderingRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QuerySlowRenderingRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QuerySlowStartRateMetricSetRequest": { +"description": "Request message for QuerySlowStartRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QuerySlowStartRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `slowStartRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow start. * `slowStartRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowStartRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowStartRate` metric. A user is counted in this metric if their app was launched in the device. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta Android versions only, excluding data from released Android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QuerySlowStartRateMetricSetResponse": { +"description": "Response message for QuerySlowStartRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QuerySlowStartRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest": { +"description": "Request message for QueryStuckBackgroundWakelockRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse": { +"description": "Response message for QueryStuckBackgroundWakelockRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1alpha1QueryStuckBackgroundWakelockRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1Release": { +"description": "A representation of an app release.", +"id": "GooglePlayDeveloperReportingV1alpha1Release", +"properties": { +"displayName": { +"description": "Readable identifier of the release.", +"type": "string" +}, +"versionCodes": { +"description": "The version codes contained in this release.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1ReleaseFilterOptions": { +"description": "A set of filtering options for releases and version codes specific to an app.", +"id": "GooglePlayDeveloperReportingV1alpha1ReleaseFilterOptions", +"properties": { +"tracks": { +"description": "List of tracks to filter releases over. Provides the grouping of version codes under releases and tracks.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1SearchAccessibleAppsResponse": { +"description": "Response message for SearchAccessibleApps.", +"id": "GooglePlayDeveloperReportingV1alpha1SearchAccessibleAppsResponse", +"properties": { +"apps": { +"description": "The apps accessible to the user calling the endpoint.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1App" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse": { +"description": "Response with a paginated list of issues that matched the request.", +"id": "GooglePlayDeveloperReportingV1alpha1SearchErrorIssuesResponse", +"properties": { +"errorIssues": { +"description": "ErrorIssues that were found.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1ErrorIssue" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse": { +"description": "Response with a paginated list of error reports matching the search query.", +"id": "GooglePlayDeveloperReportingV1alpha1SearchErrorReportsResponse", +"properties": { +"errorReports": { +"description": "Error reports that were found.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1ErrorReport" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token to fetch the next page of reports.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1SlowRenderingRateMetricSet": { +"description": "Singleton resource representing the set of Slow Rendering metrics. This metric set contains low-level rendering data captured by SurafeFlinger. Sessions are evaluated based on the present-to-present histogram of frames handled by any SurfaceFlinger layer owned by the app. A slow session is a session where more than 25% of frames for the session did not meet the metric's target frame rate (either 20fps, or 30fps). *NOTE:* This metric set is only available for games. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `slowRenderingRate20Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had slow rendering. * `slowRenderingRate20Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate20Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had slow rendering. * `slowRenderingRate30Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowRenderingRate20Fps`/`slowRenderingRate30Fps` metric. A user is counted in this metric if their app rendered any frames. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1alpha1SlowRenderingRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/slowRenderingRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1SlowStartRateMetricSet": { +"description": "Singleton resource representing the set of Slow Start metrics. This metric set contains Activity start duration data. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `slowStartRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow start. * `slowStartRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowStartRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowStartRate` metric. A user is counted in this metric if their app was launched in the device. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Required dimension:** This dimension must be specified with each request for the request to be valid. * `startType` (string): the type of start that was measured. Valid types are `HOT`, `WARM` and `COLD`. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1alpha1SlowStartRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/slowStartRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet": { +"description": "Singleton resource representing the set of Stuck Background Wakelocks metrics. This metric set contains PowerManager wakelock duration data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if their app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1alpha1StuckBackgroundWakelockRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1alpha1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1TimelineSpec": { +"description": "Specification of the time-related aggregation parameters of a timeline. Timelines have an aggregation period (`DAILY`, `HOURLY`, etc) which defines how events are aggregated in metrics. The points in a timeline are defined by the starting DateTime of the aggregation period. The duration is implicit in the AggregationPeriod. Hourly aggregation periods, when supported by a metric set, are always specified in UTC to avoid ambiguities around daylight saving time transitions, where an hour is skipped when adopting DST, and repeated when abandoning DST. For example, the timestamp '2021-11-07 01:00:00 America/Los_Angeles' is ambiguous since it can correspond to '2021-11-07 08:00:00 UTC' or '2021-11-07 09:00:00 UTC'. Daily aggregation periods require specifying a timezone which will determine the precise instants of the start and the end of the day. Not all metric sets support all timezones, so make sure to check which timezones are supported by the metric set you want to query.", +"id": "GooglePlayDeveloperReportingV1alpha1TimelineSpec", +"properties": { +"aggregationPeriod": { +"description": "Type of the aggregation period of the datapoints in the timeline. Intervals are identified by the date and time at the start of the interval.", +"enum": [ +"AGGREGATION_PERIOD_UNSPECIFIED", +"HOURLY", +"DAILY", +"FULL_RANGE" +], +"enumDescriptions": [ +"Unspecified granularity.", +"Data is aggregated in hourly intervals.", +"Data is aggregated in daily intervals.", +"Data is aggregated over the full timeline range. Effectively this produces a single value rather than a timeline." +], +"type": "string" +}, +"endTime": { +"$ref": "GoogleTypeDateTime", +"description": "Ending datapoint of the timeline (exclusive). See start_time for restrictions. The timezone of the end point must match the timezone of the start point." +}, +"startTime": { +"$ref": "GoogleTypeDateTime", +"description": "Starting datapoint of the timeline (inclusive). Must be aligned to the aggregation period as follows: * HOURLY: the 'minutes', 'seconds' and 'nanos' fields must be unset. The time_zone can be left unset (defaults to UTC) or set explicitly to \"UTC\". Setting any other utc_offset or timezone id will result in a validation error. * DAILY: the 'hours', 'minutes', 'seconds' and 'nanos' fields must be unset. Different metric sets support different timezones. It can be left unset to use the default timezone specified by the metric set. The timezone of the end point must match the timezone of the start point." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1alpha1Track": { +"description": "A representation of a Play release track.", +"id": "GooglePlayDeveloperReportingV1alpha1Track", +"properties": { +"displayName": { +"description": "Readable identifier of the track.", +"type": "string" +}, +"servingReleases": { +"description": "Represents all active releases in the track.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1alpha1Release" +}, +"type": "array" +}, +"type": { +"description": "The type of the track.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDateTime": { +"description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", +"id": "GoogleTypeDateTime", +"properties": { +"day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"type": "integer" +}, +"hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +}, +"timeZone": { +"$ref": "GoogleTypeTimeZone", +"description": "Time zone." +}, +"utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"type": "string" +}, +"year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleTypeDecimal": { +"description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", +"id": "GoogleTypeDecimal", +"properties": { +"value": { +"description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeTimeZone": { +"description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", +"id": "GoogleTypeTimeZone", +"properties": { +"id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"type": "string" +}, +"version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Play Developer Reporting API", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playdeveloperreporting.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playdeveloperreporting.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..3d832d61a5df5cb2802f2c9fbf68be110d736072 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playdeveloperreporting.v1beta1.json @@ -0,0 +1,2167 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/playdeveloperreporting": { +"description": "See metrics and data about the apps in your Google Play Developer account" +} +} +} +}, +"basePath": "", +"baseUrl": "https://playdeveloperreporting.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Playdeveloperreporting", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/play/developer/reporting", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "playdeveloperreporting:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://playdeveloperreporting.mtls.googleapis.com/", +"name": "playdeveloperreporting", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"anomalies": { +"methods": { +"list": { +"description": "Lists anomalies in any of the datasets.", +"flatPath": "v1beta1/apps/{appsId}/anomalies", +"httpMethod": "GET", +"id": "playdeveloperreporting.anomalies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filtering criteria for anomalies. For basic filter guidance, please check: https://google.aip.dev/160. **Supported functions:** * `activeBetween(startTime, endTime)`: If specified, only list anomalies that were active in between `startTime` (inclusive) and `endTime` (exclusive). Both parameters are expected to conform to an RFC-3339 formatted string (e.g. `2012-04-21T11:30:00-04:00`). UTC offsets are supported. Both `startTime` and `endTime` accept the special value `UNBOUNDED`, to signify intervals with no lower or upper bound, respectively. Examples: * `activeBetween(\"2021-04-21T11:30:00Z\", \"2021-07-21T00:00:00Z\")` * `activeBetween(UNBOUNDED, \"2021-11-21T00:00:00-04:00\")` * `activeBetween(\"2021-07-21T00:00:00-04:00\", UNBOUNDED)`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 10 anomalies will be returned. The maximum value is 100; values above 100 will be coerced to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListErrorReports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent app for which anomalies were detected. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/anomalies", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"apps": { +"methods": { +"fetchReleaseFilterOptions": { +"description": "Describes filtering options for releases.", +"flatPath": "v1beta1/apps/{appsId}:fetchReleaseFilterOptions", +"httpMethod": "GET", +"id": "playdeveloperreporting.apps.fetchReleaseFilterOptions", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource, i.e. app the filtering options are for. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:fetchReleaseFilterOptions", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1ReleaseFilterOptions" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"search": { +"description": "Searches for Apps accessible by the user.", +"flatPath": "v1beta1/apps:search", +"httpMethod": "GET", +"id": "playdeveloperreporting.apps.search", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of apps to return. The service may return fewer than this value. If unspecified, at most 50 apps will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `SearchAccessibleApps` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchAccessibleApps` must match the call that provided the page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/apps:search", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1SearchAccessibleAppsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"vitals": { +"resources": { +"anrrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1beta1/apps/{appsId}/anrRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.anrrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/anrRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1AnrRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1beta1/apps/{appsId}/anrRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.anrrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/anrRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/anrRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"crashrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1beta1/apps/{appsId}/crashRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.crashrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/crashRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1CrashRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1beta1/apps/{appsId}/crashRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.crashrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/crashRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/crashRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"errors": { +"resources": { +"counts": { +"methods": { +"get": { +"description": "Describes the properties of the metrics set.", +"flatPath": "v1beta1/apps/{appsId}/errorCountMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.errors.counts.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the errors metric set. Format: apps/{app}/errorCountMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/errorCountMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1ErrorCountMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metrics set.", +"flatPath": "v1beta1/apps/{appsId}/errorCountMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.errors.counts.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/errorCountMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/errorCountMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryErrorCountMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryErrorCountMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"issues": { +"methods": { +"search": { +"description": "Searches all error issues in which reports have been grouped.", +"flatPath": "v1beta1/apps/{appsId}/errorIssues:search", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.errors.issues.search", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A selection predicate to retrieve only a subset of the issues. Counts in the returned error issues will only reflect occurrences that matched the filter. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error issues that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error issues that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error issues that occurred in the requested devices. Example: `deviceModel = \"google/walleye\" OR deviceModel = \"google/marlin\"`. * `deviceBrand`: Matches error issues that occurred in the requested device brands. Example: `deviceBrand = \"Google\". * `deviceType`: Matches error issues that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error issues of the requested types only. Valid candidates: `CRASH`, `ANR`. Example: `errorIssueType = CRASH OR errorIssueType = ANR`. * `appProcessState`: Matches error issues on the process state of an app, indicating whether an app runs in the foreground (user-visible) or background. Valid candidates: `FOREGROUND`, `BACKGROUND`. Example: `appProcessState = FOREGROUND`. * `isUserPerceived`: Matches error issues that are user-perceived. It is not accompanied by any operators. Example: `isUserPerceived`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR errorIssueType = ANR` is not a valid filter. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", +"location": "query", +"type": "string" +}, +"interval.endTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.endTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.endTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.endTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.startTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.startTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.startTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"orderBy": { +"description": "Specifies a field that will be used to order the results. ** Supported dimensions:** * `errorReportCount`: Orders issues by number of error reports. * `distinctUsers`: Orders issues by number of unique affected users. ** Supported operations:** * `asc` for ascending order. * `desc` for descending order. Format: A field and an operation, e.g., `errorReportCount desc` *Note:* currently only one field is supported at a time.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of error issues to return. The service may return fewer than this value. If unspecified, at most 50 error issues will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource of the error issues, indicating the application for which they were received. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +}, +"sampleErrorReportLimit": { +"description": "Optional. Number of sample error reports to return per ErrorIssue. If unspecified, 0 will be used. *Note:* currently only 0 and 1 are supported.", +"format": "int32", +"location": "query", +"type": "integer" +} +}, +"path": "v1beta1/{+parent}/errorIssues:search", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1SearchErrorIssuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"reports": { +"methods": { +"search": { +"description": "Searches all error reports received for an app.", +"flatPath": "v1beta1/apps/{appsId}/errorReports:search", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.errors.reports.search", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A selection predicate to retrieve only a subset of the reports. For filtering basics, please check [AIP-160](https://google.aip.dev/160). ** Supported field names:** * `apiLevel`: Matches error reports that occurred in the requested Android versions (specified as the numeric API level) only. Example: `apiLevel = 28 OR apiLevel = 29`. * `versionCode`: Matches error reports that occurred in the requested app version codes only. Example: `versionCode = 123 OR versionCode = 456`. * `deviceModel`: Matches error issues that occurred in the requested devices. Example: `deviceModel = \"google/walleye\" OR deviceModel = \"google/marlin\"`. * `deviceBrand`: Matches error issues that occurred in the requested device brands. Example: `deviceBrand = \"Google\". * `deviceType`: Matches error reports that occurred in the requested device types. Example: `deviceType = \"PHONE\"`. * `errorIssueType`: Matches error reports of the requested types only. Valid candidates: `JAVA_CRASH`, `NATIVE_CRASH`, `ANR`. Example: `errorIssueType = JAVA_CRASH OR errorIssueType = NATIVE_CRASH`. * `errorIssueId`: Matches error reports belonging to the requested error issue ids only. Example: `errorIssueId = 1234 OR errorIssueId = 4567`. * `errorReportId`: Matches error reports with the requested error report id. Example: `errorReportId = 1234 OR errorReportId = 4567`. * `appProcessState`: Matches error reports on the process state of an app, indicating whether an app runs in the foreground (user-visible) or background. Valid candidates: `FOREGROUND`, `BACKGROUND`. Example: `appProcessState = FOREGROUND`. * `isUserPerceived`: Matches error reports that are user-perceived. It is not accompanied by any operators. Example: `isUserPerceived`. ** Supported operators:** * Comparison operators: The only supported comparison operator is equality. The filtered field must appear on the left hand side of the comparison. * Logical Operators: Logical operators `AND` and `OR` can be used to build complex filters following a conjunctive normal form (CNF), i.e., conjunctions of disjunctions. The `OR` operator takes precedence over `AND` so the use of parenthesis is not necessary when building CNF. The `OR` operator is only supported to build disjunctions that apply to the same field, e.g., `versionCode = 123 OR versionCode = ANR`. The filter expression `versionCode = 123 OR errorIssueType = ANR` is not valid. ** Examples ** Some valid filtering expressions: * `versionCode = 123 AND errorIssueType = ANR` * `versionCode = 123 AND errorIssueType = OR errorIssueType = CRASH` * `versionCode = 123 AND (errorIssueType = OR errorIssueType = CRASH)`", +"location": "query", +"type": "string" +}, +"interval.endTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.endTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.endTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.endTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.endTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"interval.startTime.timeZone.id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"location": "query", +"type": "string" +}, +"interval.startTime.timeZone.version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"location": "query", +"type": "string" +}, +"interval.startTime.utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"interval.startTime.year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageSize": { +"description": "The maximum number of reports to return. The service may return fewer than this value. If unspecified, at most 50 reports will be returned. The maximum value is 100; values above 100 will be coerced to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `SearchErrorReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchErrorReports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource of the reports, indicating the application for which they were received. Format: apps/{app}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/errorReports:search", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1SearchErrorReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +} +} +}, +"excessivewakeuprate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1beta1/apps/{appsId}/excessiveWakeupRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.excessivewakeuprate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1beta1/apps/{appsId}/excessiveWakeupRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.excessivewakeuprate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/excessiveWakeupRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"slowrenderingrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1beta1/apps/{appsId}/slowRenderingRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.slowrenderingrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowRenderingRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowRenderingRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1SlowRenderingRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1beta1/apps/{appsId}/slowRenderingRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.slowrenderingrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowRenderingRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowRenderingRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1beta1QuerySlowRenderingRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1QuerySlowRenderingRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"slowstartrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1beta1/apps/{appsId}/slowStartRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.slowstartrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowStartRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowStartRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1SlowStartRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1beta1/apps/{appsId}/slowStartRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.slowstartrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/slowStartRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/slowStartRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1beta1QuerySlowStartRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1QuerySlowStartRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +}, +"stuckbackgroundwakelockrate": { +"methods": { +"get": { +"description": "Describes the properties of the metric set.", +"flatPath": "v1beta1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet", +"httpMethod": "GET", +"id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +}, +"query": { +"description": "Queries the metrics in the metric set.", +"flatPath": "v1beta1/apps/{appsId}/stuckBackgroundWakelockRateMetricSet:query", +"httpMethod": "POST", +"id": "playdeveloperreporting.vitals.stuckbackgroundwakelockrate.query", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", +"location": "path", +"pattern": "^apps/[^/]+/stuckBackgroundWakelockRateMetricSet$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:query", +"request": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest" +}, +"response": { +"$ref": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playdeveloperreporting" +] +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://playdeveloperreporting.googleapis.com/", +"schemas": { +"GooglePlayDeveloperReportingV1beta1Anomaly": { +"description": "Represents an anomaly detected in a dataset. Our anomaly detection systems flag datapoints in a time series that fall outside of and expected range derived from historical data. Although those expected ranges have an upper and a lower bound, we only flag anomalies when the data has become unexpectedly _worse_, which usually corresponds to the case where the metric crosses the upper bound. Multiple contiguous datapoints in a timeline outside of the expected range will be grouped into a single anomaly. Therefore, an anomaly represents effectively a segment of a metric's timeline. The information stored in the `timeline_spec`, `dimensions` and `metric` can be used to fetch a full timeline with extended ragne for context. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1beta1Anomaly", +"properties": { +"dimensions": { +"description": "Combination of dimensions in which the anomaly was detected.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1DimensionValue" +}, +"type": "array" +}, +"metric": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricValue", +"description": "Metric where the anomaly was detected, together with the anomalous value." +}, +"metricSet": { +"description": "Metric set resource where the anomaly was detected.", +"type": "string" +}, +"name": { +"description": "Identifier. Name of the anomaly. Format: apps/{app}/anomalies/{anomaly}", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Timeline specification that covers the anomaly period." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1AnrRateMetricSet": { +"description": "Singleton resource representing the set of ANR (Application not responding) metrics. This metric set contains ANRs data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one user-perceived ANR. User-perceived ANRs are currently those of 'Input dispatching' type. * `userPerceivedAnrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` and `userPerceivedAnrRate` metrics. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about crashes, another stability metric.", +"id": "GooglePlayDeveloperReportingV1beta1AnrRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/anrRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1App": { +"description": "A representation of an app in the Play Store.", +"id": "GooglePlayDeveloperReportingV1beta1App", +"properties": { +"displayName": { +"description": "Title of the app. This is the latest title as set in the Play Console and may not yet have been reviewed, so might not match the Play Store. Example: `Google Maps`.", +"type": "string" +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}", +"type": "string" +}, +"packageName": { +"description": "Package name of the app. Example: `com.example.app123`.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1AppVersion": { +"description": "Representations of an app version.", +"id": "GooglePlayDeveloperReportingV1beta1AppVersion", +"properties": { +"versionCode": { +"description": "Numeric version code of the app version (set by the app's developer).", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1CrashRateMetricSet": { +"description": "Singleton resource representing the set of crashrate metrics. This metric set contains crashes data combined with usage data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash while they were actively using your app (a user-perceived crash). An app is considered to be in active use if it is displaying any activity or executing any foreground service. * `userPerceivedCrashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` and `userPerceivedCrashRate` metrics. A user is counted in this metric if they used the app actively during the aggregation period. An app is considered to be in active use if it is displaying any activity or executing any foreground service. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors contains unnormalized version (absolute counts) of crashes. * vitals.errors contains normalized metrics about ANRs, another stability metric.", +"id": "GooglePlayDeveloperReportingV1beta1CrashRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/crashRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1DecimalConfidenceInterval": { +"description": "Represents the confidence interval of a metric.", +"id": "GooglePlayDeveloperReportingV1beta1DecimalConfidenceInterval", +"properties": { +"lowerBound": { +"$ref": "GoogleTypeDecimal", +"description": "The confidence interval's lower bound." +}, +"upperBound": { +"$ref": "GoogleTypeDecimal", +"description": "The confidence interval's upper bound." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1DeviceId": { +"description": "Identifier of a device.", +"id": "GooglePlayDeveloperReportingV1beta1DeviceId", +"properties": { +"buildBrand": { +"description": "Value of Build.BRAND.", +"type": "string" +}, +"buildDevice": { +"description": "Value of Build.DEVICE.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1DeviceModelSummary": { +"description": "Summary of a device", +"id": "GooglePlayDeveloperReportingV1beta1DeviceModelSummary", +"properties": { +"deviceId": { +"$ref": "GooglePlayDeveloperReportingV1beta1DeviceId", +"description": "Identifier of the device." +}, +"deviceUri": { +"description": "Link to the device in Play Device Catalog.", +"type": "string" +}, +"marketingName": { +"description": "Display name of the device.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1DimensionValue": { +"description": "Represents the value of a single dimension.", +"id": "GooglePlayDeveloperReportingV1beta1DimensionValue", +"properties": { +"dimension": { +"description": "Name of the dimension.", +"type": "string" +}, +"int64Value": { +"description": "Actual value, represented as an int64.", +"format": "int64", +"type": "string" +}, +"stringValue": { +"description": "Actual value, represented as a string.", +"type": "string" +}, +"valueLabel": { +"description": "Optional. Human-friendly label for the value, always in English. For example, 'Spain' for the 'ES' country code. Whereas the dimension value is stable, this value label is subject to change. Do not assume that the (value, value_label) relationship is stable. For example, the ISO country code 'MK' changed its name recently to 'North Macedonia'.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1ErrorCountMetricSet": { +"description": "Singleton resource representing the set of error report metrics. This metric set contains un-normalized error report counts. **Supported aggregation periods:** * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`. * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation. **Required dimension:** This dimension must be always specified in all requests in the `dimensions` field in query requests. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app. **Related metric sets:** * vitals.errors.counts contains normalized metrics about Crashes, another stability metric. * vitals.errors.counts contains normalized metrics about ANRs, another stability metric.", +"id": "GooglePlayDeveloperReportingV1beta1ErrorCountMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "The resource name. Format: apps/{app}/errorCountMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1ErrorIssue": { +"description": "A group of related ErrorReports received for an app. Similar error reports are grouped together into issues with a likely identical root cause. **Please note:** this resource is currently in Alpha. There could be changes to the issue grouping that would result in similar but more recent error reports being assigned to different issues. This could also cause some issues disappearing entirely and being replaced by new ones. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1beta1ErrorIssue", +"properties": { +"cause": { +"description": "Cause of the issue. Depending on the type this can be either: * APPLICATION_NOT_RESPONDING: the type of ANR that occurred, e.g., 'Input dispatching timed out'. * CRASH: for Java unhandled exception errors, the type of the innermost exception that was thrown, e.g., IllegalArgumentException. For signals in native code, the signal that was raised, e.g. SIGSEGV.", +"type": "string" +}, +"distinctUsers": { +"description": "An estimate of the number of unique users who have experienced this issue (only considering occurrences matching the filters and within the requested time period).", +"format": "int64", +"type": "string" +}, +"distinctUsersPercent": { +"$ref": "GoogleTypeDecimal", +"description": "An estimated percentage of users affected by any issue that are affected by this issue (only considering occurrences matching the filters and within the requested time period)." +}, +"errorReportCount": { +"description": "The total number of error reports in this issue (only considering occurrences matching the filters and within the requested time period).", +"format": "int64", +"type": "string" +}, +"firstAppVersion": { +"$ref": "GooglePlayDeveloperReportingV1beta1AppVersion", +"description": "The earliest (inclusive) app version appearing in this ErrorIssue in the requested time period (only considering occurrences matching the filters)." +}, +"firstOsVersion": { +"$ref": "GooglePlayDeveloperReportingV1beta1OsVersion", +"description": "The smallest OS version in which this error cluster has occurred in the requested time period (only considering occurrences matching the filters and within the requested time period)." +}, +"issueUri": { +"description": "Link to the issue in Android vitals in the Play Console.", +"type": "string" +}, +"lastAppVersion": { +"$ref": "GooglePlayDeveloperReportingV1beta1AppVersion", +"description": "The latest (inclusive) app version appearing in this ErrorIssue in the requested time period (only considering occurrences matching the filters)." +}, +"lastErrorReportTime": { +"description": "Start of the hour during which the last error report in this issue occurred.", +"format": "google-datetime", +"type": "string" +}, +"lastOsVersion": { +"$ref": "GooglePlayDeveloperReportingV1beta1OsVersion", +"description": "The latest OS version in which this error cluster has occurred in the requested time period (only considering occurrences matching the filters and within the requested time period)." +}, +"location": { +"description": "Location where the issue happened. Depending on the type this can be either: * APPLICATION_NOT_RESPONDING: the name of the activity or service that stopped responding. * CRASH: the likely method name that caused the error.", +"type": "string" +}, +"name": { +"description": "Identifier. The resource name of the issue. Format: apps/{app}/{issue}", +"type": "string" +}, +"sampleErrorReports": { +"description": "Output only. Sample error reports which belong to this ErrorIssue. *Note:* currently a maximum of 1 per ErrorIssue is supported. Format: \"apps/{app}/{report}\"", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"type": { +"description": "Type of the errors grouped in this issue.", +"enum": [ +"ERROR_TYPE_UNSPECIFIED", +"APPLICATION_NOT_RESPONDING", +"CRASH" +], +"enumDescriptions": [ +"Unspecified error type.", +"Application Not Responding (ANR) error. To learn more about this type of errors visit the corresponding Android Developers documentation.", +"Crash caused by an unhandled exception in Java (or Kotlin or any other JVM language) or a signal in native code such as SIGSEGV." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1ErrorReport": { +"description": "An error report received for an app. There reports are produced by the Android platform code when a (potentially fatal) error condition is detected. Identical reports from many users will be deduplicated and coalesced into a single ErrorReport. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1beta1ErrorReport", +"properties": { +"appVersion": { +"$ref": "GooglePlayDeveloperReportingV1beta1AppVersion", +"description": "The app version on which an event in this error report occurred on." +}, +"deviceModel": { +"$ref": "GooglePlayDeveloperReportingV1beta1DeviceModelSummary", +"description": "A device model on which an event in this error report occurred on." +}, +"eventTime": { +"description": "Start of the hour during which the latest event in this error report occurred.", +"format": "google-datetime", +"type": "string" +}, +"issue": { +"description": "The issue this report was associated with. **Please note:** this resource is currently in Alpha. There could be changes to the issue grouping that would result in similar but more recent error reports being assigned to a different issue.", +"type": "string" +}, +"name": { +"description": "The resource name of the report. Format: apps/{app}/{report}", +"type": "string" +}, +"osVersion": { +"$ref": "GooglePlayDeveloperReportingV1beta1OsVersion", +"description": "The OS version on which an event in this error report occurred on." +}, +"reportText": { +"description": "Textual representation of the error report. These textual reports are produced by the platform. The reports are then sanitized and filtered to remove any potentially sensitive information. Although their format is fairly stable, they are not entirely meant for machine consumption and we cannot guarantee that there won't be subtle changes to the formatting that may break systems trying to parse information out of the reports.", +"type": "string" +}, +"type": { +"description": "Type of the error for which this report was generated.", +"enum": [ +"ERROR_TYPE_UNSPECIFIED", +"APPLICATION_NOT_RESPONDING", +"CRASH" +], +"enumDescriptions": [ +"Unspecified error type.", +"Application Not Responding (ANR) error. To learn more about this type of errors visit the corresponding Android Developers documentation.", +"Crash caused by an unhandled exception in Java (or Kotlin or any other JVM language) or a signal in native code such as SIGSEGV." +], +"type": "string" +}, +"vcsInformation": { +"description": "Version control system information from BUNDLE-METADATA/version-control-info.textproto or META-INF/version-control-info.textproto of the app bundle or APK, respectively.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet": { +"description": "Singleton resource representing the set of Excessive Weakeups metrics. This metric set contains AlarmManager wakeup counts data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1beta1ExcessiveWakeupRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/excessiveWakeupRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1FreshnessInfo": { +"description": "Represents the latest available time that can be requested in a TimelineSpec. Different aggregation periods have different freshness. For example, `DAILY` aggregation may lag behind `HOURLY` in cases where such aggregation is computed only once at the end of the day.", +"id": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"properties": { +"freshnesses": { +"description": "Information about data freshness for every supported aggregation period. This field has set semantics, keyed by the `aggregation_period` field.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness": { +"description": "Information about data freshness for a single aggregation period.", +"id": "GooglePlayDeveloperReportingV1beta1FreshnessInfoFreshness", +"properties": { +"aggregationPeriod": { +"description": "Aggregation period for which data is available.", +"enum": [ +"AGGREGATION_PERIOD_UNSPECIFIED", +"HOURLY", +"DAILY", +"FULL_RANGE" +], +"enumDescriptions": [ +"Unspecified granularity.", +"Data is aggregated in hourly intervals.", +"Data is aggregated in daily intervals.", +"Data is aggregated over the full timeline range. Effectively this produces a single value rather than a timeline." +], +"type": "string" +}, +"latestEndTime": { +"$ref": "GoogleTypeDateTime", +"description": "Latest end time for which data is available, for the aggregation period. The time is specified in the metric set's default timezone. *Note:* time ranges in TimelineSpec are represented as `start_time, end_time)`. For example, if the latest available timeline data point for a `DAILY` aggregation period is `2021-06-23 00:00:00 America/Los_Angeles`, the value of this field would be `2021-06-24 00:00:00 America/Los_Angeles` so it can be easily reused in [TimelineSpec.end_time." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse": { +"description": "Response with a list of anomalies in datasets.", +"id": "GooglePlayDeveloperReportingV1beta1ListAnomaliesResponse", +"properties": { +"anomalies": { +"description": "Anomalies that were found.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1Anomaly" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1MetricValue": { +"description": "Represents the value of a metric.", +"id": "GooglePlayDeveloperReportingV1beta1MetricValue", +"properties": { +"decimalValue": { +"$ref": "GoogleTypeDecimal", +"description": "Actual value, represented as a decimal number." +}, +"decimalValueConfidenceInterval": { +"$ref": "GooglePlayDeveloperReportingV1beta1DecimalConfidenceInterval", +"description": "Confidence interval of a value that is of type `type.Decimal`." +}, +"metric": { +"description": "Name of the metric.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1MetricsRow": { +"description": "Represents a row of dimensions and metrics.", +"id": "GooglePlayDeveloperReportingV1beta1MetricsRow", +"properties": { +"aggregationPeriod": { +"description": "Granularity of the aggregation period of the row.", +"enum": [ +"AGGREGATION_PERIOD_UNSPECIFIED", +"HOURLY", +"DAILY", +"FULL_RANGE" +], +"enumDescriptions": [ +"Unspecified granularity.", +"Data is aggregated in hourly intervals.", +"Data is aggregated in daily intervals.", +"Data is aggregated over the full timeline range. Effectively this produces a single value rather than a timeline." +], +"type": "string" +}, +"dimensions": { +"description": "Dimension columns in the row.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1DimensionValue" +}, +"type": "array" +}, +"metrics": { +"description": "Metric columns in the row.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricValue" +}, +"type": "array" +}, +"startTime": { +"$ref": "GoogleTypeDateTime", +"description": "Starting date (and time for hourly aggregation) of the period covered by this row." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1OsVersion": { +"description": "Representation of an OS version.", +"id": "GooglePlayDeveloperReportingV1beta1OsVersion", +"properties": { +"apiLevel": { +"description": "Numeric version code of the OS - API level", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest": { +"description": "Request message for QueryAnrRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `anrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one ANR. * `anrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `anrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `anrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one user-perceived ANR. User-perceived ANRs are currently those of 'Input dispatching' type. * `userPerceivedAnrRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedAnrRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedAnrRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not . supported in HOURLY granularity. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `anrRate` and `userPerceivedAnrRate` metrics. A user is counted in this metric if they used the app in the foreground during the aggregation period. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse": { +"description": "Response message for QueryAnrRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryAnrRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest": { +"description": "Request message for QueryCrashRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the metrics by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `crashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash. * `crashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `crashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `crashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that experienced at least one crash while they were actively using your app (a user-perceived crash). An app is considered to be in active use if it is displaying any activity or executing any foreground service. * `userPerceivedCrashRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `userPerceivedCrashRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `userPerceivedCrashRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. Not supported in HOURLY granularity. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `crashRate` and `userPerceivedCrashRate` metrics. A user is counted in this metric if they used the app actively during the aggregation period. An app is considered to be in active use if it is displaying any activity or executing any foreground service. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100,000; values above 100,000 will be coerced to 100,000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the default and only supported timezone is `America/Los_Angeles`. * HOURLY: metrics are aggregated in hourly intervals. The default and only supported timezone is `UTC`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse": { +"description": "Response message for QueryCrashRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryCrashRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryErrorCountMetricSetRequest": { +"description": "Request message for QueryErrorCountMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryErrorCountMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceModel` (string): unique identifier of the user's device model. * `deviceType` (string): identifier of the device's form factor, e.g., PHONE. * `reportType` (string): the type of error. The value should correspond to one of the possible values in ErrorType. * `isUserPerceived` (string): denotes whether error is user perceived or not, USER_PERCEIVED or NOT_USER_PERCEIVED. * `issueId` (string): the id an error was assigned to. The value should correspond to the `{issue}` component of the issue name. * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `errorReportCount` (`google.type.Decimal`): Absolute count of individual error reports that have been received for an app. * `distinctUsers` (`google.type.Decimal`): Count of distinct users for which reports have been received. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. This value is not rounded, however it may be an approximation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. The default and only supported timezone is `America/Los_Angeles`." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryErrorCountMetricSetResponse": { +"description": "Error counts query response.", +"id": "GooglePlayDeveloperReportingV1beta1QueryErrorCountMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest": { +"description": "Request message for QueryExcessiveWakeupRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `excessiveWakeupRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had more than 10 wakeups per hour. * `excessiveWakeupRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `excessiveWakeupRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `excessiveWakeupRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `excessiveWakeupRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse": { +"description": "Response message for QueryExcessiveWakeupRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryExcessiveWakeupRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QuerySlowRenderingRateMetricSetRequest": { +"description": "Request message for QuerySlowRenderingRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QuerySlowRenderingRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `slowRenderingRate20Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow rendering. * `slowRenderingRate20Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate20Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow rendering. * `slowRenderingRate30Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowRenderingRate20Fps`/`slowRenderingRate30Fps` metric. A user is counted in this metric if their app was launched in the device. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta Android versions only, excluding data from released Android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QuerySlowRenderingRateMetricSetResponse": { +"description": "Response message for QuerySlowRenderingRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QuerySlowRenderingRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QuerySlowStartRateMetricSetRequest": { +"description": "Request message for QuerySlowStartRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QuerySlowStartRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `slowStartRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow start. * `slowStartRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowStartRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowStartRate` metric. A user is counted in this metric if their app was launched in the device. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta Android versions only, excluding data from released Android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QuerySlowStartRateMetricSetResponse": { +"description": "Response message for QuerySlowStartRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QuerySlowStartRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest": { +"description": "Request message for QueryStuckBackgroundWakelockRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetRequest", +"properties": { +"dimensions": { +"description": "Dimensions to slice the data by. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "Filters to apply to data. The filtering expression follows [AIP-160](https://google.aip.dev/160) standard and supports filtering by equality of all breakdown dimensions.", +"type": "string" +}, +"metrics": { +"description": "Metrics to aggregate. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if they app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum size of the returned data. If unspecified, at most 1000 rows will be returned. The maximum value is 100000; values above 100000 will be coerced to 100000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to the request must match the call that provided the page token.", +"type": "string" +}, +"timelineSpec": { +"$ref": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"description": "Specification of the timeline aggregation parameters. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`." +}, +"userCohort": { +"description": "User view to select. The output data will correspond to the selected view. **Supported values:** * `OS_PUBLIC` To select data from all publicly released Android versions. This is the default. Supports all the above dimensions. * `APP_TESTERS` To select data from users who have opted in to be testers. Supports all the above dimensions. * `OS_BETA` To select data from beta android versions only, excluding data from released android versions. Only the following dimensions are supported: * `versionCode` (int64): version of the app that was running on the user's device. * `osBuild` (string): OS build of the user's device, e.g., \"T1B2.220916.004\".", +"enum": [ +"USER_COHORT_UNSPECIFIED", +"OS_PUBLIC", +"OS_BETA", +"APP_TESTERS" +], +"enumDescriptions": [ +"Unspecified User cohort. This will automatically choose the default value.", +"This is default view. Contains data from public released android versions only.", +"This is the view with just android beta data excluding released OS version data.", +"This is the view with data only from users who have opted in to be testers for a given app, excluding OS beta data." +], +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse": { +"description": "Response message for QueryStuckBackgroundWakelockRateMetricSet.", +"id": "GooglePlayDeveloperReportingV1beta1QueryStuckBackgroundWakelockRateMetricSetResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +}, +"rows": { +"description": "Returned rows of data.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1MetricsRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1Release": { +"description": "A representation of an app release.", +"id": "GooglePlayDeveloperReportingV1beta1Release", +"properties": { +"displayName": { +"description": "Readable identifier of the release.", +"type": "string" +}, +"versionCodes": { +"description": "The version codes contained in this release.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1ReleaseFilterOptions": { +"description": "A set of filtering options for releases and version codes specific to an app.", +"id": "GooglePlayDeveloperReportingV1beta1ReleaseFilterOptions", +"properties": { +"tracks": { +"description": "List of tracks to filter releases over. Provides the grouping of version codes under releases and tracks.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1SearchAccessibleAppsResponse": { +"description": "Response message for SearchAccessibleApps.", +"id": "GooglePlayDeveloperReportingV1beta1SearchAccessibleAppsResponse", +"properties": { +"apps": { +"description": "The apps accessible to the user calling the endpoint.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1App" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1SearchErrorIssuesResponse": { +"description": "Response with a paginated list of issues that matched the request.", +"id": "GooglePlayDeveloperReportingV1beta1SearchErrorIssuesResponse", +"properties": { +"errorIssues": { +"description": "ErrorIssues that were found.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1ErrorIssue" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token to fetch the next page of data.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1SearchErrorReportsResponse": { +"description": "Response with a paginated list of error reports matching the search query.", +"id": "GooglePlayDeveloperReportingV1beta1SearchErrorReportsResponse", +"properties": { +"errorReports": { +"description": "Error reports that were found.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1ErrorReport" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token to fetch the next page of reports.", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1SlowRenderingRateMetricSet": { +"description": "Singleton resource representing the set of Slow Rendering metrics. This metric set contains low-level rendering data captured by SurafeFlinger. Sessions are evaluated based on the present-to-present histogram of frames handled by any SurfaceFlinger layer owned by the app. A slow session is a session where more than 25% of frames for the session did not meet the metric's target frame rate (either 20fps, or 30fps). *NOTE:* This metric set is only available for games. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `slowRenderingRate20Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had slow rendering. * `slowRenderingRate20Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate20Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate20Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had slow rendering. * `slowRenderingRate30Fps7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowRenderingRate30Fps28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowRenderingRate30Fps` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowRenderingRate20Fps`/`slowRenderingRate30Fps` metric. A user is counted in this metric if their app rendered any frames. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1beta1SlowRenderingRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/slowRenderingRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1SlowStartRateMetricSet": { +"description": "Singleton resource representing the set of Slow Start metrics. This metric set contains Activity start duration data. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `slowStartRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a slow start. * `slowStartRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `slowStartRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `slowStartRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `slowStartRate` metric. A user is counted in this metric if their app was launched in the device. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Required dimension:** This dimension must be specified with each request for the request to be valid. * `startType` (string): the type of start that was measured. Valid types are `HOT`, `WARM` and `COLD`. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1beta1SlowStartRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/slowStartRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet": { +"description": "Singleton resource representing the set of Stuck Background Wakelocks metrics. This metric set contains PowerManager wakelock duration data combined with process state data to produce a normalized metric independent of user counts. **Supported aggregation periods:** * DAILY: metrics are aggregated in calendar date intervals. Due to historical constraints, the only supported timezone is `America/Los_Angeles`. **Supported metrics:** * `stuckBgWakelockRate` (`google.type.Decimal`): Percentage of distinct users in the aggregation period that had a wakelock held in the background for longer than 1 hour. * `stuckBgWakelockRate7dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 7 days. The daily values are weighted by the count of distinct users for the day. * `stuckBgWakelockRate28dUserWeighted` (`google.type.Decimal`): Rolling average value of `stuckBgWakelockRate` in the last 28 days. The daily values are weighted by the count of distinct users for the day. * `distinctUsers` (`google.type.Decimal`): Count of distinct users in the aggregation period that were used as normalization value for the `stuckBgWakelockRate` metric. A user is counted in this metric if their app was doing any work on the device, i.e., not just active foreground usage but also background work. Care must be taken not to aggregate this count further, as it may result in users being counted multiple times. The value is rounded to the nearest multiple of 10, 100, 1,000 or 1,000,000, depending on the magnitude of the value. **Supported dimensions:** * `apiLevel` (string): the API level of Android that was running on the user's device, e.g., 26. * `versionCode` (int64): version of the app that was running on the user's device. * `deviceModel` (string): unique identifier of the user's device model. The form of the identifier is 'deviceBrand/device', where deviceBrand corresponds to Build.BRAND and device corresponds to Build.DEVICE, e.g., google/coral. * `deviceBrand` (string): unique identifier of the user's device brand, e.g., google. * `deviceType` (string): the type (also known as form factor) of the user's device, e.g., PHONE. * `countryCode` (string): the country or region of the user's device based on their IP address, represented as a 2-letter ISO-3166 code (e.g. US for the United States). * `deviceRamBucket` (int64): RAM of the device, in MB, in buckets (3GB, 4GB, etc.). * `deviceSocMake` (string): Make of the device's primary system-on-chip, e.g., Samsung. [Reference](https://developer.android.com/reference/android/os/Build#SOC_MANUFACTURER) * `deviceSocModel` (string): Model of the device's primary system-on-chip, e.g., \"Exynos 2100\". [Reference](https://developer.android.com/reference/android/os/Build#SOC_MODEL) * `deviceCpuMake` (string): Make of the device's CPU, e.g., Qualcomm. * `deviceCpuModel` (string): Model of the device's CPU, e.g., \"Kryo 240\". * `deviceGpuMake` (string): Make of the device's GPU, e.g., ARM. * `deviceGpuModel` (string): Model of the device's GPU, e.g., Mali. * `deviceGpuVersion` (string): Version of the device's GPU, e.g., T750. * `deviceVulkanVersion` (string): Vulkan version of the device, e.g., \"4198400\". * `deviceGlEsVersion` (string): OpenGL ES version of the device, e.g., \"196610\". * `deviceScreenSize` (string): Screen size of the device, e.g., NORMAL, LARGE. * `deviceScreenDpi` (string): Screen density of the device, e.g., mdpi, hdpi. **Required permissions**: to access this resource, the calling user needs the _View app information (read-only)_ permission for the app.", +"id": "GooglePlayDeveloperReportingV1beta1StuckBackgroundWakelockRateMetricSet", +"properties": { +"freshnessInfo": { +"$ref": "GooglePlayDeveloperReportingV1beta1FreshnessInfo", +"description": "Summary about data freshness in this resource." +}, +"name": { +"description": "Identifier. The resource name. Format: apps/{app}/stuckBackgroundWakelockRateMetricSet", +"type": "string" +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1TimelineSpec": { +"description": "Specification of the time-related aggregation parameters of a timeline. Timelines have an aggregation period (`DAILY`, `HOURLY`, etc) which defines how events are aggregated in metrics. The points in a timeline are defined by the starting DateTime of the aggregation period. The duration is implicit in the AggregationPeriod. Hourly aggregation periods, when supported by a metric set, are always specified in UTC to avoid ambiguities around daylight saving time transitions, where an hour is skipped when adopting DST, and repeated when abandoning DST. For example, the timestamp '2021-11-07 01:00:00 America/Los_Angeles' is ambiguous since it can correspond to '2021-11-07 08:00:00 UTC' or '2021-11-07 09:00:00 UTC'. Daily aggregation periods require specifying a timezone which will determine the precise instants of the start and the end of the day. Not all metric sets support all timezones, so make sure to check which timezones are supported by the metric set you want to query.", +"id": "GooglePlayDeveloperReportingV1beta1TimelineSpec", +"properties": { +"aggregationPeriod": { +"description": "Type of the aggregation period of the datapoints in the timeline. Intervals are identified by the date and time at the start of the interval.", +"enum": [ +"AGGREGATION_PERIOD_UNSPECIFIED", +"HOURLY", +"DAILY", +"FULL_RANGE" +], +"enumDescriptions": [ +"Unspecified granularity.", +"Data is aggregated in hourly intervals.", +"Data is aggregated in daily intervals.", +"Data is aggregated over the full timeline range. Effectively this produces a single value rather than a timeline." +], +"type": "string" +}, +"endTime": { +"$ref": "GoogleTypeDateTime", +"description": "Ending datapoint of the timeline (exclusive). See start_time for restrictions. The timezone of the end point must match the timezone of the start point." +}, +"startTime": { +"$ref": "GoogleTypeDateTime", +"description": "Starting datapoint of the timeline (inclusive). Must be aligned to the aggregation period as follows: * HOURLY: the 'minutes', 'seconds' and 'nanos' fields must be unset. The time_zone can be left unset (defaults to UTC) or set explicitly to \"UTC\". Setting any other utc_offset or timezone id will result in a validation error. * DAILY: the 'hours', 'minutes', 'seconds' and 'nanos' fields must be unset. Different metric sets support different timezones. It can be left unset to use the default timezone specified by the metric set. The timezone of the end point must match the timezone of the start point." +} +}, +"type": "object" +}, +"GooglePlayDeveloperReportingV1beta1Track": { +"description": "A representation of a Play release track.", +"id": "GooglePlayDeveloperReportingV1beta1Track", +"properties": { +"displayName": { +"description": "Readable identifier of the track.", +"type": "string" +}, +"servingReleases": { +"description": "Represents all active releases in the track.", +"items": { +"$ref": "GooglePlayDeveloperReportingV1beta1Release" +}, +"type": "array" +}, +"type": { +"description": "The type of the track.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDateTime": { +"description": "Represents civil time (or occasionally physical time). This type can represent a civil time in one of a few possible ways: * When utc_offset is set and time_zone is unset: a civil time on a calendar day with a particular offset from UTC. * When time_zone is set and utc_offset is unset: a civil time on a calendar day in a particular time zone. * When neither time_zone nor utc_offset is set: a civil time on a calendar day in local time. The date is relative to the Proleptic Gregorian Calendar. If year, month, or day are 0, the DateTime is considered not to have a specific year, month, or day respectively. This type may also be used to represent a physical time if all the date and time fields are set and either case of the `time_offset` oneof is set. Consider using `Timestamp` message for physical time instead. If your use case also would like to store the user's timezone, that can be done in another field. This type is more flexible than some applications may want. Make sure to document and validate your application's limitations.", +"id": "GoogleTypeDateTime", +"properties": { +"day": { +"description": "Optional. Day of month. Must be from 1 to 31 and valid for the year and month, or 0 if specifying a datetime without a day.", +"format": "int32", +"type": "integer" +}, +"hours": { +"description": "Optional. Hours of day in 24 hour format. Should be from 0 to 23, defaults to 0 (midnight). An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Optional. Minutes of hour of day. Must be from 0 to 59, defaults to 0.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Optional. Month of year. Must be from 1 to 12, or 0 if specifying a datetime without a month.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Optional. Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999, defaults to 0.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Optional. Seconds of minutes of the time. Must normally be from 0 to 59, defaults to 0. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +}, +"timeZone": { +"$ref": "GoogleTypeTimeZone", +"description": "Time zone." +}, +"utcOffset": { +"description": "UTC offset. Must be whole seconds, between -18 hours and +18 hours. For example, a UTC offset of -4:00 would be represented as { seconds: -14400 }.", +"format": "google-duration", +"type": "string" +}, +"year": { +"description": "Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a datetime without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleTypeDecimal": { +"description": "A representation of a decimal value, such as 2.5. Clients may convert values into language-native decimal formats, such as Java's BigDecimal or Python's decimal.Decimal. [BigDecimal]: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/math/BigDecimal.html [decimal.Decimal]: https://docs.python.org/3/library/decimal.html", +"id": "GoogleTypeDecimal", +"properties": { +"value": { +"description": "The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits (\"the integer\"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeTimeZone": { +"description": "Represents a time zone from the [IANA Time Zone Database](https://www.iana.org/time-zones).", +"id": "GoogleTypeTimeZone", +"properties": { +"id": { +"description": "IANA Time Zone Database time zone, e.g. \"America/New_York\".", +"type": "string" +}, +"version": { +"description": "Optional. IANA Time Zone Database version number, e.g. \"2019a\".", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Play Developer Reporting API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playgrouping.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playgrouping.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..faca6e9705349123594e3a07a662e3e9ead7de78 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playgrouping.v1alpha1.json @@ -0,0 +1,262 @@ +{ +"basePath": "", +"baseUrl": "https://playgrouping.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Play Grouping", +"description": "playgrouping.googleapis.com API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/playgrouping/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "playgrouping:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://playgrouping.mtls.googleapis.com/", +"name": "playgrouping", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"apps": { +"resources": { +"tokens": { +"methods": { +"verify": { +"description": "Verify an API token by asserting the app and persona it belongs to. The verification is a protection against client-side attacks and will fail if the contents of the token don't match the provided values. A token must be verified before it can be used to manipulate user tags.", +"flatPath": "v1alpha1/apps/{appsId}/tokens/{tokensId}:verify", +"httpMethod": "POST", +"id": "playgrouping.apps.tokens.verify", +"parameterOrder": [ +"appPackage", +"token" +], +"parameters": { +"appPackage": { +"description": "Required. App the token belongs to. Format: apps/{package_name}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +}, +"token": { +"description": "Required. The token to be verified. Format: tokens/{token}", +"location": "path", +"pattern": "^tokens/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+appPackage}/{+token}:verify", +"request": { +"$ref": "VerifyTokenRequest" +}, +"response": { +"$ref": "VerifyTokenResponse" +} +} +}, +"resources": { +"tags": { +"methods": { +"createOrUpdate": { +"description": "Create or update tags for the user and app that are represented by the given token.", +"flatPath": "v1alpha1/apps/{appsId}/tokens/{tokensId}/tags:createOrUpdate", +"httpMethod": "POST", +"id": "playgrouping.apps.tokens.tags.createOrUpdate", +"parameterOrder": [ +"appPackage", +"token" +], +"parameters": { +"appPackage": { +"description": "Required. App whose tags are being manipulated. Format: apps/{package_name}", +"location": "path", +"pattern": "^apps/[^/]+$", +"required": true, +"type": "string" +}, +"token": { +"description": "Required. Token for which the tags are being inserted or updated. Format: tokens/{token}", +"location": "path", +"pattern": "^tokens/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+appPackage}/{+token}/tags:createOrUpdate", +"request": { +"$ref": "CreateOrUpdateTagsRequest" +}, +"response": { +"$ref": "CreateOrUpdateTagsResponse" +} +} +} +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://playgrouping.googleapis.com/", +"schemas": { +"CreateOrUpdateTagsRequest": { +"description": "Request message for CreateOrUpdateTags. VerifyToken.", +"id": "CreateOrUpdateTagsRequest", +"properties": { +"tags": { +"description": "Tags to be inserted or updated.", +"items": { +"$ref": "Tag" +}, +"type": "array" +} +}, +"type": "object" +}, +"CreateOrUpdateTagsResponse": { +"description": "Response message for CreateOrUpdateTags.", +"id": "CreateOrUpdateTagsResponse", +"properties": { +"tags": { +"description": "All requested tags are returned, including pre-existing ones.", +"items": { +"$ref": "Tag" +}, +"type": "array" +} +}, +"type": "object" +}, +"Tag": { +"description": "A tag is associated with exactly one package name and user.", +"id": "Tag", +"properties": { +"booleanValue": { +"description": "A boolean value of the tag.", +"type": "boolean" +}, +"int64Value": { +"description": "A signed 64-bit integer value of the tag.", +"format": "int64", +"type": "string" +}, +"key": { +"description": "Required. Key for the tag.", +"type": "string" +}, +"stringValue": { +"description": "A string value of the tag.", +"type": "string" +}, +"timeValue": { +"description": "A time value of the tag.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"VerifyTokenRequest": { +"description": "Request message for VerifyToken.", +"id": "VerifyTokenRequest", +"properties": { +"persona": { +"description": "Required. Persona represented by the token. Format: personas/{persona}", +"type": "string" +} +}, +"type": "object" +}, +"VerifyTokenResponse": { +"description": "Response message for VerifyToken.", +"id": "VerifyTokenResponse", +"properties": {}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Play Grouping API", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playintegrity.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playintegrity.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..aa8b49381c887348ae14214a8ab4e15ce1eab1ba --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/playintegrity.v1.json @@ -0,0 +1,469 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/playintegrity": { +"description": "Private Service: https://www.googleapis.com/auth/playintegrity" +} +} +} +}, +"basePath": "", +"baseUrl": "https://playintegrity.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Play Integrity", +"description": "The Play Integrity API helps you check that you're interacting with your genuine app on a genuine Android device powered by Google Play services. The Play Integrity API has replaced SafetyNet Attestation and Android Device Verification.", +"discoveryVersion": "v1", +"documentationLink": "https://developer.android.com/google/play/integrity", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "playintegrity:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://playintegrity.mtls.googleapis.com/", +"name": "playintegrity", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"v1": { +"methods": { +"decodeIntegrityToken": { +"description": "Decodes the integrity token and returns the token payload.", +"flatPath": "v1/{v1Id}:decodeIntegrityToken", +"httpMethod": "POST", +"id": "playintegrity.decodeIntegrityToken", +"parameterOrder": [ +"packageName" +], +"parameters": { +"packageName": { +"description": " Package name of the app the attached integrity token belongs to.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+packageName}:decodeIntegrityToken", +"request": { +"$ref": "DecodeIntegrityTokenRequest" +}, +"response": { +"$ref": "DecodeIntegrityTokenResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/playintegrity" +] +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://playintegrity.googleapis.com/", +"schemas": { +"AccountActivity": { +"description": "(Restricted Access) Contains a signal helping apps differentiating between likely genuine and likely non-genuine user traffic.", +"id": "AccountActivity", +"properties": { +"activityLevel": { +"description": "Required. Indicates the activity level of the account.", +"enum": [ +"ACTIVITY_LEVEL_UNSPECIFIED", +"UNEVALUATED", +"UNUSUAL", +"UNKNOWN", +"TYPICAL_BASIC", +"TYPICAL_STRONG" +], +"enumDescriptions": [ +"Activity level has not been set.", +"Account activity level is not evaluated.", +"Unusual activity for at least one of the user accounts on the device.", +"Insufficient activity to verify the user account on the device.", +"Typical activity for the user account or accounts on the device.", +"Typical for the user account or accounts on the device, with harder to replicate signals." +], +"type": "string" +} +}, +"type": "object" +}, +"AccountDetails": { +"description": "Contains the account information such as the licensing status for the user in the scope.", +"id": "AccountDetails", +"properties": { +"accountActivity": { +"$ref": "AccountActivity", +"description": "(Restricted Access) Details about the account activity for the user in the scope." +}, +"appLicensingVerdict": { +"description": "Required. Details about the licensing status of the user for the app in the scope.", +"enum": [ +"UNKNOWN", +"LICENSED", +"UNLICENSED", +"UNEVALUATED" +], +"enumDescriptions": [ +"Play does not have sufficient information to evaluate licensing details", +"The app and certificate match the versions distributed by Play.", +"The certificate or package name does not match Google Play records.", +"Licensing details were not evaluated since a necessary requirement was missed. For example DeviceIntegrity did not meet the minimum bar or the application was not a known Play version." +], +"type": "string" +} +}, +"type": "object" +}, +"AppAccessRiskVerdict": { +"description": "Contains signals about others apps on the device which could be used to access or control the requesting app.", +"id": "AppAccessRiskVerdict", +"properties": { +"otherApps": { +"description": "Required. App access risk verdict related to apps that are not installed by Google Play, and are not preloaded on the system image by the device manufacturer.", +"enum": [ +"UNKNOWN", +"UNEVALUATED", +"NOT_INSTALLED", +"INSTALLED", +"CAPTURING", +"CONTROLLING" +], +"enumDescriptions": [ +"Risk type is unknown.", +"App access risk was not evaluated because a requirement was missed, such as the device not being trusted enough.", +"No apps under this field are installed on the device. This is only valid for the other apps field.", +"One or more apps under this field are installed on the device.", +"Apps under this field are running that could be used to read or capture inputs and outputs of the requesting app, such as screen recording apps.", +"Apps under this field are running that could be used to control the device and inputs and outputs of the requesting app, such as remote controlling apps." +], +"type": "string" +}, +"playOrSystemApps": { +"description": "Required. App access risk verdict related to apps that are not installed by the Google Play Store, and are not preloaded on the system image by the device manufacturer.", +"enum": [ +"UNKNOWN", +"UNEVALUATED", +"NOT_INSTALLED", +"INSTALLED", +"CAPTURING", +"CONTROLLING" +], +"enumDescriptions": [ +"Risk type is unknown.", +"App access risk was not evaluated because a requirement was missed, such as the device not being trusted enough.", +"No apps under this field are installed on the device. This is only valid for the other apps field.", +"One or more apps under this field are installed on the device.", +"Apps under this field are running that could be used to read or capture inputs and outputs of the requesting app, such as screen recording apps.", +"Apps under this field are running that could be used to control the device and inputs and outputs of the requesting app, such as remote controlling apps." +], +"type": "string" +} +}, +"type": "object" +}, +"AppIntegrity": { +"description": "Contains the application integrity information.", +"id": "AppIntegrity", +"properties": { +"appRecognitionVerdict": { +"description": "Required. Details about the app recognition verdict", +"enum": [ +"UNKNOWN", +"PLAY_RECOGNIZED", +"UNRECOGNIZED_VERSION", +"UNEVALUATED" +], +"enumDescriptions": [ +"Play does not have sufficient information to evaluate app integrity", +"The app and certificate match the versions distributed by Play.", +"The certificate or package name does not match Google Play records.", +"Application integrity was not evaluated since a necessary requirement was missed. For example DeviceIntegrity did not meet the minimum bar." +], +"type": "string" +}, +"certificateSha256Digest": { +"description": "The SHA256 hash of the requesting app's signing certificates (base64 web-safe encoded). Set iff app_recognition_verdict != UNEVALUATED.", +"items": { +"type": "string" +}, +"type": "array" +}, +"packageName": { +"description": "Package name of the application under attestation. Set iff app_recognition_verdict != UNEVALUATED.", +"type": "string" +}, +"versionCode": { +"description": "Version code of the application. Set iff app_recognition_verdict != UNEVALUATED.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"DecodeIntegrityTokenRequest": { +"description": "Request to decode the integrity token.", +"id": "DecodeIntegrityTokenRequest", +"properties": { +"integrityToken": { +"description": "Encoded integrity token.", +"type": "string" +} +}, +"type": "object" +}, +"DecodeIntegrityTokenResponse": { +"description": "Response containing the decoded integrity payload.", +"id": "DecodeIntegrityTokenResponse", +"properties": { +"tokenPayloadExternal": { +"$ref": "TokenPayloadExternal", +"description": "Plain token payload generated from the decoded integrity token." +} +}, +"type": "object" +}, +"DeviceIntegrity": { +"description": "Contains the device attestation information. Next tag: 4", +"id": "DeviceIntegrity", +"properties": { +"deviceRecognitionVerdict": { +"description": "Details about the integrity of the device the app is running on.", +"items": { +"enum": [ +"UNKNOWN", +"MEETS_BASIC_INTEGRITY", +"MEETS_DEVICE_INTEGRITY", +"MEETS_STRONG_INTEGRITY", +"MEETS_VIRTUAL_INTEGRITY" +], +"enumDescriptions": [ +"Play does not have sufficient information to evaluate device integrity", +"App is running on a device that passes basic system integrity checks, but may not meet Android platform compatibility requirements and may not be approved to run Google Play services.", +"App is running on GMS Android device with Google Play services.", +"App is running on GMS Android device with Google Play services and has a strong guarantee of system integrity such as a hardware-backed keystore.", +"App is running on an Android emulator with Google Play services which meets core Android compatibility requirements." +], +"type": "string" +}, +"type": "array" +}, +"recentDeviceActivity": { +"$ref": "RecentDeviceActivity", +"description": "Details about the device activity of the device the app is running on." +} +}, +"type": "object" +}, +"EnvironmentDetails": { +"description": "Contains information about the environment Play Integrity API runs in, e.g. Play Protect verdict.", +"id": "EnvironmentDetails", +"properties": { +"appAccessRiskVerdict": { +"$ref": "AppAccessRiskVerdict", +"description": "The evaluation of the App Access Risk verdicts." +}, +"playProtectVerdict": { +"description": "The evaluation of Play Protect verdict.", +"enum": [ +"PLAY_PROTECT_VERDICT_UNSPECIFIED", +"UNEVALUATED", +"NO_ISSUES", +"NO_DATA", +"MEDIUM_RISK", +"HIGH_RISK", +"POSSIBLE_RISK" +], +"enumDescriptions": [ +"Play Protect verdict has not been set.", +"Play Protect state was not evaluated. Device may not be trusted.", +"Play Protect is on and no issues found.", +"Play Protect is on but no scan has been performed yet. The device or Play Store app may have been reset.", +"Play Protect is on and warnings found.", +"Play Protect is on and high severity issues found.", +"Play Protect is turned off. Turn on Play Protect." +], +"type": "string" +} +}, +"type": "object" +}, +"RecentDeviceActivity": { +"description": "Recent device activity can help developers identify devices that have exhibited hyperactive attestation activity, which could be a sign of an attack or token farming.", +"id": "RecentDeviceActivity", +"properties": { +"deviceActivityLevel": { +"description": "Required. Indicates the activity level of the device.", +"enum": [ +"DEVICE_ACTIVITY_LEVEL_UNSPECIFIED", +"UNEVALUATED", +"LEVEL_1", +"LEVEL_2", +"LEVEL_3", +"LEVEL_4" +], +"enumDescriptions": [ +"Device activity level has not been set.", +"Device activity level has not been evaluated.", +"Indicates the amount of used tokens. See the documentation for details.", +"Indicates the amount of used tokens. See the documentation for details.", +"Indicates the amount of used tokens. See the documentation for details.", +"Indicates the amount of used tokens. See the documentation for details." +], +"type": "string" +} +}, +"type": "object" +}, +"RequestDetails": { +"description": "Contains the integrity request information.", +"id": "RequestDetails", +"properties": { +"nonce": { +"description": "Nonce that was provided in the request (which is base64 web-safe no-wrap).", +"type": "string" +}, +"requestHash": { +"description": "Request hash that was provided in the request.", +"type": "string" +}, +"requestPackageName": { +"description": "Required. Application package name this attestation was requested for. Note: This field makes no guarantees or promises on the caller integrity. For details on application integrity, check application_integrity.", +"type": "string" +}, +"timestampMillis": { +"description": "Required. Timestamp, in milliseconds, of the integrity application request.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"TestingDetails": { +"description": "Contains additional information generated for testing responses.", +"id": "TestingDetails", +"properties": { +"isTestingResponse": { +"description": "Required. Indicates that the information contained in this payload is a testing response that is statically overridden for a tester.", +"type": "boolean" +} +}, +"type": "object" +}, +"TokenPayloadExternal": { +"description": "Contains basic app information and integrity signals like device attestation and licensing details.", +"id": "TokenPayloadExternal", +"properties": { +"accountDetails": { +"$ref": "AccountDetails", +"description": "Required. Details about the Play Store account." +}, +"appIntegrity": { +"$ref": "AppIntegrity", +"description": "Required. Details about the application integrity." +}, +"deviceIntegrity": { +"$ref": "DeviceIntegrity", +"description": "Required. Details about the device integrity." +}, +"environmentDetails": { +"$ref": "EnvironmentDetails", +"description": "Details of the environment Play Integrity API runs in." +}, +"requestDetails": { +"$ref": "RequestDetails", +"description": "Required. Details about the integrity request." +}, +"testingDetails": { +"$ref": "TestingDetails", +"description": "Indicates that this payload is generated for testing purposes and contains any additional data that is linked with testing status." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Play Integrity API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policyanalyzer.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policyanalyzer.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..e7bf56da045348b33fed4fb2b02e042cb80293f5 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policyanalyzer.v1.json @@ -0,0 +1,235 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://policyanalyzer.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Policy Analyzer", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://www.google.com", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "policyanalyzer:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://policyanalyzer.mtls.googleapis.com/", +"name": "policyanalyzer", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"activityTypes": { +"resources": { +"activities": { +"methods": { +"query": { +"description": "Queries policy activities on Google Cloud resources.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/activityTypes/{activityTypesId}/activities:query", +"httpMethod": "GET", +"id": "policyanalyzer.projects.locations.activityTypes.activities.query", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the activities returned. For serviceAccountLastAuthentication activities, supported filters are: - `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full resource name of the service account. For serviceAccountKeyLastAuthentication activities, supported filters are: - `activities.full_resource_name {=} [STRING]` - `activities.fullResourceName {=} [STRING]` where `[STRING]` is the full resource name of the service account key.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to Google Cloud Locations: https://cloud.google.com/about/locations/", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/activityTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/activities:query", +"response": { +"$ref": "GoogleCloudPolicyanalyzerV1QueryActivityResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://policyanalyzer.googleapis.com/", +"schemas": { +"GoogleCloudPolicyanalyzerV1Activity": { +"id": "GoogleCloudPolicyanalyzerV1Activity", +"properties": { +"activity": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "A struct of custom fields to explain the activity.", +"type": "object" +}, +"activityType": { +"description": "The type of the activity.", +"type": "string" +}, +"fullResourceName": { +"description": "The full resource name that identifies the resource. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"observationPeriod": { +"$ref": "GoogleCloudPolicyanalyzerV1ObservationPeriod", +"description": "The data observation period to build the activity." +} +}, +"type": "object" +}, +"GoogleCloudPolicyanalyzerV1ObservationPeriod": { +"description": "Represents data observation period.", +"id": "GoogleCloudPolicyanalyzerV1ObservationPeriod", +"properties": { +"endTime": { +"description": "The observation end time. The time in this timestamp is always `07:00:00Z`.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The observation start time. The time in this timestamp is always `07:00:00Z`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicyanalyzerV1QueryActivityResponse": { +"description": "Response to the `QueryActivity` method.", +"id": "GoogleCloudPolicyanalyzerV1QueryActivityResponse", +"properties": { +"activities": { +"description": "The set of activities that match the filter included in the request.", +"items": { +"$ref": "GoogleCloudPolicyanalyzerV1Activity" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `nextPageToken` is included. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Policy Analyzer API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policyanalyzer.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policyanalyzer.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..cf977d592326de50106dd5907f97e414c76eb2e4 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policyanalyzer.v1beta1.json @@ -0,0 +1,235 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://policyanalyzer.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Policy Analyzer", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://www.google.com", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "policyanalyzer:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://policyanalyzer.mtls.googleapis.com/", +"name": "policyanalyzer", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"activityTypes": { +"resources": { +"activities": { +"methods": { +"query": { +"description": "Queries policy activities on GCP resources.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/activityTypes/{activityTypesId}/activities:query", +"httpMethod": "GET", +"id": "policyanalyzer.projects.locations.activityTypes.activities.query", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Optional filter expression to restrict the activities returned. Supported filters are: - service_account_last_authn.full_resource_name {=} - service_account_key_last_authn.full_resource_name {=} ", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Max limit is 1000. Non-positive values are ignored. The presence of `nextPageToken` in the response indicates that more results might be available.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, then retrieve the next batch of results from the preceding call to this method. `pageToken` must be the value of `nextPageToken` from the previous response. The values of other method parameters should be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: `projects/[PROJECT_ID|PROJECT_NUMBER]/locations/[LOCATION]/activityTypes/[ACTIVITY_TYPE]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/activityTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/activities:query", +"response": { +"$ref": "GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://policyanalyzer.googleapis.com/", +"schemas": { +"GoogleCloudPolicyanalyzerV1beta1Activity": { +"id": "GoogleCloudPolicyanalyzerV1beta1Activity", +"properties": { +"activity": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "A struct of custom fields to explain the activity.", +"type": "object" +}, +"activityType": { +"description": "The type of the activity.", +"type": "string" +}, +"fullResourceName": { +"description": "The full resource name that identifies the resource. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"observationPeriod": { +"$ref": "GoogleCloudPolicyanalyzerV1beta1ObservationPeriod", +"description": "The data observation period to build the activity." +} +}, +"type": "object" +}, +"GoogleCloudPolicyanalyzerV1beta1ObservationPeriod": { +"description": "Represents data observation period.", +"id": "GoogleCloudPolicyanalyzerV1beta1ObservationPeriod", +"properties": { +"endTime": { +"description": "The observation end time.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The observation start time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse": { +"description": "Response to the `QueryActivity` method.", +"id": "GoogleCloudPolicyanalyzerV1beta1QueryActivityResponse", +"properties": { +"activities": { +"description": "The set of activities that match the filter included in the request.", +"items": { +"$ref": "GoogleCloudPolicyanalyzerV1beta1Activity" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If there might be more results than those appearing in this response, then `nextPageToken` is included. To get the next set of results, call this method again using the value of `nextPageToken` as `pageToken`.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Policy Analyzer API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..45ed26083ee30863d92c1746765febcb4d9aded7 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1.json @@ -0,0 +1,2543 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://policysimulator.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Policy Simulator", +"description": " Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. A `Replay` is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/iam/docs/simulating-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "policysimulator:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://policysimulator.mtls.googleapis.com/", +"name": "policysimulator", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.folders.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1Replay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1Replay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "policysimulator.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"organizations": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"methods": { +"create": { +"description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"orgPolicyViolationsPreviewId": { +"description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/orgPolicyViolationsPreviews", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the OrgPolicyViolationsPreview to get.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/orgPolicyViolationsPreviews", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"orgPolicyViolations": { +"methods": { +"list": { +"description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/orgPolicyViolations", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1Replay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1Replay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.projects.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1Replay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1Replay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://policysimulator.googleapis.com/", +"schemas": { +"GoogleCloudOrgpolicyV2AlternatePolicySpec": { +"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.", +"id": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"properties": { +"launch": { +"description": "Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Specify constraint for configurations of Google Cloud resources." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2CustomConstraint": { +"description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.", +"id": "GoogleCloudOrgpolicyV2CustomConstraint", +"properties": { +"actionType": { +"description": "Allow or deny type.", +"enum": [ +"ACTION_TYPE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Allowed action type.", +"Deny action type." +], +"type": "string" +}, +"condition": { +"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", +"type": "string" +}, +"description": { +"description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters.", +"type": "string" +}, +"displayName": { +"description": "One line display name for the UI. The max length of the display_name is 200 characters.", +"type": "string" +}, +"methodTypes": { +"description": "All the operations being applied for this constraint.", +"items": { +"enum": [ +"METHOD_TYPE_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Constraint applied when creating the resource.", +"Constraint applied when updating the resource.", +"Constraint applied when deleting the resource. Not supported yet." +], +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", +"type": "string" +}, +"resourceTypes": { +"description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2Policy": { +"description": "Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2Policy", +"properties": { +"alternate": { +"$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"deprecated": true, +"description": "Deprecated." +}, +"dryRunSpec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced." +}, +"etag": { +"description": "Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Basic information about the Organization Policy." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpec": { +"description": "Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2PolicySpec", +"properties": { +"etag": { +"description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", +"type": "string" +}, +"inheritFromParent": { +"description": "Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.", +"type": "boolean" +}, +"reset": { +"description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", +"type": "boolean" +}, +"rules": { +"description": "In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.", +"items": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { +"description": "A rule used to express this policy.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", +"properties": { +"allowAll": { +"description": "Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"&&\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." +}, +"denyAll": { +"description": "Setting this to true means that all values are denied. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"enforce": { +"description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", +"type": "boolean" +}, +"values": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { +"description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"properties": { +"allowedValues": { +"description": "List of values allowed at this resource.", +"items": { +"type": "string" +}, +"type": "array" +}, +"deniedValues": { +"description": "List of values denied at this resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1AccessStateDiff": { +"description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.", +"id": "GoogleCloudPolicysimulatorV1AccessStateDiff", +"properties": { +"accessChange": { +"description": "How the principal's access, specified in the AccessState field, changed between the current (baseline) policies and proposed (simulated) policies.", +"enum": [ +"ACCESS_CHANGE_TYPE_UNSPECIFIED", +"NO_CHANGE", +"UNKNOWN_CHANGE", +"ACCESS_REVOKED", +"ACCESS_GAINED", +"ACCESS_MAYBE_REVOKED", +"ACCESS_MAYBE_GAINED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal's access did not change. This includes the case where both baseline and simulated are UNKNOWN, but the unknown information is equivalent.", +"The principal's access under both the current policies and the proposed policies is `UNKNOWN`, but the unknown information differs between them.", +"The principal had access under the current policies (`GRANTED`), but will no longer have access after the proposed changes (`NOT_GRANTED`).", +"The principal did not have access under the current policies (`NOT_GRANTED`), but will have access after the proposed changes (`GRANTED`).", +"This result can occur for the following reasons: * The principal had access under the current policies (`GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will not have access after the proposed changes (`NOT_GRANTED`).", +"This result can occur for the following reasons: * The principal did not have access under the current policies (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will have access after the proposed changes (`GRANTED`)." +], +"type": "string" +}, +"baseline": { +"$ref": "GoogleCloudPolicysimulatorV1ExplainedAccess", +"description": "The results of evaluating the access tuple under the current (baseline) policies. If the AccessState couldn't be fully evaluated, this field explains why." +}, +"simulated": { +"$ref": "GoogleCloudPolicysimulatorV1ExplainedAccess", +"description": "The results of evaluating the access tuple under the proposed (simulated) policies. If the AccessState couldn't be fully evaluated, this field explains why." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1AccessTuple": { +"description": "Information about the principal, resource, and permission to check.", +"id": "GoogleCloudPolicysimulatorV1AccessTuple", +"properties": { +"fullResourceName": { +"description": "Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"permission": { +"description": "Required. The IAM permission to check for the specified principal and resource. For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference. For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"principal": { +"description": "Required. The principal whose access you want to check, in the form of the email address that represents that principal. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must be a Google Account or a service account. Other types of principals are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1BindingExplanation": { +"description": "Details about how a binding in a policy affects a principal's ability to use a permission.", +"id": "GoogleCloudPolicysimulatorV1BindingExplanation", +"properties": { +"access": { +"description": "Required. Indicates whether _this binding_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition expression that prevents this binding from granting access unless the expression evaluates to `true`. To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview." +}, +"memberships": { +"additionalProperties": { +"$ref": "GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership" +}, +"description": "Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request. For example, suppose that a binding includes the following principals: * `user:alice@example.com` * `group:product-eng@example.com` The principal in the replayed access tuple is `user:bob@example.com`. This user is a principal of the group `group:product-eng@example.com`. For the first principal in the binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.", +"type": "object" +}, +"relevance": { +"description": "The relevance of this binding to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +}, +"role": { +"description": "The role that this binding grants. For example, `roles/compute.serviceAgent`. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"rolePermission": { +"description": "Indicates whether the role granted by this binding contains the specified permission.", +"enum": [ +"ROLE_PERMISSION_UNSPECIFIED", +"ROLE_PERMISSION_INCLUDED", +"ROLE_PERMISSION_NOT_INCLUDED", +"ROLE_PERMISSION_UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The permission is included in the role.", +"The permission is not included in the role.", +"The user who created the Replay is not allowed to access the binding." +], +"type": "string" +}, +"rolePermissionRelevance": { +"description": "The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership": { +"description": "Details about whether the binding includes the principal.", +"id": "GoogleCloudPolicysimulatorV1BindingExplanationAnnotatedMembership", +"properties": { +"membership": { +"description": "Indicates whether the binding includes the principal.", +"enum": [ +"MEMBERSHIP_UNSPECIFIED", +"MEMBERSHIP_INCLUDED", +"MEMBERSHIP_NOT_INCLUDED", +"MEMBERSHIP_UNKNOWN_INFO_DENIED", +"MEMBERSHIP_UNKNOWN_UNSUPPORTED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The binding includes the principal. The principal can be included directly or indirectly. For example: * A principal is included directly if that principal is listed in the binding. * A principal is included indirectly if that principal is in a Google group or Google Workspace domain that is listed in the binding.", +"The binding does not include the principal.", +"The user who created the Replay is not allowed to access the binding.", +"The principal is an unsupported type. Only Google Accounts and service accounts are supported." +], +"type": "string" +}, +"relevance": { +"description": "The relevance of the principal's status to the overall determination for the binding.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ExplainedAccess": { +"description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", +"id": "GoogleCloudPolicysimulatorV1ExplainedAccess", +"properties": { +"accessState": { +"description": "Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"errors": { +"description": "If the AccessState is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"policies": { +"description": "If the AccessState is `UNKNOWN`, this field contains the policies that led to that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1ExplainedPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ExplainedPolicy": { +"description": "Details about how a specific IAM Policy contributed to the access check.", +"id": "GoogleCloudPolicysimulatorV1ExplainedPolicy", +"properties": { +"access": { +"description": "Indicates whether _this policy_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"bindingExplanations": { +"description": "Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource. If the user who created the Replay does not have access to the policy, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1BindingExplanation" +}, +"type": "array" +}, +"fullResourceName": { +"description": "The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. If the user who created the Replay does not have access to the policy, this field is omitted. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "The IAM policy attached to the resource. If the user who created the Replay does not have access to the policy, this field is empty." +}, +"relevance": { +"description": "The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse. If the user who created the Replay does not have access to the policy, this field is omitted.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse": { +"description": "ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.", +"id": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsPreviewsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"orgPolicyViolationsPreviews": { +"description": "The list of OrgPolicyViolationsPreview", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse": { +"description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", +"id": "GoogleCloudPolicysimulatorV1ListOrgPolicyViolationsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"orgPolicyViolations": { +"description": "The list of OrgPolicyViolations", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ListReplayResultsResponse": { +"description": "Response message for Simulator.ListReplayResults.", +"id": "GoogleCloudPolicysimulatorV1ListReplayResultsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of ReplayResult objects. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"replayResults": { +"description": "The results of running a Replay.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1OrgPolicyOverlay": { +"description": "The proposed changes to OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlay", +"properties": { +"customConstraints": { +"description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay" +}, +"type": "array" +}, +"policies": { +"description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay": { +"description": "A change to an OrgPolicy custom constraint.", +"id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayCustomConstraintOverlay", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "Optional. The new or updated custom constraint." +}, +"customConstraintParent": { +"description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay": { +"description": "A change to an OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1OrgPolicyOverlayPolicyOverlay", +"properties": { +"policy": { +"$ref": "GoogleCloudOrgpolicyV2Policy", +"description": "Optional. The new or updated OrgPolicy." +}, +"policyParent": { +"description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1OrgPolicyViolation": { +"description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.", +"id": "GoogleCloudPolicysimulatorV1OrgPolicyViolation", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "The custom constraint being violated." +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "Any error encountered during the evaluation." +}, +"name": { +"description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudPolicysimulatorV1ResourceContext", +"description": "The resource violating the constraint." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview": { +"description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", +"id": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreview", +"properties": { +"createTime": { +"description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customConstraints": { +"description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", +"readOnly": true, +"type": "string" +}, +"overlay": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyOverlay", +"description": "Required. The proposed changes we are previewing violations for." +}, +"resourceCounts": { +"$ref": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts", +"description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of the `OrgPolicyViolationsPreview`.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +}, +"violationsCount": { +"description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts": { +"description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1OrgPolicyViolationsPreviewResourceCounts", +"properties": { +"compliant": { +"description": "Output only. Number of scanned resources with zero violations.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"errors": { +"description": "Output only. Number of resources that returned an error when scanned.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"noncompliant": { +"description": "Output only. Number of scanned resources with at least one violation.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"scanned": { +"description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"unenforced": { +"description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1Replay": { +"description": "A resource describing a `Replay`, or simulation.", +"id": "GoogleCloudPolicysimulatorV1Replay", +"properties": { +"config": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayConfig", +"description": "Required. The configuration used for the `Replay`." +}, +"name": { +"description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"readOnly": true, +"type": "string" +}, +"resultsSummary": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", +"description": "Output only. Summary statistics about the replayed log entries.", +"readOnly": true +}, +"state": { +"description": "Output only. The current state of the `Replay`.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The `Replay` has not started yet.", +"The `Replay` is currently running.", +"The `Replay` has successfully completed.", +"The `Replay` has finished with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayConfig": { +"description": "The configuration used for a Replay.", +"id": "GoogleCloudPolicysimulatorV1ReplayConfig", +"properties": { +"logSource": { +"description": "The logs to use as input for the Replay.", +"enum": [ +"LOG_SOURCE_UNSPECIFIED", +"RECENT_ACCESSES" +], +"enumDescriptions": [ +"An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", +"All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." +], +"type": "string" +}, +"policyOverlay": { +"additionalProperties": { +"$ref": "GoogleIamV1Policy" +}, +"description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayDiff": { +"description": "The difference between the results of evaluating an access tuple under the current (baseline) policies and under the proposed (simulated) policies. This difference explains how a principal's access could change if the proposed policies were applied.", +"id": "GoogleCloudPolicysimulatorV1ReplayDiff", +"properties": { +"accessDiff": { +"$ref": "GoogleCloudPolicysimulatorV1AccessStateDiff", +"description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple. The evaluation of the principal's access is reported in the AccessState field." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayOperationMetadata": { +"description": "Metadata about a Replay operation.", +"id": "GoogleCloudPolicysimulatorV1ReplayOperationMetadata", +"properties": { +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayResult": { +"description": "The result of replaying a single access tuple against a simulated state.", +"id": "GoogleCloudPolicysimulatorV1ReplayResult", +"properties": { +"accessTuple": { +"$ref": "GoogleCloudPolicysimulatorV1AccessTuple", +"description": "The access tuple that was replayed. This field includes information about the principal, resource, and permission that were involved in the access attempt." +}, +"diff": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayDiff", +"description": "The difference between the principal's access under the current (baseline) policies and the principal's access under the proposed (simulated) policies. This field is only included for access tuples that were successfully replayed and had different results under the current policies and the proposed policies." +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error that caused the access tuple replay to fail. This field is only included for access tuples that were not replayed successfully." +}, +"lastSeenDate": { +"$ref": "GoogleTypeDate", +"description": "The latest date this access tuple was seen in the logs." +}, +"name": { +"description": "The resource name of the `ReplayResult`, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`", +"type": "string" +}, +"parent": { +"description": "The Replay that the access tuple was included in.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayResultsSummary": { +"description": "Summary statistics about the replayed log entries.", +"id": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", +"properties": { +"differenceCount": { +"description": "The number of replayed log entries with a difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +}, +"errorCount": { +"description": "The number of log entries that could not be replayed.", +"format": "int32", +"type": "integer" +}, +"logCount": { +"description": "The total number of log entries replayed.", +"format": "int32", +"type": "integer" +}, +"newestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the newest log entry replayed." +}, +"oldestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the oldest log entry replayed." +}, +"unchangedCount": { +"description": "The number of replayed log entries with no difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ResourceContext": { +"description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", +"id": "GoogleCloudPolicysimulatorV1ResourceContext", +"properties": { +"ancestors": { +"description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`", +"items": { +"type": "string" +}, +"type": "array" +}, +"assetType": { +"description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", +"type": "string" +}, +"resource": { +"description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e., when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e. when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay": { +"description": "The proposed changes to OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", +"properties": { +"customConstraints": { +"description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay" +}, +"type": "array" +}, +"policies": { +"description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay": { +"description": "A change to an OrgPolicy custom constraint.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "Optional. The new or updated custom constraint." +}, +"customConstraintParent": { +"description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay": { +"description": "A change to an OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay", +"properties": { +"policy": { +"$ref": "GoogleCloudOrgpolicyV2Policy", +"description": "Optional. The new or updated OrgPolicy." +}, +"policyParent": { +"description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview": { +"description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview", +"properties": { +"createTime": { +"description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customConstraints": { +"description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", +"readOnly": true, +"type": "string" +}, +"overlay": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", +"description": "Required. The proposed changes we are previewing violations for." +}, +"resourceCounts": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", +"description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of the `OrgPolicyViolationsPreview`.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +}, +"violationsCount": { +"description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts": { +"description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", +"properties": { +"compliant": { +"description": "Output only. Number of scanned resources with zero violations.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"errors": { +"description": "Output only. Number of resources that returned an error when scanned.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"noncompliant": { +"description": "Output only. Number of scanned resources with at least one violation.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"scanned": { +"description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"unenforced": { +"description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e., when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e. when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay": { +"description": "The proposed changes to OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", +"properties": { +"customConstraints": { +"description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay" +}, +"type": "array" +}, +"policies": { +"description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay": { +"description": "A change to an OrgPolicy custom constraint.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "Optional. The new or updated custom constraint." +}, +"customConstraintParent": { +"description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay": { +"description": "A change to an OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay", +"properties": { +"policy": { +"$ref": "GoogleCloudOrgpolicyV2Policy", +"description": "Optional. The new or updated OrgPolicy." +}, +"policyParent": { +"description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview": { +"description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview", +"properties": { +"createTime": { +"description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customConstraints": { +"description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", +"readOnly": true, +"type": "string" +}, +"overlay": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", +"description": "Required. The proposed changes we are previewing violations for." +}, +"resourceCounts": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", +"description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of the `OrgPolicyViolationsPreview`.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +}, +"violationsCount": { +"description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts": { +"description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", +"properties": { +"compliant": { +"description": "Output only. Number of scanned resources with zero violations.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"errors": { +"description": "Output only. Number of resources that returned an error when scanned.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"noncompliant": { +"description": "Output only. Number of scanned resources with at least one violation.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"scanned": { +"description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"unenforced": { +"description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDate": { +"description": "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, 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", +"id": "GoogleTypeDate", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Policy Simulator API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1alpha.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1alpha.json new file mode 100644 index 0000000000000000000000000000000000000000..e3f316928abf5ca02c569030395d3ad497daf39f --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1alpha.json @@ -0,0 +1,2650 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://policysimulator.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Policy Simulator", +"description": " Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. A `Replay` is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/iam/docs/simulating-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "policysimulator:v1alpha", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://policysimulator.mtls.googleapis.com/", +"name": "policysimulator", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.folders.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", +"flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/replays", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1alpha/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1alpha/operations", +"httpMethod": "GET", +"id": "policysimulator.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"organizations": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"methods": { +"create": { +"description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"orgPolicyViolationsPreviewId": { +"description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"generate": { +"description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews:generate", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.generate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/orgPolicyViolationsPreviews:generate", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the OrgPolicyViolationsPreview to get.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/orgPolicyViolationsPreviews", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"orgPolicyViolations": { +"methods": { +"list": { +"description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/orgPolicyViolations", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/replays", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1alpha/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.projects.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/replays", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1alpha/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://policysimulator.googleapis.com/", +"schemas": { +"GoogleCloudOrgpolicyV2AlternatePolicySpec": { +"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.", +"id": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"properties": { +"launch": { +"description": "Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Specify constraint for configurations of Google Cloud resources." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2CustomConstraint": { +"description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.", +"id": "GoogleCloudOrgpolicyV2CustomConstraint", +"properties": { +"actionType": { +"description": "Allow or deny type.", +"enum": [ +"ACTION_TYPE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Allowed action type.", +"Deny action type." +], +"type": "string" +}, +"condition": { +"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", +"type": "string" +}, +"description": { +"description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters.", +"type": "string" +}, +"displayName": { +"description": "One line display name for the UI. The max length of the display_name is 200 characters.", +"type": "string" +}, +"methodTypes": { +"description": "All the operations being applied for this constraint.", +"items": { +"enum": [ +"METHOD_TYPE_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Constraint applied when creating the resource.", +"Constraint applied when updating the resource.", +"Constraint applied when deleting the resource. Not supported yet." +], +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", +"type": "string" +}, +"resourceTypes": { +"description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2Policy": { +"description": "Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2Policy", +"properties": { +"alternate": { +"$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"deprecated": true, +"description": "Deprecated." +}, +"dryRunSpec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced." +}, +"etag": { +"description": "Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Basic information about the Organization Policy." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpec": { +"description": "Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2PolicySpec", +"properties": { +"etag": { +"description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", +"type": "string" +}, +"inheritFromParent": { +"description": "Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.", +"type": "boolean" +}, +"reset": { +"description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", +"type": "boolean" +}, +"rules": { +"description": "In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.", +"items": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { +"description": "A rule used to express this policy.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", +"properties": { +"allowAll": { +"description": "Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"&&\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." +}, +"denyAll": { +"description": "Setting this to true means that all values are denied. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"enforce": { +"description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", +"type": "boolean" +}, +"values": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { +"description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"properties": { +"allowedValues": { +"description": "List of values allowed at this resource.", +"items": { +"type": "string" +}, +"type": "array" +}, +"deniedValues": { +"description": "List of values denied at this resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1Replay": { +"description": "A resource describing a `Replay`, or simulation.", +"id": "GoogleCloudPolicysimulatorV1Replay", +"properties": { +"config": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayConfig", +"description": "Required. The configuration used for the `Replay`." +}, +"name": { +"description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"readOnly": true, +"type": "string" +}, +"resultsSummary": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", +"description": "Output only. Summary statistics about the replayed log entries.", +"readOnly": true +}, +"state": { +"description": "Output only. The current state of the `Replay`.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The `Replay` has not started yet.", +"The `Replay` is currently running.", +"The `Replay` has successfully completed.", +"The `Replay` has finished with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayConfig": { +"description": "The configuration used for a Replay.", +"id": "GoogleCloudPolicysimulatorV1ReplayConfig", +"properties": { +"logSource": { +"description": "The logs to use as input for the Replay.", +"enum": [ +"LOG_SOURCE_UNSPECIFIED", +"RECENT_ACCESSES" +], +"enumDescriptions": [ +"An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", +"All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." +], +"type": "string" +}, +"policyOverlay": { +"additionalProperties": { +"$ref": "GoogleIamV1Policy" +}, +"description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayOperationMetadata": { +"description": "Metadata about a Replay operation.", +"id": "GoogleCloudPolicysimulatorV1ReplayOperationMetadata", +"properties": { +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayResultsSummary": { +"description": "Summary statistics about the replayed log entries.", +"id": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", +"properties": { +"differenceCount": { +"description": "The number of replayed log entries with a difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +}, +"errorCount": { +"description": "The number of log entries that could not be replayed.", +"format": "int32", +"type": "integer" +}, +"logCount": { +"description": "The total number of log entries replayed.", +"format": "int32", +"type": "integer" +}, +"newestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the newest log entry replayed." +}, +"oldestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the oldest log entry replayed." +}, +"unchangedCount": { +"description": "The number of replayed log entries with no difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaAccessStateDiff": { +"description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.", +"id": "GoogleCloudPolicysimulatorV1alphaAccessStateDiff", +"properties": { +"accessChange": { +"description": "How the principal's access, specified in the AccessState field, changed between the current (baseline) policies and proposed (simulated) policies.", +"enum": [ +"ACCESS_CHANGE_TYPE_UNSPECIFIED", +"NO_CHANGE", +"UNKNOWN_CHANGE", +"ACCESS_REVOKED", +"ACCESS_GAINED", +"ACCESS_MAYBE_REVOKED", +"ACCESS_MAYBE_GAINED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal's access did not change. This includes the case where both baseline and simulated are UNKNOWN, but the unknown information is equivalent.", +"The principal's access under both the current policies and the proposed policies is `UNKNOWN`, but the unknown information differs between them.", +"The principal had access under the current policies (`GRANTED`), but will no longer have access after the proposed changes (`NOT_GRANTED`).", +"The principal did not have access under the current policies (`NOT_GRANTED`), but will have access after the proposed changes (`GRANTED`).", +"This result can occur for the following reasons: * The principal had access under the current policies (`GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will not have access after the proposed changes (`NOT_GRANTED`).", +"This result can occur for the following reasons: * The principal did not have access under the current policies (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will have access after the proposed changes (`GRANTED`)." +], +"type": "string" +}, +"baseline": { +"$ref": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", +"description": "The results of evaluating the access tuple under the current (baseline) policies. If the AccessState couldn't be fully evaluated, this field explains why." +}, +"simulated": { +"$ref": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", +"description": "The results of evaluating the access tuple under the proposed (simulated) policies. If the AccessState couldn't be fully evaluated, this field explains why." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaAccessTuple": { +"description": "Information about the principal, resource, and permission to check.", +"id": "GoogleCloudPolicysimulatorV1alphaAccessTuple", +"properties": { +"fullResourceName": { +"description": "Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"permission": { +"description": "Required. The IAM permission to check for the specified principal and resource. For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference. For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"principal": { +"description": "Required. The principal whose access you want to check, in the form of the email address that represents that principal. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must be a Google Account or a service account. Other types of principals are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaBindingExplanation": { +"description": "Details about how a binding in a policy affects a principal's ability to use a permission.", +"id": "GoogleCloudPolicysimulatorV1alphaBindingExplanation", +"properties": { +"access": { +"description": "Required. Indicates whether _this binding_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition expression that prevents this binding from granting access unless the expression evaluates to `true`. To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview." +}, +"memberships": { +"additionalProperties": { +"$ref": "GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership" +}, +"description": "Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request. For example, suppose that a binding includes the following principals: * `user:alice@example.com` * `group:product-eng@example.com` The principal in the replayed access tuple is `user:bob@example.com`. This user is a principal of the group `group:product-eng@example.com`. For the first principal in the binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.", +"type": "object" +}, +"relevance": { +"description": "The relevance of this binding to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +}, +"role": { +"description": "The role that this binding grants. For example, `roles/compute.serviceAgent`. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"rolePermission": { +"description": "Indicates whether the role granted by this binding contains the specified permission.", +"enum": [ +"ROLE_PERMISSION_UNSPECIFIED", +"ROLE_PERMISSION_INCLUDED", +"ROLE_PERMISSION_NOT_INCLUDED", +"ROLE_PERMISSION_UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The permission is included in the role.", +"The permission is not included in the role.", +"The user who created the Replay is not allowed to access the binding." +], +"type": "string" +}, +"rolePermissionRelevance": { +"description": "The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership": { +"description": "Details about whether the binding includes the principal.", +"id": "GoogleCloudPolicysimulatorV1alphaBindingExplanationAnnotatedMembership", +"properties": { +"membership": { +"description": "Indicates whether the binding includes the principal.", +"enum": [ +"MEMBERSHIP_UNSPECIFIED", +"MEMBERSHIP_INCLUDED", +"MEMBERSHIP_NOT_INCLUDED", +"MEMBERSHIP_UNKNOWN_INFO_DENIED", +"MEMBERSHIP_UNKNOWN_UNSUPPORTED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The binding includes the principal. The principal can be included directly or indirectly. For example: * A principal is included directly if that principal is listed in the binding. * A principal is included indirectly if that principal is in a Google group or Google Workspace domain that is listed in the binding.", +"The binding does not include the principal.", +"The user who created the Replay is not allowed to access the binding.", +"The principal is an unsupported type. Only Google Accounts and service accounts are supported." +], +"type": "string" +}, +"relevance": { +"description": "The relevance of the principal's status to the overall determination for the binding.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e., when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaExplainedAccess": { +"description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", +"id": "GoogleCloudPolicysimulatorV1alphaExplainedAccess", +"properties": { +"accessState": { +"description": "Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"errors": { +"description": "If the AccessState is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"policies": { +"description": "If the AccessState is `UNKNOWN`, this field contains the policies that led to that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaExplainedPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaExplainedPolicy": { +"description": "Details about how a specific IAM Policy contributed to the access check.", +"id": "GoogleCloudPolicysimulatorV1alphaExplainedPolicy", +"properties": { +"access": { +"description": "Indicates whether _this policy_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"bindingExplanations": { +"description": "Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource. If the user who created the Replay does not have access to the policy, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaBindingExplanation" +}, +"type": "array" +}, +"fullResourceName": { +"description": "The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. If the user who created the Replay does not have access to the policy, this field is omitted. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "The IAM policy attached to the resource. If the user who created the Replay does not have access to the policy, this field is empty." +}, +"relevance": { +"description": "The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse. If the user who created the Replay does not have access to the policy, this field is omitted.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e. when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse": { +"description": "ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.", +"id": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsPreviewsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"orgPolicyViolationsPreviews": { +"description": "The list of OrgPolicyViolationsPreview", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse": { +"description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", +"id": "GoogleCloudPolicysimulatorV1alphaListOrgPolicyViolationsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"orgPolicyViolations": { +"description": "The list of OrgPolicyViolations", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse": { +"description": "Response message for Simulator.ListReplayResults.", +"id": "GoogleCloudPolicysimulatorV1alphaListReplayResultsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of ReplayResult objects. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"replayResults": { +"description": "The results of running a Replay.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplayResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaListReplaysResponse": { +"description": "Response message for Simulator.ListReplays.", +"id": "GoogleCloudPolicysimulatorV1alphaListReplaysResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"replays": { +"description": "The list of Replay objects.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay": { +"description": "The proposed changes to OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", +"properties": { +"customConstraints": { +"description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay" +}, +"type": "array" +}, +"policies": { +"description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay": { +"description": "A change to an OrgPolicy custom constraint.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "Optional. The new or updated custom constraint." +}, +"customConstraintParent": { +"description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay": { +"description": "A change to an OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay", +"properties": { +"policy": { +"$ref": "GoogleCloudOrgpolicyV2Policy", +"description": "Optional. The new or updated OrgPolicy." +}, +"policyParent": { +"description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation": { +"description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolation", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "The custom constraint being violated." +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "Any error encountered during the evaluation." +}, +"name": { +"description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudPolicysimulatorV1alphaResourceContext", +"description": "The resource violating the constraint." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview": { +"description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview", +"properties": { +"createTime": { +"description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customConstraints": { +"description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", +"readOnly": true, +"type": "string" +}, +"overlay": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", +"description": "Required. The proposed changes we are previewing violations for." +}, +"resourceCounts": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", +"description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of the `OrgPolicyViolationsPreview`.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +}, +"violationsCount": { +"description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts": { +"description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", +"properties": { +"compliant": { +"description": "Output only. Number of scanned resources with zero violations.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"errors": { +"description": "Output only. Number of resources that returned an error when scanned.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"noncompliant": { +"description": "Output only. Number of scanned resources with at least one violation.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"scanned": { +"description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"unenforced": { +"description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaReplay": { +"description": "A resource describing a `Replay`, or simulation.", +"id": "GoogleCloudPolicysimulatorV1alphaReplay", +"properties": { +"config": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplayConfig", +"description": "Required. The configuration used for the `Replay`." +}, +"name": { +"description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"readOnly": true, +"type": "string" +}, +"resultsSummary": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplayResultsSummary", +"description": "Output only. Summary statistics about the replayed log entries.", +"readOnly": true +}, +"state": { +"description": "Output only. The current state of the `Replay`.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The `Replay` has not started yet.", +"The `Replay` is currently running.", +"The `Replay` has successfully completed.", +"The `Replay` has finished with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaReplayConfig": { +"description": "The configuration used for a Replay.", +"id": "GoogleCloudPolicysimulatorV1alphaReplayConfig", +"properties": { +"logSource": { +"description": "The logs to use as input for the Replay.", +"enum": [ +"LOG_SOURCE_UNSPECIFIED", +"RECENT_ACCESSES" +], +"enumDescriptions": [ +"An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", +"All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." +], +"type": "string" +}, +"policyOverlay": { +"additionalProperties": { +"$ref": "GoogleIamV1Policy" +}, +"description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaReplayDiff": { +"description": "The difference between the results of evaluating an access tuple under the current (baseline) policies and under the proposed (simulated) policies. This difference explains how a principal's access could change if the proposed policies were applied.", +"id": "GoogleCloudPolicysimulatorV1alphaReplayDiff", +"properties": { +"accessDiff": { +"$ref": "GoogleCloudPolicysimulatorV1alphaAccessStateDiff", +"description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple. The evaluation of the principal's access is reported in the AccessState field." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaReplayResult": { +"description": "The result of replaying a single access tuple against a simulated state.", +"id": "GoogleCloudPolicysimulatorV1alphaReplayResult", +"properties": { +"accessTuple": { +"$ref": "GoogleCloudPolicysimulatorV1alphaAccessTuple", +"description": "The access tuple that was replayed. This field includes information about the principal, resource, and permission that were involved in the access attempt." +}, +"diff": { +"$ref": "GoogleCloudPolicysimulatorV1alphaReplayDiff", +"description": "The difference between the principal's access under the current (baseline) policies and the principal's access under the proposed (simulated) policies. This field is only included for access tuples that were successfully replayed and had different results under the current policies and the proposed policies." +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error that caused the access tuple replay to fail. This field is only included for access tuples that were not replayed successfully." +}, +"lastSeenDate": { +"$ref": "GoogleTypeDate", +"description": "The latest date this access tuple was seen in the logs." +}, +"name": { +"description": "The resource name of the `ReplayResult`, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`", +"type": "string" +}, +"parent": { +"description": "The Replay that the access tuple was included in.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaReplayResultsSummary": { +"description": "Summary statistics about the replayed log entries.", +"id": "GoogleCloudPolicysimulatorV1alphaReplayResultsSummary", +"properties": { +"differenceCount": { +"description": "The number of replayed log entries with a difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +}, +"errorCount": { +"description": "The number of log entries that could not be replayed.", +"format": "int32", +"type": "integer" +}, +"logCount": { +"description": "The total number of log entries replayed.", +"format": "int32", +"type": "integer" +}, +"newestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the newest log entry replayed." +}, +"oldestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the oldest log entry replayed." +}, +"unchangedCount": { +"description": "The number of replayed log entries with no difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaResourceContext": { +"description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", +"id": "GoogleCloudPolicysimulatorV1alphaResourceContext", +"properties": { +"ancestors": { +"description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`", +"items": { +"type": "string" +}, +"type": "array" +}, +"assetType": { +"description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", +"type": "string" +}, +"resource": { +"description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e., when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e. when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay": { +"description": "The proposed changes to OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", +"properties": { +"customConstraints": { +"description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay" +}, +"type": "array" +}, +"policies": { +"description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay": { +"description": "A change to an OrgPolicy custom constraint.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "Optional. The new or updated custom constraint." +}, +"customConstraintParent": { +"description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay": { +"description": "A change to an OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay", +"properties": { +"policy": { +"$ref": "GoogleCloudOrgpolicyV2Policy", +"description": "Optional. The new or updated OrgPolicy." +}, +"policyParent": { +"description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview": { +"description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview", +"properties": { +"createTime": { +"description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customConstraints": { +"description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", +"readOnly": true, +"type": "string" +}, +"overlay": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", +"description": "Required. The proposed changes we are previewing violations for." +}, +"resourceCounts": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", +"description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of the `OrgPolicyViolationsPreview`.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +}, +"violationsCount": { +"description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts": { +"description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", +"properties": { +"compliant": { +"description": "Output only. Number of scanned resources with zero violations.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"errors": { +"description": "Output only. Number of resources that returned an error when scanned.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"noncompliant": { +"description": "Output only. Number of scanned resources with at least one violation.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"scanned": { +"description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"unenforced": { +"description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDate": { +"description": "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, 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", +"id": "GoogleTypeDate", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Policy Simulator API", +"version": "v1alpha", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..2a02629c7f0ac644d5bae7100a047103891c47c8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1beta.json @@ -0,0 +1,2650 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://policysimulator.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Policy Simulator", +"description": " Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. A `Replay` is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/iam/docs/simulating-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "policysimulator:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://policysimulator.mtls.googleapis.com/", +"name": "policysimulator", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.folders.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", +"flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/replays", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1beta/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.folders.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta/operations", +"httpMethod": "GET", +"id": "policysimulator.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"organizations": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"methods": { +"create": { +"description": "CreateOrgPolicyViolationsPreview creates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"orgPolicyViolationsPreviewId": { +"description": "Optional. An optional user-specified ID for the OrgPolicyViolationsPreview. If not provided, a random ID will be generated.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/orgPolicyViolationsPreviews", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"generate": { +"description": "GenerateOrgPolicyViolationsPreview generates an OrgPolicyViolationsPreview for the proposed changes in the provided OrgPolicyViolationsPreview.OrgPolicyOverlay. The changes to OrgPolicy are specified by this `OrgPolicyOverlay`. The resources to scan are inferred from these specified changes.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews:generate", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.generate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The organization under which this OrgPolicyViolationsPreview will be created. Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/orgPolicyViolationsPreviews:generate", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "GetOrgPolicyViolationsPreview gets the specified OrgPolicyViolationsPreview. Each OrgPolicyViolationsPreview is available for at least 7 days.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the OrgPolicyViolationsPreview to get.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "ListOrgPolicyViolationsPreviews lists each OrgPolicyViolationsPreview in an organization. Each OrgPolicyViolationsPreview is available for at least 7 days.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 5 items will be returned. The maximum value is 10; values above 10 will be coerced to 10.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent the violations are scoped to. Format: `organizations/{organization}/locations/{location}` Example: `organizations/my-example-org/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/orgPolicyViolationsPreviews", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"orgPolicyViolations": { +"methods": { +"list": { +"description": "ListOrgPolicyViolations lists the OrgPolicyViolations that are present in an OrgPolicyViolationsPreview.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/orgPolicyViolations", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.orgPolicyViolations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of items to return. The service may return fewer than this value. If unspecified, at most 50 items will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous call. Provide this to retrieve the subsequent page. When paginating, all other parameters must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The OrgPolicyViolationsPreview to get OrgPolicyViolations from. Format: organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/orgPolicyViolations", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.organizations.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/replays", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1beta/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.organizations.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"resources": { +"orgPolicyViolationsPreviews": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"replays": { +"methods": { +"create": { +"description": "Creates and starts a Replay using the given ReplayConfig.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays", +"httpMethod": "POST", +"id": "policysimulator.projects.locations.replays.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this Replay will be created. This resource must be a project, folder, or organization with a location. Example: `projects/my-example-project/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/replays", +"request": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplay" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the specified Replay. Each `Replay` is available for at least 7 days.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Replay to retrieve, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the `Replay`. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplay" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists each Replay in a project, folder, or organization. Each `Replay` is available for at least 7 days.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of Replay objects to return. Defaults to 50. The maximum value is 1000; values above 1000 are rounded down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplays call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to Simulator.ListReplays must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global` Only `Replay` objects that are direct children of the provided parent are listed. In other words, `Replay` objects that are children of a project will not be included when the parent is a folder of that project.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/replays", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListReplaysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"results": { +"methods": { +"list": { +"description": "Lists the results of running a Replay.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/results", +"httpMethod": "GET", +"id": "policysimulator.projects.locations.replays.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ReplayResult objects to return. Defaults to 5000. The maximum value is 5000; values above 5000 are rounded down to 5000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous Simulator.ListReplayResults call. Provide this token to retrieve the next page of results. When paginating, all other parameters provided to [Simulator.ListReplayResults[] must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Replay whose results are listed, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}` Example: `projects/my-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/results", +"response": { +"$ref": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://policysimulator.googleapis.com/", +"schemas": { +"GoogleCloudOrgpolicyV2AlternatePolicySpec": { +"description": "Similar to PolicySpec but with an extra 'launch' field for launch reference. The PolicySpec here is specific for dry-run/darklaunch.", +"id": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"properties": { +"launch": { +"description": "Reference to the launch that will be used while audit logging and to control the launch. Should be set only in the alternate policy.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Specify constraint for configurations of Google Cloud resources." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2CustomConstraint": { +"description": "A custom constraint defined by customers which can *only* be applied to the given resource types and organization. By creating a custom constraint, customers can apply policies of this custom constraint. *Creating a custom constraint itself does NOT apply any policy enforcement*.", +"id": "GoogleCloudOrgpolicyV2CustomConstraint", +"properties": { +"actionType": { +"description": "Allow or deny type.", +"enum": [ +"ACTION_TYPE_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Allowed action type.", +"Deny action type." +], +"type": "string" +}, +"condition": { +"description": "Org policy condition/expression. For example: `resource.instanceName.matches(\"[production|test]_.*_(\\d)+\")` or, `resource.management.auto_upgrade == true` The max length of the condition is 1000 characters.", +"type": "string" +}, +"description": { +"description": "Detailed information about this custom policy constraint. The max length of the description is 2000 characters.", +"type": "string" +}, +"displayName": { +"description": "One line display name for the UI. The max length of the display_name is 200 characters.", +"type": "string" +}, +"methodTypes": { +"description": "All the operations being applied for this constraint.", +"items": { +"enum": [ +"METHOD_TYPE_UNSPECIFIED", +"CREATE", +"UPDATE", +"DELETE" +], +"enumDescriptions": [ +"Unspecified. Results in an error.", +"Constraint applied when creating the resource.", +"Constraint applied when updating the resource.", +"Constraint applied when deleting the resource. Not supported yet." +], +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. Name of the constraint. This is unique within the organization. Format of the name should be * `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms` The max length is 70 characters and the minimum length is 1. Note that the prefix `organizations/{organization_id}/customConstraints/` is not counted.", +"type": "string" +}, +"resourceTypes": { +"description": "Immutable. The resource instance type on which this policy applies. Format will be of the form : `/` Example: * `compute.googleapis.com/Instance`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The last time this custom constraint was updated. This represents the last time that the `CreateCustomConstraint` or `UpdateCustomConstraint` RPC was called", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2Policy": { +"description": "Defines an organization policy which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2Policy", +"properties": { +"alternate": { +"$ref": "GoogleCloudOrgpolicyV2AlternatePolicySpec", +"deprecated": true, +"description": "Deprecated." +}, +"dryRunSpec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Dry-run policy. Audit-only policy, can be used to monitor how the policy would have impacted the existing and future resources if it's enforced." +}, +"etag": { +"description": "Optional. An opaque tag indicating the current state of the policy, used for concurrency control. This 'etag' is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint which this policy configures: * `projects/{project_number}/policies/{constraint_name}` * `folders/{folder_id}/policies/{constraint_name}` * `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{project_id}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number.", +"type": "string" +}, +"spec": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpec", +"description": "Basic information about the Organization Policy." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpec": { +"description": "Defines a Google Cloud policy specification which is used to specify constraints for configurations of Google Cloud resources.", +"id": "GoogleCloudOrgpolicyV2PolicySpec", +"properties": { +"etag": { +"description": "An opaque tag indicating the current version of the policySpec, used for concurrency control. This field is ignored if used in a `CreatePolicy` request. When the policy is returned from either a `GetPolicy` or a `ListPolicies` request, this `etag` indicates the version of the current policySpec to use when executing a read-modify-write loop. When the policy is returned from a `GetEffectivePolicy` request, the `etag` will be unset.", +"type": "string" +}, +"inheritFromParent": { +"description": "Determines the inheritance behavior for this policy. If `inherit_from_parent` is true, policy rules set higher up in the hierarchy (up to the closest root) are inherited and present in the effective policy. If it is false, then no rules are inherited, and this policy becomes the new root for evaluation. This field can be set only for policies which configure list constraints.", +"type": "boolean" +}, +"reset": { +"description": "Ignores policies set above this resource and restores the `constraint_default` enforcement behavior of the specific constraint at this resource. This field can be set in policies for either list or boolean constraints. If set, `rules` must be empty and `inherit_from_parent` must be set to false.", +"type": "boolean" +}, +"rules": { +"description": "In policies for boolean constraints, the following requirements apply: - There must be one and only one policy rule where condition is unset. - Boolean policy rules with conditions must set `enforced` to the opposite of the policy rule without a condition. - During policy evaluation, policy rules with conditions that are true for a target resource take precedence.", +"items": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. The time stamp this was previously updated. This represents the last time a call to `CreatePolicy` or `UpdatePolicy` was made for that policy.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRule": { +"description": "A rule used to express this policy.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRule", +"properties": { +"allowAll": { +"description": "Setting this to true means that all values are allowed. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition which determines whether this rule is used in the evaluation of the policy. When set, the `expression` field in the `Expr' must include from 1 to 10 subexpressions, joined by the \"||\" or \"&&\" operators. Each subexpression must be of the form \"resource.matchTag('/tag_key_short_name, 'tag_value_short_name')\". or \"resource.matchTagId('tagKeys/key_id', 'tagValues/value_id')\". where key_name and value_name are the resource names for Label Keys and Values. These names are available from the Tag Manager Service. An example expression is: \"resource.matchTag('123456789/environment, 'prod')\". or \"resource.matchTagId('tagKeys/123', 'tagValues/456')\"." +}, +"denyAll": { +"description": "Setting this to true means that all values are denied. This field can be set only in policies for list constraints.", +"type": "boolean" +}, +"enforce": { +"description": "If `true`, then the policy is enforced. If `false`, then any configuration is acceptable. This field can be set only in policies for boolean constraints.", +"type": "boolean" +}, +"values": { +"$ref": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"description": "List of values to be used for this policy rule. This field can be set only in policies for list constraints." +} +}, +"type": "object" +}, +"GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues": { +"description": "A message that holds specific allowed and denied values. This message can define specific values and subtrees of the Resource Manager resource hierarchy (`Organizations`, `Folders`, `Projects`) that are allowed or denied. This is achieved by using the `under:` and optional `is:` prefixes. The `under:` prefix is used to denote resource subtree values. The `is:` prefix is used to denote specific values, and is required only if the value contains a \":\". Values prefixed with \"is:\" are treated the same as values with no prefix. Ancestry subtrees must be in one of the following formats: - `projects/` (for example, `projects/tokyo-rain-123`) - `folders/` (for example, `folders/1234`) - `organizations/` (for example, `organizations/1234`) The `supports_under` field of the associated `Constraint` defines whether ancestry prefixes can be used.", +"id": "GoogleCloudOrgpolicyV2PolicySpecPolicyRuleStringValues", +"properties": { +"allowedValues": { +"description": "List of values allowed at this resource.", +"items": { +"type": "string" +}, +"type": "array" +}, +"deniedValues": { +"description": "List of values denied at this resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1Replay": { +"description": "A resource describing a `Replay`, or simulation.", +"id": "GoogleCloudPolicysimulatorV1Replay", +"properties": { +"config": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayConfig", +"description": "Required. The configuration used for the `Replay`." +}, +"name": { +"description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"readOnly": true, +"type": "string" +}, +"resultsSummary": { +"$ref": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", +"description": "Output only. Summary statistics about the replayed log entries.", +"readOnly": true +}, +"state": { +"description": "Output only. The current state of the `Replay`.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The `Replay` has not started yet.", +"The `Replay` is currently running.", +"The `Replay` has successfully completed.", +"The `Replay` has finished with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayConfig": { +"description": "The configuration used for a Replay.", +"id": "GoogleCloudPolicysimulatorV1ReplayConfig", +"properties": { +"logSource": { +"description": "The logs to use as input for the Replay.", +"enum": [ +"LOG_SOURCE_UNSPECIFIED", +"RECENT_ACCESSES" +], +"enumDescriptions": [ +"An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", +"All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." +], +"type": "string" +}, +"policyOverlay": { +"additionalProperties": { +"$ref": "GoogleIamV1Policy" +}, +"description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayOperationMetadata": { +"description": "Metadata about a Replay operation.", +"id": "GoogleCloudPolicysimulatorV1ReplayOperationMetadata", +"properties": { +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1ReplayResultsSummary": { +"description": "Summary statistics about the replayed log entries.", +"id": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", +"properties": { +"differenceCount": { +"description": "The number of replayed log entries with a difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +}, +"errorCount": { +"description": "The number of log entries that could not be replayed.", +"format": "int32", +"type": "integer" +}, +"logCount": { +"description": "The total number of log entries replayed.", +"format": "int32", +"type": "integer" +}, +"newestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the newest log entry replayed." +}, +"oldestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the oldest log entry replayed." +}, +"unchangedCount": { +"description": "The number of replayed log entries with no difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1alphaCreateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e., when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1alphaGenerateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e. when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay": { +"description": "The proposed changes to OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", +"properties": { +"customConstraints": { +"description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay" +}, +"type": "array" +}, +"policies": { +"description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay": { +"description": "A change to an OrgPolicy custom constraint.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayCustomConstraintOverlay", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "Optional. The new or updated custom constraint." +}, +"customConstraintParent": { +"description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay": { +"description": "A change to an OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlayPolicyOverlay", +"properties": { +"policy": { +"$ref": "GoogleCloudOrgpolicyV2Policy", +"description": "Optional. The new or updated OrgPolicy." +}, +"policyParent": { +"description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview": { +"description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreview", +"properties": { +"createTime": { +"description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customConstraints": { +"description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", +"readOnly": true, +"type": "string" +}, +"overlay": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyOverlay", +"description": "Required. The proposed changes we are previewing violations for." +}, +"resourceCounts": { +"$ref": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", +"description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of the `OrgPolicyViolationsPreview`.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +}, +"violationsCount": { +"description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts": { +"description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1alphaOrgPolicyViolationsPreviewResourceCounts", +"properties": { +"compliant": { +"description": "Output only. Number of scanned resources with zero violations.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"errors": { +"description": "Output only. Number of resources that returned an error when scanned.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"noncompliant": { +"description": "Output only. Number of scanned resources with at least one violation.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"scanned": { +"description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"unenforced": { +"description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaAccessStateDiff": { +"description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple.", +"id": "GoogleCloudPolicysimulatorV1betaAccessStateDiff", +"properties": { +"accessChange": { +"description": "How the principal's access, specified in the AccessState field, changed between the current (baseline) policies and proposed (simulated) policies.", +"enum": [ +"ACCESS_CHANGE_TYPE_UNSPECIFIED", +"NO_CHANGE", +"UNKNOWN_CHANGE", +"ACCESS_REVOKED", +"ACCESS_GAINED", +"ACCESS_MAYBE_REVOKED", +"ACCESS_MAYBE_GAINED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal's access did not change. This includes the case where both baseline and simulated are UNKNOWN, but the unknown information is equivalent.", +"The principal's access under both the current policies and the proposed policies is `UNKNOWN`, but the unknown information differs between them.", +"The principal had access under the current policies (`GRANTED`), but will no longer have access after the proposed changes (`NOT_GRANTED`).", +"The principal did not have access under the current policies (`NOT_GRANTED`), but will have access after the proposed changes (`GRANTED`).", +"This result can occur for the following reasons: * The principal had access under the current policies (`GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will not have access after the proposed changes (`NOT_GRANTED`).", +"This result can occur for the following reasons: * The principal did not have access under the current policies (`NOT_GRANTED`), but their access after the proposed changes is `UNKNOWN`. * The principal's access under the current policies is `UNKNOWN`, but they will have access after the proposed changes (`GRANTED`)." +], +"type": "string" +}, +"baseline": { +"$ref": "GoogleCloudPolicysimulatorV1betaExplainedAccess", +"description": "The results of evaluating the access tuple under the current (baseline) policies. If the AccessState couldn't be fully evaluated, this field explains why." +}, +"simulated": { +"$ref": "GoogleCloudPolicysimulatorV1betaExplainedAccess", +"description": "The results of evaluating the access tuple under the proposed (simulated) policies. If the AccessState couldn't be fully evaluated, this field explains why." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaAccessTuple": { +"description": "Information about the principal, resource, and permission to check.", +"id": "GoogleCloudPolicysimulatorV1betaAccessTuple", +"properties": { +"fullResourceName": { +"description": "Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"permission": { +"description": "Required. The IAM permission to check for the specified principal and resource. For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference. For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"principal": { +"description": "Required. The principal whose access you want to check, in the form of the email address that represents that principal. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must be a Google Account or a service account. Other types of principals are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaBindingExplanation": { +"description": "Details about how a binding in a policy affects a principal's ability to use a permission.", +"id": "GoogleCloudPolicysimulatorV1betaBindingExplanation", +"properties": { +"access": { +"description": "Required. Indicates whether _this binding_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition expression that prevents this binding from granting access unless the expression evaluates to `true`. To learn about IAM Conditions, see https://cloud.google.com/iam/docs/conditions-overview." +}, +"memberships": { +"additionalProperties": { +"$ref": "GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership" +}, +"description": "Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request. For example, suppose that a binding includes the following principals: * `user:alice@example.com` * `group:product-eng@example.com` The principal in the replayed access tuple is `user:bob@example.com`. This user is a principal of the group `group:product-eng@example.com`. For the first principal in the binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.", +"type": "object" +}, +"relevance": { +"description": "The relevance of this binding to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +}, +"role": { +"description": "The role that this binding grants. For example, `roles/compute.serviceAgent`. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"rolePermission": { +"description": "Indicates whether the role granted by this binding contains the specified permission.", +"enum": [ +"ROLE_PERMISSION_UNSPECIFIED", +"ROLE_PERMISSION_INCLUDED", +"ROLE_PERMISSION_NOT_INCLUDED", +"ROLE_PERMISSION_UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The permission is included in the role.", +"The permission is not included in the role.", +"The user who created the Replay is not allowed to access the binding." +], +"type": "string" +}, +"rolePermissionRelevance": { +"description": "The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership": { +"description": "Details about whether the binding includes the principal.", +"id": "GoogleCloudPolicysimulatorV1betaBindingExplanationAnnotatedMembership", +"properties": { +"membership": { +"description": "Indicates whether the binding includes the principal.", +"enum": [ +"MEMBERSHIP_UNSPECIFIED", +"MEMBERSHIP_INCLUDED", +"MEMBERSHIP_NOT_INCLUDED", +"MEMBERSHIP_UNKNOWN_INFO_DENIED", +"MEMBERSHIP_UNKNOWN_UNSUPPORTED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The binding includes the principal. The principal can be included directly or indirectly. For example: * A principal is included directly if that principal is listed in the binding. * A principal is included indirectly if that principal is in a Google group or Google Workspace domain that is listed in the binding.", +"The binding does not include the principal.", +"The user who created the Replay is not allowed to access the binding.", +"The principal is an unsupported type. Only Google Accounts and service accounts are supported." +], +"type": "string" +}, +"relevance": { +"description": "The relevance of the principal's status to the overall determination for the binding.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "CreateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1betaCreateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e., when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Output only. The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaExplainedAccess": { +"description": "Details about how a set of policies, listed in ExplainedPolicy, resulted in a certain AccessState when replaying an access tuple.", +"id": "GoogleCloudPolicysimulatorV1betaExplainedAccess", +"properties": { +"accessState": { +"description": "Whether the principal in the access tuple has permission to access the resource in the access tuple under the given policies.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"errors": { +"description": "If the AccessState is `UNKNOWN`, this field contains a list of errors explaining why the result is `UNKNOWN`. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"policies": { +"description": "If the AccessState is `UNKNOWN`, this field contains the policies that led to that result. If the `AccessState` is `GRANTED` or `NOT_GRANTED`, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaExplainedPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaExplainedPolicy": { +"description": "Details about how a specific IAM Policy contributed to the access check.", +"id": "GoogleCloudPolicysimulatorV1betaExplainedPolicy", +"properties": { +"access": { +"description": "Indicates whether _this policy_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The user who created the Replay does not have access to all of the policies that Policy Simulator needs to evaluate." +], +"type": "string" +}, +"bindingExplanations": { +"description": "Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource. If the user who created the Replay does not have access to the policy, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaBindingExplanation" +}, +"type": "array" +}, +"fullResourceName": { +"description": "The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. If the user who created the Replay does not have access to the policy, this field is omitted. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "The IAM policy attached to the resource. If the user who created the Replay does not have access to the policy, this field is empty." +}, +"relevance": { +"description": "The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse. If the user who created the Replay does not have access to the policy, this field is omitted.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata": { +"description": "GenerateOrgPolicyViolationsPreviewOperationMetadata is metadata about an OrgPolicyViolationsPreview generations operation.", +"id": "GoogleCloudPolicysimulatorV1betaGenerateOrgPolicyViolationsPreviewOperationMetadata", +"properties": { +"requestTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"resourcesFound": { +"description": "Total number of resources that need scanning. Should equal resource_scanned + resources_pending", +"format": "int32", +"type": "integer" +}, +"resourcesPending": { +"description": "Number of resources still to scan.", +"format": "int32", +"type": "integer" +}, +"resourcesScanned": { +"description": "Number of resources already scanned.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request started processing, i.e. when the state was set to RUNNING.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the operation.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse": { +"description": "ListOrgPolicyViolationsPreviewsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolationsPreviews.", +"id": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsPreviewsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"orgPolicyViolationsPreviews": { +"description": "The list of OrgPolicyViolationsPreview", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse": { +"description": "ListOrgPolicyViolationsResponse is the response message for OrgPolicyViolationsPreviewService.ListOrgPolicyViolations", +"id": "GoogleCloudPolicysimulatorV1betaListOrgPolicyViolationsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"orgPolicyViolations": { +"description": "The list of OrgPolicyViolations", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaListReplayResultsResponse": { +"description": "Response message for Simulator.ListReplayResults.", +"id": "GoogleCloudPolicysimulatorV1betaListReplayResultsResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of ReplayResult objects. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"replayResults": { +"description": "The results of running a Replay.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplayResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaListReplaysResponse": { +"description": "Response message for Simulator.ListReplays.", +"id": "GoogleCloudPolicysimulatorV1betaListReplaysResponse", +"properties": { +"nextPageToken": { +"description": "A token that you can use to retrieve the next page of results. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"replays": { +"description": "The list of Replay objects.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay": { +"description": "The proposed changes to OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", +"properties": { +"customConstraints": { +"description": "Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay" +}, +"type": "array" +}, +"policies": { +"description": "Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated.", +"items": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay": { +"description": "A change to an OrgPolicy custom constraint.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayCustomConstraintOverlay", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "Optional. The new or updated custom constraint." +}, +"customConstraintParent": { +"description": "Optional. Resource the constraint is attached to. Example: \"organization/987654\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay": { +"description": "A change to an OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlayPolicyOverlay", +"properties": { +"policy": { +"$ref": "GoogleCloudOrgpolicyV2Policy", +"description": "Optional. The new or updated OrgPolicy." +}, +"policyParent": { +"description": "Optional. The parent of the policy we are attaching to. Example: \"projects/123456\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyViolation": { +"description": "OrgPolicyViolation is a resource representing a single resource violating a single OrgPolicy constraint.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolation", +"properties": { +"customConstraint": { +"$ref": "GoogleCloudOrgpolicyV2CustomConstraint", +"description": "The custom constraint being violated." +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "Any error encountered during the evaluation." +}, +"name": { +"description": "The name of the `OrgPolicyViolation`. Example: organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce`", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudPolicysimulatorV1betaResourceContext", +"description": "The resource violating the constraint." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview": { +"description": "OrgPolicyViolationsPreview is a resource providing a preview of the violations that will exist if an OrgPolicy change is made. The list of violations are modeled as child resources and retrieved via a ListOrgPolicyViolations API call. There are potentially more OrgPolicyViolations than could fit in an embedded field. Thus, the use of a child resource instead of a field.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreview", +"properties": { +"createTime": { +"description": "Output only. Time when this `OrgPolicyViolationsPreview` was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customConstraints": { +"description": "Output only. The names of the constraints against which all `OrgPolicyViolations` were evaluated. If `OrgPolicyOverlay` only contains `PolicyOverlay` then it contains the name of the configured custom constraint, applicable to the specified policies. Otherwise it contains the name of the constraint specified in `CustomConstraintOverlay`. Format: `organizations/{organization_id}/customConstraints/{custom_constraint_id}` Example: `organizations/123/customConstraints/custom.createOnlyE2TypeVms`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the `OrgPolicyViolationsPreview`. It has the following format: `organizations/{organization}/locations/{location}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreview}` Example: `organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f`", +"readOnly": true, +"type": "string" +}, +"overlay": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyOverlay", +"description": "Required. The proposed changes we are previewing violations for." +}, +"resourceCounts": { +"$ref": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", +"description": "Output only. A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of the `OrgPolicyViolationsPreview`.", +"enum": [ +"PREVIEW_STATE_UNSPECIFIED", +"PREVIEW_PENDING", +"PREVIEW_RUNNING", +"PREVIEW_SUCCEEDED", +"PREVIEW_FAILED" +], +"enumDescriptions": [ +"The state is unspecified.", +"The OrgPolicyViolationsPreview has not been created yet.", +"The OrgPolicyViolationsPreview is currently being created.", +"The OrgPolicyViolationsPreview creation finished successfully.", +"The OrgPolicyViolationsPreview creation failed with an error." +], +"readOnly": true, +"type": "string" +}, +"violationsCount": { +"description": "Output only. The number of OrgPolicyViolations in this `OrgPolicyViolationsPreview`. This count may differ from `resource_summary.noncompliant_count` because each OrgPolicyViolation is specific to a resource **and** constraint. If there are multiple constraints being evaluated (i.e. multiple policies in the overlay), a single resource may violate multiple constraints.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts": { +"description": "A summary of the state of all resources scanned for compliance with the changed OrgPolicy.", +"id": "GoogleCloudPolicysimulatorV1betaOrgPolicyViolationsPreviewResourceCounts", +"properties": { +"compliant": { +"description": "Output only. Number of scanned resources with zero violations.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"errors": { +"description": "Output only. Number of resources that returned an error when scanned.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"noncompliant": { +"description": "Output only. Number of scanned resources with at least one violation.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"scanned": { +"description": "Output only. Number of resources checked for compliance. Must equal: unenforced + noncompliant + compliant + error", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"unenforced": { +"description": "Output only. Number of resources where the constraint was not enforced, i.e. the Policy set `enforced: false` for that resource.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaReplay": { +"description": "A resource describing a `Replay`, or simulation.", +"id": "GoogleCloudPolicysimulatorV1betaReplay", +"properties": { +"config": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplayConfig", +"description": "Required. The configuration used for the `Replay`." +}, +"name": { +"description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", +"readOnly": true, +"type": "string" +}, +"resultsSummary": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplayResultsSummary", +"description": "Output only. Summary statistics about the replayed log entries.", +"readOnly": true +}, +"state": { +"description": "Output only. The current state of the `Replay`.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The `Replay` has not started yet.", +"The `Replay` is currently running.", +"The `Replay` has successfully completed.", +"The `Replay` has finished with an error." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaReplayConfig": { +"description": "The configuration used for a Replay.", +"id": "GoogleCloudPolicysimulatorV1betaReplayConfig", +"properties": { +"logSource": { +"description": "The logs to use as input for the Replay.", +"enum": [ +"LOG_SOURCE_UNSPECIFIED", +"RECENT_ACCESSES" +], +"enumDescriptions": [ +"An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", +"All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." +], +"type": "string" +}, +"policyOverlay": { +"additionalProperties": { +"$ref": "GoogleIamV1Policy" +}, +"description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaReplayDiff": { +"description": "The difference between the results of evaluating an access tuple under the current (baseline) policies and under the proposed (simulated) policies. This difference explains how a principal's access could change if the proposed policies were applied.", +"id": "GoogleCloudPolicysimulatorV1betaReplayDiff", +"properties": { +"accessDiff": { +"$ref": "GoogleCloudPolicysimulatorV1betaAccessStateDiff", +"description": "A summary and comparison of the principal's access under the current (baseline) policies and the proposed (simulated) policies for a single access tuple. The evaluation of the principal's access is reported in the AccessState field." +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaReplayResult": { +"description": "The result of replaying a single access tuple against a simulated state.", +"id": "GoogleCloudPolicysimulatorV1betaReplayResult", +"properties": { +"accessTuple": { +"$ref": "GoogleCloudPolicysimulatorV1betaAccessTuple", +"description": "The access tuple that was replayed. This field includes information about the principal, resource, and permission that were involved in the access attempt." +}, +"diff": { +"$ref": "GoogleCloudPolicysimulatorV1betaReplayDiff", +"description": "The difference between the principal's access under the current (baseline) policies and the principal's access under the proposed (simulated) policies. This field is only included for access tuples that were successfully replayed and had different results under the current policies and the proposed policies." +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error that caused the access tuple replay to fail. This field is only included for access tuples that were not replayed successfully." +}, +"lastSeenDate": { +"$ref": "GoogleTypeDate", +"description": "The latest date this access tuple was seen in the logs." +}, +"name": { +"description": "The resource name of the `ReplayResult`, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`", +"type": "string" +}, +"parent": { +"description": "The Replay that the access tuple was included in.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaReplayResultsSummary": { +"description": "Summary statistics about the replayed log entries.", +"id": "GoogleCloudPolicysimulatorV1betaReplayResultsSummary", +"properties": { +"differenceCount": { +"description": "The number of replayed log entries with a difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +}, +"errorCount": { +"description": "The number of log entries that could not be replayed.", +"format": "int32", +"type": "integer" +}, +"logCount": { +"description": "The total number of log entries replayed.", +"format": "int32", +"type": "integer" +}, +"newestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the newest log entry replayed." +}, +"oldestDate": { +"$ref": "GoogleTypeDate", +"description": "The date of the oldest log entry replayed." +}, +"unchangedCount": { +"description": "The number of replayed log entries with no difference between baseline and simulated policies.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudPolicysimulatorV1betaResourceContext": { +"description": "ResourceContext provides the context we know about a resource. It is similar in concept to google.cloud.asset.v1.Resource, but focuses on the information specifically used by Simulator.", +"id": "GoogleCloudPolicysimulatorV1betaResourceContext", +"properties": { +"ancestors": { +"description": "The ancestry path of the resource in Google Cloud [resource hierarchy](https://cloud.google.com/resource-manager/docs/cloud-platform-resource-hierarchy), represented as a list of relative resource names. An ancestry path starts with the closest ancestor in the hierarchy and ends at root. If the resource is a project, folder, or organization, the ancestry path starts from the resource itself. Example: `[\"projects/123456789\", \"folders/5432\", \"organizations/1234\"]`", +"items": { +"type": "string" +}, +"type": "array" +}, +"assetType": { +"description": "The asset type of the resource as defined by CAIS. Example: `compute.googleapis.com/Firewall` See [Supported asset types](https://cloud.google.com/asset-inventory/docs/supported-asset-types) for more information.", +"type": "string" +}, +"resource": { +"description": "The full name of the resource. Example: `//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1` See [Resource names](https://cloud.google.com/apis/design/resource_names#full_resource_name) for more information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDate": { +"description": "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, 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", +"id": "GoogleTypeDate", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Policy Simulator API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..0e9ef97a283feb9a2cc98ed123e37943a0f07998 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policysimulator.v1beta1.json @@ -0,0 +1,984 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://policysimulator.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Policy Simulator", + "description": " Policy Simulator is a collection of endpoints for creating, running, and viewing a Replay. A `Replay` is a type of simulation that lets you see how your members' access to resources might change if you changed your IAM policy. During a `Replay`, Policy Simulator re-evaluates, or replays, past access attempts under both the current policy and your proposed policy, and compares those results to determine how your members' access might change under the proposed policy.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/iam/docs/simulating-access", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "policysimulator:v1beta1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://policysimulator.mtls.googleapis.com/", + "name": "policysimulator", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "folders": { + "resources": { + "locations": { + "resources": { + "orgPolicyViolationsPreviews": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.orgPolicyViolationsPreviews.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "replays": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.folders.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^folders/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/operations", + "httpMethod": "GET", + "id": "policysimulator.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "organizations": { + "resources": { + "locations": { + "resources": { + "orgPolicyViolationsPreviews": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.orgPolicyViolationsPreviews.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "replays": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.organizations.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^organizations/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + }, + "projects": { + "resources": { + "locations": { + "resources": { + "orgPolicyViolationsPreviews": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/orgPolicyViolationsPreviews/{orgPolicyViolationsPreviewsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.orgPolicyViolationsPreviews.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/orgPolicyViolationsPreviews/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "replays": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/replays/{replaysId}/operations", + "httpMethod": "GET", + "id": "policysimulator.projects.locations.replays.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/replays/[^/]+/operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + } + } + }, + "revision": "20230226", + "rootUrl": "https://policysimulator.googleapis.com/", + "schemas": { + "GoogleCloudPolicysimulatorV1Replay": { + "description": "A resource describing a `Replay`, or simulation.", + "id": "GoogleCloudPolicysimulatorV1Replay", + "properties": { + "config": { + "$ref": "GoogleCloudPolicysimulatorV1ReplayConfig", + "description": "Required. The configuration used for the `Replay`." + }, + "name": { + "description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "readOnly": true, + "type": "string" + }, + "resultsSummary": { + "$ref": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", + "description": "Output only. Summary statistics about the replayed log entries.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the `Replay`.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "Default value. This value is unused.", + "The `Replay` has not started yet.", + "The `Replay` is currently running.", + "The `Replay` has successfully completed.", + "The `Replay` has finished with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayConfig": { + "description": "The configuration used for a Replay.", + "id": "GoogleCloudPolicysimulatorV1ReplayConfig", + "properties": { + "logSource": { + "description": "The logs to use as input for the Replay.", + "enum": [ + "LOG_SOURCE_UNSPECIFIED", + "RECENT_ACCESSES" + ], + "enumDescriptions": [ + "An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", + "All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." + ], + "type": "string" + }, + "policyOverlay": { + "additionalProperties": { + "$ref": "GoogleIamV1Policy" + }, + "description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayOperationMetadata": { + "description": "Metadata about a Replay operation.", + "id": "GoogleCloudPolicysimulatorV1ReplayOperationMetadata", + "properties": { + "startTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1ReplayResultsSummary": { + "description": "Summary statistics about the replayed log entries.", + "id": "GoogleCloudPolicysimulatorV1ReplayResultsSummary", + "properties": { + "differenceCount": { + "description": "The number of replayed log entries with a difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + }, + "errorCount": { + "description": "The number of log entries that could not be replayed.", + "format": "int32", + "type": "integer" + }, + "logCount": { + "description": "The total number of log entries replayed.", + "format": "int32", + "type": "integer" + }, + "newestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the newest log entry replayed." + }, + "oldestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the oldest log entry replayed." + }, + "unchangedCount": { + "description": "The number of replayed log entries with no difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1Replay": { + "description": "A resource describing a `Replay`, or simulation.", + "id": "GoogleCloudPolicysimulatorV1beta1Replay", + "properties": { + "config": { + "$ref": "GoogleCloudPolicysimulatorV1beta1ReplayConfig", + "description": "Required. The configuration used for the `Replay`." + }, + "name": { + "description": "Output only. The resource name of the `Replay`, which has the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the Replay. Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36`", + "readOnly": true, + "type": "string" + }, + "resultsSummary": { + "$ref": "GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary", + "description": "Output only. Summary statistics about the replayed log entries.", + "readOnly": true + }, + "state": { + "description": "Output only. The current state of the `Replay`.", + "enum": [ + "STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The state is unspecified.", + "The `Replay` has not started yet.", + "The `Replay` is currently running.", + "The `Replay` has successfully completed.", + "The `Replay` has finished with an error." + ], + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1ReplayConfig": { + "description": "The configuration used for a Replay.", + "id": "GoogleCloudPolicysimulatorV1beta1ReplayConfig", + "properties": { + "logSource": { + "description": "The logs to use as input for the Replay.", + "enum": [ + "LOG_SOURCE_UNSPECIFIED", + "RECENT_ACCESSES" + ], + "enumDescriptions": [ + "An unspecified log source. If the log source is unspecified, the Replay defaults to using `RECENT_ACCESSES`.", + "All access logs from the last 90 days. These logs may not include logs from the most recent 7 days." + ], + "type": "string" + }, + "policyOverlay": { + "additionalProperties": { + "$ref": "GoogleIamV1Policy" + }, + "description": "A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names. Values are Policy objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata": { + "description": "Metadata about a Replay operation.", + "id": "GoogleCloudPolicysimulatorV1beta1ReplayOperationMetadata", + "properties": { + "startTime": { + "description": "Time when the request was received.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary": { + "description": "Summary statistics about the replayed log entries.", + "id": "GoogleCloudPolicysimulatorV1beta1ReplayResultsSummary", + "properties": { + "differenceCount": { + "description": "The number of replayed log entries with a difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + }, + "errorCount": { + "description": "The number of log entries that could not be replayed.", + "format": "int32", + "type": "integer" + }, + "logCount": { + "description": "The total number of log entries replayed.", + "format": "int32", + "type": "integer" + }, + "newestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the newest log entry replayed." + }, + "oldestDate": { + "$ref": "GoogleTypeDate", + "description": "The date of the oldest log entry replayed." + }, + "unchangedCount": { + "description": "The number of replayed log entries with no difference between baseline and simulated policies.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleIamV1AuditConfig": { + "description": "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.", + "id": "GoogleIamV1AuditConfig", + "properties": { + "auditLogConfigs": { + "description": "The configuration for logging of each type of permission.", + "items": { + "$ref": "GoogleIamV1AuditLogConfig" + }, + "type": "array" + }, + "service": { + "description": "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.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1AuditLogConfig": { + "description": "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.", + "id": "GoogleIamV1AuditLogConfig", + "properties": { + "exemptedMembers": { + "description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", + "items": { + "type": "string" + }, + "type": "array" + }, + "logType": { + "description": "The log type that this config enables.", + "enum": [ + "LOG_TYPE_UNSPECIFIED", + "ADMIN_READ", + "DATA_WRITE", + "DATA_READ" + ], + "enumDescriptions": [ + "Default case. Should never be this.", + "Admin reads. Example: CloudIAM getIamPolicy", + "Data writes. Example: CloudSQL Users create", + "Data reads. Example: CloudSQL Users list" + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Binding": { + "description": "Associates `members`, or principals, with a `role`.", + "id": "GoogleIamV1Binding", + "properties": { + "condition": { + "$ref": "GoogleTypeExpr", + "description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." + }, + "members": { + "description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `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.", + "items": { + "type": "string" + }, + "type": "array" + }, + "role": { + "description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleIamV1Policy": { + "description": "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/).", + "id": "GoogleIamV1Policy", + "properties": { + "auditConfigs": { + "description": "Specifies cloud audit logging configuration for this policy.", + "items": { + "$ref": "GoogleIamV1AuditConfig" + }, + "type": "array" + }, + "bindings": { + "description": "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`.", + "items": { + "$ref": "GoogleIamV1Binding" + }, + "type": "array" + }, + "etag": { + "description": "`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.", + "format": "byte", + "type": "string" + }, + "version": { + "description": "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).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "GoogleLongrunningListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleTypeDate": { + "description": "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, 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", + "id": "GoogleTypeDate", + "properties": { + "day": { + "description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", + "format": "int32", + "type": "integer" + }, + "month": { + "description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", + "format": "int32", + "type": "integer" + }, + "year": { + "description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "GoogleTypeExpr": { + "description": "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.", + "id": "GoogleTypeExpr", + "properties": { + "description": { + "description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", + "type": "string" + }, + "expression": { + "description": "Textual representation of an expression in Common Expression Language syntax.", + "type": "string" + }, + "location": { + "description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", + "type": "string" + }, + "title": { + "description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Policy Simulator API", + "version": "v1beta1", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policytroubleshooter.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policytroubleshooter.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..49d864c932decb546c251a51af894db97efe7b44 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policytroubleshooter.v1.json @@ -0,0 +1,536 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://policytroubleshooter.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Policy Troubleshooter", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/iam/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "policytroubleshooter:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://policytroubleshooter.mtls.googleapis.com/", +"name": "policytroubleshooter", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"iam": { +"methods": { +"troubleshoot": { +"description": "Checks whether a principal has a specific permission for a specific resource, and explains why the principal does or does not have that permission.", +"flatPath": "v1/iam:troubleshoot", +"httpMethod": "POST", +"id": "policytroubleshooter.iam.troubleshoot", +"parameterOrder": [], +"parameters": {}, +"path": "v1/iam:troubleshoot", +"request": { +"$ref": "GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest" +}, +"response": { +"$ref": "GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://policytroubleshooter.googleapis.com/", +"schemas": { +"GoogleCloudPolicytroubleshooterV1AccessTuple": { +"description": "Information about the principal, resource, and permission to check.", +"id": "GoogleCloudPolicytroubleshooterV1AccessTuple", +"properties": { +"fullResourceName": { +"description": "Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"permission": { +"description": "Required. The IAM permission to check for the specified principal and resource. For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference. For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"principal": { +"description": "Required. The principal whose access you want to check, in the form of the email address that represents that principal. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The principal must be a Google Account or a service account. Other types of principals are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1BindingExplanation": { +"description": "Details about how a binding in a policy affects a principal's ability to use a permission.", +"id": "GoogleCloudPolicytroubleshooterV1BindingExplanation", +"properties": { +"access": { +"description": "Required. Indicates whether _this binding_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The sender of the request does not have access to all of the policies that Policy Troubleshooter needs to evaluate." +], +"type": "string" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition expression that prevents this binding from granting access unless the expression evaluates to `true`. To learn about IAM Conditions, see https://cloud.google.com/iam/help/conditions/overview." +}, +"memberships": { +"additionalProperties": { +"$ref": "GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership" +}, +"description": "Indicates whether each principal in the binding includes the principal specified in the request, either directly or indirectly. Each key identifies a principal in the binding, and each value indicates whether the principal in the binding includes the principal in the request. For example, suppose that a binding includes the following principals: * `user:alice@example.com` * `group:product-eng@example.com` You want to troubleshoot access for `user:bob@example.com`. This user is a principal of the group `group:product-eng@example.com`. For the first principal in the binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second principal in the binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.", +"type": "object" +}, +"relevance": { +"description": "The relevance of this binding to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +}, +"role": { +"description": "The role that this binding grants. For example, `roles/compute.serviceAgent`. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"rolePermission": { +"description": "Indicates whether the role granted by this binding contains the specified permission.", +"enum": [ +"ROLE_PERMISSION_UNSPECIFIED", +"ROLE_PERMISSION_INCLUDED", +"ROLE_PERMISSION_NOT_INCLUDED", +"ROLE_PERMISSION_UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The permission is included in the role.", +"The permission is not included in the role.", +"The sender of the request is not allowed to access the binding." +], +"type": "string" +}, +"rolePermissionRelevance": { +"description": "The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership": { +"description": "Details about whether the binding includes the principal.", +"id": "GoogleCloudPolicytroubleshooterV1BindingExplanationAnnotatedMembership", +"properties": { +"membership": { +"description": "Indicates whether the binding includes the principal.", +"enum": [ +"MEMBERSHIP_UNSPECIFIED", +"MEMBERSHIP_INCLUDED", +"MEMBERSHIP_NOT_INCLUDED", +"MEMBERSHIP_UNKNOWN_INFO_DENIED", +"MEMBERSHIP_UNKNOWN_UNSUPPORTED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The binding includes the principal. The principal can be included directly or indirectly. For example: * A principal is included directly if that principal is listed in the binding. * A principal is included indirectly if that principal is in a Google group or Google Workspace domain that is listed in the binding.", +"The binding does not include the principal.", +"The sender of the request is not allowed to access the binding.", +"The principal is an unsupported type. Only Google Accounts and service accounts are supported." +], +"type": "string" +}, +"relevance": { +"description": "The relevance of the principal's status to the overall determination for the binding.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1ExplainedPolicy": { +"description": "Details about how a specific IAM Policy contributed to the access check.", +"id": "GoogleCloudPolicytroubleshooterV1ExplainedPolicy", +"properties": { +"access": { +"description": "Indicates whether _this policy_ provides the specified permission to the specified principal for the specified resource. This field does _not_ indicate whether the principal actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the principal actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The sender of the request does not have access to all of the policies that Policy Troubleshooter needs to evaluate." +], +"type": "string" +}, +"bindingExplanations": { +"description": "Details about how each binding in the policy affects the principal's ability, or inability, to use the permission for the resource. If the sender of the request does not have access to the policy, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicytroubleshooterV1BindingExplanation" +}, +"type": "array" +}, +"fullResourceName": { +"description": "The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. If the sender of the request does not have access to the policy, this field is omitted. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "The IAM policy attached to the resource. If the sender of the request does not have access to the policy, this field is empty." +}, +"relevance": { +"description": "The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse. If the sender of the request does not have access to the policy, this field is omitted.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest": { +"description": "Request for TroubleshootIamPolicy.", +"id": "GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyRequest", +"properties": { +"accessTuple": { +"$ref": "GoogleCloudPolicytroubleshooterV1AccessTuple", +"description": "The information to use for checking whether a principal has a permission for a resource." +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse": { +"description": "Response for TroubleshootIamPolicy.", +"id": "GoogleCloudPolicytroubleshooterV1TroubleshootIamPolicyResponse", +"properties": { +"access": { +"description": "Indicates whether the principal has the specified permission for the specified resource, based on evaluating all of the applicable IAM policies.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The principal has the permission.", +"The principal does not have the permission.", +"The principal has the permission only if a condition expression evaluates to `true`.", +"The sender of the request does not have access to all of the policies that Policy Troubleshooter needs to evaluate." +], +"type": "string" +}, +"errors": { +"description": "The general errors contained in the troubleshooting response.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"explainedPolicies": { +"description": "List of IAM policies that were evaluated to check the principal's permissions, with annotations to indicate how each policy contributed to the final result. The list of policies can include the policy for the resource itself. It can also include policies that are inherited from higher levels of the resource hierarchy, including the organization, the folder, and the project. To learn more about the resource hierarchy, see https://cloud.google.com/iam/help/resource-hierarchy.", +"items": { +"$ref": "GoogleCloudPolicytroubleshooterV1ExplainedPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Policy Troubleshooter API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policytroubleshooter.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policytroubleshooter.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..043a6ef5dbf4f0f0159d271354a187604a8b4f97 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/policytroubleshooter.v1beta.json @@ -0,0 +1,502 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://policytroubleshooter.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Policy Troubleshooter", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/iam/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "policytroubleshooter:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://policytroubleshooter.mtls.googleapis.com/", +"name": "policytroubleshooter", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"iam": { +"methods": { +"troubleshoot": { +"description": "Checks whether a member has a specific permission for a specific resource, and explains why the member does or does not have that permission.", +"flatPath": "v1beta/iam:troubleshoot", +"httpMethod": "POST", +"id": "policytroubleshooter.iam.troubleshoot", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta/iam:troubleshoot", +"request": { +"$ref": "GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyRequest" +}, +"response": { +"$ref": "GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://policytroubleshooter.googleapis.com/", +"schemas": { +"GoogleCloudPolicytroubleshooterV1betaAccessTuple": { +"description": "Information about the member, resource, and permission to check.", +"id": "GoogleCloudPolicytroubleshooterV1betaAccessTuple", +"properties": { +"fullResourceName": { +"description": "Required. The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"permission": { +"description": "Required. The IAM permission to check for the specified member and resource. For a complete list of IAM permissions, see https://cloud.google.com/iam/help/permissions/reference. For a complete list of predefined IAM roles and the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"principal": { +"description": "Required. The member, or principal, whose access you want to check, in the form of the email address that represents that member. For example, `alice@example.com` or `my-service-account@my-project.iam.gserviceaccount.com`. The member must be a Google Account or a service account. Other types of members are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1betaBindingExplanation": { +"description": "Details about how a binding in a policy affects a member's ability to use a permission.", +"id": "GoogleCloudPolicytroubleshooterV1betaBindingExplanation", +"properties": { +"access": { +"description": "Indicates whether _this binding_ provides the specified permission to the specified member for the specified resource. This field does _not_ indicate whether the member actually has the permission for the resource. There might be another binding that overrides this binding. To determine whether the member actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Reserved for future use.", +"The member has the permission.", +"The member does not have the permission.", +"The member has the permission only if a condition expression evaluates to `true`.", +"The sender of the request does not have access to all of the policies that Policy Troubleshooter needs to evaluate." +], +"type": "string" +}, +"condition": { +"$ref": "GoogleTypeExpr", +"description": "A condition expression that prevents access unless the expression evaluates to `true`. To learn about IAM Conditions, see https://cloud.google.com/iam/help/conditions/overview." +}, +"memberships": { +"additionalProperties": { +"$ref": "GoogleCloudPolicytroubleshooterV1betaBindingExplanationAnnotatedMembership" +}, +"description": "Indicates whether each member in the binding includes the member specified in the request, either directly or indirectly. Each key identifies a member in the binding, and each value indicates whether the member in the binding includes the member in the request. For example, suppose that a binding includes the following members: * `user:alice@example.com` * `group:product-eng@example.com` You want to troubleshoot access for `user:bob@example.com`. This user is a member of the group `group:product-eng@example.com`. For the first member in the binding, the key is `user:alice@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_NOT_INCLUDED`. For the second member in the binding, the key is `group:product-eng@example.com`, and the `membership` field in the value is set to `MEMBERSHIP_INCLUDED`.", +"type": "object" +}, +"relevance": { +"description": "The relevance of this binding to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Reserved for future use.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +}, +"role": { +"description": "The role that this binding grants. For example, `roles/compute.serviceAgent`. For a complete list of predefined IAM roles, as well as the permissions in each role, see https://cloud.google.com/iam/help/roles/reference.", +"type": "string" +}, +"rolePermission": { +"description": "Indicates whether the role granted by this binding contains the specified permission.", +"enum": [ +"ROLE_PERMISSION_UNSPECIFIED", +"ROLE_PERMISSION_INCLUDED", +"ROLE_PERMISSION_NOT_INCLUDED", +"ROLE_PERMISSION_UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Reserved for future use.", +"The permission is included in the role.", +"The permission is not included in the role.", +"The sender of the request is not allowed to access the binding." +], +"type": "string" +}, +"rolePermissionRelevance": { +"description": "The relevance of the permission's existence, or nonexistence, in the role to the overall determination for the entire policy.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Reserved for future use.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1betaBindingExplanationAnnotatedMembership": { +"description": "Details about whether the binding includes the member.", +"id": "GoogleCloudPolicytroubleshooterV1betaBindingExplanationAnnotatedMembership", +"properties": { +"membership": { +"description": "Indicates whether the binding includes the member.", +"enum": [ +"MEMBERSHIP_UNSPECIFIED", +"MEMBERSHIP_INCLUDED", +"MEMBERSHIP_NOT_INCLUDED", +"MEMBERSHIP_UNKNOWN_INFO_DENIED", +"MEMBERSHIP_UNKNOWN_UNSUPPORTED" +], +"enumDescriptions": [ +"Reserved for future use.", +"The binding includes the member. The member can be included directly or indirectly. For example: * A member is included directly if that member is listed in the binding. * A member is included indirectly if that member is in a Google group or G Suite domain that is listed in the binding.", +"The binding does not include the member.", +"The sender of the request is not allowed to access the binding.", +"The member is an unsupported type. Only Google Accounts and service accounts are supported." +], +"type": "string" +}, +"relevance": { +"description": "The relevance of the member's status to the overall determination for the binding.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Reserved for future use.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1betaExplainedPolicy": { +"description": "Details about how a specific IAM Policy contributed to the access check.", +"id": "GoogleCloudPolicytroubleshooterV1betaExplainedPolicy", +"properties": { +"access": { +"description": "Indicates whether _this policy_ provides the specified permission to the specified member for the specified resource. This field does _not_ indicate whether the member actually has the permission for the resource. There might be another policy that overrides this policy. To determine whether the member actually has the permission, use the `access` field in the TroubleshootIamPolicyResponse.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Reserved for future use.", +"The member has the permission.", +"The member does not have the permission.", +"The member has the permission only if a condition expression evaluates to `true`.", +"The sender of the request does not have access to all of the policies that Policy Troubleshooter needs to evaluate." +], +"type": "string" +}, +"bindingExplanations": { +"description": "Details about how each binding in the policy affects the member's ability, or inability, to use the permission for the resource. If the sender of the request does not have access to the policy, this field is omitted.", +"items": { +"$ref": "GoogleCloudPolicytroubleshooterV1betaBindingExplanation" +}, +"type": "array" +}, +"fullResourceName": { +"description": "The full resource name that identifies the resource. For example, `//compute.googleapis.com/projects/my-project/zones/us-central1-a/instances/my-instance`. If the sender of the request does not have access to the policy, this field is omitted. For examples of full resource names for Google Cloud services, see https://cloud.google.com/iam/help/troubleshooter/full-resource-names.", +"type": "string" +}, +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "The IAM policy attached to the resource. If the sender of the request does not have access to the policy, this field is empty." +}, +"relevance": { +"description": "The relevance of this policy to the overall determination in the TroubleshootIamPolicyResponse. If the sender of the request does not have access to the policy, this field is omitted.", +"enum": [ +"HEURISTIC_RELEVANCE_UNSPECIFIED", +"NORMAL", +"HIGH" +], +"enumDescriptions": [ +"Reserved for future use.", +"The data point has a limited effect on the result. Changing the data point is unlikely to affect the overall determination.", +"The data point has a strong effect on the result. Changing the data point is likely to affect the overall determination." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyRequest": { +"description": "Request for TroubleshootIamPolicy.", +"id": "GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyRequest", +"properties": { +"accessTuple": { +"$ref": "GoogleCloudPolicytroubleshooterV1betaAccessTuple", +"description": "The information to use for checking whether a member has a permission for a resource." +} +}, +"type": "object" +}, +"GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyResponse": { +"description": "Response for TroubleshootIamPolicy.", +"id": "GoogleCloudPolicytroubleshooterV1betaTroubleshootIamPolicyResponse", +"properties": { +"access": { +"description": "Indicates whether the member has the specified permission for the specified resource, based on evaluating all of the applicable policies.", +"enum": [ +"ACCESS_STATE_UNSPECIFIED", +"GRANTED", +"NOT_GRANTED", +"UNKNOWN_CONDITIONAL", +"UNKNOWN_INFO_DENIED" +], +"enumDescriptions": [ +"Reserved for future use.", +"The member has the permission.", +"The member does not have the permission.", +"The member has the permission only if a condition expression evaluates to `true`.", +"The sender of the request does not have access to all of the policies that Policy Troubleshooter needs to evaluate." +], +"type": "string" +}, +"explainedPolicies": { +"description": "List of IAM policies that were evaluated to check the member's permissions, with annotations to indicate how each policy contributed to the final result. The list of policies can include the policy for the resource itself. It can also include policies that are inherited from higher levels of the resource hierarchy, including the organization, the folder, and the project. To learn more about the resource hierarchy, see https://cloud.google.com/iam/help/resource-hierarchy.", +"items": { +"$ref": "GoogleCloudPolicytroubleshooterV1betaExplainedPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Policy Troubleshooter API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/poly.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/poly.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..994f4c8eed866879045da2dba4e790deb7bb6774 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/poly.v1.json @@ -0,0 +1,805 @@ +{ +"basePath": "", +"baseUrl": "https://poly.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Poly Service", +"description": "The Poly API provides read access to assets hosted on poly.google.com to all, and upload access to poly.google.com for whitelisted accounts. ", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/poly/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "poly:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://poly.mtls.googleapis.com/", +"name": "poly", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"assets": { +"methods": { +"get": { +"description": "Returns detailed information about an asset given its name. PRIVATE assets are returned only if the currently authenticated user (via OAuth token) is the author of the asset.", +"flatPath": "v1/assets/{assetsId}", +"httpMethod": "GET", +"id": "poly.assets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. An asset's name in the form `assets/{ASSET_ID}`.", +"location": "path", +"pattern": "^assets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Asset" +} +}, +"list": { +"description": "Lists all public, remixable assets. These are assets with an access level of PUBLIC and published under the CC-By license.", +"flatPath": "v1/assets", +"httpMethod": "GET", +"id": "poly.assets.list", +"parameterOrder": [], +"parameters": { +"category": { +"description": "Filter assets based on the specified category. Supported values are: `animals`, `architecture`, `art`, `food`, `nature`, `objects`, `people`, `scenes`, `technology`, and `transport`.", +"location": "query", +"type": "string" +}, +"curated": { +"description": "Return only assets that have been curated by the Poly team.", +"location": "query", +"type": "boolean" +}, +"format": { +"description": "Return only assets with the matching format. Acceptable values are: `BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, `TILT`.", +"location": "query", +"type": "string" +}, +"keywords": { +"description": "One or more search terms to be matched against all text that Poly has indexed for assets, which includes display_name, description, and tags. Multiple keywords should be separated by spaces.", +"location": "query", +"type": "string" +}, +"maxComplexity": { +"description": "Returns assets that are of the specified complexity or less. Defaults to COMPLEX. For example, a request for MEDIUM assets also includes SIMPLE assets.", +"enum": [ +"COMPLEXITY_UNSPECIFIED", +"COMPLEX", +"MEDIUM", +"SIMPLE" +], +"enumDescriptions": [ +"No complexity specified. This is equivalent to omitting the filter.", +"Highly-complex.", +"Averagely-complex.", +"Simple." +], +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Specifies an ordering for assets. Acceptable values are: `BEST`, `NEWEST`, `OLDEST`. Defaults to `BEST`, which ranks assets based on a combination of popularity and other features.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of assets to be returned. This value must be between `1` and `100`. Defaults to `20`.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Specifies a continuation token from a previous search whose results were split into multiple pages. To get the next page, submit the same request specifying the value from next_page_token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/assets", +"response": { +"$ref": "ListAssetsResponse" +} +} +} +}, +"users": { +"resources": { +"assets": { +"methods": { +"list": { +"description": "Lists assets authored by the given user. Only the value 'me', representing the currently-authenticated user, is supported. May include assets with an access level of PRIVATE or UNLISTED and assets which are All Rights Reserved for the currently-authenticated user.", +"flatPath": "v1/users/{usersId}/assets", +"httpMethod": "GET", +"id": "poly.users.assets.list", +"parameterOrder": [ +"name" +], +"parameters": { +"format": { +"description": "Return only assets with the matching format. Acceptable values are: `BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.", +"location": "query", +"type": "string" +}, +"name": { +"description": "A valid user id. Currently, only the special value 'me', representing the currently-authenticated user is supported. To use 'me', you must pass an OAuth token with the request.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "Specifies an ordering for assets. Acceptable values are: `BEST`, `NEWEST`, `OLDEST`. Defaults to `BEST`, which ranks assets based on a combination of popularity and other features.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of assets to be returned. This value must be between `1` and `100`. Defaults to `20`.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Specifies a continuation token from a previous search whose results were split into multiple pages. To get the next page, submit the same request specifying the value from next_page_token.", +"location": "query", +"type": "string" +}, +"visibility": { +"description": "The visibility of the assets to be returned. Defaults to VISIBILITY_UNSPECIFIED which returns all assets.", +"enum": [ +"VISIBILITY_UNSPECIFIED", +"PUBLISHED", +"PRIVATE" +], +"enumDescriptions": [ +"No visibility specified. Returns all assets.", +"Returns only published assets.", +"Returns only private assets." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/assets", +"response": { +"$ref": "ListUserAssetsResponse" +} +} +} +}, +"likedassets": { +"methods": { +"list": { +"description": "Lists assets that the user has liked. Only the value 'me', representing the currently-authenticated user, is supported. May include assets with an access level of UNLISTED.", +"flatPath": "v1/users/{usersId}/likedassets", +"httpMethod": "GET", +"id": "poly.users.likedassets.list", +"parameterOrder": [ +"name" +], +"parameters": { +"format": { +"description": "Return only assets with the matching format. Acceptable values are: `BLOCKS`, `FBX`, `GLTF`, `GLTF2`, `OBJ`, `TILT`.", +"location": "query", +"type": "string" +}, +"name": { +"description": "A valid user id. Currently, only the special value 'me', representing the currently-authenticated user is supported. To use 'me', you must pass an OAuth token with the request.", +"location": "path", +"pattern": "^users/[^/]+$", +"required": true, +"type": "string" +}, +"orderBy": { +"description": "Specifies an ordering for assets. Acceptable values are: `BEST`, `NEWEST`, `OLDEST`, 'LIKED_TIME'. Defaults to `LIKED_TIME`, which ranks assets based on how recently they were liked.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of assets to be returned. This value must be between `1` and `100`. Defaults to `20`.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Specifies a continuation token from a previous search whose results were split into multiple pages. To get the next page, submit the same request specifying the value from next_page_token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/likedassets", +"response": { +"$ref": "ListLikedAssetsResponse" +} +} +} +} +} +} +}, +"revision": "20230206", +"rootUrl": "https://poly.googleapis.com/", +"schemas": { +"Asset": { +"description": "Represents and describes an asset in the Poly library. An asset is a 3D model or scene created using [Tilt Brush](//www.tiltbrush.com), [Blocks](//vr.google.com/blocks/), or any 3D program that produces a file that can be upload to Poly.", +"id": "Asset", +"properties": { +"authorName": { +"description": "The author's publicly visible name. Use this name when giving credit to the author. For more information, see [Licensing](/poly/discover/licensing).", +"type": "string" +}, +"createTime": { +"description": "For published assets, the time when the asset was published. For unpublished assets, the time when the asset was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "The human-readable description, set by the asset's author.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name, set by the asset's author.", +"type": "string" +}, +"formats": { +"description": "A list of Formats where each format describes one representation of the asset.", +"items": { +"$ref": "Format" +}, +"type": "array" +}, +"isCurated": { +"description": "Whether this asset has been curated by the Poly team.", +"type": "boolean" +}, +"license": { +"description": "The license under which the author has made the asset available for use, if any.", +"enum": [ +"UNKNOWN", +"CREATIVE_COMMONS_BY", +"ALL_RIGHTS_RESERVED" +], +"enumDescriptions": [ +"Unknown license value.", +"Creative Commons CC-BY 3.0. https://creativecommons.org/licenses/by/3.0/", +"Unlicensed: All Rights Reserved by the author. Unlicensed assets are **not** returned by List Assets." +], +"type": "string" +}, +"metadata": { +"description": "Application-defined opaque metadata for this asset. This field is only returned when querying for the signed-in user's own assets, not for public assets. This string is limited to 1K chars. It is up to the creator of the asset to define the format for this string (for example, JSON).", +"type": "string" +}, +"name": { +"description": "The unique identifier for the asset in the form: `assets/{ASSET_ID}`.", +"type": "string" +}, +"presentationParams": { +"$ref": "PresentationParams", +"description": "Hints for displaying the asset. Note that these parameters are not immutable; the author of an asset may change them post-publication." +}, +"remixInfo": { +"$ref": "RemixInfo", +"description": "The remix info for the asset." +}, +"thumbnail": { +"$ref": "File", +"description": "The thumbnail image for the asset." +}, +"updateTime": { +"description": "The time when the asset was last modified. For published assets, whose contents are immutable, the update time changes only when metadata properties, such as visibility, are updated.", +"format": "google-datetime", +"type": "string" +}, +"visibility": { +"description": "The visibility of the asset and who can access it.", +"enum": [ +"VISIBILITY_UNSPECIFIED", +"PRIVATE", +"UNLISTED", +"PUBLIC" +], +"enumDescriptions": [ +"Unknown (and invalid) visibility.", +"Access to the asset and its underlying files and resources is restricted to the author. **Authentication:** You must supply an OAuth token that corresponds to the author's account.", +"Access to the asset and its underlying files and resources is available to anyone with the asset's name. Unlisted assets are **not** returned by List Assets.", +"Access to the asset and its underlying files and resources is available to anyone." +], +"type": "string" +} +}, +"type": "object" +}, +"AssetImportMessage": { +"description": "A message generated by the asset import process.", +"id": "AssetImportMessage", +"properties": { +"code": { +"description": "The code associated with this message.", +"enum": [ +"CODE_UNSPECIFIED", +"NO_IMPORTABLE_FILE", +"EMPTY_MODEL", +"OBJ_PARSE_ERROR", +"EXPIRED", +"IMAGE_ERROR", +"EXTRA_FILES_WITH_ARCHIVE", +"DEFAULT_MATERIALS", +"FATAL_ERROR", +"INVALID_ELEMENT_TYPE" +], +"enumDescriptions": [ +"Unknown error code.", +"The asset import did not include any file that we can import (i.e. an OBJ file).", +"When generating the preview for the import, no geometry was found.", +"A problem was encountered while parsing the OBJ file. The converter makes a 'best effort' attempt to continue when encountering such issues. In some cases the resulting preview model may still be acceptable. The details can be found in the parse error message.", +"The importer was not able to import the model before the expiration time.", +"The importer encountered a problem reading an image file.", +"Multiple files were encountered in addition to a ZIP archive. When uploading an archive only one file is permitted.", +"Default materials are used in the model. This means that one or more faces is using default materials either because no usemtl statement was specified or because the requested material was not found due to a missing material file or bad material name. This does not cover the case of missing textures.", +"The importer encountered a fatal error and was unable to import the model.", +"The import includes a file of an unsupported element type. The file path is specified." +], +"type": "string" +}, +"filePath": { +"description": "An optional file path. Only present for those error codes that specify it.", +"type": "string" +}, +"imageError": { +"$ref": "ImageError", +"description": "An optional image error. Only present for INVALID_IMAGE_FILE." +}, +"objParseError": { +"$ref": "ObjParseError", +"description": "An optional OBJ parse error. Only present for OBJ_PARSE_ERROR." +} +}, +"type": "object" +}, +"File": { +"description": "Represents a file in Poly, which can be a root, resource, or thumbnail file.", +"id": "File", +"properties": { +"contentType": { +"description": "The MIME content-type, such as `image/png`. For more information, see [MIME types](//developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).", +"type": "string" +}, +"relativePath": { +"description": "The path of the resource file relative to the root file. For root or thumbnail files, this is just the filename.", +"type": "string" +}, +"url": { +"description": "The URL where the file data can be retrieved.", +"type": "string" +} +}, +"type": "object" +}, +"Format": { +"description": "The same asset can be represented in different formats, for example, a [WaveFront .obj](//en.wikipedia.org/wiki/Wavefront_.obj_file) file with its corresponding .mtl file or a [Khronos glTF](//www.khronos.org/gltf) file with its corresponding .glb binary data. A format refers to a specific representation of an asset and contains all information needed to retrieve and describe this representation.", +"id": "Format", +"properties": { +"formatComplexity": { +"$ref": "FormatComplexity", +"description": "Complexity stats about this representation of the asset." +}, +"formatType": { +"description": "A short string that identifies the format type of this representation. Possible values are: `FBX`, `GLTF`, `GLTF2`, `OBJ`, and `TILT`.", +"type": "string" +}, +"resources": { +"description": "A list of dependencies of the root element. May include, but is not limited to, materials, textures, and shader programs.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"root": { +"$ref": "File", +"description": "The root of the file hierarchy. This will always be populated. For some format_types - such as `TILT`, which are self-contained - this is all of the data. Other types - such as `OBJ` - often reference other data elements. These are contained in the resources field." +} +}, +"type": "object" +}, +"FormatComplexity": { +"description": "Information on the complexity of this Format.", +"id": "FormatComplexity", +"properties": { +"lodHint": { +"description": "A non-negative integer that represents the level of detail (LOD) of this format relative to other formats of the same asset with the same format_type. This hint allows you to sort formats from the most-detailed (0) to least-detailed (integers greater than 0).", +"format": "int32", +"type": "integer" +}, +"triangleCount": { +"description": "The estimated number of triangles.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ImageError": { +"description": "A message resulting from reading an image file.", +"id": "ImageError", +"properties": { +"code": { +"description": "The type of image error encountered. Optional for older image errors.", +"enum": [ +"CODE_UNSPECIFIED", +"INVALID_IMAGE", +"IMAGE_TOO_BIG", +"WRONG_IMAGE_TYPE" +], +"enumDescriptions": [ +"Unknown error code.", +"We were unable to read the image file.", +"The image size is too large.", +"The image data does not match the expected MIME type of the image." +], +"type": "string" +}, +"filePath": { +"description": "The file path in the import of the image that was rejected.", +"type": "string" +} +}, +"type": "object" +}, +"ListAssetsResponse": { +"description": "A response message from a request to list.", +"id": "ListAssetsResponse", +"properties": { +"assets": { +"description": "A list of assets that match the criteria specified in the request.", +"items": { +"$ref": "Asset" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The continuation token for retrieving the next page. If empty, indicates that there are no more pages. To get the next page, submit the same request specifying this value as the page_token.", +"type": "string" +}, +"totalSize": { +"description": "The total number of assets in the list, without pagination.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListLikedAssetsResponse": { +"description": "A response message from a request to list.", +"id": "ListLikedAssetsResponse", +"properties": { +"assets": { +"description": "A list of assets that match the criteria specified in the request.", +"items": { +"$ref": "Asset" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The continuation token for retrieving the next page. If empty, indicates that there are no more pages. To get the next page, submit the same request specifying this value as the page_token.", +"type": "string" +}, +"totalSize": { +"description": "The total number of assets in the list, without pagination.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListUserAssetsResponse": { +"description": "A response message from a request to list.", +"id": "ListUserAssetsResponse", +"properties": { +"nextPageToken": { +"description": "The continuation token for retrieving the next page. If empty, indicates that there are no more pages. To get the next page, submit the same request specifying this value as the page_token.", +"type": "string" +}, +"totalSize": { +"description": "The total number of assets in the list, without pagination.", +"format": "int32", +"type": "integer" +}, +"userAssets": { +"description": "A list of UserAssets matching the request.", +"items": { +"$ref": "UserAsset" +}, +"type": "array" +} +}, +"type": "object" +}, +"ObjParseError": { +"description": "Details of an error resulting from parsing an OBJ file", +"id": "ObjParseError", +"properties": { +"code": { +"description": "The type of problem found (required).", +"enum": [ +"CODE_UNSPECIFIED", +"INCONSISTENT_VERTEX_REFS", +"INVALID_COMMAND", +"INVALID_NUMBER", +"INVALID_VERTEX_REF", +"MISSING_GEOMETRIC_VERTEX", +"MISSING_TOKEN", +"TOO_FEW_DIMENSIONS", +"TOO_FEW_VERTICES", +"TOO_MANY_DIMENSIONS", +"UNSUPPORTED_COMMAND", +"UNUSED_TOKENS", +"VERTEX_NOT_FOUND", +"NUMBER_OUT_OF_RANGE", +"INVALID_VALUE", +"INVALID_TEXTURE_OPTION", +"TOO_MANY_PROBLEMS", +"MISSING_FILE_NAME", +"FILE_NOT_FOUND", +"UNKNOWN_MATERIAL", +"NO_MATERIAL_DEFINED", +"INVALID_SMOOTHING_GROUP", +"MISSING_VERTEX_COLORS", +"FILE_SUBSTITUTION", +"LINE_TOO_LONG", +"INVALID_FILE_PATH" +], +"enumDescriptions": [ +"Unknown error code.", +"Vertex references are specified in an inconsistent style for a face (e.g. some vertices specify texture vertices but some don't).", +"The command is invalid.", +"A invalid number was specified.", +"An invalid vertex reference was specified.", +"A vertex reference does not specify a geometric vertex.", +"An expected token was not found.", +"The vertex specified too few dimensions for its usage.", +"The face specified too few vertices.", +"The vertex specified too many dimensions for its usage.", +"This command is a valid OBJ command but is not supported. This error is only generated for the first instance of such a command.", +"This line ended with unparsed token characters.", +"The specified vertex was not found.", +"The specified number was too large or small for its usage.", +"The specified parameter value was not recognized.", +"The specified texture option is not valid.", +"The maximum number of problems to report was reached. Parsing continues, but further problems will be ignored.", +"An expected file name was not specified.", +"The specified file was not found in the import.", +"The specified material was not found in any material definition in the import.", +"Material parameters were specified before the first material definition.", +"The smoothing group is not valid.", +"Vertex colors were specified for only some vertices of a face.", +"A missing file was found at a different file path.", +"A line in an OBJ or MTL file exceeded the maximum line length.", +"The file path was invalid. Only relative paths are supported." +], +"type": "string" +}, +"endIndex": { +"description": "The ending character index at which the problem was found.", +"format": "int32", +"type": "integer" +}, +"filePath": { +"description": "The file path in which the problem was found.", +"type": "string" +}, +"line": { +"description": "The text of the line. Note that this may be truncated if the line was very long. This may not include the error if it occurs after line truncation.", +"type": "string" +}, +"lineNumber": { +"description": "Line number at which the problem was found.", +"format": "int32", +"type": "integer" +}, +"startIndex": { +"description": "The starting character index at which the problem was found.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PresentationParams": { +"description": "Hints for displaying the asset, based on information available when the asset was uploaded.", +"id": "PresentationParams", +"properties": { +"backgroundColor": { +"description": "A background color which could be used for displaying the 3D asset in a 'thumbnail' or 'palette' style view. Authors have the option to set this background color when publishing or editing their asset. This is represented as a six-digit hexademical triplet specifying the RGB components of the background color, e.g. #FF0000 for Red.", +"type": "string" +}, +"colorSpace": { +"description": "The materials' diffuse/albedo color. This does not apply to vertex colors or texture maps.", +"enum": [ +"UNKNOWN", +"LINEAR", +"GAMMA" +], +"enumDescriptions": [ +"Invalid color value.", +"Linear color values. Default.", +"Colors should be converted to linear by assuming gamma = 2.0." +], +"type": "string" +}, +"orientingRotation": { +"$ref": "Quaternion", +"description": "A rotation that should be applied to the object root to make it upright. More precisely, this quaternion transforms from \"object space\" (the space in which the object is defined) to \"presentation space\", a coordinate system where +Y is up, +X is right, -Z is forward. For example, if the object is the Eiffel Tower, in its local coordinate system the object might be laid out such that the base of the tower is on the YZ plane and the tip of the tower is towards positive X. In this case this quaternion would specify a rotation (of 90 degrees about the Z axis) such that in the presentation space the base of the tower is aligned with the XZ plane, and the tip of the tower lies towards +Y. This rotation is unrelated to the object's pose in the web preview, which is just a camera position setting and is *not* reflected in this rotation. Please note: this is applicable only to the gLTF." +} +}, +"type": "object" +}, +"Quaternion": { +"description": "A [Quaternion](//en.wikipedia.org/wiki/Quaternion). Please note: if in the response you see \"w: 1\" and nothing else this is the default value of [0, 0, 0, 1] where x,y, and z are 0.", +"id": "Quaternion", +"properties": { +"w": { +"description": "The scalar component.", +"format": "double", +"type": "number" +}, +"x": { +"description": "The x component.", +"format": "double", +"type": "number" +}, +"y": { +"description": "The y component.", +"format": "double", +"type": "number" +}, +"z": { +"description": "The z component.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"RemixInfo": { +"description": "Info about the sources of this asset (i.e. assets that were remixed to create this asset).", +"id": "RemixInfo", +"properties": { +"sourceAsset": { +"description": "Resource ids for the sources of this remix, of the form: `assets/{ASSET_ID}`", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"StartAssetImportResponse": { +"description": "A response message from a request to startImport. This is returned in the response field of the Operation.", +"id": "StartAssetImportResponse", +"properties": { +"assetId": { +"description": "The id of newly created asset. If this is empty when the operation is complete it means the import failed. Please refer to the assetImportMessages field to understand what went wrong.", +"type": "string" +}, +"assetImportId": { +"description": "The id of the asset import.", +"type": "string" +}, +"assetImportMessages": { +"description": "The message from the asset import. This will contain any warnings (or - in the case of failure - errors) that occurred during import.", +"items": { +"$ref": "AssetImportMessage" +}, +"type": "array" +}, +"publishUrl": { +"description": "The publish URL for the asset.", +"type": "string" +} +}, +"type": "object" +}, +"UserAsset": { +"description": "Data about the user's asset.", +"id": "UserAsset", +"properties": { +"asset": { +"$ref": "Asset", +"description": "An Asset." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Poly API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/privateca.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/privateca.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..0bb9c1c21ae12a2488f1f374e037cf6f96840f16 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/privateca.v1.json @@ -0,0 +1,3528 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://privateca.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Certificate Authority Service", +"description": "The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "privateca:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://privateca.mtls.googleapis.com/", +"name": "privateca", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "privateca.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"caPools": { +"methods": { +"create": { +"description": "Create a CaPool.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"caPoolId": { +"description": "Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location associated with the CaPool, in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/caPools", +"request": { +"$ref": "CaPool" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a CaPool.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}", +"httpMethod": "DELETE", +"id": "privateca.projects.locations.caPools.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"ignoreDependentResources": { +"description": "Optional. This field allows this pool to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the pool will no longer be able to issue certificates.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The resource name for this CaPool in the format `projects/*/locations/*/caPools/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"fetchCaCerts": { +"description": "FetchCaCerts returns the current trust anchor for the CaPool. This will include CA certificate chains for all certificate authorities in the ENABLED, DISABLED, or STAGED states.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}:fetchCaCerts", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.fetchCaCerts", +"parameterOrder": [ +"caPool" +], +"parameters": { +"caPool": { +"description": "Required. The resource name for the CaPool in the format `projects/*/locations/*/caPools/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+caPool}:fetchCaCerts", +"request": { +"$ref": "FetchCaCertsRequest" +}, +"response": { +"$ref": "FetchCaCertsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns a CaPool.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CaPool to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CaPool" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}:getIamPolicy", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists CaPools.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Only include resources that match the filter in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Specify how the results should be sorted.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Limit on the number of CaPools to include in the response. Further CaPools can subsequently be obtained by including the ListCaPoolsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListCaPoolsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location associated with the CaPools, in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/caPools", +"response": { +"$ref": "ListCaPoolsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a CaPool.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}", +"httpMethod": "PATCH", +"id": "privateca.projects.locations.caPools.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name for this CaPool in the format `projects/*/locations/*/caPools/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. A list of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "CaPool" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}:setIamPolicy", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}:testIamPermissions", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"certificateAuthorities": { +"methods": { +"activate": { +"description": "Activate a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type SUBORDINATE. After the parent Certificate Authority signs a certificate signing request from FetchCertificateAuthorityCsr, this method can complete the activation process.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}:activate", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificateAuthorities.activate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:activate", +"request": { +"$ref": "ActivateCertificateAuthorityRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Create a new CertificateAuthority in a given Project and Location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificateAuthorities.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"certificateAuthorityId": { +"description": "Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the CaPool associated with the CertificateAuthorities, in the format `projects/*/locations/*/caPools/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/certificateAuthorities", +"request": { +"$ref": "CertificateAuthority" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a CertificateAuthority.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}", +"httpMethod": "DELETE", +"id": "privateca.projects.locations.caPools.certificateAuthorities.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"ignoreActiveCertificates": { +"description": "Optional. This field allows the CA to be deleted even if the CA has active certs. Active certs include both unrevoked and unexpired certs.", +"location": "query", +"type": "boolean" +}, +"ignoreDependentResources": { +"description": "Optional. This field allows this CA to be deleted even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the CA will no longer be able to issue certificates.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"skipGracePeriod": { +"description": "Optional. If this flag is set, the Certificate Authority will be deleted as soon as possible without a 30-day grace period where undeletion would have been allowed. If you proceed, there will be no way to recover this CA.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"disable": { +"description": "Disable a CertificateAuthority.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}:disable", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificateAuthorities.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:disable", +"request": { +"$ref": "DisableCertificateAuthorityRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"enable": { +"description": "Enable a CertificateAuthority.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}:enable", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificateAuthorities.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:enable", +"request": { +"$ref": "EnableCertificateAuthorityRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"fetch": { +"description": "Fetch a certificate signing request (CSR) from a CertificateAuthority that is in state AWAITING_USER_ACTIVATION and is of type SUBORDINATE. The CSR must then be signed by the desired parent Certificate Authority, which could be another CertificateAuthority resource, or could be an on-prem certificate authority. See also ActivateCertificateAuthority.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}:fetch", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificateAuthorities.fetch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:fetch", +"response": { +"$ref": "FetchCertificateAuthorityCsrResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns a CertificateAuthority.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificateAuthorities.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CertificateAuthority to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CertificateAuthority" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists CertificateAuthorities.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificateAuthorities.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Only include resources that match the filter in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Specify how the results should be sorted.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Limit on the number of CertificateAuthorities to include in the response. Further CertificateAuthorities can subsequently be obtained by including the ListCertificateAuthoritiesResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListCertificateAuthoritiesResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the CaPool associated with the CertificateAuthorities, in the format `projects/*/locations/*/caPools/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/certificateAuthorities", +"response": { +"$ref": "ListCertificateAuthoritiesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a CertificateAuthority.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}", +"httpMethod": "PATCH", +"id": "privateca.projects.locations.caPools.certificateAuthorities.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. A list of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "CertificateAuthority" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"undelete": { +"description": "Undelete a CertificateAuthority that has been deleted.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}:undelete", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificateAuthorities.undelete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:undelete", +"request": { +"$ref": "UndeleteCertificateAuthorityRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"certificateRevocationLists": { +"methods": { +"get": { +"description": "Returns a CertificateRevocationList.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificateAuthorities.certificateRevocationLists.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CertificateRevocationList to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CertificateRevocationList" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:getIamPolicy", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificateAuthorities.certificateRevocationLists.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists CertificateRevocationLists.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificateAuthorities.certificateRevocationLists.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Only include resources that match the filter in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Specify how the results should be sorted.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Limit on the number of CertificateRevocationLists to include in the response. Further CertificateRevocationLists can subsequently be obtained by including the ListCertificateRevocationListsResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListCertificateRevocationListsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location associated with the CertificateRevocationLists, in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/certificateRevocationLists", +"response": { +"$ref": "ListCertificateRevocationListsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a CertificateRevocationList.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}", +"httpMethod": "PATCH", +"id": "privateca.projects.locations.caPools.certificateAuthorities.certificateRevocationLists.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name for this CertificateRevocationList in the format `projects/*/locations/*/caPools/*certificateAuthorities/*/ certificateRevocationLists/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. A list of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "CertificateRevocationList" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:setIamPolicy", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificateAuthorities.certificateRevocationLists.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:testIamPermissions", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificateAuthorities.certificateRevocationLists.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"certificates": { +"methods": { +"create": { +"description": "Create a new Certificate in a given Project, Location from a particular CaPool.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificates", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificates.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"certificateId": { +"description": "Optional. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`. This field is required when using a CertificateAuthority in the Enterprise CertificateAuthority.Tier, but is optional and its value is ignored otherwise.", +"location": "query", +"type": "string" +}, +"issuingCertificateAuthorityId": { +"description": "Optional. The resource ID of the CertificateAuthority that should issue the certificate. This optional field will ignore the load-balancing scheme of the Pool and directly issue the certificate from the CA with the specified ID, contained in the same CaPool referenced by `parent`. Per-CA quota rules apply. If left empty, a CertificateAuthority will be chosen from the CaPool by the service. For example, to issue a Certificate from a Certificate Authority with resource name \"projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca\", you can set the parent to \"projects/my-project/locations/us-central1/caPools/my-pool\" and the issuing_certificate_authority_id to \"my-ca\".", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the CaPool associated with the Certificate, in the format `projects/*/locations/*/caPools/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If this is true, no Certificate resource will be persisted regardless of the CaPool's tier, and the returned Certificate will not contain the pem_certificate field.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/certificates", +"request": { +"$ref": "Certificate" +}, +"response": { +"$ref": "Certificate" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns a Certificate.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificates/{certificatesId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificates.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Certificate to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Certificate" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Certificates.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificates", +"httpMethod": "GET", +"id": "privateca.projects.locations.caPools.certificates.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Only include resources that match the filter in the response. For details on supported filters and syntax, see [Certificates Filtering documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#filtering_support).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Specify how the results should be sorted. For details on supported fields and syntax, see [Certificates Sorting documentation](https://cloud.google.com/certificate-authority-service/docs/sorting-filtering-certificates#sorting_support).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Limit on the number of Certificates to include in the response. Further Certificates can subsequently be obtained by including the ListCertificatesResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListCertificatesResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location associated with the Certificates, in the format `projects/*/locations/*/caPools/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/certificates", +"response": { +"$ref": "ListCertificatesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a Certificate. Currently, the only field you can update is the labels field.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificates/{certificatesId}", +"httpMethod": "PATCH", +"id": "privateca.projects.locations.caPools.certificates.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name for this Certificate in the format `projects/*/locations/*/caPools/*/certificates/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. A list of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Certificate" +}, +"response": { +"$ref": "Certificate" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"revoke": { +"description": "Revoke a Certificate.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/caPools/{caPoolsId}/certificates/{certificatesId}:revoke", +"httpMethod": "POST", +"id": "privateca.projects.locations.caPools.certificates.revoke", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for this Certificate in the format `projects/*/locations/*/caPools/*/certificates/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/caPools/[^/]+/certificates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:revoke", +"request": { +"$ref": "RevokeCertificateRequest" +}, +"response": { +"$ref": "Certificate" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"certificateTemplates": { +"methods": { +"create": { +"description": "Create a new CertificateTemplate in a given Project and Location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates", +"httpMethod": "POST", +"id": "privateca.projects.locations.certificateTemplates.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"certificateTemplateId": { +"description": "Required. It must be unique within a location and match the regular expression `[a-zA-Z0-9_-]{1,63}`", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location associated with the CertificateTemplate, in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/certificateTemplates", +"request": { +"$ref": "CertificateTemplate" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "DeleteCertificateTemplate deletes a CertificateTemplate.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates/{certificateTemplatesId}", +"httpMethod": "DELETE", +"id": "privateca.projects.locations.certificateTemplates.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for this CertificateTemplate in the format `projects/*/locations/*/certificateTemplates/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns a CertificateTemplate.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates/{certificateTemplatesId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.certificateTemplates.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CertificateTemplate to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CertificateTemplate" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates/{certificateTemplatesId}:getIamPolicy", +"httpMethod": "GET", +"id": "privateca.projects.locations.certificateTemplates.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists CertificateTemplates.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates", +"httpMethod": "GET", +"id": "privateca.projects.locations.certificateTemplates.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Only include resources that match the filter in the response.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Specify how the results should be sorted.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Limit on the number of CertificateTemplates to include in the response. Further CertificateTemplates can subsequently be obtained by including the ListCertificateTemplatesResponse.next_page_token in a subsequent request. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListCertificateTemplatesResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location associated with the CertificateTemplates, in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/certificateTemplates", +"response": { +"$ref": "ListCertificateTemplatesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a CertificateTemplate.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates/{certificateTemplatesId}", +"httpMethod": "PATCH", +"id": "privateca.projects.locations.certificateTemplates.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name for this CertificateTemplate in the format `projects/*/locations/*/certificateTemplates/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. A list of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "CertificateTemplate" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates/{certificateTemplatesId}:setIamPolicy", +"httpMethod": "POST", +"id": "privateca.projects.locations.certificateTemplates.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/certificateTemplates/{certificateTemplatesId}:testIamPermissions", +"httpMethod": "POST", +"id": "privateca.projects.locations.certificateTemplates.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateTemplates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "privateca.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "privateca.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "privateca.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://privateca.googleapis.com/", +"schemas": { +"AccessUrls": { +"description": "URLs where a CertificateAuthority will publish content.", +"id": "AccessUrls", +"properties": { +"caCertificateAccessUrl": { +"description": "The URL where this CertificateAuthority's CA certificate is published. This will only be set for CAs that have been activated.", +"type": "string" +}, +"crlAccessUrls": { +"description": "The URLs where this CertificateAuthority's CRLs are published. This will only be set for CAs that have been activated.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ActivateCertificateAuthorityRequest": { +"description": "Request message for CertificateAuthorityService.ActivateCertificateAuthority.", +"id": "ActivateCertificateAuthorityRequest", +"properties": { +"pemCaCertificate": { +"description": "Required. The signed CA certificate issued from FetchCertificateAuthorityCsrResponse.pem_csr.", +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +}, +"subordinateConfig": { +"$ref": "SubordinateConfig", +"description": "Required. Must include information about the issuer of 'pem_ca_certificate', and any further issuers until the self-signed CA." +} +}, +"type": "object" +}, +"AllowedKeyType": { +"description": "Describes a \"type\" of key that may be used in a Certificate issued from a CaPool. Note that a single AllowedKeyType may refer to either a fully-qualified key algorithm, such as RSA 4096, or a family of key algorithms, such as any RSA key.", +"id": "AllowedKeyType", +"properties": { +"ellipticCurve": { +"$ref": "EcKeyType", +"description": "Represents an allowed Elliptic Curve key type." +}, +"rsa": { +"$ref": "RsaKeyType", +"description": "Represents an allowed RSA key type." +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CaOptions": { +"description": "Describes values that are relevant in a CA certificate.", +"id": "CaOptions", +"properties": { +"isCa": { +"description": "Optional. Refers to the \"CA\" X.509 extension, which is a boolean value. When this value is missing, the extension will be omitted from the CA certificate.", +"type": "boolean" +}, +"maxIssuerPathLength": { +"description": "Optional. Refers to the path length restriction X.509 extension. For a CA certificate, this value describes the depth of subordinate CA certificates that are allowed. If this value is less than 0, the request will fail. If this value is missing, the max path length will be omitted from the CA certificate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"CaPool": { +"description": "A CaPool represents a group of CertificateAuthorities that form a trust anchor. A CaPool can be used to manage issuance policies for one or more CertificateAuthority resources and to rotate CA certificates in and out of the trust anchor.", +"id": "CaPool", +"properties": { +"issuancePolicy": { +"$ref": "IssuancePolicy", +"description": "Optional. The IssuancePolicy to control how Certificates will be issued from this CaPool." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels with user-defined metadata.", +"type": "object" +}, +"name": { +"description": "Output only. The resource name for this CaPool in the format `projects/*/locations/*/caPools/*`.", +"readOnly": true, +"type": "string" +}, +"publishingOptions": { +"$ref": "PublishingOptions", +"description": "Optional. The PublishingOptions to follow when issuing Certificates from any CertificateAuthority in this CaPool." +}, +"tier": { +"description": "Required. Immutable. The Tier of this CaPool.", +"enum": [ +"TIER_UNSPECIFIED", +"ENTERPRISE", +"DEVOPS" +], +"enumDescriptions": [ +"Not specified.", +"Enterprise tier.", +"DevOps tier." +], +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CertChain": { +"id": "CertChain", +"properties": { +"certificates": { +"description": "The certificates that form the CA chain, from leaf to root order.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Certificate": { +"description": "A Certificate corresponds to a signed X.509 certificate issued by a CertificateAuthority.", +"id": "Certificate", +"properties": { +"certificateDescription": { +"$ref": "CertificateDescription", +"description": "Output only. A structured description of the issued X.509 certificate.", +"readOnly": true +}, +"certificateTemplate": { +"description": "Immutable. The resource name for a CertificateTemplate used to issue this certificate, in the format `projects/*/locations/*/certificateTemplates/*`. If this is specified, the caller must have the necessary permission to use this template. If this is omitted, no template will be used. This template must be in the same location as the Certificate.", +"type": "string" +}, +"config": { +"$ref": "CertificateConfig", +"description": "Immutable. A description of the certificate and key that does not require X.509 or ASN.1." +}, +"createTime": { +"description": "Output only. The time at which this Certificate was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"issuerCertificateAuthority": { +"description": "Output only. The resource name of the issuing CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels with user-defined metadata.", +"type": "object" +}, +"lifetime": { +"description": "Required. Immutable. The desired lifetime of a certificate. Used to create the \"not_before_time\" and \"not_after_time\" fields inside an X.509 certificate. Note that the lifetime may be truncated if it would extend past the life of any certificate authority in the issuing chain.", +"format": "google-duration", +"type": "string" +}, +"name": { +"description": "Output only. The resource name for this Certificate in the format `projects/*/locations/*/caPools/*/certificates/*`.", +"readOnly": true, +"type": "string" +}, +"pemCertificate": { +"description": "Output only. The pem-encoded, signed X.509 certificate.", +"readOnly": true, +"type": "string" +}, +"pemCertificateChain": { +"description": "Output only. The chain that may be used to verify the X.509 certificate. Expected to be in issuer-to-root order according to RFC 5246.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"pemCsr": { +"description": "Immutable. A pem-encoded X.509 certificate signing request (CSR).", +"type": "string" +}, +"revocationDetails": { +"$ref": "RevocationDetails", +"description": "Output only. Details regarding the revocation of this Certificate. This Certificate is considered revoked if and only if this field is present.", +"readOnly": true +}, +"subjectMode": { +"description": "Immutable. Specifies how the Certificate's identity fields are to be decided. If this is omitted, the `DEFAULT` subject mode will be used.", +"enum": [ +"SUBJECT_REQUEST_MODE_UNSPECIFIED", +"DEFAULT", +"REFLECTED_SPIFFE" +], +"enumDescriptions": [ +"Not specified.", +"The default mode used in most cases. Indicates that the certificate's Subject and/or SubjectAltNames are specified in the certificate request. This mode requires the caller to have the `privateca.certificates.create` permission.", +"A mode reserved for special cases. Indicates that the certificate should have one SPIFFE SubjectAltNames set by the service based on the caller's identity. This mode will ignore any explicitly specified Subject and/or SubjectAltNames in the certificate request. This mode requires the caller to have the `privateca.certificates.createForSelf` permission." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which this Certificate was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CertificateAuthority": { +"description": "A CertificateAuthority represents an individual Certificate Authority. A CertificateAuthority can be used to create Certificates.", +"id": "CertificateAuthority", +"properties": { +"accessUrls": { +"$ref": "AccessUrls", +"description": "Output only. URLs for accessing content published by this CA, such as the CA certificate and CRLs.", +"readOnly": true +}, +"caCertificateDescriptions": { +"description": "Output only. A structured description of this CertificateAuthority's CA certificate and its issuers. Ordered as self-to-root.", +"items": { +"$ref": "CertificateDescription" +}, +"readOnly": true, +"type": "array" +}, +"config": { +"$ref": "CertificateConfig", +"description": "Required. Immutable. The config used to create a self-signed X.509 certificate or CSR." +}, +"createTime": { +"description": "Output only. The time at which this CertificateAuthority was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. The time at which this CertificateAuthority was soft deleted, if it is in the DELETED state.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. The time at which this CertificateAuthority will be permanently purged, if it is in the DELETED state.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"gcsBucket": { +"description": "Immutable. The name of a Cloud Storage bucket where this CertificateAuthority will publish content, such as the CA certificate and CRLs. This must be a bucket name, without any prefixes (such as `gs://`) or suffixes (such as `.googleapis.com`). For example, to use a bucket named `my-bucket`, you would simply specify `my-bucket`. If not specified, a managed bucket will be created.", +"type": "string" +}, +"keySpec": { +"$ref": "KeyVersionSpec", +"description": "Required. Immutable. Used when issuing certificates for this CertificateAuthority. If this CertificateAuthority is a self-signed CertificateAuthority, this key is also used to sign the self-signed CA certificate. Otherwise, it is used to sign a CSR." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels with user-defined metadata.", +"type": "object" +}, +"lifetime": { +"description": "Required. Immutable. The desired lifetime of the CA certificate. Used to create the \"not_before_time\" and \"not_after_time\" fields inside an X.509 certificate.", +"format": "google-duration", +"type": "string" +}, +"name": { +"description": "Output only. The resource name for this CertificateAuthority in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"readOnly": true, +"type": "string" +}, +"pemCaCertificates": { +"description": "Output only. This CertificateAuthority's certificate chain, including the current CertificateAuthority's certificate. Ordered such that the root issuer is the final element (consistent with RFC 5246). For a self-signed CA, this will only list the current CertificateAuthority's certificate.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"state": { +"description": "Output only. The State for this CertificateAuthority.", +"enum": [ +"STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"STAGED", +"AWAITING_USER_ACTIVATION", +"DELETED" +], +"enumDescriptions": [ +"Not specified.", +"Certificates can be issued from this CA. CRLs will be generated for this CA. The CA will be part of the CaPool's trust anchor, and will be used to issue certificates from the CaPool.", +"Certificates cannot be issued from this CA. CRLs will still be generated. The CA will be part of the CaPool's trust anchor, but will not be used to issue certificates from the CaPool.", +"Certificates can be issued from this CA. CRLs will be generated for this CA. The CA will be part of the CaPool's trust anchor, but will not be used to issue certificates from the CaPool.", +"Certificates cannot be issued from this CA. CRLs will not be generated. The CA will not be part of the CaPool's trust anchor, and will not be used to issue certificates from the CaPool.", +"Certificates cannot be issued from this CA. CRLs will not be generated. The CA may still be recovered by calling CertificateAuthorityService.UndeleteCertificateAuthority before expire_time. The CA will not be part of the CaPool's trust anchor, and will not be used to issue certificates from the CaPool." +], +"readOnly": true, +"type": "string" +}, +"subordinateConfig": { +"$ref": "SubordinateConfig", +"description": "Optional. If this is a subordinate CertificateAuthority, this field will be set with the subordinate configuration, which describes its issuers. This may be updated, but this CertificateAuthority must continue to validate." +}, +"tier": { +"description": "Output only. The CaPool.Tier of the CaPool that includes this CertificateAuthority.", +"enum": [ +"TIER_UNSPECIFIED", +"ENTERPRISE", +"DEVOPS" +], +"enumDescriptions": [ +"Not specified.", +"Enterprise tier.", +"DevOps tier." +], +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. Immutable. The Type of this CertificateAuthority.", +"enum": [ +"TYPE_UNSPECIFIED", +"SELF_SIGNED", +"SUBORDINATE" +], +"enumDescriptions": [ +"Not specified.", +"Self-signed CA.", +"Subordinate CA. Could be issued by a Private CA CertificateAuthority or an unmanaged CA." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which this CertificateAuthority was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CertificateConfig": { +"description": "A CertificateConfig describes an X.509 certificate or CSR that is to be created, as an alternative to using ASN.1.", +"id": "CertificateConfig", +"properties": { +"publicKey": { +"$ref": "PublicKey", +"description": "Optional. The public key that corresponds to this config. This is, for example, used when issuing Certificates, but not when creating a self-signed CertificateAuthority or CertificateAuthority CSR." +}, +"subjectConfig": { +"$ref": "SubjectConfig", +"description": "Required. Specifies some of the values in a certificate that are related to the subject." +}, +"subjectKeyId": { +"$ref": "CertificateConfigKeyId", +"description": "Optional. When specified this provides a custom SKI to be used in the certificate. This should only be used to maintain a SKI of an existing CA originally created outside CA service, which was not generated using method (1) described in RFC 5280 section 4.2.1.2." +}, +"x509Config": { +"$ref": "X509Parameters", +"description": "Required. Describes how some of the technical X.509 fields in a certificate should be populated." +} +}, +"type": "object" +}, +"CertificateConfigKeyId": { +"description": "A KeyId identifies a specific public key, usually by hashing the public key.", +"id": "CertificateConfigKeyId", +"properties": { +"keyId": { +"description": "Required. The value of this KeyId encoded in lowercase hexadecimal. This is most likely the 160 bit SHA-1 hash of the public key.", +"type": "string" +} +}, +"type": "object" +}, +"CertificateDescription": { +"description": "A CertificateDescription describes an X.509 certificate or CSR that has been issued, as an alternative to using ASN.1 / X.509.", +"id": "CertificateDescription", +"properties": { +"aiaIssuingCertificateUrls": { +"description": "Describes lists of issuer CA certificate URLs that appear in the \"Authority Information Access\" extension in the certificate.", +"items": { +"type": "string" +}, +"type": "array" +}, +"authorityKeyId": { +"$ref": "KeyId", +"description": "Identifies the subject_key_id of the parent certificate, per https://tools.ietf.org/html/rfc5280#section-4.2.1.1" +}, +"certFingerprint": { +"$ref": "CertificateFingerprint", +"description": "The hash of the x.509 certificate." +}, +"crlDistributionPoints": { +"description": "Describes a list of locations to obtain CRL information, i.e. the DistributionPoint.fullName described by https://tools.ietf.org/html/rfc5280#section-4.2.1.13", +"items": { +"type": "string" +}, +"type": "array" +}, +"publicKey": { +"$ref": "PublicKey", +"description": "The public key that corresponds to an issued certificate." +}, +"subjectDescription": { +"$ref": "SubjectDescription", +"description": "Describes some of the values in a certificate that are related to the subject and lifetime." +}, +"subjectKeyId": { +"$ref": "KeyId", +"description": "Provides a means of identifiying certificates that contain a particular public key, per https://tools.ietf.org/html/rfc5280#section-4.2.1.2." +}, +"x509Description": { +"$ref": "X509Parameters", +"description": "Describes some of the technical X.509 fields in a certificate." +} +}, +"type": "object" +}, +"CertificateExtensionConstraints": { +"description": "Describes a set of X.509 extensions that may be part of some certificate issuance controls.", +"id": "CertificateExtensionConstraints", +"properties": { +"additionalExtensions": { +"description": "Optional. A set of ObjectIds identifying custom X.509 extensions. Will be combined with known_extensions to determine the full set of X.509 extensions.", +"items": { +"$ref": "ObjectId" +}, +"type": "array" +}, +"knownExtensions": { +"description": "Optional. A set of named X.509 extensions. Will be combined with additional_extensions to determine the full set of X.509 extensions.", +"items": { +"enum": [ +"KNOWN_CERTIFICATE_EXTENSION_UNSPECIFIED", +"BASE_KEY_USAGE", +"EXTENDED_KEY_USAGE", +"CA_OPTIONS", +"POLICY_IDS", +"AIA_OCSP_SERVERS", +"NAME_CONSTRAINTS" +], +"enumDescriptions": [ +"Not specified.", +"Refers to a certificate's Key Usage extension, as described in [RFC 5280 section 4.2.1.3](https://tools.ietf.org/html/rfc5280#section-4.2.1.3). This corresponds to the KeyUsage.base_key_usage field.", +"Refers to a certificate's Extended Key Usage extension, as described in [RFC 5280 section 4.2.1.12](https://tools.ietf.org/html/rfc5280#section-4.2.1.12). This corresponds to the KeyUsage.extended_key_usage message.", +"Refers to a certificate's Basic Constraints extension, as described in [RFC 5280 section 4.2.1.9](https://tools.ietf.org/html/rfc5280#section-4.2.1.9). This corresponds to the X509Parameters.ca_options field.", +"Refers to a certificate's Policy object identifiers, as described in [RFC 5280 section 4.2.1.4](https://tools.ietf.org/html/rfc5280#section-4.2.1.4). This corresponds to the X509Parameters.policy_ids field.", +"Refers to OCSP servers in a certificate's Authority Information Access extension, as described in [RFC 5280 section 4.2.2.1](https://tools.ietf.org/html/rfc5280#section-4.2.2.1), This corresponds to the X509Parameters.aia_ocsp_servers field.", +"Refers to Name Constraints extension as described in [RFC 5280 section 4.2.1.10](https://tools.ietf.org/html/rfc5280#section-4.2.1.10)" +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CertificateFingerprint": { +"description": "A group of fingerprints for the x509 certificate.", +"id": "CertificateFingerprint", +"properties": { +"sha256Hash": { +"description": "The SHA 256 hash, encoded in hexadecimal, of the DER x509 certificate.", +"type": "string" +} +}, +"type": "object" +}, +"CertificateIdentityConstraints": { +"description": "Describes constraints on a Certificate's Subject and SubjectAltNames.", +"id": "CertificateIdentityConstraints", +"properties": { +"allowSubjectAltNamesPassthrough": { +"description": "Required. If this is true, the SubjectAltNames extension may be copied from a certificate request into the signed certificate. Otherwise, the requested SubjectAltNames will be discarded.", +"type": "boolean" +}, +"allowSubjectPassthrough": { +"description": "Required. If this is true, the Subject field may be copied from a certificate request into the signed certificate. Otherwise, the requested Subject will be discarded.", +"type": "boolean" +}, +"celExpression": { +"$ref": "Expr", +"description": "Optional. A CEL expression that may be used to validate the resolved X.509 Subject and/or Subject Alternative Name before a certificate is signed. To see the full allowed syntax and some examples, see https://cloud.google.com/certificate-authority-service/docs/using-cel" +} +}, +"type": "object" +}, +"CertificateRevocationList": { +"description": "A CertificateRevocationList corresponds to a signed X.509 certificate Revocation List (CRL). A CRL contains the serial numbers of certificates that should no longer be trusted.", +"id": "CertificateRevocationList", +"properties": { +"accessUrl": { +"description": "Output only. The location where 'pem_crl' can be accessed.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time at which this CertificateRevocationList was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels with user-defined metadata.", +"type": "object" +}, +"name": { +"description": "Output only. The resource name for this CertificateRevocationList in the format `projects/*/locations/*/caPools/*certificateAuthorities/*/ certificateRevocationLists/*`.", +"readOnly": true, +"type": "string" +}, +"pemCrl": { +"description": "Output only. The PEM-encoded X.509 CRL.", +"readOnly": true, +"type": "string" +}, +"revisionId": { +"description": "Output only. The revision ID of this CertificateRevocationList. A new revision is committed whenever a new CRL is published. The format is an 8-character hexadecimal string.", +"readOnly": true, +"type": "string" +}, +"revokedCertificates": { +"description": "Output only. The revoked serial numbers that appear in pem_crl.", +"items": { +"$ref": "RevokedCertificate" +}, +"readOnly": true, +"type": "array" +}, +"sequenceNumber": { +"description": "Output only. The CRL sequence number that appears in pem_crl.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The State for this CertificateRevocationList.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"SUPERSEDED" +], +"enumDescriptions": [ +"Not specified.", +"The CertificateRevocationList is up to date.", +"The CertificateRevocationList is no longer current." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which this CertificateRevocationList was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CertificateTemplate": { +"description": "A CertificateTemplate refers to a managed template for certificate issuance.", +"id": "CertificateTemplate", +"properties": { +"createTime": { +"description": "Output only. The time at which this CertificateTemplate was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. A human-readable description of scenarios this template is intended for.", +"type": "string" +}, +"identityConstraints": { +"$ref": "CertificateIdentityConstraints", +"description": "Optional. Describes constraints on identities that may be appear in Certificates issued using this template. If this is omitted, then this template will not add restrictions on a certificate's identity." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Labels with user-defined metadata.", +"type": "object" +}, +"maximumLifetime": { +"description": "Optional. The maximum lifetime allowed for issued Certificates that use this template. If the issuing CaPool resource's IssuancePolicy specifies a maximum_lifetime the minimum of the two durations will be the maximum lifetime for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.", +"format": "google-duration", +"type": "string" +}, +"name": { +"description": "Output only. The resource name for this CertificateTemplate in the format `projects/*/locations/*/certificateTemplates/*`.", +"readOnly": true, +"type": "string" +}, +"passthroughExtensions": { +"$ref": "CertificateExtensionConstraints", +"description": "Optional. Describes the set of X.509 extensions that may appear in a Certificate issued using this CertificateTemplate. If a certificate request sets extensions that don't appear in the passthrough_extensions, those extensions will be dropped. If the issuing CaPool's IssuancePolicy defines baseline_values that don't appear here, the certificate issuance request will fail. If this is omitted, then this template will not add restrictions on a certificate's X.509 extensions. These constraints do not apply to X.509 extensions set in this CertificateTemplate's predefined_values." +}, +"predefinedValues": { +"$ref": "X509Parameters", +"description": "Optional. A set of X.509 values that will be applied to all issued certificates that use this template. If the certificate request includes conflicting values for the same properties, they will be overwritten by the values defined here. If the issuing CaPool's IssuancePolicy defines conflicting baseline_values for the same properties, the certificate issuance request will fail." +}, +"updateTime": { +"description": "Output only. The time at which this CertificateTemplate was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"DisableCertificateAuthorityRequest": { +"description": "Request message for CertificateAuthorityService.DisableCertificateAuthority.", +"id": "DisableCertificateAuthorityRequest", +"properties": { +"ignoreDependentResources": { +"description": "Optional. This field allows this CA to be disabled even if it's being depended on by another resource. However, doing so may result in unintended and unrecoverable effects on any dependent resources since the CA will no longer be able to issue certificates.", +"type": "boolean" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"EcKeyType": { +"description": "Describes an Elliptic Curve key that may be used in a Certificate issued from a CaPool.", +"id": "EcKeyType", +"properties": { +"signatureAlgorithm": { +"description": "Optional. A signature algorithm that must be used. If this is omitted, any EC-based signature algorithm will be allowed.", +"enum": [ +"EC_SIGNATURE_ALGORITHM_UNSPECIFIED", +"ECDSA_P256", +"ECDSA_P384", +"EDDSA_25519" +], +"enumDescriptions": [ +"Not specified. Signifies that any signature algorithm may be used.", +"Refers to the Elliptic Curve Digital Signature Algorithm over the NIST P-256 curve.", +"Refers to the Elliptic Curve Digital Signature Algorithm over the NIST P-384 curve.", +"Refers to the Edwards-curve Digital Signature Algorithm over curve 25519, as described in RFC 8410." +], +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnableCertificateAuthorityRequest": { +"description": "Request message for CertificateAuthorityService.EnableCertificateAuthority.", +"id": "EnableCertificateAuthorityRequest", +"properties": { +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ExtendedKeyUsageOptions": { +"description": "KeyUsage.ExtendedKeyUsageOptions has fields that correspond to certain common OIDs that could be specified as an extended key usage value.", +"id": "ExtendedKeyUsageOptions", +"properties": { +"clientAuth": { +"description": "Corresponds to OID 1.3.6.1.5.5.7.3.2. Officially described as \"TLS WWW client authentication\", though regularly used for non-WWW TLS.", +"type": "boolean" +}, +"codeSigning": { +"description": "Corresponds to OID 1.3.6.1.5.5.7.3.3. Officially described as \"Signing of downloadable executable code client authentication\".", +"type": "boolean" +}, +"emailProtection": { +"description": "Corresponds to OID 1.3.6.1.5.5.7.3.4. Officially described as \"Email protection\".", +"type": "boolean" +}, +"ocspSigning": { +"description": "Corresponds to OID 1.3.6.1.5.5.7.3.9. Officially described as \"Signing OCSP responses\".", +"type": "boolean" +}, +"serverAuth": { +"description": "Corresponds to OID 1.3.6.1.5.5.7.3.1. Officially described as \"TLS WWW server authentication\", though regularly used for non-WWW TLS.", +"type": "boolean" +}, +"timeStamping": { +"description": "Corresponds to OID 1.3.6.1.5.5.7.3.8. Officially described as \"Binding the hash of an object to a time\".", +"type": "boolean" +} +}, +"type": "object" +}, +"FetchCaCertsRequest": { +"description": "Request message for CertificateAuthorityService.FetchCaCerts.", +"id": "FetchCaCertsRequest", +"properties": { +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"FetchCaCertsResponse": { +"description": "Response message for CertificateAuthorityService.FetchCaCerts.", +"id": "FetchCaCertsResponse", +"properties": { +"caCerts": { +"description": "The PEM encoded CA certificate chains of all certificate authorities in this CaPool in the ENABLED, DISABLED, or STAGED states.", +"items": { +"$ref": "CertChain" +}, +"type": "array" +} +}, +"type": "object" +}, +"FetchCertificateAuthorityCsrResponse": { +"description": "Response message for CertificateAuthorityService.FetchCertificateAuthorityCsr.", +"id": "FetchCertificateAuthorityCsrResponse", +"properties": { +"pemCsr": { +"description": "Output only. The PEM-encoded signed certificate signing request (CSR).", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"IssuanceModes": { +"description": "IssuanceModes specifies the allowed ways in which Certificates may be requested from this CaPool.", +"id": "IssuanceModes", +"properties": { +"allowConfigBasedIssuance": { +"description": "Optional. When true, allows callers to create Certificates by specifying a CertificateConfig.", +"type": "boolean" +}, +"allowCsrBasedIssuance": { +"description": "Optional. When true, allows callers to create Certificates by specifying a CSR.", +"type": "boolean" +} +}, +"type": "object" +}, +"IssuancePolicy": { +"description": "Defines controls over all certificate issuance within a CaPool.", +"id": "IssuancePolicy", +"properties": { +"allowedIssuanceModes": { +"$ref": "IssuanceModes", +"description": "Optional. If specified, then only methods allowed in the IssuanceModes may be used to issue Certificates." +}, +"allowedKeyTypes": { +"description": "Optional. If any AllowedKeyType is specified, then the certificate request's public key must match one of the key types listed here. Otherwise, any key may be used.", +"items": { +"$ref": "AllowedKeyType" +}, +"type": "array" +}, +"baselineValues": { +"$ref": "X509Parameters", +"description": "Optional. A set of X.509 values that will be applied to all certificates issued through this CaPool. If a certificate request includes conflicting values for the same properties, they will be overwritten by the values defined here. If a certificate request uses a CertificateTemplate that defines conflicting predefined_values for the same properties, the certificate issuance request will fail." +}, +"identityConstraints": { +"$ref": "CertificateIdentityConstraints", +"description": "Optional. Describes constraints on identities that may appear in Certificates issued through this CaPool. If this is omitted, then this CaPool will not add restrictions on a certificate's identity." +}, +"maximumLifetime": { +"description": "Optional. The maximum lifetime allowed for issued Certificates. Note that if the issuing CertificateAuthority expires before a Certificate resource's requested maximum_lifetime, the effective lifetime will be explicitly truncated to match it.", +"format": "google-duration", +"type": "string" +}, +"passthroughExtensions": { +"$ref": "CertificateExtensionConstraints", +"description": "Optional. Describes the set of X.509 extensions that may appear in a Certificate issued through this CaPool. If a certificate request sets extensions that don't appear in the passthrough_extensions, those extensions will be dropped. If a certificate request uses a CertificateTemplate with predefined_values that don't appear here, the certificate issuance request will fail. If this is omitted, then this CaPool will not add restrictions on a certificate's X.509 extensions. These constraints do not apply to X.509 extensions set in this CaPool's baseline_values." +} +}, +"type": "object" +}, +"KeyId": { +"description": "A KeyId identifies a specific public key, usually by hashing the public key.", +"id": "KeyId", +"properties": { +"keyId": { +"description": "Optional. The value of this KeyId encoded in lowercase hexadecimal. This is most likely the 160 bit SHA-1 hash of the public key.", +"type": "string" +} +}, +"type": "object" +}, +"KeyUsage": { +"description": "A KeyUsage describes key usage values that may appear in an X.509 certificate.", +"id": "KeyUsage", +"properties": { +"baseKeyUsage": { +"$ref": "KeyUsageOptions", +"description": "Describes high-level ways in which a key may be used." +}, +"extendedKeyUsage": { +"$ref": "ExtendedKeyUsageOptions", +"description": "Detailed scenarios in which a key may be used." +}, +"unknownExtendedKeyUsages": { +"description": "Used to describe extended key usages that are not listed in the KeyUsage.ExtendedKeyUsageOptions message.", +"items": { +"$ref": "ObjectId" +}, +"type": "array" +} +}, +"type": "object" +}, +"KeyUsageOptions": { +"description": "KeyUsage.KeyUsageOptions corresponds to the key usage values described in https://tools.ietf.org/html/rfc5280#section-4.2.1.3.", +"id": "KeyUsageOptions", +"properties": { +"certSign": { +"description": "The key may be used to sign certificates.", +"type": "boolean" +}, +"contentCommitment": { +"description": "The key may be used for cryptographic commitments. Note that this may also be referred to as \"non-repudiation\".", +"type": "boolean" +}, +"crlSign": { +"description": "The key may be used sign certificate revocation lists.", +"type": "boolean" +}, +"dataEncipherment": { +"description": "The key may be used to encipher data.", +"type": "boolean" +}, +"decipherOnly": { +"description": "The key may be used to decipher only.", +"type": "boolean" +}, +"digitalSignature": { +"description": "The key may be used for digital signatures.", +"type": "boolean" +}, +"encipherOnly": { +"description": "The key may be used to encipher only.", +"type": "boolean" +}, +"keyAgreement": { +"description": "The key may be used in a key agreement protocol.", +"type": "boolean" +}, +"keyEncipherment": { +"description": "The key may be used to encipher other keys.", +"type": "boolean" +} +}, +"type": "object" +}, +"KeyVersionSpec": { +"description": "A Cloud KMS key configuration that a CertificateAuthority will use.", +"id": "KeyVersionSpec", +"properties": { +"algorithm": { +"description": "The algorithm to use for creating a managed Cloud KMS key for a for a simplified experience. All managed keys will be have their ProtectionLevel as `HSM`.", +"enum": [ +"SIGN_HASH_ALGORITHM_UNSPECIFIED", +"RSA_PSS_2048_SHA256", +"RSA_PSS_3072_SHA256", +"RSA_PSS_4096_SHA256", +"RSA_PKCS1_2048_SHA256", +"RSA_PKCS1_3072_SHA256", +"RSA_PKCS1_4096_SHA256", +"EC_P256_SHA256", +"EC_P384_SHA384" +], +"enumDescriptions": [ +"Not specified.", +"maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256", +"maps to CryptoKeyVersionAlgorithm. RSA_SIGN_PSS_3072_SHA256", +"maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_4096_SHA256", +"maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_2048_SHA256", +"maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_3072_SHA256", +"maps to CryptoKeyVersionAlgorithm.RSA_SIGN_PKCS1_4096_SHA256", +"maps to CryptoKeyVersionAlgorithm.EC_SIGN_P256_SHA256", +"maps to CryptoKeyVersionAlgorithm.EC_SIGN_P384_SHA384" +], +"type": "string" +}, +"cloudKmsKeyVersion": { +"description": "The resource name for an existing Cloud KMS CryptoKeyVersion in the format `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`. This option enables full flexibility in the key's capabilities and properties.", +"type": "string" +} +}, +"type": "object" +}, +"ListCaPoolsResponse": { +"description": "Response message for CertificateAuthorityService.ListCaPools.", +"id": "ListCaPoolsResponse", +"properties": { +"caPools": { +"description": "The list of CaPools.", +"items": { +"$ref": "CaPool" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this value in ListCertificateAuthoritiesRequest.next_page_token to retrieve the next page of results.", +"type": "string" +}, +"unreachable": { +"description": "A list of locations (e.g. \"us-west1\") that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListCertificateAuthoritiesResponse": { +"description": "Response message for CertificateAuthorityService.ListCertificateAuthorities.", +"id": "ListCertificateAuthoritiesResponse", +"properties": { +"certificateAuthorities": { +"description": "The list of CertificateAuthorities.", +"items": { +"$ref": "CertificateAuthority" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this value in ListCertificateAuthoritiesRequest.next_page_token to retrieve the next page of results.", +"type": "string" +}, +"unreachable": { +"description": "A list of locations (e.g. \"us-west1\") that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListCertificateRevocationListsResponse": { +"description": "Response message for CertificateAuthorityService.ListCertificateRevocationLists.", +"id": "ListCertificateRevocationListsResponse", +"properties": { +"certificateRevocationLists": { +"description": "The list of CertificateRevocationLists.", +"items": { +"$ref": "CertificateRevocationList" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this value in ListCertificateRevocationListsRequest.next_page_token to retrieve the next page of results.", +"type": "string" +}, +"unreachable": { +"description": "A list of locations (e.g. \"us-west1\") that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListCertificateTemplatesResponse": { +"description": "Response message for CertificateAuthorityService.ListCertificateTemplates.", +"id": "ListCertificateTemplatesResponse", +"properties": { +"certificateTemplates": { +"description": "The list of CertificateTemplates.", +"items": { +"$ref": "CertificateTemplate" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this value in ListCertificateTemplatesRequest.next_page_token to retrieve the next page of results.", +"type": "string" +}, +"unreachable": { +"description": "A list of locations (e.g. \"us-west1\") that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListCertificatesResponse": { +"description": "Response message for CertificateAuthorityService.ListCertificates.", +"id": "ListCertificatesResponse", +"properties": { +"certificates": { +"description": "The list of Certificates.", +"items": { +"$ref": "Certificate" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this value in ListCertificatesRequest.next_page_token to retrieve the next page of results.", +"type": "string" +}, +"unreachable": { +"description": "A list of locations (e.g. \"us-west1\") that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"NameConstraints": { +"description": "Describes the X.509 name constraints extension, per https://tools.ietf.org/html/rfc5280#section-4.2.1.10", +"id": "NameConstraints", +"properties": { +"critical": { +"description": "Indicates whether or not the name constraints are marked critical.", +"type": "boolean" +}, +"excludedDnsNames": { +"description": "Contains excluded DNS names. Any DNS name that can be constructed by simply adding zero or more labels to the left-hand side of the name satisfies the name constraint. For example, `example.com`, `www.example.com`, `www.sub.example.com` would satisfy `example.com` while `example1.com` does not.", +"items": { +"type": "string" +}, +"type": "array" +}, +"excludedEmailAddresses": { +"description": "Contains the excluded email addresses. The value can be a particular email address, a hostname to indicate all email addresses on that host or a domain with a leading period (e.g. `.example.com`) to indicate all email addresses in that domain.", +"items": { +"type": "string" +}, +"type": "array" +}, +"excludedIpRanges": { +"description": "Contains the excluded IP ranges. For IPv4 addresses, the ranges are expressed using CIDR notation as specified in RFC 4632. For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 addresses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"excludedUris": { +"description": "Contains the excluded URIs that apply to the host part of the name. The value can be a hostname or a domain with a leading period (like `.example.com`)", +"items": { +"type": "string" +}, +"type": "array" +}, +"permittedDnsNames": { +"description": "Contains permitted DNS names. Any DNS name that can be constructed by simply adding zero or more labels to the left-hand side of the name satisfies the name constraint. For example, `example.com`, `www.example.com`, `www.sub.example.com` would satisfy `example.com` while `example1.com` does not.", +"items": { +"type": "string" +}, +"type": "array" +}, +"permittedEmailAddresses": { +"description": "Contains the permitted email addresses. The value can be a particular email address, a hostname to indicate all email addresses on that host or a domain with a leading period (e.g. `.example.com`) to indicate all email addresses in that domain.", +"items": { +"type": "string" +}, +"type": "array" +}, +"permittedIpRanges": { +"description": "Contains the permitted IP ranges. For IPv4 addresses, the ranges are expressed using CIDR notation as specified in RFC 4632. For IPv6 addresses, the ranges are expressed in similar encoding as IPv4 addresses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"permittedUris": { +"description": "Contains the permitted URIs that apply to the host part of the name. The value can be a hostname or a domain with a leading period (like `.example.com`)", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ObjectId": { +"description": "An ObjectId specifies an object identifier (OID). These provide context and describe types in ASN.1 messages.", +"id": "ObjectId", +"properties": { +"objectIdPath": { +"description": "Required. The parts of an OID path. The most significant parts of the path come first.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PublicKey": { +"description": "A PublicKey describes a public key.", +"id": "PublicKey", +"properties": { +"format": { +"description": "Required. The format of the public key.", +"enum": [ +"KEY_FORMAT_UNSPECIFIED", +"PEM" +], +"enumDescriptions": [ +"Default unspecified value.", +"The key is PEM-encoded as defined in [RFC 7468](https://tools.ietf.org/html/rfc7468). It can be any of the following: a PEM-encoded PKCS#1/RFC 3447 RSAPublicKey structure, an RFC 5280 [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) or a PEM-encoded X.509 certificate signing request (CSR). If a [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) is specified, it can contain a A PEM-encoded PKCS#1/RFC 3447 RSAPublicKey or a NIST P-256/secp256r1/prime256v1 or P-384 key. If a CSR is specified, it will used solely for the purpose of extracting the public key. When generated by the service, it will always be an RFC 5280 [SubjectPublicKeyInfo](https://tools.ietf.org/html/rfc5280#section-4.1) structure containing an algorithm identifier and a key." +], +"type": "string" +}, +"key": { +"description": "Required. A public key. The padding and encoding must match with the `KeyFormat` value specified for the `format` field.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"PublishingOptions": { +"description": "Options relating to the publication of each CertificateAuthority's CA certificate and CRLs and their inclusion as extensions in issued Certificates. The options set here apply to certificates issued by any CertificateAuthority in the CaPool.", +"id": "PublishingOptions", +"properties": { +"encodingFormat": { +"description": "Optional. Specifies the encoding format of each CertificateAuthority resource's CA certificate and CRLs. If this is omitted, CA certificates and CRLs will be published in PEM.", +"enum": [ +"ENCODING_FORMAT_UNSPECIFIED", +"PEM", +"DER" +], +"enumDescriptions": [ +"Not specified. By default, PEM format will be used.", +"The CertificateAuthority's CA certificate and CRLs will be published in PEM format.", +"The CertificateAuthority's CA certificate and CRLs will be published in DER format." +], +"type": "string" +}, +"publishCaCert": { +"description": "Optional. When true, publishes each CertificateAuthority's CA certificate and includes its URL in the \"Authority Information Access\" X.509 extension in all issued Certificates. If this is false, the CA certificate will not be published and the corresponding X.509 extension will not be written in issued certificates.", +"type": "boolean" +}, +"publishCrl": { +"description": "Optional. When true, publishes each CertificateAuthority's CRL and includes its URL in the \"CRL Distribution Points\" X.509 extension in all issued Certificates. If this is false, CRLs will not be published and the corresponding X.509 extension will not be written in issued certificates. CRLs will expire 7 days from their creation. However, we will rebuild daily. CRLs are also rebuilt shortly after a certificate is revoked.", +"type": "boolean" +} +}, +"type": "object" +}, +"ReconciliationOperationMetadata": { +"description": "Operation metadata returned by the CLH during resource state reconciliation.", +"id": "ReconciliationOperationMetadata", +"properties": { +"deleteResource": { +"deprecated": true, +"description": "DEPRECATED. Use exclusive_action instead.", +"type": "boolean" +}, +"exclusiveAction": { +"description": "Excluisive action returned by the CLH.", +"enum": [ +"UNKNOWN_REPAIR_ACTION", +"DELETE", +"RETRY" +], +"enumDeprecated": [ +false, +true, +false +], +"enumDescriptions": [ +"Unknown repair action.", +"The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", +"This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." +], +"type": "string" +} +}, +"type": "object" +}, +"RevocationDetails": { +"description": "Describes fields that are relavent to the revocation of a Certificate.", +"id": "RevocationDetails", +"properties": { +"revocationState": { +"description": "Indicates why a Certificate was revoked.", +"enum": [ +"REVOCATION_REASON_UNSPECIFIED", +"KEY_COMPROMISE", +"CERTIFICATE_AUTHORITY_COMPROMISE", +"AFFILIATION_CHANGED", +"SUPERSEDED", +"CESSATION_OF_OPERATION", +"CERTIFICATE_HOLD", +"PRIVILEGE_WITHDRAWN", +"ATTRIBUTE_AUTHORITY_COMPROMISE" +], +"enumDescriptions": [ +"Default unspecified value. This value does indicate that a Certificate has been revoked, but that a reason has not been recorded.", +"Key material for this Certificate may have leaked.", +"The key material for a certificate authority in the issuing path may have leaked.", +"The subject or other attributes in this Certificate have changed.", +"This Certificate has been superseded.", +"This Certificate or entities in the issuing path have ceased to operate.", +"This Certificate should not be considered valid, it is expected that it may become valid in the future.", +"This Certificate no longer has permission to assert the listed attributes.", +"The authority which determines appropriate attributes for a Certificate may have been compromised." +], +"type": "string" +}, +"revocationTime": { +"description": "The time at which this Certificate was revoked.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RevokeCertificateRequest": { +"description": "Request message for CertificateAuthorityService.RevokeCertificate.", +"id": "RevokeCertificateRequest", +"properties": { +"reason": { +"description": "Required. The RevocationReason for revoking this certificate.", +"enum": [ +"REVOCATION_REASON_UNSPECIFIED", +"KEY_COMPROMISE", +"CERTIFICATE_AUTHORITY_COMPROMISE", +"AFFILIATION_CHANGED", +"SUPERSEDED", +"CESSATION_OF_OPERATION", +"CERTIFICATE_HOLD", +"PRIVILEGE_WITHDRAWN", +"ATTRIBUTE_AUTHORITY_COMPROMISE" +], +"enumDescriptions": [ +"Default unspecified value. This value does indicate that a Certificate has been revoked, but that a reason has not been recorded.", +"Key material for this Certificate may have leaked.", +"The key material for a certificate authority in the issuing path may have leaked.", +"The subject or other attributes in this Certificate have changed.", +"This Certificate has been superseded.", +"This Certificate or entities in the issuing path have ceased to operate.", +"This Certificate should not be considered valid, it is expected that it may become valid in the future.", +"This Certificate no longer has permission to assert the listed attributes.", +"The authority which determines appropriate attributes for a Certificate may have been compromised." +], +"type": "string" +}, +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"RevokedCertificate": { +"description": "Describes a revoked Certificate.", +"id": "RevokedCertificate", +"properties": { +"certificate": { +"description": "The resource name for the Certificate in the format `projects/*/locations/*/caPools/*/certificates/*`.", +"type": "string" +}, +"hexSerialNumber": { +"description": "The serial number of the Certificate.", +"type": "string" +}, +"revocationReason": { +"description": "The reason the Certificate was revoked.", +"enum": [ +"REVOCATION_REASON_UNSPECIFIED", +"KEY_COMPROMISE", +"CERTIFICATE_AUTHORITY_COMPROMISE", +"AFFILIATION_CHANGED", +"SUPERSEDED", +"CESSATION_OF_OPERATION", +"CERTIFICATE_HOLD", +"PRIVILEGE_WITHDRAWN", +"ATTRIBUTE_AUTHORITY_COMPROMISE" +], +"enumDescriptions": [ +"Default unspecified value. This value does indicate that a Certificate has been revoked, but that a reason has not been recorded.", +"Key material for this Certificate may have leaked.", +"The key material for a certificate authority in the issuing path may have leaked.", +"The subject or other attributes in this Certificate have changed.", +"This Certificate has been superseded.", +"This Certificate or entities in the issuing path have ceased to operate.", +"This Certificate should not be considered valid, it is expected that it may become valid in the future.", +"This Certificate no longer has permission to assert the listed attributes.", +"The authority which determines appropriate attributes for a Certificate may have been compromised." +], +"type": "string" +} +}, +"type": "object" +}, +"RsaKeyType": { +"description": "Describes an RSA key that may be used in a Certificate issued from a CaPool.", +"id": "RsaKeyType", +"properties": { +"maxModulusSize": { +"description": "Optional. The maximum allowed RSA modulus size (inclusive), in bits. If this is not set, or if set to zero, the service will not enforce an explicit upper bound on RSA modulus sizes.", +"format": "int64", +"type": "string" +}, +"minModulusSize": { +"description": "Optional. The minimum allowed RSA modulus size (inclusive), in bits. If this is not set, or if set to zero, the service-level min RSA modulus size will continue to apply.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subject": { +"description": "Subject describes parts of a distinguished name that, in turn, describes the subject of the certificate.", +"id": "Subject", +"properties": { +"commonName": { +"description": "The \"common name\" of the subject.", +"type": "string" +}, +"countryCode": { +"description": "The country code of the subject.", +"type": "string" +}, +"locality": { +"description": "The locality or city of the subject.", +"type": "string" +}, +"organization": { +"description": "The organization of the subject.", +"type": "string" +}, +"organizationalUnit": { +"description": "The organizational_unit of the subject.", +"type": "string" +}, +"postalCode": { +"description": "The postal code of the subject.", +"type": "string" +}, +"province": { +"description": "The province, territory, or regional state of the subject.", +"type": "string" +}, +"streetAddress": { +"description": "The street address of the subject.", +"type": "string" +} +}, +"type": "object" +}, +"SubjectAltNames": { +"description": "SubjectAltNames corresponds to a more modern way of listing what the asserted identity is in a certificate (i.e., compared to the \"common name\" in the distinguished name).", +"id": "SubjectAltNames", +"properties": { +"customSans": { +"description": "Contains additional subject alternative name values. For each custom_san, the `value` field must contain an ASN.1 encoded UTF8String.", +"items": { +"$ref": "X509Extension" +}, +"type": "array" +}, +"dnsNames": { +"description": "Contains only valid, fully-qualified host names.", +"items": { +"type": "string" +}, +"type": "array" +}, +"emailAddresses": { +"description": "Contains only valid RFC 2822 E-mail addresses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipAddresses": { +"description": "Contains only valid 32-bit IPv4 addresses or RFC 4291 IPv6 addresses.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uris": { +"description": "Contains only valid RFC 3986 URIs.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SubjectConfig": { +"description": "These values are used to create the distinguished name and subject alternative name fields in an X.509 certificate.", +"id": "SubjectConfig", +"properties": { +"subject": { +"$ref": "Subject", +"description": "Optional. Contains distinguished name fields such as the common name, location and organization." +}, +"subjectAltName": { +"$ref": "SubjectAltNames", +"description": "Optional. The subject alternative name fields." +} +}, +"type": "object" +}, +"SubjectDescription": { +"description": "These values describe fields in an issued X.509 certificate such as the distinguished name, subject alternative names, serial number, and lifetime.", +"id": "SubjectDescription", +"properties": { +"hexSerialNumber": { +"description": "The serial number encoded in lowercase hexadecimal.", +"type": "string" +}, +"lifetime": { +"description": "For convenience, the actual lifetime of an issued certificate.", +"format": "google-duration", +"type": "string" +}, +"notAfterTime": { +"description": "The time after which the certificate is expired. Per RFC 5280, the validity period for a certificate is the period of time from not_before_time through not_after_time, inclusive. Corresponds to 'not_before_time' + 'lifetime' - 1 second.", +"format": "google-datetime", +"type": "string" +}, +"notBeforeTime": { +"description": "The time at which the certificate becomes valid.", +"format": "google-datetime", +"type": "string" +}, +"subject": { +"$ref": "Subject", +"description": "Contains distinguished name fields such as the common name, location and / organization." +}, +"subjectAltName": { +"$ref": "SubjectAltNames", +"description": "The subject alternative name fields." +} +}, +"type": "object" +}, +"SubordinateConfig": { +"description": "Describes a subordinate CA's issuers. This is either a resource name to a known issuing CertificateAuthority, or a PEM issuer certificate chain.", +"id": "SubordinateConfig", +"properties": { +"certificateAuthority": { +"description": "Required. This can refer to a CertificateAuthority that was used to create a subordinate CertificateAuthority. This field is used for information and usability purposes only. The resource name is in the format `projects/*/locations/*/caPools/*/certificateAuthorities/*`.", +"type": "string" +}, +"pemIssuerChain": { +"$ref": "SubordinateConfigChain", +"description": "Required. Contains the PEM certificate chain for the issuers of this CertificateAuthority, but not pem certificate for this CA itself." +} +}, +"type": "object" +}, +"SubordinateConfigChain": { +"description": "This message describes a subordinate CA's issuer certificate chain. This wrapper exists for compatibility reasons.", +"id": "SubordinateConfigChain", +"properties": { +"pemCertificates": { +"description": "Required. Expected to be in leaf-to-root order according to RFC 5246.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UndeleteCertificateAuthorityRequest": { +"description": "Request message for CertificateAuthorityService.UndeleteCertificateAuthority.", +"id": "UndeleteCertificateAuthorityRequest", +"properties": { +"requestId": { +"description": "Optional. An ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"X509Extension": { +"description": "An X509Extension specifies an X.509 extension, which may be used in different parts of X.509 objects like certificates, CSRs, and CRLs.", +"id": "X509Extension", +"properties": { +"critical": { +"description": "Optional. Indicates whether or not this extension is critical (i.e., if the client does not know how to handle this extension, the client should consider this to be an error).", +"type": "boolean" +}, +"objectId": { +"$ref": "ObjectId", +"description": "Required. The OID for this X.509 extension." +}, +"value": { +"description": "Required. The value of this X.509 extension.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"X509Parameters": { +"description": "An X509Parameters is used to describe certain fields of an X.509 certificate, such as the key usage fields, fields specific to CA certificates, certificate policy extensions and custom extensions.", +"id": "X509Parameters", +"properties": { +"additionalExtensions": { +"description": "Optional. Describes custom X.509 extensions.", +"items": { +"$ref": "X509Extension" +}, +"type": "array" +}, +"aiaOcspServers": { +"description": "Optional. Describes Online Certificate Status Protocol (OCSP) endpoint addresses that appear in the \"Authority Information Access\" extension in the certificate.", +"items": { +"type": "string" +}, +"type": "array" +}, +"caOptions": { +"$ref": "CaOptions", +"description": "Optional. Describes options in this X509Parameters that are relevant in a CA certificate." +}, +"keyUsage": { +"$ref": "KeyUsage", +"description": "Optional. Indicates the intended use for keys that correspond to a certificate." +}, +"nameConstraints": { +"$ref": "NameConstraints", +"description": "Optional. Describes the X.509 name constraints extension." +}, +"policyIds": { +"description": "Optional. Describes the X.509 certificate policy object identifiers, per https://tools.ietf.org/html/rfc5280#section-4.2.1.4.", +"items": { +"$ref": "ObjectId" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Certificate Authority API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/privateca.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/privateca.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..95e96dc99ac93d9288660631baef7d74ccf05ff7 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/privateca.v1beta1.json @@ -0,0 +1,934 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://privateca.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Certificate Authority Service", +"description": "The Certificate Authority Service API is a highly-available, scalable service that enables you to simplify and automate the management of private certificate authorities (CAs) while staying in control of your private keys. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "privateca:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://privateca.mtls.googleapis.com/", +"name": "privateca", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "privateca.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"certificateAuthorities": { +"methods": { +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:getIamPolicy", +"httpMethod": "GET", +"id": "privateca.projects.locations.certificateAuthorities.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:setIamPolicy", +"httpMethod": "POST", +"id": "privateca.projects.locations.certificateAuthorities.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}:testIamPermissions", +"httpMethod": "POST", +"id": "privateca.projects.locations.certificateAuthorities.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"certificateRevocationLists": { +"methods": { +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:getIamPolicy", +"httpMethod": "GET", +"id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:setIamPolicy", +"httpMethod": "POST", +"id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/certificateAuthorities/{certificateAuthoritiesId}/certificateRevocationLists/{certificateRevocationListsId}:testIamPermissions", +"httpMethod": "POST", +"id": "privateca.projects.locations.certificateAuthorities.certificateRevocationLists.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/certificateAuthorities/[^/]+/certificateRevocationLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "privateca.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "privateca.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "privateca.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "privateca.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"reusableConfigs": { +"methods": { +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs/{reusableConfigsId}:getIamPolicy", +"httpMethod": "GET", +"id": "privateca.projects.locations.reusableConfigs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs/{reusableConfigsId}:setIamPolicy", +"httpMethod": "POST", +"id": "privateca.projects.locations.reusableConfigs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/reusableConfigs/{reusableConfigsId}:testIamPermissions", +"httpMethod": "POST", +"id": "privateca.projects.locations.reusableConfigs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/reusableConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://privateca.googleapis.com/", +"schemas": { +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ReconciliationOperationMetadata": { +"description": "Operation metadata returned by the CLH during resource state reconciliation.", +"id": "ReconciliationOperationMetadata", +"properties": { +"deleteResource": { +"deprecated": true, +"description": "DEPRECATED. Use exclusive_action instead.", +"type": "boolean" +}, +"exclusiveAction": { +"description": "Excluisive action returned by the CLH.", +"enum": [ +"UNKNOWN_REPAIR_ACTION", +"DELETE", +"RETRY" +], +"enumDeprecated": [ +false, +true, +false +], +"enumDescriptions": [ +"Unknown repair action.", +"The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", +"This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." +], +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Certificate Authority API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/prod_tt_sasportal.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/prod_tt_sasportal.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..82c17b8acc7f129387a91e3c6ff050591db8a9c8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/prod_tt_sasportal.v1alpha1.json @@ -0,0 +1,3772 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/sasportal": { +"description": "Read, create, update, and delete your SAS Portal data." +} +} +} +}, +"basePath": "", +"baseUrl": "https://prod-tt-sasportal.googleapis.com/", +"batchPath": "batch", +"canonicalName": "SAS Portal Testing", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/spectrum-access-system/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "prod_tt_sasportal:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://prod-tt-sasportal.mtls.googleapis.com/", +"name": "prod_tt_sasportal", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"customers": { +"methods": { +"get": { +"description": "Returns a requested customer.", +"flatPath": "v1alpha1/customers/{customersId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the customer.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalCustomer" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Returns a list of requested customers.", +"flatPath": "v1alpha1/customers", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of customers to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListCustomers that indicates where this listing should continue from.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/customers", +"response": { +"$ref": "SasPortalListCustomersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"listGcpProjectDeployments": { +"description": "Returns a list of SAS deployments associated with current GCP project. Includes whether SAS analytics has been enabled or not.", +"flatPath": "v1alpha1/customers:listGcpProjectDeployments", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.listGcpProjectDeployments", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:listGcpProjectDeployments", +"response": { +"$ref": "SasPortalListGcpProjectDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"listLegacyOrganizations": { +"description": "Returns a list of legacy organizations.", +"flatPath": "v1alpha1/customers:listLegacyOrganizations", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.listLegacyOrganizations", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:listLegacyOrganizations", +"response": { +"$ref": "SasPortalListLegacyOrganizationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"migrateOrganization": { +"description": "Migrates a SAS organization to the cloud. This will create GCP projects for each deployment and associate them. The SAS Organization is linked to the gcp project that called the command. go/sas-legacy-customer-migration", +"flatPath": "v1alpha1/customers:migrateOrganization", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.migrateOrganization", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:migrateOrganization", +"request": { +"$ref": "SasPortalMigrateOrganizationRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing customer.", +"flatPath": "v1alpha1/customers/{customersId}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.customers.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name of the customer.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalCustomer" +}, +"response": { +"$ref": "SasPortalCustomer" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"provisionDeployment": { +"description": "Creates a new SAS deployment through the GCP workflow. Creates a SAS organization if an organization match is not found.", +"flatPath": "v1alpha1/customers:provisionDeployment", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.provisionDeployment", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:provisionDeployment", +"request": { +"$ref": "SasPortalProvisionDeploymentRequest" +}, +"response": { +"$ref": "SasPortalProvisionDeploymentResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"setupSasAnalytics": { +"description": "Setups the a GCP Project to receive SAS Analytics messages via GCP Pub/Sub with a subscription to BigQuery. All the Pub/Sub topics and BigQuery tables are created automatically as part of this service.", +"flatPath": "v1alpha1/customers:setupSasAnalytics", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.setupSasAnalytics", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:setupSasAnalytics", +"request": { +"$ref": "SasPortalSetupSasAnalyticsRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"create": { +"description": "Creates a new deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.deployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the deployment is to be created.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}", +"httpMethod": "DELETE", +"id": "prod_tt_sasportal.customers.deployments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.deployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/customers/{customersId}/deployments", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a deployment under another node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}:move", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.deployments.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment to move.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeploymentRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.customers.deployments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}/devices", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.deployments.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}/devices:createSigned", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.deployments.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}/devices", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.deployments.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices:createSigned", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}", +"httpMethod": "DELETE", +"id": "prod_tt_sasportal.customers.devices.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Gets details about a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.devices.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a device under another node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}:move", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.devices.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to move.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeviceRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.customers.devices.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"signDevice": { +"description": "Signs a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}:signDevice", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.devices.signDevice", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:signDevice", +"request": { +"$ref": "SasPortalSignDeviceRequest" +}, +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"updateSigned": { +"description": "Updates a signed device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}:updateSigned", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.customers.devices.updateSigned", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to update.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:updateSigned", +"request": { +"$ref": "SasPortalUpdateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}", +"httpMethod": "DELETE", +"id": "prod_tt_sasportal.customers.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/customers/{customersId}/nodes", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a node under another node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}:move", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.nodes.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node to move.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveNodeRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.customers.nodes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"create": { +"description": "Creates a new deployment.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/deployments", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.nodes.deployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the deployment is to be created.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/deployments", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.nodes.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/devices", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.nodes.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/devices:createSigned", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.nodes.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/devices", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.nodes.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/nodes", +"httpMethod": "POST", +"id": "prod_tt_sasportal.customers.nodes.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/nodes", +"httpMethod": "GET", +"id": "prod_tt_sasportal.customers.nodes.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +} +} +}, +"deployments": { +"methods": { +"get": { +"description": "Returns a requested deployment.", +"flatPath": "v1alpha1/deployments/{deploymentsId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.deployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"devices": { +"methods": { +"delete": { +"description": "Deletes a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}", +"httpMethod": "DELETE", +"id": "prod_tt_sasportal.deployments.devices.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Gets details about a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.deployments.devices.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a device under another node or customer.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}:move", +"httpMethod": "POST", +"id": "prod_tt_sasportal.deployments.devices.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to move.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeviceRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.deployments.devices.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"signDevice": { +"description": "Signs a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}:signDevice", +"httpMethod": "POST", +"id": "prod_tt_sasportal.deployments.devices.signDevice", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:signDevice", +"request": { +"$ref": "SasPortalSignDeviceRequest" +}, +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"updateSigned": { +"description": "Updates a signed device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}:updateSigned", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.deployments.devices.updateSigned", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to update.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:updateSigned", +"request": { +"$ref": "SasPortalUpdateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +}, +"installer": { +"methods": { +"generateSecret": { +"description": "Generates a secret to be used with the ValidateInstaller.", +"flatPath": "v1alpha1/installer:generateSecret", +"httpMethod": "POST", +"id": "prod_tt_sasportal.installer.generateSecret", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/installer:generateSecret", +"request": { +"$ref": "SasPortalGenerateSecretRequest" +}, +"response": { +"$ref": "SasPortalGenerateSecretResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"validate": { +"description": "Validates the identity of a Certified Professional Installer (CPI).", +"flatPath": "v1alpha1/installer:validate", +"httpMethod": "POST", +"id": "prod_tt_sasportal.installer.validate", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/installer:validate", +"request": { +"$ref": "SasPortalValidateInstallerRequest" +}, +"response": { +"$ref": "SasPortalValidateInstallerResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"get": { +"description": "Returns a requested node.", +"flatPath": "v1alpha1/nodes/{nodesId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"delete": { +"description": "Deletes a deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}", +"httpMethod": "DELETE", +"id": "prod_tt_sasportal.nodes.deployments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.deployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a deployment under another node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}:move", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.deployments.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment to move.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeploymentRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.nodes.deployments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}/devices", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.deployments.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}/devices:createSigned", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.deployments.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}/devices", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.deployments.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices:createSigned", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}", +"httpMethod": "DELETE", +"id": "prod_tt_sasportal.nodes.devices.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Gets details about a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.devices.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a device under another node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}:move", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.devices.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to move.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeviceRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.nodes.devices.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"signDevice": { +"description": "Signs a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}:signDevice", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.devices.signDevice", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:signDevice", +"request": { +"$ref": "SasPortalSignDeviceRequest" +}, +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"updateSigned": { +"description": "Updates a signed device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}:updateSigned", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.nodes.devices.updateSigned", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to update.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:updateSigned", +"request": { +"$ref": "SasPortalUpdateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}", +"httpMethod": "DELETE", +"id": "prod_tt_sasportal.nodes.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a node under another node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}:move", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.nodes.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node to move.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveNodeRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}", +"httpMethod": "PATCH", +"id": "prod_tt_sasportal.nodes.nodes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"create": { +"description": "Creates a new deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/deployments", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.nodes.deployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the deployment is to be created.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/deployments", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.nodes.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/devices", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.nodes.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/devices:createSigned", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.nodes.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/devices", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.nodes.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/nodes", +"httpMethod": "POST", +"id": "prod_tt_sasportal.nodes.nodes.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/nodes", +"httpMethod": "GET", +"id": "prod_tt_sasportal.nodes.nodes.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +} +} +}, +"policies": { +"methods": { +"get": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1alpha1/policies:get", +"httpMethod": "POST", +"id": "prod_tt_sasportal.policies.get", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/policies:get", +"request": { +"$ref": "SasPortalGetPolicyRequest" +}, +"response": { +"$ref": "SasPortalPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"set": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy.", +"flatPath": "v1alpha1/policies:set", +"httpMethod": "POST", +"id": "prod_tt_sasportal.policies.set", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/policies:set", +"request": { +"$ref": "SasPortalSetPolicyRequest" +}, +"response": { +"$ref": "SasPortalPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"test": { +"description": "Returns permissions that a caller has on the specified resource.", +"flatPath": "v1alpha1/policies:test", +"httpMethod": "POST", +"id": "prod_tt_sasportal.policies.test", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/policies:test", +"request": { +"$ref": "SasPortalTestPermissionsRequest" +}, +"response": { +"$ref": "SasPortalTestPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://prod-tt-sasportal.googleapis.com/", +"schemas": { +"SasPortalAssignment": { +"description": "Associates `members` with a `role`.", +"id": "SasPortalAssignment", +"properties": { +"members": { +"description": "The identities the role is assigned to. It can have the following values: * `{user_email}`: An email address that represents a specific Google account. For example: `alice@gmail.com`. * `{group_email}`: An email address that represents a Google group. For example, `viewers@gmail.com`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Required. Role that is assigned to `members`.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalChannelWithScore": { +"description": "The channel with score.", +"id": "SasPortalChannelWithScore", +"properties": { +"frequencyRange": { +"$ref": "SasPortalFrequencyRange", +"description": "The frequency range of the channel." +}, +"score": { +"description": "The channel score, normalized to be in the range [0,100].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"SasPortalCreateSignedDeviceRequest": { +"description": "Request for CreateSignedDevice.", +"id": "SasPortalCreateSignedDeviceRequest", +"properties": { +"encodedDevice": { +"description": "Required. JSON Web Token signed using a CPI private key. Payload must be the JSON encoding of the device. The user_id field must be set.", +"format": "byte", +"type": "string" +}, +"installerId": { +"description": "Required. Unique installer id (CPI ID) from the Certified Professional Installers database.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalCustomer": { +"description": "Entity representing a SAS customer.", +"id": "SasPortalCustomer", +"properties": { +"displayName": { +"description": "Required. Name of the organization that the customer entity represents.", +"type": "string" +}, +"name": { +"description": "Output only. Resource name of the customer.", +"type": "string" +}, +"sasUserIds": { +"description": "User IDs used by the devices belonging to this customer.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalDeployment": { +"description": "The Deployment.", +"id": "SasPortalDeployment", +"properties": { +"displayName": { +"description": "The deployment's display name.", +"type": "string" +}, +"frns": { +"description": "Output only. The FCC Registration Numbers (FRNs) copied from its direct parent.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. Resource name.", +"readOnly": true, +"type": "string" +}, +"sasUserIds": { +"description": "User ID used by the devices belonging to this deployment. Each deployment should be associated with one unique user ID.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalDeploymentAssociation": { +"description": "Association between a gcp project and a SAS user id.", +"id": "SasPortalDeploymentAssociation", +"properties": { +"gcpProjectId": { +"description": "GCP project id of the associated project.", +"type": "string" +}, +"userId": { +"description": "User id of the deployment.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDevice": { +"id": "SasPortalDevice", +"properties": { +"activeConfig": { +"$ref": "SasPortalDeviceConfig", +"description": "Output only. Current configuration of the device as registered to the SAS." +}, +"currentChannels": { +"deprecated": true, +"description": "Output only. Current channels with scores.", +"items": { +"$ref": "SasPortalChannelWithScore" +}, +"readOnly": true, +"type": "array" +}, +"deviceMetadata": { +"$ref": "SasPortalDeviceMetadata", +"description": "Device parameters that can be overridden by both SAS Portal and SAS registration requests." +}, +"displayName": { +"description": "Device display name.", +"type": "string" +}, +"fccId": { +"description": "The FCC identifier of the device. Refer to https://www.fcc.gov/oet/ea/fccid for FccID format. Accept underscores and periods because some test-SAS customers use them.", +"type": "string" +}, +"grantRangeAllowlists": { +"description": "Only ranges that are within the allowlists are available for new grants.", +"items": { +"$ref": "SasPortalFrequencyRange" +}, +"type": "array" +}, +"grants": { +"description": "Output only. Grants held by the device.", +"items": { +"$ref": "SasPortalDeviceGrant" +}, +"type": "array" +}, +"name": { +"description": "Output only. The resource path name.", +"type": "string" +}, +"preloadedConfig": { +"$ref": "SasPortalDeviceConfig", +"description": "Configuration of the device, as specified via SAS Portal API." +}, +"serialNumber": { +"description": "A serial number assigned to the device by the device manufacturer.", +"type": "string" +}, +"state": { +"description": "Output only. Device state.", +"enum": [ +"DEVICE_STATE_UNSPECIFIED", +"RESERVED", +"REGISTERED", +"DEREGISTERED" +], +"enumDescriptions": [ +"Unspecified state.", +"Device created in the SAS Portal, however, not yet registered with SAS.", +"Device registered with SAS.", +"Device de-registered with SAS." +], +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDeviceAirInterface": { +"description": "Information about the device's air interface.", +"id": "SasPortalDeviceAirInterface", +"properties": { +"radioTechnology": { +"description": "Conditional. This field specifies the radio access technology that is used for the CBSD.", +"enum": [ +"RADIO_TECHNOLOGY_UNSPECIFIED", +"E_UTRA", +"CAMBIUM_NETWORKS", +"FOUR_G_BBW_SAA_1", +"NR", +"DOODLE_CBRS", +"CW", +"REDLINE", +"TARANA_WIRELESS" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"supportedSpec": { +"description": "Optional. This field is related to the `radioTechnology` and provides the air interface specification that the CBSD is compliant with at the time of registration.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDeviceConfig": { +"description": "Information about the device configuration.", +"id": "SasPortalDeviceConfig", +"properties": { +"airInterface": { +"$ref": "SasPortalDeviceAirInterface", +"description": "Information about this device's air interface." +}, +"callSign": { +"description": "The call sign of the device operator.", +"type": "string" +}, +"category": { +"description": "FCC category of the device.", +"enum": [ +"DEVICE_CATEGORY_UNSPECIFIED", +"DEVICE_CATEGORY_A", +"DEVICE_CATEGORY_B" +], +"enumDescriptions": [ +"Unspecified device category.", +"Category A.", +"Category B." +], +"type": "string" +}, +"installationParams": { +"$ref": "SasPortalInstallationParams", +"description": "Installation parameters for the device." +}, +"isSigned": { +"description": "Output only. Whether the configuration has been signed by a CPI.", +"type": "boolean" +}, +"measurementCapabilities": { +"description": "Measurement reporting capabilities of the device.", +"items": { +"enum": [ +"MEASUREMENT_CAPABILITY_UNSPECIFIED", +"MEASUREMENT_CAPABILITY_RECEIVED_POWER_WITH_GRANT", +"MEASUREMENT_CAPABILITY_RECEIVED_POWER_WITHOUT_GRANT" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"type": "array" +}, +"model": { +"$ref": "SasPortalDeviceModel", +"description": "Information about this device model." +}, +"state": { +"description": "State of the configuration.", +"enum": [ +"DEVICE_CONFIG_STATE_UNSPECIFIED", +"DRAFT", +"FINAL" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time the device configuration was edited.", +"format": "google-datetime", +"type": "string" +}, +"userId": { +"description": "The identifier of a device user.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDeviceGrant": { +"description": "Device grant. It is an authorization provided by the Spectrum Access System to a device to transmit using specified operating parameters after a successful heartbeat by the device.", +"id": "SasPortalDeviceGrant", +"properties": { +"channelType": { +"description": "Type of channel used.", +"enum": [ +"CHANNEL_TYPE_UNSPECIFIED", +"CHANNEL_TYPE_GAA", +"CHANNEL_TYPE_PAL" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"expireTime": { +"description": "The expiration time of the grant.", +"format": "google-datetime", +"type": "string" +}, +"frequencyRange": { +"$ref": "SasPortalFrequencyRange", +"description": "The transmission frequency range." +}, +"grantId": { +"description": "Grant Id.", +"type": "string" +}, +"lastHeartbeatTransmitExpireTime": { +"description": "The transmit expiration time of the last heartbeat.", +"format": "google-datetime", +"type": "string" +}, +"maxEirp": { +"description": "Maximum Equivalent Isotropically Radiated Power (EIRP) permitted by the grant. The maximum EIRP is in units of dBm/MHz. The value of `maxEirp` represents the average (RMS) EIRP that would be measured by the procedure defined in FCC part 96.41(e)(3).", +"format": "double", +"type": "number" +}, +"moveList": { +"description": "The DPA move lists on which this grant appears.", +"items": { +"$ref": "SasPortalDpaMoveList" +}, +"type": "array" +}, +"state": { +"description": "State of the grant.", +"enum": [ +"GRANT_STATE_UNSPECIFIED", +"GRANT_STATE_GRANTED", +"GRANT_STATE_TERMINATED", +"GRANT_STATE_SUSPENDED", +"GRANT_STATE_AUTHORIZED", +"GRANT_STATE_EXPIRED" +], +"enumDescriptions": [ +"", +"The grant has been granted but the device is not heartbeating on it.", +"The grant has been terminated by the SAS.", +"The grant has been suspended by the SAS.", +"The device is currently transmitting.", +"The grant has expired." +], +"type": "string" +}, +"suspensionReason": { +"description": "If the grant is suspended, the reason(s) for suspension.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalDeviceMetadata": { +"description": "Device data overridable by both SAS Portal and registration requests.", +"id": "SasPortalDeviceMetadata", +"properties": { +"antennaModel": { +"description": "If populated, the Antenna Model Pattern to use. Format is: `RecordCreatorId:PatternId`", +"type": "string" +}, +"commonChannelGroup": { +"description": "Common Channel Group (CCG). A group of CBSDs in the same ICG requesting a common primary channel assignment. For more details, see [CBRSA-TS-2001 V3.0.0](https://ongoalliance.org/wp-content/uploads/2020/02/CBRSA-TS-2001-V3.0.0_Approved-for-publication.pdf).", +"type": "string" +}, +"interferenceCoordinationGroup": { +"description": "Interference Coordination Group (ICG). A group of CBSDs that manage their own interference with the group. For more details, see [CBRSA-TS-2001 V3.0.0](https://ongoalliance.org/wp-content/uploads/2020/02/CBRSA-TS-2001-V3.0.0_Approved-for-publication.pdf).", +"type": "string" +}, +"nrqzValidated": { +"deprecated": true, +"description": "Output only. Set to `true` if a CPI has validated that they have coordinated with the National Quiet Zone office.", +"readOnly": true, +"type": "boolean" +}, +"nrqzValidation": { +"$ref": "SasPortalNrqzValidation", +"description": "Output only. National Radio Quiet Zone validation info.", +"readOnly": true +} +}, +"type": "object" +}, +"SasPortalDeviceModel": { +"description": "Information about the model of the device.", +"id": "SasPortalDeviceModel", +"properties": { +"firmwareVersion": { +"description": "The firmware version of the device.", +"type": "string" +}, +"hardwareVersion": { +"description": "The hardware version of the device.", +"type": "string" +}, +"name": { +"description": "The name of the device model.", +"type": "string" +}, +"softwareVersion": { +"description": "The software version of the device.", +"type": "string" +}, +"vendor": { +"description": "The name of the device vendor.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDpaMoveList": { +"description": "An entry in a DPA's move list.", +"id": "SasPortalDpaMoveList", +"properties": { +"dpaId": { +"description": "The ID of the DPA.", +"type": "string" +}, +"frequencyRange": { +"$ref": "SasPortalFrequencyRange", +"description": "The frequency range that the move list affects." +} +}, +"type": "object" +}, +"SasPortalEmpty": { +"description": "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); }", +"id": "SasPortalEmpty", +"properties": {}, +"type": "object" +}, +"SasPortalFrequencyRange": { +"description": "Frequency range from `low_frequency` to `high_frequency`.", +"id": "SasPortalFrequencyRange", +"properties": { +"highFrequencyMhz": { +"description": "The highest frequency of the frequency range in MHz.", +"format": "double", +"type": "number" +}, +"lowFrequencyMhz": { +"description": "The lowest frequency of the frequency range in MHz.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"SasPortalGcpProjectDeployment": { +"description": "Deployment associated with the GCP project. Includes whether SAS analytics has been enabled or not.", +"id": "SasPortalGcpProjectDeployment", +"properties": { +"deployment": { +"$ref": "SasPortalDeployment", +"description": "Deployment associated with the GCP project." +}, +"hasEnabledAnalytics": { +"description": "Whether SAS analytics has been enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"SasPortalGenerateSecretRequest": { +"description": "Request for GenerateSecret.", +"id": "SasPortalGenerateSecretRequest", +"properties": {}, +"type": "object" +}, +"SasPortalGenerateSecretResponse": { +"description": "Response for GenerateSecret.", +"id": "SasPortalGenerateSecretResponse", +"properties": { +"secret": { +"description": "The secret generated by the string and used by ValidateInstaller.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalGetPolicyRequest": { +"description": "Request message for `GetPolicy` method.", +"id": "SasPortalGetPolicyRequest", +"properties": { +"resource": { +"description": "Required. The resource for which the policy is being requested.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalInstallationParams": { +"description": "Information about the device installation parameters.", +"id": "SasPortalInstallationParams", +"properties": { +"antennaAzimuth": { +"description": "Boresight direction of the horizontal plane of the antenna in degrees with respect to true north. The value of this parameter is an integer with a value between 0 and 359 inclusive. A value of 0 degrees means true north; a value of 90 degrees means east. This parameter is optional for Category A devices and conditional for Category B devices.", +"format": "int32", +"type": "integer" +}, +"antennaBeamwidth": { +"description": "3-dB antenna beamwidth of the antenna in the horizontal-plane in degrees. This parameter is an unsigned integer having a value between 0 and 360 (degrees) inclusive; it is optional for Category A devices and conditional for Category B devices.", +"format": "int32", +"type": "integer" +}, +"antennaDowntilt": { +"description": "Antenna downtilt in degrees and is an integer with a value between -90 and +90 inclusive; a negative value means the antenna is tilted up (above horizontal). This parameter is optional for Category A devices and conditional for Category B devices.", +"format": "int32", +"type": "integer" +}, +"antennaGain": { +"description": "Peak antenna gain in dBi. This parameter is an integer with a value between -127 and +128 (dBi) inclusive.", +"format": "int32", +"type": "integer" +}, +"antennaModel": { +"description": "If an external antenna is used, the antenna model is optionally provided in this field. The string has a maximum length of 128 octets.", +"type": "string" +}, +"cpeCbsdIndication": { +"description": "If present, this parameter specifies whether the CBSD is a CPE-CBSD or not.", +"type": "boolean" +}, +"eirpCapability": { +"description": "This parameter is the maximum device EIRP in units of dBm/10MHz and is an integer with a value between -127 and +47 (dBm/10 MHz) inclusive. If not included, SAS interprets it as maximum allowable EIRP in units of dBm/10MHz for device category.", +"format": "int32", +"type": "integer" +}, +"height": { +"description": "Device antenna height in meters. When the `heightType` parameter value is \"AGL\", the antenna height should be given relative to ground level. When the `heightType` parameter value is \"AMSL\", it is given with respect to WGS84 datum.", +"format": "double", +"type": "number" +}, +"heightType": { +"description": "Specifies how the height is measured.", +"enum": [ +"HEIGHT_TYPE_UNSPECIFIED", +"HEIGHT_TYPE_AGL", +"HEIGHT_TYPE_AMSL" +], +"enumDescriptions": [ +"Unspecified height type.", +"AGL height is measured relative to the ground level.", +"AMSL height is measured relative to the mean sea level." +], +"type": "string" +}, +"horizontalAccuracy": { +"description": "A positive number in meters to indicate accuracy of the device antenna horizontal location. This optional parameter should only be present if its value is less than the FCC requirement of 50 meters.", +"format": "double", +"type": "number" +}, +"indoorDeployment": { +"description": "Whether the device antenna is indoor or not. `true`: indoor. `false`: outdoor.", +"type": "boolean" +}, +"latitude": { +"description": "Latitude of the device antenna location in degrees relative to the WGS 84 datum. The allowed range is from -90.000000 to +90.000000. Positive values represent latitudes north of the equator; negative values south of the equator.", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "Longitude of the device antenna location in degrees relative to the WGS 84 datum. The allowed range is from -180.000000 to +180.000000. Positive values represent longitudes east of the prime meridian; negative values west of the prime meridian.", +"format": "double", +"type": "number" +}, +"verticalAccuracy": { +"description": "A positive number in meters to indicate accuracy of the device antenna vertical location. This optional parameter should only be present if its value is less than the FCC requirement of 3 meters.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"SasPortalListCustomersResponse": { +"description": "Response for `ListCustomers`.", +"id": "SasPortalListCustomersResponse", +"properties": { +"customers": { +"description": "The list of customers that match the request.", +"items": { +"$ref": "SasPortalCustomer" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListCustomers that indicates from where listing should continue. If the field is missing or empty, it means there are no more customers.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalListDeploymentsResponse": { +"description": "Response for ListDeployments.", +"id": "SasPortalListDeploymentsResponse", +"properties": { +"deployments": { +"description": "The deployments that match the request.", +"items": { +"$ref": "SasPortalDeployment" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates from where listing should continue. If the field is missing or empty, it means there are no more deployments.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalListDevicesResponse": { +"description": "Response for ListDevices.", +"id": "SasPortalListDevicesResponse", +"properties": { +"devices": { +"description": "The devices that match the request.", +"items": { +"$ref": "SasPortalDevice" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates from where listing should continue. If the field is missing or empty, it means there is no more devices.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalListGcpProjectDeploymentsResponse": { +"description": "Response for [ListGcpProjectDeployments].", +"id": "SasPortalListGcpProjectDeploymentsResponse", +"properties": { +"deployments": { +"description": "Optional. Deployments associated with the GCP project", +"items": { +"$ref": "SasPortalGcpProjectDeployment" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalListLegacyOrganizationsResponse": { +"description": "Response for [ListLegacyOrganizations]. [spectrum.sas.portal.v1alpha1.Provisioning.ListLegacyOrganizations].", +"id": "SasPortalListLegacyOrganizationsResponse", +"properties": { +"organizations": { +"description": "Optional. Legacy SAS organizations.", +"items": { +"$ref": "SasPortalOrganization" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalListNodesResponse": { +"description": "Response for ListNodes.", +"id": "SasPortalListNodesResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates from where listing should continue. If the field is missing or empty, it means there is no more nodes.", +"type": "string" +}, +"nodes": { +"description": "The nodes that match the request.", +"items": { +"$ref": "SasPortalNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalMigrateOrganizationMetadata": { +"description": "Long-running operation metadata message returned by the MigrateOrganization.", +"id": "SasPortalMigrateOrganizationMetadata", +"properties": { +"operationState": { +"description": "Output only. Current operation state", +"enum": [ +"OPERATION_STATE_UNSPECIFIED", +"OPERATION_STATE_PENDING", +"OPERATION_STATE_RUNNING", +"OPERATION_STATE_SUCCEEDED", +"OPERATION_STATE_FAILED" +], +"enumDescriptions": [ +"Unspecified.", +"Pending (Not started).", +"In-progress.", +"Done successfully.", +"Done with errors." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMigrateOrganizationRequest": { +"description": "Request for [MigrateOrganization]. [spectrum.sas.portal.v1alpha1.Provisioning.MigrateOrganization]. GCP Project, Organization Info, and caller's GAIA ID should be retrieved from the RPC handler, and used to check authorization on SAS Portal organization and to create GCP Projects.", +"id": "SasPortalMigrateOrganizationRequest", +"properties": { +"organizationId": { +"description": "Required. Id of the SAS organization to be migrated.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMigrateOrganizationResponse": { +"description": "Response for [MigrateOrganization]. [spectrum.sas.portal.v1alpha1.Provisioning.MigrateOrganization].", +"id": "SasPortalMigrateOrganizationResponse", +"properties": { +"deploymentAssociation": { +"description": "Optional. A list of deployment association that were created for the migration, or current associations if they already exist.", +"items": { +"$ref": "SasPortalDeploymentAssociation" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalMoveDeploymentRequest": { +"description": "Request for MoveDeployment.", +"id": "SasPortalMoveDeploymentRequest", +"properties": { +"destination": { +"description": "Required. The name of the new parent resource node or customer to reparent the deployment under.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMoveDeviceRequest": { +"description": "Request for MoveDevice.", +"id": "SasPortalMoveDeviceRequest", +"properties": { +"destination": { +"description": "Required. The name of the new parent resource node or customer to reparent the device under.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMoveNodeRequest": { +"description": "Request for MoveNode.", +"id": "SasPortalMoveNodeRequest", +"properties": { +"destination": { +"description": "Required. The name of the new parent resource node or customer to reparent the node under.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalNode": { +"description": "The Node.", +"id": "SasPortalNode", +"properties": { +"displayName": { +"description": "The node's display name.", +"type": "string" +}, +"name": { +"description": "Output only. Resource name.", +"type": "string" +}, +"sasUserIds": { +"description": "User ids used by the devices belonging to this node.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalNrqzValidation": { +"description": "Information about National Radio Quiet Zone validation.", +"id": "SasPortalNrqzValidation", +"properties": { +"caseId": { +"description": "Validation case ID.", +"type": "string" +}, +"cpiId": { +"description": "CPI who signed the validation.", +"type": "string" +}, +"latitude": { +"description": "Device latitude that's associated with the validation.", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "Device longitude that's associated with the validation.", +"format": "double", +"type": "number" +}, +"state": { +"description": "State of the NRQZ validation info.", +"enum": [ +"STATE_UNSPECIFIED", +"DRAFT", +"FINAL" +], +"enumDescriptions": [ +"Unspecified state.", +"Draft state.", +"Final state." +], +"type": "string" +} +}, +"type": "object" +}, +"SasPortalOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "SasPortalOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "SasPortalStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"SasPortalOrganization": { +"description": "Organization details.", +"id": "SasPortalOrganization", +"properties": { +"displayName": { +"description": "Name of organization", +"type": "string" +}, +"id": { +"description": "Id of organization", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalPolicy": { +"description": "Defines an access control policy to the resources.", +"id": "SasPortalPolicy", +"properties": { +"assignments": { +"description": "List of assignments", +"items": { +"$ref": "SasPortalAssignment" +}, +"type": "array" +}, +"etag": { +"description": "The 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 GetPolicy, and systems are expected to put that etag in the request to SetPolicy to ensure that their change will be applied to the same version of the policy. If no etag is provided in the call to GetPolicy, then the existing policy is overwritten blindly.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalProvisionDeploymentRequest": { +"description": "Request for [ProvisionDeployment]. [spectrum.sas.portal.v1alpha1.Provisioning.ProvisionDeployment]. GCP Project, Organization Info, and caller\u2019s GAIA ID should be retrieved from the RPC handler, and used as inputs to create a new SAS organization (if not exists) and a new SAS deployment.", +"id": "SasPortalProvisionDeploymentRequest", +"properties": { +"newDeploymentDisplayName": { +"description": "Optional. If this field is set, and a new SAS Portal Deployment needs to be created, its display name will be set to the value of this field.", +"type": "string" +}, +"newOrganizationDisplayName": { +"description": "Optional. If this field is set, and a new SAS Portal Organization needs to be created, its display name will be set to the value of this field.", +"type": "string" +}, +"organizationId": { +"description": "Optional. If this field is set then a new deployment will be created under the organization specified by this id.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalProvisionDeploymentResponse": { +"description": "Response for [ProvisionDeployment]. [spectrum.sas.portal.v1alpha1.Provisioning.ProvisionDeployment].", +"id": "SasPortalProvisionDeploymentResponse", +"properties": { +"errorMessage": { +"description": "Optional. Optional error message if the provisioning request is not successful.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalSetPolicyRequest": { +"description": "Request message for `SetPolicy` method.", +"id": "SasPortalSetPolicyRequest", +"properties": { +"disableNotification": { +"description": "Optional. Set the field as `true` to disable the onboarding notification.", +"type": "boolean" +}, +"policy": { +"$ref": "SasPortalPolicy", +"description": "Required. The policy to be applied to the `resource`." +}, +"resource": { +"description": "Required. The resource for which the policy is being specified. This policy replaces any existing policy.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalSetupSasAnalyticsMetadata": { +"description": "Metadata returned by the long running operation for the SetupSasAnalytics rpc.", +"id": "SasPortalSetupSasAnalyticsMetadata", +"properties": {}, +"type": "object" +}, +"SasPortalSetupSasAnalyticsRequest": { +"description": "Request for the SetupSasAnalytics rpc.", +"id": "SasPortalSetupSasAnalyticsRequest", +"properties": { +"userId": { +"description": "Optional. User id to setup analytics for, if not provided the user id associated with the project is used. optional", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalSetupSasAnalyticsResponse": { +"description": "Response returned by the long running operation for the SetupSasAnalytics rpc.", +"id": "SasPortalSetupSasAnalyticsResponse", +"properties": {}, +"type": "object" +}, +"SasPortalSignDeviceRequest": { +"description": "Request for SignDevice.", +"id": "SasPortalSignDeviceRequest", +"properties": { +"device": { +"$ref": "SasPortalDevice", +"description": "Required. The device to sign. The device fields name, fcc_id and serial_number must be set. The user_id field must be set." +} +}, +"type": "object" +}, +"SasPortalStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "SasPortalStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalTestPermissionsRequest": { +"description": "Request message for `TestPermissions` method.", +"id": "SasPortalTestPermissionsRequest", +"properties": { +"permissions": { +"description": "The set of permissions to check for the `resource`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resource": { +"description": "Required. The resource for which the permissions are being requested.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalTestPermissionsResponse": { +"description": "Response message for `TestPermissions` method.", +"id": "SasPortalTestPermissionsResponse", +"properties": { +"permissions": { +"description": "A set of permissions that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalUpdateSignedDeviceRequest": { +"description": "Request for UpdateSignedDevice.", +"id": "SasPortalUpdateSignedDeviceRequest", +"properties": { +"encodedDevice": { +"description": "Required. The JSON Web Token signed using a CPI private key. Payload must be the JSON encoding of the device. The user_id field must be set.", +"format": "byte", +"type": "string" +}, +"installerId": { +"description": "Required. Unique installer ID (CPI ID) from the Certified Professional Installers database.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalValidateInstallerRequest": { +"description": "Request for ValidateInstaller.", +"id": "SasPortalValidateInstallerRequest", +"properties": { +"encodedSecret": { +"description": "Required. JSON Web Token signed using a CPI private key. Payload must include a \"secret\" claim whose value is the secret.", +"type": "string" +}, +"installerId": { +"description": "Required. Unique installer id (CPI ID) from the Certified Professional Installers database.", +"type": "string" +}, +"secret": { +"description": "Required. Secret returned by the GenerateSecret.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalValidateInstallerResponse": { +"description": "Response for ValidateInstaller.", +"id": "SasPortalValidateInstallerResponse", +"properties": {}, +"type": "object" +} +}, +"servicePath": "", +"title": "SAS Portal API (Testing)", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..83d1fba5ebd2c9c238d75d35821604b9aed70e56 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1.json @@ -0,0 +1,180 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://publicca.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Public Certificate Authority", +"description": "The Public Certificate Authority API may be used to create and manage ACME external account binding keys associated with Google Trust Services' publicly trusted certificate authority. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/public-certificate-authority/docs", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "publicca:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://publicca.mtls.googleapis.com/", +"name": "publicca", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"externalAccountKeys": { +"methods": { +"create": { +"description": "Creates a new ExternalAccountKey bound to the project.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/externalAccountKeys", +"httpMethod": "POST", +"id": "publicca.projects.locations.externalAccountKeys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the \"global\" location is supported.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/externalAccountKeys", +"request": { +"$ref": "ExternalAccountKey" +}, +"response": { +"$ref": "ExternalAccountKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://publicca.googleapis.com/", +"schemas": { +"ExternalAccountKey": { +"description": "A representation of an ExternalAccountKey used for [external account binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) within ACME.", +"id": "ExternalAccountKey", +"properties": { +"b64MacKey": { +"description": "Output only. Base64-URL-encoded HS256 key. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created", +"format": "byte", +"readOnly": true, +"type": "string" +}, +"keyId": { +"description": "Output only. Key ID. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. Resource name. projects/{project}/locations/{location}/externalAccountKeys/{key_id}", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Public Certificate Authority API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..b5ebf3e72e0ed28b9f75a268a3891895cff8016b --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1alpha1.json @@ -0,0 +1,180 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://publicca.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Public Certificate Authority", +"description": "The Public Certificate Authority API may be used to create and manage ACME external account binding keys associated with Google Trust Services' publicly trusted certificate authority. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/public-certificate-authority/docs", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "publicca:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://publicca.mtls.googleapis.com/", +"name": "publicca", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"externalAccountKeys": { +"methods": { +"create": { +"description": "Creates a new ExternalAccountKey bound to the project.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/externalAccountKeys", +"httpMethod": "POST", +"id": "publicca.projects.locations.externalAccountKeys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the \"global\" location is supported.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/externalAccountKeys", +"request": { +"$ref": "ExternalAccountKey" +}, +"response": { +"$ref": "ExternalAccountKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://publicca.googleapis.com/", +"schemas": { +"ExternalAccountKey": { +"description": "A representation of an ExternalAccountKey used for [external account binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) within ACME.", +"id": "ExternalAccountKey", +"properties": { +"b64MacKey": { +"description": "Output only. Base64-URL-encoded HS256 key. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created", +"format": "byte", +"readOnly": true, +"type": "string" +}, +"keyId": { +"description": "Output only. Key ID. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. Resource name. projects/{project}/locations/{location}/externalAccountKeys/{key_id}", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Public Certificate Authority API", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..d9a34ac0794355f20ba521adf942ff9d019bb762 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/publicca.v1beta1.json @@ -0,0 +1,180 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://publicca.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Public Certificate Authority", +"description": "The Public Certificate Authority API may be used to create and manage ACME external account binding keys associated with Google Trust Services' publicly trusted certificate authority. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/public-certificate-authority/docs", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "publicca:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://publicca.mtls.googleapis.com/", +"name": "publicca", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"externalAccountKeys": { +"methods": { +"create": { +"description": "Creates a new ExternalAccountKey bound to the project.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/externalAccountKeys", +"httpMethod": "POST", +"id": "publicca.projects.locations.externalAccountKeys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this external_account_key will be created. Format: projects/[project_id]/locations/[location]. At present only the \"global\" location is supported.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/externalAccountKeys", +"request": { +"$ref": "ExternalAccountKey" +}, +"response": { +"$ref": "ExternalAccountKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://publicca.googleapis.com/", +"schemas": { +"ExternalAccountKey": { +"description": "A representation of an ExternalAccountKey used for [external account binding](https://tools.ietf.org/html/rfc8555#section-7.3.4) within ACME.", +"id": "ExternalAccountKey", +"properties": { +"b64MacKey": { +"description": "Output only. Base64-URL-encoded HS256 key. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created", +"format": "byte", +"readOnly": true, +"type": "string" +}, +"keyId": { +"description": "Output only. Key ID. It is generated by the PublicCertificateAuthorityService when the ExternalAccountKey is created", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. Resource name. projects/{project}/locations/{location}/externalAccountKeys/{key_id}", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Public Certificate Authority API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..a09a35df0b5e45d768fffb04da5b42f2ecc682eb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1.json @@ -0,0 +1,2729 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/pubsub": { +"description": "View and manage Pub/Sub topics and subscriptions" +} +} +} +}, +"basePath": "", +"baseUrl": "https://pubsub.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Pubsub", +"description": "Provides reliable, many-to-many, asynchronous messaging between applications. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/pubsub/docs", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", +"location": "me-central2" +}, +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", +"location": "europe-west3" +}, +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", +"location": "europe-west9" +} +], +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "pubsub:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://pubsub.mtls.googleapis.com/", +"name": "pubsub", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"schemas": { +"methods": { +"commit": { +"description": "Commits a new schema revision to an existing schema.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}:commit", +"httpMethod": "POST", +"id": "pubsub.projects.schemas.commit", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the schema we are revising. Format is `projects/{project}/schemas/{schema}`.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:commit", +"request": { +"$ref": "CommitSchemaRequest" +}, +"response": { +"$ref": "Schema" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"create": { +"description": "Creates a schema.", +"flatPath": "v1/projects/{projectsId}/schemas", +"httpMethod": "POST", +"id": "pubsub.projects.schemas.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project in which to create the schema. Format is `projects/{project-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"schemaId": { +"description": "The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names for resource name constraints.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/schemas", +"request": { +"$ref": "Schema" +}, +"response": { +"$ref": "Schema" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Deletes a schema.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}", +"httpMethod": "DELETE", +"id": "pubsub.projects.schemas.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the schema to delete. Format is `projects/{project}/schemas/{schema}`.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"deleteRevision": { +"description": "Deletes a specific schema revision.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}:deleteRevision", +"httpMethod": "DELETE", +"id": "pubsub.projects.schemas.deleteRevision", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the schema revision to be deleted, with a revision ID explicitly included. Example: `projects/123/schemas/my-schema@c7cfa2a8`", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +}, +"revisionId": { +"deprecated": true, +"description": "Optional. This field is deprecated and should not be used for specifying the revision ID. The revision ID should be specified via the `name` parameter.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:deleteRevision", +"response": { +"$ref": "Schema" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets a schema.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}", +"httpMethod": "GET", +"id": "pubsub.projects.schemas.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the schema to get. Format is `projects/{project}/schemas/{schema}`.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The set of fields to return in the response. If not set, returns a Schema with all fields filled out. Set to `BASIC` to omit the `definition`.", +"enum": [ +"SCHEMA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the BASIC view.", +"Include the name and type of the schema, but not the definition.", +"Include all Schema object fields." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Schema" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}:getIamPolicy", +"httpMethod": "GET", +"id": "pubsub.projects.schemas.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists schemas in a project.", +"flatPath": "v1/projects/{projectsId}/schemas", +"httpMethod": "GET", +"id": "pubsub.projects.schemas.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of schemas to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSchemasResponse`; indicates that this is a continuation of a prior `ListSchemas` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project in which to list schemas. Format is `projects/{project-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The set of Schema fields to return in the response. If not set, returns Schemas with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields.", +"enum": [ +"SCHEMA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the BASIC view.", +"Include the name and type of the schema, but not the definition.", +"Include all Schema object fields." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/schemas", +"response": { +"$ref": "ListSchemasResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"listRevisions": { +"description": "Lists all schema revisions for the named schema.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}:listRevisions", +"httpMethod": "GET", +"id": "pubsub.projects.schemas.listRevisions", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the schema to list revisions for.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of revisions to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token, received from a previous ListSchemaRevisions call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"view": { +"description": "The set of Schema fields to return in the response. If not set, returns Schemas with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields.", +"enum": [ +"SCHEMA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the BASIC view.", +"Include the name and type of the schema, but not the definition.", +"Include all Schema object fields." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:listRevisions", +"response": { +"$ref": "ListSchemaRevisionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"rollback": { +"description": "Creates a new schema revision that is a copy of the provided revision_id.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}:rollback", +"httpMethod": "POST", +"id": "pubsub.projects.schemas.rollback", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The schema being rolled back with revision id.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:rollback", +"request": { +"$ref": "RollbackSchemaRequest" +}, +"response": { +"$ref": "Schema" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}:setIamPolicy", +"httpMethod": "POST", +"id": "pubsub.projects.schemas.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/schemas/{schemasId}:testIamPermissions", +"httpMethod": "POST", +"id": "pubsub.projects.schemas.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/schemas/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"validate": { +"description": "Validates a schema.", +"flatPath": "v1/projects/{projectsId}/schemas:validate", +"httpMethod": "POST", +"id": "pubsub.projects.schemas.validate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/schemas:validate", +"request": { +"$ref": "ValidateSchemaRequest" +}, +"response": { +"$ref": "ValidateSchemaResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"validateMessage": { +"description": "Validates a message against a schema.", +"flatPath": "v1/projects/{projectsId}/schemas:validateMessage", +"httpMethod": "POST", +"id": "pubsub.projects.schemas.validateMessage", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/schemas:validateMessage", +"request": { +"$ref": "ValidateMessageRequest" +}, +"response": { +"$ref": "ValidateMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +}, +"snapshots": { +"methods": { +"create": { +"description": "Creates a snapshot from the requested subscription. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. If the snapshot already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot would expire in less than 1 hour -- then `FAILED_PRECONDITION` is returned. See also the `Snapshot.expire_time` field. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription, conforming to the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is populated in the returned Snapshot object. Note that for REST API requests, you must specify a name in the request.", +"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", +"httpMethod": "PUT", +"id": "pubsub.projects.snapshots.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. User-provided name for this snapshot. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription. Note that for REST API requests, you must specify a name. See the [resource name rules](https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). Format is `projects/{project}/snapshots/{snap}`.", +"location": "path", +"pattern": "^projects/[^/]+/snapshots/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "CreateSnapshotRequest" +}, +"response": { +"$ref": "Snapshot" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Removes an existing snapshot. Snapshots are used in [Seek] (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. When the snapshot is deleted, all messages retained in the snapshot are immediately dropped. After a snapshot is deleted, a new one may be created with the same name, but the new one has no association with the old snapshot or its subscription, unless the same subscription is specified.", +"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", +"httpMethod": "DELETE", +"id": "pubsub.projects.snapshots.delete", +"parameterOrder": [ +"snapshot" +], +"parameters": { +"snapshot": { +"description": "Required. The name of the snapshot to delete. Format is `projects/{project}/snapshots/{snap}`.", +"location": "path", +"pattern": "^projects/[^/]+/snapshots/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+snapshot}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets the configuration details of a snapshot. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", +"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", +"httpMethod": "GET", +"id": "pubsub.projects.snapshots.get", +"parameterOrder": [ +"snapshot" +], +"parameters": { +"snapshot": { +"description": "Required. The name of the snapshot to get. Format is `projects/{project}/snapshots/{snap}`.", +"location": "path", +"pattern": "^projects/[^/]+/snapshots/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+snapshot}", +"response": { +"$ref": "Snapshot" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:getIamPolicy", +"httpMethod": "GET", +"id": "pubsub.projects.snapshots.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/snapshots/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists the existing snapshots. Snapshots are used in [Seek]( https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", +"flatPath": "v1/projects/{projectsId}/snapshots", +"httpMethod": "GET", +"id": "pubsub.projects.snapshots.list", +"parameterOrder": [ +"project" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of snapshots to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The value returned by the last `ListSnapshotsResponse`; indicates that this is a continuation of a prior `ListSnapshots` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Required. The name of the project in which to list snapshots. Format is `projects/{project-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+project}/snapshots", +"response": { +"$ref": "ListSnapshotsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"patch": { +"description": "Updates an existing snapshot by updating the fields specified in the update mask. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", +"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}", +"httpMethod": "PATCH", +"id": "pubsub.projects.snapshots.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Optional. The name of the snapshot.", +"location": "path", +"pattern": "^projects/[^/]+/snapshots/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UpdateSnapshotRequest" +}, +"response": { +"$ref": "Snapshot" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:setIamPolicy", +"httpMethod": "POST", +"id": "pubsub.projects.snapshots.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/snapshots/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/snapshots/{snapshotsId}:testIamPermissions", +"httpMethod": "POST", +"id": "pubsub.projects.snapshots.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/snapshots/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +}, +"subscriptions": { +"methods": { +"acknowledge": { +"description": "Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.acknowledge", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The subscription whose message is being acknowledged. Format is `projects/{project}/subscriptions/{sub}`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}:acknowledge", +"request": { +"$ref": "AcknowledgeRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"create": { +"description": "Creates a subscription to a given topic. See the [resource name rules] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic, conforming to the [resource name format] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names). The generated name is populated in the returned Subscription object. Note that for REST API requests, you must specify a name in the request.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", +"httpMethod": "PUT", +"id": "pubsub.projects.subscriptions.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Deletes an existing subscription. All messages retained in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription or its topic unless the same topic is specified.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", +"httpMethod": "DELETE", +"id": "pubsub.projects.subscriptions.delete", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The subscription to delete. Format is `projects/{project}/subscriptions/{sub}`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"detach": { +"description": "Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:detach", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.detach", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The subscription to detach. Format is `projects/{project}/subscriptions/{subscription}`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}:detach", +"response": { +"$ref": "DetachSubscriptionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets the configuration details of a subscription.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", +"httpMethod": "GET", +"id": "pubsub.projects.subscriptions.get", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The name of the subscription to get. Format is `projects/{project}/subscriptions/{sub}`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", +"httpMethod": "GET", +"id": "pubsub.projects.subscriptions.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists matching subscriptions.", +"flatPath": "v1/projects/{projectsId}/subscriptions", +"httpMethod": "GET", +"id": "pubsub.projects.subscriptions.list", +"parameterOrder": [ +"project" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of subscriptions to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Required. The name of the project in which to list subscriptions. Format is `projects/{project-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+project}/subscriptions", +"response": { +"$ref": "ListSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"modifyAckDeadline": { +"description": "Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.modifyAckDeadline", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The name of the subscription. Format is `projects/{project}/subscriptions/{sub}`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}:modifyAckDeadline", +"request": { +"$ref": "ModifyAckDeadlineRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"modifyPushConfig": { +"description": "Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.modifyPushConfig", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The name of the subscription. Format is `projects/{project}/subscriptions/{sub}`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}:modifyPushConfig", +"request": { +"$ref": "ModifyPushConfigRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"patch": { +"description": "Updates an existing subscription by updating the fields specified in the update mask. Note that certain properties of a subscription, such as its topic, are not modifiable.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}", +"httpMethod": "PATCH", +"id": "pubsub.projects.subscriptions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UpdateSubscriptionRequest" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"pull": { +"description": "Pulls messages from the server.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.pull", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The subscription from which messages should be pulled. Format is `projects/{project}/subscriptions/{sub}`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}:pull", +"request": { +"$ref": "PullRequest" +}, +"response": { +"$ref": "PullResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"seek": { +"description": "Seeks an existing subscription to a point in time or to a given snapshot, whichever is provided in the request. Snapshots are used in [Seek] (https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. Note that both the subscription and the snapshot must be on the same topic.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:seek", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.seek", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "Required. The subscription to affect.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+subscription}:seek", +"request": { +"$ref": "SeekRequest" +}, +"response": { +"$ref": "SeekResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +}, +"topics": { +"methods": { +"create": { +"description": "Creates the given topic with the given name. See the [resource name rules] (https://cloud.google.com/pubsub/docs/pubsub-basics#resource_names).", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}", +"httpMethod": "PUT", +"id": "pubsub.projects.topics.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the topic. It must have the format `\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Topic" +}, +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}", +"httpMethod": "DELETE", +"id": "pubsub.projects.topics.delete", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Required. Name of the topic to delete. Format is `projects/{project}/topics/{topic}`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+topic}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets the configuration of a topic.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}", +"httpMethod": "GET", +"id": "pubsub.projects.topics.get", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Required. The name of the topic to get. Format is `projects/{project}/topics/{topic}`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+topic}", +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}:getIamPolicy", +"httpMethod": "GET", +"id": "pubsub.projects.topics.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists matching topics.", +"flatPath": "v1/projects/{projectsId}/topics", +"httpMethod": "GET", +"id": "pubsub.projects.topics.list", +"parameterOrder": [ +"project" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of topics to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Required. The name of the project in which to list topics. Format is `projects/{project-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+project}/topics", +"response": { +"$ref": "ListTopicsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"patch": { +"description": "Updates an existing topic by updating the fields specified in the update mask. Note that certain properties of a topic are not modifiable.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}", +"httpMethod": "PATCH", +"id": "pubsub.projects.topics.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the topic. It must have the format `\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UpdateTopicRequest" +}, +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"publish": { +"description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}:publish", +"httpMethod": "POST", +"id": "pubsub.projects.topics.publish", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Required. The messages in the request will be published on this topic. Format is `projects/{project}/topics/{topic}`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+topic}:publish", +"request": { +"$ref": "PublishRequest" +}, +"response": { +"$ref": "PublishResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}:setIamPolicy", +"httpMethod": "POST", +"id": "pubsub.projects.topics.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}:testIamPermissions", +"httpMethod": "POST", +"id": "pubsub.projects.topics.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +}, +"resources": { +"snapshots": { +"methods": { +"list": { +"description": "Lists the names of the snapshots on this topic. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}/snapshots", +"httpMethod": "GET", +"id": "pubsub.projects.topics.snapshots.list", +"parameterOrder": [ +"topic" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of snapshot names to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The value returned by the last `ListTopicSnapshotsResponse`; indicates that this is a continuation of a prior `ListTopicSnapshots` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"topic": { +"description": "Required. The name of the topic that snapshots are attached to. Format is `projects/{project}/topics/{topic}`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+topic}/snapshots", +"response": { +"$ref": "ListTopicSnapshotsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +}, +"subscriptions": { +"methods": { +"list": { +"description": "Lists the names of the attached subscriptions on this topic.", +"flatPath": "v1/projects/{projectsId}/topics/{topicsId}/subscriptions", +"httpMethod": "GET", +"id": "pubsub.projects.topics.subscriptions.list", +"parameterOrder": [ +"topic" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of subscription names to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The value returned by the last `ListTopicSubscriptionsResponse`; indicates that this is a continuation of a prior `ListTopicSubscriptions` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"topic": { +"description": "Required. The name of the topic that subscriptions are attached to. Format is `projects/{project}/topics/{topic}`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+topic}/subscriptions", +"response": { +"$ref": "ListTopicSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +} +} +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://pubsub.googleapis.com/", +"schemas": { +"AcknowledgeRequest": { +"description": "Request for the Acknowledge method.", +"id": "AcknowledgeRequest", +"properties": { +"ackIds": { +"description": "Required. The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AvroConfig": { +"description": "Configuration for writing message data in Avro format. Message payloads and metadata will be written to files as an Avro binary.", +"id": "AvroConfig", +"properties": { +"writeMetadata": { +"description": "Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key as additional fields in the output. The subscription name, message_id, and publish_time fields are put in their own fields while all other message properties other than data (for example, an ordering_key, if present) are added as entries in the attributes map.", +"type": "boolean" +} +}, +"type": "object" +}, +"AwsKinesis": { +"description": "Ingestion settings for Amazon Kinesis Data Streams.", +"id": "AwsKinesis", +"properties": { +"awsRoleArn": { +"description": "Required. AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.", +"type": "string" +}, +"consumerArn": { +"description": "Required. The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.", +"type": "string" +}, +"gcpServiceAccount": { +"description": "Required. The GCP service account to be used for Federated Identity authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for the provided role). The `aws_role_arn` must be set up with `accounts.google.com:sub` equals to this service account number.", +"type": "string" +}, +"state": { +"description": "Output only. An output-only field that indicates the state of the Kinesis ingestion source.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"KINESIS_PERMISSION_DENIED", +"PUBLISH_PERMISSION_DENIED", +"STREAM_NOT_FOUND", +"CONSUMER_NOT_FOUND" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Ingestion is active.", +"Permission denied encountered while consuming data from Kinesis. This can happen if: - The provided `aws_role_arn` does not exist or does not have the appropriate permissions attached. - The provided `aws_role_arn` is not set up properly for Identity Federation using `gcp_service_account`. - The Pub/Sub SA is not granted the `iam.serviceAccounts.getOpenIdToken` permission on `gcp_service_account`.", +"Permission denied encountered while publishing to the topic. This can happen if the Pub/Sub SA has not been granted the [appropriate publish permissions](https://cloud.google.com/pubsub/docs/access-control#pubsub.publisher)", +"The Kinesis stream does not exist.", +"The Kinesis consumer does not exist." +], +"readOnly": true, +"type": "string" +}, +"streamArn": { +"description": "Required. The Kinesis stream ARN to ingest data from.", +"type": "string" +} +}, +"type": "object" +}, +"BigQueryConfig": { +"description": "Configuration for a BigQuery subscription.", +"id": "BigQueryConfig", +"properties": { +"dropUnknownFields": { +"description": "Optional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.", +"type": "boolean" +}, +"serviceAccountEmail": { +"description": "Optional. The service account to use to write to BigQuery. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.", +"type": "string" +}, +"state": { +"description": "Output only. An output-only field that indicates whether or not the subscription can receive messages.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"PERMISSION_DENIED", +"NOT_FOUND", +"SCHEMA_MISMATCH", +"IN_TRANSIT_LOCATION_RESTRICTION" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The subscription can actively send messages to BigQuery", +"Cannot write to the BigQuery table because of permission denied errors. This can happen if - Pub/Sub SA has not been granted the [appropriate BigQuery IAM permissions](https://cloud.google.com/pubsub/docs/create-subscription#assign_bigquery_service_account) - bigquery.googleapis.com API is not enabled for the project ([instructions](https://cloud.google.com/service-usage/docs/enable-disable))", +"Cannot write to the BigQuery table because it does not exist.", +"Cannot write to the BigQuery table due to a schema mismatch.", +"Cannot write to the destination because enforce_in_transit is set to true and the destination locations are not in the allowed regions." +], +"readOnly": true, +"type": "string" +}, +"table": { +"description": "Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}", +"type": "string" +}, +"useTableSchema": { +"description": "Optional. When true, use the BigQuery table's schema as the columns to write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be enabled at the same time.", +"type": "boolean" +}, +"useTopicSchema": { +"description": "Optional. When true, use the topic's schema as the columns to write to in BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be enabled at the same time.", +"type": "boolean" +}, +"writeMetadata": { +"description": "Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.", +"type": "boolean" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CloudStorageConfig": { +"description": "Configuration for a Cloud Storage subscription.", +"id": "CloudStorageConfig", +"properties": { +"avroConfig": { +"$ref": "AvroConfig", +"description": "Optional. If set, message data will be written to Cloud Storage in Avro format." +}, +"bucket": { +"description": "Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like \"gs://\". See the [bucket naming requirements] (https://cloud.google.com/storage/docs/buckets#naming).", +"type": "string" +}, +"filenameDatetimeFormat": { +"description": "Optional. User-provided format string specifying how to represent datetimes in Cloud Storage filenames. See the [datetime format guidance](https://cloud.google.com/pubsub/docs/create-cloudstorage-subscription#file_names).", +"type": "string" +}, +"filenamePrefix": { +"description": "Optional. User-provided prefix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming).", +"type": "string" +}, +"filenameSuffix": { +"description": "Optional. User-provided suffix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming). Must not end in \"/\".", +"type": "string" +}, +"maxBytes": { +"description": "Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.", +"format": "int64", +"type": "string" +}, +"maxDuration": { +"description": "Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.", +"format": "google-duration", +"type": "string" +}, +"serviceAccountEmail": { +"description": "Optional. The service account to use to write to Cloud Storage. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.", +"type": "string" +}, +"state": { +"description": "Output only. An output-only field that indicates whether or not the subscription can receive messages.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"PERMISSION_DENIED", +"NOT_FOUND", +"IN_TRANSIT_LOCATION_RESTRICTION" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The subscription can actively send messages to Cloud Storage.", +"Cannot write to the Cloud Storage bucket because of permission denied errors.", +"Cannot write to the Cloud Storage bucket because it does not exist.", +"Cannot write to the destination because enforce_in_transit is set to true and the destination locations are not in the allowed regions." +], +"readOnly": true, +"type": "string" +}, +"textConfig": { +"$ref": "TextConfig", +"description": "Optional. If set, message data will be written to Cloud Storage in text format." +} +}, +"type": "object" +}, +"CommitSchemaRequest": { +"description": "Request for CommitSchema method.", +"id": "CommitSchemaRequest", +"properties": { +"schema": { +"$ref": "Schema", +"description": "Required. The schema revision to commit." +} +}, +"type": "object" +}, +"CreateSnapshotRequest": { +"description": "Request for the `CreateSnapshot` method.", +"id": "CreateSnapshotRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).", +"type": "object" +}, +"subscription": { +"description": "Required. The subscription whose backlog the snapshot retains. Specifically, the created snapshot is guaranteed to retain: (a) The existing backlog on the subscription. More precisely, this is defined as the messages in the subscription's backlog that are unacknowledged upon the successful completion of the `CreateSnapshot` request; as well as: (b) Any messages published to the subscription's topic following the successful completion of the CreateSnapshot request. Format is `projects/{project}/subscriptions/{sub}`.", +"type": "string" +} +}, +"type": "object" +}, +"DeadLetterPolicy": { +"description": "Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.", +"id": "DeadLetterPolicy", +"properties": { +"deadLetterTopic": { +"description": "Optional. The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.", +"type": "string" +}, +"maxDeliveryAttempts": { +"description": "Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DetachSubscriptionResponse": { +"description": "Response for the DetachSubscription method. Reserved for future use.", +"id": "DetachSubscriptionResponse", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ExpirationPolicy": { +"description": "A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).", +"id": "ExpirationPolicy", +"properties": { +"ttl": { +"description": "Optional. Specifies the \"time-to-live\" duration for an associated resource. The resource expires if it is not active for a period of `ttl`. The definition of \"activity\" depends on the type of the associated resource. The minimum and maximum allowed values for `ttl` depend on the type of the associated resource, as well. If `ttl` is not set, the associated resource never expires.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"IngestionDataSourceSettings": { +"description": "Settings for an ingestion data source on a topic.", +"id": "IngestionDataSourceSettings", +"properties": { +"awsKinesis": { +"$ref": "AwsKinesis", +"description": "Optional. Amazon Kinesis Data Streams." +} +}, +"type": "object" +}, +"ListSchemaRevisionsResponse": { +"description": "Response for the `ListSchemaRevisions` method.", +"id": "ListSchemaRevisionsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages.", +"type": "string" +}, +"schemas": { +"description": "The revisions of the schema.", +"items": { +"$ref": "Schema" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSchemasResponse": { +"description": "Response for the `ListSchemas` method.", +"id": "ListSchemasResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there may be more schemas that match the request; this value should be passed in a new `ListSchemasRequest`.", +"type": "string" +}, +"schemas": { +"description": "The resulting schemas.", +"items": { +"$ref": "Schema" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSnapshotsResponse": { +"description": "Response for the `ListSnapshots` method.", +"id": "ListSnapshotsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. If not empty, indicates that there may be more snapshot that match the request; this value should be passed in a new `ListSnapshotsRequest`.", +"type": "string" +}, +"snapshots": { +"description": "Optional. The resulting snapshots.", +"items": { +"$ref": "Snapshot" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSubscriptionsResponse": { +"description": "Response for the `ListSubscriptions` method.", +"id": "ListSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListSubscriptionsRequest` to get more subscriptions.", +"type": "string" +}, +"subscriptions": { +"description": "Optional. The subscriptions that match the request.", +"items": { +"$ref": "Subscription" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicSnapshotsResponse": { +"description": "Response for the `ListTopicSnapshots` method.", +"id": "ListTopicSnapshotsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. If not empty, indicates that there may be more snapshots that match the request; this value should be passed in a new `ListTopicSnapshotsRequest` to get more snapshots.", +"type": "string" +}, +"snapshots": { +"description": "Optional. The names of the snapshots that match the request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicSubscriptionsResponse": { +"description": "Response for the `ListTopicSubscriptions` method.", +"id": "ListTopicSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListTopicSubscriptionsRequest` to get more subscriptions.", +"type": "string" +}, +"subscriptions": { +"description": "Optional. The names of subscriptions attached to the topic specified in the request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicsResponse": { +"description": "Response for the `ListTopics` method.", +"id": "ListTopicsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. If not empty, indicates that there may be more topics that match the request; this value should be passed in a new `ListTopicsRequest`.", +"type": "string" +}, +"topics": { +"description": "Optional. The resulting topics.", +"items": { +"$ref": "Topic" +}, +"type": "array" +} +}, +"type": "object" +}, +"MessageStoragePolicy": { +"description": "A policy constraining the storage of messages published to the topic.", +"id": "MessageStoragePolicy", +"properties": { +"allowedPersistenceRegions": { +"description": "Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.", +"items": { +"type": "string" +}, +"type": "array" +}, +"enforceInTransit": { +"description": "Optional. If true, `allowed_persistence_regions` is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not in `allowed_persistence_regions`.", +"type": "boolean" +} +}, +"type": "object" +}, +"ModifyAckDeadlineRequest": { +"description": "Request for the ModifyAckDeadline method.", +"id": "ModifyAckDeadlineRequest", +"properties": { +"ackDeadlineSeconds": { +"description": "Required. The new ack deadline with respect to the time this request was sent to the Pub/Sub system. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero might immediately make the message available for delivery to another subscriber client. This typically results in an increase in the rate of message redeliveries (that is, duplicates). The minimum deadline you can specify is 0 seconds. The maximum deadline you can specify in a single request is 600 seconds (10 minutes).", +"format": "int32", +"type": "integer" +}, +"ackIds": { +"description": "Required. List of acknowledgment IDs.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ModifyPushConfigRequest": { +"description": "Request for the ModifyPushConfig method.", +"id": "ModifyPushConfigRequest", +"properties": { +"pushConfig": { +"$ref": "PushConfig", +"description": "Required. The push configuration for future deliveries. An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if `Pull` or `StreamingPull` is not called." +} +}, +"type": "object" +}, +"NoWrapper": { +"description": "Sets the `data` field as the HTTP body for delivery.", +"id": "NoWrapper", +"properties": { +"writeMetadata": { +"description": "Optional. When true, writes the Pub/Sub message metadata to `x-goog-pubsub-:` headers of the HTTP request. Writes the Pub/Sub message attributes to `:` headers of the HTTP request.", +"type": "boolean" +} +}, +"type": "object" +}, +"OidcToken": { +"description": "Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect).", +"id": "OidcToken", +"properties": { +"audience": { +"description": "Optional. Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.", +"type": "string" +}, +"serviceAccountEmail": { +"description": "Optional. [Service account email](https://cloud.google.com/iam/docs/service-accounts) used for generating the OIDC token. For more information on setting up authentication, see [Push subscriptions](https://cloud.google.com/pubsub/docs/push).", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PublishRequest": { +"description": "Request for the Publish method.", +"id": "PublishRequest", +"properties": { +"messages": { +"description": "Required. The messages to publish.", +"items": { +"$ref": "PubsubMessage" +}, +"type": "array" +} +}, +"type": "object" +}, +"PublishResponse": { +"description": "Response for the `Publish` method.", +"id": "PublishResponse", +"properties": { +"messageIds": { +"description": "Optional. The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PubsubMessage": { +"description": "A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding [client library documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for more information. See [quotas and limits] (https://cloud.google.com/pubsub/quotas) for more information about message limits.", +"id": "PubsubMessage", +"properties": { +"attributes": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.", +"type": "object" +}, +"data": { +"description": "Optional. The message data field. If this field is empty, the message must contain at least one attribute.", +"format": "byte", +"type": "string" +}, +"messageId": { +"description": "ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.", +"type": "string" +}, +"orderingKey": { +"description": "Optional. If non-empty, identifies related messages for which publish order should be respected. If a `Subscription` has `enable_message_ordering` set to `true`, messages published with the same non-empty `ordering_key` value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest` must specify the same `ordering_key` value. For more information, see [ordering messages](https://cloud.google.com/pubsub/docs/ordering).", +"type": "string" +}, +"publishTime": { +"description": "The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"PubsubWrapper": { +"description": "The payload to the push endpoint is in the form of the JSON representation of a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).", +"id": "PubsubWrapper", +"properties": {}, +"type": "object" +}, +"PullRequest": { +"description": "Request for the `Pull` method.", +"id": "PullRequest", +"properties": { +"maxMessages": { +"description": "Required. The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may return fewer than the number specified.", +"format": "int32", +"type": "integer" +}, +"returnImmediately": { +"deprecated": true, +"description": "Optional. If this field set to true, the system will respond immediately even if it there are no messages available to return in the `Pull` response. Otherwise, the system may wait (for a bounded amount of time) until at least one message is available, rather than returning no messages. Warning: setting this field to `true` is discouraged because it adversely impacts the performance of `Pull` operations. We recommend that users do not set this field.", +"type": "boolean" +} +}, +"type": "object" +}, +"PullResponse": { +"description": "Response for the `Pull` method.", +"id": "PullResponse", +"properties": { +"receivedMessages": { +"description": "Optional. Received Pub/Sub messages. The list will be empty if there are no more messages available in the backlog, or if no messages could be returned before the request timeout. For JSON, the response can be entirely empty. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog.", +"items": { +"$ref": "ReceivedMessage" +}, +"type": "array" +} +}, +"type": "object" +}, +"PushConfig": { +"description": "Configuration for a push delivery endpoint.", +"id": "PushConfig", +"properties": { +"attributes": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Endpoint configuration attributes that can be used to control different aspects of the message delivery. The only currently supported attribute is `x-goog-version`, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). If not present during the `CreateSubscription` call, it will default to the version of the Pub/Sub API used to make such call. If not present in a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The only supported values for the `x-goog-version` attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. For example: `attributes { \"x-goog-version\": \"v1\" }`", +"type": "object" +}, +"noWrapper": { +"$ref": "NoWrapper", +"description": "Optional. When set, the payload to the push endpoint is not wrapped." +}, +"oidcToken": { +"$ref": "OidcToken", +"description": "Optional. If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message." +}, +"pubsubWrapper": { +"$ref": "PubsubWrapper", +"description": "Optional. When set, the payload to the push endpoint is in the form of the JSON representation of a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage)." +}, +"pushEndpoint": { +"description": "Optional. A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use `https://example.com/push`.", +"type": "string" +} +}, +"type": "object" +}, +"ReceivedMessage": { +"description": "A message and its corresponding acknowledgment ID.", +"id": "ReceivedMessage", +"properties": { +"ackId": { +"description": "Optional. This ID can be used to acknowledge the received message.", +"type": "string" +}, +"deliveryAttempt": { +"description": "Optional. The approximate number of times that Pub/Sub has attempted to deliver the associated message to a subscriber. More precisely, this is 1 + (number of NACKs) + (number of ack_deadline exceeds) for this message. A NACK is any call to ModifyAckDeadline with a 0 deadline. An ack_deadline exceeds event is whenever a message is not acknowledged within ack_deadline. Note that ack_deadline is initially Subscription.ackDeadlineSeconds, but may get extended automatically by the client library. Upon the first delivery of a given message, `delivery_attempt` will have a value of 1. The value is calculated at best effort and is approximate. If a DeadLetterPolicy is not set on the subscription, this will be 0.", +"format": "int32", +"type": "integer" +}, +"message": { +"$ref": "PubsubMessage", +"description": "Optional. The message." +} +}, +"type": "object" +}, +"RetryPolicy": { +"description": "A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.", +"id": "RetryPolicy", +"properties": { +"maximumBackoff": { +"description": "Optional. The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.", +"format": "google-duration", +"type": "string" +}, +"minimumBackoff": { +"description": "Optional. The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"RollbackSchemaRequest": { +"description": "Request for the `RollbackSchema` method.", +"id": "RollbackSchemaRequest", +"properties": { +"revisionId": { +"description": "Required. The revision ID to roll back to. It must be a revision of the same schema. Example: c7cfa2a8", +"type": "string" +} +}, +"type": "object" +}, +"Schema": { +"description": "A schema resource.", +"id": "Schema", +"properties": { +"definition": { +"description": "The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.", +"type": "string" +}, +"name": { +"description": "Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.", +"type": "string" +}, +"revisionCreateTime": { +"description": "Output only. The timestamp that the revision was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"revisionId": { +"description": "Output only. Immutable. The revision ID of the schema.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "The type of the schema definition.", +"enum": [ +"TYPE_UNSPECIFIED", +"PROTOCOL_BUFFER", +"AVRO" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"A Protocol Buffer schema definition.", +"An Avro schema definition." +], +"type": "string" +} +}, +"type": "object" +}, +"SchemaSettings": { +"description": "Settings for validating messages published against a schema.", +"id": "SchemaSettings", +"properties": { +"encoding": { +"description": "Optional. The encoding of messages validated against `schema`.", +"enum": [ +"ENCODING_UNSPECIFIED", +"JSON", +"BINARY" +], +"enumDescriptions": [ +"Unspecified", +"JSON encoding", +"Binary encoding, as defined by the schema type. For some schema types, binary encoding may not be available." +], +"type": "string" +}, +"firstRevisionId": { +"description": "Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.", +"type": "string" +}, +"lastRevisionId": { +"description": "Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.", +"type": "string" +}, +"schema": { +"description": "Required. The name of the schema that messages published should be validated against. Format is `projects/{project}/schemas/{schema}`. The value of this field will be `_deleted-schema_` if the schema has been deleted.", +"type": "string" +} +}, +"type": "object" +}, +"SeekRequest": { +"description": "Request for the `Seek` method.", +"id": "SeekRequest", +"properties": { +"snapshot": { +"description": "Optional. The snapshot to seek to. The snapshot's topic must be the same as that of the provided subscription. Format is `projects/{project}/snapshots/{snap}`.", +"type": "string" +}, +"time": { +"description": "Optional. The time to seek to. Messages retained in the subscription that were published before this time are marked as acknowledged, and messages retained in the subscription that were published after this time are marked as unacknowledged. Note that this operation affects only those messages retained in the subscription (configured by the combination of `message_retention_duration` and `retain_acked_messages`). For example, if `time` corresponds to a point before the message retention window (or to a point before the system's notion of the subscription creation time), only retained messages will be marked as unacknowledged, and already-expunged messages will not be restored.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SeekResponse": { +"description": "Response for the `Seek` method (this response is empty).", +"id": "SeekResponse", +"properties": {}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"Snapshot": { +"description": "A snapshot resource. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.", +"id": "Snapshot", +"properties": { +"expireTime": { +"description": "Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`. For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.", +"format": "google-datetime", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).", +"type": "object" +}, +"name": { +"description": "Optional. The name of the snapshot.", +"type": "string" +}, +"topic": { +"description": "Optional. The name of the topic from which this snapshot is retaining messages.", +"type": "string" +} +}, +"type": "object" +}, +"Subscription": { +"description": "A subscription resource. If none of `push_config`, `bigquery_config`, or `cloud_storage_config` is set, then the subscriber will pull and ack messages using API methods. At most one of these fields may be set.", +"id": "Subscription", +"properties": { +"ackDeadlineSeconds": { +"description": "Optional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be _outstanding_. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using non-streaming pull or send the `ack_id` in a `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.", +"format": "int32", +"type": "integer" +}, +"bigqueryConfig": { +"$ref": "BigQueryConfig", +"description": "Optional. If delivery to BigQuery is used with this subscription, this field is used to configure it." +}, +"cloudStorageConfig": { +"$ref": "CloudStorageConfig", +"description": "Optional. If delivery to Google Cloud Storage is used with this subscription, this field is used to configure it." +}, +"deadLetterPolicy": { +"$ref": "DeadLetterPolicy", +"description": "Optional. A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription." +}, +"detached": { +"description": "Optional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.", +"type": "boolean" +}, +"enableExactlyOnceDelivery": { +"description": "Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.", +"type": "boolean" +}, +"enableMessageOrdering": { +"description": "Optional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order.", +"type": "boolean" +}, +"expirationPolicy": { +"$ref": "ExpirationPolicy", +"description": "Optional. A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If `expiration_policy` is not set, a *default policy* with `ttl` of 31 days will be used. The minimum allowed value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set, but `expiration_policy.ttl` is not set, the subscription never expires." +}, +"filter": { +"description": "Optional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).", +"type": "object" +}, +"messageRetentionDuration": { +"description": "Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.", +"format": "google-duration", +"type": "string" +}, +"name": { +"description": "Required. The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"type": "string" +}, +"pushConfig": { +"$ref": "PushConfig", +"description": "Optional. If push delivery is used with this subscription, this field is used to configure it." +}, +"retainAckedMessages": { +"description": "Optional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to [`Seek` to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in the past to replay previously-acknowledged messages.", +"type": "boolean" +}, +"retryPolicy": { +"$ref": "RetryPolicy", +"description": "Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message." +}, +"state": { +"description": "Output only. An output-only field indicating whether or not the subscription can receive messages.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"RESOURCE_ERROR" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The subscription can actively receive messages", +"The subscription cannot receive messages because of an error with the resource to which it pushes messages. See the more detailed error state in the corresponding configuration." +], +"readOnly": true, +"type": "string" +}, +"topic": { +"description": "Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted.", +"type": "string" +}, +"topicMessageRetentionDuration": { +"description": "Output only. Indicates the minimum duration for which a message is retained after it is published to the subscription's topic. If this field is set, messages published to the subscription's topic in the last `topic_message_retention_duration` are always available to subscribers. See the `message_retention_duration` field in `Topic`. This field is set only in responses from the server; it is ignored if it is set in any requests.", +"format": "google-duration", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TextConfig": { +"description": "Configuration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline.", +"id": "TextConfig", +"properties": {}, +"type": "object" +}, +"Topic": { +"description": "A topic resource.", +"id": "Topic", +"properties": { +"ingestionDataSourceSettings": { +"$ref": "IngestionDataSourceSettings", +"description": "Optional. Settings for ingestion from a data source into this topic." +}, +"kmsKeyName": { +"description": "Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).", +"type": "object" +}, +"messageRetentionDuration": { +"description": "Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.", +"format": "google-duration", +"type": "string" +}, +"messageStoragePolicy": { +"$ref": "MessageStoragePolicy", +"description": "Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect." +}, +"name": { +"description": "Required. The name of the topic. It must have the format `\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"type": "string" +}, +"satisfiesPzs": { +"description": "Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.", +"type": "boolean" +}, +"schemaSettings": { +"$ref": "SchemaSettings", +"description": "Optional. Settings for validating messages published against a schema." +}, +"state": { +"description": "Output only. An output-only field indicating the state of the topic.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INGESTION_RESOURCE_ERROR" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The topic does not have any persistent errors.", +"Ingestion from the data source has encountered a permanent error. See the more detailed error state in the corresponding ingestion source configuration." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"UpdateSnapshotRequest": { +"description": "Request for the UpdateSnapshot method.", +"id": "UpdateSnapshotRequest", +"properties": { +"snapshot": { +"$ref": "Snapshot", +"description": "Required. The updated snapshot object." +}, +"updateMask": { +"description": "Required. Indicates which fields in the provided snapshot to update. Must be specified and non-empty.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateSubscriptionRequest": { +"description": "Request for the UpdateSubscription method.", +"id": "UpdateSubscriptionRequest", +"properties": { +"subscription": { +"$ref": "Subscription", +"description": "Required. The updated subscription object." +}, +"updateMask": { +"description": "Required. Indicates which fields in the provided subscription to update. Must be specified and non-empty.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateTopicRequest": { +"description": "Request for the UpdateTopic method.", +"id": "UpdateTopicRequest", +"properties": { +"topic": { +"$ref": "Topic", +"description": "Required. The updated topic object." +}, +"updateMask": { +"description": "Required. Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if `update_mask` contains \"message_storage_policy\" but the `message_storage_policy` is not set in the `topic` provided above, then the updated value is determined by the policy configured at the project or organization level.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"ValidateMessageRequest": { +"description": "Request for the `ValidateMessage` method.", +"id": "ValidateMessageRequest", +"properties": { +"encoding": { +"description": "The encoding expected for messages", +"enum": [ +"ENCODING_UNSPECIFIED", +"JSON", +"BINARY" +], +"enumDescriptions": [ +"Unspecified", +"JSON encoding", +"Binary encoding, as defined by the schema type. For some schema types, binary encoding may not be available." +], +"type": "string" +}, +"message": { +"description": "Message to validate against the provided `schema_spec`.", +"format": "byte", +"type": "string" +}, +"name": { +"description": "Name of the schema against which to validate. Format is `projects/{project}/schemas/{schema}`.", +"type": "string" +}, +"schema": { +"$ref": "Schema", +"description": "Ad-hoc schema against which to validate" +} +}, +"type": "object" +}, +"ValidateMessageResponse": { +"description": "Response for the `ValidateMessage` method. Empty for now.", +"id": "ValidateMessageResponse", +"properties": {}, +"type": "object" +}, +"ValidateSchemaRequest": { +"description": "Request for the `ValidateSchema` method.", +"id": "ValidateSchemaRequest", +"properties": { +"schema": { +"$ref": "Schema", +"description": "Required. The schema object to validate." +} +}, +"type": "object" +}, +"ValidateSchemaResponse": { +"description": "Response for the `ValidateSchema` method. Empty for now.", +"id": "ValidateSchemaResponse", +"properties": {}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Pub/Sub API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1beta1a.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1beta1a.json new file mode 100644 index 0000000000000000000000000000000000000000..61ff0c4818b13b5ab7f0b88e9a90eba1e09131a0 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1beta1a.json @@ -0,0 +1,815 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/pubsub": { +"description": "View and manage Pub/Sub topics and subscriptions" +} +} +} +}, +"basePath": "", +"baseUrl": "https://pubsub.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Pubsub", +"description": "Provides reliable, many-to-many, asynchronous messaging between applications. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/pubsub/docs", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", +"location": "me-central2" +}, +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", +"location": "europe-west3" +}, +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", +"location": "europe-west9" +} +], +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "pubsub:v1beta1a", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://pubsub.mtls.googleapis.com/", +"name": "pubsub", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"subscriptions": { +"methods": { +"acknowledge": { +"description": "Acknowledges a particular received message: the Pub/Sub system can remove the given message from the subscription. Acknowledging a message whose Ack deadline has expired may succeed, but the message could have been already redelivered. Acknowledging a message more than once will not result in an error. This is only used for messages received via pull.", +"flatPath": "v1beta1a/subscriptions/acknowledge", +"httpMethod": "POST", +"id": "pubsub.subscriptions.acknowledge", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/subscriptions/acknowledge", +"request": { +"$ref": "AcknowledgeRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"create": { +"description": "Creates a subscription on a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.", +"flatPath": "v1beta1a/subscriptions", +"httpMethod": "POST", +"id": "pubsub.subscriptions.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/subscriptions", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND.", +"flatPath": "v1beta1a/subscriptions/{subscriptionsId}", +"httpMethod": "DELETE", +"id": "pubsub.subscriptions.delete", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The subscription to delete.", +"location": "path", +"pattern": "^.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1a/subscriptions/{+subscription}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets the configuration details of a subscription.", +"flatPath": "v1beta1a/subscriptions/{subscriptionsId}", +"httpMethod": "GET", +"id": "pubsub.subscriptions.get", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The name of the subscription to get.", +"location": "path", +"pattern": "^.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1a/subscriptions/{+subscription}", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists matching subscriptions.", +"flatPath": "v1beta1a/subscriptions", +"httpMethod": "GET", +"id": "pubsub.subscriptions.list", +"parameterOrder": [], +"parameters": { +"maxResults": { +"description": "Maximum number of subscriptions to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value obtained in the last ListSubscriptionsResponse for continuation.", +"location": "query", +"type": "string" +}, +"query": { +"description": "A valid label query expression.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1a/subscriptions", +"response": { +"$ref": "ListSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"modifyAckDeadline": { +"description": "Modifies the Ack deadline for a message received from a pull request.", +"flatPath": "v1beta1a/subscriptions/modifyAckDeadline", +"httpMethod": "POST", +"id": "pubsub.subscriptions.modifyAckDeadline", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/subscriptions/modifyAckDeadline", +"request": { +"$ref": "ModifyAckDeadlineRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"modifyPushConfig": { +"description": "Modifies the PushConfig for a specified subscription. This method can be used to suspend the flow of messages to an endpoint by clearing the PushConfig field in the request. Messages will be accumulated for delivery even if no push configuration is defined or while the configuration is modified.", +"flatPath": "v1beta1a/subscriptions/modifyPushConfig", +"httpMethod": "POST", +"id": "pubsub.subscriptions.modifyPushConfig", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/subscriptions/modifyPushConfig", +"request": { +"$ref": "ModifyPushConfigRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"pull": { +"description": "Pulls a single message from the server. If return_immediately is true, and no messages are available in the subscription, this method returns FAILED_PRECONDITION. The system is free to return an UNAVAILABLE error if no messages are available in a reasonable amount of time (to reduce system load).", +"flatPath": "v1beta1a/subscriptions/pull", +"httpMethod": "POST", +"id": "pubsub.subscriptions.pull", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/subscriptions/pull", +"request": { +"$ref": "PullRequest" +}, +"response": { +"$ref": "PullResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"pullBatch": { +"description": "Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The system is free to return UNAVAILABLE if there are too many pull requests outstanding for the given subscription.", +"flatPath": "v1beta1a/subscriptions/pullBatch", +"httpMethod": "POST", +"id": "pubsub.subscriptions.pullBatch", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/subscriptions/pullBatch", +"request": { +"$ref": "PullBatchRequest" +}, +"response": { +"$ref": "PullBatchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +}, +"topics": { +"methods": { +"create": { +"description": "Creates the given topic with the given name.", +"flatPath": "v1beta1a/topics", +"httpMethod": "POST", +"id": "pubsub.topics.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/topics", +"request": { +"$ref": "Topic" +}, +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name.", +"flatPath": "v1beta1a/topics/{topicsId}", +"httpMethod": "DELETE", +"id": "pubsub.topics.delete", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Name of the topic to delete.", +"location": "path", +"pattern": "^.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1a/topics/{+topic}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets the configuration of a topic. Since the topic only has the name attribute, this method is only useful to check the existence of a topic. If other attributes are added in the future, they will be returned here.", +"flatPath": "v1beta1a/topics/{topicsId}", +"httpMethod": "GET", +"id": "pubsub.topics.get", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "The name of the topic to get.", +"location": "path", +"pattern": "^.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1a/topics/{+topic}", +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists matching topics.", +"flatPath": "v1beta1a/topics", +"httpMethod": "GET", +"id": "pubsub.topics.list", +"parameterOrder": [], +"parameters": { +"maxResults": { +"description": "Maximum number of topics to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value obtained in the last ListTopicsResponse for continuation.", +"location": "query", +"type": "string" +}, +"query": { +"description": "A valid label query expression.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1a/topics", +"response": { +"$ref": "ListTopicsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"publish": { +"description": "Adds a message to the topic. Returns NOT_FOUND if the topic does not exist.", +"flatPath": "v1beta1a/topics/publish", +"httpMethod": "POST", +"id": "pubsub.topics.publish", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/topics/publish", +"request": { +"$ref": "PublishRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"publishBatch": { +"description": "Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.", +"flatPath": "v1beta1a/topics/publishBatch", +"httpMethod": "POST", +"id": "pubsub.topics.publishBatch", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1a/topics/publishBatch", +"request": { +"$ref": "PublishBatchRequest" +}, +"response": { +"$ref": "PublishBatchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://pubsub.googleapis.com/", +"schemas": { +"AcknowledgeRequest": { +"description": "Request for the Acknowledge method.", +"id": "AcknowledgeRequest", +"properties": { +"ackId": { +"description": "The acknowledgment ID for the message being acknowledged. This was returned by the Pub/Sub system in the Pull response.", +"items": { +"type": "string" +}, +"type": "array" +}, +"subscription": { +"description": "The subscription whose message is being acknowledged.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "An empty message that you can re-use to avoid defining duplicated empty messages in your project. A typical example is to use it as argument or the return value of a service API. For instance: service Foo { rpc Bar (proto2.Empty) returns (proto2.Empty) { }; }; BEGIN GOOGLE-INTERNAL The difference between this one and net/rpc/empty-message.proto is that 1) The generated message here is in proto2 C++ API. 2) The proto2.Empty has minimum dependencies (no message_set or net/rpc dependencies) END GOOGLE-INTERNAL", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Label": { +"description": "A key-value pair applied to a given object.", +"id": "Label", +"properties": { +"key": { +"description": "The key of a label is a syntactically valid URL (as per RFC 1738) with the \"scheme\" and initial slashes omitted and with the additional restrictions noted below. Each key should be globally unique. The \"host\" portion is called the \"namespace\" and is not necessarily resolvable to a network endpoint. Instead, the namespace indicates what system or entity defines the semantics of the label. Namespaces do not restrict the set of objects to which a label may be associated. Keys are defined by the following grammar: key = hostname \"/\" kpath kpath = ksegment *[ \"/\" ksegment ] ksegment = alphadigit | *[ alphadigit | \"-\" | \"_\" | \".\" ] where \"hostname\" and \"alphadigit\" are defined as in RFC 1738. Example key: spanner.google.com/universe", +"type": "string" +}, +"numValue": { +"description": "An integer value.", +"format": "int64", +"type": "string" +}, +"strValue": { +"description": "A string value.", +"type": "string" +} +}, +"type": "object" +}, +"ListSubscriptionsResponse": { +"description": "Response for the ListSubscriptions method.", +"id": "ListSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there are more subscriptions that match the request and this value should be passed to the next ListSubscriptionsRequest to continue.", +"type": "string" +}, +"subscription": { +"description": "The subscriptions that match the request.", +"items": { +"$ref": "Subscription" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicsResponse": { +"description": "Response for the ListTopics method.", +"id": "ListTopicsResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there are more topics that match the request, and this value should be passed to the next ListTopicsRequest to continue.", +"type": "string" +}, +"topic": { +"description": "The resulting topics.", +"items": { +"$ref": "Topic" +}, +"type": "array" +} +}, +"type": "object" +}, +"ModifyAckDeadlineRequest": { +"description": "Request for the ModifyAckDeadline method.", +"id": "ModifyAckDeadlineRequest", +"properties": { +"ackDeadlineSeconds": { +"description": "The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the ModifyAckDeadline call was made. Specifying zero may immediately make the message available for another pull request.", +"format": "int32", +"type": "integer" +}, +"ackId": { +"deprecated": true, +"description": "The acknowledgment ID. Either this or ack_ids must be populated, not both.", +"type": "string" +}, +"ackIds": { +"description": "List of acknowledgment IDs. Either this field or ack_id should be populated, not both.", +"items": { +"type": "string" +}, +"type": "array" +}, +"subscription": { +"description": "Next Index: 5 The name of the subscription from which messages are being pulled.", +"type": "string" +} +}, +"type": "object" +}, +"ModifyPushConfigRequest": { +"description": "Request for the ModifyPushConfig method.", +"id": "ModifyPushConfigRequest", +"properties": { +"pushConfig": { +"$ref": "PushConfig", +"description": "An empty push_config indicates that the Pub/Sub system should pause pushing messages from the given subscription." +}, +"subscription": { +"description": "The name of the subscription.", +"type": "string" +} +}, +"type": "object" +}, +"PublishBatchRequest": { +"description": "Request for the PublishBatch method.", +"id": "PublishBatchRequest", +"properties": { +"messages": { +"description": "The messages to publish.", +"items": { +"$ref": "PubsubMessage" +}, +"type": "array" +}, +"topic": { +"description": "The messages in the request will be published on this topic.", +"type": "string" +} +}, +"type": "object" +}, +"PublishBatchResponse": { +"description": "Response for the PublishBatch method.", +"id": "PublishBatchResponse", +"properties": { +"messageIds": { +"description": "The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PublishRequest": { +"description": "Request for the Publish method.", +"id": "PublishRequest", +"properties": { +"message": { +"$ref": "PubsubMessage", +"description": "The message to publish." +}, +"topic": { +"description": "The message in the request will be published on this topic.", +"type": "string" +} +}, +"type": "object" +}, +"PubsubEvent": { +"description": "An event indicating a received message or truncation event.", +"id": "PubsubEvent", +"properties": { +"deleted": { +"description": "Indicates that this subscription has been deleted. (Note that pull subscribers will always receive NOT_FOUND in response in their pull request on the subscription, rather than seeing this boolean.)", +"type": "boolean" +}, +"message": { +"$ref": "PubsubMessage", +"description": "A received message." +}, +"subscription": { +"description": "The subscription that received the event.", +"type": "string" +}, +"truncated": { +"description": "Indicates that this subscription has been truncated.", +"type": "boolean" +} +}, +"type": "object" +}, +"PubsubMessage": { +"description": "A message data and its labels.", +"id": "PubsubMessage", +"properties": { +"data": { +"description": "The message payload.", +"format": "byte", +"type": "string" +}, +"label": { +"description": "Optional list of labels for this message. Keys in this collection must be unique.", +"items": { +"$ref": "Label" +}, +"type": "array" +}, +"messageId": { +"description": "ID of this message assigned by the server at publication time. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a PubsubMessage via a Pull call or a push delivery. It must not be populated by a publisher in a Publish call.", +"type": "string" +}, +"publishTime": { +"description": "The time at which the message was published. The time is milliseconds since the UNIX epoch.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PullBatchRequest": { +"description": "Request for the PullBatch method.", +"id": "PullBatchRequest", +"properties": { +"maxEvents": { +"description": "The maximum number of PubsubEvents returned for this request. The Pub/Sub system may return fewer than the number of events specified.", +"format": "int32", +"type": "integer" +}, +"returnImmediately": { +"description": "If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response.", +"type": "boolean" +}, +"subscription": { +"description": "The subscription from which messages should be pulled.", +"type": "string" +} +}, +"type": "object" +}, +"PullBatchResponse": { +"description": "Response for the PullBatch method.", +"id": "PullBatchResponse", +"properties": { +"pullResponses": { +"description": "Received Pub/Sub messages or status events. The Pub/Sub system will return zero messages if there are no more messages available in the backlog. The Pub/Sub system may return fewer than the max_events requested even if there are more messages available in the backlog.", +"items": { +"$ref": "PullResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"PullRequest": { +"description": "Request for the Pull method.", +"id": "PullRequest", +"properties": { +"returnImmediately": { +"description": "If this is specified as true the system will respond immediately even if it is not able to return a message in the Pull response. Otherwise the system is allowed to wait until at least one message is available rather than returning FAILED_PRECONDITION. The client may cancel the request if it does not wish to wait any longer for the response.", +"type": "boolean" +}, +"subscription": { +"description": "The subscription from which a message should be pulled.", +"type": "string" +} +}, +"type": "object" +}, +"PullResponse": { +"description": "Either a PubsubMessage or a truncation event. One of these two must be populated.", +"id": "PullResponse", +"properties": { +"ackId": { +"description": "This ID must be used to acknowledge the received event or message.", +"type": "string" +}, +"pubsubEvent": { +"$ref": "PubsubEvent", +"description": "A pubsub message or truncation event." +} +}, +"type": "object" +}, +"PushConfig": { +"description": "Configuration for a push delivery endpoint.", +"id": "PushConfig", +"properties": { +"pushEndpoint": { +"description": "A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use \"https://example.com/push\".", +"type": "string" +} +}, +"type": "object" +}, +"Subscription": { +"description": "A subscription resource.", +"id": "Subscription", +"properties": { +"ackDeadlineSeconds": { +"description": "For either push or pull delivery, the value is the maximum time after a subscriber receives a message before the subscriber should acknowledge or Nack the message. If the Ack deadline for a message passes without an Ack or a Nack, the Pub/Sub system will eventually redeliver the message. If a subscriber acknowledges after the deadline, the Pub/Sub system may accept the Ack, but it is possible that the message has been already delivered again. Multiple Acks to the message are allowed and will succeed. For push delivery, this value is used to set the request timeout for the call to the push endpoint. For pull delivery, this value is used as the initial value for the Ack deadline. It may be overridden for each message using its corresponding ack_id with ModifyAckDeadline. While a message is outstanding (i.e. it has been delivered to a pull subscriber and the subscriber has not yet Acked or Nacked), the Pub/Sub system will not deliver that message to another pull subscriber (on a best-effort basis).", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Name of the subscription.", +"type": "string" +}, +"pushConfig": { +"$ref": "PushConfig", +"description": "If push delivery is used with this subscription, this field is used to configure it." +}, +"topic": { +"description": "The name of the topic from which this subscription is receiving messages.", +"type": "string" +} +}, +"type": "object" +}, +"Topic": { +"description": "A topic resource.", +"id": "Topic", +"properties": { +"name": { +"description": "Name of the topic.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Pub/Sub API", +"version": "v1beta1a" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1beta2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1beta2.json new file mode 100644 index 0000000000000000000000000000000000000000..7c2aa34fa9d37f2a0abe6d7f0a309cd50302bbc3 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsub.v1beta2.json @@ -0,0 +1,1141 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/pubsub": { +"description": "View and manage Pub/Sub topics and subscriptions" +} +} +} +}, +"basePath": "", +"baseUrl": "https://pubsub.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Pubsub", +"description": "Provides reliable, many-to-many, asynchronous messaging between applications. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/pubsub/docs", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.me-central2.rep.googleapis.com/", +"location": "me-central2" +}, +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.europe-west3.rep.googleapis.com/", +"location": "europe-west3" +}, +{ +"description": "Regional Endpoint", +"endpointUrl": "https://pubsub.europe-west9.rep.googleapis.com/", +"location": "europe-west9" +} +], +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "pubsub:v1beta2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://pubsub.mtls.googleapis.com/", +"name": "pubsub", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"subscriptions": { +"methods": { +"acknowledge": { +"description": "Acknowledges the messages associated with the `ack_ids` in the `AcknowledgeRequest`. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:acknowledge", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.acknowledge", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The subscription whose message is being acknowledged.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+subscription}:acknowledge", +"request": { +"$ref": "AcknowledgeRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"create": { +"description": "Creates a subscription to a given topic. If the subscription already exists, returns `ALREADY_EXISTS`. If the corresponding topic doesn't exist, returns `NOT_FOUND`. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic. Note that for REST API requests, you must specify a name.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", +"httpMethod": "PUT", +"id": "pubsub.projects.subscriptions.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to `Pull` after deletion will return `NOT_FOUND`. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", +"httpMethod": "DELETE", +"id": "pubsub.projects.subscriptions.delete", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The subscription to delete.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+subscription}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets the configuration details of a subscription.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}", +"httpMethod": "GET", +"id": "pubsub.projects.subscriptions.get", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The name of the subscription to get.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+subscription}", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:getIamPolicy", +"httpMethod": "GET", +"id": "pubsub.projects.subscriptions.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists matching subscriptions.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions", +"httpMethod": "GET", +"id": "pubsub.projects.subscriptions.list", +"parameterOrder": [ +"project" +], +"parameters": { +"pageSize": { +"description": "Maximum number of subscriptions to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSubscriptionsResponse`; indicates that this is a continuation of a prior `ListSubscriptions` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"project": { +"description": "The name of the cloud project that subscriptions belong to.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+project}/subscriptions", +"response": { +"$ref": "ListSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"modifyAckDeadline": { +"description": "Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted. Note that this does not modify the subscription-level `ackDeadlineSeconds` used for subsequent messages.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyAckDeadline", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.modifyAckDeadline", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The name of the subscription.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+subscription}:modifyAckDeadline", +"request": { +"$ref": "ModifyAckDeadlineRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"modifyPushConfig": { +"description": "Modifies the `PushConfig` for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty `PushConfig`) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the `PushConfig`.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:modifyPushConfig", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.modifyPushConfig", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The name of the subscription.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+subscription}:modifyPushConfig", +"request": { +"$ref": "ModifyPushConfigRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"pull": { +"description": "Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:pull", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.pull", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The subscription from which messages should be pulled.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+subscription}:pull", +"request": { +"$ref": "PullRequest" +}, +"response": { +"$ref": "PullResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:setIamPolicy", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta2/projects/{projectsId}/subscriptions/{subscriptionsId}:testIamPermissions", +"httpMethod": "POST", +"id": "pubsub.projects.subscriptions.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +}, +"topics": { +"methods": { +"create": { +"description": "Creates the given topic with the given name.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", +"httpMethod": "PUT", +"id": "pubsub.projects.topics.create", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the topic. It must have the format `\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "Topic" +}, +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"delete": { +"description": "Deletes the topic with the given name. Returns `NOT_FOUND` if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted, but their `topic` field is set to `_deleted-topic_`.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", +"httpMethod": "DELETE", +"id": "pubsub.projects.topics.delete", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Name of the topic to delete.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+topic}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"get": { +"description": "Gets the configuration of a topic.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}", +"httpMethod": "GET", +"id": "pubsub.projects.topics.get", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "The name of the topic to get.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+topic}", +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:getIamPolicy", +"httpMethod": "GET", +"id": "pubsub.projects.topics.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"list": { +"description": "Lists matching topics.", +"flatPath": "v1beta2/projects/{projectsId}/topics", +"httpMethod": "GET", +"id": "pubsub.projects.topics.list", +"parameterOrder": [ +"project" +], +"parameters": { +"pageSize": { +"description": "Maximum number of topics to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListTopicsResponse`; indicates that this is a continuation of a prior `ListTopics` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"project": { +"description": "The name of the cloud project that topics belong to.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+project}/topics", +"response": { +"$ref": "ListTopicsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"publish": { +"description": "Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic does not exist. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:publish", +"httpMethod": "POST", +"id": "pubsub.projects.topics.publish", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "The messages in the request will be published on this topic.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+topic}:publish", +"request": { +"$ref": "PublishRequest" +}, +"response": { +"$ref": "PublishResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:setIamPolicy", +"httpMethod": "POST", +"id": "pubsub.projects.topics.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}:testIamPermissions", +"httpMethod": "POST", +"id": "pubsub.projects.topics.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +}, +"resources": { +"subscriptions": { +"methods": { +"list": { +"description": "Lists the name of the subscriptions for this topic.", +"flatPath": "v1beta2/projects/{projectsId}/topics/{topicsId}/subscriptions", +"httpMethod": "GET", +"id": "pubsub.projects.topics.subscriptions.list", +"parameterOrder": [ +"topic" +], +"parameters": { +"pageSize": { +"description": "Maximum number of subscription names to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListTopicSubscriptionsResponse`; indicates that this is a continuation of a prior `ListTopicSubscriptions` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"topic": { +"description": "The name of the topic that subscriptions are attached to.", +"location": "path", +"pattern": "^projects/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+topic}/subscriptions", +"response": { +"$ref": "ListTopicSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/pubsub" +] +} +} +} +} +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://pubsub.googleapis.com/", +"schemas": { +"AcknowledgeRequest": { +"description": "Request for the Acknowledge method.", +"id": "AcknowledgeRequest", +"properties": { +"ackIds": { +"description": "The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the `Pull` response. Must not be empty.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ListSubscriptionsResponse": { +"description": "Response for the `ListSubscriptions` method.", +"id": "ListSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListSubscriptionsRequest` to get more subscriptions.", +"type": "string" +}, +"subscriptions": { +"description": "The subscriptions that match the request.", +"items": { +"$ref": "Subscription" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicSubscriptionsResponse": { +"description": "Response for the `ListTopicSubscriptions` method.", +"id": "ListTopicSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new `ListTopicSubscriptionsRequest` to get more subscriptions.", +"type": "string" +}, +"subscriptions": { +"description": "The names of the subscriptions that match the request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicsResponse": { +"description": "Response for the `ListTopics` method.", +"id": "ListTopicsResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there may be more topics that match the request; this value should be passed in a new `ListTopicsRequest`.", +"type": "string" +}, +"topics": { +"description": "The resulting topics.", +"items": { +"$ref": "Topic" +}, +"type": "array" +} +}, +"type": "object" +}, +"ModifyAckDeadlineRequest": { +"description": "Request for the ModifyAckDeadline method.", +"id": "ModifyAckDeadlineRequest", +"properties": { +"ackDeadlineSeconds": { +"description": "The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the `ModifyAckDeadline` call was made. Specifying zero may immediately make the message available for another pull request.", +"format": "int32", +"type": "integer" +}, +"ackId": { +"description": "The acknowledgment ID. Either this or ack_ids must be populated, but not both.", +"type": "string" +}, +"ackIds": { +"description": "List of acknowledgment IDs.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ModifyPushConfigRequest": { +"description": "Request for the ModifyPushConfig method.", +"id": "ModifyPushConfigRequest", +"properties": { +"pushConfig": { +"$ref": "PushConfig", +"description": "The push configuration for future deliveries. An empty `pushConfig` indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if `Pull` is not called." +} +}, +"type": "object" +}, +"OidcToken": { +"description": "Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect).", +"id": "OidcToken", +"properties": { +"audience": { +"description": "Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.", +"type": "string" +}, +"serviceAccountEmail": { +"description": "[Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating the OIDC token. The caller (for CreateSubscription, UpdateSubscription, and ModifyPushConfig RPCs) must have the iam.serviceAccounts.actAs permission for the service account.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PublishRequest": { +"description": "Request for the Publish method.", +"id": "PublishRequest", +"properties": { +"messages": { +"description": "The messages to publish.", +"items": { +"$ref": "PubsubMessage" +}, +"type": "array" +} +}, +"type": "object" +}, +"PublishResponse": { +"description": "Response for the `Publish` method.", +"id": "PublishResponse", +"properties": { +"messageIds": { +"description": "The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PubsubMessage": { +"description": "A message data and its attributes. The message payload must not be empty; it must contain either a non-empty data field, or at least one attribute.", +"id": "PubsubMessage", +"properties": { +"attributes": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional attributes for this message.", +"type": "object" +}, +"data": { +"description": "The message payload. For JSON requests, the value of this field must be [base64-encoded](https://tools.ietf.org/html/rfc4648).", +"format": "byte", +"type": "string" +}, +"messageId": { +"description": "ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.", +"type": "string" +}, +"publishTime": { +"description": "The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"PullRequest": { +"description": "Request for the `Pull` method.", +"id": "PullRequest", +"properties": { +"maxMessages": { +"description": "The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified.", +"format": "int32", +"type": "integer" +}, +"returnImmediately": { +"deprecated": true, +"description": "Optional. If this is specified as true the system will respond immediately even if it is not able to return a message in the `Pull` response. Otherwise the system is allowed to wait until at least one message is available rather than returning no messages. The client may cancel the request if it does not wish to wait any longer for the response. Warning: setting this field to `true` is discouraged because it adversely impacts the performance of `Pull` operations. We recommend that users do not set this field.", +"type": "boolean" +} +}, +"type": "object" +}, +"PullResponse": { +"description": "Response for the `Pull` method.", +"id": "PullResponse", +"properties": { +"receivedMessages": { +"description": "Received Pub/Sub messages. The Pub/Sub system will return zero messages if there are no more available in the backlog. The Pub/Sub system may return fewer than the `maxMessages` requested even if there are more messages available in the backlog.", +"items": { +"$ref": "ReceivedMessage" +}, +"type": "array" +} +}, +"type": "object" +}, +"PushConfig": { +"description": "Configuration for a push delivery endpoint.", +"id": "PushConfig", +"properties": { +"attributes": { +"additionalProperties": { +"type": "string" +}, +"description": "Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is `x-goog-version`, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the `CreateSubscription` call, it will default to the version of the API used to make such call. If not present during a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API.", +"type": "object" +}, +"oidcToken": { +"$ref": "OidcToken", +"description": "If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message." +}, +"pushEndpoint": { +"description": "A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use \"https://example.com/push\".", +"type": "string" +} +}, +"type": "object" +}, +"ReceivedMessage": { +"description": "A message and its corresponding acknowledgment ID.", +"id": "ReceivedMessage", +"properties": { +"ackId": { +"description": "This ID can be used to acknowledge the received message.", +"type": "string" +}, +"message": { +"$ref": "PubsubMessage", +"description": "The message." +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"Subscription": { +"description": "A subscription resource.", +"id": "Subscription", +"properties": { +"ackDeadlineSeconds": { +"description": "This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using pull. The maximum custom deadline you can specify is 600 seconds (10 minutes). For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is 0, a default value of 10 seconds is used.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"type": "string" +}, +"pushConfig": { +"$ref": "PushConfig", +"description": "If push delivery is used with this subscription, this field is used to configure it. An empty `pushConfig` signifies that the subscriber will pull and ack messages using API methods." +}, +"topic": { +"description": "The name of the topic from which this subscription is receiving messages. The value of this field will be `_deleted-topic_` if the topic has been deleted.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Topic": { +"description": "A topic resource.", +"id": "Topic", +"properties": { +"name": { +"description": "The name of the topic. It must have the format `\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Pub/Sub API", +"version": "v1beta2" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsublite.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsublite.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..a7c0360da3b490229edc469767d2c183c2975231 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/pubsublite.v1.json @@ -0,0 +1,1696 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://pubsublite.googleapis.com/", +"batchPath": "batch", +"canonicalName": "PubsubLite", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/pubsub/lite/docs", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "pubsublite:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://pubsublite.mtls.googleapis.com/", +"name": "pubsublite", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"admin": { +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "pubsublite.admin.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "pubsublite.admin.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"reservations": { +"methods": { +"create": { +"description": "Creates a new reservation.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/reservations", +"httpMethod": "POST", +"id": "pubsublite.admin.projects.locations.reservations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent location in which to create the reservation. Structured like `projects/{project_number}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"reservationId": { +"description": "Required. The ID to use for the reservation, which will become the final component of the reservation's name. This value is structured like: `my-reservation-name`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+parent}/reservations", +"request": { +"$ref": "Reservation" +}, +"response": { +"$ref": "Reservation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified reservation.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/reservations/{reservationsId}", +"httpMethod": "DELETE", +"id": "pubsublite.admin.projects.locations.reservations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the reservation to delete. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/reservations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the reservation configuration.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/reservations/{reservationsId}", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.reservations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the reservation whose configuration to return. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/reservations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Reservation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns the list of reservations for the given project.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/reservations", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.reservations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of reservations to return. The service may return fewer than this value. If unset or zero, all reservations for the parent will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListReservations` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReservations` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent whose reservations are to be listed. Structured like `projects/{project_number}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+parent}/reservations", +"response": { +"$ref": "ListReservationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates properties of the specified reservation.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/reservations/{reservationsId}", +"httpMethod": "PATCH", +"id": "pubsublite.admin.projects.locations.reservations.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/reservations/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. A mask specifying the reservation fields to change.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"request": { +"$ref": "Reservation" +}, +"response": { +"$ref": "Reservation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"topics": { +"methods": { +"list": { +"description": "Lists the topics attached to the specified reservation.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/reservations/{reservationsId}/topics", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.reservations.topics.list", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the reservation whose topics to list. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/reservations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of topics to return. The service may return fewer than this value. If unset or zero, all topics for the given reservation will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListReservationTopics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReservationTopics` must match the call that provided the page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+name}/topics", +"response": { +"$ref": "ListReservationTopicsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"subscriptions": { +"methods": { +"create": { +"description": "Creates a new subscription.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/subscriptions", +"httpMethod": "POST", +"id": "pubsublite.admin.projects.locations.subscriptions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent location in which to create the subscription. Structured like `projects/{project_number}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"skipBacklog": { +"description": "If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false.", +"location": "query", +"type": "boolean" +}, +"subscriptionId": { +"description": "Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: `my-sub-name`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+parent}/subscriptions", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified subscription.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", +"httpMethod": "DELETE", +"id": "pubsublite.admin.projects.locations.subscriptions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the subscription configuration.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.subscriptions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription whose configuration to return.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns the list of subscriptions for the given project.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/subscriptions", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.subscriptions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of subscriptions to return. The service may return fewer than this value. If unset or zero, all subscriptions for the parent will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListSubscriptions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscriptions` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent whose subscriptions are to be listed. Structured like `projects/{project_number}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+parent}/subscriptions", +"response": { +"$ref": "ListSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates properties of the specified subscription.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}", +"httpMethod": "PATCH", +"id": "pubsublite.admin.projects.locations.subscriptions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the subscription. Structured like: projects/{project_number}/locations/{location}/subscriptions/{subscription_id}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. A mask specifying the subscription fields to change.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"seek": { +"description": "Performs an out-of-band seek for a subscription to a specified target, which may be timestamps or named positions within the message backlog. Seek translates these targets to cursors for each partition and orchestrates subscribers to start consuming messages from these seek cursors. If an operation is returned, the seek has been registered and subscribers will eventually receive messages from the seek cursors (i.e. eventual consistency), as long as they are using a minimum supported client library version and not a system that tracks cursors independently of Pub/Sub Lite (e.g. Apache Beam, Dataflow, Spark). The seek operation will fail for unsupported clients. If clients would like to know when subscribers react to the seek (or not), they can poll the operation. The seek operation will succeed and complete once subscribers are ready to receive messages from the seek cursors for all partitions of the topic. This means that the seek operation will not complete until all subscribers come online. If the previous seek operation has not yet completed, it will be aborted and the new invocation of seek will supersede it.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:seek", +"httpMethod": "POST", +"id": "pubsublite.admin.projects.locations.subscriptions.seek", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription to seek.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}:seek", +"request": { +"$ref": "SeekSubscriptionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"topics": { +"methods": { +"create": { +"description": "Creates a new topic.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/topics", +"httpMethod": "POST", +"id": "pubsublite.admin.projects.locations.topics.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent location in which to create the topic. Structured like `projects/{project_number}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"topicId": { +"description": "Required. The ID to use for the topic, which will become the final component of the topic's name. This value is structured like: `my-topic-name`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+parent}/topics", +"request": { +"$ref": "Topic" +}, +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified topic.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}", +"httpMethod": "DELETE", +"id": "pubsublite.admin.projects.locations.topics.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the topic to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the topic configuration.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.topics.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the topic whose configuration to return.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getPartitions": { +"description": "Returns the partition information for the requested topic.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}/partitions", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.topics.getPartitions", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The topic whose partition information to return.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+name}/partitions", +"response": { +"$ref": "TopicPartitions" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns the list of topics for the given project.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/topics", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.topics.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of topics to return. The service may return fewer than this value. If unset or zero, all topics for the parent will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListTopics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTopics` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent whose topics are to be listed. Structured like `projects/{project_number}/locations/{location}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/admin/{+parent}/topics", +"response": { +"$ref": "ListTopicsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates properties of the specified topic.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}", +"httpMethod": "PATCH", +"id": "pubsublite.admin.projects.locations.topics.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. A mask specifying the topic fields to change.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+name}", +"request": { +"$ref": "Topic" +}, +"response": { +"$ref": "Topic" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"subscriptions": { +"methods": { +"list": { +"description": "Lists the subscriptions attached to the specified topic.", +"flatPath": "v1/admin/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}/subscriptions", +"httpMethod": "GET", +"id": "pubsublite.admin.projects.locations.topics.subscriptions.list", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the topic whose subscriptions to list.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of subscriptions to return. The service may return fewer than this value. If unset or zero, all subscriptions for the given topic will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListTopicSubscriptions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTopicSubscriptions` must match the call that provided the page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/admin/{+name}/subscriptions", +"response": { +"$ref": "ListTopicSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +} +}, +"cursor": { +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"subscriptions": { +"methods": { +"commitCursor": { +"description": "Updates the committed cursor.", +"flatPath": "v1/cursor/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}:commitCursor", +"httpMethod": "POST", +"id": "pubsublite.cursor.projects.locations.subscriptions.commitCursor", +"parameterOrder": [ +"subscription" +], +"parameters": { +"subscription": { +"description": "The subscription for which to update the cursor.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/cursor/{+subscription}:commitCursor", +"request": { +"$ref": "CommitCursorRequest" +}, +"response": { +"$ref": "CommitCursorResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"cursors": { +"methods": { +"list": { +"description": "Returns all committed cursor information for a subscription.", +"flatPath": "v1/cursor/projects/{projectsId}/locations/{locationsId}/subscriptions/{subscriptionsId}/cursors", +"httpMethod": "GET", +"id": "pubsublite.cursor.projects.locations.subscriptions.cursors.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of cursors to return. The service may return fewer than this value. If unset or zero, all cursors for the parent will be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListPartitionCursors` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPartitionCursors` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The subscription for which to retrieve cursors. Structured like `projects/{project_number}/locations/{location}/subscriptions/{subscription_id}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/cursor/{+parent}/cursors", +"response": { +"$ref": "ListPartitionCursorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +} +}, +"topicStats": { +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"topics": { +"methods": { +"computeHeadCursor": { +"description": "Compute the head cursor for the partition. The head cursor's offset is guaranteed to be less than or equal to all messages which have not yet been acknowledged as published, and greater than the offset of any message whose publish has already been acknowledged. It is zero if there have never been messages in the partition.", +"flatPath": "v1/topicStats/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}:computeHeadCursor", +"httpMethod": "POST", +"id": "pubsublite.topicStats.projects.locations.topics.computeHeadCursor", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Required. The topic for which we should compute the head cursor.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/topicStats/{+topic}:computeHeadCursor", +"request": { +"$ref": "ComputeHeadCursorRequest" +}, +"response": { +"$ref": "ComputeHeadCursorResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"computeMessageStats": { +"description": "Compute statistics about a range of messages in a given topic and partition.", +"flatPath": "v1/topicStats/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}:computeMessageStats", +"httpMethod": "POST", +"id": "pubsublite.topicStats.projects.locations.topics.computeMessageStats", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Required. The topic for which we should compute message stats.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/topicStats/{+topic}:computeMessageStats", +"request": { +"$ref": "ComputeMessageStatsRequest" +}, +"response": { +"$ref": "ComputeMessageStatsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"computeTimeCursor": { +"description": "Compute the corresponding cursor for a publish or event time in a topic partition.", +"flatPath": "v1/topicStats/projects/{projectsId}/locations/{locationsId}/topics/{topicsId}:computeTimeCursor", +"httpMethod": "POST", +"id": "pubsublite.topicStats.projects.locations.topics.computeTimeCursor", +"parameterOrder": [ +"topic" +], +"parameters": { +"topic": { +"description": "Required. The topic for which we should compute the cursor.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/topics/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/topicStats/{+topic}:computeTimeCursor", +"request": { +"$ref": "ComputeTimeCursorRequest" +}, +"response": { +"$ref": "ComputeTimeCursorResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://pubsublite.googleapis.com/", +"schemas": { +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Capacity": { +"description": "The throughput capacity configuration for each partition.", +"id": "Capacity", +"properties": { +"publishMibPerSec": { +"description": "Publish throughput capacity per partition in MiB/s. Must be >= 4 and <= 16.", +"format": "int32", +"type": "integer" +}, +"subscribeMibPerSec": { +"description": "Subscribe throughput capacity per partition in MiB/s. Must be >= 4 and <= 32.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"CommitCursorRequest": { +"description": "Request for CommitCursor.", +"id": "CommitCursorRequest", +"properties": { +"cursor": { +"$ref": "Cursor", +"description": "The new value for the committed cursor." +}, +"partition": { +"description": "The partition for which to update the cursor. Partitions are zero indexed, so `partition` must be in the range [0, topic.num_partitions).", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CommitCursorResponse": { +"description": "Response for CommitCursor.", +"id": "CommitCursorResponse", +"properties": {}, +"type": "object" +}, +"ComputeHeadCursorRequest": { +"description": "Compute the current head cursor for a partition.", +"id": "ComputeHeadCursorRequest", +"properties": { +"partition": { +"description": "Required. The partition for which we should compute the head cursor.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ComputeHeadCursorResponse": { +"description": "Response containing the head cursor for the requested topic and partition.", +"id": "ComputeHeadCursorResponse", +"properties": { +"headCursor": { +"$ref": "Cursor", +"description": "The head cursor." +} +}, +"type": "object" +}, +"ComputeMessageStatsRequest": { +"description": "Compute statistics about a range of messages in a given topic and partition.", +"id": "ComputeMessageStatsRequest", +"properties": { +"endCursor": { +"$ref": "Cursor", +"description": "The exclusive end of the range. The range is empty if end_cursor <= start_cursor. Specifying a start_cursor before the first message and an end_cursor after the last message will retrieve all messages." +}, +"partition": { +"description": "Required. The partition for which we should compute message stats.", +"format": "int64", +"type": "string" +}, +"startCursor": { +"$ref": "Cursor", +"description": "The inclusive start of the range." +} +}, +"type": "object" +}, +"ComputeMessageStatsResponse": { +"description": "Response containing stats for messages in the requested topic and partition.", +"id": "ComputeMessageStatsResponse", +"properties": { +"messageBytes": { +"description": "The number of quota bytes accounted to these messages.", +"format": "int64", +"type": "string" +}, +"messageCount": { +"description": "The count of messages.", +"format": "int64", +"type": "string" +}, +"minimumEventTime": { +"description": "The minimum event timestamp across these messages. For the purposes of this computation, if a message does not have an event time, we use the publish time. The timestamp will be unset if there are no messages.", +"format": "google-datetime", +"type": "string" +}, +"minimumPublishTime": { +"description": "The minimum publish timestamp across these messages. Note that publish timestamps within a partition are not guaranteed to be non-decreasing. The timestamp will be unset if there are no messages.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ComputeTimeCursorRequest": { +"description": "Compute the corresponding cursor for a publish or event time in a topic partition.", +"id": "ComputeTimeCursorRequest", +"properties": { +"partition": { +"description": "Required. The partition for which we should compute the cursor.", +"format": "int64", +"type": "string" +}, +"target": { +"$ref": "TimeTarget", +"description": "Required. The target publish or event time. Specifying a future time will return an unset cursor." +} +}, +"type": "object" +}, +"ComputeTimeCursorResponse": { +"description": "Response containing the cursor corresponding to a publish or event time in a topic partition.", +"id": "ComputeTimeCursorResponse", +"properties": { +"cursor": { +"$ref": "Cursor", +"description": "If present, the cursor references the first message with time greater than or equal to the specified target time. If such a message cannot be found, the cursor will be unset (i.e. `cursor` is not present)." +} +}, +"type": "object" +}, +"Cursor": { +"description": "A cursor that describes the position of a message within a topic partition.", +"id": "Cursor", +"properties": { +"offset": { +"description": "The offset of a message within a topic partition. Must be greater than or equal 0.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"DeliveryConfig": { +"description": "The settings for a subscription's message delivery.", +"id": "DeliveryConfig", +"properties": { +"deliveryRequirement": { +"description": "The DeliveryRequirement for this subscription.", +"enum": [ +"DELIVERY_REQUIREMENT_UNSPECIFIED", +"DELIVER_IMMEDIATELY", +"DELIVER_AFTER_STORED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The server does not wait for a published message to be successfully written to storage before delivering it to subscribers.", +"The server will not deliver a published message to subscribers until the message has been successfully written to storage. This will result in higher end-to-end latency, but consistent delivery." +], +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ExportConfig": { +"description": "Configuration for a Pub/Sub Lite subscription that writes messages to a destination. User subscriber clients must not connect to this subscription.", +"id": "ExportConfig", +"properties": { +"currentState": { +"description": "Output only. The current state of the export, which may be different to the desired state due to errors. This field is output only.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"PAUSED", +"PERMISSION_DENIED", +"NOT_FOUND" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Messages are being exported.", +"Exporting messages is suspended.", +"Messages cannot be exported due to permission denied errors. Output only.", +"Messages cannot be exported due to missing resources. Output only." +], +"readOnly": true, +"type": "string" +}, +"deadLetterTopic": { +"description": "Optional. The name of an optional Pub/Sub Lite topic to publish messages that can not be exported to the destination. For example, the message can not be published to the Pub/Sub service because it does not satisfy the constraints documented at https://cloud.google.com/pubsub/docs/publisher. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}. Must be within the same project and location as the subscription. The topic may be changed or removed.", +"type": "string" +}, +"desiredState": { +"description": "The desired state of this export. Setting this to values other than `ACTIVE` and `PAUSED` will result in an error.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"PAUSED", +"PERMISSION_DENIED", +"NOT_FOUND" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Messages are being exported.", +"Exporting messages is suspended.", +"Messages cannot be exported due to permission denied errors. Output only.", +"Messages cannot be exported due to missing resources. Output only." +], +"type": "string" +}, +"pubsubConfig": { +"$ref": "PubSubConfig", +"description": "Messages are automatically written from the Pub/Sub Lite topic associated with this subscription to a Pub/Sub topic." +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPartitionCursorsResponse": { +"description": "Response for ListPartitionCursors", +"id": "ListPartitionCursorsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"partitionCursors": { +"description": "The partition cursors from this request.", +"items": { +"$ref": "PartitionCursor" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListReservationTopicsResponse": { +"description": "Response for ListReservationTopics.", +"id": "ListReservationTopicsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.", +"type": "string" +}, +"topics": { +"description": "The names of topics attached to the reservation. The order of the topics is unspecified.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListReservationsResponse": { +"description": "Response for ListReservations.", +"id": "ListReservationsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.", +"type": "string" +}, +"reservations": { +"description": "The list of reservation in the requested parent. The order of the reservations is unspecified.", +"items": { +"$ref": "Reservation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSubscriptionsResponse": { +"description": "Response for ListSubscriptions.", +"id": "ListSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.", +"type": "string" +}, +"subscriptions": { +"description": "The list of subscriptions in the requested parent. The order of the subscriptions is unspecified.", +"items": { +"$ref": "Subscription" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicSubscriptionsResponse": { +"description": "Response for ListTopicSubscriptions.", +"id": "ListTopicSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.", +"type": "string" +}, +"subscriptions": { +"description": "The names of subscriptions attached to the topic. The order of the subscriptions is unspecified.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTopicsResponse": { +"description": "Response for ListTopics.", +"id": "ListTopicsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as `page_token` to retrieve the next page of results. If this field is omitted, there are no more results.", +"type": "string" +}, +"topics": { +"description": "The list of topic in the requested parent. The order of the topics is unspecified.", +"items": { +"$ref": "Topic" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata for long running operations.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running. Not set if the operation has not completed.", +"format": "google-datetime", +"type": "string" +}, +"target": { +"description": "Resource path for the target of the operation. For example, targets of seeks are subscription resources, structured like: projects/{project_number}/locations/{location}/subscriptions/{subscription_id}", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"PartitionConfig": { +"description": "The settings for a topic's partitions.", +"id": "PartitionConfig", +"properties": { +"capacity": { +"$ref": "Capacity", +"description": "The capacity configuration." +}, +"count": { +"description": "The number of partitions in the topic. Must be at least 1. Once a topic has been created the number of partitions can be increased but not decreased. Message ordering is not guaranteed across a topic resize. For more information see https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity", +"format": "int64", +"type": "string" +}, +"scale": { +"deprecated": true, +"description": "DEPRECATED: Use capacity instead which can express a superset of configurations. Every partition in the topic is allocated throughput equivalent to `scale` times the standard partition throughput (4 MiB/s). This is also reflected in the cost of this topic; a topic with `scale` of 2 and count of 10 is charged for 20 partitions. This value must be in the range [1,4].", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PartitionCursor": { +"description": "A pair of a Cursor and the partition it is for.", +"id": "PartitionCursor", +"properties": { +"cursor": { +"$ref": "Cursor", +"description": "The value of the cursor." +}, +"partition": { +"description": "The partition this is for.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PubSubConfig": { +"description": "Configuration for exporting to a Pub/Sub topic.", +"id": "PubSubConfig", +"properties": { +"topic": { +"description": "The name of the Pub/Sub topic. Structured like: projects/{project_number}/topics/{topic_id}. The topic may be changed.", +"type": "string" +} +}, +"type": "object" +}, +"Reservation": { +"description": "Metadata about a reservation resource.", +"id": "Reservation", +"properties": { +"name": { +"description": "The name of the reservation. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}", +"type": "string" +}, +"throughputCapacity": { +"description": "The reserved throughput capacity. Every unit of throughput capacity is equivalent to 1 MiB/s of published messages or 2 MiB/s of subscribed messages. Any topics which are declared as using capacity from a Reservation will consume resources from this reservation instead of being charged individually.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ReservationConfig": { +"description": "The settings for this topic's Reservation usage.", +"id": "ReservationConfig", +"properties": { +"throughputReservation": { +"description": "The Reservation to use for this topic's throughput capacity. Structured like: projects/{project_number}/locations/{location}/reservations/{reservation_id}", +"type": "string" +} +}, +"type": "object" +}, +"RetentionConfig": { +"description": "The settings for a topic's message retention.", +"id": "RetentionConfig", +"properties": { +"perPartitionBytes": { +"description": "The provisioned storage, in bytes, per partition. If the number of bytes stored in any of the topic's partitions grows beyond this value, older messages will be dropped to make room for newer ones, regardless of the value of `period`.", +"format": "int64", +"type": "string" +}, +"period": { +"description": "How long a published message is retained. If unset, messages will be retained as long as the bytes retained for each partition is below `per_partition_bytes`.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"SeekSubscriptionRequest": { +"description": "Request for SeekSubscription.", +"id": "SeekSubscriptionRequest", +"properties": { +"namedTarget": { +"description": "Seek to a named position with respect to the message backlog.", +"enum": [ +"NAMED_TARGET_UNSPECIFIED", +"TAIL", +"HEAD" +], +"enumDescriptions": [ +"Unspecified named target. Do not use.", +"Seek to the oldest retained message.", +"Seek past all recently published messages, skipping the entire message backlog." +], +"type": "string" +}, +"timeTarget": { +"$ref": "TimeTarget", +"description": "Seek to the first message whose publish or event time is greater than or equal to the specified query time. If no such message can be located, will seek to the end of the message backlog." +} +}, +"type": "object" +}, +"SeekSubscriptionResponse": { +"description": "Response for SeekSubscription long running operation.", +"id": "SeekSubscriptionResponse", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subscription": { +"description": "Metadata about a subscription resource.", +"id": "Subscription", +"properties": { +"deliveryConfig": { +"$ref": "DeliveryConfig", +"description": "The settings for this subscription's message delivery." +}, +"exportConfig": { +"$ref": "ExportConfig", +"description": "If present, messages are automatically written from the Pub/Sub Lite topic associated with this subscription to a destination." +}, +"name": { +"description": "The name of the subscription. Structured like: projects/{project_number}/locations/{location}/subscriptions/{subscription_id}", +"type": "string" +}, +"topic": { +"description": "The name of the topic this subscription is attached to. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}", +"type": "string" +} +}, +"type": "object" +}, +"TimeTarget": { +"description": "A target publish or event time. Can be used for seeking to or retrieving the corresponding cursor.", +"id": "TimeTarget", +"properties": { +"eventTime": { +"description": "Request the cursor of the first message with event time greater than or equal to `event_time`. If messages are missing an event time, the publish time is used as a fallback. As event times are user supplied, subsequent messages may have event times less than `event_time` and should be filtered by the client, if necessary.", +"format": "google-datetime", +"type": "string" +}, +"publishTime": { +"description": "Request the cursor of the first message with publish time greater than or equal to `publish_time`. All messages thereafter are guaranteed to have publish times >= `publish_time`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Topic": { +"description": "Metadata about a topic resource.", +"id": "Topic", +"properties": { +"name": { +"description": "The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}", +"type": "string" +}, +"partitionConfig": { +"$ref": "PartitionConfig", +"description": "The settings for this topic's partitions." +}, +"reservationConfig": { +"$ref": "ReservationConfig", +"description": "The settings for this topic's Reservation usage." +}, +"retentionConfig": { +"$ref": "RetentionConfig", +"description": "The settings for this topic's message retention." +} +}, +"type": "object" +}, +"TopicPartitions": { +"description": "Response for GetTopicPartitions.", +"id": "TopicPartitions", +"properties": { +"partitionCount": { +"description": "The number of partitions in the topic.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Pub/Sub Lite API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/rapidmigrationassessment.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/rapidmigrationassessment.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..7eb2226915a34b602e9dea72b6b88acad4282825 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/rapidmigrationassessment.v1.json @@ -0,0 +1,1059 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://rapidmigrationassessment.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Rapid Migration Assessment", +"description": "The Rapid Migration Assessment service is our first-party migration assessment and planning tool.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/migration-center", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "rapidmigrationassessment:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://rapidmigrationassessment.mtls.googleapis.com/", +"name": "rapidmigrationassessment", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "rapidmigrationassessment.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "rapidmigrationassessment.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"annotations": { +"methods": { +"create": { +"description": "Creates an Annotation", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/annotations", +"httpMethod": "POST", +"id": "rapidmigrationassessment.projects.locations.annotations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the parent (project+location).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/annotations", +"request": { +"$ref": "Annotation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Annotation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/annotations/{annotationsId}", +"httpMethod": "GET", +"id": "rapidmigrationassessment.projects.locations.annotations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/annotations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Annotation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"collectors": { +"methods": { +"create": { +"description": "Create a Collector to manage the on-prem appliance which collects information about Customer assets.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors", +"httpMethod": "POST", +"id": "rapidmigrationassessment.projects.locations.collectors.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"collectorId": { +"description": "Required. Id of the requesting object.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent (project+location).", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/collectors", +"request": { +"$ref": "Collector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Collector - changes state of collector to \"Deleting\". Background jobs does final deletion thorugh producer api.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", +"httpMethod": "DELETE", +"id": "rapidmigrationassessment.projects.locations.collectors.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Collector.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", +"httpMethod": "GET", +"id": "rapidmigrationassessment.projects.locations.collectors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Collector" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Collectors in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors", +"httpMethod": "GET", +"id": "rapidmigrationassessment.projects.locations.collectors.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filtering results.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Hint for how to order the results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent value for ListCollectorsRequest.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/collectors", +"response": { +"$ref": "ListCollectorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Collector.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}", +"httpMethod": "PATCH", +"id": "rapidmigrationassessment.projects.locations.collectors.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "name of resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the Collector resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Collector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pause": { +"description": "Pauses the given collector.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:pause", +"httpMethod": "POST", +"id": "rapidmigrationassessment.projects.locations.collectors.pause", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:pause", +"request": { +"$ref": "PauseCollectorRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"register": { +"description": "Registers the given collector.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:register", +"httpMethod": "POST", +"id": "rapidmigrationassessment.projects.locations.collectors.register", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:register", +"request": { +"$ref": "RegisterCollectorRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resume": { +"description": "Resumes the given collector.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/collectors/{collectorsId}:resume", +"httpMethod": "POST", +"id": "rapidmigrationassessment.projects.locations.collectors.resume", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/collectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:resume", +"request": { +"$ref": "ResumeCollectorRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "rapidmigrationassessment.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "rapidmigrationassessment.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "rapidmigrationassessment.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "rapidmigrationassessment.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://rapidmigrationassessment.googleapis.com/", +"schemas": { +"Annotation": { +"description": "Message describing an Annotation", +"id": "Annotation", +"properties": { +"createTime": { +"description": "Output only. Create time stamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels as key value pairs.", +"type": "object" +}, +"name": { +"description": "name of resource.", +"type": "string" +}, +"type": { +"description": "Type of an annotation.", +"enum": [ +"TYPE_UNSPECIFIED", +"TYPE_LEGACY_EXPORT_CONSENT", +"TYPE_QWIKLAB" +], +"enumDescriptions": [ +"Unknown type", +"Indicates that this project has opted into StratoZone export.", +"Indicates that this project is created by Qwiklab." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. Update time stamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Collector": { +"description": "Message describing Collector object.", +"id": "Collector", +"properties": { +"bucket": { +"description": "Output only. Store cloud storage bucket name (which is a guid) created with this Collector.", +"readOnly": true, +"type": "string" +}, +"clientVersion": { +"description": "Output only. Client version.", +"readOnly": true, +"type": "string" +}, +"collectionDays": { +"description": "How many days to collect data.", +"format": "int32", +"type": "integer" +}, +"createTime": { +"description": "Output only. Create time stamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User specified description of the Collector.", +"type": "string" +}, +"displayName": { +"description": "User specified name of the Collector.", +"type": "string" +}, +"eulaUri": { +"description": "Uri for EULA (End User License Agreement) from customer.", +"type": "string" +}, +"expectedAssetCount": { +"description": "User specified expected asset count.", +"format": "int64", +"type": "string" +}, +"guestOsScan": { +"$ref": "GuestOsScan", +"description": "Output only. Reference to MC Source Guest Os Scan.", +"readOnly": true +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels as key value pairs.", +"type": "object" +}, +"name": { +"description": "name of resource.", +"type": "string" +}, +"serviceAccount": { +"description": "Service Account email used to ingest data to this Collector.", +"type": "string" +}, +"state": { +"description": "Output only. State of the Collector.", +"enum": [ +"STATE_UNSPECIFIED", +"STATE_INITIALIZING", +"STATE_READY_TO_USE", +"STATE_REGISTERED", +"STATE_ACTIVE", +"STATE_PAUSED", +"STATE_DELETING", +"STATE_DECOMMISSIONED", +"STATE_ERROR" +], +"enumDescriptions": [ +"Collector state is not recognized.", +"Collector started to create, but hasn't been completed MC source creation and db object creation.", +"Collector has been created, MC source creation and db object creation completed.", +"Collector client has been registered with client.", +"Collector client is actively scanning.", +"Collector is not actively scanning.", +"Collector is starting background job for deletion.", +"Collector completed all tasks for deletion.", +"Collector is in error state." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Update time stamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vsphereScan": { +"$ref": "VSphereScan", +"description": "Output only. Reference to MC Source vsphere_scan.", +"readOnly": true +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"GuestOsScan": { +"description": "Message describing a MC Source of type Guest OS Scan.", +"id": "GuestOsScan", +"properties": { +"coreSource": { +"description": "reference to the corresponding Guest OS Scan in MC Source.", +"type": "string" +} +}, +"type": "object" +}, +"ListCollectorsResponse": { +"description": "Message for response to listing Collectors.", +"id": "ListCollectorsResponse", +"properties": { +"collectors": { +"description": "The list of Collectors.", +"items": { +"$ref": "Collector" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PauseCollectorRequest": { +"description": "Message for pausing a Collector.", +"id": "PauseCollectorRequest", +"properties": { +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"RegisterCollectorRequest": { +"description": "Message for registering a Collector.", +"id": "RegisterCollectorRequest", +"properties": { +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"ResumeCollectorRequest": { +"description": "Message for resuming a Collector.", +"id": "ResumeCollectorRequest", +"properties": { +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"VSphereScan": { +"description": "Message describing a MC Source of type VSphere Scan.", +"id": "VSphereScan", +"properties": { +"coreSource": { +"description": "reference to the corresponding VSphere Scan in MC Source.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Rapid Migration Assessment API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/readerrevenuesubscriptionlinking.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/readerrevenuesubscriptionlinking.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..32498061b4ddd6c683c77a5776e0f0507db03a0d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/readerrevenuesubscriptionlinking.v1.json @@ -0,0 +1,285 @@ +{ +"basePath": "", +"baseUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Subscription Linking", +"description": "readerrevenuesubscriptionlinking.googleapis.com API.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/news/subscribe/subscription-linking/overview", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "readerrevenuesubscriptionlinking:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://readerrevenuesubscriptionlinking.mtls.googleapis.com/", +"name": "readerrevenuesubscriptionlinking", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"publications": { +"resources": { +"readers": { +"methods": { +"delete": { +"description": "Removes a publication reader, effectively severing the association with a Google user. If `force` is set to true, any entitlements for this reader will also be deleted. (Otherwise, the request will only work if the reader has no entitlements.) - If the reader does not exist, return NOT_FOUND. - Return FAILED_PRECONDITION if the force field is false (or unset) and entitlements are present.", +"flatPath": "v1/publications/{publicationsId}/readers/{readersId}", +"httpMethod": "DELETE", +"id": "readerrevenuesubscriptionlinking.publications.readers.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "If set to true, any entitlements under the reader will also be purged.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}", +"location": "path", +"pattern": "^publications/[^/]+/readers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "DeleteReaderResponse" +} +}, +"get": { +"description": "Gets a reader of a publication. Returns NOT_FOUND if the reader does not exist.", +"flatPath": "v1/publications/{publicationsId}/readers/{readersId}", +"httpMethod": "GET", +"id": "readerrevenuesubscriptionlinking.publications.readers.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the reader. Format: publications/{publication_id}/readers/{ppid}", +"location": "path", +"pattern": "^publications/[^/]+/readers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Reader" +} +}, +"getEntitlements": { +"description": "Gets the reader entitlements for a publication reader. - Returns PERMISSION_DENIED if the caller does not have access. - Returns NOT_FOUND if the reader does not exist.", +"flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements", +"httpMethod": "GET", +"id": "readerrevenuesubscriptionlinking.publications.readers.getEntitlements", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the reader entitlements to retrieve. Format: publications/{publication_id}/readers/{reader_id}/entitlements", +"location": "path", +"pattern": "^publications/[^/]+/readers/[^/]+/entitlements$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ReaderEntitlements" +} +}, +"updateEntitlements": { +"description": "Updates the reader entitlements for a publication reader. The entire reader entitlements will be overwritten by the new reader entitlements in the payload, like a PUT. - Returns PERMISSION_DENIED if the caller does not have access. - Returns NOT_FOUND if the reader does not exist.", +"flatPath": "v1/publications/{publicationsId}/readers/{readersId}/entitlements", +"httpMethod": "PATCH", +"id": "readerrevenuesubscriptionlinking.publications.readers.updateEntitlements", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the singleton.", +"location": "path", +"pattern": "^publications/[^/]+/readers/[^/]+/entitlements$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. The list of fields to update. Defaults to all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ReaderEntitlements" +}, +"response": { +"$ref": "ReaderEntitlements" +} +} +} +} +} +} +}, +"revision": "20240422", +"rootUrl": "https://readerrevenuesubscriptionlinking.googleapis.com/", +"schemas": { +"DeleteReaderResponse": { +"description": "Response to deleting a reader of a publication.", +"id": "DeleteReaderResponse", +"properties": {}, +"type": "object" +}, +"Entitlement": { +"description": "A single entitlement for a publication reader", +"id": "Entitlement", +"properties": { +"detail": { +"description": "The detail field can carry a description of the SKU that corresponds to what the user has been granted access to. This description, which is opaque to Google, can be displayed in the Google user subscription console for users who linked the subscription to a Google Account. Max 80 character limit.", +"type": "string" +}, +"expireTime": { +"description": "Required. Expiration time of the entitlement. Entitlements that have expired over 30 days will be purged. Required. LINT.IfChange(expire_time) The max expire_time is 398 days from now(). LINT.ThenChange(//depot/google3/java/com/google/subscribewithgoogle/accountlinking/subscriptionlink/service/config/protoconf.pi:max_expiry_age)", +"format": "google-datetime", +"type": "string" +}, +"productId": { +"description": "Required. The publication's product ID that the user has access to. This is the same product ID as can be found in Schema.org markup (http://schema.org/productID). E.g. \"dailybugle.com:basic\"", +"type": "string" +}, +"subscriptionToken": { +"description": "A source-specific subscription token. This is an opaque string that the publisher provides to Google. This token is opaque and has no meaning to Google.", +"type": "string" +} +}, +"type": "object" +}, +"Reader": { +"description": "A reader of a publication.", +"id": "Reader", +"properties": { +"createTime": { +"description": "Output only. Time the publication reader was created and associated with a Google user.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the reader. The last part of ppid in the resource name is the publisher provided id.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ReaderEntitlements": { +"description": "A singleton containing all of a reader's entitlements for a publication.", +"id": "ReaderEntitlements", +"properties": { +"entitlements": { +"description": "All of the entitlements for a publication reader.", +"items": { +"$ref": "Entitlement" +}, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of the singleton.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Reader Revenue Subscription Linking API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/realtimebidding.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/realtimebidding.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..49d2c1c5b71163a0c612513eabd97f8dc20fa974 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/realtimebidding.v1.json @@ -0,0 +1,3317 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/realtime-bidding": { +"description": "See, create, edit, and delete your Authorized Buyers and Open Bidding account entities" +} +} +} +}, +"basePath": "", +"baseUrl": "https://realtimebidding.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Real-time Bidding", +"description": "Allows external bidders to manage their RTB integration with Google. This includes managing bidder endpoints, QPS quotas, configuring what ad inventory to receive via pretargeting, submitting creatives for verification, and accessing creative metadata such as approval status.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "realtimebidding:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://realtimebidding.mtls.googleapis.com/", +"name": "realtimebidding", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"bidders": { +"methods": { +"get": { +"description": "Gets a bidder account by its name.", +"flatPath": "v1/bidders/{biddersId}", +"httpMethod": "GET", +"id": "realtimebidding.bidders.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the bidder to get. Format: `bidders/{bidderAccountId}`", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Bidder" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"list": { +"description": "Lists all the bidder accounts that belong to the caller.", +"flatPath": "v1/bidders", +"httpMethod": "GET", +"id": "realtimebidding.bidders.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of bidders to return. If unspecified, at most 100 bidders will be returned. The maximum value is 500; values above 500 will be coerced to 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. This value is received from a previous `ListBidders` call in ListBiddersResponse.nextPageToken.", +"location": "query", +"type": "string" +} +}, +"path": "v1/bidders", +"response": { +"$ref": "ListBiddersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +}, +"resources": { +"creatives": { +"methods": { +"list": { +"description": "Lists creatives as they are at the time of the initial request. This call may take multiple hours to complete. For large, paginated requests, this method returns a snapshot of creatives at the time of request for the first page. `lastStatusUpdate` and `creativeServingDecision` may be outdated for creatives on sequential pages. We recommend [Google Cloud Pub/Sub](//cloud.google.com/pubsub/docs/overview) to view the latest status.", +"flatPath": "v1/bidders/{biddersId}/creatives", +"httpMethod": "GET", +"id": "realtimebidding.bidders.creatives.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Query string to filter creatives. If no filter is specified, all active creatives will be returned. Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND disapprovalReason:UNACCEPTABLE_CONTENT) OR declaredAttributes:IS_COOKIE_TARGETED'", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. The server may return fewer creatives than requested (due to timeout constraint) even if more are available through another call. If unspecified, server will pick an appropriate default. Acceptable values are 1 to 1000, inclusive.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.nextPageToken returned from the previous call to the 'ListCreatives' method. Page tokens for continued pages are valid for up to five hours, counting from the call to 'ListCreatives' for the first page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent buyer that owns the creatives. The pattern for this resource is either `buyers/{buyerAccountId}` or `bidders/{bidderAccountId}`. For `buyers/{buyerAccountId}`, the `buyerAccountId` can be one of the following: 1. The ID of the buyer that is accessing their own creatives. 2. The ID of the child seat buyer under a bidder account. So for listing creatives pertaining to the child seat buyer (`456`) under bidder account (`123`), you would use the pattern: `buyers/456`. 3. The ID of the bidder itself. So for listing creatives pertaining to bidder (`123`), you would use `buyers/123`. If you want to access all creatives pertaining to both the bidder and all of its child seat accounts, you would use `bidders/{bidderAccountId}`, for example, for all creatives pertaining to bidder (`123`), use `bidders/123`.", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Controls the amount of information included in the response. By default only creativeServingDecision is included. To retrieve the entire creative resource (including the declared fields and the creative content) specify the view as \"FULL\".", +"enum": [ +"CREATIVE_VIEW_UNSPECIFIED", +"SERVING_DECISION_ONLY", +"FULL" +], +"enumDescriptions": [ +"Not specified, equivalent to SERVING_DECISION_ONLY.", +"Only creativeServingDecision is included in the response.", +"The entire creative resource (including the declared fields and the creative content) is included in the response." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/creatives", +"response": { +"$ref": "ListCreativesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"watch": { +"description": "Watches all creatives pertaining to a bidder. It is sufficient to invoke this endpoint once per bidder. A Pub/Sub topic will be created and notifications will be pushed to the topic when any of the bidder's creatives change status. All of the bidder's service accounts will have access to read from the topic. Subsequent invocations of this method will return the existing Pub/Sub configuration.", +"flatPath": "v1/bidders/{biddersId}/creatives:watch", +"httpMethod": "POST", +"id": "realtimebidding.bidders.creatives.watch", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. To watch all creatives pertaining to the bidder and all its child seat accounts, the bidder must follow the pattern `bidders/{bidderAccountId}`.", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/creatives:watch", +"request": { +"$ref": "WatchCreativesRequest" +}, +"response": { +"$ref": "WatchCreativesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +} +}, +"endpoints": { +"methods": { +"get": { +"description": "Gets a bidder endpoint by its name.", +"flatPath": "v1/bidders/{biddersId}/endpoints/{endpointsId}", +"httpMethod": "GET", +"id": "realtimebidding.bidders.endpoints.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the bidder endpoint to get. Format: `bidders/{bidderAccountId}/endpoints/{endpointId}`", +"location": "path", +"pattern": "^bidders/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"list": { +"description": "Lists all the bidder's endpoints.", +"flatPath": "v1/bidders/{biddersId}/endpoints", +"httpMethod": "GET", +"id": "realtimebidding.bidders.endpoints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of endpoints to return. If unspecified, at most 100 endpoints will be returned. The maximum value is 500; values above 500 will be coerced to 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. This value is received from a previous `ListEndpoints` call in ListEndpointsResponse.nextPageToken.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the bidder whose endpoints will be listed. Format: `bidders/{bidderAccountId}`", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/endpoints", +"response": { +"$ref": "ListEndpointsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"patch": { +"description": "Updates a bidder's endpoint.", +"flatPath": "v1/bidders/{biddersId}/endpoints/{endpointsId}", +"httpMethod": "PATCH", +"id": "realtimebidding.bidders.endpoints.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Name of the endpoint resource that must follow the pattern `bidders/{bidderAccountId}/endpoints/{endpointId}`, where {bidderAccountId} is the account ID of the bidder who operates this endpoint, and {endpointId} is a unique ID assigned by the server.", +"location": "path", +"pattern": "^bidders/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Field mask to use for partial in-place updates.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Endpoint" +}, +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +} +}, +"pretargetingConfigs": { +"methods": { +"activate": { +"description": "Activates a pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:activate", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.activate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:activate", +"request": { +"$ref": "ActivatePretargetingConfigRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"addTargetedApps": { +"description": "Adds targeted apps to the pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:addTargetedApps", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.addTargetedApps", +"parameterOrder": [ +"pretargetingConfig" +], +"parameters": { +"pretargetingConfig": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+pretargetingConfig}:addTargetedApps", +"request": { +"$ref": "AddTargetedAppsRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"addTargetedPublishers": { +"description": "Adds targeted publishers to the pretargeting config.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:addTargetedPublishers", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.addTargetedPublishers", +"parameterOrder": [ +"pretargetingConfig" +], +"parameters": { +"pretargetingConfig": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+pretargetingConfig}:addTargetedPublishers", +"request": { +"$ref": "AddTargetedPublishersRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"addTargetedSites": { +"description": "Adds targeted sites to the pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:addTargetedSites", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.addTargetedSites", +"parameterOrder": [ +"pretargetingConfig" +], +"parameters": { +"pretargetingConfig": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+pretargetingConfig}:addTargetedSites", +"request": { +"$ref": "AddTargetedSitesRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"create": { +"description": "Creates a pretargeting configuration. A pretargeting configuration's state (PretargetingConfig.state) is active upon creation, and it will start to affect traffic shortly after. A bidder may create a maximum of 10 pretargeting configurations. Attempts to exceed this maximum results in a 400 bad request error.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the bidder to create the pretargeting configuration for. Format: bidders/{bidderAccountId}", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/pretargetingConfigs", +"request": { +"$ref": "PretargetingConfig" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"delete": { +"description": "Deletes a pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}", +"httpMethod": "DELETE", +"id": "realtimebidding.bidders.pretargetingConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the pretargeting configuration to delete. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"get": { +"description": "Gets a pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}", +"httpMethod": "GET", +"id": "realtimebidding.bidders.pretargetingConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the pretargeting configuration to get. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"list": { +"description": "Lists all pretargeting configurations for a single bidder.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs", +"httpMethod": "GET", +"id": "realtimebidding.bidders.pretargetingConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of pretargeting configurations to return. If unspecified, at most 10 pretargeting configurations will be returned. The maximum value is 100; values above 100 will be coerced to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. This value is received from a previous `ListPretargetingConfigs` call in ListPretargetingConfigsResponse.nextPageToken.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the bidder whose pretargeting configurations will be listed. Format: bidders/{bidderAccountId}", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/pretargetingConfigs", +"response": { +"$ref": "ListPretargetingConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"patch": { +"description": "Updates a pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}", +"httpMethod": "PATCH", +"id": "realtimebidding.bidders.pretargetingConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Name of the pretargeting configuration that must follow the pattern `bidders/{bidder_account_id}/pretargetingConfigs/{config_id}`", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Field mask to use for partial in-place updates.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "PretargetingConfig" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"removeTargetedApps": { +"description": "Removes targeted apps from the pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:removeTargetedApps", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.removeTargetedApps", +"parameterOrder": [ +"pretargetingConfig" +], +"parameters": { +"pretargetingConfig": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+pretargetingConfig}:removeTargetedApps", +"request": { +"$ref": "RemoveTargetedAppsRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"removeTargetedPublishers": { +"description": "Removes targeted publishers from the pretargeting config.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:removeTargetedPublishers", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.removeTargetedPublishers", +"parameterOrder": [ +"pretargetingConfig" +], +"parameters": { +"pretargetingConfig": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+pretargetingConfig}:removeTargetedPublishers", +"request": { +"$ref": "RemoveTargetedPublishersRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"removeTargetedSites": { +"description": "Removes targeted sites from the pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:removeTargetedSites", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.removeTargetedSites", +"parameterOrder": [ +"pretargetingConfig" +], +"parameters": { +"pretargetingConfig": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+pretargetingConfig}:removeTargetedSites", +"request": { +"$ref": "RemoveTargetedSitesRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"suspend": { +"description": "Suspends a pretargeting configuration.", +"flatPath": "v1/bidders/{biddersId}/pretargetingConfigs/{pretargetingConfigsId}:suspend", +"httpMethod": "POST", +"id": "realtimebidding.bidders.pretargetingConfigs.suspend", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the pretargeting configuration. Format: bidders/{bidderAccountId}/pretargetingConfig/{configId}", +"location": "path", +"pattern": "^bidders/[^/]+/pretargetingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:suspend", +"request": { +"$ref": "SuspendPretargetingConfigRequest" +}, +"response": { +"$ref": "PretargetingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +} +}, +"publisherConnections": { +"methods": { +"batchApprove": { +"description": "Batch approves multiple publisher connections.", +"flatPath": "v1/bidders/{biddersId}/publisherConnections:batchApprove", +"httpMethod": "POST", +"id": "realtimebidding.bidders.publisherConnections.batchApprove", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The bidder for whom publisher connections will be approved. Format: `bidders/{bidder}` where `{bidder}` is the account ID of the bidder.", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/publisherConnections:batchApprove", +"request": { +"$ref": "BatchApprovePublisherConnectionsRequest" +}, +"response": { +"$ref": "BatchApprovePublisherConnectionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"batchReject": { +"description": "Batch rejects multiple publisher connections.", +"flatPath": "v1/bidders/{biddersId}/publisherConnections:batchReject", +"httpMethod": "POST", +"id": "realtimebidding.bidders.publisherConnections.batchReject", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The bidder for whom publisher connections will be rejected. Format: `bidders/{bidder}` where `{bidder}` is the account ID of the bidder.", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/publisherConnections:batchReject", +"request": { +"$ref": "BatchRejectPublisherConnectionsRequest" +}, +"response": { +"$ref": "BatchRejectPublisherConnectionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"get": { +"description": "Gets a publisher connection.", +"flatPath": "v1/bidders/{biddersId}/publisherConnections/{publisherConnectionsId}", +"httpMethod": "GET", +"id": "realtimebidding.bidders.publisherConnections.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the publisher whose connection information is to be retrieved. In the pattern `bidders/{bidder}/publisherConnections/{publisher}` where `{bidder}` is the account ID of the bidder, and `{publisher}` is the ads.txt/app-ads.txt publisher ID. See publisherConnection.name.", +"location": "path", +"pattern": "^bidders/[^/]+/publisherConnections/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PublisherConnection" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"list": { +"description": "Lists publisher connections for a given bidder.", +"flatPath": "v1/bidders/{biddersId}/publisherConnections", +"httpMethod": "GET", +"id": "realtimebidding.bidders.publisherConnections.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Query string to filter publisher connections. Connections can be filtered by `displayName`, `publisherPlatform`, and `biddingState`. If no filter is specified, all publisher connections will be returned. Example: 'displayName=\"Great Publisher*\" AND publisherPlatform=ADMOB AND biddingState != PENDING' See https://google.aip.dev/160 for more information about filtering syntax.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Order specification by which results should be sorted. If no sort order is specified, the results will be returned in alphabetic order based on the publisher's publisher code. Results can be sorted by `createTime`. Example: 'createTime DESC'.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. The server may return fewer results than requested (due to timeout constraint) even if more are available through another call. If unspecified, the server will pick an appropriate default. Acceptable values are 1 to 5000, inclusive.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. Typically, this is the value of ListPublisherConnectionsResponse.nextPageToken returned from the previous call to the 'ListPublisherConnections' method.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the bidder for which publishers have initiated connections. The pattern for this resource is `bidders/{bidder}` where `{bidder}` represents the account ID of the bidder.", +"location": "path", +"pattern": "^bidders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/publisherConnections", +"response": { +"$ref": "ListPublisherConnectionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +} +} +} +}, +"buyers": { +"methods": { +"get": { +"description": "Gets a buyer account by its name.", +"flatPath": "v1/buyers/{buyersId}", +"httpMethod": "GET", +"id": "realtimebidding.buyers.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the buyer to get. Format: `buyers/{buyerId}`", +"location": "path", +"pattern": "^buyers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Buyer" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"getRemarketingTag": { +"description": "This has been sunset as of October 2023, and will return an error response if called. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", +"flatPath": "v1/buyers/{buyersId}:getRemarketingTag", +"httpMethod": "GET", +"id": "realtimebidding.buyers.getRemarketingTag", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. To fetch the remarketing tag for an account, the name must follow the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of the buyer that owns the remarketing tag. For a bidder accessing the remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch the remarketing tag for a specific user list, the name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", +"location": "path", +"pattern": "^buyers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:getRemarketingTag", +"response": { +"$ref": "GetRemarketingTagResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"list": { +"description": "Lists all buyer account information the calling buyer user or service account is permissioned to manage.", +"flatPath": "v1/buyers", +"httpMethod": "GET", +"id": "realtimebidding.buyers.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of buyers to return. If unspecified, at most 100 buyers will be returned. The maximum value is 500; values above 500 will be coerced to 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. This value is received from a previous `ListBuyers` call in ListBuyersResponse.nextPageToken.", +"location": "query", +"type": "string" +} +}, +"path": "v1/buyers", +"response": { +"$ref": "ListBuyersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +}, +"resources": { +"creatives": { +"methods": { +"create": { +"description": "Creates a creative.", +"flatPath": "v1/buyers/{buyersId}/creatives", +"httpMethod": "POST", +"id": "realtimebidding.buyers.creatives.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent buyer that the new creative belongs to that must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` represents the account ID of the buyer who owns a creative. For a bidder accessing creatives on behalf of a child seat buyer, `{buyerAccountId}` should represent the account ID of the child seat buyer.", +"location": "path", +"pattern": "^buyers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/creatives", +"request": { +"$ref": "Creative" +}, +"response": { +"$ref": "Creative" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"get": { +"description": "Gets a creative.", +"flatPath": "v1/buyers/{buyersId}/creatives/{creativesId}", +"httpMethod": "GET", +"id": "realtimebidding.buyers.creatives.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the creative to retrieve. See creative.name.", +"location": "path", +"pattern": "^buyers/[^/]+/creatives/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Controls the amount of information included in the response. By default only creativeServingDecision is included. To retrieve the entire creative resource (including the declared fields and the creative content) specify the view as \"FULL\".", +"enum": [ +"CREATIVE_VIEW_UNSPECIFIED", +"SERVING_DECISION_ONLY", +"FULL" +], +"enumDescriptions": [ +"Not specified, equivalent to SERVING_DECISION_ONLY.", +"Only creativeServingDecision is included in the response.", +"The entire creative resource (including the declared fields and the creative content) is included in the response." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Creative" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"list": { +"description": "Lists creatives as they are at the time of the initial request. This call may take multiple hours to complete. For large, paginated requests, this method returns a snapshot of creatives at the time of request for the first page. `lastStatusUpdate` and `creativeServingDecision` may be outdated for creatives on sequential pages. We recommend [Google Cloud Pub/Sub](//cloud.google.com/pubsub/docs/overview) to view the latest status.", +"flatPath": "v1/buyers/{buyersId}/creatives", +"httpMethod": "GET", +"id": "realtimebidding.buyers.creatives.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Query string to filter creatives. If no filter is specified, all active creatives will be returned. Example: 'accountId=12345 AND (dealsStatus:DISAPPROVED AND disapprovalReason:UNACCEPTABLE_CONTENT) OR declaredAttributes:IS_COOKIE_TARGETED'", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. The server may return fewer creatives than requested (due to timeout constraint) even if more are available through another call. If unspecified, server will pick an appropriate default. Acceptable values are 1 to 1000, inclusive.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. Typically, this is the value of ListCreativesResponse.nextPageToken returned from the previous call to the 'ListCreatives' method. Page tokens for continued pages are valid for up to five hours, counting from the call to 'ListCreatives' for the first page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent buyer that owns the creatives. The pattern for this resource is either `buyers/{buyerAccountId}` or `bidders/{bidderAccountId}`. For `buyers/{buyerAccountId}`, the `buyerAccountId` can be one of the following: 1. The ID of the buyer that is accessing their own creatives. 2. The ID of the child seat buyer under a bidder account. So for listing creatives pertaining to the child seat buyer (`456`) under bidder account (`123`), you would use the pattern: `buyers/456`. 3. The ID of the bidder itself. So for listing creatives pertaining to bidder (`123`), you would use `buyers/123`. If you want to access all creatives pertaining to both the bidder and all of its child seat accounts, you would use `bidders/{bidderAccountId}`, for example, for all creatives pertaining to bidder (`123`), use `bidders/123`.", +"location": "path", +"pattern": "^buyers/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Controls the amount of information included in the response. By default only creativeServingDecision is included. To retrieve the entire creative resource (including the declared fields and the creative content) specify the view as \"FULL\".", +"enum": [ +"CREATIVE_VIEW_UNSPECIFIED", +"SERVING_DECISION_ONLY", +"FULL" +], +"enumDescriptions": [ +"Not specified, equivalent to SERVING_DECISION_ONLY.", +"Only creativeServingDecision is included in the response.", +"The entire creative resource (including the declared fields and the creative content) is included in the response." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/creatives", +"response": { +"$ref": "ListCreativesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"patch": { +"description": "Updates a creative.", +"flatPath": "v1/buyers/{buyersId}/creatives/{creativesId}", +"httpMethod": "PATCH", +"id": "realtimebidding.buyers.creatives.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Name of the creative. Follows the pattern `buyers/{buyer}/creatives/{creative}`, where `{buyer}` represents the account ID of the buyer who owns the creative, and `{creative}` is the buyer-specific creative ID that references this creative in the bid response.", +"location": "path", +"pattern": "^buyers/[^/]+/creatives/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Field mask to use for partial in-place updates.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Creative" +}, +"response": { +"$ref": "Creative" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +} +}, +"userLists": { +"methods": { +"close": { +"description": "Changes the status of a user list to CLOSED. This prevents new users from being added to the user list.", +"flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:close", +"httpMethod": "POST", +"id": "realtimebidding.buyers.userLists.close", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the user list to close. See UserList.name", +"location": "path", +"pattern": "^buyers/[^/]+/userLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:close", +"request": { +"$ref": "CloseUserListRequest" +}, +"response": { +"$ref": "UserList" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"create": { +"description": "Creates a new user list.", +"flatPath": "v1/buyers/{buyersId}/userLists", +"httpMethod": "POST", +"id": "realtimebidding.buyers.userLists.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent buyer of the user list to be retrieved, which must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` represents the account ID of the buyer who owns the user list. For a bidder accessing user lists on behalf of a child seat buyer, `{buyerAccountId}` should represent the account ID of the child seat buyer.", +"location": "path", +"pattern": "^buyers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/userLists", +"request": { +"$ref": "UserList" +}, +"response": { +"$ref": "UserList" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"get": { +"description": "Gets a user list by its name.", +"flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}", +"httpMethod": "GET", +"id": "realtimebidding.buyers.userLists.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the user list to be retrieved. See UserList.name.", +"location": "path", +"pattern": "^buyers/[^/]+/userLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "UserList" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"getRemarketingTag": { +"description": "This has been sunset as of October 2023, and will return an error response if called. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Gets remarketing tag for a buyer. A remarketing tag is a piece of JavaScript code that can be placed on a web page. When a user visits a page containing a remarketing tag, Google adds the user to a user list.", +"flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:getRemarketingTag", +"httpMethod": "GET", +"id": "realtimebidding.buyers.userLists.getRemarketingTag", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. To fetch the remarketing tag for an account, the name must follow the pattern `buyers/{accountId}`, where `{accountId}` represents the ID of the buyer that owns the remarketing tag. For a bidder accessing the remarketing tag on behalf of a child seat buyer, `{accountId}` should represent the ID of the child seat buyer. To fetch the remarketing tag for a specific user list, the name must follow the pattern `buyers/{accountId}/userLists/{userListId}`. See UserList.name.", +"location": "path", +"pattern": "^buyers/[^/]+/userLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:getRemarketingTag", +"response": { +"$ref": "GetRemarketingTagResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"list": { +"description": "Lists the user lists visible to the current user.", +"flatPath": "v1/buyers/{buyersId}/userLists", +"httpMethod": "GET", +"id": "realtimebidding.buyers.userLists.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The number of results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Continuation page token as received from a previous response.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent buyer for the user lists to be returned that must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` represents the account ID of the buyer who owns user lists. For a bidder accessing user lists on behalf of a child seat buyer , `{buyerAccountId}` should represent the account ID of the child seat buyer.", +"location": "path", +"pattern": "^buyers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/userLists", +"response": { +"$ref": "ListUserListsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"open": { +"description": "Changes the status of a user list to OPEN. This allows new users to be added to the user list.", +"flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}:open", +"httpMethod": "POST", +"id": "realtimebidding.buyers.userLists.open", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the user list to open. See UserList.name", +"location": "path", +"pattern": "^buyers/[^/]+/userLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:open", +"request": { +"$ref": "OpenUserListRequest" +}, +"response": { +"$ref": "UserList" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +}, +"update": { +"description": "Updates the given user list. Only user lists with URLRestrictions can be updated.", +"flatPath": "v1/buyers/{buyersId}/userLists/{userListsId}", +"httpMethod": "PUT", +"id": "realtimebidding.buyers.userLists.update", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Name of the user list that must follow the pattern `buyers/{buyer}/userLists/{user_list}`, where `{buyer}` represents the account ID of the buyer who owns the user list. For a bidder accessing user lists on behalf of a child seat buyer, `{buyer}` represents the account ID of the child seat buyer. `{user_list}` is an int64 identifier assigned by Google to uniquely identify a user list.", +"location": "path", +"pattern": "^buyers/[^/]+/userLists/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UserList" +}, +"response": { +"$ref": "UserList" +}, +"scopes": [ +"https://www.googleapis.com/auth/realtime-bidding" +] +} +} +} +} +} +}, +"revision": "20240422", +"rootUrl": "https://realtimebidding.googleapis.com/", +"schemas": { +"ActivatePretargetingConfigRequest": { +"description": "A request to activate a pretargeting configuration. Sets the configuration's state to ACTIVE.", +"id": "ActivatePretargetingConfigRequest", +"properties": {}, +"type": "object" +}, +"AdTechnologyProviders": { +"description": "The list of detected Ad Technology Providers for this creative. Bids placed for inventory that will serve to EEA or UK users are expected to comply with GDPR requirements. You must ensure that the creatives used in such bids should contain only user consented ad technology providers as indicated in the bid request. Google reserves the right to filter non-compliant bids. User consented ad technology providers can be found in the [Google Protocol](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto) with the `BidRequest.adslot.consented_providers_settings` field, and can be found as an [OpenRTB extension](https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto) with the `BidRequest.user.ext.consented_providers_settings` and `BidRequest.user.ext.consent` fields. See https://support.google.com/authorizedbuyers/answer/9789378 for additional information about the Google TCF v2 integration.", +"id": "AdTechnologyProviders", +"properties": { +"detectedGvlIds": { +"description": "The detected IAB Global Vendor List (GVL) IDs for this creative. See the IAB Global Vendor List at https://vendor-list.consensu.org/v2/vendor-list.json for details about the vendors.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"detectedProviderIds": { +"description": "The detected [Google Ad Tech Providers (ATP)](https://support.google.com/admanager/answer/9012903) for this creative. See https://storage.googleapis.com/adx-rtb-dictionaries/providers.csv for mapping of provider ID to provided name, a privacy policy URL, and a list of domains which can be attributed to the provider.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"unidentifiedProviderDomains": { +"description": "Domains of detected unidentified ad technology providers (if any). You must ensure that the creatives used in bids placed for inventory that will serve to EEA or UK users does not contain unidentified ad technology providers. Google reserves the right to filter non-compliant bids.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddTargetedAppsRequest": { +"description": "A request to start targeting the provided app IDs in a specific pretargeting configuration. The pretargeting configuration itself specifies how these apps are targeted. in PretargetingConfig.appTargeting.mobileAppTargeting.", +"id": "AddTargetedAppsRequest", +"properties": { +"appIds": { +"description": "A list of app IDs to target in the pretargeting configuration. These values will be added to the list of targeted app IDs in PretargetingConfig.appTargeting.mobileAppTargeting.values.", +"items": { +"type": "string" +}, +"type": "array" +}, +"targetingMode": { +"description": "Required. The targeting mode that should be applied to the list of app IDs. If there are existing targeted app IDs, must be equal to the existing PretargetingConfig.appTargeting.mobileAppTargeting.targetingMode or a 400 bad request error will be returned.", +"enum": [ +"TARGETING_MODE_UNSPECIFIED", +"INCLUSIVE", +"EXCLUSIVE" +], +"enumDescriptions": [ +"Placeholder for undefined targeting mode.", +"The inclusive list type. Inventory must match an item in this list to be targeted.", +"The exclusive list type. Inventory must not match any item in this list to be targeted." +], +"type": "string" +} +}, +"type": "object" +}, +"AddTargetedPublishersRequest": { +"description": "A request to start targeting the provided publishers in a specific pretargeting configuration. The pretargeting configuration itself specifies how these publishers are targeted in PretargetingConfig.publisherTargeting.", +"id": "AddTargetedPublishersRequest", +"properties": { +"publisherIds": { +"description": "A list of publisher IDs to target in the pretargeting configuration. These values will be added to the list of targeted publisher IDs in PretargetingConfig.publisherTargeting.values. Publishers are identified by their publisher ID from ads.txt / app-ads.txt. See https://iabtechlab.com/ads-txt/ and https://iabtechlab.com/app-ads-txt/ for more details.", +"items": { +"type": "string" +}, +"type": "array" +}, +"targetingMode": { +"description": "Required. The targeting mode that should be applied to the list of publisher IDs. If are existing publisher IDs, must be equal to the existing PretargetingConfig.publisherTargeting.targetingMode or a 400 bad request error will be returned.", +"enum": [ +"TARGETING_MODE_UNSPECIFIED", +"INCLUSIVE", +"EXCLUSIVE" +], +"enumDescriptions": [ +"Placeholder for undefined targeting mode.", +"The inclusive list type. Inventory must match an item in this list to be targeted.", +"The exclusive list type. Inventory must not match any item in this list to be targeted." +], +"type": "string" +} +}, +"type": "object" +}, +"AddTargetedSitesRequest": { +"description": "A request to start targeting the provided sites in a specific pretargeting configuration. The pretargeting configuration itself specifies how these sites are targeted in PretargetingConfig.webTargeting.", +"id": "AddTargetedSitesRequest", +"properties": { +"sites": { +"description": "A list of site URLs to target in the pretargeting configuration. These values will be added to the list of targeted URLs in PretargetingConfig.webTargeting.values.", +"items": { +"type": "string" +}, +"type": "array" +}, +"targetingMode": { +"description": "Required. The targeting mode that should be applied to the list of site URLs. If there are existing targeted sites, must be equal to the existing PretargetingConfig.webTargeting.targetingMode or a 400 bad request error will be returned.", +"enum": [ +"TARGETING_MODE_UNSPECIFIED", +"INCLUSIVE", +"EXCLUSIVE" +], +"enumDescriptions": [ +"Placeholder for undefined targeting mode.", +"The inclusive list type. Inventory must match an item in this list to be targeted.", +"The exclusive list type. Inventory must not match any item in this list to be targeted." +], +"type": "string" +} +}, +"type": "object" +}, +"AdvertiserAndBrand": { +"description": "Detected advertiser and brand information.", +"id": "AdvertiserAndBrand", +"properties": { +"advertiserId": { +"description": "See https://storage.googleapis.com/adx-rtb-dictionaries/advertisers.txt for the list of possible values. Can be used to filter the response of the creatives.list method.", +"format": "int64", +"type": "string" +}, +"advertiserName": { +"description": "Advertiser name. Can be used to filter the response of the creatives.list method.", +"type": "string" +}, +"brandId": { +"description": "Detected brand ID or zero if no brand has been detected. See https://storage.googleapis.com/adx-rtb-dictionaries/brands.txt for the list of possible values. Can be used to filter the response of the creatives.list method.", +"format": "int64", +"type": "string" +}, +"brandName": { +"description": "Brand name. Can be used to filter the response of the creatives.list method.", +"type": "string" +} +}, +"type": "object" +}, +"AppTargeting": { +"description": "A subset of app inventory to target. Bid requests that match criteria in at least one of the specified dimensions will be sent.", +"id": "AppTargeting", +"properties": { +"mobileAppCategoryTargeting": { +"$ref": "NumericTargetingDimension", +"description": "Lists of included and excluded mobile app categories as defined in https://developers.google.com/adwords/api/docs/appendix/mobileappcategories.csv." +}, +"mobileAppTargeting": { +"$ref": "StringTargetingDimension", +"description": "Targeted app IDs. App IDs can refer to those found in an app store or ones that are not published in an app store. A maximum of 30,000 app IDs can be targeted." +} +}, +"type": "object" +}, +"BatchApprovePublisherConnectionsRequest": { +"description": "A request to approve a batch of publisher connections.", +"id": "BatchApprovePublisherConnectionsRequest", +"properties": { +"names": { +"description": "Required. The names of the publishers with which connections will be approved. In the pattern `bidders/{bidder}/publisherConnections/{publisher}` where `{bidder}` is the account ID of the bidder, and `{publisher}` is the ads.txt/app-ads.txt publisher ID.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchApprovePublisherConnectionsResponse": { +"description": "A response for the request to approve a batch of publisher connections.", +"id": "BatchApprovePublisherConnectionsResponse", +"properties": { +"publisherConnections": { +"description": "The publisher connections that have been approved.", +"items": { +"$ref": "PublisherConnection" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchRejectPublisherConnectionsRequest": { +"description": "A request to reject a batch of publisher connections.", +"id": "BatchRejectPublisherConnectionsRequest", +"properties": { +"names": { +"description": "Required. The names of the publishers with whom connection will be rejected. In the pattern `bidders/{bidder}/publisherConnections/{publisher}` where `{bidder}` is the account ID of the bidder, and `{publisher}` is the ads.txt/app-ads.txt publisher ID.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchRejectPublisherConnectionsResponse": { +"description": "A response for the request to reject a batch of publisher connections.", +"id": "BatchRejectPublisherConnectionsResponse", +"properties": { +"publisherConnections": { +"description": "The publisher connections that have been rejected.", +"items": { +"$ref": "PublisherConnection" +}, +"type": "array" +} +}, +"type": "object" +}, +"Bidder": { +"description": "Bidder settings.", +"id": "Bidder", +"properties": { +"bypassNonguaranteedDealsPretargeting": { +"description": "Output only. An option to bypass pretargeting for private auctions and preferred deals. When true, bid requests from these nonguaranteed deals will always be sent. When false, bid requests will be subject to regular pretargeting configurations. Programmatic Guaranteed deals will always be sent to the bidder, regardless of the value for this flag. Auction packages are not impacted by this value and are subject to the regular pretargeting configurations.", +"readOnly": true, +"type": "boolean" +}, +"cookieMatchingNetworkId": { +"description": "Output only. The buyer's network ID used for cookie matching. This ID corresponds to the `google_nid` parameter in the URL used in cookie match requests. Refer to https://developers.google.com/authorized-buyers/rtb/cookie-guide for further information.", +"readOnly": true, +"type": "string" +}, +"cookieMatchingUrl": { +"description": "Output only. The base URL used in cookie match requests. Refer to https://developers.google.com/authorized-buyers/rtb/cookie-guide for further information.", +"readOnly": true, +"type": "string" +}, +"dealsBillingId": { +"description": "Output only. The billing ID for the deals pretargeting config. This billing ID is sent on the bid request for guaranteed and nonguaranteed deals matched in pretargeting.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. Name of the bidder resource that must follow the pattern `bidders/{bidderAccountId}`, where `{bidderAccountId}` is the account ID of the bidder whose information is to be received. One can get their account ID on the Authorized Buyers or Open Bidding UI, or by contacting their Google account manager.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Buyer": { +"description": "RTB Buyer account information.", +"id": "Buyer", +"properties": { +"activeCreativeCount": { +"description": "Output only. The number of creatives that this buyer submitted through the API or bid with in the last 30 days. This is counted against the maximum number of active creatives.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"bidder": { +"description": "Output only. The name of the bidder resource that is responsible for receiving bidding traffic for this account. The bidder name must follow the pattern `bidders/{bidderAccountId}`, where `{bidderAccountId}` is the account ID of the bidder receiving traffic for this buyer.", +"readOnly": true, +"type": "string" +}, +"billingIds": { +"description": "Output only. A list of billing IDs associated with this account. These IDs appear on: 1. A bid request, to signal which buyers are eligible to bid on a given opportunity, and which pretargeting configurations were matched for each eligible buyer. 2. The bid response, to attribute a winning impression to a specific account for billing, reporting, policy and publisher block enforcement.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"displayName": { +"description": "Output only. The diplay name associated with this buyer account, as visible to sellers.", +"readOnly": true, +"type": "string" +}, +"maximumActiveCreativeCount": { +"description": "Output only. The maximum number of active creatives that this buyer can have.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. Name of the buyer resource that must follow the pattern `buyers/{buyerAccountId}`, where `{buyerAccountId}` is the account ID of the buyer account whose information is to be received. One can get their account ID on the Authorized Buyers or Open Bidding UI, or by contacting their Google account manager.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CloseUserListRequest": { +"description": "A request to close a specified user list.", +"id": "CloseUserListRequest", +"properties": {}, +"type": "object" +}, +"Creative": { +"description": "A creative and its classification data.", +"id": "Creative", +"properties": { +"accountId": { +"description": "Output only. ID of the buyer account that this creative is owned by. Can be used to filter the response of the creatives.list method with equality and inequality check.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"adChoicesDestinationUrl": { +"description": "The link to AdChoices destination page. This is only supported for native ads.", +"type": "string" +}, +"advertiserName": { +"description": "The name of the company being advertised in the creative. Can be used to filter the response of the creatives.list method.", +"type": "string" +}, +"agencyId": { +"description": "The agency ID for this creative.", +"format": "int64", +"type": "string" +}, +"apiUpdateTime": { +"description": "Output only. The last update timestamp of the creative through the API.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"creativeFormat": { +"description": "Output only. The format of this creative. Can be used to filter the response of the creatives.list method.", +"enum": [ +"CREATIVE_FORMAT_UNSPECIFIED", +"HTML", +"VIDEO", +"NATIVE" +], +"enumDescriptions": [ +"The format is unknown.", +"HTML creative.", +"Video creative.", +"Native creative." +], +"readOnly": true, +"type": "string" +}, +"creativeId": { +"description": "Buyer-specific creative ID that references this creative in bid responses. This field is Ignored in update operations. Can be used to filter the response of the creatives.list method. The maximum length of the creative ID is 128 bytes.", +"type": "string" +}, +"creativeServingDecision": { +"$ref": "CreativeServingDecision", +"description": "Output only. Top level status and detected attributes of a creative (for example domain, language, advertiser, product category, etc.) that affect whether (status) and where (context) a creative will be allowed to serve.", +"readOnly": true +}, +"dealIds": { +"description": "Output only. IDs of all of the deals with which this creative has been used in bidding. Can be used to filter the response of the creatives.list method.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"declaredAttributes": { +"description": "All declared attributes for the ads that may be shown from this creative. Can be used to filter the response of the creatives.list method. If the `excluded_attribute` field of a [bid request](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto\") contains one of the attributes that were declared or detected for a given creative, and a bid is submitted with that creative, the bid will be filtered before the auction.", +"items": { +"enum": [ +"ATTRIBUTE_UNSPECIFIED", +"IMAGE_RICH_MEDIA", +"ADOBE_FLASH_FLV", +"IS_TAGGED", +"IS_COOKIE_TARGETED", +"IS_USER_INTEREST_TARGETED", +"EXPANDING_DIRECTION_NONE", +"EXPANDING_DIRECTION_UP", +"EXPANDING_DIRECTION_DOWN", +"EXPANDING_DIRECTION_LEFT", +"EXPANDING_DIRECTION_RIGHT", +"EXPANDING_DIRECTION_UP_LEFT", +"EXPANDING_DIRECTION_UP_RIGHT", +"EXPANDING_DIRECTION_DOWN_LEFT", +"EXPANDING_DIRECTION_DOWN_RIGHT", +"CREATIVE_TYPE_HTML", +"CREATIVE_TYPE_VAST_VIDEO", +"EXPANDING_DIRECTION_UP_OR_DOWN", +"EXPANDING_DIRECTION_LEFT_OR_RIGHT", +"EXPANDING_DIRECTION_ANY_DIAGONAL", +"EXPANDING_ACTION_ROLLOVER_TO_EXPAND", +"INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH", +"RICH_MEDIA_CAPABILITY_TYPE_MRAID", +"RICH_MEDIA_CAPABILITY_TYPE_FLASH", +"RICH_MEDIA_CAPABILITY_TYPE_HTML5", +"SKIPPABLE_INSTREAM_VIDEO", +"RICH_MEDIA_CAPABILITY_TYPE_SSL", +"RICH_MEDIA_CAPABILITY_TYPE_NON_SSL", +"RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL", +"NON_SKIPPABLE_INSTREAM_VIDEO", +"NATIVE_ELIGIBILITY_ELIGIBLE", +"NON_VPAID", +"NATIVE_ELIGIBILITY_NOT_ELIGIBLE", +"ANY_INTERSTITIAL", +"NON_INTERSTITIAL", +"IN_BANNER_VIDEO", +"RENDERING_SIZELESS_ADX", +"OMSDK_1_0", +"RENDERING_PLAYABLE" +], +"enumDescriptions": [ +"Do not use. This is a placeholder value only.", +"The creative is of type image/rich media. For pretargeting.", +"The creative is of video type Adobe Flash FLV. For pretargeting.", +"The creative is tagged.", +"The creative is cookie targeted.", +"The creative is user interest targeted.", +"The creative does not expand.", +"The creative expands up.", +"The creative expands down.", +"The creative expands left.", +"The creative expands right.", +"The creative expands up and left.", +"The creative expands up and right.", +"The creative expands down and left.", +"The creative expands down and right.", +"The creative type is HTML.", +"The creative type is VAST video.", +"The creative expands up or down.", +"The creative expands left or right.", +"The creative expands on any diagonal.", +"The creative expands when rolled over.", +"The instream vast video type is vpaid flash.", +"The creative is MRAID.", +"The creative is Flash.", +"The creative is HTML5.", +"The creative has an instream VAST video type of skippable instream video. For pretargeting.", +"The creative is SSL.", +"The creative is non-SSL.", +"The creative is an interstitial.", +"The creative has an instream VAST video type of non-skippable instream video. For pretargeting.", +"The creative is eligible for native.", +"The creative has an instream VAST video type of non-VPAID. For pretargeting.", +"The creative is not eligible for native.", +"The creative has an interstitial size of any interstitial. For pretargeting.", +"The creative has an interstitial size of non interstitial. For pretargeting.", +"The video type is in-banner video.", +"The creative can dynamically resize to fill a variety of slot sizes.", +"The open measurement SDK is supported.", +"The creative is considered a playable display creative." +], +"type": "string" +}, +"type": "array" +}, +"declaredClickThroughUrls": { +"description": "The set of declared destination URLs for the creative. Can be used to filter the response of the creatives.list method.", +"items": { +"type": "string" +}, +"type": "array" +}, +"declaredRestrictedCategories": { +"description": "All declared restricted categories for the ads that may be shown from this creative. Can be used to filter the response of the creatives.list method.", +"items": { +"enum": [ +"RESTRICTED_CATEGORY_UNSPECIFIED", +"ALCOHOL" +], +"enumDescriptions": [ +"Default value that should never be used.", +"The alcohol restricted category." +], +"type": "string" +}, +"type": "array" +}, +"declaredVendorIds": { +"description": "IDs for the declared ad technology vendors that may be used by this creative. See https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for possible values. Can be used to filter the response of the creatives.list method.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"html": { +"$ref": "HtmlContent", +"description": "An HTML creative." +}, +"impressionTrackingUrls": { +"description": "The set of URLs to be called to record an impression.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Output only. Name of the creative. Follows the pattern `buyers/{buyer}/creatives/{creative}`, where `{buyer}` represents the account ID of the buyer who owns the creative, and `{creative}` is the buyer-specific creative ID that references this creative in the bid response.", +"readOnly": true, +"type": "string" +}, +"native": { +"$ref": "NativeContent", +"description": "A native creative." +}, +"renderUrl": { +"description": "Experimental field that can be used during the [FLEDGE Origin Trial](/authorized-buyers/rtb/fledge-origin-trial). The URL to fetch an interest group ad used in [TURTLEDOVE on-device auction](https://github.com/WICG/turtledove/blob/main/FLEDGE.md#1-browsers-record-interest-groups\"). This should be unique among all creatives for a given `accountId`. This URL should be the same as the URL returned by [generateBid()](https://github.com/WICG/turtledove/blob/main/FLEDGE.md#32-on-device-bidding).", +"type": "string" +}, +"restrictedCategories": { +"deprecated": true, +"description": "All restricted categories for the ads that may be shown from this creative.", +"items": { +"enum": [ +"RESTRICTED_CATEGORY_UNSPECIFIED", +"ALCOHOL" +], +"enumDescriptions": [ +"Default value that should never be used.", +"The alcohol restricted category." +], +"type": "string" +}, +"type": "array" +}, +"version": { +"deprecated": true, +"description": "Output only. The version of the creative. Version for a new creative is 1 and it increments during subsequent creative updates.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"video": { +"$ref": "VideoContent", +"description": "A video creative." +} +}, +"type": "object" +}, +"CreativeDimensions": { +"description": "The dimensions of a creative. This applies to only HTML and Native creatives.", +"id": "CreativeDimensions", +"properties": { +"height": { +"description": "The height of the creative in pixels.", +"format": "int64", +"type": "string" +}, +"width": { +"description": "The width of the creative in pixels.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CreativeServingDecision": { +"description": "Top level status and detected attributes of a creative.", +"id": "CreativeServingDecision", +"properties": { +"adTechnologyProviders": { +"$ref": "AdTechnologyProviders", +"description": "The detected ad technology providers." +}, +"chinaPolicyCompliance": { +"$ref": "PolicyCompliance", +"description": "The policy compliance of this creative in China. When approved or disapproved, this applies to both deals and open auction in China. When pending review, this creative is allowed to serve for deals but not for open auction." +}, +"dealsPolicyCompliance": { +"$ref": "PolicyCompliance", +"description": "Policy compliance of this creative when bidding on Programmatic Guaranteed and Preferred Deals (outside of Russia and China)." +}, +"detectedAdvertisers": { +"description": "Detected advertisers and brands.", +"items": { +"$ref": "AdvertiserAndBrand" +}, +"type": "array" +}, +"detectedAttributes": { +"description": "Publisher-excludable attributes that were detected for this creative. Can be used to filter the response of the creatives.list method. If the `excluded_attribute` field of a [bid request](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto) contains one of the attributes that were declared or detected for a given creative, and a bid is submitted with that creative, the bid will be filtered before the auction.", +"items": { +"enum": [ +"ATTRIBUTE_UNSPECIFIED", +"IMAGE_RICH_MEDIA", +"ADOBE_FLASH_FLV", +"IS_TAGGED", +"IS_COOKIE_TARGETED", +"IS_USER_INTEREST_TARGETED", +"EXPANDING_DIRECTION_NONE", +"EXPANDING_DIRECTION_UP", +"EXPANDING_DIRECTION_DOWN", +"EXPANDING_DIRECTION_LEFT", +"EXPANDING_DIRECTION_RIGHT", +"EXPANDING_DIRECTION_UP_LEFT", +"EXPANDING_DIRECTION_UP_RIGHT", +"EXPANDING_DIRECTION_DOWN_LEFT", +"EXPANDING_DIRECTION_DOWN_RIGHT", +"CREATIVE_TYPE_HTML", +"CREATIVE_TYPE_VAST_VIDEO", +"EXPANDING_DIRECTION_UP_OR_DOWN", +"EXPANDING_DIRECTION_LEFT_OR_RIGHT", +"EXPANDING_DIRECTION_ANY_DIAGONAL", +"EXPANDING_ACTION_ROLLOVER_TO_EXPAND", +"INSTREAM_VAST_VIDEO_TYPE_VPAID_FLASH", +"RICH_MEDIA_CAPABILITY_TYPE_MRAID", +"RICH_MEDIA_CAPABILITY_TYPE_FLASH", +"RICH_MEDIA_CAPABILITY_TYPE_HTML5", +"SKIPPABLE_INSTREAM_VIDEO", +"RICH_MEDIA_CAPABILITY_TYPE_SSL", +"RICH_MEDIA_CAPABILITY_TYPE_NON_SSL", +"RICH_MEDIA_CAPABILITY_TYPE_INTERSTITIAL", +"NON_SKIPPABLE_INSTREAM_VIDEO", +"NATIVE_ELIGIBILITY_ELIGIBLE", +"NON_VPAID", +"NATIVE_ELIGIBILITY_NOT_ELIGIBLE", +"ANY_INTERSTITIAL", +"NON_INTERSTITIAL", +"IN_BANNER_VIDEO", +"RENDERING_SIZELESS_ADX", +"OMSDK_1_0", +"RENDERING_PLAYABLE" +], +"enumDescriptions": [ +"Do not use. This is a placeholder value only.", +"The creative is of type image/rich media. For pretargeting.", +"The creative is of video type Adobe Flash FLV. For pretargeting.", +"The creative is tagged.", +"The creative is cookie targeted.", +"The creative is user interest targeted.", +"The creative does not expand.", +"The creative expands up.", +"The creative expands down.", +"The creative expands left.", +"The creative expands right.", +"The creative expands up and left.", +"The creative expands up and right.", +"The creative expands down and left.", +"The creative expands down and right.", +"The creative type is HTML.", +"The creative type is VAST video.", +"The creative expands up or down.", +"The creative expands left or right.", +"The creative expands on any diagonal.", +"The creative expands when rolled over.", +"The instream vast video type is vpaid flash.", +"The creative is MRAID.", +"The creative is Flash.", +"The creative is HTML5.", +"The creative has an instream VAST video type of skippable instream video. For pretargeting.", +"The creative is SSL.", +"The creative is non-SSL.", +"The creative is an interstitial.", +"The creative has an instream VAST video type of non-skippable instream video. For pretargeting.", +"The creative is eligible for native.", +"The creative has an instream VAST video type of non-VPAID. For pretargeting.", +"The creative is not eligible for native.", +"The creative has an interstitial size of any interstitial. For pretargeting.", +"The creative has an interstitial size of non interstitial. For pretargeting.", +"The video type is in-banner video.", +"The creative can dynamically resize to fill a variety of slot sizes.", +"The open measurement SDK is supported.", +"The creative is considered a playable display creative." +], +"type": "string" +}, +"type": "array" +}, +"detectedClickThroughUrls": { +"description": "The set of detected destination URLs for the creative. Can be used to filter the response of the creatives.list method.", +"items": { +"type": "string" +}, +"type": "array" +}, +"detectedDomains": { +"description": "The detected domains for this creative.", +"items": { +"type": "string" +}, +"type": "array" +}, +"detectedLanguages": { +"description": "The detected languages for this creative. The order is arbitrary. The codes are 2 or 5 characters and are documented at https://developers.google.com/adwords/api/docs/appendix/languagecodes. Can be used to filter the response of the creatives.list method.", +"items": { +"type": "string" +}, +"type": "array" +}, +"detectedProductCategories": { +"description": "Detected product categories, if any. See the ad-product-categories.txt file in the technical documentation for a list of IDs. Can be used to filter the response of the creatives.list method.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"detectedSensitiveCategories": { +"description": "Detected sensitive categories, if any. Can be used to filter the response of the creatives.list method. See the ad-sensitive-categories.txt file in the technical documentation for a list of IDs. You should use these IDs along with the excluded-sensitive-category field in the bid request to filter your bids.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"detectedVendorIds": { +"description": "IDs of the ad technology vendors that were detected to be used by this creative. See https://storage.googleapis.com/adx-rtb-dictionaries/vendors.txt for possible values. Can be used to filter the response of the creatives.list method. If the `allowed_vendor_type` field of a [bid request](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto) does not contain one of the vendor type IDs that were declared or detected for a given creative, and a bid is submitted with that creative, the bid will be filtered before the auction.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"lastStatusUpdate": { +"description": "The last time the creative status was updated. Can be used to filter the response of the creatives.list method.", +"format": "google-datetime", +"type": "string" +}, +"networkPolicyCompliance": { +"$ref": "PolicyCompliance", +"description": "Policy compliance of this creative when bidding in open auction, private auction, or auction packages (outside of Russia and China)." +}, +"platformPolicyCompliance": { +"$ref": "PolicyCompliance", +"description": "Policy compliance of this creative when bidding in Open Bidding (outside of Russia and China). For the list of platform policies, see: https://support.google.com/platformspolicy/answer/3013851." +}, +"russiaPolicyCompliance": { +"$ref": "PolicyCompliance", +"description": "The policy compliance of this creative in Russia. When approved or disapproved, this applies to both deals and open auction in Russia. When pending review, this creative is allowed to serve for deals but not for open auction." +} +}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DestinationNotCrawlableEvidence": { +"description": "Evidence that the creative's destination URL was not crawlable by Google.", +"id": "DestinationNotCrawlableEvidence", +"properties": { +"crawlTime": { +"description": "Approximate time of the crawl.", +"format": "google-datetime", +"type": "string" +}, +"crawledUrl": { +"description": "Destination URL that was attempted to be crawled.", +"type": "string" +}, +"reason": { +"description": "Reason of destination not crawlable.", +"enum": [ +"REASON_UNSPECIFIED", +"UNREACHABLE_ROBOTS", +"TIMEOUT_ROBOTS", +"ROBOTED_DENIED", +"UNKNOWN" +], +"enumDescriptions": [ +"Default value that should never be used.", +"Site's robots exclusion file (for example, robots.txt) was unreachable.", +"Timed out reading site's robots exclusion file (for example, robots.txt).", +"Crawler was disallowed by the site's robots exclusion file (for example, robots.txt).", +"Unknown reason." +], +"type": "string" +} +}, +"type": "object" +}, +"DestinationNotWorkingEvidence": { +"description": "Evidence of the creative's destination URL not functioning properly or having been incorrectly set up.", +"id": "DestinationNotWorkingEvidence", +"properties": { +"dnsError": { +"description": "DNS lookup errors.", +"enum": [ +"DNS_ERROR_UNSPECIFIED", +"ERROR_DNS", +"GOOGLE_CRAWLER_DNS_ISSUE" +], +"enumDescriptions": [ +"Default value that should never be used.", +"DNS name was not found.", +"An internal issue occurred when Google's crawler tried to resolve the DNS entry. This is a Google-internal issue and may not be the result of an issue with the landing page." +], +"type": "string" +}, +"expandedUrl": { +"description": "The full non-working URL.", +"type": "string" +}, +"httpError": { +"description": "HTTP error code (for example, 404 or 5xx)", +"format": "int32", +"type": "integer" +}, +"invalidPage": { +"description": "Page was crawled successfully, but was detected as either a page with no content or an error page.", +"enum": [ +"INVALID_PAGE_UNSPECIFIED", +"EMPTY_OR_ERROR_PAGE" +], +"enumDescriptions": [ +"Default value that should never be used.", +"Page was empty or had an error." +], +"type": "string" +}, +"lastCheckTime": { +"description": "Approximate time when the ad destination was last checked.", +"format": "google-datetime", +"type": "string" +}, +"platform": { +"description": "Platform of the non-working URL.", +"enum": [ +"PLATFORM_UNSPECIFIED", +"PERSONAL_COMPUTER", +"ANDROID", +"IOS" +], +"enumDescriptions": [ +"Default value that should never be used.", +"The personal computer platform.", +"The Android platform.", +"The iOS platform." +], +"type": "string" +}, +"redirectionError": { +"description": "HTTP redirect chain error.", +"enum": [ +"REDIRECTION_ERROR_UNSPECIFIED", +"TOO_MANY_REDIRECTS", +"INVALID_REDIRECT", +"EMPTY_REDIRECT", +"REDIRECT_ERROR_UNKNOWN" +], +"enumDescriptions": [ +"Default value that should never be used.", +"Too many redirect hops.", +"Got a redirect but it was invalid.", +"Got a redirect but it was empty.", +"Unknown redirect error." +], +"type": "string" +}, +"urlRejected": { +"description": "Rejected because of malformed URLs or invalid requests.", +"enum": [ +"URL_REJECTED_UNSPECIFIED", +"BAD_REQUEST", +"MALFORMED_URL", +"URL_REJECTED_UNKNOWN" +], +"enumDescriptions": [ +"Default value that should never be used.", +"URL rejected because of a malformed request.", +"URL rejected because of a malformed URL.", +"URL rejected because of unknown reason." +], +"type": "string" +} +}, +"type": "object" +}, +"DestinationUrlEvidence": { +"description": "The full landing page URL of the destination.", +"id": "DestinationUrlEvidence", +"properties": { +"destinationUrl": { +"description": "The full landing page URL of the destination.", +"type": "string" +} +}, +"type": "object" +}, +"DomainCallEvidence": { +"description": "Number of HTTP calls made by a creative, broken down by domain.", +"id": "DomainCallEvidence", +"properties": { +"topHttpCallDomains": { +"description": "Breakdown of the most frequent domains called through HTTP by the creative.", +"items": { +"$ref": "DomainCalls" +}, +"type": "array" +}, +"totalHttpCallCount": { +"description": "The total number of HTTP calls made by the creative, including but not limited to the number of calls in the top_http_call_domains.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DomainCalls": { +"description": "The number of HTTP calls made to the given domain.", +"id": "DomainCalls", +"properties": { +"domain": { +"description": "The domain name.", +"type": "string" +}, +"httpCallCount": { +"description": "Number of HTTP calls made to the domain.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DownloadSizeEvidence": { +"description": "Total download size and URL-level download size breakdown for resources in a creative.", +"id": "DownloadSizeEvidence", +"properties": { +"topUrlDownloadSizeBreakdowns": { +"description": "Download size broken down by URLs with the top download size.", +"items": { +"$ref": "UrlDownloadSize" +}, +"type": "array" +}, +"totalDownloadSizeKb": { +"description": "Total download size (in kilobytes) for all the resources in the creative.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "Bidder endpoint that receives bid requests.", +"id": "Endpoint", +"properties": { +"bidProtocol": { +"description": "The protocol that the bidder endpoint is using.", +"enum": [ +"BID_PROTOCOL_UNSPECIFIED", +"GOOGLE_RTB", +"OPENRTB_JSON", +"OPENRTB_PROTOBUF" +], +"enumDescriptions": [ +"Placeholder for undefined bid protocol. This value should not be used.", +"Google RTB protocol / Protobuf encoding.", +"OpenRTB / JSON encoding (unversioned/latest).", +"OpenRTB / Protobuf encoding (unversioned/latest)." +], +"type": "string" +}, +"maximumQps": { +"description": "The maximum number of queries per second allowed to be sent to this server.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Name of the endpoint resource that must follow the pattern `bidders/{bidderAccountId}/endpoints/{endpointId}`, where {bidderAccountId} is the account ID of the bidder who operates this endpoint, and {endpointId} is a unique ID assigned by the server.", +"readOnly": true, +"type": "string" +}, +"tradingLocation": { +"description": "The trading location that bid requests should be sent from. See https://developers.google.com/authorized-buyers/rtb/peer-guide#trading-locations for further information.", +"enum": [ +"TRADING_LOCATION_UNSPECIFIED", +"US_WEST", +"US_EAST", +"EUROPE", +"ASIA" +], +"enumDescriptions": [ +"A placeholder for an undefined trading region. This value should not be used.", +"The Western US trading location.", +"The Eastern US trading location.", +"The European trading location.", +"The Asia trading location." +], +"type": "string" +}, +"url": { +"description": "Output only. The URL that bid requests should be sent to.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GetRemarketingTagResponse": { +"description": "This has been sunset as of October 2023, and will return an error response if called. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Response for a request to get remarketing tag.", +"id": "GetRemarketingTagResponse", +"properties": { +"snippet": { +"description": "An HTML tag that can be placed on the advertiser's page to add users to a user list. For more information and code samples on using snippets on your website, refer to [Tag your site for remarketing](https://support.google.com/google-ads/answer/2476688).", +"type": "string" +} +}, +"type": "object" +}, +"HtmlContent": { +"description": "HTML content for a creative.", +"id": "HtmlContent", +"properties": { +"height": { +"description": "The height of the HTML snippet in pixels. Can be used to filter the response of the creatives.list method.", +"format": "int32", +"type": "integer" +}, +"snippet": { +"description": "The HTML snippet that displays the ad when inserted in the web page.", +"type": "string" +}, +"width": { +"description": "The width of the HTML snippet in pixels. Can be used to filter the response of the creatives.list method.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HttpCallEvidence": { +"description": "HTTP calls made by a creative that resulted in policy violations.", +"id": "HttpCallEvidence", +"properties": { +"urls": { +"description": "URLs of HTTP calls made by the creative.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpCookieEvidence": { +"description": "Evidence for HTTP cookie-related policy violations.", +"id": "HttpCookieEvidence", +"properties": { +"cookieNames": { +"description": "Names of cookies that violate Google policies. For TOO_MANY_COOKIES policy, this will be the cookie names of top domains with the largest number of cookies. For other policies, this will be all the cookie names that violate the policy.", +"items": { +"type": "string" +}, +"type": "array" +}, +"maxCookieCount": { +"description": "The largest number of cookies set by a creative. If this field is set, cookie_names above will be set to the cookie names of top domains with the largest number of cookies. This field will only be set for TOO_MANY_COOKIES policy.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Image": { +"description": "An image resource. You may provide a larger image than was requested, so long as the aspect ratio is preserved.", +"id": "Image", +"properties": { +"height": { +"description": "Image height in pixels.", +"format": "int32", +"type": "integer" +}, +"url": { +"description": "The URL of the image.", +"type": "string" +}, +"width": { +"description": "Image width in pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListBiddersResponse": { +"description": "A response containing bidders.", +"id": "ListBiddersResponse", +"properties": { +"bidders": { +"description": "List of bidders.", +"items": { +"$ref": "Bidder" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token which can be passed to a subsequent call to the `ListBidders` method to retrieve the next page of results in ListBiddersRequest.pageToken.", +"type": "string" +} +}, +"type": "object" +}, +"ListBuyersResponse": { +"description": "A response containing buyer account information.", +"id": "ListBuyersResponse", +"properties": { +"buyers": { +"description": "List of buyers.", +"items": { +"$ref": "Buyer" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token which can be passed to a subsequent call to the `ListBuyers` method to retrieve the next page of results in ListBuyersRequest.pageToken.", +"type": "string" +} +}, +"type": "object" +}, +"ListCreativesResponse": { +"description": "A response for listing creatives.", +"id": "ListCreativesResponse", +"properties": { +"creatives": { +"description": "The list of creatives.", +"items": { +"$ref": "Creative" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in the ListCreativesRequest.pageToken field in the subsequent call to the `ListCreatives` method to retrieve the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListEndpointsResponse": { +"description": "A response containing bidder endpoints.", +"id": "ListEndpointsResponse", +"properties": { +"endpoints": { +"description": "List of bidder endpoints.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token which can be passed to a subsequent call to the `ListEndpoints` method to retrieve the next page of results in ListEndpointsRequest.pageToken.", +"type": "string" +} +}, +"type": "object" +}, +"ListPretargetingConfigsResponse": { +"description": "A response containing pretargeting configurations.", +"id": "ListPretargetingConfigsResponse", +"properties": { +"nextPageToken": { +"description": "A token which can be passed to a subsequent call to the `ListPretargetingConfigs` method to retrieve the next page of results in ListPretargetingConfigsRequest.pageToken.", +"type": "string" +}, +"pretargetingConfigs": { +"description": "List of pretargeting configurations.", +"items": { +"$ref": "PretargetingConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPublisherConnectionsResponse": { +"description": "A response to a request for listing publisher connections.", +"id": "ListPublisherConnectionsResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in the ListPublisherConnectionsRequest.pageToken field in the subsequent call to the `ListPublisherConnections` method to retrieve the next page of results.", +"type": "string" +}, +"publisherConnections": { +"description": "The list of publisher connections.", +"items": { +"$ref": "PublisherConnection" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUserListsResponse": { +"description": "The list user list response.", +"id": "ListUserListsResponse", +"properties": { +"nextPageToken": { +"description": "The continuation page token to send back to the server in a subsequent request. Due to a currently known issue, it is recommended that the caller keep invoking the list method until the time a next page token is not returned, even if the result set is empty.", +"type": "string" +}, +"userLists": { +"description": "List of user lists from the search.", +"items": { +"$ref": "UserList" +}, +"type": "array" +} +}, +"type": "object" +}, +"MediaFile": { +"description": "Information about each media file in the VAST.", +"id": "MediaFile", +"properties": { +"bitrate": { +"description": "Bitrate of the video file, in Kbps. Can be used to filter the response of the creatives.list method.", +"format": "int64", +"type": "string" +}, +"mimeType": { +"description": "The MIME type of this media file. Can be used to filter the response of the creatives.list method.", +"enum": [ +"VIDEO_MIME_TYPE_UNSPECIFIED", +"MIME_VIDEO_XFLV", +"MIME_VIDEO_WEBM", +"MIME_VIDEO_MP4", +"MIME_VIDEO_OGG", +"MIME_VIDEO_YT_HOSTED", +"MIME_VIDEO_X_MS_WMV", +"MIME_VIDEO_3GPP", +"MIME_VIDEO_MOV", +"MIME_APPLICATION_SWF", +"MIME_APPLICATION_SURVEY", +"MIME_APPLICATION_JAVASCRIPT", +"MIME_APPLICATION_SILVERLIGHT", +"MIME_APPLICATION_MPEGURL", +"MIME_APPLICATION_MPEGDASH", +"MIME_AUDIO_MP4A", +"MIME_AUDIO_MP3", +"MIME_AUDIO_OGG" +], +"enumDescriptions": [ +"Default value that should never be used.", +"Flash container.", +"WebM container assuming VP9 codec.", +"MPEG-4 container typically with H.264 codec.", +"Ogg container assuming Theora codec.", +"Video files hosted on YouTube.", +"Windows Media Video Codec.", +"3GPP container format used on 3G phones.", +"Quicktime container format.", +"Shockwave Flash (used for VPAID ads).", +"Properties of VAST served by consumer survey.", +"JavaScript (used for VPAID ads).", +"Silverlight (used for VPAID ads).", +"HLS/M3U8.", +"DASH.", +"MPEG-4 audio format.", +"MPEG-3 audio format.", +"Ogg audio format" +], +"type": "string" +} +}, +"type": "object" +}, +"NativeContent": { +"description": "Native content for a creative.", +"id": "NativeContent", +"properties": { +"advertiserName": { +"description": "The name of the advertiser or sponsor, to be displayed in the ad creative.", +"type": "string" +}, +"appIcon": { +"$ref": "Image", +"description": "The app icon, for app download ads." +}, +"body": { +"description": "A long description of the ad.", +"type": "string" +}, +"callToAction": { +"description": "A label for the button that the user is supposed to click.", +"type": "string" +}, +"clickLinkUrl": { +"description": "The URL that the browser/SDK will load when the user clicks the ad.", +"type": "string" +}, +"clickTrackingUrl": { +"description": "The URL to use for click tracking.", +"type": "string" +}, +"headline": { +"description": "A short title for the ad.", +"type": "string" +}, +"image": { +"$ref": "Image", +"description": "A large image." +}, +"logo": { +"$ref": "Image", +"description": "A smaller image, for the advertiser's logo." +}, +"priceDisplayText": { +"description": "The price of the promoted app including currency info.", +"type": "string" +}, +"starRating": { +"description": "The app rating in the app store. Must be in the range [0-5].", +"format": "double", +"type": "number" +}, +"videoUrl": { +"description": "The URL to fetch a native video ad.", +"type": "string" +}, +"videoVastXml": { +"description": "The contents of a VAST document for a native video ad.", +"type": "string" +} +}, +"type": "object" +}, +"NumericTargetingDimension": { +"description": "Generic targeting used for targeting dimensions that contain a list of included and excluded numeric IDs used in app, user list, geo, and vertical id targeting.", +"id": "NumericTargetingDimension", +"properties": { +"excludedIds": { +"description": "The IDs excluded in a configuration.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"includedIds": { +"description": "The IDs included in a configuration.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"OpenUserListRequest": { +"description": "A request to open a specified user list.", +"id": "OpenUserListRequest", +"properties": {}, +"type": "object" +}, +"PolicyCompliance": { +"description": "Policy compliance of the creative for a transaction type or a region.", +"id": "PolicyCompliance", +"properties": { +"status": { +"description": "Serving status for the given transaction type (for example, open auction, deals) or region (for example, China, Russia). Can be used to filter the response of the creatives.list method.", +"enum": [ +"STATUS_UNSPECIFIED", +"PENDING_REVIEW", +"DISAPPROVED", +"APPROVED", +"CERTIFICATE_REQUIRED" +], +"enumDescriptions": [ +"Default value that should never be used.", +"Creative is pending review.", +"Creative cannot serve.", +"Creative is approved.", +"Certificates are required for the creative to be served in some regions. For more information about creative certification, refer to: https://support.google.com/authorizedbuyers/answer/7450776" +], +"type": "string" +}, +"topics": { +"description": "Topics related to the policy compliance for this transaction type (for example, open auction, deals) or region (for example, China, Russia). Topics may be present only if status is DISAPPROVED.", +"items": { +"$ref": "PolicyTopicEntry" +}, +"type": "array" +} +}, +"type": "object" +}, +"PolicyTopicEntry": { +"description": "Each policy topic entry will represent a violation of a policy topic for a creative, with the policy topic information and optional evidence for the policy violation.", +"id": "PolicyTopicEntry", +"properties": { +"evidences": { +"description": "Pieces of evidence associated with this policy topic entry.", +"items": { +"$ref": "PolicyTopicEvidence" +}, +"type": "array" +}, +"helpCenterUrl": { +"description": "URL of the help center article describing this policy topic.", +"type": "string" +}, +"missingCertificate": { +"description": "Whether or not the policy topic is missing a certificate. Some policy topics require a certificate to unblock serving in some regions. For more information about creative certification, refer to: https://support.google.com/authorizedbuyers/answer/7450776", +"type": "boolean" +}, +"policyTopic": { +"description": "Policy topic this entry refers to. For example, \"ALCOHOL\", \"TRADEMARKS_IN_AD_TEXT\", or \"DESTINATION_NOT_WORKING\". The set of possible policy topics is not fixed for a particular API version and may change at any time. Can be used to filter the response of the creatives.list method", +"type": "string" +} +}, +"type": "object" +}, +"PolicyTopicEvidence": { +"description": "Evidence associated with a policy topic entry.", +"id": "PolicyTopicEvidence", +"properties": { +"destinationNotCrawlable": { +"$ref": "DestinationNotCrawlableEvidence", +"description": "The creative's destination URL was not crawlable by Google." +}, +"destinationNotWorking": { +"$ref": "DestinationNotWorkingEvidence", +"description": "The creative's destination URL did not function properly or was incorrectly set up." +}, +"destinationUrl": { +"$ref": "DestinationUrlEvidence", +"description": "URL of the actual landing page." +}, +"domainCall": { +"$ref": "DomainCallEvidence", +"description": "Number of HTTP calls made by the creative, broken down by domain." +}, +"downloadSize": { +"$ref": "DownloadSizeEvidence", +"description": "Total download size and URL-level download size breakdown for resources in a creative." +}, +"httpCall": { +"$ref": "HttpCallEvidence", +"description": "HTTP calls made by the creative that resulted in policy violations." +}, +"httpCookie": { +"$ref": "HttpCookieEvidence", +"description": "Evidence for HTTP cookie-related policy violations." +} +}, +"type": "object" +}, +"PretargetingConfig": { +"description": "Pretargeting configuration: a set of targeting dimensions applied at the pretargeting stage of the RTB funnel. These control which inventory a bidder will receive bid requests for.", +"id": "PretargetingConfig", +"properties": { +"allowedUserTargetingModes": { +"description": "Targeting modes included by this configuration. A bid request must allow all the specified targeting modes. An unset value allows all bid requests to be sent, regardless of which targeting modes they allow.", +"items": { +"enum": [ +"USER_TARGETING_MODE_UNSPECIFIED", +"REMARKETING_ADS", +"INTEREST_BASED_TARGETING" +], +"enumDescriptions": [ +"Placeholder for undefined user targeting mode.", +"Remarketing ads are allowed to serve.", +"Ads based on user interest category targeting are allowed to serve." +], +"type": "string" +}, +"type": "array" +}, +"appTargeting": { +"$ref": "AppTargeting", +"description": "Targeting on a subset of app inventory. If APP is listed in targeted_environments, the specified targeting is applied. A maximum of 30,000 app IDs can be targeted. An unset value for targeting allows all app-based bid requests to be sent. Apps can either be targeting positively (bid requests will be sent only if the destination app is listed in the targeting dimension) or negatively (bid requests will be sent only if the destination app is not listed in the targeting dimension)." +}, +"billingId": { +"description": "Output only. The identifier that corresponds to this pretargeting configuration that helps buyers track and attribute their spend across their own arbitrary divisions. If a bid request matches more than one configuration, the buyer chooses which billing_id to attribute each of their bids.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "The diplay name associated with this configuration. This name must be unique among all the pretargeting configurations a bidder has.", +"type": "string" +}, +"excludedContentLabelIds": { +"description": "The sensitive content category label IDs excluded in this configuration. Bid requests for inventory with any of the specified content label IDs will not be sent. Refer to this file https://storage.googleapis.com/adx-rtb-dictionaries/content-labels.txt for category IDs.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"geoTargeting": { +"$ref": "NumericTargetingDimension", +"description": "The geos included or excluded in this configuration defined in https://storage.googleapis.com/adx-rtb-dictionaries/geo-table.csv" +}, +"includedCreativeDimensions": { +"description": "Creative dimensions included by this configuration. Only bid requests eligible for at least one of the specified creative dimensions will be sent. An unset value allows all bid requests to be sent, regardless of creative dimension.", +"items": { +"$ref": "CreativeDimensions" +}, +"type": "array" +}, +"includedEnvironments": { +"description": "Environments that are being included. Bid requests will not be sent for a given environment if it is not included. Further restrictions can be applied to included environments to target only a subset of its inventory. An unset value includes all environments.", +"items": { +"enum": [ +"ENVIRONMENT_UNSPECIFIED", +"APP", +"WEB" +], +"enumDescriptions": [ +"Placeholder for unspecified environment. This value should not be used.", +"App environment.", +"Web environment." +], +"type": "string" +}, +"type": "array" +}, +"includedFormats": { +"description": "Creative formats included by this configuration. Only bid requests eligible for at least one of the specified creative formats will be sent. An unset value will allow all bid requests to be sent, regardless of format.", +"items": { +"enum": [ +"CREATIVE_FORMAT_UNSPECIFIED", +"HTML", +"VAST", +"NATIVE" +], +"enumDescriptions": [ +"Placeholder for undefined creative format. This value should not be used.", +"HTML and AMPHTML creatives.", +"VAST video or audio creative.", +"Native creative, including standard and video native ads." +], +"type": "string" +}, +"type": "array" +}, +"includedLanguages": { +"description": "The languages included in this configuration, represented by their language code. See https://developers.google.com/adwords/api/docs/appendix/languagecodes.", +"items": { +"type": "string" +}, +"type": "array" +}, +"includedMobileOperatingSystemIds": { +"description": "The mobile operating systems included in this configuration as defined in https://storage.googleapis.com/adx-rtb-dictionaries/mobile-os.csv", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"includedPlatforms": { +"description": "The platforms included by this configration. Bid requests for devices with the specified platform types will be sent. An unset value allows all bid requests to be sent, regardless of platform.", +"items": { +"enum": [ +"PLATFORM_UNSPECIFIED", +"PERSONAL_COMPUTER", +"PHONE", +"TABLET", +"CONNECTED_TV" +], +"enumDescriptions": [ +"Placeholder for an undefined platform. This value should not be used.", +"The personal computer platform.", +"The mobile platform.", +"The tablet platform.", +"The connected TV platform." +], +"type": "string" +}, +"type": "array" +}, +"includedUserIdTypes": { +"description": "User identifier types included in this configuration. At least one of the user identifier types specified in this list must be available for the bid request to be sent.", +"items": { +"enum": [ +"USER_ID_TYPE_UNSPECIFIED", +"HOSTED_MATCH_DATA", +"GOOGLE_COOKIE", +"DEVICE_ID", +"PUBLISHER_PROVIDED_ID" +], +"enumDescriptions": [ +"Placeholder for unspecified user identifier.", +"Hosted match data, referring to hosted_match_data in the bid request.", +"Google cookie, referring to google_user_id in the bid request.", +"Mobile device advertising ID.", +"The request has a publisher-provided ID available to the bidder." +], +"type": "string" +}, +"type": "array" +}, +"interstitialTargeting": { +"description": "The interstitial targeting specified for this configuration. The unset value will allow bid requests to be sent regardless of whether they are for interstitials or not.", +"enum": [ +"INTERSTITIAL_TARGETING_UNSPECIFIED", +"ONLY_INTERSTITIAL_REQUESTS", +"ONLY_NON_INTERSTITIAL_REQUESTS" +], +"enumDescriptions": [ +"Unspecified interstitial targeting. Represents an interstitial-agnostic selection.", +"Only bid requests for interstitial inventory should be sent.", +"Only bid requests for non-interstitial inventory should be sent." +], +"type": "string" +}, +"invalidGeoIds": { +"description": "Output only. Existing included or excluded geos that are invalid. Previously targeted geos may become invalid due to privacy restrictions.", +"items": { +"format": "int64", +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"maximumQps": { +"description": "The maximum QPS threshold for this configuration. The bidder should receive no more than this number of bid requests matching this configuration per second across all their bidding endpoints among all trading locations. Further information available at https://developers.google.com/authorized-buyers/rtb/peer-guide", +"format": "int64", +"type": "string" +}, +"minimumViewabilityDecile": { +"description": "The targeted minimum viewability decile, ranging in values [0, 10]. A value of 5 means that the configuration will only match adslots for which we predict at least 50% viewability. Values > 10 will be rounded down to 10. An unset value or a value of 0 indicates that bid requests will be sent regardless of viewability.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Output only. Name of the pretargeting configuration that must follow the pattern `bidders/{bidder_account_id}/pretargetingConfigs/{config_id}`", +"readOnly": true, +"type": "string" +}, +"publisherTargeting": { +"$ref": "StringTargetingDimension", +"description": "Targeting on a subset of publisher inventory. Publishers can either be targeted positively (bid requests will be sent only if the publisher is listed in the targeting dimension) or negatively (bid requests will be sent only if the publisher is not listed in the targeting dimension). A maximum of 10,000 publisher IDs can be targeted. Publisher IDs are found in [ads.txt](https://iabtechlab.com/ads-txt/) / [app-ads.txt](https://iabtechlab.com/app-ads-txt/) and in bid requests in the `BidRequest.publisher_id` field on the [Google RTB protocol](https://developers.google.com/authorized-buyers/rtb/downloads/realtime-bidding-proto) or the `BidRequest.site.publisher.id` / `BidRequest.app.publisher.id` field on the [OpenRTB protocol](https://developers.google.com/authorized-buyers/rtb/downloads/openrtb-adx-proto). Publisher IDs will be returned in the order that they were entered." +}, +"state": { +"description": "Output only. The state of this pretargeting configuration.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"SUSPENDED" +], +"enumDescriptions": [ +"Placeholder for undefined state.", +"This pretargeting configuration is actively being used to filter bid requests.", +"This pretargeting configuration is suspended and not used in serving." +], +"readOnly": true, +"type": "string" +}, +"userListTargeting": { +"$ref": "NumericTargetingDimension", +"description": "The remarketing lists included or excluded in this configuration as defined in UserList." +}, +"verticalTargeting": { +"$ref": "NumericTargetingDimension", +"description": "The verticals included or excluded in this configuration as defined in https://developers.google.com/authorized-buyers/rtb/downloads/publisher-verticals" +}, +"webTargeting": { +"$ref": "StringTargetingDimension", +"description": "Targeting on a subset of site inventory. If WEB is listed in included_environments, the specified targeting is applied. A maximum of 50,000 site URLs can be targeted. An unset value for targeting allows all web-based bid requests to be sent. Sites can either be targeting positively (bid requests will be sent only if the destination site is listed in the targeting dimension) or negatively (bid requests will be sent only if the destination site is not listed in the pretargeting configuration)." +} +}, +"type": "object" +}, +"PublisherConnection": { +"description": "An Open Bidding exchange's connection to a publisher. This is initiated by the publisher for the bidder to review. If approved by the bidder, this means that the bidder agrees to receive bid requests from the publisher.", +"id": "PublisherConnection", +"properties": { +"biddingState": { +"description": "Whether the publisher has been approved by the bidder.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"REJECTED", +"APPROVED" +], +"enumDescriptions": [ +"An unspecified bidding status.", +"Indicates a request for connection from the publisher that the bidder needs to review.", +"Indicates that the publisher was rejected.", +"Indicates that the publisher was approved." +], +"type": "string" +}, +"createTime": { +"description": "Output only. The time at which the publisher initiated a connection with the bidder (irrespective of if or when the bidder approves it). This is subsequently updated if the publisher revokes and re-initiates the connection.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Output only. Publisher display name.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. Name of the publisher connection. This follows the pattern `bidders/{bidder}/publisherConnections/{publisher}`, where `{bidder}` represents the account ID of the bidder, and `{publisher}` is the ads.txt/app-ads.txt publisher ID.", +"readOnly": true, +"type": "string" +}, +"publisherPlatform": { +"description": "Output only. Whether the publisher is an Ad Manager or AdMob publisher.", +"enum": [ +"PUBLISHER_PLATFORM_UNSPECIFIED", +"GOOGLE_AD_MANAGER", +"ADMOB" +], +"enumDescriptions": [ +"An unspecified publisher platform.", +"A Google Ad Manager publisher.", +"An AdMob publisher." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RemoveTargetedAppsRequest": { +"description": "A request to stop targeting the provided apps in a specific pretargeting configuration. The pretargeting configuration itself specifies how these apps are targeted. in PretargetingConfig.appTargeting.mobileAppTargeting.", +"id": "RemoveTargetedAppsRequest", +"properties": { +"appIds": { +"description": "A list of app IDs to stop targeting in the pretargeting configuration. These values will be removed from the list of targeted app IDs in PretargetingConfig.appTargeting.mobileAppTargeting.values.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"RemoveTargetedPublishersRequest": { +"description": "A request to stop targeting publishers in a specific configuration. The pretargeting configuration itself specifies how these publishers are targeted in PretargetingConfig.publisherTargeting.", +"id": "RemoveTargetedPublishersRequest", +"properties": { +"publisherIds": { +"description": "A list of publisher IDs to stop targeting in the pretargeting configuration. These values will be removed from the list of targeted publisher IDs in PretargetingConfig.publisherTargeting.values. Publishers are identified by their publisher ID from ads.txt / app-ads.txt. See https://iabtechlab.com/ads-txt/ and https://iabtechlab.com/app-ads-txt/ for more details.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"RemoveTargetedSitesRequest": { +"description": "A request to stop targeting sites in a specific pretargeting configuration. The pretargeting configuration itself specifies how these sites are targeted in PretargetingConfig.webTargeting.", +"id": "RemoveTargetedSitesRequest", +"properties": { +"sites": { +"description": "A list of site URLs to stop targeting in the pretargeting configuration. These values will be removed from the list of targeted URLs in PretargetingConfig.webTargeting.values.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"StringTargetingDimension": { +"description": "Generic targeting with string values used in app, website and publisher targeting.", +"id": "StringTargetingDimension", +"properties": { +"targetingMode": { +"description": "How the items in this list should be targeted.", +"enum": [ +"TARGETING_MODE_UNSPECIFIED", +"INCLUSIVE", +"EXCLUSIVE" +], +"enumDescriptions": [ +"Placeholder for undefined targeting mode.", +"The inclusive list type. Inventory must match an item in this list to be targeted.", +"The exclusive list type. Inventory must not match any item in this list to be targeted." +], +"type": "string" +}, +"values": { +"description": "The values specified.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SuspendPretargetingConfigRequest": { +"description": "A request to suspend a pretargeting configuration. Sets the configuration's state to SUSPENDED.", +"id": "SuspendPretargetingConfigRequest", +"properties": {}, +"type": "object" +}, +"UrlDownloadSize": { +"description": "The URL-level breakdown for the download size.", +"id": "UrlDownloadSize", +"properties": { +"downloadSizeKb": { +"description": "Download size of the URL in kilobytes.", +"format": "int32", +"type": "integer" +}, +"normalizedUrl": { +"description": "The normalized URL with query parameters and fragment removed.", +"type": "string" +} +}, +"type": "object" +}, +"UrlRestriction": { +"description": "Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api Represents the URL restriction (for the URL captured by the pixel callback) for a user list.", +"id": "UrlRestriction", +"properties": { +"endDate": { +"$ref": "Date", +"description": "End date (if specified) of the URL restriction. End date should be later than the start date for the date range to be valid." +}, +"restrictionType": { +"description": "The restriction type for the specified URL.", +"enum": [ +"RESTRICTION_TYPE_UNSPECIFIED", +"CONTAINS", +"EQUALS", +"STARTS_WITH", +"ENDS_WITH", +"DOES_NOT_EQUAL", +"DOES_NOT_CONTAIN", +"DOES_NOT_START_WITH", +"DOES_NOT_END_WITH" +], +"enumDescriptions": [ +"Default value that should never be used.", +"The tag URL (as recorded by the pixel callback) contains the specified URL.", +"The tag URL (as recorded by the pixel callback) exactly matches the specified URL.", +"The tag URL (as recorded by the pixel callback) starts with the specified URL.", +"The tag URL (as recorded by the pixel callback) ends with the specified URL.", +"The tag URL (as recorded by the pixel callback) does not equal the specified URL.", +"The tag URL (as recorded by the pixel callback) does not contain the specified URL.", +"The tag URL (as recorded by the pixel callback) does not start with the specified URL.", +"The tag URL (as recorded by the pixel callback) does not end with the specified URL." +], +"type": "string" +}, +"startDate": { +"$ref": "Date", +"description": "Start date (if specified) of the URL restriction." +}, +"url": { +"description": "Required. The URL to use for applying the restriction on the user list.", +"type": "string" +} +}, +"type": "object" +}, +"UserList": { +"description": "Represents an Authorized Buyers user list. Authorized Buyers can create/update/list user lists. Once a user list is created in the system, Authorized Buyers can add users to the user list using the bulk uploader API. Alternatively, users can be added by hosting a tag on the advertiser's page.", +"id": "UserList", +"properties": { +"description": { +"description": "The description for the user list.", +"type": "string" +}, +"displayName": { +"description": "Required. Display name of the user list. This must be unique across all user lists for a given account.", +"type": "string" +}, +"membershipDurationDays": { +"description": "Required. The number of days a user's cookie stays on the user list. The field must be between 0 and 540 inclusive.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Name of the user list that must follow the pattern `buyers/{buyer}/userLists/{user_list}`, where `{buyer}` represents the account ID of the buyer who owns the user list. For a bidder accessing user lists on behalf of a child seat buyer, `{buyer}` represents the account ID of the child seat buyer. `{user_list}` is an int64 identifier assigned by Google to uniquely identify a user list.", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Output only. The status of the user list. A new user list starts out as open.", +"enum": [ +"STATUS_UNSPECIFIED", +"OPEN", +"CLOSED" +], +"enumDescriptions": [ +"Default value that should never be used.", +"New users can be added to the user list.", +"New users cannot be added to the user list." +], +"readOnly": true, +"type": "string" +}, +"urlRestriction": { +"$ref": "UrlRestriction", +"description": "Required. Deprecated. This will be removed in October 2023. For more information, see the release notes: https://developers.google.com/authorized-buyers/apis/relnotes#real-time-bidding-api The URL restriction for the user list." +} +}, +"type": "object" +}, +"VideoContent": { +"description": "Video content for a creative.", +"id": "VideoContent", +"properties": { +"videoMetadata": { +"$ref": "VideoMetadata", +"description": "Output only. Video metadata.", +"readOnly": true +}, +"videoUrl": { +"description": "The URL to fetch a video ad.", +"type": "string" +}, +"videoVastXml": { +"description": "The contents of a VAST document for a video ad. This document should conform to the VAST 2.0 or 3.0 standard.", +"type": "string" +} +}, +"type": "object" +}, +"VideoMetadata": { +"description": "Video metadata for a creative.", +"id": "VideoMetadata", +"properties": { +"duration": { +"description": "The duration of the ad. Can be used to filter the response of the creatives.list method.", +"format": "google-duration", +"type": "string" +}, +"isValidVast": { +"description": "Is this a valid VAST ad? Can be used to filter the response of the creatives.list method.", +"type": "boolean" +}, +"isVpaid": { +"description": "Is this a VPAID ad? Can be used to filter the response of the creatives.list method.", +"type": "boolean" +}, +"mediaFiles": { +"description": "The list of all media files declared in the VAST. If there are multiple VASTs in a wrapper chain, this includes the media files from the deepest one in the chain.", +"items": { +"$ref": "MediaFile" +}, +"type": "array" +}, +"skipOffset": { +"description": "The minimum duration that the user has to watch before being able to skip this ad. If the field is not set, the ad is not skippable. If the field is set, the ad is skippable. Can be used to filter the response of the creatives.list method.", +"format": "google-duration", +"type": "string" +}, +"vastVersion": { +"description": "The maximum VAST version across all wrapped VAST documents. Can be used to filter the response of the creatives.list method.", +"enum": [ +"VAST_VERSION_UNSPECIFIED", +"VAST_VERSION_1_0", +"VAST_VERSION_2_0", +"VAST_VERSION_3_0", +"VAST_VERSION_4_0" +], +"enumDescriptions": [ +"Default value that should never be used.", +"VAST 1.0", +"VAST 2.0", +"VAST 3.0", +"VAST 4.0" +], +"type": "string" +} +}, +"type": "object" +}, +"WatchCreativesRequest": { +"description": "A request to receive push notifications when any of the creatives belonging to the bidder changes status.", +"id": "WatchCreativesRequest", +"properties": {}, +"type": "object" +}, +"WatchCreativesResponse": { +"description": "A response for the request to receive push notification when a bidder's creatives change status.", +"id": "WatchCreativesResponse", +"properties": { +"subscription": { +"description": "The Pub/Sub subscription that can be used to pull creative status notifications. This would be of the format `projects/{project_id}/subscriptions/{subscription_id}`. Subscription is created with pull delivery. All service accounts belonging to the bidder will have read access to this subscription. Subscriptions that are inactive for more than 90 days will be disabled. Use watchCreatives to re-enable the subscription.", +"type": "string" +}, +"topic": { +"description": "The Pub/Sub topic that will be used to publish creative serving status notifications. This would be of the format `projects/{project_id}/topics/{topic_id}`.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Real-time Bidding API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/realtimebidding.v1alpha.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/realtimebidding.v1alpha.json new file mode 100644 index 0000000000000000000000000000000000000000..119a28c8afaaea8544666b45377abefce852a82f --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/realtimebidding.v1alpha.json @@ -0,0 +1,319 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/realtime-bidding": { + "description": "See, create, edit, and delete your Authorized Buyers and Open Bidding account entities" + } + } + } + }, + "basePath": "", + "baseUrl": "https://realtimebidding.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Real-time Bidding", + "description": "Allows external bidders to manage their RTB integration with Google. This includes managing bidder endpoints, QPS quotas, configuring what ad inventory to receive via pretargeting, submitting creatives for verification, and accessing creative metadata such as approval status.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/authorized-buyers/apis/realtimebidding/reference/rest/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "realtimebidding:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://realtimebidding.mtls.googleapis.com/", + "name": "realtimebidding", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "bidders": { + "resources": { + "biddingFunctions": { + "methods": { + "activate": { + "description": "Activates an existing bidding function. An activated function is available for invocation for the server-side TURTLEDOVE simulations.", + "flatPath": "v1alpha/bidders/{biddersId}/biddingFunctions/{biddingFunctionsId}:activate", + "httpMethod": "POST", + "id": "realtimebidding.bidders.biddingFunctions.activate", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the bidding function to activate. Format: `bidders/{bidder_account_id}/biddingFunction/{bidding_function_name}`", + "location": "path", + "pattern": "^bidders/[^/]+/biddingFunctions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:activate", + "request": { + "$ref": "ActivateBiddingFunctionRequest" + }, + "response": { + "$ref": "BiddingFunction" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + }, + "archive": { + "description": "Archives an existing bidding function. An archived function will not be available for function invocation for the server-side TURTLEDOVE simulations unless it is activated.", + "flatPath": "v1alpha/bidders/{biddersId}/biddingFunctions/{biddingFunctionsId}:archive", + "httpMethod": "POST", + "id": "realtimebidding.bidders.biddingFunctions.archive", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the bidding function to archive. Format: `bidders/{bidder_account_id}/biddingFunction/{bidding_function_name}`", + "location": "path", + "pattern": "^bidders/[^/]+/biddingFunctions/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}:archive", + "request": { + "$ref": "ArchiveBiddingFunctionRequest" + }, + "response": { + "$ref": "BiddingFunction" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + }, + "create": { + "description": "Creates a new bidding function.", + "flatPath": "v1alpha/bidders/{biddersId}/biddingFunctions", + "httpMethod": "POST", + "id": "realtimebidding.bidders.biddingFunctions.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The name of the bidder for which to create the bidding function. Format: `bidders/{bidderAccountId}`", + "location": "path", + "pattern": "^bidders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/biddingFunctions", + "request": { + "$ref": "BiddingFunction" + }, + "response": { + "$ref": "BiddingFunction" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + }, + "list": { + "description": "Lists the bidding functions that a bidder currently has registered.", + "flatPath": "v1alpha/bidders/{biddersId}/biddingFunctions", + "httpMethod": "GET", + "id": "realtimebidding.bidders.biddingFunctions.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of bidding functions to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A token identifying a page of results the server should return. This value is received from a previous `ListBiddingFunctions` call in ListBiddingFunctionsResponse.nextPageToken.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Name of the bidder whose bidding functions will be listed. Format: `bidders/{bidder_account_id}`", + "location": "path", + "pattern": "^bidders/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/biddingFunctions", + "response": { + "$ref": "ListBiddingFunctionsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/realtime-bidding" + ] + } + } + } + } + } + }, + "revision": "20230605", + "rootUrl": "https://realtimebidding.googleapis.com/", + "schemas": { + "ActivateBiddingFunctionRequest": { + "description": "The request to activate a bidding function.", + "id": "ActivateBiddingFunctionRequest", + "properties": {}, + "type": "object" + }, + "ArchiveBiddingFunctionRequest": { + "description": "A request to archive a bidding function.", + "id": "ArchiveBiddingFunctionRequest", + "properties": {}, + "type": "object" + }, + "BiddingFunction": { + "description": "The bidding function to be executed as part of the TURTLEDOVE simulation experiment bidding flow.", + "id": "BiddingFunction", + "properties": { + "biddingFunction": { + "description": "The raw Javascript source code of the bidding function.", + "type": "string" + }, + "name": { + "description": "The name of the bidding function that must follow the pattern: `bidders/{bidder_account_id}/biddingFunctions/{bidding_function_name}`.", + "type": "string" + }, + "state": { + "description": "Output only. The state of the bidding function.", + "enum": [ + "STATE_UNSPECIFIED", + "ACTIVE", + "ARCHIVED" + ], + "enumDescriptions": [ + "Default value that should not be used.", + "An active function. Only `ACTIVE` bidding functions or ad scoring functions are made available for the server-side TURTLEDOVE simulations. Every account is limited to 10 active bidding functions per account.", + "A function that is no longer made available for invocation in a simulation and instead archived. An archived function can later be made active by activating the function through `ActivateBiddingFunction`." + ], + "readOnly": true, + "type": "string" + }, + "type": { + "description": "The type of the bidding function to be created.", + "enum": [ + "FUNCTION_TYPE_UNSPECIFIED", + "TURTLEDOVE_SIMULATION_BIDDING_FUNCTION", + "FLEDGE_BIDDING_FUNCTION" + ], + "enumDescriptions": [ + "Default value that should not be used.", + "Bidding function that can be used by Authorized Buyers in the original TURTLEDOVE simulation. See documentation on the TURTLEDOVE simulation at https://developers.google.com/authorized-buyers/rtb/turtledove. The function takes in a Javascript object, `inputs`, that contains the following named fields: `openrtbContextualBidRequest` OR `googleContextualBidRequest`, `customContextualSignal`, `interestBasedBidData`, `interestGroupData`, and returns the bid price CPM. Example: ``` /* Returns a bid price CPM. * * @param {Object} inputs an object with the * following named fields: * - openrtbContextualBidRequest * OR googleContextualBidRequest * - customContextualSignal * - interestBasedBidData * - interestGroupData */ function biddingFunction(inputs) { ... return inputs.interestBasedBidData.cpm * inputs.customContextualSignals.placementMultiplier; } ```", + "Buyer's interest group bidding function that can be used by Authorized Buyers in the FLEDGE simulation. See the FLEDGE explainer at https://github.com/WICG/turtledove/blob/main/FLEDGE.md#32-on-device-bidding. The function takes one argument, `inputs`, that contains an object with the following named fields of the form: ``` { \"interestGroup\" : { \"ad\" : [ \"buyerCreativeId\": \"...\", # Ad creative ID \"adData\": { # JSON object } ], \"userBiddingSignals\": { . # JSON object } }, \"auctionSignals\": { \"url\": # string, \"slotVisibility\": # enum value, \"slotDimensions\": [ { \"height\": # number value \"width\": # number value } ] }, \"perBuyerSignals\": { # JSON object }, \"trustedBiddingSignals\": { # JSON object }, \"browserSignals\": { \"recent_impression_ages_secs\": [ # Array of integers. Not yet populated. ] } } ``` `interestGroup`: An object containing a list of `ad` objects, which contain the following named fields: - `buyerCreativeId`: The ad creative ID string. - `adData`: Any JSON value of the bidder's choosing to contain data associated with an ad provided in `BidResponse.ad.adslot.ad_data` for the Google Authorized Buyers protocol and `BidResponse.seatbid.bid.ext.ad_data` for the OpenRTB protocol. - `userBiddingSignals`: Any JSON value of the bidder's choosing containing interest group data that corresponds to user_bidding_signals (as in FLEDGE). This field will be populated from `BidResponse.interest_group_map.user_bidding_signals` for Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. `auctionSignals`: Contains data from the seller. It corresponds to the auction signals data described in the FLEDGE proposal. It is an object containing the following named fields: - `url`: The string URL of the page with parameters removed. - `slotVisibility`: Enum of one of the following potential values: - NO_DETECTION = 0 - ABOVE_THE_FOLD = 1 - BELOW_THE_FOLD = 2 - `slotDimensions`: A list of objects containing containing width and height pairs in `width` and `height` fields, respectively, from `BidRequest.adslot.width` and `BidRequest.adslot.height` for the Google Authorized Buyers protocol and `BidRequest.imp.banner.format.w` and `BidRequest.imp.banner.format.h` for the OpenRTB protocol. `perBuyerSignals`: The contextual signals from the bid response that are populated in `BidResponse.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_bidding.interest_group_buyers.per_buyer_signals` for the OpenRTB protocol. These signals can be of any JSON format of your choosing, however, the buyer's domain name must match between: - the interest group response in `BidResponse.interest_group_map.buyer_domain` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_map.buyer_domain` for the OpenRTB protocol. - the contextual response as a key to the map in `BidResponse.interest_group_bidding.interest_group_buyers` for the Google Authorized Buyers protocol or in `BidResponse.ext.interest_group_bidding.interest_group_buyers` for the OpenRTB protocol. In other words, there must be a match between the buyer domain of the contextual per_buyer_signals and the domain of an interest group. `trustedBiddingSignals`: The trusted bidding signals that corresponds to the trusted_bidding_signals in the FLEDGE proposal. It is provided in the interest group response as `BidResponse.interest_group_map.user_bidding_signals` for the Google Authorized Buyers protocol and `BidResponse.ext.interest_group_map.user_bidding_signals` for the OpenRTB protocol. This field can be any JSON format of your choosing. `browserSignals`: An object of simulated browser-provider signals. It is an object with a single named field, `recent_impression_ages_secs`, that contains a list of estimated number value recent impression ages in seconds for a given interest group. `recent_impression_ages_secs` is not yet populated. The function returns the string creative ID of the selected ad, the bid price CPM, and (optionally) selected product IDs. In addition, the bidding function may populate an optional debug string that may be used for remote debugging and troubleshooting of a bidder-provided bidding function. The debug string should not contain a user identifier. The maximum length of the debug string is 200 bytes. This debug string is available in `BidResponseFeedback` (https://developers.google.com/authorized-buyers/rtb/realtime-bidding-guide#bidresponsefeedback-object) and `BidFeedback` (https://developers.google.com/authorized-buyers/rtb/openrtb-guide#bidfeedback), for the Google protocol and OpenRTB protocol respectively. In addition, the debug string can be inserted into the creative HTML snippet through macro substitution if the following string is included in the snippet: \u201c%%DEBUG_STRING%%\u201d. Ensure the debug string complies with [Platform Program Policies](https://support.google.com/platformspolicy/answer/3013851). Sample Bidding Function: ``` function biddingFunction(inputs) { ... return { \"buyerCreativeId\": \"ad_creative_id_1\", \"bidPriceCpm\": 0.3, \"productIds\": [\"product_id_1\", \"product_id_2\", \"product_id_3\"] \"debugString\": \"Bidding function executed successfully!\" } } ```" + ], + "type": "string" + } + }, + "type": "object" + }, + "ListBiddingFunctionsResponse": { + "description": "A response containing a list of a bidder's bidding functions.", + "id": "ListBiddingFunctionsResponse", + "properties": { + "biddingFunctions": { + "description": "A list of a bidder's bidding functions.", + "items": { + "$ref": "BiddingFunction" + }, + "type": "array" + }, + "nextPageToken": { + "description": "A token which can be passed to a subsequent call to the `ListBiddingFunctions` method to retrieve the next page of results in ListBiddingFunctionsRequest.pageToken.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Real-time Bidding API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recaptchaenterprise.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recaptchaenterprise.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..ef28a477d856afcaf74eccd943600de653ef56c0 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recaptchaenterprise.v1.json @@ -0,0 +1,2276 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://recaptchaenterprise.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Recaptcha Enterprise", +"description": "Help protect your website from fraudulent activity, spam, and abuse without creating friction.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/recaptcha-enterprise/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "recaptchaenterprise:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://recaptchaenterprise.mtls.googleapis.com/", +"name": "recaptchaenterprise", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"assessments": { +"methods": { +"annotate": { +"description": "Annotates a previously created Assessment to provide additional information on whether the event turned out to be authentic or fraudulent.", +"flatPath": "v1/projects/{projectsId}/assessments/{assessmentsId}:annotate", +"httpMethod": "POST", +"id": "recaptchaenterprise.projects.assessments.annotate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Assessment, in the format `projects/{project}/assessments/{assessment}`.", +"location": "path", +"pattern": "^projects/[^/]+/assessments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:annotate", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates an Assessment of the likelihood an event is legitimate.", +"flatPath": "v1/projects/{projectsId}/assessments", +"httpMethod": "POST", +"id": "recaptchaenterprise.projects.assessments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project in which the assessment will be created, in the format `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/assessments", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Assessment" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Assessment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"firewallpolicies": { +"methods": { +"create": { +"description": "Creates a new FirewallPolicy, specifying conditions at which reCAPTCHA Enterprise actions can be executed. A project may have a maximum of 1000 policies.", +"flatPath": "v1/projects/{projectsId}/firewallpolicies", +"httpMethod": "POST", +"id": "recaptchaenterprise.projects.firewallpolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project this policy will apply to, in the format `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/firewallpolicies", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified firewall policy.", +"flatPath": "v1/projects/{projectsId}/firewallpolicies/{firewallpoliciesId}", +"httpMethod": "DELETE", +"id": "recaptchaenterprise.projects.firewallpolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the policy to be deleted, in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.", +"location": "path", +"pattern": "^projects/[^/]+/firewallpolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the specified firewall policy.", +"flatPath": "v1/projects/{projectsId}/firewallpolicies/{firewallpoliciesId}", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.firewallpolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the requested policy, in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.", +"location": "path", +"pattern": "^projects/[^/]+/firewallpolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns the list of all firewall policies that belong to a project.", +"flatPath": "v1/projects/{projectsId}/firewallpolicies", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.firewallpolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of policies to return. Default is 10. Max limit is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous. ListFirewallPoliciesRequest, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project to list the policies for, in the format `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/firewallpolicies", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the specified firewall policy.", +"flatPath": "v1/projects/{projectsId}/firewallpolicies/{firewallpoliciesId}", +"httpMethod": "PATCH", +"id": "recaptchaenterprise.projects.firewallpolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Identifier. The resource name for the FirewallPolicy in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.", +"location": "path", +"pattern": "^projects/[^/]+/firewallpolicies/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. The mask to control which fields of the policy get updated. If the mask is not present, all fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reorder": { +"description": "Reorders all firewall policies.", +"flatPath": "v1/projects/{projectsId}/firewallpolicies:reorder", +"httpMethod": "POST", +"id": "recaptchaenterprise.projects.firewallpolicies.reorder", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project to list the policies for, in the format `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/firewallpolicies:reorder", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"keys": { +"methods": { +"create": { +"description": "Creates a new reCAPTCHA Enterprise key.", +"flatPath": "v1/projects/{projectsId}/keys", +"httpMethod": "POST", +"id": "recaptchaenterprise.projects.keys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project in which the key will be created, in the format `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/keys", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Key" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Key" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified key.", +"flatPath": "v1/projects/{projectsId}/keys/{keysId}", +"httpMethod": "DELETE", +"id": "recaptchaenterprise.projects.keys.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the key to be deleted, in the format `projects/{project}/keys/{key}`.", +"location": "path", +"pattern": "^projects/[^/]+/keys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the specified key.", +"flatPath": "v1/projects/{projectsId}/keys/{keysId}", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.keys.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the requested key, in the format `projects/{project}/keys/{key}`.", +"location": "path", +"pattern": "^projects/[^/]+/keys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Key" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getMetrics": { +"description": "Get some aggregated metrics for a Key. This data can be used to build dashboards.", +"flatPath": "v1/projects/{projectsId}/keys/{keysId}/metrics", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.keys.getMetrics", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the requested metrics, in the format `projects/{project}/keys/{key}/metrics`.", +"location": "path", +"pattern": "^projects/[^/]+/keys/[^/]+/metrics$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Metrics" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns the list of all keys that belong to a project.", +"flatPath": "v1/projects/{projectsId}/keys", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.keys.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of keys to return. Default is 10. Max limit is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project that contains the keys that will be listed, in the format `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/keys", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ListKeysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"migrate": { +"description": "Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.", +"flatPath": "v1/projects/{projectsId}/keys/{keysId}:migrate", +"httpMethod": "POST", +"id": "recaptchaenterprise.projects.keys.migrate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the key to be migrated, in the format `projects/{project}/keys/{key}`.", +"location": "path", +"pattern": "^projects/[^/]+/keys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:migrate", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Key" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the specified key.", +"flatPath": "v1/projects/{projectsId}/keys/{keysId}", +"httpMethod": "PATCH", +"id": "recaptchaenterprise.projects.keys.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.", +"location": "path", +"pattern": "^projects/[^/]+/keys/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. The mask to control which fields of the key get updated. If the mask is not present, all fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Key" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Key" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"retrieveLegacySecretKey": { +"description": "Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.", +"flatPath": "v1/projects/{projectsId}/keys/{keysId}:retrieveLegacySecretKey", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.keys.retrieveLegacySecretKey", +"parameterOrder": [ +"key" +], +"parameters": { +"key": { +"description": "Required. The public key name linked to the requested secret key in the format `projects/{project}/keys/{key}`.", +"location": "path", +"pattern": "^projects/[^/]+/keys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+key}:retrieveLegacySecretKey", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"relatedaccountgroupmemberships": { +"methods": { +"search": { +"description": "Search group memberships related to a given account.", +"flatPath": "v1/projects/{projectsId}/relatedaccountgroupmemberships:search", +"httpMethod": "POST", +"id": "recaptchaenterprise.projects.relatedaccountgroupmemberships.search", +"parameterOrder": [ +"project" +], +"parameters": { +"project": { +"description": "Required. The name of the project to search related account group memberships from. Specify the project name in the following format: `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+project}/relatedaccountgroupmemberships:search", +"request": { +"$ref": "GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest" +}, +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"relatedaccountgroups": { +"methods": { +"list": { +"description": "List groups of related accounts.", +"flatPath": "v1/projects/{projectsId}/relatedaccountgroups", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.relatedaccountgroups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListRelatedAccountGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListRelatedAccountGroups` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project to list related account groups from, in the format `projects/{project}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/relatedaccountgroups", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"memberships": { +"methods": { +"list": { +"description": "Get memberships in a group of related accounts.", +"flatPath": "v1/projects/{projectsId}/relatedaccountgroups/{relatedaccountgroupsId}/memberships", +"httpMethod": "GET", +"id": "recaptchaenterprise.projects.relatedaccountgroups.memberships.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of accounts to return. The service might return fewer than this value. If unspecified, at most 50 accounts are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListRelatedAccountGroupMemberships` call. When paginating, all other parameters provided to `ListRelatedAccountGroupMemberships` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name for the related account group in the format `projects/{project}/relatedaccountgroups/{relatedaccountgroup}`.", +"location": "path", +"pattern": "^projects/[^/]+/relatedaccountgroups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/memberships", +"response": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://recaptchaenterprise.googleapis.com/", +"schemas": { +"GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment": { +"description": "Account defender risk assessment.", +"id": "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment", +"properties": { +"labels": { +"description": "Output only. Labels for this request.", +"items": { +"enum": [ +"ACCOUNT_DEFENDER_LABEL_UNSPECIFIED", +"PROFILE_MATCH", +"SUSPICIOUS_LOGIN_ACTIVITY", +"SUSPICIOUS_ACCOUNT_CREATION", +"RELATED_ACCOUNTS_NUMBER_HIGH" +], +"enumDescriptions": [ +"Default unspecified type.", +"The request matches a known good profile for the user.", +"The request is potentially a suspicious login event and must be further verified either through multi-factor authentication or another system.", +"The request matched a profile that previously had suspicious account creation behavior. This can mean that this is a fake account.", +"The account in the request has a high number of related accounts. It does not necessarily imply that the account is bad but can require further investigation." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo": { +"description": "Information about account verification, used for identity verification.", +"id": "GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo", +"properties": { +"endpoints": { +"description": "Optional. Endpoints that can be used for identity verification.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo" +}, +"type": "array" +}, +"languageCode": { +"description": "Optional. Language code preference for the verification message, set as a IETF BCP 47 language code.", +"type": "string" +}, +"latestVerificationResult": { +"description": "Output only. Result of the latest account verification challenge.", +"enum": [ +"RESULT_UNSPECIFIED", +"SUCCESS_USER_VERIFIED", +"ERROR_USER_NOT_VERIFIED", +"ERROR_SITE_ONBOARDING_INCOMPLETE", +"ERROR_RECIPIENT_NOT_ALLOWED", +"ERROR_RECIPIENT_ABUSE_LIMIT_EXHAUSTED", +"ERROR_CRITICAL_INTERNAL", +"ERROR_CUSTOMER_QUOTA_EXHAUSTED", +"ERROR_VERIFICATION_BYPASSED", +"ERROR_VERDICT_MISMATCH" +], +"enumDescriptions": [ +"No information about the latest account verification.", +"The user was successfully verified. This means the account verification challenge was successfully completed.", +"The user failed the verification challenge.", +"The site is not properly onboarded to use the account verification feature.", +"The recipient is not allowed for account verification. This can occur during integration but should not occur in production.", +"The recipient has already been sent too many verification codes in a short amount of time.", +"The verification flow could not be completed due to a critical internal error.", +"The client has exceeded their two factor request quota for this period of time.", +"The request cannot be processed at the time because of an incident. This bypass can be restricted to a problematic destination email domain, a customer, or could affect the entire service.", +"The request parameters do not match with the token provided and cannot be processed." +], +"readOnly": true, +"type": "string" +}, +"username": { +"deprecated": true, +"description": "Username of the account that is being verified. Deprecated. Customers should now provide the `account_id` field in `event.user_info`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1AndroidKeySettings": { +"description": "Settings specific to keys that can be used by Android apps.", +"id": "GoogleCloudRecaptchaenterpriseV1AndroidKeySettings", +"properties": { +"allowAllPackageNames": { +"description": "Optional. If set to true, allowed_package_names are not enforced.", +"type": "boolean" +}, +"allowedPackageNames": { +"description": "Optional. Android package names of apps allowed to use the key. Example: 'com.companyname.appname'", +"items": { +"type": "string" +}, +"type": "array" +}, +"supportNonGoogleAppStoreDistribution": { +"description": "Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest": { +"description": "The request message to annotate an Assessment.", +"id": "GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentRequest", +"properties": { +"accountId": { +"description": "Optional. A stable account identifier to apply to the assessment. This is an alternative to setting `account_id` in `CreateAssessment`, for example when a stable account identifier is not yet known in the initial request.", +"type": "string" +}, +"annotation": { +"description": "Optional. The annotation that will be assigned to the Event. This field can be left empty to provide reasons that apply to an event without concluding whether the event is legitimate or fraudulent.", +"enum": [ +"ANNOTATION_UNSPECIFIED", +"LEGITIMATE", +"FRAUDULENT", +"PASSWORD_CORRECT", +"PASSWORD_INCORRECT" +], +"enumDeprecated": [ +false, +false, +false, +true, +true +], +"enumDescriptions": [ +"Default unspecified type.", +"Provides information that the event turned out to be legitimate.", +"Provides information that the event turned out to be fraudulent.", +"Provides information that the event was related to a login event in which the user typed the correct password. Deprecated, prefer indicating CORRECT_PASSWORD through the reasons field instead.", +"Provides information that the event was related to a login event in which the user typed the incorrect password. Deprecated, prefer indicating INCORRECT_PASSWORD through the reasons field instead." +], +"type": "string" +}, +"hashedAccountId": { +"description": "Optional. A stable hashed account identifier to apply to the assessment. This is an alternative to setting `hashed_account_id` in `CreateAssessment`, for example when a stable account identifier is not yet known in the initial request.", +"format": "byte", +"type": "string" +}, +"reasons": { +"description": "Optional. Reasons for the annotation that are assigned to the event.", +"items": { +"enum": [ +"REASON_UNSPECIFIED", +"CHARGEBACK", +"CHARGEBACK_FRAUD", +"CHARGEBACK_DISPUTE", +"REFUND", +"REFUND_FRAUD", +"TRANSACTION_ACCEPTED", +"TRANSACTION_DECLINED", +"PAYMENT_HEURISTICS", +"INITIATED_TWO_FACTOR", +"PASSED_TWO_FACTOR", +"FAILED_TWO_FACTOR", +"CORRECT_PASSWORD", +"INCORRECT_PASSWORD", +"SOCIAL_SPAM" +], +"enumDescriptions": [ +"Default unspecified reason.", +"Indicates that the transaction had a chargeback issued with no other details. When possible, specify the type by using CHARGEBACK_FRAUD or CHARGEBACK_DISPUTE instead.", +"Indicates that the transaction had a chargeback issued related to an alleged unauthorized transaction from the cardholder's perspective (for example, the card number was stolen).", +"Indicates that the transaction had a chargeback issued related to the cardholder having provided their card details but allegedly not being satisfied with the purchase (for example, misrepresentation, attempted cancellation).", +"Indicates that the completed payment transaction was refunded by the seller.", +"Indicates that the completed payment transaction was determined to be fraudulent by the seller, and was cancelled and refunded as a result.", +"Indicates that the payment transaction was accepted, and the user was charged.", +"Indicates that the payment transaction was declined, for example due to invalid card details.", +"Indicates the transaction associated with the assessment is suspected of being fraudulent based on the payment method, billing details, shipping address or other transaction information.", +"Indicates that the user was served a 2FA challenge. An old assessment with `ENUM_VALUES.INITIATED_TWO_FACTOR` reason that has not been overwritten with `PASSED_TWO_FACTOR` is treated as an abandoned 2FA flow. This is equivalent to `FAILED_TWO_FACTOR`.", +"Indicates that the user passed a 2FA challenge.", +"Indicates that the user failed a 2FA challenge.", +"Indicates the user provided the correct password.", +"Indicates the user provided an incorrect password.", +"Indicates that the user sent unwanted and abusive messages to other users of the platform, such as spam, scams, phishing, or social engineering." +], +"type": "string" +}, +"type": "array" +}, +"transactionEvent": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionEvent", +"description": "Optional. If the assessment is part of a payment transaction, provide details on payment lifecycle events that occur in the transaction." +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse": { +"description": "Empty response for AnnotateAssessment.", +"id": "GoogleCloudRecaptchaenterpriseV1AnnotateAssessmentResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1AppleDeveloperId": { +"description": "Contains fields that are required to perform Apple-specific integrity checks.", +"id": "GoogleCloudRecaptchaenterpriseV1AppleDeveloperId", +"properties": { +"keyId": { +"description": "Required. The Apple developer key ID (10-character string).", +"type": "string" +}, +"privateKey": { +"description": "Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.", +"type": "string" +}, +"teamId": { +"description": "Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1Assessment": { +"description": "A reCAPTCHA Enterprise assessment resource.", +"id": "GoogleCloudRecaptchaenterpriseV1Assessment", +"properties": { +"accountDefenderAssessment": { +"$ref": "GoogleCloudRecaptchaenterpriseV1AccountDefenderAssessment", +"description": "Output only. Assessment returned by account defender when an account identifier is provided.", +"readOnly": true +}, +"accountVerification": { +"$ref": "GoogleCloudRecaptchaenterpriseV1AccountVerificationInfo", +"description": "Optional. Account verification information for identity verification. The assessment event must include a token and site key to use this feature." +}, +"event": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Event", +"description": "Optional. The event being assessed." +}, +"firewallPolicyAssessment": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment", +"description": "Output only. Assessment returned when firewall policies belonging to the project are evaluated using the field firewall_policy_evaluation.", +"readOnly": true +}, +"fraudPreventionAssessment": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment", +"description": "Output only. Assessment returned by Fraud Prevention when TransactionData is provided.", +"readOnly": true +}, +"fraudSignals": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FraudSignals", +"description": "Output only. Fraud Signals specific to the users involved in a payment transaction.", +"readOnly": true +}, +"name": { +"description": "Output only. Identifier. The resource name for the Assessment in the format `projects/{project}/assessments/{assessment}`.", +"readOnly": true, +"type": "string" +}, +"privatePasswordLeakVerification": { +"$ref": "GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification", +"description": "Optional. The private password leak verification field contains the parameters that are used to to check for leaks privately without sharing user credentials." +}, +"riskAnalysis": { +"$ref": "GoogleCloudRecaptchaenterpriseV1RiskAnalysis", +"description": "Output only. The risk analysis result for the event being assessed.", +"readOnly": true +}, +"tokenProperties": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TokenProperties", +"description": "Output only. Properties of the provided event token.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ChallengeMetrics": { +"description": "Metrics related to challenges.", +"id": "GoogleCloudRecaptchaenterpriseV1ChallengeMetrics", +"properties": { +"failedCount": { +"description": "Count of submitted challenge solutions that were incorrect or otherwise deemed suspicious such that a subsequent challenge was triggered.", +"format": "int64", +"type": "string" +}, +"nocaptchaCount": { +"description": "Count of nocaptchas (successful verification without a challenge) issued.", +"format": "int64", +"type": "string" +}, +"pageloadCount": { +"description": "Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent to a count of pageloads for pages that include reCAPTCHA.", +"format": "int64", +"type": "string" +}, +"passedCount": { +"description": "Count of nocaptchas (successful verification without a challenge) plus submitted challenge solutions that were correct and resulted in verification.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo": { +"description": "Information about a verification endpoint that can be used for 2FA.", +"id": "GoogleCloudRecaptchaenterpriseV1EndpointVerificationInfo", +"properties": { +"emailAddress": { +"description": "Email address for which to trigger a verification request.", +"type": "string" +}, +"lastVerificationTime": { +"description": "Output only. Timestamp of the last successful verification for the endpoint, if any.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"phoneNumber": { +"description": "Phone number for which to trigger a verification request. Should be given in E.164 format.", +"type": "string" +}, +"requestToken": { +"description": "Output only. Token to provide to the client to trigger endpoint verification. It must be used within 15 minutes.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1Event": { +"description": "The event being assessed.", +"id": "GoogleCloudRecaptchaenterpriseV1Event", +"properties": { +"expectedAction": { +"description": "Optional. The expected action for this type of event. This should be the same action provided at token generation time on client-side platforms already integrated with recaptcha enterprise.", +"type": "string" +}, +"express": { +"description": "Optional. Flag for a reCAPTCHA express request for an assessment without a token. If enabled, `site_key` must reference a SCORE key with WAF feature set to EXPRESS.", +"type": "boolean" +}, +"firewallPolicyEvaluation": { +"description": "Optional. Flag for enabling firewall policy config assessment. If this flag is enabled, the firewall policy will be evaluated and a suggested firewall action will be returned in the response.", +"type": "boolean" +}, +"fraudPrevention": { +"description": "Optional. The Fraud Prevention setting for this assessment.", +"enum": [ +"FRAUD_PREVENTION_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default, unspecified setting. If opted in for automatic detection, `fraud_prevention_assessment` is returned based on the request. Otherwise, `fraud_prevention_assessment` is returned if `transaction_data` is present in the `Event` and Fraud Prevention is enabled in the Google Cloud console.", +"Enable Fraud Prevention for this assessment, if Fraud Prevention is enabled in the Google Cloud console.", +"Disable Fraud Prevention for this assessment, regardless of opt-in status or Google Cloud console settings." +], +"type": "string" +}, +"hashedAccountId": { +"deprecated": true, +"description": "Optional. Deprecated: use `user_info.account_id` instead. Unique stable hashed user identifier for the request. The identifier must be hashed using hmac-sha256 with stable secret.", +"format": "byte", +"type": "string" +}, +"headers": { +"description": "Optional. HTTP header information about the request.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ja3": { +"description": "Optional. JA3 fingerprint for SSL clients.", +"type": "string" +}, +"requestedUri": { +"description": "Optional. The URI resource the user requested that triggered an assessment.", +"type": "string" +}, +"siteKey": { +"description": "Optional. The site key that was used to invoke reCAPTCHA Enterprise on your site and generate the token.", +"type": "string" +}, +"token": { +"description": "Optional. The user response token provided by the reCAPTCHA Enterprise client-side integration on your site.", +"type": "string" +}, +"transactionData": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionData", +"description": "Optional. Data describing a payment transaction to be assessed. Sending this data enables reCAPTCHA Enterprise Fraud Prevention and the FraudPreventionAssessment component in the response." +}, +"userAgent": { +"description": "Optional. The user agent present in the request from the user's device related to this event.", +"type": "string" +}, +"userInfo": { +"$ref": "GoogleCloudRecaptchaenterpriseV1UserInfo", +"description": "Optional. Information about the user that generates this event, when they can be identified. They are often identified through the use of an account for logged-in requests or login/registration requests, or by providing user identifiers for guest actions like checkout." +}, +"userIpAddress": { +"description": "Optional. The IP address in the request from the user's device related to this event.", +"type": "string" +}, +"wafTokenAssessment": { +"description": "Optional. Flag for running WAF token assessment. If enabled, the token must be specified, and have been created by a WAF-enabled key.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallAction": { +"description": "An individual action. Each action represents what to do if a policy matches.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallAction", +"properties": { +"allow": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction", +"description": "The user request did not match any policy and should be allowed access to the requested resource." +}, +"block": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction", +"description": "This action will deny access to a given page. The user will get an HTTP error code." +}, +"includeRecaptchaScript": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction", +"description": "This action will inject reCAPTCHA JavaScript code into the HTML page returned by the site backend." +}, +"redirect": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction", +"description": "This action will redirect the request to a ReCaptcha interstitial to attach a token." +}, +"setHeader": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction", +"description": "This action will set a custom header but allow the request to continue to the customer backend." +}, +"substitute": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction", +"description": "This action will transparently serve a different page to an offending user." +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction": { +"description": "An allow action continues processing a request unimpeded.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallActionAllowAction", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction": { +"description": "A block action serves an HTTP error code a prevents the request from hitting the backend.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallActionBlockAction", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction": { +"description": "An include reCAPTCHA script action involves injecting reCAPTCHA JavaScript code into the HTML returned by the site backend. This reCAPTCHA script is tasked with collecting user signals on the requested web page, issuing tokens as a cookie within the site domain, and enabling their utilization in subsequent page requests.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallActionIncludeRecaptchaScriptAction", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction": { +"description": "A redirect action returns a 307 (temporary redirect) response, pointing the user to a ReCaptcha interstitial page to attach a token.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallActionRedirectAction", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction": { +"description": "A set header action sets a header and forwards the request to the backend. This can be used to trigger custom protection implemented on the backend.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallActionSetHeaderAction", +"properties": { +"key": { +"description": "Optional. The header key to set in the request to the backend server.", +"type": "string" +}, +"value": { +"description": "Optional. The header value to set in the request to the backend server.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction": { +"description": "A substitute action transparently serves a different page than the one requested.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallActionSubstituteAction", +"properties": { +"path": { +"description": "Optional. The address to redirect to. The target is a relative path in the current host. Example: \"/blog/404.html\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallPolicy": { +"description": "A FirewallPolicy represents a single matching pattern and resulting actions to take.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy", +"properties": { +"actions": { +"description": "Optional. The actions that the caller should take regarding user access. There should be at most one terminal action. A terminal action is any action that forces a response, such as `AllowAction`, `BlockAction` or `SubstituteAction`. Zero or more non-terminal actions such as `SetHeader` might be specified. A single policy can contain up to 16 actions.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallAction" +}, +"type": "array" +}, +"condition": { +"description": "Optional. A CEL (Common Expression Language) conditional expression that specifies if this policy applies to an incoming user request. If this condition evaluates to true and the requested path matched the path pattern, the associated actions should be executed by the caller. The condition string is checked for CEL syntax correctness on creation. For more information, see the [CEL spec](https://github.com/google/cel-spec) and its [language definition](https://github.com/google/cel-spec/blob/master/doc/langdef.md). A condition has a max length of 500 characters.", +"type": "string" +}, +"description": { +"description": "Optional. A description of what this policy aims to achieve, for convenience purposes. The description can at most include 256 UTF-8 characters.", +"type": "string" +}, +"name": { +"description": "Identifier. The resource name for the FirewallPolicy in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.", +"type": "string" +}, +"path": { +"description": "Optional. The path for which this policy applies, specified as a glob pattern. For more information on glob, see the [manual page](https://man7.org/linux/man-pages/man7/glob.7.html). A path has a max length of 200 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment": { +"description": "Policy config assessment.", +"id": "GoogleCloudRecaptchaenterpriseV1FirewallPolicyAssessment", +"properties": { +"error": { +"$ref": "GoogleRpcStatus", +"description": "Output only. If the processing of a policy config fails, an error will be populated and the firewall_policy will be left empty.", +"readOnly": true +}, +"firewallPolicy": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy", +"description": "Output only. The policy that matched the request. If more than one policy may match, this is the first match. If no policy matches the incoming request, the policy field will be left empty.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment": { +"description": "Assessment for Fraud Prevention.", +"id": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessment", +"properties": { +"behavioralTrustVerdict": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict", +"description": "Output only. Assessment of this transaction for behavioral trust.", +"readOnly": true +}, +"cardTestingVerdict": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict", +"description": "Output only. Assessment of this transaction for risk of being part of a card testing attack.", +"readOnly": true +}, +"stolenInstrumentVerdict": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict", +"description": "Output only. Assessment of this transaction for risk of a stolen instrument.", +"readOnly": true +}, +"transactionRisk": { +"description": "Output only. Probability of this transaction being fraudulent. Summarizes the combined risk of attack vectors below. Values are from 0.0 (lowest) to 1.0 (highest).", +"format": "float", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict": { +"description": "Information about behavioral trust of the transaction.", +"id": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentBehavioralTrustVerdict", +"properties": { +"trust": { +"description": "Output only. Probability of this transaction attempt being executed in a behaviorally trustworthy way. Values are from 0.0 (lowest) to 1.0 (highest).", +"format": "float", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict": { +"description": "Information about card testing fraud, where an adversary is testing fraudulently obtained cards or brute forcing their details.", +"id": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentCardTestingVerdict", +"properties": { +"risk": { +"description": "Output only. Probability of this transaction attempt being part of a card testing attack. Values are from 0.0 (lowest) to 1.0 (highest).", +"format": "float", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict": { +"description": "Information about stolen instrument fraud, where the user is not the legitimate owner of the instrument being used for the purchase.", +"id": "GoogleCloudRecaptchaenterpriseV1FraudPreventionAssessmentStolenInstrumentVerdict", +"properties": { +"risk": { +"description": "Output only. Probability of this transaction being executed with a stolen instrument. Values are from 0.0 (lowest) to 1.0 (highest).", +"format": "float", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FraudSignals": { +"description": "Fraud signals describing users and cards involved in the transaction.", +"id": "GoogleCloudRecaptchaenterpriseV1FraudSignals", +"properties": { +"cardSignals": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals", +"description": "Output only. Signals describing the payment card or cards used in this transaction.", +"readOnly": true +}, +"userSignals": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals", +"description": "Output only. Signals describing the end user in this transaction.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals": { +"description": "Signals describing the payment card used in this transaction.", +"id": "GoogleCloudRecaptchaenterpriseV1FraudSignalsCardSignals", +"properties": { +"cardLabels": { +"description": "Output only. The labels for the payment card in this transaction.", +"items": { +"enum": [ +"CARD_LABEL_UNSPECIFIED", +"PREPAID", +"VIRTUAL", +"UNEXPECTED_LOCATION" +], +"enumDescriptions": [ +"No label specified.", +"This card has been detected as prepaid.", +"This card has been detected as virtual, such as a card number generated for a single transaction or merchant.", +"This card has been detected as being used in an unexpected geographic location." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals": { +"description": "Signals describing the user involved in this transaction.", +"id": "GoogleCloudRecaptchaenterpriseV1FraudSignalsUserSignals", +"properties": { +"activeDaysLowerBound": { +"description": "Output only. This user (based on email, phone, and other identifiers) has been seen on the internet for at least this number of days.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"syntheticRisk": { +"description": "Output only. Likelihood (from 0.0 to 1.0) this user includes synthetic components in their identity, such as a randomly generated email address, temporary phone number, or fake shipping address.", +"format": "float", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1IOSKeySettings": { +"description": "Settings specific to keys that can be used by iOS apps.", +"id": "GoogleCloudRecaptchaenterpriseV1IOSKeySettings", +"properties": { +"allowAllBundleIds": { +"description": "Optional. If set to true, allowed_bundle_ids are not enforced.", +"type": "boolean" +}, +"allowedBundleIds": { +"description": "Optional. iOS bundle ids of apps allowed to use the key. Example: 'com.companyname.productname.appname'", +"items": { +"type": "string" +}, +"type": "array" +}, +"appleDeveloperId": { +"$ref": "GoogleCloudRecaptchaenterpriseV1AppleDeveloperId", +"description": "Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA Enterprise leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA Enterprise to get a better assessment of the integrity of your app." +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1Key": { +"description": "A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.", +"id": "GoogleCloudRecaptchaenterpriseV1Key", +"properties": { +"androidSettings": { +"$ref": "GoogleCloudRecaptchaenterpriseV1AndroidKeySettings", +"description": "Settings for keys that can be used by Android apps." +}, +"createTime": { +"description": "Output only. The timestamp corresponding to the creation of this key.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. Human-readable display name of this key. Modifiable by user.", +"type": "string" +}, +"iosSettings": { +"$ref": "GoogleCloudRecaptchaenterpriseV1IOSKeySettings", +"description": "Settings for keys that can be used by iOS apps." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha-enterprise/docs/labels).", +"type": "object" +}, +"name": { +"description": "Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.", +"type": "string" +}, +"testingOptions": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TestingOptions", +"description": "Optional. Options for user acceptance testing." +}, +"wafSettings": { +"$ref": "GoogleCloudRecaptchaenterpriseV1WafSettings", +"description": "Optional. Settings for WAF" +}, +"webSettings": { +"$ref": "GoogleCloudRecaptchaenterpriseV1WebKeySettings", +"description": "Settings for keys that can be used by websites." +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse": { +"description": "Response to request to list firewall policies belonging to a project.", +"id": "GoogleCloudRecaptchaenterpriseV1ListFirewallPoliciesResponse", +"properties": { +"firewallPolicies": { +"description": "Policy details.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1FirewallPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results. It is set to empty if no policies remain in results.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ListKeysResponse": { +"description": "Response to request to list keys in a project.", +"id": "GoogleCloudRecaptchaenterpriseV1ListKeysResponse", +"properties": { +"keys": { +"description": "Key details.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1Key" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results. It is set to empty if no keys remain in results.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse": { +"description": "The response to a `ListRelatedAccountGroupMemberships` call.", +"id": "GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupMembershipsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"relatedAccountGroupMemberships": { +"description": "The memberships listed by the query.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse": { +"description": "The response to a `ListRelatedAccountGroups` call.", +"id": "GoogleCloudRecaptchaenterpriseV1ListRelatedAccountGroupsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"relatedAccountGroups": { +"description": "The groups of related accounts listed by the query.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1Metrics": { +"description": "Metrics for a single Key.", +"id": "GoogleCloudRecaptchaenterpriseV1Metrics", +"properties": { +"challengeMetrics": { +"description": "Metrics will be continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have challenge-based data.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ChallengeMetrics" +}, +"type": "array" +}, +"name": { +"description": "Output only. Identifier. The name of the metrics, in the format `projects/{project}/keys/{key}/metrics`.", +"readOnly": true, +"type": "string" +}, +"scoreMetrics": { +"description": "Metrics will be continuous and in order by dates, and in the granularity of day. All Key types should have score-based data.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ScoreMetrics" +}, +"type": "array" +}, +"startTime": { +"description": "Inclusive start time aligned to a day (UTC).", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest": { +"description": "The migrate key request message.", +"id": "GoogleCloudRecaptchaenterpriseV1MigrateKeyRequest", +"properties": { +"skipBillingCheck": { +"description": "Optional. If true, skips the billing check. A reCAPTCHA Enterprise key or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://cloud.google.com/recaptcha-enterprise/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha-enterprise/docs/billing-information.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification": { +"description": "Private password leak verification info.", +"id": "GoogleCloudRecaptchaenterpriseV1PrivatePasswordLeakVerification", +"properties": { +"encryptedLeakMatchPrefixes": { +"description": "Output only. List of prefixes of the encrypted potential password leaks that matched the given parameters. They must be compared with the client-side decryption prefix of `reencrypted_user_credentials_hash`", +"items": { +"format": "byte", +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"encryptedUserCredentialsHash": { +"description": "Optional. Encrypted Scrypt hash of the canonicalized username+password. It is re-encrypted by the server and returned through `reencrypted_user_credentials_hash`.", +"format": "byte", +"type": "string" +}, +"lookupHashPrefix": { +"description": "Required. Exactly 26-bit prefix of the SHA-256 hash of the canonicalized username. It is used to look up password leaks associated with that hash prefix.", +"format": "byte", +"type": "string" +}, +"reencryptedUserCredentialsHash": { +"description": "Output only. Corresponds to the re-encryption of the `encrypted_user_credentials_hash` field. It is used to match potential password leaks within `encrypted_leak_match_prefixes`.", +"format": "byte", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup": { +"description": "A group of related accounts.", +"id": "GoogleCloudRecaptchaenterpriseV1RelatedAccountGroup", +"properties": { +"name": { +"description": "Required. Identifier. The resource name for the related account group in the format `projects/{project}/relatedaccountgroups/{related_account_group}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership": { +"description": "A membership in a group of related accounts.", +"id": "GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership", +"properties": { +"accountId": { +"description": "The unique stable account identifier of the member. The identifier corresponds to an `account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call.", +"type": "string" +}, +"hashedAccountId": { +"deprecated": true, +"description": "Deprecated: use `account_id` instead. The unique stable hashed account identifier of the member. The identifier corresponds to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call.", +"format": "byte", +"type": "string" +}, +"name": { +"description": "Required. Identifier. The resource name for this membership in the format `projects/{project}/relatedaccountgroups/{relatedaccountgroup}/memberships/{membership}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest": { +"description": "The reorder firewall policies request message.", +"id": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesRequest", +"properties": { +"names": { +"description": "Required. A list containing all policy names, in the new order. Each name is in the format `projects/{project}/firewallpolicies/{firewallpolicy}`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse": { +"description": "The reorder firewall policies response message.", +"id": "GoogleCloudRecaptchaenterpriseV1ReorderFirewallPoliciesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse": { +"description": "Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party integration with legacy reCAPTCHA.", +"id": "GoogleCloudRecaptchaenterpriseV1RetrieveLegacySecretKeyResponse", +"properties": { +"legacySecretKey": { +"description": "The secret key (also known as shared secret) authorizes communication between your application backend and the reCAPTCHA Enterprise server to create an assessment. The secret key needs to be kept safe for security purposes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1RiskAnalysis": { +"description": "Risk analysis result for an event.", +"id": "GoogleCloudRecaptchaenterpriseV1RiskAnalysis", +"properties": { +"extendedVerdictReasons": { +"description": "Output only. Extended verdict reasons to be used for experimentation only. The set of possible reasons is subject to change.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"reasons": { +"description": "Output only. Reasons contributing to the risk analysis verdict.", +"items": { +"enum": [ +"CLASSIFICATION_REASON_UNSPECIFIED", +"AUTOMATION", +"UNEXPECTED_ENVIRONMENT", +"TOO_MUCH_TRAFFIC", +"UNEXPECTED_USAGE_PATTERNS", +"LOW_CONFIDENCE_SCORE", +"SUSPECTED_CARDING", +"SUSPECTED_CHARGEBACK" +], +"enumDescriptions": [ +"Default unspecified type.", +"Interactions matched the behavior of an automated agent.", +"The event originated from an illegitimate environment.", +"Traffic volume from the event source is higher than normal.", +"Interactions with the site were significantly different than expected patterns.", +"Too little traffic has been received from this site thus far to generate quality risk analysis.", +"The request matches behavioral characteristics of a carding attack.", +"The request matches behavioral characteristics of chargebacks for fraud." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"score": { +"description": "Output only. Legitimate event score from 0.0 to 1.0. (1.0 means very likely legitimate traffic while 0.0 means very likely non-legitimate traffic).", +"format": "float", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ScoreDistribution": { +"description": "Score distribution.", +"id": "GoogleCloudRecaptchaenterpriseV1ScoreDistribution", +"properties": { +"scoreBuckets": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Map key is score value multiplied by 100. The scores are discrete values between [0, 1]. The maximum number of buckets is on order of a few dozen, but typically much lower (ie. 10).", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1ScoreMetrics": { +"description": "Metrics related to scoring.", +"id": "GoogleCloudRecaptchaenterpriseV1ScoreMetrics", +"properties": { +"actionMetrics": { +"additionalProperties": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ScoreDistribution" +}, +"description": "Action-based metrics. The map key is the action name which specified by the site owners at time of the \"execute\" client-side call.", +"type": "object" +}, +"overallMetrics": { +"$ref": "GoogleCloudRecaptchaenterpriseV1ScoreDistribution", +"description": "Aggregated score metrics for all traffic." +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest": { +"description": "The request message to search related account group memberships.", +"id": "GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsRequest", +"properties": { +"accountId": { +"description": "Optional. The unique stable account identifier used to search connections. The identifier should correspond to an `account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id or account_id must be set, but not both.", +"type": "string" +}, +"hashedAccountId": { +"deprecated": true, +"description": "Optional. Deprecated: use `account_id` instead. The unique stable hashed account identifier used to search connections. The identifier should correspond to a `hashed_account_id` provided in a previous `CreateAssessment` or `AnnotateAssessment` call. Either hashed_account_id or account_id must be set, but not both.", +"format": "byte", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of groups to return. The service might return fewer than this value. If unspecified, at most 50 groups are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `SearchRelatedAccountGroupMemberships` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `SearchRelatedAccountGroupMemberships` must match the call that provided the page token.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse": { +"description": "The response to a `SearchRelatedAccountGroupMemberships` call.", +"id": "GoogleCloudRecaptchaenterpriseV1SearchRelatedAccountGroupMembershipsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"relatedAccountGroupMemberships": { +"description": "The queried memberships.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1RelatedAccountGroupMembership" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TestingOptions": { +"description": "Options for user acceptance testing.", +"id": "GoogleCloudRecaptchaenterpriseV1TestingOptions", +"properties": { +"testingChallenge": { +"description": "Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.", +"enum": [ +"TESTING_CHALLENGE_UNSPECIFIED", +"NOCAPTCHA", +"UNSOLVABLE_CHALLENGE" +], +"enumDescriptions": [ +"Perform the normal risk analysis and return either nocaptcha or a challenge depending on risk and trust factors.", +"Challenge requests for this key always return a nocaptcha, which does not require a solution.", +"Challenge requests for this key always return an unsolvable challenge." +], +"type": "string" +}, +"testingScore": { +"description": "Optional. All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TokenProperties": { +"description": "Properties of the provided event token.", +"id": "GoogleCloudRecaptchaenterpriseV1TokenProperties", +"properties": { +"action": { +"description": "Output only. Action name provided at token generation.", +"readOnly": true, +"type": "string" +}, +"androidPackageName": { +"description": "Output only. The name of the Android package with which the token was generated (Android keys only).", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp corresponding to the generation of the token.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"hostname": { +"description": "Output only. The hostname of the page on which the token was generated (Web keys only).", +"readOnly": true, +"type": "string" +}, +"invalidReason": { +"description": "Output only. Reason associated with the response when valid = false.", +"enum": [ +"INVALID_REASON_UNSPECIFIED", +"UNKNOWN_INVALID_REASON", +"MALFORMED", +"EXPIRED", +"DUPE", +"MISSING", +"BROWSER_ERROR" +], +"enumDescriptions": [ +"Default unspecified type.", +"If the failure reason was not accounted for.", +"The provided user verification token was malformed.", +"The user verification token had expired.", +"The user verification had already been seen.", +"The user verification token was not present.", +"A retriable error (such as network failure) occurred on the browser. Could easily be simulated by an attacker." +], +"readOnly": true, +"type": "string" +}, +"iosBundleId": { +"description": "Output only. The ID of the iOS bundle with which the token was generated (iOS keys only).", +"readOnly": true, +"type": "string" +}, +"valid": { +"description": "Output only. Whether the provided user response token is valid. When valid = false, the reason could be specified in invalid_reason or it could also be due to a user failing to solve a challenge or a sitekey mismatch (i.e the sitekey used to generate the token was different than the one specified in the assessment).", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TransactionData": { +"description": "Transaction data associated with a payment protected by reCAPTCHA Enterprise.", +"id": "GoogleCloudRecaptchaenterpriseV1TransactionData", +"properties": { +"billingAddress": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionDataAddress", +"description": "Optional. Address associated with the payment method when applicable." +}, +"cardBin": { +"description": "Optional. The Bank Identification Number - generally the first 6 or 8 digits of the card.", +"type": "string" +}, +"cardLastFour": { +"description": "Optional. The last four digits of the card.", +"type": "string" +}, +"currencyCode": { +"description": "Optional. The currency code in ISO-4217 format.", +"type": "string" +}, +"gatewayInfo": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo", +"description": "Optional. Information about the payment gateway's response to the transaction." +}, +"items": { +"description": "Optional. Items purchased in this transaction.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionDataItem" +}, +"type": "array" +}, +"merchants": { +"description": "Optional. Information about the user or users fulfilling the transaction.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionDataUser" +}, +"type": "array" +}, +"paymentMethod": { +"description": "Optional. The payment method for the transaction. The allowed values are: * credit-card * debit-card * gift-card * processor-{name} (If a third-party is used, for example, processor-paypal) * custom-{name} (If an alternative method is used, for example, custom-crypto)", +"type": "string" +}, +"shippingAddress": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionDataAddress", +"description": "Optional. Destination address if this transaction involves shipping a physical item." +}, +"shippingValue": { +"description": "Optional. The value of shipping in the specified currency. 0 for free or no shipping.", +"format": "double", +"type": "number" +}, +"transactionId": { +"description": "Unique identifier for the transaction. This custom identifier can be used to reference this transaction in the future, for example, labeling a refund or chargeback event. Two attempts at the same transaction should use the same transaction id.", +"type": "string" +}, +"user": { +"$ref": "GoogleCloudRecaptchaenterpriseV1TransactionDataUser", +"description": "Optional. Information about the user paying/initiating the transaction." +}, +"value": { +"description": "Optional. The decimal value of the transaction in the specified currency.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TransactionDataAddress": { +"description": "Structured address format for billing and shipping addresses.", +"id": "GoogleCloudRecaptchaenterpriseV1TransactionDataAddress", +"properties": { +"address": { +"description": "Optional. The first lines of the address. The first line generally contains the street name and number, and further lines may include information such as an apartment number.", +"items": { +"type": "string" +}, +"type": "array" +}, +"administrativeArea": { +"description": "Optional. The state, province, or otherwise administrative area of the address.", +"type": "string" +}, +"locality": { +"description": "Optional. The town/city of the address.", +"type": "string" +}, +"postalCode": { +"description": "Optional. The postal or ZIP code of the address.", +"type": "string" +}, +"recipient": { +"description": "Optional. The recipient name, potentially including information such as \"care of\".", +"type": "string" +}, +"regionCode": { +"description": "Optional. The CLDR country/region of the address.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo": { +"description": "Details about the transaction from the gateway.", +"id": "GoogleCloudRecaptchaenterpriseV1TransactionDataGatewayInfo", +"properties": { +"avsResponseCode": { +"description": "Optional. AVS response code from the gateway (available only when reCAPTCHA Enterprise is called after authorization).", +"type": "string" +}, +"cvvResponseCode": { +"description": "Optional. CVV response code from the gateway (available only when reCAPTCHA Enterprise is called after authorization).", +"type": "string" +}, +"gatewayResponseCode": { +"description": "Optional. Gateway response code describing the state of the transaction.", +"type": "string" +}, +"name": { +"description": "Optional. Name of the gateway service (for example, stripe, square, paypal).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TransactionDataItem": { +"description": "Line items being purchased in this transaction.", +"id": "GoogleCloudRecaptchaenterpriseV1TransactionDataItem", +"properties": { +"merchantAccountId": { +"description": "Optional. When a merchant is specified, its corresponding account_id. Necessary to populate marketplace-style transactions.", +"type": "string" +}, +"name": { +"description": "Optional. The full name of the item.", +"type": "string" +}, +"quantity": { +"description": "Optional. The quantity of this item that is being purchased.", +"format": "int64", +"type": "string" +}, +"value": { +"description": "Optional. The value per item that the user is paying, in the transaction currency, after discounts.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TransactionDataUser": { +"description": "Details about a user's account involved in the transaction.", +"id": "GoogleCloudRecaptchaenterpriseV1TransactionDataUser", +"properties": { +"accountId": { +"description": "Optional. Unique account identifier for this user. If using account defender, this should match the hashed_account_id field. Otherwise, a unique and persistent identifier for this account.", +"type": "string" +}, +"creationMs": { +"description": "Optional. The epoch milliseconds of the user's account creation.", +"format": "int64", +"type": "string" +}, +"email": { +"description": "Optional. The email address of the user.", +"type": "string" +}, +"emailVerified": { +"description": "Optional. Whether the email has been verified to be accessible by the user (OTP or similar).", +"type": "boolean" +}, +"phoneNumber": { +"description": "Optional. The phone number of the user, with country code.", +"type": "string" +}, +"phoneVerified": { +"description": "Optional. Whether the phone number has been verified to be accessible by the user (OTP or similar).", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1TransactionEvent": { +"description": "Describes an event in the lifecycle of a payment transaction.", +"id": "GoogleCloudRecaptchaenterpriseV1TransactionEvent", +"properties": { +"eventTime": { +"description": "Optional. Timestamp when this transaction event occurred; otherwise assumed to be the time of the API call.", +"format": "google-datetime", +"type": "string" +}, +"eventType": { +"description": "Optional. The type of this transaction event.", +"enum": [ +"TRANSACTION_EVENT_TYPE_UNSPECIFIED", +"MERCHANT_APPROVE", +"MERCHANT_DENY", +"MANUAL_REVIEW", +"AUTHORIZATION", +"AUTHORIZATION_DECLINE", +"PAYMENT_CAPTURE", +"PAYMENT_CAPTURE_DECLINE", +"CANCEL", +"CHARGEBACK_INQUIRY", +"CHARGEBACK_ALERT", +"FRAUD_NOTIFICATION", +"CHARGEBACK", +"CHARGEBACK_REPRESENTMENT", +"CHARGEBACK_REVERSE", +"REFUND_REQUEST", +"REFUND_DECLINE", +"REFUND", +"REFUND_REVERSE" +], +"enumDescriptions": [ +"Default, unspecified event type.", +"Indicates that the transaction is approved by the merchant. The accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'.", +"Indicates that the transaction is denied and concluded due to risks detected by the merchant. The accompanying reasons can include terms such as 'INHOUSE', 'ACCERTIFY', 'CYBERSOURCE', or 'MANUAL_REVIEW'.", +"Indicates that the transaction is being evaluated by a human, due to suspicion or risk.", +"Indicates that the authorization attempt with the card issuer succeeded.", +"Indicates that the authorization attempt with the card issuer failed. The accompanying reasons can include Visa's '54' indicating that the card is expired, or '82' indicating that the CVV is incorrect.", +"Indicates that the transaction is completed because the funds were settled.", +"Indicates that the transaction could not be completed because the funds were not settled.", +"Indicates that the transaction has been canceled. Specify the reason for the cancellation. For example, 'INSUFFICIENT_INVENTORY'.", +"Indicates that the merchant has received a chargeback inquiry due to fraud for the transaction, requesting additional information before a fraud chargeback is officially issued and a formal chargeback notification is sent.", +"Indicates that the merchant has received a chargeback alert due to fraud for the transaction. The process of resolving the dispute without involving the payment network is started.", +"Indicates that a fraud notification is issued for the transaction, sent by the payment instrument's issuing bank because the transaction appears to be fraudulent. We recommend including TC40 or SAFE data in the `reason` field for this event type. For partial chargebacks, we recommend that you include an amount in the `value` field.", +"Indicates that the merchant is informed by the payment network that the transaction has entered the chargeback process due to fraud. Reason code examples include Discover's '6005' and '6041'. For partial chargebacks, we recommend that you include an amount in the `value` field.", +"Indicates that the transaction has entered the chargeback process due to fraud, and that the merchant has chosen to enter representment. Reason examples include Discover's '6005' and '6041'. For partial chargebacks, we recommend that you include an amount in the `value` field.", +"Indicates that the transaction has had a fraud chargeback which was illegitimate and was reversed as a result. For partial chargebacks, we recommend that you include an amount in the `value` field.", +"Indicates that the merchant has received a refund for a completed transaction. For partial refunds, we recommend that you include an amount in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt tax)", +"Indicates that the merchant has received a refund request for this transaction, but that they have declined it. For partial refunds, we recommend that you include an amount in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt tax)", +"Indicates that the completed transaction was refunded by the merchant. For partial refunds, we recommend that you include an amount in the `value` field. Reason example: 'TAX_EXEMPT' (partial refund of exempt tax)", +"Indicates that the completed transaction was refunded by the merchant, and that this refund was reversed. For partial refunds, we recommend that you include an amount in the `value` field." +], +"type": "string" +}, +"reason": { +"description": "Optional. The reason or standardized code that corresponds with this transaction event, if one exists. For example, a CHARGEBACK event with code 6005.", +"type": "string" +}, +"value": { +"description": "Optional. The value that corresponds with this transaction event, if one exists. For example, a refund event where $5.00 was refunded. Currency is obtained from the original transaction data.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1UserId": { +"description": "An identifier associated with a user.", +"id": "GoogleCloudRecaptchaenterpriseV1UserId", +"properties": { +"email": { +"description": "Optional. An email address.", +"type": "string" +}, +"phoneNumber": { +"description": "Optional. A phone number. Should use the E.164 format.", +"type": "string" +}, +"username": { +"description": "Optional. A unique username, if different from all the other identifiers and `account_id` that are provided. Can be a unique login handle or display name for a user.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1UserInfo": { +"description": "User information associated with a request protected by reCAPTCHA Enterprise.", +"id": "GoogleCloudRecaptchaenterpriseV1UserInfo", +"properties": { +"accountId": { +"description": "Optional. For logged-in requests or login/registration requests, the unique account identifier associated with this user. You can use the username if it is stable (meaning it is the same for every request associated with the same user), or any stable user ID of your choice. Leave blank for non logged-in actions or guest checkout.", +"type": "string" +}, +"createAccountTime": { +"description": "Optional. Creation time for this account associated with this user. Leave blank for non logged-in actions, guest checkout, or when there is no account associated with the current user.", +"format": "google-datetime", +"type": "string" +}, +"userIds": { +"description": "Optional. Identifiers associated with this user or request.", +"items": { +"$ref": "GoogleCloudRecaptchaenterpriseV1UserId" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1WafSettings": { +"description": "Settings specific to keys that can be used for WAF (Web Application Firewall).", +"id": "GoogleCloudRecaptchaenterpriseV1WafSettings", +"properties": { +"wafFeature": { +"description": "Required. The WAF feature for which this key is enabled.", +"enum": [ +"WAF_FEATURE_UNSPECIFIED", +"CHALLENGE_PAGE", +"SESSION_TOKEN", +"ACTION_TOKEN", +"EXPRESS" +], +"enumDescriptions": [ +"Undefined feature.", +"Redirects suspicious traffic to reCAPTCHA.", +"Use reCAPTCHA session-tokens to protect the whole user session on the site's domain.", +"Use reCAPTCHA action-tokens to protect user actions.", +"Use reCAPTCHA WAF express protection to protect any content other than web pages, like APIs and IoT devices." +], +"type": "string" +}, +"wafService": { +"description": "Required. The WAF service that uses this key.", +"enum": [ +"WAF_SERVICE_UNSPECIFIED", +"CA", +"FASTLY", +"CLOUDFLARE" +], +"enumDescriptions": [ +"Undefined WAF", +"Cloud Armor", +"Fastly", +"Cloudflare" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecaptchaenterpriseV1WebKeySettings": { +"description": "Settings specific to keys that can be used by websites.", +"id": "GoogleCloudRecaptchaenterpriseV1WebKeySettings", +"properties": { +"allowAllDomains": { +"description": "Optional. If set to true, it means allowed_domains will not be enforced.", +"type": "boolean" +}, +"allowAmpTraffic": { +"description": "Optional. If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.", +"type": "boolean" +}, +"allowedDomains": { +"description": "Optional. Domains or subdomains of websites allowed to use the key. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com'", +"items": { +"type": "string" +}, +"type": "array" +}, +"challengeSecurityPreference": { +"description": "Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.", +"enum": [ +"CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED", +"USABILITY", +"BALANCE", +"SECURITY" +], +"enumDescriptions": [ +"Default type that indicates this enum hasn't been specified.", +"Key tends to show fewer and easier challenges.", +"Key tends to show balanced (in amount and difficulty) challenges.", +"Key tends to show more and harder challenges." +], +"type": "string" +}, +"integrationType": { +"description": "Required. Describes how this key is integrated with the website.", +"enum": [ +"INTEGRATION_TYPE_UNSPECIFIED", +"SCORE", +"CHECKBOX", +"INVISIBLE" +], +"enumDescriptions": [ +"Default type that indicates this enum hasn't been specified. This is not a valid IntegrationType, one of the other types must be specified instead.", +"Only used to produce scores. It doesn't display the \"I'm not a robot\" checkbox and never shows captcha challenges.", +"Displays the \"I'm not a robot\" checkbox and may show captcha challenges after it is checked.", +"Doesn't display the \"I'm not a robot\" checkbox, but may show captcha challenges after risk analysis." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "reCAPTCHA Enterprise API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommendationengine.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommendationengine.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..c7da253493a1ce7f902dc2762d3e18d93c1e2260 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommendationengine.v1beta1.json @@ -0,0 +1,2048 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://recommendationengine.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Recommendations AI", +"description": "Note that we now highly recommend new customers to use Retail API, which incorporates the GA version of the Recommendations AI funtionalities. To enable Retail API, please visit https://console.cloud.google.com/apis/library/retail.googleapis.com. The Recommendations AI service enables customers to build end-to-end personalized recommendation systems without requiring a high level of expertise in machine learning, recommendation system, or Google Cloud.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/recommendations-ai/docs", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "recommendationengine:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://recommendationengine.mtls.googleapis.com/", +"name": "recommendationengine", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"catalogs": { +"methods": { +"list": { +"description": "Lists all the catalog configurations associated with the project.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListCatalogs` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The account resource name with an associated location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/catalogs", +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1ListCatalogsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the catalog configuration.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}", +"httpMethod": "PATCH", +"id": "recommendationengine.projects.locations.catalogs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The fully qualified resource name of the catalog.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Indicates which fields in the provided 'catalog' to update. If not set, will only update the catalog_item_level_config field. Currently only fields that can be updated are catalog_item_level_config.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1Catalog" +}, +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1Catalog" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"catalogItems": { +"methods": { +"create": { +"description": "Creates a catalog item.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.catalogItems.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/catalogItems", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem" +}, +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a catalog item.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems/{catalogItemsId}", +"httpMethod": "DELETE", +"id": "recommendationengine.projects.locations.catalogs.catalogItems.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of catalog item, such as `projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/catalogItems/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a specific catalog item.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems/{catalogItemsId}", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.catalogItems.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of catalog item, such as `projects/*/locations/global/catalogs/default_catalog/catalogitems/some_catalog_item_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/catalogItems/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of multiple catalog items. Request processing may be synchronous. No partial updating supported. Non-existing items will be created. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully updated.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems:import", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.catalogItems.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog` If no updateMask is specified, requires catalogItems.create permission. If updateMask is specified, requires catalogItems.update permission.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/catalogItems:import", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Gets a list of catalog items.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.catalogItems.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Use of this field is not supported by version v1beta1.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Maximum number of results to return per page. If zero, the service will choose a reasonable default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The previous ListCatalogItemsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/catalogItems", +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a catalog item. Partial updating is supported. Non-existing items will be created.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/catalogItems/{catalogItemsId}", +"httpMethod": "PATCH", +"id": "recommendationengine.projects.locations.catalogs.catalogItems.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of catalog item, such as `projects/*/locations/global/catalogs/default_catalog/catalogItems/some_catalog_item_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/catalogItems/.*$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Indicates which fields in the provided 'item' to update. If not set, will by default update all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem" +}, +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"eventStores": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.eventStores.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/operations", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.eventStores.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"placements": { +"methods": { +"predict": { +"description": "Makes a recommendation prediction. If using API Key based authentication, the API Key must be registered using the PredictionApiKeyRegistry service. [Learn more](https://cloud.google.com/recommendations-ai/docs/setting-up#register-key).", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/placements/{placementsId}:predict", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.eventStores.placements.predict", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+/placements/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:predict", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1PredictRequest" +}, +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1PredictResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"predictionApiKeyRegistrations": { +"methods": { +"create": { +"description": "Register an API key for use with predict method.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/predictionApiKeyRegistrations", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/predictionApiKeyRegistrations", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest" +}, +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Unregister an apiKey from using for predict method.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/predictionApiKeyRegistrations/{predictionApiKeyRegistrationsId}", +"httpMethod": "DELETE", +"id": "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The API key to unregister including full resource path. `projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/predictionApiKeyRegistrations/`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+/predictionApiKeyRegistrations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List the registered apiKeys for use with predict method.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/predictionApiKeyRegistrations", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.eventStores.predictionApiKeyRegistrations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return per page. If unset, the service will choose a reasonable default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The previous `ListPredictionApiKeyRegistration.nextPageToken`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent placement resource name such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/predictionApiKeyRegistrations", +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"userEvents": { +"methods": { +"collect": { +"description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Recommendations AI JavaScript pixel. Users should not call this method directly.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:collect", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.collect", +"parameterOrder": [ +"parent" +], +"parameters": { +"ets": { +"description": "Optional. The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent eventStore name, such as `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +}, +"uri": { +"description": "Optional. The url including cgi-parameters but excluding the hash fragment. The URL must be truncated to 1.5K bytes to conservatively be under the 2K bytes. This is often more useful than the referer url, because many browsers only send the domain for 3rd party requests.", +"location": "query", +"type": "string" +}, +"userEvent": { +"description": "Required. URL encoded UserEvent proto.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/userEvents:collect", +"response": { +"$ref": "GoogleApiHttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:import", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/userEvents:import", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Gets a list of user events within a time range, with potential filtering. The method does not list unjoined user events. Unjoined user event definition: when a user event is ingested from Recommendations AI User Event APIs, the catalog item included in the user event is connected with the current catalog. If a catalog item of the ingested event is not in the current catalog, it could lead to degraded model quality. This is called an unjoined event.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filtering expression to specify restrictions over returned events. This is a sequence of terms, where each term applies some kind of a restriction to the returned user events. Use this expression to restrict results to a specific time range, or filter events by eventType. eg: eventTime > \"2012-04-23T18:25:43.511Z\" eventsMissingCatalogItems eventTime<\"2012-04-23T18:25:43.511Z\" eventType=search We expect only 3 types of fields: * eventTime: this can be specified a maximum of 2 times, once with a less than operator and once with a greater than operator. The eventTime restrict should result in one contiguous valid eventTime range. * eventType: only 1 eventType restriction can be specified. * eventsMissingCatalogItems: specififying this will restrict results to events for which catalog items were not found in the catalog. The default behavior is to return only those events for which catalog items were found. Some examples of valid filters expressions: * Example 1: eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\" * Example 2: eventTime > \"2012-04-23T18:25:43.511Z\" eventType = detail-page-view * Example 3: eventsMissingCatalogItems eventType = search eventTime < \"2018-04-23T18:30:43.511Z\" * Example 4: eventTime > \"2012-04-23T18:25:43.511Z\" * Example 5: eventType = search * Example 6: eventsMissingCatalogItems", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Maximum number of results to return per page. If zero, the service will choose a reasonable default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The previous ListUserEventsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent eventStore resource name, such as `projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/userEvents", +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1ListUserEventsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"purge": { +"description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:purge", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the event_store under which the events are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}/eventStores/${eventStoreId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/userEvents:purge", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rejoin": { +"description": "Triggers a user event rejoin operation with latest catalog data. Events will not be annotated with detailed catalog information if catalog item is missing at the time the user event is ingested, and these events are stored as unjoined events with a limited usage on training and serving. This API can be used to trigger a 'join' operation on specified events with latest version of catalog items. It can also be used to correct events joined with wrong catalog items.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:rejoin", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.rejoin", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Full resource name of user event, such as `projects/*/locations/*/catalogs/default_catalog/eventStores/default_event_store`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/userEvents:rejoin", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"write": { +"description": "Writes a single user event.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/eventStores/{eventStoresId}/userEvents:write", +"httpMethod": "POST", +"id": "recommendationengine.projects.locations.catalogs.eventStores.userEvents.write", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent eventStore resource name, such as \"projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store\".", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/eventStores/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/userEvents:write", +"request": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEvent" +}, +"response": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEvent" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations", +"httpMethod": "GET", +"id": "recommendationengine.projects.locations.catalogs.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://recommendationengine.googleapis.com/", +"schemas": { +"GoogleApiHttpBody": { +"description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", +"id": "GoogleApiHttpBody", +"properties": { +"contentType": { +"description": "The HTTP Content-Type header value specifying the content type of the body.", +"type": "string" +}, +"data": { +"description": "The HTTP request/response body as raw binary.", +"format": "byte", +"type": "string" +}, +"extensions": { +"description": "Application specific response metadata. Must be set in the first response for streaming APIs.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1alphaRejoinCatalogMetadata": { +"description": "Metadata for TriggerCatalogRejoin method.", +"id": "GoogleCloudRecommendationengineV1alphaRejoinCatalogMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse": { +"description": "Response message for TriggerCatalogRejoin method.", +"id": "GoogleCloudRecommendationengineV1alphaRejoinCatalogResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest catalog items.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1alphaTuningMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRecommendationengineV1alphaTuningMetadata", +"properties": { +"recommendationModel": { +"description": "The resource name of the recommendation model that this tune applies to. Format: projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/eventStores/{event_store_id}/recommendationModels/{recommendation_model_id}", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1alphaTuningResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRecommendationengineV1alphaTuningResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1BigQuerySource": { +"description": "BigQuery source import data from.", +"id": "GoogleCloudRecommendationengineV1beta1BigQuerySource", +"properties": { +"dataSchema": { +"description": "Optional. The schema to use when parsing the data from the source. Supported values for catalog imports: 1: \"catalog_recommendations_ai\" using https://cloud.google.com/recommendations-ai/docs/upload-catalog#json (Default for catalogItems.import) 2: \"catalog_merchant_center\" using https://cloud.google.com/recommendations-ai/docs/upload-catalog#mc Supported values for user event imports: 1: \"user_events_recommendations_ai\" using https://cloud.google.com/recommendations-ai/docs/manage-user-events#import (Default for userEvents.import) 2. \"user_events_ga360\" using https://support.google.com/analytics/answer/3437719?hl=en", +"type": "string" +}, +"datasetId": { +"description": "Required. The BigQuery data set to copy the data from.", +"type": "string" +}, +"gcsStagingDir": { +"description": "Optional. Intermediate Cloud Storage directory used for the import. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", +"type": "string" +}, +"projectId": { +"description": "Optional. The project id (can be project # or id) that the BigQuery source is in. If not specified, inherits the project id from the parent request.", +"type": "string" +}, +"tableId": { +"description": "Required. The BigQuery table to copy the data from.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1Catalog": { +"description": "The catalog configuration. Next ID: 5.", +"id": "GoogleCloudRecommendationengineV1beta1Catalog", +"properties": { +"catalogItemLevelConfig": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig", +"description": "Required. The catalog item level configuration." +}, +"defaultEventStoreId": { +"description": "Required. The ID of the default event store.", +"type": "string" +}, +"displayName": { +"description": "Required. The catalog display name.", +"type": "string" +}, +"name": { +"description": "The fully qualified resource name of the catalog.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1CatalogInlineSource": { +"description": "The inline source for the input config for ImportCatalogItems method.", +"id": "GoogleCloudRecommendationengineV1beta1CatalogInlineSource", +"properties": { +"catalogItems": { +"description": "Optional. A list of catalog items to update/create. Recommended max of 10k items.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1CatalogItem": { +"description": "CatalogItem captures all metadata information of items to be recommended.", +"id": "GoogleCloudRecommendationengineV1beta1CatalogItem", +"properties": { +"categoryHierarchies": { +"description": "Required. Catalog item categories. This field is repeated for supporting one catalog item belonging to several parallel category hierarchies. For example, if a shoes product belongs to both [\"Shoes & Accessories\" -> \"Shoes\"] and [\"Sports & Fitness\" -> \"Athletic Clothing\" -> \"Shoes\"], it could be represented as: \"categoryHierarchies\": [ { \"categories\": [\"Shoes & Accessories\", \"Shoes\"]}, { \"categories\": [\"Sports & Fitness\", \"Athletic Clothing\", \"Shoes\"] } ]", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy" +}, +"type": "array" +}, +"description": { +"description": "Optional. Catalog item description. UTF-8 encoded string with a length limit of 5 KiB.", +"type": "string" +}, +"id": { +"description": "Required. Catalog item identifier. UTF-8 encoded string with a length limit of 128 bytes. This id must be unique among all catalog items within the same catalog. It should also be used when logging user events in order for the user events to be joined with the Catalog.", +"type": "string" +}, +"itemAttributes": { +"$ref": "GoogleCloudRecommendationengineV1beta1FeatureMap", +"description": "Optional. Highly encouraged. Extra catalog item attributes to be included in the recommendation model. For example, for retail products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the item attributes here." +}, +"itemGroupId": { +"description": "Optional. Variant group identifier for prediction results. UTF-8 encoded string with a length limit of 128 bytes. This field must be enabled before it can be used. [Learn more](/recommendations-ai/docs/catalog#item-group-id).", +"type": "string" +}, +"languageCode": { +"description": "Optional. Deprecated. The model automatically detects the text language. Your catalog can include text in different languages, but duplicating catalog items to provide text in multiple languages can result in degraded model performance.", +"type": "string" +}, +"productMetadata": { +"$ref": "GoogleCloudRecommendationengineV1beta1ProductCatalogItem", +"description": "Optional. Metadata specific to retail products." +}, +"tags": { +"description": "Optional. Filtering tags associated with the catalog item. Each tag should be a UTF-8 encoded string with a length limit of 1 KiB. This tag can be used for filtering recommendation results by passing the tag as part of the predict request filter.", +"items": { +"type": "string" +}, +"type": "array" +}, +"title": { +"description": "Required. Catalog item title. UTF-8 encoded string with a length limit of 1 KiB.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy": { +"description": "Category represents catalog item category hierarchy.", +"id": "GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy", +"properties": { +"categories": { +"description": "Required. Catalog item categories. Each category should be a UTF-8 encoded string with a length limit of 2 KiB. Note that the order in the list denotes the specificity (from least to most specific).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig": { +"description": "Configures the catalog level that users send events to, and the level at which predictions are made.", +"id": "GoogleCloudRecommendationengineV1beta1CatalogItemLevelConfig", +"properties": { +"eventItemLevel": { +"description": "Optional. Level of the catalog at which events are uploaded. See https://cloud.google.com/recommendations-ai/docs/catalog#catalog-levels for more details.", +"enum": [ +"CATALOG_ITEM_LEVEL_UNSPECIFIED", +"VARIANT", +"MASTER" +], +"enumDescriptions": [ +"Unknown value - should never be used.", +"Catalog items are at variant level.", +"Catalog items are at master level." +], +"type": "string" +}, +"predictItemLevel": { +"description": "Optional. Level of the catalog at which predictions are made. See https://cloud.google.com/recommendations-ai/docs/catalog#catalog-levels for more details.", +"enum": [ +"CATALOG_ITEM_LEVEL_UNSPECIFIED", +"VARIANT", +"MASTER" +], +"enumDescriptions": [ +"Unknown value - should never be used.", +"Catalog items are at variant level.", +"Catalog items are at master level." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest": { +"description": "Request message for the `CreatePredictionApiKeyRegistration` method.", +"id": "GoogleCloudRecommendationengineV1beta1CreatePredictionApiKeyRegistrationRequest", +"properties": { +"predictionApiKeyRegistration": { +"$ref": "GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration", +"description": "Required. The prediction API key registration." +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1EventDetail": { +"description": "User event details shared by all recommendation types.", +"id": "GoogleCloudRecommendationengineV1beta1EventDetail", +"properties": { +"eventAttributes": { +"$ref": "GoogleCloudRecommendationengineV1beta1FeatureMap", +"description": "Optional. Extra user event features to include in the recommendation model. For product recommendation, an example of extra user information is traffic_channel, i.e. how user arrives at the site. Users can arrive at the site by coming to the site directly, or coming through Google search, and etc." +}, +"experimentIds": { +"description": "Optional. A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Recommendation Engine system, using different recommendation models).", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageViewId": { +"description": "Optional. A unique id of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. This `pageViewId` will be automatically generated if using the JavaScript pixel.", +"type": "string" +}, +"recommendationToken": { +"description": "Optional. Recommendation token included in the recommendation prediction response. This field enables accurate attribution of recommendation model performance. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased item. If user clicks on product K in the recommendation results, pass the `PredictResponse.recommendationToken` property as a url parameter to product K's page. When recording events on product K's page, log the PredictResponse.recommendation_token to this field. Optional, but highly encouraged for user events that are the result of a recommendation prediction query.", +"type": "string" +}, +"referrerUri": { +"description": "Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.", +"type": "string" +}, +"uri": { +"description": "Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1FeatureMap": { +"description": "FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features.", +"id": "GoogleCloudRecommendationengineV1beta1FeatureMap", +"properties": { +"categoricalFeatures": { +"additionalProperties": { +"$ref": "GoogleCloudRecommendationengineV1beta1FeatureMapStringList" +}, +"description": "Categorical features that can take on one of a limited number of possible values. Some examples would be the brand/maker of a product, or country of a customer. Feature names and values must be UTF-8 encoded strings. For example: `{ \"colors\": {\"value\": [\"yellow\", \"green\"]}, \"sizes\": {\"value\":[\"S\", \"M\"]}`", +"type": "object" +}, +"numericalFeatures": { +"additionalProperties": { +"$ref": "GoogleCloudRecommendationengineV1beta1FeatureMapFloatList" +}, +"description": "Numerical features. Some examples would be the height/weight of a product, or age of a customer. Feature names must be UTF-8 encoded strings. For example: `{ \"lengths_cm\": {\"value\":[2.3, 15.4]}, \"heights_cm\": {\"value\":[8.1, 6.4]} }`", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1FeatureMapFloatList": { +"description": "A list of float features.", +"id": "GoogleCloudRecommendationengineV1beta1FeatureMapFloatList", +"properties": { +"value": { +"description": "Float feature value.", +"items": { +"format": "float", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1FeatureMapStringList": { +"description": "A list of string features.", +"id": "GoogleCloudRecommendationengineV1beta1FeatureMapStringList", +"properties": { +"value": { +"description": "String feature value with a length limit of 128 bytes.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1GcsSource": { +"description": "Google Cloud Storage location for input content. format.", +"id": "GoogleCloudRecommendationengineV1beta1GcsSource", +"properties": { +"inputUris": { +"description": "Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB. See [Importing catalog information](/recommendations-ai/docs/upload-catalog) for the expected file format and setup instructions.", +"items": { +"type": "string" +}, +"type": "array" +}, +"jsonSchema": { +"description": "Optional. The schema to use when parsing the data from the source. Supported values for catalog imports: 1: \"catalog_recommendations_ai\" using https://cloud.google.com/recommendations-ai/docs/upload-catalog#json (Default for catalogItems.import) 2: \"catalog_merchant_center\" using https://cloud.google.com/recommendations-ai/docs/upload-catalog#mc Supported values for user events imports: 1: \"user_events_recommendations_ai\" using https://cloud.google.com/recommendations-ai/docs/manage-user-events#import (Default for userEvents.import) 2. \"user_events_ga360\" using https://support.google.com/analytics/answer/3437719?hl=en", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1Image": { +"description": "Catalog item thumbnail/detail image.", +"id": "GoogleCloudRecommendationengineV1beta1Image", +"properties": { +"height": { +"description": "Optional. Height of the image in number of pixels.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "Required. URL of the image with a length limit of 5 KiB.", +"type": "string" +}, +"width": { +"description": "Optional. Width of the image in number of pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest": { +"description": "Request message for Import methods.", +"id": "GoogleCloudRecommendationengineV1beta1ImportCatalogItemsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRecommendationengineV1beta1ImportErrorsConfig", +"description": "Optional. The desired location of errors incurred during the Import." +}, +"inputConfig": { +"$ref": "GoogleCloudRecommendationengineV1beta1InputConfig", +"description": "Required. The desired input location of the data." +}, +"requestId": { +"description": "Optional. Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency and used for request deduplication. Server-generated if unspecified. Up to 128 characters long. This is returned as google.longrunning.Operation.name in the response.", +"type": "string" +}, +"updateMask": { +"description": "Optional. Indicates which fields in the provided imported 'items' to update. If not set, will by default update all fields.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse": { +"description": "Response of the ImportCatalogItemsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRecommendationengineV1beta1ImportCatalogItemsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRecommendationengineV1beta1ImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRecommendationengineV1beta1ImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Import errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRecommendationengineV1beta1ImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"operationName": { +"description": "Name of the operation.", +"type": "string" +}, +"requestId": { +"description": "Id of the request / operation. This is parroting back the requestId that was passed in the request.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest": { +"description": "Request message for the ImportUserEvents request.", +"id": "GoogleCloudRecommendationengineV1beta1ImportUserEventsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRecommendationengineV1beta1ImportErrorsConfig", +"description": "Optional. The desired location of errors incurred during the Import." +}, +"inputConfig": { +"$ref": "GoogleCloudRecommendationengineV1beta1InputConfig", +"description": "Required. The desired input location of the data." +}, +"requestId": { +"description": "Optional. Unique identifier provided by client, within the ancestor dataset scope. Ensures idempotency for expensive long running operations. Server-generated if unspecified. Up to 128 characters long. This is returned as google.longrunning.Operation.name in the response. Note that this field must not be set if the desired input config is catalog_inline_source.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRecommendationengineV1beta1ImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRecommendationengineV1beta1ImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1InputConfig": { +"description": "The input config source.", +"id": "GoogleCloudRecommendationengineV1beta1InputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRecommendationengineV1beta1BigQuerySource", +"description": "BigQuery input source." +}, +"catalogInlineSource": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogInlineSource", +"description": "The Inline source for the input content for Catalog items." +}, +"gcsSource": { +"$ref": "GoogleCloudRecommendationengineV1beta1GcsSource", +"description": "Google Cloud Storage location for the input content." +}, +"userEventInlineSource": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEventInlineSource", +"description": "The Inline source for the input content for UserEvents." +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse": { +"description": "Response message for ListCatalogItems method.", +"id": "GoogleCloudRecommendationengineV1beta1ListCatalogItemsResponse", +"properties": { +"catalogItems": { +"description": "The catalog items.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItem" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If empty, the list is complete. If nonempty, the token to pass to the next request's ListCatalogItemRequest.page_token.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ListCatalogsResponse": { +"description": "Response for ListCatalogs method.", +"id": "GoogleCloudRecommendationengineV1beta1ListCatalogsResponse", +"properties": { +"catalogs": { +"description": "Output only. All the customer's catalogs.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1Catalog" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse": { +"description": "Response message for the `ListPredictionApiKeyRegistrations`.", +"id": "GoogleCloudRecommendationengineV1beta1ListPredictionApiKeyRegistrationsResponse", +"properties": { +"nextPageToken": { +"description": "If empty, the list is complete. If nonempty, pass the token to the next request's `ListPredictionApiKeysRegistrationsRequest.pageToken`.", +"type": "string" +}, +"predictionApiKeyRegistrations": { +"description": "The list of registered API keys.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ListUserEventsResponse": { +"description": "Response message for ListUserEvents method.", +"id": "GoogleCloudRecommendationengineV1beta1ListUserEventsResponse", +"properties": { +"nextPageToken": { +"description": "If empty, the list is complete. If nonempty, the token to pass to the next request's ListUserEvents.page_token.", +"type": "string" +}, +"userEvents": { +"description": "The user events.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEvent" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PredictRequest": { +"description": "Request message for Predict method. Full resource name of the format: `{name=projects/*/locations/global/catalogs/default_catalog/eventStores/default_event_store/placements/*}` The id of the recommendation engine placement. This id is used to identify the set of models that will be used to make the prediction. We currently support three placements with the following IDs by default: // * `shopping_cart`: Predicts items frequently bought together with one or more catalog items in the same shopping session. Commonly displayed after `add-to-cart` event, on product detail pages, or on the shopping cart page. * `home_page`: Predicts the next product that a user will most likely engage with or purchase based on the shopping or viewing history of the specified `userId` or `visitorId`. For example - Recommendations for you. * `product_detail`: Predicts the next product that a user will most likely engage with or purchase. The prediction is based on the shopping or viewing history of the specified `userId` or `visitorId` and its relevance to a specified `CatalogItem`. Typically used on product detail pages. For example - More items like this. * `recently_viewed_default`: Returns up to 75 items recently viewed by the specified `userId` or `visitorId`, most recent ones first. Returns nothing if neither of them has viewed any items yet. For example - Recently viewed. The full list of available placements can be seen at https://console.cloud.google.com/recommendation/catalogs/default_catalog/placements", +"id": "GoogleCloudRecommendationengineV1beta1PredictRequest", +"properties": { +"dryRun": { +"description": "Optional. Use dryRun mode for this prediction query. If set to true, a fake model will be used that returns arbitrary catalog items. Note that the dryRun mode should only be used for testing the API, or if the model is not ready.", +"type": "boolean" +}, +"filter": { +"description": "Optional. Filter for restricting prediction results. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to items that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1 KiB. * filterOutOfStockItems. Restricts predictions to items that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, nothing will be returned. If you want generic (unfiltered) popular items to be returned instead, set `strictFiltering` to false in `PredictRequest.params`.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels for the predict request. * Label keys can contain lowercase letters, digits and hyphens, must start with a letter, and must end with a letter or digit. * Non-zero label values can contain lowercase letters, digits and hyphens, must start with a letter, and must end with a letter or digit. * No more than 64 labels can be associated with a given request. See https://goo.gl/xmQnxf for more information on and examples of labels.", +"type": "object" +}, +"pageSize": { +"description": "Optional. Maximum number of results to return per page. Set this property to the number of prediction results required. If zero, the service will choose a reasonable default.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The previous PredictResponse.next_page_token.", +"type": "string" +}, +"params": { +"additionalProperties": { +"type": "any" +}, +"description": "Optional. Additional domain specific parameters for the predictions. Allowed values: * `returnCatalogItem`: Boolean. If set to true, the associated catalogItem object will be returned in the `PredictResponse.PredictionResult.itemMetadata` object in the method response. * `returnItemScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned item will be set in the `metadata` field in the prediction response. The given 'score' indicates the probability of an item being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular items instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request level control and adjust prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request level control and adjust prediction results based on product category.", +"type": "object" +}, +"userEvent": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEvent", +"description": "Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserInfo.visitor_id or UserInfo.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserInfo.visitor_id to a random unique ID and leave UserInfo.user_id unset." +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PredictResponse": { +"description": "Response message for predict method.", +"id": "GoogleCloudRecommendationengineV1beta1PredictResponse", +"properties": { +"dryRun": { +"description": "True if the dryRun property was set in the request.", +"type": "boolean" +}, +"itemsMissingInCatalog": { +"description": "IDs of items in the request that were missing from the catalog.", +"items": { +"type": "string" +}, +"type": "array" +}, +"metadata": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional domain specific prediction response metadata.", +"type": "object" +}, +"nextPageToken": { +"description": "If empty, the list is complete. If nonempty, the token to pass to the next request's PredictRequest.page_token.", +"type": "string" +}, +"recommendationToken": { +"description": "A unique recommendation token. This should be included in the user event logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", +"type": "string" +}, +"results": { +"description": "A list of recommended items. The order represents the ranking (from the most relevant item to the least).", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult": { +"description": "PredictionResult represents the recommendation prediction results.", +"id": "GoogleCloudRecommendationengineV1beta1PredictResponsePredictionResult", +"properties": { +"id": { +"description": "ID of the recommended catalog item", +"type": "string" +}, +"itemMetadata": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional item metadata / annotations. Possible values: * `catalogItem`: JSON representation of the catalogItem. Will be set if `returnCatalogItem` is set to true in `PredictRequest.params`. * `score`: Prediction score in double value. Will be set if `returnItemScore` is set to true in `PredictRequest.params`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration": { +"description": "Registered Api Key.", +"id": "GoogleCloudRecommendationengineV1beta1PredictionApiKeyRegistration", +"properties": { +"apiKey": { +"description": "The API key.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ProductCatalogItem": { +"description": "ProductCatalogItem captures item metadata specific to retail products.", +"id": "GoogleCloudRecommendationengineV1beta1ProductCatalogItem", +"properties": { +"availableQuantity": { +"description": "Optional. The available quantity of the item.", +"format": "int64", +"type": "string" +}, +"canonicalProductUri": { +"description": "Optional. Canonical URL directly linking to the item detail page with a length limit of 5 KiB..", +"type": "string" +}, +"costs": { +"additionalProperties": { +"format": "float", +"type": "number" +}, +"description": "Optional. A map to pass the costs associated with the product. For example: {\"manufacturing\": 45.5} The profit of selling this item is computed like so: * If 'exactPrice' is provided, profit = displayPrice - sum(costs) * If 'priceRange' is provided, profit = minPrice - sum(costs)", +"type": "object" +}, +"currencyCode": { +"description": "Optional. Only required if the price is set. Currency code for price/costs. Use three-character ISO-4217 code.", +"type": "string" +}, +"exactPrice": { +"$ref": "GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice", +"description": "Optional. The exact product price." +}, +"images": { +"description": "Optional. Product images for the catalog item.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1Image" +}, +"type": "array" +}, +"priceRange": { +"$ref": "GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange", +"description": "Optional. The product price range." +}, +"stockState": { +"description": "Optional. Online stock state of the catalog item. Default is `IN_STOCK`.", +"enum": [ +"STOCK_STATE_UNSPECIFIED", +"IN_STOCK", +"OUT_OF_STOCK", +"PREORDER", +"BACKORDER" +], +"enumDescriptions": [ +"Default item stock status. Should never be used.", +"Item in stock.", +"Item out of stock.", +"Item that is in pre-order state.", +"Item that is back-ordered (i.e. temporarily out of stock)." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice": { +"description": "Exact product price.", +"id": "GoogleCloudRecommendationengineV1beta1ProductCatalogItemExactPrice", +"properties": { +"displayPrice": { +"description": "Optional. Display price of the product.", +"format": "float", +"type": "number" +}, +"originalPrice": { +"description": "Optional. Price of the product without any discount. If zero, by default set to be the 'displayPrice'.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange": { +"description": "Product price range when there are a range of prices for different variations of the same product.", +"id": "GoogleCloudRecommendationengineV1beta1ProductCatalogItemPriceRange", +"properties": { +"max": { +"description": "Required. The maximum product price.", +"format": "float", +"type": "number" +}, +"min": { +"description": "Required. The minimum product price.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ProductDetail": { +"description": "Detailed product information associated with a user event.", +"id": "GoogleCloudRecommendationengineV1beta1ProductDetail", +"properties": { +"availableQuantity": { +"description": "Optional. Quantity of the products in stock when a user event happens. Optional. If provided, this overrides the available quantity in Catalog for this event. and can only be set if `stock_status` is set to `IN_STOCK`. Note that if an item is out of stock, you must set the `stock_state` field to be `OUT_OF_STOCK`. Leaving this field unspecified / as zero is not sufficient to mark the item out of stock.", +"format": "int32", +"type": "integer" +}, +"currencyCode": { +"description": "Optional. Currency code for price/costs. Use three-character ISO-4217 code. Required only if originalPrice or displayPrice is set.", +"type": "string" +}, +"displayPrice": { +"description": "Optional. Display price of the product (e.g. discounted price). If provided, this will override the display price in Catalog for this product.", +"format": "float", +"type": "number" +}, +"id": { +"description": "Required. Catalog item ID. UTF-8 encoded string with a length limit of 128 characters.", +"type": "string" +}, +"itemAttributes": { +"$ref": "GoogleCloudRecommendationengineV1beta1FeatureMap", +"description": "Optional. Extra features associated with a product in the user event." +}, +"originalPrice": { +"description": "Optional. Original price of the product. If provided, this will override the original price in Catalog for this product.", +"format": "float", +"type": "number" +}, +"quantity": { +"description": "Optional. Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for `add-to-cart` event. Required for `add-to-cart`, `add-to-list`, `remove-from-cart`, `checkout-start`, `purchase-complete`, `refund` event types.", +"format": "int32", +"type": "integer" +}, +"stockState": { +"description": "Optional. Item stock state. If provided, this overrides the stock state in Catalog for items in this event.", +"enum": [ +"STOCK_STATE_UNSPECIFIED", +"IN_STOCK", +"OUT_OF_STOCK", +"PREORDER", +"BACKORDER" +], +"enumDescriptions": [ +"Default item stock status. Should never be used.", +"Item in stock.", +"Item out of stock.", +"Item that is in pre-order state.", +"Item that is back-ordered (i.e. temporarily out of stock)." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1ProductEventDetail": { +"description": "ProductEventDetail captures user event information specific to retail products.", +"id": "GoogleCloudRecommendationengineV1beta1ProductEventDetail", +"properties": { +"cartId": { +"description": "Optional. The id or name of the associated shopping cart. This id is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `remove-from-cart`, `checkout-start`, `purchase-complete`, or `shopping-cart-page-view` events.", +"type": "string" +}, +"listId": { +"description": "Required for `add-to-list` and `remove-from-list` events. The id or name of the list that the item is being added to or removed from. Other event types should not set this field.", +"type": "string" +}, +"pageCategories": { +"description": "Required for `category-page-view` events. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. The categories associated with a category page. Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: categories : [\"Sales\", \"2017 Black Friday Deals\"].", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1CatalogItemCategoryHierarchy" +}, +"type": "array" +}, +"productDetails": { +"description": "The main product details related to the event. This field is required for the following event types: * `add-to-cart` * `add-to-list` * `checkout-start` * `detail-page-view` * `purchase-complete` * `refund` * `remove-from-cart` * `remove-from-list` This field is optional for the following event types: * `page-visit` * `shopping-cart-page-view` - note that 'product_details' should be set for this unless the shopping cart is empty. * `search` (highly encouraged) In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished broswing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new SEARCH event with different product_details is desired. The end user may have not finished broswing the whole page yet. This field is not allowed for the following event types: * `category-page-view` * `home-page-view`", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1ProductDetail" +}, +"type": "array" +}, +"purchaseTransaction": { +"$ref": "GoogleCloudRecommendationengineV1beta1PurchaseTransaction", +"description": "Optional. A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Optional for `checkout-start` events. Other event types should not set this field." +}, +"searchQuery": { +"description": "At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. The user's search query as UTF-8 encoded text with a length limit of 5 KiB.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PurchaseTransaction": { +"description": "A transaction represents the entire purchase transaction.", +"id": "GoogleCloudRecommendationengineV1beta1PurchaseTransaction", +"properties": { +"costs": { +"additionalProperties": { +"format": "float", +"type": "number" +}, +"description": "Optional. All the costs associated with the product. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs. Total product cost such that profit = revenue - (sum(taxes) + sum(costs)) If product_cost is not set, then profit = revenue - tax - shipping - sum(CatalogItem.costs). If CatalogItem.cost is not specified for one of the items, CatalogItem.cost based profit *cannot* be calculated for this Transaction.", +"type": "object" +}, +"currencyCode": { +"description": "Required. Currency code. Use three-character ISO-4217 code. This field is not required if the event type is `refund`.", +"type": "string" +}, +"id": { +"description": "Optional. The transaction ID with a length limit of 128 bytes.", +"type": "string" +}, +"revenue": { +"description": "Required. Total revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations. This field is not required if the event type is `refund`.", +"format": "float", +"type": "number" +}, +"taxes": { +"additionalProperties": { +"format": "float", +"type": "number" +}, +"description": "Optional. All the taxes associated with the transaction.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata": { +"description": "Metadata related to the progress of the PurgeUserEvents operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRecommendationengineV1beta1PurgeUserEventsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"operationName": { +"description": "The ID of the request / operation.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest": { +"description": "Request message for PurgeUserEvents method.", +"id": "GoogleCloudRecommendationengineV1beta1PurgeUserEventsRequest", +"properties": { +"filter": { +"description": "Required. The filter string to specify the events to be deleted. Empty string filter is not allowed. The eligible fields for filtering are: * `eventType`: UserEvent.eventType field of type string. * `eventTime`: in ISO 8601 \"zulu\" format. * `visitorId`: field of type string. Specifying this will delete all events associated with a visitor. * `userId`: field of type string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\"` * Deleting specific eventType in time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventType = \"detail-page-view\"` * Deleting all events for a specific visitor: `visitorId = \"visitor1024\"` The filtering fields are assumed to have an implicit AND.", +"type": "string" +}, +"force": { +"description": "Optional. The default value is false. Override this flag to true to actually perform the purge. If the field is not set to true, a sampling of events to be deleted will be returned.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRecommendationengineV1beta1PurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"userEventsSample": { +"description": "A sampling of events deleted (or will be deleted) depending on the `force` property in the request. Max of 500 items will be returned.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEvent" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1RejoinUserEventsMetadata": { +"description": "Metadata for RejoinUserEvents method.", +"id": "GoogleCloudRecommendationengineV1beta1RejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest": { +"description": "Request message for CatalogRejoin method.", +"id": "GoogleCloudRecommendationengineV1beta1RejoinUserEventsRequest", +"properties": { +"userEventRejoinScope": { +"description": "Required. The type of the catalog rejoin to define the scope and range of the user events to be rejoined with catalog items.", +"enum": [ +"USER_EVENT_REJOIN_SCOPE_UNSPECIFIED", +"JOINED_EVENTS", +"UNJOINED_EVENTS" +], +"enumDescriptions": [ +"Rejoin catalogs with all events including both joined events and unjoined events.", +"Only rejoin catalogs with joined events.", +"Only rejoin catalogs with unjoined events." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse": { +"description": "Response message for RejoinUserEvents method.", +"id": "GoogleCloudRecommendationengineV1beta1RejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest catalog items.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1UserEvent": { +"description": "UserEvent captures all metadata information recommendation engine needs to know about how end users interact with customers' website.", +"id": "GoogleCloudRecommendationengineV1beta1UserEvent", +"properties": { +"eventDetail": { +"$ref": "GoogleCloudRecommendationengineV1beta1EventDetail", +"description": "Optional. User event detailed information common across different recommendation types." +}, +"eventSource": { +"description": "Optional. This field should *not* be set when using JavaScript pixel or the Recommendations AI Tag. Defaults to `EVENT_SOURCE_UNSPECIFIED`.", +"enum": [ +"EVENT_SOURCE_UNSPECIFIED", +"AUTOML", +"ECOMMERCE", +"BATCH_UPLOAD" +], +"enumDescriptions": [ +"Unspecified event source.", +"The event is ingested via a javascript pixel or Recommendations AI Tag through automl datalayer or JS Macros.", +"The event is ingested via Recommendations AI Tag through Enhanced Ecommerce datalayer.", +"The event is ingested via Import user events API." +], +"type": "string" +}, +"eventTime": { +"description": "Optional. Only required for ImportUserEvents method. Timestamp of user event created.", +"format": "google-datetime", +"type": "string" +}, +"eventType": { +"description": "Required. User event type. Allowed values are: * `add-to-cart` Products being added to cart. * `add-to-list` Items being added to a list (shopping list, favorites etc). * `category-page-view` Special pages such as sale or promotion pages viewed. * `checkout-start` User starting a checkout process. * `detail-page-view` Products detail page viewed. * `home-page-view` Homepage viewed. * `page-visit` Generic page visits not included in the event types above. * `purchase-complete` User finishing a purchase. * `refund` Purchased items being refunded or returned. * `remove-from-cart` Products being removed from cart. * `remove-from-list` Items being removed from a list. * `search` Product search. * `shopping-cart-page-view` User viewing a shopping cart. * `impression` List of items displayed. Used by Google Tag Manager.", +"type": "string" +}, +"productEventDetail": { +"$ref": "GoogleCloudRecommendationengineV1beta1ProductEventDetail", +"description": "Optional. Retail product specific user event metadata. This field is required for the following event types: * `add-to-cart` * `add-to-list` * `category-page-view` * `checkout-start` * `detail-page-view` * `purchase-complete` * `refund` * `remove-from-cart` * `remove-from-list` * `search` This field is optional for the following event types: * `page-visit` * `shopping-cart-page-view` - note that 'product_event_detail' should be set for this unless the shopping cart is empty. This field is not allowed for the following event types: * `home-page-view`" +}, +"userInfo": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserInfo", +"description": "Required. User information." +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1UserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRecommendationengineV1beta1UserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1UserEventInlineSource": { +"description": "The inline source for the input config for ImportUserEvents method.", +"id": "GoogleCloudRecommendationengineV1beta1UserEventInlineSource", +"properties": { +"userEvents": { +"description": "Optional. A list of user events to import. Recommended max of 10k items.", +"items": { +"$ref": "GoogleCloudRecommendationengineV1beta1UserEvent" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommendationengineV1beta1UserInfo": { +"description": "Information of end users.", +"id": "GoogleCloudRecommendationengineV1beta1UserInfo", +"properties": { +"directUserRequest": { +"description": "Optional. Indicates if the request is made directly from the end user in which case the user_agent and ip_address fields can be populated from the HTTP request. This should *not* be set when using the javascript pixel. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events).", +"type": "boolean" +}, +"ipAddress": { +"description": "Optional. IP address of the user. This could be either IPv4 (e.g. 104.133.9.80) or IPv6 (e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334). This should *not* be set when using the javascript pixel or if `direct_user_request` is set. Used to extract location information for personalization.", +"type": "string" +}, +"userAgent": { +"description": "Optional. User agent as included in the HTTP header. UTF-8 encoded string with a length limit of 1 KiB. This should *not* be set when using the JavaScript pixel or if `directUserRequest` is set.", +"type": "string" +}, +"userId": { +"description": "Optional. Unique identifier for logged-in user with a length limit of 128 bytes. Required only for logged-in users. Don't set for anonymous users. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality.", +"type": "string" +}, +"visitorId": { +"description": "Required. A unique identifier for tracking visitors with a length limit of 128 bytes. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. Maximum length 128 bytes. Cannot be empty. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Recommendations AI (Beta)", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommender.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommender.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..adc7d1ddfab4c5a5c217b8cba55579e81ac7c76a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommender.v1.json @@ -0,0 +1,2446 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://recommender.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Recommender", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/recommender/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "recommender:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://recommender.mtls.googleapis.com/", +"name": "recommender", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"billingAccounts": { +"resources": { +"locations": { +"resources": { +"insightTypes": { +"methods": { +"getConfig": { +"description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.insightTypes.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "PATCH", +"id": "recommender.billingAccounts.locations.insightTypes.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"methods": { +"getConfig": { +"description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.recommenders.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates a Recommender Config. This will create a new revision of the config.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "PATCH", +"id": "recommender.billingAccounts.locations.recommenders.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"folders": { +"resources": { +"locations": { +"resources": { +"insightTypes": { +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.folders.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.folders.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.folders.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.folders.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.folders.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"organizations": { +"resources": { +"locations": { +"resources": { +"insightTypes": { +"methods": { +"getConfig": { +"description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "GET", +"id": "recommender.organizations.locations.insightTypes.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "PATCH", +"id": "recommender.organizations.locations.insightTypes.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.organizations.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.organizations.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.organizations.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"methods": { +"getConfig": { +"description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "GET", +"id": "recommender.organizations.locations.recommenders.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates a Recommender Config. This will create a new revision of the config.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "PATCH", +"id": "recommender.organizations.locations.recommenders.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.organizations.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.organizations.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"resources": { +"insightTypes": { +"methods": { +"getConfig": { +"description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "GET", +"id": "recommender.projects.locations.insightTypes.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "PATCH", +"id": "recommender.projects.locations.insightTypes.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.projects.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.projects.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.projects.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"methods": { +"getConfig": { +"description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "GET", +"id": "recommender.projects.locations.recommenders.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates a Recommender Config. This will create a new revision of the config.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "PATCH", +"id": "recommender.projects.locations.recommenders.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.projects.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.projects.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED, SUCCEEDED, FAILED, or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://recommender.googleapis.com/", +"schemas": { +"GoogleCloudRecommenderV1CostProjection": { +"description": "Contains metadata about how much money a recommendation can save or incur.", +"id": "GoogleCloudRecommenderV1CostProjection", +"properties": { +"cost": { +"$ref": "GoogleTypeMoney", +"description": "An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices." +}, +"costInLocalCurrency": { +"$ref": "GoogleTypeMoney", +"description": "The approximate cost savings in the billing account's local currency." +}, +"duration": { +"description": "Duration for which this cost applies.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1Impact": { +"description": "Contains the impact a recommendation can have for a given category.", +"id": "GoogleCloudRecommenderV1Impact", +"properties": { +"category": { +"description": "Category that is being targeted.", +"enum": [ +"CATEGORY_UNSPECIFIED", +"COST", +"SECURITY", +"PERFORMANCE", +"MANAGEABILITY", +"SUSTAINABILITY", +"RELIABILITY" +], +"enumDescriptions": [ +"Default unspecified category. Don't use directly.", +"Indicates a potential increase or decrease in cost.", +"Indicates a potential increase or decrease in security.", +"Indicates a potential increase or decrease in performance.", +"Indicates a potential increase or decrease in manageability.", +"Indicates a potential increase or decrease in sustainability.", +"Indicates a potential increase or decrease in reliability." +], +"type": "string" +}, +"costProjection": { +"$ref": "GoogleCloudRecommenderV1CostProjection", +"description": "Use with CategoryType.COST" +}, +"reliabilityProjection": { +"$ref": "GoogleCloudRecommenderV1ReliabilityProjection", +"description": "Use with CategoryType.RELIABILITY" +}, +"securityProjection": { +"$ref": "GoogleCloudRecommenderV1SecurityProjection", +"description": "Use with CategoryType.SECURITY" +}, +"sustainabilityProjection": { +"$ref": "GoogleCloudRecommenderV1SustainabilityProjection", +"description": "Use with CategoryType.SUSTAINABILITY" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1Insight": { +"description": "An insight along with the information used to derive the insight. The insight may have associated recommendations as well.", +"id": "GoogleCloudRecommenderV1Insight", +"properties": { +"associatedRecommendations": { +"description": "Recommendations derived from this insight.", +"items": { +"$ref": "GoogleCloudRecommenderV1InsightRecommendationReference" +}, +"type": "array" +}, +"category": { +"description": "Category being targeted by the insight.", +"enum": [ +"CATEGORY_UNSPECIFIED", +"COST", +"SECURITY", +"PERFORMANCE", +"MANAGEABILITY", +"SUSTAINABILITY", +"RELIABILITY" +], +"enumDescriptions": [ +"Unspecified category.", +"The insight is related to cost.", +"The insight is related to security.", +"The insight is related to performance.", +"This insight is related to manageability.", +"The insight is related to sustainability.", +"This insight is related to reliability." +], +"type": "string" +}, +"content": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "A struct of custom fields to explain the insight. Example: \"grantedPermissionsCount\": \"1000\"", +"type": "object" +}, +"description": { +"description": "Free-form human readable summary in English. The maximum length is 500 characters.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the Insight. Provides optimistic locking when updating states.", +"type": "string" +}, +"insightSubtype": { +"description": "Insight subtype. Insight content schema will be stable for a given subtype.", +"type": "string" +}, +"lastRefreshTime": { +"description": "Timestamp of the latest data used to generate the insight.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Identifier. Name of the insight.", +"type": "string" +}, +"observationPeriod": { +"description": "Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).", +"format": "google-duration", +"type": "string" +}, +"severity": { +"description": "Insight's severity.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Insight has unspecified severity.", +"Insight has low severity.", +"Insight has medium severity.", +"Insight has high severity.", +"Insight has critical severity." +], +"type": "string" +}, +"stateInfo": { +"$ref": "GoogleCloudRecommenderV1InsightStateInfo", +"description": "Information state and metadata." +}, +"targetResources": { +"description": "Fully qualified resource names that this insight is targeting.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1InsightRecommendationReference": { +"description": "Reference to an associated recommendation.", +"id": "GoogleCloudRecommenderV1InsightRecommendationReference", +"properties": { +"recommendation": { +"description": "Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1InsightStateInfo": { +"description": "Information related to insight state.", +"id": "GoogleCloudRecommenderV1InsightStateInfo", +"properties": { +"state": { +"description": "Insight state.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"ACCEPTED", +"DISMISSED" +], +"enumDescriptions": [ +"Unspecified state.", +"Insight is active. Content for ACTIVE insights can be updated by Google. ACTIVE insights can be marked DISMISSED OR ACCEPTED.", +"Some action has been taken based on this insight. Insights become accepted when a recommendation derived from the insight has been marked CLAIMED, SUCCEEDED, or FAILED. ACTIVE insights can also be marked ACCEPTED explicitly. Content for ACCEPTED insights is immutable. ACCEPTED insights can only be marked ACCEPTED (which may update state metadata).", +"Insight is dismissed. Content for DISMISSED insights can be updated by Google. DISMISSED insights can be marked as ACTIVE." +], +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of metadata for the state, provided by user or automations systems.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1InsightTypeConfig": { +"description": "Configuration for an InsightType.", +"id": "GoogleCloudRecommenderV1InsightTypeConfig", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", +"type": "object" +}, +"displayName": { +"description": "A user-settable field to provide a human-readable name to be used in user interfaces.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the InsightTypeConfig. Provides optimistic locking when updating.", +"type": "string" +}, +"insightTypeGenerationConfig": { +"$ref": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", +"description": "InsightTypeGenerationConfig which configures the generation of insights for this insight type." +}, +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"type": "string" +}, +"revisionId": { +"description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Last time when the config was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1InsightTypeGenerationConfig": { +"description": "A configuration to customize the generation of insights. Eg, customizing the lookback period considered when generating a insight.", +"id": "GoogleCloudRecommenderV1InsightTypeGenerationConfig", +"properties": { +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Parameters for this InsightTypeGenerationConfig. These configs can be used by or are applied to all subtypes.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1ListInsightsResponse": { +"description": "Response to the `ListInsights` method.", +"id": "GoogleCloudRecommenderV1ListInsightsResponse", +"properties": { +"insights": { +"description": "The set of insights for the `parent` resource.", +"items": { +"$ref": "GoogleCloudRecommenderV1Insight" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be used to request the next page of results. This field is empty if there are no additional results.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1ListRecommendationsResponse": { +"description": "Response to the `ListRecommendations` method.", +"id": "GoogleCloudRecommenderV1ListRecommendationsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be used to request the next page of results. This field is empty if there are no additional results.", +"type": "string" +}, +"recommendations": { +"description": "The set of recommendations for the `parent` resource.", +"items": { +"$ref": "GoogleCloudRecommenderV1Recommendation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1MarkInsightAcceptedRequest": { +"description": "Request for the `MarkInsightAccepted` method.", +"id": "GoogleCloudRecommenderV1MarkInsightAcceptedRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Insight. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. State properties user wish to include with this state. Full replace of the current state_metadata.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1MarkRecommendationClaimedRequest": { +"description": "Request for the `MarkRecommendationClaimed` Method.", +"id": "GoogleCloudRecommenderV1MarkRecommendationClaimedRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1MarkRecommendationDismissedRequest": { +"description": "Request for the `MarkRecommendationDismissed` Method.", +"id": "GoogleCloudRecommenderV1MarkRecommendationDismissedRequest", +"properties": { +"etag": { +"description": "Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1MarkRecommendationFailedRequest": { +"description": "Request for the `MarkRecommendationFailed` Method.", +"id": "GoogleCloudRecommenderV1MarkRecommendationFailedRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1MarkRecommendationSucceededRequest": { +"description": "Request for the `MarkRecommendationSucceeded` Method.", +"id": "GoogleCloudRecommenderV1MarkRecommendationSucceededRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1Operation": { +"description": "Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.", +"id": "GoogleCloudRecommenderV1Operation", +"properties": { +"action": { +"description": "Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and custom operations. This field is case-insensitive and always populated.", +"type": "string" +}, +"path": { +"description": "Path to the target field being operated on. If the operation is at the resource level, then path should be \"/\". This field is always populated.", +"type": "string" +}, +"pathFilters": { +"additionalProperties": { +"type": "any" +}, +"description": "Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { \"/versions/*/name\" : \"it-123\" \"/versions/*/targetSize/percent\": 20 } ``` * Example: ``` { \"/bindings/*/role\": \"roles/owner\" \"/bindings/*/condition\" : null } ``` * Example: ``` { \"/bindings/*/role\": \"roles/owner\" \"/bindings/*/members/*\" : [\"x@example.com\", \"y@example.com\"] } ``` When both path_filters and path_value_matchers are set, an implicit AND must be performed.", +"type": "object" +}, +"pathValueMatchers": { +"additionalProperties": { +"$ref": "GoogleCloudRecommenderV1ValueMatcher" +}, +"description": "Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.", +"type": "object" +}, +"resource": { +"description": "Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.", +"type": "string" +}, +"resourceType": { +"description": "Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance", +"type": "string" +}, +"sourcePath": { +"description": "Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.", +"type": "string" +}, +"sourceResource": { +"description": "Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = \"/\", from = \"/\", source_resource = and resource_name = . This field is empty for all other values of `action`.", +"type": "string" +}, +"value": { +"description": "Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.", +"type": "any" +}, +"valueMatcher": { +"$ref": "GoogleCloudRecommenderV1ValueMatcher", +"description": "Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation." +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1OperationGroup": { +"description": "Group of operations that need to be performed atomically.", +"id": "GoogleCloudRecommenderV1OperationGroup", +"properties": { +"operations": { +"description": "List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.", +"items": { +"$ref": "GoogleCloudRecommenderV1Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1Recommendation": { +"description": "A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc", +"id": "GoogleCloudRecommenderV1Recommendation", +"properties": { +"additionalImpact": { +"description": "Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.", +"items": { +"$ref": "GoogleCloudRecommenderV1Impact" +}, +"type": "array" +}, +"associatedInsights": { +"description": "Insights that led to this recommendation.", +"items": { +"$ref": "GoogleCloudRecommenderV1RecommendationInsightReference" +}, +"type": "array" +}, +"content": { +"$ref": "GoogleCloudRecommenderV1RecommendationContent", +"description": "Content of the recommendation describing recommended changes to resources." +}, +"description": { +"description": "Free-form human readable summary in English. The maximum length is 500 characters.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the Recommendation. Provides optimistic locking when updating states.", +"type": "string" +}, +"lastRefreshTime": { +"description": "Last time this recommendation was refreshed by the system that created it in the first place.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Identifier. Name of recommendation.", +"type": "string" +}, +"primaryImpact": { +"$ref": "GoogleCloudRecommenderV1Impact", +"description": "The primary impact that this recommendation can have while trying to optimize for one category." +}, +"priority": { +"description": "Recommendation's priority.", +"enum": [ +"PRIORITY_UNSPECIFIED", +"P4", +"P3", +"P2", +"P1" +], +"enumDescriptions": [ +"Recommendation has unspecified priority.", +"Recommendation has P4 priority (lowest priority).", +"Recommendation has P3 priority (second lowest priority).", +"Recommendation has P2 priority (second highest priority).", +"Recommendation has P1 priority (highest priority)." +], +"type": "string" +}, +"recommenderSubtype": { +"description": "Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = \"google.iam.policy.Recommender\", recommender_subtype can be one of \"REMOVE_ROLE\"/\"REPLACE_ROLE\"", +"type": "string" +}, +"stateInfo": { +"$ref": "GoogleCloudRecommenderV1RecommendationStateInfo", +"description": "Information for state. Contains state and metadata." +}, +"targetResources": { +"description": "Fully qualified resource names that this recommendation is targeting.", +"items": { +"type": "string" +}, +"type": "array" +}, +"xorGroupId": { +"description": "Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1RecommendationContent": { +"description": "Contains what resources are changing and how they are changing.", +"id": "GoogleCloudRecommenderV1RecommendationContent", +"properties": { +"operationGroups": { +"description": "Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.", +"items": { +"$ref": "GoogleCloudRecommenderV1OperationGroup" +}, +"type": "array" +}, +"overview": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Condensed overview information about the recommendation.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1RecommendationInsightReference": { +"description": "Reference to an associated insight.", +"id": "GoogleCloudRecommenderV1RecommendationInsightReference", +"properties": { +"insight": { +"description": "Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1RecommendationStateInfo": { +"description": "Information for state. Contains state and metadata.", +"id": "GoogleCloudRecommenderV1RecommendationStateInfo", +"properties": { +"state": { +"description": "The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CLAIMED", +"SUCCEEDED", +"FAILED", +"DISMISSED" +], +"enumDescriptions": [ +"Default state. Don't use directly.", +"Recommendation is active and can be applied. Recommendations content can be updated by Google. ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in claimed state. Recommendations content is immutable and cannot be updated by Google. CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in succeeded state. Recommendations content is immutable and cannot be updated by Google. SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in failed state. Recommendations content is immutable and cannot be updated by Google. FAILED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in dismissed state. Recommendation content can be updated by Google. DISMISSED recommendations can be marked as ACTIVE." +], +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of metadata for the state, provided by user or automations systems.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1RecommenderConfig": { +"description": "Configuration for a Recommender.", +"id": "GoogleCloudRecommenderV1RecommenderConfig", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", +"type": "object" +}, +"displayName": { +"description": "A user-settable field to provide a human-readable name to be used in user interfaces.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the RecommenderConfig. Provides optimistic locking when updating.", +"type": "string" +}, +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"type": "string" +}, +"recommenderGenerationConfig": { +"$ref": "GoogleCloudRecommenderV1RecommenderGenerationConfig", +"description": "RecommenderGenerationConfig which configures the Generation of recommendations for this recommender." +}, +"revisionId": { +"description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Last time when the config was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1RecommenderGenerationConfig": { +"description": "A Configuration to customize the generation of recommendations. Eg, customizing the lookback period considered when generating a recommendation.", +"id": "GoogleCloudRecommenderV1RecommenderGenerationConfig", +"properties": { +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Parameters for this RecommenderGenerationConfig. These configs can be used by or are applied to all subtypes.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1ReliabilityProjection": { +"description": "Contains information on the impact of a reliability recommendation.", +"id": "GoogleCloudRecommenderV1ReliabilityProjection", +"properties": { +"details": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Per-recommender projection.", +"type": "object" +}, +"risks": { +"description": "Reliability risks mitigated by this recommendation.", +"items": { +"enum": [ +"RISK_TYPE_UNSPECIFIED", +"SERVICE_DISRUPTION", +"DATA_LOSS", +"ACCESS_DENY" +], +"enumDescriptions": [ +"Default unspecified risk. Don't use directly.", +"Potential service downtime.", +"Potential data loss.", +"Potential access denial. The service is still up but some or all clients can't access it." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1SecurityProjection": { +"description": "Contains various ways of describing the impact on Security.", +"id": "GoogleCloudRecommenderV1SecurityProjection", +"properties": { +"details": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Additional security impact details that is provided by the recommender.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1SustainabilityProjection": { +"description": "Contains metadata about how much sustainability a recommendation can save or incur.", +"id": "GoogleCloudRecommenderV1SustainabilityProjection", +"properties": { +"duration": { +"description": "Duration for which this sustainability applies.", +"format": "google-duration", +"type": "string" +}, +"kgCO2e": { +"description": "Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1ValueMatcher": { +"description": "Contains various matching options for values for a GCP resource field.", +"id": "GoogleCloudRecommenderV1ValueMatcher", +"properties": { +"matchesPattern": { +"description": "To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeMoney": { +"description": "Represents an amount of money with its currency type.", +"id": "GoogleTypeMoney", +"properties": { +"currencyCode": { +"description": "The three-letter currency code defined in ISO 4217.", +"type": "string" +}, +"nanos": { +"description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", +"format": "int32", +"type": "integer" +}, +"units": { +"description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Recommender API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommender.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommender.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..2dd7bac5032fd339481684a771c3f1646f5b1215 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/recommender.v1beta1.json @@ -0,0 +1,2804 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://recommender.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Recommender", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/recommender/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "recommender:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://recommender.mtls.googleapis.com/", +"name": "recommender", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"billingAccounts": { +"resources": { +"locations": { +"methods": { +"list": { +"description": "Lists locations with recommendations or insights.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^billingAccounts/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "GoogleCloudLocationListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insightTypes": { +"methods": { +"getConfig": { +"description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.insightTypes.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "PATCH", +"id": "recommender.billingAccounts.locations.insightTypes.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"methods": { +"getConfig": { +"description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.recommenders.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates a Recommender Config. This will create a new revision of the config.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "PATCH", +"id": "recommender.billingAccounts.locations.recommenders.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/billingAccounts/{billingAccountsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.billingAccounts.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^billingAccounts/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"folders": { +"resources": { +"locations": { +"methods": { +"list": { +"description": "Lists locations with recommendations or insights.", +"flatPath": "v1beta1/folders/{foldersId}/locations", +"httpMethod": "GET", +"id": "recommender.folders.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "GoogleCloudLocationListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insightTypes": { +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.folders.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.folders.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.folders.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.folders.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.folders.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/folders/{foldersId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.folders.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"insightTypes": { +"methods": { +"list": { +"description": "Lists available InsightTypes. No IAM permissions are required.", +"flatPath": "v1beta1/insightTypes", +"httpMethod": "GET", +"id": "recommender.insightTypes.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "Optional. The number of InsightTypes to return per page. The service may return fewer than this value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListRecommenders` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/insightTypes", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListInsightTypesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"organizations": { +"resources": { +"locations": { +"methods": { +"list": { +"description": "Lists locations with recommendations or insights.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations", +"httpMethod": "GET", +"id": "recommender.organizations.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "GoogleCloudLocationListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insightTypes": { +"methods": { +"getConfig": { +"description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "GET", +"id": "recommender.organizations.locations.insightTypes.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "PATCH", +"id": "recommender.organizations.locations.insightTypes.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.organizations.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.organizations.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.organizations.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"methods": { +"getConfig": { +"description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "GET", +"id": "recommender.organizations.locations.recommenders.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates a Recommender Config. This will create a new revision of the config.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "PATCH", +"id": "recommender.organizations.locations.recommenders.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.organizations.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.organizations.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/organizations/{organizationsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.organizations.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"methods": { +"list": { +"description": "Lists locations with recommendations or insights.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "recommender.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "GoogleCloudLocationListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insightTypes": { +"methods": { +"getConfig": { +"description": "Gets the requested InsightTypeConfig. There is only one instance of the config for each InsightType.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "GET", +"id": "recommender.projects.locations.insightTypes.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the InsightTypeConfig to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates an InsightTypeConfig change. This will create a new revision of the config.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/config", +"httpMethod": "PATCH", +"id": "recommender.projects.locations.insightTypes.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"insights": { +"methods": { +"get": { +"description": "Gets the requested insight. Requires the recommender.*.get IAM permission for the specified insight type.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}", +"httpMethod": "GET", +"id": "recommender.projects.locations.insightTypes.insights.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists insights for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified insight type.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights", +"httpMethod": "GET", +"id": "recommender.projects.locations.insightTypes.insights.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression to restrict the insights returned. Supported filter fields: * `stateInfo.state` * `insightSubtype` * `severity` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `insightSubtype = PERMISSIONS_USAGE` * `severity = CRITICAL OR severity = HIGH` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (severity = CRITICAL OR severity = HIGH)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ INSIGHT_TYPE_ID refers to supported insight types: https://cloud.google.com/recommender/docs/insights/insight-types.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/insights", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListInsightsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markAccepted": { +"description": "Marks the Insight State as Accepted. Users can use this method to indicate to the Recommender API that they have applied some action based on the insight. This stops the insight content from being updated. MarkInsightAccepted can be applied to insights in ACTIVE state. Requires the recommender.*.update IAM permission for the specified insight.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/insightTypes/{insightTypesId}/insights/{insightsId}:markAccepted", +"httpMethod": "POST", +"id": "recommender.projects.locations.insightTypes.insights.markAccepted", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the insight.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/insightTypes/[^/]+/insights/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markAccepted", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"recommenders": { +"methods": { +"getConfig": { +"description": "Gets the requested Recommender Config. There is only one instance of the config for each Recommender.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "GET", +"id": "recommender.projects.locations.recommenders.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the Recommendation Config to get. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates a Recommender Config. This will create a new revision of the config.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/config", +"httpMethod": "PATCH", +"id": "recommender.projects.locations.recommenders.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/config$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "If true, validate the request and preview the change, but do not actually update it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"recommendations": { +"methods": { +"get": { +"description": "Gets the requested recommendation. Requires the recommender.*.get IAM permission for the specified recommender.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}", +"httpMethod": "GET", +"id": "recommender.projects.locations.recommenders.recommendations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists recommendations for the specified Cloud Resource. Requires the recommender.*.list IAM permission for the specified recommender.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations", +"httpMethod": "GET", +"id": "recommender.projects.locations.recommenders.recommendations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter expression to restrict the recommendations returned. Supported filter fields: * `state_info.state` * `recommenderSubtype` * `priority` * `targetResources` Examples: * `stateInfo.state = ACTIVE OR stateInfo.state = DISMISSED` * `recommenderSubtype = REMOVE_ROLE OR recommenderSubtype = REPLACE_ROLE` * `priority = P1 OR priority = P2` * `targetResources : //compute.googleapis.com/projects/1234/zones/us-central1-a/instances/instance-1` * `stateInfo.state = ACTIVE AND (priority = P1 OR priority = P2)` The max allowed filter length is 500 characters. (These expressions are based on the filter language described at https://google.aip.dev/160)", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to return from this request. Non-positive values are ignored. If not specified, the server will determine the number of results to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If present, retrieves the next batch of results from the preceding call to this method. `page_token` must be the value of `next_page_token` from the previous response. The values of other method parameters must be identical to those in the previous call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The container resource on which to execute the request. Acceptable formats: * `projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `projects/[PROJECT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `billingAccounts/[BILLING_ACCOUNT_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `folders/[FOLDER_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` * `organizations/[ORGANIZATION_ID]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]` LOCATION here refers to GCP Locations: https://cloud.google.com/about/locations/ RECOMMENDER_ID refers to supported recommenders: https://cloud.google.com/recommender/docs/recommenders.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/recommendations", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListRecommendationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markClaimed": { +"description": "Marks the Recommendation State as Claimed. Users can use this method to indicate to the Recommender API that they are starting to apply the recommendation themselves. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationClaimed can be applied to recommendations in CLAIMED or ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markClaimed", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markClaimed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markClaimed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markDismissed": { +"description": "Mark the Recommendation State as Dismissed. Users can use this method to indicate to the Recommender API that an ACTIVE recommendation has to be marked back as DISMISSED. MarkRecommendationDismissed can be applied to recommendations in ACTIVE state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markDismissed", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markDismissed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markDismissed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationDismissedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markFailed": { +"description": "Marks the Recommendation State as Failed. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation failed. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationFailed can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markFailed", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markFailed", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markFailed", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"markSucceeded": { +"description": "Marks the Recommendation State as Succeeded. Users can use this method to indicate to the Recommender API that they have applied the recommendation themselves, and the operation was successful. This stops the recommendation content from being updated. Associated insights are frozen and placed in the ACCEPTED state. MarkRecommendationSucceeded can be applied to recommendations in ACTIVE, CLAIMED, SUCCEEDED, or FAILED state. Requires the recommender.*.update IAM permission for the specified recommender.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/recommenders/{recommendersId}/recommendations/{recommendationsId}:markSucceeded", +"httpMethod": "POST", +"id": "recommender.projects.locations.recommenders.recommendations.markSucceeded", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the recommendation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/recommenders/[^/]+/recommendations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:markSucceeded", +"request": { +"$ref": "GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest" +}, +"response": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"recommenders": { +"methods": { +"list": { +"description": "Lists all available Recommenders. No IAM permissions are required.", +"flatPath": "v1beta1/recommenders", +"httpMethod": "GET", +"id": "recommender.recommenders.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "Optional. The number of RecommenderTypes to return per page. The service may return fewer than this value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListRecommenders` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/recommenders", +"response": { +"$ref": "GoogleCloudRecommenderV1beta1ListRecommendersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://recommender.googleapis.com/", +"schemas": { +"GoogleCloudLocationListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "GoogleCloudLocationListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleCloudLocationLocation" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudLocationLocation": { +"description": "A resource that represents a Google Cloud location.", +"id": "GoogleCloudLocationLocation", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1CostProjection": { +"description": "Contains metadata about how much money a recommendation can save or incur.", +"id": "GoogleCloudRecommenderV1beta1CostProjection", +"properties": { +"cost": { +"$ref": "GoogleTypeMoney", +"description": "An approximate projection on amount saved or amount incurred. Negative cost units indicate cost savings and positive cost units indicate increase. See google.type.Money documentation for positive/negative units. A user's permissions may affect whether the cost is computed using list prices or custom contract prices." +}, +"costInLocalCurrency": { +"$ref": "GoogleTypeMoney", +"description": "The approximate cost savings in the billing account's local currency." +}, +"duration": { +"description": "Duration for which this cost applies.", +"format": "google-duration", +"type": "string" +}, +"pricingType": { +"description": "How the cost is calculated.", +"enum": [ +"PRICING_TYPE_UNSPECIFIED", +"LIST_PRICE", +"CUSTOM_PRICE" +], +"enumDescriptions": [ +"Default pricing type.", +"The price listed by GCP for all customers.", +"A price derived from past usage and billing." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1Impact": { +"description": "Contains the impact a recommendation can have for a given category.", +"id": "GoogleCloudRecommenderV1beta1Impact", +"properties": { +"category": { +"description": "Category that is being targeted.", +"enum": [ +"CATEGORY_UNSPECIFIED", +"COST", +"SECURITY", +"PERFORMANCE", +"MANAGEABILITY", +"SUSTAINABILITY", +"RELIABILITY" +], +"enumDescriptions": [ +"Default unspecified category. Don't use directly.", +"Indicates a potential increase or decrease in cost.", +"Indicates a potential increase or decrease in security.", +"Indicates a potential increase or decrease in performance.", +"Indicates a potential increase or decrease in manageability.", +"Indicates a potential increase or decrease in sustainability.", +"Indicates a potential increase or decrease in reliability." +], +"type": "string" +}, +"costProjection": { +"$ref": "GoogleCloudRecommenderV1beta1CostProjection", +"description": "Use with CategoryType.COST" +}, +"reliabilityProjection": { +"$ref": "GoogleCloudRecommenderV1beta1ReliabilityProjection", +"description": "Use with CategoryType.RELIABILITY" +}, +"securityProjection": { +"$ref": "GoogleCloudRecommenderV1beta1SecurityProjection", +"description": "Use with CategoryType.SECURITY" +}, +"sustainabilityProjection": { +"$ref": "GoogleCloudRecommenderV1beta1SustainabilityProjection", +"description": "Use with CategoryType.SUSTAINABILITY" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1Insight": { +"description": "An insight along with the information used to derive the insight. The insight may have associated recommendations as well.", +"id": "GoogleCloudRecommenderV1beta1Insight", +"properties": { +"associatedRecommendations": { +"description": "Recommendations derived from this insight.", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1InsightRecommendationReference" +}, +"type": "array" +}, +"category": { +"description": "Category being targeted by the insight.", +"enum": [ +"CATEGORY_UNSPECIFIED", +"COST", +"SECURITY", +"PERFORMANCE", +"MANAGEABILITY", +"SUSTAINABILITY", +"RELIABILITY" +], +"enumDescriptions": [ +"Unspecified category.", +"The insight is related to cost.", +"The insight is related to security.", +"The insight is related to performance.", +"This insight is related to manageability.", +"The insight is related to sustainability.", +"The insight is related to reliability." +], +"type": "string" +}, +"content": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "A struct of custom fields to explain the insight. Example: \"grantedPermissionsCount\": \"1000\"", +"type": "object" +}, +"description": { +"description": "Free-form human readable summary in English. The maximum length is 500 characters.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the Insight. Provides optimistic locking when updating states.", +"type": "string" +}, +"insightSubtype": { +"description": "Insight subtype. Insight content schema will be stable for a given subtype.", +"type": "string" +}, +"lastRefreshTime": { +"description": "Timestamp of the latest data used to generate the insight.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Identifier. Name of the insight.", +"type": "string" +}, +"observationPeriod": { +"description": "Observation period that led to the insight. The source data used to generate the insight ends at last_refresh_time and begins at (last_refresh_time - observation_period).", +"format": "google-duration", +"type": "string" +}, +"severity": { +"description": "Insight's severity.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Insight has unspecified severity.", +"Insight has low severity.", +"Insight has medium severity.", +"Insight has high severity.", +"Insight has critical severity." +], +"type": "string" +}, +"stateInfo": { +"$ref": "GoogleCloudRecommenderV1beta1InsightStateInfo", +"description": "Information state and metadata." +}, +"targetResources": { +"description": "Fully qualified resource names that this insight is targeting.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1InsightRecommendationReference": { +"description": "Reference to an associated recommendation.", +"id": "GoogleCloudRecommenderV1beta1InsightRecommendationReference", +"properties": { +"recommendation": { +"description": "Recommendation resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/recommendations/[RECOMMENDATION_ID]", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1InsightStateInfo": { +"description": "Information related to insight state.", +"id": "GoogleCloudRecommenderV1beta1InsightStateInfo", +"properties": { +"state": { +"description": "Insight state.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"ACCEPTED", +"DISMISSED" +], +"enumDescriptions": [ +"Unspecified state.", +"Insight is active. Content for ACTIVE insights can be updated by Google. ACTIVE insights can be marked DISMISSED OR ACCEPTED.", +"Some action has been taken based on this insight. Insights become accepted when a recommendation derived from the insight has been marked CLAIMED, SUCCEEDED, or FAILED. ACTIVE insights can also be marked ACCEPTED explicitly. Content for ACCEPTED insights is immutable. ACCEPTED insights can only be marked ACCEPTED (which may update state metadata).", +"Insight is dismissed. Content for DISMISSED insights can be updated by Google. DISMISSED insights can be marked as ACTIVE." +], +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of metadata for the state, provided by user or automations systems.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1InsightType": { +"description": "The type of insight.", +"id": "GoogleCloudRecommenderV1beta1InsightType", +"properties": { +"name": { +"description": "The insight_type's name in format insightTypes/{insight_type} eg: insightTypes/google.iam.policy.Insight", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1InsightTypeConfig": { +"description": "Configuration for an InsightType.", +"id": "GoogleCloudRecommenderV1beta1InsightTypeConfig", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", +"type": "object" +}, +"displayName": { +"description": "A user-settable field to provide a human-readable name to be used in user interfaces.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the InsightTypeConfig. Provides optimistic locking when updating.", +"type": "string" +}, +"insightTypeGenerationConfig": { +"$ref": "GoogleCloudRecommenderV1beta1InsightTypeGenerationConfig", +"description": "InsightTypeGenerationConfig which configures the generation of insights for this insight type." +}, +"name": { +"description": "Name of insight type config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/config", +"type": "string" +}, +"revisionId": { +"description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Last time when the config was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1InsightTypeGenerationConfig": { +"description": "A configuration to customize the generation of insights. Eg, customizing the lookback period considered when generating a insight.", +"id": "GoogleCloudRecommenderV1beta1InsightTypeGenerationConfig", +"properties": { +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Parameters for this InsightTypeGenerationConfig. These configs can be used by or are applied to all subtypes.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1ListInsightTypesResponse": { +"description": "Response for the `ListInsightTypes` method. Next ID: 3", +"id": "GoogleCloudRecommenderV1beta1ListInsightTypesResponse", +"properties": { +"insightTypes": { +"description": "The set of recommenders available", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1InsightType" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1ListInsightsResponse": { +"description": "Response to the `ListInsights` method.", +"id": "GoogleCloudRecommenderV1beta1ListInsightsResponse", +"properties": { +"insights": { +"description": "The set of insights for the `parent` resource.", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1Insight" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be used to request the next page of results. This field is empty if there are no additional results.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1ListRecommendationsResponse": { +"description": "Response to the `ListRecommendations` method.", +"id": "GoogleCloudRecommenderV1beta1ListRecommendationsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be used to request the next page of results. This field is empty if there are no additional results.", +"type": "string" +}, +"recommendations": { +"description": "The set of recommendations for the `parent` resource.", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1Recommendation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1ListRecommendersResponse": { +"description": "Response for the `ListRecommender` method. Next ID: 3", +"id": "GoogleCloudRecommenderV1beta1ListRecommendersResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"recommenders": { +"description": "The set of recommenders available", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderType" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest": { +"description": "Request for the `MarkInsightAccepted` method.", +"id": "GoogleCloudRecommenderV1beta1MarkInsightAcceptedRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Insight. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. State properties user wish to include with this state. Full replace of the current state_metadata.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest": { +"description": "Request for the `MarkRecommendationClaimed` Method.", +"id": "GoogleCloudRecommenderV1beta1MarkRecommendationClaimedRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1MarkRecommendationDismissedRequest": { +"description": "Request for the `MarkRecommendationDismissed` Method.", +"id": "GoogleCloudRecommenderV1beta1MarkRecommendationDismissedRequest", +"properties": { +"etag": { +"description": "Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest": { +"description": "Request for the `MarkRecommendationFailed` Method.", +"id": "GoogleCloudRecommenderV1beta1MarkRecommendationFailedRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest": { +"description": "Request for the `MarkRecommendationSucceeded` Method.", +"id": "GoogleCloudRecommenderV1beta1MarkRecommendationSucceededRequest", +"properties": { +"etag": { +"description": "Required. Fingerprint of the Recommendation. Provides optimistic locking.", +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "State properties to include with this state. Overwrites any existing `state_metadata`. Keys must match the regex `/^a-z0-9{0,62}$/`. Values must match the regex `/^[a-zA-Z0-9_./-]{0,255}$/`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1Operation": { +"description": "Contains an operation for a resource loosely based on the JSON-PATCH format with support for: * Custom filters for describing partial array patch. * Extended path values for describing nested arrays. * Custom fields for describing the resource for which the operation is being described. * Allows extension to custom operations not natively supported by RFC6902. See https://tools.ietf.org/html/rfc6902 for details on the original RFC.", +"id": "GoogleCloudRecommenderV1beta1Operation", +"properties": { +"action": { +"description": "Type of this operation. Contains one of 'add', 'remove', 'replace', 'move', 'copy', 'test' and 'custom' operations. This field is case-insensitive and always populated.", +"type": "string" +}, +"path": { +"description": "Path to the target field being operated on. If the operation is at the resource level, then path should be \"/\". This field is always populated.", +"type": "string" +}, +"pathFilters": { +"additionalProperties": { +"type": "any" +}, +"description": "Set of filters to apply if `path` refers to array elements or nested array elements in order to narrow down to a single unique element that is being tested/modified. This is intended to be an exact match per filter. To perform advanced matching, use path_value_matchers. * Example: ``` { \"/versions/*/name\" : \"it-123\" \"/versions/*/targetSize/percent\": 20 } ``` * Example: ``` { \"/bindings/*/role\": \"roles/owner\" \"/bindings/*/condition\" : null } ``` * Example: ``` { \"/bindings/*/role\": \"roles/owner\" \"/bindings/*/members/*\" : [\"x@example.com\", \"y@example.com\"] } ``` When both path_filters and path_value_matchers are set, an implicit AND must be performed.", +"type": "object" +}, +"pathValueMatchers": { +"additionalProperties": { +"$ref": "GoogleCloudRecommenderV1beta1ValueMatcher" +}, +"description": "Similar to path_filters, this contains set of filters to apply if `path` field refers to array elements. This is meant to support value matching beyond exact match. To perform exact match, use path_filters. When both path_filters and path_value_matchers are set, an implicit AND must be performed.", +"type": "object" +}, +"resource": { +"description": "Contains the fully qualified resource name. This field is always populated. ex: //cloudresourcemanager.googleapis.com/projects/foo.", +"type": "string" +}, +"resourceType": { +"description": "Type of GCP resource being modified/tested. This field is always populated. Example: cloudresourcemanager.googleapis.com/Project, compute.googleapis.com/Instance", +"type": "string" +}, +"sourcePath": { +"description": "Can be set with action 'copy' or 'move' to indicate the source field within resource or source_resource, ignored if provided for other operation types.", +"type": "string" +}, +"sourceResource": { +"description": "Can be set with action 'copy' to copy resource configuration across different resources of the same type. Example: A resource clone can be done via action = 'copy', path = \"/\", from = \"/\", source_resource = and resource_name = . This field is empty for all other values of `action`.", +"type": "string" +}, +"value": { +"description": "Value for the `path` field. Will be set for actions:'add'/'replace'. Maybe set for action: 'test'. Either this or `value_matcher` will be set for 'test' operation. An exact match must be performed.", +"type": "any" +}, +"valueMatcher": { +"$ref": "GoogleCloudRecommenderV1beta1ValueMatcher", +"description": "Can be set for action 'test' for advanced matching for the value of 'path' field. Either this or `value` will be set for 'test' operation." +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1OperationGroup": { +"description": "Group of operations that need to be performed atomically.", +"id": "GoogleCloudRecommenderV1beta1OperationGroup", +"properties": { +"operations": { +"description": "List of operations across one or more resources that belong to this group. Loosely based on RFC6902 and should be performed in the order they appear.", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1Recommendation": { +"description": "A recommendation along with a suggested action. E.g., a rightsizing recommendation for an underutilized VM, IAM role recommendations, etc", +"id": "GoogleCloudRecommenderV1beta1Recommendation", +"properties": { +"additionalImpact": { +"description": "Optional set of additional impact that this recommendation may have when trying to optimize for the primary category. These may be positive or negative.", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1Impact" +}, +"type": "array" +}, +"associatedInsights": { +"description": "Insights that led to this recommendation.", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1RecommendationInsightReference" +}, +"type": "array" +}, +"content": { +"$ref": "GoogleCloudRecommenderV1beta1RecommendationContent", +"description": "Content of the recommendation describing recommended changes to resources." +}, +"description": { +"description": "Free-form human readable summary in English. The maximum length is 500 characters.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the Recommendation. Provides optimistic locking when updating states.", +"type": "string" +}, +"lastRefreshTime": { +"description": "Last time this recommendation was refreshed by the system that created it in the first place.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Identifier. Name of recommendation.", +"type": "string" +}, +"primaryImpact": { +"$ref": "GoogleCloudRecommenderV1beta1Impact", +"description": "The primary impact that this recommendation can have while trying to optimize for one category." +}, +"priority": { +"description": "Recommendation's priority.", +"enum": [ +"PRIORITY_UNSPECIFIED", +"P4", +"P3", +"P2", +"P1" +], +"enumDescriptions": [ +"Recommendation has unspecified priority.", +"Recommendation has P4 priority (lowest priority).", +"Recommendation has P3 priority (second lowest priority).", +"Recommendation has P2 priority (second highest priority).", +"Recommendation has P1 priority (highest priority)." +], +"type": "string" +}, +"recommenderSubtype": { +"description": "Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = \"google.iam.policy.Recommender\", recommender_subtype can be one of \"REMOVE_ROLE\"/\"REPLACE_ROLE\"", +"type": "string" +}, +"stateInfo": { +"$ref": "GoogleCloudRecommenderV1beta1RecommendationStateInfo", +"description": "Information for state. Contains state and metadata." +}, +"targetResources": { +"description": "Fully qualified resource names that this recommendation is targeting.", +"items": { +"type": "string" +}, +"type": "array" +}, +"xorGroupId": { +"description": "Corresponds to a mutually exclusive group ID within a recommender. A non-empty ID indicates that the recommendation belongs to a mutually exclusive group. This means that only one recommendation within the group is suggested to be applied.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1RecommendationContent": { +"description": "Contains what resources are changing and how they are changing.", +"id": "GoogleCloudRecommenderV1beta1RecommendationContent", +"properties": { +"operationGroups": { +"description": "Operations to one or more Google Cloud resources grouped in such a way that, all operations within one group are expected to be performed atomically and in an order.", +"items": { +"$ref": "GoogleCloudRecommenderV1beta1OperationGroup" +}, +"type": "array" +}, +"overview": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Condensed overview information about the recommendation.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1RecommendationInsightReference": { +"description": "Reference to an associated insight.", +"id": "GoogleCloudRecommenderV1beta1RecommendationInsightReference", +"properties": { +"insight": { +"description": "Insight resource name, e.g. projects/[PROJECT_NUMBER]/locations/[LOCATION]/insightTypes/[INSIGHT_TYPE_ID]/insights/[INSIGHT_ID]", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1RecommendationStateInfo": { +"description": "Information for state. Contains state and metadata.", +"id": "GoogleCloudRecommenderV1beta1RecommendationStateInfo", +"properties": { +"state": { +"description": "The state of the recommendation, Eg ACTIVE, SUCCEEDED, FAILED.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CLAIMED", +"SUCCEEDED", +"FAILED", +"DISMISSED" +], +"enumDescriptions": [ +"Default state. Don't use directly.", +"Recommendation is active and can be applied. Recommendations content can be updated by Google. ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in claimed state. Recommendations content is immutable and cannot be updated by Google. CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in succeeded state. Recommendations content is immutable and cannot be updated by Google. SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in failed state. Recommendations content is immutable and cannot be updated by Google. FAILED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in dismissed state. Recommendation content can be updated by Google. DISMISSED recommendations can be marked as ACTIVE." +], +"type": "string" +}, +"stateMetadata": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of metadata for the state, provided by user or automations systems.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1RecommenderConfig": { +"description": "Configuration for a Recommender.", +"id": "GoogleCloudRecommenderV1beta1RecommenderConfig", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Allows clients to store small amounts of arbitrary data. Annotations must follow the Kubernetes syntax. The total size of all keys and values combined is limited to 256k. Key can have 2 segments: prefix (optional) and name (required), separated by a slash (/). Prefix must be a DNS subdomain. Name must be 63 characters or less, begin and end with alphanumerics, with dashes (-), underscores (_), dots (.), and alphanumerics between.", +"type": "object" +}, +"displayName": { +"description": "A user-settable field to provide a human-readable name to be used in user interfaces.", +"type": "string" +}, +"etag": { +"description": "Fingerprint of the RecommenderConfig. Provides optimistic locking when updating.", +"type": "string" +}, +"name": { +"description": "Name of recommender config. Eg, projects/[PROJECT_NUMBER]/locations/[LOCATION]/recommenders/[RECOMMENDER_ID]/config", +"type": "string" +}, +"recommenderGenerationConfig": { +"$ref": "GoogleCloudRecommenderV1beta1RecommenderGenerationConfig", +"description": "RecommenderGenerationConfig which configures the Generation of recommendations for this recommender." +}, +"revisionId": { +"description": "Output only. Immutable. The revision ID of the config. A new revision is committed whenever the config is changed in any way. The format is an 8-character hexadecimal string.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Last time when the config was updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1RecommenderGenerationConfig": { +"description": "A Configuration to customize the generation of recommendations. Eg, customizing the lookback period considered when generating a recommendation.", +"id": "GoogleCloudRecommenderV1beta1RecommenderGenerationConfig", +"properties": { +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Parameters for this RecommenderGenerationConfig. These configs can be used by or are applied to all subtypes.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1RecommenderType": { +"description": "The type of a recommender.", +"id": "GoogleCloudRecommenderV1beta1RecommenderType", +"properties": { +"name": { +"description": "The recommender's name in format RecommenderTypes/{recommender_type} eg: recommenderTypes/google.iam.policy.Recommender", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1ReliabilityProjection": { +"description": "Contains information on the impact of a reliability recommendation.", +"id": "GoogleCloudRecommenderV1beta1ReliabilityProjection", +"properties": { +"details": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Per-recommender projection.", +"type": "object" +}, +"risks": { +"description": "Reliability risks mitigated by this recommendation.", +"items": { +"enum": [ +"RISK_TYPE_UNSPECIFIED", +"SERVICE_DISRUPTION", +"DATA_LOSS", +"ACCESS_DENY" +], +"enumDescriptions": [ +"Default unspecified risk. Don't use directly.", +"Potential service downtime.", +"Potential data loss.", +"Potential access denial. The service is still up but some or all clients can't access it." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1SecurityProjection": { +"description": "Contains various ways of describing the impact on Security.", +"id": "GoogleCloudRecommenderV1beta1SecurityProjection", +"properties": { +"details": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "This field can be used by the recommender to define details specific to security impact.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1SustainabilityProjection": { +"description": "Contains metadata about how much sustainability a recommendation can save or incur.", +"id": "GoogleCloudRecommenderV1beta1SustainabilityProjection", +"properties": { +"duration": { +"description": "Duration for which this sustanability applies.", +"format": "google-duration", +"type": "string" +}, +"kgCO2e": { +"description": "Carbon Footprint generated in kg of CO2 equivalent. Chose kg_c_o2e so that the name renders correctly in camelCase (kgCO2e).", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRecommenderV1beta1ValueMatcher": { +"description": "Contains various matching options for values for a GCP resource field.", +"id": "GoogleCloudRecommenderV1beta1ValueMatcher", +"properties": { +"matchesPattern": { +"description": "To be used for full regex matching. The regular expression is using the Google RE2 syntax (https://github.com/google/re2/wiki/Syntax), so to be used with RE2::FullMatch", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeMoney": { +"description": "Represents an amount of money with its currency type.", +"id": "GoogleTypeMoney", +"properties": { +"currencyCode": { +"description": "The three-letter currency code defined in ISO 4217.", +"type": "string" +}, +"nanos": { +"description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", +"format": "int32", +"type": "integer" +}, +"units": { +"description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Recommender API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/redis.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/redis.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..86e1a95331f849f4564045e0e7a0e56d705ba2cd --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/redis.v1.json @@ -0,0 +1,3334 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://redis.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Redis", +"description": "Creates and manages Redis instances on the Google Cloud Platform.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/memorystore/docs/redis/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "redis:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://redis.mtls.googleapis.com/", +"name": "redis", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "redis.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "redis.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"clusters": { +"methods": { +"create": { +"description": "Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", +"httpMethod": "POST", +"id": "redis.projects.locations.clusters.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"clusterId": { +"description": "Required. The logical name of the Redis cluster in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/clusters", +"request": { +"$ref": "Cluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a specific Redis cluster. Cluster stops serving and data is deleted.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", +"httpMethod": "DELETE", +"id": "redis.projects.locations.clusters.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a specific Redis cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", +"httpMethod": "GET", +"id": "redis.projects.locations.clusters.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Cluster" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getCertificateAuthority": { +"description": "Gets the details of certificate authority information for Redis cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/certificateAuthority", +"httpMethod": "GET", +"id": "redis.projects.locations.clusters.getCertificateAuthority", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis cluster certificate authority resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/certificateAuthority$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CertificateAuthority" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters", +"httpMethod": "GET", +"id": "redis.projects.locations.clusters.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The `next_page_token` value returned from a previous ListClusters request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/clusters", +"response": { +"$ref": "ListClustersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", +"httpMethod": "PATCH", +"id": "redis.projects.locations.clusters.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster: * `size_gb` * `replica_count`", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Cluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"instances": { +"methods": { +"create": { +"description": "Creates a Redis instance based on the specified tier and memory size. By default, the instance is accessible from the project's [default network](https://cloud.google.com/vpc/docs/vpc). The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"instanceId": { +"description": "Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the instance location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instances", +"request": { +"$ref": "Instance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a specific Redis instance. Instance stops serving and data is deleted.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "DELETE", +"id": "redis.projects.locations.instances.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"export": { +"description": "Export Redis instance data into a Redis RDB format file in Cloud Storage. Redis will continue serving during this operation. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:export", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.export", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:export", +"request": { +"$ref": "ExportInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"failover": { +"description": "Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:failover", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.failover", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:failover", +"request": { +"$ref": "FailoverInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a specific Redis instance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "GET", +"id": "redis.projects.locations.instances.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Instance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getAuthString": { +"description": "Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/authString", +"httpMethod": "GET", +"id": "redis.projects.locations.instances.getAuthString", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/authString", +"response": { +"$ref": "InstanceAuthString" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:import", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.import", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:import", +"request": { +"$ref": "ImportInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Redis instances owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "GET", +"id": "redis.projects.locations.instances.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more instances left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The `next_page_token` value returned from a previous ListInstances request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the instance location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instances", +"response": { +"$ref": "ListInstancesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the metadata and configuration of a specific Redis instance. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "PATCH", +"id": "redis.projects.locations.instances.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Instance: * `displayName` * `labels` * `memorySizeGb` * `redisConfig` * `replica_count`", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Instance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rescheduleMaintenance": { +"description": "Reschedule maintenance for a given instance in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:rescheduleMaintenance", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.rescheduleMaintenance", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:rescheduleMaintenance", +"request": { +"$ref": "RescheduleMaintenanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgrade": { +"description": "Upgrades Redis instance to the newer Redis version specified in the request.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:upgrade", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.upgrade", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:upgrade", +"request": { +"$ref": "UpgradeInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "redis.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "redis.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "redis.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "redis.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://redis.googleapis.com/", +"schemas": { +"AOFConfig": { +"description": "Configuration of the AOF based persistence.", +"id": "AOFConfig", +"properties": { +"appendFsync": { +"description": "Optional. fsync configuration.", +"enum": [ +"APPEND_FSYNC_UNSPECIFIED", +"NO", +"EVERYSEC", +"ALWAYS" +], +"enumDescriptions": [ +"Not set. Default: EVERYSEC", +"Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", +"fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", +"fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" +], +"type": "string" +} +}, +"type": "object" +}, +"AvailabilityConfiguration": { +"description": "Configuration for availability of database instance", +"id": "AvailabilityConfiguration", +"properties": { +"availabilityType": { +"description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", +"enum": [ +"AVAILABILITY_TYPE_UNSPECIFIED", +"ZONAL", +"REGIONAL", +"MULTI_REGIONAL", +"AVAILABILITY_TYPE_OTHER" +], +"enumDescriptions": [ +"", +"Zonal available instance.", +"Regional available instance.", +"Multi regional instance", +"For rest of the other category" +], +"type": "string" +}, +"externalReplicaConfigured": { +"type": "boolean" +}, +"promotableReplicaConfigured": { +"type": "boolean" +} +}, +"type": "object" +}, +"BackupConfiguration": { +"description": "Configuration for automatic backups", +"id": "BackupConfiguration", +"properties": { +"automatedBackupEnabled": { +"description": "Whether customer visible automated backups are enabled on the instance.", +"type": "boolean" +}, +"backupRetentionSettings": { +"$ref": "RetentionSettings", +"description": "Backup retention settings." +}, +"pointInTimeRecoveryEnabled": { +"description": "Whether point-in-time recovery is enabled. This is optional field, if the database service does not have this feature or metadata is not available in control plane, this can be omitted.", +"type": "boolean" +} +}, +"type": "object" +}, +"BackupRun": { +"description": "A backup run.", +"id": "BackupRun", +"properties": { +"endTime": { +"description": "The time the backup operation completed. REQUIRED", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "OperationError", +"description": "Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL" +}, +"startTime": { +"description": "The time the backup operation started. REQUIRED", +"format": "google-datetime", +"type": "string" +}, +"status": { +"description": "The status of this run. REQUIRED", +"enum": [ +"STATUS_UNSPECIFIED", +"SUCCESSFUL", +"FAILED" +], +"enumDescriptions": [ +"", +"The backup was successful.", +"The backup was unsuccessful." +], +"type": "string" +} +}, +"type": "object" +}, +"CertChain": { +"id": "CertChain", +"properties": { +"certificates": { +"description": "The certificates that form the CA chain, from leaf to root order.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CertificateAuthority": { +"description": "Redis cluster certificate authority", +"id": "CertificateAuthority", +"properties": { +"managedServerCa": { +"$ref": "ManagedCertificateAuthority" +}, +"name": { +"description": "Identifier. Unique name of the resource in this scope including project, location and cluster using the form: `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`", +"type": "string" +} +}, +"type": "object" +}, +"Cluster": { +"description": "A cluster instance.", +"id": "Cluster", +"properties": { +"authorizationMode": { +"description": "Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.", +"enum": [ +"AUTH_MODE_UNSPECIFIED", +"AUTH_MODE_IAM_AUTH", +"AUTH_MODE_DISABLED" +], +"enumDescriptions": [ +"Not set.", +"IAM basic authorization mode", +"Authorization disabled mode" +], +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp associated with the cluster creation request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deletionProtectionEnabled": { +"description": "Optional. The delete operation will fail when the value is set to true.", +"type": "boolean" +}, +"discoveryEndpoints": { +"description": "Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.", +"items": { +"$ref": "DiscoveryEndpoint" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", +"type": "string" +}, +"nodeType": { +"description": "Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node.", +"enum": [ +"NODE_TYPE_UNSPECIFIED", +"REDIS_SHARED_CORE_NANO", +"REDIS_HIGHMEM_MEDIUM", +"REDIS_HIGHMEM_XLARGE", +"REDIS_STANDARD_SMALL" +], +"enumDescriptions": [ +"", +"Redis shared core nano node_type.", +"Redis highmem medium node_type.", +"Redis highmem xlarge node_type.", +"Redis standard small node_type." +], +"type": "string" +}, +"persistenceConfig": { +"$ref": "ClusterPersistenceConfig", +"description": "Optional. Persistence config (RDB, AOF) for the cluster." +}, +"preciseSizeGb": { +"description": "Output only. Precise value of redis memory size in GB for the entire cluster.", +"format": "double", +"readOnly": true, +"type": "number" +}, +"pscConfigs": { +"description": "Required. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported.", +"items": { +"$ref": "PscConfig" +}, +"type": "array" +}, +"pscConnections": { +"description": "Output only. PSC connections for discovery of the cluster topology and accessing the cluster.", +"items": { +"$ref": "PscConnection" +}, +"readOnly": true, +"type": "array" +}, +"redisConfigs": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Key/Value pairs of customer overrides for mutable Redis Configs", +"type": "object" +}, +"replicaCount": { +"description": "Optional. The number of replica nodes per shard.", +"format": "int32", +"type": "integer" +}, +"shardCount": { +"description": "Required. Number of shards for the Redis cluster.", +"format": "int32", +"type": "integer" +}, +"sizeGb": { +"description": "Output only. Redis memory size in GB for the entire cluster rounded up to the next integer.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"state": { +"description": "Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"UPDATING", +"DELETING" +], +"enumDescriptions": [ +"Not set.", +"Redis cluster is being created.", +"Redis cluster has been created and is fully usable.", +"Redis cluster configuration is being updated.", +"Redis cluster is being deleted." +], +"readOnly": true, +"type": "string" +}, +"stateInfo": { +"$ref": "StateInfo", +"description": "Output only. Additional information about the current state of the cluster.", +"readOnly": true +}, +"transitEncryptionMode": { +"description": "Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.", +"enum": [ +"TRANSIT_ENCRYPTION_MODE_UNSPECIFIED", +"TRANSIT_ENCRYPTION_MODE_DISABLED", +"TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION" +], +"enumDescriptions": [ +"In-transit encryption not set.", +"In-transit encryption disabled.", +"Use server managed encryption for in-transit encryption." +], +"type": "string" +}, +"uid": { +"description": "Output only. System assigned, unique identifier for the cluster.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ClusterPersistenceConfig": { +"description": "Configuration of the persistence functionality.", +"id": "ClusterPersistenceConfig", +"properties": { +"aofConfig": { +"$ref": "AOFConfig", +"description": "Optional. AOF configuration. This field will be ignored if mode is not AOF." +}, +"mode": { +"description": "Optional. The mode of persistence.", +"enum": [ +"PERSISTENCE_MODE_UNSPECIFIED", +"DISABLED", +"RDB", +"AOF" +], +"enumDescriptions": [ +"Not set.", +"Persistence is disabled, and any snapshot data is deleted.", +"RDB based persistence is enabled.", +"AOF based persistence is enabled." +], +"type": "string" +}, +"rdbConfig": { +"$ref": "RDBConfig", +"description": "Optional. RDB configuration. This field will be ignored if mode is not RDB." +} +}, +"type": "object" +}, +"Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "Compliance", +"properties": { +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"CustomMetadataData": { +"description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", +"id": "CustomMetadataData", +"properties": { +"databaseMetadata": { +"items": { +"$ref": "DatabaseMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"DatabaseMetadata": { +"description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", +"id": "DatabaseMetadata", +"properties": { +"backupConfiguration": { +"$ref": "BackupConfiguration", +"description": "Backup configuration for this database" +}, +"backupRun": { +"$ref": "BackupRun", +"description": "Information about the last backup attempt for this database" +}, +"product": { +"$ref": "Product" +}, +"resourceId": { +"$ref": "DatabaseResourceId" +}, +"resourceName": { +"description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +} +}, +"type": "object" +}, +"DatabaseResourceFeed": { +"description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", +"id": "DatabaseResourceFeed", +"properties": { +"feedTimestamp": { +"description": "Required. Timestamp when feed is generated.", +"format": "google-datetime", +"type": "string" +}, +"feedType": { +"description": "Required. Type feed to be ingested into condor", +"enum": [ +"FEEDTYPE_UNSPECIFIED", +"RESOURCE_METADATA", +"OBSERVABILITY_DATA", +"SECURITY_FINDING_DATA", +"RECOMMENDATION_SIGNAL_DATA" +], +"enumDescriptions": [ +"", +"Database resource metadata feed from control plane", +"Database resource monitoring data", +"Database resource security health signal data", +"Database resource recommendation signal data" +], +"type": "string" +}, +"recommendationSignalData": { +"$ref": "DatabaseResourceRecommendationSignalData", +"description": "More feed data would be added in subsequent CLs" +}, +"resourceHealthSignalData": { +"$ref": "DatabaseResourceHealthSignalData" +}, +"resourceId": { +"$ref": "DatabaseResourceId", +"deprecated": true, +"description": "Primary key associated with the Resource. resource_id is available in individual feed level as well." +}, +"resourceMetadata": { +"$ref": "DatabaseResourceMetadata" +} +}, +"type": "object" +}, +"DatabaseResourceHealthSignalData": { +"description": "Common model for database resource health signal data.", +"id": "DatabaseResourceHealthSignalData", +"properties": { +"additionalMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Any other additional metadata", +"type": "object" +}, +"compliance": { +"description": "Industry standards associated with this signal; if this signal is an issue, that could be a violation of the associated industry standard(s). For example, AUTO_BACKUP_DISABLED signal is associated with CIS GCP 1.1, CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 and ISO-27001 compliance standards. If a database resource does not have automated backup enable, it will violate these following industry standards.", +"items": { +"$ref": "Compliance" +}, +"type": "array" +}, +"description": { +"description": "Description associated with signal", +"type": "string" +}, +"eventTime": { +"description": "Required. The last time at which the event described by this signal took place", +"format": "google-datetime", +"type": "string" +}, +"externalUri": { +"description": "The external-uri of the signal, using which more information about this signal can be obtained. In GCP, this will take user to SCC page to get more details about signals.", +"type": "string" +}, +"name": { +"description": "Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.", +"type": "string" +}, +"provider": { +"description": "Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", +"enum": [ +"PROVIDER_UNSPECIFIED", +"GCP", +"AWS", +"AZURE", +"ONPREM", +"SELFMANAGED", +"PROVIDER_OTHER" +], +"enumDescriptions": [ +"", +"Google cloud platform provider", +"Amazon web service", +"Azure web service", +"On-prem database resources.", +"Self-managed database provider. These are resources on a cloud platform, e.g., database resource installed in a GCE VM, but not a managed database service.", +"For the rest of the other categories. Other refers to the rest of other database service providers, this could be smaller cloud provider. This needs to be provided when the provider is known, but it is not present in the existing set of enum values." +], +"type": "string" +}, +"resourceContainer": { +"description": "Closest parent container of this resource. In GCP, 'container' refers to a Cloud Resource Manager project. It must be resource name of a Cloud Resource Manager project with the format of \"provider//\", such as \"projects/123\". For GCP provided resources, number should be project number.", +"type": "string" +}, +"resourceName": { +"description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +}, +"signalClass": { +"description": "Required. The class of the signal, such as if it's a THREAT or VULNERABILITY.", +"enum": [ +"CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"ERROR" +], +"enumDescriptions": [ +"Unspecified signal class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality." +], +"type": "string" +}, +"signalId": { +"description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", +"type": "string" +}, +"signalType": { +"description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", +"enum": [ +"SIGNAL_TYPE_UNSPECIFIED", +"SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER", +"SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS", +"SIGNAL_TYPE_NO_PROMOTABLE_REPLICA", +"SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY", +"SIGNAL_TYPE_SHORT_BACKUP_RETENTION", +"SIGNAL_TYPE_LAST_BACKUP_FAILED", +"SIGNAL_TYPE_LAST_BACKUP_OLD", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", +"SIGNAL_TYPE_VIOLATES_NIST_800_53", +"SIGNAL_TYPE_VIOLATES_ISO_27001", +"SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", +"SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", +"SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", +"SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_MOST_ERRORS", +"SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS", +"SIGNAL_TYPE_MINIMAL_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_STATISTICS_LOGGED", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS", +"SIGNAL_TYPE_LOGGING_QUERY_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES", +"SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED", +"SIGNAL_TYPE_USER_OPTIONS_CONFIGURED", +"SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS", +"SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS", +"SIGNAL_TYPE_NO_ROOT_PASSWORD", +"SIGNAL_TYPE_WEAK_ROOT_PASSWORD", +"SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED", +"SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED", +"SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING", +"SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS", +"SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS", +"SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED", +"SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO", +"SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS", +"SIGNAL_TYPE_DATABASE_NAMES_EXPOSED", +"SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED", +"SIGNAL_TYPE_PUBLIC_IP_ENABLED", +"SIGNAL_TYPE_IDLE", +"SIGNAL_TYPE_OVERPROVISIONED", +"SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES", +"SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES", +"SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION", +"SIGNAL_TYPE_UNDERPROVISIONED", +"SIGNAL_TYPE_OUT_OF_DISK", +"SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", +"SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", +"SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", +"SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", +"SIGNAL_TYPE_QUOTA_LIMIT", +"SIGNAL_TYPE_NO_PASSWORD_POLICY", +"SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" +], +"enumDeprecated": [ +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unspecified.", +"Represents if a resource is protected by automatic failover. Checks for resources that are configured to have redundancy within a region that enables automatic failover.", +"Represents if a group is replicating across regions. Checks for resources that are configured to have redundancy, and ongoing replication, across regions.", +"Represents if the resource is available in multiple zones or not.", +"Represents if a resource is available in multiple regions.", +"Represents if a resource has a promotable replica.", +"Represents if a resource has an automated backup policy.", +"Represents if a resources has a short backup retention period.", +"Represents if the last backup of a resource failed.", +"Represents if the last backup of a resource is older than some threshold value.", +"Represents if a resource violates CIS GCP Foundation 2.0.", +"Represents if a resource violates CIS GCP Foundation 1.3.", +"Represents if a resource violates CIS GCP Foundation 1.2.", +"Represents if a resource violates CIS GCP Foundation 1.1.", +"Represents if a resource violates CIS GCP Foundation 1.0.", +"Represents if a resource violates NIST 800-53.", +"Represents if a resource violates ISO-27001.", +"Represents if a resource violates PCI-DSS v3.2.1.", +"Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", +"Represents if the log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance is not set appropriately.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance does not have an appropriate severity level.", +"Represents if the log_min_messages database flag for a Cloud SQL for PostgreSQL instance is not set to warning or another recommended value.", +"Represents if the databaseFlags property of instance metadata for the log_executor_status field is set to on.", +"Represents if the log_hostname database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_statement database flag for a Cloud SQL for PostgreSQL instance is not set to DDL (all data definition statements).", +"Represents if the log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not set to \"0\". (NOTE: 0 = ON)", +"Represents if the user connections database flag for a Cloud SQL for SQL Server instance is configured.", +"Represents if the user options database flag for Cloud SQL SQL Server instance is configured or not.", +"Represents if a resource is exposed to public access.", +"Represents if a resources requires all incoming connections to use SSL or not.", +"Represents if a Cloud SQL database has a password configured for the root account or not.", +"Represents if a Cloud SQL database has a weak password configured for the root account.", +"Represents if a SQL database instance is not encrypted with customer-managed encryption keys (CMEK).", +"Represents if The contained database authentication database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if he external scripts enabled database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the local_infile database flag for a Cloud SQL for MySQL instance is not set to off.", +"Represents if the log_connections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_disconnections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_duration_statement database flag for a Cloud SQL for PostgreSQL instance is not set to -1.", +"Represents if the remote access database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the skip_show_database database flag for a Cloud SQL for MySQL instance is not set to on.", +"Represents if the 3625 (trace flag) database flag for a Cloud SQL for SQL Server instance is not set to on.", +"Represents if public IP is enabled.", +"Represents Idle instance helps to reduce costs.", +"Represents instances that are unnecessarily large for given workload.", +"Represents high number of concurrently opened tables.", +"Represents high table count close to SLA limit.", +"Represents high number of unvacuumed transactions", +"Represents need for more CPU and/or memory", +"Represents out of disk.", +"Represents server certificate is near expiry.", +"Represents database auditing is disabled.", +"Represents not restricted to authorized networks.", +"Represents violate org policy restrict public ip.", +"Cluster nearing quota limit", +"No password policy set on resources", +"Performance impact of connections settings", +"Performance impact of temporary tables settings", +"Performance impact of transaction logs settings", +"Performance impact of high joins without indexes" +], +"type": "string" +}, +"state": { +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"RESOLVED", +"MUTED" +], +"enumDescriptions": [ +"Unspecified state.", +"The signal requires attention and has not been addressed yet.", +"The signal has been fixed, triaged as a non-issue or otherwise addressed and is no longer active.", +"The signal has been muted." +], +"type": "string" +} +}, +"type": "object" +}, +"DatabaseResourceId": { +"description": "DatabaseResourceId will serve as primary key for any resource ingestion event.", +"id": "DatabaseResourceId", +"properties": { +"provider": { +"description": "Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", +"enum": [ +"PROVIDER_UNSPECIFIED", +"GCP", +"AWS", +"AZURE", +"ONPREM", +"SELFMANAGED", +"PROVIDER_OTHER" +], +"enumDescriptions": [ +"", +"Google cloud platform provider", +"Amazon web service", +"Azure web service", +"On-prem database resources.", +"Self-managed database provider. These are resources on a cloud platform, e.g., database resource installed in a GCE VM, but not a managed database service.", +"For the rest of the other categories. Other refers to the rest of other database service providers, this could be smaller cloud provider. This needs to be provided when the provider is known, but it is not present in the existing set of enum values." +], +"type": "string" +}, +"providerDescription": { +"description": "Optional. Needs to be used only when the provider is PROVIDER_OTHER.", +"type": "string" +}, +"resourceType": { +"description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", +"type": "string" +}, +"uniqueId": { +"description": "Required. A service-local token that distinguishes this resource from other resources within the same service.", +"type": "string" +} +}, +"type": "object" +}, +"DatabaseResourceMetadata": { +"description": "Common model for database resource instance metadata.", +"id": "DatabaseResourceMetadata", +"properties": { +"availabilityConfiguration": { +"$ref": "AvailabilityConfiguration", +"description": "Availability configuration for this instance" +}, +"backupConfiguration": { +"$ref": "BackupConfiguration", +"description": "Backup configuration for this instance" +}, +"backupRun": { +"$ref": "BackupRun", +"description": "Latest backup run information for this instance" +}, +"creationTime": { +"description": "The creation time of the resource, i.e. the time when resource is created and recorded in partner service.", +"format": "google-datetime", +"type": "string" +}, +"currentState": { +"description": "Current state of the instance.", +"enum": [ +"STATE_UNSPECIFIED", +"HEALTHY", +"UNHEALTHY", +"SUSPENDED", +"DELETED", +"STATE_OTHER" +], +"enumDescriptions": [ +"", +"The instance is running.", +"Instance being created, updated, deleted or under maintenance", +"When instance is suspended", +"Instance is deleted.", +"For rest of the other category" +], +"type": "string" +}, +"customMetadata": { +"$ref": "CustomMetadataData", +"description": "Any custom metadata associated with the resource" +}, +"entitlements": { +"description": "Entitlements associated with the resource", +"items": { +"$ref": "Entitlement" +}, +"type": "array" +}, +"expectedState": { +"description": "The state that the instance is expected to be in. For example, an instance state can transition to UNHEALTHY due to wrong patch update, while the expected state will remain at the HEALTHY.", +"enum": [ +"STATE_UNSPECIFIED", +"HEALTHY", +"UNHEALTHY", +"SUSPENDED", +"DELETED", +"STATE_OTHER" +], +"enumDescriptions": [ +"", +"The instance is running.", +"Instance being created, updated, deleted or under maintenance", +"When instance is suspended", +"Instance is deleted.", +"For rest of the other category" +], +"type": "string" +}, +"id": { +"$ref": "DatabaseResourceId", +"description": "Required. Unique identifier for a Database resource" +}, +"instanceType": { +"description": "The type of the instance. Specified at creation time.", +"enum": [ +"INSTANCE_TYPE_UNSPECIFIED", +"SUB_RESOURCE_TYPE_UNSPECIFIED", +"PRIMARY", +"SECONDARY", +"READ_REPLICA", +"OTHER", +"SUB_RESOURCE_TYPE_PRIMARY", +"SUB_RESOURCE_TYPE_SECONDARY", +"SUB_RESOURCE_TYPE_READ_REPLICA", +"SUB_RESOURCE_TYPE_OTHER" +], +"enumDeprecated": [ +true, +false, +true, +true, +true, +true, +false, +false, +false, +false +], +"enumDescriptions": [ +"", +"For rest of the other categories.", +"A regular primary database instance.", +"A cluster or an instance acting as a secondary.", +"An instance acting as a read-replica.", +"For rest of the other categories.", +"A regular primary database instance.", +"A cluster or an instance acting as a secondary.", +"An instance acting as a read-replica.", +"For rest of the other categories." +], +"type": "string" +}, +"location": { +"description": "The resource location. REQUIRED", +"type": "string" +}, +"primaryResourceId": { +"$ref": "DatabaseResourceId", +"description": "Identifier for this resource's immediate parent/primary resource if the current resource is a replica or derived form of another Database resource. Else it would be NULL. REQUIRED if the immediate parent exists when first time resource is getting ingested, otherwise optional." +}, +"product": { +"$ref": "Product", +"description": "The product this resource represents." +}, +"resourceContainer": { +"description": "Closest parent Cloud Resource Manager container of this resource. It must be resource name of a Cloud Resource Manager project with the format of \"/\", such as \"projects/123\". For GCP provided resources, number should be project number.", +"type": "string" +}, +"resourceName": { +"description": "Required. Different from DatabaseResourceId.unique_id, a resource name can be reused over time. That is, after a resource named \"ABC\" is deleted, the name \"ABC\" can be used to to create a new resource within the same source. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +}, +"updationTime": { +"description": "The time at which the resource was updated and recorded at partner service.", +"format": "google-datetime", +"type": "string" +}, +"userLabelSet": { +"$ref": "UserLabels", +"description": "User-provided labels associated with the resource" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"deprecated": true, +"description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", +"type": "object" +} +}, +"type": "object" +}, +"DatabaseResourceRecommendationSignalData": { +"description": "Common model for database resource recommendation signal data.", +"id": "DatabaseResourceRecommendationSignalData", +"properties": { +"additionalMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Optional. Any other additional metadata specific to recommendation", +"type": "object" +}, +"lastRefreshTime": { +"description": "Required. last time recommendationw as refreshed", +"format": "google-datetime", +"type": "string" +}, +"recommendationState": { +"description": "Required. Recommendation state", +"enum": [ +"UNSPECIFIED", +"ACTIVE", +"CLAIMED", +"SUCCEEDED", +"FAILED", +"DISMISSED" +], +"enumDescriptions": [ +"", +"Recommendation is active and can be applied. ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in claimed state. Recommendations content is immutable and cannot be updated by Google. CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in succeeded state. Recommendations content is immutable and cannot be updated by Google. SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in failed state. Recommendations content is immutable and cannot be updated by Google. FAILED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in dismissed state. Recommendation content can be updated by Google. DISMISSED recommendations can be marked as ACTIVE." +], +"type": "string" +}, +"recommender": { +"description": "Required. Name of recommendation. Examples: organizations/1234/locations/us-central1/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations/9876", +"type": "string" +}, +"recommenderId": { +"description": "Required. ID of recommender. Examples: \"google.cloudsql.instance.PerformanceRecommender\"", +"type": "string" +}, +"recommenderSubtype": { +"description": "Required. Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = \"google.cloudsql.instance.PerformanceRecommender\", recommender_subtype can be \"MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE\"/\"POSTGRES_HIGH_TRANSACTION_ID_UTILIZATION_BEST_PRACTICE\"", +"type": "string" +}, +"resourceName": { +"description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +}, +"signalType": { +"description": "Required. Type of signal, for example, `SIGNAL_TYPE_IDLE`, `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc.", +"enum": [ +"SIGNAL_TYPE_UNSPECIFIED", +"SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER", +"SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS", +"SIGNAL_TYPE_NO_PROMOTABLE_REPLICA", +"SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY", +"SIGNAL_TYPE_SHORT_BACKUP_RETENTION", +"SIGNAL_TYPE_LAST_BACKUP_FAILED", +"SIGNAL_TYPE_LAST_BACKUP_OLD", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", +"SIGNAL_TYPE_VIOLATES_NIST_800_53", +"SIGNAL_TYPE_VIOLATES_ISO_27001", +"SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", +"SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", +"SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", +"SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_MOST_ERRORS", +"SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS", +"SIGNAL_TYPE_MINIMAL_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_STATISTICS_LOGGED", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS", +"SIGNAL_TYPE_LOGGING_QUERY_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES", +"SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED", +"SIGNAL_TYPE_USER_OPTIONS_CONFIGURED", +"SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS", +"SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS", +"SIGNAL_TYPE_NO_ROOT_PASSWORD", +"SIGNAL_TYPE_WEAK_ROOT_PASSWORD", +"SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED", +"SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED", +"SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING", +"SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS", +"SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS", +"SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED", +"SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO", +"SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS", +"SIGNAL_TYPE_DATABASE_NAMES_EXPOSED", +"SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED", +"SIGNAL_TYPE_PUBLIC_IP_ENABLED", +"SIGNAL_TYPE_IDLE", +"SIGNAL_TYPE_OVERPROVISIONED", +"SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES", +"SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES", +"SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION", +"SIGNAL_TYPE_UNDERPROVISIONED", +"SIGNAL_TYPE_OUT_OF_DISK", +"SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", +"SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", +"SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", +"SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", +"SIGNAL_TYPE_QUOTA_LIMIT", +"SIGNAL_TYPE_NO_PASSWORD_POLICY", +"SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" +], +"enumDeprecated": [ +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unspecified.", +"Represents if a resource is protected by automatic failover. Checks for resources that are configured to have redundancy within a region that enables automatic failover.", +"Represents if a group is replicating across regions. Checks for resources that are configured to have redundancy, and ongoing replication, across regions.", +"Represents if the resource is available in multiple zones or not.", +"Represents if a resource is available in multiple regions.", +"Represents if a resource has a promotable replica.", +"Represents if a resource has an automated backup policy.", +"Represents if a resources has a short backup retention period.", +"Represents if the last backup of a resource failed.", +"Represents if the last backup of a resource is older than some threshold value.", +"Represents if a resource violates CIS GCP Foundation 2.0.", +"Represents if a resource violates CIS GCP Foundation 1.3.", +"Represents if a resource violates CIS GCP Foundation 1.2.", +"Represents if a resource violates CIS GCP Foundation 1.1.", +"Represents if a resource violates CIS GCP Foundation 1.0.", +"Represents if a resource violates NIST 800-53.", +"Represents if a resource violates ISO-27001.", +"Represents if a resource violates PCI-DSS v3.2.1.", +"Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", +"Represents if the log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance is not set appropriately.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance does not have an appropriate severity level.", +"Represents if the log_min_messages database flag for a Cloud SQL for PostgreSQL instance is not set to warning or another recommended value.", +"Represents if the databaseFlags property of instance metadata for the log_executor_status field is set to on.", +"Represents if the log_hostname database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_statement database flag for a Cloud SQL for PostgreSQL instance is not set to DDL (all data definition statements).", +"Represents if the log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not set to \"0\". (NOTE: 0 = ON)", +"Represents if the user connections database flag for a Cloud SQL for SQL Server instance is configured.", +"Represents if the user options database flag for Cloud SQL SQL Server instance is configured or not.", +"Represents if a resource is exposed to public access.", +"Represents if a resources requires all incoming connections to use SSL or not.", +"Represents if a Cloud SQL database has a password configured for the root account or not.", +"Represents if a Cloud SQL database has a weak password configured for the root account.", +"Represents if a SQL database instance is not encrypted with customer-managed encryption keys (CMEK).", +"Represents if The contained database authentication database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if he external scripts enabled database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the local_infile database flag for a Cloud SQL for MySQL instance is not set to off.", +"Represents if the log_connections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_disconnections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_duration_statement database flag for a Cloud SQL for PostgreSQL instance is not set to -1.", +"Represents if the remote access database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the skip_show_database database flag for a Cloud SQL for MySQL instance is not set to on.", +"Represents if the 3625 (trace flag) database flag for a Cloud SQL for SQL Server instance is not set to on.", +"Represents if public IP is enabled.", +"Represents Idle instance helps to reduce costs.", +"Represents instances that are unnecessarily large for given workload.", +"Represents high number of concurrently opened tables.", +"Represents high table count close to SLA limit.", +"Represents high number of unvacuumed transactions", +"Represents need for more CPU and/or memory", +"Represents out of disk.", +"Represents server certificate is near expiry.", +"Represents database auditing is disabled.", +"Represents not restricted to authorized networks.", +"Represents violate org policy restrict public ip.", +"Cluster nearing quota limit", +"No password policy set on resources", +"Performance impact of connections settings", +"Performance impact of temporary tables settings", +"Performance impact of transaction logs settings", +"Performance impact of high joins without indexes" +], +"type": "string" +} +}, +"type": "object" +}, +"DiscoveryEndpoint": { +"description": "Endpoints on each network, for Redis clients to connect to the cluster.", +"id": "DiscoveryEndpoint", +"properties": { +"address": { +"description": "Output only. Address of the exposed Redis endpoint used by clients to connect to the service. The address could be either IP or hostname.", +"readOnly": true, +"type": "string" +}, +"port": { +"description": "Output only. The port number of the exposed Redis endpoint.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"pscConfig": { +"$ref": "PscConfig", +"description": "Output only. Customer configuration for where the endpoint is created and accessed from.", +"readOnly": true +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Entitlement": { +"description": "Proto representing the access that a user has to a specific feature/service. NextId: 3.", +"id": "Entitlement", +"properties": { +"entitlementState": { +"description": "The current state of user's accessibility to a feature/benefit.", +"enum": [ +"ENTITLEMENT_STATE_UNSPECIFIED", +"ENTITLED", +"REVOKED" +], +"enumDescriptions": [ +"", +"User is entitled to a feature/benefit, but whether it has been successfully provisioned is decided by provisioning state.", +"User is entitled to a feature/benefit, but it was requested to be revoked. Whether the revoke has been successful is decided by provisioning state." +], +"type": "string" +}, +"type": { +"description": "An enum that represents the type of this entitlement.", +"enum": [ +"ENTITLEMENT_TYPE_UNSPECIFIED", +"DUET_AI", +"GEMINI" +], +"enumDeprecated": [ +false, +true, +false +], +"enumDescriptions": [ +"", +"The root entitlement representing Duet AI package ownership.", +"The root entitlement representing Gemini package ownership." +], +"type": "string" +} +}, +"type": "object" +}, +"ExportInstanceRequest": { +"description": "Request for Export.", +"id": "ExportInstanceRequest", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "Required. Specify data to be exported." +} +}, +"type": "object" +}, +"FailoverInstanceRequest": { +"description": "Request for Failover.", +"id": "FailoverInstanceRequest", +"properties": { +"dataProtectionMode": { +"description": "Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.", +"enum": [ +"DATA_PROTECTION_MODE_UNSPECIFIED", +"LIMITED_DATA_LOSS", +"FORCE_DATA_LOSS" +], +"enumDescriptions": [ +"Defaults to LIMITED_DATA_LOSS if a data protection mode is not specified.", +"Instance failover will be protected with data loss control. More specifically, the failover will only be performed if the current replication offset diff between primary and replica is under a certain threshold.", +"Instance failover will be performed without data loss control." +], +"type": "string" +} +}, +"type": "object" +}, +"GcsDestination": { +"description": "The Cloud Storage location for the output content", +"id": "GcsDestination", +"properties": { +"uri": { +"description": "Required. Data destination URI (e.g. 'gs://my_bucket/my_object'). Existing files will be overwritten.", +"type": "string" +} +}, +"type": "object" +}, +"GcsSource": { +"description": "The Cloud Storage location for the input content", +"id": "GcsSource", +"properties": { +"uri": { +"description": "Required. Source data URI. (e.g. 'gs://my_bucket/my_object').", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRedisV1LocationMetadata": { +"description": "This location metadata represents additional configuration options for a given location where a Redis instance may be created. All fields are output only. It is returned as content of the `google.cloud.location.Location.metadata` field.", +"id": "GoogleCloudRedisV1LocationMetadata", +"properties": { +"availableZones": { +"additionalProperties": { +"$ref": "GoogleCloudRedisV1ZoneMetadata" +}, +"description": "Output only. The set of available zones in the location. The map is keyed by the lowercase ID of each zone, as defined by GCE. These keys can be specified in `location_id` or `alternative_location_id` fields when creating a Redis instance.", +"readOnly": true, +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRedisV1OperationMetadata": { +"description": "Represents the v1 metadata of the long-running operation.", +"id": "GoogleCloudRedisV1OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version.", +"type": "string" +}, +"cancelRequested": { +"description": "Specifies if cancellation was requested for the operation.", +"type": "boolean" +}, +"createTime": { +"description": "Creation timestamp.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "End timestamp.", +"format": "google-datetime", +"type": "string" +}, +"statusDetail": { +"description": "Operation status details.", +"type": "string" +}, +"target": { +"description": "Operation target.", +"type": "string" +}, +"verb": { +"description": "Operation verb.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRedisV1ZoneMetadata": { +"description": "Defines specific information for a particular zone. Currently empty and reserved for future use only.", +"id": "GoogleCloudRedisV1ZoneMetadata", +"properties": {}, +"type": "object" +}, +"ImportInstanceRequest": { +"description": "Request for Import.", +"id": "ImportInstanceRequest", +"properties": { +"inputConfig": { +"$ref": "InputConfig", +"description": "Required. Specify data to be imported." +} +}, +"type": "object" +}, +"InputConfig": { +"description": "The input content", +"id": "InputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Google Cloud Storage location where input content is located." +} +}, +"type": "object" +}, +"Instance": { +"description": "A Memorystore for Redis instance.", +"id": "Instance", +"properties": { +"alternativeLocationId": { +"description": "Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.", +"type": "string" +}, +"authEnabled": { +"description": "Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to \"true\" AUTH is enabled on the instance. Default value is \"false\" meaning AUTH is disabled.", +"type": "boolean" +}, +"authorizedNetwork": { +"description": "Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.", +"type": "string" +}, +"availableMaintenanceVersions": { +"description": "Optional. The available maintenance versions that an instance could update to.", +"items": { +"type": "string" +}, +"type": "array" +}, +"connectMode": { +"description": "Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.", +"enum": [ +"CONNECT_MODE_UNSPECIFIED", +"DIRECT_PEERING", +"PRIVATE_SERVICE_ACCESS" +], +"enumDescriptions": [ +"Not set.", +"Connect via direct peering to the Memorystore for Redis hosted service.", +"Connect your Memorystore for Redis instance using Private Service Access. Private services access provides an IP address range for multiple Google Cloud services, including Memorystore." +], +"type": "string" +}, +"createTime": { +"description": "Output only. The time the instance was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"currentLocationId": { +"description": "Output only. The current zone where the Redis primary node is located. In basic tier, this will always be the same as [location_id]. In standard tier, this can be the zone of any node in the instance.", +"readOnly": true, +"type": "string" +}, +"customerManagedKey": { +"description": "Optional. The KMS key reference that the customer provides when trying to create the instance.", +"type": "string" +}, +"displayName": { +"description": "An arbitrary and optional user-provided name for the instance.", +"type": "string" +}, +"host": { +"description": "Output only. Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user provided metadata", +"type": "object" +}, +"locationId": { +"description": "Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.", +"type": "string" +}, +"maintenancePolicy": { +"$ref": "MaintenancePolicy", +"description": "Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time." +}, +"maintenanceSchedule": { +"$ref": "MaintenanceSchedule", +"description": "Output only. Date and time of upcoming maintenance events which have been scheduled.", +"readOnly": true +}, +"maintenanceVersion": { +"description": "Optional. The self service update maintenance version. The version is date based such as \"20210712_00_00\".", +"type": "string" +}, +"memorySizeGb": { +"description": "Required. Redis memory size in GiB.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.", +"type": "string" +}, +"nodes": { +"description": "Output only. Info per node.", +"items": { +"$ref": "NodeInfo" +}, +"readOnly": true, +"type": "array" +}, +"persistenceConfig": { +"$ref": "PersistenceConfig", +"description": "Optional. Persistence configuration parameters" +}, +"persistenceIamIdentity": { +"description": "Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is \"serviceAccount:\". The value may change over time for a given instance so should be checked before each import/export operation.", +"readOnly": true, +"type": "string" +}, +"port": { +"description": "Output only. The port number of the exposed Redis endpoint.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"readEndpoint": { +"description": "Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes will exhibit some lag behind the primary. Write requests must target 'host'.", +"readOnly": true, +"type": "string" +}, +"readEndpointPort": { +"description": "Output only. The port number of the exposed readonly redis endpoint. Standard tier only. Write requests should target 'port'.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"readReplicasMode": { +"description": "Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.", +"enum": [ +"READ_REPLICAS_MODE_UNSPECIFIED", +"READ_REPLICAS_DISABLED", +"READ_REPLICAS_ENABLED" +], +"enumDescriptions": [ +"If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED.", +"If disabled, read endpoint will not be provided and the instance cannot scale up or down the number of replicas.", +"If enabled, read endpoint will be provided and the instance can scale up and down the number of replicas. Not valid for basic tier." +], +"type": "string" +}, +"redisConfigs": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries", +"type": "object" +}, +"redisVersion": { +"description": "Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility * `REDIS_7_0` for Redis 7.0 compatibility", +"type": "string" +}, +"replicaCount": { +"description": "Optional. The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0.", +"format": "int32", +"type": "integer" +}, +"reservedIpRange": { +"description": "Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.", +"type": "string" +}, +"satisfiesPzi": { +"description": "Optional. Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"satisfiesPzs": { +"description": "Optional. Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"secondaryIpRange": { +"description": "Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or \"auto\". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or \"auto\".", +"type": "string" +}, +"serverCaCerts": { +"description": "Output only. List of server CA certificates for the instance.", +"items": { +"$ref": "TlsCertificate" +}, +"readOnly": true, +"type": "array" +}, +"state": { +"description": "Output only. The current state of this instance.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY", +"UPDATING", +"DELETING", +"REPAIRING", +"MAINTENANCE", +"IMPORTING", +"FAILING_OVER" +], +"enumDescriptions": [ +"Not set.", +"Redis instance is being created.", +"Redis instance has been created and is fully usable.", +"Redis instance configuration is being updated. Certain kinds of updates may cause the instance to become unusable while the update is in progress.", +"Redis instance is being deleted.", +"Redis instance is being repaired and may be unusable.", +"Maintenance is being performed on this Redis instance.", +"Redis instance is importing data (availability may be affected).", +"Redis instance is failing over (availability may be affected)." +], +"readOnly": true, +"type": "string" +}, +"statusMessage": { +"description": "Output only. Additional information about the current status of this instance, if available.", +"readOnly": true, +"type": "string" +}, +"suspensionReasons": { +"description": "Optional. reasons that causes instance in \"SUSPENDED\" state.", +"items": { +"enum": [ +"SUSPENSION_REASON_UNSPECIFIED", +"CUSTOMER_MANAGED_KEY_ISSUE" +], +"enumDescriptions": [ +"Not set.", +"Something wrong with the CMEK key provided by customer." +], +"type": "string" +}, +"type": "array" +}, +"tier": { +"description": "Required. The service tier of the instance.", +"enum": [ +"TIER_UNSPECIFIED", +"BASIC", +"STANDARD_HA" +], +"enumDescriptions": [ +"Not set.", +"BASIC tier: standalone instance", +"STANDARD_HA tier: highly available primary/replica instances" +], +"type": "string" +}, +"transitEncryptionMode": { +"description": "Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.", +"enum": [ +"TRANSIT_ENCRYPTION_MODE_UNSPECIFIED", +"SERVER_AUTHENTICATION", +"DISABLED" +], +"enumDescriptions": [ +"Not set.", +"Client to Server traffic encryption enabled with server authentication.", +"TLS is disabled for the instance." +], +"type": "string" +} +}, +"type": "object" +}, +"InstanceAuthString": { +"description": "Instance AUTH string details.", +"id": "InstanceAuthString", +"properties": { +"authString": { +"description": "AUTH string set on the instance.", +"type": "string" +} +}, +"type": "object" +}, +"ListClustersResponse": { +"description": "Response for ListClusters.", +"id": "ListClustersResponse", +"properties": { +"clusters": { +"description": "A list of Redis clusters in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is \"-\", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/clusters/`- and the `status` field set to ERROR and `status_message` field set to \"location not available for ListClusters\".", +"items": { +"$ref": "Cluster" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInstancesResponse": { +"description": "Response for ListInstances.", +"id": "ListInstancesResponse", +"properties": { +"instances": { +"description": "A list of Redis instances in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is \"-\", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/instances/`- and the `status` field set to ERROR and `status_message` field set to \"location not available for ListInstances\".", +"items": { +"$ref": "Instance" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "Resource ID for the region. For example: \"us-east1\".", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Output only. The set of available zones in the location. The map is keyed by the lowercase ID of each zone, as defined by Compute Engine. These keys can be specified in `location_id` or `alternative_location_id` fields when creating a Redis instance.", +"type": "object" +}, +"name": { +"description": "Full resource name for the region. For example: \"projects/example-project/locations/us-east1\".", +"type": "string" +} +}, +"type": "object" +}, +"MaintenancePolicy": { +"description": "Maintenance policy for an instance.", +"id": "MaintenancePolicy", +"properties": { +"createTime": { +"description": "Output only. The time when the policy was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time when the policy was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"weeklyMaintenanceWindow": { +"description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.", +"items": { +"$ref": "WeeklyMaintenanceWindow" +}, +"type": "array" +} +}, +"type": "object" +}, +"MaintenanceSchedule": { +"description": "Upcoming maintenance schedule. If no maintenance is scheduled, fields are not populated.", +"id": "MaintenanceSchedule", +"properties": { +"canReschedule": { +"deprecated": true, +"description": "If the scheduled maintenance can be rescheduled, default is true.", +"type": "boolean" +}, +"endTime": { +"description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"scheduleDeadlineTime": { +"description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"startTime": { +"description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ManagedCertificateAuthority": { +"id": "ManagedCertificateAuthority", +"properties": { +"caCerts": { +"description": "The PEM encoded CA certificate chains for redis managed server authentication", +"items": { +"$ref": "CertChain" +}, +"type": "array" +} +}, +"type": "object" +}, +"NodeInfo": { +"description": "Node specific properties.", +"id": "NodeInfo", +"properties": { +"id": { +"description": "Output only. Node identifying string. e.g. 'node-0', 'node-1'", +"readOnly": true, +"type": "string" +}, +"zone": { +"description": "Output only. Location of the node.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "{ `createTime`: The time the operation was created. `endTime`: The time the operation finished running. `target`: Server-defined resource path for the target of the operation. `verb`: Name of the verb executed by the operation. `statusDetail`: Human-readable status of the operation, if any. `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. `apiVersion`: API version used to start the operation. }", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationError": { +"description": "An error that occurred during a backup creation operation.", +"id": "OperationError", +"properties": { +"code": { +"description": "Identifies the specific error that occurred. REQUIRED", +"type": "string" +}, +"errorType": { +"enum": [ +"OPERATION_ERROR_TYPE_UNSPECIFIED", +"KMS_KEY_ERROR", +"DATABASE_ERROR", +"STOCKOUT_ERROR", +"CANCELLATION_ERROR", +"SQLSERVER_ERROR", +"INTERNAL_ERROR" +], +"enumDescriptions": [ +"UNSPECIFIED means product type is not known or available.", +"key destroyed, expired, not found, unreachable or permission denied.", +"Database is not accessible", +"The zone or region does not have sufficient resources to handle the request at the moment", +"User initiated cancellation", +"SQL server specific error", +"Any other internal error." +], +"type": "string" +}, +"message": { +"description": "Additional information about the error encountered. REQUIRED", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Pre-defined metadata fields.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OutputConfig": { +"description": "The output content", +"id": "OutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Google Cloud Storage destination for output content." +} +}, +"type": "object" +}, +"PersistenceConfig": { +"description": "Configuration of the persistence functionality.", +"id": "PersistenceConfig", +"properties": { +"persistenceMode": { +"description": "Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used.", +"enum": [ +"PERSISTENCE_MODE_UNSPECIFIED", +"DISABLED", +"RDB" +], +"enumDescriptions": [ +"Not set.", +"Persistence is disabled for the instance, and any existing snapshots are deleted.", +"RDB based Persistence is enabled." +], +"type": "string" +}, +"rdbNextSnapshotTime": { +"description": "Output only. The next time that a snapshot attempt is scheduled to occur.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"rdbSnapshotPeriod": { +"description": "Optional. Period between RDB snapshots. Snapshots will be attempted every period starting from the provided snapshot start time. For example, a start time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, 18:45, and 00:45 the next day, and so on. If not provided, TWENTY_FOUR_HOURS will be used as default.", +"enum": [ +"SNAPSHOT_PERIOD_UNSPECIFIED", +"ONE_HOUR", +"SIX_HOURS", +"TWELVE_HOURS", +"TWENTY_FOUR_HOURS" +], +"enumDescriptions": [ +"Not set.", +"Snapshot every 1 hour.", +"Snapshot every 6 hours.", +"Snapshot every 12 hours.", +"Snapshot every 24 hours." +], +"type": "string" +}, +"rdbSnapshotStartTime": { +"description": "Optional. Date and time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Product": { +"description": "Product specification for Condor resources.", +"id": "Product", +"properties": { +"engine": { +"description": "The specific engine that the underlying database is running.", +"enum": [ +"ENGINE_UNSPECIFIED", +"ENGINE_MYSQL", +"MYSQL", +"ENGINE_POSTGRES", +"POSTGRES", +"ENGINE_SQL_SERVER", +"SQL_SERVER", +"ENGINE_NATIVE", +"NATIVE", +"ENGINE_CLOUD_SPANNER_WITH_POSTGRES_DIALECT", +"ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", +"ENGINE_MEMORYSTORE_FOR_REDIS", +"ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", +"ENGINE_OTHER" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"UNSPECIFIED means engine type is not known or available.", +"MySQL binary running as an engine in the database instance.", +"MySQL binary running as engine in database instance.", +"Postgres binary running as engine in database instance.", +"Postgres binary running as engine in database instance.", +"SQLServer binary running as engine in database instance.", +"SQLServer binary running as engine in database instance.", +"Native database binary running as engine in instance.", +"Native database binary running as engine in instance.", +"Cloud Spanner with PostgreSQL dialect.", +"Cloud Spanner with Google SQL dialect.", +"Memorystore with Redis dialect.", +"Memorystore with Redis cluster dialect.", +"Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." +], +"type": "string" +}, +"type": { +"description": "Type of specific database product. It could be CloudSQL, AlloyDB etc..", +"enum": [ +"PRODUCT_TYPE_UNSPECIFIED", +"PRODUCT_TYPE_CLOUD_SQL", +"CLOUD_SQL", +"PRODUCT_TYPE_ALLOYDB", +"ALLOYDB", +"PRODUCT_TYPE_SPANNER", +"PRODUCT_TYPE_ON_PREM", +"ON_PREM", +"PRODUCT_TYPE_MEMORYSTORE", +"PRODUCT_TYPE_OTHER" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +false, +true, +false, +false +], +"enumDescriptions": [ +"UNSPECIFIED means product type is not known or available.", +"Cloud SQL product area in GCP", +"Cloud SQL product area in GCP", +"AlloyDB product area in GCP", +"AlloyDB product area in GCP", +"Spanner product area in GCP", +"On premises database product.", +"On premises database product.", +"Memorystore product area in GCP", +"Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." +], +"type": "string" +}, +"version": { +"description": "Version of the underlying database engine. Example values: For MySQL, it could be \"8.0\", \"5.7\" etc.. For Postgres, it could be \"14\", \"15\" etc..", +"type": "string" +} +}, +"type": "object" +}, +"PscConfig": { +"id": "PscConfig", +"properties": { +"network": { +"description": "Required. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{network_project}/global/networks/{network_id}.", +"type": "string" +} +}, +"type": "object" +}, +"PscConnection": { +"description": "Details of consumer resources in a PSC connection.", +"id": "PscConnection", +"properties": { +"address": { +"description": "Output only. The IP allocated on the consumer network for the PSC forwarding rule.", +"readOnly": true, +"type": "string" +}, +"forwardingRule": { +"description": "Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.", +"readOnly": true, +"type": "string" +}, +"network": { +"description": "The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.", +"type": "string" +}, +"projectId": { +"description": "Output only. The consumer project_id where the forwarding rule is created from.", +"readOnly": true, +"type": "string" +}, +"pscConnectionId": { +"description": "Output only. The PSC connection id of the forwarding rule connected to the service attachment.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RDBConfig": { +"description": "Configuration of the RDB based persistence.", +"id": "RDBConfig", +"properties": { +"rdbSnapshotPeriod": { +"description": "Optional. Period between RDB snapshots.", +"enum": [ +"SNAPSHOT_PERIOD_UNSPECIFIED", +"ONE_HOUR", +"SIX_HOURS", +"TWELVE_HOURS", +"TWENTY_FOUR_HOURS" +], +"enumDescriptions": [ +"Not set.", +"One hour.", +"Six hours.", +"Twelve hours.", +"Twenty four hours." +], +"type": "string" +}, +"rdbSnapshotStartTime": { +"description": "Optional. The time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ReconciliationOperationMetadata": { +"description": "Operation metadata returned by the CLH during resource state reconciliation.", +"id": "ReconciliationOperationMetadata", +"properties": { +"deleteResource": { +"deprecated": true, +"description": "DEPRECATED. Use exclusive_action instead.", +"type": "boolean" +}, +"exclusiveAction": { +"description": "Excluisive action returned by the CLH.", +"enum": [ +"UNKNOWN_REPAIR_ACTION", +"DELETE", +"RETRY" +], +"enumDeprecated": [ +false, +true, +false +], +"enumDescriptions": [ +"Unknown repair action.", +"The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", +"This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." +], +"type": "string" +} +}, +"type": "object" +}, +"RescheduleMaintenanceRequest": { +"description": "Request for RescheduleMaintenance.", +"id": "RescheduleMaintenanceRequest", +"properties": { +"rescheduleType": { +"description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", +"enum": [ +"RESCHEDULE_TYPE_UNSPECIFIED", +"IMMEDIATE", +"NEXT_AVAILABLE_WINDOW", +"SPECIFIC_TIME" +], +"enumDescriptions": [ +"Not set.", +"If the user wants to schedule the maintenance to happen now.", +"If the user wants to use the existing maintenance policy to find the next available window.", +"If the user wants to reschedule the maintenance to a specific time." +], +"type": "string" +}, +"scheduleTime": { +"description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RetentionSettings": { +"id": "RetentionSettings", +"properties": { +"quantityBasedRetention": { +"format": "int32", +"type": "integer" +}, +"retentionUnit": { +"description": "The unit that 'retained_backups' represents.", +"enum": [ +"RETENTION_UNIT_UNSPECIFIED", +"COUNT", +"TIME", +"RETENTION_UNIT_OTHER" +], +"enumDescriptions": [ +"Backup retention unit is unspecified, will be treated as COUNT.", +"Retention will be by count, eg. \"retain the most recent 7 backups\".", +"Retention will be by Time, eg. \"retain the last 7 days backups\".", +"For rest of the other category" +], +"type": "string" +}, +"timeBasedRetention": { +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"StateInfo": { +"description": "Represents additional information about the state of the cluster.", +"id": "StateInfo", +"properties": { +"updateInfo": { +"$ref": "UpdateInfo", +"description": "Describes ongoing update on the cluster when cluster state is UPDATING." +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TlsCertificate": { +"description": "TlsCertificate Resource", +"id": "TlsCertificate", +"properties": { +"cert": { +"description": "PEM representation.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2020-05-18T00:00:00.094Z`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2020-05-18T00:00:00.094Z`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"serialNumber": { +"description": "Serial number, as extracted from the certificate.", +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 Fingerprint of the certificate.", +"type": "string" +} +}, +"type": "object" +}, +"UpdateInfo": { +"description": "Represents information about an updating cluster.", +"id": "UpdateInfo", +"properties": { +"targetReplicaCount": { +"description": "Target number of replica nodes per shard.", +"format": "int32", +"type": "integer" +}, +"targetShardCount": { +"description": "Target number of shards for redis cluster", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UpgradeInstanceRequest": { +"description": "Request for UpgradeInstance.", +"id": "UpgradeInstanceRequest", +"properties": { +"redisVersion": { +"description": "Required. Specifies the target version of Redis software to upgrade to.", +"type": "string" +} +}, +"type": "object" +}, +"UserLabels": { +"description": "Message type for storing user labels. User labels are used to tag App Engine resources, allowing users to search for resources matching a set of labels and to aggregate usage data by labels.", +"id": "UserLabels", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +} +}, +"type": "object" +}, +"WeeklyMaintenanceWindow": { +"description": "Time window in which disruptive maintenance updates occur. Non-disruptive updates can occur inside or outside this window.", +"id": "WeeklyMaintenanceWindow", +"properties": { +"day": { +"description": "Required. The day of week that maintenance updates occur.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +}, +"duration": { +"description": "Output only. Duration of the maintenance window. The current window is fixed at 1 hour.", +"format": "google-duration", +"readOnly": true, +"type": "string" +}, +"startTime": { +"$ref": "TimeOfDay", +"description": "Required. Start time of the window in UTC time." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Cloud Memorystore for Redis API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/redis.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/redis.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..bc3ee255c87473034b1c0c85a6b5973f3b3a9db6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/redis.v1beta1.json @@ -0,0 +1,3341 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://redis.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Redis", +"description": "Creates and manages Redis instances on the Google Cloud Platform.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/memorystore/docs/redis/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "redis:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://redis.mtls.googleapis.com/", +"name": "redis", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "redis.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "redis.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"clusters": { +"methods": { +"create": { +"description": "Creates a Redis cluster based on the specified properties. The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis cluster will be fully functional. The completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", +"httpMethod": "POST", +"id": "redis.projects.locations.clusters.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"clusterId": { +"description": "Required. The logical name of the Redis cluster in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-63 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/clusters", +"request": { +"$ref": "Cluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a specific Redis cluster. Cluster stops serving and data is deleted.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", +"httpMethod": "DELETE", +"id": "redis.projects.locations.clusters.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a specific Redis cluster.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", +"httpMethod": "GET", +"id": "redis.projects.locations.clusters.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis cluster resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Cluster" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getCertificateAuthority": { +"description": "Gets the details of certificate authority information for Redis cluster.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/certificateAuthority", +"httpMethod": "GET", +"id": "redis.projects.locations.clusters.getCertificateAuthority", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis cluster certificate authority resource name using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}/certificateAuthority` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/certificateAuthority$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "CertificateAuthority" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Redis clusters owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters", +"httpMethod": "GET", +"id": "redis.projects.locations.clusters.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more clusters left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The `next_page_token` value returned from a previous ListClusters request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the cluster location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/clusters", +"response": { +"$ref": "ListClustersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the metadata and configuration of a specific Redis cluster. Completed longrunning.Operation will contain the new cluster object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}", +"httpMethod": "PATCH", +"id": "redis.projects.locations.clusters.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Cluster: * `size_gb` * `replica_count`", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Cluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"instances": { +"methods": { +"create": { +"description": "Creates a Redis instance based on the specified tier and memory size. By default, the instance is accessible from the project's [default network](https://cloud.google.com/vpc/docs/vpc). The creation is executed asynchronously and callers may check the returned operation to track its progress. Once the operation is completed the Redis instance will be fully functional. The completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"instanceId": { +"description": "Required. The logical name of the Redis instance in the customer project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project / location", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the instance location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/instances", +"request": { +"$ref": "Instance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a specific Redis instance. Instance stops serving and data is deleted.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "DELETE", +"id": "redis.projects.locations.instances.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"export": { +"description": "Export Redis instance data into a Redis RDB format file in Cloud Storage. Redis will continue serving during this operation. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:export", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.export", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:export", +"request": { +"$ref": "ExportInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"failover": { +"description": "Initiates a failover of the primary node to current replica node for a specific STANDARD tier Cloud Memorystore for Redis instance.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:failover", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.failover", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:failover", +"request": { +"$ref": "FailoverInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a specific Redis instance.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "GET", +"id": "redis.projects.locations.instances.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Instance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getAuthString": { +"description": "Gets the AUTH string for a Redis instance. If AUTH is not enabled for the instance the response will be empty. This information is not included in the details returned to GetInstance.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}/authString", +"httpMethod": "GET", +"id": "redis.projects.locations.instances.getAuthString", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}/authString", +"response": { +"$ref": "InstanceAuthString" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. Redis may stop serving during this operation. Instance state will be IMPORTING for entire operation. When complete, the instance will contain only data from the imported file. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:import", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.import", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:import", +"request": { +"$ref": "ImportInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Redis instances owned by a project in either the specified location (region) or all locations. The location should have the following format: * `projects/{project_id}/locations/{location_id}` If `location_id` is specified as `-` (wildcard), then all regions available to the project are queried, and the results are aggregated.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances", +"httpMethod": "GET", +"id": "redis.projects.locations.instances.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return. If not specified, a default value of 1000 will be used by the service. Regardless of the page_size value, the response may include a partial list and a caller should only rely on response's `next_page_token` to determine if there are more instances left to be queried.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The `next_page_token` value returned from a previous ListInstances request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the instance location using the form: `projects/{project_id}/locations/{location_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/instances", +"response": { +"$ref": "ListInstancesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the metadata and configuration of a specific Redis instance. Completed longrunning.Operation will contain the new instance object in the response field. The returned operation is automatically deleted after a few hours, so there is no need to call DeleteOperation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}", +"httpMethod": "PATCH", +"id": "redis.projects.locations.instances.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field may only include these fields from Instance: * `displayName` * `labels` * `memorySizeGb` * `redisConfig` * `replica_count`", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Instance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rescheduleMaintenance": { +"description": "Reschedule maintenance for a given instance in a given project and location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:rescheduleMaintenance", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.rescheduleMaintenance", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:rescheduleMaintenance", +"request": { +"$ref": "RescheduleMaintenanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgrade": { +"description": "Upgrades Redis instance to the newer Redis version specified in the request.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/instances/{instancesId}:upgrade", +"httpMethod": "POST", +"id": "redis.projects.locations.instances.upgrade", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Redis instance resource name using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` where `location_id` refers to a GCP region.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:upgrade", +"request": { +"$ref": "UpgradeInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "redis.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "redis.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "redis.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "redis.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://redis.googleapis.com/", +"schemas": { +"AOFConfig": { +"description": "Configuration of the AOF based persistence.", +"id": "AOFConfig", +"properties": { +"appendFsync": { +"description": "Optional. fsync configuration.", +"enum": [ +"APPEND_FSYNC_UNSPECIFIED", +"NO", +"EVERYSEC", +"ALWAYS" +], +"enumDescriptions": [ +"Not set. Default: EVERYSEC", +"Never fsync. Normally Linux will flush data every 30 seconds with this configuration, but it's up to the kernel's exact tuning.", +"fsync every second. Fast enough, and you may lose 1 second of data if there is a disaster", +"fsync every time new commands are appended to the AOF. It has the best data loss protection at the cost of performance" +], +"type": "string" +} +}, +"type": "object" +}, +"AvailabilityConfiguration": { +"description": "Configuration for availability of database instance", +"id": "AvailabilityConfiguration", +"properties": { +"availabilityType": { +"description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available).", +"enum": [ +"AVAILABILITY_TYPE_UNSPECIFIED", +"ZONAL", +"REGIONAL", +"MULTI_REGIONAL", +"AVAILABILITY_TYPE_OTHER" +], +"enumDescriptions": [ +"", +"Zonal available instance.", +"Regional available instance.", +"Multi regional instance", +"For rest of the other category" +], +"type": "string" +}, +"externalReplicaConfigured": { +"type": "boolean" +}, +"promotableReplicaConfigured": { +"type": "boolean" +} +}, +"type": "object" +}, +"BackupConfiguration": { +"description": "Configuration for automatic backups", +"id": "BackupConfiguration", +"properties": { +"automatedBackupEnabled": { +"description": "Whether customer visible automated backups are enabled on the instance.", +"type": "boolean" +}, +"backupRetentionSettings": { +"$ref": "RetentionSettings", +"description": "Backup retention settings." +}, +"pointInTimeRecoveryEnabled": { +"description": "Whether point-in-time recovery is enabled. This is optional field, if the database service does not have this feature or metadata is not available in control plane, this can be omitted.", +"type": "boolean" +} +}, +"type": "object" +}, +"BackupRun": { +"description": "A backup run.", +"id": "BackupRun", +"properties": { +"endTime": { +"description": "The time the backup operation completed. REQUIRED", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "OperationError", +"description": "Information about why the backup operation failed. This is only present if the run has the FAILED status. OPTIONAL" +}, +"startTime": { +"description": "The time the backup operation started. REQUIRED", +"format": "google-datetime", +"type": "string" +}, +"status": { +"description": "The status of this run. REQUIRED", +"enum": [ +"STATUS_UNSPECIFIED", +"SUCCESSFUL", +"FAILED" +], +"enumDescriptions": [ +"", +"The backup was successful.", +"The backup was unsuccessful." +], +"type": "string" +} +}, +"type": "object" +}, +"CertChain": { +"id": "CertChain", +"properties": { +"certificates": { +"description": "The certificates that form the CA chain, from leaf to root order.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CertificateAuthority": { +"description": "Redis cluster certificate authority", +"id": "CertificateAuthority", +"properties": { +"managedServerCa": { +"$ref": "ManagedCertificateAuthority" +}, +"name": { +"description": "Identifier. Unique name of the resource in this scope including project, location and cluster using the form: `projects/{project}/locations/{location}/clusters/{cluster}/certificateAuthority`", +"type": "string" +} +}, +"type": "object" +}, +"Cluster": { +"description": "A cluster instance.", +"id": "Cluster", +"properties": { +"authorizationMode": { +"description": "Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.", +"enum": [ +"AUTH_MODE_UNSPECIFIED", +"AUTH_MODE_IAM_AUTH", +"AUTH_MODE_DISABLED" +], +"enumDescriptions": [ +"Not set.", +"IAM basic authorization mode", +"Authorization disabled mode" +], +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp associated with the cluster creation request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deletionProtectionEnabled": { +"description": "Optional. The delete operation will fail when the value is set to true.", +"type": "boolean" +}, +"discoveryEndpoints": { +"description": "Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.", +"items": { +"$ref": "DiscoveryEndpoint" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/clusters/{cluster_id}`", +"type": "string" +}, +"nodeType": { +"description": "Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node.", +"enum": [ +"NODE_TYPE_UNSPECIFIED", +"REDIS_SHARED_CORE_NANO", +"REDIS_HIGHMEM_MEDIUM", +"REDIS_HIGHMEM_XLARGE", +"REDIS_STANDARD_SMALL" +], +"enumDescriptions": [ +"", +"Redis shared core nano node_type.", +"Redis highmem medium node_type.", +"Redis highmem xlarge node_type.", +"Redis standard small node_type." +], +"type": "string" +}, +"persistenceConfig": { +"$ref": "ClusterPersistenceConfig", +"description": "Optional. Persistence config (RDB, AOF) for the cluster." +}, +"preciseSizeGb": { +"description": "Output only. Precise value of redis memory size in GB for the entire cluster.", +"format": "double", +"readOnly": true, +"type": "number" +}, +"pscConfigs": { +"description": "Required. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported.", +"items": { +"$ref": "PscConfig" +}, +"type": "array" +}, +"pscConnections": { +"description": "Output only. PSC connections for discovery of the cluster topology and accessing the cluster.", +"items": { +"$ref": "PscConnection" +}, +"readOnly": true, +"type": "array" +}, +"redisConfigs": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Key/Value pairs of customer overrides for mutable Redis Configs", +"type": "object" +}, +"replicaCount": { +"description": "Optional. The number of replica nodes per shard.", +"format": "int32", +"type": "integer" +}, +"shardCount": { +"description": "Required. Number of shards for the Redis cluster.", +"format": "int32", +"type": "integer" +}, +"sizeGb": { +"description": "Output only. Redis memory size in GB for the entire cluster rounded up to the next integer.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"state": { +"description": "Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"UPDATING", +"DELETING" +], +"enumDescriptions": [ +"Not set.", +"Redis cluster is being created.", +"Redis cluster has been created and is fully usable.", +"Redis cluster configuration is being updated.", +"Redis cluster is being deleted." +], +"readOnly": true, +"type": "string" +}, +"stateInfo": { +"$ref": "StateInfo", +"description": "Output only. Additional information about the current state of the cluster.", +"readOnly": true +}, +"transitEncryptionMode": { +"description": "Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.", +"enum": [ +"TRANSIT_ENCRYPTION_MODE_UNSPECIFIED", +"TRANSIT_ENCRYPTION_MODE_DISABLED", +"TRANSIT_ENCRYPTION_MODE_SERVER_AUTHENTICATION" +], +"enumDescriptions": [ +"In-transit encryption not set.", +"In-transit encryption disabled.", +"Use server managed encryption for in-transit encryption." +], +"type": "string" +}, +"uid": { +"description": "Output only. System assigned, unique identifier for the cluster.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ClusterPersistenceConfig": { +"description": "Configuration of the persistence functionality.", +"id": "ClusterPersistenceConfig", +"properties": { +"aofConfig": { +"$ref": "AOFConfig", +"description": "Optional. AOF configuration. This field will be ignored if mode is not AOF." +}, +"mode": { +"description": "Optional. The mode of persistence.", +"enum": [ +"PERSISTENCE_MODE_UNSPECIFIED", +"DISABLED", +"RDB", +"AOF" +], +"enumDescriptions": [ +"Not set.", +"Persistence is disabled, and any snapshot data is deleted.", +"RDB based persistence is enabled.", +"AOF based persistence is enabled." +], +"type": "string" +}, +"rdbConfig": { +"$ref": "RDBConfig", +"description": "Optional. RDB configuration. This field will be ignored if mode is not RDB." +} +}, +"type": "object" +}, +"Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "Compliance", +"properties": { +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"CustomMetadataData": { +"description": "Any custom metadata associated with the resource. i.e. A spanner instance can have multiple databases with its own unique metadata. Information for these individual databases can be captured in custom metadata data", +"id": "CustomMetadataData", +"properties": { +"databaseMetadata": { +"items": { +"$ref": "DatabaseMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"DatabaseMetadata": { +"description": "Metadata for individual databases created in an instance. i.e. spanner instance can have multiple databases with unique configuration settings.", +"id": "DatabaseMetadata", +"properties": { +"backupConfiguration": { +"$ref": "BackupConfiguration", +"description": "Backup configuration for this database" +}, +"backupRun": { +"$ref": "BackupRun", +"description": "Information about the last backup attempt for this database" +}, +"product": { +"$ref": "Product" +}, +"resourceId": { +"$ref": "DatabaseResourceId" +}, +"resourceName": { +"description": "Required. Database name. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +} +}, +"type": "object" +}, +"DatabaseResourceFeed": { +"description": "DatabaseResourceFeed is the top level proto to be used to ingest different database resource level events into Condor platform.", +"id": "DatabaseResourceFeed", +"properties": { +"feedTimestamp": { +"description": "Required. Timestamp when feed is generated.", +"format": "google-datetime", +"type": "string" +}, +"feedType": { +"description": "Required. Type feed to be ingested into condor", +"enum": [ +"FEEDTYPE_UNSPECIFIED", +"RESOURCE_METADATA", +"OBSERVABILITY_DATA", +"SECURITY_FINDING_DATA", +"RECOMMENDATION_SIGNAL_DATA" +], +"enumDescriptions": [ +"", +"Database resource metadata feed from control plane", +"Database resource monitoring data", +"Database resource security health signal data", +"Database resource recommendation signal data" +], +"type": "string" +}, +"recommendationSignalData": { +"$ref": "DatabaseResourceRecommendationSignalData", +"description": "More feed data would be added in subsequent CLs" +}, +"resourceHealthSignalData": { +"$ref": "DatabaseResourceHealthSignalData" +}, +"resourceId": { +"$ref": "DatabaseResourceId", +"deprecated": true, +"description": "Primary key associated with the Resource. resource_id is available in individual feed level as well." +}, +"resourceMetadata": { +"$ref": "DatabaseResourceMetadata" +} +}, +"type": "object" +}, +"DatabaseResourceHealthSignalData": { +"description": "Common model for database resource health signal data.", +"id": "DatabaseResourceHealthSignalData", +"properties": { +"additionalMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Any other additional metadata", +"type": "object" +}, +"compliance": { +"description": "Industry standards associated with this signal; if this signal is an issue, that could be a violation of the associated industry standard(s). For example, AUTO_BACKUP_DISABLED signal is associated with CIS GCP 1.1, CIS GCP 1.2, CIS GCP 1.3, NIST 800-53 and ISO-27001 compliance standards. If a database resource does not have automated backup enable, it will violate these following industry standards.", +"items": { +"$ref": "Compliance" +}, +"type": "array" +}, +"description": { +"description": "Description associated with signal", +"type": "string" +}, +"eventTime": { +"description": "Required. The last time at which the event described by this signal took place", +"format": "google-datetime", +"type": "string" +}, +"externalUri": { +"description": "The external-uri of the signal, using which more information about this signal can be obtained. In GCP, this will take user to SCC page to get more details about signals.", +"type": "string" +}, +"name": { +"description": "Required. The name of the signal, ex: PUBLIC_SQL_INSTANCE, SQL_LOG_ERROR_VERBOSITY etc.", +"type": "string" +}, +"provider": { +"description": "Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", +"enum": [ +"PROVIDER_UNSPECIFIED", +"GCP", +"AWS", +"AZURE", +"ONPREM", +"SELFMANAGED", +"PROVIDER_OTHER" +], +"enumDescriptions": [ +"", +"Google cloud platform provider", +"Amazon web service", +"Azure web service", +"On-prem database resources.", +"Self-managed database provider. These are resources on a cloud platform, e.g., database resource installed in a GCE VM, but not a managed database service.", +"For the rest of the other categories. Other refers to the rest of other database service providers, this could be smaller cloud provider. This needs to be provided when the provider is known, but it is not present in the existing set of enum values." +], +"type": "string" +}, +"resourceContainer": { +"description": "Closest parent container of this resource. In GCP, 'container' refers to a Cloud Resource Manager project. It must be resource name of a Cloud Resource Manager project with the format of \"provider//\", such as \"projects/123\". For GCP provided resources, number should be project number.", +"type": "string" +}, +"resourceName": { +"description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +}, +"signalClass": { +"description": "Required. The class of the signal, such as if it's a THREAT or VULNERABILITY.", +"enum": [ +"CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"ERROR" +], +"enumDescriptions": [ +"Unspecified signal class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality." +], +"type": "string" +}, +"signalId": { +"description": "Required. Unique identifier for the signal. This is an unique id which would be mainatined by partner to identify a signal.", +"type": "string" +}, +"signalType": { +"description": "Required. Type of signal, for example, `AVAILABLE_IN_MULTIPLE_ZONES`, `LOGGING_MOST_ERRORS`, etc.", +"enum": [ +"SIGNAL_TYPE_UNSPECIFIED", +"SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER", +"SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS", +"SIGNAL_TYPE_NO_PROMOTABLE_REPLICA", +"SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY", +"SIGNAL_TYPE_SHORT_BACKUP_RETENTION", +"SIGNAL_TYPE_LAST_BACKUP_FAILED", +"SIGNAL_TYPE_LAST_BACKUP_OLD", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", +"SIGNAL_TYPE_VIOLATES_NIST_800_53", +"SIGNAL_TYPE_VIOLATES_ISO_27001", +"SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", +"SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", +"SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", +"SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_MOST_ERRORS", +"SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS", +"SIGNAL_TYPE_MINIMAL_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_STATISTICS_LOGGED", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS", +"SIGNAL_TYPE_LOGGING_QUERY_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES", +"SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED", +"SIGNAL_TYPE_USER_OPTIONS_CONFIGURED", +"SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS", +"SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS", +"SIGNAL_TYPE_NO_ROOT_PASSWORD", +"SIGNAL_TYPE_WEAK_ROOT_PASSWORD", +"SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED", +"SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED", +"SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING", +"SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS", +"SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS", +"SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED", +"SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO", +"SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS", +"SIGNAL_TYPE_DATABASE_NAMES_EXPOSED", +"SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED", +"SIGNAL_TYPE_PUBLIC_IP_ENABLED", +"SIGNAL_TYPE_IDLE", +"SIGNAL_TYPE_OVERPROVISIONED", +"SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES", +"SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES", +"SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION", +"SIGNAL_TYPE_UNDERPROVISIONED", +"SIGNAL_TYPE_OUT_OF_DISK", +"SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", +"SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", +"SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", +"SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", +"SIGNAL_TYPE_QUOTA_LIMIT", +"SIGNAL_TYPE_NO_PASSWORD_POLICY", +"SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" +], +"enumDeprecated": [ +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unspecified.", +"Represents if a resource is protected by automatic failover. Checks for resources that are configured to have redundancy within a region that enables automatic failover.", +"Represents if a group is replicating across regions. Checks for resources that are configured to have redundancy, and ongoing replication, across regions.", +"Represents if the resource is available in multiple zones or not.", +"Represents if a resource is available in multiple regions.", +"Represents if a resource has a promotable replica.", +"Represents if a resource has an automated backup policy.", +"Represents if a resources has a short backup retention period.", +"Represents if the last backup of a resource failed.", +"Represents if the last backup of a resource is older than some threshold value.", +"Represents if a resource violates CIS GCP Foundation 2.0.", +"Represents if a resource violates CIS GCP Foundation 1.3.", +"Represents if a resource violates CIS GCP Foundation 1.2.", +"Represents if a resource violates CIS GCP Foundation 1.1.", +"Represents if a resource violates CIS GCP Foundation 1.0.", +"Represents if a resource violates NIST 800-53.", +"Represents if a resource violates ISO-27001.", +"Represents if a resource violates PCI-DSS v3.2.1.", +"Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", +"Represents if the log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance is not set appropriately.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance does not have an appropriate severity level.", +"Represents if the log_min_messages database flag for a Cloud SQL for PostgreSQL instance is not set to warning or another recommended value.", +"Represents if the databaseFlags property of instance metadata for the log_executor_status field is set to on.", +"Represents if the log_hostname database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_statement database flag for a Cloud SQL for PostgreSQL instance is not set to DDL (all data definition statements).", +"Represents if the log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not set to \"0\". (NOTE: 0 = ON)", +"Represents if the user connections database flag for a Cloud SQL for SQL Server instance is configured.", +"Represents if the user options database flag for Cloud SQL SQL Server instance is configured or not.", +"Represents if a resource is exposed to public access.", +"Represents if a resources requires all incoming connections to use SSL or not.", +"Represents if a Cloud SQL database has a password configured for the root account or not.", +"Represents if a Cloud SQL database has a weak password configured for the root account.", +"Represents if a SQL database instance is not encrypted with customer-managed encryption keys (CMEK).", +"Represents if The contained database authentication database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if he external scripts enabled database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the local_infile database flag for a Cloud SQL for MySQL instance is not set to off.", +"Represents if the log_connections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_disconnections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_duration_statement database flag for a Cloud SQL for PostgreSQL instance is not set to -1.", +"Represents if the remote access database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the skip_show_database database flag for a Cloud SQL for MySQL instance is not set to on.", +"Represents if the 3625 (trace flag) database flag for a Cloud SQL for SQL Server instance is not set to on.", +"Represents if public IP is enabled.", +"Represents Idle instance helps to reduce costs.", +"Represents instances that are unnecessarily large for given workload.", +"Represents high number of concurrently opened tables.", +"Represents high table count close to SLA limit.", +"Represents high number of unvacuumed transactions", +"Represents need for more CPU and/or memory", +"Represents out of disk.", +"Represents server certificate is near expiry.", +"Represents database auditing is disabled.", +"Represents not restricted to authorized networks.", +"Represents violate org policy restrict public ip.", +"Cluster nearing quota limit", +"No password policy set on resources", +"Performance impact of connections settings", +"Performance impact of temporary tables settings", +"Performance impact of transaction logs settings", +"Performance impact of high joins without indexes" +], +"type": "string" +}, +"state": { +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"RESOLVED", +"MUTED" +], +"enumDescriptions": [ +"Unspecified state.", +"The signal requires attention and has not been addressed yet.", +"The signal has been fixed, triaged as a non-issue or otherwise addressed and is no longer active.", +"The signal has been muted." +], +"type": "string" +} +}, +"type": "object" +}, +"DatabaseResourceId": { +"description": "DatabaseResourceId will serve as primary key for any resource ingestion event.", +"id": "DatabaseResourceId", +"properties": { +"provider": { +"description": "Required. Cloud provider name. Ex: GCP/AWS/Azure/OnPrem/SelfManaged", +"enum": [ +"PROVIDER_UNSPECIFIED", +"GCP", +"AWS", +"AZURE", +"ONPREM", +"SELFMANAGED", +"PROVIDER_OTHER" +], +"enumDescriptions": [ +"", +"Google cloud platform provider", +"Amazon web service", +"Azure web service", +"On-prem database resources.", +"Self-managed database provider. These are resources on a cloud platform, e.g., database resource installed in a GCE VM, but not a managed database service.", +"For the rest of the other categories. Other refers to the rest of other database service providers, this could be smaller cloud provider. This needs to be provided when the provider is known, but it is not present in the existing set of enum values." +], +"type": "string" +}, +"providerDescription": { +"description": "Optional. Needs to be used only when the provider is PROVIDER_OTHER.", +"type": "string" +}, +"resourceType": { +"description": "Required. The type of resource this ID is identifying. Ex redis.googleapis.com/Instance, redis.googleapis.com/Cluster, alloydb.googleapis.com/Cluster, alloydb.googleapis.com/Instance, spanner.googleapis.com/Instance REQUIRED Please refer go/condor-common-datamodel", +"type": "string" +}, +"uniqueId": { +"description": "Required. A service-local token that distinguishes this resource from other resources within the same service.", +"type": "string" +} +}, +"type": "object" +}, +"DatabaseResourceMetadata": { +"description": "Common model for database resource instance metadata.", +"id": "DatabaseResourceMetadata", +"properties": { +"availabilityConfiguration": { +"$ref": "AvailabilityConfiguration", +"description": "Availability configuration for this instance" +}, +"backupConfiguration": { +"$ref": "BackupConfiguration", +"description": "Backup configuration for this instance" +}, +"backupRun": { +"$ref": "BackupRun", +"description": "Latest backup run information for this instance" +}, +"creationTime": { +"description": "The creation time of the resource, i.e. the time when resource is created and recorded in partner service.", +"format": "google-datetime", +"type": "string" +}, +"currentState": { +"description": "Current state of the instance.", +"enum": [ +"STATE_UNSPECIFIED", +"HEALTHY", +"UNHEALTHY", +"SUSPENDED", +"DELETED", +"STATE_OTHER" +], +"enumDescriptions": [ +"", +"The instance is running.", +"Instance being created, updated, deleted or under maintenance", +"When instance is suspended", +"Instance is deleted.", +"For rest of the other category" +], +"type": "string" +}, +"customMetadata": { +"$ref": "CustomMetadataData", +"description": "Any custom metadata associated with the resource" +}, +"entitlements": { +"description": "Entitlements associated with the resource", +"items": { +"$ref": "Entitlement" +}, +"type": "array" +}, +"expectedState": { +"description": "The state that the instance is expected to be in. For example, an instance state can transition to UNHEALTHY due to wrong patch update, while the expected state will remain at the HEALTHY.", +"enum": [ +"STATE_UNSPECIFIED", +"HEALTHY", +"UNHEALTHY", +"SUSPENDED", +"DELETED", +"STATE_OTHER" +], +"enumDescriptions": [ +"", +"The instance is running.", +"Instance being created, updated, deleted or under maintenance", +"When instance is suspended", +"Instance is deleted.", +"For rest of the other category" +], +"type": "string" +}, +"id": { +"$ref": "DatabaseResourceId", +"description": "Required. Unique identifier for a Database resource" +}, +"instanceType": { +"description": "The type of the instance. Specified at creation time.", +"enum": [ +"INSTANCE_TYPE_UNSPECIFIED", +"SUB_RESOURCE_TYPE_UNSPECIFIED", +"PRIMARY", +"SECONDARY", +"READ_REPLICA", +"OTHER", +"SUB_RESOURCE_TYPE_PRIMARY", +"SUB_RESOURCE_TYPE_SECONDARY", +"SUB_RESOURCE_TYPE_READ_REPLICA", +"SUB_RESOURCE_TYPE_OTHER" +], +"enumDeprecated": [ +true, +false, +true, +true, +true, +true, +false, +false, +false, +false +], +"enumDescriptions": [ +"", +"For rest of the other categories.", +"A regular primary database instance.", +"A cluster or an instance acting as a secondary.", +"An instance acting as a read-replica.", +"For rest of the other categories.", +"A regular primary database instance.", +"A cluster or an instance acting as a secondary.", +"An instance acting as a read-replica.", +"For rest of the other categories." +], +"type": "string" +}, +"location": { +"description": "The resource location. REQUIRED", +"type": "string" +}, +"primaryResourceId": { +"$ref": "DatabaseResourceId", +"description": "Identifier for this resource's immediate parent/primary resource if the current resource is a replica or derived form of another Database resource. Else it would be NULL. REQUIRED if the immediate parent exists when first time resource is getting ingested, otherwise optional." +}, +"product": { +"$ref": "Product", +"description": "The product this resource represents." +}, +"resourceContainer": { +"description": "Closest parent Cloud Resource Manager container of this resource. It must be resource name of a Cloud Resource Manager project with the format of \"/\", such as \"projects/123\". For GCP provided resources, number should be project number.", +"type": "string" +}, +"resourceName": { +"description": "Required. Different from DatabaseResourceId.unique_id, a resource name can be reused over time. That is, after a resource named \"ABC\" is deleted, the name \"ABC\" can be used to to create a new resource within the same source. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +}, +"updationTime": { +"description": "The time at which the resource was updated and recorded at partner service.", +"format": "google-datetime", +"type": "string" +}, +"userLabelSet": { +"$ref": "UserLabels", +"description": "User-provided labels associated with the resource" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"deprecated": true, +"description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", +"type": "object" +} +}, +"type": "object" +}, +"DatabaseResourceRecommendationSignalData": { +"description": "Common model for database resource recommendation signal data.", +"id": "DatabaseResourceRecommendationSignalData", +"properties": { +"additionalMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Optional. Any other additional metadata specific to recommendation", +"type": "object" +}, +"lastRefreshTime": { +"description": "Required. last time recommendationw as refreshed", +"format": "google-datetime", +"type": "string" +}, +"recommendationState": { +"description": "Required. Recommendation state", +"enum": [ +"UNSPECIFIED", +"ACTIVE", +"CLAIMED", +"SUCCEEDED", +"FAILED", +"DISMISSED" +], +"enumDescriptions": [ +"", +"Recommendation is active and can be applied. ACTIVE recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in claimed state. Recommendations content is immutable and cannot be updated by Google. CLAIMED recommendations can be marked as CLAIMED, SUCCEEDED, or FAILED.", +"Recommendation is in succeeded state. Recommendations content is immutable and cannot be updated by Google. SUCCEEDED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in failed state. Recommendations content is immutable and cannot be updated by Google. FAILED recommendations can be marked as SUCCEEDED, or FAILED.", +"Recommendation is in dismissed state. Recommendation content can be updated by Google. DISMISSED recommendations can be marked as ACTIVE." +], +"type": "string" +}, +"recommender": { +"description": "Required. Name of recommendation. Examples: organizations/1234/locations/us-central1/recommenders/google.cloudsql.instance.PerformanceRecommender/recommendations/9876", +"type": "string" +}, +"recommenderId": { +"description": "Required. ID of recommender. Examples: \"google.cloudsql.instance.PerformanceRecommender\"", +"type": "string" +}, +"recommenderSubtype": { +"description": "Required. Contains an identifier for a subtype of recommendations produced for the same recommender. Subtype is a function of content and impact, meaning a new subtype might be added when significant changes to `content` or `primary_impact.category` are introduced. See the Recommenders section to see a list of subtypes for a given Recommender. Examples: For recommender = \"google.cloudsql.instance.PerformanceRecommender\", recommender_subtype can be \"MYSQL_HIGH_NUMBER_OF_OPEN_TABLES_BEST_PRACTICE\"/\"POSTGRES_HIGH_TRANSACTION_ID_UTILIZATION_BEST_PRACTICE\"", +"type": "string" +}, +"resourceName": { +"description": "Required. Database resource name associated with the signal. Resource name to follow CAIS resource_name format as noted here go/condor-common-datamodel", +"type": "string" +}, +"signalType": { +"description": "Required. Type of signal, for example, `SIGNAL_TYPE_IDLE`, `SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES`, etc.", +"enum": [ +"SIGNAL_TYPE_UNSPECIFIED", +"SIGNAL_TYPE_NOT_PROTECTED_BY_AUTOMATIC_FAILOVER", +"SIGNAL_TYPE_GROUP_NOT_REPLICATING_ACROSS_REGIONS", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_ZONES", +"SIGNAL_TYPE_NOT_AVAILABLE_IN_MULTIPLE_REGIONS", +"SIGNAL_TYPE_NO_PROMOTABLE_REPLICA", +"SIGNAL_TYPE_NO_AUTOMATED_BACKUP_POLICY", +"SIGNAL_TYPE_SHORT_BACKUP_RETENTION", +"SIGNAL_TYPE_LAST_BACKUP_FAILED", +"SIGNAL_TYPE_LAST_BACKUP_OLD", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_2_0", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_3", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_2", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_1", +"SIGNAL_TYPE_VIOLATES_CIS_GCP_FOUNDATION_1_0", +"SIGNAL_TYPE_VIOLATES_NIST_800_53", +"SIGNAL_TYPE_VIOLATES_ISO_27001", +"SIGNAL_TYPE_VIOLATES_PCI_DSS_V3_2_1", +"SIGNAL_TYPE_LOGS_NOT_OPTIMIZED_FOR_TROUBLESHOOTING", +"SIGNAL_TYPE_QUERY_DURATIONS_NOT_LOGGED", +"SIGNAL_TYPE_VERBOSE_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_LOCK_WAITS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_MOST_ERRORS", +"SIGNAL_TYPE_LOGGING_ONLY_CRITICAL_ERRORS", +"SIGNAL_TYPE_MINIMAL_ERROR_LOGGING", +"SIGNAL_TYPE_QUERY_STATISTICS_LOGGED", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_CLIENT_HOSTNAME", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PARSER_STATISTICS", +"SIGNAL_TYPE_EXCESSIVE_LOGGING_OF_PLANNER_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_ONLY_DDL_STATEMENTS", +"SIGNAL_TYPE_LOGGING_QUERY_STATISTICS", +"SIGNAL_TYPE_NOT_LOGGING_TEMPORARY_FILES", +"SIGNAL_TYPE_CONNECTION_MAX_NOT_CONFIGURED", +"SIGNAL_TYPE_USER_OPTIONS_CONFIGURED", +"SIGNAL_TYPE_EXPOSED_TO_PUBLIC_ACCESS", +"SIGNAL_TYPE_UNENCRYPTED_CONNECTIONS", +"SIGNAL_TYPE_NO_ROOT_PASSWORD", +"SIGNAL_TYPE_WEAK_ROOT_PASSWORD", +"SIGNAL_TYPE_ENCRYPTION_KEY_NOT_CUSTOMER_MANAGED", +"SIGNAL_TYPE_SERVER_AUTHENTICATION_NOT_REQUIRED", +"SIGNAL_TYPE_EXPOSED_BY_OWNERSHIP_CHAINING", +"SIGNAL_TYPE_EXPOSED_TO_EXTERNAL_SCRIPTS", +"SIGNAL_TYPE_EXPOSED_TO_LOCAL_DATA_LOADS", +"SIGNAL_TYPE_CONNECTION_ATTEMPTS_NOT_LOGGED", +"SIGNAL_TYPE_DISCONNECTIONS_NOT_LOGGED", +"SIGNAL_TYPE_LOGGING_EXCESSIVE_STATEMENT_INFO", +"SIGNAL_TYPE_EXPOSED_TO_REMOTE_ACCESS", +"SIGNAL_TYPE_DATABASE_NAMES_EXPOSED", +"SIGNAL_TYPE_SENSITIVE_TRACE_INFO_NOT_MASKED", +"SIGNAL_TYPE_PUBLIC_IP_ENABLED", +"SIGNAL_TYPE_IDLE", +"SIGNAL_TYPE_OVERPROVISIONED", +"SIGNAL_TYPE_HIGH_NUMBER_OF_OPEN_TABLES", +"SIGNAL_TYPE_HIGH_NUMBER_OF_TABLES", +"SIGNAL_TYPE_HIGH_TRANSACTION_ID_UTILIZATION", +"SIGNAL_TYPE_UNDERPROVISIONED", +"SIGNAL_TYPE_OUT_OF_DISK", +"SIGNAL_TYPE_SERVER_CERTIFICATE_NEAR_EXPIRY", +"SIGNAL_TYPE_DATABASE_AUDITING_DISABLED", +"SIGNAL_TYPE_RESTRICT_AUTHORIZED_NETWORKS", +"SIGNAL_TYPE_VIOLATE_POLICY_RESTRICT_PUBLIC_IP", +"SIGNAL_TYPE_QUOTA_LIMIT", +"SIGNAL_TYPE_NO_PASSWORD_POLICY", +"SIGNAL_TYPE_CONNECTIONS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TMP_TABLES_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_TRANS_LOGS_PERFORMANCE_IMPACT", +"SIGNAL_TYPE_HIGH_JOINS_WITHOUT_INDEXES" +], +"enumDeprecated": [ +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unspecified.", +"Represents if a resource is protected by automatic failover. Checks for resources that are configured to have redundancy within a region that enables automatic failover.", +"Represents if a group is replicating across regions. Checks for resources that are configured to have redundancy, and ongoing replication, across regions.", +"Represents if the resource is available in multiple zones or not.", +"Represents if a resource is available in multiple regions.", +"Represents if a resource has a promotable replica.", +"Represents if a resource has an automated backup policy.", +"Represents if a resources has a short backup retention period.", +"Represents if the last backup of a resource failed.", +"Represents if the last backup of a resource is older than some threshold value.", +"Represents if a resource violates CIS GCP Foundation 2.0.", +"Represents if a resource violates CIS GCP Foundation 1.3.", +"Represents if a resource violates CIS GCP Foundation 1.2.", +"Represents if a resource violates CIS GCP Foundation 1.1.", +"Represents if a resource violates CIS GCP Foundation 1.0.", +"Represents if a resource violates NIST 800-53.", +"Represents if a resource violates ISO-27001.", +"Represents if a resource violates PCI-DSS v3.2.1.", +"Represents if log_checkpoints database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_duration database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_error_verbosity database flag for a Cloud SQL for PostgreSQL instance is not set to default or stricter (default or terse).", +"Represents if the log_lock_waits database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance is not set appropriately.", +"Represents if the log_min_error_statement database flag for a Cloud SQL for PostgreSQL instance does not have an appropriate severity level.", +"Represents if the log_min_messages database flag for a Cloud SQL for PostgreSQL instance is not set to warning or another recommended value.", +"Represents if the databaseFlags property of instance metadata for the log_executor_status field is set to on.", +"Represents if the log_hostname database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_parser_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_planner_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_statement database flag for a Cloud SQL for PostgreSQL instance is not set to DDL (all data definition statements).", +"Represents if the log_statement_stats database flag for a Cloud SQL for PostgreSQL instance is not set to off.", +"Represents if the log_temp_files database flag for a Cloud SQL for PostgreSQL instance is not set to \"0\". (NOTE: 0 = ON)", +"Represents if the user connections database flag for a Cloud SQL for SQL Server instance is configured.", +"Represents if the user options database flag for Cloud SQL SQL Server instance is configured or not.", +"Represents if a resource is exposed to public access.", +"Represents if a resources requires all incoming connections to use SSL or not.", +"Represents if a Cloud SQL database has a password configured for the root account or not.", +"Represents if a Cloud SQL database has a weak password configured for the root account.", +"Represents if a SQL database instance is not encrypted with customer-managed encryption keys (CMEK).", +"Represents if The contained database authentication database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the cross_db_ownership_chaining database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if he external scripts enabled database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the local_infile database flag for a Cloud SQL for MySQL instance is not set to off.", +"Represents if the log_connections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_disconnections database flag for a Cloud SQL for PostgreSQL instance is not set to on.", +"Represents if the log_min_duration_statement database flag for a Cloud SQL for PostgreSQL instance is not set to -1.", +"Represents if the remote access database flag for a Cloud SQL for SQL Server instance is not set to off.", +"Represents if the skip_show_database database flag for a Cloud SQL for MySQL instance is not set to on.", +"Represents if the 3625 (trace flag) database flag for a Cloud SQL for SQL Server instance is not set to on.", +"Represents if public IP is enabled.", +"Represents Idle instance helps to reduce costs.", +"Represents instances that are unnecessarily large for given workload.", +"Represents high number of concurrently opened tables.", +"Represents high table count close to SLA limit.", +"Represents high number of unvacuumed transactions", +"Represents need for more CPU and/or memory", +"Represents out of disk.", +"Represents server certificate is near expiry.", +"Represents database auditing is disabled.", +"Represents not restricted to authorized networks.", +"Represents violate org policy restrict public ip.", +"Cluster nearing quota limit", +"No password policy set on resources", +"Performance impact of connections settings", +"Performance impact of temporary tables settings", +"Performance impact of transaction logs settings", +"Performance impact of high joins without indexes" +], +"type": "string" +} +}, +"type": "object" +}, +"DiscoveryEndpoint": { +"description": "Endpoints on each network, for Redis clients to connect to the cluster.", +"id": "DiscoveryEndpoint", +"properties": { +"address": { +"description": "Output only. Address of the exposed Redis endpoint used by clients to connect to the service. The address could be either IP or hostname.", +"readOnly": true, +"type": "string" +}, +"port": { +"description": "Output only. The port number of the exposed Redis endpoint.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"pscConfig": { +"$ref": "PscConfig", +"description": "Output only. Customer configuration for where the endpoint is created and accessed from.", +"readOnly": true +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Entitlement": { +"description": "Proto representing the access that a user has to a specific feature/service. NextId: 3.", +"id": "Entitlement", +"properties": { +"entitlementState": { +"description": "The current state of user's accessibility to a feature/benefit.", +"enum": [ +"ENTITLEMENT_STATE_UNSPECIFIED", +"ENTITLED", +"REVOKED" +], +"enumDescriptions": [ +"", +"User is entitled to a feature/benefit, but whether it has been successfully provisioned is decided by provisioning state.", +"User is entitled to a feature/benefit, but it was requested to be revoked. Whether the revoke has been successful is decided by provisioning state." +], +"type": "string" +}, +"type": { +"description": "An enum that represents the type of this entitlement.", +"enum": [ +"ENTITLEMENT_TYPE_UNSPECIFIED", +"DUET_AI", +"GEMINI" +], +"enumDeprecated": [ +false, +true, +false +], +"enumDescriptions": [ +"", +"The root entitlement representing Duet AI package ownership.", +"The root entitlement representing Gemini package ownership." +], +"type": "string" +} +}, +"type": "object" +}, +"ExportInstanceRequest": { +"description": "Request for Export.", +"id": "ExportInstanceRequest", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "Required. Specify data to be exported." +} +}, +"type": "object" +}, +"FailoverInstanceRequest": { +"description": "Request for Failover.", +"id": "FailoverInstanceRequest", +"properties": { +"dataProtectionMode": { +"description": "Optional. Available data protection modes that the user can choose. If it's unspecified, data protection mode will be LIMITED_DATA_LOSS by default.", +"enum": [ +"DATA_PROTECTION_MODE_UNSPECIFIED", +"LIMITED_DATA_LOSS", +"FORCE_DATA_LOSS" +], +"enumDescriptions": [ +"Defaults to LIMITED_DATA_LOSS if a data protection mode is not specified.", +"Instance failover will be protected with data loss control. More specifically, the failover will only be performed if the current replication offset diff between primary and replica is under a certain threshold.", +"Instance failover will be performed without data loss control." +], +"type": "string" +} +}, +"type": "object" +}, +"GcsDestination": { +"description": "The Cloud Storage location for the output content", +"id": "GcsDestination", +"properties": { +"uri": { +"description": "Required. Data destination URI (e.g. 'gs://my_bucket/my_object'). Existing files will be overwritten.", +"type": "string" +} +}, +"type": "object" +}, +"GcsSource": { +"description": "The Cloud Storage location for the input content", +"id": "GcsSource", +"properties": { +"uri": { +"description": "Required. Source data URI. (e.g. 'gs://my_bucket/my_object').", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudCommonOperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "GoogleCloudCommonOperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"cancelRequested": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"statusDetail": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRedisV1beta1LocationMetadata": { +"description": "This location metadata represents additional configuration options for a given location where a Redis instance may be created. All fields are output only. It is returned as content of the `google.cloud.location.Location.metadata` field.", +"id": "GoogleCloudRedisV1beta1LocationMetadata", +"properties": { +"availableZones": { +"additionalProperties": { +"$ref": "GoogleCloudRedisV1beta1ZoneMetadata" +}, +"description": "Output only. The set of available zones in the location. The map is keyed by the lowercase ID of each zone, as defined by GCE. These keys can be specified in `location_id` or `alternative_location_id` fields when creating a Redis instance.", +"readOnly": true, +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRedisV1beta1ZoneMetadata": { +"description": "Defines specific information for a particular zone. Currently empty and reserved for future use only.", +"id": "GoogleCloudRedisV1beta1ZoneMetadata", +"properties": {}, +"type": "object" +}, +"ImportInstanceRequest": { +"description": "Request for Import.", +"id": "ImportInstanceRequest", +"properties": { +"inputConfig": { +"$ref": "InputConfig", +"description": "Required. Specify data to be imported." +} +}, +"type": "object" +}, +"InputConfig": { +"description": "The input content", +"id": "InputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Google Cloud Storage location where input content is located." +} +}, +"type": "object" +}, +"Instance": { +"description": "A Memorystore for Redis instance.", +"id": "Instance", +"properties": { +"alternativeLocationId": { +"description": "Optional. If specified, at least one node will be provisioned in this zone in addition to the zone specified in location_id. Only applicable to standard tier. If provided, it must be a different zone from the one provided in [location_id]. Additional nodes beyond the first 2 will be placed in zones selected by the service.", +"type": "string" +}, +"authEnabled": { +"description": "Optional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to \"true\" AUTH is enabled on the instance. Default value is \"false\" meaning AUTH is disabled.", +"type": "boolean" +}, +"authorizedNetwork": { +"description": "Optional. The full name of the Google Compute Engine [network](https://cloud.google.com/vpc/docs/vpc) to which the instance is connected. If left unspecified, the `default` network will be used.", +"type": "string" +}, +"availableMaintenanceVersions": { +"description": "Optional. The available maintenance versions that an instance could update to.", +"items": { +"type": "string" +}, +"type": "array" +}, +"connectMode": { +"description": "Optional. The network connect mode of the Redis instance. If not provided, the connect mode defaults to DIRECT_PEERING.", +"enum": [ +"CONNECT_MODE_UNSPECIFIED", +"DIRECT_PEERING", +"PRIVATE_SERVICE_ACCESS" +], +"enumDescriptions": [ +"Not set.", +"Connect via direct peering to the Memorystore for Redis hosted service.", +"Connect your Memorystore for Redis instance using Private Service Access. Private services access provides an IP address range for multiple Google Cloud services, including Memorystore." +], +"type": "string" +}, +"createTime": { +"description": "Output only. The time the instance was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"currentLocationId": { +"description": "Output only. The current zone where the Redis primary node is located. In basic tier, this will always be the same as [location_id]. In standard tier, this can be the zone of any node in the instance.", +"readOnly": true, +"type": "string" +}, +"customerManagedKey": { +"description": "Optional. The KMS key reference that the customer provides when trying to create the instance.", +"type": "string" +}, +"displayName": { +"description": "An arbitrary and optional user-provided name for the instance.", +"type": "string" +}, +"host": { +"description": "Output only. Hostname or IP address of the exposed Redis endpoint used by clients to connect to the service.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user provided metadata", +"type": "object" +}, +"locationId": { +"description": "Optional. The zone where the instance will be provisioned. If not provided, the service will choose a zone from the specified region for the instance. For standard tier, additional nodes will be added across multiple zones for protection against zonal failures. If specified, at least one node will be provisioned in this zone.", +"type": "string" +}, +"maintenancePolicy": { +"$ref": "MaintenancePolicy", +"description": "Optional. The maintenance policy for the instance. If not provided, maintenance events can be performed at any time." +}, +"maintenanceSchedule": { +"$ref": "MaintenanceSchedule", +"description": "Output only. Date and time of upcoming maintenance events which have been scheduled.", +"readOnly": true +}, +"maintenanceVersion": { +"description": "Optional. The self service update maintenance version. The version is date based such as \"20210712_00_00\".", +"type": "string" +}, +"memorySizeGb": { +"description": "Required. Redis memory size in GiB.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. Unique name of the resource in this scope including project and location using the form: `projects/{project_id}/locations/{location_id}/instances/{instance_id}` Note: Redis instances are managed and addressed at regional level so location_id here refers to a GCP region; however, users may choose which specific zone (or collection of zones for cross-zone instances) an instance should be provisioned in. Refer to location_id and alternative_location_id fields for more details.", +"type": "string" +}, +"nodes": { +"description": "Output only. Info per node.", +"items": { +"$ref": "NodeInfo" +}, +"readOnly": true, +"type": "array" +}, +"persistenceConfig": { +"$ref": "PersistenceConfig", +"description": "Optional. Persistence configuration parameters" +}, +"persistenceIamIdentity": { +"description": "Output only. Cloud IAM identity used by import / export operations to transfer data to/from Cloud Storage. Format is \"serviceAccount:\". The value may change over time for a given instance so should be checked before each import/export operation.", +"readOnly": true, +"type": "string" +}, +"port": { +"description": "Output only. The port number of the exposed Redis endpoint.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"readEndpoint": { +"description": "Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes will exhibit some lag behind the primary. Write requests must target 'host'.", +"readOnly": true, +"type": "string" +}, +"readEndpointPort": { +"description": "Output only. The port number of the exposed readonly redis endpoint. Standard tier only. Write requests should target 'port'.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"readReplicasMode": { +"description": "Optional. Read replicas mode for the instance. Defaults to READ_REPLICAS_DISABLED.", +"enum": [ +"READ_REPLICAS_MODE_UNSPECIFIED", +"READ_REPLICAS_DISABLED", +"READ_REPLICAS_ENABLED" +], +"enumDescriptions": [ +"If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED.", +"If disabled, read endpoint will not be provided and the instance cannot scale up or down the number of replicas.", +"If enabled, read endpoint will be provided and the instance can scale up and down the number of replicas. Not valid for basic tier." +], +"type": "string" +}, +"redisConfigs": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Redis configuration parameters, according to http://redis.io/topics/config. Currently, the only supported parameters are: Redis version 3.2 and newer: * maxmemory-policy * notify-keyspace-events Redis version 4.0 and newer: * activedefrag * lfu-decay-time * lfu-log-factor * maxmemory-gb Redis version 5.0 and newer: * stream-node-max-bytes * stream-node-max-entries", +"type": "object" +}, +"redisVersion": { +"description": "Optional. The version of Redis software. If not provided, latest supported version will be used. Currently, the supported values are: * `REDIS_3_2` for Redis 3.2 compatibility * `REDIS_4_0` for Redis 4.0 compatibility (default) * `REDIS_5_0` for Redis 5.0 compatibility * `REDIS_6_X` for Redis 6.x compatibility * `REDIS_7_0` for Redis 7.0 compatibility", +"type": "string" +}, +"replicaCount": { +"description": "Optional. The number of replica nodes. The valid range for the Standard Tier with read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled for a Standard Tier instance, the only valid value is 1 and the default is 1. The valid value for basic tier is 0 and the default is also 0.", +"format": "int32", +"type": "integer" +}, +"reservedIpRange": { +"description": "Optional. For DIRECT_PEERING mode, the CIDR range of internal addresses that are reserved for this instance. Range must be unique and non-overlapping with existing subnets in an authorized network. For PRIVATE_SERVICE_ACCESS mode, the name of one allocated IP address ranges associated with this private service access connection. If not provided, the service will choose an unused /29 block, for example, 10.0.0.0/29 or 192.168.0.0/29. For READ_REPLICAS_ENABLED the default block size is /28.", +"type": "string" +}, +"satisfiesPzi": { +"description": "Optional. Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"satisfiesPzs": { +"description": "Optional. Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"secondaryIpRange": { +"description": "Optional. Additional IP range for node placement. Required when enabling read replicas on an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or \"auto\". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address range associated with the private service access connection, or \"auto\".", +"type": "string" +}, +"serverCaCerts": { +"description": "Output only. List of server CA certificates for the instance.", +"items": { +"$ref": "TlsCertificate" +}, +"readOnly": true, +"type": "array" +}, +"state": { +"description": "Output only. The current state of this instance.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY", +"UPDATING", +"DELETING", +"REPAIRING", +"MAINTENANCE", +"IMPORTING", +"FAILING_OVER" +], +"enumDescriptions": [ +"Not set.", +"Redis instance is being created.", +"Redis instance has been created and is fully usable.", +"Redis instance configuration is being updated. Certain kinds of updates may cause the instance to become unusable while the update is in progress.", +"Redis instance is being deleted.", +"Redis instance is being repaired and may be unusable.", +"Maintenance is being performed on this Redis instance.", +"Redis instance is importing data (availability may be affected).", +"Redis instance is failing over (availability may be affected)." +], +"readOnly": true, +"type": "string" +}, +"statusMessage": { +"description": "Output only. Additional information about the current status of this instance, if available.", +"readOnly": true, +"type": "string" +}, +"suspensionReasons": { +"description": "Optional. reasons that causes instance in \"SUSPENDED\" state.", +"items": { +"enum": [ +"SUSPENSION_REASON_UNSPECIFIED", +"CUSTOMER_MANAGED_KEY_ISSUE" +], +"enumDescriptions": [ +"Not set.", +"Something wrong with the CMEK key provided by customer." +], +"type": "string" +}, +"type": "array" +}, +"tier": { +"description": "Required. The service tier of the instance.", +"enum": [ +"TIER_UNSPECIFIED", +"BASIC", +"STANDARD_HA" +], +"enumDescriptions": [ +"Not set.", +"BASIC tier: standalone instance", +"STANDARD_HA tier: highly available primary/replica instances" +], +"type": "string" +}, +"transitEncryptionMode": { +"description": "Optional. The TLS mode of the Redis instance. If not provided, TLS is disabled for the instance.", +"enum": [ +"TRANSIT_ENCRYPTION_MODE_UNSPECIFIED", +"SERVER_AUTHENTICATION", +"DISABLED" +], +"enumDescriptions": [ +"Not set.", +"Client to Server traffic encryption enabled with server authentication.", +"TLS is disabled for the instance." +], +"type": "string" +} +}, +"type": "object" +}, +"InstanceAuthString": { +"description": "Instance AUTH string details.", +"id": "InstanceAuthString", +"properties": { +"authString": { +"description": "AUTH string set on the instance.", +"type": "string" +} +}, +"type": "object" +}, +"ListClustersResponse": { +"description": "Response for ListClusters.", +"id": "ListClustersResponse", +"properties": { +"clusters": { +"description": "A list of Redis clusters in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is \"-\", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/clusters/`- and the `status` field set to ERROR and `status_message` field set to \"location not available for ListClusters\".", +"items": { +"$ref": "Cluster" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInstancesResponse": { +"description": "Response for ListInstances.", +"id": "ListInstancesResponse", +"properties": { +"instances": { +"description": "A list of Redis instances in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is \"-\", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/instances/`- and the `status` field set to ERROR and `status_message` field set to \"location not available for ListInstances\".", +"items": { +"$ref": "Instance" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "Resource ID for the region. For example: \"us-east1\".", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Output only. The set of available zones in the location. The map is keyed by the lowercase ID of each zone, as defined by Compute Engine. These keys can be specified in `location_id` or `alternative_location_id` fields when creating a Redis instance.", +"type": "object" +}, +"name": { +"description": "Full resource name for the region. For example: \"projects/example-project/locations/us-east1\".", +"type": "string" +} +}, +"type": "object" +}, +"MaintenancePolicy": { +"description": "Maintenance policy for an instance.", +"id": "MaintenancePolicy", +"properties": { +"createTime": { +"description": "Output only. The time when the policy was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. Description of what this policy is for. Create/Update methods return INVALID_ARGUMENT if the length is greater than 512.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time when the policy was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"weeklyMaintenanceWindow": { +"description": "Optional. Maintenance window that is applied to resources covered by this policy. Minimum 1. For the current version, the maximum number of weekly_window is expected to be one.", +"items": { +"$ref": "WeeklyMaintenanceWindow" +}, +"type": "array" +} +}, +"type": "object" +}, +"MaintenanceSchedule": { +"description": "Upcoming maintenance schedule. If no maintenance is scheduled, fields are not populated.", +"id": "MaintenanceSchedule", +"properties": { +"canReschedule": { +"deprecated": true, +"description": "If the scheduled maintenance can be rescheduled, default is true.", +"type": "boolean" +}, +"endTime": { +"description": "Output only. The end time of any upcoming scheduled maintenance for this instance.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"scheduleDeadlineTime": { +"description": "Output only. The deadline that the maintenance schedule start time can not go beyond, including reschedule.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"startTime": { +"description": "Output only. The start time of any upcoming scheduled maintenance for this instance.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ManagedCertificateAuthority": { +"id": "ManagedCertificateAuthority", +"properties": { +"caCerts": { +"description": "The PEM encoded CA certificate chains for redis managed server authentication", +"items": { +"$ref": "CertChain" +}, +"type": "array" +} +}, +"type": "object" +}, +"NodeInfo": { +"description": "Node specific properties.", +"id": "NodeInfo", +"properties": { +"id": { +"description": "Output only. Node identifying string. e.g. 'node-0', 'node-1'", +"readOnly": true, +"type": "string" +}, +"zone": { +"description": "Output only. Location of the node.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "{ `createTime`: The time the operation was created. `endTime`: The time the operation finished running. `target`: Server-defined resource path for the target of the operation. `verb`: Name of the verb executed by the operation. `statusDetail`: Human-readable status of the operation, if any. `cancelRequested`: Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. `apiVersion`: API version used to start the operation. }", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationError": { +"description": "An error that occurred during a backup creation operation.", +"id": "OperationError", +"properties": { +"code": { +"description": "Identifies the specific error that occurred. REQUIRED", +"type": "string" +}, +"errorType": { +"enum": [ +"OPERATION_ERROR_TYPE_UNSPECIFIED", +"KMS_KEY_ERROR", +"DATABASE_ERROR", +"STOCKOUT_ERROR", +"CANCELLATION_ERROR", +"SQLSERVER_ERROR", +"INTERNAL_ERROR" +], +"enumDescriptions": [ +"UNSPECIFIED means product type is not known or available.", +"key destroyed, expired, not found, unreachable or permission denied.", +"Database is not accessible", +"The zone or region does not have sufficient resources to handle the request at the moment", +"User initiated cancellation", +"SQL server specific error", +"Any other internal error." +], +"type": "string" +}, +"message": { +"description": "Additional information about the error encountered. REQUIRED", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Pre-defined metadata fields.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OutputConfig": { +"description": "The output content", +"id": "OutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Google Cloud Storage destination for output content." +} +}, +"type": "object" +}, +"PersistenceConfig": { +"description": "Configuration of the persistence functionality.", +"id": "PersistenceConfig", +"properties": { +"persistenceMode": { +"description": "Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used.", +"enum": [ +"PERSISTENCE_MODE_UNSPECIFIED", +"DISABLED", +"RDB" +], +"enumDescriptions": [ +"Not set.", +"Persistence is disabled for the instance, and any existing snapshots are deleted.", +"RDB based Persistence is enabled." +], +"type": "string" +}, +"rdbNextSnapshotTime": { +"description": "Output only. The next time that a snapshot attempt is scheduled to occur.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"rdbSnapshotPeriod": { +"description": "Optional. Period between RDB snapshots. Snapshots will be attempted every period starting from the provided snapshot start time. For example, a start time of 01/01/2033 06:45 and SIX_HOURS snapshot period will do nothing until 01/01/2033, and then trigger snapshots every day at 06:45, 12:45, 18:45, and 00:45 the next day, and so on. If not provided, TWENTY_FOUR_HOURS will be used as default.", +"enum": [ +"SNAPSHOT_PERIOD_UNSPECIFIED", +"ONE_HOUR", +"SIX_HOURS", +"TWELVE_HOURS", +"TWENTY_FOUR_HOURS" +], +"enumDescriptions": [ +"Not set.", +"Snapshot every 1 hour.", +"Snapshot every 6 hours.", +"Snapshot every 12 hours.", +"Snapshot every 24 hours." +], +"type": "string" +}, +"rdbSnapshotStartTime": { +"description": "Optional. Date and time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Product": { +"description": "Product specification for Condor resources.", +"id": "Product", +"properties": { +"engine": { +"description": "The specific engine that the underlying database is running.", +"enum": [ +"ENGINE_UNSPECIFIED", +"ENGINE_MYSQL", +"MYSQL", +"ENGINE_POSTGRES", +"POSTGRES", +"ENGINE_SQL_SERVER", +"SQL_SERVER", +"ENGINE_NATIVE", +"NATIVE", +"ENGINE_CLOUD_SPANNER_WITH_POSTGRES_DIALECT", +"ENGINE_CLOUD_SPANNER_WITH_GOOGLESQL_DIALECT", +"ENGINE_MEMORYSTORE_FOR_REDIS", +"ENGINE_MEMORYSTORE_FOR_REDIS_CLUSTER", +"ENGINE_OTHER" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"UNSPECIFIED means engine type is not known or available.", +"MySQL binary running as an engine in the database instance.", +"MySQL binary running as engine in database instance.", +"Postgres binary running as engine in database instance.", +"Postgres binary running as engine in database instance.", +"SQLServer binary running as engine in database instance.", +"SQLServer binary running as engine in database instance.", +"Native database binary running as engine in instance.", +"Native database binary running as engine in instance.", +"Cloud Spanner with PostgreSQL dialect.", +"Cloud Spanner with Google SQL dialect.", +"Memorystore with Redis dialect.", +"Memorystore with Redis cluster dialect.", +"Other refers to rest of other database engine. This is to be when engine is known, but it is not present in this enum." +], +"type": "string" +}, +"type": { +"description": "Type of specific database product. It could be CloudSQL, AlloyDB etc..", +"enum": [ +"PRODUCT_TYPE_UNSPECIFIED", +"PRODUCT_TYPE_CLOUD_SQL", +"CLOUD_SQL", +"PRODUCT_TYPE_ALLOYDB", +"ALLOYDB", +"PRODUCT_TYPE_SPANNER", +"PRODUCT_TYPE_ON_PREM", +"ON_PREM", +"PRODUCT_TYPE_MEMORYSTORE", +"PRODUCT_TYPE_OTHER" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +false, +true, +false, +false +], +"enumDescriptions": [ +"UNSPECIFIED means product type is not known or available.", +"Cloud SQL product area in GCP", +"Cloud SQL product area in GCP", +"AlloyDB product area in GCP", +"AlloyDB product area in GCP", +"Spanner product area in GCP", +"On premises database product.", +"On premises database product.", +"Memorystore product area in GCP", +"Other refers to rest of other product type. This is to be when product type is known, but it is not present in this enum." +], +"type": "string" +}, +"version": { +"description": "Version of the underlying database engine. Example values: For MySQL, it could be \"8.0\", \"5.7\" etc.. For Postgres, it could be \"14\", \"15\" etc..", +"type": "string" +} +}, +"type": "object" +}, +"PscConfig": { +"id": "PscConfig", +"properties": { +"network": { +"description": "Required. The network where the IP address of the discovery endpoint will be reserved, in the form of projects/{network_project}/global/networks/{network_id}.", +"type": "string" +} +}, +"type": "object" +}, +"PscConnection": { +"description": "Details of consumer resources in a PSC connection.", +"id": "PscConnection", +"properties": { +"address": { +"description": "Output only. The IP allocated on the consumer network for the PSC forwarding rule.", +"readOnly": true, +"type": "string" +}, +"forwardingRule": { +"description": "Output only. The URI of the consumer side forwarding rule. Example: projects/{projectNumOrId}/regions/us-east1/forwardingRules/{resourceId}.", +"readOnly": true, +"type": "string" +}, +"network": { +"description": "The consumer network where the IP address resides, in the form of projects/{project_id}/global/networks/{network_id}.", +"type": "string" +}, +"projectId": { +"description": "Output only. The consumer project_id where the forwarding rule is created from.", +"readOnly": true, +"type": "string" +}, +"pscConnectionId": { +"description": "Output only. The PSC connection id of the forwarding rule connected to the service attachment.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RDBConfig": { +"description": "Configuration of the RDB based persistence.", +"id": "RDBConfig", +"properties": { +"rdbSnapshotPeriod": { +"description": "Optional. Period between RDB snapshots.", +"enum": [ +"SNAPSHOT_PERIOD_UNSPECIFIED", +"ONE_HOUR", +"SIX_HOURS", +"TWELVE_HOURS", +"TWENTY_FOUR_HOURS" +], +"enumDescriptions": [ +"Not set.", +"One hour.", +"Six hours.", +"Twelve hours.", +"Twenty four hours." +], +"type": "string" +}, +"rdbSnapshotStartTime": { +"description": "Optional. The time that the first snapshot was/will be attempted, and to which future snapshots will be aligned. If not provided, the current time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ReconciliationOperationMetadata": { +"description": "Operation metadata returned by the CLH during resource state reconciliation.", +"id": "ReconciliationOperationMetadata", +"properties": { +"deleteResource": { +"deprecated": true, +"description": "DEPRECATED. Use exclusive_action instead.", +"type": "boolean" +}, +"exclusiveAction": { +"description": "Excluisive action returned by the CLH.", +"enum": [ +"UNKNOWN_REPAIR_ACTION", +"DELETE", +"RETRY" +], +"enumDeprecated": [ +false, +true, +false +], +"enumDescriptions": [ +"Unknown repair action.", +"The resource has to be deleted. When using this bit, the CLH should fail the operation. DEPRECATED. Instead use DELETE_RESOURCE OperationSignal in SideChannel.", +"This resource could not be repaired but the repair should be tried again at a later time. This can happen if there is a dependency that needs to be resolved first- e.g. if a parent resource must be repaired before a child resource." +], +"type": "string" +} +}, +"type": "object" +}, +"RescheduleMaintenanceRequest": { +"description": "Request for RescheduleMaintenance.", +"id": "RescheduleMaintenanceRequest", +"properties": { +"rescheduleType": { +"description": "Required. If reschedule type is SPECIFIC_TIME, must set up schedule_time as well.", +"enum": [ +"RESCHEDULE_TYPE_UNSPECIFIED", +"IMMEDIATE", +"NEXT_AVAILABLE_WINDOW", +"SPECIFIC_TIME" +], +"enumDescriptions": [ +"Not set.", +"If the user wants to schedule the maintenance to happen now.", +"If the user wants to use the existing maintenance policy to find the next available window.", +"If the user wants to reschedule the maintenance to a specific time." +], +"type": "string" +}, +"scheduleTime": { +"description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in RFC 3339 format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RetentionSettings": { +"id": "RetentionSettings", +"properties": { +"quantityBasedRetention": { +"format": "int32", +"type": "integer" +}, +"retentionUnit": { +"description": "The unit that 'retained_backups' represents.", +"enum": [ +"RETENTION_UNIT_UNSPECIFIED", +"COUNT", +"TIME", +"RETENTION_UNIT_OTHER" +], +"enumDescriptions": [ +"Backup retention unit is unspecified, will be treated as COUNT.", +"Retention will be by count, eg. \"retain the most recent 7 backups\".", +"Retention will be by Time, eg. \"retain the last 7 days backups\".", +"For rest of the other category" +], +"type": "string" +}, +"timeBasedRetention": { +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"StateInfo": { +"description": "Represents additional information about the state of the cluster.", +"id": "StateInfo", +"properties": { +"updateInfo": { +"$ref": "UpdateInfo", +"description": "Describes ongoing update on the cluster when cluster state is UPDATING." +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TlsCertificate": { +"description": "TlsCertificate Resource", +"id": "TlsCertificate", +"properties": { +"cert": { +"description": "PEM representation.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2020-05-18T00:00:00.094Z`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2020-05-18T00:00:00.094Z`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"serialNumber": { +"description": "Serial number, as extracted from the certificate.", +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 Fingerprint of the certificate.", +"type": "string" +} +}, +"type": "object" +}, +"UpdateInfo": { +"description": "Represents information about an updating cluster.", +"id": "UpdateInfo", +"properties": { +"targetReplicaCount": { +"description": "Target number of replica nodes per shard.", +"format": "int32", +"type": "integer" +}, +"targetShardCount": { +"description": "Target number of shards for redis cluster", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UpgradeInstanceRequest": { +"description": "Request for UpgradeInstance.", +"id": "UpgradeInstanceRequest", +"properties": { +"redisVersion": { +"description": "Required. Specifies the target version of Redis software to upgrade to.", +"type": "string" +} +}, +"type": "object" +}, +"UserLabels": { +"description": "Message type for storing user labels. User labels are used to tag App Engine resources, allowing users to search for resources matching a set of labels and to aggregate usage data by labels.", +"id": "UserLabels", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +} +}, +"type": "object" +}, +"WeeklyMaintenanceWindow": { +"description": "Time window in which disruptive maintenance updates occur. Non-disruptive updates can occur inside or outside this window.", +"id": "WeeklyMaintenanceWindow", +"properties": { +"day": { +"description": "Required. The day of week that maintenance updates occur.", +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +}, +"duration": { +"description": "Output only. Duration of the maintenance window. The current window is fixed at 1 hour.", +"format": "google-duration", +"readOnly": true, +"type": "string" +}, +"startTime": { +"$ref": "TimeOfDay", +"description": "Required. Start time of the window in UTC time." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Cloud Memorystore for Redis API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..08edb90fbdfac189189a3601a78d581cd2c04f45 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v1.json @@ -0,0 +1,2103 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://remotebuildexecution.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Remote Build Execution", + "description": "Supplies a Remote Execution API service for tools such as bazel.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/remote-build-execution/docs/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "remotebuildexecution:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://remotebuildexecution.mtls.googleapis.com/", + "name": "remotebuildexecution", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "media": { + "methods": { + "download": { + "description": "Downloads media. Download is supported on the URI `/v1/media/{+name}?alt=media`.", + "flatPath": "v1/media/{mediaId}", + "httpMethod": "GET", + "id": "remotebuildexecution.media.download", + "parameterOrder": [ + "resourceName" + ], + "parameters": { + "resourceName": { + "description": "Name of the media that is being downloaded. See ReadRequest.resource_name.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/media/{+resourceName}", + "response": { + "$ref": "GoogleBytestreamMedia" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "supportsMediaDownload": true + }, + "upload": { + "description": "Uploads media. Upload is supported on the URI `/upload/v1/media/{+name}`.", + "flatPath": "v1/media/{mediaId}", + "httpMethod": "POST", + "id": "remotebuildexecution.media.upload", + "mediaUpload": { + "accept": [ + "*/*" + ], + "protocols": { + "simple": { + "multipart": true, + "path": "/upload/v1/media/{+resourceName}" + } + } + }, + "parameterOrder": [ + "resourceName" + ], + "parameters": { + "resourceName": { + "description": "Name of the media that is being downloaded. See ReadRequest.resource_name.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/media/{+resourceName}", + "request": { + "$ref": "GoogleBytestreamMedia" + }, + "response": { + "$ref": "GoogleBytestreamMedia" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "supportsMediaUpload": true + } + } + }, + "operations": { + "methods": { + "cancel": { + "description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", + "flatPath": "v1/operations/{operationsId}:cancel", + "httpMethod": "POST", + "id": "remotebuildexecution.operations.cancel", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be cancelled.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}:cancel", + "request": { + "$ref": "GoogleLongrunningCancelOperationRequest" + }, + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", + "flatPath": "v1/operations/{operationsId}", + "httpMethod": "DELETE", + "id": "remotebuildexecution.operations.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource to be deleted.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleProtobufEmpty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v1/operations", + "httpMethod": "GET", + "id": "remotebuildexecution.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^operations$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "projects": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1/projects/{projectsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "remotebuildexecution.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20210712", + "rootUrl": "https://remotebuildexecution.googleapis.com/", + "schemas": { + "BuildBazelRemoteExecutionV2Action": { + "description": "An `Action` captures all the information about an execution which is required to reproduce it. `Action`s are the core component of the [Execution] service. A single `Action` represents a repeatable action that can be performed by the execution service. `Action`s can be succinctly identified by the digest of their wire format encoding and, once an `Action` has been executed, will be cached in the action cache. Future requests can then use the cached result rather than needing to run afresh. When a server completes execution of an Action, it MAY choose to cache the result in the ActionCache unless `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By default, future calls to Execute the same `Action` will also serve their results from the cache. Clients must take care to understand the caching behaviour. Ideally, all `Action`s will be reproducible so that serving a result from cache is always desirable and correct.", + "id": "BuildBazelRemoteExecutionV2Action", + "properties": { + "commandDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Command to run, which MUST be present in the ContentAddressableStorage." + }, + "doNotCache": { + "description": "If true, then the `Action`'s result cannot be cached, and in-flight requests for the same `Action` may not be merged.", + "type": "boolean" + }, + "inputRootDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the root Directory for the input files. The files in the directory tree are available in the correct location on the build machine before the command is executed. The root directory, as well as every subdirectory and content blob referred to, MUST be in the ContentAddressableStorage." + }, + "platform": { + "$ref": "BuildBazelRemoteExecutionV2Platform", + "description": "The optional platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. New in version 2.2: clients SHOULD set these platform properties as well as those in the Command. Servers SHOULD prefer those set here." + }, + "salt": { + "description": "An optional additional salt value used to place this `Action` into a separate cache namespace from other instances having the same field contents. This salt typically comes from operational configuration specific to sources such as repo and service configuration, and allows disowning an entire set of ActionResults that might have been poisoned by buggy software or tool failures.", + "format": "byte", + "type": "string" + }, + "timeout": { + "description": "A timeout after which the execution should be killed. If the timeout is absent, then the client is specifying that the execution should continue as long as the server will let it. The server SHOULD impose a timeout if the client does not specify one, however, if the client does specify a timeout that is longer than the server's maximum timeout, the server MUST reject the request. The timeout is a part of the Action message, and therefore two `Actions` with different timeouts are different, even if they are otherwise identical. This is because, if they were not, running an `Action` with a lower timeout than is required might result in a cache hit from an execution run with a longer timeout, hiding the fact that the timeout is too short. By encoding it directly in the `Action`, a lower timeout will result in a cache miss and the execution timeout will fail immediately, rather than whenever the cache entry gets evicted.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ActionResult": { + "description": "An ActionResult represents the result of an Action being run. It is advised that at least one field (for example `ActionResult.execution_metadata.Worker`) have a non-default value, to ensure that the serialized value is non-empty, which can then be used as a basic data sanity check.", + "id": "BuildBazelRemoteExecutionV2ActionResult", + "properties": { + "executionMetadata": { + "$ref": "BuildBazelRemoteExecutionV2ExecutedActionMetadata", + "description": "The details of the execution that originally produced this result." + }, + "exitCode": { + "description": "The exit code of the command.", + "format": "int32", + "type": "integer" + }, + "outputDirectories": { + "description": "The output directories of the action. For each output directory requested in the `output_directories` or `output_paths` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: \"a/b/dir\" tree_digest: { hash: \"4a73bc9d03...\", size: 55 } } // Tree proto with hash \"4a73bc9d03...\" and size 55: { root: { files: [ { name: \"bar\", digest: { hash: \"4a73bc9d03...\", size: 65534 } } ], directories: [ { name: \"foo\", digest: { hash: \"4cf2eda940...\", size: 43 } } ] } children : { // (Directory proto with hash \"4cf2eda940...\" and size 43) files: [ { name: \"baz\", digest: { hash: \"b2c941073e...\", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name as listed in `output_files` of the Command was found in `output_directories`, but was not a directory, the server will return a FAILED_PRECONDITION.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputDirectory" + }, + "type": "array" + }, + "outputDirectorySymlinks": { + "description": "The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "outputFileSymlinks": { + "description": "The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name as listed in `output_files` of the Command was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "outputFiles": { + "description": "The output files of the action. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file (`output_symlinks` field after v2.1). If an output listed in `output_files` was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputFile" + }, + "type": "array" + }, + "outputSymlinks": { + "description": "New in v2.1: this field will only be populated if the command `output_paths` field was used, and not the pre v2.1 `output_files` or `output_directories` fields. The output paths of the action that are symbolic links to other paths. Those may be links to other outputs, or inputs, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. A single entry for each output requested in `output_paths` field of the Action, if the corresponding path existed after the action completed and was a symbolic link. If the action does not produce a requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "stderrDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest for a blob containing the standard error of the action, which can be retrieved from the ContentAddressableStorage." + }, + "stderrRaw": { + "description": "The standard error buffer of the action. The server SHOULD NOT inline stderr unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + }, + "stdoutDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest for a blob containing the standard output of the action, which can be retrieved from the ContentAddressableStorage." + }, + "stdoutRaw": { + "description": "The standard output buffer of the action. The server SHOULD NOT inline stdout unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Command": { + "description": "A `Command` is the actual command executed by a worker running an Action and specifications of its environment. Except as otherwise required, the environment (such as which system libraries or binaries are available, and what filesystems are mounted where) is defined by and specific to the implementation of the remote execution API.", + "id": "BuildBazelRemoteExecutionV2Command", + "properties": { + "arguments": { + "description": "The arguments to the command. The first argument must be the path to the executable, which must be either a relative path, in which case it is evaluated with respect to the input root, or an absolute path.", + "items": { + "type": "string" + }, + "type": "array" + }, + "environmentVariables": { + "description": "The environment variables to set when running the program. The worker may provide its own default environment variables; these defaults can be overridden using this field. Additional variables can also be specified. In order to ensure that equivalent Commands always hash to the same value, the environment variables MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2CommandEnvironmentVariable" + }, + "type": "array" + }, + "outputDirectories": { + "description": "A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use `output_paths` instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputFiles": { + "description": "A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use `output_paths` instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputNodeProperties": { + "description": "A list of keys for node properties the client expects to retrieve for output files and directories. Keys are either names of string-based NodeProperty or names of fields in NodeProperties. In order to ensure that equivalent `Action`s always hash to the same value, the node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of string-based properties is server-dependent. If a property is not recognized by the server, the server will return an `INVALID_ARGUMENT`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputPaths": { + "description": "A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED `output_files` and `output_directories` fields. If `output_paths` is used, `output_files` and `output_directories` will be ignored!", + "items": { + "type": "string" + }, + "type": "array" + }, + "platform": { + "$ref": "BuildBazelRemoteExecutionV2Platform", + "description": "The platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. DEPRECATED as of v2.2: platform properties are now specified directly in the action. See documentation note in the Action for migration." + }, + "workingDirectory": { + "description": "The working directory, relative to the input root, for the command to run in. It must be a directory which exists in the input tree. If it is left empty, then the action is run in the input root.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2CommandEnvironmentVariable": { + "description": "An `EnvironmentVariable` is one variable to set in the running program's environment.", + "id": "BuildBazelRemoteExecutionV2CommandEnvironmentVariable", + "properties": { + "name": { + "description": "The variable name.", + "type": "string" + }, + "value": { + "description": "The variable value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Digest": { + "description": "A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields.", + "id": "BuildBazelRemoteExecutionV2Digest", + "properties": { + "hash": { + "description": "The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.", + "type": "string" + }, + "sizeBytes": { + "description": "The size of the blob, in bytes.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Directory": { + "description": "A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both \"Foo\" and \"foo\" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. * The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: \"bar\", digest: { hash: \"4a73bc9d03...\", size: 65534 }, node_properties: [ { \"name\": \"MTime\", \"value\": \"2017-01-15T01:30:15.01Z\" } ] } ], directories: [ { name: \"foo\", digest: { hash: \"4cf2eda940...\", size: 43 } } ] } // (Directory proto with hash \"4cf2eda940...\" and size 43) { files: [ { name: \"baz\", digest: { hash: \"b2c941073e...\", size: 1294, }, is_executable: true } ] } ```", + "id": "BuildBazelRemoteExecutionV2Directory", + "properties": { + "directories": { + "description": "The subdirectories in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2DirectoryNode" + }, + "type": "array" + }, + "files": { + "description": "The files in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2FileNode" + }, + "type": "array" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "symlinks": { + "description": "The symlinks in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2SymlinkNode" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2DirectoryNode": { + "description": "A `DirectoryNode` represents a child of a Directory which is itself a `Directory` and its associated metadata.", + "id": "BuildBazelRemoteExecutionV2DirectoryNode", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Directory object represented. See Digest for information about how to take the digest of a proto message." + }, + "name": { + "description": "The name of the directory.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecuteOperationMetadata": { + "description": "Metadata about an ongoing execution, which will be contained in the metadata field of the Operation.", + "id": "BuildBazelRemoteExecutionV2ExecuteOperationMetadata", + "properties": { + "actionDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Action being executed." + }, + "stage": { + "description": "The current stage of execution.", + "enum": [ + "UNKNOWN", + "CACHE_CHECK", + "QUEUED", + "EXECUTING", + "COMPLETED" + ], + "enumDescriptions": [ + "Invalid value.", + "Checking the result against the cache.", + "Currently idle, awaiting a free machine to execute.", + "Currently being executed by a worker.", + "Finished execution." + ], + "type": "string" + }, + "stderrStreamName": { + "description": "If set, the client can use this resource name with ByteStream.Read to stream the standard error from the endpoint hosting streamed responses.", + "type": "string" + }, + "stdoutStreamName": { + "description": "If set, the client can use this resource name with ByteStream.Read to stream the standard output from the endpoint hosting streamed responses.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecuteResponse": { + "description": "The response message for Execution.Execute, which will be contained in the response field of the Operation.", + "id": "BuildBazelRemoteExecutionV2ExecuteResponse", + "properties": { + "cachedResult": { + "description": "True if the result was served from cache, false if it was executed.", + "type": "boolean" + }, + "message": { + "description": "Freeform informational message with details on the execution of the action that may be displayed to the user upon failure or when requested explicitly.", + "type": "string" + }, + "result": { + "$ref": "BuildBazelRemoteExecutionV2ActionResult", + "description": "The result of the action." + }, + "serverLogs": { + "additionalProperties": { + "$ref": "BuildBazelRemoteExecutionV2LogFile" + }, + "description": "An optional list of additional log outputs the server wishes to provide. A server can use this to return execution-specific logs however it wishes. This is intended primarily to make it easier for users to debug issues that may be outside of the actual job execution, such as by identifying the worker executing the action or by providing logs from the worker's setup phase. The keys SHOULD be human readable so that a client can display them to a user.", + "type": "object" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "If the status has a code other than `OK`, it indicates that the action did not finish execution. For example, if the operation times out during execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST use this field for errors in execution, rather than the error field on the `Operation` object. If the status code is other than `OK`, then the result MUST NOT be cached. For an error status, the `result` field is optional; the server may populate the output-, stdout-, and stderr-related fields if it has any information available, such as the stdout and stderr of a timed-out action." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecutedActionMetadata": { + "description": "ExecutedActionMetadata contains details about a completed execution.", + "id": "BuildBazelRemoteExecutionV2ExecutedActionMetadata", + "properties": { + "auxiliaryMetadata": { + "description": "Details that are specific to the kind of worker used. For example, on POSIX-like systems this could contain a message with getrusage(2) statistics.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "executionCompletedTimestamp": { + "description": "When the worker completed executing the action command.", + "format": "google-datetime", + "type": "string" + }, + "executionStartTimestamp": { + "description": "When the worker started executing the action command.", + "format": "google-datetime", + "type": "string" + }, + "inputFetchCompletedTimestamp": { + "description": "When the worker finished fetching action inputs.", + "format": "google-datetime", + "type": "string" + }, + "inputFetchStartTimestamp": { + "description": "When the worker started fetching action inputs.", + "format": "google-datetime", + "type": "string" + }, + "outputUploadCompletedTimestamp": { + "description": "When the worker finished uploading action outputs.", + "format": "google-datetime", + "type": "string" + }, + "outputUploadStartTimestamp": { + "description": "When the worker started uploading action outputs.", + "format": "google-datetime", + "type": "string" + }, + "queuedTimestamp": { + "description": "When was the action added to the queue.", + "format": "google-datetime", + "type": "string" + }, + "worker": { + "description": "The name of the worker which ran the execution.", + "type": "string" + }, + "workerCompletedTimestamp": { + "description": "When the worker completed the action, including all stages.", + "format": "google-datetime", + "type": "string" + }, + "workerStartTimestamp": { + "description": "When the worker received the action.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2FileNode": { + "description": "A `FileNode` represents a single file and associated metadata.", + "id": "BuildBazelRemoteExecutionV2FileNode", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the file's content." + }, + "isExecutable": { + "description": "True if file is executable, false otherwise.", + "type": "boolean" + }, + "name": { + "description": "The name of the file.", + "type": "string" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2LogFile": { + "description": "A `LogFile` is a log stored in the CAS.", + "id": "BuildBazelRemoteExecutionV2LogFile", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the log contents." + }, + "humanReadable": { + "description": "This is a hint as to the purpose of the log, and is set to true if the log is human-readable text that can be usefully displayed to a user, and false otherwise. For instance, if a command-line client wishes to print the server logs to the terminal for a failed action, this allows it to avoid displaying a binary file.", + "type": "boolean" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2NodeProperties": { + "description": "Node properties for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the properties that it accepts.", + "id": "BuildBazelRemoteExecutionV2NodeProperties", + "properties": { + "mtime": { + "description": "The file's last modification timestamp.", + "format": "google-datetime", + "type": "string" + }, + "properties": { + "description": "A list of string-based NodeProperties.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperty" + }, + "type": "array" + }, + "unixMode": { + "description": "The UNIX file mode, e.g., 0755.", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2NodeProperty": { + "description": "A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times.", + "id": "BuildBazelRemoteExecutionV2NodeProperty", + "properties": { + "name": { + "description": "The property name.", + "type": "string" + }, + "value": { + "description": "The property value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputDirectory": { + "description": "An `OutputDirectory` is the output in an `ActionResult` corresponding to a directory's full contents rather than a single file.", + "id": "BuildBazelRemoteExecutionV2OutputDirectory", + "properties": { + "path": { + "description": "The full path of the directory relative to the working directory. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. The empty string value is allowed, and it denotes the entire working directory.", + "type": "string" + }, + "treeDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the encoded Tree proto containing the directory's contents." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputFile": { + "description": "An `OutputFile` is similar to a FileNode, but it is used as an output in an `ActionResult`. It allows a full file path rather than only a name.", + "id": "BuildBazelRemoteExecutionV2OutputFile", + "properties": { + "contents": { + "description": "The contents of the file if inlining was requested. The server SHOULD NOT inline file contents unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the file's content." + }, + "isExecutable": { + "description": "True if file is executable, false otherwise.", + "type": "boolean" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "path": { + "description": "The full path of the file relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputSymlink": { + "description": "An `OutputSymlink` is similar to a Symlink, but it is used as an output in an `ActionResult`. `OutputSymlink` is binary-compatible with `SymlinkNode`.", + "id": "BuildBazelRemoteExecutionV2OutputSymlink", + "properties": { + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "path": { + "description": "The full path of the symlink relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash.", + "type": "string" + }, + "target": { + "description": "The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. `..` components are allowed anywhere in the target path.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Platform": { + "description": "A `Platform` is a set of requirements, such as hardware, operating system, or compiler toolchain, for an Action's execution environment. A `Platform` is represented as a series of key-value pairs representing the properties that are required of the platform.", + "id": "BuildBazelRemoteExecutionV2Platform", + "properties": { + "properties": { + "description": "The properties that make up this platform. In order to ensure that equivalent `Platform`s always hash to the same value, the properties MUST be lexicographically sorted by name, and then by value. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2PlatformProperty" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2PlatformProperty": { + "description": "A single property for the environment. The server is responsible for specifying the property `name`s that it accepts. If an unknown `name` is provided in the requirements for an Action, the server SHOULD reject the execution request. If permitted by the server, the same `name` may occur multiple times. The server is also responsible for specifying the interpretation of property `value`s. For instance, a property describing how much RAM must be available may be interpreted as allowing a worker with 16GB to fulfill a request for 8GB, while a property describing the OS environment on which the action must be performed may require an exact match with the worker's OS. The server MAY use the `value` of one or more properties to determine how it sets up the execution environment, such as by making specific system files available to the worker. Both names and values are typically case-sensitive. Note that the platform is implicitly part of the action digest, so even tiny changes in the names or values (like changing case) may result in different action cache entries.", + "id": "BuildBazelRemoteExecutionV2PlatformProperty", + "properties": { + "name": { + "description": "The property name.", + "type": "string" + }, + "value": { + "description": "The property value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2RequestMetadata": { + "description": "An optional Metadata to attach to any RPC request to tell the server about an external context of the request. The server may use this for logging or other purposes. To use it, the client attaches the header to the call using the canonical proto serialization: * name: `build.bazel.remote.execution.v2.requestmetadata-bin` * contents: the base64 encoded binary `RequestMetadata` message. Note: the gRPC library serializes binary headers encoded in base 64 by default (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests). Therefore, if the gRPC library is used to pass/retrieve this metadata, the user may ignore the base64 encoding and assume it is simply serialized as a binary message.", + "id": "BuildBazelRemoteExecutionV2RequestMetadata", + "properties": { + "actionId": { + "description": "An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.", + "type": "string" + }, + "actionMnemonic": { + "description": "A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools.", + "type": "string" + }, + "configurationId": { + "description": "An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees.", + "type": "string" + }, + "correlatedInvocationsId": { + "description": "An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch.", + "type": "string" + }, + "targetId": { + "description": "An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target.", + "type": "string" + }, + "toolDetails": { + "$ref": "BuildBazelRemoteExecutionV2ToolDetails", + "description": "The details for the tool invoking the requests." + }, + "toolInvocationId": { + "description": "An identifier that ties multiple actions together to a final result. For example, multiple actions are required to build and run foo_test.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2SymlinkNode": { + "description": "A `SymlinkNode` represents a symbolic link.", + "id": "BuildBazelRemoteExecutionV2SymlinkNode", + "properties": { + "name": { + "description": "The name of the symlink.", + "type": "string" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "target": { + "description": "The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. `..` components are allowed anywhere in the target path as logical canonicalization may lead to different behavior in the presence of directory symlinks (e.g. `foo/../bar` may not be the same as `bar`). To reduce potential cache misses, canonicalization is still recommended where this is possible without impacting correctness.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ToolDetails": { + "description": "Details for the tool used to call the API.", + "id": "BuildBazelRemoteExecutionV2ToolDetails", + "properties": { + "toolName": { + "description": "Name of the tool, e.g. bazel.", + "type": "string" + }, + "toolVersion": { + "description": "Version of the tool used for the request, e.g. 5.0.3.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Tree": { + "description": "A `Tree` contains all the Directory protos in a single directory Merkle tree, compressed into one message.", + "id": "BuildBazelRemoteExecutionV2Tree", + "properties": { + "children": { + "description": "All the child directories: the directories referred to by the root and, recursively, all its children. In order to reconstruct the directory tree, the client must take the digests of each of the child directories and then build up a tree starting from the `root`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2Directory" + }, + "type": "array" + }, + "root": { + "$ref": "BuildBazelRemoteExecutionV2Directory", + "description": "The root directory in the tree." + } + }, + "type": "object" + }, + "GoogleBytestreamMedia": { + "description": "Media resource.", + "id": "GoogleBytestreamMedia", + "properties": { + "resourceName": { + "description": "Name of the media resource.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandDurations": { + "description": "CommandDuration contains the various duration metrics tracked when a bot performs a command.", + "id": "GoogleDevtoolsRemotebuildbotCommandDurations", + "properties": { + "casRelease": { + "description": "The time spent to release the CAS blobs used by the task.", + "format": "google-duration", + "type": "string" + }, + "cmWaitForAssignment": { + "description": "The time spent waiting for Container Manager to assign an asynchronous container for execution.", + "format": "google-duration", + "type": "string" + }, + "dockerPrep": { + "description": "The time spent preparing the command to be run in a Docker container (includes pulling the Docker image, if necessary).", + "format": "google-duration", + "type": "string" + }, + "dockerPrepStartTime": { + "description": "The timestamp when docker preparation begins.", + "format": "google-datetime", + "type": "string" + }, + "download": { + "description": "The time spent downloading the input files and constructing the working directory.", + "format": "google-duration", + "type": "string" + }, + "downloadStartTime": { + "description": "The timestamp when downloading the input files begins.", + "format": "google-datetime", + "type": "string" + }, + "execStartTime": { + "description": "The timestamp when execution begins.", + "format": "google-datetime", + "type": "string" + }, + "execution": { + "description": "The time spent executing the command (i.e., doing useful work).", + "format": "google-duration", + "type": "string" + }, + "isoPrepDone": { + "description": "The timestamp when preparation is done and bot starts downloading files.", + "format": "google-datetime", + "type": "string" + }, + "overall": { + "description": "The time spent completing the command, in total.", + "format": "google-duration", + "type": "string" + }, + "stdout": { + "description": "The time spent uploading the stdout logs.", + "format": "google-duration", + "type": "string" + }, + "upload": { + "description": "The time spent uploading the output files.", + "format": "google-duration", + "type": "string" + }, + "uploadStartTime": { + "description": "The timestamp when uploading the output files begins.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandEvents": { + "description": "CommandEvents contains counters for the number of warnings and errors that occurred during the execution of a command.", + "id": "GoogleDevtoolsRemotebuildbotCommandEvents", + "properties": { + "cmUsage": { + "description": "Indicates if and how Container Manager is being used for task execution.", + "enum": [ + "CONFIG_NONE", + "CONFIG_MATCH", + "CONFIG_MISMATCH" + ], + "enumDescriptions": [ + "Container Manager is disabled or not running for this execution.", + "Container Manager is enabled and there was a matching container available for use during execution.", + "Container Manager is enabled, but there was no matching container available for execution." + ], + "type": "string" + }, + "dockerCacheHit": { + "description": "Indicates whether we are using a cached Docker image (true) or had to pull the Docker image (false) for this command.", + "type": "boolean" + }, + "dockerImageName": { + "description": "Docker Image name.", + "type": "string" + }, + "inputCacheMiss": { + "description": "The input cache miss ratio.", + "format": "float", + "type": "number" + }, + "numErrors": { + "description": "The number of errors reported.", + "format": "uint64", + "type": "string" + }, + "numWarnings": { + "description": "The number of warnings reported.", + "format": "uint64", + "type": "string" + }, + "outputLocation": { + "description": "Indicates whether output files and/or output directories were found relative to the execution root or to the user provided work directory or both or none.", + "enum": [ + "LOCATION_UNDEFINED", + "LOCATION_NONE", + "LOCATION_EXEC_ROOT_RELATIVE", + "LOCATION_WORKING_DIR_RELATIVE", + "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE", + "LOCATION_EXEC_ROOT_RELATIVE_OUTPUT_OUTSIDE_WORKING_DIR", + "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE_OUTPUT_OUTSIDE_WORKING_DIR" + ], + "enumDescriptions": [ + "Location is set to LOCATION_UNDEFINED for tasks where the working directorty is not specified or is identical to the execution root directory.", + "No output files or directories were found neither relative to the execution root directory nor relative to the working directory.", + "Output files or directories were found relative to the execution root directory but not relative to the working directory.", + "Output files or directories were found relative to the working directory but not relative to the execution root directory.", + "Output files or directories were found both relative to the execution root directory and relative to the working directory.", + "Output files or directories were found relative to the execution root directory but not relative to the working directory. In addition at least one output file or directory was found outside of the working directory such that a working-directory-relative-path would have needed to start with a `..`.", + "Output files or directories were found both relative to the execution root directory and relative to the working directory. In addition at least one exec-root-relative output file or directory was found outside of the working directory such that a working-directory-relative-path would have needed to start with a `..`." + ], + "type": "string" + }, + "usedAsyncContainer": { + "description": "Indicates whether an asynchronous container was used for execution.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandStatus": { + "description": "The internal status of the command result.", + "id": "GoogleDevtoolsRemotebuildbotCommandStatus", + "properties": { + "code": { + "description": "The status code.", + "enum": [ + "OK", + "INVALID_ARGUMENT", + "DEADLINE_EXCEEDED", + "NOT_FOUND", + "PERMISSION_DENIED", + "INTERNAL", + "ABORTED", + "FAILED_PRECONDITION", + "CLEANUP_ERROR", + "DOWNLOAD_INPUTS_ERROR", + "UNKNOWN", + "UPLOAD_OUTPUTS_ERROR", + "UPLOAD_OUTPUTS_BYTES_LIMIT_EXCEEDED", + "DOCKER_LOGIN_ERROR", + "DOCKER_IMAGE_PULL_ERROR", + "DOCKER_IMAGE_EXIST_ERROR", + "DUPLICATE_INPUTS", + "DOCKER_IMAGE_PERMISSION_DENIED", + "DOCKER_IMAGE_NOT_FOUND", + "WORKING_DIR_NOT_FOUND", + "WORKING_DIR_NOT_IN_BASE_DIR", + "DOCKER_UNAVAILABLE", + "NO_CUDA_CAPABLE_DEVICE", + "REMOTE_CAS_DOWNLOAD_ERROR", + "REMOTE_CAS_UPLOAD_ERROR", + "LOCAL_CASPROXY_NOT_RUNNING", + "DOCKER_CREATE_CONTAINER_ERROR", + "DOCKER_INVALID_ULIMIT", + "DOCKER_UNKNOWN_RUNTIME", + "DOCKER_UNKNOWN_CAPABILITY", + "DOCKER_UNKNOWN_ERROR", + "DOCKER_CREATE_COMPUTE_SYSTEM_ERROR", + "DOCKER_PREPARELAYER_ERROR", + "DOCKER_INCOMPATIBLE_OS_ERROR", + "DOCKER_CREATE_RUNTIME_FILE_NOT_FOUND", + "DOCKER_CREATE_RUNTIME_PERMISSION_DENIED", + "DOCKER_CREATE_PROCESS_FILE_NOT_FOUND", + "DOCKER_CREATE_COMPUTE_SYSTEM_INCORRECT_PARAMETER_ERROR", + "DOCKER_TOO_MANY_SYMBOLIC_LINK_LEVELS", + "LOCAL_CONTAINER_MANAGER_NOT_RUNNING", + "DOCKER_IMAGE_VPCSC_PERMISSION_DENIED", + "WORKING_DIR_NOT_RELATIVE", + "DOCKER_MISSING_CONTAINER" + ], + "enumDescriptions": [ + "The command succeeded.", + "The command input was invalid.", + "The command had passed its expiry time while it was still running.", + "The resources requested by the command were not found.", + "The command failed due to permission errors.", + "The command failed because of some invariants expected by the underlying system have been broken. This usually indicates a bug wit the system.", + "The command was aborted.", + "The command failed because the system is not in a state required for the command, e.g. the command inputs cannot be found on the server.", + "The bot failed to do the cleanup, e.g. unable to delete the command working directory or the command process.", + "The bot failed to download the inputs.", + "Unknown error.", + "The bot failed to upload the outputs.", + "The bot tried to upload files having a total size that is too large.", + "The bot failed to login to docker.", + "The bot failed to pull docker image.", + "The bot failed to check docker images.", + "The inputs contain duplicate files.", + "The bot doesn't have the permissions to pull docker images.", + "The docker image cannot be found.", + "Working directory is not found.", + "Working directory is not under the base directory", + "There are issues with docker service/runtime.", + "The command failed with \"no cuda-capable device is detected\" error.", + "The bot encountered errors from remote CAS when downloading blobs.", + "The bot encountered errors from remote CAS when uploading blobs.", + "The local casproxy is not running.", + "The bot couldn't start the container.", + "The docker ulimit is not valid.", + "The docker runtime is unknown.", + "The docker capability is unknown.", + "The command failed with unknown docker errors.", + "Docker failed to run containers with CreateComputeSystem error.", + "Docker failed to run containers with hcsshim::PrepareLayer error.", + "Docker incompatible operating system error.", + "Docker failed to create OCI runtime because of file not found.", + "Docker failed to create OCI runtime because of permission denied.", + "Docker failed to create process because of file not found.", + "Docker failed to run containers with CreateComputeSystem error that involves an incorrect parameter (more specific version of DOCKER_CREATE_COMPUTE_SYSTEM_ERROR that is user-caused).", + "Docker failed to create an overlay mount because of too many levels of symbolic links.", + "The local Container Manager is not running.", + "Docker failed because a request was denied by the organization's policy.", + "Working directory is not relative", + "Docker cannot find the container specified in the command. This error is likely to only occur if an asynchronous container is not running when the command is run." + ], + "type": "string" + }, + "message": { + "description": "The error message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsage": { + "description": "ResourceUsage is the system resource usage of the host machine.", + "id": "GoogleDevtoolsRemotebuildbotResourceUsage", + "properties": { + "cpuUsedPercent": { + "format": "double", + "type": "number" + }, + "diskUsage": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageStat" + }, + "memoryUsage": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageStat" + }, + "totalDiskIoStats": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageIOStats" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsageIOStats": { + "id": "GoogleDevtoolsRemotebuildbotResourceUsageIOStats", + "properties": { + "readBytesCount": { + "format": "uint64", + "type": "string" + }, + "readCount": { + "format": "uint64", + "type": "string" + }, + "readTimeMs": { + "format": "uint64", + "type": "string" + }, + "writeBytesCount": { + "format": "uint64", + "type": "string" + }, + "writeCount": { + "format": "uint64", + "type": "string" + }, + "writeTimeMs": { + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsageStat": { + "id": "GoogleDevtoolsRemotebuildbotResourceUsageStat", + "properties": { + "total": { + "format": "uint64", + "type": "string" + }, + "used": { + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig": { + "description": "AcceleratorConfig defines the accelerator cards to attach to the VM.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig", + "properties": { + "acceleratorCount": { + "description": "The number of guest accelerator cards exposed to each VM.", + "format": "int64", + "type": "string" + }, + "acceleratorType": { + "description": "The type of accelerator to attach to each VM, e.g. \"nvidia-tesla-k80\" for nVidia Tesla K80.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale": { + "description": "Autoscale defines the autoscaling policy of a worker pool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale", + "properties": { + "maxSize": { + "description": "The maximal number of workers. Must be equal to or greater than min_size.", + "format": "int64", + "type": "string" + }, + "minSize": { + "description": "The minimal number of workers. Must be greater than 0.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest": { + "description": "The request used for `CreateInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest", + "properties": { + "instance": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "description": "Specifies the instance to create. The name in the instance, if specified in the instance, is ignored." + }, + "instanceId": { + "description": "ID of the created instance. A valid `instance_id` must: be 6-50 characters long, contain only lowercase letters, digits, hyphens and underscores, start with a lowercase letter, and end with a lowercase letter or a digit.", + "type": "string" + }, + "parent": { + "description": "Resource name of the project containing the instance. Format: `projects/[PROJECT_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest": { + "description": "The request used for `CreateWorkerPool`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest", + "properties": { + "parent": { + "description": "Resource name of the instance in which to create the new worker pool. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + }, + "poolId": { + "description": "ID of the created worker pool. A valid pool ID must: be 6-50 characters long, contain only lowercase letters, digits, hyphens and underscores, start with a lowercase letter, and end with a lowercase letter or a digit.", + "type": "string" + }, + "workerPool": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "description": "Specifies the worker pool to create. The name in the worker pool, if specified, is ignored." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest": { + "description": "The request used for `DeleteInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest", + "properties": { + "name": { + "description": "Name of the instance to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest": { + "description": "The request used for DeleteWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest", + "properties": { + "name": { + "description": "Name of the worker pool to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy": { + "description": "FeaturePolicy defines features allowed to be used on RBE instances, as well as instance-wide behavior changes that take effect without opt-in or opt-out at usage time.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy", + "properties": { + "containerImageSources": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Which container image sources are allowed. Currently only RBE-supported registry (gcr.io) is allowed. One can allow all repositories under a project or one specific repository only. E.g. container_image_sources { policy: RESTRICTED allowed_values: [ \"gcr.io/project-foo\", \"gcr.io/project-bar/repo-baz\", ] } will allow any repositories under \"gcr.io/project-foo\" plus the repository \"gcr.io/project-bar/repo-baz\". Default (UNSPECIFIED) is equivalent to any source is allowed." + }, + "dockerAddCapabilities": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerAddCapabilities can be used or what capabilities are allowed." + }, + "dockerChrootPath": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerChrootPath can be used." + }, + "dockerNetwork": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerNetwork can be used or what network modes are allowed. E.g. one may allow `off` value only via `allowed_values`." + }, + "dockerPrivileged": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerPrivileged can be used." + }, + "dockerRunAsRoot": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerRunAsRoot can be used." + }, + "dockerRuntime": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerRuntime is allowed to be set or what runtimes are allowed. Note linux_isolation takes precedence, and if set, docker_runtime values may be rejected if they are incompatible with the selected isolation." + }, + "dockerSiblingContainers": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerSiblingContainers can be used." + }, + "linuxIsolation": { + "description": "linux_isolation allows overriding the docker runtime used for containers started on Linux.", + "enum": [ + "LINUX_ISOLATION_UNSPECIFIED", + "GVISOR", + "OFF" + ], + "enumDescriptions": [ + "Default value. Will be using Linux default runtime.", + "Use gVisor runsc runtime.", + "Use stardard Linux runtime. This has the same behaviour as unspecified, but it can be used to revert back from gVisor." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature": { + "description": "Defines whether a feature can be used or what values are accepted.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "properties": { + "allowedValues": { + "description": "A list of acceptable values. Only effective when the policy is `RESTRICTED`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "policy": { + "description": "The policy of the feature.", + "enum": [ + "POLICY_UNSPECIFIED", + "ALLOWED", + "FORBIDDEN", + "RESTRICTED" + ], + "enumDescriptions": [ + "Default value, if not explicitly set. Equivalent to FORBIDDEN, unless otherwise documented on a specific Feature.", + "Feature is explicitly allowed.", + "Feature is forbidden. Requests attempting to leverage it will get an FailedPrecondition error, with a message like: \"Feature forbidden by FeaturePolicy: Feature on instance \"", + "Only the values specified in the `allowed_values` are allowed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest": { + "description": "The request used for `GetInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest", + "properties": { + "name": { + "description": "Name of the instance to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest": { + "description": "The request used for GetWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest", + "properties": { + "name": { + "description": "Name of the worker pool to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance": { + "description": "Instance conceptually encapsulates all Remote Build Execution resources for remote builds. An instance consists of storage and compute resources (for example, `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used for running remote builds. All Remote Build Execution API calls are scoped to an instance.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "properties": { + "featurePolicy": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy", + "description": "The policy to define whether or not RBE features can be used or how they can be used." + }, + "location": { + "description": "The location is a GCP region. Currently only `us-central1` is supported.", + "type": "string" + }, + "loggingEnabled": { + "description": "Output only. Whether stack driver logging is enabled for the instance.", + "type": "boolean" + }, + "name": { + "description": "Output only. Instance resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be populated when creating an instance since it is provided in the `instance_id` field.", + "type": "string" + }, + "state": { + "description": "Output only. State of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "RUNNING", + "INACTIVE" + ], + "enumDescriptions": [ + "Not a valid state, but the default value of the enum.", + "The instance is in state `CREATING` once `CreateInstance` is called and before the instance is ready for use.", + "The instance is in state `RUNNING` when it is ready for use.", + "An `INACTIVE` instance indicates that there is a problem that needs to be fixed. Such instances cannot be used for execution and instances that remain in this state for a significant period of time will be removed permanently." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest", + "properties": { + "parent": { + "description": "Resource name of the project. Format: `projects/[PROJECT_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse", + "properties": { + "instances": { + "description": "The list of instances in a given project.", + "items": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest", + "properties": { + "filter": { + "description": "Optional. A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. String values are case-insensitive. The comparison operator must be either `:`, `=`, `!=`, `>`, `>=`, `<=` or `<`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. You can also filter on nested fields. To filter on multiple expressions, you can separate expression using `AND` and `OR` operators, using parentheses to specify precedence. If neither operator is specified, `AND` is assumed. Examples: Include only pools with more than 100 reserved workers: `(worker_count > 100) (worker_config.reserved = true)` Include only pools with a certain label or machines of the e2-standard family: `worker_config.labels.key1 : * OR worker_config.machine_type: e2-standard`", + "type": "string" + }, + "parent": { + "description": "Resource name of the instance. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse", + "properties": { + "workerPools": { + "description": "The list of worker pools in a given instance.", + "items": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest": { + "description": "The request used for `UpdateInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest", + "properties": { + "instance": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "description": "Specifies the instance to update." + }, + "loggingEnabled": { + "description": "Deprecated, use instance.logging_enabled instead. Whether to enable Stackdriver logging for this instance.", + "type": "boolean" + }, + "name": { + "description": "Deprecated, use instance.Name instead. Name of the instance to update. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to instance. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest": { + "description": "The request used for UpdateWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest", + "properties": { + "updateMask": { + "description": "The update mask applies to worker_pool. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", + "format": "google-fieldmask", + "type": "string" + }, + "workerPool": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "description": "Specifies the worker pool to update." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig": { + "description": "Defines the configuration to be used for creating workers in the worker pool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig", + "properties": { + "accelerator": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig", + "description": "The accelerator card attached to each VM." + }, + "diskSizeGb": { + "description": "Required. Size of the disk attached to the worker, in GB. See https://cloud.google.com/compute/docs/disks/", + "format": "int64", + "type": "string" + }, + "diskType": { + "description": "Required. Disk Type to use for the worker. See [Storage options](https://cloud.google.com/compute/docs/disks/#introduction). Currently only `pd-standard` and `pd-ssd` are supported.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels associated with the workers. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International letters are permitted. Label keys must start with a letter. Label values are optional. There can not be more than 64 labels per resource.", + "type": "object" + }, + "machineType": { + "description": "Required. Machine type of the worker, such as `e2-standard-2`. See https://cloud.google.com/compute/docs/machine-types for a list of supported machine types. Note that `f1-micro` and `g1-small` are not yet supported.", + "type": "string" + }, + "maxConcurrentActions": { + "description": "The maximum number of actions a worker can execute concurrently.", + "format": "int64", + "type": "string" + }, + "minCpuPlatform": { + "description": "Minimum CPU platform to use when creating the worker. See [CPU Platforms](https://cloud.google.com/compute/docs/cpu-platforms).", + "type": "string" + }, + "networkAccess": { + "description": "Determines the type of network access granted to workers. Possible values: - \"public\": Workers can connect to the public internet. - \"private\": Workers can only connect to Google APIs and services. - \"restricted-private\": Workers can only connect to Google APIs that are reachable through `restricted.googleapis.com` (`199.36.153.4/30`).", + "type": "string" + }, + "reserved": { + "description": "Determines whether the worker is reserved (equivalent to a Compute Engine on-demand VM and therefore won't be preempted). See [Preemptible VMs](https://cloud.google.com/preemptible-vms/) for more details.", + "type": "boolean" + }, + "soleTenantNodeType": { + "description": "The node type name to be used for sole-tenant nodes.", + "type": "string" + }, + "vmImage": { + "description": "The name of the image used by each VM.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool": { + "description": "A worker pool resource in the Remote Build Execution API.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "properties": { + "autoscale": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale", + "description": "The autoscale policy to apply on a pool." + }, + "channel": { + "description": "Channel specifies the release channel of the pool.", + "type": "string" + }, + "name": { + "description": "WorkerPool resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. name should not be populated when creating a worker pool since it is provided in the `poolId` field.", + "type": "string" + }, + "state": { + "description": "Output only. State of the worker pool.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "RUNNING", + "UPDATING", + "DELETING", + "INACTIVE" + ], + "enumDescriptions": [ + "Not a valid state, but the default value of the enum.", + "The worker pool is in state `CREATING` once `CreateWorkerPool` is called and before all requested workers are ready.", + "The worker pool is in state `RUNNING` when all its workers are ready for use.", + "The worker pool is in state `UPDATING` once `UpdateWorkerPool` is called and before the new configuration has all the requested workers ready for use, and no older configuration has any workers. At that point the state transitions to `RUNNING`.", + "The worker pool is in state `DELETING` once the `Delete` method is called and before the deletion completes.", + "The worker pool is in state `INACTIVE` when the instance hosting the worker pool in not running." + ], + "type": "string" + }, + "workerConfig": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig", + "description": "Specifies the properties, such as machine type and disk size, used for creating workers in a worker pool." + }, + "workerCount": { + "description": "The desired number of workers in the worker pool. Must be a value between 0 and 15000.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2AdminTemp": { + "description": "AdminTemp is a prelimiary set of administration tasks. It's called \"Temp\" because we do not yet know the best way to represent admin tasks; it's possible that this will be entirely replaced in later versions of this API. If this message proves to be sufficient, it will be renamed in the alpha or beta release of this API. This message (suitably marshalled into a protobuf.Any) can be used as the inline_assignment field in a lease; the lease assignment field should simply be `\"admin\"` in these cases. This message is heavily based on Swarming administration tasks from the LUCI project (http://github.com/luci/luci-py/appengine/swarming).", + "id": "GoogleDevtoolsRemoteworkersV1test2AdminTemp", + "properties": { + "arg": { + "description": "The argument to the admin action; see `Command` for semantics.", + "type": "string" + }, + "command": { + "description": "The admin action; see `Command` for legal values.", + "enum": [ + "UNSPECIFIED", + "BOT_UPDATE", + "BOT_RESTART", + "BOT_TERMINATE", + "HOST_RESTART" + ], + "enumDescriptions": [ + "Illegal value.", + "Download and run a new version of the bot. `arg` will be a resource accessible via `ByteStream.Read` to obtain the new bot code.", + "Restart the bot without downloading a new version. `arg` will be a message to log.", + "Shut down the bot. `arg` will be a task resource name (similar to those in tasks.proto) that the bot can use to tell the server that it is terminating.", + "Restart the host computer. `arg` will be a message to log." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Blob": { + "description": "Describes a blob of binary content with its digest.", + "id": "GoogleDevtoolsRemoteworkersV1test2Blob", + "properties": { + "contents": { + "description": "The contents of the blob.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The digest of the blob. This should be verified by the receiver." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandOutputs": { + "description": "DEPRECATED - use CommandResult instead. Describes the actual outputs from the task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandOutputs", + "properties": { + "exitCode": { + "description": "exit_code is only fully reliable if the status' code is OK. If the task exceeded its deadline or was cancelled, the process may still produce an exit code as it is cancelled, and this will be populated, but a successful (zero) is unlikely to be correct unless the status code is OK.", + "format": "int32", + "type": "integer" + }, + "outputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The output files. The blob referenced by the digest should contain one of the following (implementation-dependent): * A marshalled DirectoryMetadata of the returned filesystem * A LUCI-style .isolated file" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandOverhead": { + "description": "DEPRECATED - use CommandResult instead. Can be used as part of CompleteRequest.metadata, or are part of a more sophisticated message.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandOverhead", + "properties": { + "duration": { + "description": "The elapsed time between calling Accept and Complete. The server will also have its own idea of what this should be, but this excludes the overhead of the RPCs and the bot response time.", + "format": "google-duration", + "type": "string" + }, + "overhead": { + "description": "The amount of time *not* spent executing the command (ie uploading/downloading files).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandResult": { + "description": "All information about the execution of a command, suitable for providing as the Bots interface's `Lease.result` field.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandResult", + "properties": { + "duration": { + "description": "The elapsed time between calling Accept and Complete. The server will also have its own idea of what this should be, but this excludes the overhead of the RPCs and the bot response time.", + "format": "google-duration", + "type": "string" + }, + "exitCode": { + "description": "The exit code of the process. An exit code of \"0\" should only be trusted if `status` has a code of OK (otherwise it may simply be unset).", + "format": "int32", + "type": "integer" + }, + "metadata": { + "description": "Implementation-dependent metadata about the task. Both servers and bots may define messages which can be encoded here; bots are free to provide metadata in multiple formats, and servers are free to choose one or more of the values to process and ignore others. In particular, it is *not* considered an error for the bot to provide the server with a field that it doesn't know about.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "outputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The output files. The blob referenced by the digest should contain one of the following (implementation-dependent): * A marshalled DirectoryMetadata of the returned filesystem * A LUCI-style .isolated file" + }, + "overhead": { + "description": "The amount of time *not* spent executing the command (ie uploading/downloading files).", + "format": "google-duration", + "type": "string" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "An overall status for the command. For example, if the command timed out, this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS for memory exhaustion, it might have a code of RESOURCE_EXHAUSTED." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTask": { + "description": "Describes a shell-style task to execute, suitable for providing as the Bots interface's `Lease.payload` field.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTask", + "properties": { + "expectedOutputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs", + "description": "The expected outputs from the task." + }, + "inputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs", + "description": "The inputs to the task." + }, + "timeouts": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts", + "description": "The timeouts of this task." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs": { + "description": "Describes the inputs to a shell-style task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs", + "properties": { + "arguments": { + "description": "The command itself to run (e.g., argv). This field should be passed directly to the underlying operating system, and so it must be sensible to that operating system. For example, on Windows, the first argument might be \"C:\\Windows\\System32\\ping.exe\" - that is, using drive letters and backslashes. A command for a *nix system, on the other hand, would use forward slashes. All other fields in the RWAPI must consistently use forward slashes, since those fields may be interpretted by both the service and the bot.", + "items": { + "type": "string" + }, + "type": "array" + }, + "environmentVariables": { + "description": "All environment variables required by the task.", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable" + }, + "type": "array" + }, + "files": { + "description": "The input filesystem to be set up prior to the task beginning. The contents should be a repeated set of FileMetadata messages though other formats are allowed if better for the implementation (eg, a LUCI-style .isolated file). This field is repeated since implementations might want to cache the metadata, in which case it may be useful to break up portions of the filesystem that change frequently (eg, specific input files) from those that don't (eg, standard header files).", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest" + }, + "type": "array" + }, + "inlineBlobs": { + "description": "Inline contents for blobs expected to be needed by the bot to execute the task. For example, contents of entries in `files` or blobs that are indirectly referenced by an entry there. The bot should check against this list before downloading required task inputs to reduce the number of communications between itself and the remote CAS server.", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Blob" + }, + "type": "array" + }, + "workingDirectory": { + "description": "Directory from which a command is executed. It is a relative directory with respect to the bot's working directory (i.e., \"./\"). If it is non-empty, then it must exist under \"./\". Otherwise, \"./\" will be used.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable": { + "description": "An environment variable required by this task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable", + "properties": { + "name": { + "description": "The envvar name.", + "type": "string" + }, + "value": { + "description": "The envvar value.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs": { + "description": "Describes the expected outputs of the command.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs", + "properties": { + "directories": { + "description": "A list of expected directories, relative to the execution root. All paths MUST be delimited by forward slashes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "files": { + "description": "A list of expected files, relative to the execution root. All paths MUST be delimited by forward slashes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "stderrDestination": { + "description": "The destination to which any stderr should be sent. The method by which the bot should send the stream contents to that destination is not defined in this API. As examples, the destination could be a file referenced in the `files` field in this message, or it could be a URI that must be written via the ByteStream API.", + "type": "string" + }, + "stdoutDestination": { + "description": "The destination to which any stdout should be sent. The method by which the bot should send the stream contents to that destination is not defined in this API. As examples, the destination could be a file referenced in the `files` field in this message, or it could be a URI that must be written via the ByteStream API.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts": { + "description": "Describes the timeouts associated with this task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts", + "properties": { + "execution": { + "description": "This specifies the maximum time that the task can run, excluding the time required to download inputs or upload outputs. That is, the worker will terminate the task if it runs longer than this.", + "format": "google-duration", + "type": "string" + }, + "idle": { + "description": "This specifies the maximum amount of time the task can be idle - that is, go without generating some output in either stdout or stderr. If the process is silent for more than the specified time, the worker will terminate the task.", + "format": "google-duration", + "type": "string" + }, + "shutdown": { + "description": "If the execution or IO timeouts are exceeded, the worker will try to gracefully terminate the task and return any existing logs. However, tasks may be hard-frozen in which case this process will fail. This timeout specifies how long to wait for a terminated task to shut down gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g. SIGKILL on *nix, CTRL_BREAK_EVENT on Windows).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Digest": { + "description": "The CommandTask and CommandResult messages assume the existence of a service that can serve blobs of content, identified by a hash and size known as a \"digest.\" The method by which these blobs may be retrieved is not specified here, but a model implementation is in the Remote Execution API's \"ContentAddressibleStorage\" interface. In the context of the RWAPI, a Digest will virtually always refer to the contents of a file or a directory. The latter is represented by the byte-encoded Directory message.", + "id": "GoogleDevtoolsRemoteworkersV1test2Digest", + "properties": { + "hash": { + "description": "A string-encoded hash (eg \"1a2b3c\", not the byte array [0x1a, 0x2b, 0x3c]) using an implementation-defined hash algorithm (eg SHA-256).", + "type": "string" + }, + "sizeBytes": { + "description": "The size of the contents. While this is not strictly required as part of an identifier (after all, any given hash will have exactly one canonical size), it's useful in almost all cases when one might want to send or retrieve blobs of content and is included here for this reason.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Directory": { + "description": "The contents of a directory. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2Directory", + "properties": { + "directories": { + "description": "Any subdirectories", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata" + }, + "type": "array" + }, + "files": { + "description": "The files in this directory", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2FileMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata": { + "description": "The metadata for a directory. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata", + "properties": { + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "A pointer to the contents of the directory, in the form of a marshalled Directory message." + }, + "path": { + "description": "The path of the directory, as in FileMetadata.path.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2FileMetadata": { + "description": "The metadata for a file. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2FileMetadata", + "properties": { + "contents": { + "description": "If the file is small enough, its contents may also or alternatively be listed here.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "A pointer to the contents of the file. The method by which a client retrieves the contents from a CAS system is not defined here." + }, + "isExecutable": { + "description": "Properties of the file", + "type": "boolean" + }, + "path": { + "description": "The path of this file. If this message is part of the CommandOutputs.outputs fields, the path is relative to the execution root and must correspond to an entry in CommandTask.outputs.files. If this message is part of a Directory message, then the path is relative to the root of that directory. All paths MUST be delimited by forward slashes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningCancelOperationRequest": { + "description": "The request message for Operations.CancelOperation.", + "id": "GoogleLongrunningCancelOperationRequest", + "properties": {}, + "type": "object" + }, + "GoogleLongrunningListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "GoogleLongrunningListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "GoogleLongrunningOperation" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleProtobufEmpty": { + "description": "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 `{}`.", + "id": "GoogleProtobufEmpty", + "properties": {}, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Remote Build Execution API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v1alpha.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v1alpha.json new file mode 100644 index 0000000000000000000000000000000000000000..fc7491b7082cea064010154c0587ee1fea4160f8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v1alpha.json @@ -0,0 +1,2187 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://admin-remotebuildexecution.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Remote Build Execution", + "description": "Supplies a Remote Execution API service for tools such as bazel.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/remote-build-execution/docs/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "remotebuildexecution:v1alpha", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://admin-remotebuildexecution.mtls.googleapis.com/", + "name": "remotebuildexecution", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "instances": { + "methods": { + "create": { + "description": "Creates a new instance in the specified region. Returns a long running operation which contains an instance on completion. While the long running operation is in progress, any call to `GetInstance` returns an instance in state `CREATING`.", + "flatPath": "v1alpha/projects/{projectsId}/instances", + "httpMethod": "POST", + "id": "remotebuildexecution.projects.instances.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Resource name of the project containing the instance. Format: `projects/[PROJECT_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/instances", + "request": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified instance. Returns a long running operation which contains a `google.protobuf.Empty` response on completion. Deleting an instance with worker pools in it will delete these worker pools.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", + "httpMethod": "DELETE", + "id": "remotebuildexecution.projects.instances.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the instance to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the specified instance.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", + "httpMethod": "GET", + "id": "remotebuildexecution.projects.instances.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the instance to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists instances in a project.", + "flatPath": "v1alpha/projects/{projectsId}/instances", + "httpMethod": "GET", + "id": "remotebuildexecution.projects.instances.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Resource name of the project. Format: `projects/[PROJECT_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/instances", + "response": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates the specified instance. Returns a long running operation which contains the updated instance in the response on completion.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}", + "httpMethod": "PATCH", + "id": "remotebuildexecution.projects.instances.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "loggingEnabled": { + "description": "Deprecated, use instance.logging_enabled instead. Whether to enable Stackdriver logging for this instance.", + "location": "query", + "type": "boolean" + }, + "name": { + "description": "Output only. Instance resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be populated when creating an instance since it is provided in the `instance_id` field.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + }, + "name1": { + "description": "Deprecated, use instance.Name instead. Name of the instance to update. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "location": "query", + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to instance. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", + "format": "google-fieldmask", + "location": "query", + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + }, + "resources": { + "workerpools": { + "methods": { + "create": { + "description": "Creates a new worker pool with a specified size and configuration. Returns a long running operation which contains a worker pool on completion. While the long running operation is in progress, any call to `GetWorkerPool` returns a worker pool in state `CREATING`.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools", + "httpMethod": "POST", + "id": "remotebuildexecution.projects.instances.workerpools.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Resource name of the instance in which to create the new worker pool. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/workerpools", + "request": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes the specified worker pool. Returns a long running operation, which contains a `google.protobuf.Empty` response on completion. While the long running operation is in progress, any call to `GetWorkerPool` returns a worker pool in state `DELETING`.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", + "httpMethod": "DELETE", + "id": "remotebuildexecution.projects.instances.workerpools.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the worker pool to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the specified worker pool.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", + "httpMethod": "GET", + "id": "remotebuildexecution.projects.instances.workerpools.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Name of the worker pool to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists worker pools in an instance.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools", + "httpMethod": "GET", + "id": "remotebuildexecution.projects.instances.workerpools.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "filter": { + "description": "Optional. A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. String values are case-insensitive. The comparison operator must be either `:`, `=`, `!=`, `>`, `>=`, `<=` or `<`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. You can also filter on nested fields. To filter on multiple expressions, you can separate expression using `AND` and `OR` operators, using parentheses to specify precedence. If neither operator is specified, `AND` is assumed. Examples: Include only pools with more than 100 reserved workers: `(worker_count > 100) (worker_config.reserved = true)` Include only pools with a certain label or machines of the e2-standard family: `worker_config.labels.key1 : * OR worker_config.machine_type: e2-standard`", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Resource name of the instance. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+parent}/workerpools", + "response": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "patch": { + "description": "Updates an existing worker pool with a specified size and/or configuration. Returns a long running operation, which contains a worker pool on completion. While the long running operation is in progress, any call to `GetWorkerPool` returns a worker pool in state `UPDATING`.", + "flatPath": "v1alpha/projects/{projectsId}/instances/{instancesId}/workerpools/{workerpoolsId}", + "httpMethod": "PATCH", + "id": "remotebuildexecution.projects.instances.workerpools.patch", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "WorkerPool resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. name should not be populated when creating a worker pool since it is provided in the `poolId` field.", + "location": "path", + "pattern": "^projects/[^/]+/instances/[^/]+/workerpools/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "request": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + }, + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v1alpha/projects/{projectsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "remotebuildexecution.projects.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1alpha/{+name}", + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20210712", + "rootUrl": "https://admin-remotebuildexecution.googleapis.com/", + "schemas": { + "BuildBazelRemoteExecutionV2Action": { + "description": "An `Action` captures all the information about an execution which is required to reproduce it. `Action`s are the core component of the [Execution] service. A single `Action` represents a repeatable action that can be performed by the execution service. `Action`s can be succinctly identified by the digest of their wire format encoding and, once an `Action` has been executed, will be cached in the action cache. Future requests can then use the cached result rather than needing to run afresh. When a server completes execution of an Action, it MAY choose to cache the result in the ActionCache unless `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By default, future calls to Execute the same `Action` will also serve their results from the cache. Clients must take care to understand the caching behaviour. Ideally, all `Action`s will be reproducible so that serving a result from cache is always desirable and correct.", + "id": "BuildBazelRemoteExecutionV2Action", + "properties": { + "commandDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Command to run, which MUST be present in the ContentAddressableStorage." + }, + "doNotCache": { + "description": "If true, then the `Action`'s result cannot be cached, and in-flight requests for the same `Action` may not be merged.", + "type": "boolean" + }, + "inputRootDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the root Directory for the input files. The files in the directory tree are available in the correct location on the build machine before the command is executed. The root directory, as well as every subdirectory and content blob referred to, MUST be in the ContentAddressableStorage." + }, + "platform": { + "$ref": "BuildBazelRemoteExecutionV2Platform", + "description": "The optional platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. New in version 2.2: clients SHOULD set these platform properties as well as those in the Command. Servers SHOULD prefer those set here." + }, + "salt": { + "description": "An optional additional salt value used to place this `Action` into a separate cache namespace from other instances having the same field contents. This salt typically comes from operational configuration specific to sources such as repo and service configuration, and allows disowning an entire set of ActionResults that might have been poisoned by buggy software or tool failures.", + "format": "byte", + "type": "string" + }, + "timeout": { + "description": "A timeout after which the execution should be killed. If the timeout is absent, then the client is specifying that the execution should continue as long as the server will let it. The server SHOULD impose a timeout if the client does not specify one, however, if the client does specify a timeout that is longer than the server's maximum timeout, the server MUST reject the request. The timeout is a part of the Action message, and therefore two `Actions` with different timeouts are different, even if they are otherwise identical. This is because, if they were not, running an `Action` with a lower timeout than is required might result in a cache hit from an execution run with a longer timeout, hiding the fact that the timeout is too short. By encoding it directly in the `Action`, a lower timeout will result in a cache miss and the execution timeout will fail immediately, rather than whenever the cache entry gets evicted.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ActionResult": { + "description": "An ActionResult represents the result of an Action being run. It is advised that at least one field (for example `ActionResult.execution_metadata.Worker`) have a non-default value, to ensure that the serialized value is non-empty, which can then be used as a basic data sanity check.", + "id": "BuildBazelRemoteExecutionV2ActionResult", + "properties": { + "executionMetadata": { + "$ref": "BuildBazelRemoteExecutionV2ExecutedActionMetadata", + "description": "The details of the execution that originally produced this result." + }, + "exitCode": { + "description": "The exit code of the command.", + "format": "int32", + "type": "integer" + }, + "outputDirectories": { + "description": "The output directories of the action. For each output directory requested in the `output_directories` or `output_paths` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: \"a/b/dir\" tree_digest: { hash: \"4a73bc9d03...\", size: 55 } } // Tree proto with hash \"4a73bc9d03...\" and size 55: { root: { files: [ { name: \"bar\", digest: { hash: \"4a73bc9d03...\", size: 65534 } } ], directories: [ { name: \"foo\", digest: { hash: \"4cf2eda940...\", size: 43 } } ] } children : { // (Directory proto with hash \"4cf2eda940...\" and size 43) files: [ { name: \"baz\", digest: { hash: \"b2c941073e...\", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name as listed in `output_files` of the Command was found in `output_directories`, but was not a directory, the server will return a FAILED_PRECONDITION.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputDirectory" + }, + "type": "array" + }, + "outputDirectorySymlinks": { + "description": "The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "outputFileSymlinks": { + "description": "The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name as listed in `output_files` of the Command was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "outputFiles": { + "description": "The output files of the action. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file (`output_symlinks` field after v2.1). If an output listed in `output_files` was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputFile" + }, + "type": "array" + }, + "outputSymlinks": { + "description": "New in v2.1: this field will only be populated if the command `output_paths` field was used, and not the pre v2.1 `output_files` or `output_directories` fields. The output paths of the action that are symbolic links to other paths. Those may be links to other outputs, or inputs, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. A single entry for each output requested in `output_paths` field of the Action, if the corresponding path existed after the action completed and was a symbolic link. If the action does not produce a requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "stderrDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest for a blob containing the standard error of the action, which can be retrieved from the ContentAddressableStorage." + }, + "stderrRaw": { + "description": "The standard error buffer of the action. The server SHOULD NOT inline stderr unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + }, + "stdoutDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest for a blob containing the standard output of the action, which can be retrieved from the ContentAddressableStorage." + }, + "stdoutRaw": { + "description": "The standard output buffer of the action. The server SHOULD NOT inline stdout unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Command": { + "description": "A `Command` is the actual command executed by a worker running an Action and specifications of its environment. Except as otherwise required, the environment (such as which system libraries or binaries are available, and what filesystems are mounted where) is defined by and specific to the implementation of the remote execution API.", + "id": "BuildBazelRemoteExecutionV2Command", + "properties": { + "arguments": { + "description": "The arguments to the command. The first argument must be the path to the executable, which must be either a relative path, in which case it is evaluated with respect to the input root, or an absolute path.", + "items": { + "type": "string" + }, + "type": "array" + }, + "environmentVariables": { + "description": "The environment variables to set when running the program. The worker may provide its own default environment variables; these defaults can be overridden using this field. Additional variables can also be specified. In order to ensure that equivalent Commands always hash to the same value, the environment variables MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2CommandEnvironmentVariable" + }, + "type": "array" + }, + "outputDirectories": { + "description": "A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use `output_paths` instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputFiles": { + "description": "A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use `output_paths` instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputNodeProperties": { + "description": "A list of keys for node properties the client expects to retrieve for output files and directories. Keys are either names of string-based NodeProperty or names of fields in NodeProperties. In order to ensure that equivalent `Action`s always hash to the same value, the node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of string-based properties is server-dependent. If a property is not recognized by the server, the server will return an `INVALID_ARGUMENT`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputPaths": { + "description": "A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED `output_files` and `output_directories` fields. If `output_paths` is used, `output_files` and `output_directories` will be ignored!", + "items": { + "type": "string" + }, + "type": "array" + }, + "platform": { + "$ref": "BuildBazelRemoteExecutionV2Platform", + "description": "The platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. DEPRECATED as of v2.2: platform properties are now specified directly in the action. See documentation note in the Action for migration." + }, + "workingDirectory": { + "description": "The working directory, relative to the input root, for the command to run in. It must be a directory which exists in the input tree. If it is left empty, then the action is run in the input root.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2CommandEnvironmentVariable": { + "description": "An `EnvironmentVariable` is one variable to set in the running program's environment.", + "id": "BuildBazelRemoteExecutionV2CommandEnvironmentVariable", + "properties": { + "name": { + "description": "The variable name.", + "type": "string" + }, + "value": { + "description": "The variable value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Digest": { + "description": "A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields.", + "id": "BuildBazelRemoteExecutionV2Digest", + "properties": { + "hash": { + "description": "The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.", + "type": "string" + }, + "sizeBytes": { + "description": "The size of the blob, in bytes.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Directory": { + "description": "A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both \"Foo\" and \"foo\" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. * The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: \"bar\", digest: { hash: \"4a73bc9d03...\", size: 65534 }, node_properties: [ { \"name\": \"MTime\", \"value\": \"2017-01-15T01:30:15.01Z\" } ] } ], directories: [ { name: \"foo\", digest: { hash: \"4cf2eda940...\", size: 43 } } ] } // (Directory proto with hash \"4cf2eda940...\" and size 43) { files: [ { name: \"baz\", digest: { hash: \"b2c941073e...\", size: 1294, }, is_executable: true } ] } ```", + "id": "BuildBazelRemoteExecutionV2Directory", + "properties": { + "directories": { + "description": "The subdirectories in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2DirectoryNode" + }, + "type": "array" + }, + "files": { + "description": "The files in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2FileNode" + }, + "type": "array" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "symlinks": { + "description": "The symlinks in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2SymlinkNode" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2DirectoryNode": { + "description": "A `DirectoryNode` represents a child of a Directory which is itself a `Directory` and its associated metadata.", + "id": "BuildBazelRemoteExecutionV2DirectoryNode", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Directory object represented. See Digest for information about how to take the digest of a proto message." + }, + "name": { + "description": "The name of the directory.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecuteOperationMetadata": { + "description": "Metadata about an ongoing execution, which will be contained in the metadata field of the Operation.", + "id": "BuildBazelRemoteExecutionV2ExecuteOperationMetadata", + "properties": { + "actionDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Action being executed." + }, + "stage": { + "description": "The current stage of execution.", + "enum": [ + "UNKNOWN", + "CACHE_CHECK", + "QUEUED", + "EXECUTING", + "COMPLETED" + ], + "enumDescriptions": [ + "Invalid value.", + "Checking the result against the cache.", + "Currently idle, awaiting a free machine to execute.", + "Currently being executed by a worker.", + "Finished execution." + ], + "type": "string" + }, + "stderrStreamName": { + "description": "If set, the client can use this resource name with ByteStream.Read to stream the standard error from the endpoint hosting streamed responses.", + "type": "string" + }, + "stdoutStreamName": { + "description": "If set, the client can use this resource name with ByteStream.Read to stream the standard output from the endpoint hosting streamed responses.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecuteResponse": { + "description": "The response message for Execution.Execute, which will be contained in the response field of the Operation.", + "id": "BuildBazelRemoteExecutionV2ExecuteResponse", + "properties": { + "cachedResult": { + "description": "True if the result was served from cache, false if it was executed.", + "type": "boolean" + }, + "message": { + "description": "Freeform informational message with details on the execution of the action that may be displayed to the user upon failure or when requested explicitly.", + "type": "string" + }, + "result": { + "$ref": "BuildBazelRemoteExecutionV2ActionResult", + "description": "The result of the action." + }, + "serverLogs": { + "additionalProperties": { + "$ref": "BuildBazelRemoteExecutionV2LogFile" + }, + "description": "An optional list of additional log outputs the server wishes to provide. A server can use this to return execution-specific logs however it wishes. This is intended primarily to make it easier for users to debug issues that may be outside of the actual job execution, such as by identifying the worker executing the action or by providing logs from the worker's setup phase. The keys SHOULD be human readable so that a client can display them to a user.", + "type": "object" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "If the status has a code other than `OK`, it indicates that the action did not finish execution. For example, if the operation times out during execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST use this field for errors in execution, rather than the error field on the `Operation` object. If the status code is other than `OK`, then the result MUST NOT be cached. For an error status, the `result` field is optional; the server may populate the output-, stdout-, and stderr-related fields if it has any information available, such as the stdout and stderr of a timed-out action." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecutedActionMetadata": { + "description": "ExecutedActionMetadata contains details about a completed execution.", + "id": "BuildBazelRemoteExecutionV2ExecutedActionMetadata", + "properties": { + "auxiliaryMetadata": { + "description": "Details that are specific to the kind of worker used. For example, on POSIX-like systems this could contain a message with getrusage(2) statistics.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "executionCompletedTimestamp": { + "description": "When the worker completed executing the action command.", + "format": "google-datetime", + "type": "string" + }, + "executionStartTimestamp": { + "description": "When the worker started executing the action command.", + "format": "google-datetime", + "type": "string" + }, + "inputFetchCompletedTimestamp": { + "description": "When the worker finished fetching action inputs.", + "format": "google-datetime", + "type": "string" + }, + "inputFetchStartTimestamp": { + "description": "When the worker started fetching action inputs.", + "format": "google-datetime", + "type": "string" + }, + "outputUploadCompletedTimestamp": { + "description": "When the worker finished uploading action outputs.", + "format": "google-datetime", + "type": "string" + }, + "outputUploadStartTimestamp": { + "description": "When the worker started uploading action outputs.", + "format": "google-datetime", + "type": "string" + }, + "queuedTimestamp": { + "description": "When was the action added to the queue.", + "format": "google-datetime", + "type": "string" + }, + "worker": { + "description": "The name of the worker which ran the execution.", + "type": "string" + }, + "workerCompletedTimestamp": { + "description": "When the worker completed the action, including all stages.", + "format": "google-datetime", + "type": "string" + }, + "workerStartTimestamp": { + "description": "When the worker received the action.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2FileNode": { + "description": "A `FileNode` represents a single file and associated metadata.", + "id": "BuildBazelRemoteExecutionV2FileNode", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the file's content." + }, + "isExecutable": { + "description": "True if file is executable, false otherwise.", + "type": "boolean" + }, + "name": { + "description": "The name of the file.", + "type": "string" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2LogFile": { + "description": "A `LogFile` is a log stored in the CAS.", + "id": "BuildBazelRemoteExecutionV2LogFile", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the log contents." + }, + "humanReadable": { + "description": "This is a hint as to the purpose of the log, and is set to true if the log is human-readable text that can be usefully displayed to a user, and false otherwise. For instance, if a command-line client wishes to print the server logs to the terminal for a failed action, this allows it to avoid displaying a binary file.", + "type": "boolean" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2NodeProperties": { + "description": "Node properties for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the properties that it accepts.", + "id": "BuildBazelRemoteExecutionV2NodeProperties", + "properties": { + "mtime": { + "description": "The file's last modification timestamp.", + "format": "google-datetime", + "type": "string" + }, + "properties": { + "description": "A list of string-based NodeProperties.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperty" + }, + "type": "array" + }, + "unixMode": { + "description": "The UNIX file mode, e.g., 0755.", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2NodeProperty": { + "description": "A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times.", + "id": "BuildBazelRemoteExecutionV2NodeProperty", + "properties": { + "name": { + "description": "The property name.", + "type": "string" + }, + "value": { + "description": "The property value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputDirectory": { + "description": "An `OutputDirectory` is the output in an `ActionResult` corresponding to a directory's full contents rather than a single file.", + "id": "BuildBazelRemoteExecutionV2OutputDirectory", + "properties": { + "path": { + "description": "The full path of the directory relative to the working directory. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. The empty string value is allowed, and it denotes the entire working directory.", + "type": "string" + }, + "treeDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the encoded Tree proto containing the directory's contents." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputFile": { + "description": "An `OutputFile` is similar to a FileNode, but it is used as an output in an `ActionResult`. It allows a full file path rather than only a name.", + "id": "BuildBazelRemoteExecutionV2OutputFile", + "properties": { + "contents": { + "description": "The contents of the file if inlining was requested. The server SHOULD NOT inline file contents unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the file's content." + }, + "isExecutable": { + "description": "True if file is executable, false otherwise.", + "type": "boolean" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "path": { + "description": "The full path of the file relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputSymlink": { + "description": "An `OutputSymlink` is similar to a Symlink, but it is used as an output in an `ActionResult`. `OutputSymlink` is binary-compatible with `SymlinkNode`.", + "id": "BuildBazelRemoteExecutionV2OutputSymlink", + "properties": { + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "path": { + "description": "The full path of the symlink relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash.", + "type": "string" + }, + "target": { + "description": "The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. `..` components are allowed anywhere in the target path.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Platform": { + "description": "A `Platform` is a set of requirements, such as hardware, operating system, or compiler toolchain, for an Action's execution environment. A `Platform` is represented as a series of key-value pairs representing the properties that are required of the platform.", + "id": "BuildBazelRemoteExecutionV2Platform", + "properties": { + "properties": { + "description": "The properties that make up this platform. In order to ensure that equivalent `Platform`s always hash to the same value, the properties MUST be lexicographically sorted by name, and then by value. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2PlatformProperty" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2PlatformProperty": { + "description": "A single property for the environment. The server is responsible for specifying the property `name`s that it accepts. If an unknown `name` is provided in the requirements for an Action, the server SHOULD reject the execution request. If permitted by the server, the same `name` may occur multiple times. The server is also responsible for specifying the interpretation of property `value`s. For instance, a property describing how much RAM must be available may be interpreted as allowing a worker with 16GB to fulfill a request for 8GB, while a property describing the OS environment on which the action must be performed may require an exact match with the worker's OS. The server MAY use the `value` of one or more properties to determine how it sets up the execution environment, such as by making specific system files available to the worker. Both names and values are typically case-sensitive. Note that the platform is implicitly part of the action digest, so even tiny changes in the names or values (like changing case) may result in different action cache entries.", + "id": "BuildBazelRemoteExecutionV2PlatformProperty", + "properties": { + "name": { + "description": "The property name.", + "type": "string" + }, + "value": { + "description": "The property value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2RequestMetadata": { + "description": "An optional Metadata to attach to any RPC request to tell the server about an external context of the request. The server may use this for logging or other purposes. To use it, the client attaches the header to the call using the canonical proto serialization: * name: `build.bazel.remote.execution.v2.requestmetadata-bin` * contents: the base64 encoded binary `RequestMetadata` message. Note: the gRPC library serializes binary headers encoded in base 64 by default (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests). Therefore, if the gRPC library is used to pass/retrieve this metadata, the user may ignore the base64 encoding and assume it is simply serialized as a binary message.", + "id": "BuildBazelRemoteExecutionV2RequestMetadata", + "properties": { + "actionId": { + "description": "An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.", + "type": "string" + }, + "actionMnemonic": { + "description": "A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools.", + "type": "string" + }, + "configurationId": { + "description": "An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees.", + "type": "string" + }, + "correlatedInvocationsId": { + "description": "An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch.", + "type": "string" + }, + "targetId": { + "description": "An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target.", + "type": "string" + }, + "toolDetails": { + "$ref": "BuildBazelRemoteExecutionV2ToolDetails", + "description": "The details for the tool invoking the requests." + }, + "toolInvocationId": { + "description": "An identifier that ties multiple actions together to a final result. For example, multiple actions are required to build and run foo_test.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2SymlinkNode": { + "description": "A `SymlinkNode` represents a symbolic link.", + "id": "BuildBazelRemoteExecutionV2SymlinkNode", + "properties": { + "name": { + "description": "The name of the symlink.", + "type": "string" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "target": { + "description": "The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. `..` components are allowed anywhere in the target path as logical canonicalization may lead to different behavior in the presence of directory symlinks (e.g. `foo/../bar` may not be the same as `bar`). To reduce potential cache misses, canonicalization is still recommended where this is possible without impacting correctness.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ToolDetails": { + "description": "Details for the tool used to call the API.", + "id": "BuildBazelRemoteExecutionV2ToolDetails", + "properties": { + "toolName": { + "description": "Name of the tool, e.g. bazel.", + "type": "string" + }, + "toolVersion": { + "description": "Version of the tool used for the request, e.g. 5.0.3.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Tree": { + "description": "A `Tree` contains all the Directory protos in a single directory Merkle tree, compressed into one message.", + "id": "BuildBazelRemoteExecutionV2Tree", + "properties": { + "children": { + "description": "All the child directories: the directories referred to by the root and, recursively, all its children. In order to reconstruct the directory tree, the client must take the digests of each of the child directories and then build up a tree starting from the `root`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2Directory" + }, + "type": "array" + }, + "root": { + "$ref": "BuildBazelRemoteExecutionV2Directory", + "description": "The root directory in the tree." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandDurations": { + "description": "CommandDuration contains the various duration metrics tracked when a bot performs a command.", + "id": "GoogleDevtoolsRemotebuildbotCommandDurations", + "properties": { + "casRelease": { + "description": "The time spent to release the CAS blobs used by the task.", + "format": "google-duration", + "type": "string" + }, + "cmWaitForAssignment": { + "description": "The time spent waiting for Container Manager to assign an asynchronous container for execution.", + "format": "google-duration", + "type": "string" + }, + "dockerPrep": { + "description": "The time spent preparing the command to be run in a Docker container (includes pulling the Docker image, if necessary).", + "format": "google-duration", + "type": "string" + }, + "dockerPrepStartTime": { + "description": "The timestamp when docker preparation begins.", + "format": "google-datetime", + "type": "string" + }, + "download": { + "description": "The time spent downloading the input files and constructing the working directory.", + "format": "google-duration", + "type": "string" + }, + "downloadStartTime": { + "description": "The timestamp when downloading the input files begins.", + "format": "google-datetime", + "type": "string" + }, + "execStartTime": { + "description": "The timestamp when execution begins.", + "format": "google-datetime", + "type": "string" + }, + "execution": { + "description": "The time spent executing the command (i.e., doing useful work).", + "format": "google-duration", + "type": "string" + }, + "isoPrepDone": { + "description": "The timestamp when preparation is done and bot starts downloading files.", + "format": "google-datetime", + "type": "string" + }, + "overall": { + "description": "The time spent completing the command, in total.", + "format": "google-duration", + "type": "string" + }, + "stdout": { + "description": "The time spent uploading the stdout logs.", + "format": "google-duration", + "type": "string" + }, + "upload": { + "description": "The time spent uploading the output files.", + "format": "google-duration", + "type": "string" + }, + "uploadStartTime": { + "description": "The timestamp when uploading the output files begins.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandEvents": { + "description": "CommandEvents contains counters for the number of warnings and errors that occurred during the execution of a command.", + "id": "GoogleDevtoolsRemotebuildbotCommandEvents", + "properties": { + "cmUsage": { + "description": "Indicates if and how Container Manager is being used for task execution.", + "enum": [ + "CONFIG_NONE", + "CONFIG_MATCH", + "CONFIG_MISMATCH" + ], + "enumDescriptions": [ + "Container Manager is disabled or not running for this execution.", + "Container Manager is enabled and there was a matching container available for use during execution.", + "Container Manager is enabled, but there was no matching container available for execution." + ], + "type": "string" + }, + "dockerCacheHit": { + "description": "Indicates whether we are using a cached Docker image (true) or had to pull the Docker image (false) for this command.", + "type": "boolean" + }, + "dockerImageName": { + "description": "Docker Image name.", + "type": "string" + }, + "inputCacheMiss": { + "description": "The input cache miss ratio.", + "format": "float", + "type": "number" + }, + "numErrors": { + "description": "The number of errors reported.", + "format": "uint64", + "type": "string" + }, + "numWarnings": { + "description": "The number of warnings reported.", + "format": "uint64", + "type": "string" + }, + "outputLocation": { + "description": "Indicates whether output files and/or output directories were found relative to the execution root or to the user provided work directory or both or none.", + "enum": [ + "LOCATION_UNDEFINED", + "LOCATION_NONE", + "LOCATION_EXEC_ROOT_RELATIVE", + "LOCATION_WORKING_DIR_RELATIVE", + "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE", + "LOCATION_EXEC_ROOT_RELATIVE_OUTPUT_OUTSIDE_WORKING_DIR", + "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE_OUTPUT_OUTSIDE_WORKING_DIR" + ], + "enumDescriptions": [ + "Location is set to LOCATION_UNDEFINED for tasks where the working directorty is not specified or is identical to the execution root directory.", + "No output files or directories were found neither relative to the execution root directory nor relative to the working directory.", + "Output files or directories were found relative to the execution root directory but not relative to the working directory.", + "Output files or directories were found relative to the working directory but not relative to the execution root directory.", + "Output files or directories were found both relative to the execution root directory and relative to the working directory.", + "Output files or directories were found relative to the execution root directory but not relative to the working directory. In addition at least one output file or directory was found outside of the working directory such that a working-directory-relative-path would have needed to start with a `..`.", + "Output files or directories were found both relative to the execution root directory and relative to the working directory. In addition at least one exec-root-relative output file or directory was found outside of the working directory such that a working-directory-relative-path would have needed to start with a `..`." + ], + "type": "string" + }, + "usedAsyncContainer": { + "description": "Indicates whether an asynchronous container was used for execution.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandStatus": { + "description": "The internal status of the command result.", + "id": "GoogleDevtoolsRemotebuildbotCommandStatus", + "properties": { + "code": { + "description": "The status code.", + "enum": [ + "OK", + "INVALID_ARGUMENT", + "DEADLINE_EXCEEDED", + "NOT_FOUND", + "PERMISSION_DENIED", + "INTERNAL", + "ABORTED", + "FAILED_PRECONDITION", + "CLEANUP_ERROR", + "DOWNLOAD_INPUTS_ERROR", + "UNKNOWN", + "UPLOAD_OUTPUTS_ERROR", + "UPLOAD_OUTPUTS_BYTES_LIMIT_EXCEEDED", + "DOCKER_LOGIN_ERROR", + "DOCKER_IMAGE_PULL_ERROR", + "DOCKER_IMAGE_EXIST_ERROR", + "DUPLICATE_INPUTS", + "DOCKER_IMAGE_PERMISSION_DENIED", + "DOCKER_IMAGE_NOT_FOUND", + "WORKING_DIR_NOT_FOUND", + "WORKING_DIR_NOT_IN_BASE_DIR", + "DOCKER_UNAVAILABLE", + "NO_CUDA_CAPABLE_DEVICE", + "REMOTE_CAS_DOWNLOAD_ERROR", + "REMOTE_CAS_UPLOAD_ERROR", + "LOCAL_CASPROXY_NOT_RUNNING", + "DOCKER_CREATE_CONTAINER_ERROR", + "DOCKER_INVALID_ULIMIT", + "DOCKER_UNKNOWN_RUNTIME", + "DOCKER_UNKNOWN_CAPABILITY", + "DOCKER_UNKNOWN_ERROR", + "DOCKER_CREATE_COMPUTE_SYSTEM_ERROR", + "DOCKER_PREPARELAYER_ERROR", + "DOCKER_INCOMPATIBLE_OS_ERROR", + "DOCKER_CREATE_RUNTIME_FILE_NOT_FOUND", + "DOCKER_CREATE_RUNTIME_PERMISSION_DENIED", + "DOCKER_CREATE_PROCESS_FILE_NOT_FOUND", + "DOCKER_CREATE_COMPUTE_SYSTEM_INCORRECT_PARAMETER_ERROR", + "DOCKER_TOO_MANY_SYMBOLIC_LINK_LEVELS", + "LOCAL_CONTAINER_MANAGER_NOT_RUNNING", + "DOCKER_IMAGE_VPCSC_PERMISSION_DENIED", + "WORKING_DIR_NOT_RELATIVE", + "DOCKER_MISSING_CONTAINER" + ], + "enumDescriptions": [ + "The command succeeded.", + "The command input was invalid.", + "The command had passed its expiry time while it was still running.", + "The resources requested by the command were not found.", + "The command failed due to permission errors.", + "The command failed because of some invariants expected by the underlying system have been broken. This usually indicates a bug wit the system.", + "The command was aborted.", + "The command failed because the system is not in a state required for the command, e.g. the command inputs cannot be found on the server.", + "The bot failed to do the cleanup, e.g. unable to delete the command working directory or the command process.", + "The bot failed to download the inputs.", + "Unknown error.", + "The bot failed to upload the outputs.", + "The bot tried to upload files having a total size that is too large.", + "The bot failed to login to docker.", + "The bot failed to pull docker image.", + "The bot failed to check docker images.", + "The inputs contain duplicate files.", + "The bot doesn't have the permissions to pull docker images.", + "The docker image cannot be found.", + "Working directory is not found.", + "Working directory is not under the base directory", + "There are issues with docker service/runtime.", + "The command failed with \"no cuda-capable device is detected\" error.", + "The bot encountered errors from remote CAS when downloading blobs.", + "The bot encountered errors from remote CAS when uploading blobs.", + "The local casproxy is not running.", + "The bot couldn't start the container.", + "The docker ulimit is not valid.", + "The docker runtime is unknown.", + "The docker capability is unknown.", + "The command failed with unknown docker errors.", + "Docker failed to run containers with CreateComputeSystem error.", + "Docker failed to run containers with hcsshim::PrepareLayer error.", + "Docker incompatible operating system error.", + "Docker failed to create OCI runtime because of file not found.", + "Docker failed to create OCI runtime because of permission denied.", + "Docker failed to create process because of file not found.", + "Docker failed to run containers with CreateComputeSystem error that involves an incorrect parameter (more specific version of DOCKER_CREATE_COMPUTE_SYSTEM_ERROR that is user-caused).", + "Docker failed to create an overlay mount because of too many levels of symbolic links.", + "The local Container Manager is not running.", + "Docker failed because a request was denied by the organization's policy.", + "Working directory is not relative", + "Docker cannot find the container specified in the command. This error is likely to only occur if an asynchronous container is not running when the command is run." + ], + "type": "string" + }, + "message": { + "description": "The error message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsage": { + "description": "ResourceUsage is the system resource usage of the host machine.", + "id": "GoogleDevtoolsRemotebuildbotResourceUsage", + "properties": { + "cpuUsedPercent": { + "format": "double", + "type": "number" + }, + "diskUsage": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageStat" + }, + "memoryUsage": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageStat" + }, + "totalDiskIoStats": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageIOStats" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsageIOStats": { + "id": "GoogleDevtoolsRemotebuildbotResourceUsageIOStats", + "properties": { + "readBytesCount": { + "format": "uint64", + "type": "string" + }, + "readCount": { + "format": "uint64", + "type": "string" + }, + "readTimeMs": { + "format": "uint64", + "type": "string" + }, + "writeBytesCount": { + "format": "uint64", + "type": "string" + }, + "writeCount": { + "format": "uint64", + "type": "string" + }, + "writeTimeMs": { + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsageStat": { + "id": "GoogleDevtoolsRemotebuildbotResourceUsageStat", + "properties": { + "total": { + "format": "uint64", + "type": "string" + }, + "used": { + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig": { + "description": "AcceleratorConfig defines the accelerator cards to attach to the VM.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig", + "properties": { + "acceleratorCount": { + "description": "The number of guest accelerator cards exposed to each VM.", + "format": "int64", + "type": "string" + }, + "acceleratorType": { + "description": "The type of accelerator to attach to each VM, e.g. \"nvidia-tesla-k80\" for nVidia Tesla K80.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale": { + "description": "Autoscale defines the autoscaling policy of a worker pool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale", + "properties": { + "maxSize": { + "description": "The maximal number of workers. Must be equal to or greater than min_size.", + "format": "int64", + "type": "string" + }, + "minSize": { + "description": "The minimal number of workers. Must be greater than 0.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest": { + "description": "The request used for `CreateInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest", + "properties": { + "instance": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "description": "Specifies the instance to create. The name in the instance, if specified in the instance, is ignored." + }, + "instanceId": { + "description": "ID of the created instance. A valid `instance_id` must: be 6-50 characters long, contain only lowercase letters, digits, hyphens and underscores, start with a lowercase letter, and end with a lowercase letter or a digit.", + "type": "string" + }, + "parent": { + "description": "Resource name of the project containing the instance. Format: `projects/[PROJECT_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest": { + "description": "The request used for `CreateWorkerPool`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest", + "properties": { + "parent": { + "description": "Resource name of the instance in which to create the new worker pool. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + }, + "poolId": { + "description": "ID of the created worker pool. A valid pool ID must: be 6-50 characters long, contain only lowercase letters, digits, hyphens and underscores, start with a lowercase letter, and end with a lowercase letter or a digit.", + "type": "string" + }, + "workerPool": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "description": "Specifies the worker pool to create. The name in the worker pool, if specified, is ignored." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest": { + "description": "The request used for `DeleteInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest", + "properties": { + "name": { + "description": "Name of the instance to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest": { + "description": "The request used for DeleteWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest", + "properties": { + "name": { + "description": "Name of the worker pool to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy": { + "description": "FeaturePolicy defines features allowed to be used on RBE instances, as well as instance-wide behavior changes that take effect without opt-in or opt-out at usage time.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy", + "properties": { + "containerImageSources": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Which container image sources are allowed. Currently only RBE-supported registry (gcr.io) is allowed. One can allow all repositories under a project or one specific repository only. E.g. container_image_sources { policy: RESTRICTED allowed_values: [ \"gcr.io/project-foo\", \"gcr.io/project-bar/repo-baz\", ] } will allow any repositories under \"gcr.io/project-foo\" plus the repository \"gcr.io/project-bar/repo-baz\". Default (UNSPECIFIED) is equivalent to any source is allowed." + }, + "dockerAddCapabilities": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerAddCapabilities can be used or what capabilities are allowed." + }, + "dockerChrootPath": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerChrootPath can be used." + }, + "dockerNetwork": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerNetwork can be used or what network modes are allowed. E.g. one may allow `off` value only via `allowed_values`." + }, + "dockerPrivileged": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerPrivileged can be used." + }, + "dockerRunAsRoot": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerRunAsRoot can be used." + }, + "dockerRuntime": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerRuntime is allowed to be set or what runtimes are allowed. Note linux_isolation takes precedence, and if set, docker_runtime values may be rejected if they are incompatible with the selected isolation." + }, + "dockerSiblingContainers": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerSiblingContainers can be used." + }, + "linuxIsolation": { + "description": "linux_isolation allows overriding the docker runtime used for containers started on Linux.", + "enum": [ + "LINUX_ISOLATION_UNSPECIFIED", + "GVISOR", + "OFF" + ], + "enumDescriptions": [ + "Default value. Will be using Linux default runtime.", + "Use gVisor runsc runtime.", + "Use stardard Linux runtime. This has the same behaviour as unspecified, but it can be used to revert back from gVisor." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature": { + "description": "Defines whether a feature can be used or what values are accepted.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "properties": { + "allowedValues": { + "description": "A list of acceptable values. Only effective when the policy is `RESTRICTED`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "policy": { + "description": "The policy of the feature.", + "enum": [ + "POLICY_UNSPECIFIED", + "ALLOWED", + "FORBIDDEN", + "RESTRICTED" + ], + "enumDescriptions": [ + "Default value, if not explicitly set. Equivalent to FORBIDDEN, unless otherwise documented on a specific Feature.", + "Feature is explicitly allowed.", + "Feature is forbidden. Requests attempting to leverage it will get an FailedPrecondition error, with a message like: \"Feature forbidden by FeaturePolicy: Feature on instance \"", + "Only the values specified in the `allowed_values` are allowed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest": { + "description": "The request used for `GetInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest", + "properties": { + "name": { + "description": "Name of the instance to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest": { + "description": "The request used for GetWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest", + "properties": { + "name": { + "description": "Name of the worker pool to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance": { + "description": "Instance conceptually encapsulates all Remote Build Execution resources for remote builds. An instance consists of storage and compute resources (for example, `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used for running remote builds. All Remote Build Execution API calls are scoped to an instance.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "properties": { + "featurePolicy": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy", + "description": "The policy to define whether or not RBE features can be used or how they can be used." + }, + "location": { + "description": "The location is a GCP region. Currently only `us-central1` is supported.", + "type": "string" + }, + "loggingEnabled": { + "description": "Output only. Whether stack driver logging is enabled for the instance.", + "type": "boolean" + }, + "name": { + "description": "Output only. Instance resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be populated when creating an instance since it is provided in the `instance_id` field.", + "type": "string" + }, + "state": { + "description": "Output only. State of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "RUNNING", + "INACTIVE" + ], + "enumDescriptions": [ + "Not a valid state, but the default value of the enum.", + "The instance is in state `CREATING` once `CreateInstance` is called and before the instance is ready for use.", + "The instance is in state `RUNNING` when it is ready for use.", + "An `INACTIVE` instance indicates that there is a problem that needs to be fixed. Such instances cannot be used for execution and instances that remain in this state for a significant period of time will be removed permanently." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest", + "properties": { + "parent": { + "description": "Resource name of the project. Format: `projects/[PROJECT_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse", + "properties": { + "instances": { + "description": "The list of instances in a given project.", + "items": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest", + "properties": { + "filter": { + "description": "Optional. A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. String values are case-insensitive. The comparison operator must be either `:`, `=`, `!=`, `>`, `>=`, `<=` or `<`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. You can also filter on nested fields. To filter on multiple expressions, you can separate expression using `AND` and `OR` operators, using parentheses to specify precedence. If neither operator is specified, `AND` is assumed. Examples: Include only pools with more than 100 reserved workers: `(worker_count > 100) (worker_config.reserved = true)` Include only pools with a certain label or machines of the e2-standard family: `worker_config.labels.key1 : * OR worker_config.machine_type: e2-standard`", + "type": "string" + }, + "parent": { + "description": "Resource name of the instance. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse", + "properties": { + "workerPools": { + "description": "The list of worker pools in a given instance.", + "items": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest": { + "description": "The request used for `UpdateInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest", + "properties": { + "instance": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "description": "Specifies the instance to update." + }, + "loggingEnabled": { + "description": "Deprecated, use instance.logging_enabled instead. Whether to enable Stackdriver logging for this instance.", + "type": "boolean" + }, + "name": { + "description": "Deprecated, use instance.Name instead. Name of the instance to update. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to instance. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest": { + "description": "The request used for UpdateWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest", + "properties": { + "updateMask": { + "description": "The update mask applies to worker_pool. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", + "format": "google-fieldmask", + "type": "string" + }, + "workerPool": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "description": "Specifies the worker pool to update." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig": { + "description": "Defines the configuration to be used for creating workers in the worker pool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig", + "properties": { + "accelerator": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig", + "description": "The accelerator card attached to each VM." + }, + "diskSizeGb": { + "description": "Required. Size of the disk attached to the worker, in GB. See https://cloud.google.com/compute/docs/disks/", + "format": "int64", + "type": "string" + }, + "diskType": { + "description": "Required. Disk Type to use for the worker. See [Storage options](https://cloud.google.com/compute/docs/disks/#introduction). Currently only `pd-standard` and `pd-ssd` are supported.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels associated with the workers. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International letters are permitted. Label keys must start with a letter. Label values are optional. There can not be more than 64 labels per resource.", + "type": "object" + }, + "machineType": { + "description": "Required. Machine type of the worker, such as `e2-standard-2`. See https://cloud.google.com/compute/docs/machine-types for a list of supported machine types. Note that `f1-micro` and `g1-small` are not yet supported.", + "type": "string" + }, + "maxConcurrentActions": { + "description": "The maximum number of actions a worker can execute concurrently.", + "format": "int64", + "type": "string" + }, + "minCpuPlatform": { + "description": "Minimum CPU platform to use when creating the worker. See [CPU Platforms](https://cloud.google.com/compute/docs/cpu-platforms).", + "type": "string" + }, + "networkAccess": { + "description": "Determines the type of network access granted to workers. Possible values: - \"public\": Workers can connect to the public internet. - \"private\": Workers can only connect to Google APIs and services. - \"restricted-private\": Workers can only connect to Google APIs that are reachable through `restricted.googleapis.com` (`199.36.153.4/30`).", + "type": "string" + }, + "reserved": { + "description": "Determines whether the worker is reserved (equivalent to a Compute Engine on-demand VM and therefore won't be preempted). See [Preemptible VMs](https://cloud.google.com/preemptible-vms/) for more details.", + "type": "boolean" + }, + "soleTenantNodeType": { + "description": "The node type name to be used for sole-tenant nodes.", + "type": "string" + }, + "vmImage": { + "description": "The name of the image used by each VM.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool": { + "description": "A worker pool resource in the Remote Build Execution API.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "properties": { + "autoscale": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale", + "description": "The autoscale policy to apply on a pool." + }, + "channel": { + "description": "Channel specifies the release channel of the pool.", + "type": "string" + }, + "name": { + "description": "WorkerPool resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. name should not be populated when creating a worker pool since it is provided in the `poolId` field.", + "type": "string" + }, + "state": { + "description": "Output only. State of the worker pool.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "RUNNING", + "UPDATING", + "DELETING", + "INACTIVE" + ], + "enumDescriptions": [ + "Not a valid state, but the default value of the enum.", + "The worker pool is in state `CREATING` once `CreateWorkerPool` is called and before all requested workers are ready.", + "The worker pool is in state `RUNNING` when all its workers are ready for use.", + "The worker pool is in state `UPDATING` once `UpdateWorkerPool` is called and before the new configuration has all the requested workers ready for use, and no older configuration has any workers. At that point the state transitions to `RUNNING`.", + "The worker pool is in state `DELETING` once the `Delete` method is called and before the deletion completes.", + "The worker pool is in state `INACTIVE` when the instance hosting the worker pool in not running." + ], + "type": "string" + }, + "workerConfig": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig", + "description": "Specifies the properties, such as machine type and disk size, used for creating workers in a worker pool." + }, + "workerCount": { + "description": "The desired number of workers in the worker pool. Must be a value between 0 and 15000.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2AdminTemp": { + "description": "AdminTemp is a prelimiary set of administration tasks. It's called \"Temp\" because we do not yet know the best way to represent admin tasks; it's possible that this will be entirely replaced in later versions of this API. If this message proves to be sufficient, it will be renamed in the alpha or beta release of this API. This message (suitably marshalled into a protobuf.Any) can be used as the inline_assignment field in a lease; the lease assignment field should simply be `\"admin\"` in these cases. This message is heavily based on Swarming administration tasks from the LUCI project (http://github.com/luci/luci-py/appengine/swarming).", + "id": "GoogleDevtoolsRemoteworkersV1test2AdminTemp", + "properties": { + "arg": { + "description": "The argument to the admin action; see `Command` for semantics.", + "type": "string" + }, + "command": { + "description": "The admin action; see `Command` for legal values.", + "enum": [ + "UNSPECIFIED", + "BOT_UPDATE", + "BOT_RESTART", + "BOT_TERMINATE", + "HOST_RESTART" + ], + "enumDescriptions": [ + "Illegal value.", + "Download and run a new version of the bot. `arg` will be a resource accessible via `ByteStream.Read` to obtain the new bot code.", + "Restart the bot without downloading a new version. `arg` will be a message to log.", + "Shut down the bot. `arg` will be a task resource name (similar to those in tasks.proto) that the bot can use to tell the server that it is terminating.", + "Restart the host computer. `arg` will be a message to log." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Blob": { + "description": "Describes a blob of binary content with its digest.", + "id": "GoogleDevtoolsRemoteworkersV1test2Blob", + "properties": { + "contents": { + "description": "The contents of the blob.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The digest of the blob. This should be verified by the receiver." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandOutputs": { + "description": "DEPRECATED - use CommandResult instead. Describes the actual outputs from the task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandOutputs", + "properties": { + "exitCode": { + "description": "exit_code is only fully reliable if the status' code is OK. If the task exceeded its deadline or was cancelled, the process may still produce an exit code as it is cancelled, and this will be populated, but a successful (zero) is unlikely to be correct unless the status code is OK.", + "format": "int32", + "type": "integer" + }, + "outputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The output files. The blob referenced by the digest should contain one of the following (implementation-dependent): * A marshalled DirectoryMetadata of the returned filesystem * A LUCI-style .isolated file" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandOverhead": { + "description": "DEPRECATED - use CommandResult instead. Can be used as part of CompleteRequest.metadata, or are part of a more sophisticated message.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandOverhead", + "properties": { + "duration": { + "description": "The elapsed time between calling Accept and Complete. The server will also have its own idea of what this should be, but this excludes the overhead of the RPCs and the bot response time.", + "format": "google-duration", + "type": "string" + }, + "overhead": { + "description": "The amount of time *not* spent executing the command (ie uploading/downloading files).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandResult": { + "description": "All information about the execution of a command, suitable for providing as the Bots interface's `Lease.result` field.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandResult", + "properties": { + "duration": { + "description": "The elapsed time between calling Accept and Complete. The server will also have its own idea of what this should be, but this excludes the overhead of the RPCs and the bot response time.", + "format": "google-duration", + "type": "string" + }, + "exitCode": { + "description": "The exit code of the process. An exit code of \"0\" should only be trusted if `status` has a code of OK (otherwise it may simply be unset).", + "format": "int32", + "type": "integer" + }, + "metadata": { + "description": "Implementation-dependent metadata about the task. Both servers and bots may define messages which can be encoded here; bots are free to provide metadata in multiple formats, and servers are free to choose one or more of the values to process and ignore others. In particular, it is *not* considered an error for the bot to provide the server with a field that it doesn't know about.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "outputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The output files. The blob referenced by the digest should contain one of the following (implementation-dependent): * A marshalled DirectoryMetadata of the returned filesystem * A LUCI-style .isolated file" + }, + "overhead": { + "description": "The amount of time *not* spent executing the command (ie uploading/downloading files).", + "format": "google-duration", + "type": "string" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "An overall status for the command. For example, if the command timed out, this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS for memory exhaustion, it might have a code of RESOURCE_EXHAUSTED." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTask": { + "description": "Describes a shell-style task to execute, suitable for providing as the Bots interface's `Lease.payload` field.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTask", + "properties": { + "expectedOutputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs", + "description": "The expected outputs from the task." + }, + "inputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs", + "description": "The inputs to the task." + }, + "timeouts": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts", + "description": "The timeouts of this task." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs": { + "description": "Describes the inputs to a shell-style task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs", + "properties": { + "arguments": { + "description": "The command itself to run (e.g., argv). This field should be passed directly to the underlying operating system, and so it must be sensible to that operating system. For example, on Windows, the first argument might be \"C:\\Windows\\System32\\ping.exe\" - that is, using drive letters and backslashes. A command for a *nix system, on the other hand, would use forward slashes. All other fields in the RWAPI must consistently use forward slashes, since those fields may be interpretted by both the service and the bot.", + "items": { + "type": "string" + }, + "type": "array" + }, + "environmentVariables": { + "description": "All environment variables required by the task.", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable" + }, + "type": "array" + }, + "files": { + "description": "The input filesystem to be set up prior to the task beginning. The contents should be a repeated set of FileMetadata messages though other formats are allowed if better for the implementation (eg, a LUCI-style .isolated file). This field is repeated since implementations might want to cache the metadata, in which case it may be useful to break up portions of the filesystem that change frequently (eg, specific input files) from those that don't (eg, standard header files).", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest" + }, + "type": "array" + }, + "inlineBlobs": { + "description": "Inline contents for blobs expected to be needed by the bot to execute the task. For example, contents of entries in `files` or blobs that are indirectly referenced by an entry there. The bot should check against this list before downloading required task inputs to reduce the number of communications between itself and the remote CAS server.", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Blob" + }, + "type": "array" + }, + "workingDirectory": { + "description": "Directory from which a command is executed. It is a relative directory with respect to the bot's working directory (i.e., \"./\"). If it is non-empty, then it must exist under \"./\". Otherwise, \"./\" will be used.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable": { + "description": "An environment variable required by this task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable", + "properties": { + "name": { + "description": "The envvar name.", + "type": "string" + }, + "value": { + "description": "The envvar value.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs": { + "description": "Describes the expected outputs of the command.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs", + "properties": { + "directories": { + "description": "A list of expected directories, relative to the execution root. All paths MUST be delimited by forward slashes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "files": { + "description": "A list of expected files, relative to the execution root. All paths MUST be delimited by forward slashes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "stderrDestination": { + "description": "The destination to which any stderr should be sent. The method by which the bot should send the stream contents to that destination is not defined in this API. As examples, the destination could be a file referenced in the `files` field in this message, or it could be a URI that must be written via the ByteStream API.", + "type": "string" + }, + "stdoutDestination": { + "description": "The destination to which any stdout should be sent. The method by which the bot should send the stream contents to that destination is not defined in this API. As examples, the destination could be a file referenced in the `files` field in this message, or it could be a URI that must be written via the ByteStream API.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts": { + "description": "Describes the timeouts associated with this task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts", + "properties": { + "execution": { + "description": "This specifies the maximum time that the task can run, excluding the time required to download inputs or upload outputs. That is, the worker will terminate the task if it runs longer than this.", + "format": "google-duration", + "type": "string" + }, + "idle": { + "description": "This specifies the maximum amount of time the task can be idle - that is, go without generating some output in either stdout or stderr. If the process is silent for more than the specified time, the worker will terminate the task.", + "format": "google-duration", + "type": "string" + }, + "shutdown": { + "description": "If the execution or IO timeouts are exceeded, the worker will try to gracefully terminate the task and return any existing logs. However, tasks may be hard-frozen in which case this process will fail. This timeout specifies how long to wait for a terminated task to shut down gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g. SIGKILL on *nix, CTRL_BREAK_EVENT on Windows).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Digest": { + "description": "The CommandTask and CommandResult messages assume the existence of a service that can serve blobs of content, identified by a hash and size known as a \"digest.\" The method by which these blobs may be retrieved is not specified here, but a model implementation is in the Remote Execution API's \"ContentAddressibleStorage\" interface. In the context of the RWAPI, a Digest will virtually always refer to the contents of a file or a directory. The latter is represented by the byte-encoded Directory message.", + "id": "GoogleDevtoolsRemoteworkersV1test2Digest", + "properties": { + "hash": { + "description": "A string-encoded hash (eg \"1a2b3c\", not the byte array [0x1a, 0x2b, 0x3c]) using an implementation-defined hash algorithm (eg SHA-256).", + "type": "string" + }, + "sizeBytes": { + "description": "The size of the contents. While this is not strictly required as part of an identifier (after all, any given hash will have exactly one canonical size), it's useful in almost all cases when one might want to send or retrieve blobs of content and is included here for this reason.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Directory": { + "description": "The contents of a directory. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2Directory", + "properties": { + "directories": { + "description": "Any subdirectories", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata" + }, + "type": "array" + }, + "files": { + "description": "The files in this directory", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2FileMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata": { + "description": "The metadata for a directory. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata", + "properties": { + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "A pointer to the contents of the directory, in the form of a marshalled Directory message." + }, + "path": { + "description": "The path of the directory, as in FileMetadata.path.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2FileMetadata": { + "description": "The metadata for a file. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2FileMetadata", + "properties": { + "contents": { + "description": "If the file is small enough, its contents may also or alternatively be listed here.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "A pointer to the contents of the file. The method by which a client retrieves the contents from a CAS system is not defined here." + }, + "isExecutable": { + "description": "Properties of the file", + "type": "boolean" + }, + "path": { + "description": "The path of this file. If this message is part of the CommandOutputs.outputs fields, the path is relative to the execution root and must correspond to an entry in CommandTask.outputs.files. If this message is part of a Directory message, then the path is relative to the root of that directory. All paths MUST be delimited by forward slashes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Remote Build Execution API", + "version": "v1alpha", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..0db953347c14b078bf84f4c48a3c58963d50390c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/remotebuildexecution.v2.json @@ -0,0 +1,2623 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud Platform data" + } + } + } + }, + "basePath": "", + "baseUrl": "https://remotebuildexecution.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Remote Build Execution", + "description": "Supplies a Remote Execution API service for tools such as bazel.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/remote-build-execution/docs/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "remotebuildexecution:v2", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://remotebuildexecution.mtls.googleapis.com/", + "name": "remotebuildexecution", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "actionResults": { + "methods": { + "get": { + "description": "Retrieve a cached execution result. Implementations SHOULD ensure that any blobs referenced from the ContentAddressableStorage are available at the time of returning the ActionResult and will be for some period of time afterwards. The lifetimes of the referenced blobs SHOULD be increased if necessary and applicable. Errors: * `NOT_FOUND`: The requested `ActionResult` is not in the cache.", + "flatPath": "v2/{v2Id}/actionResults/{hash}/{sizeBytes}", + "httpMethod": "GET", + "id": "remotebuildexecution.actionResults.get", + "parameterOrder": [ + "instanceName", + "hash", + "sizeBytes" + ], + "parameters": { + "hash": { + "description": "The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.", + "location": "path", + "required": true, + "type": "string" + }, + "inlineOutputFiles": { + "description": "A hint to the server to inline the contents of the listed output files. Each path needs to exactly match one file path in either `output_paths` or `output_files` (DEPRECATED since v2.1) in the Command message.", + "location": "query", + "repeated": true, + "type": "string" + }, + "inlineStderr": { + "description": "A hint to the server to request inlining stderr in the ActionResult message.", + "location": "query", + "type": "boolean" + }, + "inlineStdout": { + "description": "A hint to the server to request inlining stdout in the ActionResult message.", + "location": "query", + "type": "boolean" + }, + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + }, + "sizeBytes": { + "description": "The size of the blob, in bytes.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/actionResults/{hash}/{sizeBytes}", + "response": { + "$ref": "BuildBazelRemoteExecutionV2ActionResult" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "update": { + "description": "Upload a new execution result. In order to allow the server to perform access control based on the type of action, and to assist with client debugging, the client MUST first upload the Action that produced the result, along with its Command, into the `ContentAddressableStorage`. Server implementations MAY modify the `UpdateActionResultRequest.action_result` and return an equivalent value. Errors: * `INVALID_ARGUMENT`: One or more arguments are invalid. * `FAILED_PRECONDITION`: One or more errors occurred in updating the action result, such as a missing command or action. * `RESOURCE_EXHAUSTED`: There is insufficient storage space to add the entry to the cache.", + "flatPath": "v2/{v2Id}/actionResults/{hash}/{sizeBytes}", + "httpMethod": "PUT", + "id": "remotebuildexecution.actionResults.update", + "parameterOrder": [ + "instanceName", + "hash", + "sizeBytes" + ], + "parameters": { + "hash": { + "description": "The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.", + "location": "path", + "required": true, + "type": "string" + }, + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + }, + "resultsCachePolicy.priority": { + "description": "The priority (relative importance) of this content in the overall cache. Generally, a lower value means a longer retention time or other advantage, but the interpretation of a given value is server-dependent. A priority of 0 means a *default* value, decided by the server. The particular semantics of this field is up to the server. In particular, every server will have their own supported range of priorities, and will decide how these map into retention/eviction policy.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "sizeBytes": { + "description": "The size of the blob, in bytes.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/actionResults/{hash}/{sizeBytes}", + "request": { + "$ref": "BuildBazelRemoteExecutionV2ActionResult" + }, + "response": { + "$ref": "BuildBazelRemoteExecutionV2ActionResult" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "actions": { + "methods": { + "execute": { + "description": "Execute an action remotely. In order to execute an action, the client must first upload all of the inputs, the Command to run, and the Action into the ContentAddressableStorage. It then calls `Execute` with an `action_digest` referring to them. The server will run the action and eventually return the result. The input `Action`'s fields MUST meet the various canonicalization requirements specified in the documentation for their types so that it has the same digest as other logically equivalent `Action`s. The server MAY enforce the requirements and return errors if a non-canonical input is received. It MAY also proceed without verifying some or all of the requirements, such as for performance reasons. If the server does not verify the requirement, then it will treat the `Action` as distinct from another logically equivalent action if they hash differently. Returns a stream of google.longrunning.Operation messages describing the resulting execution, with eventual `response` ExecuteResponse. The `metadata` on the operation is of type ExecuteOperationMetadata. If the client remains connected after the first response is returned after the server, then updates are streamed as if the client had called WaitExecution until the execution completes or the request reaches an error. The operation can also be queried using Operations API. The server NEED NOT implement other methods or functionality of the Operations API. Errors discovered during creation of the `Operation` will be reported as gRPC Status errors, while errors that occurred while running the action will be reported in the `status` field of the `ExecuteResponse`. The server MUST NOT set the `error` field of the `Operation` proto. The possible errors include: * `INVALID_ARGUMENT`: One or more arguments are invalid. * `FAILED_PRECONDITION`: One or more errors occurred in setting up the action requested, such as a missing input or command or no worker being available. The client may be able to fix the errors and retry. * `RESOURCE_EXHAUSTED`: There is insufficient quota of some resource to run the action. * `UNAVAILABLE`: Due to a transient condition, such as all workers being occupied (and the server does not support a queue), the action could not be started. The client should retry. * `INTERNAL`: An internal error occurred in the execution engine or the worker. * `DEADLINE_EXCEEDED`: The execution timed out. * `CANCELLED`: The operation was cancelled by the client. This status is only possible if the server implements the Operations API CancelOperation method, and it was called for the current execution. In the case of a missing input or command, the server SHOULD additionally send a PreconditionFailure error detail where, for each requested blob not present in the CAS, there is a `Violation` with a `type` of `MISSING` and a `subject` of `\"blobs/{hash}/{size}\"` indicating the digest of the missing blob. The server does not need to guarantee that a call to this method leads to at most one execution of the action. The server MAY execute the action multiple times, potentially in parallel. These redundant executions MAY continue to run, even if the operation is completed.", + "flatPath": "v2/{v2Id}/actions:execute", + "httpMethod": "POST", + "id": "remotebuildexecution.actions.execute", + "parameterOrder": [ + "instanceName" + ], + "parameters": { + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/actions:execute", + "request": { + "$ref": "BuildBazelRemoteExecutionV2ExecuteRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "blobs": { + "methods": { + "batchRead": { + "description": "Download many blobs at once. The server may enforce a limit of the combined total size of blobs to be downloaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or downloaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream `Read` request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: * `INVALID_ARGUMENT`: The client attempted to read more than the server supported limit. Every error on individual read will be returned in the corresponding digest status.", + "flatPath": "v2/{v2Id}/blobs:batchRead", + "httpMethod": "POST", + "id": "remotebuildexecution.blobs.batchRead", + "parameterOrder": [ + "instanceName" + ], + "parameters": { + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/blobs:batchRead", + "request": { + "$ref": "BuildBazelRemoteExecutionV2BatchReadBlobsRequest" + }, + "response": { + "$ref": "BuildBazelRemoteExecutionV2BatchReadBlobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "batchUpdate": { + "description": "Upload many blobs at once. The server may enforce a limit of the combined total size of blobs to be uploaded using this API. This limit may be obtained using the Capabilities API. Requests exceeding the limit should either be split into smaller chunks or uploaded using the ByteStream API, as appropriate. This request is equivalent to calling a Bytestream `Write` request on each individual blob, in parallel. The requests may succeed or fail independently. Errors: * `INVALID_ARGUMENT`: The client attempted to upload more than the server supported limit. Individual requests may return the following errors, additionally: * `RESOURCE_EXHAUSTED`: There is insufficient disk quota to store the blob. * `INVALID_ARGUMENT`: The Digest does not match the provided data.", + "flatPath": "v2/{v2Id}/blobs:batchUpdate", + "httpMethod": "POST", + "id": "remotebuildexecution.blobs.batchUpdate", + "parameterOrder": [ + "instanceName" + ], + "parameters": { + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/blobs:batchUpdate", + "request": { + "$ref": "BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest" + }, + "response": { + "$ref": "BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "findMissing": { + "description": "Determine if blobs are present in the CAS. Clients can use this API before uploading blobs to determine which ones are already present in the CAS and do not need to be uploaded again. Servers SHOULD increase the lifetimes of the referenced blobs if necessary and applicable. There are no method-specific errors.", + "flatPath": "v2/{v2Id}/blobs:findMissing", + "httpMethod": "POST", + "id": "remotebuildexecution.blobs.findMissing", + "parameterOrder": [ + "instanceName" + ], + "parameters": { + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/blobs:findMissing", + "request": { + "$ref": "BuildBazelRemoteExecutionV2FindMissingBlobsRequest" + }, + "response": { + "$ref": "BuildBazelRemoteExecutionV2FindMissingBlobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "getTree": { + "description": "Fetch the entire directory tree rooted at a node. This request must be targeted at a Directory stored in the ContentAddressableStorage (CAS). The server will enumerate the `Directory` tree recursively and return every node descended from the root. The GetTreeRequest.page_token parameter can be used to skip ahead in the stream (e.g. when retrying a partially completed and aborted request), by setting it to a value taken from GetTreeResponse.next_page_token of the last successfully processed GetTreeResponse). The exact traversal order is unspecified and, unless retrieving subsequent pages from an earlier request, is not guaranteed to be stable across multiple invocations of `GetTree`. If part of the tree is missing from the CAS, the server will return the portion present and omit the rest. Errors: * `NOT_FOUND`: The requested tree root is not present in the CAS.", + "flatPath": "v2/{v2Id}/blobs/{hash}/{sizeBytes}:getTree", + "httpMethod": "GET", + "id": "remotebuildexecution.blobs.getTree", + "parameterOrder": [ + "instanceName", + "hash", + "sizeBytes" + ], + "parameters": { + "hash": { + "description": "The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.", + "location": "path", + "required": true, + "type": "string" + }, + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "A maximum page size to request. If present, the server will request no more than this many items. Regardless of whether a page size is specified, the server may place its own limit on the number of items to be returned and require the client to retrieve more items using a subsequent request.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "A page token, which must be a value received in a previous GetTreeResponse. If present, the server will use that token as an offset, returning only that page and the ones that succeed it.", + "location": "query", + "type": "string" + }, + "sizeBytes": { + "description": "The size of the blob, in bytes.", + "format": "int64", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/blobs/{hash}/{sizeBytes}:getTree", + "response": { + "$ref": "BuildBazelRemoteExecutionV2GetTreeResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "operations": { + "methods": { + "waitExecution": { + "description": "Wait for an execution operation to complete. When the client initially makes the request, the server immediately responds with the current status of the execution. The server will leave the request stream open until the operation completes, and then respond with the completed operation. The server MAY choose to stream additional updates as execution progresses, such as to provide an update as to the state of the execution.", + "flatPath": "v2/operations/{operationsId}:waitExecution", + "httpMethod": "POST", + "id": "remotebuildexecution.operations.waitExecution", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the Operation returned by Execute.", + "location": "path", + "pattern": "^operations/.*$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+name}:waitExecution", + "request": { + "$ref": "BuildBazelRemoteExecutionV2WaitExecutionRequest" + }, + "response": { + "$ref": "GoogleLongrunningOperation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "v2": { + "methods": { + "getCapabilities": { + "description": "GetCapabilities returns the server capabilities configuration of the remote endpoint. Only the capabilities of the services supported by the endpoint will be returned: * Execution + CAS + Action Cache endpoints should return both CacheCapabilities and ExecutionCapabilities. * Execution only endpoints should return ExecutionCapabilities. * CAS + Action Cache only endpoints should return CacheCapabilities.", + "flatPath": "v2/{v2Id}/capabilities", + "httpMethod": "GET", + "id": "remotebuildexecution.getCapabilities", + "parameterOrder": [ + "instanceName" + ], + "parameters": { + "instanceName": { + "description": "The instance of the execution system to operate against. A server may support multiple instances of the execution system (with their own workers, storage, caches, etc.). The server MAY require use of this field to select between them in an implementation-defined fashion, otherwise it can be omitted.", + "location": "path", + "pattern": "^.*$", + "required": true, + "type": "string" + } + }, + "path": "v2/{+instanceName}/capabilities", + "response": { + "$ref": "BuildBazelRemoteExecutionV2ServerCapabilities" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + }, + "revision": "20210712", + "rootUrl": "https://remotebuildexecution.googleapis.com/", + "schemas": { + "BuildBazelRemoteExecutionV2Action": { + "description": "An `Action` captures all the information about an execution which is required to reproduce it. `Action`s are the core component of the [Execution] service. A single `Action` represents a repeatable action that can be performed by the execution service. `Action`s can be succinctly identified by the digest of their wire format encoding and, once an `Action` has been executed, will be cached in the action cache. Future requests can then use the cached result rather than needing to run afresh. When a server completes execution of an Action, it MAY choose to cache the result in the ActionCache unless `do_not_cache` is `true`. Clients SHOULD expect the server to do so. By default, future calls to Execute the same `Action` will also serve their results from the cache. Clients must take care to understand the caching behaviour. Ideally, all `Action`s will be reproducible so that serving a result from cache is always desirable and correct.", + "id": "BuildBazelRemoteExecutionV2Action", + "properties": { + "commandDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Command to run, which MUST be present in the ContentAddressableStorage." + }, + "doNotCache": { + "description": "If true, then the `Action`'s result cannot be cached, and in-flight requests for the same `Action` may not be merged.", + "type": "boolean" + }, + "inputRootDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the root Directory for the input files. The files in the directory tree are available in the correct location on the build machine before the command is executed. The root directory, as well as every subdirectory and content blob referred to, MUST be in the ContentAddressableStorage." + }, + "platform": { + "$ref": "BuildBazelRemoteExecutionV2Platform", + "description": "The optional platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. New in version 2.2: clients SHOULD set these platform properties as well as those in the Command. Servers SHOULD prefer those set here." + }, + "salt": { + "description": "An optional additional salt value used to place this `Action` into a separate cache namespace from other instances having the same field contents. This salt typically comes from operational configuration specific to sources such as repo and service configuration, and allows disowning an entire set of ActionResults that might have been poisoned by buggy software or tool failures.", + "format": "byte", + "type": "string" + }, + "timeout": { + "description": "A timeout after which the execution should be killed. If the timeout is absent, then the client is specifying that the execution should continue as long as the server will let it. The server SHOULD impose a timeout if the client does not specify one, however, if the client does specify a timeout that is longer than the server's maximum timeout, the server MUST reject the request. The timeout is a part of the Action message, and therefore two `Actions` with different timeouts are different, even if they are otherwise identical. This is because, if they were not, running an `Action` with a lower timeout than is required might result in a cache hit from an execution run with a longer timeout, hiding the fact that the timeout is too short. By encoding it directly in the `Action`, a lower timeout will result in a cache miss and the execution timeout will fail immediately, rather than whenever the cache entry gets evicted.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities": { + "description": "Describes the server/instance capabilities for updating the action cache.", + "id": "BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities", + "properties": { + "updateEnabled": { + "type": "boolean" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ActionResult": { + "description": "An ActionResult represents the result of an Action being run. It is advised that at least one field (for example `ActionResult.execution_metadata.Worker`) have a non-default value, to ensure that the serialized value is non-empty, which can then be used as a basic data sanity check.", + "id": "BuildBazelRemoteExecutionV2ActionResult", + "properties": { + "executionMetadata": { + "$ref": "BuildBazelRemoteExecutionV2ExecutedActionMetadata", + "description": "The details of the execution that originally produced this result." + }, + "exitCode": { + "description": "The exit code of the command.", + "format": "int32", + "type": "integer" + }, + "outputDirectories": { + "description": "The output directories of the action. For each output directory requested in the `output_directories` or `output_paths` field of the Action, if the corresponding directory existed after the action completed, a single entry will be present in the output list, which will contain the digest of a Tree message containing the directory tree, and the path equal exactly to the corresponding Action output_directories member. As an example, suppose the Action had an output directory `a/b/dir` and the execution produced the following contents in `a/b/dir`: a file named `bar` and a directory named `foo` with an executable file named `baz`. Then, output_directory will contain (hashes shortened for readability): ```json // OutputDirectory proto: { path: \"a/b/dir\" tree_digest: { hash: \"4a73bc9d03...\", size: 55 } } // Tree proto with hash \"4a73bc9d03...\" and size 55: { root: { files: [ { name: \"bar\", digest: { hash: \"4a73bc9d03...\", size: 65534 } } ], directories: [ { name: \"foo\", digest: { hash: \"4cf2eda940...\", size: 43 } } ] } children : { // (Directory proto with hash \"4cf2eda940...\" and size 43) files: [ { name: \"baz\", digest: { hash: \"b2c941073e...\", size: 1294, }, is_executable: true } ] } } ``` If an output of the same name as listed in `output_files` of the Command was found in `output_directories`, but was not a directory, the server will return a FAILED_PRECONDITION.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputDirectory" + }, + "type": "array" + }, + "outputDirectorySymlinks": { + "description": "The output directories of the action that are symbolic links to other directories. Those may be links to other output directories, or input directories, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output directory requested in the `output_directories` field of the Action, if the directory existed after the action completed, a single entry will be present either in this field, or in the `output_directories` field, if the directory was not a symbolic link. If an output of the same name was found, but was a symbolic link to a file instead of a directory, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "outputFileSymlinks": { + "description": "The output files of the action that are symbolic links to other files. Those may be links to other output files, or input files, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or in the `output_files` field, if the file was not a symbolic link. If an output symbolic link of the same name as listed in `output_files` of the Command was found, but its target type was not a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted. DEPRECATED as of v2.1. Servers that wish to be compatible with v2.0 API should still populate this field in addition to `output_symlinks`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "outputFiles": { + "description": "The output files of the action. For each output file requested in the `output_files` or `output_paths` field of the Action, if the corresponding file existed after the action completed, a single entry will be present either in this field, or the `output_file_symlinks` field if the file was a symbolic link to another file (`output_symlinks` field after v2.1). If an output listed in `output_files` was found, but was a directory rather than a regular file, the server will return a FAILED_PRECONDITION. If the action does not produce the requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputFile" + }, + "type": "array" + }, + "outputSymlinks": { + "description": "New in v2.1: this field will only be populated if the command `output_paths` field was used, and not the pre v2.1 `output_files` or `output_directories` fields. The output paths of the action that are symbolic links to other paths. Those may be links to other outputs, or inputs, or even absolute paths outside of the working directory, if the server supports SymlinkAbsolutePathStrategy.ALLOWED. A single entry for each output requested in `output_paths` field of the Action, if the corresponding path existed after the action completed and was a symbolic link. If the action does not produce a requested output, then that output will be omitted from the list. The server is free to arrange the output list as desired; clients MUST NOT assume that the output list is sorted.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2OutputSymlink" + }, + "type": "array" + }, + "stderrDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest for a blob containing the standard error of the action, which can be retrieved from the ContentAddressableStorage." + }, + "stderrRaw": { + "description": "The standard error buffer of the action. The server SHOULD NOT inline stderr unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + }, + "stdoutDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest for a blob containing the standard output of the action, which can be retrieved from the ContentAddressableStorage." + }, + "stdoutRaw": { + "description": "The standard output buffer of the action. The server SHOULD NOT inline stdout unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2BatchReadBlobsRequest": { + "description": "A request message for ContentAddressableStorage.BatchReadBlobs.", + "id": "BuildBazelRemoteExecutionV2BatchReadBlobsRequest", + "properties": { + "digests": { + "description": "The individual blob digests.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2Digest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2BatchReadBlobsResponse": { + "description": "A response message for ContentAddressableStorage.BatchReadBlobs.", + "id": "BuildBazelRemoteExecutionV2BatchReadBlobsResponse", + "properties": { + "responses": { + "description": "The responses to the requests.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2BatchReadBlobsResponseResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2BatchReadBlobsResponseResponse": { + "description": "A response corresponding to a single blob that the client tried to download.", + "id": "BuildBazelRemoteExecutionV2BatchReadBlobsResponseResponse", + "properties": { + "data": { + "description": "The raw binary data.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest to which this response corresponds." + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The result of attempting to download that blob." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest": { + "description": "A request message for ContentAddressableStorage.BatchUpdateBlobs.", + "id": "BuildBazelRemoteExecutionV2BatchUpdateBlobsRequest", + "properties": { + "requests": { + "description": "The individual upload requests.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2BatchUpdateBlobsRequestRequest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2BatchUpdateBlobsRequestRequest": { + "description": "A request corresponding to a single blob that the client wants to upload.", + "id": "BuildBazelRemoteExecutionV2BatchUpdateBlobsRequestRequest", + "properties": { + "data": { + "description": "The raw binary data.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the blob. This MUST be the digest of `data`." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse": { + "description": "A response message for ContentAddressableStorage.BatchUpdateBlobs.", + "id": "BuildBazelRemoteExecutionV2BatchUpdateBlobsResponse", + "properties": { + "responses": { + "description": "The responses to the requests.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2BatchUpdateBlobsResponseResponse" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2BatchUpdateBlobsResponseResponse": { + "description": "A response corresponding to a single blob that the client tried to upload.", + "id": "BuildBazelRemoteExecutionV2BatchUpdateBlobsResponseResponse", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The blob digest to which this response corresponds." + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "The result of attempting to upload that blob." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2CacheCapabilities": { + "description": "Capabilities of the remote cache system.", + "id": "BuildBazelRemoteExecutionV2CacheCapabilities", + "properties": { + "actionCacheUpdateCapabilities": { + "$ref": "BuildBazelRemoteExecutionV2ActionCacheUpdateCapabilities", + "description": "Capabilities for updating the action cache." + }, + "cachePriorityCapabilities": { + "$ref": "BuildBazelRemoteExecutionV2PriorityCapabilities", + "description": "Supported cache priority range for both CAS and ActionCache." + }, + "digestFunction": { + "description": "All the digest functions supported by the remote cache. Remote cache may support multiple digest functions simultaneously.", + "items": { + "enum": [ + "UNKNOWN", + "SHA256", + "SHA1", + "MD5", + "VSO", + "SHA384", + "SHA512", + "MURMUR3" + ], + "enumDescriptions": [ + "It is an error for the server to return this value.", + "The SHA-256 digest function.", + "The SHA-1 digest function.", + "The MD5 digest function.", + "The Microsoft \"VSO-Hash\" paged SHA256 digest function. See https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/PagedHash.md .", + "The SHA-384 digest function.", + "The SHA-512 digest function.", + "Murmur3 128-bit digest function, x64 variant. Note that this is not a cryptographic hash function and its collision properties are not strongly guaranteed. See https://github.com/aappleby/smhasher/wiki/MurmurHash3 ." + ], + "type": "string" + }, + "type": "array" + }, + "maxBatchTotalSizeBytes": { + "description": "Maximum total size of blobs to be uploaded/downloaded using batch methods. A value of 0 means no limit is set, although in practice there will always be a message size limitation of the protocol in use, e.g. GRPC.", + "format": "int64", + "type": "string" + }, + "supportedCompressor": { + "description": "Compressors supported by the \"compressed-blobs\" bytestream resources. Servers MUST support identity/no-compression, even if it is not listed here. Note that this does not imply which if any compressors are supported by the server at the gRPC level.", + "items": { + "enum": [ + "IDENTITY", + "ZSTD" + ], + "enumDescriptions": [ + "No compression. Servers and clients MUST always support this, and do not need to advertise it.", + "Zstandard compression." + ], + "type": "string" + }, + "type": "array" + }, + "symlinkAbsolutePathStrategy": { + "description": "Whether absolute symlink targets are supported.", + "enum": [ + "UNKNOWN", + "DISALLOWED", + "ALLOWED" + ], + "enumDescriptions": [ + "Invalid value.", + "Server will return an `INVALID_ARGUMENT` on input symlinks with absolute targets. If an action tries to create an output symlink with an absolute target, a `FAILED_PRECONDITION` will be returned.", + "Server will allow symlink targets to escape the input root tree, possibly resulting in non-hermetic builds." + ], + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Command": { + "description": "A `Command` is the actual command executed by a worker running an Action and specifications of its environment. Except as otherwise required, the environment (such as which system libraries or binaries are available, and what filesystems are mounted where) is defined by and specific to the implementation of the remote execution API.", + "id": "BuildBazelRemoteExecutionV2Command", + "properties": { + "arguments": { + "description": "The arguments to the command. The first argument must be the path to the executable, which must be either a relative path, in which case it is evaluated with respect to the input root, or an absolute path.", + "items": { + "type": "string" + }, + "type": "array" + }, + "environmentVariables": { + "description": "The environment variables to set when running the program. The worker may provide its own default environment variables; these defaults can be overridden using this field. Additional variables can also be specified. In order to ensure that equivalent Commands always hash to the same value, the environment variables MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2CommandEnvironmentVariable" + }, + "type": "array" + }, + "outputDirectories": { + "description": "A list of the output directories that the client expects to retrieve from the action. Only the listed directories will be returned (an entire directory structure will be returned as a Tree message digest, see OutputDirectory), as well as files listed in `output_files`. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. The special value of empty string is allowed, although not recommended, and can be used to capture the entire working directory tree, including inputs. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output directory cannot be duplicated or have the same path as any of the listed output files. An output directory is allowed to be a parent of another output directory. Directories leading up to the output directories (but not the output directories themselves) are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since 2.1: Use `output_paths` instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputFiles": { + "description": "A list of the output files that the client expects to retrieve from the action. Only the listed files, as well as directories listed in `output_directories`, will be returned to the client as output. Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). An output file cannot be duplicated, be a parent of another output file, or have the same path as any of the listed output directories. Directories leading up to the output files are created by the worker prior to execution, even if they are not explicitly part of the input root. DEPRECATED since v2.1: Use `output_paths` instead.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputNodeProperties": { + "description": "A list of keys for node properties the client expects to retrieve for output files and directories. Keys are either names of string-based NodeProperty or names of fields in NodeProperties. In order to ensure that equivalent `Action`s always hash to the same value, the node properties MUST be lexicographically sorted by name. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes. The interpretation of string-based properties is server-dependent. If a property is not recognized by the server, the server will return an `INVALID_ARGUMENT`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "outputPaths": { + "description": "A list of the output paths that the client expects to retrieve from the action. Only the listed paths will be returned to the client as output. The type of the output (file or directory) is not specified, and will be determined by the server after action execution. If the resulting path is a file, it will be returned in an OutputFile) typed field. If the path is a directory, the entire directory structure will be returned as a Tree message digest, see OutputDirectory) Other files or directories that may be created during command execution are discarded. The paths are relative to the working directory of the action execution. The paths are specified using a single forward slash (`/`) as a path separator, even if the execution platform natively uses a different separator. The path MUST NOT include a trailing slash, nor a leading slash, being a relative path. In order to ensure consistent hashing of the same Action, the output paths MUST be deduplicated and sorted lexicographically by code point (or, equivalently, by UTF-8 bytes). Directories leading up to the output paths are created by the worker prior to execution, even if they are not explicitly part of the input root. New in v2.1: this field supersedes the DEPRECATED `output_files` and `output_directories` fields. If `output_paths` is used, `output_files` and `output_directories` will be ignored!", + "items": { + "type": "string" + }, + "type": "array" + }, + "platform": { + "$ref": "BuildBazelRemoteExecutionV2Platform", + "description": "The platform requirements for the execution environment. The server MAY choose to execute the action on any worker satisfying the requirements, so the client SHOULD ensure that running the action on any such worker will have the same result. A detailed lexicon for this can be found in the accompanying platform.md. DEPRECATED as of v2.2: platform properties are now specified directly in the action. See documentation note in the Action for migration." + }, + "workingDirectory": { + "description": "The working directory, relative to the input root, for the command to run in. It must be a directory which exists in the input tree. If it is left empty, then the action is run in the input root.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2CommandEnvironmentVariable": { + "description": "An `EnvironmentVariable` is one variable to set in the running program's environment.", + "id": "BuildBazelRemoteExecutionV2CommandEnvironmentVariable", + "properties": { + "name": { + "description": "The variable name.", + "type": "string" + }, + "value": { + "description": "The variable value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Digest": { + "description": "A content digest. A digest for a given blob consists of the size of the blob and its hash. The hash algorithm to use is defined by the server. The size is considered to be an integral part of the digest and cannot be separated. That is, even if the `hash` field is correctly specified but `size_bytes` is not, the server MUST reject the request. The reason for including the size in the digest is as follows: in a great many cases, the server needs to know the size of the blob it is about to work with prior to starting an operation with it, such as flattening Merkle tree structures or streaming it to a worker. Technically, the server could implement a separate metadata store, but this results in a significantly more complicated implementation as opposed to having the client specify the size up-front (or storing the size along with the digest in every message where digests are embedded). This does mean that the API leaks some implementation details of (what we consider to be) a reasonable server implementation, but we consider this to be a worthwhile tradeoff. When a `Digest` is used to refer to a proto message, it always refers to the message in binary encoded form. To ensure consistent hashing, clients and servers MUST ensure that they serialize messages according to the following rules, even if there are alternate valid encodings for the same message: * Fields are serialized in tag order. * There are no unknown fields. * There are no duplicate fields. * Fields are serialized according to the default semantics for their type. Most protocol buffer implementations will always follow these rules when serializing, but care should be taken to avoid shortcuts. For instance, concatenating two messages to merge them may produce duplicate fields.", + "id": "BuildBazelRemoteExecutionV2Digest", + "properties": { + "hash": { + "description": "The hash. In the case of SHA-256, it will always be a lowercase hex string exactly 64 characters long.", + "type": "string" + }, + "sizeBytes": { + "description": "The size of the blob, in bytes.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Directory": { + "description": "A `Directory` represents a directory node in a file tree, containing zero or more children FileNodes, DirectoryNodes and SymlinkNodes. Each `Node` contains its name in the directory, either the digest of its content (either a file blob or a `Directory` proto) or a symlink target, as well as possibly some metadata about the file or directory. In order to ensure that two equivalent directory trees hash to the same value, the following restrictions MUST be obeyed when constructing a a `Directory`: * Every child in the directory must have a path of exactly one segment. Multiple levels of directory hierarchy may not be collapsed. * Each child in the directory must have a unique path segment (file name). Note that while the API itself is case-sensitive, the environment where the Action is executed may or may not be case-sensitive. That is, it is legal to call the API with a Directory that has both \"Foo\" and \"foo\" as children, but the Action may be rejected by the remote system upon execution. * The files, directories and symlinks in the directory must each be sorted in lexicographical order by path. The path strings must be sorted by code point, equivalently, by UTF-8 bytes. * The NodeProperties of files, directories, and symlinks must be sorted in lexicographical order by property name. A `Directory` that obeys the restrictions is said to be in canonical form. As an example, the following could be used for a file named `bar` and a directory named `foo` with an executable file named `baz` (hashes shortened for readability): ```json // (Directory proto) { files: [ { name: \"bar\", digest: { hash: \"4a73bc9d03...\", size: 65534 }, node_properties: [ { \"name\": \"MTime\", \"value\": \"2017-01-15T01:30:15.01Z\" } ] } ], directories: [ { name: \"foo\", digest: { hash: \"4cf2eda940...\", size: 43 } } ] } // (Directory proto with hash \"4cf2eda940...\" and size 43) { files: [ { name: \"baz\", digest: { hash: \"b2c941073e...\", size: 1294, }, is_executable: true } ] } ```", + "id": "BuildBazelRemoteExecutionV2Directory", + "properties": { + "directories": { + "description": "The subdirectories in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2DirectoryNode" + }, + "type": "array" + }, + "files": { + "description": "The files in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2FileNode" + }, + "type": "array" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "symlinks": { + "description": "The symlinks in the directory.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2SymlinkNode" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2DirectoryNode": { + "description": "A `DirectoryNode` represents a child of a Directory which is itself a `Directory` and its associated metadata.", + "id": "BuildBazelRemoteExecutionV2DirectoryNode", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Directory object represented. See Digest for information about how to take the digest of a proto message." + }, + "name": { + "description": "The name of the directory.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecuteOperationMetadata": { + "description": "Metadata about an ongoing execution, which will be contained in the metadata field of the Operation.", + "id": "BuildBazelRemoteExecutionV2ExecuteOperationMetadata", + "properties": { + "actionDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Action being executed." + }, + "stage": { + "description": "The current stage of execution.", + "enum": [ + "UNKNOWN", + "CACHE_CHECK", + "QUEUED", + "EXECUTING", + "COMPLETED" + ], + "enumDescriptions": [ + "Invalid value.", + "Checking the result against the cache.", + "Currently idle, awaiting a free machine to execute.", + "Currently being executed by a worker.", + "Finished execution." + ], + "type": "string" + }, + "stderrStreamName": { + "description": "If set, the client can use this resource name with ByteStream.Read to stream the standard error from the endpoint hosting streamed responses.", + "type": "string" + }, + "stdoutStreamName": { + "description": "If set, the client can use this resource name with ByteStream.Read to stream the standard output from the endpoint hosting streamed responses.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecuteRequest": { + "description": "A request message for Execution.Execute.", + "id": "BuildBazelRemoteExecutionV2ExecuteRequest", + "properties": { + "actionDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the Action to execute." + }, + "executionPolicy": { + "$ref": "BuildBazelRemoteExecutionV2ExecutionPolicy", + "description": "An optional policy for execution of the action. The server will have a default policy if this is not provided." + }, + "resultsCachePolicy": { + "$ref": "BuildBazelRemoteExecutionV2ResultsCachePolicy", + "description": "An optional policy for the results of this execution in the remote cache. The server will have a default policy if this is not provided. This may be applied to both the ActionResult and the associated blobs." + }, + "skipCacheLookup": { + "description": "If true, the action will be executed even if its result is already present in the ActionCache. The execution is still allowed to be merged with other in-flight executions of the same action, however - semantically, the service MUST only guarantee that the results of an execution with this field set were not visible before the corresponding execution request was sent. Note that actions from execution requests setting this field set are still eligible to be entered into the action cache upon completion, and services SHOULD overwrite any existing entries that may exist. This allows skip_cache_lookup requests to be used as a mechanism for replacing action cache entries that reference outputs no longer available or that are poisoned in any way. If false, the result may be served from the action cache.", + "type": "boolean" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecuteResponse": { + "description": "The response message for Execution.Execute, which will be contained in the response field of the Operation.", + "id": "BuildBazelRemoteExecutionV2ExecuteResponse", + "properties": { + "cachedResult": { + "description": "True if the result was served from cache, false if it was executed.", + "type": "boolean" + }, + "message": { + "description": "Freeform informational message with details on the execution of the action that may be displayed to the user upon failure or when requested explicitly.", + "type": "string" + }, + "result": { + "$ref": "BuildBazelRemoteExecutionV2ActionResult", + "description": "The result of the action." + }, + "serverLogs": { + "additionalProperties": { + "$ref": "BuildBazelRemoteExecutionV2LogFile" + }, + "description": "An optional list of additional log outputs the server wishes to provide. A server can use this to return execution-specific logs however it wishes. This is intended primarily to make it easier for users to debug issues that may be outside of the actual job execution, such as by identifying the worker executing the action or by providing logs from the worker's setup phase. The keys SHOULD be human readable so that a client can display them to a user.", + "type": "object" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "If the status has a code other than `OK`, it indicates that the action did not finish execution. For example, if the operation times out during execution, the status will have a `DEADLINE_EXCEEDED` code. Servers MUST use this field for errors in execution, rather than the error field on the `Operation` object. If the status code is other than `OK`, then the result MUST NOT be cached. For an error status, the `result` field is optional; the server may populate the output-, stdout-, and stderr-related fields if it has any information available, such as the stdout and stderr of a timed-out action." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecutedActionMetadata": { + "description": "ExecutedActionMetadata contains details about a completed execution.", + "id": "BuildBazelRemoteExecutionV2ExecutedActionMetadata", + "properties": { + "auxiliaryMetadata": { + "description": "Details that are specific to the kind of worker used. For example, on POSIX-like systems this could contain a message with getrusage(2) statistics.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "executionCompletedTimestamp": { + "description": "When the worker completed executing the action command.", + "format": "google-datetime", + "type": "string" + }, + "executionStartTimestamp": { + "description": "When the worker started executing the action command.", + "format": "google-datetime", + "type": "string" + }, + "inputFetchCompletedTimestamp": { + "description": "When the worker finished fetching action inputs.", + "format": "google-datetime", + "type": "string" + }, + "inputFetchStartTimestamp": { + "description": "When the worker started fetching action inputs.", + "format": "google-datetime", + "type": "string" + }, + "outputUploadCompletedTimestamp": { + "description": "When the worker finished uploading action outputs.", + "format": "google-datetime", + "type": "string" + }, + "outputUploadStartTimestamp": { + "description": "When the worker started uploading action outputs.", + "format": "google-datetime", + "type": "string" + }, + "queuedTimestamp": { + "description": "When was the action added to the queue.", + "format": "google-datetime", + "type": "string" + }, + "worker": { + "description": "The name of the worker which ran the execution.", + "type": "string" + }, + "workerCompletedTimestamp": { + "description": "When the worker completed the action, including all stages.", + "format": "google-datetime", + "type": "string" + }, + "workerStartTimestamp": { + "description": "When the worker received the action.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecutionCapabilities": { + "description": "Capabilities of the remote execution system.", + "id": "BuildBazelRemoteExecutionV2ExecutionCapabilities", + "properties": { + "digestFunction": { + "description": "Remote execution may only support a single digest function.", + "enum": [ + "UNKNOWN", + "SHA256", + "SHA1", + "MD5", + "VSO", + "SHA384", + "SHA512", + "MURMUR3" + ], + "enumDescriptions": [ + "It is an error for the server to return this value.", + "The SHA-256 digest function.", + "The SHA-1 digest function.", + "The MD5 digest function.", + "The Microsoft \"VSO-Hash\" paged SHA256 digest function. See https://github.com/microsoft/BuildXL/blob/master/Documentation/Specs/PagedHash.md .", + "The SHA-384 digest function.", + "The SHA-512 digest function.", + "Murmur3 128-bit digest function, x64 variant. Note that this is not a cryptographic hash function and its collision properties are not strongly guaranteed. See https://github.com/aappleby/smhasher/wiki/MurmurHash3 ." + ], + "type": "string" + }, + "execEnabled": { + "description": "Whether remote execution is enabled for the particular server/instance.", + "type": "boolean" + }, + "executionPriorityCapabilities": { + "$ref": "BuildBazelRemoteExecutionV2PriorityCapabilities", + "description": "Supported execution priority range." + }, + "supportedNodeProperties": { + "description": "Supported node properties.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ExecutionPolicy": { + "description": "An `ExecutionPolicy` can be used to control the scheduling of the action.", + "id": "BuildBazelRemoteExecutionV2ExecutionPolicy", + "properties": { + "priority": { + "description": "The priority (relative importance) of this action. Generally, a lower value means that the action should be run sooner than actions having a greater priority value, but the interpretation of a given value is server- dependent. A priority of 0 means the *default* priority. Priorities may be positive or negative, and such actions should run later or sooner than actions having the default priority, respectively. The particular semantics of this field is up to the server. In particular, every server will have their own supported range of priorities, and will decide how these map into scheduling policy.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2FileNode": { + "description": "A `FileNode` represents a single file and associated metadata.", + "id": "BuildBazelRemoteExecutionV2FileNode", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the file's content." + }, + "isExecutable": { + "description": "True if file is executable, false otherwise.", + "type": "boolean" + }, + "name": { + "description": "The name of the file.", + "type": "string" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2FindMissingBlobsRequest": { + "description": "A request message for ContentAddressableStorage.FindMissingBlobs.", + "id": "BuildBazelRemoteExecutionV2FindMissingBlobsRequest", + "properties": { + "blobDigests": { + "description": "A list of the blobs to check.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2Digest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2FindMissingBlobsResponse": { + "description": "A response message for ContentAddressableStorage.FindMissingBlobs.", + "id": "BuildBazelRemoteExecutionV2FindMissingBlobsResponse", + "properties": { + "missingBlobDigests": { + "description": "A list of the blobs requested *not* present in the storage.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2Digest" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2GetTreeResponse": { + "description": "A response message for ContentAddressableStorage.GetTree.", + "id": "BuildBazelRemoteExecutionV2GetTreeResponse", + "properties": { + "directories": { + "description": "The directories descended from the requested root.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2Directory" + }, + "type": "array" + }, + "nextPageToken": { + "description": "If present, signifies that there are more results which the client can retrieve by passing this as the page_token in a subsequent request. If empty, signifies that this is the last page of results.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2LogFile": { + "description": "A `LogFile` is a log stored in the CAS.", + "id": "BuildBazelRemoteExecutionV2LogFile", + "properties": { + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the log contents." + }, + "humanReadable": { + "description": "This is a hint as to the purpose of the log, and is set to true if the log is human-readable text that can be usefully displayed to a user, and false otherwise. For instance, if a command-line client wishes to print the server logs to the terminal for a failed action, this allows it to avoid displaying a binary file.", + "type": "boolean" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2NodeProperties": { + "description": "Node properties for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the properties that it accepts.", + "id": "BuildBazelRemoteExecutionV2NodeProperties", + "properties": { + "mtime": { + "description": "The file's last modification timestamp.", + "format": "google-datetime", + "type": "string" + }, + "properties": { + "description": "A list of string-based NodeProperties.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperty" + }, + "type": "array" + }, + "unixMode": { + "description": "The UNIX file mode, e.g., 0755.", + "format": "uint32", + "type": "integer" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2NodeProperty": { + "description": "A single property for FileNodes, DirectoryNodes, and SymlinkNodes. The server is responsible for specifying the property `name`s that it accepts. If permitted by the server, the same `name` may occur multiple times.", + "id": "BuildBazelRemoteExecutionV2NodeProperty", + "properties": { + "name": { + "description": "The property name.", + "type": "string" + }, + "value": { + "description": "The property value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputDirectory": { + "description": "An `OutputDirectory` is the output in an `ActionResult` corresponding to a directory's full contents rather than a single file.", + "id": "BuildBazelRemoteExecutionV2OutputDirectory", + "properties": { + "path": { + "description": "The full path of the directory relative to the working directory. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash. The empty string value is allowed, and it denotes the entire working directory.", + "type": "string" + }, + "treeDigest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the encoded Tree proto containing the directory's contents." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputFile": { + "description": "An `OutputFile` is similar to a FileNode, but it is used as an output in an `ActionResult`. It allows a full file path rather than only a name.", + "id": "BuildBazelRemoteExecutionV2OutputFile", + "properties": { + "contents": { + "description": "The contents of the file if inlining was requested. The server SHOULD NOT inline file contents unless requested by the client in the GetActionResultRequest message. The server MAY omit inlining, even if requested, and MUST do so if inlining would cause the response to exceed message size limits.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "BuildBazelRemoteExecutionV2Digest", + "description": "The digest of the file's content." + }, + "isExecutable": { + "description": "True if file is executable, false otherwise.", + "type": "boolean" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "path": { + "description": "The full path of the file relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2OutputSymlink": { + "description": "An `OutputSymlink` is similar to a Symlink, but it is used as an output in an `ActionResult`. `OutputSymlink` is binary-compatible with `SymlinkNode`.", + "id": "BuildBazelRemoteExecutionV2OutputSymlink", + "properties": { + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "path": { + "description": "The full path of the symlink relative to the working directory, including the filename. The path separator is a forward slash `/`. Since this is a relative path, it MUST NOT begin with a leading forward slash.", + "type": "string" + }, + "target": { + "description": "The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. `..` components are allowed anywhere in the target path.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Platform": { + "description": "A `Platform` is a set of requirements, such as hardware, operating system, or compiler toolchain, for an Action's execution environment. A `Platform` is represented as a series of key-value pairs representing the properties that are required of the platform.", + "id": "BuildBazelRemoteExecutionV2Platform", + "properties": { + "properties": { + "description": "The properties that make up this platform. In order to ensure that equivalent `Platform`s always hash to the same value, the properties MUST be lexicographically sorted by name, and then by value. Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2PlatformProperty" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2PlatformProperty": { + "description": "A single property for the environment. The server is responsible for specifying the property `name`s that it accepts. If an unknown `name` is provided in the requirements for an Action, the server SHOULD reject the execution request. If permitted by the server, the same `name` may occur multiple times. The server is also responsible for specifying the interpretation of property `value`s. For instance, a property describing how much RAM must be available may be interpreted as allowing a worker with 16GB to fulfill a request for 8GB, while a property describing the OS environment on which the action must be performed may require an exact match with the worker's OS. The server MAY use the `value` of one or more properties to determine how it sets up the execution environment, such as by making specific system files available to the worker. Both names and values are typically case-sensitive. Note that the platform is implicitly part of the action digest, so even tiny changes in the names or values (like changing case) may result in different action cache entries.", + "id": "BuildBazelRemoteExecutionV2PlatformProperty", + "properties": { + "name": { + "description": "The property name.", + "type": "string" + }, + "value": { + "description": "The property value.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2PriorityCapabilities": { + "description": "Allowed values for priority in ResultsCachePolicy and ExecutionPolicy Used for querying both cache and execution valid priority ranges.", + "id": "BuildBazelRemoteExecutionV2PriorityCapabilities", + "properties": { + "priorities": { + "items": { + "$ref": "BuildBazelRemoteExecutionV2PriorityCapabilitiesPriorityRange" + }, + "type": "array" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2PriorityCapabilitiesPriorityRange": { + "description": "Supported range of priorities, including boundaries.", + "id": "BuildBazelRemoteExecutionV2PriorityCapabilitiesPriorityRange", + "properties": { + "maxPriority": { + "description": "The maximum numeric value for this priority range, which represents the least urgent task or shortest retained item.", + "format": "int32", + "type": "integer" + }, + "minPriority": { + "description": "The minimum numeric value for this priority range, which represents the most urgent task or longest retained item.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2RequestMetadata": { + "description": "An optional Metadata to attach to any RPC request to tell the server about an external context of the request. The server may use this for logging or other purposes. To use it, the client attaches the header to the call using the canonical proto serialization: * name: `build.bazel.remote.execution.v2.requestmetadata-bin` * contents: the base64 encoded binary `RequestMetadata` message. Note: the gRPC library serializes binary headers encoded in base 64 by default (https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests). Therefore, if the gRPC library is used to pass/retrieve this metadata, the user may ignore the base64 encoding and assume it is simply serialized as a binary message.", + "id": "BuildBazelRemoteExecutionV2RequestMetadata", + "properties": { + "actionId": { + "description": "An identifier that ties multiple requests to the same action. For example, multiple requests to the CAS, Action Cache, and Execution API are used in order to compile foo.cc.", + "type": "string" + }, + "actionMnemonic": { + "description": "A brief description of the kind of action, for example, CppCompile or GoLink. There is no standard agreed set of values for this, and they are expected to vary between different client tools.", + "type": "string" + }, + "configurationId": { + "description": "An identifier for the configuration in which the target was built, e.g. for differentiating building host tools or different target platforms. There is no expectation that this value will have any particular structure, or equality across invocations, though some client tools may offer these guarantees.", + "type": "string" + }, + "correlatedInvocationsId": { + "description": "An identifier to tie multiple tool invocations together. For example, runs of foo_test, bar_test and baz_test on a post-submit of a given patch.", + "type": "string" + }, + "targetId": { + "description": "An identifier for the target which produced this action. No guarantees are made around how many actions may relate to a single target.", + "type": "string" + }, + "toolDetails": { + "$ref": "BuildBazelRemoteExecutionV2ToolDetails", + "description": "The details for the tool invoking the requests." + }, + "toolInvocationId": { + "description": "An identifier that ties multiple actions together to a final result. For example, multiple actions are required to build and run foo_test.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ResultsCachePolicy": { + "description": "A `ResultsCachePolicy` is used for fine-grained control over how action outputs are stored in the CAS and Action Cache.", + "id": "BuildBazelRemoteExecutionV2ResultsCachePolicy", + "properties": { + "priority": { + "description": "The priority (relative importance) of this content in the overall cache. Generally, a lower value means a longer retention time or other advantage, but the interpretation of a given value is server-dependent. A priority of 0 means a *default* value, decided by the server. The particular semantics of this field is up to the server. In particular, every server will have their own supported range of priorities, and will decide how these map into retention/eviction policy.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ServerCapabilities": { + "description": "A response message for Capabilities.GetCapabilities.", + "id": "BuildBazelRemoteExecutionV2ServerCapabilities", + "properties": { + "cacheCapabilities": { + "$ref": "BuildBazelRemoteExecutionV2CacheCapabilities", + "description": "Capabilities of the remote cache system." + }, + "deprecatedApiVersion": { + "$ref": "BuildBazelSemverSemVer", + "description": "Earliest RE API version supported, including deprecated versions." + }, + "executionCapabilities": { + "$ref": "BuildBazelRemoteExecutionV2ExecutionCapabilities", + "description": "Capabilities of the remote execution system." + }, + "highApiVersion": { + "$ref": "BuildBazelSemverSemVer", + "description": "Latest RE API version supported." + }, + "lowApiVersion": { + "$ref": "BuildBazelSemverSemVer", + "description": "Earliest non-deprecated RE API version supported." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2SymlinkNode": { + "description": "A `SymlinkNode` represents a symbolic link.", + "id": "BuildBazelRemoteExecutionV2SymlinkNode", + "properties": { + "name": { + "description": "The name of the symlink.", + "type": "string" + }, + "nodeProperties": { + "$ref": "BuildBazelRemoteExecutionV2NodeProperties" + }, + "target": { + "description": "The target path of the symlink. The path separator is a forward slash `/`. The target path can be relative to the parent directory of the symlink or it can be an absolute path starting with `/`. Support for absolute paths can be checked using the Capabilities API. `..` components are allowed anywhere in the target path as logical canonicalization may lead to different behavior in the presence of directory symlinks (e.g. `foo/../bar` may not be the same as `bar`). To reduce potential cache misses, canonicalization is still recommended where this is possible without impacting correctness.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2ToolDetails": { + "description": "Details for the tool used to call the API.", + "id": "BuildBazelRemoteExecutionV2ToolDetails", + "properties": { + "toolName": { + "description": "Name of the tool, e.g. bazel.", + "type": "string" + }, + "toolVersion": { + "description": "Version of the tool used for the request, e.g. 5.0.3.", + "type": "string" + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2Tree": { + "description": "A `Tree` contains all the Directory protos in a single directory Merkle tree, compressed into one message.", + "id": "BuildBazelRemoteExecutionV2Tree", + "properties": { + "children": { + "description": "All the child directories: the directories referred to by the root and, recursively, all its children. In order to reconstruct the directory tree, the client must take the digests of each of the child directories and then build up a tree starting from the `root`.", + "items": { + "$ref": "BuildBazelRemoteExecutionV2Directory" + }, + "type": "array" + }, + "root": { + "$ref": "BuildBazelRemoteExecutionV2Directory", + "description": "The root directory in the tree." + } + }, + "type": "object" + }, + "BuildBazelRemoteExecutionV2WaitExecutionRequest": { + "description": "A request message for WaitExecution.", + "id": "BuildBazelRemoteExecutionV2WaitExecutionRequest", + "properties": {}, + "type": "object" + }, + "BuildBazelSemverSemVer": { + "description": "The full version of a given tool.", + "id": "BuildBazelSemverSemVer", + "properties": { + "major": { + "description": "The major version, e.g 10 for 10.2.3.", + "format": "int32", + "type": "integer" + }, + "minor": { + "description": "The minor version, e.g. 2 for 10.2.3.", + "format": "int32", + "type": "integer" + }, + "patch": { + "description": "The patch version, e.g 3 for 10.2.3.", + "format": "int32", + "type": "integer" + }, + "prerelease": { + "description": "The pre-release version. Either this field or major/minor/patch fields must be filled. They are mutually exclusive. Pre-release versions are assumed to be earlier than any released versions.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandDurations": { + "description": "CommandDuration contains the various duration metrics tracked when a bot performs a command.", + "id": "GoogleDevtoolsRemotebuildbotCommandDurations", + "properties": { + "casRelease": { + "description": "The time spent to release the CAS blobs used by the task.", + "format": "google-duration", + "type": "string" + }, + "cmWaitForAssignment": { + "description": "The time spent waiting for Container Manager to assign an asynchronous container for execution.", + "format": "google-duration", + "type": "string" + }, + "dockerPrep": { + "description": "The time spent preparing the command to be run in a Docker container (includes pulling the Docker image, if necessary).", + "format": "google-duration", + "type": "string" + }, + "dockerPrepStartTime": { + "description": "The timestamp when docker preparation begins.", + "format": "google-datetime", + "type": "string" + }, + "download": { + "description": "The time spent downloading the input files and constructing the working directory.", + "format": "google-duration", + "type": "string" + }, + "downloadStartTime": { + "description": "The timestamp when downloading the input files begins.", + "format": "google-datetime", + "type": "string" + }, + "execStartTime": { + "description": "The timestamp when execution begins.", + "format": "google-datetime", + "type": "string" + }, + "execution": { + "description": "The time spent executing the command (i.e., doing useful work).", + "format": "google-duration", + "type": "string" + }, + "isoPrepDone": { + "description": "The timestamp when preparation is done and bot starts downloading files.", + "format": "google-datetime", + "type": "string" + }, + "overall": { + "description": "The time spent completing the command, in total.", + "format": "google-duration", + "type": "string" + }, + "stdout": { + "description": "The time spent uploading the stdout logs.", + "format": "google-duration", + "type": "string" + }, + "upload": { + "description": "The time spent uploading the output files.", + "format": "google-duration", + "type": "string" + }, + "uploadStartTime": { + "description": "The timestamp when uploading the output files begins.", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandEvents": { + "description": "CommandEvents contains counters for the number of warnings and errors that occurred during the execution of a command.", + "id": "GoogleDevtoolsRemotebuildbotCommandEvents", + "properties": { + "cmUsage": { + "description": "Indicates if and how Container Manager is being used for task execution.", + "enum": [ + "CONFIG_NONE", + "CONFIG_MATCH", + "CONFIG_MISMATCH" + ], + "enumDescriptions": [ + "Container Manager is disabled or not running for this execution.", + "Container Manager is enabled and there was a matching container available for use during execution.", + "Container Manager is enabled, but there was no matching container available for execution." + ], + "type": "string" + }, + "dockerCacheHit": { + "description": "Indicates whether we are using a cached Docker image (true) or had to pull the Docker image (false) for this command.", + "type": "boolean" + }, + "dockerImageName": { + "description": "Docker Image name.", + "type": "string" + }, + "inputCacheMiss": { + "description": "The input cache miss ratio.", + "format": "float", + "type": "number" + }, + "numErrors": { + "description": "The number of errors reported.", + "format": "uint64", + "type": "string" + }, + "numWarnings": { + "description": "The number of warnings reported.", + "format": "uint64", + "type": "string" + }, + "outputLocation": { + "description": "Indicates whether output files and/or output directories were found relative to the execution root or to the user provided work directory or both or none.", + "enum": [ + "LOCATION_UNDEFINED", + "LOCATION_NONE", + "LOCATION_EXEC_ROOT_RELATIVE", + "LOCATION_WORKING_DIR_RELATIVE", + "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE", + "LOCATION_EXEC_ROOT_RELATIVE_OUTPUT_OUTSIDE_WORKING_DIR", + "LOCATION_EXEC_ROOT_AND_WORKING_DIR_RELATIVE_OUTPUT_OUTSIDE_WORKING_DIR" + ], + "enumDescriptions": [ + "Location is set to LOCATION_UNDEFINED for tasks where the working directorty is not specified or is identical to the execution root directory.", + "No output files or directories were found neither relative to the execution root directory nor relative to the working directory.", + "Output files or directories were found relative to the execution root directory but not relative to the working directory.", + "Output files or directories were found relative to the working directory but not relative to the execution root directory.", + "Output files or directories were found both relative to the execution root directory and relative to the working directory.", + "Output files or directories were found relative to the execution root directory but not relative to the working directory. In addition at least one output file or directory was found outside of the working directory such that a working-directory-relative-path would have needed to start with a `..`.", + "Output files or directories were found both relative to the execution root directory and relative to the working directory. In addition at least one exec-root-relative output file or directory was found outside of the working directory such that a working-directory-relative-path would have needed to start with a `..`." + ], + "type": "string" + }, + "usedAsyncContainer": { + "description": "Indicates whether an asynchronous container was used for execution.", + "type": "boolean" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotCommandStatus": { + "description": "The internal status of the command result.", + "id": "GoogleDevtoolsRemotebuildbotCommandStatus", + "properties": { + "code": { + "description": "The status code.", + "enum": [ + "OK", + "INVALID_ARGUMENT", + "DEADLINE_EXCEEDED", + "NOT_FOUND", + "PERMISSION_DENIED", + "INTERNAL", + "ABORTED", + "FAILED_PRECONDITION", + "CLEANUP_ERROR", + "DOWNLOAD_INPUTS_ERROR", + "UNKNOWN", + "UPLOAD_OUTPUTS_ERROR", + "UPLOAD_OUTPUTS_BYTES_LIMIT_EXCEEDED", + "DOCKER_LOGIN_ERROR", + "DOCKER_IMAGE_PULL_ERROR", + "DOCKER_IMAGE_EXIST_ERROR", + "DUPLICATE_INPUTS", + "DOCKER_IMAGE_PERMISSION_DENIED", + "DOCKER_IMAGE_NOT_FOUND", + "WORKING_DIR_NOT_FOUND", + "WORKING_DIR_NOT_IN_BASE_DIR", + "DOCKER_UNAVAILABLE", + "NO_CUDA_CAPABLE_DEVICE", + "REMOTE_CAS_DOWNLOAD_ERROR", + "REMOTE_CAS_UPLOAD_ERROR", + "LOCAL_CASPROXY_NOT_RUNNING", + "DOCKER_CREATE_CONTAINER_ERROR", + "DOCKER_INVALID_ULIMIT", + "DOCKER_UNKNOWN_RUNTIME", + "DOCKER_UNKNOWN_CAPABILITY", + "DOCKER_UNKNOWN_ERROR", + "DOCKER_CREATE_COMPUTE_SYSTEM_ERROR", + "DOCKER_PREPARELAYER_ERROR", + "DOCKER_INCOMPATIBLE_OS_ERROR", + "DOCKER_CREATE_RUNTIME_FILE_NOT_FOUND", + "DOCKER_CREATE_RUNTIME_PERMISSION_DENIED", + "DOCKER_CREATE_PROCESS_FILE_NOT_FOUND", + "DOCKER_CREATE_COMPUTE_SYSTEM_INCORRECT_PARAMETER_ERROR", + "DOCKER_TOO_MANY_SYMBOLIC_LINK_LEVELS", + "LOCAL_CONTAINER_MANAGER_NOT_RUNNING", + "DOCKER_IMAGE_VPCSC_PERMISSION_DENIED", + "WORKING_DIR_NOT_RELATIVE", + "DOCKER_MISSING_CONTAINER" + ], + "enumDescriptions": [ + "The command succeeded.", + "The command input was invalid.", + "The command had passed its expiry time while it was still running.", + "The resources requested by the command were not found.", + "The command failed due to permission errors.", + "The command failed because of some invariants expected by the underlying system have been broken. This usually indicates a bug wit the system.", + "The command was aborted.", + "The command failed because the system is not in a state required for the command, e.g. the command inputs cannot be found on the server.", + "The bot failed to do the cleanup, e.g. unable to delete the command working directory or the command process.", + "The bot failed to download the inputs.", + "Unknown error.", + "The bot failed to upload the outputs.", + "The bot tried to upload files having a total size that is too large.", + "The bot failed to login to docker.", + "The bot failed to pull docker image.", + "The bot failed to check docker images.", + "The inputs contain duplicate files.", + "The bot doesn't have the permissions to pull docker images.", + "The docker image cannot be found.", + "Working directory is not found.", + "Working directory is not under the base directory", + "There are issues with docker service/runtime.", + "The command failed with \"no cuda-capable device is detected\" error.", + "The bot encountered errors from remote CAS when downloading blobs.", + "The bot encountered errors from remote CAS when uploading blobs.", + "The local casproxy is not running.", + "The bot couldn't start the container.", + "The docker ulimit is not valid.", + "The docker runtime is unknown.", + "The docker capability is unknown.", + "The command failed with unknown docker errors.", + "Docker failed to run containers with CreateComputeSystem error.", + "Docker failed to run containers with hcsshim::PrepareLayer error.", + "Docker incompatible operating system error.", + "Docker failed to create OCI runtime because of file not found.", + "Docker failed to create OCI runtime because of permission denied.", + "Docker failed to create process because of file not found.", + "Docker failed to run containers with CreateComputeSystem error that involves an incorrect parameter (more specific version of DOCKER_CREATE_COMPUTE_SYSTEM_ERROR that is user-caused).", + "Docker failed to create an overlay mount because of too many levels of symbolic links.", + "The local Container Manager is not running.", + "Docker failed because a request was denied by the organization's policy.", + "Working directory is not relative", + "Docker cannot find the container specified in the command. This error is likely to only occur if an asynchronous container is not running when the command is run." + ], + "type": "string" + }, + "message": { + "description": "The error message.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsage": { + "description": "ResourceUsage is the system resource usage of the host machine.", + "id": "GoogleDevtoolsRemotebuildbotResourceUsage", + "properties": { + "cpuUsedPercent": { + "format": "double", + "type": "number" + }, + "diskUsage": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageStat" + }, + "memoryUsage": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageStat" + }, + "totalDiskIoStats": { + "$ref": "GoogleDevtoolsRemotebuildbotResourceUsageIOStats" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsageIOStats": { + "id": "GoogleDevtoolsRemotebuildbotResourceUsageIOStats", + "properties": { + "readBytesCount": { + "format": "uint64", + "type": "string" + }, + "readCount": { + "format": "uint64", + "type": "string" + }, + "readTimeMs": { + "format": "uint64", + "type": "string" + }, + "writeBytesCount": { + "format": "uint64", + "type": "string" + }, + "writeCount": { + "format": "uint64", + "type": "string" + }, + "writeTimeMs": { + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildbotResourceUsageStat": { + "id": "GoogleDevtoolsRemotebuildbotResourceUsageStat", + "properties": { + "total": { + "format": "uint64", + "type": "string" + }, + "used": { + "format": "uint64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig": { + "description": "AcceleratorConfig defines the accelerator cards to attach to the VM.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig", + "properties": { + "acceleratorCount": { + "description": "The number of guest accelerator cards exposed to each VM.", + "format": "int64", + "type": "string" + }, + "acceleratorType": { + "description": "The type of accelerator to attach to each VM, e.g. \"nvidia-tesla-k80\" for nVidia Tesla K80.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale": { + "description": "Autoscale defines the autoscaling policy of a worker pool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale", + "properties": { + "maxSize": { + "description": "The maximal number of workers. Must be equal to or greater than min_size.", + "format": "int64", + "type": "string" + }, + "minSize": { + "description": "The minimal number of workers. Must be greater than 0.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest": { + "description": "The request used for `CreateInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateInstanceRequest", + "properties": { + "instance": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "description": "Specifies the instance to create. The name in the instance, if specified in the instance, is ignored." + }, + "instanceId": { + "description": "ID of the created instance. A valid `instance_id` must: be 6-50 characters long, contain only lowercase letters, digits, hyphens and underscores, start with a lowercase letter, and end with a lowercase letter or a digit.", + "type": "string" + }, + "parent": { + "description": "Resource name of the project containing the instance. Format: `projects/[PROJECT_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest": { + "description": "The request used for `CreateWorkerPool`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaCreateWorkerPoolRequest", + "properties": { + "parent": { + "description": "Resource name of the instance in which to create the new worker pool. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + }, + "poolId": { + "description": "ID of the created worker pool. A valid pool ID must: be 6-50 characters long, contain only lowercase letters, digits, hyphens and underscores, start with a lowercase letter, and end with a lowercase letter or a digit.", + "type": "string" + }, + "workerPool": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "description": "Specifies the worker pool to create. The name in the worker pool, if specified, is ignored." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest": { + "description": "The request used for `DeleteInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteInstanceRequest", + "properties": { + "name": { + "description": "Name of the instance to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest": { + "description": "The request used for DeleteWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaDeleteWorkerPoolRequest", + "properties": { + "name": { + "description": "Name of the worker pool to delete. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy": { + "description": "FeaturePolicy defines features allowed to be used on RBE instances, as well as instance-wide behavior changes that take effect without opt-in or opt-out at usage time.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy", + "properties": { + "containerImageSources": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Which container image sources are allowed. Currently only RBE-supported registry (gcr.io) is allowed. One can allow all repositories under a project or one specific repository only. E.g. container_image_sources { policy: RESTRICTED allowed_values: [ \"gcr.io/project-foo\", \"gcr.io/project-bar/repo-baz\", ] } will allow any repositories under \"gcr.io/project-foo\" plus the repository \"gcr.io/project-bar/repo-baz\". Default (UNSPECIFIED) is equivalent to any source is allowed." + }, + "dockerAddCapabilities": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerAddCapabilities can be used or what capabilities are allowed." + }, + "dockerChrootPath": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerChrootPath can be used." + }, + "dockerNetwork": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerNetwork can be used or what network modes are allowed. E.g. one may allow `off` value only via `allowed_values`." + }, + "dockerPrivileged": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerPrivileged can be used." + }, + "dockerRunAsRoot": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerRunAsRoot can be used." + }, + "dockerRuntime": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerRuntime is allowed to be set or what runtimes are allowed. Note linux_isolation takes precedence, and if set, docker_runtime values may be rejected if they are incompatible with the selected isolation." + }, + "dockerSiblingContainers": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "description": "Whether dockerSiblingContainers can be used." + }, + "linuxIsolation": { + "description": "linux_isolation allows overriding the docker runtime used for containers started on Linux.", + "enum": [ + "LINUX_ISOLATION_UNSPECIFIED", + "GVISOR", + "OFF" + ], + "enumDescriptions": [ + "Default value. Will be using Linux default runtime.", + "Use gVisor runsc runtime.", + "Use stardard Linux runtime. This has the same behaviour as unspecified, but it can be used to revert back from gVisor." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature": { + "description": "Defines whether a feature can be used or what values are accepted.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicyFeature", + "properties": { + "allowedValues": { + "description": "A list of acceptable values. Only effective when the policy is `RESTRICTED`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "policy": { + "description": "The policy of the feature.", + "enum": [ + "POLICY_UNSPECIFIED", + "ALLOWED", + "FORBIDDEN", + "RESTRICTED" + ], + "enumDescriptions": [ + "Default value, if not explicitly set. Equivalent to FORBIDDEN, unless otherwise documented on a specific Feature.", + "Feature is explicitly allowed.", + "Feature is forbidden. Requests attempting to leverage it will get an FailedPrecondition error, with a message like: \"Feature forbidden by FeaturePolicy: Feature on instance \"", + "Only the values specified in the `allowed_values` are allowed." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest": { + "description": "The request used for `GetInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetInstanceRequest", + "properties": { + "name": { + "description": "Name of the instance to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest": { + "description": "The request used for GetWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaGetWorkerPoolRequest", + "properties": { + "name": { + "description": "Name of the worker pool to retrieve. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance": { + "description": "Instance conceptually encapsulates all Remote Build Execution resources for remote builds. An instance consists of storage and compute resources (for example, `ContentAddressableStorage`, `ActionCache`, `WorkerPools`) used for running remote builds. All Remote Build Execution API calls are scoped to an instance.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "properties": { + "featurePolicy": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaFeaturePolicy", + "description": "The policy to define whether or not RBE features can be used or how they can be used." + }, + "location": { + "description": "The location is a GCP region. Currently only `us-central1` is supported.", + "type": "string" + }, + "loggingEnabled": { + "description": "Output only. Whether stack driver logging is enabled for the instance.", + "type": "boolean" + }, + "name": { + "description": "Output only. Instance resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`. Name should not be populated when creating an instance since it is provided in the `instance_id` field.", + "type": "string" + }, + "state": { + "description": "Output only. State of the instance.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "RUNNING", + "INACTIVE" + ], + "enumDescriptions": [ + "Not a valid state, but the default value of the enum.", + "The instance is in state `CREATING` once `CreateInstance` is called and before the instance is ready for use.", + "The instance is in state `RUNNING` when it is ready for use.", + "An `INACTIVE` instance indicates that there is a problem that needs to be fixed. Such instances cannot be used for execution and instances that remain in this state for a significant period of time will be removed permanently." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesRequest", + "properties": { + "parent": { + "description": "Resource name of the project. Format: `projects/[PROJECT_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListInstancesResponse", + "properties": { + "instances": { + "description": "The list of instances in a given project.", + "items": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsRequest", + "properties": { + "filter": { + "description": "Optional. A filter expression that filters resources listed in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. String values are case-insensitive. The comparison operator must be either `:`, `=`, `!=`, `>`, `>=`, `<=` or `<`. The `:` operator can be used with string fields to match substrings. For non-string fields it is equivalent to the `=` operator. The `:*` comparison can be used to test whether a key has been defined. You can also filter on nested fields. To filter on multiple expressions, you can separate expression using `AND` and `OR` operators, using parentheses to specify precedence. If neither operator is specified, `AND` is assumed. Examples: Include only pools with more than 100 reserved workers: `(worker_count > 100) (worker_config.reserved = true)` Include only pools with a certain label or machines of the e2-standard family: `worker_config.labels.key1 : * OR worker_config.machine_type: e2-standard`", + "type": "string" + }, + "parent": { + "description": "Resource name of the instance. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse": { + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaListWorkerPoolsResponse", + "properties": { + "workerPools": { + "description": "The list of worker pools in a given instance.", + "items": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest": { + "description": "The request used for `UpdateInstance`.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateInstanceRequest", + "properties": { + "instance": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaInstance", + "description": "Specifies the instance to update." + }, + "loggingEnabled": { + "description": "Deprecated, use instance.logging_enabled instead. Whether to enable Stackdriver logging for this instance.", + "type": "boolean" + }, + "name": { + "description": "Deprecated, use instance.Name instead. Name of the instance to update. Format: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]`.", + "type": "string" + }, + "updateMask": { + "description": "The update mask applies to instance. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", + "format": "google-fieldmask", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest": { + "description": "The request used for UpdateWorkerPool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaUpdateWorkerPoolRequest", + "properties": { + "updateMask": { + "description": "The update mask applies to worker_pool. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If an empty update_mask is provided, only the non-default valued field in the worker pool field will be updated. Note that in order to update a field to the default value (zero, false, empty string) an explicit update_mask must be provided.", + "format": "google-fieldmask", + "type": "string" + }, + "workerPool": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "description": "Specifies the worker pool to update." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig": { + "description": "Defines the configuration to be used for creating workers in the worker pool.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig", + "properties": { + "accelerator": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAcceleratorConfig", + "description": "The accelerator card attached to each VM." + }, + "diskSizeGb": { + "description": "Required. Size of the disk attached to the worker, in GB. See https://cloud.google.com/compute/docs/disks/", + "format": "int64", + "type": "string" + }, + "diskType": { + "description": "Required. Disk Type to use for the worker. See [Storage options](https://cloud.google.com/compute/docs/disks/#introduction). Currently only `pd-standard` and `pd-ssd` are supported.", + "type": "string" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "Labels associated with the workers. Label keys and values can be no longer than 63 characters, can only contain lowercase letters, numeric characters, underscores and dashes. International letters are permitted. Label keys must start with a letter. Label values are optional. There can not be more than 64 labels per resource.", + "type": "object" + }, + "machineType": { + "description": "Required. Machine type of the worker, such as `e2-standard-2`. See https://cloud.google.com/compute/docs/machine-types for a list of supported machine types. Note that `f1-micro` and `g1-small` are not yet supported.", + "type": "string" + }, + "maxConcurrentActions": { + "description": "The maximum number of actions a worker can execute concurrently.", + "format": "int64", + "type": "string" + }, + "minCpuPlatform": { + "description": "Minimum CPU platform to use when creating the worker. See [CPU Platforms](https://cloud.google.com/compute/docs/cpu-platforms).", + "type": "string" + }, + "networkAccess": { + "description": "Determines the type of network access granted to workers. Possible values: - \"public\": Workers can connect to the public internet. - \"private\": Workers can only connect to Google APIs and services. - \"restricted-private\": Workers can only connect to Google APIs that are reachable through `restricted.googleapis.com` (`199.36.153.4/30`).", + "type": "string" + }, + "reserved": { + "description": "Determines whether the worker is reserved (equivalent to a Compute Engine on-demand VM and therefore won't be preempted). See [Preemptible VMs](https://cloud.google.com/preemptible-vms/) for more details.", + "type": "boolean" + }, + "soleTenantNodeType": { + "description": "The node type name to be used for sole-tenant nodes.", + "type": "string" + }, + "vmImage": { + "description": "The name of the image used by each VM.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool": { + "description": "A worker pool resource in the Remote Build Execution API.", + "id": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerPool", + "properties": { + "autoscale": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaAutoscale", + "description": "The autoscale policy to apply on a pool." + }, + "channel": { + "description": "Channel specifies the release channel of the pool.", + "type": "string" + }, + "name": { + "description": "WorkerPool resource name formatted as: `projects/[PROJECT_ID]/instances/[INSTANCE_ID]/workerpools/[POOL_ID]`. name should not be populated when creating a worker pool since it is provided in the `poolId` field.", + "type": "string" + }, + "state": { + "description": "Output only. State of the worker pool.", + "enum": [ + "STATE_UNSPECIFIED", + "CREATING", + "RUNNING", + "UPDATING", + "DELETING", + "INACTIVE" + ], + "enumDescriptions": [ + "Not a valid state, but the default value of the enum.", + "The worker pool is in state `CREATING` once `CreateWorkerPool` is called and before all requested workers are ready.", + "The worker pool is in state `RUNNING` when all its workers are ready for use.", + "The worker pool is in state `UPDATING` once `UpdateWorkerPool` is called and before the new configuration has all the requested workers ready for use, and no older configuration has any workers. At that point the state transitions to `RUNNING`.", + "The worker pool is in state `DELETING` once the `Delete` method is called and before the deletion completes.", + "The worker pool is in state `INACTIVE` when the instance hosting the worker pool in not running." + ], + "type": "string" + }, + "workerConfig": { + "$ref": "GoogleDevtoolsRemotebuildexecutionAdminV1alphaWorkerConfig", + "description": "Specifies the properties, such as machine type and disk size, used for creating workers in a worker pool." + }, + "workerCount": { + "description": "The desired number of workers in the worker pool. Must be a value between 0 and 15000.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2AdminTemp": { + "description": "AdminTemp is a prelimiary set of administration tasks. It's called \"Temp\" because we do not yet know the best way to represent admin tasks; it's possible that this will be entirely replaced in later versions of this API. If this message proves to be sufficient, it will be renamed in the alpha or beta release of this API. This message (suitably marshalled into a protobuf.Any) can be used as the inline_assignment field in a lease; the lease assignment field should simply be `\"admin\"` in these cases. This message is heavily based on Swarming administration tasks from the LUCI project (http://github.com/luci/luci-py/appengine/swarming).", + "id": "GoogleDevtoolsRemoteworkersV1test2AdminTemp", + "properties": { + "arg": { + "description": "The argument to the admin action; see `Command` for semantics.", + "type": "string" + }, + "command": { + "description": "The admin action; see `Command` for legal values.", + "enum": [ + "UNSPECIFIED", + "BOT_UPDATE", + "BOT_RESTART", + "BOT_TERMINATE", + "HOST_RESTART" + ], + "enumDescriptions": [ + "Illegal value.", + "Download and run a new version of the bot. `arg` will be a resource accessible via `ByteStream.Read` to obtain the new bot code.", + "Restart the bot without downloading a new version. `arg` will be a message to log.", + "Shut down the bot. `arg` will be a task resource name (similar to those in tasks.proto) that the bot can use to tell the server that it is terminating.", + "Restart the host computer. `arg` will be a message to log." + ], + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Blob": { + "description": "Describes a blob of binary content with its digest.", + "id": "GoogleDevtoolsRemoteworkersV1test2Blob", + "properties": { + "contents": { + "description": "The contents of the blob.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The digest of the blob. This should be verified by the receiver." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandOutputs": { + "description": "DEPRECATED - use CommandResult instead. Describes the actual outputs from the task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandOutputs", + "properties": { + "exitCode": { + "description": "exit_code is only fully reliable if the status' code is OK. If the task exceeded its deadline or was cancelled, the process may still produce an exit code as it is cancelled, and this will be populated, but a successful (zero) is unlikely to be correct unless the status code is OK.", + "format": "int32", + "type": "integer" + }, + "outputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The output files. The blob referenced by the digest should contain one of the following (implementation-dependent): * A marshalled DirectoryMetadata of the returned filesystem * A LUCI-style .isolated file" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandOverhead": { + "description": "DEPRECATED - use CommandResult instead. Can be used as part of CompleteRequest.metadata, or are part of a more sophisticated message.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandOverhead", + "properties": { + "duration": { + "description": "The elapsed time between calling Accept and Complete. The server will also have its own idea of what this should be, but this excludes the overhead of the RPCs and the bot response time.", + "format": "google-duration", + "type": "string" + }, + "overhead": { + "description": "The amount of time *not* spent executing the command (ie uploading/downloading files).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandResult": { + "description": "All information about the execution of a command, suitable for providing as the Bots interface's `Lease.result` field.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandResult", + "properties": { + "duration": { + "description": "The elapsed time between calling Accept and Complete. The server will also have its own idea of what this should be, but this excludes the overhead of the RPCs and the bot response time.", + "format": "google-duration", + "type": "string" + }, + "exitCode": { + "description": "The exit code of the process. An exit code of \"0\" should only be trusted if `status` has a code of OK (otherwise it may simply be unset).", + "format": "int32", + "type": "integer" + }, + "metadata": { + "description": "Implementation-dependent metadata about the task. Both servers and bots may define messages which can be encoded here; bots are free to provide metadata in multiple formats, and servers are free to choose one or more of the values to process and ignore others. In particular, it is *not* considered an error for the bot to provide the server with a field that it doesn't know about.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "outputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "The output files. The blob referenced by the digest should contain one of the following (implementation-dependent): * A marshalled DirectoryMetadata of the returned filesystem * A LUCI-style .isolated file" + }, + "overhead": { + "description": "The amount of time *not* spent executing the command (ie uploading/downloading files).", + "format": "google-duration", + "type": "string" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "An overall status for the command. For example, if the command timed out, this might have a code of DEADLINE_EXCEEDED; if it was killed by the OS for memory exhaustion, it might have a code of RESOURCE_EXHAUSTED." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTask": { + "description": "Describes a shell-style task to execute, suitable for providing as the Bots interface's `Lease.payload` field.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTask", + "properties": { + "expectedOutputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs", + "description": "The expected outputs from the task." + }, + "inputs": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs", + "description": "The inputs to the task." + }, + "timeouts": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts", + "description": "The timeouts of this task." + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs": { + "description": "Describes the inputs to a shell-style task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputs", + "properties": { + "arguments": { + "description": "The command itself to run (e.g., argv). This field should be passed directly to the underlying operating system, and so it must be sensible to that operating system. For example, on Windows, the first argument might be \"C:\\Windows\\System32\\ping.exe\" - that is, using drive letters and backslashes. A command for a *nix system, on the other hand, would use forward slashes. All other fields in the RWAPI must consistently use forward slashes, since those fields may be interpretted by both the service and the bot.", + "items": { + "type": "string" + }, + "type": "array" + }, + "environmentVariables": { + "description": "All environment variables required by the task.", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable" + }, + "type": "array" + }, + "files": { + "description": "The input filesystem to be set up prior to the task beginning. The contents should be a repeated set of FileMetadata messages though other formats are allowed if better for the implementation (eg, a LUCI-style .isolated file). This field is repeated since implementations might want to cache the metadata, in which case it may be useful to break up portions of the filesystem that change frequently (eg, specific input files) from those that don't (eg, standard header files).", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest" + }, + "type": "array" + }, + "inlineBlobs": { + "description": "Inline contents for blobs expected to be needed by the bot to execute the task. For example, contents of entries in `files` or blobs that are indirectly referenced by an entry there. The bot should check against this list before downloading required task inputs to reduce the number of communications between itself and the remote CAS server.", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Blob" + }, + "type": "array" + }, + "workingDirectory": { + "description": "Directory from which a command is executed. It is a relative directory with respect to the bot's working directory (i.e., \"./\"). If it is non-empty, then it must exist under \"./\". Otherwise, \"./\" will be used.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable": { + "description": "An environment variable required by this task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable", + "properties": { + "name": { + "description": "The envvar name.", + "type": "string" + }, + "value": { + "description": "The envvar value.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs": { + "description": "Describes the expected outputs of the command.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskOutputs", + "properties": { + "directories": { + "description": "A list of expected directories, relative to the execution root. All paths MUST be delimited by forward slashes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "files": { + "description": "A list of expected files, relative to the execution root. All paths MUST be delimited by forward slashes.", + "items": { + "type": "string" + }, + "type": "array" + }, + "stderrDestination": { + "description": "The destination to which any stderr should be sent. The method by which the bot should send the stream contents to that destination is not defined in this API. As examples, the destination could be a file referenced in the `files` field in this message, or it could be a URI that must be written via the ByteStream API.", + "type": "string" + }, + "stdoutDestination": { + "description": "The destination to which any stdout should be sent. The method by which the bot should send the stream contents to that destination is not defined in this API. As examples, the destination could be a file referenced in the `files` field in this message, or it could be a URI that must be written via the ByteStream API.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts": { + "description": "Describes the timeouts associated with this task.", + "id": "GoogleDevtoolsRemoteworkersV1test2CommandTaskTimeouts", + "properties": { + "execution": { + "description": "This specifies the maximum time that the task can run, excluding the time required to download inputs or upload outputs. That is, the worker will terminate the task if it runs longer than this.", + "format": "google-duration", + "type": "string" + }, + "idle": { + "description": "This specifies the maximum amount of time the task can be idle - that is, go without generating some output in either stdout or stderr. If the process is silent for more than the specified time, the worker will terminate the task.", + "format": "google-duration", + "type": "string" + }, + "shutdown": { + "description": "If the execution or IO timeouts are exceeded, the worker will try to gracefully terminate the task and return any existing logs. However, tasks may be hard-frozen in which case this process will fail. This timeout specifies how long to wait for a terminated task to shut down gracefully (e.g. via SIGTERM) before we bring down the hammer (e.g. SIGKILL on *nix, CTRL_BREAK_EVENT on Windows).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Digest": { + "description": "The CommandTask and CommandResult messages assume the existence of a service that can serve blobs of content, identified by a hash and size known as a \"digest.\" The method by which these blobs may be retrieved is not specified here, but a model implementation is in the Remote Execution API's \"ContentAddressibleStorage\" interface. In the context of the RWAPI, a Digest will virtually always refer to the contents of a file or a directory. The latter is represented by the byte-encoded Directory message.", + "id": "GoogleDevtoolsRemoteworkersV1test2Digest", + "properties": { + "hash": { + "description": "A string-encoded hash (eg \"1a2b3c\", not the byte array [0x1a, 0x2b, 0x3c]) using an implementation-defined hash algorithm (eg SHA-256).", + "type": "string" + }, + "sizeBytes": { + "description": "The size of the contents. While this is not strictly required as part of an identifier (after all, any given hash will have exactly one canonical size), it's useful in almost all cases when one might want to send or retrieve blobs of content and is included here for this reason.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2Directory": { + "description": "The contents of a directory. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2Directory", + "properties": { + "directories": { + "description": "Any subdirectories", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata" + }, + "type": "array" + }, + "files": { + "description": "The files in this directory", + "items": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2FileMetadata" + }, + "type": "array" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata": { + "description": "The metadata for a directory. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2DirectoryMetadata", + "properties": { + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "A pointer to the contents of the directory, in the form of a marshalled Directory message." + }, + "path": { + "description": "The path of the directory, as in FileMetadata.path.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleDevtoolsRemoteworkersV1test2FileMetadata": { + "description": "The metadata for a file. Similar to the equivalent message in the Remote Execution API.", + "id": "GoogleDevtoolsRemoteworkersV1test2FileMetadata", + "properties": { + "contents": { + "description": "If the file is small enough, its contents may also or alternatively be listed here.", + "format": "byte", + "type": "string" + }, + "digest": { + "$ref": "GoogleDevtoolsRemoteworkersV1test2Digest", + "description": "A pointer to the contents of the file. The method by which a client retrieves the contents from a CAS system is not defined here." + }, + "isExecutable": { + "description": "Properties of the file", + "type": "boolean" + }, + "path": { + "description": "The path of this file. If this message is part of the CommandOutputs.outputs fields, the path is relative to the execution root and must correspond to an entry in CommandTask.outputs.files. If this message is part of a Directory message, then the path is relative to the root of that directory. All paths MUST be delimited by forward slashes.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleLongrunningOperation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "GoogleLongrunningOperation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "GoogleRpcStatus", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Remote Build Execution API", + "version": "v2", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/reseller.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/reseller.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..4740619ea57ed5d74179880aa48f1967516ec4a1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/reseller.v1.json @@ -0,0 +1,1038 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/apps.order": { +"description": "Manage users on your domain" +}, +"https://www.googleapis.com/auth/apps.order.readonly": { +"description": "Manage users on your domain" +} +} +} +}, +"basePath": "", +"baseUrl": "https://reseller.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Reseller", +"description": "Perform common functions that are available on the Channel Services console at scale, like placing orders and viewing customer information", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/google-apps/reseller/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "reseller:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://reseller.mtls.googleapis.com/", +"name": "reseller", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"customers": { +"methods": { +"get": { +"description": "Gets a customer account. Use this operation to see a customer account already in your reseller management, or to see the minimal account information for an existing customer that you do not manage. For more information about the API response for existing customers, see [retrieving a customer account](/admin-sdk/reseller/v1/how-tos/manage_customers#get_customer).", +"flatPath": "apps/reseller/v1/customers/{customerId}", +"httpMethod": "GET", +"id": "reseller.customers.get", +"parameterOrder": [ +"customerId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}", +"response": { +"$ref": "Customer" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order", +"https://www.googleapis.com/auth/apps.order.readonly" +] +}, +"insert": { +"description": "Orders a new customer's account. Before ordering a new customer account, establish whether the customer account already exists using the [`customers.get`](/admin-sdk/reseller/v1/reference/customers/get) If the customer account exists as a direct Google account or as a resold customer account from another reseller, use the `customerAuthToken\\` as described in [order a resold account for an existing customer](/admin-sdk/reseller/v1/how-tos/manage_customers#create_existing_customer). For more information about ordering a new customer account, see [order a new customer account](/admin-sdk/reseller/v1/how-tos/manage_customers#create_customer). After creating a new customer account, you must provision a user as an administrator. The customer's administrator is required to sign in to the Admin console and sign the G Suite via Reseller agreement to activate the account. Resellers are prohibited from signing the G Suite via Reseller agreement on the customer's behalf. For more information, see [order a new customer account](/admin-sdk/reseller/v1/how-tos/manage_customers#tos).", +"flatPath": "apps/reseller/v1/customers", +"httpMethod": "POST", +"id": "reseller.customers.insert", +"parameterOrder": [], +"parameters": { +"customerAuthToken": { +"description": "The `customerAuthToken` query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.", +"location": "query", +"type": "string" +} +}, +"path": "apps/reseller/v1/customers", +"request": { +"$ref": "Customer" +}, +"response": { +"$ref": "Customer" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"patch": { +"description": "Updates a customer account's settings. This method supports patch semantics. You cannot update `customerType` via the Reseller API, but a `\"team\"` customer can verify their domain and become `customerType = \"domain\"`. For more information, see [Verify your domain to unlock Essentials features](https://support.google.com/a/answer/9122284).", +"flatPath": "apps/reseller/v1/customers/{customerId}", +"httpMethod": "PATCH", +"id": "reseller.customers.patch", +"parameterOrder": [ +"customerId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}", +"request": { +"$ref": "Customer" +}, +"response": { +"$ref": "Customer" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"update": { +"description": "Updates a customer account's settings. You cannot update `customerType` via the Reseller API, but a `\"team\"` customer can verify their domain and become `customerType = \"domain\"`. For more information, see [update a customer's settings](/admin-sdk/reseller/v1/how-tos/manage_customers#update_customer).", +"flatPath": "apps/reseller/v1/customers/{customerId}", +"httpMethod": "PUT", +"id": "reseller.customers.update", +"parameterOrder": [ +"customerId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}", +"request": { +"$ref": "Customer" +}, +"response": { +"$ref": "Customer" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +} +} +}, +"resellernotify": { +"methods": { +"getwatchdetails": { +"description": "Returns all the details of the watch corresponding to the reseller.", +"flatPath": "apps/reseller/v1/resellernotify/getwatchdetails", +"httpMethod": "GET", +"id": "reseller.resellernotify.getwatchdetails", +"parameterOrder": [], +"parameters": {}, +"path": "apps/reseller/v1/resellernotify/getwatchdetails", +"response": { +"$ref": "ResellernotifyGetwatchdetailsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order", +"https://www.googleapis.com/auth/apps.order.readonly" +] +}, +"register": { +"description": "Registers a Reseller for receiving notifications.", +"flatPath": "apps/reseller/v1/resellernotify/register", +"httpMethod": "POST", +"id": "reseller.resellernotify.register", +"parameterOrder": [], +"parameters": { +"serviceAccountEmailAddress": { +"description": "The service account which will own the created Cloud-PubSub topic.", +"location": "query", +"type": "string" +} +}, +"path": "apps/reseller/v1/resellernotify/register", +"response": { +"$ref": "ResellernotifyResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"unregister": { +"description": "Unregisters a Reseller for receiving notifications.", +"flatPath": "apps/reseller/v1/resellernotify/unregister", +"httpMethod": "POST", +"id": "reseller.resellernotify.unregister", +"parameterOrder": [], +"parameters": { +"serviceAccountEmailAddress": { +"description": "The service account which owns the Cloud-PubSub topic.", +"location": "query", +"type": "string" +} +}, +"path": "apps/reseller/v1/resellernotify/unregister", +"response": { +"$ref": "ResellernotifyResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +} +} +}, +"subscriptions": { +"methods": { +"activate": { +"description": "Activates a subscription previously suspended by the reseller. If you did not suspend the customer subscription and it is suspended for any other reason, such as for abuse or a pending ToS acceptance, this call will not reactivate the customer subscription.", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/activate", +"httpMethod": "POST", +"id": "reseller.subscriptions.activate", +"parameterOrder": [ +"customerId", +"subscriptionId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/activate", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"changePlan": { +"description": "Updates a subscription plan. Use this method to update a plan for a 30-day trial or a flexible plan subscription to an annual commitment plan with monthly or yearly payments. How a plan is updated differs depending on the plan and the products. For more information, see the description in [manage subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#update_subscription_plan).", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changePlan", +"httpMethod": "POST", +"id": "reseller.subscriptions.changePlan", +"parameterOrder": [ +"customerId", +"subscriptionId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changePlan", +"request": { +"$ref": "ChangePlanRequest" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"changeRenewalSettings": { +"description": "Updates a user license's renewal settings. This is applicable for accounts with annual commitment plans only. For more information, see the description in [manage subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#update_renewal).", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings", +"httpMethod": "POST", +"id": "reseller.subscriptions.changeRenewalSettings", +"parameterOrder": [ +"customerId", +"subscriptionId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changeRenewalSettings", +"request": { +"$ref": "RenewalSettings" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"changeSeats": { +"description": "Updates a subscription's user license settings. For more information about updating an annual commitment plan or a flexible plan subscription\u2019s licenses, see [Manage Subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#update_subscription_seat).", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changeSeats", +"httpMethod": "POST", +"id": "reseller.subscriptions.changeSeats", +"parameterOrder": [ +"customerId", +"subscriptionId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/changeSeats", +"request": { +"$ref": "Seats" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"delete": { +"description": "Cancels, suspends, or transfers a subscription to direct.", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}", +"httpMethod": "DELETE", +"id": "reseller.subscriptions.delete", +"parameterOrder": [ +"customerId", +"subscriptionId", +"deletionType" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"deletionType": { +"description": "The `deletionType` query string enables the cancellation, downgrade, or suspension of a subscription.", +"enum": [ +"deletion_type_undefined", +"cancel", +"transfer_to_direct" +], +"enumDescriptions": [ +"", +"Cancels the subscription immediately. This does not apply to a G Suite subscription.", +"Transfers a subscription directly to Google. The customer is immediately transferred to a direct billing relationship with Google and is given a short amount of time with no service interruption. The customer can then choose to set up billing directly with Google by using a credit card, or they can transfer to another reseller." +], +"location": "query", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}", +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"get": { +"description": "Gets a specific subscription. The `subscriptionId` can be found using the [Retrieve all reseller subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#get_all_subscriptions) method. For more information about retrieving a specific subscription, see the information descrived in [manage subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#get_subscription).", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}", +"httpMethod": "GET", +"id": "reseller.subscriptions.get", +"parameterOrder": [ +"customerId", +"subscriptionId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order", +"https://www.googleapis.com/auth/apps.order.readonly" +] +}, +"insert": { +"description": "Creates or transfer a subscription. Create a subscription for a customer's account that you ordered using the [Order a new customer account](/admin-sdk/reseller/v1/reference/customers/insert.html) method. For more information about creating a subscription for different payment plans, see [manage subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#create_subscription).\\ If you did not order the customer's account using the customer insert method, use the customer's `customerAuthToken` when creating a subscription for that customer. If transferring a G Suite subscription with an associated Google Drive or Google Vault subscription, use the [batch operation](/admin-sdk/reseller/v1/how-tos/batch.html) to transfer all of these subscriptions. For more information, see how to [transfer subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#transfer_a_subscription).", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions", +"httpMethod": "POST", +"id": "reseller.subscriptions.insert", +"parameterOrder": [ +"customerId" +], +"parameters": { +"action": { +"description": "The intented insert action. The usage of this field is governed by certain policies which are being developed & tested currently. Hence, these might not work as intended. Once this is fully tested & available to consume, we will share more information about its usage, limitations and policy documentation.", +"enum": [ +"actionUnspecified", +"buy", +"switch" +], +"enumDescriptions": [ +"Auto determines whether to create new subscription, upgrade or downagrade existing subscription or transfer the existing subscription", +"Create new subscription", +"Switch existing subscription to another sku (upgrade/downgrade)" +], +"location": "query", +"type": "string" +}, +"customerAuthToken": { +"description": "The `customerAuthToken` query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.", +"location": "query", +"type": "string" +}, +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"sourceSkuId": { +"description": "The sku_id of the existing subscription to be upgraded or downgraded. This is required when action is SWITCH. The usage of this field is governed by certain policies which are being developed & tested currently. Hence, these might not work as intended. Once this is fully tested & available to consume, we will share more information about its usage, limitations and policy documentation.", +"location": "query", +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"list": { +"description": "Lists of subscriptions managed by the reseller. The list can be all subscriptions, all of a customer's subscriptions, or all of a customer's transferable subscriptions. Optionally, this method can filter the response by a `customerNamePrefix`. For more information, see [manage subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions).", +"flatPath": "apps/reseller/v1/subscriptions", +"httpMethod": "GET", +"id": "reseller.subscriptions.list", +"parameterOrder": [], +"parameters": { +"customerAuthToken": { +"description": "The `customerAuthToken` query string is required when creating a resold account that transfers a direct customer's subscription or transfers another reseller customer's subscription to your reseller management. This is a hexadecimal authentication token needed to complete the subscription transfer. For more information, see the administrator help center.", +"location": "query", +"type": "string" +}, +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "query", +"type": "string" +}, +"customerNamePrefix": { +"description": "When retrieving all of your subscriptions and filtering for specific customers, you can enter a prefix for a customer name. Using an example customer group that includes `exam.com`, `example20.com` and `example.com`: - `exa` -- Returns all customer names that start with 'exa' which could include `exam.com`, `example20.com`, and `example.com`. A name prefix is similar to using a regular expression's asterisk, exa*. - `example` -- Returns `example20.com` and `example.com`. ", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "When retrieving a large list, the `maxResults` is the maximum number of results per page. The `nextPageToken` value takes you to the next page. The default is 20.", +"format": "uint32", +"location": "query", +"maximum": "100", +"minimum": "1", +"type": "integer" +}, +"pageToken": { +"description": "Token to specify next page in the list", +"location": "query", +"type": "string" +} +}, +"path": "apps/reseller/v1/subscriptions", +"response": { +"$ref": "Subscriptions" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order", +"https://www.googleapis.com/auth/apps.order.readonly" +] +}, +"startPaidService": { +"description": "Immediately move a 30-day free trial subscription to a paid service subscription. This method is only applicable if a payment plan has already been set up for the 30-day trial subscription. For more information, see [manage subscriptions](/admin-sdk/reseller/v1/how-tos/manage_subscriptions#paid_service).", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/startPaidService", +"httpMethod": "POST", +"id": "reseller.subscriptions.startPaidService", +"parameterOrder": [ +"customerId", +"subscriptionId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/startPaidService", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +}, +"suspend": { +"description": "Suspends an active subscription. You can use this method to suspend a paid subscription that is currently in the `ACTIVE` state. * For `FLEXIBLE` subscriptions, billing is paused. * For `ANNUAL_MONTHLY_PAY` or `ANNUAL_YEARLY_PAY` subscriptions: * Suspending the subscription does not change the renewal date that was originally committed to. * A suspended subscription does not renew. If you activate the subscription after the original renewal date, a new annual subscription will be created, starting on the day of activation. We strongly encourage you to suspend subscriptions only for short periods of time as suspensions over 60 days may result in the subscription being cancelled.", +"flatPath": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/suspend", +"httpMethod": "POST", +"id": "reseller.subscriptions.suspend", +"parameterOrder": [ +"customerId", +"subscriptionId" +], +"parameters": { +"customerId": { +"description": "This can be either the customer's primary domain name or the customer's unique identifier. If the domain name for a customer changes, the old domain name cannot be used to access the customer, but the customer's unique identifier (as returned by the API) can always be used. We recommend storing the unique identifier in your systems where applicable.", +"location": "path", +"required": true, +"type": "string" +}, +"subscriptionId": { +"description": "This is a required property. The `subscriptionId` is the subscription identifier and is unique for each customer. Since a `subscriptionId` changes when a subscription is updated, we recommend to not use this ID as a key for persistent data. And the `subscriptionId` can be found using the retrieve all reseller subscriptions method.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "apps/reseller/v1/customers/{customerId}/subscriptions/{subscriptionId}/suspend", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/apps.order" +] +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://reseller.googleapis.com/", +"schemas": { +"Address": { +"description": "JSON template for address of a customer.", +"id": "Address", +"properties": { +"addressLine1": { +"description": "A customer's physical address. An address can be composed of one to three lines. The `addressline2` and `addressLine3` are optional.", +"type": "string" +}, +"addressLine2": { +"description": "Line 2 of the address.", +"type": "string" +}, +"addressLine3": { +"description": "Line 3 of the address.", +"type": "string" +}, +"contactName": { +"description": "The customer contact's name. This is required.", +"type": "string" +}, +"countryCode": { +"description": "For `countryCode` information, see the ISO 3166 country code elements. Verify that country is approved for resale of Google products. This property is required when creating a new customer.", +"type": "string" +}, +"kind": { +"default": "customers#address", +"description": "Identifies the resource as a customer address. Value: `customers#address`", +"type": "string" +}, +"locality": { +"description": "An example of a `locality` value is the city of `San Francisco`.", +"type": "string" +}, +"organizationName": { +"description": "The company or company division name. This is required.", +"type": "string" +}, +"postalCode": { +"description": "A `postalCode` example is a postal zip code such as `94043`. This property is required when creating a new customer.", +"type": "string" +}, +"region": { +"description": "An example of a `region` value is `CA` for the state of California.", +"type": "string" +} +}, +"type": "object" +}, +"ChangePlanRequest": { +"description": "JSON template for the ChangePlan rpc request.", +"id": "ChangePlanRequest", +"properties": { +"dealCode": { +"description": "Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in `changePlan` request in order to receive discounted rate. This property is optional. If a deal code has already been added to a subscription, this property may be left empty and the existing discounted rate will still apply (if not empty, only provide the deal code that is already present on the subscription). If a deal code has never been added to a subscription and this property is left blank, regular pricing will apply.", +"type": "string" +}, +"kind": { +"default": "subscriptions#changePlanRequest", +"description": "Identifies the resource as a subscription change plan request. Value: `subscriptions#changePlanRequest`", +"type": "string" +}, +"planName": { +"description": "The `planName` property is required. This is the name of the subscription's payment plan. For more information about the Google payment plans, see API concepts. Possible values are: - `ANNUAL_MONTHLY_PAY` - The annual commitment plan with monthly payments *Caution: *`ANNUAL_MONTHLY_PAY` is returned as `ANNUAL` in all API responses. - `ANNUAL_YEARLY_PAY` - The annual commitment plan with yearly payments - `FLEXIBLE` - The flexible plan - `TRIAL` - The 30-day free trial plan ", +"type": "string" +}, +"purchaseOrderId": { +"description": "This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a `purchaseOrderId` value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.", +"type": "string" +}, +"seats": { +"$ref": "Seats", +"description": "This is a required property. The seats property is the number of user seat licenses." +} +}, +"type": "object" +}, +"Customer": { +"description": "When a Google customer's account is registered with a reseller, the customer's subscriptions for Google services are managed by this reseller. A customer is described by a primary domain name and a physical address.", +"id": "Customer", +"properties": { +"alternateEmail": { +"description": "Like the \"Customer email\" in the reseller tools, this email is the secondary contact used if something happens to the customer's service such as service outage or a security issue. This property is required when creating a new \"domain\" customer and should not use the same domain as `customerDomain`. The `alternateEmail` field is not necessary to create a \"team\" customer.", +"type": "string" +}, +"customerDomain": { +"description": "The customer's primary domain name string. `customerDomain` is required when creating a new customer. Do not include the `www` prefix in the domain when adding a customer.", +"type": "string" +}, +"customerDomainVerified": { +"description": "Whether the customer's primary domain has been verified.", +"type": "boolean" +}, +"customerId": { +"description": "This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.", +"type": "string" +}, +"customerType": { +"description": "Identifies the type of the customer. Acceptable values include: * `domain`: Implies a domain-verified customer (default). * `team`: Implies an email-verified customer. For more information, see [managed teams](https://support.google.com/a/users/answer/9939479).", +"enum": [ +"customerTypeUnspecified", +"domain", +"team" +], +"enumDescriptions": [ +"Customer type not known", +"Domained or domain-owning customers", +"Domainless or email-verified customers" +], +"type": "string" +}, +"kind": { +"default": "reseller#customer", +"description": "Identifies the resource as a customer. Value: `reseller#customer`", +"type": "string" +}, +"phoneNumber": { +"description": "Customer contact phone number. Must start with \"+\" followed by the country code. The rest of the number can be contiguous numbers or respect the phone local format conventions, but it must be a real phone number and not, for example, \"123\". This field is silently ignored if invalid.", +"type": "string" +}, +"postalAddress": { +"$ref": "Address", +"description": "A customer's address information. Each field has a limit of 255 charcters." +}, +"primaryAdmin": { +"$ref": "PrimaryAdmin", +"description": "The first admin details of the customer, present in case of TEAM customer." +}, +"resourceUiUrl": { +"description": "URL to customer's Admin console dashboard. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task in the Admin console.", +"type": "string" +} +}, +"type": "object" +}, +"PrimaryAdmin": { +"description": "JSON template for primary admin in case of TEAM customers", +"id": "PrimaryAdmin", +"properties": { +"primaryEmail": { +"description": "The business email of the primary administrator of the customer. The email verification link is sent to this email address at the time of customer creation. Primary administrators have access to the customer's Admin Console, including the ability to invite and evict users and manage the administrative needs of the customer.", +"type": "string" +} +}, +"type": "object" +}, +"RenewalSettings": { +"description": "JSON template for a subscription renewal settings.", +"id": "RenewalSettings", +"properties": { +"kind": { +"default": "subscriptions#renewalSettings", +"description": "Identifies the resource as a subscription renewal setting. Value: `subscriptions#renewalSettings`", +"type": "string" +}, +"renewalType": { +"description": "Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center. When renewing a subscription, the `renewalType` is a required property.", +"type": "string" +} +}, +"type": "object" +}, +"ResellernotifyGetwatchdetailsResponse": { +"description": "JSON template for resellernotify getwatchdetails response.", +"id": "ResellernotifyGetwatchdetailsResponse", +"properties": { +"serviceAccountEmailAddresses": { +"description": "List of registered service accounts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"topicName": { +"description": "Topic name of the PubSub", +"type": "string" +} +}, +"type": "object" +}, +"ResellernotifyResource": { +"description": "JSON template for resellernotify response.", +"id": "ResellernotifyResource", +"properties": { +"topicName": { +"description": "Topic name of the PubSub", +"type": "string" +} +}, +"type": "object" +}, +"Seats": { +"description": "JSON template for subscription seats.", +"id": "Seats", +"properties": { +"kind": { +"default": "subscriptions#seats", +"description": "Identifies the resource as a subscription seat setting. Value: `subscriptions#seats`", +"type": "string" +}, +"licensedNumberOfSeats": { +"description": "Read-only field containing the current number of users that are assigned a license for the product defined in `skuId`. This field's value is equivalent to the numerical count of users returned by the Enterprise License Manager API method: [`listForProductAndSku`](/admin-sdk/licensing/v1/reference/licenseAssignments/listForProductAndSku).", +"format": "int32", +"type": "integer" +}, +"maximumNumberOfSeats": { +"description": "This is a required property and is exclusive to subscriptions with `FLEXIBLE` or `TRIAL` plans. This property sets the maximum number of licensed users allowed on a subscription. This quantity can be increased up to the maximum limit defined in the reseller's contract. The minimum quantity is the current number of users in the customer account. *Note: *G Suite subscriptions automatically assign a license to every user.", +"format": "int32", +"type": "integer" +}, +"numberOfSeats": { +"description": "This is a required property and is exclusive to subscriptions with `ANNUAL_MONTHLY_PAY` and `ANNUAL_YEARLY_PAY` plans. This property sets the maximum number of licenses assignable to users on a subscription. The reseller can add more licenses, but once set, the `numberOfSeats` cannot be reduced until renewal. The reseller is invoiced based on the `numberOfSeats` value regardless of how many of these user licenses are assigned. *Note: *Google Workspace subscriptions automatically assign a license to every user.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Subscription": { +"description": "JSON template for a subscription.", +"id": "Subscription", +"properties": { +"billingMethod": { +"description": "Read-only field that returns the current billing method for a subscription.", +"type": "string" +}, +"creationTime": { +"description": "The `creationTime` property is the date when subscription was created. It is in milliseconds using the Epoch format. See an example Epoch converter.", +"format": "int64", +"type": "string" +}, +"customerDomain": { +"description": "Primary domain name of the customer", +"type": "string" +}, +"customerId": { +"description": "This property will always be returned in a response as the unique identifier generated by Google. In a request, this property can be either the primary domain or the unique identifier generated by Google.", +"type": "string" +}, +"dealCode": { +"description": "Google-issued code (100 char max) for discounted pricing on subscription plans. Deal code must be included in `insert` requests in order to receive discounted rate. This property is optional, regular pricing applies if left empty.", +"type": "string" +}, +"kind": { +"default": "reseller#subscription", +"description": "Identifies the resource as a Subscription. Value: `reseller#subscription`", +"type": "string" +}, +"plan": { +"description": "The `plan` property is required. In this version of the API, the G Suite plans are the flexible plan, annual commitment plan, and the 30-day free trial plan. For more information about the API\"s payment plans, see the API concepts.", +"properties": { +"commitmentInterval": { +"description": "In this version of the API, annual commitment plan's interval is one year. *Note: *When `billingMethod` value is `OFFLINE`, the subscription property object `plan.commitmentInterval` is omitted in all API responses. ", +"properties": { +"endTime": { +"description": "An annual commitment plan's interval's `endTime` in milliseconds using the UNIX Epoch format. See an example Epoch converter.", +"format": "int64", +"type": "string" +}, +"startTime": { +"description": "An annual commitment plan's interval's `startTime` in milliseconds using UNIX Epoch format. See an example Epoch converter.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"isCommitmentPlan": { +"description": "The `isCommitmentPlan` property's boolean value identifies the plan as an annual commitment plan: - `true` \u2014 The subscription's plan is an annual commitment plan. - `false` \u2014 The plan is not an annual commitment plan. ", +"type": "boolean" +}, +"planName": { +"description": "The `planName` property is required. This is the name of the subscription's plan. For more information about the Google payment plans, see the API concepts. Possible values are: - `ANNUAL_MONTHLY_PAY` \u2014 The annual commitment plan with monthly payments. *Caution: *`ANNUAL_MONTHLY_PAY` is returned as `ANNUAL` in all API responses. - `ANNUAL_YEARLY_PAY` \u2014 The annual commitment plan with yearly payments - `FLEXIBLE` \u2014 The flexible plan - `TRIAL` \u2014 The 30-day free trial plan. A subscription in trial will be suspended after the 30th free day if no payment plan is assigned. Calling `changePlan` will assign a payment plan to a trial but will not activate the plan. A trial will automatically begin its assigned payment plan after its 30th free day or immediately after calling `startPaidService`. - `FREE` \u2014 The free plan is exclusive to the Cloud Identity SKU and does not incur any billing. ", +"type": "string" +} +}, +"type": "object" +}, +"purchaseOrderId": { +"description": "This is an optional property. This purchase order (PO) information is for resellers to use for their company tracking usage. If a `purchaseOrderId` value is given it appears in the API responses and shows up in the invoice. The property accepts up to 80 plain text characters.", +"type": "string" +}, +"renewalSettings": { +"$ref": "RenewalSettings", +"description": "Renewal settings for the annual commitment plan. For more detailed information, see renewal options in the administrator help center." +}, +"resourceUiUrl": { +"description": "URL to customer's Subscriptions page in the Admin console. The read-only URL is generated by the API service. This is used if your client application requires the customer to complete a task using the Subscriptions page in the Admin console.", +"type": "string" +}, +"seats": { +"$ref": "Seats", +"description": "This is a required property. The number and limit of user seat licenses in the plan." +}, +"skuId": { +"description": "A required property. The `skuId` is a unique system identifier for a product's SKU assigned to a customer in the subscription. For products and SKUs available in this version of the API, see Product and SKU IDs.", +"type": "string" +}, +"skuName": { +"description": "Read-only external display name for a product's SKU assigned to a customer in the subscription. SKU names are subject to change at Google's discretion. For products and SKUs available in this version of the API, see Product and SKU IDs.", +"type": "string" +}, +"status": { +"description": "This is an optional property.", +"type": "string" +}, +"subscriptionId": { +"description": "The `subscriptionId` is the subscription identifier and is unique for each customer. This is a required property. Since a `subscriptionId` changes when a subscription is updated, we recommend not using this ID as a key for persistent data. Use the `subscriptionId` as described in retrieve all reseller subscriptions.", +"type": "string" +}, +"suspensionReasons": { +"description": "Read-only field containing an enumerable of all the current suspension reasons for a subscription. It is possible for a subscription to have many concurrent, overlapping suspension reasons. A subscription's `STATUS` is `SUSPENDED` until all pending suspensions are removed. Possible options include: - `PENDING_TOS_ACCEPTANCE` - The customer has not logged in and accepted the G Suite Resold Terms of Services. - `RENEWAL_WITH_TYPE_CANCEL` - The customer's commitment ended and their service was cancelled at the end of their term. - `RESELLER_INITIATED` - A manual suspension invoked by a Reseller. - `TRIAL_ENDED` - The customer's trial expired without a plan selected. - `OTHER` - The customer is suspended for an internal Google reason (e.g. abuse or otherwise). ", +"items": { +"type": "string" +}, +"type": "array" +}, +"transferInfo": { +"description": "Read-only transfer related information for the subscription. For more information, see retrieve transferable subscriptions for a customer.", +"properties": { +"currentLegacySkuId": { +"description": "The `skuId` of the current resold subscription. This is populated only when the customer has a subscription with a legacy SKU and the subscription resource is populated with the `skuId` of the SKU recommended for the transfer.", +"type": "string" +}, +"minimumTransferableSeats": { +"description": "When inserting a subscription, this is the minimum number of seats listed in the transfer order for this product. For example, if the customer has 20 users, the reseller cannot place a transfer order of 15 seats. The minimum is 20 seats.", +"format": "int32", +"type": "integer" +}, +"transferabilityExpirationTime": { +"description": "The time when transfer token or intent to transfer will expire. The time is in milliseconds using UNIX Epoch format.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"trialSettings": { +"description": "The G Suite annual commitment and flexible payment plans can be in a 30-day free trial. For more information, see the API concepts.", +"properties": { +"isInTrial": { +"description": "Determines if a subscription's plan is in a 30-day free trial or not: - `true` \u2014 The plan is in trial. - `false` \u2014 The plan is not in trial. ", +"type": "boolean" +}, +"trialEndTime": { +"description": "Date when the trial ends. The value is in milliseconds using the UNIX Epoch format. See an example Epoch converter.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"type": "object" +}, +"Subscriptions": { +"description": "A subscription manages the relationship of a Google customer's payment plan with a product's SKU, user licenses, 30-day free trial status, and renewal options. A primary role of a reseller is to manage the Google customer's subscriptions.", +"id": "Subscriptions", +"properties": { +"kind": { +"default": "reseller#subscriptions", +"description": "Identifies the resource as a collection of subscriptions. Value: reseller#subscriptions", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +}, +"subscriptions": { +"description": "The subscriptions in this page of results.", +"items": { +"$ref": "Subscription" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Workspace Reseller API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/resourcesettings.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/resourcesettings.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..902cf8c8050134544dd842435f5c9fd577c86044 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/resourcesettings.v1.json @@ -0,0 +1,673 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://resourcesettings.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Resource Settings", +"description": "The Resource Settings API allows users to control and modify the behavior of their GCP resources (e.g., VM, firewall, Project, etc.) across the Cloud Resource Hierarchy.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/resource-manager/docs/resource-settings/overview", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "resourcesettings:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://resourcesettings.mtls.googleapis.com/", +"name": "resourcesettings", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"resources": { +"settings": { +"methods": { +"get": { +"description": "Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.", +"flatPath": "v1/folders/{foldersId}/settings/{settingsId}", +"httpMethod": "GET", +"id": "resourcesettings.folders.settings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the setting to get. See Setting for naming requirements.", +"location": "path", +"pattern": "^folders/[^/]+/settings/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The SettingView for this request.", +"enum": [ +"SETTING_VIEW_UNSPECIFIED", +"SETTING_VIEW_BASIC", +"SETTING_VIEW_EFFECTIVE_VALUE", +"SETTING_VIEW_LOCAL_VALUE" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the SETTING_VIEW_BASIC view.", +"Include Setting.metadata, but nothing else. This is the default value (for both ListSettings and GetSetting).", +"Include Setting.effective_value, but nothing else.", +"Include Setting.local_value, but nothing else." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the settings that are available on the Cloud resource `parent`.", +"flatPath": "v1/folders/{foldersId}/settings", +"httpMethod": "GET", +"id": "resourcesettings.folders.settings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Unused. The size of the page to be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Unused. A page token used to retrieve the next page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project, folder, or organization that is the parent resource for this setting. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The SettingView for this request.", +"enum": [ +"SETTING_VIEW_UNSPECIFIED", +"SETTING_VIEW_BASIC", +"SETTING_VIEW_EFFECTIVE_VALUE", +"SETTING_VIEW_LOCAL_VALUE" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the SETTING_VIEW_BASIC view.", +"Include Setting.metadata, but nothing else. This is the default value (for both ListSettings and GetSetting).", +"Include Setting.effective_value, but nothing else.", +"Include Setting.local_value, but nothing else." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/settings", +"response": { +"$ref": "GoogleCloudResourcesettingsV1ListSettingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.", +"flatPath": "v1/folders/{foldersId}/settings/{settingsId}", +"httpMethod": "PATCH", +"id": "resourcesettings.folders.settings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the setting. Must be in one of the following forms: * `projects/{project_number}/settings/{setting_name}` * `folders/{folder_id}/settings/{setting_name}` * `organizations/{organization_id}/settings/{setting_name}` For example, \"/projects/123/settings/gcp-enableMyFeature\"", +"location": "path", +"pattern": "^folders/[^/]+/settings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"response": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"organizations": { +"resources": { +"settings": { +"methods": { +"get": { +"description": "Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.", +"flatPath": "v1/organizations/{organizationsId}/settings/{settingsId}", +"httpMethod": "GET", +"id": "resourcesettings.organizations.settings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the setting to get. See Setting for naming requirements.", +"location": "path", +"pattern": "^organizations/[^/]+/settings/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The SettingView for this request.", +"enum": [ +"SETTING_VIEW_UNSPECIFIED", +"SETTING_VIEW_BASIC", +"SETTING_VIEW_EFFECTIVE_VALUE", +"SETTING_VIEW_LOCAL_VALUE" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the SETTING_VIEW_BASIC view.", +"Include Setting.metadata, but nothing else. This is the default value (for both ListSettings and GetSetting).", +"Include Setting.effective_value, but nothing else.", +"Include Setting.local_value, but nothing else." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the settings that are available on the Cloud resource `parent`.", +"flatPath": "v1/organizations/{organizationsId}/settings", +"httpMethod": "GET", +"id": "resourcesettings.organizations.settings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Unused. The size of the page to be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Unused. A page token used to retrieve the next page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project, folder, or organization that is the parent resource for this setting. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The SettingView for this request.", +"enum": [ +"SETTING_VIEW_UNSPECIFIED", +"SETTING_VIEW_BASIC", +"SETTING_VIEW_EFFECTIVE_VALUE", +"SETTING_VIEW_LOCAL_VALUE" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the SETTING_VIEW_BASIC view.", +"Include Setting.metadata, but nothing else. This is the default value (for both ListSettings and GetSetting).", +"Include Setting.effective_value, but nothing else.", +"Include Setting.local_value, but nothing else." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/settings", +"response": { +"$ref": "GoogleCloudResourcesettingsV1ListSettingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.", +"flatPath": "v1/organizations/{organizationsId}/settings/{settingsId}", +"httpMethod": "PATCH", +"id": "resourcesettings.organizations.settings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the setting. Must be in one of the following forms: * `projects/{project_number}/settings/{setting_name}` * `folders/{folder_id}/settings/{setting_name}` * `organizations/{organization_id}/settings/{setting_name}` For example, \"/projects/123/settings/gcp-enableMyFeature\"", +"location": "path", +"pattern": "^organizations/[^/]+/settings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"response": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"projects": { +"resources": { +"settings": { +"methods": { +"get": { +"description": "Returns a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist.", +"flatPath": "v1/projects/{projectsId}/settings/{settingsId}", +"httpMethod": "GET", +"id": "resourcesettings.projects.settings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the setting to get. See Setting for naming requirements.", +"location": "path", +"pattern": "^projects/[^/]+/settings/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The SettingView for this request.", +"enum": [ +"SETTING_VIEW_UNSPECIFIED", +"SETTING_VIEW_BASIC", +"SETTING_VIEW_EFFECTIVE_VALUE", +"SETTING_VIEW_LOCAL_VALUE" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the SETTING_VIEW_BASIC view.", +"Include Setting.metadata, but nothing else. This is the default value (for both ListSettings and GetSetting).", +"Include Setting.effective_value, but nothing else.", +"Include Setting.local_value, but nothing else." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the settings that are available on the Cloud resource `parent`.", +"flatPath": "v1/projects/{projectsId}/settings", +"httpMethod": "GET", +"id": "resourcesettings.projects.settings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Unused. The size of the page to be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Unused. A page token used to retrieve the next page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project, folder, or organization that is the parent resource for this setting. Must be in one of the following forms: * `projects/{project_number}` * `projects/{project_id}` * `folders/{folder_id}` * `organizations/{organization_id}`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The SettingView for this request.", +"enum": [ +"SETTING_VIEW_UNSPECIFIED", +"SETTING_VIEW_BASIC", +"SETTING_VIEW_EFFECTIVE_VALUE", +"SETTING_VIEW_LOCAL_VALUE" +], +"enumDescriptions": [ +"The default / unset value. The API will default to the SETTING_VIEW_BASIC view.", +"Include Setting.metadata, but nothing else. This is the default value (for both ListSettings and GetSetting).", +"Include Setting.effective_value, but nothing else.", +"Include Setting.local_value, but nothing else." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/settings", +"response": { +"$ref": "GoogleCloudResourcesettingsV1ListSettingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a specified setting. Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the setting does not exist. Returns a `google.rpc.Status` with `google.rpc.Code.FAILED_PRECONDITION` if the setting is flagged as read only. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the etag supplied in the request does not match the persisted etag of the setting value. On success, the response will contain only `name`, `local_value` and `etag`. The `metadata` and `effective_value` cannot be updated through this API. Note: the supplied setting will perform a full overwrite of the `local_value` field.", +"flatPath": "v1/projects/{projectsId}/settings/{settingsId}", +"httpMethod": "PATCH", +"id": "resourcesettings.projects.settings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the setting. Must be in one of the following forms: * `projects/{project_number}/settings/{setting_name}` * `folders/{folder_id}/settings/{setting_name}` * `organizations/{organization_id}/settings/{setting_name}` For example, \"/projects/123/settings/gcp-enableMyFeature\"", +"location": "path", +"pattern": "^projects/[^/]+/settings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"response": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://resourcesettings.googleapis.com/", +"schemas": { +"GoogleCloudResourcesettingsV1ListSettingsResponse": { +"description": "The response from ListSettings.", +"id": "GoogleCloudResourcesettingsV1ListSettingsResponse", +"properties": { +"nextPageToken": { +"description": "Unused. A page token used to retrieve the next page.", +"type": "string" +}, +"settings": { +"description": "A list of settings that are available at the specified Cloud resource.", +"items": { +"$ref": "GoogleCloudResourcesettingsV1Setting" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudResourcesettingsV1Setting": { +"description": "The schema for settings.", +"id": "GoogleCloudResourcesettingsV1Setting", +"properties": { +"effectiveValue": { +"$ref": "GoogleCloudResourcesettingsV1Value", +"description": "Output only. The effective value of the setting at the given parent resource, evaluated based on the resource hierarchy The effective value evaluates to one of the following options, in this order. If an option is not valid or doesn't exist, then the next option is used: 1. The local setting value on the given resource: Setting.local_value 2. If one of the given resource's ancestors in the resource hierarchy have a local setting value, the local value at the nearest such ancestor. 3. The setting's default value: SettingMetadata.default_value 4. An empty value, defined as a `Value` with all fields unset. The data type of Value must always be consistent with the data type defined in Setting.metadata.", +"readOnly": true +}, +"etag": { +"description": "A fingerprint used for optimistic concurrency. See UpdateSetting for more details.", +"type": "string" +}, +"localValue": { +"$ref": "GoogleCloudResourcesettingsV1Value", +"description": "The configured value of the setting at the given parent resource, ignoring the resource hierarchy. The data type of Value must always be consistent with the data type defined in Setting.metadata." +}, +"metadata": { +"$ref": "GoogleCloudResourcesettingsV1SettingMetadata", +"description": "Output only. Metadata about a setting which is not editable by the end user.", +"readOnly": true +}, +"name": { +"description": "The resource name of the setting. Must be in one of the following forms: * `projects/{project_number}/settings/{setting_name}` * `folders/{folder_id}/settings/{setting_name}` * `organizations/{organization_id}/settings/{setting_name}` For example, \"/projects/123/settings/gcp-enableMyFeature\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudResourcesettingsV1SettingMetadata": { +"description": "Metadata about a setting which is not editable by the end user.", +"id": "GoogleCloudResourcesettingsV1SettingMetadata", +"properties": { +"dataType": { +"description": "The data type for this setting.", +"enum": [ +"DATA_TYPE_UNSPECIFIED", +"BOOLEAN", +"STRING", +"STRING_SET", +"ENUM_VALUE", +"DURATION_VALUE", +"STRING_MAP" +], +"enumDescriptions": [ +"Unspecified data type.", +"A boolean setting.", +"A string setting.", +"A string set setting.", +"A Enum setting", +"A Duration setting", +"A string->string map setting" +], +"type": "string" +}, +"defaultValue": { +"$ref": "GoogleCloudResourcesettingsV1Value", +"description": "The value provided by Setting.effective_value if no setting value is explicitly set. Note: not all settings have a default value." +}, +"description": { +"description": "A detailed description of what this setting does.", +"type": "string" +}, +"displayName": { +"description": "The human readable name for this setting.", +"type": "string" +}, +"readOnly": { +"description": "A flag indicating that values of this setting cannot be modified. See documentation for the specific setting for updates and reasons.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudResourcesettingsV1Value": { +"description": "The data in a setting value.", +"id": "GoogleCloudResourcesettingsV1Value", +"properties": { +"booleanValue": { +"description": "Defines this value as being a boolean value.", +"type": "boolean" +}, +"durationValue": { +"description": "Defines this value as being a Duration.", +"format": "google-duration", +"type": "string" +}, +"enumValue": { +"$ref": "GoogleCloudResourcesettingsV1ValueEnumValue", +"description": "Defines this value as being a Enum." +}, +"stringMapValue": { +"$ref": "GoogleCloudResourcesettingsV1ValueStringMap", +"description": "Defines this value as being a StringMap." +}, +"stringSetValue": { +"$ref": "GoogleCloudResourcesettingsV1ValueStringSet", +"description": "Defines this value as being a StringSet." +}, +"stringValue": { +"description": "Defines this value as being a string value.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudResourcesettingsV1ValueEnumValue": { +"description": "A enum value that can hold any enum type setting values. Each enum type is represented by a number, this representation is stored in the definitions.", +"id": "GoogleCloudResourcesettingsV1ValueEnumValue", +"properties": { +"value": { +"description": "The value of this enum", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudResourcesettingsV1ValueStringMap": { +"description": "A string->string map value that can hold a map of string keys to string values. The maximum length of each string is 200 characters and there can be a maximum of 50 key-value pairs in the map.", +"id": "GoogleCloudResourcesettingsV1ValueStringMap", +"properties": { +"mappings": { +"additionalProperties": { +"type": "string" +}, +"description": "The key-value pairs in the map", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudResourcesettingsV1ValueStringSet": { +"description": "A string set value that can hold a set of strings. The maximum length of each string is 200 characters and there can be a maximum of 50 strings in the string set.", +"id": "GoogleCloudResourcesettingsV1ValueStringSet", +"properties": { +"values": { +"description": "The strings in the set", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Resource Settings API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..014048dca30dce328b11c055306c55fbc0318760 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2.json @@ -0,0 +1,7298 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://retail.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Retail", +"description": "Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/recommendations", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "retail:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://retail.mtls.googleapis.com/", +"name": "retail", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"catalogs": { +"methods": { +"completeQuery": { +"description": "Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:completeQuery", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.completeQuery", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"dataset": { +"description": "Determines which dataset to use for fetching completion. \"user-data\" will use the imported dataset through CompletionService.ImportCompletionData. \"cloud-retail\" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the \"user-data\". Current supported values: * user-data * cloud-retail: This option requires enabling auto-learning function first. See [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).", +"location": "query", +"type": "string" +}, +"deviceType": { +"description": "The device type context for completion suggestions. We recommend that you leave this field empty. It can apply different suggestions on different device types, e.g. `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device types. Supported formats: * `UNKNOWN_DEVICE_TYPE` * `DESKTOP` * `MOBILE` * A customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`.", +"location": "query", +"type": "string" +}, +"entity": { +"description": "The entity for customers who run multiple entities, domains, sites, or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it must be an exact match with UserEvent.entity to get per-entity autocomplete results.", +"location": "query", +"type": "string" +}, +"languageCodes": { +"description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxSuggestions": { +"description": "Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"query": { +"description": "Required. The query used to generate suggestions. The maximum number of allowed characters is 255.", +"location": "query", +"type": "string" +}, +"visitorId": { +"description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+catalog}:completeQuery", +"response": { +"$ref": "GoogleCloudRetailV2CompleteQueryResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportAnalyticsMetrics": { +"description": "Exports analytics metrics. `Operation.response` is of type `ExportAnalyticsMetricsResponse`. `Operation.metadata` is of type `ExportMetadata`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:exportAnalyticsMetrics", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.exportAnalyticsMetrics", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Required. Full resource name of the parent catalog. Expected format: `projects/*/locations/*/catalogs/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+catalog}:exportAnalyticsMetrics", +"request": { +"$ref": "GoogleCloudRetailV2ExportAnalyticsMetricsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getAttributesConfig": { +"description": "Gets an AttributesConfig.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getAttributesConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2AttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getCompletionConfig": { +"description": "Gets a CompletionConfig.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getCompletionConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full CompletionConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2CompletionConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getDefaultBranch": { +"description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getDefaultBranch", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+catalog}:getDefaultBranch", +"response": { +"$ref": "GoogleCloudRetailV2GetDefaultBranchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the Catalogs associated with the project.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/catalogs", +"response": { +"$ref": "GoogleCloudRetailV2ListCatalogsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the Catalogs.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The fully qualified resource name of the catalog.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2Catalog" +}, +"response": { +"$ref": "GoogleCloudRetailV2Catalog" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setDefaultBranch": { +"description": "Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using \"default_branch\" to the actual branch id set as default. For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: * PredictionService will only return product IDs from branch {newBranch}. * SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). * UserEventService will only join events with products from branch {newBranch}.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:setDefaultBranch", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.setDefaultBranch", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+catalog}:setDefaultBranch", +"request": { +"$ref": "GoogleCloudRetailV2SetDefaultBranchRequest" +}, +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateAttributesConfig": { +"description": "Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.updateAttributesConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided AttributesConfig to update. The following is the only supported field: * AttributesConfig.catalog_attributes If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2AttributesConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2AttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateCompletionConfig": { +"description": "Updates the CompletionConfigs.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.updateCompletionConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2CompletionConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2CompletionConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"attributesConfig": { +"methods": { +"addCatalogAttribute": { +"description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+attributesConfig}:addCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2AddCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2AttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeCatalogAttribute": { +"description": "Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:removeCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+attributesConfig}:removeCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2RemoveCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2AttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"replaceCatalogAttribute": { +"description": "Replaces the specified CatalogAttribute in the AttributesConfig by updating the catalog attribute with the same CatalogAttribute.key. If the CatalogAttribute to replace does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:replaceCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.replaceCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+attributesConfig}:replaceCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2ReplaceCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2AttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"branches": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"products": { +"methods": { +"addFulfillmentPlaces": { +"description": "We recommend that you use the ProductService.AddLocalInventories method instead of the ProductService.AddFulfillmentPlaces method. ProductService.AddLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:addFulfillmentPlaces", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.addFulfillmentPlaces", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+product}:addFulfillmentPlaces", +"request": { +"$ref": "GoogleCloudRetailV2AddFulfillmentPlacesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"addLocalInventories": { +"description": "Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:addLocalInventories", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.addLocalInventories", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+product}:addLocalInventories", +"request": { +"$ref": "GoogleCloudRetailV2AddLocalInventoriesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a Product.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +}, +"productId": { +"description": "Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+parent}/products", +"request": { +"$ref": "GoogleCloudRetailV2Product" +}, +"response": { +"$ref": "GoogleCloudRetailV2Product" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Product.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.branches.products.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Product.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.products.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2Product" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/products:import", +"request": { +"$ref": "GoogleCloudRetailV2ImportProductsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Gets a list of Products.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.products.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List Product.Type.VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = \"some_product_id\"` * List Products bundled in a Product.Type.COLLECTION Product. For example: `collection_product_id = \"some_product_id\"` * List Products with a partibular type. For example: `type = \"PRIMARY\"` `type = \"VARIANT\"` `type = \"COLLECTION\"` If the field is unrecognizable, an INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error is returned.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of Products to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token ListProductsResponse.next_page_token, received from a previous ProductService.ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ProductService.ListProducts must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list Products under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "The fields of Product to return in the responses. If not set or empty, the following fields are returned: * Product.name * Product.id * Product.title * Product.uri * Product.images * Product.price_info * Product.brands If \"*\" is provided, all fields are returned. Product.name is always returned no matter what mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+parent}/products", +"response": { +"$ref": "GoogleCloudRetailV2ListProductsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Product.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.branches.products.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "If set to true, and the Product is not found, a new Product will be created. In this situation, `update_mask` is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as \"attributes.${key_name}\". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2Product" +}, +"response": { +"$ref": "GoogleCloudRetailV2Product" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"purge": { +"description": "Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:purge", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the branch under which the products are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/products:purge", +"request": { +"$ref": "GoogleCloudRetailV2PurgeProductsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeFulfillmentPlaces": { +"description": "We recommend that you use the ProductService.RemoveLocalInventories method instead of the ProductService.RemoveFulfillmentPlaces method. ProductService.RemoveLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeFulfillmentPlaces", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+product}:removeFulfillmentPlaces", +"request": { +"$ref": "GoogleCloudRetailV2RemoveFulfillmentPlacesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeLocalInventories": { +"description": "Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeLocalInventories", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.removeLocalInventories", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+product}:removeLocalInventories", +"request": { +"$ref": "GoogleCloudRetailV2RemoveLocalInventoriesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setInventory": { +"description": "Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. When inventory is updated with ProductService.CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used. If no inventory fields are set in SetInventoryRequest.set_mask, then any existing inventory information is preserved. Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService.RemoveFulfillmentPlaces. The returned Operations is obsolete after one day, and the GetOperation API returns `NOT_FOUND` afterwards. If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:setInventory", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.setInventory", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:setInventory", +"request": { +"$ref": "GoogleCloudRetailV2SetInventoryRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"completionData": { +"methods": { +"import": { +"description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.completionData.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The catalog which the suggestions dataset belongs to. Format: `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/completionData:import", +"request": { +"$ref": "GoogleCloudRetailV2ImportCompletionDataRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"controls": { +"methods": { +"create": { +"description": "Creates a Control. If the Control to create already exists, an ALREADY_EXISTS error is returned.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.controls.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"controlId": { +"description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Full resource name of parent catalog. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/controls", +"request": { +"$ref": "GoogleCloudRetailV2Control" +}, +"response": { +"$ref": "GoogleCloudRetailV2Control" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.controls.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Control.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.controls.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2Control" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Controls by their parent Catalog.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.controls.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List controls that are used in a single ServingConfig: 'serving_config = \"boosted_home_page_cvr\"'", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListControls` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The catalog resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/controls", +"response": { +"$ref": "GoogleCloudRetailV2ListControlsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Control. Control cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the Control to update does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.controls.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/controls/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name If not set or empty, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2Control" +}, +"response": { +"$ref": "GoogleCloudRetailV2Control" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"models": { +"methods": { +"create": { +"description": "Creates a new model.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"dryRun": { +"description": "Optional. Whether to run a dry run to validate the request (without actually creating the model).", +"location": "query", +"type": "boolean" +}, +"parent": { +"description": "Required. The parent resource under which to create the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/models", +"request": { +"$ref": "GoogleCloudRetailV2Model" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing model.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.models.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Model to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a model.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.models.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Model to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2Model" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the models linked to this event store.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.models.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListModels` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent for which to list models. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/models", +"response": { +"$ref": "GoogleCloudRetailV2ListModelsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update of model metadata. Only fields that currently can be updated are: `filtering_option` and `periodic_tuning_state`. If other values are provided, this API method ignores them.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.models.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Indicates which fields in the provided 'model' to update. If not set, by default updates all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2Model" +}, +"response": { +"$ref": "GoogleCloudRetailV2Model" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pause": { +"description": "Pauses the training of an existing model.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:pause", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.pause", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model to pause. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:pause", +"request": { +"$ref": "GoogleCloudRetailV2PauseModelRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2Model" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resume": { +"description": "Resumes the training of an existing model.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:resume", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.resume", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model to resume. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:resume", +"request": { +"$ref": "GoogleCloudRetailV2ResumeModelRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2Model" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"tune": { +"description": "Tunes an existing model.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:tune", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.tune", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the model to tune. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:tune", +"request": { +"$ref": "GoogleCloudRetailV2TuneModelRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"placements": { +"methods": { +"predict": { +"description": "Makes a recommendation prediction.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/placements/{placementsId}:predict", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.placements.predict", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+placement}:predict", +"request": { +"$ref": "GoogleCloudRetailV2PredictRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2PredictResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"search": { +"description": "Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/placements/{placementsId}:search", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.placements.search", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that are used to make the search.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+placement}:search", +"request": { +"$ref": "GoogleCloudRetailV2SearchRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2SearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"servingConfigs": { +"methods": { +"addControl": { +"description": "Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:addControl", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.addControl", +"parameterOrder": [ +"servingConfig" +], +"parameters": { +"servingConfig": { +"description": "Required. The source ServingConfig resource name . Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+servingConfig}:addControl", +"request": { +"$ref": "GoogleCloudRetailV2AddControlRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a ServingConfig. A maximum of 100 ServingConfigs are allowed in a Catalog, otherwise a FAILED_PRECONDITION error is returned.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Full resource name of parent. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"servingConfigId": { +"description": "Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+parent}/servingConfigs", +"request": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.servingConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ServingConfig to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.servingConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all ServingConfigs linked to this catalog.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.servingConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The catalog resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/servingConfigs", +"response": { +"$ref": "GoogleCloudRetailV2ListServingConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a ServingConfig.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.servingConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/servingConfig/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"predict": { +"description": "Makes a recommendation prediction.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.predict", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+placement}:predict", +"request": { +"$ref": "GoogleCloudRetailV2PredictRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2PredictResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeControl": { +"description": "Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:removeControl", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.removeControl", +"parameterOrder": [ +"servingConfig" +], +"parameters": { +"servingConfig": { +"description": "Required. The source ServingConfig resource name . Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+servingConfig}:removeControl", +"request": { +"$ref": "GoogleCloudRetailV2RemoveControlRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"search": { +"description": "Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.search", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that are used to make the search.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+placement}:search", +"request": { +"$ref": "GoogleCloudRetailV2SearchRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2SearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"userEvents": { +"methods": { +"collect": { +"description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:collect", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.userEvents.collect", +"parameterOrder": [ +"parent" +], +"parameters": { +"ets": { +"description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent catalog name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"prebuiltRule": { +"description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", +"location": "query", +"type": "string" +}, +"rawJson": { +"description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", +"location": "query", +"type": "string" +}, +"uri": { +"description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", +"location": "query", +"type": "string" +}, +"userEvent": { +"description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+parent}/userEvents:collect", +"response": { +"$ref": "GoogleApiHttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/userEvents:import", +"request": { +"$ref": "GoogleCloudRetailV2ImportUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"purge": { +"description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:purge", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/userEvents:purge", +"request": { +"$ref": "GoogleCloudRetailV2PurgeUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rejoin": { +"description": "Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.rejoin", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/userEvents:rejoin", +"request": { +"$ref": "GoogleCloudRetailV2RejoinUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"write": { +"description": "Writes a single user event.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:write", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.write", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"writeAsync": { +"description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/userEvents:write", +"request": { +"$ref": "GoogleCloudRetailV2UserEvent" +}, +"response": { +"$ref": "GoogleCloudRetailV2UserEvent" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2/projects/{projectsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240418", +"rootUrl": "https://retail.googleapis.com/", +"schemas": { +"GoogleApiHttpBody": { +"description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", +"id": "GoogleApiHttpBody", +"properties": { +"contentType": { +"description": "The HTTP Content-Type header value specifying the content type of the body.", +"type": "string" +}, +"data": { +"description": "The HTTP request/response body as raw binary.", +"format": "byte", +"type": "string" +}, +"extensions": { +"description": "Application specific response metadata. Must be set in the first response for streaming APIs.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingErrorContext": { +"description": "A description of the context in which an error occurred.", +"id": "GoogleCloudRetailLoggingErrorContext", +"properties": { +"httpRequest": { +"$ref": "GoogleCloudRetailLoggingHttpRequestContext", +"description": "The HTTP request which was processed when the error was triggered." +}, +"reportLocation": { +"$ref": "GoogleCloudRetailLoggingSourceLocation", +"description": "The location in the source code where the decision was made to report the error, usually the place where it was logged." +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingErrorLog": { +"description": "An error log which is reported to the Error Reporting system. This proto a superset of google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent.", +"id": "GoogleCloudRetailLoggingErrorLog", +"properties": { +"context": { +"$ref": "GoogleCloudRetailLoggingErrorContext", +"description": "A description of the context in which the error occurred." +}, +"importPayload": { +"$ref": "GoogleCloudRetailLoggingImportErrorContext", +"description": "The error payload that is populated on LRO import APIs." +}, +"message": { +"description": "A message describing the error.", +"type": "string" +}, +"requestPayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The API request payload, represented as a protocol buffer. Most API request types are supported. For example: \"type.googleapis.com/google.cloud.retail.v2.ProductService.CreateProductRequest\" \"type.googleapis.com/google.cloud.retail.v2.UserEventService.WriteUserEventRequest\"", +"type": "object" +}, +"responsePayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The API response payload, represented as a protocol buffer. This is used to log some \"soft errors\", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported and no PII is included: \"google.cloud.retail.v2.PredictionService.Predict\" \"google.cloud.retail.v2.UserEventService.WriteUserEvent\" \"google.cloud.retail.v2.UserEventService.CollectUserEvent\"", +"type": "object" +}, +"serviceContext": { +"$ref": "GoogleCloudRetailLoggingServiceContext", +"description": "The service context in which this error has occurred." +}, +"status": { +"$ref": "GoogleRpcStatus", +"description": "The RPC status associated with the error log." +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingHttpRequestContext": { +"description": "HTTP request data that is related to a reported error.", +"id": "GoogleCloudRetailLoggingHttpRequestContext", +"properties": { +"responseStatusCode": { +"description": "The HTTP response status code for the request.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingImportErrorContext": { +"description": "The error payload that is populated on LRO import APIs, including \"google.cloud.retail.v2.ProductService.ImportProducts\" and \"google.cloud.retail.v2.EventService.ImportUserEvents\".", +"id": "GoogleCloudRetailLoggingImportErrorContext", +"properties": { +"catalogItem": { +"description": "The detailed content which caused the error on importing a catalog item.", +"type": "string" +}, +"gcsPath": { +"description": "Cloud Storage file path of the import source. Can be set for batch operation error.", +"type": "string" +}, +"lineNumber": { +"description": "Line number of the content in file. Should be empty for permission or batch operation error.", +"type": "string" +}, +"operationName": { +"description": "The operation resource name of the LRO.", +"type": "string" +}, +"product": { +"description": "The detailed content which caused the error on importing a product.", +"type": "string" +}, +"userEvent": { +"description": "The detailed content which caused the error on importing a user event.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingServiceContext": { +"description": "Describes a running service that sends errors.", +"id": "GoogleCloudRetailLoggingServiceContext", +"properties": { +"service": { +"description": "An identifier of the service. For example, \"retail.googleapis.com\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingSourceLocation": { +"description": "Indicates a location in the source code of the service for which errors are reported.", +"id": "GoogleCloudRetailLoggingSourceLocation", +"properties": { +"functionName": { +"description": "Human-readable name of a function or method. For example, \"google.cloud.retail.v2.UserEventService.ImportUserEvents\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2AddCatalogAttributeRequest": { +"description": "Request for CatalogService.AddCatalogAttribute method.", +"id": "GoogleCloudRetailV2AddCatalogAttributeRequest", +"properties": { +"catalogAttribute": { +"$ref": "GoogleCloudRetailV2CatalogAttribute", +"description": "Required. The CatalogAttribute to add." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2AddControlRequest": { +"description": "Request for AddControl method.", +"id": "GoogleCloudRetailV2AddControlRequest", +"properties": { +"controlId": { +"description": "Required. The id of the control to apply. Assumed to be in the same catalog as the serving config - if id is not found a NOT_FOUND error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2AddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2AddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddFulfillmentPlacesRequest": { +"description": "Request message for ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2AddFulfillmentPlacesRequest", +"properties": { +"addTime": { +"description": "The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"allowMissing": { +"description": "If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. The IDs for this type, such as the store IDs for \"pickup-in-store\" or the region IDs for \"same-day-delivery\" to be added for this type. Duplicate IDs will be automatically ignored. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2AddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2AddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2AddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddLocalInventoriesRequest": { +"description": "Request message for ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2AddLocalInventoriesRequest", +"properties": { +"addMask": { +"description": "Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.", +"format": "google-fieldmask", +"type": "string" +}, +"addTime": { +"description": "The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"allowMissing": { +"description": "If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"localInventories": { +"description": "Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request.", +"items": { +"$ref": "GoogleCloudRetailV2LocalInventory" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2AddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2AddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AttributesConfig": { +"description": "Catalog level attribute config.", +"id": "GoogleCloudRetailV2AttributesConfig", +"properties": { +"attributeConfigLevel": { +"description": "Output only. The AttributeConfigLevel used for this catalog.", +"enum": [ +"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED", +"PRODUCT_LEVEL_ATTRIBUTE_CONFIG", +"CATALOG_LEVEL_ATTRIBUTE_CONFIG" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.", +"At this level, we honor the attribute configurations set in Product.attributes.", +"At this level, we honor the attribute configurations set in CatalogConfig.attribute_configs." +], +"readOnly": true, +"type": "string" +}, +"catalogAttributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2CatalogAttribute" +}, +"description": "Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. The maximum number of catalog attributes allowed in a request is 1000.", +"type": "object" +}, +"name": { +"description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Audience": { +"description": "An intended audience of the Product for whom it's sold.", +"id": "GoogleCloudRetailV2Audience", +"properties": { +"ageGroups": { +"description": "The age groups of the audience. Strongly encouraged to use the standard values: \"newborn\" (up to 3 months old), \"infant\" (3\u201312 months old), \"toddler\" (1\u20135 years old), \"kids\" (5\u201313 years old), \"adult\" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).", +"items": { +"type": "string" +}, +"type": "array" +}, +"genders": { +"description": "The genders of the audience. Strongly encouraged to use the standard values: \"male\", \"female\", \"unisex\". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2BigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2BigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2BigQuerySource": { +"description": "BigQuery source import data from.", +"id": "GoogleCloudRetailV2BigQuerySource", +"properties": { +"dataSchema": { +"description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for autocomplete imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", +"type": "string" +}, +"datasetId": { +"description": "Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.", +"type": "string" +}, +"gcsStagingDir": { +"description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", +"type": "string" +}, +"partitionDate": { +"$ref": "GoogleTypeDate", +"description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported in ImportProductsRequest." +}, +"projectId": { +"description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", +"type": "string" +}, +"tableId": { +"description": "Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Catalog": { +"description": "The catalog configuration.", +"id": "GoogleCloudRetailV2Catalog", +"properties": { +"displayName": { +"description": "Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"name": { +"description": "Required. Immutable. The fully qualified resource name of the catalog.", +"type": "string" +}, +"productLevelConfig": { +"$ref": "GoogleCloudRetailV2ProductLevelConfig", +"description": "Required. The product level configuration." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CatalogAttribute": { +"description": "Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.", +"id": "GoogleCloudRetailV2CatalogAttribute", +"properties": { +"dynamicFacetableOption": { +"description": "If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. Must be specified, otherwise throws INVALID_FORMAT error.", +"enum": [ +"DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", +"DYNAMIC_FACETABLE_ENABLED", +"DYNAMIC_FACETABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Dynamic facetable option enabled for an attribute.", +"Dynamic facetable option disabled for an attribute." +], +"type": "string" +}, +"exactSearchableOption": { +"description": "If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to EXACT_SEARCHABLE_DISABLED.", +"enum": [ +"EXACT_SEARCHABLE_OPTION_UNSPECIFIED", +"EXACT_SEARCHABLE_ENABLED", +"EXACT_SEARCHABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Exact searchable option enabled for an attribute.", +"Exact searchable option disabled for an attribute." +], +"type": "string" +}, +"facetConfig": { +"$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfig", +"description": "Contains facet options." +}, +"inUse": { +"description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", +"readOnly": true, +"type": "boolean" +}, +"indexableOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search. Must be specified when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.", +"enum": [ +"INDEXABLE_OPTION_UNSPECIFIED", +"INDEXABLE_ENABLED", +"INDEXABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Indexable option enabled for an attribute.", +"Indexable option disabled for an attribute." +], +"type": "string" +}, +"key": { +"description": "Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed. If the attribute key starts with `attributes.`, then the attribute is a custom attribute. Attributes such as `brands`, `patterns`, and `title` are built-in and called system attributes.", +"type": "string" +}, +"retrievableOption": { +"description": "If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to RETRIEVABLE_DISABLED.", +"enum": [ +"RETRIEVABLE_OPTION_UNSPECIFIED", +"RETRIEVABLE_ENABLED", +"RETRIEVABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Retrievable option enabled for an attribute.", +"Retrievable option disabled for an attribute." +], +"type": "string" +}, +"searchableOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes. Must be specified, when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.", +"enum": [ +"SEARCHABLE_OPTION_UNSPECIFIED", +"SEARCHABLE_ENABLED", +"SEARCHABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Searchable option enabled for an attribute.", +"Searchable option disabled for an attribute." +], +"type": "string" +}, +"type": { +"description": "Output only. The type of this attribute. This is derived from the attribute in Product.attributes.", +"enum": [ +"UNKNOWN", +"TEXTUAL", +"NUMERICAL" +], +"enumDescriptions": [ +"The type of the attribute is unknown. Used when type cannot be derived from attribute that is not in_use.", +"Textual attribute.", +"Numerical attribute." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CatalogAttributeFacetConfig": { +"description": "Possible options for the facet that corresponds to the current attribute config.", +"id": "GoogleCloudRetailV2CatalogAttributeFacetConfig", +"properties": { +"facetIntervals": { +"description": "If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.", +"items": { +"$ref": "GoogleCloudRetailV2Interval" +}, +"type": "array" +}, +"ignoredFacetValues": { +"description": "Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.", +"items": { +"$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues" +}, +"type": "array" +}, +"mergedFacet": { +"$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet", +"description": "Use this field only if you want to merge a facet key into another facet key." +}, +"mergedFacetValues": { +"description": "Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if \"dark_blue\" merged into \"BLUE\", then the latter can't merge into \"blues\" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.", +"items": { +"$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue" +}, +"type": "array" +}, +"rerankConfig": { +"$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig", +"description": "Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues": { +"description": "Facet values to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.", +"id": "GoogleCloudRetailV2CatalogAttributeFacetConfigIgnoredFacetValues", +"properties": { +"endTime": { +"description": "If start time is empty and end time is not empty, then ignore these facet values before end time.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time.", +"format": "google-datetime", +"type": "string" +}, +"values": { +"description": "List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 128 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet": { +"description": "The current facet key (i.e. attribute config) maps into the merged_facet_key. A facet key can have at most one child. The current facet key and the merged facet key need both to be textual custom attributes or both numerical custom attributes (same type).", +"id": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacet", +"properties": { +"mergedFacetKey": { +"description": "The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute.", +"type": "string" +}, +"mergedFacetValues": { +"deprecated": true, +"description": "Each instance is a list of facet values that map into the same (possibly different) merged facet value. For the current attribute config, each facet value should map to at most one merged facet value.", +"items": { +"$ref": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue": { +"description": "Replaces a set of textual facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute. This feature is available only for textual custom attributes.", +"id": "GoogleCloudRetailV2CatalogAttributeFacetConfigMergedFacetValue", +"properties": { +"mergedValue": { +"description": "All the previous values are replaced by this merged facet value. This merged_value must be non-empty and can have up to 128 characters.", +"type": "string" +}, +"values": { +"description": "All the facet values that are replaces by the same merged_value that follows. The maximum number of values per MergedFacetValue is 25. Each value can have up to 128 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig": { +"description": "Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable. To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).", +"id": "GoogleCloudRetailV2CatalogAttributeFacetConfigRerankConfig", +"properties": { +"facetValues": { +"description": "If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rerankFacet": { +"description": "If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ColorInfo": { +"description": "The color information of a Product.", +"id": "GoogleCloudRetailV2ColorInfo", +"properties": { +"colorFamilies": { +"description": "The standard color families. Strongly recommended to use the following standard color groups: \"Red\", \"Pink\", \"Orange\", \"Yellow\", \"Purple\", \"Green\", \"Cyan\", \"Blue\", \"Brown\", \"White\", \"Gray\", \"Black\" and \"Mixed\". Normally it is expected to have only 1 color family. May consider using single \"Mixed\" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).", +"items": { +"type": "string" +}, +"type": "array" +}, +"colors": { +"description": "The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single \"Mixed\" instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CompleteQueryResponse": { +"description": "Response of the autocomplete query.", +"id": "GoogleCloudRetailV2CompleteQueryResponse", +"properties": { +"attributionToken": { +"description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", +"type": "string" +}, +"completionResults": { +"description": "Results of the matching suggestions. The result list is ordered and the first result is top suggestion.", +"items": { +"$ref": "GoogleCloudRetailV2CompleteQueryResponseCompletionResult" +}, +"type": "array" +}, +"recentSearchResults": { +"deprecated": true, +"description": "Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support. This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * They are ordered from latest to oldest. * They are matched with CompleteQueryRequest.query case insensitively. * They are transformed to lower case. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.", +"items": { +"$ref": "GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CompleteQueryResponseCompletionResult": { +"description": "Resource that represents completion results.", +"id": "GoogleCloudRetailV2CompleteQueryResponseCompletionResult", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2CustomAttribute" +}, +"description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.", +"type": "object" +}, +"suggestion": { +"description": "The suggestion for the query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult": { +"deprecated": true, +"description": "Recent search of this user.", +"id": "GoogleCloudRetailV2CompleteQueryResponseRecentSearchResult", +"properties": { +"recentSearch": { +"description": "The recent search query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CompletionConfig": { +"description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", +"id": "GoogleCloudRetailV2CompletionConfig", +"properties": { +"allowlistInputConfig": { +"$ref": "GoogleCloudRetailV2CompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete allowlist phrases.", +"readOnly": true +}, +"autoLearning": { +"description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", +"type": "boolean" +}, +"denylistInputConfig": { +"$ref": "GoogleCloudRetailV2CompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete denylist phrases.", +"readOnly": true +}, +"lastAllowlistImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"lastDenylistImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"lastSuggestionsImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API method to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"matchingOrder": { +"description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", +"type": "string" +}, +"maxSuggestions": { +"description": "The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", +"format": "int32", +"type": "integer" +}, +"minPrefixLength": { +"description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", +"type": "string" +}, +"suggestionsInputConfig": { +"$ref": "GoogleCloudRetailV2CompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete suggestion phrases.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CompletionDataInputConfig": { +"description": "The input config source for completion data.", +"id": "GoogleCloudRetailV2CompletionDataInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2BigQuerySource", +"description": "Required. BigQuery input source. Add the IAM permission \"BigQuery Data Viewer\" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CompletionDetail": { +"description": "Detailed completion information including completion attribution token and clicked completion info.", +"id": "GoogleCloudRetailV2CompletionDetail", +"properties": { +"completionAttributionToken": { +"description": "Completion attribution token in CompleteQueryResponse.attribution_token.", +"type": "string" +}, +"selectedPosition": { +"description": "End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.", +"format": "int32", +"type": "integer" +}, +"selectedSuggestion": { +"description": "End user selected CompleteQueryResponse.CompletionResult.suggestion.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Condition": { +"description": "Metadata that is used to define a condition that triggers an action. A valid condition must specify at least one of 'query_terms' or 'products_filter'. If multiple fields are specified, the condition is met if all the fields are satisfied e.g. if a set of query terms and product_filter are set, then only items matching the product_filter for requests with a query matching the query terms wil get boosted.", +"id": "GoogleCloudRetailV2Condition", +"properties": { +"activeTimeRange": { +"description": "Range of time(s) specifying when Condition is active. Condition true if any time range matches.", +"items": { +"$ref": "GoogleCloudRetailV2ConditionTimeRange" +}, +"type": "array" +}, +"pageCategories": { +"description": "Used to support browse uses cases. A list (up to 10 entries) of categories or departments. The format should be the same as UserEvent.page_categories;", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).", +"items": { +"$ref": "GoogleCloudRetailV2ConditionQueryTerm" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ConditionQueryTerm": { +"description": "Query terms that we want to match on.", +"id": "GoogleCloudRetailV2ConditionQueryTerm", +"properties": { +"fullMatch": { +"description": "Whether this is supposed to be a full or partial match.", +"type": "boolean" +}, +"value": { +"description": "The value of the term to match on. Value cannot be empty. Value can have at most 3 terms if specified as a partial match. Each space separated string is considered as one term. For example, \"a b c\" is 3 terms and allowed, but \" a b c d\" is 4 terms and not allowed for a partial match.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ConditionTimeRange": { +"description": "Used for time-dependent conditions. Example: Want to have rule applied for week long sale.", +"id": "GoogleCloudRetailV2ConditionTimeRange", +"properties": { +"endTime": { +"description": "End of time range. Range is inclusive.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Start of time range. Range is inclusive.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Control": { +"description": "Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time.", +"id": "GoogleCloudRetailV2Control", +"properties": { +"associatedServingConfigIds": { +"description": "Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"displayName": { +"description": "Required. The human readable control display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown.", +"type": "string" +}, +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/controls/*`", +"type": "string" +}, +"rule": { +"$ref": "GoogleCloudRetailV2Rule", +"description": "A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost \"gShoe\" when query full matches \"Running Shoes\"." +}, +"searchSolutionUseCase": { +"description": "Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.", +"items": { +"enum": [ +"SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", +"SEARCH_SOLUTION_USE_CASE_SEARCH", +"SEARCH_SOLUTION_USE_CASE_BROWSE" +], +"enumDescriptions": [ +"The value when it's unspecified. In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.", +"Search use case. Expects the traffic has a non-empty query.", +"Browse use case. Expects the traffic has an empty query." +], +"type": "string" +}, +"type": "array" +}, +"solutionTypes": { +"description": "Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2CreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CustomAttribute": { +"description": "A custom attribute that is not explicitly modeled in Product.", +"id": "GoogleCloudRetailV2CustomAttribute", +"properties": { +"indexable": { +"deprecated": true, +"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.", +"type": "boolean" +}, +"numbers": { +"description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +}, +"searchable": { +"deprecated": true, +"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.", +"type": "boolean" +}, +"text": { +"description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExperimentInfo": { +"description": "Metadata for active A/B testing Experiment.", +"id": "GoogleCloudRetailV2ExperimentInfo", +"properties": { +"experiment": { +"description": "The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`", +"type": "string" +}, +"servingConfigExperiment": { +"$ref": "GoogleCloudRetailV2ExperimentInfoServingConfigExperiment", +"description": "A/B test between existing Cloud Retail Search ServingConfigs." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExperimentInfoServingConfigExperiment": { +"description": "Metadata for active serving config A/B tests.", +"id": "GoogleCloudRetailV2ExperimentInfoServingConfigExperiment", +"properties": { +"experimentServingConfig": { +"description": "The fully qualified resource name of the serving config Experiment.VariantArm.serving_config_id responsible for generating the search response. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.", +"type": "string" +}, +"originalServingConfig": { +"description": "The fully qualified resource name of the original SearchRequest.placement in the search request prior to reassignment by experiment API. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportAnalyticsMetricsRequest": { +"description": "Request message for the `ExportAnalyticsMetrics` method.", +"id": "GoogleCloudRetailV2ExportAnalyticsMetricsRequest", +"properties": { +"filter": { +"description": "A filtering expression to specify restrictions on returned metrics. The expression is a sequence of terms. Each term applies a restriction to the returned metrics. Use this expression to restrict results to a specific time range. Currently we expect only one types of fields: * `timestamp`: This can be specified twice, once with a less than operator and once with a greater than operator. The `timestamp` restriction should result in one, contiguous, valid, `timestamp` range. Some examples of valid filters expressions: * Example 1: `timestamp > \"2012-04-23T18:25:43.511Z\" timestamp < \"2012-04-23T18:30:43.511Z\"` * Example 2: `timestamp > \"2012-04-23T18:25:43.511Z\"`", +"type": "string" +}, +"outputConfig": { +"$ref": "GoogleCloudRetailV2OutputConfig", +"description": "Required. The output location of the data." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2OutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2ExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2ExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2FulfillmentInfo": { +"description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.", +"id": "GoogleCloudRetailV2FulfillmentInfo", +"properties": { +"placeIds": { +"description": "The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2GcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2GcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2GcsSource": { +"description": "Google Cloud Storage location for input content.", +"id": "GoogleCloudRetailV2GcsSource", +"properties": { +"dataSchema": { +"description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719. Supported values for control imports: * `control` (default): One JSON Control per line. Supported values for catalog attribute imports: * `catalog_attribute` (default): One CSV CatalogAttribute per line.", +"type": "string" +}, +"inputUris": { +"description": "Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB. See [Importing product information](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog) for the expected file format and setup instructions.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2GetDefaultBranchResponse": { +"description": "Response message of CatalogService.GetDefaultBranch.", +"id": "GoogleCloudRetailV2GetDefaultBranchResponse", +"properties": { +"branch": { +"description": "Full resource name of the branch id currently set as default branch.", +"type": "string" +}, +"note": { +"description": "This corresponds to SetDefaultBranchRequest.note field, when this branch was set as default.", +"type": "string" +}, +"setTime": { +"description": "The time when this branch is set to default.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Image": { +"description": "Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.", +"id": "GoogleCloudRetailV2Image", +"properties": { +"height": { +"description": "Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", +"type": "string" +}, +"width": { +"description": "Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportCompletionDataRequest": { +"description": "Request message for ImportCompletionData methods.", +"id": "GoogleCloudRetailV2ImportCompletionDataRequest", +"properties": { +"inputConfig": { +"$ref": "GoogleCloudRetailV2CompletionDataInputConfig", +"description": "Required. The desired input location of the data." +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2ImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2ImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2ImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportProductsRequest": { +"description": "Request message for Import methods.", +"id": "GoogleCloudRetailV2ImportProductsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "The desired location of errors incurred during the Import." +}, +"inputConfig": { +"$ref": "GoogleCloudRetailV2ProductInputConfig", +"description": "Required. The desired input location of the data." +}, +"notificationPubsubTopic": { +"description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that both `cloud-retail-customer-data-access@system.gserviceaccount.com` and `service-@gcp-sa-retail.iam.gserviceaccount.com` have the `pubsub.topics.publish` IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", +"type": "string" +}, +"reconciliationMode": { +"description": "The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.", +"enum": [ +"RECONCILIATION_MODE_UNSPECIFIED", +"INCREMENTAL", +"FULL" +], +"enumDescriptions": [ +"Defaults to INCREMENTAL.", +"Inserts new products or updates existing products.", +"Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location." +], +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field has no effect.", +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided imported `products` to update. If not set, all fields are updated. If provided, only the existing product fields are updated. Missing products will not be created.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportUserEventsRequest": { +"description": "Request message for the ImportUserEvents request.", +"id": "GoogleCloudRetailV2ImportUserEventsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "The desired location of errors incurred during the Import. Cannot be set for inline user event imports." +}, +"inputConfig": { +"$ref": "GoogleCloudRetailV2UserEventInputConfig", +"description": "Required. The desired input location of the data." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2UserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Interval": { +"description": "A floating point interval.", +"id": "GoogleCloudRetailV2Interval", +"properties": { +"exclusiveMaximum": { +"description": "Exclusive upper bound.", +"format": "double", +"type": "number" +}, +"exclusiveMinimum": { +"description": "Exclusive lower bound.", +"format": "double", +"type": "number" +}, +"maximum": { +"description": "Inclusive upper bound.", +"format": "double", +"type": "number" +}, +"minimum": { +"description": "Inclusive lower bound.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ListCatalogsResponse": { +"description": "Response for CatalogService.ListCatalogs method.", +"id": "GoogleCloudRetailV2ListCatalogsResponse", +"properties": { +"catalogs": { +"description": "All the customer's Catalogs.", +"items": { +"$ref": "GoogleCloudRetailV2Catalog" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be sent as ListCatalogsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ListControlsResponse": { +"description": "Response for ListControls method.", +"id": "GoogleCloudRetailV2ListControlsResponse", +"properties": { +"controls": { +"description": "All the Controls for a given catalog.", +"items": { +"$ref": "GoogleCloudRetailV2Control" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ListModelsResponse": { +"description": "Response to a ListModelRequest.", +"id": "GoogleCloudRetailV2ListModelsResponse", +"properties": { +"models": { +"description": "List of Models.", +"items": { +"$ref": "GoogleCloudRetailV2Model" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ListProductsResponse": { +"description": "Response message for ProductService.ListProducts method.", +"id": "GoogleCloudRetailV2ListProductsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"products": { +"description": "The Products.", +"items": { +"$ref": "GoogleCloudRetailV2Product" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ListServingConfigsResponse": { +"description": "Response for ListServingConfigs method.", +"id": "GoogleCloudRetailV2ListServingConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +}, +"servingConfigs": { +"description": "All the ServingConfigs for a given catalog.", +"items": { +"$ref": "GoogleCloudRetailV2ServingConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2LocalInventory": { +"description": "The inventory information at a place (e.g. a store) identified by a place ID.", +"id": "GoogleCloudRetailV2LocalInventory", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2CustomAttribute" +}, +"description": "Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.", +"type": "object" +}, +"fulfillmentTypes": { +"description": "Input only. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"placeId": { +"description": "The place ID for the current set of inventory information.", +"type": "string" +}, +"priceInfo": { +"$ref": "GoogleCloudRetailV2PriceInfo", +"description": "Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371)." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Model": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2Model", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2ModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2ModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2ModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2ModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2OutputConfig": { +"description": "The output configuration setting.", +"id": "GoogleCloudRetailV2OutputConfig", +"properties": { +"bigqueryDestination": { +"$ref": "GoogleCloudRetailV2OutputConfigBigQueryDestination", +"description": "The BigQuery location where the output is to be written to." +}, +"gcsDestination": { +"$ref": "GoogleCloudRetailV2OutputConfigGcsDestination", +"description": "The Google Cloud Storage location where the output is to be written to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2OutputConfigBigQueryDestination": { +"description": "The BigQuery output destination configuration.", +"id": "GoogleCloudRetailV2OutputConfigBigQueryDestination", +"properties": { +"datasetId": { +"description": "Required. The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableIdPrefix": { +"description": "Required. The prefix of exported BigQuery tables.", +"type": "string" +}, +"tableType": { +"description": "Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2OutputConfigGcsDestination": { +"description": "The Google Cloud Storage output destination configuration.", +"id": "GoogleCloudRetailV2OutputConfigGcsDestination", +"properties": { +"outputUriPrefix": { +"description": "Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2OutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2OutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2BigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2GcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PauseModelRequest": { +"description": "Request for pausing training of a model.", +"id": "GoogleCloudRetailV2PauseModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2PredictRequest": { +"description": "Request message for Predict method.", +"id": "GoogleCloudRetailV2PredictRequest", +"properties": { +"filter": { +"description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return *no* results. If instead you want empty result sets to return generic (unfiltered) popular products, set `strictFiltering` to False in `PredictRequest.params`. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\")) For more information, see [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs).", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", +"type": "object" +}, +"pageSize": { +"description": "Maximum number of results to return. Set this property to the number of prediction results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"deprecated": true, +"description": "This field is not used; leave it unset.", +"type": "string" +}, +"params": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of a product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", +"type": "object" +}, +"userEvent": { +"$ref": "GoogleCloudRetailV2UserEvent", +"description": "Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.visitor_id or UserInfo.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.visitor_id to a random unique ID and leave UserInfo.user_id unset." +}, +"validateOnly": { +"description": "Use validate only mode for this prediction query. If set to true, a dummy model will be used that returns arbitrary products. Note that the validate only mode should only be used for testing the API, or if the model is not ready.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PredictResponse": { +"description": "Response message for predict method.", +"id": "GoogleCloudRetailV2PredictResponse", +"properties": { +"attributionToken": { +"description": "A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", +"type": "string" +}, +"missingIds": { +"description": "IDs of products in the request that were missing from the inventory.", +"items": { +"type": "string" +}, +"type": "array" +}, +"results": { +"description": "A list of recommended products. The order represents the ranking (from the most relevant product to the least).", +"items": { +"$ref": "GoogleCloudRetailV2PredictResponsePredictionResult" +}, +"type": "array" +}, +"validateOnly": { +"description": "True if the validateOnly property was set in the request.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PredictResponsePredictionResult": { +"description": "PredictionResult represents the recommendation prediction results.", +"id": "GoogleCloudRetailV2PredictResponsePredictionResult", +"properties": { +"id": { +"description": "ID of the recommended product", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional product metadata / annotations. Possible values: * `product`: JSON representation of the product. Is set if `returnProduct` is set to true in `PredictRequest.params`. * `score`: Prediction score in double value. Is set if `returnScore` is set to true in `PredictRequest.params`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PriceInfo": { +"description": "The price information of a Product.", +"id": "GoogleCloudRetailV2PriceInfo", +"properties": { +"cost": { +"description": "The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).", +"format": "float", +"type": "number" +}, +"currencyCode": { +"description": "The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.", +"type": "string" +}, +"originalPrice": { +"description": "Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.", +"format": "float", +"type": "number" +}, +"price": { +"description": "Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).", +"format": "float", +"type": "number" +}, +"priceEffectiveTime": { +"description": "The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.", +"format": "google-datetime", +"type": "string" +}, +"priceExpireTime": { +"description": "The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.", +"format": "google-datetime", +"type": "string" +}, +"priceRange": { +"$ref": "GoogleCloudRetailV2PriceInfoPriceRange", +"description": "Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PriceInfoPriceRange": { +"description": "The price range of all variant Product having the same Product.primary_product_id.", +"id": "GoogleCloudRetailV2PriceInfoPriceRange", +"properties": { +"originalPrice": { +"$ref": "GoogleCloudRetailV2Interval", +"description": "The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id." +}, +"price": { +"$ref": "GoogleCloudRetailV2Interval", +"description": "The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Product": { +"description": "Product captures all metadata information of items to be recommended or searched.", +"id": "GoogleCloudRetailV2Product", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2CustomAttribute" +}, +"description": "Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ \"vendor\": {\"text\": [\"vendor123\", \"vendor456\"]}, \"lengths_cm\": {\"numbers\":[2.3, 15.4]}, \"heights_cm\": {\"numbers\":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.", +"type": "object" +}, +"audience": { +"$ref": "GoogleCloudRetailV2Audience", +"description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." +}, +"availability": { +"description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", +"enum": [ +"AVAILABILITY_UNSPECIFIED", +"IN_STOCK", +"OUT_OF_STOCK", +"PREORDER", +"BACKORDER" +], +"enumDescriptions": [ +"Default product availability. Default to Availability.IN_STOCK if unset.", +"Product in stock.", +"Product out of stock.", +"Product that is in pre-order state.", +"Product that is back-ordered (i.e. temporarily out of stock)." +], +"type": "string" +}, +"availableQuantity": { +"description": "The available quantity of the item.", +"format": "int32", +"type": "integer" +}, +"availableTime": { +"description": "The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.", +"format": "google-datetime", +"type": "string" +}, +"brands": { +"description": "The brands of the product. A maximum of 30 brands are allowed unless overridden through the Google Cloud console. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).", +"items": { +"type": "string" +}, +"type": "array" +}, +"categories": { +"description": "Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both [\"Shoes & Accessories\" -> \"Shoes\"] and [\"Sports & Fitness\" -> \"Athletic Clothing\" -> \"Shoes\"], it could be represented as: \"categories\": [ \"Shoes & Accessories > Shoes\", \"Sports & Fitness > Athletic Clothing > Shoes\" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product unless overridden through the Google Cloud console. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436", +"items": { +"type": "string" +}, +"type": "array" +}, +"collectionMemberIds": { +"description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", +"items": { +"type": "string" +}, +"type": "array" +}, +"colorInfo": { +"$ref": "GoogleCloudRetailV2ColorInfo", +"description": "The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color)." +}, +"conditions": { +"description": "The condition of the product. Strongly encouraged to use the standard values: \"new\", \"refurbished\", \"used\". A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).", +"items": { +"type": "string" +}, +"type": "array" +}, +"description": { +"description": "Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).", +"type": "string" +}, +"expireTime": { +"description": "Note that this field is applied in the following ways: * If the Product is already expired when it is uploaded, this product is not indexed for search. * If the Product is not expired when it is uploaded, only the Type.PRIMARY's and Type.COLLECTION's expireTime is respected, and Type.VARIANT's expireTime is not used. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).", +"format": "google-datetime", +"type": "string" +}, +"fulfillmentInfo": { +"description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"$ref": "GoogleCloudRetailV2FulfillmentInfo" +}, +"type": "array" +}, +"gtin": { +"description": "The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"id": { +"description": "Immutable. Product identifier, which is the final component of name. For example, this field is \"id_1\", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).", +"type": "string" +}, +"images": { +"description": "Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", +"items": { +"$ref": "GoogleCloudRetailV2Image" +}, +"type": "array" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to \"en-US\" if unset.", +"type": "string" +}, +"localInventories": { +"description": "Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.", +"items": { +"$ref": "GoogleCloudRetailV2LocalInventory" +}, +"readOnly": true, +"type": "array" +}, +"materials": { +"description": "The material of the product. For example, \"leather\", \"wooden\". A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"type": "string" +}, +"patterns": { +"description": "The pattern or graphic print of the product. For example, \"striped\", \"polka dot\", \"paisley\". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).", +"items": { +"type": "string" +}, +"type": "array" +}, +"priceInfo": { +"$ref": "GoogleCloudRetailV2PriceInfo", +"description": "Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371)." +}, +"primaryProductId": { +"description": "Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).", +"type": "string" +}, +"promotions": { +"description": "The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.", +"items": { +"$ref": "GoogleCloudRetailV2Promotion" +}, +"type": "array" +}, +"publishTime": { +"description": "The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.", +"format": "google-datetime", +"type": "string" +}, +"rating": { +"$ref": "GoogleCloudRetailV2Rating", +"description": "The rating of this product." +}, +"retrievableFields": { +"deprecated": true, +"description": "Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form \"attributes.key\" where \"key\" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.", +"format": "google-fieldmask", +"type": "string" +}, +"sizes": { +"description": "The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in \"US:MENS:M\", \"US\" represents size system; \"MENS\" represents size type; \"M\" represents size value. In \"GIRLS:27\", size system is empty; \"GIRLS\" represents size type; \"27\" represents size value. In \"32 inches\", both size system and size type are empty, while size value is \"32 inches\". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).", +"items": { +"type": "string" +}, +"type": "array" +}, +"tags": { +"description": "Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0\u20134](https://support.google.com/merchants/answer/6324473).", +"items": { +"type": "string" +}, +"type": "array" +}, +"title": { +"description": "Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).", +"type": "string" +}, +"ttl": { +"description": "Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.", +"format": "google-duration", +"type": "string" +}, +"type": { +"description": "Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.", +"enum": [ +"TYPE_UNSPECIFIED", +"PRIMARY", +"VARIANT", +"COLLECTION" +], +"enumDescriptions": [ +"Default value. Default to Catalog.product_level_config.ingestion_product_type if unset.", +"The primary type. As the primary unit for predicting, indexing and search serving, a Type.PRIMARY Product is grouped with multiple Type.VARIANT Products.", +"The variant type. Type.VARIANT Products usually share some common attributes on the same Type.PRIMARY Products, but they have variant attributes like different colors, sizes and prices, etc.", +"The collection type. Collection products are bundled Type.PRIMARY Products or Type.VARIANT Products that are sold together, such as a jewelry set with necklaces, earrings and rings, etc." +], +"type": "string" +}, +"uri": { +"description": "Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).", +"type": "string" +}, +"variants": { +"description": "Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.", +"items": { +"$ref": "GoogleCloudRetailV2Product" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ProductDetail": { +"description": "Detailed product information associated with a user event.", +"id": "GoogleCloudRetailV2ProductDetail", +"properties": { +"product": { +"$ref": "GoogleCloudRetailV2Product", +"description": "Required. Product information. Required field(s): * Product.id Optional override field(s): * Product.price_info If any supported optional fields are provided, we will treat them as a full override when looking up product information from the catalog. Thus, it is important to ensure that the overriding fields are accurate and complete. All other product fields are ignored and instead populated via catalog lookup after event ingestion." +}, +"quantity": { +"description": "Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for `purchase-complete` event. Required for `add-to-cart` and `purchase-complete` event types.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ProductInlineSource": { +"description": "The inline source for the input config for ImportProducts method.", +"id": "GoogleCloudRetailV2ProductInlineSource", +"properties": { +"products": { +"description": "Required. A list of products to update/create. Each product must have a valid Product.id. Recommended max of 100 items.", +"items": { +"$ref": "GoogleCloudRetailV2Product" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ProductInputConfig": { +"description": "The input config source for products.", +"id": "GoogleCloudRetailV2ProductInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2BigQuerySource", +"description": "BigQuery input source." +}, +"gcsSource": { +"$ref": "GoogleCloudRetailV2GcsSource", +"description": "Google Cloud Storage location for the input content." +}, +"productInlineSource": { +"$ref": "GoogleCloudRetailV2ProductInlineSource", +"description": "The Inline source for the input content for products." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ProductLevelConfig": { +"description": "Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made.", +"id": "GoogleCloudRetailV2ProductLevelConfig", +"properties": { +"ingestionProductType": { +"description": "The type of Products allowed to be ingested into the catalog. Acceptable values are: * `primary` (default): You can ingest Products of all types. When ingesting a Product, its type will default to Product.Type.PRIMARY if unset. * `variant` (incompatible with Retail Search): You can only ingest Product.Type.VARIANT Products. This means Product.primary_product_id cannot be empty. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `variant` and merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error is returned. See [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels) for more details.", +"type": "string" +}, +"merchantCenterProductIdField": { +"description": "Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-center-products-schema) should be imported as Product.id. Acceptable values are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail API will choose one item from the ones with the same `itemGroupId`, and use it to represent the item group. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned. See [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels) for more details.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Promotion": { +"description": "Promotion specification.", +"id": "GoogleCloudRetailV2Promotion", +"properties": { +"promotionId": { +"description": "Promotion identifier, which is the final component of name. For example, this field is \"free_gift\", if name is `projects/*/locations/global/catalogs/default_catalog/promotions/free_gift`. The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property [promotion_id](https://support.google.com/merchants/answer/7050148).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurchaseTransaction": { +"description": "A transaction represents the entire purchase transaction.", +"id": "GoogleCloudRetailV2PurchaseTransaction", +"properties": { +"cost": { +"description": "All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = revenue - tax - cost", +"format": "float", +"type": "number" +}, +"currencyCode": { +"description": "Required. Currency code. Use three-character ISO-4217 code.", +"type": "string" +}, +"id": { +"description": "The transaction ID with a length limit of 128 characters.", +"type": "string" +}, +"revenue": { +"description": "Required. Total non-zero revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations.", +"format": "float", +"type": "number" +}, +"tax": { +"description": "All the taxes associated with the transaction.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2PurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2PurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeProductsRequest": { +"description": "Request message for PurgeProducts method.", +"id": "GoogleCloudRetailV2PurgeProductsRequest", +"properties": { +"filter": { +"description": "Required. The filter string to specify the products to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. \"*\" implies delete all items in a branch. The eligible fields for filtering are: * `availability`: Double quoted Product.availability string. * `create_time` : in ISO 8601 \"zulu\" format. Supported syntax: * Comparators (\">\", \"<\", \">=\", \"<=\", \"=\"). Examples: * create_time <= \"2015-02-13T17:05:46Z\" * availability = \"IN_STOCK\" * Conjunctions (\"AND\") Examples: * create_time <= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\" * Disjunctions (\"OR\") Examples: * create_time <= \"2015-02-13T17:05:46Z\" OR availability = \"IN_STOCK\" * Can support nested queries. Examples: * (create_time <= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\") OR (create_time >= \"2015-02-14T13:03:32Z\" AND availability = \"IN_STOCK\") * Filter Limits: * Filter should not contain more than 6 conditions. * Max nesting depth should not exceed 2 levels. Examples queries: * Delete back order products created before a timestamp. create_time <= \"2015-02-13T17:05:46Z\" OR availability = \"BACKORDER\"", +"type": "string" +}, +"force": { +"description": "Actually perform the purge. If `force` is set to false, the method will return the expected purge count without deleting any products.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2PurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeUserEventsRequest": { +"description": "Request message for PurgeUserEvents method.", +"id": "GoogleCloudRetailV2PurgeUserEventsRequest", +"properties": { +"filter": { +"description": "Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. The eligible fields for filtering are: * `eventType`: Double quoted UserEvent.event_type string. * `eventTime`: in ISO 8601 \"zulu\" format. * `visitorId`: Double quoted string. Specifying this will delete all events associated with a visitor. * `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\"` * Deleting specific eventType in time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventType = \"detail-page-view\"` * Deleting all events for a specific visitor: `visitorId = \"visitor1024\"` The filtering fields are assumed to have an implicit AND.", +"type": "string" +}, +"force": { +"description": "Actually perform the purge. If `force` is set to false, the method will return the expected purge count without deleting any user events.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2PurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Rating": { +"description": "The rating of a Product.", +"id": "GoogleCloudRetailV2Rating", +"properties": { +"averageRating": { +"description": "The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "float", +"type": "number" +}, +"ratingCount": { +"description": "The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"ratingHistogram": { +"description": "List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2RejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RejoinUserEventsRequest": { +"description": "Request message for RejoinUserEvents method.", +"id": "GoogleCloudRetailV2RejoinUserEventsRequest", +"properties": { +"userEventRejoinScope": { +"description": "The type of the user event rejoin to define the scope and range of the user events to be rejoined with the latest product catalog. Defaults to `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to an invalid integer value.", +"enum": [ +"USER_EVENT_REJOIN_SCOPE_UNSPECIFIED", +"JOINED_EVENTS", +"UNJOINED_EVENTS" +], +"enumDescriptions": [ +"Rejoin all events with the latest product catalog, including both joined events and unjoined events.", +"Only rejoin joined events with the latest product catalog.", +"Only rejoin unjoined events with the latest product catalog." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2RejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveCatalogAttributeRequest": { +"description": "Request for CatalogService.RemoveCatalogAttribute method.", +"id": "GoogleCloudRetailV2RemoveCatalogAttributeRequest", +"properties": { +"key": { +"description": "Required. The attribute name key of the CatalogAttribute to remove.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveControlRequest": { +"description": "Request for RemoveControl method.", +"id": "GoogleCloudRetailV2RemoveControlRequest", +"properties": { +"controlId": { +"description": "Required. The id of the control to apply. Assumed to be in the same catalog as the serving config.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveFulfillmentPlacesRequest": { +"description": "Request message for ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2RemoveFulfillmentPlacesRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. The IDs for this type, such as the store IDs for \"pickup-in-store\" or the region IDs for \"same-day-delivery\", to be removed for this type. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"removeTime": { +"description": "The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2RemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2RemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveLocalInventoriesRequest": { +"description": "Request message for ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2RemoveLocalInventoriesRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product is not found, the local inventory removal request will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. A list of place IDs to have their inventory deleted. At most 3000 place IDs are allowed per request.", +"items": { +"type": "string" +}, +"type": "array" +}, +"removeTime": { +"description": "The time when the inventory deletions are issued. Used to prevent out-of-order updates and deletions on local inventory fields. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2RemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2ReplaceCatalogAttributeRequest": { +"description": "Request for CatalogService.ReplaceCatalogAttribute method.", +"id": "GoogleCloudRetailV2ReplaceCatalogAttributeRequest", +"properties": { +"catalogAttribute": { +"$ref": "GoogleCloudRetailV2CatalogAttribute", +"description": "Required. The updated CatalogAttribute." +}, +"updateMask": { +"description": "Indicates which fields in the provided CatalogAttribute to update. The following are NOT supported: * CatalogAttribute.key If not set, all supported fields are updated.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ResumeModelRequest": { +"description": "Request for resuming training of a model.", +"id": "GoogleCloudRetailV2ResumeModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2Rule": { +"description": "A rule is a condition-action pair * A condition defines when a rule is to be triggered. * An action specifies what occurs on that trigger. Currently rules only work for controls with SOLUTION_TYPE_SEARCH.", +"id": "GoogleCloudRetailV2Rule", +"properties": { +"boostAction": { +"$ref": "GoogleCloudRetailV2RuleBoostAction", +"description": "A boost action." +}, +"condition": { +"$ref": "GoogleCloudRetailV2Condition", +"description": "Required. The condition that triggers the rule. If the condition is empty, the rule will always apply." +}, +"doNotAssociateAction": { +"$ref": "GoogleCloudRetailV2RuleDoNotAssociateAction", +"description": "Prevents term from being associated with other terms." +}, +"filterAction": { +"$ref": "GoogleCloudRetailV2RuleFilterAction", +"description": "Filters results." +}, +"forceReturnFacetAction": { +"$ref": "GoogleCloudRetailV2RuleForceReturnFacetAction", +"description": "Force returns an attribute as a facet in the request." +}, +"ignoreAction": { +"$ref": "GoogleCloudRetailV2RuleIgnoreAction", +"description": "Ignores specific terms from query during search." +}, +"onewaySynonymsAction": { +"$ref": "GoogleCloudRetailV2RuleOnewaySynonymsAction", +"description": "Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term." +}, +"redirectAction": { +"$ref": "GoogleCloudRetailV2RuleRedirectAction", +"description": "Redirects a shopper to a specific page." +}, +"removeFacetAction": { +"$ref": "GoogleCloudRetailV2RuleRemoveFacetAction", +"description": "Remove an attribute as a facet in the request (if present)." +}, +"replacementAction": { +"$ref": "GoogleCloudRetailV2RuleReplacementAction", +"description": "Replaces specific terms in the query." +}, +"twowaySynonymsAction": { +"$ref": "GoogleCloudRetailV2RuleTwowaySynonymsAction", +"description": "Treats a set of terms as synonyms of one another." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleBoostAction": { +"description": "A boost action to apply to results matching condition specified above.", +"id": "GoogleCloudRetailV2RuleBoostAction", +"properties": { +"boost": { +"description": "Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.", +"format": "float", +"type": "number" +}, +"productsFilter": { +"description": "The filter can have a max size of 5000 characters. An expression which specifies which products to apply an action to. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": *(id: ANY(\"product_1\", \"product_2\")) * *AND * *(colorFamilies: ANY(\"Red\", \"Blue\")) *", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleDoNotAssociateAction": { +"description": "Prevents `query_term` from being associated with specified terms during search. Example: Don't associate \"gShoe\" and \"cheap\".", +"id": "GoogleCloudRetailV2RuleDoNotAssociateAction", +"properties": { +"doNotAssociateTerms": { +"description": "Cannot contain duplicates or the query term. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "Terms from the search query. Will not consider do_not_associate_terms for search if in search query. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"terms": { +"description": "Will be [deprecated = true] post migration;", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleFilterAction": { +"description": "* Rule Condition: - No Condition.query_terms provided is a global match. - 1 or more Condition.query_terms provided are combined with OR operator. * Action Input: The request query and filter that are applied to the retrieved products, in addition to any filters already provided with the SearchRequest. The AND operator is used to combine the query's existing filters with the filter rule(s). NOTE: May result in 0 results when filters conflict. * Action Result: Filters the returned objects to be ONLY those that passed the filter.", +"id": "GoogleCloudRetailV2RuleFilterAction", +"properties": { +"filter": { +"description": "A filter to apply on the matching condition results. Supported features: * filter must be set. * Filter syntax is identical to SearchRequest.filter. For more information, see [Filter](/retail/docs/filter-and-order#filter). * To filter products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": *(id: ANY(\"product_1\", \"product_2\")) * *AND * *(colorFamilies: ANY(\"Red\", \"Blue\")) *", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleForceReturnFacetAction": { +"description": "Force returns an attribute/facet in the request around a certain position or above. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Inputs: attribute name, position * Action Result: Will force return a facet key around a certain position or above if the condition is satisfied. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\", the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is \"size\" and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two cases: a) The facet key \"size\" is not already in the top 8 slots, then the facet \"size\" will appear at a position close to 8. b) The facet key \"size\" in among the top 8 positions in the request, then it will stay at its current rank.", +"id": "GoogleCloudRetailV2RuleForceReturnFacetAction", +"properties": { +"facetPositionAdjustments": { +"description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", +"items": { +"$ref": "GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment": { +"description": "Each facet position adjustment consists of a single attribute name (i.e. facet key) along with a specified position.", +"id": "GoogleCloudRetailV2RuleForceReturnFacetActionFacetPositionAdjustment", +"properties": { +"attributeName": { +"description": "The attribute name to force return as a facet. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters long.", +"type": "string" +}, +"position": { +"description": "This is the position in the request as explained above. It should be strictly positive be at most 100.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleIgnoreAction": { +"description": "Prevents a term in the query from being used in search. Example: Don't search for \"shoddy\".", +"id": "GoogleCloudRetailV2RuleIgnoreAction", +"properties": { +"ignoreTerms": { +"description": "Terms to ignore in the search query.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleOnewaySynonymsAction": { +"description": "Maps a set of terms to a set of synonyms. Set of synonyms will be treated as synonyms of each query term only. `query_terms` will not be treated as synonyms of each other. Example: \"sneakers\" will use a synonym of \"shoes\". \"shoes\" will not use a synonym of \"sneakers\".", +"id": "GoogleCloudRetailV2RuleOnewaySynonymsAction", +"properties": { +"onewayTerms": { +"description": "Will be [deprecated = true] post migration;", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"synonyms": { +"description": "Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleRedirectAction": { +"description": "Redirects a shopper to a specific page. * Rule Condition: Must specify Condition.query_terms. * Action Input: Request Query * Action Result: Redirects shopper to provided uri.", +"id": "GoogleCloudRetailV2RuleRedirectAction", +"properties": { +"redirectUri": { +"description": "URL must have length equal or less than 2000 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleRemoveFacetAction": { +"description": "Removes an attribute/facet in the request if is present. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Input: attribute name * Action Result: Will remove the attribute (as a facet) from the request if it is present. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\" and the attribute name \"size\", then facet key \"size\" will be removed from the request (if it is present).", +"id": "GoogleCloudRetailV2RuleRemoveFacetAction", +"properties": { +"attributeNames": { +"description": "The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleReplacementAction": { +"description": "Replaces a term in the query. Multiple replacement candidates can be specified. All `query_terms` will be replaced with the replacement term. Example: Replace \"gShoe\" with \"google shoe\".", +"id": "GoogleCloudRetailV2RuleReplacementAction", +"properties": { +"queryTerms": { +"description": "Terms from the search query. Will be replaced by replacement term. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replacementTerm": { +"description": "Term that will be used for replacement.", +"type": "string" +}, +"term": { +"description": "Will be [deprecated = true] post migration;", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RuleTwowaySynonymsAction": { +"description": "Creates a set of terms that will be treated as synonyms of each other. Example: synonyms of \"sneakers\" and \"shoes\": * \"sneakers\" will use a synonym of \"shoes\". * \"shoes\" will use a synonym of \"sneakers\".", +"id": "GoogleCloudRetailV2RuleTwowaySynonymsAction", +"properties": { +"synonyms": { +"description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequest": { +"description": "Request message for SearchService.Search method.", +"id": "GoogleCloudRetailV2SearchRequest", +"properties": { +"boostSpec": { +"$ref": "GoogleCloudRetailV2SearchRequestBoostSpec", +"description": "Boost specification to boost certain products. For more information, see [Boost results](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions." +}, +"branch": { +"description": "The branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use \"default_branch\" as the branch ID or leave this field empty, to search products under the default branch.", +"type": "string" +}, +"canonicalFilter": { +"description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", +"type": "string" +}, +"dynamicFacetSpec": { +"$ref": "GoogleCloudRetailV2SearchRequestDynamicFacetSpec", +"deprecated": true, +"description": "Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated." +}, +"entity": { +"description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.", +"type": "string" +}, +"facetSpecs": { +"description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"$ref": "GoogleCloudRetailV2SearchRequestFacetSpec" +}, +"type": "array" +}, +"filter": { +"description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. Filter expression is case-sensitive. For more information, see [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). If this field is unrecognizable, an INVALID_ARGUMENT is returned.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. For more information, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) in the Resource Manager documentation.", +"type": "object" +}, +"offset": { +"description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Products deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +}, +"orderBy": { +"description": "The order in which products are returned. Products can be ordered by a field in an Product object. Leave it unset if ordered by relevance. OrderBy expression is case-sensitive. For more information, see [Order](https://cloud.google.com/retail/docs/filter-and-order#order). If this field is unrecognizable, an INVALID_ARGUMENT is returned.", +"type": "string" +}, +"pageCategories": { +"description": "The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategories\" : [\"Sales > 2017 Black Friday Deals\"].", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum number of Products to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 120. Values above 120 will be coerced to 120. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token SearchResponse.next_page_token, received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"personalizationSpec": { +"$ref": "GoogleCloudRetailV2SearchRequestPersonalizationSpec", +"description": "The specification for personalization. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec." +}, +"query": { +"description": "Raw search query. If this field is empty, the request is considered a category browsing request and returned results are based on filter and page_categories.", +"type": "string" +}, +"queryExpansionSpec": { +"$ref": "GoogleCloudRetailV2SearchRequestQueryExpansionSpec", +"description": "The query expansion specification that specifies the conditions under which query expansion occurs. For more information, see [Query expansion](https://cloud.google.com/retail/docs/result-size#query_expansion)." +}, +"searchMode": { +"description": "The search mode of the search request. If not specified, a single search request triggers both product search and faceted search.", +"enum": [ +"SEARCH_MODE_UNSPECIFIED", +"PRODUCT_SEARCH_ONLY", +"FACETED_SEARCH_ONLY" +], +"enumDescriptions": [ +"Default value. In this case both product search and faceted search will be performed. Both SearchResponse.SearchResult and SearchResponse.Facet will be returned.", +"Only product search will be performed. The faceted search will be disabled. Only SearchResponse.SearchResult will be returned. SearchResponse.Facet will not be returned, even if SearchRequest.facet_specs or SearchRequest.dynamic_facet_spec is set.", +"Only faceted search will be performed. The product search will be disabled. When in this mode, one or both of SearchRequest.facet_specs and SearchRequest.dynamic_facet_spec should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only SearchResponse.Facet will be returned. SearchResponse.SearchResult will not be returned." +], +"type": "string" +}, +"spellCorrectionSpec": { +"$ref": "GoogleCloudRetailV2SearchRequestSpellCorrectionSpec", +"description": "The spell correction specification that specifies the mode under which spell correction will take effect." +}, +"userInfo": { +"$ref": "GoogleCloudRetailV2UserInfo", +"description": "User information." +}, +"variantRollupKeys": { +"description": "The keys to fetch and rollup the matching variant Products attributes, FulfillmentInfo or LocalInventorys attributes. The attributes from all the matching variant Products or LocalInventorys are merged and de-duplicated. Notice that rollup attributes will lead to extra query latency. Maximum number of keys is 30. For FulfillmentInfo, a fulfillment type and a fulfillment ID must be provided in the format of \"fulfillmentType.fulfillmentId\". E.g., in \"pickupInStore.store123\", \"pickupInStore\" is fulfillment type and \"store123\" is the store ID. Supported keys are: * colorFamilies * price * originalPrice * discount * variantId * inventory(place_id,price) * inventory(place_id,original_price) * inventory(place_id,attributes.key), where key is any key in the Product.local_inventories.attributes map. * attributes.key, where key is any key in the Product.attributes map. * pickupInStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"pickup-in-store\". * shipToStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"ship-to-store\". * sameDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"same-day-delivery\". * nextDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"next-day-delivery\". * customFulfillment1.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-1\". * customFulfillment2.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-2\". * customFulfillment3.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-3\". * customFulfillment4.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-4\". * customFulfillment5.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-5\". If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"visitorId": { +"description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This should be the same identifier as UserEvent.visitor_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestBoostSpec": { +"description": "Boost specification to boost certain items.", +"id": "GoogleCloudRetailV2SearchRequestBoostSpec", +"properties": { +"conditionBoostSpecs": { +"description": "Condition boost specifications. If a product matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", +"items": { +"$ref": "GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec" +}, +"type": "array" +}, +"skipBoostSpecValidation": { +"description": "Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec": { +"description": "Boost applies to products which match a condition.", +"id": "GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec", +"properties": { +"boost": { +"description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.", +"format": "float", +"type": "number" +}, +"condition": { +"description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": * (id: ANY(\"product_1\", \"product_2\")) AND (colorFamilies: ANY(\"Red\",\"Blue\"))", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestDynamicFacetSpec": { +"description": "The specifications of dynamically generated facets.", +"id": "GoogleCloudRetailV2SearchRequestDynamicFacetSpec", +"properties": { +"mode": { +"description": "Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it's unset.", +"enum": [ +"MODE_UNSPECIFIED", +"DISABLED", +"ENABLED" +], +"enumDescriptions": [ +"Default value.", +"Disable Dynamic Facet.", +"Automatic mode built by Google Retail Search." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestFacetSpec": { +"description": "A facet specification to perform faceted search.", +"id": "GoogleCloudRetailV2SearchRequestFacetSpec", +"properties": { +"enableDynamicPosition": { +"description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined by Google Retail Search. It is ordered together with dynamic facets if dynamic facets is enabled. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined by Google Retail Search. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enable, which generates a facet \"gender\". Then, the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how Google Retail Search orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position values are false.", +"type": "boolean" +}, +"excludedFilterKeys": { +"description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 products with the color facet \"Red\" and 200 products with the color facet \"Blue\". A query containing the filter \"colorFamilies:ANY(\"Red\")\" and having \"colorFamilies\" as FacetKey.key would by default return only \"Red\" products in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue products available, \"Blue\" would not be shown as an available facet value. If \"colorFamilies\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"colorFamilies\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" products. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"facetKey": { +"$ref": "GoogleCloudRetailV2SearchRequestFacetSpecFacetKey", +"description": "Required. The facet key specification." +}, +"limit": { +"description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 50. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestFacetSpecFacetKey": { +"description": "Specifies how a facet is computed.", +"id": "GoogleCloudRetailV2SearchRequestFacetSpecFacetKey", +"properties": { +"caseInsensitive": { +"description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", +"type": "boolean" +}, +"contains": { +"description": "Only get facet values that contains the given strings. For example, suppose \"categories\" has three values \"Women > Shoe\", \"Women > Dress\" and \"Men > Shoe\". If set \"contains\" to \"Shoe\", the \"categories\" facet gives only \"Women > Shoe\" and \"Men > Shoe\". Only supported on textual fields. Maximum is 10.", +"items": { +"type": "string" +}, +"type": "array" +}, +"intervals": { +"description": "Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.", +"items": { +"$ref": "GoogleCloudRetailV2Interval" +}, +"type": "array" +}, +"key": { +"description": "Required. Supported textual and numerical facet keys in Product object, over which the facet values are computed. Facet key is case-sensitive. Allowed facet keys when FacetKey.query is not specified: * textual_field = * \"brands\" * \"categories\" * \"genders\" * \"ageGroups\" * \"availability\" * \"colorFamilies\" * \"colors\" * \"sizes\" * \"materials\" * \"patterns\" * \"conditions\" * \"attributes.key\" * \"pickupInStore\" * \"shipToStore\" * \"sameDayDelivery\" * \"nextDayDelivery\" * \"customFulfillment1\" * \"customFulfillment2\" * \"customFulfillment3\" * \"customFulfillment4\" * \"customFulfillment5\" * \"inventory(place_id,attributes.key)\" * numerical_field = * \"price\" * \"discount\" * \"rating\" * \"ratingCount\" * \"attributes.key\" * \"inventory(place_id,price)\" * \"inventory(place_id,original_price)\" * \"inventory(place_id,attributes.key)\"", +"type": "string" +}, +"orderBy": { +"description": "The order in which SearchResponse.Facet.values are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals; FulfillmentInfo.place_ids are sorted in the order given by FacetSpec.FacetKey.restricted_values.", +"type": "string" +}, +"prefixes": { +"description": "Only get facet values that start with the given string prefix. For example, suppose \"categories\" has three values \"Women > Shoe\", \"Women > Dress\" and \"Men > Shoe\". If set \"prefixes\" to \"Women\", the \"categories\" facet gives only \"Women > Shoe\" and \"Women > Dress\". Only supported on textual fields. Maximum is 10.", +"items": { +"type": "string" +}, +"type": "array" +}, +"query": { +"description": "The query that is used to compute facet for the given facet key. When provided, it overrides the default behavior of facet computation. The query syntax is the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Notice that there is no limitation on FacetKey.key when query is specified. In the response, SearchResponse.Facet.values.value is always \"1\" and SearchResponse.Facet.values.count is the number of results that match the query. For example, you can set a customized facet for \"shipToStore\", where FacetKey.key is \"customizedShipToStore\", and FacetKey.query is \"availability: ANY(\\\"IN_STOCK\\\") AND shipToStore: ANY(\\\"123\\\")\". Then the facet counts the products that are both in stock and ship to store \"123\".", +"type": "string" +}, +"restrictedValues": { +"description": "Only get facet for the given restricted values. For example, when using \"pickupInStore\" as key and set restricted values to [\"store123\", \"store456\"], only facets for \"store123\" and \"store456\" are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5", +"items": { +"type": "string" +}, +"type": "array" +}, +"returnMinMax": { +"description": "Returns the min and max value for each numerical facet intervals. Ignored for textual facets.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestPersonalizationSpec": { +"description": "The specification for personalization.", +"id": "GoogleCloudRetailV2SearchRequestPersonalizationSpec", +"properties": { +"mode": { +"description": "Defaults to Mode.AUTO.", +"enum": [ +"MODE_UNSPECIFIED", +"AUTO", +"DISABLED" +], +"enumDescriptions": [ +"Default value. In this case, server behavior defaults to Mode.AUTO.", +"Let CRS decide whether to use personalization based on quality of user event data.", +"Disable personalization." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestQueryExpansionSpec": { +"description": "Specification to determine under which conditions query expansion should occur.", +"id": "GoogleCloudRetailV2SearchRequestQueryExpansionSpec", +"properties": { +"condition": { +"description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", +"enum": [ +"CONDITION_UNSPECIFIED", +"DISABLED", +"AUTO" +], +"enumDescriptions": [ +"Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", +"Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", +"Automatic query expansion built by Google Retail Search." +], +"type": "string" +}, +"pinUnexpandedResults": { +"description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchRequestSpellCorrectionSpec": { +"description": "The specification for query spell correction.", +"id": "GoogleCloudRetailV2SearchRequestSpellCorrectionSpec", +"properties": { +"mode": { +"description": "The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO.", +"enum": [ +"MODE_UNSPECIFIED", +"SUGGESTION_ONLY", +"AUTO" +], +"enumDescriptions": [ +"Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", +"Google Retail Search will try to find a spell suggestion if there is any and put in the SearchResponse.corrected_query. The spell suggestion will not be used as the search query.", +"Automatic spell correction built by Google Retail Search. Search will be based on the corrected query if found." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchResponse": { +"description": "Response message for SearchService.Search method.", +"id": "GoogleCloudRetailV2SearchResponse", +"properties": { +"appliedControls": { +"description": "The fully qualified resource name of applied [controls](https://cloud.google.com/retail/docs/serving-control-rules).", +"items": { +"type": "string" +}, +"type": "array" +}, +"attributionToken": { +"description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", +"type": "string" +}, +"correctedQuery": { +"description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", +"type": "string" +}, +"experimentInfo": { +"description": "Metadata related to A/B testing Experiment associated with this response. Only exists when an experiment is triggered.", +"items": { +"$ref": "GoogleCloudRetailV2ExperimentInfo" +}, +"type": "array" +}, +"facets": { +"description": "Results of facets requested by user.", +"items": { +"$ref": "GoogleCloudRetailV2SearchResponseFacet" +}, +"type": "array" +}, +"invalidConditionBoostSpecs": { +"description": "The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.", +"items": { +"$ref": "GoogleCloudRetailV2SearchRequestBoostSpecConditionBoostSpec" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"queryExpansionInfo": { +"$ref": "GoogleCloudRetailV2SearchResponseQueryExpansionInfo", +"description": "Query expansion information for the returned results." +}, +"redirectUri": { +"description": "The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.", +"type": "string" +}, +"results": { +"description": "A list of matched items. The order represents the ranking.", +"items": { +"$ref": "GoogleCloudRetailV2SearchResponseSearchResult" +}, +"type": "array" +}, +"totalSize": { +"description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchResponseFacet": { +"description": "A facet result.", +"id": "GoogleCloudRetailV2SearchResponseFacet", +"properties": { +"dynamicFacet": { +"description": "Whether the facet is dynamically generated.", +"type": "boolean" +}, +"key": { +"description": "The key for this facet. E.g., \"colorFamilies\" or \"price\" or \"attributes.attr1\".", +"type": "string" +}, +"values": { +"description": "The facet values for this field.", +"items": { +"$ref": "GoogleCloudRetailV2SearchResponseFacetFacetValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchResponseFacetFacetValue": { +"description": "A facet value which contains value names and their count.", +"id": "GoogleCloudRetailV2SearchResponseFacetFacetValue", +"properties": { +"count": { +"description": "Number of items that have this facet value.", +"format": "int64", +"type": "string" +}, +"interval": { +"$ref": "GoogleCloudRetailV2Interval", +"description": "Interval value for a facet, such as [10, 20) for facet \"price\"." +}, +"maxValue": { +"description": "The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", +"format": "double", +"type": "number" +}, +"minValue": { +"description": "The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", +"format": "double", +"type": "number" +}, +"value": { +"description": "Text value of a facet, such as \"Black\" for facet \"colorFamilies\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchResponseQueryExpansionInfo": { +"description": "Information describing query expansion including whether expansion has occurred.", +"id": "GoogleCloudRetailV2SearchResponseQueryExpansionInfo", +"properties": { +"expandedQuery": { +"description": "Bool describing whether query expansion has occurred.", +"type": "boolean" +}, +"pinnedResultCount": { +"description": "Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SearchResponseSearchResult": { +"description": "Represents the search results.", +"id": "GoogleCloudRetailV2SearchResponseSearchResult", +"properties": { +"id": { +"description": "Product.id of the searched Product.", +"type": "string" +}, +"matchingVariantCount": { +"description": "The count of matched variant Products.", +"format": "int32", +"type": "integer" +}, +"matchingVariantFields": { +"additionalProperties": { +"format": "google-fieldmask", +"type": "string" +}, +"description": "If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key \"sku1\" with field mask \"products.color_info\" indicates there is a match between \"sku1\" ColorInfo and the query.", +"type": "object" +}, +"personalLabels": { +"description": "Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set only when SearchRequest.PersonalizationSpec.mode is SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`: Indicates that this product has been purchased before.", +"items": { +"type": "string" +}, +"type": "array" +}, +"product": { +"$ref": "GoogleCloudRetailV2Product", +"description": "The product data snippet in the search response. Only Product.name is guaranteed to be populated. Product.variants contains the product variants that match the search query. If there are multiple product variants matching the query, top 5 most relevant product variants are returned and ordered by relevancy. If relevancy can be deternmined, use matching_variant_fields to look up matched product variants fields. If relevancy cannot be determined, e.g. when searching \"shoe\" all products in a shoe product can be a match, 5 product variants are returned but order is meaningless." +}, +"variantRollupValues": { +"additionalProperties": { +"type": "any" +}, +"description": "The rollup matching variant Product attributes. The key is one of the SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated Product attributes. Notice that the rollup values are respect filter. For example, when filtering by \"colorFamilies:ANY(\\\"red\\\")\" and rollup \"colorFamilies\", only \"red\" is returned. For textual and numerical attributes, the rollup values is a list of string or double values with type google.protobuf.ListValue. For example, if there are two variants with colors \"red\" and \"blue\", the rollup values are { key: \"colorFamilies\" value { list_value { values { string_value: \"red\" } values { string_value: \"blue\" } } } } For FulfillmentInfo, the rollup values is a double value with type google.protobuf.Value. For example, `{key: \"pickupInStore.store1\" value { number_value: 10 }}` means a there are 10 variants in this product are available in the store \"store1\".", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ServingConfig": { +"description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).", +"id": "GoogleCloudRetailV2ServingConfig", +"properties": { +"boostControlIds": { +"description": "Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Required. The human readable serving config display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"diversityLevel": { +"description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"diversityType": { +"description": "What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to RULE_BASED_DIVERSITY.", +"enum": [ +"DIVERSITY_TYPE_UNSPECIFIED", +"RULE_BASED_DIVERSITY", +"DATA_DRIVEN_DIVERSITY" +], +"enumDescriptions": [ +"Default value.", +"Rule based diversity.", +"Data driven diversity." +], +"type": "string" +}, +"doNotAssociateControlIds": { +"description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dynamicFacetSpec": { +"$ref": "GoogleCloudRetailV2SearchRequestDynamicFacetSpec", +"description": "The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH." +}, +"enableCategoryFilterLevel": { +"description": "Whether to add additional category filters on the `similar-items` model. If not specified, we enable it by default. Allowed values are: * `no-category-match`: No additional filtering of original results from the model and the customer's filters. * `relaxed-category-match`: Only keep results with categories that match at least one item categories in the PredictRequests's context item. * If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"facetControlIds": { +"description": "Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filterControlIds": { +"description": "Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoreControlIds": { +"description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoreRecsDenylist": { +"description": "When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.", +"type": "boolean" +}, +"modelId": { +"description": "The id of the model in the same Catalog to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/servingConfig/*`", +"type": "string" +}, +"onewaySynonymsControlIds": { +"description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"personalizationSpec": { +"$ref": "GoogleCloudRetailV2SearchRequestPersonalizationSpec", +"description": "The specification for personalization spec. Can only be set if solution_types is SOLUTION_TYPE_SEARCH. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec." +}, +"priceRerankingLevel": { +"description": "How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are: * `no-price-reranking` * `low-price-reranking` * `medium-price-reranking` * `high-price-reranking` If not specified, we choose default based on model type. Default value: `no-price-reranking`. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"redirectControlIds": { +"description": "Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replacementControlIds": { +"description": "Condition replacement specifications. - Applied according to the order in the list. - A previously replaced term can not be re-replaced. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"solutionTypes": { +"description": "Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"type": "array" +}, +"twowaySynonymsControlIds": { +"description": "Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SetDefaultBranchRequest": { +"description": "Request message to set a specified branch as new default_branch.", +"id": "GoogleCloudRetailV2SetDefaultBranchRequest", +"properties": { +"branchId": { +"description": "The final component of the resource name of a branch. This field must be one of \"0\", \"1\" or \"2\". Otherwise, an INVALID_ARGUMENT error is returned. If there are no sufficient active products in the targeted branch and force is not set, a FAILED_PRECONDITION error is returned.", +"type": "string" +}, +"force": { +"description": "If set to true, it permits switching to a branch with branch_id even if it has no sufficient active products.", +"type": "boolean" +}, +"note": { +"description": "Some note on this request, this can be retrieved by CatalogService.GetDefaultBranch before next valid default branch set occurs. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2SetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2SetInventoryRequest": { +"description": "Request message for ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2SetInventoryRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"inventory": { +"$ref": "GoogleCloudRetailV2Product", +"description": "Required. The inventory information to update. The allowable fields to update are: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info The updated inventory fields must be specified in SetInventoryRequest.set_mask. If SetInventoryRequest.inventory.name is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the Product named in Product.name, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to update does not have existing inventory information, the provided inventory information will be inserted. If the Product to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for SetInventoryRequest.set_time. The caller can replace place IDs for a subset of fulfillment types in the following ways: * Adds \"fulfillment_info\" in SetInventoryRequest.set_mask * Specifies only the desired fulfillment types and corresponding place IDs to update in SetInventoryRequest.inventory.fulfillment_info The caller can clear all place IDs from a subset of fulfillment types in the following ways: * Adds \"fulfillment_info\" in SetInventoryRequest.set_mask * Specifies only the desired fulfillment types to clear in SetInventoryRequest.inventory.fulfillment_info * Checks that only the desired fulfillment info types have empty SetInventoryRequest.inventory.fulfillment_info.place_ids The last update time is recorded for the following inventory fields: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info If a full overwrite of inventory information while ignoring timestamps is needed, ProductService.UpdateProduct should be invoked instead." +}, +"setMask": { +"description": "Indicates which inventory fields in the provided Product to update. At least one field must be provided. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.", +"format": "google-fieldmask", +"type": "string" +}, +"setTime": { +"description": "The time when the request is issued, used to prevent out-of-order updates on inventory fields with the last update time recorded. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2SetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2SetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2TuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2TuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2TuneModelRequest": { +"description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", +"id": "GoogleCloudRetailV2TuneModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2TuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2TuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2UserEvent": { +"description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", +"id": "GoogleCloudRetailV2UserEvent", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2CustomAttribute" +}, +"description": "Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", +"type": "object" +}, +"attributionToken": { +"description": "Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", +"type": "string" +}, +"cartId": { +"description": "The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.", +"type": "string" +}, +"completionDetail": { +"$ref": "GoogleCloudRetailV2CompletionDetail", +"description": "The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." +}, +"entity": { +"description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.", +"type": "string" +}, +"eventTime": { +"description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", +"format": "google-datetime", +"type": "string" +}, +"eventType": { +"description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", +"type": "string" +}, +"experimentIds": { +"description": "A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See SearchRequest.filter for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"offset": { +"description": "An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"orderBy": { +"description": "The order in which products are returned. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"pageCategories": { +"description": "The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategories\" : [\"Sales > 2017 Black Friday Deals\"]. Required for `category-page-view` events. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageViewId": { +"description": "A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", +"type": "string" +}, +"productDetails": { +"description": "The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different product_details is desired. The end user may have not finished browsing the whole page yet.", +"items": { +"$ref": "GoogleCloudRetailV2ProductDetail" +}, +"type": "array" +}, +"purchaseTransaction": { +"$ref": "GoogleCloudRetailV2PurchaseTransaction", +"description": "A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned." +}, +"referrerUri": { +"description": "The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", +"type": "string" +}, +"searchQuery": { +"description": "The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"sessionId": { +"description": "A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.", +"type": "string" +}, +"uri": { +"description": "Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.", +"type": "string" +}, +"userInfo": { +"$ref": "GoogleCloudRetailV2UserInfo", +"description": "User information." +}, +"visitorId": { +"description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2UserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2UserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2UserEventInlineSource": { +"description": "The inline source for the input config for ImportUserEvents method.", +"id": "GoogleCloudRetailV2UserEventInlineSource", +"properties": { +"userEvents": { +"description": "Required. A list of user events to import. Recommended max of 10k items.", +"items": { +"$ref": "GoogleCloudRetailV2UserEvent" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2UserEventInputConfig": { +"description": "The input config source for user events.", +"id": "GoogleCloudRetailV2UserEventInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2BigQuerySource", +"description": "Required. BigQuery input source." +}, +"gcsSource": { +"$ref": "GoogleCloudRetailV2GcsSource", +"description": "Required. Google Cloud Storage location for the input content." +}, +"userEventInlineSource": { +"$ref": "GoogleCloudRetailV2UserEventInlineSource", +"description": "Required. The Inline source for the input content for UserEvents." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2UserInfo": { +"description": "Information of an end user.", +"id": "GoogleCloudRetailV2UserInfo", +"properties": { +"directUserRequest": { +"description": "True if the request is made directly from the end user, in which case the ip_address and user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", +"type": "boolean" +}, +"ipAddress": { +"description": "The end user's IP address. This field is used to extract location information for personalization. This field must be either an IPv4 address (e.g. \"104.133.9.80\") or an IPv6 address (e.g. \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"). Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when: * setting SearchRequest.user_info. * using the JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", +"type": "string" +}, +"userAgent": { +"description": "User agent as included in the HTTP header. Required for getting SearchResponse.sponsored_results. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", +"type": "string" +}, +"userId": { +"description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2alphaAddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2alphaAddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2alphaBigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata": { +"description": "Common metadata related to the progress of the operations.", +"id": "GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2alphaCreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaEnrollSolutionMetadata": { +"description": "Metadata related to the EnrollSolution method. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaEnrollSolutionMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaEnrollSolutionResponse": { +"description": "Response for EnrollSolution method.", +"id": "GoogleCloudRetailV2alphaEnrollSolutionResponse", +"properties": { +"enrolledSolution": { +"description": "Retail API solution that the project has enrolled.", +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2alphaExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportProductsResponse": { +"description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportUserEventsResponse": { +"description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaGcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2alphaGcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2alphaImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2alphaImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"transformedUserEventsMetadata": { +"$ref": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", +"description": "Metadata related to transform user events." +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2alphaUserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterAccountLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2alphaMerchantCenterAccountLink", +"properties": { +"branchId": { +"description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"feedFilters": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter" +}, +"type": "array" +}, +"feedLabel": { +"description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", +"type": "string" +}, +"id": { +"description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", +"readOnly": true, +"type": "string" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", +"readOnly": true, +"type": "string" +}, +"projectId": { +"description": "Output only. Google Cloud project ID.", +"readOnly": true, +"type": "string" +}, +"source": { +"description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", +"type": "string" +}, +"state": { +"description": "Output only. Represents the state of the link.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED" +], +"enumDescriptions": [ +"Default value.", +"Link is created and LRO is not complete.", +"Link is active.", +"Link creation failed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModel": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2alphaModel", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2alphaModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"pageOptimizationConfig": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", +"description": "Optional. The page optimization config." +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2alphaModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfig": { +"description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", +"properties": { +"pageOptimizationEventType": { +"description": "Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: * `add-to-cart`: Products being added to cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed * `category-page-view`: Homepage viewed * `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view` only allows models with type `recommended-for-you`. All other page_optimization_event_type allow all Model.types.", +"type": "string" +}, +"panels": { +"description": "Required. A list of panel configurations. Limit = 5.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel" +}, +"type": "array" +}, +"restriction": { +"description": "Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.", +"enum": [ +"RESTRICTION_UNSPECIFIED", +"NO_RESTRICTION", +"UNIQUE_SERVING_CONFIG_RESTRICTION", +"UNIQUE_MODEL_RESTRICTION", +"UNIQUE_MODEL_TYPE_RESTRICTION" +], +"enumDescriptions": [ +"Unspecified value for restriction.", +"Allow any ServingConfig to be show on any number of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity `Panel2 candidates`: home_page_ctr_no_diversity, home_page_ctr_diversity, pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: []", +"Do not allow the same ServingConfig.name to be shown on multiple panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_SERVING_CONFIG_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) *", +"Do not allow multiple ServingConfigs with same Model.name to be show on on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) *", +"Do not allow multiple ServingConfigs with same Model.type to be shown on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) *" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate": { +"description": "A candidate to consider for a given panel. Currently only ServingConfig are valid candidates.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", +"properties": { +"servingConfigId": { +"description": "This has to be a valid ServingConfig identifier. For example, for a ServingConfig with full name: `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`, this would be `my_candidate_config`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel": { +"description": "An individual panel with a list of ServingConfigs to consider for it.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", +"properties": { +"candidates": { +"description": "Required. The candidates to consider on the panel.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" +}, +"type": "array" +}, +"defaultCandidate": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", +"description": "Required. The default candidate. If the model fails at serving time, we fall back to the default." +}, +"displayName": { +"description": "Optional. The name to display for the panel.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2alphaModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaOutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2alphaOutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2alphaBigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2alphaGcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaPurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaPurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2alphaPurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2alphaPurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2alphaRejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2alphaRejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2alphaSetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2alphaSetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTransformedUserEventsMetadata": { +"description": "Metadata related to transform user events operation.", +"id": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", +"properties": { +"sourceEventsCount": { +"description": "Count of entries in the source user events BigQuery table.", +"format": "int64", +"type": "string" +}, +"transformedEventsCount": { +"description": "Count of entries in the transformed user events BigQuery table, which could be different from the actually imported number of user events.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2alphaTuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2alphaTuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaUserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2alphaUserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaAddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2betaAddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2betaAddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaBigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2betaBigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata": { +"description": "Common metadata related to the progress of the operations.", +"id": "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2betaCreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2betaExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportProductsResponse": { +"description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportUserEventsResponse": { +"description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaGcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2betaGcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2betaImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2betaImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2betaUserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterAccountLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2betaMerchantCenterAccountLink", +"properties": { +"branchId": { +"description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"feedFilters": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter" +}, +"type": "array" +}, +"feedLabel": { +"description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", +"type": "string" +}, +"id": { +"description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", +"readOnly": true, +"type": "string" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", +"readOnly": true, +"type": "string" +}, +"projectId": { +"description": "Output only. Google Cloud project ID.", +"readOnly": true, +"type": "string" +}, +"source": { +"description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", +"type": "string" +}, +"state": { +"description": "Output only. Represents the state of the link.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED" +], +"enumDescriptions": [ +"Default value.", +"Link is created and LRO is not complete.", +"Link is active.", +"Link creation failed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModel": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2betaModel", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2betaModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2betaModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2betaModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2betaModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaOutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2betaOutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2betaBigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2betaGcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaPurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaPurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2betaPurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2betaPurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2betaRejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2betaRejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2betaRemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2betaSetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2betaSetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaTuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2betaTuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaTuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2betaTuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaUserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2betaUserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDate": { +"description": "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, 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", +"id": "GoogleTypeDate", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Vertex AI Search for Retail API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2alpha.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2alpha.json new file mode 100644 index 0000000000000000000000000000000000000000..0d0d2b3756e79fc2bc1db5ec4f32e67b1eaf276d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2alpha.json @@ -0,0 +1,8306 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://retail.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Retail", +"description": "Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/recommendations", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "retail:v2alpha", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://retail.mtls.googleapis.com/", +"name": "retail", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"methods": { +"enrollSolution": { +"description": "The method enrolls a solution of type Retail Search into a project. The Recommendations AI solution type is enrolled by default when your project enables Retail API, so you don't need to call the enrollSolution method for recommendations.", +"flatPath": "v2alpha/projects/{projectsId}:enrollSolution", +"httpMethod": "POST", +"id": "retail.projects.enrollSolution", +"parameterOrder": [ +"project" +], +"parameters": { +"project": { +"description": "Required. Full resource name of parent. Format: `projects/{project_number_or_id}`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+project}:enrollSolution", +"request": { +"$ref": "GoogleCloudRetailV2alphaEnrollSolutionRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getAlertConfig": { +"description": "Get the AlertConfig of the requested project.", +"flatPath": "v2alpha/projects/{projectsId}/alertConfig", +"httpMethod": "GET", +"id": "retail.projects.getAlertConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full AlertConfig resource name. Format: projects/{project_number}/alertConfig", +"location": "path", +"pattern": "^projects/[^/]+/alertConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaAlertConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getLoggingConfig": { +"description": "Gets the LoggingConfig of the requested project.", +"flatPath": "v2alpha/projects/{projectsId}/loggingConfig", +"httpMethod": "GET", +"id": "retail.projects.getLoggingConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full LoggingConfig resource name. Format: projects/{project_number}/loggingConfig", +"location": "path", +"pattern": "^projects/[^/]+/loggingConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaLoggingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getRetailProject": { +"description": "Gets the project. Throws `NOT_FOUND` if the project wasn't initialized for the Retail API service.", +"flatPath": "v2alpha/projects/{projectsId}/retailProject", +"httpMethod": "GET", +"id": "retail.projects.getRetailProject", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of the project. Format: `projects/{project_number_or_id}/retailProject`", +"location": "path", +"pattern": "^projects/[^/]+/retailProject$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaProject" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listEnrolledSolutions": { +"description": "Lists all the retail API solutions the project has enrolled.", +"flatPath": "v2alpha/projects/{projectsId}:enrolledSolutions", +"httpMethod": "GET", +"id": "retail.projects.listEnrolledSolutions", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Full resource name of parent. Format: `projects/{project_number_or_id}`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}:enrolledSolutions", +"response": { +"$ref": "GoogleCloudRetailV2alphaListEnrolledSolutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateAlertConfig": { +"description": "Update the alert config of the requested project.", +"flatPath": "v2alpha/projects/{projectsId}/alertConfig", +"httpMethod": "PATCH", +"id": "retail.projects.updateAlertConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The name of the AlertConfig singleton resource. Format: projects/*/alertConfig", +"location": "path", +"pattern": "^projects/[^/]+/alertConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided AlertConfig to update. If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaAlertConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaAlertConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateLoggingConfig": { +"description": "Updates the LoggingConfig of the requested project.", +"flatPath": "v2alpha/projects/{projectsId}/loggingConfig", +"httpMethod": "PATCH", +"id": "retail.projects.updateLoggingConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The name of the LoggingConfig singleton resource. Format: projects/*/loggingConfig", +"location": "path", +"pattern": "^projects/[^/]+/loggingConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided LoggingConfig to update. The following are the only supported fields: * LoggingConfig.default_log_generation_rule * LoggingConfig.per_service_log_generation_rules If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaLoggingConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaLoggingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"locations": { +"resources": { +"catalogs": { +"methods": { +"completeQuery": { +"description": "Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:completeQuery", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.completeQuery", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"dataset": { +"description": "Determines which dataset to use for fetching completion. \"user-data\" will use the imported dataset through CompletionService.ImportCompletionData. \"cloud-retail\" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the \"user-data\". Current supported values: * user-data * cloud-retail: This option requires enabling auto-learning function first. See [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).", +"location": "query", +"type": "string" +}, +"deviceType": { +"description": "The device type context for completion suggestions. We recommend that you leave this field empty. It can apply different suggestions on different device types, e.g. `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device types. Supported formats: * `UNKNOWN_DEVICE_TYPE` * `DESKTOP` * `MOBILE` * A customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`.", +"location": "query", +"type": "string" +}, +"enableAttributeSuggestions": { +"description": "If true, attribute suggestions are enabled and provided in response. This field is only available for \"cloud-retail\" dataset.", +"location": "query", +"type": "boolean" +}, +"entity": { +"description": "The entity for customers who run multiple entities, domains, sites, or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it must be an exact match with UserEvent.entity to get per-entity autocomplete results.", +"location": "query", +"type": "string" +}, +"languageCodes": { +"description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxSuggestions": { +"description": "Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"query": { +"description": "Required. The query used to generate suggestions. The maximum number of allowed characters is 255.", +"location": "query", +"type": "string" +}, +"visitorId": { +"description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+catalog}:completeQuery", +"response": { +"$ref": "GoogleCloudRetailV2alphaCompleteQueryResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportAnalyticsMetrics": { +"description": "Exports analytics metrics. `Operation.response` is of type `ExportAnalyticsMetricsResponse`. `Operation.metadata` is of type `ExportMetadata`.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:exportAnalyticsMetrics", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.exportAnalyticsMetrics", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Required. Full resource name of the parent catalog. Expected format: `projects/*/locations/*/catalogs/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+catalog}:exportAnalyticsMetrics", +"request": { +"$ref": "GoogleCloudRetailV2alphaExportAnalyticsMetricsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getAttributesConfig": { +"description": "Gets an AttributesConfig.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getAttributesConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getCompletionConfig": { +"description": "Gets a CompletionConfig.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getCompletionConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full CompletionConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaCompletionConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getDefaultBranch": { +"description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getDefaultBranch", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+catalog}:getDefaultBranch", +"response": { +"$ref": "GoogleCloudRetailV2alphaGetDefaultBranchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the Catalogs associated with the project.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/catalogs", +"response": { +"$ref": "GoogleCloudRetailV2alphaListCatalogsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the Catalogs.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The fully qualified resource name of the catalog.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaCatalog" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaCatalog" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setDefaultBranch": { +"description": "Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using \"default_branch\" to the actual branch id set as default. For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: * PredictionService will only return product IDs from branch {newBranch}. * SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). * UserEventService will only join events with products from branch {newBranch}.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:setDefaultBranch", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.setDefaultBranch", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+catalog}:setDefaultBranch", +"request": { +"$ref": "GoogleCloudRetailV2alphaSetDefaultBranchRequest" +}, +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateAttributesConfig": { +"description": "Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.updateAttributesConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided AttributesConfig to update. The following is the only supported field: * AttributesConfig.catalog_attributes If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaAttributesConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateCompletionConfig": { +"description": "Updates the CompletionConfigs.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.updateCompletionConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaCompletionConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaCompletionConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"attributesConfig": { +"methods": { +"addCatalogAttribute": { +"description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+attributesConfig}:addCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2alphaAddCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"batchRemoveCatalogAttributes": { +"description": "Removes all specified CatalogAttributes from the AttributesConfig.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:batchRemoveCatalogAttributes", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. The attributes config resource shared by all catalog attributes being deleted. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+attributesConfig}:batchRemoveCatalogAttributes", +"request": { +"$ref": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeCatalogAttribute": { +"description": "Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:removeCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+attributesConfig}:removeCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"replaceCatalogAttribute": { +"description": "Replaces the specified CatalogAttribute in the AttributesConfig by updating the catalog attribute with the same CatalogAttribute.key. If the CatalogAttribute to replace does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:replaceCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.replaceCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+attributesConfig}:replaceCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2alphaReplaceCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"branches": { +"methods": { +"get": { +"description": "Retrieves a Branch.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the branch to retrieve. Format: `projects/*/locations/global/catalogs/default_catalog/branches/some_branch_id`. \"default_branch\" can be used as a special branch_id, it returns the default branch that has been set for the catalog.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The view to apply to the returned Branch. Defaults to [Branch.BranchView.BASIC] if unspecified. See documentation of fields of Branch to find what fields are excluded from BASIC view.", +"enum": [ +"BRANCH_VIEW_UNSPECIFIED", +"BRANCH_VIEW_BASIC", +"BRANCH_VIEW_FULL" +], +"enumDescriptions": [ +"The value when it's unspecified. This defaults to the BASIC view.", +"Includes basic metadata about the branch, but not statistical fields. See documentation of fields of Branch to find what fields are excluded from BASIC view.", +"Includes all fields of a Branch." +], +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaBranch" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Branchs under the specified parent Catalog.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "The view to apply to the returned Branch. Defaults to [Branch.BranchView.BASIC] if unspecified. See documentation of fields of Branch to find what fields are excluded from BASIC view.", +"enum": [ +"BRANCH_VIEW_UNSPECIFIED", +"BRANCH_VIEW_BASIC", +"BRANCH_VIEW_FULL" +], +"enumDescriptions": [ +"The value when it's unspecified. This defaults to the BASIC view.", +"Includes basic metadata about the branch, but not statistical fields. See documentation of fields of Branch to find what fields are excluded from BASIC view.", +"Includes all fields of a Branch." +], +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+parent}/branches", +"response": { +"$ref": "GoogleCloudRetailV2alphaListBranchesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"places": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/places/{placesId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.places.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/places/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"products": { +"methods": { +"addFulfillmentPlaces": { +"description": "We recommend that you use the ProductService.AddLocalInventories method instead of the ProductService.AddFulfillmentPlaces method. ProductService.AddLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:addFulfillmentPlaces", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.addFulfillmentPlaces", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+product}:addFulfillmentPlaces", +"request": { +"$ref": "GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"addLocalInventories": { +"description": "Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:addLocalInventories", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.addLocalInventories", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+product}:addLocalInventories", +"request": { +"$ref": "GoogleCloudRetailV2alphaAddLocalInventoriesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a Product.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +}, +"productId": { +"description": "Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+parent}/products", +"request": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Product.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.branches.products.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "This value only applies to the case when the target product is of type PRIMARY. When deleting a product of VARIANT/COLLECTION type, this value will be ignored. When set to true, the subsequent variant products will be deleted. When set to false, if the primary product has active variant products, an error will be returned.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Product.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.products.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/products:import", +"request": { +"$ref": "GoogleCloudRetailV2alphaImportProductsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Gets a list of Products.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.products.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List Product.Type.VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = \"some_product_id\"` * List Products bundled in a Product.Type.COLLECTION Product. For example: `collection_product_id = \"some_product_id\"` * List Products with a partibular type. For example: `type = \"PRIMARY\"` `type = \"VARIANT\"` `type = \"COLLECTION\"` If the field is unrecognizable, an INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error is returned.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of Products to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token ListProductsResponse.next_page_token, received from a previous ProductService.ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ProductService.ListProducts must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list Products under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "The fields of Product to return in the responses. If not set or empty, the following fields are returned: * Product.name * Product.id * Product.title * Product.uri * Product.images * Product.price_info * Product.brands If \"*\" is provided, all fields are returned. Product.name is always returned no matter what mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"requireTotalSize": { +"description": "If true and page_token is empty, ListProductsResponse.total_size is set to the total count of matched items irrespective of pagination. Notice that setting this field to true affects the performance.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2alpha/{+parent}/products", +"response": { +"$ref": "GoogleCloudRetailV2alphaListProductsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Product.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.branches.products.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "If set to true, and the Product is not found, a new Product will be created. In this situation, `update_mask` is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as \"attributes.${key_name}\". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"purge": { +"description": "Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:purge", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the branch under which the products are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/products:purge", +"request": { +"$ref": "GoogleCloudRetailV2alphaPurgeProductsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeFulfillmentPlaces": { +"description": "We recommend that you use the ProductService.RemoveLocalInventories method instead of the ProductService.RemoveFulfillmentPlaces method. ProductService.RemoveLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeFulfillmentPlaces", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+product}:removeFulfillmentPlaces", +"request": { +"$ref": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeLocalInventories": { +"description": "Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeLocalInventories", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.removeLocalInventories", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+product}:removeLocalInventories", +"request": { +"$ref": "GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setInventory": { +"description": "Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. When inventory is updated with ProductService.CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used. If no inventory fields are set in SetInventoryRequest.set_mask, then any existing inventory information is preserved. Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService.RemoveFulfillmentPlaces. The returned Operations is obsolete after one day, and the GetOperation API returns `NOT_FOUND` afterwards. If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:setInventory", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.setInventory", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}:setInventory", +"request": { +"$ref": "GoogleCloudRetailV2alphaSetInventoryRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"completionData": { +"methods": { +"import": { +"description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.completionData.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The catalog which the suggestions dataset belongs to. Format: `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/completionData:import", +"request": { +"$ref": "GoogleCloudRetailV2alphaImportCompletionDataRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"controls": { +"methods": { +"create": { +"description": "Creates a Control. If the Control to create already exists, an ALREADY_EXISTS error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.controls.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"controlId": { +"description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Full resource name of parent catalog. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/controls", +"request": { +"$ref": "GoogleCloudRetailV2alphaControl" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.controls.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Control.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.controls.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Controls by their parent Catalog.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.controls.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List controls that are used in a single ServingConfig: 'serving_config = \"boosted_home_page_cvr\"'", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListControls` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The catalog resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/controls", +"response": { +"$ref": "GoogleCloudRetailV2alphaListControlsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Control. Control cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the Control to update does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.controls.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/controls/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name If not set or empty, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaControl" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"merchantCenterAccountLinks": { +"methods": { +"create": { +"description": "Creates a MerchantCenterAccountLink.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/merchantCenterAccountLinks", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.merchantCenterAccountLinks.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The branch resource where this MerchantCenterAccountLink will be created. Format: `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/merchantCenterAccountLinks", +"request": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterAccountLink" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a MerchantCenterAccountLink. If the MerchantCenterAccountLink to delete does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/merchantCenterAccountLinks/{merchantCenterAccountLinksId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.merchantCenterAccountLinks.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/merchantCenterAccountLinks/{merchant_center_account_link_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/merchantCenterAccountLinks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all MerchantCenterAccountLinks under the specified parent Catalog.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/merchantCenterAccountLinks", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.merchantCenterAccountLinks.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent Catalog of the resource. It must match this format: `projects/{PROJECT_NUMBER}/locations/global/catalogs/{CATALOG_ID}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/merchantCenterAccountLinks", +"response": { +"$ref": "GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"models": { +"methods": { +"create": { +"description": "Creates a new model.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"dryRun": { +"description": "Optional. Whether to run a dry run to validate the request (without actually creating the model).", +"location": "query", +"type": "boolean" +}, +"parent": { +"description": "Required. The parent resource under which to create the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/models", +"request": { +"$ref": "GoogleCloudRetailV2alphaModel" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing model.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.models.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Model to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a model.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.models.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Model to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the models linked to this event store.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.models.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListModels` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent for which to list models. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/models", +"response": { +"$ref": "GoogleCloudRetailV2alphaListModelsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update of model metadata. Only fields that currently can be updated are: `filtering_option` and `periodic_tuning_state`. If other values are provided, this API method ignores them.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.models.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Indicates which fields in the provided 'model' to update. If not set, by default updates all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaModel" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pause": { +"description": "Pauses the training of an existing model.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:pause", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.pause", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model to pause. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}:pause", +"request": { +"$ref": "GoogleCloudRetailV2alphaPauseModelRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resume": { +"description": "Resumes the training of an existing model.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:resume", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.resume", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model to resume. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}:resume", +"request": { +"$ref": "GoogleCloudRetailV2alphaResumeModelRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"tune": { +"description": "Tunes an existing model.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:tune", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.tune", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the model to tune. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}:tune", +"request": { +"$ref": "GoogleCloudRetailV2alphaTuneModelRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"placements": { +"methods": { +"predict": { +"description": "Makes a recommendation prediction.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/placements/{placementsId}:predict", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.placements.predict", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+placement}:predict", +"request": { +"$ref": "GoogleCloudRetailV2alphaPredictRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaPredictResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"search": { +"description": "Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/placements/{placementsId}:search", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.placements.search", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that are used to make the search.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+placement}:search", +"request": { +"$ref": "GoogleCloudRetailV2alphaSearchRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaSearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"servingConfigs": { +"methods": { +"addControl": { +"description": "Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:addControl", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.addControl", +"parameterOrder": [ +"servingConfig" +], +"parameters": { +"servingConfig": { +"description": "Required. The source ServingConfig resource name . Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+servingConfig}:addControl", +"request": { +"$ref": "GoogleCloudRetailV2alphaAddControlRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a ServingConfig. A maximum of 100 ServingConfigs are allowed in a Catalog, otherwise a FAILED_PRECONDITION error is returned.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Full resource name of parent. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"servingConfigId": { +"description": "Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+parent}/servingConfigs", +"request": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.servingConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ServingConfig to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.servingConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all ServingConfigs linked to this catalog.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.servingConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The catalog resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/servingConfigs", +"response": { +"$ref": "GoogleCloudRetailV2alphaListServingConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a ServingConfig.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.servingConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/servingConfig/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"predict": { +"description": "Makes a recommendation prediction.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.predict", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+placement}:predict", +"request": { +"$ref": "GoogleCloudRetailV2alphaPredictRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaPredictResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeControl": { +"description": "Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:removeControl", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.removeControl", +"parameterOrder": [ +"servingConfig" +], +"parameters": { +"servingConfig": { +"description": "Required. The source ServingConfig resource name . Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+servingConfig}:removeControl", +"request": { +"$ref": "GoogleCloudRetailV2alphaRemoveControlRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"search": { +"description": "Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.search", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that are used to make the search.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+placement}:search", +"request": { +"$ref": "GoogleCloudRetailV2alphaSearchRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaSearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"userEvents": { +"methods": { +"collect": { +"description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:collect", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.userEvents.collect", +"parameterOrder": [ +"parent" +], +"parameters": { +"ets": { +"description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent catalog name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"prebuiltRule": { +"description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", +"location": "query", +"type": "string" +}, +"rawJson": { +"description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", +"location": "query", +"type": "string" +}, +"uri": { +"description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", +"location": "query", +"type": "string" +}, +"userEvent": { +"description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+parent}/userEvents:collect", +"response": { +"$ref": "GoogleApiHttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/userEvents:import", +"request": { +"$ref": "GoogleCloudRetailV2alphaImportUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"purge": { +"description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:purge", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/userEvents:purge", +"request": { +"$ref": "GoogleCloudRetailV2alphaPurgeUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rejoin": { +"description": "Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.rejoin", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+parent}/userEvents:rejoin", +"request": { +"$ref": "GoogleCloudRetailV2alphaRejoinUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"write": { +"description": "Writes a single user event.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:write", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.write", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"writeAsync": { +"description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2alpha/{+parent}/userEvents:write", +"request": { +"$ref": "GoogleCloudRetailV2alphaUserEvent" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaUserEvent" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2alpha/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2alpha/projects/{projectsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2alpha/projects/{projectsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"retailProject": { +"methods": { +"acceptTerms": { +"description": "Accepts service terms for this project. By making requests to this API, you agree to the terms of service linked below. https://cloud.google.com/retail/data-use-terms", +"flatPath": "v2alpha/projects/{projectsId}/retailProject:acceptTerms", +"httpMethod": "POST", +"id": "retail.projects.retailProject.acceptTerms", +"parameterOrder": [ +"project" +], +"parameters": { +"project": { +"description": "Required. Full resource name of the project. Format: `projects/{project_number_or_id}/retailProject`", +"location": "path", +"pattern": "^projects/[^/]+/retailProject$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha/{+project}:acceptTerms", +"request": { +"$ref": "GoogleCloudRetailV2alphaAcceptTermsRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2alphaProject" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240418", +"rootUrl": "https://retail.googleapis.com/", +"schemas": { +"GoogleApiHttpBody": { +"description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", +"id": "GoogleApiHttpBody", +"properties": { +"contentType": { +"description": "The HTTP Content-Type header value specifying the content type of the body.", +"type": "string" +}, +"data": { +"description": "The HTTP request/response body as raw binary.", +"format": "byte", +"type": "string" +}, +"extensions": { +"description": "Application specific response metadata. Must be set in the first response for streaming APIs.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingErrorContext": { +"description": "A description of the context in which an error occurred.", +"id": "GoogleCloudRetailLoggingErrorContext", +"properties": { +"httpRequest": { +"$ref": "GoogleCloudRetailLoggingHttpRequestContext", +"description": "The HTTP request which was processed when the error was triggered." +}, +"reportLocation": { +"$ref": "GoogleCloudRetailLoggingSourceLocation", +"description": "The location in the source code where the decision was made to report the error, usually the place where it was logged." +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingErrorLog": { +"description": "An error log which is reported to the Error Reporting system. This proto a superset of google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent.", +"id": "GoogleCloudRetailLoggingErrorLog", +"properties": { +"context": { +"$ref": "GoogleCloudRetailLoggingErrorContext", +"description": "A description of the context in which the error occurred." +}, +"importPayload": { +"$ref": "GoogleCloudRetailLoggingImportErrorContext", +"description": "The error payload that is populated on LRO import APIs." +}, +"message": { +"description": "A message describing the error.", +"type": "string" +}, +"requestPayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The API request payload, represented as a protocol buffer. Most API request types are supported. For example: \"type.googleapis.com/google.cloud.retail.v2.ProductService.CreateProductRequest\" \"type.googleapis.com/google.cloud.retail.v2.UserEventService.WriteUserEventRequest\"", +"type": "object" +}, +"responsePayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The API response payload, represented as a protocol buffer. This is used to log some \"soft errors\", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported and no PII is included: \"google.cloud.retail.v2.PredictionService.Predict\" \"google.cloud.retail.v2.UserEventService.WriteUserEvent\" \"google.cloud.retail.v2.UserEventService.CollectUserEvent\"", +"type": "object" +}, +"serviceContext": { +"$ref": "GoogleCloudRetailLoggingServiceContext", +"description": "The service context in which this error has occurred." +}, +"status": { +"$ref": "GoogleRpcStatus", +"description": "The RPC status associated with the error log." +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingHttpRequestContext": { +"description": "HTTP request data that is related to a reported error.", +"id": "GoogleCloudRetailLoggingHttpRequestContext", +"properties": { +"responseStatusCode": { +"description": "The HTTP response status code for the request.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingImportErrorContext": { +"description": "The error payload that is populated on LRO import APIs, including \"google.cloud.retail.v2.ProductService.ImportProducts\" and \"google.cloud.retail.v2.EventService.ImportUserEvents\".", +"id": "GoogleCloudRetailLoggingImportErrorContext", +"properties": { +"catalogItem": { +"description": "The detailed content which caused the error on importing a catalog item.", +"type": "string" +}, +"gcsPath": { +"description": "Cloud Storage file path of the import source. Can be set for batch operation error.", +"type": "string" +}, +"lineNumber": { +"description": "Line number of the content in file. Should be empty for permission or batch operation error.", +"type": "string" +}, +"operationName": { +"description": "The operation resource name of the LRO.", +"type": "string" +}, +"product": { +"description": "The detailed content which caused the error on importing a product.", +"type": "string" +}, +"userEvent": { +"description": "The detailed content which caused the error on importing a user event.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingServiceContext": { +"description": "Describes a running service that sends errors.", +"id": "GoogleCloudRetailLoggingServiceContext", +"properties": { +"service": { +"description": "An identifier of the service. For example, \"retail.googleapis.com\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingSourceLocation": { +"description": "Indicates a location in the source code of the service for which errors are reported.", +"id": "GoogleCloudRetailLoggingSourceLocation", +"properties": { +"functionName": { +"description": "Human-readable name of a function or method. For example, \"google.cloud.retail.v2.UserEventService.ImportUserEvents\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2AddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2AddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2AddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2AddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2AddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2BigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2BigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2CreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2OutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2ExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2ExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2GcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2GcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2ImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2ImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2ImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2UserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Model": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2Model", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2ModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2ModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2ModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2ModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2OutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2OutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2BigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2GcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2PurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2PurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2PurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2PurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2RejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2RejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2RemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2RemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2RemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2SetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2SetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2SetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2SetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2TuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2TuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2TuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2TuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2UserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2UserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAcceptTermsRequest": { +"description": "Request for AcceptTerms method.", +"id": "GoogleCloudRetailV2alphaAcceptTermsRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddCatalogAttributeRequest": { +"description": "Request for CatalogService.AddCatalogAttribute method.", +"id": "GoogleCloudRetailV2alphaAddCatalogAttributeRequest", +"properties": { +"catalogAttribute": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttribute", +"description": "Required. The CatalogAttribute to add." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddControlRequest": { +"description": "Request for AddControl method.", +"id": "GoogleCloudRetailV2alphaAddControlRequest", +"properties": { +"controlId": { +"description": "Required. The id of the control to apply. Assumed to be in the same catalog as the serving config - if id is not found a NOT_FOUND error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest": { +"description": "Request message for ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaAddFulfillmentPlacesRequest", +"properties": { +"addTime": { +"description": "The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"allowMissing": { +"description": "If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. The IDs for this type, such as the store IDs for \"pickup-in-store\" or the region IDs for \"same-day-delivery\" to be added for this type. Duplicate IDs will be automatically ignored. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2alphaAddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddLocalInventoriesRequest": { +"description": "Request message for ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2alphaAddLocalInventoriesRequest", +"properties": { +"addMask": { +"description": "Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.", +"format": "google-fieldmask", +"type": "string" +}, +"addTime": { +"description": "The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"allowMissing": { +"description": "If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"localInventories": { +"description": "Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request.", +"items": { +"$ref": "GoogleCloudRetailV2alphaLocalInventory" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2alphaAddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAlertConfig": { +"description": "Project level alert config.", +"id": "GoogleCloudRetailV2alphaAlertConfig", +"properties": { +"alertPolicies": { +"description": "Alert policies for a customer. They must be unique by [AlertPolicy.alert_group]", +"items": { +"$ref": "GoogleCloudRetailV2alphaAlertConfigAlertPolicy" +}, +"type": "array" +}, +"name": { +"description": "Required. Immutable. The name of the AlertConfig singleton resource. Format: projects/*/alertConfig", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAlertConfigAlertPolicy": { +"description": "Alert policy for a customer.", +"id": "GoogleCloudRetailV2alphaAlertConfigAlertPolicy", +"properties": { +"alertGroup": { +"description": "The feature that provides alerting capability. Supported value is only `search-data-quality` for now.", +"type": "string" +}, +"enrollStatus": { +"description": "The enrollment status of a customer.", +"enum": [ +"ENROLL_STATUS_UNSPECIFIED", +"ENROLLED", +"DECLINED" +], +"enumDescriptions": [ +"Default value. Used for customers who have not responded to the alert policy.", +"Customer is enrolled in this policy.", +"Customer declined this policy." +], +"type": "string" +}, +"recipients": { +"description": "Recipients for the alert policy. One alert policy should not exceed 20 recipients.", +"items": { +"$ref": "GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient": { +"description": "Recipient contact information.", +"id": "GoogleCloudRetailV2alphaAlertConfigAlertPolicyRecipient", +"properties": { +"emailAddress": { +"description": "Email address of the recipient.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAttributesConfig": { +"description": "Catalog level attribute config.", +"id": "GoogleCloudRetailV2alphaAttributesConfig", +"properties": { +"attributeConfigLevel": { +"description": "Output only. The AttributeConfigLevel used for this catalog.", +"enum": [ +"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED", +"PRODUCT_LEVEL_ATTRIBUTE_CONFIG", +"CATALOG_LEVEL_ATTRIBUTE_CONFIG" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.", +"At this level, we honor the attribute configurations set in Product.attributes.", +"At this level, we honor the attribute configurations set in CatalogConfig.attribute_configs." +], +"readOnly": true, +"type": "string" +}, +"catalogAttributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttribute" +}, +"description": "Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. The maximum number of catalog attributes allowed in a request is 1000.", +"type": "object" +}, +"name": { +"description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAudience": { +"description": "An intended audience of the Product for whom it's sold.", +"id": "GoogleCloudRetailV2alphaAudience", +"properties": { +"ageGroups": { +"description": "The age groups of the audience. Strongly encouraged to use the standard values: \"newborn\" (up to 3 months old), \"infant\" (3\u201312 months old), \"toddler\" (1\u20135 years old), \"kids\" (5\u201313 years old), \"adult\" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).", +"items": { +"type": "string" +}, +"type": "array" +}, +"genders": { +"description": "The genders of the audience. Strongly encouraged to use the standard values: \"male\", \"female\", \"unisex\". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest": { +"description": "Request for CatalogService.BatchRemoveCatalogAttributes method.", +"id": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesRequest", +"properties": { +"attributeKeys": { +"description": "Required. The attribute name keys of the CatalogAttributes to delete. A maximum of 1000 catalog attributes can be deleted in a batch.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse": { +"description": "Response of the CatalogService.BatchRemoveCatalogAttributes.", +"id": "GoogleCloudRetailV2alphaBatchRemoveCatalogAttributesResponse", +"properties": { +"deletedCatalogAttributes": { +"description": "Catalog attributes that were deleted. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resetCatalogAttributes": { +"description": "Catalog attributes that were reset. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2alphaBigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBigQuerySource": { +"description": "BigQuery source import data from.", +"id": "GoogleCloudRetailV2alphaBigQuerySource", +"properties": { +"dataSchema": { +"description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for autocomplete imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", +"type": "string" +}, +"datasetId": { +"description": "Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.", +"type": "string" +}, +"gcsStagingDir": { +"description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", +"type": "string" +}, +"partitionDate": { +"$ref": "GoogleTypeDate", +"description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported in ImportProductsRequest." +}, +"projectId": { +"description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", +"type": "string" +}, +"tableId": { +"description": "Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBranch": { +"description": "A data branch that stores Products.", +"id": "GoogleCloudRetailV2alphaBranch", +"properties": { +"displayName": { +"description": "Output only. Human readable name of the branch to display in the UI.", +"readOnly": true, +"type": "string" +}, +"isDefault": { +"description": "Output only. Indicates whether this branch is set as the default branch of its parent catalog.", +"readOnly": true, +"type": "boolean" +}, +"lastProductImportTime": { +"description": "Output only. Timestamp of last import through ProductService.ImportProducts. Empty value means no import has been made to this branch.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. Full resource name of the branch, such as `projects/*/locations/global/catalogs/default_catalog/branches/branch_id`.", +"type": "string" +}, +"productCountStats": { +"description": "Output only. Statistics for number of products in the branch, provided for different scopes. This field is not populated in BranchView.BASIC view.", +"items": { +"$ref": "GoogleCloudRetailV2alphaBranchProductCountStatistic" +}, +"readOnly": true, +"type": "array" +}, +"productCounts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"deprecated": true, +"description": "Output only. The number of products in different groups that this branch has. The key is a group representing a set of products, and the value is the number of products in that group. Note: keys in this map may change over time. Possible keys: * \"primary-in-stock\", products have Product.Type.PRIMARY type and Product.Availability.IN_STOCK availability. * \"primary-out-of-stock\", products have Product.Type.PRIMARY type and Product.Availability.OUT_OF_STOCK availability. * \"primary-preorder\", products have Product.Type.PRIMARY type and Product.Availability.PREORDER availability. * \"primary-backorder\", products have Product.Type.PRIMARY type and Product.Availability.BACKORDER availability. * \"variant-in-stock\", products have Product.Type.VARIANT type and Product.Availability.IN_STOCK availability. * \"variant-out-of-stock\", products have Product.Type.VARIANT type and Product.Availability.OUT_OF_STOCK availability. * \"variant-preorder\", products have Product.Type.VARIANT type and Product.Availability.PREORDER availability. * \"variant-backorder\", products have Product.Type.VARIANT type and Product.Availability.BACKORDER availability. * \"price-discounted\", products have [Product.price_info.price] < [Product.price_info.original_price]. This field is not populated in BranchView.BASIC view.", +"readOnly": true, +"type": "object" +}, +"qualityMetrics": { +"description": "Output only. The quality metrics measured among products of this branch. See QualityMetric.requirement_key for supported metrics. Metrics could be missing if failed to retrieve. This field is not populated in BranchView.BASIC view.", +"items": { +"$ref": "GoogleCloudRetailV2alphaBranchQualityMetric" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBranchProductCountStatistic": { +"description": "A statistic about the number of products in a branch.", +"id": "GoogleCloudRetailV2alphaBranchProductCountStatistic", +"properties": { +"counts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "The number of products in scope broken down into different groups. The key is a group representing a set of products, and the value is the number of products in that group. Note: keys in this map may change over time. Possible keys: * \"primary-in-stock\", products have Product.Type.PRIMARY type and Product.Availability.IN_STOCK availability. * \"primary-out-of-stock\", products have Product.Type.PRIMARY type and Product.Availability.OUT_OF_STOCK availability. * \"primary-preorder\", products have Product.Type.PRIMARY type and Product.Availability.PREORDER availability. * \"primary-backorder\", products have Product.Type.PRIMARY type and Product.Availability.BACKORDER availability. * \"variant-in-stock\", products have Product.Type.VARIANT type and Product.Availability.IN_STOCK availability. * \"variant-out-of-stock\", products have Product.Type.VARIANT type and Product.Availability.OUT_OF_STOCK availability. * \"variant-preorder\", products have Product.Type.VARIANT type and Product.Availability.PREORDER availability. * \"variant-backorder\", products have Product.Type.VARIANT type and Product.Availability.BACKORDER availability. * \"price-discounted\", products have [Product.price_info.price] < [Product.price_info.original_price].", +"type": "object" +}, +"scope": { +"description": "[ProductCountScope] of the [counts].", +"enum": [ +"PRODUCT_COUNT_SCOPE_UNSPECIFIED", +"ALL_PRODUCTS", +"LAST_24_HOUR_UPDATE" +], +"enumDescriptions": [ +"Default value for enum. This value is not used in the API response.", +"Scope for all existing products in the branch. Useful for understanding how many products there are in a branch.", +"Scope for products created or updated in the last 24 hours." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBranchQualityMetric": { +"description": "Metric measured on a group of Products against a certain quality requirement. Contains the number of products that pass the check and the number of products that don't.", +"id": "GoogleCloudRetailV2alphaBranchQualityMetric", +"properties": { +"qualifiedProductCount": { +"description": "Number of products passing the quality requirement check. We only check searchable products.", +"format": "int32", +"type": "integer" +}, +"requirementKey": { +"description": "The key that represents a quality requirement rule. Supported keys: * \"has-valid-uri\": product has a valid and accessible uri. * \"available-expire-time-conformance\": Product.available_time is early than \"now\", and Product.expire_time is greater than \"now\". * \"has-searchable-attributes\": product has at least one attribute set to searchable. * \"has-description\": product has non-empty description. * \"has-at-least-bigram-title\": Product title has at least two words. A comprehensive title helps to improve search quality. * \"variant-has-image\": the variant products has at least one image. You may ignore this metric if all your products are at primary level. * \"variant-has-price-info\": the variant products has price_info set. You may ignore this metric if all your products are at primary level. * \"has-publish-time\": product has non-empty publish_time.", +"type": "string" +}, +"suggestedQualityPercentThreshold": { +"description": "Value from 0 to 100 representing the suggested percentage of products that meet the quality requirements to get good search and recommendation performance. 100 * (qualified_product_count) / (qualified_product_count + unqualified_product_count) should be greater or equal to this suggestion.", +"format": "double", +"type": "number" +}, +"unqualifiedProductCount": { +"description": "Number of products failing the quality requirement check. We only check searchable products.", +"format": "int32", +"type": "integer" +}, +"unqualifiedSampleProducts": { +"description": "A list of a maximum of 100 sample products that do not qualify for this requirement. This field is only populated in the response to BranchService.GetBranch API, and is always empty for BranchService.ListBranches. Only the following fields are set in the Product. * Product.name * Product.id * Product.title", +"items": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCatalog": { +"description": "The catalog configuration.", +"id": "GoogleCloudRetailV2alphaCatalog", +"properties": { +"displayName": { +"description": "Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"merchantCenterLinkingConfig": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterLinkingConfig", +"description": "The Merchant Center linking configuration. After a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the Merchant Center account in order to make changes to this field." +}, +"name": { +"description": "Required. Immutable. The fully qualified resource name of the catalog.", +"type": "string" +}, +"productLevelConfig": { +"$ref": "GoogleCloudRetailV2alphaProductLevelConfig", +"description": "Required. The product level configuration." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCatalogAttribute": { +"description": "Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.", +"id": "GoogleCloudRetailV2alphaCatalogAttribute", +"properties": { +"dynamicFacetableOption": { +"description": "If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. Must be specified, otherwise throws INVALID_FORMAT error.", +"enum": [ +"DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", +"DYNAMIC_FACETABLE_ENABLED", +"DYNAMIC_FACETABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Dynamic facetable option enabled for an attribute.", +"Dynamic facetable option disabled for an attribute." +], +"type": "string" +}, +"exactSearchableOption": { +"description": "If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to EXACT_SEARCHABLE_DISABLED.", +"enum": [ +"EXACT_SEARCHABLE_OPTION_UNSPECIFIED", +"EXACT_SEARCHABLE_ENABLED", +"EXACT_SEARCHABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Exact searchable option enabled for an attribute.", +"Exact searchable option disabled for an attribute." +], +"type": "string" +}, +"facetConfig": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfig", +"description": "Contains facet options." +}, +"inUse": { +"description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", +"readOnly": true, +"type": "boolean" +}, +"indexableOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search. Must be specified when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.", +"enum": [ +"INDEXABLE_OPTION_UNSPECIFIED", +"INDEXABLE_ENABLED", +"INDEXABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Indexable option enabled for an attribute.", +"Indexable option disabled for an attribute." +], +"type": "string" +}, +"key": { +"description": "Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed. If the attribute key starts with `attributes.`, then the attribute is a custom attribute. Attributes such as `brands`, `patterns`, and `title` are built-in and called system attributes.", +"type": "string" +}, +"recommendationsFilteringOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, attribute values are filterable for recommendations. This option works for categorical features only, does not work for numerical features, inventory filtering.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"retrievableOption": { +"description": "If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to RETRIEVABLE_DISABLED.", +"enum": [ +"RETRIEVABLE_OPTION_UNSPECIFIED", +"RETRIEVABLE_ENABLED", +"RETRIEVABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Retrievable option enabled for an attribute.", +"Retrievable option disabled for an attribute." +], +"type": "string" +}, +"searchableOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes. Must be specified, when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.", +"enum": [ +"SEARCHABLE_OPTION_UNSPECIFIED", +"SEARCHABLE_ENABLED", +"SEARCHABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Searchable option enabled for an attribute.", +"Searchable option disabled for an attribute." +], +"type": "string" +}, +"type": { +"description": "Output only. The type of this attribute. This is derived from the attribute in Product.attributes.", +"enum": [ +"UNKNOWN", +"TEXTUAL", +"NUMERICAL" +], +"enumDescriptions": [ +"The type of the attribute is unknown. Used when type cannot be derived from attribute that is not in_use.", +"Textual attribute.", +"Numerical attribute." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCatalogAttributeFacetConfig": { +"description": "Possible options for the facet that corresponds to the current attribute config.", +"id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfig", +"properties": { +"facetIntervals": { +"description": "If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.", +"items": { +"$ref": "GoogleCloudRetailV2alphaInterval" +}, +"type": "array" +}, +"ignoredFacetValues": { +"description": "Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.", +"items": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues" +}, +"type": "array" +}, +"mergedFacet": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacet", +"description": "Use this field only if you want to merge a facet key into another facet key." +}, +"mergedFacetValues": { +"description": "Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if \"dark_blue\" merged into \"BLUE\", then the latter can't merge into \"blues\" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.", +"items": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue" +}, +"type": "array" +}, +"rerankConfig": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigRerankConfig", +"description": "Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues": { +"description": "Facet values to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.", +"id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigIgnoredFacetValues", +"properties": { +"endTime": { +"description": "If start time is empty and end time is not empty, then ignore these facet values before end time.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time.", +"format": "google-datetime", +"type": "string" +}, +"values": { +"description": "List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 128 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacet": { +"description": "The current facet key (i.e. attribute config) maps into the merged_facet_key. A facet key can have at most one child. The current facet key and the merged facet key need both to be textual custom attributes or both numerical custom attributes (same type).", +"id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacet", +"properties": { +"mergedFacetKey": { +"description": "The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute.", +"type": "string" +}, +"mergedFacetValues": { +"deprecated": true, +"description": "Each instance is a list of facet values that map into the same (possibly different) merged facet value. For the current attribute config, each facet value should map to at most one merged facet value.", +"items": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue": { +"description": "Replaces a set of textual facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute. This feature is available only for textual custom attributes.", +"id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigMergedFacetValue", +"properties": { +"mergedValue": { +"description": "All the previous values are replaced by this merged facet value. This merged_value must be non-empty and can have up to 128 characters.", +"type": "string" +}, +"values": { +"description": "All the facet values that are replaces by the same merged_value that follows. The maximum number of values per MergedFacetValue is 25. Each value can have up to 128 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCatalogAttributeFacetConfigRerankConfig": { +"description": "Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable. To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).", +"id": "GoogleCloudRetailV2alphaCatalogAttributeFacetConfigRerankConfig", +"properties": { +"facetValues": { +"description": "If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rerankFacet": { +"description": "If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaColorInfo": { +"description": "The color information of a Product.", +"id": "GoogleCloudRetailV2alphaColorInfo", +"properties": { +"colorFamilies": { +"description": "The standard color families. Strongly recommended to use the following standard color groups: \"Red\", \"Pink\", \"Orange\", \"Yellow\", \"Purple\", \"Green\", \"Cyan\", \"Blue\", \"Brown\", \"White\", \"Gray\", \"Black\" and \"Mixed\". Normally it is expected to have only 1 color family. May consider using single \"Mixed\" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).", +"items": { +"type": "string" +}, +"type": "array" +}, +"colors": { +"description": "The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single \"Mixed\" instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCompleteQueryResponse": { +"description": "Response of the autocomplete query.", +"id": "GoogleCloudRetailV2alphaCompleteQueryResponse", +"properties": { +"attributeResults": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult" +}, +"description": "A map of matched attribute suggestions. This field is only available for \"cloud-retail\" dataset. Current supported keys: * `brands` * `categories`", +"type": "object" +}, +"attributionToken": { +"description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", +"type": "string" +}, +"completionResults": { +"description": "Results of the matching suggestions. The result list is ordered and the first result is top suggestion.", +"items": { +"$ref": "GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult" +}, +"type": "array" +}, +"recentSearchResults": { +"deprecated": true, +"description": "Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support. This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * They are ordered from latest to oldest. * They are matched with CompleteQueryRequest.query case insensitively. * They are transformed to lower case. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.", +"items": { +"$ref": "GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult": { +"description": "Resource that represents attribute results.", +"id": "GoogleCloudRetailV2alphaCompleteQueryResponseAttributeResult", +"properties": { +"suggestions": { +"description": "The list of suggestions for the attribute.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult": { +"description": "Resource that represents completion results.", +"id": "GoogleCloudRetailV2alphaCompleteQueryResponseCompletionResult", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2alphaCustomAttribute" +}, +"description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.", +"type": "object" +}, +"facets": { +"description": "Facet information for the suggestion term. Gives the number of items resulting from a search with this suggestion term for each facet. This is an experimental feature for limited customers. If you want to receive this facet information, reach out to the Retail support team.", +"items": { +"$ref": "GoogleCloudRetailV2alphaSearchResponseFacet" +}, +"type": "array" +}, +"suggestion": { +"description": "The suggestion for the query.", +"type": "string" +}, +"totalProductCount": { +"description": "Total number of products associated with a search with this suggestion. This is an experimental feature for limited customers. If you want to receive this product count information, reach out to the Retail support team.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult": { +"deprecated": true, +"description": "Recent search of this user.", +"id": "GoogleCloudRetailV2alphaCompleteQueryResponseRecentSearchResult", +"properties": { +"recentSearch": { +"description": "The recent search query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCompletionConfig": { +"description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", +"id": "GoogleCloudRetailV2alphaCompletionConfig", +"properties": { +"allowlistInputConfig": { +"$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete allowlist phrases.", +"readOnly": true +}, +"autoLearning": { +"description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", +"type": "boolean" +}, +"denylistInputConfig": { +"$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete denylist phrases.", +"readOnly": true +}, +"lastAllowlistImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"lastDenylistImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"lastSuggestionsImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API method to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"matchingOrder": { +"description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", +"type": "string" +}, +"maxSuggestions": { +"description": "The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", +"format": "int32", +"type": "integer" +}, +"minPrefixLength": { +"description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", +"type": "string" +}, +"suggestionsInputConfig": { +"$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete suggestion phrases.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCompletionDataInputConfig": { +"description": "The input config source for completion data.", +"id": "GoogleCloudRetailV2alphaCompletionDataInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2alphaBigQuerySource", +"description": "Required. BigQuery input source. Add the IAM permission \"BigQuery Data Viewer\" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCompletionDetail": { +"description": "Detailed completion information including completion attribution token and clicked completion info.", +"id": "GoogleCloudRetailV2alphaCompletionDetail", +"properties": { +"completionAttributionToken": { +"description": "Completion attribution token in CompleteQueryResponse.attribution_token.", +"type": "string" +}, +"selectedPosition": { +"description": "End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.", +"format": "int32", +"type": "integer" +}, +"selectedSuggestion": { +"description": "End user selected CompleteQueryResponse.CompletionResult.suggestion.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCondition": { +"description": "Metadata that is used to define a condition that triggers an action. A valid condition must specify at least one of 'query_terms' or 'products_filter'. If multiple fields are specified, the condition is met if all the fields are satisfied e.g. if a set of query terms and product_filter are set, then only items matching the product_filter for requests with a query matching the query terms wil get boosted.", +"id": "GoogleCloudRetailV2alphaCondition", +"properties": { +"activeTimeRange": { +"description": "Range of time(s) specifying when Condition is active. Condition true if any time range matches.", +"items": { +"$ref": "GoogleCloudRetailV2alphaConditionTimeRange" +}, +"type": "array" +}, +"pageCategories": { +"description": "Used to support browse uses cases. A list (up to 10 entries) of categories or departments. The format should be the same as UserEvent.page_categories;", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).", +"items": { +"$ref": "GoogleCloudRetailV2alphaConditionQueryTerm" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaConditionQueryTerm": { +"description": "Query terms that we want to match on.", +"id": "GoogleCloudRetailV2alphaConditionQueryTerm", +"properties": { +"fullMatch": { +"description": "Whether this is supposed to be a full or partial match.", +"type": "boolean" +}, +"value": { +"description": "The value of the term to match on. Value cannot be empty. Value can have at most 3 terms if specified as a partial match. Each space separated string is considered as one term. For example, \"a b c\" is 3 terms and allowed, but \" a b c d\" is 4 terms and not allowed for a partial match.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaConditionTimeRange": { +"description": "Used for time-dependent conditions. Example: Want to have rule applied for week long sale.", +"id": "GoogleCloudRetailV2alphaConditionTimeRange", +"properties": { +"endTime": { +"description": "End of time range. Range is inclusive.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Start of time range. Range is inclusive.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaControl": { +"description": "Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time.", +"id": "GoogleCloudRetailV2alphaControl", +"properties": { +"associatedServingConfigIds": { +"description": "Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"displayName": { +"description": "Required. The human readable control display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown.", +"type": "string" +}, +"facetSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestFacetSpec", +"deprecated": true, +"description": "A facet specification to perform faceted search. Note that this field is deprecated and will throw NOT_IMPLEMENTED if used for creating a control." +}, +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/controls/*`", +"type": "string" +}, +"rule": { +"$ref": "GoogleCloudRetailV2alphaRule", +"description": "A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost \"gShoe\" when query full matches \"Running Shoes\"." +}, +"searchSolutionUseCase": { +"description": "Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.", +"items": { +"enum": [ +"SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", +"SEARCH_SOLUTION_USE_CASE_SEARCH", +"SEARCH_SOLUTION_USE_CASE_BROWSE" +], +"enumDescriptions": [ +"The value when it's unspecified. In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.", +"Search use case. Expects the traffic has a non-empty query.", +"Browse use case. Expects the traffic has an empty query." +], +"type": "string" +}, +"type": "array" +}, +"solutionTypes": { +"description": "Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata": { +"description": "Common metadata related to the progress of the operations.", +"id": "GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2alphaCreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCustomAttribute": { +"description": "A custom attribute that is not explicitly modeled in Product.", +"id": "GoogleCloudRetailV2alphaCustomAttribute", +"properties": { +"indexable": { +"deprecated": true, +"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.", +"type": "boolean" +}, +"numbers": { +"description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +}, +"searchable": { +"deprecated": true, +"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.", +"type": "boolean" +}, +"text": { +"description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaEnrollSolutionMetadata": { +"description": "Metadata related to the EnrollSolution method. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaEnrollSolutionMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaEnrollSolutionRequest": { +"description": "Request for EnrollSolution method.", +"id": "GoogleCloudRetailV2alphaEnrollSolutionRequest", +"properties": { +"solution": { +"description": "Required. Solution to enroll.", +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaEnrollSolutionResponse": { +"description": "Response for EnrollSolution method.", +"id": "GoogleCloudRetailV2alphaEnrollSolutionResponse", +"properties": { +"enrolledSolution": { +"description": "Retail API solution that the project has enrolled.", +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExperimentInfo": { +"description": "Metadata for active A/B testing Experiment.", +"id": "GoogleCloudRetailV2alphaExperimentInfo", +"properties": { +"experiment": { +"description": "The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`", +"type": "string" +}, +"servingConfigExperiment": { +"$ref": "GoogleCloudRetailV2alphaExperimentInfoServingConfigExperiment", +"description": "A/B test between existing Cloud Retail Search ServingConfigs." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExperimentInfoServingConfigExperiment": { +"description": "Metadata for active serving config A/B tests.", +"id": "GoogleCloudRetailV2alphaExperimentInfoServingConfigExperiment", +"properties": { +"experimentServingConfig": { +"description": "The fully qualified resource name of the serving config Experiment.VariantArm.serving_config_id responsible for generating the search response. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.", +"type": "string" +}, +"originalServingConfig": { +"description": "The fully qualified resource name of the original SearchRequest.placement in the search request prior to reassignment by experiment API. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportAnalyticsMetricsRequest": { +"description": "Request message for the `ExportAnalyticsMetrics` method.", +"id": "GoogleCloudRetailV2alphaExportAnalyticsMetricsRequest", +"properties": { +"filter": { +"description": "A filtering expression to specify restrictions on returned metrics. The expression is a sequence of terms. Each term applies a restriction to the returned metrics. Use this expression to restrict results to a specific time range. Currently we expect only one types of fields: * `timestamp`: This can be specified twice, once with a less than operator and once with a greater than operator. The `timestamp` restriction should result in one, contiguous, valid, `timestamp` range. Some examples of valid filters expressions: * Example 1: `timestamp > \"2012-04-23T18:25:43.511Z\" timestamp < \"2012-04-23T18:30:43.511Z\"` * Example 2: `timestamp > \"2012-04-23T18:25:43.511Z\"`", +"type": "string" +}, +"outputConfig": { +"$ref": "GoogleCloudRetailV2alphaOutputConfig", +"description": "Required. The output location of the data." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2alphaExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportProductsResponse": { +"description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportUserEventsResponse": { +"description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaFulfillmentInfo": { +"description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.", +"id": "GoogleCloudRetailV2alphaFulfillmentInfo", +"properties": { +"placeIds": { +"description": "The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaGcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2alphaGcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaGcsSource": { +"description": "Google Cloud Storage location for input content.", +"id": "GoogleCloudRetailV2alphaGcsSource", +"properties": { +"dataSchema": { +"description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719. Supported values for control imports: * `control` (default): One JSON Control per line. Supported values for catalog attribute imports: * `catalog_attribute` (default): One CSV CatalogAttribute per line.", +"type": "string" +}, +"inputUris": { +"description": "Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB. See [Importing product information](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog) for the expected file format and setup instructions.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaGetDefaultBranchResponse": { +"description": "Response message of CatalogService.GetDefaultBranch.", +"id": "GoogleCloudRetailV2alphaGetDefaultBranchResponse", +"properties": { +"branch": { +"description": "Full resource name of the branch id currently set as default branch.", +"type": "string" +}, +"note": { +"description": "This corresponds to SetDefaultBranchRequest.note field, when this branch was set as default.", +"type": "string" +}, +"setTime": { +"description": "The time when this branch is set to default.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImage": { +"description": "Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.", +"id": "GoogleCloudRetailV2alphaImage", +"properties": { +"height": { +"description": "Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", +"type": "string" +}, +"width": { +"description": "Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportCompletionDataRequest": { +"description": "Request message for ImportCompletionData methods.", +"id": "GoogleCloudRetailV2alphaImportCompletionDataRequest", +"properties": { +"inputConfig": { +"$ref": "GoogleCloudRetailV2alphaCompletionDataInputConfig", +"description": "Required. The desired input location of the data." +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2alphaImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2alphaImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"transformedUserEventsMetadata": { +"$ref": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", +"description": "Metadata related to transform user events." +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportProductsRequest": { +"description": "Request message for Import methods.", +"id": "GoogleCloudRetailV2alphaImportProductsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "The desired location of errors incurred during the Import." +}, +"inputConfig": { +"$ref": "GoogleCloudRetailV2alphaProductInputConfig", +"description": "Required. The desired input location of the data." +}, +"notificationPubsubTopic": { +"description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that both `cloud-retail-customer-data-access@system.gserviceaccount.com` and `service-@gcp-sa-retail.iam.gserviceaccount.com` have the `pubsub.topics.publish` IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", +"type": "string" +}, +"reconciliationMode": { +"description": "The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.", +"enum": [ +"RECONCILIATION_MODE_UNSPECIFIED", +"INCREMENTAL", +"FULL" +], +"enumDescriptions": [ +"Defaults to INCREMENTAL.", +"Inserts new products or updates existing products.", +"Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location." +], +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field has no effect.", +"type": "string" +}, +"skipDefaultBranchProtection": { +"description": "If true, this performs the FULL import even if it would delete a large proportion of the products in the default branch, which could potentially cause outages if you have live predict/search traffic. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", +"type": "boolean" +}, +"updateMask": { +"description": "Indicates which fields in the provided imported `products` to update. If not set, all fields are updated. If provided, only the existing product fields are updated. Missing products will not be created.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportUserEventsRequest": { +"description": "Request message for the ImportUserEvents request.", +"id": "GoogleCloudRetailV2alphaImportUserEventsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "The desired location of errors incurred during the Import. Cannot be set for inline user event imports." +}, +"inputConfig": { +"$ref": "GoogleCloudRetailV2alphaUserEventInputConfig", +"description": "Required. The desired input location of the data." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2alphaUserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaInterval": { +"description": "A floating point interval.", +"id": "GoogleCloudRetailV2alphaInterval", +"properties": { +"exclusiveMaximum": { +"description": "Exclusive upper bound.", +"format": "double", +"type": "number" +}, +"exclusiveMinimum": { +"description": "Exclusive lower bound.", +"format": "double", +"type": "number" +}, +"maximum": { +"description": "Inclusive upper bound.", +"format": "double", +"type": "number" +}, +"minimum": { +"description": "Inclusive lower bound.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListBranchesResponse": { +"description": "Response for BranchService.ListBranches method.", +"id": "GoogleCloudRetailV2alphaListBranchesResponse", +"properties": { +"branches": { +"description": "The Branches.", +"items": { +"$ref": "GoogleCloudRetailV2alphaBranch" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListCatalogsResponse": { +"description": "Response for CatalogService.ListCatalogs method.", +"id": "GoogleCloudRetailV2alphaListCatalogsResponse", +"properties": { +"catalogs": { +"description": "All the customer's Catalogs.", +"items": { +"$ref": "GoogleCloudRetailV2alphaCatalog" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be sent as ListCatalogsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListControlsResponse": { +"description": "Response for ListControls method.", +"id": "GoogleCloudRetailV2alphaListControlsResponse", +"properties": { +"controls": { +"description": "All the Controls for a given catalog.", +"items": { +"$ref": "GoogleCloudRetailV2alphaControl" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListEnrolledSolutionsResponse": { +"description": "Response for ListEnrolledSolutions method.", +"id": "GoogleCloudRetailV2alphaListEnrolledSolutionsResponse", +"properties": { +"enrolledSolutions": { +"description": "Retail API solutions that the project has enrolled.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse": { +"description": "Response for MerchantCenterAccountLinkService.ListMerchantCenterAccountLinks method.", +"id": "GoogleCloudRetailV2alphaListMerchantCenterAccountLinksResponse", +"properties": { +"merchantCenterAccountLinks": { +"description": "The links.", +"items": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterAccountLink" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListModelsResponse": { +"description": "Response to a ListModelRequest.", +"id": "GoogleCloudRetailV2alphaListModelsResponse", +"properties": { +"models": { +"description": "List of Models.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModel" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListProductsResponse": { +"description": "Response message for ProductService.ListProducts method.", +"id": "GoogleCloudRetailV2alphaListProductsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"products": { +"description": "The Products.", +"items": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"type": "array" +}, +"totalSize": { +"description": "The total count of matched Products irrespective of pagination. The total number of Products returned by pagination may be less than the total_size that matches. This field is ignored if ListProductsRequest.require_total_size is not set or ListProductsRequest.page_token is not empty.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaListServingConfigsResponse": { +"description": "Response for ListServingConfigs method.", +"id": "GoogleCloudRetailV2alphaListServingConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +}, +"servingConfigs": { +"description": "All the ServingConfigs for a given catalog.", +"items": { +"$ref": "GoogleCloudRetailV2alphaServingConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaLocalInventory": { +"description": "The inventory information at a place (e.g. a store) identified by a place ID.", +"id": "GoogleCloudRetailV2alphaLocalInventory", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2alphaCustomAttribute" +}, +"description": "Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.", +"type": "object" +}, +"fulfillmentTypes": { +"description": "Input only. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"placeId": { +"description": "The place ID for the current set of inventory information.", +"type": "string" +}, +"priceInfo": { +"$ref": "GoogleCloudRetailV2alphaPriceInfo", +"description": "Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371)." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaLoggingConfig": { +"description": "Project level logging config to control what level of log will be generated and written to Cloud Logging.", +"id": "GoogleCloudRetailV2alphaLoggingConfig", +"properties": { +"defaultLogGenerationRule": { +"$ref": "GoogleCloudRetailV2alphaLoggingConfigLogGenerationRule", +"description": "The log generation rule that applies by default to all services supporting log generation. It can be overridden by ServiceLogGenerationRule for service level control." +}, +"name": { +"description": "Required. Immutable. The name of the LoggingConfig singleton resource. Format: projects/*/loggingConfig", +"type": "string" +}, +"serviceLogGenerationRules": { +"description": "Controls logging configurations more granularly for each supported service. This overrides the default_log_generation_rule for the services specified. For those not mentioned, they will fallback to the default log generation rule.", +"items": { +"$ref": "GoogleCloudRetailV2alphaLoggingConfigServiceLogGenerationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaLoggingConfigLogGenerationRule": { +"description": "The logging configurations for services supporting log generation.", +"id": "GoogleCloudRetailV2alphaLoggingConfigLogGenerationRule", +"properties": { +"infoLogSampleRate": { +"description": "The log sample rate for INFO level log entries. You can use this to reduce the number of entries generated for INFO level logs. DO NOT set this field if the logging_level is not LoggingLevel.LOG_ALL. Otherwise, an INVALID_ARGUMENT error is returned. Sample rate for INFO logs defaults to 1 when unset (generate and send all INFO logs to Cloud Logging). Its value must be greater than 0 and less than or equal to 1.", +"format": "float", +"type": "number" +}, +"loggingLevel": { +"description": "The logging level. By default it is set to `LOG_WARNINGS_AND_ABOVE`.", +"enum": [ +"LOGGING_LEVEL_UNSPECIFIED", +"LOGGING_DISABLED", +"LOG_ERRORS_AND_ABOVE", +"LOG_WARNINGS_AND_ABOVE", +"LOG_ALL" +], +"enumDescriptions": [ +"Default value. Defaults to `LOG_FOR_WARNINGS_AND_ABOVE` if unset.", +"No log will be generated and sent to Cloud Logging.", +"Log for operations resulted in fatal error.", +"In addition to `LOG_ERRORS_AND_ABOVE`, also log for operations that have soft errors, quality suggestions.", +"Log all operations, including successful ones." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaLoggingConfigServiceLogGenerationRule": { +"description": "The granular logging configurations for supported services.", +"id": "GoogleCloudRetailV2alphaLoggingConfigServiceLogGenerationRule", +"properties": { +"logGenerationRule": { +"$ref": "GoogleCloudRetailV2alphaLoggingConfigLogGenerationRule", +"description": "The log generation rule that applies to this service." +}, +"serviceName": { +"description": "Required. Supported service names: \"CatalogService\", \"CompletionService\", \"ControlService\", \"MerchantCenterStreaming\", \"ModelService\", \"PredictionService\", \"ProductService\", \"ServingConfigService\", \"UserEventService\",", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterAccountLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2alphaMerchantCenterAccountLink", +"properties": { +"branchId": { +"description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"feedFilters": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter" +}, +"type": "array" +}, +"feedLabel": { +"description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", +"type": "string" +}, +"id": { +"description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", +"readOnly": true, +"type": "string" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", +"readOnly": true, +"type": "string" +}, +"projectId": { +"description": "Output only. Google Cloud project ID.", +"readOnly": true, +"type": "string" +}, +"source": { +"description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", +"type": "string" +}, +"state": { +"description": "Output only. Represents the state of the link.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED" +], +"enumDescriptions": [ +"Default value.", +"Link is created and LRO is not complete.", +"Link is active.", +"Link creation failed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2alphaMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2alphaMerchantCenterLink", +"properties": { +"branchId": { +"description": "The branch ID (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"destinations": { +"description": "String representing the destination to import for, all if left empty. List of possible values is given in [Included destination](https://support.google.com/merchants/answer/7501026). List of allowed string values: \"Shopping_ads\", \"Buy_on_google_listings\", \"Display_ads\", \"Local_inventory _ads\", \"Free_listings\", \"Free_local_listings\" NOTE: The string values are case sensitive.", +"items": { +"type": "string" +}, +"type": "array" +}, +"feeds": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterFeedFilter" +}, +"type": "array" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant Center account ID](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"regionCode": { +"description": "Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found [here](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) under the `region` tag. If left blank no region filtering will be performed. Example value: `US`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterLinkingConfig": { +"description": "Configures Merchant Center linking. Links contained in the config will be used to sync data from a Merchant Center account to a Cloud Retail branch.", +"id": "GoogleCloudRetailV2alphaMerchantCenterLinkingConfig", +"properties": { +"links": { +"description": "Links between Merchant Center accounts and branches.", +"items": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterLink" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModel": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2alphaModel", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2alphaModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"pageOptimizationConfig": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", +"description": "Optional. The page optimization config." +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2alphaModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfig": { +"description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", +"properties": { +"pageOptimizationEventType": { +"description": "Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: * `add-to-cart`: Products being added to cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed * `category-page-view`: Homepage viewed * `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view` only allows models with type `recommended-for-you`. All other page_optimization_event_type allow all Model.types.", +"type": "string" +}, +"panels": { +"description": "Required. A list of panel configurations. Limit = 5.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel" +}, +"type": "array" +}, +"restriction": { +"description": "Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.", +"enum": [ +"RESTRICTION_UNSPECIFIED", +"NO_RESTRICTION", +"UNIQUE_SERVING_CONFIG_RESTRICTION", +"UNIQUE_MODEL_RESTRICTION", +"UNIQUE_MODEL_TYPE_RESTRICTION" +], +"enumDescriptions": [ +"Unspecified value for restriction.", +"Allow any ServingConfig to be show on any number of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity `Panel2 candidates`: home_page_ctr_no_diversity, home_page_ctr_diversity, pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: []", +"Do not allow the same ServingConfig.name to be shown on multiple panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_SERVING_CONFIG_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) *", +"Do not allow multiple ServingConfigs with same Model.name to be show on on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) *", +"Do not allow multiple ServingConfigs with same Model.type to be shown on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) *" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate": { +"description": "A candidate to consider for a given panel. Currently only ServingConfig are valid candidates.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", +"properties": { +"servingConfigId": { +"description": "This has to be a valid ServingConfig identifier. For example, for a ServingConfig with full name: `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`, this would be `my_candidate_config`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel": { +"description": "An individual panel with a list of ServingConfigs to consider for it.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", +"properties": { +"candidates": { +"description": "Required. The candidates to consider on the panel.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" +}, +"type": "array" +}, +"defaultCandidate": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", +"description": "Required. The default candidate. If the model fails at serving time, we fall back to the default." +}, +"displayName": { +"description": "Optional. The name to display for the panel.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2alphaModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaOutputConfig": { +"description": "The output configuration setting.", +"id": "GoogleCloudRetailV2alphaOutputConfig", +"properties": { +"bigqueryDestination": { +"$ref": "GoogleCloudRetailV2alphaOutputConfigBigQueryDestination", +"description": "The BigQuery location where the output is to be written to." +}, +"gcsDestination": { +"$ref": "GoogleCloudRetailV2alphaOutputConfigGcsDestination", +"description": "The Google Cloud Storage location where the output is to be written to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaOutputConfigBigQueryDestination": { +"description": "The BigQuery output destination configuration.", +"id": "GoogleCloudRetailV2alphaOutputConfigBigQueryDestination", +"properties": { +"datasetId": { +"description": "Required. The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableIdPrefix": { +"description": "Required. The prefix of exported BigQuery tables.", +"type": "string" +}, +"tableType": { +"description": "Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaOutputConfigGcsDestination": { +"description": "The Google Cloud Storage output destination configuration.", +"id": "GoogleCloudRetailV2alphaOutputConfigGcsDestination", +"properties": { +"outputUriPrefix": { +"description": "Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaOutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2alphaOutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2alphaBigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2alphaGcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPauseModelRequest": { +"description": "Request for pausing training of a model.", +"id": "GoogleCloudRetailV2alphaPauseModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPredictRequest": { +"description": "Request message for Predict method.", +"id": "GoogleCloudRetailV2alphaPredictRequest", +"properties": { +"filter": { +"description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return *no* results. If instead you want empty result sets to return generic (unfiltered) popular products, set `strictFiltering` to False in `PredictRequest.params`. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\")) For more information, see [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs).", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", +"type": "object" +}, +"pageSize": { +"description": "Maximum number of results to return. Set this property to the number of prediction results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"deprecated": true, +"description": "This field is not used; leave it unset.", +"type": "string" +}, +"params": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of a product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", +"type": "object" +}, +"userEvent": { +"$ref": "GoogleCloudRetailV2alphaUserEvent", +"description": "Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.visitor_id or UserInfo.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.visitor_id to a random unique ID and leave UserInfo.user_id unset." +}, +"validateOnly": { +"description": "Use validate only mode for this prediction query. If set to true, a dummy model will be used that returns arbitrary products. Note that the validate only mode should only be used for testing the API, or if the model is not ready.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPredictResponse": { +"description": "Response message for predict method.", +"id": "GoogleCloudRetailV2alphaPredictResponse", +"properties": { +"attributionToken": { +"description": "A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", +"type": "string" +}, +"missingIds": { +"description": "IDs of products in the request that were missing from the inventory.", +"items": { +"type": "string" +}, +"type": "array" +}, +"results": { +"description": "A list of recommended products. The order represents the ranking (from the most relevant product to the least).", +"items": { +"$ref": "GoogleCloudRetailV2alphaPredictResponsePredictionResult" +}, +"type": "array" +}, +"validateOnly": { +"description": "True if the validateOnly property was set in the request.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPredictResponsePredictionResult": { +"description": "PredictionResult represents the recommendation prediction results.", +"id": "GoogleCloudRetailV2alphaPredictResponsePredictionResult", +"properties": { +"id": { +"description": "ID of the recommended product", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional product metadata / annotations. Possible values: * `product`: JSON representation of the product. Is set if `returnProduct` is set to true in `PredictRequest.params`. * `score`: Prediction score in double value. Is set if `returnScore` is set to true in `PredictRequest.params`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPriceInfo": { +"description": "The price information of a Product.", +"id": "GoogleCloudRetailV2alphaPriceInfo", +"properties": { +"cost": { +"description": "The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).", +"format": "float", +"type": "number" +}, +"currencyCode": { +"description": "The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.", +"type": "string" +}, +"originalPrice": { +"description": "Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.", +"format": "float", +"type": "number" +}, +"price": { +"description": "Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).", +"format": "float", +"type": "number" +}, +"priceEffectiveTime": { +"description": "The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.", +"format": "google-datetime", +"type": "string" +}, +"priceExpireTime": { +"description": "The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.", +"format": "google-datetime", +"type": "string" +}, +"priceRange": { +"$ref": "GoogleCloudRetailV2alphaPriceInfoPriceRange", +"description": "Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPriceInfoPriceRange": { +"description": "The price range of all variant Product having the same Product.primary_product_id.", +"id": "GoogleCloudRetailV2alphaPriceInfoPriceRange", +"properties": { +"originalPrice": { +"$ref": "GoogleCloudRetailV2alphaInterval", +"description": "The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id." +}, +"price": { +"$ref": "GoogleCloudRetailV2alphaInterval", +"description": "The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaProduct": { +"description": "Product captures all metadata information of items to be recommended or searched.", +"id": "GoogleCloudRetailV2alphaProduct", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2alphaCustomAttribute" +}, +"description": "Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ \"vendor\": {\"text\": [\"vendor123\", \"vendor456\"]}, \"lengths_cm\": {\"numbers\":[2.3, 15.4]}, \"heights_cm\": {\"numbers\":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.", +"type": "object" +}, +"audience": { +"$ref": "GoogleCloudRetailV2alphaAudience", +"description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." +}, +"availability": { +"description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", +"enum": [ +"AVAILABILITY_UNSPECIFIED", +"IN_STOCK", +"OUT_OF_STOCK", +"PREORDER", +"BACKORDER" +], +"enumDescriptions": [ +"Default product availability. Default to Availability.IN_STOCK if unset.", +"Product in stock.", +"Product out of stock.", +"Product that is in pre-order state.", +"Product that is back-ordered (i.e. temporarily out of stock)." +], +"type": "string" +}, +"availableQuantity": { +"description": "The available quantity of the item.", +"format": "int32", +"type": "integer" +}, +"availableTime": { +"description": "The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.", +"format": "google-datetime", +"type": "string" +}, +"brands": { +"description": "The brands of the product. A maximum of 30 brands are allowed unless overridden through the Google Cloud console. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).", +"items": { +"type": "string" +}, +"type": "array" +}, +"categories": { +"description": "Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both [\"Shoes & Accessories\" -> \"Shoes\"] and [\"Sports & Fitness\" -> \"Athletic Clothing\" -> \"Shoes\"], it could be represented as: \"categories\": [ \"Shoes & Accessories > Shoes\", \"Sports & Fitness > Athletic Clothing > Shoes\" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product unless overridden through the Google Cloud console. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436", +"items": { +"type": "string" +}, +"type": "array" +}, +"collectionMemberIds": { +"description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", +"items": { +"type": "string" +}, +"type": "array" +}, +"colorInfo": { +"$ref": "GoogleCloudRetailV2alphaColorInfo", +"description": "The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color)." +}, +"conditions": { +"description": "The condition of the product. Strongly encouraged to use the standard values: \"new\", \"refurbished\", \"used\". A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).", +"items": { +"type": "string" +}, +"type": "array" +}, +"description": { +"description": "Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).", +"type": "string" +}, +"expireTime": { +"description": "Note that this field is applied in the following ways: * If the Product is already expired when it is uploaded, this product is not indexed for search. * If the Product is not expired when it is uploaded, only the Type.PRIMARY's and Type.COLLECTION's expireTime is respected, and Type.VARIANT's expireTime is not used. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).", +"format": "google-datetime", +"type": "string" +}, +"fulfillmentInfo": { +"description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"$ref": "GoogleCloudRetailV2alphaFulfillmentInfo" +}, +"type": "array" +}, +"gtin": { +"description": "The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"id": { +"description": "Immutable. Product identifier, which is the final component of name. For example, this field is \"id_1\", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).", +"type": "string" +}, +"images": { +"description": "Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", +"items": { +"$ref": "GoogleCloudRetailV2alphaImage" +}, +"type": "array" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to \"en-US\" if unset.", +"type": "string" +}, +"localInventories": { +"description": "Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.", +"items": { +"$ref": "GoogleCloudRetailV2alphaLocalInventory" +}, +"readOnly": true, +"type": "array" +}, +"materials": { +"description": "The material of the product. For example, \"leather\", \"wooden\". A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"type": "string" +}, +"patterns": { +"description": "The pattern or graphic print of the product. For example, \"striped\", \"polka dot\", \"paisley\". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).", +"items": { +"type": "string" +}, +"type": "array" +}, +"priceInfo": { +"$ref": "GoogleCloudRetailV2alphaPriceInfo", +"description": "Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371)." +}, +"primaryProductId": { +"description": "Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).", +"type": "string" +}, +"promotions": { +"description": "The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.", +"items": { +"$ref": "GoogleCloudRetailV2alphaPromotion" +}, +"type": "array" +}, +"publishTime": { +"description": "The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.", +"format": "google-datetime", +"type": "string" +}, +"rating": { +"$ref": "GoogleCloudRetailV2alphaRating", +"description": "The rating of this product." +}, +"retrievableFields": { +"deprecated": true, +"description": "Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form \"attributes.key\" where \"key\" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.", +"format": "google-fieldmask", +"type": "string" +}, +"sizes": { +"description": "The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in \"US:MENS:M\", \"US\" represents size system; \"MENS\" represents size type; \"M\" represents size value. In \"GIRLS:27\", size system is empty; \"GIRLS\" represents size type; \"27\" represents size value. In \"32 inches\", both size system and size type are empty, while size value is \"32 inches\". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).", +"items": { +"type": "string" +}, +"type": "array" +}, +"tags": { +"description": "Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0\u20134](https://support.google.com/merchants/answer/6324473).", +"items": { +"type": "string" +}, +"type": "array" +}, +"title": { +"description": "Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).", +"type": "string" +}, +"ttl": { +"description": "Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.", +"format": "google-duration", +"type": "string" +}, +"type": { +"description": "Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.", +"enum": [ +"TYPE_UNSPECIFIED", +"PRIMARY", +"VARIANT", +"COLLECTION" +], +"enumDescriptions": [ +"Default value. Default to Catalog.product_level_config.ingestion_product_type if unset.", +"The primary type. As the primary unit for predicting, indexing and search serving, a Type.PRIMARY Product is grouped with multiple Type.VARIANT Products.", +"The variant type. Type.VARIANT Products usually share some common attributes on the same Type.PRIMARY Products, but they have variant attributes like different colors, sizes and prices, etc.", +"The collection type. Collection products are bundled Type.PRIMARY Products or Type.VARIANT Products that are sold together, such as a jewelry set with necklaces, earrings and rings, etc." +], +"type": "string" +}, +"uri": { +"description": "Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).", +"type": "string" +}, +"variants": { +"description": "Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.", +"items": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaProductDetail": { +"description": "Detailed product information associated with a user event.", +"id": "GoogleCloudRetailV2alphaProductDetail", +"properties": { +"product": { +"$ref": "GoogleCloudRetailV2alphaProduct", +"description": "Required. Product information. Required field(s): * Product.id Optional override field(s): * Product.price_info If any supported optional fields are provided, we will treat them as a full override when looking up product information from the catalog. Thus, it is important to ensure that the overriding fields are accurate and complete. All other product fields are ignored and instead populated via catalog lookup after event ingestion." +}, +"quantity": { +"description": "Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for `purchase-complete` event. Required for `add-to-cart` and `purchase-complete` event types.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaProductInlineSource": { +"description": "The inline source for the input config for ImportProducts method.", +"id": "GoogleCloudRetailV2alphaProductInlineSource", +"properties": { +"products": { +"description": "Required. A list of products to update/create. Each product must have a valid Product.id. Recommended max of 100 items.", +"items": { +"$ref": "GoogleCloudRetailV2alphaProduct" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaProductInputConfig": { +"description": "The input config source for products.", +"id": "GoogleCloudRetailV2alphaProductInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2alphaBigQuerySource", +"description": "BigQuery input source." +}, +"gcsSource": { +"$ref": "GoogleCloudRetailV2alphaGcsSource", +"description": "Google Cloud Storage location for the input content." +}, +"productInlineSource": { +"$ref": "GoogleCloudRetailV2alphaProductInlineSource", +"description": "The Inline source for the input content for products." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaProductLevelConfig": { +"description": "Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made.", +"id": "GoogleCloudRetailV2alphaProductLevelConfig", +"properties": { +"ingestionProductType": { +"description": "The type of Products allowed to be ingested into the catalog. Acceptable values are: * `primary` (default): You can ingest Products of all types. When ingesting a Product, its type will default to Product.Type.PRIMARY if unset. * `variant` (incompatible with Retail Search): You can only ingest Product.Type.VARIANT Products. This means Product.primary_product_id cannot be empty. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `variant` and merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error is returned. See [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels) for more details.", +"type": "string" +}, +"merchantCenterProductIdField": { +"description": "Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-center-products-schema) should be imported as Product.id. Acceptable values are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail API will choose one item from the ones with the same `itemGroupId`, and use it to represent the item group. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned. See [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels) for more details.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaProject": { +"description": "Metadata that describes a Cloud Retail Project.", +"id": "GoogleCloudRetailV2alphaProject", +"properties": { +"enrolledSolutions": { +"description": "Output only. Retail API solutions that the project has enrolled.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. Full resource name of the retail project, such as `projects/{project_id_or_number}/retailProject`.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPromotion": { +"description": "Promotion specification.", +"id": "GoogleCloudRetailV2alphaPromotion", +"properties": { +"promotionId": { +"description": "Promotion identifier, which is the final component of name. For example, this field is \"free_gift\", if name is `projects/*/locations/global/catalogs/default_catalog/promotions/free_gift`. The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property [promotion_id](https://support.google.com/merchants/answer/7050148).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurchaseTransaction": { +"description": "A transaction represents the entire purchase transaction.", +"id": "GoogleCloudRetailV2alphaPurchaseTransaction", +"properties": { +"cost": { +"description": "All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = revenue - tax - cost", +"format": "float", +"type": "number" +}, +"currencyCode": { +"description": "Required. Currency code. Use three-character ISO-4217 code.", +"type": "string" +}, +"id": { +"description": "The transaction ID with a length limit of 128 characters.", +"type": "string" +}, +"revenue": { +"description": "Required. Total non-zero revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations.", +"format": "float", +"type": "number" +}, +"tax": { +"description": "All the taxes associated with the transaction.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaPurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaPurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeProductsRequest": { +"description": "Request message for PurgeProducts method.", +"id": "GoogleCloudRetailV2alphaPurgeProductsRequest", +"properties": { +"filter": { +"description": "Required. The filter string to specify the products to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. \"*\" implies delete all items in a branch. The eligible fields for filtering are: * `availability`: Double quoted Product.availability string. * `create_time` : in ISO 8601 \"zulu\" format. Supported syntax: * Comparators (\">\", \"<\", \">=\", \"<=\", \"=\"). Examples: * create_time <= \"2015-02-13T17:05:46Z\" * availability = \"IN_STOCK\" * Conjunctions (\"AND\") Examples: * create_time <= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\" * Disjunctions (\"OR\") Examples: * create_time <= \"2015-02-13T17:05:46Z\" OR availability = \"IN_STOCK\" * Can support nested queries. Examples: * (create_time <= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\") OR (create_time >= \"2015-02-14T13:03:32Z\" AND availability = \"IN_STOCK\") * Filter Limits: * Filter should not contain more than 6 conditions. * Max nesting depth should not exceed 2 levels. Examples queries: * Delete back order products created before a timestamp. create_time <= \"2015-02-13T17:05:46Z\" OR availability = \"BACKORDER\"", +"type": "string" +}, +"force": { +"description": "Actually perform the purge. If `force` is set to false, the method will return the expected purge count without deleting any products.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2alphaPurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeUserEventsRequest": { +"description": "Request message for PurgeUserEvents method.", +"id": "GoogleCloudRetailV2alphaPurgeUserEventsRequest", +"properties": { +"filter": { +"description": "Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. The eligible fields for filtering are: * `eventType`: Double quoted UserEvent.event_type string. * `eventTime`: in ISO 8601 \"zulu\" format. * `visitorId`: Double quoted string. Specifying this will delete all events associated with a visitor. * `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\"` * Deleting specific eventType in time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventType = \"detail-page-view\"` * Deleting all events for a specific visitor: `visitorId = \"visitor1024\"` The filtering fields are assumed to have an implicit AND.", +"type": "string" +}, +"force": { +"description": "Actually perform the purge. If `force` is set to false, the method will return the expected purge count without deleting any user events.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2alphaPurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRating": { +"description": "The rating of a Product.", +"id": "GoogleCloudRetailV2alphaRating", +"properties": { +"averageRating": { +"description": "The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "float", +"type": "number" +}, +"ratingCount": { +"description": "The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"ratingHistogram": { +"description": "List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2alphaRejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRejoinUserEventsRequest": { +"description": "Request message for RejoinUserEvents method.", +"id": "GoogleCloudRetailV2alphaRejoinUserEventsRequest", +"properties": { +"userEventRejoinScope": { +"description": "The type of the user event rejoin to define the scope and range of the user events to be rejoined with the latest product catalog. Defaults to `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to an invalid integer value.", +"enum": [ +"USER_EVENT_REJOIN_SCOPE_UNSPECIFIED", +"JOINED_EVENTS", +"UNJOINED_EVENTS" +], +"enumDescriptions": [ +"Rejoin all events with the latest product catalog, including both joined events and unjoined events.", +"Only rejoin joined events with the latest product catalog.", +"Only rejoin unjoined events with the latest product catalog." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2alphaRejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest": { +"description": "Request for CatalogService.RemoveCatalogAttribute method.", +"id": "GoogleCloudRetailV2alphaRemoveCatalogAttributeRequest", +"properties": { +"key": { +"description": "Required. The attribute name key of the CatalogAttribute to remove.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveControlRequest": { +"description": "Request for RemoveControl method.", +"id": "GoogleCloudRetailV2alphaRemoveControlRequest", +"properties": { +"controlId": { +"description": "Required. The id of the control to apply. Assumed to be in the same catalog as the serving config.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest": { +"description": "Request message for ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. The IDs for this type, such as the store IDs for \"pickup-in-store\" or the region IDs for \"same-day-delivery\", to be removed for this type. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"removeTime": { +"description": "The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest": { +"description": "Request message for ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2alphaRemoveLocalInventoriesRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product is not found, the local inventory removal request will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. A list of place IDs to have their inventory deleted. At most 3000 place IDs are allowed per request.", +"items": { +"type": "string" +}, +"type": "array" +}, +"removeTime": { +"description": "The time when the inventory deletions are issued. Used to prevent out-of-order updates and deletions on local inventory fields. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaReplaceCatalogAttributeRequest": { +"description": "Request for CatalogService.ReplaceCatalogAttribute method.", +"id": "GoogleCloudRetailV2alphaReplaceCatalogAttributeRequest", +"properties": { +"catalogAttribute": { +"$ref": "GoogleCloudRetailV2alphaCatalogAttribute", +"description": "Required. The updated CatalogAttribute." +}, +"updateMask": { +"description": "Indicates which fields in the provided CatalogAttribute to update. The following are NOT supported: * CatalogAttribute.key If not set, all supported fields are updated.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaResumeModelRequest": { +"description": "Request for resuming training of a model.", +"id": "GoogleCloudRetailV2alphaResumeModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRule": { +"description": "A rule is a condition-action pair * A condition defines when a rule is to be triggered. * An action specifies what occurs on that trigger. Currently rules only work for controls with SOLUTION_TYPE_SEARCH.", +"id": "GoogleCloudRetailV2alphaRule", +"properties": { +"boostAction": { +"$ref": "GoogleCloudRetailV2alphaRuleBoostAction", +"description": "A boost action." +}, +"condition": { +"$ref": "GoogleCloudRetailV2alphaCondition", +"description": "Required. The condition that triggers the rule. If the condition is empty, the rule will always apply." +}, +"doNotAssociateAction": { +"$ref": "GoogleCloudRetailV2alphaRuleDoNotAssociateAction", +"description": "Prevents term from being associated with other terms." +}, +"filterAction": { +"$ref": "GoogleCloudRetailV2alphaRuleFilterAction", +"description": "Filters results." +}, +"forceReturnFacetAction": { +"$ref": "GoogleCloudRetailV2alphaRuleForceReturnFacetAction", +"description": "Force returns an attribute as a facet in the request." +}, +"ignoreAction": { +"$ref": "GoogleCloudRetailV2alphaRuleIgnoreAction", +"description": "Ignores specific terms from query during search." +}, +"onewaySynonymsAction": { +"$ref": "GoogleCloudRetailV2alphaRuleOnewaySynonymsAction", +"description": "Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term." +}, +"redirectAction": { +"$ref": "GoogleCloudRetailV2alphaRuleRedirectAction", +"description": "Redirects a shopper to a specific page." +}, +"removeFacetAction": { +"$ref": "GoogleCloudRetailV2alphaRuleRemoveFacetAction", +"description": "Remove an attribute as a facet in the request (if present)." +}, +"replacementAction": { +"$ref": "GoogleCloudRetailV2alphaRuleReplacementAction", +"description": "Replaces specific terms in the query." +}, +"twowaySynonymsAction": { +"$ref": "GoogleCloudRetailV2alphaRuleTwowaySynonymsAction", +"description": "Treats a set of terms as synonyms of one another." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleBoostAction": { +"description": "A boost action to apply to results matching condition specified above.", +"id": "GoogleCloudRetailV2alphaRuleBoostAction", +"properties": { +"boost": { +"description": "Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.", +"format": "float", +"type": "number" +}, +"productsFilter": { +"description": "The filter can have a max size of 5000 characters. An expression which specifies which products to apply an action to. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": *(id: ANY(\"product_1\", \"product_2\")) * *AND * *(colorFamilies: ANY(\"Red\", \"Blue\")) *", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleDoNotAssociateAction": { +"description": "Prevents `query_term` from being associated with specified terms during search. Example: Don't associate \"gShoe\" and \"cheap\".", +"id": "GoogleCloudRetailV2alphaRuleDoNotAssociateAction", +"properties": { +"doNotAssociateTerms": { +"description": "Cannot contain duplicates or the query term. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "Terms from the search query. Will not consider do_not_associate_terms for search if in search query. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"terms": { +"description": "Will be [deprecated = true] post migration;", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleFilterAction": { +"description": "* Rule Condition: - No Condition.query_terms provided is a global match. - 1 or more Condition.query_terms provided are combined with OR operator. * Action Input: The request query and filter that are applied to the retrieved products, in addition to any filters already provided with the SearchRequest. The AND operator is used to combine the query's existing filters with the filter rule(s). NOTE: May result in 0 results when filters conflict. * Action Result: Filters the returned objects to be ONLY those that passed the filter.", +"id": "GoogleCloudRetailV2alphaRuleFilterAction", +"properties": { +"filter": { +"description": "A filter to apply on the matching condition results. Supported features: * filter must be set. * Filter syntax is identical to SearchRequest.filter. For more information, see [Filter](/retail/docs/filter-and-order#filter). * To filter products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": *(id: ANY(\"product_1\", \"product_2\")) * *AND * *(colorFamilies: ANY(\"Red\", \"Blue\")) *", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleForceReturnFacetAction": { +"description": "Force returns an attribute/facet in the request around a certain position or above. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Inputs: attribute name, position * Action Result: Will force return a facet key around a certain position or above if the condition is satisfied. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\", the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is \"size\" and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two cases: a) The facet key \"size\" is not already in the top 8 slots, then the facet \"size\" will appear at a position close to 8. b) The facet key \"size\" in among the top 8 positions in the request, then it will stay at its current rank.", +"id": "GoogleCloudRetailV2alphaRuleForceReturnFacetAction", +"properties": { +"facetPositionAdjustments": { +"description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", +"items": { +"$ref": "GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment": { +"description": "Each facet position adjustment consists of a single attribute name (i.e. facet key) along with a specified position.", +"id": "GoogleCloudRetailV2alphaRuleForceReturnFacetActionFacetPositionAdjustment", +"properties": { +"attributeName": { +"description": "The attribute name to force return as a facet. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters long.", +"type": "string" +}, +"position": { +"description": "This is the position in the request as explained above. It should be strictly positive be at most 100.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleIgnoreAction": { +"description": "Prevents a term in the query from being used in search. Example: Don't search for \"shoddy\".", +"id": "GoogleCloudRetailV2alphaRuleIgnoreAction", +"properties": { +"ignoreTerms": { +"description": "Terms to ignore in the search query.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleOnewaySynonymsAction": { +"description": "Maps a set of terms to a set of synonyms. Set of synonyms will be treated as synonyms of each query term only. `query_terms` will not be treated as synonyms of each other. Example: \"sneakers\" will use a synonym of \"shoes\". \"shoes\" will not use a synonym of \"sneakers\".", +"id": "GoogleCloudRetailV2alphaRuleOnewaySynonymsAction", +"properties": { +"onewayTerms": { +"description": "Will be [deprecated = true] post migration;", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"synonyms": { +"description": "Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleRedirectAction": { +"description": "Redirects a shopper to a specific page. * Rule Condition: Must specify Condition.query_terms. * Action Input: Request Query * Action Result: Redirects shopper to provided uri.", +"id": "GoogleCloudRetailV2alphaRuleRedirectAction", +"properties": { +"redirectUri": { +"description": "URL must have length equal or less than 2000 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleRemoveFacetAction": { +"description": "Removes an attribute/facet in the request if is present. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Input: attribute name * Action Result: Will remove the attribute (as a facet) from the request if it is present. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\" and the attribute name \"size\", then facet key \"size\" will be removed from the request (if it is present).", +"id": "GoogleCloudRetailV2alphaRuleRemoveFacetAction", +"properties": { +"attributeNames": { +"description": "The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleReplacementAction": { +"description": "Replaces a term in the query. Multiple replacement candidates can be specified. All `query_terms` will be replaced with the replacement term. Example: Replace \"gShoe\" with \"google shoe\".", +"id": "GoogleCloudRetailV2alphaRuleReplacementAction", +"properties": { +"queryTerms": { +"description": "Terms from the search query. Will be replaced by replacement term. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replacementTerm": { +"description": "Term that will be used for replacement.", +"type": "string" +}, +"term": { +"description": "Will be [deprecated = true] post migration;", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRuleTwowaySynonymsAction": { +"description": "Creates a set of terms that will be treated as synonyms of each other. Example: synonyms of \"sneakers\" and \"shoes\": * \"sneakers\" will use a synonym of \"shoes\". * \"shoes\" will use a synonym of \"sneakers\".", +"id": "GoogleCloudRetailV2alphaRuleTwowaySynonymsAction", +"properties": { +"synonyms": { +"description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequest": { +"description": "Request message for SearchService.Search method.", +"id": "GoogleCloudRetailV2alphaSearchRequest", +"properties": { +"boostSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestBoostSpec", +"description": "Boost specification to boost certain products. For more information, see [Boost results](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions." +}, +"branch": { +"description": "The branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use \"default_branch\" as the branch ID or leave this field empty, to search products under the default branch.", +"type": "string" +}, +"canonicalFilter": { +"description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", +"type": "string" +}, +"dynamicFacetSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec", +"deprecated": true, +"description": "Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated." +}, +"entity": { +"description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.", +"type": "string" +}, +"facetSpecs": { +"description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestFacetSpec" +}, +"type": "array" +}, +"filter": { +"description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. Filter expression is case-sensitive. For more information, see [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). If this field is unrecognizable, an INVALID_ARGUMENT is returned.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. For more information, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) in the Resource Manager documentation.", +"type": "object" +}, +"offset": { +"description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Products deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +}, +"orderBy": { +"description": "The order in which products are returned. Products can be ordered by a field in an Product object. Leave it unset if ordered by relevance. OrderBy expression is case-sensitive. For more information, see [Order](https://cloud.google.com/retail/docs/filter-and-order#order). If this field is unrecognizable, an INVALID_ARGUMENT is returned.", +"type": "string" +}, +"pageCategories": { +"description": "The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategories\" : [\"Sales > 2017 Black Friday Deals\"].", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum number of Products to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 120. Values above 120 will be coerced to 120. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token SearchResponse.next_page_token, received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"personalizationSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestPersonalizationSpec", +"description": "The specification for personalization. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec." +}, +"query": { +"description": "Raw search query. If this field is empty, the request is considered a category browsing request and returned results are based on filter and page_categories.", +"type": "string" +}, +"queryExpansionSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec", +"description": "The query expansion specification that specifies the conditions under which query expansion occurs. For more information, see [Query expansion](https://cloud.google.com/retail/docs/result-size#query_expansion)." +}, +"relevanceThreshold": { +"description": "The relevance threshold of the search results. Defaults to RelevanceThreshold.HIGH, which means only the most relevant results are shown, and the least number of results are returned. For more information, see [Adjust result size](https://cloud.google.com/retail/docs/result-size#relevance_thresholding).", +"enum": [ +"RELEVANCE_THRESHOLD_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"LOWEST" +], +"enumDescriptions": [ +"Default value. In this case, server behavior defaults to RelevanceThreshold.HIGH.", +"High relevance threshold.", +"Medium relevance threshold.", +"Low relevance threshold.", +"Lowest relevance threshold." +], +"type": "string" +}, +"searchMode": { +"description": "The search mode of the search request. If not specified, a single search request triggers both product search and faceted search.", +"enum": [ +"SEARCH_MODE_UNSPECIFIED", +"PRODUCT_SEARCH_ONLY", +"FACETED_SEARCH_ONLY" +], +"enumDescriptions": [ +"Default value. In this case both product search and faceted search will be performed. Both SearchResponse.SearchResult and SearchResponse.Facet will be returned.", +"Only product search will be performed. The faceted search will be disabled. Only SearchResponse.SearchResult will be returned. SearchResponse.Facet will not be returned, even if SearchRequest.facet_specs or SearchRequest.dynamic_facet_spec is set.", +"Only faceted search will be performed. The product search will be disabled. When in this mode, one or both of SearchRequest.facet_specs and SearchRequest.dynamic_facet_spec should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only SearchResponse.Facet will be returned. SearchResponse.SearchResult will not be returned." +], +"type": "string" +}, +"spellCorrectionSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestSpellCorrectionSpec", +"description": "The spell correction specification that specifies the mode under which spell correction will take effect." +}, +"userInfo": { +"$ref": "GoogleCloudRetailV2alphaUserInfo", +"description": "User information." +}, +"variantRollupKeys": { +"description": "The keys to fetch and rollup the matching variant Products attributes, FulfillmentInfo or LocalInventorys attributes. The attributes from all the matching variant Products or LocalInventorys are merged and de-duplicated. Notice that rollup attributes will lead to extra query latency. Maximum number of keys is 30. For FulfillmentInfo, a fulfillment type and a fulfillment ID must be provided in the format of \"fulfillmentType.fulfillmentId\". E.g., in \"pickupInStore.store123\", \"pickupInStore\" is fulfillment type and \"store123\" is the store ID. Supported keys are: * colorFamilies * price * originalPrice * discount * variantId * inventory(place_id,price) * inventory(place_id,original_price) * inventory(place_id,attributes.key), where key is any key in the Product.local_inventories.attributes map. * attributes.key, where key is any key in the Product.attributes map. * pickupInStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"pickup-in-store\". * shipToStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"ship-to-store\". * sameDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"same-day-delivery\". * nextDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"next-day-delivery\". * customFulfillment1.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-1\". * customFulfillment2.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-2\". * customFulfillment3.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-3\". * customFulfillment4.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-4\". * customFulfillment5.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-5\". If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"visitorId": { +"description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This should be the same identifier as UserEvent.visitor_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestBoostSpec": { +"description": "Boost specification to boost certain items.", +"id": "GoogleCloudRetailV2alphaSearchRequestBoostSpec", +"properties": { +"conditionBoostSpecs": { +"description": "Condition boost specifications. If a product matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", +"items": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec" +}, +"type": "array" +}, +"skipBoostSpecValidation": { +"description": "Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec": { +"description": "Boost applies to products which match a condition.", +"id": "GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec", +"properties": { +"boost": { +"description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.", +"format": "float", +"type": "number" +}, +"condition": { +"description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": * (id: ANY(\"product_1\", \"product_2\")) AND (colorFamilies: ANY(\"Red\",\"Blue\"))", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec": { +"description": "The specifications of dynamically generated facets.", +"id": "GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec", +"properties": { +"mode": { +"description": "Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it's unset.", +"enum": [ +"MODE_UNSPECIFIED", +"DISABLED", +"ENABLED" +], +"enumDescriptions": [ +"Default value.", +"Disable Dynamic Facet.", +"Automatic mode built by Google Retail Search." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestFacetSpec": { +"description": "A facet specification to perform faceted search.", +"id": "GoogleCloudRetailV2alphaSearchRequestFacetSpec", +"properties": { +"enableDynamicPosition": { +"description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined by Google Retail Search. It is ordered together with dynamic facets if dynamic facets is enabled. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined by Google Retail Search. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enable, which generates a facet \"gender\". Then, the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how Google Retail Search orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position values are false.", +"type": "boolean" +}, +"excludedFilterKeys": { +"description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 products with the color facet \"Red\" and 200 products with the color facet \"Blue\". A query containing the filter \"colorFamilies:ANY(\"Red\")\" and having \"colorFamilies\" as FacetKey.key would by default return only \"Red\" products in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue products available, \"Blue\" would not be shown as an available facet value. If \"colorFamilies\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"colorFamilies\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" products. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"facetKey": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey", +"description": "Required. The facet key specification." +}, +"limit": { +"description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 50. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey": { +"description": "Specifies how a facet is computed.", +"id": "GoogleCloudRetailV2alphaSearchRequestFacetSpecFacetKey", +"properties": { +"caseInsensitive": { +"description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", +"type": "boolean" +}, +"contains": { +"description": "Only get facet values that contains the given strings. For example, suppose \"categories\" has three values \"Women > Shoe\", \"Women > Dress\" and \"Men > Shoe\". If set \"contains\" to \"Shoe\", the \"categories\" facet gives only \"Women > Shoe\" and \"Men > Shoe\". Only supported on textual fields. Maximum is 10.", +"items": { +"type": "string" +}, +"type": "array" +}, +"intervals": { +"description": "Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.", +"items": { +"$ref": "GoogleCloudRetailV2alphaInterval" +}, +"type": "array" +}, +"key": { +"description": "Required. Supported textual and numerical facet keys in Product object, over which the facet values are computed. Facet key is case-sensitive. Allowed facet keys when FacetKey.query is not specified: * textual_field = * \"brands\" * \"categories\" * \"genders\" * \"ageGroups\" * \"availability\" * \"colorFamilies\" * \"colors\" * \"sizes\" * \"materials\" * \"patterns\" * \"conditions\" * \"attributes.key\" * \"pickupInStore\" * \"shipToStore\" * \"sameDayDelivery\" * \"nextDayDelivery\" * \"customFulfillment1\" * \"customFulfillment2\" * \"customFulfillment3\" * \"customFulfillment4\" * \"customFulfillment5\" * \"inventory(place_id,attributes.key)\" * numerical_field = * \"price\" * \"discount\" * \"rating\" * \"ratingCount\" * \"attributes.key\" * \"inventory(place_id,price)\" * \"inventory(place_id,original_price)\" * \"inventory(place_id,attributes.key)\"", +"type": "string" +}, +"orderBy": { +"description": "The order in which SearchResponse.Facet.values are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals; FulfillmentInfo.place_ids are sorted in the order given by FacetSpec.FacetKey.restricted_values.", +"type": "string" +}, +"prefixes": { +"description": "Only get facet values that start with the given string prefix. For example, suppose \"categories\" has three values \"Women > Shoe\", \"Women > Dress\" and \"Men > Shoe\". If set \"prefixes\" to \"Women\", the \"categories\" facet gives only \"Women > Shoe\" and \"Women > Dress\". Only supported on textual fields. Maximum is 10.", +"items": { +"type": "string" +}, +"type": "array" +}, +"query": { +"description": "The query that is used to compute facet for the given facet key. When provided, it overrides the default behavior of facet computation. The query syntax is the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Notice that there is no limitation on FacetKey.key when query is specified. In the response, SearchResponse.Facet.values.value is always \"1\" and SearchResponse.Facet.values.count is the number of results that match the query. For example, you can set a customized facet for \"shipToStore\", where FacetKey.key is \"customizedShipToStore\", and FacetKey.query is \"availability: ANY(\\\"IN_STOCK\\\") AND shipToStore: ANY(\\\"123\\\")\". Then the facet counts the products that are both in stock and ship to store \"123\".", +"type": "string" +}, +"restrictedValues": { +"description": "Only get facet for the given restricted values. For example, when using \"pickupInStore\" as key and set restricted values to [\"store123\", \"store456\"], only facets for \"store123\" and \"store456\" are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5", +"items": { +"type": "string" +}, +"type": "array" +}, +"returnMinMax": { +"description": "Returns the min and max value for each numerical facet intervals. Ignored for textual facets.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestPersonalizationSpec": { +"description": "The specification for personalization.", +"id": "GoogleCloudRetailV2alphaSearchRequestPersonalizationSpec", +"properties": { +"mode": { +"description": "Defaults to Mode.AUTO.", +"enum": [ +"MODE_UNSPECIFIED", +"AUTO", +"DISABLED" +], +"enumDescriptions": [ +"Default value. In this case, server behavior defaults to Mode.AUTO.", +"Let CRS decide whether to use personalization based on quality of user event data.", +"Disable personalization." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec": { +"description": "Specification to determine under which conditions query expansion should occur.", +"id": "GoogleCloudRetailV2alphaSearchRequestQueryExpansionSpec", +"properties": { +"condition": { +"description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", +"enum": [ +"CONDITION_UNSPECIFIED", +"DISABLED", +"AUTO" +], +"enumDescriptions": [ +"Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", +"Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", +"Automatic query expansion built by Google Retail Search." +], +"type": "string" +}, +"pinUnexpandedResults": { +"description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchRequestSpellCorrectionSpec": { +"description": "The specification for query spell correction.", +"id": "GoogleCloudRetailV2alphaSearchRequestSpellCorrectionSpec", +"properties": { +"mode": { +"description": "The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO.", +"enum": [ +"MODE_UNSPECIFIED", +"SUGGESTION_ONLY", +"AUTO" +], +"enumDescriptions": [ +"Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", +"Google Retail Search will try to find a spell suggestion if there is any and put in the SearchResponse.corrected_query. The spell suggestion will not be used as the search query.", +"Automatic spell correction built by Google Retail Search. Search will be based on the corrected query if found." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchResponse": { +"description": "Response message for SearchService.Search method.", +"id": "GoogleCloudRetailV2alphaSearchResponse", +"properties": { +"appliedControls": { +"description": "The fully qualified resource name of applied [controls](https://cloud.google.com/retail/docs/serving-control-rules).", +"items": { +"type": "string" +}, +"type": "array" +}, +"attributionToken": { +"description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", +"type": "string" +}, +"correctedQuery": { +"description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", +"type": "string" +}, +"experimentInfo": { +"description": "Metadata related to A/B testing Experiment associated with this response. Only exists when an experiment is triggered.", +"items": { +"$ref": "GoogleCloudRetailV2alphaExperimentInfo" +}, +"type": "array" +}, +"facets": { +"description": "Results of facets requested by user.", +"items": { +"$ref": "GoogleCloudRetailV2alphaSearchResponseFacet" +}, +"type": "array" +}, +"invalidConditionBoostSpecs": { +"description": "The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.", +"items": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestBoostSpecConditionBoostSpec" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"queryExpansionInfo": { +"$ref": "GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo", +"description": "Query expansion information for the returned results." +}, +"redirectUri": { +"description": "The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.", +"type": "string" +}, +"results": { +"description": "A list of matched items. The order represents the ranking.", +"items": { +"$ref": "GoogleCloudRetailV2alphaSearchResponseSearchResult" +}, +"type": "array" +}, +"totalSize": { +"description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchResponseFacet": { +"description": "A facet result.", +"id": "GoogleCloudRetailV2alphaSearchResponseFacet", +"properties": { +"dynamicFacet": { +"description": "Whether the facet is dynamically generated.", +"type": "boolean" +}, +"key": { +"description": "The key for this facet. E.g., \"colorFamilies\" or \"price\" or \"attributes.attr1\".", +"type": "string" +}, +"values": { +"description": "The facet values for this field.", +"items": { +"$ref": "GoogleCloudRetailV2alphaSearchResponseFacetFacetValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchResponseFacetFacetValue": { +"description": "A facet value which contains value names and their count.", +"id": "GoogleCloudRetailV2alphaSearchResponseFacetFacetValue", +"properties": { +"count": { +"description": "Number of items that have this facet value.", +"format": "int64", +"type": "string" +}, +"interval": { +"$ref": "GoogleCloudRetailV2alphaInterval", +"description": "Interval value for a facet, such as [10, 20) for facet \"price\"." +}, +"maxValue": { +"description": "The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", +"format": "double", +"type": "number" +}, +"minValue": { +"description": "The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", +"format": "double", +"type": "number" +}, +"value": { +"description": "Text value of a facet, such as \"Black\" for facet \"colorFamilies\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo": { +"description": "Information describing query expansion including whether expansion has occurred.", +"id": "GoogleCloudRetailV2alphaSearchResponseQueryExpansionInfo", +"properties": { +"expandedQuery": { +"description": "Bool describing whether query expansion has occurred.", +"type": "boolean" +}, +"pinnedResultCount": { +"description": "Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSearchResponseSearchResult": { +"description": "Represents the search results.", +"id": "GoogleCloudRetailV2alphaSearchResponseSearchResult", +"properties": { +"id": { +"description": "Product.id of the searched Product.", +"type": "string" +}, +"matchingVariantCount": { +"description": "The count of matched variant Products.", +"format": "int32", +"type": "integer" +}, +"matchingVariantFields": { +"additionalProperties": { +"format": "google-fieldmask", +"type": "string" +}, +"description": "If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key \"sku1\" with field mask \"products.color_info\" indicates there is a match between \"sku1\" ColorInfo and the query.", +"type": "object" +}, +"personalLabels": { +"description": "Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set only when SearchRequest.PersonalizationSpec.mode is SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`: Indicates that this product has been purchased before.", +"items": { +"type": "string" +}, +"type": "array" +}, +"product": { +"$ref": "GoogleCloudRetailV2alphaProduct", +"description": "The product data snippet in the search response. Only Product.name is guaranteed to be populated. Product.variants contains the product variants that match the search query. If there are multiple product variants matching the query, top 5 most relevant product variants are returned and ordered by relevancy. If relevancy can be deternmined, use matching_variant_fields to look up matched product variants fields. If relevancy cannot be determined, e.g. when searching \"shoe\" all products in a shoe product can be a match, 5 product variants are returned but order is meaningless." +}, +"variantRollupValues": { +"additionalProperties": { +"type": "any" +}, +"description": "The rollup matching variant Product attributes. The key is one of the SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated Product attributes. Notice that the rollup values are respect filter. For example, when filtering by \"colorFamilies:ANY(\\\"red\\\")\" and rollup \"colorFamilies\", only \"red\" is returned. For textual and numerical attributes, the rollup values is a list of string or double values with type google.protobuf.ListValue. For example, if there are two variants with colors \"red\" and \"blue\", the rollup values are { key: \"colorFamilies\" value { list_value { values { string_value: \"red\" } values { string_value: \"blue\" } } } } For FulfillmentInfo, the rollup values is a double value with type google.protobuf.Value. For example, `{key: \"pickupInStore.store1\" value { number_value: 10 }}` means a there are 10 variants in this product are available in the store \"store1\".", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaServingConfig": { +"description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).", +"id": "GoogleCloudRetailV2alphaServingConfig", +"properties": { +"boostControlIds": { +"description": "Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Required. The human readable serving config display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"diversityLevel": { +"description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"diversityType": { +"description": "What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to RULE_BASED_DIVERSITY.", +"enum": [ +"DIVERSITY_TYPE_UNSPECIFIED", +"RULE_BASED_DIVERSITY", +"DATA_DRIVEN_DIVERSITY" +], +"enumDescriptions": [ +"Default value.", +"Rule based diversity.", +"Data driven diversity." +], +"type": "string" +}, +"doNotAssociateControlIds": { +"description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dynamicFacetSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestDynamicFacetSpec", +"description": "The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH." +}, +"enableCategoryFilterLevel": { +"description": "Whether to add additional category filters on the `similar-items` model. If not specified, we enable it by default. Allowed values are: * `no-category-match`: No additional filtering of original results from the model and the customer's filters. * `relaxed-category-match`: Only keep results with categories that match at least one item categories in the PredictRequests's context item. * If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"facetControlIds": { +"description": "Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filterControlIds": { +"description": "Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoreControlIds": { +"description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoreRecsDenylist": { +"description": "When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.", +"type": "boolean" +}, +"modelId": { +"description": "The id of the model in the same Catalog to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/servingConfig/*`", +"type": "string" +}, +"onewaySynonymsControlIds": { +"description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"personalizationSpec": { +"$ref": "GoogleCloudRetailV2alphaSearchRequestPersonalizationSpec", +"description": "The specification for personalization spec. Can only be set if solution_types is SOLUTION_TYPE_SEARCH. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec." +}, +"priceRerankingLevel": { +"description": "How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are: * `no-price-reranking` * `low-price-reranking` * `medium-price-reranking` * `high-price-reranking` If not specified, we choose default based on model type. Default value: `no-price-reranking`. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"redirectControlIds": { +"description": "Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replacementControlIds": { +"description": "Condition replacement specifications. - Applied according to the order in the list. - A previously replaced term can not be re-replaced. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"solutionTypes": { +"description": "Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"type": "array" +}, +"twowaySynonymsControlIds": { +"description": "Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetDefaultBranchRequest": { +"description": "Request message to set a specified branch as new default_branch.", +"id": "GoogleCloudRetailV2alphaSetDefaultBranchRequest", +"properties": { +"branchId": { +"description": "The final component of the resource name of a branch. This field must be one of \"0\", \"1\" or \"2\". Otherwise, an INVALID_ARGUMENT error is returned. If there are no sufficient active products in the targeted branch and force is not set, a FAILED_PRECONDITION error is returned.", +"type": "string" +}, +"force": { +"description": "If set to true, it permits switching to a branch with branch_id even if it has no sufficient active products.", +"type": "boolean" +}, +"note": { +"description": "Some note on this request, this can be retrieved by CatalogService.GetDefaultBranch before next valid default branch set occurs. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2alphaSetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetInventoryRequest": { +"description": "Request message for ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2alphaSetInventoryRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"inventory": { +"$ref": "GoogleCloudRetailV2alphaProduct", +"description": "Required. The inventory information to update. The allowable fields to update are: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info The updated inventory fields must be specified in SetInventoryRequest.set_mask. If SetInventoryRequest.inventory.name is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the Product named in Product.name, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to update does not have existing inventory information, the provided inventory information will be inserted. If the Product to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for SetInventoryRequest.set_time. The caller can replace place IDs for a subset of fulfillment types in the following ways: * Adds \"fulfillment_info\" in SetInventoryRequest.set_mask * Specifies only the desired fulfillment types and corresponding place IDs to update in SetInventoryRequest.inventory.fulfillment_info The caller can clear all place IDs from a subset of fulfillment types in the following ways: * Adds \"fulfillment_info\" in SetInventoryRequest.set_mask * Specifies only the desired fulfillment types to clear in SetInventoryRequest.inventory.fulfillment_info * Checks that only the desired fulfillment info types have empty SetInventoryRequest.inventory.fulfillment_info.place_ids The last update time is recorded for the following inventory fields: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info If a full overwrite of inventory information while ignoring timestamps is needed, ProductService.UpdateProduct should be invoked instead." +}, +"setMask": { +"description": "Indicates which inventory fields in the provided Product to update. At least one field must be provided. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.", +"format": "google-fieldmask", +"type": "string" +}, +"setTime": { +"description": "The time when the request is issued, used to prevent out-of-order updates on inventory fields with the last update time recorded. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2alphaSetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTransformedUserEventsMetadata": { +"description": "Metadata related to transform user events operation.", +"id": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", +"properties": { +"sourceEventsCount": { +"description": "Count of entries in the source user events BigQuery table.", +"format": "int64", +"type": "string" +}, +"transformedEventsCount": { +"description": "Count of entries in the transformed user events BigQuery table, which could be different from the actually imported number of user events.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2alphaTuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTuneModelRequest": { +"description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", +"id": "GoogleCloudRetailV2alphaTuneModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2alphaTuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaUserEvent": { +"description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", +"id": "GoogleCloudRetailV2alphaUserEvent", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2alphaCustomAttribute" +}, +"description": "Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", +"type": "object" +}, +"attributionToken": { +"description": "Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", +"type": "string" +}, +"cartId": { +"description": "The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.", +"type": "string" +}, +"completionDetail": { +"$ref": "GoogleCloudRetailV2alphaCompletionDetail", +"description": "The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." +}, +"entity": { +"description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.", +"type": "string" +}, +"eventTime": { +"description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", +"format": "google-datetime", +"type": "string" +}, +"eventType": { +"description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", +"type": "string" +}, +"experimentIds": { +"description": "A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See SearchRequest.filter for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"offset": { +"description": "An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"orderBy": { +"description": "The order in which products are returned. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"pageCategories": { +"description": "The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategories\" : [\"Sales > 2017 Black Friday Deals\"]. Required for `category-page-view` events. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageViewId": { +"description": "A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", +"type": "string" +}, +"productDetails": { +"description": "The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different product_details is desired. The end user may have not finished browsing the whole page yet.", +"items": { +"$ref": "GoogleCloudRetailV2alphaProductDetail" +}, +"type": "array" +}, +"purchaseTransaction": { +"$ref": "GoogleCloudRetailV2alphaPurchaseTransaction", +"description": "A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned." +}, +"referrerUri": { +"description": "The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", +"type": "string" +}, +"searchQuery": { +"description": "The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"sessionId": { +"description": "A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.", +"type": "string" +}, +"uri": { +"description": "Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.", +"type": "string" +}, +"userInfo": { +"$ref": "GoogleCloudRetailV2alphaUserInfo", +"description": "User information." +}, +"visitorId": { +"description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaUserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2alphaUserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaUserEventInlineSource": { +"description": "The inline source for the input config for ImportUserEvents method.", +"id": "GoogleCloudRetailV2alphaUserEventInlineSource", +"properties": { +"userEvents": { +"description": "Required. A list of user events to import. Recommended max of 10k items.", +"items": { +"$ref": "GoogleCloudRetailV2alphaUserEvent" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaUserEventInputConfig": { +"description": "The input config source for user events.", +"id": "GoogleCloudRetailV2alphaUserEventInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2alphaBigQuerySource", +"description": "Required. BigQuery input source." +}, +"gcsSource": { +"$ref": "GoogleCloudRetailV2alphaGcsSource", +"description": "Required. Google Cloud Storage location for the input content." +}, +"userEventInlineSource": { +"$ref": "GoogleCloudRetailV2alphaUserEventInlineSource", +"description": "Required. The Inline source for the input content for UserEvents." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaUserInfo": { +"description": "Information of an end user.", +"id": "GoogleCloudRetailV2alphaUserInfo", +"properties": { +"directUserRequest": { +"description": "True if the request is made directly from the end user, in which case the ip_address and user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", +"type": "boolean" +}, +"ipAddress": { +"description": "The end user's IP address. This field is used to extract location information for personalization. This field must be either an IPv4 address (e.g. \"104.133.9.80\") or an IPv6 address (e.g. \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"). Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when: * setting SearchRequest.user_info. * using the JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", +"type": "string" +}, +"userAgent": { +"description": "User agent as included in the HTTP header. Required for getting SearchResponse.sponsored_results. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", +"type": "string" +}, +"userId": { +"description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaAddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2betaAddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2betaAddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaBigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2betaBigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata": { +"description": "Common metadata related to the progress of the operations.", +"id": "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2betaCreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2betaExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportProductsResponse": { +"description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportUserEventsResponse": { +"description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaGcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2betaGcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2betaImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2betaImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2betaUserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterAccountLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2betaMerchantCenterAccountLink", +"properties": { +"branchId": { +"description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"feedFilters": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter" +}, +"type": "array" +}, +"feedLabel": { +"description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", +"type": "string" +}, +"id": { +"description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", +"readOnly": true, +"type": "string" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", +"readOnly": true, +"type": "string" +}, +"projectId": { +"description": "Output only. Google Cloud project ID.", +"readOnly": true, +"type": "string" +}, +"source": { +"description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", +"type": "string" +}, +"state": { +"description": "Output only. Represents the state of the link.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED" +], +"enumDescriptions": [ +"Default value.", +"Link is created and LRO is not complete.", +"Link is active.", +"Link creation failed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModel": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2betaModel", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2betaModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2betaModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2betaModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2betaModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaOutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2betaOutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2betaBigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2betaGcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaPurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaPurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2betaPurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2betaPurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2betaRejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2betaRejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2betaRemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2betaSetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2betaSetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaTuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2betaTuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaTuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2betaTuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaUserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2betaUserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDate": { +"description": "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, 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", +"id": "GoogleTypeDate", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Vertex AI Search for Retail API", +"version": "v2alpha", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2beta.json new file mode 100644 index 0000000000000000000000000000000000000000..4c85036da7b5129c731dd0a9c627f391dacaffda --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/retail.v2beta.json @@ -0,0 +1,7452 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://retail.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Retail", +"description": "Vertex AI Search for Retail API is made up of Retail Search, Browse and Recommendations. These discovery AI solutions help you implement personalized search, browse and recommendations, based on machine learning models, across your websites and mobile applications.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/recommendations", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "retail:v2beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://retail.mtls.googleapis.com/", +"name": "retail", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"catalogs": { +"methods": { +"completeQuery": { +"description": "Completes the specified prefix with keyword suggestions. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:completeQuery", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.completeQuery", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Required. Catalog for which the completion is performed. Full resource name of catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"dataset": { +"description": "Determines which dataset to use for fetching completion. \"user-data\" will use the imported dataset through CompletionService.ImportCompletionData. \"cloud-retail\" will use the dataset generated by cloud retail based on user events. If leave empty, it will use the \"user-data\". Current supported values: * user-data * cloud-retail: This option requires enabling auto-learning function first. See [guidelines](https://cloud.google.com/retail/docs/completion-overview#generated-completion-dataset).", +"location": "query", +"type": "string" +}, +"deviceType": { +"description": "The device type context for completion suggestions. We recommend that you leave this field empty. It can apply different suggestions on different device types, e.g. `DESKTOP`, `MOBILE`. If it is empty, the suggestions are across all device types. Supported formats: * `UNKNOWN_DEVICE_TYPE` * `DESKTOP` * `MOBILE` * A customized string starts with `OTHER_`, e.g. `OTHER_IPHONE`.", +"location": "query", +"type": "string" +}, +"entity": { +"description": "The entity for customers who run multiple entities, domains, sites, or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it must be an exact match with UserEvent.entity to get per-entity autocomplete results.", +"location": "query", +"type": "string" +}, +"languageCodes": { +"description": "Note that this field applies for `user-data` dataset only. For requests with `cloud-retail` dataset, setting this field has no effect. The language filters applied to the output suggestions. If set, it should contain the language of the query. If not set, suggestions are returned without considering language restrictions. This is the BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see [Tags for Identifying Languages](https://tools.ietf.org/html/bcp47). The maximum number of language codes is 3.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxSuggestions": { +"description": "Completion max suggestions. If left unset or set to 0, then will fallback to the configured value CompletionConfig.max_suggestions. The maximum allowed max suggestions is 20. If it is set higher, it will be capped by 20.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"query": { +"description": "Required. The query used to generate suggestions. The maximum number of allowed characters is 255.", +"location": "query", +"type": "string" +}, +"visitorId": { +"description": "Required field. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+catalog}:completeQuery", +"response": { +"$ref": "GoogleCloudRetailV2betaCompleteQueryResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportAnalyticsMetrics": { +"description": "Exports analytics metrics. `Operation.response` is of type `ExportAnalyticsMetricsResponse`. `Operation.metadata` is of type `ExportMetadata`.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:exportAnalyticsMetrics", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.exportAnalyticsMetrics", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Required. Full resource name of the parent catalog. Expected format: `projects/*/locations/*/catalogs/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+catalog}:exportAnalyticsMetrics", +"request": { +"$ref": "GoogleCloudRetailV2betaExportAnalyticsMetricsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getAttributesConfig": { +"description": "Gets an AttributesConfig.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getAttributesConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2betaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getCompletionConfig": { +"description": "Gets a CompletionConfig.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getCompletionConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full CompletionConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2betaCompletionConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getDefaultBranch": { +"description": "Get which branch is currently default branch set by CatalogService.SetDefaultBranch method under a specified parent catalog.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:getDefaultBranch", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.getDefaultBranch", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+catalog}:getDefaultBranch", +"response": { +"$ref": "GoogleCloudRetailV2betaGetDefaultBranchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the Catalogs associated with the project.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Catalogs to return. If unspecified, defaults to 50. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token ListCatalogsResponse.next_page_token, received from a previous CatalogService.ListCatalogs call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to CatalogService.ListCatalogs must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The account resource name with an associated location. If the caller does not have permission to list Catalogs under this location, regardless of whether or not this location exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/catalogs", +"response": { +"$ref": "GoogleCloudRetailV2betaListCatalogsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the Catalogs.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The fully qualified resource name of the catalog.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Catalog to update. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2betaCatalog" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaCatalog" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setDefaultBranch": { +"description": "Set a specified branch id as default branch. API methods such as SearchService.Search, ProductService.GetProduct, ProductService.ListProducts will treat requests using \"default_branch\" to the actual branch id set as default. For example, if `projects/*/locations/*/catalogs/*/branches/1` is set as default, setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/default_branch` is equivalent to setting SearchRequest.branch to `projects/*/locations/*/catalogs/*/branches/1`. Using multiple branches can be useful when developers would like to have a staging branch to test and verify for future usage. When it becomes ready, developers switch on the staging branch using this API while keeping using `projects/*/locations/*/catalogs/*/branches/default_branch` as SearchRequest.branch to route the traffic to this staging branch. CAUTION: If you have live predict/search traffic, switching the default branch could potentially cause outages if the ID space of the new branch is very different from the old one. More specifically: * PredictionService will only return product IDs from branch {newBranch}. * SearchService will only return product IDs from branch {newBranch} (if branch is not explicitly set). * UserEventService will only join events with products from branch {newBranch}.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}:setDefaultBranch", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.setDefaultBranch", +"parameterOrder": [ +"catalog" +], +"parameters": { +"catalog": { +"description": "Full resource name of the catalog, such as `projects/*/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+catalog}:setDefaultBranch", +"request": { +"$ref": "GoogleCloudRetailV2betaSetDefaultBranchRequest" +}, +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateAttributesConfig": { +"description": "Updates the AttributesConfig. The catalog attributes in the request will be updated in the catalog, or inserted if they do not exist. Existing catalog attributes not included in the request will remain unchanged. Attributes that are assigned to products, but do not exist at the catalog level, are always included in the response. The product attribute is assigned default values for missing catalog attribute fields, e.g., searchable and dynamic facetable options.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.updateAttributesConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided AttributesConfig to update. The following is the only supported field: * AttributesConfig.catalog_attributes If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2betaAttributesConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateCompletionConfig": { +"description": "Updates the CompletionConfigs.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionConfig", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.updateCompletionConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/completionConfig$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided CompletionConfig to update. The following are the only supported fields: * CompletionConfig.matching_order * CompletionConfig.max_suggestions * CompletionConfig.min_prefix_length * CompletionConfig.auto_learning If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2betaCompletionConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaCompletionConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"attributesConfig": { +"methods": { +"addCatalogAttribute": { +"description": "Adds the specified CatalogAttribute to the AttributesConfig. If the CatalogAttribute to add already exists, an ALREADY_EXISTS error is returned.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:addCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.addCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+attributesConfig}:addCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2betaAddCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"batchRemoveCatalogAttributes": { +"description": "Removes all specified CatalogAttributes from the AttributesConfig.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:batchRemoveCatalogAttributes", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.batchRemoveCatalogAttributes", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. The attributes config resource shared by all catalog attributes being deleted. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+attributesConfig}:batchRemoveCatalogAttributes", +"request": { +"$ref": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeCatalogAttribute": { +"description": "Removes the specified CatalogAttribute from the AttributesConfig. If the CatalogAttribute to remove does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:removeCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.removeCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+attributesConfig}:removeCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2betaRemoveCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"replaceCatalogAttribute": { +"description": "Replaces the specified CatalogAttribute in the AttributesConfig by updating the catalog attribute with the same CatalogAttribute.key. If the CatalogAttribute to replace does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/attributesConfig:replaceCatalogAttribute", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.attributesConfig.replaceCatalogAttribute", +"parameterOrder": [ +"attributesConfig" +], +"parameters": { +"attributesConfig": { +"description": "Required. Full AttributesConfig resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/attributesConfig$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+attributesConfig}:replaceCatalogAttribute", +"request": { +"$ref": "GoogleCloudRetailV2betaReplaceCatalogAttributeRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaAttributesConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"branches": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"products": { +"methods": { +"addFulfillmentPlaces": { +"description": "We recommend that you use the ProductService.AddLocalInventories method instead of the ProductService.AddFulfillmentPlaces method. ProductService.AddLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally adds place IDs to Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the added place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:addFulfillmentPlaces", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.addFulfillmentPlaces", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+product}:addFulfillmentPlaces", +"request": { +"$ref": "GoogleCloudRetailV2betaAddFulfillmentPlacesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"addLocalInventories": { +"description": "Updates local inventory information for a Product at a list of places, while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating inventory information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be modified using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:addLocalInventories", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.addLocalInventories", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+product}:addLocalInventories", +"request": { +"$ref": "GoogleCloudRetailV2betaAddLocalInventoriesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a Product.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +}, +"productId": { +"description": "Required. The ID to use for the Product, which will become the final component of the Product.name. If the caller does not have permission to create the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. This field must be unique among all Products with the same parent. Otherwise, an ALREADY_EXISTS error is returned. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+parent}/products", +"request": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Product.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.branches.products.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to delete the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to delete does not exist, a NOT_FOUND error is returned. The Product to delete can neither be a Product.Type.COLLECTION Product member nor a Product.Type.PRIMARY Product with more than one variants. Otherwise, an INVALID_ARGUMENT error is returned. All inventory information for the named Product will be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Product.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.products.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested Product does not exist, a NOT_FOUND error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of multiple Products. Request processing may be synchronous. Non-existing items are created. Note that it is possible for a subset of the Products to be successfully updated.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog/branches/default_branch` If no updateMask is specified, requires products.create permission. If updateMask is specified, requires products.update permission.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/products:import", +"request": { +"$ref": "GoogleCloudRetailV2betaImportProductsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Gets a list of Products.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.branches.products.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List Product.Type.VARIANT Products sharing the same Product.Type.PRIMARY Product. For example: `primary_product_id = \"some_product_id\"` * List Products bundled in a Product.Type.COLLECTION Product. For example: `collection_product_id = \"some_product_id\"` * List Products with a partibular type. For example: `type = \"PRIMARY\"` `type = \"VARIANT\"` `type = \"COLLECTION\"` If the field is unrecognizable, an INVALID_ARGUMENT error is returned. If the specified Product.Type.PRIMARY Product or Product.Type.COLLECTION Product does not exist, a NOT_FOUND error is returned.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of Products to return. If unspecified, defaults to 100. The maximum allowed value is 1000. Values above 1000 will be coerced to 1000. If this field is negative, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token ListProductsResponse.next_page_token, received from a previous ProductService.ListProducts call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ProductService.ListProducts must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use `default_branch` as the branch ID, to list products under the default branch. If the caller does not have permission to list Products under this branch, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +}, +"readMask": { +"description": "The fields of Product to return in the responses. If not set or empty, the following fields are returned: * Product.name * Product.id * Product.title * Product.uri * Product.images * Product.price_info * Product.brands If \"*\" is provided, all fields are returned. Product.name is always returned no matter what mask is set. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+parent}/products", +"response": { +"$ref": "GoogleCloudRetailV2betaListProductsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Product.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.branches.products.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "If set to true, and the Product is not found, a new Product will be created. In this situation, `update_mask` is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Product to update. The immutable and output only fields are NOT supported. If not set, all supported fields (the fields that are neither immutable nor output only) are updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned. The attribute key can be updated by setting the mask path as \"attributes.${key_name}\". If a key name is present in the mask but not in the patching product from the request, this key will be deleted after the update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"purge": { +"description": "Permanently deletes all selected Products under a branch. This process is asynchronous. If the request is valid, the removal will be enqueued and processed offline. Depending on the number of Products, this operation could take hours to complete. Before the operation completes, some Products may still be returned by ProductService.GetProduct or ProductService.ListProducts. Depending on the number of Products, this operation could take hours to complete. To get a sample of Products that would be deleted, set PurgeProductsRequest.force to false.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products:purge", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the branch under which the products are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}/branches/${branchId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/products:purge", +"request": { +"$ref": "GoogleCloudRetailV2betaPurgeProductsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeFulfillmentPlaces": { +"description": "We recommend that you use the ProductService.RemoveLocalInventories method instead of the ProductService.RemoveFulfillmentPlaces method. ProductService.RemoveLocalInventories achieves the same results but provides more fine-grained control over ingesting local inventory data. Incrementally removes place IDs from a Product.fulfillment_info.place_ids. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update will be enqueued and processed downstream. As a consequence, when a response is returned, the removed place IDs are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeFulfillmentPlaces", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.removeFulfillmentPlaces", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+product}:removeFulfillmentPlaces", +"request": { +"$ref": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeLocalInventories": { +"description": "Remove local inventory information for a Product at a list of places at a removal timestamp. This process is asynchronous. If the request is valid, the removal will be enqueued and processed downstream. As a consequence, when a response is returned, removals are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. Local inventory information can only be removed using this method. ProductService.CreateProduct and ProductService.UpdateProduct has no effect on local inventories. The returned Operations will be obsolete after 1 day, and GetOperation API will return NOT_FOUND afterwards. If conflicting updates are issued, the Operations associated with the stale updates will not be marked as done until being obsolete.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:removeLocalInventories", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.removeLocalInventories", +"parameterOrder": [ +"product" +], +"parameters": { +"product": { +"description": "Required. Full resource name of Product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/some_product_id`. If the caller does not have permission to access the Product, regardless of whether or not it exists, a PERMISSION_DENIED error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+product}:removeLocalInventories", +"request": { +"$ref": "GoogleCloudRetailV2betaRemoveLocalInventoriesRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setInventory": { +"description": "Updates inventory information for a Product while respecting the last update timestamps of each inventory field. This process is asynchronous and does not require the Product to exist before updating fulfillment information. If the request is valid, the update is enqueued and processed downstream. As a consequence, when a response is returned, updates are not immediately manifested in the Product queried by ProductService.GetProduct or ProductService.ListProducts. When inventory is updated with ProductService.CreateProduct and ProductService.UpdateProduct, the specified inventory field value(s) overwrite any existing value(s) while ignoring the last update time for this field. Furthermore, the last update times for the specified inventory fields are overwritten by the times of the ProductService.CreateProduct or ProductService.UpdateProduct request. If no inventory fields are set in CreateProductRequest.product, then any pre-existing inventory information for this product is used. If no inventory fields are set in SetInventoryRequest.set_mask, then any existing inventory information is preserved. Pre-existing inventory information can only be updated with ProductService.SetInventory, ProductService.AddFulfillmentPlaces, and ProductService.RemoveFulfillmentPlaces. The returned Operations is obsolete after one day, and the GetOperation API returns `NOT_FOUND` afterwards. If conflicting updates are issued, the Operations associated with the stale updates are not marked as done until they are obsolete.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/branches/{branchesId}/products/{productsId}:setInventory", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.branches.products.setInventory", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/branches/[^/]+/products/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}:setInventory", +"request": { +"$ref": "GoogleCloudRetailV2betaSetInventoryRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"completionData": { +"methods": { +"import": { +"description": "Bulk import of processed completion dataset. Request processing is asynchronous. Partial updating is not supported. The operation is successfully finished only after the imported suggestions are indexed successfully and ready for serving. The process takes hours. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/completionData:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.completionData.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The catalog which the suggestions dataset belongs to. Format: `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/completionData:import", +"request": { +"$ref": "GoogleCloudRetailV2betaImportCompletionDataRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"controls": { +"methods": { +"create": { +"description": "Creates a Control. If the Control to create already exists, an ALREADY_EXISTS error is returned.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.controls.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"controlId": { +"description": "Required. The ID to use for the Control, which will become the final component of the Control's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Full resource name of parent catalog. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/controls", +"request": { +"$ref": "GoogleCloudRetailV2betaControl" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Control. If the Control to delete does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.controls.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Control to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Control.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.controls.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Control to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2betaControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Controls by their parent Catalog.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.controls.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. A filter to apply on the list results. Supported features: * List all the products under the parent branch if filter is unset. * List controls that are used in a single ServingConfig: 'serving_config = \"boosted_home_page_cvr\"'", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListControls` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The catalog resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/controls", +"response": { +"$ref": "GoogleCloudRetailV2betaListControlsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Control. Control cannot be set to a different oneof field, if so an INVALID_ARGUMENT is returned. If the Control to update does not exist, a NOT_FOUND error is returned.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/controls/{controlsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.controls.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/controls/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/controls/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided Control to update. The following are NOT supported: * Control.name If not set or empty, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2betaControl" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"models": { +"methods": { +"create": { +"description": "Creates a new model.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"dryRun": { +"description": "Optional. Whether to run a dry run to validate the request (without actually creating the model).", +"location": "query", +"type": "boolean" +}, +"parent": { +"description": "Required. The parent resource under which to create the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/models", +"request": { +"$ref": "GoogleCloudRetailV2betaModel" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing model.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.models.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Model to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a model.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.models.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Model to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2betaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all the models linked to this event store.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.models.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 50. Max allowed value is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListModels` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent for which to list models. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/models", +"response": { +"$ref": "GoogleCloudRetailV2betaListModelsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update of model metadata. Only fields that currently can be updated are: `filtering_option` and `periodic_tuning_state`. If other values are provided, this API method ignores them.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.models.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. Indicates which fields in the provided 'model' to update. If not set, by default updates all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2betaModel" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pause": { +"description": "Pauses the training of an existing model.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:pause", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.pause", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model to pause. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}:pause", +"request": { +"$ref": "GoogleCloudRetailV2betaPauseModelRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resume": { +"description": "Resumes the training of an existing model.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:resume", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.resume", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model to resume. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}:resume", +"request": { +"$ref": "GoogleCloudRetailV2betaResumeModelRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaModel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"tune": { +"description": "Tunes an existing model.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/models/{modelsId}:tune", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.models.tune", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the model to tune. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}:tune", +"request": { +"$ref": "GoogleCloudRetailV2betaTuneModelRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"placements": { +"methods": { +"predict": { +"description": "Makes a recommendation prediction.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/placements/{placementsId}:predict", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.placements.predict", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+placement}:predict", +"request": { +"$ref": "GoogleCloudRetailV2betaPredictRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaPredictResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"search": { +"description": "Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/placements/{placementsId}:search", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.placements.search", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that are used to make the search.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/placements/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+placement}:search", +"request": { +"$ref": "GoogleCloudRetailV2betaSearchRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaSearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"servingConfigs": { +"methods": { +"addControl": { +"description": "Enables a Control on the specified ServingConfig. The control is added in the last position of the list of controls it belongs to (e.g. if it's a facet spec control it will be applied in the last position of servingConfig.facetSpecIds) Returns a ALREADY_EXISTS error if the control has already been applied. Returns a FAILED_PRECONDITION error if the addition could exceed maximum number of control allowed for that type of control.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:addControl", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.addControl", +"parameterOrder": [ +"servingConfig" +], +"parameters": { +"servingConfig": { +"description": "Required. The source ServingConfig resource name . Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+servingConfig}:addControl", +"request": { +"$ref": "GoogleCloudRetailV2betaAddControlRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a ServingConfig. A maximum of 100 ServingConfigs are allowed in a Catalog, otherwise a FAILED_PRECONDITION error is returned.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Full resource name of parent. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"servingConfigId": { +"description": "Required. The ID to use for the ServingConfig, which will become the final component of the ServingConfig's resource name. This value should be 4-63 characters, and valid characters are /a-z-_/.", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+parent}/servingConfigs", +"request": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "DELETE", +"id": "retail.projects.locations.catalogs.servingConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ServingConfig to delete. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a ServingConfig. Returns a NotFound error if the ServingConfig does not exist.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.servingConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ServingConfig to get. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all ServingConfigs linked to this catalog.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.servingConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of results to return. If unspecified, defaults to 100. If a value greater than 100 is provided, at most 100 results are returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListServingConfigs` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The catalog resource name. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/servingConfigs", +"response": { +"$ref": "GoogleCloudRetailV2betaListServingConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a ServingConfig.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}", +"httpMethod": "PATCH", +"id": "retail.projects.locations.catalogs.servingConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/servingConfig/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided ServingConfig to update. The following are NOT supported: * ServingConfig.name If not set, all supported fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}", +"request": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"predict": { +"description": "Makes a recommendation prediction.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:predict", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.predict", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. Full resource name of the format: `{placement=projects/*/locations/global/catalogs/default_catalog/servingConfigs/*}` or `{placement=projects/*/locations/global/catalogs/default_catalog/placements/*}`. We recommend using the `servingConfigs` resource. `placements` is a legacy resource. The ID of the Recommendations AI serving config or placement. Before you can request predictions from your model, you must create at least one serving config or placement for it. For more information, see [Manage serving configs] (https://cloud.google.com/retail/docs/manage-configs). The full list of available serving configs can be seen at https://console.cloud.google.com/ai/retail/catalogs/default_catalog/configs", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+placement}:predict", +"request": { +"$ref": "GoogleCloudRetailV2betaPredictRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaPredictResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeControl": { +"description": "Disables a Control on the specified ServingConfig. The control is removed from the ServingConfig. Returns a NOT_FOUND error if the Control is not enabled for the ServingConfig.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:removeControl", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.removeControl", +"parameterOrder": [ +"servingConfig" +], +"parameters": { +"servingConfig": { +"description": "Required. The source ServingConfig resource name . Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+servingConfig}:removeControl", +"request": { +"$ref": "GoogleCloudRetailV2betaRemoveControlRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"search": { +"description": "Performs a search. This feature is only available for users who have Retail Search enabled. Enable Retail Search on Cloud Console before using this feature.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/servingConfigs/{servingConfigsId}:search", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.servingConfigs.search", +"parameterOrder": [ +"placement" +], +"parameters": { +"placement": { +"description": "Required. The resource name of the Retail Search serving config, such as `projects/*/locations/global/catalogs/default_catalog/servingConfigs/default_serving_config` or the name of the legacy placement resource, such as `projects/*/locations/global/catalogs/default_catalog/placements/default_search`. This field is used to identify the serving config name and the set of models that are used to make the search.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+/servingConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+placement}:search", +"request": { +"$ref": "GoogleCloudRetailV2betaSearchRequest" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaSearchResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"userEvents": { +"methods": { +"collect": { +"description": "Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a 3rd party domain. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:collect", +"httpMethod": "GET", +"id": "retail.projects.locations.catalogs.userEvents.collect", +"parameterOrder": [ +"parent" +], +"parameters": { +"ets": { +"description": "The event timestamp in milliseconds. This prevents browser caching of otherwise identical get requests. The name is abbreviated to reduce the payload bytes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent catalog name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"prebuiltRule": { +"description": "The prebuilt rule name that can convert a specific type of raw_json. For example: \"ga4_bq\" rule for the GA4 user event schema.", +"location": "query", +"type": "string" +}, +"rawJson": { +"description": "An arbitrary serialized JSON string that contains necessary information that can comprise a user event. When this field is specified, the user_event field will be ignored. Note: line-delimited JSON is not supported, a single JSON only.", +"location": "query", +"type": "string" +}, +"uri": { +"description": "The URL including cgi-parameters but excluding the hash fragment with a length limit of 5,000 characters. This is often more useful than the referer URL, because many browsers only send the domain for 3rd party requests.", +"location": "query", +"type": "string" +}, +"userEvent": { +"description": "Required. URL encoded UserEvent proto with a length limit of 2,000,000 characters.", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+parent}/userEvents:collect", +"response": { +"$ref": "GoogleApiHttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"import": { +"description": "Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. `Operation.response` is of type `ImportResponse`. Note that it is possible for a subset of the items to be successfully inserted. `Operation.metadata` is of type `ImportMetadata`.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:import", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. `projects/1234/locations/global/catalogs/default_catalog`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/userEvents:import", +"request": { +"$ref": "GoogleCloudRetailV2betaImportUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"purge": { +"description": "Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:purge", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the catalog under which the events are created. The format is `projects/${projectId}/locations/global/catalogs/${catalogId}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/userEvents:purge", +"request": { +"$ref": "GoogleCloudRetailV2betaPurgeUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"rejoin": { +"description": "Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:rejoin", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.rejoin", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+parent}/userEvents:rejoin", +"request": { +"$ref": "GoogleCloudRetailV2betaRejoinUserEventsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"write": { +"description": "Writes a single user event.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/catalogs/{catalogsId}/userEvents:write", +"httpMethod": "POST", +"id": "retail.projects.locations.catalogs.userEvents.write", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/catalogs/[^/]+$", +"required": true, +"type": "string" +}, +"writeAsync": { +"description": "If set to true, the user event will be written asynchronously after validation, and the API will respond without waiting for the write. Therefore, silent failures can occur even if the API returns success. In case of silent failures, error messages can be found in Stackdriver logs.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2beta/{+parent}/userEvents:write", +"request": { +"$ref": "GoogleCloudRetailV2betaUserEvent" +}, +"response": { +"$ref": "GoogleCloudRetailV2betaUserEvent" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2beta/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2beta/projects/{projectsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "retail.projects.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2beta/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2beta/projects/{projectsId}/operations", +"httpMethod": "GET", +"id": "retail.projects.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2beta/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240418", +"rootUrl": "https://retail.googleapis.com/", +"schemas": { +"GoogleApiHttpBody": { +"description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", +"id": "GoogleApiHttpBody", +"properties": { +"contentType": { +"description": "The HTTP Content-Type header value specifying the content type of the body.", +"type": "string" +}, +"data": { +"description": "The HTTP request/response body as raw binary.", +"format": "byte", +"type": "string" +}, +"extensions": { +"description": "Application specific response metadata. Must be set in the first response for streaming APIs.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingErrorContext": { +"description": "A description of the context in which an error occurred.", +"id": "GoogleCloudRetailLoggingErrorContext", +"properties": { +"httpRequest": { +"$ref": "GoogleCloudRetailLoggingHttpRequestContext", +"description": "The HTTP request which was processed when the error was triggered." +}, +"reportLocation": { +"$ref": "GoogleCloudRetailLoggingSourceLocation", +"description": "The location in the source code where the decision was made to report the error, usually the place where it was logged." +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingErrorLog": { +"description": "An error log which is reported to the Error Reporting system. This proto a superset of google.devtools.clouderrorreporting.v1beta1.ReportedErrorEvent.", +"id": "GoogleCloudRetailLoggingErrorLog", +"properties": { +"context": { +"$ref": "GoogleCloudRetailLoggingErrorContext", +"description": "A description of the context in which the error occurred." +}, +"importPayload": { +"$ref": "GoogleCloudRetailLoggingImportErrorContext", +"description": "The error payload that is populated on LRO import APIs." +}, +"message": { +"description": "A message describing the error.", +"type": "string" +}, +"requestPayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The API request payload, represented as a protocol buffer. Most API request types are supported. For example: \"type.googleapis.com/google.cloud.retail.v2.ProductService.CreateProductRequest\" \"type.googleapis.com/google.cloud.retail.v2.UserEventService.WriteUserEventRequest\"", +"type": "object" +}, +"responsePayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The API response payload, represented as a protocol buffer. This is used to log some \"soft errors\", where the response is valid but we consider there are some quality issues like unjoined events. The following API responses are supported and no PII is included: \"google.cloud.retail.v2.PredictionService.Predict\" \"google.cloud.retail.v2.UserEventService.WriteUserEvent\" \"google.cloud.retail.v2.UserEventService.CollectUserEvent\"", +"type": "object" +}, +"serviceContext": { +"$ref": "GoogleCloudRetailLoggingServiceContext", +"description": "The service context in which this error has occurred." +}, +"status": { +"$ref": "GoogleRpcStatus", +"description": "The RPC status associated with the error log." +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingHttpRequestContext": { +"description": "HTTP request data that is related to a reported error.", +"id": "GoogleCloudRetailLoggingHttpRequestContext", +"properties": { +"responseStatusCode": { +"description": "The HTTP response status code for the request.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingImportErrorContext": { +"description": "The error payload that is populated on LRO import APIs, including \"google.cloud.retail.v2.ProductService.ImportProducts\" and \"google.cloud.retail.v2.EventService.ImportUserEvents\".", +"id": "GoogleCloudRetailLoggingImportErrorContext", +"properties": { +"catalogItem": { +"description": "The detailed content which caused the error on importing a catalog item.", +"type": "string" +}, +"gcsPath": { +"description": "Cloud Storage file path of the import source. Can be set for batch operation error.", +"type": "string" +}, +"lineNumber": { +"description": "Line number of the content in file. Should be empty for permission or batch operation error.", +"type": "string" +}, +"operationName": { +"description": "The operation resource name of the LRO.", +"type": "string" +}, +"product": { +"description": "The detailed content which caused the error on importing a product.", +"type": "string" +}, +"userEvent": { +"description": "The detailed content which caused the error on importing a user event.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingServiceContext": { +"description": "Describes a running service that sends errors.", +"id": "GoogleCloudRetailLoggingServiceContext", +"properties": { +"service": { +"description": "An identifier of the service. For example, \"retail.googleapis.com\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailLoggingSourceLocation": { +"description": "Indicates a location in the source code of the service for which errors are reported.", +"id": "GoogleCloudRetailLoggingSourceLocation", +"properties": { +"functionName": { +"description": "Human-readable name of a function or method. For example, \"google.cloud.retail.v2.UserEventService.ImportUserEvents\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2AddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2AddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2AddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2AddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2AddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2AddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2BigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2BigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2CreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2CreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2OutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2ExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2ExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2GcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2GcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2ImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2ImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2ImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2ImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2ImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2UserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2Model": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2Model", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2ModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2ModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2ModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2ModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2ModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2ModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2OutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2OutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2BigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2GcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2PurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2PurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2PurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2PurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2PurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2RejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2RejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2RemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2RemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2RemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2RemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2RemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2SetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2SetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2SetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2SetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2TuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2TuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2TuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2TuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2UserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2UserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaAddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaAddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2alphaAddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaAddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2alphaAddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaBigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2alphaBigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata": { +"description": "Common metadata related to the progress of the operations.", +"id": "GoogleCloudRetailV2alphaCreateMerchantCenterAccountLinkMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaCreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2alphaCreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaEnrollSolutionMetadata": { +"description": "Metadata related to the EnrollSolution method. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaEnrollSolutionMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaEnrollSolutionResponse": { +"description": "Response for EnrollSolution method.", +"id": "GoogleCloudRetailV2alphaEnrollSolutionResponse", +"properties": { +"enrolledSolution": { +"description": "Retail API solution that the project has enrolled.", +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2alphaExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportProductsResponse": { +"description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaExportUserEventsResponse": { +"description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaExportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2alphaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaGcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2alphaGcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2alphaImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2alphaImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"transformedUserEventsMetadata": { +"$ref": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", +"description": "Metadata related to transform user events." +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2alphaImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2alphaImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2alphaUserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterAccountLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2alphaMerchantCenterAccountLink", +"properties": { +"branchId": { +"description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"feedFilters": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter" +}, +"type": "array" +}, +"feedLabel": { +"description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", +"type": "string" +}, +"id": { +"description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", +"readOnly": true, +"type": "string" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", +"readOnly": true, +"type": "string" +}, +"projectId": { +"description": "Output only. Google Cloud project ID.", +"readOnly": true, +"type": "string" +}, +"source": { +"description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", +"type": "string" +}, +"state": { +"description": "Output only. Represents the state of the link.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED" +], +"enumDescriptions": [ +"Default value.", +"Link is created and LRO is not complete.", +"Link is active.", +"Link creation failed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2alphaMerchantCenterAccountLinkMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModel": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2alphaModel", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2alphaModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"pageOptimizationConfig": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", +"description": "Optional. The page optimization config." +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2alphaModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2alphaModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfig": { +"description": "The PageOptimizationConfig for model training. This determines how many panels to optimize for, and which serving configs to consider for each panel. The purpose of this model is to optimize which ServingConfig to show on which panels in way that optimizes the visitors shopping journey.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfig", +"properties": { +"pageOptimizationEventType": { +"description": "Required. The type of UserEvent this page optimization is shown for. Each page has an associated event type - this will be the corresponding event type for the page that the page optimization model is used on. Supported types: * `add-to-cart`: Products being added to cart. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed * `category-page-view`: Homepage viewed * `shopping-cart-page-view`: User viewing a shopping cart. `home-page-view` only allows models with type `recommended-for-you`. All other page_optimization_event_type allow all Model.types.", +"type": "string" +}, +"panels": { +"description": "Required. A list of panel configurations. Limit = 5.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel" +}, +"type": "array" +}, +"restriction": { +"description": "Optional. How to restrict results across panels e.g. can the same ServingConfig be shown on multiple panels at once. If unspecified, default to `UNIQUE_MODEL_RESTRICTION`.", +"enum": [ +"RESTRICTION_UNSPECIFIED", +"NO_RESTRICTION", +"UNIQUE_SERVING_CONFIG_RESTRICTION", +"UNIQUE_MODEL_RESTRICTION", +"UNIQUE_MODEL_TYPE_RESTRICTION" +], +"enumDescriptions": [ +"Unspecified value for restriction.", +"Allow any ServingConfig to be show on any number of panels. Example: `Panel1 candidates`: pdp_ctr, pdp_cvr, home_page_ctr_no_diversity `Panel2 candidates`: home_page_ctr_no_diversity, home_page_ctr_diversity, pdp_cvr_no_diversity `Restriction` = NO_RESTRICTION `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: []", +"Do not allow the same ServingConfig.name to be shown on multiple panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_SERVING_CONFIG_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity_low) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) *", +"Do not allow multiple ServingConfigs with same Model.name to be show on on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) *", +"Do not allow multiple ServingConfigs with same Model.type to be shown on different panels. Example: `Panel1 candidates`: * pdp_ctr, pdp_cvr, home_page_ctr_no_diversity * `Panel2 candidates`: * home_page_ctr_no_diversity, home_page_ctr_diversity_low, pdp_cvr_no_diversity * `Restriction` = `UNIQUE_MODEL_RESTRICTION` `Valid combinations`: * * (pdp_ctr, home_page_ctr_no_diversity) * (pdp_ctr, home_page_ctr_diversity) * (pdp_cvr, home_page_ctr_no_diversity) * (pdp_cvr, home_page_ctr_diversity_low) * (home_page_ctr_no_diversity, pdp_cvr_no_diversity) * `Invalid combinations`: * * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_ctr, pdp_cvr_no_diversity) * (pdp_cvr, pdp_cvr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_no_diversity) * (home_page_ctr_no_diversity, home_page_ctr_diversity) *" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate": { +"description": "A candidate to consider for a given panel. Currently only ServingConfig are valid candidates.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", +"properties": { +"servingConfigId": { +"description": "This has to be a valid ServingConfig identifier. For example, for a ServingConfig with full name: `projects/*/locations/global/catalogs/default_catalog/servingConfigs/my_candidate_config`, this would be `my_candidate_config`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel": { +"description": "An individual panel with a list of ServingConfigs to consider for it.", +"id": "GoogleCloudRetailV2alphaModelPageOptimizationConfigPanel", +"properties": { +"candidates": { +"description": "Required. The candidates to consider on the panel.", +"items": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate" +}, +"type": "array" +}, +"defaultCandidate": { +"$ref": "GoogleCloudRetailV2alphaModelPageOptimizationConfigCandidate", +"description": "Required. The default candidate. If the model fails at serving time, we fall back to the default." +}, +"displayName": { +"description": "Optional. The name to display for the panel.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2alphaModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaOutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2alphaOutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2alphaBigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2alphaGcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaPurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2alphaPurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2alphaPurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaPurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2alphaPurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2alphaRejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2alphaRejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2alphaRemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2alphaRemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2alphaRemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2alphaSetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaSetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2alphaSetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTransformedUserEventsMetadata": { +"description": "Metadata related to transform user events operation.", +"id": "GoogleCloudRetailV2alphaTransformedUserEventsMetadata", +"properties": { +"sourceEventsCount": { +"description": "Count of entries in the source user events BigQuery table.", +"format": "int64", +"type": "string" +}, +"transformedEventsCount": { +"description": "Count of entries in the transformed user events BigQuery table, which could be different from the actually imported number of user events.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2alphaTuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2alphaTuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2alphaTuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2alphaUserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2alphaUserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddCatalogAttributeRequest": { +"description": "Request for CatalogService.AddCatalogAttribute method.", +"id": "GoogleCloudRetailV2betaAddCatalogAttributeRequest", +"properties": { +"catalogAttribute": { +"$ref": "GoogleCloudRetailV2betaCatalogAttribute", +"description": "Required. The CatalogAttribute to add." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddControlRequest": { +"description": "Request for AddControl method.", +"id": "GoogleCloudRetailV2betaAddControlRequest", +"properties": { +"controlId": { +"description": "Required. The id of the control to apply. Assumed to be in the same catalog as the serving config - if id is not found a NOT_FOUND error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the AddFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaAddFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddFulfillmentPlacesRequest": { +"description": "Request message for ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaAddFulfillmentPlacesRequest", +"properties": { +"addTime": { +"description": "The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"allowMissing": { +"description": "If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. The IDs for this type, such as the store IDs for \"pickup-in-store\" or the region IDs for \"same-day-delivery\" to be added for this type. Duplicate IDs will be automatically ignored. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned. If the total number of place IDs exceeds 2000 for this type after adding, then the update will be rejected.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddFulfillmentPlacesResponse": { +"description": "Response of the AddFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.AddFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaAddFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the AddLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2betaAddLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddLocalInventoriesRequest": { +"description": "Request message for ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2betaAddLocalInventoriesRequest", +"properties": { +"addMask": { +"description": "Indicates which inventory fields in the provided list of LocalInventory to update. The field is updated to the provided value. If a field is set while the place does not have a previous local inventory, the local inventory at that store is created. If a field is set while the value of that field is not provided, the original field value, if it exists, is deleted. If the mask is not set or set with empty paths, all inventory fields will be updated. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.", +"format": "google-fieldmask", +"type": "string" +}, +"addTime": { +"description": "The time when the inventory updates are issued. Used to prevent out-of-order updates on local inventory fields. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"allowMissing": { +"description": "If set to true, and the Product is not found, the local inventory will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"localInventories": { +"description": "Required. A list of inventory information at difference places. Each place is identified by its place ID. At most 3000 inventories are allowed per request.", +"items": { +"$ref": "GoogleCloudRetailV2betaLocalInventory" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAddLocalInventoriesResponse": { +"description": "Response of the ProductService.AddLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.AddLocalInventories method.", +"id": "GoogleCloudRetailV2betaAddLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaAttributesConfig": { +"description": "Catalog level attribute config.", +"id": "GoogleCloudRetailV2betaAttributesConfig", +"properties": { +"attributeConfigLevel": { +"description": "Output only. The AttributeConfigLevel used for this catalog.", +"enum": [ +"ATTRIBUTE_CONFIG_LEVEL_UNSPECIFIED", +"PRODUCT_LEVEL_ATTRIBUTE_CONFIG", +"CATALOG_LEVEL_ATTRIBUTE_CONFIG" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to CATALOG_LEVEL_ATTRIBUTE_CONFIG.", +"At this level, we honor the attribute configurations set in Product.attributes.", +"At this level, we honor the attribute configurations set in CatalogConfig.attribute_configs." +], +"readOnly": true, +"type": "string" +}, +"catalogAttributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2betaCatalogAttribute" +}, +"description": "Enable attribute(s) config at catalog level. For example, indexable, dynamic_facetable, or searchable for each attribute. The key is catalog attribute's name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. The maximum number of catalog attributes allowed in a request is 1000.", +"type": "object" +}, +"name": { +"description": "Required. Immutable. The fully qualified resource name of the attribute config. Format: `projects/*/locations/*/catalogs/*/attributesConfig`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaAudience": { +"description": "An intended audience of the Product for whom it's sold.", +"id": "GoogleCloudRetailV2betaAudience", +"properties": { +"ageGroups": { +"description": "The age groups of the audience. Strongly encouraged to use the standard values: \"newborn\" (up to 3 months old), \"infant\" (3\u201312 months old), \"toddler\" (1\u20135 years old), \"kids\" (5\u201313 years old), \"adult\" (typically teens or older). At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [age_group](https://support.google.com/merchants/answer/6324463). Schema.org property [Product.audience.suggestedMinAge](https://schema.org/suggestedMinAge) and [Product.audience.suggestedMaxAge](https://schema.org/suggestedMaxAge).", +"items": { +"type": "string" +}, +"type": "array" +}, +"genders": { +"description": "The genders of the audience. Strongly encouraged to use the standard values: \"male\", \"female\", \"unisex\". At most 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [gender](https://support.google.com/merchants/answer/6324479). Schema.org property [Product.audience.suggestedGender](https://schema.org/suggestedGender).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest": { +"description": "Request for CatalogService.BatchRemoveCatalogAttributes method.", +"id": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesRequest", +"properties": { +"attributeKeys": { +"description": "Required. The attribute name keys of the CatalogAttributes to delete. A maximum of 1000 catalog attributes can be deleted in a batch.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse": { +"description": "Response of the CatalogService.BatchRemoveCatalogAttributes.", +"id": "GoogleCloudRetailV2betaBatchRemoveCatalogAttributesResponse", +"properties": { +"deletedCatalogAttributes": { +"description": "Catalog attributes that were deleted. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resetCatalogAttributes": { +"description": "Catalog attributes that were reset. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaBigQueryOutputResult": { +"description": "A BigQuery output result.", +"id": "GoogleCloudRetailV2betaBigQueryOutputResult", +"properties": { +"datasetId": { +"description": "The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableId": { +"description": "The ID of a BigQuery Table.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaBigQuerySource": { +"description": "BigQuery source import data from.", +"id": "GoogleCloudRetailV2betaBigQuerySource", +"properties": { +"dataSchema": { +"description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: The schema is available here: https://support.google.com/analytics/answer/3437719. * `user_event_ga4`: The schema is available here: https://support.google.com/analytics/answer/7029846. Supported values for autocomplete imports: * `suggestions` (default): One JSON completion suggestion per line. * `denylist`: One JSON deny suggestion per line. * `allowlist`: One JSON allow suggestion per line.", +"type": "string" +}, +"datasetId": { +"description": "Required. The BigQuery data set to copy the data from with a length limit of 1,024 characters.", +"type": "string" +}, +"gcsStagingDir": { +"description": "Intermediate Cloud Storage directory used for the import with a length limit of 2,000 characters. Can be specified if one wants to have the BigQuery export to a specific Cloud Storage directory.", +"type": "string" +}, +"partitionDate": { +"$ref": "GoogleTypeDate", +"description": "BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format. Only supported in ImportProductsRequest." +}, +"projectId": { +"description": "The project ID (can be project # or ID) that the BigQuery source is in with a length limit of 128 characters. If not specified, inherits the project ID from the parent request.", +"type": "string" +}, +"tableId": { +"description": "Required. The BigQuery table to copy the data from with a length limit of 1,024 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCatalog": { +"description": "The catalog configuration.", +"id": "GoogleCloudRetailV2betaCatalog", +"properties": { +"displayName": { +"description": "Required. Immutable. The catalog display name. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"merchantCenterLinkingConfig": { +"$ref": "GoogleCloudRetailV2betaMerchantCenterLinkingConfig", +"description": "The Merchant Center linking configuration. After a link is added, the data stream from Merchant Center to Cloud Retail will be enabled automatically. The requester must have access to the Merchant Center account in order to make changes to this field." +}, +"name": { +"description": "Required. Immutable. The fully qualified resource name of the catalog.", +"type": "string" +}, +"productLevelConfig": { +"$ref": "GoogleCloudRetailV2betaProductLevelConfig", +"description": "Required. The product level configuration." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCatalogAttribute": { +"description": "Catalog level attribute config for an attribute. For example, if customers want to enable/disable facet for a specific attribute.", +"id": "GoogleCloudRetailV2betaCatalogAttribute", +"properties": { +"dynamicFacetableOption": { +"description": "If DYNAMIC_FACETABLE_ENABLED, attribute values are available for dynamic facet. Could only be DYNAMIC_FACETABLE_DISABLED if CatalogAttribute.indexable_option is INDEXABLE_DISABLED. Otherwise, an INVALID_ARGUMENT error is returned. Must be specified, otherwise throws INVALID_FORMAT error.", +"enum": [ +"DYNAMIC_FACETABLE_OPTION_UNSPECIFIED", +"DYNAMIC_FACETABLE_ENABLED", +"DYNAMIC_FACETABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Dynamic facetable option enabled for an attribute.", +"Dynamic facetable option disabled for an attribute." +], +"type": "string" +}, +"exactSearchableOption": { +"description": "If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable. This property only applies to textual custom attributes and requires indexable set to enabled to enable exact-searchable. If unset, the server behavior defaults to EXACT_SEARCHABLE_DISABLED.", +"enum": [ +"EXACT_SEARCHABLE_OPTION_UNSPECIFIED", +"EXACT_SEARCHABLE_ENABLED", +"EXACT_SEARCHABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Exact searchable option enabled for an attribute.", +"Exact searchable option disabled for an attribute." +], +"type": "string" +}, +"facetConfig": { +"$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfig", +"description": "Contains facet options." +}, +"inUse": { +"description": "Output only. Indicates whether this attribute has been used by any products. `True` if at least one Product is using this attribute in Product.attributes. Otherwise, this field is `False`. CatalogAttribute can be pre-loaded by using CatalogService.AddCatalogAttribute, CatalogService.ImportCatalogAttributes, or CatalogService.UpdateAttributesConfig APIs. This field is `False` for pre-loaded CatalogAttributes. Only pre-loaded catalog attributes that are neither in use by products nor predefined can be deleted. Catalog attributes that are either in use by products or are predefined attributes cannot be deleted; however, their configuration properties will reset to default values upon removal request. After catalog changes, it takes about 10 minutes for this field to update.", +"readOnly": true, +"type": "boolean" +}, +"indexableOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if INDEXABLE_ENABLED attribute values are indexed so that it can be filtered, faceted, or boosted in SearchService.Search. Must be specified when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.", +"enum": [ +"INDEXABLE_OPTION_UNSPECIFIED", +"INDEXABLE_ENABLED", +"INDEXABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Indexable option enabled for an attribute.", +"Indexable option disabled for an attribute." +], +"type": "string" +}, +"key": { +"description": "Required. Attribute name. For example: `color`, `brands`, `attributes.custom_attribute`, such as `attributes.xyz`. To be indexable, the attribute name can contain only alpha-numeric characters and underscores. For example, an attribute named `attributes.abc_xyz` can be indexed, but an attribute named `attributes.abc-xyz` cannot be indexed. If the attribute key starts with `attributes.`, then the attribute is a custom attribute. Attributes such as `brands`, `patterns`, and `title` are built-in and called system attributes.", +"type": "string" +}, +"recommendationsFilteringOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if RECOMMENDATIONS_FILTERING_ENABLED, attribute values are filterable for recommendations. This option works for categorical features only, does not work for numerical features, inventory filtering.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"retrievableOption": { +"description": "If RETRIEVABLE_ENABLED, attribute values are retrievable in the search results. If unset, the server behavior defaults to RETRIEVABLE_DISABLED.", +"enum": [ +"RETRIEVABLE_OPTION_UNSPECIFIED", +"RETRIEVABLE_ENABLED", +"RETRIEVABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Retrievable option enabled for an attribute.", +"Retrievable option disabled for an attribute." +], +"type": "string" +}, +"searchableOption": { +"description": "When AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, if SEARCHABLE_ENABLED, attribute values are searchable by text queries in SearchService.Search. If SEARCHABLE_ENABLED but attribute type is numerical, attribute values will not be searchable by text queries in SearchService.Search, as there are no text values associated to numerical attributes. Must be specified, when AttributesConfig.attribute_config_level is CATALOG_LEVEL_ATTRIBUTE_CONFIG, otherwise throws INVALID_FORMAT error.", +"enum": [ +"SEARCHABLE_OPTION_UNSPECIFIED", +"SEARCHABLE_ENABLED", +"SEARCHABLE_DISABLED" +], +"enumDescriptions": [ +"Value used when unset.", +"Searchable option enabled for an attribute.", +"Searchable option disabled for an attribute." +], +"type": "string" +}, +"type": { +"description": "Output only. The type of this attribute. This is derived from the attribute in Product.attributes.", +"enum": [ +"UNKNOWN", +"TEXTUAL", +"NUMERICAL" +], +"enumDescriptions": [ +"The type of the attribute is unknown. Used when type cannot be derived from attribute that is not in_use.", +"Textual attribute.", +"Numerical attribute." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCatalogAttributeFacetConfig": { +"description": "Possible options for the facet that corresponds to the current attribute config.", +"id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfig", +"properties": { +"facetIntervals": { +"description": "If you don't set the facet SearchRequest.FacetSpec.FacetKey.intervals in the request to a numerical attribute, then we use the computed intervals with rounded bounds obtained from all its product numerical attribute values. The computed intervals might not be ideal for some attributes. Therefore, we give you the option to overwrite them with the facet_intervals field. The maximum of facet intervals per CatalogAttribute is 40. Each interval must have a lower bound or an upper bound. If both bounds are provided, then the lower bound must be smaller or equal than the upper bound.", +"items": { +"$ref": "GoogleCloudRetailV2betaInterval" +}, +"type": "array" +}, +"ignoredFacetValues": { +"description": "Each instance represents a list of attribute values to ignore as facet values for a specific time range. The maximum number of instances per CatalogAttribute is 25.", +"items": { +"$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues" +}, +"type": "array" +}, +"mergedFacet": { +"$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacet", +"description": "Use this field only if you want to merge a facet key into another facet key." +}, +"mergedFacetValues": { +"description": "Each instance replaces a list of facet values by a merged facet value. If a facet value is not in any list, then it will stay the same. To avoid conflicts, only paths of length 1 are accepted. In other words, if \"dark_blue\" merged into \"BLUE\", then the latter can't merge into \"blues\" because this would create a path of length 2. The maximum number of instances of MergedFacetValue per CatalogAttribute is 100. This feature is available only for textual custom attributes.", +"items": { +"$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue" +}, +"type": "array" +}, +"rerankConfig": { +"$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig", +"description": "Set this field only if you want to rerank based on facet values engaged by the user for the current key. This option is only possible for custom facetable textual keys." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues": { +"description": "Facet values to ignore on facets during the specified time range for the given SearchResponse.Facet.key attribute.", +"id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigIgnoredFacetValues", +"properties": { +"endTime": { +"description": "If start time is empty and end time is not empty, then ignore these facet values before end time.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Time range for the current list of facet values to ignore. If multiple time ranges are specified for an facet value for the current attribute, consider all of them. If both are empty, ignore always. If start time and end time are set, then start time must be before end time. If start time is not empty and end time is empty, then will ignore these facet values after the start time.", +"format": "google-datetime", +"type": "string" +}, +"values": { +"description": "List of facet values to ignore for the following time range. The facet values are the same as the attribute values. There is a limit of 10 values per instance of IgnoredFacetValues. Each value can have at most 128 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacet": { +"description": "The current facet key (i.e. attribute config) maps into the merged_facet_key. A facet key can have at most one child. The current facet key and the merged facet key need both to be textual custom attributes or both numerical custom attributes (same type).", +"id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacet", +"properties": { +"mergedFacetKey": { +"description": "The merged facet key should be a valid facet key that is different than the facet key of the current catalog attribute. We refer this is merged facet key as the child of the current catalog attribute. This merged facet key can't be a parent of another facet key (i.e. no directed path of length 2). This merged facet key needs to be either a textual custom attribute or a numerical custom attribute.", +"type": "string" +}, +"mergedFacetValues": { +"deprecated": true, +"description": "Each instance is a list of facet values that map into the same (possibly different) merged facet value. For the current attribute config, each facet value should map to at most one merged facet value.", +"items": { +"$ref": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue": { +"description": "Replaces a set of textual facet values by the same (possibly different) merged facet value. Each facet value should appear at most once as a value per CatalogAttribute. This feature is available only for textual custom attributes.", +"id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigMergedFacetValue", +"properties": { +"mergedValue": { +"description": "All the previous values are replaced by this merged facet value. This merged_value must be non-empty and can have up to 128 characters.", +"type": "string" +}, +"values": { +"description": "All the facet values that are replaces by the same merged_value that follows. The maximum number of values per MergedFacetValue is 25. Each value can have up to 128 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig": { +"description": "Options to rerank based on facet values engaged by the user for the current key. That key needs to be a custom textual key and facetable. To use this control, you also need to pass all the facet keys engaged by the user in the request using the field [SearchRequest.FacetSpec]. In particular, if you don't pass the facet keys engaged that you want to rerank on, this control won't be effective. Moreover, to obtain better results, the facet values that you want to rerank on should be close to English (ideally made of words, underscores, and spaces).", +"id": "GoogleCloudRetailV2betaCatalogAttributeFacetConfigRerankConfig", +"properties": { +"facetValues": { +"description": "If empty, rerank on all facet values for the current key. Otherwise, will rerank on the facet values from this list only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rerankFacet": { +"description": "If set to true, then we also rerank the dynamic facets based on the facet values engaged by the user for the current attribute key during serving.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaColorInfo": { +"description": "The color information of a Product.", +"id": "GoogleCloudRetailV2betaColorInfo", +"properties": { +"colorFamilies": { +"description": "The standard color families. Strongly recommended to use the following standard color groups: \"Red\", \"Pink\", \"Orange\", \"Yellow\", \"Purple\", \"Green\", \"Cyan\", \"Blue\", \"Brown\", \"White\", \"Gray\", \"Black\" and \"Mixed\". Normally it is expected to have only 1 color family. May consider using single \"Mixed\" instead of multiple values. A maximum of 5 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).", +"items": { +"type": "string" +}, +"type": "array" +}, +"colors": { +"description": "The color display names, which may be different from standard color family names, such as the color aliases used in the website frontend. Normally it is expected to have only 1 color. May consider using single \"Mixed\" instead of multiple values. A maximum of 75 colors are allowed. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCompleteQueryResponse": { +"description": "Response of the autocomplete query.", +"id": "GoogleCloudRetailV2betaCompleteQueryResponse", +"properties": { +"attributionToken": { +"description": "A unique complete token. This should be included in the UserEvent.completion_detail for search events resulting from this completion, which enables accurate attribution of complete model performance.", +"type": "string" +}, +"completionResults": { +"description": "Results of the matching suggestions. The result list is ordered and the first result is top suggestion.", +"items": { +"$ref": "GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult" +}, +"type": "array" +}, +"recentSearchResults": { +"deprecated": true, +"description": "Deprecated. Matched recent searches of this user. The maximum number of recent searches is 10. This field is a restricted feature. If you want to enable it, contact Retail Search support. This feature is only available when CompleteQueryRequest.visitor_id field is set and UserEvent is imported. The recent searches satisfy the follow rules: * They are ordered from latest to oldest. * They are matched with CompleteQueryRequest.query case insensitively. * They are transformed to lower case. * They are UTF-8 safe. Recent searches are deduplicated. More recent searches will be reserved when duplication happens.", +"items": { +"$ref": "GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult": { +"description": "Resource that represents completion results.", +"id": "GoogleCloudRetailV2betaCompleteQueryResponseCompletionResult", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2betaCustomAttribute" +}, +"description": "Custom attributes for the suggestion term. * For \"user-data\", the attributes are additional custom attributes ingested through BigQuery. * For \"cloud-retail\", the attributes are product attributes generated by Cloud Retail. It requires UserEvent.product_details is imported properly.", +"type": "object" +}, +"suggestion": { +"description": "The suggestion for the query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult": { +"deprecated": true, +"description": "Recent search of this user.", +"id": "GoogleCloudRetailV2betaCompleteQueryResponseRecentSearchResult", +"properties": { +"recentSearch": { +"description": "The recent search query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCompletionConfig": { +"description": "Catalog level autocomplete config for customers to customize autocomplete feature's settings.", +"id": "GoogleCloudRetailV2betaCompletionConfig", +"properties": { +"allowlistInputConfig": { +"$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete allowlist phrases.", +"readOnly": true +}, +"autoLearning": { +"description": "If set to true, the auto learning function is enabled. Auto learning uses user data to generate suggestions using ML techniques. Default value is false. Only after enabling auto learning can users use `cloud-retail` data in CompleteQueryRequest.", +"type": "boolean" +}, +"denylistInputConfig": { +"$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete denylist phrases.", +"readOnly": true +}, +"lastAllowlistImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest allowlist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"lastDenylistImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest denylist import. Can use GetOperation API to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"lastSuggestionsImportOperation": { +"description": "Output only. Name of the LRO corresponding to the latest suggestion terms list import. Can use GetOperation API method to retrieve the latest state of the Long Running Operation.", +"readOnly": true, +"type": "string" +}, +"matchingOrder": { +"description": "Specifies the matching order for autocomplete suggestions, e.g., a query consisting of 'sh' with 'out-of-order' specified would suggest \"women's shoes\", whereas a query of 'red s' with 'exact-prefix' specified would suggest \"red shoes\". Currently supported values: * 'out-of-order' * 'exact-prefix' Default value: 'exact-prefix'.", +"type": "string" +}, +"maxSuggestions": { +"description": "The maximum number of autocomplete suggestions returned per term. Default value is 20. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", +"format": "int32", +"type": "integer" +}, +"minPrefixLength": { +"description": "The minimum number of characters needed to be typed in order to get suggestions. Default value is 2. If left unset or set to 0, then will fallback to default value. Value range is 1 to 20.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. Immutable. Fully qualified name `projects/*/locations/*/catalogs/*/completionConfig`", +"type": "string" +}, +"suggestionsInputConfig": { +"$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", +"description": "Output only. The source data for the latest import of the autocomplete suggestion phrases.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCompletionDataInputConfig": { +"description": "The input config source for completion data.", +"id": "GoogleCloudRetailV2betaCompletionDataInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2betaBigQuerySource", +"description": "Required. BigQuery input source. Add the IAM permission \"BigQuery Data Viewer\" for cloud-retail-customer-data-access@system.gserviceaccount.com before using this feature otherwise an error is thrown." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCompletionDetail": { +"description": "Detailed completion information including completion attribution token and clicked completion info.", +"id": "GoogleCloudRetailV2betaCompletionDetail", +"properties": { +"completionAttributionToken": { +"description": "Completion attribution token in CompleteQueryResponse.attribution_token.", +"type": "string" +}, +"selectedPosition": { +"description": "End user selected CompleteQueryResponse.CompletionResult.suggestion position, starting from 0.", +"format": "int32", +"type": "integer" +}, +"selectedSuggestion": { +"description": "End user selected CompleteQueryResponse.CompletionResult.suggestion.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCondition": { +"description": "Metadata that is used to define a condition that triggers an action. A valid condition must specify at least one of 'query_terms' or 'products_filter'. If multiple fields are specified, the condition is met if all the fields are satisfied e.g. if a set of query terms and product_filter are set, then only items matching the product_filter for requests with a query matching the query terms wil get boosted.", +"id": "GoogleCloudRetailV2betaCondition", +"properties": { +"activeTimeRange": { +"description": "Range of time(s) specifying when Condition is active. Condition true if any time range matches.", +"items": { +"$ref": "GoogleCloudRetailV2betaConditionTimeRange" +}, +"type": "array" +}, +"pageCategories": { +"description": "Used to support browse uses cases. A list (up to 10 entries) of categories or departments. The format should be the same as UserEvent.page_categories;", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "A list (up to 10 entries) of terms to match the query on. If not specified, match all queries. If many query terms are specified, the condition is matched if any of the terms is a match (i.e. using the OR operator).", +"items": { +"$ref": "GoogleCloudRetailV2betaConditionQueryTerm" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaConditionQueryTerm": { +"description": "Query terms that we want to match on.", +"id": "GoogleCloudRetailV2betaConditionQueryTerm", +"properties": { +"fullMatch": { +"description": "Whether this is supposed to be a full or partial match.", +"type": "boolean" +}, +"value": { +"description": "The value of the term to match on. Value cannot be empty. Value can have at most 3 terms if specified as a partial match. Each space separated string is considered as one term. For example, \"a b c\" is 3 terms and allowed, but \" a b c d\" is 4 terms and not allowed for a partial match.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaConditionTimeRange": { +"description": "Used for time-dependent conditions. Example: Want to have rule applied for week long sale.", +"id": "GoogleCloudRetailV2betaConditionTimeRange", +"properties": { +"endTime": { +"description": "End of time range. Range is inclusive.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Start of time range. Range is inclusive.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaControl": { +"description": "Configures dynamic metadata that can be linked to a ServingConfig and affect search or recommendation results at serving time.", +"id": "GoogleCloudRetailV2betaControl", +"properties": { +"associatedServingConfigIds": { +"description": "Output only. List of serving config ids that are associated with this control in the same Catalog. Note the association is managed via the ServingConfig, this is an output only denormalized view.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"displayName": { +"description": "Required. The human readable control display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is thrown.", +"type": "string" +}, +"facetSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestFacetSpec", +"deprecated": true, +"description": "A facet specification to perform faceted search. Note that this field is deprecated and will throw NOT_IMPLEMENTED if used for creating a control." +}, +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/controls/*`", +"type": "string" +}, +"rule": { +"$ref": "GoogleCloudRetailV2betaRule", +"description": "A rule control - a condition-action pair. Enacts a set action when the condition is triggered. For example: Boost \"gShoe\" when query full matches \"Running Shoes\"." +}, +"searchSolutionUseCase": { +"description": "Specifies the use case for the control. Affects what condition fields can be set. Only settable by search controls. Will default to SEARCH_SOLUTION_USE_CASE_SEARCH if not specified. Currently only allow one search_solution_use_case per control.", +"items": { +"enum": [ +"SEARCH_SOLUTION_USE_CASE_UNSPECIFIED", +"SEARCH_SOLUTION_USE_CASE_SEARCH", +"SEARCH_SOLUTION_USE_CASE_BROWSE" +], +"enumDescriptions": [ +"The value when it's unspecified. In this case, server behavior defaults to SEARCH_SOLUTION_USE_CASE_SEARCH.", +"Search use case. Expects the traffic has a non-empty query.", +"Browse use case. Expects the traffic has an empty query." +], +"type": "string" +}, +"type": "array" +}, +"solutionTypes": { +"description": "Required. Immutable. The solution types that the control is used for. Currently we support setting only one type of solution at creation time. Only `SOLUTION_TYPE_SEARCH` value is supported at the moment. If no solution type is provided at creation time, will default to SOLUTION_TYPE_SEARCH.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata": { +"description": "Common metadata related to the progress of the operations.", +"id": "GoogleCloudRetailV2betaCreateMerchantCenterAccountLinkMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCreateModelMetadata": { +"description": "Metadata associated with a create operation.", +"id": "GoogleCloudRetailV2betaCreateModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this create applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaCustomAttribute": { +"description": "A custom attribute that is not explicitly modeled in Product.", +"id": "GoogleCloudRetailV2betaCustomAttribute", +"properties": { +"indexable": { +"deprecated": true, +"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are indexed, so that they can be filtered, faceted or boosted in SearchService.Search. This field is ignored in a UserEvent. See SearchRequest.filter, SearchRequest.facet_specs and SearchRequest.boost_spec for more details.", +"type": "boolean" +}, +"numbers": { +"description": "The numerical values of this custom attribute. For example, `[2.3, 15.4]` when the key is \"lengths_cm\". Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +}, +"searchable": { +"deprecated": true, +"description": "This field is normally ignored unless AttributesConfig.attribute_config_level of the Catalog is set to the deprecated 'PRODUCT_LEVEL_ATTRIBUTE_CONFIG' mode. For information about product-level attribute configuration, see [Configuration modes](https://cloud.google.com/retail/docs/attribute-config#config-modes). If true, custom attribute values are searchable by text queries in SearchService.Search. This field is ignored in a UserEvent. Only set if type text is set. Otherwise, a INVALID_ARGUMENT error is returned.", +"type": "boolean" +}, +"text": { +"description": "The textual values of this custom attribute. For example, `[\"yellow\", \"green\"]` when the key is \"color\". Empty string is not allowed. Otherwise, an INVALID_ARGUMENT error is returned. Exactly one of text or numbers should be set. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExperimentInfo": { +"description": "Metadata for active A/B testing Experiment.", +"id": "GoogleCloudRetailV2betaExperimentInfo", +"properties": { +"experiment": { +"description": "The fully qualified resource name of the experiment that provides the serving config under test, should an active experiment exist. For example: `projects/*/locations/global/catalogs/default_catalog/experiments/experiment_id`", +"type": "string" +}, +"servingConfigExperiment": { +"$ref": "GoogleCloudRetailV2betaExperimentInfoServingConfigExperiment", +"description": "A/B test between existing Cloud Retail Search ServingConfigs." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExperimentInfoServingConfigExperiment": { +"description": "Metadata for active serving config A/B tests.", +"id": "GoogleCloudRetailV2betaExperimentInfoServingConfigExperiment", +"properties": { +"experimentServingConfig": { +"description": "The fully qualified resource name of the serving config Experiment.VariantArm.serving_config_id responsible for generating the search response. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.", +"type": "string" +}, +"originalServingConfig": { +"description": "The fully qualified resource name of the original SearchRequest.placement in the search request prior to reassignment by experiment API. For example: `projects/*/locations/*/catalogs/*/servingConfigs/*`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportAnalyticsMetricsRequest": { +"description": "Request message for the `ExportAnalyticsMetrics` method.", +"id": "GoogleCloudRetailV2betaExportAnalyticsMetricsRequest", +"properties": { +"filter": { +"description": "A filtering expression to specify restrictions on returned metrics. The expression is a sequence of terms. Each term applies a restriction to the returned metrics. Use this expression to restrict results to a specific time range. Currently we expect only one types of fields: * `timestamp`: This can be specified twice, once with a less than operator and once with a greater than operator. The `timestamp` restriction should result in one, contiguous, valid, `timestamp` range. Some examples of valid filters expressions: * Example 1: `timestamp > \"2012-04-23T18:25:43.511Z\" timestamp < \"2012-04-23T18:30:43.511Z\"` * Example 2: `timestamp > \"2012-04-23T18:25:43.511Z\"`", +"type": "string" +}, +"outputConfig": { +"$ref": "GoogleCloudRetailV2betaOutputConfig", +"description": "Required. The output location of the data." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportAnalyticsMetricsResponse": { +"description": "Response of the ExportAnalyticsMetricsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportAnalyticsMetricsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportErrorsConfig": { +"description": "Configuration of destination for Export related errors.", +"id": "GoogleCloudRetailV2betaExportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage path for import errors. This must be an empty, existing Cloud Storage bucket. Export errors will be written to a file in this bucket, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportMetadata": { +"description": "Metadata related to the progress of the Export operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaExportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportProductsResponse": { +"description": "Response of the ExportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaExportUserEventsResponse": { +"description": "Response of the ExportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaExportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaExportErrorsConfig", +"description": "This field is never set." +}, +"outputResult": { +"$ref": "GoogleCloudRetailV2betaOutputResult", +"description": "Output result indicating where the data were exported to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaFulfillmentInfo": { +"description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods.", +"id": "GoogleCloudRetailV2betaFulfillmentInfo", +"properties": { +"placeIds": { +"description": "The IDs for this type, such as the store IDs for FulfillmentInfo.type.pickup-in-store or the region IDs for FulfillmentInfo.type.same-day-delivery. A maximum of 3000 values are allowed. Each value must be a string with a length limit of 30 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaGcsOutputResult": { +"description": "A Gcs output result.", +"id": "GoogleCloudRetailV2betaGcsOutputResult", +"properties": { +"outputUri": { +"description": "The uri of Gcs output", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaGcsSource": { +"description": "Google Cloud Storage location for input content.", +"id": "GoogleCloudRetailV2betaGcsSource", +"properties": { +"dataSchema": { +"description": "The schema to use when parsing the data from the source. Supported values for product imports: * `product` (default): One JSON Product per line. Each product must have a valid Product.id. * `product_merchant_center`: See [Importing catalog data from Merchant Center](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog#mc). Supported values for user events imports: * `user_event` (default): One JSON UserEvent per line. * `user_event_ga360`: Using https://support.google.com/analytics/answer/3437719. Supported values for control imports: * `control` (default): One JSON Control per line. Supported values for catalog attribute imports: * `catalog_attribute` (default): One CSV CatalogAttribute per line.", +"type": "string" +}, +"inputUris": { +"description": "Required. Google Cloud Storage URIs to input files. URI can be up to 2000 characters long. URIs can match the full object path (for example, `gs://bucket/directory/object.json`) or a pattern matching one or more files, such as `gs://bucket/directory/*.json`. A request can contain at most 100 files, and each file can be up to 2 GB. See [Importing product information](https://cloud.google.com/retail/recommendations-ai/docs/upload-catalog) for the expected file format and setup instructions.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaGetDefaultBranchResponse": { +"description": "Response message of CatalogService.GetDefaultBranch.", +"id": "GoogleCloudRetailV2betaGetDefaultBranchResponse", +"properties": { +"branch": { +"description": "Full resource name of the branch id currently set as default branch.", +"type": "string" +}, +"note": { +"description": "This corresponds to SetDefaultBranchRequest.note field, when this branch was set as default.", +"type": "string" +}, +"setTime": { +"description": "The time when this branch is set to default.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImage": { +"description": "Product image. Recommendations AI and Retail Search do not use product images to improve prediction and search results. However, product images can be returned in results, and are shown in prediction or search previews in the console.", +"id": "GoogleCloudRetailV2betaImage", +"properties": { +"height": { +"description": "Height of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "Required. URI of the image. This field must be a valid UTF-8 encoded URI with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", +"type": "string" +}, +"width": { +"description": "Width of the image in number of pixels. This field must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportCompletionDataRequest": { +"description": "Request message for ImportCompletionData methods.", +"id": "GoogleCloudRetailV2betaImportCompletionDataRequest", +"properties": { +"inputConfig": { +"$ref": "GoogleCloudRetailV2betaCompletionDataInputConfig", +"description": "Required. The desired input location of the data." +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportCompletionDataResponse": { +"description": "Response of the ImportCompletionDataRequest. If the long running operation is done, this message is returned by the google.longrunning.Operations.response field if the operation is successful.", +"id": "GoogleCloudRetailV2betaImportCompletionDataResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportErrorsConfig": { +"description": "Configuration of destination for Import related errors.", +"id": "GoogleCloudRetailV2betaImportErrorsConfig", +"properties": { +"gcsPrefix": { +"description": "Google Cloud Storage prefix for import errors. This must be an empty, existing Cloud Storage directory. Import errors are written to sharded files in this directory, one per line, as a JSON-encoded `google.rpc.Status` message.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportMetadata": { +"description": "Metadata related to the progress of the Import operation. This is returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaImportMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"notificationPubsubTopic": { +"description": "Pub/Sub topic for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.", +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field is never set.", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were processed successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportProductsRequest": { +"description": "Request message for Import methods.", +"id": "GoogleCloudRetailV2betaImportProductsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "The desired location of errors incurred during the Import." +}, +"inputConfig": { +"$ref": "GoogleCloudRetailV2betaProductInputConfig", +"description": "Required. The desired input location of the data." +}, +"notificationPubsubTopic": { +"description": "Full Pub/Sub topic name for receiving notification. If this field is set, when the import is finished, a notification is sent to specified Pub/Sub topic. The message data is JSON string of a Operation. Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has to be within the same project as ImportProductsRequest.parent. Make sure that both `cloud-retail-customer-data-access@system.gserviceaccount.com` and `service-@gcp-sa-retail.iam.gserviceaccount.com` have the `pubsub.topics.publish` IAM permission on the topic. Only supported when ImportProductsRequest.reconciliation_mode is set to `FULL`.", +"type": "string" +}, +"reconciliationMode": { +"description": "The mode of reconciliation between existing products and the products to be imported. Defaults to ReconciliationMode.INCREMENTAL.", +"enum": [ +"RECONCILIATION_MODE_UNSPECIFIED", +"INCREMENTAL", +"FULL" +], +"enumDescriptions": [ +"Defaults to INCREMENTAL.", +"Inserts new products or updates existing products.", +"Calculates diff and replaces the entire product dataset. Existing products may be deleted if they are not present in the source location." +], +"type": "string" +}, +"requestId": { +"deprecated": true, +"description": "Deprecated. This field has no effect.", +"type": "string" +}, +"updateMask": { +"description": "Indicates which fields in the provided imported `products` to update. If not set, all fields are updated. If provided, only the existing product fields are updated. Missing products will not be created.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportProductsResponse": { +"description": "Response of the ImportProductsRequest. If the long running operation is done, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaImportProductsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "Echoes the destination for the complete errors in the request if set." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportUserEventsRequest": { +"description": "Request message for the ImportUserEvents request.", +"id": "GoogleCloudRetailV2betaImportUserEventsRequest", +"properties": { +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "The desired location of errors incurred during the Import. Cannot be set for inline user event imports." +}, +"inputConfig": { +"$ref": "GoogleCloudRetailV2betaUserEventInputConfig", +"description": "Required. The desired input location of the data." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaImportUserEventsResponse": { +"description": "Response of the ImportUserEventsRequest. If the long running operation was successful, then this message is returned by the google.longrunning.Operations.response field if the operation was successful.", +"id": "GoogleCloudRetailV2betaImportUserEventsResponse", +"properties": { +"errorSamples": { +"description": "A sample of errors encountered while processing the request.", +"items": { +"$ref": "GoogleRpcStatus" +}, +"type": "array" +}, +"errorsConfig": { +"$ref": "GoogleCloudRetailV2betaImportErrorsConfig", +"description": "Echoes the destination for the complete errors if this field was set in the request." +}, +"importSummary": { +"$ref": "GoogleCloudRetailV2betaUserEventImportSummary", +"description": "Aggregated statistics of user event import status." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaInterval": { +"description": "A floating point interval.", +"id": "GoogleCloudRetailV2betaInterval", +"properties": { +"exclusiveMaximum": { +"description": "Exclusive upper bound.", +"format": "double", +"type": "number" +}, +"exclusiveMinimum": { +"description": "Exclusive lower bound.", +"format": "double", +"type": "number" +}, +"maximum": { +"description": "Inclusive upper bound.", +"format": "double", +"type": "number" +}, +"minimum": { +"description": "Inclusive lower bound.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaListCatalogsResponse": { +"description": "Response for CatalogService.ListCatalogs method.", +"id": "GoogleCloudRetailV2betaListCatalogsResponse", +"properties": { +"catalogs": { +"description": "All the customer's Catalogs.", +"items": { +"$ref": "GoogleCloudRetailV2betaCatalog" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be sent as ListCatalogsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaListControlsResponse": { +"description": "Response for ListControls method.", +"id": "GoogleCloudRetailV2betaListControlsResponse", +"properties": { +"controls": { +"description": "All the Controls for a given catalog.", +"items": { +"$ref": "GoogleCloudRetailV2betaControl" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaListModelsResponse": { +"description": "Response to a ListModelRequest.", +"id": "GoogleCloudRetailV2betaListModelsResponse", +"properties": { +"models": { +"description": "List of Models.", +"items": { +"$ref": "GoogleCloudRetailV2betaModel" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaListProductsResponse": { +"description": "Response message for ProductService.ListProducts method.", +"id": "GoogleCloudRetailV2betaListProductsResponse", +"properties": { +"nextPageToken": { +"description": "A token that can be sent as ListProductsRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"products": { +"description": "The Products.", +"items": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaListServingConfigsResponse": { +"description": "Response for ListServingConfigs method.", +"id": "GoogleCloudRetailV2betaListServingConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Pagination token, if not returned indicates the last page.", +"type": "string" +}, +"servingConfigs": { +"description": "All the ServingConfigs for a given catalog.", +"items": { +"$ref": "GoogleCloudRetailV2betaServingConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaLocalInventory": { +"description": "The inventory information at a place (e.g. a store) identified by a place ID.", +"id": "GoogleCloudRetailV2betaLocalInventory", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2betaCustomAttribute" +}, +"description": "Additional local inventory attributes, for example, store name, promotion tags, etc. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * At most 30 attributes are allowed. * The key must be a UTF-8 encoded string with a length limit of 32 characters. * The key must match the pattern: `a-zA-Z0-9*`. For example, key0LikeThis or KEY_1_LIKE_THIS. * The attribute values must be of the same type (text or number). * Only 1 value is allowed for each attribute. * For text values, the length limit is 256 UTF-8 characters. * The attribute does not support search. The `searchable` field should be unset or set to false. * The max summed total bytes of custom attribute keys and values per product is 5MiB.", +"type": "object" +}, +"fulfillmentTypes": { +"description": "Input only. Supported fulfillment types. Valid fulfillment type values include commonly used types (such as pickup in store and same day delivery), and custom types. Customers have to map custom types to their display names before rendering UI. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. All the elements must be distinct. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"placeId": { +"description": "The place ID for the current set of inventory information.", +"type": "string" +}, +"priceInfo": { +"$ref": "GoogleCloudRetailV2betaPriceInfo", +"description": "Product price and cost information. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371)." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterAccountLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2betaMerchantCenterAccountLink", +"properties": { +"branchId": { +"description": "Required. The branch ID (e.g. 0/1/2) within the catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"feedFilters": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter" +}, +"type": "array" +}, +"feedLabel": { +"description": "The FeedLabel used to perform filtering. Note: this replaces [region_id](https://developers.google.com/shopping-content/reference/rest/v2.1/products#Product.FIELDS.feed_label). Example value: `US`. Example value: `FeedLabel1`.", +"type": "string" +}, +"id": { +"description": "Output only. Immutable. MerchantCenterAccountLink identifier, which is the final component of name. This field is auto generated and follows the convention: `BranchId_MerchantCenterAccountId`. `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/id_1`.", +"readOnly": true, +"type": "string" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty, no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant center account id](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Output only. Immutable. Full resource name of the Merchant Center Account Link, such as `projects/*/locations/global/catalogs/default_catalog/merchantCenterAccountLinks/merchant_center_account_link`.", +"readOnly": true, +"type": "string" +}, +"projectId": { +"description": "Output only. Google Cloud project ID.", +"readOnly": true, +"type": "string" +}, +"source": { +"description": "Optional. An optional arbitrary string that could be used as a tag for tracking link source.", +"type": "string" +}, +"state": { +"description": "Output only. Represents the state of the link.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED" +], +"enumDescriptions": [ +"Default value.", +"Link is created and LRO is not complete.", +"Link is active.", +"Link creation failed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2betaMerchantCenterAccountLinkMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterFeedFilter": { +"description": "Merchant Center Feed filter criterion.", +"id": "GoogleCloudRetailV2betaMerchantCenterFeedFilter", +"properties": { +"primaryFeedId": { +"description": "Merchant Center primary feed ID.", +"format": "int64", +"type": "string" +}, +"primaryFeedName": { +"description": "Merchant Center primary feed name. The name is used for the display purposes only.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterLink": { +"description": "Represents a link between a Merchant Center account and a branch. After a link is established, products from the linked Merchant Center account are streamed to the linked branch.", +"id": "GoogleCloudRetailV2betaMerchantCenterLink", +"properties": { +"branchId": { +"description": "The branch ID (e.g. 0/1/2) within this catalog that products from merchant_center_account_id are streamed to. When updating this field, an empty value will use the currently configured default branch. However, changing the default branch later on won't change the linked branch here. A single branch ID can only have one linked Merchant Center account ID.", +"type": "string" +}, +"destinations": { +"description": "String representing the destination to import for, all if left empty. List of possible values is given in [Included destination](https://support.google.com/merchants/answer/7501026). List of allowed string values: \"Shopping_ads\", \"Buy_on_google_listings\", \"Display_ads\", \"Local_inventory _ads\", \"Free_listings\", \"Free_local_listings\" NOTE: The string values are case sensitive.", +"items": { +"type": "string" +}, +"type": "array" +}, +"feeds": { +"description": "Criteria for the Merchant Center feeds to be ingested via the link. All offers will be ingested if the list is empty. Otherwise the offers will be ingested from selected feeds.", +"items": { +"$ref": "GoogleCloudRetailV2betaMerchantCenterFeedFilter" +}, +"type": "array" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). ISO 639-1. This specifies the language of offers in Merchant Center that will be accepted. If empty no language filtering will be performed. Example value: `en`.", +"type": "string" +}, +"merchantCenterAccountId": { +"description": "Required. The linked [Merchant Center account ID](https://developers.google.com/shopping-content/guides/accountstatuses). The account must be a standalone account or a sub-account of a MCA.", +"format": "int64", +"type": "string" +}, +"regionCode": { +"description": "Region code of offers to accept. 2-letter Uppercase ISO 3166-1 alpha-2 code. List of values can be found [here](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry) under the `region` tag. If left blank no region filtering will be performed. Example value: `US`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaMerchantCenterLinkingConfig": { +"description": "Configures Merchant Center linking. Links contained in the config will be used to sync data from a Merchant Center account to a Cloud Retail branch.", +"id": "GoogleCloudRetailV2betaMerchantCenterLinkingConfig", +"properties": { +"links": { +"description": "Links between Merchant Center accounts and branches.", +"items": { +"$ref": "GoogleCloudRetailV2betaMerchantCenterLink" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModel": { +"description": "Metadata that describes the training and serving parameters of a Model. A Model can be associated with a ServingConfig and then queried through the Predict API.", +"id": "GoogleCloudRetailV2betaModel", +"properties": { +"createTime": { +"description": "Output only. Timestamp the Recommendation Model was created at.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataState": { +"description": "Output only. The state of data requirements for this model: `DATA_OK` and `DATA_ERROR`. Recommendation model cannot be trained if the data is in `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even if serving state is `ACTIVE`: models were trained successfully before, but cannot be refreshed because model no longer has sufficient data for training.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"DATA_OK", +"DATA_ERROR" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has sufficient training data.", +"The model does not have sufficient training data. Error messages can be queried via Stackdriver." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The display name of the model. Should be human readable, used to display Recommendation Models in the Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024 characters.", +"type": "string" +}, +"filteringOption": { +"description": "Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering by attributes is enabled for the model.", +"enum": [ +"RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED", +"RECOMMENDATIONS_FILTERING_DISABLED", +"RECOMMENDATIONS_FILTERING_ENABLED" +], +"enumDescriptions": [ +"Value used when unset. In this case, server behavior defaults to RECOMMENDATIONS_FILTERING_DISABLED.", +"Recommendation filtering is disabled.", +"Recommendation filtering is enabled." +], +"type": "string" +}, +"lastTuneTime": { +"description": "Output only. The timestamp when the latest successful tune finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"modelFeaturesConfig": { +"$ref": "GoogleCloudRetailV2betaModelModelFeaturesConfig", +"description": "Optional. Additional model features config." +}, +"name": { +"description": "Required. The fully qualified resource name of the model. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` catalog_id has char limit of 50. recommendation_model_id has char limit of 40.", +"type": "string" +}, +"optimizationObjective": { +"description": "Optional. The optimization objective e.g. `cvr`. Currently supported values: `ctr`, `cvr`, `revenue-per-order`. If not specified, we choose default based on model type. Default depends on type of recommendation: `recommended-for-you` => `ctr` `others-you-may-like` => `ctr` `frequently-bought-together` => `revenue_per_order` This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"periodicTuningState": { +"description": "Optional. The state of periodic tuning. The period we use is 3 months - to do a one-off tune earlier use the `TuneModel` method. Default value is `PERIODIC_TUNING_ENABLED`.", +"enum": [ +"PERIODIC_TUNING_STATE_UNSPECIFIED", +"PERIODIC_TUNING_DISABLED", +"ALL_TUNING_DISABLED", +"PERIODIC_TUNING_ENABLED" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set.", +"The model has periodic tuning disabled. Tuning can be reenabled by calling the `EnableModelPeriodicTuning` method or by calling the `TuneModel` method.", +"The model cannot be tuned with periodic tuning OR the `TuneModel` method. Hide the options in customer UI and reject any requests through the backend self serve API.", +"The model has periodic tuning enabled. Tuning can be disabled by calling the `DisableModelPeriodicTuning` method." +], +"type": "string" +}, +"servingConfigLists": { +"description": "Output only. The list of valid serving configs associated with the PageOptimizationConfig.", +"items": { +"$ref": "GoogleCloudRetailV2betaModelServingConfigList" +}, +"readOnly": true, +"type": "array" +}, +"servingState": { +"description": "Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.", +"enum": [ +"SERVING_STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"TUNED" +], +"enumDescriptions": [ +"Unspecified serving state.", +"The model is not serving.", +"The model is serving and can be queried.", +"The model is trained on tuned hyperparameters and can be queried." +], +"readOnly": true, +"type": "string" +}, +"trainingState": { +"description": "Optional. The training state that the model is in (e.g. `TRAINING` or `PAUSED`). Since part of the cost of running the service is frequency of training - this can be used to determine when to train model in order to control cost. If not specified: the default value for `CreateModel` method is `TRAINING`. The default value for `UpdateModel` method is to keep the state the same as before.", +"enum": [ +"TRAINING_STATE_UNSPECIFIED", +"PAUSED", +"TRAINING" +], +"enumDescriptions": [ +"Unspecified training state.", +"The model training is paused.", +"The model is training." +], +"type": "string" +}, +"tuningOperation": { +"description": "Output only. The tune operation associated with the model. Can be used to determine if there is an ongoing tune for this recommendation. Empty field implies no tune is goig on.", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. The type of model e.g. `home-page`. Currently supported values: `recommended-for-you`, `others-you-may-like`, `frequently-bought-together`, `page-optimization`, `similar-items`, `buy-it-again`, `on-sale-items`, and `recently-viewed`(readonly value). This field together with optimization_objective describe model metadata to use to control model training and serving. See https://cloud.google.com/retail/docs/models for more details on what the model metadata control and which combination of parameters are valid. For invalid combinations of parameters (e.g. type = `frequently-bought-together` and optimization_objective = `ctr`), you receive an error 400 if you try to create/update a recommendation with this set of knobs.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp the Recommendation Model was last updated. E.g. if a Recommendation Model was paused - this would be the time the pause was initiated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig": { +"description": "Additional configs for the frequently-bought-together model type.", +"id": "GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig", +"properties": { +"contextProductsType": { +"description": "Optional. Specifies the context of the model when it is used in predict requests. Can only be set for the `frequently-bought-together` type. If it isn't specified, it defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"enum": [ +"CONTEXT_PRODUCTS_TYPE_UNSPECIFIED", +"SINGLE_CONTEXT_PRODUCT", +"MULTIPLE_CONTEXT_PRODUCTS" +], +"enumDescriptions": [ +"Unspecified default value, should never be explicitly set. Defaults to MULTIPLE_CONTEXT_PRODUCTS.", +"Use only a single product as context for the recommendation. Typically used on pages like add-to-cart or product details.", +"Use one or multiple products as context for the recommendation. Typically used on shopping cart pages." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelModelFeaturesConfig": { +"description": "Additional model features config.", +"id": "GoogleCloudRetailV2betaModelModelFeaturesConfig", +"properties": { +"frequentlyBoughtTogetherConfig": { +"$ref": "GoogleCloudRetailV2betaModelFrequentlyBoughtTogetherFeaturesConfig", +"description": "Additional configs for frequently-bought-together models." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaModelServingConfigList": { +"description": "Represents an ordered combination of valid serving configs, which can be used for `PAGE_OPTIMIZATION` recommendations.", +"id": "GoogleCloudRetailV2betaModelServingConfigList", +"properties": { +"servingConfigIds": { +"description": "Optional. A set of valid serving configs that may be used for `PAGE_OPTIMIZATION`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaOutputConfig": { +"description": "The output configuration setting.", +"id": "GoogleCloudRetailV2betaOutputConfig", +"properties": { +"bigqueryDestination": { +"$ref": "GoogleCloudRetailV2betaOutputConfigBigQueryDestination", +"description": "The BigQuery location where the output is to be written to." +}, +"gcsDestination": { +"$ref": "GoogleCloudRetailV2betaOutputConfigGcsDestination", +"description": "The Google Cloud Storage location where the output is to be written to." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaOutputConfigBigQueryDestination": { +"description": "The BigQuery output destination configuration.", +"id": "GoogleCloudRetailV2betaOutputConfigBigQueryDestination", +"properties": { +"datasetId": { +"description": "Required. The ID of a BigQuery Dataset.", +"type": "string" +}, +"tableIdPrefix": { +"description": "Required. The prefix of exported BigQuery tables.", +"type": "string" +}, +"tableType": { +"description": "Required. Describes the table type. The following values are supported: * `table`: A BigQuery native table. * `view`: A virtual table defined by a SQL query.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaOutputConfigGcsDestination": { +"description": "The Google Cloud Storage output destination configuration.", +"id": "GoogleCloudRetailV2betaOutputConfigGcsDestination", +"properties": { +"outputUriPrefix": { +"description": "Required. The output uri prefix for saving output data to json files. Some mapping examples are as follows: output_uri_prefix sample output(assuming the object is foo.json) ======================== ============================================= gs://bucket/ gs://bucket/foo.json gs://bucket/folder/ gs://bucket/folder/foo.json gs://bucket/folder/item_ gs://bucket/folder/item_foo.json", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaOutputResult": { +"description": "Output result that stores the information about where the exported data is stored.", +"id": "GoogleCloudRetailV2betaOutputResult", +"properties": { +"bigqueryResult": { +"description": "The BigQuery location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2betaBigQueryOutputResult" +}, +"type": "array" +}, +"gcsResult": { +"description": "The Google Cloud Storage location where the result is stored.", +"items": { +"$ref": "GoogleCloudRetailV2betaGcsOutputResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPauseModelRequest": { +"description": "Request for pausing training of a model.", +"id": "GoogleCloudRetailV2betaPauseModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaPredictRequest": { +"description": "Request message for Predict method.", +"id": "GoogleCloudRetailV2betaPredictRequest", +"properties": { +"filter": { +"description": "Filter for restricting prediction results with a length limit of 5,000 characters. Accepts values for tags and the `filterOutOfStockItems` flag. * Tag expressions. Restricts predictions to products that match all of the specified tags. Boolean operators `OR` and `NOT` are supported if the expression is enclosed in parentheses, and must be separated from the tag values by a space. `-\"tagA\"` is also supported and is equivalent to `NOT \"tagA\"`. Tag values must be double quoted UTF-8 encoded strings with a size limit of 1,000 characters. Note: \"Recently viewed\" models don't support tag filtering at the moment. * filterOutOfStockItems. Restricts predictions to products that do not have a stockState value of OUT_OF_STOCK. Examples: * tag=(\"Red\" OR \"Blue\") tag=\"New-Arrival\" tag=(NOT \"promotional\") * filterOutOfStockItems tag=(-\"promotional\") * filterOutOfStockItems If your filter blocks all prediction results, the API will return *no* results. If instead you want empty result sets to return generic (unfiltered) popular products, set `strictFiltering` to False in `PredictRequest.params`. Note that the API will never return items with storageStatus of \"EXPIRED\" or \"DELETED\" regardless of filter choices. If `filterSyntaxV2` is set to true under the `params` field, then attribute-based expressions are expected instead of the above described tag-based syntax. Examples: * (colors: ANY(\"Red\", \"Blue\")) AND NOT (categories: ANY(\"Phones\")) * (availability: ANY(\"IN_STOCK\")) AND (colors: ANY(\"Red\") OR categories: ANY(\"Phones\")) For more information, see [Filter recommendations](https://cloud.google.com/retail/docs/filter-recs).", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. See [Google Cloud Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) for more details.", +"type": "object" +}, +"pageSize": { +"description": "Maximum number of results to return. Set this property to the number of prediction results needed. If zero, the service will choose a reasonable default. The maximum allowed value is 100. Values above 100 will be coerced to 100.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"deprecated": true, +"description": "This field is not used; leave it unset.", +"type": "string" +}, +"params": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional domain specific parameters for the predictions. Allowed values: * `returnProduct`: Boolean. If set to true, the associated product object will be returned in the `results.metadata` field in the prediction response. * `returnScore`: Boolean. If set to true, the prediction 'score' corresponding to each returned product will be set in the `results.metadata` field in the prediction response. The given 'score' indicates the probability of a product being clicked/purchased given the user's context and history. * `strictFiltering`: Boolean. True by default. If set to false, the service will return generic (unfiltered) popular products instead of empty if your filter blocks all prediction results. * `priceRerankLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-price-reranking', 'low-price-reranking', 'medium-price-reranking', 'high-price-reranking'}. This gives request-level control and adjusts prediction results based on product price. * `diversityLevel`: String. Default empty. If set to be non-empty, then it needs to be one of {'no-diversity', 'low-diversity', 'medium-diversity', 'high-diversity', 'auto-diversity'}. This gives request-level control and adjusts prediction results based on product category. * `filterSyntaxV2`: Boolean. False by default. If set to true, the `filter` field is interpreteted according to the new, attribute-based syntax.", +"type": "object" +}, +"userEvent": { +"$ref": "GoogleCloudRetailV2betaUserEvent", +"description": "Required. Context about the user, what they are looking at and what action they took to trigger the predict request. Note that this user event detail won't be ingested to userEvent logs. Thus, a separate userEvent write request is required for event logging. Don't set UserEvent.visitor_id or UserInfo.user_id to the same fixed ID for different users. If you are trying to receive non-personalized recommendations (not recommended; this can negatively impact model performance), instead set UserEvent.visitor_id to a random unique ID and leave UserInfo.user_id unset." +}, +"validateOnly": { +"description": "Use validate only mode for this prediction query. If set to true, a dummy model will be used that returns arbitrary products. Note that the validate only mode should only be used for testing the API, or if the model is not ready.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPredictResponse": { +"description": "Response message for predict method.", +"id": "GoogleCloudRetailV2betaPredictResponse", +"properties": { +"attributionToken": { +"description": "A unique attribution token. This should be included in the UserEvent logs resulting from this recommendation, which enables accurate attribution of recommendation model performance.", +"type": "string" +}, +"missingIds": { +"description": "IDs of products in the request that were missing from the inventory.", +"items": { +"type": "string" +}, +"type": "array" +}, +"results": { +"description": "A list of recommended products. The order represents the ranking (from the most relevant product to the least).", +"items": { +"$ref": "GoogleCloudRetailV2betaPredictResponsePredictionResult" +}, +"type": "array" +}, +"validateOnly": { +"description": "True if the validateOnly property was set in the request.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPredictResponsePredictionResult": { +"description": "PredictionResult represents the recommendation prediction results.", +"id": "GoogleCloudRetailV2betaPredictResponsePredictionResult", +"properties": { +"id": { +"description": "ID of the recommended product", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "any" +}, +"description": "Additional product metadata / annotations. Possible values: * `product`: JSON representation of the product. Is set if `returnProduct` is set to true in `PredictRequest.params`. * `score`: Prediction score in double value. Is set if `returnScore` is set to true in `PredictRequest.params`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPriceInfo": { +"description": "The price information of a Product.", +"id": "GoogleCloudRetailV2betaPriceInfo", +"properties": { +"cost": { +"description": "The costs associated with the sale of a particular product. Used for gross profit reporting. * Profit = price - cost Google Merchant Center property [cost_of_goods_sold](https://support.google.com/merchants/answer/9017895).", +"format": "float", +"type": "number" +}, +"currencyCode": { +"description": "The 3-letter currency code defined in [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html). If this field is an unrecognizable currency code, an INVALID_ARGUMENT error is returned. The Product.Type.VARIANT Products with the same Product.primary_product_id must share the same currency_code. Otherwise, a FAILED_PRECONDITION error is returned.", +"type": "string" +}, +"originalPrice": { +"description": "Price of the product without any discount. If zero, by default set to be the price. If set, original_price should be greater than or equal to price, otherwise an INVALID_ARGUMENT error is thrown.", +"format": "float", +"type": "number" +}, +"price": { +"description": "Price of the product. Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371). Schema.org property [Offer.price](https://schema.org/price).", +"format": "float", +"type": "number" +}, +"priceEffectiveTime": { +"description": "The timestamp when the price starts to be effective. This can be set as a future timestamp, and the price is only used for search after price_effective_time. If so, the original_price must be set and original_price is used before price_effective_time. Do not set if price is always effective because it will cause additional latency during search.", +"format": "google-datetime", +"type": "string" +}, +"priceExpireTime": { +"description": "The timestamp when the price stops to be effective. The price is used for search before price_expire_time. If this field is set, the original_price must be set and original_price is used after price_expire_time. Do not set if price is always effective because it will cause additional latency during search.", +"format": "google-datetime", +"type": "string" +}, +"priceRange": { +"$ref": "GoogleCloudRetailV2betaPriceInfoPriceRange", +"description": "Output only. The price range of all the child Product.Type.VARIANT Products grouped together on the Product.Type.PRIMARY Product. Only populated for Product.Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPriceInfoPriceRange": { +"description": "The price range of all variant Product having the same Product.primary_product_id.", +"id": "GoogleCloudRetailV2betaPriceInfoPriceRange", +"properties": { +"originalPrice": { +"$ref": "GoogleCloudRetailV2betaInterval", +"description": "The inclusive Product.pricing_info.original_price internal of all variant Product having the same Product.primary_product_id." +}, +"price": { +"$ref": "GoogleCloudRetailV2betaInterval", +"description": "The inclusive Product.pricing_info.price interval of all variant Product having the same Product.primary_product_id." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaProduct": { +"description": "Product captures all metadata information of items to be recommended or searched.", +"id": "GoogleCloudRetailV2betaProduct", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2betaCustomAttribute" +}, +"description": "Highly encouraged. Extra product attributes to be included. For example, for products, this could include the store name, vendor, style, color, etc. These are very strong signals for recommendation model, thus we highly recommend providing the attributes here. Features that can take on one of a limited number of possible values. Two types of features can be set are: Textual features. some examples would be the brand/maker of a product, or country of a customer. Numerical features. Some examples would be the height/weight of a product, or age of a customer. For example: `{ \"vendor\": {\"text\": [\"vendor123\", \"vendor456\"]}, \"lengths_cm\": {\"numbers\":[2.3, 15.4]}, \"heights_cm\": {\"numbers\":[8.1, 6.4]} }`. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * Max entries count: 200. * The key must be a UTF-8 encoded string with a length limit of 128 characters. * For indexable attribute, the key must match the pattern: `a-zA-Z0-9*`. For example, `key0LikeThis` or `KEY_1_LIKE_THIS`. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a non-empty UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed.", +"type": "object" +}, +"audience": { +"$ref": "GoogleCloudRetailV2betaAudience", +"description": "The target group associated with a given audience (e.g. male, veterans, car owners, musicians, etc.) of the product." +}, +"availability": { +"description": "The online availability of the Product. Default to Availability.IN_STOCK. Corresponding properties: Google Merchant Center property [availability](https://support.google.com/merchants/answer/6324448). Schema.org property [Offer.availability](https://schema.org/availability).", +"enum": [ +"AVAILABILITY_UNSPECIFIED", +"IN_STOCK", +"OUT_OF_STOCK", +"PREORDER", +"BACKORDER" +], +"enumDescriptions": [ +"Default product availability. Default to Availability.IN_STOCK if unset.", +"Product in stock.", +"Product out of stock.", +"Product that is in pre-order state.", +"Product that is back-ordered (i.e. temporarily out of stock)." +], +"type": "string" +}, +"availableQuantity": { +"description": "The available quantity of the item.", +"format": "int32", +"type": "integer" +}, +"availableTime": { +"description": "The timestamp when this Product becomes available for SearchService.Search. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT.", +"format": "google-datetime", +"type": "string" +}, +"brands": { +"description": "The brands of the product. A maximum of 30 brands are allowed unless overridden through the Google Cloud console. Each brand must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [brand](https://support.google.com/merchants/answer/6324351). Schema.org property [Product.brand](https://schema.org/brand).", +"items": { +"type": "string" +}, +"type": "array" +}, +"categories": { +"description": "Product categories. This field is repeated for supporting one product belonging to several parallel categories. Strongly recommended using the full path for better search / recommendation quality. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). For example, if a shoes product belongs to both [\"Shoes & Accessories\" -> \"Shoes\"] and [\"Sports & Fitness\" -> \"Athletic Clothing\" -> \"Shoes\"], it could be represented as: \"categories\": [ \"Shoes & Accessories > Shoes\", \"Sports & Fitness > Athletic Clothing > Shoes\" ] Must be set for Type.PRIMARY Product otherwise an INVALID_ARGUMENT error is returned. At most 250 values are allowed per Product unless overridden through the Google Cloud console. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property google_product_category. Schema.org property [Product.category] (https://schema.org/category). [mc_google_product_category]: https://support.google.com/merchants/answer/6324436", +"items": { +"type": "string" +}, +"type": "array" +}, +"collectionMemberIds": { +"description": "The id of the collection members when type is Type.COLLECTION. Non-existent product ids are allowed. The type of the members must be either Type.PRIMARY or Type.VARIANT otherwise an INVALID_ARGUMENT error is thrown. Should not set it for other types. A maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is return.", +"items": { +"type": "string" +}, +"type": "array" +}, +"colorInfo": { +"$ref": "GoogleCloudRetailV2betaColorInfo", +"description": "The color of the product. Corresponding properties: Google Merchant Center property [color](https://support.google.com/merchants/answer/6324487). Schema.org property [Product.color](https://schema.org/color)." +}, +"conditions": { +"description": "The condition of the product. Strongly encouraged to use the standard values: \"new\", \"refurbished\", \"used\". A maximum of 1 value is allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [condition](https://support.google.com/merchants/answer/6324469). Schema.org property [Offer.itemCondition](https://schema.org/itemCondition).", +"items": { +"type": "string" +}, +"type": "array" +}, +"description": { +"description": "Product description. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [description](https://support.google.com/merchants/answer/6324468). Schema.org property [Product.description](https://schema.org/description).", +"type": "string" +}, +"expireTime": { +"description": "Note that this field is applied in the following ways: * If the Product is already expired when it is uploaded, this product is not indexed for search. * If the Product is not expired when it is uploaded, only the Type.PRIMARY's and Type.COLLECTION's expireTime is respected, and Type.VARIANT's expireTime is not used. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. expire_time must be later than available_time and publish_time, otherwise an INVALID_ARGUMENT error is thrown. Corresponding properties: Google Merchant Center property [expiration_date](https://support.google.com/merchants/answer/6324499).", +"format": "google-datetime", +"type": "string" +}, +"fulfillmentInfo": { +"description": "Fulfillment information, such as the store IDs for in-store pickup or region IDs for different shipping methods. All the elements must have distinct FulfillmentInfo.type. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"$ref": "GoogleCloudRetailV2betaFulfillmentInfo" +}, +"type": "array" +}, +"gtin": { +"description": "The Global Trade Item Number (GTIN) of the product. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. This field must be a Unigram. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [gtin](https://support.google.com/merchants/answer/6324461). Schema.org property [Product.isbn](https://schema.org/isbn), [Product.gtin8](https://schema.org/gtin8), [Product.gtin12](https://schema.org/gtin12), [Product.gtin13](https://schema.org/gtin13), or [Product.gtin14](https://schema.org/gtin14). If the value is not a valid GTIN, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"id": { +"description": "Immutable. Product identifier, which is the final component of name. For example, this field is \"id_1\", if name is `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/id_1`. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [id](https://support.google.com/merchants/answer/6324405). Schema.org property [Product.sku](https://schema.org/sku).", +"type": "string" +}, +"images": { +"description": "Product images for the product. We highly recommend putting the main image first. A maximum of 300 images are allowed. Corresponding properties: Google Merchant Center property [image_link](https://support.google.com/merchants/answer/6324350). Schema.org property [Product.image](https://schema.org/image).", +"items": { +"$ref": "GoogleCloudRetailV2betaImage" +}, +"type": "array" +}, +"languageCode": { +"description": "Language of the title/description and other string attributes. Use language tags defined by [BCP 47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). For product prediction, this field is ignored and the model automatically detects the text language. The Product can include text in different languages, but duplicating Products to provide text in multiple languages can result in degraded model performance. For product search this field is in use. It defaults to \"en-US\" if unset.", +"type": "string" +}, +"localInventories": { +"description": "Output only. A list of local inventories specific to different places. This field can be managed by ProductService.AddLocalInventories and ProductService.RemoveLocalInventories APIs if fine-grained, high-volume updates are necessary.", +"items": { +"$ref": "GoogleCloudRetailV2betaLocalInventory" +}, +"readOnly": true, +"type": "array" +}, +"materials": { +"description": "The material of the product. For example, \"leather\", \"wooden\". A maximum of 20 values are allowed. Each value must be a UTF-8 encoded string with a length limit of 200 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [material](https://support.google.com/merchants/answer/6324410). Schema.org property [Product.material](https://schema.org/material).", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Immutable. Full resource name of the product, such as `projects/*/locations/global/catalogs/default_catalog/branches/default_branch/products/product_id`.", +"type": "string" +}, +"patterns": { +"description": "The pattern or graphic print of the product. For example, \"striped\", \"polka dot\", \"paisley\". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [pattern](https://support.google.com/merchants/answer/6324483). Schema.org property [Product.pattern](https://schema.org/pattern).", +"items": { +"type": "string" +}, +"type": "array" +}, +"priceInfo": { +"$ref": "GoogleCloudRetailV2betaPriceInfo", +"description": "Product price and cost information. Corresponding properties: Google Merchant Center property [price](https://support.google.com/merchants/answer/6324371)." +}, +"primaryProductId": { +"description": "Variant group identifier. Must be an id, with the same parent branch with this product. Otherwise, an error is thrown. For Type.PRIMARY Products, this field can only be empty or set to the same value as id. For VARIANT Products, this field cannot be empty. A maximum of 2,000 products are allowed to share the same Type.PRIMARY Product. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [item_group_id](https://support.google.com/merchants/answer/6324507). Schema.org property [Product.inProductGroupWithID](https://schema.org/inProductGroupWithID).", +"type": "string" +}, +"promotions": { +"description": "The promotions applied to the product. A maximum of 10 values are allowed per Product. Only Promotion.promotion_id will be used, other fields will be ignored if set.", +"items": { +"$ref": "GoogleCloudRetailV2betaPromotion" +}, +"type": "array" +}, +"publishTime": { +"description": "The timestamp when the product is published by the retailer for the first time, which indicates the freshness of the products. Note that this field is different from available_time, given it purely describes product freshness regardless of when it is available on search and recommendation.", +"format": "google-datetime", +"type": "string" +}, +"rating": { +"$ref": "GoogleCloudRetailV2betaRating", +"description": "The rating of this product." +}, +"retrievableFields": { +"deprecated": true, +"description": "Indicates which fields in the Products are returned in SearchResponse. Supported fields for all types: * audience * availability * brands * color_info * conditions * gtin * materials * name * patterns * price_info * rating * sizes * title * uri Supported fields only for Type.PRIMARY and Type.COLLECTION: * categories * description * images Supported fields only for Type.VARIANT: * Only the first image in images To mark attributes as retrievable, include paths of the form \"attributes.key\" where \"key\" is the key of a custom attribute, as specified in attributes. For Type.PRIMARY and Type.COLLECTION, the following fields are always returned in SearchResponse by default: * name For Type.VARIANT, the following fields are always returned in by default: * name * color_info The maximum number of paths is 30. Otherwise, an INVALID_ARGUMENT error is returned. Note: Returning more fields in SearchResponse can increase response payload size and serving latency. This field is deprecated. Use the retrievable site-wide control instead.", +"format": "google-fieldmask", +"type": "string" +}, +"sizes": { +"description": "The size of the product. To represent different size systems or size types, consider using this format: [[[size_system:]size_type:]size_value]. For example, in \"US:MENS:M\", \"US\" represents size system; \"MENS\" represents size type; \"M\" represents size value. In \"GIRLS:27\", size system is empty; \"GIRLS\" represents size type; \"27\" represents size value. In \"32 inches\", both size system and size type are empty, while size value is \"32 inches\". A maximum of 20 values are allowed per Product. Each value must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [size](https://support.google.com/merchants/answer/6324492), [size_type](https://support.google.com/merchants/answer/6324497), and [size_system](https://support.google.com/merchants/answer/6324502). Schema.org property [Product.size](https://schema.org/size).", +"items": { +"type": "string" +}, +"type": "array" +}, +"tags": { +"description": "Custom tags associated with the product. At most 250 values are allowed per Product. This value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This tag can be used for filtering recommendation results by passing the tag as part of the PredictRequest.filter. Corresponding properties: Google Merchant Center property [custom_label_0\u20134](https://support.google.com/merchants/answer/6324473).", +"items": { +"type": "string" +}, +"type": "array" +}, +"title": { +"description": "Required. Product title. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [title](https://support.google.com/merchants/answer/6324415). Schema.org property [Product.name](https://schema.org/name).", +"type": "string" +}, +"ttl": { +"description": "Input only. The TTL (time to live) of the product. Note that this is only applicable to Type.PRIMARY and Type.COLLECTION, and ignored for Type.VARIANT. In general, we suggest the users to delete the stale products explicitly, instead of using this field to determine staleness. If it is set, it must be a non-negative value, and expire_time is set as current timestamp plus ttl. The derived expire_time is returned in the output and ttl is left blank when retrieving the Product. If it is set, the product is not available for SearchService.Search after current timestamp plus ttl. However, the product can still be retrieved by ProductService.GetProduct and ProductService.ListProducts.", +"format": "google-duration", +"type": "string" +}, +"type": { +"description": "Immutable. The type of the product. Default to Catalog.product_level_config.ingestion_product_type if unset.", +"enum": [ +"TYPE_UNSPECIFIED", +"PRIMARY", +"VARIANT", +"COLLECTION" +], +"enumDescriptions": [ +"Default value. Default to Catalog.product_level_config.ingestion_product_type if unset.", +"The primary type. As the primary unit for predicting, indexing and search serving, a Type.PRIMARY Product is grouped with multiple Type.VARIANT Products.", +"The variant type. Type.VARIANT Products usually share some common attributes on the same Type.PRIMARY Products, but they have variant attributes like different colors, sizes and prices, etc.", +"The collection type. Collection products are bundled Type.PRIMARY Products or Type.VARIANT Products that are sold together, such as a jewelry set with necklaces, earrings and rings, etc." +], +"type": "string" +}, +"uri": { +"description": "Canonical URL directly linking to the product detail page. It is strongly recommended to provide a valid uri for the product, otherwise the service performance could be significantly degraded. This field must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. Corresponding properties: Google Merchant Center property [link](https://support.google.com/merchants/answer/6324416). Schema.org property [Offer.url](https://schema.org/url).", +"type": "string" +}, +"variants": { +"description": "Output only. Product variants grouped together on primary product which share similar product attributes. It's automatically grouped by primary_product_id for all the product variants. Only populated for Type.PRIMARY Products. Note: This field is OUTPUT_ONLY for ProductService.GetProduct. Do not set this field in API requests.", +"items": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaProductDetail": { +"description": "Detailed product information associated with a user event.", +"id": "GoogleCloudRetailV2betaProductDetail", +"properties": { +"product": { +"$ref": "GoogleCloudRetailV2betaProduct", +"description": "Required. Product information. Required field(s): * Product.id Optional override field(s): * Product.price_info If any supported optional fields are provided, we will treat them as a full override when looking up product information from the catalog. Thus, it is important to ensure that the overriding fields are accurate and complete. All other product fields are ignored and instead populated via catalog lookup after event ingestion." +}, +"quantity": { +"description": "Quantity of the product associated with the user event. For example, this field will be 2 if two products are added to the shopping cart for `purchase-complete` event. Required for `add-to-cart` and `purchase-complete` event types.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaProductInlineSource": { +"description": "The inline source for the input config for ImportProducts method.", +"id": "GoogleCloudRetailV2betaProductInlineSource", +"properties": { +"products": { +"description": "Required. A list of products to update/create. Each product must have a valid Product.id. Recommended max of 100 items.", +"items": { +"$ref": "GoogleCloudRetailV2betaProduct" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaProductInputConfig": { +"description": "The input config source for products.", +"id": "GoogleCloudRetailV2betaProductInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2betaBigQuerySource", +"description": "BigQuery input source." +}, +"gcsSource": { +"$ref": "GoogleCloudRetailV2betaGcsSource", +"description": "Google Cloud Storage location for the input content." +}, +"productInlineSource": { +"$ref": "GoogleCloudRetailV2betaProductInlineSource", +"description": "The Inline source for the input content for products." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaProductLevelConfig": { +"description": "Configures what level the product should be uploaded with regards to how users will be send events and how predictions will be made.", +"id": "GoogleCloudRetailV2betaProductLevelConfig", +"properties": { +"ingestionProductType": { +"description": "The type of Products allowed to be ingested into the catalog. Acceptable values are: * `primary` (default): You can ingest Products of all types. When ingesting a Product, its type will default to Product.Type.PRIMARY if unset. * `variant` (incompatible with Retail Search): You can only ingest Product.Type.VARIANT Products. This means Product.primary_product_id cannot be empty. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `variant` and merchant_center_product_id_field is `itemGroupId`, an INVALID_ARGUMENT error is returned. See [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels) for more details.", +"type": "string" +}, +"merchantCenterProductIdField": { +"description": "Which field of [Merchant Center Product](/bigquery-transfer/docs/merchant-center-products-schema) should be imported as Product.id. Acceptable values are: * `offerId` (default): Import `offerId` as the product ID. * `itemGroupId`: Import `itemGroupId` as the product ID. Notice that Retail API will choose one item from the ones with the same `itemGroupId`, and use it to represent the item group. If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. If this field is `itemGroupId` and ingestion_product_type is `variant`, an INVALID_ARGUMENT error is returned. See [Product levels](https://cloud.google.com/retail/docs/catalog#product-levels) for more details.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPromotion": { +"description": "Promotion specification.", +"id": "GoogleCloudRetailV2betaPromotion", +"properties": { +"promotionId": { +"description": "Promotion identifier, which is the final component of name. For example, this field is \"free_gift\", if name is `projects/*/locations/global/catalogs/default_catalog/promotions/free_gift`. The value must be a UTF-8 encoded string with a length limit of 128 characters, and match the pattern: `a-zA-Z*`. For example, id0LikeThis or ID_1_LIKE_THIS. Otherwise, an INVALID_ARGUMENT error is returned. Corresponds to Google Merchant Center property [promotion_id](https://support.google.com/merchants/answer/7050148).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurchaseTransaction": { +"description": "A transaction represents the entire purchase transaction.", +"id": "GoogleCloudRetailV2betaPurchaseTransaction", +"properties": { +"cost": { +"description": "All the costs associated with the products. These can be manufacturing costs, shipping expenses not borne by the end user, or any other costs, such that: * Profit = revenue - tax - cost", +"format": "float", +"type": "number" +}, +"currencyCode": { +"description": "Required. Currency code. Use three-character ISO-4217 code.", +"type": "string" +}, +"id": { +"description": "The transaction ID with a length limit of 128 characters.", +"type": "string" +}, +"revenue": { +"description": "Required. Total non-zero revenue or grand total associated with the transaction. This value include shipping, tax, or other adjustments to total revenue that you want to include as part of your revenue calculations.", +"format": "float", +"type": "number" +}, +"tax": { +"description": "All the taxes associated with the transaction.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeMetadata": { +"description": "Metadata related to the progress of the Purge operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaPurgeMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeProductsMetadata": { +"description": "Metadata related to the progress of the PurgeProducts operation. This will be returned by the google.longrunning.Operation.metadata field.", +"id": "GoogleCloudRetailV2betaPurgeProductsMetadata", +"properties": { +"createTime": { +"description": "Operation create time.", +"format": "google-datetime", +"type": "string" +}, +"failureCount": { +"description": "Count of entries that encountered errors while processing.", +"format": "int64", +"type": "string" +}, +"successCount": { +"description": "Count of entries that were deleted successfully.", +"format": "int64", +"type": "string" +}, +"updateTime": { +"description": "Operation last update time. If the operation is done, this is also the finish time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeProductsRequest": { +"description": "Request message for PurgeProducts method.", +"id": "GoogleCloudRetailV2betaPurgeProductsRequest", +"properties": { +"filter": { +"description": "Required. The filter string to specify the products to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. \"*\" implies delete all items in a branch. The eligible fields for filtering are: * `availability`: Double quoted Product.availability string. * `create_time` : in ISO 8601 \"zulu\" format. Supported syntax: * Comparators (\">\", \"<\", \">=\", \"<=\", \"=\"). Examples: * create_time <= \"2015-02-13T17:05:46Z\" * availability = \"IN_STOCK\" * Conjunctions (\"AND\") Examples: * create_time <= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\" * Disjunctions (\"OR\") Examples: * create_time <= \"2015-02-13T17:05:46Z\" OR availability = \"IN_STOCK\" * Can support nested queries. Examples: * (create_time <= \"2015-02-13T17:05:46Z\" AND availability = \"PREORDER\") OR (create_time >= \"2015-02-14T13:03:32Z\" AND availability = \"IN_STOCK\") * Filter Limits: * Filter should not contain more than 6 conditions. * Max nesting depth should not exceed 2 levels. Examples queries: * Delete back order products created before a timestamp. create_time <= \"2015-02-13T17:05:46Z\" OR availability = \"BACKORDER\"", +"type": "string" +}, +"force": { +"description": "Actually perform the purge. If `force` is set to false, the method will return the expected purge count without deleting any products.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeProductsResponse": { +"description": "Response of the PurgeProductsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2betaPurgeProductsResponse", +"properties": { +"purgeCount": { +"description": "The total count of products purged as a result of the operation.", +"format": "int64", +"type": "string" +}, +"purgeSample": { +"description": "A sample of the product names that will be deleted. Only populated if `force` is set to false. A max of 100 names will be returned and the names are chosen at random.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeUserEventsRequest": { +"description": "Request message for PurgeUserEvents method.", +"id": "GoogleCloudRetailV2betaPurgeUserEventsRequest", +"properties": { +"filter": { +"description": "Required. The filter string to specify the events to be deleted with a length limit of 5,000 characters. Empty string filter is not allowed. The eligible fields for filtering are: * `eventType`: Double quoted UserEvent.event_type string. * `eventTime`: in ISO 8601 \"zulu\" format. * `visitorId`: Double quoted string. Specifying this will delete all events associated with a visitor. * `userId`: Double quoted string. Specifying this will delete all events associated with a user. Examples: * Deleting all events in a time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventTime < \"2012-04-23T18:30:43.511Z\"` * Deleting specific eventType in time range: `eventTime > \"2012-04-23T18:25:43.511Z\" eventType = \"detail-page-view\"` * Deleting all events for a specific visitor: `visitorId = \"visitor1024\"` The filtering fields are assumed to have an implicit AND.", +"type": "string" +}, +"force": { +"description": "Actually perform the purge. If `force` is set to false, the method will return the expected purge count without deleting any user events.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaPurgeUserEventsResponse": { +"description": "Response of the PurgeUserEventsRequest. If the long running operation is successfully done, then this message is returned by the google.longrunning.Operations.response field.", +"id": "GoogleCloudRetailV2betaPurgeUserEventsResponse", +"properties": { +"purgedEventsCount": { +"description": "The total count of events purged as a result of the operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRating": { +"description": "The rating of a Product.", +"id": "GoogleCloudRetailV2betaRating", +"properties": { +"averageRating": { +"description": "The average rating of the Product. The rating is scaled at 1-5. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "float", +"type": "number" +}, +"ratingCount": { +"description": "The total number of ratings. This value is independent of the value of rating_histogram. This value must be nonnegative. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"ratingHistogram": { +"description": "List of rating counts per rating value (index = rating - 1). The list is empty if there is no rating. If the list is non-empty, its size is always 5. Otherwise, an INVALID_ARGUMENT error is returned. For example, [41, 14, 13, 47, 303]. It means that the Product got 41 ratings with 1 star, 14 ratings with 2 star, and so on.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRejoinUserEventsMetadata": { +"description": "Metadata for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2betaRejoinUserEventsMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRejoinUserEventsRequest": { +"description": "Request message for RejoinUserEvents method.", +"id": "GoogleCloudRetailV2betaRejoinUserEventsRequest", +"properties": { +"userEventRejoinScope": { +"description": "The type of the user event rejoin to define the scope and range of the user events to be rejoined with the latest product catalog. Defaults to `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to an invalid integer value.", +"enum": [ +"USER_EVENT_REJOIN_SCOPE_UNSPECIFIED", +"JOINED_EVENTS", +"UNJOINED_EVENTS" +], +"enumDescriptions": [ +"Rejoin all events with the latest product catalog, including both joined events and unjoined events.", +"Only rejoin joined events with the latest product catalog.", +"Only rejoin unjoined events with the latest product catalog." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRejoinUserEventsResponse": { +"description": "Response message for `RejoinUserEvents` method.", +"id": "GoogleCloudRetailV2betaRejoinUserEventsResponse", +"properties": { +"rejoinedUserEventsCount": { +"description": "Number of user events that were joined with latest product catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveCatalogAttributeRequest": { +"description": "Request for CatalogService.RemoveCatalogAttribute method.", +"id": "GoogleCloudRetailV2betaRemoveCatalogAttributeRequest", +"properties": { +"key": { +"description": "Required. The attribute name key of the CatalogAttribute to remove.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveControlRequest": { +"description": "Request for RemoveControl method.", +"id": "GoogleCloudRetailV2betaRemoveControlRequest", +"properties": { +"controlId": { +"description": "Required. The id of the control to apply. Assumed to be in the same catalog as the serving config.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata": { +"description": "Metadata related to the progress of the RemoveFulfillmentPlaces operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveFulfillmentPlacesRequest": { +"description": "Request message for ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product is not found, the fulfillment information will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. The IDs for this type, such as the store IDs for \"pickup-in-store\" or the region IDs for \"same-day-delivery\", to be removed for this type. At least 1 value is required, and a maximum of 2000 values are allowed. Each value must be a string with a length limit of 10 characters, matching the pattern `[a-zA-Z0-9_-]+`, such as \"store1\" or \"REGION-2\". Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"removeTime": { +"description": "The time when the fulfillment updates are issued, used to prevent out-of-order updates on fulfillment information. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "Required. The fulfillment type, including commonly used types (such as pickup in store and same day delivery), and custom types. Supported values: * \"pickup-in-store\" * \"ship-to-store\" * \"same-day-delivery\" * \"next-day-delivery\" * \"custom-type-1\" * \"custom-type-2\" * \"custom-type-3\" * \"custom-type-4\" * \"custom-type-5\" If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned. This field directly corresponds to Product.fulfillment_info.type.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse": { +"description": "Response of the RemoveFulfillmentPlacesRequest. Currently empty because there is no meaningful response populated from the ProductService.RemoveFulfillmentPlaces method.", +"id": "GoogleCloudRetailV2betaRemoveFulfillmentPlacesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata": { +"description": "Metadata related to the progress of the RemoveLocalInventories operation. Currently empty because there is no meaningful metadata populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2betaRemoveLocalInventoriesMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveLocalInventoriesRequest": { +"description": "Request message for ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2betaRemoveLocalInventoriesRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product is not found, the local inventory removal request will still be processed and retained for at most 1 day and processed once the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"placeIds": { +"description": "Required. A list of place IDs to have their inventory deleted. At most 3000 place IDs are allowed per request.", +"items": { +"type": "string" +}, +"type": "array" +}, +"removeTime": { +"description": "The time when the inventory deletions are issued. Used to prevent out-of-order updates and deletions on local inventory fields. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRemoveLocalInventoriesResponse": { +"description": "Response of the ProductService.RemoveLocalInventories API. Currently empty because there is no meaningful response populated from the ProductService.RemoveLocalInventories method.", +"id": "GoogleCloudRetailV2betaRemoveLocalInventoriesResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaReplaceCatalogAttributeRequest": { +"description": "Request for CatalogService.ReplaceCatalogAttribute method.", +"id": "GoogleCloudRetailV2betaReplaceCatalogAttributeRequest", +"properties": { +"catalogAttribute": { +"$ref": "GoogleCloudRetailV2betaCatalogAttribute", +"description": "Required. The updated CatalogAttribute." +}, +"updateMask": { +"description": "Indicates which fields in the provided CatalogAttribute to update. The following are NOT supported: * CatalogAttribute.key If not set, all supported fields are updated.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaResumeModelRequest": { +"description": "Request for resuming training of a model.", +"id": "GoogleCloudRetailV2betaResumeModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaRule": { +"description": "A rule is a condition-action pair * A condition defines when a rule is to be triggered. * An action specifies what occurs on that trigger. Currently rules only work for controls with SOLUTION_TYPE_SEARCH.", +"id": "GoogleCloudRetailV2betaRule", +"properties": { +"boostAction": { +"$ref": "GoogleCloudRetailV2betaRuleBoostAction", +"description": "A boost action." +}, +"condition": { +"$ref": "GoogleCloudRetailV2betaCondition", +"description": "Required. The condition that triggers the rule. If the condition is empty, the rule will always apply." +}, +"doNotAssociateAction": { +"$ref": "GoogleCloudRetailV2betaRuleDoNotAssociateAction", +"description": "Prevents term from being associated with other terms." +}, +"filterAction": { +"$ref": "GoogleCloudRetailV2betaRuleFilterAction", +"description": "Filters results." +}, +"forceReturnFacetAction": { +"$ref": "GoogleCloudRetailV2betaRuleForceReturnFacetAction", +"description": "Force returns an attribute as a facet in the request." +}, +"ignoreAction": { +"$ref": "GoogleCloudRetailV2betaRuleIgnoreAction", +"description": "Ignores specific terms from query during search." +}, +"onewaySynonymsAction": { +"$ref": "GoogleCloudRetailV2betaRuleOnewaySynonymsAction", +"description": "Treats specific term as a synonym with a group of terms. Group of terms will not be treated as synonyms with the specific term." +}, +"redirectAction": { +"$ref": "GoogleCloudRetailV2betaRuleRedirectAction", +"description": "Redirects a shopper to a specific page." +}, +"removeFacetAction": { +"$ref": "GoogleCloudRetailV2betaRuleRemoveFacetAction", +"description": "Remove an attribute as a facet in the request (if present)." +}, +"replacementAction": { +"$ref": "GoogleCloudRetailV2betaRuleReplacementAction", +"description": "Replaces specific terms in the query." +}, +"twowaySynonymsAction": { +"$ref": "GoogleCloudRetailV2betaRuleTwowaySynonymsAction", +"description": "Treats a set of terms as synonyms of one another." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleBoostAction": { +"description": "A boost action to apply to results matching condition specified above.", +"id": "GoogleCloudRetailV2betaRuleBoostAction", +"properties": { +"boost": { +"description": "Strength of the condition boost, which must be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.", +"format": "float", +"type": "number" +}, +"productsFilter": { +"description": "The filter can have a max size of 5000 characters. An expression which specifies which products to apply an action to. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": *(id: ANY(\"product_1\", \"product_2\")) * *AND * *(colorFamilies: ANY(\"Red\", \"Blue\")) *", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleDoNotAssociateAction": { +"description": "Prevents `query_term` from being associated with specified terms during search. Example: Don't associate \"gShoe\" and \"cheap\".", +"id": "GoogleCloudRetailV2betaRuleDoNotAssociateAction", +"properties": { +"doNotAssociateTerms": { +"description": "Cannot contain duplicates or the query term. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "Terms from the search query. Will not consider do_not_associate_terms for search if in search query. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"terms": { +"description": "Will be [deprecated = true] post migration;", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleFilterAction": { +"description": "* Rule Condition: - No Condition.query_terms provided is a global match. - 1 or more Condition.query_terms provided are combined with OR operator. * Action Input: The request query and filter that are applied to the retrieved products, in addition to any filters already provided with the SearchRequest. The AND operator is used to combine the query's existing filters with the filter rule(s). NOTE: May result in 0 results when filters conflict. * Action Result: Filters the returned objects to be ONLY those that passed the filter.", +"id": "GoogleCloudRetailV2betaRuleFilterAction", +"properties": { +"filter": { +"description": "A filter to apply on the matching condition results. Supported features: * filter must be set. * Filter syntax is identical to SearchRequest.filter. For more information, see [Filter](/retail/docs/filter-and-order#filter). * To filter products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": *(id: ANY(\"product_1\", \"product_2\")) * *AND * *(colorFamilies: ANY(\"Red\", \"Blue\")) *", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleForceReturnFacetAction": { +"description": "Force returns an attribute/facet in the request around a certain position or above. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Inputs: attribute name, position * Action Result: Will force return a facet key around a certain position or above if the condition is satisfied. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\", the ForceReturnFacetAction.FacetPositionAdjustment.attribute_name is \"size\" and the ForceReturnFacetAction.FacetPositionAdjustment.position is 8. Two cases: a) The facet key \"size\" is not already in the top 8 slots, then the facet \"size\" will appear at a position close to 8. b) The facet key \"size\" in among the top 8 positions in the request, then it will stay at its current rank.", +"id": "GoogleCloudRetailV2betaRuleForceReturnFacetAction", +"properties": { +"facetPositionAdjustments": { +"description": "Each instance corresponds to a force return attribute for the given condition. There can't be more 3 instances here.", +"items": { +"$ref": "GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment": { +"description": "Each facet position adjustment consists of a single attribute name (i.e. facet key) along with a specified position.", +"id": "GoogleCloudRetailV2betaRuleForceReturnFacetActionFacetPositionAdjustment", +"properties": { +"attributeName": { +"description": "The attribute name to force return as a facet. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters long.", +"type": "string" +}, +"position": { +"description": "This is the position in the request as explained above. It should be strictly positive be at most 100.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleIgnoreAction": { +"description": "Prevents a term in the query from being used in search. Example: Don't search for \"shoddy\".", +"id": "GoogleCloudRetailV2betaRuleIgnoreAction", +"properties": { +"ignoreTerms": { +"description": "Terms to ignore in the search query.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleOnewaySynonymsAction": { +"description": "Maps a set of terms to a set of synonyms. Set of synonyms will be treated as synonyms of each query term only. `query_terms` will not be treated as synonyms of each other. Example: \"sneakers\" will use a synonym of \"shoes\". \"shoes\" will not use a synonym of \"sneakers\".", +"id": "GoogleCloudRetailV2betaRuleOnewaySynonymsAction", +"properties": { +"onewayTerms": { +"description": "Will be [deprecated = true] post migration;", +"items": { +"type": "string" +}, +"type": "array" +}, +"queryTerms": { +"description": "Terms from the search query. Will treat synonyms as their synonyms. Not themselves synonyms of the synonyms. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"synonyms": { +"description": "Defines a set of synonyms. Cannot contain duplicates. Can specify up to 100 synonyms.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleRedirectAction": { +"description": "Redirects a shopper to a specific page. * Rule Condition: Must specify Condition.query_terms. * Action Input: Request Query * Action Result: Redirects shopper to provided uri.", +"id": "GoogleCloudRetailV2betaRuleRedirectAction", +"properties": { +"redirectUri": { +"description": "URL must have length equal or less than 2000 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleRemoveFacetAction": { +"description": "Removes an attribute/facet in the request if is present. * Rule Condition: Must specify non-empty Condition.query_terms (for search only) or Condition.page_categories (for browse only), but can't specify both. * Action Input: attribute name * Action Result: Will remove the attribute (as a facet) from the request if it is present. Example: Suppose the query is \"shoes\", the Condition.query_terms is \"shoes\" and the attribute name \"size\", then facet key \"size\" will be removed from the request (if it is present).", +"id": "GoogleCloudRetailV2betaRuleRemoveFacetAction", +"properties": { +"attributeNames": { +"description": "The attribute names (i.e. facet keys) to remove from the dynamic facets (if present in the request). There can't be more 3 attribute names. Each attribute name should be a valid attribute name, be non-empty and contain at most 80 characters.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleReplacementAction": { +"description": "Replaces a term in the query. Multiple replacement candidates can be specified. All `query_terms` will be replaced with the replacement term. Example: Replace \"gShoe\" with \"google shoe\".", +"id": "GoogleCloudRetailV2betaRuleReplacementAction", +"properties": { +"queryTerms": { +"description": "Terms from the search query. Will be replaced by replacement term. Can specify up to 100 terms.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replacementTerm": { +"description": "Term that will be used for replacement.", +"type": "string" +}, +"term": { +"description": "Will be [deprecated = true] post migration;", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaRuleTwowaySynonymsAction": { +"description": "Creates a set of terms that will be treated as synonyms of each other. Example: synonyms of \"sneakers\" and \"shoes\": * \"sneakers\" will use a synonym of \"shoes\". * \"shoes\" will use a synonym of \"sneakers\".", +"id": "GoogleCloudRetailV2betaRuleTwowaySynonymsAction", +"properties": { +"synonyms": { +"description": "Defines a set of synonyms. Can specify up to 100 synonyms. Must specify at least 2 synonyms.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequest": { +"description": "Request message for SearchService.Search method.", +"id": "GoogleCloudRetailV2betaSearchRequest", +"properties": { +"boostSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestBoostSpec", +"description": "Boost specification to boost certain products. For more information, see [Boost results](https://cloud.google.com/retail/docs/boosting). Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions." +}, +"branch": { +"description": "The branch resource name, such as `projects/*/locations/global/catalogs/default_catalog/branches/0`. Use \"default_branch\" as the branch ID or leave this field empty, to search products under the default branch.", +"type": "string" +}, +"canonicalFilter": { +"description": "The default filter that is applied when a user performs a search without checking any filters on the search page. The filter applied to every search request when quality improvement such as query expansion is needed. In the case a query does not have a sufficient amount of results this filter will be used to determine whether or not to enable the query expansion flow. The original filter will still be used for the query expanded search. This field is strongly recommended to achieve high search quality. For more information about filter syntax, see SearchRequest.filter.", +"type": "string" +}, +"dynamicFacetSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec", +"deprecated": true, +"description": "Deprecated. Refer to https://cloud.google.com/retail/docs/configs#dynamic to enable dynamic facets. Do not set this field. The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated." +}, +"entity": { +"description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. If this is set, it should be exactly matched with UserEvent.entity to get search results boosted by entity.", +"type": "string" +}, +"facetSpecs": { +"description": "Facet specifications for faceted search. If empty, no facets are returned. A maximum of 200 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"$ref": "GoogleCloudRetailV2betaSearchRequestFacetSpec" +}, +"type": "array" +}, +"filter": { +"description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. Filter expression is case-sensitive. For more information, see [Filter](https://cloud.google.com/retail/docs/filter-and-order#filter). If this field is unrecognizable, an INVALID_ARGUMENT is returned.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels applied to a resource must meet the following requirements: * Each resource can have multiple labels, up to a maximum of 64. * Each label must be a key-value pair. * Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters. * Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed. * The key portion of a label must be unique. However, you can use the same key with multiple resources. * Keys must start with a lowercase letter or international character. For more information, see [Requirements for labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements) in the Resource Manager documentation.", +"type": "object" +}, +"offset": { +"description": "A 0-indexed integer that specifies the current offset (that is, starting result location, amongst the Products deemed by the API as relevant) in search results. This field is only considered if page_token is unset. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +}, +"orderBy": { +"description": "The order in which products are returned. Products can be ordered by a field in an Product object. Leave it unset if ordered by relevance. OrderBy expression is case-sensitive. For more information, see [Order](https://cloud.google.com/retail/docs/filter-and-order#order). If this field is unrecognizable, an INVALID_ARGUMENT is returned.", +"type": "string" +}, +"pageCategories": { +"description": "The categories associated with a category page. Must be set for category navigation queries to achieve good search quality. The format should be the same as UserEvent.page_categories; To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategories\" : [\"Sales > 2017 Black Friday Deals\"].", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageSize": { +"description": "Maximum number of Products to return. If unspecified, defaults to a reasonable value. The maximum allowed value is 120. Values above 120 will be coerced to 120. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "A page token SearchResponse.next_page_token, received from a previous SearchService.Search call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to SearchService.Search must match the call that provided the page token. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"personalizationSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestPersonalizationSpec", +"description": "The specification for personalization. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec." +}, +"query": { +"description": "Raw search query. If this field is empty, the request is considered a category browsing request and returned results are based on filter and page_categories.", +"type": "string" +}, +"queryExpansionSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestQueryExpansionSpec", +"description": "The query expansion specification that specifies the conditions under which query expansion occurs. For more information, see [Query expansion](https://cloud.google.com/retail/docs/result-size#query_expansion)." +}, +"searchMode": { +"description": "The search mode of the search request. If not specified, a single search request triggers both product search and faceted search.", +"enum": [ +"SEARCH_MODE_UNSPECIFIED", +"PRODUCT_SEARCH_ONLY", +"FACETED_SEARCH_ONLY" +], +"enumDescriptions": [ +"Default value. In this case both product search and faceted search will be performed. Both SearchResponse.SearchResult and SearchResponse.Facet will be returned.", +"Only product search will be performed. The faceted search will be disabled. Only SearchResponse.SearchResult will be returned. SearchResponse.Facet will not be returned, even if SearchRequest.facet_specs or SearchRequest.dynamic_facet_spec is set.", +"Only faceted search will be performed. The product search will be disabled. When in this mode, one or both of SearchRequest.facet_specs and SearchRequest.dynamic_facet_spec should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only SearchResponse.Facet will be returned. SearchResponse.SearchResult will not be returned." +], +"type": "string" +}, +"spellCorrectionSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestSpellCorrectionSpec", +"description": "The spell correction specification that specifies the mode under which spell correction will take effect." +}, +"userInfo": { +"$ref": "GoogleCloudRetailV2betaUserInfo", +"description": "User information." +}, +"variantRollupKeys": { +"description": "The keys to fetch and rollup the matching variant Products attributes, FulfillmentInfo or LocalInventorys attributes. The attributes from all the matching variant Products or LocalInventorys are merged and de-duplicated. Notice that rollup attributes will lead to extra query latency. Maximum number of keys is 30. For FulfillmentInfo, a fulfillment type and a fulfillment ID must be provided in the format of \"fulfillmentType.fulfillmentId\". E.g., in \"pickupInStore.store123\", \"pickupInStore\" is fulfillment type and \"store123\" is the store ID. Supported keys are: * colorFamilies * price * originalPrice * discount * variantId * inventory(place_id,price) * inventory(place_id,original_price) * inventory(place_id,attributes.key), where key is any key in the Product.local_inventories.attributes map. * attributes.key, where key is any key in the Product.attributes map. * pickupInStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"pickup-in-store\". * shipToStore.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"ship-to-store\". * sameDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"same-day-delivery\". * nextDayDelivery.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"next-day-delivery\". * customFulfillment1.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-1\". * customFulfillment2.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-2\". * customFulfillment3.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-3\". * customFulfillment4.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-4\". * customFulfillment5.id, where id is any FulfillmentInfo.place_ids for FulfillmentInfo.type \"custom-type-5\". If this field is set to an invalid value other than these, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"visitorId": { +"description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor logs in or out of the website. This should be the same identifier as UserEvent.visitor_id. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestBoostSpec": { +"description": "Boost specification to boost certain items.", +"id": "GoogleCloudRetailV2betaSearchRequestBoostSpec", +"properties": { +"conditionBoostSpecs": { +"description": "Condition boost specifications. If a product matches multiple conditions in the specifictions, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.", +"items": { +"$ref": "GoogleCloudRetailV2betaSearchRequestBoostSpecConditionBoostSpec" +}, +"type": "array" +}, +"skipBoostSpecValidation": { +"description": "Whether to skip boostspec validation. If this field is set to true, invalid BoostSpec.condition_boost_specs will be ignored and valid BoostSpec.condition_boost_specs will still be applied.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestBoostSpecConditionBoostSpec": { +"description": "Boost applies to products which match a condition.", +"id": "GoogleCloudRetailV2betaSearchRequestBoostSpecConditionBoostSpec", +"properties": { +"boost": { +"description": "Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the item a big promotion. However, it does not necessarily mean that the boosted item will be the top result at all times, nor that other items will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant items. Setting to -1.0 gives the item a big demotion. However, results that are deeply relevant might still be shown. The item will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.", +"format": "float", +"type": "number" +}, +"condition": { +"description": "An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Examples: * To boost products with product ID \"product_1\" or \"product_2\", and color \"Red\" or \"Blue\": * (id: ANY(\"product_1\", \"product_2\")) AND (colorFamilies: ANY(\"Red\",\"Blue\"))", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec": { +"description": "The specifications of dynamically generated facets.", +"id": "GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec", +"properties": { +"mode": { +"description": "Mode of the DynamicFacet feature. Defaults to Mode.DISABLED if it's unset.", +"enum": [ +"MODE_UNSPECIFIED", +"DISABLED", +"ENABLED" +], +"enumDescriptions": [ +"Default value.", +"Disable Dynamic Facet.", +"Automatic mode built by Google Retail Search." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestFacetSpec": { +"description": "A facet specification to perform faceted search.", +"id": "GoogleCloudRetailV2betaSearchRequestFacetSpec", +"properties": { +"enableDynamicPosition": { +"description": "Enables dynamic position for this facet. If set to true, the position of this facet among all facets in the response is determined by Google Retail Search. It is ordered together with dynamic facets if dynamic facets is enabled. If set to false, the position of this facet in the response is the same as in the request, and it is ranked before the facets with dynamic position enable and all dynamic facets. For example, you may always want to have rating facet returned in the response, but it's not necessarily to always display the rating facet at the top. In that case, you can set enable_dynamic_position to true so that the position of rating facet in response is determined by Google Retail Search. Another example, assuming you have the following facets in the request: * \"rating\", enable_dynamic_position = true * \"price\", enable_dynamic_position = false * \"brands\", enable_dynamic_position = false And also you have a dynamic facets enable, which generates a facet \"gender\". Then, the final order of the facets in the response can be (\"price\", \"brands\", \"rating\", \"gender\") or (\"price\", \"brands\", \"gender\", \"rating\") depends on how Google Retail Search orders \"gender\" and \"rating\" facets. However, notice that \"price\" and \"brands\" are always ranked at first and second position because their enable_dynamic_position values are false.", +"type": "boolean" +}, +"excludedFilterKeys": { +"description": "List of keys to exclude when faceting. By default, FacetKey.key is not excluded from the filter unless it is listed in this field. Listing a facet key in this field allows its values to appear as facet results, even when they are filtered out of search results. Using this field does not affect what search results are returned. For example, suppose there are 100 products with the color facet \"Red\" and 200 products with the color facet \"Blue\". A query containing the filter \"colorFamilies:ANY(\"Red\")\" and having \"colorFamilies\" as FacetKey.key would by default return only \"Red\" products in the search results, and also return \"Red\" with count 100 as the only color facet. Although there are also blue products available, \"Blue\" would not be shown as an available facet value. If \"colorFamilies\" is listed in \"excludedFilterKeys\", then the query returns the facet values \"Red\" with count 100 and \"Blue\" with count 200, because the \"colorFamilies\" key is now excluded from the filter. Because this field doesn't affect search results, the search results are still correctly filtered to return only \"Red\" products. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"facetKey": { +"$ref": "GoogleCloudRetailV2betaSearchRequestFacetSpecFacetKey", +"description": "Required. The facet key specification." +}, +"limit": { +"description": "Maximum of facet values that should be returned for this facet. If unspecified, defaults to 50. The maximum allowed value is 300. Values above 300 will be coerced to 300. If this field is negative, an INVALID_ARGUMENT is returned.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestFacetSpecFacetKey": { +"description": "Specifies how a facet is computed.", +"id": "GoogleCloudRetailV2betaSearchRequestFacetSpecFacetKey", +"properties": { +"caseInsensitive": { +"description": "True to make facet keys case insensitive when getting faceting values with prefixes or contains; false otherwise.", +"type": "boolean" +}, +"contains": { +"description": "Only get facet values that contains the given strings. For example, suppose \"categories\" has three values \"Women > Shoe\", \"Women > Dress\" and \"Men > Shoe\". If set \"contains\" to \"Shoe\", the \"categories\" facet gives only \"Women > Shoe\" and \"Men > Shoe\". Only supported on textual fields. Maximum is 10.", +"items": { +"type": "string" +}, +"type": "array" +}, +"intervals": { +"description": "Set only if values should be bucketized into intervals. Must be set for facets with numerical values. Must not be set for facet with text values. Maximum number of intervals is 40. For all numerical facet keys that appear in the list of products from the catalog, the percentiles 0, 10, 30, 50, 70, 90, and 100 are computed from their distribution weekly. If the model assigns a high score to a numerical facet key and its intervals are not specified in the search request, these percentiles become the bounds for its intervals and are returned in the response. If the facet key intervals are specified in the request, then the specified intervals are returned instead.", +"items": { +"$ref": "GoogleCloudRetailV2betaInterval" +}, +"type": "array" +}, +"key": { +"description": "Required. Supported textual and numerical facet keys in Product object, over which the facet values are computed. Facet key is case-sensitive. Allowed facet keys when FacetKey.query is not specified: * textual_field = * \"brands\" * \"categories\" * \"genders\" * \"ageGroups\" * \"availability\" * \"colorFamilies\" * \"colors\" * \"sizes\" * \"materials\" * \"patterns\" * \"conditions\" * \"attributes.key\" * \"pickupInStore\" * \"shipToStore\" * \"sameDayDelivery\" * \"nextDayDelivery\" * \"customFulfillment1\" * \"customFulfillment2\" * \"customFulfillment3\" * \"customFulfillment4\" * \"customFulfillment5\" * \"inventory(place_id,attributes.key)\" * numerical_field = * \"price\" * \"discount\" * \"rating\" * \"ratingCount\" * \"attributes.key\" * \"inventory(place_id,price)\" * \"inventory(place_id,original_price)\" * \"inventory(place_id,attributes.key)\"", +"type": "string" +}, +"orderBy": { +"description": "The order in which SearchResponse.Facet.values are returned. Allowed values are: * \"count desc\", which means order by SearchResponse.Facet.values.count descending. * \"value desc\", which means order by SearchResponse.Facet.values.value descending. Only applies to textual facets. If not set, textual values are sorted in [natural order](https://en.wikipedia.org/wiki/Natural_sort_order); numerical intervals are sorted in the order given by FacetSpec.FacetKey.intervals; FulfillmentInfo.place_ids are sorted in the order given by FacetSpec.FacetKey.restricted_values.", +"type": "string" +}, +"prefixes": { +"description": "Only get facet values that start with the given string prefix. For example, suppose \"categories\" has three values \"Women > Shoe\", \"Women > Dress\" and \"Men > Shoe\". If set \"prefixes\" to \"Women\", the \"categories\" facet gives only \"Women > Shoe\" and \"Women > Dress\". Only supported on textual fields. Maximum is 10.", +"items": { +"type": "string" +}, +"type": "array" +}, +"query": { +"description": "The query that is used to compute facet for the given facet key. When provided, it overrides the default behavior of facet computation. The query syntax is the same as a filter expression. See SearchRequest.filter for detail syntax and limitations. Notice that there is no limitation on FacetKey.key when query is specified. In the response, SearchResponse.Facet.values.value is always \"1\" and SearchResponse.Facet.values.count is the number of results that match the query. For example, you can set a customized facet for \"shipToStore\", where FacetKey.key is \"customizedShipToStore\", and FacetKey.query is \"availability: ANY(\\\"IN_STOCK\\\") AND shipToStore: ANY(\\\"123\\\")\". Then the facet counts the products that are both in stock and ship to store \"123\".", +"type": "string" +}, +"restrictedValues": { +"description": "Only get facet for the given restricted values. For example, when using \"pickupInStore\" as key and set restricted values to [\"store123\", \"store456\"], only facets for \"store123\" and \"store456\" are returned. Only supported on predefined textual fields, custom textual attributes and fulfillments. Maximum is 20. Must be set for the fulfillment facet keys: * pickupInStore * shipToStore * sameDayDelivery * nextDayDelivery * customFulfillment1 * customFulfillment2 * customFulfillment3 * customFulfillment4 * customFulfillment5", +"items": { +"type": "string" +}, +"type": "array" +}, +"returnMinMax": { +"description": "Returns the min and max value for each numerical facet intervals. Ignored for textual facets.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestPersonalizationSpec": { +"description": "The specification for personalization.", +"id": "GoogleCloudRetailV2betaSearchRequestPersonalizationSpec", +"properties": { +"mode": { +"description": "Defaults to Mode.AUTO.", +"enum": [ +"MODE_UNSPECIFIED", +"AUTO", +"DISABLED" +], +"enumDescriptions": [ +"Default value. In this case, server behavior defaults to Mode.AUTO.", +"Let CRS decide whether to use personalization based on quality of user event data.", +"Disable personalization." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestQueryExpansionSpec": { +"description": "Specification to determine under which conditions query expansion should occur.", +"id": "GoogleCloudRetailV2betaSearchRequestQueryExpansionSpec", +"properties": { +"condition": { +"description": "The condition under which query expansion should occur. Default to Condition.DISABLED.", +"enum": [ +"CONDITION_UNSPECIFIED", +"DISABLED", +"AUTO" +], +"enumDescriptions": [ +"Unspecified query expansion condition. In this case, server behavior defaults to Condition.DISABLED.", +"Disabled query expansion. Only the exact search query is used, even if SearchResponse.total_size is zero.", +"Automatic query expansion built by Google Retail Search." +], +"type": "string" +}, +"pinUnexpandedResults": { +"description": "Whether to pin unexpanded results. If this field is set to true, unexpanded products are always at the top of the search results, followed by the expanded results.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchRequestSpellCorrectionSpec": { +"description": "The specification for query spell correction.", +"id": "GoogleCloudRetailV2betaSearchRequestSpellCorrectionSpec", +"properties": { +"mode": { +"description": "The mode under which spell correction should take effect to replace the original search query. Default to Mode.AUTO.", +"enum": [ +"MODE_UNSPECIFIED", +"SUGGESTION_ONLY", +"AUTO" +], +"enumDescriptions": [ +"Unspecified spell correction mode. In this case, server behavior defaults to Mode.AUTO.", +"Google Retail Search will try to find a spell suggestion if there is any and put in the SearchResponse.corrected_query. The spell suggestion will not be used as the search query.", +"Automatic spell correction built by Google Retail Search. Search will be based on the corrected query if found." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchResponse": { +"description": "Response message for SearchService.Search method.", +"id": "GoogleCloudRetailV2betaSearchResponse", +"properties": { +"appliedControls": { +"description": "The fully qualified resource name of applied [controls](https://cloud.google.com/retail/docs/serving-control-rules).", +"items": { +"type": "string" +}, +"type": "array" +}, +"attributionToken": { +"description": "A unique search token. This should be included in the UserEvent logs resulting from this search, which enables accurate attribution of search model performance.", +"type": "string" +}, +"correctedQuery": { +"description": "Contains the spell corrected query, if found. If the spell correction type is AUTOMATIC, then the search results are based on corrected_query. Otherwise the original query is used for search.", +"type": "string" +}, +"experimentInfo": { +"description": "Metadata related to A/B testing Experiment associated with this response. Only exists when an experiment is triggered.", +"items": { +"$ref": "GoogleCloudRetailV2betaExperimentInfo" +}, +"type": "array" +}, +"facets": { +"description": "Results of facets requested by user.", +"items": { +"$ref": "GoogleCloudRetailV2betaSearchResponseFacet" +}, +"type": "array" +}, +"invalidConditionBoostSpecs": { +"description": "The invalid SearchRequest.BoostSpec.condition_boost_specs that are not applied during serving.", +"items": { +"$ref": "GoogleCloudRetailV2betaSearchRequestBoostSpecConditionBoostSpec" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token that can be sent as SearchRequest.page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"queryExpansionInfo": { +"$ref": "GoogleCloudRetailV2betaSearchResponseQueryExpansionInfo", +"description": "Query expansion information for the returned results." +}, +"redirectUri": { +"description": "The URI of a customer-defined redirect page. If redirect action is triggered, no search is performed, and only redirect_uri and attribution_token are set in the response.", +"type": "string" +}, +"results": { +"description": "A list of matched items. The order represents the ranking.", +"items": { +"$ref": "GoogleCloudRetailV2betaSearchResponseSearchResult" +}, +"type": "array" +}, +"totalSize": { +"description": "The estimated total count of matched items irrespective of pagination. The count of results returned by pagination may be less than the total_size that matches.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchResponseFacet": { +"description": "A facet result.", +"id": "GoogleCloudRetailV2betaSearchResponseFacet", +"properties": { +"dynamicFacet": { +"description": "Whether the facet is dynamically generated.", +"type": "boolean" +}, +"key": { +"description": "The key for this facet. E.g., \"colorFamilies\" or \"price\" or \"attributes.attr1\".", +"type": "string" +}, +"values": { +"description": "The facet values for this field.", +"items": { +"$ref": "GoogleCloudRetailV2betaSearchResponseFacetFacetValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchResponseFacetFacetValue": { +"description": "A facet value which contains value names and their count.", +"id": "GoogleCloudRetailV2betaSearchResponseFacetFacetValue", +"properties": { +"count": { +"description": "Number of items that have this facet value.", +"format": "int64", +"type": "string" +}, +"interval": { +"$ref": "GoogleCloudRetailV2betaInterval", +"description": "Interval value for a facet, such as [10, 20) for facet \"price\"." +}, +"maxValue": { +"description": "The maximum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", +"format": "double", +"type": "number" +}, +"minValue": { +"description": "The minimum value in the FacetValue.interval. Only supported on numerical facets and returned if SearchRequest.FacetSpec.FacetKey.return_min_max is true.", +"format": "double", +"type": "number" +}, +"value": { +"description": "Text value of a facet, such as \"Black\" for facet \"colorFamilies\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchResponseQueryExpansionInfo": { +"description": "Information describing query expansion including whether expansion has occurred.", +"id": "GoogleCloudRetailV2betaSearchResponseQueryExpansionInfo", +"properties": { +"expandedQuery": { +"description": "Bool describing whether query expansion has occurred.", +"type": "boolean" +}, +"pinnedResultCount": { +"description": "Number of pinned results. This field will only be set when expansion happens and SearchRequest.QueryExpansionSpec.pin_unexpanded_results is set to true.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSearchResponseSearchResult": { +"description": "Represents the search results.", +"id": "GoogleCloudRetailV2betaSearchResponseSearchResult", +"properties": { +"id": { +"description": "Product.id of the searched Product.", +"type": "string" +}, +"matchingVariantCount": { +"description": "The count of matched variant Products.", +"format": "int32", +"type": "integer" +}, +"matchingVariantFields": { +"additionalProperties": { +"format": "google-fieldmask", +"type": "string" +}, +"description": "If a variant Product matches the search query, this map indicates which Product fields are matched. The key is the Product.name, the value is a field mask of the matched Product fields. If matched attributes cannot be determined, this map will be empty. For example, a key \"sku1\" with field mask \"products.color_info\" indicates there is a match between \"sku1\" ColorInfo and the query.", +"type": "object" +}, +"personalLabels": { +"description": "Specifies previous events related to this product for this user based on UserEvent with same SearchRequest.visitor_id or UserInfo.user_id. This is set only when SearchRequest.PersonalizationSpec.mode is SearchRequest.PersonalizationSpec.Mode.AUTO. Possible values: * `purchased`: Indicates that this product has been purchased before.", +"items": { +"type": "string" +}, +"type": "array" +}, +"product": { +"$ref": "GoogleCloudRetailV2betaProduct", +"description": "The product data snippet in the search response. Only Product.name is guaranteed to be populated. Product.variants contains the product variants that match the search query. If there are multiple product variants matching the query, top 5 most relevant product variants are returned and ordered by relevancy. If relevancy can be deternmined, use matching_variant_fields to look up matched product variants fields. If relevancy cannot be determined, e.g. when searching \"shoe\" all products in a shoe product can be a match, 5 product variants are returned but order is meaningless." +}, +"variantRollupValues": { +"additionalProperties": { +"type": "any" +}, +"description": "The rollup matching variant Product attributes. The key is one of the SearchRequest.variant_rollup_keys. The values are the merged and de-duplicated Product attributes. Notice that the rollup values are respect filter. For example, when filtering by \"colorFamilies:ANY(\\\"red\\\")\" and rollup \"colorFamilies\", only \"red\" is returned. For textual and numerical attributes, the rollup values is a list of string or double values with type google.protobuf.ListValue. For example, if there are two variants with colors \"red\" and \"blue\", the rollup values are { key: \"colorFamilies\" value { list_value { values { string_value: \"red\" } values { string_value: \"blue\" } } } } For FulfillmentInfo, the rollup values is a double value with type google.protobuf.Value. For example, `{key: \"pickupInStore.store1\" value { number_value: 10 }}` means a there are 10 variants in this product are available in the store \"store1\".", +"type": "object" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaServingConfig": { +"description": "Configures metadata that is used to generate serving time results (e.g. search results or recommendation predictions).", +"id": "GoogleCloudRetailV2betaServingConfig", +"properties": { +"boostControlIds": { +"description": "Condition boost specifications. If a product matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 100. Notice that if both ServingConfig.boost_control_ids and SearchRequest.boost_spec are set, the boost conditions from both places are evaluated. If a search request matches multiple boost conditions, the final boost score is equal to the sum of the boost scores from all matched boost conditions. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Required. The human readable serving config display name. Used in Retail UI. This field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"diversityLevel": { +"description": "How much diversity to use in recommendation model results e.g. `medium-diversity` or `high-diversity`. Currently supported values: * `no-diversity` * `low-diversity` * `medium-diversity` * `high-diversity` * `auto-diversity` If not specified, we choose default based on recommendation model type. Default value: `no-diversity`. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"diversityType": { +"description": "What kind of diversity to use - data driven or rule based. If unset, the server behavior defaults to RULE_BASED_DIVERSITY.", +"enum": [ +"DIVERSITY_TYPE_UNSPECIFIED", +"RULE_BASED_DIVERSITY", +"DATA_DRIVEN_DIVERSITY" +], +"enumDescriptions": [ +"Default value.", +"Rule based diversity.", +"Data driven diversity." +], +"type": "string" +}, +"doNotAssociateControlIds": { +"description": "Condition do not associate specifications. If multiple do not associate conditions match, all matching do not associate controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dynamicFacetSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestDynamicFacetSpec", +"description": "The specification for dynamically generated facets. Notice that only textual facets can be dynamically generated. Can only be set if solution_types is SOLUTION_TYPE_SEARCH." +}, +"enableCategoryFilterLevel": { +"description": "Whether to add additional category filters on the `similar-items` model. If not specified, we enable it by default. Allowed values are: * `no-category-match`: No additional filtering of original results from the model and the customer's filters. * `relaxed-category-match`: Only keep results with categories that match at least one item categories in the PredictRequests's context item. * If customer also sends filters in the PredictRequest, then the results will satisfy both conditions (user given and category match). Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"facetControlIds": { +"description": "Facet specifications for faceted search. If empty, no facets are returned. The ids refer to the ids of Control resources with only the Facet control set. These controls are assumed to be in the same Catalog as the ServingConfig. A maximum of 100 values are allowed. Otherwise, an INVALID_ARGUMENT error is returned. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"filterControlIds": { +"description": "Condition filter specifications. If a product matches multiple conditions in the specifications, filters from these specifications are all applied and combined via the AND operator. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoreControlIds": { +"description": "Condition ignore specifications. If multiple ignore conditions match, all matching ignore controls in the list will execute. - Order does not matter. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoreRecsDenylist": { +"description": "When the flag is enabled, the products in the denylist will not be filtered out in the recommendation filtering results.", +"type": "boolean" +}, +"modelId": { +"description": "The id of the model in the same Catalog to use at serving time. Currently only RecommendationModels are supported: https://cloud.google.com/retail/recommendations-ai/docs/create-models Can be changed but only to a compatible model (e.g. others-you-may-like CTR to others-you-may-like CVR). Required when solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"name": { +"description": "Immutable. Fully qualified name `projects/*/locations/global/catalogs/*/servingConfig/*`", +"type": "string" +}, +"onewaySynonymsControlIds": { +"description": "Condition oneway synonyms specifications. If multiple oneway synonyms conditions match, all matching oneway synonyms controls in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"personalizationSpec": { +"$ref": "GoogleCloudRetailV2betaSearchRequestPersonalizationSpec", +"description": "The specification for personalization spec. Can only be set if solution_types is SOLUTION_TYPE_SEARCH. Notice that if both ServingConfig.personalization_spec and SearchRequest.personalization_spec are set. SearchRequest.personalization_spec will override ServingConfig.personalization_spec." +}, +"priceRerankingLevel": { +"description": "How much price ranking we want in serving results. Price reranking causes product items with a similar recommendation probability to be ordered by price, with the highest-priced items first. This setting could result in a decrease in click-through and conversion rates. Allowed values are: * `no-price-reranking` * `low-price-reranking` * `medium-price-reranking` * `high-price-reranking` If not specified, we choose default based on model type. Default value: `no-price-reranking`. Can only be set if solution_types is SOLUTION_TYPE_RECOMMENDATION.", +"type": "string" +}, +"redirectControlIds": { +"description": "Condition redirect specifications. Only the first triggered redirect action is applied, even if multiple apply. Maximum number of specifications is 1000. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replacementControlIds": { +"description": "Condition replacement specifications. - Applied according to the order in the list. - A previously replaced term can not be re-replaced. - Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +}, +"solutionTypes": { +"description": "Required. Immutable. Specifies the solution types that a serving config can be associated with. Currently we support setting only one type of solution.", +"items": { +"enum": [ +"SOLUTION_TYPE_UNSPECIFIED", +"SOLUTION_TYPE_RECOMMENDATION", +"SOLUTION_TYPE_SEARCH" +], +"enumDescriptions": [ +"Default value.", +"Used for Recommendations AI.", +"Used for Retail Search." +], +"type": "string" +}, +"type": "array" +}, +"twowaySynonymsControlIds": { +"description": "Condition synonyms specifications. If multiple syonyms conditions match, all matching synonyms control in the list will execute. Order of controls in the list will not matter. Maximum number of specifications is 100. Can only be set if solution_types is SOLUTION_TYPE_SEARCH.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetDefaultBranchRequest": { +"description": "Request message to set a specified branch as new default_branch.", +"id": "GoogleCloudRetailV2betaSetDefaultBranchRequest", +"properties": { +"branchId": { +"description": "The final component of the resource name of a branch. This field must be one of \"0\", \"1\" or \"2\". Otherwise, an INVALID_ARGUMENT error is returned. If there are no sufficient active products in the targeted branch and force is not set, a FAILED_PRECONDITION error is returned.", +"type": "string" +}, +"force": { +"description": "If set to true, it permits switching to a branch with branch_id even if it has no sufficient active products.", +"type": "boolean" +}, +"note": { +"description": "Some note on this request, this can be retrieved by CatalogService.GetDefaultBranch before next valid default branch set occurs. This field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetInventoryMetadata": { +"description": "Metadata related to the progress of the SetInventory operation. Currently empty because there is no meaningful metadata populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2betaSetInventoryMetadata", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetInventoryRequest": { +"description": "Request message for ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2betaSetInventoryRequest", +"properties": { +"allowMissing": { +"description": "If set to true, and the Product with name Product.name is not found, the inventory update will still be processed and retained for at most 1 day until the Product is created. If set to false, a NOT_FOUND error is returned if the Product is not found.", +"type": "boolean" +}, +"inventory": { +"$ref": "GoogleCloudRetailV2betaProduct", +"description": "Required. The inventory information to update. The allowable fields to update are: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info The updated inventory fields must be specified in SetInventoryRequest.set_mask. If SetInventoryRequest.inventory.name is empty or invalid, an INVALID_ARGUMENT error is returned. If the caller does not have permission to update the Product named in Product.name, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the Product to update does not have existing inventory information, the provided inventory information will be inserted. If the Product to update has existing inventory information, the provided inventory information will be merged while respecting the last update time for each inventory field, using the provided or default value for SetInventoryRequest.set_time. The caller can replace place IDs for a subset of fulfillment types in the following ways: * Adds \"fulfillment_info\" in SetInventoryRequest.set_mask * Specifies only the desired fulfillment types and corresponding place IDs to update in SetInventoryRequest.inventory.fulfillment_info The caller can clear all place IDs from a subset of fulfillment types in the following ways: * Adds \"fulfillment_info\" in SetInventoryRequest.set_mask * Specifies only the desired fulfillment types to clear in SetInventoryRequest.inventory.fulfillment_info * Checks that only the desired fulfillment info types have empty SetInventoryRequest.inventory.fulfillment_info.place_ids The last update time is recorded for the following inventory fields: * Product.price_info * Product.availability * Product.available_quantity * Product.fulfillment_info If a full overwrite of inventory information while ignoring timestamps is needed, ProductService.UpdateProduct should be invoked instead." +}, +"setMask": { +"description": "Indicates which inventory fields in the provided Product to update. At least one field must be provided. If an unsupported or unknown field is provided, an INVALID_ARGUMENT error is returned and the entire update will be ignored.", +"format": "google-fieldmask", +"type": "string" +}, +"setTime": { +"description": "The time when the request is issued, used to prevent out-of-order updates on inventory fields with the last update time recorded. If not provided, the internal system time will be used.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaSetInventoryResponse": { +"description": "Response of the SetInventoryRequest. Currently empty because there is no meaningful response populated from the ProductService.SetInventory method.", +"id": "GoogleCloudRetailV2betaSetInventoryResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaTuneModelMetadata": { +"description": "Metadata associated with a tune operation.", +"id": "GoogleCloudRetailV2betaTuneModelMetadata", +"properties": { +"model": { +"description": "The resource name of the model that this tune applies to. Format: `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaTuneModelRequest": { +"description": "Request to manually start a tuning process now (instead of waiting for the periodically scheduled tuning to happen).", +"id": "GoogleCloudRetailV2betaTuneModelRequest", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaTuneModelResponse": { +"description": "Response associated with a tune operation.", +"id": "GoogleCloudRetailV2betaTuneModelResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudRetailV2betaUserEvent": { +"description": "UserEvent captures all metadata information Retail API needs to know about how end users interact with customers' website.", +"id": "GoogleCloudRetailV2betaUserEvent", +"properties": { +"attributes": { +"additionalProperties": { +"$ref": "GoogleCloudRetailV2betaCustomAttribute" +}, +"description": "Extra user event features to include in the recommendation model. If you provide custom attributes for ingested user events, also include them in the user events that you associate with prediction requests. Custom attribute formatting must be consistent between imported events and events provided with prediction requests. This lets the Retail API use those custom attributes when training models and serving predictions, which helps improve recommendation quality. This field needs to pass all below criteria, otherwise an INVALID_ARGUMENT error is returned: * The key must be a UTF-8 encoded string with a length limit of 5,000 characters. * For text attributes, at most 400 values are allowed. Empty values are not allowed. Each value must be a UTF-8 encoded string with a length limit of 256 characters. * For number attributes, at most 400 values are allowed. For product recommendations, an example of extra user information is traffic_channel, which is how a user arrives at the site. Users can arrive at the site by coming to the site directly, coming through Google search, or in other ways.", +"type": "object" +}, +"attributionToken": { +"description": "Highly recommended for user events that are the result of PredictionService.Predict. This field enables accurate attribution of recommendation model performance. The value must be a valid PredictResponse.attribution_token for user events that are the result of PredictionService.Predict. The value must be a valid SearchResponse.attribution_token for user events that are the result of SearchService.Search. This token enables us to accurately attribute page view or purchase back to the event and the particular predict response containing this clicked/purchased product. If user clicks on product K in the recommendation results, pass PredictResponse.attribution_token as a URL parameter to product K's page. When recording events on product K's page, log the PredictResponse.attribution_token to this field.", +"type": "string" +}, +"cartId": { +"description": "The ID or name of the associated shopping cart. This ID is used to associate multiple items added or present in the cart before purchase. This can only be set for `add-to-cart`, `purchase-complete`, or `shopping-cart-page-view` events.", +"type": "string" +}, +"completionDetail": { +"$ref": "GoogleCloudRetailV2betaCompletionDetail", +"description": "The main auto-completion details related to the event. This field should be set for `search` event when autocomplete function is enabled and the user clicks a suggestion for search." +}, +"entity": { +"description": "The entity for customers that may run multiple different entities, domains, sites or regions, for example, `Google US`, `Google Ads`, `Waymo`, `google.com`, `youtube.com`, etc. We recommend that you set this field to get better per-entity search, completion, and prediction results.", +"type": "string" +}, +"eventTime": { +"description": "Only required for UserEventService.ImportUserEvents method. Timestamp of when the user event happened.", +"format": "google-datetime", +"type": "string" +}, +"eventType": { +"description": "Required. User event type. Allowed values are: * `add-to-cart`: Products being added to cart. * `category-page-view`: Special pages such as sale or promotion pages viewed. * `detail-page-view`: Products detail page viewed. * `home-page-view`: Homepage viewed. * `promotion-offered`: Promotion is offered to a user. * `promotion-not-offered`: Promotion is not offered to a user. * `purchase-complete`: User finishing a purchase. * `search`: Product search. * `shopping-cart-page-view`: User viewing a shopping cart.", +"type": "string" +}, +"experimentIds": { +"description": "A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Retail API, using different recommendation models).", +"items": { +"type": "string" +}, +"type": "array" +}, +"filter": { +"description": "The filter syntax consists of an expression language for constructing a predicate from one or more fields of the products being filtered. See SearchRequest.filter for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"offset": { +"description": "An integer that specifies the current offset for pagination (the 0-indexed starting location, amongst the products deemed by the API as relevant). See SearchRequest.offset for definition. If this field is negative, an INVALID_ARGUMENT is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"format": "int32", +"type": "integer" +}, +"orderBy": { +"description": "The order in which products are returned. See SearchRequest.order_by for definition and syntax. The value must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This can only be set for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"pageCategories": { +"description": "The categories associated with a category page. To represent full path of category, use '>' sign to separate different hierarchies. If '>' is part of the category name, replace it with other character(s). Category pages include special pages such as sales or promotions. For instance, a special sale page may have the category hierarchy: \"pageCategories\" : [\"Sales > 2017 Black Friday Deals\"]. Required for `category-page-view` events. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageViewId": { +"description": "A unique ID of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", +"type": "string" +}, +"productDetails": { +"description": "The main product details related to the event. This field is optional except for the following event types: * `add-to-cart` * `detail-page-view` * `purchase-complete` In a `search` event, this field represents the products returned to the end user on the current page (the end user may have not finished browsing the whole page yet). When a new page is returned to the end user, after pagination/filtering/ordering even for the same query, a new `search` event with different product_details is desired. The end user may have not finished browsing the whole page yet.", +"items": { +"$ref": "GoogleCloudRetailV2betaProductDetail" +}, +"type": "array" +}, +"purchaseTransaction": { +"$ref": "GoogleCloudRetailV2betaPurchaseTransaction", +"description": "A transaction represents the entire purchase transaction. Required for `purchase-complete` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned." +}, +"referrerUri": { +"description": "The referrer URL of the current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically.", +"type": "string" +}, +"searchQuery": { +"description": "The user's search query. See SearchRequest.query for definition. The value must be a UTF-8 encoded string with a length limit of 5,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. At least one of search_query or page_categories is required for `search` events. Other event types should not set this field. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +}, +"sessionId": { +"description": "A unique identifier for tracking a visitor session with a length limit of 128 bytes. A session is an aggregation of an end user behavior in a time span. A general guideline to populate the sesion_id: 1. If user has no activity for 30 min, a new session_id should be assigned. 2. The session_id should be unique across users, suggest use uuid or add visitor_id as prefix.", +"type": "string" +}, +"uri": { +"description": "Complete URL (window.location.href) of the user's current page. When using the client side event reporting with JavaScript pixel and Google Tag Manager, this value is filled in automatically. Maximum length 5,000 characters.", +"type": "string" +}, +"userInfo": { +"$ref": "GoogleCloudRetailV2betaUserInfo", +"description": "User information." +}, +"visitorId": { +"description": "Required. A unique identifier for tracking visitors. For example, this could be implemented with an HTTP cookie, which should be able to uniquely identify a visitor on a single device. This unique identifier should not change if the visitor log in/out of the website. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned. The field should not contain PII or user-data. We recommend to use Google Analytics [Client ID](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference#clientId) for this field.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaUserEventImportSummary": { +"description": "A summary of import result. The UserEventImportSummary summarizes the import status for user events.", +"id": "GoogleCloudRetailV2betaUserEventImportSummary", +"properties": { +"joinedEventsCount": { +"description": "Count of user events imported with complete existing catalog information.", +"format": "int64", +"type": "string" +}, +"unjoinedEventsCount": { +"description": "Count of user events imported, but with catalog information not found in the imported catalog.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaUserEventInlineSource": { +"description": "The inline source for the input config for ImportUserEvents method.", +"id": "GoogleCloudRetailV2betaUserEventInlineSource", +"properties": { +"userEvents": { +"description": "Required. A list of user events to import. Recommended max of 10k items.", +"items": { +"$ref": "GoogleCloudRetailV2betaUserEvent" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaUserEventInputConfig": { +"description": "The input config source for user events.", +"id": "GoogleCloudRetailV2betaUserEventInputConfig", +"properties": { +"bigQuerySource": { +"$ref": "GoogleCloudRetailV2betaBigQuerySource", +"description": "Required. BigQuery input source." +}, +"gcsSource": { +"$ref": "GoogleCloudRetailV2betaGcsSource", +"description": "Required. Google Cloud Storage location for the input content." +}, +"userEventInlineSource": { +"$ref": "GoogleCloudRetailV2betaUserEventInlineSource", +"description": "Required. The Inline source for the input content for UserEvents." +} +}, +"type": "object" +}, +"GoogleCloudRetailV2betaUserInfo": { +"description": "Information of an end user.", +"id": "GoogleCloudRetailV2betaUserInfo", +"properties": { +"directUserRequest": { +"description": "True if the request is made directly from the end user, in which case the ip_address and user_agent can be populated from the HTTP request. This flag should be set only if the API request is made directly from the end user such as a mobile app (and not if a gateway or a server is processing and pushing the user events). This should not be set when using the JavaScript tag in UserEventService.CollectUserEvent.", +"type": "boolean" +}, +"ipAddress": { +"description": "The end user's IP address. This field is used to extract location information for personalization. This field must be either an IPv4 address (e.g. \"104.133.9.80\") or an IPv6 address (e.g. \"2001:0db8:85a3:0000:0000:8a2e:0370:7334\"). Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when: * setting SearchRequest.user_info. * using the JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", +"type": "string" +}, +"userAgent": { +"description": "User agent as included in the HTTP header. Required for getting SearchResponse.sponsored_results. The field must be a UTF-8 encoded string with a length limit of 1,000 characters. Otherwise, an INVALID_ARGUMENT error is returned. This should not be set when using the client side event reporting with GTM or JavaScript tag in UserEventService.CollectUserEvent or if direct_user_request is set.", +"type": "string" +}, +"userId": { +"description": "Highly recommended for logged-in users. Unique identifier for logged-in user, such as a user name. Don't set for anonymous users. Always use a hashed value for this ID. Don't set the field to the same fixed ID for different users. This mixes the event history of those users together, which results in degraded model quality. The field must be a UTF-8 encoded string with a length limit of 128 characters. Otherwise, an INVALID_ARGUMENT error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeDate": { +"description": "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, 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", +"id": "GoogleTypeDate", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Vertex AI Search for Retail API", +"version": "v2beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..042c84064098edad22c7373a5910fe9b04a3fec8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1.json @@ -0,0 +1,6326 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://run.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Run", +"description": "Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/run/", +"endpoints": [ +{ +"description": "Locational Endpoint", +"endpointUrl": "https://africa-south1-run.googleapis.com/", +"location": "africa-south1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-east1-run.googleapis.com/", +"location": "asia-east1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-east2-run.googleapis.com/", +"location": "asia-east2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-northeast1-run.googleapis.com/", +"location": "asia-northeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-northeast2-run.googleapis.com/", +"location": "asia-northeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-northeast3-run.googleapis.com/", +"location": "asia-northeast3" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-south1-run.googleapis.com/", +"location": "asia-south1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-south2-run.googleapis.com/", +"location": "asia-south2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-southeast1-run.googleapis.com/", +"location": "asia-southeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-southeast2-run.googleapis.com/", +"location": "asia-southeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://australia-southeast1-run.googleapis.com/", +"location": "australia-southeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://australia-southeast2-run.googleapis.com/", +"location": "australia-southeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-central2-run.googleapis.com/", +"location": "europe-central2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-north1-run.googleapis.com/", +"location": "europe-north1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-southwest1-run.googleapis.com/", +"location": "europe-southwest1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west1-run.googleapis.com/", +"location": "europe-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west10-run.googleapis.com/", +"location": "europe-west10" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west12-run.googleapis.com/", +"location": "europe-west12" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west2-run.googleapis.com/", +"location": "europe-west2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west3-run.googleapis.com/", +"location": "europe-west3" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west4-run.googleapis.com/", +"location": "europe-west4" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west6-run.googleapis.com/", +"location": "europe-west6" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west8-run.googleapis.com/", +"location": "europe-west8" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west9-run.googleapis.com/", +"location": "europe-west9" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://me-central1-run.googleapis.com/", +"location": "me-central1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://me-central2-run.googleapis.com/", +"location": "me-central2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://me-west1-run.googleapis.com/", +"location": "me-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://northamerica-northeast1-run.googleapis.com/", +"location": "northamerica-northeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://northamerica-northeast2-run.googleapis.com/", +"location": "northamerica-northeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://southamerica-east1-run.googleapis.com/", +"location": "southamerica-east1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://southamerica-west1-run.googleapis.com/", +"location": "southamerica-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-central1-run.googleapis.com/", +"location": "us-central1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-east1-run.googleapis.com/", +"location": "us-east1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-east4-run.googleapis.com/", +"location": "us-east4" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-east5-run.googleapis.com/", +"location": "us-east5" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-south1-run.googleapis.com/", +"location": "us-south1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west1-run.googleapis.com/", +"location": "us-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west2-run.googleapis.com/", +"location": "us-west2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west3-run.googleapis.com/", +"location": "us-west3" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west4-run.googleapis.com/", +"location": "us-west4" +} +], +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "run:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://run.mtls.googleapis.com/", +"name": "run", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"namespaces": { +"resources": { +"authorizeddomains": { +"methods": { +"list": { +"description": "List authorized domains.", +"flatPath": "apis/domains.cloudrun.com/v1/namespaces/{namespacesId}/authorizeddomains", +"httpMethod": "GET", +"id": "run.namespaces.authorizeddomains.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Name of the parent Project resource. Example: `projects/myproject`.", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/domains.cloudrun.com/v1/{+parent}/authorizeddomains", +"response": { +"$ref": "ListAuthorizedDomainsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"configurations": { +"methods": { +"get": { +"description": "Get information about a configuration.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/configurations/{configurationsId}", +"httpMethod": "GET", +"id": "run.namespaces.configurations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the configuration to retrieve. For Cloud Run, replace {namespace_id} with the project ID or number.", +"location": "path", +"pattern": "^namespaces/[^/]+/configurations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+name}", +"response": { +"$ref": "Configuration" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List configurations.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/configurations", +"httpMethod": "GET", +"id": "run.namespaces.configurations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of the records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "The namespace from which the configurations should be listed. For Cloud Run, replace {namespace_id} with the project ID or number.", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/serving.knative.dev/v1/{+parent}/configurations", +"response": { +"$ref": "ListConfigurationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"domainmappings": { +"methods": { +"create": { +"description": "Create a new domain mapping.", +"flatPath": "apis/domains.cloudrun.com/v1/namespaces/{namespacesId}/domainmappings", +"httpMethod": "POST", +"id": "run.namespaces.domainmappings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/domains.cloudrun.com/v1/{+parent}/domainmappings", +"request": { +"$ref": "DomainMapping" +}, +"response": { +"$ref": "DomainMapping" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a domain mapping.", +"flatPath": "apis/domains.cloudrun.com/v1/namespaces/{namespacesId}/domainmappings/{domainmappingsId}", +"httpMethod": "DELETE", +"id": "run.namespaces.domainmappings.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the domain mapping to delete. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/domainmappings/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/architecture/garbage-collection/ for more information.", +"location": "query", +"type": "string" +} +}, +"path": "apis/domains.cloudrun.com/v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get information about a domain mapping.", +"flatPath": "apis/domains.cloudrun.com/v1/namespaces/{namespacesId}/domainmappings/{domainmappingsId}", +"httpMethod": "GET", +"id": "run.namespaces.domainmappings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the domain mapping to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/domainmappings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/domains.cloudrun.com/v1/{+name}", +"response": { +"$ref": "DomainMapping" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List all domain mappings.", +"flatPath": "apis/domains.cloudrun.com/v1/namespaces/{namespacesId}/domainmappings", +"httpMethod": "GET", +"id": "run.namespaces.domainmappings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "Required. The namespace from which the domain mappings should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/domains.cloudrun.com/v1/{+parent}/domainmappings", +"response": { +"$ref": "ListDomainMappingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"executions": { +"methods": { +"cancel": { +"description": "Cancel an execution.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/executions/{executionsId}:cancel", +"httpMethod": "POST", +"id": "run.namespaces.executions.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the execution to cancel. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}:cancel", +"request": { +"$ref": "CancelExecutionRequest" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete an execution.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/executions/{executionsId}", +"httpMethod": "DELETE", +"id": "run.namespaces.executions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Optional. Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Optional. Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the execution to delete. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Optional. Specifies the propagation policy of delete. Cloud Run currently ignores this setting.", +"location": "query", +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get information about an execution.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/executions/{executionsId}", +"httpMethod": "GET", +"id": "run.namespaces.executions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the execution to retrieve. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}", +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List executions.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/executions", +"httpMethod": "GET", +"id": "run.namespaces.executions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Optional encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Optional. Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of the records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "Required. The namespace from which the executions should be listed. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/run.googleapis.com/v1/{+parent}/executions", +"response": { +"$ref": "ListExecutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"jobs": { +"methods": { +"create": { +"description": "Create a job.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/jobs", +"httpMethod": "POST", +"id": "run.namespaces.jobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The namespace in which the job should be created. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+parent}/jobs", +"request": { +"$ref": "Job" +}, +"response": { +"$ref": "Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a job.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/jobs/{jobsId}", +"httpMethod": "DELETE", +"id": "run.namespaces.jobs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Optional. Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Optional. Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the job to delete. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Optional. Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", +"location": "query", +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get information about a job.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/jobs/{jobsId}", +"httpMethod": "GET", +"id": "run.namespaces.jobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the job to retrieve. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}", +"response": { +"$ref": "Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List jobs.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/jobs", +"httpMethod": "GET", +"id": "run.namespaces.jobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Optional encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Optional. Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "Required. The namespace from which the jobs should be listed. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/run.googleapis.com/v1/{+parent}/jobs", +"response": { +"$ref": "ListJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"replaceJob": { +"description": "Replace a job. Only the spec and metadata labels and annotations are modifiable. After the Replace request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/jobs/{jobsId}", +"httpMethod": "PUT", +"id": "run.namespaces.jobs.replaceJob", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the job being replaced. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}", +"request": { +"$ref": "Job" +}, +"response": { +"$ref": "Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"run": { +"description": "Trigger creation of a new execution of this job.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/jobs/{jobsId}:run", +"httpMethod": "POST", +"id": "run.namespaces.jobs.run", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the job to run. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}:run", +"request": { +"$ref": "RunJobRequest" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"revisions": { +"methods": { +"delete": { +"description": "Delete a revision.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/revisions/{revisionsId}", +"httpMethod": "DELETE", +"id": "run.namespaces.revisions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the revision to delete. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/revisions/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background.", +"location": "query", +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get information about a revision.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/revisions/{revisionsId}", +"httpMethod": "GET", +"id": "run.namespaces.revisions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the revision to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/revisions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+name}", +"response": { +"$ref": "Revision" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List revisions.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/revisions", +"httpMethod": "GET", +"id": "run.namespaces.revisions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "The namespace from which the revisions should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/serving.knative.dev/v1/{+parent}/revisions", +"response": { +"$ref": "ListRevisionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"routes": { +"methods": { +"get": { +"description": "Get information about a route.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/routes/{routesId}", +"httpMethod": "GET", +"id": "run.namespaces.routes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the route to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/routes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+name}", +"response": { +"$ref": "Route" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List routes.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/routes", +"httpMethod": "GET", +"id": "run.namespaces.routes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "The namespace from which the routes should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/serving.knative.dev/v1/{+parent}/routes", +"response": { +"$ref": "ListRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"services": { +"methods": { +"create": { +"description": "Creates a new Service. Service creation will trigger a new deployment. Use GetService, and check service.status to determine if the Service is ready.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/services", +"httpMethod": "POST", +"id": "run.namespaces.services.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource's parent. In Cloud Run, it may be one of the following: * `{project_id_or_number}` * `namespaces/{project_id_or_number}` * `namespaces/{project_id_or_number}/services` * `projects/{project_id_or_number}/locations/{region}` * `projects/{project_id_or_number}/regions/{region}`", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+parent}/services", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the provided service. This will cause the Service to stop serving traffic and will delete all associated Revisions.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "DELETE", +"id": "run.namespaces.services.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The fully qualified name of the service to delete. It can be any of the following forms: * `namespaces/{project_id_or_number}/services/{service_name}` (only when the `endpoint` is regional) * `projects/{project_id_or_number}/locations/{region}/services/{service_name}` * `projects/{project_id_or_number}/regions/{region}/services/{service_name}`", +"location": "path", +"pattern": "^namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a service.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "GET", +"id": "run.namespaces.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fully qualified name of the service to retrieve. It can be any of the following forms: * `namespaces/{project_id_or_number}/services/{service_name}` (only when the `endpoint` is regional) * `projects/{project_id_or_number}/locations/{region}/services/{service_name}` * `projects/{project_id_or_number}/regions/{region}/services/{service_name}`", +"location": "path", +"pattern": "^namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+name}", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists services for the given project and region.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/services", +"httpMethod": "GET", +"id": "run.namespaces.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "Required. The parent from where the resources should be listed. In Cloud Run, it may be one of the following: * `{project_id_or_number}` * `namespaces/{project_id_or_number}` * `namespaces/{project_id_or_number}/services` * `projects/{project_id_or_number}/locations/{region}` * `projects/{project_id_or_number}/regions/{region}`", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/serving.knative.dev/v1/{+parent}/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"replaceService": { +"description": "Replaces a service. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", +"flatPath": "apis/serving.knative.dev/v1/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "PUT", +"id": "run.namespaces.services.replaceService", +"parameterOrder": [ +"name" +], +"parameters": { +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The fully qualified name of the service to replace. It can be any of the following forms: * `namespaces/{project_id_or_number}/services/{service_name}` (only when the `endpoint` is regional) * `projects/{project_id_or_number}/locations/{region}/services/{service_name}` * `projects/{project_id_or_number}/regions/{region}/services/{service_name}`", +"location": "path", +"pattern": "^namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/serving.knative.dev/v1/{+name}", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tasks": { +"methods": { +"get": { +"description": "Get information about a task.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/tasks/{tasksId}", +"httpMethod": "GET", +"id": "run.namespaces.tasks.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the task to retrieve. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+/tasks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "apis/run.googleapis.com/v1/{+name}", +"response": { +"$ref": "Task" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List tasks.", +"flatPath": "apis/run.googleapis.com/v1/namespaces/{namespacesId}/tasks", +"httpMethod": "GET", +"id": "run.namespaces.tasks.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Optional encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Optional. Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn. For example, to list all tasks of execution \"foo\" in succeeded state: `run.googleapis.com/execution=foo,run.googleapis.com/runningState=Succeeded`. Supported states are: * `Pending`: Initial state of all tasks. The task has not yet started but eventually will. * `Running`: Container instances for this task are running or will be running shortly. * `Succeeded`: No more container instances to run for the task, and the last attempt succeeded. * `Failed`: No more container instances to run for the task, and the last attempt failed. This task has run out of retry attempts. * `Cancelled`: Task was running but got stopped because its parent execution has been aborted. * `Abandoned`: The task has not yet started and never will because its parent execution has been aborted.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "Required. The namespace from which the tasks should be listed. Replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Optional. Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "apis/run.googleapis.com/v1/{+parent}/tasks", +"response": { +"$ref": "ListTasksResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"projects": { +"resources": { +"authorizeddomains": { +"methods": { +"list": { +"description": "List authorized domains.", +"flatPath": "v1/projects/{projectsId}/authorizeddomains", +"httpMethod": "GET", +"id": "run.projects.authorizeddomains.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Name of the parent Project resource. Example: `projects/myproject`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/authorizeddomains", +"response": { +"$ref": "ListAuthorizedDomainsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"locations": { +"methods": { +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "run.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"authorizeddomains": { +"methods": { +"list": { +"description": "List authorized domains.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/authorizeddomains", +"httpMethod": "GET", +"id": "run.projects.locations.authorizeddomains.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum results to return per page.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Name of the parent Project resource. Example: `projects/myproject`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/authorizeddomains", +"response": { +"$ref": "ListAuthorizedDomainsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"configurations": { +"methods": { +"get": { +"description": "Get information about a configuration.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/configurations/{configurationsId}", +"httpMethod": "GET", +"id": "run.projects.locations.configurations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the configuration to retrieve. For Cloud Run, replace {namespace_id} with the project ID or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/configurations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Configuration" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List configurations.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/configurations", +"httpMethod": "GET", +"id": "run.projects.locations.configurations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of the records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "The namespace from which the configurations should be listed. For Cloud Run, replace {namespace_id} with the project ID or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Not supported by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/configurations", +"response": { +"$ref": "ListConfigurationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"domainmappings": { +"methods": { +"create": { +"description": "Create a new domain mapping.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/domainmappings", +"httpMethod": "POST", +"id": "run.projects.locations.domainmappings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The namespace in which the domain mapping should be created. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/domainmappings", +"request": { +"$ref": "DomainMapping" +}, +"response": { +"$ref": "DomainMapping" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a domain mapping.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/domainmappings/{domainmappingsId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.domainmappings.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the domain mapping to delete. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/domainmappings/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/architecture/garbage-collection/ for more information.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get information about a domain mapping.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/domainmappings/{domainmappingsId}", +"httpMethod": "GET", +"id": "run.projects.locations.domainmappings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the domain mapping to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/domainmappings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "DomainMapping" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List all domain mappings.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/domainmappings", +"httpMethod": "GET", +"id": "run.projects.locations.domainmappings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "Required. The namespace from which the domain mappings should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/domainmappings", +"response": { +"$ref": "ListDomainMappingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"jobs": { +"methods": { +"getIamPolicy": { +"description": "Get the IAM Access Control policy currently in effect for the given job. This result does not include any inherited policies.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:getIamPolicy", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Access control policy for the specified job. Overwrites any existing policy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:setIamPolicy", +"httpMethod": "POST", +"id": "run.projects.locations.jobs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified job. There are no permissions required for making this API call.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:testIamPermissions", +"httpMethod": "POST", +"id": "run.projects.locations.jobs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "run.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "run.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "Optional. A filter for matching the completed or in-progress operations. The supported formats of *filter* are: To query for only completed operations: done:true To query for only ongoing operations: done:false Must be empty to query for all of the latest operations for the given parent project.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. To query for all of the operations for a project.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set or set to less than or equal to 0, the default page size is 100. .", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with, which is returned by a previous list call.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"wait": { +"description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:wait", +"httpMethod": "POST", +"id": "run.projects.locations.operations.wait", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to wait on.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:wait", +"request": { +"$ref": "GoogleLongrunningWaitOperationRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"revisions": { +"methods": { +"delete": { +"description": "Delete a revision.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/revisions/{revisionsId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.revisions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Cloud Run currently ignores this parameter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the revision to delete. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/revisions/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get information about a revision.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/revisions/{revisionsId}", +"httpMethod": "GET", +"id": "run.projects.locations.revisions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the revision to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/revisions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Revision" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List revisions.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/revisions", +"httpMethod": "GET", +"id": "run.projects.locations.revisions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "The namespace from which the revisions should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/revisions", +"response": { +"$ref": "ListRevisionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"routes": { +"methods": { +"get": { +"description": "Get information about a route.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/routes/{routesId}", +"httpMethod": "GET", +"id": "run.projects.locations.routes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the route to retrieve. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/routes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Route" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List routes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/routes", +"httpMethod": "GET", +"id": "run.projects.locations.routes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Optional. Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "Optional. The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "The namespace from which the routes should be listed. For Cloud Run (fully managed), replace {namespace} with the project ID or number. It takes the form namespaces/{namespace}. For example: namespaces/PROJECT_ID", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/routes", +"response": { +"$ref": "ListRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"services": { +"methods": { +"create": { +"description": "Creates a new Service. Service creation will trigger a new deployment. Use GetService, and check service.status to determine if the Service is ready.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services", +"httpMethod": "POST", +"id": "run.projects.locations.services.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource's parent. In Cloud Run, it may be one of the following: * `{project_id_or_number}` * `namespaces/{project_id_or_number}` * `namespaces/{project_id_or_number}/services` * `projects/{project_id_or_number}/locations/{region}` * `projects/{project_id_or_number}/regions/{region}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/services", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the provided service. This will cause the Service to stop serving traffic and will delete all associated Revisions.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.services.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"apiVersion": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"kind": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The fully qualified name of the service to delete. It can be any of the following forms: * `namespaces/{project_id_or_number}/services/{service_name}` (only when the `endpoint` is regional) * `projects/{project_id_or_number}/locations/{region}/services/{service_name}` * `projects/{project_id_or_number}/regions/{region}/services/{service_name}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"propagationPolicy": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Status" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", +"httpMethod": "GET", +"id": "run.projects.locations.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The fully qualified name of the service to retrieve. It can be any of the following forms: * `namespaces/{project_id_or_number}/services/{service_name}` (only when the `endpoint` is regional) * `projects/{project_id_or_number}/locations/{region}/services/{service_name}` * `projects/{project_id_or_number}/regions/{region}/services/{service_name}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the IAM Access Control policy currently in effect for the given Cloud Run service. This result does not include any inherited policies.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:getIamPolicy", +"httpMethod": "GET", +"id": "run.projects.locations.services.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists services for the given project and region.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services", +"httpMethod": "GET", +"id": "run.projects.locations.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"continue": { +"description": "Encoded string to continue paging.", +"location": "query", +"type": "string" +}, +"fieldSelector": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"includeUninitialized": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "boolean" +}, +"labelSelector": { +"description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", +"location": "query", +"type": "string" +}, +"limit": { +"description": "The maximum number of records that should be returned.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"parent": { +"description": "Required. The parent from where the resources should be listed. In Cloud Run, it may be one of the following: * `{project_id_or_number}` * `namespaces/{project_id_or_number}` * `namespaces/{project_id_or_number}/services` * `projects/{project_id_or_number}/locations/{region}` * `projects/{project_id_or_number}/regions/{region}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"resourceVersion": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "string" +}, +"watch": { +"description": "Not supported, and ignored by Cloud Run.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"replaceService": { +"description": "Replaces a service. Only the spec and metadata labels and annotations are modifiable. After the Update request, Cloud Run will work to make the 'status' match the requested 'spec'. May provide metadata.resourceVersion to enforce update from last read for optimistic concurrency control.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", +"httpMethod": "PUT", +"id": "run.projects.locations.services.replaceService", +"parameterOrder": [ +"name" +], +"parameters": { +"dryRun": { +"description": "Indicates that the server should validate the request and populate default values without persisting the request. Supported values: `all`", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The fully qualified name of the service to replace. It can be any of the following forms: * `namespaces/{project_id_or_number}/services/{service_name}` (only when the `endpoint` is regional) * `projects/{project_id_or_number}/locations/{region}/services/{service_name}` * `projects/{project_id_or_number}/regions/{region}/services/{service_name}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Access control policy for the specified Service. Overwrites any existing policy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:setIamPolicy", +"httpMethod": "POST", +"id": "run.projects.locations.services.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:testIamPermissions", +"httpMethod": "POST", +"id": "run.projects.locations.services.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://run.googleapis.com/", +"schemas": { +"Addressable": { +"description": "Information for connecting over HTTP(s).", +"id": "Addressable", +"properties": { +"url": { +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"AuthorizedDomain": { +"description": "A domain that a user has been authorized to administer. To authorize use of a domain, verify ownership via [Search Console](https://search.google.com/search-console/welcome).", +"id": "AuthorizedDomain", +"properties": { +"id": { +"description": "Relative name of the domain authorized for use. Example: `example.com`.", +"type": "string" +}, +"name": { +"deprecated": true, +"description": "Deprecated Read only. Full path to the `AuthorizedDomain` resource in the API. Example: `projects/myproject/authorizedDomains/example.com`.", +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CSIVolumeSource": { +"description": "Storage volume source using the Container Storage Interface.", +"id": "CSIVolumeSource", +"properties": { +"driver": { +"description": "name of the CSI driver for the requested storage system. Cloud Run supports the following drivers: * gcsfuse.run.googleapis.com : Mount a Cloud Storage Bucket as a volume.", +"type": "string" +}, +"readOnly": { +"description": "If true, mount the volume as read only. Defaults to false.", +"type": "boolean" +}, +"volumeAttributes": { +"additionalProperties": { +"type": "string" +}, +"description": "stores driver specific attributes. For Google Cloud Storage volumes, the following attributes are supported: * bucketName: the name of the Cloud Storage bucket to mount. The Cloud Run Service identity must have access to this bucket.", +"type": "object" +} +}, +"type": "object" +}, +"CancelExecutionRequest": { +"description": "Request message for cancelling an execution.", +"id": "CancelExecutionRequest", +"properties": {}, +"type": "object" +}, +"ConfigMapEnvSource": { +"description": "Not supported by Cloud Run. ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", +"id": "ConfigMapEnvSource", +"properties": { +"localObjectReference": { +"$ref": "LocalObjectReference", +"deprecated": true, +"description": "This field should not be used directly as it is meant to be inlined directly into the message. Use the \"name\" field instead." +}, +"name": { +"description": "The ConfigMap to select from.", +"type": "string" +}, +"optional": { +"description": "Specify whether the ConfigMap must be defined.", +"type": "boolean" +} +}, +"type": "object" +}, +"ConfigMapKeySelector": { +"description": "Not supported by Cloud Run.", +"id": "ConfigMapKeySelector", +"properties": { +"key": { +"description": "Required. Not supported by Cloud Run.", +"type": "string" +}, +"localObjectReference": { +"$ref": "LocalObjectReference", +"deprecated": true, +"description": "Not supported by Cloud Run." +}, +"name": { +"description": "Required. Not supported by Cloud Run.", +"type": "string" +}, +"optional": { +"description": "Not supported by Cloud Run.", +"type": "boolean" +} +}, +"type": "object" +}, +"ConfigMapVolumeSource": { +"description": "Not supported by Cloud Run. Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths.", +"id": "ConfigMapVolumeSource", +"properties": { +"defaultMode": { +"description": "(Optional) Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0644. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", +"format": "int32", +"type": "integer" +}, +"items": { +"description": "(Optional) If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified that is not present in the Secret, the volume setup will error unless it is marked optional.", +"items": { +"$ref": "KeyToPath" +}, +"type": "array" +}, +"name": { +"description": "Name of the config.", +"type": "string" +}, +"optional": { +"description": "(Optional) Specify whether the Secret or its keys must be defined.", +"type": "boolean" +} +}, +"type": "object" +}, +"Configuration": { +"description": "Configuration represents the \"floating HEAD\" of a linear history of Revisions, and optionally how the containers those revisions reference are built. Users create new Revisions by updating the Configuration's spec. The \"latest created\" revision's name is available under status, as is the \"latest ready\" revision's name.", +"id": "Configuration", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"serving.knative.dev/v1\".", +"type": "string" +}, +"kind": { +"description": "The kind of resource, in this case always \"Configuration\".", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Metadata associated with this Configuration, including name, namespace, labels, and annotations." +}, +"spec": { +"$ref": "ConfigurationSpec", +"description": "Spec holds the desired state of the Configuration (from the client)." +}, +"status": { +"$ref": "ConfigurationStatus", +"description": "Status communicates the observed state of the Configuration (from the controller)." +} +}, +"type": "object" +}, +"ConfigurationSpec": { +"description": "ConfigurationSpec holds the desired state of the Configuration (from the client).", +"id": "ConfigurationSpec", +"properties": { +"template": { +"$ref": "RevisionTemplate", +"description": "Template holds the latest specification for the Revision to be stamped out." +} +}, +"type": "object" +}, +"ConfigurationStatus": { +"description": "ConfigurationStatus communicates the observed state of the Configuration (from the controller).", +"id": "ConfigurationStatus", +"properties": { +"conditions": { +"description": "Conditions communicate information about ongoing/complete reconciliation processes that bring the \"spec\" inline with the observed state of the world.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"latestCreatedRevisionName": { +"description": "LatestCreatedRevisionName is the last revision that was created from this Configuration. It might not be ready yet, so for the latest ready revision, use LatestReadyRevisionName.", +"type": "string" +}, +"latestReadyRevisionName": { +"description": "LatestReadyRevisionName holds the name of the latest Revision stamped out from this Configuration that has had its \"Ready\" condition become \"True\".", +"type": "string" +}, +"observedGeneration": { +"description": "ObservedGeneration is the 'Generation' of the Configuration that was last processed by the controller. The observed generation is updated even if the controller failed to process the spec and create the Revision. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation, and the Ready condition's status is True or False.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Container": { +"description": "A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments may be supplied by the system to the container at runtime.", +"id": "Container", +"properties": { +"args": { +"description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.", +"items": { +"type": "string" +}, +"type": "array" +}, +"command": { +"description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references are not supported in Cloud Run.", +"items": { +"type": "string" +}, +"type": "array" +}, +"env": { +"description": "List of environment variables to set in the container. EnvVar with duplicate names are generally allowed; if referencing a secret, the name must be unique for the container. For non-secret EnvVar names, the Container will only get the last-declared one.", +"items": { +"$ref": "EnvVar" +}, +"type": "array" +}, +"envFrom": { +"description": "Not supported by Cloud Run.", +"items": { +"$ref": "EnvFromSource" +}, +"type": "array" +}, +"image": { +"description": "Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.", +"type": "string" +}, +"imagePullPolicy": { +"description": "Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.", +"type": "string" +}, +"livenessProbe": { +"$ref": "Probe", +"description": "Periodic probe of container liveness. Container will be restarted if the probe fails." +}, +"name": { +"description": "Name of the container specified as a DNS_LABEL (RFC 1123).", +"type": "string" +}, +"ports": { +"description": "List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on.", +"items": { +"$ref": "ContainerPort" +}, +"type": "array" +}, +"readinessProbe": { +"$ref": "Probe", +"description": "Not supported by Cloud Run." +}, +"resources": { +"$ref": "ResourceRequirements", +"description": "Compute Resources required by this container." +}, +"securityContext": { +"$ref": "SecurityContext", +"description": "Not supported by Cloud Run." +}, +"startupProbe": { +"$ref": "Probe", +"description": "Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not receive traffic if the probe fails. If not provided, a default startup probe with TCP socket action is used." +}, +"terminationMessagePath": { +"description": "Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log.", +"type": "string" +}, +"terminationMessagePolicy": { +"description": "Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", +"type": "string" +}, +"volumeMounts": { +"description": "Volume to mount into the container's filesystem. Only supports SecretVolumeSources. Pod volumes to mount into the container's filesystem.", +"items": { +"$ref": "VolumeMount" +}, +"type": "array" +}, +"workingDir": { +"description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.", +"type": "string" +} +}, +"type": "object" +}, +"ContainerOverride": { +"description": "Per container override specification.", +"id": "ContainerOverride", +"properties": { +"args": { +"description": "Arguments to the entrypoint. The specified arguments replace and override any existing entrypoint arguments. Must be empty if `clear_args` is set to true.", +"items": { +"type": "string" +}, +"type": "array" +}, +"clearArgs": { +"description": "Optional. Set to True to clear all existing arguments.", +"type": "boolean" +}, +"env": { +"description": "List of environment variables to set in the container. All specified environment variables are merged with existing environment variables. When the specified environment variables exist, these values override any existing values.", +"items": { +"$ref": "EnvVar" +}, +"type": "array" +}, +"name": { +"description": "The name of the container specified as a DNS_LABEL.", +"type": "string" +} +}, +"type": "object" +}, +"ContainerPort": { +"description": "ContainerPort represents a network port in a single container.", +"id": "ContainerPort", +"properties": { +"containerPort": { +"description": "Port number the container listens on. If present, this must be a valid port number, 0 < x < 65536. If not present, it will default to port 8080. For more information, see https://cloud.google.com/run/docs/container-contract#port", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "If specified, used to specify which protocol to use. Allowed values are \"http1\" and \"h2c\".", +"type": "string" +}, +"protocol": { +"description": "Protocol for port. Must be \"TCP\". Defaults to \"TCP\".", +"type": "string" +} +}, +"type": "object" +}, +"DomainMapping": { +"description": "Resource to hold the state and status of a user's domain mapping. NOTE: This resource is currently in Beta.", +"id": "DomainMapping", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"domains.cloudrun.com/v1\".", +"type": "string" +}, +"kind": { +"description": "The kind of resource, in this case \"DomainMapping\".", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Metadata associated with this BuildTemplate." +}, +"spec": { +"$ref": "DomainMappingSpec", +"description": "The spec for this DomainMapping." +}, +"status": { +"$ref": "DomainMappingStatus", +"description": "The current status of the DomainMapping." +} +}, +"type": "object" +}, +"DomainMappingSpec": { +"description": "The desired state of the Domain Mapping.", +"id": "DomainMappingSpec", +"properties": { +"certificateMode": { +"description": "The mode of the certificate.", +"enum": [ +"CERTIFICATE_MODE_UNSPECIFIED", +"NONE", +"AUTOMATIC" +], +"enumDescriptions": [ +"", +"Do not provision an HTTPS certificate.", +"Automatically provisions an HTTPS certificate via GoogleCA." +], +"type": "string" +}, +"forceOverride": { +"description": "If set, the mapping will override any mapping set before this spec was set. It is recommended that the user leaves this empty to receive an error warning about a potential conflict and only set it once the respective UI has given such a warning.", +"type": "boolean" +}, +"routeName": { +"description": "The name of the Knative Route that this DomainMapping applies to. The route must exist.", +"type": "string" +} +}, +"type": "object" +}, +"DomainMappingStatus": { +"description": "The current state of the Domain Mapping.", +"id": "DomainMappingStatus", +"properties": { +"conditions": { +"description": "Array of observed DomainMappingConditions, indicating the current state of the DomainMapping.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"mappedRouteName": { +"description": "The name of the route that the mapping currently points to.", +"type": "string" +}, +"observedGeneration": { +"description": "ObservedGeneration is the 'Generation' of the DomainMapping that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False.", +"format": "int32", +"type": "integer" +}, +"resourceRecords": { +"description": "The resource records required to configure this domain mapping. These records must be added to the domain's DNS configuration in order to serve the application via this domain mapping.", +"items": { +"$ref": "ResourceRecord" +}, +"type": "array" +}, +"url": { +"description": "Optional. Not supported by Cloud Run.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EmptyDirVolumeSource": { +"description": "In memory (tmpfs) ephemeral storage. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs).", +"id": "EmptyDirVolumeSource", +"properties": { +"medium": { +"description": "The medium on which the data is stored. The default is \"\" which means to use the node's default medium. Must be an empty string (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir", +"type": "string" +}, +"sizeLimit": { +"description": "Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers. The default is nil which means that the limit is undefined. More info: https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. Info in Kubernetes: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir", +"type": "string" +} +}, +"type": "object" +}, +"EnvFromSource": { +"description": "Not supported by Cloud Run. EnvFromSource represents the source of a set of ConfigMaps", +"id": "EnvFromSource", +"properties": { +"configMapRef": { +"$ref": "ConfigMapEnvSource", +"description": "The ConfigMap to select from" +}, +"prefix": { +"description": "An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", +"type": "string" +}, +"secretRef": { +"$ref": "SecretEnvSource", +"description": "The Secret to select from" +} +}, +"type": "object" +}, +"EnvVar": { +"description": "EnvVar represents an environment variable present in a Container.", +"id": "EnvVar", +"properties": { +"name": { +"description": "Required. Name of the environment variable.", +"type": "string" +}, +"value": { +"description": "Value of the environment variable. Defaults to \"\". Variable references are not supported in Cloud Run.", +"type": "string" +}, +"valueFrom": { +"$ref": "EnvVarSource", +"description": "Source for the environment variable's value. Only supports secret_key_ref. Cannot be used if value is not empty." +} +}, +"type": "object" +}, +"EnvVarSource": { +"description": "EnvVarSource represents a source for the value of an EnvVar.", +"id": "EnvVarSource", +"properties": { +"configMapKeyRef": { +"$ref": "ConfigMapKeySelector", +"description": "Not supported by Cloud Run. Not supported in Cloud Run." +}, +"secretKeyRef": { +"$ref": "SecretKeySelector", +"description": "Selects a key (version) of a secret in Secret Manager." +} +}, +"type": "object" +}, +"ExecAction": { +"description": "Not supported by Cloud Run. ExecAction describes a \"run in container\" action.", +"id": "ExecAction", +"properties": { +"command": { +"description": "Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Execution": { +"description": "Execution represents the configuration of a single execution. An execution is an immutable resource that references a container image which is run to completion.", +"id": "Execution", +"properties": { +"apiVersion": { +"description": "Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", +"type": "string" +}, +"kind": { +"description": "Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Optional. Standard object's metadata." +}, +"spec": { +"$ref": "ExecutionSpec", +"description": "Optional. Specification of the desired behavior of an execution." +}, +"status": { +"$ref": "ExecutionStatus", +"description": "Output only. Current status of an execution.", +"readOnly": true +} +}, +"type": "object" +}, +"ExecutionReference": { +"description": "Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.", +"id": "ExecutionReference", +"properties": { +"completionTimestamp": { +"description": "Optional. Completion timestamp of the execution.", +"format": "google-datetime", +"type": "string" +}, +"creationTimestamp": { +"description": "Optional. Creation timestamp of the execution.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Optional. Name of the execution.", +"type": "string" +} +}, +"type": "object" +}, +"ExecutionSpec": { +"description": "ExecutionSpec describes how the execution will look.", +"id": "ExecutionSpec", +"properties": { +"parallelism": { +"description": "Optional. Specifies the maximum desired number of tasks the execution should run at given time. Must be <= task_count. When the job is run, if this field is 0 or unset, the maximum possible value will be used for that execution. The actual number of tasks running in steady state will be less than this number when there are fewer tasks waiting to be completed, i.e. when the work left to do is less than max parallelism.", +"format": "int32", +"type": "integer" +}, +"taskCount": { +"description": "Optional. Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution. Defaults to 1.", +"format": "int32", +"type": "integer" +}, +"template": { +"$ref": "TaskTemplateSpec", +"description": "Optional. The template used to create tasks for this execution." +} +}, +"type": "object" +}, +"ExecutionStatus": { +"description": "ExecutionStatus represents the current state of an Execution.", +"id": "ExecutionStatus", +"properties": { +"cancelledCount": { +"description": "Optional. The number of tasks which reached phase Cancelled.", +"format": "int32", +"type": "integer" +}, +"completionTime": { +"description": "Optional. Represents the time that the execution was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional", +"format": "google-datetime", +"type": "string" +}, +"conditions": { +"description": "Optional. Conditions communicate information about ongoing/complete reconciliation processes that bring the \"spec\" inline with the observed state of the world. Execution-specific conditions include: * `ResourcesAvailable`: `True` when underlying resources have been provisioned. * `Started`: `True` when the execution has started to execute. * `Completed`: `True` when the execution has succeeded. `False` when the execution has failed.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"failedCount": { +"description": "Optional. The number of tasks which reached phase Failed.", +"format": "int32", +"type": "integer" +}, +"logUri": { +"description": "Optional. URI where logs for this execution can be found in Cloud Console.", +"type": "string" +}, +"observedGeneration": { +"description": "Optional. The 'generation' of the execution that was last processed by the controller.", +"format": "int32", +"type": "integer" +}, +"retriedCount": { +"description": "Optional. The number of tasks which have retried at least once.", +"format": "int32", +"type": "integer" +}, +"runningCount": { +"description": "Optional. The number of actively running tasks.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Optional. Represents the time that the execution started to run. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", +"format": "google-datetime", +"type": "string" +}, +"succeededCount": { +"description": "Optional. The number of tasks which reached phase Succeeded.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ExecutionTemplateSpec": { +"description": "ExecutionTemplateSpec describes the metadata and spec an Execution should have when created from a job.", +"id": "ExecutionTemplateSpec", +"properties": { +"metadata": { +"$ref": "ObjectMeta", +"description": "Optional. Optional metadata for this Execution, including labels and annotations. The following annotation keys set properties of the created execution: * `run.googleapis.com/cloudsql-instances` sets Cloud SQL connections. Multiple values should be comma separated. * `run.googleapis.com/vpc-access-connector` sets a Serverless VPC Access connector. * `run.googleapis.com/vpc-access-egress` sets VPC egress. Supported values are `all-traffic`, `all` (deprecated), and `private-ranges-only`. `all-traffic` and `all` provide the same functionality. `all` is deprecated but will continue to be supported. Prefer `all-traffic`." +}, +"spec": { +"$ref": "ExecutionSpec", +"description": "Required. ExecutionSpec holds the desired configuration for executions of this job." +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GRPCAction": { +"description": "GRPCAction describes an action involving a GRPC port.", +"id": "GRPCAction", +"properties": { +"port": { +"description": "Port number of the gRPC service. Number must be in the range 1 to 65535.", +"format": "int32", +"type": "integer" +}, +"service": { +"description": "Service is the name of the service to place in the gRPC HealthCheckRequest. If this is not specified, the default behavior is defined by gRPC.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV1Condition": { +"description": "Conditions show the status of reconciliation progress on a given resource. Most resource use a top-level condition type \"Ready\" or \"Completed\" to show overall status with other conditions to checkpoint each stage of reconciliation. Note that if metadata.Generation does not equal status.ObservedGeneration, the conditions shown may not be relevant for the current spec.", +"id": "GoogleCloudRunV1Condition", +"properties": { +"lastTransitionTime": { +"description": "Optional. Last time the condition transitioned from one status to another.", +"format": "google-datetime", +"type": "string" +}, +"message": { +"description": "Optional. Human readable message indicating details about the current status.", +"type": "string" +}, +"reason": { +"description": "Optional. One-word CamelCase reason for the condition's last transition. These are intended to be stable, unique values which the client may use to trigger error handling logic, whereas messages which may be changed later by the server.", +"type": "string" +}, +"severity": { +"description": "Optional. How to interpret this condition. One of Error, Warning, or Info. Conditions of severity Info do not contribute to resource readiness.", +"type": "string" +}, +"status": { +"description": "Status of the condition, one of True, False, Unknown.", +"type": "string" +}, +"type": { +"description": "type is used to communicate the status of the reconciliation process. Types common to all resources include: * \"Ready\" or \"Completed\": True when the Resource is ready.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ApprovalConfig": { +"description": "ApprovalConfig describes configuration for manual approval of a build.", +"id": "GoogleDevtoolsCloudbuildV1ApprovalConfig", +"properties": { +"approvalRequired": { +"description": "Whether or not approval is needed. If this is set on a build, it will become pending when created, and will need to be explicitly approved to start.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ApprovalResult": { +"description": "ApprovalResult describes the decision and associated metadata of a manual approval of a build.", +"id": "GoogleDevtoolsCloudbuildV1ApprovalResult", +"properties": { +"approvalTime": { +"description": "Output only. The time when the approval decision was made.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"approverAccount": { +"description": "Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.", +"readOnly": true, +"type": "string" +}, +"comment": { +"description": "Optional. An optional comment for this manual approval result.", +"type": "string" +}, +"decision": { +"description": "Required. The decision of this manual approval.", +"enum": [ +"DECISION_UNSPECIFIED", +"APPROVED", +"REJECTED" +], +"enumDescriptions": [ +"Default enum type. This should not be used.", +"Build is approved.", +"Build is rejected." +], +"type": "string" +}, +"url": { +"description": "Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ArtifactObjects": { +"description": "Files in the workspace to upload to Cloud Storage upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1ArtifactObjects", +"properties": { +"location": { +"description": "Cloud Storage bucket and optional object path, in the form \"gs://bucket/path/to/somewhere/\". (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.", +"type": "string" +}, +"paths": { +"description": "Path globs used to match files in the build's workspace.", +"items": { +"type": "string" +}, +"type": "array" +}, +"timing": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing all artifact objects.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Artifacts": { +"description": "Artifacts produced by a build that should be uploaded upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1Artifacts", +"properties": { +"images": { +"description": "A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.", +"items": { +"type": "string" +}, +"type": "array" +}, +"mavenArtifacts": { +"description": "A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps. Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any artifacts fail to be pushed, the build is marked FAILURE.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1MavenArtifact" +}, +"type": "array" +}, +"npmPackages": { +"description": "A list of npm packages to be uploaded to Artifact Registry upon successful completion of all build steps. Npm packages in the specified paths will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any packages fail to be pushed, the build is marked FAILURE.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1NpmPackage" +}, +"type": "array" +}, +"objects": { +"$ref": "GoogleDevtoolsCloudbuildV1ArtifactObjects", +"description": "A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE." +}, +"pythonPackages": { +"description": "A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps. The build service account credentials will be used to perform the upload. If any objects fail to be pushed, the build is marked FAILURE.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1PythonPackage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Build": { +"description": "A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.", +"id": "GoogleDevtoolsCloudbuildV1Build", +"properties": { +"approval": { +"$ref": "GoogleDevtoolsCloudbuildV1BuildApproval", +"description": "Output only. Describes this build's approval configuration, status, and result.", +"readOnly": true +}, +"artifacts": { +"$ref": "GoogleDevtoolsCloudbuildV1Artifacts", +"description": "Artifacts produced by the build that should be uploaded upon successful completion of all build steps." +}, +"availableSecrets": { +"$ref": "GoogleDevtoolsCloudbuildV1Secrets", +"description": "Secrets and secret environment variables." +}, +"buildTriggerId": { +"description": "Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. Time at which the request to create the build was received.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"failureInfo": { +"$ref": "GoogleDevtoolsCloudbuildV1FailureInfo", +"description": "Output only. Contains information about the build when status=FAILURE.", +"readOnly": true +}, +"finishTime": { +"description": "Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. Unique identifier of the build.", +"readOnly": true, +"type": "string" +}, +"images": { +"description": "A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logUrl": { +"description": "Output only. URL to logs for this build in Google Cloud Console.", +"readOnly": true, +"type": "string" +}, +"logsBucket": { +"description": "Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", +"type": "string" +}, +"name": { +"description": "Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.", +"readOnly": true, +"type": "string" +}, +"options": { +"$ref": "GoogleDevtoolsCloudbuildV1BuildOptions", +"description": "Special options for this build." +}, +"projectId": { +"description": "Output only. ID of the project.", +"readOnly": true, +"type": "string" +}, +"queueTtl": { +"description": "TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.", +"format": "google-duration", +"type": "string" +}, +"results": { +"$ref": "GoogleDevtoolsCloudbuildV1Results", +"description": "Output only. Results of the build.", +"readOnly": true +}, +"secrets": { +"description": "Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Secret" +}, +"type": "array" +}, +"serviceAccount": { +"description": "IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. ", +"type": "string" +}, +"source": { +"$ref": "GoogleDevtoolsCloudbuildV1Source", +"description": "The location of the source files to build." +}, +"sourceProvenance": { +"$ref": "GoogleDevtoolsCloudbuildV1SourceProvenance", +"description": "Output only. A permanent fixed identifier for source.", +"readOnly": true +}, +"startTime": { +"description": "Output only. Time at which execution of the build was started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Output only. Status of the build.", +"enum": [ +"STATUS_UNKNOWN", +"PENDING", +"QUEUED", +"WORKING", +"SUCCESS", +"FAILURE", +"INTERNAL_ERROR", +"TIMEOUT", +"CANCELLED", +"EXPIRED" +], +"enumDescriptions": [ +"Status of the build is unknown.", +"Build has been created and is pending execution and queuing. It has not been queued.", +"Build or step is queued; work has not yet begun.", +"Build or step is being executed.", +"Build or step finished successfully.", +"Build or step failed to complete successfully.", +"Build or step failed due to an internal cause.", +"Build or step took longer than was allowed.", +"Build or step was canceled by a user.", +"Build was enqueued for longer than the value of `queue_ttl`." +], +"readOnly": true, +"type": "string" +}, +"statusDetail": { +"description": "Output only. Customer-readable message about the current status.", +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Required. The operations to be performed on the workspace.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1BuildStep" +}, +"type": "array" +}, +"substitutions": { +"additionalProperties": { +"type": "string" +}, +"description": "Substitutions data for `Build` resource.", +"type": "object" +}, +"tags": { +"description": "Tags for annotation of a `Build`. These are not docker tags.", +"items": { +"type": "string" +}, +"type": "array" +}, +"timeout": { +"description": "Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes.", +"format": "google-duration", +"type": "string" +}, +"timing": { +"additionalProperties": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan" +}, +"description": "Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to push all artifacts including docker images and non docker artifacts. * FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.", +"readOnly": true, +"type": "object" +}, +"warnings": { +"description": "Output only. Non-fatal problems encountered during the execution of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Warning" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildApproval": { +"description": "BuildApproval describes a build's approval configuration, state, and result.", +"id": "GoogleDevtoolsCloudbuildV1BuildApproval", +"properties": { +"config": { +"$ref": "GoogleDevtoolsCloudbuildV1ApprovalConfig", +"description": "Output only. Configuration for manual approval of this build.", +"readOnly": true +}, +"result": { +"$ref": "GoogleDevtoolsCloudbuildV1ApprovalResult", +"description": "Output only. Result of manual approval for this Build.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of this build's approval.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"APPROVED", +"REJECTED", +"CANCELLED" +], +"enumDescriptions": [ +"Default enum type. This should not be used.", +"Build approval is pending.", +"Build approval has been approved.", +"Build approval has been rejected.", +"Build was cancelled while it was still pending approval." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildOperationMetadata": { +"description": "Metadata for build operations.", +"id": "GoogleDevtoolsCloudbuildV1BuildOperationMetadata", +"properties": { +"build": { +"$ref": "GoogleDevtoolsCloudbuildV1Build", +"description": "The build that the operation is tracking." +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildOptions": { +"description": "Optional arguments to enable specific features of builds.", +"id": "GoogleDevtoolsCloudbuildV1BuildOptions", +"properties": { +"automapSubstitutions": { +"description": "Option to include built-in and custom substitutions as env variables for all build steps.", +"type": "boolean" +}, +"defaultLogsBucketBehavior": { +"description": "Optional. Option to specify how default logs buckets are setup.", +"enum": [ +"DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED", +"REGIONAL_USER_OWNED_BUCKET" +], +"enumDescriptions": [ +"Unspecified.", +"Bucket is located in user-owned project in the same region as the build. The builder service account must have access to create and write to Cloud Storage buckets in the build project." +], +"type": "string" +}, +"diskSizeGb": { +"description": "Requested disk size for the VM that runs the build. Note that this is *NOT* \"disk free\"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error.", +"format": "int64", +"type": "string" +}, +"dynamicSubstitutions": { +"description": "Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.", +"type": "boolean" +}, +"env": { +"description": "A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\" being given the value \"VALUE\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"logStreamingOption": { +"description": "Option to define build log streaming behavior to Cloud Storage.", +"enum": [ +"STREAM_DEFAULT", +"STREAM_ON", +"STREAM_OFF" +], +"enumDescriptions": [ +"Service may automatically determine build log streaming behavior.", +"Build logs should be streamed to Cloud Storage.", +"Build logs should not be streamed to Cloud Storage; they will be written when the build is completed." +], +"type": "string" +}, +"logging": { +"description": "Option to specify the logging mode, which determines if and where build logs are stored.", +"enum": [ +"LOGGING_UNSPECIFIED", +"LEGACY", +"GCS_ONLY", +"STACKDRIVER_ONLY", +"CLOUD_LOGGING_ONLY", +"NONE" +], +"enumDeprecated": [ +false, +false, +false, +true, +false, +false +], +"enumDescriptions": [ +"The service determines the logging mode. The default is `LEGACY`. Do not rely on the default logging behavior as it may change in the future.", +"Build logs are stored in Cloud Logging and Cloud Storage.", +"Build logs are stored in Cloud Storage.", +"This option is the same as CLOUD_LOGGING_ONLY.", +"Build logs are stored in Cloud Logging. Selecting this option will not allow [logs streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log).", +"Turn off all logging. No build logs will be captured." +], +"type": "string" +}, +"machineType": { +"description": "Compute Engine machine type on which to run the build.", +"enum": [ +"UNSPECIFIED", +"N1_HIGHCPU_8", +"N1_HIGHCPU_32", +"E2_HIGHCPU_8", +"E2_HIGHCPU_32", +"E2_MEDIUM" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false +], +"enumDescriptions": [ +"Standard machine type.", +"Highcpu machine with 8 CPUs.", +"Highcpu machine with 32 CPUs.", +"Highcpu e2 machine with 8 CPUs.", +"Highcpu e2 machine with 32 CPUs.", +"E2 machine with 1 CPU." +], +"type": "string" +}, +"pool": { +"$ref": "GoogleDevtoolsCloudbuildV1PoolOption", +"description": "Optional. Specification for execution on a `WorkerPool`. See [running builds in a private pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) for more information." +}, +"requestedVerifyOption": { +"description": "Requested verifiability options.", +"enum": [ +"NOT_VERIFIED", +"VERIFIED" +], +"enumDescriptions": [ +"Not a verifiable build (the default).", +"Build must be verified." +], +"type": "string" +}, +"secretEnv": { +"description": "A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. These variables will be available to all build steps in this build.", +"items": { +"type": "string" +}, +"type": "array" +}, +"sourceProvenanceHash": { +"description": "Requested hash for SourceProvenance.", +"items": { +"enum": [ +"NONE", +"SHA256", +"MD5", +"SHA512" +], +"enumDescriptions": [ +"No hash requested.", +"Use a sha256 hash.", +"Use a md5 hash.", +"Use a sha512 hash." +], +"type": "string" +}, +"type": "array" +}, +"substitutionOption": { +"description": "Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.", +"enum": [ +"MUST_MATCH", +"ALLOW_LOOSE" +], +"enumDescriptions": [ +"Fails the build if error in substitutions checks, like missing a substitution in the template or in the map.", +"Do not fail the build if error in substitutions checks." +], +"type": "string" +}, +"volumes": { +"description": "Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Volume" +}, +"type": "array" +}, +"workerPool": { +"deprecated": true, +"description": "This field deprecated; please use `pool.name` instead.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildStep": { +"description": "A step in the build pipeline.", +"id": "GoogleDevtoolsCloudbuildV1BuildStep", +"properties": { +"allowExitCodes": { +"description": "Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"allowFailure": { +"description": "Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field.", +"type": "boolean" +}, +"args": { +"description": "A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.", +"items": { +"type": "string" +}, +"type": "array" +}, +"automapSubstitutions": { +"description": "Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption.", +"type": "boolean" +}, +"dir": { +"description": "Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution.", +"type": "string" +}, +"entrypoint": { +"description": "Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used.", +"type": "string" +}, +"env": { +"description": "A list of environment variable definitions to be used when running a step. The elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\" being given the value \"VALUE\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"exitCode": { +"description": "Output only. Return code from running the step.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"id": { +"description": "Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.", +"type": "string" +}, +"name": { +"description": "Required. The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like \"ubuntu\", \"debian\", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.", +"type": "string" +}, +"pullTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pulling this build step's builder image only.", +"readOnly": true +}, +"script": { +"description": "A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.", +"type": "string" +}, +"secretEnv": { +"description": "A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"status": { +"description": "Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.", +"enum": [ +"STATUS_UNKNOWN", +"PENDING", +"QUEUED", +"WORKING", +"SUCCESS", +"FAILURE", +"INTERNAL_ERROR", +"TIMEOUT", +"CANCELLED", +"EXPIRED" +], +"enumDescriptions": [ +"Status of the build is unknown.", +"Build has been created and is pending execution and queuing. It has not been queued.", +"Build or step is queued; work has not yet begun.", +"Build or step is being executed.", +"Build or step finished successfully.", +"Build or step failed to complete successfully.", +"Build or step failed due to an internal cause.", +"Build or step took longer than was allowed.", +"Build or step was canceled by a user.", +"Build was enqueued for longer than the value of `queue_ttl`." +], +"readOnly": true, +"type": "string" +}, +"timeout": { +"description": "Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.", +"format": "google-duration", +"type": "string" +}, +"timing": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for executing this build step.", +"readOnly": true +}, +"volumes": { +"description": "List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Volume" +}, +"type": "array" +}, +"waitFor": { +"description": "The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuiltImage": { +"description": "An image built by the pipeline.", +"id": "GoogleDevtoolsCloudbuildV1BuiltImage", +"properties": { +"digest": { +"description": "Docker Registry 2.0 digest.", +"type": "string" +}, +"name": { +"description": "Name used to push the container image to Google Container Registry, as presented to `docker push`.", +"type": "string" +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified image.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ConnectedRepository": { +"description": "Location of the source in a 2nd-gen Google Cloud Build repository resource.", +"id": "GoogleDevtoolsCloudbuildV1ConnectedRepository", +"properties": { +"dir": { +"description": "Directory, relative to the source root, in which to run the build.", +"type": "string" +}, +"repository": { +"description": "Required. Name of the Google Cloud Build repository, formatted as `projects/*/locations/*/connections/*/repositories/*`.", +"type": "string" +}, +"revision": { +"description": "The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1FailureInfo": { +"description": "A fatal problem encountered during the execution of the build.", +"id": "GoogleDevtoolsCloudbuildV1FailureInfo", +"properties": { +"detail": { +"description": "Explains the failure issue in more detail using hard-coded text.", +"type": "string" +}, +"type": { +"description": "The name of the failure.", +"enum": [ +"FAILURE_TYPE_UNSPECIFIED", +"PUSH_FAILED", +"PUSH_IMAGE_NOT_FOUND", +"PUSH_NOT_AUTHORIZED", +"LOGGING_FAILURE", +"USER_BUILD_STEP", +"FETCH_SOURCE_FAILED" +], +"enumDescriptions": [ +"Type unspecified", +"Unable to push the image to the repository.", +"Final image not found.", +"Unauthorized push of the final image.", +"Backend logging failures. Should retry.", +"A build step has failed.", +"The source fetching has failed." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1FileHashes": { +"description": "Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.", +"id": "GoogleDevtoolsCloudbuildV1FileHashes", +"properties": { +"fileHash": { +"description": "Collection of file hashes.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Hash" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1GitSource": { +"description": "Location of the source in any accessible Git repository.", +"id": "GoogleDevtoolsCloudbuildV1GitSource", +"properties": { +"dir": { +"description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution.", +"type": "string" +}, +"revision": { +"description": "The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the revision from the Git repository; therefore make sure that the string you provide for `revision` is parsable by the command. For information on string values accepted by `git fetch`, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on `git fetch`, see https://git-scm.com/docs/git-fetch.", +"type": "string" +}, +"url": { +"description": "Location of the Git repo to build. This will be used as a `git remote`, see https://git-scm.com/docs/git-remote.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Hash": { +"description": "Container message for hash values.", +"id": "GoogleDevtoolsCloudbuildV1Hash", +"properties": { +"type": { +"description": "The type of hash that was performed.", +"enum": [ +"NONE", +"SHA256", +"MD5", +"SHA512" +], +"enumDescriptions": [ +"No hash requested.", +"Use a sha256 hash.", +"Use a md5 hash.", +"Use a sha512 hash." +], +"type": "string" +}, +"value": { +"description": "The hash value.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1InlineSecret": { +"description": "Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.", +"id": "GoogleDevtoolsCloudbuildV1InlineSecret", +"properties": { +"envMap": { +"additionalProperties": { +"format": "byte", +"type": "string" +}, +"description": "Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.", +"type": "object" +}, +"kmsKeyName": { +"description": "Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1MavenArtifact": { +"description": "A Maven artifact to upload to Artifact Registry upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1MavenArtifact", +"properties": { +"artifactId": { +"description": "Maven `artifactId` value used when uploading the artifact to Artifact Registry.", +"type": "string" +}, +"groupId": { +"description": "Maven `groupId` value used when uploading the artifact to Artifact Registry.", +"type": "string" +}, +"path": { +"description": "Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.", +"type": "string" +}, +"repository": { +"description": "Artifact Registry repository, in the form \"https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY\" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.", +"type": "string" +}, +"version": { +"description": "Maven `version` value used when uploading the artifact to Artifact Registry.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1NpmPackage": { +"description": "Npm package to upload to Artifact Registry upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1NpmPackage", +"properties": { +"packagePath": { +"description": "Path to the package.json. e.g. workspace/path/to/package", +"type": "string" +}, +"repository": { +"description": "Artifact Registry repository, in the form \"https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY\" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1PoolOption": { +"description": "Details about how a build should be executed on a `WorkerPool`. See [running builds in a private pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) for more information.", +"id": "GoogleDevtoolsCloudbuildV1PoolOption", +"properties": { +"name": { +"description": "The `WorkerPool` resource to execute the build on. You must have `cloudbuild.workerpools.use` on the project hosting the WorkerPool. Format projects/{project}/locations/{location}/workerPools/{workerPoolId}", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1PythonPackage": { +"description": "Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository.", +"id": "GoogleDevtoolsCloudbuildV1PythonPackage", +"properties": { +"paths": { +"description": "Path globs used to match files in the build's workspace. For Python/ Twine, this is usually `dist/*`, and sometimes additionally an `.asc` file.", +"items": { +"type": "string" +}, +"type": "array" +}, +"repository": { +"description": "Artifact Registry repository, in the form \"https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY\" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1RepoSource": { +"description": "Location of the source in a Google Cloud Source Repository.", +"id": "GoogleDevtoolsCloudbuildV1RepoSource", +"properties": { +"branchName": { +"description": "Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", +"type": "string" +}, +"commitSha": { +"description": "Explicit commit SHA to build.", +"type": "string" +}, +"dir": { +"description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution.", +"type": "string" +}, +"invertRegex": { +"description": "Only trigger a build if the revision regex does NOT match the revision regex.", +"type": "boolean" +}, +"projectId": { +"description": "ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.", +"type": "string" +}, +"repoName": { +"description": "Name of the Cloud Source Repository.", +"type": "string" +}, +"substitutions": { +"additionalProperties": { +"type": "string" +}, +"description": "Substitutions to use in a triggered build. Should only be used with RunBuildTrigger", +"type": "object" +}, +"tagName": { +"description": "Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Results": { +"description": "Artifacts created by the build pipeline.", +"id": "GoogleDevtoolsCloudbuildV1Results", +"properties": { +"artifactManifest": { +"description": "Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.", +"type": "string" +}, +"artifactTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Time to push all non-container artifacts to Cloud Storage." +}, +"buildStepImages": { +"description": "List of build step digests, in the order corresponding to build step indices.", +"items": { +"type": "string" +}, +"type": "array" +}, +"buildStepOutputs": { +"description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored.", +"items": { +"format": "byte", +"type": "string" +}, +"type": "array" +}, +"images": { +"description": "Container images that were built as a part of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1BuiltImage" +}, +"type": "array" +}, +"mavenArtifacts": { +"description": "Maven artifacts uploaded to Artifact Registry at the end of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1UploadedMavenArtifact" +}, +"type": "array" +}, +"npmPackages": { +"description": "Npm packages uploaded to Artifact Registry at the end of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1UploadedNpmPackage" +}, +"type": "array" +}, +"numArtifacts": { +"description": "Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.", +"format": "int64", +"type": "string" +}, +"pythonPackages": { +"description": "Python artifacts uploaded to Artifact Registry at the end of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1UploadedPythonPackage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Secret": { +"description": "Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.", +"id": "GoogleDevtoolsCloudbuildV1Secret", +"properties": { +"kmsKeyName": { +"description": "Cloud KMS key name to use to decrypt these envs.", +"type": "string" +}, +"secretEnv": { +"additionalProperties": { +"format": "byte", +"type": "string" +}, +"description": "Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1SecretManagerSecret": { +"description": "Pairs a secret environment variable with a SecretVersion in Secret Manager.", +"id": "GoogleDevtoolsCloudbuildV1SecretManagerSecret", +"properties": { +"env": { +"description": "Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.", +"type": "string" +}, +"versionName": { +"description": "Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Secrets": { +"description": "Secrets and secret environment variables.", +"id": "GoogleDevtoolsCloudbuildV1Secrets", +"properties": { +"inline": { +"description": "Secrets encrypted with KMS key and the associated secret environment variable.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1InlineSecret" +}, +"type": "array" +}, +"secretManager": { +"description": "Secrets in Secret Manager and associated secret environment variable.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1SecretManagerSecret" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Source": { +"description": "Location of the source in a supported storage service.", +"id": "GoogleDevtoolsCloudbuildV1Source", +"properties": { +"connectedRepository": { +"$ref": "GoogleDevtoolsCloudbuildV1ConnectedRepository", +"description": "Optional. If provided, get the source from this 2nd-gen Google Cloud Build repository resource." +}, +"gitSource": { +"$ref": "GoogleDevtoolsCloudbuildV1GitSource", +"description": "If provided, get the source from this Git repository." +}, +"repoSource": { +"$ref": "GoogleDevtoolsCloudbuildV1RepoSource", +"description": "If provided, get the source from this location in a Cloud Source Repository." +}, +"storageSource": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSource", +"description": "If provided, get the source from this location in Cloud Storage." +}, +"storageSourceManifest": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSourceManifest", +"description": "If provided, get the source from this manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher)." +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1SourceProvenance": { +"description": "Provenance of the source. Ways to find the original source, or verify that some source was used for this build.", +"id": "GoogleDevtoolsCloudbuildV1SourceProvenance", +"properties": { +"fileHashes": { +"additionalProperties": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes" +}, +"description": "Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.", +"readOnly": true, +"type": "object" +}, +"resolvedConnectedRepository": { +"$ref": "GoogleDevtoolsCloudbuildV1ConnectedRepository", +"description": "Output only. A copy of the build's `source.connected_repository`, if exists, with any revisions resolved.", +"readOnly": true +}, +"resolvedGitSource": { +"$ref": "GoogleDevtoolsCloudbuildV1GitSource", +"description": "Output only. A copy of the build's `source.git_source`, if exists, with any revisions resolved.", +"readOnly": true +}, +"resolvedRepoSource": { +"$ref": "GoogleDevtoolsCloudbuildV1RepoSource", +"description": "A copy of the build's `source.repo_source`, if exists, with any revisions resolved." +}, +"resolvedStorageSource": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSource", +"description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." +}, +"resolvedStorageSourceManifest": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSourceManifest", +"description": "A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview." +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1StorageSource": { +"description": "Location of the source in an archive file in Cloud Storage.", +"id": "GoogleDevtoolsCloudbuildV1StorageSource", +"properties": { +"bucket": { +"description": "Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", +"type": "string" +}, +"generation": { +"description": "Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build.", +"type": "string" +}, +"sourceFetcher": { +"description": "Optional. Option to specify the tool to fetch the source file for the build.", +"enum": [ +"SOURCE_FETCHER_UNSPECIFIED", +"GSUTIL", +"GCS_FETCHER" +], +"enumDescriptions": [ +"Unspecified defaults to GSUTIL.", +"Use the \"gsutil\" tool to download the source file.", +"Use the Cloud Storage Fetcher tool to download the source file." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1StorageSourceManifest": { +"description": "Location of the source manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).", +"id": "GoogleDevtoolsCloudbuildV1StorageSourceManifest", +"properties": { +"bucket": { +"description": "Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", +"type": "string" +}, +"generation": { +"description": "Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Cloud Storage object containing the source manifest. This object must be a JSON file.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1TimeSpan": { +"description": "Start and end times for a build execution phase.", +"id": "GoogleDevtoolsCloudbuildV1TimeSpan", +"properties": { +"endTime": { +"description": "End of time span.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Start of time span.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1UploadedMavenArtifact": { +"description": "A Maven artifact uploaded using the MavenArtifact directive.", +"id": "GoogleDevtoolsCloudbuildV1UploadedMavenArtifact", +"properties": { +"fileHashes": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes", +"description": "Hash types and values of the Maven Artifact." +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified artifact.", +"readOnly": true +}, +"uri": { +"description": "URI of the uploaded artifact.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1UploadedNpmPackage": { +"description": "An npm package uploaded to Artifact Registry using the NpmPackage directive.", +"id": "GoogleDevtoolsCloudbuildV1UploadedNpmPackage", +"properties": { +"fileHashes": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes", +"description": "Hash types and values of the npm package." +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified artifact.", +"readOnly": true +}, +"uri": { +"description": "URI of the uploaded npm package.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1UploadedPythonPackage": { +"description": "Artifact uploaded using the PythonPackage directive.", +"id": "GoogleDevtoolsCloudbuildV1UploadedPythonPackage", +"properties": { +"fileHashes": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes", +"description": "Hash types and values of the Python Artifact." +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified artifact.", +"readOnly": true +}, +"uri": { +"description": "URI of the uploaded artifact.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Volume": { +"description": "Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.", +"id": "GoogleDevtoolsCloudbuildV1Volume", +"properties": { +"name": { +"description": "Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.", +"type": "string" +}, +"path": { +"description": "Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Warning": { +"description": "A non-fatal problem encountered during the execution of the build.", +"id": "GoogleDevtoolsCloudbuildV1Warning", +"properties": { +"priority": { +"description": "The priority for this warning.", +"enum": [ +"PRIORITY_UNSPECIFIED", +"INFO", +"WARNING", +"ALERT" +], +"enumDescriptions": [ +"Should not be used.", +"e.g. deprecation warnings and alternative feature highlights.", +"e.g. automated detection of possible issues with the build.", +"e.g. alerts that a feature used in the build is pending removal" +], +"type": "string" +}, +"text": { +"description": "Explanation of the warning generated.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleLongrunningWaitOperationRequest": { +"description": "The request message for Operations.WaitOperation.", +"id": "GoogleLongrunningWaitOperationRequest", +"properties": { +"timeout": { +"description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"HTTPGetAction": { +"description": "HTTPGetAction describes an action based on HTTP Get requests.", +"id": "HTTPGetAction", +"properties": { +"host": { +"description": "Not supported by Cloud Run.", +"type": "string" +}, +"httpHeaders": { +"description": "Custom headers to set in the request. HTTP allows repeated headers.", +"items": { +"$ref": "HTTPHeader" +}, +"type": "array" +}, +"path": { +"description": "Path to access on the HTTP server.", +"type": "string" +}, +"port": { +"description": "Port number to access on the container. Number must be in the range 1 to 65535.", +"format": "int32", +"type": "integer" +}, +"scheme": { +"description": "Not supported by Cloud Run.", +"type": "string" +} +}, +"type": "object" +}, +"HTTPHeader": { +"description": "HTTPHeader describes a custom header to be used in HTTP probes", +"id": "HTTPHeader", +"properties": { +"name": { +"description": "Required. The header field name", +"type": "string" +}, +"value": { +"description": "The header field value", +"type": "string" +} +}, +"type": "object" +}, +"Job": { +"description": "Job represents the configuration of a single job, which references a container image which is run to completion.", +"id": "Job", +"properties": { +"apiVersion": { +"description": "Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", +"type": "string" +}, +"kind": { +"description": "Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Optional. Standard object's metadata." +}, +"spec": { +"$ref": "JobSpec", +"description": "Optional. Specification of the desired behavior of a job." +}, +"status": { +"$ref": "JobStatus", +"description": "Output only. Current status of a job.", +"readOnly": true +} +}, +"type": "object" +}, +"JobSpec": { +"description": "JobSpec describes how the job will look.", +"id": "JobSpec", +"properties": { +"runExecutionToken": { +"description": "A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully completed. The sum of job name and token length must be fewer than 63 characters.", +"type": "string" +}, +"startExecutionToken": { +"description": "A unique string used as a suffix for creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters.", +"type": "string" +}, +"template": { +"$ref": "ExecutionTemplateSpec", +"description": "Optional. Describes the execution that will be created when running a job." +} +}, +"type": "object" +}, +"JobStatus": { +"description": "JobStatus represents the current state of a Job.", +"id": "JobStatus", +"properties": { +"conditions": { +"description": "Conditions communicate information about ongoing/complete reconciliation processes that bring the \"spec\" inline with the observed state of the world. Job-specific conditions include: * `Ready`: `True` when the job is ready to be executed.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"executionCount": { +"description": "Number of executions created for this job.", +"format": "int32", +"type": "integer" +}, +"latestCreatedExecution": { +"$ref": "ExecutionReference", +"description": "A pointer to the most recently created execution for this job. This is set regardless of the eventual state of the execution." +}, +"observedGeneration": { +"description": "The 'generation' of the job that was last processed by the controller.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"KeyToPath": { +"description": "Maps a string key to a path within a volume.", +"id": "KeyToPath", +"properties": { +"key": { +"description": "The Cloud Secret Manager secret version. Can be 'latest' for the latest value, or an integer or a secret alias for a specific version. The key to project.", +"type": "string" +}, +"mode": { +"description": "(Optional) Mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", +"format": "int32", +"type": "integer" +}, +"path": { +"description": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", +"type": "string" +} +}, +"type": "object" +}, +"ListAuthorizedDomainsResponse": { +"description": "A list of Authorized Domains.", +"id": "ListAuthorizedDomainsResponse", +"properties": { +"domains": { +"description": "The authorized domains belonging to the user.", +"items": { +"$ref": "AuthorizedDomain" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListConfigurationsResponse": { +"description": "ListConfigurationsResponse is a list of Configuration resources.", +"id": "ListConfigurationsResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"serving.knative.dev/v1\".", +"type": "string" +}, +"items": { +"description": "List of Configurations.", +"items": { +"$ref": "Configuration" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource, in this case \"ConfigurationList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this Configuration list." +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListDomainMappingsResponse": { +"description": "ListDomainMappingsResponse is a list of DomainMapping resources.", +"id": "ListDomainMappingsResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"domains.cloudrun.com/v1\".", +"type": "string" +}, +"items": { +"description": "List of DomainMappings.", +"items": { +"$ref": "DomainMapping" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource, in this case \"DomainMappingList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this DomainMapping list." +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListExecutionsResponse": { +"description": "ListExecutionsResponse is a list of Executions resources.", +"id": "ListExecutionsResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"run.googleapis.com/v1\".", +"type": "string" +}, +"items": { +"description": "List of Executions.", +"items": { +"$ref": "Execution" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource, in this case \"ExecutionsList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this executions list." +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListJobsResponse": { +"description": "ListJobsResponse is a list of Jobs resources.", +"id": "ListJobsResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"run.googleapis.com/v1\".", +"type": "string" +}, +"items": { +"description": "List of Jobs.", +"items": { +"$ref": "Job" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource, in this case \"JobsList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this jobs list." +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListMeta": { +"description": "Metadata for synthetic resources like List. In Cloud Run, all List Resources Responses will have a ListMeta instead of ObjectMeta.", +"id": "ListMeta", +"properties": { +"continue": { +"description": "Continuation token is a value emitted when the count of items is larger than the user/system limit. To retrieve the next page of items, pass the value of `continue` as the next request's `page_token`.", +"type": "string" +}, +"resourceVersion": { +"description": "Opaque string that identifies the server's internal version of this object. It can be used by clients to determine when objects have changed. If the message is passed back to the server, it must be left unmodified.", +"type": "string" +}, +"selfLink": { +"description": "URL representing this object.", +"type": "string" +} +}, +"type": "object" +}, +"ListRevisionsResponse": { +"description": "ListRevisionsResponse is a list of Revision resources.", +"id": "ListRevisionsResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"serving.knative.dev/v1\".", +"type": "string" +}, +"items": { +"description": "List of Revisions.", +"items": { +"$ref": "Revision" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource, in this case \"RevisionList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this revision list." +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListRoutesResponse": { +"description": "ListRoutesResponse is a list of Route resources.", +"id": "ListRoutesResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"serving.knative.dev/v1\".", +"type": "string" +}, +"items": { +"description": "List of Routes.", +"items": { +"$ref": "Route" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource, in this case always \"RouteList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this Route list." +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServicesResponse": { +"description": "A list of Service resources.", +"id": "ListServicesResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call; returns \"serving.knative.dev/v1\".", +"type": "string" +}, +"items": { +"description": "List of Services.", +"items": { +"$ref": "Service" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource; returns \"ServiceList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this Service list." +}, +"unreachable": { +"description": "For calls against the global endpoint, returns the list of Cloud locations that could not be reached. For regional calls, this field is not used.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTasksResponse": { +"description": "ListTasksResponse is a list of Tasks resources.", +"id": "ListTasksResponse", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"run.googleapis.com/v1\".", +"type": "string" +}, +"items": { +"description": "List of Tasks.", +"items": { +"$ref": "Task" +}, +"type": "array" +}, +"kind": { +"description": "The kind of this resource, in this case \"TasksList\".", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Metadata associated with this tasks list." +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"LocalObjectReference": { +"description": "Not supported by Cloud Run. LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", +"id": "LocalObjectReference", +"properties": { +"name": { +"description": "Name of the referent.", +"type": "string" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"NFSVolumeSource": { +"description": "Represents a persistent volume that will be mounted using NFS. This volume will be shared between all instances of the resource and data will not be deleted when the instance is shut down.", +"id": "NFSVolumeSource", +"properties": { +"path": { +"description": "Path that is exported by the NFS server.", +"type": "string" +}, +"readOnly": { +"description": "If true, mount the NFS volume as read only. Defaults to false.", +"type": "boolean" +}, +"server": { +"description": "Hostname or IP address of the NFS server.", +"type": "string" +} +}, +"type": "object" +}, +"ObjectMeta": { +"description": "google.cloud.run.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", +"id": "ObjectMeta", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. * `autoscaling.knative.dev/maxScale`: Revision. * `autoscaling.knative.dev/minScale`: Revision. * `run.googleapis.com/binary-authorization-breakglass`: Service, Job, * `run.googleapis.com/binary-authorization`: Service, Job, Execution. * `run.googleapis.com/client-name`: All resources. * `run.googleapis.com/cloudsql-instances`: Revision, Execution. * `run.googleapis.com/container-dependencies`: Revision . * `run.googleapis.com/cpu-throttling`: Revision. * `run.googleapis.com/custom-audiences`: Service. * `run.googleapis.com/default-url-disabled`: Service. * `run.googleapis.com/description`: Service. * `run.googleapis.com/encryption-key-shutdown-hours`: Revision * `run.googleapis.com/encryption-key`: Revision, Execution. * `run.googleapis.com/execution-environment`: Revision, Execution. * `run.googleapis.com/gc-traffic-tags`: Service. * `run.googleapis.com/ingress`: Service. * `run.googleapis.com/launch-stage`: Service, Job. * `run.googleapis.com/minScale`: Service (ALPHA) * `run.googleapis.com/network-interfaces`: Revision, Execution. * `run.googleapis.com/post-key-revocation-action-type`: Revision. * `run.googleapis.com/secrets`: Revision, Execution. * `run.googleapis.com/secure-session-agent`: Revision. * `run.googleapis.com/sessionAffinity`: Revision. * `run.googleapis.com/startup-cpu-boost`: Revision. * `run.googleapis.com/vpc-access-connector`: Revision, Execution. * `run.googleapis.com/vpc-access-egress`: Revision, Execution.", +"type": "object" +}, +"clusterName": { +"description": "Not supported by Cloud Run", +"type": "string" +}, +"creationTimestamp": { +"description": "UTC timestamp representing the server time when this object was created.", +"format": "google-datetime", +"type": "string" +}, +"deletionGracePeriodSeconds": { +"description": "Not supported by Cloud Run", +"format": "int32", +"type": "integer" +}, +"deletionTimestamp": { +"description": "The read-only soft deletion timestamp for this resource. In Cloud Run, users are not able to set this field. Instead, they must call the corresponding Delete API.", +"format": "google-datetime", +"type": "string" +}, +"finalizers": { +"description": "Not supported by Cloud Run", +"items": { +"type": "string" +}, +"type": "array" +}, +"generateName": { +"description": "Not supported by Cloud Run", +"type": "string" +}, +"generation": { +"description": "A system-provided sequence number representing a specific generation of the desired state.", +"format": "int32", +"type": "integer" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes.", +"type": "object" +}, +"name": { +"description": "Required. The name of the resource. Name is required when creating top-level resources (Service, Job), must be unique within a Cloud Run project/region, and cannot be changed once created.", +"type": "string" +}, +"namespace": { +"description": "Required. Defines the space within each name must be unique within a Cloud Run region. In Cloud Run, it must be project ID or number.", +"type": "string" +}, +"ownerReferences": { +"description": "Not supported by Cloud Run", +"items": { +"$ref": "OwnerReference" +}, +"type": "array" +}, +"resourceVersion": { +"description": "Opaque, system-generated value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server or omit the value to disable conflict-detection.", +"type": "string" +}, +"selfLink": { +"description": "URL representing this object.", +"type": "string" +}, +"uid": { +"description": "Unique, system-generated identifier for this resource.", +"type": "string" +} +}, +"type": "object" +}, +"Overrides": { +"description": "RunJob Overrides that contains Execution fields to be overridden on the go.", +"id": "Overrides", +"properties": { +"containerOverrides": { +"description": "Per container override specification.", +"items": { +"$ref": "ContainerOverride" +}, +"type": "array" +}, +"taskCount": { +"description": "The desired number of tasks the execution should run. Will replace existing task_count value.", +"format": "int32", +"type": "integer" +}, +"timeoutSeconds": { +"description": "Duration in seconds the task may be active before the system will actively try to mark it failed and kill associated containers. Will replace existing timeout_seconds value.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"OwnerReference": { +"description": "This is not supported or used by Cloud Run.", +"id": "OwnerReference", +"properties": { +"apiVersion": { +"description": "This is not supported or used by Cloud Run.", +"type": "string" +}, +"blockOwnerDeletion": { +"description": "This is not supported or used by Cloud Run.", +"type": "boolean" +}, +"controller": { +"description": "This is not supported or used by Cloud Run.", +"type": "boolean" +}, +"kind": { +"description": "This is not supported or used by Cloud Run.", +"type": "string" +}, +"name": { +"description": "This is not supported or used by Cloud Run.", +"type": "string" +}, +"uid": { +"description": "This is not supported or used by Cloud Run.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Probe": { +"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", +"id": "Probe", +"properties": { +"exec": { +"$ref": "ExecAction", +"description": "Not supported by Cloud Run." +}, +"failureThreshold": { +"description": "Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", +"format": "int32", +"type": "integer" +}, +"grpc": { +"$ref": "GRPCAction", +"description": "GRPCAction specifies an action involving a GRPC port." +}, +"httpGet": { +"$ref": "HTTPGetAction", +"description": "HTTPGet specifies the http request to perform." +}, +"initialDelaySeconds": { +"description": "Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240.", +"format": "int32", +"type": "integer" +}, +"periodSeconds": { +"description": "How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.", +"format": "int32", +"type": "integer" +}, +"successThreshold": { +"description": "Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 if set.", +"format": "int32", +"type": "integer" +}, +"tcpSocket": { +"$ref": "TCPSocketAction", +"description": "TCPSocket specifies an action involving a TCP port." +}, +"timeoutSeconds": { +"description": "Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds; if period_seconds is not set, must be less or equal than 10.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResourceRecord": { +"description": "A DNS resource record.", +"id": "ResourceRecord", +"properties": { +"name": { +"description": "Relative name of the object affected by this record. Only applicable for `CNAME` records. Example: 'www'.", +"type": "string" +}, +"rrdata": { +"description": "Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1).", +"type": "string" +}, +"type": { +"description": "Resource record type. Example: `AAAA`.", +"enum": [ +"RECORD_TYPE_UNSPECIFIED", +"A", +"AAAA", +"CNAME" +], +"enumDescriptions": [ +"An unknown resource record.", +"An A resource record. Data is an IPv4 address.", +"An AAAA resource record. Data is an IPv6 address.", +"A CNAME resource record. Data is a domain name to be aliased." +], +"type": "string" +} +}, +"type": "object" +}, +"ResourceRequirements": { +"description": "ResourceRequirements describes the compute resource requirements.", +"id": "ResourceRequirements", +"properties": { +"limits": { +"additionalProperties": { +"type": "string" +}, +"description": "Limits describes the maximum amount of compute resources allowed. Only 'cpu' and 'memory' keys are supported. * For supported 'cpu' values, go to https://cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits", +"type": "object" +}, +"requests": { +"additionalProperties": { +"type": "string" +}, +"description": "Requests describes the minimum amount of compute resources required. Only `cpu` and `memory` are supported. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. * For supported 'cpu' values, go to https://cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits", +"type": "object" +} +}, +"type": "object" +}, +"Revision": { +"description": "Revision is an immutable snapshot of code and configuration. A revision references a container image. Revisions are created by updates to a Configuration. See also: https://github.com/knative/specs/blob/main/specs/serving/overview.md#revision", +"id": "Revision", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"serving.knative.dev/v1\".", +"type": "string" +}, +"kind": { +"description": "The kind of this resource, in this case \"Revision\".", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Metadata associated with this Revision, including name, namespace, labels, and annotations." +}, +"spec": { +"$ref": "RevisionSpec", +"description": "Spec holds the desired state of the Revision (from the client)." +}, +"status": { +"$ref": "RevisionStatus", +"description": "Status communicates the observed state of the Revision (from the controller)." +} +}, +"type": "object" +}, +"RevisionSpec": { +"description": "RevisionSpec holds the desired state of the Revision (from the client).", +"id": "RevisionSpec", +"properties": { +"containerConcurrency": { +"description": "ContainerConcurrency specifies the maximum allowed in-flight (concurrent) requests per container instance of the Revision. If not specified, defaults to 80.", +"format": "int32", +"type": "integer" +}, +"containers": { +"description": "Required. Containers holds the single container that defines the unit of execution for this Revision. In the context of a Revision, we disallow a number of fields on this Container, including: name and lifecycle. In Cloud Run, only a single container may be provided.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"enableServiceLinks": { +"description": "Not supported by Cloud Run.", +"type": "boolean" +}, +"imagePullSecrets": { +"description": "Not supported by Cloud Run.", +"items": { +"$ref": "LocalObjectReference" +}, +"type": "array" +}, +"serviceAccountName": { +"description": "Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project's default service account.", +"type": "string" +}, +"timeoutSeconds": { +"description": "TimeoutSeconds holds the max duration the instance is allowed for responding to a request. Cloud Run: defaults to 300 seconds (5 minutes). Maximum allowed value is 3600 seconds (1 hour).", +"format": "int32", +"type": "integer" +}, +"volumes": { +"items": { +"$ref": "Volume" +}, +"type": "array" +} +}, +"type": "object" +}, +"RevisionStatus": { +"description": "RevisionStatus communicates the observed state of the Revision (from the controller).", +"id": "RevisionStatus", +"properties": { +"conditions": { +"description": "Conditions communicate information about ongoing/complete reconciliation processes that bring the \"spec\" inline with the observed state of the world. As a Revision is being prepared, it will incrementally update conditions. Revision-specific conditions include: * `ResourcesAvailable`: `True` when underlying resources have been provisioned. * `ContainerHealthy`: `True` when the Revision readiness check completes. * `Active`: `True` when the Revision may receive traffic.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"desiredReplicas": { +"description": "Output only. The configured number of instances running this revision. For Cloud Run, this only includes instances provisioned using the minScale annotation. It does not include instances created by autoscaling.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"imageDigest": { +"description": "ImageDigest holds the resolved digest for the image specified within .Spec.Container.Image. The digest is resolved during the creation of Revision. This field holds the digest value regardless of whether a tag or digest was originally specified in the Container object.", +"type": "string" +}, +"logUrl": { +"description": "Optional. Specifies the generated logging url for this particular revision based on the revision url template specified in the controller's config.", +"type": "string" +}, +"observedGeneration": { +"description": "ObservedGeneration is the 'Generation' of the Revision that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation, and the Ready condition's status is True or False.", +"format": "int32", +"type": "integer" +}, +"serviceName": { +"description": "Not currently used by Cloud Run.", +"type": "string" +} +}, +"type": "object" +}, +"RevisionTemplate": { +"description": "RevisionTemplateSpec describes the data a revision should have when created from a template.", +"id": "RevisionTemplate", +"properties": { +"metadata": { +"$ref": "ObjectMeta", +"description": "Optional metadata for this Revision, including labels and annotations. Name will be generated by the Configuration. The following annotation keys set properties of the created revision: * `autoscaling.knative.dev/minScale` sets the minimum number of instances. * `autoscaling.knative.dev/maxScale` sets the maximum number of instances. * `run.googleapis.com/cloudsql-instances` sets Cloud SQL connections. Multiple values should be comma separated. * `run.googleapis.com/vpc-access-connector` sets a Serverless VPC Access connector. * `run.googleapis.com/vpc-access-egress` sets VPC egress. Supported values are `all-traffic`, `all` (deprecated), and `private-ranges-only`. `all-traffic` and `all` provide the same functionality. `all` is deprecated but will continue to be supported. Prefer `all-traffic`." +}, +"spec": { +"$ref": "RevisionSpec", +"description": "RevisionSpec holds the desired state of the Revision (from the client)." +} +}, +"type": "object" +}, +"Route": { +"description": "Route is responsible for configuring ingress over a collection of Revisions. Some of the Revisions a Route distributes traffic over may be specified by referencing the Configuration responsible for creating them; in these cases the Route is additionally responsible for monitoring the Configuration for \"latest ready\" revision changes, and smoothly rolling out latest revisions. Cloud Run currently supports referencing a single Configuration to automatically deploy the \"latest ready\" Revision from that Configuration.", +"id": "Route", +"properties": { +"apiVersion": { +"description": "The API version for this call such as \"serving.knative.dev/v1\".", +"type": "string" +}, +"kind": { +"description": "The kind of this resource, in this case always \"Route\".", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Metadata associated with this Route, including name, namespace, labels, and annotations." +}, +"spec": { +"$ref": "RouteSpec", +"description": "Spec holds the desired state of the Route (from the client)." +}, +"status": { +"$ref": "RouteStatus", +"description": "Status communicates the observed state of the Route (from the controller)." +} +}, +"type": "object" +}, +"RouteSpec": { +"description": "RouteSpec holds the desired state of the Route (from the client).", +"id": "RouteSpec", +"properties": { +"traffic": { +"description": "Traffic specifies how to distribute traffic over a collection of Knative Revisions and Configurations. Cloud Run currently supports a single configurationName.", +"items": { +"$ref": "TrafficTarget" +}, +"type": "array" +} +}, +"type": "object" +}, +"RouteStatus": { +"description": "RouteStatus communicates the observed state of the Route (from the controller).", +"id": "RouteStatus", +"properties": { +"address": { +"$ref": "Addressable", +"description": "Similar to url, information on where the service is available on HTTP." +}, +"conditions": { +"description": "Conditions communicates information about ongoing/complete reconciliation processes that bring the \"spec\" inline with the observed state of the world.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"observedGeneration": { +"description": "ObservedGeneration is the 'Generation' of the Route that was last processed by the controller. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False. Note that providing a TrafficTarget that has latest_revision=True will result in a Route that does not increment either its metadata.generation or its observedGeneration, as new \"latest ready\" revisions from the Configuration are processed without an update to the Route's spec.", +"format": "int32", +"type": "integer" +}, +"traffic": { +"description": "Traffic holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that was last observed.", +"items": { +"$ref": "TrafficTarget" +}, +"type": "array" +}, +"url": { +"description": "URL holds the url that will distribute traffic over the provided traffic targets. It generally has the form: `https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app`", +"type": "string" +} +}, +"type": "object" +}, +"RunJobRequest": { +"description": "Request message for creating a new execution of a job.", +"id": "RunJobRequest", +"properties": { +"overrides": { +"$ref": "Overrides", +"description": "Optional. Overrides existing job configuration for one specific new job execution only, using the specified values to update the job configuration for the new execution." +} +}, +"type": "object" +}, +"SecretEnvSource": { +"description": "Not supported by Cloud Run. SecretEnvSource selects a Secret to populate the environment variables with. The contents of the target Secret's Data field will represent the key-value pairs as environment variables.", +"id": "SecretEnvSource", +"properties": { +"localObjectReference": { +"$ref": "LocalObjectReference", +"deprecated": true, +"description": "This field should not be used directly as it is meant to be inlined directly into the message. Use the \"name\" field instead." +}, +"name": { +"description": "The Secret to select from.", +"type": "string" +}, +"optional": { +"description": "Specify whether the Secret must be defined", +"type": "boolean" +} +}, +"type": "object" +}, +"SecretKeySelector": { +"description": "SecretKeySelector selects a key of a Secret.", +"id": "SecretKeySelector", +"properties": { +"key": { +"description": "Required. A Cloud Secret Manager secret version. Must be 'latest' for the latest version, an integer for a specific version, or a version alias. The key of the secret to select from. Must be a valid secret key.", +"type": "string" +}, +"localObjectReference": { +"$ref": "LocalObjectReference", +"deprecated": true, +"description": "This field should not be used directly as it is meant to be inlined directly into the message. Use the \"name\" field instead." +}, +"name": { +"description": "The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project. If the secret is in another project, you must define an alias. An alias definition has the form: :projects//secrets/. If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation. The name of the secret in the pod's namespace to select from.", +"type": "string" +}, +"optional": { +"description": "Specify whether the Secret or its key must be defined.", +"type": "boolean" +} +}, +"type": "object" +}, +"SecretVolumeSource": { +"description": "A volume representing a secret stored in Google Secret Manager. The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret_name. The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names.", +"id": "SecretVolumeSource", +"properties": { +"defaultMode": { +"description": "Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", +"format": "int32", +"type": "integer" +}, +"items": { +"description": "A list of secret versions to mount in the volume. If no items are specified, the volume will expose a file with the same name as the secret name. The contents of the file will be the data in the latest version of the secret. If items are specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify both a key and a path.", +"items": { +"$ref": "KeyToPath" +}, +"type": "array" +}, +"optional": { +"description": "Not supported by Cloud Run.", +"type": "boolean" +}, +"secretName": { +"description": "The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project. If the secret is in another project, you must define an alias. An alias definition has the form: :projects//secrets/. If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation. Name of the secret in the container's namespace to use.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityContext": { +"description": "Not supported by Cloud Run. SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", +"id": "SecurityContext", +"properties": { +"runAsUser": { +"description": "The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Service": { +"description": "Service acts as a top-level container that manages a set of Routes and Configurations which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership. Service acts only as an orchestrator of the underlying Routes and Configurations (much as a kubernetes Deployment orchestrates ReplicaSets). The Service's controller will track the statuses of its owned Configuration and Route, reflecting their statuses and conditions as its own.", +"id": "Service", +"properties": { +"apiVersion": { +"description": "The API version for this call. It must be \"serving.knative.dev/v1\".", +"type": "string" +}, +"kind": { +"description": "The kind of resource. It must be \"Service\".", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Metadata associated with this Service, including name, namespace, labels, and annotations. In Cloud Run, annotations with 'run.googleapis.com/' and 'autoscaling.knative.dev' are restricted, and the accepted annotations will be different depending on the resource type. The following Cloud Run-specific annotations are accepted in Service.metadata.annotations. * `run.googleapis.com/binary-authorization-breakglass` * `run.googleapis.com/binary-authorization` * `run.googleapis.com/client-name` * `run.googleapis.com/custom-audiences` * `run.googleapis.com/default-url-disabled` * `run.googleapis.com/description` * `run.googleapis.com/gc-traffic-tags` * `run.googleapis.com/ingress` * `run.googleapis.com/ingress` sets the ingress settings for the Service. See [the ingress settings documentation](/run/docs/securing/ingress) for details on configuring ingress settings. * `run.googleapis.com/ingress-status` is output-only and contains the currently active ingress settings for the Service. `run.googleapis.com/ingress-status` may differ from `run.googleapis.com/ingress` while the system is processing a change to `run.googleapis.com/ingress` or if the system failed to process a change to `run.googleapis.com/ingress`. When the system has processed all changes successfully `run.googleapis.com/ingress-status` and `run.googleapis.com/ingress` are equal." +}, +"spec": { +"$ref": "ServiceSpec", +"description": "Holds the desired state of the Service (from the client)." +}, +"status": { +"$ref": "ServiceStatus", +"description": "Communicates the system-controlled state of the Service." +} +}, +"type": "object" +}, +"ServiceSpec": { +"description": "ServiceSpec holds the desired state of the Route (from the client), which is used to manipulate the underlying Route and Configuration(s).", +"id": "ServiceSpec", +"properties": { +"template": { +"$ref": "RevisionTemplate", +"description": "Holds the latest specification for the Revision to be stamped out." +}, +"traffic": { +"description": "Specifies how to distribute traffic over a collection of Knative Revisions and Configurations to the Service's main URL.", +"items": { +"$ref": "TrafficTarget" +}, +"type": "array" +} +}, +"type": "object" +}, +"ServiceStatus": { +"description": "The current state of the Service. Output only.", +"id": "ServiceStatus", +"properties": { +"address": { +"$ref": "Addressable", +"description": "Similar to url, information on where the service is available on HTTP." +}, +"conditions": { +"description": "Conditions communicate information about ongoing/complete reconciliation processes that bring the `spec` inline with the observed state of the world. Service-specific conditions include: * `ConfigurationsReady`: `True` when the underlying Configuration is ready. * `RoutesReady`: `True` when the underlying Route is ready. * `Ready`: `True` when all underlying resources are ready.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"latestCreatedRevisionName": { +"description": "Name of the last revision that was created from this Service's Configuration. It might not be ready yet, for that use LatestReadyRevisionName.", +"type": "string" +}, +"latestReadyRevisionName": { +"description": "Name of the latest Revision from this Service's Configuration that has had its `Ready` condition become `True`.", +"type": "string" +}, +"observedGeneration": { +"description": "Returns the generation last seen by the system. Clients polling for completed reconciliation should poll until observedGeneration = metadata.generation and the Ready condition's status is True or False.", +"format": "int32", +"type": "integer" +}, +"traffic": { +"description": "Holds the configured traffic distribution. These entries will always contain RevisionName references. When ConfigurationName appears in the spec, this will hold the LatestReadyRevisionName that we last observed.", +"items": { +"$ref": "TrafficTarget" +}, +"type": "array" +}, +"url": { +"description": "URL that will distribute traffic over the provided traffic targets. It generally has the form `https://{route-hash}-{project-hash}-{cluster-level-suffix}.a.run.app`", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "Status is a return value for calls that don't return other objects.", +"id": "Status", +"properties": { +"code": { +"description": "Suggested HTTP return code for this status, 0 if not set.", +"format": "int32", +"type": "integer" +}, +"details": { +"$ref": "StatusDetails", +"description": "Extended data associated with the reason. Each reason may define its own extended details. This field is optional and the data returned is not guaranteed to conform to any schema except that defined by the reason type." +}, +"message": { +"description": "A human-readable description of the status of this operation.", +"type": "string" +}, +"metadata": { +"$ref": "ListMeta", +"description": "Standard list metadata." +}, +"reason": { +"description": "A machine-readable description of why this operation is in the \"Failure\" status. If this value is empty there is no information available. A Reason clarifies an HTTP status code but does not override it.", +"type": "string" +}, +"status": { +"description": "Status of the operation. One of: \"Success\" or \"Failure\".", +"type": "string" +} +}, +"type": "object" +}, +"StatusCause": { +"description": "StatusCause provides more information about an api.Status failure, including cases when multiple errors are encountered.", +"id": "StatusCause", +"properties": { +"field": { +"description": "The field of the resource that has caused this error, as named by its JSON serialization. May include dot and postfix notation for nested attributes. Arrays are zero-indexed. Fields may appear more than once in an array of causes due to fields having multiple errors. Examples: \"name\" - the field \"name\" on the current resource \"items[0].name\" - the field \"name\" on the first array entry in \"items\"", +"type": "string" +}, +"message": { +"description": "A human-readable description of the cause of the error. This field may be presented as-is to a reader.", +"type": "string" +}, +"reason": { +"description": "A machine-readable description of the cause of the error. If this value is empty there is no information available.", +"type": "string" +} +}, +"type": "object" +}, +"StatusDetails": { +"description": "StatusDetails is a set of additional properties that MAY be set by the server to provide additional information about a response. The Reason field of a Status object defines what attributes will be set. Clients must ignore fields that do not match the defined type of each attribute, and should assume that any attribute may be empty, invalid, or under defined.", +"id": "StatusDetails", +"properties": { +"causes": { +"description": "The Causes array includes more details associated with the StatusReason failure. Not all StatusReasons may provide detailed causes.", +"items": { +"$ref": "StatusCause" +}, +"type": "array" +}, +"group": { +"description": "The group attribute of the resource associated with the status StatusReason.", +"type": "string" +}, +"kind": { +"description": "The kind attribute of the resource associated with the status StatusReason. On some operations may differ from the requested resource Kind.", +"type": "string" +}, +"name": { +"description": "The name attribute of the resource associated with the status StatusReason (when there is a single name which can be described).", +"type": "string" +}, +"retryAfterSeconds": { +"description": "If specified, the time in seconds before the operation should be retried. Some errors may indicate the client must take an alternate action - for those errors this field may indicate how long to wait before taking the alternate action.", +"format": "int32", +"type": "integer" +}, +"uid": { +"description": "UID of the resource. (when there is a single resource which can be described).", +"type": "string" +} +}, +"type": "object" +}, +"TCPSocketAction": { +"description": "TCPSocketAction describes an action based on opening a socket", +"id": "TCPSocketAction", +"properties": { +"host": { +"description": "Not supported by Cloud Run.", +"type": "string" +}, +"port": { +"description": "Port number to access on the container. Number must be in the range 1 to 65535.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Task": { +"description": "Task represents a single run of a container to completion.", +"id": "Task", +"properties": { +"apiVersion": { +"description": "Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values.", +"type": "string" +}, +"kind": { +"description": "Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase.", +"type": "string" +}, +"metadata": { +"$ref": "ObjectMeta", +"description": "Optional. Standard object's metadata." +}, +"spec": { +"$ref": "TaskSpec", +"description": "Optional. Specification of the desired behavior of a task." +}, +"status": { +"$ref": "TaskStatus", +"description": "Output only. Current status of a task.", +"readOnly": true +} +}, +"type": "object" +}, +"TaskAttemptResult": { +"description": "Result of a task attempt.", +"id": "TaskAttemptResult", +"properties": { +"exitCode": { +"description": "Optional. The exit code of this attempt. This may be unset if the container was unable to exit cleanly with a code due to some other failure. See status field for possible failure details.", +"format": "int32", +"type": "integer" +}, +"status": { +"$ref": "GoogleRpcStatus", +"description": "Optional. The status of this attempt. If the status code is OK, then the attempt succeeded." +} +}, +"type": "object" +}, +"TaskSpec": { +"description": "TaskSpec is a description of a task.", +"id": "TaskSpec", +"properties": { +"containers": { +"description": "Optional. List of containers belonging to the task. We disallow a number of fields on this Container.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"maxRetries": { +"description": "Optional. Number of retries allowed per task, before marking this job failed. Defaults to 3.", +"format": "int32", +"type": "integer" +}, +"serviceAccountName": { +"description": "Optional. Email address of the IAM service account associated with the task of a job execution. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.", +"type": "string" +}, +"timeoutSeconds": { +"description": "Optional. Duration in seconds the task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds.", +"format": "int64", +"type": "string" +}, +"volumes": { +"description": "Optional. List of volumes that can be mounted by containers belonging to the task.", +"items": { +"$ref": "Volume" +}, +"type": "array" +} +}, +"type": "object" +}, +"TaskStatus": { +"description": "TaskStatus represents the status of a task.", +"id": "TaskStatus", +"properties": { +"completionTime": { +"description": "Optional. Represents time when the task was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", +"format": "google-datetime", +"type": "string" +}, +"conditions": { +"description": "Optional. Conditions communicate information about ongoing/complete reconciliation processes that bring the \"spec\" inline with the observed state of the world. Task-specific conditions include: * `Started`: `True` when the task has started to execute. * `Completed`: `True` when the task has succeeded. `False` when the task has failed.", +"items": { +"$ref": "GoogleCloudRunV1Condition" +}, +"type": "array" +}, +"index": { +"description": "Required. Index of the task, unique per execution, and beginning at 0.", +"format": "int32", +"type": "integer" +}, +"lastAttemptResult": { +"$ref": "TaskAttemptResult", +"description": "Optional. Result of the last attempt of this task." +}, +"logUri": { +"description": "Optional. URI where logs for this task can be found in Cloud Console.", +"type": "string" +}, +"observedGeneration": { +"description": "Optional. The 'generation' of the task that was last processed by the controller.", +"format": "int32", +"type": "integer" +}, +"retried": { +"description": "Optional. The number of times this task was retried. Instances are retried when they fail up to the maxRetries limit.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Optional. Represents time when the task started to run. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"TaskTemplateSpec": { +"description": "TaskTemplateSpec describes the data a task should have when created from a template.", +"id": "TaskTemplateSpec", +"properties": { +"spec": { +"$ref": "TaskSpec", +"description": "Optional. Specification of the desired behavior of the task." +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TrafficTarget": { +"description": "TrafficTarget holds a single entry of the routing table for a Route.", +"id": "TrafficTarget", +"properties": { +"configurationName": { +"deprecated": true, +"description": "[Deprecated] Not supported in Cloud Run. It must be empty.", +"type": "string" +}, +"latestRevision": { +"description": "Uses the \"status.latestReadyRevisionName\" of the Service to determine the traffic target. When it changes, traffic will automatically migrate from the prior \"latest ready\" revision to the new one. This field must be false if RevisionName is set. This field defaults to true otherwise. If the field is set to true on Status, this means that the Revision was resolved from the Service's latest ready revision.", +"type": "boolean" +}, +"percent": { +"description": "Percent specifies percent of the traffic to this Revision or Configuration. This defaults to zero if unspecified.", +"format": "int32", +"type": "integer" +}, +"revisionName": { +"description": "Points this traffic target to a specific Revision. This field is mutually exclusive with latest_revision.", +"type": "string" +}, +"tag": { +"description": "Tag is used to expose a dedicated url for referencing this target exclusively.", +"type": "string" +}, +"url": { +"description": "Output only. URL displays the URL for accessing tagged traffic targets. URL is displayed in status, and is disallowed on spec. URL must contain a scheme (e.g. https://) and a hostname, but may not contain anything else (e.g. basic auth, url path, etc.)", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Volume": { +"description": "Volume represents a named volume in a container.", +"id": "Volume", +"properties": { +"configMap": { +"$ref": "ConfigMapVolumeSource", +"description": "Not supported in Cloud Run." +}, +"csi": { +"$ref": "CSIVolumeSource", +"description": "Volume specified by the Container Storage Interface driver" +}, +"emptyDir": { +"$ref": "EmptyDirVolumeSource", +"description": "Ephemeral storage used as a shared volume." +}, +"name": { +"description": "Volume's name. In Cloud Run Fully Managed, the name 'cloudsql' is reserved.", +"type": "string" +}, +"nfs": { +"$ref": "NFSVolumeSource" +}, +"secret": { +"$ref": "SecretVolumeSource", +"description": "The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secretName." +} +}, +"type": "object" +}, +"VolumeMount": { +"description": "VolumeMount describes a mounting of a Volume within a container.", +"id": "VolumeMount", +"properties": { +"mountPath": { +"description": "Required. Path within the container at which the volume should be mounted. Must not contain ':'.", +"type": "string" +}, +"name": { +"description": "Required. The name of the volume. There must be a corresponding Volume with the same name.", +"type": "string" +}, +"readOnly": { +"description": "Sets the mount to be read-only or read-write. Not used by Cloud Run.", +"type": "boolean" +}, +"subPath": { +"description": "Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Run Admin API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..9e9119bdd37638e744f48f5014270990c4b49d8f --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1alpha1.json @@ -0,0 +1,1286 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://run.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Cloud Run", + "description": "Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/run/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "run:v1alpha1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://run.mtls.googleapis.com/", + "name": "run", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "namespaces": { + "resources": { + "jobs": { + "methods": { + "create": { + "description": "Create a job.", + "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs", + "httpMethod": "POST", + "id": "run.namespaces.jobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The namespace in which the job should be created. Replace {namespace_id} with the project ID or number.", + "location": "path", + "pattern": "^namespaces/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "apis/run.googleapis.com/v1alpha1/{+parent}/jobs", + "request": { + "$ref": "Job" + }, + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Delete a job.", + "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs/{jobsId}", + "httpMethod": "DELETE", + "id": "run.namespaces.jobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "apiVersion": { + "description": "Optional. Cloud Run currently ignores this parameter.", + "location": "query", + "type": "string" + }, + "kind": { + "description": "Optional. Cloud Run currently ignores this parameter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. The name of the job to delete. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", + "location": "path", + "pattern": "^namespaces/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + }, + "propagationPolicy": { + "description": "Optional. Specifies the propagation policy of delete. Cloud Run currently ignores this setting, and deletes in the background. Please see kubernetes.io/docs/concepts/workloads/controllers/garbage-collection/ for more information.", + "location": "query", + "type": "string" + } + }, + "path": "apis/run.googleapis.com/v1alpha1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Get information about a job.", + "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs/{jobsId}", + "httpMethod": "GET", + "id": "run.namespaces.jobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the job to retrieve. For Cloud Run (fully managed), replace {namespace_id} with the project ID or number.", + "location": "path", + "pattern": "^namespaces/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "apis/run.googleapis.com/v1alpha1/{+name}", + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "List jobs.", + "flatPath": "apis/run.googleapis.com/v1alpha1/namespaces/{namespacesId}/jobs", + "httpMethod": "GET", + "id": "run.namespaces.jobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "continue": { + "description": "Optional. Optional encoded string to continue paging.", + "location": "query", + "type": "string" + }, + "fieldSelector": { + "description": "Optional. Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", + "location": "query", + "type": "string" + }, + "includeUninitialized": { + "description": "Optional. Not currently used by Cloud Run.", + "location": "query", + "type": "boolean" + }, + "labelSelector": { + "description": "Optional. Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", + "location": "query", + "type": "string" + }, + "limit": { + "description": "Optional. The maximum number of records that should be returned.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "parent": { + "description": "Required. The namespace from which the jobs should be listed. Replace {namespace_id} with the project ID or number.", + "location": "path", + "pattern": "^namespaces/[^/]+$", + "required": true, + "type": "string" + }, + "resourceVersion": { + "description": "Optional. The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", + "location": "query", + "type": "string" + }, + "watch": { + "description": "Optional. Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", + "location": "query", + "type": "boolean" + } + }, + "path": "apis/run.googleapis.com/v1alpha1/{+parent}/jobs", + "response": { + "$ref": "ListJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + }, + "revision": "20220710", + "rootUrl": "https://run.googleapis.com/", + "schemas": { + "ConfigMapEnvSource": { + "description": "Not supported by Cloud Run ConfigMapEnvSource selects a ConfigMap to populate the environment variables with. The contents of the target ConfigMap's Data field will represent the key-value pairs as environment variables.", + "id": "ConfigMapEnvSource", + "properties": { + "localObjectReference": { + "$ref": "LocalObjectReference", + "description": "This field should not be used directly as it is meant to be inlined directly into the message. Use the \"name\" field instead." + }, + "name": { + "description": "The ConfigMap to select from.", + "type": "string" + }, + "optional": { + "description": "(Optional) Specify whether the ConfigMap must be defined", + "type": "boolean" + } + }, + "type": "object" + }, + "ConfigMapKeySelector": { + "description": "Not supported by Cloud Run Selects a key from a ConfigMap.", + "id": "ConfigMapKeySelector", + "properties": { + "key": { + "description": "The key to select.", + "type": "string" + }, + "localObjectReference": { + "$ref": "LocalObjectReference", + "description": "This field should not be used directly as it is meant to be inlined directly into the message. Use the \"name\" field instead." + }, + "name": { + "description": "The ConfigMap to select from.", + "type": "string" + }, + "optional": { + "description": "(Optional) Specify whether the ConfigMap or its key must be defined", + "type": "boolean" + } + }, + "type": "object" + }, + "ConfigMapVolumeSource": { + "description": "Not supported by Cloud Run Adapts a ConfigMap into a volume. The contents of the target ConfigMap's Data field will be presented in a volume as files using the keys in the Data field as the file names, unless the items element is populated with specific mappings of keys to paths.", + "id": "ConfigMapVolumeSource", + "properties": { + "defaultMode": { + "description": "(Optional) Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0644. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "format": "int32", + "type": "integer" + }, + "items": { + "description": "(Optional) If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified that is not present in the Secret, the volume setup will error unless it is marked optional.", + "items": { + "$ref": "KeyToPath" + }, + "type": "array" + }, + "name": { + "description": "Name of the config.", + "type": "string" + }, + "optional": { + "description": "(Optional) Specify whether the Secret or its keys must be defined.", + "type": "boolean" + } + }, + "type": "object" + }, + "Container": { + "description": "A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments may be supplied by the system to the container at runtime.", + "id": "Container", + "properties": { + "args": { + "description": "(Optional) Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell", + "items": { + "type": "string" + }, + "type": "array" + }, + "command": { + "items": { + "type": "string" + }, + "type": "array" + }, + "env": { + "description": "(Optional) List of environment variables to set in the container.", + "items": { + "$ref": "EnvVar" + }, + "type": "array" + }, + "envFrom": { + "description": "(Optional) List of sources to populate environment variables in the container. The keys defined within a source must be a C_IDENTIFIER. All invalid keys will be reported as an event when the container is starting. When a key exists in multiple sources, the value associated with the last source will take precedence. Values defined by an Env with a duplicate key will take precedence. Cannot be updated.", + "items": { + "$ref": "EnvFromSource" + }, + "type": "array" + }, + "image": { + "description": "Only supports containers from Google Container Registry or Artifact Registry URL of the Container image. More info: https://kubernetes.io/docs/concepts/containers/images", + "type": "string" + }, + "imagePullPolicy": { + "description": "(Optional) Image pull policy. One of Always, Never, IfNotPresent. Defaults to Always if :latest tag is specified, or IfNotPresent otherwise. More info: https://kubernetes.io/docs/concepts/containers/images#updating-images", + "type": "string" + }, + "livenessProbe": { + "$ref": "Probe", + "description": "(Optional) Periodic probe of container liveness. Container will be restarted if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" + }, + "name": { + "description": "(Optional) Name of the container specified as a DNS_LABEL. Currently unused in Cloud Run. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#dns-label-names", + "type": "string" + }, + "ports": { + "description": "(Optional) List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on.", + "items": { + "$ref": "ContainerPort" + }, + "type": "array" + }, + "readinessProbe": { + "$ref": "Probe", + "description": "(Optional) Periodic probe of container service readiness. Container will be removed from service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" + }, + "resources": { + "$ref": "ResourceRequirements", + "description": "(Optional) Compute Resources required by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources" + }, + "securityContext": { + "$ref": "SecurityContext", + "description": "(Optional) Security options the pod should run with. More info: https://kubernetes.io/docs/concepts/policy/security-context/ More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" + }, + "startupProbe": { + "$ref": "Probe", + "description": "(Optional) Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes" + }, + "terminationMessagePath": { + "description": "(Optional) Path at which the file to which the container's termination message will be written is mounted into the container's filesystem. Message written is intended to be brief final status, such as an assertion failure message. Will be truncated by the node if greater than 4096 bytes. The total message length across all containers will be limited to 12kb. Defaults to /dev/termination-log.", + "type": "string" + }, + "terminationMessagePolicy": { + "description": "(Optional) Indicate how the termination message should be populated. File will use the contents of terminationMessagePath to populate the container status message on both success and failure. FallbackToLogsOnError will use the last chunk of container log output if the termination message file is empty and the container exited with an error. The log output is limited to 2048 bytes or 80 lines, whichever is smaller. Defaults to File. Cannot be updated.", + "type": "string" + }, + "volumeMounts": { + "description": "(Optional) Volume to mount into the container's filesystem. Only supports SecretVolumeSources. Pod volumes to mount into the container's filesystem.", + "items": { + "$ref": "VolumeMount" + }, + "type": "array" + }, + "workingDir": { + "description": "(Optional) Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.", + "type": "string" + } + }, + "type": "object" + }, + "ContainerPort": { + "description": "ContainerPort represents a network port in a single container.", + "id": "ContainerPort", + "properties": { + "containerPort": { + "description": "(Optional) Port number the container listens on. This must be a valid port number, 0 < x < 65536.", + "format": "int32", + "type": "integer" + }, + "name": { + "description": "(Optional) If specified, used to specify which protocol to use. Allowed values are \"http1\" and \"h2c\".", + "type": "string" + }, + "protocol": { + "description": "(Optional) Protocol for port. Must be \"TCP\". Defaults to \"TCP\".", + "type": "string" + } + }, + "type": "object" + }, + "Empty": { + "description": "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); }", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "EnvFromSource": { + "description": "Not supported by Cloud Run EnvFromSource represents the source of a set of ConfigMaps", + "id": "EnvFromSource", + "properties": { + "configMapRef": { + "$ref": "ConfigMapEnvSource", + "description": "(Optional) The ConfigMap to select from" + }, + "prefix": { + "description": "(Optional) An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.", + "type": "string" + }, + "secretRef": { + "$ref": "SecretEnvSource", + "description": "(Optional) The Secret to select from" + } + }, + "type": "object" + }, + "EnvVar": { + "description": "EnvVar represents an environment variable present in a Container.", + "id": "EnvVar", + "properties": { + "name": { + "description": "Name of the environment variable. Must be a C_IDENTIFIER.", + "type": "string" + }, + "value": { + "description": "(Optional) Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\".", + "type": "string" + }, + "valueFrom": { + "$ref": "EnvVarSource", + "description": "(Optional) Source for the environment variable's value. Only supports secret_key_ref. Source for the environment variable's value. Cannot be used if value is not empty." + } + }, + "type": "object" + }, + "EnvVarSource": { + "description": "EnvVarSource represents a source for the value of an EnvVar.", + "id": "EnvVarSource", + "properties": { + "configMapKeyRef": { + "$ref": "ConfigMapKeySelector", + "description": "(Optional) Not supported by Cloud Run Selects a key of a ConfigMap." + }, + "secretKeyRef": { + "$ref": "SecretKeySelector", + "description": "(Optional) Selects a key (version) of a secret in Secret Manager." + } + }, + "type": "object" + }, + "ExecAction": { + "description": "Not supported by Cloud Run ExecAction describes a \"run in container\" action.", + "id": "ExecAction", + "properties": { + "command": { + "description": "(Optional) Command is the command line to execute inside the container, the working directory for the command is root ('/') in the container's filesystem. The command is simply exec'd, it is not run inside a shell, so traditional shell instructions ('|', etc) won't work. To use a shell, you need to explicitly call out to that shell. Exit status of 0 is treated as live/healthy and non-zero is unhealthy.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "GRPCAction": { + "description": "Not supported by Cloud Run GRPCAction describes an action involving a GRPC port.", + "id": "GRPCAction", + "properties": { + "port": { + "description": "Port number of the gRPC service. Number must be in the range 1 to 65535.", + "format": "int32", + "type": "integer" + }, + "service": { + "description": "Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md). If this is not specified, the default behavior is defined by gRPC.", + "type": "string" + } + }, + "type": "object" + }, + "GoogleRpcStatus": { + "description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "GoogleRpcStatus", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "HTTPGetAction": { + "description": "Not supported by Cloud Run HTTPGetAction describes an action based on HTTP Get requests.", + "id": "HTTPGetAction", + "properties": { + "host": { + "description": "(Optional) Host name to connect to, defaults to the pod IP. You probably want to set \"Host\" in httpHeaders instead.", + "type": "string" + }, + "httpHeaders": { + "description": "(Optional) Custom headers to set in the request. HTTP allows repeated headers.", + "items": { + "$ref": "HTTPHeader" + }, + "type": "array" + }, + "path": { + "description": "(Optional) Path to access on the HTTP server.", + "type": "string" + }, + "scheme": { + "description": "(Optional) Scheme to use for connecting to the host. Defaults to HTTP.", + "type": "string" + } + }, + "type": "object" + }, + "HTTPHeader": { + "description": "Not supported by Cloud Run HTTPHeader describes a custom header to be used in HTTP probes", + "id": "HTTPHeader", + "properties": { + "name": { + "description": "The header field name", + "type": "string" + }, + "value": { + "description": "The header field value", + "type": "string" + } + }, + "type": "object" + }, + "InstanceAttemptResult": { + "description": "Result of an instance attempt.", + "id": "InstanceAttemptResult", + "properties": { + "exitCode": { + "description": "Optional. The exit code of this attempt. This may be unset if the container was unable to exit cleanly with a code due to some other failure. See status field for possible failure details.", + "format": "int32", + "type": "integer" + }, + "status": { + "$ref": "GoogleRpcStatus", + "description": "Optional. The status of this attempt. If the status code is OK, then the attempt succeeded." + } + }, + "type": "object" + }, + "InstanceSpec": { + "description": "InstanceSpec is a description of an instance.", + "id": "InstanceSpec", + "properties": { + "activeDeadlineSeconds": { + "description": "Optional. Optional duration in seconds the instance may be active relative to StartTime before the system will actively try to mark it failed and kill associated containers. If set to zero, the system will never attempt to kill an instance based on time. Otherwise, value must be a positive integer. +optional", + "format": "int64", + "type": "string" + }, + "containers": { + "description": "Optional. List of containers belonging to the instance. We disallow a number of fields on this Container. Only a single container may be provided.", + "items": { + "$ref": "Container" + }, + "type": "array" + }, + "restartPolicy": { + "description": "Optional. Restart policy for all containers within the instance. Allowed values are: - OnFailure: Instances will always be restarted on failure if the backoffLimit has not been reached. - Never: Instances are never restarted and all failures are permanent. Cannot be used if backoffLimit is set. +optional", + "type": "string" + }, + "serviceAccountName": { + "description": "Optional. Email address of the IAM service account associated with the instance of a Job. The service account represents the identity of the running instance, and determines what permissions the instance has. If not provided, the instance will use the project's default service account. +optional", + "type": "string" + }, + "terminationGracePeriodSeconds": { + "description": "Optional. Optional duration in seconds the instance needs to terminate gracefully. Value must be non-negative integer. The value zero indicates delete immediately. The grace period is the duration in seconds after the processes running in the instance are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. +optional", + "format": "int64", + "type": "string" + }, + "volumes": { + "description": "Optional. List of volumes that can be mounted by containers belonging to the instance. More info: https://kubernetes.io/docs/concepts/storage/volumes +optional", + "items": { + "$ref": "Volume" + }, + "type": "array" + } + }, + "type": "object" + }, + "InstanceStatus": { + "description": "Instance represents the status of an instance of a Job.", + "id": "InstanceStatus", + "properties": { + "completionTime": { + "description": "Optional. Represents time when the instance was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional", + "format": "google-datetime", + "type": "string" + }, + "failed": { + "description": "Optional. The number of times this instance exited with code > 0; +optional", + "format": "int32", + "type": "integer" + }, + "index": { + "description": "Required. Index of the instance, unique per Job, and beginning at 0.", + "format": "int32", + "type": "integer" + }, + "lastAttemptResult": { + "$ref": "InstanceAttemptResult", + "description": "Optional. Result of the last attempt of this instance. +optional" + }, + "lastExitCode": { + "description": "Optional. Last exit code seen for this instance. +optional", + "format": "int32", + "type": "integer" + }, + "restarted": { + "description": "Optional. The number of times this instance was restarted. Instances are restarted according the restartPolicy configured in the Job template. +optional", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Optional. Represents time when the instance was created by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional", + "format": "google-datetime", + "type": "string" + }, + "succeeded": { + "description": "Optional. The number of times this instance exited with code == 0. +optional", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "InstanceTemplateSpec": { + "description": "InstanceTemplateSpec describes the data an instance should have when created from a template.", + "id": "InstanceTemplateSpec", + "properties": { + "spec": { + "$ref": "InstanceSpec", + "description": "Optional. Specification of the desired behavior of the instance. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +optional" + } + }, + "type": "object" + }, + "Job": { + "description": "Job represents the configuration of a single job. A job an immutable resource that references a container image which is run to completion.", + "id": "Job", + "properties": { + "apiVersion": { + "description": "Optional. APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources +optional", + "type": "string" + }, + "kind": { + "description": "Optional. Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds +optional", + "type": "string" + }, + "metadata": { + "$ref": "ObjectMeta", + "description": "Optional. Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata +optional" + }, + "spec": { + "$ref": "JobSpec", + "description": "Optional. Specification of the desired behavior of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status +optional" + }, + "status": { + "$ref": "JobStatus", + "description": "Optional. Current status of a job. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status +optional" + } + }, + "type": "object" + }, + "JobCondition": { + "description": "JobCondition defines a readiness condition for a Revision.", + "id": "JobCondition", + "properties": { + "lastTransitionTime": { + "description": "Optional. Last time the condition transitioned from one status to another.", + "format": "google-datetime", + "type": "string" + }, + "message": { + "description": "Optional. Human readable message indicating details about the current status.", + "type": "string" + }, + "reason": { + "description": "Optional. One-word CamelCase reason for the condition's last transition.", + "type": "string" + }, + "severity": { + "description": "Optional. How to interpret failures of this condition, one of Error, Warning, Info", + "type": "string" + }, + "status": { + "description": "Required. Status of the condition, one of True, False, Unknown.", + "type": "string" + }, + "type": { + "description": "Required. Type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types include: * \"Completed\": True when the Job has successfully completed. * \"Started\": True when the Job has successfully started running. * \"ResourcesAvailable\": True when underlying resources have been provisioned.", + "type": "string" + } + }, + "type": "object" + }, + "JobSpec": { + "description": "JobSpec describes how the job execution will look like.", + "id": "JobSpec", + "properties": { + "activeDeadlineSeconds": { + "description": "Optional. Not supported. Specifies the duration in seconds relative to the startTime that the job may be active before the system tries to terminate it. If set to zero, the system will never attempt to terminate the job based on time. Otherwise, the value must be positive integer. +optional", + "format": "int64", + "type": "string" + }, + "backoffLimit": { + "description": "Optional. Specifies the number of retries per instance, before marking this job failed. If set to zero, instances will never retry on failure. +optional", + "format": "int32", + "type": "integer" + }, + "completions": { + "description": "Optional. Specifies the desired number of successfully finished instances the job should be run with. Setting to 1 means that parallelism is limited to 1 and the success of that instance signals the success of the job. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +optional", + "format": "int32", + "type": "integer" + }, + "parallelism": { + "description": "Optional. Specifies the maximum desired number of instances the job should run at any given time. Must be <= completions. The actual number of instances running in steady state will be less than this number when ((.spec.completions - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +optional", + "format": "int32", + "type": "integer" + }, + "template": { + "$ref": "InstanceTemplateSpec", + "description": "Optional. Describes the instance that will be created when executing a job." + }, + "ttlSecondsAfterFinished": { + "description": "Optional. Not supported. ttlSecondsAfterFinished limits the lifetime of a Job that has finished execution (either Complete or Failed). If this field is set, ttlSecondsAfterFinished after the Job finishes, it is eligible to be automatically deleted. When the Job is being deleted, its lifecycle guarantees (e.g. finalizers) will be honored. If this field is set to zero, the Job won't be automatically deleted. +optional", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "JobStatus": { + "description": "JobStatus represents the current state of a Job.", + "id": "JobStatus", + "properties": { + "active": { + "description": "Optional. The number of actively running instances. +optional", + "format": "int32", + "type": "integer" + }, + "completionTime": { + "description": "Optional. Represents time when the job was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional", + "format": "google-datetime", + "type": "string" + }, + "conditions": { + "description": "Optional. The latest available observations of a job's current state. More info: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/ +optional", + "items": { + "$ref": "JobCondition" + }, + "type": "array" + }, + "failed": { + "description": "Optional. The number of instances which reached phase Failed. +optional", + "format": "int32", + "type": "integer" + }, + "imageDigest": { + "description": "Optional. ImageDigest holds the resolved digest for the image specified within .Spec.Template.Spec.Container.Image. The digest is resolved during the creation of the Job. This field holds the digest value regardless of whether a tag or digest was originally specified in the Container object.", + "type": "string" + }, + "instances": { + "description": "Optional. Status of completed, failed, and running instances. +optional", + "items": { + "$ref": "InstanceStatus" + }, + "type": "array" + }, + "observedGeneration": { + "description": "Optional. The 'generation' of the job that was last processed by the controller.", + "format": "int32", + "type": "integer" + }, + "startTime": { + "description": "Optional. Represents time when the job was acknowledged by the job controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. +optional", + "format": "google-datetime", + "type": "string" + }, + "succeeded": { + "description": "Optional. The number of instances which reached phase Succeeded. +optional", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "KeyToPath": { + "description": "Maps a string key to a path within a volume.", + "id": "KeyToPath", + "properties": { + "key": { + "description": "The Cloud Secret Manager secret version. Can be 'latest' for the latest value or an integer for a specific version. The key to project.", + "type": "string" + }, + "mode": { + "description": "(Optional) Mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "format": "int32", + "type": "integer" + }, + "path": { + "description": "The relative path of the file to map the key to. May not be an absolute path. May not contain the path element '..'. May not start with the string '..'.", + "type": "string" + } + }, + "type": "object" + }, + "ListJobsResponse": { + "description": "ListJobsResponse is a list of Jobs resources.", + "id": "ListJobsResponse", + "properties": { + "apiVersion": { + "description": "The API version for this call such as \"run.googleapis.com/v1alpha1\".", + "type": "string" + }, + "items": { + "description": "List of Jobs.", + "items": { + "$ref": "Job" + }, + "type": "array" + }, + "kind": { + "description": "The kind of this resource, in this case \"JobsList\".", + "type": "string" + }, + "metadata": { + "$ref": "ListMeta", + "description": "Metadata associated with this jobs list." + }, + "nextPageToken": { + "description": "This field is equivalent to the metadata.continue field and is provided as a convenience for compatibility with https://google.aip.dev/158. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The metadata.resourceVersion field returned when using this field will be identical to the value in the first response.", + "type": "string" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object" + }, + "ListMeta": { + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}.", + "id": "ListMeta", + "properties": { + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response.", + "type": "string" + }, + "resourceVersion": { + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency +optional", + "type": "string" + }, + "selfLink": { + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only. +optional", + "type": "string" + } + }, + "type": "object" + }, + "LocalObjectReference": { + "description": "Not supported by Cloud Run LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.", + "id": "LocalObjectReference", + "properties": { + "name": { + "description": "(Optional) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names", + "type": "string" + } + }, + "type": "object" + }, + "ObjectMeta": { + "description": "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create.", + "id": "ObjectMeta", + "properties": { + "annotations": { + "additionalProperties": { + "type": "string" + }, + "description": "(Optional) Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations", + "type": "object" + }, + "clusterName": { + "description": "(Optional) Not supported by Cloud Run The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request.", + "type": "string" + }, + "creationTimestamp": { + "description": "(Optional) CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "format": "google-datetime", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "description": "(Optional) Not supported by Cloud Run Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only.", + "format": "int32", + "type": "integer" + }, + "deletionTimestamp": { + "description": "(Optional) Not supported by Cloud Run DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "format": "google-datetime", + "type": "string" + }, + "finalizers": { + "description": "(Optional) Not supported by Cloud Run Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. +patchStrategy=merge", + "items": { + "type": "string" + }, + "type": "array" + }, + "generateName": { + "description": "(Optional) Not supported by Cloud Run GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency string generateName = 2;", + "type": "string" + }, + "generation": { + "description": "(Optional) A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "format": "int32", + "type": "integer" + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "(Optional) Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: https://kubernetes.io/docs/user-guide/labels", + "type": "object" + }, + "name": { + "description": "Name must be unique within a namespace, within a Cloud Run region. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: https://kubernetes.io/docs/user-guide/identifiers#names +optional", + "type": "string" + }, + "namespace": { + "description": "Namespace defines the space within each name must be unique, within a Cloud Run region. In Cloud Run the namespace must be equal to either the project ID or project number.", + "type": "string" + }, + "ownerReferences": { + "description": "(Optional) Not supported by Cloud Run List of objects that own this object. If ALL objects in the list have been deleted, this object will be garbage collected.", + "items": { + "$ref": "OwnerReference" + }, + "type": "array" + }, + "resourceVersion": { + "description": "Optional. An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server or omit the value to disable conflict-detection. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients or omitted. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "selfLink": { + "description": "(Optional) SelfLink is a URL representing this object. Populated by the system. Read-only. string selfLink = 4;", + "type": "string" + }, + "uid": { + "description": "(Optional) UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: https://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + }, + "type": "object" + }, + "OwnerReference": { + "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field.", + "id": "OwnerReference", + "properties": { + "apiVersion": { + "description": "API version of the referent.", + "type": "string" + }, + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. +optional", + "type": "boolean" + }, + "controller": { + "description": "If true, this reference points to the managing controller. +optional", + "type": "boolean" + }, + "kind": { + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + "type": "string" + }, + "name": { + "description": "Name of the referent. More info: https://kubernetes.io/docs/user-guide/identifiers#names", + "type": "string" + }, + "uid": { + "description": "UID of the referent. More info: https://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + } + }, + "type": "object" + }, + "Probe": { + "description": "Not supported by Cloud Run Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", + "id": "Probe", + "properties": { + "exec": { + "$ref": "ExecAction", + "description": "(Optional) Not supported by Cloud Run One and only one of the following should be specified. Exec specifies the action to take. A field inlined from the Handler message." + }, + "failureThreshold": { + "description": "(Optional) Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", + "format": "int32", + "type": "integer" + }, + "grpc": { + "$ref": "GRPCAction", + "description": "(Optional) GRPCAction specifies an action involving a GRPC port. A field inlined from the Handler message." + }, + "httpGet": { + "$ref": "HTTPGetAction", + "description": "(Optional) HTTPGet specifies the http request to perform. A field inlined from the Handler message." + }, + "initialDelaySeconds": { + "description": "(Optional) Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "format": "int32", + "type": "integer" + }, + "periodSeconds": { + "description": "(Optional) How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.", + "format": "int32", + "type": "integer" + }, + "successThreshold": { + "description": "(Optional) Minimum consecutive successes for the probe to be considered successful after having failed. Must be 1 if set.", + "format": "int32", + "type": "integer" + }, + "tcpSocket": { + "$ref": "TCPSocketAction", + "description": "(Optional) TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported A field inlined from the Handler message." + }, + "timeoutSeconds": { + "description": "(Optional) Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds. More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle#container-probes", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ResourceRequirements": { + "description": "ResourceRequirements describes the compute resource requirements.", + "id": "ResourceRequirements", + "properties": { + "limits": { + "additionalProperties": { + "type": "string" + }, + "description": "(Optional) Only memory and CPU are supported. Limits describes the maximum amount of compute resources allowed. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go", + "type": "object" + }, + "requests": { + "additionalProperties": { + "type": "string" + }, + "description": "(Optional) Only memory and CPU are supported. Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. The values of the map is string form of the 'quantity' k8s type: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go", + "type": "object" + } + }, + "type": "object" + }, + "SecretEnvSource": { + "description": "Not supported by Cloud Run SecretEnvSource selects a Secret to populate the environment variables with. The contents of the target Secret's Data field will represent the key-value pairs as environment variables.", + "id": "SecretEnvSource", + "properties": { + "localObjectReference": { + "$ref": "LocalObjectReference", + "description": "This field should not be used directly as it is meant to be inlined directly into the message. Use the \"name\" field instead." + }, + "name": { + "description": "The Secret to select from.", + "type": "string" + }, + "optional": { + "description": "(Optional) Specify whether the Secret must be defined", + "type": "boolean" + } + }, + "type": "object" + }, + "SecretKeySelector": { + "description": "SecretKeySelector selects a key of a Secret.", + "id": "SecretKeySelector", + "properties": { + "key": { + "description": "A Cloud Secret Manager secret version. Must be 'latest' for the latest version or an integer for a specific version. The key of the secret to select from. Must be a valid secret key.", + "type": "string" + }, + "localObjectReference": { + "$ref": "LocalObjectReference", + "description": "This field should not be used directly as it is meant to be inlined directly into the message. Use the \"name\" field instead." + }, + "name": { + "description": "The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project. If the secret is in another project, you must define an alias. An alias definition has the form: :projects//secrets/. If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation. The name of the secret in the pod's namespace to select from.", + "type": "string" + }, + "optional": { + "description": "(Optional) Specify whether the Secret or its key must be defined", + "type": "boolean" + } + }, + "type": "object" + }, + "SecretVolumeSource": { + "description": "The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret_name. The contents of the target Secret's Data field will be presented in a volume as files using the keys in the Data field as the file names.", + "id": "SecretVolumeSource", + "properties": { + "defaultMode": { + "description": "Integer representation of mode bits to use on created files by default. Must be a value between 01 and 0777 (octal). If 0 or not set, it will default to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", + "format": "int32", + "type": "integer" + }, + "items": { + "description": "(Optional) If unspecified, the volume will expose a file whose name is the secret_name. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a key and a path. If unspecified, each key-value pair in the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified that is not present in the Secret, the volume setup will error unless it is marked optional.", + "items": { + "$ref": "KeyToPath" + }, + "type": "array" + }, + "optional": { + "description": "(Optional) Specify whether the Secret or its keys must be defined.", + "type": "boolean" + }, + "secretName": { + "description": "The name of the secret in Cloud Secret Manager. By default, the secret is assumed to be in the same project. If the secret is in another project, you must define an alias. An alias definition has the form: :projects//secrets/. If multiple alias definitions are needed, they must be separated by commas. The alias definitions must be set on the run.googleapis.com/secrets annotation. Name of the secret in the container's namespace to use.", + "type": "string" + } + }, + "type": "object" + }, + "SecurityContext": { + "description": "Not supported by Cloud Run SecurityContext holds security configuration that will be applied to a container. Some fields are present in both SecurityContext and PodSecurityContext. When both are set, the values in SecurityContext take precedence.", + "id": "SecurityContext", + "properties": { + "runAsUser": { + "description": "(Optional) The UID to run the entrypoint of the container process. Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TCPSocketAction": { + "description": "Not supported by Cloud Run TCPSocketAction describes an action based on opening a socket", + "id": "TCPSocketAction", + "properties": { + "host": { + "description": "(Optional) Optional: Host name to connect to, defaults to the pod IP.", + "type": "string" + }, + "port": { + "description": "Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME. This field is currently limited to integer types only because of proto's inability to properly support the IntOrString golang type.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Volume": { + "description": "Volume represents a named volume in a container.", + "id": "Volume", + "properties": { + "configMap": { + "$ref": "ConfigMapVolumeSource" + }, + "name": { + "description": "Volume's name. In Cloud Run Fully Managed, the name 'cloudsql' is reserved.", + "type": "string" + }, + "secret": { + "$ref": "SecretVolumeSource" + } + }, + "type": "object" + }, + "VolumeMount": { + "description": "VolumeMount describes a mounting of a Volume within a container.", + "id": "VolumeMount", + "properties": { + "mountPath": { + "description": "Path within the container at which the volume should be mounted. Must not contain ':'.", + "type": "string" + }, + "name": { + "description": "The name of the volume. There must be a corresponding Volume with the same name.", + "type": "string" + }, + "readOnly": { + "description": "(Optional) Only true is accepted. Defaults to true.", + "type": "boolean" + }, + "subPath": { + "description": "(Optional) Path within the volume from which the container's volume should be mounted. Defaults to \"\" (volume's root).", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Run Admin API", + "version": "v1alpha1", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..ed4980757d8383e785f47328f3fd92c4fd4d6a5a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v1beta1.json @@ -0,0 +1,898 @@ +{ + "description": "Deploy and manage user provided container images that scale automatically based on HTTP traffic.", + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + } + } + } + }, + "id": "run:v1beta1", + "mtlsRootUrl": "https://run.mtls.googleapis.com/", + "version": "v1beta1", + "basePath": "", + "protocol": "rest", + "name": "run", + "canonicalName": "Cloud Run", + "servicePath": "", + "resources": { + "namespaces": { + "resources": { + "customresourcedefinitions": { + "methods": { + "get": { + "description": "Rpc to get information about a CustomResourceDefinition.", + "httpMethod": "GET", + "id": "run.namespaces.customresourcedefinitions.get", + "path": "apis/apiextensions.k8s.io/v1beta1/{+name}", + "flatPath": "apis/apiextensions.k8s.io/v1beta1/namespaces/{namespacesId}/customresourcedefinitions/{customresourcedefinitionsId}", + "parameters": { + "name": { + "location": "path", + "required": true, + "type": "string", + "pattern": "^namespaces/[^/]+/customresourcedefinitions/[^/]+$", + "description": "The name of the CustomResourceDefinition being retrieved. If needed, replace {namespace_id} with the project ID." + } + }, + "parameterOrder": [ + "name" + ], + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "response": { + "$ref": "CustomResourceDefinition" + } + } + } + } + } + }, + "customresourcedefinitions": { + "methods": { + "list": { + "parameterOrder": [], + "path": "apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions", + "description": "Rpc to list custom resource definitions.", + "id": "run.customresourcedefinitions.list", + "httpMethod": "GET", + "parameters": { + "limit": { + "type": "integer", + "format": "int32", + "location": "query" + }, + "labelSelector": { + "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn.", + "type": "string", + "location": "query" + }, + "watch": { + "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", + "type": "boolean", + "location": "query" + }, + "continue": { + "location": "query", + "type": "string", + "description": "Optional encoded string to continue paging." + }, + "parent": { + "type": "string", + "description": "The project ID or project number from which the storages should be listed.", + "location": "query" + }, + "fieldSelector": { + "location": "query", + "type": "string", + "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run." + }, + "includeUninitialized": { + "type": "boolean", + "description": "Not currently used by Cloud Run.", + "location": "query" + }, + "resourceVersion": { + "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", + "type": "string", + "location": "query" + } + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "response": { + "$ref": "ListCustomResourceDefinitionsResponse" + }, + "flatPath": "apis/apiextensions.k8s.io/v1beta1/customresourcedefinitions" + } + } + }, + "projects": { + "resources": { + "locations": { + "resources": { + "customresourcedefinitions": { + "methods": { + "list": { + "path": "v1beta1/{+parent}/customresourcedefinitions", + "parameterOrder": [ + "parent" + ], + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/customresourcedefinitions", + "id": "run.projects.locations.customresourcedefinitions.list", + "description": "Rpc to list custom resource definitions.", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "httpMethod": "GET", + "response": { + "$ref": "ListCustomResourceDefinitionsResponse" + }, + "parameters": { + "continue": { + "description": "Optional encoded string to continue paging.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "The project ID or project number from which the storages should be listed.", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string", + "location": "path" + }, + "limit": { + "format": "int32", + "type": "integer", + "location": "query" + }, + "includeUninitialized": { + "type": "boolean", + "description": "Not currently used by Cloud Run.", + "location": "query" + }, + "resourceVersion": { + "description": "The baseline resource version from which the list or watch operation should start. Not currently used by Cloud Run.", + "location": "query", + "type": "string" + }, + "labelSelector": { + "type": "string", + "location": "query", + "description": "Allows to filter resources based on a label. Supported operations are =, !=, exists, in, and notIn." + }, + "fieldSelector": { + "type": "string", + "description": "Allows to filter resources based on a specific value for a field name. Send this in a query string format. i.e. 'metadata.name%3Dlorem'. Not currently used by Cloud Run.", + "location": "query" + }, + "watch": { + "description": "Flag that indicates that the client expects to watch this resource as well. Not currently used by Cloud Run.", + "location": "query", + "type": "boolean" + } + } + }, + "get": { + "parameters": { + "name": { + "location": "path", + "description": "The name of the CustomResourceDefinition being retrieved. If needed, replace {namespace_id} with the project ID.", + "type": "string", + "required": true, + "pattern": "^projects/[^/]+/locations/[^/]+/customresourcedefinitions/[^/]+$" + } + }, + "path": "v1beta1/{+name}", + "parameterOrder": [ + "name" + ], + "description": "Rpc to get information about a CustomResourceDefinition.", + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ], + "response": { + "$ref": "CustomResourceDefinition" + }, + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/customresourcedefinitions/{customresourcedefinitionsId}", + "id": "run.projects.locations.customresourcedefinitions.get", + "httpMethod": "GET" + } + } + } + } + } + } + } + }, + "ownerName": "Google", + "ownerDomain": "google.com", + "fullyEncodeReservedExpansion": true, + "title": "Cloud Run Admin API", + "parameters": { + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "type": "string", + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query" + }, + "callback": { + "description": "JSONP", + "type": "string", + "location": "query" + }, + "prettyPrint": { + "description": "Returns response with indentations and line breaks.", + "type": "boolean", + "default": "true", + "location": "query" + }, + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "fields": { + "type": "string", + "location": "query", + "description": "Selector specifying which fields to include in a partial response." + }, + "key": { + "location": "query", + "type": "string", + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token." + }, + "alt": { + "default": "json", + "location": "query", + "enum": [ + "json", + "media", + "proto" + ], + "description": "Data format for response.", + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "type": "string" + }, + "upload_protocol": { + "location": "query", + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "access_token": { + "type": "string", + "location": "query", + "description": "OAuth access token." + } + }, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "baseUrl": "https://run.googleapis.com/", + "rootUrl": "https://run.googleapis.com/", + "schemas": { + "CustomResourceDefinitionSpec": { + "properties": { + "subresources": { + "$ref": "CustomResourceSubresources", + "description": "Subresources describes the subresources for CustomResources +optional" + }, + "version": { + "description": "Version is the version this resource belongs in Should be always first item in Versions field if provided. Optional, but at least one of Version or Versions must be set. Deprecated: Please use `Versions`. +optional", + "type": "string" + }, + "scope": { + "type": "string", + "description": "Scope indicates whether this resource is cluster or namespace scoped. Default is namespaced" + }, + "validation": { + "description": "Validation describes the validation methods for CustomResources +optional", + "$ref": "CustomResourceValidation" + }, + "names": { + "$ref": "CustomResourceDefinitionNames", + "description": "Names are the names used to describe this custom resource" + }, + "versions": { + "type": "array", + "items": { + "$ref": "CustomResourceDefinitionVersion" + }, + "description": "Versions is the list of all supported versions for this resource. If Version field is provided, this field is optional. Validation: All versions must use the same validation schema for now. i.e., top level Validation field is applied to all of these versions. Order: The version name will be used to compute the order. If the version string is \"kube-like\", it will sort above non \"kube-like\" version strings, which are ordered lexicographically. \"Kube-like\" versions start with a \"v\", then are followed by a number (the major version), then optionally the string \"alpha\" or \"beta\" and another number (the minor version). These are sorted first by GA \u003e beta \u003e alpha (where GA is a version with no suffix such as beta or alpha), and then by comparing major version, then minor version. An example sorted list of versions: v10, v2, v1, v11beta2, v10beta3, v3beta1, v12alpha1, v11alpha2, foo1, foo10. +optional" + }, + "additionalPrinterColumns": { + "type": "array", + "items": { + "$ref": "CustomResourceColumnDefinition" + }, + "description": "AdditionalPrinterColumns are additional columns shown e.g. in kubectl next to the name. Defaults to a created-at column. +optional" + }, + "group": { + "type": "string", + "description": "Group is the group this resource belongs in" + } + }, + "type": "object", + "id": "CustomResourceDefinitionSpec", + "description": "CustomResourceDefinitionSpec describes how a user wants their resource to appear" + }, + "JSON": { + "properties": { + "raw": { + "format": "byte", + "type": "string" + } + }, + "id": "JSON", + "type": "object", + "description": "JSON represents any valid JSON value. These types are supported: bool, int64, float64, string, []interface{}, map[string]interface{} and nil." + }, + "JSONSchemaProps": { + "id": "JSONSchemaProps", + "description": "JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).", + "type": "object", + "properties": { + "minProperties": { + "format": "int64", + "type": "string" + }, + "dependencies": { + "additionalProperties": { + "$ref": "JSONSchemaPropsOrStringArray" + }, + "type": "object" + }, + "minItems": { + "format": "int64", + "type": "string" + }, + "default": { + "$ref": "JSON" + }, + "required": { + "items": { + "type": "string" + }, + "type": "array" + }, + "maximum": { + "format": "double", + "type": "number" + }, + "additionalItems": { + "$ref": "JSONSchemaPropsOrBool" + }, + "ref": { + "type": "string" + }, + "description": { + "type": "string" + }, + "minimum": { + "format": "double", + "type": "number" + }, + "schema": { + "type": "string" + }, + "maxProperties": { + "format": "int64", + "type": "string" + }, + "items": { + "$ref": "JSONSchemaPropsOrArray" + }, + "additionalProperties": { + "$ref": "JSONSchemaPropsOrBool" + }, + "id": { + "type": "string" + }, + "pattern": { + "type": "string" + }, + "multipleOf": { + "type": "number", + "format": "double" + }, + "patternProperties": { + "additionalProperties": { + "$ref": "JSONSchemaProps" + }, + "type": "object" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + }, + "maxItems": { + "format": "int64", + "type": "string" + }, + "not": { + "$ref": "JSONSchemaProps" + }, + "oneOf": { + "items": { + "$ref": "JSONSchemaProps" + }, + "type": "array" + }, + "title": { + "type": "string" + }, + "uniqueItems": { + "type": "boolean" + }, + "definitions": { + "additionalProperties": { + "$ref": "JSONSchemaProps" + }, + "type": "object" + }, + "properties": { + "type": "object", + "additionalProperties": { + "$ref": "JSONSchemaProps" + } + }, + "minLength": { + "type": "string", + "format": "int64" + }, + "type": { + "type": "string" + }, + "externalDocs": { + "$ref": "ExternalDocumentation" + }, + "example": { + "$ref": "JSON" + }, + "anyOf": { + "items": { + "$ref": "JSONSchemaProps" + }, + "type": "array" + }, + "exclusiveMinimum": { + "type": "boolean" + }, + "maxLength": { + "type": "string", + "format": "int64" + }, + "format": { + "type": "string" + }, + "exclusiveMaximum": { + "type": "boolean" + }, + "allOf": { + "type": "array", + "items": { + "$ref": "JSONSchemaProps" + } + } + } + }, + "CustomResourceColumnDefinition": { + "type": "object", + "id": "CustomResourceColumnDefinition", + "description": "CustomResourceColumnDefinition specifies a column for server side printing.", + "properties": { + "priority": { + "description": "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority. +optional", + "format": "int32", + "type": "integer" + }, + "jsonPath": { + "description": "JSONPath is a simple JSON path, i.e. with array notation.", + "type": "string" + }, + "name": { + "type": "string", + "description": "name is a human readable name for the column." + }, + "format": { + "type": "string", + "description": "format is an optional OpenAPI type definition for this column. The 'name' format is applied to the primary identifier column to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more. +optional" + }, + "type": { + "description": "type is an OpenAPI type definition for this column. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + "type": "string" + }, + "description": { + "description": "description is a human readable description of this column. +optional", + "type": "string" + } + } + }, + "ListMeta": { + "type": "object", + "id": "ListMeta", + "properties": { + "selfLink": { + "type": "string", + "description": "SelfLink is a URL representing this object. Populated by the system. Read-only. +optional" + }, + "resourceVersion": { + "type": "string", + "description": "String that identifies the server's internal version of this object that can be used by clients to determine when objects have changed. Value must be treated as opaque by clients and passed unmodified back to the server. Populated by the system. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency +optional" + }, + "continue": { + "description": "continue may be set if the user set a limit on the number of items returned, and indicates that the server has more data available. The value is opaque and may be used to issue another request to the endpoint that served this list to retrieve the next set of available objects. Continuing a list may not be possible if the server configuration has changed or more than a few minutes have passed. The resourceVersion field returned when using this continue value will be identical to the value in the first response.", + "type": "string" + } + }, + "description": "ListMeta describes metadata that synthetic resources must have, including lists and various status objects. A resource may have only one of {ObjectMeta, ListMeta}." + }, + "CustomResourceDefinitionVersion": { + "type": "object", + "id": "CustomResourceDefinitionVersion", + "properties": { + "served": { + "type": "boolean", + "description": "Served is a flag enabling/disabling this version from being served via REST APIs" + }, + "storage": { + "type": "boolean", + "description": "Storage flags the version as storage version. There must be exactly one flagged as storage version." + }, + "name": { + "type": "string", + "description": "Name is the version name, e.g. “v1”, “v2beta1”, etc." + } + } + }, + "JSONSchemaPropsOrStringArray": { + "properties": { + "schema": { + "$ref": "JSONSchemaProps" + }, + "property": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "type": "object", + "description": "JSONSchemaPropsOrStringArray represents a JSONSchemaProps or a string array.", + "id": "JSONSchemaPropsOrStringArray" + }, + "CustomResourceSubresourceStatus": { + "properties": {}, + "type": "object", + "description": "CustomResourceSubresourceStatus defines how to serve the status subresource for CustomResources. Status is represented by the `.status` JSON path inside of a CustomResource. When set, * exposes a /status subresource for the custom resource * PUT requests to the /status subresource take a custom resource object, and ignore changes to anything except the status stanza * PUT/POST/PATCH requests to the custom resource ignore changes to the status stanza", + "id": "CustomResourceSubresourceStatus" + }, + "CustomResourceSubresources": { + "description": "CustomResourceSubresources defines the status and scale subresources for CustomResources.", + "properties": { + "status": { + "description": "Status denotes the status subresource for CustomResources +optional", + "$ref": "CustomResourceSubresourceStatus" + }, + "scale": { + "$ref": "CustomResourceSubresourceScale", + "description": "Scale denotes the scale subresource for CustomResources +optional" + } + }, + "type": "object", + "id": "CustomResourceSubresources" + }, + "CustomResourceSubresourceScale": { + "description": "CustomResourceSubresourceScale defines how to serve the scale subresource for CustomResources.", + "type": "object", + "id": "CustomResourceSubresourceScale", + "properties": { + "statusReplicasPath": { + "type": "string", + "description": "StatusReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. If there is no value under the given path in the CustomResource, the status replica value in the /scale subresource will default to 0." + }, + "specReplicasPath": { + "type": "string", + "description": "SpecReplicasPath defines the JSON path inside of a CustomResource that corresponds to Scale.Spec.Replicas. Only JSON paths without the array notation are allowed. Must be a JSON Path under .spec. If there is no value under the given path in the CustomResource, the /scale subresource will return an error on GET." + }, + "labelSelectorPath": { + "description": "LabelSelectorPath defines the JSON path inside of a CustomResource that corresponds to Scale.Status.Selector. Only JSON paths without the array notation are allowed. Must be a JSON Path under .status. Must be set to work with HPA. If there is no value under the given path in the CustomResource, the status label selector value in the /scale subresource will default to the empty string. +optional", + "type": "string" + } + } + }, + "CustomResourceDefinition": { + "description": "CustomResourceDefinition represents a resource that should be exposed on the API server. Its name MUST be in the format \u003c.spec.name\u003e.\u003c.spec.group\u003e.", + "properties": { + "metadata": { + "description": "Metadata associated with this CustomResourceDefinition.", + "$ref": "ObjectMeta" + }, + "spec": { + "description": "Spec describes how the user wants the resources to appear", + "$ref": "CustomResourceDefinitionSpec" + }, + "apiVersion": { + "description": "The API version for this call such as \"k8s.apiextensions.io/v1beta1\".", + "type": "string" + }, + "kind": { + "description": "The kind of resource, in this case always \"CustomResourceDefinition\".", + "type": "string" + } + }, + "type": "object", + "id": "CustomResourceDefinition" + }, + "CustomResourceDefinitionNames": { + "type": "object", + "id": "CustomResourceDefinitionNames", + "description": "CustomResourceDefinitionNames indicates the names to serve this CustomResourceDefinition", + "properties": { + "listKind": { + "type": "string", + "description": "ListKind is the serialized kind of the list for this resource. Defaults to List. +optional" + }, + "categories": { + "type": "array", + "description": "Categories is a list of grouped resources custom resources belong to (e.g. 'all') +optional", + "items": { + "type": "string" + } + }, + "plural": { + "type": "string", + "description": "Plural is the plural name of the resource to serve. It must match the name of the CustomResourceDefinition-registration too: plural.group and it must be all lowercase." + }, + "shortNames": { + "type": "array", + "items": { + "type": "string" + }, + "description": "ShortNames are short names for the resource. It must be all lowercase. +optional" + }, + "kind": { + "description": "Kind is the serialized kind of the resource. It is normally CamelCase and singular.", + "type": "string" + }, + "singular": { + "description": "Singular is the singular name of the resource. It must be all lowercase Defaults to lowercased +optional", + "type": "string" + } + } + }, + "OwnerReference": { + "id": "OwnerReference", + "type": "object", + "properties": { + "blockOwnerDeletion": { + "description": "If true, AND if the owner has the \"foregroundDeletion\" finalizer, then the owner cannot be deleted from the key-value store until this reference is removed. Defaults to false. To set this field, a user needs \"delete\" permission of the owner, otherwise 422 (Unprocessable Entity) will be returned. +optional", + "type": "boolean" + }, + "uid": { + "description": "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + }, + "kind": { + "type": "string", + "description": "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds" + }, + "apiVersion": { + "type": "string", + "description": "API version of the referent." + }, + "controller": { + "type": "boolean", + "description": "If true, this reference points to the managing controller. +optional" + }, + "name": { + "type": "string", + "description": "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names" + } + }, + "description": "OwnerReference contains enough information to let you identify an owning object. Currently, an owning object must be in the same namespace, so there is no namespace field." + }, + "ObjectMeta": { + "properties": { + "generation": { + "description": "(Optional) A sequence number representing a specific generation of the desired state. Populated by the system. Read-only.", + "type": "integer", + "format": "int32" + }, + "deletionTimestamp": { + "type": "string", + "format": "google-datetime", + "description": "(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported DeletionTimestamp is RFC 3339 date and time at which this resource will be deleted. This field is set by the server when a graceful deletion is requested by the user, and is not directly settable by a client. The resource is expected to be deleted (no longer visible from resource lists, and not reachable by name) after the time in this field, once the finalizers list is empty. As long as the finalizers list contains items, deletion is blocked. Once the deletionTimestamp is set, this value may not be unset or be set further into the future, although it may be shortened or the resource may be deleted prior to this time. For example, a user may request that a pod is deleted in 30 seconds. The Kubelet will react by sending a graceful termination signal to the containers in the pod. After that 30 seconds, the Kubelet will send a hard termination signal (SIGKILL) to the container and after cleanup, remove the pod from the API. In the presence of network partitions, this object may still exist after this timestamp, until an administrator or automated process can determine the resource is fully terminated. If not set, graceful deletion of the object has not been requested. Populated by the system when a graceful deletion is requested. Read-only. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata" + }, + "uid": { + "description": "(Optional) UID is the unique in time and space value for this object. It is typically generated by the server on successful creation of a resource and is not allowed to change on PUT operations. Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + "type": "string" + }, + "resourceVersion": { + "description": "(Optional) An opaque value that represents the internal version of this object that can be used by clients to determine when objects have changed. May be used for optimistic concurrency, change detection, and the watch operation on a resource or set of resources. Clients must treat these values as opaque and passed unmodified back to the server. They may only be valid for a particular resource or set of resources. Populated by the system. Read-only. Value must be treated as opaque by clients. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency", + "type": "string" + }, + "name": { + "type": "string", + "description": "Name must be unique within a namespace, within a Cloud Run region. Is required when creating resources, although some resources may allow a client to request the generation of an appropriate name automatically. Name is primarily intended for creation idempotence and configuration definition. Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names +optional" + }, + "generateName": { + "type": "string", + "description": "(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported GenerateName is an optional prefix, used by the server, to generate a unique name ONLY IF the Name field has not been provided. If this field is used, the name returned to the client will be different than the name passed. This value will also be combined with a unique suffix. The provided value has the same validation rules as the Name field, and may be truncated by the length of the suffix required to make the value unique on the server. If this field is specified and the generated name exists, the server will NOT return a 409 - instead, it will either return 201 Created or 500 with Reason ServerTimeout indicating a unique name could not be found in the time allotted, and the client should retry (optionally after the time indicated in the Retry-After header). Applied only if Name is not specified. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#idempotency string generateName = 2;" + }, + "clusterName": { + "type": "string", + "description": "(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported The name of the cluster which the object belongs to. This is used to distinguish resources with same name and namespace in different clusters. This field is not set anywhere right now and apiserver is going to ignore it if set in create or update request." + }, + "annotations": { + "description": "(Optional) Annotations is an unstructured key value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations", + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "namespace": { + "type": "string", + "description": "Namespace defines the space within each name must be unique, within a Cloud Run region. In Cloud Run the namespace must be equal to either the project ID or project number." + }, + "labels": { + "additionalProperties": { + "type": "string" + }, + "description": "(Optional) Map of string keys and values that can be used to organize and categorize (scope and select) objects. May match selectors of replication controllers and routes. More info: http://kubernetes.io/docs/user-guide/labels", + "type": "object" + }, + "selfLink": { + "description": "(Optional) SelfLink is a URL representing this object. Populated by the system. Read-only. string selfLink = 4;", + "type": "string" + }, + "deletionGracePeriodSeconds": { + "type": "integer", + "format": "int32", + "description": "(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Number of seconds allowed for this object to gracefully terminate before it will be removed from the system. Only set when deletionTimestamp is also set. May only be shortened. Read-only." + }, + "finalizers": { + "items": { + "type": "string" + }, + "type": "array", + "description": "(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported Must be empty before the object is deleted from the registry. Each entry is an identifier for the responsible component that will remove the entry from the list. If the deletionTimestamp of the object is non-nil, entries in this list can only be removed. +patchStrategy=merge" + }, + "ownerReferences": { + "type": "array", + "description": "(Optional) Cloud Run fully managed: not supported Cloud Run for Anthos: supported List of objects that own this object. If ALL objects in the list have been deleted, this object will be garbage collected.", + "items": { + "$ref": "OwnerReference" + } + }, + "creationTimestamp": { + "description": "(Optional) CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC. Populated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata", + "format": "google-datetime", + "type": "string" + } + }, + "type": "object", + "id": "ObjectMeta", + "description": "k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta is metadata that all persisted resources must have, which includes all objects users must create." + }, + "CustomResourceValidation": { + "properties": { + "openAPIV3Schema": { + "$ref": "JSONSchemaProps", + "description": "OpenAPIV3Schema is the OpenAPI v3 schema to be validated against. +optional" + } + }, + "description": "CustomResourceValidation is a list of validation methods for CustomResources.", + "type": "object", + "id": "CustomResourceValidation" + }, + "JSONSchemaPropsOrBool": { + "type": "object", + "id": "JSONSchemaPropsOrBool", + "properties": { + "schema": { + "$ref": "JSONSchemaProps" + }, + "allows": { + "type": "boolean" + } + }, + "description": "JSONSchemaPropsOrBool represents JSONSchemaProps or a boolean value. Defaults to true for the boolean property." + }, + "ListCustomResourceDefinitionsResponse": { + "properties": { + "items": { + "items": { + "$ref": "CustomResourceDefinition" + }, + "description": "List of CustomResourceDefinitions.", + "type": "array" + }, + "unreachable": { + "description": "Locations that could not be reached.", + "type": "array", + "items": { + "type": "string" + } + }, + "apiVersion": { + "type": "string", + "description": "The API version for this call such as \"k8s.apiextensions.io/v1beta1\"." + }, + "metadata": { + "$ref": "ListMeta", + "description": "Metadata associated with this CustomResourceDefinition list." + }, + "kind": { + "type": "string", + "description": "The kind of this resource, in this case \"CustomResourceDefinitionList\"." + } + }, + "id": "ListCustomResourceDefinitionsResponse", + "type": "object" + }, + "ExternalDocumentation": { + "properties": { + "description": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object", + "id": "ExternalDocumentation", + "description": "ExternalDocumentation allows referencing an external resource for extended documentation." + }, + "JSONSchemaPropsOrArray": { + "type": "object", + "id": "JSONSchemaPropsOrArray", + "properties": { + "schema": { + "$ref": "JSONSchemaProps" + }, + "jsonSchemas": { + "type": "array", + "items": { + "$ref": "JSONSchemaProps" + } + } + }, + "description": "JSONSchemaPropsOrArray represents a value that can either be a JSONSchemaProps or an array of JSONSchemaProps. Mainly here for serialization purposes." + } + }, + "kind": "discovery#restDescription", + "batchPath": "batch", + "version_module": true, + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/run/", + "revision": "20200814" +} diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..2d16544d03868103b9dceb0f86defacdb0e8c2a3 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/run.v2.json @@ -0,0 +1,5261 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://run.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Run", +"description": "Deploy and manage user provided container images that scale automatically based on incoming requests. The Cloud Run Admin API v1 follows the Knative Serving API specification, while v2 is aligned with Google Cloud AIP-based API standards, as described in https://google.aip.dev/.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/run/", +"endpoints": [ +{ +"description": "Locational Endpoint", +"endpointUrl": "https://africa-south1-run.googleapis.com/", +"location": "africa-south1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-east1-run.googleapis.com/", +"location": "asia-east1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-east2-run.googleapis.com/", +"location": "asia-east2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-northeast1-run.googleapis.com/", +"location": "asia-northeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-northeast2-run.googleapis.com/", +"location": "asia-northeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-northeast3-run.googleapis.com/", +"location": "asia-northeast3" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-south1-run.googleapis.com/", +"location": "asia-south1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-south2-run.googleapis.com/", +"location": "asia-south2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-southeast1-run.googleapis.com/", +"location": "asia-southeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://asia-southeast2-run.googleapis.com/", +"location": "asia-southeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://australia-southeast1-run.googleapis.com/", +"location": "australia-southeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://australia-southeast2-run.googleapis.com/", +"location": "australia-southeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-central2-run.googleapis.com/", +"location": "europe-central2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-north1-run.googleapis.com/", +"location": "europe-north1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-southwest1-run.googleapis.com/", +"location": "europe-southwest1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west1-run.googleapis.com/", +"location": "europe-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west10-run.googleapis.com/", +"location": "europe-west10" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west12-run.googleapis.com/", +"location": "europe-west12" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west2-run.googleapis.com/", +"location": "europe-west2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west3-run.googleapis.com/", +"location": "europe-west3" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west4-run.googleapis.com/", +"location": "europe-west4" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west6-run.googleapis.com/", +"location": "europe-west6" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west8-run.googleapis.com/", +"location": "europe-west8" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://europe-west9-run.googleapis.com/", +"location": "europe-west9" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://me-central1-run.googleapis.com/", +"location": "me-central1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://me-central2-run.googleapis.com/", +"location": "me-central2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://me-west1-run.googleapis.com/", +"location": "me-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://northamerica-northeast1-run.googleapis.com/", +"location": "northamerica-northeast1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://northamerica-northeast2-run.googleapis.com/", +"location": "northamerica-northeast2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://southamerica-east1-run.googleapis.com/", +"location": "southamerica-east1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://southamerica-west1-run.googleapis.com/", +"location": "southamerica-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-central1-run.googleapis.com/", +"location": "us-central1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-east1-run.googleapis.com/", +"location": "us-east1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-east4-run.googleapis.com/", +"location": "us-east4" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-east5-run.googleapis.com/", +"location": "us-east5" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-south1-run.googleapis.com/", +"location": "us-south1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west1-run.googleapis.com/", +"location": "us-west1" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west2-run.googleapis.com/", +"location": "us-west2" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west3-run.googleapis.com/", +"location": "us-west3" +}, +{ +"description": "Locational Endpoint", +"endpointUrl": "https://us-west4-run.googleapis.com/", +"location": "us-west4" +} +], +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "run:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://run.mtls.googleapis.com/", +"name": "run", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"exportImage": { +"description": "Export image for a given resource.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/{locationsId1}:exportImage", +"httpMethod": "POST", +"id": "run.projects.locations.exportImage", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the resource of which image metadata should be exported. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:exportImage", +"request": { +"$ref": "GoogleCloudRunV2ExportImageRequest" +}, +"response": { +"$ref": "GoogleCloudRunV2ExportImageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportImageMetadata": { +"description": "Export image metadata for a given resource.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/{locationsId1}:exportImageMetadata", +"httpMethod": "GET", +"id": "run.projects.locations.exportImageMetadata", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the resource of which image metadata should be exported. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:exportImageMetadata", +"response": { +"$ref": "GoogleCloudRunV2Metadata" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportMetadata": { +"description": "Export generated customer metadata for a given resource.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/{locationsId1}:exportMetadata", +"httpMethod": "GET", +"id": "run.projects.locations.exportMetadata", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the resource of which metadata should be exported. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}` for Service `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/.*$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:exportMetadata", +"response": { +"$ref": "GoogleCloudRunV2Metadata" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"jobs": { +"methods": { +"create": { +"description": "Creates a Job.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs", +"httpMethod": "POST", +"id": "run.projects.locations.jobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"jobId": { +"description": "Required. The unique identifier for the Job. The name of the job becomes {parent}/jobs/{job_id}.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The location and project in which this Job should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/jobs", +"request": { +"$ref": "GoogleCloudRunV2Job" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Job.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.jobs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated without actually deleting any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a Job.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRunV2Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the IAM Access Control policy currently in effect for the given Job. This result does not include any inherited policies.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:getIamPolicy", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Jobs.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Jobs to return in this call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from a previous call to ListJobs. All other parameters must match.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The location and project to list resources on. Format: projects/{project}/locations/{location}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"showDeleted": { +"description": "If true, returns deleted (but unexpired) resources along with active ones.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/jobs", +"response": { +"$ref": "GoogleCloudRunV2ListJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Job.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", +"httpMethod": "PATCH", +"id": "run.projects.locations.jobs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set to true, and if the Job does not exist, it will create a new one. Caller must have both create and update permissions for this call if this is set to true.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "The fully qualified name of this Job. Format: projects/{project}/locations/{location}/jobs/{job}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated and default values populated, without persisting the request or updating any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRunV2Job" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"run": { +"description": "Triggers creation of a new Execution of this Job.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:run", +"httpMethod": "POST", +"id": "run.projects.locations.jobs.run", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The full name of the Job. Format: projects/{project}/locations/{location}/jobs/{job}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:run", +"request": { +"$ref": "GoogleCloudRunV2RunJobRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Access control policy for the specified Job. Overwrites any existing policy.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:setIamPolicy", +"httpMethod": "POST", +"id": "run.projects.locations.jobs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}:testIamPermissions", +"httpMethod": "POST", +"id": "run.projects.locations.jobs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"executions": { +"methods": { +"cancel": { +"description": "Cancels an Execution.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}:cancel", +"httpMethod": "POST", +"id": "run.projects.locations.jobs.executions.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the Execution to cancel. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:cancel", +"request": { +"$ref": "GoogleCloudRunV2CancelExecutionRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an Execution.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.jobs.executions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the Execution to delete. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated without actually deleting any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportStatus": { +"description": "Read the status of an image export operation.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}/{executionsId1}:exportStatus", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.executions.exportStatus", +"parameterOrder": [ +"name", +"operationId" +], +"parameters": { +"name": { +"description": "Required. The name of the resource of which image export operation status has to be fetched. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"operationId": { +"description": "Required. The operation id returned from ExportImage.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}/{+operationId}:exportStatus", +"response": { +"$ref": "GoogleCloudRunV2ExportStatusResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about an Execution.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.executions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The full name of the Execution. Format: `projects/{project}/locations/{location}/jobs/{job}/executions/{execution}`, where `{project}` can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRunV2Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Executions from a Job.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.executions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Executions to return in this call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from a previous call to ListExecutions. All other parameters must match.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Execution from which the Executions should be listed. To list all Executions across Jobs, use \"-\" instead of Job name. Format: `projects/{project}/locations/{location}/jobs/{job}`, where `{project}` can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +}, +"showDeleted": { +"description": "If true, returns deleted (but unexpired) resources along with active ones.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/executions", +"response": { +"$ref": "GoogleCloudRunV2ListExecutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"tasks": { +"methods": { +"get": { +"description": "Gets information about a Task.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}/tasks/{tasksId}", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.executions.tasks.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The full name of the Task. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}/tasks/{task}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+/tasks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRunV2Task" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Tasks from an Execution of a Job.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}/executions/{executionsId}/tasks", +"httpMethod": "GET", +"id": "run.projects.locations.jobs.executions.tasks.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Tasks to return in this call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from a previous call to ListTasks. All other parameters must match.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Execution from which the Tasks should be listed. To list all Tasks across Executions of a Job, use \"-\" instead of Execution name. To list all Tasks across Jobs, use \"-\" instead of Job name. Format: projects/{project}/locations/{location}/jobs/{job}/executions/{execution}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"showDeleted": { +"description": "If true, returns deleted (but unexpired) resources along with active ones.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/tasks", +"response": { +"$ref": "GoogleCloudRunV2ListTasksResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"operations": { +"methods": { +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "run.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "run.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "Optional. A filter for matching the completed or in-progress operations. The supported formats of *filter* are: To query for only completed operations: done:true To query for only ongoing operations: done:false Must be empty to query for all of the latest operations for the given parent project.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. To query for all of the operations for a project.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of records that should be returned. Requested page size cannot exceed 100. If not set or set to less than or equal to 0, the default page size is 100. .", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with, which is returned by a previous list call.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"wait": { +"description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:wait", +"httpMethod": "POST", +"id": "run.projects.locations.operations.wait", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to wait on.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:wait", +"request": { +"$ref": "GoogleLongrunningWaitOperationRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"services": { +"methods": { +"create": { +"description": "Creates a new Service in a given project and location.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services", +"httpMethod": "POST", +"id": "run.projects.locations.services.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The location and project in which this service should be created. Format: projects/{project}/locations/{location}, where {project} can be project id or number. Only lowercase characters, digits, and hyphens.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"serviceId": { +"description": "Required. The unique identifier for the Service. It must begin with letter, and cannot end with hyphen; must contain fewer than 50 characters. The name of the service becomes {parent}/services/{service_id}.", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated and default values populated, without persisting the request or creating any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/services", +"request": { +"$ref": "GoogleCloudRunV2Service" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Service. This will cause the Service to stop serving traffic and will delete all revisions.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.services.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The full name of the Service. Format: projects/{project}/locations/{location}/services/{service}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated without actually deleting any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a Service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", +"httpMethod": "GET", +"id": "run.projects.locations.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The full name of the Service. Format: projects/{project}/locations/{location}/services/{service}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRunV2Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the IAM Access Control policy currently in effect for the given Cloud Run Service. This result does not include any inherited policies.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:getIamPolicy", +"httpMethod": "GET", +"id": "run.projects.locations.services.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:getIamPolicy", +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Services.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services", +"httpMethod": "GET", +"id": "run.projects.locations.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of Services to return in this call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from a previous call to ListServices. All other parameters must match.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The location and project to list resources on. Location must be a valid Google Cloud region, and cannot be the \"-\" wildcard. Format: projects/{project}/locations/{location}, where {project} can be project id or number.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"showDeleted": { +"description": "If true, returns deleted (but unexpired) resources along with active ones.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/services", +"response": { +"$ref": "GoogleCloudRunV2ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}", +"httpMethod": "PATCH", +"id": "run.projects.locations.services.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set to true, and if the Service does not exist, it will create a new one. The caller must have 'run.services.create' permissions if this is set to true and the Service does not exist.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated and default values populated, without persisting the request or updating any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "GoogleCloudRunV2Service" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Access control policy for the specified Service. Overwrites any existing policy.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:setIamPolicy", +"httpMethod": "POST", +"id": "run.projects.locations.services.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:setIamPolicy", +"request": { +"$ref": "GoogleIamV1SetIamPolicyRequest" +}, +"response": { +"$ref": "GoogleIamV1Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified Project. There are no permissions required for making this API call.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}:testIamPermissions", +"httpMethod": "POST", +"id": "run.projects.locations.services.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+resource}:testIamPermissions", +"request": { +"$ref": "GoogleIamV1TestIamPermissionsRequest" +}, +"response": { +"$ref": "GoogleIamV1TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"revisions": { +"methods": { +"delete": { +"description": "Deletes a Revision.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/revisions/{revisionsId}", +"httpMethod": "DELETE", +"id": "run.projects.locations.services.revisions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the Revision to delete. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/revisions/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated without actually deleting any resources.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportStatus": { +"description": "Read the status of an image export operation.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/revisions/{revisionsId}/{revisionsId1}:exportStatus", +"httpMethod": "GET", +"id": "run.projects.locations.services.revisions.exportStatus", +"parameterOrder": [ +"name", +"operationId" +], +"parameters": { +"name": { +"description": "Required. The name of the resource of which image export operation status has to be fetched. Format: `projects/{project_id_or_number}/locations/{location}/services/{service}/revisions/{revision}` for Revision `projects/{project_id_or_number}/locations/{location}/jobs/{job}/executions/{execution}` for Execution", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/revisions/[^/]+$", +"required": true, +"type": "string" +}, +"operationId": { +"description": "Required. The operation id returned from ExportImage.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}/{+operationId}:exportStatus", +"response": { +"$ref": "GoogleCloudRunV2ExportStatusResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a Revision.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/revisions/{revisionsId}", +"httpMethod": "GET", +"id": "run.projects.locations.services.revisions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The full name of the Revision. Format: projects/{project}/locations/{location}/services/{service}/revisions/{revision}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+/revisions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "GoogleCloudRunV2Revision" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Revisions from a given Service, or from a given location.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/services/{servicesId}/revisions", +"httpMethod": "GET", +"id": "run.projects.locations.services.revisions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of revisions to return in this call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from a previous call to ListRevisions. All other parameters must match.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Service from which the Revisions should be listed. To list all Revisions across Services, use \"-\" instead of Service name. Format: projects/{project}/locations/{location}/services/{service}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"showDeleted": { +"description": "If true, returns deleted (but unexpired) resources along with active ones.", +"location": "query", +"type": "boolean" +} +}, +"path": "v2/{+parent}/revisions", +"response": { +"$ref": "GoogleCloudRunV2ListRevisionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://run.googleapis.com/", +"schemas": { +"GoogleCloudRunV2BinaryAuthorization": { +"description": "Settings for Binary Authorization feature.", +"id": "GoogleCloudRunV2BinaryAuthorization", +"properties": { +"breakglassJustification": { +"description": "Optional. If present, indicates to use Breakglass using this justification. If use_default is False, then it must be empty. For more information on breakglass, see https://cloud.google.com/binary-authorization/docs/using-breakglass", +"type": "string" +}, +"policy": { +"description": "Optional. The path to a binary authorization policy. Format: projects/{project}/platforms/cloudRun/{policy-name}", +"type": "string" +}, +"useDefault": { +"description": "Optional. If True, indicates to use the default project's binary authorization policy. If False, binary authorization will be disabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRunV2CancelExecutionRequest": { +"description": "Request message for deleting an Execution.", +"id": "GoogleCloudRunV2CancelExecutionRequest", +"properties": { +"etag": { +"description": "A system-generated fingerprint for this version of the resource. This may be used to detect modification conflict during updates.", +"type": "string" +}, +"validateOnly": { +"description": "Indicates that the request should be validated without actually cancelling any resources.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRunV2CloudSqlInstance": { +"description": "Represents a set of Cloud SQL instances. Each one will be available under /cloudsql/[instance]. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.", +"id": "GoogleCloudRunV2CloudSqlInstance", +"properties": { +"instances": { +"description": "The Cloud SQL instance connection names, as can be found in https://console.cloud.google.com/sql/instances. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run. Format: {project}:{location}:{instance}", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Condition": { +"description": "Defines a status condition for a resource.", +"id": "GoogleCloudRunV2Condition", +"properties": { +"executionReason": { +"description": "Output only. A reason for the execution condition.", +"enum": [ +"EXECUTION_REASON_UNDEFINED", +"JOB_STATUS_SERVICE_POLLING_ERROR", +"NON_ZERO_EXIT_CODE", +"CANCELLED", +"CANCELLING", +"DELETED" +], +"enumDescriptions": [ +"Default value.", +"Internal system error getting execution status. System will retry.", +"A task reached its retry limit and the last attempt failed due to the user container exiting with a non-zero exit code.", +"The execution was cancelled by users.", +"The execution is in the process of being cancelled.", +"The execution was deleted." +], +"readOnly": true, +"type": "string" +}, +"lastTransitionTime": { +"description": "Last time the condition transitioned from one status to another.", +"format": "google-datetime", +"type": "string" +}, +"message": { +"description": "Human readable message indicating details about the current status.", +"type": "string" +}, +"reason": { +"description": "Output only. A common (service-level) reason for this condition.", +"enum": [ +"COMMON_REASON_UNDEFINED", +"UNKNOWN", +"REVISION_FAILED", +"PROGRESS_DEADLINE_EXCEEDED", +"CONTAINER_MISSING", +"CONTAINER_PERMISSION_DENIED", +"CONTAINER_IMAGE_UNAUTHORIZED", +"CONTAINER_IMAGE_AUTHORIZATION_CHECK_FAILED", +"ENCRYPTION_KEY_PERMISSION_DENIED", +"ENCRYPTION_KEY_CHECK_FAILED", +"SECRETS_ACCESS_CHECK_FAILED", +"WAITING_FOR_OPERATION", +"IMMEDIATE_RETRY", +"POSTPONED_RETRY", +"INTERNAL" +], +"enumDescriptions": [ +"Default value.", +"Reason unknown. Further details will be in message.", +"Revision creation process failed.", +"Timed out waiting for completion.", +"The container image path is incorrect.", +"Insufficient permissions on the container image.", +"Container image is not authorized by policy.", +"Container image policy authorization check failed.", +"Insufficient permissions on encryption key.", +"Permission check on encryption key failed.", +"At least one Access check on secrets failed.", +"Waiting for operation to complete.", +"System will retry immediately.", +"System will retry later; current attempt failed.", +"An internal error occurred. Further information may be in the message." +], +"readOnly": true, +"type": "string" +}, +"revisionReason": { +"description": "Output only. A reason for the revision condition.", +"enum": [ +"REVISION_REASON_UNDEFINED", +"PENDING", +"RESERVE", +"RETIRED", +"RETIRING", +"RECREATING", +"HEALTH_CHECK_CONTAINER_ERROR", +"CUSTOMIZED_PATH_RESPONSE_PENDING", +"MIN_INSTANCES_NOT_PROVISIONED", +"ACTIVE_REVISION_LIMIT_REACHED", +"NO_DEPLOYMENT", +"HEALTH_CHECK_SKIPPED", +"MIN_INSTANCES_WARMING" +], +"enumDescriptions": [ +"Default value.", +"Revision in Pending state.", +"Revision is in Reserve state.", +"Revision is Retired.", +"Revision is being retired.", +"Revision is being recreated.", +"There was a health check error.", +"Health check failed due to user error from customized path of the container. System will retry.", +"A revision with min_instance_count > 0 was created and is reserved, but it was not configured to serve traffic, so it's not live. This can also happen momentarily during traffic migration.", +"The maximum allowed number of active revisions has been reached.", +"There was no deployment defined. This value is no longer used, but Services created in older versions of the API might contain this value.", +"A revision's container has no port specified since the revision is of a manually scaled service with 0 instance count", +"A revision with min_instance_count > 0 was created and is waiting for enough instances to begin a traffic migration." +], +"readOnly": true, +"type": "string" +}, +"severity": { +"description": "How to interpret failures of this condition, one of Error, Warning, Info", +"enum": [ +"SEVERITY_UNSPECIFIED", +"ERROR", +"WARNING", +"INFO" +], +"enumDescriptions": [ +"Unspecified severity", +"Error severity.", +"Warning severity.", +"Info severity." +], +"type": "string" +}, +"state": { +"description": "State of the condition.", +"enum": [ +"STATE_UNSPECIFIED", +"CONDITION_PENDING", +"CONDITION_RECONCILING", +"CONDITION_FAILED", +"CONDITION_SUCCEEDED" +], +"enumDescriptions": [ +"The default value. This value is used if the state is omitted.", +"Transient state: Reconciliation has not started yet.", +"Transient state: reconciliation is still in progress.", +"Terminal state: Reconciliation did not succeed.", +"Terminal state: Reconciliation completed successfully." +], +"type": "string" +}, +"type": { +"description": "type is used to communicate the status of the reconciliation process. See also: https://github.com/knative/serving/blob/main/docs/spec/errors.md#error-conditions-and-reporting Types common to all resources include: * \"Ready\": True when the Resource is ready.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Container": { +"description": "A single application container. This specifies both the container to run, the command to run in the container and the arguments to supply to it. Note that additional arguments can be supplied by the system to the container at runtime.", +"id": "GoogleCloudRunV2Container", +"properties": { +"args": { +"description": "Arguments to the entrypoint. The docker image's CMD is used if this is not provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"command": { +"description": "Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dependsOn": { +"description": "Names of the containers that must start before this container.", +"items": { +"type": "string" +}, +"type": "array" +}, +"env": { +"description": "List of environment variables to set in the container.", +"items": { +"$ref": "GoogleCloudRunV2EnvVar" +}, +"type": "array" +}, +"image": { +"description": "Required. Name of the container image in Dockerhub, Google Artifact Registry, or Google Container Registry. If the host is not provided, Dockerhub is assumed.", +"type": "string" +}, +"livenessProbe": { +"$ref": "GoogleCloudRunV2Probe", +"description": "Periodic probe of container liveness. Container will be restarted if the probe fails." +}, +"name": { +"description": "Name of the container specified as a DNS_LABEL (RFC 1123).", +"type": "string" +}, +"ports": { +"description": "List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible. If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on.", +"items": { +"$ref": "GoogleCloudRunV2ContainerPort" +}, +"type": "array" +}, +"resources": { +"$ref": "GoogleCloudRunV2ResourceRequirements", +"description": "Compute Resource requirements by this container." +}, +"startupProbe": { +"$ref": "GoogleCloudRunV2Probe", +"description": "Startup probe of application within the container. All other probes are disabled if a startup probe is provided, until it succeeds. Container will not be added to service endpoints if the probe fails." +}, +"volumeMounts": { +"description": "Volume to mount into the container's filesystem.", +"items": { +"$ref": "GoogleCloudRunV2VolumeMount" +}, +"type": "array" +}, +"workingDir": { +"description": "Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ContainerOverride": { +"description": "Per-container override specification.", +"id": "GoogleCloudRunV2ContainerOverride", +"properties": { +"args": { +"description": "Optional. Arguments to the entrypoint. Will replace existing args for override.", +"items": { +"type": "string" +}, +"type": "array" +}, +"clearArgs": { +"description": "Optional. True if the intention is to clear out existing args list.", +"type": "boolean" +}, +"env": { +"description": "List of environment variables to set in the container. Will be merged with existing env for override.", +"items": { +"$ref": "GoogleCloudRunV2EnvVar" +}, +"type": "array" +}, +"name": { +"description": "The name of the container specified as a DNS_LABEL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ContainerPort": { +"description": "ContainerPort represents a network port in a single container.", +"id": "GoogleCloudRunV2ContainerPort", +"properties": { +"containerPort": { +"description": "Port number the container listens on. This must be a valid TCP port number, 0 < container_port < 65536.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "If specified, used to specify which protocol to use. Allowed values are \"http1\" and \"h2c\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2EmptyDirVolumeSource": { +"description": "In memory (tmpfs) ephemeral storage. It is ephemeral in the sense that when the sandbox is taken down, the data is destroyed with it (it does not persist across sandbox runs).", +"id": "GoogleCloudRunV2EmptyDirVolumeSource", +"properties": { +"medium": { +"description": "The medium on which the data is stored. Acceptable values today is only MEMORY or none. When none, the default will currently be backed by memory but could change over time. +optional", +"enum": [ +"MEDIUM_UNSPECIFIED", +"MEMORY" +], +"enumDescriptions": [ +"When not specified, falls back to the default implementation which is currently in memory (this may change over time).", +"Explicitly set the EmptyDir to be in memory. Uses tmpfs." +], +"type": "string" +}, +"sizeLimit": { +"description": "Limit on the storage usable by this EmptyDir volume. The size limit is also applicable for memory medium. The maximum usage on memory medium EmptyDir would be the minimum value between the SizeLimit specified here and the sum of memory limits of all containers. The default is nil which means that the limit is undefined. More info: https://cloud.google.com/run/docs/configuring/in-memory-volumes#configure-volume. Info in Kubernetes: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2EnvVar": { +"description": "EnvVar represents an environment variable present in a Container.", +"id": "GoogleCloudRunV2EnvVar", +"properties": { +"name": { +"description": "Required. Name of the environment variable. Must not exceed 32768 characters.", +"type": "string" +}, +"value": { +"description": "Variable references $(VAR_NAME) are expanded using the previous defined environment variables in the container and any route environment variables. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. Defaults to \"\", and the maximum length is 32768 bytes.", +"type": "string" +}, +"valueSource": { +"$ref": "GoogleCloudRunV2EnvVarSource", +"description": "Source for the environment variable's value." +} +}, +"type": "object" +}, +"GoogleCloudRunV2EnvVarSource": { +"description": "EnvVarSource represents a source for the value of an EnvVar.", +"id": "GoogleCloudRunV2EnvVarSource", +"properties": { +"secretKeyRef": { +"$ref": "GoogleCloudRunV2SecretKeySelector", +"description": "Selects a secret and a specific version from Cloud Secret Manager." +} +}, +"type": "object" +}, +"GoogleCloudRunV2Execution": { +"description": "Execution represents the configuration of a single execution. A execution an immutable resource that references a container image which is run to completion.", +"id": "GoogleCloudRunV2Execution", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.", +"readOnly": true, +"type": "object" +}, +"cancelledCount": { +"description": "Output only. The number of tasks which reached phase Cancelled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"completionTime": { +"description": "Output only. Represents time when the execution was completed. It is not guaranteed to be set in happens-before order across separate operations.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"conditions": { +"description": "Output only. The Condition of this Execution, containing its readiness status, and detailed error information in case it did not reach the desired state.", +"items": { +"$ref": "GoogleCloudRunV2Condition" +}, +"readOnly": true, +"type": "array" +}, +"createTime": { +"description": "Output only. Represents time when the execution was acknowledged by the execution controller. It is not guaranteed to be set in happens-before order across separate operations.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"failedCount": { +"description": "Output only. The number of tasks which reached phase Failed.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"generation": { +"description": "Output only. A number that monotonically increases every time the user modifies the desired state.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"job": { +"description": "Output only. The name of the parent Job.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels", +"readOnly": true, +"type": "object" +}, +"launchStage": { +"description": "The least stable launch stage needed to create this resource, as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are were, this field will be BETA.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"logUri": { +"description": "Output only. URI where logs for this execution can be found in Cloud Console.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The unique name of this Execution.", +"readOnly": true, +"type": "string" +}, +"observedGeneration": { +"description": "Output only. The generation of this Execution. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"parallelism": { +"description": "Output only. Specifies the maximum desired number of tasks the execution should run at any given time. Must be <= task_count. The actual number of tasks running in steady state will be less than this number when ((.spec.task_count - .status.successful) < .spec.parallelism), i.e. when the work left to do is less than max parallelism.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"reconciling": { +"description": "Output only. Indicates whether the resource's reconciliation is still in progress. See comments in `Job.reconciling` for additional information on reconciliation process in Cloud Run.", +"readOnly": true, +"type": "boolean" +}, +"retriedCount": { +"description": "Output only. The number of tasks which have retried at least once.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"runningCount": { +"description": "Output only. The number of actively running tasks.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"satisfiesPzs": { +"description": "Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"startTime": { +"description": "Output only. Represents time when the execution started to run. It is not guaranteed to be set in happens-before order across separate operations.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"succeededCount": { +"description": "Output only. The number of tasks which reached phase Succeeded.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"taskCount": { +"description": "Output only. Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"template": { +"$ref": "GoogleCloudRunV2TaskTemplate", +"description": "Output only. The template used to create tasks for this execution.", +"readOnly": true +}, +"uid": { +"description": "Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last-modified time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ExecutionReference": { +"description": "Reference to an Execution. Use /Executions.GetExecution with the given name to get full execution including the latest status.", +"id": "GoogleCloudRunV2ExecutionReference", +"properties": { +"completionTime": { +"description": "Creation timestamp of the execution.", +"format": "google-datetime", +"type": "string" +}, +"createTime": { +"description": "Creation timestamp of the execution.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Name of the execution.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ExecutionTemplate": { +"description": "ExecutionTemplate describes the data an execution should have when created from a template.", +"id": "GoogleCloudRunV2ExecutionTemplate", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 ExecutionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.", +"type": "object" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 ExecutionTemplate.", +"type": "object" +}, +"parallelism": { +"description": "Specifies the maximum desired number of tasks the execution should run at given time. Must be <= task_count. When the job is run, if this field is 0 or unset, the maximum possible value will be used for that execution. The actual number of tasks running in steady state will be less than this number when there are fewer tasks waiting to be completed remaining, i.e. when the work left to do is less than max parallelism.", +"format": "int32", +"type": "integer" +}, +"taskCount": { +"description": "Specifies the desired number of tasks the execution should run. Setting to 1 means that parallelism is limited to 1 and the success of that task signals the success of the execution. Defaults to 1.", +"format": "int32", +"type": "integer" +}, +"template": { +"$ref": "GoogleCloudRunV2TaskTemplate", +"description": "Required. Describes the task(s) that will be created when executing an execution." +} +}, +"type": "object" +}, +"GoogleCloudRunV2ExportImageRequest": { +"description": "Request message for exporting Cloud Run image.", +"id": "GoogleCloudRunV2ExportImageRequest", +"properties": { +"destinationRepo": { +"description": "Required. The export destination url (the Artifact Registry repo).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ExportImageResponse": { +"description": "ExportImageResponse contains an operation Id to track the image export operation.", +"id": "GoogleCloudRunV2ExportImageResponse", +"properties": { +"operationId": { +"description": "An operation ID used to track the status of image exports tied to the original pod ID in the request.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ExportStatusResponse": { +"description": "ExportStatusResponse contains the status of image export operation, with the status of each image export job.", +"id": "GoogleCloudRunV2ExportStatusResponse", +"properties": { +"imageExportStatuses": { +"description": "The status of each image export job.", +"items": { +"$ref": "GoogleCloudRunV2ImageExportStatus" +}, +"type": "array" +}, +"operationId": { +"description": "The operation id.", +"type": "string" +}, +"operationState": { +"description": "Output only. The state of the overall export operation.", +"enum": [ +"OPERATION_STATE_UNSPECIFIED", +"IN_PROGRESS", +"FINISHED" +], +"enumDescriptions": [ +"State unspecified.", +"Operation still in progress.", +"Operation finished." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2GCSVolumeSource": { +"description": "Represents a volume backed by a Cloud Storage bucket using Cloud Storage FUSE.", +"id": "GoogleCloudRunV2GCSVolumeSource", +"properties": { +"bucket": { +"description": "Cloud Storage Bucket name.", +"type": "string" +}, +"readOnly": { +"description": "If true, the volume will be mounted as read only for all mounts.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRunV2GRPCAction": { +"description": "GRPCAction describes an action involving a GRPC port.", +"id": "GoogleCloudRunV2GRPCAction", +"properties": { +"port": { +"description": "Optional. Port number of the gRPC service. Number must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort.", +"format": "int32", +"type": "integer" +}, +"service": { +"description": "Optional. Service is the name of the service to place in the gRPC HealthCheckRequest (see https://github.com/grpc/grpc/blob/master/doc/health-checking.md ). If this is not specified, the default behavior is defined by gRPC.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2HTTPGetAction": { +"description": "HTTPGetAction describes an action based on HTTP Get requests.", +"id": "GoogleCloudRunV2HTTPGetAction", +"properties": { +"httpHeaders": { +"description": "Optional. Custom headers to set in the request. HTTP allows repeated headers.", +"items": { +"$ref": "GoogleCloudRunV2HTTPHeader" +}, +"type": "array" +}, +"path": { +"description": "Optional. Path to access on the HTTP server. Defaults to '/'.", +"type": "string" +}, +"port": { +"description": "Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRunV2HTTPHeader": { +"description": "HTTPHeader describes a custom header to be used in HTTP probes", +"id": "GoogleCloudRunV2HTTPHeader", +"properties": { +"name": { +"description": "Required. The header field name", +"type": "string" +}, +"value": { +"description": "Optional. The header field value", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ImageExportStatus": { +"description": "The status of an image export job.", +"id": "GoogleCloudRunV2ImageExportStatus", +"properties": { +"exportJobState": { +"description": "Output only. Has the image export job finished (regardless of successful or failure).", +"enum": [ +"EXPORT_JOB_STATE_UNSPECIFIED", +"IN_PROGRESS", +"FINISHED" +], +"enumDescriptions": [ +"State unspecified.", +"Job still in progress.", +"Job finished." +], +"readOnly": true, +"type": "string" +}, +"exportedImageDigest": { +"description": "The exported image ID as it will appear in Artifact Registry.", +"type": "string" +}, +"status": { +"$ref": "UtilStatusProto", +"description": "The status of the export task if done." +}, +"tag": { +"description": "The image tag as it will appear in Artifact Registry.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Job": { +"description": "Job represents the configuration of a single job, which references a container image that is run to completion.", +"id": "GoogleCloudRunV2Job", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected on new resources. All system annotations in v1 now have a corresponding field in v2 Job. This field follows Kubernetes annotations' namespacing, limits, and rules.", +"type": "object" +}, +"binaryAuthorization": { +"$ref": "GoogleCloudRunV2BinaryAuthorization", +"description": "Settings for the Binary Authorization feature." +}, +"client": { +"description": "Arbitrary identifier for the API client.", +"type": "string" +}, +"clientVersion": { +"description": "Arbitrary version identifier for the API client.", +"type": "string" +}, +"conditions": { +"description": "Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Job does not reach its desired state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"items": { +"$ref": "GoogleCloudRunV2Condition" +}, +"readOnly": true, +"type": "array" +}, +"createTime": { +"description": "Output only. The creation time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"creator": { +"description": "Output only. Email address of the authenticated creator.", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. The deletion time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"readOnly": true, +"type": "string" +}, +"executionCount": { +"description": "Output only. Number of executions created for this job.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"expireTime": { +"description": "Output only. For a deleted resource, the time after which it will be permamently deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"generation": { +"description": "Output only. A number that monotonically increases every time the user modifies the desired state.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Job.", +"type": "object" +}, +"lastModifier": { +"description": "Output only. Email address of the last authenticated modifier.", +"readOnly": true, +"type": "string" +}, +"latestCreatedExecution": { +"$ref": "GoogleCloudRunV2ExecutionReference", +"description": "Output only. Name of the last created execution.", +"readOnly": true +}, +"launchStage": { +"description": "The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "The fully qualified name of this Job. Format: projects/{project}/locations/{location}/jobs/{job}", +"type": "string" +}, +"observedGeneration": { +"description": "Output only. The generation of this Job. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"reconciling": { +"description": "Output only. Returns true if the Job is currently being acted upon by the system to bring it into the desired state. When a new Job is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Job to the desired state. This process is called reconciliation. While reconciliation is in process, `observed_generation` and `latest_succeeded_execution`, will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the state matches the Job, or there was an error, and reconciliation failed. This state can be found in `terminal_condition.state`. If reconciliation succeeded, the following fields will match: `observed_generation` and `generation`, `latest_succeeded_execution` and `latest_created_execution`. If reconciliation failed, `observed_generation` and `latest_succeeded_execution` will have the state of the last succeeded execution or empty for newly created Job. Additional information on the failure can be found in `terminal_condition` and `conditions`.", +"readOnly": true, +"type": "boolean" +}, +"satisfiesPzs": { +"description": "Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"startExecutionToken": { +"description": "A unique string used as a suffix creating a new execution. The Job will become ready when the execution is successfully started. The sum of job name and token length must be fewer than 63 characters.", +"type": "string" +}, +"template": { +"$ref": "GoogleCloudRunV2ExecutionTemplate", +"description": "Required. The template used to create executions for this Job." +}, +"terminalCondition": { +"$ref": "GoogleCloudRunV2Condition", +"description": "Output only. The Condition of this Job, containing its readiness status, and detailed error information in case it did not reach the desired state.", +"readOnly": true +}, +"uid": { +"description": "Output only. Server assigned unique identifier for the Execution. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last-modified time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ListExecutionsResponse": { +"description": "Response message containing a list of Executions.", +"id": "GoogleCloudRunV2ListExecutionsResponse", +"properties": { +"executions": { +"description": "The resulting list of Executions.", +"items": { +"$ref": "GoogleCloudRunV2Execution" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token indicating there are more items than page_size. Use it in the next ListExecutions request to continue.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ListJobsResponse": { +"description": "Response message containing a list of Jobs.", +"id": "GoogleCloudRunV2ListJobsResponse", +"properties": { +"jobs": { +"description": "The resulting list of Jobs.", +"items": { +"$ref": "GoogleCloudRunV2Job" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token indicating there are more items than page_size. Use it in the next ListJobs request to continue.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ListRevisionsResponse": { +"description": "Response message containing a list of Revisions.", +"id": "GoogleCloudRunV2ListRevisionsResponse", +"properties": { +"nextPageToken": { +"description": "A token indicating there are more items than page_size. Use it in the next ListRevisions request to continue.", +"type": "string" +}, +"revisions": { +"description": "The resulting list of Revisions.", +"items": { +"$ref": "GoogleCloudRunV2Revision" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ListServicesResponse": { +"description": "Response message containing a list of Services.", +"id": "GoogleCloudRunV2ListServicesResponse", +"properties": { +"nextPageToken": { +"description": "A token indicating there are more items than page_size. Use it in the next ListServices request to continue.", +"type": "string" +}, +"services": { +"description": "The resulting list of Services.", +"items": { +"$ref": "GoogleCloudRunV2Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ListTasksResponse": { +"description": "Response message containing a list of Tasks.", +"id": "GoogleCloudRunV2ListTasksResponse", +"properties": { +"nextPageToken": { +"description": "A token indicating there are more items than page_size. Use it in the next ListTasks request to continue.", +"type": "string" +}, +"tasks": { +"description": "The resulting list of Tasks.", +"items": { +"$ref": "GoogleCloudRunV2Task" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Metadata": { +"description": "Metadata represents the JSON encoded generated customer metadata.", +"id": "GoogleCloudRunV2Metadata", +"properties": { +"metadata": { +"description": "JSON encoded Google-generated Customer Metadata for a given resource/project.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2NFSVolumeSource": { +"description": "Represents an NFS mount.", +"id": "GoogleCloudRunV2NFSVolumeSource", +"properties": { +"path": { +"description": "Path that is exported by the NFS server.", +"type": "string" +}, +"readOnly": { +"description": "If true, the volume will be mounted as read only for all mounts.", +"type": "boolean" +}, +"server": { +"description": "Hostname or IP address of the NFS server", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2NetworkInterface": { +"description": "Direct VPC egress settings.", +"id": "GoogleCloudRunV2NetworkInterface", +"properties": { +"network": { +"description": "Optional. The VPC network that the Cloud Run resource will be able to send traffic to. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If network is not specified, it will be looked up from the subnetwork.", +"type": "string" +}, +"subnetwork": { +"description": "Optional. The VPC subnetwork that the Cloud Run resource will get IPs from. At least one of network or subnetwork must be specified. If both network and subnetwork are specified, the given VPC subnetwork must belong to the given VPC network. If subnetwork is not specified, the subnetwork with the same name with the network will be used.", +"type": "string" +}, +"tags": { +"description": "Optional. Network tags applied to this Cloud Run resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Overrides": { +"description": "RunJob Overrides that contains Execution fields to be overridden.", +"id": "GoogleCloudRunV2Overrides", +"properties": { +"containerOverrides": { +"description": "Per container override specification.", +"items": { +"$ref": "GoogleCloudRunV2ContainerOverride" +}, +"type": "array" +}, +"taskCount": { +"description": "Optional. The desired number of tasks the execution should run. Will replace existing task_count value.", +"format": "int32", +"type": "integer" +}, +"timeout": { +"description": "Duration in seconds the task may be active before the system will actively try to mark it failed and kill associated containers. Will replace existing timeout_seconds value.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Probe": { +"description": "Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.", +"id": "GoogleCloudRunV2Probe", +"properties": { +"failureThreshold": { +"description": "Optional. Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1.", +"format": "int32", +"type": "integer" +}, +"grpc": { +"$ref": "GoogleCloudRunV2GRPCAction", +"description": "Optional. GRPC specifies an action involving a gRPC port. Exactly one of httpGet, tcpSocket, or grpc must be specified." +}, +"httpGet": { +"$ref": "GoogleCloudRunV2HTTPGetAction", +"description": "Optional. HTTPGet specifies the http request to perform. Exactly one of httpGet, tcpSocket, or grpc must be specified." +}, +"initialDelaySeconds": { +"description": "Optional. Number of seconds after the container has started before the probe is initiated. Defaults to 0 seconds. Minimum value is 0. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240.", +"format": "int32", +"type": "integer" +}, +"periodSeconds": { +"description": "Optional. How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value for liveness probe is 3600. Maximum value for startup probe is 240. Must be greater or equal than timeout_seconds.", +"format": "int32", +"type": "integer" +}, +"tcpSocket": { +"$ref": "GoogleCloudRunV2TCPSocketAction", +"description": "Optional. TCPSocket specifies an action involving a TCP port. Exactly one of httpGet, tcpSocket, or grpc must be specified." +}, +"timeoutSeconds": { +"description": "Optional. Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 3600. Must be smaller than period_seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ResourceRequirements": { +"description": "ResourceRequirements describes the compute resource requirements.", +"id": "GoogleCloudRunV2ResourceRequirements", +"properties": { +"cpuIdle": { +"description": "Determines whether CPU is only allocated during requests (true by default). However, if ResourceRequirements is set, the caller must explicitly set this field to true to preserve the default behavior.", +"type": "boolean" +}, +"limits": { +"additionalProperties": { +"type": "string" +}, +"description": "Only `memory` and `cpu` keys in the map are supported. Notes: * The only supported values for CPU are '1', '2', '4', and '8'. Setting 4 CPU requires at least 2Gi of memory. For more information, go to https://cloud.google.com/run/docs/configuring/cpu. * For supported 'memory' values and syntax, go to https://cloud.google.com/run/docs/configuring/memory-limits", +"type": "object" +}, +"startupCpuBoost": { +"description": "Determines whether CPU should be boosted on startup of a new container instance above the requested CPU threshold, this can help reduce cold-start latency.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Revision": { +"description": "A Revision is an immutable snapshot of code and configuration. A Revision references a container image. Revisions are only created by updates to its parent Service.", +"id": "GoogleCloudRunV2Revision", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.", +"readOnly": true, +"type": "object" +}, +"conditions": { +"description": "Output only. The Condition of this Revision, containing its readiness status, and detailed error information in case it did not reach a serving state.", +"items": { +"$ref": "GoogleCloudRunV2Condition" +}, +"readOnly": true, +"type": "array" +}, +"containers": { +"description": "Holds the single container that defines the unit of execution for this Revision.", +"items": { +"$ref": "GoogleCloudRunV2Container" +}, +"type": "array" +}, +"createTime": { +"description": "Output only. The creation time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"encryptionKey": { +"description": "A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek", +"type": "string" +}, +"encryptionKeyRevocationAction": { +"description": "The action to take if the encryption key is revoked.", +"enum": [ +"ENCRYPTION_KEY_REVOCATION_ACTION_UNSPECIFIED", +"PREVENT_NEW", +"SHUTDOWN" +], +"enumDescriptions": [ +"Unspecified", +"Prevents the creation of new instances.", +"Shuts down existing instances, and prevents creation of new ones." +], +"type": "string" +}, +"encryptionKeyShutdownDuration": { +"description": "If encryption_key_revocation_action is SHUTDOWN, the duration before shutting down all instances. The minimum increment is 1 hour.", +"format": "google-duration", +"type": "string" +}, +"etag": { +"description": "Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"readOnly": true, +"type": "string" +}, +"executionEnvironment": { +"description": "The execution environment being used to host this Revision.", +"enum": [ +"EXECUTION_ENVIRONMENT_UNSPECIFIED", +"EXECUTION_ENVIRONMENT_GEN1", +"EXECUTION_ENVIRONMENT_GEN2" +], +"enumDescriptions": [ +"Unspecified", +"Uses the First Generation environment.", +"Uses Second Generation environment." +], +"type": "string" +}, +"expireTime": { +"description": "Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"generation": { +"description": "Output only. A number that monotonically increases every time the user modifies the desired state.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels.", +"readOnly": true, +"type": "object" +}, +"launchStage": { +"description": "The least stable launch stage needed to create this resource, as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. Note that this value might not be what was used as input. For example, if ALPHA was provided as input in the parent resource, but only BETA and GA-level features are were, this field will be BETA.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"logUri": { +"description": "Output only. The Google Console URI to obtain logs for the Revision.", +"readOnly": true, +"type": "string" +}, +"maxInstanceRequestConcurrency": { +"description": "Sets the maximum number of requests that each serving instance can receive.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Output only. The unique name of this Revision.", +"readOnly": true, +"type": "string" +}, +"observedGeneration": { +"description": "Output only. The generation of this Revision currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"reconciling": { +"description": "Output only. Indicates whether the resource's reconciliation is still in progress. See comments in `Service.reconciling` for additional information on reconciliation process in Cloud Run.", +"readOnly": true, +"type": "boolean" +}, +"satisfiesPzs": { +"description": "Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"scaling": { +"$ref": "GoogleCloudRunV2RevisionScaling", +"description": "Scaling settings for this revision." +}, +"scalingStatus": { +"$ref": "GoogleCloudRunV2RevisionScalingStatus", +"description": "Output only. The current effective scaling settings for the revision.", +"readOnly": true +}, +"service": { +"description": "Output only. The name of the parent service.", +"readOnly": true, +"type": "string" +}, +"serviceAccount": { +"description": "Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has.", +"type": "string" +}, +"sessionAffinity": { +"description": "Enable session affinity.", +"type": "boolean" +}, +"timeout": { +"description": "Max allowed time for an instance to respond to a request.", +"format": "google-duration", +"type": "string" +}, +"uid": { +"description": "Output only. Server assigned unique identifier for the Revision. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last-modified time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"volumes": { +"description": "A list of Volumes to make available to containers.", +"items": { +"$ref": "GoogleCloudRunV2Volume" +}, +"type": "array" +}, +"vpcAccess": { +"$ref": "GoogleCloudRunV2VpcAccess", +"description": "VPC Access configuration for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc." +} +}, +"type": "object" +}, +"GoogleCloudRunV2RevisionScaling": { +"description": "Settings for revision-level scaling settings.", +"id": "GoogleCloudRunV2RevisionScaling", +"properties": { +"maxInstanceCount": { +"description": "Optional. Maximum number of serving instances that this resource should have.", +"format": "int32", +"type": "integer" +}, +"minInstanceCount": { +"description": "Optional. Minimum number of serving instances that this resource should have.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRunV2RevisionScalingStatus": { +"description": "Effective settings for the current revision", +"id": "GoogleCloudRunV2RevisionScalingStatus", +"properties": { +"desiredMinInstanceCount": { +"description": "The current number of min instances provisioned for this revision.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRunV2RevisionTemplate": { +"description": "RevisionTemplate describes the data a revision should have when created from a template.", +"id": "GoogleCloudRunV2RevisionTemplate", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system annotations in v1 now have a corresponding field in v2 RevisionTemplate. This field follows Kubernetes annotations' namespacing, limits, and rules.", +"type": "object" +}, +"containers": { +"description": "Holds the single container that defines the unit of execution for this Revision.", +"items": { +"$ref": "GoogleCloudRunV2Container" +}, +"type": "array" +}, +"encryptionKey": { +"description": "A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek", +"type": "string" +}, +"executionEnvironment": { +"description": "Optional. The sandbox environment to host this Revision.", +"enum": [ +"EXECUTION_ENVIRONMENT_UNSPECIFIED", +"EXECUTION_ENVIRONMENT_GEN1", +"EXECUTION_ENVIRONMENT_GEN2" +], +"enumDescriptions": [ +"Unspecified", +"Uses the First Generation environment.", +"Uses Second Generation environment." +], +"type": "string" +}, +"healthCheckDisabled": { +"description": "Optional. Disables health checking containers during deployment.", +"type": "boolean" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 RevisionTemplate.", +"type": "object" +}, +"maxInstanceRequestConcurrency": { +"description": "Optional. Sets the maximum number of requests that each serving instance can receive.", +"format": "int32", +"type": "integer" +}, +"revision": { +"description": "Optional. The unique name for the revision. If this field is omitted, it will be automatically generated based on the Service name.", +"type": "string" +}, +"scaling": { +"$ref": "GoogleCloudRunV2RevisionScaling", +"description": "Optional. Scaling settings for this Revision." +}, +"serviceAccount": { +"description": "Optional. Email address of the IAM service account associated with the revision of the service. The service account represents the identity of the running revision, and determines what permissions the revision has. If not provided, the revision will use the project's default service account.", +"type": "string" +}, +"sessionAffinity": { +"description": "Optional. Enable session affinity.", +"type": "boolean" +}, +"timeout": { +"description": "Optional. Max allowed time for an instance to respond to a request.", +"format": "google-duration", +"type": "string" +}, +"volumes": { +"description": "Optional. A list of Volumes to make available to containers.", +"items": { +"$ref": "GoogleCloudRunV2Volume" +}, +"type": "array" +}, +"vpcAccess": { +"$ref": "GoogleCloudRunV2VpcAccess", +"description": "Optional. VPC Access configuration to use for this Revision. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc." +} +}, +"type": "object" +}, +"GoogleCloudRunV2RunJobRequest": { +"description": "Request message to create a new Execution of a Job.", +"id": "GoogleCloudRunV2RunJobRequest", +"properties": { +"etag": { +"description": "A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"type": "string" +}, +"overrides": { +"$ref": "GoogleCloudRunV2Overrides", +"description": "Overrides specification for a given execution of a job. If provided, overrides will be applied to update the execution or task spec." +}, +"validateOnly": { +"description": "Indicates that the request should be validated without actually deleting any resources.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudRunV2SecretKeySelector": { +"description": "SecretEnvVarSource represents a source for the value of an EnvVar.", +"id": "GoogleCloudRunV2SecretKeySelector", +"properties": { +"secret": { +"description": "Required. The name of the secret in Cloud Secret Manager. Format: {secret_name} if the secret is in the same project. projects/{project}/secrets/{secret_name} if the secret is in a different project.", +"type": "string" +}, +"version": { +"description": "The Cloud Secret Manager secret version. Can be 'latest' for the latest version, an integer for a specific version, or a version alias.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2SecretVolumeSource": { +"description": "The secret's value will be presented as the content of a file whose name is defined in the item path. If no items are defined, the name of the file is the secret.", +"id": "GoogleCloudRunV2SecretVolumeSource", +"properties": { +"defaultMode": { +"description": "Integer representation of mode bits to use on created files by default. Must be a value between 0000 and 0777 (octal), defaulting to 0444. Directories within the path are not affected by this setting. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set. This might be in conflict with other options that affect the file mode, like fsGroup, and as a result, other mode bits could be set.", +"format": "int32", +"type": "integer" +}, +"items": { +"description": "If unspecified, the volume will expose a file whose name is the secret, relative to VolumeMount.mount_path. If specified, the key will be used as the version to fetch from Cloud Secret Manager and the path will be the name of the file exposed in the volume. When items are defined, they must specify a path and a version.", +"items": { +"$ref": "GoogleCloudRunV2VersionToPath" +}, +"type": "array" +}, +"secret": { +"description": "Required. The name of the secret in Cloud Secret Manager. Format: {secret} if the secret is in the same project. projects/{project}/secrets/{secret} if the secret is in a different project.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Service": { +"description": "Service acts as a top-level container that manages a set of configurations and revision templates which implement a network service. Service exists to provide a singular abstraction which can be access controlled, reasoned about, and which encapsulates software lifecycle decisions such as rollout policy and team resource ownership.", +"id": "GoogleCloudRunV2Service", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects. Cloud Run API v2 does not support annotations with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected in new resources. All system annotations in v1 now have a corresponding field in v2 Service. This field follows Kubernetes annotations' namespacing, limits, and rules.", +"type": "object" +}, +"binaryAuthorization": { +"$ref": "GoogleCloudRunV2BinaryAuthorization", +"description": "Optional. Settings for the Binary Authorization feature." +}, +"client": { +"description": "Arbitrary identifier for the API client.", +"type": "string" +}, +"clientVersion": { +"description": "Arbitrary version identifier for the API client.", +"type": "string" +}, +"conditions": { +"description": "Output only. The Conditions of all other associated sub-resources. They contain additional diagnostics information in case the Service does not reach its Serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"items": { +"$ref": "GoogleCloudRunV2Condition" +}, +"readOnly": true, +"type": "array" +}, +"createTime": { +"description": "Output only. The creation time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"creator": { +"description": "Output only. Email address of the authenticated creator.", +"readOnly": true, +"type": "string" +}, +"customAudiences": { +"description": "One or more custom audiences that you want this service to support. Specify each custom audience as the full URL in a string. The custom audiences are encoded in the token and used to authenticate requests. For more information, see https://cloud.google.com/run/docs/configuring/custom-audiences.", +"items": { +"type": "string" +}, +"type": "array" +}, +"defaultUriDisabled": { +"description": "Optional. Disables public resolution of the default URI of this service.", +"type": "boolean" +}, +"deleteTime": { +"description": "Output only. The deletion time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description of the Service. This field currently has a 512-character limit.", +"type": "string" +}, +"etag": { +"description": "Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. For a deleted resource, the time after which it will be permamently deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"generation": { +"description": "Output only. A number that monotonically increases every time the user modifies the desired state. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"ingress": { +"description": "Optional. Provides the ingress settings for this Service. On output, returns the currently observed ingress settings, or INGRESS_TRAFFIC_UNSPECIFIED if no revision is active.", +"enum": [ +"INGRESS_TRAFFIC_UNSPECIFIED", +"INGRESS_TRAFFIC_ALL", +"INGRESS_TRAFFIC_INTERNAL_ONLY", +"INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER", +"INGRESS_TRAFFIC_NONE" +], +"enumDescriptions": [ +"Unspecified", +"All inbound traffic is allowed.", +"Only internal traffic is allowed.", +"Both internal and Google Cloud Load Balancer traffic is allowed.", +"No ingress traffic is allowed." +], +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels. Cloud Run API v2 does not support labels with `run.googleapis.com`, `cloud.googleapis.com`, `serving.knative.dev`, or `autoscaling.knative.dev` namespaces, and they will be rejected. All system labels in v1 now have a corresponding field in v2 Service.", +"type": "object" +}, +"lastModifier": { +"description": "Output only. Email address of the last authenticated modifier.", +"readOnly": true, +"type": "string" +}, +"latestCreatedRevision": { +"description": "Output only. Name of the last created revision. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"readOnly": true, +"type": "string" +}, +"latestReadyRevision": { +"description": "Output only. Name of the latest revision that is serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"readOnly": true, +"type": "string" +}, +"launchStage": { +"description": "Optional. The launch stage as defined by [Google Cloud Platform Launch Stages](https://cloud.google.com/terms/launch-stages). Cloud Run supports `ALPHA`, `BETA`, and `GA`. If no value is specified, GA is assumed. Set the launch stage to a preview stage on input to allow use of preview features in that stage. On read (or output), describes whether the resource uses preview features. For example, if ALPHA is provided as input, but only BETA and GA-level features are used, this field will be BETA on output.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "The fully qualified name of this Service. In CreateServiceRequest, this field is ignored, and instead composed from CreateServiceRequest.parent and CreateServiceRequest.service_id. Format: projects/{project}/locations/{location}/services/{service_id}", +"type": "string" +}, +"observedGeneration": { +"description": "Output only. The generation of this Service currently serving traffic. See comments in `reconciling` for additional information on reconciliation process in Cloud Run. Please note that unlike v1, this is an int64 value. As with most Google APIs, its JSON representation will be a `string` instead of an `integer`.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"reconciling": { +"description": "Output only. Returns true if the Service is currently being acted upon by the system to bring it into the desired state. When a new Service is created, or an existing one is updated, Cloud Run will asynchronously perform all necessary steps to bring the Service to the desired serving state. This process is called reconciliation. While reconciliation is in process, `observed_generation`, `latest_ready_revison`, `traffic_statuses`, and `uri` will have transient values that might mismatch the intended state: Once reconciliation is over (and this field is false), there are two possible outcomes: reconciliation succeeded and the serving state matches the Service, or there was an error, and reconciliation failed. This state can be found in `terminal_condition.state`. If reconciliation succeeded, the following fields will match: `traffic` and `traffic_statuses`, `observed_generation` and `generation`, `latest_ready_revision` and `latest_created_revision`. If reconciliation failed, `traffic_statuses`, `observed_generation`, and `latest_ready_revision` will have the state of the last serving revision, or empty for newly created Services. Additional information on the failure can be found in `terminal_condition` and `conditions`.", +"readOnly": true, +"type": "boolean" +}, +"satisfiesPzs": { +"description": "Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"scaling": { +"$ref": "GoogleCloudRunV2ServiceScaling", +"description": "Optional. Specifies service-level scaling settings" +}, +"template": { +"$ref": "GoogleCloudRunV2RevisionTemplate", +"description": "Required. The template used to create revisions for this Service." +}, +"terminalCondition": { +"$ref": "GoogleCloudRunV2Condition", +"description": "Output only. The Condition of this Service, containing its readiness status, and detailed error information in case it did not reach a serving state. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"readOnly": true +}, +"traffic": { +"description": "Optional. Specifies how to distribute traffic over a collection of Revisions belonging to the Service. If traffic is empty or not provided, defaults to 100% traffic to the latest `Ready` Revision.", +"items": { +"$ref": "GoogleCloudRunV2TrafficTarget" +}, +"type": "array" +}, +"trafficStatuses": { +"description": "Output only. Detailed status information for corresponding traffic targets. See comments in `reconciling` for additional information on reconciliation process in Cloud Run.", +"items": { +"$ref": "GoogleCloudRunV2TrafficTargetStatus" +}, +"readOnly": true, +"type": "array" +}, +"uid": { +"description": "Output only. Server assigned unique identifier for the trigger. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last-modified time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"uri": { +"description": "Output only. The main URI in which this Service is serving traffic.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2ServiceScaling": { +"description": "Scaling settings applied at the service level rather than at the revision level.", +"id": "GoogleCloudRunV2ServiceScaling", +"properties": { +"minInstanceCount": { +"description": "Optional. total min instances for the service. This number of instances is divided among all revisions with specified traffic based on the percent of traffic they are receiving. (BETA)", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRunV2TCPSocketAction": { +"description": "TCPSocketAction describes an action based on opening a socket", +"id": "GoogleCloudRunV2TCPSocketAction", +"properties": { +"port": { +"description": "Optional. Port number to access on the container. Must be in the range 1 to 65535. If not specified, defaults to the exposed port of the container, which is the value of container.ports[0].containerPort.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Task": { +"description": "Task represents a single run of a container to completion.", +"id": "GoogleCloudRunV2Task", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Unstructured key value map that may be set by external tools to store and arbitrary metadata. They are not queryable and should be preserved when modifying objects.", +"readOnly": true, +"type": "object" +}, +"completionTime": { +"description": "Output only. Represents time when the Task was completed. It is not guaranteed to be set in happens-before order across separate operations.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"conditions": { +"description": "Output only. The Condition of this Task, containing its readiness status, and detailed error information in case it did not reach the desired state.", +"items": { +"$ref": "GoogleCloudRunV2Condition" +}, +"readOnly": true, +"type": "array" +}, +"containers": { +"description": "Holds the single container that defines the unit of execution for this task.", +"items": { +"$ref": "GoogleCloudRunV2Container" +}, +"type": "array" +}, +"createTime": { +"description": "Output only. Represents time when the task was created by the system. It is not guaranteed to be set in happens-before order across separate operations.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. For a deleted resource, the deletion time. It is only populated as a response to a Delete request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"encryptionKey": { +"description": "Output only. A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. A system-generated fingerprint for this version of the resource. May be used to detect modification conflict during updates.", +"readOnly": true, +"type": "string" +}, +"execution": { +"description": "Output only. The name of the parent Execution.", +"readOnly": true, +"type": "string" +}, +"executionEnvironment": { +"description": "The execution environment being used to host this Task.", +"enum": [ +"EXECUTION_ENVIRONMENT_UNSPECIFIED", +"EXECUTION_ENVIRONMENT_GEN1", +"EXECUTION_ENVIRONMENT_GEN2" +], +"enumDescriptions": [ +"Unspecified", +"Uses the First Generation environment.", +"Uses Second Generation environment." +], +"type": "string" +}, +"expireTime": { +"description": "Output only. For a deleted resource, the time after which it will be permamently deleted. It is only populated as a response to a Delete request.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"generation": { +"description": "Output only. A number that monotonically increases every time the user modifies the desired state.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"index": { +"description": "Output only. Index of the Task, unique per execution, and beginning at 0.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"job": { +"description": "Output only. The name of the parent Job.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Unstructured key value map that can be used to organize and categorize objects. User-provided labels are shared with Google's billing system, so they can be used to filter, or break down billing charges by team, component, environment, state, etc. For more information, visit https://cloud.google.com/resource-manager/docs/creating-managing-labels or https://cloud.google.com/run/docs/configuring/labels", +"readOnly": true, +"type": "object" +}, +"lastAttemptResult": { +"$ref": "GoogleCloudRunV2TaskAttemptResult", +"description": "Output only. Result of the last attempt of this Task.", +"readOnly": true +}, +"logUri": { +"description": "Output only. URI where logs for this execution can be found in Cloud Console.", +"readOnly": true, +"type": "string" +}, +"maxRetries": { +"description": "Number of retries allowed per Task, before marking this Task failed.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Output only. The unique name of this Task.", +"readOnly": true, +"type": "string" +}, +"observedGeneration": { +"description": "Output only. The generation of this Task. See comments in `Job.reconciling` for additional information on reconciliation process in Cloud Run.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"reconciling": { +"description": "Output only. Indicates whether the resource's reconciliation is still in progress. See comments in `Job.reconciling` for additional information on reconciliation process in Cloud Run.", +"readOnly": true, +"type": "boolean" +}, +"retried": { +"description": "Output only. The number of times this Task was retried. Tasks are retried when they fail up to the maxRetries limit.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"satisfiesPzs": { +"description": "Output only. Reserved for future use.", +"readOnly": true, +"type": "boolean" +}, +"scheduledTime": { +"description": "Output only. Represents time when the task was scheduled to run by the system. It is not guaranteed to be set in happens-before order across separate operations.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"serviceAccount": { +"description": "Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.", +"type": "string" +}, +"startTime": { +"description": "Output only. Represents time when the task started to run. It is not guaranteed to be set in happens-before order across separate operations.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"timeout": { +"description": "Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.", +"format": "google-duration", +"type": "string" +}, +"uid": { +"description": "Output only. Server assigned unique identifier for the Task. The value is a UUID4 string and guaranteed to remain unchanged until the resource is deleted.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last-modified time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"volumes": { +"description": "A list of Volumes to make available to containers.", +"items": { +"$ref": "GoogleCloudRunV2Volume" +}, +"type": "array" +}, +"vpcAccess": { +"$ref": "GoogleCloudRunV2VpcAccess", +"description": "Output only. VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRunV2TaskAttemptResult": { +"description": "Result of a task attempt.", +"id": "GoogleCloudRunV2TaskAttemptResult", +"properties": { +"exitCode": { +"description": "Output only. The exit code of this attempt. This may be unset if the container was unable to exit cleanly with a code due to some other failure. See status field for possible failure details.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"status": { +"$ref": "GoogleRpcStatus", +"description": "Output only. The status of this attempt. If the status code is OK, then the attempt succeeded.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleCloudRunV2TaskTemplate": { +"description": "TaskTemplate describes the data a task should have when created from a template.", +"id": "GoogleCloudRunV2TaskTemplate", +"properties": { +"containers": { +"description": "Holds the single container that defines the unit of execution for this task.", +"items": { +"$ref": "GoogleCloudRunV2Container" +}, +"type": "array" +}, +"encryptionKey": { +"description": "A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek", +"type": "string" +}, +"executionEnvironment": { +"description": "Optional. The execution environment being used to host this Task.", +"enum": [ +"EXECUTION_ENVIRONMENT_UNSPECIFIED", +"EXECUTION_ENVIRONMENT_GEN1", +"EXECUTION_ENVIRONMENT_GEN2" +], +"enumDescriptions": [ +"Unspecified", +"Uses the First Generation environment.", +"Uses Second Generation environment." +], +"type": "string" +}, +"maxRetries": { +"description": "Number of retries allowed per Task, before marking this Task failed. Defaults to 3.", +"format": "int32", +"type": "integer" +}, +"serviceAccount": { +"description": "Optional. Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.", +"type": "string" +}, +"timeout": { +"description": "Optional. Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout. Defaults to 600 seconds.", +"format": "google-duration", +"type": "string" +}, +"volumes": { +"description": "Optional. A list of Volumes to make available to containers.", +"items": { +"$ref": "GoogleCloudRunV2Volume" +}, +"type": "array" +}, +"vpcAccess": { +"$ref": "GoogleCloudRunV2VpcAccess", +"description": "Optional. VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc." +} +}, +"type": "object" +}, +"GoogleCloudRunV2TrafficTarget": { +"description": "Holds a single traffic routing entry for the Service. Allocations can be done to a specific Revision name, or pointing to the latest Ready Revision.", +"id": "GoogleCloudRunV2TrafficTarget", +"properties": { +"percent": { +"description": "Specifies percent of the traffic to this Revision. This defaults to zero if unspecified.", +"format": "int32", +"type": "integer" +}, +"revision": { +"description": "Revision to which to send this portion of traffic, if traffic allocation is by revision.", +"type": "string" +}, +"tag": { +"description": "Indicates a string to be part of the URI to exclusively reference this target.", +"type": "string" +}, +"type": { +"description": "The allocation type for this traffic target.", +"enum": [ +"TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED", +"TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST", +"TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION" +], +"enumDescriptions": [ +"Unspecified instance allocation type.", +"Allocates instances to the Service's latest ready Revision.", +"Allocates instances to a Revision by name." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2TrafficTargetStatus": { +"description": "Represents the observed state of a single `TrafficTarget` entry.", +"id": "GoogleCloudRunV2TrafficTargetStatus", +"properties": { +"percent": { +"description": "Specifies percent of the traffic to this Revision.", +"format": "int32", +"type": "integer" +}, +"revision": { +"description": "Revision to which this traffic is sent.", +"type": "string" +}, +"tag": { +"description": "Indicates the string used in the URI to exclusively reference this target.", +"type": "string" +}, +"type": { +"description": "The allocation type for this traffic target.", +"enum": [ +"TRAFFIC_TARGET_ALLOCATION_TYPE_UNSPECIFIED", +"TRAFFIC_TARGET_ALLOCATION_TYPE_LATEST", +"TRAFFIC_TARGET_ALLOCATION_TYPE_REVISION" +], +"enumDescriptions": [ +"Unspecified instance allocation type.", +"Allocates instances to the Service's latest ready Revision.", +"Allocates instances to a Revision by name." +], +"type": "string" +}, +"uri": { +"description": "Displays the target URI.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2VersionToPath": { +"description": "VersionToPath maps a specific version of a secret to a relative file to mount to, relative to VolumeMount's mount_path.", +"id": "GoogleCloudRunV2VersionToPath", +"properties": { +"mode": { +"description": "Integer octal mode bits to use on this file, must be a value between 01 and 0777 (octal). If 0 or not set, the Volume's default mode will be used. Notes * Internally, a umask of 0222 will be applied to any non-zero value. * This is an integer representation of the mode bits. So, the octal integer value should look exactly as the chmod numeric notation with a leading zero. Some examples: for chmod 777 (a=rwx), set to 0777 (octal) or 511 (base-10). For chmod 640 (u=rw,g=r), set to 0640 (octal) or 416 (base-10). For chmod 755 (u=rwx,g=rx,o=rx), set to 0755 (octal) or 493 (base-10). * This might be in conflict with other options that affect the file mode, like fsGroup, and the result can be other mode bits set.", +"format": "int32", +"type": "integer" +}, +"path": { +"description": "Required. The relative path of the secret in the container.", +"type": "string" +}, +"version": { +"description": "The Cloud Secret Manager secret version. Can be 'latest' for the latest value, or an integer or a secret alias for a specific version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2Volume": { +"description": "Volume represents a named volume in a container.", +"id": "GoogleCloudRunV2Volume", +"properties": { +"cloudSqlInstance": { +"$ref": "GoogleCloudRunV2CloudSqlInstance", +"description": "For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run." +}, +"emptyDir": { +"$ref": "GoogleCloudRunV2EmptyDirVolumeSource", +"description": "Ephemeral storage used as a shared volume." +}, +"gcs": { +"$ref": "GoogleCloudRunV2GCSVolumeSource", +"description": "Persistent storage backed by a Google Cloud Storage bucket." +}, +"name": { +"description": "Required. Volume's name.", +"type": "string" +}, +"nfs": { +"$ref": "GoogleCloudRunV2NFSVolumeSource", +"description": "For NFS Voumes, contains the path to the nfs Volume" +}, +"secret": { +"$ref": "GoogleCloudRunV2SecretVolumeSource", +"description": "Secret represents a secret that should populate this volume." +} +}, +"type": "object" +}, +"GoogleCloudRunV2VolumeMount": { +"description": "VolumeMount describes a mounting of a Volume within a container.", +"id": "GoogleCloudRunV2VolumeMount", +"properties": { +"mountPath": { +"description": "Required. Path within the container at which the volume should be mounted. Must not contain ':'. For Cloud SQL volumes, it can be left empty, or must otherwise be `/cloudsql`. All instances defined in the Volume will be available as `/cloudsql/[instance]`. For more information on Cloud SQL volumes, visit https://cloud.google.com/sql/docs/mysql/connect-run", +"type": "string" +}, +"name": { +"description": "Required. This must match the Name of a Volume.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudRunV2VpcAccess": { +"description": "VPC Access settings. For more information on sending traffic to a VPC network, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.", +"id": "GoogleCloudRunV2VpcAccess", +"properties": { +"connector": { +"description": "VPC Access connector name. Format: projects/{project}/locations/{location}/connectors/{connector}, where {project} can be project id or number. For more information on sending traffic to a VPC network via a connector, visit https://cloud.google.com/run/docs/configuring/vpc-connectors.", +"type": "string" +}, +"egress": { +"description": "Optional. Traffic VPC egress settings. If not provided, it defaults to PRIVATE_RANGES_ONLY.", +"enum": [ +"VPC_EGRESS_UNSPECIFIED", +"ALL_TRAFFIC", +"PRIVATE_RANGES_ONLY" +], +"enumDescriptions": [ +"Unspecified", +"All outbound traffic is routed through the VPC connector.", +"Only private IP ranges are routed through the VPC connector." +], +"type": "string" +}, +"networkInterfaces": { +"description": "Optional. Direct VPC egress settings. Currently only single network interface is supported.", +"items": { +"$ref": "GoogleCloudRunV2NetworkInterface" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ApprovalConfig": { +"description": "ApprovalConfig describes configuration for manual approval of a build.", +"id": "GoogleDevtoolsCloudbuildV1ApprovalConfig", +"properties": { +"approvalRequired": { +"description": "Whether or not approval is needed. If this is set on a build, it will become pending when created, and will need to be explicitly approved to start.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ApprovalResult": { +"description": "ApprovalResult describes the decision and associated metadata of a manual approval of a build.", +"id": "GoogleDevtoolsCloudbuildV1ApprovalResult", +"properties": { +"approvalTime": { +"description": "Output only. The time when the approval decision was made.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"approverAccount": { +"description": "Output only. Email of the user that called the ApproveBuild API to approve or reject a build at the time that the API was called.", +"readOnly": true, +"type": "string" +}, +"comment": { +"description": "Optional. An optional comment for this manual approval result.", +"type": "string" +}, +"decision": { +"description": "Required. The decision of this manual approval.", +"enum": [ +"DECISION_UNSPECIFIED", +"APPROVED", +"REJECTED" +], +"enumDescriptions": [ +"Default enum type. This should not be used.", +"Build is approved.", +"Build is rejected." +], +"type": "string" +}, +"url": { +"description": "Optional. An optional URL tied to this manual approval result. This field is essentially the same as comment, except that it will be rendered by the UI differently. An example use case is a link to an external job that approved this Build.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ArtifactObjects": { +"description": "Files in the workspace to upload to Cloud Storage upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1ArtifactObjects", +"properties": { +"location": { +"description": "Cloud Storage bucket and optional object path, in the form \"gs://bucket/path/to/somewhere/\". (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Files in the workspace matching any path pattern will be uploaded to Cloud Storage with this location as a prefix.", +"type": "string" +}, +"paths": { +"description": "Path globs used to match files in the build's workspace.", +"items": { +"type": "string" +}, +"type": "array" +}, +"timing": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing all artifact objects.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Artifacts": { +"description": "Artifacts produced by a build that should be uploaded upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1Artifacts", +"properties": { +"images": { +"description": "A list of images to be pushed upon the successful completion of all build steps. The images will be pushed using the builder service account's credentials. The digests of the pushed images will be stored in the Build resource's results field. If any of the images fail to be pushed, the build is marked FAILURE.", +"items": { +"type": "string" +}, +"type": "array" +}, +"mavenArtifacts": { +"description": "A list of Maven artifacts to be uploaded to Artifact Registry upon successful completion of all build steps. Artifacts in the workspace matching specified paths globs will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any artifacts fail to be pushed, the build is marked FAILURE.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1MavenArtifact" +}, +"type": "array" +}, +"npmPackages": { +"description": "A list of npm packages to be uploaded to Artifact Registry upon successful completion of all build steps. Npm packages in the specified paths will be uploaded to the specified Artifact Registry repository using the builder service account's credentials. If any packages fail to be pushed, the build is marked FAILURE.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1NpmPackage" +}, +"type": "array" +}, +"objects": { +"$ref": "GoogleDevtoolsCloudbuildV1ArtifactObjects", +"description": "A list of objects to be uploaded to Cloud Storage upon successful completion of all build steps. Files in the workspace matching specified paths globs will be uploaded to the specified Cloud Storage location using the builder service account's credentials. The location and generation of the uploaded objects will be stored in the Build resource's results field. If any objects fail to be pushed, the build is marked FAILURE." +}, +"pythonPackages": { +"description": "A list of Python packages to be uploaded to Artifact Registry upon successful completion of all build steps. The build service account credentials will be used to perform the upload. If any objects fail to be pushed, the build is marked FAILURE.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1PythonPackage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Build": { +"description": "A build resource in the Cloud Build API. At a high level, a `Build` describes where to find source code, how to build it (for example, the builder image to run on the source), and where to store the built artifacts. Fields can include the following variables, which will be expanded when the build is created: - $PROJECT_ID: the project ID of the build. - $PROJECT_NUMBER: the project number of the build. - $LOCATION: the location/region of the build. - $BUILD_ID: the autogenerated ID of the build. - $REPO_NAME: the source repository name specified by RepoSource. - $BRANCH_NAME: the branch name specified by RepoSource. - $TAG_NAME: the tag name specified by RepoSource. - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or resolved from the specified branch or tag. - $SHORT_SHA: first 7 characters of $REVISION_ID or $COMMIT_SHA.", +"id": "GoogleDevtoolsCloudbuildV1Build", +"properties": { +"approval": { +"$ref": "GoogleDevtoolsCloudbuildV1BuildApproval", +"description": "Output only. Describes this build's approval configuration, status, and result.", +"readOnly": true +}, +"artifacts": { +"$ref": "GoogleDevtoolsCloudbuildV1Artifacts", +"description": "Artifacts produced by the build that should be uploaded upon successful completion of all build steps." +}, +"availableSecrets": { +"$ref": "GoogleDevtoolsCloudbuildV1Secrets", +"description": "Secrets and secret environment variables." +}, +"buildTriggerId": { +"description": "Output only. The ID of the `BuildTrigger` that triggered this build, if it was triggered automatically.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. Time at which the request to create the build was received.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"failureInfo": { +"$ref": "GoogleDevtoolsCloudbuildV1FailureInfo", +"description": "Output only. Contains information about the build when status=FAILURE.", +"readOnly": true +}, +"finishTime": { +"description": "Output only. Time at which execution of the build was finished. The difference between finish_time and start_time is the duration of the build's execution.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. Unique identifier of the build.", +"readOnly": true, +"type": "string" +}, +"images": { +"description": "A list of images to be pushed upon the successful completion of all build steps. The images are pushed using the builder service account's credentials. The digests of the pushed images will be stored in the `Build` resource's results field. If any of the images fail to be pushed, the build status is marked `FAILURE`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logUrl": { +"description": "Output only. URL to logs for this build in Google Cloud Console.", +"readOnly": true, +"type": "string" +}, +"logsBucket": { +"description": "Cloud Storage bucket where logs should be written (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.", +"type": "string" +}, +"name": { +"description": "Output only. The 'Build' name with format: `projects/{project}/locations/{location}/builds/{build}`, where {build} is a unique identifier generated by the service.", +"readOnly": true, +"type": "string" +}, +"options": { +"$ref": "GoogleDevtoolsCloudbuildV1BuildOptions", +"description": "Special options for this build." +}, +"projectId": { +"description": "Output only. ID of the project.", +"readOnly": true, +"type": "string" +}, +"queueTtl": { +"description": "TTL in queue for this build. If provided and the build is enqueued longer than this value, the build will expire and the build status will be `EXPIRED`. The TTL starts ticking from create_time.", +"format": "google-duration", +"type": "string" +}, +"results": { +"$ref": "GoogleDevtoolsCloudbuildV1Results", +"description": "Output only. Results of the build.", +"readOnly": true +}, +"secrets": { +"description": "Secrets to decrypt using Cloud Key Management Service. Note: Secret Manager is the recommended technique for managing sensitive data with Cloud Build. Use `available_secrets` to configure builds to access secrets from Secret Manager. For instructions, see: https://cloud.google.com/cloud-build/docs/securing-builds/use-secrets", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Secret" +}, +"type": "array" +}, +"serviceAccount": { +"description": "IAM service account whose credentials will be used at build runtime. Must be of the format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. ACCOUNT can be email address or uniqueId of the service account. ", +"type": "string" +}, +"source": { +"$ref": "GoogleDevtoolsCloudbuildV1Source", +"description": "The location of the source files to build." +}, +"sourceProvenance": { +"$ref": "GoogleDevtoolsCloudbuildV1SourceProvenance", +"description": "Output only. A permanent fixed identifier for source.", +"readOnly": true +}, +"startTime": { +"description": "Output only. Time at which execution of the build was started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Output only. Status of the build.", +"enum": [ +"STATUS_UNKNOWN", +"PENDING", +"QUEUED", +"WORKING", +"SUCCESS", +"FAILURE", +"INTERNAL_ERROR", +"TIMEOUT", +"CANCELLED", +"EXPIRED" +], +"enumDescriptions": [ +"Status of the build is unknown.", +"Build has been created and is pending execution and queuing. It has not been queued.", +"Build or step is queued; work has not yet begun.", +"Build or step is being executed.", +"Build or step finished successfully.", +"Build or step failed to complete successfully.", +"Build or step failed due to an internal cause.", +"Build or step took longer than was allowed.", +"Build or step was canceled by a user.", +"Build was enqueued for longer than the value of `queue_ttl`." +], +"readOnly": true, +"type": "string" +}, +"statusDetail": { +"description": "Output only. Customer-readable message about the current status.", +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Required. The operations to be performed on the workspace.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1BuildStep" +}, +"type": "array" +}, +"substitutions": { +"additionalProperties": { +"type": "string" +}, +"description": "Substitutions data for `Build` resource.", +"type": "object" +}, +"tags": { +"description": "Tags for annotation of a `Build`. These are not docker tags.", +"items": { +"type": "string" +}, +"type": "array" +}, +"timeout": { +"description": "Amount of time that this build should be allowed to run, to second granularity. If this amount of time elapses, work on the build will cease and the build status will be `TIMEOUT`. `timeout` starts ticking from `startTime`. Default time is 60 minutes.", +"format": "google-duration", +"type": "string" +}, +"timing": { +"additionalProperties": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan" +}, +"description": "Output only. Stores timing information for phases of the build. Valid keys are: * BUILD: time to execute all build steps. * PUSH: time to push all artifacts including docker images and non docker artifacts. * FETCHSOURCE: time to fetch source. * SETUPBUILD: time to set up build. If the build does not specify source or images, these keys will not be included.", +"readOnly": true, +"type": "object" +}, +"warnings": { +"description": "Output only. Non-fatal problems encountered during the execution of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Warning" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildApproval": { +"description": "BuildApproval describes a build's approval configuration, state, and result.", +"id": "GoogleDevtoolsCloudbuildV1BuildApproval", +"properties": { +"config": { +"$ref": "GoogleDevtoolsCloudbuildV1ApprovalConfig", +"description": "Output only. Configuration for manual approval of this build.", +"readOnly": true +}, +"result": { +"$ref": "GoogleDevtoolsCloudbuildV1ApprovalResult", +"description": "Output only. Result of manual approval for this Build.", +"readOnly": true +}, +"state": { +"description": "Output only. The state of this build's approval.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"APPROVED", +"REJECTED", +"CANCELLED" +], +"enumDescriptions": [ +"Default enum type. This should not be used.", +"Build approval is pending.", +"Build approval has been approved.", +"Build approval has been rejected.", +"Build was cancelled while it was still pending approval." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildOperationMetadata": { +"description": "Metadata for build operations.", +"id": "GoogleDevtoolsCloudbuildV1BuildOperationMetadata", +"properties": { +"build": { +"$ref": "GoogleDevtoolsCloudbuildV1Build", +"description": "The build that the operation is tracking." +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildOptions": { +"description": "Optional arguments to enable specific features of builds.", +"id": "GoogleDevtoolsCloudbuildV1BuildOptions", +"properties": { +"automapSubstitutions": { +"description": "Option to include built-in and custom substitutions as env variables for all build steps.", +"type": "boolean" +}, +"defaultLogsBucketBehavior": { +"description": "Optional. Option to specify how default logs buckets are setup.", +"enum": [ +"DEFAULT_LOGS_BUCKET_BEHAVIOR_UNSPECIFIED", +"REGIONAL_USER_OWNED_BUCKET" +], +"enumDescriptions": [ +"Unspecified.", +"Bucket is located in user-owned project in the same region as the build. The builder service account must have access to create and write to Cloud Storage buckets in the build project." +], +"type": "string" +}, +"diskSizeGb": { +"description": "Requested disk size for the VM that runs the build. Note that this is *NOT* \"disk free\"; some of the space will be used by the operating system and build utilities. Also note that this is the minimum disk size that will be allocated for the build -- the build may run with a larger disk than requested. At present, the maximum disk size is 2000GB; builds that request more than the maximum are rejected with an error.", +"format": "int64", +"type": "string" +}, +"dynamicSubstitutions": { +"description": "Option to specify whether or not to apply bash style string operations to the substitutions. NOTE: this is always enabled for triggered builds and cannot be overridden in the build configuration file.", +"type": "boolean" +}, +"env": { +"description": "A list of global environment variable definitions that will exist for all build steps in this build. If a variable is defined in both globally and in a build step, the variable will use the build step value. The elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\" being given the value \"VALUE\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"logStreamingOption": { +"description": "Option to define build log streaming behavior to Cloud Storage.", +"enum": [ +"STREAM_DEFAULT", +"STREAM_ON", +"STREAM_OFF" +], +"enumDescriptions": [ +"Service may automatically determine build log streaming behavior.", +"Build logs should be streamed to Cloud Storage.", +"Build logs should not be streamed to Cloud Storage; they will be written when the build is completed." +], +"type": "string" +}, +"logging": { +"description": "Option to specify the logging mode, which determines if and where build logs are stored.", +"enum": [ +"LOGGING_UNSPECIFIED", +"LEGACY", +"GCS_ONLY", +"STACKDRIVER_ONLY", +"CLOUD_LOGGING_ONLY", +"NONE" +], +"enumDeprecated": [ +false, +false, +false, +true, +false, +false +], +"enumDescriptions": [ +"The service determines the logging mode. The default is `LEGACY`. Do not rely on the default logging behavior as it may change in the future.", +"Build logs are stored in Cloud Logging and Cloud Storage.", +"Build logs are stored in Cloud Storage.", +"This option is the same as CLOUD_LOGGING_ONLY.", +"Build logs are stored in Cloud Logging. Selecting this option will not allow [logs streaming](https://cloud.google.com/sdk/gcloud/reference/builds/log).", +"Turn off all logging. No build logs will be captured." +], +"type": "string" +}, +"machineType": { +"description": "Compute Engine machine type on which to run the build.", +"enum": [ +"UNSPECIFIED", +"N1_HIGHCPU_8", +"N1_HIGHCPU_32", +"E2_HIGHCPU_8", +"E2_HIGHCPU_32", +"E2_MEDIUM" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false +], +"enumDescriptions": [ +"Standard machine type.", +"Highcpu machine with 8 CPUs.", +"Highcpu machine with 32 CPUs.", +"Highcpu e2 machine with 8 CPUs.", +"Highcpu e2 machine with 32 CPUs.", +"E2 machine with 1 CPU." +], +"type": "string" +}, +"pool": { +"$ref": "GoogleDevtoolsCloudbuildV1PoolOption", +"description": "Optional. Specification for execution on a `WorkerPool`. See [running builds in a private pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) for more information." +}, +"requestedVerifyOption": { +"description": "Requested verifiability options.", +"enum": [ +"NOT_VERIFIED", +"VERIFIED" +], +"enumDescriptions": [ +"Not a verifiable build (the default).", +"Build must be verified." +], +"type": "string" +}, +"secretEnv": { +"description": "A list of global environment variables, which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`. These variables will be available to all build steps in this build.", +"items": { +"type": "string" +}, +"type": "array" +}, +"sourceProvenanceHash": { +"description": "Requested hash for SourceProvenance.", +"items": { +"enum": [ +"NONE", +"SHA256", +"MD5", +"SHA512" +], +"enumDescriptions": [ +"No hash requested.", +"Use a sha256 hash.", +"Use a md5 hash.", +"Use a sha512 hash." +], +"type": "string" +}, +"type": "array" +}, +"substitutionOption": { +"description": "Option to specify behavior when there is an error in the substitution checks. NOTE: this is always set to ALLOW_LOOSE for triggered builds and cannot be overridden in the build configuration file.", +"enum": [ +"MUST_MATCH", +"ALLOW_LOOSE" +], +"enumDescriptions": [ +"Fails the build if error in substitutions checks, like missing a substitution in the template or in the map.", +"Do not fail the build if error in substitutions checks." +], +"type": "string" +}, +"volumes": { +"description": "Global list of volumes to mount for ALL build steps Each volume is created as an empty volume prior to starting the build process. Upon completion of the build, volumes and their contents are discarded. Global volume names and paths cannot conflict with the volumes defined a build step. Using a global volume in a build with only one step is not valid as it is indicative of a build request with an incorrect configuration.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Volume" +}, +"type": "array" +}, +"workerPool": { +"deprecated": true, +"description": "This field deprecated; please use `pool.name` instead.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuildStep": { +"description": "A step in the build pipeline.", +"id": "GoogleDevtoolsCloudbuildV1BuildStep", +"properties": { +"allowExitCodes": { +"description": "Allow this build step to fail without failing the entire build if and only if the exit code is one of the specified codes. If allow_failure is also specified, this field will take precedence.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"allowFailure": { +"description": "Allow this build step to fail without failing the entire build. If false, the entire build will fail if this step fails. Otherwise, the build will succeed, but this step will still have a failure status. Error information will be reported in the failure_detail field.", +"type": "boolean" +}, +"args": { +"description": "A list of arguments that will be presented to the step when it is started. If the image used to run the step's container has an entrypoint, the `args` are used as arguments to that entrypoint. If the image does not define an entrypoint, the first element in args is used as the entrypoint, and the remainder will be used as arguments.", +"items": { +"type": "string" +}, +"type": "array" +}, +"automapSubstitutions": { +"description": "Option to include built-in and custom substitutions as env variables for this build step. This option will override the global option in BuildOption.", +"type": "boolean" +}, +"dir": { +"description": "Working directory to use when running this step's container. If this value is a relative path, it is relative to the build's working directory. If this value is absolute, it may be outside the build's working directory, in which case the contents of the path may not be persisted across build step executions, unless a `volume` for that path is specified. If the build specifies a `RepoSource` with `dir` and a step with a `dir`, which specifies an absolute path, the `RepoSource` `dir` is ignored for the step's execution.", +"type": "string" +}, +"entrypoint": { +"description": "Entrypoint to be used instead of the build step image's default entrypoint. If unset, the image's default entrypoint is used.", +"type": "string" +}, +"env": { +"description": "A list of environment variable definitions to be used when running a step. The elements are of the form \"KEY=VALUE\" for the environment variable \"KEY\" being given the value \"VALUE\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"exitCode": { +"description": "Output only. Return code from running the step.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"id": { +"description": "Unique identifier for this build step, used in `wait_for` to reference this build step as a dependency.", +"type": "string" +}, +"name": { +"description": "Required. The name of the container image that will run this particular build step. If the image is available in the host's Docker daemon's cache, it will be run directly. If not, the host will attempt to pull the image first, using the builder service account's credentials if necessary. The Docker daemon's cache will already have the latest versions of all of the officially supported build steps ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com/GoogleCloudPlatform/cloud-builders)). The Docker daemon will also have cached many of the layers for some popular images, like \"ubuntu\", \"debian\", but they will be refreshed at the time you attempt to use them. If you built an image in a previous build step, it will be stored in the host's Docker daemon's cache and is available to use as the name for a later build step.", +"type": "string" +}, +"pullTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pulling this build step's builder image only.", +"readOnly": true +}, +"script": { +"description": "A shell script to be executed in the step. When script is provided, the user cannot specify the entrypoint or args.", +"type": "string" +}, +"secretEnv": { +"description": "A list of environment variables which are encrypted using a Cloud Key Management Service crypto key. These values must be specified in the build's `Secret`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"status": { +"description": "Output only. Status of the build step. At this time, build step status is only updated on build completion; step status is not updated in real-time as the build progresses.", +"enum": [ +"STATUS_UNKNOWN", +"PENDING", +"QUEUED", +"WORKING", +"SUCCESS", +"FAILURE", +"INTERNAL_ERROR", +"TIMEOUT", +"CANCELLED", +"EXPIRED" +], +"enumDescriptions": [ +"Status of the build is unknown.", +"Build has been created and is pending execution and queuing. It has not been queued.", +"Build or step is queued; work has not yet begun.", +"Build or step is being executed.", +"Build or step finished successfully.", +"Build or step failed to complete successfully.", +"Build or step failed due to an internal cause.", +"Build or step took longer than was allowed.", +"Build or step was canceled by a user.", +"Build was enqueued for longer than the value of `queue_ttl`." +], +"readOnly": true, +"type": "string" +}, +"timeout": { +"description": "Time limit for executing this build step. If not defined, the step has no time limit and will be allowed to continue to run until either it completes or the build itself times out.", +"format": "google-duration", +"type": "string" +}, +"timing": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for executing this build step.", +"readOnly": true +}, +"volumes": { +"description": "List of volumes to mount into the build step. Each volume is created as an empty volume prior to execution of the build step. Upon completion of the build, volumes and their contents are discarded. Using a named volume in only one step is not valid as it is indicative of a build request with an incorrect configuration.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Volume" +}, +"type": "array" +}, +"waitFor": { +"description": "The ID(s) of the step(s) that this build step depends on. This build step will not start until all the build steps in `wait_for` have completed successfully. If `wait_for` is empty, this build step will start when all previous build steps in the `Build.Steps` list have completed successfully.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1BuiltImage": { +"description": "An image built by the pipeline.", +"id": "GoogleDevtoolsCloudbuildV1BuiltImage", +"properties": { +"digest": { +"description": "Docker Registry 2.0 digest.", +"type": "string" +}, +"name": { +"description": "Name used to push the container image to Google Container Registry, as presented to `docker push`.", +"type": "string" +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified image.", +"readOnly": true +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1ConnectedRepository": { +"description": "Location of the source in a 2nd-gen Google Cloud Build repository resource.", +"id": "GoogleDevtoolsCloudbuildV1ConnectedRepository", +"properties": { +"dir": { +"description": "Directory, relative to the source root, in which to run the build.", +"type": "string" +}, +"repository": { +"description": "Required. Name of the Google Cloud Build repository, formatted as `projects/*/locations/*/connections/*/repositories/*`.", +"type": "string" +}, +"revision": { +"description": "The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1FailureInfo": { +"description": "A fatal problem encountered during the execution of the build.", +"id": "GoogleDevtoolsCloudbuildV1FailureInfo", +"properties": { +"detail": { +"description": "Explains the failure issue in more detail using hard-coded text.", +"type": "string" +}, +"type": { +"description": "The name of the failure.", +"enum": [ +"FAILURE_TYPE_UNSPECIFIED", +"PUSH_FAILED", +"PUSH_IMAGE_NOT_FOUND", +"PUSH_NOT_AUTHORIZED", +"LOGGING_FAILURE", +"USER_BUILD_STEP", +"FETCH_SOURCE_FAILED" +], +"enumDescriptions": [ +"Type unspecified", +"Unable to push the image to the repository.", +"Final image not found.", +"Unauthorized push of the final image.", +"Backend logging failures. Should retry.", +"A build step has failed.", +"The source fetching has failed." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1FileHashes": { +"description": "Container message for hashes of byte content of files, used in SourceProvenance messages to verify integrity of source input to the build.", +"id": "GoogleDevtoolsCloudbuildV1FileHashes", +"properties": { +"fileHash": { +"description": "Collection of file hashes.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1Hash" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1GitSource": { +"description": "Location of the source in any accessible Git repository.", +"id": "GoogleDevtoolsCloudbuildV1GitSource", +"properties": { +"dir": { +"description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution.", +"type": "string" +}, +"revision": { +"description": "The revision to fetch from the Git repository such as a branch, a tag, a commit SHA, or any Git ref. Cloud Build uses `git fetch` to fetch the revision from the Git repository; therefore make sure that the string you provide for `revision` is parsable by the command. For information on string values accepted by `git fetch`, see https://git-scm.com/docs/gitrevisions#_specifying_revisions. For information on `git fetch`, see https://git-scm.com/docs/git-fetch.", +"type": "string" +}, +"url": { +"description": "Location of the Git repo to build. This will be used as a `git remote`, see https://git-scm.com/docs/git-remote.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Hash": { +"description": "Container message for hash values.", +"id": "GoogleDevtoolsCloudbuildV1Hash", +"properties": { +"type": { +"description": "The type of hash that was performed.", +"enum": [ +"NONE", +"SHA256", +"MD5", +"SHA512" +], +"enumDescriptions": [ +"No hash requested.", +"Use a sha256 hash.", +"Use a md5 hash.", +"Use a sha512 hash." +], +"type": "string" +}, +"value": { +"description": "The hash value.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1InlineSecret": { +"description": "Pairs a set of secret environment variables mapped to encrypted values with the Cloud KMS key to use to decrypt the value.", +"id": "GoogleDevtoolsCloudbuildV1InlineSecret", +"properties": { +"envMap": { +"additionalProperties": { +"format": "byte", +"type": "string" +}, +"description": "Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.", +"type": "object" +}, +"kmsKeyName": { +"description": "Resource name of Cloud KMS crypto key to decrypt the encrypted value. In format: projects/*/locations/*/keyRings/*/cryptoKeys/*", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1MavenArtifact": { +"description": "A Maven artifact to upload to Artifact Registry upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1MavenArtifact", +"properties": { +"artifactId": { +"description": "Maven `artifactId` value used when uploading the artifact to Artifact Registry.", +"type": "string" +}, +"groupId": { +"description": "Maven `groupId` value used when uploading the artifact to Artifact Registry.", +"type": "string" +}, +"path": { +"description": "Path to an artifact in the build's workspace to be uploaded to Artifact Registry. This can be either an absolute path, e.g. /workspace/my-app/target/my-app-1.0.SNAPSHOT.jar or a relative path from /workspace, e.g. my-app/target/my-app-1.0.SNAPSHOT.jar.", +"type": "string" +}, +"repository": { +"description": "Artifact Registry repository, in the form \"https://$REGION-maven.pkg.dev/$PROJECT/$REPOSITORY\" Artifact in the workspace specified by path will be uploaded to Artifact Registry with this location as a prefix.", +"type": "string" +}, +"version": { +"description": "Maven `version` value used when uploading the artifact to Artifact Registry.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1NpmPackage": { +"description": "Npm package to upload to Artifact Registry upon successful completion of all build steps.", +"id": "GoogleDevtoolsCloudbuildV1NpmPackage", +"properties": { +"packagePath": { +"description": "Path to the package.json. e.g. workspace/path/to/package", +"type": "string" +}, +"repository": { +"description": "Artifact Registry repository, in the form \"https://$REGION-npm.pkg.dev/$PROJECT/$REPOSITORY\" Npm package in the workspace specified by path will be zipped and uploaded to Artifact Registry with this location as a prefix.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1PoolOption": { +"description": "Details about how a build should be executed on a `WorkerPool`. See [running builds in a private pool](https://cloud.google.com/build/docs/private-pools/run-builds-in-private-pool) for more information.", +"id": "GoogleDevtoolsCloudbuildV1PoolOption", +"properties": { +"name": { +"description": "The `WorkerPool` resource to execute the build on. You must have `cloudbuild.workerpools.use` on the project hosting the WorkerPool. Format projects/{project}/locations/{location}/workerPools/{workerPoolId}", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1PythonPackage": { +"description": "Python package to upload to Artifact Registry upon successful completion of all build steps. A package can encapsulate multiple objects to be uploaded to a single repository.", +"id": "GoogleDevtoolsCloudbuildV1PythonPackage", +"properties": { +"paths": { +"description": "Path globs used to match files in the build's workspace. For Python/ Twine, this is usually `dist/*`, and sometimes additionally an `.asc` file.", +"items": { +"type": "string" +}, +"type": "array" +}, +"repository": { +"description": "Artifact Registry repository, in the form \"https://$REGION-python.pkg.dev/$PROJECT/$REPOSITORY\" Files in the workspace matching any path pattern will be uploaded to Artifact Registry with this location as a prefix.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1RepoSource": { +"description": "Location of the source in a Google Cloud Source Repository.", +"id": "GoogleDevtoolsCloudbuildV1RepoSource", +"properties": { +"branchName": { +"description": "Regex matching branches to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", +"type": "string" +}, +"commitSha": { +"description": "Explicit commit SHA to build.", +"type": "string" +}, +"dir": { +"description": "Directory, relative to the source root, in which to run the build. This must be a relative path. If a step's `dir` is specified and is an absolute path, this value is ignored for that step's execution.", +"type": "string" +}, +"invertRegex": { +"description": "Only trigger a build if the revision regex does NOT match the revision regex.", +"type": "boolean" +}, +"projectId": { +"description": "ID of the project that owns the Cloud Source Repository. If omitted, the project ID requesting the build is assumed.", +"type": "string" +}, +"repoName": { +"description": "Name of the Cloud Source Repository.", +"type": "string" +}, +"substitutions": { +"additionalProperties": { +"type": "string" +}, +"description": "Substitutions to use in a triggered build. Should only be used with RunBuildTrigger", +"type": "object" +}, +"tagName": { +"description": "Regex matching tags to build. The syntax of the regular expressions accepted is the syntax accepted by RE2 and described at https://github.com/google/re2/wiki/Syntax", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Results": { +"description": "Artifacts created by the build pipeline.", +"id": "GoogleDevtoolsCloudbuildV1Results", +"properties": { +"artifactManifest": { +"description": "Path to the artifact manifest for non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.", +"type": "string" +}, +"artifactTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Time to push all non-container artifacts to Cloud Storage." +}, +"buildStepImages": { +"description": "List of build step digests, in the order corresponding to build step indices.", +"items": { +"type": "string" +}, +"type": "array" +}, +"buildStepOutputs": { +"description": "List of build step outputs, produced by builder images, in the order corresponding to build step indices. [Cloud Builders](https://cloud.google.com/cloud-build/docs/cloud-builders) can produce this output by writing to `$BUILDER_OUTPUT/output`. Only the first 50KB of data is stored.", +"items": { +"format": "byte", +"type": "string" +}, +"type": "array" +}, +"images": { +"description": "Container images that were built as a part of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1BuiltImage" +}, +"type": "array" +}, +"mavenArtifacts": { +"description": "Maven artifacts uploaded to Artifact Registry at the end of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1UploadedMavenArtifact" +}, +"type": "array" +}, +"npmPackages": { +"description": "Npm packages uploaded to Artifact Registry at the end of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1UploadedNpmPackage" +}, +"type": "array" +}, +"numArtifacts": { +"description": "Number of non-container artifacts uploaded to Cloud Storage. Only populated when artifacts are uploaded to Cloud Storage.", +"format": "int64", +"type": "string" +}, +"pythonPackages": { +"description": "Python artifacts uploaded to Artifact Registry at the end of the build.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1UploadedPythonPackage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Secret": { +"description": "Pairs a set of secret environment variables containing encrypted values with the Cloud KMS key to use to decrypt the value. Note: Use `kmsKeyName` with `available_secrets` instead of using `kmsKeyName` with `secret`. For instructions see: https://cloud.google.com/cloud-build/docs/securing-builds/use-encrypted-credentials.", +"id": "GoogleDevtoolsCloudbuildV1Secret", +"properties": { +"kmsKeyName": { +"description": "Cloud KMS key name to use to decrypt these envs.", +"type": "string" +}, +"secretEnv": { +"additionalProperties": { +"format": "byte", +"type": "string" +}, +"description": "Map of environment variable name to its encrypted value. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step. Values can be at most 64 KB in size. There can be at most 100 secret values across all of a build's secrets.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1SecretManagerSecret": { +"description": "Pairs a secret environment variable with a SecretVersion in Secret Manager.", +"id": "GoogleDevtoolsCloudbuildV1SecretManagerSecret", +"properties": { +"env": { +"description": "Environment variable name to associate with the secret. Secret environment variables must be unique across all of a build's secrets, and must be used by at least one build step.", +"type": "string" +}, +"versionName": { +"description": "Resource name of the SecretVersion. In format: projects/*/secrets/*/versions/*", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Secrets": { +"description": "Secrets and secret environment variables.", +"id": "GoogleDevtoolsCloudbuildV1Secrets", +"properties": { +"inline": { +"description": "Secrets encrypted with KMS key and the associated secret environment variable.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1InlineSecret" +}, +"type": "array" +}, +"secretManager": { +"description": "Secrets in Secret Manager and associated secret environment variable.", +"items": { +"$ref": "GoogleDevtoolsCloudbuildV1SecretManagerSecret" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Source": { +"description": "Location of the source in a supported storage service.", +"id": "GoogleDevtoolsCloudbuildV1Source", +"properties": { +"connectedRepository": { +"$ref": "GoogleDevtoolsCloudbuildV1ConnectedRepository", +"description": "Optional. If provided, get the source from this 2nd-gen Google Cloud Build repository resource." +}, +"gitSource": { +"$ref": "GoogleDevtoolsCloudbuildV1GitSource", +"description": "If provided, get the source from this Git repository." +}, +"repoSource": { +"$ref": "GoogleDevtoolsCloudbuildV1RepoSource", +"description": "If provided, get the source from this location in a Cloud Source Repository." +}, +"storageSource": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSource", +"description": "If provided, get the source from this location in Cloud Storage." +}, +"storageSourceManifest": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSourceManifest", +"description": "If provided, get the source from this manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher)." +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1SourceProvenance": { +"description": "Provenance of the source. Ways to find the original source, or verify that some source was used for this build.", +"id": "GoogleDevtoolsCloudbuildV1SourceProvenance", +"properties": { +"fileHashes": { +"additionalProperties": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes" +}, +"description": "Output only. Hash(es) of the build source, which can be used to verify that the original source integrity was maintained in the build. Note that `FileHashes` will only be populated if `BuildOptions` has requested a `SourceProvenanceHash`. The keys to this map are file paths used as build source and the values contain the hash values for those files. If the build source came in a single package such as a gzipped tarfile (`.tar.gz`), the `FileHash` will be for the single path to that file.", +"readOnly": true, +"type": "object" +}, +"resolvedConnectedRepository": { +"$ref": "GoogleDevtoolsCloudbuildV1ConnectedRepository", +"description": "Output only. A copy of the build's `source.connected_repository`, if exists, with any revisions resolved.", +"readOnly": true +}, +"resolvedGitSource": { +"$ref": "GoogleDevtoolsCloudbuildV1GitSource", +"description": "Output only. A copy of the build's `source.git_source`, if exists, with any revisions resolved.", +"readOnly": true +}, +"resolvedRepoSource": { +"$ref": "GoogleDevtoolsCloudbuildV1RepoSource", +"description": "A copy of the build's `source.repo_source`, if exists, with any revisions resolved." +}, +"resolvedStorageSource": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSource", +"description": "A copy of the build's `source.storage_source`, if exists, with any generations resolved." +}, +"resolvedStorageSourceManifest": { +"$ref": "GoogleDevtoolsCloudbuildV1StorageSourceManifest", +"description": "A copy of the build's `source.storage_source_manifest`, if exists, with any revisions resolved. This feature is in Preview." +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1StorageSource": { +"description": "Location of the source in an archive file in Cloud Storage.", +"id": "GoogleDevtoolsCloudbuildV1StorageSource", +"properties": { +"bucket": { +"description": "Cloud Storage bucket containing the source (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", +"type": "string" +}, +"generation": { +"description": "Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Cloud Storage object containing the source. This object must be a zipped (`.zip`) or gzipped archive file (`.tar.gz`) containing source to build.", +"type": "string" +}, +"sourceFetcher": { +"description": "Optional. Option to specify the tool to fetch the source file for the build.", +"enum": [ +"SOURCE_FETCHER_UNSPECIFIED", +"GSUTIL", +"GCS_FETCHER" +], +"enumDescriptions": [ +"Unspecified defaults to GSUTIL.", +"Use the \"gsutil\" tool to download the source file.", +"Use the Cloud Storage Fetcher tool to download the source file." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1StorageSourceManifest": { +"description": "Location of the source manifest in Cloud Storage. This feature is in Preview; see description [here](https://github.com/GoogleCloudPlatform/cloud-builders/tree/master/gcs-fetcher).", +"id": "GoogleDevtoolsCloudbuildV1StorageSourceManifest", +"properties": { +"bucket": { +"description": "Cloud Storage bucket containing the source manifest (see [Bucket Name Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)).", +"type": "string" +}, +"generation": { +"description": "Cloud Storage generation for the object. If the generation is omitted, the latest generation will be used.", +"format": "int64", +"type": "string" +}, +"object": { +"description": "Cloud Storage object containing the source manifest. This object must be a JSON file.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1TimeSpan": { +"description": "Start and end times for a build execution phase.", +"id": "GoogleDevtoolsCloudbuildV1TimeSpan", +"properties": { +"endTime": { +"description": "End of time span.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Start of time span.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1UploadedMavenArtifact": { +"description": "A Maven artifact uploaded using the MavenArtifact directive.", +"id": "GoogleDevtoolsCloudbuildV1UploadedMavenArtifact", +"properties": { +"fileHashes": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes", +"description": "Hash types and values of the Maven Artifact." +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified artifact.", +"readOnly": true +}, +"uri": { +"description": "URI of the uploaded artifact.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1UploadedNpmPackage": { +"description": "An npm package uploaded to Artifact Registry using the NpmPackage directive.", +"id": "GoogleDevtoolsCloudbuildV1UploadedNpmPackage", +"properties": { +"fileHashes": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes", +"description": "Hash types and values of the npm package." +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified artifact.", +"readOnly": true +}, +"uri": { +"description": "URI of the uploaded npm package.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1UploadedPythonPackage": { +"description": "Artifact uploaded using the PythonPackage directive.", +"id": "GoogleDevtoolsCloudbuildV1UploadedPythonPackage", +"properties": { +"fileHashes": { +"$ref": "GoogleDevtoolsCloudbuildV1FileHashes", +"description": "Hash types and values of the Python Artifact." +}, +"pushTiming": { +"$ref": "GoogleDevtoolsCloudbuildV1TimeSpan", +"description": "Output only. Stores timing information for pushing the specified artifact.", +"readOnly": true +}, +"uri": { +"description": "URI of the uploaded artifact.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Volume": { +"description": "Volume describes a Docker container volume which is mounted into build steps in order to persist files across build step execution.", +"id": "GoogleDevtoolsCloudbuildV1Volume", +"properties": { +"name": { +"description": "Name of the volume to mount. Volume names must be unique per build step and must be valid names for Docker volumes. Each named volume must be used by at least two build steps.", +"type": "string" +}, +"path": { +"description": "Path at which to mount the volume. Paths must be absolute and cannot conflict with other volume paths on the same build step or with certain reserved volume paths.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleDevtoolsCloudbuildV1Warning": { +"description": "A non-fatal problem encountered during the execution of the build.", +"id": "GoogleDevtoolsCloudbuildV1Warning", +"properties": { +"priority": { +"description": "The priority for this warning.", +"enum": [ +"PRIORITY_UNSPECIFIED", +"INFO", +"WARNING", +"ALERT" +], +"enumDescriptions": [ +"Should not be used.", +"e.g. deprecation warnings and alternative feature highlights.", +"e.g. automated detection of possible issues with the build.", +"e.g. alerts that a feature used in the build is pending removal" +], +"type": "string" +}, +"text": { +"description": "Explanation of the warning generated.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditConfig": { +"description": "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.", +"id": "GoogleIamV1AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "GoogleIamV1AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1AuditLogConfig": { +"description": "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.", +"id": "GoogleIamV1AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1Policy": { +"description": "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/).", +"id": "GoogleIamV1Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "GoogleIamV1AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "GoogleIamV1Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleIamV1SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "GoogleIamV1SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "GoogleIamV1Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIamV1TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "GoogleIamV1TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIamV1TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "GoogleIamV1TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleLongrunningWaitOperationRequest": { +"description": "The request message for Operations.WaitOperation.", +"id": "GoogleLongrunningWaitOperationRequest", +"properties": { +"timeout": { +"description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"Proto2BridgeMessageSet": { +"description": "This is proto2's version of MessageSet.", +"id": "Proto2BridgeMessageSet", +"properties": {}, +"type": "object" +}, +"UtilStatusProto": { +"description": "Wire-format for a Status object", +"id": "UtilStatusProto", +"properties": { +"canonicalCode": { +"description": "The canonical error code (see codes.proto) that most closely corresponds to this status. This may be missing, and in the common case of the generic space, it definitely will be.", +"format": "int32", +"type": "integer" +}, +"code": { +"description": "Numeric code drawn from the space specified below. Often, this is the canonical error space, and code is drawn from google3/util/task/codes.proto", +"format": "int32", +"type": "integer" +}, +"message": { +"description": "Detail message", +"type": "string" +}, +"messageSet": { +"$ref": "Proto2BridgeMessageSet", +"description": "message_set associates an arbitrary proto message with the status." +}, +"space": { +"description": "The following are usually only present when code != 0 Space to which this status belongs", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Run Admin API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/runtimeconfig.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/runtimeconfig.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..351d9134058c66d472bda3fec001b85252f29b72 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/runtimeconfig.v1.json @@ -0,0 +1,313 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloudruntimeconfig": { +"description": "Manage your Google Cloud Platform services' runtime configuration" +} +} +} +}, +"basePath": "", +"baseUrl": "https://runtimeconfig.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud RuntimeConfig", +"description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "runtimeconfig:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://runtimeconfig.mtls.googleapis.com/", +"name": "runtimeconfig", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "runtimeconfig.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "runtimeconfig.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "runtimeconfig.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +} +} +} +}, +"revision": "20240227", +"rootUrl": "https://runtimeconfig.googleapis.com/", +"schemas": { +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Runtime Configuration API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/runtimeconfig.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/runtimeconfig.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..5de679926e65136d36d034886124c60c9f91ef5a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/runtimeconfig.v1beta1.json @@ -0,0 +1,1176 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloudruntimeconfig": { +"description": "Manage your Google Cloud Platform services' runtime configuration" +} +} +} +}, +"basePath": "", +"baseUrl": "https://runtimeconfig.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud RuntimeConfig", +"description": "The Runtime Configurator allows you to dynamically configure and expose variables through Google Cloud Platform. In addition, you can also set Watchers and Waiters that will watch for changes to your data and return based on certain conditions.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/deployment-manager/runtime-configurator/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "runtimeconfig:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://runtimeconfig.mtls.googleapis.com/", +"name": "runtimeconfig", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"configs": { +"methods": { +"create": { +"description": "Creates a new RuntimeConfig resource. The configuration name must be unique within project.", +"flatPath": "v1beta1/projects/{projectsId}/configs", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848) for this request, in the format `projects/[PROJECT_ID]`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "An optional but recommended unique `request_id`. If the server receives two `create()` requests with the same `request_id`, then the second request will be ignored and the first resource created and stored in the backend is returned. Empty `request_id` fields are ignored. It is responsibility of the client to ensure uniqueness of the `request_id` strings. `request_id` strings are limited to 64 characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/configs", +"request": { +"$ref": "RuntimeConfig" +}, +"response": { +"$ref": "RuntimeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"delete": { +"description": "Deletes a RuntimeConfig resource.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", +"httpMethod": "DELETE", +"id": "runtimeconfig.projects.configs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The RuntimeConfig resource to delete, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"get": { +"description": "Gets information about a RuntimeConfig resource.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the RuntimeConfig resource to retrieve, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "RuntimeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:getIamPolicy", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"list": { +"description": "Lists all the RuntimeConfig resources within project.", +"flatPath": "v1beta1/projects/{projectsId}/configs", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Specifies the number of results to return per page. If there are fewer elements than the specified number, returns all elements.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken` returned by a previous list request to get the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The [project ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848) for this request, in the format `projects/[PROJECT_ID]`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/configs", +"response": { +"$ref": "ListConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:setIamPolicy", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}:testIamPermissions", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"update": { +"description": "Updates a RuntimeConfig resource. The configuration must exist beforehand.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}", +"httpMethod": "PUT", +"id": "runtimeconfig.projects.configs.update", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the RuntimeConfig resource to update, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "RuntimeConfig" +}, +"response": { +"$ref": "RuntimeConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/operations/{operationsId}:testIamPermissions", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.operations.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +} +} +}, +"variables": { +"methods": { +"create": { +"description": "Creates a variable within the given configuration. You cannot create a variable with a name that is a prefix of an existing variable name, or a name that has an existing variable name as a prefix. To learn more about creating a variable, read the [Setting and Getting Data](/deployment-manager/runtime-configurator/set-and-get-variables) documentation.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.variables.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The path to the RutimeConfig resource that this variable should belong to. The configuration must exist beforehand; the path must be in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "An optional but recommended unique `request_id`. If the server receives two `create()` requests with the same `request_id`, then the second request will be ignored and the first resource created and stored in the backend is returned. Empty `request_id` fields are ignored. It is responsibility of the client to ensure uniqueness of the `request_id` strings. `request_id` strings are limited to 64 characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/variables", +"request": { +"$ref": "Variable" +}, +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"delete": { +"description": "Deletes a variable or multiple variables. If you specify a variable name, then that variable is deleted. If you specify a prefix and `recursive` is true, then all variables with that prefix are deleted. You must set a `recursive` to true if you delete variables by prefix.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", +"httpMethod": "DELETE", +"id": "runtimeconfig.projects.configs.variables.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the variable to delete, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/variables/.*$", +"required": true, +"type": "string" +}, +"recursive": { +"description": "Set to `true` to recursively delete multiple variables with the same prefix.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"get": { +"description": "Gets information about a single variable.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.variables.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the variable to return, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIBLE_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/variables/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"list": { +"description": "Lists variables within given a configuration, matching any provided filters. This only lists variable names, not the values, unless `return_values` is true, in which case only variables that user has IAM permission to GetVariable will be returned.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.variables.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filters variables by matching the specified filter. For example: `projects/example-project/config/[CONFIG_NAME]/variables/example-variable`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Specifies the number of results to return per page. If there are fewer elements than the specified number, returns all elements.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken` returned by a previous list request to get the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The path to the RuntimeConfig resource for which you want to list variables. The configuration must exist beforehand; the path must be in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +}, +"returnValues": { +"description": "The flag indicates whether the user wants to return values of variables. If true, then only those variables that user has IAM GetVariable permission will be returned along with their values.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta1/{+parent}/variables", +"response": { +"$ref": "ListVariablesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:testIamPermissions", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.variables.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/variables/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"update": { +"description": "Updates an existing variable with a new value.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}", +"httpMethod": "PUT", +"id": "runtimeconfig.projects.configs.variables.update", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the variable to update, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/variables/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Variable" +}, +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"watch": { +"description": "Watches a specific variable and waits for a change in the variable's value. When there is a change, this method returns the new value or times out. If a variable is deleted while being watched, the `variableState` state is set to `DELETED` and the method returns the last known variable `value`. If you set the deadline for watching to a larger value than internal timeout (60 seconds), the current variable value is returned and the `variableState` will be `VARIABLE_STATE_UNSPECIFIED`. To learn more about creating a watcher, read the [Watching a Variable for Changes](/deployment-manager/runtime-configurator/watching-a-variable) documentation.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/variables/{variablesId}:watch", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.variables.watch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the variable to watch, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/variables/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:watch", +"request": { +"$ref": "WatchVariableRequest" +}, +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +} +} +}, +"waiters": { +"methods": { +"create": { +"description": "Creates a Waiter resource. This operation returns a long-running Operation resource which can be polled for completion. However, a waiter with the given name will exist (and can be retrieved) prior to the operation completing. If the operation fails, the failed Waiter resource will still exist and must be deleted prior to subsequent creation attempts.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.waiters.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The path to the configuration that will own the waiter. The configuration must exist beforehand; the path must be in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "An optional but recommended unique `request_id`. If the server receives two `create()` requests with the same `request_id`, then the second request will be ignored and the first resource created and stored in the backend is returned. Empty `request_id` fields are ignored. It is responsibility of the client to ensure uniqueness of the `request_id` strings. `request_id` strings are limited to 64 characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/waiters", +"request": { +"$ref": "Waiter" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"delete": { +"description": "Deletes the waiter with the specified name.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", +"httpMethod": "DELETE", +"id": "runtimeconfig.projects.configs.waiters.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The Waiter resource to delete, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"get": { +"description": "Gets information about a single waiter.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.waiters.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The fully-qualified name of the Waiter resource object to retrieve, in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Waiter" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"list": { +"description": "List waiters within the given configuration.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters", +"httpMethod": "GET", +"id": "runtimeconfig.projects.configs.waiters.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Specifies the number of results to return per page. If there are fewer elements than the specified number, returns all elements.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Specifies a page token to use. Set `pageToken` to a `nextPageToken` returned by a previous list request to get the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The path to the configuration for which you want to get a list of waiters. The configuration must exist beforehand; the path must be in the format: `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/waiters", +"response": { +"$ref": "ListWaitersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/configs/{configsId}/waiters/{waitersId}:testIamPermissions", +"httpMethod": "POST", +"id": "runtimeconfig.projects.configs.waiters.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/configs/[^/]+/waiters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloudruntimeconfig" +] +} +} +} +} +} +} +} +}, +"revision": "20240227", +"rootUrl": "https://runtimeconfig.googleapis.com/", +"schemas": { +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"Cardinality": { +"description": "A Cardinality condition for the Waiter resource. A cardinality condition is met when the number of variables under a specified path prefix reaches a predefined number. For example, if you set a Cardinality condition where the `path` is set to `/foo` and the number of paths is set to `2`, the following variables would meet the condition in a RuntimeConfig resource: + `/foo/variable1 = \"value1\"` + `/foo/variable2 = \"value2\"` + `/bar/variable3 = \"value3\"` It would not satisfy the same condition with the `number` set to `3`, however, because there is only 2 paths that start with `/foo`. Cardinality conditions are recursive; all subtrees under the specific path prefix are counted.", +"id": "Cardinality", +"properties": { +"number": { +"description": "The number variables under the `path` that must exist to meet this condition. Defaults to 1 if not specified.", +"format": "int32", +"type": "integer" +}, +"path": { +"description": "The root of the variable subtree to monitor. For example, `/foo`.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EndCondition": { +"description": "The condition that a Waiter resource is waiting for.", +"id": "EndCondition", +"properties": { +"cardinality": { +"$ref": "Cardinality", +"description": "The cardinality of the `EndCondition`." +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ListConfigsResponse": { +"description": "`ListConfigs()` returns the following response. The order of returned objects is arbitrary; that is, it is not ordered in any particular way.", +"id": "ListConfigsResponse", +"properties": { +"configs": { +"description": "A list of the configurations in the project. The order of returned objects is arbitrary; that is, it is not ordered in any particular way.", +"items": { +"$ref": "RuntimeConfig" +}, +"type": "array" +}, +"nextPageToken": { +"description": "This token allows you to get the next page of results for list requests. If the number of results is larger than `pageSize`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list requests will have their own `nextPageToken` to continue paging through the results", +"type": "string" +} +}, +"type": "object" +}, +"ListVariablesResponse": { +"description": "Response for the `ListVariables()` method.", +"id": "ListVariablesResponse", +"properties": { +"nextPageToken": { +"description": "This token allows you to get the next page of results for list requests. If the number of results is larger than `pageSize`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list requests will have their own `nextPageToken` to continue paging through the results", +"type": "string" +}, +"variables": { +"description": "A list of variables and their values. The order of returned variable objects is arbitrary.", +"items": { +"$ref": "Variable" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWaitersResponse": { +"description": "Response for the `ListWaiters()` method. Order of returned waiter objects is arbitrary.", +"id": "ListWaitersResponse", +"properties": { +"nextPageToken": { +"description": "This token allows you to get the next page of results for list requests. If the number of results is larger than `pageSize`, use the `nextPageToken` as a value for the query parameter `pageToken` in the next list request. Subsequent list requests will have their own `nextPageToken` to continue paging through the results", +"type": "string" +}, +"waiters": { +"description": "Found waiters in the project.", +"items": { +"$ref": "Waiter" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"RuntimeConfig": { +"description": "A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig service. A RuntimeConfig resource consists of metadata and a hierarchy of variables.", +"id": "RuntimeConfig", +"properties": { +"description": { +"description": "An optional description of the RuntimeConfig object.", +"type": "string" +}, +"name": { +"description": "The resource name of a runtime config. The name must have the format: projects/[PROJECT_ID]/configs/[CONFIG_NAME] The `[PROJECT_ID]` must be a valid project ID, and `[CONFIG_NAME]` is an arbitrary name that matches the `[0-9A-Za-z](?:[_.A-Za-z0-9-]{0,62}[_.A-Za-z0-9])?` regular expression. The length of `[CONFIG_NAME]` must be less than 64 characters. You pick the RuntimeConfig resource name, but the server will validate that the name adheres to this format. After you create the resource, you cannot change the resource's name.", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Variable": { +"description": "Describes a single variable within a RuntimeConfig resource. The name denotes the hierarchical variable name. For example, `ports/serving_port` is a valid variable name. The variable value is an opaque string and only leaf variables can have values (that is, variables that do not have any child variables).", +"id": "Variable", +"properties": { +"name": { +"description": "The name of the variable resource, in the format: projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME] The `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a valid RuntimeConfig resource and `[VARIABLE_NAME]` follows Unix file system file path naming. The `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and dashes. Slashes are used as path element separators and are not part of the `[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one non-slash character. Multiple slashes are coalesced into single slash character. Each path segment should match [0-9A-Za-z](?:[_.A-Za-z0-9-]{0,62}[_.A-Za-z0-9])? regular expression. The length of a `[VARIABLE_NAME]` must be less than 256 characters. Once you create a variable, you cannot change the variable name.", +"type": "string" +}, +"state": { +"description": "Output only. The current state of the variable. The variable state indicates the outcome of the `variables().watch` call and is visible through the `get` and `list` calls.", +"enum": [ +"VARIABLE_STATE_UNSPECIFIED", +"UPDATED", +"DELETED" +], +"enumDescriptions": [ +"Default variable state.", +"The variable was updated, while `variables().watch` was executing.", +"The variable was deleted, while `variables().watch` was executing." +], +"type": "string" +}, +"text": { +"description": "The string value of the variable. The length of the value must be less than 4096 bytes. Empty values are also accepted. For example, `text: \"my text value\"`. The string must be valid UTF-8.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time of the last variable update. Timestamp will be UTC timestamp.", +"format": "google-datetime", +"type": "string" +}, +"value": { +"description": "The binary value of the variable. The length of the value must be less than 4096 bytes. Empty values are also accepted. The value must be base64 encoded, and must comply with IETF RFC4648 (https://www.ietf.org/rfc/rfc4648.txt). Only one of `value` or `text` can be set.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"Waiter": { +"description": "A Waiter resource waits for some end condition within a RuntimeConfig resource to be met before it returns. For example, assume you have a distributed system where each node writes to a Variable resource indicating the node's readiness as part of the startup process. You then configure a Waiter resource with the success condition set to wait until some number of nodes have checked in. Afterwards, your application runs some arbitrary code after the condition has been met and the waiter returns successfully. Once created, a Waiter resource is immutable. To learn more about using waiters, read the [Creating a Waiter](/deployment-manager/runtime-configurator/creating-a-waiter) documentation.", +"id": "Waiter", +"properties": { +"createTime": { +"description": "Output only. The instant at which this Waiter resource was created. Adding the value of `timeout` to this instant yields the timeout deadline for the waiter.", +"format": "google-datetime", +"type": "string" +}, +"done": { +"description": "Output only. If the value is `false`, it means the waiter is still waiting for one of its conditions to be met. If true, the waiter has finished. If the waiter finished due to a timeout or failure, `error` will be set.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "Output only. If the waiter ended due to a failure or timeout, this value will be set." +}, +"failure": { +"$ref": "EndCondition", +"description": "[Optional] The failure condition of this waiter. If this condition is met, `done` will be set to `true` and the `error` code will be set to `ABORTED`. The failure condition takes precedence over the success condition. If both conditions are met, a failure will be indicated. This value is optional; if no failure condition is set, the only failure scenario will be a timeout." +}, +"name": { +"description": "The name of the Waiter resource, in the format: projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME] The `[PROJECT_ID]` must be a valid Google Cloud project ID, the `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the `[WAITER_NAME]` must match RFC 1035 segment specification, and the length of `[WAITER_NAME]` must be less than 64 bytes. After you create a Waiter resource, you cannot change the resource name.", +"type": "string" +}, +"success": { +"$ref": "EndCondition", +"description": "[Required] The success condition. If this condition is met, `done` will be set to `true` and the `error` value will remain unset. The failure condition takes precedence over the success condition. If both conditions are met, a failure will be indicated." +}, +"timeout": { +"description": "[Required] Specifies the timeout of the waiter in seconds, beginning from the instant that `waiters().create` method is called. If this time elapses before the success or failure conditions are met, the waiter fails and sets the `error` code to `DEADLINE_EXCEEDED`.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"WatchVariableRequest": { +"description": "Request for the `WatchVariable()` method.", +"id": "WatchVariableRequest", +"properties": { +"newerThan": { +"description": "If specified, checks the current timestamp of the variable and if the current timestamp is newer than `newerThan` timestamp, the method returns immediately. If not specified or the variable has an older timestamp, the watcher waits for a the value to change before returning.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Runtime Configuration API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/safebrowsing.v4.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/safebrowsing.v4.json new file mode 100644 index 0000000000000000000000000000000000000000..062eff61a3f77b2405e6cdb458bddb1b0ded4cde --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/safebrowsing.v4.json @@ -0,0 +1,1344 @@ +{ +"basePath": "", +"baseUrl": "https://safebrowsing.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Safebrowsing", +"description": "Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes \u2013 meaning \u201cfor sale or revenue-generating purposes\u201d \u2013 please refer to the Web Risk API.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/safe-browsing/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "safebrowsing:v4", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://safebrowsing.mtls.googleapis.com/", +"name": "safebrowsing", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"encodedFullHashes": { +"methods": { +"get": { +"description": "", +"flatPath": "v4/encodedFullHashes/{encodedRequest}", +"httpMethod": "GET", +"id": "safebrowsing.encodedFullHashes.get", +"parameterOrder": [ +"encodedRequest" +], +"parameters": { +"clientId": { +"description": "A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.", +"location": "query", +"type": "string" +}, +"clientVersion": { +"description": "The version of the client implementation.", +"location": "query", +"type": "string" +}, +"encodedRequest": { +"description": "A serialized FindFullHashesRequest proto.", +"format": "byte", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/encodedFullHashes/{encodedRequest}", +"response": { +"$ref": "GoogleSecuritySafebrowsingV4FindFullHashesResponse" +} +} +} +}, +"encodedUpdates": { +"methods": { +"get": { +"description": "", +"flatPath": "v4/encodedUpdates/{encodedRequest}", +"httpMethod": "GET", +"id": "safebrowsing.encodedUpdates.get", +"parameterOrder": [ +"encodedRequest" +], +"parameters": { +"clientId": { +"description": "A client ID that uniquely identifies the client implementation of the Safe Browsing API.", +"location": "query", +"type": "string" +}, +"clientVersion": { +"description": "The version of the client implementation.", +"location": "query", +"type": "string" +}, +"encodedRequest": { +"description": "A serialized FetchThreatListUpdatesRequest proto.", +"format": "byte", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/encodedUpdates/{encodedRequest}", +"response": { +"$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse" +} +} +} +}, +"fullHashes": { +"methods": { +"find": { +"description": "Finds the full hashes that match the requested hash prefixes.", +"flatPath": "v4/fullHashes:find", +"httpMethod": "POST", +"id": "safebrowsing.fullHashes.find", +"parameterOrder": [], +"parameters": {}, +"path": "v4/fullHashes:find", +"request": { +"$ref": "GoogleSecuritySafebrowsingV4FindFullHashesRequest" +}, +"response": { +"$ref": "GoogleSecuritySafebrowsingV4FindFullHashesResponse" +} +} +} +}, +"threatHits": { +"methods": { +"create": { +"description": "Reports a Safe Browsing threat list hit to Google. Only projects with TRUSTED_REPORTER visibility can use this method.", +"flatPath": "v4/threatHits", +"httpMethod": "POST", +"id": "safebrowsing.threatHits.create", +"parameterOrder": [], +"parameters": {}, +"path": "v4/threatHits", +"request": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatHit" +}, +"response": { +"$ref": "GoogleProtobufEmpty" +} +} +} +}, +"threatListUpdates": { +"methods": { +"fetch": { +"description": "Fetches the most recent threat list updates. A client can request updates for multiple lists at once.", +"flatPath": "v4/threatListUpdates:fetch", +"httpMethod": "POST", +"id": "safebrowsing.threatListUpdates.fetch", +"parameterOrder": [], +"parameters": {}, +"path": "v4/threatListUpdates:fetch", +"request": { +"$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest" +}, +"response": { +"$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse" +} +} +} +}, +"threatLists": { +"methods": { +"list": { +"description": "Lists the Safe Browsing threat lists available for download.", +"flatPath": "v4/threatLists", +"httpMethod": "GET", +"id": "safebrowsing.threatLists.list", +"parameterOrder": [], +"parameters": {}, +"path": "v4/threatLists", +"response": { +"$ref": "GoogleSecuritySafebrowsingV4ListThreatListsResponse" +} +} +} +}, +"threatMatches": { +"methods": { +"find": { +"description": "Finds the threat entries that match the Safe Browsing lists.", +"flatPath": "v4/threatMatches:find", +"httpMethod": "POST", +"id": "safebrowsing.threatMatches.find", +"parameterOrder": [], +"parameters": {}, +"path": "v4/threatMatches:find", +"request": { +"$ref": "GoogleSecuritySafebrowsingV4FindThreatMatchesRequest" +}, +"response": { +"$ref": "GoogleSecuritySafebrowsingV4FindThreatMatchesResponse" +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://safebrowsing.googleapis.com/", +"schemas": { +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4Checksum": { +"description": "The expected state of a client's local database.", +"id": "GoogleSecuritySafebrowsingV4Checksum", +"properties": { +"sha256": { +"description": "The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ClientInfo": { +"description": "The client metadata associated with Safe Browsing API requests.", +"id": "GoogleSecuritySafebrowsingV4ClientInfo", +"properties": { +"clientId": { +"description": "A client ID that (hopefully) uniquely identifies the client implementation of the Safe Browsing API.", +"type": "string" +}, +"clientVersion": { +"description": "The version of the client implementation.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest": { +"description": "Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. The server may not respond to all requests, if the server has no updates for that list. NOTE: Field index 2 is unused. NEXT: 5", +"id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequest", +"properties": { +"client": { +"$ref": "GoogleSecuritySafebrowsingV4ClientInfo", +"description": "The client metadata." +}, +"listUpdateRequests": { +"description": "The requested threat list updates.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest": { +"description": "A single list update request.", +"id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequest", +"properties": { +"constraints": { +"$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints", +"description": "The constraints associated with this request." +}, +"platformType": { +"description": "The type of platform at risk by entries present in the list.", +"enum": [ +"PLATFORM_TYPE_UNSPECIFIED", +"WINDOWS", +"LINUX", +"ANDROID", +"OSX", +"IOS", +"ANY_PLATFORM", +"ALL_PLATFORMS", +"CHROME" +], +"enumDescriptions": [ +"Unknown platform.", +"Threat posed to Windows.", +"Threat posed to Linux.", +"Threat posed to Android.", +"Threat posed to OS X.", +"Threat posed to iOS.", +"Threat posed to at least one of the defined platforms.", +"Threat posed to all defined platforms.", +"Threat posed to Chrome." +], +"type": "string" +}, +"state": { +"description": "The current state of the client for the requested list (the encrypted client state that was received from the last successful list update).", +"format": "byte", +"type": "string" +}, +"threatEntryType": { +"description": "The types of entries present in the list.", +"enum": [ +"THREAT_ENTRY_TYPE_UNSPECIFIED", +"URL", +"EXECUTABLE", +"IP_RANGE", +"CHROME_EXTENSION", +"FILENAME", +"CERT" +], +"enumDescriptions": [ +"Unspecified.", +"A URL.", +"An executable program.", +"An IP range.", +"Chrome extension.", +"Filename.", +"CERT" +], +"type": "string" +}, +"threatType": { +"description": "The type of threat posed by entries present in the list.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"POTENTIALLY_HARMFUL_APPLICATION", +"SOCIAL_ENGINEERING_INTERNAL", +"API_ABUSE", +"MALICIOUS_BINARY", +"CSD_WHITELIST", +"CSD_DOWNLOAD_WHITELIST", +"CLIENT_INCIDENT", +"CLIENT_INCIDENT_WHITELIST", +"APK_MALWARE_OFFLINE", +"SUBRESOURCE_FILTER", +"SUSPICIOUS", +"TRICK_TO_BILL", +"HIGH_CONFIDENCE_ALLOWLIST", +"ACCURACY_TIPS" +], +"enumDescriptions": [ +"Unknown.", +"Malware threat type.", +"Social engineering threat type.", +"Unwanted software threat type.", +"Potentially harmful application threat type.", +"Social engineering threat type for internal use.", +"API abuse threat type.", +"Malicious binary threat type.", +"Client side detection whitelist threat type.", +"Client side download detection whitelist threat type.", +"Client incident threat type.", +"Whitelist used when detecting client incident threats.", +"List used for offline APK checks in PAM.", +"Patterns to be used for activating the subresource filter.", +"Entities that are suspected to present a threat.", +"Trick-to-bill threat type.", +"URL expressions that are very likely to be safe.", +"An experimental threat type related to Jigsaw. See https://jigsaw.google.com/." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints": { +"description": "The constraints for this update.", +"id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesRequestListUpdateRequestConstraints", +"properties": { +"deviceLocation": { +"description": "A client's physical location, expressed as a ISO 31166-1 alpha-2 region code.", +"type": "string" +}, +"language": { +"description": "Requests the lists for a specific language. Expects ISO 639 alpha-2 format.", +"type": "string" +}, +"maxDatabaseEntries": { +"description": "Sets the maximum number of entries that the client is willing to have in the local database for the specified list. This should be a power of 2 between 2**10 and 2**20. If zero, no database size limit is set.", +"format": "int32", +"type": "integer" +}, +"maxUpdateEntries": { +"description": "The maximum size in number of entries. The update will not contain more entries than this value. This should be a power of 2 between 2**10 and 2**20. If zero, no update size limit is set.", +"format": "int32", +"type": "integer" +}, +"region": { +"description": "Requests the list for a specific geographic location. If not set the server may pick that value based on the user's IP address. Expects ISO 3166-1 alpha-2 format.", +"type": "string" +}, +"supportedCompressions": { +"description": "The compression types supported by the client.", +"items": { +"enum": [ +"COMPRESSION_TYPE_UNSPECIFIED", +"RAW", +"RICE" +], +"enumDescriptions": [ +"Unknown.", +"Raw, uncompressed data.", +"Rice-Golomb encoded data." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse": { +"id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponse", +"properties": { +"listUpdateResponses": { +"description": "The list updates requested by the clients. The number of responses here may be less than the number of requests sent by clients. This is the case, for example, if the server has no updates for a particular list.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse" +}, +"type": "array" +}, +"minimumWaitDuration": { +"description": "The minimum duration the client must wait before issuing any update request. If this field is not set clients may update as soon as they want.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse": { +"description": "An update to an individual list.", +"id": "GoogleSecuritySafebrowsingV4FetchThreatListUpdatesResponseListUpdateResponse", +"properties": { +"additions": { +"description": "A set of entries to add to a local threat type's list. Repeated to allow for a combination of compressed and raw data to be sent in a single response.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatEntrySet" +}, +"type": "array" +}, +"checksum": { +"$ref": "GoogleSecuritySafebrowsingV4Checksum", +"description": "The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided update. If the client state doesn't match the expected state, the client must disregard this update and retry later." +}, +"newClientState": { +"description": "The new client state, in encrypted format. Opaque to clients.", +"format": "byte", +"type": "string" +}, +"platformType": { +"description": "The platform type for which data is returned.", +"enum": [ +"PLATFORM_TYPE_UNSPECIFIED", +"WINDOWS", +"LINUX", +"ANDROID", +"OSX", +"IOS", +"ANY_PLATFORM", +"ALL_PLATFORMS", +"CHROME" +], +"enumDescriptions": [ +"Unknown platform.", +"Threat posed to Windows.", +"Threat posed to Linux.", +"Threat posed to Android.", +"Threat posed to OS X.", +"Threat posed to iOS.", +"Threat posed to at least one of the defined platforms.", +"Threat posed to all defined platforms.", +"Threat posed to Chrome." +], +"type": "string" +}, +"removals": { +"description": "A set of entries to remove from a local threat type's list. In practice, this field is empty or contains exactly one ThreatEntrySet.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatEntrySet" +}, +"type": "array" +}, +"responseType": { +"description": "The type of response. This may indicate that an action is required by the client when the response is received.", +"enum": [ +"RESPONSE_TYPE_UNSPECIFIED", +"PARTIAL_UPDATE", +"FULL_UPDATE" +], +"enumDescriptions": [ +"Unknown.", +"Partial updates are applied to the client's existing local database.", +"Full updates replace the client's entire local database. This means that either the client was seriously out-of-date or the client is believed to be corrupt." +], +"type": "string" +}, +"threatEntryType": { +"description": "The format of the threats.", +"enum": [ +"THREAT_ENTRY_TYPE_UNSPECIFIED", +"URL", +"EXECUTABLE", +"IP_RANGE", +"CHROME_EXTENSION", +"FILENAME", +"CERT" +], +"enumDescriptions": [ +"Unspecified.", +"A URL.", +"An executable program.", +"An IP range.", +"Chrome extension.", +"Filename.", +"CERT" +], +"type": "string" +}, +"threatType": { +"description": "The threat type for which data is returned.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"POTENTIALLY_HARMFUL_APPLICATION", +"SOCIAL_ENGINEERING_INTERNAL", +"API_ABUSE", +"MALICIOUS_BINARY", +"CSD_WHITELIST", +"CSD_DOWNLOAD_WHITELIST", +"CLIENT_INCIDENT", +"CLIENT_INCIDENT_WHITELIST", +"APK_MALWARE_OFFLINE", +"SUBRESOURCE_FILTER", +"SUSPICIOUS", +"TRICK_TO_BILL", +"HIGH_CONFIDENCE_ALLOWLIST", +"ACCURACY_TIPS" +], +"enumDescriptions": [ +"Unknown.", +"Malware threat type.", +"Social engineering threat type.", +"Unwanted software threat type.", +"Potentially harmful application threat type.", +"Social engineering threat type for internal use.", +"API abuse threat type.", +"Malicious binary threat type.", +"Client side detection whitelist threat type.", +"Client side download detection whitelist threat type.", +"Client incident threat type.", +"Whitelist used when detecting client incident threats.", +"List used for offline APK checks in PAM.", +"Patterns to be used for activating the subresource filter.", +"Entities that are suspected to present a threat.", +"Trick-to-bill threat type.", +"URL expressions that are very likely to be safe.", +"An experimental threat type related to Jigsaw. See https://jigsaw.google.com/." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FindFullHashesRequest": { +"description": "Request to return full hashes matched by the provided hash prefixes.", +"id": "GoogleSecuritySafebrowsingV4FindFullHashesRequest", +"properties": { +"apiClient": { +"$ref": "GoogleSecuritySafebrowsingV4ClientInfo", +"description": "Client metadata associated with callers of higher-level APIs built on top of the client's implementation." +}, +"client": { +"$ref": "GoogleSecuritySafebrowsingV4ClientInfo", +"description": "The client metadata." +}, +"clientStates": { +"description": "The current client states for each of the client's local threat lists.", +"items": { +"format": "byte", +"type": "string" +}, +"type": "array" +}, +"threatInfo": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatInfo", +"description": "The lists and hashes to be checked." +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FindFullHashesResponse": { +"id": "GoogleSecuritySafebrowsingV4FindFullHashesResponse", +"properties": { +"matches": { +"description": "The full hashes that matched the requested prefixes.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatMatch" +}, +"type": "array" +}, +"minimumWaitDuration": { +"description": "The minimum duration the client must wait before issuing any find hashes request. If this field is not set, clients can issue a request as soon as they want.", +"format": "google-duration", +"type": "string" +}, +"negativeCacheDuration": { +"description": "For requested entities that did not match the threat list, how long to cache the response.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FindThreatMatchesRequest": { +"description": "Request to check entries against lists.", +"id": "GoogleSecuritySafebrowsingV4FindThreatMatchesRequest", +"properties": { +"client": { +"$ref": "GoogleSecuritySafebrowsingV4ClientInfo", +"description": "The client metadata." +}, +"threatInfo": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatInfo", +"description": "The lists and entries to be checked for matches." +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4FindThreatMatchesResponse": { +"id": "GoogleSecuritySafebrowsingV4FindThreatMatchesResponse", +"properties": { +"matches": { +"description": "The threat list matches.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatMatch" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ListThreatListsResponse": { +"id": "GoogleSecuritySafebrowsingV4ListThreatListsResponse", +"properties": { +"threatLists": { +"description": "The lists available for download by the client.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatListDescriptor" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4RawHashes": { +"description": "The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL. Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.", +"id": "GoogleSecuritySafebrowsingV4RawHashes", +"properties": { +"prefixSize": { +"description": "The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).", +"format": "int32", +"type": "integer" +}, +"rawHashes": { +"description": "The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4RawIndices": { +"description": "A set of raw indices to remove from a local list.", +"id": "GoogleSecuritySafebrowsingV4RawIndices", +"properties": { +"indices": { +"description": "The indices to remove from a lexicographically-sorted local list.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4RiceDeltaEncoding": { +"description": "The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.", +"id": "GoogleSecuritySafebrowsingV4RiceDeltaEncoding", +"properties": { +"encodedData": { +"description": "The encoded deltas that are encoded using the Golomb-Rice coder.", +"format": "byte", +"type": "string" +}, +"firstValue": { +"description": "The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. If the field is empty or missing, assume zero.", +"format": "int64", +"type": "string" +}, +"numEntries": { +"description": "The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`.", +"format": "int32", +"type": "integer" +}, +"riceParameter": { +"description": "The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatEntry": { +"description": "An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set.", +"id": "GoogleSecuritySafebrowsingV4ThreatEntry", +"properties": { +"digest": { +"description": "The digest of an executable in SHA256 format. The API supports both binary and hex digests. For JSON requests, digests are base64-encoded.", +"format": "byte", +"type": "string" +}, +"hash": { +"description": "A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.", +"format": "byte", +"type": "string" +}, +"url": { +"description": "A URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatEntryMetadata": { +"description": "The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type.", +"id": "GoogleSecuritySafebrowsingV4ThreatEntryMetadata", +"properties": { +"entries": { +"description": "The metadata entries.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry": { +"description": "A single metadata entry.", +"id": "GoogleSecuritySafebrowsingV4ThreatEntryMetadataMetadataEntry", +"properties": { +"key": { +"description": "The metadata entry key. For JSON requests, the key is base64-encoded.", +"format": "byte", +"type": "string" +}, +"value": { +"description": "The metadata entry value. For JSON requests, the value is base64-encoded.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatEntrySet": { +"description": "A set of threats that should be added or removed from a client's local database.", +"id": "GoogleSecuritySafebrowsingV4ThreatEntrySet", +"properties": { +"compressionType": { +"description": "The compression type for the entries in this set.", +"enum": [ +"COMPRESSION_TYPE_UNSPECIFIED", +"RAW", +"RICE" +], +"enumDescriptions": [ +"Unknown.", +"Raw, uncompressed data.", +"Rice-Golomb encoded data." +], +"type": "string" +}, +"rawHashes": { +"$ref": "GoogleSecuritySafebrowsingV4RawHashes", +"description": "The raw SHA256-formatted entries." +}, +"rawIndices": { +"$ref": "GoogleSecuritySafebrowsingV4RawIndices", +"description": "The raw removal indices for a local list." +}, +"riceHashes": { +"$ref": "GoogleSecuritySafebrowsingV4RiceDeltaEncoding", +"description": "The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data." +}, +"riceIndices": { +"$ref": "GoogleSecuritySafebrowsingV4RiceDeltaEncoding", +"description": "The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data." +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatHit": { +"id": "GoogleSecuritySafebrowsingV4ThreatHit", +"properties": { +"clientInfo": { +"$ref": "GoogleSecuritySafebrowsingV4ClientInfo", +"description": "Client-reported identification." +}, +"entry": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatEntry", +"description": "The threat entry responsible for the hit. Full hash should be reported for hash-based hits." +}, +"platformType": { +"description": "The platform type reported.", +"enum": [ +"PLATFORM_TYPE_UNSPECIFIED", +"WINDOWS", +"LINUX", +"ANDROID", +"OSX", +"IOS", +"ANY_PLATFORM", +"ALL_PLATFORMS", +"CHROME" +], +"enumDescriptions": [ +"Unknown platform.", +"Threat posed to Windows.", +"Threat posed to Linux.", +"Threat posed to Android.", +"Threat posed to OS X.", +"Threat posed to iOS.", +"Threat posed to at least one of the defined platforms.", +"Threat posed to all defined platforms.", +"Threat posed to Chrome." +], +"type": "string" +}, +"resources": { +"description": "The resources related to the threat hit.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatHitThreatSource" +}, +"type": "array" +}, +"threatType": { +"description": "The threat type reported.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"POTENTIALLY_HARMFUL_APPLICATION", +"SOCIAL_ENGINEERING_INTERNAL", +"API_ABUSE", +"MALICIOUS_BINARY", +"CSD_WHITELIST", +"CSD_DOWNLOAD_WHITELIST", +"CLIENT_INCIDENT", +"CLIENT_INCIDENT_WHITELIST", +"APK_MALWARE_OFFLINE", +"SUBRESOURCE_FILTER", +"SUSPICIOUS", +"TRICK_TO_BILL", +"HIGH_CONFIDENCE_ALLOWLIST", +"ACCURACY_TIPS" +], +"enumDescriptions": [ +"Unknown.", +"Malware threat type.", +"Social engineering threat type.", +"Unwanted software threat type.", +"Potentially harmful application threat type.", +"Social engineering threat type for internal use.", +"API abuse threat type.", +"Malicious binary threat type.", +"Client side detection whitelist threat type.", +"Client side download detection whitelist threat type.", +"Client incident threat type.", +"Whitelist used when detecting client incident threats.", +"List used for offline APK checks in PAM.", +"Patterns to be used for activating the subresource filter.", +"Entities that are suspected to present a threat.", +"Trick-to-bill threat type.", +"URL expressions that are very likely to be safe.", +"An experimental threat type related to Jigsaw. See https://jigsaw.google.com/." +], +"type": "string" +}, +"userInfo": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatHitUserInfo", +"description": "Details about the user that encountered the threat." +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatHitThreatSource": { +"description": "A single resource related to a threat hit.", +"id": "GoogleSecuritySafebrowsingV4ThreatHitThreatSource", +"properties": { +"referrer": { +"description": "Referrer of the resource. Only set if the referrer is available.", +"type": "string" +}, +"remoteIp": { +"description": "The remote IP of the resource in ASCII format. Either IPv4 or IPv6.", +"type": "string" +}, +"type": { +"description": "The type of source reported.", +"enum": [ +"THREAT_SOURCE_TYPE_UNSPECIFIED", +"MATCHING_URL", +"TAB_URL", +"TAB_REDIRECT", +"TAB_RESOURCE" +], +"enumDescriptions": [ +"Unknown.", +"The URL that matched the threat list (for which GetFullHash returned a valid hash).", +"The final top-level URL of the tab that the client was browsing when the match occurred.", +"A redirect URL that was fetched before hitting the final TAB_URL.", +"A resource loaded within the final TAB_URL." +], +"type": "string" +}, +"url": { +"description": "The URL of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatHitUserInfo": { +"description": "Details about the user that encountered the threat.", +"id": "GoogleSecuritySafebrowsingV4ThreatHitUserInfo", +"properties": { +"regionCode": { +"description": "The UN M.49 region code associated with the user's location.", +"type": "string" +}, +"userId": { +"description": "Unique user identifier defined by the client.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatInfo": { +"description": "The information regarding one or more threats that a client submits when checking for matches in threat lists.", +"id": "GoogleSecuritySafebrowsingV4ThreatInfo", +"properties": { +"platformTypes": { +"description": "The platform types to be checked.", +"items": { +"enum": [ +"PLATFORM_TYPE_UNSPECIFIED", +"WINDOWS", +"LINUX", +"ANDROID", +"OSX", +"IOS", +"ANY_PLATFORM", +"ALL_PLATFORMS", +"CHROME" +], +"enumDescriptions": [ +"Unknown platform.", +"Threat posed to Windows.", +"Threat posed to Linux.", +"Threat posed to Android.", +"Threat posed to OS X.", +"Threat posed to iOS.", +"Threat posed to at least one of the defined platforms.", +"Threat posed to all defined platforms.", +"Threat posed to Chrome." +], +"type": "string" +}, +"type": "array" +}, +"threatEntries": { +"description": "The threat entries to be checked.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatEntry" +}, +"type": "array" +}, +"threatEntryTypes": { +"description": "The entry types to be checked.", +"items": { +"enum": [ +"THREAT_ENTRY_TYPE_UNSPECIFIED", +"URL", +"EXECUTABLE", +"IP_RANGE", +"CHROME_EXTENSION", +"FILENAME", +"CERT" +], +"enumDescriptions": [ +"Unspecified.", +"A URL.", +"An executable program.", +"An IP range.", +"Chrome extension.", +"Filename.", +"CERT" +], +"type": "string" +}, +"type": "array" +}, +"threatTypes": { +"description": "The threat types to be checked.", +"items": { +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"POTENTIALLY_HARMFUL_APPLICATION", +"SOCIAL_ENGINEERING_INTERNAL", +"API_ABUSE", +"MALICIOUS_BINARY", +"CSD_WHITELIST", +"CSD_DOWNLOAD_WHITELIST", +"CLIENT_INCIDENT", +"CLIENT_INCIDENT_WHITELIST", +"APK_MALWARE_OFFLINE", +"SUBRESOURCE_FILTER", +"SUSPICIOUS", +"TRICK_TO_BILL", +"HIGH_CONFIDENCE_ALLOWLIST", +"ACCURACY_TIPS" +], +"enumDescriptions": [ +"Unknown.", +"Malware threat type.", +"Social engineering threat type.", +"Unwanted software threat type.", +"Potentially harmful application threat type.", +"Social engineering threat type for internal use.", +"API abuse threat type.", +"Malicious binary threat type.", +"Client side detection whitelist threat type.", +"Client side download detection whitelist threat type.", +"Client incident threat type.", +"Whitelist used when detecting client incident threats.", +"List used for offline APK checks in PAM.", +"Patterns to be used for activating the subresource filter.", +"Entities that are suspected to present a threat.", +"Trick-to-bill threat type.", +"URL expressions that are very likely to be safe.", +"An experimental threat type related to Jigsaw. See https://jigsaw.google.com/." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatListDescriptor": { +"description": "Describes an individual threat list. A list is defined by three parameters: the type of threat posed, the type of platform targeted by the threat, and the type of entries in the list.", +"id": "GoogleSecuritySafebrowsingV4ThreatListDescriptor", +"properties": { +"platformType": { +"description": "The platform type targeted by the list's entries.", +"enum": [ +"PLATFORM_TYPE_UNSPECIFIED", +"WINDOWS", +"LINUX", +"ANDROID", +"OSX", +"IOS", +"ANY_PLATFORM", +"ALL_PLATFORMS", +"CHROME" +], +"enumDescriptions": [ +"Unknown platform.", +"Threat posed to Windows.", +"Threat posed to Linux.", +"Threat posed to Android.", +"Threat posed to OS X.", +"Threat posed to iOS.", +"Threat posed to at least one of the defined platforms.", +"Threat posed to all defined platforms.", +"Threat posed to Chrome." +], +"type": "string" +}, +"threatEntryType": { +"description": "The entry types contained in the list.", +"enum": [ +"THREAT_ENTRY_TYPE_UNSPECIFIED", +"URL", +"EXECUTABLE", +"IP_RANGE", +"CHROME_EXTENSION", +"FILENAME", +"CERT" +], +"enumDescriptions": [ +"Unspecified.", +"A URL.", +"An executable program.", +"An IP range.", +"Chrome extension.", +"Filename.", +"CERT" +], +"type": "string" +}, +"threatType": { +"description": "The threat type posed by the list's entries.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"POTENTIALLY_HARMFUL_APPLICATION", +"SOCIAL_ENGINEERING_INTERNAL", +"API_ABUSE", +"MALICIOUS_BINARY", +"CSD_WHITELIST", +"CSD_DOWNLOAD_WHITELIST", +"CLIENT_INCIDENT", +"CLIENT_INCIDENT_WHITELIST", +"APK_MALWARE_OFFLINE", +"SUBRESOURCE_FILTER", +"SUSPICIOUS", +"TRICK_TO_BILL", +"HIGH_CONFIDENCE_ALLOWLIST", +"ACCURACY_TIPS" +], +"enumDescriptions": [ +"Unknown.", +"Malware threat type.", +"Social engineering threat type.", +"Unwanted software threat type.", +"Potentially harmful application threat type.", +"Social engineering threat type for internal use.", +"API abuse threat type.", +"Malicious binary threat type.", +"Client side detection whitelist threat type.", +"Client side download detection whitelist threat type.", +"Client incident threat type.", +"Whitelist used when detecting client incident threats.", +"List used for offline APK checks in PAM.", +"Patterns to be used for activating the subresource filter.", +"Entities that are suspected to present a threat.", +"Trick-to-bill threat type.", +"URL expressions that are very likely to be safe.", +"An experimental threat type related to Jigsaw. See https://jigsaw.google.com/." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV4ThreatMatch": { +"description": "A match when checking a threat entry in the Safe Browsing threat lists.", +"id": "GoogleSecuritySafebrowsingV4ThreatMatch", +"properties": { +"cacheDuration": { +"description": "The cache lifetime for the returned match. Clients must not cache this response for more than this duration to avoid false positives.", +"format": "google-duration", +"type": "string" +}, +"platformType": { +"description": "The platform type matching this threat.", +"enum": [ +"PLATFORM_TYPE_UNSPECIFIED", +"WINDOWS", +"LINUX", +"ANDROID", +"OSX", +"IOS", +"ANY_PLATFORM", +"ALL_PLATFORMS", +"CHROME" +], +"enumDescriptions": [ +"Unknown platform.", +"Threat posed to Windows.", +"Threat posed to Linux.", +"Threat posed to Android.", +"Threat posed to OS X.", +"Threat posed to iOS.", +"Threat posed to at least one of the defined platforms.", +"Threat posed to all defined platforms.", +"Threat posed to Chrome." +], +"type": "string" +}, +"threat": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatEntry", +"description": "The threat matching this threat." +}, +"threatEntryMetadata": { +"$ref": "GoogleSecuritySafebrowsingV4ThreatEntryMetadata", +"description": "Optional metadata associated with this threat." +}, +"threatEntryType": { +"description": "The threat entry type matching this threat.", +"enum": [ +"THREAT_ENTRY_TYPE_UNSPECIFIED", +"URL", +"EXECUTABLE", +"IP_RANGE", +"CHROME_EXTENSION", +"FILENAME", +"CERT" +], +"enumDescriptions": [ +"Unspecified.", +"A URL.", +"An executable program.", +"An IP range.", +"Chrome extension.", +"Filename.", +"CERT" +], +"type": "string" +}, +"threatType": { +"description": "The threat type matching this threat.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"POTENTIALLY_HARMFUL_APPLICATION", +"SOCIAL_ENGINEERING_INTERNAL", +"API_ABUSE", +"MALICIOUS_BINARY", +"CSD_WHITELIST", +"CSD_DOWNLOAD_WHITELIST", +"CLIENT_INCIDENT", +"CLIENT_INCIDENT_WHITELIST", +"APK_MALWARE_OFFLINE", +"SUBRESOURCE_FILTER", +"SUSPICIOUS", +"TRICK_TO_BILL", +"HIGH_CONFIDENCE_ALLOWLIST", +"ACCURACY_TIPS" +], +"enumDescriptions": [ +"Unknown.", +"Malware threat type.", +"Social engineering threat type.", +"Unwanted software threat type.", +"Potentially harmful application threat type.", +"Social engineering threat type for internal use.", +"API abuse threat type.", +"Malicious binary threat type.", +"Client side detection whitelist threat type.", +"Client side download detection whitelist threat type.", +"Client incident threat type.", +"Whitelist used when detecting client incident threats.", +"List used for offline APK checks in PAM.", +"Patterns to be used for activating the subresource filter.", +"Entities that are suspected to present a threat.", +"Trick-to-bill threat type.", +"URL expressions that are very likely to be safe.", +"An experimental threat type related to Jigsaw. See https://jigsaw.google.com/." +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Safe Browsing API", +"version": "v4", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/safebrowsing.v5.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/safebrowsing.v5.json new file mode 100644 index 0000000000000000000000000000000000000000..70b2fd37596777de8731233e744786c287095f4a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/safebrowsing.v5.json @@ -0,0 +1,212 @@ +{ +"basePath": "", +"baseUrl": "https://safebrowsing.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Safebrowsing", +"description": "Enables client applications to check web resources (most commonly URLs) against Google-generated lists of unsafe web resources. The Safe Browsing APIs are for non-commercial use only. If you need to use APIs to detect malicious URLs for commercial purposes \u2013 meaning \u201cfor sale or revenue-generating purposes\u201d \u2013 please refer to the Web Risk API.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/safe-browsing/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "safebrowsing:v5", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://safebrowsing.mtls.googleapis.com/", +"name": "safebrowsing", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"hashes": { +"methods": { +"search": { +"description": "Search for full hashes matching the specified prefixes. This is a custom method as defined by https://google.aip.dev/136 (the custom method refers to this method having a custom name within Google's general API development nomenclature; it does not refer to using a custom HTTP method).", +"flatPath": "v5/hashes:search", +"httpMethod": "GET", +"id": "safebrowsing.hashes.search", +"parameterOrder": [], +"parameters": { +"hashPrefixes": { +"description": "Required. The hash prefixes to be looked up. Clients MUST NOT send more than 1000 hash prefixes. However, following the URL processing procedure, clients SHOULD NOT need to send more than 30 hash prefixes. Currently each hash prefix is required to be exactly 4 bytes long. This MAY be relaxed in the future.", +"format": "byte", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v5/hashes:search", +"response": { +"$ref": "GoogleSecuritySafebrowsingV5SearchHashesResponse" +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://safebrowsing.googleapis.com/", +"schemas": { +"GoogleSecuritySafebrowsingV5FullHash": { +"description": "The full hash identified with one or more matches.", +"id": "GoogleSecuritySafebrowsingV5FullHash", +"properties": { +"fullHash": { +"description": "The matching full hash. This is the SHA256 hash. The length will be exactly 32 bytes.", +"format": "byte", +"type": "string" +}, +"fullHashDetails": { +"description": "Unordered list. A repeated field identifying the details relevant to this full hash.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV5FullHashFullHashDetail" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV5FullHashFullHashDetail": { +"description": "Details about a matching full hash. An important note about forward compatibility: new threat types and threat attributes may be added by the server at any time; those additions are considered minor version changes. It is Google's policy not to expose minor version numbers in APIs (see https://cloud.google.com/apis/design/versioning for the versioning policy), so clients MUST be prepared to receive `FullHashDetail` messages containing `ThreatType` enum values or `ThreatAttribute` enum values that are considered invalid by the client. Therefore, it is the client's responsibility to check for the validity of all `ThreatType` and `ThreatAttribute` enum values; if any value is considered invalid, the client MUST disregard the entire `FullHashDetail` message.", +"id": "GoogleSecuritySafebrowsingV5FullHashFullHashDetail", +"properties": { +"attributes": { +"description": "Unordered list. Additional attributes about those full hashes. This may be empty.", +"items": { +"enum": [ +"THREAT_ATTRIBUTE_UNSPECIFIED", +"CANARY", +"FRAME_ONLY" +], +"enumDescriptions": [ +"Unknown attribute. If this is returned by the server, the client shall disregard the enclosing `FullHashDetail` altogether.", +"Indicates that the threat_type should not be used for enforcement.", +"Indicates that the threat_type should only be used for enforcement on frames." +], +"type": "string" +}, +"type": "array" +}, +"threatType": { +"description": "The type of threat. This field will never be empty.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"POTENTIALLY_HARMFUL_APPLICATION" +], +"enumDescriptions": [ +"Unknown threat type. If this is returned by the server, the client shall disregard the enclosing `FullHashDetail` altogether.", +"Malware threat type. Malware is any software or mobile application specifically designed to harm a computer, a mobile device, the software it's running, or its users. Malware exhibits malicious behavior that can include installing software without user consent and installing harmful software such as viruses. More information can be found [here](https://developers.google.com/search/docs/monitor-debug/security/malware).", +"Social engineering threat type. Social engineering pages falsely purport to act on behalf of a third party with the intention of confusing viewers into performing an action with which the viewer would only trust a true agent of that third party. Phishing is a type of social engineering that tricks the viewer into performing the specific action of providing information, such as login credentials. More information can be found [here](https://developers.google.com/search/docs/monitor-debug/security/social-engineering).", +"Unwanted software threat type. Unwanted software is any software that does not adhere to [Google's Software Principles](https://www.google.com/about/software-principles.html) but isn't malware.", +"Potentially harmful application threat type [as used by Google Play Protect for the Play Store](https://developers.google.com/android/play-protect/potentially-harmful-applications)." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleSecuritySafebrowsingV5SearchHashesResponse": { +"description": "The response returned after searching threat hashes. If nothing is found, the server will return an OK status (HTTP status code 200) with the `full_hashes` field empty, rather than returning a NOT_FOUND status (HTTP status code 404). **What's new in V5**: There is a separation between `FullHash` and `FullHashDetail`. In the case when a hash represents a site having multiple threats (e.g. both MALWARE and SOCIAL_ENGINEERING), the full hash does not need to be sent twice as in V4. Furthermore, the cache duration has been simplified into a single `cache_duration` field.", +"id": "GoogleSecuritySafebrowsingV5SearchHashesResponse", +"properties": { +"cacheDuration": { +"description": "The client-side cache duration. The client MUST add this duration to the current time to determine the expiration time. The expiration time then applies to every hash prefix queried by the client in the request, regardless of how many full hashes are returned in the response. Even if the server returns no full hashes for a particular hash prefix, this fact MUST also be cached by the client. Important: the client MUST NOT assume that the server will return the same cache duration for all responses. The server MAY choose different cache durations for different responses depending on the situation.", +"format": "google-duration", +"type": "string" +}, +"fullHashes": { +"description": "Unordered list. The unordered list of full hashes found.", +"items": { +"$ref": "GoogleSecuritySafebrowsingV5FullHash" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Safe Browsing API", +"version": "v5", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sasportal.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sasportal.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..9ff145133b8384d94ea999cae828afeef227872a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sasportal.v1alpha1.json @@ -0,0 +1,3771 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/sasportal": { +"description": "Read, create, update, and delete your SAS Portal data." +} +} +} +}, +"basePath": "", +"baseUrl": "https://sasportal.googleapis.com/", +"batchPath": "batch", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/spectrum-access-system/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "sasportal:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://sasportal.mtls.googleapis.com/", +"name": "sasportal", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"customers": { +"methods": { +"get": { +"description": "Returns a requested customer.", +"flatPath": "v1alpha1/customers/{customersId}", +"httpMethod": "GET", +"id": "sasportal.customers.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the customer.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalCustomer" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Returns a list of requested customers.", +"flatPath": "v1alpha1/customers", +"httpMethod": "GET", +"id": "sasportal.customers.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of customers to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListCustomers that indicates where this listing should continue from.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/customers", +"response": { +"$ref": "SasPortalListCustomersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"listGcpProjectDeployments": { +"description": "Returns a list of SAS deployments associated with current GCP project. Includes whether SAS analytics has been enabled or not.", +"flatPath": "v1alpha1/customers:listGcpProjectDeployments", +"httpMethod": "GET", +"id": "sasportal.customers.listGcpProjectDeployments", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:listGcpProjectDeployments", +"response": { +"$ref": "SasPortalListGcpProjectDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"listLegacyOrganizations": { +"description": "Returns a list of legacy organizations.", +"flatPath": "v1alpha1/customers:listLegacyOrganizations", +"httpMethod": "GET", +"id": "sasportal.customers.listLegacyOrganizations", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:listLegacyOrganizations", +"response": { +"$ref": "SasPortalListLegacyOrganizationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"migrateOrganization": { +"description": "Migrates a SAS organization to the cloud. This will create GCP projects for each deployment and associate them. The SAS Organization is linked to the gcp project that called the command. go/sas-legacy-customer-migration", +"flatPath": "v1alpha1/customers:migrateOrganization", +"httpMethod": "POST", +"id": "sasportal.customers.migrateOrganization", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:migrateOrganization", +"request": { +"$ref": "SasPortalMigrateOrganizationRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing customer.", +"flatPath": "v1alpha1/customers/{customersId}", +"httpMethod": "PATCH", +"id": "sasportal.customers.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name of the customer.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalCustomer" +}, +"response": { +"$ref": "SasPortalCustomer" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"provisionDeployment": { +"description": "Creates a new SAS deployment through the GCP workflow. Creates a SAS organization if an organization match is not found.", +"flatPath": "v1alpha1/customers:provisionDeployment", +"httpMethod": "POST", +"id": "sasportal.customers.provisionDeployment", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:provisionDeployment", +"request": { +"$ref": "SasPortalProvisionDeploymentRequest" +}, +"response": { +"$ref": "SasPortalProvisionDeploymentResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"setupSasAnalytics": { +"description": "Setups the a GCP Project to receive SAS Analytics messages via GCP Pub/Sub with a subscription to BigQuery. All the Pub/Sub topics and BigQuery tables are created automatically as part of this service.", +"flatPath": "v1alpha1/customers:setupSasAnalytics", +"httpMethod": "POST", +"id": "sasportal.customers.setupSasAnalytics", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/customers:setupSasAnalytics", +"request": { +"$ref": "SasPortalSetupSasAnalyticsRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"create": { +"description": "Creates a new deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments", +"httpMethod": "POST", +"id": "sasportal.customers.deployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the deployment is to be created.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}", +"httpMethod": "DELETE", +"id": "sasportal.customers.deployments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}", +"httpMethod": "GET", +"id": "sasportal.customers.deployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/customers/{customersId}/deployments", +"httpMethod": "GET", +"id": "sasportal.customers.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a deployment under another node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}:move", +"httpMethod": "POST", +"id": "sasportal.customers.deployments.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment to move.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeploymentRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing deployment.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}", +"httpMethod": "PATCH", +"id": "sasportal.customers.deployments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}/devices", +"httpMethod": "POST", +"id": "sasportal.customers.deployments.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}/devices:createSigned", +"httpMethod": "POST", +"id": "sasportal.customers.deployments.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/deployments/{deploymentsId}/devices", +"httpMethod": "GET", +"id": "sasportal.customers.deployments.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices", +"httpMethod": "POST", +"id": "sasportal.customers.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices:createSigned", +"httpMethod": "POST", +"id": "sasportal.customers.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}", +"httpMethod": "DELETE", +"id": "sasportal.customers.devices.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Gets details about a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}", +"httpMethod": "GET", +"id": "sasportal.customers.devices.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices", +"httpMethod": "GET", +"id": "sasportal.customers.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a device under another node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}:move", +"httpMethod": "POST", +"id": "sasportal.customers.devices.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to move.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeviceRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}", +"httpMethod": "PATCH", +"id": "sasportal.customers.devices.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"signDevice": { +"description": "Signs a device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}:signDevice", +"httpMethod": "POST", +"id": "sasportal.customers.devices.signDevice", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:signDevice", +"request": { +"$ref": "SasPortalSignDeviceRequest" +}, +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"updateSigned": { +"description": "Updates a signed device.", +"flatPath": "v1alpha1/customers/{customersId}/devices/{devicesId}:updateSigned", +"httpMethod": "PATCH", +"id": "sasportal.customers.devices.updateSigned", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to update.", +"location": "path", +"pattern": "^customers/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:updateSigned", +"request": { +"$ref": "SasPortalUpdateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes", +"httpMethod": "POST", +"id": "sasportal.customers.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}", +"httpMethod": "DELETE", +"id": "sasportal.customers.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}", +"httpMethod": "GET", +"id": "sasportal.customers.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/customers/{customersId}/nodes", +"httpMethod": "GET", +"id": "sasportal.customers.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^customers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a node under another node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}:move", +"httpMethod": "POST", +"id": "sasportal.customers.nodes.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node to move.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveNodeRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}", +"httpMethod": "PATCH", +"id": "sasportal.customers.nodes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"create": { +"description": "Creates a new deployment.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/deployments", +"httpMethod": "POST", +"id": "sasportal.customers.nodes.deployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the deployment is to be created.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/deployments", +"httpMethod": "GET", +"id": "sasportal.customers.nodes.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/devices", +"httpMethod": "POST", +"id": "sasportal.customers.nodes.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/devices:createSigned", +"httpMethod": "POST", +"id": "sasportal.customers.nodes.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/devices", +"httpMethod": "GET", +"id": "sasportal.customers.nodes.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/nodes", +"httpMethod": "POST", +"id": "sasportal.customers.nodes.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/customers/{customersId}/nodes/{nodesId}/nodes", +"httpMethod": "GET", +"id": "sasportal.customers.nodes.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^customers/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +} +} +}, +"deployments": { +"methods": { +"get": { +"description": "Returns a requested deployment.", +"flatPath": "v1alpha1/deployments/{deploymentsId}", +"httpMethod": "GET", +"id": "sasportal.deployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"devices": { +"methods": { +"delete": { +"description": "Deletes a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}", +"httpMethod": "DELETE", +"id": "sasportal.deployments.devices.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Gets details about a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}", +"httpMethod": "GET", +"id": "sasportal.deployments.devices.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a device under another node or customer.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}:move", +"httpMethod": "POST", +"id": "sasportal.deployments.devices.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to move.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeviceRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}", +"httpMethod": "PATCH", +"id": "sasportal.deployments.devices.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"signDevice": { +"description": "Signs a device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}:signDevice", +"httpMethod": "POST", +"id": "sasportal.deployments.devices.signDevice", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:signDevice", +"request": { +"$ref": "SasPortalSignDeviceRequest" +}, +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"updateSigned": { +"description": "Updates a signed device.", +"flatPath": "v1alpha1/deployments/{deploymentsId}/devices/{devicesId}:updateSigned", +"httpMethod": "PATCH", +"id": "sasportal.deployments.devices.updateSigned", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to update.", +"location": "path", +"pattern": "^deployments/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:updateSigned", +"request": { +"$ref": "SasPortalUpdateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +}, +"installer": { +"methods": { +"generateSecret": { +"description": "Generates a secret to be used with the ValidateInstaller.", +"flatPath": "v1alpha1/installer:generateSecret", +"httpMethod": "POST", +"id": "sasportal.installer.generateSecret", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/installer:generateSecret", +"request": { +"$ref": "SasPortalGenerateSecretRequest" +}, +"response": { +"$ref": "SasPortalGenerateSecretResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"validate": { +"description": "Validates the identity of a Certified Professional Installer (CPI).", +"flatPath": "v1alpha1/installer:validate", +"httpMethod": "POST", +"id": "sasportal.installer.validate", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/installer:validate", +"request": { +"$ref": "SasPortalValidateInstallerRequest" +}, +"response": { +"$ref": "SasPortalValidateInstallerResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"get": { +"description": "Returns a requested node.", +"flatPath": "v1alpha1/nodes/{nodesId}", +"httpMethod": "GET", +"id": "sasportal.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"delete": { +"description": "Deletes a deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}", +"httpMethod": "DELETE", +"id": "sasportal.nodes.deployments.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}", +"httpMethod": "GET", +"id": "sasportal.nodes.deployments.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments", +"httpMethod": "GET", +"id": "sasportal.nodes.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a deployment under another node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}:move", +"httpMethod": "POST", +"id": "sasportal.nodes.deployments.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the deployment to move.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeploymentRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}", +"httpMethod": "PATCH", +"id": "sasportal.nodes.deployments.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}/devices", +"httpMethod": "POST", +"id": "sasportal.nodes.deployments.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}/devices:createSigned", +"httpMethod": "POST", +"id": "sasportal.nodes.deployments.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/deployments/{deploymentsId}/devices", +"httpMethod": "GET", +"id": "sasportal.nodes.deployments.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/deployments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices", +"httpMethod": "POST", +"id": "sasportal.nodes.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices:createSigned", +"httpMethod": "POST", +"id": "sasportal.nodes.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}", +"httpMethod": "DELETE", +"id": "sasportal.nodes.devices.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Gets details about a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}", +"httpMethod": "GET", +"id": "sasportal.nodes.devices.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices", +"httpMethod": "GET", +"id": "sasportal.nodes.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a device under another node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}:move", +"httpMethod": "POST", +"id": "sasportal.nodes.devices.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to move.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveDeviceRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}", +"httpMethod": "PATCH", +"id": "sasportal.nodes.devices.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"signDevice": { +"description": "Signs a device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}:signDevice", +"httpMethod": "POST", +"id": "sasportal.nodes.devices.signDevice", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource path name.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:signDevice", +"request": { +"$ref": "SasPortalSignDeviceRequest" +}, +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"updateSigned": { +"description": "Updates a signed device.", +"flatPath": "v1alpha1/nodes/{nodesId}/devices/{devicesId}:updateSigned", +"httpMethod": "PATCH", +"id": "sasportal.nodes.devices.updateSigned", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the device to update.", +"location": "path", +"pattern": "^nodes/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:updateSigned", +"request": { +"$ref": "SasPortalUpdateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes", +"httpMethod": "POST", +"id": "sasportal.nodes.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}", +"httpMethod": "DELETE", +"id": "sasportal.nodes.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"get": { +"description": "Returns a requested node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}", +"httpMethod": "GET", +"id": "sasportal.nodes.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes", +"httpMethod": "GET", +"id": "sasportal.nodes.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"move": { +"description": "Moves a node under another node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}:move", +"httpMethod": "POST", +"id": "sasportal.nodes.nodes.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the node to move.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:move", +"request": { +"$ref": "SasPortalMoveNodeRequest" +}, +"response": { +"$ref": "SasPortalOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"patch": { +"description": "Updates an existing node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}", +"httpMethod": "PATCH", +"id": "sasportal.nodes.nodes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Resource name.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +}, +"resources": { +"deployments": { +"methods": { +"create": { +"description": "Creates a new deployment.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/deployments", +"httpMethod": "POST", +"id": "sasportal.nodes.nodes.deployments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the deployment is to be created.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"request": { +"$ref": "SasPortalDeployment" +}, +"response": { +"$ref": "SasPortalDeployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists deployments.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/deployments", +"httpMethod": "GET", +"id": "sasportal.nodes.nodes.deployments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no deployments are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of deployments to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\", customer/1/nodes/2.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/deployments", +"response": { +"$ref": "SasPortalListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"devices": { +"methods": { +"create": { +"description": "Creates a device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/devices", +"httpMethod": "POST", +"id": "sasportal.nodes.nodes.devices.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"request": { +"$ref": "SasPortalDevice" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"createSigned": { +"description": "Creates a signed device under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/devices:createSigned", +"httpMethod": "POST", +"id": "sasportal.nodes.nodes.devices.createSigned", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices:createSigned", +"request": { +"$ref": "SasPortalCreateSignedDeviceRequest" +}, +"response": { +"$ref": "SasPortalDevice" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists devices under a node or customer.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/devices", +"httpMethod": "GET", +"id": "sasportal.nodes.nodes.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have one of the following formats: \"sn=123454\" or \"display_name=MyDevice\". sn corresponds to serial number of the device. The filter is case insensitive.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of devices to return in the response. If empty or zero, all devices will be listed. Must be in the range [0, 1000].", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/devices", +"response": { +"$ref": "SasPortalListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a new node.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/nodes", +"httpMethod": "POST", +"id": "sasportal.nodes.nodes.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the node is to be created.", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "SasPortalNode" +}, +"response": { +"$ref": "SasPortalNode" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/nodes/{nodesId}/nodes/{nodesId1}/nodes", +"httpMethod": "GET", +"id": "sasportal.nodes.nodes.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The filter should have the following format: \"DIRECT_CHILDREN\" or format: \"direct_children\". The filter is case insensitive. If empty, then no nodes are filtered.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of nodes to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates where this listing should continue from.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, for example, \"nodes/1\".", +"location": "path", +"pattern": "^nodes/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "SasPortalListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +} +} +} +}, +"policies": { +"methods": { +"get": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1alpha1/policies:get", +"httpMethod": "POST", +"id": "sasportal.policies.get", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/policies:get", +"request": { +"$ref": "SasPortalGetPolicyRequest" +}, +"response": { +"$ref": "SasPortalPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"set": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy.", +"flatPath": "v1alpha1/policies:set", +"httpMethod": "POST", +"id": "sasportal.policies.set", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/policies:set", +"request": { +"$ref": "SasPortalSetPolicyRequest" +}, +"response": { +"$ref": "SasPortalPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +}, +"test": { +"description": "Returns permissions that a caller has on the specified resource.", +"flatPath": "v1alpha1/policies:test", +"httpMethod": "POST", +"id": "sasportal.policies.test", +"parameterOrder": [], +"parameters": {}, +"path": "v1alpha1/policies:test", +"request": { +"$ref": "SasPortalTestPermissionsRequest" +}, +"response": { +"$ref": "SasPortalTestPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sasportal" +] +} +} +} +}, +"revision": "20240422", +"rootUrl": "https://sasportal.googleapis.com/", +"schemas": { +"SasPortalAssignment": { +"description": "Associates `members` with a `role`.", +"id": "SasPortalAssignment", +"properties": { +"members": { +"description": "The identities the role is assigned to. It can have the following values: * `{user_email}`: An email address that represents a specific Google account. For example: `alice@gmail.com`. * `{group_email}`: An email address that represents a Google group. For example, `viewers@gmail.com`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Required. Role that is assigned to `members`.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalChannelWithScore": { +"description": "The channel with score.", +"id": "SasPortalChannelWithScore", +"properties": { +"frequencyRange": { +"$ref": "SasPortalFrequencyRange", +"description": "The frequency range of the channel." +}, +"score": { +"description": "The channel score, normalized to be in the range [0,100].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"SasPortalCreateSignedDeviceRequest": { +"description": "Request for CreateSignedDevice.", +"id": "SasPortalCreateSignedDeviceRequest", +"properties": { +"encodedDevice": { +"description": "Required. JSON Web Token signed using a CPI private key. Payload must be the JSON encoding of the device. The user_id field must be set.", +"format": "byte", +"type": "string" +}, +"installerId": { +"description": "Required. Unique installer id (CPI ID) from the Certified Professional Installers database.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalCustomer": { +"description": "Entity representing a SAS customer.", +"id": "SasPortalCustomer", +"properties": { +"displayName": { +"description": "Required. Name of the organization that the customer entity represents.", +"type": "string" +}, +"name": { +"description": "Output only. Resource name of the customer.", +"type": "string" +}, +"sasUserIds": { +"description": "User IDs used by the devices belonging to this customer.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalDeployment": { +"description": "The Deployment.", +"id": "SasPortalDeployment", +"properties": { +"displayName": { +"description": "The deployment's display name.", +"type": "string" +}, +"frns": { +"description": "Output only. The FCC Registration Numbers (FRNs) copied from its direct parent.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. Resource name.", +"readOnly": true, +"type": "string" +}, +"sasUserIds": { +"description": "User ID used by the devices belonging to this deployment. Each deployment should be associated with one unique user ID.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalDeploymentAssociation": { +"description": "Association between a gcp project and a SAS user id.", +"id": "SasPortalDeploymentAssociation", +"properties": { +"gcpProjectId": { +"description": "GCP project id of the associated project.", +"type": "string" +}, +"userId": { +"description": "User id of the deployment.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDevice": { +"id": "SasPortalDevice", +"properties": { +"activeConfig": { +"$ref": "SasPortalDeviceConfig", +"description": "Output only. Current configuration of the device as registered to the SAS." +}, +"currentChannels": { +"deprecated": true, +"description": "Output only. Current channels with scores.", +"items": { +"$ref": "SasPortalChannelWithScore" +}, +"readOnly": true, +"type": "array" +}, +"deviceMetadata": { +"$ref": "SasPortalDeviceMetadata", +"description": "Device parameters that can be overridden by both SAS Portal and SAS registration requests." +}, +"displayName": { +"description": "Device display name.", +"type": "string" +}, +"fccId": { +"description": "The FCC identifier of the device. Refer to https://www.fcc.gov/oet/ea/fccid for FccID format. Accept underscores and periods because some test-SAS customers use them.", +"type": "string" +}, +"grantRangeAllowlists": { +"description": "Only ranges that are within the allowlists are available for new grants.", +"items": { +"$ref": "SasPortalFrequencyRange" +}, +"type": "array" +}, +"grants": { +"description": "Output only. Grants held by the device.", +"items": { +"$ref": "SasPortalDeviceGrant" +}, +"type": "array" +}, +"name": { +"description": "Output only. The resource path name.", +"type": "string" +}, +"preloadedConfig": { +"$ref": "SasPortalDeviceConfig", +"description": "Configuration of the device, as specified via SAS Portal API." +}, +"serialNumber": { +"description": "A serial number assigned to the device by the device manufacturer.", +"type": "string" +}, +"state": { +"description": "Output only. Device state.", +"enum": [ +"DEVICE_STATE_UNSPECIFIED", +"RESERVED", +"REGISTERED", +"DEREGISTERED" +], +"enumDescriptions": [ +"Unspecified state.", +"Device created in the SAS Portal, however, not yet registered with SAS.", +"Device registered with SAS.", +"Device de-registered with SAS." +], +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDeviceAirInterface": { +"description": "Information about the device's air interface.", +"id": "SasPortalDeviceAirInterface", +"properties": { +"radioTechnology": { +"description": "Conditional. This field specifies the radio access technology that is used for the CBSD.", +"enum": [ +"RADIO_TECHNOLOGY_UNSPECIFIED", +"E_UTRA", +"CAMBIUM_NETWORKS", +"FOUR_G_BBW_SAA_1", +"NR", +"DOODLE_CBRS", +"CW", +"REDLINE", +"TARANA_WIRELESS" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"supportedSpec": { +"description": "Optional. This field is related to the `radioTechnology` and provides the air interface specification that the CBSD is compliant with at the time of registration.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDeviceConfig": { +"description": "Information about the device configuration.", +"id": "SasPortalDeviceConfig", +"properties": { +"airInterface": { +"$ref": "SasPortalDeviceAirInterface", +"description": "Information about this device's air interface." +}, +"callSign": { +"description": "The call sign of the device operator.", +"type": "string" +}, +"category": { +"description": "FCC category of the device.", +"enum": [ +"DEVICE_CATEGORY_UNSPECIFIED", +"DEVICE_CATEGORY_A", +"DEVICE_CATEGORY_B" +], +"enumDescriptions": [ +"Unspecified device category.", +"Category A.", +"Category B." +], +"type": "string" +}, +"installationParams": { +"$ref": "SasPortalInstallationParams", +"description": "Installation parameters for the device." +}, +"isSigned": { +"description": "Output only. Whether the configuration has been signed by a CPI.", +"type": "boolean" +}, +"measurementCapabilities": { +"description": "Measurement reporting capabilities of the device.", +"items": { +"enum": [ +"MEASUREMENT_CAPABILITY_UNSPECIFIED", +"MEASUREMENT_CAPABILITY_RECEIVED_POWER_WITH_GRANT", +"MEASUREMENT_CAPABILITY_RECEIVED_POWER_WITHOUT_GRANT" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"type": "array" +}, +"model": { +"$ref": "SasPortalDeviceModel", +"description": "Information about this device model." +}, +"state": { +"description": "State of the configuration.", +"enum": [ +"DEVICE_CONFIG_STATE_UNSPECIFIED", +"DRAFT", +"FINAL" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time the device configuration was edited.", +"format": "google-datetime", +"type": "string" +}, +"userId": { +"description": "The identifier of a device user.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDeviceGrant": { +"description": "Device grant. It is an authorization provided by the Spectrum Access System to a device to transmit using specified operating parameters after a successful heartbeat by the device.", +"id": "SasPortalDeviceGrant", +"properties": { +"channelType": { +"description": "Type of channel used.", +"enum": [ +"CHANNEL_TYPE_UNSPECIFIED", +"CHANNEL_TYPE_GAA", +"CHANNEL_TYPE_PAL" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"expireTime": { +"description": "The expiration time of the grant.", +"format": "google-datetime", +"type": "string" +}, +"frequencyRange": { +"$ref": "SasPortalFrequencyRange", +"description": "The transmission frequency range." +}, +"grantId": { +"description": "Grant Id.", +"type": "string" +}, +"lastHeartbeatTransmitExpireTime": { +"description": "The transmit expiration time of the last heartbeat.", +"format": "google-datetime", +"type": "string" +}, +"maxEirp": { +"description": "Maximum Equivalent Isotropically Radiated Power (EIRP) permitted by the grant. The maximum EIRP is in units of dBm/MHz. The value of `maxEirp` represents the average (RMS) EIRP that would be measured by the procedure defined in FCC part 96.41(e)(3).", +"format": "double", +"type": "number" +}, +"moveList": { +"description": "The DPA move lists on which this grant appears.", +"items": { +"$ref": "SasPortalDpaMoveList" +}, +"type": "array" +}, +"state": { +"description": "State of the grant.", +"enum": [ +"GRANT_STATE_UNSPECIFIED", +"GRANT_STATE_GRANTED", +"GRANT_STATE_TERMINATED", +"GRANT_STATE_SUSPENDED", +"GRANT_STATE_AUTHORIZED", +"GRANT_STATE_EXPIRED" +], +"enumDescriptions": [ +"", +"The grant has been granted but the device is not heartbeating on it.", +"The grant has been terminated by the SAS.", +"The grant has been suspended by the SAS.", +"The device is currently transmitting.", +"The grant has expired." +], +"type": "string" +}, +"suspensionReason": { +"description": "If the grant is suspended, the reason(s) for suspension.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalDeviceMetadata": { +"description": "Device data overridable by both SAS Portal and registration requests.", +"id": "SasPortalDeviceMetadata", +"properties": { +"antennaModel": { +"description": "If populated, the Antenna Model Pattern to use. Format is: `RecordCreatorId:PatternId`", +"type": "string" +}, +"commonChannelGroup": { +"description": "Common Channel Group (CCG). A group of CBSDs in the same ICG requesting a common primary channel assignment. For more details, see [CBRSA-TS-2001 V3.0.0](https://ongoalliance.org/wp-content/uploads/2020/02/CBRSA-TS-2001-V3.0.0_Approved-for-publication.pdf).", +"type": "string" +}, +"interferenceCoordinationGroup": { +"description": "Interference Coordination Group (ICG). A group of CBSDs that manage their own interference with the group. For more details, see [CBRSA-TS-2001 V3.0.0](https://ongoalliance.org/wp-content/uploads/2020/02/CBRSA-TS-2001-V3.0.0_Approved-for-publication.pdf).", +"type": "string" +}, +"nrqzValidated": { +"deprecated": true, +"description": "Output only. Set to `true` if a CPI has validated that they have coordinated with the National Quiet Zone office.", +"readOnly": true, +"type": "boolean" +}, +"nrqzValidation": { +"$ref": "SasPortalNrqzValidation", +"description": "Output only. National Radio Quiet Zone validation info.", +"readOnly": true +} +}, +"type": "object" +}, +"SasPortalDeviceModel": { +"description": "Information about the model of the device.", +"id": "SasPortalDeviceModel", +"properties": { +"firmwareVersion": { +"description": "The firmware version of the device.", +"type": "string" +}, +"hardwareVersion": { +"description": "The hardware version of the device.", +"type": "string" +}, +"name": { +"description": "The name of the device model.", +"type": "string" +}, +"softwareVersion": { +"description": "The software version of the device.", +"type": "string" +}, +"vendor": { +"description": "The name of the device vendor.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalDpaMoveList": { +"description": "An entry in a DPA's move list.", +"id": "SasPortalDpaMoveList", +"properties": { +"dpaId": { +"description": "The ID of the DPA.", +"type": "string" +}, +"frequencyRange": { +"$ref": "SasPortalFrequencyRange", +"description": "The frequency range that the move list affects." +} +}, +"type": "object" +}, +"SasPortalEmpty": { +"description": "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); }", +"id": "SasPortalEmpty", +"properties": {}, +"type": "object" +}, +"SasPortalFrequencyRange": { +"description": "Frequency range from `low_frequency` to `high_frequency`.", +"id": "SasPortalFrequencyRange", +"properties": { +"highFrequencyMhz": { +"description": "The highest frequency of the frequency range in MHz.", +"format": "double", +"type": "number" +}, +"lowFrequencyMhz": { +"description": "The lowest frequency of the frequency range in MHz.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"SasPortalGcpProjectDeployment": { +"description": "Deployment associated with the GCP project. Includes whether SAS analytics has been enabled or not.", +"id": "SasPortalGcpProjectDeployment", +"properties": { +"deployment": { +"$ref": "SasPortalDeployment", +"description": "Deployment associated with the GCP project." +}, +"hasEnabledAnalytics": { +"description": "Whether SAS analytics has been enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"SasPortalGenerateSecretRequest": { +"description": "Request for GenerateSecret.", +"id": "SasPortalGenerateSecretRequest", +"properties": {}, +"type": "object" +}, +"SasPortalGenerateSecretResponse": { +"description": "Response for GenerateSecret.", +"id": "SasPortalGenerateSecretResponse", +"properties": { +"secret": { +"description": "The secret generated by the string and used by ValidateInstaller.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalGetPolicyRequest": { +"description": "Request message for `GetPolicy` method.", +"id": "SasPortalGetPolicyRequest", +"properties": { +"resource": { +"description": "Required. The resource for which the policy is being requested.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalInstallationParams": { +"description": "Information about the device installation parameters.", +"id": "SasPortalInstallationParams", +"properties": { +"antennaAzimuth": { +"description": "Boresight direction of the horizontal plane of the antenna in degrees with respect to true north. The value of this parameter is an integer with a value between 0 and 359 inclusive. A value of 0 degrees means true north; a value of 90 degrees means east. This parameter is optional for Category A devices and conditional for Category B devices.", +"format": "int32", +"type": "integer" +}, +"antennaBeamwidth": { +"description": "3-dB antenna beamwidth of the antenna in the horizontal-plane in degrees. This parameter is an unsigned integer having a value between 0 and 360 (degrees) inclusive; it is optional for Category A devices and conditional for Category B devices.", +"format": "int32", +"type": "integer" +}, +"antennaDowntilt": { +"description": "Antenna downtilt in degrees and is an integer with a value between -90 and +90 inclusive; a negative value means the antenna is tilted up (above horizontal). This parameter is optional for Category A devices and conditional for Category B devices.", +"format": "int32", +"type": "integer" +}, +"antennaGain": { +"description": "Peak antenna gain in dBi. This parameter is an integer with a value between -127 and +128 (dBi) inclusive.", +"format": "int32", +"type": "integer" +}, +"antennaModel": { +"description": "If an external antenna is used, the antenna model is optionally provided in this field. The string has a maximum length of 128 octets.", +"type": "string" +}, +"cpeCbsdIndication": { +"description": "If present, this parameter specifies whether the CBSD is a CPE-CBSD or not.", +"type": "boolean" +}, +"eirpCapability": { +"description": "This parameter is the maximum device EIRP in units of dBm/10MHz and is an integer with a value between -127 and +47 (dBm/10 MHz) inclusive. If not included, SAS interprets it as maximum allowable EIRP in units of dBm/10MHz for device category.", +"format": "int32", +"type": "integer" +}, +"height": { +"description": "Device antenna height in meters. When the `heightType` parameter value is \"AGL\", the antenna height should be given relative to ground level. When the `heightType` parameter value is \"AMSL\", it is given with respect to WGS84 datum.", +"format": "double", +"type": "number" +}, +"heightType": { +"description": "Specifies how the height is measured.", +"enum": [ +"HEIGHT_TYPE_UNSPECIFIED", +"HEIGHT_TYPE_AGL", +"HEIGHT_TYPE_AMSL" +], +"enumDescriptions": [ +"Unspecified height type.", +"AGL height is measured relative to the ground level.", +"AMSL height is measured relative to the mean sea level." +], +"type": "string" +}, +"horizontalAccuracy": { +"description": "A positive number in meters to indicate accuracy of the device antenna horizontal location. This optional parameter should only be present if its value is less than the FCC requirement of 50 meters.", +"format": "double", +"type": "number" +}, +"indoorDeployment": { +"description": "Whether the device antenna is indoor or not. `true`: indoor. `false`: outdoor.", +"type": "boolean" +}, +"latitude": { +"description": "Latitude of the device antenna location in degrees relative to the WGS 84 datum. The allowed range is from -90.000000 to +90.000000. Positive values represent latitudes north of the equator; negative values south of the equator.", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "Longitude of the device antenna location in degrees relative to the WGS 84 datum. The allowed range is from -180.000000 to +180.000000. Positive values represent longitudes east of the prime meridian; negative values west of the prime meridian.", +"format": "double", +"type": "number" +}, +"verticalAccuracy": { +"description": "A positive number in meters to indicate accuracy of the device antenna vertical location. This optional parameter should only be present if its value is less than the FCC requirement of 3 meters.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"SasPortalListCustomersResponse": { +"description": "Response for `ListCustomers`.", +"id": "SasPortalListCustomersResponse", +"properties": { +"customers": { +"description": "The list of customers that match the request.", +"items": { +"$ref": "SasPortalCustomer" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListCustomers that indicates from where listing should continue. If the field is missing or empty, it means there are no more customers.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalListDeploymentsResponse": { +"description": "Response for ListDeployments.", +"id": "SasPortalListDeploymentsResponse", +"properties": { +"deployments": { +"description": "The deployments that match the request.", +"items": { +"$ref": "SasPortalDeployment" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListDeployments that indicates from where listing should continue. If the field is missing or empty, it means there are no more deployments.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalListDevicesResponse": { +"description": "Response for ListDevices.", +"id": "SasPortalListDevicesResponse", +"properties": { +"devices": { +"description": "The devices that match the request.", +"items": { +"$ref": "SasPortalDevice" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListDevices that indicates from where listing should continue. If the field is missing or empty, it means there is no more devices.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalListGcpProjectDeploymentsResponse": { +"description": "Response for [ListGcpProjectDeployments].", +"id": "SasPortalListGcpProjectDeploymentsResponse", +"properties": { +"deployments": { +"description": "Optional. Deployments associated with the GCP project", +"items": { +"$ref": "SasPortalGcpProjectDeployment" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalListLegacyOrganizationsResponse": { +"description": "Response for [ListLegacyOrganizations]. [spectrum.sas.portal.v1alpha1.Provisioning.ListLegacyOrganizations].", +"id": "SasPortalListLegacyOrganizationsResponse", +"properties": { +"organizations": { +"description": "Optional. Legacy SAS organizations.", +"items": { +"$ref": "SasPortalOrganization" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalListNodesResponse": { +"description": "Response for ListNodes.", +"id": "SasPortalListNodesResponse", +"properties": { +"nextPageToken": { +"description": "A pagination token returned from a previous call to ListNodes that indicates from where listing should continue. If the field is missing or empty, it means there is no more nodes.", +"type": "string" +}, +"nodes": { +"description": "The nodes that match the request.", +"items": { +"$ref": "SasPortalNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalMigrateOrganizationMetadata": { +"description": "Long-running operation metadata message returned by the MigrateOrganization.", +"id": "SasPortalMigrateOrganizationMetadata", +"properties": { +"operationState": { +"description": "Output only. Current operation state", +"enum": [ +"OPERATION_STATE_UNSPECIFIED", +"OPERATION_STATE_PENDING", +"OPERATION_STATE_RUNNING", +"OPERATION_STATE_SUCCEEDED", +"OPERATION_STATE_FAILED" +], +"enumDescriptions": [ +"Unspecified.", +"Pending (Not started).", +"In-progress.", +"Done successfully.", +"Done with errors." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMigrateOrganizationRequest": { +"description": "Request for [MigrateOrganization]. [spectrum.sas.portal.v1alpha1.Provisioning.MigrateOrganization]. GCP Project, Organization Info, and caller's GAIA ID should be retrieved from the RPC handler, and used to check authorization on SAS Portal organization and to create GCP Projects.", +"id": "SasPortalMigrateOrganizationRequest", +"properties": { +"organizationId": { +"description": "Required. Id of the SAS organization to be migrated.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMigrateOrganizationResponse": { +"description": "Response for [MigrateOrganization]. [spectrum.sas.portal.v1alpha1.Provisioning.MigrateOrganization].", +"id": "SasPortalMigrateOrganizationResponse", +"properties": { +"deploymentAssociation": { +"description": "Optional. A list of deployment association that were created for the migration, or current associations if they already exist.", +"items": { +"$ref": "SasPortalDeploymentAssociation" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalMoveDeploymentRequest": { +"description": "Request for MoveDeployment.", +"id": "SasPortalMoveDeploymentRequest", +"properties": { +"destination": { +"description": "Required. The name of the new parent resource node or customer to reparent the deployment under.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMoveDeviceRequest": { +"description": "Request for MoveDevice.", +"id": "SasPortalMoveDeviceRequest", +"properties": { +"destination": { +"description": "Required. The name of the new parent resource node or customer to reparent the device under.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalMoveNodeRequest": { +"description": "Request for MoveNode.", +"id": "SasPortalMoveNodeRequest", +"properties": { +"destination": { +"description": "Required. The name of the new parent resource node or customer to reparent the node under.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalNode": { +"description": "The Node.", +"id": "SasPortalNode", +"properties": { +"displayName": { +"description": "The node's display name.", +"type": "string" +}, +"name": { +"description": "Output only. Resource name.", +"type": "string" +}, +"sasUserIds": { +"description": "User ids used by the devices belonging to this node.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalNrqzValidation": { +"description": "Information about National Radio Quiet Zone validation.", +"id": "SasPortalNrqzValidation", +"properties": { +"caseId": { +"description": "Validation case ID.", +"type": "string" +}, +"cpiId": { +"description": "CPI who signed the validation.", +"type": "string" +}, +"latitude": { +"description": "Device latitude that's associated with the validation.", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "Device longitude that's associated with the validation.", +"format": "double", +"type": "number" +}, +"state": { +"description": "State of the NRQZ validation info.", +"enum": [ +"STATE_UNSPECIFIED", +"DRAFT", +"FINAL" +], +"enumDescriptions": [ +"Unspecified state.", +"Draft state.", +"Final state." +], +"type": "string" +} +}, +"type": "object" +}, +"SasPortalOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "SasPortalOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "SasPortalStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"SasPortalOrganization": { +"description": "Organization details.", +"id": "SasPortalOrganization", +"properties": { +"displayName": { +"description": "Name of organization", +"type": "string" +}, +"id": { +"description": "Id of organization", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalPolicy": { +"description": "Defines an access control policy to the resources.", +"id": "SasPortalPolicy", +"properties": { +"assignments": { +"description": "List of assignments", +"items": { +"$ref": "SasPortalAssignment" +}, +"type": "array" +}, +"etag": { +"description": "The 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 GetPolicy, and systems are expected to put that etag in the request to SetPolicy to ensure that their change will be applied to the same version of the policy. If no etag is provided in the call to GetPolicy, then the existing policy is overwritten blindly.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalProvisionDeploymentRequest": { +"description": "Request for [ProvisionDeployment]. [spectrum.sas.portal.v1alpha1.Provisioning.ProvisionDeployment]. GCP Project, Organization Info, and caller\u2019s GAIA ID should be retrieved from the RPC handler, and used as inputs to create a new SAS organization (if not exists) and a new SAS deployment.", +"id": "SasPortalProvisionDeploymentRequest", +"properties": { +"newDeploymentDisplayName": { +"description": "Optional. If this field is set, and a new SAS Portal Deployment needs to be created, its display name will be set to the value of this field.", +"type": "string" +}, +"newOrganizationDisplayName": { +"description": "Optional. If this field is set, and a new SAS Portal Organization needs to be created, its display name will be set to the value of this field.", +"type": "string" +}, +"organizationId": { +"description": "Optional. If this field is set then a new deployment will be created under the organization specified by this id.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalProvisionDeploymentResponse": { +"description": "Response for [ProvisionDeployment]. [spectrum.sas.portal.v1alpha1.Provisioning.ProvisionDeployment].", +"id": "SasPortalProvisionDeploymentResponse", +"properties": { +"errorMessage": { +"description": "Optional. Optional error message if the provisioning request is not successful.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalSetPolicyRequest": { +"description": "Request message for `SetPolicy` method.", +"id": "SasPortalSetPolicyRequest", +"properties": { +"disableNotification": { +"description": "Optional. Set the field as `true` to disable the onboarding notification.", +"type": "boolean" +}, +"policy": { +"$ref": "SasPortalPolicy", +"description": "Required. The policy to be applied to the `resource`." +}, +"resource": { +"description": "Required. The resource for which the policy is being specified. This policy replaces any existing policy.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalSetupSasAnalyticsMetadata": { +"description": "Metadata returned by the long running operation for the SetupSasAnalytics rpc.", +"id": "SasPortalSetupSasAnalyticsMetadata", +"properties": {}, +"type": "object" +}, +"SasPortalSetupSasAnalyticsRequest": { +"description": "Request for the SetupSasAnalytics rpc.", +"id": "SasPortalSetupSasAnalyticsRequest", +"properties": { +"userId": { +"description": "Optional. User id to setup analytics for, if not provided the user id associated with the project is used. optional", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalSetupSasAnalyticsResponse": { +"description": "Response returned by the long running operation for the SetupSasAnalytics rpc.", +"id": "SasPortalSetupSasAnalyticsResponse", +"properties": {}, +"type": "object" +}, +"SasPortalSignDeviceRequest": { +"description": "Request for SignDevice.", +"id": "SasPortalSignDeviceRequest", +"properties": { +"device": { +"$ref": "SasPortalDevice", +"description": "Required. The device to sign. The device fields name, fcc_id and serial_number must be set. The user_id field must be set." +} +}, +"type": "object" +}, +"SasPortalStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "SasPortalStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalTestPermissionsRequest": { +"description": "Request message for `TestPermissions` method.", +"id": "SasPortalTestPermissionsRequest", +"properties": { +"permissions": { +"description": "The set of permissions to check for the `resource`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resource": { +"description": "Required. The resource for which the permissions are being requested.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalTestPermissionsResponse": { +"description": "Response message for `TestPermissions` method.", +"id": "SasPortalTestPermissionsResponse", +"properties": { +"permissions": { +"description": "A set of permissions that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SasPortalUpdateSignedDeviceRequest": { +"description": "Request for UpdateSignedDevice.", +"id": "SasPortalUpdateSignedDeviceRequest", +"properties": { +"encodedDevice": { +"description": "Required. The JSON Web Token signed using a CPI private key. Payload must be the JSON encoding of the device. The user_id field must be set.", +"format": "byte", +"type": "string" +}, +"installerId": { +"description": "Required. Unique installer ID (CPI ID) from the Certified Professional Installers database.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalValidateInstallerRequest": { +"description": "Request for ValidateInstaller.", +"id": "SasPortalValidateInstallerRequest", +"properties": { +"encodedSecret": { +"description": "Required. JSON Web Token signed using a CPI private key. Payload must include a \"secret\" claim whose value is the secret.", +"type": "string" +}, +"installerId": { +"description": "Required. Unique installer id (CPI ID) from the Certified Professional Installers database.", +"type": "string" +}, +"secret": { +"description": "Required. Secret returned by the GenerateSecret.", +"type": "string" +} +}, +"type": "object" +}, +"SasPortalValidateInstallerResponse": { +"description": "Response for ValidateInstaller.", +"id": "SasPortalValidateInstallerResponse", +"properties": {}, +"type": "object" +} +}, +"servicePath": "", +"title": "SAS Portal API", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/script.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/script.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..b21b4c736712a3b8e36193a72a13626cbcc11bfb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/script.v1.json @@ -0,0 +1,1800 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://mail.google.com/": { +"description": "Read, compose, send, and permanently delete all your email from Gmail" +}, +"https://www.google.com/calendar/feeds": { +"description": "See, edit, share, and permanently delete all the calendars you can access using Google Calendar" +}, +"https://www.google.com/m8/feeds": { +"description": "See, edit, download, and permanently delete your contacts" +}, +"https://www.googleapis.com/auth/admin.directory.group": { +"description": "View and manage the provisioning of groups on your domain" +}, +"https://www.googleapis.com/auth/admin.directory.user": { +"description": "View and manage the provisioning of users on your domain" +}, +"https://www.googleapis.com/auth/documents": { +"description": "See, edit, create, and delete all your Google Docs documents" +}, +"https://www.googleapis.com/auth/drive": { +"description": "See, edit, create, and delete all of your Google Drive files" +}, +"https://www.googleapis.com/auth/forms": { +"description": "View and manage your forms in Google Drive" +}, +"https://www.googleapis.com/auth/forms.currentonly": { +"description": "View and manage forms that this application has been installed in" +}, +"https://www.googleapis.com/auth/groups": { +"description": "View and manage your Google Groups" +}, +"https://www.googleapis.com/auth/script.deployments": { +"description": "Create and update Google Apps Script deployments" +}, +"https://www.googleapis.com/auth/script.deployments.readonly": { +"description": "View Google Apps Script deployments" +}, +"https://www.googleapis.com/auth/script.metrics": { +"description": "View Google Apps Script project's metrics" +}, +"https://www.googleapis.com/auth/script.processes": { +"description": "View Google Apps Script processes" +}, +"https://www.googleapis.com/auth/script.projects": { +"description": "Create and update Google Apps Script projects" +}, +"https://www.googleapis.com/auth/script.projects.readonly": { +"description": "View Google Apps Script projects" +}, +"https://www.googleapis.com/auth/spreadsheets": { +"description": "See, edit, create, and delete all your Google Sheets spreadsheets" +}, +"https://www.googleapis.com/auth/userinfo.email": { +"description": "See your primary Google Account email address" +} +} +} +}, +"basePath": "", +"baseUrl": "https://script.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Script", +"description": "Manages and executes Google Apps Script projects. ", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/apps-script/api/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "script:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://script.mtls.googleapis.com/", +"name": "script", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"processes": { +"methods": { +"list": { +"description": "List information about processes made by or on behalf of a user, such as process type and current status.", +"flatPath": "v1/processes", +"httpMethod": "GET", +"id": "script.processes.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of returned processes per page of results. Defaults to 50.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response.", +"location": "query", +"type": "string" +}, +"userProcessFilter.deploymentId": { +"description": "Optional field used to limit returned processes to those originating from projects with a specific deployment ID.", +"location": "query", +"type": "string" +}, +"userProcessFilter.endTime": { +"description": "Optional field used to limit returned processes to those that completed on or before the given timestamp.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"userProcessFilter.functionName": { +"description": "Optional field used to limit returned processes to those originating from a script function with the given function name.", +"location": "query", +"type": "string" +}, +"userProcessFilter.projectName": { +"description": "Optional field used to limit returned processes to those originating from projects with project names containing a specific string.", +"location": "query", +"type": "string" +}, +"userProcessFilter.scriptId": { +"description": "Optional field used to limit returned processes to those originating from projects with a specific script ID.", +"location": "query", +"type": "string" +}, +"userProcessFilter.startTime": { +"description": "Optional field used to limit returned processes to those that were started on or after the given timestamp.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"userProcessFilter.statuses": { +"description": "Optional field used to limit returned processes to those having one of the specified process statuses.", +"enum": [ +"PROCESS_STATUS_UNSPECIFIED", +"RUNNING", +"PAUSED", +"COMPLETED", +"CANCELED", +"FAILED", +"TIMED_OUT", +"UNKNOWN", +"DELAYED", +"EXECUTION_DISABLED" +], +"enumDescriptions": [ +"Unspecified status.", +"The process is currently running.", +"The process has paused.", +"The process has completed.", +"The process was cancelled.", +"The process failed.", +"The process timed out.", +"Process status unknown.", +"The process is delayed, waiting for quota.", +"AppsScript executions are disabled by Admin." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"userProcessFilter.types": { +"description": "Optional field used to limit returned processes to those having one of the specified process types.", +"enum": [ +"PROCESS_TYPE_UNSPECIFIED", +"ADD_ON", +"EXECUTION_API", +"TIME_DRIVEN", +"TRIGGER", +"WEBAPP", +"EDITOR", +"SIMPLE_TRIGGER", +"MENU", +"BATCH_TASK" +], +"enumDescriptions": [ +"Unspecified type.", +"The process was started from an add-on entry point.", +"The process was started using the Apps Script API.", +"The process was started from a time-based trigger.", +"The process was started from an event-based trigger.", +"The process was started from a web app entry point.", +"The process was started using the Apps Script IDE.", +"The process was started from a G Suite simple trigger.", +"The process was started from a G Suite menu item.", +"The process was started as a task in a batch job." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"userProcessFilter.userAccessLevels": { +"description": "Optional field used to limit returned processes to those having one of the specified user access levels.", +"enum": [ +"USER_ACCESS_LEVEL_UNSPECIFIED", +"NONE", +"READ", +"WRITE", +"OWNER" +], +"enumDescriptions": [ +"User access level unspecified", +"The user has no access.", +"The user has read-only access.", +"The user has write access.", +"The user is an owner." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/processes", +"response": { +"$ref": "ListUserProcessesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.processes" +] +}, +"listScriptProcesses": { +"description": "List information about a script's executed processes, such as process type and current status.", +"flatPath": "v1/processes:listScriptProcesses", +"httpMethod": "GET", +"id": "script.processes.listScriptProcesses", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The maximum number of returned processes per page of results. Defaults to 50.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response.", +"location": "query", +"type": "string" +}, +"scriptId": { +"description": "The script ID of the project whose processes are listed.", +"location": "query", +"type": "string" +}, +"scriptProcessFilter.deploymentId": { +"description": "Optional field used to limit returned processes to those originating from projects with a specific deployment ID.", +"location": "query", +"type": "string" +}, +"scriptProcessFilter.endTime": { +"description": "Optional field used to limit returned processes to those that completed on or before the given timestamp.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"scriptProcessFilter.functionName": { +"description": "Optional field used to limit returned processes to those originating from a script function with the given function name.", +"location": "query", +"type": "string" +}, +"scriptProcessFilter.startTime": { +"description": "Optional field used to limit returned processes to those that were started on or after the given timestamp.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"scriptProcessFilter.statuses": { +"description": "Optional field used to limit returned processes to those having one of the specified process statuses.", +"enum": [ +"PROCESS_STATUS_UNSPECIFIED", +"RUNNING", +"PAUSED", +"COMPLETED", +"CANCELED", +"FAILED", +"TIMED_OUT", +"UNKNOWN", +"DELAYED", +"EXECUTION_DISABLED" +], +"enumDescriptions": [ +"Unspecified status.", +"The process is currently running.", +"The process has paused.", +"The process has completed.", +"The process was cancelled.", +"The process failed.", +"The process timed out.", +"Process status unknown.", +"The process is delayed, waiting for quota.", +"AppsScript executions are disabled by Admin." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"scriptProcessFilter.types": { +"description": "Optional field used to limit returned processes to those having one of the specified process types.", +"enum": [ +"PROCESS_TYPE_UNSPECIFIED", +"ADD_ON", +"EXECUTION_API", +"TIME_DRIVEN", +"TRIGGER", +"WEBAPP", +"EDITOR", +"SIMPLE_TRIGGER", +"MENU", +"BATCH_TASK" +], +"enumDescriptions": [ +"Unspecified type.", +"The process was started from an add-on entry point.", +"The process was started using the Apps Script API.", +"The process was started from a time-based trigger.", +"The process was started from an event-based trigger.", +"The process was started from a web app entry point.", +"The process was started using the Apps Script IDE.", +"The process was started from a G Suite simple trigger.", +"The process was started from a G Suite menu item.", +"The process was started as a task in a batch job." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"scriptProcessFilter.userAccessLevels": { +"description": "Optional field used to limit returned processes to those having one of the specified user access levels.", +"enum": [ +"USER_ACCESS_LEVEL_UNSPECIFIED", +"NONE", +"READ", +"WRITE", +"OWNER" +], +"enumDescriptions": [ +"User access level unspecified", +"The user has no access.", +"The user has read-only access.", +"The user has write access.", +"The user is an owner." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/processes:listScriptProcesses", +"response": { +"$ref": "ListScriptProcessesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.processes" +] +} +} +}, +"projects": { +"methods": { +"create": { +"description": "Creates a new, empty script project with no script files and a base manifest file.", +"flatPath": "v1/projects", +"httpMethod": "POST", +"id": "script.projects.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/projects", +"request": { +"$ref": "CreateProjectRequest" +}, +"response": { +"$ref": "Project" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.projects" +] +}, +"get": { +"description": "Gets a script project's metadata.", +"flatPath": "v1/projects/{scriptId}", +"httpMethod": "GET", +"id": "script.projects.get", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}", +"response": { +"$ref": "Project" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.projects", +"https://www.googleapis.com/auth/script.projects.readonly" +] +}, +"getContent": { +"description": "Gets the content of the script project, including the code source and metadata for each script file.", +"flatPath": "v1/projects/{scriptId}/content", +"httpMethod": "GET", +"id": "script.projects.getContent", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +}, +"versionNumber": { +"description": "The version number of the project to retrieve. If not provided, the project's HEAD version is returned.", +"format": "int32", +"location": "query", +"type": "integer" +} +}, +"path": "v1/projects/{scriptId}/content", +"response": { +"$ref": "Content" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.projects", +"https://www.googleapis.com/auth/script.projects.readonly" +] +}, +"getMetrics": { +"description": "Get metrics data for scripts, such as number of executions and active users.", +"flatPath": "v1/projects/{scriptId}/metrics", +"httpMethod": "GET", +"id": "script.projects.getMetrics", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"metricsFilter.deploymentId": { +"description": "Optional field indicating a specific deployment to retrieve metrics from.", +"location": "query", +"type": "string" +}, +"metricsGranularity": { +"description": "Required field indicating what granularity of metrics are returned.", +"enum": [ +"UNSPECIFIED_GRANULARITY", +"WEEKLY", +"DAILY" +], +"enumDescriptions": [ +"Default metric granularity used to query no metrics.", +"Represents weekly metrics.", +"Represents daily metrics over a period of 7 days." +], +"location": "query", +"type": "string" +}, +"scriptId": { +"description": "Required field indicating the script to get metrics for.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/metrics", +"response": { +"$ref": "Metrics" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.metrics" +] +}, +"updateContent": { +"description": "Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.", +"flatPath": "v1/projects/{scriptId}/content", +"httpMethod": "PUT", +"id": "script.projects.updateContent", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/content", +"request": { +"$ref": "Content" +}, +"response": { +"$ref": "Content" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.projects" +] +} +}, +"resources": { +"deployments": { +"methods": { +"create": { +"description": "Creates a deployment of an Apps Script project.", +"flatPath": "v1/projects/{scriptId}/deployments", +"httpMethod": "POST", +"id": "script.projects.deployments.create", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/deployments", +"request": { +"$ref": "DeploymentConfig" +}, +"response": { +"$ref": "Deployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.deployments" +] +}, +"delete": { +"description": "Deletes a deployment of an Apps Script project.", +"flatPath": "v1/projects/{scriptId}/deployments/{deploymentId}", +"httpMethod": "DELETE", +"id": "script.projects.deployments.delete", +"parameterOrder": [ +"scriptId", +"deploymentId" +], +"parameters": { +"deploymentId": { +"description": "The deployment ID to be undeployed.", +"location": "path", +"required": true, +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/deployments/{deploymentId}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.deployments" +] +}, +"get": { +"description": "Gets a deployment of an Apps Script project.", +"flatPath": "v1/projects/{scriptId}/deployments/{deploymentId}", +"httpMethod": "GET", +"id": "script.projects.deployments.get", +"parameterOrder": [ +"scriptId", +"deploymentId" +], +"parameters": { +"deploymentId": { +"description": "The deployment ID.", +"location": "path", +"required": true, +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/deployments/{deploymentId}", +"response": { +"$ref": "Deployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.deployments", +"https://www.googleapis.com/auth/script.deployments.readonly" +] +}, +"list": { +"description": "Lists the deployments of an Apps Script project.", +"flatPath": "v1/projects/{scriptId}/deployments", +"httpMethod": "GET", +"id": "script.projects.deployments.list", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"pageSize": { +"description": "The maximum number of deployments on each returned page. Defaults to 50.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response.", +"location": "query", +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/deployments", +"response": { +"$ref": "ListDeploymentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.deployments", +"https://www.googleapis.com/auth/script.deployments.readonly" +] +}, +"update": { +"description": "Updates a deployment of an Apps Script project.", +"flatPath": "v1/projects/{scriptId}/deployments/{deploymentId}", +"httpMethod": "PUT", +"id": "script.projects.deployments.update", +"parameterOrder": [ +"scriptId", +"deploymentId" +], +"parameters": { +"deploymentId": { +"description": "The deployment ID for this deployment.", +"location": "path", +"required": true, +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/deployments/{deploymentId}", +"request": { +"$ref": "UpdateDeploymentRequest" +}, +"response": { +"$ref": "Deployment" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.deployments" +] +} +} +}, +"versions": { +"methods": { +"create": { +"description": "Creates a new immutable version using the current code, with a unique version number.", +"flatPath": "v1/projects/{scriptId}/versions", +"httpMethod": "POST", +"id": "script.projects.versions.create", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/versions", +"request": { +"$ref": "Version" +}, +"response": { +"$ref": "Version" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.projects" +] +}, +"get": { +"description": "Gets a version of a script project.", +"flatPath": "v1/projects/{scriptId}/versions/{versionNumber}", +"httpMethod": "GET", +"id": "script.projects.versions.get", +"parameterOrder": [ +"scriptId", +"versionNumber" +], +"parameters": { +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +}, +"versionNumber": { +"description": "The version number.", +"format": "int32", +"location": "path", +"required": true, +"type": "integer" +} +}, +"path": "v1/projects/{scriptId}/versions/{versionNumber}", +"response": { +"$ref": "Version" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.projects", +"https://www.googleapis.com/auth/script.projects.readonly" +] +}, +"list": { +"description": "List the versions of a script project.", +"flatPath": "v1/projects/{scriptId}/versions", +"httpMethod": "GET", +"id": "script.projects.versions.list", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"pageSize": { +"description": "The maximum number of versions on each returned page. Defaults to 50.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The token for continuing a previous list request on the next page. This should be set to the value of `nextPageToken` from a previous response.", +"location": "query", +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{scriptId}/versions", +"response": { +"$ref": "ListVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/script.projects", +"https://www.googleapis.com/auth/script.projects.readonly" +] +} +} +} +} +}, +"scripts": { +"methods": { +"run": { +"description": "Runs a function in an Apps Script project. The script project must be deployed for use with the Apps Script API and the calling application must share the same Cloud Platform project. This method requires authorization with an OAuth 2.0 token that includes at least one of the scopes listed in the [Authorization](#authorization-scopes) section; script projects that do not require authorization cannot be executed through this API. To find the correct scopes to include in the authentication token, open the script project **Overview** page and scroll down to \"Project OAuth Scopes.\" The error `403, PERMISSION_DENIED: The caller does not have permission` indicates that the Cloud Platform project used to authorize the request is not the same as the one used by the script.", +"flatPath": "v1/scripts/{scriptId}:run", +"httpMethod": "POST", +"id": "script.scripts.run", +"parameterOrder": [ +"scriptId" +], +"parameters": { +"scriptId": { +"description": "The script ID of the script to be executed. Find the script ID on the **Project settings** page under \"IDs.\" As multiple executable APIs can be deployed in new IDE for same script, this field should be populated with DeploymentID generated while deploying in new IDE instead of script ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/scripts/{scriptId}:run", +"request": { +"$ref": "ExecutionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://mail.google.com/", +"https://www.google.com/calendar/feeds", +"https://www.google.com/m8/feeds", +"https://www.googleapis.com/auth/admin.directory.group", +"https://www.googleapis.com/auth/admin.directory.user", +"https://www.googleapis.com/auth/documents", +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/forms", +"https://www.googleapis.com/auth/forms.currentonly", +"https://www.googleapis.com/auth/groups", +"https://www.googleapis.com/auth/spreadsheets", +"https://www.googleapis.com/auth/userinfo.email" +] +} +} +} +}, +"revision": "20240422", +"rootUrl": "https://script.googleapis.com/", +"schemas": { +"Content": { +"description": "The Content resource.", +"id": "Content", +"properties": { +"files": { +"description": "The list of script project files. One of the files is a script manifest; it must be named \"appsscript\", must have type of JSON, and include the manifest configurations for the project.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"type": "string" +} +}, +"type": "object" +}, +"CreateProjectRequest": { +"description": "Request to create a script project. Request to create a script project.", +"id": "CreateProjectRequest", +"properties": { +"parentId": { +"description": "The Drive ID of a parent file that the created script project is bound to. This is usually the ID of a Google Doc, Google Sheet, Google Form, or Google Slides file. If not set, a standalone script project is created.", +"type": "string" +}, +"title": { +"description": "The title for the project.", +"type": "string" +} +}, +"type": "object" +}, +"Deployment": { +"description": "Representation of a single script deployment.", +"id": "Deployment", +"properties": { +"deploymentConfig": { +"$ref": "DeploymentConfig", +"description": "The deployment configuration." +}, +"deploymentId": { +"description": "The deployment ID for this deployment.", +"type": "string" +}, +"entryPoints": { +"description": "The deployment's entry points.", +"items": { +"$ref": "EntryPoint" +}, +"type": "array" +}, +"updateTime": { +"description": "Last modified date time stamp.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"DeploymentConfig": { +"description": "Metadata the defines how a deployment is configured.", +"id": "DeploymentConfig", +"properties": { +"description": { +"description": "The description for this deployment.", +"type": "string" +}, +"manifestFileName": { +"description": "The manifest file name for this deployment.", +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"type": "string" +}, +"versionNumber": { +"description": "The version number on which this deployment is based.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EntryPoint": { +"description": "A configuration that defines how a deployment is accessed externally.", +"id": "EntryPoint", +"properties": { +"addOn": { +"$ref": "GoogleAppsScriptTypeAddOnEntryPoint", +"description": "Add-on properties." +}, +"entryPointType": { +"description": "The type of the entry point.", +"enum": [ +"ENTRY_POINT_TYPE_UNSPECIFIED", +"WEB_APP", +"EXECUTION_API", +"ADD_ON" +], +"enumDescriptions": [ +"An unspecified entry point.", +"A web application entry point.", +"An API executable entry point.", +"An Add-On entry point." +], +"type": "string" +}, +"executionApi": { +"$ref": "GoogleAppsScriptTypeExecutionApiEntryPoint", +"description": "An entry point specification for Apps Script API execution calls." +}, +"webApp": { +"$ref": "GoogleAppsScriptTypeWebAppEntryPoint", +"description": "An entry point specification for web apps." +} +}, +"type": "object" +}, +"ExecuteStreamResponse": { +"description": "The response for executing or debugging a function in an Apps Script project.", +"id": "ExecuteStreamResponse", +"properties": { +"result": { +"$ref": "ScriptExecutionResult", +"description": "The result of the execution." +} +}, +"type": "object" +}, +"ExecutionError": { +"description": "An object that provides information about the nature of an error resulting from an attempted execution of a script function using the Apps Script API. If a run call succeeds but the script function (or Apps Script itself) throws an exception, the response body's error field contains a Status object. The `Status` object's `details` field contains an array with a single one of these `ExecutionError` objects.", +"id": "ExecutionError", +"properties": { +"errorMessage": { +"description": "The error message thrown by Apps Script, usually localized into the user's language.", +"type": "string" +}, +"errorType": { +"description": "The error type, for example `TypeError` or `ReferenceError`. If the error type is unavailable, this field is not included.", +"type": "string" +}, +"scriptStackTraceElements": { +"description": "An array of objects that provide a stack trace through the script to show where the execution failed, with the deepest call first.", +"items": { +"$ref": "ScriptStackTraceElement" +}, +"type": "array" +} +}, +"type": "object" +}, +"ExecutionRequest": { +"description": "A request to run the function in a script. The script is identified by the specified `script_id`. Executing a function on a script returns results based on the implementation of the script.", +"id": "ExecutionRequest", +"properties": { +"devMode": { +"description": "If `true` and the user is an owner of the script, the script runs at the most recently saved version rather than the version deployed for use with the Apps Script API. Optional; default is `false`.", +"type": "boolean" +}, +"function": { +"description": "The name of the function to execute in the given script. The name does not include parentheses or parameters. It can reference a function in an included library such as `Library.libFunction1`.", +"type": "string" +}, +"parameters": { +"description": "The parameters to be passed to the function being executed. The object type for each parameter should match the expected type in Apps Script. Parameters cannot be Apps Script-specific object types (such as a `Document` or a `Calendar`); they can only be primitive types such as `string`, `number`, `array`, `object`, or `boolean`. Optional.", +"items": { +"type": "any" +}, +"type": "array" +}, +"sessionState": { +"description": "*Deprecated*. For use with Android add-ons only. An ID that represents the user's current session in the Android app for Google Docs or Sheets, included as extra data in the [Intent](https://developer.android.com/guide/components/intents-filters.html) that launches the add-on. When an Android add-on is run with a session state, it gains the privileges of a [bound](https://developers.google.com/apps-script/guides/bound) script\u2014that is, it can access information like the user's current cursor position (in Docs) or selected cell (in Sheets). To retrieve the state, call `Intent.getStringExtra(\"com.google.android.apps.docs.addons.SessionState\")`. Optional.", +"type": "string" +} +}, +"type": "object" +}, +"ExecutionResponse": { +"description": "An object that provides the return value of a function executed using the Apps Script API. If the script function returns successfully, the response body's response field contains this `ExecutionResponse` object.", +"id": "ExecutionResponse", +"properties": { +"result": { +"description": "The return value of the script function. The type matches the object type returned in Apps Script. Functions called using the Apps Script API cannot return Apps Script-specific objects (such as a `Document` or a `Calendar`); they can only return primitive types such as a `string`, `number`, `array`, `object`, or `boolean`.", +"type": "any" +} +}, +"type": "object" +}, +"File": { +"description": "An individual file within a script project. A file is a third-party source code created by one or more developers. It can be a server-side JS code, HTML, or a configuration file. Each script project can contain multiple files.", +"id": "File", +"properties": { +"createTime": { +"description": "Creation date timestamp. This read-only field is only visible to users who have WRITER permission for the script project.", +"format": "google-datetime", +"type": "string" +}, +"functionSet": { +"$ref": "GoogleAppsScriptTypeFunctionSet", +"description": "The defined set of functions in the script file, if any." +}, +"lastModifyUser": { +"$ref": "GoogleAppsScriptTypeUser", +"description": "The user who modified the file most recently. This read-only field is only visible to users who have WRITER permission for the script project." +}, +"name": { +"description": "The name of the file. The file extension is not part of the file name, which can be identified from the type field.", +"type": "string" +}, +"source": { +"description": "The file content.", +"type": "string" +}, +"type": { +"description": "The type of the file.", +"enum": [ +"ENUM_TYPE_UNSPECIFIED", +"SERVER_JS", +"HTML", +"JSON" +], +"enumDescriptions": [ +"Undetermined file type; never actually used.", +"An Apps Script server-side code file.", +"A file containing client-side HTML.", +"A file in JSON format. This type is only used for the script project's manifest. The manifest file content must match the structure of a valid [ScriptManifest](/apps-script/concepts/manifests)" +], +"type": "string" +}, +"updateTime": { +"description": "Last modified date timestamp. This read-only field is only visible to users who have WRITER permission for the script project.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeAddOnEntryPoint": { +"description": "An add-on entry point.", +"id": "GoogleAppsScriptTypeAddOnEntryPoint", +"properties": { +"addOnType": { +"description": "The add-on's required list of supported container types.", +"enum": [ +"UNKNOWN_ADDON_TYPE", +"GMAIL", +"DATA_STUDIO" +], +"enumDescriptions": [ +"Default value, unknown add-on type.", +"Add-on type for Gmail.", +"Add-on type for Data Studio." +], +"type": "string" +}, +"description": { +"description": "The add-on's optional description.", +"type": "string" +}, +"helpUrl": { +"description": "The add-on's optional help URL.", +"type": "string" +}, +"postInstallTipUrl": { +"description": "The add-on's required post install tip URL.", +"type": "string" +}, +"reportIssueUrl": { +"description": "The add-on's optional report issue URL.", +"type": "string" +}, +"title": { +"description": "The add-on's required title.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeExecutionApiConfig": { +"description": "API executable entry point configuration.", +"id": "GoogleAppsScriptTypeExecutionApiConfig", +"properties": { +"access": { +"description": "Who has permission to run the API executable.", +"enum": [ +"UNKNOWN_ACCESS", +"MYSELF", +"DOMAIN", +"ANYONE", +"ANYONE_ANONYMOUS" +], +"enumDescriptions": [ +"Default value, should not be used.", +"Only the user who deployed the web app or executable can access it. Note that this is not necessarily the owner of the script project.", +"Only users in the same domain as the user who deployed the web app or executable can access it.", +"Any logged in user can access the web app or executable.", +"Any user, logged in or not, can access the web app or executable." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeExecutionApiEntryPoint": { +"description": "An API executable entry point.", +"id": "GoogleAppsScriptTypeExecutionApiEntryPoint", +"properties": { +"entryPointConfig": { +"$ref": "GoogleAppsScriptTypeExecutionApiConfig", +"description": "The entry point's configuration." +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeFunction": { +"description": "Represents a function in a script project.", +"id": "GoogleAppsScriptTypeFunction", +"properties": { +"name": { +"description": "The function name in the script project.", +"type": "string" +}, +"parameters": { +"description": "The ordered list of parameter names of the function in the script project.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeFunctionSet": { +"description": "A set of functions. No duplicates are permitted.", +"id": "GoogleAppsScriptTypeFunctionSet", +"properties": { +"values": { +"description": "A list of functions composing the set.", +"items": { +"$ref": "GoogleAppsScriptTypeFunction" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeProcess": { +"description": "Representation of a single script process execution that was started from the script editor, a trigger, an application, or using the Apps Script API. This is distinct from the `Operation` resource, which only represents executions started via the Apps Script API.", +"id": "GoogleAppsScriptTypeProcess", +"properties": { +"duration": { +"description": "Duration the execution spent executing.", +"format": "google-duration", +"type": "string" +}, +"functionName": { +"description": "Name of the function the started the execution.", +"type": "string" +}, +"processStatus": { +"description": "The executions status.", +"enum": [ +"PROCESS_STATUS_UNSPECIFIED", +"RUNNING", +"PAUSED", +"COMPLETED", +"CANCELED", +"FAILED", +"TIMED_OUT", +"UNKNOWN", +"DELAYED", +"EXECUTION_DISABLED" +], +"enumDescriptions": [ +"Unspecified status.", +"The process is currently running.", +"The process has paused.", +"The process has completed.", +"The process was cancelled.", +"The process failed.", +"The process timed out.", +"Process status unknown.", +"The process is delayed, waiting for quota.", +"AppsScript executions are disabled by Admin." +], +"type": "string" +}, +"processType": { +"description": "The executions type.", +"enum": [ +"PROCESS_TYPE_UNSPECIFIED", +"ADD_ON", +"EXECUTION_API", +"TIME_DRIVEN", +"TRIGGER", +"WEBAPP", +"EDITOR", +"SIMPLE_TRIGGER", +"MENU", +"BATCH_TASK" +], +"enumDescriptions": [ +"Unspecified type.", +"The process was started from an add-on entry point.", +"The process was started using the Apps Script API.", +"The process was started from a time-based trigger.", +"The process was started from an event-based trigger.", +"The process was started from a web app entry point.", +"The process was started using the Apps Script IDE.", +"The process was started from a G Suite simple trigger.", +"The process was started from a G Suite menu item.", +"The process was started as a task in a batch job." +], +"type": "string" +}, +"projectName": { +"description": "Name of the script being executed.", +"type": "string" +}, +"runtimeVersion": { +"description": "Which version of maestro to use to execute the script.", +"enum": [ +"RUNTIME_VERSION_UNSPECIFIED", +"DEPRECATED_ES5", +"V8" +], +"enumDescriptions": [ +"Runtime version unset / unknown.", +"Legacy rhino version of the Apps script runtime", +"Current default V8 version of the apps script runtime." +], +"type": "string" +}, +"startTime": { +"description": "Time the execution started.", +"format": "google-datetime", +"type": "string" +}, +"userAccessLevel": { +"description": "The executing users access level to the script.", +"enum": [ +"USER_ACCESS_LEVEL_UNSPECIFIED", +"NONE", +"READ", +"WRITE", +"OWNER" +], +"enumDescriptions": [ +"User access level unspecified", +"The user has no access.", +"The user has read-only access.", +"The user has write access.", +"The user is an owner." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeUser": { +"description": "A simple user profile resource.", +"id": "GoogleAppsScriptTypeUser", +"properties": { +"domain": { +"description": "The user's domain.", +"type": "string" +}, +"email": { +"description": "The user's identifying email address.", +"type": "string" +}, +"name": { +"description": "The user's display name.", +"type": "string" +}, +"photoUrl": { +"description": "The user's photo.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeWebAppConfig": { +"description": "Web app entry point configuration.", +"id": "GoogleAppsScriptTypeWebAppConfig", +"properties": { +"access": { +"description": "Who has permission to run the web app.", +"enum": [ +"UNKNOWN_ACCESS", +"MYSELF", +"DOMAIN", +"ANYONE", +"ANYONE_ANONYMOUS" +], +"enumDescriptions": [ +"Default value, should not be used.", +"Only the user who deployed the web app or executable can access it. Note that this is not necessarily the owner of the script project.", +"Only users in the same domain as the user who deployed the web app or executable can access it.", +"Any logged in user can access the web app or executable.", +"Any user, logged in or not, can access the web app or executable." +], +"type": "string" +}, +"executeAs": { +"description": "Who to execute the web app as.", +"enum": [ +"UNKNOWN_EXECUTE_AS", +"USER_ACCESSING", +"USER_DEPLOYING" +], +"enumDescriptions": [ +"Default value, should not be used.", +"The script runs as the user accessing the web app.", +"The script runs as the user who deployed the web app. Note that this is not necessarily the owner of the script project." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAppsScriptTypeWebAppEntryPoint": { +"description": "A web application entry point.", +"id": "GoogleAppsScriptTypeWebAppEntryPoint", +"properties": { +"entryPointConfig": { +"$ref": "GoogleAppsScriptTypeWebAppConfig", +"description": "The entry point's configuration." +}, +"url": { +"description": "The URL for the web application.", +"type": "string" +} +}, +"type": "object" +}, +"ListDeploymentsResponse": { +"description": "Response with the list of deployments for the specified Apps Script project.", +"id": "ListDeploymentsResponse", +"properties": { +"deployments": { +"description": "The list of deployments.", +"items": { +"$ref": "Deployment" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The token that can be used in the next call to get the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListScriptProcessesResponse": { +"description": "Response with the list of Process resources.", +"id": "ListScriptProcessesResponse", +"properties": { +"nextPageToken": { +"description": "Token for the next page of results. If empty, there are no more pages remaining.", +"type": "string" +}, +"processes": { +"description": "List of processes matching request parameters.", +"items": { +"$ref": "GoogleAppsScriptTypeProcess" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUserProcessesResponse": { +"description": "Response with the list of Process resources.", +"id": "ListUserProcessesResponse", +"properties": { +"nextPageToken": { +"description": "Token for the next page of results. If empty, there are no more pages remaining.", +"type": "string" +}, +"processes": { +"description": "List of processes matching request parameters.", +"items": { +"$ref": "GoogleAppsScriptTypeProcess" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListValue": { +"description": "`ListValue` is a wrapper around a repeated field of values.", +"id": "ListValue", +"properties": { +"values": { +"description": "Repeated field of dynamically typed values.", +"items": { +"$ref": "Value" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVersionsResponse": { +"description": "Response with the list of the versions for the specified script project.", +"id": "ListVersionsResponse", +"properties": { +"nextPageToken": { +"description": "The token use to fetch the next page of records. if not exist in the response, that means no more versions to list.", +"type": "string" +}, +"versions": { +"description": "The list of versions.", +"items": { +"$ref": "Version" +}, +"type": "array" +} +}, +"type": "object" +}, +"Metrics": { +"description": "Resource containing usage stats for a given script, based on the supplied filter and mask present in the request.", +"id": "Metrics", +"properties": { +"activeUsers": { +"description": "Number of active users.", +"items": { +"$ref": "MetricsValue" +}, +"type": "array" +}, +"failedExecutions": { +"description": "Number of failed executions.", +"items": { +"$ref": "MetricsValue" +}, +"type": "array" +}, +"totalExecutions": { +"description": "Number of total executions.", +"items": { +"$ref": "MetricsValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"MetricsValue": { +"description": "Metrics value that holds number of executions counted.", +"id": "MetricsValue", +"properties": { +"endTime": { +"description": "Required field indicating the end time of the interval.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Required field indicating the start time of the interval.", +"format": "google-datetime", +"type": "string" +}, +"value": { +"description": "Indicates the number of executions counted.", +"format": "uint64", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "A representation of an execution of an Apps Script function started with run. The execution response does not arrive until the function finishes executing. The maximum execution runtime is listed in the [Apps Script quotas guide](/apps-script/guides/services/quotas#current_limitations). After execution has started, it can have one of four outcomes: - If the script function returns successfully, the response field contains an ExecutionResponse object with the function's return value in the object's `result` field. - If the script function (or Apps Script itself) throws an exception, the error field contains a Status object. The `Status` object's `details` field contains an array with a single ExecutionError object that provides information about the nature of the error. - If the execution has not yet completed, the done field is `false` and the neither the `response` nor `error` fields are present. - If the `run` call itself fails (for example, because of a malformed request or an authorization error), the method returns an HTTP response code in the 4XX range with a different format for the response body. Client libraries automatically convert a 4XX response into an exception class. ", +"id": "Operation", +"properties": { +"done": { +"description": "This field indicates whether the script execution has completed. A completed execution has a populated `response` field containing the ExecutionResponse from function that was executed.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, this field contains a Status object. The `Status` object's `details` field contains an array with a single ExecutionError object that provides information about the nature of the error." +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "If the script function returns successfully, this field contains an ExecutionResponse object with the function's return value.", +"type": "object" +} +}, +"type": "object" +}, +"Project": { +"description": "The script project resource.", +"id": "Project", +"properties": { +"createTime": { +"description": "When the script was created.", +"format": "google-datetime", +"type": "string" +}, +"creator": { +"$ref": "GoogleAppsScriptTypeUser", +"description": "User who originally created the script." +}, +"lastModifyUser": { +"$ref": "GoogleAppsScriptTypeUser", +"description": "User who last modified the script." +}, +"parentId": { +"description": "The parent's Drive ID that the script will be attached to. This is usually the ID of a Google Document or Google Sheet. This filed is optional, and if not set, a stand-alone script will be created.", +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"type": "string" +}, +"title": { +"description": "The title for the project.", +"type": "string" +}, +"updateTime": { +"description": "When the script was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ScriptExecutionResult": { +"description": "The result of an execution.", +"id": "ScriptExecutionResult", +"properties": { +"returnValue": { +"$ref": "Value", +"description": "The returned value of the execution." +} +}, +"type": "object" +}, +"ScriptStackTraceElement": { +"description": "A stack trace through the script that shows where the execution failed.", +"id": "ScriptStackTraceElement", +"properties": { +"function": { +"description": "The name of the function that failed.", +"type": "string" +}, +"lineNumber": { +"description": "The line number where the script failed.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Status": { +"description": "If a `run` call succeeds but the script function (or Apps Script itself) throws an exception, the response body's error field contains this `Status` object.", +"id": "Status", +"properties": { +"code": { +"description": "The status code. For this API, this value either: - 10, indicating a `SCRIPT_TIMEOUT` error, - 3, indicating an `INVALID_ARGUMENT` error, or - 1, indicating a `CANCELLED` execution. ", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "An array that contains a single ExecutionError object that provides information about the nature of the error.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which is in English. Any user-facing error message is localized and sent in the details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Struct": { +"description": "`Struct` represents a structured data value, consisting of fields which map to dynamically typed values.", +"id": "Struct", +"properties": { +"fields": { +"additionalProperties": { +"$ref": "Value" +}, +"description": "Unordered map of dynamically typed values.", +"type": "object" +} +}, +"type": "object" +}, +"UpdateDeploymentRequest": { +"description": "Request with deployment information to update an existing deployment.", +"id": "UpdateDeploymentRequest", +"properties": { +"deploymentConfig": { +"$ref": "DeploymentConfig", +"description": "The deployment configuration." +} +}, +"type": "object" +}, +"Value": { +"description": "`Value` represents a dynamically typed value which is the outcome of an executed script.", +"id": "Value", +"properties": { +"boolValue": { +"description": "Represents a boolean value.", +"type": "boolean" +}, +"bytesValue": { +"description": "Represents raw byte values.", +"format": "byte", +"type": "string" +}, +"dateValue": { +"description": "Represents a date in ms since the epoch.", +"format": "int64", +"type": "string" +}, +"listValue": { +"$ref": "ListValue", +"description": "Represents a repeated `Value`." +}, +"nullValue": { +"description": "Represents a null value.", +"enum": [ +"NULL_VALUE" +], +"enumDescriptions": [ +"Null value." +], +"type": "string" +}, +"numberValue": { +"description": "Represents a double value.", +"format": "double", +"type": "number" +}, +"protoValue": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Represents a structured proto value.", +"type": "object" +}, +"stringValue": { +"description": "Represents a string value.", +"type": "string" +}, +"structValue": { +"$ref": "Struct", +"description": "Represents a structured value." +} +}, +"type": "object" +}, +"Version": { +"description": "A resource representing a script project version. A version is a \"snapshot\" of a script project and is similar to a read-only branched release. When creating deployments, the version to use must be specified.", +"id": "Version", +"properties": { +"createTime": { +"description": "When the version was created.", +"format": "google-datetime", +"type": "string" +}, +"description": { +"description": "The description for this version.", +"type": "string" +}, +"scriptId": { +"description": "The script project's Drive ID.", +"type": "string" +}, +"versionNumber": { +"description": "The incremental ID that is created by Apps Script when a version is created. This is system assigned number and is immutable once created.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Apps Script API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/searchads360.v0.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/searchads360.v0.json new file mode 100644 index 0000000000000000000000000000000000000000..b233133689dad62f1eb7094ceb5e9407b1cc638a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/searchads360.v0.json @@ -0,0 +1,8572 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/doubleclicksearch": { +"description": "View and manage your advertising data in DoubleClick Search" +} +} +} +}, +"basePath": "", +"baseUrl": "https://searchads360.googleapis.com/", +"batchPath": "batch", +"canonicalName": "SA360", +"description": "The Search Ads 360 API allows developers to automate downloading reports from Search Ads 360.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/search-ads/reporting", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "searchads360:v0", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://searchads360.mtls.googleapis.com/", +"name": "searchads360", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"customers": { +"methods": { +"listAccessibleCustomers": { +"description": "Returns resource names of customers directly accessible by the user authenticating the call. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()", +"flatPath": "v0/customers:listAccessibleCustomers", +"httpMethod": "GET", +"id": "searchads360.customers.listAccessibleCustomers", +"parameterOrder": [], +"parameters": {}, +"path": "v0/customers:listAccessibleCustomers", +"response": { +"$ref": "GoogleAdsSearchads360V0Services__ListAccessibleCustomersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/doubleclicksearch" +] +} +}, +"resources": { +"customColumns": { +"methods": { +"get": { +"description": "Returns the requested custom column in full detail.", +"flatPath": "v0/customers/{customersId}/customColumns/{customColumnsId}", +"httpMethod": "GET", +"id": "searchads360.customers.customColumns.get", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"resourceName": { +"description": "Required. The resource name of the custom column to fetch.", +"location": "path", +"pattern": "^customers/[^/]+/customColumns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v0/{+resourceName}", +"response": { +"$ref": "GoogleAdsSearchads360V0Resources__CustomColumn" +}, +"scopes": [ +"https://www.googleapis.com/auth/doubleclicksearch" +] +}, +"list": { +"description": "Returns all the custom columns associated with the customer in full detail.", +"flatPath": "v0/customers/{customersId}/customColumns", +"httpMethod": "GET", +"id": "searchads360.customers.customColumns.list", +"parameterOrder": [ +"customerId" +], +"parameters": { +"customerId": { +"description": "Required. The ID of the customer to apply the CustomColumn list operation to.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v0/customers/{+customerId}/customColumns", +"response": { +"$ref": "GoogleAdsSearchads360V0Services__ListCustomColumnsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/doubleclicksearch" +] +} +} +}, +"searchAds360": { +"methods": { +"search": { +"description": "Returns all rows that match the search query. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QueryError]() [QuotaError]() [RequestError]()", +"flatPath": "v0/customers/{customersId}/searchAds360:search", +"httpMethod": "POST", +"id": "searchads360.customers.searchAds360.search", +"parameterOrder": [ +"customerId" +], +"parameters": { +"customerId": { +"description": "Required. The ID of the customer being queried.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v0/customers/{+customerId}/searchAds360:search", +"request": { +"$ref": "GoogleAdsSearchads360V0Services__SearchSearchAds360Request" +}, +"response": { +"$ref": "GoogleAdsSearchads360V0Services__SearchSearchAds360Response" +}, +"scopes": [ +"https://www.googleapis.com/auth/doubleclicksearch" +] +} +} +} +} +}, +"searchAds360Fields": { +"methods": { +"get": { +"description": "Returns just the requested field. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QuotaError]() [RequestError]()", +"flatPath": "v0/searchAds360Fields/{searchAds360FieldsId}", +"httpMethod": "GET", +"id": "searchads360.searchAds360Fields.get", +"parameterOrder": [ +"resourceName" +], +"parameters": { +"resourceName": { +"description": "Required. The resource name of the field to get.", +"location": "path", +"pattern": "^searchAds360Fields/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v0/{+resourceName}", +"response": { +"$ref": "GoogleAdsSearchads360V0Resources__SearchAds360Field" +}, +"scopes": [ +"https://www.googleapis.com/auth/doubleclicksearch" +] +}, +"search": { +"description": "Returns all fields that match the search [query](/search-ads/reporting/concepts/field-service#use_a_query_to_get_field_details). List of thrown errors: [AuthenticationError]() [AuthorizationError]() [HeaderError]() [InternalError]() [QueryError]() [QuotaError]() [RequestError]()", +"flatPath": "v0/searchAds360Fields:search", +"httpMethod": "POST", +"id": "searchads360.searchAds360Fields.search", +"parameterOrder": [], +"parameters": {}, +"path": "v0/searchAds360Fields:search", +"request": { +"$ref": "GoogleAdsSearchads360V0Services__SearchSearchAds360FieldsRequest" +}, +"response": { +"$ref": "GoogleAdsSearchads360V0Services__SearchSearchAds360FieldsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/doubleclicksearch" +] +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://searchads360.googleapis.com/", +"schemas": { +"GoogleAdsSearchads360V0Common__AdScheduleInfo": { +"description": "Represents an AdSchedule criterion. AdSchedule is specified as the day of the week and a time interval within which ads will be shown. No more than six AdSchedules can be added for the same day.", +"id": "GoogleAdsSearchads360V0Common__AdScheduleInfo", +"properties": { +"dayOfWeek": { +"description": "Day of the week the schedule applies to. This field is required for CREATE operations and is prohibited on UPDATE operations.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Monday.", +"Tuesday.", +"Wednesday.", +"Thursday.", +"Friday.", +"Saturday.", +"Sunday." +], +"type": "string" +}, +"endHour": { +"description": "Ending hour in 24 hour time; 24 signifies end of the day. This field must be between 0 and 24, inclusive. This field is required for CREATE operations and is prohibited on UPDATE operations.", +"format": "int32", +"type": "integer" +}, +"endMinute": { +"description": "Minutes after the end hour at which this schedule ends. The schedule is exclusive of the end minute. This field is required for CREATE operations and is prohibited on UPDATE operations.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ZERO", +"FIFTEEN", +"THIRTY", +"FORTY_FIVE" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Zero minutes past the hour.", +"Fifteen minutes past the hour.", +"Thirty minutes past the hour.", +"Forty-five minutes past the hour." +], +"type": "string" +}, +"startHour": { +"description": "Starting hour in 24 hour time. This field must be between 0 and 23, inclusive. This field is required for CREATE operations and is prohibited on UPDATE operations.", +"format": "int32", +"type": "integer" +}, +"startMinute": { +"description": "Minutes after the start hour at which this schedule starts. This field is required for CREATE operations and is prohibited on UPDATE operations.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ZERO", +"FIFTEEN", +"THIRTY", +"FORTY_FIVE" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Zero minutes past the hour.", +"Fifteen minutes past the hour.", +"Thirty minutes past the hour.", +"Forty-five minutes past the hour." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__AgeRangeInfo": { +"description": "An age range criterion.", +"id": "GoogleAdsSearchads360V0Common__AgeRangeInfo", +"properties": { +"type": { +"description": "Type of the age range.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"AGE_RANGE_18_24", +"AGE_RANGE_25_34", +"AGE_RANGE_35_44", +"AGE_RANGE_45_54", +"AGE_RANGE_55_64", +"AGE_RANGE_65_UP", +"AGE_RANGE_UNDETERMINED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Between 18 and 24 years old.", +"Between 25 and 34 years old.", +"Between 35 and 44 years old.", +"Between 45 and 54 years old.", +"Between 55 and 64 years old.", +"65 years old and beyond.", +"Undetermined age range." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__AssetInteractionTarget": { +"description": "An AssetInteractionTarget segment.", +"id": "GoogleAdsSearchads360V0Common__AssetInteractionTarget", +"properties": { +"asset": { +"description": "The asset resource name.", +"type": "string" +}, +"interactionOnThisAsset": { +"description": "Only used with CustomerAsset, CampaignAsset and AdGroupAsset metrics. Indicates whether the interaction metrics occurred on the asset itself or a different asset or ad unit.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__AssetUsage": { +"description": "Contains the usage information of the asset.", +"id": "GoogleAdsSearchads360V0Common__AssetUsage", +"properties": { +"asset": { +"description": "Resource name of the asset.", +"type": "string" +}, +"servedAssetFieldType": { +"description": "The served field type of the asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"HEADLINE_1", +"HEADLINE_2", +"HEADLINE_3", +"DESCRIPTION_1", +"DESCRIPTION_2", +"HEADLINE", +"HEADLINE_IN_PORTRAIT", +"LONG_HEADLINE", +"DESCRIPTION", +"DESCRIPTION_IN_PORTRAIT", +"BUSINESS_NAME_IN_PORTRAIT", +"BUSINESS_NAME", +"MARKETING_IMAGE", +"MARKETING_IMAGE_IN_PORTRAIT", +"SQUARE_MARKETING_IMAGE", +"PORTRAIT_MARKETING_IMAGE", +"LOGO", +"LANDSCAPE_LOGO", +"CALL_TO_ACTION", +"YOU_TUBE_VIDEO", +"SITELINK", +"CALL", +"MOBILE_APP", +"CALLOUT", +"STRUCTURED_SNIPPET", +"PRICE", +"PROMOTION", +"AD_IMAGE", +"LEAD_FORM", +"BUSINESS_LOGO" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"The asset is used in headline 1.", +"The asset is used in headline 2.", +"The asset is used in headline 3.", +"The asset is used in description 1.", +"The asset is used in description 2.", +"The asset was used in a headline. Use this only if there is only one headline in the ad. Otherwise, use the HEADLINE_1, HEADLINE_2 or HEADLINE_3 enums", +"The asset was used as a headline in portrait image.", +"The asset was used in a long headline (used in MultiAssetResponsiveAd).", +"The asset was used in a description. Use this only if there is only one description in the ad. Otherwise, use the DESCRIPTION_1 or DESCRIPTION_@ enums", +"The asset was used as description in portrait image.", +"The asset was used as business name in portrait image.", +"The asset was used as business name.", +"The asset was used as a marketing image.", +"The asset was used as a marketing image in portrait image.", +"The asset was used as a square marketing image.", +"The asset was used as a portrait marketing image.", +"The asset was used as a logo.", +"The asset was used as a landscape logo.", +"The asset was used as a call-to-action.", +"The asset was used as a YouTube video.", +"This asset is used as a sitelink.", +"This asset is used as a call.", +"This asset is used as a mobile app.", +"This asset is used as a callout.", +"This asset is used as a structured snippet.", +"This asset is used as a price.", +"This asset is used as a promotion.", +"This asset is used as an image.", +"The asset is used as a lead form.", +"The asset is used as a business logo." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__AudienceInfo": { +"description": "An audience criterion.", +"id": "GoogleAdsSearchads360V0Common__AudienceInfo", +"properties": { +"audience": { +"description": "The Audience resource name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__BusinessProfileLocation": { +"description": "Business Profile location data synced from the linked Business Profile account.", +"id": "GoogleAdsSearchads360V0Common__BusinessProfileLocation", +"properties": { +"labels": { +"description": "Advertiser specified label for the location on the Business Profile account. This is synced from the Business Profile account.", +"items": { +"type": "string" +}, +"type": "array" +}, +"listingId": { +"description": "Listing ID of this Business Profile location. This is synced from the linked Business Profile account.", +"format": "int64", +"type": "string" +}, +"storeCode": { +"description": "Business Profile store code of this location. This is synced from the Business Profile account.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__CallToActionAsset": { +"description": "A call to action asset.", +"id": "GoogleAdsSearchads360V0Common__CallToActionAsset", +"properties": { +"callToAction": { +"description": "Call to action.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"LEARN_MORE", +"GET_QUOTE", +"APPLY_NOW", +"SIGN_UP", +"CONTACT_US", +"SUBSCRIBE", +"DOWNLOAD", +"BOOK_NOW", +"SHOP_NOW", +"BUY_NOW", +"DONATE_NOW", +"ORDER_NOW", +"PLAY_NOW", +"SEE_MORE", +"START_NOW", +"VISIT_SITE", +"WATCH_NOW" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The call to action type is learn more.", +"The call to action type is get quote.", +"The call to action type is apply now.", +"The call to action type is sign up.", +"The call to action type is contact us.", +"The call to action type is subscribe.", +"The call to action type is download.", +"The call to action type is book now.", +"The call to action type is shop now.", +"The call to action type is buy now.", +"The call to action type is donate now.", +"The call to action type is order now.", +"The call to action type is play now.", +"The call to action type is see more.", +"The call to action type is start now.", +"The call to action type is visit site.", +"The call to action type is watch now." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__CustomParameter": { +"description": "A mapping that can be used by custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.", +"id": "GoogleAdsSearchads360V0Common__CustomParameter", +"properties": { +"key": { +"description": "The key matching the parameter tag name.", +"type": "string" +}, +"value": { +"description": "The value to be substituted.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__DeviceInfo": { +"description": "A device criterion.", +"id": "GoogleAdsSearchads360V0Common__DeviceInfo", +"properties": { +"type": { +"description": "Type of the device.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"MOBILE", +"TABLET", +"DESKTOP", +"CONNECTED_TV", +"OTHER" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Mobile devices with full browsers.", +"Tablets with full browsers.", +"Computers.", +"Smart TVs and game consoles.", +"Other device types." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__EnhancedCpc": { +"description": "An automated bidding strategy that raises bids for clicks that seem more likely to lead to a conversion and lowers them for clicks where they seem less likely. This bidding strategy is deprecated and cannot be created anymore. Use ManualCpc with enhanced_cpc_enabled set to true for equivalent functionality.", +"id": "GoogleAdsSearchads360V0Common__EnhancedCpc", +"properties": {}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__FrequencyCapEntry": { +"description": "A rule specifying the maximum number of times an ad (or some set of ads) can be shown to a user over a particular time period.", +"id": "GoogleAdsSearchads360V0Common__FrequencyCapEntry", +"properties": {}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__GenderInfo": { +"description": "A gender criterion.", +"id": "GoogleAdsSearchads360V0Common__GenderInfo", +"properties": { +"type": { +"description": "Type of the gender.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"MALE", +"FEMALE", +"UNDETERMINED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Male.", +"Female.", +"Undetermined gender." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__ImageAsset": { +"description": "An Image asset.", +"id": "GoogleAdsSearchads360V0Common__ImageAsset", +"properties": { +"fileSize": { +"description": "File size of the image asset in bytes.", +"format": "int64", +"type": "string" +}, +"fullSize": { +"$ref": "GoogleAdsSearchads360V0Common__ImageDimension", +"description": "Metadata for this image at its original size." +}, +"mimeType": { +"description": "MIME type of the image asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"IMAGE_JPEG", +"IMAGE_GIF", +"IMAGE_PNG", +"FLASH", +"TEXT_HTML", +"PDF", +"MSWORD", +"MSEXCEL", +"RTF", +"AUDIO_WAV", +"AUDIO_MP3", +"HTML5_AD_ZIP" +], +"enumDescriptions": [ +"The mime type has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"MIME type of image/jpeg.", +"MIME type of image/gif.", +"MIME type of image/png.", +"MIME type of application/x-shockwave-flash.", +"MIME type of text/html.", +"MIME type of application/pdf.", +"MIME type of application/msword.", +"MIME type of application/vnd.ms-excel.", +"MIME type of application/rtf.", +"MIME type of audio/wav.", +"MIME type of audio/mp3.", +"MIME type of application/x-html5-ad-zip." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__ImageDimension": { +"description": "Metadata for an image at a certain size, either original or resized.", +"id": "GoogleAdsSearchads360V0Common__ImageDimension", +"properties": { +"heightPixels": { +"description": "Height of the image.", +"format": "int64", +"type": "string" +}, +"url": { +"description": "A URL that returns the image with this height and width.", +"type": "string" +}, +"widthPixels": { +"description": "Width of the image.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__Keyword": { +"description": "A Keyword criterion segment.", +"id": "GoogleAdsSearchads360V0Common__Keyword", +"properties": { +"adGroupCriterion": { +"description": "The AdGroupCriterion resource name.", +"type": "string" +}, +"info": { +"$ref": "GoogleAdsSearchads360V0Common__KeywordInfo", +"description": "Keyword info." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__KeywordInfo": { +"description": "A keyword criterion.", +"id": "GoogleAdsSearchads360V0Common__KeywordInfo", +"properties": { +"matchType": { +"description": "The match type of the keyword.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"EXACT", +"PHRASE", +"BROAD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Exact match.", +"Phrase match.", +"Broad match." +], +"type": "string" +}, +"text": { +"description": "The text of the keyword (at most 80 characters and 10 words).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__LanguageInfo": { +"description": "A language criterion.", +"id": "GoogleAdsSearchads360V0Common__LanguageInfo", +"properties": { +"languageConstant": { +"description": "The language constant resource name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__ListingGroupInfo": { +"description": "A listing group criterion.", +"id": "GoogleAdsSearchads360V0Common__ListingGroupInfo", +"properties": { +"type": { +"description": "Type of the listing group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SUBDIVISION", +"UNIT" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Subdivision of products along some listing dimension. These nodes are not used by serving to target listing entries, but is purely to define the structure of the tree.", +"Listing group unit that defines a bid." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__LocationGroupInfo": { +"description": "A radius around a list of locations specified through a feed.", +"id": "GoogleAdsSearchads360V0Common__LocationGroupInfo", +"properties": { +"feedItemSets": { +"description": "FeedItemSets whose FeedItems are targeted. If multiple IDs are specified, then all items that appear in at least one set are targeted. This field cannot be used with geo_target_constants. This is optional and can only be set in CREATE operations.", +"items": { +"type": "string" +}, +"type": "array" +}, +"geoTargetConstants": { +"description": "Geo target constant(s) restricting the scope of the geographic area within the feed. Currently only one geo target constant is allowed.", +"items": { +"type": "string" +}, +"type": "array" +}, +"radius": { +"description": "Distance in units specifying the radius around targeted locations. This is required and must be set in CREATE operations.", +"format": "int64", +"type": "string" +}, +"radiusUnits": { +"description": "Unit of the radius. Miles and meters are supported for geo target constants. Milli miles and meters are supported for feed item sets. This is required and must be set in CREATE operations.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"METERS", +"MILES", +"MILLI_MILES" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Meters", +"Miles", +"Milli Miles" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__LocationInfo": { +"description": "A location criterion.", +"id": "GoogleAdsSearchads360V0Common__LocationInfo", +"properties": { +"geoTargetConstant": { +"description": "The geo target constant resource name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__ManualCpa": { +"description": "Manual bidding strategy that allows advertiser to set the bid per advertiser-specified action.", +"id": "GoogleAdsSearchads360V0Common__ManualCpa", +"properties": {}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__ManualCpc": { +"description": "Manual click-based bidding where user pays per click.", +"id": "GoogleAdsSearchads360V0Common__ManualCpc", +"properties": { +"enhancedCpcEnabled": { +"description": "Whether bids are to be enhanced based on conversion optimizer data.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__ManualCpm": { +"description": "Manual impression-based bidding where user pays per thousand impressions.", +"id": "GoogleAdsSearchads360V0Common__ManualCpm", +"properties": {}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__MaximizeConversionValue": { +"description": "An automated bidding strategy to help get the most conversion value for your campaigns while spending your budget.", +"id": "GoogleAdsSearchads360V0Common__MaximizeConversionValue", +"properties": { +"cpcBidCeilingMicros": { +"description": "Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. Mutable for portfolio bidding strategies only.", +"format": "int64", +"type": "string" +}, +"cpcBidFloorMicros": { +"description": "Minimum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. Mutable for portfolio bidding strategies only.", +"format": "int64", +"type": "string" +}, +"targetRoas": { +"description": "The target return on ad spend (ROAS) option. If set, the bid strategy will maximize revenue while averaging the target return on ad spend. If the target ROAS is high, the bid strategy may not be able to spend the full budget. If the target ROAS is not set, the bid strategy will aim to achieve the highest possible ROAS for the budget.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__MaximizeConversions": { +"description": "An automated bidding strategy to help get the most conversions for your campaigns while spending your budget.", +"id": "GoogleAdsSearchads360V0Common__MaximizeConversions", +"properties": { +"cpcBidCeilingMicros": { +"description": "Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. Mutable for portfolio bidding strategies only.", +"format": "int64", +"type": "string" +}, +"cpcBidFloorMicros": { +"description": "Minimum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. Mutable for portfolio bidding strategies only.", +"format": "int64", +"type": "string" +}, +"targetCpaMicros": { +"description": "The target cost-per-action (CPA) option. This is the average amount that you would like to spend per conversion action specified in micro units of the bidding strategy's currency. If set, the bid strategy will get as many conversions as possible at or below the target cost-per-action. If the target CPA is not set, the bid strategy will aim to achieve the lowest possible CPA given the budget.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__Metrics": { +"description": "Metrics data.", +"id": "GoogleAdsSearchads360V0Common__Metrics", +"properties": { +"absoluteTopImpressionPercentage": { +"description": "Search absolute top impression share is the percentage of your Search ad impressions that are shown in the most prominent Search position.", +"format": "double", +"type": "number" +}, +"allConversions": { +"description": "The total number of conversions. This includes all conversions regardless of the value of include_in_conversions_metric.", +"format": "double", +"type": "number" +}, +"allConversionsByConversionDate": { +"description": "The total number of conversions. This includes all conversions regardless of the value of include_in_conversions_metric. When this column is selected with date, the values in date column means the conversion date. Details for the by_conversion_date columns are available at https://support.google.com/sa360/answer/9250611.", +"format": "double", +"type": "number" +}, +"allConversionsFromClickToCall": { +"description": "The number of times people clicked the \"Call\" button to call a store during or after clicking an ad. This number doesn't include whether or not calls were connected, or the duration of any calls. This metric applies to feed items only.", +"format": "double", +"type": "number" +}, +"allConversionsFromDirections": { +"description": "The number of times people clicked a \"Get directions\" button to navigate to a store after clicking an ad. This metric applies to feed items only.", +"format": "double", +"type": "number" +}, +"allConversionsFromInteractionsRate": { +"description": "All conversions from interactions (as oppose to view through conversions) divided by the number of ad interactions.", +"format": "double", +"type": "number" +}, +"allConversionsFromInteractionsValuePerInteraction": { +"description": "The value of all conversions from interactions divided by the total number of interactions.", +"format": "double", +"type": "number" +}, +"allConversionsFromMenu": { +"description": "The number of times people clicked a link to view a store's menu after clicking an ad. This metric applies to feed items only.", +"format": "double", +"type": "number" +}, +"allConversionsFromOrder": { +"description": "The number of times people placed an order at a store after clicking an ad. This metric applies to feed items only.", +"format": "double", +"type": "number" +}, +"allConversionsFromOtherEngagement": { +"description": "The number of other conversions (for example, posting a review or saving a location for a store) that occurred after people clicked an ad. This metric applies to feed items only.", +"format": "double", +"type": "number" +}, +"allConversionsFromStoreVisit": { +"description": "Estimated number of times people visited a store after clicking an ad. This metric applies to feed items only.", +"format": "double", +"type": "number" +}, +"allConversionsFromStoreWebsite": { +"description": "The number of times that people were taken to a store's URL after clicking an ad. This metric applies to feed items only.", +"format": "double", +"type": "number" +}, +"allConversionsValue": { +"description": "The value of all conversions.", +"format": "double", +"type": "number" +}, +"allConversionsValueByConversionDate": { +"description": "The value of all conversions. When this column is selected with date, the values in date column means the conversion date. Details for the by_conversion_date columns are available at https://support.google.com/sa360/answer/9250611.", +"format": "double", +"type": "number" +}, +"allConversionsValuePerCost": { +"description": "The value of all conversions divided by the total cost of ad interactions (such as clicks for text ads or views for video ads).", +"format": "double", +"type": "number" +}, +"averageCost": { +"description": "The average amount you pay per interaction. This amount is the total cost of your ads divided by the total number of interactions.", +"format": "double", +"type": "number" +}, +"averageCpc": { +"description": "The total cost of all clicks divided by the total number of clicks received. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "double", +"type": "number" +}, +"averageCpm": { +"description": "Average cost-per-thousand impressions (CPM). This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "double", +"type": "number" +}, +"clicks": { +"description": "The number of clicks.", +"format": "int64", +"type": "string" +}, +"clientAccountConversions": { +"description": "The number of client account conversions. This only includes conversion actions which include_in_client_account_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.", +"format": "double", +"type": "number" +}, +"clientAccountConversionsValue": { +"description": "The value of client account conversions. This only includes conversion actions which include_in_client_account_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.", +"format": "double", +"type": "number" +}, +"clientAccountCrossSellCostOfGoodsSoldMicros": { +"description": "Client account cross-sell cost of goods sold (COGS) is the total cost of products sold as a result of advertising a different product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If these products don't match then this is considered cross-sell. Cross-sell cost of goods sold is the total cost of the products sold that weren't advertised. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat has a cost of goods sold value of $3, the shirt has a cost of goods sold value of $5. The cross-sell cost of goods sold for this order is $5. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"clientAccountCrossSellGrossProfitMicros": { +"description": "Client account cross-sell gross profit is the profit you made from products sold as a result of advertising a different product, minus cost of goods sold (COGS). How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the purchase is a sold product. If these products don't match then this is considered cross-sell. Cross-sell gross profit is the revenue you made from cross-sell attributed to your ads minus the cost of the goods sold. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The shirt is priced $20 and has a cost of goods sold value of $5. The cross-sell gross profit of this order is $15 = $20 - $5. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"clientAccountCrossSellRevenueMicros": { +"description": "Client account cross-sell revenue is the total amount you made from products sold as a result of advertising a different product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If these products don't match then this is considered cross-sell. Cross-sell revenue is the total value you made from cross-sell attributed to your ads. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat is priced $10 and the shirt is priced $20. The cross-sell revenue of this order is $20. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"clientAccountCrossSellUnitsSold": { +"description": "Client account cross-sell units sold is the total number of products sold as a result of advertising a different product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If these products don't match then this is considered cross-sell. Cross-sell units sold is the total number of cross-sold products from all orders attributed to your ads. Example: Someone clicked on a Shopping ad for a hat then bought the same hat, a shirt and a jacket. The cross-sell units sold in this order is 2. This metric is only available if you report conversions with cart data.", +"format": "double", +"type": "number" +}, +"clientAccountLeadCostOfGoodsSoldMicros": { +"description": "Client account lead cost of goods sold (COGS) is the total cost of products sold as a result of advertising the same product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the cost of these goods is counted under lead cost of goods sold. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat has a cost of goods sold value of $3, the shirt has a cost of goods sold value of $5. The lead cost of goods sold for this order is $3. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"clientAccountLeadGrossProfitMicros": { +"description": "Client account lead gross profit is the profit you made from products sold as a result of advertising the same product, minus cost of goods sold (COGS). How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the revenue you made from these sales minus the cost of goods sold is your lead gross profit. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat is priced $10 and has a cost of goods sold value of $3. The lead gross profit of this order is $7 = $10 - $3. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"clientAccountLeadRevenueMicros": { +"description": "Client account lead revenue is the total amount you made from products sold as a result of advertising the same product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the total value you made from the sales of these products is shown under lead revenue. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat is priced $10 and the shirt is priced $20. The lead revenue of this order is $10. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"clientAccountLeadUnitsSold": { +"description": "Client account lead units sold is the total number of products sold as a result of advertising the same product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the total number of these products sold is shown under lead units sold. Example: Someone clicked on a Shopping ad for a hat then bought the same hat, a shirt and a jacket. The lead units sold in this order is 1. This metric is only available if you report conversions with cart data.", +"format": "double", +"type": "number" +}, +"clientAccountViewThroughConversions": { +"description": "The total number of view-through conversions. These happen when a customer sees an image or rich media ad, then later completes a conversion on your site without interacting with (for example, clicking on) another ad.", +"format": "int64", +"type": "string" +}, +"contentBudgetLostImpressionShare": { +"description": "The estimated percent of times that your ad was eligible to show on the Display Network but didn't because your budget was too low. Note: Content budget lost impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"contentImpressionShare": { +"description": "The impressions you've received on the Display Network divided by the estimated number of impressions you were eligible to receive. Note: Content impression share is reported in the range of 0.1 to 1. Any value below 0.1 is reported as 0.0999.", +"format": "double", +"type": "number" +}, +"contentRankLostImpressionShare": { +"description": "The estimated percentage of impressions on the Display Network that your ads didn't receive due to poor Ad Rank. Note: Content rank lost impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"conversionCustomMetrics": { +"description": "The conversion custom metrics.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__Value" +}, +"type": "array" +}, +"conversions": { +"description": "The number of conversions. This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.", +"format": "double", +"type": "number" +}, +"conversionsByConversionDate": { +"description": "The sum of conversions by conversion date for biddable conversion types. Can be fractional due to attribution modeling. When this column is selected with date, the values in date column means the conversion date.", +"format": "double", +"type": "number" +}, +"conversionsFromInteractionsRate": { +"description": "Average biddable conversions (from interaction) per conversion eligible interaction. Shows how often, on average, an ad interaction leads to a biddable conversion.", +"format": "double", +"type": "number" +}, +"conversionsFromInteractionsValuePerInteraction": { +"description": "The value of conversions from interactions divided by the number of ad interactions. This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.", +"format": "double", +"type": "number" +}, +"conversionsValue": { +"description": "The sum of conversion values for the conversions included in the \"conversions\" field. This metric is useful only if you entered a value for your conversion actions.", +"format": "double", +"type": "number" +}, +"conversionsValueByConversionDate": { +"description": "The sum of biddable conversions value by conversion date. When this column is selected with date, the values in date column means the conversion date.", +"format": "double", +"type": "number" +}, +"conversionsValuePerCost": { +"description": "The value of biddable conversion divided by the total cost of conversion eligible interactions.", +"format": "double", +"type": "number" +}, +"costMicros": { +"description": "The sum of your cost-per-click (CPC) and cost-per-thousand impressions (CPM) costs during this period. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"costPerAllConversions": { +"description": "The cost of ad interactions divided by all conversions.", +"format": "double", +"type": "number" +}, +"costPerConversion": { +"description": "Average conversion eligible cost per biddable conversion.", +"format": "double", +"type": "number" +}, +"costPerCurrentModelAttributedConversion": { +"description": "The cost of ad interactions divided by current model attributed conversions. This only includes conversion actions which include_in_conversions_metric attribute is set to true. If you use conversion-based bidding, your bid strategies will optimize for these conversions.", +"format": "double", +"type": "number" +}, +"crossDeviceConversions": { +"description": "Conversions from when a customer clicks on an ad on one device, then converts on a different device or browser. Cross-device conversions are already included in all_conversions.", +"format": "double", +"type": "number" +}, +"crossDeviceConversionsValue": { +"description": "The sum of the value of cross-device conversions.", +"format": "double", +"type": "number" +}, +"crossSellCostOfGoodsSoldMicros": { +"description": "Cross-sell cost of goods sold (COGS) is the total cost of products sold as a result of advertising a different product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If these products don't match then this is considered cross-sell. Cross-sell cost of goods sold is the total cost of the products sold that weren't advertised. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat has a cost of goods sold value of $3, the shirt has a cost of goods sold value of $5. The cross-sell cost of goods sold for this order is $5. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"crossSellGrossProfitMicros": { +"description": "Cross-sell gross profit is the profit you made from products sold as a result of advertising a different product, minus cost of goods sold (COGS). How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the purchase is a sold product. If these products don't match then this is considered cross-sell. Cross-sell gross profit is the revenue you made from cross-sell attributed to your ads minus the cost of the goods sold. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The shirt is priced $20 and has a cost of goods sold value of $5. The cross-sell gross profit of this order is $15 = $20 - $5. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"crossSellRevenueMicros": { +"description": "Cross-sell revenue is the total amount you made from products sold as a result of advertising a different product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If these products don't match then this is considered cross-sell. Cross-sell revenue is the total value you made from cross-sell attributed to your ads. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat is priced $10 and the shirt is priced $20. The cross-sell revenue of this order is $20. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"crossSellUnitsSold": { +"description": "Cross-sell units sold is the total number of products sold as a result of advertising a different product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If these products don't match then this is considered cross-sell. Cross-sell units sold is the total number of cross-sold products from all orders attributed to your ads. Example: Someone clicked on a Shopping ad for a hat then bought the same hat, a shirt and a jacket. The cross-sell units sold in this order is 2. This metric is only available if you report conversions with cart data.", +"format": "double", +"type": "number" +}, +"ctr": { +"description": "The number of clicks your ad receives (Clicks) divided by the number of times your ad is shown (Impressions).", +"format": "double", +"type": "number" +}, +"historicalCreativeQualityScore": { +"description": "The creative historical quality score.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"BELOW_AVERAGE", +"AVERAGE", +"ABOVE_AVERAGE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Quality of the creative is below average.", +"Quality of the creative is average.", +"Quality of the creative is above average." +], +"type": "string" +}, +"historicalLandingPageQualityScore": { +"description": "The quality of historical landing page experience.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"BELOW_AVERAGE", +"AVERAGE", +"ABOVE_AVERAGE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Quality of the creative is below average.", +"Quality of the creative is average.", +"Quality of the creative is above average." +], +"type": "string" +}, +"historicalQualityScore": { +"description": "The historical quality score.", +"format": "int64", +"type": "string" +}, +"historicalSearchPredictedCtr": { +"description": "The historical search predicted click through rate (CTR).", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"BELOW_AVERAGE", +"AVERAGE", +"ABOVE_AVERAGE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Quality of the creative is below average.", +"Quality of the creative is average.", +"Quality of the creative is above average." +], +"type": "string" +}, +"impressions": { +"description": "Count of how often your ad has appeared on a search results page or website on the Google Network.", +"format": "int64", +"type": "string" +}, +"interactionEventTypes": { +"description": "The types of payable and free interactions.", +"items": { +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"CLICK", +"ENGAGEMENT", +"VIDEO_VIEW", +"NONE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Click to site. In most cases, this interaction navigates to an external location, usually the advertiser's landing page. This is also the default InteractionEventType for click events.", +"The user's expressed intent to engage with the ad in-place.", +"User viewed a video ad.", +"The default InteractionEventType for ad conversion events. This is used when an ad conversion row does NOT indicate that the free interactions (for example, the ad conversions) should be 'promoted' and reported as part of the core metrics. These are simply other (ad) conversions." +], +"type": "string" +}, +"type": "array" +}, +"interactionRate": { +"description": "How often people interact with your ad after it is shown to them. This is the number of interactions divided by the number of times your ad is shown.", +"format": "double", +"type": "number" +}, +"interactions": { +"description": "The number of interactions. An interaction is the main user action associated with an ad format-clicks for text and shopping ads, views for video ads, and so on.", +"format": "int64", +"type": "string" +}, +"invalidClickRate": { +"description": "The percentage of clicks filtered out of your total number of clicks (filtered + non-filtered clicks) during the reporting period.", +"format": "double", +"type": "number" +}, +"invalidClicks": { +"description": "Number of clicks Google considers illegitimate and doesn't charge you for.", +"format": "int64", +"type": "string" +}, +"leadCostOfGoodsSoldMicros": { +"description": "Lead cost of goods sold (COGS) is the total cost of products sold as a result of advertising the same product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the cost of these goods is counted under lead cost of goods sold. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat has a cost of goods sold value of $3, the shirt has a cost of goods sold value of $5. The lead cost of goods sold for this order is $3. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"leadGrossProfitMicros": { +"description": "Lead gross profit is the profit you made from products sold as a result of advertising the same product, minus cost of goods sold (COGS). How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the revenue you made from these sales minus the cost of goods sold is your lead gross profit. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat is priced $10 and has a cost of goods sold value of $3. The lead gross profit of this order is $7 = $10 - $3. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"leadRevenueMicros": { +"description": "Lead revenue is the total amount you made from products sold as a result of advertising the same product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the total value you made from the sales of these products is shown under lead revenue. Example: Someone clicked on a Shopping ad for a hat then bought the same hat and a shirt. The hat is priced $10 and the shirt is priced $20. The lead revenue of this order is $10. This metric is only available if you report conversions with cart data. This metric is a monetary value and returned in the customer's currency by default. See the metrics_currency parameter at https://developers.google.com/search-ads/reporting/query/query-structure#parameters_clause", +"format": "int64", +"type": "string" +}, +"leadUnitsSold": { +"description": "Lead units sold is the total number of products sold as a result of advertising the same product. How it works: You report conversions with cart data for completed purchases on your website. If the ad that was interacted with before the purchase has an associated product (see Shopping Ads) then this product is considered the advertised product. Any product included in the order the customer places is a sold product. If the advertised and sold products match, then the total number of these products sold is shown under lead units sold. Example: Someone clicked on a Shopping ad for a hat then bought the same hat, a shirt and a jacket. The lead units sold in this order is 1. This metric is only available if you report conversions with cart data.", +"format": "double", +"type": "number" +}, +"mobileFriendlyClicksPercentage": { +"description": "The percentage of mobile clicks that go to a mobile-friendly page.", +"format": "double", +"type": "number" +}, +"rawEventConversionMetrics": { +"description": "The raw event conversion metrics.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__Value" +}, +"type": "array" +}, +"searchAbsoluteTopImpressionShare": { +"description": "The percentage of the customer's Shopping or Search ad impressions that are shown in the most prominent Shopping position. See https://support.google.com/sa360/answer/9566729 for details. Any value below 0.1 is reported as 0.0999.", +"format": "double", +"type": "number" +}, +"searchBudgetLostAbsoluteTopImpressionShare": { +"description": "The number estimating how often your ad wasn't the very first ad among the top ads in the search results due to a low budget. Note: Search budget lost absolute top impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"searchBudgetLostImpressionShare": { +"description": "The estimated percent of times that your ad was eligible to show on the Search Network but didn't because your budget was too low. Note: Search budget lost impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"searchBudgetLostTopImpressionShare": { +"description": "The number estimating how often your ad didn't show adjacent to the top organic search results due to a low budget. Note: Search budget lost top impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"searchClickShare": { +"description": "The number of clicks you've received on the Search Network divided by the estimated number of clicks you were eligible to receive. Note: Search click share is reported in the range of 0.1 to 1. Any value below 0.1 is reported as 0.0999.", +"format": "double", +"type": "number" +}, +"searchExactMatchImpressionShare": { +"description": "The impressions you've received divided by the estimated number of impressions you were eligible to receive on the Search Network for search terms that matched your keywords exactly (or were close variants of your keyword), regardless of your keyword match types. Note: Search exact match impression share is reported in the range of 0.1 to 1. Any value below 0.1 is reported as 0.0999.", +"format": "double", +"type": "number" +}, +"searchImpressionShare": { +"description": "The impressions you've received on the Search Network divided by the estimated number of impressions you were eligible to receive. Note: Search impression share is reported in the range of 0.1 to 1. Any value below 0.1 is reported as 0.0999.", +"format": "double", +"type": "number" +}, +"searchRankLostAbsoluteTopImpressionShare": { +"description": "The number estimating how often your ad wasn't the very first ad among the top ads in the search results due to poor Ad Rank. Note: Search rank lost absolute top impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"searchRankLostImpressionShare": { +"description": "The estimated percentage of impressions on the Search Network that your ads didn't receive due to poor Ad Rank. Note: Search rank lost impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"searchRankLostTopImpressionShare": { +"description": "The number estimating how often your ad didn't show adjacent to the top organic search results due to poor Ad Rank. Note: Search rank lost top impression share is reported in the range of 0 to 0.9. Any value above 0.9 is reported as 0.9001.", +"format": "double", +"type": "number" +}, +"searchTopImpressionShare": { +"description": "The impressions you've received among the top ads compared to the estimated number of impressions you were eligible to receive among the top ads. Note: Search top impression share is reported in the range of 0.1 to 1. Any value below 0.1 is reported as 0.0999. Top ads are generally above the top organic results, although they may show below the top organic results on certain queries.", +"format": "double", +"type": "number" +}, +"topImpressionPercentage": { +"description": "The percent of your ad impressions that are shown adjacent to the top organic search results.", +"format": "double", +"type": "number" +}, +"valuePerAllConversions": { +"description": "The value of all conversions divided by the number of all conversions.", +"format": "double", +"type": "number" +}, +"valuePerAllConversionsByConversionDate": { +"description": "The value of all conversions divided by the number of all conversions. When this column is selected with date, the values in date column means the conversion date. Details for the by_conversion_date columns are available at https://support.google.com/sa360/answer/9250611.", +"format": "double", +"type": "number" +}, +"valuePerConversion": { +"description": "The value of biddable conversion divided by the number of biddable conversions. Shows how much, on average, each of the biddable conversions is worth.", +"format": "double", +"type": "number" +}, +"valuePerConversionsByConversionDate": { +"description": "Biddable conversions value by conversion date divided by biddable conversions by conversion date. Shows how much, on average, each of the biddable conversions is worth (by conversion date). When this column is selected with date, the values in date column means the conversion date.", +"format": "double", +"type": "number" +}, +"visits": { +"description": "Clicks that Search Ads 360 has successfully recorded and forwarded to an advertiser's landing page.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__MobileAppAsset": { +"description": "An asset representing a mobile app.", +"id": "GoogleAdsSearchads360V0Common__MobileAppAsset", +"properties": { +"appId": { +"description": "Required. A string that uniquely identifies a mobile application. It should just contain the platform native id, like \"com.android.ebay\" for Android or \"12345689\" for iOS.", +"type": "string" +}, +"appStore": { +"description": "Required. The application store that distributes this specific app.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"APPLE_APP_STORE", +"GOOGLE_APP_STORE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Mobile app vendor for Apple app store.", +"Mobile app vendor for Google app store." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__PercentCpc": { +"description": "A bidding strategy where bids are a fraction of the advertised price for some good or service.", +"id": "GoogleAdsSearchads360V0Common__PercentCpc", +"properties": { +"cpcBidCeilingMicros": { +"description": "Maximum bid limit that can be set by the bid strategy. This is an optional field entered by the advertiser and specified in local micros. Note: A zero value is interpreted in the same way as having bid_ceiling undefined.", +"format": "int64", +"type": "string" +}, +"enhancedCpcEnabled": { +"description": "Adjusts the bid for each auction upward or downward, depending on the likelihood of a conversion. Individual bids may exceed cpc_bid_ceiling_micros, but the average bid amount for a campaign should not.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__RealTimeBiddingSetting": { +"description": "Settings for Real-Time Bidding, a feature only available for campaigns targeting the Ad Exchange network.", +"id": "GoogleAdsSearchads360V0Common__RealTimeBiddingSetting", +"properties": { +"optIn": { +"description": "Whether the campaign is opted in to real-time bidding.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__SearchAds360ExpandedDynamicSearchAdInfo": { +"description": "An expanded dynamic search ad.", +"id": "GoogleAdsSearchads360V0Common__SearchAds360ExpandedDynamicSearchAdInfo", +"properties": { +"adTrackingId": { +"description": "The tracking id of the ad.", +"format": "int64", +"type": "string" +}, +"description1": { +"description": "The first line of the ad's description.", +"type": "string" +}, +"description2": { +"description": "The second line of the ad's description.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__SearchAds360ExpandedTextAdInfo": { +"description": "A Search Ads 360 expanded text ad.", +"id": "GoogleAdsSearchads360V0Common__SearchAds360ExpandedTextAdInfo", +"properties": { +"adTrackingId": { +"description": "The tracking id of the ad.", +"format": "int64", +"type": "string" +}, +"description1": { +"description": "The first line of the ad's description.", +"type": "string" +}, +"description2": { +"description": "The second line of the ad's description.", +"type": "string" +}, +"headline": { +"description": "The headline of the ad.", +"type": "string" +}, +"headline2": { +"description": "The second headline of the ad.", +"type": "string" +}, +"headline3": { +"description": "The third headline of the ad.", +"type": "string" +}, +"path1": { +"description": "Text appended to the auto-generated visible URL with a delimiter.", +"type": "string" +}, +"path2": { +"description": "Text appended to path1 with a delimiter.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__SearchAds360ProductAdInfo": { +"description": "A Search Ads 360 product ad.", +"id": "GoogleAdsSearchads360V0Common__SearchAds360ProductAdInfo", +"properties": {}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__SearchAds360ResponsiveSearchAdInfo": { +"description": "A Search Ads 360 responsive search ad.", +"id": "GoogleAdsSearchads360V0Common__SearchAds360ResponsiveSearchAdInfo", +"properties": { +"adTrackingId": { +"description": "The tracking id of the ad.", +"format": "int64", +"type": "string" +}, +"path1": { +"description": "Text appended to the auto-generated visible URL with a delimiter.", +"type": "string" +}, +"path2": { +"description": "Text appended to path1 with a delimiter.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__SearchAds360TextAdInfo": { +"description": "A Search Ads 360 text ad.", +"id": "GoogleAdsSearchads360V0Common__SearchAds360TextAdInfo", +"properties": { +"adTrackingId": { +"description": "The tracking id of the ad.", +"format": "int64", +"type": "string" +}, +"description1": { +"description": "The first line of the ad's description.", +"type": "string" +}, +"description2": { +"description": "The second line of the ad's description.", +"type": "string" +}, +"displayMobileUrl": { +"description": "The displayed mobile URL of the ad.", +"type": "string" +}, +"displayUrl": { +"description": "The displayed URL of the ad.", +"type": "string" +}, +"headline": { +"description": "The headline of the ad.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__Segments": { +"description": "Segment only fields.", +"id": "GoogleAdsSearchads360V0Common__Segments", +"properties": { +"adNetworkType": { +"description": "Ad network type.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SEARCH", +"SEARCH_PARTNERS", +"CONTENT", +"YOUTUBE_SEARCH", +"YOUTUBE_WATCH", +"MIXED" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Google search.", +"Search partners.", +"Display Network.", +"YouTube Search.", +"YouTube Videos", +"Cross-network." +], +"type": "string" +}, +"assetInteractionTarget": { +"$ref": "GoogleAdsSearchads360V0Common__AssetInteractionTarget", +"description": "Only used with CustomerAsset, CampaignAsset and AdGroupAsset metrics. Indicates whether the interaction metrics occurred on the asset itself or a different asset or ad unit. Interactions (for example, clicks) are counted across all the parts of the served ad (for example, Ad itself and other components like Sitelinks) when they are served together. When interaction_on_this_asset is true, it means the interactions are on this specific asset and when interaction_on_this_asset is false, it means the interactions is not on this specific asset but on other parts of the served ad this asset is served with." +}, +"conversionAction": { +"description": "Resource name of the conversion action.", +"type": "string" +}, +"conversionActionCategory": { +"description": "Conversion action category.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"DEFAULT", +"PAGE_VIEW", +"PURCHASE", +"SIGNUP", +"LEAD", +"DOWNLOAD", +"ADD_TO_CART", +"BEGIN_CHECKOUT", +"SUBSCRIBE_PAID", +"PHONE_CALL_LEAD", +"IMPORTED_LEAD", +"SUBMIT_LEAD_FORM", +"BOOK_APPOINTMENT", +"REQUEST_QUOTE", +"GET_DIRECTIONS", +"OUTBOUND_CLICK", +"CONTACT", +"ENGAGEMENT", +"STORE_VISIT", +"STORE_SALE", +"QUALIFIED_LEAD", +"CONVERTED_LEAD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Default category.", +"User visiting a page.", +"Purchase, sales, or \"order placed\" event.", +"Signup user action.", +"Lead-generating action.", +"Software download action (as for an app).", +"The addition of items to a shopping cart or bag on an advertiser site.", +"When someone enters the checkout flow on an advertiser site.", +"The start of a paid subscription for a product or service.", +"A call to indicate interest in an advertiser's offering.", +"A lead conversion imported from an external source into Google Ads.", +"A submission of a form on an advertiser site indicating business interest.", +"A booking of an appointment with an advertiser's business.", +"A quote or price estimate request.", +"A search for an advertiser's business location with intention to visit.", +"A click to an advertiser's partner's site.", +"A call, SMS, email, chat or other type of contact to an advertiser.", +"A website engagement event such as long site time or a Google Analytics (GA) Smart Goal. Intended to be used for GA, Firebase, GA Gold goal imports.", +"A visit to a physical store location.", +"A sale occurring in a physical store.", +"A lead conversion imported from an external source into Google Ads, that has been further qualified by the advertiser (marketing/sales team). In the lead-to-sale journey, advertisers get leads, then act on them by reaching out to the consumer. If the consumer is interested and may end up buying their product, the advertiser marks such leads as \"qualified leads\".", +"A lead conversion imported from an external source into Google Ads, that has further completed a chosen stage as defined by the lead gen advertiser." +], +"type": "string" +}, +"conversionActionName": { +"description": "Conversion action name.", +"type": "string" +}, +"conversionCustomDimensions": { +"description": "The conversion custom dimensions.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__Value" +}, +"type": "array" +}, +"date": { +"description": "Date to which metrics apply. yyyy-MM-dd format, for example, 2018-04-17.", +"type": "string" +}, +"dayOfWeek": { +"description": "Day of the week, for example, MONDAY.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Monday.", +"Tuesday.", +"Wednesday.", +"Thursday.", +"Friday.", +"Saturday.", +"Sunday." +], +"type": "string" +}, +"device": { +"description": "Device to which metrics apply.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"MOBILE", +"TABLET", +"DESKTOP", +"CONNECTED_TV", +"OTHER" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Mobile devices with full browsers.", +"Tablets with full browsers.", +"Computers.", +"Smart TVs and game consoles.", +"Other device types." +], +"type": "string" +}, +"keyword": { +"$ref": "GoogleAdsSearchads360V0Common__Keyword", +"description": "Keyword criterion." +}, +"month": { +"description": "Month as represented by the date of the first day of a month. Formatted as yyyy-MM-dd.", +"type": "string" +}, +"productBiddingCategoryLevel1": { +"description": "Bidding category (level 1) of the product.", +"type": "string" +}, +"productBiddingCategoryLevel2": { +"description": "Bidding category (level 2) of the product.", +"type": "string" +}, +"productBiddingCategoryLevel3": { +"description": "Bidding category (level 3) of the product.", +"type": "string" +}, +"productBiddingCategoryLevel4": { +"description": "Bidding category (level 4) of the product.", +"type": "string" +}, +"productBiddingCategoryLevel5": { +"description": "Bidding category (level 5) of the product.", +"type": "string" +}, +"productBrand": { +"description": "Brand of the product.", +"type": "string" +}, +"productChannel": { +"description": "Channel of the product.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ONLINE", +"LOCAL" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The item is sold online.", +"The item is sold in local stores." +], +"type": "string" +}, +"productChannelExclusivity": { +"description": "Channel exclusivity of the product.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SINGLE_CHANNEL", +"MULTI_CHANNEL" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The item is sold through one channel only, either local stores or online as indicated by its ProductChannel.", +"The item is matched to its online or local stores counterpart, indicating it is available for purchase in both ShoppingProductChannels." +], +"type": "string" +}, +"productCondition": { +"description": "Condition of the product.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"OLD", +"NEW", +"REFURBISHED", +"USED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The product condition is old.", +"The product condition is new.", +"The product condition is refurbished.", +"The product condition is used." +], +"type": "string" +}, +"productCountry": { +"description": "Resource name of the geo target constant for the country of sale of the product.", +"type": "string" +}, +"productCustomAttribute0": { +"description": "Custom attribute 0 of the product.", +"type": "string" +}, +"productCustomAttribute1": { +"description": "Custom attribute 1 of the product.", +"type": "string" +}, +"productCustomAttribute2": { +"description": "Custom attribute 2 of the product.", +"type": "string" +}, +"productCustomAttribute3": { +"description": "Custom attribute 3 of the product.", +"type": "string" +}, +"productCustomAttribute4": { +"description": "Custom attribute 4 of the product.", +"type": "string" +}, +"productItemId": { +"description": "Item ID of the product.", +"type": "string" +}, +"productLanguage": { +"description": "Resource name of the language constant for the language of the product.", +"type": "string" +}, +"productSoldBiddingCategoryLevel1": { +"description": "Bidding category (level 1) of the product sold.", +"type": "string" +}, +"productSoldBiddingCategoryLevel2": { +"description": "Bidding category (level 2) of the product sold.", +"type": "string" +}, +"productSoldBiddingCategoryLevel3": { +"description": "Bidding category (level 3) of the product sold.", +"type": "string" +}, +"productSoldBiddingCategoryLevel4": { +"description": "Bidding category (level 4) of the product sold.", +"type": "string" +}, +"productSoldBiddingCategoryLevel5": { +"description": "Bidding category (level 5) of the product sold.", +"type": "string" +}, +"productSoldBrand": { +"description": "Brand of the product sold.", +"type": "string" +}, +"productSoldCondition": { +"description": "Condition of the product sold.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"OLD", +"NEW", +"REFURBISHED", +"USED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The product condition is old.", +"The product condition is new.", +"The product condition is refurbished.", +"The product condition is used." +], +"type": "string" +}, +"productSoldCustomAttribute0": { +"description": "Custom attribute 0 of the product sold.", +"type": "string" +}, +"productSoldCustomAttribute1": { +"description": "Custom attribute 1 of the product sold.", +"type": "string" +}, +"productSoldCustomAttribute2": { +"description": "Custom attribute 2 of the product sold.", +"type": "string" +}, +"productSoldCustomAttribute3": { +"description": "Custom attribute 3 of the product sold.", +"type": "string" +}, +"productSoldCustomAttribute4": { +"description": "Custom attribute 4 of the product sold.", +"type": "string" +}, +"productSoldItemId": { +"description": "Item ID of the product sold.", +"type": "string" +}, +"productSoldTitle": { +"description": "Title of the product sold.", +"type": "string" +}, +"productSoldTypeL1": { +"description": "Type (level 1) of the product sold.", +"type": "string" +}, +"productSoldTypeL2": { +"description": "Type (level 2) of the product sold.", +"type": "string" +}, +"productSoldTypeL3": { +"description": "Type (level 3) of the product sold.", +"type": "string" +}, +"productSoldTypeL4": { +"description": "Type (level 4) of the product sold.", +"type": "string" +}, +"productSoldTypeL5": { +"description": "Type (level 5) of the product sold.", +"type": "string" +}, +"productStoreId": { +"description": "Store ID of the product.", +"type": "string" +}, +"productTitle": { +"description": "Title of the product.", +"type": "string" +}, +"productTypeL1": { +"description": "Type (level 1) of the product.", +"type": "string" +}, +"productTypeL2": { +"description": "Type (level 2) of the product.", +"type": "string" +}, +"productTypeL3": { +"description": "Type (level 3) of the product.", +"type": "string" +}, +"productTypeL4": { +"description": "Type (level 4) of the product.", +"type": "string" +}, +"productTypeL5": { +"description": "Type (level 5) of the product.", +"type": "string" +}, +"quarter": { +"description": "Quarter as represented by the date of the first day of a quarter. Uses the calendar year for quarters, for example, the second quarter of 2018 starts on 2018-04-01. Formatted as yyyy-MM-dd.", +"type": "string" +}, +"rawEventConversionDimensions": { +"description": "The raw event conversion dimensions.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__Value" +}, +"type": "array" +}, +"week": { +"description": "Week as defined as Monday through Sunday, and represented by the date of Monday. Formatted as yyyy-MM-dd.", +"type": "string" +}, +"year": { +"description": "Year, formatted as yyyy.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetCpa": { +"description": "An automated bid strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set.", +"id": "GoogleAdsSearchads360V0Common__TargetCpa", +"properties": { +"cpcBidCeilingMicros": { +"description": "Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. This should only be set for portfolio bid strategies.", +"format": "int64", +"type": "string" +}, +"cpcBidFloorMicros": { +"description": "Minimum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. This should only be set for portfolio bid strategies.", +"format": "int64", +"type": "string" +}, +"targetCpaMicros": { +"description": "Average CPA target. This target should be greater than or equal to minimum billable unit based on the currency for the account.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetCpm": { +"description": "Target CPM (cost per thousand impressions) is an automated bidding strategy that sets bids to optimize performance given the target CPM you set.", +"id": "GoogleAdsSearchads360V0Common__TargetCpm", +"properties": {}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetImpressionShare": { +"description": "An automated bidding strategy that sets bids so that a certain percentage of search ads are shown at the top of the first page (or other targeted location).", +"id": "GoogleAdsSearchads360V0Common__TargetImpressionShare", +"properties": { +"cpcBidCeilingMicros": { +"description": "The highest CPC bid the automated bidding system is permitted to specify. This is a required field entered by the advertiser that sets the ceiling and specified in local micros.", +"format": "int64", +"type": "string" +}, +"location": { +"description": "The targeted location on the search results page.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ANYWHERE_ON_PAGE", +"TOP_OF_PAGE", +"ABSOLUTE_TOP_OF_PAGE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Any location on the web page.", +"Top box of ads.", +"Top slot in the top box of ads." +], +"type": "string" +}, +"locationFractionMicros": { +"description": "The chosen fraction of ads to be shown in the targeted location in micros. For example, 1% equals 10,000.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetOutrankShare": { +"description": "An automated bidding strategy that sets bids based on the target fraction of auctions where the advertiser should outrank a specific competitor. This strategy is deprecated.", +"id": "GoogleAdsSearchads360V0Common__TargetOutrankShare", +"properties": { +"cpcBidCeilingMicros": { +"description": "Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetRestriction": { +"description": "The list of per-targeting-dimension targeting settings.", +"id": "GoogleAdsSearchads360V0Common__TargetRestriction", +"properties": { +"bidOnly": { +"description": "Indicates whether to restrict your ads to show only for the criteria you have selected for this targeting_dimension, or to target all values for this targeting_dimension and show ads based on your targeting in other TargetingDimensions. A value of `true` means that these criteria will only apply bid modifiers, and not affect targeting. A value of `false` means that these criteria will restrict targeting as well as applying bid modifiers.", +"type": "boolean" +}, +"targetingDimension": { +"description": "The targeting dimension that these settings apply to.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"KEYWORD", +"AUDIENCE", +"TOPIC", +"GENDER", +"AGE_RANGE", +"PLACEMENT", +"PARENTAL_STATUS", +"INCOME_RANGE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Keyword criteria, for example, 'mars cruise'. KEYWORD may be used as a custom bid dimension. Keywords are always a targeting dimension, so may not be set as a target \"ALL\" dimension with TargetRestriction.", +"Audience criteria, which include user list, user interest, custom affinity, and custom in market.", +"Topic criteria for targeting categories of content, for example, 'category::Animals>Pets' Used for Display and Video targeting.", +"Criteria for targeting gender.", +"Criteria for targeting age ranges.", +"Placement criteria, which include websites like 'www.flowers4sale.com', as well as mobile applications, mobile app categories, YouTube videos, and YouTube channels.", +"Criteria for parental status targeting.", +"Criteria for income range targeting." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetRoas": { +"description": "An automated bidding strategy that helps you maximize revenue while averaging a specific target return on ad spend (ROAS).", +"id": "GoogleAdsSearchads360V0Common__TargetRoas", +"properties": { +"cpcBidCeilingMicros": { +"description": "Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. This should only be set for portfolio bid strategies.", +"format": "int64", +"type": "string" +}, +"cpcBidFloorMicros": { +"description": "Minimum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy. This should only be set for portfolio bid strategies.", +"format": "int64", +"type": "string" +}, +"targetRoas": { +"description": "Required. The chosen revenue (based on conversion data) per unit of spend. Value must be between 0.01 and 1000.0, inclusive.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetSpend": { +"description": "An automated bid strategy that sets your bids to help get as many clicks as possible within your budget.", +"id": "GoogleAdsSearchads360V0Common__TargetSpend", +"properties": { +"cpcBidCeilingMicros": { +"description": "Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy.", +"format": "int64", +"type": "string" +}, +"targetSpendMicros": { +"deprecated": true, +"description": "The spend target under which to maximize clicks. A TargetSpend bidder will attempt to spend the smaller of this value or the natural throttling spend amount. If not specified, the budget is used as the spend target. This field is deprecated and should no longer be used. See https://ads-developers.googleblog.com/2020/05/reminder-about-sunset-creation-of.html for details.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TargetingSetting": { +"description": "Settings for the targeting-related features, at the campaign and ad group levels. For more details about the targeting setting, visit https://support.google.com/google-ads/answer/7365594", +"id": "GoogleAdsSearchads360V0Common__TargetingSetting", +"properties": { +"targetRestrictions": { +"description": "The per-targeting-dimension setting to restrict the reach of your campaign or ad group.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__TargetRestriction" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TextAsset": { +"description": "A Text asset.", +"id": "GoogleAdsSearchads360V0Common__TextAsset", +"properties": { +"text": { +"description": "Text content of the text asset.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__TextLabel": { +"description": "A type of label displaying text on a colored background.", +"id": "GoogleAdsSearchads360V0Common__TextLabel", +"properties": { +"backgroundColor": { +"description": "Background color of the label in RGB format. This string must match the regular expression '^\\#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$'. Note: The background color may not be visible for manager accounts.", +"type": "string" +}, +"description": { +"description": "A short description of the label. The length must be no more than 200 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__UnifiedCallAsset": { +"description": "A unified call asset.", +"id": "GoogleAdsSearchads360V0Common__UnifiedCallAsset", +"properties": { +"adScheduleTargets": { +"description": "List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__AdScheduleInfo" +}, +"type": "array" +}, +"callConversionAction": { +"description": "The conversion action to attribute a call conversion to. If not set, the default conversion action is used. This field only has effect if call_conversion_reporting_state is set to USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION.", +"type": "string" +}, +"callConversionReportingState": { +"description": "Output only. Indicates whether this CallAsset should use its own call conversion setting, follow the account level setting, or disable call conversion.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"DISABLED", +"USE_ACCOUNT_LEVEL_CALL_CONVERSION_ACTION", +"USE_RESOURCE_LEVEL_CALL_CONVERSION_ACTION" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Call conversion action is disabled.", +"Call conversion action will use call conversion type set at the account level.", +"Call conversion action will use call conversion type set at the resource (call only ads/call extensions) level." +], +"readOnly": true, +"type": "string" +}, +"callOnly": { +"description": "Whether the call only shows the phone number without a link to the website. Applies to Microsoft Ads.", +"type": "boolean" +}, +"callTrackingEnabled": { +"description": "Whether the call should be enabled on call tracking. Applies to Microsoft Ads.", +"type": "boolean" +}, +"countryCode": { +"description": "Two-letter country code of the phone number. Examples: 'US', 'us'.", +"type": "string" +}, +"endDate": { +"description": "Last date of when this asset is effective and still serving, in yyyy-MM-dd format.", +"type": "string" +}, +"phoneNumber": { +"description": "The advertiser's raw phone number. Examples: '1234567890', '(123)456-7890'", +"type": "string" +}, +"startDate": { +"description": "Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.", +"type": "string" +}, +"useSearcherTimeZone": { +"description": "Whether to show the call extension in search user's time zone. Applies to Microsoft Ads.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__UnifiedCalloutAsset": { +"description": "A unified callout asset.", +"id": "GoogleAdsSearchads360V0Common__UnifiedCalloutAsset", +"properties": { +"adScheduleTargets": { +"description": "List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__AdScheduleInfo" +}, +"type": "array" +}, +"calloutText": { +"description": "The callout text. The length of this string should be between 1 and 25, inclusive.", +"type": "string" +}, +"endDate": { +"description": "Last date of when this asset is effective and still serving, in yyyy-MM-dd format.", +"type": "string" +}, +"startDate": { +"description": "Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.", +"type": "string" +}, +"useSearcherTimeZone": { +"description": "Whether to show the asset in search user's time zone. Applies to Microsoft Ads.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__UnifiedLocationAsset": { +"description": "A unified location asset.", +"id": "GoogleAdsSearchads360V0Common__UnifiedLocationAsset", +"properties": { +"businessProfileLocations": { +"description": "The list of business locations for the customer. This will only be returned if the Location Asset is syncing from the Business Profile account. It is possible to have multiple Business Profile listings under the same account that point to the same Place ID.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__BusinessProfileLocation" +}, +"type": "array" +}, +"locationOwnershipType": { +"description": "The type of location ownership. If the type is BUSINESS_OWNER, it will be served as a location extension. If the type is AFFILIATE, it will be served as an affiliate location.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"BUSINESS_OWNER", +"AFFILIATE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Business Owner of location(legacy location extension - LE).", +"Affiliate location(Third party location extension - ALE)." +], +"type": "string" +}, +"placeId": { +"description": "Place IDs uniquely identify a place in the Google Places database and on Google Maps. This field is unique for a given customer ID and asset type. See https://developers.google.com/places/web-service/place-id to learn more about Place ID.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset": { +"description": "A Unified Page Feed asset.", +"id": "GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset", +"properties": { +"labels": { +"description": "Labels used to group the page urls.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pageUrl": { +"description": "The webpage that advertisers want to target.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset": { +"description": "A unified sitelink asset.", +"id": "GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset", +"properties": { +"adScheduleTargets": { +"description": "List of non-overlapping schedules specifying all time intervals for which the asset may serve. There can be a maximum of 6 schedules per day, 42 in total.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__AdScheduleInfo" +}, +"type": "array" +}, +"description1": { +"description": "First line of the description for the sitelink. If set, the length should be between 1 and 35, inclusive, and description2 must also be set.", +"type": "string" +}, +"description2": { +"description": "Second line of the description for the sitelink. If set, the length should be between 1 and 35, inclusive, and description1 must also be set.", +"type": "string" +}, +"endDate": { +"description": "Last date of when this asset is effective and still serving, in yyyy-MM-dd format.", +"type": "string" +}, +"linkText": { +"description": "URL display text for the sitelink. The length of this string should be between 1 and 25, inclusive.", +"type": "string" +}, +"mobilePreferred": { +"description": "Whether the preference is for the sitelink asset to be displayed on mobile devices. Applies to Microsoft Ads.", +"type": "boolean" +}, +"startDate": { +"description": "Start date of when this asset is effective and can begin serving, in yyyy-MM-dd format.", +"type": "string" +}, +"trackingId": { +"description": "ID used for tracking clicks for the sitelink asset. This is a Yahoo! Japan only field.", +"format": "int64", +"type": "string" +}, +"useSearcherTimeZone": { +"description": "Whether to show the sitelink asset in search user's time zone. Applies to Microsoft Ads.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__UserListInfo": { +"description": "A User List criterion. Represents a user list that is defined by the advertiser to be targeted.", +"id": "GoogleAdsSearchads360V0Common__UserListInfo", +"properties": { +"userList": { +"description": "The User List resource name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__Value": { +"description": "A generic data container.", +"id": "GoogleAdsSearchads360V0Common__Value", +"properties": { +"booleanValue": { +"description": "A boolean.", +"type": "boolean" +}, +"doubleValue": { +"description": "A double.", +"format": "double", +"type": "number" +}, +"floatValue": { +"description": "A float.", +"format": "float", +"type": "number" +}, +"int64Value": { +"description": "An int64.", +"format": "int64", +"type": "string" +}, +"stringValue": { +"description": "A string.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__WebpageConditionInfo": { +"description": "Logical expression for targeting webpages of an advertiser's website.", +"id": "GoogleAdsSearchads360V0Common__WebpageConditionInfo", +"properties": { +"argument": { +"description": "Argument of webpage targeting condition.", +"type": "string" +}, +"operand": { +"description": "Operand of webpage targeting condition.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"URL", +"CATEGORY", +"PAGE_TITLE", +"PAGE_CONTENT", +"CUSTOM_LABEL" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Operand denoting a webpage URL targeting condition.", +"Operand denoting a webpage category targeting condition.", +"Operand denoting a webpage title targeting condition.", +"Operand denoting a webpage content targeting condition.", +"Operand denoting a webpage custom label targeting condition." +], +"type": "string" +}, +"operator": { +"description": "Operator of webpage targeting condition.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"EQUALS", +"CONTAINS" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The argument web condition is equal to the compared web condition.", +"The argument web condition is part of the compared web condition." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__WebpageInfo": { +"description": "Represents a criterion for targeting webpages of an advertiser's website.", +"id": "GoogleAdsSearchads360V0Common__WebpageInfo", +"properties": { +"conditions": { +"description": "Conditions, or logical expressions, for webpage targeting. The list of webpage targeting conditions are and-ed together when evaluated for targeting. An empty list of conditions indicates all pages of the campaign's website are targeted. This field is required for CREATE operations and is prohibited on UPDATE operations.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__WebpageConditionInfo" +}, +"type": "array" +}, +"coveragePercentage": { +"description": "Website criteria coverage percentage. This is the computed percentage of website coverage based on the website target, negative website target and negative keywords in the ad group and campaign. For instance, when coverage returns as 1, it indicates it has 100% coverage. This field is read-only.", +"format": "double", +"type": "number" +}, +"criterionName": { +"description": "The name of the criterion that is defined by this parameter. The name value will be used for identifying, sorting and filtering criteria with this type of parameters. This field is required for CREATE operations and is prohibited on UPDATE operations.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Common__YoutubeVideoAsset": { +"description": "A YouTube asset.", +"id": "GoogleAdsSearchads360V0Common__YoutubeVideoAsset", +"properties": { +"youtubeVideoId": { +"description": "YouTube video id. This is the 11 character string value used in the YouTube video URL.", +"type": "string" +}, +"youtubeVideoTitle": { +"description": "YouTube video title.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Errors_ErrorLocation_FieldPathElement": { +"description": "A part of a field path.", +"id": "GoogleAdsSearchads360V0Errors_ErrorLocation_FieldPathElement", +"properties": { +"fieldName": { +"description": "The name of a field or a oneof", +"type": "string" +}, +"index": { +"description": "If field_name is a repeated field, this is the element that failed", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Errors__ErrorCode": { +"description": "The error reason represented by type and enum.", +"id": "GoogleAdsSearchads360V0Errors__ErrorCode", +"properties": { +"authenticationError": { +"description": "Indicates failure to properly authenticate user.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"AUTHENTICATION_ERROR", +"CLIENT_CUSTOMER_ID_INVALID", +"CUSTOMER_NOT_FOUND", +"GOOGLE_ACCOUNT_DELETED", +"GOOGLE_ACCOUNT_COOKIE_INVALID", +"GOOGLE_ACCOUNT_AUTHENTICATION_FAILED", +"GOOGLE_ACCOUNT_USER_AND_ADS_USER_MISMATCH", +"LOGIN_COOKIE_REQUIRED", +"NOT_ADS_USER", +"OAUTH_TOKEN_INVALID", +"OAUTH_TOKEN_EXPIRED", +"OAUTH_TOKEN_DISABLED", +"OAUTH_TOKEN_REVOKED", +"OAUTH_TOKEN_HEADER_INVALID", +"LOGIN_COOKIE_INVALID", +"USER_ID_INVALID", +"TWO_STEP_VERIFICATION_NOT_ENROLLED", +"ADVANCED_PROTECTION_NOT_ENROLLED" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"Authentication of the request failed.", +"Client customer ID is not a number.", +"No customer found for the provided customer ID.", +"Client's Google account is deleted.", +"Account login token in the cookie is invalid.", +"A problem occurred during Google account authentication.", +"The user in the Google account login token does not match the user ID in the cookie.", +"Login cookie is required for authentication.", +"The Google account that generated the OAuth access token is not associated with a Search Ads 360 account. Create a new account, or add the Google account to an existing Search Ads 360 account.", +"OAuth token in the header is not valid.", +"OAuth token in the header has expired.", +"OAuth token in the header has been disabled.", +"OAuth token in the header has been revoked.", +"OAuth token HTTP header is malformed.", +"Login cookie is not valid.", +"User ID in the header is not a valid ID.", +"An account administrator changed this account's authentication settings. To access this account, enable 2-Step Verification in your Google account at https://www.google.com/landing/2step.", +"An account administrator changed this account's authentication settings. To access this account, enable Advanced Protection in your Google account at https://landing.google.com/advancedprotection." +], +"type": "string" +}, +"authorizationError": { +"description": "An error encountered when trying to authorize a user.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"USER_PERMISSION_DENIED", +"PROJECT_DISABLED", +"AUTHORIZATION_ERROR", +"ACTION_NOT_PERMITTED", +"INCOMPLETE_SIGNUP", +"CUSTOMER_NOT_ENABLED", +"MISSING_TOS", +"INVALID_LOGIN_CUSTOMER_ID_SERVING_CUSTOMER_ID_COMBINATION", +"SERVICE_ACCESS_DENIED", +"ACCESS_DENIED_FOR_ACCOUNT_TYPE", +"METRIC_ACCESS_DENIED" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"User doesn't have permission to access customer. Note: If you're accessing a client customer, the manager's customer ID must be set in the `login-customer-id` header. Learn more at https://developers.google.com/search-ads/reporting/concepts/call-structure#login_customer_id_header", +"The Google Cloud project sent in the request does not have permission to access the api.", +"Authorization of the client failed.", +"The user does not have permission to perform this action (for example, ADD, UPDATE, REMOVE) on the resource or call a method.", +"Signup not complete.", +"The customer account can't be accessed because it is not yet enabled or has been deactivated.", +"The developer must sign the terms of service. They can be found here: https://developers.google.com/terms", +"The login customer specified does not have access to the account specified, so the request is invalid.", +"The developer specified does not have access to the service.", +"The customer (or login customer) isn't allowed in Search Ads 360 API. It belongs to another ads system.", +"The developer does not have access to the metrics queried." +], +"type": "string" +}, +"customColumnError": { +"description": "The reasons for the custom column error", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"CUSTOM_COLUMN_NOT_FOUND", +"CUSTOM_COLUMN_NOT_AVAILABLE" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"The custom column has not been found.", +"The custom column is not available." +], +"type": "string" +}, +"dateError": { +"description": "The reasons for the date error", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"INVALID_FIELD_VALUES_IN_DATE", +"INVALID_FIELD_VALUES_IN_DATE_TIME", +"INVALID_STRING_DATE", +"INVALID_STRING_DATE_TIME_MICROS", +"INVALID_STRING_DATE_TIME_SECONDS", +"INVALID_STRING_DATE_TIME_SECONDS_WITH_OFFSET", +"EARLIER_THAN_MINIMUM_DATE", +"LATER_THAN_MAXIMUM_DATE", +"DATE_RANGE_MINIMUM_DATE_LATER_THAN_MAXIMUM_DATE", +"DATE_RANGE_MINIMUM_AND_MAXIMUM_DATES_BOTH_NULL" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"Given field values do not correspond to a valid date.", +"Given field values do not correspond to a valid date time.", +"The string date's format should be yyyy-mm-dd.", +"The string date time's format should be yyyy-mm-dd hh:mm:ss.ssssss.", +"The string date time's format should be yyyy-mm-dd hh:mm:ss.", +"The string date time's format should be yyyy-mm-dd hh:mm:ss+|-hh:mm.", +"Date is before allowed minimum.", +"Date is after allowed maximum.", +"Date range bounds are not in order.", +"Both dates in range are null." +], +"type": "string" +}, +"dateRangeError": { +"description": "The reasons for the date range error", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"INVALID_DATE", +"START_DATE_AFTER_END_DATE", +"CANNOT_SET_DATE_TO_PAST", +"AFTER_MAXIMUM_ALLOWABLE_DATE", +"CANNOT_MODIFY_START_DATE_IF_ALREADY_STARTED" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"Invalid date.", +"The start date was after the end date.", +"Cannot set date to past time", +"A date was used that is past the system \"last\" date.", +"Trying to change start date on a resource that has started." +], +"type": "string" +}, +"distinctError": { +"description": "The reasons for the distinct error", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"DUPLICATE_ELEMENT", +"DUPLICATE_TYPE" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"Duplicate element.", +"Duplicate type." +], +"type": "string" +}, +"headerError": { +"description": "The reasons for the header error.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"INVALID_USER_SELECTED_CUSTOMER_ID", +"INVALID_LOGIN_CUSTOMER_ID" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"The user selected customer ID could not be validated.", +"The login customer ID could not be validated." +], +"type": "string" +}, +"internalError": { +"description": "An unexpected server-side error.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"INTERNAL_ERROR", +"ERROR_CODE_NOT_PUBLISHED", +"TRANSIENT_ERROR", +"DEADLINE_EXCEEDED" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"API encountered unexpected internal error.", +"The intended error code doesn't exist in specified API version. It will be released in a future API version.", +"API encountered an unexpected transient error. The user should retry their request in these cases.", +"The request took longer than a deadline." +], +"type": "string" +}, +"invalidParameterError": { +"description": "The reasons for invalid parameter errors.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"INVALID_CURRENCY_CODE" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"The specified currency code is invalid." +], +"type": "string" +}, +"queryError": { +"description": "An error with the query", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"QUERY_ERROR", +"BAD_ENUM_CONSTANT", +"BAD_ESCAPE_SEQUENCE", +"BAD_FIELD_NAME", +"BAD_LIMIT_VALUE", +"BAD_NUMBER", +"BAD_OPERATOR", +"BAD_PARAMETER_NAME", +"BAD_PARAMETER_VALUE", +"BAD_RESOURCE_TYPE_IN_FROM_CLAUSE", +"BAD_SYMBOL", +"BAD_VALUE", +"DATE_RANGE_TOO_WIDE", +"DATE_RANGE_TOO_NARROW", +"EXPECTED_AND", +"EXPECTED_BY", +"EXPECTED_DIMENSION_FIELD_IN_SELECT_CLAUSE", +"EXPECTED_FILTERS_ON_DATE_RANGE", +"EXPECTED_FROM", +"EXPECTED_LIST", +"EXPECTED_REFERENCED_FIELD_IN_SELECT_CLAUSE", +"EXPECTED_SELECT", +"EXPECTED_SINGLE_VALUE", +"EXPECTED_VALUE_WITH_BETWEEN_OPERATOR", +"INVALID_DATE_FORMAT", +"MISALIGNED_DATE_FOR_FILTER", +"INVALID_STRING_VALUE", +"INVALID_VALUE_WITH_BETWEEN_OPERATOR", +"INVALID_VALUE_WITH_DURING_OPERATOR", +"INVALID_VALUE_WITH_LIKE_OPERATOR", +"OPERATOR_FIELD_MISMATCH", +"PROHIBITED_EMPTY_LIST_IN_CONDITION", +"PROHIBITED_ENUM_CONSTANT", +"PROHIBITED_FIELD_COMBINATION_IN_SELECT_CLAUSE", +"PROHIBITED_FIELD_IN_ORDER_BY_CLAUSE", +"PROHIBITED_FIELD_IN_SELECT_CLAUSE", +"PROHIBITED_FIELD_IN_WHERE_CLAUSE", +"PROHIBITED_RESOURCE_TYPE_IN_FROM_CLAUSE", +"PROHIBITED_RESOURCE_TYPE_IN_SELECT_CLAUSE", +"PROHIBITED_RESOURCE_TYPE_IN_WHERE_CLAUSE", +"PROHIBITED_METRIC_IN_SELECT_OR_WHERE_CLAUSE", +"PROHIBITED_SEGMENT_IN_SELECT_OR_WHERE_CLAUSE", +"PROHIBITED_SEGMENT_WITH_METRIC_IN_SELECT_OR_WHERE_CLAUSE", +"LIMIT_VALUE_TOO_LOW", +"PROHIBITED_NEWLINE_IN_STRING", +"PROHIBITED_VALUE_COMBINATION_IN_LIST", +"PROHIBITED_VALUE_COMBINATION_WITH_BETWEEN_OPERATOR", +"STRING_NOT_TERMINATED", +"TOO_MANY_SEGMENTS", +"UNEXPECTED_END_OF_QUERY", +"UNEXPECTED_FROM_CLAUSE", +"UNRECOGNIZED_FIELD", +"UNEXPECTED_INPUT", +"REQUESTED_METRICS_FOR_MANAGER", +"FILTER_HAS_TOO_MANY_VALUES" +], +"enumDescriptions": [ +"Name unspecified.", +"The received error code is not known in this version.", +"Returned if all other query error reasons are not applicable.", +"A condition used in the query references an invalid enum constant.", +"Query contains an invalid escape sequence.", +"Field name is invalid.", +"Limit value is invalid (for example, not a number)", +"Encountered number can not be parsed.", +"Invalid operator encountered.", +"Parameter unknown or not supported.", +"Parameter have invalid value.", +"Invalid resource type was specified in the FROM clause.", +"Non-ASCII symbol encountered outside of strings.", +"Value is invalid.", +"Date filters fail to restrict date to a range smaller than 31 days. Applicable if the query is segmented by date.", +"Filters on date/week/month/quarter have a start date after end date.", +"Expected AND between values with BETWEEN operator.", +"Expecting ORDER BY to have BY.", +"There was no dimension field selected.", +"Missing filters on date related fields.", +"Missing FROM clause.", +"The operator used in the conditions requires the value to be a list.", +"Fields used in WHERE or ORDER BY clauses are missing from the SELECT clause.", +"SELECT is missing at the beginning of query.", +"A list was passed as a value to a condition whose operator expects a single value.", +"Missing one or both values with BETWEEN operator.", +"Invalid date format. Expected 'YYYY-MM-DD'.", +"Misaligned date value for the filter. The date should be the start of a week/month/quarter if the filtered field is segments.week/segments.month/segments.quarter.", +"Value passed was not a string when it should have been. For example, it was a number or unquoted literal.", +"A String value passed to the BETWEEN operator does not parse as a date.", +"The value passed to the DURING operator is not a Date range literal", +"A value was passed to the LIKE operator.", +"An operator was provided that is inapplicable to the field being filtered.", +"A Condition was found with an empty list.", +"A condition used in the query references an unsupported enum constant.", +"Fields that are not allowed to be selected together were included in the SELECT clause.", +"A field that is not orderable was included in the ORDER BY clause.", +"A field that is not selectable was included in the SELECT clause.", +"A field that is not filterable was included in the WHERE clause.", +"Resource type specified in the FROM clause is not supported by this service.", +"A field that comes from an incompatible resource was included in the SELECT clause.", +"A field that comes from an incompatible resource was included in the WHERE clause.", +"A metric incompatible with the main resource or other selected segmenting resources was included in the SELECT or WHERE clause.", +"A segment incompatible with the main resource or other selected segmenting resources was included in the SELECT or WHERE clause.", +"A segment in the SELECT clause is incompatible with a metric in the SELECT or WHERE clause.", +"The value passed to the limit clause is too low.", +"Query has a string containing a newline character.", +"List contains values of different types.", +"The values passed to the BETWEEN operator are not of the same type.", +"Query contains unterminated string.", +"Too many segments are specified in SELECT clause.", +"Query is incomplete and cannot be parsed.", +"FROM clause cannot be specified in this query.", +"Query contains one or more unrecognized fields.", +"Query has an unexpected extra part.", +"Metrics cannot be requested for a manager account. To retrieve metrics, issue separate requests against each client account under the manager account.", +"The number of values (right-hand-side operands) in a filter exceeds the limit." +], +"type": "string" +}, +"quotaError": { +"description": "An error with the amount of quota remaining.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"RESOURCE_EXHAUSTED", +"RESOURCE_TEMPORARILY_EXHAUSTED" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"Too many requests.", +"Too many requests in a short amount of time." +], +"type": "string" +}, +"requestError": { +"description": "An error caused by the request", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"RESOURCE_NAME_MISSING", +"RESOURCE_NAME_MALFORMED", +"BAD_RESOURCE_ID", +"INVALID_PRODUCT_NAME", +"INVALID_CUSTOMER_ID", +"OPERATION_REQUIRED", +"RESOURCE_NOT_FOUND", +"INVALID_PAGE_TOKEN", +"EXPIRED_PAGE_TOKEN", +"INVALID_PAGE_SIZE", +"REQUIRED_FIELD_MISSING", +"IMMUTABLE_FIELD", +"TOO_MANY_MUTATE_OPERATIONS", +"CANNOT_BE_EXECUTED_BY_MANAGER_ACCOUNT", +"CANNOT_MODIFY_FOREIGN_FIELD", +"INVALID_ENUM_VALUE", +"LOGIN_CUSTOMER_ID_PARAMETER_MISSING", +"LOGIN_OR_LINKED_CUSTOMER_ID_PARAMETER_REQUIRED", +"VALIDATE_ONLY_REQUEST_HAS_PAGE_TOKEN", +"CANNOT_RETURN_SUMMARY_ROW_FOR_REQUEST_WITHOUT_METRICS", +"CANNOT_RETURN_SUMMARY_ROW_FOR_VALIDATE_ONLY_REQUESTS", +"INCONSISTENT_RETURN_SUMMARY_ROW_VALUE", +"TOTAL_RESULTS_COUNT_NOT_ORIGINALLY_REQUESTED", +"RPC_DEADLINE_TOO_SHORT", +"PRODUCT_NOT_SUPPORTED" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"Resource name is required for this request.", +"Resource name provided is malformed.", +"Resource name provided is malformed.", +"Product name is invalid.", +"Customer ID is invalid.", +"Mutate operation should have either create, update, or remove specified.", +"Requested resource not found.", +"Next page token specified in user request is invalid.", +"Next page token specified in user request has expired.", +"Page size specified in user request is invalid.", +"Required field is missing.", +"The field cannot be modified because it's immutable. It's also possible that the field can be modified using 'create' operation but not 'update'.", +"Received too many entries in request.", +"Request cannot be executed by a manager account.", +"Mutate request was attempting to modify a readonly field. For instance, Budget fields can be requested for Ad Group, but are read-only for adGroups:mutate.", +"Enum value is not permitted.", +"The login-customer-id parameter is required for this request.", +"Either login-customer-id or linked-customer-id parameter is required for this request.", +"page_token is set in the validate only request", +"return_summary_row cannot be enabled if request did not select any metrics field.", +"return_summary_row should not be enabled for validate only requests.", +"return_summary_row parameter value should be the same between requests with page_token field set and their original request.", +"The total results count cannot be returned if it was not requested in the original request.", +"Deadline specified by the client was too short.", +"The product associated with the request is not supported for the current request." +], +"type": "string" +}, +"sizeLimitError": { +"description": "The reasons for the size limit error", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"REQUEST_SIZE_LIMIT_EXCEEDED", +"RESPONSE_SIZE_LIMIT_EXCEEDED" +], +"enumDescriptions": [ +"Enum unspecified.", +"The received error code is not known in this version.", +"The number of entries in the request exceeds the system limit, or the contents of the operations exceed transaction limits due to their size or complexity. Try reducing the number of entries per request.", +"The number of entries in the response exceeds the system limit." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Errors__ErrorDetails": { +"description": "Additional error details.", +"id": "GoogleAdsSearchads360V0Errors__ErrorDetails", +"properties": { +"quotaErrorDetails": { +"$ref": "GoogleAdsSearchads360V0Errors__QuotaErrorDetails", +"description": "Details on the quota error, including the scope (account or developer), the rate bucket name and the retry delay." +}, +"unpublishedErrorCode": { +"description": "The error code that should have been returned, but wasn't. This is used when the error code is not published in the client specified version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Errors__ErrorLocation": { +"description": "Describes the part of the request proto that caused the error.", +"id": "GoogleAdsSearchads360V0Errors__ErrorLocation", +"properties": { +"fieldPathElements": { +"description": "A field path that indicates which field was invalid in the request.", +"items": { +"$ref": "GoogleAdsSearchads360V0Errors_ErrorLocation_FieldPathElement" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Errors__QuotaErrorDetails": { +"description": "Additional quota error details when there is QuotaError.", +"id": "GoogleAdsSearchads360V0Errors__QuotaErrorDetails", +"properties": { +"rateName": { +"description": "The high level description of the quota bucket. Examples are \"Get requests for standard access\" or \"Requests per account\".", +"type": "string" +}, +"rateScope": { +"description": "The rate scope of the quota limit.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ACCOUNT", +"DEVELOPER" +], +"enumDescriptions": [ +"Unspecified enum", +"Used for return value only. Represents value unknown in this version.", +"Per customer account quota", +"Per project quota" +], +"type": "string" +}, +"retryDelay": { +"description": "Backoff period that customers should wait before sending next request.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Errors__SearchAds360Error": { +"description": "SearchAds360-specific error.", +"id": "GoogleAdsSearchads360V0Errors__SearchAds360Error", +"properties": { +"details": { +"$ref": "GoogleAdsSearchads360V0Errors__ErrorDetails", +"description": "Additional error details, which are returned by certain error codes. Most error codes do not include details." +}, +"errorCode": { +"$ref": "GoogleAdsSearchads360V0Errors__ErrorCode", +"description": "An enum value that indicates which error occurred." +}, +"location": { +"$ref": "GoogleAdsSearchads360V0Errors__ErrorLocation", +"description": "Describes the part of the request proto that caused the error." +}, +"message": { +"description": "A human-readable description of the error.", +"type": "string" +}, +"trigger": { +"$ref": "GoogleAdsSearchads360V0Common__Value", +"description": "The value that triggered the error." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Errors__SearchAds360Failure": { +"description": "Describes how a Search Ads 360 API call failed. It's returned inside google.rpc.Status.details when a call fails.", +"id": "GoogleAdsSearchads360V0Errors__SearchAds360Failure", +"properties": { +"errors": { +"description": "The list of errors that occurred.", +"items": { +"$ref": "GoogleAdsSearchads360V0Errors__SearchAds360Error" +}, +"type": "array" +}, +"requestId": { +"description": "The unique ID of the request that is used for debugging purposes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversionValue": { +"description": "An automated bidding strategy to help get the most conversion value for your campaigns while spending your budget.", +"id": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversionValue", +"properties": { +"targetRoas": { +"description": "Output only. The target return on ad spend (ROAS) option. If set, the bid strategy will maximize revenue while averaging the target return on ad spend. If the target ROAS is high, the bid strategy may not be able to spend the full budget. If the target ROAS is not set, the bid strategy will aim to achieve the highest possible ROAS for the budget.", +"format": "double", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversions": { +"description": "An automated bidding strategy to help get the most conversions for your campaigns while spending your budget.", +"id": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversions", +"properties": { +"targetCpa": { +"description": "Output only. The target cost per acquisition (CPA) option. This is the average amount that you would like to spend per acquisition.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"targetCpaMicros": { +"description": "Output only. The target cost per acquisition (CPA) option. This is the average amount that you would like to spend per acquisition.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetCpa": { +"description": "An automated bid strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set.", +"id": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetCpa", +"properties": { +"targetCpaMicros": { +"description": "Output only. Average CPA target. This target should be greater than or equal to minimum billable unit based on the currency for the account.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetImpressionShare": { +"description": "An automated bidding strategy that sets bids so that a certain percentage of search ads are shown at the top of the first page (or other targeted location).", +"id": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetImpressionShare", +"properties": { +"cpcBidCeilingMicros": { +"description": "Output only. The highest CPC bid the automated bidding system is permitted to specify. This is a required field entered by the advertiser that sets the ceiling and specified in local micros.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"location": { +"description": "Output only. The targeted location on the search results page.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ANYWHERE_ON_PAGE", +"TOP_OF_PAGE", +"ABSOLUTE_TOP_OF_PAGE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Any location on the web page.", +"Top box of ads.", +"Top slot in the top box of ads." +], +"readOnly": true, +"type": "string" +}, +"locationFractionMicros": { +"description": "The chosen fraction of ads to be shown in the targeted location in micros. For example, 1% equals 10,000.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetRoas": { +"description": "An automated bidding strategy that helps you maximize revenue while averaging a specific target return on ad spend (ROAS).", +"id": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetRoas", +"properties": { +"targetRoas": { +"description": "Output only. The chosen revenue (based on conversion data) per unit of spend.", +"format": "double", +"readOnly": true, +"type": "number" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetSpend": { +"description": "An automated bid strategy that sets your bids to help get as many clicks as possible within your budget.", +"id": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetSpend", +"properties": { +"cpcBidCeilingMicros": { +"description": "Output only. Maximum bid limit that can be set by the bid strategy. The limit applies to all keywords managed by the strategy.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"targetSpendMicros": { +"deprecated": true, +"description": "Output only. The spend target under which to maximize clicks. A TargetSpend bidder will attempt to spend the smaller of this value or the natural throttling spend amount. If not specified, the budget is used as the spend target. This field is deprecated and should no longer be used. See https://ads-developers.googleblog.com/2020/05/reminder-about-sunset-creation-of.html for details.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AdGroupCriterion_PositionEstimates": { +"description": "Estimates for criterion bids at various positions.", +"id": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_PositionEstimates", +"properties": { +"topOfPageCpcMicros": { +"description": "Output only. The estimate of the CPC bid required for ad to be displayed at the top of the first page of search results.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_AdGroupCriterion_QualityInfo": { +"description": "A container for ad group criterion quality information.", +"id": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_QualityInfo", +"properties": { +"qualityScore": { +"description": "Output only. The quality score. This field may not be populated if Google does not have enough information to determine a value.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_Campaign_DynamicSearchAdsSetting": { +"description": "The setting for controlling Dynamic Search Ads (DSA).", +"id": "GoogleAdsSearchads360V0Resources_Campaign_DynamicSearchAdsSetting", +"properties": { +"domainName": { +"description": "Required. The Internet domain name that this setting represents, for example, \"google.com\" or \"www.google.com\".", +"type": "string" +}, +"languageCode": { +"description": "Required. The language code specifying the language of the domain, for example, \"en\".", +"type": "string" +}, +"useSuppliedUrlsOnly": { +"description": "Whether the campaign uses advertiser supplied URLs exclusively.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_Campaign_GeoTargetTypeSetting": { +"description": "Represents a collection of settings related to ads geotargeting.", +"id": "GoogleAdsSearchads360V0Resources_Campaign_GeoTargetTypeSetting", +"properties": { +"negativeGeoTargetType": { +"description": "The setting used for negative geotargeting in this particular campaign.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"PRESENCE_OR_INTEREST", +"PRESENCE" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Specifies that a user is excluded from seeing the ad if they are in, or show interest in, advertiser's excluded locations.", +"Specifies that a user is excluded from seeing the ad if they are in advertiser's excluded locations." +], +"type": "string" +}, +"positiveGeoTargetType": { +"description": "The setting used for positive geotargeting in this particular campaign.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"PRESENCE_OR_INTEREST", +"SEARCH_INTEREST", +"PRESENCE" +], +"enumDescriptions": [ +"Not specified.", +"The value is unknown in this version.", +"Specifies that an ad is triggered if the user is in, or shows interest in, advertiser's targeted locations.", +"Specifies that an ad is triggered if the user searches for advertiser's targeted locations. This can only be used with Search and standard Shopping campaigns.", +"Specifies that an ad is triggered if the user is in or regularly in advertiser's targeted locations." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_Campaign_NetworkSettings": { +"description": "The network settings for the campaign.", +"id": "GoogleAdsSearchads360V0Resources_Campaign_NetworkSettings", +"properties": { +"targetContentNetwork": { +"description": "Whether ads will be served on specified placements in the Google Display Network. Placements are specified using the Placement criterion.", +"type": "boolean" +}, +"targetGoogleSearch": { +"description": "Whether ads will be served with google.com search results.", +"type": "boolean" +}, +"targetPartnerSearchNetwork": { +"description": "Whether ads will be served on the Google Partner Network. This is available only to some select Google partner accounts.", +"type": "boolean" +}, +"targetSearchNetwork": { +"description": "Whether ads will be served on partner sites in the Google Search Network (requires `target_google_search` to also be `true`).", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_Campaign_OptimizationGoalSetting": { +"description": "Optimization goal setting for this campaign, which includes a set of optimization goal types.", +"id": "GoogleAdsSearchads360V0Resources_Campaign_OptimizationGoalSetting", +"properties": { +"optimizationGoalTypes": { +"description": "The list of optimization goal types.", +"items": { +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"CALL_CLICKS", +"DRIVING_DIRECTIONS", +"APP_PRE_REGISTRATION" +], +"enumDescriptions": [ +"Not specified.", +"Used as a return value only. Represents value unknown in this version.", +"Optimize for call clicks. Call click conversions are times people selected 'Call' to contact a store after viewing an ad.", +"Optimize for driving directions. Driving directions conversions are times people selected 'Get directions' to navigate to a store after viewing an ad.", +"Optimize for pre-registration. Pre-registration conversions are the number of pre-registration signups to receive a notification when the app is released." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_Campaign_SelectiveOptimization": { +"description": "Selective optimization setting for this campaign, which includes a set of conversion actions to optimize this campaign towards. This feature only applies to app campaigns that use MULTI_CHANNEL as AdvertisingChannelType and APP_CAMPAIGN or APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType.", +"id": "GoogleAdsSearchads360V0Resources_Campaign_SelectiveOptimization", +"properties": { +"conversionActions": { +"description": "The selected set of conversion actions for optimizing this campaign.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_Campaign_ShoppingSetting": { +"description": "The setting for Shopping campaigns. Defines the universe of products that can be advertised by the campaign, and how this campaign interacts with other Shopping campaigns.", +"id": "GoogleAdsSearchads360V0Resources_Campaign_ShoppingSetting", +"properties": { +"campaignPriority": { +"description": "Priority of the campaign. Campaigns with numerically higher priorities take precedence over those with lower priorities. This field is required for Shopping campaigns, with values between 0 and 2, inclusive. This field is optional for Smart Shopping campaigns, but must be equal to 3 if set.", +"format": "int32", +"type": "integer" +}, +"enableLocal": { +"description": "Whether to include local products.", +"type": "boolean" +}, +"feedLabel": { +"description": "Feed label of products to include in the campaign. Only one of feed_label or sales_country can be set. If used instead of sales_country, the feed_label field accepts country codes in the same format for example: 'XX'. Otherwise can be any string used for feed label in Google Merchant Center.", +"type": "string" +}, +"merchantId": { +"description": "Immutable. ID of the Merchant Center account. This field is required for create operations. This field is immutable for Shopping campaigns.", +"format": "int64", +"type": "string" +}, +"salesCountry": { +"description": "Sales country of products to include in the campaign. ", +"type": "string" +}, +"useVehicleInventory": { +"description": "Immutable. Whether to target Vehicle Listing inventory.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_Campaign_TrackingSetting": { +"description": "Campaign-level settings for tracking information.", +"id": "GoogleAdsSearchads360V0Resources_Campaign_TrackingSetting", +"properties": { +"trackingUrl": { +"description": "Output only. The url used for dynamic tracking.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ConversionAction_AttributionModelSettings": { +"description": "Settings related to this conversion action's attribution model.", +"id": "GoogleAdsSearchads360V0Resources_ConversionAction_AttributionModelSettings", +"properties": { +"attributionModel": { +"description": "The attribution model type of this conversion action.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"EXTERNAL", +"GOOGLE_ADS_LAST_CLICK", +"GOOGLE_SEARCH_ATTRIBUTION_FIRST_CLICK", +"GOOGLE_SEARCH_ATTRIBUTION_LINEAR", +"GOOGLE_SEARCH_ATTRIBUTION_TIME_DECAY", +"GOOGLE_SEARCH_ATTRIBUTION_POSITION_BASED", +"GOOGLE_SEARCH_ATTRIBUTION_DATA_DRIVEN" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Uses external attribution.", +"Attributes all credit for a conversion to its last click.", +"Attributes all credit for a conversion to its first click using Google Search attribution.", +"Attributes credit for a conversion equally across all of its clicks using Google Search attribution.", +"Attributes exponentially more credit for a conversion to its more recent clicks using Google Search attribution (half-life is 1 week).", +"Attributes 40% of the credit for a conversion to its first and last clicks. Remaining 20% is evenly distributed across all other clicks. This uses Google Search attribution.", +"Flexible model that uses machine learning to determine the appropriate distribution of credit among clicks using Google Search attribution." +], +"type": "string" +}, +"dataDrivenModelStatus": { +"description": "Output only. The status of the data-driven attribution model for the conversion action.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"AVAILABLE", +"STALE", +"EXPIRED", +"NEVER_GENERATED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The data driven model is available.", +"The data driven model is stale. It hasn't been updated for at least 7 days. It is still being used, but will become expired if it does not get updated for 30 days.", +"The data driven model expired. It hasn't been updated for at least 30 days and cannot be used. Most commonly this is because there hasn't been the required number of events in a recent 30-day period.", +"The data driven model has never been generated. Most commonly this is because there has never been the required number of events in any 30-day period." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ConversionAction_FloodlightSettings": { +"description": "Settings related to a Floodlight conversion action.", +"id": "GoogleAdsSearchads360V0Resources_ConversionAction_FloodlightSettings", +"properties": { +"activityGroupTag": { +"description": "Output only. String used to identify a Floodlight activity group when reporting conversions.", +"readOnly": true, +"type": "string" +}, +"activityId": { +"description": "Output only. ID of the Floodlight activity in DoubleClick Campaign Manager (DCM).", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"activityTag": { +"description": "Output only. String used to identify a Floodlight activity when reporting conversions.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ConversionAction_ValueSettings": { +"description": "Settings related to the value for conversion events associated with this conversion action.", +"id": "GoogleAdsSearchads360V0Resources_ConversionAction_ValueSettings", +"properties": { +"alwaysUseDefaultValue": { +"description": "Controls whether the default value and default currency code are used in place of the value and currency code specified in conversion events for this conversion action.", +"type": "boolean" +}, +"defaultCurrencyCode": { +"description": "The currency code to use when conversion events for this conversion action are sent with an invalid or missing currency code, or when this conversion action is configured to always use the default value.", +"type": "string" +}, +"defaultValue": { +"description": "The value to use when conversion events for this conversion action are sent with an invalid, disallowed or missing value, or when this conversion action is configured to always use the default value.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ConversionCustomVariable_FloodlightConversionCustomVariableInfo": { +"description": "Information for Search Ads 360 Floodlight Conversion Custom Variables.", +"id": "GoogleAdsSearchads360V0Resources_ConversionCustomVariable_FloodlightConversionCustomVariableInfo", +"properties": { +"floodlightVariableDataType": { +"description": "Output only. Floodlight variable data type defined in Search Ads 360.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"NUMBER", +"STRING" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Represents a floodlight variable of \"Number\" type. This variable may be assigned to floodlight variables of DIMENSION or METRIC types.", +"Represents a floodlight variable of \"String\" type. This variable may be assigned to floodlight variables of DIMENSION type." +], +"readOnly": true, +"type": "string" +}, +"floodlightVariableType": { +"description": "Output only. Floodlight variable type defined in Search Ads 360.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"DIMENSION", +"METRIC", +"UNSET" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Dimension floodlight variable type.", +"Metric floodlight variable type.", +"Floodlight variable type is unset." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductBiddingCategory": { +"description": "One element of a bidding category at a certain level. Top-level categories are at level 1, their children at level 2, and so on. We currently support up to 5 levels. The user must specify a dimension type that indicates the level of the category. All cases of the same subdivision must have the same dimension type (category level).", +"id": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductBiddingCategory", +"properties": { +"id": { +"description": "ID of the product bidding category. This ID is equivalent to the google_product_category ID as described in this article: https://support.google.com/merchants/answer/6324436", +"format": "int64", +"type": "string" +}, +"level": { +"description": "Indicates the level of the category in the taxonomy.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"LEVEL1", +"LEVEL2", +"LEVEL3", +"LEVEL4", +"LEVEL5" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Level 1.", +"Level 2.", +"Level 3.", +"Level 4.", +"Level 5." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductBrand": { +"description": "Brand of the product.", +"id": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductBrand", +"properties": { +"value": { +"description": "String value of the product brand.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductChannel": { +"description": "Locality of a product offer.", +"id": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductChannel", +"properties": { +"channel": { +"description": "Value of the locality.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ONLINE", +"LOCAL" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The item is sold online.", +"The item is sold in local stores." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductCondition": { +"description": "Condition of a product offer.", +"id": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductCondition", +"properties": { +"condition": { +"description": "Value of the condition.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"NEW", +"REFURBISHED", +"USED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The product condition is new.", +"The product condition is refurbished.", +"The product condition is used." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductCustomAttribute": { +"description": "Custom attribute of a product offer.", +"id": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductCustomAttribute", +"properties": { +"index": { +"description": "Indicates the index of the custom attribute.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"INDEX0", +"INDEX1", +"INDEX2", +"INDEX3", +"INDEX4" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"First listing group filter custom attribute.", +"Second listing group filter custom attribute.", +"Third listing group filter custom attribute.", +"Fourth listing group filter custom attribute.", +"Fifth listing group filter custom attribute." +], +"type": "string" +}, +"value": { +"description": "String value of the product custom attribute.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductItemId": { +"description": "Item id of a product offer.", +"id": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductItemId", +"properties": { +"value": { +"description": "Value of the id.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductType": { +"description": "Type of a product offer.", +"id": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductType", +"properties": { +"level": { +"description": "Level of the type.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"LEVEL1", +"LEVEL2", +"LEVEL3", +"LEVEL4", +"LEVEL5" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Level 1.", +"Level 2.", +"Level 3.", +"Level 4.", +"Level 5." +], +"type": "string" +}, +"value": { +"description": "Value of the type.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AccessibleBiddingStrategy": { +"description": "Represents a view of BiddingStrategies owned by and shared with the customer. In contrast to BiddingStrategy, this resource includes strategies owned by managers of the customer and shared with this customer - in addition to strategies owned by this customer. This resource does not provide metrics and only exposes a limited subset of the BiddingStrategy attributes.", +"id": "GoogleAdsSearchads360V0Resources__AccessibleBiddingStrategy", +"properties": { +"id": { +"description": "Output only. The ID of the bidding strategy.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"maximizeConversionValue": { +"$ref": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversionValue", +"description": "Output only. An automated bidding strategy to help get the most conversion value for your campaigns while spending your budget.", +"readOnly": true +}, +"maximizeConversions": { +"$ref": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_MaximizeConversions", +"description": "Output only. An automated bidding strategy to help get the most conversions for your campaigns while spending your budget.", +"readOnly": true +}, +"name": { +"description": "Output only. The name of the bidding strategy.", +"readOnly": true, +"type": "string" +}, +"ownerCustomerId": { +"description": "Output only. The ID of the Customer which owns the bidding strategy.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"ownerDescriptiveName": { +"description": "Output only. descriptive_name of the Customer which owns the bidding strategy.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the accessible bidding strategy. AccessibleBiddingStrategy resource names have the form: `customers/{customer_id}/accessibleBiddingStrategies/{bidding_strategy_id}`", +"readOnly": true, +"type": "string" +}, +"targetCpa": { +"$ref": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetCpa", +"description": "Output only. A bidding strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set.", +"readOnly": true +}, +"targetImpressionShare": { +"$ref": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetImpressionShare", +"description": "Output only. A bidding strategy that automatically optimizes towards a chosen percentage of impressions.", +"readOnly": true +}, +"targetRoas": { +"$ref": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetRoas", +"description": "Output only. A bidding strategy that helps you maximize revenue while averaging a specific target Return On Ad Spend (ROAS).", +"readOnly": true +}, +"targetSpend": { +"$ref": "GoogleAdsSearchads360V0Resources_AccessibleBiddingStrategy_TargetSpend", +"description": "Output only. A bid strategy that sets your bids to help get as many clicks as possible within your budget.", +"readOnly": true +}, +"type": { +"description": "Output only. The type of the bidding strategy.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"COMMISSION", +"ENHANCED_CPC", +"INVALID", +"MANUAL_CPA", +"MANUAL_CPC", +"MANUAL_CPM", +"MANUAL_CPV", +"MAXIMIZE_CONVERSIONS", +"MAXIMIZE_CONVERSION_VALUE", +"PAGE_ONE_PROMOTED", +"PERCENT_CPC", +"TARGET_CPA", +"TARGET_CPM", +"TARGET_IMPRESSION_SHARE", +"TARGET_OUTRANK_SHARE", +"TARGET_ROAS", +"TARGET_SPEND" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Commission is an automatic bidding strategy in which the advertiser pays a certain portion of the conversion value.", +"Enhanced CPC is a bidding strategy that raises bids for clicks that seem more likely to lead to a conversion and lowers them for clicks where they seem less likely.", +"Used for return value only. Indicates that a campaign does not have a bidding strategy. This prevents the campaign from serving. For example, a campaign may be attached to a manager bidding strategy and the serving account is subsequently unlinked from the manager account. In this case the campaign will automatically be detached from the now inaccessible manager bidding strategy and transition to the INVALID bidding strategy type.", +"Manual bidding strategy that allows advertiser to set the bid per advertiser-specified action.", +"Manual click based bidding where user pays per click.", +"Manual impression based bidding where user pays per thousand impressions.", +"A bidding strategy that pays a configurable amount per video view.", +"A bidding strategy that automatically maximizes number of conversions given a daily budget.", +"An automated bidding strategy that automatically sets bids to maximize revenue while spending your budget.", +"Page-One Promoted bidding scheme, which sets max cpc bids to target impressions on page one or page one promoted slots on google.com. This enum value is deprecated.", +"Percent Cpc is bidding strategy where bids are a fraction of the advertised price for some good or service.", +"Target CPA is an automated bid strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set.", +"Target CPM is an automated bid strategy that sets bids to help get as many impressions as possible at the target cost per one thousand impressions (CPM) you set.", +"An automated bidding strategy that sets bids so that a certain percentage of search ads are shown at the top of the first page (or other targeted location).", +"Target Outrank Share is an automated bidding strategy that sets bids based on the target fraction of auctions where the advertiser should outrank a specific competitor. This enum value is deprecated.", +"Target ROAS is an automated bidding strategy that helps you maximize revenue while averaging a specific target Return On Average Spend (ROAS).", +"Target Spend is an automated bid strategy that sets your bids to help get as many clicks as possible within your budget." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Ad": { +"description": "An ad.", +"id": "GoogleAdsSearchads360V0Resources__Ad", +"properties": { +"displayUrl": { +"description": "The URL that appears in the ad description for some ad formats.", +"type": "string" +}, +"expandedDynamicSearchAd": { +"$ref": "GoogleAdsSearchads360V0Common__SearchAds360ExpandedDynamicSearchAdInfo", +"description": "Immutable. Details pertaining to an expanded dynamic search ad." +}, +"expandedTextAd": { +"$ref": "GoogleAdsSearchads360V0Common__SearchAds360ExpandedTextAdInfo", +"description": "Immutable. Details pertaining to an expanded text ad." +}, +"finalUrls": { +"description": "The list of possible final URLs after all cross-domain redirects for the ad.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Output only. The ID of the ad.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The name of the ad. This is only used to be able to identify the ad. It does not need to be unique and does not affect the served ad. The name field is currently only supported for DisplayUploadAd, ImageAd, ShoppingComparisonListingAd and VideoAd.", +"type": "string" +}, +"productAd": { +"$ref": "GoogleAdsSearchads360V0Common__SearchAds360ProductAdInfo", +"description": "Immutable. Details pertaining to a product ad." +}, +"resourceName": { +"description": "Immutable. The resource name of the ad. Ad resource names have the form: `customers/{customer_id}/ads/{ad_id}`", +"type": "string" +}, +"responsiveSearchAd": { +"$ref": "GoogleAdsSearchads360V0Common__SearchAds360ResponsiveSearchAdInfo", +"description": "Immutable. Details pertaining to a responsive search ad." +}, +"textAd": { +"$ref": "GoogleAdsSearchads360V0Common__SearchAds360TextAdInfo", +"description": "Immutable. Details pertaining to a text ad." +}, +"type": { +"description": "Output only. The type of ad.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"TEXT_AD", +"EXPANDED_TEXT_AD", +"CALL_ONLY_AD", +"EXPANDED_DYNAMIC_SEARCH_AD", +"HOTEL_AD", +"SHOPPING_SMART_AD", +"SHOPPING_PRODUCT_AD", +"VIDEO_AD", +"GMAIL_AD", +"IMAGE_AD", +"RESPONSIVE_SEARCH_AD", +"LEGACY_RESPONSIVE_DISPLAY_AD", +"APP_AD", +"LEGACY_APP_INSTALL_AD", +"RESPONSIVE_DISPLAY_AD", +"LOCAL_AD", +"HTML5_UPLOAD_AD", +"DYNAMIC_HTML5_AD", +"APP_ENGAGEMENT_AD", +"SHOPPING_COMPARISON_LISTING_AD", +"VIDEO_BUMPER_AD", +"VIDEO_NON_SKIPPABLE_IN_STREAM_AD", +"VIDEO_OUTSTREAM_AD", +"VIDEO_TRUEVIEW_DISCOVERY_AD", +"VIDEO_TRUEVIEW_IN_STREAM_AD", +"VIDEO_RESPONSIVE_AD", +"SMART_CAMPAIGN_AD", +"APP_PRE_REGISTRATION_AD", +"DISCOVERY_MULTI_ASSET_AD", +"DISCOVERY_CAROUSEL_AD", +"TRAVEL_AD", +"DISCOVERY_VIDEO_RESPONSIVE_AD" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"The ad is a text ad.", +"The ad is an expanded text ad.", +"The ad is a call only ad.", +"The ad is an expanded dynamic search ad.", +"The ad is a hotel ad.", +"The ad is a Smart Shopping ad.", +"The ad is a standard Shopping ad.", +"The ad is a video ad.", +"This ad is a Gmail ad.", +"This ad is an Image ad.", +"The ad is a responsive search ad.", +"The ad is a legacy responsive display ad.", +"The ad is an app ad.", +"The ad is a legacy app install ad.", +"The ad is a responsive display ad.", +"The ad is a local ad.", +"The ad is a display upload ad with the HTML5_UPLOAD_AD product type.", +"The ad is a display upload ad with one of the DYNAMIC_HTML5_* product types.", +"The ad is an app engagement ad.", +"The ad is a Shopping Comparison Listing ad.", +"Video bumper ad.", +"Video non-skippable in-stream ad.", +"Video outstream ad.", +"Video TrueView in-display ad.", +"Video TrueView in-stream ad.", +"Video responsive ad.", +"Smart campaign ad.", +"Universal app pre-registration ad.", +"Discovery multi asset ad.", +"Discovery carousel ad.", +"Travel ad.", +"Discovery video responsive ad." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroup": { +"description": "An ad group.", +"id": "GoogleAdsSearchads360V0Resources__AdGroup", +"properties": { +"adRotationMode": { +"description": "The ad rotation mode of the ad group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"OPTIMIZE", +"ROTATE_FOREVER" +], +"enumDescriptions": [ +"The ad rotation mode has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"Optimize ad group ads based on clicks or conversions.", +"Rotate evenly forever." +], +"type": "string" +}, +"cpcBidMicros": { +"description": "The maximum CPC (cost-per-click) bid.", +"format": "int64", +"type": "string" +}, +"creationTime": { +"description": "Output only. The timestamp when this ad_group was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", +"readOnly": true, +"type": "string" +}, +"endDate": { +"description": "Output only. Date when the ad group ends serving ads. By default, the ad group ends on the ad group's end date. If this field is set, then the ad group ends at the end of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14", +"readOnly": true, +"type": "string" +}, +"engineId": { +"description": "Output only. ID of the ad group in the external engine account. This field is for non-Google Ads account only, for example, Yahoo Japan, Microsoft, Baidu etc. For Google Ads entity, use \"ad_group.id\" instead.", +"readOnly": true, +"type": "string" +}, +"engineStatus": { +"description": "Output only. The Engine Status for ad group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"AD_GROUP_ELIGIBLE", +"AD_GROUP_EXPIRED", +"AD_GROUP_REMOVED", +"AD_GROUP_DRAFT", +"AD_GROUP_PAUSED", +"AD_GROUP_SERVING", +"AD_GROUP_SUBMITTED", +"CAMPAIGN_PAUSED", +"ACCOUNT_PAUSED" +], +"enumDeprecated": [ +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Deprecated. Do not use.", +"No ads are running for this ad group, because the ad group's end date has passed.", +"The ad group has been deleted.", +"No ads are running for this ad group because the associated ad group is still in draft form.", +"The ad group has been paused.", +"The ad group is active and currently serving ads.", +"The ad group has been submitted (Microsoft Bing Ads legacy status).", +"No ads are running for this ad group, because the campaign has been paused.", +"No ads are running for this ad group, because the account has been paused." +], +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. The ID of the ad group.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"labels": { +"description": "Output only. The resource names of labels attached to this ad group.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"languageCode": { +"description": "Output only. The language of the ads and keywords in an ad group. This field is only available for Microsoft Advertising accounts. More details: https://docs.microsoft.com/en-us/advertising/guides/ad-languages?view=bingads-13#adlanguage", +"readOnly": true, +"type": "string" +}, +"lastModifiedTime": { +"description": "Output only. The datetime when this ad group was last modified. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The name of the ad group. This field is required and should not be empty when creating new ad groups. It must contain fewer than 255 UTF-8 full-width characters. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group. Ad group resource names have the form: `customers/{customer_id}/adGroups/{ad_group_id}`", +"type": "string" +}, +"startDate": { +"description": "Output only. Date when this ad group starts serving ads. By default, the ad group starts now or the ad group's start date, whichever is later. If this field is set, then the ad group starts at the beginning of the specified date in the customer's time zone. This field is only available for Microsoft Advertising and Facebook gateway accounts. Format: YYYY-MM-DD Example: 2019-03-14", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "The status of the ad group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"PAUSED", +"REMOVED" +], +"enumDescriptions": [ +"The status has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"The ad group is enabled.", +"The ad group is paused.", +"The ad group is removed." +], +"type": "string" +}, +"targetingSetting": { +"$ref": "GoogleAdsSearchads360V0Common__TargetingSetting", +"description": "Setting for targeting related features." +}, +"type": { +"description": "Immutable. The type of the ad group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SEARCH_STANDARD", +"DISPLAY_STANDARD", +"SHOPPING_PRODUCT_ADS", +"SHOPPING_SHOWCASE_ADS", +"HOTEL_ADS", +"SHOPPING_SMART_ADS", +"VIDEO_BUMPER", +"VIDEO_TRUE_VIEW_IN_STREAM", +"VIDEO_TRUE_VIEW_IN_DISPLAY", +"VIDEO_NON_SKIPPABLE_IN_STREAM", +"VIDEO_OUTSTREAM", +"SEARCH_DYNAMIC_ADS", +"SHOPPING_COMPARISON_LISTING_ADS", +"PROMOTED_HOTEL_ADS", +"VIDEO_RESPONSIVE", +"VIDEO_EFFICIENT_REACH", +"SMART_CAMPAIGN_ADS", +"TRAVEL_ADS" +], +"enumDescriptions": [ +"The type has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"The default ad group type for Search campaigns.", +"The default ad group type for Display campaigns.", +"The ad group type for Shopping campaigns serving standard product ads.", +"The type for ad groups that are limited to serving Showcase or Merchant ads in Shopping results.", +"The default ad group type for Hotel campaigns.", +"The type for ad groups in Smart Shopping campaigns.", +"Short unskippable in-stream video ads.", +"TrueView (skippable) in-stream video ads.", +"TrueView in-display video ads.", +"Unskippable in-stream video ads.", +"Outstream video ads.", +"Ad group type for Dynamic Search Ads ad groups.", +"The type for ad groups in Shopping Comparison Listing campaigns.", +"The ad group type for Promoted Hotel ad groups.", +"Video responsive ad groups.", +"Video efficient reach ad groups.", +"Ad group type for Smart campaigns.", +"Ad group type for Travel campaigns." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupAd": { +"description": "An ad group ad.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupAd", +"properties": { +"ad": { +"$ref": "GoogleAdsSearchads360V0Resources__Ad", +"description": "Immutable. The ad." +}, +"creationTime": { +"description": "Output only. The timestamp when this ad_group_ad was created. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"engineId": { +"description": "Output only. ID of the ad in the external engine account. This field is for SearchAds 360 account only, for example, Yahoo Japan, Microsoft, Baidu etc. For non-SearchAds 360 entity, use \"ad_group_ad.ad.id\" instead.", +"readOnly": true, +"type": "string" +}, +"engineStatus": { +"description": "Output only. Additional status of the ad in the external engine account. Possible statuses (depending on the type of external account) include active, eligible, pending review, etc.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"AD_GROUP_AD_ELIGIBLE", +"AD_GROUP_AD_INAPPROPRIATE_FOR_CAMPAIGN", +"AD_GROUP_AD_MOBILE_URL_UNDER_REVIEW", +"AD_GROUP_AD_PARTIALLY_INVALID", +"AD_GROUP_AD_TO_BE_ACTIVATED", +"AD_GROUP_AD_NOT_REVIEWED", +"AD_GROUP_AD_ON_HOLD", +"AD_GROUP_AD_PAUSED", +"AD_GROUP_AD_REMOVED", +"AD_GROUP_AD_PENDING_REVIEW", +"AD_GROUP_AD_UNDER_REVIEW", +"AD_GROUP_AD_APPROVED", +"AD_GROUP_AD_DISAPPROVED", +"AD_GROUP_AD_SERVING", +"AD_GROUP_AD_ACCOUNT_PAUSED", +"AD_GROUP_AD_CAMPAIGN_PAUSED", +"AD_GROUP_AD_AD_GROUP_PAUSED" +], +"enumDeprecated": [ +false, +false, +true, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"No value has been specified.", +"Used for return value only. Represents value unknown in this version.", +"Deprecated. Do not use.", +"Baidu: Creative was not approved.", +"Baidu: Mobile URL in process to be reviewed.", +"Baidu: Creative is invalid on mobile device but valid on desktop.", +"Baidu: Creative is ready for activation.", +"Baidu: Creative not reviewed.", +"Deprecated. Do not use. Previously used by Gemini", +"Creative has been paused.", +"Creative has been removed.", +"Creative is pending review.", +"Creative is under review.", +"Creative has been approved.", +"Creative has been disapproved.", +"Creative is serving.", +"Creative has been paused because the account is paused.", +"Creative has been paused because the campaign is paused.", +"Creative has been paused because the ad group is paused." +], +"readOnly": true, +"type": "string" +}, +"labels": { +"description": "Output only. The resource names of labels attached to this ad group ad.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"lastModifiedTime": { +"description": "Output only. The datetime when this ad group ad was last modified. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the ad. Ad group ad resource names have the form: `customers/{customer_id}/adGroupAds/{ad_group_id}~{ad_id}`", +"type": "string" +}, +"status": { +"description": "The status of the ad.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"PAUSED", +"REMOVED" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"The ad group ad is enabled.", +"The ad group ad is paused.", +"The ad group ad is removed." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupAdLabel": { +"description": "A relationship between an ad group ad and a label.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupAdLabel", +"properties": { +"adGroupAd": { +"description": "Immutable. The ad group ad to which the label is attached.", +"type": "string" +}, +"label": { +"description": "Immutable. The label assigned to the ad group ad.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group ad label. Ad group ad label resource names have the form: `customers/{customer_id}/adGroupAdLabels/{ad_group_id}~{ad_id}~{label_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupAsset": { +"description": "A link between an ad group and an asset.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupAsset", +"properties": { +"adGroup": { +"description": "Required. Immutable. The ad group to which the asset is linked.", +"type": "string" +}, +"asset": { +"description": "Required. Immutable. The asset which is linked to the ad group.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group asset. AdGroupAsset resource names have the form: `customers/{customer_id}/adGroupAssets/{ad_group_id}~{asset_id}~{field_type}`", +"type": "string" +}, +"status": { +"description": "Status of the ad group asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED", +"PAUSED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Asset link is enabled.", +"Asset link has been removed.", +"Asset link is paused." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupAssetSet": { +"description": "AdGroupAssetSet is the linkage between an ad group and an asset set. Creating an AdGroupAssetSet links an asset set with an ad group.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupAssetSet", +"properties": { +"adGroup": { +"description": "Immutable. The ad group to which this asset set is linked.", +"type": "string" +}, +"assetSet": { +"description": "Immutable. The asset set which is linked to the ad group.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group asset set. Ad group asset set resource names have the form: `customers/{customer_id}/adGroupAssetSets/{ad_group_id}~{asset_set_id}`", +"type": "string" +}, +"status": { +"description": "Output only. The status of the ad group asset set. Read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED" +], +"enumDescriptions": [ +"The status has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"The linkage between asset set and its container is enabled.", +"The linkage between asset set and its container is removed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupAudienceView": { +"description": "An ad group audience view. Includes performance data from interests and remarketing lists for Display Network and YouTube Network ads, and remarketing lists for search ads (RLSA), aggregated at the audience level.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupAudienceView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the ad group audience view. Ad group audience view resource names have the form: `customers/{customer_id}/adGroupAudienceViews/{ad_group_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupBidModifier": { +"description": "Represents an ad group bid modifier.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupBidModifier", +"properties": { +"bidModifier": { +"description": "The modifier for the bid when the criterion matches. The modifier must be in the range: 0.1 - 10.0. The range is 1.0 - 6.0 for PreferredContent. Use 0 to opt out of a Device type.", +"format": "double", +"type": "number" +}, +"device": { +"$ref": "GoogleAdsSearchads360V0Common__DeviceInfo", +"description": "Immutable. A device criterion." +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group bid modifier. Ad group bid modifier resource names have the form: `customers/{customer_id}/adGroupBidModifiers/{ad_group_id}~{criterion_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupCriterion": { +"description": "An ad group criterion. The ad_group_criterion report only returns criteria that were explicitly added to the ad group.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupCriterion", +"properties": { +"adGroup": { +"description": "Immutable. The ad group to which the criterion belongs.", +"type": "string" +}, +"ageRange": { +"$ref": "GoogleAdsSearchads360V0Common__AgeRangeInfo", +"description": "Immutable. Age range." +}, +"bidModifier": { +"description": "The modifier for the bid when the criterion matches. The modifier must be in the range: 0.1 - 10.0. Most targetable criteria types support modifiers.", +"format": "double", +"type": "number" +}, +"cpcBidMicros": { +"description": "The CPC (cost-per-click) bid.", +"format": "int64", +"type": "string" +}, +"creationTime": { +"description": "Output only. The timestamp when this ad group criterion was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", +"readOnly": true, +"type": "string" +}, +"criterionId": { +"description": "Output only. The ID of the criterion.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"effectiveCpcBidMicros": { +"description": "Output only. The effective CPC (cost-per-click) bid.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"engineId": { +"description": "Output only. ID of the ad group criterion in the external engine account. This field is for non-Google Ads account only, for example, Yahoo Japan, Microsoft, Baidu etc. For Google Ads entity, use \"ad_group_criterion.criterion_id\" instead.", +"readOnly": true, +"type": "string" +}, +"engineStatus": { +"description": "Output only. The Engine Status for ad group criterion.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"AD_GROUP_CRITERION_ELIGIBLE", +"AD_GROUP_CRITERION_INAPPROPRIATE_FOR_CAMPAIGN", +"AD_GROUP_CRITERION_INVALID_MOBILE_SEARCH", +"AD_GROUP_CRITERION_INVALID_PC_SEARCH", +"AD_GROUP_CRITERION_INVALID_SEARCH", +"AD_GROUP_CRITERION_LOW_SEARCH_VOLUME", +"AD_GROUP_CRITERION_MOBILE_URL_UNDER_REVIEW", +"AD_GROUP_CRITERION_PARTIALLY_INVALID", +"AD_GROUP_CRITERION_TO_BE_ACTIVATED", +"AD_GROUP_CRITERION_UNDER_REVIEW", +"AD_GROUP_CRITERION_NOT_REVIEWED", +"AD_GROUP_CRITERION_ON_HOLD", +"AD_GROUP_CRITERION_PENDING_REVIEW", +"AD_GROUP_CRITERION_PAUSED", +"AD_GROUP_CRITERION_REMOVED", +"AD_GROUP_CRITERION_APPROVED", +"AD_GROUP_CRITERION_DISAPPROVED", +"AD_GROUP_CRITERION_SERVING", +"AD_GROUP_CRITERION_ACCOUNT_PAUSED" +], +"enumDeprecated": [ +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Deprecated. Do not use.", +"Baidu: Bid or quality too low to be displayed.", +"Baidu: Bid or quality too low for mobile, but eligible to display for desktop.", +"Baidu: Bid or quality too low for desktop, but eligible to display for mobile.", +"Baidu: Bid or quality too low to be displayed.", +"Baidu: Paused by Baidu due to low search volume.", +"Baidu: Mobile URL in process to be reviewed.", +"Baidu: The landing page for one device is invalid, while the landing page for the other device is valid.", +"Baidu: Keyword has been created and paused by Baidu account management, and is now ready for you to activate it.", +"Baidu: In process to be reviewed by Baidu. Gemini: Criterion under review.", +"Baidu: Criterion to be reviewed.", +"Deprecated. Do not use. Previously used by Gemini", +"Y!J : Criterion pending review", +"Criterion has been paused.", +"Criterion has been removed.", +"Criterion has been approved.", +"Criterion has been disapproved.", +"Criterion is active and serving.", +"Criterion has been paused since the account is paused." +], +"readOnly": true, +"type": "string" +}, +"finalUrlSuffix": { +"description": "URL template for appending params to final URL.", +"type": "string" +}, +"finalUrls": { +"description": "The list of possible final URLs after all cross-domain redirects for the ad.", +"items": { +"type": "string" +}, +"type": "array" +}, +"gender": { +"$ref": "GoogleAdsSearchads360V0Common__GenderInfo", +"description": "Immutable. Gender." +}, +"keyword": { +"$ref": "GoogleAdsSearchads360V0Common__KeywordInfo", +"description": "Immutable. Keyword." +}, +"labels": { +"description": "Output only. The resource names of labels attached to this ad group criterion.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"lastModifiedTime": { +"description": "Output only. The datetime when this ad group criterion was last modified. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"listingGroup": { +"$ref": "GoogleAdsSearchads360V0Common__ListingGroupInfo", +"description": "Immutable. Listing group." +}, +"location": { +"$ref": "GoogleAdsSearchads360V0Common__LocationInfo", +"description": "Immutable. Location." +}, +"negative": { +"description": "Immutable. Whether to target (`false`) or exclude (`true`) the criterion. This field is immutable. To switch a criterion from positive to negative, remove then re-add it.", +"type": "boolean" +}, +"positionEstimates": { +"$ref": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_PositionEstimates", +"description": "Output only. Estimates for criterion bids at various positions.", +"readOnly": true +}, +"qualityInfo": { +"$ref": "GoogleAdsSearchads360V0Resources_AdGroupCriterion_QualityInfo", +"description": "Output only. Information regarding the quality of the criterion.", +"readOnly": true +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group criterion. Ad group criterion resource names have the form: `customers/{customer_id}/adGroupCriteria/{ad_group_id}~{criterion_id}`", +"type": "string" +}, +"status": { +"description": "The status of the criterion. This is the status of the ad group criterion entity, set by the client. Note: UI reports may incorporate additional information that affects whether a criterion is eligible to run. In some cases a criterion that's REMOVED in the API can still show as enabled in the UI. For example, campaigns by default show to users of all age ranges unless excluded. The UI will show each age range as \"enabled\", since they're eligible to see the ads; but AdGroupCriterion.status will show \"removed\", since no positive criterion was added.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"PAUSED", +"REMOVED" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"The ad group criterion is enabled.", +"The ad group criterion is paused.", +"The ad group criterion is removed." +], +"type": "string" +}, +"trackingUrlTemplate": { +"description": "The URL template for constructing a tracking URL.", +"type": "string" +}, +"type": { +"description": "Output only. The type of the criterion.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"KEYWORD", +"PLACEMENT", +"MOBILE_APP_CATEGORY", +"MOBILE_APPLICATION", +"DEVICE", +"LOCATION", +"LISTING_GROUP", +"AD_SCHEDULE", +"AGE_RANGE", +"GENDER", +"INCOME_RANGE", +"PARENTAL_STATUS", +"YOUTUBE_VIDEO", +"YOUTUBE_CHANNEL", +"USER_LIST", +"PROXIMITY", +"TOPIC", +"LISTING_SCOPE", +"LANGUAGE", +"IP_BLOCK", +"CONTENT_LABEL", +"CARRIER", +"USER_INTEREST", +"WEBPAGE", +"OPERATING_SYSTEM_VERSION", +"APP_PAYMENT_MODEL", +"MOBILE_DEVICE", +"CUSTOM_AFFINITY", +"CUSTOM_INTENT", +"LOCATION_GROUP", +"CUSTOM_AUDIENCE", +"COMBINED_AUDIENCE", +"KEYWORD_THEME", +"AUDIENCE", +"LOCAL_SERVICE_ID", +"BRAND", +"BRAND_LIST", +"LIFE_EVENT" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Keyword, for example, 'mars cruise'.", +"Placement, also known as Website, for example, 'www.flowers4sale.com'", +"Mobile application categories to target.", +"Mobile applications to target.", +"Devices to target.", +"Locations to target.", +"Listing groups to target.", +"Ad Schedule.", +"Age range.", +"Gender.", +"Income Range.", +"Parental status.", +"YouTube Video.", +"YouTube Channel.", +"User list.", +"Proximity.", +"A topic target on the display network (for example, \"Pets & Animals\").", +"Listing scope to target.", +"Language.", +"IpBlock.", +"Content Label for category exclusion.", +"Carrier.", +"A category the user is interested in.", +"Webpage criterion for dynamic search ads.", +"Operating system version.", +"App payment model.", +"Mobile device.", +"Custom affinity.", +"Custom intent.", +"Location group.", +"Custom audience", +"Combined audience", +"Smart Campaign keyword theme", +"Audience", +"Local Services Ads Service ID.", +"Brand", +"Brand List", +"Life Event" +], +"readOnly": true, +"type": "string" +}, +"userList": { +"$ref": "GoogleAdsSearchads360V0Common__UserListInfo", +"description": "Immutable. User List." +}, +"webpage": { +"$ref": "GoogleAdsSearchads360V0Common__WebpageInfo", +"description": "Immutable. Webpage" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupCriterionLabel": { +"description": "A relationship between an ad group criterion and a label.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupCriterionLabel", +"properties": { +"adGroupCriterion": { +"description": "Immutable. The ad group criterion to which the label is attached.", +"type": "string" +}, +"label": { +"description": "Immutable. The label assigned to the ad group criterion.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group criterion label. Ad group criterion label resource names have the form: `customers/{customer_id}/adGroupCriterionLabels/{ad_group_id}~{criterion_id}~{label_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AdGroupLabel": { +"description": "A relationship between an ad group and a label.", +"id": "GoogleAdsSearchads360V0Resources__AdGroupLabel", +"properties": { +"adGroup": { +"description": "Immutable. The ad group to which the label is attached.", +"type": "string" +}, +"label": { +"description": "Immutable. The label assigned to the ad group.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the ad group label. Ad group label resource names have the form: `customers/{customer_id}/adGroupLabels/{ad_group_id}~{label_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AgeRangeView": { +"description": "An age range view.", +"id": "GoogleAdsSearchads360V0Resources__AgeRangeView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the age range view. Age range view resource names have the form: `customers/{customer_id}/ageRangeViews/{ad_group_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Asset": { +"description": "Asset is a part of an ad which can be shared across multiple ads. It can be an image (ImageAsset), a video (YoutubeVideoAsset), etc. Assets are immutable and cannot be removed. To stop an asset from serving, remove the asset from the entity that is using it.", +"id": "GoogleAdsSearchads360V0Resources__Asset", +"properties": { +"callAsset": { +"$ref": "GoogleAdsSearchads360V0Common__UnifiedCallAsset", +"description": "Output only. A unified call asset.", +"readOnly": true +}, +"callToActionAsset": { +"$ref": "GoogleAdsSearchads360V0Common__CallToActionAsset", +"description": "Immutable. A call to action asset." +}, +"calloutAsset": { +"$ref": "GoogleAdsSearchads360V0Common__UnifiedCalloutAsset", +"description": "Output only. A unified callout asset.", +"readOnly": true +}, +"creationTime": { +"description": "Output only. The timestamp when this asset was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", +"readOnly": true, +"type": "string" +}, +"engineStatus": { +"description": "Output only. The Engine Status for an asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SERVING", +"SERVING_LIMITED", +"DISAPPROVED", +"DISABLED", +"REMOVED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The asset is active.", +"The asset is active limited.", +"The asset is disapproved (not eligible).", +"The asset is inactive (pending).", +"The asset has been removed." +], +"readOnly": true, +"type": "string" +}, +"finalUrls": { +"description": "A list of possible final URLs after all cross domain redirects.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Output only. The ID of the asset.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"imageAsset": { +"$ref": "GoogleAdsSearchads360V0Common__ImageAsset", +"description": "Output only. An image asset.", +"readOnly": true +}, +"lastModifiedTime": { +"description": "Output only. The datetime when this asset was last modified. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"locationAsset": { +"$ref": "GoogleAdsSearchads360V0Common__UnifiedLocationAsset", +"description": "Output only. A unified location asset.", +"readOnly": true +}, +"mobileAppAsset": { +"$ref": "GoogleAdsSearchads360V0Common__MobileAppAsset", +"description": "A mobile app asset." +}, +"name": { +"description": "Optional name of the asset.", +"type": "string" +}, +"pageFeedAsset": { +"$ref": "GoogleAdsSearchads360V0Common__UnifiedPageFeedAsset", +"description": "Output only. A unified page feed asset.", +"readOnly": true +}, +"resourceName": { +"description": "Immutable. The resource name of the asset. Asset resource names have the form: `customers/{customer_id}/assets/{asset_id}`", +"type": "string" +}, +"sitelinkAsset": { +"$ref": "GoogleAdsSearchads360V0Common__UnifiedSitelinkAsset", +"description": "Output only. A unified sitelink asset.", +"readOnly": true +}, +"status": { +"description": "Output only. The status of the asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED", +"ARCHIVED", +"PENDING_SYSTEM_GENERATED" +], +"enumDescriptions": [ +"The status has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"The asset is enabled.", +"The asset is removed.", +"The asset is archived.", +"The asset is system generated pending user review." +], +"readOnly": true, +"type": "string" +}, +"textAsset": { +"$ref": "GoogleAdsSearchads360V0Common__TextAsset", +"description": "Output only. A text asset.", +"readOnly": true +}, +"trackingUrlTemplate": { +"description": "URL template for constructing a tracking URL.", +"type": "string" +}, +"type": { +"description": "Output only. Type of the asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"YOUTUBE_VIDEO", +"MEDIA_BUNDLE", +"IMAGE", +"TEXT", +"LEAD_FORM", +"BOOK_ON_GOOGLE", +"PROMOTION", +"CALLOUT", +"STRUCTURED_SNIPPET", +"SITELINK", +"PAGE_FEED", +"DYNAMIC_EDUCATION", +"MOBILE_APP", +"HOTEL_CALLOUT", +"CALL", +"PRICE", +"CALL_TO_ACTION", +"DYNAMIC_REAL_ESTATE", +"DYNAMIC_CUSTOM", +"DYNAMIC_HOTELS_AND_RENTALS", +"DYNAMIC_FLIGHTS", +"DISCOVERY_CAROUSEL_CARD", +"DYNAMIC_TRAVEL", +"DYNAMIC_LOCAL", +"DYNAMIC_JOBS", +"LOCATION", +"HOTEL_PROPERTY" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"YouTube video asset.", +"Media bundle asset.", +"Image asset.", +"Text asset.", +"Lead form asset.", +"Book on Google asset.", +"Promotion asset.", +"Callout asset.", +"Structured Snippet asset.", +"Sitelink asset.", +"Page Feed asset.", +"Dynamic Education asset.", +"Mobile app asset.", +"Hotel callout asset.", +"Call asset.", +"Price asset.", +"Call to action asset.", +"Dynamic real estate asset.", +"Dynamic custom asset.", +"Dynamic hotels and rentals asset.", +"Dynamic flights asset.", +"Discovery Carousel Card asset.", +"Dynamic travel asset.", +"Dynamic local asset.", +"Dynamic jobs asset.", +"Location asset.", +"Hotel property asset." +], +"readOnly": true, +"type": "string" +}, +"youtubeVideoAsset": { +"$ref": "GoogleAdsSearchads360V0Common__YoutubeVideoAsset", +"description": "Immutable. A YouTube video asset." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetGroup": { +"description": "An asset group. AssetGroupAsset is used to link an asset to the asset group. AssetGroupSignal is used to associate a signal to an asset group.", +"id": "GoogleAdsSearchads360V0Resources__AssetGroup", +"properties": { +"adStrength": { +"description": "Output only. Overall ad strength of this asset group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"PENDING", +"NO_ADS", +"POOR", +"AVERAGE", +"GOOD", +"EXCELLENT" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The ad strength is currently pending.", +"No ads could be generated.", +"Poor strength.", +"Average strength.", +"Good strength.", +"Excellent strength." +], +"readOnly": true, +"type": "string" +}, +"campaign": { +"description": "Immutable. The campaign with which this asset group is associated. The asset which is linked to the asset group.", +"type": "string" +}, +"finalMobileUrls": { +"description": "A list of final mobile URLs after all cross domain redirects. In performance max, by default, the urls are eligible for expansion unless opted out.", +"items": { +"type": "string" +}, +"type": "array" +}, +"finalUrls": { +"description": "A list of final URLs after all cross domain redirects. In performance max, by default, the urls are eligible for expansion unless opted out.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "Output only. The ID of the asset group.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Required. Name of the asset group. Required. It must have a minimum length of 1 and maximum length of 128. It must be unique under a campaign.", +"type": "string" +}, +"path1": { +"description": "First part of text that may appear appended to the url displayed in the ad.", +"type": "string" +}, +"path2": { +"description": "Second part of text that may appear appended to the url displayed in the ad. This field can only be set when path1 is set.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the asset group. Asset group resource names have the form: `customers/{customer_id}/assetGroups/{asset_group_id}`", +"type": "string" +}, +"status": { +"description": "The status of the asset group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"PAUSED", +"REMOVED" +], +"enumDescriptions": [ +"The status has not been specified.", +"The received value is not known in this version.", +"The asset group is enabled.", +"The asset group is paused.", +"The asset group is removed." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetGroupAsset": { +"description": "AssetGroupAsset is the link between an asset and an asset group. Adding an AssetGroupAsset links an asset with an asset group.", +"id": "GoogleAdsSearchads360V0Resources__AssetGroupAsset", +"properties": { +"asset": { +"description": "Immutable. The asset which this asset group asset is linking.", +"type": "string" +}, +"assetGroup": { +"description": "Immutable. The asset group which this asset group asset is linking.", +"type": "string" +}, +"fieldType": { +"description": "The description of the placement of the asset within the asset group. For example: HEADLINE, YOUTUBE_VIDEO etc", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"HEADLINE", +"DESCRIPTION", +"MANDATORY_AD_TEXT", +"MARKETING_IMAGE", +"MEDIA_BUNDLE", +"YOUTUBE_VIDEO", +"BOOK_ON_GOOGLE", +"LEAD_FORM", +"PROMOTION", +"CALLOUT", +"STRUCTURED_SNIPPET", +"SITELINK", +"MOBILE_APP", +"HOTEL_CALLOUT", +"CALL", +"PRICE", +"LONG_HEADLINE", +"BUSINESS_NAME", +"SQUARE_MARKETING_IMAGE", +"PORTRAIT_MARKETING_IMAGE", +"LOGO", +"LANDSCAPE_LOGO", +"VIDEO", +"CALL_TO_ACTION_SELECTION", +"AD_IMAGE", +"BUSINESS_LOGO", +"HOTEL_PROPERTY", +"DISCOVERY_CAROUSEL_CARD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The asset is linked for use as a headline.", +"The asset is linked for use as a description.", +"The asset is linked for use as mandatory ad text.", +"The asset is linked for use as a marketing image.", +"The asset is linked for use as a media bundle.", +"The asset is linked for use as a YouTube video.", +"The asset is linked to indicate that a hotels campaign is \"Book on Google\" enabled.", +"The asset is linked for use as a Lead Form extension.", +"The asset is linked for use as a Promotion extension.", +"The asset is linked for use as a Callout extension.", +"The asset is linked for use as a Structured Snippet extension.", +"The asset is linked for use as a Sitelink.", +"The asset is linked for use as a Mobile App extension.", +"The asset is linked for use as a Hotel Callout extension.", +"The asset is linked for use as a Call extension.", +"The asset is linked for use as a Price extension.", +"The asset is linked for use as a long headline.", +"The asset is linked for use as a business name.", +"The asset is linked for use as a square marketing image.", +"The asset is linked for use as a portrait marketing image.", +"The asset is linked for use as a logo.", +"The asset is linked for use as a landscape logo.", +"The asset is linked for use as a non YouTube logo.", +"The asset is linked for use to select a call-to-action.", +"The asset is linked for use to select an ad image.", +"The asset is linked for use as a business logo.", +"The asset is linked for use as a hotel property in a Performance Max for travel goals campaign.", +"The asset is linked for use as a discovery carousel card." +], +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the asset group asset. Asset group asset resource name have the form: `customers/{customer_id}/assetGroupAssets/{asset_group_id}~{asset_id}~{field_type}`", +"type": "string" +}, +"status": { +"description": "The status of the link between an asset and asset group.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED", +"PAUSED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Asset link is enabled.", +"Asset link has been removed.", +"Asset link is paused." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetGroupAssetCombinationData": { +"description": "Asset group asset combination data", +"id": "GoogleAdsSearchads360V0Resources__AssetGroupAssetCombinationData", +"properties": { +"assetCombinationServedAssets": { +"description": "Output only. Served assets.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__AssetUsage" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetGroupListingGroupFilter": { +"description": "AssetGroupListingGroupFilter represents a listing group filter tree node in an asset group.", +"id": "GoogleAdsSearchads360V0Resources__AssetGroupListingGroupFilter", +"properties": { +"assetGroup": { +"description": "Immutable. The asset group which this asset group listing group filter is part of.", +"type": "string" +}, +"caseValue": { +"$ref": "GoogleAdsSearchads360V0Resources__ListingGroupFilterDimension", +"description": "Dimension value with which this listing group is refining its parent. Undefined for the root group." +}, +"id": { +"description": "Output only. The ID of the ListingGroupFilter.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"parentListingGroupFilter": { +"description": "Immutable. Resource name of the parent listing group subdivision. Null for the root listing group filter node.", +"type": "string" +}, +"path": { +"$ref": "GoogleAdsSearchads360V0Resources__ListingGroupFilterDimensionPath", +"description": "Output only. The path of dimensions defining this listing group filter.", +"readOnly": true +}, +"resourceName": { +"description": "Immutable. The resource name of the asset group listing group filter. Asset group listing group filter resource name have the form: `customers/{customer_id}/assetGroupListingGroupFilters/{asset_group_id}~{listing_group_filter_id}`", +"type": "string" +}, +"type": { +"description": "Immutable. Type of a listing group filter node.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SUBDIVISION", +"UNIT_INCLUDED", +"UNIT_EXCLUDED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Subdivision of products along some listing dimensions.", +"An included listing group filter leaf node.", +"An excluded listing group filter leaf node." +], +"type": "string" +}, +"vertical": { +"description": "Immutable. The vertical the current node tree represents. All nodes in the same tree must belong to the same vertical.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SHOPPING" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Represents the shopping vertical. The vertical is allowed only in Performance Max for Retail campaigns." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetGroupSignal": { +"description": "AssetGroupSignal represents a signal in an asset group. The existence of a signal tells the performance max campaign who's most likely to convert. Performance Max uses the signal to look for new people with similar or stronger intent to find conversions across Search, Display, Video, and more.", +"id": "GoogleAdsSearchads360V0Resources__AssetGroupSignal", +"properties": { +"assetGroup": { +"description": "Immutable. The asset group which this asset group signal belongs to.", +"type": "string" +}, +"audience": { +"$ref": "GoogleAdsSearchads360V0Common__AudienceInfo", +"description": "Immutable. The audience signal to be used by the performance max campaign." +}, +"resourceName": { +"description": "Immutable. The resource name of the asset group signal. Asset group signal resource name have the form: `customers/{customer_id}/assetGroupSignals/{asset_group_id}~{signal_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetGroupTopCombinationView": { +"description": "A view on the usage of ad group ad asset combination.", +"id": "GoogleAdsSearchads360V0Resources__AssetGroupTopCombinationView", +"properties": { +"assetGroupTopCombinations": { +"description": "Output only. The top combinations of assets that served together.", +"items": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetGroupAssetCombinationData" +}, +"readOnly": true, +"type": "array" +}, +"resourceName": { +"description": "Output only. The resource name of the asset group top combination view. AssetGroup Top Combination view resource names have the form: `\"customers/{customer_id}/assetGroupTopCombinationViews/{asset_group_id}~{asset_combination_category}\"", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetSet": { +"description": "An asset set representing a collection of assets. Use AssetSetAsset to link an asset to the asset set.", +"id": "GoogleAdsSearchads360V0Resources__AssetSet", +"properties": { +"id": { +"description": "Output only. The ID of the asset set.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the asset set. Asset set resource names have the form: `customers/{customer_id}/assetSets/{asset_set_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__AssetSetAsset": { +"description": "AssetSetAsset is the link between an asset and an asset set. Adding an AssetSetAsset links an asset with an asset set.", +"id": "GoogleAdsSearchads360V0Resources__AssetSetAsset", +"properties": { +"asset": { +"description": "Immutable. The asset which this asset set asset is linking to.", +"type": "string" +}, +"assetSet": { +"description": "Immutable. The asset set which this asset set asset is linking to.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the asset set asset. Asset set asset resource names have the form: `customers/{customer_id}/assetSetAssets/{asset_set_id}~{asset_id}`", +"type": "string" +}, +"status": { +"description": "Output only. The status of the asset set asset. Read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED" +], +"enumDescriptions": [ +"The status has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"The asset set asset is enabled.", +"The asset set asset is removed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Audience": { +"description": "Audience is an effective targeting option that lets you intersect different segment attributes, such as detailed demographics and affinities, to create audiences that represent sections of your target segments.", +"id": "GoogleAdsSearchads360V0Resources__Audience", +"properties": { +"description": { +"description": "Description of this audience.", +"type": "string" +}, +"id": { +"description": "Output only. ID of the audience.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Required. Name of the audience. It should be unique across all audiences. It must have a minimum length of 1 and maximum length of 255.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the audience. Audience names have the form: `customers/{customer_id}/audiences/{audience_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__BiddingStrategy": { +"description": "A bidding strategy.", +"id": "GoogleAdsSearchads360V0Resources__BiddingStrategy", +"properties": { +"campaignCount": { +"description": "Output only. The number of campaigns attached to this bidding strategy. This field is read-only.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"currencyCode": { +"description": "Immutable. The currency used by the bidding strategy (ISO 4217 three-letter code). For bidding strategies in manager customers, this currency can be set on creation and defaults to the manager customer's currency. For serving customers, this field cannot be set; all strategies in a serving customer implicitly use the serving customer's currency. In all cases the effective_currency_code field returns the currency used by the strategy.", +"type": "string" +}, +"effectiveCurrencyCode": { +"description": "Output only. The currency used by the bidding strategy (ISO 4217 three-letter code). For bidding strategies in manager customers, this is the currency set by the advertiser when creating the strategy. For serving customers, this is the customer's currency_code. Bidding strategy metrics are reported in this currency. This field is read-only.", +"readOnly": true, +"type": "string" +}, +"enhancedCpc": { +"$ref": "GoogleAdsSearchads360V0Common__EnhancedCpc", +"description": "A bidding strategy that raises bids for clicks that seem more likely to lead to a conversion and lowers them for clicks where they seem less likely." +}, +"id": { +"description": "Output only. The ID of the bidding strategy.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"maximizeConversionValue": { +"$ref": "GoogleAdsSearchads360V0Common__MaximizeConversionValue", +"description": "An automated bidding strategy to help get the most conversion value for your campaigns while spending your budget." +}, +"maximizeConversions": { +"$ref": "GoogleAdsSearchads360V0Common__MaximizeConversions", +"description": "An automated bidding strategy to help get the most conversions for your campaigns while spending your budget." +}, +"name": { +"description": "The name of the bidding strategy. All bidding strategies within an account must be named distinctly. The length of this string should be between 1 and 255, inclusive, in UTF-8 bytes, (trimmed).", +"type": "string" +}, +"nonRemovedCampaignCount": { +"description": "Output only. The number of non-removed campaigns attached to this bidding strategy. This field is read-only.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the bidding strategy. Bidding strategy resource names have the form: `customers/{customer_id}/biddingStrategies/{bidding_strategy_id}`", +"type": "string" +}, +"status": { +"description": "Output only. The status of the bidding strategy. This field is read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"The bidding strategy is enabled.", +"The bidding strategy is removed." +], +"readOnly": true, +"type": "string" +}, +"targetCpa": { +"$ref": "GoogleAdsSearchads360V0Common__TargetCpa", +"description": "A bidding strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set." +}, +"targetImpressionShare": { +"$ref": "GoogleAdsSearchads360V0Common__TargetImpressionShare", +"description": "A bidding strategy that automatically optimizes towards a chosen percentage of impressions." +}, +"targetOutrankShare": { +"$ref": "GoogleAdsSearchads360V0Common__TargetOutrankShare", +"description": "A bidding strategy that sets bids based on the target fraction of auctions where the advertiser should outrank a specific competitor. This field is deprecated. Creating a new bidding strategy with this field or attaching bidding strategies with this field to a campaign will fail. Mutates to strategies that already have this scheme populated are allowed." +}, +"targetRoas": { +"$ref": "GoogleAdsSearchads360V0Common__TargetRoas", +"description": "A bidding strategy that helps you maximize revenue while averaging a specific target Return On Ad Spend (ROAS)." +}, +"targetSpend": { +"$ref": "GoogleAdsSearchads360V0Common__TargetSpend", +"description": "A bid strategy that sets your bids to help get as many clicks as possible within your budget." +}, +"type": { +"description": "Output only. The type of the bidding strategy. Create a bidding strategy by setting the bidding scheme. This field is read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"COMMISSION", +"ENHANCED_CPC", +"INVALID", +"MANUAL_CPA", +"MANUAL_CPC", +"MANUAL_CPM", +"MANUAL_CPV", +"MAXIMIZE_CONVERSIONS", +"MAXIMIZE_CONVERSION_VALUE", +"PAGE_ONE_PROMOTED", +"PERCENT_CPC", +"TARGET_CPA", +"TARGET_CPM", +"TARGET_IMPRESSION_SHARE", +"TARGET_OUTRANK_SHARE", +"TARGET_ROAS", +"TARGET_SPEND" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Commission is an automatic bidding strategy in which the advertiser pays a certain portion of the conversion value.", +"Enhanced CPC is a bidding strategy that raises bids for clicks that seem more likely to lead to a conversion and lowers them for clicks where they seem less likely.", +"Used for return value only. Indicates that a campaign does not have a bidding strategy. This prevents the campaign from serving. For example, a campaign may be attached to a manager bidding strategy and the serving account is subsequently unlinked from the manager account. In this case the campaign will automatically be detached from the now inaccessible manager bidding strategy and transition to the INVALID bidding strategy type.", +"Manual bidding strategy that allows advertiser to set the bid per advertiser-specified action.", +"Manual click based bidding where user pays per click.", +"Manual impression based bidding where user pays per thousand impressions.", +"A bidding strategy that pays a configurable amount per video view.", +"A bidding strategy that automatically maximizes number of conversions given a daily budget.", +"An automated bidding strategy that automatically sets bids to maximize revenue while spending your budget.", +"Page-One Promoted bidding scheme, which sets max cpc bids to target impressions on page one or page one promoted slots on google.com. This enum value is deprecated.", +"Percent Cpc is bidding strategy where bids are a fraction of the advertised price for some good or service.", +"Target CPA is an automated bid strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set.", +"Target CPM is an automated bid strategy that sets bids to help get as many impressions as possible at the target cost per one thousand impressions (CPM) you set.", +"An automated bidding strategy that sets bids so that a certain percentage of search ads are shown at the top of the first page (or other targeted location).", +"Target Outrank Share is an automated bidding strategy that sets bids based on the target fraction of auctions where the advertiser should outrank a specific competitor. This enum value is deprecated.", +"Target ROAS is an automated bidding strategy that helps you maximize revenue while averaging a specific target Return On Average Spend (ROAS).", +"Target Spend is an automated bid strategy that sets your bids to help get as many clicks as possible within your budget." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Campaign": { +"description": "A campaign.", +"id": "GoogleAdsSearchads360V0Resources__Campaign", +"properties": { +"accessibleBiddingStrategy": { +"description": "Output only. Resource name of AccessibleBiddingStrategy, a read-only view of the unrestricted attributes of the attached portfolio bidding strategy identified by 'bidding_strategy'. Empty, if the campaign does not use a portfolio strategy. Unrestricted strategy attributes are available to all customers with whom the strategy is shared and are read from the AccessibleBiddingStrategy resource. In contrast, restricted attributes are only available to the owner customer of the strategy and their managers. Restricted attributes can only be read from the BiddingStrategy resource.", +"readOnly": true, +"type": "string" +}, +"adServingOptimizationStatus": { +"description": "The ad serving optimization status of the campaign.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"OPTIMIZE", +"CONVERSION_OPTIMIZE", +"ROTATE", +"ROTATE_INDEFINITELY", +"UNAVAILABLE" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"Ad serving is optimized based on CTR for the campaign.", +"Ad serving is optimized based on CTR * Conversion for the campaign. If the campaign is not in the conversion optimizer bidding strategy, it will default to OPTIMIZED.", +"Ads are rotated evenly for 90 days, then optimized for clicks.", +"Show lower performing ads more evenly with higher performing ads, and do not optimize.", +"Ad serving optimization status is not available." +], +"type": "string" +}, +"advertisingChannelSubType": { +"description": "Immutable. Optional refinement to `advertising_channel_type`. Must be a valid sub-type of the parent channel type. Can be set only when creating campaigns. After campaign is created, the field can not be changed.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SEARCH_MOBILE_APP", +"DISPLAY_MOBILE_APP", +"SEARCH_EXPRESS", +"DISPLAY_EXPRESS", +"SHOPPING_SMART_ADS", +"DISPLAY_GMAIL_AD", +"DISPLAY_SMART_CAMPAIGN", +"VIDEO_OUTSTREAM", +"VIDEO_ACTION", +"VIDEO_NON_SKIPPABLE", +"APP_CAMPAIGN", +"APP_CAMPAIGN_FOR_ENGAGEMENT", +"LOCAL_CAMPAIGN", +"SHOPPING_COMPARISON_LISTING_ADS", +"SMART_CAMPAIGN", +"VIDEO_SEQUENCE", +"APP_CAMPAIGN_FOR_PRE_REGISTRATION", +"VIDEO_REACH_TARGET_FREQUENCY", +"TRAVEL_ACTIVITIES" +], +"enumDescriptions": [ +"Not specified.", +"Used as a return value only. Represents value unknown in this version.", +"Mobile app campaigns for Search.", +"Mobile app campaigns for Display.", +"AdWords express campaigns for search.", +"AdWords Express campaigns for display.", +"Smart Shopping campaigns.", +"Gmail Ad campaigns.", +"Smart display campaigns. New campaigns of this sub type cannot be created.", +"Video Outstream campaigns.", +"Video TrueView for Action campaigns.", +"Video campaigns with non-skippable video ads.", +"App Campaign that lets you easily promote your Android or iOS app across Google's top properties including Search, Play, YouTube, and the Google Display Network.", +"App Campaign for engagement, focused on driving re-engagement with the app across several of Google's top properties including Search, YouTube, and the Google Display Network.", +"Campaigns specialized for local advertising.", +"Shopping Comparison Listing campaigns.", +"Standard Smart campaigns.", +"Video campaigns with sequence video ads.", +"App Campaign for pre registration, specialized for advertising mobile app pre-registration, that targets multiple advertising channels across Google Play, YouTube and Display Network.", +"Video reach campaign with Target Frequency bidding strategy.", +"Travel Activities campaigns." +], +"type": "string" +}, +"advertisingChannelType": { +"description": "Immutable. The primary serving target for ads within the campaign. The targeting options can be refined in `network_settings`. This field is required and should not be empty when creating new campaigns. Can be set only when creating campaigns. After the campaign is created, the field can not be changed.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SEARCH", +"DISPLAY", +"SHOPPING", +"HOTEL", +"VIDEO", +"MULTI_CHANNEL", +"LOCAL", +"SMART", +"PERFORMANCE_MAX", +"LOCAL_SERVICES", +"DISCOVERY", +"TRAVEL" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Search Network. Includes display bundled, and Search+ campaigns.", +"Google Display Network only.", +"Shopping campaigns serve on the shopping property and on google.com search results.", +"Hotel Ads campaigns.", +"Video campaigns.", +"App Campaigns, and App Campaigns for Engagement, that run across multiple channels.", +"Local ads campaigns.", +"Smart campaigns.", +"Performance Max campaigns.", +"Local services campaigns.", +"Discovery campaigns.", +"Travel campaigns." +], +"type": "string" +}, +"biddingStrategy": { +"description": "Portfolio bidding strategy used by campaign.", +"type": "string" +}, +"biddingStrategySystemStatus": { +"description": "Output only. The system status of the campaign's bidding strategy.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"LEARNING_NEW", +"LEARNING_SETTING_CHANGE", +"LEARNING_BUDGET_CHANGE", +"LEARNING_COMPOSITION_CHANGE", +"LEARNING_CONVERSION_TYPE_CHANGE", +"LEARNING_CONVERSION_SETTING_CHANGE", +"LIMITED_BY_CPC_BID_CEILING", +"LIMITED_BY_CPC_BID_FLOOR", +"LIMITED_BY_DATA", +"LIMITED_BY_BUDGET", +"LIMITED_BY_LOW_PRIORITY_SPEND", +"LIMITED_BY_LOW_QUALITY", +"LIMITED_BY_INVENTORY", +"MISCONFIGURED_ZERO_ELIGIBILITY", +"MISCONFIGURED_CONVERSION_TYPES", +"MISCONFIGURED_CONVERSION_SETTINGS", +"MISCONFIGURED_SHARED_BUDGET", +"MISCONFIGURED_STRATEGY_TYPE", +"PAUSED", +"UNAVAILABLE", +"MULTIPLE_LEARNING", +"MULTIPLE_LIMITED", +"MULTIPLE_MISCONFIGURED", +"MULTIPLE" +], +"enumDescriptions": [ +"Signals that an unexpected error occurred, for example, no bidding strategy type was found, or no status information was found.", +"Used for return value only. Represents value unknown in this version.", +"The bid strategy is active, and AdWords cannot find any specific issues with the strategy.", +"The bid strategy is learning because it has been recently created or recently reactivated.", +"The bid strategy is learning because of a recent setting change.", +"The bid strategy is learning because of a recent budget change.", +"The bid strategy is learning because of recent change in number of campaigns, ad groups or keywords attached to it.", +"The bid strategy depends on conversion reporting and the customer recently modified conversion types that were relevant to the bid strategy.", +"The bid strategy depends on conversion reporting and the customer recently changed their conversion settings.", +"The bid strategy is limited by its bid ceiling.", +"The bid strategy is limited by its bid floor.", +"The bid strategy is limited because there was not enough conversion traffic over the past weeks.", +"A significant fraction of keywords in this bid strategy are limited by budget.", +"The bid strategy cannot reach its target spend because its spend has been de-prioritized.", +"A significant fraction of keywords in this bid strategy have a low Quality Score.", +"The bid strategy cannot fully spend its budget because of narrow targeting.", +"Missing conversion tracking (no pings present) and/or remarketing lists for SSC.", +"The bid strategy depends on conversion reporting and the customer is lacking conversion types that might be reported against this strategy.", +"The bid strategy depends on conversion reporting and the customer's conversion settings are misconfigured.", +"There are campaigns outside the bid strategy that share budgets with campaigns included in the strategy.", +"The campaign has an invalid strategy type and is not serving.", +"The bid strategy is not active. Either there are no active campaigns, ad groups or keywords attached to the bid strategy. Or there are no active budgets connected to the bid strategy.", +"This bid strategy currently does not support status reporting.", +"There were multiple LEARNING_* system statuses for this bid strategy during the time in question.", +"There were multiple LIMITED_* system statuses for this bid strategy during the time in question.", +"There were multiple MISCONFIGURED_* system statuses for this bid strategy during the time in question.", +"There were multiple system statuses for this bid strategy during the time in question." +], +"readOnly": true, +"type": "string" +}, +"biddingStrategyType": { +"description": "Output only. The type of bidding strategy. A bidding strategy can be created by setting either the bidding scheme to create a standard bidding strategy or the `bidding_strategy` field to create a portfolio bidding strategy. This field is read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"COMMISSION", +"ENHANCED_CPC", +"INVALID", +"MANUAL_CPA", +"MANUAL_CPC", +"MANUAL_CPM", +"MANUAL_CPV", +"MAXIMIZE_CONVERSIONS", +"MAXIMIZE_CONVERSION_VALUE", +"PAGE_ONE_PROMOTED", +"PERCENT_CPC", +"TARGET_CPA", +"TARGET_CPM", +"TARGET_IMPRESSION_SHARE", +"TARGET_OUTRANK_SHARE", +"TARGET_ROAS", +"TARGET_SPEND" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Commission is an automatic bidding strategy in which the advertiser pays a certain portion of the conversion value.", +"Enhanced CPC is a bidding strategy that raises bids for clicks that seem more likely to lead to a conversion and lowers them for clicks where they seem less likely.", +"Used for return value only. Indicates that a campaign does not have a bidding strategy. This prevents the campaign from serving. For example, a campaign may be attached to a manager bidding strategy and the serving account is subsequently unlinked from the manager account. In this case the campaign will automatically be detached from the now inaccessible manager bidding strategy and transition to the INVALID bidding strategy type.", +"Manual bidding strategy that allows advertiser to set the bid per advertiser-specified action.", +"Manual click based bidding where user pays per click.", +"Manual impression based bidding where user pays per thousand impressions.", +"A bidding strategy that pays a configurable amount per video view.", +"A bidding strategy that automatically maximizes number of conversions given a daily budget.", +"An automated bidding strategy that automatically sets bids to maximize revenue while spending your budget.", +"Page-One Promoted bidding scheme, which sets max cpc bids to target impressions on page one or page one promoted slots on google.com. This enum value is deprecated.", +"Percent Cpc is bidding strategy where bids are a fraction of the advertised price for some good or service.", +"Target CPA is an automated bid strategy that sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set.", +"Target CPM is an automated bid strategy that sets bids to help get as many impressions as possible at the target cost per one thousand impressions (CPM) you set.", +"An automated bidding strategy that sets bids so that a certain percentage of search ads are shown at the top of the first page (or other targeted location).", +"Target Outrank Share is an automated bidding strategy that sets bids based on the target fraction of auctions where the advertiser should outrank a specific competitor. This enum value is deprecated.", +"Target ROAS is an automated bidding strategy that helps you maximize revenue while averaging a specific target Return On Average Spend (ROAS).", +"Target Spend is an automated bid strategy that sets your bids to help get as many clicks as possible within your budget." +], +"readOnly": true, +"type": "string" +}, +"campaignBudget": { +"description": "The budget of the campaign.", +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when this campaign was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format. create_time will be deprecated in v1. Use creation_time instead.", +"readOnly": true, +"type": "string" +}, +"creationTime": { +"description": "Output only. The timestamp when this campaign was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", +"readOnly": true, +"type": "string" +}, +"dynamicSearchAdsSetting": { +"$ref": "GoogleAdsSearchads360V0Resources_Campaign_DynamicSearchAdsSetting", +"description": "The setting for controlling Dynamic Search Ads (DSA)." +}, +"endDate": { +"description": "The last day of the campaign in serving customer's timezone in YYYY-MM-DD format. On create, defaults to 2037-12-30, which means the campaign will run indefinitely. To set an existing campaign to run indefinitely, set this field to 2037-12-30.", +"type": "string" +}, +"engineId": { +"description": "Output only. ID of the campaign in the external engine account. This field is for non-Google Ads account only, for example, Yahoo Japan, Microsoft, Baidu etc. For Google Ads entity, use \"campaign.id\" instead.", +"readOnly": true, +"type": "string" +}, +"excludedParentAssetFieldTypes": { +"description": "The asset field types that should be excluded from this campaign. Asset links with these field types will not be inherited by this campaign from the upper level.", +"items": { +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"HEADLINE", +"DESCRIPTION", +"MANDATORY_AD_TEXT", +"MARKETING_IMAGE", +"MEDIA_BUNDLE", +"YOUTUBE_VIDEO", +"BOOK_ON_GOOGLE", +"LEAD_FORM", +"PROMOTION", +"CALLOUT", +"STRUCTURED_SNIPPET", +"SITELINK", +"MOBILE_APP", +"HOTEL_CALLOUT", +"CALL", +"PRICE", +"LONG_HEADLINE", +"BUSINESS_NAME", +"SQUARE_MARKETING_IMAGE", +"PORTRAIT_MARKETING_IMAGE", +"LOGO", +"LANDSCAPE_LOGO", +"VIDEO", +"CALL_TO_ACTION_SELECTION", +"AD_IMAGE", +"BUSINESS_LOGO", +"HOTEL_PROPERTY", +"DISCOVERY_CAROUSEL_CARD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The asset is linked for use as a headline.", +"The asset is linked for use as a description.", +"The asset is linked for use as mandatory ad text.", +"The asset is linked for use as a marketing image.", +"The asset is linked for use as a media bundle.", +"The asset is linked for use as a YouTube video.", +"The asset is linked to indicate that a hotels campaign is \"Book on Google\" enabled.", +"The asset is linked for use as a Lead Form extension.", +"The asset is linked for use as a Promotion extension.", +"The asset is linked for use as a Callout extension.", +"The asset is linked for use as a Structured Snippet extension.", +"The asset is linked for use as a Sitelink.", +"The asset is linked for use as a Mobile App extension.", +"The asset is linked for use as a Hotel Callout extension.", +"The asset is linked for use as a Call extension.", +"The asset is linked for use as a Price extension.", +"The asset is linked for use as a long headline.", +"The asset is linked for use as a business name.", +"The asset is linked for use as a square marketing image.", +"The asset is linked for use as a portrait marketing image.", +"The asset is linked for use as a logo.", +"The asset is linked for use as a landscape logo.", +"The asset is linked for use as a non YouTube logo.", +"The asset is linked for use to select a call-to-action.", +"The asset is linked for use to select an ad image.", +"The asset is linked for use as a business logo.", +"The asset is linked for use as a hotel property in a Performance Max for travel goals campaign.", +"The asset is linked for use as a discovery carousel card." +], +"type": "string" +}, +"type": "array" +}, +"finalUrlSuffix": { +"description": "Suffix used to append query parameters to landing pages that are served with parallel tracking.", +"type": "string" +}, +"frequencyCaps": { +"description": "A list that limits how often each user will see this campaign's ads.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__FrequencyCapEntry" +}, +"type": "array" +}, +"geoTargetTypeSetting": { +"$ref": "GoogleAdsSearchads360V0Resources_Campaign_GeoTargetTypeSetting", +"description": "The setting for ads geotargeting." +}, +"id": { +"description": "Output only. The ID of the campaign.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"labels": { +"description": "Output only. The resource names of labels attached to this campaign.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"lastModifiedTime": { +"description": "Output only. The datetime when this campaign was last modified. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"manualCpa": { +"$ref": "GoogleAdsSearchads360V0Common__ManualCpa", +"description": "Standard Manual CPA bidding strategy. Manual bidding strategy that allows advertiser to set the bid per advertiser-specified action. Supported only for Local Services campaigns." +}, +"manualCpc": { +"$ref": "GoogleAdsSearchads360V0Common__ManualCpc", +"description": "Standard Manual CPC bidding strategy. Manual click-based bidding where user pays per click." +}, +"manualCpm": { +"$ref": "GoogleAdsSearchads360V0Common__ManualCpm", +"description": "Standard Manual CPM bidding strategy. Manual impression-based bidding where user pays per thousand impressions." +}, +"maximizeConversionValue": { +"$ref": "GoogleAdsSearchads360V0Common__MaximizeConversionValue", +"description": "Standard Maximize Conversion Value bidding strategy that automatically sets bids to maximize revenue while spending your budget." +}, +"maximizeConversions": { +"$ref": "GoogleAdsSearchads360V0Common__MaximizeConversions", +"description": "Standard Maximize Conversions bidding strategy that automatically maximizes number of conversions while spending your budget." +}, +"name": { +"description": "The name of the campaign. This field is required and should not be empty when creating new campaigns. It must not contain any null (code point 0x0), NL line feed (code point 0xA) or carriage return (code point 0xD) characters.", +"type": "string" +}, +"networkSettings": { +"$ref": "GoogleAdsSearchads360V0Resources_Campaign_NetworkSettings", +"description": "The network settings for the campaign." +}, +"optimizationGoalSetting": { +"$ref": "GoogleAdsSearchads360V0Resources_Campaign_OptimizationGoalSetting", +"description": "Optimization goal setting for this campaign, which includes a set of optimization goal types." +}, +"percentCpc": { +"$ref": "GoogleAdsSearchads360V0Common__PercentCpc", +"description": "Standard Percent Cpc bidding strategy where bids are a fraction of the advertised price for some good or service." +}, +"realTimeBiddingSetting": { +"$ref": "GoogleAdsSearchads360V0Common__RealTimeBiddingSetting", +"description": "Settings for Real-Time Bidding, a feature only available for campaigns targeting the Ad Exchange network." +}, +"resourceName": { +"description": "Immutable. The resource name of the campaign. Campaign resource names have the form: `customers/{customer_id}/campaigns/{campaign_id}`", +"type": "string" +}, +"selectiveOptimization": { +"$ref": "GoogleAdsSearchads360V0Resources_Campaign_SelectiveOptimization", +"description": "Selective optimization setting for this campaign, which includes a set of conversion actions to optimize this campaign towards. This feature only applies to app campaigns that use MULTI_CHANNEL as AdvertisingChannelType and APP_CAMPAIGN or APP_CAMPAIGN_FOR_ENGAGEMENT as AdvertisingChannelSubType." +}, +"servingStatus": { +"description": "Output only. The ad serving status of the campaign.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"SERVING", +"NONE", +"ENDED", +"PENDING", +"SUSPENDED" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"Serving.", +"None.", +"Ended.", +"Pending.", +"Suspended." +], +"readOnly": true, +"type": "string" +}, +"shoppingSetting": { +"$ref": "GoogleAdsSearchads360V0Resources_Campaign_ShoppingSetting", +"description": "The setting for controlling Shopping campaigns." +}, +"startDate": { +"description": "The date when campaign started in serving customer's timezone in YYYY-MM-DD format.", +"type": "string" +}, +"status": { +"description": "The status of the campaign. When a new campaign is added, the status defaults to ENABLED.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"PAUSED", +"REMOVED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Campaign is active and can show ads.", +"Campaign has been paused by the user.", +"Campaign has been removed." +], +"type": "string" +}, +"targetCpa": { +"$ref": "GoogleAdsSearchads360V0Common__TargetCpa", +"description": "Standard Target CPA bidding strategy that automatically sets bids to help get as many conversions as possible at the target cost-per-acquisition (CPA) you set." +}, +"targetCpm": { +"$ref": "GoogleAdsSearchads360V0Common__TargetCpm", +"description": "A bidding strategy that automatically optimizes cost per thousand impressions." +}, +"targetImpressionShare": { +"$ref": "GoogleAdsSearchads360V0Common__TargetImpressionShare", +"description": "Target Impression Share bidding strategy. An automated bidding strategy that sets bids to achieve a chosen percentage of impressions." +}, +"targetRoas": { +"$ref": "GoogleAdsSearchads360V0Common__TargetRoas", +"description": "Standard Target ROAS bidding strategy that automatically maximizes revenue while averaging a specific target return on ad spend (ROAS)." +}, +"targetSpend": { +"$ref": "GoogleAdsSearchads360V0Common__TargetSpend", +"description": "Standard Target Spend bidding strategy that automatically sets your bids to help get as many clicks as possible within your budget." +}, +"trackingSetting": { +"$ref": "GoogleAdsSearchads360V0Resources_Campaign_TrackingSetting", +"description": "Output only. Campaign-level settings for tracking information.", +"readOnly": true +}, +"trackingUrlTemplate": { +"description": "The URL template for constructing a tracking URL.", +"type": "string" +}, +"urlCustomParameters": { +"description": "The list of mappings used to substitute custom parameter tags in a `tracking_url_template`, `final_urls`, or `mobile_final_urls`.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__CustomParameter" +}, +"type": "array" +}, +"urlExpansionOptOut": { +"description": "Represents opting out of URL expansion to more targeted URLs. If opted out (true), only the final URLs in the asset group or URLs specified in the advertiser's Google Merchant Center or business data feeds are targeted. If opted in (false), the entire domain will be targeted. This field can only be set for Performance Max campaigns, where the default value is false.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CampaignAsset": { +"description": "A link between a Campaign and an Asset.", +"id": "GoogleAdsSearchads360V0Resources__CampaignAsset", +"properties": { +"asset": { +"description": "Immutable. The asset which is linked to the campaign.", +"type": "string" +}, +"campaign": { +"description": "Immutable. The campaign to which the asset is linked.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the campaign asset. CampaignAsset resource names have the form: `customers/{customer_id}/campaignAssets/{campaign_id}~{asset_id}~{field_type}`", +"type": "string" +}, +"status": { +"description": "Output only. Status of the campaign asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED", +"PAUSED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Asset link is enabled.", +"Asset link has been removed.", +"Asset link is paused." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CampaignAssetSet": { +"description": "CampaignAssetSet is the linkage between a campaign and an asset set. Adding a CampaignAssetSet links an asset set with a campaign.", +"id": "GoogleAdsSearchads360V0Resources__CampaignAssetSet", +"properties": { +"assetSet": { +"description": "Immutable. The asset set which is linked to the campaign.", +"type": "string" +}, +"campaign": { +"description": "Immutable. The campaign to which this asset set is linked.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the campaign asset set. Asset set asset resource names have the form: `customers/{customer_id}/campaignAssetSets/{campaign_id}~{asset_set_id}`", +"type": "string" +}, +"status": { +"description": "Output only. The status of the campaign asset set asset. Read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED" +], +"enumDescriptions": [ +"The status has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"The linkage between asset set and its container is enabled.", +"The linkage between asset set and its container is removed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CampaignAudienceView": { +"description": "A campaign audience view. Includes performance data from interests and remarketing lists for Display Network and YouTube Network ads, and remarketing lists for search ads (RLSA), aggregated by campaign and audience criterion. This view only includes audiences attached at the campaign level.", +"id": "GoogleAdsSearchads360V0Resources__CampaignAudienceView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the campaign audience view. Campaign audience view resource names have the form: `customers/{customer_id}/campaignAudienceViews/{campaign_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CampaignBudget": { +"description": "A campaign budget.", +"id": "GoogleAdsSearchads360V0Resources__CampaignBudget", +"properties": { +"amountMicros": { +"description": "The amount of the budget, in the local currency for the account. Amount is specified in micros, where one million is equivalent to one currency unit. Monthly spend is capped at 30.4 times this amount.", +"format": "int64", +"type": "string" +}, +"deliveryMethod": { +"description": "The delivery method that determines the rate at which the campaign budget is spent. Defaults to STANDARD if unspecified in a create operation.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"STANDARD", +"ACCELERATED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The budget server will throttle serving evenly across the entire time period.", +"The budget server will not throttle serving, and ads will serve as fast as possible." +], +"type": "string" +}, +"period": { +"description": "Immutable. Period over which to spend the budget. Defaults to DAILY if not specified.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"DAILY", +"FIXED_DAILY", +"CUSTOM_PERIOD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Daily budget.", +"Fixed daily budget.", +"Custom budget can be used with total_amount to specify lifetime budget limit." +], +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the campaign budget. Campaign budget resource names have the form: `customers/{customer_id}/campaignBudgets/{campaign_budget_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CampaignCriterion": { +"description": "A campaign criterion.", +"id": "GoogleAdsSearchads360V0Resources__CampaignCriterion", +"properties": { +"ageRange": { +"$ref": "GoogleAdsSearchads360V0Common__AgeRangeInfo", +"description": "Immutable. Age range." +}, +"bidModifier": { +"description": "The modifier for the bids when the criterion matches. The modifier must be in the range: 0.1 - 10.0. Most targetable criteria types support modifiers. Use 0 to opt out of a Device type.", +"format": "float", +"type": "number" +}, +"criterionId": { +"description": "Output only. The ID of the criterion. This field is ignored during mutate.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"device": { +"$ref": "GoogleAdsSearchads360V0Common__DeviceInfo", +"description": "Immutable. Device." +}, +"displayName": { +"description": "Output only. The display name of the criterion. This field is ignored for mutates.", +"readOnly": true, +"type": "string" +}, +"gender": { +"$ref": "GoogleAdsSearchads360V0Common__GenderInfo", +"description": "Immutable. Gender." +}, +"keyword": { +"$ref": "GoogleAdsSearchads360V0Common__KeywordInfo", +"description": "Immutable. Keyword." +}, +"language": { +"$ref": "GoogleAdsSearchads360V0Common__LanguageInfo", +"description": "Immutable. Language." +}, +"lastModifiedTime": { +"description": "Output only. The datetime when this campaign criterion was last modified. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"location": { +"$ref": "GoogleAdsSearchads360V0Common__LocationInfo", +"description": "Immutable. Location." +}, +"locationGroup": { +"$ref": "GoogleAdsSearchads360V0Common__LocationGroupInfo", +"description": "Immutable. Location Group" +}, +"negative": { +"description": "Immutable. Whether to target (`false`) or exclude (`true`) the criterion.", +"type": "boolean" +}, +"resourceName": { +"description": "Immutable. The resource name of the campaign criterion. Campaign criterion resource names have the form: `customers/{customer_id}/campaignCriteria/{campaign_id}~{criterion_id}`", +"type": "string" +}, +"status": { +"description": "The status of the criterion.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"PAUSED", +"REMOVED" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"The campaign criterion is enabled.", +"The campaign criterion is paused.", +"The campaign criterion is removed." +], +"type": "string" +}, +"type": { +"description": "Output only. The type of the criterion.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"KEYWORD", +"PLACEMENT", +"MOBILE_APP_CATEGORY", +"MOBILE_APPLICATION", +"DEVICE", +"LOCATION", +"LISTING_GROUP", +"AD_SCHEDULE", +"AGE_RANGE", +"GENDER", +"INCOME_RANGE", +"PARENTAL_STATUS", +"YOUTUBE_VIDEO", +"YOUTUBE_CHANNEL", +"USER_LIST", +"PROXIMITY", +"TOPIC", +"LISTING_SCOPE", +"LANGUAGE", +"IP_BLOCK", +"CONTENT_LABEL", +"CARRIER", +"USER_INTEREST", +"WEBPAGE", +"OPERATING_SYSTEM_VERSION", +"APP_PAYMENT_MODEL", +"MOBILE_DEVICE", +"CUSTOM_AFFINITY", +"CUSTOM_INTENT", +"LOCATION_GROUP", +"CUSTOM_AUDIENCE", +"COMBINED_AUDIENCE", +"KEYWORD_THEME", +"AUDIENCE", +"LOCAL_SERVICE_ID", +"BRAND", +"BRAND_LIST", +"LIFE_EVENT" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Keyword, for example, 'mars cruise'.", +"Placement, also known as Website, for example, 'www.flowers4sale.com'", +"Mobile application categories to target.", +"Mobile applications to target.", +"Devices to target.", +"Locations to target.", +"Listing groups to target.", +"Ad Schedule.", +"Age range.", +"Gender.", +"Income Range.", +"Parental status.", +"YouTube Video.", +"YouTube Channel.", +"User list.", +"Proximity.", +"A topic target on the display network (for example, \"Pets & Animals\").", +"Listing scope to target.", +"Language.", +"IpBlock.", +"Content Label for category exclusion.", +"Carrier.", +"A category the user is interested in.", +"Webpage criterion for dynamic search ads.", +"Operating system version.", +"App payment model.", +"Mobile device.", +"Custom affinity.", +"Custom intent.", +"Location group.", +"Custom audience", +"Combined audience", +"Smart Campaign keyword theme", +"Audience", +"Local Services Ads Service ID.", +"Brand", +"Brand List", +"Life Event" +], +"readOnly": true, +"type": "string" +}, +"userList": { +"$ref": "GoogleAdsSearchads360V0Common__UserListInfo", +"description": "Immutable. User List." +}, +"webpage": { +"$ref": "GoogleAdsSearchads360V0Common__WebpageInfo", +"description": "Immutable. Webpage." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CampaignLabel": { +"description": "Represents a relationship between a campaign and a label.", +"id": "GoogleAdsSearchads360V0Resources__CampaignLabel", +"properties": { +"campaign": { +"description": "Immutable. The campaign to which the label is attached.", +"type": "string" +}, +"label": { +"description": "Immutable. The label assigned to the campaign.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. Name of the resource. Campaign label resource names have the form: `customers/{customer_id}/campaignLabels/{campaign_id}~{label_id}`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CartDataSalesView": { +"description": "Cart data sales view.", +"id": "GoogleAdsSearchads360V0Resources__CartDataSalesView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the Cart data sales view. Cart data sales view resource names have the form: `customers/{customer_id}/cartDataSalesView`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Conversion": { +"description": "A conversion.", +"id": "GoogleAdsSearchads360V0Resources__Conversion", +"properties": { +"adId": { +"description": "Output only. Ad ID. A value of 0 indicates that the ad is unattributed.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"advertiserConversionId": { +"description": "Output only. For offline conversions, this is an ID provided by advertisers. If an advertiser doesn't specify such an ID, Search Ads 360 generates one. For online conversions, this is equal to the id column or the floodlight_order_id column depending on the advertiser's Floodlight instructions.", +"readOnly": true, +"type": "string" +}, +"assetFieldType": { +"description": "Output only. Asset field type of the conversion event.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"HEADLINE", +"DESCRIPTION", +"MANDATORY_AD_TEXT", +"MARKETING_IMAGE", +"MEDIA_BUNDLE", +"YOUTUBE_VIDEO", +"BOOK_ON_GOOGLE", +"LEAD_FORM", +"PROMOTION", +"CALLOUT", +"STRUCTURED_SNIPPET", +"SITELINK", +"MOBILE_APP", +"HOTEL_CALLOUT", +"CALL", +"PRICE", +"LONG_HEADLINE", +"BUSINESS_NAME", +"SQUARE_MARKETING_IMAGE", +"PORTRAIT_MARKETING_IMAGE", +"LOGO", +"LANDSCAPE_LOGO", +"VIDEO", +"CALL_TO_ACTION_SELECTION", +"AD_IMAGE", +"BUSINESS_LOGO", +"HOTEL_PROPERTY", +"DISCOVERY_CAROUSEL_CARD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The asset is linked for use as a headline.", +"The asset is linked for use as a description.", +"The asset is linked for use as mandatory ad text.", +"The asset is linked for use as a marketing image.", +"The asset is linked for use as a media bundle.", +"The asset is linked for use as a YouTube video.", +"The asset is linked to indicate that a hotels campaign is \"Book on Google\" enabled.", +"The asset is linked for use as a Lead Form extension.", +"The asset is linked for use as a Promotion extension.", +"The asset is linked for use as a Callout extension.", +"The asset is linked for use as a Structured Snippet extension.", +"The asset is linked for use as a Sitelink.", +"The asset is linked for use as a Mobile App extension.", +"The asset is linked for use as a Hotel Callout extension.", +"The asset is linked for use as a Call extension.", +"The asset is linked for use as a Price extension.", +"The asset is linked for use as a long headline.", +"The asset is linked for use as a business name.", +"The asset is linked for use as a square marketing image.", +"The asset is linked for use as a portrait marketing image.", +"The asset is linked for use as a logo.", +"The asset is linked for use as a landscape logo.", +"The asset is linked for use as a non YouTube logo.", +"The asset is linked for use to select a call-to-action.", +"The asset is linked for use to select an ad image.", +"The asset is linked for use as a business logo.", +"The asset is linked for use as a hotel property in a Performance Max for travel goals campaign.", +"The asset is linked for use as a discovery carousel card." +], +"readOnly": true, +"type": "string" +}, +"assetId": { +"description": "Output only. ID of the asset which was interacted with during the conversion event.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"attributionType": { +"description": "Output only. What the conversion is attributed to: Visit or Keyword+Ad.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"VISIT", +"CRITERION_AD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The conversion is attributed to a visit.", +"The conversion is attributed to a criterion and ad pair." +], +"readOnly": true, +"type": "string" +}, +"clickId": { +"description": "Output only. A unique string, for the visit that the conversion is attributed to, that is passed to the landing page as the click id URL parameter.", +"readOnly": true, +"type": "string" +}, +"conversionDateTime": { +"description": "Output only. The timestamp of the conversion event.", +"readOnly": true, +"type": "string" +}, +"conversionLastModifiedDateTime": { +"description": "Output only. The timestamp of the last time the conversion was modified.", +"readOnly": true, +"type": "string" +}, +"conversionQuantity": { +"description": "Output only. The quantity of items recorded by the conversion, as determined by the qty url parameter. The advertiser is responsible for dynamically populating the parameter (such as number of items sold in the conversion), otherwise it defaults to 1.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"conversionRevenueMicros": { +"description": "Output only. The adjusted revenue in micros for the conversion event. This will always be in the currency of the serving account.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"conversionVisitDateTime": { +"description": "Output only. The timestamp of the visit that the conversion is attributed to.", +"readOnly": true, +"type": "string" +}, +"criterionId": { +"description": "Output only. Search Ads 360 criterion ID. A value of 0 indicates that the criterion is unattributed.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"floodlightOrderId": { +"description": "Output only. The Floodlight order ID provided by the advertiser for the conversion.", +"readOnly": true, +"type": "string" +}, +"floodlightOriginalRevenue": { +"description": "Output only. The original, unchanged revenue associated with the Floodlight event (in the currency of the current report), before Floodlight currency instruction modifications.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. The ID of the conversion", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"merchantId": { +"description": "Output only. The SearchAds360 inventory account ID containing the product that was clicked on. SearchAds360 generates this ID when you link an inventory account in SearchAds360.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"productChannel": { +"description": "Output only. The sales channel of the product that was clicked on: Online or Local.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ONLINE", +"LOCAL" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The item is sold online.", +"The item is sold in local stores." +], +"readOnly": true, +"type": "string" +}, +"productCountryCode": { +"description": "Output only. The country (ISO-3166-format) registered for the inventory feed that contains the product clicked on.", +"readOnly": true, +"type": "string" +}, +"productId": { +"description": "Output only. The ID of the product clicked on.", +"readOnly": true, +"type": "string" +}, +"productLanguageCode": { +"description": "Output only. The language (ISO-639-1) that has been set for the Merchant Center feed containing data about the product.", +"readOnly": true, +"type": "string" +}, +"productStoreId": { +"description": "Output only. The store in the Local Inventory Ad that was clicked on. This should match the store IDs used in your local products feed.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the conversion. Conversion resource names have the form: `customers/{customer_id}/conversions/{ad_group_id}~{criterion_id}~{ds_conversion_id}`", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Output only. The status of the conversion, either ENABLED or REMOVED..", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The conversion is enabled.", +"The conversion has been removed." +], +"readOnly": true, +"type": "string" +}, +"visitId": { +"description": "Output only. The SearchAds360 visit ID that the conversion is attributed to.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ConversionAction": { +"description": "A conversion action.", +"id": "GoogleAdsSearchads360V0Resources__ConversionAction", +"properties": { +"appId": { +"description": "App ID for an app conversion action.", +"type": "string" +}, +"attributionModelSettings": { +"$ref": "GoogleAdsSearchads360V0Resources_ConversionAction_AttributionModelSettings", +"description": "Settings related to this conversion action's attribution model." +}, +"category": { +"description": "The category of conversions reported for this conversion action.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"DEFAULT", +"PAGE_VIEW", +"PURCHASE", +"SIGNUP", +"LEAD", +"DOWNLOAD", +"ADD_TO_CART", +"BEGIN_CHECKOUT", +"SUBSCRIBE_PAID", +"PHONE_CALL_LEAD", +"IMPORTED_LEAD", +"SUBMIT_LEAD_FORM", +"BOOK_APPOINTMENT", +"REQUEST_QUOTE", +"GET_DIRECTIONS", +"OUTBOUND_CLICK", +"CONTACT", +"ENGAGEMENT", +"STORE_VISIT", +"STORE_SALE", +"QUALIFIED_LEAD", +"CONVERTED_LEAD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Default category.", +"User visiting a page.", +"Purchase, sales, or \"order placed\" event.", +"Signup user action.", +"Lead-generating action.", +"Software download action (as for an app).", +"The addition of items to a shopping cart or bag on an advertiser site.", +"When someone enters the checkout flow on an advertiser site.", +"The start of a paid subscription for a product or service.", +"A call to indicate interest in an advertiser's offering.", +"A lead conversion imported from an external source into Google Ads.", +"A submission of a form on an advertiser site indicating business interest.", +"A booking of an appointment with an advertiser's business.", +"A quote or price estimate request.", +"A search for an advertiser's business location with intention to visit.", +"A click to an advertiser's partner's site.", +"A call, SMS, email, chat or other type of contact to an advertiser.", +"A website engagement event such as long site time or a Google Analytics (GA) Smart Goal. Intended to be used for GA, Firebase, GA Gold goal imports.", +"A visit to a physical store location.", +"A sale occurring in a physical store.", +"A lead conversion imported from an external source into Google Ads, that has been further qualified by the advertiser (marketing/sales team). In the lead-to-sale journey, advertisers get leads, then act on them by reaching out to the consumer. If the consumer is interested and may end up buying their product, the advertiser marks such leads as \"qualified leads\".", +"A lead conversion imported from an external source into Google Ads, that has further completed a chosen stage as defined by the lead gen advertiser." +], +"type": "string" +}, +"clickThroughLookbackWindowDays": { +"description": "The maximum number of days that may elapse between an interaction (for example, a click) and a conversion event.", +"format": "int64", +"type": "string" +}, +"creationTime": { +"description": "Output only. Timestamp of the Floodlight activity's creation, formatted in ISO 8601.", +"readOnly": true, +"type": "string" +}, +"floodlightSettings": { +"$ref": "GoogleAdsSearchads360V0Resources_ConversionAction_FloodlightSettings", +"description": "Output only. Floodlight settings for Floodlight conversion types.", +"readOnly": true +}, +"id": { +"description": "Output only. The ID of the conversion action.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"includeInClientAccountConversionsMetric": { +"description": "Whether this conversion action should be included in the \"client_account_conversions\" metric.", +"type": "boolean" +}, +"includeInConversionsMetric": { +"description": "Output only. Whether this conversion action should be included in the \"conversions\" metric.", +"readOnly": true, +"type": "boolean" +}, +"name": { +"description": "The name of the conversion action. This field is required and should not be empty when creating new conversion actions.", +"type": "string" +}, +"ownerCustomer": { +"description": "Output only. The resource name of the conversion action owner customer, or null if this is a system-defined conversion action.", +"readOnly": true, +"type": "string" +}, +"primaryForGoal": { +"description": "If a conversion action's primary_for_goal bit is false, the conversion action is non-biddable for all campaigns regardless of their customer conversion goal or campaign conversion goal. However, custom conversion goals do not respect primary_for_goal, so if a campaign has a custom conversion goal configured with a primary_for_goal = false conversion action, that conversion action is still biddable. By default, primary_for_goal will be true if not set. In V9, primary_for_goal can only be set to false after creation through an 'update' operation because it's not declared as optional.", +"type": "boolean" +}, +"resourceName": { +"description": "Immutable. The resource name of the conversion action. Conversion action resource names have the form: `customers/{customer_id}/conversionActions/{conversion_action_id}`", +"type": "string" +}, +"status": { +"description": "The status of this conversion action for conversion event accrual.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED", +"HIDDEN" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Conversions will be recorded.", +"Conversions will not be recorded.", +"Conversions will not be recorded and the conversion action will not appear in the UI." +], +"type": "string" +}, +"type": { +"description": "Immutable. The type of this conversion action.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"AD_CALL", +"CLICK_TO_CALL", +"GOOGLE_PLAY_DOWNLOAD", +"GOOGLE_PLAY_IN_APP_PURCHASE", +"UPLOAD_CALLS", +"UPLOAD_CLICKS", +"WEBPAGE", +"WEBSITE_CALL", +"STORE_SALES_DIRECT_UPLOAD", +"STORE_SALES", +"FIREBASE_ANDROID_FIRST_OPEN", +"FIREBASE_ANDROID_IN_APP_PURCHASE", +"FIREBASE_ANDROID_CUSTOM", +"FIREBASE_IOS_FIRST_OPEN", +"FIREBASE_IOS_IN_APP_PURCHASE", +"FIREBASE_IOS_CUSTOM", +"THIRD_PARTY_APP_ANALYTICS_ANDROID_FIRST_OPEN", +"THIRD_PARTY_APP_ANALYTICS_ANDROID_IN_APP_PURCHASE", +"THIRD_PARTY_APP_ANALYTICS_ANDROID_CUSTOM", +"THIRD_PARTY_APP_ANALYTICS_IOS_FIRST_OPEN", +"THIRD_PARTY_APP_ANALYTICS_IOS_IN_APP_PURCHASE", +"THIRD_PARTY_APP_ANALYTICS_IOS_CUSTOM", +"ANDROID_APP_PRE_REGISTRATION", +"ANDROID_INSTALLS_ALL_OTHER_APPS", +"FLOODLIGHT_ACTION", +"FLOODLIGHT_TRANSACTION", +"GOOGLE_HOSTED", +"LEAD_FORM_SUBMIT", +"SALESFORCE", +"SEARCH_ADS_360", +"SMART_CAMPAIGN_AD_CLICKS_TO_CALL", +"SMART_CAMPAIGN_MAP_CLICKS_TO_CALL", +"SMART_CAMPAIGN_MAP_DIRECTIONS", +"SMART_CAMPAIGN_TRACKED_CALLS", +"STORE_VISITS", +"WEBPAGE_CODELESS", +"UNIVERSAL_ANALYTICS_GOAL", +"UNIVERSAL_ANALYTICS_TRANSACTION", +"GOOGLE_ANALYTICS_4_CUSTOM", +"GOOGLE_ANALYTICS_4_PURCHASE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Conversions that occur when a user clicks on an ad's call extension.", +"Conversions that occur when a user on a mobile device clicks a phone number.", +"Conversions that occur when a user downloads a mobile app from the Google Play Store.", +"Conversions that occur when a user makes a purchase in an app through Android billing.", +"Call conversions that are tracked by the advertiser and uploaded.", +"Conversions that are tracked by the advertiser and uploaded with attributed clicks.", +"Conversions that occur on a webpage.", +"Conversions that occur when a user calls a dynamically-generated phone number from an advertiser's website.", +"Store Sales conversion based on first-party or third-party merchant data uploads. Only customers on the allowlist can use store sales direct upload types.", +"Store Sales conversion based on first-party or third-party merchant data uploads and/or from in-store purchases using cards from payment networks. Only customers on the allowlist can use store sales types. Read only.", +"Android app first open conversions tracked through Firebase.", +"Android app in app purchase conversions tracked through Firebase.", +"Android app custom conversions tracked through Firebase.", +"iOS app first open conversions tracked through Firebase.", +"iOS app in app purchase conversions tracked through Firebase.", +"iOS app custom conversions tracked through Firebase.", +"Android app first open conversions tracked through Third Party App Analytics.", +"Android app in app purchase conversions tracked through Third Party App Analytics.", +"Android app custom conversions tracked through Third Party App Analytics.", +"iOS app first open conversions tracked through Third Party App Analytics.", +"iOS app in app purchase conversions tracked through Third Party App Analytics.", +"iOS app custom conversions tracked through Third Party App Analytics.", +"Conversions that occur when a user pre-registers a mobile app from the Google Play Store. Read only.", +"Conversions that track all Google Play downloads which aren't tracked by an app-specific type. Read only.", +"Floodlight activity that counts the number of times that users have visited a particular webpage after seeing or clicking on one of an advertiser's ads. Read only.", +"Floodlight activity that tracks the number of sales made or the number of items purchased. Can also capture the total value of each sale. Read only.", +"Conversions that track local actions from Google's products and services after interacting with an ad. Read only.", +"Conversions reported when a user submits a lead form. Read only.", +"Conversions that come from Salesforce. Read only.", +"Conversions imported from Search Ads 360 Floodlight data. Read only.", +"Call conversions that occur on Smart campaign Ads without call tracking setup, using Smart campaign custom criteria. Read only.", +"The user clicks on a call element within Google Maps. Smart campaign only. Read only.", +"The user requests directions to a business location within Google Maps. Smart campaign only. Read only.", +"Call conversions that occur on Smart campaign Ads with call tracking setup, using Smart campaign custom criteria. Read only.", +"Conversions that occur when a user visits an advertiser's retail store. Read only.", +"Conversions created from website events (such as form submissions or page loads), that don't use individually coded event snippets. Read only.", +"Conversions that come from linked Universal Analytics goals.", +"Conversions that come from linked Universal Analytics transactions.", +"Conversions that come from linked Google Analytics 4 custom event conversions.", +"Conversions that come from linked Google Analytics 4 purchase conversions." +], +"type": "string" +}, +"valueSettings": { +"$ref": "GoogleAdsSearchads360V0Resources_ConversionAction_ValueSettings", +"description": "Settings related to the value for conversion events associated with this conversion action." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ConversionCustomVariable": { +"description": "A conversion custom variable. See \"About custom Floodlight metrics and dimensions in the new Search Ads 360\" at https://support.google.com/sa360/answer/13567857", +"id": "GoogleAdsSearchads360V0Resources__ConversionCustomVariable", +"properties": { +"cardinality": { +"description": "Output only. Cardinality of the conversion custom variable.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"BELOW_ALL_LIMITS", +"EXCEEDS_SEGMENTATION_LIMIT_BUT_NOT_STATS_LIMIT", +"APPROACHES_STATS_LIMIT", +"EXCEEDS_STATS_LIMIT" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The conversion custom variable has cardinality below all limits. The variable can be used for segmentation, and stats can accrue for new values if the variable is enabled.", +"The conversion custom variable has cardinality that exceeds the segmentation limit, but does not exceed the stats limit. Segmentation will be disabled, but stats can accrue for new values if the variable is enabled.", +"The conversion custom variable has exceeded the segmentation limits, and is approaching the stats limits (> 90%). Segmentation will be disabled, but stats can accrue for new values if the variable is enabled.", +"The conversion custom variable has exceeded both the segmentation limits and stats limits. Segmentation will be disabled, and stats for enabled variables can accrue only if the existing values do not increase the cardinality of the variable any further." +], +"readOnly": true, +"type": "string" +}, +"customColumnIds": { +"description": "Output only. The IDs of custom columns that use this conversion custom variable.", +"items": { +"format": "int64", +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"family": { +"description": "Output only. Family of the conversion custom variable.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"STANDARD", +"FLOODLIGHT" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The standard conversion custom variable. Customers are required to activate before use.", +"The conversion custom variable imported from a custom floodlight variable." +], +"readOnly": true, +"type": "string" +}, +"floodlightConversionCustomVariableInfo": { +"$ref": "GoogleAdsSearchads360V0Resources_ConversionCustomVariable_FloodlightConversionCustomVariableInfo", +"description": "Output only. Fields for Search Ads 360 floodlight conversion custom variables.", +"readOnly": true +}, +"id": { +"description": "Output only. The ID of the conversion custom variable.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Required. The name of the conversion custom variable. Name should be unique. The maximum length of name is 100 characters. There should not be any extra spaces before and after.", +"type": "string" +}, +"ownerCustomer": { +"description": "Output only. The resource name of the customer that owns the conversion custom variable.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the conversion custom variable. Conversion custom variable resource names have the form: `customers/{customer_id}/conversionCustomVariables/{conversion_custom_variable_id}`", +"type": "string" +}, +"status": { +"description": "The status of the conversion custom variable for conversion event accrual.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ACTIVATION_NEEDED", +"ENABLED", +"PAUSED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The conversion custom variable is pending activation and will not accrue stats until set to ENABLED. This status can't be used in CREATE and UPDATE requests.", +"The conversion custom variable is enabled and will accrue stats.", +"The conversion custom variable is paused and will not accrue stats until set to ENABLED again." +], +"type": "string" +}, +"tag": { +"description": "Required. Immutable. The tag of the conversion custom variable. Tag should be unique and consist of a \"u\" character directly followed with a number less than ormequal to 100. For example: \"u4\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ConversionTrackingSetting": { +"description": "A collection of customer-wide settings related to Search Ads 360 Conversion Tracking.", +"id": "GoogleAdsSearchads360V0Resources__ConversionTrackingSetting", +"properties": { +"acceptedCustomerDataTerms": { +"description": "Output only. Whether the customer has accepted customer data terms. If using cross-account conversion tracking, this value is inherited from the manager. This field is read-only. For more information, see https://support.google.com/adspolicy/answer/7475709.", +"readOnly": true, +"type": "boolean" +}, +"conversionTrackingId": { +"description": "Output only. The conversion tracking id used for this account. This id doesn't indicate whether the customer uses conversion tracking (conversion_tracking_status does). This field is read-only.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"conversionTrackingStatus": { +"description": "Output only. Conversion tracking status. It indicates whether the customer is using conversion tracking, and who is the conversion tracking owner of this customer. If this customer is using cross-account conversion tracking, the value returned will differ based on the `login-customer-id` of the request.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"NOT_CONVERSION_TRACKED", +"CONVERSION_TRACKING_MANAGED_BY_SELF", +"CONVERSION_TRACKING_MANAGED_BY_THIS_MANAGER", +"CONVERSION_TRACKING_MANAGED_BY_ANOTHER_MANAGER" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Customer does not use any conversion tracking.", +"The conversion actions are created and managed by this customer.", +"The conversion actions are created and managed by the manager specified in the request's `login-customer-id`.", +"The conversion actions are created and managed by a manager different from the customer or manager specified in the request's `login-customer-id`." +], +"readOnly": true, +"type": "string" +}, +"crossAccountConversionTrackingId": { +"description": "Output only. The conversion tracking id of the customer's manager. This is set when the customer is opted into cross-account conversion tracking, and it overrides conversion_tracking_id.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"enhancedConversionsForLeadsEnabled": { +"description": "Output only. Whether the customer is opted-in for enhanced conversions for leads. If using cross-account conversion tracking, this value is inherited from the manager. This field is read-only.", +"readOnly": true, +"type": "boolean" +}, +"googleAdsConversionCustomer": { +"description": "Output only. The resource name of the customer where conversions are created and managed. This field is read-only.", +"readOnly": true, +"type": "string" +}, +"googleAdsCrossAccountConversionTrackingId": { +"description": "Output only. The conversion tracking id of the customer's manager. This is set when the customer is opted into conversion tracking, and it overrides conversion_tracking_id. This field can only be managed through the Google Ads UI. This field is read-only.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CustomColumn": { +"description": "A custom column. See Search Ads 360 custom column at https://support.google.com/sa360/answer/9633916", +"id": "GoogleAdsSearchads360V0Resources__CustomColumn", +"properties": { +"description": { +"description": "Output only. User-defined description of the custom column.", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. ID of the custom column.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. User-defined name of the custom column.", +"readOnly": true, +"type": "string" +}, +"queryable": { +"description": "Output only. True when the custom column is available to be used in the query of SearchAds360Service.Search and SearchAds360Service.SearchStream.", +"readOnly": true, +"type": "boolean" +}, +"referencedSystemColumns": { +"description": "Output only. The list of the referenced system columns of this custom column. For example, A custom column \"sum of impressions and clicks\" has referenced system columns of {\"metrics.clicks\", \"metrics.impressions\"}.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"referencesAttributes": { +"description": "Output only. True when the custom column is referring to one or more attributes.", +"readOnly": true, +"type": "boolean" +}, +"referencesMetrics": { +"description": "Output only. True when the custom column is referring to one or more metrics.", +"readOnly": true, +"type": "boolean" +}, +"resourceName": { +"description": "Immutable. The resource name of the custom column. Custom column resource names have the form: `customers/{customer_id}/customColumns/{custom_column_id}`", +"type": "string" +}, +"valueType": { +"description": "Output only. The type of the result value of the custom column.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"STRING", +"INT64", +"DOUBLE", +"BOOLEAN" +], +"enumDescriptions": [ +"Not specified.", +"Unknown.", +"The custom column value is a string.", +"The custom column value is an int64 number.", +"The custom column value is a double number.", +"The custom column value is a boolean." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Customer": { +"description": "A customer.", +"id": "GoogleAdsSearchads360V0Resources__Customer", +"properties": { +"accountStatus": { +"description": "Output only. Account status, for example, Enabled, Paused, Removed, etc.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"PAUSED", +"SUSPENDED", +"REMOVED", +"DRAFT" +], +"enumDescriptions": [ +"Default value.", +"Unknown value.", +"Account is able to serve ads.", +"Account is deactivated by the user.", +"Account is deactivated by an internal process.", +"Account is irrevocably deactivated.", +"Account is still in the process of setup, not ENABLED yet." +], +"readOnly": true, +"type": "string" +}, +"accountType": { +"description": "Output only. Engine account type, for example, Google Ads, Microsoft Advertising, Yahoo Japan, Baidu, Facebook, Engine Track, etc.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"BAIDU", +"ENGINE_TRACK", +"FACEBOOK", +"FACEBOOK_GATEWAY", +"GOOGLE_ADS", +"MICROSOFT", +"SEARCH_ADS_360", +"YAHOO_JAPAN" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Baidu account.", +"Engine track account.", +"Facebook account.", +"Facebook account managed through gateway.", +"Google Ads account.", +"Microsoft Advertising account.", +"Search Ads 360 manager account.", +"Yahoo Japan account." +], +"readOnly": true, +"type": "string" +}, +"autoTaggingEnabled": { +"description": "Whether auto-tagging is enabled for the customer.", +"type": "boolean" +}, +"conversionTrackingSetting": { +"$ref": "GoogleAdsSearchads360V0Resources__ConversionTrackingSetting", +"description": "Output only. Conversion tracking setting for a customer.", +"readOnly": true +}, +"creationTime": { +"description": "Output only. The timestamp when this customer was created. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", +"readOnly": true, +"type": "string" +}, +"currencyCode": { +"description": "Immutable. The currency in which the account operates. A subset of the currency codes from the ISO 4217 standard is supported.", +"type": "string" +}, +"descriptiveName": { +"description": "Optional, non-unique descriptive name of the customer.", +"type": "string" +}, +"doubleClickCampaignManagerSetting": { +"$ref": "GoogleAdsSearchads360V0Resources__DoubleClickCampaignManagerSetting", +"description": "Output only. DoubleClick Campaign Manager (DCM) setting for a manager customer.", +"readOnly": true +}, +"engineId": { +"description": "Output only. ID of the account in the external engine account.", +"readOnly": true, +"type": "string" +}, +"finalUrlSuffix": { +"description": "The URL template for appending params to the final URL.", +"type": "string" +}, +"id": { +"description": "Output only. The ID of the customer.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"lastModifiedTime": { +"description": "Output only. The datetime when this customer was last modified. The datetime is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss.ssssss\" format.", +"readOnly": true, +"type": "string" +}, +"manager": { +"description": "Output only. Whether the customer is a manager.", +"readOnly": true, +"type": "boolean" +}, +"resourceName": { +"description": "Immutable. The resource name of the customer. Customer resource names have the form: `customers/{customer_id}`", +"type": "string" +}, +"status": { +"description": "Output only. The status of the customer.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"CANCELED", +"SUSPENDED", +"CLOSED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Indicates an active account able to serve ads.", +"Indicates a canceled account unable to serve ads. Can be reactivated by an admin user.", +"Indicates a suspended account unable to serve ads. May only be activated by Google support.", +"Indicates a closed account unable to serve ads. Test account will also have CLOSED status. Status is permanent and may not be reopened." +], +"readOnly": true, +"type": "string" +}, +"timeZone": { +"description": "Immutable. The local timezone ID of the customer.", +"type": "string" +}, +"trackingUrlTemplate": { +"description": "The URL template for constructing a tracking URL out of parameters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CustomerAsset": { +"description": "A link between a customer and an asset.", +"id": "GoogleAdsSearchads360V0Resources__CustomerAsset", +"properties": { +"asset": { +"description": "Required. Immutable. The asset which is linked to the customer.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the customer asset. CustomerAsset resource names have the form: `customers/{customer_id}/customerAssets/{asset_id}~{field_type}`", +"type": "string" +}, +"status": { +"description": "Status of the customer asset.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED", +"PAUSED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Asset link is enabled.", +"Asset link has been removed.", +"Asset link is paused." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CustomerAssetSet": { +"description": "CustomerAssetSet is the linkage between a customer and an asset set. Adding a CustomerAssetSet links an asset set with a customer.", +"id": "GoogleAdsSearchads360V0Resources__CustomerAssetSet", +"properties": { +"assetSet": { +"description": "Immutable. The asset set which is linked to the customer.", +"type": "string" +}, +"customer": { +"description": "Immutable. The customer to which this asset set is linked.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the customer asset set. Asset set asset resource names have the form: `customers/{customer_id}/customerAssetSets/{asset_set_id}`", +"type": "string" +}, +"status": { +"description": "Output only. The status of the customer asset set asset. Read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED" +], +"enumDescriptions": [ +"The status has not been specified.", +"The received value is not known in this version. This is a response-only value.", +"The linkage between asset set and its container is enabled.", +"The linkage between asset set and its container is removed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CustomerClient": { +"description": "A link between the given customer and a client customer. CustomerClients only exist for manager customers. All direct and indirect client customers are included, as well as the manager itself.", +"id": "GoogleAdsSearchads360V0Resources__CustomerClient", +"properties": { +"appliedLabels": { +"description": "Output only. The resource names of the labels owned by the requesting customer that are applied to the client customer. Label resource names have the form: `customers/{customer_id}/labels/{label_id}`", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"clientCustomer": { +"description": "Output only. The resource name of the client-customer which is linked to the given customer. Read only.", +"readOnly": true, +"type": "string" +}, +"currencyCode": { +"description": "Output only. Currency code (for example, 'USD', 'EUR') for the client. Read only.", +"readOnly": true, +"type": "string" +}, +"descriptiveName": { +"description": "Output only. Descriptive name for the client. Read only.", +"readOnly": true, +"type": "string" +}, +"hidden": { +"description": "Output only. Specifies whether this is a hidden account. Read only.", +"readOnly": true, +"type": "boolean" +}, +"id": { +"description": "Output only. The ID of the client customer. Read only.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"level": { +"description": "Output only. Distance between given customer and client. For self link, the level value will be 0. Read only.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"manager": { +"description": "Output only. Identifies if the client is a manager. Read only.", +"readOnly": true, +"type": "boolean" +}, +"resourceName": { +"description": "Output only. The resource name of the customer client. CustomerClient resource names have the form: `customers/{customer_id}/customerClients/{client_customer_id}`", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Output only. The status of the client customer. Read only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"CANCELED", +"SUSPENDED", +"CLOSED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Indicates an active account able to serve ads.", +"Indicates a canceled account unable to serve ads. Can be reactivated by an admin user.", +"Indicates a suspended account unable to serve ads. May only be activated by Google support.", +"Indicates a closed account unable to serve ads. Test account will also have CLOSED status. Status is permanent and may not be reopened." +], +"readOnly": true, +"type": "string" +}, +"testAccount": { +"description": "Output only. Identifies if the client is a test account. Read only.", +"readOnly": true, +"type": "boolean" +}, +"timeZone": { +"description": "Output only. Common Locale Data Repository (CLDR) string representation of the time zone of the client, for example, America/Los_Angeles. Read only.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__CustomerManagerLink": { +"description": "Represents customer-manager link relationship.", +"id": "GoogleAdsSearchads360V0Resources__CustomerManagerLink", +"properties": { +"managerCustomer": { +"description": "Output only. The manager customer linked to the customer.", +"readOnly": true, +"type": "string" +}, +"managerLinkId": { +"description": "Output only. ID of the customer-manager link. This field is read only.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Immutable. Name of the resource. CustomerManagerLink resource names have the form: `customers/{customer_id}/customerManagerLinks/{manager_customer_id}~{manager_link_id}`", +"type": "string" +}, +"status": { +"description": "Status of the link between the customer and the manager.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ACTIVE", +"INACTIVE", +"PENDING", +"REFUSED", +"CANCELED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Indicates current in-effect relationship", +"Indicates terminated relationship", +"Indicates relationship has been requested by manager, but the client hasn't accepted yet.", +"Relationship was requested by the manager, but the client has refused.", +"Indicates relationship has been requested by manager, but manager canceled it." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__DoubleClickCampaignManagerSetting": { +"description": "DoubleClick Campaign Manager (DCM) setting for a manager customer.", +"id": "GoogleAdsSearchads360V0Resources__DoubleClickCampaignManagerSetting", +"properties": { +"advertiserId": { +"description": "Output only. ID of the Campaign Manager advertiser associated with this customer.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"networkId": { +"description": "Output only. ID of the Campaign Manager network associated with this customer.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"timeZone": { +"description": "Output only. Time zone of the Campaign Manager network associated with this customer in IANA Time Zone Database format, such as America/New_York.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__DynamicSearchAdsSearchTermView": { +"description": "A dynamic search ads search term view.", +"id": "GoogleAdsSearchads360V0Resources__DynamicSearchAdsSearchTermView", +"properties": { +"landingPage": { +"description": "Output only. The dynamically selected landing page URL of the impression. This field is read-only.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the dynamic search ads search term view. Dynamic search ads search term view resource names have the form: `customers/{customer_id}/dynamicSearchAdsSearchTermViews/{ad_group_id}~{search_term_fingerprint}~{headline_fingerprint}~{landing_page_fingerprint}~{page_url_fingerprint}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__GenderView": { +"description": "A gender view. The gender_view resource reflects the effective serving state, rather than what criteria were added. An ad group without gender criteria by default shows to all genders, so all genders appear in gender_view with stats.", +"id": "GoogleAdsSearchads360V0Resources__GenderView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the gender view. Gender view resource names have the form: `customers/{customer_id}/genderViews/{ad_group_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__GeoTargetConstant": { +"description": "A geo target constant.", +"id": "GoogleAdsSearchads360V0Resources__GeoTargetConstant", +"properties": { +"canonicalName": { +"description": "Output only. The fully qualified English name, consisting of the target's name and that of its parent and country.", +"readOnly": true, +"type": "string" +}, +"countryCode": { +"description": "Output only. The ISO-3166-1 alpha-2 country code that is associated with the target.", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. The ID of the geo target constant.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. Geo target constant English name.", +"readOnly": true, +"type": "string" +}, +"parentGeoTarget": { +"description": "Output only. The resource name of the parent geo target constant. Geo target constant resource names have the form: `geoTargetConstants/{parent_geo_target_constant_id}`", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the geo target constant. Geo target constant resource names have the form: `geoTargetConstants/{geo_target_constant_id}`", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Output only. Geo target constant status.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVAL_PLANNED" +], +"enumDescriptions": [ +"No value has been specified.", +"The received value is not known in this version. This is a response-only value.", +"The geo target constant is valid.", +"The geo target constant is obsolete and will be removed." +], +"readOnly": true, +"type": "string" +}, +"targetType": { +"description": "Output only. Geo target constant target type.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__KeywordView": { +"description": "A keyword view.", +"id": "GoogleAdsSearchads360V0Resources__KeywordView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the keyword view. Keyword view resource names have the form: `customers/{customer_id}/keywordViews/{ad_group_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Label": { +"description": "A label.", +"id": "GoogleAdsSearchads360V0Resources__Label", +"properties": { +"id": { +"description": "Output only. ID of the label. Read only.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The name of the label. This field is required and should not be empty when creating a new label. The length of this string should be between 1 and 80, inclusive.", +"type": "string" +}, +"resourceName": { +"description": "Immutable. Name of the resource. Label resource names have the form: `customers/{customer_id}/labels/{label_id}`", +"type": "string" +}, +"status": { +"description": "Output only. Status of the label. Read only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ENABLED", +"REMOVED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Label is enabled.", +"Label is removed." +], +"readOnly": true, +"type": "string" +}, +"textLabel": { +"$ref": "GoogleAdsSearchads360V0Common__TextLabel", +"description": "A type of label displaying text on a colored background." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__LanguageConstant": { +"description": "A language.", +"id": "GoogleAdsSearchads360V0Resources__LanguageConstant", +"properties": { +"code": { +"description": "Output only. The language code, for example, \"en_US\", \"en_AU\", \"es\", \"fr\", etc.", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. The ID of the language constant.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The full name of the language in English, for example, \"English (US)\", \"Spanish\", etc.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the language constant. Language constant resource names have the form: `languageConstants/{criterion_id}`", +"readOnly": true, +"type": "string" +}, +"targetable": { +"description": "Output only. Whether the language is targetable.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ListingGroupFilterDimension": { +"description": "Listing dimensions for the asset group listing group filter.", +"id": "GoogleAdsSearchads360V0Resources__ListingGroupFilterDimension", +"properties": { +"productBiddingCategory": { +"$ref": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductBiddingCategory", +"description": "Bidding category of a product offer." +}, +"productBrand": { +"$ref": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductBrand", +"description": "Brand of a product offer." +}, +"productChannel": { +"$ref": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductChannel", +"description": "Locality of a product offer." +}, +"productCondition": { +"$ref": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductCondition", +"description": "Condition of a product offer." +}, +"productCustomAttribute": { +"$ref": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductCustomAttribute", +"description": "Custom attribute of a product offer." +}, +"productItemId": { +"$ref": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductItemId", +"description": "Item id of a product offer." +}, +"productType": { +"$ref": "GoogleAdsSearchads360V0Resources_ListingGroupFilterDimension_ProductType", +"description": "Type of a product offer." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ListingGroupFilterDimensionPath": { +"description": "The path defining of dimensions defining a listing group filter.", +"id": "GoogleAdsSearchads360V0Resources__ListingGroupFilterDimensionPath", +"properties": { +"dimensions": { +"description": "Output only. The complete path of dimensions through the listing group filter hierarchy (excluding the root node) to this listing group filter.", +"items": { +"$ref": "GoogleAdsSearchads360V0Resources__ListingGroupFilterDimension" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__LocationView": { +"description": "A location view summarizes the performance of campaigns by a Location criterion.", +"id": "GoogleAdsSearchads360V0Resources__LocationView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the location view. Location view resource names have the form: `customers/{customer_id}/locationViews/{campaign_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ProductBiddingCategoryConstant": { +"description": "A Product Bidding Category.", +"id": "GoogleAdsSearchads360V0Resources__ProductBiddingCategoryConstant", +"properties": { +"countryCode": { +"description": "Output only. Two-letter upper-case country code of the product bidding category.", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. ID of the product bidding category. This ID is equivalent to the google_product_category ID as described in this article: https://support.google.com/merchants/answer/6324436.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"languageCode": { +"description": "Output only. Language code of the product bidding category.", +"readOnly": true, +"type": "string" +}, +"level": { +"description": "Output only. Level of the product bidding category.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"LEVEL1", +"LEVEL2", +"LEVEL3", +"LEVEL4", +"LEVEL5" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"Level 1.", +"Level 2.", +"Level 3.", +"Level 4.", +"Level 5." +], +"readOnly": true, +"type": "string" +}, +"localizedName": { +"description": "Output only. Display value of the product bidding category localized according to language_code.", +"readOnly": true, +"type": "string" +}, +"productBiddingCategoryConstantParent": { +"description": "Output only. Resource name of the parent product bidding category.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the product bidding category. Product bidding category resource names have the form: `productBiddingCategoryConstants/{country_code}~{level}~{id}`", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Output only. Status of the product bidding category.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ACTIVE", +"OBSOLETE" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The category is active and can be used for bidding.", +"The category is obsolete. Used only for reporting purposes." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ProductGroupView": { +"description": "A product group view.", +"id": "GoogleAdsSearchads360V0Resources__ProductGroupView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the product group view. Product group view resource names have the form: `customers/{customer_id}/productGroupViews/{ad_group_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__SearchAds360Field": { +"description": "A field or resource (artifact) used by SearchAds360Service.", +"id": "GoogleAdsSearchads360V0Resources__SearchAds360Field", +"properties": { +"attributeResources": { +"description": "Output only. The names of all resources that are selectable with the described artifact. Fields from these resources do not segment metrics when included in search queries. This field is only set for artifacts whose category is RESOURCE.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"category": { +"description": "Output only. The category of the artifact.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"RESOURCE", +"ATTRIBUTE", +"SEGMENT", +"METRIC" +], +"enumDescriptions": [ +"Unspecified", +"Unknown", +"The described artifact is a resource.", +"The described artifact is a field and is an attribute of a resource. Including a resource attribute field in a query may segment the query if the resource to which it is attributed segments the resource found in the FROM clause.", +"The described artifact is a field and always segments search queries.", +"The described artifact is a field and is a metric. It never segments search queries." +], +"readOnly": true, +"type": "string" +}, +"dataType": { +"description": "Output only. This field determines the operators that can be used with the artifact in WHERE clauses.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"BOOLEAN", +"DATE", +"DOUBLE", +"ENUM", +"FLOAT", +"INT32", +"INT64", +"MESSAGE", +"RESOURCE_NAME", +"STRING", +"UINT64" +], +"enumDescriptions": [ +"Unspecified", +"Unknown", +"Maps to google.protobuf.BoolValue Applicable operators: =, !=", +"Maps to google.protobuf.StringValue. It can be compared using the set of operators specific to dates however. Applicable operators: =, <, >, <=, >=, BETWEEN, DURING, and IN", +"Maps to google.protobuf.DoubleValue Applicable operators: =, !=, <, >, IN, NOT IN", +"Maps to an enum. It's specific definition can be found at type_url. Applicable operators: =, !=, IN, NOT IN", +"Maps to google.protobuf.FloatValue Applicable operators: =, !=, <, >, IN, NOT IN", +"Maps to google.protobuf.Int32Value Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN", +"Maps to google.protobuf.Int64Value Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN", +"Maps to a protocol buffer message type. The data type's details can be found in type_url. No operators work with MESSAGE fields.", +"Maps to google.protobuf.StringValue. Represents the resource name (unique id) of a resource or one of its foreign keys. No operators work with RESOURCE_NAME fields.", +"Maps to google.protobuf.StringValue. Applicable operators: =, !=, LIKE, NOT LIKE, IN, NOT IN", +"Maps to google.protobuf.UInt64Value Applicable operators: =, !=, <, >, <=, >=, BETWEEN, IN, NOT IN" +], +"readOnly": true, +"type": "string" +}, +"enumValues": { +"description": "Output only. Values the artifact can assume if it is a field of type ENUM. This field is only set for artifacts of category SEGMENT or ATTRIBUTE.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"filterable": { +"description": "Output only. Whether the artifact can be used in a WHERE clause in search queries.", +"readOnly": true, +"type": "boolean" +}, +"isRepeated": { +"description": "Output only. Whether the field artifact is repeated.", +"readOnly": true, +"type": "boolean" +}, +"metrics": { +"description": "Output only. This field lists the names of all metrics that are selectable with the described artifact when it is used in the FROM clause. It is only set for artifacts whose category is RESOURCE.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The name of the artifact.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the artifact. Artifact resource names have the form: `SearchAds360Fields/{name}`", +"readOnly": true, +"type": "string" +}, +"segments": { +"description": "Output only. This field lists the names of all artifacts, whether a segment or another resource, that segment metrics when included in search queries and when the described artifact is used in the FROM clause. It is only set for artifacts whose category is RESOURCE.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"selectable": { +"description": "Output only. Whether the artifact can be used in a SELECT clause in search queries.", +"readOnly": true, +"type": "boolean" +}, +"selectableWith": { +"description": "Output only. The names of all resources, segments, and metrics that are selectable with the described artifact.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"sortable": { +"description": "Output only. Whether the artifact can be used in a ORDER BY clause in search queries.", +"readOnly": true, +"type": "boolean" +}, +"typeUrl": { +"description": "Output only. The URL of proto describing the artifact's data type.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__ShoppingPerformanceView": { +"description": "Shopping performance view. Provides Shopping campaign statistics aggregated at several product dimension levels. Product dimension values from Merchant Center such as brand, category, custom attributes, product condition and product type will reflect the state of each dimension as of the date and time when the corresponding event was recorded.", +"id": "GoogleAdsSearchads360V0Resources__ShoppingPerformanceView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the Shopping performance view. Shopping performance view resource names have the form: `customers/{customer_id}/shoppingPerformanceView`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__UserList": { +"description": "A user list. This is a list of users a customer may target.", +"id": "GoogleAdsSearchads360V0Resources__UserList", +"properties": { +"id": { +"description": "Output only. Id of the user list.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Name of this user list. Depending on its access_reason, the user list name may not be unique (for example, if access_reason=SHARED)", +"type": "string" +}, +"resourceName": { +"description": "Immutable. The resource name of the user list. User list resource names have the form: `customers/{customer_id}/userLists/{user_list_id}`", +"type": "string" +}, +"type": { +"description": "Output only. Type of this list. This field is read-only.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"REMARKETING", +"LOGICAL", +"EXTERNAL_REMARKETING", +"RULE_BASED", +"SIMILAR", +"CRM_BASED" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"UserList represented as a collection of conversion types.", +"UserList represented as a combination of other user lists/interests.", +"UserList created in the Google Ad Manager platform.", +"UserList associated with a rule.", +"UserList with users similar to users of another UserList.", +"UserList of first-party CRM data provided by advertiser in the form of emails or other formats." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__Visit": { +"description": "A visit.", +"id": "GoogleAdsSearchads360V0Resources__Visit", +"properties": { +"adId": { +"description": "Output only. Ad ID. A value of 0 indicates that the ad is unattributed.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"assetFieldType": { +"description": "Output only. Asset field type of the visit event.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"HEADLINE", +"DESCRIPTION", +"MANDATORY_AD_TEXT", +"MARKETING_IMAGE", +"MEDIA_BUNDLE", +"YOUTUBE_VIDEO", +"BOOK_ON_GOOGLE", +"LEAD_FORM", +"PROMOTION", +"CALLOUT", +"STRUCTURED_SNIPPET", +"SITELINK", +"MOBILE_APP", +"HOTEL_CALLOUT", +"CALL", +"PRICE", +"LONG_HEADLINE", +"BUSINESS_NAME", +"SQUARE_MARKETING_IMAGE", +"PORTRAIT_MARKETING_IMAGE", +"LOGO", +"LANDSCAPE_LOGO", +"VIDEO", +"CALL_TO_ACTION_SELECTION", +"AD_IMAGE", +"BUSINESS_LOGO", +"HOTEL_PROPERTY", +"DISCOVERY_CAROUSEL_CARD" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The asset is linked for use as a headline.", +"The asset is linked for use as a description.", +"The asset is linked for use as mandatory ad text.", +"The asset is linked for use as a marketing image.", +"The asset is linked for use as a media bundle.", +"The asset is linked for use as a YouTube video.", +"The asset is linked to indicate that a hotels campaign is \"Book on Google\" enabled.", +"The asset is linked for use as a Lead Form extension.", +"The asset is linked for use as a Promotion extension.", +"The asset is linked for use as a Callout extension.", +"The asset is linked for use as a Structured Snippet extension.", +"The asset is linked for use as a Sitelink.", +"The asset is linked for use as a Mobile App extension.", +"The asset is linked for use as a Hotel Callout extension.", +"The asset is linked for use as a Call extension.", +"The asset is linked for use as a Price extension.", +"The asset is linked for use as a long headline.", +"The asset is linked for use as a business name.", +"The asset is linked for use as a square marketing image.", +"The asset is linked for use as a portrait marketing image.", +"The asset is linked for use as a logo.", +"The asset is linked for use as a landscape logo.", +"The asset is linked for use as a non YouTube logo.", +"The asset is linked for use to select a call-to-action.", +"The asset is linked for use to select an ad image.", +"The asset is linked for use as a business logo.", +"The asset is linked for use as a hotel property in a Performance Max for travel goals campaign.", +"The asset is linked for use as a discovery carousel card." +], +"readOnly": true, +"type": "string" +}, +"assetId": { +"description": "Output only. ID of the asset which was interacted with during the visit event.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"clickId": { +"description": "Output only. A unique string for each visit that is passed to the landing page as the click id URL parameter.", +"readOnly": true, +"type": "string" +}, +"criterionId": { +"description": "Output only. Search Ads 360 keyword ID. A value of 0 indicates that the keyword is unattributed.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. The ID of the visit.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"merchantId": { +"description": "Output only. The Search Ads 360 inventory account ID containing the product that was clicked on. Search Ads 360 generates this ID when you link an inventory account in Search Ads 360.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"productChannel": { +"description": "Output only. The sales channel of the product that was clicked on: Online or Local.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"ONLINE", +"LOCAL" +], +"enumDescriptions": [ +"Not specified.", +"Used for return value only. Represents value unknown in this version.", +"The item is sold online.", +"The item is sold in local stores." +], +"readOnly": true, +"type": "string" +}, +"productCountryCode": { +"description": "Output only. The country (ISO-3166 format) registered for the inventory feed that contains the product clicked on.", +"readOnly": true, +"type": "string" +}, +"productId": { +"description": "Output only. The ID of the product clicked on.", +"readOnly": true, +"type": "string" +}, +"productLanguageCode": { +"description": "Output only. The language (ISO-639-1) that has been set for the Merchant Center feed containing data about the product.", +"readOnly": true, +"type": "string" +}, +"productStoreId": { +"description": "Output only. The store in the Local Inventory Ad that was clicked on. This should match the store IDs used in your local products feed.", +"readOnly": true, +"type": "string" +}, +"resourceName": { +"description": "Output only. The resource name of the visit. Visit resource names have the form: `customers/{customer_id}/visits/{ad_group_id}~{criterion_id}~{ds_visit_id}`", +"readOnly": true, +"type": "string" +}, +"visitDateTime": { +"description": "Output only. The timestamp of the visit event. The timestamp is in the customer's time zone and in \"yyyy-MM-dd HH:mm:ss\" format.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Resources__WebpageView": { +"description": "A webpage view.", +"id": "GoogleAdsSearchads360V0Resources__WebpageView", +"properties": { +"resourceName": { +"description": "Output only. The resource name of the webpage view. Webpage view resource names have the form: `customers/{customer_id}/webpageViews/{ad_group_id}~{criterion_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__ConversionCustomDimensionHeader": { +"description": "Message for conversion custom dimension header.", +"id": "GoogleAdsSearchads360V0Services__ConversionCustomDimensionHeader", +"properties": { +"id": { +"description": "The conversion custom dimension ID.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The user defined name of the conversion custom dimension.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__ConversionCustomMetricHeader": { +"description": "Message for conversion custom metric header.", +"id": "GoogleAdsSearchads360V0Services__ConversionCustomMetricHeader", +"properties": { +"id": { +"description": "The conversion custom metric ID.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The user defined name of the conversion custom metric.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__CustomColumnHeader": { +"description": "Message for custom column header.", +"id": "GoogleAdsSearchads360V0Services__CustomColumnHeader", +"properties": { +"id": { +"description": "The custom column ID.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The user defined name of the custom column.", +"type": "string" +}, +"referencesMetrics": { +"description": "True when the custom column references metrics.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__ListAccessibleCustomersResponse": { +"description": "Response message for CustomerService.ListAccessibleCustomers.", +"id": "GoogleAdsSearchads360V0Services__ListAccessibleCustomersResponse", +"properties": { +"resourceNames": { +"description": "Resource name of customers directly accessible by the user authenticating the call.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__ListCustomColumnsResponse": { +"description": "Response message for fetching all custom columns associated with a customer.", +"id": "GoogleAdsSearchads360V0Services__ListCustomColumnsResponse", +"properties": { +"customColumns": { +"description": "The CustomColumns owned by the provided customer.", +"items": { +"$ref": "GoogleAdsSearchads360V0Resources__CustomColumn" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__RawEventConversionDimensionHeader": { +"description": "Message for raw event conversion dimension header.", +"id": "GoogleAdsSearchads360V0Services__RawEventConversionDimensionHeader", +"properties": { +"id": { +"description": "The conversion custom variable ID.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The user defined name of the raw event dimension.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__RawEventConversionMetricHeader": { +"description": "Message for raw event conversion metric header.", +"id": "GoogleAdsSearchads360V0Services__RawEventConversionMetricHeader", +"properties": { +"id": { +"description": "The conversion custom variable ID.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The user defined name of the raw event metric.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__SearchAds360Row": { +"description": "A returned row from the query.", +"id": "GoogleAdsSearchads360V0Services__SearchAds360Row", +"properties": { +"accessibleBiddingStrategy": { +"$ref": "GoogleAdsSearchads360V0Resources__AccessibleBiddingStrategy", +"description": "The accessible bidding strategy referenced in the query." +}, +"adGroup": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroup", +"description": "The ad group referenced in the query." +}, +"adGroupAd": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupAd", +"description": "The ad referenced in the query." +}, +"adGroupAdLabel": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupAdLabel", +"description": "The ad group ad label referenced in the query." +}, +"adGroupAsset": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupAsset", +"description": "The ad group asset referenced in the query." +}, +"adGroupAssetSet": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupAssetSet", +"description": "The ad group asset set referenced in the query." +}, +"adGroupAudienceView": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupAudienceView", +"description": "The ad group audience view referenced in the query." +}, +"adGroupBidModifier": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupBidModifier", +"description": "The bid modifier referenced in the query." +}, +"adGroupCriterion": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupCriterion", +"description": "The criterion referenced in the query." +}, +"adGroupCriterionLabel": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupCriterionLabel", +"description": "The ad group criterion label referenced in the query." +}, +"adGroupLabel": { +"$ref": "GoogleAdsSearchads360V0Resources__AdGroupLabel", +"description": "The ad group label referenced in the query." +}, +"ageRangeView": { +"$ref": "GoogleAdsSearchads360V0Resources__AgeRangeView", +"description": "The age range view referenced in the query." +}, +"asset": { +"$ref": "GoogleAdsSearchads360V0Resources__Asset", +"description": "The asset referenced in the query." +}, +"assetGroup": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetGroup", +"description": "The asset group referenced in the query." +}, +"assetGroupAsset": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetGroupAsset", +"description": "The asset group asset referenced in the query." +}, +"assetGroupListingGroupFilter": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetGroupListingGroupFilter", +"description": "The asset group listing group filter referenced in the query." +}, +"assetGroupSignal": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetGroupSignal", +"description": "The asset group signal referenced in the query." +}, +"assetGroupTopCombinationView": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetGroupTopCombinationView", +"description": "The asset group top combination view referenced in the query." +}, +"assetSet": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetSet", +"description": "The asset set referenced in the query." +}, +"assetSetAsset": { +"$ref": "GoogleAdsSearchads360V0Resources__AssetSetAsset", +"description": "The asset set asset referenced in the query." +}, +"audience": { +"$ref": "GoogleAdsSearchads360V0Resources__Audience", +"description": "The Audience referenced in the query." +}, +"biddingStrategy": { +"$ref": "GoogleAdsSearchads360V0Resources__BiddingStrategy", +"description": "The bidding strategy referenced in the query." +}, +"campaign": { +"$ref": "GoogleAdsSearchads360V0Resources__Campaign", +"description": "The campaign referenced in the query." +}, +"campaignAsset": { +"$ref": "GoogleAdsSearchads360V0Resources__CampaignAsset", +"description": "The campaign asset referenced in the query." +}, +"campaignAssetSet": { +"$ref": "GoogleAdsSearchads360V0Resources__CampaignAssetSet", +"description": "The campaign asset set referenced in the query." +}, +"campaignAudienceView": { +"$ref": "GoogleAdsSearchads360V0Resources__CampaignAudienceView", +"description": "The campaign audience view referenced in the query." +}, +"campaignBudget": { +"$ref": "GoogleAdsSearchads360V0Resources__CampaignBudget", +"description": "The campaign budget referenced in the query." +}, +"campaignCriterion": { +"$ref": "GoogleAdsSearchads360V0Resources__CampaignCriterion", +"description": "The campaign criterion referenced in the query." +}, +"campaignLabel": { +"$ref": "GoogleAdsSearchads360V0Resources__CampaignLabel", +"description": "The campaign label referenced in the query." +}, +"cartDataSalesView": { +"$ref": "GoogleAdsSearchads360V0Resources__CartDataSalesView", +"description": "The cart data sales view referenced in the query." +}, +"conversion": { +"$ref": "GoogleAdsSearchads360V0Resources__Conversion", +"description": "The event level conversion referenced in the query." +}, +"conversionAction": { +"$ref": "GoogleAdsSearchads360V0Resources__ConversionAction", +"description": "The conversion action referenced in the query." +}, +"conversionCustomVariable": { +"$ref": "GoogleAdsSearchads360V0Resources__ConversionCustomVariable", +"description": "The conversion custom variable referenced in the query." +}, +"customColumns": { +"description": "The custom columns.", +"items": { +"$ref": "GoogleAdsSearchads360V0Common__Value" +}, +"type": "array" +}, +"customer": { +"$ref": "GoogleAdsSearchads360V0Resources__Customer", +"description": "The customer referenced in the query." +}, +"customerAsset": { +"$ref": "GoogleAdsSearchads360V0Resources__CustomerAsset", +"description": "The customer asset referenced in the query." +}, +"customerAssetSet": { +"$ref": "GoogleAdsSearchads360V0Resources__CustomerAssetSet", +"description": "The customer asset set referenced in the query." +}, +"customerClient": { +"$ref": "GoogleAdsSearchads360V0Resources__CustomerClient", +"description": "The CustomerClient referenced in the query." +}, +"customerManagerLink": { +"$ref": "GoogleAdsSearchads360V0Resources__CustomerManagerLink", +"description": "The CustomerManagerLink referenced in the query." +}, +"dynamicSearchAdsSearchTermView": { +"$ref": "GoogleAdsSearchads360V0Resources__DynamicSearchAdsSearchTermView", +"description": "The dynamic search ads search term view referenced in the query." +}, +"genderView": { +"$ref": "GoogleAdsSearchads360V0Resources__GenderView", +"description": "The gender view referenced in the query." +}, +"geoTargetConstant": { +"$ref": "GoogleAdsSearchads360V0Resources__GeoTargetConstant", +"description": "The geo target constant referenced in the query." +}, +"keywordView": { +"$ref": "GoogleAdsSearchads360V0Resources__KeywordView", +"description": "The keyword view referenced in the query." +}, +"label": { +"$ref": "GoogleAdsSearchads360V0Resources__Label", +"description": "The label referenced in the query." +}, +"languageConstant": { +"$ref": "GoogleAdsSearchads360V0Resources__LanguageConstant", +"description": "The language constant referenced in the query." +}, +"locationView": { +"$ref": "GoogleAdsSearchads360V0Resources__LocationView", +"description": "The location view referenced in the query." +}, +"metrics": { +"$ref": "GoogleAdsSearchads360V0Common__Metrics", +"description": "The metrics." +}, +"productBiddingCategoryConstant": { +"$ref": "GoogleAdsSearchads360V0Resources__ProductBiddingCategoryConstant", +"description": "The Product Bidding Category referenced in the query." +}, +"productGroupView": { +"$ref": "GoogleAdsSearchads360V0Resources__ProductGroupView", +"description": "The product group view referenced in the query." +}, +"segments": { +"$ref": "GoogleAdsSearchads360V0Common__Segments", +"description": "The segments." +}, +"shoppingPerformanceView": { +"$ref": "GoogleAdsSearchads360V0Resources__ShoppingPerformanceView", +"description": "The shopping performance view referenced in the query." +}, +"userList": { +"$ref": "GoogleAdsSearchads360V0Resources__UserList", +"description": "The user list referenced in the query." +}, +"visit": { +"$ref": "GoogleAdsSearchads360V0Resources__Visit", +"description": "The event level visit referenced in the query." +}, +"webpageView": { +"$ref": "GoogleAdsSearchads360V0Resources__WebpageView", +"description": "The webpage view referenced in the query." +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__SearchSearchAds360FieldsRequest": { +"description": "Request message for SearchAds360FieldService.SearchSearchAds360Fields.", +"id": "GoogleAdsSearchads360V0Services__SearchSearchAds360FieldsRequest", +"properties": { +"pageSize": { +"description": "Number of elements to retrieve in a single page. When too large a page is requested, the server may decide to further limit the number of returned resources.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from `next_page_token` in the previous response in order to request the next page of results.", +"type": "string" +}, +"query": { +"description": "Required. The query string.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__SearchSearchAds360FieldsResponse": { +"description": "Response message for SearchAds360FieldService.SearchSearchAds360Fields.", +"id": "GoogleAdsSearchads360V0Services__SearchSearchAds360FieldsResponse", +"properties": { +"nextPageToken": { +"description": "Pagination token used to retrieve the next page of results. Pass the content of this string as the `page_token` attribute of the next request. `next_page_token` is not returned for the last page.", +"type": "string" +}, +"results": { +"description": "The list of fields that matched the query.", +"items": { +"$ref": "GoogleAdsSearchads360V0Resources__SearchAds360Field" +}, +"type": "array" +}, +"totalResultsCount": { +"description": "Total number of results that match the query ignoring the LIMIT clause.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__SearchSearchAds360Request": { +"description": "Request message for SearchAds360Service.Search.", +"id": "GoogleAdsSearchads360V0Services__SearchSearchAds360Request", +"properties": { +"pageSize": { +"description": "Number of elements to retrieve in a single page. When too large a page is requested, the server may decide to further limit the number of returned resources.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from `next_page_token` in the previous response in order to request the next page of results.", +"type": "string" +}, +"query": { +"description": "Required. The query string.", +"type": "string" +}, +"returnTotalResultsCount": { +"description": "If true, the total number of results that match the query ignoring the LIMIT clause will be included in the response. Default is false.", +"type": "boolean" +}, +"summaryRowSetting": { +"description": "Determines whether a summary row will be returned. By default, summary row is not returned. If requested, the summary row will be sent in a response by itself after all other query results are returned.", +"enum": [ +"UNSPECIFIED", +"UNKNOWN", +"NO_SUMMARY_ROW", +"SUMMARY_ROW_WITH_RESULTS", +"SUMMARY_ROW_ONLY" +], +"enumDescriptions": [ +"Not specified.", +"Represent unknown values of return summary row.", +"Do not return summary row.", +"Return summary row along with results. The summary row will be returned in the last batch alone (last batch will contain no results).", +"Return summary row only and return no results." +], +"type": "string" +}, +"validateOnly": { +"description": "If true, the request is validated but not executed.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleAdsSearchads360V0Services__SearchSearchAds360Response": { +"description": "Response message for SearchAds360Service.Search.", +"id": "GoogleAdsSearchads360V0Services__SearchSearchAds360Response", +"properties": { +"conversionCustomDimensionHeaders": { +"description": "The headers of the conversion custom dimensions in the results.", +"items": { +"$ref": "GoogleAdsSearchads360V0Services__ConversionCustomDimensionHeader" +}, +"type": "array" +}, +"conversionCustomMetricHeaders": { +"description": "The headers of the conversion custom metrics in the results.", +"items": { +"$ref": "GoogleAdsSearchads360V0Services__ConversionCustomMetricHeader" +}, +"type": "array" +}, +"customColumnHeaders": { +"description": "The headers of the custom columns in the results.", +"items": { +"$ref": "GoogleAdsSearchads360V0Services__CustomColumnHeader" +}, +"type": "array" +}, +"fieldMask": { +"description": "FieldMask that represents what fields were requested by the user.", +"format": "google-fieldmask", +"type": "string" +}, +"nextPageToken": { +"description": "Pagination token used to retrieve the next page of results. Pass the content of this string as the `page_token` attribute of the next request. `next_page_token` is not returned for the last page.", +"type": "string" +}, +"rawEventConversionDimensionHeaders": { +"description": "The headers of the raw event conversion dimensions in the results.", +"items": { +"$ref": "GoogleAdsSearchads360V0Services__RawEventConversionDimensionHeader" +}, +"type": "array" +}, +"rawEventConversionMetricHeaders": { +"description": "The headers of the raw event conversion metrics in the results.", +"items": { +"$ref": "GoogleAdsSearchads360V0Services__RawEventConversionMetricHeader" +}, +"type": "array" +}, +"results": { +"description": "The list of rows that matched the query.", +"items": { +"$ref": "GoogleAdsSearchads360V0Services__SearchAds360Row" +}, +"type": "array" +}, +"summaryRow": { +"$ref": "GoogleAdsSearchads360V0Services__SearchAds360Row", +"description": "Summary row that contains summary of metrics in results. Summary of metrics means aggregation of metrics across all results, here aggregation could be sum, average, rate, etc." +}, +"totalResultsCount": { +"description": "Total number of results that match the query ignoring the LIMIT clause.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Search Ads 360 Reporting API", +"version": "v0", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/searchconsole.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/searchconsole.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..513109092e00eae10baaa3eea0921017aa9e6ce1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/searchconsole.v1.json @@ -0,0 +1,1511 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/webmasters": { +"description": "View and manage Search Console data for your verified sites" +}, +"https://www.googleapis.com/auth/webmasters.readonly": { +"description": "View Search Console data for your verified sites" +} +} +} +}, +"basePath": "", +"baseUrl": "https://searchconsole.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Search Console", +"description": "The Search Console API provides access to both Search Console data (verified users only) and to public information on an URL basis (anyone)", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/webmaster-tools/search-console-api/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "searchconsole:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://searchconsole.mtls.googleapis.com/", +"name": "searchconsole", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"searchanalytics": { +"methods": { +"query": { +"description": "Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.", +"flatPath": "webmasters/v3/sites/{siteUrl}/searchAnalytics/query", +"httpMethod": "POST", +"id": "webmasters.searchanalytics.query", +"parameterOrder": [ +"siteUrl" +], +"parameters": { +"siteUrl": { +"description": "The site's URL, including protocol. For example: `http://www.example.com/`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}/searchAnalytics/query", +"request": { +"$ref": "SearchAnalyticsQueryRequest" +}, +"response": { +"$ref": "SearchAnalyticsQueryResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/webmasters", +"https://www.googleapis.com/auth/webmasters.readonly" +] +} +} +}, +"sitemaps": { +"methods": { +"delete": { +"description": "Deletes a sitemap from the Sitemaps report. Does not stop Google from crawling this sitemap or the URLs that were previously crawled in the deleted sitemap.", +"flatPath": "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}", +"httpMethod": "DELETE", +"id": "webmasters.sitemaps.delete", +"parameterOrder": [ +"siteUrl", +"feedpath" +], +"parameters": { +"feedpath": { +"description": "The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.", +"location": "path", +"required": true, +"type": "string" +}, +"siteUrl": { +"description": "The site's URL, including protocol. For example: `http://www.example.com/`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}", +"scopes": [ +"https://www.googleapis.com/auth/webmasters" +] +}, +"get": { +"description": "Retrieves information about a specific sitemap.", +"flatPath": "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}", +"httpMethod": "GET", +"id": "webmasters.sitemaps.get", +"parameterOrder": [ +"siteUrl", +"feedpath" +], +"parameters": { +"feedpath": { +"description": "The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.", +"location": "path", +"required": true, +"type": "string" +}, +"siteUrl": { +"description": "The site's URL, including protocol. For example: `http://www.example.com/`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}", +"response": { +"$ref": "WmxSitemap" +}, +"scopes": [ +"https://www.googleapis.com/auth/webmasters", +"https://www.googleapis.com/auth/webmasters.readonly" +] +}, +"list": { +"description": " Lists the [sitemaps-entries](/webmaster-tools/v3/sitemaps) submitted for this site, or included in the sitemap index file (if `sitemapIndex` is specified in the request).", +"flatPath": "webmasters/v3/sites/{siteUrl}/sitemaps", +"httpMethod": "GET", +"id": "webmasters.sitemaps.list", +"parameterOrder": [ +"siteUrl" +], +"parameters": { +"siteUrl": { +"description": "The site's URL, including protocol. For example: `http://www.example.com/`.", +"location": "path", +"required": true, +"type": "string" +}, +"sitemapIndex": { +"description": " A URL of a site's sitemap index. For example: `http://www.example.com/sitemapindex.xml`.", +"location": "query", +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}/sitemaps", +"response": { +"$ref": "SitemapsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/webmasters", +"https://www.googleapis.com/auth/webmasters.readonly" +] +}, +"submit": { +"description": "Submits a sitemap for a site.", +"flatPath": "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}", +"httpMethod": "PUT", +"id": "webmasters.sitemaps.submit", +"parameterOrder": [ +"siteUrl", +"feedpath" +], +"parameters": { +"feedpath": { +"description": "The URL of the actual sitemap. For example: `http://www.example.com/sitemap.xml`.", +"location": "path", +"required": true, +"type": "string" +}, +"siteUrl": { +"description": "The site's URL, including protocol. For example: `http://www.example.com/`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}/sitemaps/{feedpath}", +"scopes": [ +"https://www.googleapis.com/auth/webmasters" +] +} +} +}, +"sites": { +"methods": { +"add": { +"description": " Adds a site to the set of the user's sites in Search Console.", +"flatPath": "webmasters/v3/sites/{siteUrl}", +"httpMethod": "PUT", +"id": "webmasters.sites.add", +"parameterOrder": [ +"siteUrl" +], +"parameters": { +"siteUrl": { +"description": "The URL of the site to add.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}", +"scopes": [ +"https://www.googleapis.com/auth/webmasters" +] +}, +"delete": { +"description": " Removes a site from the set of the user's Search Console sites.", +"flatPath": "webmasters/v3/sites/{siteUrl}", +"httpMethod": "DELETE", +"id": "webmasters.sites.delete", +"parameterOrder": [ +"siteUrl" +], +"parameters": { +"siteUrl": { +"description": "The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}", +"scopes": [ +"https://www.googleapis.com/auth/webmasters" +] +}, +"get": { +"description": " Retrieves information about specific site.", +"flatPath": "webmasters/v3/sites/{siteUrl}", +"httpMethod": "GET", +"id": "webmasters.sites.get", +"parameterOrder": [ +"siteUrl" +], +"parameters": { +"siteUrl": { +"description": "The URI of the property as defined in Search Console. **Examples:** `http://www.example.com/` or `sc-domain:example.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webmasters/v3/sites/{siteUrl}", +"response": { +"$ref": "WmxSite" +}, +"scopes": [ +"https://www.googleapis.com/auth/webmasters", +"https://www.googleapis.com/auth/webmasters.readonly" +] +}, +"list": { +"description": " Lists the user's Search Console sites.", +"flatPath": "webmasters/v3/sites", +"httpMethod": "GET", +"id": "webmasters.sites.list", +"parameterOrder": [], +"parameters": {}, +"path": "webmasters/v3/sites", +"response": { +"$ref": "SitesListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/webmasters", +"https://www.googleapis.com/auth/webmasters.readonly" +] +} +} +}, +"urlInspection": { +"resources": { +"index": { +"methods": { +"inspect": { +"description": "Index inspection.", +"flatPath": "v1/urlInspection/index:inspect", +"httpMethod": "POST", +"id": "searchconsole.urlInspection.index.inspect", +"parameterOrder": [], +"parameters": {}, +"path": "v1/urlInspection/index:inspect", +"request": { +"$ref": "InspectUrlIndexRequest" +}, +"response": { +"$ref": "InspectUrlIndexResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/webmasters", +"https://www.googleapis.com/auth/webmasters.readonly" +] +} +} +} +} +}, +"urlTestingTools": { +"resources": { +"mobileFriendlyTest": { +"methods": { +"run": { +"description": "Runs Mobile-Friendly Test for a given URL.", +"flatPath": "v1/urlTestingTools/mobileFriendlyTest:run", +"httpMethod": "POST", +"id": "searchconsole.urlTestingTools.mobileFriendlyTest.run", +"parameterOrder": [], +"parameters": {}, +"path": "v1/urlTestingTools/mobileFriendlyTest:run", +"request": { +"$ref": "RunMobileFriendlyTestRequest" +}, +"response": { +"$ref": "RunMobileFriendlyTestResponse" +} +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://searchconsole.googleapis.com/", +"schemas": { +"AmpInspectionResult": { +"description": "AMP inspection result of the live page or the current information from Google's index, depending on whether you requested a live inspection or not.", +"id": "AmpInspectionResult", +"properties": { +"ampIndexStatusVerdict": { +"description": "Index status of the AMP URL.", +"enum": [ +"VERDICT_UNSPECIFIED", +"PASS", +"PARTIAL", +"FAIL", +"NEUTRAL" +], +"enumDescriptions": [ +"Unknown verdict.", +"Equivalent to \"Valid\" for the page or item in Search Console.", +"Reserved, no longer in use.", +"Equivalent to \"Error\" or \"Invalid\" for the page or item in Search Console.", +"Equivalent to \"Excluded\" for the page or item in Search Console." +], +"type": "string" +}, +"ampUrl": { +"description": "URL of the AMP that was inspected. If the submitted URL is a desktop page that refers to an AMP version, the AMP version will be inspected.", +"type": "string" +}, +"indexingState": { +"description": "Whether or not the page blocks indexing through a noindex rule.", +"enum": [ +"AMP_INDEXING_STATE_UNSPECIFIED", +"AMP_INDEXING_ALLOWED", +"BLOCKED_DUE_TO_NOINDEX", +"BLOCKED_DUE_TO_EXPIRED_UNAVAILABLE_AFTER" +], +"enumDescriptions": [ +"Unknown indexing status.", +"Indexing allowed.", +"Indexing not allowed, 'noindex' detected.", +"Indexing not allowed, 'unavailable_after' date expired." +], +"type": "string" +}, +"issues": { +"description": "A list of zero or more AMP issues found for the inspected URL.", +"items": { +"$ref": "AmpIssue" +}, +"type": "array" +}, +"lastCrawlTime": { +"description": "Last time this AMP version was crawled by Google. Absent if the URL was never crawled successfully.", +"format": "google-datetime", +"type": "string" +}, +"pageFetchState": { +"description": "Whether or not Google could fetch the AMP.", +"enum": [ +"PAGE_FETCH_STATE_UNSPECIFIED", +"SUCCESSFUL", +"SOFT_404", +"BLOCKED_ROBOTS_TXT", +"NOT_FOUND", +"ACCESS_DENIED", +"SERVER_ERROR", +"REDIRECT_ERROR", +"ACCESS_FORBIDDEN", +"BLOCKED_4XX", +"INTERNAL_CRAWL_ERROR", +"INVALID_URL" +], +"enumDescriptions": [ +"Unknown fetch state.", +"Successful fetch.", +"Soft 404.", +"Blocked by robots.txt.", +"Not found (404).", +"Blocked due to unauthorized request (401).", +"Server error (5xx).", +"Redirection error.", +"Blocked due to access forbidden (403).", +"Blocked due to other 4xx issue (not 403, 404).", +"Internal error.", +"Invalid URL." +], +"type": "string" +}, +"robotsTxtState": { +"description": "Whether or not the page is blocked to Google by a robots.txt rule.", +"enum": [ +"ROBOTS_TXT_STATE_UNSPECIFIED", +"ALLOWED", +"DISALLOWED" +], +"enumDescriptions": [ +"Unknown robots.txt state, typically because the page wasn't fetched or found, or because robots.txt itself couldn't be reached.", +"Crawl allowed by robots.txt.", +"Crawl blocked by robots.txt." +], +"type": "string" +}, +"verdict": { +"description": "The status of the most severe error on the page. If a page has both warnings and errors, the page status is error. Error status means the page cannot be shown in Search results.", +"enum": [ +"VERDICT_UNSPECIFIED", +"PASS", +"PARTIAL", +"FAIL", +"NEUTRAL" +], +"enumDescriptions": [ +"Unknown verdict.", +"Equivalent to \"Valid\" for the page or item in Search Console.", +"Reserved, no longer in use.", +"Equivalent to \"Error\" or \"Invalid\" for the page or item in Search Console.", +"Equivalent to \"Excluded\" for the page or item in Search Console." +], +"type": "string" +} +}, +"type": "object" +}, +"AmpIssue": { +"description": "AMP issue.", +"id": "AmpIssue", +"properties": { +"issueMessage": { +"description": "Brief description of this issue.", +"type": "string" +}, +"severity": { +"description": "Severity of this issue: WARNING or ERROR.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"WARNING", +"ERROR" +], +"enumDescriptions": [ +"Unknown severity.", +"Warning.", +"Error." +], +"type": "string" +} +}, +"type": "object" +}, +"ApiDataRow": { +"id": "ApiDataRow", +"properties": { +"clicks": { +"format": "double", +"type": "number" +}, +"ctr": { +"format": "double", +"type": "number" +}, +"impressions": { +"format": "double", +"type": "number" +}, +"keys": { +"items": { +"type": "string" +}, +"type": "array" +}, +"position": { +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ApiDimensionFilter": { +"description": "A filter test to be applied to each row in the data set, where a match can return the row. Filters are string comparisons, and values and dimension names are not case-sensitive. Individual filters are either AND'ed or OR'ed within their parent filter group, according to the group's group type. You do not need to group by a specified dimension to filter against it.", +"id": "ApiDimensionFilter", +"properties": { +"dimension": { +"enum": [ +"QUERY", +"PAGE", +"COUNTRY", +"DEVICE", +"SEARCH_APPEARANCE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +}, +"expression": { +"type": "string" +}, +"operator": { +"enum": [ +"EQUALS", +"NOT_EQUALS", +"CONTAINS", +"NOT_CONTAINS", +"INCLUDING_REGEX", +"EXCLUDING_REGEX" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"ApiDimensionFilterGroup": { +"description": "A set of dimension value filters to test against each row. Only rows that pass all filter groups will be returned. All results within a filter group are either AND'ed or OR'ed together, depending on the group type selected. All filter groups are AND'ed together.", +"id": "ApiDimensionFilterGroup", +"properties": { +"filters": { +"items": { +"$ref": "ApiDimensionFilter" +}, +"type": "array" +}, +"groupType": { +"enum": [ +"AND" +], +"enumDescriptions": [ +"" +], +"type": "string" +} +}, +"type": "object" +}, +"BlockedResource": { +"description": "Blocked resource.", +"id": "BlockedResource", +"properties": { +"url": { +"description": "URL of the blocked resource.", +"type": "string" +} +}, +"type": "object" +}, +"DetectedItems": { +"description": "Rich Results items grouped by type.", +"id": "DetectedItems", +"properties": { +"items": { +"description": "List of Rich Results items.", +"items": { +"$ref": "Item" +}, +"type": "array" +}, +"richResultType": { +"description": "Rich Results type", +"type": "string" +} +}, +"type": "object" +}, +"Image": { +"description": "Describe image data.", +"id": "Image", +"properties": { +"data": { +"description": "Image data in format determined by the mime type. Currently, the format will always be \"image/png\", but this might change in the future.", +"format": "byte", +"type": "string" +}, +"mimeType": { +"description": "The mime-type of the image data.", +"type": "string" +} +}, +"type": "object" +}, +"IndexStatusInspectionResult": { +"description": "Results of index status inspection for either the live page or the version in Google's index, depending on whether you requested a live inspection or not. For more information, see the [Index coverage report documentation](https://support.google.com/webmasters/answer/7440203).", +"id": "IndexStatusInspectionResult", +"properties": { +"coverageState": { +"description": "Could Google find and index the page. More details about page indexing appear in 'indexing_state'.", +"type": "string" +}, +"crawledAs": { +"description": "Primary crawler that was used by Google to crawl your site.", +"enum": [ +"CRAWLING_USER_AGENT_UNSPECIFIED", +"DESKTOP", +"MOBILE" +], +"enumDescriptions": [ +"Unknown user agent.", +"Desktop user agent.", +"Mobile user agent." +], +"type": "string" +}, +"googleCanonical": { +"description": "The URL of the page that Google selected as canonical. If the page was not indexed, this field is absent.", +"type": "string" +}, +"indexingState": { +"description": "Whether or not the page blocks indexing through a noindex rule.", +"enum": [ +"INDEXING_STATE_UNSPECIFIED", +"INDEXING_ALLOWED", +"BLOCKED_BY_META_TAG", +"BLOCKED_BY_HTTP_HEADER", +"BLOCKED_BY_ROBOTS_TXT" +], +"enumDescriptions": [ +"Unknown indexing status.", +"Indexing allowed.", +"Indexing not allowed, 'noindex' detected in 'robots' meta tag.", +"Indexing not allowed, 'noindex' detected in 'X-Robots-Tag' http header.", +"Reserved, no longer in use." +], +"type": "string" +}, +"lastCrawlTime": { +"description": "Last time this URL was crawled by Google using the [primary crawler](https://support.google.com/webmasters/answer/7440203#primary_crawler). Absent if the URL was never crawled successfully.", +"format": "google-datetime", +"type": "string" +}, +"pageFetchState": { +"description": "Whether or not Google could retrieve the page from your server. Equivalent to [\"page fetch\"](https://support.google.com/webmasters/answer/9012289#index_coverage) in the URL inspection report.", +"enum": [ +"PAGE_FETCH_STATE_UNSPECIFIED", +"SUCCESSFUL", +"SOFT_404", +"BLOCKED_ROBOTS_TXT", +"NOT_FOUND", +"ACCESS_DENIED", +"SERVER_ERROR", +"REDIRECT_ERROR", +"ACCESS_FORBIDDEN", +"BLOCKED_4XX", +"INTERNAL_CRAWL_ERROR", +"INVALID_URL" +], +"enumDescriptions": [ +"Unknown fetch state.", +"Successful fetch.", +"Soft 404.", +"Blocked by robots.txt.", +"Not found (404).", +"Blocked due to unauthorized request (401).", +"Server error (5xx).", +"Redirection error.", +"Blocked due to access forbidden (403).", +"Blocked due to other 4xx issue (not 403, 404).", +"Internal error.", +"Invalid URL." +], +"type": "string" +}, +"referringUrls": { +"description": "URLs that link to the inspected URL, directly and indirectly.", +"items": { +"type": "string" +}, +"type": "array" +}, +"robotsTxtState": { +"description": "Whether or not the page is blocked to Google by a robots.txt rule.", +"enum": [ +"ROBOTS_TXT_STATE_UNSPECIFIED", +"ALLOWED", +"DISALLOWED" +], +"enumDescriptions": [ +"Unknown robots.txt state, typically because the page wasn't fetched or found, or because robots.txt itself couldn't be reached.", +"Crawl allowed by robots.txt.", +"Crawl blocked by robots.txt." +], +"type": "string" +}, +"sitemap": { +"description": "Any sitemaps that this URL was listed in, as known by Google. Not guaranteed to be an exhaustive list, especially if Google did not discover this URL through a sitemap. Absent if no sitemaps were found.", +"items": { +"type": "string" +}, +"type": "array" +}, +"userCanonical": { +"description": "The URL that your page or site [declares as canonical](https://developers.google.com/search/docs/advanced/crawling/consolidate-duplicate-urls?#define-canonical). If you did not declare a canonical URL, this field is absent.", +"type": "string" +}, +"verdict": { +"description": "High level verdict about whether the URL *is* indexed (indexed status), or *can be* indexed (live inspection).", +"enum": [ +"VERDICT_UNSPECIFIED", +"PASS", +"PARTIAL", +"FAIL", +"NEUTRAL" +], +"enumDescriptions": [ +"Unknown verdict.", +"Equivalent to \"Valid\" for the page or item in Search Console.", +"Reserved, no longer in use.", +"Equivalent to \"Error\" or \"Invalid\" for the page or item in Search Console.", +"Equivalent to \"Excluded\" for the page or item in Search Console." +], +"type": "string" +} +}, +"type": "object" +}, +"InspectUrlIndexRequest": { +"description": "Index inspection request.", +"id": "InspectUrlIndexRequest", +"properties": { +"inspectionUrl": { +"description": "Required. URL to inspect. Must be under the property specified in \"site_url\".", +"type": "string" +}, +"languageCode": { +"description": "Optional. An [IETF BCP-47](https://en.wikipedia.org/wiki/IETF_language_tag) language code representing the requested language for translated issue messages, e.g. \"en-US\", \"or \"de-CH\". Default value is \"en-US\".", +"type": "string" +}, +"siteUrl": { +"description": "Required. The URL of the property as defined in Search Console. **Examples:** `http://www.example.com/` for a URL-prefix property, or `sc-domain:example.com` for a Domain property.", +"type": "string" +} +}, +"type": "object" +}, +"InspectUrlIndexResponse": { +"description": "Index-Status inspection response.", +"id": "InspectUrlIndexResponse", +"properties": { +"inspectionResult": { +"$ref": "UrlInspectionResult", +"description": "URL inspection results." +} +}, +"type": "object" +}, +"Item": { +"description": "A specific rich result found on the page.", +"id": "Item", +"properties": { +"issues": { +"description": "A list of zero or more rich result issues found for this instance.", +"items": { +"$ref": "RichResultsIssue" +}, +"type": "array" +}, +"name": { +"description": "The user-provided name of this item.", +"type": "string" +} +}, +"type": "object" +}, +"MobileFriendlyIssue": { +"description": "Mobile-friendly issue.", +"id": "MobileFriendlyIssue", +"properties": { +"rule": { +"description": "Rule violated.", +"enum": [ +"MOBILE_FRIENDLY_RULE_UNSPECIFIED", +"USES_INCOMPATIBLE_PLUGINS", +"CONFIGURE_VIEWPORT", +"FIXED_WIDTH_VIEWPORT", +"SIZE_CONTENT_TO_VIEWPORT", +"USE_LEGIBLE_FONT_SIZES", +"TAP_TARGETS_TOO_CLOSE" +], +"enumDescriptions": [ +"Unknown rule. Sorry, we don't have any description for the rule that was broken.", +"Plugins incompatible with mobile devices are being used. [Learn more] (https://support.google.com/webmasters/answer/6352293#flash_usage).", +"Viewport is not specified using the meta viewport tag. [Learn more] (https://support.google.com/webmasters/answer/6352293#viewport_not_configured).", +"Viewport defined to a fixed width. [Learn more] (https://support.google.com/webmasters/answer/6352293#fixed-width_viewport).", +"Content not sized to viewport. [Learn more] (https://support.google.com/webmasters/answer/6352293#content_not_sized_to_viewport).", +"Font size is too small for easy reading on a small screen. [Learn More] (https://support.google.com/webmasters/answer/6352293#small_font_size).", +"Touch elements are too close to each other. [Learn more] (https://support.google.com/webmasters/answer/6352293#touch_elements_too_close)." +], +"type": "string" +} +}, +"type": "object" +}, +"MobileUsabilityInspectionResult": { +"description": "Mobile-usability inspection results.", +"id": "MobileUsabilityInspectionResult", +"properties": { +"issues": { +"description": "A list of zero or more mobile-usability issues detected for this URL.", +"items": { +"$ref": "MobileUsabilityIssue" +}, +"type": "array" +}, +"verdict": { +"description": "High-level mobile-usability inspection result for this URL.", +"enum": [ +"VERDICT_UNSPECIFIED", +"PASS", +"PARTIAL", +"FAIL", +"NEUTRAL" +], +"enumDescriptions": [ +"Unknown verdict.", +"Equivalent to \"Valid\" for the page or item in Search Console.", +"Reserved, no longer in use.", +"Equivalent to \"Error\" or \"Invalid\" for the page or item in Search Console.", +"Equivalent to \"Excluded\" for the page or item in Search Console." +], +"type": "string" +} +}, +"type": "object" +}, +"MobileUsabilityIssue": { +"description": "Mobile-usability issue.", +"id": "MobileUsabilityIssue", +"properties": { +"issueType": { +"description": "Mobile-usability issue type.", +"enum": [ +"MOBILE_USABILITY_ISSUE_TYPE_UNSPECIFIED", +"USES_INCOMPATIBLE_PLUGINS", +"CONFIGURE_VIEWPORT", +"FIXED_WIDTH_VIEWPORT", +"SIZE_CONTENT_TO_VIEWPORT", +"USE_LEGIBLE_FONT_SIZES", +"TAP_TARGETS_TOO_CLOSE" +], +"enumDescriptions": [ +"Unknown issue. Sorry, we don't have any description for the rule that was broken.", +"Plugins incompatible with mobile devices are being used. [Learn more] (https://support.google.com/webmasters/answer/6352293#flash_usage#error-list).", +"Viewport is not specified using the meta viewport tag. [Learn more] (https://support.google.com/webmasters/answer/6352293#viewport_not_configured#error-list).", +"Viewport defined to a fixed width. [Learn more] (https://support.google.com/webmasters/answer/6352293#fixed-width_viewport#error-list).", +"Content not sized to viewport. [Learn more] (https://support.google.com/webmasters/answer/6352293#content_not_sized_to_viewport#error-list).", +"Font size is too small for easy reading on a small screen. [Learn More] (https://support.google.com/webmasters/answer/6352293#small_font_size#error-list).", +"Touch elements are too close to each other. [Learn more] (https://support.google.com/webmasters/answer/6352293#touch_elements_too_close#error-list)." +], +"type": "string" +}, +"message": { +"description": "Additional information regarding the issue.", +"type": "string" +}, +"severity": { +"description": "Not returned; reserved for future use.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"WARNING", +"ERROR" +], +"enumDescriptions": [ +"Unknown severity.", +"Warning.", +"Error." +], +"type": "string" +} +}, +"type": "object" +}, +"ResourceIssue": { +"description": "Information about a resource with issue.", +"id": "ResourceIssue", +"properties": { +"blockedResource": { +"$ref": "BlockedResource", +"description": "Describes a blocked resource issue." +} +}, +"type": "object" +}, +"RichResultsInspectionResult": { +"description": "Rich-Results inspection result, including any rich results found at this URL.", +"id": "RichResultsInspectionResult", +"properties": { +"detectedItems": { +"description": "A list of zero or more rich results detected on this page. Rich results that cannot even be parsed due to syntactic issues will not be listed here.", +"items": { +"$ref": "DetectedItems" +}, +"type": "array" +}, +"verdict": { +"description": "High-level rich results inspection result for this URL.", +"enum": [ +"VERDICT_UNSPECIFIED", +"PASS", +"PARTIAL", +"FAIL", +"NEUTRAL" +], +"enumDescriptions": [ +"Unknown verdict.", +"Equivalent to \"Valid\" for the page or item in Search Console.", +"Reserved, no longer in use.", +"Equivalent to \"Error\" or \"Invalid\" for the page or item in Search Console.", +"Equivalent to \"Excluded\" for the page or item in Search Console." +], +"type": "string" +} +}, +"type": "object" +}, +"RichResultsIssue": { +"description": "Severity and status of a single issue affecting a single rich result instance on a page.", +"id": "RichResultsIssue", +"properties": { +"issueMessage": { +"description": "Rich Results issue type.", +"type": "string" +}, +"severity": { +"description": "Severity of this issue: WARNING, or ERROR. Items with an issue of status ERROR cannot appear with rich result features in Google Search results.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"WARNING", +"ERROR" +], +"enumDescriptions": [ +"Unknown severity.", +"Warning.", +"Error." +], +"type": "string" +} +}, +"type": "object" +}, +"RunMobileFriendlyTestRequest": { +"description": "Mobile-friendly test request.", +"id": "RunMobileFriendlyTestRequest", +"properties": { +"requestScreenshot": { +"description": "Whether or not screenshot is requested. Default is false.", +"type": "boolean" +}, +"url": { +"description": "URL for inspection.", +"type": "string" +} +}, +"type": "object" +}, +"RunMobileFriendlyTestResponse": { +"description": "Mobile-friendly test response, including mobile-friendly issues and resource issues.", +"id": "RunMobileFriendlyTestResponse", +"properties": { +"mobileFriendliness": { +"description": "Test verdict, whether the page is mobile friendly or not.", +"enum": [ +"MOBILE_FRIENDLY_TEST_RESULT_UNSPECIFIED", +"MOBILE_FRIENDLY", +"NOT_MOBILE_FRIENDLY" +], +"enumDescriptions": [ +"Internal error when running this test. Please try running the test again.", +"The page is mobile friendly.", +"The page is not mobile friendly." +], +"type": "string" +}, +"mobileFriendlyIssues": { +"description": "List of mobile-usability issues.", +"items": { +"$ref": "MobileFriendlyIssue" +}, +"type": "array" +}, +"resourceIssues": { +"description": "Information about embedded resources issues.", +"items": { +"$ref": "ResourceIssue" +}, +"type": "array" +}, +"screenshot": { +"$ref": "Image", +"description": "Screenshot of the requested URL." +}, +"testStatus": { +"$ref": "TestStatus", +"description": "Final state of the test, can be either complete or an error." +} +}, +"type": "object" +}, +"SearchAnalyticsQueryRequest": { +"id": "SearchAnalyticsQueryRequest", +"properties": { +"aggregationType": { +"description": "[Optional; Default is \\\"auto\\\"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help documentation to learn how data is calculated differently by site versus by page. **Note:** If you group or filter by page, you cannot aggregate by property. If you specify any value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your aggregation type if the requested type is invalid.", +"enum": [ +"AUTO", +"BY_PROPERTY", +"BY_PAGE", +"BY_NEWS_SHOWCASE_PANEL" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"dataState": { +"description": "The data state to be fetched, can be full or all, the latter including full and partial data.", +"enum": [ +"DATA_STATE_UNSPECIFIED", +"FINAL", +"ALL" +], +"enumDescriptions": [ +"Default value, should not be used.", +"Include full final data only, without partial.", +"Include all data, full and partial." +], +"type": "string" +}, +"dimensionFilterGroups": { +"description": "[Optional] Zero or more filters to apply to the dimension grouping values; for example, 'query contains \\\"buy\\\"' to see only data where the query string contains the substring \\\"buy\\\" (not case-sensitive). You can filter by a dimension without grouping by it.", +"items": { +"$ref": "ApiDimensionFilterGroup" +}, +"type": "array" +}, +"dimensions": { +"description": "[Optional] Zero or more dimensions to group results by. Dimensions are the group-by values in the Search Analytics page. Dimensions are combined to create a unique row key for each row. Results are grouped in the order that you supply these dimensions.", +"items": { +"enum": [ +"DATE", +"QUERY", +"PAGE", +"COUNTRY", +"DEVICE", +"SEARCH_APPEARANCE" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +}, +"endDate": { +"description": "[Required] End date of the requested date range, in YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal to the start date. This value is included in the range.", +"type": "string" +}, +"rowLimit": { +"description": "[Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 25,000 (inclusive).", +"format": "int32", +"type": "integer" +}, +"searchType": { +"description": "[Optional; Default is \\\"web\\\"] The search type to filter for.", +"enum": [ +"WEB", +"IMAGE", +"VIDEO", +"NEWS", +"DISCOVER", +"GOOGLE_NEWS" +], +"enumDescriptions": [ +"", +"", +"", +"News tab in search.", +"Discover.", +"Google News (news.google.com or mobile app)." +], +"type": "string" +}, +"startDate": { +"description": " [Required] Start date of the requested date range, in YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or equal to the end date. This value is included in the range.", +"type": "string" +}, +"startRow": { +"description": "[Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "Optional. [Optional; Default is \\\"web\\\"] Type of report: search type, or either Discover or Gnews.", +"enum": [ +"WEB", +"IMAGE", +"VIDEO", +"NEWS", +"DISCOVER", +"GOOGLE_NEWS" +], +"enumDescriptions": [ +"", +"", +"", +"News tab in search.", +"Discover.", +"Google News (news.google.com or mobile app)." +], +"type": "string" +} +}, +"type": "object" +}, +"SearchAnalyticsQueryResponse": { +"description": "A list of rows, one per result, grouped by key. Metrics in each row are aggregated for all data grouped by that key either by page or property, as specified by the aggregation type parameter.", +"id": "SearchAnalyticsQueryResponse", +"properties": { +"responseAggregationType": { +"description": "How the results were aggregated.", +"enum": [ +"AUTO", +"BY_PROPERTY", +"BY_PAGE", +"BY_NEWS_SHOWCASE_PANEL" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"rows": { +"description": "A list of rows grouped by the key values in the order given in the query.", +"items": { +"$ref": "ApiDataRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"SitemapsListResponse": { +"description": "List of sitemaps.", +"id": "SitemapsListResponse", +"properties": { +"sitemap": { +"description": "Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184).", +"items": { +"$ref": "WmxSitemap" +}, +"type": "array" +} +}, +"type": "object" +}, +"SitesListResponse": { +"description": "List of sites with access level information.", +"id": "SitesListResponse", +"properties": { +"siteEntry": { +"description": "Contains permission level information about a Search Console site. For more information, see [Permissions in Search Console](https://support.google.com/webmasters/answer/2451999).", +"items": { +"$ref": "WmxSite" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestStatus": { +"description": "Final state of the test, including error details if necessary.", +"id": "TestStatus", +"properties": { +"details": { +"description": "Error details if applicable.", +"type": "string" +}, +"status": { +"description": "Status of the test.", +"enum": [ +"TEST_STATUS_UNSPECIFIED", +"COMPLETE", +"INTERNAL_ERROR", +"PAGE_UNREACHABLE" +], +"enumDescriptions": [ +"Internal error when running this test. Please try running the test again.", +"Inspection has completed without errors.", +"Inspection terminated in an error state. This indicates a problem in Google's infrastructure, not a user error. Please try again later.", +"Google can not access the URL because of a user error such as a robots.txt blockage, a 403 or 500 code etc. Please make sure that the URL provided is accessible by Googlebot and is not password protected." +], +"type": "string" +} +}, +"type": "object" +}, +"UrlInspectionResult": { +"description": "URL inspection result, including all inspection results.", +"id": "UrlInspectionResult", +"properties": { +"ampResult": { +"$ref": "AmpInspectionResult", +"description": "Result of the AMP analysis. Absent if the page is not an AMP page." +}, +"indexStatusResult": { +"$ref": "IndexStatusInspectionResult", +"description": "Result of the index status analysis." +}, +"inspectionResultLink": { +"description": "Link to Search Console URL inspection.", +"type": "string" +}, +"mobileUsabilityResult": { +"$ref": "MobileUsabilityInspectionResult", +"description": "Result of the Mobile usability analysis." +}, +"richResultsResult": { +"$ref": "RichResultsInspectionResult", +"description": "Result of the Rich Results analysis. Absent if there are no rich results found." +} +}, +"type": "object" +}, +"WmxSite": { +"description": "Contains permission level information about a Search Console site. For more information, see [Permissions in Search Console](https://support.google.com/webmasters/answer/2451999).", +"id": "WmxSite", +"properties": { +"permissionLevel": { +"description": "The user's permission level for the site.", +"enum": [ +"SITE_PERMISSION_LEVEL_UNSPECIFIED", +"SITE_OWNER", +"SITE_FULL_USER", +"SITE_RESTRICTED_USER", +"SITE_UNVERIFIED_USER" +], +"enumDescriptions": [ +"", +"Owner has complete access to the site.", +"Full users can access all data, and perform most of the operations.", +"Restricted users can access most of the data, and perform some operations.", +"Unverified user has no access to site's data." +], +"type": "string" +}, +"siteUrl": { +"description": "The URL of the site.", +"type": "string" +} +}, +"type": "object" +}, +"WmxSitemap": { +"description": "Contains detailed information about a specific URL submitted as a [sitemap](https://support.google.com/webmasters/answer/156184).", +"id": "WmxSitemap", +"properties": { +"contents": { +"description": "The various content types in the sitemap.", +"items": { +"$ref": "WmxSitemapContent" +}, +"type": "array" +}, +"errors": { +"description": "Number of errors in the sitemap. These are issues with the sitemap itself that need to be fixed before it can be processed correctly.", +"format": "int64", +"type": "string" +}, +"isPending": { +"description": "If true, the sitemap has not been processed.", +"type": "boolean" +}, +"isSitemapsIndex": { +"description": "If true, the sitemap is a collection of sitemaps.", +"type": "boolean" +}, +"lastDownloaded": { +"description": "Date & time in which this sitemap was last downloaded. Date format is in RFC 3339 format (yyyy-mm-dd).", +"format": "google-datetime", +"type": "string" +}, +"lastSubmitted": { +"description": "Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd).", +"format": "google-datetime", +"type": "string" +}, +"path": { +"description": "The url of the sitemap.", +"type": "string" +}, +"type": { +"description": "The type of the sitemap. For example: `rssFeed`.", +"enum": [ +"NOT_SITEMAP", +"URL_LIST", +"SITEMAP", +"RSS_FEED", +"ATOM_FEED", +"PATTERN_SITEMAP", +"OCEANFRONT" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +true, +true +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"Unsupported sitemap types.", +"" +], +"type": "string" +}, +"warnings": { +"description": "Number of warnings for the sitemap. These are generally non-critical issues with URLs in the sitemaps.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"WmxSitemapContent": { +"description": "Information about the various content types in the sitemap.", +"id": "WmxSitemapContent", +"properties": { +"indexed": { +"deprecated": true, +"description": "*Deprecated; do not use.*", +"format": "int64", +"type": "string" +}, +"submitted": { +"description": "The number of URLs in the sitemap (of the content type).", +"format": "int64", +"type": "string" +}, +"type": { +"description": "The specific type of content in this sitemap. For example: `web`.", +"enum": [ +"WEB", +"IMAGE", +"VIDEO", +"NEWS", +"MOBILE", +"ANDROID_APP", +"PATTERN", +"IOS_APP", +"DATA_FEED_ELEMENT" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"Unsupported content type.", +"", +"Unsupported content type." +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Search Console API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..bad7e8a8e30953dfbd039fabe57f55aa3b3e775b --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1.json @@ -0,0 +1,1782 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://secretmanager.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Secret Manager", +"description": "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/secret-manager/", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://secretmanager.me-central2.rep.googleapis.com/", +"location": "me-central2" +} +], +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "secretmanager:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://secretmanager.mtls.googleapis.com/", +"name": "secretmanager", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"secrets": { +"methods": { +"addVersion": { +"description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:addVersion", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.addVersion", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:addVersion", +"request": { +"$ref": "AddSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Secret containing no SecretVersions.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"secretId": { +"description": "Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/secrets", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Secret.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", +"httpMethod": "DELETE", +"id": "secretmanager.projects.locations.secrets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a given Secret.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:getIamPolicy", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Secrets.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/secrets", +"response": { +"$ref": "ListSecretsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates metadata of an existing Secret.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", +"httpMethod": "PATCH", +"id": "secretmanager.projects.locations.secrets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:setIamPolicy", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:testIamPermissions", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"versions": { +"methods": { +"access": { +"description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:access", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.versions.access", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:access", +"response": { +"$ref": "AccessSecretVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"destroy": { +"description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:destroy", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.versions.destroy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:destroy", +"request": { +"$ref": "DestroySecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"disable": { +"description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:disable", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.versions.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:disable", +"request": { +"$ref": "DisableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"enable": { +"description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:enable", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.versions.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:enable", +"request": { +"$ref": "EnableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.versions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecretVersions. This call does not return secret data.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.versions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/versions", +"response": { +"$ref": "ListSecretVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"secrets": { +"methods": { +"addVersion": { +"description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}:addVersion", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.addVersion", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:addVersion", +"request": { +"$ref": "AddSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Secret containing no SecretVersions.", +"flatPath": "v1/projects/{projectsId}/secrets", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"secretId": { +"description": "Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/secrets", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Secret.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "DELETE", +"id": "secretmanager.projects.secrets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a given Secret.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}:getIamPolicy", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Secrets.", +"flatPath": "v1/projects/{projectsId}/secrets", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/secrets", +"response": { +"$ref": "ListSecretsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates metadata of an existing Secret.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "PATCH", +"id": "secretmanager.projects.secrets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}:setIamPolicy", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}:testIamPermissions", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"versions": { +"methods": { +"access": { +"description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:access", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.access", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:access", +"response": { +"$ref": "AccessSecretVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"destroy": { +"description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:destroy", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.destroy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:destroy", +"request": { +"$ref": "DestroySecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"disable": { +"description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:disable", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:disable", +"request": { +"$ref": "DisableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"enable": { +"description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:enable", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:enable", +"request": { +"$ref": "EnableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecretVersions. This call does not return secret data.", +"flatPath": "v1/projects/{projectsId}/secrets/{secretsId}/versions", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/versions", +"response": { +"$ref": "ListSecretVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240419", +"rootUrl": "https://secretmanager.googleapis.com/", +"schemas": { +"AccessSecretVersionResponse": { +"description": "Response message for SecretManagerService.AccessSecretVersion.", +"id": "AccessSecretVersionResponse", +"properties": { +"name": { +"description": "The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"type": "string" +}, +"payload": { +"$ref": "SecretPayload", +"description": "Secret payload" +} +}, +"type": "object" +}, +"AddSecretVersionRequest": { +"description": "Request message for SecretManagerService.AddSecretVersion.", +"id": "AddSecretVersionRequest", +"properties": { +"payload": { +"$ref": "SecretPayload", +"description": "Required. The secret payload of the SecretVersion." +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Automatic": { +"description": "A replication policy that replicates the Secret payload without any restrictions.", +"id": "Automatic", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryption", +"description": "Optional. The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions." +} +}, +"type": "object" +}, +"AutomaticStatus": { +"description": "The replication status of a SecretVersion using automatic replication. Only populated if the parent Secret has an automatic replication policy.", +"id": "AutomaticStatus", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryptionStatus", +"description": "Output only. The customer-managed encryption status of the SecretVersion. Only populated if customer-managed encryption is used.", +"readOnly": true +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CustomerManagedEncryption": { +"description": "Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK).", +"id": "CustomerManagedEncryption", +"properties": { +"kmsKeyName": { +"description": "Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads. For secrets using the UserManaged replication policy type, Cloud KMS CryptoKeys must reside in the same location as the replica location. For secrets using the Automatic replication policy type, Cloud KMS CryptoKeys must reside in `global`. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", +"type": "string" +} +}, +"type": "object" +}, +"CustomerManagedEncryptionStatus": { +"description": "Describes the status of customer-managed encryption.", +"id": "CustomerManagedEncryptionStatus", +"properties": { +"kmsKeyVersionName": { +"description": "Required. The resource name of the Cloud KMS CryptoKeyVersion used to encrypt the secret payload, in the following format: `projects/*/locations/*/keyRings/*/cryptoKeys/*/versions/*`.", +"type": "string" +} +}, +"type": "object" +}, +"DestroySecretVersionRequest": { +"description": "Request message for SecretManagerService.DestroySecretVersion.", +"id": "DestroySecretVersionRequest", +"properties": { +"etag": { +"description": "Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds.", +"type": "string" +} +}, +"type": "object" +}, +"DisableSecretVersionRequest": { +"description": "Request message for SecretManagerService.DisableSecretVersion.", +"id": "DisableSecretVersionRequest", +"properties": { +"etag": { +"description": "Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnableSecretVersionRequest": { +"description": "Request message for SecretManagerService.EnableSecretVersion.", +"id": "EnableSecretVersionRequest", +"properties": { +"etag": { +"description": "Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds.", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListSecretVersionsResponse": { +"description": "Response message for SecretManagerService.ListSecretVersions.", +"id": "ListSecretVersionsResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in ListSecretVersionsRequest.page_token to retrieve the next page.", +"type": "string" +}, +"totalSize": { +"description": "The total number of SecretVersions but 0 when the ListSecretsRequest.filter field is set.", +"format": "int32", +"type": "integer" +}, +"versions": { +"description": "The list of SecretVersions sorted in reverse by create_time (newest first).", +"items": { +"$ref": "SecretVersion" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecretsResponse": { +"description": "Response message for SecretManagerService.ListSecrets.", +"id": "ListSecretsResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in ListSecretsRequest.page_token to retrieve the next page.", +"type": "string" +}, +"secrets": { +"description": "The list of Secrets sorted in reverse by create_time (newest first).", +"items": { +"$ref": "Secret" +}, +"type": "array" +}, +"totalSize": { +"description": "The total number of Secrets but 0 when the ListSecretsRequest.filter field is set.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Replica": { +"description": "Represents a Replica for this Secret.", +"id": "Replica", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryption", +"description": "Optional. The customer-managed encryption configuration of the User-Managed Replica. If no configuration is provided, Google-managed default encryption is used. Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions." +}, +"location": { +"description": "The canonical IDs of the location to replicate data. For example: `\"us-east1\"`.", +"type": "string" +} +}, +"type": "object" +}, +"ReplicaStatus": { +"description": "Describes the status of a user-managed replica for the SecretVersion.", +"id": "ReplicaStatus", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryptionStatus", +"description": "Output only. The customer-managed encryption status of the SecretVersion. Only populated if customer-managed encryption is used.", +"readOnly": true +}, +"location": { +"description": "Output only. The canonical ID of the replica location. For example: `\"us-east1\"`.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Replication": { +"description": "A policy that defines the replication and encryption configuration of data.", +"id": "Replication", +"properties": { +"automatic": { +"$ref": "Automatic", +"description": "The Secret will automatically be replicated without any restrictions." +}, +"userManaged": { +"$ref": "UserManaged", +"description": "The Secret will only be replicated into the locations specified." +} +}, +"type": "object" +}, +"ReplicationStatus": { +"description": "The replication status of a SecretVersion.", +"id": "ReplicationStatus", +"properties": { +"automatic": { +"$ref": "AutomaticStatus", +"description": "Describes the replication status of a SecretVersion with automatic replication. Only populated if the parent Secret has an automatic replication policy." +}, +"userManaged": { +"$ref": "UserManagedStatus", +"description": "Describes the replication status of a SecretVersion with user-managed replication. Only populated if the parent Secret has a user-managed replication policy." +} +}, +"type": "object" +}, +"Rotation": { +"description": "The rotation time and period for a Secret. At next_rotation_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation.", +"id": "Rotation", +"properties": { +"nextRotationTime": { +"description": "Optional. Timestamp in UTC at which the Secret is scheduled to rotate. Cannot be set to less than 300s (5 min) in the future and at most 3153600000s (100 years). next_rotation_time MUST be set if rotation_period is set.", +"format": "google-datetime", +"type": "string" +}, +"rotationPeriod": { +"description": "Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years). If rotation_period is set, next_rotation_time must be set. next_rotation_time will be advanced by this period when the service automatically sends rotation notifications.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Secret": { +"description": "A Secret is a logical secret whose value and versions can be accessed. A Secret is made up of zero or more SecretVersions that represent the secret data.", +"id": "Secret", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB.", +"type": "object" +}, +"createTime": { +"description": "Output only. The time at which the Secret was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryption", +"description": "Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used. Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions." +}, +"etag": { +"description": "Optional. Etag of the currently stored Secret.", +"type": "string" +}, +"expireTime": { +"description": "Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.", +"format": "google-datetime", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource.", +"type": "object" +}, +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"readOnly": true, +"type": "string" +}, +"replication": { +"$ref": "Replication", +"description": "Optional. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created." +}, +"rotation": { +"$ref": "Rotation", +"description": "Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy." +}, +"topics": { +"description": "Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.", +"items": { +"$ref": "Topic" +}, +"type": "array" +}, +"ttl": { +"description": "Input only. The TTL for the Secret.", +"format": "google-duration", +"type": "string" +}, +"versionAliases": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only be supported on GetSecretVersion and AccessSecretVersion.", +"type": "object" +}, +"versionDestroyTtl": { +"description": "Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"SecretPayload": { +"description": "A secret payload resource in the Secret Manager API. This contains the sensitive secret payload that is associated with a SecretVersion.", +"id": "SecretPayload", +"properties": { +"data": { +"description": "The secret data. Must be no larger than 64KiB.", +"format": "byte", +"type": "string" +}, +"dataCrc32c": { +"description": "Optional. If specified, SecretManagerService will verify the integrity of the received data on SecretManagerService.AddSecretVersion calls using the crc32c checksum and store it to include in future SecretManagerService.AccessSecretVersion responses. If a checksum is not provided in the SecretManagerService.AddSecretVersion request, the SecretManagerService will generate and store one for you. The CRC32C value is encoded as a Int64 for compatibility, and can be safely downconverted to uint32 in languages that support this type. https://cloud.google.com/apis/design/design_patterns#integer_types", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SecretVersion": { +"description": "A secret version resource in the Secret Manager API.", +"id": "SecretVersion", +"properties": { +"clientSpecifiedPayloadChecksum": { +"description": "Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion.", +"readOnly": true, +"type": "boolean" +}, +"createTime": { +"description": "Output only. The time at which the SecretVersion was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryptionStatus", +"description": "Output only. The customer-managed encryption status of the SecretVersion. Only populated if customer-managed encryption is used and Secret is a Regionalised Secret.", +"readOnly": true +}, +"destroyTime": { +"description": "Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. Etag of the currently stored SecretVersion.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.", +"readOnly": true, +"type": "string" +}, +"replicationStatus": { +"$ref": "ReplicationStatus", +"description": "The replication status of the SecretVersion." +}, +"scheduledDestroyTime": { +"description": "Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled_destroy_time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current state of the SecretVersion.", +"enum": [ +"STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"DESTROYED" +], +"enumDescriptions": [ +"Not specified. This value is unused and invalid.", +"The SecretVersion may be accessed.", +"The SecretVersion may not be accessed, but the secret data is still available and can be placed back into the ENABLED state.", +"The SecretVersion is destroyed and the secret data is no longer stored. A version may not leave this state once entered." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Topic": { +"description": "A Pub/Sub topic which Secret Manager will publish to when control plane events occur on this secret.", +"id": "Topic", +"properties": { +"name": { +"description": "Required. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission.", +"type": "string" +} +}, +"type": "object" +}, +"UserManaged": { +"description": "A replication policy that replicates the Secret payload into the locations specified in Secret.replication.user_managed.replicas", +"id": "UserManaged", +"properties": { +"replicas": { +"description": "Required. The list of Replicas for this Secret. Cannot be empty.", +"items": { +"$ref": "Replica" +}, +"type": "array" +} +}, +"type": "object" +}, +"UserManagedStatus": { +"description": "The replication status of a SecretVersion using user-managed replication. Only populated if the parent Secret has a user-managed replication policy.", +"id": "UserManagedStatus", +"properties": { +"replicas": { +"description": "Output only. The list of replica statuses for the SecretVersion.", +"items": { +"$ref": "ReplicaStatus" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Secret Manager API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..4792bf37c7b046073c576d1a215d59031fbc44fb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1beta1.json @@ -0,0 +1,1090 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://secretmanager.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Secret Manager", +"description": "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/secret-manager/", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://secretmanager.me-central2.rep.googleapis.com/", +"location": "me-central2" +} +], +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "secretmanager:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://secretmanager.mtls.googleapis.com/", +"name": "secretmanager", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"secrets": { +"methods": { +"addVersion": { +"description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}:addVersion", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.addVersion", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}:addVersion", +"request": { +"$ref": "AddSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Secret containing no SecretVersions.", +"flatPath": "v1beta1/projects/{projectsId}/secrets", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"secretId": { +"description": "Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/secrets", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Secret.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "DELETE", +"id": "secretmanager.projects.secrets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a given Secret.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}:getIamPolicy", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Secrets.", +"flatPath": "v1beta1/projects/{projectsId}/secrets", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/secrets", +"response": { +"$ref": "ListSecretsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates metadata of an existing Secret.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "PATCH", +"id": "secretmanager.projects.secrets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}:setIamPolicy", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}:testIamPermissions", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"versions": { +"methods": { +"access": { +"description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the `latest` SecretVersion.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:access", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.access", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:access", +"response": { +"$ref": "AccessSecretVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"destroy": { +"description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:destroy", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.destroy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:destroy", +"request": { +"$ref": "DestroySecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"disable": { +"description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:disable", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:disable", +"request": { +"$ref": "DisableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"enable": { +"description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:enable", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:enable", +"request": { +"$ref": "EnableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the `latest` SecretVersion.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` is an alias to the `latest` SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecretVersions. This call does not return secret data.", +"flatPath": "v1beta1/projects/{projectsId}/secrets/{secretsId}/versions", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/versions", +"response": { +"$ref": "ListSecretVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240419", +"rootUrl": "https://secretmanager.googleapis.com/", +"schemas": { +"AccessSecretVersionResponse": { +"description": "Response message for SecretManagerService.AccessSecretVersion.", +"id": "AccessSecretVersionResponse", +"properties": { +"name": { +"description": "The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`.", +"type": "string" +}, +"payload": { +"$ref": "SecretPayload", +"description": "Secret payload" +} +}, +"type": "object" +}, +"AddSecretVersionRequest": { +"description": "Request message for SecretManagerService.AddSecretVersion.", +"id": "AddSecretVersionRequest", +"properties": { +"payload": { +"$ref": "SecretPayload", +"description": "Required. The secret payload of the SecretVersion." +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Automatic": { +"description": "A replication policy that replicates the Secret payload without any restrictions.", +"id": "Automatic", +"properties": {}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"DestroySecretVersionRequest": { +"description": "Request message for SecretManagerService.DestroySecretVersion.", +"id": "DestroySecretVersionRequest", +"properties": {}, +"type": "object" +}, +"DisableSecretVersionRequest": { +"description": "Request message for SecretManagerService.DisableSecretVersion.", +"id": "DisableSecretVersionRequest", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnableSecretVersionRequest": { +"description": "Request message for SecretManagerService.EnableSecretVersion.", +"id": "EnableSecretVersionRequest", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListSecretVersionsResponse": { +"description": "Response message for SecretManagerService.ListSecretVersions.", +"id": "ListSecretVersionsResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in ListSecretVersionsRequest.page_token to retrieve the next page.", +"type": "string" +}, +"totalSize": { +"description": "The total number of SecretVersions.", +"format": "int32", +"type": "integer" +}, +"versions": { +"description": "The list of SecretVersions sorted in reverse by create_time (newest first).", +"items": { +"$ref": "SecretVersion" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecretsResponse": { +"description": "Response message for SecretManagerService.ListSecrets.", +"id": "ListSecretsResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in ListSecretsRequest.page_token to retrieve the next page.", +"type": "string" +}, +"secrets": { +"description": "The list of Secrets sorted in reverse by create_time (newest first).", +"items": { +"$ref": "Secret" +}, +"type": "array" +}, +"totalSize": { +"description": "The total number of Secrets.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Replica": { +"description": "Represents a Replica for this Secret.", +"id": "Replica", +"properties": { +"location": { +"description": "The canonical IDs of the location to replicate data. For example: `\"us-east1\"`.", +"type": "string" +} +}, +"type": "object" +}, +"Replication": { +"description": "A policy that defines the replication configuration of data.", +"id": "Replication", +"properties": { +"automatic": { +"$ref": "Automatic", +"description": "The Secret will automatically be replicated without any restrictions." +}, +"userManaged": { +"$ref": "UserManaged", +"description": "The Secret will only be replicated into the locations specified." +} +}, +"type": "object" +}, +"Secret": { +"description": "A Secret is a logical secret whose value and versions can be accessed. A Secret is made up of zero or more SecretVersions that represent the secret data.", +"id": "Secret", +"properties": { +"createTime": { +"description": "Output only. The time at which the Secret was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource.", +"type": "object" +}, +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"readOnly": true, +"type": "string" +}, +"replication": { +"$ref": "Replication", +"description": "Required. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created." +} +}, +"type": "object" +}, +"SecretPayload": { +"description": "A secret payload resource in the Secret Manager API. This contains the sensitive secret data that is associated with a SecretVersion.", +"id": "SecretPayload", +"properties": { +"data": { +"description": "The secret data. Must be no larger than 64KiB.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"SecretVersion": { +"description": "A secret version resource in the Secret Manager API.", +"id": "SecretVersion", +"properties": { +"createTime": { +"description": "Output only. The time at which the SecretVersion was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"destroyTime": { +"description": "Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current state of the SecretVersion.", +"enum": [ +"STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"DESTROYED" +], +"enumDescriptions": [ +"Not specified. This value is unused and invalid.", +"The SecretVersion may be accessed.", +"The SecretVersion may not be accessed, but the secret data is still available and can be placed back into the ENABLED state.", +"The SecretVersion is destroyed and the secret data is no longer stored. A version may not leave this state once entered." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UserManaged": { +"description": "A replication policy that replicates the Secret payload into the locations specified in Secret.replication.user_managed.replicas", +"id": "UserManaged", +"properties": { +"replicas": { +"description": "Required. The list of Replicas for this Secret. Cannot be empty.", +"items": { +"$ref": "Replica" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Secret Manager API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1beta2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1beta2.json new file mode 100644 index 0000000000000000000000000000000000000000..401e6f4e43771faf688c86c6d556fa0eca8e26ad --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/secretmanager.v1beta2.json @@ -0,0 +1,1782 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://secretmanager.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Secret Manager", +"description": "Stores sensitive data such as API keys, passwords, and certificates. Provides convenience while improving security. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/secret-manager/", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://secretmanager.me-central2.rep.googleapis.com/", +"location": "me-central2" +} +], +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "secretmanager:v1beta2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://secretmanager.mtls.googleapis.com/", +"name": "secretmanager", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta2/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"secrets": { +"methods": { +"addVersion": { +"description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:addVersion", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.addVersion", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+parent}:addVersion", +"request": { +"$ref": "AddSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Secret containing no SecretVersions.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"secretId": { +"description": "Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+parent}/secrets", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Secret.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", +"httpMethod": "DELETE", +"id": "secretmanager.projects.locations.secrets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a given Secret.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:getIamPolicy", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Secrets.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+parent}/secrets", +"response": { +"$ref": "ListSecretsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates metadata of an existing Secret.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}", +"httpMethod": "PATCH", +"id": "secretmanager.projects.locations.secrets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:setIamPolicy", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}:testIamPermissions", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"versions": { +"methods": { +"access": { +"description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:access", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.versions.access", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:access", +"response": { +"$ref": "AccessSecretVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"destroy": { +"description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:destroy", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.versions.destroy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:destroy", +"request": { +"$ref": "DestroySecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"disable": { +"description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:disable", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.versions.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:disable", +"request": { +"$ref": "DisableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"enable": { +"description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}:enable", +"httpMethod": "POST", +"id": "secretmanager.projects.locations.secrets.versions.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:enable", +"request": { +"$ref": "EnableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions/{versionsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.versions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecretVersions. This call does not return secret data.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/secrets/{secretsId}/versions", +"httpMethod": "GET", +"id": "secretmanager.projects.locations.secrets.versions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+parent}/versions", +"response": { +"$ref": "ListSecretVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"secrets": { +"methods": { +"addVersion": { +"description": "Creates a new SecretVersion containing secret data and attaches it to an existing Secret.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}:addVersion", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.addVersion", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the Secret to associate with the SecretVersion in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+parent}:addVersion", +"request": { +"$ref": "AddSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Secret containing no SecretVersions.", +"flatPath": "v1beta2/projects/{projectsId}/secrets", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the project to associate with the Secret, in the format `projects/*` or `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"secretId": { +"description": "Required. This must be unique within the project. A secret ID is a string with a maximum length of 255 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore (`_`) characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+parent}/secrets", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Secret.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "DELETE", +"id": "secretmanager.projects.secrets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. Etag of the Secret. The request succeeds if it matches the etag of the currently stored secret object. If the etag is omitted, the request succeeds.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The resource name of the Secret to delete in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a given Secret.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Secret, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a secret. Returns empty policy if the secret exists and does not have a policy set.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}:getIamPolicy", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Secrets.", +"flatPath": "v1beta2/projects/{projectsId}/secrets", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secrets matching the filter. If filter is empty, all secrets are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretsResponse.next_page_token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project associated with the Secrets, in the format `projects/*` or `projects/*/locations/*`", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+parent}/secrets", +"response": { +"$ref": "ListSecretsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates metadata of an existing Secret.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}", +"httpMethod": "PATCH", +"id": "secretmanager.projects.secrets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Specifies the fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "Secret" +}, +"response": { +"$ref": "Secret" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified secret. Replaces any existing policy. Permissions on SecretVersions are enforced according to the policy set on the associated Secret.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}:setIamPolicy", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has for the specified secret. If the secret does not exist, this call returns an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}:testIamPermissions", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"versions": { +"methods": { +"access": { +"description": "Accesses a SecretVersion. This call returns the secret data. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:access", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.access", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:access", +"response": { +"$ref": "AccessSecretVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"destroy": { +"description": "Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:destroy", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.destroy", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to destroy in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:destroy", +"request": { +"$ref": "DestroySecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"disable": { +"description": "Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:disable", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to disable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:disable", +"request": { +"$ref": "DisableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"enable": { +"description": "Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}:enable", +"httpMethod": "POST", +"id": "secretmanager.projects.secrets.versions.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion to enable in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:enable", +"request": { +"$ref": "EnableSecretVersionRequest" +}, +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets metadata for a SecretVersion. `projects/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}/versions/{versionsId}", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`. `projects/*/secrets/*/versions/latest` or `projects/*/locations/*/secrets/*/versions/latest` is an alias to the most recently created SecretVersion.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecretVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists SecretVersions. This call does not return secret data.", +"flatPath": "v1beta2/projects/{projectsId}/secrets/{secretsId}/versions", +"httpMethod": "GET", +"id": "secretmanager.projects.secrets.versions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string, adhering to the rules in [List-operation filtering](https://cloud.google.com/secret-manager/docs/filtering). List only secret versions matching the filter. If filter is empty, all secret versions are listed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results to be returned in a single page. If set to 0, the server decides the number of results to return. If the number is greater than 25000, it is capped at 25000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. Pagination token, returned earlier via ListSecretVersionsResponse.next_page_token][].", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the Secret associated with the SecretVersions to list, in the format `projects/*/secrets/*` or `projects/*/locations/*/secrets/*`.", +"location": "path", +"pattern": "^projects/[^/]+/secrets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+parent}/versions", +"response": { +"$ref": "ListSecretVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240419", +"rootUrl": "https://secretmanager.googleapis.com/", +"schemas": { +"AccessSecretVersionResponse": { +"description": "Response message for SecretManagerService.AccessSecretVersion.", +"id": "AccessSecretVersionResponse", +"properties": { +"name": { +"description": "The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*` or `projects/*/locations/*/secrets/*/versions/*`.", +"type": "string" +}, +"payload": { +"$ref": "SecretPayload", +"description": "Secret payload" +} +}, +"type": "object" +}, +"AddSecretVersionRequest": { +"description": "Request message for SecretManagerService.AddSecretVersion.", +"id": "AddSecretVersionRequest", +"properties": { +"payload": { +"$ref": "SecretPayload", +"description": "Required. The secret payload of the SecretVersion." +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Automatic": { +"description": "A replication policy that replicates the Secret payload without any restrictions.", +"id": "Automatic", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryption", +"description": "Optional. The customer-managed encryption configuration of the Secret. If no configuration is provided, Google-managed default encryption is used. Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions." +} +}, +"type": "object" +}, +"AutomaticStatus": { +"description": "The replication status of a SecretVersion using automatic replication. Only populated if the parent Secret has an automatic replication policy.", +"id": "AutomaticStatus", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryptionStatus", +"description": "Output only. The customer-managed encryption status of the SecretVersion. Only populated if customer-managed encryption is used.", +"readOnly": true +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CustomerManagedEncryption": { +"description": "Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK).", +"id": "CustomerManagedEncryption", +"properties": { +"kmsKeyName": { +"description": "Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads. For secrets using the UserManaged replication policy type, Cloud KMS CryptoKeys must reside in the same location as the replica location. For secrets using the Automatic replication policy type, Cloud KMS CryptoKeys must reside in `global`. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", +"type": "string" +} +}, +"type": "object" +}, +"CustomerManagedEncryptionStatus": { +"description": "Describes the status of customer-managed encryption.", +"id": "CustomerManagedEncryptionStatus", +"properties": { +"kmsKeyVersionName": { +"description": "Required. The resource name of the Cloud KMS CryptoKeyVersion used to encrypt the secret payload, in the following format: `projects/*/locations/*/keyRings/*/cryptoKeys/*/versions/*`.", +"type": "string" +} +}, +"type": "object" +}, +"DestroySecretVersionRequest": { +"description": "Request message for SecretManagerService.DestroySecretVersion.", +"id": "DestroySecretVersionRequest", +"properties": { +"etag": { +"description": "Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds.", +"type": "string" +} +}, +"type": "object" +}, +"DisableSecretVersionRequest": { +"description": "Request message for SecretManagerService.DisableSecretVersion.", +"id": "DisableSecretVersionRequest", +"properties": { +"etag": { +"description": "Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnableSecretVersionRequest": { +"description": "Request message for SecretManagerService.EnableSecretVersion.", +"id": "EnableSecretVersionRequest", +"properties": { +"etag": { +"description": "Optional. Etag of the SecretVersion. The request succeeds if it matches the etag of the currently stored secret version object. If the etag is omitted, the request succeeds.", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListSecretVersionsResponse": { +"description": "Response message for SecretManagerService.ListSecretVersions.", +"id": "ListSecretVersionsResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in ListSecretVersionsRequest.page_token to retrieve the next page.", +"type": "string" +}, +"totalSize": { +"description": "The total number of SecretVersions but 0 when the ListSecretsRequest.filter field is set.", +"format": "int32", +"type": "integer" +}, +"versions": { +"description": "The list of SecretVersions sorted in reverse by create_time (newest first).", +"items": { +"$ref": "SecretVersion" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecretsResponse": { +"description": "Response message for SecretManagerService.ListSecrets.", +"id": "ListSecretsResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve the next page of results. Pass this value in ListSecretsRequest.page_token to retrieve the next page.", +"type": "string" +}, +"secrets": { +"description": "The list of Secrets sorted in reverse by create_time (newest first).", +"items": { +"$ref": "Secret" +}, +"type": "array" +}, +"totalSize": { +"description": "The total number of Secrets but 0 when the ListSecretsRequest.filter field is set.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Replica": { +"description": "Represents a Replica for this Secret.", +"id": "Replica", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryption", +"description": "Optional. The customer-managed encryption configuration of the User-Managed Replica. If no configuration is provided, Google-managed default encryption is used. Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions." +}, +"location": { +"description": "The canonical IDs of the location to replicate data. For example: `\"us-east1\"`.", +"type": "string" +} +}, +"type": "object" +}, +"ReplicaStatus": { +"description": "Describes the status of a user-managed replica for the SecretVersion.", +"id": "ReplicaStatus", +"properties": { +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryptionStatus", +"description": "Output only. The customer-managed encryption status of the SecretVersion. Only populated if customer-managed encryption is used.", +"readOnly": true +}, +"location": { +"description": "Output only. The canonical ID of the replica location. For example: `\"us-east1\"`.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Replication": { +"description": "A policy that defines the replication and encryption configuration of data.", +"id": "Replication", +"properties": { +"automatic": { +"$ref": "Automatic", +"description": "The Secret will automatically be replicated without any restrictions." +}, +"userManaged": { +"$ref": "UserManaged", +"description": "The Secret will only be replicated into the locations specified." +} +}, +"type": "object" +}, +"ReplicationStatus": { +"description": "The replication status of a SecretVersion.", +"id": "ReplicationStatus", +"properties": { +"automatic": { +"$ref": "AutomaticStatus", +"description": "Describes the replication status of a SecretVersion with automatic replication. Only populated if the parent Secret has an automatic replication policy." +}, +"userManaged": { +"$ref": "UserManagedStatus", +"description": "Describes the replication status of a SecretVersion with user-managed replication. Only populated if the parent Secret has a user-managed replication policy." +} +}, +"type": "object" +}, +"Rotation": { +"description": "The rotation time and period for a Secret. At next_rotation_time, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics must be set to configure rotation.", +"id": "Rotation", +"properties": { +"nextRotationTime": { +"description": "Optional. Timestamp in UTC at which the Secret is scheduled to rotate. Cannot be set to less than 300s (5 min) in the future and at most 3153600000s (100 years). next_rotation_time MUST be set if rotation_period is set.", +"format": "google-datetime", +"type": "string" +}, +"rotationPeriod": { +"description": "Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years). If rotation_period is set, next_rotation_time must be set. next_rotation_time will be advanced by this period when the service automatically sends rotation notifications.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Secret": { +"description": "A Secret is a logical secret whose value and versions can be accessed. A Secret is made up of zero or more SecretVersions that represent the secret data.", +"id": "Secret", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB.", +"type": "object" +}, +"createTime": { +"description": "Output only. The time at which the Secret was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryption", +"description": "Optional. The customer-managed encryption configuration of the Regionalised Secrets. If no configuration is provided, Google-managed default encryption is used. Updates to the Secret encryption configuration only apply to SecretVersions added afterwards. They do not apply retroactively to existing SecretVersions." +}, +"etag": { +"description": "Optional. Etag of the currently stored Secret.", +"type": "string" +}, +"expireTime": { +"description": "Optional. Timestamp in UTC when the Secret is scheduled to expire. This is always provided on output, regardless of what was sent on input.", +"format": "google-datetime", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `\\p{Ll}\\p{Lo}{0,62}` Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: `[\\p{Ll}\\p{Lo}\\p{N}_-]{0,63}` No more than 64 labels can be assigned to a given resource.", +"type": "object" +}, +"name": { +"description": "Output only. The resource name of the Secret in the format `projects/*/secrets/*`.", +"readOnly": true, +"type": "string" +}, +"replication": { +"$ref": "Replication", +"description": "Optional. Immutable. The replication policy of the secret data attached to the Secret. The replication policy cannot be changed after the Secret has been created." +}, +"rotation": { +"$ref": "Rotation", +"description": "Optional. Rotation policy attached to the Secret. May be excluded if there is no rotation policy." +}, +"topics": { +"description": "Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions.", +"items": { +"$ref": "Topic" +}, +"type": "array" +}, +"ttl": { +"description": "Input only. The TTL for the Secret.", +"format": "google-duration", +"type": "string" +}, +"versionAliases": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen (`-`) and underscore ('_') characters. An alias string must start with a letter and cannot be the string 'latest' or 'NEW'. No more than 50 aliases can be assigned to a given secret. Version-Alias pairs will be viewable via GetSecret and modifiable via UpdateSecret. Access by alias is only supported for GetSecretVersion and AccessSecretVersion.", +"type": "object" +}, +"versionDestroyTtl": { +"description": "Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"SecretPayload": { +"description": "A secret payload resource in the Secret Manager API. This contains the sensitive secret payload that is associated with a SecretVersion.", +"id": "SecretPayload", +"properties": { +"data": { +"description": "The secret data. Must be no larger than 64KiB.", +"format": "byte", +"type": "string" +}, +"dataCrc32c": { +"description": "Optional. If specified, SecretManagerService will verify the integrity of the received data on SecretManagerService.AddSecretVersion calls using the crc32c checksum and store it to include in future SecretManagerService.AccessSecretVersion responses. If a checksum is not provided in the SecretManagerService.AddSecretVersion request, the SecretManagerService will generate and store one for you. The CRC32C value is encoded as a Int64 for compatibility, and can be safely downconverted to uint32 in languages that support this type. https://cloud.google.com/apis/design/design_patterns#integer_types", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SecretVersion": { +"description": "A secret version resource in the Secret Manager API.", +"id": "SecretVersion", +"properties": { +"clientSpecifiedPayloadChecksum": { +"description": "Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion.", +"readOnly": true, +"type": "boolean" +}, +"createTime": { +"description": "Output only. The time at which the SecretVersion was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customerManagedEncryption": { +"$ref": "CustomerManagedEncryptionStatus", +"description": "Output only. The customer-managed encryption status of the SecretVersion. Only populated if customer-managed encryption is used and Secret is a Regionalised Secret.", +"readOnly": true +}, +"destroyTime": { +"description": "Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. Etag of the currently stored SecretVersion.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the SecretVersion in the format `projects/*/secrets/*/versions/*`. SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret.", +"readOnly": true, +"type": "string" +}, +"replicationStatus": { +"$ref": "ReplicationStatus", +"description": "The replication status of the SecretVersion." +}, +"scheduledDestroyTime": { +"description": "Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled_destroy_time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current state of the SecretVersion.", +"enum": [ +"STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"DESTROYED" +], +"enumDescriptions": [ +"Not specified. This value is unused and invalid.", +"The SecretVersion may be accessed.", +"The SecretVersion may not be accessed, but the secret data is still available and can be placed back into the ENABLED state.", +"The SecretVersion is destroyed and the secret data is no longer stored. A version may not leave this state once entered." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Topic": { +"description": "A Pub/Sub topic which Secret Manager will publish to when control plane events occur on this secret.", +"id": "Topic", +"properties": { +"name": { +"description": "Required. The resource name of the Pub/Sub topic that will be published to, in the following format: `projects/*/topics/*`. For publication to succeed, the Secret Manager service agent must have the `pubsub.topic.publish` permission on the topic. The Pub/Sub Publisher role (`roles/pubsub.publisher`) includes this permission.", +"type": "string" +} +}, +"type": "object" +}, +"UserManaged": { +"description": "A replication policy that replicates the Secret payload into the locations specified in Secret.replication.user_managed.replicas", +"id": "UserManaged", +"properties": { +"replicas": { +"description": "Required. The list of Replicas for this Secret. Cannot be empty.", +"items": { +"$ref": "Replica" +}, +"type": "array" +} +}, +"type": "object" +}, +"UserManagedStatus": { +"description": "The replication status of a SecretVersion using user-managed replication. Only populated if the parent Secret has a user-managed replication policy.", +"id": "UserManagedStatus", +"properties": { +"replicas": { +"description": "Output only. The list of replica statuses for the SecretVersion.", +"items": { +"$ref": "ReplicaStatus" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Secret Manager API", +"version": "v1beta2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..33ebac40b699ed74521f74efde9043c26dad7d9e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1.json @@ -0,0 +1,13678 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://securitycenter.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Security Command Center", +"description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/security-command-center", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "securitycenter:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://securitycenter.mtls.googleapis.com/", +"name": "securitycenter", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"resources": { +"assets": { +"methods": { +"group": { +"deprecated": true, +"description": "Filters an organization's assets and groups them by their specified properties.", +"flatPath": "v1/folders/{foldersId}/assets:group", +"httpMethod": "POST", +"id": "securitycenter.folders.assets.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/assets:group", +"request": { +"$ref": "GroupAssetsRequest" +}, +"response": { +"$ref": "GroupAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"deprecated": true, +"description": "Lists an organization's assets.", +"flatPath": "v1/folders/{foldersId}/assets", +"httpMethod": "GET", +"id": "securitycenter.folders.assets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"compareDuration": { +"description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"fieldMask": { +"description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/assets", +"response": { +"$ref": "ListAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1/folders/{foldersId}/assets/{assetsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.folders.assets.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^folders/[^/]+/assets/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityMarks" +}, +"response": { +"$ref": "SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"bigQueryExports": { +"methods": { +"create": { +"description": "Creates a BigQuery export.", +"flatPath": "v1/folders/{foldersId}/bigQueryExports", +"httpMethod": "POST", +"id": "securitycenter.folders.bigQueryExports.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"bigQueryExportId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/bigQueryExports", +"request": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing BigQuery export.", +"flatPath": "v1/folders/{foldersId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "DELETE", +"id": "securitycenter.folders.bigQueryExports.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", +"location": "path", +"pattern": "^folders/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a BigQuery export.", +"flatPath": "v1/folders/{foldersId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "GET", +"id": "securitycenter.folders.bigQueryExports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", +"location": "path", +"pattern": "^folders/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.", +"flatPath": "v1/folders/{foldersId}/bigQueryExports", +"httpMethod": "GET", +"id": "securitycenter.folders.bigQueryExports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns the collection of BigQuery exports. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/bigQueryExports", +"response": { +"$ref": "ListBigQueryExportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a BigQuery export.", +"flatPath": "v1/folders/{foldersId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.bigQueryExports.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", +"location": "path", +"pattern": "^folders/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"eventThreatDetectionSettings": { +"methods": { +"validateCustomModule": { +"description": "Validates the given Event Threat Detection custom module.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings:validateCustomModule", +"httpMethod": "POST", +"id": "securitycenter.folders.eventThreatDetectionSettings.validateCustomModule", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:validateCustomModule", +"request": { +"$ref": "ValidateEventThreatDetectionCustomModuleRequest" +}, +"response": { +"$ref": "ValidateEventThreatDetectionCustomModuleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"customModules": { +"methods": { +"create": { +"description": "Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", +"httpMethod": "POST", +"id": "securitycenter.folders.eventThreatDetectionSettings.customModules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"request": { +"$ref": "EventThreatDetectionCustomModule" +}, +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "DELETE", +"id": "securitycenter.folders.eventThreatDetectionSettings.customModules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets an Event Threat Detection custom module.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "GET", +"id": "securitycenter.folders.eventThreatDetectionSettings.customModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules", +"httpMethod": "GET", +"id": "securitycenter.folders.eventThreatDetectionSettings.customModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"response": { +"$ref": "ListEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listDescendant": { +"description": "Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules:listDescendant", +"httpMethod": "GET", +"id": "securitycenter.folders.eventThreatDetectionSettings.customModules.listDescendant", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:listDescendant", +"response": { +"$ref": "ListDescendantEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.eventThreatDetectionSettings.customModules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "EventThreatDetectionCustomModule" +}, +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"effectiveCustomModules": { +"methods": { +"get": { +"description": "Gets an effective Event Threat Detection custom module at the given level.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/effectiveCustomModules/{effectiveCustomModulesId}", +"httpMethod": "GET", +"id": "securitycenter.folders.eventThreatDetectionSettings.effectiveCustomModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "EffectiveEventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.", +"flatPath": "v1/folders/{foldersId}/eventThreatDetectionSettings/effectiveCustomModules", +"httpMethod": "GET", +"id": "securitycenter.folders.eventThreatDetectionSettings.effectiveCustomModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules for. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/effectiveCustomModules", +"response": { +"$ref": "ListEffectiveEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"findings": { +"methods": { +"bulkMute": { +"description": "Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.", +"flatPath": "v1/folders/{foldersId}/findings:bulkMute", +"httpMethod": "POST", +"id": "securitycenter.folders.findings.bulkMute", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent, at which bulk action needs to be applied. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings:bulkMute", +"request": { +"$ref": "BulkMuteFindingsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"locations": { +"resources": { +"muteConfigs": { +"methods": { +"delete": { +"description": "Deletes an existing mute config.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.folders.locations.muteConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a mute config.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.folders.locations.muteConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a mute config.", +"flatPath": "v1/folders/{foldersId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.locations.muteConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"location": "path", +"pattern": "^folders/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"muteConfigs": { +"methods": { +"create": { +"description": "Creates a mute config.", +"flatPath": "v1/folders/{foldersId}/muteConfigs", +"httpMethod": "POST", +"id": "securitycenter.folders.muteConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"muteConfigId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new mute configs's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/muteConfigs", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing mute config.", +"flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.folders.muteConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^folders/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a mute config.", +"flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.folders.muteConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^folders/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists mute configs.", +"flatPath": "v1/folders/{foldersId}/muteConfigs", +"httpMethod": "GET", +"id": "securitycenter.folders.muteConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns the collection of mute configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/muteConfigs", +"response": { +"$ref": "ListMuteConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a mute config.", +"flatPath": "v1/folders/{foldersId}/muteConfigs/{muteConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.muteConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"location": "path", +"pattern": "^folders/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"notificationConfigs": { +"methods": { +"create": { +"description": "Creates a notification config.", +"flatPath": "v1/folders/{foldersId}/notificationConfigs", +"httpMethod": "POST", +"id": "securitycenter.folders.notificationConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"configId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/notificationConfigs", +"request": { +"$ref": "NotificationConfig" +}, +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a notification config.", +"flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.folders.notificationConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", +"location": "path", +"pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a notification config.", +"flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.folders.notificationConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", +"location": "path", +"pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists notification configs.", +"flatPath": "v1/folders/{foldersId}/notificationConfigs", +"httpMethod": "GET", +"id": "securitycenter.folders.notificationConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/notificationConfigs", +"response": { +"$ref": "ListNotificationConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": " Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter", +"flatPath": "v1/folders/{foldersId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.notificationConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", +"location": "path", +"pattern": "^folders/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "NotificationConfig" +}, +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityHealthAnalyticsSettings": { +"resources": { +"customModules": { +"methods": { +"create": { +"description": "Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", +"httpMethod": "POST", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the new custom module's parent. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"request": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "DELETE", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to delete. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a SecurityHealthAnalyticsCustomModule.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "GET", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules", +"httpMethod": "GET", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"response": { +"$ref": "ListSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listDescendant": { +"description": "Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent\u2019s CRM descendants.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules:listDescendant", +"httpMethod": "GET", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.listDescendant", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list descendant custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:listDescendant", +"response": { +"$ref": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. The only fields that can be updated are `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and `custom_config` are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"simulate": { +"description": "Simulates a given SecurityHealthAnalyticsCustomModule and Resource.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/customModules:simulate", +"httpMethod": "POST", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.customModules.simulate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}`", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:simulate", +"request": { +"$ref": "SimulateSecurityHealthAnalyticsCustomModuleRequest" +}, +"response": { +"$ref": "SimulateSecurityHealthAnalyticsCustomModuleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"effectiveCustomModules": { +"methods": { +"get": { +"description": "Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", +"httpMethod": "GET", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the effective custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", +"flatPath": "v1/folders/{foldersId}/securityHealthAnalyticsSettings/effectiveCustomModules", +"httpMethod": "GET", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.effectiveCustomModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list effective custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/effectiveCustomModules", +"response": { +"$ref": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"sources": { +"methods": { +"list": { +"description": "Lists all sources belonging to an organization.", +"flatPath": "v1/folders/{foldersId}/sources", +"httpMethod": "GET", +"id": "securitycenter.folders.sources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/sources", +"response": { +"$ref": "ListSourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"findings": { +"methods": { +"group": { +"description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings", +"flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings:group", +"httpMethod": "POST", +"id": "securitycenter.folders.sources.findings.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-", +"location": "path", +"pattern": "^folders/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings:group", +"request": { +"$ref": "GroupFindingsRequest" +}, +"response": { +"$ref": "GroupFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings", +"flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings", +"httpMethod": "GET", +"id": "securitycenter.folders.sources.findings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"compareDuration": { +"description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"fieldMask": { +"description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-", +"location": "path", +"pattern": "^folders/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/findings", +"response": { +"$ref": "ListFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", +"flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.sources.findings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Finding" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setMute": { +"description": "Updates the mute state of a finding.", +"flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}:setMute", +"httpMethod": "POST", +"id": "securitycenter.folders.sources.findings.setMute", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setMute", +"request": { +"$ref": "SetMuteRequest" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setState": { +"description": "Updates the state of a finding.", +"flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}:setState", +"httpMethod": "POST", +"id": "securitycenter.folders.sources.findings.setState", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setState", +"request": { +"$ref": "SetFindingStateRequest" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.folders.sources.findings.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityMarks" +}, +"response": { +"$ref": "SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"externalSystems": { +"methods": { +"patch": { +"description": "Updates external system. This is for a given finding.", +"flatPath": "v1/folders/{foldersId}/sources/{sourcesId}/findings/{findingsId}/externalSystems/{externalSystemsId}", +"httpMethod": "PATCH", +"id": "securitycenter.folders.sources.findings.externalSystems.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", +"location": "path", +"pattern": "^folders/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the external system resource. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"organizations": { +"methods": { +"getOrganizationSettings": { +"description": "Gets the settings for an organization.", +"flatPath": "v1/organizations/{organizationsId}/organizationSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getOrganizationSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the organization to get organization settings for. Its format is \"organizations/[organization_id]/organizationSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/organizationSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "OrganizationSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateOrganizationSettings": { +"description": "Updates an organization's settings.", +"flatPath": "v1/organizations/{organizationsId}/organizationSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateOrganizationSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/organizationSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/organizationSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the settings resource. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "OrganizationSettings" +}, +"response": { +"$ref": "OrganizationSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"assets": { +"methods": { +"group": { +"deprecated": true, +"description": "Filters an organization's assets and groups them by their specified properties.", +"flatPath": "v1/organizations/{organizationsId}/assets:group", +"httpMethod": "POST", +"id": "securitycenter.organizations.assets.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/assets:group", +"request": { +"$ref": "GroupAssetsRequest" +}, +"response": { +"$ref": "GroupAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"deprecated": true, +"description": "Lists an organization's assets.", +"flatPath": "v1/organizations/{organizationsId}/assets", +"httpMethod": "GET", +"id": "securitycenter.organizations.assets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"compareDuration": { +"description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"fieldMask": { +"description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/assets", +"response": { +"$ref": "ListAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"runDiscovery": { +"deprecated": true, +"description": "Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.", +"flatPath": "v1/organizations/{organizationsId}/assets:runDiscovery", +"httpMethod": "POST", +"id": "securitycenter.organizations.assets.runDiscovery", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the organization to run asset discovery for. Its format is \"organizations/[organization_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/assets:runDiscovery", +"request": { +"$ref": "RunAssetDiscoveryRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1/organizations/{organizationsId}/assets/{assetsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.assets.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^organizations/[^/]+/assets/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityMarks" +}, +"response": { +"$ref": "SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"bigQueryExports": { +"methods": { +"create": { +"description": "Creates a BigQuery export.", +"flatPath": "v1/organizations/{organizationsId}/bigQueryExports", +"httpMethod": "POST", +"id": "securitycenter.organizations.bigQueryExports.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"bigQueryExportId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/bigQueryExports", +"request": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing BigQuery export.", +"flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.bigQueryExports.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", +"location": "path", +"pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a BigQuery export.", +"flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.bigQueryExports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", +"location": "path", +"pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.", +"flatPath": "v1/organizations/{organizationsId}/bigQueryExports", +"httpMethod": "GET", +"id": "securitycenter.organizations.bigQueryExports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns the collection of BigQuery exports. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/bigQueryExports", +"response": { +"$ref": "ListBigQueryExportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a BigQuery export.", +"flatPath": "v1/organizations/{organizationsId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.bigQueryExports.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", +"location": "path", +"pattern": "^organizations/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"eventThreatDetectionSettings": { +"methods": { +"validateCustomModule": { +"description": "Validates the given Event Threat Detection custom module.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings:validateCustomModule", +"httpMethod": "POST", +"id": "securitycenter.organizations.eventThreatDetectionSettings.validateCustomModule", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:validateCustomModule", +"request": { +"$ref": "ValidateEventThreatDetectionCustomModuleRequest" +}, +"response": { +"$ref": "ValidateEventThreatDetectionCustomModuleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"customModules": { +"methods": { +"create": { +"description": "Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", +"httpMethod": "POST", +"id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"request": { +"$ref": "EventThreatDetectionCustomModule" +}, +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets an Event Threat Detection custom module.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules", +"httpMethod": "GET", +"id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"response": { +"$ref": "ListEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listDescendant": { +"description": "Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules:listDescendant", +"httpMethod": "GET", +"id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.listDescendant", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:listDescendant", +"response": { +"$ref": "ListDescendantEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.eventThreatDetectionSettings.customModules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "EventThreatDetectionCustomModule" +}, +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"effectiveCustomModules": { +"methods": { +"get": { +"description": "Gets an effective Event Threat Detection custom module at the given level.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/effectiveCustomModules/{effectiveCustomModulesId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.eventThreatDetectionSettings.effectiveCustomModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "EffectiveEventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.", +"flatPath": "v1/organizations/{organizationsId}/eventThreatDetectionSettings/effectiveCustomModules", +"httpMethod": "GET", +"id": "securitycenter.organizations.eventThreatDetectionSettings.effectiveCustomModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules for. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/effectiveCustomModules", +"response": { +"$ref": "ListEffectiveEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"findings": { +"methods": { +"bulkMute": { +"description": "Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.", +"flatPath": "v1/organizations/{organizationsId}/findings:bulkMute", +"httpMethod": "POST", +"id": "securitycenter.organizations.findings.bulkMute", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent, at which bulk action needs to be applied. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings:bulkMute", +"request": { +"$ref": "BulkMuteFindingsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"locations": { +"resources": { +"muteConfigs": { +"methods": { +"delete": { +"description": "Deletes an existing mute config.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.locations.muteConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a mute config.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.locations.muteConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a mute config.", +"flatPath": "v1/organizations/{organizationsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.locations.muteConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"location": "path", +"pattern": "^organizations/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"muteConfigs": { +"methods": { +"create": { +"description": "Creates a mute config.", +"flatPath": "v1/organizations/{organizationsId}/muteConfigs", +"httpMethod": "POST", +"id": "securitycenter.organizations.muteConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"muteConfigId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new mute configs's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/muteConfigs", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing mute config.", +"flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.muteConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a mute config.", +"flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.muteConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists mute configs.", +"flatPath": "v1/organizations/{organizationsId}/muteConfigs", +"httpMethod": "GET", +"id": "securitycenter.organizations.muteConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns the collection of mute configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/muteConfigs", +"response": { +"$ref": "ListMuteConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a mute config.", +"flatPath": "v1/organizations/{organizationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.muteConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"location": "path", +"pattern": "^organizations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"notificationConfigs": { +"methods": { +"create": { +"description": "Creates a notification config.", +"flatPath": "v1/organizations/{organizationsId}/notificationConfigs", +"httpMethod": "POST", +"id": "securitycenter.organizations.notificationConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"configId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/notificationConfigs", +"request": { +"$ref": "NotificationConfig" +}, +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a notification config.", +"flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.notificationConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a notification config.", +"flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.notificationConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists notification configs.", +"flatPath": "v1/organizations/{organizationsId}/notificationConfigs", +"httpMethod": "GET", +"id": "securitycenter.organizations.notificationConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/notificationConfigs", +"response": { +"$ref": "ListNotificationConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": " Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter", +"flatPath": "v1/organizations/{organizationsId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.notificationConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", +"location": "path", +"pattern": "^organizations/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "NotificationConfig" +}, +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "securitycenter.organizations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^organizations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^organizations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/organizations/{organizationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/organizations/{organizationsId}/operations", +"httpMethod": "GET", +"id": "securitycenter.organizations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^organizations/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"resourceValueConfigs": { +"methods": { +"batchCreate": { +"description": "Creates a ResourceValueConfig for an organization. Maps user's tags to difference resource values for use by the attack path simulation.", +"flatPath": "v1/organizations/{organizationsId}/resourceValueConfigs:batchCreate", +"httpMethod": "POST", +"id": "securitycenter.organizations.resourceValueConfigs.batchCreate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the new ResourceValueConfig's parent. The parent field in the CreateResourceValueConfigRequest messages must either be empty or match this field.", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/resourceValueConfigs:batchCreate", +"request": { +"$ref": "BatchCreateResourceValueConfigsRequest" +}, +"response": { +"$ref": "BatchCreateResourceValueConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a ResourceValueConfig.", +"flatPath": "v1/organizations/{organizationsId}/resourceValueConfigs/{resourceValueConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.resourceValueConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the ResourceValueConfig to delete", +"location": "path", +"pattern": "^organizations/[^/]+/resourceValueConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a ResourceValueConfig.", +"flatPath": "v1/organizations/{organizationsId}/resourceValueConfigs/{resourceValueConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.resourceValueConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource value config to retrieve. Its format is organizations/{organization}/resourceValueConfigs/{config_id}.", +"location": "path", +"pattern": "^organizations/[^/]+/resourceValueConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1ResourceValueConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all ResourceValueConfigs.", +"flatPath": "v1/organizations/{organizationsId}/resourceValueConfigs", +"httpMethod": "GET", +"id": "securitycenter.organizations.resourceValueConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The number of results to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListResourceValueConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListResourceValueConfigs` must match the call that provided the page token. page_size can be specified, and the new page_size will be used.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns the collection of resource value configs. Its format is \"organizations/[organization_id]\"", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/resourceValueConfigs", +"response": { +"$ref": "ListResourceValueConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing ResourceValueConfigs with new rules.", +"flatPath": "v1/organizations/{organizationsId}/resourceValueConfigs/{resourceValueConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.resourceValueConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name for the resource value config", +"location": "path", +"pattern": "^organizations/[^/]+/resourceValueConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1ResourceValueConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1ResourceValueConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityHealthAnalyticsSettings": { +"resources": { +"customModules": { +"methods": { +"create": { +"description": "Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", +"httpMethod": "POST", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the new custom module's parent. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"request": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to delete. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a SecurityHealthAnalyticsCustomModule.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules", +"httpMethod": "GET", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"response": { +"$ref": "ListSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listDescendant": { +"description": "Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent\u2019s CRM descendants.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules:listDescendant", +"httpMethod": "GET", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.listDescendant", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list descendant custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:listDescendant", +"response": { +"$ref": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. The only fields that can be updated are `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and `custom_config` are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"simulate": { +"description": "Simulates a given SecurityHealthAnalyticsCustomModule and Resource.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/customModules:simulate", +"httpMethod": "POST", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.customModules.simulate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}`", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:simulate", +"request": { +"$ref": "SimulateSecurityHealthAnalyticsCustomModuleRequest" +}, +"response": { +"$ref": "SimulateSecurityHealthAnalyticsCustomModuleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"effectiveCustomModules": { +"methods": { +"get": { +"description": "Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the effective custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", +"flatPath": "v1/organizations/{organizationsId}/securityHealthAnalyticsSettings/effectiveCustomModules", +"httpMethod": "GET", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.effectiveCustomModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list effective custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/effectiveCustomModules", +"response": { +"$ref": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"simulations": { +"methods": { +"get": { +"description": "Get the simulation by name or the latest simulation for the given organization.", +"flatPath": "v1/organizations/{organizationsId}/simulations/{simulationsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.simulations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The organization name or simulation name of this simulation Valid format: \"organizations/{organization}/simulations/latest\" \"organizations/{organization}/simulations/{simulation}\"", +"location": "path", +"pattern": "^organizations/[^/]+/simulations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Simulation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"attackExposureResults": { +"resources": { +"attackPaths": { +"methods": { +"list": { +"description": "Lists the attack paths for a set of simulation results or valued resources and filter.", +"flatPath": "v1/organizations/{organizationsId}/simulations/{simulationsId}/attackExposureResults/{attackExposureResultsId}/attackPaths", +"httpMethod": "GET", +"id": "securitycenter.organizations.simulations.attackExposureResults.attackPaths.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports =", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of a prior `ListAttackPaths` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list attack paths. Valid formats: \"organizations/{organization}\", \"organizations/{organization}/simulations/{simulation}\" \"organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}\" \"organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\"", +"location": "path", +"pattern": "^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/attackPaths", +"response": { +"$ref": "ListAttackPathsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"valuedResources": { +"methods": { +"list": { +"description": "Lists the valued resources for a set of simulation results and filter.", +"flatPath": "v1/organizations/{organizationsId}/simulations/{simulationsId}/attackExposureResults/{attackExposureResultsId}/valuedResources", +"httpMethod": "GET", +"id": "securitycenter.organizations.simulations.attackExposureResults.valuedResources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression that filters the valued resources in the response. Supported fields: * `resource_value` supports = * `resource_type` supports =", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The fields by which to order the valued resources response. Supported fields: * `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values should be a comma separated list of fields. For example: `exposed_score,resource_value`. The default sorting order is descending. To specify ascending or descending order for a field, append a \" ASC\" or a \" DESC\" suffix, respectively; for example: `exposed_score DESC`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListValuedResourcesResponse`; indicates that this is a continuation of a prior `ListValuedResources` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list valued resources. Valid formats: \"organizations/{organization}\", \"organizations/{organization}/simulations/{simulation}\" \"organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}\"", +"location": "path", +"pattern": "^organizations/[^/]+/simulations/[^/]+/attackExposureResults/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/valuedResources", +"response": { +"$ref": "ListValuedResourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"attackPaths": { +"methods": { +"list": { +"description": "Lists the attack paths for a set of simulation results or valued resources and filter.", +"flatPath": "v1/organizations/{organizationsId}/simulations/{simulationsId}/attackPaths", +"httpMethod": "GET", +"id": "securitycenter.organizations.simulations.attackPaths.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports =", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of a prior `ListAttackPaths` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list attack paths. Valid formats: \"organizations/{organization}\", \"organizations/{organization}/simulations/{simulation}\" \"organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}\" \"organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\"", +"location": "path", +"pattern": "^organizations/[^/]+/simulations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/attackPaths", +"response": { +"$ref": "ListAttackPathsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"valuedResources": { +"methods": { +"get": { +"description": "Get the valued resource by name", +"flatPath": "v1/organizations/{organizationsId}/simulations/{simulationsId}/valuedResources/{valuedResourcesId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.simulations.valuedResources.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of this valued resource Valid format: \"organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\"", +"location": "path", +"pattern": "^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ValuedResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the valued resources for a set of simulation results and filter.", +"flatPath": "v1/organizations/{organizationsId}/simulations/{simulationsId}/valuedResources", +"httpMethod": "GET", +"id": "securitycenter.organizations.simulations.valuedResources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression that filters the valued resources in the response. Supported fields: * `resource_value` supports = * `resource_type` supports =", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The fields by which to order the valued resources response. Supported fields: * `exposed_score` * `resource_value` * `resource_type` * `resource` * `display_name` Values should be a comma separated list of fields. For example: `exposed_score,resource_value`. The default sorting order is descending. To specify ascending or descending order for a field, append a \" ASC\" or a \" DESC\" suffix, respectively; for example: `exposed_score DESC`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListValuedResourcesResponse`; indicates that this is a continuation of a prior `ListValuedResources` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list valued resources. Valid formats: \"organizations/{organization}\", \"organizations/{organization}/simulations/{simulation}\" \"organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}\"", +"location": "path", +"pattern": "^organizations/[^/]+/simulations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/valuedResources", +"response": { +"$ref": "ListValuedResourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"attackPaths": { +"methods": { +"list": { +"description": "Lists the attack paths for a set of simulation results or valued resources and filter.", +"flatPath": "v1/organizations/{organizationsId}/simulations/{simulationsId}/valuedResources/{valuedResourcesId}/attackPaths", +"httpMethod": "GET", +"id": "securitycenter.organizations.simulations.valuedResources.attackPaths.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression that filters the attack path in the response. Supported fields: * `valued_resources` supports =", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAttackPathsResponse`; indicates that this is a continuation of a prior `ListAttackPaths` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list attack paths. Valid formats: \"organizations/{organization}\", \"organizations/{organization}/simulations/{simulation}\" \"organizations/{organization}/simulations/{simulation}/attackExposureResults/{attack_exposure_result_v2}\" \"organizations/{organization}/simulations/{simulation}/valuedResources/{valued_resource}\"", +"location": "path", +"pattern": "^organizations/[^/]+/simulations/[^/]+/valuedResources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/attackPaths", +"response": { +"$ref": "ListAttackPathsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"sources": { +"methods": { +"create": { +"description": "Creates a source.", +"flatPath": "v1/organizations/{organizationsId}/sources", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the new source's parent. Its format should be \"organizations/[organization_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/sources", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a source.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.sources.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Relative resource name of the source. Its format is \"organizations/[organization_id]/source/[source_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy on the specified Source.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:getIamPolicy", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all sources belonging to an organization.", +"flatPath": "v1/organizations/{organizationsId}/sources", +"httpMethod": "GET", +"id": "securitycenter.organizations.sources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/sources", +"response": { +"$ref": "ListSourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a source.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.sources.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}\"", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the source resource. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified Source.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:setIamPolicy", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns the permissions that a caller has on the specified source.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}:testIamPermissions", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"findings": { +"methods": { +"create": { +"description": "Creates a finding. The corresponding source must exist for finding creation to succeed.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.findings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"findingId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new finding's parent. Its format should be \"organizations/[organization_id]/sources/[source_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings", +"request": { +"$ref": "Finding" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"group": { +"description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings:group", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.findings.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings:group", +"request": { +"$ref": "GroupFindingsRequest" +}, +"response": { +"$ref": "GroupFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings", +"httpMethod": "GET", +"id": "securitycenter.organizations.sources.findings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"compareDuration": { +"description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"fieldMask": { +"description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/findings", +"response": { +"$ref": "ListFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.sources.findings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Finding" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setMute": { +"description": "Updates the mute state of a finding.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setMute", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.findings.setMute", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setMute", +"request": { +"$ref": "SetMuteRequest" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setState": { +"description": "Updates the state of a finding.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setState", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.findings.setState", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setState", +"request": { +"$ref": "SetFindingStateRequest" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.sources.findings.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityMarks" +}, +"response": { +"$ref": "SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"externalSystems": { +"methods": { +"patch": { +"description": "Updates external system. This is for a given finding.", +"flatPath": "v1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/externalSystems/{externalSystemsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.sources.findings.externalSystems.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the external system resource. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"projects": { +"resources": { +"assets": { +"methods": { +"group": { +"deprecated": true, +"description": "Filters an organization's assets and groups them by their specified properties.", +"flatPath": "v1/projects/{projectsId}/assets:group", +"httpMethod": "POST", +"id": "securitycenter.projects.assets.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the parent to group the assets by. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/assets:group", +"request": { +"$ref": "GroupAssetsRequest" +}, +"response": { +"$ref": "GroupAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"deprecated": true, +"description": "Lists an organization's assets.", +"flatPath": "v1/projects/{projectsId}/assets", +"httpMethod": "GET", +"id": "securitycenter.projects.assets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"compareDuration": { +"description": "When compare_duration is set, the ListAssetsResult's \"state_change\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"fieldMask": { +"description": "A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following are the allowed field and operator combinations: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent. The following fields are supported: name update_time resource_properties security_marks.marks security_center_properties.resource_name security_center_properties.resource_display_name security_center_properties.resource_parent security_center_properties.resource_parent_display_name security_center_properties.resource_project security_center_properties.resource_project_display_name security_center_properties.resource_type", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource that contains the assets. The value that you can specify on parent depends on the method in which you specify parent. You can specify one of the following values: \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/assets", +"response": { +"$ref": "ListAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1/projects/{projectsId}/assets/{assetsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.projects.assets.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^projects/[^/]+/assets/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityMarks" +}, +"response": { +"$ref": "SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"bigQueryExports": { +"methods": { +"create": { +"description": "Creates a BigQuery export.", +"flatPath": "v1/projects/{projectsId}/bigQueryExports", +"httpMethod": "POST", +"id": "securitycenter.projects.bigQueryExports.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"bigQueryExportId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent resource of the new BigQuery export. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/bigQueryExports", +"request": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing BigQuery export.", +"flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "DELETE", +"id": "securitycenter.projects.bigQueryExports.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the BigQuery export to delete. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", +"location": "path", +"pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a BigQuery export.", +"flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "GET", +"id": "securitycenter.projects.bigQueryExports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the BigQuery export to retrieve. Its format is organizations/{organization}/bigQueryExports/{export_id}, folders/{folder}/bigQueryExports/{export_id}, or projects/{project}/bigQueryExports/{export_id}", +"location": "path", +"pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists BigQuery exports. Note that when requesting BigQuery exports at a given level all exports under that level are also returned e.g. if requesting BigQuery exports under a folder, then all BigQuery exports immediately under the folder plus the ones created under the projects within the folder are returned.", +"flatPath": "v1/projects/{projectsId}/bigQueryExports", +"httpMethod": "GET", +"id": "securitycenter.projects.bigQueryExports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListBigQueryExports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListBigQueryExports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns the collection of BigQuery exports. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/bigQueryExports", +"response": { +"$ref": "ListBigQueryExportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a BigQuery export.", +"flatPath": "v1/projects/{projectsId}/bigQueryExports/{bigQueryExportsId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.bigQueryExports.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", +"location": "path", +"pattern": "^projects/[^/]+/bigQueryExports/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"eventThreatDetectionSettings": { +"methods": { +"validateCustomModule": { +"description": "Validates the given Event Threat Detection custom module.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings:validateCustomModule", +"httpMethod": "POST", +"id": "securitycenter.projects.eventThreatDetectionSettings.validateCustomModule", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the parent to validate the Custom Module under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:validateCustomModule", +"request": { +"$ref": "ValidateEventThreatDetectionCustomModuleRequest" +}, +"response": { +"$ref": "ValidateEventThreatDetectionCustomModuleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"customModules": { +"methods": { +"create": { +"description": "Creates a resident Event Threat Detection custom module at the scope of the given Resource Manager parent, and also creates inherited custom modules for all descendants of the given parent. These modules are enabled by default.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", +"httpMethod": "POST", +"id": "securitycenter.projects.eventThreatDetectionSettings.customModules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The new custom module's parent. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"request": { +"$ref": "EventThreatDetectionCustomModule" +}, +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified Event Threat Detection custom module and all of its descendants in the Resource Manager hierarchy. This method is only supported for resident custom modules.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "DELETE", +"id": "securitycenter.projects.eventThreatDetectionSettings.customModules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to delete. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets an Event Threat Detection custom module.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "GET", +"id": "securitycenter.projects.eventThreatDetectionSettings.customModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to get. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all Event Threat Detection custom modules for the given Resource Manager parent. This includes resident modules defined at the scope of the parent along with modules inherited from ancestors.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules", +"httpMethod": "GET", +"id": "securitycenter.projects.eventThreatDetectionSettings.customModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"response": { +"$ref": "ListEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listDescendant": { +"description": "Lists all resident Event Threat Detection custom modules under the given Resource Manager parent and its descendants.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules:listDescendant", +"httpMethod": "GET", +"id": "securitycenter.projects.eventThreatDetectionSettings.customModules.listDescendant", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListDescendantEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDescendantEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules under. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:listDescendant", +"response": { +"$ref": "ListDescendantEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the Event Threat Detection custom module with the given name based on the given update mask. Updating the enablement state is supported for both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name or configuration of a module is supported for resident modules only. The type of a module cannot be changed.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/customModules/{customModulesId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.eventThreatDetectionSettings.customModules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings/customModules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "EventThreatDetectionCustomModule" +}, +"response": { +"$ref": "EventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"effectiveCustomModules": { +"methods": { +"get": { +"description": "Gets an effective Event Threat Detection custom module at the given level.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/effectiveCustomModules/{effectiveCustomModulesId}", +"httpMethod": "GET", +"id": "securitycenter.projects.eventThreatDetectionSettings.effectiveCustomModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the effective Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings/effectiveCustomModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "EffectiveEventThreatDetectionCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all effective Event Threat Detection custom modules for the given parent. This includes resident modules defined at the scope of the parent along with modules inherited from its ancestors.", +"flatPath": "v1/projects/{projectsId}/eventThreatDetectionSettings/effectiveCustomModules", +"httpMethod": "GET", +"id": "securitycenter.projects.eventThreatDetectionSettings.effectiveCustomModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of modules to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListEffectiveEventThreatDetectionCustomModules` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListEffectiveEventThreatDetectionCustomModules` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent to list custom modules for. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings\". * \"folders/{folder}/eventThreatDetectionSettings\". * \"projects/{project}/eventThreatDetectionSettings\".", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/effectiveCustomModules", +"response": { +"$ref": "ListEffectiveEventThreatDetectionCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"findings": { +"methods": { +"bulkMute": { +"description": "Kicks off an LRO to bulk mute findings for a parent based on a filter. The parent can be either an organization, folder or project. The findings matched by the filter will be muted after the LRO is done.", +"flatPath": "v1/projects/{projectsId}/findings:bulkMute", +"httpMethod": "POST", +"id": "securitycenter.projects.findings.bulkMute", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent, at which bulk action needs to be applied. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings:bulkMute", +"request": { +"$ref": "BulkMuteFindingsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"locations": { +"resources": { +"muteConfigs": { +"methods": { +"delete": { +"description": "Deletes an existing mute config.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.projects.locations.muteConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a mute config.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.projects.locations.muteConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a mute config.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.locations.muteConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"muteConfigs": { +"methods": { +"create": { +"description": "Creates a mute config.", +"flatPath": "v1/projects/{projectsId}/muteConfigs", +"httpMethod": "POST", +"id": "securitycenter.projects.muteConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"muteConfigId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must consist of only lowercase letters, numbers, and hyphens, must start with a letter, must end with either a letter or a number, and must be 63 characters or less.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new mute configs's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/muteConfigs", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing mute config.", +"flatPath": "v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.projects.muteConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to delete. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^projects/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a mute config.", +"flatPath": "v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.projects.muteConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the mute config to retrieve. Its format is organizations/{organization}/muteConfigs/{config_id}, folders/{folder}/muteConfigs/{config_id}, projects/{project}/muteConfigs/{config_id}, organizations/{organization}/locations/global/muteConfigs/{config_id}, folders/{folder}/locations/global/muteConfigs/{config_id}, or projects/{project}/locations/global/muteConfigs/{config_id}.", +"location": "path", +"pattern": "^projects/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists mute configs.", +"flatPath": "v1/projects/{projectsId}/muteConfigs", +"httpMethod": "GET", +"id": "securitycenter.projects.muteConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of configs to return. The service may return fewer than this value. If unspecified, at most 10 configs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListMuteConfigs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMuteConfigs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns the collection of mute configs. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/muteConfigs", +"response": { +"$ref": "ListMuteConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a mute config.", +"flatPath": "v1/projects/{projectsId}/muteConfigs/{muteConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.muteConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"location": "path", +"pattern": "^projects/[^/]+/muteConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"notificationConfigs": { +"methods": { +"create": { +"description": "Creates a notification config.", +"flatPath": "v1/projects/{projectsId}/notificationConfigs", +"httpMethod": "POST", +"id": "securitycenter.projects.notificationConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"configId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must be between 1 and 128 characters and contain alphanumeric characters, underscores, or hyphens only.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new notification config's parent. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/notificationConfigs", +"request": { +"$ref": "NotificationConfig" +}, +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a notification config.", +"flatPath": "v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "DELETE", +"id": "securitycenter.projects.notificationConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the notification config to delete. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", +"location": "path", +"pattern": "^projects/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a notification config.", +"flatPath": "v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "GET", +"id": "securitycenter.projects.notificationConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the notification config to get. Its format is \"organizations/[organization_id]/notificationConfigs/[config_id]\", \"folders/[folder_id]/notificationConfigs/[config_id]\", or \"projects/[project_id]/notificationConfigs/[config_id]\".", +"location": "path", +"pattern": "^projects/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists notification configs.", +"flatPath": "v1/projects/{projectsId}/notificationConfigs", +"httpMethod": "GET", +"id": "securitycenter.projects.notificationConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListNotificationConfigsResponse`; indicates that this is a continuation of a prior `ListNotificationConfigs` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent in which to list the notification configurations. Its format is \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/notificationConfigs", +"response": { +"$ref": "ListNotificationConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": " Updates a notification config. The following update fields are allowed: description, pubsub_topic, streaming_config.filter", +"flatPath": "v1/projects/{projectsId}/notificationConfigs/{notificationConfigsId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.notificationConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", +"location": "path", +"pattern": "^projects/[^/]+/notificationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the notification config. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "NotificationConfig" +}, +"response": { +"$ref": "NotificationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityHealthAnalyticsSettings": { +"resources": { +"customModules": { +"methods": { +"create": { +"description": "Creates a resident SecurityHealthAnalyticsCustomModule at the scope of the given CRM parent, and also creates inherited SecurityHealthAnalyticsCustomModules for all CRM descendants of the given parent. These modules are enabled by default.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules", +"httpMethod": "POST", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.customModules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the new custom module's parent. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"request": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified SecurityHealthAnalyticsCustomModule and all of its descendants in the CRM hierarchy. This method is only supported for resident custom modules.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "DELETE", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.customModules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to delete. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a SecurityHealthAnalyticsCustomModule.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "GET", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.customModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\"", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of all SecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules", +"httpMethod": "GET", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.customModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules", +"response": { +"$ref": "ListSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listDescendant": { +"description": "Returns a list of all resident SecurityHealthAnalyticsCustomModules under the given CRM parent and all of the parent\u2019s CRM descendants.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules:listDescendant", +"httpMethod": "GET", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.customModules.listDescendant", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list descendant custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:listDescendant", +"response": { +"$ref": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the SecurityHealthAnalyticsCustomModule under the given name based on the given update mask. Updating the enablement state is supported on both resident and inherited modules (though resident modules cannot have an enablement state of \"inherited\"). Updating the display name and custom config of a module is supported on resident modules only.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules/{customModulesId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.customModules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings/customModules/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. The only fields that can be updated are `enablement_state` and `custom_config`. If empty or set to the wildcard value `*`, both `enablement_state` and `custom_config` are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"simulate": { +"description": "Simulates a given SecurityHealthAnalyticsCustomModule and Resource.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/customModules:simulate", +"httpMethod": "POST", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.customModules.simulate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The relative resource name of the organization, project, or folder. For more information about relative resource names, see [Relative Resource Name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) Example: `organizations/{organization_id}`", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customModules:simulate", +"request": { +"$ref": "SimulateSecurityHealthAnalyticsCustomModuleRequest" +}, +"response": { +"$ref": "SimulateSecurityHealthAnalyticsCustomModuleResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"effectiveCustomModules": { +"methods": { +"get": { +"description": "Retrieves an EffectiveSecurityHealthAnalyticsCustomModule.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/effectiveCustomModules/{effectiveCustomModulesId}", +"httpMethod": "GET", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.effectiveCustomModules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the effective custom module to get. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings/effectiveCustomModules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of all EffectiveSecurityHealthAnalyticsCustomModules for the given parent. This includes resident modules defined at the scope of the parent, and inherited modules, inherited from CRM ancestors.", +"flatPath": "v1/projects/{projectsId}/securityHealthAnalyticsSettings/effectiveCustomModules", +"httpMethod": "GET", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.effectiveCustomModules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last call indicating a continuation", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of parent to list effective custom modules. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings\", \"folders/{folder}/securityHealthAnalyticsSettings\", or \"projects/{project}/securityHealthAnalyticsSettings\"", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/effectiveCustomModules", +"response": { +"$ref": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"sources": { +"methods": { +"list": { +"description": "Lists all sources belonging to an organization.", +"flatPath": "v1/projects/{projectsId}/sources", +"httpMethod": "GET", +"id": "securitycenter.projects.sources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\", \"folders/[folder_id]\", or \"projects/[project_id]\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/sources", +"response": { +"$ref": "ListSourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"findings": { +"methods": { +"group": { +"description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings, /v1/folders/{folder_id}/sources/-/findings, /v1/projects/{project_id}/sources/-/findings", +"flatPath": "v1/projects/{projectsId}/sources/{sourcesId}/findings:group", +"httpMethod": "POST", +"id": "securitycenter.projects.sources.findings.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\", folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]. To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/-, or projects/{project_id}/sources/-", +"location": "path", +"pattern": "^projects/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings:group", +"request": { +"$ref": "GroupFindingsRequest" +}, +"response": { +"$ref": "GroupFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1/organizations/{organization_id}/sources/-/findings", +"flatPath": "v1/projects/{projectsId}/sources/{sourcesId}/findings", +"httpMethod": "GET", +"id": "securitycenter.projects.sources.findings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"compareDuration": { +"description": "When compare_duration is set, the ListFindingsResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added in any state during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"fieldMask": { +"description": "A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.display_name: `=`, `:`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent. The following fields are supported: name parent state category resource_name event_time source_properties security_marks.marks", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id], folders/[folder_id]/sources/[source_id], or projects/[project_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-, folders/{folder_id}/sources/- or projects/{projects_id}/sources/-", +"location": "path", +"pattern": "^projects/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/findings", +"response": { +"$ref": "ListFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", +"flatPath": "v1/projects/{projectsId}/sources/{sourcesId}/findings/{findingsId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.sources.findings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding. When updating a finding, an empty mask is treated as updating all mutable fields and replacing source_properties. Individual source_properties can be added/updated by using \"source_properties.\" in the field mask.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Finding" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setMute": { +"description": "Updates the mute state of a finding.", +"flatPath": "v1/projects/{projectsId}/sources/{sourcesId}/findings/{findingsId}:setMute", +"httpMethod": "POST", +"id": "securitycenter.projects.sources.findings.setMute", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setMute", +"request": { +"$ref": "SetMuteRequest" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setState": { +"description": "Updates the state of a finding.", +"flatPath": "v1/projects/{projectsId}/sources/{sourcesId}/findings/{findingsId}:setState", +"httpMethod": "POST", +"id": "securitycenter.projects.sources.findings.setState", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"location": "path", +"pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:setState", +"request": { +"$ref": "SetFindingStateRequest" +}, +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1/projects/{projectsId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.projects.sources.findings.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect. If not set uses current server time. Updates will be applied to the SecurityMarks that are active immediately preceding this time. Must be earlier or equal to the server time.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource. The field mask must not contain duplicate fields. If empty or set to \"marks\", all marks will be replaced. Individual marks can be updated using \"marks.\".", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "SecurityMarks" +}, +"response": { +"$ref": "SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"externalSystems": { +"methods": { +"patch": { +"description": "Updates external system. This is for a given finding.", +"flatPath": "v1/projects/{projectsId}/sources/{sourcesId}/findings/{findingsId}/externalSystems/{externalSystemsId}", +"httpMethod": "PATCH", +"id": "securitycenter.projects.sources.findings.externalSystems.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", +"location": "path", +"pattern": "^projects/[^/]+/sources/[^/]+/findings/[^/]+/externalSystems/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the external system resource. If empty all mutable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://securitycenter.googleapis.com/", +"schemas": { +"Access": { +"description": "Represents an access event.", +"id": "Access", +"properties": { +"callerIp": { +"description": "Caller's IP address, such as \"1.1.1.1\".", +"type": "string" +}, +"callerIpGeo": { +"$ref": "Geolocation", +"description": "The caller IP's geolocation, which identifies where the call came from." +}, +"methodName": { +"description": "The method that the service account called, e.g. \"SetIamPolicy\".", +"type": "string" +}, +"principalEmail": { +"description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user or a service account acting on behalf of a third party principal making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "A string that represents the principal_subject that is associated with the identity. Unlike `principal_email`, `principal_subject` supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format is `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, still use the legacy format `serviceAccount:{identity pool name}[{subject}]`.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "The identity delegation history of an authenticated service account that made the request. The `serviceAccountDelegationInfo[]` object contains information about the real authorities that try to access Google Cloud resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key that was used to create or exchange credentials when authenticating the service account that made the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\". ", +"type": "string" +}, +"serviceName": { +"description": "This is the API service that the service account made a call to, e.g. \"iam.googleapis.com\"", +"type": "string" +}, +"userAgent": { +"description": "The caller's user agent string associated with the finding.", +"type": "string" +}, +"userAgentFamily": { +"description": "Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application.", +"type": "string" +}, +"userName": { +"description": "A string that represents a username. The username provided depends on the type of the finding and is likely not an IAM principal. For example, this can be a system username if the finding is related to a virtual machine, or it can be an application login username.", +"type": "string" +} +}, +"type": "object" +}, +"AccessReview": { +"description": "Conveys information about a Kubernetes access review (such as one returned by a [`kubectl auth can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) command) that was involved in a finding.", +"id": "AccessReview", +"properties": { +"group": { +"description": "The API group of the resource. \"*\" means all.", +"type": "string" +}, +"name": { +"description": "The name of the resource being requested. Empty means all.", +"type": "string" +}, +"ns": { +"description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", +"type": "string" +}, +"resource": { +"description": "The optional resource type requested. \"*\" means all.", +"type": "string" +}, +"subresource": { +"description": "The optional subresource type.", +"type": "string" +}, +"verb": { +"description": "A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. \"*\" means all.", +"type": "string" +}, +"version": { +"description": "The API version of the resource. \"*\" means all.", +"type": "string" +} +}, +"type": "object" +}, +"AdaptiveProtection": { +"description": "Information about [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).", +"id": "AdaptiveProtection", +"properties": { +"confidence": { +"description": "A score of 0 means that there is low confidence that the detected event is an actual attack. A score of 1 means that there is high confidence that the detected event is an attack. See the [Adaptive Protection documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) for further explanation.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Application": { +"description": "Represents an application associated with a finding.", +"id": "Application", +"properties": { +"baseUri": { +"description": "The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`.", +"type": "string" +}, +"fullUri": { +"description": "The full URI with payload that can be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`.", +"type": "string" +} +}, +"type": "object" +}, +"Asset": { +"description": "Security Command Center representation of a Google Cloud resource. The Asset is a Security Command Center resource that captures information about a single Google Cloud resource. All modifications to an Asset are only within the context of Security Command Center and don't affect the referenced Google Cloud resource.", +"id": "Asset", +"properties": { +"canonicalName": { +"description": "The canonical name of the resource. It's either \"organizations/{organization_id}/assets/{asset_id}\", \"folders/{folder_id}/assets/{asset_id}\" or \"projects/{project_number}/assets/{asset_id}\", depending on the closest CRM ancestor of the resource.", +"type": "string" +}, +"createTime": { +"description": "The time at which the asset was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"iamPolicy": { +"$ref": "IamPolicy", +"description": "Cloud IAM Policy information associated with the Google Cloud resource described by the Security Command Center asset. This information is managed and defined by the Google Cloud resource and cannot be modified by the user." +}, +"name": { +"description": "The relative resource name of this asset. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/assets/{asset_id}\".", +"type": "string" +}, +"resourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Resource managed properties. These properties are managed and defined by the Google Cloud resource and cannot be modified by the user.", +"type": "object" +}, +"securityCenterProperties": { +"$ref": "SecurityCenterProperties", +"description": "Security Command Center managed properties. These properties are managed by Security Command Center and cannot be modified by the user." +}, +"securityMarks": { +"$ref": "SecurityMarks", +"description": "User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the asset." +}, +"updateTime": { +"description": "The time at which the asset was last updated or added in Cloud SCC.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"AssetDiscoveryConfig": { +"description": "The configuration used for Asset Discovery runs.", +"id": "AssetDiscoveryConfig", +"properties": { +"folderIds": { +"description": "The folder ids to use for filtering asset discovery. It consists of only digits, e.g., 756619654966.", +"items": { +"type": "string" +}, +"type": "array" +}, +"inclusionMode": { +"description": "The mode to use for filtering asset discovery.", +"enum": [ +"INCLUSION_MODE_UNSPECIFIED", +"INCLUDE_ONLY", +"EXCLUDE" +], +"enumDescriptions": [ +"Unspecified. Setting the mode with this value will disable inclusion/exclusion filtering for Asset Discovery.", +"Asset Discovery will capture only the resources within the projects specified. All other resources will be ignored.", +"Asset Discovery will ignore all resources under the projects specified. All other resources will be retrieved." +], +"type": "string" +}, +"projectIds": { +"description": "The project ids to use for filtering asset discovery.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Attack": { +"description": "Information about DDoS attack volume and classification.", +"id": "Attack", +"properties": { +"classification": { +"description": "Type of attack, for example, \u2018SYN-flood\u2019, \u2018NTP-udp\u2019, or \u2018CHARGEN-udp\u2019.", +"type": "string" +}, +"volumeBps": { +"description": "Total BPS (bytes per second) volume of attack.", +"format": "int32", +"type": "integer" +}, +"volumePps": { +"description": "Total PPS (packets per second) volume of attack.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AttackExposure": { +"description": "An attack exposure contains the results of an attack path simulation run.", +"id": "AttackExposure", +"properties": { +"attackExposureResult": { +"description": "The resource name of the attack path simulation result that contains the details regarding this attack exposure score. Example: organizations/123/simulations/456/attackExposureResults/789", +"type": "string" +}, +"exposedHighValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedLowValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedMediumValueResourcesCount": { +"description": "The number of medium value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"latestCalculationTime": { +"description": "The most recent time the attack exposure was updated on this finding.", +"format": "google-datetime", +"type": "string" +}, +"score": { +"description": "A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate.", +"format": "double", +"type": "number" +}, +"state": { +"description": "What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not.", +"enum": [ +"STATE_UNSPECIFIED", +"CALCULATED", +"NOT_CALCULATED" +], +"enumDescriptions": [ +"The state is not specified.", +"The attack exposure has been calculated.", +"The attack exposure has not been calculated." +], +"type": "string" +} +}, +"type": "object" +}, +"AttackPath": { +"description": "A path that an attacker could take to reach an exposed resource.", +"id": "AttackPath", +"properties": { +"edges": { +"description": "A list of the edges between nodes in this attack path.", +"items": { +"$ref": "AttackPathEdge" +}, +"type": "array" +}, +"name": { +"description": "The attack path name, for example, `organizations/12/simulation/34/valuedResources/56/attackPaths/78`", +"type": "string" +}, +"pathNodes": { +"description": "A list of nodes that exist in this attack path.", +"items": { +"$ref": "AttackPathNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"AttackPathEdge": { +"description": "Represents a connection between a source node and a destination node in this attack path.", +"id": "AttackPathEdge", +"properties": { +"destination": { +"description": "The attack node uuid of the destination node.", +"type": "string" +}, +"source": { +"description": "The attack node uuid of the source node.", +"type": "string" +} +}, +"type": "object" +}, +"AttackPathNode": { +"description": "Represents one point that an attacker passes through in this attack path.", +"id": "AttackPathNode", +"properties": { +"associatedFindings": { +"description": "The findings associated with this node in the attack path.", +"items": { +"$ref": "PathNodeAssociatedFinding" +}, +"type": "array" +}, +"attackSteps": { +"description": "A list of attack step nodes that exist in this attack path node.", +"items": { +"$ref": "AttackStepNode" +}, +"type": "array" +}, +"displayName": { +"description": "Human-readable name of this resource.", +"type": "string" +}, +"resource": { +"description": "The name of the resource at this point in the attack path. The format of the name follows the Cloud Asset Inventory [resource name format](\"https://cloud.google.com/asset-inventory/docs/resource-name-format\")", +"type": "string" +}, +"resourceType": { +"description": "The [supported resource type](https://cloud.google.com/asset-inventory/docs/supported-asset-types\")", +"type": "string" +}, +"uuid": { +"description": "Unique id of the attack path node.", +"type": "string" +} +}, +"type": "object" +}, +"AttackStepNode": { +"description": "Detailed steps the attack can take between path nodes.", +"id": "AttackStepNode", +"properties": { +"description": { +"description": "Attack step description", +"type": "string" +}, +"displayName": { +"description": "User friendly name of the attack step", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Attack step labels for metadata", +"type": "object" +}, +"type": { +"description": "Attack step type. Can be either AND, OR or DEFENSE", +"enum": [ +"NODE_TYPE_UNSPECIFIED", +"NODE_TYPE_AND", +"NODE_TYPE_OR", +"NODE_TYPE_DEFENSE", +"NODE_TYPE_ATTACKER" +], +"enumDescriptions": [ +"Type not specified", +"Incoming edge joined with AND", +"Incoming edge joined with OR", +"Incoming edge is defense", +"Incoming edge is attacker" +], +"type": "string" +}, +"uuid": { +"description": "Unique ID for one Node", +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"AwsAccount": { +"description": "An AWS account that is a member of an organization.", +"id": "AwsAccount", +"properties": { +"id": { +"description": "The unique identifier (ID) of the account, containing exactly 12 digits.", +"type": "string" +}, +"name": { +"description": "The friendly name of this account.", +"type": "string" +} +}, +"type": "object" +}, +"AwsMetadata": { +"description": "AWS metadata associated with the resource, only applicable if the finding's cloud provider is Amazon Web Services.", +"id": "AwsMetadata", +"properties": { +"account": { +"$ref": "AwsAccount", +"description": "The AWS account associated with the resource." +}, +"organization": { +"$ref": "AwsOrganization", +"description": "The AWS organization associated with the resource." +}, +"organizationalUnits": { +"description": "A list of AWS organizational units associated with the resource, ordered from lowest level (closest to the account) to highest level.", +"items": { +"$ref": "AwsOrganizationalUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"AwsOrganization": { +"description": "An organization is a collection of accounts that are centrally managed together using consolidated billing, organized hierarchically with organizational units (OUs), and controlled with policies.", +"id": "AwsOrganization", +"properties": { +"id": { +"description": "The unique identifier (ID) for the organization. The regex pattern for an organization ID string requires \"o-\" followed by from 10 to 32 lowercase letters or digits.", +"type": "string" +} +}, +"type": "object" +}, +"AwsOrganizationalUnit": { +"description": "An Organizational Unit (OU) is a container of AWS accounts within a root of an organization. Policies that are attached to an OU apply to all accounts contained in that OU and in any child OUs.", +"id": "AwsOrganizationalUnit", +"properties": { +"id": { +"description": "The unique identifier (ID) associated with this OU. The regex pattern for an organizational unit ID string requires \"ou-\" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second \"-\" dash and from 8 to 32 additional lowercase letters or digits. For example, \"ou-ab12-cd34ef56\".", +"type": "string" +}, +"name": { +"description": "The friendly name of the OU.", +"type": "string" +} +}, +"type": "object" +}, +"BackupDisasterRecovery": { +"description": "Information related to Google Cloud Backup and DR Service findings.", +"id": "BackupDisasterRecovery", +"properties": { +"appliance": { +"description": "The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`.", +"type": "string" +}, +"applications": { +"description": "The names of Backup and DR applications. An application is a VM, database, or file system on a managed host monitored by a backup and recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, `centos7-01-vol02`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"backupCreateTime": { +"description": "The timestamp at which the Backup and DR backup was created.", +"format": "google-datetime", +"type": "string" +}, +"backupTemplate": { +"description": "The name of a Backup and DR template which comprises one or more backup policies. See the [Backup and DR documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) for more information. For example, `snap-ov`.", +"type": "string" +}, +"backupType": { +"description": "The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`.", +"type": "string" +}, +"host": { +"description": "The name of a Backup and DR host, which is managed by the backup and recovery appliance and known to the management console. The host can be of type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file system, etc.), vCenter, or an ESX server. See the [Backup and DR documentation on hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) for more information. For example, `centos7-01`.", +"type": "string" +}, +"policies": { +"description": "The names of Backup and DR policies that are associated with a template and that define when to run a backup, how frequently to run a backup, and how long to retain the backup image. For example, `onvaults`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"policyOptions": { +"description": "The names of Backup and DR advanced policy options of a policy applying to an application. See the [Backup and DR documentation on policy options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). For example, `skipofflineappsincongrp, nounmap`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"profile": { +"description": "The name of the Backup and DR resource profile that specifies the storage media for backups of application and VM data. See the [Backup and DR documentation on profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). For example, `GCP`.", +"type": "string" +}, +"storagePool": { +"description": "The name of the Backup and DR storage pool that the backup and recovery appliance is storing data in. The storage pool could be of type Cloud, Primary, Snapshot, or OnVault. See the [Backup and DR documentation on storage pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). For example, `DiskPoolOne`.", +"type": "string" +} +}, +"type": "object" +}, +"BatchCreateResourceValueConfigsRequest": { +"description": "Request message to create multiple resource value configs", +"id": "BatchCreateResourceValueConfigsRequest", +"properties": { +"requests": { +"description": "Required. The resource value configs to be created.", +"items": { +"$ref": "CreateResourceValueConfigRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchCreateResourceValueConfigsResponse": { +"description": "Response message for BatchCreateResourceValueConfigs", +"id": "BatchCreateResourceValueConfigsResponse", +"properties": { +"resourceValueConfigs": { +"description": "The resource value configs created", +"items": { +"$ref": "GoogleCloudSecuritycenterV1ResourceValueConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"BulkMuteFindingsRequest": { +"description": "Request message for bulk findings update. Note: 1. If multiple bulk update requests match the same resource, the order in which they get executed is not defined. 2. Once a bulk operation is started, there is no way to stop it.", +"id": "BulkMuteFindingsRequest", +"properties": { +"filter": { +"description": "Expression that identifies findings that should be updated. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +}, +"muteAnnotation": { +"deprecated": true, +"description": "This can be a mute configuration name or any identifier for mute/unmute of findings based on the filter.", +"type": "string" +} +}, +"type": "object" +}, +"CloudArmor": { +"description": "Fields related to Google Cloud Armor findings.", +"id": "CloudArmor", +"properties": { +"adaptiveProtection": { +"$ref": "AdaptiveProtection", +"description": "Information about potential Layer 7 DDoS attacks identified by [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview)." +}, +"attack": { +"$ref": "Attack", +"description": "Information about DDoS attack volume and classification." +}, +"duration": { +"description": "Duration of attack from the start until the current moment (updated every 5 minutes).", +"format": "google-duration", +"type": "string" +}, +"requests": { +"$ref": "Requests", +"description": "Information about incoming requests evaluated by [Google Cloud Armor security policies](https://cloud.google.com/armor/docs/security-policy-overview)." +}, +"securityPolicy": { +"$ref": "SecurityPolicy", +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding." +}, +"threatVector": { +"description": "Distinguish between volumetric & protocol DDoS attack and application layer attacks. For example, \u201cL3_4\u201d for Layer 3 and Layer 4 DDoS attacks, or \u201cL_7\u201d for Layer 7 DDoS attacks.", +"type": "string" +} +}, +"type": "object" +}, +"CloudDlpDataProfile": { +"description": "The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding.", +"id": "CloudDlpDataProfile", +"properties": { +"dataProfile": { +"description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", +"type": "string" +}, +"parentType": { +"description": "The resource hierarchy level at which the data profile was generated.", +"enum": [ +"PARENT_TYPE_UNSPECIFIED", +"ORGANIZATION", +"PROJECT" +], +"enumDescriptions": [ +"Unspecified parent type.", +"Organization-level configurations.", +"Project-level configurations." +], +"type": "string" +} +}, +"type": "object" +}, +"CloudDlpInspection": { +"description": "Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding.", +"id": "CloudDlpInspection", +"properties": { +"fullScan": { +"description": "Whether Cloud DLP scanned the complete resource or a sampled subset.", +"type": "boolean" +}, +"infoType": { +"description": "The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.", +"type": "string" +}, +"infoTypeCount": { +"description": "The number of times Cloud DLP found this infoType within this job and resource.", +"format": "int64", +"type": "string" +}, +"inspectJob": { +"description": "Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`.", +"type": "string" +} +}, +"type": "object" +}, +"CloudLoggingEntry": { +"description": "Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)", +"id": "CloudLoggingEntry", +"properties": { +"insertId": { +"description": "A unique identifier for the log entry.", +"type": "string" +}, +"logId": { +"description": "The type of the log (part of `log_name`. `log_name` is the resource name of the log to which this log entry belongs). For example: `cloudresourcemanager.googleapis.com/activity`. Note that this field is not URL-encoded, unlike the `LOG_ID` field in `LogEntry`.", +"type": "string" +}, +"resourceContainer": { +"description": "The organization, folder, or project of the monitored resource that produced this log entry.", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "Compliance", +"properties": { +"ids": { +"description": "Policies within the standard or benchmark, for example, A.12.4.1", +"items": { +"type": "string" +}, +"type": "array" +}, +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"ComplianceSnapshot": { +"description": "Result containing the properties and count of a ComplianceSnapshot request.", +"id": "ComplianceSnapshot", +"properties": { +"category": { +"description": "The category of Findings matching.", +"type": "string" +}, +"cloudProvider": { +"description": "The cloud provider for the compliance snapshot.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"complianceStandard": { +"description": "The compliance standard (ie CIS).", +"type": "string" +}, +"complianceVersion": { +"description": "The compliance version (ie 1.3) in CIS 1.3.", +"type": "string" +}, +"count": { +"description": "Total count of findings for the given properties.", +"format": "int64", +"type": "string" +}, +"leafContainerResource": { +"description": "The leaf container resource name that is closest to the snapshot.", +"type": "string" +}, +"name": { +"description": "The compliance snapshot name. Format: //sources//complianceSnapshots/", +"type": "string" +}, +"snapshotTime": { +"description": "The snapshot time of the snapshot.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Connection": { +"description": "Contains information about the IP connection associated with the finding.", +"id": "Connection", +"properties": { +"destinationIp": { +"description": "Destination IP address. Not present for sockets that are listening and not connected.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Not present for sockets that are listening and not connected.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IANA Internet Protocol Number such as TCP(6) and UDP(17).", +"enum": [ +"PROTOCOL_UNSPECIFIED", +"ICMP", +"TCP", +"UDP", +"GRE", +"ESP" +], +"enumDescriptions": [ +"Unspecified protocol (not HOPOPT).", +"Internet Control Message Protocol.", +"Transmission Control Protocol.", +"User Datagram Protocol.", +"Generic Routing Encapsulation.", +"Encap Security Payload." +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourcePort": { +"description": "Source port.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Contact": { +"description": "The email address of a contact.", +"id": "Contact", +"properties": { +"email": { +"description": "An email address. For example, \"`person123@company.com`\".", +"type": "string" +} +}, +"type": "object" +}, +"ContactDetails": { +"description": "Details about specific contacts", +"id": "ContactDetails", +"properties": { +"contacts": { +"description": "A list of contacts", +"items": { +"$ref": "Contact" +}, +"type": "array" +} +}, +"type": "object" +}, +"Container": { +"description": "Container associated with the finding.", +"id": "Container", +"properties": { +"createTime": { +"description": "The time that the container was created.", +"format": "google-datetime", +"type": "string" +}, +"imageId": { +"description": "Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", +"type": "string" +}, +"labels": { +"description": "Container labels, as provided by the container runtime.", +"items": { +"$ref": "Label" +}, +"type": "array" +}, +"name": { +"description": "Name of the container.", +"type": "string" +}, +"uri": { +"description": "Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags.", +"type": "string" +} +}, +"type": "object" +}, +"CreateResourceValueConfigRequest": { +"description": "Request message to create single resource value config", +"id": "CreateResourceValueConfigRequest", +"properties": { +"parent": { +"description": "Required. Resource name of the new ResourceValueConfig's parent.", +"type": "string" +}, +"resourceValueConfig": { +"$ref": "GoogleCloudSecuritycenterV1ResourceValueConfig", +"description": "Required. The resource value config being created." +} +}, +"type": "object" +}, +"CustomModuleValidationError": { +"description": "An error encountered while validating the uploaded configuration of an Event Threat Detection Custom Module.", +"id": "CustomModuleValidationError", +"properties": { +"description": { +"description": "A description of the error, suitable for human consumption. Required.", +"type": "string" +}, +"end": { +"$ref": "Position", +"description": "The end position of the error in the uploaded text version of the module. This field may be omitted if no specific position applies, or if one could not be computed.." +}, +"fieldPath": { +"description": "The path, in RFC 8901 JSON Pointer format, to the field that failed validation. This may be left empty if no specific field is affected.", +"type": "string" +}, +"start": { +"$ref": "Position", +"description": "The initial position of the error in the uploaded text version of the module. This field may be omitted if no specific position applies, or if one could not be computed." +} +}, +"type": "object" +}, +"CustomModuleValidationErrors": { +"description": "A list of zero or more errors encountered while validating the uploaded configuration of an Event Threat Detection Custom Module.", +"id": "CustomModuleValidationErrors", +"properties": { +"errors": { +"items": { +"$ref": "CustomModuleValidationError" +}, +"type": "array" +} +}, +"type": "object" +}, +"Cve": { +"description": "CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability.", +"id": "Cve", +"properties": { +"cvssv3": { +"$ref": "Cvssv3", +"description": "Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document" +}, +"exploitationActivity": { +"description": "The exploitation activity of the vulnerability in the wild.", +"enum": [ +"EXPLOITATION_ACTIVITY_UNSPECIFIED", +"WIDE", +"CONFIRMED", +"AVAILABLE", +"ANTICIPATED", +"NO_KNOWN" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation has been reported or confirmed to widely occur.", +"Limited reported or confirmed exploitation activities.", +"Exploit is publicly available.", +"No known exploitation activity, but has a high potential for exploitation.", +"No known exploitation activity." +], +"type": "string" +}, +"id": { +"description": "The unique identifier for the vulnerability. e.g. CVE-2021-34527", +"type": "string" +}, +"impact": { +"description": "The potential impact of the vulnerability if it was to be exploited.", +"enum": [ +"RISK_RATING_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation would have little to no security impact.", +"Exploitation would enable attackers to perform activities, or could allow attackers to have a direct impact, but would require additional steps.", +"Exploitation would enable attackers to have a notable direct impact without needing to overcome any major mitigating factors.", +"Exploitation would fundamentally undermine the security of affected systems, enable actors to perform significant attacks with minimal effort, with little to no mitigating factors to overcome." +], +"type": "string" +}, +"observedInTheWild": { +"description": "Whether or not the vulnerability has been observed in the wild.", +"type": "boolean" +}, +"references": { +"description": "Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527", +"items": { +"$ref": "Reference" +}, +"type": "array" +}, +"upstreamFixAvailable": { +"description": "Whether upstream fix is available for the CVE.", +"type": "boolean" +}, +"zeroDay": { +"description": "Whether or not the vulnerability was zero day when the finding was published.", +"type": "boolean" +} +}, +"type": "object" +}, +"Cvssv3": { +"description": "Common Vulnerability Scoring System version 3.", +"id": "Cvssv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "double", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"Database": { +"description": "Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of Cloud SQL instances or Cloud Spanner instances), or the database instance itself. Some database resources might not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types, such as Cloud SQL databases, are not yet supported by Cloud Asset Inventory. In these cases only the display name is provided.", +"id": "Database", +"properties": { +"displayName": { +"description": "The human-readable name of the database that the user connected to.", +"type": "string" +}, +"grantees": { +"description": "The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Some database resources may not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.", +"type": "string" +}, +"query": { +"description": "The SQL statement that is associated with the database access.", +"type": "string" +}, +"userName": { +"description": "The username used to connect to the database. The username might not be an IAM principal and does not have a set format.", +"type": "string" +}, +"version": { +"description": "The version of the database, for example, POSTGRES_14. See [the complete list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"type": "string" +} +}, +"type": "object" +}, +"Detection": { +"description": "Memory hash detection contributing to the binary family match.", +"id": "Detection", +"properties": { +"binary": { +"description": "The name of the binary associated with the memory hash signature detection.", +"type": "string" +}, +"percentPagesMatched": { +"description": "The percentage of memory page hashes in the signature that were matched.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"DiskPath": { +"description": "Path of the file in terms of underlying disk/partition identifiers.", +"id": "DiskPath", +"properties": { +"partitionUuid": { +"description": "UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)", +"type": "string" +}, +"relativePath": { +"description": "Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh", +"type": "string" +} +}, +"type": "object" +}, +"EffectiveEventThreatDetectionCustomModule": { +"description": "An EffectiveEventThreatDetectionCustomModule is the representation of an Event Threat Detection custom module at a specified level of the resource hierarchy: organization, folder, or project. If a custom module is inherited from a parent organization or folder, the value of the `enablement_state` property in EffectiveEventThreatDetectionCustomModule is set to the value that is effective in the parent, instead of `INHERITED`. For example, if the module is enabled in a parent organization or folder, the effective `enablement_state` for the module in all child folders or projects is also `enabled`. EffectiveEventThreatDetectionCustomModule is read-only.", +"id": "EffectiveEventThreatDetectionCustomModule", +"properties": { +"config": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Output only. Config for the effective module.", +"readOnly": true, +"type": "object" +}, +"description": { +"description": "Output only. The description for the module.", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Output only. The human readable name to be displayed for the module.", +"readOnly": true, +"type": "string" +}, +"enablementState": { +"description": "Output only. The effective state of enablement for the module at the given level of the hierarchy.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given level.", +"The module is disabled at the given level." +], +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the effective ETD custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/effectiveCustomModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/effectiveCustomModules/{module}\".", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Output only. Type for the module. e.g. CONFIGURABLE_BAD_IP.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnvironmentVariable": { +"description": "A name-value pair representing an environment variable used in an operating system process.", +"id": "EnvironmentVariable", +"properties": { +"name": { +"description": "Environment variable name as a JSON encoded string.", +"type": "string" +}, +"val": { +"description": "Environment variable value as a JSON encoded string.", +"type": "string" +} +}, +"type": "object" +}, +"EventThreatDetectionCustomModule": { +"description": "Represents an instance of an Event Threat Detection custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by child folders and projects.", +"id": "EventThreatDetectionCustomModule", +"properties": { +"ancestorModule": { +"description": "Output only. The closest ancestor module that this module inherits the enablement state from. The format is the same as the EventThreatDetectionCustomModule resource name.", +"readOnly": true, +"type": "string" +}, +"config": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Config for the module. For the resident module, its config value is defined at this level. For the inherited module, its config value is inherited from the ancestor module.", +"type": "object" +}, +"description": { +"description": "The description for the module.", +"type": "string" +}, +"displayName": { +"description": "The human readable name to be displayed for the module.", +"type": "string" +}, +"enablementState": { +"description": "The state of enablement for the module at the given level of the hierarchy.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"INHERITED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given level.", +"The module is disabled at the given level.", +"When the enablement state is inherited." +], +"type": "string" +}, +"lastEditor": { +"description": "Output only. The editor the module was last updated by.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the Event Threat Detection custom module. Its format is: * \"organizations/{organization}/eventThreatDetectionSettings/customModules/{module}\". * \"folders/{folder}/eventThreatDetectionSettings/customModules/{module}\". * \"projects/{project}/eventThreatDetectionSettings/customModules/{module}\".", +"type": "string" +}, +"type": { +"description": "Type for the module. e.g. CONFIGURABLE_BAD_IP.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the module was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExfilResource": { +"description": "Resource where data was exfiltrated from or exfiltrated to.", +"id": "ExfilResource", +"properties": { +"components": { +"description": "Subcomponents of the asset that was exfiltrated, like URIs used during exfiltration, table names, databases, and filenames. For example, multiple tables might have been exfiltrated from the same Cloud SQL instance, or multiple files might have been exfiltrated from the same Cloud Storage bucket.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name).", +"type": "string" +} +}, +"type": "object" +}, +"Exfiltration": { +"description": "Exfiltration represents a data exfiltration attempt from one or more sources to one or more targets. The `sources` attribute lists the sources of the exfiltrated data. The `targets` attribute lists the destinations the data was copied to.", +"id": "Exfiltration", +"properties": { +"sources": { +"description": "If there are multiple sources, then the data is considered \"joined\" between them. For instance, BigQuery can join multiple tables, and each table would be considered a source.", +"items": { +"$ref": "ExfilResource" +}, +"type": "array" +}, +"targets": { +"description": "If there are multiple targets, each target would get a complete copy of the \"joined\" source data.", +"items": { +"$ref": "ExfilResource" +}, +"type": "array" +}, +"totalExfiltratedBytes": { +"description": "Total exfiltrated bytes processed for the entire job.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"File": { +"description": "File information about the related binary/library used by an executable, or the script used by a script interpreter", +"id": "File", +"properties": { +"contents": { +"description": "Prefix of the file contents as a JSON-encoded string.", +"type": "string" +}, +"diskPath": { +"$ref": "DiskPath", +"description": "Path of the file in terms of underlying disk/partition identifiers." +}, +"hashedSize": { +"description": "The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.", +"format": "int64", +"type": "string" +}, +"partiallyHashed": { +"description": "True when the hash covers only a prefix of the file.", +"type": "boolean" +}, +"path": { +"description": "Absolute path of the file as a JSON encoded string.", +"type": "string" +}, +"sha256": { +"description": "SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.", +"type": "string" +}, +"size": { +"description": "Size of the file in bytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.", +"id": "Finding", +"properties": { +"access": { +"$ref": "Access", +"description": "Access details associated with the finding, such as more information on the caller, which method was accessed, and from where." +}, +"application": { +"$ref": "Application", +"description": "Represents an application associated with the finding." +}, +"attackExposure": { +"$ref": "AttackExposure", +"description": "The results of an attack path simulation relevant to this finding." +}, +"backupDisasterRecovery": { +"$ref": "BackupDisasterRecovery", +"description": "Fields related to Backup and DR findings." +}, +"canonicalName": { +"description": "The canonical name of the finding. It's either \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\" or \"projects/{project_number}/sources/{source_id}/findings/{finding_id}\", depending on the closest CRM ancestor of the resource associated with the finding.", +"type": "string" +}, +"category": { +"description": "The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"cloudArmor": { +"$ref": "CloudArmor", +"description": "Fields related to Cloud Armor findings." +}, +"cloudDlpDataProfile": { +"$ref": "CloudDlpDataProfile", +"description": "Cloud DLP data profile that is associated with the finding." +}, +"cloudDlpInspection": { +"$ref": "CloudDlpInspection", +"description": "Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding." +}, +"compliances": { +"description": "Contains compliance information for security standards associated to the finding.", +"items": { +"$ref": "Compliance" +}, +"type": "array" +}, +"connections": { +"description": "Contains information about the IP connection associated with the finding.", +"items": { +"$ref": "Connection" +}, +"type": "array" +}, +"contacts": { +"additionalProperties": { +"$ref": "ContactDetails" +}, +"description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", +"readOnly": true, +"type": "object" +}, +"containers": { +"description": "Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"createTime": { +"description": "The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"database": { +"$ref": "Database", +"description": "Database associated with the finding." +}, +"description": { +"description": "Contains more details about the finding.", +"type": "string" +}, +"eventTime": { +"description": "The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"exfiltration": { +"$ref": "Exfiltration", +"description": "Represents exfiltrations associated with the finding." +}, +"externalSystems": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"description": "Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields.", +"readOnly": true, +"type": "object" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"files": { +"description": "File associated with the finding.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"findingClass": { +"description": "The class of the finding.", +"enum": [ +"FINDING_CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"SCC_ERROR", +"POSTURE_VIOLATION" +], +"enumDescriptions": [ +"Unspecified finding class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality.", +"Describes a potential security risk due to a change in the security posture." +], +"type": "string" +}, +"iamBindings": { +"description": "Represents IAM bindings associated with the finding.", +"items": { +"$ref": "IamBinding" +}, +"type": "array" +}, +"indicator": { +"$ref": "Indicator", +"description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." +}, +"kernelRootkit": { +"$ref": "KernelRootkit", +"description": "Signature of the kernel rootkit." +}, +"kubernetes": { +"$ref": "Kubernetes", +"description": "Kubernetes resources associated with the finding." +}, +"loadBalancers": { +"description": "The load balancers associated with the finding.", +"items": { +"$ref": "LoadBalancer" +}, +"type": "array" +}, +"logEntries": { +"description": "Log entries that are relevant to the finding.", +"items": { +"$ref": "LogEntry" +}, +"type": "array" +}, +"mitreAttack": { +"$ref": "MitreAttack", +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org" +}, +"moduleName": { +"description": "Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885", +"type": "string" +}, +"mute": { +"description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", +"enum": [ +"MUTE_UNSPECIFIED", +"MUTED", +"UNMUTED", +"UNDEFINED" +], +"enumDescriptions": [ +"Unspecified.", +"Finding has been muted.", +"Finding has been unmuted.", +"Finding has never been muted/unmuted." +], +"type": "string" +}, +"muteInitiator": { +"description": "Records additional information about the mute operation, for example, the [mute configuration](/security-command-center/docs/how-to-mute-findings) that muted the finding and the user who muted the finding.", +"type": "string" +}, +"muteUpdateTime": { +"description": "Output only. The most recent time this finding was muted or unmuted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"type": "string" +}, +"nextSteps": { +"description": "Steps to address the finding.", +"type": "string" +}, +"notebook": { +"$ref": "Notebook", +"description": "Notebook associated with the finding." +}, +"orgPolicies": { +"description": "Contains information about the org policies associated with the finding.", +"items": { +"$ref": "OrgPolicy" +}, +"type": "array" +}, +"parent": { +"description": "The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +}, +"parentDisplayName": { +"description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", +"readOnly": true, +"type": "string" +}, +"processes": { +"description": "Represents operating system processes associated with the Finding.", +"items": { +"$ref": "Process" +}, +"type": "array" +}, +"resourceName": { +"description": "For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.", +"type": "string" +}, +"securityMarks": { +"$ref": "SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"securityPosture": { +"$ref": "SecurityPosture", +"description": "The security posture associated with the finding." +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"This value is used for findings when a source doesn't write a severity value.", +"Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data and public SSH access with weak or no passwords. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", +"Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", +"Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", +"Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +}, +"vulnerability": { +"$ref": "Vulnerability", +"description": "Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +} +}, +"type": "object" +}, +"Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GcpMetadata": { +"description": "GCP metadata associated with the resource, only applicable if the finding's cloud provider is Google Cloud Platform.", +"id": "GcpMetadata", +"properties": { +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Folder" +}, +"readOnly": true, +"type": "array" +}, +"organization": { +"description": "The name of the organization that the resource belongs to.", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project ID that the resource belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"Geolocation": { +"description": "Represents a geographical location for a given access.", +"id": "Geolocation", +"properties": { +"regionCode": { +"description": "A CLDR.", +"type": "string" +} +}, +"type": "object" +}, +"GetIamPolicyRequest": { +"description": "Request message for `GetIamPolicy` method.", +"id": "GetIamPolicyRequest", +"properties": { +"options": { +"$ref": "GetPolicyOptions", +"description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." +} +}, +"type": "object" +}, +"GetPolicyOptions": { +"description": "Encapsulates settings provided to GetIamPolicy.", +"id": "GetPolicyOptions", +"properties": { +"requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1BigQueryExport": { +"description": "Configures how to deliver Findings to BigQuery Instance.", +"id": "GoogleCloudSecuritycenterV1BigQueryExport", +"properties": { +"createTime": { +"description": "Output only. The time at which the BigQuery export was created. This field is set by the server and will be ignored if provided on export on creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataset": { +"description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", +"type": "string" +}, +"description": { +"description": "The description of the export (max of 1024 characters).", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the BigQuery export. This field is set by the server and will be ignored if provided on export creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", +"type": "string" +}, +"principal": { +"description": "Output only. The service account that needs permission to create table and upload data to the BigQuery dataset.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the BigQuery export was updated. This field is set by the server and will be ignored if provided on export creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Binding": { +"description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", +"id": "GoogleCloudSecuritycenterV1Binding", +"properties": { +"name": { +"description": "Name for the binding.", +"type": "string" +}, +"ns": { +"description": "Namespace for the binding.", +"type": "string" +}, +"role": { +"$ref": "Role", +"description": "The Role or ClusterRole referenced by the binding." +}, +"subjects": { +"description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": { +"description": "The response to a BulkMute request. Contains the LRO information.", +"id": "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1CustomConfig": { +"description": "Defines the properties in a custom module configuration for Security Health Analytics. Use the custom module configuration to create custom detectors that generate custom findings for resources that you specify.", +"id": "GoogleCloudSecuritycenterV1CustomConfig", +"properties": { +"customOutput": { +"$ref": "GoogleCloudSecuritycenterV1CustomOutputSpec", +"description": "Custom output properties." +}, +"description": { +"description": "Text that describes the vulnerability or misconfiguration that the custom module detects. This explanation is returned with each finding instance to help investigators understand the detected issue. The text must be enclosed in quotation marks.", +"type": "string" +}, +"predicate": { +"$ref": "Expr", +"description": "The CEL expression to evaluate to produce findings. When the expression evaluates to true against a resource, a finding is generated." +}, +"recommendation": { +"description": "An explanation of the recommended steps that security teams can take to resolve the detected issue. This explanation is returned with each finding generated by this module in the `nextSteps` property of the finding JSON.", +"type": "string" +}, +"resourceSelector": { +"$ref": "GoogleCloudSecuritycenterV1ResourceSelector", +"description": "The resource types that the custom module operates on. Each custom module can specify up to 5 resource types." +}, +"severity": { +"description": "The severity to assign to findings generated by the module.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"Unspecified severity.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1CustomOutputSpec": { +"description": "A set of optional name-value pairs that define custom source properties to return with each finding that is generated by the custom module. The custom source properties that are defined here are included in the finding JSON under `sourceProperties`.", +"id": "GoogleCloudSecuritycenterV1CustomOutputSpec", +"properties": { +"properties": { +"description": "A list of custom output properties to add to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1Property" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule": { +"description": "An EffectiveSecurityHealthAnalyticsCustomModule is the representation of a Security Health Analytics custom module at a specified level of the resource hierarchy: organization, folder, or project. If a custom module is inherited from a parent organization or folder, the value of the `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is set to the value that is effective in the parent, instead of `INHERITED`. For example, if the module is enabled in a parent organization or folder, the effective enablement_state for the module in all child folders or projects is also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only.", +"id": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule", +"properties": { +"customConfig": { +"$ref": "GoogleCloudSecuritycenterV1CustomConfig", +"description": "Output only. The user-specified configuration for the module.", +"readOnly": true +}, +"displayName": { +"description": "Output only. The display name for the custom module. The name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only.", +"readOnly": true, +"type": "string" +}, +"enablementState": { +"description": "Output only. The effective state of enablement for the module at the given level of the hierarchy.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given level.", +"The module is disabled at the given level." +], +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ExternalSystem": { +"description": "Representation of third party SIEM/SOAR fields within SCC.", +"id": "GoogleCloudSecuritycenterV1ExternalSystem", +"properties": { +"assignees": { +"description": "References primary/secondary etc assignees in the external system.", +"items": { +"type": "string" +}, +"type": "array" +}, +"caseCloseTime": { +"description": "The time when the case was closed, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseCreateTime": { +"description": "The time when the case was created, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"casePriority": { +"description": "The priority of the finding's corresponding case in the external system.", +"type": "string" +}, +"caseSla": { +"description": "The SLA of the finding's corresponding case in the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseUri": { +"description": "The link to the finding's corresponding case in the external system.", +"type": "string" +}, +"externalSystemUpdateTime": { +"description": "The time when the case was last updated, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"externalUid": { +"description": "The identifier that's used to track the finding's corresponding case in the external system.", +"type": "string" +}, +"name": { +"description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", +"type": "string" +}, +"status": { +"description": "The most recent status of the finding's corresponding case, as reported by the external system.", +"type": "string" +}, +"ticketInfo": { +"$ref": "TicketInfo", +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1MuteConfig": { +"description": "A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings.", +"id": "GoogleCloudSecuritycenterV1MuteConfig", +"properties": { +"createTime": { +"description": "Output only. The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of the mute config.", +"type": "string" +}, +"displayName": { +"deprecated": true, +"description": "The human readable name to be displayed for the mute config.", +"type": "string" +}, +"filter": { +"description": "Required. An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1NotificationMessage": { +"description": "Cloud SCC's Notification", +"id": "GoogleCloudSecuritycenterV1NotificationMessage", +"properties": { +"finding": { +"$ref": "Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV1Resource", +"description": "The Cloud resource tied to this notification's Finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Property": { +"description": "An individual name-value pair that defines a custom source property.", +"id": "GoogleCloudSecuritycenterV1Property", +"properties": { +"name": { +"description": "Name of the property for the custom output.", +"type": "string" +}, +"valueExpression": { +"$ref": "Expr", +"description": "The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV1Resource", +"properties": { +"awsMetadata": { +"$ref": "AwsMetadata", +"description": "The AWS metadata associated with the finding." +}, +"cloudProvider": { +"description": "Indicates which cloud provider the resource resides in.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"displayName": { +"description": "The human readable name of the resource.", +"type": "string" +}, +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "Folder" +}, +"readOnly": true, +"type": "array" +}, +"location": { +"description": "The region or location of the service (if applicable).", +"type": "string" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"organization": { +"description": "Indicates which organization or tenant in the cloud provider the finding applies to.", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project ID that the resource belongs to.", +"type": "string" +}, +"resourcePath": { +"$ref": "ResourcePath", +"description": "Provides the path to the resource within the resource hierarchy." +}, +"resourcePathString": { +"description": "A string representation of the resource path. For GCP, it has the format of: organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} where there can be any number of folders. For AWS, it has the format of: org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of: mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", +"type": "string" +}, +"service": { +"description": "The parent service or product from which the resource is provided, for example, GKE or SNS.", +"type": "string" +}, +"type": { +"description": "The full resource type of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ResourceSelector": { +"description": "Resource for selecting resource type.", +"id": "GoogleCloudSecuritycenterV1ResourceSelector", +"properties": { +"resourceTypes": { +"description": "The resource types to run the detector on.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ResourceValueConfig": { +"description": "A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations.", +"id": "GoogleCloudSecuritycenterV1ResourceValueConfig", +"properties": { +"cloudProvider": { +"description": "Cloud provider this configuration applies to", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Timestamp this resource value config was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the resource value config.", +"type": "string" +}, +"name": { +"description": "Name for the resource value config", +"type": "string" +}, +"resourceLabelsSelector": { +"additionalProperties": { +"type": "string" +}, +"description": "List of resource labels to search for, evaluated with AND. E.g. \"resource_labels_selector\": {\"key\": \"value\", \"env\": \"prod\"} will match resources with labels \"key\": \"value\" AND \"env\": \"prod\" https://cloud.google.com/resource-manager/docs/creating-managing-labels", +"type": "object" +}, +"resourceType": { +"description": "Apply resource_value only to resources that match resource_type. resource_type will be checked with \"AND\" of other resources. E.g. \"storage.googleapis.com/Bucket\" with resource_value \"HIGH\" will apply \"HIGH\" value only to \"storage.googleapis.com/Bucket\" resources.", +"type": "string" +}, +"resourceValue": { +"description": "Required. Resource value level this expression represents", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"scope": { +"description": "Project or folder to scope this config to. For example, \"project/456\" would apply this config only to resources in \"project/456\" scope will be checked with \"AND\" of other resources.", +"type": "string" +}, +"sensitiveDataProtectionMapping": { +"$ref": "GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping", +"description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." +}, +"tagValues": { +"description": "Required. Tag values combined with AND to check against. Values in the form \"tagValues/123\" E.g. [ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Timestamp this resource value config was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule": { +"description": "Represents an instance of a Security Health Analytics custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by the child folders and projects.", +"id": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule", +"properties": { +"ancestorModule": { +"description": "Output only. If empty, indicates that the custom module was created in the organization, folder, or project in which you are viewing the custom module. Otherwise, `ancestor_module` specifies the organization or folder from which the custom module is inherited.", +"readOnly": true, +"type": "string" +}, +"customConfig": { +"$ref": "GoogleCloudSecuritycenterV1CustomConfig", +"description": "The user specified custom configuration for the module." +}, +"displayName": { +"description": "The display name of the Security Health Analytics custom module. This display name becomes the finding category for all findings that are returned by this custom module. The display name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only.", +"type": "string" +}, +"enablementState": { +"description": "The enablement state of the custom module.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"INHERITED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given CRM resource.", +"The module is disabled at the given CRM resource.", +"State is inherited from an ancestor module. The module will either be effectively ENABLED or DISABLED based on its closest non-inherited ancestor module in the CRM hierarchy." +], +"type": "string" +}, +"lastEditor": { +"description": "Output only. The editor that last updated the custom module.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which the custom module was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping": { +"description": "Resource value mapping for Sensitive Data Protection findings. If any of these mappings have a resource value that is not unspecified, the resource_value field will be ignored when reading this configuration.", +"id": "GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping", +"properties": { +"highSensitivityMapping": { +"description": "Resource value mapping for high-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"mediumSensitivityMapping": { +"description": "Resource value mapping for medium-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data (security, risk, health or privacy) ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, an XSS vulnerability in an App Engine application is a finding.", +"id": "GoogleCloudSecuritycenterV1p1beta1Finding", +"properties": { +"canonicalName": { +"description": "The canonical name of the finding. It's either \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\" or \"projects/{project_number}/sources/{source_id}/findings/{finding_id}\", depending on the closest CRM ancestor of the resource associated with the finding.", +"type": "string" +}, +"category": { +"description": "The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"createTime": { +"description": "The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"eventTime": { +"description": "The time at which the event took place, or when an update to the finding occurred. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding were to be resolved afterward, this time would reflect when the finding was resolved. Must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"name": { +"description": "The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\"", +"type": "string" +}, +"parent": { +"description": "The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +}, +"resourceName": { +"description": "For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.", +"type": "string" +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No severity specified. The default value.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "GoogleCloudSecuritycenterV1p1beta1Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1NotificationMessage": { +"description": "Security Command Center's Notification", +"id": "GoogleCloudSecuritycenterV1p1beta1NotificationMessage", +"properties": { +"finding": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Resource", +"description": "The Cloud resource tied to the notification." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV1p1beta1Resource", +"properties": { +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Folder" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project id that the resource belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"folders/{folder_id}/assets/{asset_id}/securityMarks\" \"projects/{project_number}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks\"", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Access": { +"description": "Represents an access event.", +"id": "GoogleCloudSecuritycenterV2Access", +"properties": { +"callerIp": { +"description": "Caller's IP address, such as \"1.1.1.1\".", +"type": "string" +}, +"callerIpGeo": { +"$ref": "GoogleCloudSecuritycenterV2Geolocation", +"description": "The caller IP's geolocation, which identifies where the call came from." +}, +"methodName": { +"description": "The method that the service account called, e.g. \"SetIamPolicy\".", +"type": "string" +}, +"principalEmail": { +"description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user or a service account acting on behalf of a third party principal making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "A string that represents the principal_subject that is associated with the identity. Unlike `principal_email`, `principal_subject` supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format is `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, still use the legacy format `serviceAccount:{identity pool name}[{subject}]`.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "The identity delegation history of an authenticated service account that made the request. The `serviceAccountDelegationInfo[]` object contains information about the real authorities that try to access Google Cloud resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key that was used to create or exchange credentials when authenticating the service account that made the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\". ", +"type": "string" +}, +"serviceName": { +"description": "This is the API service that the service account made a call to, e.g. \"iam.googleapis.com\"", +"type": "string" +}, +"userAgent": { +"description": "The caller's user agent string associated with the finding.", +"type": "string" +}, +"userAgentFamily": { +"description": "Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application.", +"type": "string" +}, +"userName": { +"description": "A string that represents a username. The username provided depends on the type of the finding and is likely not an IAM principal. For example, this can be a system username if the finding is related to a virtual machine, or it can be an application login username.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AccessReview": { +"description": "Conveys information about a Kubernetes access review (such as one returned by a [`kubectl auth can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) command) that was involved in a finding.", +"id": "GoogleCloudSecuritycenterV2AccessReview", +"properties": { +"group": { +"description": "The API group of the resource. \"*\" means all.", +"type": "string" +}, +"name": { +"description": "The name of the resource being requested. Empty means all.", +"type": "string" +}, +"ns": { +"description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", +"type": "string" +}, +"resource": { +"description": "The optional resource type requested. \"*\" means all.", +"type": "string" +}, +"subresource": { +"description": "The optional subresource type.", +"type": "string" +}, +"verb": { +"description": "A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. \"*\" means all.", +"type": "string" +}, +"version": { +"description": "The API version of the resource. \"*\" means all.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AdaptiveProtection": { +"description": "Information about [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).", +"id": "GoogleCloudSecuritycenterV2AdaptiveProtection", +"properties": { +"confidence": { +"description": "A score of 0 means that there is low confidence that the detected event is an actual attack. A score of 1 means that there is high confidence that the detected event is an attack. See the [Adaptive Protection documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) for further explanation.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Application": { +"description": "Represents an application associated with a finding.", +"id": "GoogleCloudSecuritycenterV2Application", +"properties": { +"baseUri": { +"description": "The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`.", +"type": "string" +}, +"fullUri": { +"description": "The full URI with payload that could be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Attack": { +"description": "Information about DDoS attack volume and classification.", +"id": "GoogleCloudSecuritycenterV2Attack", +"properties": { +"classification": { +"description": "Type of attack, for example, \u2018SYN-flood\u2019, \u2018NTP-udp\u2019, or \u2018CHARGEN-udp\u2019.", +"type": "string" +}, +"volumeBps": { +"description": "Total BPS (bytes per second) volume of attack.", +"format": "int32", +"type": "integer" +}, +"volumePps": { +"description": "Total PPS (packets per second) volume of attack.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AttackExposure": { +"description": "An attack exposure contains the results of an attack path simulation run.", +"id": "GoogleCloudSecuritycenterV2AttackExposure", +"properties": { +"attackExposureResult": { +"description": "The resource name of the attack path simulation result that contains the details regarding this attack exposure score. Example: organizations/123/simulations/456/attackExposureResults/789", +"type": "string" +}, +"exposedHighValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedLowValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedMediumValueResourcesCount": { +"description": "The number of medium value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"latestCalculationTime": { +"description": "The most recent time the attack exposure was updated on this finding.", +"format": "google-datetime", +"type": "string" +}, +"score": { +"description": "A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate.", +"format": "double", +"type": "number" +}, +"state": { +"description": "Output only. What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not.", +"enum": [ +"STATE_UNSPECIFIED", +"CALCULATED", +"NOT_CALCULATED" +], +"enumDescriptions": [ +"The state is not specified.", +"The attack exposure has been calculated.", +"The attack exposure has not been calculated." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsAccount": { +"description": "An AWS account that is a member of an organization.", +"id": "GoogleCloudSecuritycenterV2AwsAccount", +"properties": { +"id": { +"description": "The unique identifier (ID) of the account, containing exactly 12 digits.", +"type": "string" +}, +"name": { +"description": "The friendly name of this account.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsMetadata": { +"description": "AWS metadata associated with the resource, only applicable if the finding's cloud provider is Amazon Web Services.", +"id": "GoogleCloudSecuritycenterV2AwsMetadata", +"properties": { +"account": { +"$ref": "GoogleCloudSecuritycenterV2AwsAccount", +"description": "The AWS account associated with the resource." +}, +"organization": { +"$ref": "GoogleCloudSecuritycenterV2AwsOrganization", +"description": "The AWS organization associated with the resource." +}, +"organizationalUnits": { +"description": "A list of AWS organizational units associated with the resource, ordered from lowest level (closest to the account) to highest level.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2AwsOrganizationalUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsOrganization": { +"description": "An organization is a collection of accounts that are centrally managed together using consolidated billing, organized hierarchically with organizational units (OUs), and controlled with policies.", +"id": "GoogleCloudSecuritycenterV2AwsOrganization", +"properties": { +"id": { +"description": "The unique identifier (ID) for the organization. The regex pattern for an organization ID string requires \"o-\" followed by from 10 to 32 lowercase letters or digits.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsOrganizationalUnit": { +"description": "An Organizational Unit (OU) is a container of AWS accounts within a root of an organization. Policies that are attached to an OU apply to all accounts contained in that OU and in any child OUs.", +"id": "GoogleCloudSecuritycenterV2AwsOrganizationalUnit", +"properties": { +"id": { +"description": "The unique identifier (ID) associated with this OU. The regex pattern for an organizational unit ID string requires \"ou-\" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second \"-\" dash and from 8 to 32 additional lowercase letters or digits. For example, \"ou-ab12-cd34ef56\".", +"type": "string" +}, +"name": { +"description": "The friendly name of the OU.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BackupDisasterRecovery": { +"description": "Information related to Google Cloud Backup and DR Service findings.", +"id": "GoogleCloudSecuritycenterV2BackupDisasterRecovery", +"properties": { +"appliance": { +"description": "The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`.", +"type": "string" +}, +"applications": { +"description": "The names of Backup and DR applications. An application is a VM, database, or file system on a managed host monitored by a backup and recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, `centos7-01-vol02`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"backupCreateTime": { +"description": "The timestamp at which the Backup and DR backup was created.", +"format": "google-datetime", +"type": "string" +}, +"backupTemplate": { +"description": "The name of a Backup and DR template which comprises one or more backup policies. See the [Backup and DR documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) for more information. For example, `snap-ov`.", +"type": "string" +}, +"backupType": { +"description": "The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`.", +"type": "string" +}, +"host": { +"description": "The name of a Backup and DR host, which is managed by the backup and recovery appliance and known to the management console. The host can be of type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file system, etc.), vCenter, or an ESX server. See the [Backup and DR documentation on hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) for more information. For example, `centos7-01`.", +"type": "string" +}, +"policies": { +"description": "The names of Backup and DR policies that are associated with a template and that define when to run a backup, how frequently to run a backup, and how long to retain the backup image. For example, `onvaults`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"policyOptions": { +"description": "The names of Backup and DR advanced policy options of a policy applying to an application. See the [Backup and DR documentation on policy options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). For example, `skipofflineappsincongrp, nounmap`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"profile": { +"description": "The name of the Backup and DR resource profile that specifies the storage media for backups of application and VM data. See the [Backup and DR documentation on profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). For example, `GCP`.", +"type": "string" +}, +"storagePool": { +"description": "The name of the Backup and DR storage pool that the backup and recovery appliance is storing data in. The storage pool could be of type Cloud, Primary, Snapshot, or OnVault. See the [Backup and DR documentation on storage pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). For example, `DiskPoolOne`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BigQueryExport": { +"description": "Configures how to deliver Findings to BigQuery Instance.", +"id": "GoogleCloudSecuritycenterV2BigQueryExport", +"properties": { +"createTime": { +"description": "Output only. The time at which the BigQuery export was created. This field is set by the server and will be ignored if provided on export on creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataset": { +"description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", +"type": "string" +}, +"description": { +"description": "The description of the export (max of 1024 characters).", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the BigQuery export. This field is set by the server and will be ignored if provided on export creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", +"type": "string" +}, +"principal": { +"description": "Output only. The service account that needs permission to create table and upload data to the BigQuery dataset.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the BigQuery export was updated. This field is set by the server and will be ignored if provided on export creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Binding": { +"description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", +"id": "GoogleCloudSecuritycenterV2Binding", +"properties": { +"name": { +"description": "Name for the binding.", +"type": "string" +}, +"ns": { +"description": "Namespace for the binding.", +"type": "string" +}, +"role": { +"$ref": "GoogleCloudSecuritycenterV2Role", +"description": "The Role or ClusterRole referenced by the binding." +}, +"subjects": { +"description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BulkMuteFindingsResponse": { +"description": "The response to a BulkMute request. Contains the LRO information.", +"id": "GoogleCloudSecuritycenterV2BulkMuteFindingsResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudArmor": { +"description": "Fields related to Google Cloud Armor findings.", +"id": "GoogleCloudSecuritycenterV2CloudArmor", +"properties": { +"adaptiveProtection": { +"$ref": "GoogleCloudSecuritycenterV2AdaptiveProtection", +"description": "Information about potential Layer 7 DDoS attacks identified by [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview)." +}, +"attack": { +"$ref": "GoogleCloudSecuritycenterV2Attack", +"description": "Information about DDoS attack volume and classification." +}, +"duration": { +"description": "Duration of attack from the start until the current moment (updated every 5 minutes).", +"format": "google-duration", +"type": "string" +}, +"requests": { +"$ref": "GoogleCloudSecuritycenterV2Requests", +"description": "Information about incoming requests evaluated by [Google Cloud Armor security policies](https://cloud.google.com/armor/docs/security-policy-overview)." +}, +"securityPolicy": { +"$ref": "GoogleCloudSecuritycenterV2SecurityPolicy", +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding." +}, +"threatVector": { +"description": "Distinguish between volumetric & protocol DDoS attack and application layer attacks. For example, \u201cL3_4\u201d for Layer 3 and Layer 4 DDoS attacks, or \u201cL_7\u201d for Layer 7 DDoS attacks.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudDlpDataProfile": { +"description": "The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding.", +"id": "GoogleCloudSecuritycenterV2CloudDlpDataProfile", +"properties": { +"dataProfile": { +"description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", +"type": "string" +}, +"parentType": { +"description": "The resource hierarchy level at which the data profile was generated.", +"enum": [ +"PARENT_TYPE_UNSPECIFIED", +"ORGANIZATION", +"PROJECT" +], +"enumDescriptions": [ +"Unspecified parent type.", +"Organization-level configurations.", +"Project-level configurations." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudDlpInspection": { +"description": "Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding.", +"id": "GoogleCloudSecuritycenterV2CloudDlpInspection", +"properties": { +"fullScan": { +"description": "Whether Cloud DLP scanned the complete resource or a sampled subset.", +"type": "boolean" +}, +"infoType": { +"description": "The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.", +"type": "string" +}, +"infoTypeCount": { +"description": "The number of times Cloud DLP found this infoType within this job and resource.", +"format": "int64", +"type": "string" +}, +"inspectJob": { +"description": "Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudLoggingEntry": { +"description": "Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)", +"id": "GoogleCloudSecuritycenterV2CloudLoggingEntry", +"properties": { +"insertId": { +"description": "A unique identifier for the log entry.", +"type": "string" +}, +"logId": { +"description": "The type of the log (part of `log_name`. `log_name` is the resource name of the log to which this log entry belongs). For example: `cloudresourcemanager.googleapis.com/activity` Note that this field is not URL-encoded, unlike in `LogEntry`.", +"type": "string" +}, +"resourceContainer": { +"description": "The organization, folder, or project of the monitored resource that produced this log entry.", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "GoogleCloudSecuritycenterV2Compliance", +"properties": { +"ids": { +"description": "Policies within the standard or benchmark, for example, A.12.4.1", +"items": { +"type": "string" +}, +"type": "array" +}, +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Connection": { +"description": "Contains information about the IP connection associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Connection", +"properties": { +"destinationIp": { +"description": "Destination IP address. Not present for sockets that are listening and not connected.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Not present for sockets that are listening and not connected.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IANA Internet Protocol Number such as TCP(6) and UDP(17).", +"enum": [ +"PROTOCOL_UNSPECIFIED", +"ICMP", +"TCP", +"UDP", +"GRE", +"ESP" +], +"enumDescriptions": [ +"Unspecified protocol (not HOPOPT).", +"Internet Control Message Protocol.", +"Transmission Control Protocol.", +"User Datagram Protocol.", +"Generic Routing Encapsulation.", +"Encap Security Payload." +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourcePort": { +"description": "Source port.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Contact": { +"description": "The email address of a contact.", +"id": "GoogleCloudSecuritycenterV2Contact", +"properties": { +"email": { +"description": "An email address. For example, \"`person123@company.com`\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ContactDetails": { +"description": "Details about specific contacts", +"id": "GoogleCloudSecuritycenterV2ContactDetails", +"properties": { +"contacts": { +"description": "A list of contacts", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Contact" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Container": { +"description": "Container associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Container", +"properties": { +"createTime": { +"description": "The time that the container was created.", +"format": "google-datetime", +"type": "string" +}, +"imageId": { +"description": "Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", +"type": "string" +}, +"labels": { +"description": "Container labels, as provided by the container runtime.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Label" +}, +"type": "array" +}, +"name": { +"description": "Name of the container.", +"type": "string" +}, +"uri": { +"description": "Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Cve": { +"description": "CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability.", +"id": "GoogleCloudSecuritycenterV2Cve", +"properties": { +"cvssv3": { +"$ref": "GoogleCloudSecuritycenterV2Cvssv3", +"description": "Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document" +}, +"exploitationActivity": { +"description": "The exploitation activity of the vulnerability in the wild.", +"enum": [ +"EXPLOITATION_ACTIVITY_UNSPECIFIED", +"WIDE", +"CONFIRMED", +"AVAILABLE", +"ANTICIPATED", +"NO_KNOWN" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation has been reported or confirmed to widely occur.", +"Limited reported or confirmed exploitation activities.", +"Exploit is publicly available.", +"No known exploitation activity, but has a high potential for exploitation.", +"No known exploitation activity." +], +"type": "string" +}, +"id": { +"description": "The unique identifier for the vulnerability. e.g. CVE-2021-34527", +"type": "string" +}, +"impact": { +"description": "The potential impact of the vulnerability if it was to be exploited.", +"enum": [ +"RISK_RATING_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation would have little to no security impact.", +"Exploitation would enable attackers to perform activities, or could allow attackers to have a direct impact, but would require additional steps.", +"Exploitation would enable attackers to have a notable direct impact without needing to overcome any major mitigating factors.", +"Exploitation would fundamentally undermine the security of affected systems, enable actors to perform significant attacks with minimal effort, with little to no mitigating factors to overcome." +], +"type": "string" +}, +"observedInTheWild": { +"description": "Whether or not the vulnerability has been observed in the wild.", +"type": "boolean" +}, +"references": { +"description": "Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Reference" +}, +"type": "array" +}, +"upstreamFixAvailable": { +"description": "Whether upstream fix is available for the CVE.", +"type": "boolean" +}, +"zeroDay": { +"description": "Whether or not the vulnerability was zero day when the finding was published.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Cvssv3": { +"description": "Common Vulnerability Scoring System version 3.", +"id": "GoogleCloudSecuritycenterV2Cvssv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "double", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Database": { +"description": "Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of Cloud SQL instances or Cloud Spanner instances), or the database instance itself. Some database resources might not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types, such as Cloud SQL databases, are not yet supported by Cloud Asset Inventory. In these cases only the display name is provided.", +"id": "GoogleCloudSecuritycenterV2Database", +"properties": { +"displayName": { +"description": "The human-readable name of the database that the user connected to.", +"type": "string" +}, +"grantees": { +"description": "The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Some database resources may not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.", +"type": "string" +}, +"query": { +"description": "The SQL statement that is associated with the database access.", +"type": "string" +}, +"userName": { +"description": "The username used to connect to the database. The username might not be an IAM principal and does not have a set format.", +"type": "string" +}, +"version": { +"description": "The version of the database, for example, POSTGRES_14. See [the complete list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Detection": { +"description": "Memory hash detection contributing to the binary family match.", +"id": "GoogleCloudSecuritycenterV2Detection", +"properties": { +"binary": { +"description": "The name of the binary associated with the memory hash signature detection.", +"type": "string" +}, +"percentPagesMatched": { +"description": "The percentage of memory page hashes in the signature that were matched.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2DiskPath": { +"description": "Path of the file in terms of underlying disk/partition identifiers.", +"id": "GoogleCloudSecuritycenterV2DiskPath", +"properties": { +"partitionUuid": { +"description": "UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)", +"type": "string" +}, +"relativePath": { +"description": "Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2EnvironmentVariable": { +"description": "A name-value pair representing an environment variable used in an operating system process.", +"id": "GoogleCloudSecuritycenterV2EnvironmentVariable", +"properties": { +"name": { +"description": "Environment variable name as a JSON encoded string.", +"type": "string" +}, +"val": { +"description": "Environment variable value as a JSON encoded string.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ExfilResource": { +"description": "Resource where data was exfiltrated from or exfiltrated to.", +"id": "GoogleCloudSecuritycenterV2ExfilResource", +"properties": { +"components": { +"description": "Subcomponents of the asset that was exfiltrated, like URIs used during exfiltration, table names, databases, and filenames. For example, multiple tables might have been exfiltrated from the same Cloud SQL instance, or multiple files might have been exfiltrated from the same Cloud Storage bucket.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Exfiltration": { +"description": "Exfiltration represents a data exfiltration attempt from one or more sources to one or more targets. The `sources` attribute lists the sources of the exfiltrated data. The `targets` attribute lists the destinations the data was copied to.", +"id": "GoogleCloudSecuritycenterV2Exfiltration", +"properties": { +"sources": { +"description": "If there are multiple sources, then the data is considered \"joined\" between them. For instance, BigQuery can join multiple tables, and each table would be considered a source.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ExfilResource" +}, +"type": "array" +}, +"targets": { +"description": "If there are multiple targets, each target would get a complete copy of the \"joined\" source data.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ExfilResource" +}, +"type": "array" +}, +"totalExfiltratedBytes": { +"description": "Total exfiltrated bytes processed for the entire job.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ExternalSystem": { +"description": "Representation of third party SIEM/SOAR fields within SCC.", +"id": "GoogleCloudSecuritycenterV2ExternalSystem", +"properties": { +"assignees": { +"description": "References primary/secondary etc assignees in the external system.", +"items": { +"type": "string" +}, +"type": "array" +}, +"caseCloseTime": { +"description": "The time when the case was closed, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseCreateTime": { +"description": "The time when the case was created, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"casePriority": { +"description": "The priority of the finding's corresponding case in the external system.", +"type": "string" +}, +"caseSla": { +"description": "The SLA of the finding's corresponding case in the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseUri": { +"description": "The link to the finding's corresponding case in the external system.", +"type": "string" +}, +"externalSystemUpdateTime": { +"description": "The time when the case was last updated, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"externalUid": { +"description": "The identifier that's used to track the finding's corresponding case in the external system.", +"type": "string" +}, +"name": { +"description": "Full resource name of the external system. The following list shows some examples: + `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + `folders/1234/sources/5678/findings/123456/externalSystems/jira` + `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + `projects/1234/sources/5678/findings/123456/externalSystems/jira` + `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`", +"type": "string" +}, +"status": { +"description": "The most recent status of the finding's corresponding case, as reported by the external system.", +"type": "string" +}, +"ticketInfo": { +"$ref": "GoogleCloudSecuritycenterV2TicketInfo", +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2File": { +"description": "File information about the related binary/library used by an executable, or the script used by a script interpreter", +"id": "GoogleCloudSecuritycenterV2File", +"properties": { +"contents": { +"description": "Prefix of the file contents as a JSON-encoded string.", +"type": "string" +}, +"diskPath": { +"$ref": "GoogleCloudSecuritycenterV2DiskPath", +"description": "Path of the file in terms of underlying disk/partition identifiers." +}, +"hashedSize": { +"description": "The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.", +"format": "int64", +"type": "string" +}, +"partiallyHashed": { +"description": "True when the hash covers only a prefix of the file.", +"type": "boolean" +}, +"path": { +"description": "Absolute path of the file as a JSON encoded string.", +"type": "string" +}, +"sha256": { +"description": "SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.", +"type": "string" +}, +"size": { +"description": "Size of the file in bytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.", +"id": "GoogleCloudSecuritycenterV2Finding", +"properties": { +"access": { +"$ref": "GoogleCloudSecuritycenterV2Access", +"description": "Access details associated with the finding, such as more information on the caller, which method was accessed, and from where." +}, +"application": { +"$ref": "GoogleCloudSecuritycenterV2Application", +"description": "Represents an application associated with the finding." +}, +"attackExposure": { +"$ref": "GoogleCloudSecuritycenterV2AttackExposure", +"description": "The results of an attack path simulation relevant to this finding." +}, +"backupDisasterRecovery": { +"$ref": "GoogleCloudSecuritycenterV2BackupDisasterRecovery", +"description": "Fields related to Backup and DR findings." +}, +"canonicalName": { +"description": "Output only. The canonical name of the finding. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` The prefix is the closest CRM ancestor of the resource associated with the finding.", +"readOnly": true, +"type": "string" +}, +"category": { +"description": "Immutable. The additional taxonomy group within findings from a given source. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"cloudArmor": { +"$ref": "GoogleCloudSecuritycenterV2CloudArmor", +"description": "Fields related to Cloud Armor findings." +}, +"cloudDlpDataProfile": { +"$ref": "GoogleCloudSecuritycenterV2CloudDlpDataProfile", +"description": "Cloud DLP data profile that is associated with the finding." +}, +"cloudDlpInspection": { +"$ref": "GoogleCloudSecuritycenterV2CloudDlpInspection", +"description": "Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding." +}, +"compliances": { +"description": "Contains compliance information for security standards associated to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Compliance" +}, +"type": "array" +}, +"connections": { +"description": "Contains information about the IP connection associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Connection" +}, +"type": "array" +}, +"contacts": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV2ContactDetails" +}, +"description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", +"readOnly": true, +"type": "object" +}, +"containers": { +"description": "Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"createTime": { +"description": "Output only. The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"database": { +"$ref": "GoogleCloudSecuritycenterV2Database", +"description": "Database associated with the finding." +}, +"description": { +"description": "Contains more details about the finding.", +"type": "string" +}, +"eventTime": { +"description": "The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"exfiltration": { +"$ref": "GoogleCloudSecuritycenterV2Exfiltration", +"description": "Represents exfiltrations associated with the finding." +}, +"externalSystems": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV2ExternalSystem" +}, +"description": "Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields.", +"readOnly": true, +"type": "object" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"files": { +"description": "File associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2File" +}, +"type": "array" +}, +"findingClass": { +"description": "The class of the finding.", +"enum": [ +"FINDING_CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"SCC_ERROR", +"POSTURE_VIOLATION" +], +"enumDescriptions": [ +"Unspecified finding class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality.", +"Describes a potential security risk due to a change in the security posture." +], +"type": "string" +}, +"iamBindings": { +"description": "Represents IAM bindings associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2IamBinding" +}, +"type": "array" +}, +"indicator": { +"$ref": "GoogleCloudSecuritycenterV2Indicator", +"description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." +}, +"kernelRootkit": { +"$ref": "GoogleCloudSecuritycenterV2KernelRootkit", +"description": "Signature of the kernel rootkit." +}, +"kubernetes": { +"$ref": "GoogleCloudSecuritycenterV2Kubernetes", +"description": "Kubernetes resources associated with the finding." +}, +"loadBalancers": { +"description": "The load balancers associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2LoadBalancer" +}, +"type": "array" +}, +"logEntries": { +"description": "Log entries that are relevant to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2LogEntry" +}, +"type": "array" +}, +"mitreAttack": { +"$ref": "GoogleCloudSecuritycenterV2MitreAttack", +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org" +}, +"moduleName": { +"description": "Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885", +"type": "string" +}, +"mute": { +"description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", +"enum": [ +"MUTE_UNSPECIFIED", +"MUTED", +"UNMUTED", +"UNDEFINED" +], +"enumDescriptions": [ +"Unspecified.", +"Finding has been muted.", +"Finding has been unmuted.", +"Finding has never been muted/unmuted." +], +"type": "string" +}, +"muteInitiator": { +"description": "Records additional information about the mute operation, for example, the [mute configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) that muted the finding and the user who muted the finding.", +"type": "string" +}, +"muteUpdateTime": { +"description": "Output only. The most recent time this finding was muted or unmuted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`", +"type": "string" +}, +"nextSteps": { +"description": "Steps to address the finding.", +"type": "string" +}, +"notebook": { +"$ref": "GoogleCloudSecuritycenterV2Notebook", +"description": "Notebook associated with the finding." +}, +"orgPolicies": { +"description": "Contains information about the org policies associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2OrgPolicy" +}, +"type": "array" +}, +"parent": { +"description": "The relative resource name of the source and location the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}` + `folders/{folders_id}/sources/{source_id}` + `projects/{projects_id}/sources/{source_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`", +"type": "string" +}, +"parentDisplayName": { +"description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", +"readOnly": true, +"type": "string" +}, +"processes": { +"description": "Represents operating system processes associated with the Finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Process" +}, +"type": "array" +}, +"resourceName": { +"description": "Immutable. For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string.", +"type": "string" +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV2SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"securityPosture": { +"$ref": "GoogleCloudSecuritycenterV2SecurityPosture", +"description": "The security posture associated with the finding." +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"This value is used for findings when a source doesn't write a severity value.", +"Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data and public SSH access with weak or no passwords. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", +"Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", +"Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", +"Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "Output only. The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"readOnly": true, +"type": "string" +}, +"vulnerability": { +"$ref": "GoogleCloudSecuritycenterV2Vulnerability", +"description": "Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "GoogleCloudSecuritycenterV2Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Geolocation": { +"description": "Represents a geographical location for a given access.", +"id": "GoogleCloudSecuritycenterV2Geolocation", +"properties": { +"regionCode": { +"description": "A CLDR.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2IamBinding": { +"description": "Represents a particular IAM binding, which captures a member's role addition, removal, or state.", +"id": "GoogleCloudSecuritycenterV2IamBinding", +"properties": { +"action": { +"description": "The action that was performed on a Binding.", +"enum": [ +"ACTION_UNSPECIFIED", +"ADD", +"REMOVE" +], +"enumDescriptions": [ +"Unspecified.", +"Addition of a Binding.", +"Removal of a Binding." +], +"type": "string" +}, +"member": { +"description": "A single identity requesting access for a Cloud Platform resource, for example, \"foo@google.com\".", +"type": "string" +}, +"role": { +"description": "Role that is assigned to \"members\". For example, \"roles/viewer\", \"roles/editor\", or \"roles/owner\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Indicator": { +"description": "Represents what's commonly known as an _indicator of compromise_ (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).", +"id": "GoogleCloudSecuritycenterV2Indicator", +"properties": { +"domains": { +"description": "List of domains associated to the Finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipAddresses": { +"description": "The list of IP addresses that are associated with the finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"signatures": { +"description": "The list of matched signatures indicating that the given process is present in the environment.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ProcessSignature" +}, +"type": "array" +}, +"uris": { +"description": "The list of URIs associated to the Findings.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2KernelRootkit": { +"description": "Kernel mode rootkit signatures.", +"id": "GoogleCloudSecuritycenterV2KernelRootkit", +"properties": { +"name": { +"description": "Rootkit name, when available.", +"type": "string" +}, +"unexpectedCodeModification": { +"description": "True if unexpected modifications of kernel code memory are present.", +"type": "boolean" +}, +"unexpectedFtraceHandler": { +"description": "True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedInterruptHandler": { +"description": "True if interrupt handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKernelCodePages": { +"description": "True if kernel code pages that are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKprobeHandler": { +"description": "True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedProcessesInRunqueue": { +"description": "True if unexpected processes in the scheduler run queue are present. Such processes are in the run queue, but not in the process task list.", +"type": "boolean" +}, +"unexpectedReadOnlyDataModification": { +"description": "True if unexpected modifications of kernel read-only data memory are present.", +"type": "boolean" +}, +"unexpectedSystemCallHandler": { +"description": "True if system call handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Kubernetes": { +"description": "Kubernetes-related attributes.", +"id": "GoogleCloudSecuritycenterV2Kubernetes", +"properties": { +"accessReviews": { +"description": "Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2AccessReview" +}, +"type": "array" +}, +"bindings": { +"description": "Provides Kubernetes role binding information for findings that involve [RoleBindings or ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Binding" +}, +"type": "array" +}, +"nodePools": { +"description": "GKE [node pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) associated with the finding. This field contains node pool information for each node, when it is available.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2NodePool" +}, +"type": "array" +}, +"nodes": { +"description": "Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Node" +}, +"type": "array" +}, +"objects": { +"description": "Kubernetes objects related to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Object" +}, +"type": "array" +}, +"pods": { +"description": "Kubernetes [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated with the finding. This field contains Pod records for each container that is owned by a Pod.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Pod" +}, +"type": "array" +}, +"roles": { +"description": "Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Role" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Label": { +"description": "Represents a generic name-value label. A label has separate name and value fields to support filtering with the `contains()` function. For more information, see [Filtering on array-type fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).", +"id": "GoogleCloudSecuritycenterV2Label", +"properties": { +"name": { +"description": "Name of the label.", +"type": "string" +}, +"value": { +"description": "Value that corresponds to the label's name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2LoadBalancer": { +"description": "Contains information related to the load balancer associated with the finding.", +"id": "GoogleCloudSecuritycenterV2LoadBalancer", +"properties": { +"name": { +"description": "The name of the load balancer associated with the finding.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2LogEntry": { +"description": "An individual entry in a log.", +"id": "GoogleCloudSecuritycenterV2LogEntry", +"properties": { +"cloudLoggingEntry": { +"$ref": "GoogleCloudSecuritycenterV2CloudLoggingEntry", +"description": "An individual entry in a log stored in Cloud Logging." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MemoryHashSignature": { +"description": "A signature corresponding to memory page hashes.", +"id": "GoogleCloudSecuritycenterV2MemoryHashSignature", +"properties": { +"binaryFamily": { +"description": "The binary family.", +"type": "string" +}, +"detections": { +"description": "The list of memory hash detections contributing to the binary family match.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Detection" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MitreAttack": { +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org", +"id": "GoogleCloudSecuritycenterV2MitreAttack", +"properties": { +"additionalTactics": { +"description": "Additional MITRE ATT&CK tactics related to this finding, if any.", +"items": { +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"type": "array" +}, +"additionalTechniques": { +"description": "Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques.", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"primaryTactic": { +"description": "The MITRE ATT&CK tactic most closely represented by this finding, if any.", +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"primaryTechniques": { +"description": "The MITRE ATT&CK technique most closely represented by this finding, if any. primary_techniques is a repeated field because there are multiple levels of MITRE ATT&CK techniques. If the technique most closely represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The MITRE ATT&CK version referenced by the above fields. E.g. \"8\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MuteConfig": { +"description": "A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings.", +"id": "GoogleCloudSecuritycenterV2MuteConfig", +"properties": { +"createTime": { +"description": "Output only. The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of the mute config.", +"type": "string" +}, +"filter": { +"description": "Required. An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", +"type": "string" +}, +"type": { +"description": "Required. The type of the mute config, which determines what type of mute state the config affects. Immutable after creation.", +"enum": [ +"MUTE_CONFIG_TYPE_UNSPECIFIED", +"STATIC" +], +"enumDescriptions": [ +"Unused.", +"A static mute config, which sets the static mute state of future matching findings to muted. Once the static mute state has been set, finding or config modifications will not affect the state." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Node": { +"description": "Kubernetes nodes associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Node", +"properties": { +"name": { +"description": "[Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2NodePool": { +"description": "Provides GKE node pool information.", +"id": "GoogleCloudSecuritycenterV2NodePool", +"properties": { +"name": { +"description": "Kubernetes node pool name.", +"type": "string" +}, +"nodes": { +"description": "Nodes associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Node" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Notebook": { +"description": "Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise notebook](https://cloud.google.com/colab/docs/introduction) file, that is associated with a finding.", +"id": "GoogleCloudSecuritycenterV2Notebook", +"properties": { +"lastAuthor": { +"description": "The user ID of the latest author to modify the notebook.", +"type": "string" +}, +"name": { +"description": "The name of the notebook.", +"type": "string" +}, +"notebookUpdateTime": { +"description": "The most recent time the notebook was updated.", +"format": "google-datetime", +"type": "string" +}, +"service": { +"description": "The source notebook service, for example, \"Colab Enterprise\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2NotificationMessage": { +"description": "Cloud SCC's Notification", +"id": "GoogleCloudSecuritycenterV2NotificationMessage", +"properties": { +"finding": { +"$ref": "GoogleCloudSecuritycenterV2Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV2Resource", +"description": "The Cloud resource tied to this notification's Finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Object": { +"description": "Kubernetes object related to the finding, uniquely identified by GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or AccessReview.", +"id": "GoogleCloudSecuritycenterV2Object", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"group": { +"description": "Kubernetes object group, such as \"policy.k8s.io/v1\".", +"type": "string" +}, +"kind": { +"description": "Kubernetes object kind, such as \"Namespace\".", +"type": "string" +}, +"name": { +"description": "Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.", +"type": "string" +}, +"ns": { +"description": "Kubernetes object namespace. Must be a valid DNS label. Named \"ns\" to avoid collision with C++ namespace keyword. For details see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2OrgPolicy": { +"description": "Contains information about the org policies associated with the finding.", +"id": "GoogleCloudSecuritycenterV2OrgPolicy", +"properties": { +"name": { +"description": "The resource name of the org policy. Example: \"organizations/{organization_id}/policies/{constraint_name}\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Package": { +"description": "Package is a generic definition of a package.", +"id": "GoogleCloudSecuritycenterV2Package", +"properties": { +"cpeUri": { +"description": "The CPE URI where the vulnerability was detected.", +"type": "string" +}, +"packageName": { +"description": "The name of the package where the vulnerability was detected.", +"type": "string" +}, +"packageType": { +"description": "Type of package, for example, os, maven, or go.", +"type": "string" +}, +"packageVersion": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Pod": { +"description": "A Kubernetes Pod.", +"id": "GoogleCloudSecuritycenterV2Pod", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"labels": { +"description": "Pod labels. For Kubernetes containers, these are applied to the container.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Label" +}, +"type": "array" +}, +"name": { +"description": "Kubernetes Pod name.", +"type": "string" +}, +"ns": { +"description": "Kubernetes Pod namespace.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2PolicyDriftDetails": { +"description": "The policy field that violates the deployed posture and its expected and detected values.", +"id": "GoogleCloudSecuritycenterV2PolicyDriftDetails", +"properties": { +"detectedValue": { +"description": "The detected value that violates the deployed posture, for example, `false` or `allowed_values={\"projects/22831892\"}`.", +"type": "string" +}, +"expectedValue": { +"description": "The value of this field that was configured in a posture, for example, `true` or `allowed_values={\"projects/29831892\"}`.", +"type": "string" +}, +"field": { +"description": "The name of the updated field, for example constraint.implementation.policy_rules[0].enforce", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Process": { +"description": "Represents an operating system process.", +"id": "GoogleCloudSecuritycenterV2Process", +"properties": { +"args": { +"description": "Process arguments as JSON encoded strings.", +"items": { +"type": "string" +}, +"type": "array" +}, +"argumentsTruncated": { +"description": "True if `args` is incomplete.", +"type": "boolean" +}, +"binary": { +"$ref": "GoogleCloudSecuritycenterV2File", +"description": "File information for the process executable." +}, +"envVariables": { +"description": "Process environment variables.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2EnvironmentVariable" +}, +"type": "array" +}, +"envVariablesTruncated": { +"description": "True if `env_variables` is incomplete.", +"type": "boolean" +}, +"libraries": { +"description": "File information for libraries loaded by the process.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2File" +}, +"type": "array" +}, +"name": { +"description": "The process name, as displayed in utilities like `top` and `ps`. This name can be accessed through `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.", +"type": "string" +}, +"parentPid": { +"description": "The parent process ID.", +"format": "int64", +"type": "string" +}, +"pid": { +"description": "The process ID.", +"format": "int64", +"type": "string" +}, +"script": { +"$ref": "GoogleCloudSecuritycenterV2File", +"description": "When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ProcessSignature": { +"description": "Indicates what signature matched this process.", +"id": "GoogleCloudSecuritycenterV2ProcessSignature", +"properties": { +"memoryHashSignature": { +"$ref": "GoogleCloudSecuritycenterV2MemoryHashSignature", +"description": "Signature indicating that a binary family was matched." +}, +"signatureType": { +"description": "Describes the type of resource associated with the signature.", +"enum": [ +"SIGNATURE_TYPE_UNSPECIFIED", +"SIGNATURE_TYPE_PROCESS", +"SIGNATURE_TYPE_FILE" +], +"enumDescriptions": [ +"The default signature type.", +"Used for signatures concerning processes.", +"Used for signatures concerning disks." +], +"type": "string" +}, +"yaraRuleSignature": { +"$ref": "GoogleCloudSecuritycenterV2YaraRuleSignature", +"description": "Signature indicating that a YARA rule was matched." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Reference": { +"description": "Additional Links", +"id": "GoogleCloudSecuritycenterV2Reference", +"properties": { +"source": { +"description": "Source of the reference e.g. NVD", +"type": "string" +}, +"uri": { +"description": "Uri for the mentioned source e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Requests": { +"description": "Information about the requests relevant to the finding.", +"id": "GoogleCloudSecuritycenterV2Requests", +"properties": { +"longTermAllowed": { +"description": "Allowed RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"longTermDenied": { +"description": "Denied RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"ratio": { +"description": "For 'Increasing deny ratio', the ratio is the denied traffic divided by the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed traffic in the short term divided by allowed traffic in the long term.", +"format": "double", +"type": "number" +}, +"shortTermAllowed": { +"description": "Allowed RPS (requests per second) in the short term.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV2Resource", +"properties": { +"awsMetadata": { +"$ref": "GoogleCloudSecuritycenterV2AwsMetadata", +"description": "The AWS metadata associated with the finding." +}, +"cloudProvider": { +"description": "Indicates which cloud provider the finding is from.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"displayName": { +"description": "The human readable name of the resource.", +"type": "string" +}, +"gcpMetadata": { +"$ref": "GcpMetadata", +"description": "The GCP metadata associated with the finding." +}, +"location": { +"description": "The region or location of the service (if applicable).", +"type": "string" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourcePath": { +"$ref": "GoogleCloudSecuritycenterV2ResourcePath", +"description": "Provides the path to the resource within the resource hierarchy." +}, +"resourcePathString": { +"description": "A string representation of the resource path. For GCP, it has the format of: organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} where there can be any number of folders. For AWS, it has the format of: org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of: mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", +"type": "string" +}, +"service": { +"description": "The service or resource provider associated with the resource.", +"type": "string" +}, +"type": { +"description": "The full resource type of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourcePath": { +"description": "Represents the path of resources leading up to the resource this finding is about.", +"id": "GoogleCloudSecuritycenterV2ResourcePath", +"properties": { +"nodes": { +"description": "The list of nodes that make the up resource path, ordered from lowest level to highest level.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ResourcePathNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourcePathNode": { +"description": "A node within the resource path. Each node represents a resource within the resource hierarchy.", +"id": "GoogleCloudSecuritycenterV2ResourcePathNode", +"properties": { +"displayName": { +"description": "The display name of the resource this node represents.", +"type": "string" +}, +"id": { +"description": "The ID of the resource this node represents.", +"type": "string" +}, +"nodeType": { +"description": "The type of resource this node represents.", +"enum": [ +"RESOURCE_PATH_NODE_TYPE_UNSPECIFIED", +"GCP_ORGANIZATION", +"GCP_FOLDER", +"GCP_PROJECT", +"AWS_ORGANIZATION", +"AWS_ORGANIZATIONAL_UNIT", +"AWS_ACCOUNT", +"AZURE_MANAGEMENT_GROUP", +"AZURE_SUBSCRIPTION", +"AZURE_RESOURCE_GROUP" +], +"enumDescriptions": [ +"Node type is unspecified.", +"The node represents a GCP organization.", +"The node represents a GCP folder.", +"The node represents a GCP project.", +"The node represents an AWS organization.", +"The node represents an AWS organizational unit.", +"The node represents an AWS account.", +"The node represents an Azure management group.", +"The node represents an Azure subscription.", +"The node represents an Azure resource group." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourceValueConfig": { +"description": "A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations.", +"id": "GoogleCloudSecuritycenterV2ResourceValueConfig", +"properties": { +"cloudProvider": { +"description": "Cloud provider this configuration applies to", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Timestamp this resource value config was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the resource value config.", +"type": "string" +}, +"name": { +"description": "Name for the resource value config", +"type": "string" +}, +"resourceLabelsSelector": { +"additionalProperties": { +"type": "string" +}, +"description": "List of resource labels to search for, evaluated with AND. E.g. \"resource_labels_selector\": {\"key\": \"value\", \"env\": \"prod\"} will match resources with labels \"key\": \"value\" AND \"env\": \"prod\" https://cloud.google.com/resource-manager/docs/creating-managing-labels", +"type": "object" +}, +"resourceType": { +"description": "Apply resource_value only to resources that match resource_type. resource_type will be checked with \"AND\" of other resources. E.g. \"storage.googleapis.com/Bucket\" with resource_value \"HIGH\" will apply \"HIGH\" value only to \"storage.googleapis.com/Bucket\" resources.", +"type": "string" +}, +"resourceValue": { +"description": "Resource value level this expression represents Only required when there is no SDP mapping in the request", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"scope": { +"description": "Project or folder to scope this config to. For example, \"project/456\" would apply this config only to resources in \"project/456\" scope will be checked with \"AND\" of other resources.", +"type": "string" +}, +"sensitiveDataProtectionMapping": { +"$ref": "GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping", +"description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." +}, +"tagValues": { +"description": "Required. Tag values combined with AND to check against. Values in the form \"tagValues/123\" E.g. [ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Timestamp this resource value config was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Role": { +"description": "Kubernetes Role or ClusterRole.", +"id": "GoogleCloudSecuritycenterV2Role", +"properties": { +"kind": { +"description": "Role type.", +"enum": [ +"KIND_UNSPECIFIED", +"ROLE", +"CLUSTER_ROLE" +], +"enumDescriptions": [ +"Role type is not specified.", +"Kubernetes Role.", +"Kubernetes ClusterRole." +], +"type": "string" +}, +"name": { +"description": "Role name.", +"type": "string" +}, +"ns": { +"description": "Role namespace.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityBulletin": { +"description": "SecurityBulletin are notifications of vulnerabilities of Google products.", +"id": "GoogleCloudSecuritycenterV2SecurityBulletin", +"properties": { +"bulletinId": { +"description": "ID of the bulletin corresponding to the vulnerability.", +"type": "string" +}, +"submissionTime": { +"description": "Submission time of this Security Bulletin.", +"format": "google-datetime", +"type": "string" +}, +"suggestedUpgradeVersion": { +"description": "This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "GoogleCloudSecuritycenterV2SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. The following list shows some examples: + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + `folders/{folder_id}/assets/{asset_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + `projects/{project_number}/assets/{asset_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name The following list shows some examples: + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityPolicy": { +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding.", +"id": "GoogleCloudSecuritycenterV2SecurityPolicy", +"properties": { +"name": { +"description": "The name of the Google Cloud Armor security policy, for example, \"my-security-policy\".", +"type": "string" +}, +"preview": { +"description": "Whether or not the associated rule or policy is in preview mode.", +"type": "boolean" +}, +"type": { +"description": "The type of Google Cloud Armor security policy for example, \u2018backend security policy\u2019, \u2018edge security policy\u2019, \u2018network edge security policy\u2019, or \u2018always-on DDoS protection\u2019.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityPosture": { +"description": "Represents a posture that is deployed on Google Cloud by the Security Command Center Posture Management service. A posture contains one or more policy sets. A policy set is a group of policies that enforce a set of security rules on Google Cloud.", +"id": "GoogleCloudSecuritycenterV2SecurityPosture", +"properties": { +"changedPolicy": { +"description": "The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`.", +"type": "string" +}, +"name": { +"description": "Name of the posture, for example, `CIS-Posture`.", +"type": "string" +}, +"policy": { +"description": "The ID of the updated policy, for example, `compute-policy-1`.", +"type": "string" +}, +"policyDriftDetails": { +"description": "The details about a change in an updated policy that violates the deployed posture.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2PolicyDriftDetails" +}, +"type": "array" +}, +"policySet": { +"description": "The name of the updated policy set, for example, `cis-policyset`.", +"type": "string" +}, +"postureDeployment": { +"description": "The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.", +"type": "string" +}, +"postureDeploymentResource": { +"description": "The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`.", +"type": "string" +}, +"revisionId": { +"description": "The version of the posture, for example, `c7cfa2a8`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping": { +"description": "Resource value mapping for Sensitive Data Protection findings If any of these mappings have a resource value that is not unspecified, the resource_value field will be ignored when reading this configuration.", +"id": "GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping", +"properties": { +"highSensitivityMapping": { +"description": "Resource value mapping for high-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"mediumSensitivityMapping": { +"description": "Resource value mapping for medium-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo", +"properties": { +"principalEmail": { +"description": "The email address of a Google account.", +"type": "string" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Subject": { +"description": "Represents a Kubernetes subject.", +"id": "GoogleCloudSecuritycenterV2Subject", +"properties": { +"kind": { +"description": "Authentication type for the subject.", +"enum": [ +"AUTH_TYPE_UNSPECIFIED", +"USER", +"SERVICEACCOUNT", +"GROUP" +], +"enumDescriptions": [ +"Authentication is not specified.", +"User with valid certificate.", +"Users managed by Kubernetes API with credentials stored as secrets.", +"Collection of users." +], +"type": "string" +}, +"name": { +"description": "Name for the subject.", +"type": "string" +}, +"ns": { +"description": "Namespace for the subject.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2TicketInfo": { +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding.", +"id": "GoogleCloudSecuritycenterV2TicketInfo", +"properties": { +"assignee": { +"description": "The assignee of the ticket in the ticket system.", +"type": "string" +}, +"description": { +"description": "The description of the ticket in the ticket system.", +"type": "string" +}, +"id": { +"description": "The identifier of the ticket in the ticket system.", +"type": "string" +}, +"status": { +"description": "The latest status of the ticket, as reported by the ticket system.", +"type": "string" +}, +"updateTime": { +"description": "The time when the ticket was last updated, as reported by the ticket system.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "The link to the ticket in the ticket system.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Vulnerability": { +"description": "Refers to common vulnerability fields e.g. cve, cvss, cwe etc.", +"id": "GoogleCloudSecuritycenterV2Vulnerability", +"properties": { +"cve": { +"$ref": "GoogleCloudSecuritycenterV2Cve", +"description": "CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +}, +"fixedPackage": { +"$ref": "GoogleCloudSecuritycenterV2Package", +"description": "The fixed package is relevant to the finding." +}, +"offendingPackage": { +"$ref": "GoogleCloudSecuritycenterV2Package", +"description": "The offending package is relevant to the finding." +}, +"securityBulletin": { +"$ref": "GoogleCloudSecuritycenterV2SecurityBulletin", +"description": "The security bulletin is relevant to this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2YaraRuleSignature": { +"description": "A signature corresponding to a YARA rule.", +"id": "GoogleCloudSecuritycenterV2YaraRuleSignature", +"properties": { +"yaraRule": { +"description": "The name of the YARA rule.", +"type": "string" +} +}, +"type": "object" +}, +"GroupAssetsRequest": { +"description": "Request message for grouping by assets.", +"id": "GroupAssetsRequest", +"properties": { +"compareDuration": { +"description": "When compare_duration is set, the GroupResult's \"state_change\" property is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state change value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state_change\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present at the start of compare_duration, but present at reference_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at reference_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and reference_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all assets present at read_time. If this field is set then `state_change` must be a specified field in `group_by`.", +"format": "google-duration", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * update_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `update_time = \"2019-06-10T16:07:18-07:00\"` `update_time = 1560208038000` * create_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `create_time = \"2019-06-10T16:07:18-07:00\"` `create_time = 1560208038000` * iam_policy.policy_blob: `=`, `:` * resource_properties: `=`, `:`, `>`, `<`, `>=`, `<=` * security_marks.marks: `=`, `:` * security_center_properties.resource_name: `=`, `:` * security_center_properties.resource_display_name: `=`, `:` * security_center_properties.resource_type: `=`, `:` * security_center_properties.resource_parent: `=`, `:` * security_center_properties.resource_parent_display_name: `=`, `:` * security_center_properties.resource_project: `=`, `:` * security_center_properties.resource_project_display_name: `=`, `:` * security_center_properties.resource_owners: `=`, `:` For example, `resource_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `resource_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-resource_properties.my_property : \"\"`", +"type": "string" +}, +"groupBy": { +"description": "Required. Expression that defines what assets fields to use for grouping. The string value should follow SQL syntax: comma separated list of fields. For example: \"security_center_properties.resource_project,security_center_properties.project\". The following fields are supported when compare_duration is not set: * security_center_properties.resource_project * security_center_properties.resource_project_display_name * security_center_properties.resource_type * security_center_properties.resource_parent * security_center_properties.resource_parent_display_name The following fields are supported when compare_duration is set: * security_center_properties.resource_type * security_center_properties.resource_project_display_name * security_center_properties.resource_parent_display_name", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `GroupAssetsResponse`; indicates that this is a continuation of a prior `GroupAssets` call, and that the system should return the next page of data.", +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GroupAssetsResponse": { +"description": "Response message for grouping by assets.", +"id": "GroupAssetsResponse", +"properties": { +"groupByResults": { +"description": "Group results. There exists an element for each existing unique combination of property/values. The element contains a count for the number of times those specific property/values appear.", +"items": { +"$ref": "GroupResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the groupBy request.", +"format": "google-datetime", +"type": "string" +}, +"totalSize": { +"description": "The total number of results matching the query.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GroupFindingsRequest": { +"description": "Request message for grouping by findings.", +"id": "GroupFindingsRequest", +"properties": { +"compareDuration": { +"description": "When compare_duration is set, the GroupResult's \"state_change\" attribute is updated to indicate whether the finding had its state changed, the finding's state remained unchanged, or if the finding was added during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state_change value is derived based on the presence and state of the finding at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the finding is made inactive and then active again. Possible \"state_change\" values when compare_duration is specified: * \"CHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration, but changed its state at read_time. * \"UNCHANGED\": indicates that the finding was present and matched the given filter at the start of compare_duration and did not change state at read_time. * \"ADDED\": indicates that the finding did not match the given filter or was not present at the start of compare_duration, but was present at read_time. * \"REMOVED\": indicates that the finding was present and matched the filter at the start of compare_duration, but did not match the filter at read_time. If compare_duration is not specified, then the only possible state_change is \"UNUSED\", which will be the state_change set for all findings present at read_time. If this field is set then `state_change` must be a specified field in `group_by`.", +"format": "google-duration", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. The following field and operator combinations are supported: * name: `=` * parent: `=`, `:` * resource_name: `=`, `:` * state: `=`, `:` * category: `=`, `:` * external_uri: `=`, `:` * event_time: `=`, `>`, `<`, `>=`, `<=` Usage: This should be milliseconds since epoch or an RFC3339 string. Examples: `event_time = \"2019-06-10T16:07:18-07:00\"` `event_time = 1560208038000` * severity: `=`, `:` * workflow_state: `=`, `:` * security_marks.marks: `=`, `:` * source_properties: `=`, `:`, `>`, `<`, `>=`, `<=` For example, `source_properties.size = 100` is a valid filter string. Use a partial match on the empty string to filter based on a property existing: `source_properties.my_property : \"\"` Use a negated partial match on the empty string to filter based on a property not existing: `-source_properties.my_property : \"\"` * resource: * resource.name: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.type: `=`, `:`", +"type": "string" +}, +"groupBy": { +"description": "Required. Expression that defines what assets fields to use for grouping (including `state_change`). The string value should follow SQL syntax: comma separated list of fields. For example: \"parent,resource_name\". The following fields are supported: * resource_name * category * state * parent * severity The following fields are supported when compare_duration is set: * state_change", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `GroupFindingsResponse`; indicates that this is a continuation of a prior `GroupFindings` call, and that the system should return the next page of data.", +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GroupFindingsResponse": { +"description": "Response message for group by findings.", +"id": "GroupFindingsResponse", +"properties": { +"groupByResults": { +"description": "Group results. There exists an element for each existing unique combination of property/values. The element contains a count for the number of times those specific property/values appear.", +"items": { +"$ref": "GroupResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the groupBy request.", +"format": "google-datetime", +"type": "string" +}, +"totalSize": { +"description": "The total number of results matching the query.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GroupResult": { +"description": "Result containing the properties and count of a groupBy request.", +"id": "GroupResult", +"properties": { +"count": { +"description": "Total count of resources for the given properties.", +"format": "int64", +"type": "string" +}, +"properties": { +"additionalProperties": { +"type": "any" +}, +"description": "Properties matching the groupBy fields in the request.", +"type": "object" +} +}, +"type": "object" +}, +"IamBinding": { +"description": "Represents a particular IAM binding, which captures a member's role addition, removal, or state.", +"id": "IamBinding", +"properties": { +"action": { +"description": "The action that was performed on a Binding.", +"enum": [ +"ACTION_UNSPECIFIED", +"ADD", +"REMOVE" +], +"enumDescriptions": [ +"Unspecified.", +"Addition of a Binding.", +"Removal of a Binding." +], +"type": "string" +}, +"member": { +"description": "A single identity requesting access for a Cloud Platform resource, for example, \"foo@google.com\".", +"type": "string" +}, +"role": { +"description": "Role that is assigned to \"members\". For example, \"roles/viewer\", \"roles/editor\", or \"roles/owner\".", +"type": "string" +} +}, +"type": "object" +}, +"IamPolicy": { +"description": "Cloud IAM Policy information associated with the Google Cloud resource described by the Security Command Center asset. This information is managed and defined by the Google Cloud resource and cannot be modified by the user.", +"id": "IamPolicy", +"properties": { +"policyBlob": { +"description": "The JSON representation of the Policy associated with the asset. See https://cloud.google.com/iam/reference/rest/v1/Policy for format details.", +"type": "string" +} +}, +"type": "object" +}, +"Indicator": { +"description": "Represents what's commonly known as an _indicator of compromise_ (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).", +"id": "Indicator", +"properties": { +"domains": { +"description": "List of domains associated to the Finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipAddresses": { +"description": "The list of IP addresses that are associated with the finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"signatures": { +"description": "The list of matched signatures indicating that the given process is present in the environment.", +"items": { +"$ref": "ProcessSignature" +}, +"type": "array" +}, +"uris": { +"description": "The list of URIs associated to the Findings.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"KernelRootkit": { +"description": "Kernel mode rootkit signatures.", +"id": "KernelRootkit", +"properties": { +"name": { +"description": "Rootkit name, when available.", +"type": "string" +}, +"unexpectedCodeModification": { +"description": "True if unexpected modifications of kernel code memory are present.", +"type": "boolean" +}, +"unexpectedFtraceHandler": { +"description": "True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedInterruptHandler": { +"description": "True if interrupt handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKernelCodePages": { +"description": "True if kernel code pages that are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKprobeHandler": { +"description": "True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedProcessesInRunqueue": { +"description": "True if unexpected processes in the scheduler run queue are present. Such processes are in the run queue, but not in the process task list.", +"type": "boolean" +}, +"unexpectedReadOnlyDataModification": { +"description": "True if unexpected modifications of kernel read-only data memory are present.", +"type": "boolean" +}, +"unexpectedSystemCallHandler": { +"description": "True if system call handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +} +}, +"type": "object" +}, +"Kubernetes": { +"description": "Kubernetes-related attributes.", +"id": "Kubernetes", +"properties": { +"accessReviews": { +"description": "Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding.", +"items": { +"$ref": "AccessReview" +}, +"type": "array" +}, +"bindings": { +"description": "Provides Kubernetes role binding information for findings that involve [RoleBindings or ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV1Binding" +}, +"type": "array" +}, +"nodePools": { +"description": "GKE [node pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) associated with the finding. This field contains node pool information for each node, when it is available.", +"items": { +"$ref": "NodePool" +}, +"type": "array" +}, +"nodes": { +"description": "Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information.", +"items": { +"$ref": "Node" +}, +"type": "array" +}, +"objects": { +"description": "Kubernetes objects related to the finding.", +"items": { +"$ref": "Object" +}, +"type": "array" +}, +"pods": { +"description": "Kubernetes [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated with the finding. This field contains Pod records for each container that is owned by a Pod.", +"items": { +"$ref": "Pod" +}, +"type": "array" +}, +"roles": { +"description": "Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "Role" +}, +"type": "array" +} +}, +"type": "object" +}, +"Label": { +"description": "Represents a generic name-value label. A label has separate name and value fields to support filtering with the `contains()` function. For more information, see [Filtering on array-type fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).", +"id": "Label", +"properties": { +"name": { +"description": "Name of the label.", +"type": "string" +}, +"value": { +"description": "Value that corresponds to the label's name.", +"type": "string" +} +}, +"type": "object" +}, +"ListAssetsResponse": { +"description": "Response message for listing assets.", +"id": "ListAssetsResponse", +"properties": { +"listAssetsResults": { +"description": "Assets matching the list request.", +"items": { +"$ref": "ListAssetsResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the list request.", +"format": "google-datetime", +"type": "string" +}, +"totalSize": { +"description": "The total number of assets matching the query.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListAssetsResult": { +"description": "Result containing the Asset and its State.", +"id": "ListAssetsResult", +"properties": { +"asset": { +"$ref": "Asset", +"description": "Asset matching the search request." +}, +"stateChange": { +"description": "State change of the asset between the points in time.", +"enum": [ +"UNUSED", +"ADDED", +"REMOVED", +"ACTIVE" +], +"enumDescriptions": [ +"State change is unused, this is the canonical default for this enum.", +"Asset was added between the points in time.", +"Asset was removed between the points in time.", +"Asset was present at both point(s) in time." +], +"type": "string" +} +}, +"type": "object" +}, +"ListAttackPathsResponse": { +"description": "Response message for listing the attack paths for a given simulation or valued resource.", +"id": "ListAttackPathsResponse", +"properties": { +"attackPaths": { +"description": "The attack paths that the attack path simulation identified.", +"items": { +"$ref": "AttackPath" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +} +}, +"type": "object" +}, +"ListBigQueryExportsResponse": { +"description": "Response message for listing BigQuery exports.", +"id": "ListBigQueryExportsResponse", +"properties": { +"bigQueryExports": { +"description": "The BigQuery exports from the specified parent.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1BigQueryExport" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListDescendantEventThreatDetectionCustomModulesResponse": { +"description": "Response for listing current and descendant resident Event Threat Detection custom modules.", +"id": "ListDescendantEventThreatDetectionCustomModulesResponse", +"properties": { +"eventThreatDetectionCustomModules": { +"description": "Custom modules belonging to the requested parent.", +"items": { +"$ref": "EventThreatDetectionCustomModule" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListDescendantSecurityHealthAnalyticsCustomModulesResponse": { +"description": "Response message for listing descendant Security Health Analytics custom modules.", +"id": "ListDescendantSecurityHealthAnalyticsCustomModulesResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there may be more custom modules to be returned.", +"type": "string" +}, +"securityHealthAnalyticsCustomModules": { +"description": "Custom modules belonging to the requested parent and its descendants.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListEffectiveEventThreatDetectionCustomModulesResponse": { +"description": "Response for listing EffectiveEventThreatDetectionCustomModules.", +"id": "ListEffectiveEventThreatDetectionCustomModulesResponse", +"properties": { +"effectiveEventThreatDetectionCustomModules": { +"description": "Effective custom modules belonging to the requested parent.", +"items": { +"$ref": "EffectiveEventThreatDetectionCustomModule" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListEffectiveSecurityHealthAnalyticsCustomModulesResponse": { +"description": "Response message for listing effective Security Health Analytics custom modules.", +"id": "ListEffectiveSecurityHealthAnalyticsCustomModulesResponse", +"properties": { +"effectiveSecurityHealthAnalyticsCustomModules": { +"description": "Effective custom modules belonging to the requested parent.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule" +}, +"type": "array" +}, +"nextPageToken": { +"description": "If not empty, indicates that there may be more effective custom modules to be returned.", +"type": "string" +} +}, +"type": "object" +}, +"ListEventThreatDetectionCustomModulesResponse": { +"description": "Response for listing Event Threat Detection custom modules.", +"id": "ListEventThreatDetectionCustomModulesResponse", +"properties": { +"eventThreatDetectionCustomModules": { +"description": "Custom modules belonging to the requested parent.", +"items": { +"$ref": "EventThreatDetectionCustomModule" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListFindingsResponse": { +"description": "Response message for listing findings.", +"id": "ListFindingsResponse", +"properties": { +"listFindingsResults": { +"description": "Findings matching the list request.", +"items": { +"$ref": "ListFindingsResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the list request.", +"format": "google-datetime", +"type": "string" +}, +"totalSize": { +"description": "The total number of findings matching the query.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListFindingsResult": { +"description": "Result containing the Finding and its StateChange.", +"id": "ListFindingsResult", +"properties": { +"finding": { +"$ref": "Finding", +"description": "Finding matching the search request." +}, +"resource": { +"$ref": "Resource", +"description": "Output only. Resource that is associated with this finding.", +"readOnly": true +}, +"stateChange": { +"description": "State change of the finding between the points in time.", +"enum": [ +"UNUSED", +"CHANGED", +"UNCHANGED", +"ADDED", +"REMOVED" +], +"enumDescriptions": [ +"State change is unused, this is the canonical default for this enum.", +"The finding has changed state in some way between the points in time and existed at both points.", +"The finding has not changed state between the points in time and existed at both points.", +"The finding was created between the points in time.", +"The finding at timestamp does not match the filter specified, but it did at timestamp - compare_duration." +], +"type": "string" +} +}, +"type": "object" +}, +"ListMuteConfigsResponse": { +"description": "Response message for listing mute configs.", +"id": "ListMuteConfigsResponse", +"properties": { +"muteConfigs": { +"description": "The mute configs from the specified parent.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1MuteConfig" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListNotificationConfigsResponse": { +"description": "Response message for listing notification configs.", +"id": "ListNotificationConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"notificationConfigs": { +"description": "Notification configs belonging to the requested parent.", +"items": { +"$ref": "NotificationConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListResourceValueConfigsResponse": { +"description": "Response message to list resource value configs", +"id": "ListResourceValueConfigsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is empty, there are no subsequent pages.", +"type": "string" +}, +"resourceValueConfigs": { +"description": "The resource value configs from the specified parent.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1ResourceValueConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSecurityHealthAnalyticsCustomModulesResponse": { +"description": "Response message for listing Security Health Analytics custom modules.", +"id": "ListSecurityHealthAnalyticsCustomModulesResponse", +"properties": { +"nextPageToken": { +"description": "If not empty, indicates that there may be more custom modules to be returned.", +"type": "string" +}, +"securityHealthAnalyticsCustomModules": { +"description": "Custom modules belonging to the requested parent.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSourcesResponse": { +"description": "Response message for listing sources.", +"id": "ListSourcesResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"sources": { +"description": "Sources belonging to the requested parent.", +"items": { +"$ref": "Source" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListValuedResourcesResponse": { +"description": "Response message for listing the valued resources for a given simulation.", +"id": "ListValuedResourcesResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"totalSize": { +"description": "The estimated total number of results matching the query.", +"format": "int32", +"type": "integer" +}, +"valuedResources": { +"description": "The valued resources that the attack path simulation identified.", +"items": { +"$ref": "ValuedResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoadBalancer": { +"description": "Contains information related to the load balancer associated with the finding.", +"id": "LoadBalancer", +"properties": { +"name": { +"description": "The name of the load balancer associated with the finding.", +"type": "string" +} +}, +"type": "object" +}, +"LogEntry": { +"description": "An individual entry in a log.", +"id": "LogEntry", +"properties": { +"cloudLoggingEntry": { +"$ref": "CloudLoggingEntry", +"description": "An individual entry in a log stored in Cloud Logging." +} +}, +"type": "object" +}, +"MemoryHashSignature": { +"description": "A signature corresponding to memory page hashes.", +"id": "MemoryHashSignature", +"properties": { +"binaryFamily": { +"description": "The binary family.", +"type": "string" +}, +"detections": { +"description": "The list of memory hash detections contributing to the binary family match.", +"items": { +"$ref": "Detection" +}, +"type": "array" +} +}, +"type": "object" +}, +"MitreAttack": { +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org", +"id": "MitreAttack", +"properties": { +"additionalTactics": { +"description": "Additional MITRE ATT&CK tactics related to this finding, if any.", +"items": { +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"type": "array" +}, +"additionalTechniques": { +"description": "Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques.", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"primaryTactic": { +"description": "The MITRE ATT&CK tactic most closely represented by this finding, if any.", +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"primaryTechniques": { +"description": "The MITRE ATT&CK technique most closely represented by this finding, if any. primary_techniques is a repeated field because there are multiple levels of MITRE ATT&CK techniques. If the technique most closely represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The MITRE ATT&CK version referenced by the above fields. E.g. \"8\".", +"type": "string" +} +}, +"type": "object" +}, +"Node": { +"description": "Kubernetes nodes associated with the finding.", +"id": "Node", +"properties": { +"name": { +"description": "[Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node.", +"type": "string" +} +}, +"type": "object" +}, +"NodePool": { +"description": "Provides GKE node pool information.", +"id": "NodePool", +"properties": { +"name": { +"description": "Kubernetes node pool name.", +"type": "string" +}, +"nodes": { +"description": "Nodes associated with the finding.", +"items": { +"$ref": "Node" +}, +"type": "array" +} +}, +"type": "object" +}, +"Notebook": { +"description": "Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise notebook](https://cloud.google.com/colab/docs/introduction) file, that is associated with a finding.", +"id": "Notebook", +"properties": { +"lastAuthor": { +"description": "The user ID of the latest author to modify the notebook.", +"type": "string" +}, +"name": { +"description": "The name of the notebook.", +"type": "string" +}, +"notebookUpdateTime": { +"description": "The most recent time the notebook was updated.", +"format": "google-datetime", +"type": "string" +}, +"service": { +"description": "The source notebook service, for example, \"Colab Enterprise\".", +"type": "string" +} +}, +"type": "object" +}, +"NotificationConfig": { +"description": "Cloud Security Command Center (Cloud SCC) notification configs. A notification config is a Cloud SCC resource that contains the configuration to send notifications for create/update events of findings, assets and etc.", +"id": "NotificationConfig", +"properties": { +"description": { +"description": "The description of the notification config (max of 1024 characters).", +"type": "string" +}, +"name": { +"description": "The relative resource name of this notification config. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/notificationConfigs/notify_public_bucket\", \"folders/{folder_id}/notificationConfigs/notify_public_bucket\", or \"projects/{project_id}/notificationConfigs/notify_public_bucket\".", +"type": "string" +}, +"pubsubTopic": { +"description": "The Pub/Sub topic to send notifications to. Its format is \"projects/[project_id]/topics/[topic]\".", +"type": "string" +}, +"serviceAccount": { +"description": "Output only. The service account that needs \"pubsub.topics.publish\" permission to publish to the Pub/Sub topic.", +"readOnly": true, +"type": "string" +}, +"streamingConfig": { +"$ref": "StreamingConfig", +"description": "The config for triggering streaming-based notifications." +} +}, +"type": "object" +}, +"Object": { +"description": "Kubernetes object related to the finding, uniquely identified by GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or AccessReview.", +"id": "Object", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"group": { +"description": "Kubernetes object group, such as \"policy.k8s.io/v1\".", +"type": "string" +}, +"kind": { +"description": "Kubernetes object kind, such as \"Namespace\".", +"type": "string" +}, +"name": { +"description": "Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.", +"type": "string" +}, +"ns": { +"description": "Kubernetes object namespace. Must be a valid DNS label. Named \"ns\" to avoid collision with C++ namespace keyword. For details see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OrgPolicy": { +"description": "Contains information about the org policies associated with the finding.", +"id": "OrgPolicy", +"properties": { +"name": { +"description": "The resource name of the org policy. Example: \"organizations/{organization_id}/policies/{constraint_name}\"", +"type": "string" +} +}, +"type": "object" +}, +"OrganizationSettings": { +"description": "User specified settings that are attached to the Security Command Center organization.", +"id": "OrganizationSettings", +"properties": { +"assetDiscoveryConfig": { +"$ref": "AssetDiscoveryConfig", +"description": "The configuration used for Asset Discovery runs." +}, +"enableAssetDiscovery": { +"description": "A flag that indicates if Asset Discovery should be enabled. If the flag is set to `true`, then discovery of assets will occur. If it is set to `false`, all historical assets will remain, but discovery of future assets will not occur.", +"type": "boolean" +}, +"name": { +"description": "The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/organizationSettings\".", +"type": "string" +} +}, +"type": "object" +}, +"Package": { +"description": "Package is a generic definition of a package.", +"id": "Package", +"properties": { +"cpeUri": { +"description": "The CPE URI where the vulnerability was detected.", +"type": "string" +}, +"packageName": { +"description": "The name of the package where the vulnerability was detected.", +"type": "string" +}, +"packageType": { +"description": "Type of package, for example, os, maven, or go.", +"type": "string" +}, +"packageVersion": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"PathNodeAssociatedFinding": { +"description": "A finding that is associated with this node in the attack path.", +"id": "PathNodeAssociatedFinding", +"properties": { +"canonicalFinding": { +"description": "Canonical name of the associated findings. Example: organizations/123/sources/456/findings/789", +"type": "string" +}, +"findingCategory": { +"description": "The additional taxonomy group within findings from a given source.", +"type": "string" +}, +"name": { +"description": "Full resource name of the finding.", +"type": "string" +} +}, +"type": "object" +}, +"Pod": { +"description": "A Kubernetes Pod.", +"id": "Pod", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"labels": { +"description": "Pod labels. For Kubernetes containers, these are applied to the container.", +"items": { +"$ref": "Label" +}, +"type": "array" +}, +"name": { +"description": "Kubernetes Pod name.", +"type": "string" +}, +"ns": { +"description": "Kubernetes Pod namespace.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PolicyDriftDetails": { +"description": "The policy field that violates the deployed posture and its expected and detected values.", +"id": "PolicyDriftDetails", +"properties": { +"detectedValue": { +"description": "The detected value that violates the deployed posture, for example, `false` or `allowed_values={\"projects/22831892\"}`.", +"type": "string" +}, +"expectedValue": { +"description": "The value of this field that was configured in a posture, for example, `true` or `allowed_values={\"projects/29831892\"}`.", +"type": "string" +}, +"field": { +"description": "The name of the updated field, for example constraint.implementation.policy_rules[0].enforce", +"type": "string" +} +}, +"type": "object" +}, +"Position": { +"description": "A position in the uploaded text version of a module.", +"id": "Position", +"properties": { +"columnNumber": { +"format": "int32", +"type": "integer" +}, +"lineNumber": { +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Process": { +"description": "Represents an operating system process.", +"id": "Process", +"properties": { +"args": { +"description": "Process arguments as JSON encoded strings.", +"items": { +"type": "string" +}, +"type": "array" +}, +"argumentsTruncated": { +"description": "True if `args` is incomplete.", +"type": "boolean" +}, +"binary": { +"$ref": "File", +"description": "File information for the process executable." +}, +"envVariables": { +"description": "Process environment variables.", +"items": { +"$ref": "EnvironmentVariable" +}, +"type": "array" +}, +"envVariablesTruncated": { +"description": "True if `env_variables` is incomplete.", +"type": "boolean" +}, +"libraries": { +"description": "File information for libraries loaded by the process.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"name": { +"description": "The process name, as displayed in utilities like `top` and `ps`. This name can be accessed through `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.", +"type": "string" +}, +"parentPid": { +"description": "The parent process ID.", +"format": "int64", +"type": "string" +}, +"pid": { +"description": "The process ID.", +"format": "int64", +"type": "string" +}, +"script": { +"$ref": "File", +"description": "When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter." +} +}, +"type": "object" +}, +"ProcessSignature": { +"description": "Indicates what signature matched this process.", +"id": "ProcessSignature", +"properties": { +"memoryHashSignature": { +"$ref": "MemoryHashSignature", +"description": "Signature indicating that a binary family was matched." +}, +"signatureType": { +"description": "Describes the type of resource associated with the signature.", +"enum": [ +"SIGNATURE_TYPE_UNSPECIFIED", +"SIGNATURE_TYPE_PROCESS", +"SIGNATURE_TYPE_FILE" +], +"enumDescriptions": [ +"The default signature type.", +"Used for signatures concerning processes.", +"Used for signatures concerning disks." +], +"type": "string" +}, +"yaraRuleSignature": { +"$ref": "YaraRuleSignature", +"description": "Signature indicating that a YARA rule was matched." +} +}, +"type": "object" +}, +"Reference": { +"description": "Additional Links", +"id": "Reference", +"properties": { +"source": { +"description": "Source of the reference e.g. NVD", +"type": "string" +}, +"uri": { +"description": "Uri for the mentioned source e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527.", +"type": "string" +} +}, +"type": "object" +}, +"Requests": { +"description": "Information about the requests relevant to the finding.", +"id": "Requests", +"properties": { +"longTermAllowed": { +"description": "Allowed RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"longTermDenied": { +"description": "Denied RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"ratio": { +"description": "For 'Increasing deny ratio', the ratio is the denied traffic divided by the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed traffic in the short term divided by allowed traffic in the long term.", +"format": "double", +"type": "number" +}, +"shortTermAllowed": { +"description": "Allowed RPS (requests per second) in the short term.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Resource": { +"description": "Information related to the Google Cloud resource that is associated with this finding.", +"id": "Resource", +"properties": { +"awsMetadata": { +"$ref": "AwsMetadata", +"description": "The AWS metadata associated with the finding." +}, +"cloudProvider": { +"description": "Indicates which cloud provider the finding is from.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"displayName": { +"description": "The human readable name of the resource.", +"type": "string" +}, +"folders": { +"description": "Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "Folder" +}, +"type": "array" +}, +"location": { +"description": "The region or location of the service (if applicable).", +"type": "string" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"organization": { +"description": "Indicates which organization / tenant the finding is for.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"parentName": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project ID that the resource belongs to.", +"type": "string" +}, +"projectName": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"resourcePath": { +"$ref": "ResourcePath", +"description": "Provides the path to the resource within the resource hierarchy." +}, +"resourcePathString": { +"description": "A string representation of the resource path. For GCP, it has the format of: org/{organization_id}/folder/{folder_id}/folder/{folder_id}/project/{project_id} where there can be any number of folders. For AWS, it has the format of: org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of: mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", +"type": "string" +}, +"service": { +"description": "The service or resource provider associated with the resource.", +"type": "string" +}, +"type": { +"description": "The full resource type of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"ResourcePath": { +"description": "Represents the path of resources leading up to the resource this finding is about.", +"id": "ResourcePath", +"properties": { +"nodes": { +"description": "The list of nodes that make the up resource path, ordered from lowest level to highest level.", +"items": { +"$ref": "ResourcePathNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"ResourcePathNode": { +"description": "A node within the resource path. Each node represents a resource within the resource hierarchy.", +"id": "ResourcePathNode", +"properties": { +"displayName": { +"description": "The display name of the resource this node represents.", +"type": "string" +}, +"id": { +"description": "The ID of the resource this node represents.", +"type": "string" +}, +"nodeType": { +"description": "The type of resource this node represents.", +"enum": [ +"RESOURCE_PATH_NODE_TYPE_UNSPECIFIED", +"GCP_ORGANIZATION", +"GCP_FOLDER", +"GCP_PROJECT", +"AWS_ORGANIZATION", +"AWS_ORGANIZATIONAL_UNIT", +"AWS_ACCOUNT", +"AZURE_MANAGEMENT_GROUP", +"AZURE_SUBSCRIPTION", +"AZURE_RESOURCE_GROUP" +], +"enumDescriptions": [ +"Node type is unspecified.", +"The node represents a GCP organization.", +"The node represents a GCP folder.", +"The node represents a GCP project.", +"The node represents an AWS organization.", +"The node represents an AWS organizational unit.", +"The node represents an AWS account.", +"The node represents an Azure management group.", +"The node represents an Azure subscription.", +"The node represents an Azure resource group." +], +"type": "string" +} +}, +"type": "object" +}, +"ResourceValueConfigMetadata": { +"description": "Metadata about a ResourceValueConfig. For example, id and name.", +"id": "ResourceValueConfigMetadata", +"properties": { +"name": { +"description": "Resource value config name", +"type": "string" +} +}, +"type": "object" +}, +"Role": { +"description": "Kubernetes Role or ClusterRole.", +"id": "Role", +"properties": { +"kind": { +"description": "Role type.", +"enum": [ +"KIND_UNSPECIFIED", +"ROLE", +"CLUSTER_ROLE" +], +"enumDescriptions": [ +"Role type is not specified.", +"Kubernetes Role.", +"Kubernetes ClusterRole." +], +"type": "string" +}, +"name": { +"description": "Role name.", +"type": "string" +}, +"ns": { +"description": "Role namespace.", +"type": "string" +} +}, +"type": "object" +}, +"RunAssetDiscoveryRequest": { +"description": "Request message for running asset discovery for an organization.", +"id": "RunAssetDiscoveryRequest", +"properties": {}, +"type": "object" +}, +"SecurityBulletin": { +"description": "SecurityBulletin are notifications of vulnerabilities of Google products.", +"id": "SecurityBulletin", +"properties": { +"bulletinId": { +"description": "ID of the bulletin corresponding to the vulnerability.", +"type": "string" +}, +"submissionTime": { +"description": "Submission time of this Security Bulletin.", +"format": "google-datetime", +"type": "string" +}, +"suggestedUpgradeVersion": { +"description": "This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0", +"type": "string" +} +}, +"type": "object" +}, +"SecurityCenterProperties": { +"description": "Security Command Center managed properties. These properties are managed by Security Command Center and cannot be modified by the user.", +"id": "SecurityCenterProperties", +"properties": { +"folders": { +"description": "Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "Folder" +}, +"type": "array" +}, +"resourceDisplayName": { +"description": "The user defined display name for this resource.", +"type": "string" +}, +"resourceName": { +"description": "The full resource name of the Google Cloud resource this asset represents. This field is immutable after create time. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceOwners": { +"description": "Owners of the Google Cloud resource.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resourceParent": { +"description": "The full resource name of the immediate parent of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceParentDisplayName": { +"description": "The user defined display name for the parent of this resource.", +"type": "string" +}, +"resourceProject": { +"description": "The full resource name of the project the resource belongs to. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceProjectDisplayName": { +"description": "The user defined display name for the project of this resource.", +"type": "string" +}, +"resourceType": { +"description": "The type of the Google Cloud resource. Examples include: APPLICATION, PROJECT, and ORGANIZATION. This is a case insensitive field defined by Security Command Center and/or the producer of the resource and is immutable after create time.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"folders/{folder_id}/assets/{asset_id}/securityMarks\" \"projects/{project_number}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks\"", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"type": "string" +} +}, +"type": "object" +}, +"SecurityPolicy": { +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding.", +"id": "SecurityPolicy", +"properties": { +"name": { +"description": "The name of the Google Cloud Armor security policy, for example, \"my-security-policy\".", +"type": "string" +}, +"preview": { +"description": "Whether or not the associated rule or policy is in preview mode.", +"type": "boolean" +}, +"type": { +"description": "The type of Google Cloud Armor security policy for example, \u2018backend security policy\u2019, \u2018edge security policy\u2019, \u2018network edge security policy\u2019, or \u2018always-on DDoS protection\u2019.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityPosture": { +"description": "Represents a posture that is deployed on Google Cloud by the Security Command Center Posture Management service. A posture contains one or more policy sets. A policy set is a group of policies that enforce a set of security rules on Google Cloud.", +"id": "SecurityPosture", +"properties": { +"changedPolicy": { +"description": "The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`.", +"type": "string" +}, +"name": { +"description": "Name of the posture, for example, `CIS-Posture`.", +"type": "string" +}, +"policy": { +"description": "The ID of the updated policy, for example, `compute-policy-1`.", +"type": "string" +}, +"policyDriftDetails": { +"description": "The details about a change in an updated policy that violates the deployed posture.", +"items": { +"$ref": "PolicyDriftDetails" +}, +"type": "array" +}, +"policySet": { +"description": "The name of the updated policyset, for example, `cis-policyset`.", +"type": "string" +}, +"postureDeployment": { +"description": "The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.", +"type": "string" +}, +"postureDeploymentResource": { +"description": "The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`.", +"type": "string" +}, +"revisionId": { +"description": "The version of the posture, for example, `c7cfa2a8`.", +"type": "string" +} +}, +"type": "object" +}, +"ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "ServiceAccountDelegationInfo", +"properties": { +"principalEmail": { +"description": "The email address of a Google account.", +"type": "string" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +} +}, +"type": "object" +}, +"SetFindingStateRequest": { +"description": "Request message for updating a finding's state.", +"id": "SetFindingStateRequest", +"properties": { +"startTime": { +"description": "Required. The time at which the updated state takes effect.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Required. The desired State of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"SetMuteRequest": { +"description": "Request message for updating a finding's mute status.", +"id": "SetMuteRequest", +"properties": { +"mute": { +"description": "Required. The desired state of the Mute.", +"enum": [ +"MUTE_UNSPECIFIED", +"MUTED", +"UNMUTED", +"UNDEFINED" +], +"enumDescriptions": [ +"Unspecified.", +"Finding has been muted.", +"Finding has been unmuted.", +"Finding has never been muted/unmuted." +], +"type": "string" +} +}, +"type": "object" +}, +"SimulateSecurityHealthAnalyticsCustomModuleRequest": { +"description": "Request message to simulate a CustomConfig against a given test resource. Maximum size of the request is 4 MB by default.", +"id": "SimulateSecurityHealthAnalyticsCustomModuleRequest", +"properties": { +"customConfig": { +"$ref": "GoogleCloudSecuritycenterV1CustomConfig", +"description": "Required. The custom configuration that you need to test." +}, +"resource": { +"$ref": "SimulatedResource", +"description": "Required. Resource data to simulate custom module against." +} +}, +"type": "object" +}, +"SimulateSecurityHealthAnalyticsCustomModuleResponse": { +"description": "Response message for simulating a `SecurityHealthAnalyticsCustomModule` against a given resource.", +"id": "SimulateSecurityHealthAnalyticsCustomModuleResponse", +"properties": { +"result": { +"$ref": "SimulatedResult", +"description": "Result for test case in the corresponding request." +} +}, +"type": "object" +}, +"SimulatedResource": { +"description": "Manually constructed resource name. If the custom module evaluates against only the resource data, you can omit the `iam_policy_data` field. If it evaluates only the `iam_policy_data` field, you can omit the resource data.", +"id": "SimulatedResource", +"properties": { +"iamPolicyData": { +"$ref": "Policy", +"description": "Optional. A representation of the IAM policy." +}, +"resourceData": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Optional. A representation of the Google Cloud resource. Should match the Google Cloud resource JSON format.", +"type": "object" +}, +"resourceType": { +"description": "Required. The type of the resource, for example, `compute.googleapis.com/Disk`.", +"type": "string" +} +}, +"type": "object" +}, +"SimulatedResult": { +"description": "Possible test result.", +"id": "SimulatedResult", +"properties": { +"error": { +"$ref": "Status", +"description": "Error encountered during the test." +}, +"finding": { +"$ref": "Finding", +"description": "Finding that would be published for the test case, if a violation is detected." +}, +"noViolation": { +"$ref": "Empty", +"description": "Indicates that the test case does not trigger any violation." +} +}, +"type": "object" +}, +"Simulation": { +"description": "Attack path simulation", +"id": "Simulation", +"properties": { +"cloudProvider": { +"description": "Indicates which cloud provider was used in this simulation.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Time simulation was created", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Full resource name of the Simulation: organizations/123/simulations/456", +"type": "string" +}, +"resourceValueConfigsMetadata": { +"description": "Resource value configurations' metadata used in this simulation. Maximum of 100.", +"items": { +"$ref": "ResourceValueConfigMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"Source": { +"description": "Security Command Center finding source. A finding source is an entity or a mechanism that can produce a finding. A source is like a container of findings that come from the same scanner, logger, monitor, and other tools.", +"id": "Source", +"properties": { +"canonicalName": { +"description": "The canonical name of the finding source. It's either \"organizations/{organization_id}/sources/{source_id}\", \"folders/{folder_id}/sources/{source_id}\", or \"projects/{project_number}/sources/{source_id}\", depending on the closest CRM ancestor of the resource associated with the finding.", +"type": "string" +}, +"description": { +"description": "The description of the source (max of 1024 characters). Example: \"Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated or insecure libraries.\"", +"type": "string" +}, +"displayName": { +"description": "The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive).", +"type": "string" +}, +"name": { +"description": "The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StreamingConfig": { +"description": "The config for streaming-based notifications, which send each event as soon as it is detected.", +"id": "StreamingConfig", +"properties": { +"filter": { +"description": "Expression that defines the filter to apply across create/update events of assets or findings as specified by the event type. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +} +}, +"type": "object" +}, +"Subject": { +"description": "Represents a Kubernetes subject.", +"id": "Subject", +"properties": { +"kind": { +"description": "Authentication type for the subject.", +"enum": [ +"AUTH_TYPE_UNSPECIFIED", +"USER", +"SERVICEACCOUNT", +"GROUP" +], +"enumDescriptions": [ +"Authentication is not specified.", +"User with valid certificate.", +"Users managed by Kubernetes API with credentials stored as secrets.", +"Collection of users." +], +"type": "string" +}, +"name": { +"description": "Name for the subject.", +"type": "string" +}, +"ns": { +"description": "Namespace for the subject.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TicketInfo": { +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding.", +"id": "TicketInfo", +"properties": { +"assignee": { +"description": "The assignee of the ticket in the ticket system.", +"type": "string" +}, +"description": { +"description": "The description of the ticket in the ticket system.", +"type": "string" +}, +"id": { +"description": "The identifier of the ticket in the ticket system.", +"type": "string" +}, +"status": { +"description": "The latest status of the ticket, as reported by the ticket system.", +"type": "string" +}, +"updateTime": { +"description": "The time when the ticket was last updated, as reported by the ticket system.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "The link to the ticket in the ticket system.", +"type": "string" +} +}, +"type": "object" +}, +"ValidateEventThreatDetectionCustomModuleRequest": { +"description": "Request to validate an Event Threat Detection custom module.", +"id": "ValidateEventThreatDetectionCustomModuleRequest", +"properties": { +"rawText": { +"description": "Required. The raw text of the module's contents. Used to generate error messages.", +"type": "string" +}, +"type": { +"description": "Required. The type of the module (e.g. CONFIGURABLE_BAD_IP).", +"type": "string" +} +}, +"type": "object" +}, +"ValidateEventThreatDetectionCustomModuleResponse": { +"description": "Response to validating an Event Threat Detection custom module.", +"id": "ValidateEventThreatDetectionCustomModuleResponse", +"properties": { +"errors": { +"$ref": "CustomModuleValidationErrors", +"description": "A list of errors returned by the validator. If the list is empty, there were no errors." +} +}, +"type": "object" +}, +"ValuedResource": { +"description": "A resource that is determined to have value to a user's system", +"id": "ValuedResource", +"properties": { +"displayName": { +"description": "Human-readable name of the valued resource.", +"type": "string" +}, +"exposedScore": { +"description": "Exposed score for this valued resource. A value of 0 means no exposure was detected exposure.", +"format": "double", +"type": "number" +}, +"name": { +"description": "Valued resource name, for example, e.g.: `organizations/123/simulations/456/valuedResources/789`", +"type": "string" +}, +"resource": { +"description": "The [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name) of the valued resource.", +"type": "string" +}, +"resourceType": { +"description": "The [resource type](https://cloud.google.com/asset-inventory/docs/supported-asset-types) of the valued resource.", +"type": "string" +}, +"resourceValue": { +"description": "How valuable this resource is.", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"RESOURCE_VALUE_LOW", +"RESOURCE_VALUE_MEDIUM", +"RESOURCE_VALUE_HIGH" +], +"enumDescriptions": [ +"The resource value isn't specified.", +"This is a low-value resource.", +"This is a medium-value resource.", +"This is a high-value resource." +], +"type": "string" +}, +"resourceValueConfigsUsed": { +"description": "List of resource value configurations' metadata used to determine the value of this resource. Maximum of 100.", +"items": { +"$ref": "ResourceValueConfigMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"Vulnerability": { +"description": "Refers to common vulnerability fields e.g. cve, cvss, cwe etc.", +"id": "Vulnerability", +"properties": { +"cve": { +"$ref": "Cve", +"description": "CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +}, +"fixedPackage": { +"$ref": "Package", +"description": "The fixed package is relevant to the finding." +}, +"offendingPackage": { +"$ref": "Package", +"description": "The offending package is relevant to the finding." +}, +"securityBulletin": { +"$ref": "SecurityBulletin", +"description": "The security bulletin is relevant to this finding." +} +}, +"type": "object" +}, +"VulnerabilityCountBySeverity": { +"description": "Vulnerability count by severity.", +"id": "VulnerabilityCountBySeverity", +"properties": { +"severityToFindingCount": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Key is the Severity enum.", +"type": "object" +} +}, +"type": "object" +}, +"VulnerabilitySnapshot": { +"description": "Result containing the properties and count of a VulnerabilitySnapshot request.", +"id": "VulnerabilitySnapshot", +"properties": { +"cloudProvider": { +"description": "The cloud provider for the vulnerability snapshot.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"findingCount": { +"$ref": "VulnerabilityCountBySeverity", +"description": "The vulnerability count by severity." +}, +"name": { +"description": "Identifier. The vulnerability snapshot name. Format: //locations//vulnerabilitySnapshots/", +"type": "string" +}, +"snapshotTime": { +"description": "The time that the snapshot was taken.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"YaraRuleSignature": { +"description": "A signature corresponding to a YARA rule.", +"id": "YaraRuleSignature", +"properties": { +"yaraRule": { +"description": "The name of the YARA rule.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Security Command Center API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..19a0d12973d511f9bf8aaf8b723201a68f587cc7 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1beta1.json @@ -0,0 +1,7820 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://securitycenter.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Security Command Center", +"description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/security-command-center", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "securitycenter:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://securitycenter.mtls.googleapis.com/", +"name": "securitycenter", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"organizations": { +"methods": { +"getOrganizationSettings": { +"description": "Gets the settings for an organization.", +"flatPath": "v1beta1/organizations/{organizationsId}/organizationSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getOrganizationSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the organization to get organization settings for. Its format is \"organizations/[organization_id]/organizationSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/organizationSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "OrganizationSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateOrganizationSettings": { +"description": "Updates an organization's settings.", +"flatPath": "v1beta1/organizations/{organizationsId}/organizationSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateOrganizationSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/organizationSettings\".", +"location": "path", +"pattern": "^organizations/[^/]+/organizationSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the settings resource.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "OrganizationSettings" +}, +"response": { +"$ref": "OrganizationSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"assets": { +"methods": { +"group": { +"description": "Filters an organization's assets and groups them by their specified properties.", +"flatPath": "v1beta1/organizations/{organizationsId}/assets:group", +"httpMethod": "POST", +"id": "securitycenter.organizations.assets.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the organization to groupBy. Its format is \"organizations/[organization_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/assets:group", +"request": { +"$ref": "GroupAssetsRequest" +}, +"response": { +"$ref": "GroupAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists an organization's assets.", +"flatPath": "v1beta1/organizations/{organizationsId}/assets", +"httpMethod": "GET", +"id": "securitycenter.organizations.assets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"compareDuration": { +"description": "When compare_duration is set, the ListAssetResult's \"state\" attribute is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present before compare_duration, but present at read_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at read_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and read_time. If compare_duration is not specified, then the only possible state is \"UNUSED\", which indicates that the asset is present at read_time.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"fieldMask": { +"description": "Optional. A field mask to specify the ListAssetsResult fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are not supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. For example, `resource_properties.size = 100` is a valid filter string.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,resource_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,resource_properties.a_property\" and \" name desc , resource_properties.a_property \" are equivalent.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListAssetsResponse`; indicates that this is a continuation of a prior `ListAssets` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the organization assets should belong to. Its format is \"organizations/[organization_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/assets", +"response": { +"$ref": "ListAssetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"runDiscovery": { +"description": "Runs asset discovery. The discovery is tracked with a long-running operation. This API can only be called with limited frequency for an organization. If it is called too frequently the caller will receive a TOO_MANY_REQUESTS error.", +"flatPath": "v1beta1/organizations/{organizationsId}/assets:runDiscovery", +"httpMethod": "POST", +"id": "securitycenter.organizations.assets.runDiscovery", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the organization to run asset discovery for. Its format is \"organizations/[organization_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/assets:runDiscovery", +"request": { +"$ref": "RunAssetDiscoveryRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1beta1/organizations/{organizationsId}/assets/{assetsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.assets.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^organizations/[^/]+/assets/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1beta1SecurityMarks" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1beta1SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta1/organizations/{organizationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "securitycenter.organizations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^organizations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta1/organizations/{organizationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "securitycenter.organizations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^organizations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/organizations/{organizationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^organizations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/organizations/{organizationsId}/operations", +"httpMethod": "GET", +"id": "securitycenter.organizations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^organizations/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"sources": { +"methods": { +"create": { +"description": "Creates a source.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the new source's parent. Its format should be \"organizations/[organization_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/sources", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a source.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}", +"httpMethod": "GET", +"id": "securitycenter.organizations.sources.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Relative resource name of the source. Its format is \"organizations/[organization_id]/source/[source_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy on the specified Source.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}:getIamPolicy", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all sources belonging to an organization.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources", +"httpMethod": "GET", +"id": "securitycenter.organizations.sources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListSourcesResponse`; indicates that this is a continuation of a prior `ListSources` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the parent of sources to list. Its format should be \"organizations/[organization_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/sources", +"response": { +"$ref": "ListSourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a source.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.sources.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}\"", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the source resource.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified Source.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}:setIamPolicy", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns the permissions that a caller has on the specified source.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}:testIamPermissions", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"findings": { +"methods": { +"create": { +"description": "Creates a finding. The corresponding source must exist for finding creation to succeed.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.findings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"findingId": { +"description": "Required. Unique identifier provided by the client within the parent scope. It must be alphanumeric and less than or equal to 32 characters and greater than 0 characters in length.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the new finding's parent. Its format should be \"organizations/[organization_id]/sources/[source_id]\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/findings", +"request": { +"$ref": "GoogleCloudSecuritycenterV1beta1Finding" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1beta1Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"group": { +"description": "Filters an organization or source's findings and groups them by their specified properties. To group across all sources provide a `-` as the source id. Example: /v1beta1/organizations/{organization_id}/sources/-/findings", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings:group", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.findings.group", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the source to groupBy. Its format is \"organizations/[organization_id]/sources/[source_id]\". To groupBy across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/findings:group", +"request": { +"$ref": "GroupFindingsRequest" +}, +"response": { +"$ref": "GroupFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists an organization or source's findings. To list across all sources provide a `-` as the source id. Example: /v1beta1/organizations/{organization_id}/sources/-/findings", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings", +"httpMethod": "GET", +"id": "securitycenter.organizations.sources.findings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"fieldMask": { +"description": "Optional. A field mask to specify the Finding fields to be listed in the response. An empty field mask will list all fields.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are not supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. For example, `source_properties.size = 100` is a valid filter string.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Expression that defines what fields and order to use for sorting. The string value should follow SQL syntax: comma separated list of fields. For example: \"name,resource_properties.a_property\". The default sorting order is ascending. To specify descending order for a field, a suffix \" desc\" should be appended to the field name. For example: \"name desc,source_properties.a_property\". Redundant space characters in the syntax are insignificant. \"name desc,source_properties.a_property\" and \" name desc , source_properties.a_property \" are equivalent.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `ListFindingsResponse`; indicates that this is a continuation of a prior `ListFindings` call, and that the system should return the next page of data.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the source the findings belong to. Its format is \"organizations/[organization_id]/sources/[source_id]\". To list across all sources provide a source_id of `-`. For example: organizations/{organization_id}/sources/-", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/findings", +"response": { +"$ref": "ListFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Creates or updates a finding. The corresponding source must exist for a finding creation to succeed.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.sources.findings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\"", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the finding resource. This field should not be specified when creating a finding.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1beta1Finding" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1beta1Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setState": { +"description": "Updates the state of a finding.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}:setState", +"httpMethod": "POST", +"id": "securitycenter.organizations.sources.findings.setState", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The relative resource name of the finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/finding/{finding_id}\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:setState", +"request": { +"$ref": "SetFindingStateRequest" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1beta1Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityMarks": { +"description": "Updates security marks.", +"flatPath": "v1beta1/organizations/{organizationsId}/sources/{sourcesId}/findings/{findingsId}/securityMarks", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.sources.findings.updateSecurityMarks", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"location": "path", +"pattern": "^organizations/[^/]+/sources/[^/]+/findings/[^/]+/securityMarks$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "The time at which the updated SecurityMarks take effect.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "The FieldMask to use when updating the security marks resource.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "GoogleCloudSecuritycenterV1beta1SecurityMarks" +}, +"response": { +"$ref": "GoogleCloudSecuritycenterV1beta1SecurityMarks" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://securitycenter.googleapis.com/", +"schemas": { +"Access": { +"description": "Represents an access event.", +"id": "Access", +"properties": { +"callerIp": { +"description": "Caller's IP address, such as \"1.1.1.1\".", +"type": "string" +}, +"callerIpGeo": { +"$ref": "Geolocation", +"description": "The caller IP's geolocation, which identifies where the call came from." +}, +"methodName": { +"description": "The method that the service account called, e.g. \"SetIamPolicy\".", +"type": "string" +}, +"principalEmail": { +"description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user or a service account acting on behalf of a third party principal making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "A string that represents the principal_subject that is associated with the identity. Unlike `principal_email`, `principal_subject` supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format is `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, still use the legacy format `serviceAccount:{identity pool name}[{subject}]`.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "The identity delegation history of an authenticated service account that made the request. The `serviceAccountDelegationInfo[]` object contains information about the real authorities that try to access Google Cloud resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key that was used to create or exchange credentials when authenticating the service account that made the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\". ", +"type": "string" +}, +"serviceName": { +"description": "This is the API service that the service account made a call to, e.g. \"iam.googleapis.com\"", +"type": "string" +}, +"userAgent": { +"description": "The caller's user agent string associated with the finding.", +"type": "string" +}, +"userAgentFamily": { +"description": "Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application.", +"type": "string" +}, +"userName": { +"description": "A string that represents a username. The username provided depends on the type of the finding and is likely not an IAM principal. For example, this can be a system username if the finding is related to a virtual machine, or it can be an application login username.", +"type": "string" +} +}, +"type": "object" +}, +"AccessReview": { +"description": "Conveys information about a Kubernetes access review (such as one returned by a [`kubectl auth can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) command) that was involved in a finding.", +"id": "AccessReview", +"properties": { +"group": { +"description": "The API group of the resource. \"*\" means all.", +"type": "string" +}, +"name": { +"description": "The name of the resource being requested. Empty means all.", +"type": "string" +}, +"ns": { +"description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", +"type": "string" +}, +"resource": { +"description": "The optional resource type requested. \"*\" means all.", +"type": "string" +}, +"subresource": { +"description": "The optional subresource type.", +"type": "string" +}, +"verb": { +"description": "A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. \"*\" means all.", +"type": "string" +}, +"version": { +"description": "The API version of the resource. \"*\" means all.", +"type": "string" +} +}, +"type": "object" +}, +"AdaptiveProtection": { +"description": "Information about [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).", +"id": "AdaptiveProtection", +"properties": { +"confidence": { +"description": "A score of 0 means that there is low confidence that the detected event is an actual attack. A score of 1 means that there is high confidence that the detected event is an attack. See the [Adaptive Protection documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) for further explanation.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Application": { +"description": "Represents an application associated with a finding.", +"id": "Application", +"properties": { +"baseUri": { +"description": "The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`.", +"type": "string" +}, +"fullUri": { +"description": "The full URI with payload that can be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`.", +"type": "string" +} +}, +"type": "object" +}, +"Asset": { +"description": "Security Command Center representation of a Google Cloud resource. The Asset is a Security Command Center resource that captures information about a single Google Cloud resource. All modifications to an Asset are only within the context of Security Command Center and don't affect the referenced Google Cloud resource.", +"id": "Asset", +"properties": { +"createTime": { +"description": "The time at which the asset was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The relative resource name of this asset. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/assets/{asset_id}\".", +"type": "string" +}, +"resourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Resource managed properties. These properties are managed and defined by the Google Cloud resource and cannot be modified by the user.", +"type": "object" +}, +"securityCenterProperties": { +"$ref": "SecurityCenterProperties", +"description": "Security Command Center managed properties. These properties are managed by Security Command Center and cannot be modified by the user." +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV1beta1SecurityMarks", +"description": "User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the asset." +}, +"updateTime": { +"description": "The time at which the asset was last updated, added, or deleted in Security Command Center.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"AssetDiscoveryConfig": { +"description": "The configuration used for Asset Discovery runs.", +"id": "AssetDiscoveryConfig", +"properties": { +"inclusionMode": { +"description": "The mode to use for filtering asset discovery.", +"enum": [ +"INCLUSION_MODE_UNSPECIFIED", +"INCLUDE_ONLY", +"EXCLUDE" +], +"enumDescriptions": [ +"Unspecified. Setting the mode with this value will disable inclusion/exclusion filtering for Asset Discovery.", +"Asset Discovery will capture only the resources within the projects specified. All other resources will be ignored.", +"Asset Discovery will ignore all resources under the projects specified. All other resources will be retrieved." +], +"type": "string" +}, +"projectIds": { +"description": "The project ids to use for filtering asset discovery.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Attack": { +"description": "Information about DDoS attack volume and classification.", +"id": "Attack", +"properties": { +"classification": { +"description": "Type of attack, for example, \u2018SYN-flood\u2019, \u2018NTP-udp\u2019, or \u2018CHARGEN-udp\u2019.", +"type": "string" +}, +"volumeBps": { +"description": "Total BPS (bytes per second) volume of attack.", +"format": "int32", +"type": "integer" +}, +"volumePps": { +"description": "Total PPS (packets per second) volume of attack.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AttackExposure": { +"description": "An attack exposure contains the results of an attack path simulation run.", +"id": "AttackExposure", +"properties": { +"attackExposureResult": { +"description": "The resource name of the attack path simulation result that contains the details regarding this attack exposure score. Example: organizations/123/simulations/456/attackExposureResults/789", +"type": "string" +}, +"exposedHighValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedLowValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedMediumValueResourcesCount": { +"description": "The number of medium value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"latestCalculationTime": { +"description": "The most recent time the attack exposure was updated on this finding.", +"format": "google-datetime", +"type": "string" +}, +"score": { +"description": "A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate.", +"format": "double", +"type": "number" +}, +"state": { +"description": "What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not.", +"enum": [ +"STATE_UNSPECIFIED", +"CALCULATED", +"NOT_CALCULATED" +], +"enumDescriptions": [ +"The state is not specified.", +"The attack exposure has been calculated.", +"The attack exposure has not been calculated." +], +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"AwsAccount": { +"description": "An AWS account that is a member of an organization.", +"id": "AwsAccount", +"properties": { +"id": { +"description": "The unique identifier (ID) of the account, containing exactly 12 digits.", +"type": "string" +}, +"name": { +"description": "The friendly name of this account.", +"type": "string" +} +}, +"type": "object" +}, +"AwsMetadata": { +"description": "AWS metadata associated with the resource, only applicable if the finding's cloud provider is Amazon Web Services.", +"id": "AwsMetadata", +"properties": { +"account": { +"$ref": "AwsAccount", +"description": "The AWS account associated with the resource." +}, +"organization": { +"$ref": "AwsOrganization", +"description": "The AWS organization associated with the resource." +}, +"organizationalUnits": { +"description": "A list of AWS organizational units associated with the resource, ordered from lowest level (closest to the account) to highest level.", +"items": { +"$ref": "AwsOrganizationalUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"AwsOrganization": { +"description": "An organization is a collection of accounts that are centrally managed together using consolidated billing, organized hierarchically with organizational units (OUs), and controlled with policies.", +"id": "AwsOrganization", +"properties": { +"id": { +"description": "The unique identifier (ID) for the organization. The regex pattern for an organization ID string requires \"o-\" followed by from 10 to 32 lowercase letters or digits.", +"type": "string" +} +}, +"type": "object" +}, +"AwsOrganizationalUnit": { +"description": "An Organizational Unit (OU) is a container of AWS accounts within a root of an organization. Policies that are attached to an OU apply to all accounts contained in that OU and in any child OUs.", +"id": "AwsOrganizationalUnit", +"properties": { +"id": { +"description": "The unique identifier (ID) associated with this OU. The regex pattern for an organizational unit ID string requires \"ou-\" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second \"-\" dash and from 8 to 32 additional lowercase letters or digits. For example, \"ou-ab12-cd34ef56\".", +"type": "string" +}, +"name": { +"description": "The friendly name of the OU.", +"type": "string" +} +}, +"type": "object" +}, +"BackupDisasterRecovery": { +"description": "Information related to Google Cloud Backup and DR Service findings.", +"id": "BackupDisasterRecovery", +"properties": { +"appliance": { +"description": "The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`.", +"type": "string" +}, +"applications": { +"description": "The names of Backup and DR applications. An application is a VM, database, or file system on a managed host monitored by a backup and recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, `centos7-01-vol02`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"backupCreateTime": { +"description": "The timestamp at which the Backup and DR backup was created.", +"format": "google-datetime", +"type": "string" +}, +"backupTemplate": { +"description": "The name of a Backup and DR template which comprises one or more backup policies. See the [Backup and DR documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) for more information. For example, `snap-ov`.", +"type": "string" +}, +"backupType": { +"description": "The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`.", +"type": "string" +}, +"host": { +"description": "The name of a Backup and DR host, which is managed by the backup and recovery appliance and known to the management console. The host can be of type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file system, etc.), vCenter, or an ESX server. See the [Backup and DR documentation on hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) for more information. For example, `centos7-01`.", +"type": "string" +}, +"policies": { +"description": "The names of Backup and DR policies that are associated with a template and that define when to run a backup, how frequently to run a backup, and how long to retain the backup image. For example, `onvaults`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"policyOptions": { +"description": "The names of Backup and DR advanced policy options of a policy applying to an application. See the [Backup and DR documentation on policy options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). For example, `skipofflineappsincongrp, nounmap`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"profile": { +"description": "The name of the Backup and DR resource profile that specifies the storage media for backups of application and VM data. See the [Backup and DR documentation on profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). For example, `GCP`.", +"type": "string" +}, +"storagePool": { +"description": "The name of the Backup and DR storage pool that the backup and recovery appliance is storing data in. The storage pool could be of type Cloud, Primary, Snapshot, or OnVault. See the [Backup and DR documentation on storage pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). For example, `DiskPoolOne`.", +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CloudArmor": { +"description": "Fields related to Google Cloud Armor findings.", +"id": "CloudArmor", +"properties": { +"adaptiveProtection": { +"$ref": "AdaptiveProtection", +"description": "Information about potential Layer 7 DDoS attacks identified by [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview)." +}, +"attack": { +"$ref": "Attack", +"description": "Information about DDoS attack volume and classification." +}, +"duration": { +"description": "Duration of attack from the start until the current moment (updated every 5 minutes).", +"format": "google-duration", +"type": "string" +}, +"requests": { +"$ref": "Requests", +"description": "Information about incoming requests evaluated by [Google Cloud Armor security policies](https://cloud.google.com/armor/docs/security-policy-overview)." +}, +"securityPolicy": { +"$ref": "SecurityPolicy", +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding." +}, +"threatVector": { +"description": "Distinguish between volumetric & protocol DDoS attack and application layer attacks. For example, \u201cL3_4\u201d for Layer 3 and Layer 4 DDoS attacks, or \u201cL_7\u201d for Layer 7 DDoS attacks.", +"type": "string" +} +}, +"type": "object" +}, +"CloudDlpDataProfile": { +"description": "The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding.", +"id": "CloudDlpDataProfile", +"properties": { +"dataProfile": { +"description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", +"type": "string" +}, +"parentType": { +"description": "The resource hierarchy level at which the data profile was generated.", +"enum": [ +"PARENT_TYPE_UNSPECIFIED", +"ORGANIZATION", +"PROJECT" +], +"enumDescriptions": [ +"Unspecified parent type.", +"Organization-level configurations.", +"Project-level configurations." +], +"type": "string" +} +}, +"type": "object" +}, +"CloudDlpInspection": { +"description": "Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding.", +"id": "CloudDlpInspection", +"properties": { +"fullScan": { +"description": "Whether Cloud DLP scanned the complete resource or a sampled subset.", +"type": "boolean" +}, +"infoType": { +"description": "The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.", +"type": "string" +}, +"infoTypeCount": { +"description": "The number of times Cloud DLP found this infoType within this job and resource.", +"format": "int64", +"type": "string" +}, +"inspectJob": { +"description": "Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`.", +"type": "string" +} +}, +"type": "object" +}, +"CloudLoggingEntry": { +"description": "Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)", +"id": "CloudLoggingEntry", +"properties": { +"insertId": { +"description": "A unique identifier for the log entry.", +"type": "string" +}, +"logId": { +"description": "The type of the log (part of `log_name`. `log_name` is the resource name of the log to which this log entry belongs). For example: `cloudresourcemanager.googleapis.com/activity`. Note that this field is not URL-encoded, unlike the `LOG_ID` field in `LogEntry`.", +"type": "string" +}, +"resourceContainer": { +"description": "The organization, folder, or project of the monitored resource that produced this log entry.", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "Compliance", +"properties": { +"ids": { +"description": "Policies within the standard or benchmark, for example, A.12.4.1", +"items": { +"type": "string" +}, +"type": "array" +}, +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"ComplianceSnapshot": { +"description": "Result containing the properties and count of a ComplianceSnapshot request.", +"id": "ComplianceSnapshot", +"properties": { +"category": { +"description": "The category of Findings matching.", +"type": "string" +}, +"cloudProvider": { +"description": "The cloud provider for the compliance snapshot.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"complianceStandard": { +"description": "The compliance standard (ie CIS).", +"type": "string" +}, +"complianceVersion": { +"description": "The compliance version (ie 1.3) in CIS 1.3.", +"type": "string" +}, +"count": { +"description": "Total count of findings for the given properties.", +"format": "int64", +"type": "string" +}, +"leafContainerResource": { +"description": "The leaf container resource name that is closest to the snapshot.", +"type": "string" +}, +"name": { +"description": "The compliance snapshot name. Format: //sources//complianceSnapshots/", +"type": "string" +}, +"snapshotTime": { +"description": "The snapshot time of the snapshot.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Connection": { +"description": "Contains information about the IP connection associated with the finding.", +"id": "Connection", +"properties": { +"destinationIp": { +"description": "Destination IP address. Not present for sockets that are listening and not connected.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Not present for sockets that are listening and not connected.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IANA Internet Protocol Number such as TCP(6) and UDP(17).", +"enum": [ +"PROTOCOL_UNSPECIFIED", +"ICMP", +"TCP", +"UDP", +"GRE", +"ESP" +], +"enumDescriptions": [ +"Unspecified protocol (not HOPOPT).", +"Internet Control Message Protocol.", +"Transmission Control Protocol.", +"User Datagram Protocol.", +"Generic Routing Encapsulation.", +"Encap Security Payload." +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourcePort": { +"description": "Source port.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Contact": { +"description": "The email address of a contact.", +"id": "Contact", +"properties": { +"email": { +"description": "An email address. For example, \"`person123@company.com`\".", +"type": "string" +} +}, +"type": "object" +}, +"ContactDetails": { +"description": "Details about specific contacts", +"id": "ContactDetails", +"properties": { +"contacts": { +"description": "A list of contacts", +"items": { +"$ref": "Contact" +}, +"type": "array" +} +}, +"type": "object" +}, +"Container": { +"description": "Container associated with the finding.", +"id": "Container", +"properties": { +"createTime": { +"description": "The time that the container was created.", +"format": "google-datetime", +"type": "string" +}, +"imageId": { +"description": "Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", +"type": "string" +}, +"labels": { +"description": "Container labels, as provided by the container runtime.", +"items": { +"$ref": "Label" +}, +"type": "array" +}, +"name": { +"description": "Name of the container.", +"type": "string" +}, +"uri": { +"description": "Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags.", +"type": "string" +} +}, +"type": "object" +}, +"Cve": { +"description": "CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability.", +"id": "Cve", +"properties": { +"cvssv3": { +"$ref": "Cvssv3", +"description": "Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document" +}, +"exploitationActivity": { +"description": "The exploitation activity of the vulnerability in the wild.", +"enum": [ +"EXPLOITATION_ACTIVITY_UNSPECIFIED", +"WIDE", +"CONFIRMED", +"AVAILABLE", +"ANTICIPATED", +"NO_KNOWN" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation has been reported or confirmed to widely occur.", +"Limited reported or confirmed exploitation activities.", +"Exploit is publicly available.", +"No known exploitation activity, but has a high potential for exploitation.", +"No known exploitation activity." +], +"type": "string" +}, +"id": { +"description": "The unique identifier for the vulnerability. e.g. CVE-2021-34527", +"type": "string" +}, +"impact": { +"description": "The potential impact of the vulnerability if it was to be exploited.", +"enum": [ +"RISK_RATING_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation would have little to no security impact.", +"Exploitation would enable attackers to perform activities, or could allow attackers to have a direct impact, but would require additional steps.", +"Exploitation would enable attackers to have a notable direct impact without needing to overcome any major mitigating factors.", +"Exploitation would fundamentally undermine the security of affected systems, enable actors to perform significant attacks with minimal effort, with little to no mitigating factors to overcome." +], +"type": "string" +}, +"observedInTheWild": { +"description": "Whether or not the vulnerability has been observed in the wild.", +"type": "boolean" +}, +"references": { +"description": "Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527", +"items": { +"$ref": "Reference" +}, +"type": "array" +}, +"upstreamFixAvailable": { +"description": "Whether upstream fix is available for the CVE.", +"type": "boolean" +}, +"zeroDay": { +"description": "Whether or not the vulnerability was zero day when the finding was published.", +"type": "boolean" +} +}, +"type": "object" +}, +"Cvssv3": { +"description": "Common Vulnerability Scoring System version 3.", +"id": "Cvssv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "double", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"Database": { +"description": "Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of Cloud SQL instances or Cloud Spanner instances), or the database instance itself. Some database resources might not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types, such as Cloud SQL databases, are not yet supported by Cloud Asset Inventory. In these cases only the display name is provided.", +"id": "Database", +"properties": { +"displayName": { +"description": "The human-readable name of the database that the user connected to.", +"type": "string" +}, +"grantees": { +"description": "The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Some database resources may not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.", +"type": "string" +}, +"query": { +"description": "The SQL statement that is associated with the database access.", +"type": "string" +}, +"userName": { +"description": "The username used to connect to the database. The username might not be an IAM principal and does not have a set format.", +"type": "string" +}, +"version": { +"description": "The version of the database, for example, POSTGRES_14. See [the complete list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"type": "string" +} +}, +"type": "object" +}, +"Detection": { +"description": "Memory hash detection contributing to the binary family match.", +"id": "Detection", +"properties": { +"binary": { +"description": "The name of the binary associated with the memory hash signature detection.", +"type": "string" +}, +"percentPagesMatched": { +"description": "The percentage of memory page hashes in the signature that were matched.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"DiskPath": { +"description": "Path of the file in terms of underlying disk/partition identifiers.", +"id": "DiskPath", +"properties": { +"partitionUuid": { +"description": "UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)", +"type": "string" +}, +"relativePath": { +"description": "Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnvironmentVariable": { +"description": "A name-value pair representing an environment variable used in an operating system process.", +"id": "EnvironmentVariable", +"properties": { +"name": { +"description": "Environment variable name as a JSON encoded string.", +"type": "string" +}, +"val": { +"description": "Environment variable value as a JSON encoded string.", +"type": "string" +} +}, +"type": "object" +}, +"ExfilResource": { +"description": "Resource where data was exfiltrated from or exfiltrated to.", +"id": "ExfilResource", +"properties": { +"components": { +"description": "Subcomponents of the asset that was exfiltrated, like URIs used during exfiltration, table names, databases, and filenames. For example, multiple tables might have been exfiltrated from the same Cloud SQL instance, or multiple files might have been exfiltrated from the same Cloud Storage bucket.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name).", +"type": "string" +} +}, +"type": "object" +}, +"Exfiltration": { +"description": "Exfiltration represents a data exfiltration attempt from one or more sources to one or more targets. The `sources` attribute lists the sources of the exfiltrated data. The `targets` attribute lists the destinations the data was copied to.", +"id": "Exfiltration", +"properties": { +"sources": { +"description": "If there are multiple sources, then the data is considered \"joined\" between them. For instance, BigQuery can join multiple tables, and each table would be considered a source.", +"items": { +"$ref": "ExfilResource" +}, +"type": "array" +}, +"targets": { +"description": "If there are multiple targets, each target would get a complete copy of the \"joined\" source data.", +"items": { +"$ref": "ExfilResource" +}, +"type": "array" +}, +"totalExfiltratedBytes": { +"description": "Total exfiltrated bytes processed for the entire job.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"File": { +"description": "File information about the related binary/library used by an executable, or the script used by a script interpreter", +"id": "File", +"properties": { +"contents": { +"description": "Prefix of the file contents as a JSON-encoded string.", +"type": "string" +}, +"diskPath": { +"$ref": "DiskPath", +"description": "Path of the file in terms of underlying disk/partition identifiers." +}, +"hashedSize": { +"description": "The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.", +"format": "int64", +"type": "string" +}, +"partiallyHashed": { +"description": "True when the hash covers only a prefix of the file.", +"type": "boolean" +}, +"path": { +"description": "Absolute path of the file as a JSON encoded string.", +"type": "string" +}, +"sha256": { +"description": "SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.", +"type": "string" +}, +"size": { +"description": "Size of the file in bytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.", +"id": "Finding", +"properties": { +"access": { +"$ref": "Access", +"description": "Access details associated with the finding, such as more information on the caller, which method was accessed, and from where." +}, +"application": { +"$ref": "Application", +"description": "Represents an application associated with the finding." +}, +"attackExposure": { +"$ref": "AttackExposure", +"description": "The results of an attack path simulation relevant to this finding." +}, +"backupDisasterRecovery": { +"$ref": "BackupDisasterRecovery", +"description": "Fields related to Backup and DR findings." +}, +"canonicalName": { +"description": "The canonical name of the finding. It's either \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\" or \"projects/{project_number}/sources/{source_id}/findings/{finding_id}\", depending on the closest CRM ancestor of the resource associated with the finding.", +"type": "string" +}, +"category": { +"description": "The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"cloudArmor": { +"$ref": "CloudArmor", +"description": "Fields related to Cloud Armor findings." +}, +"cloudDlpDataProfile": { +"$ref": "CloudDlpDataProfile", +"description": "Cloud DLP data profile that is associated with the finding." +}, +"cloudDlpInspection": { +"$ref": "CloudDlpInspection", +"description": "Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding." +}, +"compliances": { +"description": "Contains compliance information for security standards associated to the finding.", +"items": { +"$ref": "Compliance" +}, +"type": "array" +}, +"connections": { +"description": "Contains information about the IP connection associated with the finding.", +"items": { +"$ref": "Connection" +}, +"type": "array" +}, +"contacts": { +"additionalProperties": { +"$ref": "ContactDetails" +}, +"description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", +"readOnly": true, +"type": "object" +}, +"containers": { +"description": "Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"createTime": { +"description": "The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"database": { +"$ref": "Database", +"description": "Database associated with the finding." +}, +"description": { +"description": "Contains more details about the finding.", +"type": "string" +}, +"eventTime": { +"description": "The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"exfiltration": { +"$ref": "Exfiltration", +"description": "Represents exfiltrations associated with the finding." +}, +"externalSystems": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"description": "Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields.", +"readOnly": true, +"type": "object" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"files": { +"description": "File associated with the finding.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"findingClass": { +"description": "The class of the finding.", +"enum": [ +"FINDING_CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"SCC_ERROR", +"POSTURE_VIOLATION" +], +"enumDescriptions": [ +"Unspecified finding class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality.", +"Describes a potential security risk due to a change in the security posture." +], +"type": "string" +}, +"iamBindings": { +"description": "Represents IAM bindings associated with the finding.", +"items": { +"$ref": "IamBinding" +}, +"type": "array" +}, +"indicator": { +"$ref": "Indicator", +"description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." +}, +"kernelRootkit": { +"$ref": "KernelRootkit", +"description": "Signature of the kernel rootkit." +}, +"kubernetes": { +"$ref": "Kubernetes", +"description": "Kubernetes resources associated with the finding." +}, +"loadBalancers": { +"description": "The load balancers associated with the finding.", +"items": { +"$ref": "LoadBalancer" +}, +"type": "array" +}, +"logEntries": { +"description": "Log entries that are relevant to the finding.", +"items": { +"$ref": "LogEntry" +}, +"type": "array" +}, +"mitreAttack": { +"$ref": "MitreAttack", +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org" +}, +"moduleName": { +"description": "Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885", +"type": "string" +}, +"mute": { +"description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", +"enum": [ +"MUTE_UNSPECIFIED", +"MUTED", +"UNMUTED", +"UNDEFINED" +], +"enumDescriptions": [ +"Unspecified.", +"Finding has been muted.", +"Finding has been unmuted.", +"Finding has never been muted/unmuted." +], +"type": "string" +}, +"muteInitiator": { +"description": "Records additional information about the mute operation, for example, the [mute configuration](/security-command-center/docs/how-to-mute-findings) that muted the finding and the user who muted the finding.", +"type": "string" +}, +"muteUpdateTime": { +"description": "Output only. The most recent time this finding was muted or unmuted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"type": "string" +}, +"nextSteps": { +"description": "Steps to address the finding.", +"type": "string" +}, +"notebook": { +"$ref": "Notebook", +"description": "Notebook associated with the finding." +}, +"orgPolicies": { +"description": "Contains information about the org policies associated with the finding.", +"items": { +"$ref": "OrgPolicy" +}, +"type": "array" +}, +"parent": { +"description": "The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +}, +"parentDisplayName": { +"description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", +"readOnly": true, +"type": "string" +}, +"processes": { +"description": "Represents operating system processes associated with the Finding.", +"items": { +"$ref": "Process" +}, +"type": "array" +}, +"resourceName": { +"description": "For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.", +"type": "string" +}, +"securityMarks": { +"$ref": "SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"securityPosture": { +"$ref": "SecurityPosture", +"description": "The security posture associated with the finding." +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"This value is used for findings when a source doesn't write a severity value.", +"Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data and public SSH access with weak or no passwords. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", +"Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", +"Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", +"Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +}, +"vulnerability": { +"$ref": "Vulnerability", +"description": "Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +} +}, +"type": "object" +}, +"Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GcpMetadata": { +"description": "GCP metadata associated with the resource, only applicable if the finding's cloud provider is Google Cloud Platform.", +"id": "GcpMetadata", +"properties": { +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Folder" +}, +"readOnly": true, +"type": "array" +}, +"organization": { +"description": "The name of the organization that the resource belongs to.", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project ID that the resource belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"Geolocation": { +"description": "Represents a geographical location for a given access.", +"id": "Geolocation", +"properties": { +"regionCode": { +"description": "A CLDR.", +"type": "string" +} +}, +"type": "object" +}, +"GetIamPolicyRequest": { +"description": "Request message for `GetIamPolicy` method.", +"id": "GetIamPolicyRequest", +"properties": { +"options": { +"$ref": "GetPolicyOptions", +"description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." +} +}, +"type": "object" +}, +"GetPolicyOptions": { +"description": "Encapsulates settings provided to GetIamPolicy.", +"id": "GetPolicyOptions", +"properties": { +"requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1BigQueryExport": { +"description": "Configures how to deliver Findings to BigQuery Instance.", +"id": "GoogleCloudSecuritycenterV1BigQueryExport", +"properties": { +"createTime": { +"description": "Output only. The time at which the BigQuery export was created. This field is set by the server and will be ignored if provided on export on creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataset": { +"description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", +"type": "string" +}, +"description": { +"description": "The description of the export (max of 1024 characters).", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the BigQuery export. This field is set by the server and will be ignored if provided on export creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", +"type": "string" +}, +"principal": { +"description": "Output only. The service account that needs permission to create table and upload data to the BigQuery dataset.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the BigQuery export was updated. This field is set by the server and will be ignored if provided on export creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Binding": { +"description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", +"id": "GoogleCloudSecuritycenterV1Binding", +"properties": { +"name": { +"description": "Name for the binding.", +"type": "string" +}, +"ns": { +"description": "Namespace for the binding.", +"type": "string" +}, +"role": { +"$ref": "Role", +"description": "The Role or ClusterRole referenced by the binding." +}, +"subjects": { +"description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": { +"description": "The response to a BulkMute request. Contains the LRO information.", +"id": "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1CustomConfig": { +"description": "Defines the properties in a custom module configuration for Security Health Analytics. Use the custom module configuration to create custom detectors that generate custom findings for resources that you specify.", +"id": "GoogleCloudSecuritycenterV1CustomConfig", +"properties": { +"customOutput": { +"$ref": "GoogleCloudSecuritycenterV1CustomOutputSpec", +"description": "Custom output properties." +}, +"description": { +"description": "Text that describes the vulnerability or misconfiguration that the custom module detects. This explanation is returned with each finding instance to help investigators understand the detected issue. The text must be enclosed in quotation marks.", +"type": "string" +}, +"predicate": { +"$ref": "Expr", +"description": "The CEL expression to evaluate to produce findings. When the expression evaluates to true against a resource, a finding is generated." +}, +"recommendation": { +"description": "An explanation of the recommended steps that security teams can take to resolve the detected issue. This explanation is returned with each finding generated by this module in the `nextSteps` property of the finding JSON.", +"type": "string" +}, +"resourceSelector": { +"$ref": "GoogleCloudSecuritycenterV1ResourceSelector", +"description": "The resource types that the custom module operates on. Each custom module can specify up to 5 resource types." +}, +"severity": { +"description": "The severity to assign to findings generated by the module.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"Unspecified severity.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1CustomOutputSpec": { +"description": "A set of optional name-value pairs that define custom source properties to return with each finding that is generated by the custom module. The custom source properties that are defined here are included in the finding JSON under `sourceProperties`.", +"id": "GoogleCloudSecuritycenterV1CustomOutputSpec", +"properties": { +"properties": { +"description": "A list of custom output properties to add to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1Property" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule": { +"description": "An EffectiveSecurityHealthAnalyticsCustomModule is the representation of a Security Health Analytics custom module at a specified level of the resource hierarchy: organization, folder, or project. If a custom module is inherited from a parent organization or folder, the value of the `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is set to the value that is effective in the parent, instead of `INHERITED`. For example, if the module is enabled in a parent organization or folder, the effective enablement_state for the module in all child folders or projects is also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only.", +"id": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule", +"properties": { +"customConfig": { +"$ref": "GoogleCloudSecuritycenterV1CustomConfig", +"description": "Output only. The user-specified configuration for the module.", +"readOnly": true +}, +"displayName": { +"description": "Output only. The display name for the custom module. The name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only.", +"readOnly": true, +"type": "string" +}, +"enablementState": { +"description": "Output only. The effective state of enablement for the module at the given level of the hierarchy.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given level.", +"The module is disabled at the given level." +], +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ExternalSystem": { +"description": "Representation of third party SIEM/SOAR fields within SCC.", +"id": "GoogleCloudSecuritycenterV1ExternalSystem", +"properties": { +"assignees": { +"description": "References primary/secondary etc assignees in the external system.", +"items": { +"type": "string" +}, +"type": "array" +}, +"caseCloseTime": { +"description": "The time when the case was closed, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseCreateTime": { +"description": "The time when the case was created, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"casePriority": { +"description": "The priority of the finding's corresponding case in the external system.", +"type": "string" +}, +"caseSla": { +"description": "The SLA of the finding's corresponding case in the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseUri": { +"description": "The link to the finding's corresponding case in the external system.", +"type": "string" +}, +"externalSystemUpdateTime": { +"description": "The time when the case was last updated, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"externalUid": { +"description": "The identifier that's used to track the finding's corresponding case in the external system.", +"type": "string" +}, +"name": { +"description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", +"type": "string" +}, +"status": { +"description": "The most recent status of the finding's corresponding case, as reported by the external system.", +"type": "string" +}, +"ticketInfo": { +"$ref": "TicketInfo", +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1MuteConfig": { +"description": "A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings.", +"id": "GoogleCloudSecuritycenterV1MuteConfig", +"properties": { +"createTime": { +"description": "Output only. The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of the mute config.", +"type": "string" +}, +"displayName": { +"deprecated": true, +"description": "The human readable name to be displayed for the mute config.", +"type": "string" +}, +"filter": { +"description": "Required. An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1NotificationMessage": { +"description": "Cloud SCC's Notification", +"id": "GoogleCloudSecuritycenterV1NotificationMessage", +"properties": { +"finding": { +"$ref": "Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV1Resource", +"description": "The Cloud resource tied to this notification's Finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Property": { +"description": "An individual name-value pair that defines a custom source property.", +"id": "GoogleCloudSecuritycenterV1Property", +"properties": { +"name": { +"description": "Name of the property for the custom output.", +"type": "string" +}, +"valueExpression": { +"$ref": "Expr", +"description": "The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV1Resource", +"properties": { +"awsMetadata": { +"$ref": "AwsMetadata", +"description": "The AWS metadata associated with the finding." +}, +"cloudProvider": { +"description": "Indicates which cloud provider the resource resides in.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"displayName": { +"description": "The human readable name of the resource.", +"type": "string" +}, +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "Folder" +}, +"readOnly": true, +"type": "array" +}, +"location": { +"description": "The region or location of the service (if applicable).", +"type": "string" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"organization": { +"description": "Indicates which organization or tenant in the cloud provider the finding applies to.", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project ID that the resource belongs to.", +"type": "string" +}, +"resourcePath": { +"$ref": "ResourcePath", +"description": "Provides the path to the resource within the resource hierarchy." +}, +"resourcePathString": { +"description": "A string representation of the resource path. For GCP, it has the format of: organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} where there can be any number of folders. For AWS, it has the format of: org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of: mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", +"type": "string" +}, +"service": { +"description": "The parent service or product from which the resource is provided, for example, GKE or SNS.", +"type": "string" +}, +"type": { +"description": "The full resource type of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ResourceSelector": { +"description": "Resource for selecting resource type.", +"id": "GoogleCloudSecuritycenterV1ResourceSelector", +"properties": { +"resourceTypes": { +"description": "The resource types to run the detector on.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ResourceValueConfig": { +"description": "A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations.", +"id": "GoogleCloudSecuritycenterV1ResourceValueConfig", +"properties": { +"cloudProvider": { +"description": "Cloud provider this configuration applies to", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Timestamp this resource value config was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the resource value config.", +"type": "string" +}, +"name": { +"description": "Name for the resource value config", +"type": "string" +}, +"resourceLabelsSelector": { +"additionalProperties": { +"type": "string" +}, +"description": "List of resource labels to search for, evaluated with AND. E.g. \"resource_labels_selector\": {\"key\": \"value\", \"env\": \"prod\"} will match resources with labels \"key\": \"value\" AND \"env\": \"prod\" https://cloud.google.com/resource-manager/docs/creating-managing-labels", +"type": "object" +}, +"resourceType": { +"description": "Apply resource_value only to resources that match resource_type. resource_type will be checked with \"AND\" of other resources. E.g. \"storage.googleapis.com/Bucket\" with resource_value \"HIGH\" will apply \"HIGH\" value only to \"storage.googleapis.com/Bucket\" resources.", +"type": "string" +}, +"resourceValue": { +"description": "Required. Resource value level this expression represents", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"scope": { +"description": "Project or folder to scope this config to. For example, \"project/456\" would apply this config only to resources in \"project/456\" scope will be checked with \"AND\" of other resources.", +"type": "string" +}, +"sensitiveDataProtectionMapping": { +"$ref": "GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping", +"description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." +}, +"tagValues": { +"description": "Required. Tag values combined with AND to check against. Values in the form \"tagValues/123\" E.g. [ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Timestamp this resource value config was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule": { +"description": "Represents an instance of a Security Health Analytics custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by the child folders and projects.", +"id": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule", +"properties": { +"ancestorModule": { +"description": "Output only. If empty, indicates that the custom module was created in the organization, folder, or project in which you are viewing the custom module. Otherwise, `ancestor_module` specifies the organization or folder from which the custom module is inherited.", +"readOnly": true, +"type": "string" +}, +"customConfig": { +"$ref": "GoogleCloudSecuritycenterV1CustomConfig", +"description": "The user specified custom configuration for the module." +}, +"displayName": { +"description": "The display name of the Security Health Analytics custom module. This display name becomes the finding category for all findings that are returned by this custom module. The display name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only.", +"type": "string" +}, +"enablementState": { +"description": "The enablement state of the custom module.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"INHERITED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given CRM resource.", +"The module is disabled at the given CRM resource.", +"State is inherited from an ancestor module. The module will either be effectively ENABLED or DISABLED based on its closest non-inherited ancestor module in the CRM hierarchy." +], +"type": "string" +}, +"lastEditor": { +"description": "Output only. The editor that last updated the custom module.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which the custom module was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping": { +"description": "Resource value mapping for Sensitive Data Protection findings. If any of these mappings have a resource value that is not unspecified, the resource_value field will be ignored when reading this configuration.", +"id": "GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping", +"properties": { +"highSensitivityMapping": { +"description": "Resource value mapping for high-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"mediumSensitivityMapping": { +"description": "Resource value mapping for medium-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1beta1Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data (security, risk, health or privacy) ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, an XSS vulnerability in an App Engine application is a finding.", +"id": "GoogleCloudSecuritycenterV1beta1Finding", +"properties": { +"category": { +"description": "The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"createTime": { +"description": "The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"eventTime": { +"description": "The time at which the event took place, or when an update to the finding occurred. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding were to be resolved afterward, this time would reflect when the finding was resolved.", +"format": "google-datetime", +"type": "string" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"name": { +"description": "The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\"", +"type": "string" +}, +"parent": { +"description": "Immutable. The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +}, +"resourceName": { +"description": "For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.", +"type": "string" +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV1beta1SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1beta1SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "GoogleCloudSecuritycenterV1beta1SecurityMarks", +"properties": { +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data (security, risk, health or privacy) ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, an XSS vulnerability in an App Engine application is a finding.", +"id": "GoogleCloudSecuritycenterV1p1beta1Finding", +"properties": { +"canonicalName": { +"description": "The canonical name of the finding. It's either \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\" or \"projects/{project_number}/sources/{source_id}/findings/{finding_id}\", depending on the closest CRM ancestor of the resource associated with the finding.", +"type": "string" +}, +"category": { +"description": "The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"createTime": { +"description": "The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"eventTime": { +"description": "The time at which the event took place, or when an update to the finding occurred. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding were to be resolved afterward, this time would reflect when the finding was resolved. Must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"name": { +"description": "The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\"", +"type": "string" +}, +"parent": { +"description": "The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +}, +"resourceName": { +"description": "For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.", +"type": "string" +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No severity specified. The default value.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "GoogleCloudSecuritycenterV1p1beta1Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1NotificationMessage": { +"description": "Security Command Center's Notification", +"id": "GoogleCloudSecuritycenterV1p1beta1NotificationMessage", +"properties": { +"finding": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Resource", +"description": "The Cloud resource tied to the notification." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV1p1beta1Resource", +"properties": { +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Folder" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project id that the resource belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"folders/{folder_id}/assets/{asset_id}/securityMarks\" \"projects/{project_number}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks\"", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Access": { +"description": "Represents an access event.", +"id": "GoogleCloudSecuritycenterV2Access", +"properties": { +"callerIp": { +"description": "Caller's IP address, such as \"1.1.1.1\".", +"type": "string" +}, +"callerIpGeo": { +"$ref": "GoogleCloudSecuritycenterV2Geolocation", +"description": "The caller IP's geolocation, which identifies where the call came from." +}, +"methodName": { +"description": "The method that the service account called, e.g. \"SetIamPolicy\".", +"type": "string" +}, +"principalEmail": { +"description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user or a service account acting on behalf of a third party principal making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "A string that represents the principal_subject that is associated with the identity. Unlike `principal_email`, `principal_subject` supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format is `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, still use the legacy format `serviceAccount:{identity pool name}[{subject}]`.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "The identity delegation history of an authenticated service account that made the request. The `serviceAccountDelegationInfo[]` object contains information about the real authorities that try to access Google Cloud resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key that was used to create or exchange credentials when authenticating the service account that made the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\". ", +"type": "string" +}, +"serviceName": { +"description": "This is the API service that the service account made a call to, e.g. \"iam.googleapis.com\"", +"type": "string" +}, +"userAgent": { +"description": "The caller's user agent string associated with the finding.", +"type": "string" +}, +"userAgentFamily": { +"description": "Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application.", +"type": "string" +}, +"userName": { +"description": "A string that represents a username. The username provided depends on the type of the finding and is likely not an IAM principal. For example, this can be a system username if the finding is related to a virtual machine, or it can be an application login username.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AccessReview": { +"description": "Conveys information about a Kubernetes access review (such as one returned by a [`kubectl auth can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) command) that was involved in a finding.", +"id": "GoogleCloudSecuritycenterV2AccessReview", +"properties": { +"group": { +"description": "The API group of the resource. \"*\" means all.", +"type": "string" +}, +"name": { +"description": "The name of the resource being requested. Empty means all.", +"type": "string" +}, +"ns": { +"description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", +"type": "string" +}, +"resource": { +"description": "The optional resource type requested. \"*\" means all.", +"type": "string" +}, +"subresource": { +"description": "The optional subresource type.", +"type": "string" +}, +"verb": { +"description": "A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. \"*\" means all.", +"type": "string" +}, +"version": { +"description": "The API version of the resource. \"*\" means all.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AdaptiveProtection": { +"description": "Information about [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).", +"id": "GoogleCloudSecuritycenterV2AdaptiveProtection", +"properties": { +"confidence": { +"description": "A score of 0 means that there is low confidence that the detected event is an actual attack. A score of 1 means that there is high confidence that the detected event is an attack. See the [Adaptive Protection documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) for further explanation.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Application": { +"description": "Represents an application associated with a finding.", +"id": "GoogleCloudSecuritycenterV2Application", +"properties": { +"baseUri": { +"description": "The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`.", +"type": "string" +}, +"fullUri": { +"description": "The full URI with payload that could be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Attack": { +"description": "Information about DDoS attack volume and classification.", +"id": "GoogleCloudSecuritycenterV2Attack", +"properties": { +"classification": { +"description": "Type of attack, for example, \u2018SYN-flood\u2019, \u2018NTP-udp\u2019, or \u2018CHARGEN-udp\u2019.", +"type": "string" +}, +"volumeBps": { +"description": "Total BPS (bytes per second) volume of attack.", +"format": "int32", +"type": "integer" +}, +"volumePps": { +"description": "Total PPS (packets per second) volume of attack.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AttackExposure": { +"description": "An attack exposure contains the results of an attack path simulation run.", +"id": "GoogleCloudSecuritycenterV2AttackExposure", +"properties": { +"attackExposureResult": { +"description": "The resource name of the attack path simulation result that contains the details regarding this attack exposure score. Example: organizations/123/simulations/456/attackExposureResults/789", +"type": "string" +}, +"exposedHighValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedLowValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedMediumValueResourcesCount": { +"description": "The number of medium value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"latestCalculationTime": { +"description": "The most recent time the attack exposure was updated on this finding.", +"format": "google-datetime", +"type": "string" +}, +"score": { +"description": "A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate.", +"format": "double", +"type": "number" +}, +"state": { +"description": "Output only. What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not.", +"enum": [ +"STATE_UNSPECIFIED", +"CALCULATED", +"NOT_CALCULATED" +], +"enumDescriptions": [ +"The state is not specified.", +"The attack exposure has been calculated.", +"The attack exposure has not been calculated." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsAccount": { +"description": "An AWS account that is a member of an organization.", +"id": "GoogleCloudSecuritycenterV2AwsAccount", +"properties": { +"id": { +"description": "The unique identifier (ID) of the account, containing exactly 12 digits.", +"type": "string" +}, +"name": { +"description": "The friendly name of this account.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsMetadata": { +"description": "AWS metadata associated with the resource, only applicable if the finding's cloud provider is Amazon Web Services.", +"id": "GoogleCloudSecuritycenterV2AwsMetadata", +"properties": { +"account": { +"$ref": "GoogleCloudSecuritycenterV2AwsAccount", +"description": "The AWS account associated with the resource." +}, +"organization": { +"$ref": "GoogleCloudSecuritycenterV2AwsOrganization", +"description": "The AWS organization associated with the resource." +}, +"organizationalUnits": { +"description": "A list of AWS organizational units associated with the resource, ordered from lowest level (closest to the account) to highest level.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2AwsOrganizationalUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsOrganization": { +"description": "An organization is a collection of accounts that are centrally managed together using consolidated billing, organized hierarchically with organizational units (OUs), and controlled with policies.", +"id": "GoogleCloudSecuritycenterV2AwsOrganization", +"properties": { +"id": { +"description": "The unique identifier (ID) for the organization. The regex pattern for an organization ID string requires \"o-\" followed by from 10 to 32 lowercase letters or digits.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsOrganizationalUnit": { +"description": "An Organizational Unit (OU) is a container of AWS accounts within a root of an organization. Policies that are attached to an OU apply to all accounts contained in that OU and in any child OUs.", +"id": "GoogleCloudSecuritycenterV2AwsOrganizationalUnit", +"properties": { +"id": { +"description": "The unique identifier (ID) associated with this OU. The regex pattern for an organizational unit ID string requires \"ou-\" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second \"-\" dash and from 8 to 32 additional lowercase letters or digits. For example, \"ou-ab12-cd34ef56\".", +"type": "string" +}, +"name": { +"description": "The friendly name of the OU.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BackupDisasterRecovery": { +"description": "Information related to Google Cloud Backup and DR Service findings.", +"id": "GoogleCloudSecuritycenterV2BackupDisasterRecovery", +"properties": { +"appliance": { +"description": "The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`.", +"type": "string" +}, +"applications": { +"description": "The names of Backup and DR applications. An application is a VM, database, or file system on a managed host monitored by a backup and recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, `centos7-01-vol02`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"backupCreateTime": { +"description": "The timestamp at which the Backup and DR backup was created.", +"format": "google-datetime", +"type": "string" +}, +"backupTemplate": { +"description": "The name of a Backup and DR template which comprises one or more backup policies. See the [Backup and DR documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) for more information. For example, `snap-ov`.", +"type": "string" +}, +"backupType": { +"description": "The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`.", +"type": "string" +}, +"host": { +"description": "The name of a Backup and DR host, which is managed by the backup and recovery appliance and known to the management console. The host can be of type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file system, etc.), vCenter, or an ESX server. See the [Backup and DR documentation on hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) for more information. For example, `centos7-01`.", +"type": "string" +}, +"policies": { +"description": "The names of Backup and DR policies that are associated with a template and that define when to run a backup, how frequently to run a backup, and how long to retain the backup image. For example, `onvaults`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"policyOptions": { +"description": "The names of Backup and DR advanced policy options of a policy applying to an application. See the [Backup and DR documentation on policy options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). For example, `skipofflineappsincongrp, nounmap`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"profile": { +"description": "The name of the Backup and DR resource profile that specifies the storage media for backups of application and VM data. See the [Backup and DR documentation on profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). For example, `GCP`.", +"type": "string" +}, +"storagePool": { +"description": "The name of the Backup and DR storage pool that the backup and recovery appliance is storing data in. The storage pool could be of type Cloud, Primary, Snapshot, or OnVault. See the [Backup and DR documentation on storage pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). For example, `DiskPoolOne`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BigQueryExport": { +"description": "Configures how to deliver Findings to BigQuery Instance.", +"id": "GoogleCloudSecuritycenterV2BigQueryExport", +"properties": { +"createTime": { +"description": "Output only. The time at which the BigQuery export was created. This field is set by the server and will be ignored if provided on export on creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataset": { +"description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", +"type": "string" +}, +"description": { +"description": "The description of the export (max of 1024 characters).", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the BigQuery export. This field is set by the server and will be ignored if provided on export creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", +"type": "string" +}, +"principal": { +"description": "Output only. The service account that needs permission to create table and upload data to the BigQuery dataset.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the BigQuery export was updated. This field is set by the server and will be ignored if provided on export creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Binding": { +"description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", +"id": "GoogleCloudSecuritycenterV2Binding", +"properties": { +"name": { +"description": "Name for the binding.", +"type": "string" +}, +"ns": { +"description": "Namespace for the binding.", +"type": "string" +}, +"role": { +"$ref": "GoogleCloudSecuritycenterV2Role", +"description": "The Role or ClusterRole referenced by the binding." +}, +"subjects": { +"description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BulkMuteFindingsResponse": { +"description": "The response to a BulkMute request. Contains the LRO information.", +"id": "GoogleCloudSecuritycenterV2BulkMuteFindingsResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudArmor": { +"description": "Fields related to Google Cloud Armor findings.", +"id": "GoogleCloudSecuritycenterV2CloudArmor", +"properties": { +"adaptiveProtection": { +"$ref": "GoogleCloudSecuritycenterV2AdaptiveProtection", +"description": "Information about potential Layer 7 DDoS attacks identified by [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview)." +}, +"attack": { +"$ref": "GoogleCloudSecuritycenterV2Attack", +"description": "Information about DDoS attack volume and classification." +}, +"duration": { +"description": "Duration of attack from the start until the current moment (updated every 5 minutes).", +"format": "google-duration", +"type": "string" +}, +"requests": { +"$ref": "GoogleCloudSecuritycenterV2Requests", +"description": "Information about incoming requests evaluated by [Google Cloud Armor security policies](https://cloud.google.com/armor/docs/security-policy-overview)." +}, +"securityPolicy": { +"$ref": "GoogleCloudSecuritycenterV2SecurityPolicy", +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding." +}, +"threatVector": { +"description": "Distinguish between volumetric & protocol DDoS attack and application layer attacks. For example, \u201cL3_4\u201d for Layer 3 and Layer 4 DDoS attacks, or \u201cL_7\u201d for Layer 7 DDoS attacks.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudDlpDataProfile": { +"description": "The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding.", +"id": "GoogleCloudSecuritycenterV2CloudDlpDataProfile", +"properties": { +"dataProfile": { +"description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", +"type": "string" +}, +"parentType": { +"description": "The resource hierarchy level at which the data profile was generated.", +"enum": [ +"PARENT_TYPE_UNSPECIFIED", +"ORGANIZATION", +"PROJECT" +], +"enumDescriptions": [ +"Unspecified parent type.", +"Organization-level configurations.", +"Project-level configurations." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudDlpInspection": { +"description": "Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding.", +"id": "GoogleCloudSecuritycenterV2CloudDlpInspection", +"properties": { +"fullScan": { +"description": "Whether Cloud DLP scanned the complete resource or a sampled subset.", +"type": "boolean" +}, +"infoType": { +"description": "The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.", +"type": "string" +}, +"infoTypeCount": { +"description": "The number of times Cloud DLP found this infoType within this job and resource.", +"format": "int64", +"type": "string" +}, +"inspectJob": { +"description": "Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudLoggingEntry": { +"description": "Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)", +"id": "GoogleCloudSecuritycenterV2CloudLoggingEntry", +"properties": { +"insertId": { +"description": "A unique identifier for the log entry.", +"type": "string" +}, +"logId": { +"description": "The type of the log (part of `log_name`. `log_name` is the resource name of the log to which this log entry belongs). For example: `cloudresourcemanager.googleapis.com/activity` Note that this field is not URL-encoded, unlike in `LogEntry`.", +"type": "string" +}, +"resourceContainer": { +"description": "The organization, folder, or project of the monitored resource that produced this log entry.", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "GoogleCloudSecuritycenterV2Compliance", +"properties": { +"ids": { +"description": "Policies within the standard or benchmark, for example, A.12.4.1", +"items": { +"type": "string" +}, +"type": "array" +}, +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Connection": { +"description": "Contains information about the IP connection associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Connection", +"properties": { +"destinationIp": { +"description": "Destination IP address. Not present for sockets that are listening and not connected.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Not present for sockets that are listening and not connected.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IANA Internet Protocol Number such as TCP(6) and UDP(17).", +"enum": [ +"PROTOCOL_UNSPECIFIED", +"ICMP", +"TCP", +"UDP", +"GRE", +"ESP" +], +"enumDescriptions": [ +"Unspecified protocol (not HOPOPT).", +"Internet Control Message Protocol.", +"Transmission Control Protocol.", +"User Datagram Protocol.", +"Generic Routing Encapsulation.", +"Encap Security Payload." +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourcePort": { +"description": "Source port.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Contact": { +"description": "The email address of a contact.", +"id": "GoogleCloudSecuritycenterV2Contact", +"properties": { +"email": { +"description": "An email address. For example, \"`person123@company.com`\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ContactDetails": { +"description": "Details about specific contacts", +"id": "GoogleCloudSecuritycenterV2ContactDetails", +"properties": { +"contacts": { +"description": "A list of contacts", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Contact" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Container": { +"description": "Container associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Container", +"properties": { +"createTime": { +"description": "The time that the container was created.", +"format": "google-datetime", +"type": "string" +}, +"imageId": { +"description": "Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", +"type": "string" +}, +"labels": { +"description": "Container labels, as provided by the container runtime.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Label" +}, +"type": "array" +}, +"name": { +"description": "Name of the container.", +"type": "string" +}, +"uri": { +"description": "Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Cve": { +"description": "CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability.", +"id": "GoogleCloudSecuritycenterV2Cve", +"properties": { +"cvssv3": { +"$ref": "GoogleCloudSecuritycenterV2Cvssv3", +"description": "Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document" +}, +"exploitationActivity": { +"description": "The exploitation activity of the vulnerability in the wild.", +"enum": [ +"EXPLOITATION_ACTIVITY_UNSPECIFIED", +"WIDE", +"CONFIRMED", +"AVAILABLE", +"ANTICIPATED", +"NO_KNOWN" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation has been reported or confirmed to widely occur.", +"Limited reported or confirmed exploitation activities.", +"Exploit is publicly available.", +"No known exploitation activity, but has a high potential for exploitation.", +"No known exploitation activity." +], +"type": "string" +}, +"id": { +"description": "The unique identifier for the vulnerability. e.g. CVE-2021-34527", +"type": "string" +}, +"impact": { +"description": "The potential impact of the vulnerability if it was to be exploited.", +"enum": [ +"RISK_RATING_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation would have little to no security impact.", +"Exploitation would enable attackers to perform activities, or could allow attackers to have a direct impact, but would require additional steps.", +"Exploitation would enable attackers to have a notable direct impact without needing to overcome any major mitigating factors.", +"Exploitation would fundamentally undermine the security of affected systems, enable actors to perform significant attacks with minimal effort, with little to no mitigating factors to overcome." +], +"type": "string" +}, +"observedInTheWild": { +"description": "Whether or not the vulnerability has been observed in the wild.", +"type": "boolean" +}, +"references": { +"description": "Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Reference" +}, +"type": "array" +}, +"upstreamFixAvailable": { +"description": "Whether upstream fix is available for the CVE.", +"type": "boolean" +}, +"zeroDay": { +"description": "Whether or not the vulnerability was zero day when the finding was published.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Cvssv3": { +"description": "Common Vulnerability Scoring System version 3.", +"id": "GoogleCloudSecuritycenterV2Cvssv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "double", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Database": { +"description": "Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of Cloud SQL instances or Cloud Spanner instances), or the database instance itself. Some database resources might not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types, such as Cloud SQL databases, are not yet supported by Cloud Asset Inventory. In these cases only the display name is provided.", +"id": "GoogleCloudSecuritycenterV2Database", +"properties": { +"displayName": { +"description": "The human-readable name of the database that the user connected to.", +"type": "string" +}, +"grantees": { +"description": "The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Some database resources may not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.", +"type": "string" +}, +"query": { +"description": "The SQL statement that is associated with the database access.", +"type": "string" +}, +"userName": { +"description": "The username used to connect to the database. The username might not be an IAM principal and does not have a set format.", +"type": "string" +}, +"version": { +"description": "The version of the database, for example, POSTGRES_14. See [the complete list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Detection": { +"description": "Memory hash detection contributing to the binary family match.", +"id": "GoogleCloudSecuritycenterV2Detection", +"properties": { +"binary": { +"description": "The name of the binary associated with the memory hash signature detection.", +"type": "string" +}, +"percentPagesMatched": { +"description": "The percentage of memory page hashes in the signature that were matched.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2DiskPath": { +"description": "Path of the file in terms of underlying disk/partition identifiers.", +"id": "GoogleCloudSecuritycenterV2DiskPath", +"properties": { +"partitionUuid": { +"description": "UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)", +"type": "string" +}, +"relativePath": { +"description": "Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2EnvironmentVariable": { +"description": "A name-value pair representing an environment variable used in an operating system process.", +"id": "GoogleCloudSecuritycenterV2EnvironmentVariable", +"properties": { +"name": { +"description": "Environment variable name as a JSON encoded string.", +"type": "string" +}, +"val": { +"description": "Environment variable value as a JSON encoded string.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ExfilResource": { +"description": "Resource where data was exfiltrated from or exfiltrated to.", +"id": "GoogleCloudSecuritycenterV2ExfilResource", +"properties": { +"components": { +"description": "Subcomponents of the asset that was exfiltrated, like URIs used during exfiltration, table names, databases, and filenames. For example, multiple tables might have been exfiltrated from the same Cloud SQL instance, or multiple files might have been exfiltrated from the same Cloud Storage bucket.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Exfiltration": { +"description": "Exfiltration represents a data exfiltration attempt from one or more sources to one or more targets. The `sources` attribute lists the sources of the exfiltrated data. The `targets` attribute lists the destinations the data was copied to.", +"id": "GoogleCloudSecuritycenterV2Exfiltration", +"properties": { +"sources": { +"description": "If there are multiple sources, then the data is considered \"joined\" between them. For instance, BigQuery can join multiple tables, and each table would be considered a source.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ExfilResource" +}, +"type": "array" +}, +"targets": { +"description": "If there are multiple targets, each target would get a complete copy of the \"joined\" source data.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ExfilResource" +}, +"type": "array" +}, +"totalExfiltratedBytes": { +"description": "Total exfiltrated bytes processed for the entire job.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ExternalSystem": { +"description": "Representation of third party SIEM/SOAR fields within SCC.", +"id": "GoogleCloudSecuritycenterV2ExternalSystem", +"properties": { +"assignees": { +"description": "References primary/secondary etc assignees in the external system.", +"items": { +"type": "string" +}, +"type": "array" +}, +"caseCloseTime": { +"description": "The time when the case was closed, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseCreateTime": { +"description": "The time when the case was created, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"casePriority": { +"description": "The priority of the finding's corresponding case in the external system.", +"type": "string" +}, +"caseSla": { +"description": "The SLA of the finding's corresponding case in the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseUri": { +"description": "The link to the finding's corresponding case in the external system.", +"type": "string" +}, +"externalSystemUpdateTime": { +"description": "The time when the case was last updated, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"externalUid": { +"description": "The identifier that's used to track the finding's corresponding case in the external system.", +"type": "string" +}, +"name": { +"description": "Full resource name of the external system. The following list shows some examples: + `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + `folders/1234/sources/5678/findings/123456/externalSystems/jira` + `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + `projects/1234/sources/5678/findings/123456/externalSystems/jira` + `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`", +"type": "string" +}, +"status": { +"description": "The most recent status of the finding's corresponding case, as reported by the external system.", +"type": "string" +}, +"ticketInfo": { +"$ref": "GoogleCloudSecuritycenterV2TicketInfo", +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2File": { +"description": "File information about the related binary/library used by an executable, or the script used by a script interpreter", +"id": "GoogleCloudSecuritycenterV2File", +"properties": { +"contents": { +"description": "Prefix of the file contents as a JSON-encoded string.", +"type": "string" +}, +"diskPath": { +"$ref": "GoogleCloudSecuritycenterV2DiskPath", +"description": "Path of the file in terms of underlying disk/partition identifiers." +}, +"hashedSize": { +"description": "The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.", +"format": "int64", +"type": "string" +}, +"partiallyHashed": { +"description": "True when the hash covers only a prefix of the file.", +"type": "boolean" +}, +"path": { +"description": "Absolute path of the file as a JSON encoded string.", +"type": "string" +}, +"sha256": { +"description": "SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.", +"type": "string" +}, +"size": { +"description": "Size of the file in bytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.", +"id": "GoogleCloudSecuritycenterV2Finding", +"properties": { +"access": { +"$ref": "GoogleCloudSecuritycenterV2Access", +"description": "Access details associated with the finding, such as more information on the caller, which method was accessed, and from where." +}, +"application": { +"$ref": "GoogleCloudSecuritycenterV2Application", +"description": "Represents an application associated with the finding." +}, +"attackExposure": { +"$ref": "GoogleCloudSecuritycenterV2AttackExposure", +"description": "The results of an attack path simulation relevant to this finding." +}, +"backupDisasterRecovery": { +"$ref": "GoogleCloudSecuritycenterV2BackupDisasterRecovery", +"description": "Fields related to Backup and DR findings." +}, +"canonicalName": { +"description": "Output only. The canonical name of the finding. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` The prefix is the closest CRM ancestor of the resource associated with the finding.", +"readOnly": true, +"type": "string" +}, +"category": { +"description": "Immutable. The additional taxonomy group within findings from a given source. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"cloudArmor": { +"$ref": "GoogleCloudSecuritycenterV2CloudArmor", +"description": "Fields related to Cloud Armor findings." +}, +"cloudDlpDataProfile": { +"$ref": "GoogleCloudSecuritycenterV2CloudDlpDataProfile", +"description": "Cloud DLP data profile that is associated with the finding." +}, +"cloudDlpInspection": { +"$ref": "GoogleCloudSecuritycenterV2CloudDlpInspection", +"description": "Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding." +}, +"compliances": { +"description": "Contains compliance information for security standards associated to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Compliance" +}, +"type": "array" +}, +"connections": { +"description": "Contains information about the IP connection associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Connection" +}, +"type": "array" +}, +"contacts": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV2ContactDetails" +}, +"description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", +"readOnly": true, +"type": "object" +}, +"containers": { +"description": "Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"createTime": { +"description": "Output only. The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"database": { +"$ref": "GoogleCloudSecuritycenterV2Database", +"description": "Database associated with the finding." +}, +"description": { +"description": "Contains more details about the finding.", +"type": "string" +}, +"eventTime": { +"description": "The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"exfiltration": { +"$ref": "GoogleCloudSecuritycenterV2Exfiltration", +"description": "Represents exfiltrations associated with the finding." +}, +"externalSystems": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV2ExternalSystem" +}, +"description": "Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields.", +"readOnly": true, +"type": "object" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"files": { +"description": "File associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2File" +}, +"type": "array" +}, +"findingClass": { +"description": "The class of the finding.", +"enum": [ +"FINDING_CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"SCC_ERROR", +"POSTURE_VIOLATION" +], +"enumDescriptions": [ +"Unspecified finding class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality.", +"Describes a potential security risk due to a change in the security posture." +], +"type": "string" +}, +"iamBindings": { +"description": "Represents IAM bindings associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2IamBinding" +}, +"type": "array" +}, +"indicator": { +"$ref": "GoogleCloudSecuritycenterV2Indicator", +"description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." +}, +"kernelRootkit": { +"$ref": "GoogleCloudSecuritycenterV2KernelRootkit", +"description": "Signature of the kernel rootkit." +}, +"kubernetes": { +"$ref": "GoogleCloudSecuritycenterV2Kubernetes", +"description": "Kubernetes resources associated with the finding." +}, +"loadBalancers": { +"description": "The load balancers associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2LoadBalancer" +}, +"type": "array" +}, +"logEntries": { +"description": "Log entries that are relevant to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2LogEntry" +}, +"type": "array" +}, +"mitreAttack": { +"$ref": "GoogleCloudSecuritycenterV2MitreAttack", +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org" +}, +"moduleName": { +"description": "Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885", +"type": "string" +}, +"mute": { +"description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", +"enum": [ +"MUTE_UNSPECIFIED", +"MUTED", +"UNMUTED", +"UNDEFINED" +], +"enumDescriptions": [ +"Unspecified.", +"Finding has been muted.", +"Finding has been unmuted.", +"Finding has never been muted/unmuted." +], +"type": "string" +}, +"muteInitiator": { +"description": "Records additional information about the mute operation, for example, the [mute configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) that muted the finding and the user who muted the finding.", +"type": "string" +}, +"muteUpdateTime": { +"description": "Output only. The most recent time this finding was muted or unmuted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`", +"type": "string" +}, +"nextSteps": { +"description": "Steps to address the finding.", +"type": "string" +}, +"notebook": { +"$ref": "GoogleCloudSecuritycenterV2Notebook", +"description": "Notebook associated with the finding." +}, +"orgPolicies": { +"description": "Contains information about the org policies associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2OrgPolicy" +}, +"type": "array" +}, +"parent": { +"description": "The relative resource name of the source and location the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}` + `folders/{folders_id}/sources/{source_id}` + `projects/{projects_id}/sources/{source_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`", +"type": "string" +}, +"parentDisplayName": { +"description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", +"readOnly": true, +"type": "string" +}, +"processes": { +"description": "Represents operating system processes associated with the Finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Process" +}, +"type": "array" +}, +"resourceName": { +"description": "Immutable. For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string.", +"type": "string" +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV2SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"securityPosture": { +"$ref": "GoogleCloudSecuritycenterV2SecurityPosture", +"description": "The security posture associated with the finding." +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"This value is used for findings when a source doesn't write a severity value.", +"Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data and public SSH access with weak or no passwords. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", +"Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", +"Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", +"Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "Output only. The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"readOnly": true, +"type": "string" +}, +"vulnerability": { +"$ref": "GoogleCloudSecuritycenterV2Vulnerability", +"description": "Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "GoogleCloudSecuritycenterV2Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Geolocation": { +"description": "Represents a geographical location for a given access.", +"id": "GoogleCloudSecuritycenterV2Geolocation", +"properties": { +"regionCode": { +"description": "A CLDR.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2IamBinding": { +"description": "Represents a particular IAM binding, which captures a member's role addition, removal, or state.", +"id": "GoogleCloudSecuritycenterV2IamBinding", +"properties": { +"action": { +"description": "The action that was performed on a Binding.", +"enum": [ +"ACTION_UNSPECIFIED", +"ADD", +"REMOVE" +], +"enumDescriptions": [ +"Unspecified.", +"Addition of a Binding.", +"Removal of a Binding." +], +"type": "string" +}, +"member": { +"description": "A single identity requesting access for a Cloud Platform resource, for example, \"foo@google.com\".", +"type": "string" +}, +"role": { +"description": "Role that is assigned to \"members\". For example, \"roles/viewer\", \"roles/editor\", or \"roles/owner\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Indicator": { +"description": "Represents what's commonly known as an _indicator of compromise_ (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).", +"id": "GoogleCloudSecuritycenterV2Indicator", +"properties": { +"domains": { +"description": "List of domains associated to the Finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipAddresses": { +"description": "The list of IP addresses that are associated with the finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"signatures": { +"description": "The list of matched signatures indicating that the given process is present in the environment.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ProcessSignature" +}, +"type": "array" +}, +"uris": { +"description": "The list of URIs associated to the Findings.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2KernelRootkit": { +"description": "Kernel mode rootkit signatures.", +"id": "GoogleCloudSecuritycenterV2KernelRootkit", +"properties": { +"name": { +"description": "Rootkit name, when available.", +"type": "string" +}, +"unexpectedCodeModification": { +"description": "True if unexpected modifications of kernel code memory are present.", +"type": "boolean" +}, +"unexpectedFtraceHandler": { +"description": "True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedInterruptHandler": { +"description": "True if interrupt handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKernelCodePages": { +"description": "True if kernel code pages that are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKprobeHandler": { +"description": "True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedProcessesInRunqueue": { +"description": "True if unexpected processes in the scheduler run queue are present. Such processes are in the run queue, but not in the process task list.", +"type": "boolean" +}, +"unexpectedReadOnlyDataModification": { +"description": "True if unexpected modifications of kernel read-only data memory are present.", +"type": "boolean" +}, +"unexpectedSystemCallHandler": { +"description": "True if system call handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Kubernetes": { +"description": "Kubernetes-related attributes.", +"id": "GoogleCloudSecuritycenterV2Kubernetes", +"properties": { +"accessReviews": { +"description": "Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2AccessReview" +}, +"type": "array" +}, +"bindings": { +"description": "Provides Kubernetes role binding information for findings that involve [RoleBindings or ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Binding" +}, +"type": "array" +}, +"nodePools": { +"description": "GKE [node pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) associated with the finding. This field contains node pool information for each node, when it is available.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2NodePool" +}, +"type": "array" +}, +"nodes": { +"description": "Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Node" +}, +"type": "array" +}, +"objects": { +"description": "Kubernetes objects related to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Object" +}, +"type": "array" +}, +"pods": { +"description": "Kubernetes [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated with the finding. This field contains Pod records for each container that is owned by a Pod.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Pod" +}, +"type": "array" +}, +"roles": { +"description": "Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Role" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Label": { +"description": "Represents a generic name-value label. A label has separate name and value fields to support filtering with the `contains()` function. For more information, see [Filtering on array-type fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).", +"id": "GoogleCloudSecuritycenterV2Label", +"properties": { +"name": { +"description": "Name of the label.", +"type": "string" +}, +"value": { +"description": "Value that corresponds to the label's name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2LoadBalancer": { +"description": "Contains information related to the load balancer associated with the finding.", +"id": "GoogleCloudSecuritycenterV2LoadBalancer", +"properties": { +"name": { +"description": "The name of the load balancer associated with the finding.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2LogEntry": { +"description": "An individual entry in a log.", +"id": "GoogleCloudSecuritycenterV2LogEntry", +"properties": { +"cloudLoggingEntry": { +"$ref": "GoogleCloudSecuritycenterV2CloudLoggingEntry", +"description": "An individual entry in a log stored in Cloud Logging." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MemoryHashSignature": { +"description": "A signature corresponding to memory page hashes.", +"id": "GoogleCloudSecuritycenterV2MemoryHashSignature", +"properties": { +"binaryFamily": { +"description": "The binary family.", +"type": "string" +}, +"detections": { +"description": "The list of memory hash detections contributing to the binary family match.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Detection" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MitreAttack": { +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org", +"id": "GoogleCloudSecuritycenterV2MitreAttack", +"properties": { +"additionalTactics": { +"description": "Additional MITRE ATT&CK tactics related to this finding, if any.", +"items": { +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"type": "array" +}, +"additionalTechniques": { +"description": "Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques.", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"primaryTactic": { +"description": "The MITRE ATT&CK tactic most closely represented by this finding, if any.", +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"primaryTechniques": { +"description": "The MITRE ATT&CK technique most closely represented by this finding, if any. primary_techniques is a repeated field because there are multiple levels of MITRE ATT&CK techniques. If the technique most closely represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The MITRE ATT&CK version referenced by the above fields. E.g. \"8\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MuteConfig": { +"description": "A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings.", +"id": "GoogleCloudSecuritycenterV2MuteConfig", +"properties": { +"createTime": { +"description": "Output only. The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of the mute config.", +"type": "string" +}, +"filter": { +"description": "Required. An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", +"type": "string" +}, +"type": { +"description": "Required. The type of the mute config, which determines what type of mute state the config affects. Immutable after creation.", +"enum": [ +"MUTE_CONFIG_TYPE_UNSPECIFIED", +"STATIC" +], +"enumDescriptions": [ +"Unused.", +"A static mute config, which sets the static mute state of future matching findings to muted. Once the static mute state has been set, finding or config modifications will not affect the state." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Node": { +"description": "Kubernetes nodes associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Node", +"properties": { +"name": { +"description": "[Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2NodePool": { +"description": "Provides GKE node pool information.", +"id": "GoogleCloudSecuritycenterV2NodePool", +"properties": { +"name": { +"description": "Kubernetes node pool name.", +"type": "string" +}, +"nodes": { +"description": "Nodes associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Node" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Notebook": { +"description": "Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise notebook](https://cloud.google.com/colab/docs/introduction) file, that is associated with a finding.", +"id": "GoogleCloudSecuritycenterV2Notebook", +"properties": { +"lastAuthor": { +"description": "The user ID of the latest author to modify the notebook.", +"type": "string" +}, +"name": { +"description": "The name of the notebook.", +"type": "string" +}, +"notebookUpdateTime": { +"description": "The most recent time the notebook was updated.", +"format": "google-datetime", +"type": "string" +}, +"service": { +"description": "The source notebook service, for example, \"Colab Enterprise\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2NotificationMessage": { +"description": "Cloud SCC's Notification", +"id": "GoogleCloudSecuritycenterV2NotificationMessage", +"properties": { +"finding": { +"$ref": "GoogleCloudSecuritycenterV2Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV2Resource", +"description": "The Cloud resource tied to this notification's Finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Object": { +"description": "Kubernetes object related to the finding, uniquely identified by GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or AccessReview.", +"id": "GoogleCloudSecuritycenterV2Object", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"group": { +"description": "Kubernetes object group, such as \"policy.k8s.io/v1\".", +"type": "string" +}, +"kind": { +"description": "Kubernetes object kind, such as \"Namespace\".", +"type": "string" +}, +"name": { +"description": "Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.", +"type": "string" +}, +"ns": { +"description": "Kubernetes object namespace. Must be a valid DNS label. Named \"ns\" to avoid collision with C++ namespace keyword. For details see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2OrgPolicy": { +"description": "Contains information about the org policies associated with the finding.", +"id": "GoogleCloudSecuritycenterV2OrgPolicy", +"properties": { +"name": { +"description": "The resource name of the org policy. Example: \"organizations/{organization_id}/policies/{constraint_name}\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Package": { +"description": "Package is a generic definition of a package.", +"id": "GoogleCloudSecuritycenterV2Package", +"properties": { +"cpeUri": { +"description": "The CPE URI where the vulnerability was detected.", +"type": "string" +}, +"packageName": { +"description": "The name of the package where the vulnerability was detected.", +"type": "string" +}, +"packageType": { +"description": "Type of package, for example, os, maven, or go.", +"type": "string" +}, +"packageVersion": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Pod": { +"description": "A Kubernetes Pod.", +"id": "GoogleCloudSecuritycenterV2Pod", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"labels": { +"description": "Pod labels. For Kubernetes containers, these are applied to the container.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Label" +}, +"type": "array" +}, +"name": { +"description": "Kubernetes Pod name.", +"type": "string" +}, +"ns": { +"description": "Kubernetes Pod namespace.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2PolicyDriftDetails": { +"description": "The policy field that violates the deployed posture and its expected and detected values.", +"id": "GoogleCloudSecuritycenterV2PolicyDriftDetails", +"properties": { +"detectedValue": { +"description": "The detected value that violates the deployed posture, for example, `false` or `allowed_values={\"projects/22831892\"}`.", +"type": "string" +}, +"expectedValue": { +"description": "The value of this field that was configured in a posture, for example, `true` or `allowed_values={\"projects/29831892\"}`.", +"type": "string" +}, +"field": { +"description": "The name of the updated field, for example constraint.implementation.policy_rules[0].enforce", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Process": { +"description": "Represents an operating system process.", +"id": "GoogleCloudSecuritycenterV2Process", +"properties": { +"args": { +"description": "Process arguments as JSON encoded strings.", +"items": { +"type": "string" +}, +"type": "array" +}, +"argumentsTruncated": { +"description": "True if `args` is incomplete.", +"type": "boolean" +}, +"binary": { +"$ref": "GoogleCloudSecuritycenterV2File", +"description": "File information for the process executable." +}, +"envVariables": { +"description": "Process environment variables.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2EnvironmentVariable" +}, +"type": "array" +}, +"envVariablesTruncated": { +"description": "True if `env_variables` is incomplete.", +"type": "boolean" +}, +"libraries": { +"description": "File information for libraries loaded by the process.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2File" +}, +"type": "array" +}, +"name": { +"description": "The process name, as displayed in utilities like `top` and `ps`. This name can be accessed through `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.", +"type": "string" +}, +"parentPid": { +"description": "The parent process ID.", +"format": "int64", +"type": "string" +}, +"pid": { +"description": "The process ID.", +"format": "int64", +"type": "string" +}, +"script": { +"$ref": "GoogleCloudSecuritycenterV2File", +"description": "When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ProcessSignature": { +"description": "Indicates what signature matched this process.", +"id": "GoogleCloudSecuritycenterV2ProcessSignature", +"properties": { +"memoryHashSignature": { +"$ref": "GoogleCloudSecuritycenterV2MemoryHashSignature", +"description": "Signature indicating that a binary family was matched." +}, +"signatureType": { +"description": "Describes the type of resource associated with the signature.", +"enum": [ +"SIGNATURE_TYPE_UNSPECIFIED", +"SIGNATURE_TYPE_PROCESS", +"SIGNATURE_TYPE_FILE" +], +"enumDescriptions": [ +"The default signature type.", +"Used for signatures concerning processes.", +"Used for signatures concerning disks." +], +"type": "string" +}, +"yaraRuleSignature": { +"$ref": "GoogleCloudSecuritycenterV2YaraRuleSignature", +"description": "Signature indicating that a YARA rule was matched." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Reference": { +"description": "Additional Links", +"id": "GoogleCloudSecuritycenterV2Reference", +"properties": { +"source": { +"description": "Source of the reference e.g. NVD", +"type": "string" +}, +"uri": { +"description": "Uri for the mentioned source e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Requests": { +"description": "Information about the requests relevant to the finding.", +"id": "GoogleCloudSecuritycenterV2Requests", +"properties": { +"longTermAllowed": { +"description": "Allowed RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"longTermDenied": { +"description": "Denied RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"ratio": { +"description": "For 'Increasing deny ratio', the ratio is the denied traffic divided by the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed traffic in the short term divided by allowed traffic in the long term.", +"format": "double", +"type": "number" +}, +"shortTermAllowed": { +"description": "Allowed RPS (requests per second) in the short term.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV2Resource", +"properties": { +"awsMetadata": { +"$ref": "GoogleCloudSecuritycenterV2AwsMetadata", +"description": "The AWS metadata associated with the finding." +}, +"cloudProvider": { +"description": "Indicates which cloud provider the finding is from.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"displayName": { +"description": "The human readable name of the resource.", +"type": "string" +}, +"gcpMetadata": { +"$ref": "GcpMetadata", +"description": "The GCP metadata associated with the finding." +}, +"location": { +"description": "The region or location of the service (if applicable).", +"type": "string" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourcePath": { +"$ref": "GoogleCloudSecuritycenterV2ResourcePath", +"description": "Provides the path to the resource within the resource hierarchy." +}, +"resourcePathString": { +"description": "A string representation of the resource path. For GCP, it has the format of: organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} where there can be any number of folders. For AWS, it has the format of: org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of: mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", +"type": "string" +}, +"service": { +"description": "The service or resource provider associated with the resource.", +"type": "string" +}, +"type": { +"description": "The full resource type of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourcePath": { +"description": "Represents the path of resources leading up to the resource this finding is about.", +"id": "GoogleCloudSecuritycenterV2ResourcePath", +"properties": { +"nodes": { +"description": "The list of nodes that make the up resource path, ordered from lowest level to highest level.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ResourcePathNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourcePathNode": { +"description": "A node within the resource path. Each node represents a resource within the resource hierarchy.", +"id": "GoogleCloudSecuritycenterV2ResourcePathNode", +"properties": { +"displayName": { +"description": "The display name of the resource this node represents.", +"type": "string" +}, +"id": { +"description": "The ID of the resource this node represents.", +"type": "string" +}, +"nodeType": { +"description": "The type of resource this node represents.", +"enum": [ +"RESOURCE_PATH_NODE_TYPE_UNSPECIFIED", +"GCP_ORGANIZATION", +"GCP_FOLDER", +"GCP_PROJECT", +"AWS_ORGANIZATION", +"AWS_ORGANIZATIONAL_UNIT", +"AWS_ACCOUNT", +"AZURE_MANAGEMENT_GROUP", +"AZURE_SUBSCRIPTION", +"AZURE_RESOURCE_GROUP" +], +"enumDescriptions": [ +"Node type is unspecified.", +"The node represents a GCP organization.", +"The node represents a GCP folder.", +"The node represents a GCP project.", +"The node represents an AWS organization.", +"The node represents an AWS organizational unit.", +"The node represents an AWS account.", +"The node represents an Azure management group.", +"The node represents an Azure subscription.", +"The node represents an Azure resource group." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourceValueConfig": { +"description": "A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations.", +"id": "GoogleCloudSecuritycenterV2ResourceValueConfig", +"properties": { +"cloudProvider": { +"description": "Cloud provider this configuration applies to", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Timestamp this resource value config was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the resource value config.", +"type": "string" +}, +"name": { +"description": "Name for the resource value config", +"type": "string" +}, +"resourceLabelsSelector": { +"additionalProperties": { +"type": "string" +}, +"description": "List of resource labels to search for, evaluated with AND. E.g. \"resource_labels_selector\": {\"key\": \"value\", \"env\": \"prod\"} will match resources with labels \"key\": \"value\" AND \"env\": \"prod\" https://cloud.google.com/resource-manager/docs/creating-managing-labels", +"type": "object" +}, +"resourceType": { +"description": "Apply resource_value only to resources that match resource_type. resource_type will be checked with \"AND\" of other resources. E.g. \"storage.googleapis.com/Bucket\" with resource_value \"HIGH\" will apply \"HIGH\" value only to \"storage.googleapis.com/Bucket\" resources.", +"type": "string" +}, +"resourceValue": { +"description": "Resource value level this expression represents Only required when there is no SDP mapping in the request", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"scope": { +"description": "Project or folder to scope this config to. For example, \"project/456\" would apply this config only to resources in \"project/456\" scope will be checked with \"AND\" of other resources.", +"type": "string" +}, +"sensitiveDataProtectionMapping": { +"$ref": "GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping", +"description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." +}, +"tagValues": { +"description": "Required. Tag values combined with AND to check against. Values in the form \"tagValues/123\" E.g. [ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Timestamp this resource value config was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Role": { +"description": "Kubernetes Role or ClusterRole.", +"id": "GoogleCloudSecuritycenterV2Role", +"properties": { +"kind": { +"description": "Role type.", +"enum": [ +"KIND_UNSPECIFIED", +"ROLE", +"CLUSTER_ROLE" +], +"enumDescriptions": [ +"Role type is not specified.", +"Kubernetes Role.", +"Kubernetes ClusterRole." +], +"type": "string" +}, +"name": { +"description": "Role name.", +"type": "string" +}, +"ns": { +"description": "Role namespace.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityBulletin": { +"description": "SecurityBulletin are notifications of vulnerabilities of Google products.", +"id": "GoogleCloudSecuritycenterV2SecurityBulletin", +"properties": { +"bulletinId": { +"description": "ID of the bulletin corresponding to the vulnerability.", +"type": "string" +}, +"submissionTime": { +"description": "Submission time of this Security Bulletin.", +"format": "google-datetime", +"type": "string" +}, +"suggestedUpgradeVersion": { +"description": "This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "GoogleCloudSecuritycenterV2SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. The following list shows some examples: + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + `folders/{folder_id}/assets/{asset_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + `projects/{project_number}/assets/{asset_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name The following list shows some examples: + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityPolicy": { +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding.", +"id": "GoogleCloudSecuritycenterV2SecurityPolicy", +"properties": { +"name": { +"description": "The name of the Google Cloud Armor security policy, for example, \"my-security-policy\".", +"type": "string" +}, +"preview": { +"description": "Whether or not the associated rule or policy is in preview mode.", +"type": "boolean" +}, +"type": { +"description": "The type of Google Cloud Armor security policy for example, \u2018backend security policy\u2019, \u2018edge security policy\u2019, \u2018network edge security policy\u2019, or \u2018always-on DDoS protection\u2019.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityPosture": { +"description": "Represents a posture that is deployed on Google Cloud by the Security Command Center Posture Management service. A posture contains one or more policy sets. A policy set is a group of policies that enforce a set of security rules on Google Cloud.", +"id": "GoogleCloudSecuritycenterV2SecurityPosture", +"properties": { +"changedPolicy": { +"description": "The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`.", +"type": "string" +}, +"name": { +"description": "Name of the posture, for example, `CIS-Posture`.", +"type": "string" +}, +"policy": { +"description": "The ID of the updated policy, for example, `compute-policy-1`.", +"type": "string" +}, +"policyDriftDetails": { +"description": "The details about a change in an updated policy that violates the deployed posture.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2PolicyDriftDetails" +}, +"type": "array" +}, +"policySet": { +"description": "The name of the updated policy set, for example, `cis-policyset`.", +"type": "string" +}, +"postureDeployment": { +"description": "The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.", +"type": "string" +}, +"postureDeploymentResource": { +"description": "The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`.", +"type": "string" +}, +"revisionId": { +"description": "The version of the posture, for example, `c7cfa2a8`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping": { +"description": "Resource value mapping for Sensitive Data Protection findings If any of these mappings have a resource value that is not unspecified, the resource_value field will be ignored when reading this configuration.", +"id": "GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping", +"properties": { +"highSensitivityMapping": { +"description": "Resource value mapping for high-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"mediumSensitivityMapping": { +"description": "Resource value mapping for medium-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo", +"properties": { +"principalEmail": { +"description": "The email address of a Google account.", +"type": "string" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Subject": { +"description": "Represents a Kubernetes subject.", +"id": "GoogleCloudSecuritycenterV2Subject", +"properties": { +"kind": { +"description": "Authentication type for the subject.", +"enum": [ +"AUTH_TYPE_UNSPECIFIED", +"USER", +"SERVICEACCOUNT", +"GROUP" +], +"enumDescriptions": [ +"Authentication is not specified.", +"User with valid certificate.", +"Users managed by Kubernetes API with credentials stored as secrets.", +"Collection of users." +], +"type": "string" +}, +"name": { +"description": "Name for the subject.", +"type": "string" +}, +"ns": { +"description": "Namespace for the subject.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2TicketInfo": { +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding.", +"id": "GoogleCloudSecuritycenterV2TicketInfo", +"properties": { +"assignee": { +"description": "The assignee of the ticket in the ticket system.", +"type": "string" +}, +"description": { +"description": "The description of the ticket in the ticket system.", +"type": "string" +}, +"id": { +"description": "The identifier of the ticket in the ticket system.", +"type": "string" +}, +"status": { +"description": "The latest status of the ticket, as reported by the ticket system.", +"type": "string" +}, +"updateTime": { +"description": "The time when the ticket was last updated, as reported by the ticket system.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "The link to the ticket in the ticket system.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Vulnerability": { +"description": "Refers to common vulnerability fields e.g. cve, cvss, cwe etc.", +"id": "GoogleCloudSecuritycenterV2Vulnerability", +"properties": { +"cve": { +"$ref": "GoogleCloudSecuritycenterV2Cve", +"description": "CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +}, +"fixedPackage": { +"$ref": "GoogleCloudSecuritycenterV2Package", +"description": "The fixed package is relevant to the finding." +}, +"offendingPackage": { +"$ref": "GoogleCloudSecuritycenterV2Package", +"description": "The offending package is relevant to the finding." +}, +"securityBulletin": { +"$ref": "GoogleCloudSecuritycenterV2SecurityBulletin", +"description": "The security bulletin is relevant to this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2YaraRuleSignature": { +"description": "A signature corresponding to a YARA rule.", +"id": "GoogleCloudSecuritycenterV2YaraRuleSignature", +"properties": { +"yaraRule": { +"description": "The name of the YARA rule.", +"type": "string" +} +}, +"type": "object" +}, +"GroupAssetsRequest": { +"description": "Request message for grouping by assets.", +"id": "GroupAssetsRequest", +"properties": { +"compareDuration": { +"description": "When compare_duration is set, the Asset's \"state\" property is updated to indicate whether the asset was added, removed, or remained present during the compare_duration period of time that precedes the read_time. This is the time between (read_time - compare_duration) and read_time. The state value is derived based on the presence of the asset at the two points in time. Intermediate state changes between the two times don't affect the result. For example, the results aren't affected if the asset is removed and re-created again. Possible \"state\" values when compare_duration is specified: * \"ADDED\": indicates that the asset was not present before compare_duration, but present at reference_time. * \"REMOVED\": indicates that the asset was present at the start of compare_duration, but not present at reference_time. * \"ACTIVE\": indicates that the asset was present at both the start and the end of the time period defined by compare_duration and reference_time. This field is ignored if `state` is not a field in `group_by`.", +"format": "google-duration", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across assets. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are not supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the Asset resource. Examples include: * name * security_center_properties.resource_name * resource_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. For example, `resource_properties.size = 100` is a valid filter string.", +"type": "string" +}, +"groupBy": { +"description": "Required. Expression that defines what assets fields to use for grouping. The string value should follow SQL syntax: comma separated list of fields. For example: \"security_center_properties.resource_project,security_center_properties.project\". The following fields are supported when compare_duration is not set: * security_center_properties.resource_project * security_center_properties.resource_type * security_center_properties.resource_parent The following fields are supported when compare_duration is set: * security_center_properties.resource_type", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `GroupAssetsResponse`; indicates that this is a continuation of a prior `GroupAssets` call, and that the system should return the next page of data.", +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering assets. The filter is limited to assets existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GroupAssetsResponse": { +"description": "Response message for grouping by assets.", +"id": "GroupAssetsResponse", +"properties": { +"groupByResults": { +"description": "Group results. There exists an element for each existing unique combination of property/values. The element contains a count for the number of times those specific property/values appear.", +"items": { +"$ref": "GroupResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the groupBy request.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GroupFindingsRequest": { +"description": "Request message for grouping by findings.", +"id": "GroupFindingsRequest", +"properties": { +"filter": { +"description": "Expression that defines the filter to apply across findings. The expression is a list of one or more restrictions combined via logical operators `AND` and `OR`. Parentheses are not supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. Examples include: * name * source_properties.a_property * security_marks.marks.marka The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes. For example, `source_properties.size = 100` is a valid filter string.", +"type": "string" +}, +"groupBy": { +"description": "Required. Expression that defines what assets fields to use for grouping (including `state`). The string value should follow SQL syntax: comma separated list of fields. For example: \"parent,resource_name\". The following fields are supported: * resource_name * category * state * parent", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in a single response. Default is 10, minimum is 1, maximum is 1000.", +"format": "int32", +"type": "integer" +}, +"pageToken": { +"description": "The value returned by the last `GroupFindingsResponse`; indicates that this is a continuation of a prior `GroupFindings` call, and that the system should return the next page of data.", +"type": "string" +}, +"readTime": { +"description": "Time used as a reference point when filtering findings. The filter is limited to findings existing at the supplied time and their values are those at that specific time. Absence of this field will default to the API's version of NOW.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GroupFindingsResponse": { +"description": "Response message for group by findings.", +"id": "GroupFindingsResponse", +"properties": { +"groupByResults": { +"description": "Group results. There exists an element for each existing unique combination of property/values. The element contains a count for the number of times those specific property/values appear.", +"items": { +"$ref": "GroupResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the groupBy request.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GroupResult": { +"description": "Result containing the properties and count of a groupBy request.", +"id": "GroupResult", +"properties": { +"count": { +"description": "Total count of resources for the given properties.", +"format": "int64", +"type": "string" +}, +"properties": { +"additionalProperties": { +"type": "any" +}, +"description": "Properties matching the groupBy fields in the request.", +"type": "object" +} +}, +"type": "object" +}, +"IamBinding": { +"description": "Represents a particular IAM binding, which captures a member's role addition, removal, or state.", +"id": "IamBinding", +"properties": { +"action": { +"description": "The action that was performed on a Binding.", +"enum": [ +"ACTION_UNSPECIFIED", +"ADD", +"REMOVE" +], +"enumDescriptions": [ +"Unspecified.", +"Addition of a Binding.", +"Removal of a Binding." +], +"type": "string" +}, +"member": { +"description": "A single identity requesting access for a Cloud Platform resource, for example, \"foo@google.com\".", +"type": "string" +}, +"role": { +"description": "Role that is assigned to \"members\". For example, \"roles/viewer\", \"roles/editor\", or \"roles/owner\".", +"type": "string" +} +}, +"type": "object" +}, +"Indicator": { +"description": "Represents what's commonly known as an _indicator of compromise_ (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).", +"id": "Indicator", +"properties": { +"domains": { +"description": "List of domains associated to the Finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipAddresses": { +"description": "The list of IP addresses that are associated with the finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"signatures": { +"description": "The list of matched signatures indicating that the given process is present in the environment.", +"items": { +"$ref": "ProcessSignature" +}, +"type": "array" +}, +"uris": { +"description": "The list of URIs associated to the Findings.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"KernelRootkit": { +"description": "Kernel mode rootkit signatures.", +"id": "KernelRootkit", +"properties": { +"name": { +"description": "Rootkit name, when available.", +"type": "string" +}, +"unexpectedCodeModification": { +"description": "True if unexpected modifications of kernel code memory are present.", +"type": "boolean" +}, +"unexpectedFtraceHandler": { +"description": "True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedInterruptHandler": { +"description": "True if interrupt handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKernelCodePages": { +"description": "True if kernel code pages that are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKprobeHandler": { +"description": "True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedProcessesInRunqueue": { +"description": "True if unexpected processes in the scheduler run queue are present. Such processes are in the run queue, but not in the process task list.", +"type": "boolean" +}, +"unexpectedReadOnlyDataModification": { +"description": "True if unexpected modifications of kernel read-only data memory are present.", +"type": "boolean" +}, +"unexpectedSystemCallHandler": { +"description": "True if system call handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +} +}, +"type": "object" +}, +"Kubernetes": { +"description": "Kubernetes-related attributes.", +"id": "Kubernetes", +"properties": { +"accessReviews": { +"description": "Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding.", +"items": { +"$ref": "AccessReview" +}, +"type": "array" +}, +"bindings": { +"description": "Provides Kubernetes role binding information for findings that involve [RoleBindings or ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV1Binding" +}, +"type": "array" +}, +"nodePools": { +"description": "GKE [node pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) associated with the finding. This field contains node pool information for each node, when it is available.", +"items": { +"$ref": "NodePool" +}, +"type": "array" +}, +"nodes": { +"description": "Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information.", +"items": { +"$ref": "Node" +}, +"type": "array" +}, +"objects": { +"description": "Kubernetes objects related to the finding.", +"items": { +"$ref": "Object" +}, +"type": "array" +}, +"pods": { +"description": "Kubernetes [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated with the finding. This field contains Pod records for each container that is owned by a Pod.", +"items": { +"$ref": "Pod" +}, +"type": "array" +}, +"roles": { +"description": "Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "Role" +}, +"type": "array" +} +}, +"type": "object" +}, +"Label": { +"description": "Represents a generic name-value label. A label has separate name and value fields to support filtering with the `contains()` function. For more information, see [Filtering on array-type fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).", +"id": "Label", +"properties": { +"name": { +"description": "Name of the label.", +"type": "string" +}, +"value": { +"description": "Value that corresponds to the label's name.", +"type": "string" +} +}, +"type": "object" +}, +"ListAssetsResponse": { +"description": "Response message for listing assets.", +"id": "ListAssetsResponse", +"properties": { +"listAssetsResults": { +"description": "Assets matching the list request.", +"items": { +"$ref": "ListAssetsResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the list request.", +"format": "google-datetime", +"type": "string" +}, +"totalSize": { +"description": "The total number of assets matching the query.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListAssetsResult": { +"description": "Result containing the Asset and its State.", +"id": "ListAssetsResult", +"properties": { +"asset": { +"$ref": "Asset", +"description": "Asset matching the search request." +}, +"state": { +"description": "State of the asset.", +"enum": [ +"STATE_UNSPECIFIED", +"UNUSED", +"ADDED", +"REMOVED", +"ACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"Request did not specify use of this field in the result.", +"Asset was added between the points in time.", +"Asset was removed between the points in time.", +"Asset was active at both point(s) in time." +], +"type": "string" +} +}, +"type": "object" +}, +"ListFindingsResponse": { +"description": "Response message for listing findings.", +"id": "ListFindingsResponse", +"properties": { +"findings": { +"description": "Findings matching the list request.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1beta1Finding" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"readTime": { +"description": "Time used for executing the list request.", +"format": "google-datetime", +"type": "string" +}, +"totalSize": { +"description": "The total number of findings matching the query.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSourcesResponse": { +"description": "Response message for listing sources.", +"id": "ListSourcesResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results.", +"type": "string" +}, +"sources": { +"description": "Sources belonging to the requested parent.", +"items": { +"$ref": "Source" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoadBalancer": { +"description": "Contains information related to the load balancer associated with the finding.", +"id": "LoadBalancer", +"properties": { +"name": { +"description": "The name of the load balancer associated with the finding.", +"type": "string" +} +}, +"type": "object" +}, +"LogEntry": { +"description": "An individual entry in a log.", +"id": "LogEntry", +"properties": { +"cloudLoggingEntry": { +"$ref": "CloudLoggingEntry", +"description": "An individual entry in a log stored in Cloud Logging." +} +}, +"type": "object" +}, +"MemoryHashSignature": { +"description": "A signature corresponding to memory page hashes.", +"id": "MemoryHashSignature", +"properties": { +"binaryFamily": { +"description": "The binary family.", +"type": "string" +}, +"detections": { +"description": "The list of memory hash detections contributing to the binary family match.", +"items": { +"$ref": "Detection" +}, +"type": "array" +} +}, +"type": "object" +}, +"MitreAttack": { +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org", +"id": "MitreAttack", +"properties": { +"additionalTactics": { +"description": "Additional MITRE ATT&CK tactics related to this finding, if any.", +"items": { +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"type": "array" +}, +"additionalTechniques": { +"description": "Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques.", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"primaryTactic": { +"description": "The MITRE ATT&CK tactic most closely represented by this finding, if any.", +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"primaryTechniques": { +"description": "The MITRE ATT&CK technique most closely represented by this finding, if any. primary_techniques is a repeated field because there are multiple levels of MITRE ATT&CK techniques. If the technique most closely represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The MITRE ATT&CK version referenced by the above fields. E.g. \"8\".", +"type": "string" +} +}, +"type": "object" +}, +"Node": { +"description": "Kubernetes nodes associated with the finding.", +"id": "Node", +"properties": { +"name": { +"description": "[Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node.", +"type": "string" +} +}, +"type": "object" +}, +"NodePool": { +"description": "Provides GKE node pool information.", +"id": "NodePool", +"properties": { +"name": { +"description": "Kubernetes node pool name.", +"type": "string" +}, +"nodes": { +"description": "Nodes associated with the finding.", +"items": { +"$ref": "Node" +}, +"type": "array" +} +}, +"type": "object" +}, +"Notebook": { +"description": "Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise notebook](https://cloud.google.com/colab/docs/introduction) file, that is associated with a finding.", +"id": "Notebook", +"properties": { +"lastAuthor": { +"description": "The user ID of the latest author to modify the notebook.", +"type": "string" +}, +"name": { +"description": "The name of the notebook.", +"type": "string" +}, +"notebookUpdateTime": { +"description": "The most recent time the notebook was updated.", +"format": "google-datetime", +"type": "string" +}, +"service": { +"description": "The source notebook service, for example, \"Colab Enterprise\".", +"type": "string" +} +}, +"type": "object" +}, +"Object": { +"description": "Kubernetes object related to the finding, uniquely identified by GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or AccessReview.", +"id": "Object", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"group": { +"description": "Kubernetes object group, such as \"policy.k8s.io/v1\".", +"type": "string" +}, +"kind": { +"description": "Kubernetes object kind, such as \"Namespace\".", +"type": "string" +}, +"name": { +"description": "Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.", +"type": "string" +}, +"ns": { +"description": "Kubernetes object namespace. Must be a valid DNS label. Named \"ns\" to avoid collision with C++ namespace keyword. For details see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OrgPolicy": { +"description": "Contains information about the org policies associated with the finding.", +"id": "OrgPolicy", +"properties": { +"name": { +"description": "The resource name of the org policy. Example: \"organizations/{organization_id}/policies/{constraint_name}\"", +"type": "string" +} +}, +"type": "object" +}, +"OrganizationSettings": { +"description": "User specified settings that are attached to the Security Command Center organization.", +"id": "OrganizationSettings", +"properties": { +"assetDiscoveryConfig": { +"$ref": "AssetDiscoveryConfig", +"description": "The configuration used for Asset Discovery runs." +}, +"enableAssetDiscovery": { +"description": "A flag that indicates if Asset Discovery should be enabled. If the flag is set to `true`, then discovery of assets will occur. If it is set to `false`, all historical assets will remain, but discovery of future assets will not occur.", +"type": "boolean" +}, +"name": { +"description": "The relative resource name of the settings. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/organizationSettings\".", +"type": "string" +} +}, +"type": "object" +}, +"Package": { +"description": "Package is a generic definition of a package.", +"id": "Package", +"properties": { +"cpeUri": { +"description": "The CPE URI where the vulnerability was detected.", +"type": "string" +}, +"packageName": { +"description": "The name of the package where the vulnerability was detected.", +"type": "string" +}, +"packageType": { +"description": "Type of package, for example, os, maven, or go.", +"type": "string" +}, +"packageVersion": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"Pod": { +"description": "A Kubernetes Pod.", +"id": "Pod", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"labels": { +"description": "Pod labels. For Kubernetes containers, these are applied to the container.", +"items": { +"$ref": "Label" +}, +"type": "array" +}, +"name": { +"description": "Kubernetes Pod name.", +"type": "string" +}, +"ns": { +"description": "Kubernetes Pod namespace.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PolicyDriftDetails": { +"description": "The policy field that violates the deployed posture and its expected and detected values.", +"id": "PolicyDriftDetails", +"properties": { +"detectedValue": { +"description": "The detected value that violates the deployed posture, for example, `false` or `allowed_values={\"projects/22831892\"}`.", +"type": "string" +}, +"expectedValue": { +"description": "The value of this field that was configured in a posture, for example, `true` or `allowed_values={\"projects/29831892\"}`.", +"type": "string" +}, +"field": { +"description": "The name of the updated field, for example constraint.implementation.policy_rules[0].enforce", +"type": "string" +} +}, +"type": "object" +}, +"Process": { +"description": "Represents an operating system process.", +"id": "Process", +"properties": { +"args": { +"description": "Process arguments as JSON encoded strings.", +"items": { +"type": "string" +}, +"type": "array" +}, +"argumentsTruncated": { +"description": "True if `args` is incomplete.", +"type": "boolean" +}, +"binary": { +"$ref": "File", +"description": "File information for the process executable." +}, +"envVariables": { +"description": "Process environment variables.", +"items": { +"$ref": "EnvironmentVariable" +}, +"type": "array" +}, +"envVariablesTruncated": { +"description": "True if `env_variables` is incomplete.", +"type": "boolean" +}, +"libraries": { +"description": "File information for libraries loaded by the process.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"name": { +"description": "The process name, as displayed in utilities like `top` and `ps`. This name can be accessed through `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.", +"type": "string" +}, +"parentPid": { +"description": "The parent process ID.", +"format": "int64", +"type": "string" +}, +"pid": { +"description": "The process ID.", +"format": "int64", +"type": "string" +}, +"script": { +"$ref": "File", +"description": "When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter." +} +}, +"type": "object" +}, +"ProcessSignature": { +"description": "Indicates what signature matched this process.", +"id": "ProcessSignature", +"properties": { +"memoryHashSignature": { +"$ref": "MemoryHashSignature", +"description": "Signature indicating that a binary family was matched." +}, +"signatureType": { +"description": "Describes the type of resource associated with the signature.", +"enum": [ +"SIGNATURE_TYPE_UNSPECIFIED", +"SIGNATURE_TYPE_PROCESS", +"SIGNATURE_TYPE_FILE" +], +"enumDescriptions": [ +"The default signature type.", +"Used for signatures concerning processes.", +"Used for signatures concerning disks." +], +"type": "string" +}, +"yaraRuleSignature": { +"$ref": "YaraRuleSignature", +"description": "Signature indicating that a YARA rule was matched." +} +}, +"type": "object" +}, +"Reference": { +"description": "Additional Links", +"id": "Reference", +"properties": { +"source": { +"description": "Source of the reference e.g. NVD", +"type": "string" +}, +"uri": { +"description": "Uri for the mentioned source e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527.", +"type": "string" +} +}, +"type": "object" +}, +"Requests": { +"description": "Information about the requests relevant to the finding.", +"id": "Requests", +"properties": { +"longTermAllowed": { +"description": "Allowed RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"longTermDenied": { +"description": "Denied RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"ratio": { +"description": "For 'Increasing deny ratio', the ratio is the denied traffic divided by the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed traffic in the short term divided by allowed traffic in the long term.", +"format": "double", +"type": "number" +}, +"shortTermAllowed": { +"description": "Allowed RPS (requests per second) in the short term.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResourcePath": { +"description": "Represents the path of resources leading up to the resource this finding is about.", +"id": "ResourcePath", +"properties": { +"nodes": { +"description": "The list of nodes that make the up resource path, ordered from lowest level to highest level.", +"items": { +"$ref": "ResourcePathNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"ResourcePathNode": { +"description": "A node within the resource path. Each node represents a resource within the resource hierarchy.", +"id": "ResourcePathNode", +"properties": { +"displayName": { +"description": "The display name of the resource this node represents.", +"type": "string" +}, +"id": { +"description": "The ID of the resource this node represents.", +"type": "string" +}, +"nodeType": { +"description": "The type of resource this node represents.", +"enum": [ +"RESOURCE_PATH_NODE_TYPE_UNSPECIFIED", +"GCP_ORGANIZATION", +"GCP_FOLDER", +"GCP_PROJECT", +"AWS_ORGANIZATION", +"AWS_ORGANIZATIONAL_UNIT", +"AWS_ACCOUNT", +"AZURE_MANAGEMENT_GROUP", +"AZURE_SUBSCRIPTION", +"AZURE_RESOURCE_GROUP" +], +"enumDescriptions": [ +"Node type is unspecified.", +"The node represents a GCP organization.", +"The node represents a GCP folder.", +"The node represents a GCP project.", +"The node represents an AWS organization.", +"The node represents an AWS organizational unit.", +"The node represents an AWS account.", +"The node represents an Azure management group.", +"The node represents an Azure subscription.", +"The node represents an Azure resource group." +], +"type": "string" +} +}, +"type": "object" +}, +"Role": { +"description": "Kubernetes Role or ClusterRole.", +"id": "Role", +"properties": { +"kind": { +"description": "Role type.", +"enum": [ +"KIND_UNSPECIFIED", +"ROLE", +"CLUSTER_ROLE" +], +"enumDescriptions": [ +"Role type is not specified.", +"Kubernetes Role.", +"Kubernetes ClusterRole." +], +"type": "string" +}, +"name": { +"description": "Role name.", +"type": "string" +}, +"ns": { +"description": "Role namespace.", +"type": "string" +} +}, +"type": "object" +}, +"RunAssetDiscoveryRequest": { +"description": "Request message for running asset discovery for an organization.", +"id": "RunAssetDiscoveryRequest", +"properties": {}, +"type": "object" +}, +"SecurityBulletin": { +"description": "SecurityBulletin are notifications of vulnerabilities of Google products.", +"id": "SecurityBulletin", +"properties": { +"bulletinId": { +"description": "ID of the bulletin corresponding to the vulnerability.", +"type": "string" +}, +"submissionTime": { +"description": "Submission time of this Security Bulletin.", +"format": "google-datetime", +"type": "string" +}, +"suggestedUpgradeVersion": { +"description": "This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0", +"type": "string" +} +}, +"type": "object" +}, +"SecurityCenterProperties": { +"description": "Security Command Center managed properties. These properties are managed by Security Command Center and cannot be modified by the user.", +"id": "SecurityCenterProperties", +"properties": { +"resourceName": { +"description": "Immutable. The full resource name of the Google Cloud resource this asset represents. This field is immutable after create time. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceOwners": { +"description": "Owners of the Google Cloud resource.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resourceParent": { +"description": "The full resource name of the immediate parent of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceProject": { +"description": "The full resource name of the project the resource belongs to. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceType": { +"description": "The type of the Google Cloud resource. Examples include: APPLICATION, PROJECT, and ORGANIZATION. This is a case insensitive field defined by Security Command Center and/or the producer of the resource and is immutable after create time.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"folders/{folder_id}/assets/{asset_id}/securityMarks\" \"projects/{project_number}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks\"", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"type": "string" +} +}, +"type": "object" +}, +"SecurityPolicy": { +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding.", +"id": "SecurityPolicy", +"properties": { +"name": { +"description": "The name of the Google Cloud Armor security policy, for example, \"my-security-policy\".", +"type": "string" +}, +"preview": { +"description": "Whether or not the associated rule or policy is in preview mode.", +"type": "boolean" +}, +"type": { +"description": "The type of Google Cloud Armor security policy for example, \u2018backend security policy\u2019, \u2018edge security policy\u2019, \u2018network edge security policy\u2019, or \u2018always-on DDoS protection\u2019.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityPosture": { +"description": "Represents a posture that is deployed on Google Cloud by the Security Command Center Posture Management service. A posture contains one or more policy sets. A policy set is a group of policies that enforce a set of security rules on Google Cloud.", +"id": "SecurityPosture", +"properties": { +"changedPolicy": { +"description": "The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`.", +"type": "string" +}, +"name": { +"description": "Name of the posture, for example, `CIS-Posture`.", +"type": "string" +}, +"policy": { +"description": "The ID of the updated policy, for example, `compute-policy-1`.", +"type": "string" +}, +"policyDriftDetails": { +"description": "The details about a change in an updated policy that violates the deployed posture.", +"items": { +"$ref": "PolicyDriftDetails" +}, +"type": "array" +}, +"policySet": { +"description": "The name of the updated policyset, for example, `cis-policyset`.", +"type": "string" +}, +"postureDeployment": { +"description": "The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.", +"type": "string" +}, +"postureDeploymentResource": { +"description": "The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`.", +"type": "string" +}, +"revisionId": { +"description": "The version of the posture, for example, `c7cfa2a8`.", +"type": "string" +} +}, +"type": "object" +}, +"ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "ServiceAccountDelegationInfo", +"properties": { +"principalEmail": { +"description": "The email address of a Google account.", +"type": "string" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +} +}, +"type": "object" +}, +"SetFindingStateRequest": { +"description": "Request message for updating a finding's state.", +"id": "SetFindingStateRequest", +"properties": { +"startTime": { +"description": "Required. The time at which the updated state takes effect.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Required. The desired State of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Source": { +"description": "Security Command Center finding source. A finding source is an entity or a mechanism that can produce a finding. A source is like a container of findings that come from the same scanner, logger, monitor, etc.", +"id": "Source", +"properties": { +"description": { +"description": "The description of the source (max of 1024 characters). Example: \"Web Security Scanner is a web security scanner for common vulnerabilities in App Engine applications. It can automatically scan and detect four common vulnerabilities, including cross-site-scripting (XSS), Flash injection, mixed content (HTTP in HTTPS), and outdated/insecure libraries.\"", +"type": "string" +}, +"displayName": { +"description": "The source's display name. A source's display name must be unique amongst its siblings, for example, two sources with the same parent can't share the same display name. The display name must have a length between 1 and 64 characters (inclusive).", +"type": "string" +}, +"name": { +"description": "The relative resource name of this source. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subject": { +"description": "Represents a Kubernetes subject.", +"id": "Subject", +"properties": { +"kind": { +"description": "Authentication type for the subject.", +"enum": [ +"AUTH_TYPE_UNSPECIFIED", +"USER", +"SERVICEACCOUNT", +"GROUP" +], +"enumDescriptions": [ +"Authentication is not specified.", +"User with valid certificate.", +"Users managed by Kubernetes API with credentials stored as secrets.", +"Collection of users." +], +"type": "string" +}, +"name": { +"description": "Name for the subject.", +"type": "string" +}, +"ns": { +"description": "Namespace for the subject.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TicketInfo": { +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding.", +"id": "TicketInfo", +"properties": { +"assignee": { +"description": "The assignee of the ticket in the ticket system.", +"type": "string" +}, +"description": { +"description": "The description of the ticket in the ticket system.", +"type": "string" +}, +"id": { +"description": "The identifier of the ticket in the ticket system.", +"type": "string" +}, +"status": { +"description": "The latest status of the ticket, as reported by the ticket system.", +"type": "string" +}, +"updateTime": { +"description": "The time when the ticket was last updated, as reported by the ticket system.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "The link to the ticket in the ticket system.", +"type": "string" +} +}, +"type": "object" +}, +"Vulnerability": { +"description": "Refers to common vulnerability fields e.g. cve, cvss, cwe etc.", +"id": "Vulnerability", +"properties": { +"cve": { +"$ref": "Cve", +"description": "CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +}, +"fixedPackage": { +"$ref": "Package", +"description": "The fixed package is relevant to the finding." +}, +"offendingPackage": { +"$ref": "Package", +"description": "The offending package is relevant to the finding." +}, +"securityBulletin": { +"$ref": "SecurityBulletin", +"description": "The security bulletin is relevant to this finding." +} +}, +"type": "object" +}, +"VulnerabilityCountBySeverity": { +"description": "Vulnerability count by severity.", +"id": "VulnerabilityCountBySeverity", +"properties": { +"severityToFindingCount": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Key is the Severity enum.", +"type": "object" +} +}, +"type": "object" +}, +"VulnerabilitySnapshot": { +"description": "Result containing the properties and count of a VulnerabilitySnapshot request.", +"id": "VulnerabilitySnapshot", +"properties": { +"cloudProvider": { +"description": "The cloud provider for the vulnerability snapshot.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"findingCount": { +"$ref": "VulnerabilityCountBySeverity", +"description": "The vulnerability count by severity." +}, +"name": { +"description": "Identifier. The vulnerability snapshot name. Format: //locations//vulnerabilitySnapshots/", +"type": "string" +}, +"snapshotTime": { +"description": "The time that the snapshot was taken.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"YaraRuleSignature": { +"description": "A signature corresponding to a YARA rule.", +"id": "YaraRuleSignature", +"properties": { +"yaraRule": { +"description": "The name of the YARA rule.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Security Command Center API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1beta2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1beta2.json new file mode 100644 index 0000000000000000000000000000000000000000..3cb45605e1fb011fa4e788dfc61c0f4d7c5446c1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/securitycenter.v1beta2.json @@ -0,0 +1,8476 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://securitycenter.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Security Command Center", +"description": "Security Command Center API provides access to temporal views of assets and findings within an organization.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/security-command-center", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "securitycenter:v1beta2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://securitycenter.mtls.googleapis.com/", +"name": "securitycenter", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"folders": { +"methods": { +"getContainerThreatDetectionSettings": { +"description": "Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/folders/{foldersId}/containerThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.folders.getContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getEventThreatDetectionSettings": { +"description": "Get the EventThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetEventThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateEventThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/folders/{foldersId}/eventThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.folders.getEventThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the EventThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getRapidVulnerabilityDetectionSettings": { +"description": "Get the RapidVulnerabilityDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetRapidVulnerabilityDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this purpose.", +"flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.folders.getRapidVulnerabilityDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getSecurityCenterSettings": { +"description": "Get the SecurityCenterSettings resource.", +"flatPath": "v1beta2/folders/{foldersId}/securityCenterSettings", +"httpMethod": "GET", +"id": "securitycenter.folders.getSecurityCenterSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityCenterSettings to retrieve. Format: organizations/{organization}/securityCenterSettings Format: folders/{folder}/securityCenterSettings Format: projects/{project}/securityCenterSettings", +"location": "path", +"pattern": "^folders/[^/]+/securityCenterSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecurityCenterSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getSecurityHealthAnalyticsSettings": { +"description": "Get the SecurityHealthAnalyticsSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetSecurityHealthAnalyticsSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateSecurityHealthAnalyticsSettings for this purpose.", +"flatPath": "v1beta2/folders/{foldersId}/securityHealthAnalyticsSettings", +"httpMethod": "GET", +"id": "securitycenter.folders.getSecurityHealthAnalyticsSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityHealthAnalyticsSettings to retrieve. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getVirtualMachineThreatDetectionSettings": { +"description": "Get the VirtualMachineThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetVirtualMachineThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/folders/{foldersId}/virtualMachineThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.folders.getVirtualMachineThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the VirtualMachineThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getWebSecurityScannerSettings": { +"description": "Get the WebSecurityScannerSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetWebSecurityScannerSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateWebSecurityScannerSettings for this purpose.", +"flatPath": "v1beta2/folders/{foldersId}/webSecurityScannerSettings", +"httpMethod": "GET", +"id": "securitycenter.folders.getWebSecurityScannerSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the WebSecurityScannerSettings to retrieve. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^folders/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateContainerThreatDetectionSettings": { +"description": "Update the ContainerThreatDetectionSettings resource.", +"flatPath": "v1beta2/folders/{foldersId}/containerThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.folders.updateContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "ContainerThreatDetectionSettings" +}, +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateEventThreatDetectionSettings": { +"description": "Update the EventThreatDetectionSettings resource.", +"flatPath": "v1beta2/folders/{foldersId}/eventThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.folders.updateEventThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "EventThreatDetectionSettings" +}, +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateRapidVulnerabilityDetectionSettings": { +"description": "Update the RapidVulnerabilityDetectionSettings resource.", +"flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.folders.updateRapidVulnerabilityDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityHealthAnalyticsSettings": { +"description": "Update the SecurityHealthAnalyticsSettings resource.", +"flatPath": "v1beta2/folders/{foldersId}/securityHealthAnalyticsSettings", +"httpMethod": "PATCH", +"id": "securitycenter.folders.updateSecurityHealthAnalyticsSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateVirtualMachineThreatDetectionSettings": { +"description": "Update the VirtualMachineThreatDetectionSettings resource.", +"flatPath": "v1beta2/folders/{foldersId}/virtualMachineThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.folders.updateVirtualMachineThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateWebSecurityScannerSettings": { +"description": "Update the WebSecurityScannerSettings resource.", +"flatPath": "v1beta2/folders/{foldersId}/webSecurityScannerSettings", +"httpMethod": "PATCH", +"id": "securitycenter.folders.updateWebSecurityScannerSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^folders/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "WebSecurityScannerSettings" +}, +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"containerThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/folders/{foldersId}/containerThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.folders.containerThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"eventThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/folders/{foldersId}/eventThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.folders.eventThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"rapidVulnerabilityDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/folders/{foldersId}/rapidVulnerabilityDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.folders.rapidVulnerabilityDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityHealthAnalyticsSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/folders/{foldersId}/securityHealthAnalyticsSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.folders.securityHealthAnalyticsSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityHealthAnalyticsSettings to calculate. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^folders/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"virtualMachineThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/folders/{foldersId}/virtualMachineThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.folders.virtualMachineThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the VirtualMachineThreatDetectionSettings to calculate. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^folders/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"webSecurityScannerSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/folders/{foldersId}/webSecurityScannerSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.folders.webSecurityScannerSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the WebSecurityScannerSettings to calculate. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^folders/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"organizations": { +"methods": { +"getContainerThreatDetectionSettings": { +"description": "Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/organizations/{organizationsId}/containerThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getEventThreatDetectionSettings": { +"description": "Get the EventThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetEventThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateEventThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/organizations/{organizationsId}/eventThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getEventThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the EventThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getRapidVulnerabilityDetectionSettings": { +"description": "Get the RapidVulnerabilityDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetRapidVulnerabilityDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this purpose.", +"flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getRapidVulnerabilityDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getSecurityCenterSettings": { +"description": "Get the SecurityCenterSettings resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/securityCenterSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getSecurityCenterSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityCenterSettings to retrieve. Format: organizations/{organization}/securityCenterSettings Format: folders/{folder}/securityCenterSettings Format: projects/{project}/securityCenterSettings", +"location": "path", +"pattern": "^organizations/[^/]+/securityCenterSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecurityCenterSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getSecurityHealthAnalyticsSettings": { +"description": "Get the SecurityHealthAnalyticsSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetSecurityHealthAnalyticsSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateSecurityHealthAnalyticsSettings for this purpose.", +"flatPath": "v1beta2/organizations/{organizationsId}/securityHealthAnalyticsSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getSecurityHealthAnalyticsSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityHealthAnalyticsSettings to retrieve. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getSubscription": { +"description": "Get the Subscription resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/subscription", +"httpMethod": "GET", +"id": "securitycenter.organizations.getSubscription", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the subscription to retrieve. Format: organizations/{organization}/subscription", +"location": "path", +"pattern": "^organizations/[^/]+/subscription$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getVirtualMachineThreatDetectionSettings": { +"description": "Get the VirtualMachineThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetVirtualMachineThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/organizations/{organizationsId}/virtualMachineThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getVirtualMachineThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the VirtualMachineThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getWebSecurityScannerSettings": { +"description": "Get the WebSecurityScannerSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetWebSecurityScannerSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateWebSecurityScannerSettings for this purpose.", +"flatPath": "v1beta2/organizations/{organizationsId}/webSecurityScannerSettings", +"httpMethod": "GET", +"id": "securitycenter.organizations.getWebSecurityScannerSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the WebSecurityScannerSettings to retrieve. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^organizations/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateContainerThreatDetectionSettings": { +"description": "Update the ContainerThreatDetectionSettings resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/containerThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "ContainerThreatDetectionSettings" +}, +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateEventThreatDetectionSettings": { +"description": "Update the EventThreatDetectionSettings resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/eventThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateEventThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "EventThreatDetectionSettings" +}, +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateRapidVulnerabilityDetectionSettings": { +"description": "Update the RapidVulnerabilityDetectionSettings resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateRapidVulnerabilityDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityHealthAnalyticsSettings": { +"description": "Update the SecurityHealthAnalyticsSettings resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/securityHealthAnalyticsSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateSecurityHealthAnalyticsSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateVirtualMachineThreatDetectionSettings": { +"description": "Update the VirtualMachineThreatDetectionSettings resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/virtualMachineThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateVirtualMachineThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateWebSecurityScannerSettings": { +"description": "Update the WebSecurityScannerSettings resource.", +"flatPath": "v1beta2/organizations/{organizationsId}/webSecurityScannerSettings", +"httpMethod": "PATCH", +"id": "securitycenter.organizations.updateWebSecurityScannerSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^organizations/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "WebSecurityScannerSettings" +}, +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"containerThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/organizations/{organizationsId}/containerThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.organizations.containerThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"eventThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/organizations/{organizationsId}/eventThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.organizations.eventThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"rapidVulnerabilityDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/organizations/{organizationsId}/rapidVulnerabilityDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.organizations.rapidVulnerabilityDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityHealthAnalyticsSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/organizations/{organizationsId}/securityHealthAnalyticsSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.organizations.securityHealthAnalyticsSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityHealthAnalyticsSettings to calculate. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^organizations/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"virtualMachineThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/organizations/{organizationsId}/virtualMachineThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.organizations.virtualMachineThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the VirtualMachineThreatDetectionSettings to calculate. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^organizations/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"webSecurityScannerSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/organizations/{organizationsId}/webSecurityScannerSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.organizations.webSecurityScannerSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the WebSecurityScannerSettings to calculate. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^organizations/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"projects": { +"methods": { +"getContainerThreatDetectionSettings": { +"description": "Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/projects/{projectsId}/containerThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.getContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getEventThreatDetectionSettings": { +"description": "Get the EventThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetEventThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateEventThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/projects/{projectsId}/eventThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.getEventThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the EventThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getRapidVulnerabilityDetectionSettings": { +"description": "Get the RapidVulnerabilityDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetRapidVulnerabilityDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateRapidVulnerabilityDetectionSettings for this purpose.", +"flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.getRapidVulnerabilityDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the RapidVulnerabilityDetectionSettings to retrieve. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getSecurityCenterSettings": { +"description": "Get the SecurityCenterSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/securityCenterSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.getSecurityCenterSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityCenterSettings to retrieve. Format: organizations/{organization}/securityCenterSettings Format: folders/{folder}/securityCenterSettings Format: projects/{project}/securityCenterSettings", +"location": "path", +"pattern": "^projects/[^/]+/securityCenterSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecurityCenterSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getSecurityHealthAnalyticsSettings": { +"description": "Get the SecurityHealthAnalyticsSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetSecurityHealthAnalyticsSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateSecurityHealthAnalyticsSettings for this purpose.", +"flatPath": "v1beta2/projects/{projectsId}/securityHealthAnalyticsSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.getSecurityHealthAnalyticsSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityHealthAnalyticsSettings to retrieve. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getVirtualMachineThreatDetectionSettings": { +"description": "Get the VirtualMachineThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetVirtualMachineThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateVirtualMachineThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/projects/{projectsId}/virtualMachineThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.getVirtualMachineThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the VirtualMachineThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getWebSecurityScannerSettings": { +"description": "Get the WebSecurityScannerSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetWebSecurityScannerSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateWebSecurityScannerSettings for this purpose.", +"flatPath": "v1beta2/projects/{projectsId}/webSecurityScannerSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.getWebSecurityScannerSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the WebSecurityScannerSettings to retrieve. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^projects/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateContainerThreatDetectionSettings": { +"description": "Update the ContainerThreatDetectionSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/containerThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.projects.updateContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "ContainerThreatDetectionSettings" +}, +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateEventThreatDetectionSettings": { +"description": "Update the EventThreatDetectionSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/eventThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.projects.updateEventThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "EventThreatDetectionSettings" +}, +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateRapidVulnerabilityDetectionSettings": { +"description": "Update the RapidVulnerabilityDetectionSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.projects.updateRapidVulnerabilityDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateSecurityHealthAnalyticsSettings": { +"description": "Update the SecurityHealthAnalyticsSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/securityHealthAnalyticsSettings", +"httpMethod": "PATCH", +"id": "securitycenter.projects.updateSecurityHealthAnalyticsSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateVirtualMachineThreatDetectionSettings": { +"description": "Update the VirtualMachineThreatDetectionSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/virtualMachineThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.projects.updateVirtualMachineThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateWebSecurityScannerSettings": { +"description": "Update the WebSecurityScannerSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/webSecurityScannerSettings", +"httpMethod": "PATCH", +"id": "securitycenter.projects.updateWebSecurityScannerSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^projects/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "WebSecurityScannerSettings" +}, +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"containerThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/projects/{projectsId}/containerThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.projects.containerThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"eventThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective EventThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/projects/{projectsId}/eventThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.projects.eventThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the EventThreatDetectionSettings to calculate. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/eventThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "EventThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"locations": { +"resources": { +"clusters": { +"methods": { +"getContainerThreatDetectionSettings": { +"description": "Get the ContainerThreatDetectionSettings resource. In the returned settings response, a missing field only indicates that it was not explicitly set, so no assumption should be made about these fields. In other words, GetContainerThreatDetectionSettings does not calculate the effective service settings for the resource, which accounts for inherited settings and defaults. Instead, use CalculateContainerThreatDetectionSettings for this purpose.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/containerThreatDetectionSettings", +"httpMethod": "GET", +"id": "securitycenter.projects.locations.clusters.getContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to retrieve. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateContainerThreatDetectionSettings": { +"description": "Update the ContainerThreatDetectionSettings resource.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/containerThreatDetectionSettings", +"httpMethod": "PATCH", +"id": "securitycenter.projects.locations.clusters.updateContainerThreatDetectionSettings", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta2/{+name}", +"request": { +"$ref": "ContainerThreatDetectionSettings" +}, +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"containerThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective ContainerThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/clusters/{clustersId}/containerThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.projects.locations.clusters.containerThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ContainerThreatDetectionSettings to calculate. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/clusters/[^/]+/containerThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "ContainerThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"rapidVulnerabilityDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective RapidVulnerabilityDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/projects/{projectsId}/rapidVulnerabilityDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.projects.rapidVulnerabilityDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the RapidVulnerabilityDetectionSettings to calculate. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/rapidVulnerabilityDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "RapidVulnerabilityDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"securityHealthAnalyticsSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective SecurityHealthAnalyticsSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/projects/{projectsId}/securityHealthAnalyticsSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.projects.securityHealthAnalyticsSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the SecurityHealthAnalyticsSettings to calculate. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"location": "path", +"pattern": "^projects/[^/]+/securityHealthAnalyticsSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "SecurityHealthAnalyticsSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"virtualMachineThreatDetectionSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective VirtualMachineThreatDetectionSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/projects/{projectsId}/virtualMachineThreatDetectionSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.projects.virtualMachineThreatDetectionSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the VirtualMachineThreatDetectionSettings to calculate. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"location": "path", +"pattern": "^projects/[^/]+/virtualMachineThreatDetectionSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "VirtualMachineThreatDetectionSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"webSecurityScannerSettings": { +"methods": { +"calculate": { +"description": "Calculates the effective WebSecurityScannerSettings based on its level in the resource hierarchy and its settings. Settings provided closer to the target resource take precedence over those further away (e.g. folder will override organization level settings). The default SCC setting for the detector service defaults can be overridden at organization, folder and project levels. No assumptions should be made about the SCC defaults as it is considered an internal implementation detail.", +"flatPath": "v1beta2/projects/{projectsId}/webSecurityScannerSettings:calculate", +"httpMethod": "GET", +"id": "securitycenter.projects.webSecurityScannerSettings.calculate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the WebSecurityScannerSettings to calculate. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"location": "path", +"pattern": "^projects/[^/]+/webSecurityScannerSettings$", +"required": true, +"type": "string" +} +}, +"path": "v1beta2/{+name}:calculate", +"response": { +"$ref": "WebSecurityScannerSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://securitycenter.googleapis.com/", +"schemas": { +"Access": { +"description": "Represents an access event.", +"id": "Access", +"properties": { +"callerIp": { +"description": "Caller's IP address, such as \"1.1.1.1\".", +"type": "string" +}, +"callerIpGeo": { +"$ref": "Geolocation", +"description": "The caller IP's geolocation, which identifies where the call came from." +}, +"methodName": { +"description": "The method that the service account called, e.g. \"SetIamPolicy\".", +"type": "string" +}, +"principalEmail": { +"description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user or a service account acting on behalf of a third party principal making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "A string that represents the principal_subject that is associated with the identity. Unlike `principal_email`, `principal_subject` supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format is `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, still use the legacy format `serviceAccount:{identity pool name}[{subject}]`.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "The identity delegation history of an authenticated service account that made the request. The `serviceAccountDelegationInfo[]` object contains information about the real authorities that try to access Google Cloud resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key that was used to create or exchange credentials when authenticating the service account that made the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\". ", +"type": "string" +}, +"serviceName": { +"description": "This is the API service that the service account made a call to, e.g. \"iam.googleapis.com\"", +"type": "string" +}, +"userAgent": { +"description": "The caller's user agent string associated with the finding.", +"type": "string" +}, +"userAgentFamily": { +"description": "Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application.", +"type": "string" +}, +"userName": { +"description": "A string that represents a username. The username provided depends on the type of the finding and is likely not an IAM principal. For example, this can be a system username if the finding is related to a virtual machine, or it can be an application login username.", +"type": "string" +} +}, +"type": "object" +}, +"AccessReview": { +"description": "Conveys information about a Kubernetes access review (such as one returned by a [`kubectl auth can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) command) that was involved in a finding.", +"id": "AccessReview", +"properties": { +"group": { +"description": "The API group of the resource. \"*\" means all.", +"type": "string" +}, +"name": { +"description": "The name of the resource being requested. Empty means all.", +"type": "string" +}, +"ns": { +"description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", +"type": "string" +}, +"resource": { +"description": "The optional resource type requested. \"*\" means all.", +"type": "string" +}, +"subresource": { +"description": "The optional subresource type.", +"type": "string" +}, +"verb": { +"description": "A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. \"*\" means all.", +"type": "string" +}, +"version": { +"description": "The API version of the resource. \"*\" means all.", +"type": "string" +} +}, +"type": "object" +}, +"AdaptiveProtection": { +"description": "Information about [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).", +"id": "AdaptiveProtection", +"properties": { +"confidence": { +"description": "A score of 0 means that there is low confidence that the detected event is an actual attack. A score of 1 means that there is high confidence that the detected event is an attack. See the [Adaptive Protection documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) for further explanation.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Application": { +"description": "Represents an application associated with a finding.", +"id": "Application", +"properties": { +"baseUri": { +"description": "The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`.", +"type": "string" +}, +"fullUri": { +"description": "The full URI with payload that can be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`.", +"type": "string" +} +}, +"type": "object" +}, +"Attack": { +"description": "Information about DDoS attack volume and classification.", +"id": "Attack", +"properties": { +"classification": { +"description": "Type of attack, for example, \u2018SYN-flood\u2019, \u2018NTP-udp\u2019, or \u2018CHARGEN-udp\u2019.", +"type": "string" +}, +"volumeBps": { +"description": "Total BPS (bytes per second) volume of attack.", +"format": "int32", +"type": "integer" +}, +"volumePps": { +"description": "Total PPS (packets per second) volume of attack.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AttackExposure": { +"description": "An attack exposure contains the results of an attack path simulation run.", +"id": "AttackExposure", +"properties": { +"attackExposureResult": { +"description": "The resource name of the attack path simulation result that contains the details regarding this attack exposure score. Example: organizations/123/simulations/456/attackExposureResults/789", +"type": "string" +}, +"exposedHighValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedLowValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedMediumValueResourcesCount": { +"description": "The number of medium value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"latestCalculationTime": { +"description": "The most recent time the attack exposure was updated on this finding.", +"format": "google-datetime", +"type": "string" +}, +"score": { +"description": "A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate.", +"format": "double", +"type": "number" +}, +"state": { +"description": "What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not.", +"enum": [ +"STATE_UNSPECIFIED", +"CALCULATED", +"NOT_CALCULATED" +], +"enumDescriptions": [ +"The state is not specified.", +"The attack exposure has been calculated.", +"The attack exposure has not been calculated." +], +"type": "string" +} +}, +"type": "object" +}, +"AwsAccount": { +"description": "An AWS account that is a member of an organization.", +"id": "AwsAccount", +"properties": { +"id": { +"description": "The unique identifier (ID) of the account, containing exactly 12 digits.", +"type": "string" +}, +"name": { +"description": "The friendly name of this account.", +"type": "string" +} +}, +"type": "object" +}, +"AwsMetadata": { +"description": "AWS metadata associated with the resource, only applicable if the finding's cloud provider is Amazon Web Services.", +"id": "AwsMetadata", +"properties": { +"account": { +"$ref": "AwsAccount", +"description": "The AWS account associated with the resource." +}, +"organization": { +"$ref": "AwsOrganization", +"description": "The AWS organization associated with the resource." +}, +"organizationalUnits": { +"description": "A list of AWS organizational units associated with the resource, ordered from lowest level (closest to the account) to highest level.", +"items": { +"$ref": "AwsOrganizationalUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"AwsOrganization": { +"description": "An organization is a collection of accounts that are centrally managed together using consolidated billing, organized hierarchically with organizational units (OUs), and controlled with policies.", +"id": "AwsOrganization", +"properties": { +"id": { +"description": "The unique identifier (ID) for the organization. The regex pattern for an organization ID string requires \"o-\" followed by from 10 to 32 lowercase letters or digits.", +"type": "string" +} +}, +"type": "object" +}, +"AwsOrganizationalUnit": { +"description": "An Organizational Unit (OU) is a container of AWS accounts within a root of an organization. Policies that are attached to an OU apply to all accounts contained in that OU and in any child OUs.", +"id": "AwsOrganizationalUnit", +"properties": { +"id": { +"description": "The unique identifier (ID) associated with this OU. The regex pattern for an organizational unit ID string requires \"ou-\" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second \"-\" dash and from 8 to 32 additional lowercase letters or digits. For example, \"ou-ab12-cd34ef56\".", +"type": "string" +}, +"name": { +"description": "The friendly name of the OU.", +"type": "string" +} +}, +"type": "object" +}, +"BackupDisasterRecovery": { +"description": "Information related to Google Cloud Backup and DR Service findings.", +"id": "BackupDisasterRecovery", +"properties": { +"appliance": { +"description": "The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`.", +"type": "string" +}, +"applications": { +"description": "The names of Backup and DR applications. An application is a VM, database, or file system on a managed host monitored by a backup and recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, `centos7-01-vol02`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"backupCreateTime": { +"description": "The timestamp at which the Backup and DR backup was created.", +"format": "google-datetime", +"type": "string" +}, +"backupTemplate": { +"description": "The name of a Backup and DR template which comprises one or more backup policies. See the [Backup and DR documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) for more information. For example, `snap-ov`.", +"type": "string" +}, +"backupType": { +"description": "The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`.", +"type": "string" +}, +"host": { +"description": "The name of a Backup and DR host, which is managed by the backup and recovery appliance and known to the management console. The host can be of type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file system, etc.), vCenter, or an ESX server. See the [Backup and DR documentation on hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) for more information. For example, `centos7-01`.", +"type": "string" +}, +"policies": { +"description": "The names of Backup and DR policies that are associated with a template and that define when to run a backup, how frequently to run a backup, and how long to retain the backup image. For example, `onvaults`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"policyOptions": { +"description": "The names of Backup and DR advanced policy options of a policy applying to an application. See the [Backup and DR documentation on policy options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). For example, `skipofflineappsincongrp, nounmap`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"profile": { +"description": "The name of the Backup and DR resource profile that specifies the storage media for backups of application and VM data. See the [Backup and DR documentation on profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). For example, `GCP`.", +"type": "string" +}, +"storagePool": { +"description": "The name of the Backup and DR storage pool that the backup and recovery appliance is storing data in. The storage pool could be of type Cloud, Primary, Snapshot, or OnVault. See the [Backup and DR documentation on storage pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). For example, `DiskPoolOne`.", +"type": "string" +} +}, +"type": "object" +}, +"CloudArmor": { +"description": "Fields related to Google Cloud Armor findings.", +"id": "CloudArmor", +"properties": { +"adaptiveProtection": { +"$ref": "AdaptiveProtection", +"description": "Information about potential Layer 7 DDoS attacks identified by [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview)." +}, +"attack": { +"$ref": "Attack", +"description": "Information about DDoS attack volume and classification." +}, +"duration": { +"description": "Duration of attack from the start until the current moment (updated every 5 minutes).", +"format": "google-duration", +"type": "string" +}, +"requests": { +"$ref": "Requests", +"description": "Information about incoming requests evaluated by [Google Cloud Armor security policies](https://cloud.google.com/armor/docs/security-policy-overview)." +}, +"securityPolicy": { +"$ref": "SecurityPolicy", +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding." +}, +"threatVector": { +"description": "Distinguish between volumetric & protocol DDoS attack and application layer attacks. For example, \u201cL3_4\u201d for Layer 3 and Layer 4 DDoS attacks, or \u201cL_7\u201d for Layer 7 DDoS attacks.", +"type": "string" +} +}, +"type": "object" +}, +"CloudDlpDataProfile": { +"description": "The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding.", +"id": "CloudDlpDataProfile", +"properties": { +"dataProfile": { +"description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", +"type": "string" +}, +"parentType": { +"description": "The resource hierarchy level at which the data profile was generated.", +"enum": [ +"PARENT_TYPE_UNSPECIFIED", +"ORGANIZATION", +"PROJECT" +], +"enumDescriptions": [ +"Unspecified parent type.", +"Organization-level configurations.", +"Project-level configurations." +], +"type": "string" +} +}, +"type": "object" +}, +"CloudDlpInspection": { +"description": "Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding.", +"id": "CloudDlpInspection", +"properties": { +"fullScan": { +"description": "Whether Cloud DLP scanned the complete resource or a sampled subset.", +"type": "boolean" +}, +"infoType": { +"description": "The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.", +"type": "string" +}, +"infoTypeCount": { +"description": "The number of times Cloud DLP found this infoType within this job and resource.", +"format": "int64", +"type": "string" +}, +"inspectJob": { +"description": "Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`.", +"type": "string" +} +}, +"type": "object" +}, +"CloudLoggingEntry": { +"description": "Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)", +"id": "CloudLoggingEntry", +"properties": { +"insertId": { +"description": "A unique identifier for the log entry.", +"type": "string" +}, +"logId": { +"description": "The type of the log (part of `log_name`. `log_name` is the resource name of the log to which this log entry belongs). For example: `cloudresourcemanager.googleapis.com/activity`. Note that this field is not URL-encoded, unlike the `LOG_ID` field in `LogEntry`.", +"type": "string" +}, +"resourceContainer": { +"description": "The organization, folder, or project of the monitored resource that produced this log entry.", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "Compliance", +"properties": { +"ids": { +"description": "Policies within the standard or benchmark, for example, A.12.4.1", +"items": { +"type": "string" +}, +"type": "array" +}, +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"ComplianceSnapshot": { +"description": "Result containing the properties and count of a ComplianceSnapshot request.", +"id": "ComplianceSnapshot", +"properties": { +"category": { +"description": "The category of Findings matching.", +"type": "string" +}, +"cloudProvider": { +"description": "The cloud provider for the compliance snapshot.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"complianceStandard": { +"description": "The compliance standard (ie CIS).", +"type": "string" +}, +"complianceVersion": { +"description": "The compliance version (ie 1.3) in CIS 1.3.", +"type": "string" +}, +"count": { +"description": "Total count of findings for the given properties.", +"format": "int64", +"type": "string" +}, +"leafContainerResource": { +"description": "The leaf container resource name that is closest to the snapshot.", +"type": "string" +}, +"name": { +"description": "The compliance snapshot name. Format: //sources//complianceSnapshots/", +"type": "string" +}, +"snapshotTime": { +"description": "The snapshot time of the snapshot.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Config": { +"description": "Configuration of a module.", +"id": "Config", +"properties": { +"moduleEnablementState": { +"description": "The state of enablement for the module at its level of the resource hierarchy.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"INHERITED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"State is inherited from the parent resource.", +"State is enabled.", +"State is disabled." +], +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The configuration value for the module. The absence of this field implies its inheritance from the parent.", +"type": "object" +} +}, +"type": "object" +}, +"Connection": { +"description": "Contains information about the IP connection associated with the finding.", +"id": "Connection", +"properties": { +"destinationIp": { +"description": "Destination IP address. Not present for sockets that are listening and not connected.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Not present for sockets that are listening and not connected.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IANA Internet Protocol Number such as TCP(6) and UDP(17).", +"enum": [ +"PROTOCOL_UNSPECIFIED", +"ICMP", +"TCP", +"UDP", +"GRE", +"ESP" +], +"enumDescriptions": [ +"Unspecified protocol (not HOPOPT).", +"Internet Control Message Protocol.", +"Transmission Control Protocol.", +"User Datagram Protocol.", +"Generic Routing Encapsulation.", +"Encap Security Payload." +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourcePort": { +"description": "Source port.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Contact": { +"description": "The email address of a contact.", +"id": "Contact", +"properties": { +"email": { +"description": "An email address. For example, \"`person123@company.com`\".", +"type": "string" +} +}, +"type": "object" +}, +"ContactDetails": { +"description": "Details about specific contacts", +"id": "ContactDetails", +"properties": { +"contacts": { +"description": "A list of contacts", +"items": { +"$ref": "Contact" +}, +"type": "array" +} +}, +"type": "object" +}, +"Container": { +"description": "Container associated with the finding.", +"id": "Container", +"properties": { +"createTime": { +"description": "The time that the container was created.", +"format": "google-datetime", +"type": "string" +}, +"imageId": { +"description": "Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", +"type": "string" +}, +"labels": { +"description": "Container labels, as provided by the container runtime.", +"items": { +"$ref": "Label" +}, +"type": "array" +}, +"name": { +"description": "Name of the container.", +"type": "string" +}, +"uri": { +"description": "Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags.", +"type": "string" +} +}, +"type": "object" +}, +"ContainerThreatDetectionSettings": { +"description": "Resource capturing the settings for the Container Threat Detection service.", +"id": "ContainerThreatDetectionSettings", +"properties": { +"modules": { +"additionalProperties": { +"$ref": "Config" +}, +"description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", +"type": "object" +}, +"name": { +"description": "The resource name of the ContainerThreatDetectionSettings. Formats: * organizations/{organization}/containerThreatDetectionSettings * folders/{folder}/containerThreatDetectionSettings * projects/{project}/containerThreatDetectionSettings * projects/{project}/locations/{location}/clusters/{cluster}/containerThreatDetectionSettings", +"type": "string" +}, +"serviceAccount": { +"description": "Output only. The service account used by Container Threat Detection for scanning. Service accounts are scoped at the project level meaning this field will be empty at any level above a project.", +"readOnly": true, +"type": "string" +}, +"serviceEnablementState": { +"description": "The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"INHERITED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"State is inherited from the parent resource.", +"State is enabled.", +"State is disabled." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the settings were last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Cve": { +"description": "CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability.", +"id": "Cve", +"properties": { +"cvssv3": { +"$ref": "Cvssv3", +"description": "Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document" +}, +"exploitationActivity": { +"description": "The exploitation activity of the vulnerability in the wild.", +"enum": [ +"EXPLOITATION_ACTIVITY_UNSPECIFIED", +"WIDE", +"CONFIRMED", +"AVAILABLE", +"ANTICIPATED", +"NO_KNOWN" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation has been reported or confirmed to widely occur.", +"Limited reported or confirmed exploitation activities.", +"Exploit is publicly available.", +"No known exploitation activity, but has a high potential for exploitation.", +"No known exploitation activity." +], +"type": "string" +}, +"id": { +"description": "The unique identifier for the vulnerability. e.g. CVE-2021-34527", +"type": "string" +}, +"impact": { +"description": "The potential impact of the vulnerability if it was to be exploited.", +"enum": [ +"RISK_RATING_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation would have little to no security impact.", +"Exploitation would enable attackers to perform activities, or could allow attackers to have a direct impact, but would require additional steps.", +"Exploitation would enable attackers to have a notable direct impact without needing to overcome any major mitigating factors.", +"Exploitation would fundamentally undermine the security of affected systems, enable actors to perform significant attacks with minimal effort, with little to no mitigating factors to overcome." +], +"type": "string" +}, +"observedInTheWild": { +"description": "Whether or not the vulnerability has been observed in the wild.", +"type": "boolean" +}, +"references": { +"description": "Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527", +"items": { +"$ref": "Reference" +}, +"type": "array" +}, +"upstreamFixAvailable": { +"description": "Whether upstream fix is available for the CVE.", +"type": "boolean" +}, +"zeroDay": { +"description": "Whether or not the vulnerability was zero day when the finding was published.", +"type": "boolean" +} +}, +"type": "object" +}, +"Cvssv3": { +"description": "Common Vulnerability Scoring System version 3.", +"id": "Cvssv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "double", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"Database": { +"description": "Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of Cloud SQL instances or Cloud Spanner instances), or the database instance itself. Some database resources might not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types, such as Cloud SQL databases, are not yet supported by Cloud Asset Inventory. In these cases only the display name is provided.", +"id": "Database", +"properties": { +"displayName": { +"description": "The human-readable name of the database that the user connected to.", +"type": "string" +}, +"grantees": { +"description": "The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Some database resources may not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.", +"type": "string" +}, +"query": { +"description": "The SQL statement that is associated with the database access.", +"type": "string" +}, +"userName": { +"description": "The username used to connect to the database. The username might not be an IAM principal and does not have a set format.", +"type": "string" +}, +"version": { +"description": "The version of the database, for example, POSTGRES_14. See [the complete list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"type": "string" +} +}, +"type": "object" +}, +"Details": { +"description": "Details of a subscription.", +"id": "Details", +"properties": { +"endTime": { +"description": "The time the subscription has or will end.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The time the subscription has or will start.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "The type of subscription", +"enum": [ +"TYPE_UNSPECIFIED", +"STANDARD", +"TRIAL", +"ALPHA", +"DEMO", +"PAY_AS_YOU_GO" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The standard subscription.", +"The trial subscription.", +"The alpha subscription.", +"The demo subscription for channel partners.", +"Pay-as-you-go subscription." +], +"type": "string" +} +}, +"type": "object" +}, +"Detection": { +"description": "Memory hash detection contributing to the binary family match.", +"id": "Detection", +"properties": { +"binary": { +"description": "The name of the binary associated with the memory hash signature detection.", +"type": "string" +}, +"percentPagesMatched": { +"description": "The percentage of memory page hashes in the signature that were matched.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"DiskPath": { +"description": "Path of the file in terms of underlying disk/partition identifiers.", +"id": "DiskPath", +"properties": { +"partitionUuid": { +"description": "UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)", +"type": "string" +}, +"relativePath": { +"description": "Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh", +"type": "string" +} +}, +"type": "object" +}, +"EnvironmentVariable": { +"description": "A name-value pair representing an environment variable used in an operating system process.", +"id": "EnvironmentVariable", +"properties": { +"name": { +"description": "Environment variable name as a JSON encoded string.", +"type": "string" +}, +"val": { +"description": "Environment variable value as a JSON encoded string.", +"type": "string" +} +}, +"type": "object" +}, +"EventThreatDetectionSettings": { +"description": "Resource capturing the settings for the Event Threat Detection service.", +"id": "EventThreatDetectionSettings", +"properties": { +"modules": { +"additionalProperties": { +"$ref": "Config" +}, +"description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", +"type": "object" +}, +"name": { +"description": "The resource name of the EventThreatDetectionSettings. Formats: * organizations/{organization}/eventThreatDetectionSettings * folders/{folder}/eventThreatDetectionSettings * projects/{project}/eventThreatDetectionSettings", +"type": "string" +}, +"serviceEnablementState": { +"description": "The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"INHERITED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"State is inherited from the parent resource.", +"State is enabled.", +"State is disabled." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the settings were last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExfilResource": { +"description": "Resource where data was exfiltrated from or exfiltrated to.", +"id": "ExfilResource", +"properties": { +"components": { +"description": "Subcomponents of the asset that was exfiltrated, like URIs used during exfiltration, table names, databases, and filenames. For example, multiple tables might have been exfiltrated from the same Cloud SQL instance, or multiple files might have been exfiltrated from the same Cloud Storage bucket.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name).", +"type": "string" +} +}, +"type": "object" +}, +"Exfiltration": { +"description": "Exfiltration represents a data exfiltration attempt from one or more sources to one or more targets. The `sources` attribute lists the sources of the exfiltrated data. The `targets` attribute lists the destinations the data was copied to.", +"id": "Exfiltration", +"properties": { +"sources": { +"description": "If there are multiple sources, then the data is considered \"joined\" between them. For instance, BigQuery can join multiple tables, and each table would be considered a source.", +"items": { +"$ref": "ExfilResource" +}, +"type": "array" +}, +"targets": { +"description": "If there are multiple targets, each target would get a complete copy of the \"joined\" source data.", +"items": { +"$ref": "ExfilResource" +}, +"type": "array" +}, +"totalExfiltratedBytes": { +"description": "Total exfiltrated bytes processed for the entire job.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"File": { +"description": "File information about the related binary/library used by an executable, or the script used by a script interpreter", +"id": "File", +"properties": { +"contents": { +"description": "Prefix of the file contents as a JSON-encoded string.", +"type": "string" +}, +"diskPath": { +"$ref": "DiskPath", +"description": "Path of the file in terms of underlying disk/partition identifiers." +}, +"hashedSize": { +"description": "The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.", +"format": "int64", +"type": "string" +}, +"partiallyHashed": { +"description": "True when the hash covers only a prefix of the file.", +"type": "boolean" +}, +"path": { +"description": "Absolute path of the file as a JSON encoded string.", +"type": "string" +}, +"sha256": { +"description": "SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.", +"type": "string" +}, +"size": { +"description": "Size of the file in bytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.", +"id": "Finding", +"properties": { +"access": { +"$ref": "Access", +"description": "Access details associated with the finding, such as more information on the caller, which method was accessed, and from where." +}, +"application": { +"$ref": "Application", +"description": "Represents an application associated with the finding." +}, +"attackExposure": { +"$ref": "AttackExposure", +"description": "The results of an attack path simulation relevant to this finding." +}, +"backupDisasterRecovery": { +"$ref": "BackupDisasterRecovery", +"description": "Fields related to Backup and DR findings." +}, +"canonicalName": { +"description": "The canonical name of the finding. It's either \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\" or \"projects/{project_number}/sources/{source_id}/findings/{finding_id}\", depending on the closest CRM ancestor of the resource associated with the finding.", +"type": "string" +}, +"category": { +"description": "The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"cloudArmor": { +"$ref": "CloudArmor", +"description": "Fields related to Cloud Armor findings." +}, +"cloudDlpDataProfile": { +"$ref": "CloudDlpDataProfile", +"description": "Cloud DLP data profile that is associated with the finding." +}, +"cloudDlpInspection": { +"$ref": "CloudDlpInspection", +"description": "Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding." +}, +"compliances": { +"description": "Contains compliance information for security standards associated to the finding.", +"items": { +"$ref": "Compliance" +}, +"type": "array" +}, +"connections": { +"description": "Contains information about the IP connection associated with the finding.", +"items": { +"$ref": "Connection" +}, +"type": "array" +}, +"contacts": { +"additionalProperties": { +"$ref": "ContactDetails" +}, +"description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", +"readOnly": true, +"type": "object" +}, +"containers": { +"description": "Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"createTime": { +"description": "The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"database": { +"$ref": "Database", +"description": "Database associated with the finding." +}, +"description": { +"description": "Contains more details about the finding.", +"type": "string" +}, +"eventTime": { +"description": "The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"exfiltration": { +"$ref": "Exfiltration", +"description": "Represents exfiltrations associated with the finding." +}, +"externalSystems": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV1ExternalSystem" +}, +"description": "Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields.", +"readOnly": true, +"type": "object" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"files": { +"description": "File associated with the finding.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"findingClass": { +"description": "The class of the finding.", +"enum": [ +"FINDING_CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"SCC_ERROR", +"POSTURE_VIOLATION" +], +"enumDescriptions": [ +"Unspecified finding class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality.", +"Describes a potential security risk due to a change in the security posture." +], +"type": "string" +}, +"iamBindings": { +"description": "Represents IAM bindings associated with the finding.", +"items": { +"$ref": "IamBinding" +}, +"type": "array" +}, +"indicator": { +"$ref": "Indicator", +"description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." +}, +"kernelRootkit": { +"$ref": "KernelRootkit", +"description": "Signature of the kernel rootkit." +}, +"kubernetes": { +"$ref": "Kubernetes", +"description": "Kubernetes resources associated with the finding." +}, +"loadBalancers": { +"description": "The load balancers associated with the finding.", +"items": { +"$ref": "LoadBalancer" +}, +"type": "array" +}, +"logEntries": { +"description": "Log entries that are relevant to the finding.", +"items": { +"$ref": "LogEntry" +}, +"type": "array" +}, +"mitreAttack": { +"$ref": "MitreAttack", +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org" +}, +"moduleName": { +"description": "Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885", +"type": "string" +}, +"mute": { +"description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", +"enum": [ +"MUTE_UNSPECIFIED", +"MUTED", +"UNMUTED", +"UNDEFINED" +], +"enumDescriptions": [ +"Unspecified.", +"Finding has been muted.", +"Finding has been unmuted.", +"Finding has never been muted/unmuted." +], +"type": "string" +}, +"muteInitiator": { +"description": "Records additional information about the mute operation, for example, the [mute configuration](/security-command-center/docs/how-to-mute-findings) that muted the finding and the user who muted the finding.", +"type": "string" +}, +"muteUpdateTime": { +"description": "Output only. The most recent time this finding was muted or unmuted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\", \"projects/{project_id}/sources/{source_id}/findings/{finding_id}\".", +"type": "string" +}, +"nextSteps": { +"description": "Steps to address the finding.", +"type": "string" +}, +"notebook": { +"$ref": "Notebook", +"description": "Notebook associated with the finding." +}, +"orgPolicies": { +"description": "Contains information about the org policies associated with the finding.", +"items": { +"$ref": "OrgPolicy" +}, +"type": "array" +}, +"parent": { +"description": "The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +}, +"parentDisplayName": { +"description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", +"readOnly": true, +"type": "string" +}, +"processes": { +"description": "Represents operating system processes associated with the Finding.", +"items": { +"$ref": "Process" +}, +"type": "array" +}, +"resourceName": { +"description": "For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.", +"type": "string" +}, +"securityMarks": { +"$ref": "SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"securityPosture": { +"$ref": "SecurityPosture", +"description": "The security posture associated with the finding." +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"This value is used for findings when a source doesn't write a severity value.", +"Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data and public SSH access with weak or no passwords. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", +"Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", +"Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", +"Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +}, +"vulnerability": { +"$ref": "Vulnerability", +"description": "Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +} +}, +"type": "object" +}, +"Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GcpMetadata": { +"description": "GCP metadata associated with the resource, only applicable if the finding's cloud provider is Google Cloud Platform.", +"id": "GcpMetadata", +"properties": { +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Folder" +}, +"readOnly": true, +"type": "array" +}, +"organization": { +"description": "The name of the organization that the resource belongs to.", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project ID that the resource belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"Geolocation": { +"description": "Represents a geographical location for a given access.", +"id": "Geolocation", +"properties": { +"regionCode": { +"description": "A CLDR.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1BigQueryExport": { +"description": "Configures how to deliver Findings to BigQuery Instance.", +"id": "GoogleCloudSecuritycenterV1BigQueryExport", +"properties": { +"createTime": { +"description": "Output only. The time at which the BigQuery export was created. This field is set by the server and will be ignored if provided on export on creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataset": { +"description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", +"type": "string" +}, +"description": { +"description": "The description of the export (max of 1024 characters).", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the BigQuery export. This field is set by the server and will be ignored if provided on export creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. Example format: \"organizations/{organization_id}/bigQueryExports/{export_id}\" Example format: \"folders/{folder_id}/bigQueryExports/{export_id}\" Example format: \"projects/{project_id}/bigQueryExports/{export_id}\" This field is provided in responses, and is ignored when provided in create requests.", +"type": "string" +}, +"principal": { +"description": "Output only. The service account that needs permission to create table and upload data to the BigQuery dataset.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the BigQuery export was updated. This field is set by the server and will be ignored if provided on export creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Binding": { +"description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", +"id": "GoogleCloudSecuritycenterV1Binding", +"properties": { +"name": { +"description": "Name for the binding.", +"type": "string" +}, +"ns": { +"description": "Namespace for the binding.", +"type": "string" +}, +"role": { +"$ref": "Role", +"description": "The Role or ClusterRole referenced by the binding." +}, +"subjects": { +"description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", +"items": { +"$ref": "Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1BulkMuteFindingsResponse": { +"description": "The response to a BulkMute request. Contains the LRO information.", +"id": "GoogleCloudSecuritycenterV1BulkMuteFindingsResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1CustomConfig": { +"description": "Defines the properties in a custom module configuration for Security Health Analytics. Use the custom module configuration to create custom detectors that generate custom findings for resources that you specify.", +"id": "GoogleCloudSecuritycenterV1CustomConfig", +"properties": { +"customOutput": { +"$ref": "GoogleCloudSecuritycenterV1CustomOutputSpec", +"description": "Custom output properties." +}, +"description": { +"description": "Text that describes the vulnerability or misconfiguration that the custom module detects. This explanation is returned with each finding instance to help investigators understand the detected issue. The text must be enclosed in quotation marks.", +"type": "string" +}, +"predicate": { +"$ref": "Expr", +"description": "The CEL expression to evaluate to produce findings. When the expression evaluates to true against a resource, a finding is generated." +}, +"recommendation": { +"description": "An explanation of the recommended steps that security teams can take to resolve the detected issue. This explanation is returned with each finding generated by this module in the `nextSteps` property of the finding JSON.", +"type": "string" +}, +"resourceSelector": { +"$ref": "GoogleCloudSecuritycenterV1ResourceSelector", +"description": "The resource types that the custom module operates on. Each custom module can specify up to 5 resource types." +}, +"severity": { +"description": "The severity to assign to findings generated by the module.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"Unspecified severity.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1CustomOutputSpec": { +"description": "A set of optional name-value pairs that define custom source properties to return with each finding that is generated by the custom module. The custom source properties that are defined here are included in the finding JSON under `sourceProperties`.", +"id": "GoogleCloudSecuritycenterV1CustomOutputSpec", +"properties": { +"properties": { +"description": "A list of custom output properties to add to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1Property" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule": { +"description": "An EffectiveSecurityHealthAnalyticsCustomModule is the representation of a Security Health Analytics custom module at a specified level of the resource hierarchy: organization, folder, or project. If a custom module is inherited from a parent organization or folder, the value of the `enablementState` property in EffectiveSecurityHealthAnalyticsCustomModule is set to the value that is effective in the parent, instead of `INHERITED`. For example, if the module is enabled in a parent organization or folder, the effective enablement_state for the module in all child folders or projects is also `enabled`. EffectiveSecurityHealthAnalyticsCustomModule is read-only.", +"id": "GoogleCloudSecuritycenterV1EffectiveSecurityHealthAnalyticsCustomModule", +"properties": { +"customConfig": { +"$ref": "GoogleCloudSecuritycenterV1CustomConfig", +"description": "Output only. The user-specified configuration for the module.", +"readOnly": true +}, +"displayName": { +"description": "Output only. The display name for the custom module. The name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only.", +"readOnly": true, +"type": "string" +}, +"enablementState": { +"description": "Output only. The effective state of enablement for the module at the given level of the hierarchy.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given level.", +"The module is disabled at the given level." +], +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/effectiveCustomModules/{customModule}\"", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ExternalSystem": { +"description": "Representation of third party SIEM/SOAR fields within SCC.", +"id": "GoogleCloudSecuritycenterV1ExternalSystem", +"properties": { +"assignees": { +"description": "References primary/secondary etc assignees in the external system.", +"items": { +"type": "string" +}, +"type": "array" +}, +"caseCloseTime": { +"description": "The time when the case was closed, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseCreateTime": { +"description": "The time when the case was created, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"casePriority": { +"description": "The priority of the finding's corresponding case in the external system.", +"type": "string" +}, +"caseSla": { +"description": "The SLA of the finding's corresponding case in the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseUri": { +"description": "The link to the finding's corresponding case in the external system.", +"type": "string" +}, +"externalSystemUpdateTime": { +"description": "The time when the case was last updated, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"externalUid": { +"description": "The identifier that's used to track the finding's corresponding case in the external system.", +"type": "string" +}, +"name": { +"description": "Full resource name of the external system, for example: \"organizations/1234/sources/5678/findings/123456/externalSystems/jira\", \"folders/1234/sources/5678/findings/123456/externalSystems/jira\", \"projects/1234/sources/5678/findings/123456/externalSystems/jira\"", +"type": "string" +}, +"status": { +"description": "The most recent status of the finding's corresponding case, as reported by the external system.", +"type": "string" +}, +"ticketInfo": { +"$ref": "TicketInfo", +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1MuteConfig": { +"description": "A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings.", +"id": "GoogleCloudSecuritycenterV1MuteConfig", +"properties": { +"createTime": { +"description": "Output only. The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of the mute config.", +"type": "string" +}, +"displayName": { +"deprecated": true, +"description": "The human readable name to be displayed for the mute config.", +"type": "string" +}, +"filter": { +"description": "Required. An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "This field will be ignored if provided on config creation. Format \"organizations/{organization}/muteConfigs/{mute_config}\" \"folders/{folder}/muteConfigs/{mute_config}\" \"projects/{project}/muteConfigs/{mute_config}\" \"organizations/{organization}/locations/global/muteConfigs/{mute_config}\" \"folders/{folder}/locations/global/muteConfigs/{mute_config}\" \"projects/{project}/locations/global/muteConfigs/{mute_config}\"", +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1NotificationMessage": { +"description": "Cloud SCC's Notification", +"id": "GoogleCloudSecuritycenterV1NotificationMessage", +"properties": { +"finding": { +"$ref": "Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV1Resource", +"description": "The Cloud resource tied to this notification's Finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Property": { +"description": "An individual name-value pair that defines a custom source property.", +"id": "GoogleCloudSecuritycenterV1Property", +"properties": { +"name": { +"description": "Name of the property for the custom output.", +"type": "string" +}, +"valueExpression": { +"$ref": "Expr", +"description": "The CEL expression for the custom output. A resource property can be specified to return the value of the property or a text string enclosed in quotation marks." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV1Resource", +"properties": { +"awsMetadata": { +"$ref": "AwsMetadata", +"description": "The AWS metadata associated with the finding." +}, +"cloudProvider": { +"description": "Indicates which cloud provider the resource resides in.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"displayName": { +"description": "The human readable name of the resource.", +"type": "string" +}, +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "Folder" +}, +"readOnly": true, +"type": "array" +}, +"location": { +"description": "The region or location of the service (if applicable).", +"type": "string" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"organization": { +"description": "Indicates which organization or tenant in the cloud provider the finding applies to.", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project ID that the resource belongs to.", +"type": "string" +}, +"resourcePath": { +"$ref": "ResourcePath", +"description": "Provides the path to the resource within the resource hierarchy." +}, +"resourcePathString": { +"description": "A string representation of the resource path. For GCP, it has the format of: organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} where there can be any number of folders. For AWS, it has the format of: org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of: mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", +"type": "string" +}, +"service": { +"description": "The parent service or product from which the resource is provided, for example, GKE or SNS.", +"type": "string" +}, +"type": { +"description": "The full resource type of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ResourceSelector": { +"description": "Resource for selecting resource type.", +"id": "GoogleCloudSecuritycenterV1ResourceSelector", +"properties": { +"resourceTypes": { +"description": "The resource types to run the detector on.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1ResourceValueConfig": { +"description": "A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations.", +"id": "GoogleCloudSecuritycenterV1ResourceValueConfig", +"properties": { +"cloudProvider": { +"description": "Cloud provider this configuration applies to", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Timestamp this resource value config was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the resource value config.", +"type": "string" +}, +"name": { +"description": "Name for the resource value config", +"type": "string" +}, +"resourceLabelsSelector": { +"additionalProperties": { +"type": "string" +}, +"description": "List of resource labels to search for, evaluated with AND. E.g. \"resource_labels_selector\": {\"key\": \"value\", \"env\": \"prod\"} will match resources with labels \"key\": \"value\" AND \"env\": \"prod\" https://cloud.google.com/resource-manager/docs/creating-managing-labels", +"type": "object" +}, +"resourceType": { +"description": "Apply resource_value only to resources that match resource_type. resource_type will be checked with \"AND\" of other resources. E.g. \"storage.googleapis.com/Bucket\" with resource_value \"HIGH\" will apply \"HIGH\" value only to \"storage.googleapis.com/Bucket\" resources.", +"type": "string" +}, +"resourceValue": { +"description": "Required. Resource value level this expression represents", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"scope": { +"description": "Project or folder to scope this config to. For example, \"project/456\" would apply this config only to resources in \"project/456\" scope will be checked with \"AND\" of other resources.", +"type": "string" +}, +"sensitiveDataProtectionMapping": { +"$ref": "GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping", +"description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." +}, +"tagValues": { +"description": "Required. Tag values combined with AND to check against. Values in the form \"tagValues/123\" E.g. [ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Timestamp this resource value config was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule": { +"description": "Represents an instance of a Security Health Analytics custom module, including its full module name, display name, enablement state, and last updated time. You can create a custom module at the organization, folder, or project level. Custom modules that you create at the organization or folder level are inherited by the child folders and projects.", +"id": "GoogleCloudSecuritycenterV1SecurityHealthAnalyticsCustomModule", +"properties": { +"ancestorModule": { +"description": "Output only. If empty, indicates that the custom module was created in the organization, folder, or project in which you are viewing the custom module. Otherwise, `ancestor_module` specifies the organization or folder from which the custom module is inherited.", +"readOnly": true, +"type": "string" +}, +"customConfig": { +"$ref": "GoogleCloudSecuritycenterV1CustomConfig", +"description": "The user specified custom configuration for the module." +}, +"displayName": { +"description": "The display name of the Security Health Analytics custom module. This display name becomes the finding category for all findings that are returned by this custom module. The display name must be between 1 and 128 characters, start with a lowercase letter, and contain alphanumeric characters or underscores only.", +"type": "string" +}, +"enablementState": { +"description": "The enablement state of the custom module.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"ENABLED", +"DISABLED", +"INHERITED" +], +"enumDescriptions": [ +"Unspecified enablement state.", +"The module is enabled at the given CRM resource.", +"The module is disabled at the given CRM resource.", +"State is inherited from an ancestor module. The module will either be effectively ENABLED or DISABLED based on its closest non-inherited ancestor module in the CRM hierarchy." +], +"type": "string" +}, +"lastEditor": { +"description": "Output only. The editor that last updated the custom module.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Immutable. The resource name of the custom module. Its format is \"organizations/{organization}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"folders/{folder}/securityHealthAnalyticsSettings/customModules/{customModule}\", or \"projects/{project}/securityHealthAnalyticsSettings/customModules/{customModule}\" The id {customModule} is server-generated and is not user settable. It will be a numeric id containing 1-20 digits.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which the custom module was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping": { +"description": "Resource value mapping for Sensitive Data Protection findings. If any of these mappings have a resource value that is not unspecified, the resource_value field will be ignored when reading this configuration.", +"id": "GoogleCloudSecuritycenterV1SensitiveDataProtectionMapping", +"properties": { +"highSensitivityMapping": { +"description": "Resource value mapping for high-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"mediumSensitivityMapping": { +"description": "Resource value mapping for medium-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1beta1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data (security, risk, health or privacy) ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, an XSS vulnerability in an App Engine application is a finding.", +"id": "GoogleCloudSecuritycenterV1p1beta1Finding", +"properties": { +"canonicalName": { +"description": "The canonical name of the finding. It's either \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\", \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}\" or \"projects/{project_number}/sources/{source_id}/findings/{finding_id}\", depending on the closest CRM ancestor of the resource associated with the finding.", +"type": "string" +}, +"category": { +"description": "The additional taxonomy group within findings from a given source. This field is immutable after creation time. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"createTime": { +"description": "The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"type": "string" +}, +"eventTime": { +"description": "The time at which the event took place, or when an update to the finding occurred. For example, if the finding represents an open firewall it would capture the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding were to be resolved afterward, this time would reflect when the finding was resolved. Must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"name": { +"description": "The relative resource name of this finding. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Example: \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}\"", +"type": "string" +}, +"parent": { +"description": "The relative resource name of the source the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. For example: \"organizations/{organization_id}/sources/{source_id}\"", +"type": "string" +}, +"resourceName": { +"description": "For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string. This field is immutable after creation time.", +"type": "string" +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No severity specified. The default value.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "GoogleCloudSecuritycenterV1p1beta1Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1NotificationMessage": { +"description": "Security Command Center's Notification", +"id": "GoogleCloudSecuritycenterV1p1beta1NotificationMessage", +"properties": { +"finding": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Resource", +"description": "The Cloud resource tied to the notification." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV1p1beta1Resource", +"properties": { +"folders": { +"description": "Output only. Contains a Folder message for each folder in the assets ancestry. The first folder is the deepest nested folder, and the last folder is the folder directly under the Organization.", +"items": { +"$ref": "GoogleCloudSecuritycenterV1p1beta1Folder" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"parent": { +"description": "The full resource name of resource's parent.", +"type": "string" +}, +"parentDisplayName": { +"description": "The human readable name of resource's parent.", +"type": "string" +}, +"project": { +"description": "The full resource name of project that the resource belongs to.", +"type": "string" +}, +"projectDisplayName": { +"description": "The project id that the resource belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse": { +"description": "Response of asset discovery run", +"id": "GoogleCloudSecuritycenterV1p1beta1RunAssetDiscoveryResponse", +"properties": { +"duration": { +"description": "The duration between asset discovery run start and end", +"format": "google-duration", +"type": "string" +}, +"state": { +"description": "The state of an asset discovery run.", +"enum": [ +"STATE_UNSPECIFIED", +"COMPLETED", +"SUPERSEDED", +"TERMINATED" +], +"enumDescriptions": [ +"Asset discovery run state was unspecified.", +"Asset discovery run completed successfully.", +"Asset discovery run was cancelled with tasks still pending, as another run for the same organization was started with a higher priority.", +"Asset discovery run was killed and terminated." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV1p1beta1SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "GoogleCloudSecuritycenterV1p1beta1SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"folders/{folder_id}/assets/{asset_id}/securityMarks\" \"projects/{project_number}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks\"", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Access": { +"description": "Represents an access event.", +"id": "GoogleCloudSecuritycenterV2Access", +"properties": { +"callerIp": { +"description": "Caller's IP address, such as \"1.1.1.1\".", +"type": "string" +}, +"callerIpGeo": { +"$ref": "GoogleCloudSecuritycenterV2Geolocation", +"description": "The caller IP's geolocation, which identifies where the call came from." +}, +"methodName": { +"description": "The method that the service account called, e.g. \"SetIamPolicy\".", +"type": "string" +}, +"principalEmail": { +"description": "Associated email, such as \"foo@google.com\". The email address of the authenticated user or a service account acting on behalf of a third party principal making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "A string that represents the principal_subject that is associated with the identity. Unlike `principal_email`, `principal_subject` supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format is `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`. Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD, still use the legacy format `serviceAccount:{identity pool name}[{subject}]`.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "The identity delegation history of an authenticated service account that made the request. The `serviceAccountDelegationInfo[]` object contains information about the real authorities that try to access Google Cloud resources by delegating on a service account. When multiple authorities are present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key that was used to create or exchange credentials when authenticating the service account that made the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\". ", +"type": "string" +}, +"serviceName": { +"description": "This is the API service that the service account made a call to, e.g. \"iam.googleapis.com\"", +"type": "string" +}, +"userAgent": { +"description": "The caller's user agent string associated with the finding.", +"type": "string" +}, +"userAgentFamily": { +"description": "Type of user agent associated with the finding. For example, an operating system shell or an embedded or standalone application.", +"type": "string" +}, +"userName": { +"description": "A string that represents a username. The username provided depends on the type of the finding and is likely not an IAM principal. For example, this can be a system username if the finding is related to a virtual machine, or it can be an application login username.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AccessReview": { +"description": "Conveys information about a Kubernetes access review (such as one returned by a [`kubectl auth can-i`](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access) command) that was involved in a finding.", +"id": "GoogleCloudSecuritycenterV2AccessReview", +"properties": { +"group": { +"description": "The API group of the resource. \"*\" means all.", +"type": "string" +}, +"name": { +"description": "The name of the resource being requested. Empty means all.", +"type": "string" +}, +"ns": { +"description": "Namespace of the action being requested. Currently, there is no distinction between no namespace and all namespaces. Both are represented by \"\" (empty).", +"type": "string" +}, +"resource": { +"description": "The optional resource type requested. \"*\" means all.", +"type": "string" +}, +"subresource": { +"description": "The optional subresource type.", +"type": "string" +}, +"verb": { +"description": "A Kubernetes resource API verb, like get, list, watch, create, update, delete, proxy. \"*\" means all.", +"type": "string" +}, +"version": { +"description": "The API version of the resource. \"*\" means all.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AdaptiveProtection": { +"description": "Information about [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/cloud-armor-overview#google-cloud-armor-adaptive-protection).", +"id": "GoogleCloudSecuritycenterV2AdaptiveProtection", +"properties": { +"confidence": { +"description": "A score of 0 means that there is low confidence that the detected event is an actual attack. A score of 1 means that there is high confidence that the detected event is an attack. See the [Adaptive Protection documentation](https://cloud.google.com/armor/docs/adaptive-protection-overview#configure-alert-tuning) for further explanation.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Application": { +"description": "Represents an application associated with a finding.", +"id": "GoogleCloudSecuritycenterV2Application", +"properties": { +"baseUri": { +"description": "The base URI that identifies the network location of the application in which the vulnerability was detected. For example, `http://example.com`.", +"type": "string" +}, +"fullUri": { +"description": "The full URI with payload that could be used to reproduce the vulnerability. For example, `http://example.com?p=aMmYgI6H`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Attack": { +"description": "Information about DDoS attack volume and classification.", +"id": "GoogleCloudSecuritycenterV2Attack", +"properties": { +"classification": { +"description": "Type of attack, for example, \u2018SYN-flood\u2019, \u2018NTP-udp\u2019, or \u2018CHARGEN-udp\u2019.", +"type": "string" +}, +"volumeBps": { +"description": "Total BPS (bytes per second) volume of attack.", +"format": "int32", +"type": "integer" +}, +"volumePps": { +"description": "Total PPS (packets per second) volume of attack.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AttackExposure": { +"description": "An attack exposure contains the results of an attack path simulation run.", +"id": "GoogleCloudSecuritycenterV2AttackExposure", +"properties": { +"attackExposureResult": { +"description": "The resource name of the attack path simulation result that contains the details regarding this attack exposure score. Example: organizations/123/simulations/456/attackExposureResults/789", +"type": "string" +}, +"exposedHighValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedLowValueResourcesCount": { +"description": "The number of high value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"exposedMediumValueResourcesCount": { +"description": "The number of medium value resources that are exposed as a result of this finding.", +"format": "int32", +"type": "integer" +}, +"latestCalculationTime": { +"description": "The most recent time the attack exposure was updated on this finding.", +"format": "google-datetime", +"type": "string" +}, +"score": { +"description": "A number between 0 (inclusive) and infinity that represents how important this finding is to remediate. The higher the score, the more important it is to remediate.", +"format": "double", +"type": "number" +}, +"state": { +"description": "Output only. What state this AttackExposure is in. This captures whether or not an attack exposure has been calculated or not.", +"enum": [ +"STATE_UNSPECIFIED", +"CALCULATED", +"NOT_CALCULATED" +], +"enumDescriptions": [ +"The state is not specified.", +"The attack exposure has been calculated.", +"The attack exposure has not been calculated." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsAccount": { +"description": "An AWS account that is a member of an organization.", +"id": "GoogleCloudSecuritycenterV2AwsAccount", +"properties": { +"id": { +"description": "The unique identifier (ID) of the account, containing exactly 12 digits.", +"type": "string" +}, +"name": { +"description": "The friendly name of this account.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsMetadata": { +"description": "AWS metadata associated with the resource, only applicable if the finding's cloud provider is Amazon Web Services.", +"id": "GoogleCloudSecuritycenterV2AwsMetadata", +"properties": { +"account": { +"$ref": "GoogleCloudSecuritycenterV2AwsAccount", +"description": "The AWS account associated with the resource." +}, +"organization": { +"$ref": "GoogleCloudSecuritycenterV2AwsOrganization", +"description": "The AWS organization associated with the resource." +}, +"organizationalUnits": { +"description": "A list of AWS organizational units associated with the resource, ordered from lowest level (closest to the account) to highest level.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2AwsOrganizationalUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsOrganization": { +"description": "An organization is a collection of accounts that are centrally managed together using consolidated billing, organized hierarchically with organizational units (OUs), and controlled with policies.", +"id": "GoogleCloudSecuritycenterV2AwsOrganization", +"properties": { +"id": { +"description": "The unique identifier (ID) for the organization. The regex pattern for an organization ID string requires \"o-\" followed by from 10 to 32 lowercase letters or digits.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2AwsOrganizationalUnit": { +"description": "An Organizational Unit (OU) is a container of AWS accounts within a root of an organization. Policies that are attached to an OU apply to all accounts contained in that OU and in any child OUs.", +"id": "GoogleCloudSecuritycenterV2AwsOrganizationalUnit", +"properties": { +"id": { +"description": "The unique identifier (ID) associated with this OU. The regex pattern for an organizational unit ID string requires \"ou-\" followed by from 4 to 32 lowercase letters or digits (the ID of the root that contains the OU). This string is followed by a second \"-\" dash and from 8 to 32 additional lowercase letters or digits. For example, \"ou-ab12-cd34ef56\".", +"type": "string" +}, +"name": { +"description": "The friendly name of the OU.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BackupDisasterRecovery": { +"description": "Information related to Google Cloud Backup and DR Service findings.", +"id": "GoogleCloudSecuritycenterV2BackupDisasterRecovery", +"properties": { +"appliance": { +"description": "The name of the Backup and DR appliance that captures, moves, and manages the lifecycle of backup data. For example, `backup-server-57137`.", +"type": "string" +}, +"applications": { +"description": "The names of Backup and DR applications. An application is a VM, database, or file system on a managed host monitored by a backup and recovery appliance. For example, `centos7-01-vol00`, `centos7-01-vol01`, `centos7-01-vol02`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"backupCreateTime": { +"description": "The timestamp at which the Backup and DR backup was created.", +"format": "google-datetime", +"type": "string" +}, +"backupTemplate": { +"description": "The name of a Backup and DR template which comprises one or more backup policies. See the [Backup and DR documentation](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#temp) for more information. For example, `snap-ov`.", +"type": "string" +}, +"backupType": { +"description": "The backup type of the Backup and DR image. For example, `Snapshot`, `Remote Snapshot`, `OnVault`.", +"type": "string" +}, +"host": { +"description": "The name of a Backup and DR host, which is managed by the backup and recovery appliance and known to the management console. The host can be of type Generic (for example, Compute Engine, SQL Server, Oracle DB, SMB file system, etc.), vCenter, or an ESX server. See the [Backup and DR documentation on hosts](https://cloud.google.com/backup-disaster-recovery/docs/configuration/manage-hosts-and-their-applications) for more information. For example, `centos7-01`.", +"type": "string" +}, +"policies": { +"description": "The names of Backup and DR policies that are associated with a template and that define when to run a backup, how frequently to run a backup, and how long to retain the backup image. For example, `onvaults`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"policyOptions": { +"description": "The names of Backup and DR advanced policy options of a policy applying to an application. See the [Backup and DR documentation on policy options](https://cloud.google.com/backup-disaster-recovery/docs/create-plan/policy-settings). For example, `skipofflineappsincongrp, nounmap`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"profile": { +"description": "The name of the Backup and DR resource profile that specifies the storage media for backups of application and VM data. See the [Backup and DR documentation on profiles](https://cloud.google.com/backup-disaster-recovery/docs/concepts/backup-plan#profile). For example, `GCP`.", +"type": "string" +}, +"storagePool": { +"description": "The name of the Backup and DR storage pool that the backup and recovery appliance is storing data in. The storage pool could be of type Cloud, Primary, Snapshot, or OnVault. See the [Backup and DR documentation on storage pools](https://cloud.google.com/backup-disaster-recovery/docs/concepts/storage-pools). For example, `DiskPoolOne`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BigQueryExport": { +"description": "Configures how to deliver Findings to BigQuery Instance.", +"id": "GoogleCloudSecuritycenterV2BigQueryExport", +"properties": { +"createTime": { +"description": "Output only. The time at which the BigQuery export was created. This field is set by the server and will be ignored if provided on export on creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataset": { +"description": "The dataset to write findings' updates to. Its format is \"projects/[project_id]/datasets/[bigquery_dataset_id]\". BigQuery Dataset unique ID must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_).", +"type": "string" +}, +"description": { +"description": "The description of the export (max of 1024 characters).", +"type": "string" +}, +"filter": { +"description": "Expression that defines the filter to apply across create/update events of findings. The expression is a list of zero or more restrictions combined via logical operators `AND` and `OR`. Parentheses are supported, and `OR` has higher precedence than `AND`. Restrictions have the form ` ` and may have a `-` character in front of them to indicate negation. The fields map to those defined in the corresponding resource. The supported operators are: * `=` for all value types. * `>`, `<`, `>=`, `<=` for integer values. * `:`, meaning substring matching, for strings. The supported value types are: * string literals in quotes. * integer literals without quotes. * boolean literals `true` and `false` without quotes.", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the BigQuery export. This field is set by the server and will be ignored if provided on export creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The relative resource name of this export. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name. The following list shows some examples: + `organizations/{organization_id}/locations/{location_id}/bigQueryExports/{export_id}` + `folders/{folder_id}/locations/{location_id}/bigQueryExports/{export_id}` + `projects/{project_id}/locations/{location_id}/bigQueryExports/{export_id}` This field is provided in responses, and is ignored when provided in create requests.", +"type": "string" +}, +"principal": { +"description": "Output only. The service account that needs permission to create table and upload data to the BigQuery dataset.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the BigQuery export was updated. This field is set by the server and will be ignored if provided on export creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Binding": { +"description": "Represents a Kubernetes RoleBinding or ClusterRoleBinding.", +"id": "GoogleCloudSecuritycenterV2Binding", +"properties": { +"name": { +"description": "Name for the binding.", +"type": "string" +}, +"ns": { +"description": "Namespace for the binding.", +"type": "string" +}, +"role": { +"$ref": "GoogleCloudSecuritycenterV2Role", +"description": "The Role or ClusterRole referenced by the binding." +}, +"subjects": { +"description": "Represents one or more subjects that are bound to the role. Not always available for PATCH requests.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Subject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2BulkMuteFindingsResponse": { +"description": "The response to a BulkMute request. Contains the LRO information.", +"id": "GoogleCloudSecuritycenterV2BulkMuteFindingsResponse", +"properties": {}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudArmor": { +"description": "Fields related to Google Cloud Armor findings.", +"id": "GoogleCloudSecuritycenterV2CloudArmor", +"properties": { +"adaptiveProtection": { +"$ref": "GoogleCloudSecuritycenterV2AdaptiveProtection", +"description": "Information about potential Layer 7 DDoS attacks identified by [Google Cloud Armor Adaptive Protection](https://cloud.google.com/armor/docs/adaptive-protection-overview)." +}, +"attack": { +"$ref": "GoogleCloudSecuritycenterV2Attack", +"description": "Information about DDoS attack volume and classification." +}, +"duration": { +"description": "Duration of attack from the start until the current moment (updated every 5 minutes).", +"format": "google-duration", +"type": "string" +}, +"requests": { +"$ref": "GoogleCloudSecuritycenterV2Requests", +"description": "Information about incoming requests evaluated by [Google Cloud Armor security policies](https://cloud.google.com/armor/docs/security-policy-overview)." +}, +"securityPolicy": { +"$ref": "GoogleCloudSecuritycenterV2SecurityPolicy", +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding." +}, +"threatVector": { +"description": "Distinguish between volumetric & protocol DDoS attack and application layer attacks. For example, \u201cL3_4\u201d for Layer 3 and Layer 4 DDoS attacks, or \u201cL_7\u201d for Layer 7 DDoS attacks.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudDlpDataProfile": { +"description": "The [data profile](https://cloud.google.com/dlp/docs/data-profiles) associated with the finding.", +"id": "GoogleCloudSecuritycenterV2CloudDlpDataProfile", +"properties": { +"dataProfile": { +"description": "Name of the data profile, for example, `projects/123/locations/europe/tableProfiles/8383929`.", +"type": "string" +}, +"parentType": { +"description": "The resource hierarchy level at which the data profile was generated.", +"enum": [ +"PARENT_TYPE_UNSPECIFIED", +"ORGANIZATION", +"PROJECT" +], +"enumDescriptions": [ +"Unspecified parent type.", +"Organization-level configurations.", +"Project-level configurations." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudDlpInspection": { +"description": "Details about the Cloud Data Loss Prevention (Cloud DLP) [inspection job](https://cloud.google.com/dlp/docs/concepts-job-triggers) that produced the finding.", +"id": "GoogleCloudSecuritycenterV2CloudDlpInspection", +"properties": { +"fullScan": { +"description": "Whether Cloud DLP scanned the complete resource or a sampled subset.", +"type": "boolean" +}, +"infoType": { +"description": "The type of information (or *[infoType](https://cloud.google.com/dlp/docs/infotypes-reference)*) found, for example, `EMAIL_ADDRESS` or `STREET_ADDRESS`.", +"type": "string" +}, +"infoTypeCount": { +"description": "The number of times Cloud DLP found this infoType within this job and resource.", +"format": "int64", +"type": "string" +}, +"inspectJob": { +"description": "Name of the inspection job, for example, `projects/123/locations/europe/dlpJobs/i-8383929`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2CloudLoggingEntry": { +"description": "Metadata taken from a [Cloud Logging LogEntry](https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry)", +"id": "GoogleCloudSecuritycenterV2CloudLoggingEntry", +"properties": { +"insertId": { +"description": "A unique identifier for the log entry.", +"type": "string" +}, +"logId": { +"description": "The type of the log (part of `log_name`. `log_name` is the resource name of the log to which this log entry belongs). For example: `cloudresourcemanager.googleapis.com/activity` Note that this field is not URL-encoded, unlike in `LogEntry`.", +"type": "string" +}, +"resourceContainer": { +"description": "The organization, folder, or project of the monitored resource that produced this log entry.", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Compliance": { +"description": "Contains compliance information about a security standard indicating unmet recommendations.", +"id": "GoogleCloudSecuritycenterV2Compliance", +"properties": { +"ids": { +"description": "Policies within the standard or benchmark, for example, A.12.4.1", +"items": { +"type": "string" +}, +"type": "array" +}, +"standard": { +"description": "Industry-wide compliance standards or benchmarks, such as CIS, PCI, and OWASP.", +"type": "string" +}, +"version": { +"description": "Version of the standard or benchmark, for example, 1.1", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Connection": { +"description": "Contains information about the IP connection associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Connection", +"properties": { +"destinationIp": { +"description": "Destination IP address. Not present for sockets that are listening and not connected.", +"type": "string" +}, +"destinationPort": { +"description": "Destination port. Not present for sockets that are listening and not connected.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "IANA Internet Protocol Number such as TCP(6) and UDP(17).", +"enum": [ +"PROTOCOL_UNSPECIFIED", +"ICMP", +"TCP", +"UDP", +"GRE", +"ESP" +], +"enumDescriptions": [ +"Unspecified protocol (not HOPOPT).", +"Internet Control Message Protocol.", +"Transmission Control Protocol.", +"User Datagram Protocol.", +"Generic Routing Encapsulation.", +"Encap Security Payload." +], +"type": "string" +}, +"sourceIp": { +"description": "Source IP address.", +"type": "string" +}, +"sourcePort": { +"description": "Source port.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Contact": { +"description": "The email address of a contact.", +"id": "GoogleCloudSecuritycenterV2Contact", +"properties": { +"email": { +"description": "An email address. For example, \"`person123@company.com`\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ContactDetails": { +"description": "Details about specific contacts", +"id": "GoogleCloudSecuritycenterV2ContactDetails", +"properties": { +"contacts": { +"description": "A list of contacts", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Contact" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Container": { +"description": "Container associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Container", +"properties": { +"createTime": { +"description": "The time that the container was created.", +"format": "google-datetime", +"type": "string" +}, +"imageId": { +"description": "Optional container image ID, if provided by the container runtime. Uniquely identifies the container image launched using a container image digest.", +"type": "string" +}, +"labels": { +"description": "Container labels, as provided by the container runtime.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Label" +}, +"type": "array" +}, +"name": { +"description": "Name of the container.", +"type": "string" +}, +"uri": { +"description": "Container image URI provided when configuring a pod or container. This string can identify a container image version using mutable tags.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Cve": { +"description": "CVE stands for Common Vulnerabilities and Exposures. Information from the [CVE record](https://www.cve.org/ResourcesSupport/Glossary) that describes this vulnerability.", +"id": "GoogleCloudSecuritycenterV2Cve", +"properties": { +"cvssv3": { +"$ref": "GoogleCloudSecuritycenterV2Cvssv3", +"description": "Describe Common Vulnerability Scoring System specified at https://www.first.org/cvss/v3.1/specification-document" +}, +"exploitationActivity": { +"description": "The exploitation activity of the vulnerability in the wild.", +"enum": [ +"EXPLOITATION_ACTIVITY_UNSPECIFIED", +"WIDE", +"CONFIRMED", +"AVAILABLE", +"ANTICIPATED", +"NO_KNOWN" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation has been reported or confirmed to widely occur.", +"Limited reported or confirmed exploitation activities.", +"Exploit is publicly available.", +"No known exploitation activity, but has a high potential for exploitation.", +"No known exploitation activity." +], +"type": "string" +}, +"id": { +"description": "The unique identifier for the vulnerability. e.g. CVE-2021-34527", +"type": "string" +}, +"impact": { +"description": "The potential impact of the vulnerability if it was to be exploited.", +"enum": [ +"RISK_RATING_UNSPECIFIED", +"LOW", +"MEDIUM", +"HIGH", +"CRITICAL" +], +"enumDescriptions": [ +"Invalid or empty value.", +"Exploitation would have little to no security impact.", +"Exploitation would enable attackers to perform activities, or could allow attackers to have a direct impact, but would require additional steps.", +"Exploitation would enable attackers to have a notable direct impact without needing to overcome any major mitigating factors.", +"Exploitation would fundamentally undermine the security of affected systems, enable actors to perform significant attacks with minimal effort, with little to no mitigating factors to overcome." +], +"type": "string" +}, +"observedInTheWild": { +"description": "Whether or not the vulnerability has been observed in the wild.", +"type": "boolean" +}, +"references": { +"description": "Additional information about the CVE. e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Reference" +}, +"type": "array" +}, +"upstreamFixAvailable": { +"description": "Whether upstream fix is available for the CVE.", +"type": "boolean" +}, +"zeroDay": { +"description": "Whether or not the vulnerability was zero day when the finding was published.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Cvssv3": { +"description": "Common Vulnerability Scoring System version 3.", +"id": "GoogleCloudSecuritycenterV2Cvssv3", +"properties": { +"attackComplexity": { +"description": "This metric describes the conditions beyond the attacker's control that must exist in order to exploit the vulnerability.", +"enum": [ +"ATTACK_COMPLEXITY_UNSPECIFIED", +"ATTACK_COMPLEXITY_LOW", +"ATTACK_COMPLEXITY_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"Specialized access conditions or extenuating circumstances do not exist. An attacker can expect repeatable success when attacking the vulnerable component.", +"A successful attack depends on conditions beyond the attacker's control. That is, a successful attack cannot be accomplished at will, but requires the attacker to invest in some measurable amount of effort in preparation or execution against the vulnerable component before a successful attack can be expected." +], +"type": "string" +}, +"attackVector": { +"description": "Base Metrics Represents the intrinsic characteristics of a vulnerability that are constant over time and across user environments. This metric reflects the context by which vulnerability exploitation is possible.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"ATTACK_VECTOR_NETWORK", +"ATTACK_VECTOR_ADJACENT", +"ATTACK_VECTOR_LOCAL", +"ATTACK_VECTOR_PHYSICAL" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable component is bound to the network stack and the set of possible attackers extends beyond the other options listed below, up to and including the entire Internet.", +"The vulnerable component is bound to the network stack, but the attack is limited at the protocol level to a logically adjacent topology.", +"The vulnerable component is not bound to the network stack and the attacker's path is via read/write/execute capabilities.", +"The attack requires the attacker to physically touch or manipulate the vulnerable component." +], +"type": "string" +}, +"availabilityImpact": { +"description": "This metric measures the impact to the availability of the impacted component resulting from a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"baseScore": { +"description": "The base score is a function of the base metric scores.", +"format": "double", +"type": "number" +}, +"confidentialityImpact": { +"description": "This metric measures the impact to the confidentiality of the information resources managed by a software component due to a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"integrityImpact": { +"description": "This metric measures the impact to integrity of a successfully exploited vulnerability.", +"enum": [ +"IMPACT_UNSPECIFIED", +"IMPACT_HIGH", +"IMPACT_LOW", +"IMPACT_NONE" +], +"enumDescriptions": [ +"Invalid value.", +"High impact.", +"Low impact.", +"No impact." +], +"type": "string" +}, +"privilegesRequired": { +"description": "This metric describes the level of privileges an attacker must possess before successfully exploiting the vulnerability.", +"enum": [ +"PRIVILEGES_REQUIRED_UNSPECIFIED", +"PRIVILEGES_REQUIRED_NONE", +"PRIVILEGES_REQUIRED_LOW", +"PRIVILEGES_REQUIRED_HIGH" +], +"enumDescriptions": [ +"Invalid value.", +"The attacker is unauthorized prior to attack, and therefore does not require any access to settings or files of the vulnerable system to carry out an attack.", +"The attacker requires privileges that provide basic user capabilities that could normally affect only settings and files owned by a user. Alternatively, an attacker with Low privileges has the ability to access only non-sensitive resources.", +"The attacker requires privileges that provide significant (e.g., administrative) control over the vulnerable component allowing access to component-wide settings and files." +], +"type": "string" +}, +"scope": { +"description": "The Scope metric captures whether a vulnerability in one vulnerable component impacts resources in components beyond its security scope.", +"enum": [ +"SCOPE_UNSPECIFIED", +"SCOPE_UNCHANGED", +"SCOPE_CHANGED" +], +"enumDescriptions": [ +"Invalid value.", +"An exploited vulnerability can only affect resources managed by the same security authority.", +"An exploited vulnerability can affect resources beyond the security scope managed by the security authority of the vulnerable component." +], +"type": "string" +}, +"userInteraction": { +"description": "This metric captures the requirement for a human user, other than the attacker, to participate in the successful compromise of the vulnerable component.", +"enum": [ +"USER_INTERACTION_UNSPECIFIED", +"USER_INTERACTION_NONE", +"USER_INTERACTION_REQUIRED" +], +"enumDescriptions": [ +"Invalid value.", +"The vulnerable system can be exploited without interaction from any user.", +"Successful exploitation of this vulnerability requires a user to take some action before the vulnerability can be exploited." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Database": { +"description": "Represents database access information, such as queries. A database may be a sub-resource of an instance (as in the case of Cloud SQL instances or Cloud Spanner instances), or the database instance itself. Some database resources might not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types, such as Cloud SQL databases, are not yet supported by Cloud Asset Inventory. In these cases only the display name is provided.", +"id": "GoogleCloudSecuritycenterV2Database", +"properties": { +"displayName": { +"description": "The human-readable name of the database that the user connected to.", +"type": "string" +}, +"grantees": { +"description": "The target usernames, roles, or groups of an SQL privilege grant, which is not an IAM policy change.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "Some database resources may not have the [full resource name](https://google.aip.dev/122#full-resource-names) populated because these resource types are not yet supported by Cloud Asset Inventory (e.g. Cloud SQL databases). In these cases only the display name will be provided. The [full resource name](https://google.aip.dev/122#full-resource-names) of the database that the user connected to, if it is supported by Cloud Asset Inventory.", +"type": "string" +}, +"query": { +"description": "The SQL statement that is associated with the database access.", +"type": "string" +}, +"userName": { +"description": "The username used to connect to the database. The username might not be an IAM principal and does not have a set format.", +"type": "string" +}, +"version": { +"description": "The version of the database, for example, POSTGRES_14. See [the complete list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Detection": { +"description": "Memory hash detection contributing to the binary family match.", +"id": "GoogleCloudSecuritycenterV2Detection", +"properties": { +"binary": { +"description": "The name of the binary associated with the memory hash signature detection.", +"type": "string" +}, +"percentPagesMatched": { +"description": "The percentage of memory page hashes in the signature that were matched.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2DiskPath": { +"description": "Path of the file in terms of underlying disk/partition identifiers.", +"id": "GoogleCloudSecuritycenterV2DiskPath", +"properties": { +"partitionUuid": { +"description": "UUID of the partition (format https://wiki.archlinux.org/title/persistent_block_device_naming#by-uuid)", +"type": "string" +}, +"relativePath": { +"description": "Relative path of the file in the partition as a JSON encoded string. Example: /home/user1/executable_file.sh", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2EnvironmentVariable": { +"description": "A name-value pair representing an environment variable used in an operating system process.", +"id": "GoogleCloudSecuritycenterV2EnvironmentVariable", +"properties": { +"name": { +"description": "Environment variable name as a JSON encoded string.", +"type": "string" +}, +"val": { +"description": "Environment variable value as a JSON encoded string.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ExfilResource": { +"description": "Resource where data was exfiltrated from or exfiltrated to.", +"id": "GoogleCloudSecuritycenterV2ExfilResource", +"properties": { +"components": { +"description": "Subcomponents of the asset that was exfiltrated, like URIs used during exfiltration, table names, databases, and filenames. For example, multiple tables might have been exfiltrated from the same Cloud SQL instance, or multiple files might have been exfiltrated from the same Cloud Storage bucket.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource's [full resource name](https://cloud.google.com/apis/design/resource_names#full_resource_name).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Exfiltration": { +"description": "Exfiltration represents a data exfiltration attempt from one or more sources to one or more targets. The `sources` attribute lists the sources of the exfiltrated data. The `targets` attribute lists the destinations the data was copied to.", +"id": "GoogleCloudSecuritycenterV2Exfiltration", +"properties": { +"sources": { +"description": "If there are multiple sources, then the data is considered \"joined\" between them. For instance, BigQuery can join multiple tables, and each table would be considered a source.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ExfilResource" +}, +"type": "array" +}, +"targets": { +"description": "If there are multiple targets, each target would get a complete copy of the \"joined\" source data.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ExfilResource" +}, +"type": "array" +}, +"totalExfiltratedBytes": { +"description": "Total exfiltrated bytes processed for the entire job.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ExternalSystem": { +"description": "Representation of third party SIEM/SOAR fields within SCC.", +"id": "GoogleCloudSecuritycenterV2ExternalSystem", +"properties": { +"assignees": { +"description": "References primary/secondary etc assignees in the external system.", +"items": { +"type": "string" +}, +"type": "array" +}, +"caseCloseTime": { +"description": "The time when the case was closed, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseCreateTime": { +"description": "The time when the case was created, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"casePriority": { +"description": "The priority of the finding's corresponding case in the external system.", +"type": "string" +}, +"caseSla": { +"description": "The SLA of the finding's corresponding case in the external system.", +"format": "google-datetime", +"type": "string" +}, +"caseUri": { +"description": "The link to the finding's corresponding case in the external system.", +"type": "string" +}, +"externalSystemUpdateTime": { +"description": "The time when the case was last updated, as reported by the external system.", +"format": "google-datetime", +"type": "string" +}, +"externalUid": { +"description": "The identifier that's used to track the finding's corresponding case in the external system.", +"type": "string" +}, +"name": { +"description": "Full resource name of the external system. The following list shows some examples: + `organizations/1234/sources/5678/findings/123456/externalSystems/jira` + `organizations/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + `folders/1234/sources/5678/findings/123456/externalSystems/jira` + `folders/1234/sources/5678/locations/us/findings/123456/externalSystems/jira` + `projects/1234/sources/5678/findings/123456/externalSystems/jira` + `projects/1234/sources/5678/locations/us/findings/123456/externalSystems/jira`", +"type": "string" +}, +"status": { +"description": "The most recent status of the finding's corresponding case, as reported by the external system.", +"type": "string" +}, +"ticketInfo": { +"$ref": "GoogleCloudSecuritycenterV2TicketInfo", +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2File": { +"description": "File information about the related binary/library used by an executable, or the script used by a script interpreter", +"id": "GoogleCloudSecuritycenterV2File", +"properties": { +"contents": { +"description": "Prefix of the file contents as a JSON-encoded string.", +"type": "string" +}, +"diskPath": { +"$ref": "GoogleCloudSecuritycenterV2DiskPath", +"description": "Path of the file in terms of underlying disk/partition identifiers." +}, +"hashedSize": { +"description": "The length in bytes of the file prefix that was hashed. If hashed_size == size, any hashes reported represent the entire file.", +"format": "int64", +"type": "string" +}, +"partiallyHashed": { +"description": "True when the hash covers only a prefix of the file.", +"type": "boolean" +}, +"path": { +"description": "Absolute path of the file as a JSON encoded string.", +"type": "string" +}, +"sha256": { +"description": "SHA256 hash of the first hashed_size bytes of the file encoded as a hex string. If hashed_size == size, sha256 represents the SHA256 hash of the entire file.", +"type": "string" +}, +"size": { +"description": "Size of the file in bytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Finding": { +"description": "Security Command Center finding. A finding is a record of assessment data like security, risk, health, or privacy, that is ingested into Security Command Center for presentation, notification, analysis, policy testing, and enforcement. For example, a cross-site scripting (XSS) vulnerability in an App Engine application is a finding.", +"id": "GoogleCloudSecuritycenterV2Finding", +"properties": { +"access": { +"$ref": "GoogleCloudSecuritycenterV2Access", +"description": "Access details associated with the finding, such as more information on the caller, which method was accessed, and from where." +}, +"application": { +"$ref": "GoogleCloudSecuritycenterV2Application", +"description": "Represents an application associated with the finding." +}, +"attackExposure": { +"$ref": "GoogleCloudSecuritycenterV2AttackExposure", +"description": "The results of an attack path simulation relevant to this finding." +}, +"backupDisasterRecovery": { +"$ref": "GoogleCloudSecuritycenterV2BackupDisasterRecovery", +"description": "Fields related to Backup and DR findings." +}, +"canonicalName": { +"description": "Output only. The canonical name of the finding. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` The prefix is the closest CRM ancestor of the resource associated with the finding.", +"readOnly": true, +"type": "string" +}, +"category": { +"description": "Immutable. The additional taxonomy group within findings from a given source. Example: \"XSS_FLASH_INJECTION\"", +"type": "string" +}, +"cloudArmor": { +"$ref": "GoogleCloudSecuritycenterV2CloudArmor", +"description": "Fields related to Cloud Armor findings." +}, +"cloudDlpDataProfile": { +"$ref": "GoogleCloudSecuritycenterV2CloudDlpDataProfile", +"description": "Cloud DLP data profile that is associated with the finding." +}, +"cloudDlpInspection": { +"$ref": "GoogleCloudSecuritycenterV2CloudDlpInspection", +"description": "Cloud Data Loss Prevention (Cloud DLP) inspection results that are associated with the finding." +}, +"compliances": { +"description": "Contains compliance information for security standards associated to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Compliance" +}, +"type": "array" +}, +"connections": { +"description": "Contains information about the IP connection associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Connection" +}, +"type": "array" +}, +"contacts": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV2ContactDetails" +}, +"description": "Output only. Map containing the points of contact for the given finding. The key represents the type of contact, while the value contains a list of all the contacts that pertain. Please refer to: https://cloud.google.com/resource-manager/docs/managing-notification-contacts#notification-categories { \"security\": { \"contacts\": [ { \"email\": \"person1@company.com\" }, { \"email\": \"person2@company.com\" } ] } }", +"readOnly": true, +"type": "object" +}, +"containers": { +"description": "Containers associated with the finding. This field provides information for both Kubernetes and non-Kubernetes containers.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"createTime": { +"description": "Output only. The time at which the finding was created in Security Command Center.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"database": { +"$ref": "GoogleCloudSecuritycenterV2Database", +"description": "Database associated with the finding." +}, +"description": { +"description": "Contains more details about the finding.", +"type": "string" +}, +"eventTime": { +"description": "The time the finding was first detected. If an existing finding is updated, then this is the time the update occurred. For example, if the finding represents an open firewall, this property captures the time the detector believes the firewall became open. The accuracy is determined by the detector. If the finding is later resolved, then this time reflects when the finding was resolved. This must not be set to a value greater than the current timestamp.", +"format": "google-datetime", +"type": "string" +}, +"exfiltration": { +"$ref": "GoogleCloudSecuritycenterV2Exfiltration", +"description": "Represents exfiltrations associated with the finding." +}, +"externalSystems": { +"additionalProperties": { +"$ref": "GoogleCloudSecuritycenterV2ExternalSystem" +}, +"description": "Output only. Third party SIEM/SOAR fields within SCC, contains external system information and external system finding fields.", +"readOnly": true, +"type": "object" +}, +"externalUri": { +"description": "The URI that, if available, points to a web page outside of Security Command Center where additional information about the finding can be found. This field is guaranteed to be either empty or a well formed URL.", +"type": "string" +}, +"files": { +"description": "File associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2File" +}, +"type": "array" +}, +"findingClass": { +"description": "The class of the finding.", +"enum": [ +"FINDING_CLASS_UNSPECIFIED", +"THREAT", +"VULNERABILITY", +"MISCONFIGURATION", +"OBSERVATION", +"SCC_ERROR", +"POSTURE_VIOLATION" +], +"enumDescriptions": [ +"Unspecified finding class.", +"Describes unwanted or malicious activity.", +"Describes a potential weakness in software that increases risk to Confidentiality & Integrity & Availability.", +"Describes a potential weakness in cloud resource/asset configuration that increases risk.", +"Describes a security observation that is for informational purposes.", +"Describes an error that prevents some SCC functionality.", +"Describes a potential security risk due to a change in the security posture." +], +"type": "string" +}, +"iamBindings": { +"description": "Represents IAM bindings associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2IamBinding" +}, +"type": "array" +}, +"indicator": { +"$ref": "GoogleCloudSecuritycenterV2Indicator", +"description": "Represents what's commonly known as an *indicator of compromise* (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise)." +}, +"kernelRootkit": { +"$ref": "GoogleCloudSecuritycenterV2KernelRootkit", +"description": "Signature of the kernel rootkit." +}, +"kubernetes": { +"$ref": "GoogleCloudSecuritycenterV2Kubernetes", +"description": "Kubernetes resources associated with the finding." +}, +"loadBalancers": { +"description": "The load balancers associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2LoadBalancer" +}, +"type": "array" +}, +"logEntries": { +"description": "Log entries that are relevant to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2LogEntry" +}, +"type": "array" +}, +"mitreAttack": { +"$ref": "GoogleCloudSecuritycenterV2MitreAttack", +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org" +}, +"moduleName": { +"description": "Unique identifier of the module which generated the finding. Example: folders/598186756061/securityHealthAnalyticsSettings/customModules/56799441161885", +"type": "string" +}, +"mute": { +"description": "Indicates the mute state of a finding (either muted, unmuted or undefined). Unlike other attributes of a finding, a finding provider shouldn't set the value of mute.", +"enum": [ +"MUTE_UNSPECIFIED", +"MUTED", +"UNMUTED", +"UNDEFINED" +], +"enumDescriptions": [ +"Unspecified.", +"Finding has been muted.", +"Finding has been unmuted.", +"Finding has never been muted/unmuted." +], +"type": "string" +}, +"muteInitiator": { +"description": "Records additional information about the mute operation, for example, the [mute configuration](https://cloud.google.com/security-command-center/docs/how-to-mute-findings) that muted the finding and the user who muted the finding.", +"type": "string" +}, +"muteUpdateTime": { +"description": "Output only. The most recent time this finding was muted or unmuted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The [relative resource name](https://cloud.google.com/apis/design/resource_names#relative_resource_name) of the finding. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}` + `folders/{folder_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/findings/{finding_id}` + `projects/{project_id}/sources/{source_id}/locations/{location_id}/findings/{finding_id}`", +"type": "string" +}, +"nextSteps": { +"description": "Steps to address the finding.", +"type": "string" +}, +"notebook": { +"$ref": "GoogleCloudSecuritycenterV2Notebook", +"description": "Notebook associated with the finding." +}, +"orgPolicies": { +"description": "Contains information about the org policies associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2OrgPolicy" +}, +"type": "array" +}, +"parent": { +"description": "The relative resource name of the source and location the finding belongs to. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name This field is immutable after creation time. The following list shows some examples: + `organizations/{organization_id}/sources/{source_id}` + `folders/{folders_id}/sources/{source_id}` + `projects/{projects_id}/sources/{source_id}` + `organizations/{organization_id}/sources/{source_id}/locations/{location_id}` + `folders/{folders_id}/sources/{source_id}/locations/{location_id}` + `projects/{projects_id}/sources/{source_id}/locations/{location_id}`", +"type": "string" +}, +"parentDisplayName": { +"description": "Output only. The human readable display name of the finding source such as \"Event Threat Detection\" or \"Security Health Analytics\".", +"readOnly": true, +"type": "string" +}, +"processes": { +"description": "Represents operating system processes associated with the Finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Process" +}, +"type": "array" +}, +"resourceName": { +"description": "Immutable. For findings on Google Cloud resources, the full resource name of the Google Cloud resource this finding is for. See: https://cloud.google.com/apis/design/resource_names#full_resource_name When the finding is for a non-Google Cloud resource, the resourceName can be a customer or partner defined string.", +"type": "string" +}, +"securityMarks": { +"$ref": "GoogleCloudSecuritycenterV2SecurityMarks", +"description": "Output only. User specified security marks. These marks are entirely managed by the user and come from the SecurityMarks resource that belongs to the finding.", +"readOnly": true +}, +"securityPosture": { +"$ref": "GoogleCloudSecuritycenterV2SecurityPosture", +"description": "The security posture associated with the finding." +}, +"severity": { +"description": "The severity of the finding. This field is managed by the source that writes the finding.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"This value is used for findings when a source doesn't write a severity value.", +"Vulnerability: A critical vulnerability is easily discoverable by an external actor, exploitable, and results in the direct ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. Examples include publicly accessible unprotected user data and public SSH access with weak or no passwords. Threat: Indicates a threat that is able to access, modify, or delete data or execute unauthorized code within existing resources.", +"Vulnerability: A high risk vulnerability can be easily discovered and exploited in combination with other vulnerabilities in order to gain direct access and the ability to execute arbitrary code, exfiltrate data, and otherwise gain additional access and privileges to cloud resources and workloads. An example is a database with weak or no passwords that is only accessible internally. This database could easily be compromised by an actor that had access to the internal network. Threat: Indicates a threat that is able to create new computational resources in an environment but not able to access data or execute code in existing resources.", +"Vulnerability: A medium risk vulnerability could be used by an actor to gain access to resources or privileges that enable them to eventually (through multiple steps or a complex exploit) gain access and the ability to execute arbitrary code or exfiltrate data. An example is a service account with access to more projects than it should have. If an actor gains access to the service account, they could potentially use that access to manipulate a project the service account was not intended to. Threat: Indicates a threat that is able to cause operational impact but may not access data or execute unauthorized code.", +"Vulnerability: A low risk vulnerability hampers a security organization's ability to detect vulnerabilities or active threats in their deployment, or prevents the root cause investigation of security issues. An example is monitoring and logs being disabled for resource configurations and access. Threat: Indicates a threat that has obtained minimal access to an environment but is not able to access data, execute code, or create resources." +], +"type": "string" +}, +"sourceProperties": { +"additionalProperties": { +"type": "any" +}, +"description": "Source specific properties. These properties are managed by the source that writes the finding. The key names in the source_properties map must be between 1 and 255 characters, and must start with a letter and contain alphanumeric characters or underscores only.", +"type": "object" +}, +"state": { +"description": "Output only. The state of the finding.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"INACTIVE" +], +"enumDescriptions": [ +"Unspecified state.", +"The finding requires attention and has not been addressed yet.", +"The finding has been fixed, triaged as a non-issue or otherwise addressed and is no longer active." +], +"readOnly": true, +"type": "string" +}, +"vulnerability": { +"$ref": "GoogleCloudSecuritycenterV2Vulnerability", +"description": "Represents vulnerability-specific fields like CVE and CVSS scores. CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Folder": { +"description": "Message that contains the resource name and display name of a folder resource.", +"id": "GoogleCloudSecuritycenterV2Folder", +"properties": { +"resourceFolder": { +"description": "Full resource name of this folder. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourceFolderDisplayName": { +"description": "The user defined display name for this folder.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Geolocation": { +"description": "Represents a geographical location for a given access.", +"id": "GoogleCloudSecuritycenterV2Geolocation", +"properties": { +"regionCode": { +"description": "A CLDR.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2IamBinding": { +"description": "Represents a particular IAM binding, which captures a member's role addition, removal, or state.", +"id": "GoogleCloudSecuritycenterV2IamBinding", +"properties": { +"action": { +"description": "The action that was performed on a Binding.", +"enum": [ +"ACTION_UNSPECIFIED", +"ADD", +"REMOVE" +], +"enumDescriptions": [ +"Unspecified.", +"Addition of a Binding.", +"Removal of a Binding." +], +"type": "string" +}, +"member": { +"description": "A single identity requesting access for a Cloud Platform resource, for example, \"foo@google.com\".", +"type": "string" +}, +"role": { +"description": "Role that is assigned to \"members\". For example, \"roles/viewer\", \"roles/editor\", or \"roles/owner\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Indicator": { +"description": "Represents what's commonly known as an _indicator of compromise_ (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).", +"id": "GoogleCloudSecuritycenterV2Indicator", +"properties": { +"domains": { +"description": "List of domains associated to the Finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipAddresses": { +"description": "The list of IP addresses that are associated with the finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"signatures": { +"description": "The list of matched signatures indicating that the given process is present in the environment.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ProcessSignature" +}, +"type": "array" +}, +"uris": { +"description": "The list of URIs associated to the Findings.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2KernelRootkit": { +"description": "Kernel mode rootkit signatures.", +"id": "GoogleCloudSecuritycenterV2KernelRootkit", +"properties": { +"name": { +"description": "Rootkit name, when available.", +"type": "string" +}, +"unexpectedCodeModification": { +"description": "True if unexpected modifications of kernel code memory are present.", +"type": "boolean" +}, +"unexpectedFtraceHandler": { +"description": "True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedInterruptHandler": { +"description": "True if interrupt handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKernelCodePages": { +"description": "True if kernel code pages that are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKprobeHandler": { +"description": "True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedProcessesInRunqueue": { +"description": "True if unexpected processes in the scheduler run queue are present. Such processes are in the run queue, but not in the process task list.", +"type": "boolean" +}, +"unexpectedReadOnlyDataModification": { +"description": "True if unexpected modifications of kernel read-only data memory are present.", +"type": "boolean" +}, +"unexpectedSystemCallHandler": { +"description": "True if system call handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Kubernetes": { +"description": "Kubernetes-related attributes.", +"id": "GoogleCloudSecuritycenterV2Kubernetes", +"properties": { +"accessReviews": { +"description": "Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2AccessReview" +}, +"type": "array" +}, +"bindings": { +"description": "Provides Kubernetes role binding information for findings that involve [RoleBindings or ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Binding" +}, +"type": "array" +}, +"nodePools": { +"description": "GKE [node pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) associated with the finding. This field contains node pool information for each node, when it is available.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2NodePool" +}, +"type": "array" +}, +"nodes": { +"description": "Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Node" +}, +"type": "array" +}, +"objects": { +"description": "Kubernetes objects related to the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Object" +}, +"type": "array" +}, +"pods": { +"description": "Kubernetes [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated with the finding. This field contains Pod records for each container that is owned by a Pod.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Pod" +}, +"type": "array" +}, +"roles": { +"description": "Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Role" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Label": { +"description": "Represents a generic name-value label. A label has separate name and value fields to support filtering with the `contains()` function. For more information, see [Filtering on array-type fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).", +"id": "GoogleCloudSecuritycenterV2Label", +"properties": { +"name": { +"description": "Name of the label.", +"type": "string" +}, +"value": { +"description": "Value that corresponds to the label's name.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2LoadBalancer": { +"description": "Contains information related to the load balancer associated with the finding.", +"id": "GoogleCloudSecuritycenterV2LoadBalancer", +"properties": { +"name": { +"description": "The name of the load balancer associated with the finding.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2LogEntry": { +"description": "An individual entry in a log.", +"id": "GoogleCloudSecuritycenterV2LogEntry", +"properties": { +"cloudLoggingEntry": { +"$ref": "GoogleCloudSecuritycenterV2CloudLoggingEntry", +"description": "An individual entry in a log stored in Cloud Logging." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MemoryHashSignature": { +"description": "A signature corresponding to memory page hashes.", +"id": "GoogleCloudSecuritycenterV2MemoryHashSignature", +"properties": { +"binaryFamily": { +"description": "The binary family.", +"type": "string" +}, +"detections": { +"description": "The list of memory hash detections contributing to the binary family match.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Detection" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MitreAttack": { +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org", +"id": "GoogleCloudSecuritycenterV2MitreAttack", +"properties": { +"additionalTactics": { +"description": "Additional MITRE ATT&CK tactics related to this finding, if any.", +"items": { +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"type": "array" +}, +"additionalTechniques": { +"description": "Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques.", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"primaryTactic": { +"description": "The MITRE ATT&CK tactic most closely represented by this finding, if any.", +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"primaryTechniques": { +"description": "The MITRE ATT&CK technique most closely represented by this finding, if any. primary_techniques is a repeated field because there are multiple levels of MITRE ATT&CK techniques. If the technique most closely represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The MITRE ATT&CK version referenced by the above fields. E.g. \"8\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2MuteConfig": { +"description": "A mute config is a Cloud SCC resource that contains the configuration to mute create/update events of findings.", +"id": "GoogleCloudSecuritycenterV2MuteConfig", +"properties": { +"createTime": { +"description": "Output only. The time at which the mute config was created. This field is set by the server and will be ignored if provided on config creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description of the mute config.", +"type": "string" +}, +"filter": { +"description": "Required. An expression that defines the filter to apply across create/update events of findings. While creating a filter string, be mindful of the scope in which the mute configuration is being created. E.g., If a filter contains project = X but is created under the project = Y scope, it might not match any findings. The following field and operator combinations are supported: * severity: `=`, `:` * category: `=`, `:` * resource.name: `=`, `:` * resource.project_name: `=`, `:` * resource.project_display_name: `=`, `:` * resource.folders.resource_folder: `=`, `:` * resource.parent_name: `=`, `:` * resource.parent_display_name: `=`, `:` * resource.type: `=`, `:` * finding_class: `=`, `:` * indicator.ip_addresses: `=`, `:` * indicator.domains: `=`, `:`", +"type": "string" +}, +"mostRecentEditor": { +"description": "Output only. Email address of the user who last edited the mute config. This field is set by the server and will be ignored if provided on config creation or update.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "This field will be ignored if provided on config creation. The following list shows some examples of the format: + `organizations/{organization}/muteConfigs/{mute_config}` + `organizations/{organization}locations/{location}//muteConfigs/{mute_config}` + `folders/{folder}/muteConfigs/{mute_config}` + `folders/{folder}/locations/{location}/muteConfigs/{mute_config}` + `projects/{project}/muteConfigs/{mute_config}` + `projects/{project}/locations/{location}/muteConfigs/{mute_config}`", +"type": "string" +}, +"type": { +"description": "Required. The type of the mute config, which determines what type of mute state the config affects. Immutable after creation.", +"enum": [ +"MUTE_CONFIG_TYPE_UNSPECIFIED", +"STATIC" +], +"enumDescriptions": [ +"Unused.", +"A static mute config, which sets the static mute state of future matching findings to muted. Once the static mute state has been set, finding or config modifications will not affect the state." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recent time at which the mute config was updated. This field is set by the server and will be ignored if provided on config creation or update.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Node": { +"description": "Kubernetes nodes associated with the finding.", +"id": "GoogleCloudSecuritycenterV2Node", +"properties": { +"name": { +"description": "[Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2NodePool": { +"description": "Provides GKE node pool information.", +"id": "GoogleCloudSecuritycenterV2NodePool", +"properties": { +"name": { +"description": "Kubernetes node pool name.", +"type": "string" +}, +"nodes": { +"description": "Nodes associated with the finding.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Node" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Notebook": { +"description": "Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise notebook](https://cloud.google.com/colab/docs/introduction) file, that is associated with a finding.", +"id": "GoogleCloudSecuritycenterV2Notebook", +"properties": { +"lastAuthor": { +"description": "The user ID of the latest author to modify the notebook.", +"type": "string" +}, +"name": { +"description": "The name of the notebook.", +"type": "string" +}, +"notebookUpdateTime": { +"description": "The most recent time the notebook was updated.", +"format": "google-datetime", +"type": "string" +}, +"service": { +"description": "The source notebook service, for example, \"Colab Enterprise\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2NotificationMessage": { +"description": "Cloud SCC's Notification", +"id": "GoogleCloudSecuritycenterV2NotificationMessage", +"properties": { +"finding": { +"$ref": "GoogleCloudSecuritycenterV2Finding", +"description": "If it's a Finding based notification config, this field will be populated." +}, +"notificationConfigName": { +"description": "Name of the notification config that generated current notification.", +"type": "string" +}, +"resource": { +"$ref": "GoogleCloudSecuritycenterV2Resource", +"description": "The Cloud resource tied to this notification's Finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Object": { +"description": "Kubernetes object related to the finding, uniquely identified by GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or AccessReview.", +"id": "GoogleCloudSecuritycenterV2Object", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"group": { +"description": "Kubernetes object group, such as \"policy.k8s.io/v1\".", +"type": "string" +}, +"kind": { +"description": "Kubernetes object kind, such as \"Namespace\".", +"type": "string" +}, +"name": { +"description": "Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.", +"type": "string" +}, +"ns": { +"description": "Kubernetes object namespace. Must be a valid DNS label. Named \"ns\" to avoid collision with C++ namespace keyword. For details see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2OrgPolicy": { +"description": "Contains information about the org policies associated with the finding.", +"id": "GoogleCloudSecuritycenterV2OrgPolicy", +"properties": { +"name": { +"description": "The resource name of the org policy. Example: \"organizations/{organization_id}/policies/{constraint_name}\"", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Package": { +"description": "Package is a generic definition of a package.", +"id": "GoogleCloudSecuritycenterV2Package", +"properties": { +"cpeUri": { +"description": "The CPE URI where the vulnerability was detected.", +"type": "string" +}, +"packageName": { +"description": "The name of the package where the vulnerability was detected.", +"type": "string" +}, +"packageType": { +"description": "Type of package, for example, os, maven, or go.", +"type": "string" +}, +"packageVersion": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Pod": { +"description": "A Kubernetes Pod.", +"id": "GoogleCloudSecuritycenterV2Pod", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Container" +}, +"type": "array" +}, +"labels": { +"description": "Pod labels. For Kubernetes containers, these are applied to the container.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2Label" +}, +"type": "array" +}, +"name": { +"description": "Kubernetes Pod name.", +"type": "string" +}, +"ns": { +"description": "Kubernetes Pod namespace.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2PolicyDriftDetails": { +"description": "The policy field that violates the deployed posture and its expected and detected values.", +"id": "GoogleCloudSecuritycenterV2PolicyDriftDetails", +"properties": { +"detectedValue": { +"description": "The detected value that violates the deployed posture, for example, `false` or `allowed_values={\"projects/22831892\"}`.", +"type": "string" +}, +"expectedValue": { +"description": "The value of this field that was configured in a posture, for example, `true` or `allowed_values={\"projects/29831892\"}`.", +"type": "string" +}, +"field": { +"description": "The name of the updated field, for example constraint.implementation.policy_rules[0].enforce", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Process": { +"description": "Represents an operating system process.", +"id": "GoogleCloudSecuritycenterV2Process", +"properties": { +"args": { +"description": "Process arguments as JSON encoded strings.", +"items": { +"type": "string" +}, +"type": "array" +}, +"argumentsTruncated": { +"description": "True if `args` is incomplete.", +"type": "boolean" +}, +"binary": { +"$ref": "GoogleCloudSecuritycenterV2File", +"description": "File information for the process executable." +}, +"envVariables": { +"description": "Process environment variables.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2EnvironmentVariable" +}, +"type": "array" +}, +"envVariablesTruncated": { +"description": "True if `env_variables` is incomplete.", +"type": "boolean" +}, +"libraries": { +"description": "File information for libraries loaded by the process.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2File" +}, +"type": "array" +}, +"name": { +"description": "The process name, as displayed in utilities like `top` and `ps`. This name can be accessed through `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.", +"type": "string" +}, +"parentPid": { +"description": "The parent process ID.", +"format": "int64", +"type": "string" +}, +"pid": { +"description": "The process ID.", +"format": "int64", +"type": "string" +}, +"script": { +"$ref": "GoogleCloudSecuritycenterV2File", +"description": "When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ProcessSignature": { +"description": "Indicates what signature matched this process.", +"id": "GoogleCloudSecuritycenterV2ProcessSignature", +"properties": { +"memoryHashSignature": { +"$ref": "GoogleCloudSecuritycenterV2MemoryHashSignature", +"description": "Signature indicating that a binary family was matched." +}, +"signatureType": { +"description": "Describes the type of resource associated with the signature.", +"enum": [ +"SIGNATURE_TYPE_UNSPECIFIED", +"SIGNATURE_TYPE_PROCESS", +"SIGNATURE_TYPE_FILE" +], +"enumDescriptions": [ +"The default signature type.", +"Used for signatures concerning processes.", +"Used for signatures concerning disks." +], +"type": "string" +}, +"yaraRuleSignature": { +"$ref": "GoogleCloudSecuritycenterV2YaraRuleSignature", +"description": "Signature indicating that a YARA rule was matched." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Reference": { +"description": "Additional Links", +"id": "GoogleCloudSecuritycenterV2Reference", +"properties": { +"source": { +"description": "Source of the reference e.g. NVD", +"type": "string" +}, +"uri": { +"description": "Uri for the mentioned source e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Requests": { +"description": "Information about the requests relevant to the finding.", +"id": "GoogleCloudSecuritycenterV2Requests", +"properties": { +"longTermAllowed": { +"description": "Allowed RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"longTermDenied": { +"description": "Denied RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"ratio": { +"description": "For 'Increasing deny ratio', the ratio is the denied traffic divided by the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed traffic in the short term divided by allowed traffic in the long term.", +"format": "double", +"type": "number" +}, +"shortTermAllowed": { +"description": "Allowed RPS (requests per second) in the short term.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Resource": { +"description": "Information related to the Google Cloud resource.", +"id": "GoogleCloudSecuritycenterV2Resource", +"properties": { +"awsMetadata": { +"$ref": "GoogleCloudSecuritycenterV2AwsMetadata", +"description": "The AWS metadata associated with the finding." +}, +"cloudProvider": { +"description": "Indicates which cloud provider the finding is from.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"displayName": { +"description": "The human readable name of the resource.", +"type": "string" +}, +"gcpMetadata": { +"$ref": "GcpMetadata", +"description": "The GCP metadata associated with the finding." +}, +"location": { +"description": "The region or location of the service (if applicable).", +"type": "string" +}, +"name": { +"description": "The full resource name of the resource. See: https://cloud.google.com/apis/design/resource_names#full_resource_name", +"type": "string" +}, +"resourcePath": { +"$ref": "GoogleCloudSecuritycenterV2ResourcePath", +"description": "Provides the path to the resource within the resource hierarchy." +}, +"resourcePathString": { +"description": "A string representation of the resource path. For GCP, it has the format of: organizations/{organization_id}/folders/{folder_id}/folders/{folder_id}/projects/{project_id} where there can be any number of folders. For AWS, it has the format of: org/{organization_id}/ou/{organizational_unit_id}/ou/{organizational_unit_id}/account/{account_id} where there can be any number of organizational units. For Azure, it has the format of: mg/{management_group_id}/mg/{management_group_id}/subscription/{subscription_id}/rg/{resource_group_name} where there can be any number of management groups.", +"type": "string" +}, +"service": { +"description": "The service or resource provider associated with the resource.", +"type": "string" +}, +"type": { +"description": "The full resource type of the resource.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourcePath": { +"description": "Represents the path of resources leading up to the resource this finding is about.", +"id": "GoogleCloudSecuritycenterV2ResourcePath", +"properties": { +"nodes": { +"description": "The list of nodes that make the up resource path, ordered from lowest level to highest level.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2ResourcePathNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourcePathNode": { +"description": "A node within the resource path. Each node represents a resource within the resource hierarchy.", +"id": "GoogleCloudSecuritycenterV2ResourcePathNode", +"properties": { +"displayName": { +"description": "The display name of the resource this node represents.", +"type": "string" +}, +"id": { +"description": "The ID of the resource this node represents.", +"type": "string" +}, +"nodeType": { +"description": "The type of resource this node represents.", +"enum": [ +"RESOURCE_PATH_NODE_TYPE_UNSPECIFIED", +"GCP_ORGANIZATION", +"GCP_FOLDER", +"GCP_PROJECT", +"AWS_ORGANIZATION", +"AWS_ORGANIZATIONAL_UNIT", +"AWS_ACCOUNT", +"AZURE_MANAGEMENT_GROUP", +"AZURE_SUBSCRIPTION", +"AZURE_RESOURCE_GROUP" +], +"enumDescriptions": [ +"Node type is unspecified.", +"The node represents a GCP organization.", +"The node represents a GCP folder.", +"The node represents a GCP project.", +"The node represents an AWS organization.", +"The node represents an AWS organizational unit.", +"The node represents an AWS account.", +"The node represents an Azure management group.", +"The node represents an Azure subscription.", +"The node represents an Azure resource group." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ResourceValueConfig": { +"description": "A resource value config (RVC) is a mapping configuration of user's resources to resource values. Used in Attack path simulations.", +"id": "GoogleCloudSecuritycenterV2ResourceValueConfig", +"properties": { +"cloudProvider": { +"description": "Cloud provider this configuration applies to", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Timestamp this resource value config was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the resource value config.", +"type": "string" +}, +"name": { +"description": "Name for the resource value config", +"type": "string" +}, +"resourceLabelsSelector": { +"additionalProperties": { +"type": "string" +}, +"description": "List of resource labels to search for, evaluated with AND. E.g. \"resource_labels_selector\": {\"key\": \"value\", \"env\": \"prod\"} will match resources with labels \"key\": \"value\" AND \"env\": \"prod\" https://cloud.google.com/resource-manager/docs/creating-managing-labels", +"type": "object" +}, +"resourceType": { +"description": "Apply resource_value only to resources that match resource_type. resource_type will be checked with \"AND\" of other resources. E.g. \"storage.googleapis.com/Bucket\" with resource_value \"HIGH\" will apply \"HIGH\" value only to \"storage.googleapis.com/Bucket\" resources.", +"type": "string" +}, +"resourceValue": { +"description": "Resource value level this expression represents Only required when there is no SDP mapping in the request", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"scope": { +"description": "Project or folder to scope this config to. For example, \"project/456\" would apply this config only to resources in \"project/456\" scope will be checked with \"AND\" of other resources.", +"type": "string" +}, +"sensitiveDataProtectionMapping": { +"$ref": "GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping", +"description": "A mapping of the sensitivity on Sensitive Data Protection finding to resource values. This mapping can only be used in combination with a resource_type that is related to BigQuery, e.g. \"bigquery.googleapis.com/Dataset\"." +}, +"tagValues": { +"description": "Required. Tag values combined with AND to check against. Values in the form \"tagValues/123\" E.g. [ \"tagValues/123\", \"tagValues/456\", \"tagValues/789\" ] https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing", +"items": { +"type": "string" +}, +"type": "array" +}, +"updateTime": { +"description": "Output only. Timestamp this resource value config was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Role": { +"description": "Kubernetes Role or ClusterRole.", +"id": "GoogleCloudSecuritycenterV2Role", +"properties": { +"kind": { +"description": "Role type.", +"enum": [ +"KIND_UNSPECIFIED", +"ROLE", +"CLUSTER_ROLE" +], +"enumDescriptions": [ +"Role type is not specified.", +"Kubernetes Role.", +"Kubernetes ClusterRole." +], +"type": "string" +}, +"name": { +"description": "Role name.", +"type": "string" +}, +"ns": { +"description": "Role namespace.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityBulletin": { +"description": "SecurityBulletin are notifications of vulnerabilities of Google products.", +"id": "GoogleCloudSecuritycenterV2SecurityBulletin", +"properties": { +"bulletinId": { +"description": "ID of the bulletin corresponding to the vulnerability.", +"type": "string" +}, +"submissionTime": { +"description": "Submission time of this Security Bulletin.", +"format": "google-datetime", +"type": "string" +}, +"suggestedUpgradeVersion": { +"description": "This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "GoogleCloudSecuritycenterV2SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. The following list shows some examples: + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + `folders/{folder_id}/assets/{asset_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `folders/{folder_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks` + `projects/{project_number}/assets/{asset_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks` + `projects/{project_number}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name The following list shows some examples: + `organizations/{organization_id}/assets/{asset_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks` + `organizations/{organization_id}/sources/{source_id}/locations/{location}/findings/{finding_id}/securityMarks`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityPolicy": { +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding.", +"id": "GoogleCloudSecuritycenterV2SecurityPolicy", +"properties": { +"name": { +"description": "The name of the Google Cloud Armor security policy, for example, \"my-security-policy\".", +"type": "string" +}, +"preview": { +"description": "Whether or not the associated rule or policy is in preview mode.", +"type": "boolean" +}, +"type": { +"description": "The type of Google Cloud Armor security policy for example, \u2018backend security policy\u2019, \u2018edge security policy\u2019, \u2018network edge security policy\u2019, or \u2018always-on DDoS protection\u2019.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SecurityPosture": { +"description": "Represents a posture that is deployed on Google Cloud by the Security Command Center Posture Management service. A posture contains one or more policy sets. A policy set is a group of policies that enforce a set of security rules on Google Cloud.", +"id": "GoogleCloudSecuritycenterV2SecurityPosture", +"properties": { +"changedPolicy": { +"description": "The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`.", +"type": "string" +}, +"name": { +"description": "Name of the posture, for example, `CIS-Posture`.", +"type": "string" +}, +"policy": { +"description": "The ID of the updated policy, for example, `compute-policy-1`.", +"type": "string" +}, +"policyDriftDetails": { +"description": "The details about a change in an updated policy that violates the deployed posture.", +"items": { +"$ref": "GoogleCloudSecuritycenterV2PolicyDriftDetails" +}, +"type": "array" +}, +"policySet": { +"description": "The name of the updated policy set, for example, `cis-policyset`.", +"type": "string" +}, +"postureDeployment": { +"description": "The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.", +"type": "string" +}, +"postureDeploymentResource": { +"description": "The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`.", +"type": "string" +}, +"revisionId": { +"description": "The version of the posture, for example, `c7cfa2a8`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping": { +"description": "Resource value mapping for Sensitive Data Protection findings If any of these mappings have a resource value that is not unspecified, the resource_value field will be ignored when reading this configuration.", +"id": "GoogleCloudSecuritycenterV2SensitiveDataProtectionMapping", +"properties": { +"highSensitivityMapping": { +"description": "Resource value mapping for high-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +}, +"mediumSensitivityMapping": { +"description": "Resource value mapping for medium-sensitivity Sensitive Data Protection findings", +"enum": [ +"RESOURCE_VALUE_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW", +"NONE" +], +"enumDescriptions": [ +"Unspecific value", +"High resource value", +"Medium resource value", +"Low resource value", +"No resource value, e.g. ignore these resources" +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "GoogleCloudSecuritycenterV2ServiceAccountDelegationInfo", +"properties": { +"principalEmail": { +"description": "The email address of a Google account.", +"type": "string" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Subject": { +"description": "Represents a Kubernetes subject.", +"id": "GoogleCloudSecuritycenterV2Subject", +"properties": { +"kind": { +"description": "Authentication type for the subject.", +"enum": [ +"AUTH_TYPE_UNSPECIFIED", +"USER", +"SERVICEACCOUNT", +"GROUP" +], +"enumDescriptions": [ +"Authentication is not specified.", +"User with valid certificate.", +"Users managed by Kubernetes API with credentials stored as secrets.", +"Collection of users." +], +"type": "string" +}, +"name": { +"description": "Name for the subject.", +"type": "string" +}, +"ns": { +"description": "Namespace for the subject.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2TicketInfo": { +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding.", +"id": "GoogleCloudSecuritycenterV2TicketInfo", +"properties": { +"assignee": { +"description": "The assignee of the ticket in the ticket system.", +"type": "string" +}, +"description": { +"description": "The description of the ticket in the ticket system.", +"type": "string" +}, +"id": { +"description": "The identifier of the ticket in the ticket system.", +"type": "string" +}, +"status": { +"description": "The latest status of the ticket, as reported by the ticket system.", +"type": "string" +}, +"updateTime": { +"description": "The time when the ticket was last updated, as reported by the ticket system.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "The link to the ticket in the ticket system.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2Vulnerability": { +"description": "Refers to common vulnerability fields e.g. cve, cvss, cwe etc.", +"id": "GoogleCloudSecuritycenterV2Vulnerability", +"properties": { +"cve": { +"$ref": "GoogleCloudSecuritycenterV2Cve", +"description": "CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +}, +"fixedPackage": { +"$ref": "GoogleCloudSecuritycenterV2Package", +"description": "The fixed package is relevant to the finding." +}, +"offendingPackage": { +"$ref": "GoogleCloudSecuritycenterV2Package", +"description": "The offending package is relevant to the finding." +}, +"securityBulletin": { +"$ref": "GoogleCloudSecuritycenterV2SecurityBulletin", +"description": "The security bulletin is relevant to this finding." +} +}, +"type": "object" +}, +"GoogleCloudSecuritycenterV2YaraRuleSignature": { +"description": "A signature corresponding to a YARA rule.", +"id": "GoogleCloudSecuritycenterV2YaraRuleSignature", +"properties": { +"yaraRule": { +"description": "The name of the YARA rule.", +"type": "string" +} +}, +"type": "object" +}, +"IamBinding": { +"description": "Represents a particular IAM binding, which captures a member's role addition, removal, or state.", +"id": "IamBinding", +"properties": { +"action": { +"description": "The action that was performed on a Binding.", +"enum": [ +"ACTION_UNSPECIFIED", +"ADD", +"REMOVE" +], +"enumDescriptions": [ +"Unspecified.", +"Addition of a Binding.", +"Removal of a Binding." +], +"type": "string" +}, +"member": { +"description": "A single identity requesting access for a Cloud Platform resource, for example, \"foo@google.com\".", +"type": "string" +}, +"role": { +"description": "Role that is assigned to \"members\". For example, \"roles/viewer\", \"roles/editor\", or \"roles/owner\".", +"type": "string" +} +}, +"type": "object" +}, +"Indicator": { +"description": "Represents what's commonly known as an _indicator of compromise_ (IoC) in computer forensics. This is an artifact observed on a network or in an operating system that, with high confidence, indicates a computer intrusion. For more information, see [Indicator of compromise](https://en.wikipedia.org/wiki/Indicator_of_compromise).", +"id": "Indicator", +"properties": { +"domains": { +"description": "List of domains associated to the Finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipAddresses": { +"description": "The list of IP addresses that are associated with the finding.", +"items": { +"type": "string" +}, +"type": "array" +}, +"signatures": { +"description": "The list of matched signatures indicating that the given process is present in the environment.", +"items": { +"$ref": "ProcessSignature" +}, +"type": "array" +}, +"uris": { +"description": "The list of URIs associated to the Findings.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"KernelRootkit": { +"description": "Kernel mode rootkit signatures.", +"id": "KernelRootkit", +"properties": { +"name": { +"description": "Rootkit name, when available.", +"type": "string" +}, +"unexpectedCodeModification": { +"description": "True if unexpected modifications of kernel code memory are present.", +"type": "boolean" +}, +"unexpectedFtraceHandler": { +"description": "True if `ftrace` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedInterruptHandler": { +"description": "True if interrupt handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKernelCodePages": { +"description": "True if kernel code pages that are not in the expected kernel or module code regions are present.", +"type": "boolean" +}, +"unexpectedKprobeHandler": { +"description": "True if `kprobe` points are present with callbacks pointing to regions that are not in the expected kernel or module code range.", +"type": "boolean" +}, +"unexpectedProcessesInRunqueue": { +"description": "True if unexpected processes in the scheduler run queue are present. Such processes are in the run queue, but not in the process task list.", +"type": "boolean" +}, +"unexpectedReadOnlyDataModification": { +"description": "True if unexpected modifications of kernel read-only data memory are present.", +"type": "boolean" +}, +"unexpectedSystemCallHandler": { +"description": "True if system call handlers that are are not in the expected kernel or module code regions are present.", +"type": "boolean" +} +}, +"type": "object" +}, +"Kubernetes": { +"description": "Kubernetes-related attributes.", +"id": "Kubernetes", +"properties": { +"accessReviews": { +"description": "Provides information on any Kubernetes access reviews (privilege checks) relevant to the finding.", +"items": { +"$ref": "AccessReview" +}, +"type": "array" +}, +"bindings": { +"description": "Provides Kubernetes role binding information for findings that involve [RoleBindings or ClusterRoleBindings](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "GoogleCloudSecuritycenterV1Binding" +}, +"type": "array" +}, +"nodePools": { +"description": "GKE [node pools](https://cloud.google.com/kubernetes-engine/docs/concepts/node-pools) associated with the finding. This field contains node pool information for each node, when it is available.", +"items": { +"$ref": "NodePool" +}, +"type": "array" +}, +"nodes": { +"description": "Provides Kubernetes [node](https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#nodes) information.", +"items": { +"$ref": "Node" +}, +"type": "array" +}, +"objects": { +"description": "Kubernetes objects related to the finding.", +"items": { +"$ref": "Object" +}, +"type": "array" +}, +"pods": { +"description": "Kubernetes [Pods](https://cloud.google.com/kubernetes-engine/docs/concepts/pod) associated with the finding. This field contains Pod records for each container that is owned by a Pod.", +"items": { +"$ref": "Pod" +}, +"type": "array" +}, +"roles": { +"description": "Provides Kubernetes role information for findings that involve [Roles or ClusterRoles](https://cloud.google.com/kubernetes-engine/docs/how-to/role-based-access-control).", +"items": { +"$ref": "Role" +}, +"type": "array" +} +}, +"type": "object" +}, +"Label": { +"description": "Represents a generic name-value label. A label has separate name and value fields to support filtering with the `contains()` function. For more information, see [Filtering on array-type fields](https://cloud.google.com/security-command-center/docs/how-to-api-list-findings#array-contains-filtering).", +"id": "Label", +"properties": { +"name": { +"description": "Name of the label.", +"type": "string" +}, +"value": { +"description": "Value that corresponds to the label's name.", +"type": "string" +} +}, +"type": "object" +}, +"LoadBalancer": { +"description": "Contains information related to the load balancer associated with the finding.", +"id": "LoadBalancer", +"properties": { +"name": { +"description": "The name of the load balancer associated with the finding.", +"type": "string" +} +}, +"type": "object" +}, +"LogEntry": { +"description": "An individual entry in a log.", +"id": "LogEntry", +"properties": { +"cloudLoggingEntry": { +"$ref": "CloudLoggingEntry", +"description": "An individual entry in a log stored in Cloud Logging." +} +}, +"type": "object" +}, +"MemoryHashSignature": { +"description": "A signature corresponding to memory page hashes.", +"id": "MemoryHashSignature", +"properties": { +"binaryFamily": { +"description": "The binary family.", +"type": "string" +}, +"detections": { +"description": "The list of memory hash detections contributing to the binary family match.", +"items": { +"$ref": "Detection" +}, +"type": "array" +} +}, +"type": "object" +}, +"MitreAttack": { +"description": "MITRE ATT&CK tactics and techniques related to this finding. See: https://attack.mitre.org", +"id": "MitreAttack", +"properties": { +"additionalTactics": { +"description": "Additional MITRE ATT&CK tactics related to this finding, if any.", +"items": { +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"type": "array" +}, +"additionalTechniques": { +"description": "Additional MITRE ATT&CK techniques related to this finding, if any, along with any of their respective parent techniques.", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"primaryTactic": { +"description": "The MITRE ATT&CK tactic most closely represented by this finding, if any.", +"enum": [ +"TACTIC_UNSPECIFIED", +"RECONNAISSANCE", +"RESOURCE_DEVELOPMENT", +"INITIAL_ACCESS", +"EXECUTION", +"PERSISTENCE", +"PRIVILEGE_ESCALATION", +"DEFENSE_EVASION", +"CREDENTIAL_ACCESS", +"DISCOVERY", +"LATERAL_MOVEMENT", +"COLLECTION", +"COMMAND_AND_CONTROL", +"EXFILTRATION", +"IMPACT" +], +"enumDescriptions": [ +"Unspecified value.", +"TA0043", +"TA0042", +"TA0001", +"TA0002", +"TA0003", +"TA0004", +"TA0005", +"TA0006", +"TA0007", +"TA0008", +"TA0009", +"TA0011", +"TA0010", +"TA0040" +], +"type": "string" +}, +"primaryTechniques": { +"description": "The MITRE ATT&CK technique most closely represented by this finding, if any. primary_techniques is a repeated field because there are multiple levels of MITRE ATT&CK techniques. If the technique most closely represented by this finding is a sub-technique (e.g. `SCANNING_IP_BLOCKS`), both the sub-technique and its parent technique(s) will be listed (e.g. `SCANNING_IP_BLOCKS`, `ACTIVE_SCANNING`).", +"items": { +"enum": [ +"TECHNIQUE_UNSPECIFIED", +"MASQUERADING", +"MATCH_LEGITIMATE_NAME_OR_LOCATION", +"BOOT_OR_LOGON_INITIALIZATION_SCRIPTS", +"STARTUP_ITEMS", +"NETWORK_SERVICE_DISCOVERY", +"PROCESS_DISCOVERY", +"COMMAND_AND_SCRIPTING_INTERPRETER", +"UNIX_SHELL", +"PYTHON", +"PERMISSION_GROUPS_DISCOVERY", +"CLOUD_GROUPS", +"APPLICATION_LAYER_PROTOCOL", +"DNS", +"SOFTWARE_DEPLOYMENT_TOOLS", +"VALID_ACCOUNTS", +"DEFAULT_ACCOUNTS", +"LOCAL_ACCOUNTS", +"CLOUD_ACCOUNTS", +"PROXY", +"EXTERNAL_PROXY", +"MULTI_HOP_PROXY", +"ACCOUNT_MANIPULATION", +"ADDITIONAL_CLOUD_CREDENTIALS", +"SSH_AUTHORIZED_KEYS", +"ADDITIONAL_CONTAINER_CLUSTER_ROLES", +"INGRESS_TOOL_TRANSFER", +"NATIVE_API", +"BRUTE_FORCE", +"SHARED_MODULES", +"ACCESS_TOKEN_MANIPULATION", +"TOKEN_IMPERSONATION_OR_THEFT", +"EXPLOIT_PUBLIC_FACING_APPLICATION", +"DOMAIN_POLICY_MODIFICATION", +"DATA_DESTRUCTION", +"SERVICE_STOP", +"INHIBIT_SYSTEM_RECOVERY", +"RESOURCE_HIJACKING", +"NETWORK_DENIAL_OF_SERVICE", +"CLOUD_SERVICE_DISCOVERY", +"STEAL_APPLICATION_ACCESS_TOKEN", +"ACCOUNT_ACCESS_REMOVAL", +"STEAL_WEB_SESSION_COOKIE", +"CREATE_OR_MODIFY_SYSTEM_PROCESS", +"ABUSE_ELEVATION_CONTROL_MECHANISM", +"UNSECURED_CREDENTIALS", +"MODIFY_AUTHENTICATION_PROCESS", +"IMPAIR_DEFENSES", +"DISABLE_OR_MODIFY_TOOLS", +"EXFILTRATION_OVER_WEB_SERVICE", +"EXFILTRATION_TO_CLOUD_STORAGE", +"DYNAMIC_RESOLUTION", +"LATERAL_TOOL_TRANSFER", +"MODIFY_CLOUD_COMPUTE_INFRASTRUCTURE", +"CREATE_SNAPSHOT", +"CLOUD_INFRASTRUCTURE_DISCOVERY", +"OBTAIN_CAPABILITIES", +"ACTIVE_SCANNING", +"SCANNING_IP_BLOCKS", +"CONTAINER_AND_RESOURCE_DISCOVERY" +], +"enumDescriptions": [ +"Unspecified value.", +"T1036", +"T1036.005", +"T1037", +"T1037.005", +"T1046", +"T1057", +"T1059", +"T1059.004", +"T1059.006", +"T1069", +"T1069.003", +"T1071", +"T1071.004", +"T1072", +"T1078", +"T1078.001", +"T1078.003", +"T1078.004", +"T1090", +"T1090.002", +"T1090.003", +"T1098", +"T1098.001", +"T1098.004", +"T1098.006", +"T1105", +"T1106", +"T1110", +"T1129", +"T1134", +"T1134.001", +"T1190", +"T1484", +"T1485", +"T1489", +"T1490", +"T1496", +"T1498", +"T1526", +"T1528", +"T1531", +"T1539", +"T1543", +"T1548", +"T1552", +"T1556", +"T1562", +"T1562.001", +"T1567", +"T1567.002", +"T1568", +"T1570", +"T1578", +"T1578.001", +"T1580", +"T1588", +"T1595", +"T1595.001", +"T1613" +], +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The MITRE ATT&CK version referenced by the above fields. E.g. \"8\".", +"type": "string" +} +}, +"type": "object" +}, +"Node": { +"description": "Kubernetes nodes associated with the finding.", +"id": "Node", +"properties": { +"name": { +"description": "[Full resource name](https://google.aip.dev/122#full-resource-names) of the Compute Engine VM running the cluster node.", +"type": "string" +} +}, +"type": "object" +}, +"NodePool": { +"description": "Provides GKE node pool information.", +"id": "NodePool", +"properties": { +"name": { +"description": "Kubernetes node pool name.", +"type": "string" +}, +"nodes": { +"description": "Nodes associated with the finding.", +"items": { +"$ref": "Node" +}, +"type": "array" +} +}, +"type": "object" +}, +"Notebook": { +"description": "Represents a Jupyter notebook IPYNB file, such as a [Colab Enterprise notebook](https://cloud.google.com/colab/docs/introduction) file, that is associated with a finding.", +"id": "Notebook", +"properties": { +"lastAuthor": { +"description": "The user ID of the latest author to modify the notebook.", +"type": "string" +}, +"name": { +"description": "The name of the notebook.", +"type": "string" +}, +"notebookUpdateTime": { +"description": "The most recent time the notebook was updated.", +"format": "google-datetime", +"type": "string" +}, +"service": { +"description": "The source notebook service, for example, \"Colab Enterprise\".", +"type": "string" +} +}, +"type": "object" +}, +"Object": { +"description": "Kubernetes object related to the finding, uniquely identified by GKNN. Used if the object Kind is not one of Pod, Node, NodePool, Binding, or AccessReview.", +"id": "Object", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"group": { +"description": "Kubernetes object group, such as \"policy.k8s.io/v1\".", +"type": "string" +}, +"kind": { +"description": "Kubernetes object kind, such as \"Namespace\".", +"type": "string" +}, +"name": { +"description": "Kubernetes object name. For details see https://kubernetes.io/docs/concepts/overview/working-with-objects/names/.", +"type": "string" +}, +"ns": { +"description": "Kubernetes object namespace. Must be a valid DNS label. Named \"ns\" to avoid collision with C++ namespace keyword. For details see https://kubernetes.io/docs/tasks/administer-cluster/namespaces/.", +"type": "string" +} +}, +"type": "object" +}, +"OrgPolicy": { +"description": "Contains information about the org policies associated with the finding.", +"id": "OrgPolicy", +"properties": { +"name": { +"description": "The resource name of the org policy. Example: \"organizations/{organization_id}/policies/{constraint_name}\"", +"type": "string" +} +}, +"type": "object" +}, +"Package": { +"description": "Package is a generic definition of a package.", +"id": "Package", +"properties": { +"cpeUri": { +"description": "The CPE URI where the vulnerability was detected.", +"type": "string" +}, +"packageName": { +"description": "The name of the package where the vulnerability was detected.", +"type": "string" +}, +"packageType": { +"description": "Type of package, for example, os, maven, or go.", +"type": "string" +}, +"packageVersion": { +"description": "The version of the package.", +"type": "string" +} +}, +"type": "object" +}, +"Pod": { +"description": "A Kubernetes Pod.", +"id": "Pod", +"properties": { +"containers": { +"description": "Pod containers associated with this finding, if any.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"labels": { +"description": "Pod labels. For Kubernetes containers, these are applied to the container.", +"items": { +"$ref": "Label" +}, +"type": "array" +}, +"name": { +"description": "Kubernetes Pod name.", +"type": "string" +}, +"ns": { +"description": "Kubernetes Pod namespace.", +"type": "string" +} +}, +"type": "object" +}, +"PolicyDriftDetails": { +"description": "The policy field that violates the deployed posture and its expected and detected values.", +"id": "PolicyDriftDetails", +"properties": { +"detectedValue": { +"description": "The detected value that violates the deployed posture, for example, `false` or `allowed_values={\"projects/22831892\"}`.", +"type": "string" +}, +"expectedValue": { +"description": "The value of this field that was configured in a posture, for example, `true` or `allowed_values={\"projects/29831892\"}`.", +"type": "string" +}, +"field": { +"description": "The name of the updated field, for example constraint.implementation.policy_rules[0].enforce", +"type": "string" +} +}, +"type": "object" +}, +"Process": { +"description": "Represents an operating system process.", +"id": "Process", +"properties": { +"args": { +"description": "Process arguments as JSON encoded strings.", +"items": { +"type": "string" +}, +"type": "array" +}, +"argumentsTruncated": { +"description": "True if `args` is incomplete.", +"type": "boolean" +}, +"binary": { +"$ref": "File", +"description": "File information for the process executable." +}, +"envVariables": { +"description": "Process environment variables.", +"items": { +"$ref": "EnvironmentVariable" +}, +"type": "array" +}, +"envVariablesTruncated": { +"description": "True if `env_variables` is incomplete.", +"type": "boolean" +}, +"libraries": { +"description": "File information for libraries loaded by the process.", +"items": { +"$ref": "File" +}, +"type": "array" +}, +"name": { +"description": "The process name, as displayed in utilities like `top` and `ps`. This name can be accessed through `/proc/[pid]/comm` and changed with `prctl(PR_SET_NAME)`.", +"type": "string" +}, +"parentPid": { +"description": "The parent process ID.", +"format": "int64", +"type": "string" +}, +"pid": { +"description": "The process ID.", +"format": "int64", +"type": "string" +}, +"script": { +"$ref": "File", +"description": "When the process represents the invocation of a script, `binary` provides information about the interpreter, while `script` provides information about the script file provided to the interpreter." +} +}, +"type": "object" +}, +"ProcessSignature": { +"description": "Indicates what signature matched this process.", +"id": "ProcessSignature", +"properties": { +"memoryHashSignature": { +"$ref": "MemoryHashSignature", +"description": "Signature indicating that a binary family was matched." +}, +"signatureType": { +"description": "Describes the type of resource associated with the signature.", +"enum": [ +"SIGNATURE_TYPE_UNSPECIFIED", +"SIGNATURE_TYPE_PROCESS", +"SIGNATURE_TYPE_FILE" +], +"enumDescriptions": [ +"The default signature type.", +"Used for signatures concerning processes.", +"Used for signatures concerning disks." +], +"type": "string" +}, +"yaraRuleSignature": { +"$ref": "YaraRuleSignature", +"description": "Signature indicating that a YARA rule was matched." +} +}, +"type": "object" +}, +"RapidVulnerabilityDetectionSettings": { +"description": "Resource capturing the settings for the Rapid Vulnerability Detection service.", +"id": "RapidVulnerabilityDetectionSettings", +"properties": { +"modules": { +"additionalProperties": { +"$ref": "Config" +}, +"description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", +"type": "object" +}, +"name": { +"description": "The resource name of the RapidVulnerabilityDetectionSettings. Formats: * organizations/{organization}/rapidVulnerabilityDetectionSettings * folders/{folder}/rapidVulnerabilityDetectionSettings * projects/{project}/rapidVulnerabilityDetectionSettings", +"type": "string" +}, +"serviceEnablementState": { +"description": "The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"INHERITED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"State is inherited from the parent resource.", +"State is enabled.", +"State is disabled." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the settings were last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Reference": { +"description": "Additional Links", +"id": "Reference", +"properties": { +"source": { +"description": "Source of the reference e.g. NVD", +"type": "string" +}, +"uri": { +"description": "Uri for the mentioned source e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-34527.", +"type": "string" +} +}, +"type": "object" +}, +"Requests": { +"description": "Information about the requests relevant to the finding.", +"id": "Requests", +"properties": { +"longTermAllowed": { +"description": "Allowed RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"longTermDenied": { +"description": "Denied RPS (requests per second) over the long term.", +"format": "int32", +"type": "integer" +}, +"ratio": { +"description": "For 'Increasing deny ratio', the ratio is the denied traffic divided by the allowed traffic. For 'Allowed traffic spike', the ratio is the allowed traffic in the short term divided by allowed traffic in the long term.", +"format": "double", +"type": "number" +}, +"shortTermAllowed": { +"description": "Allowed RPS (requests per second) in the short term.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResourcePath": { +"description": "Represents the path of resources leading up to the resource this finding is about.", +"id": "ResourcePath", +"properties": { +"nodes": { +"description": "The list of nodes that make the up resource path, ordered from lowest level to highest level.", +"items": { +"$ref": "ResourcePathNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"ResourcePathNode": { +"description": "A node within the resource path. Each node represents a resource within the resource hierarchy.", +"id": "ResourcePathNode", +"properties": { +"displayName": { +"description": "The display name of the resource this node represents.", +"type": "string" +}, +"id": { +"description": "The ID of the resource this node represents.", +"type": "string" +}, +"nodeType": { +"description": "The type of resource this node represents.", +"enum": [ +"RESOURCE_PATH_NODE_TYPE_UNSPECIFIED", +"GCP_ORGANIZATION", +"GCP_FOLDER", +"GCP_PROJECT", +"AWS_ORGANIZATION", +"AWS_ORGANIZATIONAL_UNIT", +"AWS_ACCOUNT", +"AZURE_MANAGEMENT_GROUP", +"AZURE_SUBSCRIPTION", +"AZURE_RESOURCE_GROUP" +], +"enumDescriptions": [ +"Node type is unspecified.", +"The node represents a GCP organization.", +"The node represents a GCP folder.", +"The node represents a GCP project.", +"The node represents an AWS organization.", +"The node represents an AWS organizational unit.", +"The node represents an AWS account.", +"The node represents an Azure management group.", +"The node represents an Azure subscription.", +"The node represents an Azure resource group." +], +"type": "string" +} +}, +"type": "object" +}, +"Role": { +"description": "Kubernetes Role or ClusterRole.", +"id": "Role", +"properties": { +"kind": { +"description": "Role type.", +"enum": [ +"KIND_UNSPECIFIED", +"ROLE", +"CLUSTER_ROLE" +], +"enumDescriptions": [ +"Role type is not specified.", +"Kubernetes Role.", +"Kubernetes ClusterRole." +], +"type": "string" +}, +"name": { +"description": "Role name.", +"type": "string" +}, +"ns": { +"description": "Role namespace.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityBulletin": { +"description": "SecurityBulletin are notifications of vulnerabilities of Google products.", +"id": "SecurityBulletin", +"properties": { +"bulletinId": { +"description": "ID of the bulletin corresponding to the vulnerability.", +"type": "string" +}, +"submissionTime": { +"description": "Submission time of this Security Bulletin.", +"format": "google-datetime", +"type": "string" +}, +"suggestedUpgradeVersion": { +"description": "This represents a version that the cluster receiving this notification should be upgraded to, based on its current version. For example, 1.15.0", +"type": "string" +} +}, +"type": "object" +}, +"SecurityCenterSettings": { +"description": "Resource capturing the settings for Security Center. Next ID: 12", +"id": "SecurityCenterSettings", +"properties": { +"logSinkProject": { +"description": "The resource name of the project to send logs to. This project must be part of the organization this resource resides in. The format is `projects/{project_id}`. An empty value disables logging. This value is only referenced by services that support log sink. Please refer to the documentation for an updated list of compatible services. This may only be specified for organization level onboarding.", +"type": "string" +}, +"name": { +"description": "The resource name of the SecurityCenterSettings. Format: organizations/{organization}/securityCenterSettings Format: folders/{folder}/securityCenterSettings Format: projects/{project}/securityCenterSettings", +"type": "string" +}, +"onboardingTime": { +"description": "Output only. Timestamp of when the customer organization was onboarded to SCC.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"orgServiceAccount": { +"description": "Output only. The organization level service account to be used for security center components.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SecurityHealthAnalyticsSettings": { +"description": "Resource capturing the settings for the Security Health Analytics service.", +"id": "SecurityHealthAnalyticsSettings", +"properties": { +"modules": { +"additionalProperties": { +"$ref": "Config" +}, +"description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", +"type": "object" +}, +"name": { +"description": "The resource name of the SecurityHealthAnalyticsSettings. Formats: * organizations/{organization}/securityHealthAnalyticsSettings * folders/{folder}/securityHealthAnalyticsSettings * projects/{project}/securityHealthAnalyticsSettings", +"type": "string" +}, +"serviceAccount": { +"description": "Output only. The service account used by Security Health Analytics detectors.", +"readOnly": true, +"type": "string" +}, +"serviceEnablementState": { +"description": "The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"INHERITED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"State is inherited from the parent resource.", +"State is enabled.", +"State is disabled." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the settings were last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SecurityMarks": { +"description": "User specified security marks that are attached to the parent Security Command Center resource. Security marks are scoped within a Security Command Center organization -- they can be modified and viewed by all users who have proper permissions on the organization.", +"id": "SecurityMarks", +"properties": { +"canonicalName": { +"description": "The canonical name of the marks. Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"folders/{folder_id}/assets/{asset_id}/securityMarks\" \"projects/{project_number}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"folders/{folder_id}/sources/{source_id}/findings/{finding_id}/securityMarks\" \"projects/{project_number}/sources/{source_id}/findings/{finding_id}/securityMarks\"", +"type": "string" +}, +"marks": { +"additionalProperties": { +"type": "string" +}, +"description": "Mutable user specified security marks belonging to the parent resource. Constraints are as follows: * Keys and values are treated as case insensitive * Keys must be between 1 - 256 characters (inclusive) * Keys must be letters, numbers, underscores, or dashes * Values have leading and trailing whitespace trimmed, remaining characters must be between 1 - 4096 characters (inclusive)", +"type": "object" +}, +"name": { +"description": "The relative resource name of the SecurityMarks. See: https://cloud.google.com/apis/design/resource_names#relative_resource_name Examples: \"organizations/{organization_id}/assets/{asset_id}/securityMarks\" \"organizations/{organization_id}/sources/{source_id}/findings/{finding_id}/securityMarks\".", +"type": "string" +} +}, +"type": "object" +}, +"SecurityPolicy": { +"description": "Information about the [Google Cloud Armor security policy](https://cloud.google.com/armor/docs/security-policy-overview) relevant to the finding.", +"id": "SecurityPolicy", +"properties": { +"name": { +"description": "The name of the Google Cloud Armor security policy, for example, \"my-security-policy\".", +"type": "string" +}, +"preview": { +"description": "Whether or not the associated rule or policy is in preview mode.", +"type": "boolean" +}, +"type": { +"description": "The type of Google Cloud Armor security policy for example, \u2018backend security policy\u2019, \u2018edge security policy\u2019, \u2018network edge security policy\u2019, or \u2018always-on DDoS protection\u2019.", +"type": "string" +} +}, +"type": "object" +}, +"SecurityPosture": { +"description": "Represents a posture that is deployed on Google Cloud by the Security Command Center Posture Management service. A posture contains one or more policy sets. A policy set is a group of policies that enforce a set of security rules on Google Cloud.", +"id": "SecurityPosture", +"properties": { +"changedPolicy": { +"description": "The name of the updated policy, for example, `projects/{project_id}/policies/{constraint_name}`.", +"type": "string" +}, +"name": { +"description": "Name of the posture, for example, `CIS-Posture`.", +"type": "string" +}, +"policy": { +"description": "The ID of the updated policy, for example, `compute-policy-1`.", +"type": "string" +}, +"policyDriftDetails": { +"description": "The details about a change in an updated policy that violates the deployed posture.", +"items": { +"$ref": "PolicyDriftDetails" +}, +"type": "array" +}, +"policySet": { +"description": "The name of the updated policyset, for example, `cis-policyset`.", +"type": "string" +}, +"postureDeployment": { +"description": "The name of the posture deployment, for example, `organizations/{org_id}/posturedeployments/{posture_deployment_id}`.", +"type": "string" +}, +"postureDeploymentResource": { +"description": "The project, folder, or organization on which the posture is deployed, for example, `projects/{project_number}`.", +"type": "string" +}, +"revisionId": { +"description": "The version of the posture, for example, `c7cfa2a8`.", +"type": "string" +} +}, +"type": "object" +}, +"ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "ServiceAccountDelegationInfo", +"properties": { +"principalEmail": { +"description": "The email address of a Google account.", +"type": "string" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. As compared to `principal_email`, supports principals that aren't associated with email addresses, such as third party principals. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subjects/{subject}` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +} +}, +"type": "object" +}, +"Subject": { +"description": "Represents a Kubernetes subject.", +"id": "Subject", +"properties": { +"kind": { +"description": "Authentication type for the subject.", +"enum": [ +"AUTH_TYPE_UNSPECIFIED", +"USER", +"SERVICEACCOUNT", +"GROUP" +], +"enumDescriptions": [ +"Authentication is not specified.", +"User with valid certificate.", +"Users managed by Kubernetes API with credentials stored as secrets.", +"Collection of users." +], +"type": "string" +}, +"name": { +"description": "Name for the subject.", +"type": "string" +}, +"ns": { +"description": "Namespace for the subject.", +"type": "string" +} +}, +"type": "object" +}, +"Subscription": { +"description": "Resource capturing the state of an organization's subscription.", +"id": "Subscription", +"properties": { +"details": { +"$ref": "Details", +"description": "The details of the most recent active subscription. If there has never been a subscription this will be empty." +}, +"name": { +"description": "The resource name of the subscription. Format: organizations/{organization}/subscription", +"type": "string" +}, +"tier": { +"description": "The tier of SCC features this organization currently has access to.", +"enum": [ +"TIER_UNSPECIFIED", +"STANDARD", +"PREMIUM", +"ENTERPRISE", +"ENTERPRISE_MC" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The standard tier.", +"The premium tier.", +"The enterprise tier.", +"The enterprise MC tier." +], +"type": "string" +} +}, +"type": "object" +}, +"TicketInfo": { +"description": "Information about the ticket, if any, that is being used to track the resolution of the issue that is identified by this finding.", +"id": "TicketInfo", +"properties": { +"assignee": { +"description": "The assignee of the ticket in the ticket system.", +"type": "string" +}, +"description": { +"description": "The description of the ticket in the ticket system.", +"type": "string" +}, +"id": { +"description": "The identifier of the ticket in the ticket system.", +"type": "string" +}, +"status": { +"description": "The latest status of the ticket, as reported by the ticket system.", +"type": "string" +}, +"updateTime": { +"description": "The time when the ticket was last updated, as reported by the ticket system.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "The link to the ticket in the ticket system.", +"type": "string" +} +}, +"type": "object" +}, +"VirtualMachineThreatDetectionSettings": { +"description": "Resource capturing the settings for the Virtual Machine Threat Detection service.", +"id": "VirtualMachineThreatDetectionSettings", +"properties": { +"modules": { +"additionalProperties": { +"$ref": "Config" +}, +"description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", +"type": "object" +}, +"name": { +"description": "The resource name of the VirtualMachineThreatDetectionSettings. Formats: * organizations/{organization}/virtualMachineThreatDetectionSettings * folders/{folder}/virtualMachineThreatDetectionSettings * projects/{project}/virtualMachineThreatDetectionSettings", +"type": "string" +}, +"serviceAccount": { +"description": "Output only. The service account used by Virtual Machine Threat Detection detectors.", +"readOnly": true, +"type": "string" +}, +"serviceEnablementState": { +"description": "The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"INHERITED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"State is inherited from the parent resource.", +"State is enabled.", +"State is disabled." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the settings were last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Vulnerability": { +"description": "Refers to common vulnerability fields e.g. cve, cvss, cwe etc.", +"id": "Vulnerability", +"properties": { +"cve": { +"$ref": "Cve", +"description": "CVE stands for Common Vulnerabilities and Exposures (https://cve.mitre.org/about/)" +}, +"fixedPackage": { +"$ref": "Package", +"description": "The fixed package is relevant to the finding." +}, +"offendingPackage": { +"$ref": "Package", +"description": "The offending package is relevant to the finding." +}, +"securityBulletin": { +"$ref": "SecurityBulletin", +"description": "The security bulletin is relevant to this finding." +} +}, +"type": "object" +}, +"VulnerabilityCountBySeverity": { +"description": "Vulnerability count by severity.", +"id": "VulnerabilityCountBySeverity", +"properties": { +"severityToFindingCount": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Key is the Severity enum.", +"type": "object" +} +}, +"type": "object" +}, +"VulnerabilitySnapshot": { +"description": "Result containing the properties and count of a VulnerabilitySnapshot request.", +"id": "VulnerabilitySnapshot", +"properties": { +"cloudProvider": { +"description": "The cloud provider for the vulnerability snapshot.", +"enum": [ +"CLOUD_PROVIDER_UNSPECIFIED", +"GOOGLE_CLOUD_PLATFORM", +"AMAZON_WEB_SERVICES", +"MICROSOFT_AZURE" +], +"enumDescriptions": [ +"The cloud provider is unspecified.", +"The cloud provider is Google Cloud Platform.", +"The cloud provider is Amazon Web Services.", +"The cloud provider is Microsoft Azure." +], +"type": "string" +}, +"findingCount": { +"$ref": "VulnerabilityCountBySeverity", +"description": "The vulnerability count by severity." +}, +"name": { +"description": "Identifier. The vulnerability snapshot name. Format: //locations//vulnerabilitySnapshots/", +"type": "string" +}, +"snapshotTime": { +"description": "The time that the snapshot was taken.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"WebSecurityScannerSettings": { +"description": "Resource capturing the settings for the Web Security Scanner service.", +"id": "WebSecurityScannerSettings", +"properties": { +"modules": { +"additionalProperties": { +"$ref": "Config" +}, +"description": "The configurations including the state of enablement for the service's different modules. The absence of a module in the map implies its configuration is inherited from its parent's.", +"type": "object" +}, +"name": { +"description": "The resource name of the WebSecurityScannerSettings. Formats: * organizations/{organization}/webSecurityScannerSettings * folders/{folder}/webSecurityScannerSettings * projects/{project}/webSecurityScannerSettings", +"type": "string" +}, +"serviceEnablementState": { +"description": "The state of enablement for the service at its level of the resource hierarchy. A DISABLED state will override all module enablement_states to DISABLED.", +"enum": [ +"ENABLEMENT_STATE_UNSPECIFIED", +"INHERITED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"State is inherited from the parent resource.", +"State is enabled.", +"State is disabled." +], +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the settings were last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"YaraRuleSignature": { +"description": "A signature corresponding to a YARA rule.", +"id": "YaraRuleSignature", +"properties": { +"yaraRule": { +"description": "The name of the YARA rule.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Security Command Center API", +"version": "v1beta2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceconsumermanagement.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceconsumermanagement.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..433e80fe8b5968060ef91ef2b53ad05cedacefcb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceconsumermanagement.v1.json @@ -0,0 +1,3256 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://serviceconsumermanagement.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Consumer Management", +"description": "Manages the service consumers of a Service Infrastructure service.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-consumer-management/docs/overview", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "serviceconsumermanagement:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://serviceconsumermanagement.mtls.googleapis.com/", +"name": "serviceconsumermanagement", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "serviceconsumermanagement.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "serviceconsumermanagement.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "serviceconsumermanagement.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "serviceconsumermanagement.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"services": { +"methods": { +"search": { +"description": "Search tenancy units for a managed service.", +"flatPath": "v1/services/{servicesId}:search", +"httpMethod": "GET", +"id": "serviceconsumermanagement.services.search", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of results returned by this request. Currently, the default maximum is set to 1000. If `page_size` isn't provided or the size provided is a number larger than 1000, it's automatically set to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Service for which search is performed. services/{service} {service} the name of a service, for example 'service.googleapis.com'.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +}, +"query": { +"description": "Optional. Set a query `{expression}` for querying tenancy units. Your `{expression}` must be in the format: `field_name=literal_string`. The `field_name` is the name of the field you want to compare. Supported fields are `tenant_resources.tag` and `tenant_resources.resource`. For example, to search tenancy units that contain at least one tenant resource with a given tag 'xyz', use the query `tenant_resources.tag=xyz`. To search tenancy units that contain at least one tenant resource with a given resource name 'projects/123456', use the query `tenant_resources.resource=projects/123456`. Multiple expressions can be joined with `AND`s. Tenancy units must match all expressions to be included in the result set. For example, `tenant_resources.tag=xyz AND tenant_resources.resource=projects/123456`", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}:search", +"response": { +"$ref": "SearchTenancyUnitsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"tenancyUnits": { +"methods": { +"addProject": { +"description": "Add a new tenant project to the tenancy unit. There can be a maximum of 1024 tenant projects in a tenancy unit. If there are previously failed `AddTenantProject` calls, you might need to call `RemoveTenantProject` first to resolve them before you can make another call to `AddTenantProject` with the same tag. Operation.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:addProject", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.tenancyUnits.addProject", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:addProject", +"request": { +"$ref": "AddTenantProjectRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"applyProjectConfig": { +"description": "Apply a configuration to an existing tenant project. This project must exist in an active state and have the original owner account. The caller must have permission to add a project to the given tenancy unit. The configuration is applied, but any existing settings on the project aren't modified. Specified policy bindings are applied. Existing bindings aren't modified. Specified services are activated. No service is deactivated. If specified, new billing configuration is applied. Omit a billing configuration to keep the existing one. A service account in the project is created if previously non existed. Specified labels will be appended to tenant project, note that the value of existing label key will be updated if the same label key is requested. The specified folder is ignored, as moving a tenant project to a different folder isn't supported. The operation fails if any of the steps fail, but no rollback of already applied configuration changes is attempted. Operation.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:applyProjectConfig", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.tenancyUnits.applyProjectConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:applyProjectConfig", +"request": { +"$ref": "ApplyTenantProjectConfigRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"attachProject": { +"description": "Attach an existing project to the tenancy unit as a new tenant resource. The project could either be the tenant project reserved by calling `AddTenantProject` under a tenancy unit of a service producer's project of a managed service, or from a separate project. The caller is checked against a set of permissions as if calling `AddTenantProject` on the same service consumer. To trigger the attachment, the targeted tenant project must be in a folder. Make sure the ServiceConsumerManagement service account is the owner of that project. These two requirements are already met if the project is reserved by calling `AddTenantProject`. Operation.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:attachProject", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.tenancyUnits.attachProject", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the tenancy unit that the project will be attached to. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:attachProject", +"request": { +"$ref": "AttachTenantProjectRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a tenancy unit with no tenant resources. If tenancy unit already exists, it will be returned, however, in this case, returned TenancyUnit does not have tenant_resources field set and ListTenancyUnits has to be used to get a complete TenancyUnit with all fields populated.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.tenancyUnits.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a managed service, such as 'service.googleapis.com'. Enables service binding using the new tenancy unit.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/tenancyUnits", +"request": { +"$ref": "CreateTenancyUnitRequest" +}, +"response": { +"$ref": "TenancyUnit" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a tenancy unit. Before you delete the tenancy unit, there should be no tenant resources in it that aren't in a DELETED state. Operation.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}", +"httpMethod": "DELETE", +"id": "serviceconsumermanagement.services.tenancyUnits.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the tenancy unit to be deleted.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"deleteProject": { +"description": "Deletes the specified project resource identified by a tenant resource tag. The mothod removes a project lien with a 'TenantManager' origin if that was added. It will then attempt to delete the project. If that operation fails, this method also fails. After the project has been deleted, the tenant resource state is set to DELETED. To permanently remove resource metadata, call the `RemoveTenantProject` method. New resources with the same tag can't be added if there are existing resources in a DELETED state. Operation.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:deleteProject", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.tenancyUnits.deleteProject", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:deleteProject", +"request": { +"$ref": "DeleteTenantProjectRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Find the tenancy unit for a managed service and service consumer. This method shouldn't be used in a service producer's runtime path, for example to find the tenant project number when creating VMs. Service producers must persist the tenant project's information after the project is created.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits", +"httpMethod": "GET", +"id": "serviceconsumermanagement.services.tenancyUnits.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter expression over tenancy resources field. Optional.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of results returned by this request.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The continuation token, which is used to page through large result sets. To get the next page of results, set this parameter to the value of `nextPageToken` from the previous response.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Managed service and service consumer. Required. services/{service}/{collection id}/{resource id} {collection id} is the cloud resource collection type representing the service consumer, for example 'projects', or 'organizations'. {resource id} is the consumer numeric id, such as project number: '123456'. {service} the name of a service, such as 'service.googleapis.com'.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/tenancyUnits", +"response": { +"$ref": "ListTenancyUnitsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeProject": { +"description": "Removes the specified project resource identified by a tenant resource tag. The method removes the project lien with 'TenantManager' origin if that was added. It then attempts to delete the project. If that operation fails, this method also fails. Calls to remove already removed or non-existent tenant project succeed. After the project has been deleted, or if was already in a DELETED state, resource metadata is permanently removed from the tenancy unit. Operation.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:removeProject", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.tenancyUnits.removeProject", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:removeProject", +"request": { +"$ref": "RemoveTenantProjectRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"undeleteProject": { +"description": "Attempts to undelete a previously deleted tenant project. The project must be in a DELETED state. There are no guarantees that an undeleted project will be in a fully restored and functional state. Call the `ApplyTenantProjectConfig` method to update its configuration and then validate all managed service resources. Operation.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}/tenancyUnits/{tenancyUnitsId}:undeleteProject", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.tenancyUnits.undeleteProject", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the tenancy unit. Such as 'services/service.googleapis.com/projects/12345/tenancyUnits/abcd'.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/tenancyUnits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:undeleteProject", +"request": { +"$ref": "UndeleteTenantProjectRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://serviceconsumermanagement.googleapis.com/", +"schemas": { +"AddTenantProjectRequest": { +"description": "Request to add a newly created and configured tenant project to a tenancy unit.", +"id": "AddTenantProjectRequest", +"properties": { +"projectConfig": { +"$ref": "TenantProjectConfig", +"description": "Configuration of the new tenant project to be added to tenancy unit resources." +}, +"tag": { +"description": "Required. Tag of the added project. Must be less than 128 characters. Required.", +"type": "string" +} +}, +"type": "object" +}, +"Api": { +"description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", +"id": "Api", +"properties": { +"methods": { +"description": "The methods of this interface, in unspecified order.", +"items": { +"$ref": "Method" +}, +"type": "array" +}, +"mixins": { +"description": "Included interfaces. See Mixin.", +"items": { +"$ref": "Mixin" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the interface.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "Source context for the protocol buffer service represented by this message." +}, +"syntax": { +"description": "The source syntax of the service.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +}, +"version": { +"description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", +"type": "string" +} +}, +"type": "object" +}, +"ApplyTenantProjectConfigRequest": { +"description": "Request to apply configuration to an existing tenant project.", +"id": "ApplyTenantProjectConfigRequest", +"properties": { +"projectConfig": { +"$ref": "TenantProjectConfig", +"description": "Configuration that should be applied to the existing tenant project." +}, +"tag": { +"description": "Required. Tag of the project. Must be less than 128 characters. Required.", +"type": "string" +} +}, +"type": "object" +}, +"AttachTenantProjectRequest": { +"description": "Request to attach an existing project to the tenancy unit as a new tenant resource.", +"id": "AttachTenantProjectRequest", +"properties": { +"externalResource": { +"description": "When attaching an external project, this is in the format of `projects/{project_number}`.", +"type": "string" +}, +"reservedResource": { +"description": "When attaching a reserved project already in tenancy units, this is the tag of a tenant resource under the tenancy unit for the managed service's service producer project. The reserved tenant resource must be in an active state.", +"type": "string" +}, +"tag": { +"description": "Required. Tag of the tenant resource after attachment. Must be less than 128 characters. Required.", +"type": "string" +} +}, +"type": "object" +}, +"AuthProvider": { +"description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthProvider", +"properties": { +"audiences": { +"description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"authorizationUrl": { +"description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", +"type": "string" +}, +"id": { +"description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", +"type": "string" +}, +"issuer": { +"description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", +"type": "string" +}, +"jwksUri": { +"description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", +"type": "string" +}, +"jwtLocations": { +"description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", +"items": { +"$ref": "JwtLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthRequirement": { +"description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthRequirement", +"properties": { +"audiences": { +"description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"providerId": { +"description": "id from authentication provider. Example: provider_id: bookstore_auth", +"type": "string" +} +}, +"type": "object" +}, +"Authentication": { +"description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", +"id": "Authentication", +"properties": { +"providers": { +"description": "Defines a set of authentication providers that a service supports.", +"items": { +"$ref": "AuthProvider" +}, +"type": "array" +}, +"rules": { +"description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "AuthenticationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthenticationRule": { +"description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", +"id": "AuthenticationRule", +"properties": { +"allowWithoutCredential": { +"description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", +"type": "boolean" +}, +"oauth": { +"$ref": "OAuthRequirements", +"description": "The requirements for OAuth credentials." +}, +"requirements": { +"description": "Requirements for additional authentication providers.", +"items": { +"$ref": "AuthRequirement" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Backend": { +"description": "`Backend` defines the backend configuration for a service.", +"id": "Backend", +"properties": { +"rules": { +"description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "BackendRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"BackendRule": { +"description": "A backend rule provides configuration for an individual API element.", +"id": "BackendRule", +"properties": { +"address": { +"description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", +"type": "string" +}, +"deadline": { +"description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", +"format": "double", +"type": "number" +}, +"disableAuth": { +"description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", +"type": "boolean" +}, +"jwtAudience": { +"description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", +"type": "string" +}, +"minDeadline": { +"deprecated": true, +"description": "Deprecated, do not use.", +"format": "double", +"type": "number" +}, +"operationDeadline": { +"description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", +"format": "double", +"type": "number" +}, +"overridesByRequestProtocol": { +"additionalProperties": { +"$ref": "BackendRule" +}, +"description": "The map between request protocol and the backend address.", +"type": "object" +}, +"pathTranslation": { +"enum": [ +"PATH_TRANSLATION_UNSPECIFIED", +"CONSTANT_ADDRESS", +"APPEND_PATH_TO_ADDRESS" +], +"enumDescriptions": [ +"", +"Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe", +"The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" +], +"type": "string" +}, +"protocol": { +"description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", +"type": "string" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Billing": { +"description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", +"id": "Billing", +"properties": { +"consumerDestinations": { +"description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", +"items": { +"$ref": "BillingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"BillingConfig": { +"description": "Describes the billing configuration for a new tenant project.", +"id": "BillingConfig", +"properties": { +"billingAccount": { +"description": "Name of the billing account. For example `billingAccounts/012345-567890-ABCDEF`.", +"type": "string" +} +}, +"type": "object" +}, +"BillingDestination": { +"description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", +"id": "BillingDestination", +"properties": { +"metrics": { +"description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"ClientLibrarySettings": { +"description": "Details about how and where to publish client libraries.", +"id": "ClientLibrarySettings", +"properties": { +"cppSettings": { +"$ref": "CppSettings", +"description": "Settings for C++ client libraries." +}, +"dotnetSettings": { +"$ref": "DotnetSettings", +"description": "Settings for .NET client libraries." +}, +"goSettings": { +"$ref": "GoSettings", +"description": "Settings for Go client libraries." +}, +"javaSettings": { +"$ref": "JavaSettings", +"description": "Settings for legacy Java features, supported in the Service YAML." +}, +"launchStage": { +"description": "Launch stage of this version of the API.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"nodeSettings": { +"$ref": "NodeSettings", +"description": "Settings for Node client libraries." +}, +"phpSettings": { +"$ref": "PhpSettings", +"description": "Settings for PHP client libraries." +}, +"pythonSettings": { +"$ref": "PythonSettings", +"description": "Settings for Python client libraries." +}, +"restNumericEnums": { +"description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", +"type": "boolean" +}, +"rubySettings": { +"$ref": "RubySettings", +"description": "Settings for Ruby client libraries." +}, +"version": { +"description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", +"type": "string" +} +}, +"type": "object" +}, +"CommonLanguageSettings": { +"description": "Required information for every language.", +"id": "CommonLanguageSettings", +"properties": { +"destinations": { +"description": "The destination where API teams want this client library to be published.", +"items": { +"enum": [ +"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", +"GITHUB", +"PACKAGE_MANAGER" +], +"enumDescriptions": [ +"Client libraries will neither be generated nor published to package managers.", +"Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", +"Publish the library to package managers like nuget.org and npmjs.com." +], +"type": "string" +}, +"type": "array" +}, +"referenceDocsUri": { +"deprecated": true, +"description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", +"type": "string" +} +}, +"type": "object" +}, +"Context": { +"description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using \u201cx-goog-ext--bin\u201d and \u201cx-goog-ext--jspb\u201d format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", +"id": "Context", +"properties": { +"rules": { +"description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "ContextRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContextRule": { +"description": "A context rule provides information about the context for an individual API element.", +"id": "ContextRule", +"properties": { +"allowedRequestExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowedResponseExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", +"items": { +"type": "string" +}, +"type": "array" +}, +"provided": { +"description": "A list of full type names of provided contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requested": { +"description": "A list of full type names of requested contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Control": { +"description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", +"id": "Control", +"properties": { +"environment": { +"description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", +"type": "string" +}, +"methodPolicies": { +"description": "Defines policies applying to the API methods of the service.", +"items": { +"$ref": "MethodPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"CppSettings": { +"description": "Settings for C++ client libraries.", +"id": "CppSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"CreateTenancyUnitRequest": { +"description": "Request to create a tenancy unit for a service consumer of a managed service.", +"id": "CreateTenancyUnitRequest", +"properties": { +"tenancyUnitId": { +"description": "Optional. Optional service producer-provided identifier of the tenancy unit. Must be no longer than 40 characters and preferably URI friendly. If it isn't provided, a UID for the tenancy unit is automatically generated. The identifier must be unique across a managed service. If the tenancy unit already exists for the managed service and service consumer pair, calling `CreateTenancyUnit` returns the existing tenancy unit if the provided identifier is identical or empty, otherwise the call fails.", +"type": "string" +} +}, +"type": "object" +}, +"CustomError": { +"description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", +"id": "CustomError", +"properties": { +"rules": { +"description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "CustomErrorRule" +}, +"type": "array" +}, +"types": { +"description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CustomErrorRule": { +"description": "A custom error rule.", +"id": "CustomErrorRule", +"properties": { +"isErrorType": { +"description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", +"type": "boolean" +}, +"selector": { +"description": "Selects messages to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"CustomHttpPattern": { +"description": "A custom pattern is used for defining custom HTTP verb.", +"id": "CustomHttpPattern", +"properties": { +"kind": { +"description": "The name of this custom HTTP verb.", +"type": "string" +}, +"path": { +"description": "The path matched by this custom verb.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteTenantProjectRequest": { +"description": "Request message to delete tenant project resource from the tenancy unit.", +"id": "DeleteTenantProjectRequest", +"properties": { +"tag": { +"description": "Required. Tag of the resource within the tenancy unit.", +"type": "string" +} +}, +"type": "object" +}, +"Documentation": { +"description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", +"id": "Documentation", +"properties": { +"documentationRootUrl": { +"description": "The URL to the root of documentation.", +"type": "string" +}, +"overview": { +"description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", +"type": "string" +}, +"pages": { +"description": "The top level pages for the documentation set.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"rules": { +"description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "DocumentationRule" +}, +"type": "array" +}, +"sectionOverrides": { +"description": "Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"serviceRootUrl": { +"description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", +"type": "string" +}, +"summary": { +"description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentationRule": { +"description": "A documentation rule provides information about individual API elements.", +"id": "DocumentationRule", +"properties": { +"deprecationDescription": { +"description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", +"type": "string" +}, +"description": { +"description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.", +"type": "string" +}, +"disableReplacementWords": { +"description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.", +"type": "string" +}, +"selector": { +"description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", +"type": "string" +} +}, +"type": "object" +}, +"DotnetSettings": { +"description": "Settings for Dotnet client libraries.", +"id": "DotnetSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"forcedNamespaceAliases": { +"description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", +"items": { +"type": "string" +}, +"type": "array" +}, +"handwrittenSignatures": { +"description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoredResources": { +"description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"renamedResources": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", +"type": "object" +}, +"renamedServices": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", +"type": "object" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", +"id": "Endpoint", +"properties": { +"aliases": { +"deprecated": true, +"description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowCors": { +"description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", +"type": "boolean" +}, +"name": { +"description": "The canonical name of this endpoint.", +"type": "string" +}, +"target": { +"description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", +"type": "string" +} +}, +"type": "object" +}, +"Enum": { +"description": "Enum type definition.", +"id": "Enum", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"enumvalue": { +"description": "Enum value definitions.", +"items": { +"$ref": "EnumValue" +}, +"type": "array" +}, +"name": { +"description": "Enum type name.", +"type": "string" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"EnumValue": { +"description": "Enum value definition.", +"id": "EnumValue", +"properties": { +"name": { +"description": "Enum value name.", +"type": "string" +}, +"number": { +"description": "Enum value number.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FieldPolicy": { +"description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", +"id": "FieldPolicy", +"properties": { +"resourcePermission": { +"description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", +"type": "string" +}, +"resourceType": { +"description": "Specifies the resource type for the resource referred to by the field.", +"type": "string" +}, +"selector": { +"description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", +"type": "string" +} +}, +"type": "object" +}, +"GoSettings": { +"description": "Settings for Go client libraries.", +"id": "GoSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Http": { +"description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", +"id": "Http", +"properties": { +"fullyDecodeReservedExpansion": { +"description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", +"type": "boolean" +}, +"rules": { +"description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRule": { +"description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A¶m=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", +"id": "HttpRule", +"properties": { +"additionalBindings": { +"description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +}, +"body": { +"description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", +"type": "string" +}, +"custom": { +"$ref": "CustomHttpPattern", +"description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." +}, +"delete": { +"description": "Maps to HTTP DELETE. Used for deleting a resource.", +"type": "string" +}, +"get": { +"description": "Maps to HTTP GET. Used for listing and getting information about resources.", +"type": "string" +}, +"patch": { +"description": "Maps to HTTP PATCH. Used for updating a resource.", +"type": "string" +}, +"post": { +"description": "Maps to HTTP POST. Used for creating a resource or performing an action.", +"type": "string" +}, +"put": { +"description": "Maps to HTTP PUT. Used for replacing a resource.", +"type": "string" +}, +"responseBody": { +"description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", +"type": "string" +}, +"selector": { +"description": "Selects a method to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"JavaSettings": { +"description": "Settings for Java client libraries.", +"id": "JavaSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"libraryPackage": { +"description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", +"type": "string" +}, +"serviceClassNames": { +"additionalProperties": { +"type": "string" +}, +"description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", +"type": "object" +} +}, +"type": "object" +}, +"JwtLocation": { +"description": "Specifies a location to extract JWT from an API request.", +"id": "JwtLocation", +"properties": { +"cookie": { +"description": "Specifies cookie name to extract JWT token.", +"type": "string" +}, +"header": { +"description": "Specifies HTTP header name to extract JWT token.", +"type": "string" +}, +"query": { +"description": "Specifies URL query parameter name to extract JWT token.", +"type": "string" +}, +"valuePrefix": { +"description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The label key.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string. This is the default.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTenancyUnitsResponse": { +"description": "Response for the list request.", +"id": "ListTenancyUnitsResponse", +"properties": { +"nextPageToken": { +"description": "Pagination token for large results.", +"type": "string" +}, +"tenancyUnits": { +"description": "Tenancy units matching the request.", +"items": { +"$ref": "TenancyUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogDescriptor": { +"description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", +"id": "LogDescriptor", +"properties": { +"description": { +"description": "A human-readable description of this log. This information appears in the documentation and can contain details.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name for this log. This information appears on the user interface and should be concise.", +"type": "string" +}, +"labels": { +"description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"name": { +"description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", +"type": "string" +} +}, +"type": "object" +}, +"Logging": { +"description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", +"id": "Logging", +"properties": { +"consumerDestinations": { +"description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingDestination": { +"description": "Configuration of a specific logging destination (the producer project or the consumer project).", +"id": "LoggingDestination", +"properties": { +"logs": { +"description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"LongRunning": { +"description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", +"id": "LongRunning", +"properties": { +"initialPollDelay": { +"description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", +"format": "google-duration", +"type": "string" +}, +"maxPollDelay": { +"description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", +"format": "google-duration", +"type": "string" +}, +"pollDelayMultiplier": { +"description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", +"format": "float", +"type": "number" +}, +"totalPollTimeout": { +"description": "Total polling timeout. Default value: 5 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Method": { +"description": "Method represents a method of an API interface.", +"id": "Method", +"properties": { +"name": { +"description": "The simple name of this method.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the method.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"requestStreaming": { +"description": "If true, the request is streamed.", +"type": "boolean" +}, +"requestTypeUrl": { +"description": "A URL of the input message type.", +"type": "string" +}, +"responseStreaming": { +"description": "If true, the response is streamed.", +"type": "boolean" +}, +"responseTypeUrl": { +"description": "The URL of the output message type.", +"type": "string" +}, +"syntax": { +"description": "The source syntax of this method.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"MethodPolicy": { +"description": "Defines policies applying to an RPC method.", +"id": "MethodPolicy", +"properties": { +"requestPolicies": { +"description": "Policies that are applicable to the request message.", +"items": { +"$ref": "FieldPolicy" +}, +"type": "array" +}, +"selector": { +"description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", +"type": "string" +} +}, +"type": "object" +}, +"MethodSettings": { +"description": "Describes the generator configuration for a method.", +"id": "MethodSettings", +"properties": { +"autoPopulatedFields": { +"description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", +"items": { +"type": "string" +}, +"type": "array" +}, +"longRunning": { +"$ref": "LongRunning", +"description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" +}, +"selector": { +"description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a `Distribution`.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRule": { +"description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", +"id": "MetricRule", +"properties": { +"metricCosts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", +"type": "object" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Mixin": { +"description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", +"id": "Mixin", +"properties": { +"name": { +"description": "The fully qualified name of the interface which is included.", +"type": "string" +}, +"root": { +"description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"Monitoring": { +"description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", +"id": "Monitoring", +"properties": { +"consumerDestinations": { +"description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonitoringDestination": { +"description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", +"id": "MonitoringDestination", +"properties": { +"metrics": { +"description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"NodeSettings": { +"description": "Settings for Node client libraries.", +"id": "NodeSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"OAuthRequirements": { +"description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", +"id": "OAuthRequirements", +"properties": { +"canonicalScopes": { +"description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"Page": { +"description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", +"id": "Page", +"properties": { +"content": { +"description": "The Markdown content of the page. You can use (== include {path} ==) to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", +"type": "string" +}, +"name": { +"description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", +"type": "string" +}, +"subpages": { +"description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", +"items": { +"$ref": "Page" +}, +"type": "array" +} +}, +"type": "object" +}, +"PhpSettings": { +"description": "Settings for Php client libraries.", +"id": "PhpSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"PolicyBinding": { +"description": "Translates to IAM Policy bindings (without auditing at this level)", +"id": "PolicyBinding", +"properties": { +"members": { +"description": "Uses the same format as in IAM policy. `member` must include both a prefix and ID. For example, `user:{emailId}`, `serviceAccount:{emailId}`, `group:{emailId}`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role. (https://cloud.google.com/iam/docs/understanding-roles) For example, `roles/viewer`, `roles/editor`, or `roles/owner`.", +"type": "string" +} +}, +"type": "object" +}, +"Publishing": { +"description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", +"id": "Publishing", +"properties": { +"apiShortName": { +"description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", +"type": "string" +}, +"codeownerGithubTeams": { +"description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", +"items": { +"type": "string" +}, +"type": "array" +}, +"docTagPrefix": { +"description": "A prefix used in sample code when demarking regions to be included in documentation.", +"type": "string" +}, +"documentationUri": { +"description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", +"type": "string" +}, +"githubLabel": { +"description": "GitHub label to apply to issues and pull requests opened for this API.", +"type": "string" +}, +"librarySettings": { +"description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", +"items": { +"$ref": "ClientLibrarySettings" +}, +"type": "array" +}, +"methodSettings": { +"description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", +"items": { +"$ref": "MethodSettings" +}, +"type": "array" +}, +"newIssueUri": { +"description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103", +"type": "string" +}, +"organization": { +"description": "For whom the client library is being published.", +"enum": [ +"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", +"CLOUD", +"ADS", +"PHOTOS", +"STREET_VIEW", +"SHOPPING", +"GEO", +"GENERATIVE_AI" +], +"enumDescriptions": [ +"Not useful.", +"Google Cloud Platform Org.", +"Ads (Advertising) Org.", +"Photos Org.", +"Street View Org.", +"Shopping Org.", +"Geo Org.", +"Generative AI - https://developers.generativeai.google" +], +"type": "string" +}, +"protoReferenceDocumentationUri": { +"description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", +"type": "string" +}, +"restReferenceDocumentationUri": { +"description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", +"type": "string" +} +}, +"type": "object" +}, +"PythonSettings": { +"description": "Settings for Python client libraries.", +"id": "PythonSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Quota": { +"description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", +"id": "Quota", +"properties": { +"limits": { +"description": "List of QuotaLimit definitions for the service.", +"items": { +"$ref": "QuotaLimit" +}, +"type": "array" +}, +"metricRules": { +"description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", +"items": { +"$ref": "MetricRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaLimit": { +"description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", +"id": "QuotaLimit", +"properties": { +"defaultLimit": { +"description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"description": { +"description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", +"type": "string" +}, +"displayName": { +"description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", +"type": "string" +}, +"duration": { +"description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", +"type": "string" +}, +"freeTier": { +"description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"maxLimit": { +"description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"metric": { +"description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", +"type": "string" +}, +"name": { +"description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", +"type": "string" +}, +"unit": { +"description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", +"type": "string" +}, +"values": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", +"type": "object" +} +}, +"type": "object" +}, +"RemoveTenantProjectRequest": { +"description": "Request message to remove a tenant project resource from the tenancy unit.", +"id": "RemoveTenantProjectRequest", +"properties": { +"tag": { +"description": "Required. Tag of the resource within the tenancy unit.", +"type": "string" +} +}, +"type": "object" +}, +"RubySettings": { +"description": "Settings for Ruby client libraries.", +"id": "RubySettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"SearchTenancyUnitsResponse": { +"description": "Response for the search query.", +"id": "SearchTenancyUnitsResponse", +"properties": { +"nextPageToken": { +"description": "Pagination token for large results.", +"type": "string" +}, +"tenancyUnits": { +"description": "Tenancy Units matching the request.", +"items": { +"$ref": "TenancyUnit" +}, +"type": "array" +} +}, +"type": "object" +}, +"Service": { +"description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", +"id": "Service", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration." +}, +"backend": { +"$ref": "Backend", +"description": "API backend configuration." +}, +"billing": { +"$ref": "Billing", +"description": "Billing configuration." +}, +"configVersion": { +"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", +"format": "uint32", +"type": "integer" +}, +"context": { +"$ref": "Context", +"description": "Context configuration." +}, +"control": { +"$ref": "Control", +"description": "Configuration for the service control plane." +}, +"customError": { +"$ref": "CustomError", +"description": "Custom error configuration." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation." +}, +"endpoints": { +"description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"enums": { +"description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", +"items": { +"$ref": "Enum" +}, +"type": "array" +}, +"http": { +"$ref": "Http", +"description": "HTTP configuration." +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", +"type": "string" +}, +"logging": { +"$ref": "Logging", +"description": "Logging configuration." +}, +"logs": { +"description": "Defines the logs used by this service.", +"items": { +"$ref": "LogDescriptor" +}, +"type": "array" +}, +"metrics": { +"description": "Defines the metrics used by this service.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration." +}, +"name": { +"description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", +"type": "string" +}, +"producerProjectId": { +"description": "The Google project that owns this service.", +"type": "string" +}, +"publishing": { +"$ref": "Publishing", +"description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"sourceInfo": { +"$ref": "SourceInfo", +"description": "Output only. The source information for this configuration if available." +}, +"systemParameters": { +"$ref": "SystemParameters", +"description": "System parameter configuration." +}, +"systemTypes": { +"description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"title": { +"description": "The product title for this service, it is the name displayed in Google Cloud Console.", +"type": "string" +}, +"types": { +"description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"ServiceAccountConfig": { +"description": "Describes the service account configuration for the tenant project.", +"id": "ServiceAccountConfig", +"properties": { +"accountId": { +"description": "ID of the IAM service account to be created in tenant project. The email format of the service account is \"@.iam.gserviceaccount.com\". This account ID must be unique within tenant project and service producers have to guarantee it. The ID must be 6-30 characters long, and match the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])`.", +"type": "string" +}, +"tenantProjectRoles": { +"description": "Roles for the associated service account for the tenant project.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SourceContext": { +"description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", +"type": "string" +} +}, +"type": "object" +}, +"SourceInfo": { +"description": "Source information used to create a Service Config", +"id": "SourceInfo", +"properties": { +"sourceFiles": { +"description": "All files used during config generation.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameter": { +"description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", +"id": "SystemParameter", +"properties": { +"httpHeader": { +"description": "Define the HTTP header name to use for the parameter. It is case insensitive.", +"type": "string" +}, +"name": { +"description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", +"type": "string" +}, +"urlQueryParameter": { +"description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameterRule": { +"description": "Define a system parameter rule mapping system parameter definitions to methods.", +"id": "SystemParameterRule", +"properties": { +"parameters": { +"description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", +"items": { +"$ref": "SystemParameter" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameters": { +"description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", +"id": "SystemParameters", +"properties": { +"rules": { +"description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "SystemParameterRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"TenancyUnit": { +"description": "Representation of a tenancy unit.", +"id": "TenancyUnit", +"properties": { +"consumer": { +"description": "Output only. @OutputOnly Cloud resource name of the consumer of this service. For example 'projects/123456'.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. @OutputOnly The time this tenancy unit was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Globally unique identifier of this tenancy unit \"services/{service}/{collection id}/{resource id}/tenancyUnits/{unit}\"", +"type": "string" +}, +"service": { +"description": "Output only. Google Cloud API name of the managed service owning this tenancy unit. For example 'serviceconsumermanagement.googleapis.com'.", +"readOnly": true, +"type": "string" +}, +"tenantResources": { +"description": "Resources constituting the tenancy unit. There can be at most 512 tenant resources in a tenancy unit.", +"items": { +"$ref": "TenantResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"TenantProjectConfig": { +"description": "This structure defines a tenant project to be added to the specified tenancy unit and its initial configuration and properties. A project lien is created for the tenant project to prevent the tenant project from being deleted accidentally. The lien is deleted as part of tenant project removal.", +"id": "TenantProjectConfig", +"properties": { +"billingConfig": { +"$ref": "BillingConfig", +"description": "Billing account properties. The billing account must be specified." +}, +"folder": { +"description": "Folder where project in this tenancy unit must be located This folder must have been previously created with the required permissions for the caller to create and configure a project in it. Valid folder resource names have the format `folders/{folder_number}` (for example, `folders/123456`).", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels that are applied to this project.", +"type": "object" +}, +"serviceAccountConfig": { +"$ref": "ServiceAccountConfig", +"description": "Configuration for the IAM service account on the tenant project." +}, +"services": { +"description": "Google Cloud API names of services that are activated on this project during provisioning. If any of these services can't be activated, the request fails. For example: 'compute.googleapis.com','cloudfunctions.googleapis.com'", +"items": { +"type": "string" +}, +"type": "array" +}, +"tenantProjectPolicy": { +"$ref": "TenantProjectPolicy", +"description": "Describes ownership and policies for the new tenant project." +} +}, +"type": "object" +}, +"TenantProjectPolicy": { +"description": "Describes policy settings that can be applied to a newly created tenant project.", +"id": "TenantProjectPolicy", +"properties": { +"policyBindings": { +"description": "Policy bindings to be applied to the tenant project, in addition to the 'roles/owner' role granted to the Service Consumer Management service account.", +"items": { +"$ref": "PolicyBinding" +}, +"type": "array" +} +}, +"type": "object" +}, +"TenantResource": { +"description": "Resource constituting the TenancyUnit.", +"id": "TenantResource", +"properties": { +"resource": { +"description": "Output only. @OutputOnly Identifier of the tenant resource. For cloud projects, it is in the form 'projects/{number}'. For example 'projects/123456'.", +"readOnly": true, +"type": "string" +}, +"status": { +"description": "Status of tenant resource.", +"enum": [ +"STATUS_UNSPECIFIED", +"PENDING_CREATE", +"ACTIVE", +"PENDING_DELETE", +"FAILED", +"DELETED" +], +"enumDescriptions": [ +"Unspecified status is the default unset value.", +"Creation of the tenant resource is ongoing.", +"Active resource.", +"Deletion of the resource is ongoing.", +"Tenant resource creation or deletion has failed.", +"Tenant resource has been deleted." +], +"type": "string" +}, +"tag": { +"description": "Unique per single tenancy unit.", +"type": "string" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in `oneof` definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"UndeleteTenantProjectRequest": { +"description": "Request message to undelete tenant project resource previously deleted from the tenancy unit.", +"id": "UndeleteTenantProjectRequest", +"properties": { +"tag": { +"description": "Required. Tag of the resource within the tenancy unit.", +"type": "string" +} +}, +"type": "object" +}, +"Usage": { +"description": "Configuration controlling usage of a service.", +"id": "Usage", +"properties": { +"producerNotificationChannel": { +"description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", +"type": "string" +}, +"requirements": { +"description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rules": { +"description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "UsageRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"UsageRule": { +"description": "Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: \"*\" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allow_unregistered_calls: true", +"id": "UsageRule", +"properties": { +"allowUnregisteredCalls": { +"description": "If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.", +"type": "boolean" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +}, +"skipServiceControl": { +"description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", +"type": "boolean" +} +}, +"type": "object" +}, +"V1AddVisibilityLabelsResponse": { +"description": "Response message for the `AddVisibilityLabels` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1AddVisibilityLabelsResponse", +"properties": { +"labels": { +"description": "The updated set of visibility labels for this consumer on this service.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1BatchCreateProducerOverridesResponse": { +"description": "Response message for BatchCreateProducerOverrides", +"id": "V1Beta1BatchCreateProducerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created.", +"items": { +"$ref": "V1Beta1QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1DisableConsumerResponse": { +"description": "Response message for the `DisableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1DisableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1Beta1EnableConsumerResponse": { +"description": "Response message for the `EnableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1EnableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1Beta1GenerateServiceIdentityResponse": { +"description": "Response message for the `GenerateServiceIdentity` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1GenerateServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "V1Beta1ServiceIdentity", +"description": "ServiceIdentity that was created or retrieved." +} +}, +"type": "object" +}, +"V1Beta1ImportProducerOverridesResponse": { +"description": "Response message for ImportProducerOverrides", +"id": "V1Beta1ImportProducerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created from the imported data.", +"items": { +"$ref": "V1Beta1QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1ImportProducerQuotaPoliciesResponse": { +"description": "Response message for ImportProducerQuotaPolicies", +"id": "V1Beta1ImportProducerQuotaPoliciesResponse", +"properties": { +"policies": { +"description": "The policies that were created from the imported data.", +"items": { +"$ref": "V1Beta1ProducerQuotaPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1ProducerQuotaPolicy": { +"description": "Quota policy created by service producer.", +"id": "V1Beta1ProducerQuotaPolicy", +"properties": { +"container": { +"description": "The cloud resource container at which the quota policy is created. The format is {container_type}/{container_number}", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit 1/{project}/{region} could contain an entry with the key \"region\" and the value \"us-east-1\"; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * \"project\" is not a valid key; the project is already specified in the parent resource name. * \"user\" is not a valid key; the API does not support quota polcies that apply only to a specific user. * If \"region\" appears as a key, its value must be a valid Cloud region. * If \"zone\" appears as a key, its value must be a valid Cloud zone. * If any valid key other than \"region\" or \"zone\" appears in the map, then all valid keys other than \"region\" or \"zone\" must also appear in the map.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the producer policy. An example name would be: `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`", +"type": "string" +}, +"policyValue": { +"description": "The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"V1Beta1QuotaOverride": { +"description": "A quota override", +"id": "V1Beta1QuotaOverride", +"properties": { +"adminOverrideAncestor": { +"description": "The resource name of the ancestor that requested the override. For example: \"organizations/12345\" or \"folders/67890\". Used by admin overrides only.", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": " If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key \"region\" and the value \"us-east-1\"; the override is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * \"project\" is not a valid key; the project is already specified in the parent resource name. * \"user\" is not a valid key; the API does not support quota overrides that apply only to a specific user. * If \"region\" appears as a key, its value must be a valid Cloud region. * If \"zone\" appears as a key, its value must be a valid Cloud zone. * If any valid key other than \"region\" or \"zone\" appears in the map, then all valid keys other than \"region\" or \"zone\" must also appear in the map.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this override applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the producer override. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d`", +"type": "string" +}, +"overrideValue": { +"description": "The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this override applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"V1Beta1RefreshConsumerResponse": { +"description": "Response message for the `RefreshConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1RefreshConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1Beta1ServiceIdentity": { +"description": "A service identity in the Identity and Access Management API.", +"id": "V1Beta1ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service identity.", +"type": "string" +}, +"name": { +"description": "P4 service identity resource name. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/serviceIdentities/default`", +"type": "string" +}, +"tag": { +"description": "The P4 service identity configuration tag. This must be defined in activation_grants. If not specified when creating the account, the tag is set to \"default\".", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service identity.", +"type": "string" +} +}, +"type": "object" +}, +"V1DefaultIdentity": { +"description": "A default identity in the Identity and Access Management API.", +"id": "V1DefaultIdentity", +"properties": { +"email": { +"description": "The email address of the default identity.", +"type": "string" +}, +"name": { +"description": "Default identity resource name. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/defaultIdentity`", +"type": "string" +}, +"tag": { +"description": "The Default Identity tag. If specified when creating the account, the tag must be present in activation_grants. If not specified when creating the account, the tag is set to the tag specified in activation_grants.", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the default identity.", +"type": "string" +} +}, +"type": "object" +}, +"V1DisableConsumerResponse": { +"description": "Response message for the `DisableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1DisableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1EnableConsumerResponse": { +"description": "Response message for the `EnableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1EnableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1GenerateDefaultIdentityResponse": { +"description": "Response message for the `GenerateDefaultIdentity` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1GenerateDefaultIdentityResponse", +"properties": { +"attachStatus": { +"description": "Status of the role attachment. Under development (go/si-attach-role), currently always return ATTACH_STATUS_UNSPECIFIED)", +"enum": [ +"ATTACH_STATUS_UNSPECIFIED", +"ATTACHED", +"ATTACH_SKIPPED", +"PREVIOUSLY_ATTACHED", +"ATTACH_DENIED_BY_ORG_POLICY" +], +"enumDescriptions": [ +"Indicates that the AttachStatus was not set.", +"The default identity was attached to a role successfully in this request.", +"The request specified that no attempt should be made to attach the role.", +"Role was attached to the consumer project at some point in time. Tenant manager doesn't make assertion about the current state of the identity with respect to the consumer. Role attachment should happen only once after activation and cannot be reattached after customer removes it. (go/si-attach-role)", +"Role attachment was denied in this request by customer set org policy. (go/si-attach-role)" +], +"type": "string" +}, +"identity": { +"$ref": "V1DefaultIdentity", +"description": "DefaultIdentity that was created or retrieved." +}, +"role": { +"description": "Role attached to consumer project. Empty if not attached in this request. (Under development, currently always return empty.)", +"type": "string" +} +}, +"type": "object" +}, +"V1GenerateServiceAccountResponse": { +"description": "Response message for the `GenerateServiceAccount` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1GenerateServiceAccountResponse", +"properties": { +"account": { +"$ref": "V1ServiceAccount", +"description": "ServiceAccount that was created or retrieved." +} +}, +"type": "object" +}, +"V1RefreshConsumerResponse": { +"description": "Response message for the `RefreshConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1RefreshConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1RemoveVisibilityLabelsResponse": { +"description": "Response message for the `RemoveVisibilityLabels` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1RemoveVisibilityLabelsResponse", +"properties": { +"labels": { +"description": "The updated set of visibility labels for this consumer on this service.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1ServiceAccount": { +"description": "A service account in the Identity and Access Management API.", +"id": "V1ServiceAccount", +"properties": { +"email": { +"description": "The email address of the service account.", +"type": "string" +}, +"iamAccountName": { +"deprecated": true, +"description": "Deprecated. See b/136209818.", +"type": "string" +}, +"name": { +"description": "P4 SA resource name. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/serviceAccounts/default`", +"type": "string" +}, +"tag": { +"description": "The P4 SA configuration tag. This must be defined in activation_grants. If not specified when creating the account, the tag is set to \"default\".", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service account.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Consumer Management API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceconsumermanagement.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceconsumermanagement.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..0a5062fe98ce3fbdc54b2ce09e2ae3000cb0cb7c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceconsumermanagement.v1beta1.json @@ -0,0 +1,3104 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://serviceconsumermanagement.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Consumer Management", +"description": "Manages the service consumers of a Service Infrastructure service.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-consumer-management/docs/overview", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "serviceconsumermanagement:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://serviceconsumermanagement.mtls.googleapis.com/", +"name": "serviceconsumermanagement", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/operations/{operationsId}", +"httpMethod": "GET", +"id": "serviceconsumermanagement.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"services": { +"resources": { +"consumerQuotaMetrics": { +"methods": { +"get": { +"description": "Retrieves a summary of quota information for a specific quota metric.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics/{consumerQuotaMetricsId}", +"httpMethod": "GET", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the quota metric, returned by a ListConsumerQuotaMetrics call. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/consumerQuotaMetrics/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies the level of detail for quota information in the response.", +"enum": [ +"QUOTA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"No quota view specified. Requests that do not specify a quota view will typically default to the BASIC view.", +"Only buckets with overrides are shown in the response.", +"Include per-location buckets even if they do not have overrides. When the view is FULL, and a limit has regional or zonal quota, the limit will include buckets for all regions or zones that could support overrides, even if none are currently present. In some cases this will cause the response to become very large; callers that do not need this extra information should use the BASIC view instead." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "V1Beta1ConsumerQuotaMetric" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"importProducerOverrides": { +"description": "Create or update multiple producer overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics:importProducerOverrides", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.importProducerOverrides", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The resource name of the consumer. An example name would be: `services/compute.googleapis.com/projects/123`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/consumerQuotaMetrics:importProducerOverrides", +"request": { +"$ref": "V1Beta1ImportProducerOverridesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Retrieves a summary of all quota information about this consumer that is visible to the service producer, for each quota metric defined by the service. Each metric includes information about all of its defined limits. Each limit includes the limit configuration (quota unit, preciseness, default value), the current effective limit value, and all of the overrides applied to the limit.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics", +"httpMethod": "GET", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Requested size of the next page of data.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Parent of the quotas resource. An example parent would be: `services/serviceconsumermanagement.googleapis.com/projects/123`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies the level of detail for quota information in the response.", +"enum": [ +"QUOTA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"No quota view specified. Requests that do not specify a quota view will typically default to the BASIC view.", +"Only buckets with overrides are shown in the response.", +"Include per-location buckets even if they do not have overrides. When the view is FULL, and a limit has regional or zonal quota, the limit will include buckets for all regions or zones that could support overrides, even if none are currently present. In some cases this will cause the response to become very large; callers that do not need this extra information should use the BASIC view instead." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/consumerQuotaMetrics", +"response": { +"$ref": "V1Beta1ListConsumerQuotaMetricsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"limits": { +"methods": { +"get": { +"description": "Retrieves a summary of quota information for a specific quota limit.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}", +"httpMethod": "GET", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.limits.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies the level of detail for quota information in the response.", +"enum": [ +"QUOTA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"No quota view specified. Requests that do not specify a quota view will typically default to the BASIC view.", +"Only buckets with overrides are shown in the response.", +"Include per-location buckets even if they do not have overrides. When the view is FULL, and a limit has regional or zonal quota, the limit will include buckets for all regions or zones that could support overrides, even if none are currently present. In some cases this will cause the response to become very large; callers that do not need this extra information should use the BASIC view instead." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "V1Beta1ConsumerQuotaLimit" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"producerOverrides": { +"methods": { +"create": { +"description": "Creates a producer override. A producer override is applied by the owner or administrator of a service to increase or decrease the amount of quota a consumer of the service is allowed to use. To create multiple overrides at once, use ImportProducerOverrides instead. If an override with the specified dimensions already exists, this call will fail. To overwrite an existing override if one is already present (\"upsert\" semantics), use ImportProducerOverrides instead.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/producerOverrides", +"httpMethod": "POST", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"force": { +"description": "Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"parent": { +"description": "The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/producerOverrides", +"request": { +"$ref": "V1Beta1QuotaOverride" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a producer override.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/producerOverrides/{producerOverridesId}", +"httpMethod": "DELETE", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"name": { +"description": "The resource name of the override to delete. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+/producerOverrides/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all producer overrides on this limit.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/producerOverrides", +"httpMethod": "GET", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Requested size of the next page of data.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/producerOverrides", +"response": { +"$ref": "V1Beta1ListProducerOverridesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a producer override.", +"flatPath": "v1beta1/services/{servicesId}/{servicesId1}/{servicesId2}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/producerOverrides/{producerOverridesId}", +"httpMethod": "PATCH", +"id": "serviceconsumermanagement.services.consumerQuotaMetrics.limits.producerOverrides.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"name": { +"description": "The resource name of the override to update. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d`", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+/producerOverrides/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Update only the specified fields. If unset, all modifiable fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "V1Beta1QuotaOverride" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://serviceconsumermanagement.googleapis.com/", +"schemas": { +"Api": { +"description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", +"id": "Api", +"properties": { +"methods": { +"description": "The methods of this interface, in unspecified order.", +"items": { +"$ref": "Method" +}, +"type": "array" +}, +"mixins": { +"description": "Included interfaces. See Mixin.", +"items": { +"$ref": "Mixin" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the interface.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "Source context for the protocol buffer service represented by this message." +}, +"syntax": { +"description": "The source syntax of the service.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +}, +"version": { +"description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", +"type": "string" +} +}, +"type": "object" +}, +"AuthProvider": { +"description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthProvider", +"properties": { +"audiences": { +"description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"authorizationUrl": { +"description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", +"type": "string" +}, +"id": { +"description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", +"type": "string" +}, +"issuer": { +"description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", +"type": "string" +}, +"jwksUri": { +"description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", +"type": "string" +}, +"jwtLocations": { +"description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", +"items": { +"$ref": "JwtLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthRequirement": { +"description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthRequirement", +"properties": { +"audiences": { +"description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"providerId": { +"description": "id from authentication provider. Example: provider_id: bookstore_auth", +"type": "string" +} +}, +"type": "object" +}, +"Authentication": { +"description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", +"id": "Authentication", +"properties": { +"providers": { +"description": "Defines a set of authentication providers that a service supports.", +"items": { +"$ref": "AuthProvider" +}, +"type": "array" +}, +"rules": { +"description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "AuthenticationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthenticationRule": { +"description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", +"id": "AuthenticationRule", +"properties": { +"allowWithoutCredential": { +"description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", +"type": "boolean" +}, +"oauth": { +"$ref": "OAuthRequirements", +"description": "The requirements for OAuth credentials." +}, +"requirements": { +"description": "Requirements for additional authentication providers.", +"items": { +"$ref": "AuthRequirement" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Backend": { +"description": "`Backend` defines the backend configuration for a service.", +"id": "Backend", +"properties": { +"rules": { +"description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "BackendRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"BackendRule": { +"description": "A backend rule provides configuration for an individual API element.", +"id": "BackendRule", +"properties": { +"address": { +"description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", +"type": "string" +}, +"deadline": { +"description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", +"format": "double", +"type": "number" +}, +"disableAuth": { +"description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", +"type": "boolean" +}, +"jwtAudience": { +"description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", +"type": "string" +}, +"minDeadline": { +"deprecated": true, +"description": "Deprecated, do not use.", +"format": "double", +"type": "number" +}, +"operationDeadline": { +"description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", +"format": "double", +"type": "number" +}, +"overridesByRequestProtocol": { +"additionalProperties": { +"$ref": "BackendRule" +}, +"description": "The map between request protocol and the backend address.", +"type": "object" +}, +"pathTranslation": { +"enum": [ +"PATH_TRANSLATION_UNSPECIFIED", +"CONSTANT_ADDRESS", +"APPEND_PATH_TO_ADDRESS" +], +"enumDescriptions": [ +"", +"Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe", +"The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" +], +"type": "string" +}, +"protocol": { +"description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", +"type": "string" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Billing": { +"description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", +"id": "Billing", +"properties": { +"consumerDestinations": { +"description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", +"items": { +"$ref": "BillingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"BillingDestination": { +"description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", +"id": "BillingDestination", +"properties": { +"metrics": { +"description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"ClientLibrarySettings": { +"description": "Details about how and where to publish client libraries.", +"id": "ClientLibrarySettings", +"properties": { +"cppSettings": { +"$ref": "CppSettings", +"description": "Settings for C++ client libraries." +}, +"dotnetSettings": { +"$ref": "DotnetSettings", +"description": "Settings for .NET client libraries." +}, +"goSettings": { +"$ref": "GoSettings", +"description": "Settings for Go client libraries." +}, +"javaSettings": { +"$ref": "JavaSettings", +"description": "Settings for legacy Java features, supported in the Service YAML." +}, +"launchStage": { +"description": "Launch stage of this version of the API.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"nodeSettings": { +"$ref": "NodeSettings", +"description": "Settings for Node client libraries." +}, +"phpSettings": { +"$ref": "PhpSettings", +"description": "Settings for PHP client libraries." +}, +"pythonSettings": { +"$ref": "PythonSettings", +"description": "Settings for Python client libraries." +}, +"restNumericEnums": { +"description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", +"type": "boolean" +}, +"rubySettings": { +"$ref": "RubySettings", +"description": "Settings for Ruby client libraries." +}, +"version": { +"description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", +"type": "string" +} +}, +"type": "object" +}, +"CommonLanguageSettings": { +"description": "Required information for every language.", +"id": "CommonLanguageSettings", +"properties": { +"destinations": { +"description": "The destination where API teams want this client library to be published.", +"items": { +"enum": [ +"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", +"GITHUB", +"PACKAGE_MANAGER" +], +"enumDescriptions": [ +"Client libraries will neither be generated nor published to package managers.", +"Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", +"Publish the library to package managers like nuget.org and npmjs.com." +], +"type": "string" +}, +"type": "array" +}, +"referenceDocsUri": { +"deprecated": true, +"description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", +"type": "string" +} +}, +"type": "object" +}, +"Context": { +"description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using \u201cx-goog-ext--bin\u201d and \u201cx-goog-ext--jspb\u201d format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", +"id": "Context", +"properties": { +"rules": { +"description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "ContextRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContextRule": { +"description": "A context rule provides information about the context for an individual API element.", +"id": "ContextRule", +"properties": { +"allowedRequestExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowedResponseExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", +"items": { +"type": "string" +}, +"type": "array" +}, +"provided": { +"description": "A list of full type names of provided contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requested": { +"description": "A list of full type names of requested contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Control": { +"description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", +"id": "Control", +"properties": { +"environment": { +"description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", +"type": "string" +}, +"methodPolicies": { +"description": "Defines policies applying to the API methods of the service.", +"items": { +"$ref": "MethodPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"CppSettings": { +"description": "Settings for C++ client libraries.", +"id": "CppSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"CustomError": { +"description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", +"id": "CustomError", +"properties": { +"rules": { +"description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "CustomErrorRule" +}, +"type": "array" +}, +"types": { +"description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CustomErrorRule": { +"description": "A custom error rule.", +"id": "CustomErrorRule", +"properties": { +"isErrorType": { +"description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", +"type": "boolean" +}, +"selector": { +"description": "Selects messages to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"CustomHttpPattern": { +"description": "A custom pattern is used for defining custom HTTP verb.", +"id": "CustomHttpPattern", +"properties": { +"kind": { +"description": "The name of this custom HTTP verb.", +"type": "string" +}, +"path": { +"description": "The path matched by this custom verb.", +"type": "string" +} +}, +"type": "object" +}, +"Documentation": { +"description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", +"id": "Documentation", +"properties": { +"documentationRootUrl": { +"description": "The URL to the root of documentation.", +"type": "string" +}, +"overview": { +"description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", +"type": "string" +}, +"pages": { +"description": "The top level pages for the documentation set.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"rules": { +"description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "DocumentationRule" +}, +"type": "array" +}, +"sectionOverrides": { +"description": "Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"serviceRootUrl": { +"description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", +"type": "string" +}, +"summary": { +"description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentationRule": { +"description": "A documentation rule provides information about individual API elements.", +"id": "DocumentationRule", +"properties": { +"deprecationDescription": { +"description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", +"type": "string" +}, +"description": { +"description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.", +"type": "string" +}, +"disableReplacementWords": { +"description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.", +"type": "string" +}, +"selector": { +"description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", +"type": "string" +} +}, +"type": "object" +}, +"DotnetSettings": { +"description": "Settings for Dotnet client libraries.", +"id": "DotnetSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"forcedNamespaceAliases": { +"description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", +"items": { +"type": "string" +}, +"type": "array" +}, +"handwrittenSignatures": { +"description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoredResources": { +"description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"renamedResources": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", +"type": "object" +}, +"renamedServices": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", +"type": "object" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", +"id": "Endpoint", +"properties": { +"aliases": { +"deprecated": true, +"description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowCors": { +"description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", +"type": "boolean" +}, +"name": { +"description": "The canonical name of this endpoint.", +"type": "string" +}, +"target": { +"description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", +"type": "string" +} +}, +"type": "object" +}, +"Enum": { +"description": "Enum type definition.", +"id": "Enum", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"enumvalue": { +"description": "Enum value definitions.", +"items": { +"$ref": "EnumValue" +}, +"type": "array" +}, +"name": { +"description": "Enum type name.", +"type": "string" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"EnumValue": { +"description": "Enum value definition.", +"id": "EnumValue", +"properties": { +"name": { +"description": "Enum value name.", +"type": "string" +}, +"number": { +"description": "Enum value number.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FieldPolicy": { +"description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", +"id": "FieldPolicy", +"properties": { +"resourcePermission": { +"description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", +"type": "string" +}, +"resourceType": { +"description": "Specifies the resource type for the resource referred to by the field.", +"type": "string" +}, +"selector": { +"description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", +"type": "string" +} +}, +"type": "object" +}, +"GoSettings": { +"description": "Settings for Go client libraries.", +"id": "GoSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Http": { +"description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", +"id": "Http", +"properties": { +"fullyDecodeReservedExpansion": { +"description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", +"type": "boolean" +}, +"rules": { +"description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRule": { +"description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A¶m=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", +"id": "HttpRule", +"properties": { +"additionalBindings": { +"description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +}, +"body": { +"description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", +"type": "string" +}, +"custom": { +"$ref": "CustomHttpPattern", +"description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." +}, +"delete": { +"description": "Maps to HTTP DELETE. Used for deleting a resource.", +"type": "string" +}, +"get": { +"description": "Maps to HTTP GET. Used for listing and getting information about resources.", +"type": "string" +}, +"patch": { +"description": "Maps to HTTP PATCH. Used for updating a resource.", +"type": "string" +}, +"post": { +"description": "Maps to HTTP POST. Used for creating a resource or performing an action.", +"type": "string" +}, +"put": { +"description": "Maps to HTTP PUT. Used for replacing a resource.", +"type": "string" +}, +"responseBody": { +"description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", +"type": "string" +}, +"selector": { +"description": "Selects a method to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"JavaSettings": { +"description": "Settings for Java client libraries.", +"id": "JavaSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"libraryPackage": { +"description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", +"type": "string" +}, +"serviceClassNames": { +"additionalProperties": { +"type": "string" +}, +"description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", +"type": "object" +} +}, +"type": "object" +}, +"JwtLocation": { +"description": "Specifies a location to extract JWT from an API request.", +"id": "JwtLocation", +"properties": { +"cookie": { +"description": "Specifies cookie name to extract JWT token.", +"type": "string" +}, +"header": { +"description": "Specifies HTTP header name to extract JWT token.", +"type": "string" +}, +"query": { +"description": "Specifies URL query parameter name to extract JWT token.", +"type": "string" +}, +"valuePrefix": { +"description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The label key.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string. This is the default.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"LogDescriptor": { +"description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", +"id": "LogDescriptor", +"properties": { +"description": { +"description": "A human-readable description of this log. This information appears in the documentation and can contain details.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name for this log. This information appears on the user interface and should be concise.", +"type": "string" +}, +"labels": { +"description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"name": { +"description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", +"type": "string" +} +}, +"type": "object" +}, +"Logging": { +"description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", +"id": "Logging", +"properties": { +"consumerDestinations": { +"description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingDestination": { +"description": "Configuration of a specific logging destination (the producer project or the consumer project).", +"id": "LoggingDestination", +"properties": { +"logs": { +"description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"LongRunning": { +"description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", +"id": "LongRunning", +"properties": { +"initialPollDelay": { +"description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", +"format": "google-duration", +"type": "string" +}, +"maxPollDelay": { +"description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", +"format": "google-duration", +"type": "string" +}, +"pollDelayMultiplier": { +"description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", +"format": "float", +"type": "number" +}, +"totalPollTimeout": { +"description": "Total polling timeout. Default value: 5 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Method": { +"description": "Method represents a method of an API interface.", +"id": "Method", +"properties": { +"name": { +"description": "The simple name of this method.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the method.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"requestStreaming": { +"description": "If true, the request is streamed.", +"type": "boolean" +}, +"requestTypeUrl": { +"description": "A URL of the input message type.", +"type": "string" +}, +"responseStreaming": { +"description": "If true, the response is streamed.", +"type": "boolean" +}, +"responseTypeUrl": { +"description": "The URL of the output message type.", +"type": "string" +}, +"syntax": { +"description": "The source syntax of this method.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"MethodPolicy": { +"description": "Defines policies applying to an RPC method.", +"id": "MethodPolicy", +"properties": { +"requestPolicies": { +"description": "Policies that are applicable to the request message.", +"items": { +"$ref": "FieldPolicy" +}, +"type": "array" +}, +"selector": { +"description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", +"type": "string" +} +}, +"type": "object" +}, +"MethodSettings": { +"description": "Describes the generator configuration for a method.", +"id": "MethodSettings", +"properties": { +"autoPopulatedFields": { +"description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", +"items": { +"type": "string" +}, +"type": "array" +}, +"longRunning": { +"$ref": "LongRunning", +"description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" +}, +"selector": { +"description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a `Distribution`.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRule": { +"description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", +"id": "MetricRule", +"properties": { +"metricCosts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", +"type": "object" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Mixin": { +"description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", +"id": "Mixin", +"properties": { +"name": { +"description": "The fully qualified name of the interface which is included.", +"type": "string" +}, +"root": { +"description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"Monitoring": { +"description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", +"id": "Monitoring", +"properties": { +"consumerDestinations": { +"description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonitoringDestination": { +"description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", +"id": "MonitoringDestination", +"properties": { +"metrics": { +"description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"NodeSettings": { +"description": "Settings for Node client libraries.", +"id": "NodeSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"OAuthRequirements": { +"description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", +"id": "OAuthRequirements", +"properties": { +"canonicalScopes": { +"description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"Page": { +"description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", +"id": "Page", +"properties": { +"content": { +"description": "The Markdown content of the page. You can use (== include {path} ==) to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", +"type": "string" +}, +"name": { +"description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", +"type": "string" +}, +"subpages": { +"description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", +"items": { +"$ref": "Page" +}, +"type": "array" +} +}, +"type": "object" +}, +"PhpSettings": { +"description": "Settings for Php client libraries.", +"id": "PhpSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Publishing": { +"description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", +"id": "Publishing", +"properties": { +"apiShortName": { +"description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", +"type": "string" +}, +"codeownerGithubTeams": { +"description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", +"items": { +"type": "string" +}, +"type": "array" +}, +"docTagPrefix": { +"description": "A prefix used in sample code when demarking regions to be included in documentation.", +"type": "string" +}, +"documentationUri": { +"description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", +"type": "string" +}, +"githubLabel": { +"description": "GitHub label to apply to issues and pull requests opened for this API.", +"type": "string" +}, +"librarySettings": { +"description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", +"items": { +"$ref": "ClientLibrarySettings" +}, +"type": "array" +}, +"methodSettings": { +"description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", +"items": { +"$ref": "MethodSettings" +}, +"type": "array" +}, +"newIssueUri": { +"description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103", +"type": "string" +}, +"organization": { +"description": "For whom the client library is being published.", +"enum": [ +"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", +"CLOUD", +"ADS", +"PHOTOS", +"STREET_VIEW", +"SHOPPING", +"GEO", +"GENERATIVE_AI" +], +"enumDescriptions": [ +"Not useful.", +"Google Cloud Platform Org.", +"Ads (Advertising) Org.", +"Photos Org.", +"Street View Org.", +"Shopping Org.", +"Geo Org.", +"Generative AI - https://developers.generativeai.google" +], +"type": "string" +}, +"protoReferenceDocumentationUri": { +"description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", +"type": "string" +}, +"restReferenceDocumentationUri": { +"description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", +"type": "string" +} +}, +"type": "object" +}, +"PythonSettings": { +"description": "Settings for Python client libraries.", +"id": "PythonSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Quota": { +"description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", +"id": "Quota", +"properties": { +"limits": { +"description": "List of QuotaLimit definitions for the service.", +"items": { +"$ref": "QuotaLimit" +}, +"type": "array" +}, +"metricRules": { +"description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", +"items": { +"$ref": "MetricRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaLimit": { +"description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", +"id": "QuotaLimit", +"properties": { +"defaultLimit": { +"description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"description": { +"description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", +"type": "string" +}, +"displayName": { +"description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", +"type": "string" +}, +"duration": { +"description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", +"type": "string" +}, +"freeTier": { +"description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"maxLimit": { +"description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"metric": { +"description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", +"type": "string" +}, +"name": { +"description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", +"type": "string" +}, +"unit": { +"description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", +"type": "string" +}, +"values": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", +"type": "object" +} +}, +"type": "object" +}, +"RubySettings": { +"description": "Settings for Ruby client libraries.", +"id": "RubySettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Service": { +"description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", +"id": "Service", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration." +}, +"backend": { +"$ref": "Backend", +"description": "API backend configuration." +}, +"billing": { +"$ref": "Billing", +"description": "Billing configuration." +}, +"configVersion": { +"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", +"format": "uint32", +"type": "integer" +}, +"context": { +"$ref": "Context", +"description": "Context configuration." +}, +"control": { +"$ref": "Control", +"description": "Configuration for the service control plane." +}, +"customError": { +"$ref": "CustomError", +"description": "Custom error configuration." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation." +}, +"endpoints": { +"description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"enums": { +"description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", +"items": { +"$ref": "Enum" +}, +"type": "array" +}, +"http": { +"$ref": "Http", +"description": "HTTP configuration." +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", +"type": "string" +}, +"logging": { +"$ref": "Logging", +"description": "Logging configuration." +}, +"logs": { +"description": "Defines the logs used by this service.", +"items": { +"$ref": "LogDescriptor" +}, +"type": "array" +}, +"metrics": { +"description": "Defines the metrics used by this service.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration." +}, +"name": { +"description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", +"type": "string" +}, +"producerProjectId": { +"description": "The Google project that owns this service.", +"type": "string" +}, +"publishing": { +"$ref": "Publishing", +"description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"sourceInfo": { +"$ref": "SourceInfo", +"description": "Output only. The source information for this configuration if available." +}, +"systemParameters": { +"$ref": "SystemParameters", +"description": "System parameter configuration." +}, +"systemTypes": { +"description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"title": { +"description": "The product title for this service, it is the name displayed in Google Cloud Console.", +"type": "string" +}, +"types": { +"description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"SourceContext": { +"description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", +"type": "string" +} +}, +"type": "object" +}, +"SourceInfo": { +"description": "Source information used to create a Service Config", +"id": "SourceInfo", +"properties": { +"sourceFiles": { +"description": "All files used during config generation.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameter": { +"description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", +"id": "SystemParameter", +"properties": { +"httpHeader": { +"description": "Define the HTTP header name to use for the parameter. It is case insensitive.", +"type": "string" +}, +"name": { +"description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", +"type": "string" +}, +"urlQueryParameter": { +"description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameterRule": { +"description": "Define a system parameter rule mapping system parameter definitions to methods.", +"id": "SystemParameterRule", +"properties": { +"parameters": { +"description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", +"items": { +"$ref": "SystemParameter" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameters": { +"description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", +"id": "SystemParameters", +"properties": { +"rules": { +"description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "SystemParameterRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in `oneof` definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"Usage": { +"description": "Configuration controlling usage of a service.", +"id": "Usage", +"properties": { +"producerNotificationChannel": { +"description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", +"type": "string" +}, +"requirements": { +"description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rules": { +"description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "UsageRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"UsageRule": { +"description": "Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: \"*\" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allow_unregistered_calls: true", +"id": "UsageRule", +"properties": { +"allowUnregisteredCalls": { +"description": "If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.", +"type": "boolean" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +}, +"skipServiceControl": { +"description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", +"type": "boolean" +} +}, +"type": "object" +}, +"V1Beta1BatchCreateProducerOverridesResponse": { +"description": "Response message for BatchCreateProducerOverrides", +"id": "V1Beta1BatchCreateProducerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created.", +"items": { +"$ref": "V1Beta1QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1ConsumerQuotaLimit": { +"description": "Consumer quota settings for a quota limit.", +"id": "V1Beta1ConsumerQuotaLimit", +"properties": { +"isPrecise": { +"description": "Whether this limit is precise or imprecise.", +"type": "boolean" +}, +"metric": { +"description": "The name of the parent metric of this limit. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the quota limit. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.", +"type": "string" +}, +"quotaBuckets": { +"description": "Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).", +"items": { +"$ref": "V1Beta1QuotaBucket" +}, +"type": "array" +}, +"supportedLocations": { +"description": "List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.", +"items": { +"type": "string" +}, +"type": "array" +}, +"unit": { +"description": "The limit unit. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"V1Beta1ConsumerQuotaMetric": { +"description": "Consumer quota settings for a quota metric.", +"id": "V1Beta1ConsumerQuotaMetric", +"properties": { +"consumerQuotaLimits": { +"description": "The consumer quota for each quota limit defined on the metric.", +"items": { +"$ref": "V1Beta1ConsumerQuotaLimit" +}, +"type": "array" +}, +"descendantConsumerQuotaLimits": { +"description": "The quota limits targeting the descendant containers of the consumer in request. If the consumer in request is of type `organizations` or `folders`, the field will list per-project limits in the metric; if the consumer in request is of type `project`, the field will be empty. The `quota_buckets` field of each descendant consumer quota limit will not be populated.", +"items": { +"$ref": "V1Beta1ConsumerQuotaLimit" +}, +"type": "array" +}, +"displayName": { +"description": "The display name of the metric. An example name would be: \"CPUs\"", +"type": "string" +}, +"metric": { +"description": "The name of the metric. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the quota settings on this metric for this consumer. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported.", +"type": "string" +} +}, +"type": "object" +}, +"V1Beta1DisableConsumerResponse": { +"description": "Response message for the `DisableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1DisableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1Beta1EnableConsumerResponse": { +"description": "Response message for the `EnableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1EnableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1Beta1GenerateServiceIdentityResponse": { +"description": "Response message for the `GenerateServiceIdentity` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1GenerateServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "V1Beta1ServiceIdentity", +"description": "ServiceIdentity that was created or retrieved." +} +}, +"type": "object" +}, +"V1Beta1ImportProducerOverridesRequest": { +"description": "Request message for ImportProducerOverrides", +"id": "V1Beta1ImportProducerOverridesRequest", +"properties": { +"force": { +"description": "Whether to force the creation of the quota overrides. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"items": { +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"type": "string" +}, +"type": "array" +}, +"inlineSource": { +"$ref": "V1Beta1OverrideInlineSource", +"description": "The import data is specified in the request message itself" +} +}, +"type": "object" +}, +"V1Beta1ImportProducerOverridesResponse": { +"description": "Response message for ImportProducerOverrides", +"id": "V1Beta1ImportProducerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created from the imported data.", +"items": { +"$ref": "V1Beta1QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1ImportProducerQuotaPoliciesResponse": { +"description": "Response message for ImportProducerQuotaPolicies", +"id": "V1Beta1ImportProducerQuotaPoliciesResponse", +"properties": { +"policies": { +"description": "The policies that were created from the imported data.", +"items": { +"$ref": "V1Beta1ProducerQuotaPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1ListConsumerQuotaMetricsResponse": { +"description": "Response message for ListConsumerQuotaMetrics.", +"id": "V1Beta1ListConsumerQuotaMetricsResponse", +"properties": { +"metrics": { +"description": "Quota settings for the consumer, organized by quota metric.", +"items": { +"$ref": "V1Beta1ConsumerQuotaMetric" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"type": "string" +} +}, +"type": "object" +}, +"V1Beta1ListProducerOverridesResponse": { +"description": "Response message for ListProducerOverrides.", +"id": "V1Beta1ListProducerOverridesResponse", +"properties": { +"nextPageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"type": "string" +}, +"overrides": { +"description": "Producer overrides on this limit.", +"items": { +"$ref": "V1Beta1QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1OverrideInlineSource": { +"description": "Import data embedded in the request message", +"id": "V1Beta1OverrideInlineSource", +"properties": { +"overrides": { +"description": "The overrides to create. Each override must have a value for 'metric' and 'unit', to specify which metric and which limit the override should be applied to. The 'name' field of the override does not need to be set; it is ignored.", +"items": { +"$ref": "V1Beta1QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1Beta1ProducerQuotaPolicy": { +"description": "Quota policy created by service producer.", +"id": "V1Beta1ProducerQuotaPolicy", +"properties": { +"container": { +"description": "The cloud resource container at which the quota policy is created. The format is {container_type}/{container_number}", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit 1/{project}/{region} could contain an entry with the key \"region\" and the value \"us-east-1\"; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * \"project\" is not a valid key; the project is already specified in the parent resource name. * \"user\" is not a valid key; the API does not support quota polcies that apply only to a specific user. * If \"region\" appears as a key, its value must be a valid Cloud region. * If \"zone\" appears as a key, its value must be a valid Cloud zone. * If any valid key other than \"region\" or \"zone\" appears in the map, then all valid keys other than \"region\" or \"zone\" must also appear in the map.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the producer policy. An example name would be: `services/compute.googleapis.com/organizations/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`", +"type": "string" +}, +"policyValue": { +"description": "The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"V1Beta1QuotaBucket": { +"description": "A quota bucket is a quota provisioning unit for a specific set of dimensions.", +"id": "V1Beta1QuotaBucket", +"properties": { +"adminOverride": { +"$ref": "V1Beta1QuotaOverride", +"description": "Admin override on this quota bucket." +}, +"consumerOverride": { +"$ref": "V1Beta1QuotaOverride", +"description": "Consumer override on this quota bucket." +}, +"defaultLimit": { +"description": "The default limit of this quota bucket, as specified by the service configuration.", +"format": "int64", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": "The dimensions of this quota bucket. If this map is empty, this is the global bucket, which is the default quota value applied to all requests that do not have a more specific override. If this map is nonempty, the default limit, effective limit, and quota overrides apply only to requests that have the dimensions given in the map. For example, if the map has key \"region\" and value \"us-east-1\", then the specified effective limit is only effective in that region, and the specified overrides apply only in that region.", +"type": "object" +}, +"effectiveLimit": { +"description": "The effective limit of this quota bucket. Equal to default_limit if there are no overrides.", +"format": "int64", +"type": "string" +}, +"producerOverride": { +"$ref": "V1Beta1QuotaOverride", +"description": "Producer override on this quota bucket." +}, +"producerQuotaPolicy": { +"$ref": "V1Beta1ProducerQuotaPolicy", +"description": "Producer policy inherited from the closet ancestor of the current consumer." +}, +"rolloutInfo": { +"$ref": "V1Beta1RolloutInfo", +"description": "Rollout information of this quota bucket. This field is present only if the effective limit will change due to the ongoing rollout of the service config." +} +}, +"type": "object" +}, +"V1Beta1QuotaOverride": { +"description": "A quota override", +"id": "V1Beta1QuotaOverride", +"properties": { +"adminOverrideAncestor": { +"description": "The resource name of the ancestor that requested the override. For example: \"organizations/12345\" or \"folders/67890\". Used by admin overrides only.", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": " If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit 1/{project}/{region} could contain an entry with the key \"region\" and the value \"us-east-1\"; the override is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * \"project\" is not a valid key; the project is already specified in the parent resource name. * \"user\" is not a valid key; the API does not support quota overrides that apply only to a specific user. * If \"region\" appears as a key, its value must be a valid Cloud region. * If \"zone\" appears as a key, its value must be a valid Cloud zone. * If any valid key other than \"region\" or \"zone\" appears in the map, then all valid keys other than \"region\" or \"zone\" must also appear in the map.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this override applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the producer override. An example name would be: `services/compute.googleapis.com/projects/123/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerOverrides/4a3f2c1d`", +"type": "string" +}, +"overrideValue": { +"description": "The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this override applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"V1Beta1RefreshConsumerResponse": { +"description": "Response message for the `RefreshConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1Beta1RefreshConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1Beta1RolloutInfo": { +"description": "[Output only] Rollout information of a quota.", +"id": "V1Beta1RolloutInfo", +"properties": { +"defaultLimitOngoingRollout": { +"description": "Whether there is an ongoing rollout for the default limit or not.", +"type": "boolean" +} +}, +"type": "object" +}, +"V1Beta1ServiceIdentity": { +"description": "A service identity in the Identity and Access Management API.", +"id": "V1Beta1ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service identity.", +"type": "string" +}, +"name": { +"description": "P4 service identity resource name. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/serviceIdentities/default`", +"type": "string" +}, +"tag": { +"description": "The P4 service identity configuration tag. This must be defined in activation_grants. If not specified when creating the account, the tag is set to \"default\".", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service identity.", +"type": "string" +} +}, +"type": "object" +}, +"V1beta1AddVisibilityLabelsResponse": { +"description": "Response message for the `AddVisibilityLabels` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1beta1AddVisibilityLabelsResponse", +"properties": { +"labels": { +"description": "The updated set of visibility labels for this consumer on this service.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1beta1DefaultIdentity": { +"description": "A default identity in the Identity and Access Management API.", +"id": "V1beta1DefaultIdentity", +"properties": { +"email": { +"description": "The email address of the default identity.", +"type": "string" +}, +"name": { +"description": "Default identity resource name. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/defaultIdentity`", +"type": "string" +}, +"tag": { +"description": "The Default Identity tag. If specified when creating the account, the tag must be present in activation_grants. If not specified when creating the account, the tag is set to the tag specified in activation_grants.", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the default identity.", +"type": "string" +} +}, +"type": "object" +}, +"V1beta1DisableConsumerResponse": { +"description": "Response message for the `DisableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1beta1DisableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1beta1EnableConsumerResponse": { +"description": "Response message for the `EnableConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1beta1EnableConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1beta1GenerateDefaultIdentityResponse": { +"description": "Response message for the `GenerateDefaultIdentity` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1beta1GenerateDefaultIdentityResponse", +"properties": { +"attachStatus": { +"description": "Status of the role attachment. Under development (go/si-attach-role), currently always return ATTACH_STATUS_UNSPECIFIED)", +"enum": [ +"ATTACH_STATUS_UNSPECIFIED", +"ATTACHED", +"ATTACH_SKIPPED", +"PREVIOUSLY_ATTACHED", +"ATTACH_DENIED_BY_ORG_POLICY" +], +"enumDescriptions": [ +"Indicates that the AttachStatus was not set.", +"The default identity was attached to a role successfully in this request.", +"The request specified that no attempt should be made to attach the role.", +"Role was attached to the consumer project at some point in time. Tenant manager doesn't make assertion about the current state of the identity with respect to the consumer. Role attachment should happen only once after activation and cannot be reattached after customer removes it. (go/si-attach-role)", +"Role attachment was denied in this request by customer set org policy. (go/si-attach-role)" +], +"type": "string" +}, +"identity": { +"$ref": "V1beta1DefaultIdentity", +"description": "DefaultIdentity that was created or retrieved." +}, +"role": { +"description": "Role attached to consumer project. Empty if not attached in this request. (Under development, currently always return empty.)", +"type": "string" +} +}, +"type": "object" +}, +"V1beta1GenerateServiceAccountResponse": { +"description": "Response message for the `GenerateServiceAccount` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1beta1GenerateServiceAccountResponse", +"properties": { +"account": { +"$ref": "V1beta1ServiceAccount", +"description": "ServiceAccount that was created or retrieved." +} +}, +"type": "object" +}, +"V1beta1RefreshConsumerResponse": { +"description": "Response message for the `RefreshConsumer` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1beta1RefreshConsumerResponse", +"properties": {}, +"type": "object" +}, +"V1beta1RemoveVisibilityLabelsResponse": { +"description": "Response message for the `RemoveVisibilityLabels` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "V1beta1RemoveVisibilityLabelsResponse", +"properties": { +"labels": { +"description": "The updated set of visibility labels for this consumer on this service.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"V1beta1ServiceAccount": { +"description": "A service account in the Identity and Access Management API.", +"id": "V1beta1ServiceAccount", +"properties": { +"email": { +"description": "The email address of the service account.", +"type": "string" +}, +"iamAccountName": { +"deprecated": true, +"description": "Deprecated. See b/136209818.", +"type": "string" +}, +"name": { +"description": "P4 SA resource name. An example name would be: `services/serviceconsumermanagement.googleapis.com/projects/123/serviceAccounts/default`", +"type": "string" +}, +"tag": { +"description": "The P4 SA configuration tag. This must be defined in activation_grants. If not specified when creating the account, the tag is set to \"default\".", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service account.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Consumer Management API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicecontrol.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicecontrol.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..c87829fa7a75e19105a7f492b36a98e6edeaad1b --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicecontrol.v1.json @@ -0,0 +1,2211 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/servicecontrol": { +"description": "Manage your Google Service Control data" +} +} +} +}, +"basePath": "", +"baseUrl": "https://servicecontrol.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Control", +"description": "Provides admission control and telemetry reporting for services integrated with Service Infrastructure. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-control/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "servicecontrol:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://servicecontrol.mtls.googleapis.com/", +"name": "servicecontrol", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"services": { +"methods": { +"allocateQuota": { +"description": "Attempts to allocate quota for the specified consumer. It should be called before the operation is executed. This method requires the `servicemanagement.services.quota` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam). **NOTE:** The client **must** fail-open on server errors `INTERNAL`, `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system reliability, the server may inject these errors to prohibit any hard dependency on the quota functionality.", +"flatPath": "v1/services/{serviceName}:allocateQuota", +"httpMethod": "POST", +"id": "servicecontrol.services.allocateQuota", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "Name of the service as specified in the service configuration. For example, `\"pubsub.googleapis.com\"`. See google.api.Service for the definition of a service name.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}:allocateQuota", +"request": { +"$ref": "AllocateQuotaRequest" +}, +"response": { +"$ref": "AllocateQuotaResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/servicecontrol" +] +}, +"check": { +"description": "Checks whether an operation on a service should be allowed to proceed based on the configuration of the service and related policies. It must be called before the operation is executed. If feasible, the client should cache the check results and reuse them for 60 seconds. In case of any server errors, the client should rely on the cached results for much longer time to avoid outage. WARNING: There is general 60s delay for the configuration and policy propagation, therefore callers MUST NOT depend on the `Check` method having the latest policy information. NOTE: the CheckRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Cloud IAM](https://cloud.google.com/iam).", +"flatPath": "v1/services/{serviceName}:check", +"httpMethod": "POST", +"id": "servicecontrol.services.check", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "The service name as specified in its service configuration. For example, `\"pubsub.googleapis.com\"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}:check", +"request": { +"$ref": "CheckRequest" +}, +"response": { +"$ref": "CheckResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/servicecontrol" +] +}, +"report": { +"description": "Reports operation results to Google Service Control, such as logs and metrics. It should be called after an operation is completed. If feasible, the client should aggregate reporting data for up to 5 seconds to reduce API traffic. Limiting aggregation to 5 seconds is to reduce data loss during client crashes. Clients should carefully choose the aggregation time window to avoid data loss risk more than 0.01% for business and compliance reasons. NOTE: the ReportRequest has the size limit (wire-format byte size) of 1MB. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Google Cloud IAM](https://cloud.google.com/iam).", +"flatPath": "v1/services/{serviceName}:report", +"httpMethod": "POST", +"id": "servicecontrol.services.report", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "The service name as specified in its service configuration. For example, `\"pubsub.googleapis.com\"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}:report", +"request": { +"$ref": "ReportRequest" +}, +"response": { +"$ref": "ReportResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/servicecontrol" +] +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://servicecontrol.googleapis.com/", +"schemas": { +"AllocateInfo": { +"id": "AllocateInfo", +"properties": { +"unusedArguments": { +"description": "A list of label keys that were unused by the server in processing the request. Thus, for similar requests repeated in a certain future time window, the caller can choose to ignore these labels in the requests to achieve better client-side cache hits and quota aggregation for rate quota. This field is not populated for allocation quota checks.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AllocateQuotaRequest": { +"description": "Request message for the AllocateQuota method.", +"id": "AllocateQuotaRequest", +"properties": { +"allocateOperation": { +"$ref": "QuotaOperation", +"description": "Operation that describes the quota allocation." +}, +"serviceConfigId": { +"description": "Specifies which version of service configuration should be used to process the request. If unspecified or no matching version can be found, the latest one will be used.", +"type": "string" +} +}, +"type": "object" +}, +"AllocateQuotaResponse": { +"description": "Response message for the AllocateQuota method.", +"id": "AllocateQuotaResponse", +"properties": { +"allocateErrors": { +"description": "Indicates the decision of the allocate.", +"items": { +"$ref": "QuotaError" +}, +"type": "array" +}, +"allocateInfo": { +"$ref": "AllocateInfo", +"description": "WARNING: DO NOT use this field until this warning message is removed." +}, +"operationId": { +"description": "The same operation_id value used in the AllocateQuotaRequest. Used for logging and diagnostics purposes.", +"type": "string" +}, +"quotaMetrics": { +"description": "Quota metrics to indicate the result of allocation. Depending on the request, one or more of the following metrics will be included: 1. Per quota group or per quota metric incremental usage will be specified using the following delta metric : \"serviceruntime.googleapis.com/api/consumer/quota_used_count\" 2. The quota limit reached condition will be specified using the following boolean metric : \"serviceruntime.googleapis.com/quota/exceeded\"", +"items": { +"$ref": "MetricValueSet" +}, +"type": "array" +}, +"serviceConfigId": { +"description": "ID of the actual config used to process the request.", +"type": "string" +} +}, +"type": "object" +}, +"AttributeValue": { +"description": "The allowed types for [VALUE] in a `[KEY]:[VALUE]` attribute.", +"id": "AttributeValue", +"properties": { +"boolValue": { +"description": "A Boolean value represented by `true` or `false`.", +"type": "boolean" +}, +"intValue": { +"description": "A 64-bit signed integer.", +"format": "int64", +"type": "string" +}, +"stringValue": { +"$ref": "TruncatableString", +"description": "A string up to 256 bytes long." +} +}, +"type": "object" +}, +"Attributes": { +"description": "A set of attributes, each in the format `[KEY]:[VALUE]`.", +"id": "Attributes", +"properties": { +"attributeMap": { +"additionalProperties": { +"$ref": "AttributeValue" +}, +"description": "The set of attributes. Each attribute's key can be up to 128 bytes long. The value can be a string up to 256 bytes, a signed 64-bit integer, or the Boolean values `true` and `false`. For example: \"/instance_id\": \"my-instance\" \"/http/user_agent\": \"\" \"/http/request_bytes\": 300 \"abc.com/myattribute\": true", +"type": "object" +}, +"droppedAttributesCount": { +"description": "The number of attributes that were discarded. Attributes can be discarded because their keys are too long or because there are too many attributes. If this value is 0 then all attributes are valid.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AuditLog": { +"description": "Common audit log format for Google Cloud Platform API operations. ", +"id": "AuditLog", +"properties": { +"authenticationInfo": { +"$ref": "AuthenticationInfo", +"description": "Authentication information." +}, +"authorizationInfo": { +"description": "Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.", +"items": { +"$ref": "AuthorizationInfo" +}, +"type": "array" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Other service-specific data about the request, response, and other information associated with the current audited event.", +"type": "object" +}, +"methodName": { +"description": "The name of the service method or operation. For API calls, this should be the name of the API method. For example, \"google.cloud.bigquery.v2.TableService.InsertTable\" \"google.logging.v2.ConfigServiceV2.CreateSink\"", +"type": "string" +}, +"numResponseItems": { +"description": "The number of items returned from a List or Query API method, if applicable.", +"format": "int64", +"type": "string" +}, +"policyViolationInfo": { +"$ref": "PolicyViolationInfo", +"description": "Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here." +}, +"request": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +}, +"requestMetadata": { +"$ref": "RequestMetadata", +"description": "Metadata about the operation." +}, +"resourceLocation": { +"$ref": "ResourceLocation", +"description": "The resource location information." +}, +"resourceName": { +"description": "The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example: \"projects/PROJECT_ID/zones/us-central1-a/instances\" \"projects/PROJECT_ID/datasets/DATASET_ID\"", +"type": "string" +}, +"resourceOriginalState": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all changed fields, except those that are already been included in `request`, `response`, `metadata` or `service_data` fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The operation response. This may not include all response elements, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +}, +"serviceData": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"deprecated": true, +"description": "Deprecated. Use the `metadata` field instead. Other service-specific data about the request, response, and other activities.", +"type": "object" +}, +"serviceName": { +"description": "The name of the API service performing the operation. For example, `\"compute.googleapis.com\"`.", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "The status of the overall operation." +} +}, +"type": "object" +}, +"Auth": { +"description": "This message defines request authentication attributes. Terminology is based on the JSON Web Token (JWT) standard, but the terms also correlate to concepts in other standards.", +"id": "Auth", +"properties": { +"accessLevels": { +"description": "A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: \"//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}\" Example: \"//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"audiences": { +"description": "The intended audience(s) for this authentication information. Reflects the audience (`aud`) claim within a JWT. The audience value(s) depends on the `issuer`, but typically include one or more of the following pieces of information: * The services intended to receive the credential. For example, [\"https://pubsub.googleapis.com/\", \"https://storage.googleapis.com/\"]. * A set of service-based scopes. For example, [\"https://www.googleapis.com/auth/cloud-platform\"]. * The client id of an app, such as the Firebase project id for JWTs from Firebase Auth. Consult the documentation for the credential issuer to determine the information provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"claims": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Structured claims presented with the credential. JWTs include `{key: value}` pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.", +"type": "object" +}, +"presenter": { +"description": "The authorized presenter of the credential. Reflects the optional Authorized Presenter (`azp`) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: \"123456789012.apps.googleusercontent.com\".", +"type": "string" +}, +"principal": { +"description": "The authenticated principal. Reflects the issuer (`iss`) and subject (`sub`) claims within a JWT. The issuer and subject should be `/` delimited, with `/` percent-encoded within the subject fragment. For Google accounts, the principal format is: \"https://accounts.google.com/{id}\"", +"type": "string" +} +}, +"type": "object" +}, +"AuthenticationInfo": { +"description": "Authentication information for the operation.", +"id": "AuthenticationInfo", +"properties": { +"authoritySelector": { +"description": "The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority.", +"type": "string" +}, +"principalEmail": { +"description": "The email address of the authenticated user (or service account on behalf of third party principal) making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "String representation of identity of requesting party. Populated for both first and third party identities.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by delegating on a service account. When multiple authorities present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\"", +"type": "string" +}, +"serviceDelegationHistory": { +"$ref": "ServiceDelegationHistory", +"description": "Records the history of delegated resource access across Google services." +}, +"thirdPartyPrincipal": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The third party identification (if any) of the authenticated user making the request. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +} +}, +"type": "object" +}, +"AuthorizationInfo": { +"description": "Authorization information for the operation.", +"id": "AuthorizationInfo", +"properties": { +"granted": { +"description": "Whether or not authorization for `resource` and `permission` was granted.", +"type": "boolean" +}, +"permission": { +"description": "The required IAM permission.", +"type": "string" +}, +"permissionType": { +"description": "The type of the permission that was checked. For data access audit logs this corresponds with the permission type that must be enabled in the project/folder/organization IAM policy in order for the log to be written.", +"enum": [ +"PERMISSION_TYPE_UNSPECIFIED", +"ADMIN_READ", +"ADMIN_WRITE", +"DATA_READ", +"DATA_WRITE" +], +"enumDescriptions": [ +"Default. Should not be used.", +"Permissions that gate reading resource configuration or metadata.", +"Permissions that gate modification of resource configuration or metadata.", +"Permissions that gate reading user-provided data.", +"Permissions that gate writing user-provided data." +], +"type": "string" +}, +"resource": { +"description": "The resource being accessed, as a REST-style or cloud resource string. For example: bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or projects/PROJECTID/datasets/DATASETID", +"type": "string" +}, +"resourceAttributes": { +"$ref": "Resource", +"description": "Resource attributes used in IAM condition evaluation. This field contains resource attributes like resource type and resource name. To get the whole view of the attributes used in IAM condition evaluation, the user must also look into `AuditLog.request_metadata.request_attributes`." +} +}, +"type": "object" +}, +"CheckError": { +"description": "Defines the errors to be returned in google.api.servicecontrol.v1.CheckResponse.check_errors.", +"id": "CheckError", +"properties": { +"code": { +"description": "The error code.", +"enum": [ +"ERROR_CODE_UNSPECIFIED", +"NOT_FOUND", +"PERMISSION_DENIED", +"RESOURCE_EXHAUSTED", +"BUDGET_EXCEEDED", +"DENIAL_OF_SERVICE_DETECTED", +"LOAD_SHEDDING", +"ABUSER_DETECTED", +"SERVICE_NOT_ACTIVATED", +"VISIBILITY_DENIED", +"BILLING_DISABLED", +"PROJECT_DELETED", +"PROJECT_INVALID", +"CONSUMER_INVALID", +"IP_ADDRESS_BLOCKED", +"REFERER_BLOCKED", +"CLIENT_APP_BLOCKED", +"API_TARGET_BLOCKED", +"API_KEY_INVALID", +"API_KEY_EXPIRED", +"API_KEY_NOT_FOUND", +"SPATULA_HEADER_INVALID", +"LOAS_ROLE_INVALID", +"NO_LOAS_PROJECT", +"LOAS_PROJECT_DISABLED", +"SECURITY_POLICY_VIOLATED", +"INVALID_CREDENTIAL", +"LOCATION_POLICY_VIOLATED", +"NAMESPACE_LOOKUP_UNAVAILABLE", +"SERVICE_STATUS_UNAVAILABLE", +"BILLING_STATUS_UNAVAILABLE", +"QUOTA_CHECK_UNAVAILABLE", +"LOAS_PROJECT_LOOKUP_UNAVAILABLE", +"CLOUD_RESOURCE_MANAGER_BACKEND_UNAVAILABLE", +"SECURITY_POLICY_BACKEND_UNAVAILABLE", +"LOCATION_POLICY_BACKEND_UNAVAILABLE", +"INJECTED_ERROR" +], +"enumDescriptions": [ +"This is never used in `CheckResponse`.", +"The consumer's project id, network container, or resource container was not found. Same as google.rpc.Code.NOT_FOUND.", +"The consumer doesn't have access to the specified resource. Same as google.rpc.Code.PERMISSION_DENIED.", +"Quota check failed. Same as google.rpc.Code.RESOURCE_EXHAUSTED.", +"Budget check failed.", +"The consumer's request has been flagged as a DoS attack.", +"The consumer's request should be rejected in order to protect the service from being overloaded.", +"The consumer has been flagged as an abuser.", +"The consumer hasn't activated the service.", +"The consumer cannot access the service due to visibility configuration.", +"The consumer cannot access the service because billing is disabled.", +"The consumer's project has been marked as deleted (soft deletion).", +"The consumer's project number or id does not represent a valid project.", +"The input consumer info does not represent a valid consumer folder or organization.", +"The IP address of the consumer is invalid for the specific consumer project.", +"The referer address of the consumer request is invalid for the specific consumer project.", +"The client application of the consumer request is invalid for the specific consumer project.", +"The API targeted by this request is invalid for the specified consumer project.", +"The consumer's API key is invalid.", +"The consumer's API Key has expired.", +"The consumer's API Key was not found in config record.", +"The consumer's spatula header is invalid.", +"The consumer's LOAS role is invalid.", +"The consumer's LOAS role has no associated project.", +"The consumer's LOAS project is not `ACTIVE` in LoquatV2.", +"Request is not allowed as per security policies defined in Org Policy.", +"The credential in the request can not be verified.", +"Request is not allowed as per location policies defined in Org Policy.", +"The backend server for looking up project id/number is unavailable.", +"The backend server for checking service status is unavailable.", +"The backend server for checking billing status is unavailable.", +"The backend server for checking quota limits is unavailable.", +"The Spanner for looking up LOAS project is unavailable.", +"Cloud Resource Manager backend server is unavailable.", +"NOTE: for customers in the scope of Beta/GA of https://cloud.google.com/vpc-service-controls, this error is no longer returned. If the security backend is unavailable, rpc UNAVAILABLE status will be returned instead. It should be ignored and should not be used to reject client requests.", +"Backend server for evaluating location policy is unavailable.", +"Part of the project of fault injection: go/chemist-slo-validation. To distinguish between artificially injected errors and organic ones, this value will be exported for the per_service_check_error_count streamz. http://google3/apiserving/servicecontrol/server/controller_service.cc;l=196 Rpcinjectz2 works by injecting errors early in the rpc life cycle, before any of the chemist business logic runs." +], +"type": "string" +}, +"detail": { +"description": "Free-form text providing details on the error cause of the error.", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "Contains public information about the check error. If available, `status.code` will be non zero and client can propagate it out as public error." +}, +"subject": { +"description": "Subject to whom this error applies. See the specific code enum for more details on this field. For example: - \"project:\" - \"folder:\" - \"organization:\"", +"type": "string" +} +}, +"type": "object" +}, +"CheckInfo": { +"description": "Contains additional information about the check operation.", +"id": "CheckInfo", +"properties": { +"apiKeyUid": { +"description": "The unique id of the api key in the format of \"apikey:\". This field will be populated when the consumer passed to Chemist is an API key and all the API key related validations are successful.", +"type": "string" +}, +"consumerInfo": { +"$ref": "ConsumerInfo", +"description": "Consumer info of this check." +}, +"unusedArguments": { +"description": "A list of fields and label keys that are ignored by the server. The client doesn't need to send them for following requests to improve performance and allow better aggregation.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CheckRequest": { +"description": "Request message for the Check method.", +"id": "CheckRequest", +"properties": { +"operation": { +"$ref": "Operation", +"description": "The operation to be checked." +}, +"requestProjectSettings": { +"description": "Requests the project settings to be returned as part of the check response.", +"type": "boolean" +}, +"serviceConfigId": { +"description": "Specifies which version of service configuration should be used to process the request. If unspecified or no matching version can be found, the latest one will be used.", +"type": "string" +}, +"skipActivationCheck": { +"description": "Indicates if service activation check should be skipped for this request. Default behavior is to perform the check and apply relevant quota. WARNING: Setting this flag to \"true\" will disable quota enforcement.", +"type": "boolean" +} +}, +"type": "object" +}, +"CheckResponse": { +"description": "Response message for the Check method.", +"id": "CheckResponse", +"properties": { +"checkErrors": { +"description": "Indicate the decision of the check. If no check errors are present, the service should process the operation. Otherwise the service should use the list of errors to determine the appropriate action.", +"items": { +"$ref": "CheckError" +}, +"type": "array" +}, +"checkInfo": { +"$ref": "CheckInfo", +"description": "Feedback data returned from the server during processing a Check request." +}, +"operationId": { +"description": "The same operation_id value used in the CheckRequest. Used for logging and diagnostics purposes.", +"type": "string" +}, +"quotaInfo": { +"$ref": "QuotaInfo", +"description": "Quota information for the check request associated with this response. " +}, +"serviceConfigId": { +"description": "The actual config id used to process the request.", +"type": "string" +}, +"serviceRolloutId": { +"description": "The current service rollout id used to process the request.", +"type": "string" +} +}, +"type": "object" +}, +"ConsumerInfo": { +"description": "`ConsumerInfo` provides information about the consumer.", +"id": "ConsumerInfo", +"properties": { +"consumerNumber": { +"description": "The consumer identity number, can be Google cloud project number, folder number or organization number e.g. 1234567890. A value of 0 indicates no consumer number is found.", +"format": "int64", +"type": "string" +}, +"projectNumber": { +"description": "The Google cloud project number, e.g. 1234567890. A value of 0 indicates no project number is found. NOTE: This field is deprecated after Chemist support flexible consumer id. New code should not depend on this field anymore.", +"format": "int64", +"type": "string" +}, +"type": { +"description": "The type of the consumer which should have been defined in [Google Resource Manager](https://cloud.google.com/resource-manager/).", +"enum": [ +"CONSUMER_TYPE_UNSPECIFIED", +"PROJECT", +"FOLDER", +"ORGANIZATION", +"SERVICE_SPECIFIC" +], +"enumDescriptions": [ +"This is never used.", +"The consumer is a Google Cloud Project.", +"The consumer is a Google Cloud Folder.", +"The consumer is a Google Cloud Organization.", +"Service-specific resource container which is defined by the service producer to offer their users the ability to manage service control functionalities at a finer level of granularity than the PROJECT." +], +"type": "string" +} +}, +"type": "object" +}, +"Distribution": { +"description": "Distribution represents a frequency distribution of double-valued sample points. It contains the size of the population of sample points plus additional optional information: * the arithmetic mean of the samples * the minimum and maximum of the samples * the sum-squared-deviation of the samples, used to compute variance * a histogram of the values of the sample points", +"id": "Distribution", +"properties": { +"bucketCounts": { +"description": "The number of samples in each histogram bucket. `bucket_counts` are optional. If present, they must sum to the `count` value. The buckets are defined below in `bucket_option`. There are N buckets. `bucket_counts[0]` is the number of samples in the underflow bucket. `bucket_counts[1]` to `bucket_counts[N-1]` are the numbers of samples in each of the finite buckets. And `bucket_counts[N] is the number of samples in the overflow bucket. See the comments of `bucket_option` below for more details. Any suffix of trailing zeros may be omitted.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"count": { +"description": "The total number of samples in the distribution. Must be >= 0.", +"format": "int64", +"type": "string" +}, +"exemplars": { +"description": "Example points. Must be in increasing order of `value` field.", +"items": { +"$ref": "Exemplar" +}, +"type": "array" +}, +"explicitBuckets": { +"$ref": "ExplicitBuckets", +"description": "Buckets with arbitrary user-provided width." +}, +"exponentialBuckets": { +"$ref": "ExponentialBuckets", +"description": "Buckets with exponentially growing width." +}, +"linearBuckets": { +"$ref": "LinearBuckets", +"description": "Buckets with constant width." +}, +"maximum": { +"description": "The maximum of the population of values. Ignored if `count` is zero.", +"format": "double", +"type": "number" +}, +"mean": { +"description": "The arithmetic mean of the samples in the distribution. If `count` is zero then this field must be zero.", +"format": "double", +"type": "number" +}, +"minimum": { +"description": "The minimum of the population of values. Ignored if `count` is zero.", +"format": "double", +"type": "number" +}, +"sumOfSquaredDeviation": { +"description": "The sum of squared deviations from the mean: Sum[i=1..count]((x_i - mean)^2) where each x_i is a sample values. If `count` is zero then this field must be zero, otherwise validation of the request fails.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Exemplar": { +"description": "Exemplars are example points that may be used to annotate aggregated distribution values. They are metadata that gives information about a particular value added to a Distribution bucket, such as a trace ID that was active when a value was added. They may contain further information, such as a example values and timestamps, origin, etc.", +"id": "Exemplar", +"properties": { +"attachments": { +"description": "Contextual information about the example value. Examples are: Trace: type.googleapis.com/google.monitoring.v3.SpanContext Literal string: type.googleapis.com/google.protobuf.StringValue Labels dropped during aggregation: type.googleapis.com/google.monitoring.v3.DroppedLabels There may be only a single attachment of any given message type in a single exemplar, and this is enforced by the system.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"timestamp": { +"description": "The observation (sampling) time of the above value.", +"format": "google-datetime", +"type": "string" +}, +"value": { +"description": "Value of the exemplar point. This value determines to which bucket the exemplar belongs.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ExplicitBuckets": { +"description": "Describing buckets with arbitrary user-provided width.", +"id": "ExplicitBuckets", +"properties": { +"bounds": { +"description": "'bound' is a list of strictly increasing boundaries between buckets. Note that a list of length N-1 defines N buckets because of fenceposting. See comments on `bucket_options` for details. The i'th finite bucket covers the interval [bound[i-1], bound[i]) where i ranges from 1 to bound_size() - 1. Note that there are no finite buckets at all if 'bound' only contains a single element; in that special case the single bound defines the boundary between the underflow and overflow buckets. bucket number lower bound upper bound i == 0 (underflow) -inf bound[i] 0 < i < bound_size() bound[i-1] bound[i] i == bound_size() (overflow) bound[i-1] +inf", +"items": { +"format": "double", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"ExponentialBuckets": { +"description": "Describing buckets with exponentially growing width.", +"id": "ExponentialBuckets", +"properties": { +"growthFactor": { +"description": "The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be larger than 1.0.", +"format": "double", +"type": "number" +}, +"numFiniteBuckets": { +"description": "The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details.", +"format": "int32", +"type": "integer" +}, +"scale": { +"description": "The i'th exponential bucket covers the interval [scale * growth_factor^(i-1), scale * growth_factor^i) where i ranges from 1 to num_finite_buckets inclusive. Must be > 0.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"FirstPartyPrincipal": { +"description": "First party identity principal.", +"id": "FirstPartyPrincipal", +"properties": { +"principalEmail": { +"description": "The email address of a Google account. .", +"type": "string" +}, +"serviceMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Metadata about the service that uses the service account. .", +"type": "object" +} +}, +"type": "object" +}, +"HttpRequest": { +"description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", +"id": "HttpRequest", +"properties": { +"cacheFillBytes": { +"description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", +"format": "int64", +"type": "string" +}, +"cacheHit": { +"description": "Whether or not an entity was served from cache (with or without validation).", +"type": "boolean" +}, +"cacheLookup": { +"description": "Whether or not a cache lookup was attempted.", +"type": "boolean" +}, +"cacheValidatedWithOriginServer": { +"description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.", +"type": "boolean" +}, +"latency": { +"description": "The request processing latency on the server, from the time the request was received until the response was sent.", +"format": "google-duration", +"type": "string" +}, +"protocol": { +"description": "Protocol used for the request. Examples: \"HTTP/1.1\", \"HTTP/2\", \"websocket\"", +"type": "string" +}, +"referer": { +"description": "The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", +"type": "string" +}, +"remoteIp": { +"description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `\"192.168.1.1\"`, `\"FE80::0202:B3FF:FE1E:8329\"`.", +"type": "string" +}, +"requestMethod": { +"description": "The request method. Examples: `\"GET\"`, `\"HEAD\"`, `\"PUT\"`, `\"POST\"`.", +"type": "string" +}, +"requestSize": { +"description": "The size of the HTTP request message in bytes, including the request headers and the request body.", +"format": "int64", +"type": "string" +}, +"requestUrl": { +"description": "The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `\"http://example.com/some/info?color=red\"`.", +"type": "string" +}, +"responseSize": { +"description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", +"format": "int64", +"type": "string" +}, +"serverIp": { +"description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", +"type": "string" +}, +"status": { +"description": "The response code indicating the status of the response. Examples: 200, 404.", +"format": "int32", +"type": "integer" +}, +"userAgent": { +"description": "The user agent sent by the client. Example: `\"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\"`.", +"type": "string" +} +}, +"type": "object" +}, +"LinearBuckets": { +"description": "Describing buckets with constant width.", +"id": "LinearBuckets", +"properties": { +"numFiniteBuckets": { +"description": "The number of finite buckets. With the underflow and overflow buckets, the total number of buckets is `num_finite_buckets` + 2. See comments on `bucket_options` for details.", +"format": "int32", +"type": "integer" +}, +"offset": { +"description": "The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive.", +"format": "double", +"type": "number" +}, +"width": { +"description": "The i'th linear bucket covers the interval [offset + (i-1) * width, offset + i * width) where i ranges from 1 to num_finite_buckets, inclusive. Must be strictly positive.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"LogEntry": { +"description": "An individual log entry.", +"id": "LogEntry", +"properties": { +"httpRequest": { +"$ref": "HttpRequest", +"description": "Optional. Information about the HTTP request associated with this log entry, if applicable." +}, +"insertId": { +"description": "A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A set of user-defined (key, value) data that provides additional information about the log entry.", +"type": "object" +}, +"name": { +"description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`, `\"book_log\"`.", +"type": "string" +}, +"operation": { +"$ref": "LogEntryOperation", +"description": "Optional. Information about an operation associated with the log entry, if applicable." +}, +"protoPayload": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.", +"type": "object" +}, +"severity": { +"description": "The severity of the log entry. The default value is `LogSeverity.DEFAULT`.", +"enum": [ +"DEFAULT", +"DEBUG", +"INFO", +"NOTICE", +"WARNING", +"ERROR", +"CRITICAL", +"ALERT", +"EMERGENCY" +], +"enumDescriptions": [ +"(0) The log entry has no assigned severity level.", +"(100) Debug or trace information.", +"(200) Routine information, such as ongoing status or performance.", +"(300) Normal but significant events, such as start up, shut down, or a configuration change.", +"(400) Warning events might cause problems.", +"(500) Error events are likely to cause problems.", +"(600) Critical events cause more severe problems or outages.", +"(700) A person must take an action immediately.", +"(800) One or more systems are unusable." +], +"type": "string" +}, +"sourceLocation": { +"$ref": "LogEntrySourceLocation", +"description": "Optional. Source code location information associated with the log entry, if any." +}, +"structPayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The log entry payload, represented as a structure that is expressed as a JSON object.", +"type": "object" +}, +"textPayload": { +"description": "The log entry payload, represented as a Unicode string (UTF-8).", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred. If omitted, defaults to operation start time.", +"format": "google-datetime", +"type": "string" +}, +"trace": { +"description": "Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`", +"type": "string" +} +}, +"type": "object" +}, +"LogEntryOperation": { +"description": "Additional information about a potentially long-running operation with which a log entry is associated.", +"id": "LogEntryOperation", +"properties": { +"first": { +"description": "Optional. Set this to True if this is the first log entry in the operation.", +"type": "boolean" +}, +"id": { +"description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", +"type": "string" +}, +"last": { +"description": "Optional. Set this to True if this is the last log entry in the operation.", +"type": "boolean" +}, +"producer": { +"description": "Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `\"MyDivision.MyBigCompany.com\"`, `\"github.com/MyProject/MyApplication\"`.", +"type": "string" +} +}, +"type": "object" +}, +"LogEntrySourceLocation": { +"description": "Additional information about the source code location that produced the log entry.", +"id": "LogEntrySourceLocation", +"properties": { +"file": { +"description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", +"type": "string" +}, +"function": { +"description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` (Python).", +"type": "string" +}, +"line": { +"description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"MetricValue": { +"description": "Represents a single metric value.", +"id": "MetricValue", +"properties": { +"boolValue": { +"description": "A boolean value.", +"type": "boolean" +}, +"distributionValue": { +"$ref": "Distribution", +"description": "A distribution value." +}, +"doubleValue": { +"description": "A double precision floating point value.", +"format": "double", +"type": "number" +}, +"endTime": { +"description": "The end of the time period over which this metric value's measurement applies. If not specified, google.api.servicecontrol.v1.Operation.end_time will be used.", +"format": "google-datetime", +"type": "string" +}, +"int64Value": { +"description": "A signed 64-bit integer value.", +"format": "int64", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels describing the metric value. See comments on google.api.servicecontrol.v1.Operation.labels for the overriding relationship. Note that this map must not contain monitored resource labels.", +"type": "object" +}, +"moneyValue": { +"$ref": "Money", +"description": "A money value." +}, +"startTime": { +"description": "The start of the time period over which this metric value's measurement applies. The time period has different semantics for different metric types (cumulative, delta, and gauge). See the metric definition documentation in the service configuration for details. If not specified, google.api.servicecontrol.v1.Operation.start_time will be used.", +"format": "google-datetime", +"type": "string" +}, +"stringValue": { +"description": "A text string value.", +"type": "string" +} +}, +"type": "object" +}, +"MetricValueSet": { +"description": "Represents a set of metric values in the same metric. Each metric value in the set should have a unique combination of start time, end time, and label values.", +"id": "MetricValueSet", +"properties": { +"metricName": { +"description": "The metric name defined in the service configuration.", +"type": "string" +}, +"metricValues": { +"description": "The values in this metric.", +"items": { +"$ref": "MetricValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"Money": { +"description": "Represents an amount of money with its currency type.", +"id": "Money", +"properties": { +"currencyCode": { +"description": "The three-letter currency code defined in ISO 4217.", +"type": "string" +}, +"nanos": { +"description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", +"format": "int32", +"type": "integer" +}, +"units": { +"description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "Represents information regarding an operation.", +"id": "Operation", +"properties": { +"consumerId": { +"description": "Identity of the consumer who is using the service. This field should be filled in for the operations initiated by a consumer, but not for service-initiated operations that are not related to a specific consumer. - This can be in one of the following formats: - project:PROJECT_ID, - project`_`number:PROJECT_NUMBER, - projects/PROJECT_ID or PROJECT_NUMBER, - folders/FOLDER_NUMBER, - organizations/ORGANIZATION_NUMBER, - api`_`key:API_KEY.", +"type": "string" +}, +"endTime": { +"description": "End time of the operation. Required when the operation is used in ServiceController.Report, but optional when the operation is used in ServiceController.Check.", +"format": "google-datetime", +"type": "string" +}, +"importance": { +"description": "DO NOT USE. This is an experimental field.", +"enum": [ +"LOW", +"HIGH", +"DEBUG", +"PROMOTED" +], +"enumDescriptions": [ +"Allows data caching, batching, and aggregation. It provides higher performance with higher data loss risk.", +"Disables data aggregation to minimize data loss. It is for operations that contains significant monetary value or audit trail. This feature only applies to the client libraries.", +"Deprecated. Do not use. Disables data aggregation and enables additional validation logic. It should only be used during the onboarding process. It is only available to Google internal services, and the service must be approved by chemist-dev@google.com in order to use this level.", +"Used internally by Chemist." +], +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels describing the operation. Only the following labels are allowed: - Labels describing monitored resources as defined in the service configuration. - Default labels of metric values. When specified, labels defined in the metric value override these default. - The following labels defined by Google Cloud Platform: - `cloud.googleapis.com/location` describing the location where the operation happened, - `servicecontrol.googleapis.com/user_agent` describing the user agent of the API request, - `servicecontrol.googleapis.com/service_agent` describing the service used to handle the API request (e.g. ESP), - `servicecontrol.googleapis.com/platform` describing the platform where the API is served, such as App Engine, Compute Engine, or Kubernetes Engine.", +"type": "object" +}, +"logEntries": { +"description": "Represents information to be logged.", +"items": { +"$ref": "LogEntry" +}, +"type": "array" +}, +"metricValueSets": { +"description": "Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error.", +"items": { +"$ref": "MetricValueSet" +}, +"type": "array" +}, +"operationId": { +"description": "Identity of the operation. This must be unique within the scope of the service that generated the operation. If the service calls Check() and Report() on the same operation, the two calls should carry the same id. UUID version 4 is recommended, though not required. In scenarios where an operation is computed from existing information and an idempotent id is desirable for deduplication purpose, UUID version 5 is recommended. See RFC 4122 for details.", +"type": "string" +}, +"operationName": { +"description": "Fully qualified name of the operation. Reserved for future use.", +"type": "string" +}, +"quotaProperties": { +"$ref": "QuotaProperties", +"description": "Represents the properties needed for quota check. Applicable only if this operation is for a quota check request. If this is not specified, no quota check will be performed." +}, +"resources": { +"description": "The resources that are involved in the operation. The maximum supported number of entries in this field is 100.", +"items": { +"$ref": "ResourceInfo" +}, +"type": "array" +}, +"startTime": { +"description": "Required. Start time of the operation.", +"format": "google-datetime", +"type": "string" +}, +"traceSpans": { +"description": "Unimplemented. A list of Cloud Trace spans. The span names shall contain the id of the destination project which can be either the produce or the consumer project.", +"items": { +"$ref": "TraceSpan" +}, +"type": "array" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "Private Preview. This feature is only available for approved services. User defined labels for the resource that this operation is associated with.", +"type": "object" +} +}, +"type": "object" +}, +"OrgPolicyViolationInfo": { +"description": "Represents OrgPolicy Violation information.", +"id": "OrgPolicyViolationInfo", +"properties": { +"payload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.", +"type": "object" +}, +"resourceTags": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.", +"type": "object" +}, +"resourceType": { +"description": "Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket", +"type": "string" +}, +"violationInfo": { +"description": "Optional. Policy violations", +"items": { +"$ref": "ViolationInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"Peer": { +"description": "This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.", +"id": "Peer", +"properties": { +"ip": { +"description": "The IP address of the peer.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels associated with the peer.", +"type": "object" +}, +"port": { +"description": "The network port of the peer.", +"format": "int64", +"type": "string" +}, +"principal": { +"description": "The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.", +"type": "string" +}, +"regionCode": { +"description": "The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running.", +"type": "string" +} +}, +"type": "object" +}, +"PolicyViolationInfo": { +"description": "Information related to policy violations for this request.", +"id": "PolicyViolationInfo", +"properties": { +"orgPolicyViolationInfo": { +"$ref": "OrgPolicyViolationInfo", +"description": "Indicates the orgpolicy violations for this resource." +} +}, +"type": "object" +}, +"QuotaError": { +"description": "Represents error information for QuotaOperation.", +"id": "QuotaError", +"properties": { +"code": { +"description": "Error code.", +"enum": [ +"UNSPECIFIED", +"RESOURCE_EXHAUSTED", +"OUT_OF_RANGE", +"BILLING_NOT_ACTIVE", +"PROJECT_DELETED", +"API_KEY_INVALID", +"API_KEY_EXPIRED", +"SPATULA_HEADER_INVALID", +"LOAS_ROLE_INVALID", +"NO_LOAS_PROJECT", +"PROJECT_STATUS_UNAVAILABLE", +"SERVICE_STATUS_UNAVAILABLE", +"BILLING_STATUS_UNAVAILABLE", +"QUOTA_SYSTEM_UNAVAILABLE" +], +"enumDescriptions": [ +"This is never used.", +"Quota allocation failed. Same as google.rpc.Code.RESOURCE_EXHAUSTED.", +"Quota release failed. This error is ONLY returned on a NORMAL release. More formally: if a user requests a release of 10 tokens, but only 5 tokens were previously allocated, in a BEST_EFFORT release, this will be considered a success, 5 tokens will be released, and the result will be \"Ok\". If this is done in NORMAL mode, no tokens will be released, and an OUT_OF_RANGE error will be returned. Same as google.rpc.Code.OUT_OF_RANGE.", +"Consumer cannot access the service because the service requires active billing.", +"Consumer's project has been marked as deleted (soft deletion).", +"Specified API key is invalid.", +"Specified API Key has expired.", +"Consumer's spatula header is invalid.", +"The consumer's LOAS role is invalid.", +"The consumer's LOAS role has no associated project.", +"The backend server for looking up project id/number is unavailable.", +"The backend server for checking service status is unavailable.", +"The backend server for checking billing status is unavailable.", +"The backend server for checking quota limits is unavailable." +], +"type": "string" +}, +"description": { +"description": "Free-form text that provides details on the cause of the error.", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "Contains additional information about the quota error. If available, `status.code` will be non zero." +}, +"subject": { +"description": "Subject to whom this error applies. See the specific enum for more details on this field. For example, \"clientip:\" or \"project:\".", +"type": "string" +} +}, +"type": "object" +}, +"QuotaInfo": { +"description": "Contains the quota information for a quota check response.", +"id": "QuotaInfo", +"properties": { +"limitExceeded": { +"deprecated": true, +"description": "Quota Metrics that have exceeded quota limits. For QuotaGroup-based quota, this is QuotaGroup.name For QuotaLimit-based quota, this is QuotaLimit.name See: google.api.Quota Deprecated: Use quota_metrics to get per quota group limit exceeded status.", +"items": { +"type": "string" +}, +"type": "array" +}, +"quotaConsumed": { +"additionalProperties": { +"format": "int32", +"type": "integer" +}, +"description": "Map of quota group name to the actual number of tokens consumed. If the quota check was not successful, then this will not be populated due to no quota consumption. We are not merging this field with 'quota_metrics' field because of the complexity of scaling in Chemist client code base. For simplicity, we will keep this field for Castor (that scales quota usage) and 'quota_metrics' for SuperQuota (that doesn't scale quota usage). ", +"type": "object" +}, +"quotaMetrics": { +"description": "Quota metrics to indicate the usage. Depending on the check request, one or more of the following metrics will be included: 1. For rate quota, per quota group or per quota metric incremental usage will be specified using the following delta metric: \"serviceruntime.googleapis.com/api/consumer/quota_used_count\" 2. For allocation quota, per quota metric total usage will be specified using the following gauge metric: \"serviceruntime.googleapis.com/allocation/consumer/quota_used_count\" 3. For both rate quota and allocation quota, the quota limit reached condition will be specified using the following boolean metric: \"serviceruntime.googleapis.com/quota/exceeded\"", +"items": { +"$ref": "MetricValueSet" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaOperation": { +"description": "Represents information regarding a quota operation.", +"id": "QuotaOperation", +"properties": { +"consumerId": { +"description": "Identity of the consumer for whom this quota operation is being performed. This can be in one of the following formats: project:, project_number:, api_key:.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels describing the operation.", +"type": "object" +}, +"methodName": { +"description": "Fully qualified name of the API method for which this quota operation is requested. This name is used for matching quota rules or metric rules and billing status rules defined in service configuration. This field should not be set if any of the following is true: (1) the quota operation is performed on non-API resources. (2) quota_metrics is set because the caller is doing quota override. Example of an RPC method name: google.example.library.v1.LibraryService.CreateShelf", +"type": "string" +}, +"operationId": { +"description": "Identity of the operation. For Allocation Quota, this is expected to be unique within the scope of the service that generated the operation, and guarantees idempotency in case of retries. In order to ensure best performance and latency in the Quota backends, operation_ids are optimally associated with time, so that related operations can be accessed fast in storage. For this reason, the recommended token for services that intend to operate at a high QPS is Unix time in nanos + UUID", +"type": "string" +}, +"quotaMetrics": { +"description": "Represents information about this operation. Each MetricValueSet corresponds to a metric defined in the service configuration. The data type used in the MetricValueSet must agree with the data type specified in the metric definition. Within a single operation, it is not allowed to have more than one MetricValue instances that have the same metric names and identical label value combinations. If a request has such duplicated MetricValue instances, the entire request is rejected with an invalid argument error. This field is mutually exclusive with method_name.", +"items": { +"$ref": "MetricValueSet" +}, +"type": "array" +}, +"quotaMode": { +"description": "Quota mode for this operation.", +"enum": [ +"UNSPECIFIED", +"NORMAL", +"BEST_EFFORT", +"CHECK_ONLY", +"ADJUST_ONLY" +], +"enumDescriptions": [ +"Guard against implicit default. Must not be used.", +"For AllocateQuota request, allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, allocation error will be returned and no quota will be allocated. If multiple quotas are part of the request, and one fails, none of the quotas are allocated or released.", +"The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the amount is higher than the available quota, request does not fail but all available quota will be allocated. For rate quota, BEST_EFFORT will continue to deduct from other groups even if one does not have enough quota. For allocation, it will find the minimum available amount across all groups and deduct that amount from all the affected groups.", +"For AllocateQuota request, only checks if there is enough quota available and does not change the available quota. No lock is placed on the available quota either.", +"The operation allocates quota for the amount specified in the service configuration or specified using the quota metrics. If the requested amount is higher than the available quota, request does not fail and remaining quota would become negative (going over the limit). Not supported for Rate Quota." +], +"type": "string" +} +}, +"type": "object" +}, +"QuotaProperties": { +"description": "Represents the properties needed for quota operations.", +"id": "QuotaProperties", +"properties": { +"quotaMode": { +"description": "Quota mode for this operation.", +"enum": [ +"ACQUIRE", +"ACQUIRE_BEST_EFFORT", +"CHECK" +], +"enumDescriptions": [ +"Decreases available quota by the cost specified for the operation. If cost is higher than available quota, operation fails and returns error.", +"Decreases available quota by the cost specified for the operation. If cost is higher than available quota, operation does not fail and available quota goes down to zero but it returns error.", +"Does not change any available quota. Only checks if there is enough quota. No lock is placed on the checked tokens neither." +], +"type": "string" +} +}, +"type": "object" +}, +"ReportError": { +"description": "Represents the processing error of one Operation in the request.", +"id": "ReportError", +"properties": { +"operationId": { +"description": "The Operation.operation_id value from the request.", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "Details of the error when processing the Operation." +} +}, +"type": "object" +}, +"ReportRequest": { +"description": "Request message for the Report method.", +"id": "ReportRequest", +"properties": { +"operations": { +"description": "Operations to be reported. Typically the service should report one operation per request. Putting multiple operations into a single request is allowed, but should be used only when multiple operations are natually available at the time of the report. There is no limit on the number of operations in the same ReportRequest, however the ReportRequest size should be no larger than 1MB. See ReportResponse.report_errors for partial failure behavior.", +"items": { +"$ref": "Operation" +}, +"type": "array" +}, +"serviceConfigId": { +"description": "Specifies which version of service config should be used to process the request. If unspecified or no matching version can be found, the latest one will be used.", +"type": "string" +} +}, +"type": "object" +}, +"ReportResponse": { +"description": "Response message for the Report method.", +"id": "ReportResponse", +"properties": { +"reportErrors": { +"description": "Partial failures, one for each `Operation` in the request that failed processing. There are three possible combinations of the RPC status: 1. The combination of a successful RPC status and an empty `report_errors` list indicates a complete success where all `Operations` in the request are processed successfully. 2. The combination of a successful RPC status and a non-empty `report_errors` list indicates a partial success where some `Operations` in the request succeeded. Each `Operation` that failed processing has a corresponding item in this list. 3. A failed RPC status indicates a general non-deterministic failure. When this happens, it's impossible to know which of the 'Operations' in the request succeeded or failed.", +"items": { +"$ref": "ReportError" +}, +"type": "array" +}, +"serviceConfigId": { +"description": "The actual config id used to process the request.", +"type": "string" +}, +"serviceRolloutId": { +"description": "The current service rollout id used to process the request.", +"type": "string" +} +}, +"type": "object" +}, +"Request": { +"description": "This message defines attributes for an HTTP request. If the actual request is not an HTTP request, the runtime system should try to map the actual request to an equivalent HTTP request.", +"id": "Request", +"properties": { +"auth": { +"$ref": "Auth", +"description": "The request authentication. May be absent for unauthenticated requests. Derived from the HTTP request `Authorization` header or equivalent." +}, +"headers": { +"additionalProperties": { +"type": "string" +}, +"description": "The HTTP request headers. If multiple headers share the same key, they must be merged according to the HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.", +"type": "object" +}, +"host": { +"description": "The HTTP request `Host` header value.", +"type": "string" +}, +"id": { +"description": "The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service.", +"type": "string" +}, +"method": { +"description": "The HTTP request method, such as `GET`, `POST`.", +"type": "string" +}, +"path": { +"description": "The HTTP URL path, excluding the query parameters.", +"type": "string" +}, +"protocol": { +"description": "The network protocol used with the request, such as \"http/1.1\", \"spdy/3\", \"h2\", \"h2c\", \"webrtc\", \"tcp\", \"udp\", \"quic\". See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.", +"type": "string" +}, +"query": { +"description": "The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears in the first line of the HTTP request. No decoding is performed.", +"type": "string" +}, +"reason": { +"description": "A special parameter for request reason. It is used by security systems to associate auditing information with a request.", +"type": "string" +}, +"scheme": { +"description": "The HTTP URL scheme, such as `http` and `https`.", +"type": "string" +}, +"size": { +"description": "The HTTP request size in bytes. If unknown, it must be -1.", +"format": "int64", +"type": "string" +}, +"time": { +"description": "The timestamp when the `destination` service receives the last byte of the request.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RequestMetadata": { +"description": "Metadata about the request.", +"id": "RequestMetadata", +"properties": { +"callerIp": { +"description": "The IP address of the caller. For a caller from the internet, this will be the public IPv4 or IPv6 address. For calls made from inside Google's internal production network from one GCP service to another, `caller_ip` will be redacted to \"private\". For a caller from a Compute Engine VM with a external IP address, `caller_ip` will be the VM's external IP address. For a caller from a Compute Engine VM without a external IP address, if the VM is in the same organization (or project) as the accessed resource, `caller_ip` will be the VM's internal IPv4 address, otherwise `caller_ip` will be redacted to \"gce-internal-ip\". See https://cloud.google.com/compute/docs/vpc/ for more information.", +"type": "string" +}, +"callerNetwork": { +"description": "The network of the caller. Set only if the network host project is part of the same GCP organization (or project) as the accessed resource. See https://cloud.google.com/compute/docs/vpc/ for more information. This is a scheme-less URI full resource name. For example: \"//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID\"", +"type": "string" +}, +"callerSuppliedUserAgent": { +"description": "The user agent of the caller. This information is not authenticated and should be treated accordingly. For example: + `google-api-python-client/1.4.0`: The request was made by the Google API client for Python. + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the Google Cloud SDK CLI (gcloud). + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`: The request was made from the `my-project` App Engine app.", +"type": "string" +}, +"destinationAttributes": { +"$ref": "Peer", +"description": "The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop. Only two fields are used in this message, Peer.port and Peer.ip. These fields are optionally populated by those services utilizing the IAM condition feature." +}, +"requestAttributes": { +"$ref": "Request", +"description": "Request attributes used in IAM condition evaluation. This field contains request attributes like request time and access levels associated with the request. To get the whole view of the attributes used in IAM condition evaluation, the user must also look into `AuditLog.authentication_info.resource_attributes`." +} +}, +"type": "object" +}, +"Resource": { +"description": "This message defines core attributes for a resource. A resource is an addressable (named) entity provided by the destination service. For example, a file stored on a network storage service.", +"id": "Resource", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/", +"type": "object" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.", +"format": "google-datetime", +"type": "string" +}, +"deleteTime": { +"description": "Output only. The timestamp when the resource was deleted. If the resource is not deleted, this must be empty.", +"format": "google-datetime", +"type": "string" +}, +"displayName": { +"description": "Mutable. The display name set by clients. Must be <= 63 characters.", +"type": "string" +}, +"etag": { +"description": "Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.", +"type": "object" +}, +"location": { +"description": "Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves. For Google Cloud products, the encoding is what is used by Google Cloud APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The semantics of `location` is identical to the `cloud.googleapis.com/location` label used by some Google Cloud APIs.", +"type": "string" +}, +"name": { +"description": "The stable identifier (name) of a resource on the `service`. A resource can be logically identified as \"//{resource.service}/{resource.name}\". The differences between a resource name and a URI are: * Resource name is a logical identifier, independent of network protocol and API version. For example, `//pubsub.googleapis.com/projects/123/topics/news-feed`. * URI often includes protocol and version information, so it can be used directly by applications. For example, `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. See https://cloud.google.com/apis/design/resource_names for details.", +"type": "string" +}, +"service": { +"description": "The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.", +"type": "string" +}, +"type": { +"description": "The type of the resource. The syntax is platform-specific because different platforms define their resources differently. For Google APIs, the type format must be \"{service}/{kind}\", such as \"pubsub.googleapis.com/Topic\".", +"type": "string" +}, +"uid": { +"description": "The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value. Changes to a resource made by the service should refresh this value.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ResourceInfo": { +"description": "Describes a resource associated with this operation.", +"id": "ResourceInfo", +"properties": { +"permission": { +"description": "The resource permission required for this request.", +"type": "string" +}, +"resourceContainer": { +"description": "The identifier of the parent of this resource instance. Must be in one of the following formats: - `projects/` - `folders/` - `organizations/`", +"type": "string" +}, +"resourceLocation": { +"description": "The location of the resource. If not empty, the resource will be checked against location policy. The value must be a valid zone, region or multiregion. For example: \"europe-west4\" or \"northamerica-northeast1-a\"", +"type": "string" +}, +"resourceName": { +"description": "Name of the resource. This is used for auditing purposes.", +"type": "string" +} +}, +"type": "object" +}, +"ResourceLocation": { +"description": "Location information about a resource.", +"id": "ResourceLocation", +"properties": { +"currentLocations": { +"description": "The locations of a resource after the execution of the operation. Requests to create or delete a location based resource must populate the 'current_locations' field and not the 'original_locations' field. For example: \"europe-west1-a\" \"us-east1\" \"nam3\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"originalLocations": { +"description": "The locations of a resource prior to the execution of the operation. Requests that mutate the resource's location must populate both the 'original_locations' as well as the 'current_locations' fields. For example: \"europe-west1-a\" \"us-east1\" \"nam3\"", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "ServiceAccountDelegationInfo", +"properties": { +"firstPartyPrincipal": { +"$ref": "FirstPartyPrincipal", +"description": "First party (Google) identity as the real authority." +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +}, +"thirdPartyPrincipal": { +"$ref": "ThirdPartyPrincipal", +"description": "Third party identity as the real authority." +} +}, +"type": "object" +}, +"ServiceDelegationHistory": { +"description": "The history of delegation across multiple services as the result of the original user's action. Such as \"service A uses its own account to do something for user B\". This differs from ServiceAccountDelegationInfo, which only tracks the history of direct token exchanges (impersonation).", +"id": "ServiceDelegationHistory", +"properties": { +"originalPrincipal": { +"description": "The original end user who initiated the request to GCP.", +"type": "string" +}, +"serviceMetadata": { +"description": "Data identifying the service specific jobs or units of work that were involved in a chain of service calls.", +"items": { +"$ref": "ServiceMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"ServiceMetadata": { +"description": "Metadata describing the service and additional service specific information used to identify the job or unit of work at hand.", +"id": "ServiceMetadata", +"properties": { +"jobMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Additional metadata provided by service teams to describe service specific job information that was triggered by the original principal.", +"type": "object" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]` If the identity is a Google account (e.g. workspace user account or service account), this will be the email of the prefixed by `serviceAccount:`. For example: `serviceAccount:my-service-account@project-1.iam.gserviceaccount.com`. If the identity is an individual user, the identity will be formatted as: `user:user_ABC@email.com`.", +"type": "string" +}, +"serviceDomain": { +"description": "The service's fully qualified domain name, e.g. \"dataproc.googleapis.com\".", +"type": "string" +} +}, +"type": "object" +}, +"SpanContext": { +"description": "The context of a span. This is attached to an Exemplar in Distribution values during aggregation. It contains the name of a span with format: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]", +"id": "SpanContext", +"properties": { +"spanName": { +"description": "The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] `[TRACE_ID]` is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. `[SPAN_ID]` is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"ThirdPartyPrincipal": { +"description": "Third party identity principal.", +"id": "ThirdPartyPrincipal", +"properties": { +"thirdPartyClaims": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Metadata about third party identity.", +"type": "object" +} +}, +"type": "object" +}, +"TraceSpan": { +"description": "A span represents a single operation within a trace. Spans can be nested to form a trace tree. Often, a trace contains a root span that describes the end-to-end latency, and one or more subspans for its sub-operations. A trace can also contain multiple root spans, or none at all. Spans do not need to be contiguous\u2014there may be gaps or overlaps between spans in a trace.", +"id": "TraceSpan", +"properties": { +"attributes": { +"$ref": "Attributes", +"description": "A set of attributes on the span. You can have up to 32 attributes per span." +}, +"childSpanCount": { +"description": "An optional number of child spans that were generated while this span was active. If set, allows implementation to detect missing child spans.", +"format": "int32", +"type": "integer" +}, +"displayName": { +"$ref": "TruncatableString", +"description": "A description of the span's operation (up to 128 bytes). Stackdriver Trace displays the description in the Google Cloud Platform Console. For example, the display name can be a qualified method name or a file name and a line number where the operation is called. A best practice is to use the same display name within an application and at the same call point. This makes it easier to correlate spans in different traces." +}, +"endTime": { +"description": "The end time of the span. On the client side, this is the time kept by the local machine where the span execution ends. On the server side, this is the time when the server application handler stops running.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The resource name of the span in the following format: projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.", +"type": "string" +}, +"parentSpanId": { +"description": "The [SPAN_ID] of this span's parent span. If this is a root span, then this field must be empty.", +"type": "string" +}, +"sameProcessAsParentSpan": { +"description": "(Optional) Set this parameter to indicate whether this span is in the same process as its parent. If you do not set this parameter, Stackdriver Trace is unable to take advantage of this helpful information.", +"type": "boolean" +}, +"spanId": { +"description": "The [SPAN_ID] portion of the span's resource name.", +"type": "string" +}, +"spanKind": { +"description": "Distinguishes between spans generated in a particular context. For example, two spans with the same name may be distinguished using `CLIENT` (caller) and `SERVER` (callee) to identify an RPC call.", +"enum": [ +"SPAN_KIND_UNSPECIFIED", +"INTERNAL", +"SERVER", +"CLIENT", +"PRODUCER", +"CONSUMER" +], +"enumDescriptions": [ +"Unspecified. Do NOT use as default. Implementations MAY assume SpanKind.INTERNAL to be default.", +"Indicates that the span is used internally. Default value.", +"Indicates that the span covers server-side handling of an RPC or other remote network request.", +"Indicates that the span covers the client-side wrapper around an RPC or other remote request.", +"Indicates that the span describes producer sending a message to a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. publishing a message to a pubsub service).", +"Indicates that the span describes consumer receiving a message from a broker. Unlike client and server, there is no direct critical path latency relationship between producer and consumer spans (e.g. receiving a message from a pubsub service subscription)." +], +"type": "string" +}, +"startTime": { +"description": "The start time of the span. On the client side, this is the time kept by the local machine where the span execution starts. On the server side, this is the time when the server's application handler starts running.", +"format": "google-datetime", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "An optional final status for this span." +} +}, +"type": "object" +}, +"TruncatableString": { +"description": "Represents a string that might be shortened to a specified length.", +"id": "TruncatableString", +"properties": { +"truncatedByteCount": { +"description": "The number of bytes removed from the original string. If this value is 0, then the string was not shortened.", +"format": "int32", +"type": "integer" +}, +"value": { +"description": "The shortened string. For example, if the original string is 500 bytes long and the limit of the string is 128 bytes, then `value` contains the first 128 bytes of the 500-byte string. Truncation always happens on a UTF8 character boundary. If there are multi-byte characters in the string, then the length of the shortened string might be less than the size limit.", +"type": "string" +} +}, +"type": "object" +}, +"V1HttpRequest": { +"description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", +"id": "V1HttpRequest", +"properties": { +"cacheFillBytes": { +"description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", +"format": "int64", +"type": "string" +}, +"cacheHit": { +"description": "Whether or not an entity was served from cache (with or without validation).", +"type": "boolean" +}, +"cacheLookup": { +"description": "Whether or not a cache lookup was attempted.", +"type": "boolean" +}, +"cacheValidatedWithOriginServer": { +"description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.", +"type": "boolean" +}, +"latency": { +"description": "The request processing latency on the server, from the time the request was received until the response was sent.", +"format": "google-duration", +"type": "string" +}, +"protocol": { +"description": "Protocol used for the request. Examples: \"HTTP/1.1\", \"HTTP/2\", \"websocket\"", +"type": "string" +}, +"referer": { +"description": "The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", +"type": "string" +}, +"remoteIp": { +"description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `\"192.168.1.1\"`, `\"FE80::0202:B3FF:FE1E:8329\"`.", +"type": "string" +}, +"requestMethod": { +"description": "The request method. Examples: `\"GET\"`, `\"HEAD\"`, `\"PUT\"`, `\"POST\"`.", +"type": "string" +}, +"requestSize": { +"description": "The size of the HTTP request message in bytes, including the request headers and the request body.", +"format": "int64", +"type": "string" +}, +"requestUrl": { +"description": "The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `\"http://example.com/some/info?color=red\"`.", +"type": "string" +}, +"responseSize": { +"description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", +"format": "int64", +"type": "string" +}, +"serverIp": { +"description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", +"type": "string" +}, +"status": { +"description": "The response code indicating the status of the response. Examples: 200, 404.", +"format": "int32", +"type": "integer" +}, +"userAgent": { +"description": "The user agent sent by the client. Example: `\"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\"`.", +"type": "string" +} +}, +"type": "object" +}, +"V1LogEntry": { +"description": "An individual log entry.", +"id": "V1LogEntry", +"properties": { +"httpRequest": { +"$ref": "V1HttpRequest", +"description": "Optional. Information about the HTTP request associated with this log entry, if applicable." +}, +"insertId": { +"description": "A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A set of user-defined (key, value) data that provides additional information about the log entry.", +"type": "object" +}, +"monitoredResourceLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "A set of user-defined (key, value) data that provides additional information about the moniotored resource that the log entry belongs to.", +"type": "object" +}, +"name": { +"description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`, `\"book_log\"`.", +"type": "string" +}, +"operation": { +"$ref": "V1LogEntryOperation", +"description": "Optional. Information about an operation associated with the log entry, if applicable." +}, +"protoPayload": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.", +"type": "object" +}, +"severity": { +"description": "The severity of the log entry. The default value is `LogSeverity.DEFAULT`.", +"enum": [ +"DEFAULT", +"DEBUG", +"INFO", +"NOTICE", +"WARNING", +"ERROR", +"CRITICAL", +"ALERT", +"EMERGENCY" +], +"enumDescriptions": [ +"(0) The log entry has no assigned severity level.", +"(100) Debug or trace information.", +"(200) Routine information, such as ongoing status or performance.", +"(300) Normal but significant events, such as start up, shut down, or a configuration change.", +"(400) Warning events might cause problems.", +"(500) Error events are likely to cause problems.", +"(600) Critical events cause more severe problems or outages.", +"(700) A person must take an action immediately.", +"(800) One or more systems are unusable." +], +"type": "string" +}, +"sourceLocation": { +"$ref": "V1LogEntrySourceLocation", +"description": "Optional. Source code location information associated with the log entry, if any." +}, +"structPayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The log entry payload, represented as a structure that is expressed as a JSON object.", +"type": "object" +}, +"textPayload": { +"description": "The log entry payload, represented as a Unicode string (UTF-8).", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred. If omitted, defaults to operation start time.", +"format": "google-datetime", +"type": "string" +}, +"trace": { +"description": "Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`", +"type": "string" +} +}, +"type": "object" +}, +"V1LogEntryOperation": { +"description": "Additional information about a potentially long-running operation with which a log entry is associated.", +"id": "V1LogEntryOperation", +"properties": { +"first": { +"description": "Optional. Set this to True if this is the first log entry in the operation.", +"type": "boolean" +}, +"id": { +"description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", +"type": "string" +}, +"last": { +"description": "Optional. Set this to True if this is the last log entry in the operation.", +"type": "boolean" +}, +"producer": { +"description": "Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `\"MyDivision.MyBigCompany.com\"`, `\"github.com/MyProject/MyApplication\"`.", +"type": "string" +} +}, +"type": "object" +}, +"V1LogEntrySourceLocation": { +"description": "Additional information about the source code location that produced the log entry.", +"id": "V1LogEntrySourceLocation", +"properties": { +"file": { +"description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", +"type": "string" +}, +"function": { +"description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` (Python).", +"type": "string" +}, +"line": { +"description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ViolationInfo": { +"description": "Provides information about the Policy violation info for this request.", +"id": "ViolationInfo", +"properties": { +"checkedValue": { +"description": "Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types", +"type": "string" +}, +"constraint": { +"description": "Optional. Constraint name", +"type": "string" +}, +"errorMessage": { +"description": "Optional. Error message that policy is indicating.", +"type": "string" +}, +"policyType": { +"description": "Optional. Indicates the type of the policy.", +"enum": [ +"POLICY_TYPE_UNSPECIFIED", +"BOOLEAN_CONSTRAINT", +"LIST_CONSTRAINT", +"CUSTOM_CONSTRAINT" +], +"enumDescriptions": [ +"Default value. This value should not be used.", +"Indicates boolean policy constraint", +"Indicates list policy constraint", +"Indicates custom policy constraint" +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Control API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicecontrol.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicecontrol.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..a89267a39c255cd57efc976afc0e290c02d0bf95 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicecontrol.v2.json @@ -0,0 +1,1224 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/servicecontrol": { +"description": "Manage your Google Service Control data" +} +} +} +}, +"basePath": "", +"baseUrl": "https://servicecontrol.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Control", +"description": "Provides admission control and telemetry reporting for services integrated with Service Infrastructure. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-control/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "servicecontrol:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://servicecontrol.mtls.googleapis.com/", +"name": "servicecontrol", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"services": { +"methods": { +"check": { +"description": "Private Preview. This feature is only available for approved services. This method provides admission control for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It checks whether an operation should be allowed based on the service configuration and relevant policies. It must be called before the operation is executed. For more information, see [Admission Control](https://cloud.google.com/service-infrastructure/docs/admission-control). NOTE: The admission control has an expected policy propagation delay of 60s. The caller **must** not depend on the most recent policy changes. NOTE: The admission control has a hard limit of 1 referenced resources per call. If an operation refers to more than 1 resources, the caller must call the Check method multiple times. This method requires the `servicemanagement.services.check` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", +"flatPath": "v2/services/{serviceName}:check", +"httpMethod": "POST", +"id": "servicecontrol.services.check", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "The service name as specified in its service configuration. For example, `\"pubsub.googleapis.com\"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v2/services/{serviceName}:check", +"request": { +"$ref": "CheckRequest" +}, +"response": { +"$ref": "CheckResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/servicecontrol" +] +}, +"report": { +"description": "Private Preview. This feature is only available for approved services. This method provides telemetry reporting for services that are integrated with [Service Infrastructure](https://cloud.google.com/service-infrastructure). It reports a list of operations that have occurred on a service. It must be called after the operations have been executed. For more information, see [Telemetry Reporting](https://cloud.google.com/service-infrastructure/docs/telemetry-reporting). NOTE: The telemetry reporting has a hard limit of 1000 operations and 1MB per Report call. It is recommended to have no more than 100 operations per call. This method requires the `servicemanagement.services.report` permission on the specified service. For more information, see [Service Control API Access Control](https://cloud.google.com/service-infrastructure/docs/service-control/access-control).", +"flatPath": "v2/services/{serviceName}:report", +"httpMethod": "POST", +"id": "servicecontrol.services.report", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "The service name as specified in its service configuration. For example, `\"pubsub.googleapis.com\"`. See [google.api.Service](https://cloud.google.com/service-management/reference/rpc/google.api#google.api.Service) for the definition of a service name.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v2/services/{serviceName}:report", +"request": { +"$ref": "ReportRequest" +}, +"response": { +"$ref": "ReportResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/servicecontrol" +] +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://servicecontrol.googleapis.com/", +"schemas": { +"Api": { +"description": "This message defines attributes associated with API operations, such as a network API request. The terminology is based on the conventions used by Google APIs, Istio, and OpenAPI.", +"id": "Api", +"properties": { +"operation": { +"description": "The API operation name. For gRPC requests, it is the fully qualified API method name, such as \"google.pubsub.v1.Publisher.Publish\". For OpenAPI requests, it is the `operationId`, such as \"getPet\".", +"type": "string" +}, +"protocol": { +"description": "The API protocol used for sending the request, such as \"http\", \"https\", \"grpc\", or \"internal\".", +"type": "string" +}, +"service": { +"description": "The API service name. It is a logical identifier for a networked API, such as \"pubsub.googleapis.com\". The naming syntax depends on the API management system being used for handling the request.", +"type": "string" +}, +"version": { +"description": "The API version associated with the API operation above, such as \"v1\" or \"v1alpha1\".", +"type": "string" +} +}, +"type": "object" +}, +"AttributeContext": { +"description": "This message defines the standard attribute vocabulary for Google APIs. An attribute is a piece of metadata that describes an activity on a network service. For example, the size of an HTTP request, or the status code of an HTTP response. Each attribute has a type and a name, which is logically defined as a proto message field in `AttributeContext`. The field type becomes the attribute type, and the field path becomes the attribute name. For example, the attribute `source.ip` maps to field `AttributeContext.source.ip`. This message definition is guaranteed not to have any wire breaking change. So you can use it directly for passing attributes across different systems. NOTE: Different system may generate different subset of attributes. Please verify the system specification before relying on an attribute generated a system.", +"id": "AttributeContext", +"properties": { +"api": { +"$ref": "Api", +"description": "Represents an API operation that is involved to a network activity." +}, +"destination": { +"$ref": "Peer", +"description": "The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop." +}, +"extensions": { +"description": "Supports extensions for advanced use cases, such as logs and metrics.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"origin": { +"$ref": "Peer", +"description": "The origin of a network activity. In a multi hop network activity, the origin represents the sender of the first hop. For the first hop, the `source` and the `origin` must have the same content." +}, +"request": { +"$ref": "Request", +"description": "Represents a network request, such as an HTTP request." +}, +"resource": { +"$ref": "Resource", +"description": "Represents a target resource that is involved with a network activity. If multiple resources are involved with an activity, this must be the primary one." +}, +"response": { +"$ref": "Response", +"description": "Represents a network response, such as an HTTP response." +}, +"source": { +"$ref": "Peer", +"description": "The source of a network activity, such as starting a TCP connection. In a multi hop network activity, the source represents the sender of the last hop." +} +}, +"type": "object" +}, +"AuditLog": { +"description": "Common audit log format for Google Cloud Platform API operations. ", +"id": "AuditLog", +"properties": { +"authenticationInfo": { +"$ref": "AuthenticationInfo", +"description": "Authentication information." +}, +"authorizationInfo": { +"description": "Authorization information. If there are multiple resources or permissions involved, then there is one AuthorizationInfo element for each {resource, permission} tuple.", +"items": { +"$ref": "AuthorizationInfo" +}, +"type": "array" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Other service-specific data about the request, response, and other information associated with the current audited event.", +"type": "object" +}, +"methodName": { +"description": "The name of the service method or operation. For API calls, this should be the name of the API method. For example, \"google.cloud.bigquery.v2.TableService.InsertTable\" \"google.logging.v2.ConfigServiceV2.CreateSink\"", +"type": "string" +}, +"numResponseItems": { +"description": "The number of items returned from a List or Query API method, if applicable.", +"format": "int64", +"type": "string" +}, +"policyViolationInfo": { +"$ref": "PolicyViolationInfo", +"description": "Indicates the policy violations for this request. If the request is denied by the policy, violation information will be logged here." +}, +"request": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The operation request. This may not include all request parameters, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +}, +"requestMetadata": { +"$ref": "RequestMetadata", +"description": "Metadata about the operation." +}, +"resourceLocation": { +"$ref": "ResourceLocation", +"description": "The resource location information." +}, +"resourceName": { +"description": "The resource or collection that is the target of the operation. The name is a scheme-less URI, not including the API service name. For example: \"projects/PROJECT_ID/zones/us-central1-a/instances\" \"projects/PROJECT_ID/datasets/DATASET_ID\"", +"type": "string" +}, +"resourceOriginalState": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The resource's original state before mutation. Present only for operations which have successfully modified the targeted resource(s). In general, this field should contain all changed fields, except those that are already been included in `request`, `response`, `metadata` or `service_data` fields. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The operation response. This may not include all response elements, such as those that are too large, privacy-sensitive, or duplicated elsewhere in the log record. It should never include user-generated data, such as file contents. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +}, +"serviceData": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"deprecated": true, +"description": "Deprecated. Use the `metadata` field instead. Other service-specific data about the request, response, and other activities.", +"type": "object" +}, +"serviceName": { +"description": "The name of the API service performing the operation. For example, `\"compute.googleapis.com\"`.", +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "The status of the overall operation." +} +}, +"type": "object" +}, +"Auth": { +"description": "This message defines request authentication attributes. Terminology is based on the JSON Web Token (JWT) standard, but the terms also correlate to concepts in other standards.", +"id": "Auth", +"properties": { +"accessLevels": { +"description": "A list of access level resource names that allow resources to be accessed by authenticated requester. It is part of Secure GCP processing for the incoming request. An access level string has the format: \"//{api_service_name}/accessPolicies/{policy_id}/accessLevels/{short_name}\" Example: \"//accesscontextmanager.googleapis.com/accessPolicies/MY_POLICY_ID/accessLevels/MY_LEVEL\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"audiences": { +"description": "The intended audience(s) for this authentication information. Reflects the audience (`aud`) claim within a JWT. The audience value(s) depends on the `issuer`, but typically include one or more of the following pieces of information: * The services intended to receive the credential. For example, [\"https://pubsub.googleapis.com/\", \"https://storage.googleapis.com/\"]. * A set of service-based scopes. For example, [\"https://www.googleapis.com/auth/cloud-platform\"]. * The client id of an app, such as the Firebase project id for JWTs from Firebase Auth. Consult the documentation for the credential issuer to determine the information provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"claims": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Structured claims presented with the credential. JWTs include `{key: value}` pairs for standard and private claims. The following is a subset of the standard required and optional claims that would typically be presented for a Google-based JWT: {'iss': 'accounts.google.com', 'sub': '113289723416554971153', 'aud': ['123456789012', 'pubsub.googleapis.com'], 'azp': '123456789012.apps.googleusercontent.com', 'email': 'jsmith@example.com', 'iat': 1353601026, 'exp': 1353604926} SAML assertions are similarly specified, but with an identity provider dependent structure.", +"type": "object" +}, +"presenter": { +"description": "The authorized presenter of the credential. Reflects the optional Authorized Presenter (`azp`) claim within a JWT or the OAuth client id. For example, a Google Cloud Platform client id looks as follows: \"123456789012.apps.googleusercontent.com\".", +"type": "string" +}, +"principal": { +"description": "The authenticated principal. Reflects the issuer (`iss`) and subject (`sub`) claims within a JWT. The issuer and subject should be `/` delimited, with `/` percent-encoded within the subject fragment. For Google accounts, the principal format is: \"https://accounts.google.com/{id}\"", +"type": "string" +} +}, +"type": "object" +}, +"AuthenticationInfo": { +"description": "Authentication information for the operation.", +"id": "AuthenticationInfo", +"properties": { +"authoritySelector": { +"description": "The authority selector specified by the requestor, if any. It is not guaranteed that the principal was allowed to use this authority.", +"type": "string" +}, +"principalEmail": { +"description": "The email address of the authenticated user (or service account on behalf of third party principal) making the request. For third party identity callers, the `principal_subject` field is populated instead of this field. For privacy reasons, the principal email address is sometimes redacted. For more information, see [Caller identities in audit logs](https://cloud.google.com/logging/docs/audit#user-id).", +"type": "string" +}, +"principalSubject": { +"description": "String representation of identity of requesting party. Populated for both first and third party identities.", +"type": "string" +}, +"serviceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by delegating on a service account. When multiple authorities present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.", +"items": { +"$ref": "ServiceAccountDelegationInfo" +}, +"type": "array" +}, +"serviceAccountKeyName": { +"description": "The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: \"//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}\"", +"type": "string" +}, +"serviceDelegationHistory": { +"$ref": "ServiceDelegationHistory", +"description": "Records the history of delegated resource access across Google services." +}, +"thirdPartyPrincipal": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The third party identification (if any) of the authenticated user making the request. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.", +"type": "object" +} +}, +"type": "object" +}, +"AuthorizationInfo": { +"description": "Authorization information for the operation.", +"id": "AuthorizationInfo", +"properties": { +"granted": { +"description": "Whether or not authorization for `resource` and `permission` was granted.", +"type": "boolean" +}, +"permission": { +"description": "The required IAM permission.", +"type": "string" +}, +"permissionType": { +"description": "The type of the permission that was checked. For data access audit logs this corresponds with the permission type that must be enabled in the project/folder/organization IAM policy in order for the log to be written.", +"enum": [ +"PERMISSION_TYPE_UNSPECIFIED", +"ADMIN_READ", +"ADMIN_WRITE", +"DATA_READ", +"DATA_WRITE" +], +"enumDescriptions": [ +"Default. Should not be used.", +"Permissions that gate reading resource configuration or metadata.", +"Permissions that gate modification of resource configuration or metadata.", +"Permissions that gate reading user-provided data.", +"Permissions that gate writing user-provided data." +], +"type": "string" +}, +"resource": { +"description": "The resource being accessed, as a REST-style or cloud resource string. For example: bigquery.googleapis.com/projects/PROJECTID/datasets/DATASETID or projects/PROJECTID/datasets/DATASETID", +"type": "string" +}, +"resourceAttributes": { +"$ref": "Resource", +"description": "Resource attributes used in IAM condition evaluation. This field contains resource attributes like resource type and resource name. To get the whole view of the attributes used in IAM condition evaluation, the user must also look into `AuditLog.request_metadata.request_attributes`." +} +}, +"type": "object" +}, +"CheckRequest": { +"description": "Request message for the Check method.", +"id": "CheckRequest", +"properties": { +"attributes": { +"$ref": "AttributeContext", +"description": "Describes attributes about the operation being executed by the service." +}, +"flags": { +"description": "Optional. Contains a comma-separated list of flags.", +"type": "string" +}, +"resources": { +"description": "Describes the resources and the policies applied to each resource.", +"items": { +"$ref": "ResourceInfo" +}, +"type": "array" +}, +"serviceConfigId": { +"description": "Specifies the version of the service configuration that should be used to process the request. Must not be empty. Set this field to 'latest' to specify using the latest configuration.", +"type": "string" +} +}, +"type": "object" +}, +"CheckResponse": { +"description": "Response message for the Check method.", +"id": "CheckResponse", +"properties": { +"headers": { +"additionalProperties": { +"type": "string" +}, +"description": "Returns a set of request contexts generated from the `CheckRequest`.", +"type": "object" +}, +"status": { +"$ref": "Status", +"description": "Operation is allowed when this field is not set. Any non-'OK' status indicates a denial; google.rpc.Status.details would contain additional details about the denial." +} +}, +"type": "object" +}, +"FirstPartyPrincipal": { +"description": "First party identity principal.", +"id": "FirstPartyPrincipal", +"properties": { +"principalEmail": { +"description": "The email address of a Google account. .", +"type": "string" +}, +"serviceMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Metadata about the service that uses the service account. .", +"type": "object" +} +}, +"type": "object" +}, +"OrgPolicyViolationInfo": { +"description": "Represents OrgPolicy Violation information.", +"id": "OrgPolicyViolationInfo", +"properties": { +"payload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content.", +"type": "object" +}, +"resourceTags": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes.", +"type": "object" +}, +"resourceType": { +"description": "Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket", +"type": "string" +}, +"violationInfo": { +"description": "Optional. Policy violations", +"items": { +"$ref": "ViolationInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"Peer": { +"description": "This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.", +"id": "Peer", +"properties": { +"ip": { +"description": "The IP address of the peer.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels associated with the peer.", +"type": "object" +}, +"port": { +"description": "The network port of the peer.", +"format": "int64", +"type": "string" +}, +"principal": { +"description": "The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.", +"type": "string" +}, +"regionCode": { +"description": "The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running.", +"type": "string" +} +}, +"type": "object" +}, +"PolicyViolationInfo": { +"description": "Information related to policy violations for this request.", +"id": "PolicyViolationInfo", +"properties": { +"orgPolicyViolationInfo": { +"$ref": "OrgPolicyViolationInfo", +"description": "Indicates the orgpolicy violations for this resource." +} +}, +"type": "object" +}, +"ReportRequest": { +"description": "Request message for the Report method.", +"id": "ReportRequest", +"properties": { +"operations": { +"description": "Describes the list of operations to be reported. Each operation is represented as an AttributeContext, and contains all attributes around an API access.", +"items": { +"$ref": "AttributeContext" +}, +"type": "array" +}, +"serviceConfigId": { +"description": "Specifies the version of the service configuration that should be used to process the request. Must not be empty. Set this field to 'latest' to specify using the latest configuration.", +"type": "string" +} +}, +"type": "object" +}, +"ReportResponse": { +"description": "Response message for the Report method.", +"id": "ReportResponse", +"properties": { +"extensions": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The extension field to store serialized OTel responses. e.g. ExportLogsServiceResponse, ExportMetricsServiceResponse.", +"type": "object" +} +}, +"type": "object" +}, +"Request": { +"description": "This message defines attributes for an HTTP request. If the actual request is not an HTTP request, the runtime system should try to map the actual request to an equivalent HTTP request.", +"id": "Request", +"properties": { +"auth": { +"$ref": "Auth", +"description": "The request authentication. May be absent for unauthenticated requests. Derived from the HTTP request `Authorization` header or equivalent." +}, +"headers": { +"additionalProperties": { +"type": "string" +}, +"description": "The HTTP request headers. If multiple headers share the same key, they must be merged according to the HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.", +"type": "object" +}, +"host": { +"description": "The HTTP request `Host` header value.", +"type": "string" +}, +"id": { +"description": "The unique ID for a request, which can be propagated to downstream systems. The ID should have low probability of collision within a single day for a specific service.", +"type": "string" +}, +"method": { +"description": "The HTTP request method, such as `GET`, `POST`.", +"type": "string" +}, +"path": { +"description": "The HTTP URL path, excluding the query parameters.", +"type": "string" +}, +"protocol": { +"description": "The network protocol used with the request, such as \"http/1.1\", \"spdy/3\", \"h2\", \"h2c\", \"webrtc\", \"tcp\", \"udp\", \"quic\". See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for details.", +"type": "string" +}, +"query": { +"description": "The HTTP URL query in the format of `name1=value1&name2=value2`, as it appears in the first line of the HTTP request. No decoding is performed.", +"type": "string" +}, +"reason": { +"description": "A special parameter for request reason. It is used by security systems to associate auditing information with a request.", +"type": "string" +}, +"scheme": { +"description": "The HTTP URL scheme, such as `http` and `https`.", +"type": "string" +}, +"size": { +"description": "The HTTP request size in bytes. If unknown, it must be -1.", +"format": "int64", +"type": "string" +}, +"time": { +"description": "The timestamp when the `destination` service receives the last byte of the request.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RequestMetadata": { +"description": "Metadata about the request.", +"id": "RequestMetadata", +"properties": { +"callerIp": { +"description": "The IP address of the caller. For a caller from the internet, this will be the public IPv4 or IPv6 address. For calls made from inside Google's internal production network from one GCP service to another, `caller_ip` will be redacted to \"private\". For a caller from a Compute Engine VM with a external IP address, `caller_ip` will be the VM's external IP address. For a caller from a Compute Engine VM without a external IP address, if the VM is in the same organization (or project) as the accessed resource, `caller_ip` will be the VM's internal IPv4 address, otherwise `caller_ip` will be redacted to \"gce-internal-ip\". See https://cloud.google.com/compute/docs/vpc/ for more information.", +"type": "string" +}, +"callerNetwork": { +"description": "The network of the caller. Set only if the network host project is part of the same GCP organization (or project) as the accessed resource. See https://cloud.google.com/compute/docs/vpc/ for more information. This is a scheme-less URI full resource name. For example: \"//compute.googleapis.com/projects/PROJECT_ID/global/networks/NETWORK_ID\"", +"type": "string" +}, +"callerSuppliedUserAgent": { +"description": "The user agent of the caller. This information is not authenticated and should be treated accordingly. For example: + `google-api-python-client/1.4.0`: The request was made by the Google API client for Python. + `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`: The request was made by the Google Cloud SDK CLI (gcloud). + `AppEngine-Google; (+http://code.google.com/appengine; appid: s~my-project`: The request was made from the `my-project` App Engine app.", +"type": "string" +}, +"destinationAttributes": { +"$ref": "Peer", +"description": "The destination of a network activity, such as accepting a TCP connection. In a multi hop network activity, the destination represents the receiver of the last hop. Only two fields are used in this message, Peer.port and Peer.ip. These fields are optionally populated by those services utilizing the IAM condition feature." +}, +"requestAttributes": { +"$ref": "Request", +"description": "Request attributes used in IAM condition evaluation. This field contains request attributes like request time and access levels associated with the request. To get the whole view of the attributes used in IAM condition evaluation, the user must also look into `AuditLog.authentication_info.resource_attributes`." +} +}, +"type": "object" +}, +"Resource": { +"description": "This message defines core attributes for a resource. A resource is an addressable (named) entity provided by the destination service. For example, a file stored on a network storage service.", +"id": "Resource", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/", +"type": "object" +}, +"createTime": { +"description": "Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.", +"format": "google-datetime", +"type": "string" +}, +"deleteTime": { +"description": "Output only. The timestamp when the resource was deleted. If the resource is not deleted, this must be empty.", +"format": "google-datetime", +"type": "string" +}, +"displayName": { +"description": "Mutable. The display name set by clients. Must be <= 63 characters.", +"type": "string" +}, +"etag": { +"description": "Output only. An opaque value that uniquely identifies a version or generation of a resource. It can be used to confirm that the client and server agree on the ordering of a resource being written.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels or tags on the resource, such as AWS resource tags and Kubernetes resource labels.", +"type": "object" +}, +"location": { +"description": "Immutable. The location of the resource. The location encoding is specific to the service provider, and new encoding may be introduced as the service evolves. For Google Cloud products, the encoding is what is used by Google Cloud APIs, such as `us-east1`, `aws-us-east-1`, and `azure-eastus2`. The semantics of `location` is identical to the `cloud.googleapis.com/location` label used by some Google Cloud APIs.", +"type": "string" +}, +"name": { +"description": "The stable identifier (name) of a resource on the `service`. A resource can be logically identified as \"//{resource.service}/{resource.name}\". The differences between a resource name and a URI are: * Resource name is a logical identifier, independent of network protocol and API version. For example, `//pubsub.googleapis.com/projects/123/topics/news-feed`. * URI often includes protocol and version information, so it can be used directly by applications. For example, `https://pubsub.googleapis.com/v1/projects/123/topics/news-feed`. See https://cloud.google.com/apis/design/resource_names for details.", +"type": "string" +}, +"service": { +"description": "The name of the service that this resource belongs to, such as `pubsub.googleapis.com`. The service may be different from the DNS hostname that actually serves the request.", +"type": "string" +}, +"type": { +"description": "The type of the resource. The syntax is platform-specific because different platforms define their resources differently. For Google APIs, the type format must be \"{service}/{kind}\", such as \"pubsub.googleapis.com/Topic\".", +"type": "string" +}, +"uid": { +"description": "The unique identifier of the resource. UID is unique in the time and space for this resource within the scope of the service. It is typically generated by the server on successful creation of a resource and must not be changed. UID is used to uniquely identify resources with resource name reuses. This should be a UUID4.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the resource was last updated. Any change to the resource made by users must refresh this value. Changes to a resource made by the service should refresh this value.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ResourceInfo": { +"description": "Describes a resource referenced in the request.", +"id": "ResourceInfo", +"properties": { +"container": { +"description": "Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats: - `projects/` - `folders/` - `organizations/` Required for the policy enforcement on the container level (e.g. VPCSC, Location Policy check, Org Policy check).", +"type": "string" +}, +"location": { +"description": "Optional. The location of the resource, it must be a valid zone, region or multiregion, for example: \"europe-west4\", \"northamerica-northeast1-a\". Required for location policy check.", +"type": "string" +}, +"name": { +"description": "The name of the resource referenced in the request.", +"type": "string" +}, +"permission": { +"description": "The resource permission needed for this request. The format must be \"{service}/{plural}.{verb}\".", +"type": "string" +}, +"type": { +"description": "The resource type in the format of \"{service}/{kind}\".", +"type": "string" +} +}, +"type": "object" +}, +"ResourceLocation": { +"description": "Location information about a resource.", +"id": "ResourceLocation", +"properties": { +"currentLocations": { +"description": "The locations of a resource after the execution of the operation. Requests to create or delete a location based resource must populate the 'current_locations' field and not the 'original_locations' field. For example: \"europe-west1-a\" \"us-east1\" \"nam3\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"originalLocations": { +"description": "The locations of a resource prior to the execution of the operation. Requests that mutate the resource's location must populate both the 'original_locations' as well as the 'current_locations' fields. For example: \"europe-west1-a\" \"us-east1\" \"nam3\"", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Response": { +"description": "This message defines attributes for a typical network response. It generally models semantics of an HTTP response.", +"id": "Response", +"properties": { +"backendLatency": { +"description": "The amount of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.", +"format": "google-duration", +"type": "string" +}, +"code": { +"description": "The HTTP response status code, such as `200` and `404`.", +"format": "int64", +"type": "string" +}, +"headers": { +"additionalProperties": { +"type": "string" +}, +"description": "The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.", +"type": "object" +}, +"size": { +"description": "The HTTP response size in bytes. If unknown, it must be -1.", +"format": "int64", +"type": "string" +}, +"time": { +"description": "The timestamp when the `destination` service sends the last byte of the response.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ServiceAccountDelegationInfo": { +"description": "Identity delegation history of an authenticated service account.", +"id": "ServiceAccountDelegationInfo", +"properties": { +"firstPartyPrincipal": { +"$ref": "FirstPartyPrincipal", +"description": "First party (Google) identity as the real authority." +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]`", +"type": "string" +}, +"thirdPartyPrincipal": { +"$ref": "ThirdPartyPrincipal", +"description": "Third party identity as the real authority." +} +}, +"type": "object" +}, +"ServiceDelegationHistory": { +"description": "The history of delegation across multiple services as the result of the original user's action. Such as \"service A uses its own account to do something for user B\". This differs from ServiceAccountDelegationInfo, which only tracks the history of direct token exchanges (impersonation).", +"id": "ServiceDelegationHistory", +"properties": { +"originalPrincipal": { +"description": "The original end user who initiated the request to GCP.", +"type": "string" +}, +"serviceMetadata": { +"description": "Data identifying the service specific jobs or units of work that were involved in a chain of service calls.", +"items": { +"$ref": "ServiceMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"ServiceMetadata": { +"description": "Metadata describing the service and additional service specific information used to identify the job or unit of work at hand.", +"id": "ServiceMetadata", +"properties": { +"jobMetadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Additional metadata provided by service teams to describe service specific job information that was triggered by the original principal.", +"type": "object" +}, +"principalSubject": { +"description": "A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]` If the identity is a Google account (e.g. workspace user account or service account), this will be the email of the prefixed by `serviceAccount:`. For example: `serviceAccount:my-service-account@project-1.iam.gserviceaccount.com`. If the identity is an individual user, the identity will be formatted as: `user:user_ABC@email.com`.", +"type": "string" +}, +"serviceDomain": { +"description": "The service's fully qualified domain name, e.g. \"dataproc.googleapis.com\".", +"type": "string" +} +}, +"type": "object" +}, +"SpanContext": { +"description": "The context of a span. This is attached to an Exemplar in Distribution values during aggregation. It contains the name of a span with format: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]", +"id": "SpanContext", +"properties": { +"spanName": { +"description": "The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] `[TRACE_ID]` is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. `[SPAN_ID]` is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"ThirdPartyPrincipal": { +"description": "Third party identity principal.", +"id": "ThirdPartyPrincipal", +"properties": { +"thirdPartyClaims": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Metadata about third party identity.", +"type": "object" +} +}, +"type": "object" +}, +"V2HttpRequest": { +"description": "A common proto for logging HTTP requests. Only contains semantics defined by the HTTP specification. Product-specific logging information MUST be defined in a separate message.", +"id": "V2HttpRequest", +"properties": { +"cacheFillBytes": { +"description": "The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.", +"format": "int64", +"type": "string" +}, +"cacheHit": { +"description": "Whether or not an entity was served from cache (with or without validation).", +"type": "boolean" +}, +"cacheLookup": { +"description": "Whether or not a cache lookup was attempted.", +"type": "boolean" +}, +"cacheValidatedWithOriginServer": { +"description": "Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.", +"type": "boolean" +}, +"latency": { +"description": "The request processing latency on the server, from the time the request was received until the response was sent.", +"format": "google-duration", +"type": "string" +}, +"protocol": { +"description": "Protocol used for the request. Examples: \"HTTP/1.1\", \"HTTP/2\", \"websocket\"", +"type": "string" +}, +"referer": { +"description": "The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).", +"type": "string" +}, +"remoteIp": { +"description": "The IP address (IPv4 or IPv6) of the client that issued the HTTP request. Examples: `\"192.168.1.1\"`, `\"FE80::0202:B3FF:FE1E:8329\"`.", +"type": "string" +}, +"requestMethod": { +"description": "The request method. Examples: `\"GET\"`, `\"HEAD\"`, `\"PUT\"`, `\"POST\"`.", +"type": "string" +}, +"requestSize": { +"description": "The size of the HTTP request message in bytes, including the request headers and the request body.", +"format": "int64", +"type": "string" +}, +"requestUrl": { +"description": "The scheme (http, https), the host name, the path, and the query portion of the URL that was requested. Example: `\"http://example.com/some/info?color=red\"`.", +"type": "string" +}, +"responseSize": { +"description": "The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.", +"format": "int64", +"type": "string" +}, +"serverIp": { +"description": "The IP address (IPv4 or IPv6) of the origin server that the request was sent to.", +"type": "string" +}, +"status": { +"description": "The response code indicating the status of the response. Examples: 200, 404.", +"format": "int32", +"type": "integer" +}, +"userAgent": { +"description": "The user agent sent by the client. Example: `\"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)\"`.", +"type": "string" +} +}, +"type": "object" +}, +"V2LogEntry": { +"description": "An individual log entry.", +"id": "V2LogEntry", +"properties": { +"httpRequest": { +"$ref": "V2HttpRequest", +"description": "Optional. Information about the HTTP request associated with this log entry, if applicable." +}, +"insertId": { +"description": "A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A set of user-defined (key, value) data that provides additional information about the log entry.", +"type": "object" +}, +"monitoredResourceLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "A set of user-defined (key, value) data that provides additional information about the moniotored resource that the log entry belongs to.", +"type": "object" +}, +"name": { +"description": "Required. The log to which this log entry belongs. Examples: `\"syslog\"`, `\"book_log\"`.", +"type": "string" +}, +"operation": { +"$ref": "V2LogEntryOperation", +"description": "Optional. Information about an operation associated with the log entry, if applicable." +}, +"protoPayload": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.", +"type": "object" +}, +"severity": { +"description": "The severity of the log entry. The default value is `LogSeverity.DEFAULT`.", +"enum": [ +"DEFAULT", +"DEBUG", +"INFO", +"NOTICE", +"WARNING", +"ERROR", +"CRITICAL", +"ALERT", +"EMERGENCY" +], +"enumDescriptions": [ +"(0) The log entry has no assigned severity level.", +"(100) Debug or trace information.", +"(200) Routine information, such as ongoing status or performance.", +"(300) Normal but significant events, such as start up, shut down, or a configuration change.", +"(400) Warning events might cause problems.", +"(500) Error events are likely to cause problems.", +"(600) Critical events cause more severe problems or outages.", +"(700) A person must take an action immediately.", +"(800) One or more systems are unusable." +], +"type": "string" +}, +"sourceLocation": { +"$ref": "V2LogEntrySourceLocation", +"description": "Optional. Source code location information associated with the log entry, if any." +}, +"structPayload": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The log entry payload, represented as a structure that is expressed as a JSON object.", +"type": "object" +}, +"textPayload": { +"description": "The log entry payload, represented as a Unicode string (UTF-8).", +"type": "string" +}, +"timestamp": { +"description": "The time the event described by the log entry occurred. If omitted, defaults to operation start time.", +"format": "google-datetime", +"type": "string" +}, +"trace": { +"description": "Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to `//tracing.googleapis.com`. Example: `projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824`", +"type": "string" +} +}, +"type": "object" +}, +"V2LogEntryOperation": { +"description": "Additional information about a potentially long-running operation with which a log entry is associated.", +"id": "V2LogEntryOperation", +"properties": { +"first": { +"description": "Optional. Set this to True if this is the first log entry in the operation.", +"type": "boolean" +}, +"id": { +"description": "Optional. An arbitrary operation identifier. Log entries with the same identifier are assumed to be part of the same operation.", +"type": "string" +}, +"last": { +"description": "Optional. Set this to True if this is the last log entry in the operation.", +"type": "boolean" +}, +"producer": { +"description": "Optional. An arbitrary producer identifier. The combination of `id` and `producer` must be globally unique. Examples for `producer`: `\"MyDivision.MyBigCompany.com\"`, `\"github.com/MyProject/MyApplication\"`.", +"type": "string" +} +}, +"type": "object" +}, +"V2LogEntrySourceLocation": { +"description": "Additional information about the source code location that produced the log entry.", +"id": "V2LogEntrySourceLocation", +"properties": { +"file": { +"description": "Optional. Source file name. Depending on the runtime environment, this might be a simple name or a fully-qualified name.", +"type": "string" +}, +"function": { +"description": "Optional. Human-readable name of the function or method being invoked, with optional context such as the class or package name. This information may be used in contexts such as the logs viewer, where a file and line number are less meaningful. The format can vary by language. For example: `qual.if.ied.Class.method` (Java), `dir/package.func` (Go), `function` (Python).", +"type": "string" +}, +"line": { +"description": "Optional. Line within the source file. 1-based; 0 indicates no line number available.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ViolationInfo": { +"description": "Provides information about the Policy violation info for this request.", +"id": "ViolationInfo", +"properties": { +"checkedValue": { +"description": "Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types", +"type": "string" +}, +"constraint": { +"description": "Optional. Constraint name", +"type": "string" +}, +"errorMessage": { +"description": "Optional. Error message that policy is indicating.", +"type": "string" +}, +"policyType": { +"description": "Optional. Indicates the type of the policy.", +"enum": [ +"POLICY_TYPE_UNSPECIFIED", +"BOOLEAN_CONSTRAINT", +"LIST_CONSTRAINT", +"CUSTOM_CONSTRAINT" +], +"enumDescriptions": [ +"Default value. This value should not be used.", +"Indicates boolean policy constraint", +"Indicates list policy constraint", +"Indicates custom policy constraint" +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Control API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicedirectory.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicedirectory.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..896169255c46ae8909d16782100e2d014a662e9a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicedirectory.v1.json @@ -0,0 +1,1253 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://servicedirectory.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Directory", +"description": "Service Directory is a platform for discovering, publishing, and connecting services. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-directory", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "servicedirectory:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://servicedirectory.mtls.googleapis.com/", +"name": "servicedirectory", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"namespaces": { +"methods": { +"create": { +"description": "Creates a namespace, and returns the new namespace.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"namespaceId": { +"description": "Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project and location the namespace will be created in.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/namespaces", +"request": { +"$ref": "Namespace" +}, +"response": { +"$ref": "Namespace" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a namespace. This also deletes all services and endpoints in the namespace.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}", +"httpMethod": "DELETE", +"id": "servicedirectory.projects.locations.namespaces.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the namespace to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a namespace.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the namespace to retrieve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Namespace" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the IAM Policy for a resource (namespace or service only).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}:getIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all namespaces.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name` or `labels.` for map field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `labels.owner` returns namespaces that have a label with the key `owner`, this is the same as `labels:owner` * `labels.owner=sd` returns namespaces that have key/value `owner=sd` * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` returns namespaces that have name that is alphabetically later than the string, so \"namespace-e\" is returned but \"namespace-a\" is not * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have `owner` in label key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that namespace doesn't have a field called \"doesnotexist\". Since the filter does not match any namespaces, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project and location whose namespaces you'd like to list.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/namespaces", +"response": { +"$ref": "ListNamespacesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a namespace.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}", +"httpMethod": "PATCH", +"id": "servicedirectory.projects.locations.namespaces.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name for the namespace in the format `projects/*/locations/*/namespaces/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. List of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Namespace" +}, +"response": { +"$ref": "Namespace" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Policy for a resource (namespace or service only).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}:setIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Tests IAM permissions for a resource (namespace or service only).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}:testIamPermissions", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"services": { +"methods": { +"create": { +"description": "Creates a service, and returns the new service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the namespace this service will belong to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"serviceId": { +"description": "Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/services", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a service. This also deletes all endpoints associated with the service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "DELETE", +"id": "servicedirectory.projects.locations.namespaces.services.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the service to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the service to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the IAM Policy for a resource (namespace or service only).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:getIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all services belonging to a namespace.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name` or `annotations.` for map field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `annotations.owner` returns services that have a annotation with the key `owner`, this is the same as `annotations:owner` * `annotations.protocol=gRPC` returns services that have key/value `protocol=gRPC` * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` returns services that have name that is alphabetically later than the string, so \"service-e\" is returned but \"service-a\" is not * `annotations.owner!=sd AND annotations.foo=bar` returns services that have `owner` in annotation key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that service doesn't have a field called \"doesnotexist\". Since the filter does not match any services, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the namespace whose services you'd like to list.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "PATCH", +"id": "servicedirectory.projects.locations.namespaces.services.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name for the service in the format `projects/*/locations/*/namespaces/*/services/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. List of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resolve": { +"description": "Returns a service and its associated endpoints. Resolving a service is not considered an active developer method.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:resolve", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.resolve", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the service to resolve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:resolve", +"request": { +"$ref": "ResolveServiceRequest" +}, +"response": { +"$ref": "ResolveServiceResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Policy for a resource (namespace or service only).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:setIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Tests IAM permissions for a resource (namespace or service only).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:testIamPermissions", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"endpoints": { +"methods": { +"create": { +"description": "Creates an endpoint, and returns the new endpoint.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"endpointId": { +"description": "Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the service that this endpoint provides.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/endpoints", +"request": { +"$ref": "Endpoint" +}, +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an endpoint.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints/{endpointsId}", +"httpMethod": "DELETE", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the endpoint to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets an endpoint.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints/{endpointsId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the endpoint to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all endpoints.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name`, `address`, `port`, or `annotations.` for map field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `annotations.owner` returns endpoints that have a annotation with the key `owner`, this is the same as `annotations:owner` * `annotations.protocol=gRPC` returns endpoints that have key/value `protocol=gRPC` * `address=192.108.1.105` returns endpoints that have this address * `port>8080` returns endpoints that have port number larger than 8080 * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` returns endpoints that have name that is alphabetically later than the string, so \"endpoint-e\" is returned but \"endpoint-a\" is not * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that have `owner` in annotation key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that endpoint doesn't have a field called \"doesnotexist\". Since the filter does not match any endpoints, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows values: `name`, `address`, `port` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the service whose endpoints you'd like to list.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/endpoints", +"response": { +"$ref": "ListEndpointsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an endpoint.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints/{endpointsId}", +"httpMethod": "PATCH", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name for the endpoint in the format `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. List of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Endpoint" +}, +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +} +} +}, +"revision": "20240305", +"rootUrl": "https://servicedirectory.googleapis.com/", +"schemas": { +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "An individual endpoint that provides a service. The service must already exist to create an endpoint.", +"id": "Endpoint", +"properties": { +"address": { +"description": "Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses like: * `8.8.8` * `8.8.8.8:53` * `test:bad:address` * `[::1]` * `[::1]:8080` Limited to 45 characters.", +"type": "string" +}, +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Annotations for the endpoint. This data can be consumed by service clients. Restrictions: * The entire annotations dictionary may contain up to 512 characters, spread accoss all key-value pairs. Annotations that go beyond this limit are rejected * Valid annotation keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/) Annotations that fails to meet these requirements are rejected. Note: This field is equivalent to the `metadata` field in the v1beta1 API. They have the same syntax and read/write to the same location in Service Directory.", +"type": "object" +}, +"name": { +"description": "Immutable. The resource name for the endpoint in the format `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.", +"type": "string" +}, +"network": { +"description": "Immutable. The Google Compute Engine network (VPC) of the endpoint in the format `projects//locations/global/networks/*`. The project must be specified by project number (project id is rejected). Incorrectly formatted networks are rejected, we also check to make sure that you have the servicedirectory.networks.attach permission on the project specified.", +"type": "string" +}, +"port": { +"description": "Optional. Service Directory rejects values outside of `[0, 65535]`.", +"format": "int32", +"type": "integer" +}, +"uid": { +"description": "Output only. The globally unique identifier of the endpoint in the UUID4 format.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GetIamPolicyRequest": { +"description": "Request message for `GetIamPolicy` method.", +"id": "GetIamPolicyRequest", +"properties": { +"options": { +"$ref": "GetPolicyOptions", +"description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." +} +}, +"type": "object" +}, +"GetPolicyOptions": { +"description": "Encapsulates settings provided to GetIamPolicy.", +"id": "GetPolicyOptions", +"properties": { +"requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListEndpointsResponse": { +"description": "The response message for RegistrationService.ListEndpoints.", +"id": "ListEndpointsResponse", +"properties": { +"endpoints": { +"description": "The list of endpoints.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListNamespacesResponse": { +"description": "The response message for RegistrationService.ListNamespaces.", +"id": "ListNamespacesResponse", +"properties": { +"namespaces": { +"description": "The list of namespaces.", +"items": { +"$ref": "Namespace" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListServicesResponse": { +"description": "The response message for RegistrationService.ListServices.", +"id": "ListServicesResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"services": { +"description": "The list of services.", +"items": { +"$ref": "Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Namespace": { +"description": "A container for services. Namespaces allow administrators to group services together and define permissions for a collection of services.", +"id": "Namespace", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Resource labels associated with this namespace. No more than 64 user labels can be associated with a given resource. Label keys and values can be no longer than 63 characters.", +"type": "object" +}, +"name": { +"description": "Immutable. The resource name for the namespace in the format `projects/*/locations/*/namespaces/*`.", +"type": "string" +}, +"uid": { +"description": "Output only. The globally unique identifier of the namespace in the UUID4 format.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResolveServiceRequest": { +"description": "The request message for LookupService.ResolveService. Looks up a service by its name, returns the service and its endpoints.", +"id": "ResolveServiceRequest", +"properties": { +"endpointFilter": { +"description": "Optional. The filter applied to the endpoints of the resolved service. General `filter` string syntax: ` ()` * `` can be `name`, `address`, `port`, or `annotations.` for map field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `annotations.owner` returns endpoints that have a annotation with the key `owner`, this is the same as `annotations:owner` * `annotations.protocol=gRPC` returns endpoints that have key/value `protocol=gRPC` * `address=192.108.1.105` returns endpoints that have this address * `port>8080` returns endpoints that have port number larger than 8080 * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` returns endpoints that have name that is alphabetically later than the string, so \"endpoint-e\" is returned but \"endpoint-a\" is not * `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` returns the endpoint that has an endpoint_id equal to `ep-1` * `annotations.owner!=sd AND annotations.foo=bar` returns endpoints that have `owner` in annotation key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that endpoint doesn't have a field called \"doesnotexist\". Since the filter does not match any endpoint, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).", +"type": "string" +}, +"maxEndpoints": { +"description": "Optional. The maximum number of endpoints to return. Defaults to 25. Maximum is 100. If a value less than one is specified, the Default is used. If a value greater than the Maximum is specified, the Maximum is used.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResolveServiceResponse": { +"description": "The response message for LookupService.ResolveService.", +"id": "ResolveServiceResponse", +"properties": { +"service": { +"$ref": "Service" +} +}, +"type": "object" +}, +"Service": { +"description": "An individual service. A service contains a name and optional metadata. A service must exist before endpoints can be added to it.", +"id": "Service", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Annotations for the service. This data can be consumed by service clients. Restrictions: * The entire annotations dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Annotations that go beyond this limit are rejected * Valid annotation keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Annotations that fails to meet these requirements are rejected Note: This field is equivalent to the `metadata` field in the v1beta1 API. They have the same syntax and read/write to the same location in Service Directory.", +"type": "object" +}, +"endpoints": { +"description": "Output only. Endpoints associated with this service. Returned on LookupService.ResolveService. Control plane clients should use RegistrationService.ListEndpoints.", +"items": { +"$ref": "Endpoint" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Immutable. The resource name for the service in the format `projects/*/locations/*/namespaces/*/services/*`.", +"type": "string" +}, +"uid": { +"description": "Output only. The globally unique identifier of the service in the UUID4 format.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Directory API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicedirectory.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicedirectory.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..45db0a690f7dd74d0d788e770adf9a6a859cf43d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicedirectory.v1beta1.json @@ -0,0 +1,1377 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://servicedirectory.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Directory", +"description": "Service Directory is a platform for discovering, publishing, and connecting services. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-directory", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "servicedirectory:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://servicedirectory.mtls.googleapis.com/", +"name": "servicedirectory", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"namespaces": { +"methods": { +"create": { +"description": "Creates a namespace, and returns the new namespace.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"namespaceId": { +"description": "Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project and location the namespace will be created in.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/namespaces", +"request": { +"$ref": "Namespace" +}, +"response": { +"$ref": "Namespace" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a namespace. This also deletes all services and endpoints in the namespace.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}", +"httpMethod": "DELETE", +"id": "servicedirectory.projects.locations.namespaces.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the namespace to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a namespace.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the namespace to retrieve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Namespace" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the IAM Policy for a resource", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}:getIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all namespaces.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name`, `labels.` for map field, or `attributes.` for attributes field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `labels.owner` returns namespaces that have a label with the key `owner`, this is the same as `labels:owner` * `labels.owner=sd` returns namespaces that have key/value `owner=sd` * `name>projects/my-project/locations/us-east1/namespaces/namespace-c` returns namespaces that have name that is alphabetically later than the string, so \"namespace-e\" is returned but \"namespace-a\" is not * `labels.owner!=sd AND labels.foo=bar` returns namespaces that have `owner` in label key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that namespace doesn't have a field called \"doesnotexist\". Since the filter does not match any namespaces, it returns no results * `attributes.managed_registration=true` returns namespaces that are managed by a GCP product or service For more information about filtering, see [API Filtering](https://aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project and location whose namespaces you'd like to list.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/namespaces", +"response": { +"$ref": "ListNamespacesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a namespace.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}", +"httpMethod": "PATCH", +"id": "servicedirectory.projects.locations.namespaces.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name for the namespace in the format `projects/*/locations/*/namespaces/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. List of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Namespace" +}, +"response": { +"$ref": "Namespace" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Policy for a resource", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}:setIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Tests IAM permissions for a resource (namespace, service or service workload only).", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}:testIamPermissions", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"services": { +"methods": { +"create": { +"description": "Creates a service, and returns the new service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the namespace this service will belong to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +}, +"serviceId": { +"description": "Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/services", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a service. This also deletes all endpoints associated with the service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "DELETE", +"id": "servicedirectory.projects.locations.namespaces.services.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the service to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the service to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the IAM Policy for a resource", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:getIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all services belonging to a namespace.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name` or `metadata.` for map field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `metadata.owner` returns services that have a metadata with the key `owner`, this is the same as `metadata:owner` * `metadata.protocol=gRPC` returns services that have key/value `protocol=gRPC` * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/service-c` returns services that have name that is alphabetically later than the string, so \"service-e\" is returned but \"service-a\" is not * `metadata.owner!=sd AND metadata.foo=bar` returns services that have `owner` in metadata key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that service doesn't have a field called \"doesnotexist\". Since the filter does not match any services, it returns no results * `attributes.managed_registration=true` returns services that are managed by a GCP product or service For more information about filtering, see [API Filtering](https://aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows value: `name` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the namespace whose services you'd like to list.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}", +"httpMethod": "PATCH", +"id": "servicedirectory.projects.locations.namespaces.services.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name for the service in the format `projects/*/locations/*/namespaces/*/services/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. List of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resolve": { +"description": "Returns a service and its associated endpoints. Resolving a service is not considered an active developer method.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:resolve", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.resolve", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the service to resolve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:resolve", +"request": { +"$ref": "ResolveServiceRequest" +}, +"response": { +"$ref": "ResolveServiceResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Policy for a resource", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:setIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Tests IAM permissions for a resource (namespace, service or service workload only).", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}:testIamPermissions", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"endpoints": { +"methods": { +"create": { +"description": "Creates an endpoint, and returns the new endpoint.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"endpointId": { +"description": "Required. The Resource ID must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the service that this endpoint provides.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/endpoints", +"request": { +"$ref": "Endpoint" +}, +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an endpoint.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints/{endpointsId}", +"httpMethod": "DELETE", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the endpoint to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets an endpoint.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints/{endpointsId}", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the endpoint to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists all endpoints.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints", +"httpMethod": "GET", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter to list results by. General `filter` string syntax: ` ()` * `` can be `name`, `address`, `port`, `metadata.` for map field, or `attributes.` for attributes field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `metadata.owner` returns endpoints that have a metadata with the key `owner`, this is the same as `metadata:owner` * `metadata.protocol=gRPC` returns endpoints that have key/value `protocol=gRPC` * `address=192.108.1.105` returns endpoints that have this address * `port>8080` returns endpoints that have port number larger than 8080 * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` returns endpoints that have name that is alphabetically later than the string, so \"endpoint-e\" is returned but \"endpoint-a\" is not * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have `owner` in metadata key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that endpoint doesn't have a field called \"doesnotexist\". Since the filter does not match any endpoints, it returns no results * `attributes.kubernetes_resource_type=KUBERNETES_RESOURCE_TYPE_CLUSTER_ IP` returns endpoints with the corresponding kubernetes_resource_type For more information about filtering, see [API Filtering](https://aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order to list results by. General `order_by` string syntax: ` () (,)` * `` allows values: `name`, `address`, `port` * `` ascending or descending order by ``. If this is left blank, `asc` is used Note that an empty `order_by` string results in default order, which is order by `name` in ascending order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the service whose endpoints you'd like to list.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/endpoints", +"response": { +"$ref": "ListEndpointsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an endpoint.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/services/{servicesId}/endpoints/{endpointsId}", +"httpMethod": "PATCH", +"id": "servicedirectory.projects.locations.namespaces.services.endpoints.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Immutable. The resource name for the endpoint in the format `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/services/[^/]+/endpoints/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. List of fields to be updated in this request.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Endpoint" +}, +"response": { +"$ref": "Endpoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"workloads": { +"methods": { +"getIamPolicy": { +"description": "Gets the IAM Policy for a resource", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/workloads/{workloadsId}:getIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.workloads.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM Policy for a resource", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/workloads/{workloadsId}:setIamPolicy", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.workloads.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Tests IAM permissions for a resource (namespace, service or service workload only).", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/namespaces/{namespacesId}/workloads/{workloadsId}:testIamPermissions", +"httpMethod": "POST", +"id": "servicedirectory.projects.locations.namespaces.workloads.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/namespaces/[^/]+/workloads/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240305", +"rootUrl": "https://servicedirectory.googleapis.com/", +"schemas": { +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "An individual endpoint that provides a service. The service must already exist to create an endpoint.", +"id": "Endpoint", +"properties": { +"address": { +"description": "Optional. An IPv4 or IPv6 address. Service Directory rejects bad addresses like: * `8.8.8` * `8.8.8.8:53` * `test:bad:address` * `[::1]` * `[::1]:8080` Limited to 45 characters.", +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the endpoint was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Metadata for the endpoint. This data can be consumed by service clients. Restrictions: * The entire metadata dictionary may contain up to 512 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected * Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected Note: This field is equivalent to the `annotations` field in the v1 API. They have the same syntax and read/write to the same location in Service Directory.", +"type": "object" +}, +"name": { +"description": "Immutable. The resource name for the endpoint in the format `projects/*/locations/*/namespaces/*/services/*/endpoints/*`.", +"type": "string" +}, +"network": { +"description": "Immutable. The Google Compute Engine network (VPC) of the endpoint in the format `projects//locations/global/networks/*`. The project must be specified by project number (project id is rejected). Incorrectly formatted networks are rejected, but no other validation is performed on this field (ex. network or project existence, reachability, or permissions).", +"type": "string" +}, +"port": { +"description": "Optional. Service Directory rejects values outside of `[0, 65535]`.", +"format": "int32", +"type": "integer" +}, +"uid": { +"description": "Output only. A globally unique identifier (in UUID4 format) for this endpoint.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the endpoint was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GetIamPolicyRequest": { +"description": "Request message for `GetIamPolicy` method.", +"id": "GetIamPolicyRequest", +"properties": { +"options": { +"$ref": "GetPolicyOptions", +"description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." +} +}, +"type": "object" +}, +"GetPolicyOptions": { +"description": "Encapsulates settings provided to GetIamPolicy.", +"id": "GetPolicyOptions", +"properties": { +"requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ListEndpointsResponse": { +"description": "The response message for RegistrationService.ListEndpoints.", +"id": "ListEndpointsResponse", +"properties": { +"endpoints": { +"description": "The list of endpoints.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListNamespacesResponse": { +"description": "The response message for RegistrationService.ListNamespaces.", +"id": "ListNamespacesResponse", +"properties": { +"namespaces": { +"description": "The list of namespaces.", +"items": { +"$ref": "Namespace" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListServicesResponse": { +"description": "The response message for RegistrationService.ListServices.", +"id": "ListServicesResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"services": { +"description": "The list of services.", +"items": { +"$ref": "Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Namespace": { +"description": "A container for services. Namespaces allow administrators to group services together and define permissions for a collection of services.", +"id": "Namespace", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the namespace was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Resource labels associated with this namespace. No more than 64 user labels can be associated with a given resource. Label keys and values can be no longer than 63 characters.", +"type": "object" +}, +"name": { +"description": "Immutable. The resource name for the namespace in the format `projects/*/locations/*/namespaces/*`.", +"type": "string" +}, +"uid": { +"description": "Output only. A globally unique identifier (in UUID4 format) for this namespace.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the namespace was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResolveServiceRequest": { +"description": "The request message for LookupService.ResolveService. Looks up a service by its name, returns the service and its endpoints.", +"id": "ResolveServiceRequest", +"properties": { +"endpointFilter": { +"description": "Optional. The filter applied to the endpoints of the resolved service. General `filter` string syntax: ` ()` * `` can be `name`, `address`, `port`, or `metadata.` for map field * `` can be `<`, `>`, `<=`, `>=`, `!=`, `=`, `:`. Of which `:` means `HAS`, and is roughly the same as `=` * `` must be the same data type as field * `` can be `AND`, `OR`, `NOT` Examples of valid filters: * `metadata.owner` returns endpoints that have a annotation with the key `owner`, this is the same as `metadata:owner` * `metadata.protocol=gRPC` returns endpoints that have key/value `protocol=gRPC` * `address=192.108.1.105` returns endpoints that have this address * `port>8080` returns endpoints that have port number larger than 8080 * `name>projects/my-project/locations/us-east1/namespaces/my-namespace/services/my-service/endpoints/endpoint-c` returns endpoints that have name that is alphabetically later than the string, so \"endpoint-e\" is returned but \"endpoint-a\" is not * `name=projects/my-project/locations/us-central1/namespaces/my-namespace/services/my-service/endpoints/ep-1` returns the endpoint that has an endpoint_id equal to `ep-1` * `metadata.owner!=sd AND metadata.foo=bar` returns endpoints that have `owner` in annotation key but value is not `sd` AND have key/value `foo=bar` * `doesnotexist.foo=bar` returns an empty list. Note that endpoint doesn't have a field called \"doesnotexist\". Since the filter does not match any endpoint, it returns no results For more information about filtering, see [API Filtering](https://aip.dev/160).", +"type": "string" +}, +"maxEndpoints": { +"description": "Optional. The maximum number of endpoints to return. Defaults to 25. Maximum is 100. If a value less than one is specified, the Default is used. If a value greater than the Maximum is specified, the Maximum is used.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResolveServiceResponse": { +"description": "The response message for LookupService.ResolveService.", +"id": "ResolveServiceResponse", +"properties": { +"service": { +"$ref": "Service" +} +}, +"type": "object" +}, +"Service": { +"description": "An individual service. A service contains a name and optional metadata. A service must exist before endpoints can be added to it.", +"id": "Service", +"properties": { +"createTime": { +"description": "Output only. The timestamp when the service was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endpoints": { +"description": "Output only. Endpoints associated with this service. Returned on LookupService.ResolveService. Control plane clients should use RegistrationService.ListEndpoints.", +"items": { +"$ref": "Endpoint" +}, +"readOnly": true, +"type": "array" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Metadata for the service. This data can be consumed by service clients. Restrictions: * The entire metadata dictionary may contain up to 2000 characters, spread accoss all key-value pairs. Metadata that goes beyond this limit are rejected * Valid metadata keys have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/). Metadata that fails to meet these requirements are rejected Note: This field is equivalent to the `annotations` field in the v1 API. They have the same syntax and read/write to the same location in Service Directory.", +"type": "object" +}, +"name": { +"description": "Immutable. The resource name for the service in the format `projects/*/locations/*/namespaces/*/services/*`.", +"type": "string" +}, +"uid": { +"description": "Output only. A globally unique identifier (in UUID4 format) for this service.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the service was last updated. Note: endpoints being created/deleted/updated within the service are not considered service updates for the purpose of this timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Directory API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicemanagement.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicemanagement.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..563714a2a13393d664fd2a3cb9b054390f319be6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicemanagement.v1.json @@ -0,0 +1,3625 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +}, +"https://www.googleapis.com/auth/service.management": { +"description": "Manage your Google API service configuration" +}, +"https://www.googleapis.com/auth/service.management.readonly": { +"description": "View your Google API service configuration" +} +} +} +}, +"basePath": "", +"baseUrl": "https://servicemanagement.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Management", +"description": "Google Service Management allows service producers to publish their services on Google Cloud Platform so that they can be discovered and used by service consumers.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-management/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "servicemanagement:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://servicemanagement.mtls.googleapis.com/", +"name": "servicemanagement", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "servicemanagement.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Lists service operations that match the specified filter in the request.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "servicemanagement.operations.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "A string for filtering Operations. The following filter fields are supported: * serviceName: Required. Only `=` operator is allowed. * startTime: The time this job was started, in ISO 8601 format. Allowed operators are `>=`, `>`, `<=`, and `<`. * status: Can be `done`, `in_progress`, or `failed`. Allowed operators are `=`, and `!=`. Filter expression supports conjunction (AND) and disjunction (OR) logical operators. However, the serviceName restriction must be at the top-level and can only be combined with other restrictions via the AND logical operator. Examples: * `serviceName={some-service}.googleapis.com` * `serviceName={some-service}.googleapis.com AND startTime>=\"2017-02-01\"` * `serviceName={some-service}.googleapis.com AND status=done` * `serviceName={some-service}.googleapis.com AND (status=done OR startTime>=\"2017-02-01\")`", +"location": "query", +"type": "string" +}, +"name": { +"description": "Not used.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of operations to return. If unspecified, defaults to 50. The maximum value is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"services": { +"methods": { +"create": { +"description": "Creates a new managed service. A managed service is immutable, and is subject to mandatory 30-day data retention. You cannot move a service or recreate it within 30 days after deletion. One producer project can own no more than 500 services. For security and reliability purposes, a production service should be hosted in a dedicated producer project. Operation", +"flatPath": "v1/services", +"httpMethod": "POST", +"id": "servicemanagement.services.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/services", +"request": { +"$ref": "ManagedService" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"delete": { +"description": "Deletes a managed service. This method will change the service to the `Soft-Delete` state for 30 days. Within this period, service producers may call UndeleteService to restore the service. After 30 days, the service will be permanently deleted. Operation", +"flatPath": "v1/services/{serviceName}", +"httpMethod": "DELETE", +"id": "servicemanagement.services.delete", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"generateConfigReport": { +"description": "Generates and returns a report (errors, warnings and changes from existing configurations) associated with GenerateConfigReportRequest.new_value If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will contain a single ChangeReport based on the comparison between GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If GenerateConfigReportRequest.old_value is not specified, this method will compare GenerateConfigReportRequest.new_value with the last pushed service configuration.", +"flatPath": "v1/services:generateConfigReport", +"httpMethod": "POST", +"id": "servicemanagement.services.generateConfigReport", +"parameterOrder": [], +"parameters": {}, +"path": "v1/services:generateConfigReport", +"request": { +"$ref": "GenerateConfigReportRequest" +}, +"response": { +"$ref": "GenerateConfigReportResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"description": "Gets a managed service. Authentication is required unless the service is public.", +"flatPath": "v1/services/{serviceName}", +"httpMethod": "GET", +"id": "servicemanagement.services.get", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "Required. The name of the service. See the `ServiceManager` overview for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}", +"response": { +"$ref": "ManagedService" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"getConfig": { +"description": "Gets a service configuration (version) for a managed service.", +"flatPath": "v1/services/{serviceName}/config", +"httpMethod": "GET", +"id": "servicemanagement.services.getConfig", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"configId": { +"description": "Required. The id of the service configuration resource. This field must be specified for the server to return all fields, including `SourceInfo`.", +"location": "query", +"type": "string" +}, +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies which parts of the Service Config should be returned in the response.", +"enum": [ +"BASIC", +"FULL" +], +"enumDescriptions": [ +"Server response includes all fields except SourceInfo.", +"Server response includes all fields including SourceInfo. SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile' and are only available for configs created using the SubmitConfigSource method." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/services/{serviceName}/config", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/services/{servicesId}:getIamPolicy", +"httpMethod": "POST", +"id": "servicemanagement.services.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"list": { +"description": "Lists managed services. Returns all public services. For authenticated users, also returns all services the calling user has \"servicemanagement.services.get\" permission for.", +"flatPath": "v1/services", +"httpMethod": "GET", +"id": "servicemanagement.services.list", +"parameterOrder": [], +"parameters": { +"consumerId": { +"deprecated": true, +"description": "Include services consumed by the specified consumer. The Google Service Management implementation accepts the following forms: - project:", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The max number of items to include in the response list. Page size is 50 if not specified. Maximum value is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"location": "query", +"type": "string" +}, +"producerProjectId": { +"description": "Include services produced by the specified project.", +"location": "query", +"type": "string" +} +}, +"path": "v1/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/services/{servicesId}:setIamPolicy", +"httpMethod": "POST", +"id": "servicemanagement.services.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/services/{servicesId}:testIamPermissions", +"httpMethod": "POST", +"id": "servicemanagement.services.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"undelete": { +"description": "Revives a previously deleted managed service. The method restores the service using the configuration at the time the service was deleted. The target service must exist and must have been deleted within the last 30 days. Operation", +"flatPath": "v1/services/{serviceName}:undelete", +"httpMethod": "POST", +"id": "servicemanagement.services.undelete", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}:undelete", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +}, +"resources": { +"configs": { +"methods": { +"create": { +"description": "Creates a new service configuration (version) for a managed service. This method only stores the service configuration. To roll out the service configuration to backend systems please call CreateServiceRollout. Only the 100 most recent service configurations and ones referenced by existing rollouts are kept for each service. The rest will be deleted eventually.", +"flatPath": "v1/services/{serviceName}/configs", +"httpMethod": "POST", +"id": "servicemanagement.services.configs.create", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}/configs", +"request": { +"$ref": "Service" +}, +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"description": "Gets a service configuration (version) for a managed service.", +"flatPath": "v1/services/{serviceName}/configs/{configId}", +"httpMethod": "GET", +"id": "servicemanagement.services.configs.get", +"parameterOrder": [ +"serviceName", +"configId" +], +"parameters": { +"configId": { +"description": "Required. The id of the service configuration resource. This field must be specified for the server to return all fields, including `SourceInfo`.", +"location": "path", +"required": true, +"type": "string" +}, +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies which parts of the Service Config should be returned in the response.", +"enum": [ +"BASIC", +"FULL" +], +"enumDescriptions": [ +"Server response includes all fields except SourceInfo.", +"Server response includes all fields including SourceInfo. SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile' and are only available for configs created using the SubmitConfigSource method." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/services/{serviceName}/configs/{configId}", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"list": { +"description": "Lists the history of the service configuration for a managed service, from the newest to the oldest.", +"flatPath": "v1/services/{serviceName}/configs", +"httpMethod": "GET", +"id": "servicemanagement.services.configs.list", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"pageSize": { +"description": "The max number of items to include in the response list. Page size is 50 if not specified. Maximum value is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The token of the page to retrieve.", +"location": "query", +"type": "string" +}, +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}/configs", +"response": { +"$ref": "ListServiceConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"submit": { +"description": "Creates a new service configuration (version) for a managed service based on user-supplied configuration source files (for example: OpenAPI Specification). This method stores the source configurations as well as the generated service configuration. To rollout the service configuration to other services, please call CreateServiceRollout. Only the 100 most recent configuration sources and ones referenced by existing service configurtions are kept for each service. The rest will be deleted eventually. Operation", +"flatPath": "v1/services/{serviceName}/configs:submit", +"httpMethod": "POST", +"id": "servicemanagement.services.configs.submit", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}/configs:submit", +"request": { +"$ref": "SubmitConfigSourceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"consumers": { +"methods": { +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/services/{servicesId}/consumers/{consumersId}:getIamPolicy", +"httpMethod": "POST", +"id": "servicemanagement.services.consumers.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^services/[^/]+/consumers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/services/{servicesId}/consumers/{consumersId}:setIamPolicy", +"httpMethod": "POST", +"id": "servicemanagement.services.consumers.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^services/[^/]+/consumers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/services/{servicesId}/consumers/{consumersId}:testIamPermissions", +"httpMethod": "POST", +"id": "servicemanagement.services.consumers.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^services/[^/]+/consumers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +} +} +}, +"rollouts": { +"methods": { +"create": { +"description": "Creates a new service configuration rollout. Based on rollout, the Google Service Management will roll out the service configurations to different backend services. For example, the logging configuration will be pushed to Google Cloud Logging. Please note that any previous pending and running Rollouts and associated Operations will be automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. Only the 100 most recent (in any state) and the last 10 successful (if not already part of the set of 100 most recent) rollouts are kept for each service. The rest will be deleted eventually. Operation", +"flatPath": "v1/services/{serviceName}/rollouts", +"httpMethod": "POST", +"id": "servicemanagement.services.rollouts.create", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}/rollouts", +"request": { +"$ref": "Rollout" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"description": "Gets a service configuration rollout.", +"flatPath": "v1/services/{serviceName}/rollouts/{rolloutId}", +"httpMethod": "GET", +"id": "servicemanagement.services.rollouts.get", +"parameterOrder": [ +"serviceName", +"rolloutId" +], +"parameters": { +"rolloutId": { +"description": "Required. The id of the rollout resource.", +"location": "path", +"required": true, +"type": "string" +}, +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}/rollouts/{rolloutId}", +"response": { +"$ref": "Rollout" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +}, +"list": { +"description": "Lists the history of the service configuration rollouts for a managed service, from the newest to the oldest.", +"flatPath": "v1/services/{serviceName}/rollouts", +"httpMethod": "GET", +"id": "servicemanagement.services.rollouts.list", +"parameterOrder": [ +"serviceName" +], +"parameters": { +"filter": { +"description": "Required. Use `filter` to return subset of rollouts. The following filters are supported: -- By status. For example, `filter='status=SUCCESS'` -- By strategy. For example, `filter='strategy=TrafficPercentStrategy'`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The max number of items to include in the response list. Page size is 50 if not specified. Maximum value is 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The token of the page to retrieve.", +"location": "query", +"type": "string" +}, +"serviceName": { +"description": "Required. The name of the service. See the [overview](https://cloud.google.com/service-management/overview) for naming requirements. For example: `example.googleapis.com`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/services/{serviceName}/rollouts", +"response": { +"$ref": "ListServiceRolloutsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/service.management", +"https://www.googleapis.com/auth/service.management.readonly" +] +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://servicemanagement.googleapis.com/", +"schemas": { +"Advice": { +"description": "Generated advice about this change, used for providing more information about how a change will affect the existing service.", +"id": "Advice", +"properties": { +"description": { +"description": "Useful description for why this advice was applied and what actions should be taken to mitigate any implied risks.", +"type": "string" +} +}, +"type": "object" +}, +"Api": { +"description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", +"id": "Api", +"properties": { +"methods": { +"description": "The methods of this interface, in unspecified order.", +"items": { +"$ref": "Method" +}, +"type": "array" +}, +"mixins": { +"description": "Included interfaces. See Mixin.", +"items": { +"$ref": "Mixin" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the interface.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "Source context for the protocol buffer service represented by this message." +}, +"syntax": { +"description": "The source syntax of the service.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +}, +"version": { +"description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"AuthProvider": { +"description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthProvider", +"properties": { +"audiences": { +"description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"authorizationUrl": { +"description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", +"type": "string" +}, +"id": { +"description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", +"type": "string" +}, +"issuer": { +"description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", +"type": "string" +}, +"jwksUri": { +"description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", +"type": "string" +}, +"jwtLocations": { +"description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", +"items": { +"$ref": "JwtLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthRequirement": { +"description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthRequirement", +"properties": { +"audiences": { +"description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"providerId": { +"description": "id from authentication provider. Example: provider_id: bookstore_auth", +"type": "string" +} +}, +"type": "object" +}, +"Authentication": { +"description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", +"id": "Authentication", +"properties": { +"providers": { +"description": "Defines a set of authentication providers that a service supports.", +"items": { +"$ref": "AuthProvider" +}, +"type": "array" +}, +"rules": { +"description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "AuthenticationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthenticationRule": { +"description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", +"id": "AuthenticationRule", +"properties": { +"allowWithoutCredential": { +"description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", +"type": "boolean" +}, +"oauth": { +"$ref": "OAuthRequirements", +"description": "The requirements for OAuth credentials." +}, +"requirements": { +"description": "Requirements for additional authentication providers.", +"items": { +"$ref": "AuthRequirement" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Backend": { +"description": "`Backend` defines the backend configuration for a service.", +"id": "Backend", +"properties": { +"rules": { +"description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "BackendRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"BackendRule": { +"description": "A backend rule provides configuration for an individual API element.", +"id": "BackendRule", +"properties": { +"address": { +"description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", +"type": "string" +}, +"deadline": { +"description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", +"format": "double", +"type": "number" +}, +"disableAuth": { +"description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", +"type": "boolean" +}, +"jwtAudience": { +"description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", +"type": "string" +}, +"minDeadline": { +"deprecated": true, +"description": "Deprecated, do not use.", +"format": "double", +"type": "number" +}, +"operationDeadline": { +"description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", +"format": "double", +"type": "number" +}, +"overridesByRequestProtocol": { +"additionalProperties": { +"$ref": "BackendRule" +}, +"description": "The map between request protocol and the backend address.", +"type": "object" +}, +"pathTranslation": { +"enum": [ +"PATH_TRANSLATION_UNSPECIFIED", +"CONSTANT_ADDRESS", +"APPEND_PATH_TO_ADDRESS" +], +"enumDescriptions": [ +"", +"Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe", +"The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" +], +"type": "string" +}, +"protocol": { +"description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", +"type": "string" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Billing": { +"description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", +"id": "Billing", +"properties": { +"consumerDestinations": { +"description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", +"items": { +"$ref": "BillingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"BillingDestination": { +"description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", +"id": "BillingDestination", +"properties": { +"metrics": { +"description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"ChangeReport": { +"description": "Change report associated with a particular service configuration. It contains a list of ConfigChanges based on the comparison between two service configurations.", +"id": "ChangeReport", +"properties": { +"configChanges": { +"description": "List of changes between two service configurations. The changes will be alphabetically sorted based on the identifier of each change. A ConfigChange identifier is a dot separated path to the configuration. Example: visibility.rules[selector='LibraryService.CreateBook'].restriction", +"items": { +"$ref": "ConfigChange" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClientLibrarySettings": { +"description": "Details about how and where to publish client libraries.", +"id": "ClientLibrarySettings", +"properties": { +"cppSettings": { +"$ref": "CppSettings", +"description": "Settings for C++ client libraries." +}, +"dotnetSettings": { +"$ref": "DotnetSettings", +"description": "Settings for .NET client libraries." +}, +"goSettings": { +"$ref": "GoSettings", +"description": "Settings for Go client libraries." +}, +"javaSettings": { +"$ref": "JavaSettings", +"description": "Settings for legacy Java features, supported in the Service YAML." +}, +"launchStage": { +"description": "Launch stage of this version of the API.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"nodeSettings": { +"$ref": "NodeSettings", +"description": "Settings for Node client libraries." +}, +"phpSettings": { +"$ref": "PhpSettings", +"description": "Settings for PHP client libraries." +}, +"pythonSettings": { +"$ref": "PythonSettings", +"description": "Settings for Python client libraries." +}, +"restNumericEnums": { +"description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", +"type": "boolean" +}, +"rubySettings": { +"$ref": "RubySettings", +"description": "Settings for Ruby client libraries." +}, +"version": { +"description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", +"type": "string" +} +}, +"type": "object" +}, +"CommonLanguageSettings": { +"description": "Required information for every language.", +"id": "CommonLanguageSettings", +"properties": { +"destinations": { +"description": "The destination where API teams want this client library to be published.", +"items": { +"enum": [ +"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", +"GITHUB", +"PACKAGE_MANAGER" +], +"enumDescriptions": [ +"Client libraries will neither be generated nor published to package managers.", +"Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", +"Publish the library to package managers like nuget.org and npmjs.com." +], +"type": "string" +}, +"type": "array" +}, +"referenceDocsUri": { +"deprecated": true, +"description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", +"type": "string" +} +}, +"type": "object" +}, +"ConfigChange": { +"description": "Output generated from semantically comparing two versions of a service configuration. Includes detailed information about a field that have changed with applicable advice about potential consequences for the change, such as backwards-incompatibility.", +"id": "ConfigChange", +"properties": { +"advices": { +"description": "Collection of advice provided for this change, useful for determining the possible impact of this change.", +"items": { +"$ref": "Advice" +}, +"type": "array" +}, +"changeType": { +"description": "The type for this change, either ADDED, REMOVED, or MODIFIED.", +"enum": [ +"CHANGE_TYPE_UNSPECIFIED", +"ADDED", +"REMOVED", +"MODIFIED" +], +"enumDescriptions": [ +"No value was provided.", +"The changed object exists in the 'new' service configuration, but not in the 'old' service configuration.", +"The changed object exists in the 'old' service configuration, but not in the 'new' service configuration.", +"The changed object exists in both service configurations, but its value is different." +], +"type": "string" +}, +"element": { +"description": "Object hierarchy path to the change, with levels separated by a '.' character. For repeated fields, an applicable unique identifier field is used for the index (usually selector, name, or id). For maps, the term 'key' is used. If the field has no unique identifier, the numeric index is used. Examples: - visibility.rules[selector==\"google.LibraryService.ListBooks\"].restriction - quota.metric_rules[selector==\"google\"].metric_costs[key==\"reads\"].value - logging.producer_destinations[0]", +"type": "string" +}, +"newValue": { +"description": "Value of the changed object in the new Service configuration, in JSON format. This field will not be populated if ChangeType == REMOVED.", +"type": "string" +}, +"oldValue": { +"description": "Value of the changed object in the old Service configuration, in JSON format. This field will not be populated if ChangeType == ADDED.", +"type": "string" +} +}, +"type": "object" +}, +"ConfigFile": { +"description": "Generic specification of a source configuration file", +"id": "ConfigFile", +"properties": { +"fileContents": { +"description": "The bytes that constitute the file.", +"format": "byte", +"type": "string" +}, +"filePath": { +"description": "The file name of the configuration file (full or relative path).", +"type": "string" +}, +"fileType": { +"description": "The type of configuration file this represents.", +"enum": [ +"FILE_TYPE_UNSPECIFIED", +"SERVICE_CONFIG_YAML", +"OPEN_API_JSON", +"OPEN_API_YAML", +"FILE_DESCRIPTOR_SET_PROTO", +"PROTO_FILE" +], +"enumDescriptions": [ +"Unknown file type.", +"YAML-specification of service.", +"OpenAPI specification, serialized in JSON.", +"OpenAPI specification, serialized in YAML.", +"FileDescriptorSet, generated by protoc. To generate, use protoc with imports and source info included. For an example test.proto file, the following command would put the value in a new file named out.pb. $protoc --include_imports --include_source_info test.proto -o out.pb", +"Uncompiled Proto file. Used for storage and display purposes only, currently server-side compilation is not supported. Should match the inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A file of this type can only be included if at least one file of type FILE_DESCRIPTOR_SET_PROTO is included." +], +"type": "string" +} +}, +"type": "object" +}, +"ConfigRef": { +"description": "Represents a service configuration with its name and id.", +"id": "ConfigRef", +"properties": { +"name": { +"description": "Resource name of a service config. It must have the following format: \"services/{service name}/configs/{config id}\".", +"type": "string" +} +}, +"type": "object" +}, +"ConfigSource": { +"description": "Represents a source file which is used to generate the service configuration defined by `google.api.Service`.", +"id": "ConfigSource", +"properties": { +"files": { +"description": "Set of source configuration files that are used to generate a service configuration (`google.api.Service`).", +"items": { +"$ref": "ConfigFile" +}, +"type": "array" +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. If empty, the server may choose to generate one instead.", +"type": "string" +} +}, +"type": "object" +}, +"Context": { +"description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using \u201cx-goog-ext--bin\u201d and \u201cx-goog-ext--jspb\u201d format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", +"id": "Context", +"properties": { +"rules": { +"description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "ContextRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContextRule": { +"description": "A context rule provides information about the context for an individual API element.", +"id": "ContextRule", +"properties": { +"allowedRequestExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowedResponseExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", +"items": { +"type": "string" +}, +"type": "array" +}, +"provided": { +"description": "A list of full type names of provided contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requested": { +"description": "A list of full type names of requested contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Control": { +"description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", +"id": "Control", +"properties": { +"environment": { +"description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", +"type": "string" +}, +"methodPolicies": { +"description": "Defines policies applying to the API methods of the service.", +"items": { +"$ref": "MethodPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"CppSettings": { +"description": "Settings for C++ client libraries.", +"id": "CppSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"CustomError": { +"description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", +"id": "CustomError", +"properties": { +"rules": { +"description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "CustomErrorRule" +}, +"type": "array" +}, +"types": { +"description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CustomErrorRule": { +"description": "A custom error rule.", +"id": "CustomErrorRule", +"properties": { +"isErrorType": { +"description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", +"type": "boolean" +}, +"selector": { +"description": "Selects messages to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"CustomHttpPattern": { +"description": "A custom pattern is used for defining custom HTTP verb.", +"id": "CustomHttpPattern", +"properties": { +"kind": { +"description": "The name of this custom HTTP verb.", +"type": "string" +}, +"path": { +"description": "The path matched by this custom verb.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteServiceStrategy": { +"description": "Strategy used to delete a service. This strategy is a placeholder only used by the system generated rollout to delete a service.", +"id": "DeleteServiceStrategy", +"properties": {}, +"type": "object" +}, +"Diagnostic": { +"description": "Represents a diagnostic message (error or warning)", +"id": "Diagnostic", +"properties": { +"kind": { +"description": "The kind of diagnostic information provided.", +"enum": [ +"WARNING", +"ERROR" +], +"enumDescriptions": [ +"Warnings and errors", +"Only errors" +], +"type": "string" +}, +"location": { +"description": "File name and line number of the error or warning.", +"type": "string" +}, +"message": { +"description": "Message describing the error or warning.", +"type": "string" +} +}, +"type": "object" +}, +"Documentation": { +"description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", +"id": "Documentation", +"properties": { +"documentationRootUrl": { +"description": "The URL to the root of documentation.", +"type": "string" +}, +"overview": { +"description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", +"type": "string" +}, +"pages": { +"description": "The top level pages for the documentation set.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"rules": { +"description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "DocumentationRule" +}, +"type": "array" +}, +"sectionOverrides": { +"description": "Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"serviceRootUrl": { +"description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", +"type": "string" +}, +"summary": { +"description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentationRule": { +"description": "A documentation rule provides information about individual API elements.", +"id": "DocumentationRule", +"properties": { +"deprecationDescription": { +"description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", +"type": "string" +}, +"description": { +"description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.", +"type": "string" +}, +"disableReplacementWords": { +"description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.", +"type": "string" +}, +"selector": { +"description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", +"type": "string" +} +}, +"type": "object" +}, +"DotnetSettings": { +"description": "Settings for Dotnet client libraries.", +"id": "DotnetSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"forcedNamespaceAliases": { +"description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", +"items": { +"type": "string" +}, +"type": "array" +}, +"handwrittenSignatures": { +"description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoredResources": { +"description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"renamedResources": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", +"type": "object" +}, +"renamedServices": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", +"type": "object" +} +}, +"type": "object" +}, +"EnableServiceResponse": { +"description": "Operation payload for EnableService method.", +"id": "EnableServiceResponse", +"properties": {}, +"type": "object" +}, +"Endpoint": { +"description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", +"id": "Endpoint", +"properties": { +"aliases": { +"deprecated": true, +"description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowCors": { +"description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", +"type": "boolean" +}, +"name": { +"description": "The canonical name of this endpoint.", +"type": "string" +}, +"target": { +"description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", +"type": "string" +} +}, +"type": "object" +}, +"Enum": { +"description": "Enum type definition.", +"id": "Enum", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"enumvalue": { +"description": "Enum value definitions.", +"items": { +"$ref": "EnumValue" +}, +"type": "array" +}, +"name": { +"description": "Enum type name.", +"type": "string" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"EnumValue": { +"description": "Enum value definition.", +"id": "EnumValue", +"properties": { +"name": { +"description": "Enum value name.", +"type": "string" +}, +"number": { +"description": "Enum value number.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FieldPolicy": { +"description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", +"id": "FieldPolicy", +"properties": { +"resourcePermission": { +"description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", +"type": "string" +}, +"resourceType": { +"description": "Specifies the resource type for the resource referred to by the field.", +"type": "string" +}, +"selector": { +"description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", +"type": "string" +} +}, +"type": "object" +}, +"FlowErrorDetails": { +"description": "Encapsulation of flow-specific error details for debugging. Used as a details field on an error Status, not intended for external use.", +"id": "FlowErrorDetails", +"properties": { +"exceptionType": { +"description": "The type of exception (as a class name).", +"type": "string" +}, +"flowStepId": { +"description": "The step that failed.", +"type": "string" +} +}, +"type": "object" +}, +"GenerateConfigReportRequest": { +"description": "Request message for GenerateConfigReport method.", +"id": "GenerateConfigReportRequest", +"properties": { +"newConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Required. Service configuration for which we want to generate the report. For this version of API, the supported types are google.api.servicemanagement.v1.ConfigRef, google.api.servicemanagement.v1.ConfigSource, and google.api.Service", +"type": "object" +}, +"oldConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Optional. Service configuration against which the comparison will be done. For this version of API, the supported types are google.api.servicemanagement.v1.ConfigRef, google.api.servicemanagement.v1.ConfigSource, and google.api.Service", +"type": "object" +} +}, +"type": "object" +}, +"GenerateConfigReportResponse": { +"description": "Response message for GenerateConfigReport method.", +"id": "GenerateConfigReportResponse", +"properties": { +"changeReports": { +"description": "list of ChangeReport, each corresponding to comparison between two service configurations.", +"items": { +"$ref": "ChangeReport" +}, +"type": "array" +}, +"diagnostics": { +"description": "Errors / Linter warnings associated with the service definition this report belongs to.", +"items": { +"$ref": "Diagnostic" +}, +"type": "array" +}, +"id": { +"description": "ID of the service configuration this report belongs to.", +"type": "string" +}, +"serviceName": { +"description": "Name of the service this report belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"GetIamPolicyRequest": { +"description": "Request message for `GetIamPolicy` method.", +"id": "GetIamPolicyRequest", +"properties": { +"options": { +"$ref": "GetPolicyOptions", +"description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." +} +}, +"type": "object" +}, +"GetPolicyOptions": { +"description": "Encapsulates settings provided to GetIamPolicy.", +"id": "GetPolicyOptions", +"properties": { +"requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoSettings": { +"description": "Settings for Go client libraries.", +"id": "GoSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Http": { +"description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", +"id": "Http", +"properties": { +"fullyDecodeReservedExpansion": { +"description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", +"type": "boolean" +}, +"rules": { +"description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRule": { +"description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A¶m=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", +"id": "HttpRule", +"properties": { +"additionalBindings": { +"description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +}, +"body": { +"description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", +"type": "string" +}, +"custom": { +"$ref": "CustomHttpPattern", +"description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." +}, +"delete": { +"description": "Maps to HTTP DELETE. Used for deleting a resource.", +"type": "string" +}, +"get": { +"description": "Maps to HTTP GET. Used for listing and getting information about resources.", +"type": "string" +}, +"patch": { +"description": "Maps to HTTP PATCH. Used for updating a resource.", +"type": "string" +}, +"post": { +"description": "Maps to HTTP POST. Used for creating a resource or performing an action.", +"type": "string" +}, +"put": { +"description": "Maps to HTTP PUT. Used for replacing a resource.", +"type": "string" +}, +"responseBody": { +"description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", +"type": "string" +}, +"selector": { +"description": "Selects a method to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"JavaSettings": { +"description": "Settings for Java client libraries.", +"id": "JavaSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"libraryPackage": { +"description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", +"type": "string" +}, +"serviceClassNames": { +"additionalProperties": { +"type": "string" +}, +"description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", +"type": "object" +} +}, +"type": "object" +}, +"JwtLocation": { +"description": "Specifies a location to extract JWT from an API request.", +"id": "JwtLocation", +"properties": { +"cookie": { +"description": "Specifies cookie name to extract JWT token.", +"type": "string" +}, +"header": { +"description": "Specifies HTTP header name to extract JWT token.", +"type": "string" +}, +"query": { +"description": "Specifies URL query parameter name to extract JWT token.", +"type": "string" +}, +"valuePrefix": { +"description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The label key.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string. This is the default.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceConfigsResponse": { +"description": "Response message for ListServiceConfigs method.", +"id": "ListServiceConfigsResponse", +"properties": { +"nextPageToken": { +"description": "The token of the next page of results.", +"type": "string" +}, +"serviceConfigs": { +"description": "The list of service configuration resources.", +"items": { +"$ref": "Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServiceRolloutsResponse": { +"description": "Response message for ListServiceRollouts method.", +"id": "ListServiceRolloutsResponse", +"properties": { +"nextPageToken": { +"description": "The token of the next page of results.", +"type": "string" +}, +"rollouts": { +"description": "The list of rollout resources.", +"items": { +"$ref": "Rollout" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServicesResponse": { +"description": "Response message for `ListServices` method.", +"id": "ListServicesResponse", +"properties": { +"nextPageToken": { +"description": "Token that can be passed to `ListServices` to resume a paginated query.", +"type": "string" +}, +"services": { +"description": "The returned services will only have the name field set.", +"items": { +"$ref": "ManagedService" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogDescriptor": { +"description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", +"id": "LogDescriptor", +"properties": { +"description": { +"description": "A human-readable description of this log. This information appears in the documentation and can contain details.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name for this log. This information appears on the user interface and should be concise.", +"type": "string" +}, +"labels": { +"description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"name": { +"description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", +"type": "string" +} +}, +"type": "object" +}, +"Logging": { +"description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", +"id": "Logging", +"properties": { +"consumerDestinations": { +"description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingDestination": { +"description": "Configuration of a specific logging destination (the producer project or the consumer project).", +"id": "LoggingDestination", +"properties": { +"logs": { +"description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"LongRunning": { +"description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", +"id": "LongRunning", +"properties": { +"initialPollDelay": { +"description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", +"format": "google-duration", +"type": "string" +}, +"maxPollDelay": { +"description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", +"format": "google-duration", +"type": "string" +}, +"pollDelayMultiplier": { +"description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", +"format": "float", +"type": "number" +}, +"totalPollTimeout": { +"description": "Total polling timeout. Default value: 5 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"ManagedService": { +"description": "The full representation of a Service that is managed by Google Service Management.", +"id": "ManagedService", +"properties": { +"producerProjectId": { +"description": "ID of the project that produces and owns this service.", +"type": "string" +}, +"serviceName": { +"description": "The name of the service. See the [overview](https://cloud.google.com/service-infrastructure/docs/overview) for naming requirements.", +"type": "string" +} +}, +"type": "object" +}, +"Method": { +"description": "Method represents a method of an API interface.", +"id": "Method", +"properties": { +"name": { +"description": "The simple name of this method.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the method.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"requestStreaming": { +"description": "If true, the request is streamed.", +"type": "boolean" +}, +"requestTypeUrl": { +"description": "A URL of the input message type.", +"type": "string" +}, +"responseStreaming": { +"description": "If true, the response is streamed.", +"type": "boolean" +}, +"responseTypeUrl": { +"description": "The URL of the output message type.", +"type": "string" +}, +"syntax": { +"description": "The source syntax of this method.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"MethodPolicy": { +"description": "Defines policies applying to an RPC method.", +"id": "MethodPolicy", +"properties": { +"requestPolicies": { +"description": "Policies that are applicable to the request message.", +"items": { +"$ref": "FieldPolicy" +}, +"type": "array" +}, +"selector": { +"description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", +"type": "string" +} +}, +"type": "object" +}, +"MethodSettings": { +"description": "Describes the generator configuration for a method.", +"id": "MethodSettings", +"properties": { +"autoPopulatedFields": { +"description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", +"items": { +"type": "string" +}, +"type": "array" +}, +"longRunning": { +"$ref": "LongRunning", +"description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" +}, +"selector": { +"description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a `Distribution`.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRule": { +"description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", +"id": "MetricRule", +"properties": { +"metricCosts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", +"type": "object" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Mixin": { +"description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", +"id": "Mixin", +"properties": { +"name": { +"description": "The fully qualified name of the interface which is included.", +"type": "string" +}, +"root": { +"description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"Monitoring": { +"description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", +"id": "Monitoring", +"properties": { +"consumerDestinations": { +"description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonitoringDestination": { +"description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", +"id": "MonitoringDestination", +"properties": { +"metrics": { +"description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"NodeSettings": { +"description": "Settings for Node client libraries.", +"id": "NodeSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"OAuthRequirements": { +"description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", +"id": "OAuthRequirements", +"properties": { +"canonicalScopes": { +"description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationInfo": { +"description": "A message representing the message types used by a long-running operation. Example: rpc Export(ExportRequest) returns (google.longrunning.Operation) { option (google.longrunning.operation_info) = { response_type: \"ExportResponse\" metadata_type: \"ExportMetadata\" }; }", +"id": "OperationInfo", +"properties": { +"metadataType": { +"description": "Required. The message name of the metadata type for this long-running operation. If the response is in a different package from the rpc, a fully-qualified message name must be used (e.g. `google.protobuf.Struct`). Note: Altering this value constitutes a breaking change.", +"type": "string" +}, +"responseType": { +"description": "Required. The message name of the primary return type for this long-running operation. This type will be used to deserialize the LRO's response. If the response is in a different package from the rpc, a fully-qualified message name must be used (e.g. `google.protobuf.Struct`). Note: Altering this value constitutes a breaking change.", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "The metadata associated with a long running operation resource.", +"id": "OperationMetadata", +"properties": { +"progressPercentage": { +"description": "Percentage of completion of this operation, ranging from 0 to 100.", +"format": "int32", +"type": "integer" +}, +"resourceNames": { +"description": "The full name of the resources that this operation is directly associated with.", +"items": { +"type": "string" +}, +"type": "array" +}, +"startTime": { +"description": "The start time of the operation.", +"format": "google-datetime", +"type": "string" +}, +"steps": { +"description": "Detailed status information for each step. The order is undetermined.", +"items": { +"$ref": "Step" +}, +"type": "array" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"Page": { +"description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", +"id": "Page", +"properties": { +"content": { +"description": "The Markdown content of the page. You can use (== include {path} ==) to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", +"type": "string" +}, +"name": { +"description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", +"type": "string" +}, +"subpages": { +"description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", +"items": { +"$ref": "Page" +}, +"type": "array" +} +}, +"type": "object" +}, +"PhpSettings": { +"description": "Settings for Php client libraries.", +"id": "PhpSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Publishing": { +"description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", +"id": "Publishing", +"properties": { +"apiShortName": { +"description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", +"type": "string" +}, +"codeownerGithubTeams": { +"description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", +"items": { +"type": "string" +}, +"type": "array" +}, +"docTagPrefix": { +"description": "A prefix used in sample code when demarking regions to be included in documentation.", +"type": "string" +}, +"documentationUri": { +"description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", +"type": "string" +}, +"githubLabel": { +"description": "GitHub label to apply to issues and pull requests opened for this API.", +"type": "string" +}, +"librarySettings": { +"description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", +"items": { +"$ref": "ClientLibrarySettings" +}, +"type": "array" +}, +"methodSettings": { +"description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", +"items": { +"$ref": "MethodSettings" +}, +"type": "array" +}, +"newIssueUri": { +"description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103", +"type": "string" +}, +"organization": { +"description": "For whom the client library is being published.", +"enum": [ +"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", +"CLOUD", +"ADS", +"PHOTOS", +"STREET_VIEW", +"SHOPPING", +"GEO", +"GENERATIVE_AI" +], +"enumDescriptions": [ +"Not useful.", +"Google Cloud Platform Org.", +"Ads (Advertising) Org.", +"Photos Org.", +"Street View Org.", +"Shopping Org.", +"Geo Org.", +"Generative AI - https://developers.generativeai.google" +], +"type": "string" +}, +"protoReferenceDocumentationUri": { +"description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", +"type": "string" +}, +"restReferenceDocumentationUri": { +"description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", +"type": "string" +} +}, +"type": "object" +}, +"PythonSettings": { +"description": "Settings for Python client libraries.", +"id": "PythonSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Quota": { +"description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", +"id": "Quota", +"properties": { +"limits": { +"description": "List of QuotaLimit definitions for the service.", +"items": { +"$ref": "QuotaLimit" +}, +"type": "array" +}, +"metricRules": { +"description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", +"items": { +"$ref": "MetricRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaLimit": { +"description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", +"id": "QuotaLimit", +"properties": { +"defaultLimit": { +"description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"description": { +"description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", +"type": "string" +}, +"displayName": { +"description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", +"type": "string" +}, +"duration": { +"description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", +"type": "string" +}, +"freeTier": { +"description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"maxLimit": { +"description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"metric": { +"description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", +"type": "string" +}, +"name": { +"description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", +"type": "string" +}, +"unit": { +"description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", +"type": "string" +}, +"values": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", +"type": "object" +} +}, +"type": "object" +}, +"ResourceReference": { +"description": "Defines a proto annotation that describes a string field that refers to an API resource.", +"id": "ResourceReference", +"properties": { +"childType": { +"description": "The resource type of a child collection that the annotated field references. This is useful for annotating the `parent` field that doesn't have a fixed resource type. Example: message ListLogEntriesRequest { string parent = 1 [(google.api.resource_reference) = { child_type: \"logging.googleapis.com/LogEntry\" }; }", +"type": "string" +}, +"type": { +"description": "The resource type that the annotated field references. Example: message Subscription { string topic = 2 [(google.api.resource_reference) = { type: \"pubsub.googleapis.com/Topic\" }]; } Occasionally, a field may reference an arbitrary resource. In this case, APIs use the special value * in their resource reference. Example: message GetIamPolicyRequest { string resource = 2 [(google.api.resource_reference) = { type: \"*\" }]; }", +"type": "string" +} +}, +"type": "object" +}, +"Rollout": { +"description": "A rollout resource that defines how service configuration versions are pushed to control plane systems. Typically, you create a new version of the service config, and then create a Rollout to push the service config.", +"id": "Rollout", +"properties": { +"createTime": { +"description": "Creation time of the rollout. Readonly.", +"format": "google-datetime", +"type": "string" +}, +"createdBy": { +"description": "The user who created the Rollout. Readonly.", +"type": "string" +}, +"deleteServiceStrategy": { +"$ref": "DeleteServiceStrategy", +"description": "The strategy associated with a rollout to delete a `ManagedService`. Readonly." +}, +"rolloutId": { +"description": "Optional. Unique identifier of this Rollout. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If not specified by client, the server will generate one. The generated id will have the form of , where \"date\" is the create date in ISO 8601 format. \"revision number\" is a monotonically increasing positive number that is reset every day for each service. An example of the generated rollout_id is '2016-02-16r1'", +"type": "string" +}, +"serviceName": { +"description": "The name of the service associated with this Rollout.", +"type": "string" +}, +"status": { +"description": "The status of this rollout. Readonly. In case of a failed rollout, the system will automatically rollback to the current Rollout version. Readonly.", +"enum": [ +"ROLLOUT_STATUS_UNSPECIFIED", +"IN_PROGRESS", +"SUCCESS", +"CANCELLED", +"FAILED", +"PENDING", +"FAILED_ROLLED_BACK" +], +"enumDescriptions": [ +"No status specified.", +"The Rollout is in progress.", +"The Rollout has completed successfully.", +"The Rollout has been cancelled. This can happen if you have overlapping Rollout pushes, and the previous ones will be cancelled.", +"The Rollout has failed and the rollback attempt has failed too.", +"The Rollout has not started yet and is pending for execution.", +"The Rollout has failed and rolled back to the previous successful Rollout." +], +"type": "string" +}, +"trafficPercentStrategy": { +"$ref": "TrafficPercentStrategy", +"description": "Google Service Control selects service configurations based on traffic percentage." +} +}, +"type": "object" +}, +"RubySettings": { +"description": "Settings for Ruby client libraries.", +"id": "RubySettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Service": { +"description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", +"id": "Service", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration." +}, +"backend": { +"$ref": "Backend", +"description": "API backend configuration." +}, +"billing": { +"$ref": "Billing", +"description": "Billing configuration." +}, +"configVersion": { +"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", +"format": "uint32", +"type": "integer" +}, +"context": { +"$ref": "Context", +"description": "Context configuration." +}, +"control": { +"$ref": "Control", +"description": "Configuration for the service control plane." +}, +"customError": { +"$ref": "CustomError", +"description": "Custom error configuration." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation." +}, +"endpoints": { +"description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"enums": { +"description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", +"items": { +"$ref": "Enum" +}, +"type": "array" +}, +"http": { +"$ref": "Http", +"description": "HTTP configuration." +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", +"type": "string" +}, +"logging": { +"$ref": "Logging", +"description": "Logging configuration." +}, +"logs": { +"description": "Defines the logs used by this service.", +"items": { +"$ref": "LogDescriptor" +}, +"type": "array" +}, +"metrics": { +"description": "Defines the metrics used by this service.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration." +}, +"name": { +"description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", +"type": "string" +}, +"producerProjectId": { +"description": "The Google project that owns this service.", +"type": "string" +}, +"publishing": { +"$ref": "Publishing", +"description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"sourceInfo": { +"$ref": "SourceInfo", +"description": "Output only. The source information for this configuration if available." +}, +"systemParameters": { +"$ref": "SystemParameters", +"description": "System parameter configuration." +}, +"systemTypes": { +"description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"title": { +"description": "The product title for this service, it is the name displayed in Google Cloud Console.", +"type": "string" +}, +"types": { +"description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"SourceContext": { +"description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", +"type": "string" +} +}, +"type": "object" +}, +"SourceInfo": { +"description": "Source information used to create a Service Config", +"id": "SourceInfo", +"properties": { +"sourceFiles": { +"description": "All files used during config generation.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Step": { +"description": "Represents the status of one operation step.", +"id": "Step", +"properties": { +"description": { +"description": "The short description of the step.", +"type": "string" +}, +"status": { +"description": "The status code.", +"enum": [ +"STATUS_UNSPECIFIED", +"DONE", +"NOT_STARTED", +"IN_PROGRESS", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Unspecifed code.", +"The operation or step has completed without errors.", +"The operation or step has not started yet.", +"The operation or step is in progress.", +"The operation or step has completed with errors. If the operation is rollbackable, the rollback completed with errors too.", +"The operation or step has completed with cancellation." +], +"type": "string" +} +}, +"type": "object" +}, +"SubmitConfigSourceRequest": { +"description": "Request message for SubmitConfigSource method.", +"id": "SubmitConfigSourceRequest", +"properties": { +"configSource": { +"$ref": "ConfigSource", +"description": "Required. The source configuration for the service." +}, +"validateOnly": { +"description": "Optional. If set, this will result in the generation of a `google.api.Service` configuration based on the `ConfigSource` provided, but the generated config and the sources will NOT be persisted.", +"type": "boolean" +} +}, +"type": "object" +}, +"SubmitConfigSourceResponse": { +"description": "Response message for SubmitConfigSource method.", +"id": "SubmitConfigSourceResponse", +"properties": { +"serviceConfig": { +"$ref": "Service", +"description": "The generated service configuration." +} +}, +"type": "object" +}, +"SystemParameter": { +"description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", +"id": "SystemParameter", +"properties": { +"httpHeader": { +"description": "Define the HTTP header name to use for the parameter. It is case insensitive.", +"type": "string" +}, +"name": { +"description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", +"type": "string" +}, +"urlQueryParameter": { +"description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameterRule": { +"description": "Define a system parameter rule mapping system parameter definitions to methods.", +"id": "SystemParameterRule", +"properties": { +"parameters": { +"description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", +"items": { +"$ref": "SystemParameter" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameters": { +"description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", +"id": "SystemParameters", +"properties": { +"rules": { +"description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "SystemParameterRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TrafficPercentStrategy": { +"description": "Strategy that specifies how clients of Google Service Controller want to send traffic to use different config versions. This is generally used by API proxy to split traffic based on your configured percentage for each config version. One example of how to gradually rollout a new service configuration using this strategy: Day 1 Rollout { id: \"example.googleapis.com/rollout_20160206\" traffic_percent_strategy { percentages: { \"example.googleapis.com/20160201\": 70.00 \"example.googleapis.com/20160206\": 30.00 } } } Day 2 Rollout { id: \"example.googleapis.com/rollout_20160207\" traffic_percent_strategy: { percentages: { \"example.googleapis.com/20160206\": 100.00 } } }", +"id": "TrafficPercentStrategy", +"properties": { +"percentages": { +"additionalProperties": { +"format": "double", +"type": "number" +}, +"description": "Maps service configuration IDs to their corresponding traffic percentage. Key is the service configuration ID, Value is the traffic percentage which must be greater than 0.0 and the sum must equal to 100.0.", +"type": "object" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in `oneof` definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"UndeleteServiceResponse": { +"description": "Response message for UndeleteService method.", +"id": "UndeleteServiceResponse", +"properties": { +"service": { +"$ref": "ManagedService", +"description": "Revived service resource." +} +}, +"type": "object" +}, +"Usage": { +"description": "Configuration controlling usage of a service.", +"id": "Usage", +"properties": { +"producerNotificationChannel": { +"description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", +"type": "string" +}, +"requirements": { +"description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rules": { +"description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "UsageRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"UsageRule": { +"description": "Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: \"*\" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allow_unregistered_calls: true", +"id": "UsageRule", +"properties": { +"allowUnregisteredCalls": { +"description": "If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.", +"type": "boolean" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +}, +"skipServiceControl": { +"description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Management API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicenetworking.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicenetworking.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..1d3e447e7cf19aa4d3090cbb47c1027fea80df1e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicenetworking.v1.json @@ -0,0 +1,4110 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/service.management": { +"description": "Manage your Google API service configuration" +} +} +} +}, +"basePath": "", +"baseUrl": "https://servicenetworking.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Networking", +"description": "Provides automatic management of network configurations necessary for certain services.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "servicenetworking:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://servicenetworking.mtls.googleapis.com/", +"name": "servicenetworking", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "servicenetworking.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "servicenetworking.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "servicenetworking.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "servicenetworking.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"services": { +"methods": { +"addSubnetwork": { +"description": "For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed.", +"flatPath": "v1/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork", +"httpMethod": "POST", +"id": "servicenetworking.services.addSubnetwork", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. A tenant project in the service producer organization, in the following format: services/{service}/{collection-id}/{resource-id}. {collection-id} is the cloud resource collection type that represents the tenant project. Only `projects` are supported. {resource-id} is the tenant project numeric id, such as `123456`. {service} the name of the peering service, such as `service-peering.example.com`. This service must already be enabled in the service consumer's project.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:addSubnetwork", +"request": { +"$ref": "AddSubnetworkRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"disableVpcServiceControls": { +"description": "Disables VPC service controls for a connection.", +"flatPath": "v1/services/{servicesId}:disableVpcServiceControls", +"httpMethod": "PATCH", +"id": "servicenetworking.services.disableVpcServiceControls", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:disableVpcServiceControls", +"request": { +"$ref": "DisableVpcServiceControlsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"enableVpcServiceControls": { +"description": "Enables VPC service controls for a connection.", +"flatPath": "v1/services/{servicesId}:enableVpcServiceControls", +"httpMethod": "PATCH", +"id": "servicenetworking.services.enableVpcServiceControls", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:enableVpcServiceControls", +"request": { +"$ref": "EnableVpcServiceControlsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"searchRange": { +"description": "Service producers can use this method to find a currently unused range within consumer allocated ranges. This returned range is not reserved, and not guaranteed to remain unused. It will validate previously provided allocated ranges, find non-conflicting sub-range of requested size (expressed in number of leading bits of ipv4 network mask, as in CIDR range notation).", +"flatPath": "v1/services/{servicesId}:searchRange", +"httpMethod": "POST", +"id": "servicenetworking.services.searchRange", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. This is in a form services/{service}. {service} the name of the private access management service, for example 'service-peering.example.com'.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:searchRange", +"request": { +"$ref": "SearchRangeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"validate": { +"description": "Service producers use this method to validate if the consumer provided network, project and requested range are valid. This allows them to use a fail-fast mechanism for consumer requests, and not have to wait for AddSubnetwork operation completion to determine if user request is invalid.", +"flatPath": "v1/services/{servicesId}:validate", +"httpMethod": "POST", +"id": "servicenetworking.services.validate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. This is in a form services/{service} where {service} is the name of the private access management service. For example 'service-peering.example.com'.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:validate", +"request": { +"$ref": "ValidateConsumerConfigRequest" +}, +"response": { +"$ref": "ValidateConsumerConfigResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +}, +"resources": { +"connections": { +"methods": { +"create": { +"description": "Creates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. The administrator of the service consumer's VPC network invokes this method. The administrator must assign one or more allocated IP ranges for provisioning subnetworks in the service producer's VPC network. This connection is used for all supported services in the service producer's organization, so it only needs to be invoked once.", +"flatPath": "v1/services/{servicesId}/connections", +"httpMethod": "POST", +"id": "servicenetworking.services.connections.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/connections", +"request": { +"$ref": "Connection" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"deleteConnection": { +"description": "Deletes a private service access connection.", +"flatPath": "v1/services/{servicesId}/connections/{connectionsId}", +"httpMethod": "POST", +"id": "servicenetworking.services.connections.deleteConnection", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name}/connections/{vpc_peering_name}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.", +"location": "path", +"pattern": "^services/[^/]+/connections/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "DeleteConnectionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "List the private connections that are configured in a service consumer's VPC network.", +"flatPath": "v1/services/{servicesId}/connections", +"httpMethod": "GET", +"id": "servicenetworking.services.connections.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"network": { +"description": "The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project}/global/networks/{network}`. {project} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network} is the name of the service consumer's VPC network.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `services/-` as the parameter value, all configured peering services are listed.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/connections", +"response": { +"$ref": "ListConnectionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"patch": { +"description": "Updates the allocated ranges that are assigned to a connection.", +"flatPath": "v1/services/{servicesId}/connections/{connectionsId}", +"httpMethod": "PATCH", +"id": "servicenetworking.services.connections.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "If a previously defined allocated range is removed, force flag must be set to true.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "The private service connection that connects to a service producer organization. The name includes both the private service name and the VPC network peering name in the format of `services/{peering_service_name}/connections/{vpc_peering_name}`. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com/connections/servicenetworking-googleapis-com`.", +"location": "path", +"pattern": "^services/[^/]+/connections/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The update mask. If this is omitted, it defaults to \"*\". You can only update the listed peering ranges.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Connection" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"dnsRecordSets": { +"methods": { +"add": { +"description": "Service producers can use this method to add DNS record sets to private DNS zones in the shared producer host project.", +"flatPath": "v1/services/{servicesId}/dnsRecordSets:add", +"httpMethod": "POST", +"id": "servicenetworking.services.dnsRecordSets.add", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/dnsRecordSets:add", +"request": { +"$ref": "AddDnsRecordSetRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"description": "Producers can use this method to retrieve information about the DNS record set added to the private zone inside the shared tenant host project associated with a consumer network.", +"flatPath": "v1/services/{servicesId}/dnsRecordSets:get", +"httpMethod": "GET", +"id": "servicenetworking.services.dnsRecordSets.get", +"parameterOrder": [ +"parent" +], +"parameters": { +"consumerNetwork": { +"description": "Required. The consumer network containing the record set. Must be in the form of projects/{project}/global/networks/{network}", +"location": "query", +"type": "string" +}, +"domain": { +"description": "Required. The domain name of the zone containing the recordset.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service}.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +}, +"type": { +"description": "Required. RecordSet Type eg. type='A'. See the list of [Supported DNS Types](https://cloud.google.com/dns/records/json-record).", +"location": "query", +"type": "string" +}, +"zone": { +"description": "Required. The name of the zone containing the record set.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/dnsRecordSets:get", +"response": { +"$ref": "DnsRecordSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Producers can use this method to retrieve a list of available DNS RecordSets available inside the private zone on the tenant host project accessible from their network.", +"flatPath": "v1/services/{servicesId}/dnsRecordSets:list", +"httpMethod": "GET", +"id": "servicenetworking.services.dnsRecordSets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +}, +"zone": { +"description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/dnsRecordSets:list", +"response": { +"$ref": "ListDnsRecordSetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"remove": { +"description": "Service producers can use this method to remove DNS record sets from private DNS zones in the shared producer host project.", +"flatPath": "v1/services/{servicesId}/dnsRecordSets:remove", +"httpMethod": "POST", +"id": "servicenetworking.services.dnsRecordSets.remove", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/dnsRecordSets:remove", +"request": { +"$ref": "RemoveDnsRecordSetRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"update": { +"description": "Service producers can use this method to update DNS record sets from private DNS zones in the shared producer host project.", +"flatPath": "v1/services/{servicesId}/dnsRecordSets:update", +"httpMethod": "POST", +"id": "servicenetworking.services.dnsRecordSets.update", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/dnsRecordSets:update", +"request": { +"$ref": "UpdateDnsRecordSetRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"dnsZones": { +"methods": { +"add": { +"description": "Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.", +"flatPath": "v1/services/{servicesId}/dnsZones:add", +"httpMethod": "POST", +"id": "servicenetworking.services.dnsZones.add", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/dnsZones:add", +"request": { +"$ref": "AddDnsZoneRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"remove": { +"description": "Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project.", +"flatPath": "v1/services/{servicesId}/dnsZones:remove", +"httpMethod": "POST", +"id": "servicenetworking.services.dnsZones.remove", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/dnsZones:remove", +"request": { +"$ref": "RemoveDnsZoneRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"projects": { +"resources": { +"global": { +"resources": { +"networks": { +"methods": { +"get": { +"description": "Service producers use this method to get the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}", +"httpMethod": "GET", +"id": "servicenetworking.services.projects.global.networks.get", +"parameterOrder": [ +"name" +], +"parameters": { +"includeUsedIpRanges": { +"description": "Optional. When true, include the used IP ranges as part of the GetConsumerConfig output. This includes routes created inside the service networking network, consumer network, peers of the consumer network, and reserved ranges inside the service networking network. By default, this is false", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. Name of the consumer config to retrieve in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ConsumerConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"getVpcServiceControls": { +"description": "Consumers use this method to find out the state of VPC Service Controls. The controls could be enabled or disabled for a connection.", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/vpcServiceControls", +"httpMethod": "GET", +"id": "servicenetworking.services.projects.global.networks.getVpcServiceControls", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the VPC Service Controls config to retrieve in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/vpcServiceControls", +"response": { +"$ref": "VpcServiceControls" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"updateConsumerConfig": { +"description": "Service producers use this method to update the configuration of their connection including the import/export of custom routes and subnetwork routes with public IP.", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}:updateConsumerConfig", +"httpMethod": "PATCH", +"id": "servicenetworking.services.projects.global.networks.updateConsumerConfig", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource identifying the connection for which the consumer config is being updated in the format: `services/{service}/projects/{project}/global/networks/{network}` {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network.", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:updateConsumerConfig", +"request": { +"$ref": "UpdateConsumerConfigRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +}, +"resources": { +"dnsZones": { +"methods": { +"get": { +"description": "Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/dnsZones/{dnsZonesId}", +"httpMethod": "GET", +"id": "servicenetworking.services.projects.global.networks.dnsZones.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of services/{service}/projects/{project}/global/networks/{network}/zones/{zoneName} Where {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this {project} is the project number, as in '12345' {network} is the network name. {zoneName} is the DNS zone name", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+/dnsZones/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GetDnsZoneResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "* Service producers can use this method to retrieve a list of available DNS zones in the shared producer host project and the matching peering zones in the consumer project. *", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/dnsZones:list", +"httpMethod": "GET", +"id": "servicenetworking.services.projects.global.networks.dnsZones.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource identifying the connection which owns this collection of DNS zones in the format services/{service}/projects/{project}/global/networks/{network} Service: The service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. Projects: the consumer project containing the consumer network. Network: The consumer network accessible from the tenant project.", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/dnsZones:list", +"response": { +"$ref": "ListDnsZonesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"peeredDnsDomains": { +"methods": { +"create": { +"description": "Creates a peered DNS domain which sends requests for records in given namespace originating in the service producer VPC network to the consumer VPC network to be resolved.", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains", +"httpMethod": "POST", +"id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource identifying the connection for which the peered DNS domain will be created in the format: `services/{service}/projects/{project}/global/networks/{network}` {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network.", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/peeredDnsDomains", +"request": { +"$ref": "PeeredDnsDomain" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"delete": { +"description": "Deletes a peered DNS domain.", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains/{peeredDnsDomainsId}", +"httpMethod": "DELETE", +"id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the peered DNS domain to delete in the format: `services/{service}/projects/{project}/global/networks/{network}/peeredDnsDomains/{name}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is the number of the project that contains the service consumer's VPC network e.g. `12345`. {network} is the name of the service consumer's VPC network. {name} is the name of the peered DNS domain.", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+/peeredDnsDomains/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Lists peered DNS domains for a connection.", +"flatPath": "v1/services/{servicesId}/projects/{projectsId}/global/networks/{networksId}/peeredDnsDomains", +"httpMethod": "GET", +"id": "servicenetworking.services.projects.global.networks.peeredDnsDomains.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource identifying the connection which owns this collection of peered DNS domains in the format: `services/{service}/projects/{project}/global/networks/{network}`. {service} is the peering service that is managing connectivity for the service producer's organization. For Google services that support this functionality, this value is `servicenetworking.googleapis.com`. {project} is a project number e.g. `12345` that contains the service consumer's VPC network. {network} is the name of the service consumer's VPC network.", +"location": "path", +"pattern": "^services/[^/]+/projects/[^/]+/global/networks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/peeredDnsDomains", +"response": { +"$ref": "ListPeeredDnsDomainsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +} +} +} +} +} +} +}, +"roles": { +"methods": { +"add": { +"description": "Service producers can use this method to add roles in the shared VPC host project. Each role is bound to the provided member. Each role must be selected from within an allowlisted set of roles. Each role is applied at only the granularity specified in the allowlist.", +"flatPath": "v1/services/{servicesId}/roles:add", +"httpMethod": "POST", +"id": "servicenetworking.services.roles.add", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. This is in a form services/{service} where {service} is the name of the private access management service. For example 'service-peering.example.com'.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/roles:add", +"request": { +"$ref": "AddRolesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://servicenetworking.googleapis.com/", +"schemas": { +"AddDnsRecordSetMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by AddDnsRecordSet API", +"id": "AddDnsRecordSetMetadata", +"properties": {}, +"type": "object" +}, +"AddDnsRecordSetRequest": { +"description": "Request to add a record set to a private managed DNS zone in the shared producer host project.", +"id": "AddDnsRecordSetRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", +"type": "string" +}, +"dnsRecordSet": { +"$ref": "DnsRecordSet", +"description": "Required. The DNS record set to add." +}, +"zone": { +"description": "Required. The name of the private DNS zone in the shared producer host project to which the record set will be added.", +"type": "string" +} +}, +"type": "object" +}, +"AddDnsZoneMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by AddDnsZone API", +"id": "AddDnsZoneMetadata", +"properties": {}, +"type": "object" +}, +"AddDnsZoneRequest": { +"description": "Request to add a private managed DNS zone in the shared producer host project and a matching DNS peering zone in the consumer project.", +"id": "AddDnsZoneRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", +"type": "string" +}, +"dnsSuffix": { +"description": "Required. The DNS name suffix for the zones e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", +"type": "string" +}, +"name": { +"description": "Required. The name for both the private zone in the shared producer host project and the peering zone in the consumer project. Must be unique within both projects. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", +"type": "string" +} +}, +"type": "object" +}, +"AddDnsZoneResponse": { +"description": "Represents managed DNS zones created in the shared producer host and consumer projects.", +"id": "AddDnsZoneResponse", +"properties": { +"consumerPeeringZone": { +"$ref": "DnsZone", +"description": "The DNS peering zone created in the consumer project." +}, +"producerPrivateZone": { +"$ref": "DnsZone", +"description": "The private DNS zone created in the shared producer host project." +} +}, +"type": "object" +}, +"AddRolesMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by AddRoles API", +"id": "AddRolesMetadata", +"properties": {}, +"type": "object" +}, +"AddRolesRequest": { +"description": "Request for AddRoles to allow Service Producers to add roles in the shared VPC host project for them to use.", +"id": "AddRolesRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is a network name.", +"type": "string" +}, +"policyBinding": { +"description": "Required. List of policy bindings to add to shared VPC host project.", +"items": { +"$ref": "PolicyBinding" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddRolesResponse": { +"description": "Represents IAM roles added to the shared VPC host project.", +"id": "AddRolesResponse", +"properties": { +"policyBinding": { +"description": "Required. List of policy bindings that were added to the shared VPC host project.", +"items": { +"$ref": "PolicyBinding" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddSubnetworkRequest": { +"description": "Request to create a subnetwork in a previously peered service network.", +"id": "AddSubnetworkRequest", +"properties": { +"allowSubnetCidrRoutesOverlap": { +"description": "Optional. Defines the allowSubnetCidrRoutesOverlap field of the subnet, e.g. Available in alpha and beta according to [Compute API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/subnetworks/insert)", +"type": "boolean" +}, +"checkServiceNetworkingUsePermission": { +"description": "Optional. The IAM permission check determines whether the consumer project has 'servicenetworking.services.use' permission or not.", +"type": "boolean" +}, +"computeIdempotencyWindow": { +"description": "Optional. Specifies a custom time bucket for Arcus subnetwork request idempotency. If two equivalent concurrent requests are made, Arcus will know to ignore the request if it has already been completed or is in progress. Only requests with matching compute_idempotency_window have guaranteed idempotency. Changing this time window between requests results in undefined behavior. Zero (or empty) value with custom_compute_idempotency_window=true specifies no idempotency (i.e. no request ID is provided to Arcus). Maximum value of 14 days (enforced by Arcus limit). For more information on how to use, see: go/revisit-sn-idempotency-window", +"format": "google-duration", +"type": "string" +}, +"consumer": { +"description": "Required. A resource that represents the service consumer, such as `projects/123456`. The project number can be different from the value in the consumer network parameter. For example, the network might be part of a Shared VPC network. In those cases, Service Networking validates that this resource belongs to that Shared VPC.", +"type": "string" +}, +"consumerNetwork": { +"description": "Required. The name of the service consumer's VPC network. The network must have an existing private connection that was provisioned through the connections.create method. The name must be in the following format: `projects/{project}/global/networks/{network}`, where {project} is a project number, such as `12345`. {network} is the name of a VPC network in the project.", +"type": "string" +}, +"description": { +"description": "Optional. Description of the subnet.", +"type": "string" +}, +"internalRange": { +"description": "Optional. The url of an Internal Range. Eg: `projects//locations/global/internalRanges/`. If specified, it means that the subnetwork cidr will be created using the combination of requested_address/ip_prefix_length. Note that the subnet cidr has to be within the cidr range of this Internal Range.", +"type": "string" +}, +"ipPrefixLength": { +"description": "Required. The prefix length of the subnet's IP address range. Use CIDR range notation, such as `29` to provision a subnet with an `x.x.x.x/29` CIDR range. The IP address range is drawn from a pool of available ranges in the service consumer's allocated range. GCE disallows subnets with prefix_length > 29", +"format": "int32", +"type": "integer" +}, +"outsideAllocationPublicIpRange": { +"description": "Optional. Enable outside allocation using public IP addresses. Any public IP range may be specified. If this field is provided, we will not use customer reserved ranges for this primary IP range.", +"type": "string" +}, +"privateIpv6GoogleAccess": { +"description": "Optional. The private IPv6 google access type for the VMs in this subnet. For information about the access types that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", +"type": "string" +}, +"purpose": { +"description": "Optional. Defines the purpose field of the subnet, e.g. 'PRIVATE_SERVICE_CONNECT'. For information about the purposes that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", +"type": "string" +}, +"region": { +"description": "Required. The name of a [region](/compute/docs/regions-zones) for the subnet, such `europe-west1`.", +"type": "string" +}, +"requestedAddress": { +"description": "Optional. The starting address of a range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix range is the CIDR range for the subnet. The range must be within the allocated range that is assigned to the private connection. If the CIDR range isn't available, the call fails.", +"type": "string" +}, +"requestedRanges": { +"description": "Optional. The name of one or more allocated IP address ranges associated with this private service access connection. If no range names are provided all ranges associated with this connection will be considered. If a CIDR range with the specified IP prefix length is not available within these ranges, the call fails.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Optional. Defines the role field of the subnet, e.g. 'ACTIVE'. For information about the roles that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", +"type": "string" +}, +"secondaryIpRangeSpecs": { +"description": "Optional. A list of secondary IP ranges to be created within the new subnetwork.", +"items": { +"$ref": "SecondaryIpRangeSpec" +}, +"type": "array" +}, +"subnetwork": { +"description": "Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", +"type": "string" +}, +"subnetworkUsers": { +"description": "A list of members that are granted the `roles/servicenetworking.subnetworkAdmin` role on the subnet.", +"items": { +"type": "string" +}, +"type": "array" +}, +"useCustomComputeIdempotencyWindow": { +"description": "Optional. Specifies if Service Networking should use a custom time bucket for Arcus idempotency. If false, Service Networking uses a 300 second (5 minute) Arcus idempotency window. If true, Service Networking uses a custom idempotency window provided by the user in field compute_idempotency_window. For more information on how to use, see: go/revisit-sn-idempotency-window", +"type": "boolean" +} +}, +"type": "object" +}, +"Api": { +"description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", +"id": "Api", +"properties": { +"methods": { +"description": "The methods of this interface, in unspecified order.", +"items": { +"$ref": "Method" +}, +"type": "array" +}, +"mixins": { +"description": "Included interfaces. See Mixin.", +"items": { +"$ref": "Mixin" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the interface.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "Source context for the protocol buffer service represented by this message." +}, +"syntax": { +"description": "The source syntax of the service.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +}, +"version": { +"description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", +"type": "string" +} +}, +"type": "object" +}, +"AuthProvider": { +"description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthProvider", +"properties": { +"audiences": { +"description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"authorizationUrl": { +"description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", +"type": "string" +}, +"id": { +"description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", +"type": "string" +}, +"issuer": { +"description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", +"type": "string" +}, +"jwksUri": { +"description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", +"type": "string" +}, +"jwtLocations": { +"description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", +"items": { +"$ref": "JwtLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthRequirement": { +"description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthRequirement", +"properties": { +"audiences": { +"description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"providerId": { +"description": "id from authentication provider. Example: provider_id: bookstore_auth", +"type": "string" +} +}, +"type": "object" +}, +"Authentication": { +"description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", +"id": "Authentication", +"properties": { +"providers": { +"description": "Defines a set of authentication providers that a service supports.", +"items": { +"$ref": "AuthProvider" +}, +"type": "array" +}, +"rules": { +"description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "AuthenticationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthenticationRule": { +"description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", +"id": "AuthenticationRule", +"properties": { +"allowWithoutCredential": { +"description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", +"type": "boolean" +}, +"oauth": { +"$ref": "OAuthRequirements", +"description": "The requirements for OAuth credentials." +}, +"requirements": { +"description": "Requirements for additional authentication providers.", +"items": { +"$ref": "AuthRequirement" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Backend": { +"description": "`Backend` defines the backend configuration for a service.", +"id": "Backend", +"properties": { +"rules": { +"description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "BackendRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"BackendRule": { +"description": "A backend rule provides configuration for an individual API element.", +"id": "BackendRule", +"properties": { +"address": { +"description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", +"type": "string" +}, +"deadline": { +"description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", +"format": "double", +"type": "number" +}, +"disableAuth": { +"description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", +"type": "boolean" +}, +"jwtAudience": { +"description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", +"type": "string" +}, +"minDeadline": { +"deprecated": true, +"description": "Deprecated, do not use.", +"format": "double", +"type": "number" +}, +"operationDeadline": { +"description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", +"format": "double", +"type": "number" +}, +"overridesByRequestProtocol": { +"additionalProperties": { +"$ref": "BackendRule" +}, +"description": "The map between request protocol and the backend address.", +"type": "object" +}, +"pathTranslation": { +"enum": [ +"PATH_TRANSLATION_UNSPECIFIED", +"CONSTANT_ADDRESS", +"APPEND_PATH_TO_ADDRESS" +], +"enumDescriptions": [ +"", +"Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe", +"The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" +], +"type": "string" +}, +"protocol": { +"description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", +"type": "string" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Billing": { +"description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", +"id": "Billing", +"properties": { +"consumerDestinations": { +"description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", +"items": { +"$ref": "BillingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"BillingDestination": { +"description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", +"id": "BillingDestination", +"properties": { +"metrics": { +"description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"ClientLibrarySettings": { +"description": "Details about how and where to publish client libraries.", +"id": "ClientLibrarySettings", +"properties": { +"cppSettings": { +"$ref": "CppSettings", +"description": "Settings for C++ client libraries." +}, +"dotnetSettings": { +"$ref": "DotnetSettings", +"description": "Settings for .NET client libraries." +}, +"goSettings": { +"$ref": "GoSettings", +"description": "Settings for Go client libraries." +}, +"javaSettings": { +"$ref": "JavaSettings", +"description": "Settings for legacy Java features, supported in the Service YAML." +}, +"launchStage": { +"description": "Launch stage of this version of the API.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"nodeSettings": { +"$ref": "NodeSettings", +"description": "Settings for Node client libraries." +}, +"phpSettings": { +"$ref": "PhpSettings", +"description": "Settings for PHP client libraries." +}, +"pythonSettings": { +"$ref": "PythonSettings", +"description": "Settings for Python client libraries." +}, +"restNumericEnums": { +"description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", +"type": "boolean" +}, +"rubySettings": { +"$ref": "RubySettings", +"description": "Settings for Ruby client libraries." +}, +"version": { +"description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", +"type": "string" +} +}, +"type": "object" +}, +"CloudSQLConfig": { +"description": "Cloud SQL configuration.", +"id": "CloudSQLConfig", +"properties": { +"service": { +"description": "Peering service used for peering with the Cloud SQL project.", +"type": "string" +}, +"umbrellaNetwork": { +"description": "The name of the umbrella network in the Cloud SQL umbrella project.", +"type": "string" +}, +"umbrellaProject": { +"description": "The project number of the Cloud SQL umbrella project.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CommonLanguageSettings": { +"description": "Required information for every language.", +"id": "CommonLanguageSettings", +"properties": { +"destinations": { +"description": "The destination where API teams want this client library to be published.", +"items": { +"enum": [ +"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", +"GITHUB", +"PACKAGE_MANAGER" +], +"enumDescriptions": [ +"Client libraries will neither be generated nor published to package managers.", +"Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", +"Publish the library to package managers like nuget.org and npmjs.com." +], +"type": "string" +}, +"type": "array" +}, +"referenceDocsUri": { +"deprecated": true, +"description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", +"type": "string" +} +}, +"type": "object" +}, +"Connection": { +"description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", +"id": "Connection", +"properties": { +"network": { +"description": "The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is the name of the service consumer's VPC network.", +"type": "string" +}, +"peering": { +"description": "Output only. The name of the VPC Network Peering connection that was created by the service producer.", +"readOnly": true, +"type": "string" +}, +"reservedPeeringRanges": { +"description": "The name of one or more allocated IP address ranges for this service producer of type `PEERING`. Note that invoking CreateConnection method with a different range when connection is already established will not modify already provisioned service producer subnetworks. If CreateConnection method is invoked repeatedly to reconnect when peering connection had been disconnected on the consumer side, leaving this field empty will restore previously allocated IP ranges.", +"items": { +"type": "string" +}, +"type": "array" +}, +"service": { +"description": "Output only. The name of the peering service that's associated with this connection, in the following format: `services/{service name}`.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ConsumerConfig": { +"description": "Configuration information for a private service access connection.", +"id": "ConsumerConfig", +"properties": { +"cloudsqlConfigs": { +"description": "Represents one or multiple Cloud SQL configurations.", +"items": { +"$ref": "CloudSQLConfig" +}, +"type": "array" +}, +"consumerExportCustomRoutes": { +"description": "Export custom routes flag value for peering from consumer to producer.", +"type": "boolean" +}, +"consumerExportSubnetRoutesWithPublicIp": { +"description": "Export subnet routes with public ip flag value for peering from consumer to producer.", +"type": "boolean" +}, +"consumerImportCustomRoutes": { +"description": "Import custom routes flag value for peering from consumer to producer.", +"type": "boolean" +}, +"consumerImportSubnetRoutesWithPublicIp": { +"description": "Import subnet routes with public ip flag value for peering from consumer to producer.", +"type": "boolean" +}, +"producerExportCustomRoutes": { +"description": "Export custom routes flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerExportSubnetRoutesWithPublicIp": { +"description": "Export subnet routes with public ip flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerImportCustomRoutes": { +"description": "Import custom routes flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerImportSubnetRoutesWithPublicIp": { +"description": "Import subnet routes with public ip flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerNetwork": { +"description": "Output only. The VPC host network that is used to host managed service instances. In the format, projects/{project}/global/networks/{network} where {project} is the project number e.g. '12345' and {network} is the network name.", +"readOnly": true, +"type": "string" +}, +"reservedRanges": { +"description": "Output only. The reserved ranges associated with this private service access connection.", +"items": { +"$ref": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange" +}, +"readOnly": true, +"type": "array" +}, +"usedIpRanges": { +"description": "Output only. The IP ranges already in use by consumer or producer", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"vpcScReferenceArchitectureEnabled": { +"description": "Output only. Indicates whether the VPC Service Controls reference architecture is configured for the producer VPC host network.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"ConsumerConfigMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by UpdateConsumerConfig API.", +"id": "ConsumerConfigMetadata", +"properties": {}, +"type": "object" +}, +"ConsumerProject": { +"description": "Represents a consumer project.", +"id": "ConsumerProject", +"properties": { +"projectNum": { +"description": "Required. Project number of the consumer that is launching the service instance. It can own the network that is peered with Google or, be a service project in an XPN where the host project has the network.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Context": { +"description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using \u201cx-goog-ext--bin\u201d and \u201cx-goog-ext--jspb\u201d format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", +"id": "Context", +"properties": { +"rules": { +"description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "ContextRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContextRule": { +"description": "A context rule provides information about the context for an individual API element.", +"id": "ContextRule", +"properties": { +"allowedRequestExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowedResponseExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", +"items": { +"type": "string" +}, +"type": "array" +}, +"provided": { +"description": "A list of full type names of provided contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requested": { +"description": "A list of full type names of requested contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Control": { +"description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", +"id": "Control", +"properties": { +"environment": { +"description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", +"type": "string" +}, +"methodPolicies": { +"description": "Defines policies applying to the API methods of the service.", +"items": { +"$ref": "MethodPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"CppSettings": { +"description": "Settings for C++ client libraries.", +"id": "CppSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"CustomError": { +"description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", +"id": "CustomError", +"properties": { +"rules": { +"description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "CustomErrorRule" +}, +"type": "array" +}, +"types": { +"description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CustomErrorRule": { +"description": "A custom error rule.", +"id": "CustomErrorRule", +"properties": { +"isErrorType": { +"description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", +"type": "boolean" +}, +"selector": { +"description": "Selects messages to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"CustomHttpPattern": { +"description": "A custom pattern is used for defining custom HTTP verb.", +"id": "CustomHttpPattern", +"properties": { +"kind": { +"description": "The name of this custom HTTP verb.", +"type": "string" +}, +"path": { +"description": "The path matched by this custom verb.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteConnectionMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by Delete Connection API", +"id": "DeleteConnectionMetadata", +"properties": {}, +"type": "object" +}, +"DeleteConnectionRequest": { +"description": "Request to delete a private service access connection. The call will fail if there are any managed service instances using this connection.", +"id": "DeleteConnectionRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is a network name.", +"type": "string" +} +}, +"type": "object" +}, +"DeletePeeredDnsDomainMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by DeletePeeredDnsDomain API.", +"id": "DeletePeeredDnsDomainMetadata", +"properties": {}, +"type": "object" +}, +"DisableVpcServiceControlsRequest": { +"description": "Request to disable VPC service controls.", +"id": "DisableVpcServiceControlsRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is network name.", +"type": "string" +} +}, +"type": "object" +}, +"DnsRecordSet": { +"description": "Represents a DNS record set resource.", +"id": "DnsRecordSet", +"properties": { +"data": { +"description": "Required. As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) for examples see https://cloud.google.com/dns/records/json-record.", +"items": { +"type": "string" +}, +"type": "array" +}, +"domain": { +"description": "Required. The DNS or domain name of the record set, e.g. `test.example.com`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", +"type": "string" +}, +"ttl": { +"description": "Required. The period of time for which this RecordSet can be cached by resolvers.", +"format": "google-duration", +"type": "string" +}, +"type": { +"description": "Required. The identifier of a supported record type.", +"type": "string" +} +}, +"type": "object" +}, +"DnsZone": { +"description": "Represents a DNS zone resource.", +"id": "DnsZone", +"properties": { +"dnsSuffix": { +"description": "The DNS name suffix of this zone e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", +"type": "string" +}, +"name": { +"description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", +"type": "string" +} +}, +"type": "object" +}, +"DnsZonePair": { +"description": "* Represents a pair of private and peering DNS zone resources. *", +"id": "DnsZonePair", +"properties": { +"consumerPeeringZone": { +"$ref": "DnsZone", +"description": "The DNS peering zone in the consumer project." +}, +"producerPrivateZone": { +"$ref": "DnsZone", +"description": "The private DNS zone in the shared producer host project." +} +}, +"type": "object" +}, +"Documentation": { +"description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", +"id": "Documentation", +"properties": { +"documentationRootUrl": { +"description": "The URL to the root of documentation.", +"type": "string" +}, +"overview": { +"description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", +"type": "string" +}, +"pages": { +"description": "The top level pages for the documentation set.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"rules": { +"description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "DocumentationRule" +}, +"type": "array" +}, +"sectionOverrides": { +"description": "Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"serviceRootUrl": { +"description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", +"type": "string" +}, +"summary": { +"description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentationRule": { +"description": "A documentation rule provides information about individual API elements.", +"id": "DocumentationRule", +"properties": { +"deprecationDescription": { +"description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", +"type": "string" +}, +"description": { +"description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.", +"type": "string" +}, +"disableReplacementWords": { +"description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.", +"type": "string" +}, +"selector": { +"description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", +"type": "string" +} +}, +"type": "object" +}, +"DotnetSettings": { +"description": "Settings for Dotnet client libraries.", +"id": "DotnetSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"forcedNamespaceAliases": { +"description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", +"items": { +"type": "string" +}, +"type": "array" +}, +"handwrittenSignatures": { +"description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoredResources": { +"description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"renamedResources": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", +"type": "object" +}, +"renamedServices": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", +"type": "object" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnableVpcServiceControlsRequest": { +"description": "Request to enable VPC service controls.", +"id": "EnableVpcServiceControlsRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is network name.", +"type": "string" +} +}, +"type": "object" +}, +"Endpoint": { +"description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", +"id": "Endpoint", +"properties": { +"aliases": { +"deprecated": true, +"description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowCors": { +"description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", +"type": "boolean" +}, +"name": { +"description": "The canonical name of this endpoint.", +"type": "string" +}, +"target": { +"description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", +"type": "string" +} +}, +"type": "object" +}, +"Enum": { +"description": "Enum type definition.", +"id": "Enum", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"enumvalue": { +"description": "Enum value definitions.", +"items": { +"$ref": "EnumValue" +}, +"type": "array" +}, +"name": { +"description": "Enum type name.", +"type": "string" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"EnumValue": { +"description": "Enum value definition.", +"id": "EnumValue", +"properties": { +"name": { +"description": "Enum value name.", +"type": "string" +}, +"number": { +"description": "Enum value number.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FieldPolicy": { +"description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", +"id": "FieldPolicy", +"properties": { +"resourcePermission": { +"description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", +"type": "string" +}, +"resourceType": { +"description": "Specifies the resource type for the resource referred to by the field.", +"type": "string" +}, +"selector": { +"description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", +"type": "string" +} +}, +"type": "object" +}, +"GetDnsZoneResponse": { +"description": "Represents managed DNS zones created in the shared Producer host and consumer projects.", +"id": "GetDnsZoneResponse", +"properties": { +"consumerPeeringZone": { +"$ref": "DnsZone", +"description": "The DNS peering zone created in the consumer project." +}, +"producerPrivateZone": { +"$ref": "DnsZone", +"description": "The private DNS zone created in the shared producer host project." +} +}, +"type": "object" +}, +"GoSettings": { +"description": "Settings for Go client libraries.", +"id": "GoSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"GoogleCloudServicenetworkingV1ConsumerConfigReservedRange": { +"description": "Allocated IP address ranges for this private service access connection.", +"id": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange", +"properties": { +"address": { +"description": "The starting address of the reserved range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix length is the CIDR range for the reserved range.", +"type": "string" +}, +"ipPrefixLength": { +"description": "The prefix length of the reserved range.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The name of the reserved range.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudServicenetworkingV1betaConnection": { +"description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", +"id": "GoogleCloudServicenetworkingV1betaConnection", +"properties": { +"network": { +"description": "The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is the name of the service consumer's VPC network.", +"type": "string" +}, +"peering": { +"description": "Output only. The name of the VPC Network Peering connection that was created by the service producer.", +"type": "string" +}, +"reservedPeeringRanges": { +"description": "The name of one or more allocated IP address ranges for this service producer of type `PEERING`. Note that invoking this method with a different range when connection is already established will not modify already provisioned service producer subnetworks.", +"items": { +"type": "string" +}, +"type": "array" +}, +"service": { +"description": "Output only. The name of the peering service that's associated with this connection, in the following format: `services/{service name}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudServicenetworkingV1betaSubnetwork": { +"description": "Represents a subnet that was created or discovered by a private access management service.", +"id": "GoogleCloudServicenetworkingV1betaSubnetwork", +"properties": { +"ipCidrRange": { +"description": "Subnetwork CIDR range in `10.x.x.x/y` format.", +"type": "string" +}, +"name": { +"description": "Subnetwork name. See https://cloud.google.com/compute/docs/vpc/", +"type": "string" +}, +"network": { +"description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", +"type": "string" +}, +"outsideAllocation": { +"description": "This is a discovered subnet that is not within the current consumer allocated ranges.", +"type": "boolean" +} +}, +"type": "object" +}, +"Http": { +"description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", +"id": "Http", +"properties": { +"fullyDecodeReservedExpansion": { +"description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", +"type": "boolean" +}, +"rules": { +"description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRule": { +"description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A¶m=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", +"id": "HttpRule", +"properties": { +"additionalBindings": { +"description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +}, +"body": { +"description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", +"type": "string" +}, +"custom": { +"$ref": "CustomHttpPattern", +"description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." +}, +"delete": { +"description": "Maps to HTTP DELETE. Used for deleting a resource.", +"type": "string" +}, +"get": { +"description": "Maps to HTTP GET. Used for listing and getting information about resources.", +"type": "string" +}, +"patch": { +"description": "Maps to HTTP PATCH. Used for updating a resource.", +"type": "string" +}, +"post": { +"description": "Maps to HTTP POST. Used for creating a resource or performing an action.", +"type": "string" +}, +"put": { +"description": "Maps to HTTP PUT. Used for replacing a resource.", +"type": "string" +}, +"responseBody": { +"description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", +"type": "string" +}, +"selector": { +"description": "Selects a method to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"JavaSettings": { +"description": "Settings for Java client libraries.", +"id": "JavaSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"libraryPackage": { +"description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", +"type": "string" +}, +"serviceClassNames": { +"additionalProperties": { +"type": "string" +}, +"description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", +"type": "object" +} +}, +"type": "object" +}, +"JwtLocation": { +"description": "Specifies a location to extract JWT from an API request.", +"id": "JwtLocation", +"properties": { +"cookie": { +"description": "Specifies cookie name to extract JWT token.", +"type": "string" +}, +"header": { +"description": "Specifies HTTP header name to extract JWT token.", +"type": "string" +}, +"query": { +"description": "Specifies URL query parameter name to extract JWT token.", +"type": "string" +}, +"valuePrefix": { +"description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The label key.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string. This is the default.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"ListConnectionsResponse": { +"description": "ListConnectionsResponse is the response to list peering states for the given service and consumer project.", +"id": "ListConnectionsResponse", +"properties": { +"connections": { +"description": "The list of Connections.", +"items": { +"$ref": "Connection" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListDnsRecordSetsResponse": { +"description": "Represents all DNS RecordSets associated with the producer network", +"id": "ListDnsRecordSetsResponse", +"properties": { +"dnsRecordSets": { +"description": "DNS record Set Resource", +"items": { +"$ref": "DnsRecordSet" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListDnsZonesResponse": { +"description": "Represents all DNS zones in the shared producer host project and the matching peering zones in the consumer project.", +"id": "ListDnsZonesResponse", +"properties": { +"dnsZonePairs": { +"description": "All pairs of private DNS zones in the shared producer host project and the matching peering zones in the consumer project..", +"items": { +"$ref": "DnsZonePair" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPeeredDnsDomainsResponse": { +"description": "Response to list peered DNS domains for a given connection.", +"id": "ListPeeredDnsDomainsResponse", +"properties": { +"peeredDnsDomains": { +"description": "The list of peered DNS domains.", +"items": { +"$ref": "PeeredDnsDomain" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogDescriptor": { +"description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", +"id": "LogDescriptor", +"properties": { +"description": { +"description": "A human-readable description of this log. This information appears in the documentation and can contain details.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name for this log. This information appears on the user interface and should be concise.", +"type": "string" +}, +"labels": { +"description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"name": { +"description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", +"type": "string" +} +}, +"type": "object" +}, +"Logging": { +"description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", +"id": "Logging", +"properties": { +"consumerDestinations": { +"description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingDestination": { +"description": "Configuration of a specific logging destination (the producer project or the consumer project).", +"id": "LoggingDestination", +"properties": { +"logs": { +"description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"LongRunning": { +"description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", +"id": "LongRunning", +"properties": { +"initialPollDelay": { +"description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", +"format": "google-duration", +"type": "string" +}, +"maxPollDelay": { +"description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", +"format": "google-duration", +"type": "string" +}, +"pollDelayMultiplier": { +"description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", +"format": "float", +"type": "number" +}, +"totalPollTimeout": { +"description": "Total polling timeout. Default value: 5 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Method": { +"description": "Method represents a method of an API interface.", +"id": "Method", +"properties": { +"name": { +"description": "The simple name of this method.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the method.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"requestStreaming": { +"description": "If true, the request is streamed.", +"type": "boolean" +}, +"requestTypeUrl": { +"description": "A URL of the input message type.", +"type": "string" +}, +"responseStreaming": { +"description": "If true, the response is streamed.", +"type": "boolean" +}, +"responseTypeUrl": { +"description": "The URL of the output message type.", +"type": "string" +}, +"syntax": { +"description": "The source syntax of this method.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"MethodPolicy": { +"description": "Defines policies applying to an RPC method.", +"id": "MethodPolicy", +"properties": { +"requestPolicies": { +"description": "Policies that are applicable to the request message.", +"items": { +"$ref": "FieldPolicy" +}, +"type": "array" +}, +"selector": { +"description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", +"type": "string" +} +}, +"type": "object" +}, +"MethodSettings": { +"description": "Describes the generator configuration for a method.", +"id": "MethodSettings", +"properties": { +"autoPopulatedFields": { +"description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", +"items": { +"type": "string" +}, +"type": "array" +}, +"longRunning": { +"$ref": "LongRunning", +"description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" +}, +"selector": { +"description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a `Distribution`.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRule": { +"description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", +"id": "MetricRule", +"properties": { +"metricCosts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", +"type": "object" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Mixin": { +"description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", +"id": "Mixin", +"properties": { +"name": { +"description": "The fully qualified name of the interface which is included.", +"type": "string" +}, +"root": { +"description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"Monitoring": { +"description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", +"id": "Monitoring", +"properties": { +"consumerDestinations": { +"description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonitoringDestination": { +"description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", +"id": "MonitoringDestination", +"properties": { +"metrics": { +"description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"NodeSettings": { +"description": "Settings for Node client libraries.", +"id": "NodeSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"OAuthRequirements": { +"description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", +"id": "OAuthRequirements", +"properties": { +"canonicalScopes": { +"description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"Page": { +"description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", +"id": "Page", +"properties": { +"content": { +"description": "The Markdown content of the page. You can use (== include {path} ==) to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", +"type": "string" +}, +"name": { +"description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", +"type": "string" +}, +"subpages": { +"description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", +"items": { +"$ref": "Page" +}, +"type": "array" +} +}, +"type": "object" +}, +"PartialDeleteConnectionMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by Partial Delete Connection API", +"id": "PartialDeleteConnectionMetadata", +"properties": {}, +"type": "object" +}, +"PeeredDnsDomain": { +"description": "DNS domain suffix for which requests originating in the producer VPC network are resolved in the associated consumer VPC network.", +"id": "PeeredDnsDomain", +"properties": { +"dnsSuffix": { +"description": "The DNS domain name suffix e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", +"type": "string" +}, +"name": { +"description": "User assigned name for this resource. Must be unique within the consumer network. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", +"type": "string" +} +}, +"type": "object" +}, +"PeeredDnsDomainMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by CreatePeeredDnsDomain API.", +"id": "PeeredDnsDomainMetadata", +"properties": {}, +"type": "object" +}, +"PhpSettings": { +"description": "Settings for Php client libraries.", +"id": "PhpSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"PolicyBinding": { +"description": "Grouping of IAM role and IAM member.", +"id": "PolicyBinding", +"properties": { +"member": { +"description": "Required. Member to bind the role with. See /iam/docs/reference/rest/v1/Policy#Binding for how to format each member. Eg. - user:myuser@mydomain.com - serviceAccount:my-service-account@app.gserviceaccount.com", +"type": "string" +}, +"role": { +"description": "Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/compute.xpnAdmin' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project", +"type": "string" +} +}, +"type": "object" +}, +"Publishing": { +"description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", +"id": "Publishing", +"properties": { +"apiShortName": { +"description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", +"type": "string" +}, +"codeownerGithubTeams": { +"description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", +"items": { +"type": "string" +}, +"type": "array" +}, +"docTagPrefix": { +"description": "A prefix used in sample code when demarking regions to be included in documentation.", +"type": "string" +}, +"documentationUri": { +"description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", +"type": "string" +}, +"githubLabel": { +"description": "GitHub label to apply to issues and pull requests opened for this API.", +"type": "string" +}, +"librarySettings": { +"description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", +"items": { +"$ref": "ClientLibrarySettings" +}, +"type": "array" +}, +"methodSettings": { +"description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", +"items": { +"$ref": "MethodSettings" +}, +"type": "array" +}, +"newIssueUri": { +"description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103", +"type": "string" +}, +"organization": { +"description": "For whom the client library is being published.", +"enum": [ +"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", +"CLOUD", +"ADS", +"PHOTOS", +"STREET_VIEW", +"SHOPPING", +"GEO", +"GENERATIVE_AI" +], +"enumDescriptions": [ +"Not useful.", +"Google Cloud Platform Org.", +"Ads (Advertising) Org.", +"Photos Org.", +"Street View Org.", +"Shopping Org.", +"Geo Org.", +"Generative AI - https://developers.generativeai.google" +], +"type": "string" +}, +"protoReferenceDocumentationUri": { +"description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", +"type": "string" +}, +"restReferenceDocumentationUri": { +"description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", +"type": "string" +} +}, +"type": "object" +}, +"PythonSettings": { +"description": "Settings for Python client libraries.", +"id": "PythonSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Quota": { +"description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", +"id": "Quota", +"properties": { +"limits": { +"description": "List of QuotaLimit definitions for the service.", +"items": { +"$ref": "QuotaLimit" +}, +"type": "array" +}, +"metricRules": { +"description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", +"items": { +"$ref": "MetricRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaLimit": { +"description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", +"id": "QuotaLimit", +"properties": { +"defaultLimit": { +"description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"description": { +"description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", +"type": "string" +}, +"displayName": { +"description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", +"type": "string" +}, +"duration": { +"description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", +"type": "string" +}, +"freeTier": { +"description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"maxLimit": { +"description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"metric": { +"description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", +"type": "string" +}, +"name": { +"description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", +"type": "string" +}, +"unit": { +"description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", +"type": "string" +}, +"values": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", +"type": "object" +} +}, +"type": "object" +}, +"Range": { +"description": "Represents a found unused range.", +"id": "Range", +"properties": { +"ipCidrRange": { +"description": "CIDR range in \"10.x.x.x/y\" format that is within the allocated ranges and currently unused.", +"type": "string" +}, +"network": { +"description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", +"type": "string" +} +}, +"type": "object" +}, +"RangeReservation": { +"description": "Represents a range reservation.", +"id": "RangeReservation", +"properties": { +"ipPrefixLength": { +"description": "Required. The size of the desired subnet. Use usual CIDR range notation. For example, '29' to find unused x.x.x.x/29 CIDR range. The goal is to determine if one of the allocated ranges has enough free space for a subnet of the requested size. GCE disallows subnets with prefix_length > 29", +"format": "int32", +"type": "integer" +}, +"requestedRanges": { +"description": "Optional. The name of one or more allocated IP address ranges associated with this private service access connection. If no range names are provided all ranges associated with this connection will be considered. If a CIDR range with the specified IP prefix length is not available within these ranges the validation fails.", +"items": { +"type": "string" +}, +"type": "array" +}, +"secondaryRangeIpPrefixLengths": { +"description": "Optional. The size of the desired secondary ranges for the subnet. Use usual CIDR range notation. For example, '29' to find unused x.x.x.x/29 CIDR range. The goal is to determine that the allocated ranges have enough free space for all the requested secondary ranges. GCE disallows subnets with prefix_length > 29", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"subnetworkCandidates": { +"description": "Optional. List of subnetwork candidates to validate. The required input fields are `name`, `network`, and `region`. Subnetworks from this list which exist will be returned in the response with the `ip_cidr_range`, `secondary_ip_cider_ranges`, and `outside_allocation` fields set.", +"items": { +"$ref": "Subnetwork" +}, +"type": "array" +} +}, +"type": "object" +}, +"RemoveDnsRecordSetMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by RemoveDnsRecordSet API", +"id": "RemoveDnsRecordSetMetadata", +"properties": {}, +"type": "object" +}, +"RemoveDnsRecordSetRequest": { +"description": "Request to remove a record set from a private managed DNS zone in the shared producer host project. The name, type, ttl, and data values must all exactly match an existing record set in the specified zone.", +"id": "RemoveDnsRecordSetRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", +"type": "string" +}, +"dnsRecordSet": { +"$ref": "DnsRecordSet", +"description": "Required. The DNS record set to remove." +}, +"zone": { +"description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", +"type": "string" +} +}, +"type": "object" +}, +"RemoveDnsRecordSetResponse": { +"description": "Blank message response type for RemoveDnsRecordSet API", +"id": "RemoveDnsRecordSetResponse", +"properties": {}, +"type": "object" +}, +"RemoveDnsZoneMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by RemoveDnsZone API", +"id": "RemoveDnsZoneMetadata", +"properties": {}, +"type": "object" +}, +"RemoveDnsZoneRequest": { +"description": "Request to remove a private managed DNS zone in the shared producer host project and a matching DNS peering zone in the consumer project.", +"id": "RemoveDnsZoneRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", +"type": "string" +}, +"name": { +"description": "Required. The name for both the private zone in the shared producer host project and the peering zone in the consumer project.", +"type": "string" +} +}, +"type": "object" +}, +"RemoveDnsZoneResponse": { +"description": "Blank message response type for RemoveDnsZone API", +"id": "RemoveDnsZoneResponse", +"properties": {}, +"type": "object" +}, +"Route": { +"description": "Represents a route that was created or discovered by a private access management service.", +"id": "Route", +"properties": { +"destRange": { +"description": "Destination CIDR range that this route applies to.", +"type": "string" +}, +"name": { +"description": "Route name. See https://cloud.google.com/vpc/docs/routes", +"type": "string" +}, +"network": { +"description": "Fully-qualified URL of the VPC network in the producer host tenant project that this route applies to. For example: `projects/123456/global/networks/host-network`", +"type": "string" +}, +"nextHopGateway": { +"description": "Fully-qualified URL of the gateway that should handle matching packets that this route applies to. For example: `projects/123456/global/gateways/default-internet-gateway`", +"type": "string" +} +}, +"type": "object" +}, +"RubySettings": { +"description": "Settings for Ruby client libraries.", +"id": "RubySettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"SearchRangeRequest": { +"description": "Request to search for an unused range within allocated ranges.", +"id": "SearchRangeRequest", +"properties": { +"ipPrefixLength": { +"description": "Required. The prefix length of the IP range. Use usual CIDR range notation. For example, '30' to find unused x.x.x.x/30 CIDR range. Actual range will be determined using allocated range for the consumer peered network and returned in the result.", +"format": "int32", +"type": "integer" +}, +"network": { +"description": "Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project}/global/networks/{network}'. {project} is a project number, as in '12345' {network} is network name.", +"type": "string" +} +}, +"type": "object" +}, +"SecondaryIpRange": { +"id": "SecondaryIpRange", +"properties": { +"ipCidrRange": { +"description": "Secondary IP CIDR range in `x.x.x.x/y` format.", +"type": "string" +}, +"rangeName": { +"description": "Name of the secondary IP range.", +"type": "string" +} +}, +"type": "object" +}, +"SecondaryIpRangeSpec": { +"id": "SecondaryIpRangeSpec", +"properties": { +"ipPrefixLength": { +"description": "Required. The prefix length of the secondary IP range. Use CIDR range notation, such as `30` to provision a secondary IP range with an `x.x.x.x/30` CIDR range. The IP address range is drawn from a pool of available ranges in the service consumer's allocated range.", +"format": "int32", +"type": "integer" +}, +"outsideAllocationPublicIpRange": { +"description": "Optional. Enable outside allocation using public IP addresses. Any public IP range may be specified. If this field is provided, we will not use customer reserved ranges for this secondary IP range.", +"type": "string" +}, +"rangeName": { +"description": "Required. A name for the secondary IP range. The name must be 1-63 characters long, and comply with RFC1035. The name must be unique within the subnetwork.", +"type": "string" +}, +"requestedAddress": { +"description": "Optional. The starting address of a range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix range is the CIDR range for the secondary IP range. The range must be within the allocated range that is assigned to the private connection. If the CIDR range isn't available, the call fails.", +"type": "string" +} +}, +"type": "object" +}, +"Service": { +"description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", +"id": "Service", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration." +}, +"backend": { +"$ref": "Backend", +"description": "API backend configuration." +}, +"billing": { +"$ref": "Billing", +"description": "Billing configuration." +}, +"configVersion": { +"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", +"format": "uint32", +"type": "integer" +}, +"context": { +"$ref": "Context", +"description": "Context configuration." +}, +"control": { +"$ref": "Control", +"description": "Configuration for the service control plane." +}, +"customError": { +"$ref": "CustomError", +"description": "Custom error configuration." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation." +}, +"endpoints": { +"description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"enums": { +"description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", +"items": { +"$ref": "Enum" +}, +"type": "array" +}, +"http": { +"$ref": "Http", +"description": "HTTP configuration." +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", +"type": "string" +}, +"logging": { +"$ref": "Logging", +"description": "Logging configuration." +}, +"logs": { +"description": "Defines the logs used by this service.", +"items": { +"$ref": "LogDescriptor" +}, +"type": "array" +}, +"metrics": { +"description": "Defines the metrics used by this service.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration." +}, +"name": { +"description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", +"type": "string" +}, +"producerProjectId": { +"description": "The Google project that owns this service.", +"type": "string" +}, +"publishing": { +"$ref": "Publishing", +"description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"sourceInfo": { +"$ref": "SourceInfo", +"description": "Output only. The source information for this configuration if available." +}, +"systemParameters": { +"$ref": "SystemParameters", +"description": "System parameter configuration." +}, +"systemTypes": { +"description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"title": { +"description": "The product title for this service, it is the name displayed in Google Cloud Console.", +"type": "string" +}, +"types": { +"description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"SourceContext": { +"description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", +"type": "string" +} +}, +"type": "object" +}, +"SourceInfo": { +"description": "Source information used to create a Service Config", +"id": "SourceInfo", +"properties": { +"sourceFiles": { +"description": "All files used during config generation.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subnetwork": { +"description": "Represents a subnet that was created or discovered by a private access management service.", +"id": "Subnetwork", +"properties": { +"ipCidrRange": { +"description": "Subnetwork CIDR range in `10.x.x.x/y` format.", +"type": "string" +}, +"name": { +"description": "Subnetwork name. See https://cloud.google.com/compute/docs/vpc/", +"type": "string" +}, +"network": { +"description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", +"type": "string" +}, +"outsideAllocation": { +"description": "This is a discovered subnet that is not within the current consumer allocated ranges.", +"type": "boolean" +}, +"region": { +"description": "GCP region where the subnetwork is located.", +"type": "string" +}, +"secondaryIpRanges": { +"description": "List of secondary IP ranges in this subnetwork.", +"items": { +"$ref": "SecondaryIpRange" +}, +"type": "array" +} +}, +"type": "object" +}, +"SystemParameter": { +"description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", +"id": "SystemParameter", +"properties": { +"httpHeader": { +"description": "Define the HTTP header name to use for the parameter. It is case insensitive.", +"type": "string" +}, +"name": { +"description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", +"type": "string" +}, +"urlQueryParameter": { +"description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameterRule": { +"description": "Define a system parameter rule mapping system parameter definitions to methods.", +"id": "SystemParameterRule", +"properties": { +"parameters": { +"description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", +"items": { +"$ref": "SystemParameter" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameters": { +"description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", +"id": "SystemParameters", +"properties": { +"rules": { +"description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "SystemParameterRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in `oneof` definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"UpdateConsumerConfigRequest": { +"description": "Request to update the configuration of a service networking connection including the import/export of custom routes and subnetwork routes with public IP.", +"id": "UpdateConsumerConfigRequest", +"properties": { +"consumerConfig": { +"$ref": "ConsumerConfig", +"description": "Required. The updated peering config." +} +}, +"type": "object" +}, +"UpdateDnsRecordSetMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by UpdateDnsRecordSet API", +"id": "UpdateDnsRecordSetMetadata", +"properties": {}, +"type": "object" +}, +"UpdateDnsRecordSetRequest": { +"description": "Request to update a record set from a private managed DNS zone in the shared producer host project. The name, type, ttl, and data values of the existing record set must all exactly match an existing record set in the specified zone.", +"id": "UpdateDnsRecordSetRequest", +"properties": { +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.", +"type": "string" +}, +"existingDnsRecordSet": { +"$ref": "DnsRecordSet", +"description": "Required. The existing DNS record set to update." +}, +"newDnsRecordSet": { +"$ref": "DnsRecordSet", +"description": "Required. The new values that the DNS record set should be updated to hold." +}, +"zone": { +"description": "Required. The name of the private DNS zone in the shared producer host project from which the record set will be removed.", +"type": "string" +} +}, +"type": "object" +}, +"Usage": { +"description": "Configuration controlling usage of a service.", +"id": "Usage", +"properties": { +"producerNotificationChannel": { +"description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", +"type": "string" +}, +"requirements": { +"description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rules": { +"description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "UsageRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"UsageRule": { +"description": "Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: \"*\" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allow_unregistered_calls: true", +"id": "UsageRule", +"properties": { +"allowUnregisteredCalls": { +"description": "If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.", +"type": "boolean" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +}, +"skipServiceControl": { +"description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", +"type": "boolean" +} +}, +"type": "object" +}, +"ValidateConsumerConfigRequest": { +"id": "ValidateConsumerConfigRequest", +"properties": { +"checkServiceNetworkingUsePermission": { +"description": "Optional. The IAM permission check determines whether the consumer project has 'servicenetworking.services.use' permission or not.", +"type": "boolean" +}, +"consumerNetwork": { +"description": "Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is a project number, as in '12345' {network} is network name.", +"type": "string" +}, +"consumerProject": { +"$ref": "ConsumerProject", +"description": "NETWORK_NOT_IN_CONSUMERS_PROJECT, NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT, and HOST_PROJECT_NOT_FOUND are done when consumer_project is provided." +}, +"rangeReservation": { +"$ref": "RangeReservation", +"description": "RANGES_EXHAUSTED, RANGES_EXHAUSTED, and RANGES_DELETED_LATER are done when range_reservation is provided." +}, +"validateNetwork": { +"description": "The validations will be performed in the order listed in the ValidationError enum. The first failure will return. If a validation is not requested, then the next one will be performed. SERVICE_NETWORKING_NOT_ENABLED and NETWORK_NOT_PEERED checks are performed for all requests where validation is requested. NETWORK_NOT_FOUND and NETWORK_DISCONNECTED checks are done for requests that have validate_network set to true.", +"type": "boolean" +} +}, +"type": "object" +}, +"ValidateConsumerConfigResponse": { +"id": "ValidateConsumerConfigResponse", +"properties": { +"existingSubnetworkCandidates": { +"description": "List of subnetwork candidates from the request which exist with the `ip_cidr_range`, `secondary_ip_cider_ranges`, and `outside_allocation` fields set.", +"items": { +"$ref": "Subnetwork" +}, +"type": "array" +}, +"isValid": { +"description": "Indicates whether all the requested validations passed.", +"type": "boolean" +}, +"validationError": { +"description": "The first validation which failed.", +"enum": [ +"VALIDATION_ERROR_UNSPECIFIED", +"VALIDATION_NOT_REQUESTED", +"SERVICE_NETWORKING_NOT_ENABLED", +"NETWORK_NOT_FOUND", +"NETWORK_NOT_PEERED", +"NETWORK_PEERING_DELETED", +"NETWORK_NOT_IN_CONSUMERS_PROJECT", +"NETWORK_NOT_IN_CONSUMERS_HOST_PROJECT", +"HOST_PROJECT_NOT_FOUND", +"CONSUMER_PROJECT_NOT_SERVICE_PROJECT", +"RANGES_EXHAUSTED", +"RANGES_NOT_RESERVED", +"RANGES_DELETED_LATER", +"COMPUTE_API_NOT_ENABLED", +"USE_PERMISSION_NOT_FOUND" +], +"enumDescriptions": [ +"", +"In case none of the validations are requested.", +"", +"The network provided by the consumer does not exist.", +"The network has not been peered with the producer org.", +"The peering was created and later deleted.", +"The network is a regular VPC but the network is not in the consumer's project.", +"The consumer project is a service project, and network is a shared VPC, but the network is not in the host project of this consumer project.", +"The host project associated with the consumer project was not found.", +"The consumer project is not a service project for the specified host project.", +"The reserved IP ranges do not have enough space to create a subnet of desired size.", +"The IP ranges were not reserved.", +"The IP ranges were reserved but deleted later.", +"The consumer project does not have the compute api enabled.", +"The consumer project does not have the permission from the host project." +], +"type": "string" +} +}, +"type": "object" +}, +"VpcServiceControls": { +"description": "Response for the get VPC Service Controls request.", +"id": "VpcServiceControls", +"properties": { +"enabled": { +"description": "Output only. Indicates whether the VPC Service Controls are enabled or disabled for the connection. If the consumer called the EnableVpcServiceControls method, then this is true. If the consumer called DisableVpcServiceControls, then this is false. The default is false.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Networking API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicenetworking.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicenetworking.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..75a340a20c9984e6c3bfddf14b5eef13cfa71527 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/servicenetworking.v1beta.json @@ -0,0 +1,2928 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/service.management": { +"description": "Manage your Google API service configuration" +} +} +} +}, +"basePath": "", +"baseUrl": "https://servicenetworking.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Networking", +"description": "Provides automatic management of network configurations necessary for certain services.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-infrastructure/docs/service-networking/getting-started", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "servicenetworking:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://servicenetworking.mtls.googleapis.com/", +"name": "servicenetworking", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/operations/{operationsId}", +"httpMethod": "GET", +"id": "servicenetworking.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"services": { +"methods": { +"addSubnetwork": { +"description": "For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed. The response from the `get` operation will be of type `Subnetwork` if the operation successfully completes.", +"flatPath": "v1beta/services/{servicesId}/{servicesId1}/{servicesId2}:addSubnetwork", +"httpMethod": "POST", +"id": "servicenetworking.services.addSubnetwork", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. A tenant project in the service producer organization, in the following format: services/{service}/{collection-id}/{resource-id}. {collection-id} is the cloud resource collection type that represents the tenant project. Only `projects` are supported. {resource-id} is the tenant project numeric id, such as `123456`. {service} the name of the peering service, such as `service-peering.example.com`. This service must already be enabled in the service consumer's project.", +"location": "path", +"pattern": "^services/[^/]+/[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}:addSubnetwork", +"request": { +"$ref": "AddSubnetworkRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"searchRange": { +"description": "Service producers can use this method to find a currently unused range within consumer allocated ranges. This returned range is not reserved, and not guaranteed to remain unused. It will validate previously provided allocated ranges, find non-conflicting sub-range of requested size (expressed in number of leading bits of ipv4 network mask, as in CIDR range notation). Operation", +"flatPath": "v1beta/services/{servicesId}:searchRange", +"httpMethod": "POST", +"id": "servicenetworking.services.searchRange", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. This is in a form services/{service}. {service} the name of the private access management service, for example 'service-peering.example.com'.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}:searchRange", +"request": { +"$ref": "SearchRangeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"updateConnections": { +"description": "Updates the allocated ranges that are assigned to a connection. The response from the `get` operation will be of type `Connection` if the operation successfully completes.", +"flatPath": "v1beta/services/{servicesId}/connections", +"httpMethod": "PATCH", +"id": "servicenetworking.services.updateConnections", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "If a previously defined allocated range is removed, force flag must be set to true.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "The service producer peering service that is managing peering connectivity for a service producer organization. For Google services that support this functionality, this is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The update mask. If this is omitted, it defaults to \"*\". You can only update the listed peering ranges.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}/connections", +"request": { +"$ref": "GoogleCloudServicenetworkingV1betaConnection" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +}, +"resources": { +"connections": { +"methods": { +"create": { +"description": "Creates a private connection that establishes a VPC Network Peering connection to a VPC network in the service producer's organization. The administrator of the service consumer's VPC network invokes this method. The administrator must assign one or more allocated IP ranges for provisioning subnetworks in the service producer's VPC network. This connection is used for all supported services in the service producer's organization, so it only needs to be invoked once. The response from the `get` operation will be of type `Connection` if the operation successfully completes.", +"flatPath": "v1beta/services/{servicesId}/connections", +"httpMethod": "POST", +"id": "servicenetworking.services.connections.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/connections", +"request": { +"$ref": "GoogleCloudServicenetworkingV1betaConnection" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "List the private connections that are configured in a service consumer's VPC network.", +"flatPath": "v1beta/services/{servicesId}/connections", +"httpMethod": "GET", +"id": "servicenetworking.services.connections.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"network": { +"description": "The name of service consumer's VPC network that's connected with service producer network through a private connection. The network name must be in the following format: `projects/{project}/global/networks/{network}`. {project} is a project number, such as in `12345` that includes the VPC service consumer's VPC network. {network} is the name of the service consumer's VPC network.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The service that is managing peering connectivity for a service producer's organization. For Google services that support this functionality, this value is `services/servicenetworking.googleapis.com`. If you specify `-` as the parameter value, all configured public peering services are listed.", +"location": "path", +"pattern": "^services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/connections", +"response": { +"$ref": "ListConnectionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://servicenetworking.googleapis.com/", +"schemas": { +"AddDnsRecordSetMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by AddDnsRecordSet API", +"id": "AddDnsRecordSetMetadata", +"properties": {}, +"type": "object" +}, +"AddDnsZoneMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by AddDnsZone API", +"id": "AddDnsZoneMetadata", +"properties": {}, +"type": "object" +}, +"AddDnsZoneResponse": { +"description": "Represents managed DNS zones created in the shared producer host and consumer projects.", +"id": "AddDnsZoneResponse", +"properties": { +"consumerPeeringZone": { +"$ref": "DnsZone", +"description": "The DNS peering zone created in the consumer project." +}, +"producerPrivateZone": { +"$ref": "DnsZone", +"description": "The private DNS zone created in the shared producer host project." +} +}, +"type": "object" +}, +"AddRolesMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by AddRoles API", +"id": "AddRolesMetadata", +"properties": {}, +"type": "object" +}, +"AddRolesResponse": { +"description": "Represents IAM roles added to the shared VPC host project.", +"id": "AddRolesResponse", +"properties": { +"policyBinding": { +"description": "Required. List of policy bindings that were added to the shared VPC host project.", +"items": { +"$ref": "PolicyBinding" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddSubnetworkRequest": { +"description": "Request to create a subnetwork in a previously peered service network.", +"id": "AddSubnetworkRequest", +"properties": { +"consumer": { +"description": "Required. A resource that represents the service consumer, such as `projects/123456`. The project number can be different from the value in the consumer network parameter. For example, the network might be part of a Shared VPC network. In those cases, Service Networking validates that this resource belongs to that Shared VPC.", +"type": "string" +}, +"consumerNetwork": { +"description": "Required. The name of the service consumer's VPC network. The network must have an existing private connection that was provisioned through the connections.create method. The name must be in the following format: `projects/{project}/global/networks/{network}`, where {project} is a project number, such as `12345`. {network} is the name of a VPC network in the project.", +"type": "string" +}, +"description": { +"description": "An optional description of the subnet.", +"type": "string" +}, +"ipPrefixLength": { +"description": "Required. The prefix length of the subnet's IP address range. Use CIDR range notation, such as `30` to provision a subnet with an `x.x.x.x/30` CIDR range. The IP address range is drawn from a pool of available ranges in the service consumer's allocated range.", +"format": "int32", +"type": "integer" +}, +"region": { +"description": "Required. The name of a [region](/compute/docs/regions-zones) for the subnet, such `europe-west1`.", +"type": "string" +}, +"requestedAddress": { +"description": "Optional. The starting address of a range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix range is the CIDR range for the subnet. The range must be within the allocated range that is assigned to the private connection. If the CIDR range isn't available, the call fails.", +"type": "string" +}, +"subnetwork": { +"description": "Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.", +"type": "string" +}, +"subnetworkUsers": { +"description": "A list of members that are granted the `compute.networkUser` role on the subnet.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Api": { +"description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", +"id": "Api", +"properties": { +"methods": { +"description": "The methods of this interface, in unspecified order.", +"items": { +"$ref": "Method" +}, +"type": "array" +}, +"mixins": { +"description": "Included interfaces. See Mixin.", +"items": { +"$ref": "Mixin" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the interface.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "Source context for the protocol buffer service represented by this message." +}, +"syntax": { +"description": "The source syntax of the service.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +}, +"version": { +"description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", +"type": "string" +} +}, +"type": "object" +}, +"AuthProvider": { +"description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthProvider", +"properties": { +"audiences": { +"description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"authorizationUrl": { +"description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", +"type": "string" +}, +"id": { +"description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", +"type": "string" +}, +"issuer": { +"description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", +"type": "string" +}, +"jwksUri": { +"description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", +"type": "string" +}, +"jwtLocations": { +"description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", +"items": { +"$ref": "JwtLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthRequirement": { +"description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthRequirement", +"properties": { +"audiences": { +"description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"providerId": { +"description": "id from authentication provider. Example: provider_id: bookstore_auth", +"type": "string" +} +}, +"type": "object" +}, +"Authentication": { +"description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", +"id": "Authentication", +"properties": { +"providers": { +"description": "Defines a set of authentication providers that a service supports.", +"items": { +"$ref": "AuthProvider" +}, +"type": "array" +}, +"rules": { +"description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "AuthenticationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthenticationRule": { +"description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", +"id": "AuthenticationRule", +"properties": { +"allowWithoutCredential": { +"description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", +"type": "boolean" +}, +"oauth": { +"$ref": "OAuthRequirements", +"description": "The requirements for OAuth credentials." +}, +"requirements": { +"description": "Requirements for additional authentication providers.", +"items": { +"$ref": "AuthRequirement" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Backend": { +"description": "`Backend` defines the backend configuration for a service.", +"id": "Backend", +"properties": { +"rules": { +"description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "BackendRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"BackendRule": { +"description": "A backend rule provides configuration for an individual API element.", +"id": "BackendRule", +"properties": { +"address": { +"description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", +"type": "string" +}, +"deadline": { +"description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", +"format": "double", +"type": "number" +}, +"disableAuth": { +"description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", +"type": "boolean" +}, +"jwtAudience": { +"description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", +"type": "string" +}, +"minDeadline": { +"deprecated": true, +"description": "Deprecated, do not use.", +"format": "double", +"type": "number" +}, +"operationDeadline": { +"description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", +"format": "double", +"type": "number" +}, +"overridesByRequestProtocol": { +"additionalProperties": { +"$ref": "BackendRule" +}, +"description": "The map between request protocol and the backend address.", +"type": "object" +}, +"pathTranslation": { +"enum": [ +"PATH_TRANSLATION_UNSPECIFIED", +"CONSTANT_ADDRESS", +"APPEND_PATH_TO_ADDRESS" +], +"enumDescriptions": [ +"", +"Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe", +"The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" +], +"type": "string" +}, +"protocol": { +"description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", +"type": "string" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Billing": { +"description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", +"id": "Billing", +"properties": { +"consumerDestinations": { +"description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", +"items": { +"$ref": "BillingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"BillingDestination": { +"description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", +"id": "BillingDestination", +"properties": { +"metrics": { +"description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"ClientLibrarySettings": { +"description": "Details about how and where to publish client libraries.", +"id": "ClientLibrarySettings", +"properties": { +"cppSettings": { +"$ref": "CppSettings", +"description": "Settings for C++ client libraries." +}, +"dotnetSettings": { +"$ref": "DotnetSettings", +"description": "Settings for .NET client libraries." +}, +"goSettings": { +"$ref": "GoSettings", +"description": "Settings for Go client libraries." +}, +"javaSettings": { +"$ref": "JavaSettings", +"description": "Settings for legacy Java features, supported in the Service YAML." +}, +"launchStage": { +"description": "Launch stage of this version of the API.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"nodeSettings": { +"$ref": "NodeSettings", +"description": "Settings for Node client libraries." +}, +"phpSettings": { +"$ref": "PhpSettings", +"description": "Settings for PHP client libraries." +}, +"pythonSettings": { +"$ref": "PythonSettings", +"description": "Settings for Python client libraries." +}, +"restNumericEnums": { +"description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", +"type": "boolean" +}, +"rubySettings": { +"$ref": "RubySettings", +"description": "Settings for Ruby client libraries." +}, +"version": { +"description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", +"type": "string" +} +}, +"type": "object" +}, +"CloudSQLConfig": { +"description": "Cloud SQL configuration.", +"id": "CloudSQLConfig", +"properties": { +"service": { +"description": "Peering service used for peering with the Cloud SQL project.", +"type": "string" +}, +"umbrellaNetwork": { +"description": "The name of the umbrella network in the Cloud SQL umbrella project.", +"type": "string" +}, +"umbrellaProject": { +"description": "The project number of the Cloud SQL umbrella project.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CommonLanguageSettings": { +"description": "Required information for every language.", +"id": "CommonLanguageSettings", +"properties": { +"destinations": { +"description": "The destination where API teams want this client library to be published.", +"items": { +"enum": [ +"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", +"GITHUB", +"PACKAGE_MANAGER" +], +"enumDescriptions": [ +"Client libraries will neither be generated nor published to package managers.", +"Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", +"Publish the library to package managers like nuget.org and npmjs.com." +], +"type": "string" +}, +"type": "array" +}, +"referenceDocsUri": { +"deprecated": true, +"description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", +"type": "string" +} +}, +"type": "object" +}, +"Connection": { +"description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", +"id": "Connection", +"properties": { +"network": { +"description": "The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is the name of the service consumer's VPC network.", +"type": "string" +}, +"peering": { +"description": "Output only. The name of the VPC Network Peering connection that was created by the service producer.", +"readOnly": true, +"type": "string" +}, +"reservedPeeringRanges": { +"description": "The name of one or more allocated IP address ranges for this service producer of type `PEERING`. Note that invoking CreateConnection method with a different range when connection is already established will not modify already provisioned service producer subnetworks. If CreateConnection method is invoked repeatedly to reconnect when peering connection had been disconnected on the consumer side, leaving this field empty will restore previously allocated IP ranges.", +"items": { +"type": "string" +}, +"type": "array" +}, +"service": { +"description": "Output only. The name of the peering service that's associated with this connection, in the following format: `services/{service name}`.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ConsumerConfig": { +"description": "Configuration information for a private service access connection.", +"id": "ConsumerConfig", +"properties": { +"cloudsqlConfigs": { +"description": "Represents one or multiple Cloud SQL configurations.", +"items": { +"$ref": "CloudSQLConfig" +}, +"type": "array" +}, +"consumerExportCustomRoutes": { +"description": "Export custom routes flag value for peering from consumer to producer.", +"type": "boolean" +}, +"consumerExportSubnetRoutesWithPublicIp": { +"description": "Export subnet routes with public ip flag value for peering from consumer to producer.", +"type": "boolean" +}, +"consumerImportCustomRoutes": { +"description": "Import custom routes flag value for peering from consumer to producer.", +"type": "boolean" +}, +"consumerImportSubnetRoutesWithPublicIp": { +"description": "Import subnet routes with public ip flag value for peering from consumer to producer.", +"type": "boolean" +}, +"producerExportCustomRoutes": { +"description": "Export custom routes flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerExportSubnetRoutesWithPublicIp": { +"description": "Export subnet routes with public ip flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerImportCustomRoutes": { +"description": "Import custom routes flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerImportSubnetRoutesWithPublicIp": { +"description": "Import subnet routes with public ip flag value for peering from producer to consumer.", +"type": "boolean" +}, +"producerNetwork": { +"description": "Output only. The VPC host network that is used to host managed service instances. In the format, projects/{project}/global/networks/{network} where {project} is the project number e.g. '12345' and {network} is the network name.", +"readOnly": true, +"type": "string" +}, +"reservedRanges": { +"description": "Output only. The reserved ranges associated with this private service access connection.", +"items": { +"$ref": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange" +}, +"readOnly": true, +"type": "array" +}, +"usedIpRanges": { +"description": "Output only. The IP ranges already in use by consumer or producer", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"vpcScReferenceArchitectureEnabled": { +"description": "Output only. Indicates whether the VPC Service Controls reference architecture is configured for the producer VPC host network.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"ConsumerConfigMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by UpdateConsumerConfig API.", +"id": "ConsumerConfigMetadata", +"properties": {}, +"type": "object" +}, +"Context": { +"description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using \u201cx-goog-ext--bin\u201d and \u201cx-goog-ext--jspb\u201d format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", +"id": "Context", +"properties": { +"rules": { +"description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "ContextRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContextRule": { +"description": "A context rule provides information about the context for an individual API element.", +"id": "ContextRule", +"properties": { +"allowedRequestExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowedResponseExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", +"items": { +"type": "string" +}, +"type": "array" +}, +"provided": { +"description": "A list of full type names of provided contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requested": { +"description": "A list of full type names of requested contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Control": { +"description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", +"id": "Control", +"properties": { +"environment": { +"description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", +"type": "string" +}, +"methodPolicies": { +"description": "Defines policies applying to the API methods of the service.", +"items": { +"$ref": "MethodPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"CppSettings": { +"description": "Settings for C++ client libraries.", +"id": "CppSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"CustomError": { +"description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", +"id": "CustomError", +"properties": { +"rules": { +"description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "CustomErrorRule" +}, +"type": "array" +}, +"types": { +"description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CustomErrorRule": { +"description": "A custom error rule.", +"id": "CustomErrorRule", +"properties": { +"isErrorType": { +"description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", +"type": "boolean" +}, +"selector": { +"description": "Selects messages to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"CustomHttpPattern": { +"description": "A custom pattern is used for defining custom HTTP verb.", +"id": "CustomHttpPattern", +"properties": { +"kind": { +"description": "The name of this custom HTTP verb.", +"type": "string" +}, +"path": { +"description": "The path matched by this custom verb.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteConnectionMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by Delete Connection API", +"id": "DeleteConnectionMetadata", +"properties": {}, +"type": "object" +}, +"DeletePeeredDnsDomainMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by DeletePeeredDnsDomain API.", +"id": "DeletePeeredDnsDomainMetadata", +"properties": {}, +"type": "object" +}, +"DnsRecordSet": { +"description": "Represents a DNS record set resource.", +"id": "DnsRecordSet", +"properties": { +"data": { +"description": "Required. As defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1) for examples see https://cloud.google.com/dns/records/json-record.", +"items": { +"type": "string" +}, +"type": "array" +}, +"domain": { +"description": "Required. The DNS or domain name of the record set, e.g. `test.example.com`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", +"type": "string" +}, +"ttl": { +"description": "Required. The period of time for which this RecordSet can be cached by resolvers.", +"format": "google-duration", +"type": "string" +}, +"type": { +"description": "Required. The identifier of a supported record type.", +"type": "string" +} +}, +"type": "object" +}, +"DnsZone": { +"description": "Represents a DNS zone resource.", +"id": "DnsZone", +"properties": { +"dnsSuffix": { +"description": "The DNS name suffix of this zone e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", +"type": "string" +}, +"name": { +"description": "User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", +"type": "string" +} +}, +"type": "object" +}, +"Documentation": { +"description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", +"id": "Documentation", +"properties": { +"documentationRootUrl": { +"description": "The URL to the root of documentation.", +"type": "string" +}, +"overview": { +"description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", +"type": "string" +}, +"pages": { +"description": "The top level pages for the documentation set.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"rules": { +"description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "DocumentationRule" +}, +"type": "array" +}, +"sectionOverrides": { +"description": "Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"serviceRootUrl": { +"description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", +"type": "string" +}, +"summary": { +"description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentationRule": { +"description": "A documentation rule provides information about individual API elements.", +"id": "DocumentationRule", +"properties": { +"deprecationDescription": { +"description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", +"type": "string" +}, +"description": { +"description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.", +"type": "string" +}, +"disableReplacementWords": { +"description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.", +"type": "string" +}, +"selector": { +"description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", +"type": "string" +} +}, +"type": "object" +}, +"DotnetSettings": { +"description": "Settings for Dotnet client libraries.", +"id": "DotnetSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"forcedNamespaceAliases": { +"description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", +"items": { +"type": "string" +}, +"type": "array" +}, +"handwrittenSignatures": { +"description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoredResources": { +"description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"renamedResources": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", +"type": "object" +}, +"renamedServices": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", +"type": "object" +} +}, +"type": "object" +}, +"Endpoint": { +"description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", +"id": "Endpoint", +"properties": { +"aliases": { +"deprecated": true, +"description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowCors": { +"description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", +"type": "boolean" +}, +"name": { +"description": "The canonical name of this endpoint.", +"type": "string" +}, +"target": { +"description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", +"type": "string" +} +}, +"type": "object" +}, +"Enum": { +"description": "Enum type definition.", +"id": "Enum", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"enumvalue": { +"description": "Enum value definitions.", +"items": { +"$ref": "EnumValue" +}, +"type": "array" +}, +"name": { +"description": "Enum type name.", +"type": "string" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"EnumValue": { +"description": "Enum value definition.", +"id": "EnumValue", +"properties": { +"name": { +"description": "Enum value name.", +"type": "string" +}, +"number": { +"description": "Enum value number.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FieldPolicy": { +"description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", +"id": "FieldPolicy", +"properties": { +"resourcePermission": { +"description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", +"type": "string" +}, +"resourceType": { +"description": "Specifies the resource type for the resource referred to by the field.", +"type": "string" +}, +"selector": { +"description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", +"type": "string" +} +}, +"type": "object" +}, +"GoSettings": { +"description": "Settings for Go client libraries.", +"id": "GoSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"GoogleCloudServicenetworkingV1ConsumerConfigReservedRange": { +"description": "Allocated IP address ranges for this private service access connection.", +"id": "GoogleCloudServicenetworkingV1ConsumerConfigReservedRange", +"properties": { +"address": { +"description": "The starting address of the reserved range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix length is the CIDR range for the reserved range.", +"type": "string" +}, +"ipPrefixLength": { +"description": "The prefix length of the reserved range.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The name of the reserved range.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudServicenetworkingV1betaConnection": { +"description": "Represents a private connection resource. A private connection is implemented as a VPC Network Peering connection between a service producer's VPC network and a service consumer's VPC network.", +"id": "GoogleCloudServicenetworkingV1betaConnection", +"properties": { +"network": { +"description": "The name of service consumer's VPC network that's connected with service producer network, in the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is the name of the service consumer's VPC network.", +"type": "string" +}, +"peering": { +"description": "Output only. The name of the VPC Network Peering connection that was created by the service producer.", +"type": "string" +}, +"reservedPeeringRanges": { +"description": "The name of one or more allocated IP address ranges for this service producer of type `PEERING`. Note that invoking this method with a different range when connection is already established will not modify already provisioned service producer subnetworks.", +"items": { +"type": "string" +}, +"type": "array" +}, +"service": { +"description": "Output only. The name of the peering service that's associated with this connection, in the following format: `services/{service name}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudServicenetworkingV1betaSubnetwork": { +"description": "Represents a subnet that was created or discovered by a private access management service.", +"id": "GoogleCloudServicenetworkingV1betaSubnetwork", +"properties": { +"ipCidrRange": { +"description": "Subnetwork CIDR range in `10.x.x.x/y` format.", +"type": "string" +}, +"name": { +"description": "Subnetwork name. See https://cloud.google.com/compute/docs/vpc/", +"type": "string" +}, +"network": { +"description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", +"type": "string" +}, +"outsideAllocation": { +"description": "This is a discovered subnet that is not within the current consumer allocated ranges.", +"type": "boolean" +} +}, +"type": "object" +}, +"Http": { +"description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", +"id": "Http", +"properties": { +"fullyDecodeReservedExpansion": { +"description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", +"type": "boolean" +}, +"rules": { +"description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRule": { +"description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A¶m=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", +"id": "HttpRule", +"properties": { +"additionalBindings": { +"description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +}, +"body": { +"description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", +"type": "string" +}, +"custom": { +"$ref": "CustomHttpPattern", +"description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." +}, +"delete": { +"description": "Maps to HTTP DELETE. Used for deleting a resource.", +"type": "string" +}, +"get": { +"description": "Maps to HTTP GET. Used for listing and getting information about resources.", +"type": "string" +}, +"patch": { +"description": "Maps to HTTP PATCH. Used for updating a resource.", +"type": "string" +}, +"post": { +"description": "Maps to HTTP POST. Used for creating a resource or performing an action.", +"type": "string" +}, +"put": { +"description": "Maps to HTTP PUT. Used for replacing a resource.", +"type": "string" +}, +"responseBody": { +"description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", +"type": "string" +}, +"selector": { +"description": "Selects a method to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"JavaSettings": { +"description": "Settings for Java client libraries.", +"id": "JavaSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"libraryPackage": { +"description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", +"type": "string" +}, +"serviceClassNames": { +"additionalProperties": { +"type": "string" +}, +"description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", +"type": "object" +} +}, +"type": "object" +}, +"JwtLocation": { +"description": "Specifies a location to extract JWT from an API request.", +"id": "JwtLocation", +"properties": { +"cookie": { +"description": "Specifies cookie name to extract JWT token.", +"type": "string" +}, +"header": { +"description": "Specifies HTTP header name to extract JWT token.", +"type": "string" +}, +"query": { +"description": "Specifies URL query parameter name to extract JWT token.", +"type": "string" +}, +"valuePrefix": { +"description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The label key.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string. This is the default.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"ListConnectionsResponse": { +"description": "ListConnectionsResponse is the response to list peering states for the given service and consumer project.", +"id": "ListConnectionsResponse", +"properties": { +"connections": { +"description": "The list of Connections.", +"items": { +"$ref": "GoogleCloudServicenetworkingV1betaConnection" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogDescriptor": { +"description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", +"id": "LogDescriptor", +"properties": { +"description": { +"description": "A human-readable description of this log. This information appears in the documentation and can contain details.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name for this log. This information appears on the user interface and should be concise.", +"type": "string" +}, +"labels": { +"description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"name": { +"description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", +"type": "string" +} +}, +"type": "object" +}, +"Logging": { +"description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", +"id": "Logging", +"properties": { +"consumerDestinations": { +"description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingDestination": { +"description": "Configuration of a specific logging destination (the producer project or the consumer project).", +"id": "LoggingDestination", +"properties": { +"logs": { +"description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"LongRunning": { +"description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", +"id": "LongRunning", +"properties": { +"initialPollDelay": { +"description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", +"format": "google-duration", +"type": "string" +}, +"maxPollDelay": { +"description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", +"format": "google-duration", +"type": "string" +}, +"pollDelayMultiplier": { +"description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", +"format": "float", +"type": "number" +}, +"totalPollTimeout": { +"description": "Total polling timeout. Default value: 5 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Method": { +"description": "Method represents a method of an API interface.", +"id": "Method", +"properties": { +"name": { +"description": "The simple name of this method.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the method.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"requestStreaming": { +"description": "If true, the request is streamed.", +"type": "boolean" +}, +"requestTypeUrl": { +"description": "A URL of the input message type.", +"type": "string" +}, +"responseStreaming": { +"description": "If true, the response is streamed.", +"type": "boolean" +}, +"responseTypeUrl": { +"description": "The URL of the output message type.", +"type": "string" +}, +"syntax": { +"description": "The source syntax of this method.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"MethodPolicy": { +"description": "Defines policies applying to an RPC method.", +"id": "MethodPolicy", +"properties": { +"requestPolicies": { +"description": "Policies that are applicable to the request message.", +"items": { +"$ref": "FieldPolicy" +}, +"type": "array" +}, +"selector": { +"description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", +"type": "string" +} +}, +"type": "object" +}, +"MethodSettings": { +"description": "Describes the generator configuration for a method.", +"id": "MethodSettings", +"properties": { +"autoPopulatedFields": { +"description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", +"items": { +"type": "string" +}, +"type": "array" +}, +"longRunning": { +"$ref": "LongRunning", +"description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" +}, +"selector": { +"description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a `Distribution`.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRule": { +"description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", +"id": "MetricRule", +"properties": { +"metricCosts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", +"type": "object" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Mixin": { +"description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", +"id": "Mixin", +"properties": { +"name": { +"description": "The fully qualified name of the interface which is included.", +"type": "string" +}, +"root": { +"description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"Monitoring": { +"description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", +"id": "Monitoring", +"properties": { +"consumerDestinations": { +"description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonitoringDestination": { +"description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", +"id": "MonitoringDestination", +"properties": { +"metrics": { +"description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"NodeSettings": { +"description": "Settings for Node client libraries.", +"id": "NodeSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"OAuthRequirements": { +"description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", +"id": "OAuthRequirements", +"properties": { +"canonicalScopes": { +"description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"Page": { +"description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", +"id": "Page", +"properties": { +"content": { +"description": "The Markdown content of the page. You can use (== include {path} ==) to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", +"type": "string" +}, +"name": { +"description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", +"type": "string" +}, +"subpages": { +"description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", +"items": { +"$ref": "Page" +}, +"type": "array" +} +}, +"type": "object" +}, +"PartialDeleteConnectionMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by Partial Delete Connection API", +"id": "PartialDeleteConnectionMetadata", +"properties": {}, +"type": "object" +}, +"PeeredDnsDomain": { +"description": "DNS domain suffix for which requests originating in the producer VPC network are resolved in the associated consumer VPC network.", +"id": "PeeredDnsDomain", +"properties": { +"dnsSuffix": { +"description": "The DNS domain name suffix e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.", +"type": "string" +}, +"name": { +"description": "User assigned name for this resource. Must be unique within the consumer network. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.", +"type": "string" +} +}, +"type": "object" +}, +"PeeredDnsDomainMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by CreatePeeredDnsDomain API.", +"id": "PeeredDnsDomainMetadata", +"properties": {}, +"type": "object" +}, +"PhpSettings": { +"description": "Settings for Php client libraries.", +"id": "PhpSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"PolicyBinding": { +"description": "Grouping of IAM role and IAM member.", +"id": "PolicyBinding", +"properties": { +"member": { +"description": "Required. Member to bind the role with. See /iam/docs/reference/rest/v1/Policy#Binding for how to format each member. Eg. - user:myuser@mydomain.com - serviceAccount:my-service-account@app.gserviceaccount.com", +"type": "string" +}, +"role": { +"description": "Required. Role to apply. Only allowlisted roles can be used at the specified granularity. The role must be one of the following: - 'roles/container.hostServiceAgentUser' applied on the shared VPC host project - 'roles/compute.securityAdmin' applied on the shared VPC host project - 'roles/compute.networkAdmin' applied on the shared VPC host project - 'roles/compute.xpnAdmin' applied on the shared VPC host project - 'roles/dns.admin' applied on the shared VPC host project", +"type": "string" +} +}, +"type": "object" +}, +"Publishing": { +"description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", +"id": "Publishing", +"properties": { +"apiShortName": { +"description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", +"type": "string" +}, +"codeownerGithubTeams": { +"description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", +"items": { +"type": "string" +}, +"type": "array" +}, +"docTagPrefix": { +"description": "A prefix used in sample code when demarking regions to be included in documentation.", +"type": "string" +}, +"documentationUri": { +"description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", +"type": "string" +}, +"githubLabel": { +"description": "GitHub label to apply to issues and pull requests opened for this API.", +"type": "string" +}, +"librarySettings": { +"description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", +"items": { +"$ref": "ClientLibrarySettings" +}, +"type": "array" +}, +"methodSettings": { +"description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", +"items": { +"$ref": "MethodSettings" +}, +"type": "array" +}, +"newIssueUri": { +"description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103", +"type": "string" +}, +"organization": { +"description": "For whom the client library is being published.", +"enum": [ +"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", +"CLOUD", +"ADS", +"PHOTOS", +"STREET_VIEW", +"SHOPPING", +"GEO", +"GENERATIVE_AI" +], +"enumDescriptions": [ +"Not useful.", +"Google Cloud Platform Org.", +"Ads (Advertising) Org.", +"Photos Org.", +"Street View Org.", +"Shopping Org.", +"Geo Org.", +"Generative AI - https://developers.generativeai.google" +], +"type": "string" +}, +"protoReferenceDocumentationUri": { +"description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", +"type": "string" +}, +"restReferenceDocumentationUri": { +"description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", +"type": "string" +} +}, +"type": "object" +}, +"PythonSettings": { +"description": "Settings for Python client libraries.", +"id": "PythonSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Quota": { +"description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", +"id": "Quota", +"properties": { +"limits": { +"description": "List of QuotaLimit definitions for the service.", +"items": { +"$ref": "QuotaLimit" +}, +"type": "array" +}, +"metricRules": { +"description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", +"items": { +"$ref": "MetricRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaLimit": { +"description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", +"id": "QuotaLimit", +"properties": { +"defaultLimit": { +"description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"description": { +"description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", +"type": "string" +}, +"displayName": { +"description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", +"type": "string" +}, +"duration": { +"description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", +"type": "string" +}, +"freeTier": { +"description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"maxLimit": { +"description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"metric": { +"description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", +"type": "string" +}, +"name": { +"description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", +"type": "string" +}, +"unit": { +"description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", +"type": "string" +}, +"values": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", +"type": "object" +} +}, +"type": "object" +}, +"Range": { +"description": "Represents a found unused range.", +"id": "Range", +"properties": { +"ipCidrRange": { +"description": "CIDR range in \"10.x.x.x/y\" format that is within the allocated ranges and currently unused.", +"type": "string" +}, +"network": { +"description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", +"type": "string" +} +}, +"type": "object" +}, +"RemoveDnsRecordSetMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by RemoveDnsRecordSet API", +"id": "RemoveDnsRecordSetMetadata", +"properties": {}, +"type": "object" +}, +"RemoveDnsRecordSetResponse": { +"description": "Blank message response type for RemoveDnsRecordSet API", +"id": "RemoveDnsRecordSetResponse", +"properties": {}, +"type": "object" +}, +"RemoveDnsZoneMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by RemoveDnsZone API", +"id": "RemoveDnsZoneMetadata", +"properties": {}, +"type": "object" +}, +"RemoveDnsZoneResponse": { +"description": "Blank message response type for RemoveDnsZone API", +"id": "RemoveDnsZoneResponse", +"properties": {}, +"type": "object" +}, +"Route": { +"description": "Represents a route that was created or discovered by a private access management service.", +"id": "Route", +"properties": { +"destRange": { +"description": "Destination CIDR range that this route applies to.", +"type": "string" +}, +"name": { +"description": "Route name. See https://cloud.google.com/vpc/docs/routes", +"type": "string" +}, +"network": { +"description": "Fully-qualified URL of the VPC network in the producer host tenant project that this route applies to. For example: `projects/123456/global/networks/host-network`", +"type": "string" +}, +"nextHopGateway": { +"description": "Fully-qualified URL of the gateway that should handle matching packets that this route applies to. For example: `projects/123456/global/gateways/default-internet-gateway`", +"type": "string" +} +}, +"type": "object" +}, +"RubySettings": { +"description": "Settings for Ruby client libraries.", +"id": "RubySettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"SearchRangeRequest": { +"description": "Request to search for an unused range within allocated ranges.", +"id": "SearchRangeRequest", +"properties": { +"ipPrefixLength": { +"description": "Required. The prefix length of the IP range. Use usual CIDR range notation. For example, '30' to find unused x.x.x.x/30 CIDR range. Actual range will be determined using allocated range for the consumer peered network and returned in the result.", +"format": "int32", +"type": "integer" +}, +"network": { +"description": "Network name in the consumer project. This network must have been already peered with a shared VPC network using CreateConnection method. Must be in a form 'projects/{project}/global/networks/{network}'. {project} is a project number, as in '12345' {network} is network name.", +"type": "string" +} +}, +"type": "object" +}, +"SecondaryIpRange": { +"id": "SecondaryIpRange", +"properties": { +"ipCidrRange": { +"description": "Secondary IP CIDR range in `x.x.x.x/y` format.", +"type": "string" +}, +"rangeName": { +"description": "Name of the secondary IP range.", +"type": "string" +} +}, +"type": "object" +}, +"Service": { +"description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", +"id": "Service", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration." +}, +"backend": { +"$ref": "Backend", +"description": "API backend configuration." +}, +"billing": { +"$ref": "Billing", +"description": "Billing configuration." +}, +"configVersion": { +"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", +"format": "uint32", +"type": "integer" +}, +"context": { +"$ref": "Context", +"description": "Context configuration." +}, +"control": { +"$ref": "Control", +"description": "Configuration for the service control plane." +}, +"customError": { +"$ref": "CustomError", +"description": "Custom error configuration." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation." +}, +"endpoints": { +"description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"enums": { +"description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", +"items": { +"$ref": "Enum" +}, +"type": "array" +}, +"http": { +"$ref": "Http", +"description": "HTTP configuration." +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", +"type": "string" +}, +"logging": { +"$ref": "Logging", +"description": "Logging configuration." +}, +"logs": { +"description": "Defines the logs used by this service.", +"items": { +"$ref": "LogDescriptor" +}, +"type": "array" +}, +"metrics": { +"description": "Defines the metrics used by this service.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration." +}, +"name": { +"description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", +"type": "string" +}, +"producerProjectId": { +"description": "The Google project that owns this service.", +"type": "string" +}, +"publishing": { +"$ref": "Publishing", +"description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"sourceInfo": { +"$ref": "SourceInfo", +"description": "Output only. The source information for this configuration if available." +}, +"systemParameters": { +"$ref": "SystemParameters", +"description": "System parameter configuration." +}, +"systemTypes": { +"description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"title": { +"description": "The product title for this service, it is the name displayed in Google Cloud Console.", +"type": "string" +}, +"types": { +"description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"SourceContext": { +"description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", +"type": "string" +} +}, +"type": "object" +}, +"SourceInfo": { +"description": "Source information used to create a Service Config", +"id": "SourceInfo", +"properties": { +"sourceFiles": { +"description": "All files used during config generation.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subnetwork": { +"description": "Represents a subnet that was created or discovered by a private access management service.", +"id": "Subnetwork", +"properties": { +"ipCidrRange": { +"description": "Subnetwork CIDR range in `10.x.x.x/y` format.", +"type": "string" +}, +"name": { +"description": "Subnetwork name. See https://cloud.google.com/compute/docs/vpc/", +"type": "string" +}, +"network": { +"description": "In the Shared VPC host project, the VPC network that's peered with the consumer network. For example: `projects/1234321/global/networks/host-network`", +"type": "string" +}, +"outsideAllocation": { +"description": "This is a discovered subnet that is not within the current consumer allocated ranges.", +"type": "boolean" +}, +"region": { +"description": "GCP region where the subnetwork is located.", +"type": "string" +}, +"secondaryIpRanges": { +"description": "List of secondary IP ranges in this subnetwork.", +"items": { +"$ref": "SecondaryIpRange" +}, +"type": "array" +} +}, +"type": "object" +}, +"SystemParameter": { +"description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", +"id": "SystemParameter", +"properties": { +"httpHeader": { +"description": "Define the HTTP header name to use for the parameter. It is case insensitive.", +"type": "string" +}, +"name": { +"description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", +"type": "string" +}, +"urlQueryParameter": { +"description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameterRule": { +"description": "Define a system parameter rule mapping system parameter definitions to methods.", +"id": "SystemParameterRule", +"properties": { +"parameters": { +"description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", +"items": { +"$ref": "SystemParameter" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameters": { +"description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", +"id": "SystemParameters", +"properties": { +"rules": { +"description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "SystemParameterRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in `oneof` definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"UpdateDnsRecordSetMetadata": { +"description": "Metadata provided through GetOperation request for the LRO generated by UpdateDnsRecordSet API", +"id": "UpdateDnsRecordSetMetadata", +"properties": {}, +"type": "object" +}, +"Usage": { +"description": "Configuration controlling usage of a service.", +"id": "Usage", +"properties": { +"producerNotificationChannel": { +"description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", +"type": "string" +}, +"requirements": { +"description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rules": { +"description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "UsageRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"UsageRule": { +"description": "Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: \"*\" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allow_unregistered_calls: true", +"id": "UsageRule", +"properties": { +"allowUnregisteredCalls": { +"description": "If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.", +"type": "boolean" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +}, +"skipServiceControl": { +"description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", +"type": "boolean" +} +}, +"type": "object" +}, +"VpcServiceControls": { +"description": "Response for the get VPC Service Controls request.", +"id": "VpcServiceControls", +"properties": { +"enabled": { +"description": "Output only. Indicates whether the VPC Service Controls are enabled or disabled for the connection. If the consumer called the EnableVpcServiceControls method, then this is true. If the consumer called DisableVpcServiceControls, then this is false. The default is false.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Networking API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceusage.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceusage.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..11dc6e38543c2825d2903d1aa1b97333a8bfded6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceusage.v1.json @@ -0,0 +1,3247 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +}, +"https://www.googleapis.com/auth/service.management": { +"description": "Manage your Google API service configuration" +} +} +} +}, +"basePath": "", +"baseUrl": "https://serviceusage.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Usage", +"description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-usage/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "serviceusage:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://serviceusage.mtls.googleapis.com/", +"name": "serviceusage", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "serviceusage.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "serviceusage.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "serviceusage.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "serviceusage.operations.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"services": { +"methods": { +"batchEnable": { +"description": "Enable multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. To enable a single service, use the `EnableService` method instead.", +"flatPath": "v1/{v1Id}/{v1Id1}/services:batchEnable", +"httpMethod": "POST", +"id": "serviceusage.services.batchEnable", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Parent to enable services on. An example name would be: `projects/123` where `123` is the project number. The `BatchEnableServices` method currently only supports projects.", +"location": "path", +"pattern": "^[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/services:batchEnable", +"request": { +"$ref": "BatchEnableServicesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"batchGet": { +"description": "Returns the service configurations and enabled states for a given list of services.", +"flatPath": "v1/{v1Id}/{v1Id1}/services:batchGet", +"httpMethod": "GET", +"id": "serviceusage.services.batchGet", +"parameterOrder": [ +"parent" +], +"parameters": { +"names": { +"description": "Names of the services to retrieve. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number. A single request can get a maximum of 30 services at a time.", +"location": "query", +"repeated": true, +"type": "string" +}, +"parent": { +"description": "Parent to retrieve services from. If this is set, the parent of all of the services specified in `names` must match this field. An example name would be: `projects/123` where `123` is the project number. The `BatchGetServices` method currently only supports projects.", +"location": "path", +"pattern": "^[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/services:batchGet", +"response": { +"$ref": "BatchGetServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"disable": { +"description": "Disable a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks. It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION` status if the target service is not currently enabled.", +"flatPath": "v1/{v1Id}/{v1Id1}/services/{servicesId}:disable", +"httpMethod": "POST", +"id": "serviceusage.services.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of the consumer and service to disable the service on. The enable and disable methods currently only support projects. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number.", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:disable", +"request": { +"$ref": "DisableServiceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"enable": { +"description": "Enable a service so that it can be used with a project.", +"flatPath": "v1/{v1Id}/{v1Id1}/services/{servicesId}:enable", +"httpMethod": "POST", +"id": "serviceusage.services.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of the consumer and service to enable the service on. The `EnableService` and `DisableService` methods currently only support projects. Enabling a service requires that the service is public or is shared with the user enabling the service. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number.", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:enable", +"request": { +"$ref": "EnableServiceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"description": "Returns the service configuration and enabled state for a given service.", +"flatPath": "v1/{v1Id}/{v1Id1}/services/{servicesId}", +"httpMethod": "GET", +"id": "serviceusage.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of the consumer and service to get the `ConsumerState` for. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number.", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleApiServiceusageV1Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"list": { +"description": "List all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the `servicemanagement.services.bind` permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project. WARNING: If you need to query enabled services frequently or across an organization, you should use [Cloud Asset Inventory API](https://cloud.google.com/asset-inventory/docs/apis), which provides higher throughput and richer filtering capability.", +"flatPath": "v1/{v1Id}/{v1Id1}/services", +"httpMethod": "GET", +"id": "serviceusage.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with, which is returned by a previous list call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Parent to search for services on. An example name would be: `projects/123` where `123` is the project number.", +"location": "path", +"pattern": "^[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://serviceusage.googleapis.com/", +"schemas": { +"AddEnableRulesMetadata": { +"description": "Metadata for the `AddEnableRules` method.", +"id": "AddEnableRulesMetadata", +"properties": {}, +"type": "object" +}, +"AddEnableRulesResponse": { +"description": "The response message of `AddEnableRules` method.", +"id": "AddEnableRulesResponse", +"properties": { +"addedValues": { +"description": "The values added to the parent consumer policy.", +"items": { +"type": "string" +}, +"type": "array" +}, +"parent": { +"description": "The parent consumer policy. It can be `projects/12345/consumerPolicies/default`, or `folders/12345/consumerPolicies/default`, or `organizations/12345/consumerPolicies/default`.", +"type": "string" +} +}, +"type": "object" +}, +"AdminQuotaPolicy": { +"description": "Quota policy created by quota administrator.", +"id": "AdminQuotaPolicy", +"properties": { +"container": { +"description": "The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminQuotaPolicies/4a3f2c1d`", +"type": "string" +}, +"policyValue": { +"description": "The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"Api": { +"description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", +"id": "Api", +"properties": { +"methods": { +"description": "The methods of this interface, in unspecified order.", +"items": { +"$ref": "Method" +}, +"type": "array" +}, +"mixins": { +"description": "Included interfaces. See Mixin.", +"items": { +"$ref": "Mixin" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the interface.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "Source context for the protocol buffer service represented by this message." +}, +"syntax": { +"description": "The source syntax of the service.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +}, +"version": { +"description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", +"type": "string" +} +}, +"type": "object" +}, +"AuthProvider": { +"description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthProvider", +"properties": { +"audiences": { +"description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"authorizationUrl": { +"description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", +"type": "string" +}, +"id": { +"description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", +"type": "string" +}, +"issuer": { +"description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", +"type": "string" +}, +"jwksUri": { +"description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", +"type": "string" +}, +"jwtLocations": { +"description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", +"items": { +"$ref": "JwtLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthRequirement": { +"description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthRequirement", +"properties": { +"audiences": { +"description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"providerId": { +"description": "id from authentication provider. Example: provider_id: bookstore_auth", +"type": "string" +} +}, +"type": "object" +}, +"Authentication": { +"description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", +"id": "Authentication", +"properties": { +"providers": { +"description": "Defines a set of authentication providers that a service supports.", +"items": { +"$ref": "AuthProvider" +}, +"type": "array" +}, +"rules": { +"description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "AuthenticationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthenticationRule": { +"description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", +"id": "AuthenticationRule", +"properties": { +"allowWithoutCredential": { +"description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", +"type": "boolean" +}, +"oauth": { +"$ref": "OAuthRequirements", +"description": "The requirements for OAuth credentials." +}, +"requirements": { +"description": "Requirements for additional authentication providers.", +"items": { +"$ref": "AuthRequirement" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Backend": { +"description": "`Backend` defines the backend configuration for a service.", +"id": "Backend", +"properties": { +"rules": { +"description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "BackendRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"BackendRule": { +"description": "A backend rule provides configuration for an individual API element.", +"id": "BackendRule", +"properties": { +"address": { +"description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", +"type": "string" +}, +"deadline": { +"description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", +"format": "double", +"type": "number" +}, +"disableAuth": { +"description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", +"type": "boolean" +}, +"jwtAudience": { +"description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", +"type": "string" +}, +"minDeadline": { +"deprecated": true, +"description": "Deprecated, do not use.", +"format": "double", +"type": "number" +}, +"operationDeadline": { +"description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", +"format": "double", +"type": "number" +}, +"overridesByRequestProtocol": { +"additionalProperties": { +"$ref": "BackendRule" +}, +"description": "The map between request protocol and the backend address.", +"type": "object" +}, +"pathTranslation": { +"enum": [ +"PATH_TRANSLATION_UNSPECIFIED", +"CONSTANT_ADDRESS", +"APPEND_PATH_TO_ADDRESS" +], +"enumDescriptions": [ +"", +"Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe", +"The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" +], +"type": "string" +}, +"protocol": { +"description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", +"type": "string" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"BatchCreateAdminOverridesResponse": { +"description": "Response message for BatchCreateAdminOverrides", +"id": "BatchCreateAdminOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchCreateConsumerOverridesResponse": { +"description": "Response message for BatchCreateConsumerOverrides", +"id": "BatchCreateConsumerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchEnableServicesRequest": { +"description": "Request message for the `BatchEnableServices` method.", +"id": "BatchEnableServicesRequest", +"properties": { +"serviceIds": { +"description": "The identifiers of the services to enable on the project. A valid identifier would be: serviceusage.googleapis.com Enabling services requires that each service is public or is shared with the user enabling the service. A single request can enable a maximum of 20 services at a time. If more than 20 services are specified, the request will fail, and no state changes will occur.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchEnableServicesResponse": { +"description": "Response message for the `BatchEnableServices` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "BatchEnableServicesResponse", +"properties": { +"failures": { +"description": "If allow_partial_success is true, and one or more services could not be enabled, this field contains the details about each failure.", +"items": { +"$ref": "EnableFailure" +}, +"type": "array" +}, +"services": { +"description": "The new state of the services after enabling.", +"items": { +"$ref": "GoogleApiServiceusageV1Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchGetServicesResponse": { +"description": "Response message for the `BatchGetServices` method.", +"id": "BatchGetServicesResponse", +"properties": { +"services": { +"description": "The requested Service states.", +"items": { +"$ref": "GoogleApiServiceusageV1Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"Billing": { +"description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", +"id": "Billing", +"properties": { +"consumerDestinations": { +"description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", +"items": { +"$ref": "BillingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"BillingDestination": { +"description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", +"id": "BillingDestination", +"properties": { +"metrics": { +"description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"ClientLibrarySettings": { +"description": "Details about how and where to publish client libraries.", +"id": "ClientLibrarySettings", +"properties": { +"cppSettings": { +"$ref": "CppSettings", +"description": "Settings for C++ client libraries." +}, +"dotnetSettings": { +"$ref": "DotnetSettings", +"description": "Settings for .NET client libraries." +}, +"goSettings": { +"$ref": "GoSettings", +"description": "Settings for Go client libraries." +}, +"javaSettings": { +"$ref": "JavaSettings", +"description": "Settings for legacy Java features, supported in the Service YAML." +}, +"launchStage": { +"description": "Launch stage of this version of the API.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"nodeSettings": { +"$ref": "NodeSettings", +"description": "Settings for Node client libraries." +}, +"phpSettings": { +"$ref": "PhpSettings", +"description": "Settings for PHP client libraries." +}, +"pythonSettings": { +"$ref": "PythonSettings", +"description": "Settings for Python client libraries." +}, +"restNumericEnums": { +"description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", +"type": "boolean" +}, +"rubySettings": { +"$ref": "RubySettings", +"description": "Settings for Ruby client libraries." +}, +"version": { +"description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", +"type": "string" +} +}, +"type": "object" +}, +"CommonLanguageSettings": { +"description": "Required information for every language.", +"id": "CommonLanguageSettings", +"properties": { +"destinations": { +"description": "The destination where API teams want this client library to be published.", +"items": { +"enum": [ +"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", +"GITHUB", +"PACKAGE_MANAGER" +], +"enumDescriptions": [ +"Client libraries will neither be generated nor published to package managers.", +"Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", +"Publish the library to package managers like nuget.org and npmjs.com." +], +"type": "string" +}, +"type": "array" +}, +"referenceDocsUri": { +"deprecated": true, +"description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", +"type": "string" +} +}, +"type": "object" +}, +"ConsumerPolicy": { +"description": "Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.", +"id": "ConsumerPolicy", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. [AIP-128](https://google.aip.dev/128#annotations)", +"type": "object" +}, +"enableRules": { +"description": "Enable rules define usable services and service groups.", +"items": { +"$ref": "EnableRule" +}, +"type": "array" +}, +"etag": { +"description": "An opaque tag indicating the current version of the policy, used for concurrency control.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the policy. We only allow consumer policy name as `default` for now: `projects/12345/consumerPolicies/default`, `folders/12345/consumerPolicies/default`, `organizations/12345/consumerPolicies/default`.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "The last-modified time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Context": { +"description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using \u201cx-goog-ext--bin\u201d and \u201cx-goog-ext--jspb\u201d format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", +"id": "Context", +"properties": { +"rules": { +"description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "ContextRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContextRule": { +"description": "A context rule provides information about the context for an individual API element.", +"id": "ContextRule", +"properties": { +"allowedRequestExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowedResponseExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", +"items": { +"type": "string" +}, +"type": "array" +}, +"provided": { +"description": "A list of full type names of provided contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requested": { +"description": "A list of full type names of requested contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Control": { +"description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", +"id": "Control", +"properties": { +"environment": { +"description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", +"type": "string" +}, +"methodPolicies": { +"description": "Defines policies applying to the API methods of the service.", +"items": { +"$ref": "MethodPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"CppSettings": { +"description": "Settings for C++ client libraries.", +"id": "CppSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"CreateAdminQuotaPolicyMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by CreateAdminQuotaPolicy.", +"id": "CreateAdminQuotaPolicyMetadata", +"properties": {}, +"type": "object" +}, +"CustomError": { +"description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", +"id": "CustomError", +"properties": { +"rules": { +"description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "CustomErrorRule" +}, +"type": "array" +}, +"types": { +"description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CustomErrorRule": { +"description": "A custom error rule.", +"id": "CustomErrorRule", +"properties": { +"isErrorType": { +"description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", +"type": "boolean" +}, +"selector": { +"description": "Selects messages to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"CustomHttpPattern": { +"description": "A custom pattern is used for defining custom HTTP verb.", +"id": "CustomHttpPattern", +"properties": { +"kind": { +"description": "The name of this custom HTTP verb.", +"type": "string" +}, +"path": { +"description": "The path matched by this custom verb.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteAdminQuotaPolicyMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by DeleteAdminQuotaPolicy.", +"id": "DeleteAdminQuotaPolicyMetadata", +"properties": {}, +"type": "object" +}, +"DisableServiceRequest": { +"description": "Request message for the `DisableService` method.", +"id": "DisableServiceRequest", +"properties": { +"checkIfServiceHasUsage": { +"description": "Defines the behavior for checking service usage when disabling a service.", +"enum": [ +"CHECK_IF_SERVICE_HAS_USAGE_UNSPECIFIED", +"SKIP", +"CHECK" +], +"enumDescriptions": [ +"When unset, the default behavior is used, which is SKIP.", +"If set, skip checking service usage when disabling a service.", +"If set, service usage is checked when disabling the service. If a service, or its dependents, has usage in the last 30 days, the request returns a FAILED_PRECONDITION error." +], +"type": "string" +}, +"disableDependentServices": { +"description": "Indicates if services that are enabled and which depend on this service should also be disabled. If not set, an error will be generated if any enabled services depend on the service to be disabled. When set, the service, and any enabled services that depend on it, will be disabled together.", +"type": "boolean" +} +}, +"type": "object" +}, +"DisableServiceResponse": { +"description": "Response message for the `DisableService` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "DisableServiceResponse", +"properties": { +"service": { +"$ref": "GoogleApiServiceusageV1Service", +"description": "The new state of the service after disabling." +} +}, +"type": "object" +}, +"Documentation": { +"description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", +"id": "Documentation", +"properties": { +"documentationRootUrl": { +"description": "The URL to the root of documentation.", +"type": "string" +}, +"overview": { +"description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", +"type": "string" +}, +"pages": { +"description": "The top level pages for the documentation set.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"rules": { +"description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "DocumentationRule" +}, +"type": "array" +}, +"sectionOverrides": { +"description": "Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"serviceRootUrl": { +"description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", +"type": "string" +}, +"summary": { +"description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentationRule": { +"description": "A documentation rule provides information about individual API elements.", +"id": "DocumentationRule", +"properties": { +"deprecationDescription": { +"description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", +"type": "string" +}, +"description": { +"description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.", +"type": "string" +}, +"disableReplacementWords": { +"description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.", +"type": "string" +}, +"selector": { +"description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", +"type": "string" +} +}, +"type": "object" +}, +"DotnetSettings": { +"description": "Settings for Dotnet client libraries.", +"id": "DotnetSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"forcedNamespaceAliases": { +"description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", +"items": { +"type": "string" +}, +"type": "array" +}, +"handwrittenSignatures": { +"description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoredResources": { +"description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"renamedResources": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", +"type": "object" +}, +"renamedServices": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", +"type": "object" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnableFailure": { +"description": "Provides error messages for the failing services.", +"id": "EnableFailure", +"properties": { +"errorMessage": { +"description": "An error message describing why the service could not be enabled.", +"type": "string" +}, +"serviceId": { +"description": "The service id of a service that could not be enabled.", +"type": "string" +} +}, +"type": "object" +}, +"EnableRule": { +"description": "The consumer policy rule that defines usable services and service groups.", +"id": "EnableRule", +"properties": { +"enableType": { +"description": "Client and resource project enable type.", +"enum": [ +"ENABLE_TYPE_UNSPECIFIED", +"CLIENT", +"RESOURCE", +"V1_COMPATIBLE" +], +"enumDescriptions": [ +"Unspecified enable type, which means enabled as both client and resource project.", +"Enable all clients under the CRM node specified by `ConsumerPolicy.name` to use the listed services. A client can be an API key, an OAuth client, or a service account.", +"Enable resources in the list services to be created and used under the CRM node specified by the `ConsumerPolicy.name`.", +"Activation made by Service Usage v1 API. This will be how consumers differentiate between policy changes made by v1 and v2 clients and understand what is actually possible based on those different policies." +], +"type": "string" +}, +"groups": { +"deprecated": true, +"description": "DEPRECATED: Please use field `values`. Service group should have prefix `groups/`. The names of the service groups that are enabled (Not Implemented). Example: `groups/googleServices`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"services": { +"deprecated": true, +"description": "DEPRECATED: Please use field `values`. Service should have prefix `services/`. The names of the services that are enabled. Example: `storage.googleapis.com`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"values": { +"description": "The names of the services or service groups that are enabled. Example: `services/storage.googleapis.com`, `groups/googleServices`, `groups/allServices`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"EnableServiceRequest": { +"description": "Request message for the `EnableService` method.", +"id": "EnableServiceRequest", +"properties": {}, +"type": "object" +}, +"EnableServiceResponse": { +"description": "Response message for the `EnableService` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "EnableServiceResponse", +"properties": { +"service": { +"$ref": "GoogleApiServiceusageV1Service", +"description": "The new state of the service after enabling." +} +}, +"type": "object" +}, +"Endpoint": { +"description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", +"id": "Endpoint", +"properties": { +"aliases": { +"deprecated": true, +"description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowCors": { +"description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", +"type": "boolean" +}, +"name": { +"description": "The canonical name of this endpoint.", +"type": "string" +}, +"target": { +"description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", +"type": "string" +} +}, +"type": "object" +}, +"Enum": { +"description": "Enum type definition.", +"id": "Enum", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"enumvalue": { +"description": "Enum value definitions.", +"items": { +"$ref": "EnumValue" +}, +"type": "array" +}, +"name": { +"description": "Enum type name.", +"type": "string" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"EnumValue": { +"description": "Enum value definition.", +"id": "EnumValue", +"properties": { +"name": { +"description": "Enum value name.", +"type": "string" +}, +"number": { +"description": "Enum value number.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FieldPolicy": { +"description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", +"id": "FieldPolicy", +"properties": { +"resourcePermission": { +"description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", +"type": "string" +}, +"resourceType": { +"description": "Specifies the resource type for the resource referred to by the field.", +"type": "string" +}, +"selector": { +"description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", +"type": "string" +} +}, +"type": "object" +}, +"GetServiceIdentityMetadata": { +"description": "Metadata for the `GetServiceIdentity` method.", +"id": "GetServiceIdentityMetadata", +"properties": {}, +"type": "object" +}, +"GetServiceIdentityResponse": { +"description": "Response message for getting service identity.", +"id": "GetServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "ServiceIdentity", +"description": "Service identity that service producer can use to access consumer resources. If exists is true, it contains email and unique_id. If exists is false, it contains pre-constructed email and empty unique_id." +}, +"state": { +"description": "Service identity state.", +"enum": [ +"IDENTITY_STATE_UNSPECIFIED", +"ACTIVE" +], +"enumDescriptions": [ +"Default service identity state. This value is used if the state is omitted.", +"Service identity has been created and can be used." +], +"type": "string" +} +}, +"type": "object" +}, +"GoSettings": { +"description": "Settings for Go client libraries.", +"id": "GoSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"GoogleApiService": { +"description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", +"id": "GoogleApiService", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration." +}, +"backend": { +"$ref": "Backend", +"description": "API backend configuration." +}, +"billing": { +"$ref": "Billing", +"description": "Billing configuration." +}, +"configVersion": { +"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", +"format": "uint32", +"type": "integer" +}, +"context": { +"$ref": "Context", +"description": "Context configuration." +}, +"control": { +"$ref": "Control", +"description": "Configuration for the service control plane." +}, +"customError": { +"$ref": "CustomError", +"description": "Custom error configuration." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation." +}, +"endpoints": { +"description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"enums": { +"description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", +"items": { +"$ref": "Enum" +}, +"type": "array" +}, +"http": { +"$ref": "Http", +"description": "HTTP configuration." +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", +"type": "string" +}, +"logging": { +"$ref": "Logging", +"description": "Logging configuration." +}, +"logs": { +"description": "Defines the logs used by this service.", +"items": { +"$ref": "LogDescriptor" +}, +"type": "array" +}, +"metrics": { +"description": "Defines the metrics used by this service.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration." +}, +"name": { +"description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", +"type": "string" +}, +"producerProjectId": { +"description": "The Google project that owns this service.", +"type": "string" +}, +"publishing": { +"$ref": "Publishing", +"description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"sourceInfo": { +"$ref": "SourceInfo", +"description": "Output only. The source information for this configuration if available." +}, +"systemParameters": { +"$ref": "SystemParameters", +"description": "System parameter configuration." +}, +"systemTypes": { +"description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"title": { +"description": "The product title for this service, it is the name displayed in Google Cloud Console.", +"type": "string" +}, +"types": { +"description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1OperationMetadata": { +"description": "The operation metadata returned for the batchend services operation.", +"id": "GoogleApiServiceusageV1OperationMetadata", +"properties": { +"resourceNames": { +"description": "The full name of the resources that this operation is directly associated with.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1Service": { +"description": "A service that is available for use by the consumer.", +"id": "GoogleApiServiceusageV1Service", +"properties": { +"config": { +"$ref": "GoogleApiServiceusageV1ServiceConfig", +"description": "The service configuration of the available service. Some fields may be filtered out of the configuration in responses to the `ListServices` method. These fields are present only in responses to the `GetService` method." +}, +"name": { +"description": "The resource name of the consumer and service. A valid name would be: - projects/123/services/serviceusage.googleapis.com", +"type": "string" +}, +"parent": { +"description": "The resource name of the consumer. A valid name would be: - projects/123", +"type": "string" +}, +"state": { +"description": "Whether or not the service has been enabled for use by the consumer.", +"enum": [ +"STATE_UNSPECIFIED", +"DISABLED", +"ENABLED" +], +"enumDescriptions": [ +"The default value, which indicates that the enabled state of the service is unspecified or not meaningful. Currently, all consumers other than projects (such as folders and organizations) are always in this state.", +"The service cannot be used by this consumer. It has either been explicitly disabled, or has never been enabled.", +"The service has been explicitly enabled for use by this consumer." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1ServiceConfig": { +"description": "The configuration of the service.", +"id": "GoogleApiServiceusageV1ServiceConfig", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Contains only the names, versions, and method names of the interfaces.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration. Contains only the OAuth rules." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation. Contains only the summary and the documentation URL." +}, +"endpoints": { +"description": "Configuration for network endpoints. Contains only the names and aliases of the endpoints.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration. This should not include the 'producer_destinations' field." +}, +"name": { +"description": "The DNS address at which this service is available. An example DNS address would be: `calendar.googleapis.com`.", +"type": "string" +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"title": { +"description": "The product title for this service.", +"type": "string" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1beta1GetServiceIdentityResponse": { +"description": "Response message for getting service identity.", +"id": "GoogleApiServiceusageV1beta1GetServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "GoogleApiServiceusageV1beta1ServiceIdentity", +"description": "Service identity that service producer can use to access consumer resources. If exists is true, it contains email and unique_id. If exists is false, it contains pre-constructed email and empty unique_id." +}, +"state": { +"description": "Service identity state.", +"enum": [ +"IDENTITY_STATE_UNSPECIFIED", +"ACTIVE" +], +"enumDescriptions": [ +"Default service identity state. This value is used if the state is omitted.", +"Service identity has been created and can be used." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1beta1ServiceIdentity": { +"description": "Service identity for a service. This is the identity that service producer should use to access consumer resources.", +"id": "GoogleApiServiceusageV1beta1ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service account that a service producer would use to access consumer resources.", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service account. https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts#ServiceAccount", +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV2alphaConsumerPolicy": { +"description": "Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.", +"id": "GoogleApiServiceusageV2alphaConsumerPolicy", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. [AIP-128](https://google.aip.dev/128#annotations)", +"type": "object" +}, +"createTime": { +"description": "Output only. The time the policy was created. For singleton policies, this is the first touch of the policy.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"enableRules": { +"description": "Enable rules define usable services, groups, and categories. There can currently be at most one `EnableRule`. This restriction will be lifted in later releases.", +"items": { +"$ref": "GoogleApiServiceusageV2alphaEnableRule" +}, +"type": "array" +}, +"etag": { +"description": "Output only. An opaque tag indicating the current version of the policy, used for concurrency control.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the policy. Only the `default` policy is supported: `projects/12345/consumerPolicies/default`, `folders/12345/consumerPolicies/default`, `organizations/12345/consumerPolicies/default`.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the policy was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV2alphaEnableRule": { +"description": "The consumer policy rule that defines enabled services, groups, and categories.", +"id": "GoogleApiServiceusageV2alphaEnableRule", +"properties": { +"services": { +"description": "The names of the services that are enabled. Example: `services/storage.googleapis.com`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV2alphaUpdateConsumerPolicyMetadata": { +"description": "Metadata for the `UpdateConsumerPolicy` method.", +"id": "GoogleApiServiceusageV2alphaUpdateConsumerPolicyMetadata", +"properties": {}, +"type": "object" +}, +"Http": { +"description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", +"id": "Http", +"properties": { +"fullyDecodeReservedExpansion": { +"description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", +"type": "boolean" +}, +"rules": { +"description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRule": { +"description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A¶m=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", +"id": "HttpRule", +"properties": { +"additionalBindings": { +"description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +}, +"body": { +"description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", +"type": "string" +}, +"custom": { +"$ref": "CustomHttpPattern", +"description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." +}, +"delete": { +"description": "Maps to HTTP DELETE. Used for deleting a resource.", +"type": "string" +}, +"get": { +"description": "Maps to HTTP GET. Used for listing and getting information about resources.", +"type": "string" +}, +"patch": { +"description": "Maps to HTTP PATCH. Used for updating a resource.", +"type": "string" +}, +"post": { +"description": "Maps to HTTP POST. Used for creating a resource or performing an action.", +"type": "string" +}, +"put": { +"description": "Maps to HTTP PUT. Used for replacing a resource.", +"type": "string" +}, +"responseBody": { +"description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", +"type": "string" +}, +"selector": { +"description": "Selects a method to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"ImportAdminOverridesMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportAdminOverrides.", +"id": "ImportAdminOverridesMetadata", +"properties": {}, +"type": "object" +}, +"ImportAdminOverridesResponse": { +"description": "Response message for ImportAdminOverrides", +"id": "ImportAdminOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created from the imported data.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImportAdminQuotaPoliciesMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportAdminQuotaPolicies.", +"id": "ImportAdminQuotaPoliciesMetadata", +"properties": {}, +"type": "object" +}, +"ImportAdminQuotaPoliciesResponse": { +"description": "Response message for ImportAdminQuotaPolicies", +"id": "ImportAdminQuotaPoliciesResponse", +"properties": { +"policies": { +"description": "The policies that were created from the imported data.", +"items": { +"$ref": "AdminQuotaPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImportConsumerOverridesMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportConsumerOverrides.", +"id": "ImportConsumerOverridesMetadata", +"properties": {}, +"type": "object" +}, +"ImportConsumerOverridesResponse": { +"description": "Response message for ImportConsumerOverrides", +"id": "ImportConsumerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created from the imported data.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"JavaSettings": { +"description": "Settings for Java client libraries.", +"id": "JavaSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"libraryPackage": { +"description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", +"type": "string" +}, +"serviceClassNames": { +"additionalProperties": { +"type": "string" +}, +"description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", +"type": "object" +} +}, +"type": "object" +}, +"JwtLocation": { +"description": "Specifies a location to extract JWT from an API request.", +"id": "JwtLocation", +"properties": { +"cookie": { +"description": "Specifies cookie name to extract JWT token.", +"type": "string" +}, +"header": { +"description": "Specifies HTTP header name to extract JWT token.", +"type": "string" +}, +"query": { +"description": "Specifies URL query parameter name to extract JWT token.", +"type": "string" +}, +"valuePrefix": { +"description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The label key.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string. This is the default.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServicesResponse": { +"description": "Response message for the `ListServices` method.", +"id": "ListServicesResponse", +"properties": { +"nextPageToken": { +"description": "Token that can be passed to `ListServices` to resume a paginated query.", +"type": "string" +}, +"services": { +"description": "The available services for the requested project.", +"items": { +"$ref": "GoogleApiServiceusageV1Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogDescriptor": { +"description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", +"id": "LogDescriptor", +"properties": { +"description": { +"description": "A human-readable description of this log. This information appears in the documentation and can contain details.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name for this log. This information appears on the user interface and should be concise.", +"type": "string" +}, +"labels": { +"description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"name": { +"description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", +"type": "string" +} +}, +"type": "object" +}, +"Logging": { +"description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", +"id": "Logging", +"properties": { +"consumerDestinations": { +"description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingDestination": { +"description": "Configuration of a specific logging destination (the producer project or the consumer project).", +"id": "LoggingDestination", +"properties": { +"logs": { +"description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"LongRunning": { +"description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", +"id": "LongRunning", +"properties": { +"initialPollDelay": { +"description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", +"format": "google-duration", +"type": "string" +}, +"maxPollDelay": { +"description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", +"format": "google-duration", +"type": "string" +}, +"pollDelayMultiplier": { +"description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", +"format": "float", +"type": "number" +}, +"totalPollTimeout": { +"description": "Total polling timeout. Default value: 5 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Method": { +"description": "Method represents a method of an API interface.", +"id": "Method", +"properties": { +"name": { +"description": "The simple name of this method.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the method.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"requestStreaming": { +"description": "If true, the request is streamed.", +"type": "boolean" +}, +"requestTypeUrl": { +"description": "A URL of the input message type.", +"type": "string" +}, +"responseStreaming": { +"description": "If true, the response is streamed.", +"type": "boolean" +}, +"responseTypeUrl": { +"description": "The URL of the output message type.", +"type": "string" +}, +"syntax": { +"description": "The source syntax of this method.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"MethodPolicy": { +"description": "Defines policies applying to an RPC method.", +"id": "MethodPolicy", +"properties": { +"requestPolicies": { +"description": "Policies that are applicable to the request message.", +"items": { +"$ref": "FieldPolicy" +}, +"type": "array" +}, +"selector": { +"description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", +"type": "string" +} +}, +"type": "object" +}, +"MethodSettings": { +"description": "Describes the generator configuration for a method.", +"id": "MethodSettings", +"properties": { +"autoPopulatedFields": { +"description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", +"items": { +"type": "string" +}, +"type": "array" +}, +"longRunning": { +"$ref": "LongRunning", +"description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" +}, +"selector": { +"description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a `Distribution`.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRule": { +"description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", +"id": "MetricRule", +"properties": { +"metricCosts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", +"type": "object" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Mixin": { +"description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", +"id": "Mixin", +"properties": { +"name": { +"description": "The fully qualified name of the interface which is included.", +"type": "string" +}, +"root": { +"description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"Monitoring": { +"description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", +"id": "Monitoring", +"properties": { +"consumerDestinations": { +"description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonitoringDestination": { +"description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", +"id": "MonitoringDestination", +"properties": { +"metrics": { +"description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"NodeSettings": { +"description": "Settings for Node client libraries.", +"id": "NodeSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"OAuthRequirements": { +"description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", +"id": "OAuthRequirements", +"properties": { +"canonicalScopes": { +"description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "The operation metadata returned for the batchend services operation.", +"id": "OperationMetadata", +"properties": { +"resourceNames": { +"description": "The full name of the resources that this operation is directly associated with.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"Page": { +"description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", +"id": "Page", +"properties": { +"content": { +"description": "The Markdown content of the page. You can use (== include {path} ==) to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", +"type": "string" +}, +"name": { +"description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", +"type": "string" +}, +"subpages": { +"description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", +"items": { +"$ref": "Page" +}, +"type": "array" +} +}, +"type": "object" +}, +"PhpSettings": { +"description": "Settings for Php client libraries.", +"id": "PhpSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Publishing": { +"description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", +"id": "Publishing", +"properties": { +"apiShortName": { +"description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", +"type": "string" +}, +"codeownerGithubTeams": { +"description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", +"items": { +"type": "string" +}, +"type": "array" +}, +"docTagPrefix": { +"description": "A prefix used in sample code when demarking regions to be included in documentation.", +"type": "string" +}, +"documentationUri": { +"description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", +"type": "string" +}, +"githubLabel": { +"description": "GitHub label to apply to issues and pull requests opened for this API.", +"type": "string" +}, +"librarySettings": { +"description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", +"items": { +"$ref": "ClientLibrarySettings" +}, +"type": "array" +}, +"methodSettings": { +"description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", +"items": { +"$ref": "MethodSettings" +}, +"type": "array" +}, +"newIssueUri": { +"description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103", +"type": "string" +}, +"organization": { +"description": "For whom the client library is being published.", +"enum": [ +"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", +"CLOUD", +"ADS", +"PHOTOS", +"STREET_VIEW", +"SHOPPING", +"GEO", +"GENERATIVE_AI" +], +"enumDescriptions": [ +"Not useful.", +"Google Cloud Platform Org.", +"Ads (Advertising) Org.", +"Photos Org.", +"Street View Org.", +"Shopping Org.", +"Geo Org.", +"Generative AI - https://developers.generativeai.google" +], +"type": "string" +}, +"protoReferenceDocumentationUri": { +"description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", +"type": "string" +}, +"restReferenceDocumentationUri": { +"description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", +"type": "string" +} +}, +"type": "object" +}, +"PythonSettings": { +"description": "Settings for Python client libraries.", +"id": "PythonSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Quota": { +"description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", +"id": "Quota", +"properties": { +"limits": { +"description": "List of QuotaLimit definitions for the service.", +"items": { +"$ref": "QuotaLimit" +}, +"type": "array" +}, +"metricRules": { +"description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", +"items": { +"$ref": "MetricRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaLimit": { +"description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", +"id": "QuotaLimit", +"properties": { +"defaultLimit": { +"description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"description": { +"description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", +"type": "string" +}, +"displayName": { +"description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", +"type": "string" +}, +"duration": { +"description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", +"type": "string" +}, +"freeTier": { +"description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"maxLimit": { +"description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"metric": { +"description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", +"type": "string" +}, +"name": { +"description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", +"type": "string" +}, +"unit": { +"description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", +"type": "string" +}, +"values": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", +"type": "object" +} +}, +"type": "object" +}, +"QuotaOverride": { +"description": "A quota override", +"id": "QuotaOverride", +"properties": { +"adminOverrideAncestor": { +"description": "The resource name of the ancestor that requested the override. For example: `organizations/12345` or `folders/67890`. Used by admin overrides only.", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": "If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the override is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in `{brackets}` in the unit (besides `{project}` or `{user}`) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota overrides that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this override applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the override. This name is generated by the server when the override is created. Example names would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d` `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.", +"type": "string" +}, +"overrideValue": { +"description": "The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this override applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"RemoveEnableRulesMetadata": { +"description": "Metadata for the `RemoveEnableRules` method.", +"id": "RemoveEnableRulesMetadata", +"properties": {}, +"type": "object" +}, +"RemoveEnableRulesResponse": { +"description": "The response message of `RemoveEnableRules` method.", +"id": "RemoveEnableRulesResponse", +"properties": { +"parent": { +"description": "The parent consumer policy. It can be `projects/12345/consumerPolicies/default`, or `folders/12345/consumerPolicies/default`, or `organizations/12345/consumerPolicies/default`.", +"type": "string" +}, +"removedValues": { +"deprecated": true, +"description": "The values removed from the parent consumer policy.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"RubySettings": { +"description": "Settings for Ruby client libraries.", +"id": "RubySettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"ServiceIdentity": { +"description": "Service identity for a service. This is the identity that service producer should use to access consumer resources.", +"id": "ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service account that a service producer would use to access consumer resources.", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service account. https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts#ServiceAccount", +"type": "string" +} +}, +"type": "object" +}, +"SourceContext": { +"description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", +"type": "string" +} +}, +"type": "object" +}, +"SourceInfo": { +"description": "Source information used to create a Service Config", +"id": "SourceInfo", +"properties": { +"sourceFiles": { +"description": "All files used during config generation.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameter": { +"description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", +"id": "SystemParameter", +"properties": { +"httpHeader": { +"description": "Define the HTTP header name to use for the parameter. It is case insensitive.", +"type": "string" +}, +"name": { +"description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", +"type": "string" +}, +"urlQueryParameter": { +"description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameterRule": { +"description": "Define a system parameter rule mapping system parameter definitions to methods.", +"id": "SystemParameterRule", +"properties": { +"parameters": { +"description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", +"items": { +"$ref": "SystemParameter" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameters": { +"description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", +"id": "SystemParameters", +"properties": { +"rules": { +"description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "SystemParameterRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in `oneof` definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"UpdateAdminQuotaPolicyMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by UpdateAdminQuotaPolicy.", +"id": "UpdateAdminQuotaPolicyMetadata", +"properties": {}, +"type": "object" +}, +"UpdateConsumerPolicyMetadata": { +"description": "Metadata for the `UpdateConsumerPolicy` method.", +"id": "UpdateConsumerPolicyMetadata", +"properties": {}, +"type": "object" +}, +"Usage": { +"description": "Configuration controlling usage of a service.", +"id": "Usage", +"properties": { +"producerNotificationChannel": { +"description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", +"type": "string" +}, +"requirements": { +"description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rules": { +"description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "UsageRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"UsageRule": { +"description": "Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: \"*\" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allow_unregistered_calls: true", +"id": "UsageRule", +"properties": { +"allowUnregisteredCalls": { +"description": "If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.", +"type": "boolean" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +}, +"skipServiceControl": { +"description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Usage API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceusage.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceusage.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..784c845ff409cc4a722d8a80e24ccf669a8deb01 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/serviceusage.v1beta1.json @@ -0,0 +1,4135 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +}, +"https://www.googleapis.com/auth/service.management": { +"description": "Manage your Google API service configuration" +} +} +} +}, +"basePath": "", +"baseUrl": "https://serviceusage.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Service Usage", +"description": "Enables services that service consumers want to use on Google Cloud Platform, lists the available or enabled services, or disables services that service consumers no longer use.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/service-usage/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "serviceusage:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://serviceusage.mtls.googleapis.com/", +"name": "serviceusage", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/operations/{operationsId}", +"httpMethod": "GET", +"id": "serviceusage.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/operations", +"httpMethod": "GET", +"id": "serviceusage.operations.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"services": { +"methods": { +"batchEnable": { +"deprecated": true, +"description": "Enables multiple services on a project. The operation is atomic: if enabling any service fails, then the entire batch fails, and no state changes occur. Operation response type: `google.protobuf.Empty`", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services:batchEnable", +"httpMethod": "POST", +"id": "serviceusage.services.batchEnable", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Parent to enable services on. An example name would be: `projects/123` where `123` is the project number (not project ID). The `BatchEnableServices` method currently only supports projects.", +"location": "path", +"pattern": "^[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/services:batchEnable", +"request": { +"$ref": "BatchEnableServicesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"disable": { +"deprecated": true, +"description": "Disables a service so that it can no longer be used with a project. This prevents unintended usage that may cause unexpected billing charges or security leaks. It is not valid to call the disable method on a service that is not currently enabled. Callers will receive a `FAILED_PRECONDITION` status if the target service is not currently enabled. Operation response type: `google.protobuf.Empty`", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}:disable", +"httpMethod": "POST", +"id": "serviceusage.services.disable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of the consumer and service to disable the service on. The enable and disable methods currently only support projects. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:disable", +"request": { +"$ref": "DisableServiceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"enable": { +"deprecated": true, +"description": "Enables a service so that it can be used with a project. Operation response type: `google.protobuf.Empty`", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}:enable", +"httpMethod": "POST", +"id": "serviceusage.services.enable", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of the consumer and service to enable the service on. The `EnableService` and `DisableService` methods currently only support projects. Enabling a service requires that the service is public or is shared with the user enabling the service. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}:enable", +"request": { +"$ref": "EnableServiceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"generateServiceIdentity": { +"description": "Generates service identity for service.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}:generateServiceIdentity", +"httpMethod": "POST", +"id": "serviceusage.services.generateServiceIdentity", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Name of the consumer and service to generate an identity for. The `GenerateServiceIdentity` methods currently support projects, folders, organizations. Example parents would be: `projects/123/services/example.googleapis.com` `folders/123/services/example.googleapis.com` `organizations/123/services/example.googleapis.com`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}:generateServiceIdentity", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"get": { +"deprecated": true, +"description": "Returns the service configuration and enabled state for a given service.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}", +"httpMethod": "GET", +"id": "serviceusage.services.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Name of the consumer and service to get the `ConsumerState` for. An example name would be: `projects/123/services/serviceusage.googleapis.com` where `123` is the project number (not project ID).", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Service" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"list": { +"deprecated": true, +"description": "Lists all services available to the specified project, and the current state of those services with respect to the project. The list includes all public services, all services for which the calling user has the `servicemanagement.services.bind` permission, and all services that have already been enabled on the project. The list can be filtered to only include services in a specific state, for example to only include services enabled on the project.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services", +"httpMethod": "GET", +"id": "serviceusage.services.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Only list services that conform to the given filter. The allowed filter strings are `state:ENABLED` and `state:DISABLED`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested size of the next page of data. Requested page size cannot exceed 200. If not set, the default page size is 50.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with, which is returned by a previous list call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Parent to search for services on. An example name would be: `projects/123` where `123` is the project number (not project ID).", +"location": "path", +"pattern": "^[^/]+/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/services", +"response": { +"$ref": "ListServicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +} +}, +"resources": { +"consumerQuotaMetrics": { +"methods": { +"get": { +"description": "Retrieves a summary of quota information for a specific quota metric", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}", +"httpMethod": "GET", +"id": "serviceusage.services.consumerQuotaMetrics.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the quota limit. An example name would be: `projects/123/services/serviceusage.googleapis.com/quotas/metrics/serviceusage.googleapis.com%2Fmutate_requests`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies the level of detail for quota information in the response.", +"enum": [ +"QUOTA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"No quota view specified. Requests that do not specify a quota view will typically default to the BASIC view.", +"Only buckets with overrides are shown in the response.", +"Include per-location buckets even if they do not have overrides. When the view is FULL, and a limit has regional or zonal quota, the limit will include buckets for all regions or zones that could support overrides, even if none are currently present. In some cases this will cause the response to become very large; callers that do not need this extra information should use the BASIC view instead." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ConsumerQuotaMetric" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"importAdminOverrides": { +"description": "Creates or updates multiple admin overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics:importAdminOverrides", +"httpMethod": "POST", +"id": "serviceusage.services.consumerQuotaMetrics.importAdminOverrides", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/consumerQuotaMetrics:importAdminOverrides", +"request": { +"$ref": "ImportAdminOverridesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"importConsumerOverrides": { +"description": "Creates or updates multiple consumer overrides atomically, all on the same consumer, but on many different metrics or limits. The name field in the quota override message should not be set.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics:importConsumerOverrides", +"httpMethod": "POST", +"id": "serviceusage.services.consumerQuotaMetrics.importConsumerOverrides", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The resource name of the consumer. An example name would be: `projects/123/services/compute.googleapis.com`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/consumerQuotaMetrics:importConsumerOverrides", +"request": { +"$ref": "ImportConsumerOverridesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Retrieves a summary of all quota information visible to the service consumer, organized by service metric. Each metric includes information about all of its defined limits. Each limit includes the limit configuration (quota unit, preciseness, default value), the current effective limit value, and all of the overrides applied to the limit.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics", +"httpMethod": "GET", +"id": "serviceusage.services.consumerQuotaMetrics.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Requested size of the next page of data.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Parent of the quotas resource. Some example names would be: `projects/123/services/serviceconsumermanagement.googleapis.com` `folders/345/services/serviceconsumermanagement.googleapis.com` `organizations/456/services/serviceconsumermanagement.googleapis.com`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies the level of detail for quota information in the response.", +"enum": [ +"QUOTA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"No quota view specified. Requests that do not specify a quota view will typically default to the BASIC view.", +"Only buckets with overrides are shown in the response.", +"Include per-location buckets even if they do not have overrides. When the view is FULL, and a limit has regional or zonal quota, the limit will include buckets for all regions or zones that could support overrides, even if none are currently present. In some cases this will cause the response to become very large; callers that do not need this extra information should use the BASIC view instead." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+parent}/consumerQuotaMetrics", +"response": { +"$ref": "ListConsumerQuotaMetricsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +} +}, +"resources": { +"limits": { +"methods": { +"get": { +"description": "Retrieves a summary of quota information for a specific quota limit.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}", +"httpMethod": "GET", +"id": "serviceusage.services.consumerQuotaMetrics.limits.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the quota limit. Use the quota limit resource name returned by previous ListConsumerQuotaMetrics and GetConsumerQuotaMetric API calls.", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies the level of detail for quota information in the response.", +"enum": [ +"QUOTA_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"No quota view specified. Requests that do not specify a quota view will typically default to the BASIC view.", +"Only buckets with overrides are shown in the response.", +"Include per-location buckets even if they do not have overrides. When the view is FULL, and a limit has regional or zonal quota, the limit will include buckets for all regions or zones that could support overrides, even if none are currently present. In some cases this will cause the response to become very large; callers that do not need this extra information should use the BASIC view instead." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "ConsumerQuotaLimit" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +} +}, +"resources": { +"adminOverrides": { +"methods": { +"create": { +"description": "Creates an admin override. An admin override is applied by an administrator of a parent folder or parent organization of the consumer receiving the override. An admin override is intended to limit the amount of quota the consumer can use out of the total quota pool allocated to all children of the folder or organization.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/adminOverrides", +"httpMethod": "POST", +"id": "serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"force": { +"description": "Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"parent": { +"description": "The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/adminOverrides", +"request": { +"$ref": "QuotaOverride" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"delete": { +"description": "Deletes an admin override.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/adminOverrides/{adminOverridesId}", +"httpMethod": "DELETE", +"id": "serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"name": { +"description": "The resource name of the override to delete. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+/adminOverrides/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Lists all admin overrides on this limit.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/adminOverrides", +"httpMethod": "GET", +"id": "serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Requested size of the next page of data.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/adminOverrides", +"response": { +"$ref": "ListAdminOverridesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"patch": { +"description": "Updates an admin override.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/adminOverrides/{adminOverridesId}", +"httpMethod": "PATCH", +"id": "serviceusage.services.consumerQuotaMetrics.limits.adminOverrides.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"name": { +"description": "The resource name of the override to update. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+/adminOverrides/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Update only the specified fields of the override. If unset, all fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "QuotaOverride" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +}, +"consumerOverrides": { +"methods": { +"create": { +"description": "Creates a consumer override. A consumer override is applied to the consumer on its own authority to limit its own quota usage. Consumer overrides cannot be used to grant more quota than would be allowed by admin overrides, producer overrides, or the default limit of the service.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/consumerOverrides", +"httpMethod": "POST", +"id": "serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"force": { +"description": "Whether to force the creation of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"parent": { +"description": "The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/consumerOverrides", +"request": { +"$ref": "QuotaOverride" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"delete": { +"description": "Deletes a consumer override.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/consumerOverrides/{consumerOverridesId}", +"httpMethod": "DELETE", +"id": "serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Whether to force the deletion of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"name": { +"description": "The resource name of the override to delete. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+/consumerOverrides/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +}, +"list": { +"description": "Lists all consumer overrides on this limit.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/consumerOverrides", +"httpMethod": "GET", +"id": "serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Requested size of the next page of data.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The resource name of the parent quota limit, returned by a ListConsumerQuotaMetrics or GetConsumerQuotaMetric call. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/consumerOverrides", +"response": { +"$ref": "ListConsumerOverridesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +}, +"patch": { +"description": "Updates a consumer override.", +"flatPath": "v1beta1/{v1beta1Id}/{v1beta1Id1}/services/{servicesId}/consumerQuotaMetrics/{consumerQuotaMetricsId}/limits/{limitsId}/consumerOverrides/{consumerOverridesId}", +"httpMethod": "PATCH", +"id": "serviceusage.services.consumerQuotaMetrics.limits.consumerOverrides.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Whether to force the update of the quota override. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"location": "query", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"name": { +"description": "The resource name of the override to update. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d`", +"location": "path", +"pattern": "^[^/]+/[^/]+/services/[^/]+/consumerQuotaMetrics/[^/]+/limits/[^/]+/consumerOverrides/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Update only the specified fields of the override. If unset, all fields will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "QuotaOverride" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/service.management" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://serviceusage.googleapis.com/", +"schemas": { +"AddEnableRulesMetadata": { +"description": "Metadata for the `AddEnableRules` method.", +"id": "AddEnableRulesMetadata", +"properties": {}, +"type": "object" +}, +"AddEnableRulesResponse": { +"description": "The response message of `AddEnableRules` method.", +"id": "AddEnableRulesResponse", +"properties": { +"addedValues": { +"description": "The values added to the parent consumer policy.", +"items": { +"type": "string" +}, +"type": "array" +}, +"parent": { +"description": "The parent consumer policy. It can be `projects/12345/consumerPolicies/default`, or `folders/12345/consumerPolicies/default`, or `organizations/12345/consumerPolicies/default`.", +"type": "string" +} +}, +"type": "object" +}, +"AdminQuotaPolicy": { +"description": "Quota policy created by quota administrator.", +"id": "AdminQuotaPolicy", +"properties": { +"container": { +"description": "The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminQuotaPolicies/4a3f2c1d`", +"type": "string" +}, +"policyValue": { +"description": "The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"Api": { +"description": "Api is a light-weight descriptor for an API Interface. Interfaces are also described as \"protocol buffer services\" in some contexts, such as by the \"service\" keyword in a .proto file, but they are different from API Services, which represent a concrete implementation of an interface as opposed to simply a description of methods and bindings. They are also sometimes simply referred to as \"APIs\" in other contexts, such as the name of this message itself. See https://cloud.google.com/apis/design/glossary for detailed terminology.", +"id": "Api", +"properties": { +"methods": { +"description": "The methods of this interface, in unspecified order.", +"items": { +"$ref": "Method" +}, +"type": "array" +}, +"mixins": { +"description": "Included interfaces. See Mixin.", +"items": { +"$ref": "Mixin" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified name of this interface, including package name followed by the interface's simple name.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the interface.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "Source context for the protocol buffer service represented by this message." +}, +"syntax": { +"description": "The source syntax of the service.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +}, +"version": { +"description": "A version string for this interface. If specified, must have the form `major-version.minor-version`, as in `1.10`. If the minor version is omitted, it defaults to zero. If the entire version field is empty, the major version is derived from the package name, as outlined below. If the field is not empty, the version in the package name will be verified to be consistent with what is provided here. The versioning schema uses [semantic versioning](http://semver.org) where the major version number indicates a breaking change and the minor version an additive, non-breaking change. Both version numbers are signals to users what to expect from different versions, and should be carefully chosen based on the product plan. The major version is also reflected in the package name of the interface, which must end in `v`, as in `google.feature.v1`. For major versions 0 and 1, the suffix can be omitted. Zero major versions must only be used for experimental, non-GA interfaces. ", +"type": "string" +} +}, +"type": "object" +}, +"AuthProvider": { +"description": "Configuration for an authentication provider, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthProvider", +"properties": { +"audiences": { +"description": "The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, JWTs with audiences: - \"https://[service.name]/[google.protobuf.Api.name]\" - \"https://[service.name]/\" will be accepted. For example, if no audiences are in the setting, LibraryService API will accept JWTs with the following audiences: - https://library-example.googleapis.com/google.example.library.v1.LibraryService - https://library-example.googleapis.com/ Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"authorizationUrl": { +"description": "Redirect URL if JWT token is required but not present or is expired. Implement authorizationUrl of securityDefinitions in OpenAPI spec.", +"type": "string" +}, +"id": { +"description": "The unique identifier of the auth provider. It will be referred to by `AuthRequirement.provider_id`. Example: \"bookstore_auth\".", +"type": "string" +}, +"issuer": { +"description": "Identifies the principal that issued the JWT. See https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.1 Usually a URL or an email address. Example: https://securetoken.google.com Example: 1234567-compute@developer.gserviceaccount.com", +"type": "string" +}, +"jwksUri": { +"description": "URL of the provider's public key set to validate signature of the JWT. See [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). Optional if the key set document: - can be retrieved from [OpenID Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html) of the issuer. - can be inferred from the email domain of the issuer (e.g. a Google service account). Example: https://www.googleapis.com/oauth2/v1/certs", +"type": "string" +}, +"jwtLocations": { +"description": "Defines the locations to extract the JWT. For now it is only used by the Cloud Endpoints to store the OpenAPI extension [x-google-jwt-locations] (https://cloud.google.com/endpoints/docs/openapi/openapi-extensions#x-google-jwt-locations) JWT locations can be one of HTTP headers, URL query parameters or cookies. The rule is that the first match wins. If not specified, default to use following 3 locations: 1) Authorization: Bearer 2) x-goog-iap-jwt-assertion 3) access_token query parameter Default locations can be specified as followings: jwt_locations: - header: Authorization value_prefix: \"Bearer \" - header: x-goog-iap-jwt-assertion - query: access_token", +"items": { +"$ref": "JwtLocation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthRequirement": { +"description": "User-defined authentication requirements, including support for [JSON Web Token (JWT)](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32).", +"id": "AuthRequirement", +"properties": { +"audiences": { +"description": "NOTE: This will be deprecated soon, once AuthProvider.audiences is implemented and accepted in all the runtime components. The list of JWT [audiences](https://tools.ietf.org/html/draft-ietf-oauth-json-web-token-32#section-4.1.3). that are allowed to access. A JWT containing any of these audiences will be accepted. When this setting is absent, only JWTs with audience \"https://Service_name/API_name\" will be accepted. For example, if no audiences are in the setting, LibraryService API will only accept JWTs with the following audience \"https://library-example.googleapis.com/google.example.library.v1.LibraryService\". Example: audiences: bookstore_android.apps.googleusercontent.com, bookstore_web.apps.googleusercontent.com", +"type": "string" +}, +"providerId": { +"description": "id from authentication provider. Example: provider_id: bookstore_auth", +"type": "string" +} +}, +"type": "object" +}, +"Authentication": { +"description": "`Authentication` defines the authentication configuration for API methods provided by an API service. Example: name: calendar.googleapis.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth - selector: google.calendar.Delegate oauth: canonical_scopes: https://www.googleapis.com/auth/calendar.read", +"id": "Authentication", +"properties": { +"providers": { +"description": "Defines a set of authentication providers that a service supports.", +"items": { +"$ref": "AuthProvider" +}, +"type": "array" +}, +"rules": { +"description": "A list of authentication rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "AuthenticationRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"AuthenticationRule": { +"description": "Authentication rules for the service. By default, if a method has any authentication requirements, every request must include a valid credential matching one of the requirements. It's an error to include more than one kind of credential in a single request. If a method doesn't have any auth requirements, request credentials will be ignored.", +"id": "AuthenticationRule", +"properties": { +"allowWithoutCredential": { +"description": "If true, the service accepts API keys without any other credential. This flag only applies to HTTP and gRPC requests.", +"type": "boolean" +}, +"oauth": { +"$ref": "OAuthRequirements", +"description": "The requirements for OAuth credentials." +}, +"requirements": { +"description": "Requirements for additional authentication providers.", +"items": { +"$ref": "AuthRequirement" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Backend": { +"description": "`Backend` defines the backend configuration for a service.", +"id": "Backend", +"properties": { +"rules": { +"description": "A list of API backend rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "BackendRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"BackendRule": { +"description": "A backend rule provides configuration for an individual API element.", +"id": "BackendRule", +"properties": { +"address": { +"description": "The address of the API backend. The scheme is used to determine the backend protocol and security. The following schemes are accepted: SCHEME PROTOCOL SECURITY http:// HTTP None https:// HTTP TLS grpc:// gRPC None grpcs:// gRPC TLS It is recommended to explicitly include a scheme. Leaving out the scheme may cause constrasting behaviors across platforms. If the port is unspecified, the default is: - 80 for schemes without TLS - 443 for schemes with TLS For HTTP backends, use protocol to specify the protocol version.", +"type": "string" +}, +"deadline": { +"description": "The number of seconds to wait for a response from a request. The default varies based on the request protocol and deployment environment.", +"format": "double", +"type": "number" +}, +"disableAuth": { +"description": "When disable_auth is true, a JWT ID token won't be generated and the original \"Authorization\" HTTP header will be preserved. If the header is used to carry the original token and is expected by the backend, this field must be set to true to preserve the header.", +"type": "boolean" +}, +"jwtAudience": { +"description": "The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP \"authorization\" header, and sent to the backend.", +"type": "string" +}, +"minDeadline": { +"deprecated": true, +"description": "Deprecated, do not use.", +"format": "double", +"type": "number" +}, +"operationDeadline": { +"description": "The number of seconds to wait for the completion of a long running operation. The default is no deadline.", +"format": "double", +"type": "number" +}, +"overridesByRequestProtocol": { +"additionalProperties": { +"$ref": "BackendRule" +}, +"description": "The map between request protocol and the backend address.", +"type": "object" +}, +"pathTranslation": { +"enum": [ +"PATH_TRANSLATION_UNSPECIFIED", +"CONSTANT_ADDRESS", +"APPEND_PATH_TO_ADDRESS" +], +"enumDescriptions": [ +"", +"Use the backend address as-is, with no modification to the path. If the URL pattern contains variables, the variable names and values will be appended to the query string. If a query string parameter and a URL pattern variable have the same name, this may result in duplicate keys in the query string. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.cloudfunctions.net/getUser Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.cloudfunctions.net/getUser?cid=widgetworks&uid=johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.cloudfunctions.net/getUser?timezone=EST&cid=widgetworks&uid=johndoe", +"The request path will be appended to the backend address. # Examples Given the following operation config: Method path: /api/company/{cid}/user/{uid} Backend address: https://example.appspot.com Requests to the following request paths will call the backend at the translated path: Request path: /api/company/widgetworks/user/johndoe Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe Request path: /api/company/widgetworks/user/johndoe?timezone=EST Translated: https://example.appspot.com/api/company/widgetworks/user/johndoe?timezone=EST" +], +"type": "string" +}, +"protocol": { +"description": "The protocol used for sending a request to the backend. The supported values are \"http/1.1\" and \"h2\". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to \"h2\" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.", +"type": "string" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"BatchCreateAdminOverridesResponse": { +"description": "Response message for BatchCreateAdminOverrides", +"id": "BatchCreateAdminOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchCreateConsumerOverridesResponse": { +"description": "Response message for BatchCreateConsumerOverrides", +"id": "BatchCreateConsumerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchEnableServicesRequest": { +"description": "Request message for the `BatchEnableServices` method.", +"id": "BatchEnableServicesRequest", +"properties": { +"serviceIds": { +"description": "The identifiers of the services to enable on the project. A valid identifier would be: serviceusage.googleapis.com Enabling services requires that each service is public or is shared with the user enabling the service. Two or more services must be specified. To enable a single service, use the `EnableService` method instead. A single request can enable a maximum of 20 services at a time. If more than 20 services are specified, the request will fail, and no state changes will occur.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchEnableServicesResponse": { +"description": "Response message for the `BatchEnableServices` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "BatchEnableServicesResponse", +"properties": { +"failures": { +"description": "If allow_partial_success is true, and one or more services could not be enabled, this field contains the details about each failure.", +"items": { +"$ref": "EnableFailure" +}, +"type": "array" +}, +"services": { +"description": "The new state of the services after enabling.", +"items": { +"$ref": "GoogleApiServiceusageV1Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"Billing": { +"description": "Billing related configuration of the service. The following example shows how to configure monitored resources and metrics for billing, `consumer_destinations` is the only supported destination and the monitored resources need at least one label key `cloud.googleapis.com/location` to indicate the location of the billing usage, using different monitored resources between monitoring and billing is recommended so they can be evolved independently: monitored_resources: - type: library.googleapis.com/billing_branch labels: - key: cloud.googleapis.com/location description: | Predefined label to support billing location restriction. - key: city description: | Custom label to define the city where the library branch is located in. - key: name description: Custom label to define the name of the library branch. metrics: - name: library.googleapis.com/book/borrowed_count metric_kind: DELTA value_type: INT64 unit: \"1\" billing: consumer_destinations: - monitored_resource: library.googleapis.com/billing_branch metrics: - library.googleapis.com/book/borrowed_count", +"id": "Billing", +"properties": { +"consumerDestinations": { +"description": "Billing configurations for sending metrics to the consumer project. There can be multiple consumer destinations per service, each one must have a different monitored resource type. A metric can be used in at most one consumer destination.", +"items": { +"$ref": "BillingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"BillingDestination": { +"description": "Configuration of a specific billing destination (Currently only support bill against consumer project).", +"id": "BillingDestination", +"properties": { +"metrics": { +"description": "Names of the metrics to report to this billing destination. Each name must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"ClientLibrarySettings": { +"description": "Details about how and where to publish client libraries.", +"id": "ClientLibrarySettings", +"properties": { +"cppSettings": { +"$ref": "CppSettings", +"description": "Settings for C++ client libraries." +}, +"dotnetSettings": { +"$ref": "DotnetSettings", +"description": "Settings for .NET client libraries." +}, +"goSettings": { +"$ref": "GoSettings", +"description": "Settings for Go client libraries." +}, +"javaSettings": { +"$ref": "JavaSettings", +"description": "Settings for legacy Java features, supported in the Service YAML." +}, +"launchStage": { +"description": "Launch stage of this version of the API.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"nodeSettings": { +"$ref": "NodeSettings", +"description": "Settings for Node client libraries." +}, +"phpSettings": { +"$ref": "PhpSettings", +"description": "Settings for PHP client libraries." +}, +"pythonSettings": { +"$ref": "PythonSettings", +"description": "Settings for Python client libraries." +}, +"restNumericEnums": { +"description": "When using transport=rest, the client request will encode enums as numbers rather than strings.", +"type": "boolean" +}, +"rubySettings": { +"$ref": "RubySettings", +"description": "Settings for Ruby client libraries." +}, +"version": { +"description": "Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: \"google.cloud.speech.v1\" and \"google.spanner.admin.database.v1\".", +"type": "string" +} +}, +"type": "object" +}, +"CommonLanguageSettings": { +"description": "Required information for every language.", +"id": "CommonLanguageSettings", +"properties": { +"destinations": { +"description": "The destination where API teams want this client library to be published.", +"items": { +"enum": [ +"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED", +"GITHUB", +"PACKAGE_MANAGER" +], +"enumDescriptions": [ +"Client libraries will neither be generated nor published to package managers.", +"Generate the client library in a repo under github.com/googleapis, but don't publish it to package managers.", +"Publish the library to package managers like nuget.org and npmjs.com." +], +"type": "string" +}, +"type": "array" +}, +"referenceDocsUri": { +"deprecated": true, +"description": "Link to automatically generated reference documentation. Example: https://cloud.google.com/nodejs/docs/reference/asset/latest", +"type": "string" +} +}, +"type": "object" +}, +"ConsumerPolicy": { +"description": "Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.", +"id": "ConsumerPolicy", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. [AIP-128](https://google.aip.dev/128#annotations)", +"type": "object" +}, +"enableRules": { +"description": "Enable rules define usable services and service groups.", +"items": { +"$ref": "EnableRule" +}, +"type": "array" +}, +"etag": { +"description": "An opaque tag indicating the current version of the policy, used for concurrency control.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the policy. We only allow consumer policy name as `default` for now: `projects/12345/consumerPolicies/default`, `folders/12345/consumerPolicies/default`, `organizations/12345/consumerPolicies/default`.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "The last-modified time.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ConsumerQuotaLimit": { +"description": "Consumer quota settings for a quota limit.", +"id": "ConsumerQuotaLimit", +"properties": { +"allowsAdminOverrides": { +"description": "Whether admin overrides are allowed on this limit", +"type": "boolean" +}, +"isPrecise": { +"description": "Whether this limit is precise or imprecise.", +"type": "boolean" +}, +"metric": { +"description": "The name of the parent metric of this limit. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the quota limit. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.", +"type": "string" +}, +"quotaBuckets": { +"description": "Summary of the enforced quota buckets, organized by quota dimension, ordered from least specific to most specific (for example, the global default bucket, with no quota dimensions, will always appear first).", +"items": { +"$ref": "QuotaBucket" +}, +"type": "array" +}, +"supportedLocations": { +"description": "List of all supported locations. This field is present only if the limit has a {region} or {zone} dimension.", +"items": { +"type": "string" +}, +"type": "array" +}, +"unit": { +"description": "The limit unit. An example unit would be `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"ConsumerQuotaMetric": { +"description": "Consumer quota settings for a quota metric.", +"id": "ConsumerQuotaMetric", +"properties": { +"consumerQuotaLimits": { +"description": "The consumer quota for each quota limit defined on the metric.", +"items": { +"$ref": "ConsumerQuotaLimit" +}, +"type": "array" +}, +"descendantConsumerQuotaLimits": { +"description": "The quota limits targeting the descendant containers of the consumer in request. If the consumer in request is of type `organizations` or `folders`, the field will list per-project limits in the metric; if the consumer in request is of type `project`, the field will be empty. The `quota_buckets` field of each descendant consumer quota limit will not be populated.", +"items": { +"$ref": "ConsumerQuotaLimit" +}, +"type": "array" +}, +"displayName": { +"description": "The display name of the metric. An example name would be: `CPUs`", +"type": "string" +}, +"metric": { +"description": "The name of the metric. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the quota settings on this metric for this consumer. An example name would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported.", +"type": "string" +} +}, +"type": "object" +}, +"Context": { +"description": "`Context` defines which contexts an API requests. Example: context: rules: - selector: \"*\" requested: - google.rpc.context.ProjectContext - google.rpc.context.OriginContext The above specifies that all methods in the API request `google.rpc.context.ProjectContext` and `google.rpc.context.OriginContext`. Available context types are defined in package `google.rpc.context`. This also provides mechanism to allowlist any protobuf message extension that can be sent in grpc metadata using \u201cx-goog-ext--bin\u201d and \u201cx-goog-ext--jspb\u201d format. For example, list any service specific protobuf types that can appear in grpc metadata as follows in your yaml file: Example: context: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allowed_request_extensions: - google.foo.v1.NewExtension allowed_response_extensions: - google.foo.v1.NewExtension You can also specify extension ID instead of fully qualified extension name here.", +"id": "Context", +"properties": { +"rules": { +"description": "A list of RPC context rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "ContextRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContextRule": { +"description": "A context rule provides information about the context for an individual API element.", +"id": "ContextRule", +"properties": { +"allowedRequestExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from client to backend.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowedResponseExtensions": { +"description": "A list of full type names or extension IDs of extensions allowed in grpc side channel from backend to client.", +"items": { +"type": "string" +}, +"type": "array" +}, +"provided": { +"description": "A list of full type names of provided contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"requested": { +"description": "A list of full type names of requested contexts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Control": { +"description": "Selects and configures the service controller used by the service. Example: control: environment: servicecontrol.googleapis.com", +"id": "Control", +"properties": { +"environment": { +"description": "The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com", +"type": "string" +}, +"methodPolicies": { +"description": "Defines policies applying to the API methods of the service.", +"items": { +"$ref": "MethodPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"CppSettings": { +"description": "Settings for C++ client libraries.", +"id": "CppSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"CreateAdminQuotaPolicyMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by CreateAdminQuotaPolicy.", +"id": "CreateAdminQuotaPolicyMetadata", +"properties": {}, +"type": "object" +}, +"CustomError": { +"description": "Customize service error responses. For example, list any service specific protobuf types that can appear in error detail lists of error responses. Example: custom_error: types: - google.foo.v1.CustomError - google.foo.v1.AnotherError", +"id": "CustomError", +"properties": { +"rules": { +"description": "The list of custom error rules that apply to individual API messages. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "CustomErrorRule" +}, +"type": "array" +}, +"types": { +"description": "The list of custom error detail types, e.g. 'google.foo.v1.CustomError'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CustomErrorRule": { +"description": "A custom error rule.", +"id": "CustomErrorRule", +"properties": { +"isErrorType": { +"description": "Mark this message as possible payload in error response. Otherwise, objects of this type will be filtered when they appear in error payload.", +"type": "boolean" +}, +"selector": { +"description": "Selects messages to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"CustomHttpPattern": { +"description": "A custom pattern is used for defining custom HTTP verb.", +"id": "CustomHttpPattern", +"properties": { +"kind": { +"description": "The name of this custom HTTP verb.", +"type": "string" +}, +"path": { +"description": "The path matched by this custom verb.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteAdminQuotaPolicyMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by DeleteAdminQuotaPolicy.", +"id": "DeleteAdminQuotaPolicyMetadata", +"properties": {}, +"type": "object" +}, +"DisableServiceRequest": { +"description": "Request message for the `DisableService` method.", +"id": "DisableServiceRequest", +"properties": {}, +"type": "object" +}, +"DisableServiceResponse": { +"description": "Response message for the `DisableService` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "DisableServiceResponse", +"properties": { +"service": { +"$ref": "GoogleApiServiceusageV1Service", +"description": "The new state of the service after disabling." +} +}, +"type": "object" +}, +"Documentation": { +"description": "`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.", +"id": "Documentation", +"properties": { +"documentationRootUrl": { +"description": "The URL to the root of documentation.", +"type": "string" +}, +"overview": { +"description": "Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.", +"type": "string" +}, +"pages": { +"description": "The top level pages for the documentation set.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"rules": { +"description": "A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "DocumentationRule" +}, +"type": "array" +}, +"sectionOverrides": { +"description": "Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"serviceRootUrl": { +"description": "Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.", +"type": "string" +}, +"summary": { +"description": "A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentationRule": { +"description": "A documentation rule provides information about individual API elements.", +"id": "DocumentationRule", +"properties": { +"deprecationDescription": { +"description": "Deprecation description of the selected element(s). It can be provided if an element is marked as `deprecated`.", +"type": "string" +}, +"description": { +"description": "Description of the selected proto element (e.g. a message, a method, a 'service' definition, or a field). Defaults to leading & trailing comments taken from the proto source definition of the proto element.", +"type": "string" +}, +"disableReplacementWords": { +"description": "String of comma or space separated case-sensitive words for which method/field name replacement will be disabled by go/api-docgen.", +"type": "string" +}, +"selector": { +"description": "The selector is a comma-separated list of patterns for any element such as a method, a field, an enum value. Each pattern is a qualified name of the element which may end in \"*\", indicating a wildcard. Wildcards are only allowed at the end and for a whole component of the qualified name, i.e. \"foo.*\" is ok, but not \"foo.b*\" or \"foo.*.bar\". A wildcard will match one or more components. To specify a default for all applicable elements, the whole pattern \"*\" is used.", +"type": "string" +} +}, +"type": "object" +}, +"DotnetSettings": { +"description": "Settings for Dotnet client libraries.", +"id": "DotnetSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"forcedNamespaceAliases": { +"description": "Namespaces which must be aliased in snippets due to a known (but non-generator-predictable) naming collision", +"items": { +"type": "string" +}, +"type": "array" +}, +"handwrittenSignatures": { +"description": "Method signatures (in the form \"service.method(signature)\") which are provided separately, so shouldn't be generated. Snippets *calling* these methods are still generated, however.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ignoredResources": { +"description": "List of full resource types to ignore during generation. This is typically used for API-specific Location resources, which should be handled by the generator as if they were actually the common Location resources. Example entry: \"documentai.googleapis.com/Location\"", +"items": { +"type": "string" +}, +"type": "array" +}, +"renamedResources": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from full resource types to the effective short name for the resource. This is used when otherwise resource named from different services would cause naming collisions. Example entry: \"datalabeling.googleapis.com/Dataset\": \"DataLabelingDataset\"", +"type": "object" +}, +"renamedServices": { +"additionalProperties": { +"type": "string" +}, +"description": "Map from original service names to renamed versions. This is used when the default generated types would cause a naming conflict. (Neither name is fully-qualified.) Example: Subscriber to SubscriberServiceApi.", +"type": "object" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EnableFailure": { +"description": "Provides error messages for the failing services.", +"id": "EnableFailure", +"properties": { +"errorMessage": { +"description": "An error message describing why the service could not be enabled.", +"type": "string" +}, +"serviceId": { +"description": "The service id of a service that could not be enabled.", +"type": "string" +} +}, +"type": "object" +}, +"EnableRule": { +"description": "The consumer policy rule that defines usable services and service groups.", +"id": "EnableRule", +"properties": { +"enableType": { +"description": "Client and resource project enable type.", +"enum": [ +"ENABLE_TYPE_UNSPECIFIED", +"CLIENT", +"RESOURCE", +"V1_COMPATIBLE" +], +"enumDescriptions": [ +"Unspecified enable type, which means enabled as both client and resource project.", +"Enable all clients under the CRM node specified by `ConsumerPolicy.name` to use the listed services. A client can be an API key, an OAuth client, or a service account.", +"Enable resources in the list services to be created and used under the CRM node specified by the `ConsumerPolicy.name`.", +"Activation made by Service Usage v1 API. This will be how consumers differentiate between policy changes made by v1 and v2 clients and understand what is actually possible based on those different policies." +], +"type": "string" +}, +"groups": { +"deprecated": true, +"description": "DEPRECATED: Please use field `values`. Service group should have prefix `groups/`. The names of the service groups that are enabled (Not Implemented). Example: `groups/googleServices`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"services": { +"deprecated": true, +"description": "DEPRECATED: Please use field `values`. Service should have prefix `services/`. The names of the services that are enabled. Example: `storage.googleapis.com`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"values": { +"description": "The names of the services or service groups that are enabled. Example: `services/storage.googleapis.com`, `groups/googleServices`, `groups/allServices`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"EnableServiceRequest": { +"description": "Request message for the `EnableService` method.", +"id": "EnableServiceRequest", +"properties": {}, +"type": "object" +}, +"EnableServiceResponse": { +"description": "Response message for the `EnableService` method. This response message is assigned to the `response` field of the returned Operation when that operation is done.", +"id": "EnableServiceResponse", +"properties": { +"service": { +"$ref": "GoogleApiServiceusageV1Service", +"description": "The new state of the service after enabling." +} +}, +"type": "object" +}, +"Endpoint": { +"description": "`Endpoint` describes a network address of a service that serves a set of APIs. It is commonly known as a service endpoint. A service may expose any number of service endpoints, and all service endpoints share the same service definition, such as quota limits and monitoring metrics. Example: type: google.api.Service name: library-example.googleapis.com endpoints: # Declares network address `https://library-example.googleapis.com` # for service `library-example.googleapis.com`. The `https` scheme # is implicit for all service endpoints. Other schemes may be # supported in the future. - name: library-example.googleapis.com allow_cors: false - name: content-staging-library-example.googleapis.com # Allows HTTP OPTIONS calls to be passed to the API frontend, for it # to decide whether the subsequent cross-origin request is allowed # to proceed. allow_cors: true", +"id": "Endpoint", +"properties": { +"aliases": { +"deprecated": true, +"description": "Unimplemented. Dot not use. DEPRECATED: This field is no longer supported. Instead of using aliases, please specify multiple google.api.Endpoint for each of the intended aliases. Additional names that this endpoint will be hosted on.", +"items": { +"type": "string" +}, +"type": "array" +}, +"allowCors": { +"description": "Allowing [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing), aka cross-domain traffic, would allow the backends served from this endpoint to receive and respond to HTTP OPTIONS requests. The response will be used by the browser to determine whether the subsequent cross-origin request is allowed to proceed.", +"type": "boolean" +}, +"name": { +"description": "The canonical name of this endpoint.", +"type": "string" +}, +"target": { +"description": "The specification of an Internet routable address of API frontend that will handle requests to this [API Endpoint](https://cloud.google.com/apis/design/glossary). It should be either a valid IPv4 address or a fully-qualified domain name. For example, \"8.8.8.8\" or \"myservice.appspot.com\".", +"type": "string" +} +}, +"type": "object" +}, +"Enum": { +"description": "Enum type definition.", +"id": "Enum", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"enumvalue": { +"description": "Enum value definitions.", +"items": { +"$ref": "EnumValue" +}, +"type": "array" +}, +"name": { +"description": "Enum type name.", +"type": "string" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"EnumValue": { +"description": "Enum value definition.", +"id": "EnumValue", +"properties": { +"name": { +"description": "Enum value name.", +"type": "string" +}, +"number": { +"description": "Enum value number.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "Protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +} +}, +"type": "object" +}, +"Field": { +"description": "A single field of a message type.", +"id": "Field", +"properties": { +"cardinality": { +"description": "The field cardinality.", +"enum": [ +"CARDINALITY_UNKNOWN", +"CARDINALITY_OPTIONAL", +"CARDINALITY_REQUIRED", +"CARDINALITY_REPEATED" +], +"enumDescriptions": [ +"For fields with unknown cardinality.", +"For optional fields.", +"For required fields. Proto2 syntax only.", +"For repeated fields." +], +"type": "string" +}, +"defaultValue": { +"description": "The string value of the default value of this field. Proto2 syntax only.", +"type": "string" +}, +"jsonName": { +"description": "The field JSON name.", +"type": "string" +}, +"kind": { +"description": "The field type.", +"enum": [ +"TYPE_UNKNOWN", +"TYPE_DOUBLE", +"TYPE_FLOAT", +"TYPE_INT64", +"TYPE_UINT64", +"TYPE_INT32", +"TYPE_FIXED64", +"TYPE_FIXED32", +"TYPE_BOOL", +"TYPE_STRING", +"TYPE_GROUP", +"TYPE_MESSAGE", +"TYPE_BYTES", +"TYPE_UINT32", +"TYPE_ENUM", +"TYPE_SFIXED32", +"TYPE_SFIXED64", +"TYPE_SINT32", +"TYPE_SINT64" +], +"enumDescriptions": [ +"Field type unknown.", +"Field type double.", +"Field type float.", +"Field type int64.", +"Field type uint64.", +"Field type int32.", +"Field type fixed64.", +"Field type fixed32.", +"Field type bool.", +"Field type string.", +"Field type group. Proto2 syntax only, and deprecated.", +"Field type message.", +"Field type bytes.", +"Field type uint32.", +"Field type enum.", +"Field type sfixed32.", +"Field type sfixed64.", +"Field type sint32.", +"Field type sint64." +], +"type": "string" +}, +"name": { +"description": "The field name.", +"type": "string" +}, +"number": { +"description": "The field number.", +"format": "int32", +"type": "integer" +}, +"oneofIndex": { +"description": "The index of the field type in `Type.oneofs`, for message or enumeration types. The first type has index 1; zero means the type is not in the list.", +"format": "int32", +"type": "integer" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"packed": { +"description": "Whether to use alternative packed wire representation.", +"type": "boolean" +}, +"typeUrl": { +"description": "The field type URL, without the scheme, for message or enumeration types. Example: `\"type.googleapis.com/google.protobuf.Timestamp\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FieldPolicy": { +"description": "Google API Policy Annotation This message defines a simple API policy annotation that can be used to annotate API request and response message fields with applicable policies. One field may have multiple applicable policies that must all be satisfied before a request can be processed. This policy annotation is used to generate the overall policy that will be used for automatic runtime policy enforcement and documentation generation.", +"id": "FieldPolicy", +"properties": { +"resourcePermission": { +"description": "Specifies the required permission(s) for the resource referred to by the field. It requires the field contains a valid resource reference, and the request must pass the permission checks to proceed. For example, \"resourcemanager.projects.get\".", +"type": "string" +}, +"resourceType": { +"description": "Specifies the resource type for the resource referred to by the field.", +"type": "string" +}, +"selector": { +"description": "Selects one or more request or response message fields to apply this `FieldPolicy`. When a `FieldPolicy` is used in proto annotation, the selector must be left as empty. The service config generator will automatically fill the correct value. When a `FieldPolicy` is used in service config, the selector must be a comma-separated string with valid request or response field paths, such as \"foo.bar\" or \"foo.bar,foo.baz\".", +"type": "string" +} +}, +"type": "object" +}, +"GetServiceIdentityMetadata": { +"description": "Metadata for the `GetServiceIdentity` method.", +"id": "GetServiceIdentityMetadata", +"properties": {}, +"type": "object" +}, +"GetServiceIdentityResponse": { +"description": "Response message for getting service identity.", +"id": "GetServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "ServiceIdentity", +"description": "Service identity that service producer can use to access consumer resources. If exists is true, it contains email and unique_id. If exists is false, it contains pre-constructed email and empty unique_id." +}, +"state": { +"description": "Service identity state.", +"enum": [ +"IDENTITY_STATE_UNSPECIFIED", +"ACTIVE" +], +"enumDescriptions": [ +"Default service identity state. This value is used if the state is omitted.", +"Service identity has been created and can be used." +], +"type": "string" +} +}, +"type": "object" +}, +"GoSettings": { +"description": "Settings for Go client libraries.", +"id": "GoSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"GoogleApiService": { +"description": "`Service` is the root object of Google API service configuration (service config). It describes the basic information about a logical service, such as the service name and the user-facing title, and delegates other aspects to sub-sections. Each sub-section is either a proto message or a repeated proto message that configures a specific aspect, such as auth. For more information, see each proto message definition. Example: type: google.api.Service name: calendar.googleapis.com title: Google Calendar API apis: - name: google.calendar.v3.Calendar visibility: rules: - selector: \"google.calendar.v3.*\" restriction: PREVIEW backend: rules: - selector: \"google.calendar.v3.*\" address: calendar.example.com authentication: providers: - id: google_calendar_auth jwks_uri: https://www.googleapis.com/oauth2/v1/certs issuer: https://securetoken.google.com rules: - selector: \"*\" requirements: provider_id: google_calendar_auth", +"id": "GoogleApiService", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Only the `name` field of the google.protobuf.Api needs to be provided by the configuration author, as the remaining fields will be derived from the IDL during the normalization process. It is an error to specify an API interface here which cannot be resolved against the associated IDL files.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration." +}, +"backend": { +"$ref": "Backend", +"description": "API backend configuration." +}, +"billing": { +"$ref": "Billing", +"description": "Billing configuration." +}, +"configVersion": { +"description": "Obsolete. Do not use. This field has no semantic meaning. The service config compiler always sets this field to `3`.", +"format": "uint32", +"type": "integer" +}, +"context": { +"$ref": "Context", +"description": "Context configuration." +}, +"control": { +"$ref": "Control", +"description": "Configuration for the service control plane." +}, +"customError": { +"$ref": "CustomError", +"description": "Custom error configuration." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation." +}, +"endpoints": { +"description": "Configuration for network endpoints. If this is empty, then an endpoint with the same name as the service is automatically generated to service all defined APIs.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"enums": { +"description": "A list of all enum types included in this API service. Enums referenced directly or indirectly by the `apis` are automatically included. Enums which are not referenced but shall be included should be listed here by name by the configuration author. Example: enums: - name: google.someapi.v1.SomeEnum", +"items": { +"$ref": "Enum" +}, +"type": "array" +}, +"http": { +"$ref": "Http", +"description": "HTTP configuration." +}, +"id": { +"description": "A unique ID for a specific instance of this message, typically assigned by the client for tracking purpose. Must be no longer than 63 characters and only lower case letters, digits, '.', '_' and '-' are allowed. If empty, the server may choose to generate one instead.", +"type": "string" +}, +"logging": { +"$ref": "Logging", +"description": "Logging configuration." +}, +"logs": { +"description": "Defines the logs used by this service.", +"items": { +"$ref": "LogDescriptor" +}, +"type": "array" +}, +"metrics": { +"description": "Defines the metrics used by this service.", +"items": { +"$ref": "MetricDescriptor" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration." +}, +"name": { +"description": "The service name, which is a DNS-like logical identifier for the service, such as `calendar.googleapis.com`. The service name typically goes through DNS verification to make sure the owner of the service also owns the DNS name.", +"type": "string" +}, +"producerProjectId": { +"description": "The Google project that owns this service.", +"type": "string" +}, +"publishing": { +"$ref": "Publishing", +"description": "Settings for [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from APIs defined as protocol buffers." +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"sourceInfo": { +"$ref": "SourceInfo", +"description": "Output only. The source information for this configuration if available." +}, +"systemParameters": { +"$ref": "SystemParameters", +"description": "System parameter configuration." +}, +"systemTypes": { +"description": "A list of all proto message types included in this API service. It serves similar purpose as [google.api.Service.types], except that these types are not needed by user-defined APIs. Therefore, they will not show up in the generated discovery doc. This field should only be used to define system APIs in ESF.", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"title": { +"description": "The product title for this service, it is the name displayed in Google Cloud Console.", +"type": "string" +}, +"types": { +"description": "A list of all proto message types included in this API service. Types referenced directly or indirectly by the `apis` are automatically included. Messages which are not referenced but shall be included, such as types used by the `google.protobuf.Any` type, should be listed here by name by the configuration author. Example: types: - name: google.protobuf.Int32", +"items": { +"$ref": "Type" +}, +"type": "array" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1OperationMetadata": { +"description": "The operation metadata returned for the batchend services operation.", +"id": "GoogleApiServiceusageV1OperationMetadata", +"properties": { +"resourceNames": { +"description": "The full name of the resources that this operation is directly associated with.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1Service": { +"description": "A service that is available for use by the consumer.", +"id": "GoogleApiServiceusageV1Service", +"properties": { +"config": { +"$ref": "GoogleApiServiceusageV1ServiceConfig", +"description": "The service configuration of the available service. Some fields may be filtered out of the configuration in responses to the `ListServices` method. These fields are present only in responses to the `GetService` method." +}, +"name": { +"description": "The resource name of the consumer and service. A valid name would be: - projects/123/services/serviceusage.googleapis.com", +"type": "string" +}, +"parent": { +"description": "The resource name of the consumer. A valid name would be: - projects/123", +"type": "string" +}, +"state": { +"description": "Whether or not the service has been enabled for use by the consumer.", +"enum": [ +"STATE_UNSPECIFIED", +"DISABLED", +"ENABLED" +], +"enumDescriptions": [ +"The default value, which indicates that the enabled state of the service is unspecified or not meaningful. Currently, all consumers other than projects (such as folders and organizations) are always in this state.", +"The service cannot be used by this consumer. It has either been explicitly disabled, or has never been enabled.", +"The service has been explicitly enabled for use by this consumer." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1ServiceConfig": { +"description": "The configuration of the service.", +"id": "GoogleApiServiceusageV1ServiceConfig", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Contains only the names, versions, and method names of the interfaces.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration. Contains only the OAuth rules." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation. Contains only the summary and the documentation URL." +}, +"endpoints": { +"description": "Configuration for network endpoints. Contains only the names and aliases of the endpoints.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration. This should not include the 'producer_destinations' field." +}, +"name": { +"description": "The DNS address at which this service is available. An example DNS address would be: `calendar.googleapis.com`.", +"type": "string" +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"title": { +"description": "The product title for this service.", +"type": "string" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1beta1GetServiceIdentityResponse": { +"description": "Response message for getting service identity.", +"id": "GoogleApiServiceusageV1beta1GetServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "GoogleApiServiceusageV1beta1ServiceIdentity", +"description": "Service identity that service producer can use to access consumer resources. If exists is true, it contains email and unique_id. If exists is false, it contains pre-constructed email and empty unique_id." +}, +"state": { +"description": "Service identity state.", +"enum": [ +"IDENTITY_STATE_UNSPECIFIED", +"ACTIVE" +], +"enumDescriptions": [ +"Default service identity state. This value is used if the state is omitted.", +"Service identity has been created and can be used." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV1beta1ServiceIdentity": { +"description": "Service identity for a service. This is the identity that service producer should use to access consumer resources.", +"id": "GoogleApiServiceusageV1beta1ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service account that a service producer would use to access consumer resources.", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service account. https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts#ServiceAccount", +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV2alphaConsumerPolicy": { +"description": "Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.", +"id": "GoogleApiServiceusageV2alphaConsumerPolicy", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. [AIP-128](https://google.aip.dev/128#annotations)", +"type": "object" +}, +"createTime": { +"description": "Output only. The time the policy was created. For singleton policies, this is the first touch of the policy.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"enableRules": { +"description": "Enable rules define usable services, groups, and categories. There can currently be at most one `EnableRule`. This restriction will be lifted in later releases.", +"items": { +"$ref": "GoogleApiServiceusageV2alphaEnableRule" +}, +"type": "array" +}, +"etag": { +"description": "Output only. An opaque tag indicating the current version of the policy, used for concurrency control.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the policy. Only the `default` policy is supported: `projects/12345/consumerPolicies/default`, `folders/12345/consumerPolicies/default`, `organizations/12345/consumerPolicies/default`.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time the policy was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV2alphaEnableRule": { +"description": "The consumer policy rule that defines enabled services, groups, and categories.", +"id": "GoogleApiServiceusageV2alphaEnableRule", +"properties": { +"services": { +"description": "The names of the services that are enabled. Example: `services/storage.googleapis.com`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleApiServiceusageV2alphaUpdateConsumerPolicyMetadata": { +"description": "Metadata for the `UpdateConsumerPolicy` method.", +"id": "GoogleApiServiceusageV2alphaUpdateConsumerPolicyMetadata", +"properties": {}, +"type": "object" +}, +"Http": { +"description": "Defines the HTTP configuration for an API service. It contains a list of HttpRule, each specifying the mapping of an RPC method to one or more HTTP REST API methods.", +"id": "Http", +"properties": { +"fullyDecodeReservedExpansion": { +"description": "When set to true, URL path parameters will be fully URI-decoded except in cases of single segment matches in reserved expansion, where \"%2F\" will be left encoded. The default behavior is to not decode RFC 6570 reserved characters in multi segment matches.", +"type": "boolean" +}, +"rules": { +"description": "A list of HTTP configuration rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"HttpRule": { +"description": "# gRPC Transcoding gRPC Transcoding is a feature for mapping between a gRPC method and one or more HTTP REST endpoints. It allows developers to build a single API service that supports both gRPC APIs and REST APIs. Many systems, including [Google APIs](https://github.com/googleapis/googleapis), [Cloud Endpoints](https://cloud.google.com/endpoints), [gRPC Gateway](https://github.com/grpc-ecosystem/grpc-gateway), and [Envoy](https://github.com/envoyproxy/envoy) proxy support this feature and use it for large scale production services. `HttpRule` defines the schema of the gRPC/REST mapping. The mapping specifies how different portions of the gRPC request message are mapped to the URL path, URL query parameters, and HTTP request body. It also controls how the gRPC response message is mapped to the HTTP response body. `HttpRule` is typically specified as an `google.api.http` annotation on the gRPC method. Each mapping specifies a URL path template and an HTTP method. The path template may refer to one or more fields in the gRPC request message, as long as each field is a non-repeated field with a primitive (non-message) type. The path template controls how fields of the request message are mapped to the URL path. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/{name=messages/*}\" }; } } message GetMessageRequest { string name = 1; // Mapped to URL path. } message Message { string text = 1; // The resource content. } This enables an HTTP REST to gRPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(name: \"messages/123456\")` Any fields in the request message which are not bound by the path template automatically become HTTP query parameters if there is no HTTP request body. For example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get:\"/v1/messages/{message_id}\" }; } } message GetMessageRequest { message SubMessage { string subfield = 1; } string message_id = 1; // Mapped to URL path. int64 revision = 2; // Mapped to URL query parameter `revision`. SubMessage sub = 3; // Mapped to URL query parameter `sub.subfield`. } This enables a HTTP JSON to RPC mapping as below: HTTP | gRPC -----|----- `GET /v1/messages/123456?revision=2&sub.subfield=foo` | `GetMessage(message_id: \"123456\" revision: 2 sub: SubMessage(subfield: \"foo\"))` Note that fields which are mapped to URL query parameters must have a primitive type or a repeated primitive type or a non-repeated message type. In the case of a repeated type, the parameter can be repeated in the URL as `...?param=A¶m=B`. In the case of a message type, each field of the message is mapped to a separate parameter, such as `...?foo.a=A&foo.b=B&foo.c=C`. For HTTP methods that allow a request body, the `body` field specifies the mapping. Consider a REST update method on the message resource collection: service Messaging { rpc UpdateMessage(UpdateMessageRequest) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"message\" }; } } message UpdateMessageRequest { string message_id = 1; // mapped to the URL Message message = 2; // mapped to the body } The following HTTP JSON to RPC mapping is enabled, where the representation of the JSON in the request body is determined by protos JSON encoding: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" message { text: \"Hi!\" })` The special name `*` can be used in the body mapping to define that every field not bound by the path template should be mapped to the request body. This enables the following alternative definition of the update method: service Messaging { rpc UpdateMessage(Message) returns (Message) { option (google.api.http) = { patch: \"/v1/messages/{message_id}\" body: \"*\" }; } } message Message { string message_id = 1; string text = 2; } The following HTTP JSON to RPC mapping is enabled: HTTP | gRPC -----|----- `PATCH /v1/messages/123456 { \"text\": \"Hi!\" }` | `UpdateMessage(message_id: \"123456\" text: \"Hi!\")` Note that when using `*` in the body mapping, it is not possible to have HTTP parameters, as all fields not bound by the path end in the body. This makes this option more rarely used in practice when defining REST APIs. The common usage of `*` is in custom methods which don't use the URL at all for transferring data. It is possible to define multiple HTTP methods for one RPC by using the `additional_bindings` option. Example: service Messaging { rpc GetMessage(GetMessageRequest) returns (Message) { option (google.api.http) = { get: \"/v1/messages/{message_id}\" additional_bindings { get: \"/v1/users/{user_id}/messages/{message_id}\" } }; } } message GetMessageRequest { string message_id = 1; string user_id = 2; } This enables the following two alternative HTTP JSON to RPC mappings: HTTP | gRPC -----|----- `GET /v1/messages/123456` | `GetMessage(message_id: \"123456\")` `GET /v1/users/me/messages/123456` | `GetMessage(user_id: \"me\" message_id: \"123456\")` ## Rules for HTTP mapping 1. Leaf request fields (recursive expansion nested messages in the request message) are classified into three categories: - Fields referred by the path template. They are passed via the URL path. - Fields referred by the HttpRule.body. They are passed via the HTTP request body. - All other fields are passed via the URL query parameters, and the parameter name is the field path in the request message. A repeated field can be represented as multiple query parameters under the same name. 2. If HttpRule.body is \"*\", there is no URL query parameter, all fields are passed via URL path and HTTP request body. 3. If HttpRule.body is omitted, there is no HTTP request body, all fields are passed via URL path and URL query parameters. ### Path template syntax Template = \"/\" Segments [ Verb ] ; Segments = Segment { \"/\" Segment } ; Segment = \"*\" | \"**\" | LITERAL | Variable ; Variable = \"{\" FieldPath [ \"=\" Segments ] \"}\" ; FieldPath = IDENT { \".\" IDENT } ; Verb = \":\" LITERAL ; The syntax `*` matches a single URL path segment. The syntax `**` matches zero or more URL path segments, which must be the last part of the URL path except the `Verb`. The syntax `Variable` matches part of the URL path as specified by its template. A variable template must not contain other variables. If a variable matches a single path segment, its template may be omitted, e.g. `{var}` is equivalent to `{var=*}`. The syntax `LITERAL` matches literal text in the URL path. If the `LITERAL` contains any reserved character, such characters should be percent-encoded before the matching. If a variable contains exactly one path segment, such as `\"{var}\"` or `\"{var=*}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{var}`. If a variable contains multiple path segments, such as `\"{var=foo/*}\"` or `\"{var=**}\"`, when such a variable is expanded into a URL path on the client side, all characters except `[-_.~/0-9a-zA-Z]` are percent-encoded. The server side does the reverse decoding, except \"%2F\" and \"%2f\" are left unchanged. Such variables show up in the [Discovery Document](https://developers.google.com/discovery/v1/reference/apis) as `{+var}`. ## Using gRPC API Service Configuration gRPC API Service Configuration (service config) is a configuration language for configuring a gRPC service to become a user-facing product. The service config is simply the YAML representation of the `google.api.Service` proto message. As an alternative to annotating your proto file, you can configure gRPC transcoding in your service config YAML files. You do this by specifying a `HttpRule` that maps the gRPC method to a REST endpoint, achieving the same effect as the proto annotation. This can be particularly useful if you have a proto that is reused in multiple services. Note that any transcoding specified in the service config will override any matching transcoding configuration in the proto. Example: http: rules: # Selects a gRPC method and applies HttpRule to it. - selector: example.v1.Messaging.GetMessage get: /v1/messages/{message_id}/{sub.subfield} ## Special notes When gRPC Transcoding is used to map a gRPC to JSON REST endpoints, the proto to JSON conversion must follow the [proto3 specification](https://developers.google.com/protocol-buffers/docs/proto3#json). While the single segment variable follows the semantics of [RFC 6570](https://tools.ietf.org/html/rfc6570) Section 3.2.2 Simple String Expansion, the multi segment variable **does not** follow RFC 6570 Section 3.2.3 Reserved Expansion. The reason is that the Reserved Expansion does not expand special characters like `?` and `#`, which would lead to invalid URLs. As the result, gRPC Transcoding uses a custom encoding for multi segment variables. The path variables **must not** refer to any repeated or mapped field, because client libraries are not capable of handling such variable expansion. The path variables **must not** capture the leading \"/\" character. The reason is that the most common use case \"{var}\" does not capture the leading \"/\" character. For consistency, all path variables must share the same behavior. Repeated message fields must not be mapped to URL query parameters, because no client library can support such complicated mapping. If an API needs to use a JSON array for request or response body, it can map the request or response body to a repeated field. However, some gRPC Transcoding implementations may not support this feature.", +"id": "HttpRule", +"properties": { +"additionalBindings": { +"description": "Additional HTTP bindings for the selector. Nested bindings must not contain an `additional_bindings` field themselves (that is, the nesting may only be one level deep).", +"items": { +"$ref": "HttpRule" +}, +"type": "array" +}, +"body": { +"description": "The name of the request field whose value is mapped to the HTTP request body, or `*` for mapping all request fields not captured by the path pattern to the HTTP body, or omitted for not having any HTTP request body. NOTE: the referred field must be present at the top-level of the request message type.", +"type": "string" +}, +"custom": { +"$ref": "CustomHttpPattern", +"description": "The custom pattern is used for specifying an HTTP method that is not included in the `pattern` field, such as HEAD, or \"*\" to leave the HTTP method unspecified for this rule. The wild-card rule is useful for services that provide content to Web (HTML) clients." +}, +"delete": { +"description": "Maps to HTTP DELETE. Used for deleting a resource.", +"type": "string" +}, +"get": { +"description": "Maps to HTTP GET. Used for listing and getting information about resources.", +"type": "string" +}, +"patch": { +"description": "Maps to HTTP PATCH. Used for updating a resource.", +"type": "string" +}, +"post": { +"description": "Maps to HTTP POST. Used for creating a resource or performing an action.", +"type": "string" +}, +"put": { +"description": "Maps to HTTP PUT. Used for replacing a resource.", +"type": "string" +}, +"responseBody": { +"description": "Optional. The name of the response field whose value is mapped to the HTTP response body. When omitted, the entire response message will be used as the HTTP response body. NOTE: The referred field must be present at the top-level of the response message type.", +"type": "string" +}, +"selector": { +"description": "Selects a method to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"ImportAdminOverridesMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportAdminOverrides.", +"id": "ImportAdminOverridesMetadata", +"properties": {}, +"type": "object" +}, +"ImportAdminOverridesRequest": { +"description": "Request message for ImportAdminOverrides", +"id": "ImportAdminOverridesRequest", +"properties": { +"force": { +"description": "Whether to force the creation of the quota overrides. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"items": { +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"type": "string" +}, +"type": "array" +}, +"inlineSource": { +"$ref": "OverrideInlineSource", +"description": "The import data is specified in the request message itself" +} +}, +"type": "object" +}, +"ImportAdminOverridesResponse": { +"description": "Response message for ImportAdminOverrides", +"id": "ImportAdminOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created from the imported data.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImportAdminQuotaPoliciesMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportAdminQuotaPolicies.", +"id": "ImportAdminQuotaPoliciesMetadata", +"properties": {}, +"type": "object" +}, +"ImportAdminQuotaPoliciesResponse": { +"description": "Response message for ImportAdminQuotaPolicies", +"id": "ImportAdminQuotaPoliciesResponse", +"properties": { +"policies": { +"description": "The policies that were created from the imported data.", +"items": { +"$ref": "AdminQuotaPolicy" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImportConsumerOverridesMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by ImportConsumerOverrides.", +"id": "ImportConsumerOverridesMetadata", +"properties": {}, +"type": "object" +}, +"ImportConsumerOverridesRequest": { +"description": "Request message for ImportConsumerOverrides", +"id": "ImportConsumerOverridesRequest", +"properties": { +"force": { +"description": "Whether to force the creation of the quota overrides. Setting the force parameter to 'true' ignores all quota safety checks that would fail the request. QuotaSafetyCheck lists all such validations. If force is set to true, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"type": "boolean" +}, +"forceOnly": { +"description": "The list of quota safety checks to ignore before the override mutation. Unlike 'force' field that ignores all the quota safety checks, the 'force_only' field ignores only the specified checks; other checks are still enforced. The 'force' and 'force_only' fields cannot both be set. If force_only is specified, it is recommended to include a case id in \"X-Goog-Request-Reason\" header when sending the request.", +"items": { +"enum": [ +"QUOTA_SAFETY_CHECK_UNSPECIFIED", +"LIMIT_DECREASE_BELOW_USAGE", +"LIMIT_DECREASE_PERCENTAGE_TOO_HIGH" +], +"enumDescriptions": [ +"Unspecified quota safety check.", +"Validates that a quota mutation would not cause the consumer's effective limit to be lower than the consumer's quota usage.", +"Validates that a quota mutation would not cause the consumer's effective limit to decrease by more than 10 percent." +], +"type": "string" +}, +"type": "array" +}, +"inlineSource": { +"$ref": "OverrideInlineSource", +"description": "The import data is specified in the request message itself" +} +}, +"type": "object" +}, +"ImportConsumerOverridesResponse": { +"description": "Response message for ImportConsumerOverrides", +"id": "ImportConsumerOverridesResponse", +"properties": { +"overrides": { +"description": "The overrides that were created from the imported data.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"JavaSettings": { +"description": "Settings for Java client libraries.", +"id": "JavaSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +}, +"libraryPackage": { +"description": "The package name to use in Java. Clobbers the java_package option set in the protobuf. This should be used **only** by APIs who have already set the language_settings.java.package_name\" field in gapic.yaml. API teams should use the protobuf java_package option where possible. Example of a YAML configuration:: publishing: java_settings: library_package: com.google.cloud.pubsub.v1", +"type": "string" +}, +"serviceClassNames": { +"additionalProperties": { +"type": "string" +}, +"description": "Configure the Java class name to use instead of the service's for its corresponding generated GAPIC client. Keys are fully-qualified service names as they appear in the protobuf (including the full the language_settings.java.interface_names\" field in gapic.yaml. API teams should otherwise use the service name as it appears in the protobuf. Example of a YAML configuration:: publishing: java_settings: service_class_names: - google.pubsub.v1.Publisher: TopicAdmin - google.pubsub.v1.Subscriber: SubscriptionAdmin", +"type": "object" +} +}, +"type": "object" +}, +"JwtLocation": { +"description": "Specifies a location to extract JWT from an API request.", +"id": "JwtLocation", +"properties": { +"cookie": { +"description": "Specifies cookie name to extract JWT token.", +"type": "string" +}, +"header": { +"description": "Specifies HTTP header name to extract JWT token.", +"type": "string" +}, +"query": { +"description": "Specifies URL query parameter name to extract JWT token.", +"type": "string" +}, +"valuePrefix": { +"description": "The value prefix. The value format is \"value_prefix{token}\" Only applies to \"in\" header type. Must be empty for \"in\" query type. If not empty, the header value has to match (case sensitive) this prefix. If not matched, JWT will not be extracted. If matched, JWT will be extracted after the prefix is removed. For example, for \"Authorization: Bearer {JWT}\", value_prefix=\"Bearer \" with a space at the end.", +"type": "string" +} +}, +"type": "object" +}, +"LabelDescriptor": { +"description": "A description of a label.", +"id": "LabelDescriptor", +"properties": { +"description": { +"description": "A human-readable description for the label.", +"type": "string" +}, +"key": { +"description": "The label key.", +"type": "string" +}, +"valueType": { +"description": "The type of data that can be assigned to the label.", +"enum": [ +"STRING", +"BOOL", +"INT64" +], +"enumDescriptions": [ +"A variable-length string. This is the default.", +"Boolean; true or false.", +"A 64-bit signed integer." +], +"type": "string" +} +}, +"type": "object" +}, +"ListAdminOverridesResponse": { +"description": "Response message for ListAdminOverrides.", +"id": "ListAdminOverridesResponse", +"properties": { +"nextPageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"type": "string" +}, +"overrides": { +"description": "Admin overrides on this limit.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListConsumerOverridesResponse": { +"description": "Response message for ListConsumerOverrides.", +"id": "ListConsumerOverridesResponse", +"properties": { +"nextPageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"type": "string" +}, +"overrides": { +"description": "Consumer overrides on this limit.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListConsumerQuotaMetricsResponse": { +"description": "Response message for ListConsumerQuotaMetrics", +"id": "ListConsumerQuotaMetricsResponse", +"properties": { +"metrics": { +"description": "Quota settings for the consumer, organized by quota metric.", +"items": { +"$ref": "ConsumerQuotaMetric" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token identifying which result to start with; returned by a previous list call.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListServicesResponse": { +"description": "Response message for the `ListServices` method.", +"id": "ListServicesResponse", +"properties": { +"nextPageToken": { +"description": "Token that can be passed to `ListServices` to resume a paginated query.", +"type": "string" +}, +"services": { +"description": "The available services for the requested project.", +"items": { +"$ref": "Service" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogDescriptor": { +"description": "A description of a log type. Example in YAML format: - name: library.googleapis.com/activity_history description: The history of borrowing and returning library items. display_name: Activity labels: - key: /customer_id description: Identifier of a library customer", +"id": "LogDescriptor", +"properties": { +"description": { +"description": "A human-readable description of this log. This information appears in the documentation and can contain details.", +"type": "string" +}, +"displayName": { +"description": "The human-readable name for this log. This information appears on the user interface and should be concise.", +"type": "string" +}, +"labels": { +"description": "The set of labels that are available to describe a specific log entry. Runtime requests that contain labels not specified here are considered invalid.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"name": { +"description": "The name of the log. It must be less than 512 characters long and can include the following characters: upper- and lower-case alphanumeric characters [A-Za-z0-9], and punctuation characters including slash, underscore, hyphen, period [/_-.].", +"type": "string" +} +}, +"type": "object" +}, +"Logging": { +"description": "Logging configuration of the service. The following example shows how to configure logs to be sent to the producer and consumer projects. In the example, the `activity_history` log is sent to both the producer and consumer projects, whereas the `purchase_history` log is only sent to the producer project. monitored_resources: - type: library.googleapis.com/branch labels: - key: /city description: The city where the library branch is located in. - key: /name description: The name of the branch. logs: - name: activity_history labels: - key: /customer_id - name: purchase_history logging: producer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history - purchase_history consumer_destinations: - monitored_resource: library.googleapis.com/branch logs: - activity_history", +"id": "Logging", +"properties": { +"consumerDestinations": { +"description": "Logging configurations for sending logs to the consumer project. There can be multiple consumer destinations, each one must have a different monitored resource type. A log can be used in at most one consumer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Logging configurations for sending logs to the producer project. There can be multiple producer destinations, each one must have a different monitored resource type. A log can be used in at most one producer destination.", +"items": { +"$ref": "LoggingDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingDestination": { +"description": "Configuration of a specific logging destination (the producer project or the consumer project).", +"id": "LoggingDestination", +"properties": { +"logs": { +"description": "Names of the logs to be sent to this destination. Each name must be defined in the Service.logs section. If the log name is not a domain scoped name, it will be automatically prefixed with the service name followed by \"/\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in the Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"LongRunning": { +"description": "Describes settings to use when generating API methods that use the long-running operation pattern. All default values below are from those used in the client library generators (e.g. [Java](https://github.com/googleapis/gapic-generator-java/blob/04c2faa191a9b5a10b92392fe8482279c4404803/src/main/java/com/google/api/generator/gapic/composer/common/RetrySettingsComposer.java)).", +"id": "LongRunning", +"properties": { +"initialPollDelay": { +"description": "Initial delay after which the first poll request will be made. Default value: 5 seconds.", +"format": "google-duration", +"type": "string" +}, +"maxPollDelay": { +"description": "Maximum time between two subsequent poll requests. Default value: 45 seconds.", +"format": "google-duration", +"type": "string" +}, +"pollDelayMultiplier": { +"description": "Multiplier to gradually increase delay between subsequent polls until it reaches max_poll_delay. Default value: 1.5.", +"format": "float", +"type": "number" +}, +"totalPollTimeout": { +"description": "Total polling timeout. Default value: 5 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Method": { +"description": "Method represents a method of an API interface.", +"id": "Method", +"properties": { +"name": { +"description": "The simple name of this method.", +"type": "string" +}, +"options": { +"description": "Any metadata attached to the method.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"requestStreaming": { +"description": "If true, the request is streamed.", +"type": "boolean" +}, +"requestTypeUrl": { +"description": "A URL of the input message type.", +"type": "string" +}, +"responseStreaming": { +"description": "If true, the response is streamed.", +"type": "boolean" +}, +"responseTypeUrl": { +"description": "The URL of the output message type.", +"type": "string" +}, +"syntax": { +"description": "The source syntax of this method.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"MethodPolicy": { +"description": "Defines policies applying to an RPC method.", +"id": "MethodPolicy", +"properties": { +"requestPolicies": { +"description": "Policies that are applicable to the request message.", +"items": { +"$ref": "FieldPolicy" +}, +"type": "array" +}, +"selector": { +"description": "Selects a method to which these policies should be enforced, for example, \"google.pubsub.v1.Subscriber.CreateSubscription\". Refer to selector for syntax details. NOTE: This field must not be set in the proto annotation. It will be automatically filled by the service config compiler .", +"type": "string" +} +}, +"type": "object" +}, +"MethodSettings": { +"description": "Describes the generator configuration for a method.", +"id": "MethodSettings", +"properties": { +"autoPopulatedFields": { +"description": "List of top-level fields of the request message, that should be automatically populated by the client libraries based on their (google.api.field_info).format. Currently supported format: UUID4. Example of a YAML configuration: publishing: method_settings: - selector: google.example.v1.ExampleService.CreateExample auto_populated_fields: - request_id", +"items": { +"type": "string" +}, +"type": "array" +}, +"longRunning": { +"$ref": "LongRunning", +"description": "Describes settings to use for long-running operations when generating API methods for RPCs. Complements RPCs that use the annotations in google/longrunning/operations.proto. Example of a YAML configuration:: publishing: method_settings: - selector: google.cloud.speech.v2.Speech.BatchRecognize long_running: initial_poll_delay: 60s # 1 minute poll_delay_multiplier: 1.5 max_poll_delay: 360s # 6 minutes total_poll_timeout: 54000s # 90 minutes" +}, +"selector": { +"description": "The fully qualified name of the method, for which the options below apply. This is used to find the method to apply the options. Example: publishing: method_settings: - selector: google.storage.control.v2.StorageControl.CreateFolder # method settings for CreateFolder...", +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptor": { +"description": "Defines a metric type and its schema. Once a metric descriptor is created, deleting or altering it stops data collection and makes the metric type's existing data unusable. ", +"id": "MetricDescriptor", +"properties": { +"description": { +"description": "A detailed description of the metric, which can be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "A concise name for the metric, which can be displayed in user interfaces. Use sentence case without an ending period, for example \"Request count\". This field is optional but it is recommended to be set for any metrics associated with user-visible concepts, such as Quota.", +"type": "string" +}, +"labels": { +"description": "The set of labels that can be used to describe a specific instance of this metric type. For example, the `appengine.googleapis.com/http/server/response_latencies` metric type has a label for the HTTP response code, `response_code`, so you can look at latencies for successful responses or just for responses that failed.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the metric definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"metadata": { +"$ref": "MetricDescriptorMetadata", +"description": "Optional. Metadata which can be used to guide usage of the metric." +}, +"metricKind": { +"description": "Whether the metric records instantaneous values, changes to a value, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"METRIC_KIND_UNSPECIFIED", +"GAUGE", +"DELTA", +"CUMULATIVE" +], +"enumDescriptions": [ +"Do not use this default value.", +"An instantaneous measurement of a value.", +"The change in a value during a time interval.", +"A value accumulated over a time interval. Cumulative measurements in a time series should have the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points." +], +"type": "string" +}, +"monitoredResourceTypes": { +"description": "Read-only. If present, then a time series, which is identified partially by a metric type and a MonitoredResourceDescriptor, that is associated with this metric type can only be associated with one of the monitored resource types listed here.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the metric descriptor.", +"type": "string" +}, +"type": { +"description": "The metric type, including its DNS name prefix. The type is not URL-encoded. All user-defined metric types have the DNS name `custom.googleapis.com` or `external.googleapis.com`. Metric types should use a natural hierarchical grouping. For example: \"custom.googleapis.com/invoice/paid/amount\" \"external.googleapis.com/prometheus/up\" \"appengine.googleapis.com/http/server/response_latencies\"", +"type": "string" +}, +"unit": { +"description": "The units in which the metric value is reported. It is only applicable if the `value_type` is `INT64`, `DOUBLE`, or `DISTRIBUTION`. The `unit` defines the representation of the stored metric values. Different systems might scale the values to be more easily displayed (so a value of `0.02kBy` _might_ be displayed as `20By`, and a value of `3523kBy` _might_ be displayed as `3.5MBy`). However, if the `unit` is `kBy`, then the value of the metric is always in thousands of bytes, no matter how it might be displayed. If you want a custom metric to record the exact number of CPU-seconds used by a job, you can create an `INT64 CUMULATIVE` metric whose `unit` is `s{CPU}` (or equivalently `1s{CPU}` or just `s`). If the job uses 12,005 CPU-seconds, then the value is written as `12005`. Alternatively, if you want a custom metric to record data in a more granular way, you can create a `DOUBLE CUMULATIVE` metric whose `unit` is `ks{CPU}`, and then write the value `12.005` (which is `12005/1000`), or use `Kis{CPU}` and write `11.723` (which is `12005/1024`). The supported units are a subset of [The Unified Code for Units of Measure](https://unitsofmeasure.org/ucum.html) standard: **Basic units (UNIT)** * `bit` bit * `By` byte * `s` second * `min` minute * `h` hour * `d` day * `1` dimensionless **Prefixes (PREFIX)** * `k` kilo (10^3) * `M` mega (10^6) * `G` giga (10^9) * `T` tera (10^12) * `P` peta (10^15) * `E` exa (10^18) * `Z` zetta (10^21) * `Y` yotta (10^24) * `m` milli (10^-3) * `u` micro (10^-6) * `n` nano (10^-9) * `p` pico (10^-12) * `f` femto (10^-15) * `a` atto (10^-18) * `z` zepto (10^-21) * `y` yocto (10^-24) * `Ki` kibi (2^10) * `Mi` mebi (2^20) * `Gi` gibi (2^30) * `Ti` tebi (2^40) * `Pi` pebi (2^50) **Grammar** The grammar also includes these connectors: * `/` division or ratio (as an infix operator). For examples, `kBy/{email}` or `MiBy/10ms` (although you should almost never have `/s` in a metric `unit`; rates should always be computed at query time from the underlying cumulative or delta value). * `.` multiplication or composition (as an infix operator). For examples, `GBy.d` or `k{watt}.h`. The grammar for a unit is as follows: Expression = Component { \".\" Component } { \"/\" Component } ; Component = ( [ PREFIX ] UNIT | \"%\" ) [ Annotation ] | Annotation | \"1\" ; Annotation = \"{\" NAME \"}\" ; Notes: * `Annotation` is just a comment if it follows a `UNIT`. If the annotation is used alone, then the unit is equivalent to `1`. For examples, `{request}/s == 1/s`, `By{transmitted}/s == By/s`. * `NAME` is a sequence of non-blank printable ASCII characters not containing `{` or `}`. * `1` represents a unitary [dimensionless unit](https://en.wikipedia.org/wiki/Dimensionless_quantity) of 1, such as in `1/s`. It is typically used when none of the basic units are appropriate. For example, \"new users per day\" can be represented as `1/d` or `{new-users}/d` (and a metric value `5` would mean \"5 new users). Alternatively, \"thousands of page views per day\" would be represented as `1000/d` or `k1/d` or `k{page_views}/d` (and a metric value of `5.3` would mean \"5300 page views per day\"). * `%` represents dimensionless value of 1/100, and annotates values giving a percentage (so the metric values are typically in the range of 0..100, and a metric value `3` means \"3 percent\"). * `10^2.%` indicates a metric contains a ratio, typically in the range 0..1, that will be multiplied by 100 and displayed as a percentage (so a metric value `0.03` means \"3 percent\").", +"type": "string" +}, +"valueType": { +"description": "Whether the measurement is an integer, a floating-point number, etc. Some combinations of `metric_kind` and `value_type` might not be supported.", +"enum": [ +"VALUE_TYPE_UNSPECIFIED", +"BOOL", +"INT64", +"DOUBLE", +"STRING", +"DISTRIBUTION", +"MONEY" +], +"enumDescriptions": [ +"Do not use this default value.", +"The value is a boolean. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a signed 64-bit integer.", +"The value is a double precision floating point number.", +"The value is a text string. This value type can be used only if the metric kind is `GAUGE`.", +"The value is a `Distribution`.", +"The value is money." +], +"type": "string" +} +}, +"type": "object" +}, +"MetricDescriptorMetadata": { +"description": "Additional annotations that can be used to guide the usage of a metric.", +"id": "MetricDescriptorMetadata", +"properties": { +"ingestDelay": { +"description": "The delay of data points caused by ingestion. Data points older than this age are guaranteed to be ingested and available to be read, excluding data loss due to errors.", +"format": "google-duration", +"type": "string" +}, +"launchStage": { +"deprecated": true, +"description": "Deprecated. Must use the MetricDescriptor.launch_stage instead.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"samplePeriod": { +"description": "The sampling period of metric data points. For metrics which are written periodically, consecutive data points are stored at this time interval, excluding data loss due to errors. Metrics with a higher granularity have a smaller sampling period.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"MetricRule": { +"description": "Bind API methods to metrics. Binding a method to a metric causes that metric's configured quota behaviors to apply to the method call.", +"id": "MetricRule", +"properties": { +"metricCosts": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Metrics to update when the selected methods are called, and the associated cost applied to each metric. The key of the map is the metric name, and the values are the amount increased for the metric against which the quota limits are defined. The value must not be negative.", +"type": "object" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"Mixin": { +"description": "Declares an API Interface to be included in this interface. The including interface must redeclare all the methods from the included interface, but documentation and options are inherited as follows: - If after comment and whitespace stripping, the documentation string of the redeclared method is empty, it will be inherited from the original method. - Each annotation belonging to the service config (http, visibility) which is not set in the redeclared method will be inherited. - If an http annotation is inherited, the path pattern will be modified as follows. Any version prefix will be replaced by the version of the including interface plus the root path if specified. Example of a simple mixin: package google.acl.v1; service AccessControl { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v1/{resource=**}:getAcl\"; } } package google.storage.v2; service Storage { // rpc GetAcl(GetAclRequest) returns (Acl); // Get a data record. rpc GetData(GetDataRequest) returns (Data) { option (google.api.http).get = \"/v2/{resource=**}\"; } } Example of a mixin configuration: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl The mixin construct implies that all methods in `AccessControl` are also declared with same name and request/response types in `Storage`. A documentation generator or annotation processor will see the effective `Storage.GetAcl` method after inherting documentation and annotations as follows: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/{resource=**}:getAcl\"; } ... } Note how the version in the path pattern changed from `v1` to `v2`. If the `root` field in the mixin is specified, it should be a relative path under which inherited HTTP paths are placed. Example: apis: - name: google.storage.v2.Storage mixins: - name: google.acl.v1.AccessControl root: acls This implies the following inherited HTTP annotation: service Storage { // Get the underlying ACL object. rpc GetAcl(GetAclRequest) returns (Acl) { option (google.api.http).get = \"/v2/acls/{resource=**}:getAcl\"; } ... }", +"id": "Mixin", +"properties": { +"name": { +"description": "The fully qualified name of the interface which is included.", +"type": "string" +}, +"root": { +"description": "If non-empty specifies a path under which inherited HTTP paths are rooted.", +"type": "string" +} +}, +"type": "object" +}, +"MonitoredResourceDescriptor": { +"description": "An object that describes the schema of a MonitoredResource object using a type name and a set of labels. For example, the monitored resource descriptor for Google Compute Engine VM instances has a type of `\"gce_instance\"` and specifies the use of the labels `\"instance_id\"` and `\"zone\"` to identify particular VM instances. Different APIs can support different monitored resource types. APIs generally provide a `list` method that returns the monitored resource descriptors used by the API. ", +"id": "MonitoredResourceDescriptor", +"properties": { +"description": { +"description": "Optional. A detailed description of the monitored resource type that might be used in documentation.", +"type": "string" +}, +"displayName": { +"description": "Optional. A concise name for the monitored resource type that might be displayed in user interfaces. It should be a Title Cased Noun Phrase, without any article or other determiners. For example, `\"Google Cloud SQL Database\"`.", +"type": "string" +}, +"labels": { +"description": "Required. A set of labels used to describe instances of this monitored resource type. For example, an individual Google Cloud SQL database is identified by values for the labels `\"database_id\"` and `\"zone\"`.", +"items": { +"$ref": "LabelDescriptor" +}, +"type": "array" +}, +"launchStage": { +"description": "Optional. The launch stage of the monitored resource definition.", +"enum": [ +"LAUNCH_STAGE_UNSPECIFIED", +"UNIMPLEMENTED", +"PRELAUNCH", +"EARLY_ACCESS", +"ALPHA", +"BETA", +"GA", +"DEPRECATED" +], +"enumDescriptions": [ +"Do not use this default value.", +"The feature is not yet implemented. Users can not use it.", +"Prelaunch features are hidden from users and are only visible internally.", +"Early Access features are limited to a closed group of testers. To use these features, you must sign up in advance and sign a Trusted Tester agreement (which includes confidentiality provisions). These features may be unstable, changed in backward-incompatible ways, and are not guaranteed to be released.", +"Alpha is a limited availability test for releases before they are cleared for widespread use. By Alpha, all significant design issues are resolved and we are in the process of verifying functionality. Alpha customers need to apply for access, agree to applicable terms, and have their projects allowlisted. Alpha releases don't have to be feature complete, no SLAs are provided, and there are no technical support obligations, but they will be far enough along that customers can actually use them in test environments or for limited-use tests -- just like they would in normal production cases.", +"Beta is the point at which we are ready to open a release for any customer to use. There are no SLA or technical support obligations in a Beta release. Products will be complete from a feature perspective, but may have some open outstanding issues. Beta releases are suitable for limited production use cases.", +"GA features are open to all developers and are considered stable and fully qualified for production use.", +"Deprecated features are scheduled to be shut down and removed. For more information, see the \"Deprecation Policy\" section of our [Terms of Service](https://cloud.google.com/terms/) and the [Google Cloud Platform Subject to the Deprecation Policy](https://cloud.google.com/terms/deprecation) documentation." +], +"type": "string" +}, +"name": { +"description": "Optional. The resource name of the monitored resource descriptor: `\"projects/{project_id}/monitoredResourceDescriptors/{type}\"` where {type} is the value of the `type` field in this object and {project_id} is a project ID that provides API-specific context for accessing the type. APIs that do not use project information can use the resource name format `\"monitoredResourceDescriptors/{type}\"`.", +"type": "string" +}, +"type": { +"description": "Required. The monitored resource type. For example, the type `\"cloudsql_database\"` represents databases in Google Cloud SQL. For a list of types, see [Monitored resource types](https://cloud.google.com/monitoring/api/resources) and [Logging resource types](https://cloud.google.com/logging/docs/api/v2/resource-list).", +"type": "string" +} +}, +"type": "object" +}, +"Monitoring": { +"description": "Monitoring configuration of the service. The example below shows how to configure monitored resources and metrics for monitoring. In the example, a monitored resource and two metrics are defined. The `library.googleapis.com/book/returned_count` metric is sent to both producer and consumer projects, whereas the `library.googleapis.com/book/num_overdue` metric is only sent to the consumer project. monitored_resources: - type: library.googleapis.com/Branch display_name: \"Library Branch\" description: \"A branch of a library.\" launch_stage: GA labels: - key: resource_container description: \"The Cloud container (ie. project id) for the Branch.\" - key: location description: \"The location of the library branch.\" - key: branch_id description: \"The id of the branch.\" metrics: - name: library.googleapis.com/book/returned_count display_name: \"Books Returned\" description: \"The count of books that have been returned.\" launch_stage: GA metric_kind: DELTA value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" - name: library.googleapis.com/book/num_overdue display_name: \"Books Overdue\" description: \"The current number of overdue books.\" launch_stage: GA metric_kind: GAUGE value_type: INT64 unit: \"1\" labels: - key: customer_id description: \"The id of the customer.\" monitoring: producer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count consumer_destinations: - monitored_resource: library.googleapis.com/Branch metrics: - library.googleapis.com/book/returned_count - library.googleapis.com/book/num_overdue", +"id": "Monitoring", +"properties": { +"consumerDestinations": { +"description": "Monitoring configurations for sending metrics to the consumer project. There can be multiple consumer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +}, +"producerDestinations": { +"description": "Monitoring configurations for sending metrics to the producer project. There can be multiple producer destinations. A monitored resource type may appear in multiple monitoring destinations if different aggregations are needed for different sets of metrics associated with that monitored resource type. A monitored resource and metric pair may only be used once in the Monitoring configuration.", +"items": { +"$ref": "MonitoringDestination" +}, +"type": "array" +} +}, +"type": "object" +}, +"MonitoringDestination": { +"description": "Configuration of a specific monitoring destination (the producer project or the consumer project).", +"id": "MonitoringDestination", +"properties": { +"metrics": { +"description": "Types of the metrics to report to this monitoring destination. Each type must be defined in Service.metrics section.", +"items": { +"type": "string" +}, +"type": "array" +}, +"monitoredResource": { +"description": "The monitored resource type. The type must be defined in Service.monitored_resources section.", +"type": "string" +} +}, +"type": "object" +}, +"NodeSettings": { +"description": "Settings for Node client libraries.", +"id": "NodeSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"OAuthRequirements": { +"description": "OAuth scopes are a way to define data and permissions on data. For example, there are scopes defined for \"Read-only access to Google Calendar\" and \"Access to Cloud Platform\". Users can consent to a scope for an application, giving it permission to access that data on their behalf. OAuth scope specifications should be fairly coarse grained; a user will need to see and understand the text description of what your scope means. In most cases: use one or at most two OAuth scopes for an entire family of products. If your product has multiple APIs, you should probably be sharing the OAuth scope across all of those APIs. When you need finer grained OAuth consent screens: talk with your product management about how developers will use them in practice. Please note that even though each of the canonical scopes is enough for a request to be accepted and passed to the backend, a request can still fail due to the backend requiring additional scopes or permissions.", +"id": "OAuthRequirements", +"properties": { +"canonicalScopes": { +"description": "The list of publicly documented OAuth scopes that are allowed access. An OAuth token containing any of these scopes will be accepted. Example: canonical_scopes: https://www.googleapis.com/auth/calendar, https://www.googleapis.com/auth/calendar.read", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "The operation metadata returned for the batchend services operation.", +"id": "OperationMetadata", +"properties": { +"resourceNames": { +"description": "The full name of the resources that this operation is directly associated with.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Option": { +"description": "A protocol buffer option, which can be attached to a message, field, enumeration, etc.", +"id": "Option", +"properties": { +"name": { +"description": "The option's name. For protobuf built-in options (options defined in descriptor.proto), this is the short name. For example, `\"map_entry\"`. For custom options, it should be the fully-qualified name. For example, `\"google.api.http\"`.", +"type": "string" +}, +"value": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The option's value packed in an Any message. If the value is a primitive, the corresponding wrapper type defined in google/protobuf/wrappers.proto should be used. If the value is an enum, it should be stored as an int32 value using the google.protobuf.Int32Value type.", +"type": "object" +} +}, +"type": "object" +}, +"OverrideInlineSource": { +"description": "Import data embedded in the request message", +"id": "OverrideInlineSource", +"properties": { +"overrides": { +"description": "The overrides to create. Each override must have a value for 'metric' and 'unit', to specify which metric and which limit the override should be applied to. The 'name' field of the override does not need to be set; it is ignored.", +"items": { +"$ref": "QuotaOverride" +}, +"type": "array" +} +}, +"type": "object" +}, +"Page": { +"description": "Represents a documentation page. A page can contain subpages to represent nested documentation set structure.", +"id": "Page", +"properties": { +"content": { +"description": "The Markdown content of the page. You can use (== include {path} ==) to include content from a Markdown file. The content can be used to produce the documentation page such as HTML format page.", +"type": "string" +}, +"name": { +"description": "The name of the page. It will be used as an identity of the page to generate URI of the page, text of the link to this page in navigation, etc. The full page name (start from the root page name to this page concatenated with `.`) can be used as reference to the page in your documentation. For example: pages: - name: Tutorial content: (== include tutorial.md ==) subpages: - name: Java content: (== include tutorial_java.md ==) You can reference `Java` page using Markdown reference link syntax: `Java`.", +"type": "string" +}, +"subpages": { +"description": "Subpages of this page. The order of subpages specified here will be honored in the generated docset.", +"items": { +"$ref": "Page" +}, +"type": "array" +} +}, +"type": "object" +}, +"PhpSettings": { +"description": "Settings for Php client libraries.", +"id": "PhpSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"ProducerQuotaPolicy": { +"description": "Quota policy created by service producer.", +"id": "ProducerQuotaPolicy", +"properties": { +"container": { +"description": "The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": " If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in {brackets} in the unit (besides {project} or {user}) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota policies that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/producerQuotaPolicies/4a3f2c1d`", +"type": "string" +}, +"policyValue": { +"description": "The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this policy applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"Publishing": { +"description": "This message configures the settings for publishing [Google Cloud Client libraries](https://cloud.google.com/apis/docs/cloud-client-libraries) generated from the service config.", +"id": "Publishing", +"properties": { +"apiShortName": { +"description": "Used as a tracking tag when collecting data about the APIs developer relations artifacts like docs, packages delivered to package managers, etc. Example: \"speech\".", +"type": "string" +}, +"codeownerGithubTeams": { +"description": "GitHub teams to be added to CODEOWNERS in the directory in GitHub containing source code for the client libraries for this API.", +"items": { +"type": "string" +}, +"type": "array" +}, +"docTagPrefix": { +"description": "A prefix used in sample code when demarking regions to be included in documentation.", +"type": "string" +}, +"documentationUri": { +"description": "Link to product home page. Example: https://cloud.google.com/asset-inventory/docs/overview", +"type": "string" +}, +"githubLabel": { +"description": "GitHub label to apply to issues and pull requests opened for this API.", +"type": "string" +}, +"librarySettings": { +"description": "Client library settings. If the same version string appears multiple times in this list, then the last one wins. Settings from earlier settings with the same version string are discarded.", +"items": { +"$ref": "ClientLibrarySettings" +}, +"type": "array" +}, +"methodSettings": { +"description": "A list of API method settings, e.g. the behavior for methods that use the long-running operation pattern.", +"items": { +"$ref": "MethodSettings" +}, +"type": "array" +}, +"newIssueUri": { +"description": "Link to a *public* URI where users can report issues. Example: https://issuetracker.google.com/issues/new?component=190865&template=1161103", +"type": "string" +}, +"organization": { +"description": "For whom the client library is being published.", +"enum": [ +"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED", +"CLOUD", +"ADS", +"PHOTOS", +"STREET_VIEW", +"SHOPPING", +"GEO", +"GENERATIVE_AI" +], +"enumDescriptions": [ +"Not useful.", +"Google Cloud Platform Org.", +"Ads (Advertising) Org.", +"Photos Org.", +"Street View Org.", +"Shopping Org.", +"Geo Org.", +"Generative AI - https://developers.generativeai.google" +], +"type": "string" +}, +"protoReferenceDocumentationUri": { +"description": "Optional link to proto reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rpc", +"type": "string" +}, +"restReferenceDocumentationUri": { +"description": "Optional link to REST reference documentation. Example: https://cloud.google.com/pubsub/lite/docs/reference/rest", +"type": "string" +} +}, +"type": "object" +}, +"PythonSettings": { +"description": "Settings for Python client libraries.", +"id": "PythonSettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Quota": { +"description": "Quota configuration helps to achieve fairness and budgeting in service usage. The metric based quota configuration works this way: - The service configuration defines a set of metrics. - For API calls, the quota.metric_rules maps methods to metrics with corresponding costs. - The quota.limits defines limits on the metrics, which will be used for quota checks at runtime. An example quota configuration in yaml format: quota: limits: - name: apiWriteQpsPerProject metric: library.googleapis.com/write_calls unit: \"1/min/{project}\" # rate limit for consumer projects values: STANDARD: 10000 (The metric rules bind all methods to the read_calls metric, except for the UpdateBook and DeleteBook methods. These two methods are mapped to the write_calls metric, with the UpdateBook method consuming at twice rate as the DeleteBook method.) metric_rules: - selector: \"*\" metric_costs: library.googleapis.com/read_calls: 1 - selector: google.example.library.v1.LibraryService.UpdateBook metric_costs: library.googleapis.com/write_calls: 2 - selector: google.example.library.v1.LibraryService.DeleteBook metric_costs: library.googleapis.com/write_calls: 1 Corresponding Metric definition: metrics: - name: library.googleapis.com/read_calls display_name: Read requests metric_kind: DELTA value_type: INT64 - name: library.googleapis.com/write_calls display_name: Write requests metric_kind: DELTA value_type: INT64 ", +"id": "Quota", +"properties": { +"limits": { +"description": "List of QuotaLimit definitions for the service.", +"items": { +"$ref": "QuotaLimit" +}, +"type": "array" +}, +"metricRules": { +"description": "List of MetricRule definitions, each one mapping a selected method to one or more metrics.", +"items": { +"$ref": "MetricRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"QuotaBucket": { +"description": "A quota bucket is a quota provisioning unit for a specific set of dimensions.", +"id": "QuotaBucket", +"properties": { +"adminOverride": { +"$ref": "QuotaOverride", +"description": "Admin override on this quota bucket." +}, +"consumerOverride": { +"$ref": "QuotaOverride", +"description": "Consumer override on this quota bucket." +}, +"defaultLimit": { +"description": "The default limit of this quota bucket, as specified by the service configuration.", +"format": "int64", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": "The dimensions of this quota bucket. If this map is empty, this is the global bucket, which is the default quota value applied to all requests that do not have a more specific override. If this map is nonempty, the default limit, effective limit, and quota overrides apply only to requests that have the dimensions given in the map. For example, if the map has key `region` and value `us-east-1`, then the specified effective limit is only effective in that region, and the specified overrides apply only in that region.", +"type": "object" +}, +"effectiveLimit": { +"description": "The effective limit of this quota bucket. Equal to default_limit if there are no overrides.", +"format": "int64", +"type": "string" +}, +"producerOverride": { +"$ref": "QuotaOverride", +"description": "Producer override on this quota bucket." +}, +"producerQuotaPolicy": { +"$ref": "ProducerQuotaPolicy", +"description": "Producer policy inherited from the closet ancestor of the current consumer." +}, +"rolloutInfo": { +"$ref": "RolloutInfo", +"description": "Rollout information of this quota bucket. This field is present only if the effective limit will change due to the ongoing rollout of the service config." +} +}, +"type": "object" +}, +"QuotaLimit": { +"description": "`QuotaLimit` defines a specific limit that applies over a specified duration for a limit type. There can be at most one limit for a duration and limit type combination defined within a `QuotaGroup`.", +"id": "QuotaLimit", +"properties": { +"defaultLimit": { +"description": "Default number of tokens that can be consumed during the specified duration. This is the number of tokens assigned when a client application developer activates the service for his/her project. Specifying a value of 0 will block all requests. This can be used if you are provisioning quota to selected consumers and blocking others. Similarly, a value of -1 will indicate an unlimited quota. No other negative values are allowed. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"description": { +"description": "Optional. User-visible, extended description for this quota limit. Should be used only when more context is needed to understand this limit than provided by the limit's display name (see: `display_name`).", +"type": "string" +}, +"displayName": { +"description": "User-visible display name for this limit. Optional. If not set, the UI will provide a default display name based on the quota configuration. This field can be used to override the default display name generated from the configuration.", +"type": "string" +}, +"duration": { +"description": "Duration of this limit in textual notation. Must be \"100s\" or \"1d\". Used by group-based quotas only.", +"type": "string" +}, +"freeTier": { +"description": "Free tier value displayed in the Developers Console for this limit. The free tier is the number of tokens that will be subtracted from the billed amount when billing is enabled. This field can only be set on a limit with duration \"1d\", in a billable group; it is invalid on any other limit. If this field is not set, it defaults to 0, indicating that there is no free tier for this service. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"maxLimit": { +"description": "Maximum number of tokens that can be consumed during the specified duration. Client application developers can override the default limit up to this maximum. If specified, this value cannot be set to a value less than the default limit. If not specified, it is set to the default limit. To allow clients to apply overrides with no upper bound, set this to -1, indicating unlimited maximum quota. Used by group-based quotas only.", +"format": "int64", +"type": "string" +}, +"metric": { +"description": "The name of the metric this quota limit applies to. The quota limits with the same metric will be checked together during runtime. The metric must be defined within the service config.", +"type": "string" +}, +"name": { +"description": "Name of the quota limit. The name must be provided, and it must be unique within the service. The name can only include alphanumeric characters as well as '-'. The maximum length of the limit name is 64 characters.", +"type": "string" +}, +"unit": { +"description": "Specify the unit of the quota limit. It uses the same syntax as Metric.unit. The supported unit kinds are determined by the quota backend system. Here are some examples: * \"1/min/{project}\" for quota per minute per project. Note: the order of unit components is insignificant. The \"1\" at the beginning is required to follow the metric unit syntax.", +"type": "string" +}, +"values": { +"additionalProperties": { +"format": "int64", +"type": "string" +}, +"description": "Tiered limit values. You must specify this as a key:value pair, with an integer value that is the maximum number of requests allowed for the specified unit. Currently only STANDARD is supported.", +"type": "object" +} +}, +"type": "object" +}, +"QuotaOverride": { +"description": "A quota override", +"id": "QuotaOverride", +"properties": { +"adminOverrideAncestor": { +"description": "The resource name of the ancestor that requested the override. For example: `organizations/12345` or `folders/67890`. Used by admin overrides only.", +"type": "string" +}, +"dimensions": { +"additionalProperties": { +"type": "string" +}, +"description": "If this map is nonempty, then this override applies only to specific values for dimensions defined in the limit unit. For example, an override on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the override is only applied to quota consumed in that region. This map has the following restrictions: * Keys that are not defined in the limit's unit are not valid keys. Any string appearing in `{brackets}` in the unit (besides `{project}` or `{user}`) is a defined key. * `project` is not a valid key; the project is already specified in the parent resource name. * `user` is not a valid key; the API does not support quota overrides that apply only to a specific user. * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * If any valid key other than `region` or `zone` appears in the map, then all valid keys other than `region` or `zone` must also appear in the map.", +"type": "object" +}, +"metric": { +"description": "The name of the metric to which this override applies. An example name would be: `compute.googleapis.com/cpus`", +"type": "string" +}, +"name": { +"description": "The resource name of the override. This name is generated by the server when the override is created. Example names would be: `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminOverrides/4a3f2c1d` `projects/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/consumerOverrides/4a3f2c1d` The resource name is intended to be opaque and should not be parsed for its component strings, since its representation could change in the future.", +"type": "string" +}, +"overrideValue": { +"description": "The overriding quota limit value. Can be any nonnegative integer, or -1 (unlimited quota).", +"format": "int64", +"type": "string" +}, +"unit": { +"description": "The limit unit of the limit to which this override applies. An example unit would be: `1/{project}/{region}` Note that `{project}` and `{region}` are not placeholders in this example; the literal characters `{` and `}` occur in the string.", +"type": "string" +} +}, +"type": "object" +}, +"RemoveEnableRulesMetadata": { +"description": "Metadata for the `RemoveEnableRules` method.", +"id": "RemoveEnableRulesMetadata", +"properties": {}, +"type": "object" +}, +"RemoveEnableRulesResponse": { +"description": "The response message of `RemoveEnableRules` method.", +"id": "RemoveEnableRulesResponse", +"properties": { +"parent": { +"description": "The parent consumer policy. It can be `projects/12345/consumerPolicies/default`, or `folders/12345/consumerPolicies/default`, or `organizations/12345/consumerPolicies/default`.", +"type": "string" +}, +"removedValues": { +"deprecated": true, +"description": "The values removed from the parent consumer policy.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"RolloutInfo": { +"description": "[Output only] Rollout information of a quota.", +"id": "RolloutInfo", +"properties": { +"defaultLimitOngoingRollout": { +"description": "Whether there is an ongoing rollout for the default limit or not.", +"type": "boolean" +} +}, +"type": "object" +}, +"RubySettings": { +"description": "Settings for Ruby client libraries.", +"id": "RubySettings", +"properties": { +"common": { +"$ref": "CommonLanguageSettings", +"description": "Some settings." +} +}, +"type": "object" +}, +"Service": { +"description": "A service that is available for use by the consumer.", +"id": "Service", +"properties": { +"config": { +"$ref": "ServiceConfig", +"description": "The service configuration of the available service. Some fields may be filtered out of the configuration in responses to the `ListServices` method. These fields are present only in responses to the `GetService` method." +}, +"name": { +"description": "The resource name of the consumer and service. A valid name would be: - `projects/123/services/serviceusage.googleapis.com`", +"type": "string" +}, +"parent": { +"description": "The resource name of the consumer. A valid name would be: - `projects/123`", +"type": "string" +}, +"state": { +"description": "Whether or not the service has been enabled for use by the consumer.", +"enum": [ +"STATE_UNSPECIFIED", +"DISABLED", +"ENABLED" +], +"enumDescriptions": [ +"The default value, which indicates that the enabled state of the service is unspecified or not meaningful. Currently, all consumers other than projects (such as folders and organizations) are always in this state.", +"The service cannot be used by this consumer. It has either been explicitly disabled, or has never been enabled.", +"The service has been explicitly enabled for use by this consumer." +], +"type": "string" +} +}, +"type": "object" +}, +"ServiceConfig": { +"description": "The configuration of the service.", +"id": "ServiceConfig", +"properties": { +"apis": { +"description": "A list of API interfaces exported by this service. Contains only the names, versions, and method names of the interfaces.", +"items": { +"$ref": "Api" +}, +"type": "array" +}, +"authentication": { +"$ref": "Authentication", +"description": "Auth configuration. Contains only the OAuth rules." +}, +"documentation": { +"$ref": "Documentation", +"description": "Additional API documentation. Contains only the summary and the documentation URL." +}, +"endpoints": { +"description": "Configuration for network endpoints. Contains only the names and aliases of the endpoints.", +"items": { +"$ref": "Endpoint" +}, +"type": "array" +}, +"monitoredResources": { +"description": "Defines the monitored resources used by this service. This is required by the Service.monitoring and Service.logging configurations.", +"items": { +"$ref": "MonitoredResourceDescriptor" +}, +"type": "array" +}, +"monitoring": { +"$ref": "Monitoring", +"description": "Monitoring configuration. This should not include the 'producer_destinations' field." +}, +"name": { +"description": "The DNS address at which this service is available. An example DNS address would be: `calendar.googleapis.com`.", +"type": "string" +}, +"quota": { +"$ref": "Quota", +"description": "Quota configuration." +}, +"title": { +"description": "The product title for this service.", +"type": "string" +}, +"usage": { +"$ref": "Usage", +"description": "Configuration controlling usage of this service." +} +}, +"type": "object" +}, +"ServiceIdentity": { +"description": "Service identity for a service. This is the identity that service producer should use to access consumer resources.", +"id": "ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service account that a service producer would use to access consumer resources.", +"type": "string" +}, +"uniqueId": { +"description": "The unique and stable id of the service account. https://cloud.google.com/iam/reference/rest/v1/projects.serviceAccounts#ServiceAccount", +"type": "string" +} +}, +"type": "object" +}, +"SourceContext": { +"description": "`SourceContext` represents information about the source of a protobuf element, like the file in which it is defined.", +"id": "SourceContext", +"properties": { +"fileName": { +"description": "The path-qualified name of the .proto file that contained the associated protobuf element. For example: `\"google/protobuf/source_context.proto\"`.", +"type": "string" +} +}, +"type": "object" +}, +"SourceInfo": { +"description": "Source information used to create a Service Config", +"id": "SourceInfo", +"properties": { +"sourceFiles": { +"description": "All files used during config generation.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameter": { +"description": "Define a parameter's name and location. The parameter may be passed as either an HTTP header or a URL query parameter, and if both are passed the behavior is implementation-dependent.", +"id": "SystemParameter", +"properties": { +"httpHeader": { +"description": "Define the HTTP header name to use for the parameter. It is case insensitive.", +"type": "string" +}, +"name": { +"description": "Define the name of the parameter, such as \"api_key\" . It is case sensitive.", +"type": "string" +}, +"urlQueryParameter": { +"description": "Define the URL query parameter name to use for the parameter. It is case sensitive.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameterRule": { +"description": "Define a system parameter rule mapping system parameter definitions to methods.", +"id": "SystemParameterRule", +"properties": { +"parameters": { +"description": "Define parameters. Multiple names may be defined for a parameter. For a given method call, only one of them should be used. If multiple names are used the behavior is implementation-dependent. If none of the specified names are present the behavior is parameter-dependent.", +"items": { +"$ref": "SystemParameter" +}, +"type": "array" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +} +}, +"type": "object" +}, +"SystemParameters": { +"description": "### System parameter configuration A system parameter is a special kind of parameter defined by the API system, not by an individual API. It is typically mapped to an HTTP header and/or a URL query parameter. This configuration specifies which methods change the names of the system parameters.", +"id": "SystemParameters", +"properties": { +"rules": { +"description": "Define system parameters. The parameters defined here will override the default parameters implemented by the system. If this field is missing from the service config, default system parameters will be used. Default system parameters and names is implementation-dependent. Example: define api key for all methods system_parameters rules: - selector: \"*\" parameters: - name: api_key url_query_parameter: api_key Example: define 2 api key names for a specific method. system_parameters rules: - selector: \"/ListShelves\" parameters: - name: api_key http_header: Api-Key1 - name: api_key http_header: Api-Key2 **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "SystemParameterRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"Type": { +"description": "A protocol buffer message type.", +"id": "Type", +"properties": { +"edition": { +"description": "The source edition string, only valid when syntax is SYNTAX_EDITIONS.", +"type": "string" +}, +"fields": { +"description": "The list of fields.", +"items": { +"$ref": "Field" +}, +"type": "array" +}, +"name": { +"description": "The fully qualified message name.", +"type": "string" +}, +"oneofs": { +"description": "The list of types appearing in `oneof` definitions in this type.", +"items": { +"type": "string" +}, +"type": "array" +}, +"options": { +"description": "The protocol buffer options.", +"items": { +"$ref": "Option" +}, +"type": "array" +}, +"sourceContext": { +"$ref": "SourceContext", +"description": "The source context." +}, +"syntax": { +"description": "The source syntax.", +"enum": [ +"SYNTAX_PROTO2", +"SYNTAX_PROTO3", +"SYNTAX_EDITIONS" +], +"enumDescriptions": [ +"Syntax `proto2`.", +"Syntax `proto3`.", +"Syntax `editions`." +], +"type": "string" +} +}, +"type": "object" +}, +"UpdateAdminQuotaPolicyMetadata": { +"description": "Metadata message that provides information such as progress, partial failures, and similar information on each GetOperation call of LRO returned by UpdateAdminQuotaPolicy.", +"id": "UpdateAdminQuotaPolicyMetadata", +"properties": {}, +"type": "object" +}, +"UpdateConsumerPolicyMetadata": { +"description": "Metadata for the `UpdateConsumerPolicy` method.", +"id": "UpdateConsumerPolicyMetadata", +"properties": {}, +"type": "object" +}, +"Usage": { +"description": "Configuration controlling usage of a service.", +"id": "Usage", +"properties": { +"producerNotificationChannel": { +"description": "The full resource name of a channel used for sending notifications to the service producer. Google Service Management currently only supports [Google Cloud Pub/Sub](https://cloud.google.com/pubsub) as a notification channel. To use Google Cloud Pub/Sub as the channel, this must be the name of a Cloud Pub/Sub topic that uses the Cloud Pub/Sub topic name format documented in https://cloud.google.com/pubsub/docs/overview.", +"type": "string" +}, +"requirements": { +"description": "Requirements that must be satisfied before a consumer project can use the service. Each requirement is of the form /; for example 'serviceusage.googleapis.com/billing-enabled'. For Google APIs, a Terms of Service requirement must be included here. Google Cloud APIs must include \"serviceusage.googleapis.com/tos/cloud\". Other Google APIs should include \"serviceusage.googleapis.com/tos/universal\". Additional ToS can be included based on the business needs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"rules": { +"description": "A list of usage rules that apply to individual API methods. **NOTE:** All service configuration rules follow \"last one wins\" order.", +"items": { +"$ref": "UsageRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"UsageRule": { +"description": "Usage configuration rules for the service. NOTE: Under development. Use this rule to configure unregistered calls for the service. Unregistered calls are calls that do not contain consumer project identity. (Example: calls that do not contain an API key). By default, API methods do not allow unregistered calls, and each method call must be identified by a consumer project identity. Use this rule to allow/disallow unregistered calls. Example of an API that wants to allow unregistered calls for entire service. usage: rules: - selector: \"*\" allow_unregistered_calls: true Example of a method that wants to allow unregistered calls. usage: rules: - selector: \"google.example.library.v1.LibraryService.CreateBook\" allow_unregistered_calls: true", +"id": "UsageRule", +"properties": { +"allowUnregisteredCalls": { +"description": "If true, the selected method allows unregistered calls, e.g. calls that don't identify any user or application.", +"type": "boolean" +}, +"selector": { +"description": "Selects the methods to which this rule applies. Use '*' to indicate all methods in all APIs. Refer to selector for syntax details.", +"type": "string" +}, +"skipServiceControl": { +"description": "If true, the selected method should skip service control and the control plane features, such as quota and billing, will not be available. This flag is used by Google Cloud Endpoints to bypass checks for internal methods, such as service health check methods.", +"type": "boolean" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Service Usage API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sheets.v4.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sheets.v4.json new file mode 100644 index 0000000000000000000000000000000000000000..b1a09d9f619867506a992210751bc98176660138 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sheets.v4.json @@ -0,0 +1,7884 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/drive": { +"description": "See, edit, create, and delete all of your Google Drive files" +}, +"https://www.googleapis.com/auth/drive.file": { +"description": "See, edit, create, and delete only the specific Google Drive files you use with this app" +}, +"https://www.googleapis.com/auth/drive.readonly": { +"description": "See and download all your Google Drive files" +}, +"https://www.googleapis.com/auth/spreadsheets": { +"description": "See, edit, create, and delete all your Google Sheets spreadsheets" +}, +"https://www.googleapis.com/auth/spreadsheets.readonly": { +"description": "See all your Google Sheets spreadsheets" +} +} +} +}, +"basePath": "", +"baseUrl": "https://sheets.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Sheets", +"description": "Reads and writes Google Sheets.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/sheets/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "sheets:v4", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://sheets.mtls.googleapis.com/", +"name": "sheets", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"spreadsheets": { +"methods": { +"batchUpdate": { +"description": "Applies one or more updates to the spreadsheet. Each request is validated before being applied. If any request is not valid then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. The replies will mirror the requests. For example, if you applied 4 updates and the 3rd one had a reply, then the response will have 2 empty replies, the actual reply, and another empty reply, in that order. Due to the collaborative nature of spreadsheets, it is not guaranteed that the spreadsheet will reflect exactly your changes after this completes, however it is guaranteed that the updates in the request will be applied together atomically. Your changes may be altered with respect to collaborator changes. If there are no collaborators, the spreadsheet should reflect your changes.", +"flatPath": "v4/spreadsheets/{spreadsheetId}:batchUpdate", +"httpMethod": "POST", +"id": "sheets.spreadsheets.batchUpdate", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The spreadsheet to apply the updates to.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}:batchUpdate", +"request": { +"$ref": "BatchUpdateSpreadsheetRequest" +}, +"response": { +"$ref": "BatchUpdateSpreadsheetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"create": { +"description": "Creates a spreadsheet, returning the newly created spreadsheet.", +"flatPath": "v4/spreadsheets", +"httpMethod": "POST", +"id": "sheets.spreadsheets.create", +"parameterOrder": [], +"parameters": {}, +"path": "v4/spreadsheets", +"request": { +"$ref": "Spreadsheet" +}, +"response": { +"$ref": "Spreadsheet" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"get": { +"description": "Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. By default, data within grids is not returned. You can include grid data in one of 2 ways: * Specify a [field mask](https://developers.google.com/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP * Set the includeGridData URL parameter to true. If a field mask is set, the `includeGridData` parameter is ignored For large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want. To retrieve only subsets of spreadsheet data, use the ranges URL parameter. Ranges are specified using [A1 notation](/sheets/api/guides/concepts#cell). You can define a single cell (for example, `A1`) or multiple cells (for example, `A1:D5`). You can also get cells from other sheets within the same spreadsheet (for example, `Sheet2!A1:C4`) or retrieve multiple ranges at once (for example, `?ranges=A1:D5&ranges=Sheet2!A1:C4`). Limiting the range returns only the portions of the spreadsheet that intersect the requested ranges.", +"flatPath": "v4/spreadsheets/{spreadsheetId}", +"httpMethod": "GET", +"id": "sheets.spreadsheets.get", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"includeGridData": { +"description": "True if grid data should be returned. This parameter is ignored if a field mask was set in the request.", +"location": "query", +"type": "boolean" +}, +"ranges": { +"description": "The ranges to retrieve from the spreadsheet.", +"location": "query", +"repeated": true, +"type": "string" +}, +"spreadsheetId": { +"description": "The spreadsheet to request.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}", +"response": { +"$ref": "Spreadsheet" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/drive.readonly", +"https://www.googleapis.com/auth/spreadsheets", +"https://www.googleapis.com/auth/spreadsheets.readonly" +] +}, +"getByDataFilter": { +"description": "Returns the spreadsheet at the given ID. The caller must specify the spreadsheet ID. This method differs from GetSpreadsheet in that it allows selecting which subsets of spreadsheet data to return by specifying a dataFilters parameter. Multiple DataFilters can be specified. Specifying one or more data filters returns the portions of the spreadsheet that intersect ranges matched by any of the filters. By default, data within grids is not returned. You can include grid data one of 2 ways: * Specify a [field mask](https://developers.google.com/sheets/api/guides/field-masks) listing your desired fields using the `fields` URL parameter in HTTP * Set the includeGridData parameter to true. If a field mask is set, the `includeGridData` parameter is ignored For large spreadsheets, as a best practice, retrieve only the specific spreadsheet fields that you want.", +"flatPath": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", +"httpMethod": "POST", +"id": "sheets.spreadsheets.getByDataFilter", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The spreadsheet to request.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}:getByDataFilter", +"request": { +"$ref": "GetSpreadsheetByDataFilterRequest" +}, +"response": { +"$ref": "Spreadsheet" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +} +}, +"resources": { +"developerMetadata": { +"methods": { +"get": { +"description": "Returns the developer metadata with the specified ID. The caller must specify the spreadsheet ID and the developer metadata's unique metadataId.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", +"httpMethod": "GET", +"id": "sheets.spreadsheets.developerMetadata.get", +"parameterOrder": [ +"spreadsheetId", +"metadataId" +], +"parameters": { +"metadataId": { +"description": "The ID of the developer metadata to retrieve.", +"format": "int32", +"location": "path", +"required": true, +"type": "integer" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet to retrieve metadata from.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/developerMetadata/{metadataId}", +"response": { +"$ref": "DeveloperMetadata" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"search": { +"description": "Returns all developer metadata matching the specified DataFilter. If the provided DataFilter represents a DeveloperMetadataLookup object, this will return all DeveloperMetadata entries selected by it. If the DataFilter represents a location in a spreadsheet, this will return all developer metadata associated with locations intersecting that region.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", +"httpMethod": "POST", +"id": "sheets.spreadsheets.developerMetadata.search", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The ID of the spreadsheet to retrieve metadata from.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/developerMetadata:search", +"request": { +"$ref": "SearchDeveloperMetadataRequest" +}, +"response": { +"$ref": "SearchDeveloperMetadataResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +} +} +}, +"sheets": { +"methods": { +"copyTo": { +"description": "Copies a single sheet from a spreadsheet to another spreadsheet. Returns the properties of the newly created sheet.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", +"httpMethod": "POST", +"id": "sheets.spreadsheets.sheets.copyTo", +"parameterOrder": [ +"spreadsheetId", +"sheetId" +], +"parameters": { +"sheetId": { +"description": "The ID of the sheet to copy.", +"format": "int32", +"location": "path", +"required": true, +"type": "integer" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet containing the sheet to copy.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/sheets/{sheetId}:copyTo", +"request": { +"$ref": "CopySheetToAnotherSpreadsheetRequest" +}, +"response": { +"$ref": "SheetProperties" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +} +} +}, +"values": { +"methods": { +"append": { +"description": "Appends values to a spreadsheet. The input range is used to search for existing data and find a \"table\" within that range. Values will be appended to the next row of the table, starting with the first column of the table. See the [guide](/sheets/api/guides/values#appending_values) and [sample code](/sheets/api/samples/writing#append_values) for specific details of how tables are detected and data is appended. The caller must specify the spreadsheet ID, range, and a valueInputOption. The `valueInputOption` only controls how the input data will be added to the sheet (column-wise or row-wise), it does not influence what cell the data starts being written to.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", +"httpMethod": "POST", +"id": "sheets.spreadsheets.values.append", +"parameterOrder": [ +"spreadsheetId", +"range" +], +"parameters": { +"includeValuesInResponse": { +"description": "Determines if the update response should include the values of the cells that were appended. By default, responses do not include the updated values.", +"location": "query", +"type": "boolean" +}, +"insertDataOption": { +"description": "How the input data should be inserted.", +"enum": [ +"OVERWRITE", +"INSERT_ROWS" +], +"enumDescriptions": [ +"The new data overwrites existing data in the areas it is written. (Note: adding data to the end of the sheet will still insert new rows or columns so the data can be written.)", +"Rows are inserted for the new data." +], +"location": "query", +"type": "string" +}, +"range": { +"description": "The [A1 notation](/sheets/api/guides/concepts#cell) of a range to search for a logical table of data. Values are appended after the last row of the table.", +"location": "path", +"required": true, +"type": "string" +}, +"responseDateTimeRenderOption": { +"description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", +"enum": [ +"SERIAL_NUMBER", +"FORMATTED_STRING" +], +"enumDescriptions": [ +"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", +"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)." +], +"location": "query", +"type": "string" +}, +"responseValueRenderOption": { +"description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.", +"enum": [ +"FORMATTED_VALUE", +"UNFORMATTED_VALUE", +"FORMULA" +], +"enumDescriptions": [ +"Values will be calculated & formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", +"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", +"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date & time values](https://developers.google.com/sheets/api/guides/formats#about_date_time_values)." +], +"location": "query", +"type": "string" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet to update.", +"location": "path", +"required": true, +"type": "string" +}, +"valueInputOption": { +"description": "How the input data should be interpreted.", +"enum": [ +"INPUT_VALUE_OPTION_UNSPECIFIED", +"RAW", +"USER_ENTERED" +], +"enumDescriptions": [ +"Default input value. This value must not be used.", +"The values the user has entered will not be parsed and will be stored as-is.", +"The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI." +], +"location": "query", +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values/{range}:append", +"request": { +"$ref": "ValueRange" +}, +"response": { +"$ref": "AppendValuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"batchClear": { +"description": "Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges. Only values are cleared -- all other properties of the cell (such as formatting and data validation) are kept.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClear", +"httpMethod": "POST", +"id": "sheets.spreadsheets.values.batchClear", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The ID of the spreadsheet to update.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values:batchClear", +"request": { +"$ref": "BatchClearValuesRequest" +}, +"response": { +"$ref": "BatchClearValuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"batchClearByDataFilter": { +"description": "Clears one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges matching any of the specified data filters will be cleared. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", +"httpMethod": "POST", +"id": "sheets.spreadsheets.values.batchClearByDataFilter", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The ID of the spreadsheet to update.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values:batchClearByDataFilter", +"request": { +"$ref": "BatchClearValuesByDataFilterRequest" +}, +"response": { +"$ref": "BatchClearValuesByDataFilterResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"batchGet": { +"description": "Returns one or more ranges of values from a spreadsheet. The caller must specify the spreadsheet ID and one or more ranges.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGet", +"httpMethod": "GET", +"id": "sheets.spreadsheets.values.batchGet", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"dateTimeRenderOption": { +"description": "How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", +"enum": [ +"SERIAL_NUMBER", +"FORMATTED_STRING" +], +"enumDescriptions": [ +"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", +"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)." +], +"location": "query", +"type": "string" +}, +"majorDimension": { +"description": "The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `ranges=[\"A1:B2\"],majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `ranges=[\"A1:B2\"],majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"location": "query", +"type": "string" +}, +"ranges": { +"description": "The [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell) of the range to retrieve values from.", +"location": "query", +"repeated": true, +"type": "string" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet to retrieve data from.", +"location": "path", +"required": true, +"type": "string" +}, +"valueRenderOption": { +"description": "How values should be represented in the output. The default render option is ValueRenderOption.FORMATTED_VALUE.", +"enum": [ +"FORMATTED_VALUE", +"UNFORMATTED_VALUE", +"FORMULA" +], +"enumDescriptions": [ +"Values will be calculated & formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", +"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", +"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date & time values](https://developers.google.com/sheets/api/guides/formats#about_date_time_values)." +], +"location": "query", +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values:batchGet", +"response": { +"$ref": "BatchGetValuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/drive.readonly", +"https://www.googleapis.com/auth/spreadsheets", +"https://www.googleapis.com/auth/spreadsheets.readonly" +] +}, +"batchGetByDataFilter": { +"description": "Returns one or more ranges of values that match the specified data filters. The caller must specify the spreadsheet ID and one or more DataFilters. Ranges that match any of the data filters in the request will be returned.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", +"httpMethod": "POST", +"id": "sheets.spreadsheets.values.batchGetByDataFilter", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The ID of the spreadsheet to retrieve data from.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values:batchGetByDataFilter", +"request": { +"$ref": "BatchGetValuesByDataFilterRequest" +}, +"response": { +"$ref": "BatchGetValuesByDataFilterResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"batchUpdate": { +"description": "Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more ValueRanges.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", +"httpMethod": "POST", +"id": "sheets.spreadsheets.values.batchUpdate", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The ID of the spreadsheet to update.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdate", +"request": { +"$ref": "BatchUpdateValuesRequest" +}, +"response": { +"$ref": "BatchUpdateValuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"batchUpdateByDataFilter": { +"description": "Sets values in one or more ranges of a spreadsheet. The caller must specify the spreadsheet ID, a valueInputOption, and one or more DataFilterValueRanges.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", +"httpMethod": "POST", +"id": "sheets.spreadsheets.values.batchUpdateByDataFilter", +"parameterOrder": [ +"spreadsheetId" +], +"parameters": { +"spreadsheetId": { +"description": "The ID of the spreadsheet to update.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values:batchUpdateByDataFilter", +"request": { +"$ref": "BatchUpdateValuesByDataFilterRequest" +}, +"response": { +"$ref": "BatchUpdateValuesByDataFilterResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"clear": { +"description": "Clears values from a spreadsheet. The caller must specify the spreadsheet ID and range. Only values are cleared -- all other properties of the cell (such as formatting, data validation, etc..) are kept.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", +"httpMethod": "POST", +"id": "sheets.spreadsheets.values.clear", +"parameterOrder": [ +"spreadsheetId", +"range" +], +"parameters": { +"range": { +"description": "The [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell) of the values to clear.", +"location": "path", +"required": true, +"type": "string" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet to update.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values/{range}:clear", +"request": { +"$ref": "ClearValuesRequest" +}, +"response": { +"$ref": "ClearValuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +}, +"get": { +"description": "Returns a range of values from a spreadsheet. The caller must specify the spreadsheet ID and a range.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", +"httpMethod": "GET", +"id": "sheets.spreadsheets.values.get", +"parameterOrder": [ +"spreadsheetId", +"range" +], +"parameters": { +"dateTimeRenderOption": { +"description": "How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", +"enum": [ +"SERIAL_NUMBER", +"FORMATTED_STRING" +], +"enumDescriptions": [ +"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", +"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)." +], +"location": "query", +"type": "string" +}, +"majorDimension": { +"description": "The major dimension that results should use. For example, if the spreadsheet data in Sheet1 is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=Sheet1!A1:B2?majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas requesting `range=Sheet1!A1:B2?majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"location": "query", +"type": "string" +}, +"range": { +"description": "The [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell) of the range to retrieve values from.", +"location": "path", +"required": true, +"type": "string" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet to retrieve data from.", +"location": "path", +"required": true, +"type": "string" +}, +"valueRenderOption": { +"description": "How values should be represented in the output. The default render option is FORMATTED_VALUE.", +"enum": [ +"FORMATTED_VALUE", +"UNFORMATTED_VALUE", +"FORMULA" +], +"enumDescriptions": [ +"Values will be calculated & formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", +"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", +"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date & time values](https://developers.google.com/sheets/api/guides/formats#about_date_time_values)." +], +"location": "query", +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values/{range}", +"response": { +"$ref": "ValueRange" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/drive.readonly", +"https://www.googleapis.com/auth/spreadsheets", +"https://www.googleapis.com/auth/spreadsheets.readonly" +] +}, +"update": { +"description": "Sets values in a range of a spreadsheet. The caller must specify the spreadsheet ID, range, and a valueInputOption.", +"flatPath": "v4/spreadsheets/{spreadsheetId}/values/{range}", +"httpMethod": "PUT", +"id": "sheets.spreadsheets.values.update", +"parameterOrder": [ +"spreadsheetId", +"range" +], +"parameters": { +"includeValuesInResponse": { +"description": "Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).", +"location": "query", +"type": "boolean" +}, +"range": { +"description": "The [A1 notation](/sheets/api/guides/concepts#cell) of the values to update.", +"location": "path", +"required": true, +"type": "string" +}, +"responseDateTimeRenderOption": { +"description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", +"enum": [ +"SERIAL_NUMBER", +"FORMATTED_STRING" +], +"enumDescriptions": [ +"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", +"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)." +], +"location": "query", +"type": "string" +}, +"responseValueRenderOption": { +"description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.", +"enum": [ +"FORMATTED_VALUE", +"UNFORMATTED_VALUE", +"FORMULA" +], +"enumDescriptions": [ +"Values will be calculated & formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", +"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", +"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date & time values](https://developers.google.com/sheets/api/guides/formats#about_date_time_values)." +], +"location": "query", +"type": "string" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet to update.", +"location": "path", +"required": true, +"type": "string" +}, +"valueInputOption": { +"description": "How the input data should be interpreted.", +"enum": [ +"INPUT_VALUE_OPTION_UNSPECIFIED", +"RAW", +"USER_ENTERED" +], +"enumDescriptions": [ +"Default input value. This value must not be used.", +"The values the user has entered will not be parsed and will be stored as-is.", +"The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI." +], +"location": "query", +"type": "string" +} +}, +"path": "v4/spreadsheets/{spreadsheetId}/values/{range}", +"request": { +"$ref": "ValueRange" +}, +"response": { +"$ref": "UpdateValuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/spreadsheets" +] +} +} +} +} +} +}, +"revision": "20240416", +"rootUrl": "https://sheets.googleapis.com/", +"schemas": { +"AddBandingRequest": { +"description": "Adds a new banded range to the spreadsheet.", +"id": "AddBandingRequest", +"properties": { +"bandedRange": { +"$ref": "BandedRange", +"description": "The banded range to add. The bandedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)" +} +}, +"type": "object" +}, +"AddBandingResponse": { +"description": "The result of adding a banded range.", +"id": "AddBandingResponse", +"properties": { +"bandedRange": { +"$ref": "BandedRange", +"description": "The banded range that was added." +} +}, +"type": "object" +}, +"AddChartRequest": { +"description": "Adds a chart to a sheet in the spreadsheet.", +"id": "AddChartRequest", +"properties": { +"chart": { +"$ref": "EmbeddedChart", +"description": "The chart that should be added to the spreadsheet, including the position where it should be placed. The chartId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of an embedded object that already exists.)" +} +}, +"type": "object" +}, +"AddChartResponse": { +"description": "The result of adding a chart to a spreadsheet.", +"id": "AddChartResponse", +"properties": { +"chart": { +"$ref": "EmbeddedChart", +"description": "The newly added chart." +} +}, +"type": "object" +}, +"AddConditionalFormatRuleRequest": { +"description": "Adds a new conditional format rule at the given index. All subsequent rules' indexes are incremented.", +"id": "AddConditionalFormatRuleRequest", +"properties": { +"index": { +"description": "The zero-based index where the rule should be inserted.", +"format": "int32", +"type": "integer" +}, +"rule": { +"$ref": "ConditionalFormatRule", +"description": "The rule to add." +} +}, +"type": "object" +}, +"AddDataSourceRequest": { +"description": "Adds a data source. After the data source is added successfully, an associated DATA_SOURCE sheet is created and an execution is triggered to refresh the sheet to read data from the data source. The request requires an additional `bigquery.readonly` OAuth scope.", +"id": "AddDataSourceRequest", +"properties": { +"dataSource": { +"$ref": "DataSource", +"description": "The data source to add." +} +}, +"type": "object" +}, +"AddDataSourceResponse": { +"description": "The result of adding a data source.", +"id": "AddDataSourceResponse", +"properties": { +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "The data execution status." +}, +"dataSource": { +"$ref": "DataSource", +"description": "The data source that was created." +} +}, +"type": "object" +}, +"AddDimensionGroupRequest": { +"description": "Creates a group over the specified range. If the requested range is a superset of the range of an existing group G, then the depth of G is incremented and this new group G' has the depth of that group. For example, a group [C:D, depth 1] + [B:E] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range is a subset of the range of an existing group G, then the depth of the new group G' becomes one greater than the depth of G. For example, a group [B:E, depth 1] + [C:D] results in groups [B:E, depth 1] and [C:D, depth 2]. If the requested range starts before and ends within, or starts within and ends after, the range of an existing group G, then the range of the existing group G becomes the union of the ranges, and the new group G' has depth one greater than the depth of G and range as the intersection of the ranges. For example, a group [B:D, depth 1] + [C:E] results in groups [B:E, depth 1] and [C:D, depth 2].", +"id": "AddDimensionGroupRequest", +"properties": { +"range": { +"$ref": "DimensionRange", +"description": "The range over which to create a group." +} +}, +"type": "object" +}, +"AddDimensionGroupResponse": { +"description": "The result of adding a group.", +"id": "AddDimensionGroupResponse", +"properties": { +"dimensionGroups": { +"description": "All groups of a dimension after adding a group to that dimension.", +"items": { +"$ref": "DimensionGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddFilterViewRequest": { +"description": "Adds a filter view.", +"id": "AddFilterViewRequest", +"properties": { +"filter": { +"$ref": "FilterView", +"description": "The filter to add. The filterViewId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a filter that already exists.)" +} +}, +"type": "object" +}, +"AddFilterViewResponse": { +"description": "The result of adding a filter view.", +"id": "AddFilterViewResponse", +"properties": { +"filter": { +"$ref": "FilterView", +"description": "The newly added filter view." +} +}, +"type": "object" +}, +"AddNamedRangeRequest": { +"description": "Adds a named range to the spreadsheet.", +"id": "AddNamedRangeRequest", +"properties": { +"namedRange": { +"$ref": "NamedRange", +"description": "The named range to add. The namedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)" +} +}, +"type": "object" +}, +"AddNamedRangeResponse": { +"description": "The result of adding a named range.", +"id": "AddNamedRangeResponse", +"properties": { +"namedRange": { +"$ref": "NamedRange", +"description": "The named range to add." +} +}, +"type": "object" +}, +"AddProtectedRangeRequest": { +"description": "Adds a new protected range.", +"id": "AddProtectedRangeRequest", +"properties": { +"protectedRange": { +"$ref": "ProtectedRange", +"description": "The protected range to be added. The protectedRangeId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a range that already exists.)" +} +}, +"type": "object" +}, +"AddProtectedRangeResponse": { +"description": "The result of adding a new protected range.", +"id": "AddProtectedRangeResponse", +"properties": { +"protectedRange": { +"$ref": "ProtectedRange", +"description": "The newly added protected range." +} +}, +"type": "object" +}, +"AddSheetRequest": { +"description": "Adds a new sheet. When a sheet is added at a given index, all subsequent sheets' indexes are incremented. To add an object sheet, use AddChartRequest instead and specify EmbeddedObjectPosition.sheetId or EmbeddedObjectPosition.newSheet.", +"id": "AddSheetRequest", +"properties": { +"properties": { +"$ref": "SheetProperties", +"description": "The properties the new sheet should have. All properties are optional. The sheetId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a sheet that already exists.)" +} +}, +"type": "object" +}, +"AddSheetResponse": { +"description": "The result of adding a sheet.", +"id": "AddSheetResponse", +"properties": { +"properties": { +"$ref": "SheetProperties", +"description": "The properties of the newly added sheet." +} +}, +"type": "object" +}, +"AddSlicerRequest": { +"description": "Adds a slicer to a sheet in the spreadsheet.", +"id": "AddSlicerRequest", +"properties": { +"slicer": { +"$ref": "Slicer", +"description": "The slicer that should be added to the spreadsheet, including the position where it should be placed. The slicerId field is optional; if one is not set, an id will be randomly generated. (It is an error to specify the ID of a slicer that already exists.)" +} +}, +"type": "object" +}, +"AddSlicerResponse": { +"description": "The result of adding a slicer to a spreadsheet.", +"id": "AddSlicerResponse", +"properties": { +"slicer": { +"$ref": "Slicer", +"description": "The newly added slicer." +} +}, +"type": "object" +}, +"AppendCellsRequest": { +"description": "Adds new cells after the last row with data in a sheet, inserting new rows into the sheet if necessary.", +"id": "AppendCellsRequest", +"properties": { +"fields": { +"description": "The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; 'row.values.' should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"rows": { +"description": "The data to append.", +"items": { +"$ref": "RowData" +}, +"type": "array" +}, +"sheetId": { +"description": "The sheet ID to append the data to.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AppendDimensionRequest": { +"description": "Appends rows or columns to the end of a sheet.", +"id": "AppendDimensionRequest", +"properties": { +"dimension": { +"description": "Whether rows or columns should be appended.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +}, +"length": { +"description": "The number of rows or columns to append.", +"format": "int32", +"type": "integer" +}, +"sheetId": { +"description": "The sheet to append rows or columns to.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AppendValuesResponse": { +"description": "The response when updating a range of values in a spreadsheet.", +"id": "AppendValuesResponse", +"properties": { +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +}, +"tableRange": { +"description": "The range (in A1 notation) of the table that values are being appended to (before the values were appended). Empty if no table was found.", +"type": "string" +}, +"updates": { +"$ref": "UpdateValuesResponse", +"description": "Information about the updates that were applied." +} +}, +"type": "object" +}, +"AutoFillRequest": { +"description": "Fills in more data based on existing data.", +"id": "AutoFillRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range to autofill. This will examine the range and detect the location that has data and automatically fill that data in to the rest of the range." +}, +"sourceAndDestination": { +"$ref": "SourceAndDestination", +"description": "The source and destination areas to autofill. This explicitly lists the source of the autofill and where to extend that data." +}, +"useAlternateSeries": { +"description": "True if we should generate data with the \"alternate\" series. This differs based on the type and amount of source data.", +"type": "boolean" +} +}, +"type": "object" +}, +"AutoResizeDimensionsRequest": { +"description": "Automatically resizes one or more dimensions based on the contents of the cells in that dimension.", +"id": "AutoResizeDimensionsRequest", +"properties": { +"dataSourceSheetDimensions": { +"$ref": "DataSourceSheetDimensionRange", +"description": "The dimensions on a data source sheet to automatically resize." +}, +"dimensions": { +"$ref": "DimensionRange", +"description": "The dimensions to automatically resize." +} +}, +"type": "object" +}, +"BandedRange": { +"description": "A banded (alternating colors) range in a sheet.", +"id": "BandedRange", +"properties": { +"bandedRangeId": { +"description": "The ID of the banded range.", +"format": "int32", +"type": "integer" +}, +"columnProperties": { +"$ref": "BandingProperties", +"description": "Properties for column bands. These properties are applied on a column- by-column basis throughout all the columns in the range. At least one of row_properties or column_properties must be specified." +}, +"range": { +"$ref": "GridRange", +"description": "The range over which these properties are applied." +}, +"rowProperties": { +"$ref": "BandingProperties", +"description": "Properties for row bands. These properties are applied on a row-by-row basis throughout all the rows in the range. At least one of row_properties or column_properties must be specified." +} +}, +"type": "object" +}, +"BandingProperties": { +"description": "Properties referring a single dimension (either row or column). If both BandedRange.row_properties and BandedRange.column_properties are set, the fill colors are applied to cells according to the following rules: * header_color and footer_color take priority over band colors. * first_band_color takes priority over second_band_color. * row_properties takes priority over column_properties. For example, the first row color takes priority over the first column color, but the first column color takes priority over the second row color. Similarly, the row header takes priority over the column header in the top left cell, but the column header takes priority over the first row color if the row header is not set.", +"id": "BandingProperties", +"properties": { +"firstBandColor": { +"$ref": "Color", +"deprecated": true, +"description": "The first color that is alternating. (Required) Deprecated: Use first_band_color_style." +}, +"firstBandColorStyle": { +"$ref": "ColorStyle", +"description": "The first color that is alternating. (Required) If first_band_color is also set, this field takes precedence." +}, +"footerColor": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the last row or column. If this field is not set, the last row or column is filled with either first_band_color or second_band_color, depending on the color of the previous row or column. Deprecated: Use footer_color_style." +}, +"footerColorStyle": { +"$ref": "ColorStyle", +"description": "The color of the last row or column. If this field is not set, the last row or column is filled with either first_band_color or second_band_color, depending on the color of the previous row or column. If footer_color is also set, this field takes precedence." +}, +"headerColor": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the first row or column. If this field is set, the first row or column is filled with this color and the colors alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column is filled with first_band_color and the colors proceed to alternate as they normally would. Deprecated: Use header_color_style." +}, +"headerColorStyle": { +"$ref": "ColorStyle", +"description": "The color of the first row or column. If this field is set, the first row or column is filled with this color and the colors alternate between first_band_color and second_band_color starting from the second row or column. Otherwise, the first row or column is filled with first_band_color and the colors proceed to alternate as they normally would. If header_color is also set, this field takes precedence." +}, +"secondBandColor": { +"$ref": "Color", +"deprecated": true, +"description": "The second color that is alternating. (Required) Deprecated: Use second_band_color_style." +}, +"secondBandColorStyle": { +"$ref": "ColorStyle", +"description": "The second color that is alternating. (Required) If second_band_color is also set, this field takes precedence." +} +}, +"type": "object" +}, +"BaselineValueFormat": { +"description": "Formatting options for baseline value.", +"id": "BaselineValueFormat", +"properties": { +"comparisonType": { +"description": "The comparison type of key value with baseline value.", +"enum": [ +"COMPARISON_TYPE_UNDEFINED", +"ABSOLUTE_DIFFERENCE", +"PERCENTAGE_DIFFERENCE" +], +"enumDescriptions": [ +"Default value, do not use.", +"Use absolute difference between key and baseline value.", +"Use percentage difference between key and baseline value." +], +"type": "string" +}, +"description": { +"description": "Description which is appended after the baseline value. This field is optional.", +"type": "string" +}, +"negativeColor": { +"$ref": "Color", +"deprecated": true, +"description": "Color to be used, in case baseline value represents a negative change for key value. This field is optional. Deprecated: Use negative_color_style." +}, +"negativeColorStyle": { +"$ref": "ColorStyle", +"description": "Color to be used, in case baseline value represents a negative change for key value. This field is optional. If negative_color is also set, this field takes precedence." +}, +"position": { +"$ref": "TextPosition", +"description": "Specifies the horizontal text positioning of baseline value. This field is optional. If not specified, default positioning is used." +}, +"positiveColor": { +"$ref": "Color", +"deprecated": true, +"description": "Color to be used, in case baseline value represents a positive change for key value. This field is optional. Deprecated: Use positive_color_style." +}, +"positiveColorStyle": { +"$ref": "ColorStyle", +"description": "Color to be used, in case baseline value represents a positive change for key value. This field is optional. If positive_color is also set, this field takes precedence." +}, +"textFormat": { +"$ref": "TextFormat", +"description": "Text formatting options for baseline value. The link field is not supported." +} +}, +"type": "object" +}, +"BasicChartAxis": { +"description": "An axis of the chart. A chart may not have more than one axis per axis position.", +"id": "BasicChartAxis", +"properties": { +"format": { +"$ref": "TextFormat", +"description": "The format of the title. Only valid if the axis is not associated with the domain. The link field is not supported." +}, +"position": { +"description": "The position of this axis.", +"enum": [ +"BASIC_CHART_AXIS_POSITION_UNSPECIFIED", +"BOTTOM_AXIS", +"LEFT_AXIS", +"RIGHT_AXIS" +], +"enumDescriptions": [ +"Default value, do not use.", +"The axis rendered at the bottom of a chart. For most charts, this is the standard major axis. For bar charts, this is a minor axis.", +"The axis rendered at the left of a chart. For most charts, this is a minor axis. For bar charts, this is the standard major axis.", +"The axis rendered at the right of a chart. For most charts, this is a minor axis. For bar charts, this is an unusual major axis." +], +"type": "string" +}, +"title": { +"description": "The title of this axis. If set, this overrides any title inferred from headers of the data.", +"type": "string" +}, +"titleTextPosition": { +"$ref": "TextPosition", +"description": "The axis title text position." +}, +"viewWindowOptions": { +"$ref": "ChartAxisViewWindowOptions", +"description": "The view window options for this axis." +} +}, +"type": "object" +}, +"BasicChartDomain": { +"description": "The domain of a chart. For example, if charting stock prices over time, this would be the date.", +"id": "BasicChartDomain", +"properties": { +"domain": { +"$ref": "ChartData", +"description": "The data of the domain. For example, if charting stock prices over time, this is the data representing the dates." +}, +"reversed": { +"description": "True to reverse the order of the domain values (horizontal axis).", +"type": "boolean" +} +}, +"type": "object" +}, +"BasicChartSeries": { +"description": "A single series of data in a chart. For example, if charting stock prices over time, multiple series may exist, one for the \"Open Price\", \"High Price\", \"Low Price\" and \"Close Price\".", +"id": "BasicChartSeries", +"properties": { +"color": { +"$ref": "Color", +"deprecated": true, +"description": "The color for elements (such as bars, lines, and points) associated with this series. If empty, a default color is used. Deprecated: Use color_style." +}, +"colorStyle": { +"$ref": "ColorStyle", +"description": "The color for elements (such as bars, lines, and points) associated with this series. If empty, a default color is used. If color is also set, this field takes precedence." +}, +"dataLabel": { +"$ref": "DataLabel", +"description": "Information about the data labels for this series." +}, +"lineStyle": { +"$ref": "LineStyle", +"description": "The line style of this series. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA or LINE." +}, +"pointStyle": { +"$ref": "PointStyle", +"description": "The style for points associated with this series. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA, LINE, or SCATTER. If empty, a default point style is used." +}, +"series": { +"$ref": "ChartData", +"description": "The data being visualized in this chart series." +}, +"styleOverrides": { +"description": "Style override settings for series data points.", +"items": { +"$ref": "BasicSeriesDataPointStyleOverride" +}, +"type": "array" +}, +"targetAxis": { +"description": "The minor axis that will specify the range of values for this series. For example, if charting stocks over time, the \"Volume\" series may want to be pinned to the right with the prices pinned to the left, because the scale of trading volume is different than the scale of prices. It is an error to specify an axis that isn't a valid minor axis for the chart's type.", +"enum": [ +"BASIC_CHART_AXIS_POSITION_UNSPECIFIED", +"BOTTOM_AXIS", +"LEFT_AXIS", +"RIGHT_AXIS" +], +"enumDescriptions": [ +"Default value, do not use.", +"The axis rendered at the bottom of a chart. For most charts, this is the standard major axis. For bar charts, this is a minor axis.", +"The axis rendered at the left of a chart. For most charts, this is a minor axis. For bar charts, this is the standard major axis.", +"The axis rendered at the right of a chart. For most charts, this is a minor axis. For bar charts, this is an unusual major axis." +], +"type": "string" +}, +"type": { +"description": "The type of this series. Valid only if the chartType is COMBO. Different types will change the way the series is visualized. Only LINE, AREA, and COLUMN are supported.", +"enum": [ +"BASIC_CHART_TYPE_UNSPECIFIED", +"BAR", +"LINE", +"AREA", +"COLUMN", +"SCATTER", +"COMBO", +"STEPPED_AREA" +], +"enumDescriptions": [ +"Default value, do not use.", +"A bar chart.", +"A line chart.", +"An area chart.", +"A column chart.", +"A scatter chart.", +"A combo chart.", +"A stepped area chart." +], +"type": "string" +} +}, +"type": "object" +}, +"BasicChartSpec": { +"description": "The specification for a basic chart. See BasicChartType for the list of charts this supports.", +"id": "BasicChartSpec", +"properties": { +"axis": { +"description": "The axis on the chart.", +"items": { +"$ref": "BasicChartAxis" +}, +"type": "array" +}, +"chartType": { +"description": "The type of the chart.", +"enum": [ +"BASIC_CHART_TYPE_UNSPECIFIED", +"BAR", +"LINE", +"AREA", +"COLUMN", +"SCATTER", +"COMBO", +"STEPPED_AREA" +], +"enumDescriptions": [ +"Default value, do not use.", +"A bar chart.", +"A line chart.", +"An area chart.", +"A column chart.", +"A scatter chart.", +"A combo chart.", +"A stepped area chart." +], +"type": "string" +}, +"compareMode": { +"description": "The behavior of tooltips and data highlighting when hovering on data and chart area.", +"enum": [ +"BASIC_CHART_COMPARE_MODE_UNSPECIFIED", +"DATUM", +"CATEGORY" +], +"enumDescriptions": [ +"Default value, do not use.", +"Only the focused data element is highlighted and shown in the tooltip.", +"All data elements with the same category (e.g., domain value) are highlighted and shown in the tooltip." +], +"type": "string" +}, +"domains": { +"description": "The domain of data this is charting. Only a single domain is supported.", +"items": { +"$ref": "BasicChartDomain" +}, +"type": "array" +}, +"headerCount": { +"description": "The number of rows or columns in the data that are \"headers\". If not set, Google Sheets will guess how many rows are headers based on the data. (Note that BasicChartAxis.title may override the axis title inferred from the header values.)", +"format": "int32", +"type": "integer" +}, +"interpolateNulls": { +"description": "If some values in a series are missing, gaps may appear in the chart (e.g, segments of lines in a line chart will be missing). To eliminate these gaps set this to true. Applies to Line, Area, and Combo charts.", +"type": "boolean" +}, +"legendPosition": { +"description": "The position of the chart legend.", +"enum": [ +"BASIC_CHART_LEGEND_POSITION_UNSPECIFIED", +"BOTTOM_LEGEND", +"LEFT_LEGEND", +"RIGHT_LEGEND", +"TOP_LEGEND", +"NO_LEGEND" +], +"enumDescriptions": [ +"Default value, do not use.", +"The legend is rendered on the bottom of the chart.", +"The legend is rendered on the left of the chart.", +"The legend is rendered on the right of the chart.", +"The legend is rendered on the top of the chart.", +"No legend is rendered." +], +"type": "string" +}, +"lineSmoothing": { +"description": "Gets whether all lines should be rendered smooth or straight by default. Applies to Line charts.", +"type": "boolean" +}, +"series": { +"description": "The data this chart is visualizing.", +"items": { +"$ref": "BasicChartSeries" +}, +"type": "array" +}, +"stackedType": { +"description": "The stacked type for charts that support vertical stacking. Applies to Area, Bar, Column, Combo, and Stepped Area charts.", +"enum": [ +"BASIC_CHART_STACKED_TYPE_UNSPECIFIED", +"NOT_STACKED", +"STACKED", +"PERCENT_STACKED" +], +"enumDescriptions": [ +"Default value, do not use.", +"Series are not stacked.", +"Series values are stacked, each value is rendered vertically beginning from the top of the value below it.", +"Vertical stacks are stretched to reach the top of the chart, with values laid out as percentages of each other." +], +"type": "string" +}, +"threeDimensional": { +"description": "True to make the chart 3D. Applies to Bar and Column charts.", +"type": "boolean" +}, +"totalDataLabel": { +"$ref": "DataLabel", +"description": "Controls whether to display additional data labels on stacked charts which sum the total value of all stacked values at each value along the domain axis. These data labels can only be set when chart_type is one of AREA, BAR, COLUMN, COMBO or STEPPED_AREA and stacked_type is either STACKED or PERCENT_STACKED. In addition, for COMBO, this will only be supported if there is only one type of stackable series type or one type has more series than the others and each of the other types have no more than one series. For example, if a chart has two stacked bar series and one area series, the total data labels will be supported. If it has three bar series and two area series, total data labels are not allowed. Neither CUSTOM nor placement can be set on the total_data_label." +} +}, +"type": "object" +}, +"BasicFilter": { +"description": "The default filter associated with a sheet.", +"id": "BasicFilter", +"properties": { +"criteria": { +"additionalProperties": { +"$ref": "FilterCriteria" +}, +"deprecated": true, +"description": "The criteria for showing/hiding values per column. The map's key is the column index, and the value is the criteria for that column. This field is deprecated in favor of filter_specs.", +"type": "object" +}, +"filterSpecs": { +"description": "The filter criteria per column. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence.", +"items": { +"$ref": "FilterSpec" +}, +"type": "array" +}, +"range": { +"$ref": "GridRange", +"description": "The range the filter covers." +}, +"sortSpecs": { +"description": "The sort order per column. Later specifications are used when values are equal in the earlier specifications.", +"items": { +"$ref": "SortSpec" +}, +"type": "array" +} +}, +"type": "object" +}, +"BasicSeriesDataPointStyleOverride": { +"description": "Style override settings for a single series data point.", +"id": "BasicSeriesDataPointStyleOverride", +"properties": { +"color": { +"$ref": "Color", +"deprecated": true, +"description": "Color of the series data point. If empty, the series default is used. Deprecated: Use color_style." +}, +"colorStyle": { +"$ref": "ColorStyle", +"description": "Color of the series data point. If empty, the series default is used. If color is also set, this field takes precedence." +}, +"index": { +"description": "The zero-based index of the series data point.", +"format": "int32", +"type": "integer" +}, +"pointStyle": { +"$ref": "PointStyle", +"description": "Point style of the series data point. Valid only if the chartType is AREA, LINE, or SCATTER. COMBO charts are also supported if the series chart type is AREA, LINE, or SCATTER. If empty, the series default is used." +} +}, +"type": "object" +}, +"BatchClearValuesByDataFilterRequest": { +"description": "The request for clearing more than one range selected by a DataFilter in a spreadsheet.", +"id": "BatchClearValuesByDataFilterRequest", +"properties": { +"dataFilters": { +"description": "The DataFilters used to determine which ranges to clear.", +"items": { +"$ref": "DataFilter" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchClearValuesByDataFilterResponse": { +"description": "The response when clearing a range of values selected with DataFilters in a spreadsheet.", +"id": "BatchClearValuesByDataFilterResponse", +"properties": { +"clearedRanges": { +"description": "The ranges that were cleared, in [A1 notation](/sheets/api/guides/concepts#cell). If the requests are for an unbounded range or a ranger larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet's limits.", +"items": { +"type": "string" +}, +"type": "array" +}, +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +} +}, +"type": "object" +}, +"BatchClearValuesRequest": { +"description": "The request for clearing more than one range of values in a spreadsheet.", +"id": "BatchClearValuesRequest", +"properties": { +"ranges": { +"description": "The ranges to clear, in [A1 notation or R1C1 notation](/sheets/api/guides/concepts#cell).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchClearValuesResponse": { +"description": "The response when clearing a range of values in a spreadsheet.", +"id": "BatchClearValuesResponse", +"properties": { +"clearedRanges": { +"description": "The ranges that were cleared, in A1 notation. If the requests are for an unbounded range or a ranger larger than the bounds of the sheet, this is the actual ranges that were cleared, bounded to the sheet's limits.", +"items": { +"type": "string" +}, +"type": "array" +}, +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +} +}, +"type": "object" +}, +"BatchGetValuesByDataFilterRequest": { +"description": "The request for retrieving a range of values in a spreadsheet selected by a set of DataFilters.", +"id": "BatchGetValuesByDataFilterRequest", +"properties": { +"dataFilters": { +"description": "The data filters used to match the ranges of values to retrieve. Ranges that match any of the specified data filters are included in the response.", +"items": { +"$ref": "DataFilter" +}, +"type": "array" +}, +"dateTimeRenderOption": { +"description": "How dates, times, and durations should be represented in the output. This is ignored if value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", +"enum": [ +"SERIAL_NUMBER", +"FORMATTED_STRING" +], +"enumDescriptions": [ +"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", +"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)." +], +"type": "string" +}, +"majorDimension": { +"description": "The major dimension that results should use. For example, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then a request that selects that range and sets `majorDimension=ROWS` returns `[[1,2],[3,4]]`, whereas a request that sets `majorDimension=COLUMNS` returns `[[1,3],[2,4]]`.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +}, +"valueRenderOption": { +"description": "How values should be represented in the output. The default render option is FORMATTED_VALUE.", +"enum": [ +"FORMATTED_VALUE", +"UNFORMATTED_VALUE", +"FORMULA" +], +"enumDescriptions": [ +"Values will be calculated & formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", +"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", +"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date & time values](https://developers.google.com/sheets/api/guides/formats#about_date_time_values)." +], +"type": "string" +} +}, +"type": "object" +}, +"BatchGetValuesByDataFilterResponse": { +"description": "The response when retrieving more than one range of values in a spreadsheet selected by DataFilters.", +"id": "BatchGetValuesByDataFilterResponse", +"properties": { +"spreadsheetId": { +"description": "The ID of the spreadsheet the data was retrieved from.", +"type": "string" +}, +"valueRanges": { +"description": "The requested values with the list of data filters that matched them.", +"items": { +"$ref": "MatchedValueRange" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchGetValuesResponse": { +"description": "The response when retrieving more than one range of values in a spreadsheet.", +"id": "BatchGetValuesResponse", +"properties": { +"spreadsheetId": { +"description": "The ID of the spreadsheet the data was retrieved from.", +"type": "string" +}, +"valueRanges": { +"description": "The requested values. The order of the ValueRanges is the same as the order of the requested ranges.", +"items": { +"$ref": "ValueRange" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchUpdateSpreadsheetRequest": { +"description": "The request for updating any aspect of a spreadsheet.", +"id": "BatchUpdateSpreadsheetRequest", +"properties": { +"includeSpreadsheetInResponse": { +"description": "Determines if the update response should include the spreadsheet resource.", +"type": "boolean" +}, +"requests": { +"description": "A list of updates to apply to the spreadsheet. Requests will be applied in the order they are specified. If any request is not valid, no requests will be applied.", +"items": { +"$ref": "Request" +}, +"type": "array" +}, +"responseIncludeGridData": { +"description": "True if grid data should be returned. Meaningful only if include_spreadsheet_in_response is 'true'. This parameter is ignored if a field mask was set in the request.", +"type": "boolean" +}, +"responseRanges": { +"description": "Limits the ranges included in the response spreadsheet. Meaningful only if include_spreadsheet_in_response is 'true'.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchUpdateSpreadsheetResponse": { +"description": "The reply for batch updating a spreadsheet.", +"id": "BatchUpdateSpreadsheetResponse", +"properties": { +"replies": { +"description": "The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty.", +"items": { +"$ref": "Response" +}, +"type": "array" +}, +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +}, +"updatedSpreadsheet": { +"$ref": "Spreadsheet", +"description": "The spreadsheet after updates were applied. This is only set if BatchUpdateSpreadsheetRequest.include_spreadsheet_in_response is `true`." +} +}, +"type": "object" +}, +"BatchUpdateValuesByDataFilterRequest": { +"description": "The request for updating more than one range of values in a spreadsheet.", +"id": "BatchUpdateValuesByDataFilterRequest", +"properties": { +"data": { +"description": "The new values to apply to the spreadsheet. If more than one range is matched by the specified DataFilter the specified values are applied to all of those ranges.", +"items": { +"$ref": "DataFilterValueRange" +}, +"type": "array" +}, +"includeValuesInResponse": { +"description": "Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. The `updatedData` field within each of the BatchUpdateValuesResponse.responses contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).", +"type": "boolean" +}, +"responseDateTimeRenderOption": { +"description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", +"enum": [ +"SERIAL_NUMBER", +"FORMATTED_STRING" +], +"enumDescriptions": [ +"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", +"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)." +], +"type": "string" +}, +"responseValueRenderOption": { +"description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.", +"enum": [ +"FORMATTED_VALUE", +"UNFORMATTED_VALUE", +"FORMULA" +], +"enumDescriptions": [ +"Values will be calculated & formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", +"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", +"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date & time values](https://developers.google.com/sheets/api/guides/formats#about_date_time_values)." +], +"type": "string" +}, +"valueInputOption": { +"description": "How the input data should be interpreted.", +"enum": [ +"INPUT_VALUE_OPTION_UNSPECIFIED", +"RAW", +"USER_ENTERED" +], +"enumDescriptions": [ +"Default input value. This value must not be used.", +"The values the user has entered will not be parsed and will be stored as-is.", +"The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI." +], +"type": "string" +} +}, +"type": "object" +}, +"BatchUpdateValuesByDataFilterResponse": { +"description": "The response when updating a range of values in a spreadsheet.", +"id": "BatchUpdateValuesByDataFilterResponse", +"properties": { +"responses": { +"description": "The response for each range updated.", +"items": { +"$ref": "UpdateValuesByDataFilterResponse" +}, +"type": "array" +}, +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +}, +"totalUpdatedCells": { +"description": "The total number of cells updated.", +"format": "int32", +"type": "integer" +}, +"totalUpdatedColumns": { +"description": "The total number of columns where at least one cell in the column was updated.", +"format": "int32", +"type": "integer" +}, +"totalUpdatedRows": { +"description": "The total number of rows where at least one cell in the row was updated.", +"format": "int32", +"type": "integer" +}, +"totalUpdatedSheets": { +"description": "The total number of sheets where at least one cell in the sheet was updated.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"BatchUpdateValuesRequest": { +"description": "The request for updating more than one range of values in a spreadsheet.", +"id": "BatchUpdateValuesRequest", +"properties": { +"data": { +"description": "The new values to apply to the spreadsheet.", +"items": { +"$ref": "ValueRange" +}, +"type": "array" +}, +"includeValuesInResponse": { +"description": "Determines if the update response should include the values of the cells that were updated. By default, responses do not include the updated values. The `updatedData` field within each of the BatchUpdateValuesResponse.responses contains the updated values. If the range to write was larger than the range actually written, the response includes all values in the requested range (excluding trailing empty rows and columns).", +"type": "boolean" +}, +"responseDateTimeRenderOption": { +"description": "Determines how dates, times, and durations in the response should be rendered. This is ignored if response_value_render_option is FORMATTED_VALUE. The default dateTime render option is SERIAL_NUMBER.", +"enum": [ +"SERIAL_NUMBER", +"FORMATTED_STRING" +], +"enumDescriptions": [ +"Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year.", +"Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale)." +], +"type": "string" +}, +"responseValueRenderOption": { +"description": "Determines how values in the response should be rendered. The default render option is FORMATTED_VALUE.", +"enum": [ +"FORMATTED_VALUE", +"UNFORMATTED_VALUE", +"FORMULA" +], +"enumDescriptions": [ +"Values will be calculated & formatted in the response according to the cell's formatting. Formatting is based on the spreadsheet's locale, not the requesting user's locale. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return `\"$1.23\"`.", +"Values will be calculated, but not formatted in the reply. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then `A2` would return the number `1.23`.", +"Values will not be calculated. The reply will include the formulas. For example, if `A1` is `1.23` and `A2` is `=A1` and formatted as currency, then A2 would return `\"=A1\"`. Sheets treats date and time values as decimal values. This lets you perform arithmetic on them in formulas. For more information on interpreting date and time values, see [About date & time values](https://developers.google.com/sheets/api/guides/formats#about_date_time_values)." +], +"type": "string" +}, +"valueInputOption": { +"description": "How the input data should be interpreted.", +"enum": [ +"INPUT_VALUE_OPTION_UNSPECIFIED", +"RAW", +"USER_ENTERED" +], +"enumDescriptions": [ +"Default input value. This value must not be used.", +"The values the user has entered will not be parsed and will be stored as-is.", +"The values will be parsed as if the user typed them into the UI. Numbers will stay as numbers, but strings may be converted to numbers, dates, etc. following the same rules that are applied when entering text into a cell via the Google Sheets UI." +], +"type": "string" +} +}, +"type": "object" +}, +"BatchUpdateValuesResponse": { +"description": "The response when updating a range of values in a spreadsheet.", +"id": "BatchUpdateValuesResponse", +"properties": { +"responses": { +"description": "One UpdateValuesResponse per requested range, in the same order as the requests appeared.", +"items": { +"$ref": "UpdateValuesResponse" +}, +"type": "array" +}, +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +}, +"totalUpdatedCells": { +"description": "The total number of cells updated.", +"format": "int32", +"type": "integer" +}, +"totalUpdatedColumns": { +"description": "The total number of columns where at least one cell in the column was updated.", +"format": "int32", +"type": "integer" +}, +"totalUpdatedRows": { +"description": "The total number of rows where at least one cell in the row was updated.", +"format": "int32", +"type": "integer" +}, +"totalUpdatedSheets": { +"description": "The total number of sheets where at least one cell in the sheet was updated.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"BigQueryDataSourceSpec": { +"description": "The specification of a BigQuery data source that's connected to a sheet.", +"id": "BigQueryDataSourceSpec", +"properties": { +"projectId": { +"description": "The ID of a BigQuery enabled Google Cloud project with a billing account attached. For any queries executed against the data source, the project is charged.", +"type": "string" +}, +"querySpec": { +"$ref": "BigQueryQuerySpec", +"description": "A BigQueryQuerySpec." +}, +"tableSpec": { +"$ref": "BigQueryTableSpec", +"description": "A BigQueryTableSpec." +} +}, +"type": "object" +}, +"BigQueryQuerySpec": { +"description": "Specifies a custom BigQuery query.", +"id": "BigQueryQuerySpec", +"properties": { +"rawQuery": { +"description": "The raw query string.", +"type": "string" +} +}, +"type": "object" +}, +"BigQueryTableSpec": { +"description": "Specifies a BigQuery table definition. Only [native tables](https://cloud.google.com/bigquery/docs/tables-intro) are allowed.", +"id": "BigQueryTableSpec", +"properties": { +"datasetId": { +"description": "The BigQuery dataset id.", +"type": "string" +}, +"tableId": { +"description": "The BigQuery table id.", +"type": "string" +}, +"tableProjectId": { +"description": "The ID of a BigQuery project the table belongs to. If not specified, the project_id is assumed.", +"type": "string" +} +}, +"type": "object" +}, +"BooleanCondition": { +"description": "A condition that can evaluate to true or false. BooleanConditions are used by conditional formatting, data validation, and the criteria in filters.", +"id": "BooleanCondition", +"properties": { +"type": { +"description": "The type of condition.", +"enum": [ +"CONDITION_TYPE_UNSPECIFIED", +"NUMBER_GREATER", +"NUMBER_GREATER_THAN_EQ", +"NUMBER_LESS", +"NUMBER_LESS_THAN_EQ", +"NUMBER_EQ", +"NUMBER_NOT_EQ", +"NUMBER_BETWEEN", +"NUMBER_NOT_BETWEEN", +"TEXT_CONTAINS", +"TEXT_NOT_CONTAINS", +"TEXT_STARTS_WITH", +"TEXT_ENDS_WITH", +"TEXT_EQ", +"TEXT_IS_EMAIL", +"TEXT_IS_URL", +"DATE_EQ", +"DATE_BEFORE", +"DATE_AFTER", +"DATE_ON_OR_BEFORE", +"DATE_ON_OR_AFTER", +"DATE_BETWEEN", +"DATE_NOT_BETWEEN", +"DATE_IS_VALID", +"ONE_OF_RANGE", +"ONE_OF_LIST", +"BLANK", +"NOT_BLANK", +"CUSTOM_FORMULA", +"BOOLEAN", +"TEXT_NOT_EQ", +"DATE_NOT_EQ", +"FILTER_EXPRESSION" +], +"enumDescriptions": [ +"The default value, do not use.", +"The cell's value must be greater than the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must be greater than or equal to the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must be less than the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must be less than or equal to the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must be equal to the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue for data validation, conditional formatting, and filters on non-data source objects and at least one ConditionValue for filters on data source objects.", +"The cell's value must be not equal to the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue for data validation, conditional formatting, and filters on non-data source objects and at least one ConditionValue for filters on data source objects.", +"The cell's value must be between the two condition values. Supported by data validation, conditional formatting and filters. Requires exactly two ConditionValues.", +"The cell's value must not be between the two condition values. Supported by data validation, conditional formatting and filters. Requires exactly two ConditionValues.", +"The cell's value must contain the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must not contain the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must start with the condition's value. Supported by conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must end with the condition's value. Supported by conditional formatting and filters. Requires a single ConditionValue.", +"The cell's value must be exactly the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue for data validation, conditional formatting, and filters on non-data source objects and at least one ConditionValue for filters on data source objects.", +"The cell's value must be a valid email address. Supported by data validation. Requires no ConditionValues.", +"The cell's value must be a valid URL. Supported by data validation. Requires no ConditionValues.", +"The cell's value must be the same date as the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue for data validation, conditional formatting, and filters on non-data source objects and at least one ConditionValue for filters on data source objects.", +"The cell's value must be before the date of the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue that may be a relative date.", +"The cell's value must be after the date of the condition's value. Supported by data validation, conditional formatting and filters. Requires a single ConditionValue that may be a relative date.", +"The cell's value must be on or before the date of the condition's value. Supported by data validation. Requires a single ConditionValue that may be a relative date.", +"The cell's value must be on or after the date of the condition's value. Supported by data validation. Requires a single ConditionValue that may be a relative date.", +"The cell's value must be between the dates of the two condition values. Supported by data validation. Requires exactly two ConditionValues.", +"The cell's value must be outside the dates of the two condition values. Supported by data validation. Requires exactly two ConditionValues.", +"The cell's value must be a date. Supported by data validation. Requires no ConditionValues.", +"The cell's value must be listed in the grid in condition value's range. Supported by data validation. Requires a single ConditionValue, and the value must be a valid range in A1 notation.", +"The cell's value must be in the list of condition values. Supported by data validation. Supports any number of condition values, one per item in the list. Formulas are not supported in the values.", +"The cell's value must be empty. Supported by conditional formatting and filters. Requires no ConditionValues.", +"The cell's value must not be empty. Supported by conditional formatting and filters. Requires no ConditionValues.", +"The condition's formula must evaluate to true. Supported by data validation, conditional formatting and filters. Not supported by data source sheet filters. Requires a single ConditionValue.", +"The cell's value must be TRUE/FALSE or in the list of condition values. Supported by data validation. Renders as a cell checkbox. Supports zero, one or two ConditionValues. No values indicates the cell must be TRUE or FALSE, where TRUE renders as checked and FALSE renders as unchecked. One value indicates the cell will render as checked when it contains that value and unchecked when it is blank. Two values indicate that the cell will render as checked when it contains the first value and unchecked when it contains the second value. For example, [\"Yes\",\"No\"] indicates that the cell will render a checked box when it has the value \"Yes\" and an unchecked box when it has the value \"No\".", +"The cell's value must be exactly not the condition's value. Supported by filters on data source objects. Requires at least one ConditionValue.", +"The cell's value must be exactly not the condition's value. Supported by filters on data source objects. Requires at least one ConditionValue.", +"The cell's value must follow the pattern specified. Requires a single ConditionValue." +], +"type": "string" +}, +"values": { +"description": "The values of the condition. The number of supported values depends on the condition type. Some support zero values, others one or two values, and ConditionType.ONE_OF_LIST supports an arbitrary number of values.", +"items": { +"$ref": "ConditionValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"BooleanRule": { +"description": "A rule that may or may not match, depending on the condition.", +"id": "BooleanRule", +"properties": { +"condition": { +"$ref": "BooleanCondition", +"description": "The condition of the rule. If the condition evaluates to true, the format is applied." +}, +"format": { +"$ref": "CellFormat", +"description": "The format to apply. Conditional formatting can only apply a subset of formatting: bold, italic, strikethrough, foreground color and, background color." +} +}, +"type": "object" +}, +"Border": { +"description": "A border along a cell.", +"id": "Border", +"properties": { +"color": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the border. Deprecated: Use color_style." +}, +"colorStyle": { +"$ref": "ColorStyle", +"description": "The color of the border. If color is also set, this field takes precedence." +}, +"style": { +"description": "The style of the border.", +"enum": [ +"STYLE_UNSPECIFIED", +"DOTTED", +"DASHED", +"SOLID", +"SOLID_MEDIUM", +"SOLID_THICK", +"NONE", +"DOUBLE" +], +"enumDescriptions": [ +"The style is not specified. Do not use this.", +"The border is dotted.", +"The border is dashed.", +"The border is a thin solid line.", +"The border is a medium solid line.", +"The border is a thick solid line.", +"No border. Used only when updating a border in order to erase it.", +"The border is two solid lines." +], +"type": "string" +}, +"width": { +"deprecated": true, +"description": "The width of the border, in pixels. Deprecated; the width is determined by the \"style\" field.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Borders": { +"description": "The borders of the cell.", +"id": "Borders", +"properties": { +"bottom": { +"$ref": "Border", +"description": "The bottom border of the cell." +}, +"left": { +"$ref": "Border", +"description": "The left border of the cell." +}, +"right": { +"$ref": "Border", +"description": "The right border of the cell." +}, +"top": { +"$ref": "Border", +"description": "The top border of the cell." +} +}, +"type": "object" +}, +"BubbleChartSpec": { +"description": "A bubble chart.", +"id": "BubbleChartSpec", +"properties": { +"bubbleBorderColor": { +"$ref": "Color", +"deprecated": true, +"description": "The bubble border color. Deprecated: Use bubble_border_color_style." +}, +"bubbleBorderColorStyle": { +"$ref": "ColorStyle", +"description": "The bubble border color. If bubble_border_color is also set, this field takes precedence." +}, +"bubbleLabels": { +"$ref": "ChartData", +"description": "The data containing the bubble labels. These do not need to be unique." +}, +"bubbleMaxRadiusSize": { +"description": "The max radius size of the bubbles, in pixels. If specified, the field must be a positive value.", +"format": "int32", +"type": "integer" +}, +"bubbleMinRadiusSize": { +"description": "The minimum radius size of the bubbles, in pixels. If specific, the field must be a positive value.", +"format": "int32", +"type": "integer" +}, +"bubbleOpacity": { +"description": "The opacity of the bubbles between 0 and 1.0. 0 is fully transparent and 1 is fully opaque.", +"format": "float", +"type": "number" +}, +"bubbleSizes": { +"$ref": "ChartData", +"description": "The data containing the bubble sizes. Bubble sizes are used to draw the bubbles at different sizes relative to each other. If specified, group_ids must also be specified. This field is optional." +}, +"bubbleTextStyle": { +"$ref": "TextFormat", +"description": "The format of the text inside the bubbles. Strikethrough, underline, and link are not supported." +}, +"domain": { +"$ref": "ChartData", +"description": "The data containing the bubble x-values. These values locate the bubbles in the chart horizontally." +}, +"groupIds": { +"$ref": "ChartData", +"description": "The data containing the bubble group IDs. All bubbles with the same group ID are drawn in the same color. If bubble_sizes is specified then this field must also be specified but may contain blank values. This field is optional." +}, +"legendPosition": { +"description": "Where the legend of the chart should be drawn.", +"enum": [ +"BUBBLE_CHART_LEGEND_POSITION_UNSPECIFIED", +"BOTTOM_LEGEND", +"LEFT_LEGEND", +"RIGHT_LEGEND", +"TOP_LEGEND", +"NO_LEGEND", +"INSIDE_LEGEND" +], +"enumDescriptions": [ +"Default value, do not use.", +"The legend is rendered on the bottom of the chart.", +"The legend is rendered on the left of the chart.", +"The legend is rendered on the right of the chart.", +"The legend is rendered on the top of the chart.", +"No legend is rendered.", +"The legend is rendered inside the chart area." +], +"type": "string" +}, +"series": { +"$ref": "ChartData", +"description": "The data containing the bubble y-values. These values locate the bubbles in the chart vertically." +} +}, +"type": "object" +}, +"CandlestickChartSpec": { +"description": "A candlestick chart.", +"id": "CandlestickChartSpec", +"properties": { +"data": { +"description": "The Candlestick chart data. Only one CandlestickData is supported.", +"items": { +"$ref": "CandlestickData" +}, +"type": "array" +}, +"domain": { +"$ref": "CandlestickDomain", +"description": "The domain data (horizontal axis) for the candlestick chart. String data will be treated as discrete labels, other data will be treated as continuous values." +} +}, +"type": "object" +}, +"CandlestickData": { +"description": "The Candlestick chart data, each containing the low, open, close, and high values for a series.", +"id": "CandlestickData", +"properties": { +"closeSeries": { +"$ref": "CandlestickSeries", +"description": "The range data (vertical axis) for the close/final value for each candle. This is the top of the candle body. If greater than the open value the candle will be filled. Otherwise the candle will be hollow." +}, +"highSeries": { +"$ref": "CandlestickSeries", +"description": "The range data (vertical axis) for the high/maximum value for each candle. This is the top of the candle's center line." +}, +"lowSeries": { +"$ref": "CandlestickSeries", +"description": "The range data (vertical axis) for the low/minimum value for each candle. This is the bottom of the candle's center line." +}, +"openSeries": { +"$ref": "CandlestickSeries", +"description": "The range data (vertical axis) for the open/initial value for each candle. This is the bottom of the candle body. If less than the close value the candle will be filled. Otherwise the candle will be hollow." +} +}, +"type": "object" +}, +"CandlestickDomain": { +"description": "The domain of a CandlestickChart.", +"id": "CandlestickDomain", +"properties": { +"data": { +"$ref": "ChartData", +"description": "The data of the CandlestickDomain." +}, +"reversed": { +"description": "True to reverse the order of the domain values (horizontal axis).", +"type": "boolean" +} +}, +"type": "object" +}, +"CandlestickSeries": { +"description": "The series of a CandlestickData.", +"id": "CandlestickSeries", +"properties": { +"data": { +"$ref": "ChartData", +"description": "The data of the CandlestickSeries." +} +}, +"type": "object" +}, +"CellData": { +"description": "Data about a specific cell.", +"id": "CellData", +"properties": { +"dataSourceFormula": { +"$ref": "DataSourceFormula", +"description": "Output only. Information about a data source formula on the cell. The field is set if user_entered_value is a formula referencing some DATA_SOURCE sheet, e.g. `=SUM(DataSheet!Column)`.", +"readOnly": true +}, +"dataSourceTable": { +"$ref": "DataSourceTable", +"description": "A data source table anchored at this cell. The size of data source table itself is computed dynamically based on its configuration. Only the first cell of the data source table contains the data source table definition. The other cells will contain the display values of the data source table result in their effective_value fields." +}, +"dataValidation": { +"$ref": "DataValidationRule", +"description": "A data validation rule on the cell, if any. When writing, the new data validation rule will overwrite any prior rule." +}, +"effectiveFormat": { +"$ref": "CellFormat", +"description": "The effective format being used by the cell. This includes the results of applying any conditional formatting and, if the cell contains a formula, the computed number format. If the effective format is the default format, effective format will not be written. This field is read-only." +}, +"effectiveValue": { +"$ref": "ExtendedValue", +"description": "The effective value of the cell. For cells with formulas, this is the calculated value. For cells with literals, this is the same as the user_entered_value. This field is read-only." +}, +"formattedValue": { +"description": "The formatted value of the cell. This is the value as it's shown to the user. This field is read-only.", +"type": "string" +}, +"hyperlink": { +"description": "A hyperlink this cell points to, if any. If the cell contains multiple hyperlinks, this field will be empty. This field is read-only. To set it, use a `=HYPERLINK` formula in the userEnteredValue.formulaValue field. A cell-level link can also be set from the userEnteredFormat.textFormat field. Alternatively, set a hyperlink in the textFormatRun.format.link field that spans the entire cell.", +"type": "string" +}, +"note": { +"description": "Any note on the cell.", +"type": "string" +}, +"pivotTable": { +"$ref": "PivotTable", +"description": "A pivot table anchored at this cell. The size of pivot table itself is computed dynamically based on its data, grouping, filters, values, etc. Only the top-left cell of the pivot table contains the pivot table definition. The other cells will contain the calculated values of the results of the pivot in their effective_value fields." +}, +"textFormatRuns": { +"description": "Runs of rich text applied to subsections of the cell. Runs are only valid on user entered strings, not formulas, bools, or numbers. Properties of a run start at a specific index in the text and continue until the next run. Runs will inherit the properties of the cell unless explicitly changed. When writing, the new runs will overwrite any prior runs. When writing a new user_entered_value, previous runs are erased.", +"items": { +"$ref": "TextFormatRun" +}, +"type": "array" +}, +"userEnteredFormat": { +"$ref": "CellFormat", +"description": "The format the user entered for the cell. When writing, the new format will be merged with the existing format." +}, +"userEnteredValue": { +"$ref": "ExtendedValue", +"description": "The value the user entered in the cell. e.g., `1234`, `'Hello'`, or `=NOW()` Note: Dates, Times and DateTimes are represented as doubles in serial number format." +} +}, +"type": "object" +}, +"CellFormat": { +"description": "The format of a cell.", +"id": "CellFormat", +"properties": { +"backgroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color of the cell. Deprecated: Use background_color_style." +}, +"backgroundColorStyle": { +"$ref": "ColorStyle", +"description": "The background color of the cell. If background_color is also set, this field takes precedence." +}, +"borders": { +"$ref": "Borders", +"description": "The borders of the cell." +}, +"horizontalAlignment": { +"description": "The horizontal alignment of the value in the cell.", +"enum": [ +"HORIZONTAL_ALIGN_UNSPECIFIED", +"LEFT", +"CENTER", +"RIGHT" +], +"enumDescriptions": [ +"The horizontal alignment is not specified. Do not use this.", +"The text is explicitly aligned to the left of the cell.", +"The text is explicitly aligned to the center of the cell.", +"The text is explicitly aligned to the right of the cell." +], +"type": "string" +}, +"hyperlinkDisplayType": { +"description": "If one exists, how a hyperlink should be displayed in the cell.", +"enum": [ +"HYPERLINK_DISPLAY_TYPE_UNSPECIFIED", +"LINKED", +"PLAIN_TEXT" +], +"enumDescriptions": [ +"The default value: the hyperlink is rendered. Do not use this.", +"A hyperlink should be explicitly rendered.", +"A hyperlink should not be rendered." +], +"type": "string" +}, +"numberFormat": { +"$ref": "NumberFormat", +"description": "A format describing how number values should be represented to the user." +}, +"padding": { +"$ref": "Padding", +"description": "The padding of the cell." +}, +"textDirection": { +"description": "The direction of the text in the cell.", +"enum": [ +"TEXT_DIRECTION_UNSPECIFIED", +"LEFT_TO_RIGHT", +"RIGHT_TO_LEFT" +], +"enumDescriptions": [ +"The text direction is not specified. Do not use this.", +"The text direction of left-to-right was set by the user.", +"The text direction of right-to-left was set by the user." +], +"type": "string" +}, +"textFormat": { +"$ref": "TextFormat", +"description": "The format of the text in the cell (unless overridden by a format run). Setting a cell-level link here clears the cell's existing links. Setting the link field in a TextFormatRun takes precedence over the cell-level link." +}, +"textRotation": { +"$ref": "TextRotation", +"description": "The rotation applied to text in the cell." +}, +"verticalAlignment": { +"description": "The vertical alignment of the value in the cell.", +"enum": [ +"VERTICAL_ALIGN_UNSPECIFIED", +"TOP", +"MIDDLE", +"BOTTOM" +], +"enumDescriptions": [ +"The vertical alignment is not specified. Do not use this.", +"The text is explicitly aligned to the top of the cell.", +"The text is explicitly aligned to the middle of the cell.", +"The text is explicitly aligned to the bottom of the cell." +], +"type": "string" +}, +"wrapStrategy": { +"description": "The wrap strategy for the value in the cell.", +"enum": [ +"WRAP_STRATEGY_UNSPECIFIED", +"OVERFLOW_CELL", +"LEGACY_WRAP", +"CLIP", +"WRAP" +], +"enumDescriptions": [ +"The default value, do not use.", +"Lines that are longer than the cell width will be written in the next cell over, so long as that cell is empty. If the next cell over is non-empty, this behaves the same as `CLIP`. The text will never wrap to the next line unless the user manually inserts a new line. Example: | First sentence. | | Manual newline that is very long. <- Text continues into next cell | Next newline. |", +"This wrap strategy represents the old Google Sheets wrap strategy where words that are longer than a line are clipped rather than broken. This strategy is not supported on all platforms and is being phased out. Example: | Cell has a | | loooooooooo| <- Word is clipped. | word. |", +"Lines that are longer than the cell width will be clipped. The text will never wrap to the next line unless the user manually inserts a new line. Example: | First sentence. | | Manual newline t| <- Text is clipped | Next newline. |", +"Words that are longer than a line are wrapped at the character level rather than clipped. Example: | Cell has a | | loooooooooo| <- Word is broken. | ong word. |" +], +"type": "string" +} +}, +"type": "object" +}, +"ChartAxisViewWindowOptions": { +"description": "The options that define a \"view window\" for a chart (such as the visible values in an axis).", +"id": "ChartAxisViewWindowOptions", +"properties": { +"viewWindowMax": { +"description": "The maximum numeric value to be shown in this view window. If unset, will automatically determine a maximum value that looks good for the data.", +"format": "double", +"type": "number" +}, +"viewWindowMin": { +"description": "The minimum numeric value to be shown in this view window. If unset, will automatically determine a minimum value that looks good for the data.", +"format": "double", +"type": "number" +}, +"viewWindowMode": { +"description": "The view window's mode.", +"enum": [ +"DEFAULT_VIEW_WINDOW_MODE", +"VIEW_WINDOW_MODE_UNSUPPORTED", +"EXPLICIT", +"PRETTY" +], +"enumDescriptions": [ +"The default view window mode used in the Sheets editor for this chart type. In most cases, if set, the default mode is equivalent to `PRETTY`.", +"Do not use. Represents that the currently set mode is not supported by the API.", +"Follows the min and max exactly if specified. If a value is unspecified, it will fall back to the `PRETTY` value.", +"Chooses a min and max that make the chart look good. Both min and max are ignored in this mode." +], +"type": "string" +} +}, +"type": "object" +}, +"ChartCustomNumberFormatOptions": { +"description": "Custom number formatting options for chart attributes.", +"id": "ChartCustomNumberFormatOptions", +"properties": { +"prefix": { +"description": "Custom prefix to be prepended to the chart attribute. This field is optional.", +"type": "string" +}, +"suffix": { +"description": "Custom suffix to be appended to the chart attribute. This field is optional.", +"type": "string" +} +}, +"type": "object" +}, +"ChartData": { +"description": "The data included in a domain or series.", +"id": "ChartData", +"properties": { +"aggregateType": { +"description": "The aggregation type for the series of a data source chart. Only supported for data source charts.", +"enum": [ +"CHART_AGGREGATE_TYPE_UNSPECIFIED", +"AVERAGE", +"COUNT", +"MAX", +"MEDIAN", +"MIN", +"SUM" +], +"enumDescriptions": [ +"Default value, do not use.", +"Average aggregate function.", +"Count aggregate function.", +"Maximum aggregate function.", +"Median aggregate function.", +"Minimum aggregate function.", +"Sum aggregate function." +], +"type": "string" +}, +"columnReference": { +"$ref": "DataSourceColumnReference", +"description": "The reference to the data source column that the data reads from." +}, +"groupRule": { +"$ref": "ChartGroupRule", +"description": "The rule to group the data by if the ChartData backs the domain of a data source chart. Only supported for data source charts." +}, +"sourceRange": { +"$ref": "ChartSourceRange", +"description": "The source ranges of the data." +} +}, +"type": "object" +}, +"ChartDateTimeRule": { +"description": "Allows you to organize the date-time values in a source data column into buckets based on selected parts of their date or time values.", +"id": "ChartDateTimeRule", +"properties": { +"type": { +"description": "The type of date-time grouping to apply.", +"enum": [ +"CHART_DATE_TIME_RULE_TYPE_UNSPECIFIED", +"SECOND", +"MINUTE", +"HOUR", +"HOUR_MINUTE", +"HOUR_MINUTE_AMPM", +"DAY_OF_WEEK", +"DAY_OF_YEAR", +"DAY_OF_MONTH", +"DAY_MONTH", +"MONTH", +"QUARTER", +"YEAR", +"YEAR_MONTH", +"YEAR_QUARTER", +"YEAR_MONTH_DAY" +], +"enumDescriptions": [ +"The default type, do not use.", +"Group dates by second, from 0 to 59.", +"Group dates by minute, from 0 to 59.", +"Group dates by hour using a 24-hour system, from 0 to 23.", +"Group dates by hour and minute using a 24-hour system, for example 19:45.", +"Group dates by hour and minute using a 12-hour system, for example 7:45 PM. The AM/PM designation is translated based on the spreadsheet locale.", +"Group dates by day of week, for example Sunday. The days of the week will be translated based on the spreadsheet locale.", +"Group dates by day of year, from 1 to 366. Note that dates after Feb. 29 fall in different buckets in leap years than in non-leap years.", +"Group dates by day of month, from 1 to 31.", +"Group dates by day and month, for example 22-Nov. The month is translated based on the spreadsheet locale.", +"Group dates by month, for example Nov. The month is translated based on the spreadsheet locale.", +"Group dates by quarter, for example Q1 (which represents Jan-Mar).", +"Group dates by year, for example 2008.", +"Group dates by year and month, for example 2008-Nov. The month is translated based on the spreadsheet locale.", +"Group dates by year and quarter, for example 2008 Q4.", +"Group dates by year, month, and day, for example 2008-11-22." +], +"type": "string" +} +}, +"type": "object" +}, +"ChartGroupRule": { +"description": "An optional setting on the ChartData of the domain of a data source chart that defines buckets for the values in the domain rather than breaking out each individual value. For example, when plotting a data source chart, you can specify a histogram rule on the domain (it should only contain numeric values), grouping its values into buckets. Any values of a chart series that fall into the same bucket are aggregated based on the aggregate_type.", +"id": "ChartGroupRule", +"properties": { +"dateTimeRule": { +"$ref": "ChartDateTimeRule", +"description": "A ChartDateTimeRule." +}, +"histogramRule": { +"$ref": "ChartHistogramRule", +"description": "A ChartHistogramRule" +} +}, +"type": "object" +}, +"ChartHistogramRule": { +"description": "Allows you to organize numeric values in a source data column into buckets of constant size.", +"id": "ChartHistogramRule", +"properties": { +"intervalSize": { +"description": "The size of the buckets that are created. Must be positive.", +"format": "double", +"type": "number" +}, +"maxValue": { +"description": "The maximum value at which items are placed into buckets. Values greater than the maximum are grouped into a single bucket. If omitted, it is determined by the maximum item value.", +"format": "double", +"type": "number" +}, +"minValue": { +"description": "The minimum value at which items are placed into buckets. Values that are less than the minimum are grouped into a single bucket. If omitted, it is determined by the minimum item value.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ChartSourceRange": { +"description": "Source ranges for a chart.", +"id": "ChartSourceRange", +"properties": { +"sources": { +"description": "The ranges of data for a series or domain. Exactly one dimension must have a length of 1, and all sources in the list must have the same dimension with length 1. The domain (if it exists) & all series must have the same number of source ranges. If using more than one source range, then the source range at a given offset must be in order and contiguous across the domain and series. For example, these are valid configurations: domain sources: A1:A5 series1 sources: B1:B5 series2 sources: D6:D10 domain sources: A1:A5, C10:C12 series1 sources: B1:B5, D10:D12 series2 sources: C1:C5, E10:E12", +"items": { +"$ref": "GridRange" +}, +"type": "array" +} +}, +"type": "object" +}, +"ChartSpec": { +"description": "The specifications of a chart.", +"id": "ChartSpec", +"properties": { +"altText": { +"description": "The alternative text that describes the chart. This is often used for accessibility.", +"type": "string" +}, +"backgroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color of the entire chart. Not applicable to Org charts. Deprecated: Use background_color_style." +}, +"backgroundColorStyle": { +"$ref": "ColorStyle", +"description": "The background color of the entire chart. Not applicable to Org charts. If background_color is also set, this field takes precedence." +}, +"basicChart": { +"$ref": "BasicChartSpec", +"description": "A basic chart specification, can be one of many kinds of charts. See BasicChartType for the list of all charts this supports." +}, +"bubbleChart": { +"$ref": "BubbleChartSpec", +"description": "A bubble chart specification." +}, +"candlestickChart": { +"$ref": "CandlestickChartSpec", +"description": "A candlestick chart specification." +}, +"dataSourceChartProperties": { +"$ref": "DataSourceChartProperties", +"description": "If present, the field contains data source chart specific properties." +}, +"filterSpecs": { +"description": "The filters applied to the source data of the chart. Only supported for data source charts.", +"items": { +"$ref": "FilterSpec" +}, +"type": "array" +}, +"fontName": { +"description": "The name of the font to use by default for all chart text (e.g. title, axis labels, legend). If a font is specified for a specific part of the chart it will override this font name.", +"type": "string" +}, +"hiddenDimensionStrategy": { +"description": "Determines how the charts will use hidden rows or columns.", +"enum": [ +"CHART_HIDDEN_DIMENSION_STRATEGY_UNSPECIFIED", +"SKIP_HIDDEN_ROWS_AND_COLUMNS", +"SKIP_HIDDEN_ROWS", +"SKIP_HIDDEN_COLUMNS", +"SHOW_ALL" +], +"enumDescriptions": [ +"Default value, do not use.", +"Charts will skip hidden rows and columns.", +"Charts will skip hidden rows only.", +"Charts will skip hidden columns only.", +"Charts will not skip any hidden rows or columns." +], +"type": "string" +}, +"histogramChart": { +"$ref": "HistogramChartSpec", +"description": "A histogram chart specification." +}, +"maximized": { +"description": "True to make a chart fill the entire space in which it's rendered with minimum padding. False to use the default padding. (Not applicable to Geo and Org charts.)", +"type": "boolean" +}, +"orgChart": { +"$ref": "OrgChartSpec", +"description": "An org chart specification." +}, +"pieChart": { +"$ref": "PieChartSpec", +"description": "A pie chart specification." +}, +"scorecardChart": { +"$ref": "ScorecardChartSpec", +"description": "A scorecard chart specification." +}, +"sortSpecs": { +"description": "The order to sort the chart data by. Only a single sort spec is supported. Only supported for data source charts.", +"items": { +"$ref": "SortSpec" +}, +"type": "array" +}, +"subtitle": { +"description": "The subtitle of the chart.", +"type": "string" +}, +"subtitleTextFormat": { +"$ref": "TextFormat", +"description": "The subtitle text format. Strikethrough, underline, and link are not supported." +}, +"subtitleTextPosition": { +"$ref": "TextPosition", +"description": "The subtitle text position. This field is optional." +}, +"title": { +"description": "The title of the chart.", +"type": "string" +}, +"titleTextFormat": { +"$ref": "TextFormat", +"description": "The title text format. Strikethrough, underline, and link are not supported." +}, +"titleTextPosition": { +"$ref": "TextPosition", +"description": "The title text position. This field is optional." +}, +"treemapChart": { +"$ref": "TreemapChartSpec", +"description": "A treemap chart specification." +}, +"waterfallChart": { +"$ref": "WaterfallChartSpec", +"description": "A waterfall chart specification." +} +}, +"type": "object" +}, +"ClearBasicFilterRequest": { +"description": "Clears the basic filter, if any exists on the sheet.", +"id": "ClearBasicFilterRequest", +"properties": { +"sheetId": { +"description": "The sheet ID on which the basic filter should be cleared.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ClearValuesRequest": { +"description": "The request for clearing a range of values in a spreadsheet.", +"id": "ClearValuesRequest", +"properties": {}, +"type": "object" +}, +"ClearValuesResponse": { +"description": "The response when clearing a range of values in a spreadsheet.", +"id": "ClearValuesResponse", +"properties": { +"clearedRange": { +"description": "The range (in A1 notation) that was cleared. (If the request was for an unbounded range or a ranger larger than the bounds of the sheet, this will be the actual range that was cleared, bounded to the sheet's limits.)", +"type": "string" +}, +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +} +}, +"type": "object" +}, +"Color": { +"description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value\u2014for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", +"id": "Color", +"properties": { +"alpha": { +"description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", +"format": "float", +"type": "number" +}, +"blue": { +"description": "The amount of blue in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"green": { +"description": "The amount of green in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"red": { +"description": "The amount of red in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"ColorStyle": { +"description": "A color value.", +"id": "ColorStyle", +"properties": { +"rgbColor": { +"$ref": "Color", +"description": "RGB color. The [`alpha`](/sheets/api/reference/rest/v4/spreadsheets/other#Color.FIELDS.alpha) value in the [`Color`](/sheets/api/reference/rest/v4/spreadsheets/other#color) object isn't generally supported." +}, +"themeColor": { +"description": "Theme color.", +"enum": [ +"THEME_COLOR_TYPE_UNSPECIFIED", +"TEXT", +"BACKGROUND", +"ACCENT1", +"ACCENT2", +"ACCENT3", +"ACCENT4", +"ACCENT5", +"ACCENT6", +"LINK" +], +"enumDescriptions": [ +"Unspecified theme color", +"Represents the primary text color", +"Represents the primary background color", +"Represents the first accent color", +"Represents the second accent color", +"Represents the third accent color", +"Represents the fourth accent color", +"Represents the fifth accent color", +"Represents the sixth accent color", +"Represents the color to use for hyperlinks" +], +"type": "string" +} +}, +"type": "object" +}, +"ConditionValue": { +"description": "The value of the condition.", +"id": "ConditionValue", +"properties": { +"relativeDate": { +"description": "A relative date (based on the current date). Valid only if the type is DATE_BEFORE, DATE_AFTER, DATE_ON_OR_BEFORE or DATE_ON_OR_AFTER. Relative dates are not supported in data validation. They are supported only in conditional formatting and conditional filters.", +"enum": [ +"RELATIVE_DATE_UNSPECIFIED", +"PAST_YEAR", +"PAST_MONTH", +"PAST_WEEK", +"YESTERDAY", +"TODAY", +"TOMORROW" +], +"enumDescriptions": [ +"Default value, do not use.", +"The value is one year before today.", +"The value is one month before today.", +"The value is one week before today.", +"The value is yesterday.", +"The value is today.", +"The value is tomorrow." +], +"type": "string" +}, +"userEnteredValue": { +"description": "A value the condition is based on. The value is parsed as if the user typed into a cell. Formulas are supported (and must begin with an `=` or a '+').", +"type": "string" +} +}, +"type": "object" +}, +"ConditionalFormatRule": { +"description": "A rule describing a conditional format.", +"id": "ConditionalFormatRule", +"properties": { +"booleanRule": { +"$ref": "BooleanRule", +"description": "The formatting is either \"on\" or \"off\" according to the rule." +}, +"gradientRule": { +"$ref": "GradientRule", +"description": "The formatting will vary based on the gradients in the rule." +}, +"ranges": { +"description": "The ranges that are formatted if the condition is true. All the ranges must be on the same grid.", +"items": { +"$ref": "GridRange" +}, +"type": "array" +} +}, +"type": "object" +}, +"CopyPasteRequest": { +"description": "Copies data from the source to the destination.", +"id": "CopyPasteRequest", +"properties": { +"destination": { +"$ref": "GridRange", +"description": "The location to paste to. If the range covers a span that's a multiple of the source's height or width, then the data will be repeated to fill in the destination range. If the range is smaller than the source range, the entire source data will still be copied (beyond the end of the destination range)." +}, +"pasteOrientation": { +"description": "How that data should be oriented when pasting.", +"enum": [ +"NORMAL", +"TRANSPOSE" +], +"enumDescriptions": [ +"Paste normally.", +"Paste transposed, where all rows become columns and vice versa." +], +"type": "string" +}, +"pasteType": { +"description": "What kind of data to paste.", +"enum": [ +"PASTE_NORMAL", +"PASTE_VALUES", +"PASTE_FORMAT", +"PASTE_NO_BORDERS", +"PASTE_FORMULA", +"PASTE_DATA_VALIDATION", +"PASTE_CONDITIONAL_FORMATTING" +], +"enumDescriptions": [ +"Paste values, formulas, formats, and merges.", +"Paste the values ONLY without formats, formulas, or merges.", +"Paste the format and data validation only.", +"Like `PASTE_NORMAL` but without borders.", +"Paste the formulas only.", +"Paste the data validation only.", +"Paste the conditional formatting rules only." +], +"type": "string" +}, +"source": { +"$ref": "GridRange", +"description": "The source range to copy." +} +}, +"type": "object" +}, +"CopySheetToAnotherSpreadsheetRequest": { +"description": "The request to copy a sheet across spreadsheets.", +"id": "CopySheetToAnotherSpreadsheetRequest", +"properties": { +"destinationSpreadsheetId": { +"description": "The ID of the spreadsheet to copy the sheet to.", +"type": "string" +} +}, +"type": "object" +}, +"CreateDeveloperMetadataRequest": { +"description": "A request to create developer metadata.", +"id": "CreateDeveloperMetadataRequest", +"properties": { +"developerMetadata": { +"$ref": "DeveloperMetadata", +"description": "The developer metadata to create." +} +}, +"type": "object" +}, +"CreateDeveloperMetadataResponse": { +"description": "The response from creating developer metadata.", +"id": "CreateDeveloperMetadataResponse", +"properties": { +"developerMetadata": { +"$ref": "DeveloperMetadata", +"description": "The developer metadata that was created." +} +}, +"type": "object" +}, +"CutPasteRequest": { +"description": "Moves data from the source to the destination.", +"id": "CutPasteRequest", +"properties": { +"destination": { +"$ref": "GridCoordinate", +"description": "The top-left coordinate where the data should be pasted." +}, +"pasteType": { +"description": "What kind of data to paste. All the source data will be cut, regardless of what is pasted.", +"enum": [ +"PASTE_NORMAL", +"PASTE_VALUES", +"PASTE_FORMAT", +"PASTE_NO_BORDERS", +"PASTE_FORMULA", +"PASTE_DATA_VALIDATION", +"PASTE_CONDITIONAL_FORMATTING" +], +"enumDescriptions": [ +"Paste values, formulas, formats, and merges.", +"Paste the values ONLY without formats, formulas, or merges.", +"Paste the format and data validation only.", +"Like `PASTE_NORMAL` but without borders.", +"Paste the formulas only.", +"Paste the data validation only.", +"Paste the conditional formatting rules only." +], +"type": "string" +}, +"source": { +"$ref": "GridRange", +"description": "The source data to cut." +} +}, +"type": "object" +}, +"DataExecutionStatus": { +"description": "The data execution status. A data execution is created to sync a data source object with the latest data from a DataSource. It is usually scheduled to run at background, you can check its state to tell if an execution completes There are several scenarios where a data execution is triggered to run: * Adding a data source creates an associated data source sheet as well as a data execution to sync the data from the data source to the sheet. * Updating a data source creates a data execution to refresh the associated data source sheet similarly. * You can send refresh request to explicitly refresh one or multiple data source objects.", +"id": "DataExecutionStatus", +"properties": { +"errorCode": { +"description": "The error code.", +"enum": [ +"DATA_EXECUTION_ERROR_CODE_UNSPECIFIED", +"TIMED_OUT", +"TOO_MANY_ROWS", +"TOO_MANY_COLUMNS", +"TOO_MANY_CELLS", +"ENGINE", +"PARAMETER_INVALID", +"UNSUPPORTED_DATA_TYPE", +"DUPLICATE_COLUMN_NAMES", +"INTERRUPTED", +"CONCURRENT_QUERY", +"OTHER", +"TOO_MANY_CHARS_PER_CELL", +"DATA_NOT_FOUND", +"PERMISSION_DENIED", +"MISSING_COLUMN_ALIAS", +"OBJECT_NOT_FOUND", +"OBJECT_IN_ERROR_STATE", +"OBJECT_SPEC_INVALID", +"DATA_EXECUTION_CANCELLED" +], +"enumDescriptions": [ +"Default value, do not use.", +"The data execution timed out.", +"The data execution returns more rows than the limit.", +"The data execution returns more columns than the limit.", +"The data execution returns more cells than the limit.", +"Error is received from the backend data execution engine (e.g. BigQuery). Check error_message for details.", +"One or some of the provided data source parameters are invalid.", +"The data execution returns an unsupported data type.", +"The data execution returns duplicate column names or aliases.", +"The data execution is interrupted. Please refresh later.", +"The data execution is currently in progress, can not be refreshed until it completes.", +"Other errors.", +"The data execution returns values that exceed the maximum characters allowed in a single cell.", +"The database referenced by the data source is not found. */", +"The user does not have access to the database referenced by the data source.", +"The data execution returns columns with missing aliases.", +"The data source object does not exist.", +"The data source object is currently in error state. To force refresh, set force in RefreshDataSourceRequest.", +"The data source object specification is invalid.", +"The data execution has been cancelled." +], +"type": "string" +}, +"errorMessage": { +"description": "The error message, which may be empty.", +"type": "string" +}, +"lastRefreshTime": { +"description": "Gets the time the data last successfully refreshed.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The state of the data execution.", +"enum": [ +"DATA_EXECUTION_STATE_UNSPECIFIED", +"NOT_STARTED", +"RUNNING", +"CANCELLING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value, do not use.", +"The data execution has not started.", +"The data execution has started and is running.", +"The data execution is currently being cancelled.", +"The data execution has completed successfully.", +"The data execution has completed with errors." +], +"type": "string" +} +}, +"type": "object" +}, +"DataFilter": { +"description": "Filter that describes what data should be selected or returned from a request.", +"id": "DataFilter", +"properties": { +"a1Range": { +"description": "Selects data that matches the specified A1 range.", +"type": "string" +}, +"developerMetadataLookup": { +"$ref": "DeveloperMetadataLookup", +"description": "Selects data associated with the developer metadata matching the criteria described by this DeveloperMetadataLookup." +}, +"gridRange": { +"$ref": "GridRange", +"description": "Selects data that matches the range described by the GridRange." +} +}, +"type": "object" +}, +"DataFilterValueRange": { +"description": "A range of values whose location is specified by a DataFilter.", +"id": "DataFilterValueRange", +"properties": { +"dataFilter": { +"$ref": "DataFilter", +"description": "The data filter describing the location of the values in the spreadsheet." +}, +"majorDimension": { +"description": "The major dimension of the values.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +}, +"values": { +"description": "The data to be written. If the provided values exceed any of the ranges matched by the data filter then the request fails. If the provided values are less than the matched ranges only the specified values are written, existing values in the matched ranges remain unaffected.", +"items": { +"items": { +"type": "any" +}, +"type": "array" +}, +"type": "array" +} +}, +"type": "object" +}, +"DataLabel": { +"description": "Settings for one set of data labels. Data labels are annotations that appear next to a set of data, such as the points on a line chart, and provide additional information about what the data represents, such as a text representation of the value behind that point on the graph.", +"id": "DataLabel", +"properties": { +"customLabelData": { +"$ref": "ChartData", +"description": "Data to use for custom labels. Only used if type is set to CUSTOM. This data must be the same length as the series or other element this data label is applied to. In addition, if the series is split into multiple source ranges, this source data must come from the next column in the source data. For example, if the series is B2:B4,E6:E8 then this data must come from C2:C4,F6:F8." +}, +"placement": { +"description": "The placement of the data label relative to the labeled data.", +"enum": [ +"DATA_LABEL_PLACEMENT_UNSPECIFIED", +"CENTER", +"LEFT", +"RIGHT", +"ABOVE", +"BELOW", +"INSIDE_END", +"INSIDE_BASE", +"OUTSIDE_END" +], +"enumDescriptions": [ +"The positioning is determined automatically by the renderer.", +"Center within a bar or column, both horizontally and vertically.", +"To the left of a data point.", +"To the right of a data point.", +"Above a data point.", +"Below a data point.", +"Inside a bar or column at the end (top if positive, bottom if negative).", +"Inside a bar or column at the base.", +"Outside a bar or column at the end." +], +"type": "string" +}, +"textFormat": { +"$ref": "TextFormat", +"description": "The text format used for the data label. The link field is not supported." +}, +"type": { +"description": "The type of the data label.", +"enum": [ +"DATA_LABEL_TYPE_UNSPECIFIED", +"NONE", +"DATA", +"CUSTOM" +], +"enumDescriptions": [ +"The data label type is not specified and will be interpreted depending on the context of the data label within the chart.", +"The data label is not displayed.", +"The data label is displayed using values from the series data.", +"The data label is displayed using values from a custom data source indicated by customLabelData." +], +"type": "string" +} +}, +"type": "object" +}, +"DataSource": { +"description": "Information about an external data source in the spreadsheet.", +"id": "DataSource", +"properties": { +"calculatedColumns": { +"description": "All calculated columns in the data source.", +"items": { +"$ref": "DataSourceColumn" +}, +"type": "array" +}, +"dataSourceId": { +"description": "The spreadsheet-scoped unique ID that identifies the data source. Example: 1080547365.", +"type": "string" +}, +"sheetId": { +"description": "The ID of the Sheet connected with the data source. The field cannot be changed once set. When creating a data source, an associated DATA_SOURCE sheet is also created, if the field is not specified, the ID of the created sheet will be randomly generated.", +"format": "int32", +"type": "integer" +}, +"spec": { +"$ref": "DataSourceSpec", +"description": "The DataSourceSpec for the data source connected with this spreadsheet." +} +}, +"type": "object" +}, +"DataSourceChartProperties": { +"description": "Properties of a data source chart.", +"id": "DataSourceChartProperties", +"properties": { +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "Output only. The data execution status.", +"readOnly": true +}, +"dataSourceId": { +"description": "ID of the data source that the chart is associated with.", +"type": "string" +} +}, +"type": "object" +}, +"DataSourceColumn": { +"description": "A column in a data source.", +"id": "DataSourceColumn", +"properties": { +"formula": { +"description": "The formula of the calculated column.", +"type": "string" +}, +"reference": { +"$ref": "DataSourceColumnReference", +"description": "The column reference." +} +}, +"type": "object" +}, +"DataSourceColumnReference": { +"description": "An unique identifier that references a data source column.", +"id": "DataSourceColumnReference", +"properties": { +"name": { +"description": "The display name of the column. It should be unique within a data source.", +"type": "string" +} +}, +"type": "object" +}, +"DataSourceFormula": { +"description": "A data source formula.", +"id": "DataSourceFormula", +"properties": { +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "Output only. The data execution status.", +"readOnly": true +}, +"dataSourceId": { +"description": "The ID of the data source the formula is associated with.", +"type": "string" +} +}, +"type": "object" +}, +"DataSourceObjectReference": { +"description": "Reference to a data source object.", +"id": "DataSourceObjectReference", +"properties": { +"chartId": { +"description": "References to a data source chart.", +"format": "int32", +"type": "integer" +}, +"dataSourceFormulaCell": { +"$ref": "GridCoordinate", +"description": "References to a cell containing DataSourceFormula." +}, +"dataSourcePivotTableAnchorCell": { +"$ref": "GridCoordinate", +"description": "References to a data source PivotTable anchored at the cell." +}, +"dataSourceTableAnchorCell": { +"$ref": "GridCoordinate", +"description": "References to a DataSourceTable anchored at the cell." +}, +"sheetId": { +"description": "References to a DATA_SOURCE sheet.", +"type": "string" +} +}, +"type": "object" +}, +"DataSourceObjectReferences": { +"description": "A list of references to data source objects.", +"id": "DataSourceObjectReferences", +"properties": { +"references": { +"description": "The references.", +"items": { +"$ref": "DataSourceObjectReference" +}, +"type": "array" +} +}, +"type": "object" +}, +"DataSourceParameter": { +"description": "A parameter in a data source's query. The parameter allows the user to pass in values from the spreadsheet into a query.", +"id": "DataSourceParameter", +"properties": { +"name": { +"description": "Named parameter. Must be a legitimate identifier for the DataSource that supports it. For example, [BigQuery identifier](https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical#identifiers).", +"type": "string" +}, +"namedRangeId": { +"description": "ID of a NamedRange. Its size must be 1x1.", +"type": "string" +}, +"range": { +"$ref": "GridRange", +"description": "A range that contains the value of the parameter. Its size must be 1x1." +} +}, +"type": "object" +}, +"DataSourceRefreshDailySchedule": { +"description": "A schedule for data to refresh every day in a given time interval.", +"id": "DataSourceRefreshDailySchedule", +"properties": { +"startTime": { +"$ref": "TimeOfDay", +"description": "The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor." +} +}, +"type": "object" +}, +"DataSourceRefreshMonthlySchedule": { +"description": "A monthly schedule for data to refresh on specific days in the month in a given time interval.", +"id": "DataSourceRefreshMonthlySchedule", +"properties": { +"daysOfMonth": { +"description": "Days of the month to refresh. Only 1-28 are supported, mapping to the 1st to the 28th day. At least one day must be specified.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"startTime": { +"$ref": "TimeOfDay", +"description": "The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor." +} +}, +"type": "object" +}, +"DataSourceRefreshSchedule": { +"description": "Schedule for refreshing the data source. Data sources in the spreadsheet are refreshed within a time interval. You can specify the start time by clicking the Scheduled Refresh button in the Sheets editor, but the interval is fixed at 4 hours. For example, if you specify a start time of 8 AM , the refresh will take place between 8 AM and 12 PM every day.", +"id": "DataSourceRefreshSchedule", +"properties": { +"dailySchedule": { +"$ref": "DataSourceRefreshDailySchedule", +"description": "Daily refresh schedule." +}, +"enabled": { +"description": "True if the refresh schedule is enabled, or false otherwise.", +"type": "boolean" +}, +"monthlySchedule": { +"$ref": "DataSourceRefreshMonthlySchedule", +"description": "Monthly refresh schedule." +}, +"nextRun": { +"$ref": "Interval", +"description": "Output only. The time interval of the next run.", +"readOnly": true +}, +"refreshScope": { +"description": "The scope of the refresh. Must be ALL_DATA_SOURCES.", +"enum": [ +"DATA_SOURCE_REFRESH_SCOPE_UNSPECIFIED", +"ALL_DATA_SOURCES" +], +"enumDescriptions": [ +"Default value, do not use.", +"Refreshes all data sources and their associated data source objects in the spreadsheet." +], +"type": "string" +}, +"weeklySchedule": { +"$ref": "DataSourceRefreshWeeklySchedule", +"description": "Weekly refresh schedule." +} +}, +"type": "object" +}, +"DataSourceRefreshWeeklySchedule": { +"description": "A weekly schedule for data to refresh on specific days in a given time interval.", +"id": "DataSourceRefreshWeeklySchedule", +"properties": { +"daysOfWeek": { +"description": "Days of the week to refresh. At least one day must be specified.", +"items": { +"enum": [ +"DAY_OF_WEEK_UNSPECIFIED", +"MONDAY", +"TUESDAY", +"WEDNESDAY", +"THURSDAY", +"FRIDAY", +"SATURDAY", +"SUNDAY" +], +"enumDescriptions": [ +"The day of the week is unspecified.", +"Monday", +"Tuesday", +"Wednesday", +"Thursday", +"Friday", +"Saturday", +"Sunday" +], +"type": "string" +}, +"type": "array" +}, +"startTime": { +"$ref": "TimeOfDay", +"description": "The start time of a time interval in which a data source refresh is scheduled. Only `hours` part is used. The time interval size defaults to that in the Sheets editor." +} +}, +"type": "object" +}, +"DataSourceSheetDimensionRange": { +"description": "A range along a single dimension on a DATA_SOURCE sheet.", +"id": "DataSourceSheetDimensionRange", +"properties": { +"columnReferences": { +"description": "The columns on the data source sheet.", +"items": { +"$ref": "DataSourceColumnReference" +}, +"type": "array" +}, +"sheetId": { +"description": "The ID of the data source sheet the range is on.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DataSourceSheetProperties": { +"description": "Additional properties of a DATA_SOURCE sheet.", +"id": "DataSourceSheetProperties", +"properties": { +"columns": { +"description": "The columns displayed on the sheet, corresponding to the values in RowData.", +"items": { +"$ref": "DataSourceColumn" +}, +"type": "array" +}, +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "The data execution status." +}, +"dataSourceId": { +"description": "ID of the DataSource the sheet is connected to.", +"type": "string" +} +}, +"type": "object" +}, +"DataSourceSpec": { +"description": "This specifies the details of the data source. For example, for BigQuery, this specifies information about the BigQuery source.", +"id": "DataSourceSpec", +"properties": { +"bigQuery": { +"$ref": "BigQueryDataSourceSpec", +"description": "A BigQueryDataSourceSpec." +}, +"parameters": { +"description": "The parameters of the data source, used when querying the data source.", +"items": { +"$ref": "DataSourceParameter" +}, +"type": "array" +} +}, +"type": "object" +}, +"DataSourceTable": { +"description": "A data source table, which allows the user to import a static table of data from the DataSource into Sheets. This is also known as \"Extract\" in the Sheets editor.", +"id": "DataSourceTable", +"properties": { +"columnSelectionType": { +"description": "The type to select columns for the data source table. Defaults to SELECTED.", +"enum": [ +"DATA_SOURCE_TABLE_COLUMN_SELECTION_TYPE_UNSPECIFIED", +"SELECTED", +"SYNC_ALL" +], +"enumDescriptions": [ +"The default column selection type, do not use.", +"Select columns specified by columns field.", +"Sync all current and future columns in the data source. If set, the data source table fetches all the columns in the data source at the time of refresh." +], +"type": "string" +}, +"columns": { +"description": "Columns selected for the data source table. The column_selection_type must be SELECTED.", +"items": { +"$ref": "DataSourceColumnReference" +}, +"type": "array" +}, +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "Output only. The data execution status.", +"readOnly": true +}, +"dataSourceId": { +"description": "The ID of the data source the data source table is associated with.", +"type": "string" +}, +"filterSpecs": { +"description": "Filter specifications in the data source table.", +"items": { +"$ref": "FilterSpec" +}, +"type": "array" +}, +"rowLimit": { +"description": "The limit of rows to return. If not set, a default limit is applied. Please refer to the Sheets editor for the default and max limit.", +"format": "int32", +"type": "integer" +}, +"sortSpecs": { +"description": "Sort specifications in the data source table. The result of the data source table is sorted based on the sort specifications in order.", +"items": { +"$ref": "SortSpec" +}, +"type": "array" +} +}, +"type": "object" +}, +"DataValidationRule": { +"description": "A data validation rule.", +"id": "DataValidationRule", +"properties": { +"condition": { +"$ref": "BooleanCondition", +"description": "The condition that data in the cell must match." +}, +"inputMessage": { +"description": "A message to show the user when adding data to the cell.", +"type": "string" +}, +"showCustomUi": { +"description": "True if the UI should be customized based on the kind of condition. If true, \"List\" conditions will show a dropdown.", +"type": "boolean" +}, +"strict": { +"description": "True if invalid data should be rejected.", +"type": "boolean" +} +}, +"type": "object" +}, +"DateTimeRule": { +"description": "Allows you to organize the date-time values in a source data column into buckets based on selected parts of their date or time values. For example, consider a pivot table showing sales transactions by date: +----------+--------------+ | Date | SUM of Sales | +----------+--------------+ | 1/1/2017 | $621.14 | | 2/3/2017 | $708.84 | | 5/8/2017 | $326.84 | ... +----------+--------------+ Applying a date-time group rule with a DateTimeRuleType of YEAR_MONTH results in the following pivot table. +--------------+--------------+ | Grouped Date | SUM of Sales | +--------------+--------------+ | 2017-Jan | $53,731.78 | | 2017-Feb | $83,475.32 | | 2017-Mar | $94,385.05 | ... +--------------+--------------+", +"id": "DateTimeRule", +"properties": { +"type": { +"description": "The type of date-time grouping to apply.", +"enum": [ +"DATE_TIME_RULE_TYPE_UNSPECIFIED", +"SECOND", +"MINUTE", +"HOUR", +"HOUR_MINUTE", +"HOUR_MINUTE_AMPM", +"DAY_OF_WEEK", +"DAY_OF_YEAR", +"DAY_OF_MONTH", +"DAY_MONTH", +"MONTH", +"QUARTER", +"YEAR", +"YEAR_MONTH", +"YEAR_QUARTER", +"YEAR_MONTH_DAY" +], +"enumDescriptions": [ +"The default type, do not use.", +"Group dates by second, from 0 to 59.", +"Group dates by minute, from 0 to 59.", +"Group dates by hour using a 24-hour system, from 0 to 23.", +"Group dates by hour and minute using a 24-hour system, for example 19:45.", +"Group dates by hour and minute using a 12-hour system, for example 7:45 PM. The AM/PM designation is translated based on the spreadsheet locale.", +"Group dates by day of week, for example Sunday. The days of the week will be translated based on the spreadsheet locale.", +"Group dates by day of year, from 1 to 366. Note that dates after Feb. 29 fall in different buckets in leap years than in non-leap years.", +"Group dates by day of month, from 1 to 31.", +"Group dates by day and month, for example 22-Nov. The month is translated based on the spreadsheet locale.", +"Group dates by month, for example Nov. The month is translated based on the spreadsheet locale.", +"Group dates by quarter, for example Q1 (which represents Jan-Mar).", +"Group dates by year, for example 2008.", +"Group dates by year and month, for example 2008-Nov. The month is translated based on the spreadsheet locale.", +"Group dates by year and quarter, for example 2008 Q4.", +"Group dates by year, month, and day, for example 2008-11-22." +], +"type": "string" +} +}, +"type": "object" +}, +"DeleteBandingRequest": { +"description": "Removes the banded range with the given ID from the spreadsheet.", +"id": "DeleteBandingRequest", +"properties": { +"bandedRangeId": { +"description": "The ID of the banded range to delete.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeleteConditionalFormatRuleRequest": { +"description": "Deletes a conditional format rule at the given index. All subsequent rules' indexes are decremented.", +"id": "DeleteConditionalFormatRuleRequest", +"properties": { +"index": { +"description": "The zero-based index of the rule to be deleted.", +"format": "int32", +"type": "integer" +}, +"sheetId": { +"description": "The sheet the rule is being deleted from.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeleteConditionalFormatRuleResponse": { +"description": "The result of deleting a conditional format rule.", +"id": "DeleteConditionalFormatRuleResponse", +"properties": { +"rule": { +"$ref": "ConditionalFormatRule", +"description": "The rule that was deleted." +} +}, +"type": "object" +}, +"DeleteDataSourceRequest": { +"description": "Deletes a data source. The request also deletes the associated data source sheet, and unlinks all associated data source objects.", +"id": "DeleteDataSourceRequest", +"properties": { +"dataSourceId": { +"description": "The ID of the data source to delete.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteDeveloperMetadataRequest": { +"description": "A request to delete developer metadata.", +"id": "DeleteDeveloperMetadataRequest", +"properties": { +"dataFilter": { +"$ref": "DataFilter", +"description": "The data filter describing the criteria used to select which developer metadata entry to delete." +} +}, +"type": "object" +}, +"DeleteDeveloperMetadataResponse": { +"description": "The response from deleting developer metadata.", +"id": "DeleteDeveloperMetadataResponse", +"properties": { +"deletedDeveloperMetadata": { +"description": "The metadata that was deleted.", +"items": { +"$ref": "DeveloperMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"DeleteDimensionGroupRequest": { +"description": "Deletes a group over the specified range by decrementing the depth of the dimensions in the range. For example, assume the sheet has a depth-1 group over B:E and a depth-2 group over C:D. Deleting a group over D:E leaves the sheet with a depth-1 group over B:D and a depth-2 group over C:C.", +"id": "DeleteDimensionGroupRequest", +"properties": { +"range": { +"$ref": "DimensionRange", +"description": "The range of the group to be deleted." +} +}, +"type": "object" +}, +"DeleteDimensionGroupResponse": { +"description": "The result of deleting a group.", +"id": "DeleteDimensionGroupResponse", +"properties": { +"dimensionGroups": { +"description": "All groups of a dimension after deleting a group from that dimension.", +"items": { +"$ref": "DimensionGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"DeleteDimensionRequest": { +"description": "Deletes the dimensions from the sheet.", +"id": "DeleteDimensionRequest", +"properties": { +"range": { +"$ref": "DimensionRange", +"description": "The dimensions to delete from the sheet." +} +}, +"type": "object" +}, +"DeleteDuplicatesRequest": { +"description": "Removes rows within this range that contain values in the specified columns that are duplicates of values in any previous row. Rows with identical values but different letter cases, formatting, or formulas are considered to be duplicates. This request also removes duplicate rows hidden from view (for example, due to a filter). When removing duplicates, the first instance of each duplicate row scanning from the top downwards is kept in the resulting range. Content outside of the specified range isn't removed, and rows considered duplicates do not have to be adjacent to each other in the range.", +"id": "DeleteDuplicatesRequest", +"properties": { +"comparisonColumns": { +"description": "The columns in the range to analyze for duplicate values. If no columns are selected then all columns are analyzed for duplicates.", +"items": { +"$ref": "DimensionRange" +}, +"type": "array" +}, +"range": { +"$ref": "GridRange", +"description": "The range to remove duplicates rows from." +} +}, +"type": "object" +}, +"DeleteDuplicatesResponse": { +"description": "The result of removing duplicates in a range.", +"id": "DeleteDuplicatesResponse", +"properties": { +"duplicatesRemovedCount": { +"description": "The number of duplicate rows removed.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeleteEmbeddedObjectRequest": { +"description": "Deletes the embedded object with the given ID.", +"id": "DeleteEmbeddedObjectRequest", +"properties": { +"objectId": { +"description": "The ID of the embedded object to delete.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeleteFilterViewRequest": { +"description": "Deletes a particular filter view.", +"id": "DeleteFilterViewRequest", +"properties": { +"filterId": { +"description": "The ID of the filter to delete.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeleteNamedRangeRequest": { +"description": "Removes the named range with the given ID from the spreadsheet.", +"id": "DeleteNamedRangeRequest", +"properties": { +"namedRangeId": { +"description": "The ID of the named range to delete.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteProtectedRangeRequest": { +"description": "Deletes the protected range with the given ID.", +"id": "DeleteProtectedRangeRequest", +"properties": { +"protectedRangeId": { +"description": "The ID of the protected range to delete.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeleteRangeRequest": { +"description": "Deletes a range of cells, shifting other cells into the deleted area.", +"id": "DeleteRangeRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range of cells to delete." +}, +"shiftDimension": { +"description": "The dimension from which deleted cells will be replaced with. If ROWS, existing cells will be shifted upward to replace the deleted cells. If COLUMNS, existing cells will be shifted left to replace the deleted cells.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +} +}, +"type": "object" +}, +"DeleteSheetRequest": { +"description": "Deletes the requested sheet.", +"id": "DeleteSheetRequest", +"properties": { +"sheetId": { +"description": "The ID of the sheet to delete. If the sheet is of DATA_SOURCE type, the associated DataSource is also deleted.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeveloperMetadata": { +"description": "Developer metadata associated with a location or object in a spreadsheet. Developer metadata may be used to associate arbitrary data with various parts of a spreadsheet and will remain associated at those locations as they move around and the spreadsheet is edited. For example, if developer metadata is associated with row 5 and another row is then subsequently inserted above row 5, that original metadata will still be associated with the row it was first associated with (what is now row 6). If the associated object is deleted its metadata is deleted too.", +"id": "DeveloperMetadata", +"properties": { +"location": { +"$ref": "DeveloperMetadataLocation", +"description": "The location where the metadata is associated." +}, +"metadataId": { +"description": "The spreadsheet-scoped unique ID that identifies the metadata. IDs may be specified when metadata is created, otherwise one will be randomly generated and assigned. Must be positive.", +"format": "int32", +"type": "integer" +}, +"metadataKey": { +"description": "The metadata key. There may be multiple metadata in a spreadsheet with the same key. Developer metadata must always have a key specified.", +"type": "string" +}, +"metadataValue": { +"description": "Data associated with the metadata's key.", +"type": "string" +}, +"visibility": { +"description": "The metadata visibility. Developer metadata must always have a visibility specified.", +"enum": [ +"DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED", +"DOCUMENT", +"PROJECT" +], +"enumDescriptions": [ +"Default value.", +"Document-visible metadata is accessible from any developer project with access to the document.", +"Project-visible metadata is only visible to and accessible by the developer project that created the metadata." +], +"type": "string" +} +}, +"type": "object" +}, +"DeveloperMetadataLocation": { +"description": "A location where metadata may be associated in a spreadsheet.", +"id": "DeveloperMetadataLocation", +"properties": { +"dimensionRange": { +"$ref": "DimensionRange", +"description": "Represents the row or column when metadata is associated with a dimension. The specified DimensionRange must represent a single row or column; it cannot be unbounded or span multiple rows or columns." +}, +"locationType": { +"description": "The type of location this object represents. This field is read-only.", +"enum": [ +"DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED", +"ROW", +"COLUMN", +"SHEET", +"SPREADSHEET" +], +"enumDescriptions": [ +"Default value.", +"Developer metadata associated on an entire row dimension.", +"Developer metadata associated on an entire column dimension.", +"Developer metadata associated on an entire sheet.", +"Developer metadata associated on the entire spreadsheet." +], +"type": "string" +}, +"sheetId": { +"description": "The ID of the sheet when metadata is associated with an entire sheet.", +"format": "int32", +"type": "integer" +}, +"spreadsheet": { +"description": "True when metadata is associated with an entire spreadsheet.", +"type": "boolean" +} +}, +"type": "object" +}, +"DeveloperMetadataLookup": { +"description": "Selects DeveloperMetadata that matches all of the specified fields. For example, if only a metadata ID is specified this considers the DeveloperMetadata with that particular unique ID. If a metadata key is specified, this considers all developer metadata with that key. If a key, visibility, and location type are all specified, this considers all developer metadata with that key and visibility that are associated with a location of that type. In general, this selects all DeveloperMetadata that matches the intersection of all the specified fields; any field or combination of fields may be specified.", +"id": "DeveloperMetadataLookup", +"properties": { +"locationMatchingStrategy": { +"description": "Determines how this lookup matches the location. If this field is specified as EXACT, only developer metadata associated on the exact location specified is matched. If this field is specified to INTERSECTING, developer metadata associated on intersecting locations is also matched. If left unspecified, this field assumes a default value of INTERSECTING. If this field is specified, a metadataLocation must also be specified.", +"enum": [ +"DEVELOPER_METADATA_LOCATION_MATCHING_STRATEGY_UNSPECIFIED", +"EXACT_LOCATION", +"INTERSECTING_LOCATION" +], +"enumDescriptions": [ +"Default value. This value must not be used.", +"Indicates that a specified location should be matched exactly. For example, if row three were specified as a location this matching strategy would only match developer metadata also associated on row three. Metadata associated on other locations would not be considered.", +"Indicates that a specified location should match that exact location as well as any intersecting locations. For example, if row three were specified as a location this matching strategy would match developer metadata associated on row three as well as metadata associated on locations that intersect row three. If, for instance, there was developer metadata associated on column B, this matching strategy would also match that location because column B intersects row three." +], +"type": "string" +}, +"locationType": { +"description": "Limits the selected developer metadata to those entries which are associated with locations of the specified type. For example, when this field is specified as ROW this lookup only considers developer metadata associated on rows. If the field is left unspecified, all location types are considered. This field cannot be specified as SPREADSHEET when the locationMatchingStrategy is specified as INTERSECTING or when the metadataLocation is specified as a non-spreadsheet location: spreadsheet metadata cannot intersect any other developer metadata location. This field also must be left unspecified when the locationMatchingStrategy is specified as EXACT.", +"enum": [ +"DEVELOPER_METADATA_LOCATION_TYPE_UNSPECIFIED", +"ROW", +"COLUMN", +"SHEET", +"SPREADSHEET" +], +"enumDescriptions": [ +"Default value.", +"Developer metadata associated on an entire row dimension.", +"Developer metadata associated on an entire column dimension.", +"Developer metadata associated on an entire sheet.", +"Developer metadata associated on the entire spreadsheet." +], +"type": "string" +}, +"metadataId": { +"description": "Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_id.", +"format": "int32", +"type": "integer" +}, +"metadataKey": { +"description": "Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_key.", +"type": "string" +}, +"metadataLocation": { +"$ref": "DeveloperMetadataLocation", +"description": "Limits the selected developer metadata to those entries associated with the specified location. This field either matches exact locations or all intersecting locations according the specified locationMatchingStrategy." +}, +"metadataValue": { +"description": "Limits the selected developer metadata to that which has a matching DeveloperMetadata.metadata_value.", +"type": "string" +}, +"visibility": { +"description": "Limits the selected developer metadata to that which has a matching DeveloperMetadata.visibility. If left unspecified, all developer metadata visibile to the requesting project is considered.", +"enum": [ +"DEVELOPER_METADATA_VISIBILITY_UNSPECIFIED", +"DOCUMENT", +"PROJECT" +], +"enumDescriptions": [ +"Default value.", +"Document-visible metadata is accessible from any developer project with access to the document.", +"Project-visible metadata is only visible to and accessible by the developer project that created the metadata." +], +"type": "string" +} +}, +"type": "object" +}, +"DimensionGroup": { +"description": "A group over an interval of rows or columns on a sheet, which can contain or be contained within other groups. A group can be collapsed or expanded as a unit on the sheet.", +"id": "DimensionGroup", +"properties": { +"collapsed": { +"description": "This field is true if this group is collapsed. A collapsed group remains collapsed if an overlapping group at a shallower depth is expanded. A true value does not imply that all dimensions within the group are hidden, since a dimension's visibility can change independently from this group property. However, when this property is updated, all dimensions within it are set to hidden if this field is true, or set to visible if this field is false.", +"type": "boolean" +}, +"depth": { +"description": "The depth of the group, representing how many groups have a range that wholly contains the range of this group.", +"format": "int32", +"type": "integer" +}, +"range": { +"$ref": "DimensionRange", +"description": "The range over which this group exists." +} +}, +"type": "object" +}, +"DimensionProperties": { +"description": "Properties about a dimension.", +"id": "DimensionProperties", +"properties": { +"dataSourceColumnReference": { +"$ref": "DataSourceColumnReference", +"description": "Output only. If set, this is a column in a data source sheet.", +"readOnly": true +}, +"developerMetadata": { +"description": "The developer metadata associated with a single row or column.", +"items": { +"$ref": "DeveloperMetadata" +}, +"type": "array" +}, +"hiddenByFilter": { +"description": "True if this dimension is being filtered. This field is read-only.", +"type": "boolean" +}, +"hiddenByUser": { +"description": "True if this dimension is explicitly hidden.", +"type": "boolean" +}, +"pixelSize": { +"description": "The height (if a row) or width (if a column) of the dimension in pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DimensionRange": { +"description": "A range along a single dimension on a sheet. All indexes are zero-based. Indexes are half open: the start index is inclusive and the end index is exclusive. Missing indexes indicate the range is unbounded on that side.", +"id": "DimensionRange", +"properties": { +"dimension": { +"description": "The dimension of the span.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +}, +"endIndex": { +"description": "The end (exclusive) of the span, or not set if unbounded.", +"format": "int32", +"type": "integer" +}, +"sheetId": { +"description": "The sheet this span is on.", +"format": "int32", +"type": "integer" +}, +"startIndex": { +"description": "The start (inclusive) of the span, or not set if unbounded.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DuplicateFilterViewRequest": { +"description": "Duplicates a particular filter view.", +"id": "DuplicateFilterViewRequest", +"properties": { +"filterId": { +"description": "The ID of the filter being duplicated.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DuplicateFilterViewResponse": { +"description": "The result of a filter view being duplicated.", +"id": "DuplicateFilterViewResponse", +"properties": { +"filter": { +"$ref": "FilterView", +"description": "The newly created filter." +} +}, +"type": "object" +}, +"DuplicateSheetRequest": { +"description": "Duplicates the contents of a sheet.", +"id": "DuplicateSheetRequest", +"properties": { +"insertSheetIndex": { +"description": "The zero-based index where the new sheet should be inserted. The index of all sheets after this are incremented.", +"format": "int32", +"type": "integer" +}, +"newSheetId": { +"description": "If set, the ID of the new sheet. If not set, an ID is chosen. If set, the ID must not conflict with any existing sheet ID. If set, it must be non-negative.", +"format": "int32", +"type": "integer" +}, +"newSheetName": { +"description": "The name of the new sheet. If empty, a new name is chosen for you.", +"type": "string" +}, +"sourceSheetId": { +"description": "The sheet to duplicate. If the source sheet is of DATA_SOURCE type, its backing DataSource is also duplicated and associated with the new copy of the sheet. No data execution is triggered, the grid data of this sheet is also copied over but only available after the batch request completes.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DuplicateSheetResponse": { +"description": "The result of duplicating a sheet.", +"id": "DuplicateSheetResponse", +"properties": { +"properties": { +"$ref": "SheetProperties", +"description": "The properties of the duplicate sheet." +} +}, +"type": "object" +}, +"Editors": { +"description": "The editors of a protected range.", +"id": "Editors", +"properties": { +"domainUsersCanEdit": { +"description": "True if anyone in the document's domain has edit access to the protected range. Domain protection is only supported on documents within a domain.", +"type": "boolean" +}, +"groups": { +"description": "The email addresses of groups with edit access to the protected range.", +"items": { +"type": "string" +}, +"type": "array" +}, +"users": { +"description": "The email addresses of users with edit access to the protected range.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"EmbeddedChart": { +"description": "A chart embedded in a sheet.", +"id": "EmbeddedChart", +"properties": { +"border": { +"$ref": "EmbeddedObjectBorder", +"description": "The border of the chart." +}, +"chartId": { +"description": "The ID of the chart.", +"format": "int32", +"type": "integer" +}, +"position": { +"$ref": "EmbeddedObjectPosition", +"description": "The position of the chart." +}, +"spec": { +"$ref": "ChartSpec", +"description": "The specification of the chart." +} +}, +"type": "object" +}, +"EmbeddedObjectBorder": { +"description": "A border along an embedded object.", +"id": "EmbeddedObjectBorder", +"properties": { +"color": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the border. Deprecated: Use color_style." +}, +"colorStyle": { +"$ref": "ColorStyle", +"description": "The color of the border. If color is also set, this field takes precedence." +} +}, +"type": "object" +}, +"EmbeddedObjectPosition": { +"description": "The position of an embedded object such as a chart.", +"id": "EmbeddedObjectPosition", +"properties": { +"newSheet": { +"description": "If true, the embedded object is put on a new sheet whose ID is chosen for you. Used only when writing.", +"type": "boolean" +}, +"overlayPosition": { +"$ref": "OverlayPosition", +"description": "The position at which the object is overlaid on top of a grid." +}, +"sheetId": { +"description": "The sheet this is on. Set only if the embedded object is on its own sheet. Must be non-negative.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ErrorValue": { +"description": "An error in a cell.", +"id": "ErrorValue", +"properties": { +"message": { +"description": "A message with more information about the error (in the spreadsheet's locale).", +"type": "string" +}, +"type": { +"description": "The type of error.", +"enum": [ +"ERROR_TYPE_UNSPECIFIED", +"ERROR", +"NULL_VALUE", +"DIVIDE_BY_ZERO", +"VALUE", +"REF", +"NAME", +"NUM", +"N_A", +"LOADING" +], +"enumDescriptions": [ +"The default error type, do not use this.", +"Corresponds to the `#ERROR!` error.", +"Corresponds to the `#NULL!` error.", +"Corresponds to the `#DIV/0` error.", +"Corresponds to the `#VALUE!` error.", +"Corresponds to the `#REF!` error.", +"Corresponds to the `#NAME?` error.", +"Corresponds to the `#NUM!` error.", +"Corresponds to the `#N/A` error.", +"Corresponds to the `Loading...` state." +], +"type": "string" +} +}, +"type": "object" +}, +"ExtendedValue": { +"description": "The kinds of value that a cell in a spreadsheet can have.", +"id": "ExtendedValue", +"properties": { +"boolValue": { +"description": "Represents a boolean value.", +"type": "boolean" +}, +"errorValue": { +"$ref": "ErrorValue", +"description": "Represents an error. This field is read-only." +}, +"formulaValue": { +"description": "Represents a formula.", +"type": "string" +}, +"numberValue": { +"description": "Represents a double value. Note: Dates, Times and DateTimes are represented as doubles in SERIAL_NUMBER format.", +"format": "double", +"type": "number" +}, +"stringValue": { +"description": "Represents a string value. Leading single quotes are not included. For example, if the user typed `'123` into the UI, this would be represented as a `stringValue` of `\"123\"`.", +"type": "string" +} +}, +"type": "object" +}, +"FilterCriteria": { +"description": "Criteria for showing/hiding rows in a filter or filter view.", +"id": "FilterCriteria", +"properties": { +"condition": { +"$ref": "BooleanCondition", +"description": "A condition that must be true for values to be shown. (This does not override hidden_values -- if a value is listed there, it will still be hidden.)" +}, +"hiddenValues": { +"description": "Values that should be hidden.", +"items": { +"type": "string" +}, +"type": "array" +}, +"visibleBackgroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background fill color to filter by; only cells with this fill color are shown. Mutually exclusive with visible_foreground_color. Deprecated: Use visible_background_color_style." +}, +"visibleBackgroundColorStyle": { +"$ref": "ColorStyle", +"description": "The background fill color to filter by; only cells with this fill color are shown. This field is mutually exclusive with visible_foreground_color, and must be set to an RGB-type color. If visible_background_color is also set, this field takes precedence." +}, +"visibleForegroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The foreground color to filter by; only cells with this foreground color are shown. Mutually exclusive with visible_background_color. Deprecated: Use visible_foreground_color_style." +}, +"visibleForegroundColorStyle": { +"$ref": "ColorStyle", +"description": "The foreground color to filter by; only cells with this foreground color are shown. This field is mutually exclusive with visible_background_color, and must be set to an RGB-type color. If visible_foreground_color is also set, this field takes precedence." +} +}, +"type": "object" +}, +"FilterSpec": { +"description": "The filter criteria associated with a specific column.", +"id": "FilterSpec", +"properties": { +"columnIndex": { +"description": "The zero-based column index.", +"format": "int32", +"type": "integer" +}, +"dataSourceColumnReference": { +"$ref": "DataSourceColumnReference", +"description": "Reference to a data source column." +}, +"filterCriteria": { +"$ref": "FilterCriteria", +"description": "The criteria for the column." +} +}, +"type": "object" +}, +"FilterView": { +"description": "A filter view.", +"id": "FilterView", +"properties": { +"criteria": { +"additionalProperties": { +"$ref": "FilterCriteria" +}, +"deprecated": true, +"description": "The criteria for showing/hiding values per column. The map's key is the column index, and the value is the criteria for that column. This field is deprecated in favor of filter_specs.", +"type": "object" +}, +"filterSpecs": { +"description": "The filter criteria for showing/hiding values per column. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence.", +"items": { +"$ref": "FilterSpec" +}, +"type": "array" +}, +"filterViewId": { +"description": "The ID of the filter view.", +"format": "int32", +"type": "integer" +}, +"namedRangeId": { +"description": "The named range this filter view is backed by, if any. When writing, only one of range or named_range_id may be set.", +"type": "string" +}, +"range": { +"$ref": "GridRange", +"description": "The range this filter view covers. When writing, only one of range or named_range_id may be set." +}, +"sortSpecs": { +"description": "The sort order per column. Later specifications are used when values are equal in the earlier specifications.", +"items": { +"$ref": "SortSpec" +}, +"type": "array" +}, +"title": { +"description": "The name of the filter view.", +"type": "string" +} +}, +"type": "object" +}, +"FindReplaceRequest": { +"description": "Finds and replaces data in cells over a range, sheet, or all sheets.", +"id": "FindReplaceRequest", +"properties": { +"allSheets": { +"description": "True to find/replace over all sheets.", +"type": "boolean" +}, +"find": { +"description": "The value to search.", +"type": "string" +}, +"includeFormulas": { +"description": "True if the search should include cells with formulas. False to skip cells with formulas.", +"type": "boolean" +}, +"matchCase": { +"description": "True if the search is case sensitive.", +"type": "boolean" +}, +"matchEntireCell": { +"description": "True if the find value should match the entire cell.", +"type": "boolean" +}, +"range": { +"$ref": "GridRange", +"description": "The range to find/replace over." +}, +"replacement": { +"description": "The value to use as the replacement.", +"type": "string" +}, +"searchByRegex": { +"description": "True if the find value is a regex. The regular expression and replacement should follow Java regex rules at https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html. The replacement string is allowed to refer to capturing groups. For example, if one cell has the contents `\"Google Sheets\"` and another has `\"Google Docs\"`, then searching for `\"o.* (.*)\"` with a replacement of `\"$1 Rocks\"` would change the contents of the cells to `\"GSheets Rocks\"` and `\"GDocs Rocks\"` respectively.", +"type": "boolean" +}, +"sheetId": { +"description": "The sheet to find/replace over.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"FindReplaceResponse": { +"description": "The result of the find/replace.", +"id": "FindReplaceResponse", +"properties": { +"formulasChanged": { +"description": "The number of formula cells changed.", +"format": "int32", +"type": "integer" +}, +"occurrencesChanged": { +"description": "The number of occurrences (possibly multiple within a cell) changed. For example, if replacing `\"e\"` with `\"o\"` in `\"Google Sheets\"`, this would be `\"3\"` because `\"Google Sheets\"` -> `\"Googlo Shoots\"`.", +"format": "int32", +"type": "integer" +}, +"rowsChanged": { +"description": "The number of rows changed.", +"format": "int32", +"type": "integer" +}, +"sheetsChanged": { +"description": "The number of sheets changed.", +"format": "int32", +"type": "integer" +}, +"valuesChanged": { +"description": "The number of non-formula cells changed.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GetSpreadsheetByDataFilterRequest": { +"description": "The request for retrieving a Spreadsheet.", +"id": "GetSpreadsheetByDataFilterRequest", +"properties": { +"dataFilters": { +"description": "The DataFilters used to select which ranges to retrieve from the spreadsheet.", +"items": { +"$ref": "DataFilter" +}, +"type": "array" +}, +"includeGridData": { +"description": "True if grid data should be returned. This parameter is ignored if a field mask was set in the request.", +"type": "boolean" +} +}, +"type": "object" +}, +"GradientRule": { +"description": "A rule that applies a gradient color scale format, based on the interpolation points listed. The format of a cell will vary based on its contents as compared to the values of the interpolation points.", +"id": "GradientRule", +"properties": { +"maxpoint": { +"$ref": "InterpolationPoint", +"description": "The final interpolation point." +}, +"midpoint": { +"$ref": "InterpolationPoint", +"description": "An optional midway interpolation point." +}, +"minpoint": { +"$ref": "InterpolationPoint", +"description": "The starting interpolation point." +} +}, +"type": "object" +}, +"GridCoordinate": { +"description": "A coordinate in a sheet. All indexes are zero-based.", +"id": "GridCoordinate", +"properties": { +"columnIndex": { +"description": "The column index of the coordinate.", +"format": "int32", +"type": "integer" +}, +"rowIndex": { +"description": "The row index of the coordinate.", +"format": "int32", +"type": "integer" +}, +"sheetId": { +"description": "The sheet this coordinate is on.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GridData": { +"description": "Data in the grid, as well as metadata about the dimensions.", +"id": "GridData", +"properties": { +"columnMetadata": { +"description": "Metadata about the requested columns in the grid, starting with the column in start_column.", +"items": { +"$ref": "DimensionProperties" +}, +"type": "array" +}, +"rowData": { +"description": "The data in the grid, one entry per row, starting with the row in startRow. The values in RowData will correspond to columns starting at start_column.", +"items": { +"$ref": "RowData" +}, +"type": "array" +}, +"rowMetadata": { +"description": "Metadata about the requested rows in the grid, starting with the row in start_row.", +"items": { +"$ref": "DimensionProperties" +}, +"type": "array" +}, +"startColumn": { +"description": "The first column this GridData refers to, zero-based.", +"format": "int32", +"type": "integer" +}, +"startRow": { +"description": "The first row this GridData refers to, zero-based.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GridProperties": { +"description": "Properties of a grid.", +"id": "GridProperties", +"properties": { +"columnCount": { +"description": "The number of columns in the grid.", +"format": "int32", +"type": "integer" +}, +"columnGroupControlAfter": { +"description": "True if the column grouping control toggle is shown after the group.", +"type": "boolean" +}, +"frozenColumnCount": { +"description": "The number of columns that are frozen in the grid.", +"format": "int32", +"type": "integer" +}, +"frozenRowCount": { +"description": "The number of rows that are frozen in the grid.", +"format": "int32", +"type": "integer" +}, +"hideGridlines": { +"description": "True if the grid isn't showing gridlines in the UI.", +"type": "boolean" +}, +"rowCount": { +"description": "The number of rows in the grid.", +"format": "int32", +"type": "integer" +}, +"rowGroupControlAfter": { +"description": "True if the row grouping control toggle is shown after the group.", +"type": "boolean" +} +}, +"type": "object" +}, +"GridRange": { +"description": "A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate the range is unbounded on that side. For example, if `\"Sheet1\"` is sheet ID 123456, then: `Sheet1!A1:A1 == sheet_id: 123456, start_row_index: 0, end_row_index: 1, start_column_index: 0, end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 123456, start_row_index: 2, end_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 123456, start_column_index: 0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 123456, start_row_index: 4, start_column_index: 0, end_column_index: 2` `Sheet1 == sheet_id: 123456` The start index must always be less than or equal to the end index. If the start index equals the end index, then the range is empty. Empty ranges are typically not meaningful and are usually rendered in the UI as `#REF!`.", +"id": "GridRange", +"properties": { +"endColumnIndex": { +"description": "The end column (exclusive) of the range, or not set if unbounded.", +"format": "int32", +"type": "integer" +}, +"endRowIndex": { +"description": "The end row (exclusive) of the range, or not set if unbounded.", +"format": "int32", +"type": "integer" +}, +"sheetId": { +"description": "The sheet this range is on.", +"format": "int32", +"type": "integer" +}, +"startColumnIndex": { +"description": "The start column (inclusive) of the range, or not set if unbounded.", +"format": "int32", +"type": "integer" +}, +"startRowIndex": { +"description": "The start row (inclusive) of the range, or not set if unbounded.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"HistogramChartSpec": { +"description": "A histogram chart. A histogram chart groups data items into bins, displaying each bin as a column of stacked items. Histograms are used to display the distribution of a dataset. Each column of items represents a range into which those items fall. The number of bins can be chosen automatically or specified explicitly.", +"id": "HistogramChartSpec", +"properties": { +"bucketSize": { +"description": "By default the bucket size (the range of values stacked in a single column) is chosen automatically, but it may be overridden here. E.g., A bucket size of 1.5 results in buckets from 0 - 1.5, 1.5 - 3.0, etc. Cannot be negative. This field is optional.", +"format": "double", +"type": "number" +}, +"legendPosition": { +"description": "The position of the chart legend.", +"enum": [ +"HISTOGRAM_CHART_LEGEND_POSITION_UNSPECIFIED", +"BOTTOM_LEGEND", +"LEFT_LEGEND", +"RIGHT_LEGEND", +"TOP_LEGEND", +"NO_LEGEND", +"INSIDE_LEGEND" +], +"enumDescriptions": [ +"Default value, do not use.", +"The legend is rendered on the bottom of the chart.", +"The legend is rendered on the left of the chart.", +"The legend is rendered on the right of the chart.", +"The legend is rendered on the top of the chart.", +"No legend is rendered.", +"The legend is rendered inside the chart area." +], +"type": "string" +}, +"outlierPercentile": { +"description": "The outlier percentile is used to ensure that outliers do not adversely affect the calculation of bucket sizes. For example, setting an outlier percentile of 0.05 indicates that the top and bottom 5% of values when calculating buckets. The values are still included in the chart, they will be added to the first or last buckets instead of their own buckets. Must be between 0.0 and 0.5.", +"format": "double", +"type": "number" +}, +"series": { +"description": "The series for a histogram may be either a single series of values to be bucketed or multiple series, each of the same length, containing the name of the series followed by the values to be bucketed for that series.", +"items": { +"$ref": "HistogramSeries" +}, +"type": "array" +}, +"showItemDividers": { +"description": "Whether horizontal divider lines should be displayed between items in each column.", +"type": "boolean" +} +}, +"type": "object" +}, +"HistogramRule": { +"description": "Allows you to organize the numeric values in a source data column into buckets of a constant size. All values from HistogramRule.start to HistogramRule.end are placed into groups of size HistogramRule.interval. In addition, all values below HistogramRule.start are placed in one group, and all values above HistogramRule.end are placed in another. Only HistogramRule.interval is required, though if HistogramRule.start and HistogramRule.end are both provided, HistogramRule.start must be less than HistogramRule.end. For example, a pivot table showing average purchase amount by age that has 50+ rows: +-----+-------------------+ | Age | AVERAGE of Amount | +-----+-------------------+ | 16 | $27.13 | | 17 | $5.24 | | 18 | $20.15 | ... +-----+-------------------+ could be turned into a pivot table that looks like the one below by applying a histogram group rule with a HistogramRule.start of 25, an HistogramRule.interval of 20, and an HistogramRule.end of 65. +-------------+-------------------+ | Grouped Age | AVERAGE of Amount | +-------------+-------------------+ | < 25 | $19.34 | | 25-45 | $31.43 | | 45-65 | $35.87 | | > 65 | $27.55 | +-------------+-------------------+ | Grand Total | $29.12 | +-------------+-------------------+", +"id": "HistogramRule", +"properties": { +"end": { +"description": "The maximum value at which items are placed into buckets of constant size. Values above end are lumped into a single bucket. This field is optional.", +"format": "double", +"type": "number" +}, +"interval": { +"description": "The size of the buckets that are created. Must be positive.", +"format": "double", +"type": "number" +}, +"start": { +"description": "The minimum value at which items are placed into buckets of constant size. Values below start are lumped into a single bucket. This field is optional.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"HistogramSeries": { +"description": "A histogram series containing the series color and data.", +"id": "HistogramSeries", +"properties": { +"barColor": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the column representing this series in each bucket. This field is optional. Deprecated: Use bar_color_style." +}, +"barColorStyle": { +"$ref": "ColorStyle", +"description": "The color of the column representing this series in each bucket. This field is optional. If bar_color is also set, this field takes precedence." +}, +"data": { +"$ref": "ChartData", +"description": "The data for this histogram series." +} +}, +"type": "object" +}, +"InsertDimensionRequest": { +"description": "Inserts rows or columns in a sheet at a particular index.", +"id": "InsertDimensionRequest", +"properties": { +"inheritFromBefore": { +"description": "Whether dimension properties should be extended from the dimensions before or after the newly inserted dimensions. True to inherit from the dimensions before (in which case the start index must be greater than 0), and false to inherit from the dimensions after. For example, if row index 0 has red background and row index 1 has a green background, then inserting 2 rows at index 1 can inherit either the green or red background. If `inheritFromBefore` is true, the two new rows will be red (because the row before the insertion point was red), whereas if `inheritFromBefore` is false, the two new rows will be green (because the row after the insertion point was green).", +"type": "boolean" +}, +"range": { +"$ref": "DimensionRange", +"description": "The dimensions to insert. Both the start and end indexes must be bounded." +} +}, +"type": "object" +}, +"InsertRangeRequest": { +"description": "Inserts cells into a range, shifting the existing cells over or down.", +"id": "InsertRangeRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range to insert new cells into." +}, +"shiftDimension": { +"description": "The dimension which will be shifted when inserting cells. If ROWS, existing cells will be shifted down. If COLUMNS, existing cells will be shifted right.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +} +}, +"type": "object" +}, +"InterpolationPoint": { +"description": "A single interpolation point on a gradient conditional format. These pin the gradient color scale according to the color, type and value chosen.", +"id": "InterpolationPoint", +"properties": { +"color": { +"$ref": "Color", +"deprecated": true, +"description": "The color this interpolation point should use. Deprecated: Use color_style." +}, +"colorStyle": { +"$ref": "ColorStyle", +"description": "The color this interpolation point should use. If color is also set, this field takes precedence." +}, +"type": { +"description": "How the value should be interpreted.", +"enum": [ +"INTERPOLATION_POINT_TYPE_UNSPECIFIED", +"MIN", +"MAX", +"NUMBER", +"PERCENT", +"PERCENTILE" +], +"enumDescriptions": [ +"The default value, do not use.", +"The interpolation point uses the minimum value in the cells over the range of the conditional format.", +"The interpolation point uses the maximum value in the cells over the range of the conditional format.", +"The interpolation point uses exactly the value in InterpolationPoint.value.", +"The interpolation point is the given percentage over all the cells in the range of the conditional format. This is equivalent to `NUMBER` if the value was: `=(MAX(FLATTEN(range)) * (value / 100)) + (MIN(FLATTEN(range)) * (1 - (value / 100)))` (where errors in the range are ignored when flattening).", +"The interpolation point is the given percentile over all the cells in the range of the conditional format. This is equivalent to `NUMBER` if the value was: `=PERCENTILE(FLATTEN(range), value / 100)` (where errors in the range are ignored when flattening)." +], +"type": "string" +}, +"value": { +"description": "The value this interpolation point uses. May be a formula. Unused if type is MIN or MAX.", +"type": "string" +} +}, +"type": "object" +}, +"Interval": { +"description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", +"id": "Interval", +"properties": { +"endTime": { +"description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"IterativeCalculationSettings": { +"description": "Settings to control how circular dependencies are resolved with iterative calculation.", +"id": "IterativeCalculationSettings", +"properties": { +"convergenceThreshold": { +"description": "When iterative calculation is enabled and successive results differ by less than this threshold value, the calculation rounds stop.", +"format": "double", +"type": "number" +}, +"maxIterations": { +"description": "When iterative calculation is enabled, the maximum number of calculation rounds to perform.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"KeyValueFormat": { +"description": "Formatting options for key value.", +"id": "KeyValueFormat", +"properties": { +"position": { +"$ref": "TextPosition", +"description": "Specifies the horizontal text positioning of key value. This field is optional. If not specified, default positioning is used." +}, +"textFormat": { +"$ref": "TextFormat", +"description": "Text formatting options for key value. The link field is not supported." +} +}, +"type": "object" +}, +"LineStyle": { +"description": "Properties that describe the style of a line.", +"id": "LineStyle", +"properties": { +"type": { +"description": "The dash type of the line.", +"enum": [ +"LINE_DASH_TYPE_UNSPECIFIED", +"INVISIBLE", +"CUSTOM", +"SOLID", +"DOTTED", +"MEDIUM_DASHED", +"MEDIUM_DASHED_DOTTED", +"LONG_DASHED", +"LONG_DASHED_DOTTED" +], +"enumDescriptions": [ +"Default value, do not use.", +"No dash type, which is equivalent to a non-visible line.", +"A custom dash for a line. Modifying the exact custom dash style is currently unsupported.", +"A solid line.", +"A dotted line.", +"A dashed line where the dashes have \"medium\" length.", +"A line that alternates between a \"medium\" dash and a dot.", +"A dashed line where the dashes have \"long\" length.", +"A line that alternates between a \"long\" dash and a dot." +], +"type": "string" +}, +"width": { +"description": "The thickness of the line, in px.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Link": { +"description": "An external or local reference.", +"id": "Link", +"properties": { +"uri": { +"description": "The link identifier.", +"type": "string" +} +}, +"type": "object" +}, +"ManualRule": { +"description": "Allows you to manually organize the values in a source data column into buckets with names of your choosing. For example, a pivot table that aggregates population by state: +-------+-------------------+ | State | SUM of Population | +-------+-------------------+ | AK | 0.7 | | AL | 4.8 | | AR | 2.9 | ... +-------+-------------------+ could be turned into a pivot table that aggregates population by time zone by providing a list of groups (for example, groupName = 'Central', items = ['AL', 'AR', 'IA', ...]) to a manual group rule. Note that a similar effect could be achieved by adding a time zone column to the source data and adjusting the pivot table. +-----------+-------------------+ | Time Zone | SUM of Population | +-----------+-------------------+ | Central | 106.3 | | Eastern | 151.9 | | Mountain | 17.4 | ... +-----------+-------------------+", +"id": "ManualRule", +"properties": { +"groups": { +"description": "The list of group names and the corresponding items from the source data that map to each group name.", +"items": { +"$ref": "ManualRuleGroup" +}, +"type": "array" +} +}, +"type": "object" +}, +"ManualRuleGroup": { +"description": "A group name and a list of items from the source data that should be placed in the group with this name.", +"id": "ManualRuleGroup", +"properties": { +"groupName": { +"$ref": "ExtendedValue", +"description": "The group name, which must be a string. Each group in a given ManualRule must have a unique group name." +}, +"items": { +"description": "The items in the source data that should be placed into this group. Each item may be a string, number, or boolean. Items may appear in at most one group within a given ManualRule. Items that do not appear in any group will appear on their own.", +"items": { +"$ref": "ExtendedValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"MatchedDeveloperMetadata": { +"description": "A developer metadata entry and the data filters specified in the original request that matched it.", +"id": "MatchedDeveloperMetadata", +"properties": { +"dataFilters": { +"description": "All filters matching the returned developer metadata.", +"items": { +"$ref": "DataFilter" +}, +"type": "array" +}, +"developerMetadata": { +"$ref": "DeveloperMetadata", +"description": "The developer metadata matching the specified filters." +} +}, +"type": "object" +}, +"MatchedValueRange": { +"description": "A value range that was matched by one or more data filers.", +"id": "MatchedValueRange", +"properties": { +"dataFilters": { +"description": "The DataFilters from the request that matched the range of values.", +"items": { +"$ref": "DataFilter" +}, +"type": "array" +}, +"valueRange": { +"$ref": "ValueRange", +"description": "The values matched by the DataFilter." +} +}, +"type": "object" +}, +"MergeCellsRequest": { +"description": "Merges all cells in the range.", +"id": "MergeCellsRequest", +"properties": { +"mergeType": { +"description": "How the cells should be merged.", +"enum": [ +"MERGE_ALL", +"MERGE_COLUMNS", +"MERGE_ROWS" +], +"enumDescriptions": [ +"Create a single merge from the range", +"Create a merge for each column in the range", +"Create a merge for each row in the range" +], +"type": "string" +}, +"range": { +"$ref": "GridRange", +"description": "The range of cells to merge." +} +}, +"type": "object" +}, +"MoveDimensionRequest": { +"description": "Moves one or more rows or columns.", +"id": "MoveDimensionRequest", +"properties": { +"destinationIndex": { +"description": "The zero-based start index of where to move the source data to, based on the coordinates *before* the source data is removed from the grid. Existing data will be shifted down or right (depending on the dimension) to make room for the moved dimensions. The source dimensions are removed from the grid, so the the data may end up in a different index than specified. For example, given `A1..A5` of `0, 1, 2, 3, 4` and wanting to move `\"1\"` and `\"2\"` to between `\"3\"` and `\"4\"`, the source would be `ROWS [1..3)`,and the destination index would be `\"4\"` (the zero-based index of row 5). The end result would be `A1..A5` of `0, 3, 1, 2, 4`.", +"format": "int32", +"type": "integer" +}, +"source": { +"$ref": "DimensionRange", +"description": "The source dimensions to move." +} +}, +"type": "object" +}, +"NamedRange": { +"description": "A named range.", +"id": "NamedRange", +"properties": { +"name": { +"description": "The name of the named range.", +"type": "string" +}, +"namedRangeId": { +"description": "The ID of the named range.", +"type": "string" +}, +"range": { +"$ref": "GridRange", +"description": "The range this represents." +} +}, +"type": "object" +}, +"NumberFormat": { +"description": "The number format of a cell.", +"id": "NumberFormat", +"properties": { +"pattern": { +"description": "Pattern string used for formatting. If not set, a default pattern based on the user's locale will be used if necessary for the given type. See the [Date and Number Formats guide](/sheets/api/guides/formats) for more information about the supported patterns.", +"type": "string" +}, +"type": { +"description": "The type of the number format. When writing, this field must be set.", +"enum": [ +"NUMBER_FORMAT_TYPE_UNSPECIFIED", +"TEXT", +"NUMBER", +"PERCENT", +"CURRENCY", +"DATE", +"TIME", +"DATE_TIME", +"SCIENTIFIC" +], +"enumDescriptions": [ +"The number format is not specified and is based on the contents of the cell. Do not explicitly use this.", +"Text formatting, e.g `1000.12`", +"Number formatting, e.g, `1,000.12`", +"Percent formatting, e.g `10.12%`", +"Currency formatting, e.g `$1,000.12`", +"Date formatting, e.g `9/26/2008`", +"Time formatting, e.g `3:59:00 PM`", +"Date+Time formatting, e.g `9/26/08 15:59:00`", +"Scientific number formatting, e.g `1.01E+03`" +], +"type": "string" +} +}, +"type": "object" +}, +"OrgChartSpec": { +"description": "An org chart. Org charts require a unique set of labels in labels and may optionally include parent_labels and tooltips. parent_labels contain, for each node, the label identifying the parent node. tooltips contain, for each node, an optional tooltip. For example, to describe an OrgChart with Alice as the CEO, Bob as the President (reporting to Alice) and Cathy as VP of Sales (also reporting to Alice), have labels contain \"Alice\", \"Bob\", \"Cathy\", parent_labels contain \"\", \"Alice\", \"Alice\" and tooltips contain \"CEO\", \"President\", \"VP Sales\".", +"id": "OrgChartSpec", +"properties": { +"labels": { +"$ref": "ChartData", +"description": "The data containing the labels for all the nodes in the chart. Labels must be unique." +}, +"nodeColor": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the org chart nodes. Deprecated: Use node_color_style." +}, +"nodeColorStyle": { +"$ref": "ColorStyle", +"description": "The color of the org chart nodes. If node_color is also set, this field takes precedence." +}, +"nodeSize": { +"description": "The size of the org chart nodes.", +"enum": [ +"ORG_CHART_LABEL_SIZE_UNSPECIFIED", +"SMALL", +"MEDIUM", +"LARGE" +], +"enumDescriptions": [ +"Default value, do not use.", +"The small org chart node size.", +"The medium org chart node size.", +"The large org chart node size." +], +"type": "string" +}, +"parentLabels": { +"$ref": "ChartData", +"description": "The data containing the label of the parent for the corresponding node. A blank value indicates that the node has no parent and is a top-level node. This field is optional." +}, +"selectedNodeColor": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the selected org chart nodes. Deprecated: Use selected_node_color_style." +}, +"selectedNodeColorStyle": { +"$ref": "ColorStyle", +"description": "The color of the selected org chart nodes. If selected_node_color is also set, this field takes precedence." +}, +"tooltips": { +"$ref": "ChartData", +"description": "The data containing the tooltip for the corresponding node. A blank value results in no tooltip being displayed for the node. This field is optional." +} +}, +"type": "object" +}, +"OverlayPosition": { +"description": "The location an object is overlaid on top of a grid.", +"id": "OverlayPosition", +"properties": { +"anchorCell": { +"$ref": "GridCoordinate", +"description": "The cell the object is anchored to." +}, +"heightPixels": { +"description": "The height of the object, in pixels. Defaults to 371.", +"format": "int32", +"type": "integer" +}, +"offsetXPixels": { +"description": "The horizontal offset, in pixels, that the object is offset from the anchor cell.", +"format": "int32", +"type": "integer" +}, +"offsetYPixels": { +"description": "The vertical offset, in pixels, that the object is offset from the anchor cell.", +"format": "int32", +"type": "integer" +}, +"widthPixels": { +"description": "The width of the object, in pixels. Defaults to 600.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Padding": { +"description": "The amount of padding around the cell, in pixels. When updating padding, every field must be specified.", +"id": "Padding", +"properties": { +"bottom": { +"description": "The bottom padding of the cell.", +"format": "int32", +"type": "integer" +}, +"left": { +"description": "The left padding of the cell.", +"format": "int32", +"type": "integer" +}, +"right": { +"description": "The right padding of the cell.", +"format": "int32", +"type": "integer" +}, +"top": { +"description": "The top padding of the cell.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PasteDataRequest": { +"description": "Inserts data into the spreadsheet starting at the specified coordinate.", +"id": "PasteDataRequest", +"properties": { +"coordinate": { +"$ref": "GridCoordinate", +"description": "The coordinate at which the data should start being inserted." +}, +"data": { +"description": "The data to insert.", +"type": "string" +}, +"delimiter": { +"description": "The delimiter in the data.", +"type": "string" +}, +"html": { +"description": "True if the data is HTML.", +"type": "boolean" +}, +"type": { +"description": "How the data should be pasted.", +"enum": [ +"PASTE_NORMAL", +"PASTE_VALUES", +"PASTE_FORMAT", +"PASTE_NO_BORDERS", +"PASTE_FORMULA", +"PASTE_DATA_VALIDATION", +"PASTE_CONDITIONAL_FORMATTING" +], +"enumDescriptions": [ +"Paste values, formulas, formats, and merges.", +"Paste the values ONLY without formats, formulas, or merges.", +"Paste the format and data validation only.", +"Like `PASTE_NORMAL` but without borders.", +"Paste the formulas only.", +"Paste the data validation only.", +"Paste the conditional formatting rules only." +], +"type": "string" +} +}, +"type": "object" +}, +"PieChartSpec": { +"description": "A pie chart.", +"id": "PieChartSpec", +"properties": { +"domain": { +"$ref": "ChartData", +"description": "The data that covers the domain of the pie chart." +}, +"legendPosition": { +"description": "Where the legend of the pie chart should be drawn.", +"enum": [ +"PIE_CHART_LEGEND_POSITION_UNSPECIFIED", +"BOTTOM_LEGEND", +"LEFT_LEGEND", +"RIGHT_LEGEND", +"TOP_LEGEND", +"NO_LEGEND", +"LABELED_LEGEND" +], +"enumDescriptions": [ +"Default value, do not use.", +"The legend is rendered on the bottom of the chart.", +"The legend is rendered on the left of the chart.", +"The legend is rendered on the right of the chart.", +"The legend is rendered on the top of the chart.", +"No legend is rendered.", +"Each pie slice has a label attached to it." +], +"type": "string" +}, +"pieHole": { +"description": "The size of the hole in the pie chart.", +"format": "double", +"type": "number" +}, +"series": { +"$ref": "ChartData", +"description": "The data that covers the one and only series of the pie chart." +}, +"threeDimensional": { +"description": "True if the pie is three dimensional.", +"type": "boolean" +} +}, +"type": "object" +}, +"PivotFilterCriteria": { +"description": "Criteria for showing/hiding rows in a pivot table.", +"id": "PivotFilterCriteria", +"properties": { +"condition": { +"$ref": "BooleanCondition", +"description": "A condition that must be true for values to be shown. (`visibleValues` does not override this -- even if a value is listed there, it is still hidden if it does not meet the condition.) Condition values that refer to ranges in A1-notation are evaluated relative to the pivot table sheet. References are treated absolutely, so are not filled down the pivot table. For example, a condition value of `=A1` on \"Pivot Table 1\" is treated as `'Pivot Table 1'!$A$1`. The source data of the pivot table can be referenced by column header name. For example, if the source data has columns named \"Revenue\" and \"Cost\" and a condition is applied to the \"Revenue\" column with type `NUMBER_GREATER` and value `=Cost`, then only columns where \"Revenue\" > \"Cost\" are included." +}, +"visibleByDefault": { +"description": "Whether values are visible by default. If true, the visible_values are ignored, all values that meet condition (if specified) are shown. If false, values that are both in visible_values and meet condition are shown.", +"type": "boolean" +}, +"visibleValues": { +"description": "Values that should be included. Values not listed here are excluded.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PivotFilterSpec": { +"description": "The pivot table filter criteria associated with a specific source column offset.", +"id": "PivotFilterSpec", +"properties": { +"columnOffsetIndex": { +"description": "The zero-based column offset of the source range.", +"format": "int32", +"type": "integer" +}, +"dataSourceColumnReference": { +"$ref": "DataSourceColumnReference", +"description": "The reference to the data source column." +}, +"filterCriteria": { +"$ref": "PivotFilterCriteria", +"description": "The criteria for the column." +} +}, +"type": "object" +}, +"PivotGroup": { +"description": "A single grouping (either row or column) in a pivot table.", +"id": "PivotGroup", +"properties": { +"dataSourceColumnReference": { +"$ref": "DataSourceColumnReference", +"description": "The reference to the data source column this grouping is based on." +}, +"groupLimit": { +"$ref": "PivotGroupLimit", +"description": "The count limit on rows or columns to apply to this pivot group." +}, +"groupRule": { +"$ref": "PivotGroupRule", +"description": "The group rule to apply to this row/column group." +}, +"label": { +"description": "The labels to use for the row/column groups which can be customized. For example, in the following pivot table, the row label is `Region` (which could be renamed to `State`) and the column label is `Product` (which could be renamed `Item`). Pivot tables created before December 2017 do not have header labels. If you'd like to add header labels to an existing pivot table, please delete the existing pivot table and then create a new pivot table with same parameters. +--------------+---------+-------+ | SUM of Units | Product | | | Region | Pen | Paper | +--------------+---------+-------+ | New York | 345 | 98 | | Oregon | 234 | 123 | | Tennessee | 531 | 415 | +--------------+---------+-------+ | Grand Total | 1110 | 636 | +--------------+---------+-------+", +"type": "string" +}, +"repeatHeadings": { +"description": "True if the headings in this pivot group should be repeated. This is only valid for row groupings and is ignored by columns. By default, we minimize repetition of headings by not showing higher level headings where they are the same. For example, even though the third row below corresponds to \"Q1 Mar\", \"Q1\" is not shown because it is redundant with previous rows. Setting repeat_headings to true would cause \"Q1\" to be repeated for \"Feb\" and \"Mar\". +--------------+ | Q1 | Jan | | | Feb | | | Mar | +--------+-----+ | Q1 Total | +--------------+", +"type": "boolean" +}, +"showTotals": { +"description": "True if the pivot table should include the totals for this grouping.", +"type": "boolean" +}, +"sortOrder": { +"description": "The order the values in this group should be sorted.", +"enum": [ +"SORT_ORDER_UNSPECIFIED", +"ASCENDING", +"DESCENDING" +], +"enumDescriptions": [ +"Default value, do not use this.", +"Sort ascending.", +"Sort descending." +], +"type": "string" +}, +"sourceColumnOffset": { +"description": "The column offset of the source range that this grouping is based on. For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this group refers to column `C`, whereas the offset `1` would refer to column `D`.", +"format": "int32", +"type": "integer" +}, +"valueBucket": { +"$ref": "PivotGroupSortValueBucket", +"description": "The bucket of the opposite pivot group to sort by. If not specified, sorting is alphabetical by this group's values." +}, +"valueMetadata": { +"description": "Metadata about values in the grouping.", +"items": { +"$ref": "PivotGroupValueMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"PivotGroupLimit": { +"description": "The count limit on rows or columns in the pivot group.", +"id": "PivotGroupLimit", +"properties": { +"applyOrder": { +"description": "The order in which the group limit is applied to the pivot table. Pivot group limits are applied from lower to higher order number. Order numbers are normalized to consecutive integers from 0. For write request, to fully customize the applying orders, all pivot group limits should have this field set with an unique number. Otherwise, the order is determined by the index in the PivotTable.rows list and then the PivotTable.columns list.", +"format": "int32", +"type": "integer" +}, +"countLimit": { +"description": "The count limit.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PivotGroupRule": { +"description": "An optional setting on a PivotGroup that defines buckets for the values in the source data column rather than breaking out each individual value. Only one PivotGroup with a group rule may be added for each column in the source data, though on any given column you may add both a PivotGroup that has a rule and a PivotGroup that does not.", +"id": "PivotGroupRule", +"properties": { +"dateTimeRule": { +"$ref": "DateTimeRule", +"description": "A DateTimeRule." +}, +"histogramRule": { +"$ref": "HistogramRule", +"description": "A HistogramRule." +}, +"manualRule": { +"$ref": "ManualRule", +"description": "A ManualRule." +} +}, +"type": "object" +}, +"PivotGroupSortValueBucket": { +"description": "Information about which values in a pivot group should be used for sorting.", +"id": "PivotGroupSortValueBucket", +"properties": { +"buckets": { +"description": "Determines the bucket from which values are chosen to sort. For example, in a pivot table with one row group & two column groups, the row group can list up to two values. The first value corresponds to a value within the first column group, and the second value corresponds to a value in the second column group. If no values are listed, this would indicate that the row should be sorted according to the \"Grand Total\" over the column groups. If a single value is listed, this would correspond to using the \"Total\" of that bucket.", +"items": { +"$ref": "ExtendedValue" +}, +"type": "array" +}, +"valuesIndex": { +"description": "The offset in the PivotTable.values list which the values in this grouping should be sorted by.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PivotGroupValueMetadata": { +"description": "Metadata about a value in a pivot grouping.", +"id": "PivotGroupValueMetadata", +"properties": { +"collapsed": { +"description": "True if the data corresponding to the value is collapsed.", +"type": "boolean" +}, +"value": { +"$ref": "ExtendedValue", +"description": "The calculated value the metadata corresponds to. (Note that formulaValue is not valid, because the values will be calculated.)" +} +}, +"type": "object" +}, +"PivotTable": { +"description": "A pivot table.", +"id": "PivotTable", +"properties": { +"columns": { +"description": "Each column grouping in the pivot table.", +"items": { +"$ref": "PivotGroup" +}, +"type": "array" +}, +"criteria": { +"additionalProperties": { +"$ref": "PivotFilterCriteria" +}, +"deprecated": true, +"description": "An optional mapping of filters per source column offset. The filters are applied before aggregating data into the pivot table. The map's key is the column offset of the source range that you want to filter, and the value is the criteria for that column. For example, if the source was `C10:E15`, a key of `0` will have the filter for column `C`, whereas the key `1` is for column `D`. This field is deprecated in favor of filter_specs.", +"type": "object" +}, +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "Output only. The data execution status for data source pivot tables.", +"readOnly": true +}, +"dataSourceId": { +"description": "The ID of the data source the pivot table is reading data from.", +"type": "string" +}, +"filterSpecs": { +"description": "The filters applied to the source columns before aggregating data for the pivot table. Both criteria and filter_specs are populated in responses. If both fields are specified in an update request, this field takes precedence.", +"items": { +"$ref": "PivotFilterSpec" +}, +"type": "array" +}, +"rows": { +"description": "Each row grouping in the pivot table.", +"items": { +"$ref": "PivotGroup" +}, +"type": "array" +}, +"source": { +"$ref": "GridRange", +"description": "The range the pivot table is reading data from." +}, +"valueLayout": { +"description": "Whether values should be listed horizontally (as columns) or vertically (as rows).", +"enum": [ +"HORIZONTAL", +"VERTICAL" +], +"enumDescriptions": [ +"Values are laid out horizontally (as columns).", +"Values are laid out vertically (as rows)." +], +"type": "string" +}, +"values": { +"description": "A list of values to include in the pivot table.", +"items": { +"$ref": "PivotValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"PivotValue": { +"description": "The definition of how a value in a pivot table should be calculated.", +"id": "PivotValue", +"properties": { +"calculatedDisplayType": { +"description": "If specified, indicates that pivot values should be displayed as the result of a calculation with another pivot value. For example, if calculated_display_type is specified as PERCENT_OF_GRAND_TOTAL, all the pivot values are displayed as the percentage of the grand total. In the Sheets editor, this is referred to as \"Show As\" in the value section of a pivot table.", +"enum": [ +"PIVOT_VALUE_CALCULATED_DISPLAY_TYPE_UNSPECIFIED", +"PERCENT_OF_ROW_TOTAL", +"PERCENT_OF_COLUMN_TOTAL", +"PERCENT_OF_GRAND_TOTAL" +], +"enumDescriptions": [ +"Default value, do not use.", +"Shows the pivot values as percentage of the row total values.", +"Shows the pivot values as percentage of the column total values.", +"Shows the pivot values as percentage of the grand total values." +], +"type": "string" +}, +"dataSourceColumnReference": { +"$ref": "DataSourceColumnReference", +"description": "The reference to the data source column that this value reads from." +}, +"formula": { +"description": "A custom formula to calculate the value. The formula must start with an `=` character.", +"type": "string" +}, +"name": { +"description": "A name to use for the value.", +"type": "string" +}, +"sourceColumnOffset": { +"description": "The column offset of the source range that this value reads from. For example, if the source was `C10:E15`, a `sourceColumnOffset` of `0` means this value refers to column `C`, whereas the offset `1` would refer to column `D`.", +"format": "int32", +"type": "integer" +}, +"summarizeFunction": { +"description": "A function to summarize the value. If formula is set, the only supported values are SUM and CUSTOM. If sourceColumnOffset is set, then `CUSTOM` is not supported.", +"enum": [ +"PIVOT_STANDARD_VALUE_FUNCTION_UNSPECIFIED", +"SUM", +"COUNTA", +"COUNT", +"COUNTUNIQUE", +"AVERAGE", +"MAX", +"MIN", +"MEDIAN", +"PRODUCT", +"STDEV", +"STDEVP", +"VAR", +"VARP", +"CUSTOM", +"NONE" +], +"enumDescriptions": [ +"The default, do not use.", +"Corresponds to the `SUM` function.", +"Corresponds to the `COUNTA` function.", +"Corresponds to the `COUNT` function.", +"Corresponds to the `COUNTUNIQUE` function.", +"Corresponds to the `AVERAGE` function.", +"Corresponds to the `MAX` function.", +"Corresponds to the `MIN` function.", +"Corresponds to the `MEDIAN` function.", +"Corresponds to the `PRODUCT` function.", +"Corresponds to the `STDEV` function.", +"Corresponds to the `STDEVP` function.", +"Corresponds to the `VAR` function.", +"Corresponds to the `VARP` function.", +"Indicates the formula should be used as-is. Only valid if PivotValue.formula was set.", +"Indicates that the value is already summarized, and the summarization function is not explicitly specified. Used for Looker data source pivot tables where the value is already summarized." +], +"type": "string" +} +}, +"type": "object" +}, +"PointStyle": { +"description": "The style of a point on the chart.", +"id": "PointStyle", +"properties": { +"shape": { +"description": "The point shape. If empty or unspecified, a default shape is used.", +"enum": [ +"POINT_SHAPE_UNSPECIFIED", +"CIRCLE", +"DIAMOND", +"HEXAGON", +"PENTAGON", +"SQUARE", +"STAR", +"TRIANGLE", +"X_MARK" +], +"enumDescriptions": [ +"Default value.", +"A circle shape.", +"A diamond shape.", +"A hexagon shape.", +"A pentagon shape.", +"A square shape.", +"A star shape.", +"A triangle shape.", +"An x-mark shape." +], +"type": "string" +}, +"size": { +"description": "The point size. If empty, a default size is used.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ProtectedRange": { +"description": "A protected range.", +"id": "ProtectedRange", +"properties": { +"description": { +"description": "The description of this protected range.", +"type": "string" +}, +"editors": { +"$ref": "Editors", +"description": "The users and groups with edit access to the protected range. This field is only visible to users with edit access to the protected range and the document. Editors are not supported with warning_only protection." +}, +"namedRangeId": { +"description": "The named range this protected range is backed by, if any. When writing, only one of range or named_range_id may be set.", +"type": "string" +}, +"protectedRangeId": { +"description": "The ID of the protected range. This field is read-only.", +"format": "int32", +"type": "integer" +}, +"range": { +"$ref": "GridRange", +"description": "The range that is being protected. The range may be fully unbounded, in which case this is considered a protected sheet. When writing, only one of range or named_range_id may be set." +}, +"requestingUserCanEdit": { +"description": "True if the user who requested this protected range can edit the protected area. This field is read-only.", +"type": "boolean" +}, +"unprotectedRanges": { +"description": "The list of unprotected ranges within a protected sheet. Unprotected ranges are only supported on protected sheets.", +"items": { +"$ref": "GridRange" +}, +"type": "array" +}, +"warningOnly": { +"description": "True if this protected range will show a warning when editing. Warning-based protection means that every user can edit data in the protected range, except editing will prompt a warning asking the user to confirm the edit. When writing: if this field is true, then editors are ignored. Additionally, if this field is changed from true to false and the `editors` field is not set (nor included in the field mask), then the editors will be set to all the editors in the document.", +"type": "boolean" +} +}, +"type": "object" +}, +"RandomizeRangeRequest": { +"description": "Randomizes the order of the rows in a range.", +"id": "RandomizeRangeRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range to randomize." +} +}, +"type": "object" +}, +"RefreshDataSourceObjectExecutionStatus": { +"description": "The execution status of refreshing one data source object.", +"id": "RefreshDataSourceObjectExecutionStatus", +"properties": { +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "The data execution status." +}, +"reference": { +"$ref": "DataSourceObjectReference", +"description": "Reference to a data source object being refreshed." +} +}, +"type": "object" +}, +"RefreshDataSourceRequest": { +"description": "Refreshes one or multiple data source objects in the spreadsheet by the specified references. The request requires an additional `bigquery.readonly` OAuth scope. If there are multiple refresh requests referencing the same data source objects in one batch, only the last refresh request is processed, and all those requests will have the same response accordingly.", +"id": "RefreshDataSourceRequest", +"properties": { +"dataSourceId": { +"description": "Reference to a DataSource. If specified, refreshes all associated data source objects for the data source.", +"type": "string" +}, +"force": { +"description": "Refreshes the data source objects regardless of the current state. If not set and a referenced data source object was in error state, the refresh will fail immediately.", +"type": "boolean" +}, +"isAll": { +"description": "Refreshes all existing data source objects in the spreadsheet.", +"type": "boolean" +}, +"references": { +"$ref": "DataSourceObjectReferences", +"description": "References to data source objects to refresh." +} +}, +"type": "object" +}, +"RefreshDataSourceResponse": { +"description": "The response from refreshing one or multiple data source objects.", +"id": "RefreshDataSourceResponse", +"properties": { +"statuses": { +"description": "All the refresh status for the data source object references specified in the request. If is_all is specified, the field contains only those in failure status.", +"items": { +"$ref": "RefreshDataSourceObjectExecutionStatus" +}, +"type": "array" +} +}, +"type": "object" +}, +"RepeatCellRequest": { +"description": "Updates all cells in the range to the values in the given Cell object. Only the fields listed in the fields field are updated; others are unchanged. If writing a cell with a formula, the formula's ranges will automatically increment for each field in the range. For example, if writing a cell with formula `=A1` into range B2:C4, B2 would be `=A1`, B3 would be `=A2`, B4 would be `=A3`, C2 would be `=B1`, C3 would be `=B2`, C4 would be `=B3`. To keep the formula's ranges static, use the `$` indicator. For example, use the formula `=$A$1` to prevent both the row and the column from incrementing.", +"id": "RepeatCellRequest", +"properties": { +"cell": { +"$ref": "CellData", +"description": "The data to write." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `cell` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"range": { +"$ref": "GridRange", +"description": "The range to repeat the cell in." +} +}, +"type": "object" +}, +"Request": { +"description": "A single kind of update to apply to a spreadsheet.", +"id": "Request", +"properties": { +"addBanding": { +"$ref": "AddBandingRequest", +"description": "Adds a new banded range" +}, +"addChart": { +"$ref": "AddChartRequest", +"description": "Adds a chart." +}, +"addConditionalFormatRule": { +"$ref": "AddConditionalFormatRuleRequest", +"description": "Adds a new conditional format rule." +}, +"addDataSource": { +"$ref": "AddDataSourceRequest", +"description": "Adds a data source." +}, +"addDimensionGroup": { +"$ref": "AddDimensionGroupRequest", +"description": "Creates a group over the specified range." +}, +"addFilterView": { +"$ref": "AddFilterViewRequest", +"description": "Adds a filter view." +}, +"addNamedRange": { +"$ref": "AddNamedRangeRequest", +"description": "Adds a named range." +}, +"addProtectedRange": { +"$ref": "AddProtectedRangeRequest", +"description": "Adds a protected range." +}, +"addSheet": { +"$ref": "AddSheetRequest", +"description": "Adds a sheet." +}, +"addSlicer": { +"$ref": "AddSlicerRequest", +"description": "Adds a slicer." +}, +"appendCells": { +"$ref": "AppendCellsRequest", +"description": "Appends cells after the last row with data in a sheet." +}, +"appendDimension": { +"$ref": "AppendDimensionRequest", +"description": "Appends dimensions to the end of a sheet." +}, +"autoFill": { +"$ref": "AutoFillRequest", +"description": "Automatically fills in more data based on existing data." +}, +"autoResizeDimensions": { +"$ref": "AutoResizeDimensionsRequest", +"description": "Automatically resizes one or more dimensions based on the contents of the cells in that dimension." +}, +"clearBasicFilter": { +"$ref": "ClearBasicFilterRequest", +"description": "Clears the basic filter on a sheet." +}, +"copyPaste": { +"$ref": "CopyPasteRequest", +"description": "Copies data from one area and pastes it to another." +}, +"createDeveloperMetadata": { +"$ref": "CreateDeveloperMetadataRequest", +"description": "Creates new developer metadata" +}, +"cutPaste": { +"$ref": "CutPasteRequest", +"description": "Cuts data from one area and pastes it to another." +}, +"deleteBanding": { +"$ref": "DeleteBandingRequest", +"description": "Removes a banded range" +}, +"deleteConditionalFormatRule": { +"$ref": "DeleteConditionalFormatRuleRequest", +"description": "Deletes an existing conditional format rule." +}, +"deleteDataSource": { +"$ref": "DeleteDataSourceRequest", +"description": "Deletes a data source." +}, +"deleteDeveloperMetadata": { +"$ref": "DeleteDeveloperMetadataRequest", +"description": "Deletes developer metadata" +}, +"deleteDimension": { +"$ref": "DeleteDimensionRequest", +"description": "Deletes rows or columns in a sheet." +}, +"deleteDimensionGroup": { +"$ref": "DeleteDimensionGroupRequest", +"description": "Deletes a group over the specified range." +}, +"deleteDuplicates": { +"$ref": "DeleteDuplicatesRequest", +"description": "Removes rows containing duplicate values in specified columns of a cell range." +}, +"deleteEmbeddedObject": { +"$ref": "DeleteEmbeddedObjectRequest", +"description": "Deletes an embedded object (e.g, chart, image) in a sheet." +}, +"deleteFilterView": { +"$ref": "DeleteFilterViewRequest", +"description": "Deletes a filter view from a sheet." +}, +"deleteNamedRange": { +"$ref": "DeleteNamedRangeRequest", +"description": "Deletes a named range." +}, +"deleteProtectedRange": { +"$ref": "DeleteProtectedRangeRequest", +"description": "Deletes a protected range." +}, +"deleteRange": { +"$ref": "DeleteRangeRequest", +"description": "Deletes a range of cells from a sheet, shifting the remaining cells." +}, +"deleteSheet": { +"$ref": "DeleteSheetRequest", +"description": "Deletes a sheet." +}, +"duplicateFilterView": { +"$ref": "DuplicateFilterViewRequest", +"description": "Duplicates a filter view." +}, +"duplicateSheet": { +"$ref": "DuplicateSheetRequest", +"description": "Duplicates a sheet." +}, +"findReplace": { +"$ref": "FindReplaceRequest", +"description": "Finds and replaces occurrences of some text with other text." +}, +"insertDimension": { +"$ref": "InsertDimensionRequest", +"description": "Inserts new rows or columns in a sheet." +}, +"insertRange": { +"$ref": "InsertRangeRequest", +"description": "Inserts new cells in a sheet, shifting the existing cells." +}, +"mergeCells": { +"$ref": "MergeCellsRequest", +"description": "Merges cells together." +}, +"moveDimension": { +"$ref": "MoveDimensionRequest", +"description": "Moves rows or columns to another location in a sheet." +}, +"pasteData": { +"$ref": "PasteDataRequest", +"description": "Pastes data (HTML or delimited) into a sheet." +}, +"randomizeRange": { +"$ref": "RandomizeRangeRequest", +"description": "Randomizes the order of the rows in a range." +}, +"refreshDataSource": { +"$ref": "RefreshDataSourceRequest", +"description": "Refreshes one or multiple data sources and associated dbobjects." +}, +"repeatCell": { +"$ref": "RepeatCellRequest", +"description": "Repeats a single cell across a range." +}, +"setBasicFilter": { +"$ref": "SetBasicFilterRequest", +"description": "Sets the basic filter on a sheet." +}, +"setDataValidation": { +"$ref": "SetDataValidationRequest", +"description": "Sets data validation for one or more cells." +}, +"sortRange": { +"$ref": "SortRangeRequest", +"description": "Sorts data in a range." +}, +"textToColumns": { +"$ref": "TextToColumnsRequest", +"description": "Converts a column of text into many columns of text." +}, +"trimWhitespace": { +"$ref": "TrimWhitespaceRequest", +"description": "Trims cells of whitespace (such as spaces, tabs, or new lines)." +}, +"unmergeCells": { +"$ref": "UnmergeCellsRequest", +"description": "Unmerges merged cells." +}, +"updateBanding": { +"$ref": "UpdateBandingRequest", +"description": "Updates a banded range" +}, +"updateBorders": { +"$ref": "UpdateBordersRequest", +"description": "Updates the borders in a range of cells." +}, +"updateCells": { +"$ref": "UpdateCellsRequest", +"description": "Updates many cells at once." +}, +"updateChartSpec": { +"$ref": "UpdateChartSpecRequest", +"description": "Updates a chart's specifications." +}, +"updateConditionalFormatRule": { +"$ref": "UpdateConditionalFormatRuleRequest", +"description": "Updates an existing conditional format rule." +}, +"updateDataSource": { +"$ref": "UpdateDataSourceRequest", +"description": "Updates a data source." +}, +"updateDeveloperMetadata": { +"$ref": "UpdateDeveloperMetadataRequest", +"description": "Updates an existing developer metadata entry" +}, +"updateDimensionGroup": { +"$ref": "UpdateDimensionGroupRequest", +"description": "Updates the state of the specified group." +}, +"updateDimensionProperties": { +"$ref": "UpdateDimensionPropertiesRequest", +"description": "Updates dimensions' properties." +}, +"updateEmbeddedObjectBorder": { +"$ref": "UpdateEmbeddedObjectBorderRequest", +"description": "Updates an embedded object's border." +}, +"updateEmbeddedObjectPosition": { +"$ref": "UpdateEmbeddedObjectPositionRequest", +"description": "Updates an embedded object's (e.g. chart, image) position." +}, +"updateFilterView": { +"$ref": "UpdateFilterViewRequest", +"description": "Updates the properties of a filter view." +}, +"updateNamedRange": { +"$ref": "UpdateNamedRangeRequest", +"description": "Updates a named range." +}, +"updateProtectedRange": { +"$ref": "UpdateProtectedRangeRequest", +"description": "Updates a protected range." +}, +"updateSheetProperties": { +"$ref": "UpdateSheetPropertiesRequest", +"description": "Updates a sheet's properties." +}, +"updateSlicerSpec": { +"$ref": "UpdateSlicerSpecRequest", +"description": "Updates a slicer's specifications." +}, +"updateSpreadsheetProperties": { +"$ref": "UpdateSpreadsheetPropertiesRequest", +"description": "Updates the spreadsheet's properties." +} +}, +"type": "object" +}, +"Response": { +"description": "A single response from an update.", +"id": "Response", +"properties": { +"addBanding": { +"$ref": "AddBandingResponse", +"description": "A reply from adding a banded range." +}, +"addChart": { +"$ref": "AddChartResponse", +"description": "A reply from adding a chart." +}, +"addDataSource": { +"$ref": "AddDataSourceResponse", +"description": "A reply from adding a data source." +}, +"addDimensionGroup": { +"$ref": "AddDimensionGroupResponse", +"description": "A reply from adding a dimension group." +}, +"addFilterView": { +"$ref": "AddFilterViewResponse", +"description": "A reply from adding a filter view." +}, +"addNamedRange": { +"$ref": "AddNamedRangeResponse", +"description": "A reply from adding a named range." +}, +"addProtectedRange": { +"$ref": "AddProtectedRangeResponse", +"description": "A reply from adding a protected range." +}, +"addSheet": { +"$ref": "AddSheetResponse", +"description": "A reply from adding a sheet." +}, +"addSlicer": { +"$ref": "AddSlicerResponse", +"description": "A reply from adding a slicer." +}, +"createDeveloperMetadata": { +"$ref": "CreateDeveloperMetadataResponse", +"description": "A reply from creating a developer metadata entry." +}, +"deleteConditionalFormatRule": { +"$ref": "DeleteConditionalFormatRuleResponse", +"description": "A reply from deleting a conditional format rule." +}, +"deleteDeveloperMetadata": { +"$ref": "DeleteDeveloperMetadataResponse", +"description": "A reply from deleting a developer metadata entry." +}, +"deleteDimensionGroup": { +"$ref": "DeleteDimensionGroupResponse", +"description": "A reply from deleting a dimension group." +}, +"deleteDuplicates": { +"$ref": "DeleteDuplicatesResponse", +"description": "A reply from removing rows containing duplicate values." +}, +"duplicateFilterView": { +"$ref": "DuplicateFilterViewResponse", +"description": "A reply from duplicating a filter view." +}, +"duplicateSheet": { +"$ref": "DuplicateSheetResponse", +"description": "A reply from duplicating a sheet." +}, +"findReplace": { +"$ref": "FindReplaceResponse", +"description": "A reply from doing a find/replace." +}, +"refreshDataSource": { +"$ref": "RefreshDataSourceResponse", +"description": "A reply from refreshing data source objects." +}, +"trimWhitespace": { +"$ref": "TrimWhitespaceResponse", +"description": "A reply from trimming whitespace." +}, +"updateConditionalFormatRule": { +"$ref": "UpdateConditionalFormatRuleResponse", +"description": "A reply from updating a conditional format rule." +}, +"updateDataSource": { +"$ref": "UpdateDataSourceResponse", +"description": "A reply from updating a data source." +}, +"updateDeveloperMetadata": { +"$ref": "UpdateDeveloperMetadataResponse", +"description": "A reply from updating a developer metadata entry." +}, +"updateEmbeddedObjectPosition": { +"$ref": "UpdateEmbeddedObjectPositionResponse", +"description": "A reply from updating an embedded object's position." +} +}, +"type": "object" +}, +"RowData": { +"description": "Data about each cell in a row.", +"id": "RowData", +"properties": { +"values": { +"description": "The values in the row, one per column.", +"items": { +"$ref": "CellData" +}, +"type": "array" +} +}, +"type": "object" +}, +"ScorecardChartSpec": { +"description": "A scorecard chart. Scorecard charts are used to highlight key performance indicators, known as KPIs, on the spreadsheet. A scorecard chart can represent things like total sales, average cost, or a top selling item. You can specify a single data value, or aggregate over a range of data. Percentage or absolute difference from a baseline value can be highlighted, like changes over time.", +"id": "ScorecardChartSpec", +"properties": { +"aggregateType": { +"description": "The aggregation type for key and baseline chart data in scorecard chart. This field is not supported for data source charts. Use the ChartData.aggregateType field of the key_value_data or baseline_value_data instead for data source charts. This field is optional.", +"enum": [ +"CHART_AGGREGATE_TYPE_UNSPECIFIED", +"AVERAGE", +"COUNT", +"MAX", +"MEDIAN", +"MIN", +"SUM" +], +"enumDescriptions": [ +"Default value, do not use.", +"Average aggregate function.", +"Count aggregate function.", +"Maximum aggregate function.", +"Median aggregate function.", +"Minimum aggregate function.", +"Sum aggregate function." +], +"type": "string" +}, +"baselineValueData": { +"$ref": "ChartData", +"description": "The data for scorecard baseline value. This field is optional." +}, +"baselineValueFormat": { +"$ref": "BaselineValueFormat", +"description": "Formatting options for baseline value. This field is needed only if baseline_value_data is specified." +}, +"customFormatOptions": { +"$ref": "ChartCustomNumberFormatOptions", +"description": "Custom formatting options for numeric key/baseline values in scorecard chart. This field is used only when number_format_source is set to CUSTOM. This field is optional." +}, +"keyValueData": { +"$ref": "ChartData", +"description": "The data for scorecard key value." +}, +"keyValueFormat": { +"$ref": "KeyValueFormat", +"description": "Formatting options for key value." +}, +"numberFormatSource": { +"description": "The number format source used in the scorecard chart. This field is optional.", +"enum": [ +"CHART_NUMBER_FORMAT_SOURCE_UNDEFINED", +"FROM_DATA", +"CUSTOM" +], +"enumDescriptions": [ +"Default value, do not use.", +"Inherit number formatting from data.", +"Apply custom formatting as specified by ChartCustomNumberFormatOptions." +], +"type": "string" +}, +"scaleFactor": { +"description": "Value to scale scorecard key and baseline value. For example, a factor of 10 can be used to divide all values in the chart by 10. This field is optional.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"SearchDeveloperMetadataRequest": { +"description": "A request to retrieve all developer metadata matching the set of specified criteria.", +"id": "SearchDeveloperMetadataRequest", +"properties": { +"dataFilters": { +"description": "The data filters describing the criteria used to determine which DeveloperMetadata entries to return. DeveloperMetadata matching any of the specified filters are included in the response.", +"items": { +"$ref": "DataFilter" +}, +"type": "array" +} +}, +"type": "object" +}, +"SearchDeveloperMetadataResponse": { +"description": "A reply to a developer metadata search request.", +"id": "SearchDeveloperMetadataResponse", +"properties": { +"matchedDeveloperMetadata": { +"description": "The metadata matching the criteria of the search request.", +"items": { +"$ref": "MatchedDeveloperMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"SetBasicFilterRequest": { +"description": "Sets the basic filter associated with a sheet.", +"id": "SetBasicFilterRequest", +"properties": { +"filter": { +"$ref": "BasicFilter", +"description": "The filter to set." +} +}, +"type": "object" +}, +"SetDataValidationRequest": { +"description": "Sets a data validation rule to every cell in the range. To clear validation in a range, call this with no rule specified.", +"id": "SetDataValidationRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range the data validation rule should apply to." +}, +"rule": { +"$ref": "DataValidationRule", +"description": "The data validation rule to set on each cell in the range, or empty to clear the data validation in the range." +} +}, +"type": "object" +}, +"Sheet": { +"description": "A sheet in a spreadsheet.", +"id": "Sheet", +"properties": { +"bandedRanges": { +"description": "The banded (alternating colors) ranges on this sheet.", +"items": { +"$ref": "BandedRange" +}, +"type": "array" +}, +"basicFilter": { +"$ref": "BasicFilter", +"description": "The filter on this sheet, if any." +}, +"charts": { +"description": "The specifications of every chart on this sheet.", +"items": { +"$ref": "EmbeddedChart" +}, +"type": "array" +}, +"columnGroups": { +"description": "All column groups on this sheet, ordered by increasing range start index, then by group depth.", +"items": { +"$ref": "DimensionGroup" +}, +"type": "array" +}, +"conditionalFormats": { +"description": "The conditional format rules in this sheet.", +"items": { +"$ref": "ConditionalFormatRule" +}, +"type": "array" +}, +"data": { +"description": "Data in the grid, if this is a grid sheet. The number of GridData objects returned is dependent on the number of ranges requested on this sheet. For example, if this is representing `Sheet1`, and the spreadsheet was requested with ranges `Sheet1!A1:C10` and `Sheet1!D15:E20`, then the first GridData will have a startRow/startColumn of `0`, while the second one will have `startRow 14` (zero-based row 15), and `startColumn 3` (zero-based column D). For a DATA_SOURCE sheet, you can not request a specific range, the GridData contains all the values.", +"items": { +"$ref": "GridData" +}, +"type": "array" +}, +"developerMetadata": { +"description": "The developer metadata associated with a sheet.", +"items": { +"$ref": "DeveloperMetadata" +}, +"type": "array" +}, +"filterViews": { +"description": "The filter views in this sheet.", +"items": { +"$ref": "FilterView" +}, +"type": "array" +}, +"merges": { +"description": "The ranges that are merged together.", +"items": { +"$ref": "GridRange" +}, +"type": "array" +}, +"properties": { +"$ref": "SheetProperties", +"description": "The properties of the sheet." +}, +"protectedRanges": { +"description": "The protected ranges in this sheet.", +"items": { +"$ref": "ProtectedRange" +}, +"type": "array" +}, +"rowGroups": { +"description": "All row groups on this sheet, ordered by increasing range start index, then by group depth.", +"items": { +"$ref": "DimensionGroup" +}, +"type": "array" +}, +"slicers": { +"description": "The slicers on this sheet.", +"items": { +"$ref": "Slicer" +}, +"type": "array" +} +}, +"type": "object" +}, +"SheetProperties": { +"description": "Properties of a sheet.", +"id": "SheetProperties", +"properties": { +"dataSourceSheetProperties": { +"$ref": "DataSourceSheetProperties", +"description": "Output only. If present, the field contains DATA_SOURCE sheet specific properties.", +"readOnly": true +}, +"gridProperties": { +"$ref": "GridProperties", +"description": "Additional properties of the sheet if this sheet is a grid. (If the sheet is an object sheet, containing a chart or image, then this field will be absent.) When writing it is an error to set any grid properties on non-grid sheets. If this sheet is a DATA_SOURCE sheet, this field is output only but contains the properties that reflect how a data source sheet is rendered in the UI, e.g. row_count." +}, +"hidden": { +"description": "True if the sheet is hidden in the UI, false if it's visible.", +"type": "boolean" +}, +"index": { +"description": "The index of the sheet within the spreadsheet. When adding or updating sheet properties, if this field is excluded then the sheet is added or moved to the end of the sheet list. When updating sheet indices or inserting sheets, movement is considered in \"before the move\" indexes. For example, if there were three sheets (S1, S2, S3) in order to move S1 ahead of S2 the index would have to be set to 2. A sheet index update request is ignored if the requested index is identical to the sheets current index or if the requested new index is equal to the current sheet index + 1.", +"format": "int32", +"type": "integer" +}, +"rightToLeft": { +"description": "True if the sheet is an RTL sheet instead of an LTR sheet.", +"type": "boolean" +}, +"sheetId": { +"description": "The ID of the sheet. Must be non-negative. This field cannot be changed once set.", +"format": "int32", +"type": "integer" +}, +"sheetType": { +"description": "The type of sheet. Defaults to GRID. This field cannot be changed once set.", +"enum": [ +"SHEET_TYPE_UNSPECIFIED", +"GRID", +"OBJECT", +"DATA_SOURCE" +], +"enumDescriptions": [ +"Default value, do not use.", +"The sheet is a grid.", +"The sheet has no grid and instead has an object like a chart or image.", +"The sheet connects with an external DataSource and shows the preview of data." +], +"type": "string" +}, +"tabColor": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the tab in the UI. Deprecated: Use tab_color_style." +}, +"tabColorStyle": { +"$ref": "ColorStyle", +"description": "The color of the tab in the UI. If tab_color is also set, this field takes precedence." +}, +"title": { +"description": "The name of the sheet.", +"type": "string" +} +}, +"type": "object" +}, +"Slicer": { +"description": "A slicer in a sheet.", +"id": "Slicer", +"properties": { +"position": { +"$ref": "EmbeddedObjectPosition", +"description": "The position of the slicer. Note that slicer can be positioned only on existing sheet. Also, width and height of slicer can be automatically adjusted to keep it within permitted limits." +}, +"slicerId": { +"description": "The ID of the slicer.", +"format": "int32", +"type": "integer" +}, +"spec": { +"$ref": "SlicerSpec", +"description": "The specification of the slicer." +} +}, +"type": "object" +}, +"SlicerSpec": { +"description": "The specifications of a slicer.", +"id": "SlicerSpec", +"properties": { +"applyToPivotTables": { +"description": "True if the filter should apply to pivot tables. If not set, default to `True`.", +"type": "boolean" +}, +"backgroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color of the slicer. Deprecated: Use background_color_style." +}, +"backgroundColorStyle": { +"$ref": "ColorStyle", +"description": "The background color of the slicer. If background_color is also set, this field takes precedence." +}, +"columnIndex": { +"description": "The zero-based column index in the data table on which the filter is applied to.", +"format": "int32", +"type": "integer" +}, +"dataRange": { +"$ref": "GridRange", +"description": "The data range of the slicer." +}, +"filterCriteria": { +"$ref": "FilterCriteria", +"description": "The filtering criteria of the slicer." +}, +"horizontalAlignment": { +"description": "The horizontal alignment of title in the slicer. If unspecified, defaults to `LEFT`", +"enum": [ +"HORIZONTAL_ALIGN_UNSPECIFIED", +"LEFT", +"CENTER", +"RIGHT" +], +"enumDescriptions": [ +"The horizontal alignment is not specified. Do not use this.", +"The text is explicitly aligned to the left of the cell.", +"The text is explicitly aligned to the center of the cell.", +"The text is explicitly aligned to the right of the cell." +], +"type": "string" +}, +"textFormat": { +"$ref": "TextFormat", +"description": "The text format of title in the slicer. The link field is not supported." +}, +"title": { +"description": "The title of the slicer.", +"type": "string" +} +}, +"type": "object" +}, +"SortRangeRequest": { +"description": "Sorts data in rows based on a sort order per column.", +"id": "SortRangeRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range to sort." +}, +"sortSpecs": { +"description": "The sort order per column. Later specifications are used when values are equal in the earlier specifications.", +"items": { +"$ref": "SortSpec" +}, +"type": "array" +} +}, +"type": "object" +}, +"SortSpec": { +"description": "A sort order associated with a specific column or row.", +"id": "SortSpec", +"properties": { +"backgroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color. Deprecated: Use background_color_style." +}, +"backgroundColorStyle": { +"$ref": "ColorStyle", +"description": "The background fill color to sort by; cells with this fill color are sorted to the top. Mutually exclusive with foreground_color, and must be an RGB-type color. If background_color is also set, this field takes precedence." +}, +"dataSourceColumnReference": { +"$ref": "DataSourceColumnReference", +"description": "Reference to a data source column." +}, +"dimensionIndex": { +"description": "The dimension the sort should be applied to.", +"format": "int32", +"type": "integer" +}, +"foregroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color. Deprecated: Use foreground_color_style." +}, +"foregroundColorStyle": { +"$ref": "ColorStyle", +"description": "The foreground color to sort by; cells with this foreground color are sorted to the top. Mutually exclusive with background_color, and must be an RGB-type color. If foreground_color is also set, this field takes precedence." +}, +"sortOrder": { +"description": "The order data should be sorted.", +"enum": [ +"SORT_ORDER_UNSPECIFIED", +"ASCENDING", +"DESCENDING" +], +"enumDescriptions": [ +"Default value, do not use this.", +"Sort ascending.", +"Sort descending." +], +"type": "string" +} +}, +"type": "object" +}, +"SourceAndDestination": { +"description": "A combination of a source range and how to extend that source.", +"id": "SourceAndDestination", +"properties": { +"dimension": { +"description": "The dimension that data should be filled into.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +}, +"fillLength": { +"description": "The number of rows or columns that data should be filled into. Positive numbers expand beyond the last row or last column of the source. Negative numbers expand before the first row or first column of the source.", +"format": "int32", +"type": "integer" +}, +"source": { +"$ref": "GridRange", +"description": "The location of the data to use as the source of the autofill." +} +}, +"type": "object" +}, +"Spreadsheet": { +"description": "Resource that represents a spreadsheet.", +"id": "Spreadsheet", +"properties": { +"dataSourceSchedules": { +"description": "Output only. A list of data source refresh schedules.", +"items": { +"$ref": "DataSourceRefreshSchedule" +}, +"readOnly": true, +"type": "array" +}, +"dataSources": { +"description": "A list of external data sources connected with the spreadsheet.", +"items": { +"$ref": "DataSource" +}, +"type": "array" +}, +"developerMetadata": { +"description": "The developer metadata associated with a spreadsheet.", +"items": { +"$ref": "DeveloperMetadata" +}, +"type": "array" +}, +"namedRanges": { +"description": "The named ranges defined in a spreadsheet.", +"items": { +"$ref": "NamedRange" +}, +"type": "array" +}, +"properties": { +"$ref": "SpreadsheetProperties", +"description": "Overall properties of a spreadsheet." +}, +"sheets": { +"description": "The sheets that are part of a spreadsheet.", +"items": { +"$ref": "Sheet" +}, +"type": "array" +}, +"spreadsheetId": { +"description": "The ID of the spreadsheet. This field is read-only.", +"type": "string" +}, +"spreadsheetUrl": { +"description": "The url of the spreadsheet. This field is read-only.", +"type": "string" +} +}, +"type": "object" +}, +"SpreadsheetProperties": { +"description": "Properties of a spreadsheet.", +"id": "SpreadsheetProperties", +"properties": { +"autoRecalc": { +"description": "The amount of time to wait before volatile functions are recalculated.", +"enum": [ +"RECALCULATION_INTERVAL_UNSPECIFIED", +"ON_CHANGE", +"MINUTE", +"HOUR" +], +"enumDescriptions": [ +"Default value. This value must not be used.", +"Volatile functions are updated on every change.", +"Volatile functions are updated on every change and every minute.", +"Volatile functions are updated on every change and hourly." +], +"type": "string" +}, +"defaultFormat": { +"$ref": "CellFormat", +"description": "The default format of all cells in the spreadsheet. CellData.effectiveFormat will not be set if the cell's format is equal to this default format. This field is read-only." +}, +"importFunctionsExternalUrlAccessAllowed": { +"description": "Whether to allow external URL access for image and import functions. Read only when true. When false, you can set to true.", +"type": "boolean" +}, +"iterativeCalculationSettings": { +"$ref": "IterativeCalculationSettings", +"description": "Determines whether and how circular references are resolved with iterative calculation. Absence of this field means that circular references result in calculation errors." +}, +"locale": { +"description": "The locale of the spreadsheet in one of the following formats: * an ISO 639-1 language code such as `en` * an ISO 639-2 language code such as `fil`, if no 639-1 code exists * a combination of the ISO language code and country code, such as `en_US` Note: when updating this field, not all locales/languages are supported.", +"type": "string" +}, +"spreadsheetTheme": { +"$ref": "SpreadsheetTheme", +"description": "Theme applied to the spreadsheet." +}, +"timeZone": { +"description": "The time zone of the spreadsheet, in CLDR format such as `America/New_York`. If the time zone isn't recognized, this may be a custom time zone such as `GMT-07:00`.", +"type": "string" +}, +"title": { +"description": "The title of the spreadsheet.", +"type": "string" +} +}, +"type": "object" +}, +"SpreadsheetTheme": { +"description": "Represents spreadsheet theme", +"id": "SpreadsheetTheme", +"properties": { +"primaryFontFamily": { +"description": "Name of the primary font family.", +"type": "string" +}, +"themeColors": { +"description": "The spreadsheet theme color pairs. To update you must provide all theme color pairs.", +"items": { +"$ref": "ThemeColorPair" +}, +"type": "array" +} +}, +"type": "object" +}, +"TextFormat": { +"description": "The format of a run of text in a cell. Absent values indicate that the field isn't specified.", +"id": "TextFormat", +"properties": { +"bold": { +"description": "True if the text is bold.", +"type": "boolean" +}, +"fontFamily": { +"description": "The font family.", +"type": "string" +}, +"fontSize": { +"description": "The size of the font.", +"format": "int32", +"type": "integer" +}, +"foregroundColor": { +"$ref": "Color", +"deprecated": true, +"description": "The foreground color of the text. Deprecated: Use foreground_color_style." +}, +"foregroundColorStyle": { +"$ref": "ColorStyle", +"description": "The foreground color of the text. If foreground_color is also set, this field takes precedence." +}, +"italic": { +"description": "True if the text is italicized.", +"type": "boolean" +}, +"link": { +"$ref": "Link", +"description": "The link destination of the text, if any. Setting the link field in a TextFormatRun will clear the cell's existing links or a cell-level link set in the same request. When a link is set, the text foreground color will be set to the default link color and the text will be underlined. If these fields are modified in the same request, those values will be used instead of the link defaults." +}, +"strikethrough": { +"description": "True if the text has a strikethrough.", +"type": "boolean" +}, +"underline": { +"description": "True if the text is underlined.", +"type": "boolean" +} +}, +"type": "object" +}, +"TextFormatRun": { +"description": "A run of a text format. The format of this run continues until the start index of the next run. When updating, all fields must be set.", +"id": "TextFormatRun", +"properties": { +"format": { +"$ref": "TextFormat", +"description": "The format of this run. Absent values inherit the cell's format." +}, +"startIndex": { +"description": "The zero-based character index where this run starts, in UTF-16 code units.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TextPosition": { +"description": "Position settings for text.", +"id": "TextPosition", +"properties": { +"horizontalAlignment": { +"description": "Horizontal alignment setting for the piece of text.", +"enum": [ +"HORIZONTAL_ALIGN_UNSPECIFIED", +"LEFT", +"CENTER", +"RIGHT" +], +"enumDescriptions": [ +"The horizontal alignment is not specified. Do not use this.", +"The text is explicitly aligned to the left of the cell.", +"The text is explicitly aligned to the center of the cell.", +"The text is explicitly aligned to the right of the cell." +], +"type": "string" +} +}, +"type": "object" +}, +"TextRotation": { +"description": "The rotation applied to text in a cell.", +"id": "TextRotation", +"properties": { +"angle": { +"description": "The angle between the standard orientation and the desired orientation. Measured in degrees. Valid values are between -90 and 90. Positive angles are angled upwards, negative are angled downwards. Note: For LTR text direction positive angles are in the counterclockwise direction, whereas for RTL they are in the clockwise direction", +"format": "int32", +"type": "integer" +}, +"vertical": { +"description": "If true, text reads top to bottom, but the orientation of individual characters is unchanged. For example: | V | | e | | r | | t | | i | | c | | a | | l |", +"type": "boolean" +} +}, +"type": "object" +}, +"TextToColumnsRequest": { +"description": "Splits a column of text into multiple columns, based on a delimiter in each cell.", +"id": "TextToColumnsRequest", +"properties": { +"delimiter": { +"description": "The delimiter to use. Used only if delimiterType is CUSTOM.", +"type": "string" +}, +"delimiterType": { +"description": "The delimiter type to use.", +"enum": [ +"DELIMITER_TYPE_UNSPECIFIED", +"COMMA", +"SEMICOLON", +"PERIOD", +"SPACE", +"CUSTOM", +"AUTODETECT" +], +"enumDescriptions": [ +"Default value. This value must not be used.", +"\",\"", +"\";\"", +"\".\"", +"\" \"", +"A custom value as defined in delimiter.", +"Automatically detect columns." +], +"type": "string" +}, +"source": { +"$ref": "GridRange", +"description": "The source data range. This must span exactly one column." +} +}, +"type": "object" +}, +"ThemeColorPair": { +"description": "A pair mapping a spreadsheet theme color type to the concrete color it represents.", +"id": "ThemeColorPair", +"properties": { +"color": { +"$ref": "ColorStyle", +"description": "The concrete color corresponding to the theme color type." +}, +"colorType": { +"description": "The type of the spreadsheet theme color.", +"enum": [ +"THEME_COLOR_TYPE_UNSPECIFIED", +"TEXT", +"BACKGROUND", +"ACCENT1", +"ACCENT2", +"ACCENT3", +"ACCENT4", +"ACCENT5", +"ACCENT6", +"LINK" +], +"enumDescriptions": [ +"Unspecified theme color", +"Represents the primary text color", +"Represents the primary background color", +"Represents the first accent color", +"Represents the second accent color", +"Represents the third accent color", +"Represents the fourth accent color", +"Represents the fifth accent color", +"Represents the sixth accent color", +"Represents the color to use for hyperlinks" +], +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TreemapChartColorScale": { +"description": "A color scale for a treemap chart.", +"id": "TreemapChartColorScale", +"properties": { +"maxValueColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. Deprecated: Use max_value_color_style." +}, +"maxValueColorStyle": { +"$ref": "ColorStyle", +"description": "The background color for cells with a color value greater than or equal to maxValue. Defaults to #109618 if not specified. If max_value_color is also set, this field takes precedence." +}, +"midValueColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. Deprecated: Use mid_value_color_style." +}, +"midValueColorStyle": { +"$ref": "ColorStyle", +"description": "The background color for cells with a color value at the midpoint between minValue and maxValue. Defaults to #efe6dc if not specified. If mid_value_color is also set, this field takes precedence." +}, +"minValueColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. Deprecated: Use min_value_color_style." +}, +"minValueColorStyle": { +"$ref": "ColorStyle", +"description": "The background color for cells with a color value less than or equal to minValue. Defaults to #dc3912 if not specified. If min_value_color is also set, this field takes precedence." +}, +"noDataColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. Deprecated: Use no_data_color_style." +}, +"noDataColorStyle": { +"$ref": "ColorStyle", +"description": "The background color for cells that have no color data associated with them. Defaults to #000000 if not specified. If no_data_color is also set, this field takes precedence." +} +}, +"type": "object" +}, +"TreemapChartSpec": { +"description": "A Treemap chart.", +"id": "TreemapChartSpec", +"properties": { +"colorData": { +"$ref": "ChartData", +"description": "The data that determines the background color of each treemap data cell. This field is optional. If not specified, size_data is used to determine background colors. If specified, the data is expected to be numeric. color_scale will determine how the values in this data map to data cell background colors." +}, +"colorScale": { +"$ref": "TreemapChartColorScale", +"description": "The color scale for data cells in the treemap chart. Data cells are assigned colors based on their color values. These color values come from color_data, or from size_data if color_data is not specified. Cells with color values less than or equal to min_value will have minValueColor as their background color. Cells with color values greater than or equal to max_value will have maxValueColor as their background color. Cells with color values between min_value and max_value will have background colors on a gradient between minValueColor and maxValueColor, the midpoint of the gradient being midValueColor. Cells with missing or non-numeric color values will have noDataColor as their background color." +}, +"headerColor": { +"$ref": "Color", +"deprecated": true, +"description": "The background color for header cells. Deprecated: Use header_color_style." +}, +"headerColorStyle": { +"$ref": "ColorStyle", +"description": "The background color for header cells. If header_color is also set, this field takes precedence." +}, +"hideTooltips": { +"description": "True to hide tooltips.", +"type": "boolean" +}, +"hintedLevels": { +"description": "The number of additional data levels beyond the labeled levels to be shown on the treemap chart. These levels are not interactive and are shown without their labels. Defaults to 0 if not specified.", +"format": "int32", +"type": "integer" +}, +"labels": { +"$ref": "ChartData", +"description": "The data that contains the treemap cell labels." +}, +"levels": { +"description": "The number of data levels to show on the treemap chart. These levels are interactive and are shown with their labels. Defaults to 2 if not specified.", +"format": "int32", +"type": "integer" +}, +"maxValue": { +"description": "The maximum possible data value. Cells with values greater than this will have the same color as cells with this value. If not specified, defaults to the actual maximum value from color_data, or the maximum value from size_data if color_data is not specified.", +"format": "double", +"type": "number" +}, +"minValue": { +"description": "The minimum possible data value. Cells with values less than this will have the same color as cells with this value. If not specified, defaults to the actual minimum value from color_data, or the minimum value from size_data if color_data is not specified.", +"format": "double", +"type": "number" +}, +"parentLabels": { +"$ref": "ChartData", +"description": "The data the contains the treemap cells' parent labels." +}, +"sizeData": { +"$ref": "ChartData", +"description": "The data that determines the size of each treemap data cell. This data is expected to be numeric. The cells corresponding to non-numeric or missing data will not be rendered. If color_data is not specified, this data is used to determine data cell background colors as well." +}, +"textFormat": { +"$ref": "TextFormat", +"description": "The text format for all labels on the chart. The link field is not supported." +} +}, +"type": "object" +}, +"TrimWhitespaceRequest": { +"description": "Trims the whitespace (such as spaces, tabs, or new lines) in every cell in the specified range. This request removes all whitespace from the start and end of each cell's text, and reduces any subsequence of remaining whitespace characters to a single space. If the resulting trimmed text starts with a '+' or '=' character, the text remains as a string value and isn't interpreted as a formula.", +"id": "TrimWhitespaceRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range whose cells to trim." +} +}, +"type": "object" +}, +"TrimWhitespaceResponse": { +"description": "The result of trimming whitespace in cells.", +"id": "TrimWhitespaceResponse", +"properties": { +"cellsChangedCount": { +"description": "The number of cells that were trimmed of whitespace.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UnmergeCellsRequest": { +"description": "Unmerges cells in the given range.", +"id": "UnmergeCellsRequest", +"properties": { +"range": { +"$ref": "GridRange", +"description": "The range within which all cells should be unmerged. If the range spans multiple merges, all will be unmerged. The range must not partially span any merge." +} +}, +"type": "object" +}, +"UpdateBandingRequest": { +"description": "Updates properties of the supplied banded range.", +"id": "UpdateBandingRequest", +"properties": { +"bandedRange": { +"$ref": "BandedRange", +"description": "The banded range to update with the new properties." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `bandedRange` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateBordersRequest": { +"description": "Updates the borders of a range. If a field is not set in the request, that means the border remains as-is. For example, with two subsequent UpdateBordersRequest: 1. range: A1:A5 `{ top: RED, bottom: WHITE }` 2. range: A1:A5 `{ left: BLUE }` That would result in A1:A5 having a borders of `{ top: RED, bottom: WHITE, left: BLUE }`. If you want to clear a border, explicitly set the style to NONE.", +"id": "UpdateBordersRequest", +"properties": { +"bottom": { +"$ref": "Border", +"description": "The border to put at the bottom of the range." +}, +"innerHorizontal": { +"$ref": "Border", +"description": "The horizontal border to put within the range." +}, +"innerVertical": { +"$ref": "Border", +"description": "The vertical border to put within the range." +}, +"left": { +"$ref": "Border", +"description": "The border to put at the left of the range." +}, +"range": { +"$ref": "GridRange", +"description": "The range whose borders should be updated." +}, +"right": { +"$ref": "Border", +"description": "The border to put at the right of the range." +}, +"top": { +"$ref": "Border", +"description": "The border to put at the top of the range." +} +}, +"type": "object" +}, +"UpdateCellsRequest": { +"description": "Updates all cells in a range with new data.", +"id": "UpdateCellsRequest", +"properties": { +"fields": { +"description": "The fields of CellData that should be updated. At least one field must be specified. The root is the CellData; 'row.values.' should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"range": { +"$ref": "GridRange", +"description": "The range to write data to. If the data in rows does not cover the entire requested range, the fields matching those set in fields will be cleared." +}, +"rows": { +"description": "The data to write.", +"items": { +"$ref": "RowData" +}, +"type": "array" +}, +"start": { +"$ref": "GridCoordinate", +"description": "The coordinate to start writing data at. Any number of rows and columns (including a different number of columns per row) may be written." +} +}, +"type": "object" +}, +"UpdateChartSpecRequest": { +"description": "Updates a chart's specifications. (This does not move or resize a chart. To move or resize a chart, use UpdateEmbeddedObjectPositionRequest.)", +"id": "UpdateChartSpecRequest", +"properties": { +"chartId": { +"description": "The ID of the chart to update.", +"format": "int32", +"type": "integer" +}, +"spec": { +"$ref": "ChartSpec", +"description": "The specification to apply to the chart." +} +}, +"type": "object" +}, +"UpdateConditionalFormatRuleRequest": { +"description": "Updates a conditional format rule at the given index, or moves a conditional format rule to another index.", +"id": "UpdateConditionalFormatRuleRequest", +"properties": { +"index": { +"description": "The zero-based index of the rule that should be replaced or moved.", +"format": "int32", +"type": "integer" +}, +"newIndex": { +"description": "The zero-based new index the rule should end up at.", +"format": "int32", +"type": "integer" +}, +"rule": { +"$ref": "ConditionalFormatRule", +"description": "The rule that should replace the rule at the given index." +}, +"sheetId": { +"description": "The sheet of the rule to move. Required if new_index is set, unused otherwise.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UpdateConditionalFormatRuleResponse": { +"description": "The result of updating a conditional format rule.", +"id": "UpdateConditionalFormatRuleResponse", +"properties": { +"newIndex": { +"description": "The index of the new rule.", +"format": "int32", +"type": "integer" +}, +"newRule": { +"$ref": "ConditionalFormatRule", +"description": "The new rule that replaced the old rule (if replacing), or the rule that was moved (if moved)" +}, +"oldIndex": { +"description": "The old index of the rule. Not set if a rule was replaced (because it is the same as new_index).", +"format": "int32", +"type": "integer" +}, +"oldRule": { +"$ref": "ConditionalFormatRule", +"description": "The old (deleted) rule. Not set if a rule was moved (because it is the same as new_rule)." +} +}, +"type": "object" +}, +"UpdateDataSourceRequest": { +"description": "Updates a data source. After the data source is updated successfully, an execution is triggered to refresh the associated DATA_SOURCE sheet to read data from the updated data source. The request requires an additional `bigquery.readonly` OAuth scope.", +"id": "UpdateDataSourceRequest", +"properties": { +"dataSource": { +"$ref": "DataSource", +"description": "The data source to update." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `dataSource` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateDataSourceResponse": { +"description": "The response from updating data source.", +"id": "UpdateDataSourceResponse", +"properties": { +"dataExecutionStatus": { +"$ref": "DataExecutionStatus", +"description": "The data execution status." +}, +"dataSource": { +"$ref": "DataSource", +"description": "The updated data source." +} +}, +"type": "object" +}, +"UpdateDeveloperMetadataRequest": { +"description": "A request to update properties of developer metadata. Updates the properties of the developer metadata selected by the filters to the values provided in the DeveloperMetadata resource. Callers must specify the properties they wish to update in the fields parameter, as well as specify at least one DataFilter matching the metadata they wish to update.", +"id": "UpdateDeveloperMetadataRequest", +"properties": { +"dataFilters": { +"description": "The filters matching the developer metadata entries to update.", +"items": { +"$ref": "DataFilter" +}, +"type": "array" +}, +"developerMetadata": { +"$ref": "DeveloperMetadata", +"description": "The value that all metadata matched by the data filters will be updated to." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `developerMetadata` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateDeveloperMetadataResponse": { +"description": "The response from updating developer metadata.", +"id": "UpdateDeveloperMetadataResponse", +"properties": { +"developerMetadata": { +"description": "The updated developer metadata.", +"items": { +"$ref": "DeveloperMetadata" +}, +"type": "array" +} +}, +"type": "object" +}, +"UpdateDimensionGroupRequest": { +"description": "Updates the state of the specified group.", +"id": "UpdateDimensionGroupRequest", +"properties": { +"dimensionGroup": { +"$ref": "DimensionGroup", +"description": "The group whose state should be updated. The range and depth of the group should specify a valid group on the sheet, and all other fields updated." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `dimensionGroup` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateDimensionPropertiesRequest": { +"description": "Updates properties of dimensions within the specified range.", +"id": "UpdateDimensionPropertiesRequest", +"properties": { +"dataSourceSheetRange": { +"$ref": "DataSourceSheetDimensionRange", +"description": "The columns on a data source sheet to update." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"properties": { +"$ref": "DimensionProperties", +"description": "Properties to update." +}, +"range": { +"$ref": "DimensionRange", +"description": "The rows or columns to update." +} +}, +"type": "object" +}, +"UpdateEmbeddedObjectBorderRequest": { +"description": "Updates an embedded object's border property.", +"id": "UpdateEmbeddedObjectBorderRequest", +"properties": { +"border": { +"$ref": "EmbeddedObjectBorder", +"description": "The border that applies to the embedded object." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `border` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The ID of the embedded object to update.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UpdateEmbeddedObjectPositionRequest": { +"description": "Update an embedded object's position (such as a moving or resizing a chart or image).", +"id": "UpdateEmbeddedObjectPositionRequest", +"properties": { +"fields": { +"description": "The fields of OverlayPosition that should be updated when setting a new position. Used only if newPosition.overlayPosition is set, in which case at least one field must be specified. The root `newPosition.overlayPosition` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"newPosition": { +"$ref": "EmbeddedObjectPosition", +"description": "An explicit position to move the embedded object to. If newPosition.sheetId is set, a new sheet with that ID will be created. If newPosition.newSheet is set to true, a new sheet will be created with an ID that will be chosen for you." +}, +"objectId": { +"description": "The ID of the object to moved.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UpdateEmbeddedObjectPositionResponse": { +"description": "The result of updating an embedded object's position.", +"id": "UpdateEmbeddedObjectPositionResponse", +"properties": { +"position": { +"$ref": "EmbeddedObjectPosition", +"description": "The new position of the embedded object." +} +}, +"type": "object" +}, +"UpdateFilterViewRequest": { +"description": "Updates properties of the filter view.", +"id": "UpdateFilterViewRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `filter` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"filter": { +"$ref": "FilterView", +"description": "The new properties of the filter view." +} +}, +"type": "object" +}, +"UpdateNamedRangeRequest": { +"description": "Updates properties of the named range with the specified namedRangeId.", +"id": "UpdateNamedRangeRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `namedRange` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"namedRange": { +"$ref": "NamedRange", +"description": "The named range to update with the new properties." +} +}, +"type": "object" +}, +"UpdateProtectedRangeRequest": { +"description": "Updates an existing protected range with the specified protectedRangeId.", +"id": "UpdateProtectedRangeRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `protectedRange` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"protectedRange": { +"$ref": "ProtectedRange", +"description": "The protected range to update with the new properties." +} +}, +"type": "object" +}, +"UpdateSheetPropertiesRequest": { +"description": "Updates properties of the sheet with the specified sheetId.", +"id": "UpdateSheetPropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `properties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"properties": { +"$ref": "SheetProperties", +"description": "The properties to update." +} +}, +"type": "object" +}, +"UpdateSlicerSpecRequest": { +"description": "Updates a slicer's specifications. (This does not move or resize a slicer. To move or resize a slicer use UpdateEmbeddedObjectPositionRequest.", +"id": "UpdateSlicerSpecRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `SlicerSpec` is implied and should not be specified. A single \"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"slicerId": { +"description": "The id of the slicer to update.", +"format": "int32", +"type": "integer" +}, +"spec": { +"$ref": "SlicerSpec", +"description": "The specification to apply to the slicer." +} +}, +"type": "object" +}, +"UpdateSpreadsheetPropertiesRequest": { +"description": "Updates properties of a spreadsheet.", +"id": "UpdateSpreadsheetPropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root 'properties' is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field.", +"format": "google-fieldmask", +"type": "string" +}, +"properties": { +"$ref": "SpreadsheetProperties", +"description": "The properties to update." +} +}, +"type": "object" +}, +"UpdateValuesByDataFilterResponse": { +"description": "The response when updating a range of values by a data filter in a spreadsheet.", +"id": "UpdateValuesByDataFilterResponse", +"properties": { +"dataFilter": { +"$ref": "DataFilter", +"description": "The data filter that selected the range that was updated." +}, +"updatedCells": { +"description": "The number of cells updated.", +"format": "int32", +"type": "integer" +}, +"updatedColumns": { +"description": "The number of columns where at least one cell in the column was updated.", +"format": "int32", +"type": "integer" +}, +"updatedData": { +"$ref": "ValueRange", +"description": "The values of the cells in the range matched by the dataFilter after all updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`." +}, +"updatedRange": { +"description": "The range (in [A1 notation](/sheets/api/guides/concepts#cell)) that updates were applied to.", +"type": "string" +}, +"updatedRows": { +"description": "The number of rows where at least one cell in the row was updated.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UpdateValuesResponse": { +"description": "The response when updating a range of values in a spreadsheet.", +"id": "UpdateValuesResponse", +"properties": { +"spreadsheetId": { +"description": "The spreadsheet the updates were applied to.", +"type": "string" +}, +"updatedCells": { +"description": "The number of cells updated.", +"format": "int32", +"type": "integer" +}, +"updatedColumns": { +"description": "The number of columns where at least one cell in the column was updated.", +"format": "int32", +"type": "integer" +}, +"updatedData": { +"$ref": "ValueRange", +"description": "The values of the cells after updates were applied. This is only included if the request's `includeValuesInResponse` field was `true`." +}, +"updatedRange": { +"description": "The range (in A1 notation) that updates were applied to.", +"type": "string" +}, +"updatedRows": { +"description": "The number of rows where at least one cell in the row was updated.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ValueRange": { +"description": "Data within a range of the spreadsheet.", +"id": "ValueRange", +"properties": { +"majorDimension": { +"description": "The major dimension of the values. For output, if the spreadsheet data is: `A1=1,B1=2,A2=3,B2=4`, then requesting `range=A1:B2,majorDimension=ROWS` will return `[[1,2],[3,4]]`, whereas requesting `range=A1:B2,majorDimension=COLUMNS` will return `[[1,3],[2,4]]`. For input, with `range=A1:B2,majorDimension=ROWS` then `[[1,2],[3,4]]` will set `A1=1,B1=2,A2=3,B2=4`. With `range=A1:B2,majorDimension=COLUMNS` then `[[1,2],[3,4]]` will set `A1=1,B1=3,A2=2,B2=4`. When writing, if this field is not set, it defaults to ROWS.", +"enum": [ +"DIMENSION_UNSPECIFIED", +"ROWS", +"COLUMNS" +], +"enumDescriptions": [ +"The default value, do not use.", +"Operates on the rows of a sheet.", +"Operates on the columns of a sheet." +], +"type": "string" +}, +"range": { +"description": "The range the values cover, in [A1 notation](/sheets/api/guides/concepts#cell). For output, this range indicates the entire requested range, even though the values will exclude trailing rows and columns. When appending values, this field represents the range to search for a table, after which values will be appended.", +"type": "string" +}, +"values": { +"description": "The data that was read or to be written. This is an array of arrays, the outer array representing all the data and each inner array representing a major dimension. Each item in the inner array corresponds with one cell. For output, empty trailing rows and columns will not be included. For input, supported value types are: bool, string, and double. Null values will be skipped. To set a cell to an empty value, set the string value to an empty string.", +"items": { +"items": { +"type": "any" +}, +"type": "array" +}, +"type": "array" +} +}, +"type": "object" +}, +"WaterfallChartColumnStyle": { +"description": "Styles for a waterfall chart column.", +"id": "WaterfallChartColumnStyle", +"properties": { +"color": { +"$ref": "Color", +"deprecated": true, +"description": "The color of the column. Deprecated: Use color_style." +}, +"colorStyle": { +"$ref": "ColorStyle", +"description": "The color of the column. If color is also set, this field takes precedence." +}, +"label": { +"description": "The label of the column's legend.", +"type": "string" +} +}, +"type": "object" +}, +"WaterfallChartCustomSubtotal": { +"description": "A custom subtotal column for a waterfall chart series.", +"id": "WaterfallChartCustomSubtotal", +"properties": { +"dataIsSubtotal": { +"description": "True if the data point at subtotal_index is the subtotal. If false, the subtotal will be computed and appear after the data point.", +"type": "boolean" +}, +"label": { +"description": "A label for the subtotal column.", +"type": "string" +}, +"subtotalIndex": { +"description": "The zero-based index of a data point within the series. If data_is_subtotal is true, the data point at this index is the subtotal. Otherwise, the subtotal appears after the data point with this index. A series can have multiple subtotals at arbitrary indices, but subtotals do not affect the indices of the data points. For example, if a series has three data points, their indices will always be 0, 1, and 2, regardless of how many subtotals exist on the series or what data points they are associated with.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"WaterfallChartDomain": { +"description": "The domain of a waterfall chart.", +"id": "WaterfallChartDomain", +"properties": { +"data": { +"$ref": "ChartData", +"description": "The data of the WaterfallChartDomain." +}, +"reversed": { +"description": "True to reverse the order of the domain values (horizontal axis).", +"type": "boolean" +} +}, +"type": "object" +}, +"WaterfallChartSeries": { +"description": "A single series of data for a waterfall chart.", +"id": "WaterfallChartSeries", +"properties": { +"customSubtotals": { +"description": "Custom subtotal columns appearing in this series. The order in which subtotals are defined is not significant. Only one subtotal may be defined for each data point.", +"items": { +"$ref": "WaterfallChartCustomSubtotal" +}, +"type": "array" +}, +"data": { +"$ref": "ChartData", +"description": "The data being visualized in this series." +}, +"dataLabel": { +"$ref": "DataLabel", +"description": "Information about the data labels for this series." +}, +"hideTrailingSubtotal": { +"description": "True to hide the subtotal column from the end of the series. By default, a subtotal column will appear at the end of each series. Setting this field to true will hide that subtotal column for this series.", +"type": "boolean" +}, +"negativeColumnsStyle": { +"$ref": "WaterfallChartColumnStyle", +"description": "Styles for all columns in this series with negative values." +}, +"positiveColumnsStyle": { +"$ref": "WaterfallChartColumnStyle", +"description": "Styles for all columns in this series with positive values." +}, +"subtotalColumnsStyle": { +"$ref": "WaterfallChartColumnStyle", +"description": "Styles for all subtotal columns in this series." +} +}, +"type": "object" +}, +"WaterfallChartSpec": { +"description": "A waterfall chart.", +"id": "WaterfallChartSpec", +"properties": { +"connectorLineStyle": { +"$ref": "LineStyle", +"description": "The line style for the connector lines." +}, +"domain": { +"$ref": "WaterfallChartDomain", +"description": "The domain data (horizontal axis) for the waterfall chart." +}, +"firstValueIsTotal": { +"description": "True to interpret the first value as a total.", +"type": "boolean" +}, +"hideConnectorLines": { +"description": "True to hide connector lines between columns.", +"type": "boolean" +}, +"series": { +"description": "The data this waterfall chart is visualizing.", +"items": { +"$ref": "WaterfallChartSeries" +}, +"type": "array" +}, +"stackedType": { +"description": "The stacked type.", +"enum": [ +"WATERFALL_STACKED_TYPE_UNSPECIFIED", +"STACKED", +"SEQUENTIAL" +], +"enumDescriptions": [ +"Default value, do not use.", +"Values corresponding to the same domain (horizontal axis) value will be stacked vertically.", +"Series will spread out along the horizontal axis." +], +"type": "string" +}, +"totalDataLabel": { +"$ref": "DataLabel", +"description": "Controls whether to display additional data labels on stacked charts which sum the total value of all stacked values at each value along the domain axis. stacked_type must be STACKED and neither CUSTOM nor placement can be set on the total_data_label." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Sheets API", +"version": "v4", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/siteVerification.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/siteVerification.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..298e19ec5b29836966991cde231fbb35785610da --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/siteVerification.v1.json @@ -0,0 +1,321 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/siteverification": { +"description": "Manage the list of sites and domains you control" +}, +"https://www.googleapis.com/auth/siteverification.verify_only": { +"description": "Manage your new site verifications with Google" +} +} +} +}, +"basePath": "/siteVerification/v1/", +"baseUrl": "https://www.googleapis.com/siteVerification/v1/", +"batchPath": "batch/siteVerification/v1", +"description": "Verifies ownership of websites or domains with Google.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/site-verification/", +"etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/ffKkQHIfwnRAzOSRWAT_SYBS6HY\"", +"icons": { +"x16": "https://www.gstatic.com/images/branding/product/1x/googleg_16dp.png", +"x32": "https://www.gstatic.com/images/branding/product/1x/googleg_32dp.png" +}, +"id": "siteVerification:v1", +"kind": "discovery#restDescription", +"name": "siteVerification", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"alt": { +"default": "json", +"description": "Data format for the response.", +"enum": [ +"json" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json" +], +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "false", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", +"location": "query", +"type": "string" +}, +"userIp": { +"description": "Deprecated. Please use quotaUser instead.", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"webResource": { +"methods": { +"delete": { +"description": "Relinquish ownership of a website or domain.", +"httpMethod": "DELETE", +"id": "siteVerification.webResource.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "The id of a verified site or domain.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webResource/{id}", +"scopes": [ +"https://www.googleapis.com/auth/siteverification" +] +}, +"get": { +"description": "Get the most current data for a website or domain.", +"httpMethod": "GET", +"id": "siteVerification.webResource.get", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "The id of a verified site or domain.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webResource/{id}", +"response": { +"$ref": "SiteVerificationWebResourceResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/siteverification" +] +}, +"getToken": { +"description": "Get a verification token for placing on a website or domain.", +"httpMethod": "POST", +"id": "siteVerification.webResource.getToken", +"path": "token", +"request": { +"$ref": "SiteVerificationWebResourceGettokenRequest" +}, +"response": { +"$ref": "SiteVerificationWebResourceGettokenResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/siteverification", +"https://www.googleapis.com/auth/siteverification.verify_only" +] +}, +"insert": { +"description": "Attempt verification of a website or domain.", +"httpMethod": "POST", +"id": "siteVerification.webResource.insert", +"parameterOrder": [ +"verificationMethod" +], +"parameters": { +"verificationMethod": { +"description": "The method to use for verifying a site or domain.", +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "webResource", +"request": { +"$ref": "SiteVerificationWebResourceResource" +}, +"response": { +"$ref": "SiteVerificationWebResourceResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/siteverification", +"https://www.googleapis.com/auth/siteverification.verify_only" +] +}, +"list": { +"description": "Get the list of your verified websites and domains.", +"httpMethod": "GET", +"id": "siteVerification.webResource.list", +"path": "webResource", +"response": { +"$ref": "SiteVerificationWebResourceListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/siteverification" +] +}, +"patch": { +"description": "Modify the list of owners for your website or domain. This method supports patch semantics.", +"httpMethod": "PATCH", +"id": "siteVerification.webResource.patch", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "The id of a verified site or domain.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webResource/{id}", +"request": { +"$ref": "SiteVerificationWebResourceResource" +}, +"response": { +"$ref": "SiteVerificationWebResourceResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/siteverification" +] +}, +"update": { +"description": "Modify the list of owners for your website or domain.", +"httpMethod": "PUT", +"id": "siteVerification.webResource.update", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "The id of a verified site or domain.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "webResource/{id}", +"request": { +"$ref": "SiteVerificationWebResourceResource" +}, +"response": { +"$ref": "SiteVerificationWebResourceResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/siteverification" +] +} +} +} +}, +"revision": "20191119", +"rootUrl": "https://www.googleapis.com/", +"schemas": { +"SiteVerificationWebResourceGettokenRequest": { +"id": "SiteVerificationWebResourceGettokenRequest", +"properties": { +"site": { +"description": "The site for which a verification token will be generated.", +"properties": { +"identifier": { +"description": "The site identifier. If the type is set to SITE, the identifier is a URL. If the type is set to INET_DOMAIN, the site identifier is a domain name.", +"type": "string" +}, +"type": { +"description": "The type of resource to be verified. Can be SITE or INET_DOMAIN (domain name).", +"type": "string" +} +}, +"type": "object" +}, +"verificationMethod": { +"description": "The verification method that will be used to verify this site. For sites, 'FILE' or 'META' methods may be used. For domains, only 'DNS' may be used.", +"type": "string" +} +}, +"type": "object" +}, +"SiteVerificationWebResourceGettokenResponse": { +"id": "SiteVerificationWebResourceGettokenResponse", +"properties": { +"method": { +"description": "The verification method to use in conjunction with this token. For FILE, the token should be placed in the top-level directory of the site, stored inside a file of the same name. For META, the token should be placed in the HEAD tag of the default page that is loaded for the site. For DNS, the token should be placed in a TXT record of the domain.", +"type": "string" +}, +"token": { +"description": "The verification token. The token must be placed appropriately in order for verification to succeed.", +"type": "string" +} +}, +"type": "object" +}, +"SiteVerificationWebResourceListResponse": { +"id": "SiteVerificationWebResourceListResponse", +"properties": { +"items": { +"description": "The list of sites that are owned by the authenticated user.", +"items": { +"$ref": "SiteVerificationWebResourceResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"SiteVerificationWebResourceResource": { +"id": "SiteVerificationWebResourceResource", +"properties": { +"id": { +"description": "The string used to identify this site. This value should be used in the \"id\" portion of the REST URL for the Get, Update, and Delete operations.", +"type": "string" +}, +"owners": { +"description": "The email addresses of all verified owners.", +"items": { +"type": "string" +}, +"type": "array" +}, +"site": { +"description": "The address and type of a site that is verified or will be verified.", +"properties": { +"identifier": { +"description": "The site identifier. If the type is set to SITE, the identifier is a URL. If the type is set to INET_DOMAIN, the site identifier is a domain name.", +"type": "string" +}, +"type": { +"description": "The site type. Can be SITE or INET_DOMAIN (domain name).", +"type": "string" +} +}, +"type": "object" +} +}, +"type": "object" +} +}, +"servicePath": "siteVerification/v1/", +"title": "Google Site Verification API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/slides.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/slides.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..3d64d13f6339dade39dc65417a5aee3c7281a3ca --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/slides.v1.json @@ -0,0 +1,4628 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/drive": { +"description": "See, edit, create, and delete all of your Google Drive files" +}, +"https://www.googleapis.com/auth/drive.file": { +"description": "See, edit, create, and delete only the specific Google Drive files you use with this app" +}, +"https://www.googleapis.com/auth/drive.readonly": { +"description": "See and download all your Google Drive files" +}, +"https://www.googleapis.com/auth/presentations": { +"description": "See, edit, create, and delete all your Google Slides presentations" +}, +"https://www.googleapis.com/auth/presentations.readonly": { +"description": "See all your Google Slides presentations" +}, +"https://www.googleapis.com/auth/spreadsheets": { +"description": "See, edit, create, and delete all your Google Sheets spreadsheets" +}, +"https://www.googleapis.com/auth/spreadsheets.readonly": { +"description": "See all your Google Sheets spreadsheets" +} +} +} +}, +"basePath": "", +"baseUrl": "https://slides.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Slides", +"description": "Reads and writes Google Slides presentations.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/slides/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "slides:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://slides.mtls.googleapis.com/", +"name": "slides", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"presentations": { +"methods": { +"batchUpdate": { +"description": "Applies one or more updates to the presentation. Each request is validated before being applied. If any request is not valid, then the entire request will fail and nothing will be applied. Some requests have replies to give you some information about how they are applied. Other requests do not need to return information; these each return an empty reply. The order of replies matches that of the requests. For example, suppose you call batchUpdate with four updates, and only the third one returns information. The response would have two empty replies: the reply to the third request, and another empty reply, in that order. Because other users may be editing the presentation, the presentation might not exactly reflect your changes: your changes may be altered with respect to collaborator changes. If there are no collaborators, the presentation should reflect your changes. In any case, the updates in your request are guaranteed to be applied together atomically.", +"flatPath": "v1/presentations/{presentationId}:batchUpdate", +"httpMethod": "POST", +"id": "slides.presentations.batchUpdate", +"parameterOrder": [ +"presentationId" +], +"parameters": { +"presentationId": { +"description": "The presentation to apply the updates to.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/presentations/{presentationId}:batchUpdate", +"request": { +"$ref": "BatchUpdatePresentationRequest" +}, +"response": { +"$ref": "BatchUpdatePresentationResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/drive.readonly", +"https://www.googleapis.com/auth/presentations", +"https://www.googleapis.com/auth/spreadsheets", +"https://www.googleapis.com/auth/spreadsheets.readonly" +] +}, +"create": { +"description": "Creates a blank presentation using the title given in the request. If a `presentationId` is provided, it is used as the ID of the new presentation. Otherwise, a new ID is generated. Other fields in the request, including any provided content, are ignored. Returns the created presentation.", +"flatPath": "v1/presentations", +"httpMethod": "POST", +"id": "slides.presentations.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/presentations", +"request": { +"$ref": "Presentation" +}, +"response": { +"$ref": "Presentation" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/presentations" +] +}, +"get": { +"description": "Gets the latest version of the specified presentation.", +"flatPath": "v1/presentations/{presentationsId}", +"httpMethod": "GET", +"id": "slides.presentations.get", +"parameterOrder": [ +"presentationId" +], +"parameters": { +"presentationId": { +"description": "The ID of the presentation to retrieve.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/presentations/{+presentationId}", +"response": { +"$ref": "Presentation" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/drive.readonly", +"https://www.googleapis.com/auth/presentations", +"https://www.googleapis.com/auth/presentations.readonly" +] +} +}, +"resources": { +"pages": { +"methods": { +"get": { +"description": "Gets the latest version of the specified page in the presentation.", +"flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}", +"httpMethod": "GET", +"id": "slides.presentations.pages.get", +"parameterOrder": [ +"presentationId", +"pageObjectId" +], +"parameters": { +"pageObjectId": { +"description": "The object ID of the page to retrieve.", +"location": "path", +"required": true, +"type": "string" +}, +"presentationId": { +"description": "The ID of the presentation to retrieve.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/presentations/{presentationId}/pages/{pageObjectId}", +"response": { +"$ref": "Page" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/drive.readonly", +"https://www.googleapis.com/auth/presentations", +"https://www.googleapis.com/auth/presentations.readonly" +] +}, +"getThumbnail": { +"description": "Generates a thumbnail of the latest version of the specified page in the presentation and returns a URL to the thumbnail image. This request counts as an [expensive read request](/slides/limits) for quota purposes.", +"flatPath": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", +"httpMethod": "GET", +"id": "slides.presentations.pages.getThumbnail", +"parameterOrder": [ +"presentationId", +"pageObjectId" +], +"parameters": { +"pageObjectId": { +"description": "The object ID of the page whose thumbnail to retrieve.", +"location": "path", +"required": true, +"type": "string" +}, +"presentationId": { +"description": "The ID of the presentation to retrieve.", +"location": "path", +"required": true, +"type": "string" +}, +"thumbnailProperties.mimeType": { +"description": "The optional mime type of the thumbnail image. If you don't specify the mime type, the mime type defaults to PNG.", +"enum": [ +"PNG" +], +"enumDescriptions": [ +"The default mime type." +], +"location": "query", +"type": "string" +}, +"thumbnailProperties.thumbnailSize": { +"description": "The optional thumbnail image size. If you don't specify the size, the server chooses a default size of the image.", +"enum": [ +"THUMBNAIL_SIZE_UNSPECIFIED", +"LARGE", +"MEDIUM", +"SMALL" +], +"enumDescriptions": [ +"The default thumbnail image size. The unspecified thumbnail size implies that the server chooses the size of the image in a way that might vary in the future.", +"The thumbnail image width of 1600px.", +"The thumbnail image width of 800px.", +"The thumbnail image width of 200px." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/presentations/{presentationId}/pages/{pageObjectId}/thumbnail", +"response": { +"$ref": "Thumbnail" +}, +"scopes": [ +"https://www.googleapis.com/auth/drive", +"https://www.googleapis.com/auth/drive.file", +"https://www.googleapis.com/auth/drive.readonly", +"https://www.googleapis.com/auth/presentations", +"https://www.googleapis.com/auth/presentations.readonly" +] +} +} +} +} +} +}, +"revision": "20240416", +"rootUrl": "https://slides.googleapis.com/", +"schemas": { +"AffineTransform": { +"description": "AffineTransform uses a 3x3 matrix with an implied last row of [ 0 0 1 ] to transform source coordinates (x,y) into destination coordinates (x', y') according to: x' x = shear_y scale_y translate_y 1 [ 1 ] After transformation, x' = scale_x * x + shear_x * y + translate_x; y' = scale_y * y + shear_y * x + translate_y; This message is therefore composed of these six matrix elements.", +"id": "AffineTransform", +"properties": { +"scaleX": { +"description": "The X coordinate scaling element.", +"format": "double", +"type": "number" +}, +"scaleY": { +"description": "The Y coordinate scaling element.", +"format": "double", +"type": "number" +}, +"shearX": { +"description": "The X coordinate shearing element.", +"format": "double", +"type": "number" +}, +"shearY": { +"description": "The Y coordinate shearing element.", +"format": "double", +"type": "number" +}, +"translateX": { +"description": "The X coordinate translation element.", +"format": "double", +"type": "number" +}, +"translateY": { +"description": "The Y coordinate translation element.", +"format": "double", +"type": "number" +}, +"unit": { +"description": "The units for translate elements.", +"enum": [ +"UNIT_UNSPECIFIED", +"EMU", +"PT" +], +"enumDescriptions": [ +"The units are unknown.", +"An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter and thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", +"A point, 1/72 of an inch." +], +"type": "string" +} +}, +"type": "object" +}, +"AutoText": { +"description": "A TextElement kind that represents auto text.", +"id": "AutoText", +"properties": { +"content": { +"description": "The rendered content of this auto text, if available.", +"type": "string" +}, +"style": { +"$ref": "TextStyle", +"description": "The styling applied to this auto text." +}, +"type": { +"description": "The type of this auto text.", +"enum": [ +"TYPE_UNSPECIFIED", +"SLIDE_NUMBER" +], +"enumDescriptions": [ +"An unspecified autotext type.", +"Type for autotext that represents the current slide number." +], +"type": "string" +} +}, +"type": "object" +}, +"Autofit": { +"description": "The autofit properties of a Shape.", +"id": "Autofit", +"properties": { +"autofitType": { +"description": "The autofit type of the shape. If the autofit type is AUTOFIT_TYPE_UNSPECIFIED, the autofit type is inherited from a parent placeholder if it exists. The field is automatically set to NONE if a request is made that might affect text fitting within its bounding text box. In this case the font_scale is applied to the font_size and the line_spacing_reduction is applied to the line_spacing. Both properties are also reset to default values.", +"enum": [ +"AUTOFIT_TYPE_UNSPECIFIED", +"NONE", +"TEXT_AUTOFIT", +"SHAPE_AUTOFIT" +], +"enumDescriptions": [ +"The autofit type is unspecified.", +"Do not autofit.", +"Shrink text on overflow to fit the shape.", +"Resize the shape to fit the text." +], +"type": "string" +}, +"fontScale": { +"description": "The font scale applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 1. For TEXT_AUTOFIT, this value multiplied by the font_size gives the font size that is rendered in the editor. This property is read-only.", +"format": "float", +"type": "number" +}, +"lineSpacingReduction": { +"description": "The line spacing reduction applied to the shape. For shapes with autofit_type NONE or SHAPE_AUTOFIT, this value is the default value of 0. For TEXT_AUTOFIT, this value subtracted from the line_spacing gives the line spacing that is rendered in the editor. This property is read-only.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"BatchUpdatePresentationRequest": { +"description": "Request message for PresentationsService.BatchUpdatePresentation.", +"id": "BatchUpdatePresentationRequest", +"properties": { +"requests": { +"description": "A list of updates to apply to the presentation.", +"items": { +"$ref": "Request" +}, +"type": "array" +}, +"writeControl": { +"$ref": "WriteControl", +"description": "Provides control over how write requests are executed." +} +}, +"type": "object" +}, +"BatchUpdatePresentationResponse": { +"description": "Response message from a batch update.", +"id": "BatchUpdatePresentationResponse", +"properties": { +"presentationId": { +"description": "The presentation the updates were applied to.", +"type": "string" +}, +"replies": { +"description": "The reply of the updates. This maps 1:1 with the updates, although replies to some requests may be empty.", +"items": { +"$ref": "Response" +}, +"type": "array" +}, +"writeControl": { +"$ref": "WriteControl", +"description": "The updated write control after applying the request." +} +}, +"type": "object" +}, +"Bullet": { +"description": "Describes the bullet of a paragraph.", +"id": "Bullet", +"properties": { +"bulletStyle": { +"$ref": "TextStyle", +"description": "The paragraph specific text style applied to this bullet." +}, +"glyph": { +"description": "The rendered bullet glyph for this paragraph.", +"type": "string" +}, +"listId": { +"description": "The ID of the list this paragraph belongs to.", +"type": "string" +}, +"nestingLevel": { +"description": "The nesting level of this paragraph in the list.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ColorScheme": { +"description": "The palette of predefined colors for a page.", +"id": "ColorScheme", +"properties": { +"colors": { +"description": "The ThemeColorType and corresponding concrete color pairs.", +"items": { +"$ref": "ThemeColorPair" +}, +"type": "array" +} +}, +"type": "object" +}, +"ColorStop": { +"description": "A color and position in a gradient band.", +"id": "ColorStop", +"properties": { +"alpha": { +"description": "The alpha value of this color in the gradient band. Defaults to 1.0, fully opaque.", +"format": "float", +"type": "number" +}, +"color": { +"$ref": "OpaqueColor", +"description": "The color of the gradient stop." +}, +"position": { +"description": "The relative position of the color stop in the gradient band measured in percentage. The value should be in the interval [0.0, 1.0].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CreateImageRequest": { +"description": "Creates an image.", +"id": "CreateImageRequest", +"properties": { +"elementProperties": { +"$ref": "PageElementProperties", +"description": "The element properties for the image. When the aspect ratio of the provided size does not match the image aspect ratio, the image is scaled and centered with respect to the size in order to maintain the aspect ratio. The provided transform is applied after this operation. The PageElementProperties.size property is optional. If you don't specify the size, the default size of the image is used. The PageElementProperties.transform property is optional. If you don't specify a transform, the image will be placed at the top-left corner of the page." +}, +"objectId": { +"description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", +"type": "string" +}, +"url": { +"description": "The image URL. The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50 MB in size, can't exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF formats. The provided URL must be publicly accessible and up to 2 KB in length. The URL is saved with the image, and exposed through the Image.source_url field.", +"type": "string" +} +}, +"type": "object" +}, +"CreateImageResponse": { +"description": "The result of creating an image.", +"id": "CreateImageResponse", +"properties": { +"objectId": { +"description": "The object ID of the created image.", +"type": "string" +} +}, +"type": "object" +}, +"CreateLineRequest": { +"description": "Creates a line.", +"id": "CreateLineRequest", +"properties": { +"category": { +"description": "The category of the line to be created. The exact line type created is determined based on the category and how it's routed to connect to other page elements. If you specify both a `category` and a `line_category`, the `category` takes precedence. If you do not specify a value for `category`, but specify a value for `line_category`, then the specified `line_category` value is used. If you do not specify either, then STRAIGHT is used.", +"enum": [ +"LINE_CATEGORY_UNSPECIFIED", +"STRAIGHT", +"BENT", +"CURVED" +], +"enumDescriptions": [ +"Unspecified line category.", +"Straight connectors, including straight connector 1.", +"Bent connectors, including bent connector 2 to 5.", +"Curved connectors, including curved connector 2 to 5." +], +"type": "string" +}, +"elementProperties": { +"$ref": "PageElementProperties", +"description": "The element properties for the line." +}, +"lineCategory": { +"deprecated": true, +"description": "The category of the line to be created. *Deprecated*: use `category` instead. The exact line type created is determined based on the category and how it's routed to connect to other page elements. If you specify both a `category` and a `line_category`, the `category` takes precedence.", +"enum": [ +"STRAIGHT", +"BENT", +"CURVED" +], +"enumDescriptions": [ +"Straight connectors, including straight connector 1. The is the default category when one is not specified.", +"Bent connectors, including bent connector 2 to 5.", +"Curved connectors, including curved connector 2 to 5." +], +"type": "string" +}, +"objectId": { +"description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", +"type": "string" +} +}, +"type": "object" +}, +"CreateLineResponse": { +"description": "The result of creating a line.", +"id": "CreateLineResponse", +"properties": { +"objectId": { +"description": "The object ID of the created line.", +"type": "string" +} +}, +"type": "object" +}, +"CreateParagraphBulletsRequest": { +"description": "Creates bullets for all of the paragraphs that overlap with the given text index range. The nesting level of each paragraph will be determined by counting leading tabs in front of each paragraph. To avoid excess space between the bullet and the corresponding paragraph, these leading tabs are removed by this request. This may change the indices of parts of the text. If the paragraph immediately before paragraphs being updated is in a list with a matching preset, the paragraphs being updated are added to that preceding list.", +"id": "CreateParagraphBulletsRequest", +"properties": { +"bulletPreset": { +"description": "The kinds of bullet glyphs to be used. Defaults to the `BULLET_DISC_CIRCLE_SQUARE` preset.", +"enum": [ +"BULLET_DISC_CIRCLE_SQUARE", +"BULLET_DIAMONDX_ARROW3D_SQUARE", +"BULLET_CHECKBOX", +"BULLET_ARROW_DIAMOND_DISC", +"BULLET_STAR_CIRCLE_SQUARE", +"BULLET_ARROW3D_CIRCLE_SQUARE", +"BULLET_LEFTTRIANGLE_DIAMOND_DISC", +"BULLET_DIAMONDX_HOLLOWDIAMOND_SQUARE", +"BULLET_DIAMOND_CIRCLE_SQUARE", +"NUMBERED_DIGIT_ALPHA_ROMAN", +"NUMBERED_DIGIT_ALPHA_ROMAN_PARENS", +"NUMBERED_DIGIT_NESTED", +"NUMBERED_UPPERALPHA_ALPHA_ROMAN", +"NUMBERED_UPPERROMAN_UPPERALPHA_DIGIT", +"NUMBERED_ZERODIGIT_ALPHA_ROMAN" +], +"enumDescriptions": [ +"A bulleted list with a `DISC`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels.", +"A bulleted list with a `DIAMONDX`, `ARROW3D` and `SQUARE` bullet glyph for the first 3 list nesting levels.", +"A bulleted list with `CHECKBOX` bullet glyphs for all list nesting levels.", +"A bulleted list with a `ARROW`, `DIAMOND` and `DISC` bullet glyph for the first 3 list nesting levels.", +"A bulleted list with a `STAR`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels.", +"A bulleted list with a `ARROW3D`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels.", +"A bulleted list with a `LEFTTRIANGLE`, `DIAMOND` and `DISC` bullet glyph for the first 3 list nesting levels.", +"A bulleted list with a `DIAMONDX`, `HOLLOWDIAMOND` and `SQUARE` bullet glyph for the first 3 list nesting levels.", +"A bulleted list with a `DIAMOND`, `CIRCLE` and `SQUARE` bullet glyph for the first 3 list nesting levels.", +"A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by periods.", +"A numbered list with `DIGIT`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by parenthesis.", +"A numbered list with `DIGIT` numeric glyphs separated by periods, where each nesting level uses the previous nesting level's glyph as a prefix. For example: '1.', '1.1.', '2.', '2.2.'.", +"A numbered list with `UPPERALPHA`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by periods.", +"A numbered list with `UPPERROMAN`, `UPPERALPHA` and `DIGIT` numeric glyphs for the first 3 list nesting levels, followed by periods.", +"A numbered list with `ZERODIGIT`, `ALPHA` and `ROMAN` numeric glyphs for the first 3 list nesting levels, followed by periods." +], +"type": "string" +}, +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The optional table cell location if the text to be modified is in a table cell. If present, the object_id must refer to a table." +}, +"objectId": { +"description": "The object ID of the shape or table containing the text to add bullets to.", +"type": "string" +}, +"textRange": { +"$ref": "Range", +"description": "The range of text to apply the bullet presets to, based on TextElement indexes." +} +}, +"type": "object" +}, +"CreateShapeRequest": { +"description": "Creates a new shape.", +"id": "CreateShapeRequest", +"properties": { +"elementProperties": { +"$ref": "PageElementProperties", +"description": "The element properties for the shape." +}, +"objectId": { +"description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If empty, a unique identifier will be generated.", +"type": "string" +}, +"shapeType": { +"description": "The shape type.", +"enum": [ +"TYPE_UNSPECIFIED", +"TEXT_BOX", +"RECTANGLE", +"ROUND_RECTANGLE", +"ELLIPSE", +"ARC", +"BENT_ARROW", +"BENT_UP_ARROW", +"BEVEL", +"BLOCK_ARC", +"BRACE_PAIR", +"BRACKET_PAIR", +"CAN", +"CHEVRON", +"CHORD", +"CLOUD", +"CORNER", +"CUBE", +"CURVED_DOWN_ARROW", +"CURVED_LEFT_ARROW", +"CURVED_RIGHT_ARROW", +"CURVED_UP_ARROW", +"DECAGON", +"DIAGONAL_STRIPE", +"DIAMOND", +"DODECAGON", +"DONUT", +"DOUBLE_WAVE", +"DOWN_ARROW", +"DOWN_ARROW_CALLOUT", +"FOLDED_CORNER", +"FRAME", +"HALF_FRAME", +"HEART", +"HEPTAGON", +"HEXAGON", +"HOME_PLATE", +"HORIZONTAL_SCROLL", +"IRREGULAR_SEAL_1", +"IRREGULAR_SEAL_2", +"LEFT_ARROW", +"LEFT_ARROW_CALLOUT", +"LEFT_BRACE", +"LEFT_BRACKET", +"LEFT_RIGHT_ARROW", +"LEFT_RIGHT_ARROW_CALLOUT", +"LEFT_RIGHT_UP_ARROW", +"LEFT_UP_ARROW", +"LIGHTNING_BOLT", +"MATH_DIVIDE", +"MATH_EQUAL", +"MATH_MINUS", +"MATH_MULTIPLY", +"MATH_NOT_EQUAL", +"MATH_PLUS", +"MOON", +"NO_SMOKING", +"NOTCHED_RIGHT_ARROW", +"OCTAGON", +"PARALLELOGRAM", +"PENTAGON", +"PIE", +"PLAQUE", +"PLUS", +"QUAD_ARROW", +"QUAD_ARROW_CALLOUT", +"RIBBON", +"RIBBON_2", +"RIGHT_ARROW", +"RIGHT_ARROW_CALLOUT", +"RIGHT_BRACE", +"RIGHT_BRACKET", +"ROUND_1_RECTANGLE", +"ROUND_2_DIAGONAL_RECTANGLE", +"ROUND_2_SAME_RECTANGLE", +"RIGHT_TRIANGLE", +"SMILEY_FACE", +"SNIP_1_RECTANGLE", +"SNIP_2_DIAGONAL_RECTANGLE", +"SNIP_2_SAME_RECTANGLE", +"SNIP_ROUND_RECTANGLE", +"STAR_10", +"STAR_12", +"STAR_16", +"STAR_24", +"STAR_32", +"STAR_4", +"STAR_5", +"STAR_6", +"STAR_7", +"STAR_8", +"STRIPED_RIGHT_ARROW", +"SUN", +"TRAPEZOID", +"TRIANGLE", +"UP_ARROW", +"UP_ARROW_CALLOUT", +"UP_DOWN_ARROW", +"UTURN_ARROW", +"VERTICAL_SCROLL", +"WAVE", +"WEDGE_ELLIPSE_CALLOUT", +"WEDGE_RECTANGLE_CALLOUT", +"WEDGE_ROUND_RECTANGLE_CALLOUT", +"FLOW_CHART_ALTERNATE_PROCESS", +"FLOW_CHART_COLLATE", +"FLOW_CHART_CONNECTOR", +"FLOW_CHART_DECISION", +"FLOW_CHART_DELAY", +"FLOW_CHART_DISPLAY", +"FLOW_CHART_DOCUMENT", +"FLOW_CHART_EXTRACT", +"FLOW_CHART_INPUT_OUTPUT", +"FLOW_CHART_INTERNAL_STORAGE", +"FLOW_CHART_MAGNETIC_DISK", +"FLOW_CHART_MAGNETIC_DRUM", +"FLOW_CHART_MAGNETIC_TAPE", +"FLOW_CHART_MANUAL_INPUT", +"FLOW_CHART_MANUAL_OPERATION", +"FLOW_CHART_MERGE", +"FLOW_CHART_MULTIDOCUMENT", +"FLOW_CHART_OFFLINE_STORAGE", +"FLOW_CHART_OFFPAGE_CONNECTOR", +"FLOW_CHART_ONLINE_STORAGE", +"FLOW_CHART_OR", +"FLOW_CHART_PREDEFINED_PROCESS", +"FLOW_CHART_PREPARATION", +"FLOW_CHART_PROCESS", +"FLOW_CHART_PUNCHED_CARD", +"FLOW_CHART_PUNCHED_TAPE", +"FLOW_CHART_SORT", +"FLOW_CHART_SUMMING_JUNCTION", +"FLOW_CHART_TERMINATOR", +"ARROW_EAST", +"ARROW_NORTH_EAST", +"ARROW_NORTH", +"SPEECH", +"STARBURST", +"TEARDROP", +"ELLIPSE_RIBBON", +"ELLIPSE_RIBBON_2", +"CLOUD_CALLOUT", +"CUSTOM" +], +"enumDescriptions": [ +"The shape type that is not predefined.", +"Text box shape.", +"Rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'rect'.", +"Round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'roundRect'", +"Ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'ellipse'", +"Curved arc shape. Corresponds to ECMA-376 ST_ShapeType 'arc'", +"Bent arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentArrow'", +"Bent up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentUpArrow'", +"Bevel shape. Corresponds to ECMA-376 ST_ShapeType 'bevel'", +"Block arc shape. Corresponds to ECMA-376 ST_ShapeType 'blockArc'", +"Brace pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracePair'", +"Bracket pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracketPair'", +"Can shape. Corresponds to ECMA-376 ST_ShapeType 'can'", +"Chevron shape. Corresponds to ECMA-376 ST_ShapeType 'chevron'", +"Chord shape. Corresponds to ECMA-376 ST_ShapeType 'chord'", +"Cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloud'", +"Corner shape. Corresponds to ECMA-376 ST_ShapeType 'corner'", +"Cube shape. Corresponds to ECMA-376 ST_ShapeType 'cube'", +"Curved down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedDownArrow'", +"Curved left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedLeftArrow'", +"Curved right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedRightArrow'", +"Curved up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedUpArrow'", +"Decagon shape. Corresponds to ECMA-376 ST_ShapeType 'decagon'", +"Diagonal stripe shape. Corresponds to ECMA-376 ST_ShapeType 'diagStripe'", +"Diamond shape. Corresponds to ECMA-376 ST_ShapeType 'diamond'", +"Dodecagon shape. Corresponds to ECMA-376 ST_ShapeType 'dodecagon'", +"Donut shape. Corresponds to ECMA-376 ST_ShapeType 'donut'", +"Double wave shape. Corresponds to ECMA-376 ST_ShapeType 'doubleWave'", +"Down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrow'", +"Callout down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrowCallout'", +"Folded corner shape. Corresponds to ECMA-376 ST_ShapeType 'foldedCorner'", +"Frame shape. Corresponds to ECMA-376 ST_ShapeType 'frame'", +"Half frame shape. Corresponds to ECMA-376 ST_ShapeType 'halfFrame'", +"Heart shape. Corresponds to ECMA-376 ST_ShapeType 'heart'", +"Heptagon shape. Corresponds to ECMA-376 ST_ShapeType 'heptagon'", +"Hexagon shape. Corresponds to ECMA-376 ST_ShapeType 'hexagon'", +"Home plate shape. Corresponds to ECMA-376 ST_ShapeType 'homePlate'", +"Horizontal scroll shape. Corresponds to ECMA-376 ST_ShapeType 'horizontalScroll'", +"Irregular seal 1 shape. Corresponds to ECMA-376 ST_ShapeType 'irregularSeal1'", +"Irregular seal 2 shape. Corresponds to ECMA-376 ST_ShapeType 'irregularSeal2'", +"Left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrow'", +"Callout left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrowCallout'", +"Left brace shape. Corresponds to ECMA-376 ST_ShapeType 'leftBrace'", +"Left bracket shape. Corresponds to ECMA-376 ST_ShapeType 'leftBracket'", +"Left right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftRightArrow'", +"Callout left right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftRightArrowCallout'", +"Left right up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftRightUpArrow'", +"Left up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftUpArrow'", +"Lightning bolt shape. Corresponds to ECMA-376 ST_ShapeType 'lightningBolt'", +"Divide math shape. Corresponds to ECMA-376 ST_ShapeType 'mathDivide'", +"Equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathEqual'", +"Minus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMinus'", +"Multiply math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMultiply'", +"Not equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathNotEqual'", +"Plus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathPlus'", +"Moon shape. Corresponds to ECMA-376 ST_ShapeType 'moon'", +"No smoking shape. Corresponds to ECMA-376 ST_ShapeType 'noSmoking'", +"Notched right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'notchedRightArrow'", +"Octagon shape. Corresponds to ECMA-376 ST_ShapeType 'octagon'", +"Parallelogram shape. Corresponds to ECMA-376 ST_ShapeType 'parallelogram'", +"Pentagon shape. Corresponds to ECMA-376 ST_ShapeType 'pentagon'", +"Pie shape. Corresponds to ECMA-376 ST_ShapeType 'pie'", +"Plaque shape. Corresponds to ECMA-376 ST_ShapeType 'plaque'", +"Plus shape. Corresponds to ECMA-376 ST_ShapeType 'plus'", +"Quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrow'", +"Callout quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrowCallout'", +"Ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon'", +"Ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon2'", +"Right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrow'", +"Callout right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrowCallout'", +"Right brace shape. Corresponds to ECMA-376 ST_ShapeType 'rightBrace'", +"Right bracket shape. Corresponds to ECMA-376 ST_ShapeType 'rightBracket'", +"One round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'round1Rect'", +"Two diagonal round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'round2DiagRect'", +"Two same-side round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'round2SameRect'", +"Right triangle shape. Corresponds to ECMA-376 ST_ShapeType 'rtTriangle'", +"Smiley face shape. Corresponds to ECMA-376 ST_ShapeType 'smileyFace'", +"One snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snip1Rect'", +"Two diagonal snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snip2DiagRect'", +"Two same-side snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snip2SameRect'", +"One snip one round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snipRoundRect'", +"Ten pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star10'", +"Twelve pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star12'", +"Sixteen pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star16'", +"Twenty four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star24'", +"Thirty two pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star32'", +"Four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star4'", +"Five pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star5'", +"Six pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star6'", +"Seven pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star7'", +"Eight pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star8'", +"Striped right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'stripedRightArrow'", +"Sun shape. Corresponds to ECMA-376 ST_ShapeType 'sun'", +"Trapezoid shape. Corresponds to ECMA-376 ST_ShapeType 'trapezoid'", +"Triangle shape. Corresponds to ECMA-376 ST_ShapeType 'triangle'", +"Up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrow'", +"Callout up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrowCallout'", +"Up down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upDownArrow'", +"U-turn arrow shape. Corresponds to ECMA-376 ST_ShapeType 'uturnArrow'", +"Vertical scroll shape. Corresponds to ECMA-376 ST_ShapeType 'verticalScroll'", +"Wave shape. Corresponds to ECMA-376 ST_ShapeType 'wave'", +"Callout wedge ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'wedgeEllipseCallout'", +"Callout wedge rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'wedgeRectCallout'", +"Callout wedge round rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'wedgeRoundRectCallout'", +"Alternate process flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartAlternateProcess'", +"Collate flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartCollate'", +"Connector flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartConnector'", +"Decision flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDecision'", +"Delay flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDelay'", +"Display flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDisplay'", +"Document flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDocument'", +"Extract flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartExtract'", +"Input output flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartInputOutput'", +"Internal storage flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartInternalStorage'", +"Magnetic disk flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMagneticDisk'", +"Magnetic drum flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMagneticDrum'", +"Magnetic tape flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMagneticTape'", +"Manual input flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartManualInput'", +"Manual operation flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartManualOperation'", +"Merge flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMerge'", +"Multi-document flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMultidocument'", +"Offline storage flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOfflineStorage'", +"Off-page connector flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOffpageConnector'", +"Online storage flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOnlineStorage'", +"Or flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOr'", +"Predefined process flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPredefinedProcess'", +"Preparation flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPreparation'", +"Process flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartProcess'", +"Punched card flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPunchedCard'", +"Punched tape flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPunchedTape'", +"Sort flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSort'", +"Summing junction flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSummingJunction'", +"Terminator flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartTerminator'", +"East arrow shape.", +"Northeast arrow shape.", +"North arrow shape.", +"Speech shape.", +"Star burst shape.", +"Teardrop shape. Corresponds to ECMA-376 ST_ShapeType 'teardrop'", +"Ellipse ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ellipseRibbon'", +"Ellipse ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ellipseRibbon2'", +"Callout cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloudCallout'", +"Custom shape." +], +"type": "string" +} +}, +"type": "object" +}, +"CreateShapeResponse": { +"description": "The result of creating a shape.", +"id": "CreateShapeResponse", +"properties": { +"objectId": { +"description": "The object ID of the created shape.", +"type": "string" +} +}, +"type": "object" +}, +"CreateSheetsChartRequest": { +"description": "Creates an embedded Google Sheets chart. NOTE: Chart creation requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, drive.file, or drive OAuth scopes.", +"id": "CreateSheetsChartRequest", +"properties": { +"chartId": { +"description": "The ID of the specific chart in the Google Sheets spreadsheet.", +"format": "int32", +"type": "integer" +}, +"elementProperties": { +"$ref": "PageElementProperties", +"description": "The element properties for the chart. When the aspect ratio of the provided size does not match the chart aspect ratio, the chart is scaled and centered with respect to the size in order to maintain aspect ratio. The provided transform is applied after this operation." +}, +"linkingMode": { +"description": "The mode with which the chart is linked to the source spreadsheet. When not specified, the chart will be an image that is not linked.", +"enum": [ +"NOT_LINKED_IMAGE", +"LINKED" +], +"enumDescriptions": [ +"The chart is not associated with the source spreadsheet and cannot be updated. A chart that is not linked will be inserted as an image.", +"Linking the chart allows it to be updated, and other collaborators will see a link to the spreadsheet." +], +"type": "string" +}, +"objectId": { +"description": "A user-supplied object ID. If specified, the ID must be unique among all pages and page elements in the presentation. The ID should start with a word character [a-zA-Z0-9_] and then followed by any number of the following characters [a-zA-Z0-9_-:]. The length of the ID should not be less than 5 or greater than 50. If empty, a unique identifier will be generated.", +"type": "string" +}, +"spreadsheetId": { +"description": "The ID of the Google Sheets spreadsheet that contains the chart. You might need to add a resource key to the HTTP header for a subset of old files. For more information, see [Access link-shared files using resource keys](https://developers.google.com/drive/api/v3/resource-keys).", +"type": "string" +} +}, +"type": "object" +}, +"CreateSheetsChartResponse": { +"description": "The result of creating an embedded Google Sheets chart.", +"id": "CreateSheetsChartResponse", +"properties": { +"objectId": { +"description": "The object ID of the created chart.", +"type": "string" +} +}, +"type": "object" +}, +"CreateSlideRequest": { +"description": "Creates a slide.", +"id": "CreateSlideRequest", +"properties": { +"insertionIndex": { +"description": "The optional zero-based index indicating where to insert the slides. If you don't specify an index, the slide is created at the end.", +"format": "int32", +"type": "integer" +}, +"objectId": { +"description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The ID length must be between 5 and 50 characters, inclusive. If you don't specify an ID, a unique one is generated.", +"type": "string" +}, +"placeholderIdMappings": { +"description": "An optional list of object ID mappings from the placeholder(s) on the layout to the placeholders that are created on the slide from the specified layout. Can only be used when `slide_layout_reference` is specified.", +"items": { +"$ref": "LayoutPlaceholderIdMapping" +}, +"type": "array" +}, +"slideLayoutReference": { +"$ref": "LayoutReference", +"description": "Layout reference of the slide to be inserted, based on the *current master*, which is one of the following: - The master of the previous slide index. - The master of the first slide, if the insertion_index is zero. - The first master in the presentation, if there are no slides. If the LayoutReference is not found in the current master, a 400 bad request error is returned. If you don't specify a layout reference, the slide uses the predefined `BLANK` layout." +} +}, +"type": "object" +}, +"CreateSlideResponse": { +"description": "The result of creating a slide.", +"id": "CreateSlideResponse", +"properties": { +"objectId": { +"description": "The object ID of the created slide.", +"type": "string" +} +}, +"type": "object" +}, +"CreateTableRequest": { +"description": "Creates a new table.", +"id": "CreateTableRequest", +"properties": { +"columns": { +"description": "Number of columns in the table.", +"format": "int32", +"type": "integer" +}, +"elementProperties": { +"$ref": "PageElementProperties", +"description": "The element properties for the table. The table will be created at the provided size, subject to a minimum size. If no size is provided, the table will be automatically sized. Table transforms must have a scale of 1 and no shear components. If no transform is provided, the table will be centered on the page." +}, +"objectId": { +"description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", +"type": "string" +}, +"rows": { +"description": "Number of rows in the table.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"CreateTableResponse": { +"description": "The result of creating a table.", +"id": "CreateTableResponse", +"properties": { +"objectId": { +"description": "The object ID of the created table.", +"type": "string" +} +}, +"type": "object" +}, +"CreateVideoRequest": { +"description": "Creates a video. NOTE: Creating a video from Google Drive requires that the requesting app have at least one of the drive, drive.readonly, or drive.file OAuth scopes.", +"id": "CreateVideoRequest", +"properties": { +"elementProperties": { +"$ref": "PageElementProperties", +"description": "The element properties for the video. The PageElementProperties.size property is optional. If you don't specify a size, a default size is chosen by the server. The PageElementProperties.transform property is optional. The transform must not have shear components. If you don't specify a transform, the video will be placed at the top left corner of the page." +}, +"id": { +"description": "The video source's unique identifier for this video. e.g. For YouTube video https://www.youtube.com/watch?v=7U3axjORYZ0, the ID is 7U3axjORYZ0. For a Google Drive video https://drive.google.com/file/d/1xCgQLFTJi5_Xl8DgW_lcUYq5e-q6Hi5Q the ID is 1xCgQLFTJi5_Xl8DgW_lcUYq5e-q6Hi5Q. To access a Google Drive video file, you might need to add a resource key to the HTTP header for a subset of old files. For more information, see [Access link-shared files using resource keys](https://developers.google.com/drive/api/v3/resource-keys).", +"type": "string" +}, +"objectId": { +"description": "A user-supplied object ID. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", +"type": "string" +}, +"source": { +"description": "The video source.", +"enum": [ +"SOURCE_UNSPECIFIED", +"YOUTUBE", +"DRIVE" +], +"enumDescriptions": [ +"The video source is unspecified.", +"The video source is YouTube.", +"The video source is Google Drive." +], +"type": "string" +} +}, +"type": "object" +}, +"CreateVideoResponse": { +"description": "The result of creating a video.", +"id": "CreateVideoResponse", +"properties": { +"objectId": { +"description": "The object ID of the created video.", +"type": "string" +} +}, +"type": "object" +}, +"CropProperties": { +"description": "The crop properties of an object enclosed in a container. For example, an Image. The crop properties is represented by the offsets of four edges which define a crop rectangle. The offsets are measured in percentage from the corresponding edges of the object's original bounding rectangle towards inside, relative to the object's original dimensions. - If the offset is in the interval (0, 1), the corresponding edge of crop rectangle is positioned inside of the object's original bounding rectangle. - If the offset is negative or greater than 1, the corresponding edge of crop rectangle is positioned outside of the object's original bounding rectangle. - If the left edge of the crop rectangle is on the right side of its right edge, the object will be flipped horizontally. - If the top edge of the crop rectangle is below its bottom edge, the object will be flipped vertically. - If all offsets and rotation angle is 0, the object is not cropped. After cropping, the content in the crop rectangle will be stretched to fit its container.", +"id": "CropProperties", +"properties": { +"angle": { +"description": "The rotation angle of the crop window around its center, in radians. Rotation angle is applied after the offset.", +"format": "float", +"type": "number" +}, +"bottomOffset": { +"description": "The offset specifies the bottom edge of the crop rectangle that is located above the original bounding rectangle bottom edge, relative to the object's original height.", +"format": "float", +"type": "number" +}, +"leftOffset": { +"description": "The offset specifies the left edge of the crop rectangle that is located to the right of the original bounding rectangle left edge, relative to the object's original width.", +"format": "float", +"type": "number" +}, +"rightOffset": { +"description": "The offset specifies the right edge of the crop rectangle that is located to the left of the original bounding rectangle right edge, relative to the object's original width.", +"format": "float", +"type": "number" +}, +"topOffset": { +"description": "The offset specifies the top edge of the crop rectangle that is located below the original bounding rectangle top edge, relative to the object's original height.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"DeleteObjectRequest": { +"description": "Deletes an object, either pages or page elements, from the presentation.", +"id": "DeleteObjectRequest", +"properties": { +"objectId": { +"description": "The object ID of the page or page element to delete. If after a delete operation a group contains only 1 or no page elements, the group is also deleted. If a placeholder is deleted on a layout, any empty inheriting placeholders are also deleted.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteParagraphBulletsRequest": { +"description": "Deletes bullets from all of the paragraphs that overlap with the given text index range. The nesting level of each paragraph will be visually preserved by adding indent to the start of the corresponding paragraph.", +"id": "DeleteParagraphBulletsRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The optional table cell location if the text to be modified is in a table cell. If present, the object_id must refer to a table." +}, +"objectId": { +"description": "The object ID of the shape or table containing the text to delete bullets from.", +"type": "string" +}, +"textRange": { +"$ref": "Range", +"description": "The range of text to delete bullets from, based on TextElement indexes." +} +}, +"type": "object" +}, +"DeleteTableColumnRequest": { +"description": "Deletes a column from a table.", +"id": "DeleteTableColumnRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The reference table cell location from which a column will be deleted. The column this cell spans will be deleted. If this is a merged cell, multiple columns will be deleted. If no columns remain in the table after this deletion, the whole table is deleted." +}, +"tableObjectId": { +"description": "The table to delete columns from.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteTableRowRequest": { +"description": "Deletes a row from a table.", +"id": "DeleteTableRowRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The reference table cell location from which a row will be deleted. The row this cell spans will be deleted. If this is a merged cell, multiple rows will be deleted. If no rows remain in the table after this deletion, the whole table is deleted." +}, +"tableObjectId": { +"description": "The table to delete rows from.", +"type": "string" +} +}, +"type": "object" +}, +"DeleteTextRequest": { +"description": "Deletes text from a shape or a table cell.", +"id": "DeleteTextRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The optional table cell location if the text is to be deleted from a table cell. If present, the object_id must refer to a table." +}, +"objectId": { +"description": "The object ID of the shape or table from which the text will be deleted.", +"type": "string" +}, +"textRange": { +"$ref": "Range", +"description": "The range of text to delete, based on TextElement indexes. There is always an implicit newline character at the end of a shape's or table cell's text that cannot be deleted. `Range.Type.ALL` will use the correct bounds, but care must be taken when specifying explicit bounds for range types `FROM_START_INDEX` and `FIXED_RANGE`. For example, if the text is \"ABC\", followed by an implicit newline, then the maximum value is 2 for `text_range.start_index` and 3 for `text_range.end_index`. Deleting text that crosses a paragraph boundary may result in changes to paragraph styles and lists as the two paragraphs are merged. Ranges that include only one code unit of a surrogate pair are expanded to include both code units." +} +}, +"type": "object" +}, +"Dimension": { +"description": "A magnitude in a single direction in the specified units.", +"id": "Dimension", +"properties": { +"magnitude": { +"description": "The magnitude.", +"format": "double", +"type": "number" +}, +"unit": { +"description": "The units for magnitude.", +"enum": [ +"UNIT_UNSPECIFIED", +"EMU", +"PT" +], +"enumDescriptions": [ +"The units are unknown.", +"An English Metric Unit (EMU) is defined as 1/360,000 of a centimeter and thus there are 914,400 EMUs per inch, and 12,700 EMUs per point.", +"A point, 1/72 of an inch." +], +"type": "string" +} +}, +"type": "object" +}, +"DuplicateObjectRequest": { +"description": "Duplicates a slide or page element. When duplicating a slide, the duplicate slide will be created immediately following the specified slide. When duplicating a page element, the duplicate will be placed on the same page at the same position as the original.", +"id": "DuplicateObjectRequest", +"properties": { +"objectId": { +"description": "The ID of the object to duplicate.", +"type": "string" +}, +"objectIds": { +"additionalProperties": { +"type": "string" +}, +"description": "The object being duplicated may contain other objects, for example when duplicating a slide or a group page element. This map defines how the IDs of duplicated objects are generated: the keys are the IDs of the original objects and its values are the IDs that will be assigned to the corresponding duplicate object. The ID of the source object's duplicate may be specified in this map as well, using the same value of the `object_id` field as a key and the newly desired ID as the value. All keys must correspond to existing IDs in the presentation. All values must be unique in the presentation and must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the new ID must not be less than 5 or greater than 50. If any IDs of source objects are omitted from the map, a new random ID will be assigned. If the map is empty or unset, all duplicate objects will receive a new random ID.", +"type": "object" +} +}, +"type": "object" +}, +"DuplicateObjectResponse": { +"description": "The response of duplicating an object.", +"id": "DuplicateObjectResponse", +"properties": { +"objectId": { +"description": "The ID of the new duplicate object.", +"type": "string" +} +}, +"type": "object" +}, +"Group": { +"description": "A PageElement kind representing a joined collection of PageElements.", +"id": "Group", +"properties": { +"children": { +"description": "The collection of elements in the group. The minimum size of a group is 2.", +"items": { +"$ref": "PageElement" +}, +"type": "array" +} +}, +"type": "object" +}, +"GroupObjectsRequest": { +"description": "Groups objects to create an object group. For example, groups PageElements to create a Group on the same page as all the children.", +"id": "GroupObjectsRequest", +"properties": { +"childrenObjectIds": { +"description": "The object IDs of the objects to group. Only page elements can be grouped. There should be at least two page elements on the same page that are not already in another group. Some page elements, such as videos, tables and placeholders cannot be grouped.", +"items": { +"type": "string" +}, +"type": "array" +}, +"groupObjectId": { +"description": "A user-supplied object ID for the group to be created. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", +"type": "string" +} +}, +"type": "object" +}, +"GroupObjectsResponse": { +"description": "The result of grouping objects.", +"id": "GroupObjectsResponse", +"properties": { +"objectId": { +"description": "The object ID of the created group.", +"type": "string" +} +}, +"type": "object" +}, +"Image": { +"description": "A PageElement kind representing an image.", +"id": "Image", +"properties": { +"contentUrl": { +"description": "An URL to an image with a default lifetime of 30 minutes. This URL is tagged with the account of the requester. Anyone with the URL effectively accesses the image as the original requester. Access to the image may be lost if the presentation's sharing settings change.", +"type": "string" +}, +"imageProperties": { +"$ref": "ImageProperties", +"description": "The properties of the image." +}, +"placeholder": { +"$ref": "Placeholder", +"description": "Placeholders are page elements that inherit from corresponding placeholders on layouts and masters. If set, the image is a placeholder image and any inherited properties can be resolved by looking at the parent placeholder identified by the Placeholder.parent_object_id field." +}, +"sourceUrl": { +"description": "The source URL is the URL used to insert the image. The source URL can be empty.", +"type": "string" +} +}, +"type": "object" +}, +"ImageProperties": { +"description": "The properties of the Image.", +"id": "ImageProperties", +"properties": { +"brightness": { +"description": "The brightness effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. This property is read-only.", +"format": "float", +"type": "number" +}, +"contrast": { +"description": "The contrast effect of the image. The value should be in the interval [-1.0, 1.0], where 0 means no effect. This property is read-only.", +"format": "float", +"type": "number" +}, +"cropProperties": { +"$ref": "CropProperties", +"description": "The crop properties of the image. If not set, the image is not cropped. This property is read-only." +}, +"link": { +"$ref": "Link", +"description": "The hyperlink destination of the image. If unset, there is no link." +}, +"outline": { +"$ref": "Outline", +"description": "The outline of the image. If not set, the image has no outline." +}, +"recolor": { +"$ref": "Recolor", +"description": "The recolor effect of the image. If not set, the image is not recolored. This property is read-only." +}, +"shadow": { +"$ref": "Shadow", +"description": "The shadow of the image. If not set, the image has no shadow. This property is read-only." +}, +"transparency": { +"description": "The transparency effect of the image. The value should be in the interval [0.0, 1.0], where 0 means no effect and 1 means completely transparent. This property is read-only.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"InsertTableColumnsRequest": { +"description": "Inserts columns into a table. Other columns in the table will be resized to fit the new column.", +"id": "InsertTableColumnsRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The reference table cell location from which columns will be inserted. A new column will be inserted to the left (or right) of the column where the reference cell is. If the reference cell is a merged cell, a new column will be inserted to the left (or right) of the merged cell." +}, +"insertRight": { +"description": "Whether to insert new columns to the right of the reference cell location. - `True`: insert to the right. - `False`: insert to the left.", +"type": "boolean" +}, +"number": { +"description": "The number of columns to be inserted. Maximum 20 per request.", +"format": "int32", +"type": "integer" +}, +"tableObjectId": { +"description": "The table to insert columns into.", +"type": "string" +} +}, +"type": "object" +}, +"InsertTableRowsRequest": { +"description": "Inserts rows into a table.", +"id": "InsertTableRowsRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The reference table cell location from which rows will be inserted. A new row will be inserted above (or below) the row where the reference cell is. If the reference cell is a merged cell, a new row will be inserted above (or below) the merged cell." +}, +"insertBelow": { +"description": "Whether to insert new rows below the reference cell location. - `True`: insert below the cell. - `False`: insert above the cell.", +"type": "boolean" +}, +"number": { +"description": "The number of rows to be inserted. Maximum 20 per request.", +"format": "int32", +"type": "integer" +}, +"tableObjectId": { +"description": "The table to insert rows into.", +"type": "string" +} +}, +"type": "object" +}, +"InsertTextRequest": { +"description": "Inserts text into a shape or a table cell.", +"id": "InsertTextRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The optional table cell location if the text is to be inserted into a table cell. If present, the object_id must refer to a table." +}, +"insertionIndex": { +"description": "The index where the text will be inserted, in Unicode code units, based on TextElement indexes. The index is zero-based and is computed from the start of the string. The index may be adjusted to prevent insertions inside Unicode grapheme clusters. In these cases, the text will be inserted immediately after the grapheme cluster.", +"format": "int32", +"type": "integer" +}, +"objectId": { +"description": "The object ID of the shape or table where the text will be inserted.", +"type": "string" +}, +"text": { +"description": "The text to be inserted. Inserting a newline character will implicitly create a new ParagraphMarker at that index. The paragraph style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets. Text styles for inserted text will be determined automatically, generally preserving the styling of neighboring text. In most cases, the text will be added to the TextRun that exists at the insertion index. Some control characters (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) will be stripped out of the inserted text.", +"type": "string" +} +}, +"type": "object" +}, +"LayoutPlaceholderIdMapping": { +"description": "The user-specified ID mapping for a placeholder that will be created on a slide from a specified layout.", +"id": "LayoutPlaceholderIdMapping", +"properties": { +"layoutPlaceholder": { +"$ref": "Placeholder", +"description": "The placeholder on a layout that will be applied to a slide. Only type and index are needed. For example, a predefined `TITLE_AND_BODY` layout may usually have a TITLE placeholder with index 0 and a BODY placeholder with index 0." +}, +"layoutPlaceholderObjectId": { +"description": "The object ID of the placeholder on a layout that will be applied to a slide.", +"type": "string" +}, +"objectId": { +"description": "A user-supplied object ID for the placeholder identified above that to be created onto a slide. If you specify an ID, it must be unique among all pages and page elements in the presentation. The ID must start with an alphanumeric character or an underscore (matches regex `[a-zA-Z0-9_]`); remaining characters may include those as well as a hyphen or colon (matches regex `[a-zA-Z0-9_-:]`). The length of the ID must not be less than 5 or greater than 50. If you don't specify an ID, a unique one is generated.", +"type": "string" +} +}, +"type": "object" +}, +"LayoutProperties": { +"description": "The properties of Page are only relevant for pages with page_type LAYOUT.", +"id": "LayoutProperties", +"properties": { +"displayName": { +"description": "The human-readable name of the layout.", +"type": "string" +}, +"masterObjectId": { +"description": "The object ID of the master that this layout is based on.", +"type": "string" +}, +"name": { +"description": "The name of the layout.", +"type": "string" +} +}, +"type": "object" +}, +"LayoutReference": { +"description": "Slide layout reference. This may reference either: - A predefined layout - One of the layouts in the presentation.", +"id": "LayoutReference", +"properties": { +"layoutId": { +"description": "Layout ID: the object ID of one of the layouts in the presentation.", +"type": "string" +}, +"predefinedLayout": { +"description": "Predefined layout.", +"enum": [ +"PREDEFINED_LAYOUT_UNSPECIFIED", +"BLANK", +"CAPTION_ONLY", +"TITLE", +"TITLE_AND_BODY", +"TITLE_AND_TWO_COLUMNS", +"TITLE_ONLY", +"SECTION_HEADER", +"SECTION_TITLE_AND_DESCRIPTION", +"ONE_COLUMN_TEXT", +"MAIN_POINT", +"BIG_NUMBER" +], +"enumDescriptions": [ +"Unspecified layout.", +"Blank layout, with no placeholders.", +"Layout with a caption at the bottom.", +"Layout with a title and a subtitle.", +"Layout with a title and body.", +"Layout with a title and two columns.", +"Layout with only a title.", +"Layout with a section title.", +"Layout with a title and subtitle on one side and description on the other.", +"Layout with one title and one body, arranged in a single column.", +"Layout with a main point.", +"Layout with a big number heading." +], +"type": "string" +} +}, +"type": "object" +}, +"Line": { +"description": "A PageElement kind representing a non-connector line, straight connector, curved connector, or bent connector.", +"id": "Line", +"properties": { +"lineCategory": { +"description": "The category of the line. It matches the `category` specified in CreateLineRequest, and can be updated with UpdateLineCategoryRequest.", +"enum": [ +"LINE_CATEGORY_UNSPECIFIED", +"STRAIGHT", +"BENT", +"CURVED" +], +"enumDescriptions": [ +"Unspecified line category.", +"Straight connectors, including straight connector 1.", +"Bent connectors, including bent connector 2 to 5.", +"Curved connectors, including curved connector 2 to 5." +], +"type": "string" +}, +"lineProperties": { +"$ref": "LineProperties", +"description": "The properties of the line." +}, +"lineType": { +"description": "The type of the line.", +"enum": [ +"TYPE_UNSPECIFIED", +"STRAIGHT_CONNECTOR_1", +"BENT_CONNECTOR_2", +"BENT_CONNECTOR_3", +"BENT_CONNECTOR_4", +"BENT_CONNECTOR_5", +"CURVED_CONNECTOR_2", +"CURVED_CONNECTOR_3", +"CURVED_CONNECTOR_4", +"CURVED_CONNECTOR_5", +"STRAIGHT_LINE" +], +"enumDescriptions": [ +"An unspecified line type.", +"Straight connector 1 form. Corresponds to ECMA-376 ST_ShapeType 'straightConnector1'.", +"Bent connector 2 form. Corresponds to ECMA-376 ST_ShapeType 'bentConnector2'.", +"Bent connector 3 form. Corresponds to ECMA-376 ST_ShapeType 'bentConnector3'.", +"Bent connector 4 form. Corresponds to ECMA-376 ST_ShapeType 'bentConnector4'.", +"Bent connector 5 form. Corresponds to ECMA-376 ST_ShapeType 'bentConnector5'.", +"Curved connector 2 form. Corresponds to ECMA-376 ST_ShapeType 'curvedConnector2'.", +"Curved connector 3 form. Corresponds to ECMA-376 ST_ShapeType 'curvedConnector3'.", +"Curved connector 4 form. Corresponds to ECMA-376 ST_ShapeType 'curvedConnector4'.", +"Curved connector 5 form. Corresponds to ECMA-376 ST_ShapeType 'curvedConnector5'.", +"Straight line. Corresponds to ECMA-376 ST_ShapeType 'line'. This line type is not a connector." +], +"type": "string" +} +}, +"type": "object" +}, +"LineConnection": { +"description": "The properties for one end of a Line connection.", +"id": "LineConnection", +"properties": { +"connectedObjectId": { +"description": "The object ID of the connected page element. Some page elements, such as groups, tables, and lines do not have connection sites and therefore cannot be connected to a connector line.", +"type": "string" +}, +"connectionSiteIndex": { +"description": "The index of the connection site on the connected page element. In most cases, it corresponds to the predefined connection site index from the ECMA-376 standard. More information on those connection sites can be found in the description of the \"cnx\" attribute in section 20.1.9.9 and Annex H. \"Predefined DrawingML Shape and Text Geometries\" of \"Office Open XML File Formats-Fundamentals and Markup Language Reference\", part 1 of [ECMA-376 5th edition] (http://www.ecma-international.org/publications/standards/Ecma-376.htm). The position of each connection site can also be viewed from Slides editor.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"LineFill": { +"description": "The fill of the line.", +"id": "LineFill", +"properties": { +"solidFill": { +"$ref": "SolidFill", +"description": "Solid color fill." +} +}, +"type": "object" +}, +"LineProperties": { +"description": "The properties of the Line. When unset, these fields default to values that match the appearance of new lines created in the Slides editor.", +"id": "LineProperties", +"properties": { +"dashStyle": { +"description": "The dash style of the line.", +"enum": [ +"DASH_STYLE_UNSPECIFIED", +"SOLID", +"DOT", +"DASH", +"DASH_DOT", +"LONG_DASH", +"LONG_DASH_DOT" +], +"enumDescriptions": [ +"Unspecified dash style.", +"Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'. This is the default dash style.", +"Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", +"Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", +"Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dashDot'.", +"Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal value 'lgDash'.", +"Alternating large dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal value 'lgDashDot'." +], +"type": "string" +}, +"endArrow": { +"description": "The style of the arrow at the end of the line.", +"enum": [ +"ARROW_STYLE_UNSPECIFIED", +"NONE", +"STEALTH_ARROW", +"FILL_ARROW", +"FILL_CIRCLE", +"FILL_SQUARE", +"FILL_DIAMOND", +"OPEN_ARROW", +"OPEN_CIRCLE", +"OPEN_SQUARE", +"OPEN_DIAMOND" +], +"enumDescriptions": [ +"An unspecified arrow style.", +"No arrow.", +"Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value 'stealth'.", +"Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", +"Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", +"Filled square.", +"Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", +"Hollow arrow.", +"Hollow circle.", +"Hollow square.", +"Hollow diamond." +], +"type": "string" +}, +"endConnection": { +"$ref": "LineConnection", +"description": "The connection at the end of the line. If unset, there is no connection. Only lines with a Type indicating it is a \"connector\" can have an `end_connection`." +}, +"lineFill": { +"$ref": "LineFill", +"description": "The fill of the line. The default line fill matches the defaults for new lines created in the Slides editor." +}, +"link": { +"$ref": "Link", +"description": "The hyperlink destination of the line. If unset, there is no link." +}, +"startArrow": { +"description": "The style of the arrow at the beginning of the line.", +"enum": [ +"ARROW_STYLE_UNSPECIFIED", +"NONE", +"STEALTH_ARROW", +"FILL_ARROW", +"FILL_CIRCLE", +"FILL_SQUARE", +"FILL_DIAMOND", +"OPEN_ARROW", +"OPEN_CIRCLE", +"OPEN_SQUARE", +"OPEN_DIAMOND" +], +"enumDescriptions": [ +"An unspecified arrow style.", +"No arrow.", +"Arrow with notched back. Corresponds to ECMA-376 ST_LineEndType value 'stealth'.", +"Filled arrow. Corresponds to ECMA-376 ST_LineEndType value 'triangle'.", +"Filled circle. Corresponds to ECMA-376 ST_LineEndType value 'oval'.", +"Filled square.", +"Filled diamond. Corresponds to ECMA-376 ST_LineEndType value 'diamond'.", +"Hollow arrow.", +"Hollow circle.", +"Hollow square.", +"Hollow diamond." +], +"type": "string" +}, +"startConnection": { +"$ref": "LineConnection", +"description": "The connection at the beginning of the line. If unset, there is no connection. Only lines with a Type indicating it is a \"connector\" can have a `start_connection`." +}, +"weight": { +"$ref": "Dimension", +"description": "The thickness of the line." +} +}, +"type": "object" +}, +"Link": { +"description": "A hypertext link.", +"id": "Link", +"properties": { +"pageObjectId": { +"description": "If set, indicates this is a link to the specific page in this presentation with this ID. A page with this ID may not exist.", +"type": "string" +}, +"relativeLink": { +"description": "If set, indicates this is a link to a slide in this presentation, addressed by its position.", +"enum": [ +"RELATIVE_SLIDE_LINK_UNSPECIFIED", +"NEXT_SLIDE", +"PREVIOUS_SLIDE", +"FIRST_SLIDE", +"LAST_SLIDE" +], +"enumDescriptions": [ +"An unspecified relative slide link.", +"A link to the next slide.", +"A link to the previous slide.", +"A link to the first slide in the presentation.", +"A link to the last slide in the presentation." +], +"type": "string" +}, +"slideIndex": { +"description": "If set, indicates this is a link to the slide at this zero-based index in the presentation. There may not be a slide at this index.", +"format": "int32", +"type": "integer" +}, +"url": { +"description": "If set, indicates this is a link to the external web page at this URL.", +"type": "string" +} +}, +"type": "object" +}, +"List": { +"description": "A List describes the look and feel of bullets belonging to paragraphs associated with a list. A paragraph that is part of a list has an implicit reference to that list's ID.", +"id": "List", +"properties": { +"listId": { +"description": "The ID of the list.", +"type": "string" +}, +"nestingLevel": { +"additionalProperties": { +"$ref": "NestingLevel" +}, +"description": "A map of nesting levels to the properties of bullets at the associated level. A list has at most nine levels of nesting, so the possible values for the keys of this map are 0 through 8, inclusive.", +"type": "object" +} +}, +"type": "object" +}, +"MasterProperties": { +"description": "The properties of Page that are only relevant for pages with page_type MASTER.", +"id": "MasterProperties", +"properties": { +"displayName": { +"description": "The human-readable name of the master.", +"type": "string" +} +}, +"type": "object" +}, +"MergeTableCellsRequest": { +"description": "Merges cells in a Table.", +"id": "MergeTableCellsRequest", +"properties": { +"objectId": { +"description": "The object ID of the table.", +"type": "string" +}, +"tableRange": { +"$ref": "TableRange", +"description": "The table range specifying which cells of the table to merge. Any text in the cells being merged will be concatenated and stored in the upper-left (\"head\") cell of the range. If the range is non-rectangular (which can occur in some cases where the range covers cells that are already merged), a 400 bad request error is returned." +} +}, +"type": "object" +}, +"NestingLevel": { +"description": "Contains properties describing the look and feel of a list bullet at a given level of nesting.", +"id": "NestingLevel", +"properties": { +"bulletStyle": { +"$ref": "TextStyle", +"description": "The style of a bullet at this level of nesting." +} +}, +"type": "object" +}, +"NotesProperties": { +"description": "The properties of Page that are only relevant for pages with page_type NOTES.", +"id": "NotesProperties", +"properties": { +"speakerNotesObjectId": { +"description": "The object ID of the shape on this notes page that contains the speaker notes for the corresponding slide. The actual shape may not always exist on the notes page. Inserting text using this object ID will automatically create the shape. In this case, the actual shape may have different object ID. The `GetPresentation` or `GetPage` action will always return the latest object ID.", +"type": "string" +} +}, +"type": "object" +}, +"OpaqueColor": { +"description": "A themeable solid color value.", +"id": "OpaqueColor", +"properties": { +"rgbColor": { +"$ref": "RgbColor", +"description": "An opaque RGB color." +}, +"themeColor": { +"description": "An opaque theme color.", +"enum": [ +"THEME_COLOR_TYPE_UNSPECIFIED", +"DARK1", +"LIGHT1", +"DARK2", +"LIGHT2", +"ACCENT1", +"ACCENT2", +"ACCENT3", +"ACCENT4", +"ACCENT5", +"ACCENT6", +"HYPERLINK", +"FOLLOWED_HYPERLINK", +"TEXT1", +"BACKGROUND1", +"TEXT2", +"BACKGROUND2" +], +"enumDescriptions": [ +"Unspecified theme color. This value should not be used.", +"Represents the first dark color.", +"Represents the first light color.", +"Represents the second dark color.", +"Represents the second light color.", +"Represents the first accent color.", +"Represents the second accent color.", +"Represents the third accent color.", +"Represents the fourth accent color.", +"Represents the fifth accent color.", +"Represents the sixth accent color.", +"Represents the color to use for hyperlinks.", +"Represents the color to use for visited hyperlinks.", +"Represents the first text color.", +"Represents the first background color.", +"Represents the second text color.", +"Represents the second background color." +], +"type": "string" +} +}, +"type": "object" +}, +"OptionalColor": { +"description": "A color that can either be fully opaque or fully transparent.", +"id": "OptionalColor", +"properties": { +"opaqueColor": { +"$ref": "OpaqueColor", +"description": "If set, this will be used as an opaque color. If unset, this represents a transparent color." +} +}, +"type": "object" +}, +"Outline": { +"description": "The outline of a PageElement. If these fields are unset, they may be inherited from a parent placeholder if it exists. If there is no parent, the fields will default to the value used for new page elements created in the Slides editor, which may depend on the page element kind.", +"id": "Outline", +"properties": { +"dashStyle": { +"description": "The dash style of the outline.", +"enum": [ +"DASH_STYLE_UNSPECIFIED", +"SOLID", +"DOT", +"DASH", +"DASH_DOT", +"LONG_DASH", +"LONG_DASH_DOT" +], +"enumDescriptions": [ +"Unspecified dash style.", +"Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'. This is the default dash style.", +"Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", +"Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", +"Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dashDot'.", +"Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal value 'lgDash'.", +"Alternating large dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal value 'lgDashDot'." +], +"type": "string" +}, +"outlineFill": { +"$ref": "OutlineFill", +"description": "The fill of the outline." +}, +"propertyState": { +"description": "The outline property state. Updating the outline on a page element will implicitly update this field to `RENDERED`, unless another value is specified in the same request. To have no outline on a page element, set this field to `NOT_RENDERED`. In this case, any other outline fields set in the same request will be ignored.", +"enum": [ +"RENDERED", +"NOT_RENDERED", +"INHERIT" +], +"enumDescriptions": [ +"If a property's state is RENDERED, then the element has the corresponding property when rendered on a page. If the element is a placeholder shape as determined by the placeholder field, and it inherits from a placeholder shape, the corresponding field may be unset, meaning that the property value is inherited from a parent placeholder. If the element does not inherit, then the field will contain the rendered value. This is the default value.", +"If a property's state is NOT_RENDERED, then the element does not have the corresponding property when rendered on a page. However, the field may still be set so it can be inherited by child shapes. To remove a property from a rendered element, set its property_state to NOT_RENDERED.", +"If a property's state is INHERIT, then the property state uses the value of corresponding `property_state` field on the parent shape. Elements that do not inherit will never have an INHERIT property state." +], +"type": "string" +}, +"weight": { +"$ref": "Dimension", +"description": "The thickness of the outline." +} +}, +"type": "object" +}, +"OutlineFill": { +"description": "The fill of the outline.", +"id": "OutlineFill", +"properties": { +"solidFill": { +"$ref": "SolidFill", +"description": "Solid color fill." +} +}, +"type": "object" +}, +"Page": { +"description": "A page in a presentation.", +"id": "Page", +"properties": { +"layoutProperties": { +"$ref": "LayoutProperties", +"description": "Layout specific properties. Only set if page_type = LAYOUT." +}, +"masterProperties": { +"$ref": "MasterProperties", +"description": "Master specific properties. Only set if page_type = MASTER." +}, +"notesProperties": { +"$ref": "NotesProperties", +"description": "Notes specific properties. Only set if page_type = NOTES." +}, +"objectId": { +"description": "The object ID for this page. Object IDs used by Page and PageElement share the same namespace.", +"type": "string" +}, +"pageElements": { +"description": "The page elements rendered on the page.", +"items": { +"$ref": "PageElement" +}, +"type": "array" +}, +"pageProperties": { +"$ref": "PageProperties", +"description": "The properties of the page." +}, +"pageType": { +"description": "The type of the page.", +"enum": [ +"SLIDE", +"MASTER", +"LAYOUT", +"NOTES", +"NOTES_MASTER" +], +"enumDescriptions": [ +"A slide page.", +"A master slide page.", +"A layout page.", +"A notes page.", +"A notes master page." +], +"type": "string" +}, +"revisionId": { +"description": "Output only. The revision ID of the presentation. Can be used in update requests to assert the presentation revision hasn't changed since the last read operation. Only populated if the user has edit access to the presentation. The revision ID is not a sequential number but an opaque string. The format of the revision ID might change over time. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the presentation has not changed. Conversely, a changed ID (for the same presentation and user) usually means the presentation has been updated. However, a changed ID can also be due to internal factors such as ID format changes.", +"type": "string" +}, +"slideProperties": { +"$ref": "SlideProperties", +"description": "Slide specific properties. Only set if page_type = SLIDE." +} +}, +"type": "object" +}, +"PageBackgroundFill": { +"description": "The page background fill.", +"id": "PageBackgroundFill", +"properties": { +"propertyState": { +"description": "The background fill property state. Updating the fill on a page will implicitly update this field to `RENDERED`, unless another value is specified in the same request. To have no fill on a page, set this field to `NOT_RENDERED`. In this case, any other fill fields set in the same request will be ignored.", +"enum": [ +"RENDERED", +"NOT_RENDERED", +"INHERIT" +], +"enumDescriptions": [ +"If a property's state is RENDERED, then the element has the corresponding property when rendered on a page. If the element is a placeholder shape as determined by the placeholder field, and it inherits from a placeholder shape, the corresponding field may be unset, meaning that the property value is inherited from a parent placeholder. If the element does not inherit, then the field will contain the rendered value. This is the default value.", +"If a property's state is NOT_RENDERED, then the element does not have the corresponding property when rendered on a page. However, the field may still be set so it can be inherited by child shapes. To remove a property from a rendered element, set its property_state to NOT_RENDERED.", +"If a property's state is INHERIT, then the property state uses the value of corresponding `property_state` field on the parent shape. Elements that do not inherit will never have an INHERIT property state." +], +"type": "string" +}, +"solidFill": { +"$ref": "SolidFill", +"description": "Solid color fill." +}, +"stretchedPictureFill": { +"$ref": "StretchedPictureFill", +"description": "Stretched picture fill." +} +}, +"type": "object" +}, +"PageElement": { +"description": "A visual element rendered on a page.", +"id": "PageElement", +"properties": { +"description": { +"description": "The description of the page element. Combined with title to display alt text. The field is not supported for Group elements.", +"type": "string" +}, +"elementGroup": { +"$ref": "Group", +"description": "A collection of page elements joined as a single unit." +}, +"image": { +"$ref": "Image", +"description": "An image page element." +}, +"line": { +"$ref": "Line", +"description": "A line page element." +}, +"objectId": { +"description": "The object ID for this page element. Object IDs used by google.apps.slides.v1.Page and google.apps.slides.v1.PageElement share the same namespace.", +"type": "string" +}, +"shape": { +"$ref": "Shape", +"description": "A generic shape." +}, +"sheetsChart": { +"$ref": "SheetsChart", +"description": "A linked chart embedded from Google Sheets. Unlinked charts are represented as images." +}, +"size": { +"$ref": "Size", +"description": "The size of the page element." +}, +"speakerSpotlight": { +"$ref": "SpeakerSpotlight", +"description": "A Speaker Spotlight." +}, +"table": { +"$ref": "Table", +"description": "A table page element." +}, +"title": { +"description": "The title of the page element. Combined with description to display alt text. The field is not supported for Group elements.", +"type": "string" +}, +"transform": { +"$ref": "AffineTransform", +"description": "The transform of the page element. The visual appearance of the page element is determined by its absolute transform. To compute the absolute transform, preconcatenate a page element's transform with the transforms of all of its parent groups. If the page element is not in a group, its absolute transform is the same as the value in this field. The initial transform for the newly created Group is always the identity transform." +}, +"video": { +"$ref": "Video", +"description": "A video page element." +}, +"wordArt": { +"$ref": "WordArt", +"description": "A word art page element." +} +}, +"type": "object" +}, +"PageElementProperties": { +"description": "Common properties for a page element. Note: When you initially create a PageElement, the API may modify the values of both `size` and `transform`, but the visual size will be unchanged.", +"id": "PageElementProperties", +"properties": { +"pageObjectId": { +"description": "The object ID of the page where the element is located.", +"type": "string" +}, +"size": { +"$ref": "Size", +"description": "The size of the element." +}, +"transform": { +"$ref": "AffineTransform", +"description": "The transform for the element." +} +}, +"type": "object" +}, +"PageProperties": { +"description": "The properties of the Page. The page will inherit properties from the parent page. Depending on the page type the hierarchy is defined in either SlideProperties or LayoutProperties.", +"id": "PageProperties", +"properties": { +"colorScheme": { +"$ref": "ColorScheme", +"description": "The color scheme of the page. If unset, the color scheme is inherited from a parent page. If the page has no parent, the color scheme uses a default Slides color scheme, matching the defaults in the Slides editor. Only the concrete colors of the first 12 ThemeColorTypes are editable. In addition, only the color scheme on `Master` pages can be updated. To update the field, a color scheme containing mappings from all the first 12 ThemeColorTypes to their concrete colors must be provided. Colors for the remaining ThemeColorTypes will be ignored." +}, +"pageBackgroundFill": { +"$ref": "PageBackgroundFill", +"description": "The background fill of the page. If unset, the background fill is inherited from a parent page if it exists. If the page has no parent, then the background fill defaults to the corresponding fill in the Slides editor." +} +}, +"type": "object" +}, +"ParagraphMarker": { +"description": "A TextElement kind that represents the beginning of a new paragraph.", +"id": "ParagraphMarker", +"properties": { +"bullet": { +"$ref": "Bullet", +"description": "The bullet for this paragraph. If not present, the paragraph does not belong to a list." +}, +"style": { +"$ref": "ParagraphStyle", +"description": "The paragraph's style" +} +}, +"type": "object" +}, +"ParagraphStyle": { +"description": "Styles that apply to a whole paragraph. If this text is contained in a shape with a parent placeholder, then these paragraph styles may be inherited from the parent. Which paragraph styles are inherited depend on the nesting level of lists: * A paragraph not in a list will inherit its paragraph style from the paragraph at the 0 nesting level of the list inside the parent placeholder. * A paragraph in a list will inherit its paragraph style from the paragraph at its corresponding nesting level of the list inside the parent placeholder. Inherited paragraph styles are represented as unset fields in this message.", +"id": "ParagraphStyle", +"properties": { +"alignment": { +"description": "The text alignment for this paragraph.", +"enum": [ +"ALIGNMENT_UNSPECIFIED", +"START", +"CENTER", +"END", +"JUSTIFIED" +], +"enumDescriptions": [ +"The paragraph alignment is inherited from the parent.", +"The paragraph is aligned to the start of the line. Left-aligned for LTR text, right-aligned otherwise.", +"The paragraph is centered.", +"The paragraph is aligned to the end of the line. Right-aligned for LTR text, left-aligned otherwise.", +"The paragraph is justified." +], +"type": "string" +}, +"direction": { +"description": "The text direction of this paragraph. If unset, the value defaults to LEFT_TO_RIGHT since text direction is not inherited.", +"enum": [ +"TEXT_DIRECTION_UNSPECIFIED", +"LEFT_TO_RIGHT", +"RIGHT_TO_LEFT" +], +"enumDescriptions": [ +"The text direction is inherited from the parent.", +"The text goes from left to right.", +"The text goes from right to left." +], +"type": "string" +}, +"indentEnd": { +"$ref": "Dimension", +"description": "The amount indentation for the paragraph on the side that corresponds to the end of the text, based on the current text direction. If unset, the value is inherited from the parent." +}, +"indentFirstLine": { +"$ref": "Dimension", +"description": "The amount of indentation for the start of the first line of the paragraph. If unset, the value is inherited from the parent." +}, +"indentStart": { +"$ref": "Dimension", +"description": "The amount indentation for the paragraph on the side that corresponds to the start of the text, based on the current text direction. If unset, the value is inherited from the parent." +}, +"lineSpacing": { +"description": "The amount of space between lines, as a percentage of normal, where normal is represented as 100.0. If unset, the value is inherited from the parent.", +"format": "float", +"type": "number" +}, +"spaceAbove": { +"$ref": "Dimension", +"description": "The amount of extra space above the paragraph. If unset, the value is inherited from the parent." +}, +"spaceBelow": { +"$ref": "Dimension", +"description": "The amount of extra space below the paragraph. If unset, the value is inherited from the parent." +}, +"spacingMode": { +"description": "The spacing mode for the paragraph.", +"enum": [ +"SPACING_MODE_UNSPECIFIED", +"NEVER_COLLAPSE", +"COLLAPSE_LISTS" +], +"enumDescriptions": [ +"The spacing mode is inherited from the parent.", +"Paragraph spacing is always rendered.", +"Paragraph spacing is skipped between list elements." +], +"type": "string" +} +}, +"type": "object" +}, +"Placeholder": { +"description": "The placeholder information that uniquely identifies a placeholder shape.", +"id": "Placeholder", +"properties": { +"index": { +"description": "The index of the placeholder. If the same placeholder types are present in the same page, they would have different index values.", +"format": "int32", +"type": "integer" +}, +"parentObjectId": { +"description": "The object ID of this shape's parent placeholder. If unset, the parent placeholder shape does not exist, so the shape does not inherit properties from any other shape.", +"type": "string" +}, +"type": { +"description": "The type of the placeholder.", +"enum": [ +"NONE", +"BODY", +"CHART", +"CLIP_ART", +"CENTERED_TITLE", +"DIAGRAM", +"DATE_AND_TIME", +"FOOTER", +"HEADER", +"MEDIA", +"OBJECT", +"PICTURE", +"SLIDE_NUMBER", +"SUBTITLE", +"TABLE", +"TITLE", +"SLIDE_IMAGE" +], +"enumDescriptions": [ +"Default value, signifies it is not a placeholder.", +"Body text.", +"Chart or graph.", +"Clip art image.", +"Title centered.", +"Diagram.", +"Date and time.", +"Footer text.", +"Header text.", +"Multimedia.", +"Any content type.", +"Picture.", +"Number of a slide.", +"Subtitle.", +"Table.", +"Slide title.", +"Slide image." +], +"type": "string" +} +}, +"type": "object" +}, +"Presentation": { +"description": "A Google Slides presentation.", +"id": "Presentation", +"properties": { +"layouts": { +"description": "The layouts in the presentation. A layout is a template that determines how content is arranged and styled on the slides that inherit from that layout.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"locale": { +"description": "The locale of the presentation, as an IETF BCP 47 language tag.", +"type": "string" +}, +"masters": { +"description": "The slide masters in the presentation. A slide master contains all common page elements and the common properties for a set of layouts. They serve three purposes: - Placeholder shapes on a master contain the default text styles and shape properties of all placeholder shapes on pages that use that master. - The master page properties define the common page properties inherited by its layouts. - Any other shapes on the master slide appear on all slides using that master, regardless of their layout.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"notesMaster": { +"$ref": "Page", +"description": "The notes master in the presentation. It serves three purposes: - Placeholder shapes on a notes master contain the default text styles and shape properties of all placeholder shapes on notes pages. Specifically, a `SLIDE_IMAGE` placeholder shape contains the slide thumbnail, and a `BODY` placeholder shape contains the speaker notes. - The notes master page properties define the common page properties inherited by all notes pages. - Any other shapes on the notes master appear on all notes pages. The notes master is read-only." +}, +"pageSize": { +"$ref": "Size", +"description": "The size of pages in the presentation." +}, +"presentationId": { +"description": "The ID of the presentation.", +"type": "string" +}, +"revisionId": { +"description": "Output only. The revision ID of the presentation. Can be used in update requests to assert the presentation revision hasn't changed since the last read operation. Only populated if the user has edit access to the presentation. The revision ID is not a sequential number but a nebulous string. The format of the revision ID may change over time, so it should be treated opaquely. A returned revision ID is only guaranteed to be valid for 24 hours after it has been returned and cannot be shared across users. If the revision ID is unchanged between calls, then the presentation has not changed. Conversely, a changed ID (for the same presentation and user) usually means the presentation has been updated. However, a changed ID can also be due to internal factors such as ID format changes.", +"type": "string" +}, +"slides": { +"description": "The slides in the presentation. A slide inherits properties from a slide layout.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"title": { +"description": "The title of the presentation.", +"type": "string" +} +}, +"type": "object" +}, +"Range": { +"description": "Specifies a contiguous range of an indexed collection, such as characters in text.", +"id": "Range", +"properties": { +"endIndex": { +"description": "The optional zero-based index of the end of the collection. Required for `FIXED_RANGE` ranges.", +"format": "int32", +"type": "integer" +}, +"startIndex": { +"description": "The optional zero-based index of the beginning of the collection. Required for `FIXED_RANGE` and `FROM_START_INDEX` ranges.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "The type of range.", +"enum": [ +"RANGE_TYPE_UNSPECIFIED", +"FIXED_RANGE", +"FROM_START_INDEX", +"ALL" +], +"enumDescriptions": [ +"Unspecified range type. This value must not be used.", +"A fixed range. Both the `start_index` and `end_index` must be specified.", +"Starts the range at `start_index` and continues until the end of the collection. The `end_index` must not be specified.", +"Sets the range to be the whole length of the collection. Both the `start_index` and the `end_index` must not be specified." +], +"type": "string" +} +}, +"type": "object" +}, +"Recolor": { +"description": "A recolor effect applied on an image.", +"id": "Recolor", +"properties": { +"name": { +"description": "The name of the recolor effect. The name is determined from the `recolor_stops` by matching the gradient against the colors in the page's current color scheme. This property is read-only.", +"enum": [ +"NONE", +"LIGHT1", +"LIGHT2", +"LIGHT3", +"LIGHT4", +"LIGHT5", +"LIGHT6", +"LIGHT7", +"LIGHT8", +"LIGHT9", +"LIGHT10", +"DARK1", +"DARK2", +"DARK3", +"DARK4", +"DARK5", +"DARK6", +"DARK7", +"DARK8", +"DARK9", +"DARK10", +"GRAYSCALE", +"NEGATIVE", +"SEPIA", +"CUSTOM" +], +"enumDescriptions": [ +"No recolor effect. The default value.", +"A recolor effect that lightens the image using the page's first available color from its color scheme.", +"A recolor effect that lightens the image using the page's second available color from its color scheme.", +"A recolor effect that lightens the image using the page's third available color from its color scheme.", +"A recolor effect that lightens the image using the page's forth available color from its color scheme.", +"A recolor effect that lightens the image using the page's fifth available color from its color scheme.", +"A recolor effect that lightens the image using the page's sixth available color from its color scheme.", +"A recolor effect that lightens the image using the page's seventh available color from its color scheme.", +"A recolor effect that lightens the image using the page's eighth available color from its color scheme.", +"A recolor effect that lightens the image using the page's ninth available color from its color scheme.", +"A recolor effect that lightens the image using the page's tenth available color from its color scheme.", +"A recolor effect that darkens the image using the page's first available color from its color scheme.", +"A recolor effect that darkens the image using the page's second available color from its color scheme.", +"A recolor effect that darkens the image using the page's third available color from its color scheme.", +"A recolor effect that darkens the image using the page's fourth available color from its color scheme.", +"A recolor effect that darkens the image using the page's fifth available color from its color scheme.", +"A recolor effect that darkens the image using the page's sixth available color from its color scheme.", +"A recolor effect that darkens the image using the page's seventh available color from its color scheme.", +"A recolor effect that darkens the image using the page's eighth available color from its color scheme.", +"A recolor effect that darkens the image using the page's ninth available color from its color scheme.", +"A recolor effect that darkens the image using the page's tenth available color from its color scheme.", +"A recolor effect that recolors the image to grayscale.", +"A recolor effect that recolors the image to negative grayscale.", +"A recolor effect that recolors the image using the sepia color.", +"Custom recolor effect. Refer to `recolor_stops` for the concrete gradient." +], +"type": "string" +}, +"recolorStops": { +"description": "The recolor effect is represented by a gradient, which is a list of color stops. The colors in the gradient will replace the corresponding colors at the same position in the color palette and apply to the image. This property is read-only.", +"items": { +"$ref": "ColorStop" +}, +"type": "array" +} +}, +"type": "object" +}, +"RefreshSheetsChartRequest": { +"description": "Refreshes an embedded Google Sheets chart by replacing it with the latest version of the chart from Google Sheets. NOTE: Refreshing charts requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.", +"id": "RefreshSheetsChartRequest", +"properties": { +"objectId": { +"description": "The object ID of the chart to refresh.", +"type": "string" +} +}, +"type": "object" +}, +"ReplaceAllShapesWithImageRequest": { +"description": "Replaces all shapes that match the given criteria with the provided image. The images replacing the shapes are rectangular after being inserted into the presentation and do not take on the forms of the shapes.", +"id": "ReplaceAllShapesWithImageRequest", +"properties": { +"containsText": { +"$ref": "SubstringMatchCriteria", +"description": "If set, this request will replace all of the shapes that contain the given text." +}, +"imageReplaceMethod": { +"description": "The image replace method. If you specify both a `replace_method` and an `image_replace_method`, the `image_replace_method` takes precedence. If you do not specify a value for `image_replace_method`, but specify a value for `replace_method`, then the specified `replace_method` value is used. If you do not specify either, then CENTER_INSIDE is used.", +"enum": [ +"IMAGE_REPLACE_METHOD_UNSPECIFIED", +"CENTER_INSIDE", +"CENTER_CROP" +], +"enumDescriptions": [ +"Unspecified image replace method. This value must not be used.", +"Scales and centers the image to fit within the bounds of the original shape and maintains the image's aspect ratio. The rendered size of the image may be smaller than the size of the shape. This is the default method when one is not specified.", +"Scales and centers the image to fill the bounds of the original shape. The image may be cropped in order to fill the shape. The rendered size of the image will be the same as the original shape." +], +"type": "string" +}, +"imageUrl": { +"description": "The image URL. The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format. The provided URL can be at most 2 kB in length. The URL itself is saved with the image, and exposed via the Image.source_url field.", +"type": "string" +}, +"pageObjectIds": { +"description": "If non-empty, limits the matches to page elements only on the given pages. Returns a 400 bad request error if given the page object ID of a notes page or a notes master, or if a page with that object ID doesn't exist in the presentation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replaceMethod": { +"deprecated": true, +"description": "The replace method. *Deprecated*: use `image_replace_method` instead. If you specify both a `replace_method` and an `image_replace_method`, the `image_replace_method` takes precedence.", +"enum": [ +"CENTER_INSIDE", +"CENTER_CROP" +], +"enumDescriptions": [ +"Scales and centers the image to fit within the bounds of the original shape and maintains the image's aspect ratio. The rendered size of the image may be smaller than the size of the shape. This is the default method when one is not specified.", +"Scales and centers the image to fill the bounds of the original shape. The image may be cropped in order to fill the shape. The rendered size of the image will be the same as that of the original shape." +], +"type": "string" +} +}, +"type": "object" +}, +"ReplaceAllShapesWithImageResponse": { +"description": "The result of replacing shapes with an image.", +"id": "ReplaceAllShapesWithImageResponse", +"properties": { +"occurrencesChanged": { +"description": "The number of shapes replaced with images.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ReplaceAllShapesWithSheetsChartRequest": { +"description": "Replaces all shapes that match the given criteria with the provided Google Sheets chart. The chart will be scaled and centered to fit within the bounds of the original shape. NOTE: Replacing shapes with a chart requires at least one of the spreadsheets.readonly, spreadsheets, drive.readonly, or drive OAuth scopes.", +"id": "ReplaceAllShapesWithSheetsChartRequest", +"properties": { +"chartId": { +"description": "The ID of the specific chart in the Google Sheets spreadsheet.", +"format": "int32", +"type": "integer" +}, +"containsText": { +"$ref": "SubstringMatchCriteria", +"description": "The criteria that the shapes must match in order to be replaced. The request will replace all of the shapes that contain the given text." +}, +"linkingMode": { +"description": "The mode with which the chart is linked to the source spreadsheet. When not specified, the chart will be an image that is not linked.", +"enum": [ +"NOT_LINKED_IMAGE", +"LINKED" +], +"enumDescriptions": [ +"The chart is not associated with the source spreadsheet and cannot be updated. A chart that is not linked will be inserted as an image.", +"Linking the chart allows it to be updated, and other collaborators will see a link to the spreadsheet." +], +"type": "string" +}, +"pageObjectIds": { +"description": "If non-empty, limits the matches to page elements only on the given pages. Returns a 400 bad request error if given the page object ID of a notes page or a notes master, or if a page with that object ID doesn't exist in the presentation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"spreadsheetId": { +"description": "The ID of the Google Sheets spreadsheet that contains the chart.", +"type": "string" +} +}, +"type": "object" +}, +"ReplaceAllShapesWithSheetsChartResponse": { +"description": "The result of replacing shapes with a Google Sheets chart.", +"id": "ReplaceAllShapesWithSheetsChartResponse", +"properties": { +"occurrencesChanged": { +"description": "The number of shapes replaced with charts.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ReplaceAllTextRequest": { +"description": "Replaces all instances of text matching a criteria with replace text.", +"id": "ReplaceAllTextRequest", +"properties": { +"containsText": { +"$ref": "SubstringMatchCriteria", +"description": "Finds text in a shape matching this substring." +}, +"pageObjectIds": { +"description": "If non-empty, limits the matches to page elements only on the given pages. Returns a 400 bad request error if given the page object ID of a notes master, or if a page with that object ID doesn't exist in the presentation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replaceText": { +"description": "The text that will replace the matched text.", +"type": "string" +} +}, +"type": "object" +}, +"ReplaceAllTextResponse": { +"description": "The result of replacing text.", +"id": "ReplaceAllTextResponse", +"properties": { +"occurrencesChanged": { +"description": "The number of occurrences changed by replacing all text.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ReplaceImageRequest": { +"description": "Replaces an existing image with a new image. Replacing an image removes some image effects from the existing image.", +"id": "ReplaceImageRequest", +"properties": { +"imageObjectId": { +"description": "The ID of the existing image that will be replaced. The ID can be retrieved from the response of a get request.", +"type": "string" +}, +"imageReplaceMethod": { +"description": "The replacement method.", +"enum": [ +"IMAGE_REPLACE_METHOD_UNSPECIFIED", +"CENTER_INSIDE", +"CENTER_CROP" +], +"enumDescriptions": [ +"Unspecified image replace method. This value must not be used.", +"Scales and centers the image to fit within the bounds of the original shape and maintains the image's aspect ratio. The rendered size of the image may be smaller than the size of the shape. This is the default method when one is not specified.", +"Scales and centers the image to fill the bounds of the original shape. The image may be cropped in order to fill the shape. The rendered size of the image will be the same as the original shape." +], +"type": "string" +}, +"url": { +"description": "The image URL. The image is fetched once at insertion time and a copy is stored for display inside the presentation. Images must be less than 50MB, cannot exceed 25 megapixels, and must be in PNG, JPEG, or GIF format. The provided URL can't surpass 2 KB in length. The URL is saved with the image, and exposed through the Image.source_url field.", +"type": "string" +} +}, +"type": "object" +}, +"Request": { +"description": "A single kind of update to apply to a presentation.", +"id": "Request", +"properties": { +"createImage": { +"$ref": "CreateImageRequest", +"description": "Creates an image." +}, +"createLine": { +"$ref": "CreateLineRequest", +"description": "Creates a line." +}, +"createParagraphBullets": { +"$ref": "CreateParagraphBulletsRequest", +"description": "Creates bullets for paragraphs." +}, +"createShape": { +"$ref": "CreateShapeRequest", +"description": "Creates a new shape." +}, +"createSheetsChart": { +"$ref": "CreateSheetsChartRequest", +"description": "Creates an embedded Google Sheets chart." +}, +"createSlide": { +"$ref": "CreateSlideRequest", +"description": "Creates a new slide." +}, +"createTable": { +"$ref": "CreateTableRequest", +"description": "Creates a new table." +}, +"createVideo": { +"$ref": "CreateVideoRequest", +"description": "Creates a video." +}, +"deleteObject": { +"$ref": "DeleteObjectRequest", +"description": "Deletes a page or page element from the presentation." +}, +"deleteParagraphBullets": { +"$ref": "DeleteParagraphBulletsRequest", +"description": "Deletes bullets from paragraphs." +}, +"deleteTableColumn": { +"$ref": "DeleteTableColumnRequest", +"description": "Deletes a column from a table." +}, +"deleteTableRow": { +"$ref": "DeleteTableRowRequest", +"description": "Deletes a row from a table." +}, +"deleteText": { +"$ref": "DeleteTextRequest", +"description": "Deletes text from a shape or a table cell." +}, +"duplicateObject": { +"$ref": "DuplicateObjectRequest", +"description": "Duplicates a slide or page element." +}, +"groupObjects": { +"$ref": "GroupObjectsRequest", +"description": "Groups objects, such as page elements." +}, +"insertTableColumns": { +"$ref": "InsertTableColumnsRequest", +"description": "Inserts columns into a table." +}, +"insertTableRows": { +"$ref": "InsertTableRowsRequest", +"description": "Inserts rows into a table." +}, +"insertText": { +"$ref": "InsertTextRequest", +"description": "Inserts text into a shape or table cell." +}, +"mergeTableCells": { +"$ref": "MergeTableCellsRequest", +"description": "Merges cells in a Table." +}, +"refreshSheetsChart": { +"$ref": "RefreshSheetsChartRequest", +"description": "Refreshes a Google Sheets chart." +}, +"replaceAllShapesWithImage": { +"$ref": "ReplaceAllShapesWithImageRequest", +"description": "Replaces all shapes matching some criteria with an image." +}, +"replaceAllShapesWithSheetsChart": { +"$ref": "ReplaceAllShapesWithSheetsChartRequest", +"description": "Replaces all shapes matching some criteria with a Google Sheets chart." +}, +"replaceAllText": { +"$ref": "ReplaceAllTextRequest", +"description": "Replaces all instances of specified text." +}, +"replaceImage": { +"$ref": "ReplaceImageRequest", +"description": "Replaces an existing image with a new image." +}, +"rerouteLine": { +"$ref": "RerouteLineRequest", +"description": "Reroutes a line such that it's connected at the two closest connection sites on the connected page elements." +}, +"ungroupObjects": { +"$ref": "UngroupObjectsRequest", +"description": "Ungroups objects, such as groups." +}, +"unmergeTableCells": { +"$ref": "UnmergeTableCellsRequest", +"description": "Unmerges cells in a Table." +}, +"updateImageProperties": { +"$ref": "UpdateImagePropertiesRequest", +"description": "Updates the properties of an Image." +}, +"updateLineCategory": { +"$ref": "UpdateLineCategoryRequest", +"description": "Updates the category of a line." +}, +"updateLineProperties": { +"$ref": "UpdateLinePropertiesRequest", +"description": "Updates the properties of a Line." +}, +"updatePageElementAltText": { +"$ref": "UpdatePageElementAltTextRequest", +"description": "Updates the alt text title and/or description of a page element." +}, +"updatePageElementTransform": { +"$ref": "UpdatePageElementTransformRequest", +"description": "Updates the transform of a page element." +}, +"updatePageElementsZOrder": { +"$ref": "UpdatePageElementsZOrderRequest", +"description": "Updates the Z-order of page elements." +}, +"updatePageProperties": { +"$ref": "UpdatePagePropertiesRequest", +"description": "Updates the properties of a Page." +}, +"updateParagraphStyle": { +"$ref": "UpdateParagraphStyleRequest", +"description": "Updates the styling of paragraphs within a Shape or Table." +}, +"updateShapeProperties": { +"$ref": "UpdateShapePropertiesRequest", +"description": "Updates the properties of a Shape." +}, +"updateSlideProperties": { +"$ref": "UpdateSlidePropertiesRequest", +"description": "Updates the properties of a Slide" +}, +"updateSlidesPosition": { +"$ref": "UpdateSlidesPositionRequest", +"description": "Updates the position of a set of slides in the presentation." +}, +"updateTableBorderProperties": { +"$ref": "UpdateTableBorderPropertiesRequest", +"description": "Updates the properties of the table borders in a Table." +}, +"updateTableCellProperties": { +"$ref": "UpdateTableCellPropertiesRequest", +"description": "Updates the properties of a TableCell." +}, +"updateTableColumnProperties": { +"$ref": "UpdateTableColumnPropertiesRequest", +"description": "Updates the properties of a Table column." +}, +"updateTableRowProperties": { +"$ref": "UpdateTableRowPropertiesRequest", +"description": "Updates the properties of a Table row." +}, +"updateTextStyle": { +"$ref": "UpdateTextStyleRequest", +"description": "Updates the styling of text within a Shape or Table." +}, +"updateVideoProperties": { +"$ref": "UpdateVideoPropertiesRequest", +"description": "Updates the properties of a Video." +} +}, +"type": "object" +}, +"RerouteLineRequest": { +"description": "Reroutes a line such that it's connected at the two closest connection sites on the connected page elements.", +"id": "RerouteLineRequest", +"properties": { +"objectId": { +"description": "The object ID of the line to reroute. Only a line with a category indicating it is a \"connector\" can be rerouted. The start and end connections of the line must be on different page elements.", +"type": "string" +} +}, +"type": "object" +}, +"Response": { +"description": "A single response from an update.", +"id": "Response", +"properties": { +"createImage": { +"$ref": "CreateImageResponse", +"description": "The result of creating an image." +}, +"createLine": { +"$ref": "CreateLineResponse", +"description": "The result of creating a line." +}, +"createShape": { +"$ref": "CreateShapeResponse", +"description": "The result of creating a shape." +}, +"createSheetsChart": { +"$ref": "CreateSheetsChartResponse", +"description": "The result of creating a Google Sheets chart." +}, +"createSlide": { +"$ref": "CreateSlideResponse", +"description": "The result of creating a slide." +}, +"createTable": { +"$ref": "CreateTableResponse", +"description": "The result of creating a table." +}, +"createVideo": { +"$ref": "CreateVideoResponse", +"description": "The result of creating a video." +}, +"duplicateObject": { +"$ref": "DuplicateObjectResponse", +"description": "The result of duplicating an object." +}, +"groupObjects": { +"$ref": "GroupObjectsResponse", +"description": "The result of grouping objects." +}, +"replaceAllShapesWithImage": { +"$ref": "ReplaceAllShapesWithImageResponse", +"description": "The result of replacing all shapes matching some criteria with an image." +}, +"replaceAllShapesWithSheetsChart": { +"$ref": "ReplaceAllShapesWithSheetsChartResponse", +"description": "The result of replacing all shapes matching some criteria with a Google Sheets chart." +}, +"replaceAllText": { +"$ref": "ReplaceAllTextResponse", +"description": "The result of replacing text." +} +}, +"type": "object" +}, +"RgbColor": { +"description": "An RGB color.", +"id": "RgbColor", +"properties": { +"blue": { +"description": "The blue component of the color, from 0.0 to 1.0.", +"format": "float", +"type": "number" +}, +"green": { +"description": "The green component of the color, from 0.0 to 1.0.", +"format": "float", +"type": "number" +}, +"red": { +"description": "The red component of the color, from 0.0 to 1.0.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"Shadow": { +"description": "The shadow properties of a page element. If these fields are unset, they may be inherited from a parent placeholder if it exists. If there is no parent, the fields will default to the value used for new page elements created in the Slides editor, which may depend on the page element kind.", +"id": "Shadow", +"properties": { +"alignment": { +"description": "The alignment point of the shadow, that sets the origin for translate, scale and skew of the shadow. This property is read-only.", +"enum": [ +"RECTANGLE_POSITION_UNSPECIFIED", +"TOP_LEFT", +"TOP_CENTER", +"TOP_RIGHT", +"LEFT_CENTER", +"CENTER", +"RIGHT_CENTER", +"BOTTOM_LEFT", +"BOTTOM_CENTER", +"BOTTOM_RIGHT" +], +"enumDescriptions": [ +"Unspecified.", +"Top left.", +"Top center.", +"Top right.", +"Left center.", +"Center.", +"Right center.", +"Bottom left.", +"Bottom center.", +"Bottom right." +], +"type": "string" +}, +"alpha": { +"description": "The alpha of the shadow's color, from 0.0 to 1.0.", +"format": "float", +"type": "number" +}, +"blurRadius": { +"$ref": "Dimension", +"description": "The radius of the shadow blur. The larger the radius, the more diffuse the shadow becomes." +}, +"color": { +"$ref": "OpaqueColor", +"description": "The shadow color value." +}, +"propertyState": { +"description": "The shadow property state. Updating the shadow on a page element will implicitly update this field to `RENDERED`, unless another value is specified in the same request. To have no shadow on a page element, set this field to `NOT_RENDERED`. In this case, any other shadow fields set in the same request will be ignored.", +"enum": [ +"RENDERED", +"NOT_RENDERED", +"INHERIT" +], +"enumDescriptions": [ +"If a property's state is RENDERED, then the element has the corresponding property when rendered on a page. If the element is a placeholder shape as determined by the placeholder field, and it inherits from a placeholder shape, the corresponding field may be unset, meaning that the property value is inherited from a parent placeholder. If the element does not inherit, then the field will contain the rendered value. This is the default value.", +"If a property's state is NOT_RENDERED, then the element does not have the corresponding property when rendered on a page. However, the field may still be set so it can be inherited by child shapes. To remove a property from a rendered element, set its property_state to NOT_RENDERED.", +"If a property's state is INHERIT, then the property state uses the value of corresponding `property_state` field on the parent shape. Elements that do not inherit will never have an INHERIT property state." +], +"type": "string" +}, +"rotateWithShape": { +"description": "Whether the shadow should rotate with the shape. This property is read-only.", +"type": "boolean" +}, +"transform": { +"$ref": "AffineTransform", +"description": "Transform that encodes the translate, scale, and skew of the shadow, relative to the alignment position." +}, +"type": { +"description": "The type of the shadow. This property is read-only.", +"enum": [ +"SHADOW_TYPE_UNSPECIFIED", +"OUTER" +], +"enumDescriptions": [ +"Unspecified shadow type.", +"Outer shadow." +], +"type": "string" +} +}, +"type": "object" +}, +"Shape": { +"description": "A PageElement kind representing a generic shape that does not have a more specific classification.", +"id": "Shape", +"properties": { +"placeholder": { +"$ref": "Placeholder", +"description": "Placeholders are page elements that inherit from corresponding placeholders on layouts and masters. If set, the shape is a placeholder shape and any inherited properties can be resolved by looking at the parent placeholder identified by the Placeholder.parent_object_id field." +}, +"shapeProperties": { +"$ref": "ShapeProperties", +"description": "The properties of the shape." +}, +"shapeType": { +"description": "The type of the shape.", +"enum": [ +"TYPE_UNSPECIFIED", +"TEXT_BOX", +"RECTANGLE", +"ROUND_RECTANGLE", +"ELLIPSE", +"ARC", +"BENT_ARROW", +"BENT_UP_ARROW", +"BEVEL", +"BLOCK_ARC", +"BRACE_PAIR", +"BRACKET_PAIR", +"CAN", +"CHEVRON", +"CHORD", +"CLOUD", +"CORNER", +"CUBE", +"CURVED_DOWN_ARROW", +"CURVED_LEFT_ARROW", +"CURVED_RIGHT_ARROW", +"CURVED_UP_ARROW", +"DECAGON", +"DIAGONAL_STRIPE", +"DIAMOND", +"DODECAGON", +"DONUT", +"DOUBLE_WAVE", +"DOWN_ARROW", +"DOWN_ARROW_CALLOUT", +"FOLDED_CORNER", +"FRAME", +"HALF_FRAME", +"HEART", +"HEPTAGON", +"HEXAGON", +"HOME_PLATE", +"HORIZONTAL_SCROLL", +"IRREGULAR_SEAL_1", +"IRREGULAR_SEAL_2", +"LEFT_ARROW", +"LEFT_ARROW_CALLOUT", +"LEFT_BRACE", +"LEFT_BRACKET", +"LEFT_RIGHT_ARROW", +"LEFT_RIGHT_ARROW_CALLOUT", +"LEFT_RIGHT_UP_ARROW", +"LEFT_UP_ARROW", +"LIGHTNING_BOLT", +"MATH_DIVIDE", +"MATH_EQUAL", +"MATH_MINUS", +"MATH_MULTIPLY", +"MATH_NOT_EQUAL", +"MATH_PLUS", +"MOON", +"NO_SMOKING", +"NOTCHED_RIGHT_ARROW", +"OCTAGON", +"PARALLELOGRAM", +"PENTAGON", +"PIE", +"PLAQUE", +"PLUS", +"QUAD_ARROW", +"QUAD_ARROW_CALLOUT", +"RIBBON", +"RIBBON_2", +"RIGHT_ARROW", +"RIGHT_ARROW_CALLOUT", +"RIGHT_BRACE", +"RIGHT_BRACKET", +"ROUND_1_RECTANGLE", +"ROUND_2_DIAGONAL_RECTANGLE", +"ROUND_2_SAME_RECTANGLE", +"RIGHT_TRIANGLE", +"SMILEY_FACE", +"SNIP_1_RECTANGLE", +"SNIP_2_DIAGONAL_RECTANGLE", +"SNIP_2_SAME_RECTANGLE", +"SNIP_ROUND_RECTANGLE", +"STAR_10", +"STAR_12", +"STAR_16", +"STAR_24", +"STAR_32", +"STAR_4", +"STAR_5", +"STAR_6", +"STAR_7", +"STAR_8", +"STRIPED_RIGHT_ARROW", +"SUN", +"TRAPEZOID", +"TRIANGLE", +"UP_ARROW", +"UP_ARROW_CALLOUT", +"UP_DOWN_ARROW", +"UTURN_ARROW", +"VERTICAL_SCROLL", +"WAVE", +"WEDGE_ELLIPSE_CALLOUT", +"WEDGE_RECTANGLE_CALLOUT", +"WEDGE_ROUND_RECTANGLE_CALLOUT", +"FLOW_CHART_ALTERNATE_PROCESS", +"FLOW_CHART_COLLATE", +"FLOW_CHART_CONNECTOR", +"FLOW_CHART_DECISION", +"FLOW_CHART_DELAY", +"FLOW_CHART_DISPLAY", +"FLOW_CHART_DOCUMENT", +"FLOW_CHART_EXTRACT", +"FLOW_CHART_INPUT_OUTPUT", +"FLOW_CHART_INTERNAL_STORAGE", +"FLOW_CHART_MAGNETIC_DISK", +"FLOW_CHART_MAGNETIC_DRUM", +"FLOW_CHART_MAGNETIC_TAPE", +"FLOW_CHART_MANUAL_INPUT", +"FLOW_CHART_MANUAL_OPERATION", +"FLOW_CHART_MERGE", +"FLOW_CHART_MULTIDOCUMENT", +"FLOW_CHART_OFFLINE_STORAGE", +"FLOW_CHART_OFFPAGE_CONNECTOR", +"FLOW_CHART_ONLINE_STORAGE", +"FLOW_CHART_OR", +"FLOW_CHART_PREDEFINED_PROCESS", +"FLOW_CHART_PREPARATION", +"FLOW_CHART_PROCESS", +"FLOW_CHART_PUNCHED_CARD", +"FLOW_CHART_PUNCHED_TAPE", +"FLOW_CHART_SORT", +"FLOW_CHART_SUMMING_JUNCTION", +"FLOW_CHART_TERMINATOR", +"ARROW_EAST", +"ARROW_NORTH_EAST", +"ARROW_NORTH", +"SPEECH", +"STARBURST", +"TEARDROP", +"ELLIPSE_RIBBON", +"ELLIPSE_RIBBON_2", +"CLOUD_CALLOUT", +"CUSTOM" +], +"enumDescriptions": [ +"The shape type that is not predefined.", +"Text box shape.", +"Rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'rect'.", +"Round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'roundRect'", +"Ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'ellipse'", +"Curved arc shape. Corresponds to ECMA-376 ST_ShapeType 'arc'", +"Bent arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentArrow'", +"Bent up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'bentUpArrow'", +"Bevel shape. Corresponds to ECMA-376 ST_ShapeType 'bevel'", +"Block arc shape. Corresponds to ECMA-376 ST_ShapeType 'blockArc'", +"Brace pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracePair'", +"Bracket pair shape. Corresponds to ECMA-376 ST_ShapeType 'bracketPair'", +"Can shape. Corresponds to ECMA-376 ST_ShapeType 'can'", +"Chevron shape. Corresponds to ECMA-376 ST_ShapeType 'chevron'", +"Chord shape. Corresponds to ECMA-376 ST_ShapeType 'chord'", +"Cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloud'", +"Corner shape. Corresponds to ECMA-376 ST_ShapeType 'corner'", +"Cube shape. Corresponds to ECMA-376 ST_ShapeType 'cube'", +"Curved down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedDownArrow'", +"Curved left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedLeftArrow'", +"Curved right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedRightArrow'", +"Curved up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'curvedUpArrow'", +"Decagon shape. Corresponds to ECMA-376 ST_ShapeType 'decagon'", +"Diagonal stripe shape. Corresponds to ECMA-376 ST_ShapeType 'diagStripe'", +"Diamond shape. Corresponds to ECMA-376 ST_ShapeType 'diamond'", +"Dodecagon shape. Corresponds to ECMA-376 ST_ShapeType 'dodecagon'", +"Donut shape. Corresponds to ECMA-376 ST_ShapeType 'donut'", +"Double wave shape. Corresponds to ECMA-376 ST_ShapeType 'doubleWave'", +"Down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrow'", +"Callout down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'downArrowCallout'", +"Folded corner shape. Corresponds to ECMA-376 ST_ShapeType 'foldedCorner'", +"Frame shape. Corresponds to ECMA-376 ST_ShapeType 'frame'", +"Half frame shape. Corresponds to ECMA-376 ST_ShapeType 'halfFrame'", +"Heart shape. Corresponds to ECMA-376 ST_ShapeType 'heart'", +"Heptagon shape. Corresponds to ECMA-376 ST_ShapeType 'heptagon'", +"Hexagon shape. Corresponds to ECMA-376 ST_ShapeType 'hexagon'", +"Home plate shape. Corresponds to ECMA-376 ST_ShapeType 'homePlate'", +"Horizontal scroll shape. Corresponds to ECMA-376 ST_ShapeType 'horizontalScroll'", +"Irregular seal 1 shape. Corresponds to ECMA-376 ST_ShapeType 'irregularSeal1'", +"Irregular seal 2 shape. Corresponds to ECMA-376 ST_ShapeType 'irregularSeal2'", +"Left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrow'", +"Callout left arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftArrowCallout'", +"Left brace shape. Corresponds to ECMA-376 ST_ShapeType 'leftBrace'", +"Left bracket shape. Corresponds to ECMA-376 ST_ShapeType 'leftBracket'", +"Left right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftRightArrow'", +"Callout left right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftRightArrowCallout'", +"Left right up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftRightUpArrow'", +"Left up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'leftUpArrow'", +"Lightning bolt shape. Corresponds to ECMA-376 ST_ShapeType 'lightningBolt'", +"Divide math shape. Corresponds to ECMA-376 ST_ShapeType 'mathDivide'", +"Equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathEqual'", +"Minus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMinus'", +"Multiply math shape. Corresponds to ECMA-376 ST_ShapeType 'mathMultiply'", +"Not equal math shape. Corresponds to ECMA-376 ST_ShapeType 'mathNotEqual'", +"Plus math shape. Corresponds to ECMA-376 ST_ShapeType 'mathPlus'", +"Moon shape. Corresponds to ECMA-376 ST_ShapeType 'moon'", +"No smoking shape. Corresponds to ECMA-376 ST_ShapeType 'noSmoking'", +"Notched right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'notchedRightArrow'", +"Octagon shape. Corresponds to ECMA-376 ST_ShapeType 'octagon'", +"Parallelogram shape. Corresponds to ECMA-376 ST_ShapeType 'parallelogram'", +"Pentagon shape. Corresponds to ECMA-376 ST_ShapeType 'pentagon'", +"Pie shape. Corresponds to ECMA-376 ST_ShapeType 'pie'", +"Plaque shape. Corresponds to ECMA-376 ST_ShapeType 'plaque'", +"Plus shape. Corresponds to ECMA-376 ST_ShapeType 'plus'", +"Quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrow'", +"Callout quad-arrow shape. Corresponds to ECMA-376 ST_ShapeType 'quadArrowCallout'", +"Ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon'", +"Ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ribbon2'", +"Right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrow'", +"Callout right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'rightArrowCallout'", +"Right brace shape. Corresponds to ECMA-376 ST_ShapeType 'rightBrace'", +"Right bracket shape. Corresponds to ECMA-376 ST_ShapeType 'rightBracket'", +"One round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'round1Rect'", +"Two diagonal round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'round2DiagRect'", +"Two same-side round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'round2SameRect'", +"Right triangle shape. Corresponds to ECMA-376 ST_ShapeType 'rtTriangle'", +"Smiley face shape. Corresponds to ECMA-376 ST_ShapeType 'smileyFace'", +"One snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snip1Rect'", +"Two diagonal snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snip2DiagRect'", +"Two same-side snip corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snip2SameRect'", +"One snip one round corner rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'snipRoundRect'", +"Ten pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star10'", +"Twelve pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star12'", +"Sixteen pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star16'", +"Twenty four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star24'", +"Thirty two pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star32'", +"Four pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star4'", +"Five pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star5'", +"Six pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star6'", +"Seven pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star7'", +"Eight pointed star shape. Corresponds to ECMA-376 ST_ShapeType 'star8'", +"Striped right arrow shape. Corresponds to ECMA-376 ST_ShapeType 'stripedRightArrow'", +"Sun shape. Corresponds to ECMA-376 ST_ShapeType 'sun'", +"Trapezoid shape. Corresponds to ECMA-376 ST_ShapeType 'trapezoid'", +"Triangle shape. Corresponds to ECMA-376 ST_ShapeType 'triangle'", +"Up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrow'", +"Callout up arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upArrowCallout'", +"Up down arrow shape. Corresponds to ECMA-376 ST_ShapeType 'upDownArrow'", +"U-turn arrow shape. Corresponds to ECMA-376 ST_ShapeType 'uturnArrow'", +"Vertical scroll shape. Corresponds to ECMA-376 ST_ShapeType 'verticalScroll'", +"Wave shape. Corresponds to ECMA-376 ST_ShapeType 'wave'", +"Callout wedge ellipse shape. Corresponds to ECMA-376 ST_ShapeType 'wedgeEllipseCallout'", +"Callout wedge rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'wedgeRectCallout'", +"Callout wedge round rectangle shape. Corresponds to ECMA-376 ST_ShapeType 'wedgeRoundRectCallout'", +"Alternate process flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartAlternateProcess'", +"Collate flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartCollate'", +"Connector flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartConnector'", +"Decision flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDecision'", +"Delay flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDelay'", +"Display flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDisplay'", +"Document flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartDocument'", +"Extract flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartExtract'", +"Input output flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartInputOutput'", +"Internal storage flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartInternalStorage'", +"Magnetic disk flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMagneticDisk'", +"Magnetic drum flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMagneticDrum'", +"Magnetic tape flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMagneticTape'", +"Manual input flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartManualInput'", +"Manual operation flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartManualOperation'", +"Merge flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMerge'", +"Multi-document flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartMultidocument'", +"Offline storage flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOfflineStorage'", +"Off-page connector flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOffpageConnector'", +"Online storage flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOnlineStorage'", +"Or flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartOr'", +"Predefined process flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPredefinedProcess'", +"Preparation flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPreparation'", +"Process flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartProcess'", +"Punched card flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPunchedCard'", +"Punched tape flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartPunchedTape'", +"Sort flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSort'", +"Summing junction flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartSummingJunction'", +"Terminator flow shape. Corresponds to ECMA-376 ST_ShapeType 'flowChartTerminator'", +"East arrow shape.", +"Northeast arrow shape.", +"North arrow shape.", +"Speech shape.", +"Star burst shape.", +"Teardrop shape. Corresponds to ECMA-376 ST_ShapeType 'teardrop'", +"Ellipse ribbon shape. Corresponds to ECMA-376 ST_ShapeType 'ellipseRibbon'", +"Ellipse ribbon 2 shape. Corresponds to ECMA-376 ST_ShapeType 'ellipseRibbon2'", +"Callout cloud shape. Corresponds to ECMA-376 ST_ShapeType 'cloudCallout'", +"Custom shape." +], +"type": "string" +}, +"text": { +"$ref": "TextContent", +"description": "The text content of the shape." +} +}, +"type": "object" +}, +"ShapeBackgroundFill": { +"description": "The shape background fill.", +"id": "ShapeBackgroundFill", +"properties": { +"propertyState": { +"description": "The background fill property state. Updating the fill on a shape will implicitly update this field to `RENDERED`, unless another value is specified in the same request. To have no fill on a shape, set this field to `NOT_RENDERED`. In this case, any other fill fields set in the same request will be ignored.", +"enum": [ +"RENDERED", +"NOT_RENDERED", +"INHERIT" +], +"enumDescriptions": [ +"If a property's state is RENDERED, then the element has the corresponding property when rendered on a page. If the element is a placeholder shape as determined by the placeholder field, and it inherits from a placeholder shape, the corresponding field may be unset, meaning that the property value is inherited from a parent placeholder. If the element does not inherit, then the field will contain the rendered value. This is the default value.", +"If a property's state is NOT_RENDERED, then the element does not have the corresponding property when rendered on a page. However, the field may still be set so it can be inherited by child shapes. To remove a property from a rendered element, set its property_state to NOT_RENDERED.", +"If a property's state is INHERIT, then the property state uses the value of corresponding `property_state` field on the parent shape. Elements that do not inherit will never have an INHERIT property state." +], +"type": "string" +}, +"solidFill": { +"$ref": "SolidFill", +"description": "Solid color fill." +} +}, +"type": "object" +}, +"ShapeProperties": { +"description": "The properties of a Shape. If the shape is a placeholder shape as determined by the placeholder field, then these properties may be inherited from a parent placeholder shape. Determining the rendered value of the property depends on the corresponding property_state field value. Any text autofit settings on the shape are automatically deactivated by requests that can impact how text fits in the shape.", +"id": "ShapeProperties", +"properties": { +"autofit": { +"$ref": "Autofit", +"description": "The autofit properties of the shape. This property is only set for shapes that allow text." +}, +"contentAlignment": { +"description": "The alignment of the content in the shape. If unspecified, the alignment is inherited from a parent placeholder if it exists. If the shape has no parent, the default alignment matches the alignment for new shapes created in the Slides editor.", +"enum": [ +"CONTENT_ALIGNMENT_UNSPECIFIED", +"CONTENT_ALIGNMENT_UNSUPPORTED", +"TOP", +"MIDDLE", +"BOTTOM" +], +"enumDescriptions": [ +"An unspecified content alignment. The content alignment is inherited from the parent if it exists.", +"An unsupported content alignment.", +"An alignment that aligns the content to the top of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 't'.", +"An alignment that aligns the content to the middle of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'ctr'.", +"An alignment that aligns the content to the bottom of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'b'." +], +"type": "string" +}, +"link": { +"$ref": "Link", +"description": "The hyperlink destination of the shape. If unset, there is no link. Links are not inherited from parent placeholders." +}, +"outline": { +"$ref": "Outline", +"description": "The outline of the shape. If unset, the outline is inherited from a parent placeholder if it exists. If the shape has no parent, then the default outline depends on the shape type, matching the defaults for new shapes created in the Slides editor." +}, +"shadow": { +"$ref": "Shadow", +"description": "The shadow properties of the shape. If unset, the shadow is inherited from a parent placeholder if it exists. If the shape has no parent, then the default shadow matches the defaults for new shapes created in the Slides editor. This property is read-only." +}, +"shapeBackgroundFill": { +"$ref": "ShapeBackgroundFill", +"description": "The background fill of the shape. If unset, the background fill is inherited from a parent placeholder if it exists. If the shape has no parent, then the default background fill depends on the shape type, matching the defaults for new shapes created in the Slides editor." +} +}, +"type": "object" +}, +"SheetsChart": { +"description": "A PageElement kind representing a linked chart embedded from Google Sheets.", +"id": "SheetsChart", +"properties": { +"chartId": { +"description": "The ID of the specific chart in the Google Sheets spreadsheet that is embedded.", +"format": "int32", +"type": "integer" +}, +"contentUrl": { +"description": "The URL of an image of the embedded chart, with a default lifetime of 30 minutes. This URL is tagged with the account of the requester. Anyone with the URL effectively accesses the image as the original requester. Access to the image may be lost if the presentation's sharing settings change.", +"type": "string" +}, +"sheetsChartProperties": { +"$ref": "SheetsChartProperties", +"description": "The properties of the Sheets chart." +}, +"spreadsheetId": { +"description": "The ID of the Google Sheets spreadsheet that contains the source chart.", +"type": "string" +} +}, +"type": "object" +}, +"SheetsChartProperties": { +"description": "The properties of the SheetsChart.", +"id": "SheetsChartProperties", +"properties": { +"chartImageProperties": { +"$ref": "ImageProperties", +"description": "The properties of the embedded chart image." +} +}, +"type": "object" +}, +"Size": { +"description": "A width and height.", +"id": "Size", +"properties": { +"height": { +"$ref": "Dimension", +"description": "The height of the object." +}, +"width": { +"$ref": "Dimension", +"description": "The width of the object." +} +}, +"type": "object" +}, +"SlideProperties": { +"description": "The properties of Page that are only relevant for pages with page_type SLIDE.", +"id": "SlideProperties", +"properties": { +"isSkipped": { +"description": "Whether the slide is skipped in the presentation mode. Defaults to false.", +"type": "boolean" +}, +"layoutObjectId": { +"description": "The object ID of the layout that this slide is based on. This property is read-only.", +"type": "string" +}, +"masterObjectId": { +"description": "The object ID of the master that this slide is based on. This property is read-only.", +"type": "string" +}, +"notesPage": { +"$ref": "Page", +"description": "The notes page that this slide is associated with. It defines the visual appearance of a notes page when printing or exporting slides with speaker notes. A notes page inherits properties from the notes master. The placeholder shape with type BODY on the notes page contains the speaker notes for this slide. The ID of this shape is identified by the speakerNotesObjectId field. The notes page is read-only except for the text content and styles of the speaker notes shape. This property is read-only." +} +}, +"type": "object" +}, +"SolidFill": { +"description": "A solid color fill. The page or page element is filled entirely with the specified color value. If any field is unset, its value may be inherited from a parent placeholder if it exists.", +"id": "SolidFill", +"properties": { +"alpha": { +"description": "The fraction of this `color` that should be applied to the pixel. That is, the final pixel color is defined by the equation: pixel color = alpha * (color) + (1.0 - alpha) * (background color) This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color.", +"format": "float", +"type": "number" +}, +"color": { +"$ref": "OpaqueColor", +"description": "The color value of the solid fill." +} +}, +"type": "object" +}, +"SpeakerSpotlight": { +"description": "A PageElement kind representing a Speaker Spotlight.", +"id": "SpeakerSpotlight", +"properties": { +"speakerSpotlightProperties": { +"$ref": "SpeakerSpotlightProperties", +"description": "The properties of the Speaker Spotlight." +} +}, +"type": "object" +}, +"SpeakerSpotlightProperties": { +"description": "The properties of the SpeakerSpotlight.", +"id": "SpeakerSpotlightProperties", +"properties": { +"outline": { +"$ref": "Outline", +"description": "The outline of the Speaker Spotlight. If not set, it has no outline." +}, +"shadow": { +"$ref": "Shadow", +"description": "The shadow of the Speaker Spotlight. If not set, it has no shadow." +} +}, +"type": "object" +}, +"StretchedPictureFill": { +"description": "The stretched picture fill. The page or page element is filled entirely with the specified picture. The picture is stretched to fit its container.", +"id": "StretchedPictureFill", +"properties": { +"contentUrl": { +"description": "Reading the content_url: An URL to a picture with a default lifetime of 30 minutes. This URL is tagged with the account of the requester. Anyone with the URL effectively accesses the picture as the original requester. Access to the picture may be lost if the presentation's sharing settings change. Writing the content_url: The picture is fetched once at insertion time and a copy is stored for display inside the presentation. Pictures must be less than 50MB in size, cannot exceed 25 megapixels, and must be in one of PNG, JPEG, or GIF format. The provided URL can be at most 2 kB in length.", +"type": "string" +}, +"size": { +"$ref": "Size", +"description": "The original size of the picture fill. This field is read-only." +} +}, +"type": "object" +}, +"SubstringMatchCriteria": { +"description": "A criteria that matches a specific string of text in a shape or table.", +"id": "SubstringMatchCriteria", +"properties": { +"matchCase": { +"description": "Indicates whether the search should respect case: - `True`: the search is case sensitive. - `False`: the search is case insensitive.", +"type": "boolean" +}, +"text": { +"description": "The text to search for in the shape or table.", +"type": "string" +} +}, +"type": "object" +}, +"Table": { +"description": "A PageElement kind representing a table.", +"id": "Table", +"properties": { +"columns": { +"description": "Number of columns in the table.", +"format": "int32", +"type": "integer" +}, +"horizontalBorderRows": { +"description": "Properties of horizontal cell borders. A table's horizontal cell borders are represented as a grid. The grid has one more row than the number of rows in the table and the same number of columns as the table. For example, if the table is 3 x 3, its horizontal borders will be represented as a grid with 4 rows and 3 columns.", +"items": { +"$ref": "TableBorderRow" +}, +"type": "array" +}, +"rows": { +"description": "Number of rows in the table.", +"format": "int32", +"type": "integer" +}, +"tableColumns": { +"description": "Properties of each column.", +"items": { +"$ref": "TableColumnProperties" +}, +"type": "array" +}, +"tableRows": { +"description": "Properties and contents of each row. Cells that span multiple rows are contained in only one of these rows and have a row_span greater than 1.", +"items": { +"$ref": "TableRow" +}, +"type": "array" +}, +"verticalBorderRows": { +"description": "Properties of vertical cell borders. A table's vertical cell borders are represented as a grid. The grid has the same number of rows as the table and one more column than the number of columns in the table. For example, if the table is 3 x 3, its vertical borders will be represented as a grid with 3 rows and 4 columns.", +"items": { +"$ref": "TableBorderRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"TableBorderCell": { +"description": "The properties of each border cell.", +"id": "TableBorderCell", +"properties": { +"location": { +"$ref": "TableCellLocation", +"description": "The location of the border within the border table." +}, +"tableBorderProperties": { +"$ref": "TableBorderProperties", +"description": "The border properties." +} +}, +"type": "object" +}, +"TableBorderFill": { +"description": "The fill of the border.", +"id": "TableBorderFill", +"properties": { +"solidFill": { +"$ref": "SolidFill", +"description": "Solid fill." +} +}, +"type": "object" +}, +"TableBorderProperties": { +"description": "The border styling properties of the TableBorderCell.", +"id": "TableBorderProperties", +"properties": { +"dashStyle": { +"description": "The dash style of the border.", +"enum": [ +"DASH_STYLE_UNSPECIFIED", +"SOLID", +"DOT", +"DASH", +"DASH_DOT", +"LONG_DASH", +"LONG_DASH_DOT" +], +"enumDescriptions": [ +"Unspecified dash style.", +"Solid line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'solid'. This is the default dash style.", +"Dotted line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dot'.", +"Dashed line. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dash'.", +"Alternating dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal value 'dashDot'.", +"Line with large dashes. Corresponds to ECMA-376 ST_PresetLineDashVal value 'lgDash'.", +"Alternating large dashes and dots. Corresponds to ECMA-376 ST_PresetLineDashVal value 'lgDashDot'." +], +"type": "string" +}, +"tableBorderFill": { +"$ref": "TableBorderFill", +"description": "The fill of the table border." +}, +"weight": { +"$ref": "Dimension", +"description": "The thickness of the border." +} +}, +"type": "object" +}, +"TableBorderRow": { +"description": "Contents of each border row in a table.", +"id": "TableBorderRow", +"properties": { +"tableBorderCells": { +"description": "Properties of each border cell. When a border's adjacent table cells are merged, it is not included in the response.", +"items": { +"$ref": "TableBorderCell" +}, +"type": "array" +} +}, +"type": "object" +}, +"TableCell": { +"description": "Properties and contents of each table cell.", +"id": "TableCell", +"properties": { +"columnSpan": { +"description": "Column span of the cell.", +"format": "int32", +"type": "integer" +}, +"location": { +"$ref": "TableCellLocation", +"description": "The location of the cell within the table." +}, +"rowSpan": { +"description": "Row span of the cell.", +"format": "int32", +"type": "integer" +}, +"tableCellProperties": { +"$ref": "TableCellProperties", +"description": "The properties of the table cell." +}, +"text": { +"$ref": "TextContent", +"description": "The text content of the cell." +} +}, +"type": "object" +}, +"TableCellBackgroundFill": { +"description": "The table cell background fill.", +"id": "TableCellBackgroundFill", +"properties": { +"propertyState": { +"description": "The background fill property state. Updating the fill on a table cell will implicitly update this field to `RENDERED`, unless another value is specified in the same request. To have no fill on a table cell, set this field to `NOT_RENDERED`. In this case, any other fill fields set in the same request will be ignored.", +"enum": [ +"RENDERED", +"NOT_RENDERED", +"INHERIT" +], +"enumDescriptions": [ +"If a property's state is RENDERED, then the element has the corresponding property when rendered on a page. If the element is a placeholder shape as determined by the placeholder field, and it inherits from a placeholder shape, the corresponding field may be unset, meaning that the property value is inherited from a parent placeholder. If the element does not inherit, then the field will contain the rendered value. This is the default value.", +"If a property's state is NOT_RENDERED, then the element does not have the corresponding property when rendered on a page. However, the field may still be set so it can be inherited by child shapes. To remove a property from a rendered element, set its property_state to NOT_RENDERED.", +"If a property's state is INHERIT, then the property state uses the value of corresponding `property_state` field on the parent shape. Elements that do not inherit will never have an INHERIT property state." +], +"type": "string" +}, +"solidFill": { +"$ref": "SolidFill", +"description": "Solid color fill." +} +}, +"type": "object" +}, +"TableCellLocation": { +"description": "A location of a single table cell within a table.", +"id": "TableCellLocation", +"properties": { +"columnIndex": { +"description": "The 0-based column index.", +"format": "int32", +"type": "integer" +}, +"rowIndex": { +"description": "The 0-based row index.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TableCellProperties": { +"description": "The properties of the TableCell.", +"id": "TableCellProperties", +"properties": { +"contentAlignment": { +"description": "The alignment of the content in the table cell. The default alignment matches the alignment for newly created table cells in the Slides editor.", +"enum": [ +"CONTENT_ALIGNMENT_UNSPECIFIED", +"CONTENT_ALIGNMENT_UNSUPPORTED", +"TOP", +"MIDDLE", +"BOTTOM" +], +"enumDescriptions": [ +"An unspecified content alignment. The content alignment is inherited from the parent if it exists.", +"An unsupported content alignment.", +"An alignment that aligns the content to the top of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 't'.", +"An alignment that aligns the content to the middle of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'ctr'.", +"An alignment that aligns the content to the bottom of the content holder. Corresponds to ECMA-376 ST_TextAnchoringType 'b'." +], +"type": "string" +}, +"tableCellBackgroundFill": { +"$ref": "TableCellBackgroundFill", +"description": "The background fill of the table cell. The default fill matches the fill for newly created table cells in the Slides editor." +} +}, +"type": "object" +}, +"TableColumnProperties": { +"description": "Properties of each column in a table.", +"id": "TableColumnProperties", +"properties": { +"columnWidth": { +"$ref": "Dimension", +"description": "Width of a column." +} +}, +"type": "object" +}, +"TableRange": { +"description": "A table range represents a reference to a subset of a table. It's important to note that the cells specified by a table range do not necessarily form a rectangle. For example, let's say we have a 3 x 3 table where all the cells of the last row are merged together. The table looks like this: [ ] A table range with location = (0, 0), row span = 3 and column span = 2 specifies the following cells: x x [ x x x ]", +"id": "TableRange", +"properties": { +"columnSpan": { +"description": "The column span of the table range.", +"format": "int32", +"type": "integer" +}, +"location": { +"$ref": "TableCellLocation", +"description": "The starting location of the table range." +}, +"rowSpan": { +"description": "The row span of the table range.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TableRow": { +"description": "Properties and contents of each row in a table.", +"id": "TableRow", +"properties": { +"rowHeight": { +"$ref": "Dimension", +"description": "Height of a row." +}, +"tableCells": { +"description": "Properties and contents of each cell. Cells that span multiple columns are represented only once with a column_span greater than 1. As a result, the length of this collection does not always match the number of columns of the entire table.", +"items": { +"$ref": "TableCell" +}, +"type": "array" +}, +"tableRowProperties": { +"$ref": "TableRowProperties", +"description": "Properties of the row." +} +}, +"type": "object" +}, +"TableRowProperties": { +"description": "Properties of each row in a table.", +"id": "TableRowProperties", +"properties": { +"minRowHeight": { +"$ref": "Dimension", +"description": "Minimum height of the row. The row will be rendered in the Slides editor at a height equal to or greater than this value in order to show all the text in the row's cell(s)." +} +}, +"type": "object" +}, +"TextContent": { +"description": "The general text content. The text must reside in a compatible shape (e.g. text box or rectangle) or a table cell in a page.", +"id": "TextContent", +"properties": { +"lists": { +"additionalProperties": { +"$ref": "List" +}, +"description": "The bulleted lists contained in this text, keyed by list ID.", +"type": "object" +}, +"textElements": { +"description": "The text contents broken down into its component parts, including styling information. This property is read-only.", +"items": { +"$ref": "TextElement" +}, +"type": "array" +} +}, +"type": "object" +}, +"TextElement": { +"description": "A TextElement describes the content of a range of indices in the text content of a Shape or TableCell.", +"id": "TextElement", +"properties": { +"autoText": { +"$ref": "AutoText", +"description": "A TextElement representing a spot in the text that is dynamically replaced with content that can change over time." +}, +"endIndex": { +"description": "The zero-based end index of this text element, exclusive, in Unicode code units.", +"format": "int32", +"type": "integer" +}, +"paragraphMarker": { +"$ref": "ParagraphMarker", +"description": "A marker representing the beginning of a new paragraph. The `start_index` and `end_index` of this TextElement represent the range of the paragraph. Other TextElements with an index range contained inside this paragraph's range are considered to be part of this paragraph. The range of indices of two separate paragraphs will never overlap." +}, +"startIndex": { +"description": "The zero-based start index of this text element, in Unicode code units.", +"format": "int32", +"type": "integer" +}, +"textRun": { +"$ref": "TextRun", +"description": "A TextElement representing a run of text where all of the characters in the run have the same TextStyle. The `start_index` and `end_index` of TextRuns will always be fully contained in the index range of a single `paragraph_marker` TextElement. In other words, a TextRun will never span multiple paragraphs." +} +}, +"type": "object" +}, +"TextRun": { +"description": "A TextElement kind that represents a run of text that all has the same styling.", +"id": "TextRun", +"properties": { +"content": { +"description": "The text of this run.", +"type": "string" +}, +"style": { +"$ref": "TextStyle", +"description": "The styling applied to this run." +} +}, +"type": "object" +}, +"TextStyle": { +"description": "Represents the styling that can be applied to a TextRun. If this text is contained in a shape with a parent placeholder, then these text styles may be inherited from the parent. Which text styles are inherited depend on the nesting level of lists: * A text run in a paragraph that is not in a list will inherit its text style from the the newline character in the paragraph at the 0 nesting level of the list inside the parent placeholder. * A text run in a paragraph that is in a list will inherit its text style from the newline character in the paragraph at its corresponding nesting level of the list inside the parent placeholder. Inherited text styles are represented as unset fields in this message. If text is contained in a shape without a parent placeholder, unsetting these fields will revert the style to a value matching the defaults in the Slides editor.", +"id": "TextStyle", +"properties": { +"backgroundColor": { +"$ref": "OptionalColor", +"description": "The background color of the text. If set, the color is either opaque or transparent, depending on if the `opaque_color` field in it is set." +}, +"baselineOffset": { +"description": "The text's vertical offset from its normal position. Text with `SUPERSCRIPT` or `SUBSCRIPT` baseline offsets is automatically rendered in a smaller font size, computed based on the `font_size` field. The `font_size` itself is not affected by changes in this field.", +"enum": [ +"BASELINE_OFFSET_UNSPECIFIED", +"NONE", +"SUPERSCRIPT", +"SUBSCRIPT" +], +"enumDescriptions": [ +"The text's baseline offset is inherited from the parent.", +"The text is not vertically offset.", +"The text is vertically offset upwards (superscript).", +"The text is vertically offset downwards (subscript)." +], +"type": "string" +}, +"bold": { +"description": "Whether or not the text is rendered as bold.", +"type": "boolean" +}, +"fontFamily": { +"description": "The font family of the text. The font family can be any font from the Font menu in Slides or from [Google Fonts] (https://fonts.google.com/). If the font name is unrecognized, the text is rendered in `Arial`. Some fonts can affect the weight of the text. If an update request specifies values for both `font_family` and `bold`, the explicitly-set `bold` value is used.", +"type": "string" +}, +"fontSize": { +"$ref": "Dimension", +"description": "The size of the text's font. When read, the `font_size` will specified in points." +}, +"foregroundColor": { +"$ref": "OptionalColor", +"description": "The color of the text itself. If set, the color is either opaque or transparent, depending on if the `opaque_color` field in it is set." +}, +"italic": { +"description": "Whether or not the text is italicized.", +"type": "boolean" +}, +"link": { +"$ref": "Link", +"description": "The hyperlink destination of the text. If unset, there is no link. Links are not inherited from parent text. Changing the link in an update request causes some other changes to the text style of the range: * When setting a link, the text foreground color will be set to ThemeColorType.HYPERLINK and the text will be underlined. If these fields are modified in the same request, those values will be used instead of the link defaults. * Setting a link on a text range that overlaps with an existing link will also update the existing link to point to the new URL. * Links are not settable on newline characters. As a result, setting a link on a text range that crosses a paragraph boundary, such as `\"ABC\\n123\"`, will separate the newline character(s) into their own text runs. The link will be applied separately to the runs before and after the newline. * Removing a link will update the text style of the range to match the style of the preceding text (or the default text styles if the preceding text is another link) unless different styles are being set in the same request." +}, +"smallCaps": { +"description": "Whether or not the text is in small capital letters.", +"type": "boolean" +}, +"strikethrough": { +"description": "Whether or not the text is struck through.", +"type": "boolean" +}, +"underline": { +"description": "Whether or not the text is underlined.", +"type": "boolean" +}, +"weightedFontFamily": { +"$ref": "WeightedFontFamily", +"description": "The font family and rendered weight of the text. This field is an extension of `font_family` meant to support explicit font weights without breaking backwards compatibility. As such, when reading the style of a range of text, the value of `weighted_font_family#font_family` will always be equal to that of `font_family`. However, when writing, if both fields are included in the field mask (either explicitly or through the wildcard `\"*\"`), their values are reconciled as follows: * If `font_family` is set and `weighted_font_family` is not, the value of `font_family` is applied with weight `400` (\"normal\"). * If both fields are set, the value of `font_family` must match that of `weighted_font_family#font_family`. If so, the font family and weight of `weighted_font_family` is applied. Otherwise, a 400 bad request error is returned. * If `weighted_font_family` is set and `font_family` is not, the font family and weight of `weighted_font_family` is applied. * If neither field is set, the font family and weight of the text inherit from the parent. Note that these properties cannot inherit separately from each other. If an update request specifies values for both `weighted_font_family` and `bold`, the `weighted_font_family` is applied first, then `bold`. If `weighted_font_family#weight` is not set, it defaults to `400`. If `weighted_font_family` is set, then `weighted_font_family#font_family` must also be set with a non-empty value. Otherwise, a 400 bad request error is returned." +} +}, +"type": "object" +}, +"ThemeColorPair": { +"description": "A pair mapping a theme color type to the concrete color it represents.", +"id": "ThemeColorPair", +"properties": { +"color": { +"$ref": "RgbColor", +"description": "The concrete color corresponding to the theme color type above." +}, +"type": { +"description": "The type of the theme color.", +"enum": [ +"THEME_COLOR_TYPE_UNSPECIFIED", +"DARK1", +"LIGHT1", +"DARK2", +"LIGHT2", +"ACCENT1", +"ACCENT2", +"ACCENT3", +"ACCENT4", +"ACCENT5", +"ACCENT6", +"HYPERLINK", +"FOLLOWED_HYPERLINK", +"TEXT1", +"BACKGROUND1", +"TEXT2", +"BACKGROUND2" +], +"enumDescriptions": [ +"Unspecified theme color. This value should not be used.", +"Represents the first dark color.", +"Represents the first light color.", +"Represents the second dark color.", +"Represents the second light color.", +"Represents the first accent color.", +"Represents the second accent color.", +"Represents the third accent color.", +"Represents the fourth accent color.", +"Represents the fifth accent color.", +"Represents the sixth accent color.", +"Represents the color to use for hyperlinks.", +"Represents the color to use for visited hyperlinks.", +"Represents the first text color.", +"Represents the first background color.", +"Represents the second text color.", +"Represents the second background color." +], +"type": "string" +} +}, +"type": "object" +}, +"Thumbnail": { +"description": "The thumbnail of a page.", +"id": "Thumbnail", +"properties": { +"contentUrl": { +"description": "The content URL of the thumbnail image. The URL to the image has a default lifetime of 30 minutes. This URL is tagged with the account of the requester. Anyone with the URL effectively accesses the image as the original requester. Access to the image may be lost if the presentation's sharing settings change. The mime type of the thumbnail image is the same as specified in the `GetPageThumbnailRequest`.", +"type": "string" +}, +"height": { +"description": "The positive height in pixels of the thumbnail image.", +"format": "int32", +"type": "integer" +}, +"width": { +"description": "The positive width in pixels of the thumbnail image.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UngroupObjectsRequest": { +"description": "Ungroups objects, such as groups.", +"id": "UngroupObjectsRequest", +"properties": { +"objectIds": { +"description": "The object IDs of the objects to ungroup. Only groups that are not inside other groups can be ungrouped. All the groups should be on the same page. The group itself is deleted. The visual sizes and positions of all the children are preserved.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UnmergeTableCellsRequest": { +"description": "Unmerges cells in a Table.", +"id": "UnmergeTableCellsRequest", +"properties": { +"objectId": { +"description": "The object ID of the table.", +"type": "string" +}, +"tableRange": { +"$ref": "TableRange", +"description": "The table range specifying which cells of the table to unmerge. All merged cells in this range will be unmerged, and cells that are already unmerged will not be affected. If the range has no merged cells, the request will do nothing. If there is text in any of the merged cells, the text will remain in the upper-left (\"head\") cell of the resulting block of unmerged cells." +} +}, +"type": "object" +}, +"UpdateImagePropertiesRequest": { +"description": "Update the properties of an Image.", +"id": "UpdateImagePropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `imageProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the image outline color, set `fields` to `\"outline.outlineFill.solidFill.color\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"imageProperties": { +"$ref": "ImageProperties", +"description": "The image properties to update." +}, +"objectId": { +"description": "The object ID of the image the updates are applied to.", +"type": "string" +} +}, +"type": "object" +}, +"UpdateLineCategoryRequest": { +"description": "Updates the category of a line.", +"id": "UpdateLineCategoryRequest", +"properties": { +"lineCategory": { +"description": "The line category to update to. The exact line type is determined based on the category to update to and how it's routed to connect to other page elements.", +"enum": [ +"LINE_CATEGORY_UNSPECIFIED", +"STRAIGHT", +"BENT", +"CURVED" +], +"enumDescriptions": [ +"Unspecified line category.", +"Straight connectors, including straight connector 1.", +"Bent connectors, including bent connector 2 to 5.", +"Curved connectors, including curved connector 2 to 5." +], +"type": "string" +}, +"objectId": { +"description": "The object ID of the line the update is applied to. Only a line with a category indicating it is a \"connector\" can be updated. The line may be rerouted after updating its category.", +"type": "string" +} +}, +"type": "object" +}, +"UpdateLinePropertiesRequest": { +"description": "Updates the properties of a Line.", +"id": "UpdateLinePropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `lineProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the line solid fill color, set `fields` to `\"lineFill.solidFill.color\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"lineProperties": { +"$ref": "LineProperties", +"description": "The line properties to update." +}, +"objectId": { +"description": "The object ID of the line the update is applied to.", +"type": "string" +} +}, +"type": "object" +}, +"UpdatePageElementAltTextRequest": { +"description": "Updates the alt text title and/or description of a page element.", +"id": "UpdatePageElementAltTextRequest", +"properties": { +"description": { +"description": "The updated alt text description of the page element. If unset the existing value will be maintained. The description is exposed to screen readers and other accessibility interfaces. Only use human readable values related to the content of the page element.", +"type": "string" +}, +"objectId": { +"description": "The object ID of the page element the updates are applied to.", +"type": "string" +}, +"title": { +"description": "The updated alt text title of the page element. If unset the existing value will be maintained. The title is exposed to screen readers and other accessibility interfaces. Only use human readable values related to the content of the page element.", +"type": "string" +} +}, +"type": "object" +}, +"UpdatePageElementTransformRequest": { +"description": "Updates the transform of a page element. Updating the transform of a group will change the absolute transform of the page elements in that group, which can change their visual appearance. See the documentation for PageElement.transform for more details.", +"id": "UpdatePageElementTransformRequest", +"properties": { +"applyMode": { +"description": "The apply mode of the transform update.", +"enum": [ +"APPLY_MODE_UNSPECIFIED", +"RELATIVE", +"ABSOLUTE" +], +"enumDescriptions": [ +"Unspecified mode.", +"Applies the new AffineTransform matrix to the existing one, and replaces the existing one with the resulting concatenation.", +"Replaces the existing AffineTransform matrix with the new one." +], +"type": "string" +}, +"objectId": { +"description": "The object ID of the page element to update.", +"type": "string" +}, +"transform": { +"$ref": "AffineTransform", +"description": "The input transform matrix used to update the page element." +} +}, +"type": "object" +}, +"UpdatePageElementsZOrderRequest": { +"description": "Updates the Z-order of page elements. Z-order is an ordering of the elements on the page from back to front. The page element in the front may cover the elements that are behind it.", +"id": "UpdatePageElementsZOrderRequest", +"properties": { +"operation": { +"description": "The Z-order operation to apply on the page elements. When applying the operation on multiple page elements, the relative Z-orders within these page elements before the operation is maintained.", +"enum": [ +"Z_ORDER_OPERATION_UNSPECIFIED", +"BRING_TO_FRONT", +"BRING_FORWARD", +"SEND_BACKWARD", +"SEND_TO_BACK" +], +"enumDescriptions": [ +"Unspecified operation.", +"Brings the page elements to the front of the page.", +"Brings the page elements forward on the page by one element relative to the forwardmost one in the specified page elements.", +"Sends the page elements backward on the page by one element relative to the furthest behind one in the specified page elements.", +"Sends the page elements to the back of the page." +], +"type": "string" +}, +"pageElementObjectIds": { +"description": "The object IDs of the page elements to update. All the page elements must be on the same page and must not be grouped.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UpdatePagePropertiesRequest": { +"description": "Updates the properties of a Page.", +"id": "UpdatePagePropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `pageProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the page background solid fill color, set `fields` to `\"pageBackgroundFill.solidFill.color\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the page the update is applied to.", +"type": "string" +}, +"pageProperties": { +"$ref": "PageProperties", +"description": "The page properties to update." +} +}, +"type": "object" +}, +"UpdateParagraphStyleRequest": { +"description": "Updates the styling for all of the paragraphs within a Shape or Table that overlap with the given text index range.", +"id": "UpdateParagraphStyleRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The location of the cell in the table containing the paragraph(s) to style. If `object_id` refers to a table, `cell_location` must have a value. Otherwise, it must not." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `style` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example, to update the paragraph alignment, set `fields` to `\"alignment\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the shape or table with the text to be styled.", +"type": "string" +}, +"style": { +"$ref": "ParagraphStyle", +"description": "The paragraph's style." +}, +"textRange": { +"$ref": "Range", +"description": "The range of text containing the paragraph(s) to style." +} +}, +"type": "object" +}, +"UpdateShapePropertiesRequest": { +"description": "Update the properties of a Shape.", +"id": "UpdateShapePropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `shapeProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the shape background solid fill color, set `fields` to `\"shapeBackgroundFill.solidFill.color\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the shape the updates are applied to.", +"type": "string" +}, +"shapeProperties": { +"$ref": "ShapeProperties", +"description": "The shape properties to update." +} +}, +"type": "object" +}, +"UpdateSlidePropertiesRequest": { +"description": "Updates the properties of a Slide.", +"id": "UpdateSlidePropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root 'slideProperties' is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update whether a slide is skipped, set `fields` to `\"isSkipped\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the slide the update is applied to.", +"type": "string" +}, +"slideProperties": { +"$ref": "SlideProperties", +"description": "The slide properties to update." +} +}, +"type": "object" +}, +"UpdateSlidesPositionRequest": { +"description": "Updates the position of slides in the presentation.", +"id": "UpdateSlidesPositionRequest", +"properties": { +"insertionIndex": { +"description": "The index where the slides should be inserted, based on the slide arrangement before the move takes place. Must be between zero and the number of slides in the presentation, inclusive.", +"format": "int32", +"type": "integer" +}, +"slideObjectIds": { +"description": "The IDs of the slides in the presentation that should be moved. The slides in this list must be in existing presentation order, without duplicates.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UpdateTableBorderPropertiesRequest": { +"description": "Updates the properties of the table borders in a Table.", +"id": "UpdateTableBorderPropertiesRequest", +"properties": { +"borderPosition": { +"description": "The border position in the table range the updates should apply to. If a border position is not specified, the updates will apply to all borders in the table range.", +"enum": [ +"ALL", +"BOTTOM", +"INNER", +"INNER_HORIZONTAL", +"INNER_VERTICAL", +"LEFT", +"OUTER", +"RIGHT", +"TOP" +], +"enumDescriptions": [ +"All borders in the range.", +"Borders at the bottom of the range.", +"Borders on the inside of the range.", +"Horizontal borders on the inside of the range.", +"Vertical borders on the inside of the range.", +"Borders at the left of the range.", +"Borders along the outside of the range.", +"Borders at the right of the range.", +"Borders at the top of the range." +], +"type": "string" +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `tableBorderProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the table border solid fill color, set `fields` to `\"tableBorderFill.solidFill.color\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the table.", +"type": "string" +}, +"tableBorderProperties": { +"$ref": "TableBorderProperties", +"description": "The table border properties to update." +}, +"tableRange": { +"$ref": "TableRange", +"description": "The table range representing the subset of the table to which the updates are applied. If a table range is not specified, the updates will apply to the entire table." +} +}, +"type": "object" +}, +"UpdateTableCellPropertiesRequest": { +"description": "Update the properties of a TableCell.", +"id": "UpdateTableCellPropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `tableCellProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the table cell background solid fill color, set `fields` to `\"tableCellBackgroundFill.solidFill.color\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the table.", +"type": "string" +}, +"tableCellProperties": { +"$ref": "TableCellProperties", +"description": "The table cell properties to update." +}, +"tableRange": { +"$ref": "TableRange", +"description": "The table range representing the subset of the table to which the updates are applied. If a table range is not specified, the updates will apply to the entire table." +} +}, +"type": "object" +}, +"UpdateTableColumnPropertiesRequest": { +"description": "Updates the properties of a Table column.", +"id": "UpdateTableColumnPropertiesRequest", +"properties": { +"columnIndices": { +"description": "The list of zero-based indices specifying which columns to update. If no indices are provided, all columns in the table will be updated.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `tableColumnProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the column width, set `fields` to `\"column_width\"`. If '\"column_width\"' is included in the field mask but the property is left unset, the column width will default to 406,400 EMU (32 points).", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the table.", +"type": "string" +}, +"tableColumnProperties": { +"$ref": "TableColumnProperties", +"description": "The table column properties to update. If the value of `table_column_properties#column_width` in the request is less than 406,400 EMU (32 points), a 400 bad request error is returned." +} +}, +"type": "object" +}, +"UpdateTableRowPropertiesRequest": { +"description": "Updates the properties of a Table row.", +"id": "UpdateTableRowPropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `tableRowProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the minimum row height, set `fields` to `\"min_row_height\"`. If '\"min_row_height\"' is included in the field mask but the property is left unset, the minimum row height will default to 0.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the table.", +"type": "string" +}, +"rowIndices": { +"description": "The list of zero-based indices specifying which rows to update. If no indices are provided, all rows in the table will be updated.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"tableRowProperties": { +"$ref": "TableRowProperties", +"description": "The table row properties to update." +} +}, +"type": "object" +}, +"UpdateTextStyleRequest": { +"description": "Update the styling of text in a Shape or Table.", +"id": "UpdateTextStyleRequest", +"properties": { +"cellLocation": { +"$ref": "TableCellLocation", +"description": "The location of the cell in the table containing the text to style. If `object_id` refers to a table, `cell_location` must have a value. Otherwise, it must not." +}, +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `style` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example, to update the text style to bold, set `fields` to `\"bold\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the shape or table with the text to be styled.", +"type": "string" +}, +"style": { +"$ref": "TextStyle", +"description": "The style(s) to set on the text. If the value for a particular style matches that of the parent, that style will be set to inherit. Certain text style changes may cause other changes meant to mirror the behavior of the Slides editor. See the documentation of TextStyle for more information." +}, +"textRange": { +"$ref": "Range", +"description": "The range of text to style. The range may be extended to include adjacent newlines. If the range fully contains a paragraph belonging to a list, the paragraph's bullet is also updated with the matching text style." +} +}, +"type": "object" +}, +"UpdateVideoPropertiesRequest": { +"description": "Update the properties of a Video.", +"id": "UpdateVideoPropertiesRequest", +"properties": { +"fields": { +"description": "The fields that should be updated. At least one field must be specified. The root `videoProperties` is implied and should not be specified. A single `\"*\"` can be used as short-hand for listing every field. For example to update the video outline color, set `fields` to `\"outline.outlineFill.solidFill.color\"`. To reset a property to its default value, include its field name in the field mask but leave the field itself unset.", +"format": "google-fieldmask", +"type": "string" +}, +"objectId": { +"description": "The object ID of the video the updates are applied to.", +"type": "string" +}, +"videoProperties": { +"$ref": "VideoProperties", +"description": "The video properties to update." +} +}, +"type": "object" +}, +"Video": { +"description": "A PageElement kind representing a video.", +"id": "Video", +"properties": { +"id": { +"description": "The video source's unique identifier for this video.", +"type": "string" +}, +"source": { +"description": "The video source.", +"enum": [ +"SOURCE_UNSPECIFIED", +"YOUTUBE", +"DRIVE" +], +"enumDescriptions": [ +"The video source is unspecified.", +"The video source is YouTube.", +"The video source is Google Drive." +], +"type": "string" +}, +"url": { +"description": "An URL to a video. The URL is valid as long as the source video exists and sharing settings do not change.", +"type": "string" +}, +"videoProperties": { +"$ref": "VideoProperties", +"description": "The properties of the video." +} +}, +"type": "object" +}, +"VideoProperties": { +"description": "The properties of the Video.", +"id": "VideoProperties", +"properties": { +"autoPlay": { +"description": "Whether to enable video autoplay when the page is displayed in present mode. Defaults to false.", +"type": "boolean" +}, +"end": { +"description": "The time at which to end playback, measured in seconds from the beginning of the video. If set, the end time should be after the start time. If not set or if you set this to a value that exceeds the video's length, the video will be played until its end.", +"format": "uint32", +"type": "integer" +}, +"mute": { +"description": "Whether to mute the audio during video playback. Defaults to false.", +"type": "boolean" +}, +"outline": { +"$ref": "Outline", +"description": "The outline of the video. The default outline matches the defaults for new videos created in the Slides editor." +}, +"start": { +"description": "The time at which to start playback, measured in seconds from the beginning of the video. If set, the start time should be before the end time. If you set this to a value that exceeds the video's length in seconds, the video will be played from the last second. If not set, the video will be played from the beginning.", +"format": "uint32", +"type": "integer" +} +}, +"type": "object" +}, +"WeightedFontFamily": { +"description": "Represents a font family and weight used to style a TextRun.", +"id": "WeightedFontFamily", +"properties": { +"fontFamily": { +"description": "The font family of the text. The font family can be any font from the Font menu in Slides or from [Google Fonts] (https://fonts.google.com/). If the font name is unrecognized, the text is rendered in `Arial`.", +"type": "string" +}, +"weight": { +"description": "The rendered weight of the text. This field can have any value that is a multiple of `100` between `100` and `900`, inclusive. This range corresponds to the numerical values described in the CSS 2.1 Specification, [section 15.6](https://www.w3.org/TR/CSS21/fonts.html#font-boldness), with non-numerical values disallowed. Weights greater than or equal to `700` are considered bold, and weights less than `700`are not bold. The default value is `400` (\"normal\").", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"WordArt": { +"description": "A PageElement kind representing word art.", +"id": "WordArt", +"properties": { +"renderedText": { +"description": "The text rendered as word art.", +"type": "string" +} +}, +"type": "object" +}, +"WriteControl": { +"description": "Provides control over how write requests are executed.", +"id": "WriteControl", +"properties": { +"requiredRevisionId": { +"description": "The revision ID of the presentation required for the write request. If specified and the required revision ID doesn't match the presentation's current revision ID, the request is not processed and returns a 400 bad request error. When a required revision ID is returned in a response, it indicates the revision ID of the document after the request was applied.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Slides API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/smartdevicemanagement.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/smartdevicemanagement.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..e61a258c1cef078ac40e057494eb1746e51246c6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/smartdevicemanagement.v1.json @@ -0,0 +1,488 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/sdm.service": { +"description": "See and/or control the devices that you selected" +} +} +} +}, +"basePath": "", +"baseUrl": "https://smartdevicemanagement.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Smart Device Management", +"description": "Allow select enterprise partners to access, control, and manage Google and Nest devices programmatically.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/nest/device-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "smartdevicemanagement:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://smartdevicemanagement.mtls.googleapis.com/", +"name": "smartdevicemanagement", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"enterprises": { +"resources": { +"devices": { +"methods": { +"executeCommand": { +"description": "Executes a command to device managed by the enterprise.", +"flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}:executeCommand", +"httpMethod": "POST", +"id": "smartdevicemanagement.enterprises.devices.executeCommand", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the device requested. For example: \"enterprises/XYZ/devices/123\"", +"location": "path", +"pattern": "^enterprises/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:executeCommand", +"request": { +"$ref": "GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest" +}, +"response": { +"$ref": "GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/sdm.service" +] +}, +"get": { +"description": "Gets a device managed by the enterprise.", +"flatPath": "v1/enterprises/{enterprisesId}/devices/{devicesId}", +"httpMethod": "GET", +"id": "smartdevicemanagement.enterprises.devices.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the device requested. For example: \"enterprises/XYZ/devices/123\"", +"location": "path", +"pattern": "^enterprises/[^/]+/devices/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleHomeEnterpriseSdmV1Device" +}, +"scopes": [ +"https://www.googleapis.com/auth/sdm.service" +] +}, +"list": { +"description": "Lists devices managed by the enterprise.", +"flatPath": "v1/enterprises/{enterprisesId}/devices", +"httpMethod": "GET", +"id": "smartdevicemanagement.enterprises.devices.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional filter to list devices. Filters can be done on: Device custom name (substring match): 'customName=wing'", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The parent enterprise to list devices under. E.g. \"enterprises/XYZ\".", +"location": "path", +"pattern": "^enterprises/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/devices", +"response": { +"$ref": "GoogleHomeEnterpriseSdmV1ListDevicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/sdm.service" +] +} +} +}, +"structures": { +"methods": { +"get": { +"description": "Gets a structure managed by the enterprise.", +"flatPath": "v1/enterprises/{enterprisesId}/structures/{structuresId}", +"httpMethod": "GET", +"id": "smartdevicemanagement.enterprises.structures.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the structure requested. For example: \"enterprises/XYZ/structures/ABC\".", +"location": "path", +"pattern": "^enterprises/[^/]+/structures/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleHomeEnterpriseSdmV1Structure" +}, +"scopes": [ +"https://www.googleapis.com/auth/sdm.service" +] +}, +"list": { +"description": "Lists structures managed by the enterprise.", +"flatPath": "v1/enterprises/{enterprisesId}/structures", +"httpMethod": "GET", +"id": "smartdevicemanagement.enterprises.structures.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional filter to list structures.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "The parent enterprise to list structures under. E.g. \"enterprises/XYZ\".", +"location": "path", +"pattern": "^enterprises/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/structures", +"response": { +"$ref": "GoogleHomeEnterpriseSdmV1ListStructuresResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/sdm.service" +] +} +}, +"resources": { +"rooms": { +"methods": { +"get": { +"description": "Gets a room managed by the enterprise.", +"flatPath": "v1/enterprises/{enterprisesId}/structures/{structuresId}/rooms/{roomsId}", +"httpMethod": "GET", +"id": "smartdevicemanagement.enterprises.structures.rooms.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the room requested. For example: \"enterprises/XYZ/structures/ABC/rooms/123\".", +"location": "path", +"pattern": "^enterprises/[^/]+/structures/[^/]+/rooms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleHomeEnterpriseSdmV1Room" +}, +"scopes": [ +"https://www.googleapis.com/auth/sdm.service" +] +}, +"list": { +"description": "Lists rooms managed by the enterprise.", +"flatPath": "v1/enterprises/{enterprisesId}/structures/{structuresId}/rooms", +"httpMethod": "GET", +"id": "smartdevicemanagement.enterprises.structures.rooms.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The parent resource name of the rooms requested. For example: \"enterprises/XYZ/structures/ABC\".", +"location": "path", +"pattern": "^enterprises/[^/]+/structures/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/rooms", +"response": { +"$ref": "GoogleHomeEnterpriseSdmV1ListRoomsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/sdm.service" +] +} +} +} +} +} +} +} +}, +"revision": "20240324", +"rootUrl": "https://smartdevicemanagement.googleapis.com/", +"schemas": { +"GoogleHomeEnterpriseSdmV1Device": { +"description": "Device resource represents an instance of enterprise managed device in the property.", +"id": "GoogleHomeEnterpriseSdmV1Device", +"properties": { +"name": { +"description": "Required. The resource name of the device. For example: \"enterprises/XYZ/devices/123\".", +"type": "string" +}, +"parentRelations": { +"description": "Assignee details of the device.", +"items": { +"$ref": "GoogleHomeEnterpriseSdmV1ParentRelation" +}, +"type": "array" +}, +"traits": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Output only. Device traits.", +"readOnly": true, +"type": "object" +}, +"type": { +"description": "Output only. Type of the device for general display purposes. For example: \"THERMOSTAT\". The device type should not be used to deduce or infer functionality of the actual device it is assigned to. Instead, use the returned traits for the device.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest": { +"description": "Request message for SmartDeviceManagementService.ExecuteDeviceCommand", +"id": "GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandRequest", +"properties": { +"command": { +"description": "The command name to execute, represented by the fully qualified protobuf message name.", +"type": "string" +}, +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The command message to execute, represented as a Struct.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse": { +"description": "Response message for SmartDeviceManagementService.ExecuteDeviceCommand", +"id": "GoogleHomeEnterpriseSdmV1ExecuteDeviceCommandResponse", +"properties": { +"results": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The results of executing the command.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1ListDevicesResponse": { +"description": "Response message for SmartDeviceManagementService.ListDevices", +"id": "GoogleHomeEnterpriseSdmV1ListDevicesResponse", +"properties": { +"devices": { +"description": "The list of devices.", +"items": { +"$ref": "GoogleHomeEnterpriseSdmV1Device" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1ListRoomsResponse": { +"description": "Response message for SmartDeviceManagementService.ListRooms", +"id": "GoogleHomeEnterpriseSdmV1ListRoomsResponse", +"properties": { +"rooms": { +"description": "The list of rooms.", +"items": { +"$ref": "GoogleHomeEnterpriseSdmV1Room" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1ListStructuresResponse": { +"description": "Response message for SmartDeviceManagementService.ListStructures", +"id": "GoogleHomeEnterpriseSdmV1ListStructuresResponse", +"properties": { +"structures": { +"description": "The list of structures.", +"items": { +"$ref": "GoogleHomeEnterpriseSdmV1Structure" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1ParentRelation": { +"description": "Represents device relationships, for instance, structure/room to which the device is assigned to.", +"id": "GoogleHomeEnterpriseSdmV1ParentRelation", +"properties": { +"displayName": { +"description": "Output only. The custom name of the relation -- e.g., structure/room where the device is assigned to.", +"readOnly": true, +"type": "string" +}, +"parent": { +"description": "Output only. The name of the relation -- e.g., structure/room where the device is assigned to. For example: \"enterprises/XYZ/structures/ABC\" or \"enterprises/XYZ/structures/ABC/rooms/123\"", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1Room": { +"description": "Room resource represents an instance of sub-space within a structure such as rooms in a hotel suite or rental apartment.", +"id": "GoogleHomeEnterpriseSdmV1Room", +"properties": { +"name": { +"description": "Output only. The resource name of the room. For example: \"enterprises/XYZ/structures/ABC/rooms/123\".", +"readOnly": true, +"type": "string" +}, +"traits": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Room traits.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleHomeEnterpriseSdmV1Structure": { +"description": "Structure resource represents an instance of enterprise managed home or hotel room.", +"id": "GoogleHomeEnterpriseSdmV1Structure", +"properties": { +"name": { +"description": "Output only. The resource name of the structure. For example: \"enterprises/XYZ/structures/ABC\".", +"readOnly": true, +"type": "string" +}, +"traits": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Structure traits.", +"type": "object" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Smart Device Management API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/solar.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/solar.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..f157bea90d39d078df379550999f233ffdb224be --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/solar.v1.json @@ -0,0 +1,926 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://solar.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Solar", +"description": "Solar API.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/maps/documentation/solar", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "solar:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://solar.mtls.googleapis.com/", +"name": "solar", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"buildingInsights": { +"methods": { +"findClosest": { +"description": "Locates the closest building to a query point. Returns an error with code `NOT_FOUND` if there are no buildings within approximately 50m of the query point.", +"flatPath": "v1/buildingInsights:findClosest", +"httpMethod": "GET", +"id": "solar.buildingInsights.findClosest", +"parameterOrder": [], +"parameters": { +"location.latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"location": "query", +"type": "number" +}, +"location.longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"location": "query", +"type": "number" +}, +"requiredQuality": { +"description": "Optional. The minimum quality level allowed in the results. No result with lower quality than this will be returned. Not specifying this is equivalent to restricting to HIGH quality only.", +"enum": [ +"IMAGERY_QUALITY_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No quality is known.", +"The underlying imagery and DSM data were processed at 0.1 m/pixel.", +"The underlying imagery and DSM data were processed at 0.25 m/pixel.", +"The underlying imagery and DSM data were processed at 0.5 m/pixel." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/buildingInsights:findClosest", +"response": { +"$ref": "BuildingInsights" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"dataLayers": { +"methods": { +"get": { +"description": "Gets solar information for a region surrounding a location. Returns an error with code `NOT_FOUND` if the location is outside the coverage area.", +"flatPath": "v1/dataLayers:get", +"httpMethod": "GET", +"id": "solar.dataLayers.get", +"parameterOrder": [], +"parameters": { +"location.latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"location": "query", +"type": "number" +}, +"location.longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"location": "query", +"type": "number" +}, +"pixelSizeMeters": { +"description": "Optional. The minimum scale, in meters per pixel, of the data to return. Values of 0.1 (the default, if this field is not set explicitly), 0.25, 0.5, and 1.0 are supported. Imagery components whose normal resolution is less than `pixel_size_meters` will be returned at the resolution specified by `pixel_size_meters`; imagery components whose normal resolution is equal to or greater than `pixel_size_meters` will be returned at that normal resolution.", +"format": "float", +"location": "query", +"type": "number" +}, +"radiusMeters": { +"description": "Required. The radius, in meters, defining the region surrounding that centre point for which data should be returned. The limitations on this value are: * Any value up to 100m can always be specified. * Values over 100m can be specified, as long as `radius_meters` <= `pixel_size_meters * 1000`. * However, for values over 175m, the `DataLayerView` in the request must not include monthly flux or hourly shade.", +"format": "float", +"location": "query", +"type": "number" +}, +"requiredQuality": { +"description": "Optional. The minimum quality level allowed in the results. No result with lower quality than this will be returned. Not specifying this is equivalent to restricting to HIGH quality only.", +"enum": [ +"IMAGERY_QUALITY_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No quality is known.", +"The underlying imagery and DSM data were processed at 0.1 m/pixel.", +"The underlying imagery and DSM data were processed at 0.25 m/pixel.", +"The underlying imagery and DSM data were processed at 0.5 m/pixel." +], +"location": "query", +"type": "string" +}, +"view": { +"description": "Optional. The desired subset of the data to return.", +"enum": [ +"DATA_LAYER_VIEW_UNSPECIFIED", +"DSM_LAYER", +"IMAGERY_LAYERS", +"IMAGERY_AND_ANNUAL_FLUX_LAYERS", +"IMAGERY_AND_ALL_FLUX_LAYERS", +"FULL_LAYERS" +], +"enumDescriptions": [ +"Equivalent to FULL.", +"Get the DSM only.", +"Get the DSM, RGB, and mask.", +"Get the DSM, RGB, mask, and annual flux.", +"Get the DSM, RGB, mask, annual flux, and monthly flux.", +"Get all data." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/dataLayers:get", +"response": { +"$ref": "DataLayers" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"geoTiff": { +"methods": { +"get": { +"description": "Returns an image by its ID.", +"flatPath": "v1/geoTiff:get", +"httpMethod": "GET", +"id": "solar.geoTiff.get", +"parameterOrder": [], +"parameters": { +"id": { +"description": "Required. The ID of the asset being requested.", +"location": "query", +"type": "string" +} +}, +"path": "v1/geoTiff:get", +"response": { +"$ref": "HttpBody" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://solar.googleapis.com/", +"schemas": { +"BuildingInsights": { +"description": "Response message for `Solar.FindClosestBuildingInsights`. Information about the location, dimensions, and solar potential of a building.", +"id": "BuildingInsights", +"properties": { +"administrativeArea": { +"description": "Administrative area 1 (e.g., in the US, the state) that contains this building. For example, in the US, the abbreviation might be \"MA\" or \"CA.\"", +"type": "string" +}, +"boundingBox": { +"$ref": "LatLngBox", +"description": "The bounding box of the building." +}, +"center": { +"$ref": "LatLng", +"description": "A point near the center of the building." +}, +"imageryDate": { +"$ref": "Date", +"description": "Date that the underlying imagery was acquired. This is approximate." +}, +"imageryProcessedDate": { +"$ref": "Date", +"description": "When processing was completed on this imagery." +}, +"imageryQuality": { +"description": "The quality of the imagery used to compute the data for this building.", +"enum": [ +"IMAGERY_QUALITY_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No quality is known.", +"The underlying imagery and DSM data were processed at 0.1 m/pixel.", +"The underlying imagery and DSM data were processed at 0.25 m/pixel.", +"The underlying imagery and DSM data were processed at 0.5 m/pixel." +], +"type": "string" +}, +"name": { +"description": "The resource name for the building, of the format `building/`.", +"type": "string" +}, +"postalCode": { +"description": "Postal code (e.g., US zip code) this building is contained by.", +"type": "string" +}, +"regionCode": { +"description": "Region code for the country (or region) this building is in.", +"type": "string" +}, +"solarPotential": { +"$ref": "SolarPotential", +"description": "Solar potential of the building." +}, +"statisticalArea": { +"description": "Statistical area (e.g., US census tract) this building is in.", +"type": "string" +} +}, +"type": "object" +}, +"CashPurchaseSavings": { +"description": "Cost and benefit of an outright purchase of a particular configuration of solar panels with a particular electricity usage.", +"id": "CashPurchaseSavings", +"properties": { +"outOfPocketCost": { +"$ref": "Money", +"description": "Initial cost before tax incentives: the amount that must be paid out-of-pocket. Contrast with `upfront_cost`, which is after tax incentives." +}, +"paybackYears": { +"description": "Number of years until payback occurs. A negative value means payback never occurs within the lifetime period.", +"format": "float", +"type": "number" +}, +"rebateValue": { +"$ref": "Money", +"description": "The value of all tax rebates." +}, +"savings": { +"$ref": "SavingsOverTime", +"description": "How much is saved (or not) over the lifetime period." +}, +"upfrontCost": { +"$ref": "Money", +"description": "Initial cost after tax incentives: it's the amount that must be paid during first year. Contrast with `out_of_pocket_cost`, which is before tax incentives." +} +}, +"type": "object" +}, +"DataLayers": { +"description": "Information about the solar potential of a region. The actual data are contained in a number of GeoTIFF files covering the requested region, for which this message contains URLs: Each string in the `DataLayers` message contains a URL from which the corresponding GeoTIFF can be fetched. These URLs are valid for a few hours after they've been generated. Most of the GeoTIFF files are at a resolution of 0.1m/pixel, but the monthly flux file is at 0.5m/pixel, and the hourly shade files are at 1m/pixel. If a `pixel_size_meters` value was specified in the `GetDataLayersRequest`, then the minimum resolution in the GeoTIFF files will be that value.", +"id": "DataLayers", +"properties": { +"annualFluxUrl": { +"description": "The URL for the annual flux map (annual sunlight on roofs) of the region. Values are kWh/kW/year. This is *unmasked flux*: flux is computed for every location, not just building rooftops. Invalid locations are stored as -9999: locations outside our coverage area will be invalid, and a few locations inside the coverage area, where we were unable to calculate flux, will also be invalid.", +"type": "string" +}, +"dsmUrl": { +"description": "The URL for an image of the DSM (Digital Surface Model) of the region. Values are in meters above EGM96 geoid (i.e., sea level). Invalid locations (where we don't have data) are stored as -9999.", +"type": "string" +}, +"hourlyShadeUrls": { +"description": "Twelve URLs for hourly shade, corresponding to January...December, in order. Each GeoTIFF will contain 24 bands, corresponding to the 24 hours of the day. Each pixel is a 32 bit integer, corresponding to the (up to) 31 days of that month; a 1 bit means that the corresponding location is able to see the sun at that day, of that hour, of that month. Invalid locations are stored as -9999 (since this is negative, it has bit 31 set, and no valid value could have bit 31 set as that would correspond to the 32nd day of the month). An example may be useful. If you want to know whether a point (at pixel location (x, y)) saw sun at 4pm on the 22nd of June you would: 1. fetch the sixth URL in this list (corresponding to June). 1. look up the 17th channel (corresponding to 4pm). 1. read the 32-bit value at (x, y). 1. read bit 21 of the value (corresponding to the 22nd of the month). 1. if that bit is a 1, then that spot saw the sun at 4pm 22 June. More formally: Given `month` (1-12), `day` (1...month max; February has 28 days) and `hour` (0-23), the shade/sun for that month/day/hour at a position `(x, y)` is the bit ``` (hourly_shade[month - 1])(x, y)[hour] & (1 << (day - 1)) ``` where `(x, y)` is spatial indexing, `[month - 1]` refers to fetching the `month - 1`st URL (indexing from zero), `[hour]` is indexing into the channels, and a final non-zero result means \"sunny\". There are no leap days, and DST doesn't exist (all days are 24 hours long; noon is always \"standard time\" noon).", +"items": { +"type": "string" +}, +"type": "array" +}, +"imageryDate": { +"$ref": "Date", +"description": "When the source imagery (from which all the other data are derived) in this region was taken. It is necessarily somewhat approximate, as the images may have been taken over more than one day." +}, +"imageryProcessedDate": { +"$ref": "Date", +"description": "When processing was completed on this imagery." +}, +"imageryQuality": { +"description": "The quality of the result's imagery.", +"enum": [ +"IMAGERY_QUALITY_UNSPECIFIED", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No quality is known.", +"The underlying imagery and DSM data were processed at 0.1 m/pixel.", +"The underlying imagery and DSM data were processed at 0.25 m/pixel.", +"The underlying imagery and DSM data were processed at 0.5 m/pixel." +], +"type": "string" +}, +"maskUrl": { +"description": "The URL for the building mask image: one bit per pixel saying whether that pixel is considered to be part of a rooftop or not.", +"type": "string" +}, +"monthlyFluxUrl": { +"description": "The URL for the monthly flux map (sunlight on roofs, broken down by month) of the region. Values are kWh/kW/year. The GeoTIFF pointed to by this URL will contain twelve bands, corresponding to January...December, in order.", +"type": "string" +}, +"rgbUrl": { +"description": "The URL for an image of RGB data (aerial photo) of the region.", +"type": "string" +} +}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"FinancedPurchaseSavings": { +"description": "Cost and benefit of using a loan to buy a particular configuration of solar panels with a particular electricity usage.", +"id": "FinancedPurchaseSavings", +"properties": { +"annualLoanPayment": { +"$ref": "Money", +"description": "Annual loan payments." +}, +"loanInterestRate": { +"description": "The interest rate on loans assumed in this set of calculations.", +"format": "float", +"type": "number" +}, +"rebateValue": { +"$ref": "Money", +"description": "The value of all tax rebates (including Federal Investment Tax Credit (ITC))." +}, +"savings": { +"$ref": "SavingsOverTime", +"description": "How much is saved (or not) over the lifetime period." +} +}, +"type": "object" +}, +"FinancialAnalysis": { +"description": "Analysis of the cost and benefits of the optimum solar layout for a particular electric bill size.", +"id": "FinancialAnalysis", +"properties": { +"averageKwhPerMonth": { +"description": "How much electricity the house uses in an average month, based on the bill size and the local electricity rates.", +"format": "float", +"type": "number" +}, +"cashPurchaseSavings": { +"$ref": "CashPurchaseSavings", +"description": "Cost and benefit of buying the solar panels with cash." +}, +"defaultBill": { +"description": "Whether this is the bill size selected to be the default bill for the area this building is in. Exactly one `FinancialAnalysis` in `BuildingSolarPotential` should have `default_bill` set.", +"type": "boolean" +}, +"financedPurchaseSavings": { +"$ref": "FinancedPurchaseSavings", +"description": "Cost and benefit of buying the solar panels by financing the purchase." +}, +"financialDetails": { +"$ref": "FinancialDetails", +"description": "Financial information that applies regardless of the financing method used." +}, +"leasingSavings": { +"$ref": "LeasingSavings", +"description": "Cost and benefit of leasing the solar panels." +}, +"monthlyBill": { +"$ref": "Money", +"description": "The monthly electric bill this analysis assumes." +}, +"panelConfigIndex": { +"description": "Index in solar_panel_configs of the optimum solar layout for this bill size. This can be -1 indicating that there is no layout. In this case, the remaining submessages will be omitted.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"FinancialDetails": { +"description": "Details of a financial analysis. Some of these details are already stored at higher levels (e.g., out of pocket cost). Total money amounts are over a lifetime period defined by the panel_lifetime_years field in SolarPotential. Note: The out of pocket cost of purchasing the panels is given in the out_of_pocket_cost field in CashPurchaseSavings.", +"id": "FinancialDetails", +"properties": { +"costOfElectricityWithoutSolar": { +"$ref": "Money", +"description": "Total cost of electricity the user would have paid over the lifetime period if they didn't install solar." +}, +"federalIncentive": { +"$ref": "Money", +"description": "Amount of money available from federal incentives; this applies if the user buys (with or without a loan) the panels." +}, +"initialAcKwhPerYear": { +"description": "How many AC kWh we think the solar panels will generate in their first year.", +"format": "float", +"type": "number" +}, +"lifetimeSrecTotal": { +"$ref": "Money", +"description": "Amount of money the user will receive from Solar Renewable Energy Credits over the panel lifetime; this applies if the user buys (with or without a loan) the panels." +}, +"netMeteringAllowed": { +"description": "Whether net metering is allowed.", +"type": "boolean" +}, +"percentageExportedToGrid": { +"description": "The percentage (0-100) of solar electricity production we assumed was exported to the grid, based on the first quarter of production. This affects the calculations if net metering is not allowed.", +"format": "float", +"type": "number" +}, +"remainingLifetimeUtilityBill": { +"$ref": "Money", +"description": "Utility bill for electricity not produced by solar, for the lifetime of the panels." +}, +"solarPercentage": { +"description": "Percentage (0-100) of the user's power supplied by solar. Valid for the first year but approximately correct for future years.", +"format": "float", +"type": "number" +}, +"stateIncentive": { +"$ref": "Money", +"description": "Amount of money available from state incentives; this applies if the user buys (with or without a loan) the panels." +}, +"utilityIncentive": { +"$ref": "Money", +"description": "Amount of money available from utility incentives; this applies if the user buys (with or without a loan) the panels." +} +}, +"type": "object" +}, +"HttpBody": { +"description": "Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.", +"id": "HttpBody", +"properties": { +"contentType": { +"description": "The HTTP Content-Type header value specifying the content type of the body.", +"type": "string" +}, +"data": { +"description": "The HTTP request/response body as raw binary.", +"format": "byte", +"type": "string" +}, +"extensions": { +"description": "Application specific response metadata. Must be set in the first response for streaming APIs.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"LatLng": { +"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", +"id": "LatLng", +"properties": { +"latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"LatLngBox": { +"description": "A bounding box in lat/lng coordinates.", +"id": "LatLngBox", +"properties": { +"ne": { +"$ref": "LatLng", +"description": "The northeast corner of the box." +}, +"sw": { +"$ref": "LatLng", +"description": "The southwest corner of the box." +} +}, +"type": "object" +}, +"LeasingSavings": { +"description": "Cost and benefit of leasing a particular configuration of solar panels with a particular electricity usage.", +"id": "LeasingSavings", +"properties": { +"annualLeasingCost": { +"$ref": "Money", +"description": "Estimated annual leasing cost." +}, +"leasesAllowed": { +"description": "Whether leases are allowed in this juristiction (leases are not allowed in some states). If this field is false, then the values in this message should probably be ignored.", +"type": "boolean" +}, +"leasesSupported": { +"description": "Whether leases are supported in this juristiction by the financial calculation engine. If this field is false, then the values in this message should probably be ignored. This is independent of `leases_allowed`: in some areas leases are allowed, but under conditions that aren't handled by the financial models.", +"type": "boolean" +}, +"savings": { +"$ref": "SavingsOverTime", +"description": "How much is saved (or not) over the lifetime period." +} +}, +"type": "object" +}, +"Money": { +"description": "Represents an amount of money with its currency type.", +"id": "Money", +"properties": { +"currencyCode": { +"description": "The three-letter currency code defined in ISO 4217.", +"type": "string" +}, +"nanos": { +"description": "Number of nano (10^-9) units of the amount. The value must be between -999,999,999 and +999,999,999 inclusive. If `units` is positive, `nanos` must be positive or zero. If `units` is zero, `nanos` can be positive, zero, or negative. If `units` is negative, `nanos` must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.", +"format": "int32", +"type": "integer" +}, +"units": { +"description": "The whole units of the amount. For example if `currencyCode` is `\"USD\"`, then 1 unit is one US dollar.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"RoofSegmentSizeAndSunshineStats": { +"description": "Information about the size and sunniness quantiles of a roof segment.", +"id": "RoofSegmentSizeAndSunshineStats", +"properties": { +"azimuthDegrees": { +"description": "Compass direction the roof segment is pointing in. 0 = North, 90 = East, 180 = South. For a \"flat\" roof segment (`pitch_degrees` very near 0), azimuth is not well defined, so for consistency, we define it arbitrarily to be 0 (North).", +"format": "float", +"type": "number" +}, +"boundingBox": { +"$ref": "LatLngBox", +"description": "The bounding box of the roof segment." +}, +"center": { +"$ref": "LatLng", +"description": "A point near the center of the roof segment." +}, +"pitchDegrees": { +"description": "Angle of the roof segment relative to the theoretical ground plane. 0 = parallel to the ground, 90 = perpendicular to the ground.", +"format": "float", +"type": "number" +}, +"planeHeightAtCenterMeters": { +"description": "The height of the roof segment plane, in meters above sea level, at the point designated by `center`. Together with the pitch, azimuth, and center location, this fully defines the roof segment plane.", +"format": "float", +"type": "number" +}, +"stats": { +"$ref": "SizeAndSunshineStats", +"description": "Total size and sunlight quantiles for the roof segment." +} +}, +"type": "object" +}, +"RoofSegmentSummary": { +"description": "Information about a roof segment on the building, with some number of panels placed on it.", +"id": "RoofSegmentSummary", +"properties": { +"azimuthDegrees": { +"description": "Compass direction the roof segment is pointing in. 0 = North, 90 = East, 180 = South. For a \"flat\" roof segment (`pitch_degrees` very near 0), azimuth is not well defined, so for consistency, we define it arbitrarily to be 0 (North).", +"format": "float", +"type": "number" +}, +"panelsCount": { +"description": "The total number of panels on this segment.", +"format": "int32", +"type": "integer" +}, +"pitchDegrees": { +"description": "Angle of the roof segment relative to the theoretical ground plane. 0 = parallel to the ground, 90 = perpendicular to the ground.", +"format": "float", +"type": "number" +}, +"segmentIndex": { +"description": "Index in roof_segment_stats of the corresponding `RoofSegmentSizeAndSunshineStats`.", +"format": "int32", +"type": "integer" +}, +"yearlyEnergyDcKwh": { +"description": "How much sunlight energy this part of the layout captures over the course of a year, in DC kWh, assuming the panels described above.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"SavingsOverTime": { +"description": "Financial information that's shared between different financing methods.", +"id": "SavingsOverTime", +"properties": { +"financiallyViable": { +"description": "Indicates whether this scenario is financially viable. Will be false for scenarios with poor financial viability (e.g., money-losing).", +"type": "boolean" +}, +"presentValueOfSavingsLifetime": { +"$ref": "Money", +"description": "Using the assumed discount rate, what is the present value of the cumulative lifetime savings?" +}, +"presentValueOfSavingsYear20": { +"$ref": "Money", +"description": "Using the assumed discount rate, what is the present value of the cumulative 20-year savings?" +}, +"savingsLifetime": { +"$ref": "Money", +"description": "Savings in the entire panel lifetime." +}, +"savingsYear1": { +"$ref": "Money", +"description": "Savings in the first year after panel installation." +}, +"savingsYear20": { +"$ref": "Money", +"description": "Savings in the first twenty years after panel installation." +} +}, +"type": "object" +}, +"SizeAndSunshineStats": { +"description": "Size and sunniness quantiles of a roof, or part of a roof.", +"id": "SizeAndSunshineStats", +"properties": { +"areaMeters2": { +"description": "The area of the roof or roof segment, in m^2. This is the roof area (accounting for tilt), not the ground footprint area.", +"format": "float", +"type": "number" +}, +"groundAreaMeters2": { +"description": "The ground footprint area covered by the roof or roof segment, in m^2.", +"format": "float", +"type": "number" +}, +"sunshineQuantiles": { +"description": "Quantiles of the pointwise sunniness across the area. If there are N values here, this represents the (N-1)-iles. For example, if there are 5 values, then they would be the quartiles (min, 25%, 50%, 75%, max). Values are in annual kWh/kW like max_sunshine_hours_per_year.", +"items": { +"format": "float", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"SolarPanel": { +"description": "SolarPanel describes the position, orientation, and production of a single solar panel. See the panel_height_meters, panel_width_meters, and panel_capacity_watts fields in SolarPotential for information on the parameters of the panel.", +"id": "SolarPanel", +"properties": { +"center": { +"$ref": "LatLng", +"description": "The centre of the panel." +}, +"orientation": { +"description": "The orientation of the panel.", +"enum": [ +"SOLAR_PANEL_ORIENTATION_UNSPECIFIED", +"LANDSCAPE", +"PORTRAIT" +], +"enumDescriptions": [ +"No panel orientation is known.", +"A `LANDSCAPE` panel has its long edge perpendicular to the azimuth direction of the roof segment that it is placed on.", +"A `PORTRAIT` panel has its long edge parallel to the azimuth direction of the roof segment that it is placed on." +], +"type": "string" +}, +"segmentIndex": { +"description": "Index in roof_segment_stats of the `RoofSegmentSizeAndSunshineStats` which corresponds to the roof segment that this panel is placed on.", +"format": "int32", +"type": "integer" +}, +"yearlyEnergyDcKwh": { +"description": "How much sunlight energy this layout captures over the course of a year, in DC kWh.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"SolarPanelConfig": { +"description": "SolarPanelConfig describes a particular placement of solar panels on the roof.", +"id": "SolarPanelConfig", +"properties": { +"panelsCount": { +"description": "Total number of panels. Note that this is redundant to (the sum of) the corresponding fields in roof_segment_summaries.", +"format": "int32", +"type": "integer" +}, +"roofSegmentSummaries": { +"description": "Information about the production of each roof segment that is carrying at least one panel in this layout. `roof_segment_summaries[i]` describes the i-th roof segment, including its size, expected production and orientation.", +"items": { +"$ref": "RoofSegmentSummary" +}, +"type": "array" +}, +"yearlyEnergyDcKwh": { +"description": "How much sunlight energy this layout captures over the course of a year, in DC kWh, assuming the panels described above.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"SolarPotential": { +"description": "Information about the solar potential of a building. A number of fields in this are defined in terms of \"panels\". The fields panel_capacity_watts, panel_height_meters, and panel_width_meters describe the parameters of the model of panel used in these calculations.", +"id": "SolarPotential", +"properties": { +"buildingStats": { +"$ref": "SizeAndSunshineStats", +"description": "Size and sunlight quantiles for the entire building, including parts of the roof that were not assigned to some roof segment. Because the orientations of these parts are not well characterised, the roof area estimate is unreliable, but the ground area estimate is reliable. It may be that a more reliable whole building roof area can be obtained by scaling the roof area from whole_roof_stats by the ratio of the ground areas of `building_stats` and `whole_roof_stats`." +}, +"carbonOffsetFactorKgPerMwh": { +"description": "Equivalent amount of CO2 produced per MWh of grid electricity. This is a measure of the carbon intensity of grid electricity displaced by solar electricity.", +"format": "float", +"type": "number" +}, +"financialAnalyses": { +"description": "A FinancialAnalysis gives the savings from going solar assuming a given monthly bill and a given electricity provider. They are in order of increasing order of monthly bill amount. This field will be empty for buildings in areas for which the Solar API does not have enough information to perform financial computations.", +"items": { +"$ref": "FinancialAnalysis" +}, +"type": "array" +}, +"maxArrayAreaMeters2": { +"description": "Size, in square meters, of the maximum array.", +"format": "float", +"type": "number" +}, +"maxArrayPanelsCount": { +"description": "Size of the maximum array - that is, the maximum number of panels that can fit on the roof.", +"format": "int32", +"type": "integer" +}, +"maxSunshineHoursPerYear": { +"description": "Maximum number of sunshine hours received per year, by any point on the roof. Sunshine hours are a measure of the total amount of insolation (energy) received per year. 1 sunshine hour = 1 kWh per kW (where kW refers to kW of capacity under Standard Testing Conditions).", +"format": "float", +"type": "number" +}, +"panelCapacityWatts": { +"description": "Capacity, in watts, of the panel used in the calculations.", +"format": "float", +"type": "number" +}, +"panelHeightMeters": { +"description": "Height, in meters in portrait orientation, of the panel used in the calculations.", +"format": "float", +"type": "number" +}, +"panelLifetimeYears": { +"description": "The expected lifetime, in years, of the solar panels. This is used in the financial calculations.", +"format": "int32", +"type": "integer" +}, +"panelWidthMeters": { +"description": "Width, in meters in portrait orientation, of the panel used in the calculations.", +"format": "float", +"type": "number" +}, +"roofSegmentStats": { +"description": "Size and sunlight quantiles for each roof segment.", +"items": { +"$ref": "RoofSegmentSizeAndSunshineStats" +}, +"type": "array" +}, +"solarPanelConfigs": { +"description": "Each SolarPanelConfig describes a different arrangement of solar panels on the roof. They are in order of increasing number of panels. The `SolarPanelConfig` with panels_count=N is based on the first N panels in the `solar_panels` list. This field is only populated if at least 4 panels can fit on a roof.", +"items": { +"$ref": "SolarPanelConfig" +}, +"type": "array" +}, +"solarPanels": { +"description": "Each SolarPanel describes a single solar panel. They are listed in the order that the panel layout algorithm placed this. This is usually, though not always, in decreasing order of annual energy production.", +"items": { +"$ref": "SolarPanel" +}, +"type": "array" +}, +"wholeRoofStats": { +"$ref": "SizeAndSunshineStats", +"description": "Total size and sunlight quantiles for the part of the roof that was assigned to some roof segment. Despite the name, this may not include the entire building. See building_stats." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Solar API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sourcerepo.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sourcerepo.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..501446adb9cd9cdf278182e77381de32a484d8ce --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sourcerepo.v1.json @@ -0,0 +1,879 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/source.full_control": { +"description": "Manage your source code repositories" +}, +"https://www.googleapis.com/auth/source.read_only": { +"description": "View the contents of your source code repositories" +}, +"https://www.googleapis.com/auth/source.read_write": { +"description": "Manage the contents of your source code repositories" +} +} +} +}, +"basePath": "", +"baseUrl": "https://sourcerepo.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Source Repositories", +"description": "Accesses source code repositories hosted by Google.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/source-repositories/docs/apis", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "sourcerepo:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://sourcerepo.mtls.googleapis.com/", +"name": "sourcerepo", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"methods": { +"getConfig": { +"description": "Returns the Cloud Source Repositories configuration of the project.", +"flatPath": "v1/projects/{projectsId}/config", +"httpMethod": "GET", +"id": "sourcerepo.projects.getConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the requested project. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/config", +"response": { +"$ref": "ProjectConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateConfig": { +"description": "Updates the Cloud Source Repositories configuration of the project.", +"flatPath": "v1/projects/{projectsId}/config", +"httpMethod": "PATCH", +"id": "sourcerepo.projects.updateConfig", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the requested project. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/config", +"request": { +"$ref": "UpdateProjectConfigRequest" +}, +"response": { +"$ref": "ProjectConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"repos": { +"methods": { +"create": { +"description": "Creates a repo in the given project with the given name. If the named repository already exists, `CreateRepo` returns `ALREADY_EXISTS`.", +"flatPath": "v1/projects/{projectsId}/repos", +"httpMethod": "POST", +"id": "sourcerepo.projects.repos.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The project in which to create the repo. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/repos", +"request": { +"$ref": "Repo" +}, +"response": { +"$ref": "Repo" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/source.full_control" +] +}, +"delete": { +"description": "Deletes a repo.", +"flatPath": "v1/projects/{projectsId}/repos/{reposId}", +"httpMethod": "DELETE", +"id": "sourcerepo.projects.repos.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the repo to delete. Values are of the form `projects//repos/`.", +"location": "path", +"pattern": "^projects/[^/]+/repos/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/source.full_control" +] +}, +"get": { +"description": "Returns information about a repo.", +"flatPath": "v1/projects/{projectsId}/repos/{reposId}", +"httpMethod": "GET", +"id": "sourcerepo.projects.repos.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the requested repository. Values are of the form `projects//repos/`.", +"location": "path", +"pattern": "^projects/[^/]+/repos/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Repo" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/source.full_control", +"https://www.googleapis.com/auth/source.read_only", +"https://www.googleapis.com/auth/source.read_write" +] +}, +"getIamPolicy": { +"description": "Gets the IAM policy policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/repos/{reposId}:getIamPolicy", +"httpMethod": "GET", +"id": "sourcerepo.projects.repos.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/repos/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/source.full_control", +"https://www.googleapis.com/auth/source.read_only", +"https://www.googleapis.com/auth/source.read_write" +] +}, +"list": { +"description": "Returns all repos belonging to a project. The sizes of the repos are not set by ListRepos. To get the size of a repo, use GetRepo.", +"flatPath": "v1/projects/{projectsId}/repos", +"httpMethod": "GET", +"id": "sourcerepo.projects.repos.list", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The project ID whose repos should be listed. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "Maximum number of repositories to return; between 1 and 500. If not set or zero, defaults to 100 at the server.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Resume listing repositories where a prior ListReposResponse left off. This is an opaque token that must be obtained from a recent, prior ListReposResponse's next_page_token field.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/repos", +"response": { +"$ref": "ListReposResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/source.full_control", +"https://www.googleapis.com/auth/source.read_only", +"https://www.googleapis.com/auth/source.read_write" +] +}, +"patch": { +"description": "Updates information about a repo.", +"flatPath": "v1/projects/{projectsId}/repos/{reposId}", +"httpMethod": "PATCH", +"id": "sourcerepo.projects.repos.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the requested repository. Values are of the form `projects//repos/`.", +"location": "path", +"pattern": "^projects/[^/]+/repos/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UpdateRepoRequest" +}, +"response": { +"$ref": "Repo" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the IAM policy on the specified resource. Replaces any existing policy.", +"flatPath": "v1/projects/{projectsId}/repos/{reposId}:setIamPolicy", +"httpMethod": "POST", +"id": "sourcerepo.projects.repos.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/repos/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/source.full_control" +] +}, +"sync": { +"description": "Synchronize a connected repo. The response contains SyncRepoMetadata in the metadata field.", +"flatPath": "v1/projects/{projectsId}/repos/{reposId}:sync", +"httpMethod": "POST", +"id": "sourcerepo.projects.repos.sync", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the repo to synchronize. Values are of the form `projects//repos/`.", +"location": "path", +"pattern": "^projects/[^/]+/repos/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:sync", +"request": { +"$ref": "SyncRepoRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.", +"flatPath": "v1/projects/{projectsId}/repos/{reposId}:testIamPermissions", +"httpMethod": "POST", +"id": "sourcerepo.projects.repos.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/repos/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/source.full_control", +"https://www.googleapis.com/auth/source.read_only", +"https://www.googleapis.com/auth/source.read_write" +] +} +} +} +} +} +}, +"revision": "20240422", +"rootUrl": "https://sourcerepo.googleapis.com/", +"schemas": { +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ListReposResponse": { +"description": "Response for ListRepos. The size is not set in the returned repositories.", +"id": "ListReposResponse", +"properties": { +"nextPageToken": { +"description": "If non-empty, additional repositories exist within the project. These can be retrieved by including this value in the next ListReposRequest's page_token field.", +"type": "string" +}, +"repos": { +"description": "The listed repos.", +"items": { +"$ref": "Repo" +}, +"type": "array" +} +}, +"type": "object" +}, +"MirrorConfig": { +"description": "Configuration to automatically mirror a repository from another hosting service, for example GitHub or Bitbucket.", +"id": "MirrorConfig", +"properties": { +"deployKeyId": { +"description": "ID of the SSH deploy key at the other hosting service. Removing this key from the other service would deauthorize Google Cloud Source Repositories from mirroring.", +"type": "string" +}, +"url": { +"description": "URL of the main repository at the other hosting service.", +"type": "string" +}, +"webhookId": { +"description": "ID of the webhook listening to updates to trigger mirroring. Removing this webhook from the other hosting service will stop Google Cloud Source Repositories from receiving notifications, and thereby disabling mirroring.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ProjectConfig": { +"description": "Cloud Source Repositories configuration of a project.", +"id": "ProjectConfig", +"properties": { +"enablePrivateKeyCheck": { +"description": "Reject a Git push that contains a private key.", +"type": "boolean" +}, +"name": { +"description": "The name of the project. Values are of the form `projects/`.", +"type": "string" +}, +"pubsubConfigs": { +"additionalProperties": { +"$ref": "PubsubConfig" +}, +"description": "How this project publishes a change in the repositories through Cloud Pub/Sub. Keyed by the topic names.", +"type": "object" +} +}, +"type": "object" +}, +"PubsubConfig": { +"description": "Configuration to publish a Cloud Pub/Sub message.", +"id": "PubsubConfig", +"properties": { +"messageFormat": { +"description": "The format of the Cloud Pub/Sub messages.", +"enum": [ +"MESSAGE_FORMAT_UNSPECIFIED", +"PROTOBUF", +"JSON" +], +"enumDescriptions": [ +"Unspecified.", +"The message payload is a serialized protocol buffer of SourceRepoEvent.", +"The message payload is a JSON string of SourceRepoEvent." +], +"type": "string" +}, +"serviceAccountEmail": { +"description": "Email address of the service account used for publishing Cloud Pub/Sub messages. This service account needs to be in the same project as the PubsubConfig. When added, the caller needs to have iam.serviceAccounts.actAs permission on this service account. If unspecified, it defaults to the compute engine default service account.", +"type": "string" +}, +"topic": { +"description": "A topic of Cloud Pub/Sub. Values are of the form `projects//topics/`. The project needs to be the same project as this config is in.", +"type": "string" +} +}, +"type": "object" +}, +"Repo": { +"description": "A repository (or repo) is a Git repository storing versioned source content.", +"id": "Repo", +"properties": { +"mirrorConfig": { +"$ref": "MirrorConfig", +"description": "How this repository mirrors a repository managed by another service. Read-only field." +}, +"name": { +"description": "Resource name of the repository, of the form `projects//repos/`. The repo name may contain slashes. eg, `projects/myproject/repos/name/with/slash`", +"type": "string" +}, +"pubsubConfigs": { +"additionalProperties": { +"$ref": "PubsubConfig" +}, +"description": "How this repository publishes a change in the repository through Cloud Pub/Sub. Keyed by the topic names.", +"type": "object" +}, +"size": { +"description": "The disk usage of the repo, in bytes. Read-only field. Size is only returned by GetRepo.", +"format": "int64", +"type": "string" +}, +"url": { +"description": "URL to clone the repository from Google Cloud Source Repositories. Read-only field.", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SyncRepoMetadata": { +"description": "Metadata of SyncRepo. This message is in the metadata field of Operation.", +"id": "SyncRepoMetadata", +"properties": { +"name": { +"description": "The name of the repo being synchronized. Values are of the form `projects//repos/`.", +"type": "string" +}, +"startTime": { +"description": "The time this operation is started.", +"format": "google-datetime", +"type": "string" +}, +"statusMessage": { +"description": "The latest status message on syncing the repository.", +"type": "string" +}, +"updateTime": { +"description": "The time this operation's status message is updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SyncRepoRequest": { +"description": "Request for SyncRepo.", +"id": "SyncRepoRequest", +"properties": {}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UpdateProjectConfigRequest": { +"description": "Request for UpdateProjectConfig.", +"id": "UpdateProjectConfigRequest", +"properties": { +"projectConfig": { +"$ref": "ProjectConfig", +"description": "The new configuration for the project." +}, +"updateMask": { +"description": "A FieldMask specifying which fields of the project_config to modify. Only the fields in the mask will be modified. If no mask is provided, this request is no-op.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateRepoRequest": { +"description": "Request for UpdateRepo.", +"id": "UpdateRepoRequest", +"properties": { +"repo": { +"$ref": "Repo", +"description": "The new configuration for the repository." +}, +"updateMask": { +"description": "A FieldMask specifying which fields of the repo to modify. Only the fields in the mask will be modified. If no mask is provided, this request is no-op.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Source Repositories API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/spanner.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/spanner.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..162868cb1b8400089e11976a9f1eec1299e27880 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/spanner.v1.json @@ -0,0 +1,6595 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/spanner.admin": { +"description": "Administer your Spanner databases" +}, +"https://www.googleapis.com/auth/spanner.data": { +"description": "View and manage the contents of your Spanner databases" +} +} +} +}, +"basePath": "", +"baseUrl": "https://spanner.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Spanner", +"description": "Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/spanner/", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://spanner.me-central2.rep.googleapis.com/", +"location": "me-central2" +} +], +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "spanner:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://spanner.mtls.googleapis.com/", +"name": "spanner", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"instanceConfigOperations": { +"methods": { +"list": { +"description": "Lists the user-managed instance config long-running operations in the given project. An instance config operation has a name of the form `projects//instanceConfigs//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started operation.", +"flatPath": "v1/projects/{projectsId}/instanceConfigOperations", +"httpMethod": "GET", +"id": "spanner.projects.instanceConfigOperations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateInstanceConfigMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=` \\ `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstanceConfigMetadata) AND` \\ `(metadata.instance_config.name:custom-config) AND` \\ `(metadata.progress.start_time < \\\"2021-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstanceConfigMetadata. * The instance config name contains \"custom-config\". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListInstanceConfigOperationsResponse to the same `parent` and with the same `filter`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project of the instance config operations. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instanceConfigOperations", +"response": { +"$ref": "ListInstanceConfigOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +}, +"instanceConfigs": { +"methods": { +"create": { +"description": "Creates an instance config and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance config. The instance config name is assigned by the caller. If the named instance config already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`. Immediately after the request returns: * The instance config is readable via the API, with all requested attributes. The instance config's reconciling field is set to true. Its state is `CREATING`. While the operation is pending: * Cancelling the operation renders the instance config immediately unreadable via the API. * Except for deleting the creating resource, all other attempts to modify the instance config are rejected. Upon completion of the returned operation: * Instances can be created using the instance configuration. * The instance config's reconciling field becomes false. Its state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance config. The metadata field type is CreateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.create` permission on the resource parent.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs", +"httpMethod": "POST", +"id": "spanner.projects.instanceConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project in which to create the instance config. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instanceConfigs", +"request": { +"$ref": "CreateInstanceConfigRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes the instance config. Deletion is only allowed when no instances are using the configuration. If any instances are using the config, returns `FAILED_PRECONDITION`. Only user managed configurations can be deleted. Authorization requires `spanner.instanceConfigs.delete` permission on the resource name.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instanceConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Used for optimistic concurrency control as a way to help prevent simultaneous deletes of an instance config from overwriting each other. If not empty, the API only deletes the instance config when the etag provided matches the current status of the requested instance config. Otherwise, deletes the instance config without checking the current status of the requested instance config.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the instance configuration to be deleted. Values are of the form `projects//instanceConfigs/`", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "An option to validate, but not actually execute, a request, and provide the same response.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets information about a particular instance configuration.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", +"httpMethod": "GET", +"id": "spanner.projects.instanceConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the requested instance configuration. Values are of the form `projects//instanceConfigs/`.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "InstanceConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists the supported instance configurations for a given project.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs", +"httpMethod": "GET", +"id": "spanner.projects.instanceConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Number of instance configurations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListInstanceConfigsResponse.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project for which a list of supported instance configurations is requested. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instanceConfigs", +"response": { +"$ref": "ListInstanceConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"patch": { +"description": "Updates an instance config. The returned long-running operation can be used to track the progress of updating the instance. If the named instance config does not exist, returns `NOT_FOUND`. Only user managed configurations can be updated. Immediately after the request returns: * The instance config's reconciling field is set to true. While the operation is pending: * Cancelling the operation sets its metadata's cancel_time. The operation is guaranteed to succeed at undoing all changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance config are rejected. * Reading the instance config via the API continues to give the pre-request values. Upon completion of the returned operation: * Creating instances using the instance configuration uses the new values. * The instance config's new values are readable via the API. * The instance config's reconciling field becomes false. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance config modification. The metadata field type is UpdateInstanceConfigMetadata. The response field type is InstanceConfig, if successful. Authorization requires `spanner.instanceConfigs.update` permission on the resource name.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}", +"httpMethod": "PATCH", +"id": "spanner.projects.instanceConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UpdateInstanceConfigRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +}, +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "spanner.projects.instanceConfigs.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instanceConfigs.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "spanner.projects.instanceConfigs.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/operations", +"httpMethod": "GET", +"id": "spanner.projects.instanceConfigs.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +}, +"ssdCaches": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/ssdCaches/{ssdCachesId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "spanner.projects.instanceConfigs.ssdCaches.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/ssdCaches/{ssdCachesId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instanceConfigs.ssdCaches.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/ssdCaches/{ssdCachesId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "spanner.projects.instanceConfigs.ssdCaches.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instanceConfigs/{instanceConfigsId}/ssdCaches/{ssdCachesId}/operations", +"httpMethod": "GET", +"id": "spanner.projects.instanceConfigs.ssdCaches.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/instanceConfigs/[^/]+/ssdCaches/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +} +} +} +} +}, +"instances": { +"methods": { +"create": { +"description": "Creates an instance and begins preparing it to begin serving. The returned long-running operation can be used to track the progress of preparing the new instance. The instance name is assigned by the caller. If the named instance already exists, `CreateInstance` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`. Until completion of the returned operation: * Cancelling the operation renders the instance immediately unreadable via the API. * The instance can be deleted. * All other attempts to modify the instance are rejected. Upon completion of the returned operation: * Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can be created in the instance. * The instance's allocated resource levels are readable via the API. * The instance's state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance. The metadata field type is CreateInstanceMetadata. The response field type is Instance, if successful.", +"flatPath": "v1/projects/{projectsId}/instances", +"httpMethod": "POST", +"id": "spanner.projects.instances.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project in which to create the instance. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instances", +"request": { +"$ref": "CreateInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes an instance. Immediately upon completion of the request: * Billing ceases for all of the instance's reserved resources. Soon afterward: * The instance and *all of its databases* immediately and irrevocably disappear from the API. All data in the databases is permanently deleted.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the instance to be deleted. Values are of the form `projects//instances/`", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets information about a particular instance.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.get", +"parameterOrder": [ +"name" +], +"parameters": { +"fieldMask": { +"description": "If field_mask is present, specifies the subset of Instance fields that should be returned. If absent, all Instance fields are returned.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the requested instance. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Instance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for an instance resource. Returns an empty policy if an instance exists but does not have a policy set. Authorization requires `spanner.instances.getIamPolicy` on resource.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:getIamPolicy", +"httpMethod": "POST", +"id": "spanner.projects.instances.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists all instances in the given project.", +"flatPath": "v1/projects/{projectsId}/instances", +"httpMethod": "GET", +"id": "spanner.projects.instances.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `name` * `display_name` * `labels.key` where key is the name of a label Some examples of using filters are: * `name:*` --> The instance has a name. * `name:Howl` --> The instance's name contains the string \"howl\". * `name:HOWL` --> Equivalent to above. * `NAME:howl` --> Equivalent to above. * `labels.env:*` --> The instance has the label \"env\". * `labels.env:dev` --> The instance has the label \"env\" and the value of the label contains the string \"dev\". * `name:howl labels.env:dev` --> The instance's name contains \"howl\" and it has the label \"env\" with its value containing \"dev\".", +"location": "query", +"type": "string" +}, +"instanceDeadline": { +"description": "Deadline used while retrieving metadata for instances. Instances whose metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancesResponse.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of instances to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListInstancesResponse.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project for which a list of instances is requested. Values are of the form `projects/`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instances", +"response": { +"$ref": "ListInstancesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"move": { +"description": "Moves the instance to the target instance config. The returned long-running operation can be used to track the progress of moving the instance. `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following criteria: * Has an ongoing move to a different instance config * Has backups * Has an ongoing update * Is under free trial * Contains any CMEK-enabled databases While the operation is pending: * All other attempts to modify the instance, including changes to its compute capacity, are rejected. * The following database and backup admin operations are rejected: * DatabaseAdmin.CreateDatabase, * DatabaseAdmin.UpdateDatabaseDdl (Disabled if default_leader is specified in the request.) * DatabaseAdmin.RestoreDatabase * DatabaseAdmin.CreateBackup * DatabaseAdmin.CopyBackup * Both the source and target instance configs are subject to hourly compute and storage charges. * The instance may experience higher read-write latencies and a higher transaction abort rate. However, moving an instance does not cause any downtime. The returned long-running operation will have a name of the format `/operations/` and can be used to track the move instance operation. The metadata field type is MoveInstanceMetadata. The response field type is Instance, if successful. Cancelling the operation sets its metadata's cancel_time. Cancellation is not immediate since it involves moving any data previously moved to target instance config back to the original instance config. The same operation can be used to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with CANCELLED status. Upon completion(if not cancelled) of the returned operation: * Instance would be successfully moved to the target instance config. * You are billed for compute and storage in target instance config. Authorization requires `spanner.instances.update` permission on the resource instance. For more details, please see [documentation](https://cloud.google.com/spanner/docs/move-instance).", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:move", +"httpMethod": "POST", +"id": "spanner.projects.instances.move", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The instance to move. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:move", +"request": { +"$ref": "MoveInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"patch": { +"description": "Updates an instance, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance. If the named instance does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance are rejected. * Reading the instance via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance's tables. * The instance's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance modification. The metadata field type is UpdateInstanceMetadata. The response field type is Instance, if successful. Authorization requires `spanner.instances.update` permission on the resource name.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}", +"httpMethod": "PATCH", +"id": "spanner.projects.instances.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UpdateInstanceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on an instance resource. Replaces any existing policy. Authorization requires `spanner.instances.setIamPolicy` on resource.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:setIamPolicy", +"httpMethod": "POST", +"id": "spanner.projects.instances.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"testIamPermissions": { +"description": "Returns permissions that the caller has on the specified instance resource. Attempting this RPC on a non-existent Cloud Spanner instance resource will result in a NOT_FOUND error if the user has `spanner.instances.list` permission on the containing Google Cloud Project. Otherwise returns an empty set of permissions.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}:testIamPermissions", +"httpMethod": "POST", +"id": "spanner.projects.instances.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +}, +"resources": { +"backupOperations": { +"methods": { +"list": { +"description": "Lists the backup long-running operations in the given instance. A backup operation has a name of the form `projects//instances//backups//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backupOperations", +"httpMethod": "GET", +"id": "spanner.projects.instances.backupOperations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The source database name of backup contains the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time < \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test) AND` \\ `(metadata.progress.start_time < \\\"2022-01-18T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CopyBackupMetadata. * The source backup name contains the string \"test\". * The operation started before 2022-01-18T14:50:00Z. * The operation resulted in an error. * `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.database:test_db)) OR` \\ `((metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CopyBackupMetadata) AND` \\ `(metadata.source_backup:test_bkp)) AND` \\ `(error:*)` - Returns operations where: * The operation's metadata matches either of criteria: * The operation's metadata type is CreateBackupMetadata AND the source database name of the backup contains the string \"test_db\" * The operation's metadata type is CopyBackupMetadata AND the source backup name contains the string \"test_bkp\" * The operation resulted in an error.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListBackupOperationsResponse to the same `parent` and with the same `filter`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The instance of the backup operations. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/backupOperations", +"response": { +"$ref": "ListBackupOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +}, +"backups": { +"methods": { +"copy": { +"description": "Starts copying a Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track copying of the backup. The operation is associated with the destination backup. The metadata field type is CopyBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the copying and delete the destination backup. Concurrent CopyBackup requests can run on the same source backup.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups:copy", +"httpMethod": "POST", +"id": "spanner.projects.instances.backups.copy", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the destination instance that will contain the backup copy. Values are of the form: `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/backups:copy", +"request": { +"$ref": "CopyBackupRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"create": { +"description": "Starts creating a new Cloud Spanner Backup. The returned backup long-running operation will have a name of the format `projects//instances//backups//operations/` and can be used to track creation of the backup. The metadata field type is CreateBackupMetadata. The response field type is Backup, if successful. Cancelling the returned operation will stop the creation and delete the backup. There can be only one pending backup creation per database. Backup creation of different databases can run concurrently.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups", +"httpMethod": "POST", +"id": "spanner.projects.instances.backups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"backupId": { +"description": "Required. The id of the backup to be created. The `backup_id` appended to `parent` forms the full backup name of the form `projects//instances//backups/`.", +"location": "query", +"type": "string" +}, +"encryptionConfig.encryptionType": { +"description": "Required. The encryption type of the backup.", +"enum": [ +"ENCRYPTION_TYPE_UNSPECIFIED", +"USE_DATABASE_ENCRYPTION", +"GOOGLE_DEFAULT_ENCRYPTION", +"CUSTOMER_MANAGED_ENCRYPTION" +], +"enumDescriptions": [ +"Unspecified. Do not use.", +"Use the same encryption configuration as the database. This is the default option when encryption_config is empty. For example, if the database is using `Customer_Managed_Encryption`, the backup will be using the same Cloud KMS key as the database.", +"Use Google default encryption.", +"Use customer managed encryption. If specified, `kms_key_name` must contain a valid Cloud KMS key." +], +"location": "query", +"type": "string" +}, +"encryptionConfig.kmsKeyName": { +"description": "Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the instance in which the backup will be created. This must be the same instance that contains the database the backup will be created from. The backup will be stored in the location(s) specified in the instance configuration of this instance. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/backups", +"request": { +"$ref": "Backup" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes a pending or completed Backup.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.backups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the backup to delete. Values are of the form `projects//instances//backups/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets metadata on a pending or completed Backup.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.backups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the backup. Values are of the form `projects//instances//backups/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Backup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}:getIamPolicy", +"httpMethod": "POST", +"id": "spanner.projects.instances.backups.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists completed and pending backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups", +"httpMethod": "GET", +"id": "spanner.projects.instances.backups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of returned backups. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Backup are eligible for filtering: * `name` * `database` * `state` * `create_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `expire_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `version_time` (and values are of the format YYYY-MM-DDTHH:MM:SSZ) * `size_bytes` You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `name:Howl` - The backup's name contains the string \"howl\". * `database:prod` - The database's name contains the string \"prod\". * `state:CREATING` - The backup is pending creation. * `state:READY` - The backup is fully created and ready for use. * `(name:howl) AND (create_time < \\\"2018-03-28T14:50:00Z\\\")` - The backup name contains the string \"howl\" and `create_time` of the backup is before 2018-03-28T14:50:00Z. * `expire_time < \\\"2018-03-28T14:50:00Z\\\"` - The backup `expire_time` is before 2018-03-28T14:50:00Z. * `size_bytes > 10000000000` - The backup's size is greater than 10GB", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of backups to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListBackupsResponse to the same `parent` and with the same `filter`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The instance to list backups from. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/backups", +"response": { +"$ref": "ListBackupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"patch": { +"description": "Updates a pending or completed Backup.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}", +"httpMethod": "PATCH", +"id": "spanner.projects.instances.backups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. A mask specifying which fields (e.g. `expire_time`) in the Backup resource should be updated. This mask is relative to the Backup resource, not to the request message. The field mask must always be specified; this prevents any future fields from being erased accidentally by clients that do not know about them.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Backup" +}, +"response": { +"$ref": "Backup" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}:setIamPolicy", +"httpMethod": "POST", +"id": "spanner.projects.instances.backups.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"testIamPermissions": { +"description": "Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}:testIamPermissions", +"httpMethod": "POST", +"id": "spanner.projects.instances.backups.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +}, +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "spanner.projects.instances.backups.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.backups.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.backups.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/backups/{backupsId}/operations", +"httpMethod": "GET", +"id": "spanner.projects.instances.backups.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/backups/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +} +} +}, +"databaseOperations": { +"methods": { +"list": { +"description": "Lists database longrunning-operations. A database operation has a name of the form `projects//instances//databases//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databaseOperations", +"httpMethod": "GET", +"id": "spanner.projects.instances.databaseOperations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for RestoreDatabaseMetadata is `type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.RestoreDatabaseMetadata) AND` \\ `(metadata.source_type:BACKUP) AND` \\ `(metadata.backup_info.backup:backup_howl) AND` \\ `(metadata.name:restored_howl) AND` \\ `(metadata.progress.start_time < \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is RestoreDatabaseMetadata. * The database is restored from a backup. * The backup name contains \"backup_howl\". * The restored database's name contains \"restored_howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListDatabaseOperationsResponse to the same `parent` and with the same `filter`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The instance of the database operations. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/databaseOperations", +"response": { +"$ref": "ListDatabaseOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +}, +"databases": { +"methods": { +"create": { +"description": "Creates a new Cloud Spanner database and starts to prepare it for serving. The returned long-running operation will have a name of the format `/operations/` and can be used to track preparation of the database. The metadata field type is CreateDatabaseMetadata. The response field type is Database, if successful.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the instance that will serve the new database. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/databases", +"request": { +"$ref": "CreateDatabaseRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"dropDatabase": { +"description": "Drops (aka deletes) a Cloud Spanner database. Completed backups for the database will be retained according to their `expire_time`. Note: Cloud Spanner might continue to accept requests for a few seconds after the database has been deleted.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.databases.dropDatabase", +"parameterOrder": [ +"database" +], +"parameters": { +"database": { +"description": "Required. The database to be dropped.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+database}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets the state of a Cloud Spanner database.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the requested database. Values are of the form `projects//instances//databases/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Database" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"getDdl": { +"description": "Returns the schema of a Cloud Spanner database as a list of formatted DDL statements. This method does not show pending schema updates, those may be queried using the Operations API.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.getDdl", +"parameterOrder": [ +"database" +], +"parameters": { +"database": { +"description": "Required. The database whose schema we wish to get. Values are of the form `projects//instances//databases/`", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+database}/ddl", +"response": { +"$ref": "GetDatabaseDdlResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a database or backup resource. Returns an empty policy if a database or backup exists but does not have a policy set. Authorization requires `spanner.databases.getIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.getIamPolicy` permission on resource.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:getIamPolicy", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which the policy is being retrieved. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"request": { +"$ref": "GetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"getScans": { +"description": "Request a specific scan with Database-specific data for Cloud Key Visualizer.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/scans", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.getScans", +"parameterOrder": [ +"name" +], +"parameters": { +"endTime": { +"description": "The upper bound for the time range to retrieve Scan data for.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The unique name of the scan containing the requested information, specific to the Database service implementing this interface.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +}, +"startTime": { +"description": "These fields restrict the Database-specific information returned in the `Scan.data` field. If a `View` is provided that does not include the `Scan.data` field, these are ignored. This range of time must be entirely contained within the defined time range of the targeted scan. The lower bound for the time range to retrieve Scan data for.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"view": { +"description": "Specifies which parts of the Scan should be returned in the response. Note, if left unspecified, the FULL view is assumed.", +"enum": [ +"VIEW_UNSPECIFIED", +"SUMMARY", +"FULL" +], +"enumDescriptions": [ +"Not specified, equivalent to SUMMARY.", +"Server responses only include `name`, `details`, `start_time` and `end_time`. The default value. Note, the ListScans method may only use this view type, others view types are not supported.", +"Full representation of the scan is returned in the server response, including `data`." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/scans", +"response": { +"$ref": "Scan" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"list": { +"description": "Lists Cloud Spanner databases.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Number of databases to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListDatabasesResponse.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The instance whose databases should be listed. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/databases", +"response": { +"$ref": "ListDatabasesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"patch": { +"description": "Updates a Cloud Spanner database. The returned long-running operation can be used to track the progress of updating the database. If the named database does not exist, returns `NOT_FOUND`. While the operation is pending: * The database's reconciling field is set to true. * Cancelling the operation is best-effort. If the cancellation succeeds, the operation metadata's cancel_time is set, the updates are reverted, and the operation terminates with a `CANCELLED` status. * New UpdateDatabase requests will return a `FAILED_PRECONDITION` error until the pending operation is done (returns successfully or with error). * Reading the database via the API continues to give the pre-request values. Upon completion of the returned operation: * The new values are in effect and readable via the API. * The database's reconciling field becomes false. The returned long-running operation will have a name of the format `projects//instances//databases//operations/` and can be used to track the database modification. The metadata field type is UpdateDatabaseMetadata. The response field type is Database, if successful.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}", +"httpMethod": "PATCH", +"id": "spanner.projects.instances.databases.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The list of fields to update. Currently, only `enable_drop_protection` field can be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Database" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"restore": { +"description": "Create a new database by restoring from a completed backup. The new database must be in the same project and in an instance with the same instance configuration as the instance containing the backup. The returned database long-running operation has a name of the format `projects//instances//databases//operations/`, and can be used to track the progress of the operation, and to cancel it. The metadata field type is RestoreDatabaseMetadata. The response type is Database, if successful. Cancelling the returned operation will stop the restore and delete the database. There can be only one database being restored into an instance at a time. Once the restore operation completes, a new restore operation can be initiated, without waiting for the optimize operation associated with the first restore to complete.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases:restore", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.restore", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the instance in which to create the restored database. This instance must be in the same project and have the same instance configuration as the instance containing the source backup. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/databases:restore", +"request": { +"$ref": "RestoreDatabaseRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on a database or backup resource. Replaces any existing policy. Authorization requires `spanner.databases.setIamPolicy` permission on resource. For backups, authorization requires `spanner.backups.setIamPolicy` permission on resource.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:setIamPolicy", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which the policy is being set. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for databases resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"testIamPermissions": { +"description": "Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}:testIamPermissions", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"updateDdl": { +"description": "Updates the schema of a Cloud Spanner database by creating/altering/dropping tables, columns, indexes, etc. The returned long-running operation will have a name of the format `/operations/` and can be used to track execution of the schema change(s). The metadata field type is UpdateDatabaseDdlMetadata. The operation has no response.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/ddl", +"httpMethod": "PATCH", +"id": "spanner.projects.instances.databases.updateDdl", +"parameterOrder": [ +"database" +], +"parameters": { +"database": { +"description": "Required. The database to update.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+database}/ddl", +"request": { +"$ref": "UpdateDatabaseDdlRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +}, +"resources": { +"databaseRoles": { +"methods": { +"list": { +"description": "Lists Cloud Spanner database roles.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/databaseRoles", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.databaseRoles.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Number of database roles to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListDatabaseRolesResponse.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The database whose roles should be listed. Values are of the form `projects//instances//databases/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/databaseRoles", +"response": { +"$ref": "ListDatabaseRolesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"testIamPermissions": { +"description": "Returns permissions that the caller has on the specified database or backup resource. Attempting this RPC on a non-existent Cloud Spanner database will result in a NOT_FOUND error if the user has `spanner.databases.list` permission on the containing Cloud Spanner instance. Otherwise returns an empty set of permissions. Calling this method on a backup that does not exist will result in a NOT_FOUND error if the user has `spanner.backups.list` permission on the containing instance.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/databaseRoles/{databaseRolesId}:testIamPermissions", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.databaseRoles.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The Cloud Spanner resource for which permissions are being tested. The format is `projects//instances/` for instance resources and `projects//instances//databases/` for database resources.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/databaseRoles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.databases.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/operations", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +}, +"sessions": { +"methods": { +"batchCreate": { +"description": "Creates multiple new sessions. This API can be used to initialize a session cache on the clients. See https://goo.gl/TgSFN2 for best practices on session cache management.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions:batchCreate", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.batchCreate", +"parameterOrder": [ +"database" +], +"parameters": { +"database": { +"description": "Required. The database in which the new sessions are created.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+database}/sessions:batchCreate", +"request": { +"$ref": "BatchCreateSessionsRequest" +}, +"response": { +"$ref": "BatchCreateSessionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"batchWrite": { +"description": "Batches the supplied mutation groups in a collection of efficient transactions. All mutations in a group are committed atomically. However, mutations across groups can be committed non-atomically in an unspecified order and thus, they must be independent of each other. Partial failure is possible, i.e., some groups may have been committed successfully, while some may have failed. The results of individual batches are streamed into the response as the batches are applied. BatchWrite requests are not replay protected, meaning that each mutation group may be applied more than once. Replays of non-idempotent mutations may have undesirable effects. For example, replays of an insert mutation may produce an already exists error or if you use generated or commit timestamp-based keys, it may result in additional rows being added to the mutation's table. We recommend structuring your mutation groups to be idempotent to avoid this issue.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:batchWrite", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.batchWrite", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the batch request is to be run.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:batchWrite", +"request": { +"$ref": "BatchWriteRequest" +}, +"response": { +"$ref": "BatchWriteResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"beginTransaction": { +"description": "Begins a new transaction. This step can often be skipped: Read, ExecuteSql and Commit can begin a new transaction as a side-effect.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:beginTransaction", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.beginTransaction", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the transaction runs.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:beginTransaction", +"request": { +"$ref": "BeginTransactionRequest" +}, +"response": { +"$ref": "Transaction" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"commit": { +"description": "Commits a transaction. The request includes the mutations to be applied to rows in the database. `Commit` might return an `ABORTED` error. This can occur at any time; commonly, the cause is conflicts with concurrent transactions. However, it can also happen for a variety of other reasons. If `Commit` returns `ABORTED`, the caller should re-attempt the transaction from the beginning, re-using the same session. On very rare occasions, `Commit` might return `UNKNOWN`. This can happen, for example, if the client job experiences a 1+ hour networking failure. At that point, Cloud Spanner has lost track of the transaction outcome and we recommend that you perform another read from the database to see the state of things as they are now.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:commit", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.commit", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the transaction to be committed is running.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:commit", +"request": { +"$ref": "CommitRequest" +}, +"response": { +"$ref": "CommitResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"create": { +"description": "Creates a new session. A session can be used to perform transactions that read and/or modify data in a Cloud Spanner database. Sessions are meant to be reused for many consecutive transactions. Sessions can only execute one transaction at a time. To execute multiple concurrent read-write/write-only transactions, create multiple sessions. Note that standalone reads and queries use a transaction internally, and count toward the one transaction limit. Active sessions use additional server resources, so it is a good idea to delete idle and unneeded sessions. Aside from explicit deletes, Cloud Spanner may delete sessions for which no operations are sent for more than an hour. If a session is deleted, requests to it return `NOT_FOUND`. Idle sessions can be kept alive by sending a trivial SQL query periodically, e.g., `\"SELECT 1\"`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.create", +"parameterOrder": [ +"database" +], +"parameters": { +"database": { +"description": "Required. The database in which the new session is created.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+database}/sessions", +"request": { +"$ref": "CreateSessionRequest" +}, +"response": { +"$ref": "Session" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"delete": { +"description": "Ends a session, releasing server resources associated with it. This will asynchronously trigger cancellation of any operations that are running with this session.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.databases.sessions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the session to delete.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"executeBatchDml": { +"description": "Executes a batch of SQL DML statements. This method allows many statements to be run with lower latency than submitting them sequentially with ExecuteSql. Statements are executed in sequential order. A request can succeed even if a statement fails. The ExecuteBatchDmlResponse.status field in the response provides information about the statement that failed. Clients must inspect this field to determine whether an error occurred. Execution stops after the first failed statement; the remaining statements are not executed.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeBatchDml", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.executeBatchDml", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the DML statements should be performed.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:executeBatchDml", +"request": { +"$ref": "ExecuteBatchDmlRequest" +}, +"response": { +"$ref": "ExecuteBatchDmlResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"executeSql": { +"description": "Executes an SQL statement, returning all results in a single reply. This method cannot be used to return a result set larger than 10 MiB; if the query yields more data than that, the query fails with a `FAILED_PRECONDITION` error. Operations inside read-write transactions might return `ABORTED`. If this occurs, the application should restart the transaction from the beginning. See Transaction for more details. Larger result sets can be fetched in streaming fashion by calling ExecuteStreamingSql instead.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeSql", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.executeSql", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the SQL query should be performed.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:executeSql", +"request": { +"$ref": "ExecuteSqlRequest" +}, +"response": { +"$ref": "ResultSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"executeStreamingSql": { +"description": "Like ExecuteSql, except returns the result set as a stream. Unlike ExecuteSql, there is no limit on the size of the returned result set. However, no individual row in the result set can exceed 100 MiB, and no column value can exceed 10 MiB.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:executeStreamingSql", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.executeStreamingSql", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the SQL query should be performed.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:executeStreamingSql", +"request": { +"$ref": "ExecuteSqlRequest" +}, +"response": { +"$ref": "PartialResultSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"get": { +"description": "Gets a session. Returns `NOT_FOUND` if the session does not exist. This is mainly useful for determining whether a session is still alive.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.sessions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the session to retrieve.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Session" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"list": { +"description": "Lists all sessions in a given database.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions", +"httpMethod": "GET", +"id": "spanner.projects.instances.databases.sessions.list", +"parameterOrder": [ +"database" +], +"parameters": { +"database": { +"description": "Required. The database in which to list sessions.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+$", +"required": true, +"type": "string" +}, +"filter": { +"description": "An expression for filtering the results of the request. Filter rules are case insensitive. The fields eligible for filtering are: * `labels.key` where key is the name of a label Some examples of using filters are: * `labels.env:*` --> The session has the label \"env\". * `labels.env:dev` --> The session has the label \"env\" and the value of the label contains the string \"dev\".", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of sessions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListSessionsResponse.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+database}/sessions", +"response": { +"$ref": "ListSessionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"partitionQuery": { +"description": "Creates a set of partition tokens that can be used to execute a query operation in parallel. Each of the returned partition tokens can be used by ExecuteStreamingSql to specify a subset of the query result to read. The same session and read-only transaction must be used by the PartitionQueryRequest used to create the partition tokens and the ExecuteSqlRequests that use the partition tokens. Partition tokens become invalid when the session used to create them is deleted, is idle for too long, begins a new transaction, or becomes too old. When any of these happen, it is not possible to resume the query, and the whole operation must be restarted from the beginning.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionQuery", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.partitionQuery", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session used to create the partitions.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:partitionQuery", +"request": { +"$ref": "PartitionQueryRequest" +}, +"response": { +"$ref": "PartitionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"partitionRead": { +"description": "Creates a set of partition tokens that can be used to execute a read operation in parallel. Each of the returned partition tokens can be used by StreamingRead to specify a subset of the read result to read. The same session and read-only transaction must be used by the PartitionReadRequest used to create the partition tokens and the ReadRequests that use the partition tokens. There are no ordering guarantees on rows returned among the returned partition tokens, or even within each individual StreamingRead call issued with a partition_token. Partition tokens become invalid when the session used to create them is deleted, is idle for too long, begins a new transaction, or becomes too old. When any of these happen, it is not possible to resume the read, and the whole operation must be restarted from the beginning.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:partitionRead", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.partitionRead", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session used to create the partitions.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:partitionRead", +"request": { +"$ref": "PartitionReadRequest" +}, +"response": { +"$ref": "PartitionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"read": { +"description": "Reads rows from the database using key lookups and scans, as a simple key/value style alternative to ExecuteSql. This method cannot be used to return a result set larger than 10 MiB; if the read matches more data than that, the read fails with a `FAILED_PRECONDITION` error. Reads inside read-write transactions might return `ABORTED`. If this occurs, the application should restart the transaction from the beginning. See Transaction for more details. Larger result sets can be yielded in streaming fashion by calling StreamingRead instead.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:read", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.read", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the read should be performed.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:read", +"request": { +"$ref": "ReadRequest" +}, +"response": { +"$ref": "ResultSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"rollback": { +"description": "Rolls back a transaction, releasing any locks it holds. It is a good idea to call this for any transaction that includes one or more Read or ExecuteSql requests and ultimately decides not to commit. `Rollback` returns `OK` if it successfully aborts the transaction, the transaction was already aborted, or the transaction is not found. `Rollback` never returns `ABORTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:rollback", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.rollback", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the transaction to roll back is running.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:rollback", +"request": { +"$ref": "RollbackRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +}, +"streamingRead": { +"description": "Like Read, except returns the result set as a stream. Unlike Read, there is no limit on the size of the returned result set. However, no individual row in the result set can exceed 100 MiB, and no column value can exceed 10 MiB.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/databases/{databasesId}/sessions/{sessionsId}:streamingRead", +"httpMethod": "POST", +"id": "spanner.projects.instances.databases.sessions.streamingRead", +"parameterOrder": [ +"session" +], +"parameters": { +"session": { +"description": "Required. The session in which the read should be performed.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/databases/[^/]+/sessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+session}:streamingRead", +"request": { +"$ref": "ReadRequest" +}, +"response": { +"$ref": "PartialResultSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +} +} +} +} +}, +"instancePartitionOperations": { +"methods": { +"list": { +"description": "Lists instance partition long-running operations in the given instance. An instance partition operation has a name of the form `projects//instances//instancePartitions//operations/`. The long-running operation metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that have completed/failed/canceled within the last 7 days, and pending operations. Operations returned are ordered by `operation.metadata.value.start_time` in descending order starting from the most recently started operation. Authorization requires `spanner.instancePartitionOperations.list` permission on the resource parent.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitionOperations", +"httpMethod": "GET", +"id": "spanner.projects.instances.instancePartitionOperations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. An expression that filters the list of returned operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the Operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateInstancePartitionMetadata is `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata`. * `metadata.` - any field in metadata.value. `metadata.@type` must be specified first, if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic. However, you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=` \\ `type.googleapis.com/google.spanner.admin.instance.v1.CreateInstancePartitionMetadata) AND` \\ `(metadata.instance_partition.name:custom-instance-partition) AND` \\ `(metadata.start_time < \\\"2021-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Return operations where: * The operation's metadata type is CreateInstancePartitionMetadata. * The instance partition name contains \"custom-instance-partition\". * The operation started before 2021-03-28T14:50:00Z. * The operation resulted in an error.", +"location": "query", +"type": "string" +}, +"instancePartitionDeadline": { +"description": "Optional. Deadline used while retrieving metadata for instance partition operations. Instance partitions whose operation metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionOperationsResponse.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionOperationsResponse to the same `parent` and with the same `filter`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent instance of the instance partition operations. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instancePartitionOperations", +"response": { +"$ref": "ListInstancePartitionOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +}, +"instancePartitions": { +"methods": { +"create": { +"description": "Creates an instance partition and begins preparing it to be used. The returned long-running operation can be used to track the progress of preparing the new instance partition. The instance partition name is assigned by the caller. If the named instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`. Immediately upon completion of this request: * The instance partition is readable via the API, with all requested attributes but no allocated resources. Its state is `CREATING`. Until completion of the returned operation: * Cancelling the operation renders the instance partition immediately unreadable via the API. * The instance partition can be deleted. * All other attempts to modify the instance partition are rejected. Upon completion of the returned operation: * Billing for all successfully-allocated resources begins (some types may have lower than the requested levels). * Databases can start using this instance partition. * The instance partition's allocated resource levels are readable via the API. * The instance partition's state becomes `READY`. The returned long-running operation will have a name of the format `/operations/` and can be used to track creation of the instance partition. The metadata field type is CreateInstancePartitionMetadata. The response field type is InstancePartition, if successful.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions", +"httpMethod": "POST", +"id": "spanner.projects.instances.instancePartitions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the instance in which to create the instance partition. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instancePartitions", +"request": { +"$ref": "CreateInstancePartitionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes an existing instance partition. Requires that the instance partition is not used by any database or backup and is not the default instance partition of an instance. Authorization requires `spanner.instancePartitions.delete` permission on the resource name.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.instancePartitions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If not empty, the API only deletes the instance partition when the etag provided matches the current status of the requested instance partition. Otherwise, deletes the instance partition without checking the current status of the requested instance partition.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The name of the instance partition to be deleted. Values are of the form `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets information about a particular instance partition.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.instancePartitions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the requested instance partition. Values are of the form `projects/{project}/instances/{instance}/instancePartitions/{instance_partition}`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "InstancePartition" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists all instance partitions for the given instance.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions", +"httpMethod": "GET", +"id": "spanner.projects.instances.instancePartitions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"instancePartitionDeadline": { +"description": "Optional. Deadline used while retrieving metadata for instance partitions. Instance partitions whose metadata cannot be retrieved within this deadline will be added to unreachable in ListInstancePartitionsResponse.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Number of instance partitions to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "If non-empty, `page_token` should contain a next_page_token from a previous ListInstancePartitionsResponse.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The instance whose instance partitions should be listed. Values are of the form `projects//instances/`.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/instancePartitions", +"response": { +"$ref": "ListInstancePartitionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"patch": { +"description": "Updates an instance partition, and begins allocating or releasing resources as requested. The returned long-running operation can be used to track the progress of updating the instance partition. If the named instance partition does not exist, returns `NOT_FOUND`. Immediately upon completion of this request: * For resource types for which a decrease in the instance partition's allocation has been requested, billing is based on the newly-requested level. Until completion of the returned operation: * Cancelling the operation sets its metadata's cancel_time, and begins restoring resources to their pre-request values. The operation is guaranteed to succeed at undoing all resource changes, after which point it terminates with a `CANCELLED` status. * All other attempts to modify the instance partition are rejected. * Reading the instance partition via the API continues to give the pre-request resource levels. Upon completion of the returned operation: * Billing begins for all successfully-allocated resources (some types may have lower than the requested levels). * All newly-reserved resources are available for serving the instance partition's tables. * The instance partition's new resource levels are readable via the API. The returned long-running operation will have a name of the format `/operations/` and can be used to track the instance partition modification. The metadata field type is UpdateInstancePartitionMetadata. The response field type is InstancePartition, if successful. Authorization requires `spanner.instancePartitions.update` permission on the resource name.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}", +"httpMethod": "PATCH", +"id": "spanner.projects.instances.instancePartitions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "UpdateInstancePartitionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +}, +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "spanner.projects.instances.instancePartitions.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.instancePartitions.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.instancePartitions.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/instancePartitions/{instancePartitionsId}/operations", +"httpMethod": "GET", +"id": "spanner.projects.instances.instancePartitions.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/instancePartitions/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "spanner.projects.instances.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "spanner.projects.instances.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "spanner.projects.instances.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/instances/{instancesId}/operations", +"httpMethod": "GET", +"id": "spanner.projects.instances.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/instances/[^/]+/operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.admin" +] +} +} +} +} +} +} +}, +"scans": { +"methods": { +"list": { +"description": "Return available scans given a Database-specific resource name.", +"flatPath": "v1/scans", +"httpMethod": "GET", +"id": "spanner.scans.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression to restrict the results based on information present in the available Scan collection. The filter applies to all fields within the Scan message except for `data`.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The unique name of the parent resource, specific to the Database service implementing this interface.", +"location": "path", +"pattern": "^scans$", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies which parts of the Scan should be returned in the response. Note, only the SUMMARY view (the default) is currently supported for ListScans.", +"enum": [ +"VIEW_UNSPECIFIED", +"SUMMARY", +"FULL" +], +"enumDescriptions": [ +"Not specified, equivalent to SUMMARY.", +"Server responses only include `name`, `details`, `start_time` and `end_time`. The default value. Note, the ListScans method may only use this view type, others view types are not supported.", +"Full representation of the scan is returned in the server response, including `data`." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}", +"response": { +"$ref": "ListScansResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/spanner.data" +] +} +} +} +}, +"revision": "20240418", +"rootUrl": "https://spanner.googleapis.com/", +"schemas": { +"AutoscalingConfig": { +"description": "Autoscaling config for an instance.", +"id": "AutoscalingConfig", +"properties": { +"autoscalingLimits": { +"$ref": "AutoscalingLimits", +"description": "Required. Autoscaling limits for an instance." +}, +"autoscalingTargets": { +"$ref": "AutoscalingTargets", +"description": "Required. The autoscaling targets for an instance." +} +}, +"type": "object" +}, +"AutoscalingLimits": { +"description": "The autoscaling limits for the instance. Users can define the minimum and maximum compute capacity allocated to the instance, and the autoscaler will only scale within that range. Users can either use nodes or processing units to specify the limits, but should use the same unit to set both the min_limit and max_limit.", +"id": "AutoscalingLimits", +"properties": { +"maxNodes": { +"description": "Maximum number of nodes allocated to the instance. If set, this number should be greater than or equal to min_nodes.", +"format": "int32", +"type": "integer" +}, +"maxProcessingUnits": { +"description": "Maximum number of processing units allocated to the instance. If set, this number should be multiples of 1000 and be greater than or equal to min_processing_units.", +"format": "int32", +"type": "integer" +}, +"minNodes": { +"description": "Minimum number of nodes allocated to the instance. If set, this number should be greater than or equal to 1.", +"format": "int32", +"type": "integer" +}, +"minProcessingUnits": { +"description": "Minimum number of processing units allocated to the instance. If set, this number should be multiples of 1000.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AutoscalingTargets": { +"description": "The autoscaling targets for an instance.", +"id": "AutoscalingTargets", +"properties": { +"highPriorityCpuUtilizationPercent": { +"description": "Required. The target high priority cpu utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 90] inclusive.", +"format": "int32", +"type": "integer" +}, +"storageUtilizationPercent": { +"description": "Required. The target storage utilization percentage that the autoscaler should be trying to achieve for the instance. This number is on a scale from 0 (no utilization) to 100 (full utilization). The valid range is [10, 99] inclusive.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Backup": { +"description": "A backup of a Cloud Spanner database.", +"id": "Backup", +"properties": { +"createTime": { +"description": "Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"database": { +"description": "Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.", +"type": "string" +}, +"databaseDialect": { +"description": "Output only. The database dialect information for the backup.", +"enum": [ +"DATABASE_DIALECT_UNSPECIFIED", +"GOOGLE_STANDARD_SQL", +"POSTGRESQL" +], +"enumDescriptions": [ +"Default value. This value will create a database with the GOOGLE_STANDARD_SQL dialect.", +"GoogleSQL supported SQL.", +"PostgreSQL supported SQL." +], +"readOnly": true, +"type": "string" +}, +"encryptionInfo": { +"$ref": "EncryptionInfo", +"description": "Output only. The encryption information for the backup.", +"readOnly": true +}, +"expireTime": { +"description": "Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.", +"format": "google-datetime", +"type": "string" +}, +"maxExpireTime": { +"description": "Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup's expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than `Backup.max_expire_time`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.", +"type": "string" +}, +"referencingBackups": { +"description": "Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form `projects//instances//backups/`. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"referencingDatabases": { +"description": "Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"sizeBytes": { +"description": "Output only. Size of the backup in bytes.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current state of the backup.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY" +], +"enumDescriptions": [ +"Not specified.", +"The pending backup is still being created. Operations on the backup may fail with `FAILED_PRECONDITION` in this state.", +"The backup is complete and ready for use." +], +"readOnly": true, +"type": "string" +}, +"versionTime": { +"description": "The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"BackupInfo": { +"description": "Information about a backup.", +"id": "BackupInfo", +"properties": { +"backup": { +"description": "Name of the backup.", +"type": "string" +}, +"createTime": { +"description": "The time the CreateBackup request was received.", +"format": "google-datetime", +"type": "string" +}, +"sourceDatabase": { +"description": "Name of the database the backup was created from.", +"type": "string" +}, +"versionTime": { +"description": "The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"BatchCreateSessionsRequest": { +"description": "The request for BatchCreateSessions.", +"id": "BatchCreateSessionsRequest", +"properties": { +"sessionCount": { +"description": "Required. The number of sessions to be created in this batch call. The API may return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to BatchCreateSessions (adjusting session_count as necessary).", +"format": "int32", +"type": "integer" +}, +"sessionTemplate": { +"$ref": "Session", +"description": "Parameters to be applied to each created session." +} +}, +"type": "object" +}, +"BatchCreateSessionsResponse": { +"description": "The response for BatchCreateSessions.", +"id": "BatchCreateSessionsResponse", +"properties": { +"session": { +"description": "The freshly created sessions.", +"items": { +"$ref": "Session" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchWriteRequest": { +"description": "The request for BatchWrite.", +"id": "BatchWriteRequest", +"properties": { +"excludeTxnFromChangeStreams": { +"description": "Optional. When `exclude_txn_from_change_streams` is set to `true`: * Modifications from all transactions in this batch write operation will not be recorded in change streams with DDL option `allow_txn_exclusion=true` that are tracking columns modified by these transactions. * Modifications from all transactions in this batch write operation will be recorded in change streams with DDL option `allow_txn_exclusion=false or not set` that are tracking columns modified by these transactions. When `exclude_txn_from_change_streams` is set to `false` or not set, Modifications from all transactions in this batch write operation will be recorded in all change streams that are tracking columns modified by these transactions.", +"type": "boolean" +}, +"mutationGroups": { +"description": "Required. The groups of mutations to be applied.", +"items": { +"$ref": "MutationGroup" +}, +"type": "array" +}, +"requestOptions": { +"$ref": "RequestOptions", +"description": "Common options for this request." +} +}, +"type": "object" +}, +"BatchWriteResponse": { +"description": "The result of applying a batch of mutations.", +"id": "BatchWriteResponse", +"properties": { +"commitTimestamp": { +"description": "The commit timestamp of the transaction that applied this batch. Present if `status` is `OK`, absent otherwise.", +"format": "google-datetime", +"type": "string" +}, +"indexes": { +"description": "The mutation groups applied in this batch. The values index into the `mutation_groups` field in the corresponding `BatchWriteRequest`.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"status": { +"$ref": "Status", +"description": "An `OK` status indicates success. Any other status indicates a failure." +} +}, +"type": "object" +}, +"BeginTransactionRequest": { +"description": "The request for BeginTransaction.", +"id": "BeginTransactionRequest", +"properties": { +"options": { +"$ref": "TransactionOptions", +"description": "Required. Options for the new transaction." +}, +"requestOptions": { +"$ref": "RequestOptions", +"description": "Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not do anything. To set the priority for a transaction, set it on the reads and writes that are part of this transaction instead." +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"ChildLink": { +"description": "Metadata associated with a parent-child relationship appearing in a PlanNode.", +"id": "ChildLink", +"properties": { +"childIndex": { +"description": "The node to which the link points.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "The type of the link. For example, in Hash Joins this could be used to distinguish between the build child and the probe child, or in the case of the child being an output variable, to represent the tag associated with the output variable.", +"type": "string" +}, +"variable": { +"description": "Only present if the child node is SCALAR and corresponds to an output variable of the parent node. The field carries the name of the output variable. For example, a `TableScan` operator that reads rows from a table will have child links to the `SCALAR` nodes representing the output variables created for each column that is read by the operator. The corresponding `variable` fields will be set to the variable names assigned to the columns.", +"type": "string" +} +}, +"type": "object" +}, +"CommitRequest": { +"description": "The request for Commit.", +"id": "CommitRequest", +"properties": { +"maxCommitDelay": { +"description": "Optional. The amount of latency this request is configured to incur in order to improve throughput. If this field is not set, Spanner assumes requests are relatively latency sensitive and automatically determines an appropriate delay time. You can specify a commit delay value between 0 and 500 ms.", +"format": "google-duration", +"type": "string" +}, +"mutations": { +"description": "The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.", +"items": { +"$ref": "Mutation" +}, +"type": "array" +}, +"requestOptions": { +"$ref": "RequestOptions", +"description": "Common options for this request." +}, +"returnCommitStats": { +"description": "If `true`, then statistics related to the transaction will be included in the CommitResponse. Default value is `false`.", +"type": "boolean" +}, +"singleUseTransaction": { +"$ref": "TransactionOptions", +"description": "Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead." +}, +"transactionId": { +"description": "Commit a previously-started transaction.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"CommitResponse": { +"description": "The response for Commit.", +"id": "CommitResponse", +"properties": { +"commitStats": { +"$ref": "CommitStats", +"description": "The statistics about this Commit. Not returned by default. For more information, see CommitRequest.return_commit_stats." +}, +"commitTimestamp": { +"description": "The Cloud Spanner timestamp at which the transaction committed.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"CommitStats": { +"description": "Additional statistics about a commit.", +"id": "CommitStats", +"properties": { +"mutationCount": { +"description": "The total number of mutations for the transaction. Knowing the `mutation_count` value can help you maximize the number of mutations in a transaction and minimize the number of API round trips. You can also monitor this value to prevent transactions from exceeding the system [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data). If the number of mutations exceeds the limit, the server returns [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ContextValue": { +"description": "A message representing context for a KeyRangeInfo, including a label, value, unit, and severity.", +"id": "ContextValue", +"properties": { +"label": { +"$ref": "LocalizedString", +"description": "The label for the context value. e.g. \"latency\"." +}, +"severity": { +"description": "The severity of this context.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"INFO", +"WARNING", +"ERROR", +"FATAL" +], +"enumDescriptions": [ +"Required default value.", +"Lowest severity level \"Info\".", +"Middle severity level \"Warning\".", +"Severity level signaling an error \"Error\"", +"Severity level signaling a non recoverable error \"Fatal\"" +], +"type": "string" +}, +"unit": { +"description": "The unit of the context value.", +"type": "string" +}, +"value": { +"description": "The value for the context.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CopyBackupEncryptionConfig": { +"description": "Encryption configuration for the copied backup.", +"id": "CopyBackupEncryptionConfig", +"properties": { +"encryptionType": { +"description": "Required. The encryption type of the backup.", +"enum": [ +"ENCRYPTION_TYPE_UNSPECIFIED", +"USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION", +"GOOGLE_DEFAULT_ENCRYPTION", +"CUSTOMER_MANAGED_ENCRYPTION" +], +"enumDescriptions": [ +"Unspecified. Do not use.", +"This is the default option for CopyBackup when encryption_config is not specified. For example, if the source backup is using `Customer_Managed_Encryption`, the backup will be using the same Cloud KMS key as the source backup.", +"Use Google default encryption.", +"Use customer managed encryption. If specified, either `kms_key_name` or `kms_key_names` must contain valid Cloud KMS key(s)." +], +"type": "string" +}, +"kmsKeyName": { +"description": "Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.", +"type": "string" +} +}, +"type": "object" +}, +"CopyBackupMetadata": { +"description": "Metadata type for the operation returned by CopyBackup.", +"id": "CopyBackupMetadata", +"properties": { +"cancelTime": { +"description": "The time at which cancellation of CopyBackup operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The name of the backup being created through the copy operation. Values are of the form `projects//instances//backups/`.", +"type": "string" +}, +"progress": { +"$ref": "OperationProgress", +"description": "The progress of the CopyBackup operation." +}, +"sourceBackup": { +"description": "The name of the source backup that is being copied. Values are of the form `projects//instances//backups/`.", +"type": "string" +} +}, +"type": "object" +}, +"CopyBackupRequest": { +"description": "The request for CopyBackup.", +"id": "CopyBackupRequest", +"properties": { +"backupId": { +"description": "Required. The id of the backup copy. The `backup_id` appended to `parent` forms the full backup_uri of the form `projects//instances//backups/`.", +"type": "string" +}, +"encryptionConfig": { +"$ref": "CopyBackupEncryptionConfig", +"description": "Optional. The encryption configuration used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the source backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`." +}, +"expireTime": { +"description": "Required. The expiration time of the backup in microsecond granularity. The expiration time must be at least 6 hours and at most 366 days from the `create_time` of the source backup. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.", +"format": "google-datetime", +"type": "string" +}, +"sourceBackup": { +"description": "Required. The source backup to be copied. The source backup needs to be in READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: `projects//instances//backups/`.", +"type": "string" +} +}, +"type": "object" +}, +"CreateBackupMetadata": { +"description": "Metadata type for the operation returned by CreateBackup.", +"id": "CreateBackupMetadata", +"properties": { +"cancelTime": { +"description": "The time at which cancellation of this operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"format": "google-datetime", +"type": "string" +}, +"database": { +"description": "The name of the database the backup is created from.", +"type": "string" +}, +"name": { +"description": "The name of the backup being created.", +"type": "string" +}, +"progress": { +"$ref": "OperationProgress", +"description": "The progress of the CreateBackup operation." +} +}, +"type": "object" +}, +"CreateDatabaseMetadata": { +"description": "Metadata type for the operation returned by CreateDatabase.", +"id": "CreateDatabaseMetadata", +"properties": { +"database": { +"description": "The database being created.", +"type": "string" +} +}, +"type": "object" +}, +"CreateDatabaseRequest": { +"description": "The request for CreateDatabase.", +"id": "CreateDatabaseRequest", +"properties": { +"createStatement": { +"description": "Required. A `CREATE DATABASE` statement, which specifies the ID of the new database. The database ID must conform to the regular expression `a-z*[a-z0-9]` and be between 2 and 30 characters in length. If the database ID is a reserved word or if it contains a hyphen, the database ID must be enclosed in backticks (`` ` ``).", +"type": "string" +}, +"databaseDialect": { +"description": "Optional. The dialect of the Cloud Spanner Database.", +"enum": [ +"DATABASE_DIALECT_UNSPECIFIED", +"GOOGLE_STANDARD_SQL", +"POSTGRESQL" +], +"enumDescriptions": [ +"Default value. This value will create a database with the GOOGLE_STANDARD_SQL dialect.", +"GoogleSQL supported SQL.", +"PostgreSQL supported SQL." +], +"type": "string" +}, +"encryptionConfig": { +"$ref": "EncryptionConfig", +"description": "Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption." +}, +"extraStatements": { +"description": "Optional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.", +"items": { +"type": "string" +}, +"type": "array" +}, +"protoDescriptors": { +"description": "Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements' above. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \\ --include_imports \\ --descriptor_set_out=descriptors.data \\ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"CreateInstanceConfigMetadata": { +"description": "Metadata type for the operation returned by CreateInstanceConfig.", +"id": "CreateInstanceConfigMetadata", +"properties": { +"cancelTime": { +"description": "The time at which this operation was cancelled.", +"format": "google-datetime", +"type": "string" +}, +"instanceConfig": { +"$ref": "InstanceConfig", +"description": "The target instance config end state." +}, +"progress": { +"$ref": "InstanceOperationProgress", +"description": "The progress of the CreateInstanceConfig operation." +} +}, +"type": "object" +}, +"CreateInstanceConfigRequest": { +"description": "The request for CreateInstanceConfigRequest.", +"id": "CreateInstanceConfigRequest", +"properties": { +"instanceConfig": { +"$ref": "InstanceConfig", +"description": "Required. The InstanceConfig proto of the configuration to create. instance_config.name must be `/instanceConfigs/`. instance_config.base_config must be a Google managed configuration name, e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3." +}, +"instanceConfigId": { +"description": "Required. The ID of the instance config to create. Valid identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-` prefix is required to avoid name conflicts with Google managed configurations.", +"type": "string" +}, +"validateOnly": { +"description": "An option to validate, but not actually execute, a request, and provide the same response.", +"type": "boolean" +} +}, +"type": "object" +}, +"CreateInstanceMetadata": { +"description": "Metadata type for the operation returned by CreateInstance.", +"id": "CreateInstanceMetadata", +"properties": { +"cancelTime": { +"description": "The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time at which this operation failed or was completed successfully.", +"format": "google-datetime", +"type": "string" +}, +"expectedFulfillmentPeriod": { +"description": "The expected fulfillment period of this create operation.", +"enum": [ +"FULFILLMENT_PERIOD_UNSPECIFIED", +"FULFILLMENT_PERIOD_NORMAL", +"FULFILLMENT_PERIOD_EXTENDED" +], +"enumDescriptions": [ +"Not specified.", +"Normal fulfillment period. The operation is expected to complete within minutes.", +"Extended fulfillment period. It can take up to an hour for the operation to complete." +], +"type": "string" +}, +"instance": { +"$ref": "Instance", +"description": "The instance being created." +}, +"startTime": { +"description": "The time at which the CreateInstance request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"CreateInstancePartitionMetadata": { +"description": "Metadata type for the operation returned by CreateInstancePartition.", +"id": "CreateInstancePartitionMetadata", +"properties": { +"cancelTime": { +"description": "The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time at which this operation failed or was completed successfully.", +"format": "google-datetime", +"type": "string" +}, +"instancePartition": { +"$ref": "InstancePartition", +"description": "The instance partition being created." +}, +"startTime": { +"description": "The time at which the CreateInstancePartition request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"CreateInstancePartitionRequest": { +"description": "The request for CreateInstancePartition.", +"id": "CreateInstancePartitionRequest", +"properties": { +"instancePartition": { +"$ref": "InstancePartition", +"description": "Required. The instance partition to create. The instance_partition.name may be omitted, but if specified must be `/instancePartitions/`." +}, +"instancePartitionId": { +"description": "Required. The ID of the instance partition to create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.", +"type": "string" +} +}, +"type": "object" +}, +"CreateInstanceRequest": { +"description": "The request for CreateInstance.", +"id": "CreateInstanceRequest", +"properties": { +"instance": { +"$ref": "Instance", +"description": "Required. The instance to create. The name may be omitted, but if specified must be `/instances/`." +}, +"instanceId": { +"description": "Required. The ID of the instance to create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.", +"type": "string" +} +}, +"type": "object" +}, +"CreateSessionRequest": { +"description": "The request for CreateSession.", +"id": "CreateSessionRequest", +"properties": { +"session": { +"$ref": "Session", +"description": "Required. The session to create." +} +}, +"type": "object" +}, +"Database": { +"description": "A Cloud Spanner database.", +"id": "Database", +"properties": { +"createTime": { +"description": "Output only. If exists, the time at which the database creation started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"databaseDialect": { +"description": "Output only. The dialect of the Cloud Spanner Database.", +"enum": [ +"DATABASE_DIALECT_UNSPECIFIED", +"GOOGLE_STANDARD_SQL", +"POSTGRESQL" +], +"enumDescriptions": [ +"Default value. This value will create a database with the GOOGLE_STANDARD_SQL dialect.", +"GoogleSQL supported SQL.", +"PostgreSQL supported SQL." +], +"readOnly": true, +"type": "string" +}, +"defaultLeader": { +"description": "Output only. The read-write region which contains the database's leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.", +"readOnly": true, +"type": "string" +}, +"earliestVersionTime": { +"description": "Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"enableDropProtection": { +"description": "Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).", +"type": "boolean" +}, +"encryptionConfig": { +"$ref": "EncryptionConfig", +"description": "Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.", +"readOnly": true +}, +"encryptionInfo": { +"description": "Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status' field inside of each `EncryptionInfo` is not populated. For databases that are using Google default or other types of encryption, this field is empty. This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.", +"items": { +"$ref": "EncryptionInfo" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.", +"type": "string" +}, +"reconciling": { +"description": "Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.", +"readOnly": true, +"type": "boolean" +}, +"restoreInfo": { +"$ref": "RestoreInfo", +"description": "Output only. Applicable only for restored databases. Contains information about the restore source.", +"readOnly": true +}, +"state": { +"description": "Output only. The current database state.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY", +"READY_OPTIMIZING" +], +"enumDescriptions": [ +"Not specified.", +"The database is still being created. Operations on the database may fail with `FAILED_PRECONDITION` in this state.", +"The database is fully created and ready for use.", +"The database is fully created and ready for use, but is still being optimized for performance and cannot handle full load. In this state, the database still references the backup it was restore from, preventing the backup from being deleted. When optimizations are complete, the full performance of the database will be restored, and the database will transition to `READY` state." +], +"readOnly": true, +"type": "string" +}, +"versionRetentionPeriod": { +"description": "Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using UpdateDatabaseDdl. Defaults to 1 hour, if not set.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"DatabaseRole": { +"description": "A Cloud Spanner database role.", +"id": "DatabaseRole", +"properties": { +"name": { +"description": "Required. The name of the database role. Values are of the form `projects//instances//databases//databaseRoles/` where `` is as specified in the `CREATE ROLE` DDL statement.", +"type": "string" +} +}, +"type": "object" +}, +"DdlStatementActionInfo": { +"description": "Action information extracted from a DDL statement. This proto is used to display the brief info of the DDL statement for the operation UpdateDatabaseDdl.", +"id": "DdlStatementActionInfo", +"properties": { +"action": { +"description": "The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This field is a non-empty string.", +"type": "string" +}, +"entityNames": { +"description": "The entity name(s) being operated on the DDL statement. E.g. 1. For statement \"CREATE TABLE t1(...)\", `entity_names` = [\"t1\"]. 2. For statement \"GRANT ROLE r1, r2 ...\", `entity_names` = [\"r1\", \"r2\"]. 3. For statement \"ANALYZE\", `entity_names` = [].", +"items": { +"type": "string" +}, +"type": "array" +}, +"entityType": { +"description": "The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This field can be empty string for some DDL statement, e.g. for statement \"ANALYZE\", `entity_type` = \"\".", +"type": "string" +} +}, +"type": "object" +}, +"Delete": { +"description": "Arguments to delete operations.", +"id": "Delete", +"properties": { +"keySet": { +"$ref": "KeySet", +"description": "Required. The primary keys of the rows within table to delete. The primary keys must be specified in the order in which they appear in the `PRIMARY KEY()` clause of the table's equivalent DDL statement (the DDL statement used to create the table). Delete is idempotent. The transaction will succeed even if some or all rows do not exist." +}, +"table": { +"description": "Required. The table whose rows will be deleted.", +"type": "string" +} +}, +"type": "object" +}, +"DerivedMetric": { +"description": "A message representing a derived metric.", +"id": "DerivedMetric", +"properties": { +"denominator": { +"$ref": "LocalizedString", +"description": "The name of the denominator metric. e.g. \"rows\"." +}, +"numerator": { +"$ref": "LocalizedString", +"description": "The name of the numerator metric. e.g. \"latency\"." +} +}, +"type": "object" +}, +"DiagnosticMessage": { +"description": "A message representing the key visualizer diagnostic messages.", +"id": "DiagnosticMessage", +"properties": { +"info": { +"$ref": "LocalizedString", +"description": "Information about this diagnostic information." +}, +"metric": { +"$ref": "LocalizedString", +"description": "The metric." +}, +"metricSpecific": { +"description": "Whether this message is specific only for the current metric. By default Diagnostics are shown for all metrics, regardless which metric is the currently selected metric in the UI. However occasionally a metric will generate so many messages that the resulting visual clutter becomes overwhelming. In this case setting this to true, will show the diagnostic messages for that metric only if it is the currently selected metric.", +"type": "boolean" +}, +"severity": { +"description": "The severity of the diagnostic message.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"INFO", +"WARNING", +"ERROR", +"FATAL" +], +"enumDescriptions": [ +"Required default value.", +"Lowest severity level \"Info\".", +"Middle severity level \"Warning\".", +"Severity level signaling an error \"Error\"", +"Severity level signaling a non recoverable error \"Fatal\"" +], +"type": "string" +}, +"shortMessage": { +"$ref": "LocalizedString", +"description": "The short message." +} +}, +"type": "object" +}, +"DirectedReadOptions": { +"description": "The DirectedReadOptions can be used to indicate which replicas or regions should be used for non-transactional reads or queries. DirectedReadOptions may only be specified for a read-only transaction, otherwise the API will return an `INVALID_ARGUMENT` error.", +"id": "DirectedReadOptions", +"properties": { +"excludeReplicas": { +"$ref": "ExcludeReplicas", +"description": "Exclude_replicas indicates that specified replicas should be excluded from serving requests. Spanner will not route requests to the replicas in this list." +}, +"includeReplicas": { +"$ref": "IncludeReplicas", +"description": "Include_replicas indicates the order of replicas (as they appear in this list) to process the request. If auto_failover_disabled is set to true and all replicas are exhausted without finding a healthy replica, Spanner will wait for a replica in the list to become available, requests may fail due to `DEADLINE_EXCEEDED` errors." +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EncryptionConfig": { +"description": "Encryption configuration for a Cloud Spanner database.", +"id": "EncryptionConfig", +"properties": { +"kmsKeyName": { +"description": "The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.", +"type": "string" +} +}, +"type": "object" +}, +"EncryptionInfo": { +"description": "Encryption information for a Cloud Spanner database or backup.", +"id": "EncryptionInfo", +"properties": { +"encryptionStatus": { +"$ref": "Status", +"description": "Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.", +"readOnly": true +}, +"encryptionType": { +"description": "Output only. The type of encryption.", +"enum": [ +"TYPE_UNSPECIFIED", +"GOOGLE_DEFAULT_ENCRYPTION", +"CUSTOMER_MANAGED_ENCRYPTION" +], +"enumDescriptions": [ +"Encryption type was not specified, though data at rest remains encrypted.", +"The data is encrypted at rest with a key that is fully managed by Google. No key version or status will be populated. This is the default state.", +"The data is encrypted at rest with a key that is managed by the customer. The active version of the key. `kms_key_version` will be populated, and `encryption_status` may be populated." +], +"readOnly": true, +"type": "string" +}, +"kmsKeyVersion": { +"description": "Output only. A Cloud KMS key version that is being used to protect the database or backup.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExcludeReplicas": { +"description": "An ExcludeReplicas contains a repeated set of ReplicaSelection that should be excluded from serving requests.", +"id": "ExcludeReplicas", +"properties": { +"replicaSelections": { +"description": "The directed read replica selector.", +"items": { +"$ref": "ReplicaSelection" +}, +"type": "array" +} +}, +"type": "object" +}, +"ExecuteBatchDmlRequest": { +"description": "The request for ExecuteBatchDml.", +"id": "ExecuteBatchDmlRequest", +"properties": { +"requestOptions": { +"$ref": "RequestOptions", +"description": "Common options for this request." +}, +"seqno": { +"description": "Required. A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution.", +"format": "int64", +"type": "string" +}, +"statements": { +"description": "Required. The list of statements to execute in this batch. Statements are executed serially, such that the effects of statement `i` are visible to statement `i+1`. Each statement must be a DML statement. Execution stops at the first failed statement; the remaining statements are not executed. Callers must provide at least one statement.", +"items": { +"$ref": "Statement" +}, +"type": "array" +}, +"transaction": { +"$ref": "TransactionSelector", +"description": "Required. The transaction to use. Must be a read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction." +} +}, +"type": "object" +}, +"ExecuteBatchDmlResponse": { +"description": "The response for ExecuteBatchDml. Contains a list of ResultSet messages, one for each DML statement that has successfully executed, in the same order as the statements in the request. If a statement fails, the status in the response body identifies the cause of the failure. To check for DML statements that failed, use the following approach: 1. Check the status in the response message. The google.rpc.Code enum value `OK` indicates that all statements were executed successfully. 2. If the status was not `OK`, check the number of result sets in the response. If the response contains `N` ResultSet messages, then statement `N+1` in the request failed. Example 1: * Request: 5 DML statements, all executed successfully. * Response: 5 ResultSet messages, with the status `OK`. Example 2: * Request: 5 DML statements. The third statement has a syntax error. * Response: 2 ResultSet messages, and a syntax error (`INVALID_ARGUMENT`) status. The number of ResultSet messages indicates that the third statement failed, and the fourth and fifth statements were not executed.", +"id": "ExecuteBatchDmlResponse", +"properties": { +"resultSets": { +"description": "One ResultSet for each statement in the request that ran successfully, in the same order as the statements in the request. Each ResultSet does not contain any rows. The ResultSetStats in each ResultSet contain the number of rows modified by the statement. Only the first ResultSet in the response contains valid ResultSetMetadata.", +"items": { +"$ref": "ResultSet" +}, +"type": "array" +}, +"status": { +"$ref": "Status", +"description": "If all DML statements are executed successfully, the status is `OK`. Otherwise, the error status of the first failed statement." +} +}, +"type": "object" +}, +"ExecuteSqlRequest": { +"description": "The request for ExecuteSql and ExecuteStreamingSql.", +"id": "ExecuteSqlRequest", +"properties": { +"dataBoostEnabled": { +"description": "If this is for a partitioned query and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.", +"type": "boolean" +}, +"directedReadOptions": { +"$ref": "DirectedReadOptions", +"description": "Directed read options for this request." +}, +"paramTypes": { +"additionalProperties": { +"$ref": "Type" +}, +"description": "It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in params as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of Type for more information about SQL types.", +"type": "object" +}, +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `\"WHERE id > @msg_id AND id < @msg_id + 100\"` It is an error to execute a SQL statement with unbound parameters.", +"type": "object" +}, +"partitionToken": { +"description": "If present, results will be restricted to the specified partition previously created using PartitionQuery(). There must be an exact match for the values of fields common to this message and the PartitionQueryRequest message used to create this partition_token.", +"format": "byte", +"type": "string" +}, +"queryMode": { +"description": "Used to control the amount of debugging information returned in ResultSetStats. If partition_token is set, query_mode can only be set to QueryMode.NORMAL.", +"enum": [ +"NORMAL", +"PLAN", +"PROFILE" +], +"enumDescriptions": [ +"The default mode. Only the statement results are returned.", +"This mode returns only the query plan, without any results or execution statistics information.", +"This mode returns both the query plan and the execution statistics along with the results." +], +"type": "string" +}, +"queryOptions": { +"$ref": "QueryOptions", +"description": "Query optimizer configuration to use for the given query." +}, +"requestOptions": { +"$ref": "RequestOptions", +"description": "Common options for this request." +}, +"resumeToken": { +"description": "If this request is resuming a previously interrupted SQL statement execution, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new SQL statement execution to resume where the last one left off. The rest of the request parameters must exactly match the request that yielded this token.", +"format": "byte", +"type": "string" +}, +"seqno": { +"description": "A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution. Required for DML statements. Ignored for queries.", +"format": "int64", +"type": "string" +}, +"sql": { +"description": "Required. The SQL string.", +"type": "string" +}, +"transaction": { +"$ref": "TransactionSelector", +"description": "The transaction to use. For queries, if none is provided, the default is a temporary read-only transaction with strong concurrency. Standard DML statements require a read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID." +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"Field": { +"description": "Message representing a single field of a struct.", +"id": "Field", +"properties": { +"name": { +"description": "The name of the field. For reads, this is the column name. For SQL queries, it is the column alias (e.g., `\"Word\"` in the query `\"SELECT 'hello' AS Word\"`), or the column name (e.g., `\"ColName\"` in the query `\"SELECT ColName FROM Table\"`). Some columns might have an empty name (e.g., `\"SELECT UPPER(ColName)\"`). Note that a query result can contain multiple fields with the same name.", +"type": "string" +}, +"type": { +"$ref": "Type", +"description": "The type of the field." +} +}, +"type": "object" +}, +"FreeInstanceMetadata": { +"description": "Free instance specific metadata that is kept even after an instance has been upgraded for tracking purposes.", +"id": "FreeInstanceMetadata", +"properties": { +"expireBehavior": { +"description": "Specifies the expiration behavior of a free instance. The default of ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during or after creation, and before expiration.", +"enum": [ +"EXPIRE_BEHAVIOR_UNSPECIFIED", +"FREE_TO_PROVISIONED", +"REMOVE_AFTER_GRACE_PERIOD" +], +"enumDescriptions": [ +"Not specified.", +"When the free instance expires, upgrade the instance to a provisioned instance.", +"When the free instance expires, disable the instance, and delete it after the grace period passes if it has not been upgraded." +], +"type": "string" +}, +"expireTime": { +"description": "Output only. Timestamp after which the instance will either be upgraded or scheduled for deletion after a grace period. ExpireBehavior is used to choose between upgrading or scheduling the free instance for deletion. This timestamp is set during the creation of a free instance.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upgradeTime": { +"description": "Output only. If present, the timestamp at which the free instance was upgraded to a provisioned instance.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GetDatabaseDdlResponse": { +"description": "The response for GetDatabaseDdl.", +"id": "GetDatabaseDdlResponse", +"properties": { +"protoDescriptors": { +"description": "Proto descriptors stored in the database. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).", +"format": "byte", +"type": "string" +}, +"statements": { +"description": "A list of formatted DDL statements defining the schema of the database specified in the request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GetIamPolicyRequest": { +"description": "Request message for `GetIamPolicy` method.", +"id": "GetIamPolicyRequest", +"properties": { +"options": { +"$ref": "GetPolicyOptions", +"description": "OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`." +} +}, +"type": "object" +}, +"GetPolicyOptions": { +"description": "Encapsulates settings provided to GetIamPolicy.", +"id": "GetPolicyOptions", +"properties": { +"requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"IncludeReplicas": { +"description": "An IncludeReplicas contains a repeated set of ReplicaSelection which indicates the order in which replicas should be considered.", +"id": "IncludeReplicas", +"properties": { +"autoFailoverDisabled": { +"description": "If true, Spanner will not route requests to a replica outside the include_replicas list when all of the specified replicas are unavailable or unhealthy. Default value is `false`.", +"type": "boolean" +}, +"replicaSelections": { +"description": "The directed read replica selector.", +"items": { +"$ref": "ReplicaSelection" +}, +"type": "array" +} +}, +"type": "object" +}, +"IndexAdvice": { +"description": "Recommendation to add new indexes to run queries more efficiently.", +"id": "IndexAdvice", +"properties": { +"ddl": { +"description": "Optional. DDL statements to add new indexes that will improve the query.", +"items": { +"type": "string" +}, +"type": "array" +}, +"improvementFactor": { +"description": "Optional. Estimated latency improvement factor. For example if the query currently takes 500 ms to run and the estimated latency with new indexes is 100 ms this field will be 5.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"IndexedHotKey": { +"description": "A message representing a (sparse) collection of hot keys for specific key buckets.", +"id": "IndexedHotKey", +"properties": { +"sparseHotKeys": { +"additionalProperties": { +"format": "int32", +"type": "integer" +}, +"description": "A (sparse) mapping from key bucket index to the index of the specific hot row key for that key bucket. The index of the hot row key can be translated to the actual row key via the ScanData.VisualizationData.indexed_keys repeated field.", +"type": "object" +} +}, +"type": "object" +}, +"IndexedKeyRangeInfos": { +"description": "A message representing a (sparse) collection of KeyRangeInfos for specific key buckets.", +"id": "IndexedKeyRangeInfos", +"properties": { +"keyRangeInfos": { +"additionalProperties": { +"$ref": "KeyRangeInfos" +}, +"description": "A (sparse) mapping from key bucket index to the KeyRangeInfos for that key bucket.", +"type": "object" +} +}, +"type": "object" +}, +"Instance": { +"description": "An isolated set of Cloud Spanner resources on which databases can be hosted.", +"id": "Instance", +"properties": { +"autoscalingConfig": { +"$ref": "AutoscalingConfig", +"description": "Optional. The autoscaling configuration. Autoscaling is enabled if this field is set. When autoscaling is enabled, node_count and processing_units are treated as OUTPUT_ONLY fields and reflect the current compute capacity allocated to the instance." +}, +"config": { +"description": "Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time at which the instance was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.", +"type": "string" +}, +"endpointUris": { +"description": "Deprecated. This field is not populated.", +"items": { +"type": "string" +}, +"type": "array" +}, +"freeInstanceMetadata": { +"$ref": "FreeInstanceMetadata", +"description": "Free instance metadata. Only populated for free instances." +}, +"instanceType": { +"description": "The `InstanceType` of the current instance.", +"enum": [ +"INSTANCE_TYPE_UNSPECIFIED", +"PROVISIONED", +"FREE_INSTANCE" +], +"enumDescriptions": [ +"Not specified.", +"Provisioned instances have dedicated resources, standard usage limits and support.", +"Free instances provide no guarantee for dedicated resources, [node_count, processing_units] should be 0. They come with stricter usage limits and limited support." +], +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.). * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `a-z{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `[a-z0-9_-]{0,63}`. * No more than 64 labels can be associated with a given resource. See https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the future. And so you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing labels as the string: name + \"_\" + value would prove problematic if we were to allow \"_\" in a future release.", +"type": "object" +}, +"name": { +"description": "Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length.", +"type": "string" +}, +"nodeCount": { +"description": "The number of nodes allocated to this instance. At most one of either node_count or processing_units should be present in the message. Users can set the node_count field to specify the target number of nodes allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units.", +"format": "int32", +"type": "integer" +}, +"processingUnits": { +"description": "The number of processing units allocated to this instance. At most one of processing_units or node_count should be present in the message. Users can set the processing_units field to specify the target number of processing units allocated to the instance. This may be zero in API responses for instances that are not yet in state `READY`. See [the documentation](https://cloud.google.com/spanner/docs/compute-capacity) for more information about nodes and processing units.", +"format": "int32", +"type": "integer" +}, +"state": { +"description": "Output only. The current instance state. For CreateInstance, the state must be either omitted or set to `CREATING`. For UpdateInstance, the state must be either omitted or set to `READY`.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY" +], +"enumDescriptions": [ +"Not specified.", +"The instance is still being created. Resources may not be available yet, and operations such as database creation may not work.", +"The instance is fully created and ready to do work such as creating databases." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which the instance was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InstanceConfig": { +"description": "A possible configuration for a Cloud Spanner instance. Configurations define the geographic placement of nodes and their replication.", +"id": "InstanceConfig", +"properties": { +"baseConfig": { +"description": "Base configuration name, e.g. projects//instanceConfigs/nam3, based on which this configuration is created. Only set for user managed configurations. `base_config` must refer to a configuration of type GOOGLE_MANAGED in the same project as this configuration.", +"type": "string" +}, +"configType": { +"description": "Output only. Whether this instance config is a Google or User Managed Configuration.", +"enum": [ +"TYPE_UNSPECIFIED", +"GOOGLE_MANAGED", +"USER_MANAGED" +], +"enumDescriptions": [ +"Unspecified.", +"Google managed configuration.", +"User managed configuration." +], +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "The name of this instance configuration as it appears in UIs.", +"type": "string" +}, +"etag": { +"description": "etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance config from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance config updates in order to avoid race conditions: An etag is returned in the response which contains instance configs, and systems are expected to put that etag in the request to update instance config to ensure that their change will be applied to the same version of the instance config. If no etag is provided in the call to update instance config, then the existing instance config is overwritten blindly.", +"type": "string" +}, +"freeInstanceAvailability": { +"description": "Output only. Describes whether free instances are available to be created in this instance config.", +"enum": [ +"FREE_INSTANCE_AVAILABILITY_UNSPECIFIED", +"AVAILABLE", +"UNSUPPORTED", +"DISABLED", +"QUOTA_EXCEEDED" +], +"enumDescriptions": [ +"Not specified.", +"Indicates that free instances are available to be created in this instance config.", +"Indicates that free instances are not supported in this instance config.", +"Indicates that free instances are currently not available to be created in this instance config.", +"Indicates that additional free instances cannot be created in this instance config because the project has reached its limit of free instances." +], +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.). * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `a-z{0,62}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `[a-z0-9_-]{0,63}`. * No more than 64 labels can be associated with a given resource. See https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the future. Therefore, you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing labels as the string: name + \"_\" + value would prove problematic if we were to allow \"_\" in a future release.", +"type": "object" +}, +"leaderOptions": { +"description": "Allowed values of the \"default_leader\" schema option for databases in instances that use this instance configuration.", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "A unique identifier for the instance configuration. Values are of the form `projects//instanceConfigs/a-z*`.", +"type": "string" +}, +"optionalReplicas": { +"description": "Output only. The available optional replicas to choose from for user managed configurations. Populated for Google managed configurations.", +"items": { +"$ref": "ReplicaInfo" +}, +"readOnly": true, +"type": "array" +}, +"reconciling": { +"description": "Output only. If true, the instance config is being created or updated. If false, there are no ongoing operations for the instance config.", +"readOnly": true, +"type": "boolean" +}, +"replicas": { +"description": "The geographic placement of nodes in this instance configuration and their replication properties.", +"items": { +"$ref": "ReplicaInfo" +}, +"type": "array" +}, +"state": { +"description": "Output only. The current instance config state. Applicable only for USER_MANAGED configs.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY" +], +"enumDescriptions": [ +"Not specified.", +"The instance config is still being created.", +"The instance config is fully created and ready to be used to create instances." +], +"readOnly": true, +"type": "string" +}, +"storageLimitPerProcessingUnit": { +"description": "Output only. The storage limit in bytes per processing unit.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InstanceOperationProgress": { +"description": "Encapsulates progress related information for a Cloud Spanner long running instance operations.", +"id": "InstanceOperationProgress", +"properties": { +"endTime": { +"description": "If set, the time at which this operation failed or was completed successfully.", +"format": "google-datetime", +"type": "string" +}, +"progressPercent": { +"description": "Percent completion of the operation. Values are between 0 and 100 inclusive.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"InstancePartition": { +"description": "An isolated set of Cloud Spanner resources that databases can define placements on.", +"id": "InstancePartition", +"properties": { +"config": { +"description": "Required. The name of the instance partition's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time at which the instance partition was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Required. The descriptive name for this instance partition as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.", +"type": "string" +}, +"etag": { +"description": "Used for optimistic concurrency control as a way to help prevent simultaneous updates of a instance partition from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform instance partition updates in order to avoid race conditions: An etag is returned in the response which contains instance partitions, and systems are expected to put that etag in the request to update instance partitions to ensure that their change will be applied to the same version of the instance partition. If no etag is provided in the call to update instance partition, then the existing instance partition is overwritten blindly.", +"type": "string" +}, +"name": { +"description": "Required. A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length. An instance partition's name cannot be changed after the instance partition is created.", +"type": "string" +}, +"nodeCount": { +"description": "The number of nodes allocated to this instance partition. Users can set the node_count field to specify the target number of nodes allocated to the instance partition. This may be zero in API responses for instance partitions that are not yet in state `READY`.", +"format": "int32", +"type": "integer" +}, +"processingUnits": { +"description": "The number of processing units allocated to this instance partition. Users can set the processing_units field to specify the target number of processing units allocated to the instance partition. This may be zero in API responses for instance partitions that are not yet in state `READY`.", +"format": "int32", +"type": "integer" +}, +"referencingBackups": { +"description": "Output only. The names of the backups that reference this instance partition. Referencing backups should share the parent instance. The existence of any referencing backup prevents the instance partition from being deleted.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"referencingDatabases": { +"description": "Output only. The names of the databases that reference this instance partition. Referencing databases should share the parent instance. The existence of any referencing database prevents the instance partition from being deleted.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"state": { +"description": "Output only. The current instance partition state.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY" +], +"enumDescriptions": [ +"Not specified.", +"The instance partition is still being created. Resources may not be available yet, and operations such as creating placements using this instance partition may not work.", +"The instance partition is fully created and ready to do work such as creating placements and using in databases." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The time at which the instance partition was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"KeyRange": { +"description": "KeyRange represents a range of rows in a table or index. A range has a start key and an end key. These keys can be open or closed, indicating if the range includes rows with that key. Keys are represented by lists, where the ith value in the list corresponds to the ith component of the table or index primary key. Individual values are encoded as described here. For example, consider the following table definition: CREATE TABLE UserEvents ( UserName STRING(MAX), EventDate STRING(10) ) PRIMARY KEY(UserName, EventDate); The following keys name rows in this table: \"Bob\", \"2014-09-23\" Since the `UserEvents` table's `PRIMARY KEY` clause names two columns, each `UserEvents` key has two elements; the first is the `UserName`, and the second is the `EventDate`. Key ranges with multiple components are interpreted lexicographically by component using the table or index key's declared sort order. For example, the following range returns all events for user `\"Bob\"` that occurred in the year 2015: \"start_closed\": [\"Bob\", \"2015-01-01\"] \"end_closed\": [\"Bob\", \"2015-12-31\"] Start and end keys can omit trailing key components. This affects the inclusion and exclusion of rows that exactly match the provided key components: if the key is closed, then rows that exactly match the provided components are included; if the key is open, then rows that exactly match are not included. For example, the following range includes all events for `\"Bob\"` that occurred during and after the year 2000: \"start_closed\": [\"Bob\", \"2000-01-01\"] \"end_closed\": [\"Bob\"] The next example retrieves all events for `\"Bob\"`: \"start_closed\": [\"Bob\"] \"end_closed\": [\"Bob\"] To retrieve events before the year 2000: \"start_closed\": [\"Bob\"] \"end_open\": [\"Bob\", \"2000-01-01\"] The following range includes all rows in the table: \"start_closed\": [] \"end_closed\": [] This range returns all users whose `UserName` begins with any character from A to C: \"start_closed\": [\"A\"] \"end_open\": [\"D\"] This range returns all users whose `UserName` begins with B: \"start_closed\": [\"B\"] \"end_open\": [\"C\"] Key ranges honor column sort order. For example, suppose a table is defined as follows: CREATE TABLE DescendingSortedTable { Key INT64, ... ) PRIMARY KEY(Key DESC); The following range retrieves all rows with key values between 1 and 100 inclusive: \"start_closed\": [\"100\"] \"end_closed\": [\"1\"] Note that 100 is passed as the start, and 1 is passed as the end, because `Key` is a descending column in the schema.", +"id": "KeyRange", +"properties": { +"endClosed": { +"description": "If the end is closed, then the range includes all rows whose first `len(end_closed)` key columns exactly match `end_closed`.", +"items": { +"type": "any" +}, +"type": "array" +}, +"endOpen": { +"description": "If the end is open, then the range excludes rows whose first `len(end_open)` key columns exactly match `end_open`.", +"items": { +"type": "any" +}, +"type": "array" +}, +"startClosed": { +"description": "If the start is closed, then the range includes all rows whose first `len(start_closed)` key columns exactly match `start_closed`.", +"items": { +"type": "any" +}, +"type": "array" +}, +"startOpen": { +"description": "If the start is open, then the range excludes rows whose first `len(start_open)` key columns exactly match `start_open`.", +"items": { +"type": "any" +}, +"type": "array" +} +}, +"type": "object" +}, +"KeyRangeInfo": { +"description": "A message representing information for a key range (possibly one key).", +"id": "KeyRangeInfo", +"properties": { +"contextValues": { +"description": "The list of context values for this key range.", +"items": { +"$ref": "ContextValue" +}, +"type": "array" +}, +"endKeyIndex": { +"description": "The index of the end key in indexed_keys.", +"format": "int32", +"type": "integer" +}, +"info": { +"$ref": "LocalizedString", +"description": "Information about this key range, for all metrics." +}, +"keysCount": { +"description": "The number of keys this range covers.", +"format": "int64", +"type": "string" +}, +"metric": { +"$ref": "LocalizedString", +"description": "The name of the metric. e.g. \"latency\"." +}, +"startKeyIndex": { +"description": "The index of the start key in indexed_keys.", +"format": "int32", +"type": "integer" +}, +"timeOffset": { +"description": "The time offset. This is the time since the start of the time interval.", +"format": "google-duration", +"type": "string" +}, +"unit": { +"$ref": "LocalizedString", +"description": "The unit of the metric. This is an unstructured field and will be mapped as is to the user." +}, +"value": { +"description": "The value of the metric.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"KeyRangeInfos": { +"description": "A message representing a list of specific information for multiple key ranges.", +"id": "KeyRangeInfos", +"properties": { +"infos": { +"description": "The list individual KeyRangeInfos.", +"items": { +"$ref": "KeyRangeInfo" +}, +"type": "array" +}, +"totalSize": { +"description": "The total size of the list of all KeyRangeInfos. This may be larger than the number of repeated messages above. If that is the case, this number may be used to determine how many are not being shown.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"KeySet": { +"description": "`KeySet` defines a collection of Cloud Spanner keys and/or key ranges. All the keys are expected to be in the same table or index. The keys need not be sorted in any particular way. If the same key is specified multiple times in the set (for example if two ranges, two keys, or a key and a range overlap), Cloud Spanner behaves as if the key were only specified once.", +"id": "KeySet", +"properties": { +"all": { +"description": "For convenience `all` can be set to `true` to indicate that this `KeySet` matches all keys in the table or index. Note that any keys specified in `keys` or `ranges` are only yielded once.", +"type": "boolean" +}, +"keys": { +"description": "A list of specific keys. Entries in `keys` should have exactly as many elements as there are columns in the primary or index key with which this `KeySet` is used. Individual key values are encoded as described here.", +"items": { +"items": { +"type": "any" +}, +"type": "array" +}, +"type": "array" +}, +"ranges": { +"description": "A list of key ranges. See KeyRange for more information about key range specifications.", +"items": { +"$ref": "KeyRange" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListBackupOperationsResponse": { +"description": "The response for ListBackupOperations.", +"id": "ListBackupOperationsResponse", +"properties": { +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListBackupOperations call to fetch more of the matching metadata.", +"type": "string" +}, +"operations": { +"description": "The list of matching backup long-running operations. Each operation's name will be prefixed by the backup's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListBackupsResponse": { +"description": "The response for ListBackups.", +"id": "ListBackupsResponse", +"properties": { +"backups": { +"description": "The list of matching backups. Backups returned are ordered by `create_time` in descending order, starting from the most recent `create_time`.", +"items": { +"$ref": "Backup" +}, +"type": "array" +}, +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListBackups call to fetch more of the matching backups.", +"type": "string" +} +}, +"type": "object" +}, +"ListDatabaseOperationsResponse": { +"description": "The response for ListDatabaseOperations.", +"id": "ListDatabaseOperationsResponse", +"properties": { +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListDatabaseOperations call to fetch more of the matching metadata.", +"type": "string" +}, +"operations": { +"description": "The list of matching database long-running operations. Each operation's name will be prefixed by the database's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListDatabaseRolesResponse": { +"description": "The response for ListDatabaseRoles.", +"id": "ListDatabaseRolesResponse", +"properties": { +"databaseRoles": { +"description": "Database roles that matched the request.", +"items": { +"$ref": "DatabaseRole" +}, +"type": "array" +}, +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListDatabaseRoles call to fetch more of the matching roles.", +"type": "string" +} +}, +"type": "object" +}, +"ListDatabasesResponse": { +"description": "The response for ListDatabases.", +"id": "ListDatabasesResponse", +"properties": { +"databases": { +"description": "Databases that matched the request.", +"items": { +"$ref": "Database" +}, +"type": "array" +}, +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListDatabases call to fetch more of the matching databases.", +"type": "string" +} +}, +"type": "object" +}, +"ListInstanceConfigOperationsResponse": { +"description": "The response for ListInstanceConfigOperations.", +"id": "ListInstanceConfigOperationsResponse", +"properties": { +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListInstanceConfigOperations call to fetch more of the matching metadata.", +"type": "string" +}, +"operations": { +"description": "The list of matching instance config long-running operations. Each operation's name will be prefixed by the instance config's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInstanceConfigsResponse": { +"description": "The response for ListInstanceConfigs.", +"id": "ListInstanceConfigsResponse", +"properties": { +"instanceConfigs": { +"description": "The list of requested instance configurations.", +"items": { +"$ref": "InstanceConfig" +}, +"type": "array" +}, +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListInstanceConfigs call to fetch more of the matching instance configurations.", +"type": "string" +} +}, +"type": "object" +}, +"ListInstancePartitionOperationsResponse": { +"description": "The response for ListInstancePartitionOperations.", +"id": "ListInstancePartitionOperationsResponse", +"properties": { +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListInstancePartitionOperations call to fetch more of the matching metadata.", +"type": "string" +}, +"operations": { +"description": "The list of matching instance partition long-running operations. Each operation's name will be prefixed by the instance partition's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata.", +"items": { +"$ref": "Operation" +}, +"type": "array" +}, +"unreachableInstancePartitions": { +"description": "The list of unreachable instance partitions. It includes the names of instance partitions whose operation metadata could not be retrieved within instance_partition_deadline.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInstancePartitionsResponse": { +"description": "The response for ListInstancePartitions.", +"id": "ListInstancePartitionsResponse", +"properties": { +"instancePartitions": { +"description": "The list of requested instancePartitions.", +"items": { +"$ref": "InstancePartition" +}, +"type": "array" +}, +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListInstancePartitions call to fetch more of the matching instance partitions.", +"type": "string" +}, +"unreachable": { +"description": "The list of unreachable instance partitions. It includes the names of instance partitions whose metadata could not be retrieved within instance_partition_deadline.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListInstancesResponse": { +"description": "The response for ListInstances.", +"id": "ListInstancesResponse", +"properties": { +"instances": { +"description": "The list of requested instances.", +"items": { +"$ref": "Instance" +}, +"type": "array" +}, +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListInstances call to fetch more of the matching instances.", +"type": "string" +}, +"unreachable": { +"description": "The list of unreachable instances. It includes the names of instances whose metadata could not be retrieved within instance_deadline.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListScansResponse": { +"description": "Response method from the ListScans method.", +"id": "ListScansResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"scans": { +"description": "Available scans based on the list query parameters.", +"items": { +"$ref": "Scan" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSessionsResponse": { +"description": "The response for ListSessions.", +"id": "ListSessionsResponse", +"properties": { +"nextPageToken": { +"description": "`next_page_token` can be sent in a subsequent ListSessions call to fetch more of the matching sessions.", +"type": "string" +}, +"sessions": { +"description": "The list of requested sessions.", +"items": { +"$ref": "Session" +}, +"type": "array" +} +}, +"type": "object" +}, +"LocalizedString": { +"description": "A message representing a user-facing string whose value may need to be translated before being displayed.", +"id": "LocalizedString", +"properties": { +"args": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of arguments used when creating the localized message. Keys represent parameter names which may be used by the localized version when substituting dynamic values.", +"type": "object" +}, +"message": { +"description": "The canonical English version of this message. If no token is provided or the front-end has no message associated with the token, this text will be displayed as-is.", +"type": "string" +}, +"token": { +"description": "The token identifying the message, e.g. 'METRIC_READ_CPU'. This should be unique within the service.", +"type": "string" +} +}, +"type": "object" +}, +"Metric": { +"description": "A message representing the actual monitoring data, values for each key bucket over time, of a metric.", +"id": "Metric", +"properties": { +"aggregation": { +"description": "The aggregation function used to aggregate each key bucket", +"enum": [ +"AGGREGATION_UNSPECIFIED", +"MAX", +"SUM" +], +"enumDescriptions": [ +"Required default value.", +"Use the maximum of all values.", +"Use the sum of all values." +], +"type": "string" +}, +"category": { +"$ref": "LocalizedString", +"description": "The category of the metric, e.g. \"Activity\", \"Alerts\", \"Reads\", etc." +}, +"derived": { +"$ref": "DerivedMetric", +"description": "The references to numerator and denominator metrics for a derived metric." +}, +"displayLabel": { +"$ref": "LocalizedString", +"description": "The displayed label of the metric." +}, +"hasNonzeroData": { +"description": "Whether the metric has any non-zero data.", +"type": "boolean" +}, +"hotValue": { +"description": "The value that is considered hot for the metric. On a per metric basis hotness signals high utilization and something that might potentially be a cause for concern by the end user. hot_value is used to calibrate and scale visual color scales.", +"format": "float", +"type": "number" +}, +"indexedHotKeys": { +"additionalProperties": { +"$ref": "IndexedHotKey" +}, +"description": "The (sparse) mapping from time index to an IndexedHotKey message, representing those time intervals for which there are hot keys.", +"type": "object" +}, +"indexedKeyRangeInfos": { +"additionalProperties": { +"$ref": "IndexedKeyRangeInfos" +}, +"description": "The (sparse) mapping from time interval index to an IndexedKeyRangeInfos message, representing those time intervals for which there are informational messages concerning key ranges.", +"type": "object" +}, +"info": { +"$ref": "LocalizedString", +"description": "Information about the metric." +}, +"matrix": { +"$ref": "MetricMatrix", +"description": "The data for the metric as a matrix." +}, +"unit": { +"$ref": "LocalizedString", +"description": "The unit of the metric." +}, +"visible": { +"description": "Whether the metric is visible to the end user.", +"type": "boolean" +} +}, +"type": "object" +}, +"MetricMatrix": { +"description": "A message representing a matrix of floats.", +"id": "MetricMatrix", +"properties": { +"rows": { +"description": "The rows of the matrix.", +"items": { +"$ref": "MetricMatrixRow" +}, +"type": "array" +} +}, +"type": "object" +}, +"MetricMatrixRow": { +"description": "A message representing a row of a matrix of floats.", +"id": "MetricMatrixRow", +"properties": { +"cols": { +"description": "The columns of the row.", +"items": { +"format": "float", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"MoveInstanceRequest": { +"description": "The request for MoveInstance.", +"id": "MoveInstanceRequest", +"properties": { +"targetConfig": { +"description": "Required. The target instance config for the instance to move. Values are of the form `projects//instanceConfigs/`.", +"type": "string" +} +}, +"type": "object" +}, +"Mutation": { +"description": "A modification to one or more Cloud Spanner rows. Mutations can be applied to a Cloud Spanner database by sending them in a Commit call.", +"id": "Mutation", +"properties": { +"delete": { +"$ref": "Delete", +"description": "Delete rows from a table. Succeeds whether or not the named rows were present." +}, +"insert": { +"$ref": "Write", +"description": "Insert new rows in a table. If any of the rows already exist, the write or transaction fails with error `ALREADY_EXISTS`." +}, +"insertOrUpdate": { +"$ref": "Write", +"description": "Like insert, except that if the row already exists, then its column values are overwritten with the ones provided. Any column values not explicitly written are preserved. When using insert_or_update, just as when using insert, all `NOT NULL` columns in the table must be given a value. This holds true even when the row already exists and will therefore actually be updated." +}, +"replace": { +"$ref": "Write", +"description": "Like insert, except that if the row already exists, it is deleted, and the column values provided are inserted instead. Unlike insert_or_update, this means any values not explicitly written become `NULL`. In an interleaved table, if you create the child table with the `ON DELETE CASCADE` annotation, then replacing a parent row also deletes the child rows. Otherwise, you must delete the child rows before you replace the parent row." +}, +"update": { +"$ref": "Write", +"description": "Update existing rows in a table. If any of the rows does not already exist, the transaction fails with error `NOT_FOUND`." +} +}, +"type": "object" +}, +"MutationGroup": { +"description": "A group of mutations to be committed together. Related mutations should be placed in a group. For example, two mutations inserting rows with the same primary key prefix in both parent and child tables are related.", +"id": "MutationGroup", +"properties": { +"mutations": { +"description": "Required. The mutations in this group.", +"items": { +"$ref": "Mutation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationProgress": { +"description": "Encapsulates progress related information for a Cloud Spanner long running operation.", +"id": "OperationProgress", +"properties": { +"endTime": { +"description": "If set, the time at which this operation failed or was completed successfully.", +"format": "google-datetime", +"type": "string" +}, +"progressPercent": { +"description": "Percent completion of the operation. Values are between 0 and 100 inclusive.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OptimizeRestoredDatabaseMetadata": { +"description": "Metadata type for the long-running operation used to track the progress of optimizations performed on a newly restored database. This long-running operation is automatically created by the system after the successful completion of a database restore, and cannot be cancelled.", +"id": "OptimizeRestoredDatabaseMetadata", +"properties": { +"name": { +"description": "Name of the restored database being optimized.", +"type": "string" +}, +"progress": { +"$ref": "OperationProgress", +"description": "The progress of the post-restore optimizations." +} +}, +"type": "object" +}, +"PartialResultSet": { +"description": "Partial results from a streaming read or SQL query. Streaming reads and SQL queries better tolerate large result sets, large rows, and large values, but are a little trickier to consume.", +"id": "PartialResultSet", +"properties": { +"chunkedValue": { +"description": "If true, then the final value in values is chunked, and must be combined with more values from subsequent `PartialResultSet`s to obtain a complete field value.", +"type": "boolean" +}, +"metadata": { +"$ref": "ResultSetMetadata", +"description": "Metadata about the result set, such as row type information. Only present in the first response." +}, +"resumeToken": { +"description": "Streaming calls might be interrupted for a variety of reasons, such as TCP connection loss. If this occurs, the stream of results can be resumed by re-sending the original request and including `resume_token`. Note that executing any other transaction in the same session invalidates the token.", +"format": "byte", +"type": "string" +}, +"stats": { +"$ref": "ResultSetStats", +"description": "Query plan and execution statistics for the statement that produced this streaming result set. These can be requested by setting ExecuteSqlRequest.query_mode and are sent only once with the last response in the stream. This field will also be present in the last response for DML statements." +}, +"values": { +"description": "A streamed result set consists of a stream of values, which might be split into many `PartialResultSet` messages to accommodate large rows and/or large values. Every N complete values defines a row, where N is equal to the number of entries in metadata.row_type.fields. Most values are encoded based on type as described here. It is possible that the last value in values is \"chunked\", meaning that the rest of the value is sent in subsequent `PartialResultSet`(s). This is denoted by the chunked_value field. Two or more chunked values can be merged to form a complete value as follows: * `bool/number/null`: cannot be chunked * `string`: concatenate the strings * `list`: concatenate the lists. If the last element in a list is a `string`, `list`, or `object`, merge it with the first element in the next list by applying these rules recursively. * `object`: concatenate the (field name, field value) pairs. If a field name is duplicated, then apply these rules recursively to merge the field values. Some examples of merging: # Strings are concatenated. \"foo\", \"bar\" => \"foobar\" # Lists of non-strings are concatenated. [2, 3], [4] => [2, 3, 4] # Lists are concatenated, but the last and first elements are merged # because they are strings. [\"a\", \"b\"], [\"c\", \"d\"] => [\"a\", \"bc\", \"d\"] # Lists are concatenated, but the last and first elements are merged # because they are lists. Recursively, the last and first elements # of the inner lists are merged because they are strings. [\"a\", [\"b\", \"c\"]], [[\"d\"], \"e\"] => [\"a\", [\"b\", \"cd\"], \"e\"] # Non-overlapping object fields are combined. {\"a\": \"1\"}, {\"b\": \"2\"} => {\"a\": \"1\", \"b\": 2\"} # Overlapping object fields are merged. {\"a\": \"1\"}, {\"a\": \"2\"} => {\"a\": \"12\"} # Examples of merging objects containing lists of strings. {\"a\": [\"1\"]}, {\"a\": [\"2\"]} => {\"a\": [\"12\"]} For a more complete example, suppose a streaming SQL query is yielding a result set whose rows contain a single string field. The following `PartialResultSet`s might be yielded: { \"metadata\": { ... } \"values\": [\"Hello\", \"W\"] \"chunked_value\": true \"resume_token\": \"Af65...\" } { \"values\": [\"orl\"] \"chunked_value\": true } { \"values\": [\"d\"] \"resume_token\": \"Zx1B...\" } This sequence of `PartialResultSet`s encodes two rows, one containing the field value `\"Hello\"`, and a second containing the field value `\"World\" = \"W\" + \"orl\" + \"d\"`. Not all `PartialResultSet`s contain a `resume_token`. Execution can only be resumed from a previously yielded `resume_token`. For the above sequence of `PartialResultSet`s, resuming the query with `\"resume_token\": \"Af65...\"` will yield results from the `PartialResultSet` with value `[\"orl\"]`.", +"items": { +"type": "any" +}, +"type": "array" +} +}, +"type": "object" +}, +"Partition": { +"description": "Information returned for each partition returned in a PartitionResponse.", +"id": "Partition", +"properties": { +"partitionToken": { +"description": "This token can be passed to Read, StreamingRead, ExecuteSql, or ExecuteStreamingSql requests to restrict the results to those identified by this partition token.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"PartitionOptions": { +"description": "Options for a PartitionQueryRequest and PartitionReadRequest.", +"id": "PartitionOptions", +"properties": { +"maxPartitions": { +"description": "**Note:** This hint is currently ignored by PartitionQuery and PartitionRead requests. The desired maximum number of partitions to return. For example, this may be set to the number of workers available. The default for this option is currently 10,000. The maximum value is currently 200,000. This is only a hint. The actual number of partitions returned may be smaller or larger than this maximum count request.", +"format": "int64", +"type": "string" +}, +"partitionSizeBytes": { +"description": "**Note:** This hint is currently ignored by PartitionQuery and PartitionRead requests. The desired data size for each partition generated. The default for this option is currently 1 GiB. This is only a hint. The actual size of each partition may be smaller or larger than this size request.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PartitionQueryRequest": { +"description": "The request for PartitionQuery", +"id": "PartitionQueryRequest", +"properties": { +"paramTypes": { +"additionalProperties": { +"$ref": "Type" +}, +"description": "It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in params as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL query parameters. See the definition of Type for more information about SQL types.", +"type": "object" +}, +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names can contain letters, numbers, and underscores. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `\"WHERE id > @msg_id AND id < @msg_id + 100\"` It is an error to execute a SQL statement with unbound parameters.", +"type": "object" +}, +"partitionOptions": { +"$ref": "PartitionOptions", +"description": "Additional options that affect how many partitions are created." +}, +"sql": { +"description": "Required. The query request to generate partitions for. The request will fail if the query is not root partitionable. For a query to be root partitionable, it needs to satisfy a few conditions. For example, if the query execution plan contains a distributed union operator, then it must be the first operator in the plan. For more information about other conditions, see [Read data in parallel](https://cloud.google.com/spanner/docs/reads#read_data_in_parallel). The query request must not contain DML commands, such as INSERT, UPDATE, or DELETE. Use ExecuteStreamingSql with a PartitionedDml transaction for large, partition-friendly DML operations.", +"type": "string" +}, +"transaction": { +"$ref": "TransactionSelector", +"description": "Read only snapshot transactions are supported, read/write and single use transactions are not." +} +}, +"type": "object" +}, +"PartitionReadRequest": { +"description": "The request for PartitionRead", +"id": "PartitionReadRequest", +"properties": { +"columns": { +"description": "The columns of table to be returned for each row matching this request.", +"items": { +"type": "string" +}, +"type": "array" +}, +"index": { +"description": "If non-empty, the name of an index on table. This index is used instead of the table primary key when interpreting key_set and sorting result rows. See key_set for further information.", +"type": "string" +}, +"keySet": { +"$ref": "KeySet", +"description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the primary keys of the rows in table to be yielded, unless index is present. If index is present, then key_set instead names index keys in index. It is not an error for the `key_set` to name rows that do not exist in the database. Read yields nothing for nonexistent rows." +}, +"partitionOptions": { +"$ref": "PartitionOptions", +"description": "Additional options that affect how many partitions are created." +}, +"table": { +"description": "Required. The name of the table in the database to be read.", +"type": "string" +}, +"transaction": { +"$ref": "TransactionSelector", +"description": "Read only snapshot transactions are supported, read/write and single use transactions are not." +} +}, +"type": "object" +}, +"PartitionResponse": { +"description": "The response for PartitionQuery or PartitionRead", +"id": "PartitionResponse", +"properties": { +"partitions": { +"description": "Partitions created by this request.", +"items": { +"$ref": "Partition" +}, +"type": "array" +}, +"transaction": { +"$ref": "Transaction", +"description": "Transaction created by this request." +} +}, +"type": "object" +}, +"PartitionedDml": { +"description": "Message type to initiate a Partitioned DML transaction.", +"id": "PartitionedDml", +"properties": {}, +"type": "object" +}, +"PlanNode": { +"description": "Node information for nodes appearing in a QueryPlan.plan_nodes.", +"id": "PlanNode", +"properties": { +"childLinks": { +"description": "List of child node `index`es and their relationship to this parent.", +"items": { +"$ref": "ChildLink" +}, +"type": "array" +}, +"displayName": { +"description": "The display name for the node.", +"type": "string" +}, +"executionStats": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "The execution statistics associated with the node, contained in a group of key-value pairs. Only present if the plan was returned as a result of a profile query. For example, number of executions, number of rows/time per execution etc.", +"type": "object" +}, +"index": { +"description": "The `PlanNode`'s index in node list.", +"format": "int32", +"type": "integer" +}, +"kind": { +"description": "Used to determine the type of node. May be needed for visualizing different kinds of nodes differently. For example, If the node is a SCALAR node, it will have a condensed representation which can be used to directly embed a description of the node in its parent.", +"enum": [ +"KIND_UNSPECIFIED", +"RELATIONAL", +"SCALAR" +], +"enumDescriptions": [ +"Not specified.", +"Denotes a Relational operator node in the expression tree. Relational operators represent iterative processing of rows during query execution. For example, a `TableScan` operation that reads rows from a table.", +"Denotes a Scalar node in the expression tree. Scalar nodes represent non-iterable entities in the query plan. For example, constants or arithmetic operators appearing inside predicate expressions or references to column names." +], +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Attributes relevant to the node contained in a group of key-value pairs. For example, a Parameter Reference node could have the following information in its metadata: { \"parameter_reference\": \"param1\", \"parameter_type\": \"array\" }", +"type": "object" +}, +"shortRepresentation": { +"$ref": "ShortRepresentation", +"description": "Condensed representation for SCALAR nodes." +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PrefixNode": { +"description": "A message representing a key prefix node in the key prefix hierarchy. for eg. Bigtable keyspaces are lexicographically ordered mappings of keys to values. Keys often have a shared prefix structure where users use the keys to organize data. Eg ///employee In this case Keysight will possibly use one node for a company and reuse it for all employees that fall under the company. Doing so improves legibility in the UI.", +"id": "PrefixNode", +"properties": { +"dataSourceNode": { +"description": "Whether this corresponds to a data_source name.", +"type": "boolean" +}, +"depth": { +"description": "The depth in the prefix hierarchy.", +"format": "int32", +"type": "integer" +}, +"endIndex": { +"description": "The index of the end key bucket of the range that this node spans.", +"format": "int32", +"type": "integer" +}, +"startIndex": { +"description": "The index of the start key bucket of the range that this node spans.", +"format": "int32", +"type": "integer" +}, +"word": { +"description": "The string represented by the prefix node.", +"type": "string" +} +}, +"type": "object" +}, +"QueryAdvisorResult": { +"description": "Output of query advisor analysis.", +"id": "QueryAdvisorResult", +"properties": { +"indexAdvice": { +"description": "Optional. Index Recommendation for a query. This is an optional field and the recommendation will only be available when the recommendation guarantees significant improvement in query performance.", +"items": { +"$ref": "IndexAdvice" +}, +"type": "array" +} +}, +"type": "object" +}, +"QueryOptions": { +"description": "Query optimizer configuration.", +"id": "QueryOptions", +"properties": { +"optimizerStatisticsPackage": { +"description": "An option to control the selection of optimizer statistics package. This parameter allows individual queries to use a different query optimizer statistics package. Specifying `latest` as a value instructs Cloud Spanner to use the latest generated statistics package. If not specified, Cloud Spanner uses the statistics package set at the database level options, or the latest package if the database option is not set. The statistics package requested by the query has to be exempt from garbage collection. This can be achieved with the following DDL statement: ``` ALTER STATISTICS SET OPTIONS (allow_gc=false) ``` The list of available statistics packages can be queried from `INFORMATION_SCHEMA.SPANNER_STATISTICS`. Executing a SQL statement with an invalid optimizer statistics package or with a statistics package that allows garbage collection fails with an `INVALID_ARGUMENT` error.", +"type": "string" +}, +"optimizerVersion": { +"description": "An option to control the selection of optimizer version. This parameter allows individual queries to pick different query optimizer versions. Specifying `latest` as a value instructs Cloud Spanner to use the latest supported query optimizer version. If not specified, Cloud Spanner uses the optimizer version set at the database level options. Any other positive integer (from the list of supported optimizer versions) overrides the default optimizer version for query execution. The list of supported optimizer versions can be queried from SPANNER_SYS.SUPPORTED_OPTIMIZER_VERSIONS. Executing a SQL statement with an invalid optimizer version fails with an `INVALID_ARGUMENT` error. See https://cloud.google.com/spanner/docs/query-optimizer/manage-query-optimizer for more information on managing the query optimizer. The `optimizer_version` statement hint has precedence over this setting.", +"type": "string" +} +}, +"type": "object" +}, +"QueryPlan": { +"description": "Contains an ordered list of nodes appearing in the query plan.", +"id": "QueryPlan", +"properties": { +"planNodes": { +"description": "The nodes in the query plan. Plan nodes are returned in pre-order starting with the plan root. Each PlanNode's `id` corresponds to its index in `plan_nodes`.", +"items": { +"$ref": "PlanNode" +}, +"type": "array" +}, +"queryAdvice": { +"$ref": "QueryAdvisorResult", +"description": "Optional. The advices/recommendations for a query. Currently this field will be serving index recommendations for a query." +} +}, +"type": "object" +}, +"ReadOnly": { +"description": "Message type to initiate a read-only transaction.", +"id": "ReadOnly", +"properties": { +"exactStaleness": { +"description": "Executes all reads at a timestamp that is `exact_staleness` old. The timestamp is chosen soon after the read is started. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading at nearby replicas without the distributed timestamp negotiation overhead of `max_staleness`.", +"format": "google-duration", +"type": "string" +}, +"maxStaleness": { +"description": "Read data at a timestamp >= `NOW - max_staleness` seconds. Guarantees that all writes that have committed more than the specified number of seconds ago are visible. Because Cloud Spanner chooses the exact timestamp, this mode works even if the client's local clock is substantially skewed from Cloud Spanner commit timestamps. Useful for reading the freshest data available at a nearby replica, while bounding the possible staleness if the local replica has fallen behind. Note that this option can only be used in single-use transactions.", +"format": "google-duration", +"type": "string" +}, +"minReadTimestamp": { +"description": "Executes all reads at a timestamp >= `min_read_timestamp`. This is useful for requesting fresher data than some previous read, or data that is fresh enough to observe the effects of some previously committed transaction whose timestamp is known. Note that this option can only be used in single-use transactions. A timestamp in RFC3339 UTC \\\"Zulu\\\" format, accurate to nanoseconds. Example: `\"2014-10-02T15:01:23.045123456Z\"`.", +"format": "google-datetime", +"type": "string" +}, +"readTimestamp": { +"description": "Executes all reads at the given timestamp. Unlike other modes, reads at a specific timestamp are repeatable; the same read at the same timestamp always returns the same data. If the timestamp is in the future, the read will block until the specified timestamp, modulo the read's deadline. Useful for large scale consistent reads such as mapreduces, or for coordinating many reads against a consistent snapshot of the data. A timestamp in RFC3339 UTC \\\"Zulu\\\" format, accurate to nanoseconds. Example: `\"2014-10-02T15:01:23.045123456Z\"`.", +"format": "google-datetime", +"type": "string" +}, +"returnReadTimestamp": { +"description": "If true, the Cloud Spanner-selected read timestamp is included in the Transaction message that describes the transaction.", +"type": "boolean" +}, +"strong": { +"description": "Read at a timestamp where all previously committed transactions are visible.", +"type": "boolean" +} +}, +"type": "object" +}, +"ReadRequest": { +"description": "The request for Read and StreamingRead.", +"id": "ReadRequest", +"properties": { +"columns": { +"description": "Required. The columns of table to be returned for each row matching this request.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dataBoostEnabled": { +"description": "If this is for a partitioned read and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.", +"type": "boolean" +}, +"directedReadOptions": { +"$ref": "DirectedReadOptions", +"description": "Directed read options for this request." +}, +"index": { +"description": "If non-empty, the name of an index on table. This index is used instead of the table primary key when interpreting key_set and sorting result rows. See key_set for further information.", +"type": "string" +}, +"keySet": { +"$ref": "KeySet", +"description": "Required. `key_set` identifies the rows to be yielded. `key_set` names the primary keys of the rows in table to be yielded, unless index is present. If index is present, then key_set instead names index keys in index. If the partition_token field is empty, rows are yielded in table primary key order (if index is empty) or index key order (if index is non-empty). If the partition_token field is not empty, rows will be yielded in an unspecified order. It is not an error for the `key_set` to name rows that do not exist in the database. Read yields nothing for nonexistent rows." +}, +"limit": { +"description": "If greater than zero, only the first `limit` rows are yielded. If `limit` is zero, the default is no limit. A limit cannot be specified if `partition_token` is set.", +"format": "int64", +"type": "string" +}, +"partitionToken": { +"description": "If present, results will be restricted to the specified partition previously created using PartitionRead(). There must be an exact match for the values of fields common to this message and the PartitionReadRequest message used to create this partition_token.", +"format": "byte", +"type": "string" +}, +"requestOptions": { +"$ref": "RequestOptions", +"description": "Common options for this request." +}, +"resumeToken": { +"description": "If this request is resuming a previously interrupted read, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new read to resume where the last read left off. The rest of the request parameters must exactly match the request that yielded this token.", +"format": "byte", +"type": "string" +}, +"table": { +"description": "Required. The name of the table in the database to be read.", +"type": "string" +}, +"transaction": { +"$ref": "TransactionSelector", +"description": "The transaction to use. If none is provided, the default is a temporary read-only transaction with strong concurrency." +} +}, +"type": "object" +}, +"ReadWrite": { +"description": "Message type to initiate a read-write transaction. Currently this transaction type has no options.", +"id": "ReadWrite", +"properties": { +"readLockMode": { +"description": "Read lock mode for the transaction.", +"enum": [ +"READ_LOCK_MODE_UNSPECIFIED", +"PESSIMISTIC", +"OPTIMISTIC" +], +"enumDescriptions": [ +"Default value. If the value is not specified, the pessimistic read lock is used.", +"Pessimistic lock mode. Read locks are acquired immediately on read.", +"Optimistic lock mode. Locks for reads within the transaction are not acquired on read. Instead the locks are acquired on a commit to validate that read/queried data has not changed since the transaction started." +], +"type": "string" +} +}, +"type": "object" +}, +"ReplicaInfo": { +"id": "ReplicaInfo", +"properties": { +"defaultLeaderLocation": { +"description": "If true, this location is designated as the default leader location where leader replicas are placed. See the [region types documentation](https://cloud.google.com/spanner/docs/instances#region_types) for more details.", +"type": "boolean" +}, +"location": { +"description": "The location of the serving resources, e.g., \"us-central1\".", +"type": "string" +}, +"type": { +"description": "The type of replica.", +"enum": [ +"TYPE_UNSPECIFIED", +"READ_WRITE", +"READ_ONLY", +"WITNESS" +], +"enumDescriptions": [ +"Not specified.", +"Read-write replicas support both reads and writes. These replicas: * Maintain a full copy of your data. * Serve reads. * Can vote whether to commit a write. * Participate in leadership election. * Are eligible to become a leader.", +"Read-only replicas only support reads (not writes). Read-only replicas: * Maintain a full copy of your data. * Serve reads. * Do not participate in voting to commit writes. * Are not eligible to become a leader.", +"Witness replicas don't support reads but do participate in voting to commit writes. Witness replicas: * Do not maintain a full copy of data. * Do not serve reads. * Vote whether to commit writes. * Participate in leader election but are not eligible to become leader." +], +"type": "string" +} +}, +"type": "object" +}, +"ReplicaSelection": { +"description": "The directed read replica selector. Callers must provide one or more of the following fields for replica selection: * `location` - The location must be one of the regions within the multi-region configuration of your database. * `type` - The type of the replica. Some examples of using replica_selectors are: * `location:us-east1` --> The \"us-east1\" replica(s) of any available type will be used to process the request. * `type:READ_ONLY` --> The \"READ_ONLY\" type replica(s) in nearest available location will be used to process the request. * `location:us-east1 type:READ_ONLY` --> The \"READ_ONLY\" type replica(s) in location \"us-east1\" will be used to process the request.", +"id": "ReplicaSelection", +"properties": { +"location": { +"description": "The location or region of the serving requests, e.g. \"us-east1\".", +"type": "string" +}, +"type": { +"description": "The type of replica.", +"enum": [ +"TYPE_UNSPECIFIED", +"READ_WRITE", +"READ_ONLY" +], +"enumDescriptions": [ +"Not specified.", +"Read-write replicas support both reads and writes.", +"Read-only replicas only support reads (not writes)." +], +"type": "string" +} +}, +"type": "object" +}, +"RequestOptions": { +"description": "Common request options for various APIs.", +"id": "RequestOptions", +"properties": { +"priority": { +"description": "Priority for the request.", +"enum": [ +"PRIORITY_UNSPECIFIED", +"PRIORITY_LOW", +"PRIORITY_MEDIUM", +"PRIORITY_HIGH" +], +"enumDescriptions": [ +"`PRIORITY_UNSPECIFIED` is equivalent to `PRIORITY_HIGH`.", +"This specifies that the request is low priority.", +"This specifies that the request is medium priority.", +"This specifies that the request is high priority." +], +"type": "string" +}, +"requestTag": { +"description": "A per-request tag which can be applied to queries or reads, used for statistics collection. Both request_tag and transaction_tag can be specified for a read or query that belongs to a transaction. This field is ignored for requests where it's not applicable (e.g. CommitRequest). Legal characters for `request_tag` values are all printable characters (ASCII 32 - 126) and the length of a request_tag is limited to 50 characters. Values that exceed this limit are truncated. Any leading underscore (_) characters will be removed from the string.", +"type": "string" +}, +"transactionTag": { +"description": "A tag used for statistics collection about this transaction. Both request_tag and transaction_tag can be specified for a read or query that belongs to a transaction. The value of transaction_tag should be the same for all requests belonging to the same transaction. If this request doesn't belong to any transaction, transaction_tag will be ignored. Legal characters for `transaction_tag` values are all printable characters (ASCII 32 - 126) and the length of a transaction_tag is limited to 50 characters. Values that exceed this limit are truncated. Any leading underscore (_) characters will be removed from the string.", +"type": "string" +} +}, +"type": "object" +}, +"RestoreDatabaseEncryptionConfig": { +"description": "Encryption configuration for the restored database.", +"id": "RestoreDatabaseEncryptionConfig", +"properties": { +"encryptionType": { +"description": "Required. The encryption type of the restored database.", +"enum": [ +"ENCRYPTION_TYPE_UNSPECIFIED", +"USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION", +"GOOGLE_DEFAULT_ENCRYPTION", +"CUSTOMER_MANAGED_ENCRYPTION" +], +"enumDescriptions": [ +"Unspecified. Do not use.", +"This is the default option when encryption_config is not specified.", +"Use Google default encryption.", +"Use customer managed encryption. If specified, `kms_key_name` must must contain a valid Cloud KMS key." +], +"type": "string" +}, +"kmsKeyName": { +"description": "Optional. The Cloud KMS key that will be used to encrypt/decrypt the restored database. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.", +"type": "string" +} +}, +"type": "object" +}, +"RestoreDatabaseMetadata": { +"description": "Metadata type for the long-running operation returned by RestoreDatabase.", +"id": "RestoreDatabaseMetadata", +"properties": { +"backupInfo": { +"$ref": "BackupInfo", +"description": "Information about the backup used to restore the database." +}, +"cancelTime": { +"description": "The time at which cancellation of this operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Name of the database being created and restored to.", +"type": "string" +}, +"optimizeDatabaseOperationName": { +"description": "If exists, the name of the long-running operation that will be used to track the post-restore optimization process to optimize the performance of the restored database, and remove the dependency on the restore source. The name is of the form `projects//instances//databases//operations/` where the is the name of database being created and restored to. The metadata type of the long-running operation is OptimizeRestoredDatabaseMetadata. This long-running operation will be automatically created by the system after the RestoreDatabase long-running operation completes successfully. This operation will not be created if the restore was not successful.", +"type": "string" +}, +"progress": { +"$ref": "OperationProgress", +"description": "The progress of the RestoreDatabase operation." +}, +"sourceType": { +"description": "The type of the restore source.", +"enum": [ +"TYPE_UNSPECIFIED", +"BACKUP" +], +"enumDescriptions": [ +"No restore associated.", +"A backup was used as the source of the restore." +], +"type": "string" +} +}, +"type": "object" +}, +"RestoreDatabaseRequest": { +"description": "The request for RestoreDatabase.", +"id": "RestoreDatabaseRequest", +"properties": { +"backup": { +"description": "Name of the backup from which to restore. Values are of the form `projects//instances//backups/`.", +"type": "string" +}, +"databaseId": { +"description": "Required. The id of the database to create and restore to. This database must not already exist. The `database_id` appended to `parent` forms the full database name of the form `projects//instances//databases/`.", +"type": "string" +}, +"encryptionConfig": { +"$ref": "RestoreDatabaseEncryptionConfig", +"description": "Optional. An encryption configuration describing the encryption type and key resources in Cloud KMS used to encrypt/decrypt the database to restore to. If this field is not specified, the restored database will use the same encryption configuration as the backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`." +} +}, +"type": "object" +}, +"RestoreInfo": { +"description": "Information about the database restore.", +"id": "RestoreInfo", +"properties": { +"backupInfo": { +"$ref": "BackupInfo", +"description": "Information about the backup used to restore the database. The backup may no longer exist." +}, +"sourceType": { +"description": "The type of the restore source.", +"enum": [ +"TYPE_UNSPECIFIED", +"BACKUP" +], +"enumDescriptions": [ +"No restore associated.", +"A backup was used as the source of the restore." +], +"type": "string" +} +}, +"type": "object" +}, +"ResultSet": { +"description": "Results from Read or ExecuteSql.", +"id": "ResultSet", +"properties": { +"metadata": { +"$ref": "ResultSetMetadata", +"description": "Metadata about the result set, such as row type information." +}, +"rows": { +"description": "Each element in `rows` is a row whose format is defined by metadata.row_type. The ith element in each row matches the ith field in metadata.row_type. Elements are encoded based on type as described here.", +"items": { +"items": { +"type": "any" +}, +"type": "array" +}, +"type": "array" +}, +"stats": { +"$ref": "ResultSetStats", +"description": "Query plan and execution statistics for the SQL statement that produced this result set. These can be requested by setting ExecuteSqlRequest.query_mode. DML statements always produce stats containing the number of rows modified, unless executed using the ExecuteSqlRequest.QueryMode.PLAN ExecuteSqlRequest.query_mode. Other fields may or may not be populated, based on the ExecuteSqlRequest.query_mode." +} +}, +"type": "object" +}, +"ResultSetMetadata": { +"description": "Metadata about a ResultSet or PartialResultSet.", +"id": "ResultSetMetadata", +"properties": { +"rowType": { +"$ref": "StructType", +"description": "Indicates the field names and types for the rows in the result set. For example, a SQL query like `\"SELECT UserId, UserName FROM Users\"` could return a `row_type` value like: \"fields\": [ { \"name\": \"UserId\", \"type\": { \"code\": \"INT64\" } }, { \"name\": \"UserName\", \"type\": { \"code\": \"STRING\" } }, ]" +}, +"transaction": { +"$ref": "Transaction", +"description": "If the read or SQL query began a transaction as a side-effect, the information about the new transaction is yielded here." +}, +"undeclaredParameters": { +"$ref": "StructType", +"description": "A SQL query can be parameterized. In PLAN mode, these parameters can be undeclared. This indicates the field names and types for those undeclared parameters in the SQL query. For example, a SQL query like `\"SELECT * FROM Users where UserId = @userId and UserName = @userName \"` could return a `undeclared_parameters` value like: \"fields\": [ { \"name\": \"UserId\", \"type\": { \"code\": \"INT64\" } }, { \"name\": \"UserName\", \"type\": { \"code\": \"STRING\" } }, ]" +} +}, +"type": "object" +}, +"ResultSetStats": { +"description": "Additional statistics about a ResultSet or PartialResultSet.", +"id": "ResultSetStats", +"properties": { +"queryPlan": { +"$ref": "QueryPlan", +"description": "QueryPlan for the query associated with this result." +}, +"queryStats": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Aggregated statistics from the execution of the query. Only present when the query is profiled. For example, a query could return the statistics as follows: { \"rows_returned\": \"3\", \"elapsed_time\": \"1.22 secs\", \"cpu_time\": \"1.19 secs\" }", +"type": "object" +}, +"rowCountExact": { +"description": "Standard DML returns an exact count of rows that were modified.", +"format": "int64", +"type": "string" +}, +"rowCountLowerBound": { +"description": "Partitioned DML does not offer exactly-once semantics, so it returns a lower bound of the rows modified.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"RollbackRequest": { +"description": "The request for Rollback.", +"id": "RollbackRequest", +"properties": { +"transactionId": { +"description": "Required. The transaction to roll back.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"Scan": { +"description": "Scan is a structure which describes Cloud Key Visualizer scan information.", +"id": "Scan", +"properties": { +"details": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Additional information provided by the implementer.", +"type": "object" +}, +"endTime": { +"description": "The upper bound for when the scan is defined.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The unique name of the scan, specific to the Database service implementing this interface.", +"type": "string" +}, +"scanData": { +"$ref": "ScanData", +"description": "Output only. Cloud Key Visualizer scan data. Note, this field is not available to the ListScans method.", +"readOnly": true +}, +"startTime": { +"description": "A range of time (inclusive) for when the scan is defined. The lower bound for when the scan is defined.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ScanData": { +"description": "ScanData contains Cloud Key Visualizer scan data used by the caller to construct a visualization.", +"id": "ScanData", +"properties": { +"data": { +"$ref": "VisualizationData", +"description": "Cloud Key Visualizer scan data. The range of time this information covers is captured via the above time range fields. Note, this field is not available to the ListScans method." +}, +"endTime": { +"description": "The upper bound for when the contained data is defined.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "A range of time (inclusive) for when the contained data is defined. The lower bound for when the contained data is defined.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Session": { +"description": "A session in the Cloud Spanner API.", +"id": "Session", +"properties": { +"approximateLastUseTime": { +"description": "Output only. The approximate timestamp when the session is last used. It is typically earlier than the actual last use time.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp when the session is created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"creatorRole": { +"description": "The database role which created this session.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels for the session. * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. * No more than 64 labels can be associated with a given session. See https://goo.gl/xmQnxf for more information on and examples of labels.", +"type": "object" +}, +"multiplexed": { +"description": "Optional. If true, specifies a multiplexed session. A multiplexed session may be used for multiple, concurrent read-only operations but can not be used for read-write transactions, partitioned reads, or partitioned queries. Multiplexed sessions can be created via CreateSession but not via BatchCreateSessions. Multiplexed sessions may not be deleted nor listed.", +"type": "boolean" +}, +"name": { +"description": "Output only. The name of the session. This is always system-assigned.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +} +}, +"type": "object" +}, +"ShortRepresentation": { +"description": "Condensed representation of a node and its subtree. Only present for `SCALAR` PlanNode(s).", +"id": "ShortRepresentation", +"properties": { +"description": { +"description": "A string representation of the expression subtree rooted at this node.", +"type": "string" +}, +"subqueries": { +"additionalProperties": { +"format": "int32", +"type": "integer" +}, +"description": "A mapping of (subquery variable name) -> (subquery node id) for cases where the `description` string of this node references a `SCALAR` subquery contained in the expression subtree rooted at this node. The referenced `SCALAR` subquery may not necessarily be a direct child of this node.", +"type": "object" +} +}, +"type": "object" +}, +"Statement": { +"description": "A single DML statement.", +"id": "Statement", +"properties": { +"paramTypes": { +"additionalProperties": { +"$ref": "Type" +}, +"description": "It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in params as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of Type for more information about SQL types.", +"type": "object" +}, +"params": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Parameter names and values that bind to placeholders in the DML string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names can contain letters, numbers, and underscores. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `\"WHERE id > @msg_id AND id < @msg_id + 100\"` It is an error to execute a SQL statement with unbound parameters.", +"type": "object" +}, +"sql": { +"description": "Required. The DML string.", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StructType": { +"description": "`StructType` defines the fields of a STRUCT type.", +"id": "StructType", +"properties": { +"fields": { +"description": "The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query.", +"items": { +"$ref": "Field" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "REQUIRED: The set of permissions to check for 'resource'. Permissions with wildcards (such as '*', 'spanner.*', 'spanner.instances.*') are not allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Transaction": { +"description": "A transaction.", +"id": "Transaction", +"properties": { +"id": { +"description": "`id` may be used to identify the transaction in subsequent Read, ExecuteSql, Commit, or Rollback calls. Single-use read-only transactions do not have IDs, because single-use transactions do not support multiple requests.", +"format": "byte", +"type": "string" +}, +"readTimestamp": { +"description": "For snapshot read-only transactions, the read timestamp chosen for the transaction. Not returned by default: see TransactionOptions.ReadOnly.return_read_timestamp. A timestamp in RFC3339 UTC \\\"Zulu\\\" format, accurate to nanoseconds. Example: `\"2014-10-02T15:01:23.045123456Z\"`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"TransactionOptions": { +"description": "Transactions: Each session can have at most one active transaction at a time (note that standalone reads and queries use a transaction internally and do count towards the one transaction limit). After the active transaction is completed, the session can immediately be re-used for the next transaction. It is not necessary to create a new session for each transaction. Transaction modes: Cloud Spanner supports three transaction modes: 1. Locking read-write. This type of transaction is the only way to write data into Cloud Spanner. These transactions rely on pessimistic locking and, if necessary, two-phase commit. Locking read-write transactions may abort, requiring the application to retry. 2. Snapshot read-only. Snapshot read-only transactions provide guaranteed consistency across several reads, but do not allow writes. Snapshot read-only transactions can be configured to read at timestamps in the past, or configured to perform a strong read (where Spanner will select a timestamp such that the read is guaranteed to see the effects of all transactions that have committed before the start of the read). Snapshot read-only transactions do not need to be committed. Queries on change streams must be performed with the snapshot read-only transaction mode, specifying a strong read. Please see TransactionOptions.ReadOnly.strong for more details. 3. Partitioned DML. This type of transaction is used to execute a single Partitioned DML statement. Partitioned DML partitions the key space and runs the DML statement over each partition in parallel using separate, internal transactions that commit independently. Partitioned DML transactions do not need to be committed. For transactions that only read, snapshot read-only transactions provide simpler semantics and are almost always faster. In particular, read-only transactions do not take locks, so they do not conflict with read-write transactions. As a consequence of not taking locks, they also do not abort, so retry loops are not needed. Transactions may only read-write data in a single database. They may, however, read-write data in different tables within that database. Locking read-write transactions: Locking transactions may be used to atomically read-modify-write data anywhere in a database. This type of transaction is externally consistent. Clients should attempt to minimize the amount of time a transaction is active. Faster transactions commit with higher probability and cause less contention. Cloud Spanner attempts to keep read locks active as long as the transaction continues to do reads, and the transaction has not been terminated by Commit or Rollback. Long periods of inactivity at the client may cause Cloud Spanner to release a transaction's locks and abort it. Conceptually, a read-write transaction consists of zero or more reads or SQL statements followed by Commit. At any time before Commit, the client can send a Rollback request to abort the transaction. Semantics: Cloud Spanner can commit the transaction if all read locks it acquired are still valid at commit time, and it is able to acquire write locks for all writes. Cloud Spanner can abort the transaction for any reason. If a commit attempt returns `ABORTED`, Cloud Spanner guarantees that the transaction has not modified any user data in Cloud Spanner. Unless the transaction commits, Cloud Spanner makes no guarantees about how long the transaction's locks were held for. It is an error to use Cloud Spanner locks for any sort of mutual exclusion other than between Cloud Spanner transactions themselves. Retrying aborted transactions: When a transaction aborts, the application can choose to retry the whole transaction again. To maximize the chances of successfully committing the retry, the client should execute the retry in the same session as the original attempt. The original session's lock priority increases with each consecutive abort, meaning that each attempt has a slightly better chance of success than the previous. Under some circumstances (for example, many transactions attempting to modify the same row(s)), a transaction can abort many times in a short period before successfully committing. Thus, it is not a good idea to cap the number of retries a transaction can attempt; instead, it is better to limit the total amount of time spent retrying. Idle transactions: A transaction is considered idle if it has no outstanding reads or SQL queries and has not started a read or SQL query within the last 10 seconds. Idle transactions can be aborted by Cloud Spanner so that they don't hold on to locks indefinitely. If an idle transaction is aborted, the commit will fail with error `ABORTED`. If this behavior is undesirable, periodically executing a simple SQL query in the transaction (for example, `SELECT 1`) prevents the transaction from becoming idle. Snapshot read-only transactions: Snapshot read-only transactions provides a simpler method than locking read-write transactions for doing several consistent reads. However, this type of transaction does not support writes. Snapshot transactions do not take locks. Instead, they work by choosing a Cloud Spanner timestamp, then executing all reads at that timestamp. Since they do not acquire locks, they do not block concurrent read-write transactions. Unlike locking read-write transactions, snapshot read-only transactions never abort. They can fail if the chosen read timestamp is garbage collected; however, the default garbage collection policy is generous enough that most applications do not need to worry about this in practice. Snapshot read-only transactions do not need to call Commit or Rollback (and in fact are not permitted to do so). To execute a snapshot transaction, the client specifies a timestamp bound, which tells Cloud Spanner how to choose a read timestamp. The types of timestamp bound are: - Strong (the default). - Bounded staleness. - Exact staleness. If the Cloud Spanner database to be read is geographically distributed, stale read-only transactions can execute more quickly than strong or read-write transactions, because they are able to execute far from the leader replica. Each type of timestamp bound is discussed in detail below. Strong: Strong reads are guaranteed to see the effects of all transactions that have committed before the start of the read. Furthermore, all rows yielded by a single read are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Strong reads are not repeatable: two consecutive strong read-only transactions might return inconsistent results if there are concurrent writes. If consistency across reads is required, the reads should be executed within a transaction or at an exact read timestamp. Queries on change streams (see below for more details) must also specify the strong read timestamp bound. See TransactionOptions.ReadOnly.strong. Exact staleness: These timestamp bounds execute reads at a user-specified timestamp. Reads at a timestamp are guaranteed to see a consistent prefix of the global transaction history: they observe modifications done by all transactions with a commit timestamp less than or equal to the read timestamp, and observe none of the modifications done by transactions with a larger commit timestamp. They will block until all conflicting transactions that may be assigned commit timestamps <= the read timestamp have finished. The timestamp can either be expressed as an absolute Cloud Spanner commit timestamp or a staleness relative to the current time. These modes do not require a \"negotiation phase\" to pick a timestamp. As a result, they execute slightly faster than the equivalent boundedly stale concurrency modes. On the other hand, boundedly stale reads usually return fresher results. See TransactionOptions.ReadOnly.read_timestamp and TransactionOptions.ReadOnly.exact_staleness. Bounded staleness: Bounded staleness modes allow Cloud Spanner to pick the read timestamp, subject to a user-provided staleness bound. Cloud Spanner chooses the newest timestamp within the staleness bound that allows execution of the reads at the closest available replica without blocking. All rows yielded are consistent with each other -- if any part of the read observes a transaction, all parts of the read see the transaction. Boundedly stale reads are not repeatable: two stale reads, even if they use the same staleness bound, can execute at different timestamps and thus return inconsistent results. Boundedly stale reads execute in two phases: the first phase negotiates a timestamp among all replicas needed to serve the read. In the second phase, reads are executed at the negotiated timestamp. As a result of the two phase execution, bounded staleness reads are usually a little slower than comparable exact staleness reads. However, they are typically able to return fresher results, and are more likely to execute at the closest replica. Because the timestamp negotiation requires up-front knowledge of which rows will be read, it can only be used with single-use read-only transactions. See TransactionOptions.ReadOnly.max_staleness and TransactionOptions.ReadOnly.min_read_timestamp. Old read timestamps and garbage collection: Cloud Spanner continuously garbage collects deleted and overwritten data in the background to reclaim storage space. This process is known as \"version GC\". By default, version GC reclaims versions after they are one hour old. Because of this, Cloud Spanner cannot perform reads at read timestamps more than one hour in the past. This restriction also applies to in-progress reads and/or SQL queries whose timestamp become too old while executing. Reads and SQL queries with too-old read timestamps fail with the error `FAILED_PRECONDITION`. You can configure and extend the `VERSION_RETENTION_PERIOD` of a database up to a period as long as one week, which allows Cloud Spanner to perform reads up to one week in the past. Querying change Streams: A Change Stream is a schema object that can be configured to watch data changes on the entire database, a set of tables, or a set of columns in a database. When a change stream is created, Spanner automatically defines a corresponding SQL Table-Valued Function (TVF) that can be used to query the change records in the associated change stream using the ExecuteStreamingSql API. The name of the TVF for a change stream is generated from the name of the change stream: READ_. All queries on change stream TVFs must be executed using the ExecuteStreamingSql API with a single-use read-only transaction with a strong read-only timestamp_bound. The change stream TVF allows users to specify the start_timestamp and end_timestamp for the time range of interest. All change records within the retention period is accessible using the strong read-only timestamp_bound. All other TransactionOptions are invalid for change stream queries. In addition, if TransactionOptions.read_only.return_read_timestamp is set to true, a special value of 2^63 - 2 will be returned in the Transaction message that describes the transaction, instead of a valid read timestamp. This special value should be discarded and not used for any subsequent queries. Please see https://cloud.google.com/spanner/docs/change-streams for more details on how to query the change stream TVFs. Partitioned DML transactions: Partitioned DML transactions are used to execute DML statements with a different execution strategy that provides different, and often better, scalability properties for large, table-wide operations than DML in a ReadWrite transaction. Smaller scoped statements, such as an OLTP workload, should prefer using ReadWrite transactions. Partitioned DML partitions the keyspace and runs the DML statement on each partition in separate, internal transactions. These transactions commit automatically when complete, and run independently from one another. To reduce lock contention, this execution strategy only acquires read locks on rows that match the WHERE clause of the statement. Additionally, the smaller per-partition transactions hold locks for less time. That said, Partitioned DML is not a drop-in replacement for standard DML used in ReadWrite transactions. - The DML statement must be fully-partitionable. Specifically, the statement must be expressible as the union of many statements which each access only a single row of the table. - The statement is not applied atomically to all rows of the table. Rather, the statement is applied atomically to partitions of the table, in independent transactions. Secondary index rows are updated atomically with the base table rows. - Partitioned DML does not guarantee exactly-once execution semantics against a partition. The statement will be applied at least once to each partition. It is strongly recommended that the DML statement should be idempotent to avoid unexpected results. For instance, it is potentially dangerous to run a statement such as `UPDATE table SET column = column + 1` as it could be run multiple times against some rows. - The partitions are committed automatically - there is no support for Commit or Rollback. If the call returns an error, or if the client issuing the ExecuteSql call dies, it is possible that some rows had the statement executed on them successfully. It is also possible that statement was never executed against other rows. - Partitioned DML transactions may only contain the execution of a single DML statement via ExecuteSql or ExecuteStreamingSql. - If any error is encountered during the execution of the partitioned DML operation (for instance, a UNIQUE INDEX violation, division by zero, or a value that cannot be stored due to schema constraints), then the operation is stopped at that point and an error is returned. It is possible that at this point, some partitions have been committed (or even committed multiple times), and other partitions have not been run at all. Given the above, Partitioned DML is good fit for large, database-wide, operations that are idempotent, such as deleting old rows from a very large table.", +"id": "TransactionOptions", +"properties": { +"excludeTxnFromChangeStreams": { +"description": "When `exclude_txn_from_change_streams` is set to `true`: * Modifications from this transaction will not be recorded in change streams with DDL option `allow_txn_exclusion=true` that are tracking columns modified by these transactions. * Modifications from this transaction will be recorded in change streams with DDL option `allow_txn_exclusion=false or not set` that are tracking columns modified by these transactions. When `exclude_txn_from_change_streams` is set to `false` or not set, Modifications from this transaction will be recorded in all change streams that are tracking columns modified by these transactions. `exclude_txn_from_change_streams` may only be specified for read-write or partitioned-dml transactions, otherwise the API will return an `INVALID_ARGUMENT` error.", +"type": "boolean" +}, +"partitionedDml": { +"$ref": "PartitionedDml", +"description": "Partitioned DML transaction. Authorization to begin a Partitioned DML transaction requires `spanner.databases.beginPartitionedDmlTransaction` permission on the `session` resource." +}, +"readOnly": { +"$ref": "ReadOnly", +"description": "Transaction will not write. Authorization to begin a read-only transaction requires `spanner.databases.beginReadOnlyTransaction` permission on the `session` resource." +}, +"readWrite": { +"$ref": "ReadWrite", +"description": "Transaction may write. Authorization to begin a read-write transaction requires `spanner.databases.beginOrRollbackReadWriteTransaction` permission on the `session` resource." +} +}, +"type": "object" +}, +"TransactionSelector": { +"description": "This message is used to select the transaction in which a Read or ExecuteSql call runs. See TransactionOptions for more information about transactions.", +"id": "TransactionSelector", +"properties": { +"begin": { +"$ref": "TransactionOptions", +"description": "Begin a new transaction and execute this read or SQL query in it. The transaction ID of the new transaction is returned in ResultSetMetadata.transaction, which is a Transaction." +}, +"id": { +"description": "Execute the read or SQL query in a previously-started transaction.", +"format": "byte", +"type": "string" +}, +"singleUse": { +"$ref": "TransactionOptions", +"description": "Execute the read or SQL query in a temporary transaction. This is the most efficient way to execute a transaction that consists of a single SQL query." +} +}, +"type": "object" +}, +"Type": { +"description": "`Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query.", +"id": "Type", +"properties": { +"arrayElementType": { +"$ref": "Type", +"description": "If code == ARRAY, then `array_element_type` is the type of the array elements." +}, +"code": { +"description": "Required. The TypeCode for this type.", +"enum": [ +"TYPE_CODE_UNSPECIFIED", +"BOOL", +"INT64", +"FLOAT64", +"FLOAT32", +"TIMESTAMP", +"DATE", +"STRING", +"BYTES", +"ARRAY", +"STRUCT", +"NUMERIC", +"JSON", +"PROTO", +"ENUM" +], +"enumDescriptions": [ +"Not specified.", +"Encoded as JSON `true` or `false`.", +"Encoded as `string`, in decimal format.", +"Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or `\"-Infinity\"`.", +"Encoded as `number`, or the strings `\"NaN\"`, `\"Infinity\"`, or `\"-Infinity\"`.", +"Encoded as `string` in RFC 3339 timestamp format. The time zone must be present, and must be `\"Z\"`. If the schema has the column option `allow_commit_timestamp=true`, the placeholder string `\"spanner.commit_timestamp()\"` can be used to instruct the system to insert the commit timestamp associated with the transaction commit.", +"Encoded as `string` in RFC 3339 date format.", +"Encoded as `string`.", +"Encoded as a base64-encoded `string`, as described in RFC 4648, section 4.", +"Encoded as `list`, where the list elements are represented according to array_element_type.", +"Encoded as `list`, where list element `i` is represented according to [struct_type.fields[i]][google.spanner.v1.StructType.fields].", +"Encoded as `string`, in decimal format or scientific notation format. Decimal format: `[+-]Digits[.[Digits]]` or `+-.Digits` Scientific notation: `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or `+-.Digits[ExponentIndicator[+-]Digits]` (ExponentIndicator is `\"e\"` or `\"E\"`)", +"Encoded as a JSON-formatted `string` as described in RFC 7159. The following rules are applied when parsing JSON input: - Whitespace characters are not preserved. - If a JSON object has duplicate keys, only the first key is preserved. - Members of a JSON object are not guaranteed to have their order preserved. - JSON array elements will have their order preserved.", +"Encoded as a base64-encoded `string`, as described in RFC 4648, section 4.", +"Encoded as `string`, in decimal format." +], +"type": "string" +}, +"protoTypeFqn": { +"description": "If code == PROTO or code == ENUM, then `proto_type_fqn` is the fully qualified name of the proto type representing the proto/enum definition.", +"type": "string" +}, +"structType": { +"$ref": "StructType", +"description": "If code == STRUCT, then `struct_type` provides type information for the struct's fields." +}, +"typeAnnotation": { +"description": "The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path.", +"enum": [ +"TYPE_ANNOTATION_CODE_UNSPECIFIED", +"PG_NUMERIC", +"PG_JSONB" +], +"enumDescriptions": [ +"Not specified.", +"PostgreSQL compatible NUMERIC type. This annotation needs to be applied to Type instances having NUMERIC type code to specify that values of this type should be treated as PostgreSQL NUMERIC values. Currently this annotation is always needed for NUMERIC when a client interacts with PostgreSQL-enabled Spanner databases.", +"PostgreSQL compatible JSONB type. This annotation needs to be applied to Type instances having JSON type code to specify that values of this type should be treated as PostgreSQL JSONB values. Currently this annotation is always needed for JSON when a client interacts with PostgreSQL-enabled Spanner databases." +], +"type": "string" +} +}, +"type": "object" +}, +"UpdateDatabaseDdlMetadata": { +"description": "Metadata type for the operation returned by UpdateDatabaseDdl.", +"id": "UpdateDatabaseDdlMetadata", +"properties": { +"actions": { +"description": "The brief action info for the DDL statements. `actions[i]` is the brief info for `statements[i]`.", +"items": { +"$ref": "DdlStatementActionInfo" +}, +"type": "array" +}, +"commitTimestamps": { +"description": "Reports the commit timestamps of all statements that have succeeded so far, where `commit_timestamps[i]` is the commit timestamp for the statement `statements[i]`.", +"items": { +"format": "google-datetime", +"type": "string" +}, +"type": "array" +}, +"database": { +"description": "The database being modified.", +"type": "string" +}, +"progress": { +"description": "The progress of the UpdateDatabaseDdl operations. All DDL statements will have continuously updating progress, and `progress[i]` is the operation progress for `statements[i]`. Also, `progress[i]` will have start time and end time populated with commit timestamp of operation, as well as a progress of 100% once the operation has completed.", +"items": { +"$ref": "OperationProgress" +}, +"type": "array" +}, +"statements": { +"description": "For an update this list contains all the statements. For an individual statement, this list contains only that statement.", +"items": { +"type": "string" +}, +"type": "array" +}, +"throttled": { +"description": "Output only. When true, indicates that the operation is throttled e.g. due to resource constraints. When resources become available the operation will resume and this field will be false again.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"UpdateDatabaseDdlRequest": { +"description": "Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to the database schema at some point (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a `NULL` value in a column to which `NOT NULL` would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled. Each batch of statements is assigned a name which can be used with the Operations API to monitor progress. See the operation_id field for more details.", +"id": "UpdateDatabaseDdlRequest", +"properties": { +"operationId": { +"description": "If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting Operation. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the UpdateDatabaseDdl call is replayed, or the return value is otherwise lost: the database and `operation_id` fields can be combined to form the name of the resulting longrunning.Operation: `/operations/`. `operation_id` should be unique within the database, and must be a valid identifier: `a-z*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, UpdateDatabaseDdl returns `ALREADY_EXISTS`.", +"type": "string" +}, +"protoDescriptors": { +"description": "Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) and run `protoc` with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run ``` $protoc --proto_path=/app_path --proto_path=/lib_path \\ --include_imports \\ --descriptor_set_out=descriptors.data \\ moon/shot/app.proto ``` For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).", +"format": "byte", +"type": "string" +}, +"statements": { +"description": "Required. DDL statements to be applied to the database.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UpdateDatabaseMetadata": { +"description": "Metadata type for the operation returned by UpdateDatabase.", +"id": "UpdateDatabaseMetadata", +"properties": { +"cancelTime": { +"description": "The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is best-effort).", +"format": "google-datetime", +"type": "string" +}, +"progress": { +"$ref": "OperationProgress", +"description": "The progress of the UpdateDatabase operation." +}, +"request": { +"$ref": "UpdateDatabaseRequest", +"description": "The request for UpdateDatabase." +} +}, +"type": "object" +}, +"UpdateDatabaseRequest": { +"description": "The request for UpdateDatabase.", +"id": "UpdateDatabaseRequest", +"properties": { +"database": { +"$ref": "Database", +"description": "Required. The database to update. The `name` field of the database is of the form `projects//instances//databases/`." +}, +"updateMask": { +"description": "Required. The list of fields to update. Currently, only `enable_drop_protection` field can be updated.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UpdateInstanceConfigMetadata": { +"description": "Metadata type for the operation returned by UpdateInstanceConfig.", +"id": "UpdateInstanceConfigMetadata", +"properties": { +"cancelTime": { +"description": "The time at which this operation was cancelled.", +"format": "google-datetime", +"type": "string" +}, +"instanceConfig": { +"$ref": "InstanceConfig", +"description": "The desired instance config after updating." +}, +"progress": { +"$ref": "InstanceOperationProgress", +"description": "The progress of the UpdateInstanceConfig operation." +} +}, +"type": "object" +}, +"UpdateInstanceConfigRequest": { +"description": "The request for UpdateInstanceConfigRequest.", +"id": "UpdateInstanceConfigRequest", +"properties": { +"instanceConfig": { +"$ref": "InstanceConfig", +"description": "Required. The user instance config to update, which must always include the instance config name. Otherwise, only fields mentioned in update_mask need be included. To prevent conflicts of concurrent updates, etag can be used." +}, +"updateMask": { +"description": "Required. A mask specifying which fields in InstanceConfig should be updated. The field mask must always be specified; this prevents any future fields in InstanceConfig from being erased accidentally by clients that do not know about them. Only display_name and labels can be updated.", +"format": "google-fieldmask", +"type": "string" +}, +"validateOnly": { +"description": "An option to validate, but not actually execute, a request, and provide the same response.", +"type": "boolean" +} +}, +"type": "object" +}, +"UpdateInstanceMetadata": { +"description": "Metadata type for the operation returned by UpdateInstance.", +"id": "UpdateInstanceMetadata", +"properties": { +"cancelTime": { +"description": "The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time at which this operation failed or was completed successfully.", +"format": "google-datetime", +"type": "string" +}, +"expectedFulfillmentPeriod": { +"description": "The expected fulfillment period of this update operation.", +"enum": [ +"FULFILLMENT_PERIOD_UNSPECIFIED", +"FULFILLMENT_PERIOD_NORMAL", +"FULFILLMENT_PERIOD_EXTENDED" +], +"enumDescriptions": [ +"Not specified.", +"Normal fulfillment period. The operation is expected to complete within minutes.", +"Extended fulfillment period. It can take up to an hour for the operation to complete." +], +"type": "string" +}, +"instance": { +"$ref": "Instance", +"description": "The desired end state of the update." +}, +"startTime": { +"description": "The time at which UpdateInstance request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"UpdateInstancePartitionMetadata": { +"description": "Metadata type for the operation returned by UpdateInstancePartition.", +"id": "UpdateInstancePartitionMetadata", +"properties": { +"cancelTime": { +"description": "The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time at which this operation failed or was completed successfully.", +"format": "google-datetime", +"type": "string" +}, +"instancePartition": { +"$ref": "InstancePartition", +"description": "The desired end state of the update." +}, +"startTime": { +"description": "The time at which UpdateInstancePartition request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"UpdateInstancePartitionRequest": { +"description": "The request for UpdateInstancePartition.", +"id": "UpdateInstancePartitionRequest", +"properties": { +"fieldMask": { +"description": "Required. A mask specifying which fields in InstancePartition should be updated. The field mask must always be specified; this prevents any future fields in InstancePartition from being erased accidentally by clients that do not know about them.", +"format": "google-fieldmask", +"type": "string" +}, +"instancePartition": { +"$ref": "InstancePartition", +"description": "Required. The instance partition to update, which must always include the instance partition name. Otherwise, only fields mentioned in field_mask need be included." +} +}, +"type": "object" +}, +"UpdateInstanceRequest": { +"description": "The request for UpdateInstance.", +"id": "UpdateInstanceRequest", +"properties": { +"fieldMask": { +"description": "Required. A mask specifying which fields in Instance should be updated. The field mask must always be specified; this prevents any future fields in Instance from being erased accidentally by clients that do not know about them.", +"format": "google-fieldmask", +"type": "string" +}, +"instance": { +"$ref": "Instance", +"description": "Required. The instance to update, which must always include the instance name. Otherwise, only fields mentioned in field_mask need be included." +} +}, +"type": "object" +}, +"VisualizationData": { +"id": "VisualizationData", +"properties": { +"dataSourceEndToken": { +"description": "The token signifying the end of a data_source.", +"type": "string" +}, +"dataSourceSeparatorToken": { +"description": "The token delimiting a datasource name from the rest of a key in a data_source.", +"type": "string" +}, +"diagnosticMessages": { +"description": "The list of messages (info, alerts, ...)", +"items": { +"$ref": "DiagnosticMessage" +}, +"type": "array" +}, +"endKeyStrings": { +"description": "We discretize the entire keyspace into buckets. Assuming each bucket has an inclusive keyrange and covers keys from k(i) ... k(n). In this case k(n) would be an end key for a given range. end_key_string is the collection of all such end keys", +"items": { +"type": "string" +}, +"type": "array" +}, +"hasPii": { +"description": "Whether this scan contains PII.", +"type": "boolean" +}, +"indexedKeys": { +"description": "Keys of key ranges that contribute significantly to a given metric Can be thought of as heavy hitters.", +"items": { +"type": "string" +}, +"type": "array" +}, +"keySeparator": { +"description": "The token delimiting the key prefixes.", +"type": "string" +}, +"keyUnit": { +"description": "The unit for the key: e.g. 'key' or 'chunk'.", +"enum": [ +"KEY_UNIT_UNSPECIFIED", +"KEY", +"CHUNK" +], +"enumDescriptions": [ +"Required default value", +"Each entry corresponds to one key", +"Each entry corresponds to a chunk of keys" +], +"type": "string" +}, +"metrics": { +"description": "The list of data objects for each metric.", +"items": { +"$ref": "Metric" +}, +"type": "array" +}, +"prefixNodes": { +"description": "The list of extracted key prefix nodes used in the key prefix hierarchy.", +"items": { +"$ref": "PrefixNode" +}, +"type": "array" +} +}, +"type": "object" +}, +"Write": { +"description": "Arguments to insert, update, insert_or_update, and replace operations.", +"id": "Write", +"properties": { +"columns": { +"description": "The names of the columns in table to be written. The list of columns must contain enough columns to allow Cloud Spanner to derive values for all primary key columns in the row(s) to be modified.", +"items": { +"type": "string" +}, +"type": "array" +}, +"table": { +"description": "Required. The table whose rows will be written.", +"type": "string" +}, +"values": { +"description": "The values to be written. `values` can contain more than one list of values. If it does, then multiple rows are written, one for each entry in `values`. Each list in `values` must have exactly as many entries as there are entries in columns above. Sending multiple lists is equivalent to sending multiple `Mutation`s, each containing one `values` entry and repeating table and columns. Individual values in each list are encoded as described here.", +"items": { +"items": { +"type": "any" +}, +"type": "array" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Spanner API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..be53d0809ada108f1c6b37242e2678a4a7f84767 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v1.json @@ -0,0 +1,1498 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://speech.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Speech", +"description": "Converts audio to text by applying powerful neural network models.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/speech-to-text/docs/quickstart-protocol", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "speech:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://speech.mtls.googleapis.com/", +"name": "speech", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "speech.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/operations/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "speech.operations.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"projects": { +"resources": { +"locations": { +"resources": { +"customClasses": { +"methods": { +"create": { +"description": "Create a custom class.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses", +"httpMethod": "POST", +"id": "speech.projects.locations.customClasses.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this custom class will be created. Format: `projects/{project}/locations/{location}/customClasses` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customClasses", +"request": { +"$ref": "CreateCustomClassRequest" +}, +"response": { +"$ref": "CustomClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a custom class.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}", +"httpMethod": "DELETE", +"id": "speech.projects.locations.customClasses.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the custom class to delete. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get a custom class.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}", +"httpMethod": "GET", +"id": "speech.projects.locations.customClasses.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the custom class to retrieve. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CustomClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List custom classes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses", +"httpMethod": "GET", +"id": "speech.projects.locations.customClasses.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of custom classes to return. The service may return fewer than this value. If unspecified, at most 50 custom classes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListCustomClass` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomClass` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of custom classes. Format: `projects/{project}/locations/{location}/customClasses` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/customClasses", +"response": { +"$ref": "ListCustomClassesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a custom class.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}", +"httpMethod": "PATCH", +"id": "speech.projects.locations.customClasses.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the custom class.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "CustomClass" +}, +"response": { +"$ref": "CustomClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"phraseSets": { +"methods": { +"create": { +"description": "Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets", +"httpMethod": "POST", +"id": "speech.projects.locations.phraseSets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this phrase set will be created. Format: `projects/{project}/locations/{location}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/phraseSets", +"request": { +"$ref": "CreatePhraseSetRequest" +}, +"response": { +"$ref": "PhraseSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a phrase set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}", +"httpMethod": "DELETE", +"id": "speech.projects.locations.phraseSets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the phrase set to delete. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get a phrase set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}", +"httpMethod": "GET", +"id": "speech.projects.locations.phraseSets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the phrase set to retrieve. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PhraseSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List phrase sets.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets", +"httpMethod": "GET", +"id": "speech.projects.locations.phraseSets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of phrase sets to return. The service may return fewer than this value. If unspecified, at most 50 phrase sets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListPhraseSet` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPhraseSet` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of phrase set. Format: `projects/{project}/locations/{location}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/phraseSets", +"response": { +"$ref": "ListPhraseSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a phrase set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}", +"httpMethod": "PATCH", +"id": "speech.projects.locations.phraseSets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the phrase set.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "PhraseSet" +}, +"response": { +"$ref": "PhraseSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"speech": { +"methods": { +"longrunningrecognize": { +"description": "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. For more information on asynchronous speech recognition, see the [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).", +"flatPath": "v1/speech:longrunningrecognize", +"httpMethod": "POST", +"id": "speech.speech.longrunningrecognize", +"parameterOrder": [], +"parameters": {}, +"path": "v1/speech:longrunningrecognize", +"request": { +"$ref": "LongRunningRecognizeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"recognize": { +"description": "Performs synchronous speech recognition: receive results after all audio has been sent and processed.", +"flatPath": "v1/speech:recognize", +"httpMethod": "POST", +"id": "speech.speech.recognize", +"parameterOrder": [], +"parameters": {}, +"path": "v1/speech:recognize", +"request": { +"$ref": "RecognizeRequest" +}, +"response": { +"$ref": "RecognizeResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240405", +"rootUrl": "https://speech.googleapis.com/", +"schemas": { +"ABNFGrammar": { +"id": "ABNFGrammar", +"properties": { +"abnfStrings": { +"description": "All declarations and rules of an ABNF grammar broken up into multiple strings that will end up concatenated.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClassItem": { +"description": "An item of the class.", +"id": "ClassItem", +"properties": { +"value": { +"description": "The class item's value.", +"type": "string" +} +}, +"type": "object" +}, +"CreateCustomClassRequest": { +"description": "Message sent by the client for the `CreateCustomClass` method.", +"id": "CreateCustomClassRequest", +"properties": { +"customClass": { +"$ref": "CustomClass", +"description": "Required. The custom class to create." +}, +"customClassId": { +"description": "Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", +"type": "string" +} +}, +"type": "object" +}, +"CreatePhraseSetRequest": { +"description": "Message sent by the client for the `CreatePhraseSet` method.", +"id": "CreatePhraseSetRequest", +"properties": { +"phraseSet": { +"$ref": "PhraseSet", +"description": "Required. The phrase set to create." +}, +"phraseSetId": { +"description": "Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", +"type": "string" +} +}, +"type": "object" +}, +"CustomClass": { +"description": "A set of words or phrases that represents a common concept likely to appear in your audio, for example a list of passenger ship names. CustomClass items can be substituted into placeholders that you set in PhraseSet phrases.", +"id": "CustomClass", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. This field is not used.", +"readOnly": true, +"type": "object" +}, +"customClassId": { +"description": "If this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive.", +"type": "string" +}, +"deleteTime": { +"description": "Output only. The time at which this resource was requested for deletion. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Output only. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. This field is not used.", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. This field is not used.", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. The time at which this resource will be purged. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"items": { +"description": "A collection of class items.", +"items": { +"$ref": "ClassItem" +}, +"type": "array" +}, +"kmsKeyName": { +"description": "Output only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the content of the ClassItem is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.", +"readOnly": true, +"type": "string" +}, +"kmsKeyVersionName": { +"description": "Output only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which content of the ClassItem is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The resource name of the custom class.", +"type": "string" +}, +"reconciling": { +"description": "Output only. Whether or not this CustomClass is in the process of being updated. This field is not used.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. The CustomClass lifecycle state. This field is not used.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"DELETED" +], +"enumDescriptions": [ +"Unspecified state. This is only used/useful for distinguishing unset values.", +"The normal and active state.", +"This CustomClass has been deleted." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-assigned unique identifier for the CustomClass. This field is not used.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Entry": { +"description": "A single replacement configuration.", +"id": "Entry", +"properties": { +"caseSensitive": { +"description": "Whether the search is case sensitive.", +"type": "boolean" +}, +"replace": { +"description": "What to replace with. Max length is 100 characters.", +"type": "string" +}, +"search": { +"description": "What to replace. Max length is 100 characters.", +"type": "string" +} +}, +"type": "object" +}, +"ListCustomClassesResponse": { +"description": "Message returned to the client by the `ListCustomClasses` method.", +"id": "ListCustomClassesResponse", +"properties": { +"customClasses": { +"description": "The custom classes.", +"items": { +"$ref": "CustomClass" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPhraseSetResponse": { +"description": "Message returned to the client by the `ListPhraseSet` method.", +"id": "ListPhraseSetResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"phraseSets": { +"description": "The phrase set.", +"items": { +"$ref": "PhraseSet" +}, +"type": "array" +} +}, +"type": "object" +}, +"LongRunningRecognizeMetadata": { +"description": "Describes the progress of a long-running `LongRunningRecognize` call. It is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "LongRunningRecognizeMetadata", +"properties": { +"lastUpdateTime": { +"description": "Time of the most recent processing update.", +"format": "google-datetime", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage of audio processed thus far. Guaranteed to be 100 when the audio is fully processed and the results are available.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "Output only. The URI of the audio file being transcribed. Empty if the audio was sent as byte content.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"LongRunningRecognizeRequest": { +"description": "The top-level message sent by the client for the `LongRunningRecognize` method.", +"id": "LongRunningRecognizeRequest", +"properties": { +"audio": { +"$ref": "RecognitionAudio", +"description": "Required. The audio data to be recognized." +}, +"config": { +"$ref": "RecognitionConfig", +"description": "Required. Provides information to the recognizer that specifies how to process the request." +}, +"outputConfig": { +"$ref": "TranscriptOutputConfig", +"description": "Optional. Specifies an optional destination for the recognition results." +} +}, +"type": "object" +}, +"LongRunningRecognizeResponse": { +"description": "The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "LongRunningRecognizeResponse", +"properties": { +"outputConfig": { +"$ref": "TranscriptOutputConfig", +"description": "Original output config if present in the request." +}, +"outputError": { +"$ref": "Status", +"description": "If the transcript output fails this field contains the relevant error." +}, +"requestId": { +"description": "The ID associated with the request. This is a unique ID specific only to the given request.", +"format": "int64", +"type": "string" +}, +"results": { +"description": "Sequential list of transcription results corresponding to sequential portions of audio.", +"items": { +"$ref": "SpeechRecognitionResult" +}, +"type": "array" +}, +"speechAdaptationInfo": { +"$ref": "SpeechAdaptationInfo", +"description": "Provides information on speech adaptation behavior in response" +}, +"totalBilledTime": { +"description": "When available, billed audio seconds for the corresponding request.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Phrase": { +"description": "A phrases containing words and phrase \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also include pre-built or custom classes containing groups of words that represent common concepts that occur in natural language. For example, rather than providing a phrase hint for every month of the year (e.g. \"i was born in january\", \"i was born in febuary\", ...), use the pre-built `$MONTH` class improves the likelihood of correctly transcribing audio that includes months (e.g. \"i was born in $month\"). To refer to pre-built classes, use the class' symbol prepended with `$` e.g. `$MONTH`. To refer to custom classes that were defined inline in the request, set the class's `custom_class_id` to a string unique to all class resources and inline classes. Then use the class' id wrapped in $`{...}` e.g. \"${my-months}\". To refer to custom classes resources, use the class' id wrapped in `${}` (e.g. `${my-months}`). Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"id": "Phrase", +"properties": { +"boost": { +"description": "Hint Boost. Overrides the boost set at the phrase set level. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests.", +"format": "float", +"type": "number" +}, +"value": { +"description": "The phrase itself.", +"type": "string" +} +}, +"type": "object" +}, +"PhraseSet": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "PhraseSet", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. This field is not used.", +"readOnly": true, +"type": "object" +}, +"boost": { +"description": "Hint Boost. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 (exclusive) and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests.", +"format": "float", +"type": "number" +}, +"deleteTime": { +"description": "Output only. The time at which this resource was requested for deletion. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Output only. User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. This field is not used.", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. The time at which this resource will be purged. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"kmsKeyName": { +"description": "Output only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the content of the PhraseSet is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.", +"readOnly": true, +"type": "string" +}, +"kmsKeyVersionName": { +"description": "Output only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which content of the PhraseSet is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The resource name of the phrase set.", +"type": "string" +}, +"phrases": { +"description": "A list of word and phrases.", +"items": { +"$ref": "Phrase" +}, +"type": "array" +}, +"reconciling": { +"description": "Output only. Whether or not this PhraseSet is in the process of being updated. This field is not used.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. The CustomClass lifecycle state. This field is not used.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"DELETED" +], +"enumDescriptions": [ +"Unspecified state. This is only used/useful for distinguishing unset values.", +"The normal and active state.", +"This CustomClass has been deleted." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-assigned unique identifier for the PhraseSet. This field is not used.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RecognitionAudio": { +"description": "Contains audio data in the encoding specified in the `RecognitionConfig`. Either `content` or `uri` must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. See [content limits](https://cloud.google.com/speech-to-text/quotas#content).", +"id": "RecognitionAudio", +"properties": { +"content": { +"description": "The audio data bytes encoded as specified in `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.", +"format": "byte", +"type": "string" +}, +"uri": { +"description": "URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: `gs://bucket_name/object_name` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/reference-uris).", +"type": "string" +} +}, +"type": "object" +}, +"RecognitionConfig": { +"description": "Provides information to the recognizer that specifies how to process the request.", +"id": "RecognitionConfig", +"properties": { +"adaptation": { +"$ref": "SpeechAdaptation", +"description": "Speech adaptation configuration improves the accuracy of speech recognition. For more information, see the [speech adaptation](https://cloud.google.com/speech-to-text/docs/adaptation) documentation. When speech adaptation is set it supersedes the `speech_contexts` field." +}, +"alternativeLanguageCodes": { +"description": "A list of up to 3 additional [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, listing possible alternative languages of the supplied audio. See [Language Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of the currently supported language codes. If alternative languages are listed, recognition result will contain recognition in the most likely language detected including the main language_code. The recognition result will include the language tag of the language detected in the audio. Note: This feature is only supported for Voice Command and Voice Search use cases and performance may vary for other use cases (e.g., phone call transcription).", +"items": { +"type": "string" +}, +"type": "array" +}, +"audioChannelCount": { +"description": "The number of channels in the input audio data. ONLY set this for MULTI-CHANNEL recognition. Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to one channel (mono). Note: We only recognize the first channel by default. To perform independent recognition on each channel set `enable_separate_recognition_per_channel` to 'true'.", +"format": "int32", +"type": "integer" +}, +"diarizationConfig": { +"$ref": "SpeakerDiarizationConfig", +"description": "Config to enable speaker diarization and set additional parameters to make diarization better suited for your application. Note: When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult." +}, +"enableAutomaticPunctuation": { +"description": "If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses.", +"type": "boolean" +}, +"enableSeparateRecognitionPerChannel": { +"description": "This needs to be set to `true` explicitly and `audio_channel_count` > 1 to get each channel recognized separately. The recognition result will contain a `channel_tag` field to state which channel that result belongs to. If this is not true, we will only recognize the first channel. The request is billed cumulatively for all channels recognized: `audio_channel_count` multiplied by the length of the audio.", +"type": "boolean" +}, +"enableSpokenEmojis": { +"description": "The spoken emoji behavior for the call If not set, uses default behavior based on model of choice If 'true', adds spoken emoji formatting for the request. This will replace spoken emojis with the corresponding Unicode symbols in the final transcript. If 'false', spoken emojis are not replaced.", +"type": "boolean" +}, +"enableSpokenPunctuation": { +"description": "The spoken punctuation behavior for the call If not set, uses default behavior based on model of choice e.g. command_and_search will enable spoken punctuation by default If 'true', replaces spoken punctuation with the corresponding symbols in the request. For example, \"how are you question mark\" becomes \"how are you?\". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation for support. If 'false', spoken punctuation is not replaced.", +"type": "boolean" +}, +"enableWordConfidence": { +"description": "If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.", +"type": "boolean" +}, +"enableWordTimeOffsets": { +"description": "If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If `false`, no word-level time offset information is returned. The default is `false`.", +"type": "boolean" +}, +"encoding": { +"description": "Encoding of audio data sent in all `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV` audio files and required for all other audio formats. For details, see AudioEncoding.", +"enum": [ +"ENCODING_UNSPECIFIED", +"LINEAR16", +"FLAC", +"MULAW", +"AMR", +"AMR_WB", +"OGG_OPUS", +"SPEEX_WITH_HEADER_BYTE", +"MP3", +"WEBM_OPUS" +], +"enumDescriptions": [ +"Not specified.", +"Uncompressed 16-bit signed little-endian samples (Linear PCM).", +"`FLAC` (Free Lossless Audio Codec) is the recommended encoding because it is lossless--therefore recognition is not compromised--and requires only about half the bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and 24-bit samples, however, not all fields in `STREAMINFO` are supported.", +"8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", +"Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.", +"Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.", +"Opus encoded audio frames in Ogg container ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.", +"Although the use of lossy encodings is not recommended, if a very low bitrate encoding is required, `OGG_OPUS` is highly preferred over Speex encoding. The [Speex](https://speex.org/) encoding supported by Cloud Speech API has a header byte in each block, as in MIME type `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574). The stream is a sequence of blocks, one block per RTP packet. Each block starts with a byte containing the length of the block, in bytes, followed by one or more frames of Speex data, padded to an integral number of bytes (octets) as specified in RFC 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported. `sample_rate_hertz` must be 16000.", +"MP3 audio. MP3 encoding is a Beta feature and only available in v1p1beta1. Support all standard MP3 bitrates (which range from 32-320 kbps). When using this encoding, `sample_rate_hertz` has to match the sample rate of the file being used.", +"Opus encoded audio frames in WebM container ([WebM](https://www.webmproject.org/docs/container/)). `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000." +], +"type": "string" +}, +"languageCode": { +"description": "Required. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of the currently supported language codes.", +"type": "string" +}, +"maxAlternatives": { +"description": "Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechRecognitionResult`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.", +"format": "int32", +"type": "integer" +}, +"metadata": { +"$ref": "RecognitionMetadata", +"description": "Metadata regarding this request." +}, +"model": { +"description": "Which model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the RecognitionConfig. *Model* *Description* latest_long Best for long form content like media or conversation. latest_short Best for short form content like commands or single shot directed speech. command_and_search Best for short queries such as voice commands or voice search. phone_call Best for audio that originated from a phone call (typically recorded at an 8khz sampling rate). video Best for audio that originated from video or includes multiple speakers. Ideally the audio is recorded at a 16khz or greater sampling rate. This is a premium model that costs more than the standard rate. default Best for audio that is not one of the specific audio models. For example, long-form audio. Ideally the audio is high-fidelity, recorded at a 16khz or greater sampling rate. medical_conversation Best for audio that originated from a conversation between a medical provider and patient. medical_dictation Best for audio that originated from dictation notes by a medical provider. ", +"type": "string" +}, +"profanityFilter": { +"description": "If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. \"f***\". If set to `false` or omitted, profanities won't be filtered out.", +"type": "boolean" +}, +"sampleRateHertz": { +"description": "Sample rate in Hertz of the audio data sent in all `RecognitionAudio` messages. Valid values are: 8000-48000. 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that's not possible, use the native sample rate of the audio source (instead of re-sampling). This field is optional for FLAC and WAV audio files, but is required for all other audio formats. For details, see AudioEncoding.", +"format": "int32", +"type": "integer" +}, +"speechContexts": { +"description": "Array of SpeechContext. A means to provide context to assist the speech recognition. For more information, see [speech adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).", +"items": { +"$ref": "SpeechContext" +}, +"type": "array" +}, +"transcriptNormalization": { +"$ref": "TranscriptNormalization", +"description": "Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts." +}, +"useEnhanced": { +"description": "Set to true to use an enhanced model for speech recognition. If `use_enhanced` is set to true and the `model` field is not set, then an appropriate enhanced model is chosen if an enhanced model exists for the audio. If `use_enhanced` is true and an enhanced version of the specified model does not exist, then the speech is recognized using the standard version of the specified model.", +"type": "boolean" +} +}, +"type": "object" +}, +"RecognitionMetadata": { +"deprecated": true, +"description": "Description of audio data to be recognized.", +"id": "RecognitionMetadata", +"properties": { +"audioTopic": { +"description": "Description of the content. Eg. \"Recordings of federal supreme court hearings from 2012\".", +"type": "string" +}, +"industryNaicsCodeOfAudio": { +"description": "The industry vertical to which this speech recognition request most closely applies. This is most indicative of the topics contained in the audio. Use the 6-digit NAICS code to identify the industry vertical - see https://www.naics.com/search/.", +"format": "uint32", +"type": "integer" +}, +"interactionType": { +"description": "The use case most closely describing the audio content to be recognized.", +"enum": [ +"INTERACTION_TYPE_UNSPECIFIED", +"DISCUSSION", +"PRESENTATION", +"PHONE_CALL", +"VOICEMAIL", +"PROFESSIONALLY_PRODUCED", +"VOICE_SEARCH", +"VOICE_COMMAND", +"DICTATION" +], +"enumDescriptions": [ +"Use case is either unknown or is something other than one of the other values below.", +"Multiple people in a conversation or discussion. For example in a meeting with two or more people actively participating. Typically all the primary people speaking would be in the same room (if not, see PHONE_CALL)", +"One or more persons lecturing or presenting to others, mostly uninterrupted.", +"A phone-call or video-conference in which two or more people, who are not in the same room, are actively participating.", +"A recorded message intended for another person to listen to.", +"Professionally produced audio (eg. TV Show, Podcast).", +"Transcribe spoken questions and queries into text.", +"Transcribe voice commands, such as for controlling a device.", +"Transcribe speech to text to create a written document, such as a text-message, email or report." +], +"type": "string" +}, +"microphoneDistance": { +"description": "The audio type that most closely describes the audio being recognized.", +"enum": [ +"MICROPHONE_DISTANCE_UNSPECIFIED", +"NEARFIELD", +"MIDFIELD", +"FARFIELD" +], +"enumDescriptions": [ +"Audio type is not known.", +"The audio was captured from a closely placed microphone. Eg. phone, dictaphone, or handheld microphone. Generally if there speaker is within 1 meter of the microphone.", +"The speaker if within 3 meters of the microphone.", +"The speaker is more than 3 meters away from the microphone." +], +"type": "string" +}, +"originalMediaType": { +"description": "The original media the speech was recorded on.", +"enum": [ +"ORIGINAL_MEDIA_TYPE_UNSPECIFIED", +"AUDIO", +"VIDEO" +], +"enumDescriptions": [ +"Unknown original media type.", +"The speech data is an audio recording.", +"The speech data originally recorded on a video." +], +"type": "string" +}, +"originalMimeType": { +"description": "Mime type of the original audio file. For example `audio/m4a`, `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`. A list of possible audio mime types is maintained at http://www.iana.org/assignments/media-types/media-types.xhtml#audio", +"type": "string" +}, +"recordingDeviceName": { +"description": "The device used to make the recording. Examples 'Nexus 5X' or 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or 'Cardioid Microphone'.", +"type": "string" +}, +"recordingDeviceType": { +"description": "The type of device the speech was recorded with.", +"enum": [ +"RECORDING_DEVICE_TYPE_UNSPECIFIED", +"SMARTPHONE", +"PC", +"PHONE_LINE", +"VEHICLE", +"OTHER_OUTDOOR_DEVICE", +"OTHER_INDOOR_DEVICE" +], +"enumDescriptions": [ +"The recording device is unknown.", +"Speech was recorded on a smartphone.", +"Speech was recorded using a personal computer or tablet.", +"Speech was recorded over a phone line.", +"Speech was recorded in a vehicle.", +"Speech was recorded outdoors.", +"Speech was recorded indoors." +], +"type": "string" +} +}, +"type": "object" +}, +"RecognizeRequest": { +"description": "The top-level message sent by the client for the `Recognize` method.", +"id": "RecognizeRequest", +"properties": { +"audio": { +"$ref": "RecognitionAudio", +"description": "Required. The audio data to be recognized." +}, +"config": { +"$ref": "RecognitionConfig", +"description": "Required. Provides information to the recognizer that specifies how to process the request." +} +}, +"type": "object" +}, +"RecognizeResponse": { +"description": "The only message returned to the client by the `Recognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages.", +"id": "RecognizeResponse", +"properties": { +"requestId": { +"description": "The ID associated with the request. This is a unique ID specific only to the given request.", +"format": "int64", +"type": "string" +}, +"results": { +"description": "Sequential list of transcription results corresponding to sequential portions of audio.", +"items": { +"$ref": "SpeechRecognitionResult" +}, +"type": "array" +}, +"speechAdaptationInfo": { +"$ref": "SpeechAdaptationInfo", +"description": "Provides information on adaptation behavior in response" +}, +"totalBilledTime": { +"description": "When available, billed audio seconds for the corresponding request.", +"format": "google-duration", +"type": "string" +}, +"usingLegacyModels": { +"description": "Whether request used legacy asr models (was not automatically migrated to use conformer models).", +"type": "boolean" +} +}, +"type": "object" +}, +"SpeakerDiarizationConfig": { +"description": "Config to enable speaker diarization.", +"id": "SpeakerDiarizationConfig", +"properties": { +"enableSpeakerDiarization": { +"description": "If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_label provided in the WordInfo.", +"type": "boolean" +}, +"maxSpeakerCount": { +"description": "Maximum number of speakers in the conversation. This range gives you more flexibility by allowing the system to automatically determine the correct number of speakers. If not set, the default value is 6.", +"format": "int32", +"type": "integer" +}, +"minSpeakerCount": { +"description": "Minimum number of speakers in the conversation. This range gives you more flexibility by allowing the system to automatically determine the correct number of speakers. If not set, the default value is 2.", +"format": "int32", +"type": "integer" +}, +"speakerTag": { +"deprecated": true, +"description": "Output only. Unused.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"SpeechAdaptation": { +"description": "Speech adaptation configuration.", +"id": "SpeechAdaptation", +"properties": { +"abnfGrammar": { +"$ref": "ABNFGrammar", +"description": "Augmented Backus-Naur form (ABNF) is a standardized grammar notation comprised by a set of derivation rules. See specifications: https://www.w3.org/TR/speech-grammar" +}, +"customClasses": { +"description": "A collection of custom classes. To specify the classes inline, leave the class' `name` blank and fill in the rest of its fields, giving it a unique `custom_class_id`. Refer to the inline defined class in phrase hints by its `custom_class_id`.", +"items": { +"$ref": "CustomClass" +}, +"type": "array" +}, +"phraseSetReferences": { +"description": "A collection of phrase set resource names to use.", +"items": { +"type": "string" +}, +"type": "array" +}, +"phraseSets": { +"description": "A collection of phrase sets. To specify the hints inline, leave the phrase set's `name` blank and fill in the rest of its fields. Any phrase set can use any custom class.", +"items": { +"$ref": "PhraseSet" +}, +"type": "array" +} +}, +"type": "object" +}, +"SpeechAdaptationInfo": { +"description": "Information on speech adaptation use in results", +"id": "SpeechAdaptationInfo", +"properties": { +"adaptationTimeout": { +"description": "Whether there was a timeout when applying speech adaptation. If true, adaptation had no effect in the response transcript.", +"type": "boolean" +}, +"timeoutMessage": { +"description": "If set, returns a message specifying which part of the speech adaptation request timed out.", +"type": "string" +} +}, +"type": "object" +}, +"SpeechContext": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "SpeechContext", +"properties": { +"boost": { +"description": "Hint Boost. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case.", +"format": "float", +"type": "number" +}, +"phrases": { +"description": "A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also be set to classes for groups of words that represent common concepts that occur in natural language. For example, rather than providing phrase hints for every month of the year, using the $MONTH class improves the likelihood of correctly transcribing audio that includes months.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.", +"type": "string" +}, +"words": { +"description": "A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "WordInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"SpeechRecognitionResult": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "SpeechRecognitionResult", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "SpeechRecognitionAlternative" +}, +"type": "array" +}, +"channelTag": { +"description": "For multi-channel audio, this is the channel number corresponding to the recognized result for the audio from that channel. For audio_channel_count = N, its output values can range from '1' to 'N'.", +"format": "int32", +"type": "integer" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +}, +"resultEndTime": { +"description": "Time offset of the end of this result relative to the beginning of the audio.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TranscriptNormalization": { +"description": "Transcription normalization configuration. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.", +"id": "TranscriptNormalization", +"properties": { +"entries": { +"description": "A list of replacement entries. We will perform replacement with one entry at a time. For example, the second entry in [\"cat\" => \"dog\", \"mountain cat\" => \"mountain dog\"] will never be applied because we will always process the first entry before it. At most 100 entries.", +"items": { +"$ref": "Entry" +}, +"type": "array" +} +}, +"type": "object" +}, +"TranscriptOutputConfig": { +"description": "Specifies an optional destination for the recognition results.", +"id": "TranscriptOutputConfig", +"properties": { +"gcsUri": { +"description": "Specifies a Cloud Storage URI for the recognition results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.", +"type": "string" +} +}, +"type": "object" +}, +"WordInfo": { +"description": "Word-specific information for recognized words.", +"id": "WordInfo", +"properties": { +"confidence": { +"description": "The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerLabel": { +"description": "Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example \"patient\" or \"provider\", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative.", +"readOnly": true, +"type": "string" +}, +"speakerTag": { +"deprecated": true, +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization = 'true' and only for the top alternative. Note: Use speaker_label instead.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Speech-to-Text API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v1p1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v1p1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..14d30ce720206ebdc2d1aa4ff5671ae7b6a59e32 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v1p1beta1.json @@ -0,0 +1,1520 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://speech.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Speech", +"description": "Converts audio to text by applying powerful neural network models.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/speech-to-text/docs/quickstart-protocol", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "speech:v1p1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://speech.mtls.googleapis.com/", +"name": "speech", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1p1beta1/operations/{operationsId}", +"httpMethod": "GET", +"id": "speech.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^.*$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/operations/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1p1beta1/operations", +"httpMethod": "GET", +"id": "speech.operations.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1p1beta1/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"projects": { +"resources": { +"locations": { +"resources": { +"customClasses": { +"methods": { +"create": { +"description": "Create a custom class.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/customClasses", +"httpMethod": "POST", +"id": "speech.projects.locations.customClasses.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this custom class will be created. Format: `projects/{project}/locations/{location}/customClasses` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/customClasses", +"request": { +"$ref": "CreateCustomClassRequest" +}, +"response": { +"$ref": "CustomClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a custom class.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}", +"httpMethod": "DELETE", +"id": "speech.projects.locations.customClasses.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the custom class to delete. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get a custom class.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}", +"httpMethod": "GET", +"id": "speech.projects.locations.customClasses.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the custom class to retrieve. Format: `projects/{project}/locations/{location}/customClasses/{custom_class}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+name}", +"response": { +"$ref": "CustomClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List custom classes.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/customClasses", +"httpMethod": "GET", +"id": "speech.projects.locations.customClasses.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of custom classes to return. The service may return fewer than this value. If unspecified, at most 50 custom classes will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListCustomClass` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCustomClass` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of custom classes. Format: `projects/{project}/locations/{location}/customClasses` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/customClasses", +"response": { +"$ref": "ListCustomClassesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a custom class.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/customClasses/{customClassesId}", +"httpMethod": "PATCH", +"id": "speech.projects.locations.customClasses.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the custom class.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/customClasses/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1p1beta1/{+name}", +"request": { +"$ref": "CustomClass" +}, +"response": { +"$ref": "CustomClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"phraseSets": { +"methods": { +"create": { +"description": "Create a set of phrase hints. Each item in the set can be a single word or a multi-word phrase. The items in the PhraseSet are favored by the recognition model when you send a call that includes the PhraseSet.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/phraseSets", +"httpMethod": "POST", +"id": "speech.projects.locations.phraseSets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource where this phrase set will be created. Format: `projects/{project}/locations/{location}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/phraseSets", +"request": { +"$ref": "CreatePhraseSetRequest" +}, +"response": { +"$ref": "PhraseSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Delete a phrase set.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}", +"httpMethod": "DELETE", +"id": "speech.projects.locations.phraseSets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the phrase set to delete. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Get a phrase set.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}", +"httpMethod": "GET", +"id": "speech.projects.locations.phraseSets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the phrase set to retrieve. Format: `projects/{project}/locations/{location}/phraseSets/{phrase_set}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+name}", +"response": { +"$ref": "PhraseSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List phrase sets.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/phraseSets", +"httpMethod": "GET", +"id": "speech.projects.locations.phraseSets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of phrase sets to return. The service may return fewer than this value. If unspecified, at most 50 phrase sets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListPhraseSet` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPhraseSet` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of phrase set. Format: `projects/{project}/locations/{location}` Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/phraseSets", +"response": { +"$ref": "ListPhraseSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Update a phrase set.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/phraseSets/{phraseSetsId}", +"httpMethod": "PATCH", +"id": "speech.projects.locations.phraseSets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the phrase set.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/phraseSets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1p1beta1/{+name}", +"request": { +"$ref": "PhraseSet" +}, +"response": { +"$ref": "PhraseSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"speech": { +"methods": { +"longrunningrecognize": { +"description": "Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. For more information on asynchronous speech recognition, see the [how-to](https://cloud.google.com/speech-to-text/docs/async-recognize).", +"flatPath": "v1p1beta1/speech:longrunningrecognize", +"httpMethod": "POST", +"id": "speech.speech.longrunningrecognize", +"parameterOrder": [], +"parameters": {}, +"path": "v1p1beta1/speech:longrunningrecognize", +"request": { +"$ref": "LongRunningRecognizeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"recognize": { +"description": "Performs synchronous speech recognition: receive results after all audio has been sent and processed.", +"flatPath": "v1p1beta1/speech:recognize", +"httpMethod": "POST", +"id": "speech.speech.recognize", +"parameterOrder": [], +"parameters": {}, +"path": "v1p1beta1/speech:recognize", +"request": { +"$ref": "RecognizeRequest" +}, +"response": { +"$ref": "RecognizeResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240405", +"rootUrl": "https://speech.googleapis.com/", +"schemas": { +"ABNFGrammar": { +"id": "ABNFGrammar", +"properties": { +"abnfStrings": { +"description": "All declarations and rules of an ABNF grammar broken up into multiple strings that will end up concatenated.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClassItem": { +"description": "An item of the class.", +"id": "ClassItem", +"properties": { +"value": { +"description": "The class item's value.", +"type": "string" +} +}, +"type": "object" +}, +"CreateCustomClassRequest": { +"description": "Message sent by the client for the `CreateCustomClass` method.", +"id": "CreateCustomClassRequest", +"properties": { +"customClass": { +"$ref": "CustomClass", +"description": "Required. The custom class to create." +}, +"customClassId": { +"description": "Required. The ID to use for the custom class, which will become the final component of the custom class' resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", +"type": "string" +} +}, +"type": "object" +}, +"CreatePhraseSetRequest": { +"description": "Message sent by the client for the `CreatePhraseSet` method.", +"id": "CreatePhraseSetRequest", +"properties": { +"phraseSet": { +"$ref": "PhraseSet", +"description": "Required. The phrase set to create." +}, +"phraseSetId": { +"description": "Required. The ID to use for the phrase set, which will become the final component of the phrase set's resource name. This value should restrict to letters, numbers, and hyphens, with the first character a letter, the last a letter or a number, and be 4-63 characters.", +"type": "string" +} +}, +"type": "object" +}, +"CustomClass": { +"description": "A set of words or phrases that represents a common concept likely to appear in your audio, for example a list of passenger ship names. CustomClass items can be substituted into placeholders that you set in PhraseSet phrases.", +"id": "CustomClass", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. This field is not used.", +"readOnly": true, +"type": "object" +}, +"customClassId": { +"description": "If this custom class is a resource, the custom_class_id is the resource id of the CustomClass. Case sensitive.", +"type": "string" +}, +"deleteTime": { +"description": "Output only. The time at which this resource was requested for deletion. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Output only. User-settable, human-readable name for the CustomClass. Must be 63 characters or less. This field is not used.", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. This field is not used.", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. The time at which this resource will be purged. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"items": { +"description": "A collection of class items.", +"items": { +"$ref": "ClassItem" +}, +"type": "array" +}, +"kmsKeyName": { +"description": "Output only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the content of the ClassItem is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.", +"readOnly": true, +"type": "string" +}, +"kmsKeyVersionName": { +"description": "Output only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which content of the ClassItem is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The resource name of the custom class.", +"type": "string" +}, +"reconciling": { +"description": "Output only. Whether or not this CustomClass is in the process of being updated. This field is not used.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. The CustomClass lifecycle state. This field is not used.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"DELETED" +], +"enumDescriptions": [ +"Unspecified state. This is only used/useful for distinguishing unset values.", +"The normal and active state.", +"This CustomClass has been deleted." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-assigned unique identifier for the CustomClass. This field is not used.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Entry": { +"description": "A single replacement configuration.", +"id": "Entry", +"properties": { +"caseSensitive": { +"description": "Whether the search is case sensitive.", +"type": "boolean" +}, +"replace": { +"description": "What to replace with. Max length is 100 characters.", +"type": "string" +}, +"search": { +"description": "What to replace. Max length is 100 characters.", +"type": "string" +} +}, +"type": "object" +}, +"ListCustomClassesResponse": { +"description": "Message returned to the client by the `ListCustomClasses` method.", +"id": "ListCustomClassesResponse", +"properties": { +"customClasses": { +"description": "The custom classes.", +"items": { +"$ref": "CustomClass" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPhraseSetResponse": { +"description": "Message returned to the client by the `ListPhraseSet` method.", +"id": "ListPhraseSetResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"phraseSets": { +"description": "The phrase set.", +"items": { +"$ref": "PhraseSet" +}, +"type": "array" +} +}, +"type": "object" +}, +"LongRunningRecognizeMetadata": { +"description": "Describes the progress of a long-running `LongRunningRecognize` call. It is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "LongRunningRecognizeMetadata", +"properties": { +"lastUpdateTime": { +"description": "Time of the most recent processing update.", +"format": "google-datetime", +"type": "string" +}, +"outputConfig": { +"$ref": "TranscriptOutputConfig", +"description": "Output only. A copy of the TranscriptOutputConfig if it was set in the request.", +"readOnly": true +}, +"progressPercent": { +"description": "Approximate percentage of audio processed thus far. Guaranteed to be 100 when the audio is fully processed and the results are available.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"uri": { +"description": "Output only. The URI of the audio file being transcribed. Empty if the audio was sent as byte content.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"LongRunningRecognizeRequest": { +"description": "The top-level message sent by the client for the `LongRunningRecognize` method.", +"id": "LongRunningRecognizeRequest", +"properties": { +"audio": { +"$ref": "RecognitionAudio", +"description": "Required. The audio data to be recognized." +}, +"config": { +"$ref": "RecognitionConfig", +"description": "Required. Provides information to the recognizer that specifies how to process the request." +}, +"outputConfig": { +"$ref": "TranscriptOutputConfig", +"description": "Optional. Specifies an optional destination for the recognition results." +} +}, +"type": "object" +}, +"LongRunningRecognizeResponse": { +"description": "The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "LongRunningRecognizeResponse", +"properties": { +"outputConfig": { +"$ref": "TranscriptOutputConfig", +"description": "Original output config if present in the request." +}, +"outputError": { +"$ref": "Status", +"description": "If the transcript output fails this field contains the relevant error." +}, +"requestId": { +"description": "The ID associated with the request. This is a unique ID specific only to the given request.", +"format": "int64", +"type": "string" +}, +"results": { +"description": "Sequential list of transcription results corresponding to sequential portions of audio.", +"items": { +"$ref": "SpeechRecognitionResult" +}, +"type": "array" +}, +"speechAdaptationInfo": { +"$ref": "SpeechAdaptationInfo", +"description": "Provides information on speech adaptation behavior in response" +}, +"totalBilledTime": { +"description": "When available, billed audio seconds for the corresponding request.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Phrase": { +"description": "A phrases containing words and phrase \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also include pre-built or custom classes containing groups of words that represent common concepts that occur in natural language. For example, rather than providing a phrase hint for every month of the year (e.g. \"i was born in january\", \"i was born in febuary\", ...), use the pre-built `$MONTH` class improves the likelihood of correctly transcribing audio that includes months (e.g. \"i was born in $month\"). To refer to pre-built classes, use the class' symbol prepended with `$` e.g. `$MONTH`. To refer to custom classes that were defined inline in the request, set the class's `custom_class_id` to a string unique to all class resources and inline classes. Then use the class' id wrapped in $`{...}` e.g. \"${my-months}\". To refer to custom classes resources, use the class' id wrapped in `${}` (e.g. `${my-months}`). Speech-to-Text supports three locations: `global`, `us` (US North America), and `eu` (Europe). If you are calling the `speech.googleapis.com` endpoint, use the `global` location. To specify a region, use a [regional endpoint](https://cloud.google.com/speech-to-text/docs/endpoints) with matching `us` or `eu` location value.", +"id": "Phrase", +"properties": { +"boost": { +"description": "Hint Boost. Overrides the boost set at the phrase set level. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests.", +"format": "float", +"type": "number" +}, +"value": { +"description": "The phrase itself.", +"type": "string" +} +}, +"type": "object" +}, +"PhraseSet": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "PhraseSet", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Output only. Allows users to store small amounts of arbitrary data. Both the key and the value must be 63 characters or less each. At most 100 annotations. This field is not used.", +"readOnly": true, +"type": "object" +}, +"boost": { +"description": "Hint Boost. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 (exclusive) and 20. We recommend using a binary search approach to finding the optimal value for your use case as well as adding phrases both with and without boost to your requests.", +"format": "float", +"type": "number" +}, +"deleteTime": { +"description": "Output only. The time at which this resource was requested for deletion. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Output only. User-settable, human-readable name for the PhraseSet. Must be 63 characters or less. This field is not used.", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Output only. This checksum is computed by the server based on the value of other fields. This may be sent on update, undelete, and delete requests to ensure the client has an up-to-date value before proceeding. This field is not used.", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Output only. The time at which this resource will be purged. This field is not used.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"kmsKeyName": { +"description": "Output only. The [KMS key name](https://cloud.google.com/kms/docs/resource-hierarchy#keys) with which the content of the PhraseSet is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`.", +"readOnly": true, +"type": "string" +}, +"kmsKeyVersionName": { +"description": "Output only. The [KMS key version name](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions) with which content of the PhraseSet is encrypted. The expected format is `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}`.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The resource name of the phrase set.", +"type": "string" +}, +"phrases": { +"description": "A list of word and phrases.", +"items": { +"$ref": "Phrase" +}, +"type": "array" +}, +"reconciling": { +"description": "Output only. Whether or not this PhraseSet is in the process of being updated. This field is not used.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. The CustomClass lifecycle state. This field is not used.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"DELETED" +], +"enumDescriptions": [ +"Unspecified state. This is only used/useful for distinguishing unset values.", +"The normal and active state.", +"This CustomClass has been deleted." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-assigned unique identifier for the PhraseSet. This field is not used.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RecognitionAudio": { +"description": "Contains audio data in the encoding specified in the `RecognitionConfig`. Either `content` or `uri` must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. See [content limits](https://cloud.google.com/speech-to-text/quotas#content).", +"id": "RecognitionAudio", +"properties": { +"content": { +"description": "The audio data bytes encoded as specified in `RecognitionConfig`. Note: as with all bytes fields, proto buffers use a pure binary representation, whereas JSON representations use base64.", +"format": "byte", +"type": "string" +}, +"uri": { +"description": "URI that points to a file that contains audio data bytes as specified in `RecognitionConfig`. The file must not be compressed (for example, gzip). Currently, only Google Cloud Storage URIs are supported, which must be specified in the following format: `gs://bucket_name/object_name` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/reference-uris).", +"type": "string" +} +}, +"type": "object" +}, +"RecognitionConfig": { +"description": "Provides information to the recognizer that specifies how to process the request.", +"id": "RecognitionConfig", +"properties": { +"adaptation": { +"$ref": "SpeechAdaptation", +"description": "Speech adaptation configuration improves the accuracy of speech recognition. For more information, see the [speech adaptation](https://cloud.google.com/speech-to-text/docs/adaptation) documentation. When speech adaptation is set it supersedes the `speech_contexts` field." +}, +"alternativeLanguageCodes": { +"description": "A list of up to 3 additional [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags, listing possible alternative languages of the supplied audio. See [Language Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of the currently supported language codes. If alternative languages are listed, recognition result will contain recognition in the most likely language detected including the main language_code. The recognition result will include the language tag of the language detected in the audio. Note: This feature is only supported for Voice Command and Voice Search use cases and performance may vary for other use cases (e.g., phone call transcription).", +"items": { +"type": "string" +}, +"type": "array" +}, +"audioChannelCount": { +"description": "The number of channels in the input audio data. ONLY set this for MULTI-CHANNEL recognition. Valid values for LINEAR16, OGG_OPUS and FLAC are `1`-`8`. Valid value for MULAW, AMR, AMR_WB and SPEEX_WITH_HEADER_BYTE is only `1`. If `0` or omitted, defaults to one channel (mono). Note: We only recognize the first channel by default. To perform independent recognition on each channel set `enable_separate_recognition_per_channel` to 'true'.", +"format": "int32", +"type": "integer" +}, +"diarizationConfig": { +"$ref": "SpeakerDiarizationConfig", +"description": "Config to enable speaker diarization and set additional parameters to make diarization better suited for your application. Note: When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult." +}, +"diarizationSpeakerCount": { +"deprecated": true, +"description": "If set, specifies the estimated number of speakers in the conversation. Defaults to '2'. Ignored unless enable_speaker_diarization is set to true. Note: Use diarization_config instead.", +"format": "int32", +"type": "integer" +}, +"enableAutomaticPunctuation": { +"description": "If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses.", +"type": "boolean" +}, +"enableSeparateRecognitionPerChannel": { +"description": "This needs to be set to `true` explicitly and `audio_channel_count` > 1 to get each channel recognized separately. The recognition result will contain a `channel_tag` field to state which channel that result belongs to. If this is not true, we will only recognize the first channel. The request is billed cumulatively for all channels recognized: `audio_channel_count` multiplied by the length of the audio.", +"type": "boolean" +}, +"enableSpeakerDiarization": { +"deprecated": true, +"description": "If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_label provided in the WordInfo. Note: Use diarization_config instead.", +"type": "boolean" +}, +"enableSpokenEmojis": { +"description": "The spoken emoji behavior for the call If not set, uses default behavior based on model of choice If 'true', adds spoken emoji formatting for the request. This will replace spoken emojis with the corresponding Unicode symbols in the final transcript. If 'false', spoken emojis are not replaced.", +"type": "boolean" +}, +"enableSpokenPunctuation": { +"description": "The spoken punctuation behavior for the call If not set, uses default behavior based on model of choice e.g. command_and_search will enable spoken punctuation by default If 'true', replaces spoken punctuation with the corresponding symbols in the request. For example, \"how are you question mark\" becomes \"how are you?\". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation for support. If 'false', spoken punctuation is not replaced.", +"type": "boolean" +}, +"enableWordConfidence": { +"description": "If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.", +"type": "boolean" +}, +"enableWordTimeOffsets": { +"description": "If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If `false`, no word-level time offset information is returned. The default is `false`.", +"type": "boolean" +}, +"encoding": { +"description": "Encoding of audio data sent in all `RecognitionAudio` messages. This field is optional for `FLAC` and `WAV` audio files and required for all other audio formats. For details, see AudioEncoding.", +"enum": [ +"ENCODING_UNSPECIFIED", +"LINEAR16", +"FLAC", +"MULAW", +"AMR", +"AMR_WB", +"OGG_OPUS", +"SPEEX_WITH_HEADER_BYTE", +"MP3", +"WEBM_OPUS" +], +"enumDescriptions": [ +"Not specified.", +"Uncompressed 16-bit signed little-endian samples (Linear PCM).", +"`FLAC` (Free Lossless Audio Codec) is the recommended encoding because it is lossless--therefore recognition is not compromised--and requires only about half the bandwidth of `LINEAR16`. `FLAC` stream encoding supports 16-bit and 24-bit samples, however, not all fields in `STREAMINFO` are supported.", +"8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.", +"Adaptive Multi-Rate Narrowband codec. `sample_rate_hertz` must be 8000.", +"Adaptive Multi-Rate Wideband codec. `sample_rate_hertz` must be 16000.", +"Opus encoded audio frames in Ogg container ([OggOpus](https://wiki.xiph.org/OggOpus)). `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000.", +"Although the use of lossy encodings is not recommended, if a very low bitrate encoding is required, `OGG_OPUS` is highly preferred over Speex encoding. The [Speex](https://speex.org/) encoding supported by Cloud Speech API has a header byte in each block, as in MIME type `audio/x-speex-with-header-byte`. It is a variant of the RTP Speex encoding defined in [RFC 5574](https://tools.ietf.org/html/rfc5574). The stream is a sequence of blocks, one block per RTP packet. Each block starts with a byte containing the length of the block, in bytes, followed by one or more frames of Speex data, padded to an integral number of bytes (octets) as specified in RFC 5574. In other words, each RTP header is replaced with a single byte containing the block length. Only Speex wideband is supported. `sample_rate_hertz` must be 16000.", +"MP3 audio. MP3 encoding is a Beta feature and only available in v1p1beta1. Support all standard MP3 bitrates (which range from 32-320 kbps). When using this encoding, `sample_rate_hertz` has to match the sample rate of the file being used.", +"Opus encoded audio frames in WebM container ([WebM](https://www.webmproject.org/docs/container/)). `sample_rate_hertz` must be one of 8000, 12000, 16000, 24000, or 48000." +], +"type": "string" +}, +"languageCode": { +"description": "Required. The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech-to-text/docs/languages) for a list of the currently supported language codes.", +"type": "string" +}, +"maxAlternatives": { +"description": "Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechRecognitionResult`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.", +"format": "int32", +"type": "integer" +}, +"metadata": { +"$ref": "RecognitionMetadata", +"description": "Metadata regarding this request." +}, +"model": { +"description": "Which model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the RecognitionConfig. *Model* *Description* latest_long Best for long form content like media or conversation. latest_short Best for short form content like commands or single shot directed speech. command_and_search Best for short queries such as voice commands or voice search. phone_call Best for audio that originated from a phone call (typically recorded at an 8khz sampling rate). video Best for audio that originated from video or includes multiple speakers. Ideally the audio is recorded at a 16khz or greater sampling rate. This is a premium model that costs more than the standard rate. default Best for audio that is not one of the specific audio models. For example, long-form audio. Ideally the audio is high-fidelity, recorded at a 16khz or greater sampling rate. medical_conversation Best for audio that originated from a conversation between a medical provider and patient. medical_dictation Best for audio that originated from dictation notes by a medical provider. ", +"type": "string" +}, +"profanityFilter": { +"description": "If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. \"f***\". If set to `false` or omitted, profanities won't be filtered out.", +"type": "boolean" +}, +"sampleRateHertz": { +"description": "Sample rate in Hertz of the audio data sent in all `RecognitionAudio` messages. Valid values are: 8000-48000. 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that's not possible, use the native sample rate of the audio source (instead of re-sampling). This field is optional for FLAC and WAV audio files, but is required for all other audio formats. For details, see AudioEncoding.", +"format": "int32", +"type": "integer" +}, +"speechContexts": { +"description": "Array of SpeechContext. A means to provide context to assist the speech recognition. For more information, see [speech adaptation](https://cloud.google.com/speech-to-text/docs/adaptation).", +"items": { +"$ref": "SpeechContext" +}, +"type": "array" +}, +"transcriptNormalization": { +"$ref": "TranscriptNormalization", +"description": "Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts." +}, +"useEnhanced": { +"description": "Set to true to use an enhanced model for speech recognition. If `use_enhanced` is set to true and the `model` field is not set, then an appropriate enhanced model is chosen if an enhanced model exists for the audio. If `use_enhanced` is true and an enhanced version of the specified model does not exist, then the speech is recognized using the standard version of the specified model.", +"type": "boolean" +} +}, +"type": "object" +}, +"RecognitionMetadata": { +"deprecated": true, +"description": "Description of audio data to be recognized.", +"id": "RecognitionMetadata", +"properties": { +"audioTopic": { +"description": "Description of the content. Eg. \"Recordings of federal supreme court hearings from 2012\".", +"type": "string" +}, +"industryNaicsCodeOfAudio": { +"description": "The industry vertical to which this speech recognition request most closely applies. This is most indicative of the topics contained in the audio. Use the 6-digit NAICS code to identify the industry vertical - see https://www.naics.com/search/.", +"format": "uint32", +"type": "integer" +}, +"interactionType": { +"description": "The use case most closely describing the audio content to be recognized.", +"enum": [ +"INTERACTION_TYPE_UNSPECIFIED", +"DISCUSSION", +"PRESENTATION", +"PHONE_CALL", +"VOICEMAIL", +"PROFESSIONALLY_PRODUCED", +"VOICE_SEARCH", +"VOICE_COMMAND", +"DICTATION" +], +"enumDescriptions": [ +"Use case is either unknown or is something other than one of the other values below.", +"Multiple people in a conversation or discussion. For example in a meeting with two or more people actively participating. Typically all the primary people speaking would be in the same room (if not, see PHONE_CALL)", +"One or more persons lecturing or presenting to others, mostly uninterrupted.", +"A phone-call or video-conference in which two or more people, who are not in the same room, are actively participating.", +"A recorded message intended for another person to listen to.", +"Professionally produced audio (eg. TV Show, Podcast).", +"Transcribe spoken questions and queries into text.", +"Transcribe voice commands, such as for controlling a device.", +"Transcribe speech to text to create a written document, such as a text-message, email or report." +], +"type": "string" +}, +"microphoneDistance": { +"description": "The audio type that most closely describes the audio being recognized.", +"enum": [ +"MICROPHONE_DISTANCE_UNSPECIFIED", +"NEARFIELD", +"MIDFIELD", +"FARFIELD" +], +"enumDescriptions": [ +"Audio type is not known.", +"The audio was captured from a closely placed microphone. Eg. phone, dictaphone, or handheld microphone. Generally if there speaker is within 1 meter of the microphone.", +"The speaker if within 3 meters of the microphone.", +"The speaker is more than 3 meters away from the microphone." +], +"type": "string" +}, +"obfuscatedId": { +"deprecated": true, +"description": "Obfuscated (privacy-protected) ID of the user, to identify number of unique users using the service.", +"format": "int64", +"type": "string" +}, +"originalMediaType": { +"description": "The original media the speech was recorded on.", +"enum": [ +"ORIGINAL_MEDIA_TYPE_UNSPECIFIED", +"AUDIO", +"VIDEO" +], +"enumDescriptions": [ +"Unknown original media type.", +"The speech data is an audio recording.", +"The speech data originally recorded on a video." +], +"type": "string" +}, +"originalMimeType": { +"description": "Mime type of the original audio file. For example `audio/m4a`, `audio/x-alaw-basic`, `audio/mp3`, `audio/3gpp`. A list of possible audio mime types is maintained at http://www.iana.org/assignments/media-types/media-types.xhtml#audio", +"type": "string" +}, +"recordingDeviceName": { +"description": "The device used to make the recording. Examples 'Nexus 5X' or 'Polycom SoundStation IP 6000' or 'POTS' or 'VoIP' or 'Cardioid Microphone'.", +"type": "string" +}, +"recordingDeviceType": { +"description": "The type of device the speech was recorded with.", +"enum": [ +"RECORDING_DEVICE_TYPE_UNSPECIFIED", +"SMARTPHONE", +"PC", +"PHONE_LINE", +"VEHICLE", +"OTHER_OUTDOOR_DEVICE", +"OTHER_INDOOR_DEVICE" +], +"enumDescriptions": [ +"The recording device is unknown.", +"Speech was recorded on a smartphone.", +"Speech was recorded using a personal computer or tablet.", +"Speech was recorded over a phone line.", +"Speech was recorded in a vehicle.", +"Speech was recorded outdoors.", +"Speech was recorded indoors." +], +"type": "string" +} +}, +"type": "object" +}, +"RecognizeRequest": { +"description": "The top-level message sent by the client for the `Recognize` method.", +"id": "RecognizeRequest", +"properties": { +"audio": { +"$ref": "RecognitionAudio", +"description": "Required. The audio data to be recognized." +}, +"config": { +"$ref": "RecognitionConfig", +"description": "Required. Provides information to the recognizer that specifies how to process the request." +} +}, +"type": "object" +}, +"RecognizeResponse": { +"description": "The only message returned to the client by the `Recognize` method. It contains the result as zero or more sequential `SpeechRecognitionResult` messages.", +"id": "RecognizeResponse", +"properties": { +"requestId": { +"description": "The ID associated with the request. This is a unique ID specific only to the given request.", +"format": "int64", +"type": "string" +}, +"results": { +"description": "Sequential list of transcription results corresponding to sequential portions of audio.", +"items": { +"$ref": "SpeechRecognitionResult" +}, +"type": "array" +}, +"speechAdaptationInfo": { +"$ref": "SpeechAdaptationInfo", +"description": "Provides information on adaptation behavior in response" +}, +"totalBilledTime": { +"description": "When available, billed audio seconds for the corresponding request.", +"format": "google-duration", +"type": "string" +}, +"usingLegacyModels": { +"description": "Whether request used legacy asr models (was not automatically migrated to use conformer models).", +"type": "boolean" +} +}, +"type": "object" +}, +"SpeakerDiarizationConfig": { +"description": "Config to enable speaker diarization.", +"id": "SpeakerDiarizationConfig", +"properties": { +"enableSpeakerDiarization": { +"description": "If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_label provided in the WordInfo.", +"type": "boolean" +}, +"maxSpeakerCount": { +"description": "Maximum number of speakers in the conversation. This range gives you more flexibility by allowing the system to automatically determine the correct number of speakers. If not set, the default value is 6.", +"format": "int32", +"type": "integer" +}, +"minSpeakerCount": { +"description": "Minimum number of speakers in the conversation. This range gives you more flexibility by allowing the system to automatically determine the correct number of speakers. If not set, the default value is 2.", +"format": "int32", +"type": "integer" +}, +"speakerTag": { +"deprecated": true, +"description": "Output only. Unused.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"SpeechAdaptation": { +"description": "Speech adaptation configuration.", +"id": "SpeechAdaptation", +"properties": { +"abnfGrammar": { +"$ref": "ABNFGrammar", +"description": "Augmented Backus-Naur form (ABNF) is a standardized grammar notation comprised by a set of derivation rules. See specifications: https://www.w3.org/TR/speech-grammar" +}, +"customClasses": { +"description": "A collection of custom classes. To specify the classes inline, leave the class' `name` blank and fill in the rest of its fields, giving it a unique `custom_class_id`. Refer to the inline defined class in phrase hints by its `custom_class_id`.", +"items": { +"$ref": "CustomClass" +}, +"type": "array" +}, +"phraseSetReferences": { +"description": "A collection of phrase set resource names to use.", +"items": { +"type": "string" +}, +"type": "array" +}, +"phraseSets": { +"description": "A collection of phrase sets. To specify the hints inline, leave the phrase set's `name` blank and fill in the rest of its fields. Any phrase set can use any custom class.", +"items": { +"$ref": "PhraseSet" +}, +"type": "array" +} +}, +"type": "object" +}, +"SpeechAdaptationInfo": { +"description": "Information on speech adaptation use in results", +"id": "SpeechAdaptationInfo", +"properties": { +"adaptationTimeout": { +"description": "Whether there was a timeout when applying speech adaptation. If true, adaptation had no effect in the response transcript.", +"type": "boolean" +}, +"timeoutMessage": { +"description": "If set, returns a message specifying which part of the speech adaptation request timed out.", +"type": "string" +} +}, +"type": "object" +}, +"SpeechContext": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "SpeechContext", +"properties": { +"boost": { +"description": "Hint Boost. Positive value will increase the probability that a specific phrase will be recognized over other similar sounding phrases. The higher the boost, the higher the chance of false positive recognition as well. Negative boost values would correspond to anti-biasing. Anti-biasing is not enabled, so negative boost will simply be ignored. Though `boost` can accept a wide range of positive values, most use cases are best served with values between 0 and 20. We recommend using a binary search approach to finding the optimal value for your use case.", +"format": "float", +"type": "number" +}, +"phrases": { +"description": "A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech-to-text/quotas#content). List items can also be set to classes for groups of words that represent common concepts that occur in natural language. For example, rather than providing phrase hints for every month of the year, using the $MONTH class improves the likelihood of correctly transcribing audio that includes months.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke. In languages that use spaces to separate words, the transcript might have a leading space if it isn't the first result. You can concatenate each result to obtain the full transcript without using a separator.", +"type": "string" +}, +"words": { +"description": "A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "WordInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"SpeechRecognitionResult": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "SpeechRecognitionResult", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "SpeechRecognitionAlternative" +}, +"type": "array" +}, +"channelTag": { +"description": "For multi-channel audio, this is the channel number corresponding to the recognized result for the audio from that channel. For audio_channel_count = N, its output values can range from '1' to 'N'.", +"format": "int32", +"type": "integer" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +}, +"resultEndTime": { +"description": "Time offset of the end of this result relative to the beginning of the audio.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TranscriptNormalization": { +"description": "Transcription normalization configuration. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.", +"id": "TranscriptNormalization", +"properties": { +"entries": { +"description": "A list of replacement entries. We will perform replacement with one entry at a time. For example, the second entry in [\"cat\" => \"dog\", \"mountain cat\" => \"mountain dog\"] will never be applied because we will always process the first entry before it. At most 100 entries.", +"items": { +"$ref": "Entry" +}, +"type": "array" +} +}, +"type": "object" +}, +"TranscriptOutputConfig": { +"description": "Specifies an optional destination for the recognition results.", +"id": "TranscriptOutputConfig", +"properties": { +"gcsUri": { +"description": "Specifies a Cloud Storage URI for the recognition results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.", +"type": "string" +} +}, +"type": "object" +}, +"WordInfo": { +"description": "Word-specific information for recognized words.", +"id": "WordInfo", +"properties": { +"confidence": { +"description": "The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerLabel": { +"description": "Output only. A label value assigned for every unique speaker within the audio. This field specifies which speaker was detected to have spoken this word. For some models, like medical_conversation this can be actual speaker role, for example \"patient\" or \"provider\", but generally this would be a number identifying a speaker. This field is only set if enable_speaker_diarization = 'true' and only for the top alternative.", +"readOnly": true, +"type": "string" +}, +"speakerTag": { +"deprecated": true, +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from '1' to diarization_speaker_count. speaker_tag is set if enable_speaker_diarization = 'true' and only for the top alternative. Note: Use speaker_label instead.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Speech-to-Text API", +"version": "v1p1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v2beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v2beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..7f7e753e91ef6a7d08cb292fcc32dd35e2e35928 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/speech.v2beta1.json @@ -0,0 +1,407 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://speech.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Speech", + "description": "Converts audio to text by applying powerful neural network models.", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/speech-to-text/docs/quickstart-protocol", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "speech:v2beta1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://speech.mtls.googleapis.com/", + "name": "speech", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "operations": { + "methods": { + "get": { + "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", + "httpMethod": "GET", + "id": "speech.projects.locations.operations.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "The name of the operation resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v2beta1/{+name}", + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `\"/v1/{name=users/*}/operations\"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.", + "flatPath": "v2beta1/projects/{projectsId}/locations/{locationsId}/operations", + "httpMethod": "GET", + "id": "speech.projects.locations.operations.list", + "parameterOrder": [ + "name" + ], + "parameters": { + "filter": { + "description": "The standard list filter.", + "location": "query", + "type": "string" + }, + "name": { + "description": "The name of the operation's parent resource.", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + }, + "pageSize": { + "description": "The standard list page size.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The standard list page token.", + "location": "query", + "type": "string" + } + }, + "path": "v2beta1/{+name}/operations", + "response": { + "$ref": "ListOperationsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20220728", + "rootUrl": "https://speech.googleapis.com/", + "schemas": { + "ListOperationsResponse": { + "description": "The response message for Operations.ListOperations.", + "id": "ListOperationsResponse", + "properties": { + "nextPageToken": { + "description": "The standard List next-page token.", + "type": "string" + }, + "operations": { + "description": "A list of operations that matches the specified filter in the request.", + "items": { + "$ref": "Operation" + }, + "type": "array" + } + }, + "type": "object" + }, + "LongRunningRecognizeMetadata": { + "description": "Describes the progress of a long-running `LongRunningRecognize` call. It is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", + "id": "LongRunningRecognizeMetadata", + "properties": { + "lastUpdateTime": { + "description": "Output only. Time of the most recent processing update.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "progressPercent": { + "description": "Output only. Approximate percentage of audio processed thus far. Guaranteed to be 100 when the audio is fully processed and the results are available.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "startTime": { + "description": "Output only. Time when the request was received.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "uri": { + "description": "The URI of the audio file being transcribed. Empty if the audio was sent as byte content.", + "type": "string" + } + }, + "type": "object" + }, + "LongRunningRecognizeResponse": { + "description": "The only message returned to the client by the `LongRunningRecognize` method. It contains the result as zero or more sequential SpeechRecognitionResult messages. It is included in the `result.response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", + "id": "LongRunningRecognizeResponse", + "properties": { + "results": { + "description": "Output only. Sequential list of transcription results corresponding to sequential portions of audio.", + "items": { + "$ref": "SpeechRecognitionResult" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "Operation": { + "description": "This resource represents a long-running operation that is the result of a network API call.", + "id": "Operation", + "properties": { + "done": { + "description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", + "type": "boolean" + }, + "error": { + "$ref": "Status", + "description": "The error result of the operation in case of failure or cancellation." + }, + "metadata": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", + "type": "object" + }, + "name": { + "description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", + "type": "string" + }, + "response": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "description": "The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", + "type": "object" + } + }, + "type": "object" + }, + "SpeechRecognitionAlternative": { + "description": "Alternative hypotheses (a.k.a. n-best list).", + "id": "SpeechRecognitionAlternative", + "properties": { + "confidence": { + "description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "transcript": { + "description": "Output only. Transcript text representing the words that the user spoke.", + "readOnly": true, + "type": "string" + }, + "words": { + "description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is true, you will see all the words from the beginning of the audio.", + "items": { + "$ref": "WordInfo" + }, + "readOnly": true, + "type": "array" + } + }, + "type": "object" + }, + "SpeechRecognitionResult": { + "description": "A speech recognition result corresponding to a portion of the audio.", + "id": "SpeechRecognitionResult", + "properties": { + "alternatives": { + "description": "Output only. May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", + "items": { + "$ref": "SpeechRecognitionAlternative" + }, + "readOnly": true, + "type": "array" + }, + "channelTag": { + "description": "Output only. For multi-channel audio, this is the channel number corresponding to the recognized result for the audio from that channel. For `audio_channel_count` = N, its output values can range from `1` to `N`.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "languageCode": { + "description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + }, + "Status": { + "description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", + "id": "Status", + "properties": { + "code": { + "description": "The status code, which should be an enum value of google.rpc.Code.", + "format": "int32", + "type": "integer" + }, + "details": { + "description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", + "items": { + "additionalProperties": { + "description": "Properties of the object. Contains field @type with type URL.", + "type": "any" + }, + "type": "object" + }, + "type": "array" + }, + "message": { + "description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", + "type": "string" + } + }, + "type": "object" + }, + "WordInfo": { + "description": "Word-specific information for recognized words.", + "id": "WordInfo", + "properties": { + "confidence": { + "description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative of a non-streaming result or, of a streaming result where `is_final=true`. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", + "format": "float", + "readOnly": true, + "type": "number" + }, + "endOffset": { + "description": "Output only. Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "speakerTag": { + "description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from `1` to `diarization_config.max_speaker_count` . `speaker_tag` is set if `diarization_config.enable_speaker_diarization` = `true` and only in the top alternative.", + "format": "int32", + "readOnly": true, + "type": "integer" + }, + "startOffset": { + "description": "Output only. Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", + "format": "google-duration", + "readOnly": true, + "type": "string" + }, + "word": { + "description": "Output only. The word corresponding to this set of information.", + "readOnly": true, + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Cloud Speech-to-Text API", + "version": "v2beta1", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sqladmin.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sqladmin.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..6261d953fdc4411dc89b044c3ba494a2eccc184f --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sqladmin.v1.json @@ -0,0 +1,6206 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/sqlservice.admin": { +"description": "Manage your Google SQL Service instances" +} +} +} +}, +"basePath": "", +"baseUrl": "https://sqladmin.googleapis.com/", +"batchPath": "batch", +"canonicalName": "SQL Admin", +"description": "API for Cloud SQL database instance management", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/cloud-sql/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "sqladmin:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://sqladmin.mtls.googleapis.com/", +"name": "sqladmin", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"backupRuns": { +"methods": { +"delete": { +"description": "Deletes the backup taken by a backup run.", +"flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", +"httpMethod": "DELETE", +"id": "sql.backupRuns.delete", +"parameterOrder": [ +"project", +"instance", +"id" +], +"parameters": { +"id": { +"description": "The ID of the backup run to delete. To find a backup run ID, use the [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/backupRuns/list) method.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a backup run.", +"flatPath": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", +"httpMethod": "GET", +"id": "sql.backupRuns.get", +"parameterOrder": [ +"project", +"instance", +"id" +], +"parameters": { +"id": { +"description": "The ID of this backup run.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/backupRuns/{id}", +"response": { +"$ref": "BackupRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Creates a new backup run on demand.", +"flatPath": "v1/projects/{project}/instances/{instance}/backupRuns", +"httpMethod": "POST", +"id": "sql.backupRuns.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/backupRuns", +"request": { +"$ref": "BackupRun" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.", +"flatPath": "v1/projects/{project}/instances/{instance}/backupRuns", +"httpMethod": "GET", +"id": "sql.backupRuns.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID, or \"-\" for all instances. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"maxResults": { +"description": "Maximum number of backup runs per response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/backupRuns", +"response": { +"$ref": "BackupRunsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"connect": { +"methods": { +"generateEphemeralCert": { +"description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", +"flatPath": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", +"httpMethod": "POST", +"id": "sql.connect.generateEphemeral", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}:generateEphemeralCert", +"request": { +"$ref": "GenerateEphemeralCertRequest" +}, +"response": { +"$ref": "GenerateEphemeralCertResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves connect settings about a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/connectSettings", +"httpMethod": "GET", +"id": "sql.connect.get", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/connectSettings", +"response": { +"$ref": "ConnectSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"databases": { +"methods": { +"delete": { +"description": "Deletes a database from a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "DELETE", +"id": "sql.databases.delete", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database to be deleted in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/databases/{database}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a database inside a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "GET", +"id": "sql.databases.get", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/databases/{database}", +"response": { +"$ref": "Database" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Inserts a resource containing information about a database inside a Cloud SQL instance. **Note:** You can't modify the default character set and collation.", +"flatPath": "v1/projects/{project}/instances/{instance}/databases", +"httpMethod": "POST", +"id": "sql.databases.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/databases", +"request": { +"$ref": "Database" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists databases in the specified Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/databases", +"httpMethod": "GET", +"id": "sql.databases.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/databases", +"response": { +"$ref": "DatabasesListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"patch": { +"description": "Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.", +"flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "PATCH", +"id": "sql.databases.patch", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database to be updated in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/databases/{database}", +"request": { +"$ref": "Database" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"update": { +"description": "Updates a resource containing information about a database inside a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "PUT", +"id": "sql.databases.update", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database to be updated in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/databases/{database}", +"request": { +"$ref": "Database" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"flags": { +"methods": { +"list": { +"description": "Lists all available database flags for Cloud SQL instances.", +"flatPath": "v1/flags", +"httpMethod": "GET", +"id": "sql.flags.list", +"parameterOrder": [], +"parameters": { +"databaseVersion": { +"description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.", +"location": "query", +"type": "string" +} +}, +"path": "v1/flags", +"response": { +"$ref": "FlagsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"instances": { +"methods": { +"acquireSsrsLease": { +"description": "Acquire a lease for the setup of SQL Server Reporting Services (SSRS).", +"flatPath": "v1/projects/{project}/instances/{instance}/acquireSsrsLease", +"httpMethod": "POST", +"id": "sql.instances.acquireSsrsLease", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Required. Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id).", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Required. Project ID of the project that contains the instance (Example: project-id).", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/acquireSsrsLease", +"request": { +"$ref": "InstancesAcquireSsrsLeaseRequest" +}, +"response": { +"$ref": "SqlInstancesAcquireSsrsLeaseResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"addServerCa": { +"description": "Adds a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.", +"flatPath": "v1/projects/{project}/instances/{instance}/addServerCa", +"httpMethod": "POST", +"id": "sql.instances.addServerCa", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/addServerCa", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"clone": { +"description": "Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.", +"flatPath": "v1/projects/{project}/instances/{instance}/clone", +"httpMethod": "POST", +"id": "sql.instances.clone", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the source as well as the clone Cloud SQL instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/clone", +"request": { +"$ref": "InstancesCloneRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"delete": { +"description": "Deletes a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}", +"httpMethod": "DELETE", +"id": "sql.instances.delete", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance to be deleted.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"demote": { +"description": "Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server.", +"flatPath": "v1/projects/{project}/instances/{instance}/demote", +"httpMethod": "POST", +"id": "sql.instances.demote", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Required. Cloud SQL instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Required. ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/demote", +"request": { +"$ref": "InstancesDemoteRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"demoteMaster": { +"description": "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", +"flatPath": "v1/projects/{project}/instances/{instance}/demoteMaster", +"httpMethod": "POST", +"id": "sql.instances.demoteMaster", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/demoteMaster", +"request": { +"$ref": "InstancesDemoteMasterRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"export": { +"description": "Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.", +"flatPath": "v1/projects/{project}/instances/{instance}/export", +"httpMethod": "POST", +"id": "sql.instances.export", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance to be exported.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/export", +"request": { +"$ref": "InstancesExportRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"failover": { +"description": "Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability](https://cloud.google.com/sql/docs/mysql/high-availability) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/failover", +"httpMethod": "POST", +"id": "sql.instances.failover", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/failover", +"request": { +"$ref": "InstancesFailoverRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}", +"httpMethod": "GET", +"id": "sql.instances.get", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}", +"response": { +"$ref": "DatabaseInstance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"import": { +"description": "Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.", +"flatPath": "v1/projects/{project}/instances/{instance}/import", +"httpMethod": "POST", +"id": "sql.instances.import", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/import", +"request": { +"$ref": "InstancesImportRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"insert": { +"description": "Creates a new Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances", +"httpMethod": "POST", +"id": "sql.instances.insert", +"parameterOrder": [ +"project" +], +"parameters": { +"project": { +"description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances", +"request": { +"$ref": "DatabaseInstance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists instances under a given project.", +"flatPath": "v1/projects/{project}/instances", +"httpMethod": "GET", +"id": "sql.instances.list", +"parameterOrder": [ +"project" +], +"parameters": { +"filter": { +"description": "A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", +"format": "uint32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project for which to list Cloud SQL instances.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances", +"response": { +"$ref": "InstancesListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"listServerCas": { +"description": "Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.", +"flatPath": "v1/projects/{project}/instances/{instance}/listServerCas", +"httpMethod": "GET", +"id": "sql.instances.listServerCas", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/listServerCas", +"response": { +"$ref": "InstancesListServerCasResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"patch": { +"description": "Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.", +"flatPath": "v1/projects/{project}/instances/{instance}", +"httpMethod": "PATCH", +"id": "sql.instances.patch", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}", +"request": { +"$ref": "DatabaseInstance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"promoteReplica": { +"description": "Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.", +"flatPath": "v1/projects/{project}/instances/{instance}/promoteReplica", +"httpMethod": "POST", +"id": "sql.instances.promoteReplica", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"failover": { +"description": "Set to true if the promote operation should attempt to re-add the original primary as a replica when it comes back online. Otherwise, if this value is false or not set, the original primary will be a standalone instance.", +"location": "query", +"type": "boolean" +}, +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/promoteReplica", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"reencrypt": { +"description": "Reencrypt CMEK instance with latest key version.", +"flatPath": "v1/projects/{project}/instances/{instance}/reencrypt", +"httpMethod": "POST", +"id": "sql.instances.reencrypt", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/reencrypt", +"request": { +"$ref": "InstancesReencryptRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"releaseSsrsLease": { +"description": "Release a lease for the setup of SQL Server Reporting Services (SSRS).", +"flatPath": "v1/projects/{project}/instances/{instance}/releaseSsrsLease", +"httpMethod": "POST", +"id": "sql.instances.releaseSsrsLease", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Required. The Cloud SQL instance ID. This doesn't include the project ID. The instance ID contains lowercase letters, numbers, and hyphens, and it must start with a letter. This ID can have a maximum length of 98 characters.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Required. The project ID that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/releaseSsrsLease", +"response": { +"$ref": "SqlInstancesReleaseSsrsLeaseResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"resetSslConfig": { +"description": "Deletes all client certificates and generates a new server SSL certificate for the instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/resetSslConfig", +"httpMethod": "POST", +"id": "sql.instances.resetSslConfig", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/resetSslConfig", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"restart": { +"description": "Restarts a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/restart", +"httpMethod": "POST", +"id": "sql.instances.restart", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance to be restarted.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/restart", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"restoreBackup": { +"description": "Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.", +"flatPath": "v1/projects/{project}/instances/{instance}/restoreBackup", +"httpMethod": "POST", +"id": "sql.instances.restoreBackup", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/restoreBackup", +"request": { +"$ref": "InstancesRestoreBackupRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"rotateServerCa": { +"description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.", +"flatPath": "v1/projects/{project}/instances/{instance}/rotateServerCa", +"httpMethod": "POST", +"id": "sql.instances.rotateServerCa", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/rotateServerCa", +"request": { +"$ref": "InstancesRotateServerCaRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"startReplica": { +"description": "Starts the replication in the read replica instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/startReplica", +"httpMethod": "POST", +"id": "sql.instances.startReplica", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/startReplica", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"stopReplica": { +"description": "Stops the replication in the read replica instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/stopReplica", +"httpMethod": "POST", +"id": "sql.instances.stopReplica", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/stopReplica", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"switchover": { +"description": "Switches over from the primary instance to the replica instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/switchover", +"httpMethod": "POST", +"id": "sql.instances.switchover", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"dbTimeout": { +"description": "Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24 hours.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/switchover", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"truncateLog": { +"description": "Truncate MySQL general and slow query log tables MySQL only.", +"flatPath": "v1/projects/{project}/instances/{instance}/truncateLog", +"httpMethod": "POST", +"id": "sql.instances.truncateLog", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the Cloud SQL project.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/truncateLog", +"request": { +"$ref": "InstancesTruncateLogRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"update": { +"description": "Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.", +"flatPath": "v1/projects/{project}/instances/{instance}", +"httpMethod": "PUT", +"id": "sql.instances.update", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}", +"request": { +"$ref": "DatabaseInstance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "Cancels an instance operation that has been performed on an instance.", +"flatPath": "v1/projects/{project}/operations/{operation}/cancel", +"httpMethod": "POST", +"id": "sql.operations.cancel", +"parameterOrder": [ +"project", +"operation" +], +"parameters": { +"operation": { +"description": "Instance operation ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/operations/{operation}/cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves an instance operation that has been performed on an instance.", +"flatPath": "v1/projects/{project}/operations/{operation}", +"httpMethod": "GET", +"id": "sql.operations.get", +"parameterOrder": [ +"project", +"operation" +], +"parameters": { +"operation": { +"description": "Instance operation ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/operations/{operation}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.", +"flatPath": "v1/projects/{project}/operations", +"httpMethod": "GET", +"id": "sql.operations.list", +"parameterOrder": [ +"project" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Maximum number of operations per response.", +"format": "uint32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/operations", +"response": { +"$ref": "OperationsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"projects": { +"resources": { +"instances": { +"methods": { +"getDiskShrinkConfig": { +"description": "Get Disk Shrink Config for a given instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/getDiskShrinkConfig", +"httpMethod": "GET", +"id": "sql.projects.instances.getDiskShrinkConfig", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/getDiskShrinkConfig", +"response": { +"$ref": "SqlInstancesGetDiskShrinkConfigResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"getLatestRecoveryTime": { +"description": "Get Latest Recovery Time for a given instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/getLatestRecoveryTime", +"httpMethod": "GET", +"id": "sql.projects.instances.getLatestRecoveryTime", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/getLatestRecoveryTime", +"response": { +"$ref": "SqlInstancesGetLatestRecoveryTimeResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"performDiskShrink": { +"description": "Perform Disk Shrink on primary instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/performDiskShrink", +"httpMethod": "POST", +"id": "sql.projects.instances.performDiskShrink", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/performDiskShrink", +"request": { +"$ref": "PerformDiskShrinkContext" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"rescheduleMaintenance": { +"description": "Reschedules the maintenance on the given instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance", +"httpMethod": "POST", +"id": "sql.projects.instances.rescheduleMaintenance", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/rescheduleMaintenance", +"request": { +"$ref": "SqlInstancesRescheduleMaintenanceRequestBody" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"resetReplicaSize": { +"description": "Reset Replica Size to primary instance disk size.", +"flatPath": "v1/projects/{project}/instances/{instance}/resetReplicaSize", +"httpMethod": "POST", +"id": "sql.projects.instances.resetReplicaSize", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/resetReplicaSize", +"request": { +"$ref": "SqlInstancesResetReplicaSizeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"startExternalSync": { +"description": "Start External primary instance migration.", +"flatPath": "v1/projects/{project}/instances/{instance}/startExternalSync", +"httpMethod": "POST", +"id": "sql.projects.instances.startExternalSync", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/startExternalSync", +"request": { +"$ref": "SqlInstancesStartExternalSyncRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"verifyExternalSyncSettings": { +"description": "Verify External primary instance external sync settings.", +"flatPath": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings", +"httpMethod": "POST", +"id": "sql.projects.instances.verifyExternalSyncSettings", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/verifyExternalSyncSettings", +"request": { +"$ref": "SqlInstancesVerifyExternalSyncSettingsRequest" +}, +"response": { +"$ref": "SqlInstancesVerifyExternalSyncSettingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +} +} +}, +"sslCerts": { +"methods": { +"createEphemeral": { +"description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", +"flatPath": "v1/projects/{project}/instances/{instance}/createEphemeral", +"httpMethod": "POST", +"id": "sql.sslCerts.createEphemeral", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the Cloud SQL project.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/createEphemeral", +"request": { +"$ref": "SslCertsCreateEphemeralRequest" +}, +"response": { +"$ref": "SslCert" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"delete": { +"description": "Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.", +"flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"httpMethod": "DELETE", +"id": "sql.sslCerts.delete", +"parameterOrder": [ +"project", +"instance", +"sha1Fingerprint" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 FingerPrint.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.", +"flatPath": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"httpMethod": "GET", +"id": "sql.sslCerts.get", +"parameterOrder": [ +"project", +"instance", +"sha1Fingerprint" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 FingerPrint.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"response": { +"$ref": "SslCert" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.", +"flatPath": "v1/projects/{project}/instances/{instance}/sslCerts", +"httpMethod": "POST", +"id": "sql.sslCerts.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/sslCerts", +"request": { +"$ref": "SslCertsInsertRequest" +}, +"response": { +"$ref": "SslCertsInsertResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists all of the current SSL certificates for the instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/sslCerts", +"httpMethod": "GET", +"id": "sql.sslCerts.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/sslCerts", +"response": { +"$ref": "SslCertsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"tiers": { +"methods": { +"list": { +"description": "Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For more information, see https://cloud.google.com/sql/pricing.", +"flatPath": "v1/projects/{project}/tiers", +"httpMethod": "GET", +"id": "sql.tiers.list", +"parameterOrder": [ +"project" +], +"parameters": { +"project": { +"description": "Project ID of the project for which to list tiers.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/tiers", +"response": { +"$ref": "TiersListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"users": { +"methods": { +"delete": { +"description": "Deletes a user from a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/users", +"httpMethod": "DELETE", +"id": "sql.users.delete", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"host": { +"description": "Host of the user in the instance.", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "Name of the user in the instance.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/users", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a user.", +"flatPath": "v1/projects/{project}/instances/{instance}/users/{name}", +"httpMethod": "GET", +"id": "sql.users.get", +"parameterOrder": [ +"project", +"instance", +"name" +], +"parameters": { +"host": { +"description": "Host of a user of the instance.", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "User of the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/users/{name}", +"response": { +"$ref": "User" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Creates a new user in a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/users", +"httpMethod": "POST", +"id": "sql.users.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/users", +"request": { +"$ref": "User" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists users in the specified Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/users", +"httpMethod": "GET", +"id": "sql.users.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/users", +"response": { +"$ref": "UsersListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"update": { +"description": "Updates an existing user in a Cloud SQL instance.", +"flatPath": "v1/projects/{project}/instances/{instance}/users", +"httpMethod": "PUT", +"id": "sql.users.update", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"host": { +"description": "Optional. Host of the user in the instance.", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "Name of the user in the instance.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{project}/instances/{instance}/users", +"request": { +"$ref": "User" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://sqladmin.googleapis.com/", +"schemas": { +"AclEntry": { +"description": "An entry for an Access Control list.", +"id": "AclEntry", +"properties": { +"expirationTime": { +"description": "The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"kind": { +"description": "This is always `sql#aclEntry`.", +"type": "string" +}, +"name": { +"description": "Optional. A label to identify this entry.", +"type": "string" +}, +"value": { +"description": "The allowlisted value for the access control list.", +"type": "string" +} +}, +"type": "object" +}, +"AcquireSsrsLeaseContext": { +"description": "Acquire SSRS lease context.", +"id": "AcquireSsrsLeaseContext", +"properties": { +"duration": { +"description": "Lease duration needed for SSRS setup.", +"format": "google-duration", +"type": "string" +}, +"reportDatabase": { +"description": "The report database to be used for SSRS setup.", +"type": "string" +}, +"serviceLogin": { +"description": "The username to be used as the service login to connect to the report database for SSRS setup.", +"type": "string" +}, +"setupLogin": { +"description": "The username to be used as the setup login to connect to the database server for SSRS setup.", +"type": "string" +} +}, +"type": "object" +}, +"AdvancedMachineFeatures": { +"description": "Specifies options for controlling advanced machine features.", +"id": "AdvancedMachineFeatures", +"properties": { +"threadsPerCore": { +"description": "The number of threads per physical core.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ApiWarning": { +"description": "An Admin API warning message.", +"id": "ApiWarning", +"properties": { +"code": { +"description": "Code to uniquely identify the warning type.", +"enum": [ +"SQL_API_WARNING_CODE_UNSPECIFIED", +"REGION_UNREACHABLE", +"MAX_RESULTS_EXCEEDS_LIMIT", +"COMPROMISED_CREDENTIALS", +"INTERNAL_STATE_FAILURE" +], +"enumDescriptions": [ +"An unknown or unset warning type from Cloud SQL API.", +"Warning when one or more regions are not reachable. The returned result set may be incomplete.", +"Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.", +"Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.", +"Warning when the operation succeeds but some non-critical workflow state failed." +], +"type": "string" +}, +"message": { +"description": "The warning message.", +"type": "string" +}, +"region": { +"description": "The region name for REGION_UNREACHABLE warning.", +"type": "string" +} +}, +"type": "object" +}, +"BackupConfiguration": { +"description": "Database instance backup configuration.", +"id": "BackupConfiguration", +"properties": { +"backupRetentionSettings": { +"$ref": "BackupRetentionSettings", +"description": "Backup retention settings." +}, +"binaryLogEnabled": { +"description": "(MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.", +"type": "boolean" +}, +"enabled": { +"description": "Whether this configuration is enabled.", +"type": "boolean" +}, +"kind": { +"description": "This is always `sql#backupConfiguration`.", +"type": "string" +}, +"location": { +"description": "Location of the backup", +"type": "string" +}, +"pointInTimeRecoveryEnabled": { +"description": "Whether point in time recovery is enabled.", +"type": "boolean" +}, +"replicationLogArchivingEnabled": { +"description": "Reserved for future use.", +"type": "boolean" +}, +"startTime": { +"description": "Start time for the daily backup configuration in UTC timezone in the 24 hour format - `HH:MM`.", +"type": "string" +}, +"transactionLogRetentionDays": { +"description": "The number of days of transaction logs we retain for point in time restore, from 1-7.", +"format": "int32", +"type": "integer" +}, +"transactionalLogStorageState": { +"description": "Output only. This value contains the storage location of transactional logs for the database for point-in-time recovery.", +"enum": [ +"TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED", +"DISK", +"SWITCHING_TO_CLOUD_STORAGE", +"SWITCHED_TO_CLOUD_STORAGE", +"CLOUD_STORAGE" +], +"enumDescriptions": [ +"Unspecified.", +"The transaction logs for the instance are stored on a data disk.", +"The transaction logs for the instance are switching from being stored on a data disk to being stored in Cloud Storage.", +"The transaction logs for the instance are now stored in Cloud Storage. Previously, they were stored on a data disk.", +"The transaction logs for the instance are stored in Cloud Storage." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"BackupContext": { +"description": "Backup context.", +"id": "BackupContext", +"properties": { +"backupId": { +"description": "The identifier of the backup.", +"format": "int64", +"type": "string" +}, +"kind": { +"description": "This is always `sql#backupContext`.", +"type": "string" +} +}, +"type": "object" +}, +"BackupReencryptionConfig": { +"description": "Backup Reencryption Config", +"id": "BackupReencryptionConfig", +"properties": { +"backupLimit": { +"description": "Backup re-encryption limit", +"format": "int32", +"type": "integer" +}, +"backupType": { +"description": "Type of backups users want to re-encrypt.", +"enum": [ +"BACKUP_TYPE_UNSPECIFIED", +"AUTOMATED", +"ON_DEMAND" +], +"enumDescriptions": [ +"Unknown backup type, will be defaulted to AUTOMATIC backup type", +"Reencrypt automatic backups", +"Reencrypt on-demand backups" +], +"type": "string" +} +}, +"type": "object" +}, +"BackupRetentionSettings": { +"description": "We currently only support backup retention by specifying the number of backups we will retain.", +"id": "BackupRetentionSettings", +"properties": { +"retainedBackups": { +"description": "Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.", +"format": "int32", +"type": "integer" +}, +"retentionUnit": { +"description": "The unit that 'retained_backups' represents.", +"enum": [ +"RETENTION_UNIT_UNSPECIFIED", +"COUNT" +], +"enumDescriptions": [ +"Backup retention unit is unspecified, will be treated as COUNT.", +"Retention will be by count, eg. \"retain the most recent 7 backups\"." +], +"type": "string" +} +}, +"type": "object" +}, +"BackupRun": { +"description": "A BackupRun resource.", +"id": "BackupRun", +"properties": { +"backupKind": { +"description": "Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.", +"enum": [ +"SQL_BACKUP_KIND_UNSPECIFIED", +"SNAPSHOT", +"PHYSICAL" +], +"enumDescriptions": [ +"This is an unknown BackupKind.", +"The snapshot based backups", +"Physical backups" +], +"type": "string" +}, +"description": { +"description": "The description of this run, only applicable to on-demand backups.", +"type": "string" +}, +"diskEncryptionConfiguration": { +"$ref": "DiskEncryptionConfiguration", +"description": "Encryption configuration specific to a backup." +}, +"diskEncryptionStatus": { +"$ref": "DiskEncryptionStatus", +"description": "Encryption status specific to a backup." +}, +"endTime": { +"description": "The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"enqueuedTime": { +"description": "The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "OperationError", +"description": "Information about why the backup operation failed. This is only present if the run has the FAILED status." +}, +"id": { +"description": "The identifier for this backup run. Unique only for a specific Cloud SQL instance.", +"format": "int64", +"type": "string" +}, +"instance": { +"description": "Name of the database instance.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#backupRun`.", +"type": "string" +}, +"location": { +"description": "Location of the backups.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"startTime": { +"description": "The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"status": { +"description": "The status of this run.", +"enum": [ +"SQL_BACKUP_RUN_STATUS_UNSPECIFIED", +"ENQUEUED", +"OVERDUE", +"RUNNING", +"FAILED", +"SUCCESSFUL", +"SKIPPED", +"DELETION_PENDING", +"DELETION_FAILED", +"DELETED" +], +"enumDescriptions": [ +"The status of the run is unknown.", +"The backup operation was enqueued.", +"The backup is overdue across a given backup window. Indicates a problem. Example: Long-running operation in progress during the whole window.", +"The backup is in progress.", +"The backup failed.", +"The backup was successful.", +"The backup was skipped (without problems) for a given backup window. Example: Instance was idle.", +"The backup is about to be deleted.", +"The backup deletion failed.", +"The backup has been deleted." +], +"type": "string" +}, +"timeZone": { +"description": "Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server.", +"type": "string" +}, +"type": { +"description": "The type of this run; can be either \"AUTOMATED\" or \"ON_DEMAND\" or \"FINAL\". This field defaults to \"ON_DEMAND\" and is ignored, when specified for insert requests.", +"enum": [ +"SQL_BACKUP_RUN_TYPE_UNSPECIFIED", +"AUTOMATED", +"ON_DEMAND" +], +"enumDescriptions": [ +"This is an unknown BackupRun type.", +"The backup schedule automatically triggers a backup.", +"The user manually triggers a backup." +], +"type": "string" +}, +"windowStartTime": { +"description": "The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"BackupRunsListResponse": { +"description": "Backup run list results.", +"id": "BackupRunsListResponse", +"properties": { +"items": { +"description": "A list of backup runs in reverse chronological order of the enqueued time.", +"items": { +"$ref": "BackupRun" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#backupRunsList`.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"BinLogCoordinates": { +"description": "Binary log coordinates.", +"id": "BinLogCoordinates", +"properties": { +"binLogFileName": { +"description": "Name of the binary log file for a Cloud SQL instance.", +"type": "string" +}, +"binLogPosition": { +"description": "Position (offset) within the binary log file.", +"format": "int64", +"type": "string" +}, +"kind": { +"description": "This is always `sql#binLogCoordinates`.", +"type": "string" +} +}, +"type": "object" +}, +"CloneContext": { +"description": "Database instance clone context.", +"id": "CloneContext", +"properties": { +"allocatedIpRange": { +"description": "The name of the allocated ip range for the private ip Cloud SQL instance. For example: \"google-managed-services-default\". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.", +"type": "string" +}, +"binLogCoordinates": { +"$ref": "BinLogCoordinates", +"description": "Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates." +}, +"databaseNames": { +"description": "(SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.", +"items": { +"type": "string" +}, +"type": "array" +}, +"destinationInstanceName": { +"description": "Name of the Cloud SQL instance to be created as a clone.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#cloneContext`.", +"type": "string" +}, +"pitrTimestampMs": { +"description": "Reserved for future use.", +"format": "int64", +"type": "string" +}, +"pointInTime": { +"description": "Timestamp, if specified, identifies the time to which the source instance is cloned.", +"format": "google-datetime", +"type": "string" +}, +"preferredZone": { +"description": "Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance.", +"type": "string" +} +}, +"type": "object" +}, +"ConnectSettings": { +"description": "Connect settings retrieval response.", +"id": "ConnectSettings", +"properties": { +"backendType": { +"description": "`SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.", +"enum": [ +"SQL_BACKEND_TYPE_UNSPECIFIED", +"FIRST_GEN", +"SECOND_GEN", +"EXTERNAL" +], +"enumDeprecated": [ +false, +true, +false, +false +], +"enumDescriptions": [ +"This is an unknown backend type for instance.", +"V1 speckle instance.", +"V2 speckle instance.", +"On premises instance." +], +"type": "string" +}, +"databaseVersion": { +"description": "The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11`, `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`.", +"enum": [ +"SQL_DATABASE_VERSION_UNSPECIFIED", +"MYSQL_5_1", +"MYSQL_5_5", +"MYSQL_5_6", +"MYSQL_5_7", +"SQLSERVER_2017_STANDARD", +"SQLSERVER_2017_ENTERPRISE", +"SQLSERVER_2017_EXPRESS", +"SQLSERVER_2017_WEB", +"POSTGRES_9_6", +"POSTGRES_10", +"POSTGRES_11", +"POSTGRES_12", +"POSTGRES_13", +"POSTGRES_14", +"POSTGRES_15", +"MYSQL_8_0", +"MYSQL_8_0_18", +"MYSQL_8_0_26", +"MYSQL_8_0_27", +"MYSQL_8_0_28", +"MYSQL_8_0_29", +"MYSQL_8_0_30", +"MYSQL_8_0_31", +"MYSQL_8_0_32", +"MYSQL_8_0_33", +"MYSQL_8_0_34", +"MYSQL_8_0_35", +"MYSQL_8_0_36", +"MYSQL_8_0_37", +"MYSQL_8_0_38", +"MYSQL_8_0_39", +"MYSQL_8_0_40", +"SQLSERVER_2019_STANDARD", +"SQLSERVER_2019_ENTERPRISE", +"SQLSERVER_2019_EXPRESS", +"SQLSERVER_2019_WEB", +"SQLSERVER_2022_STANDARD", +"SQLSERVER_2022_ENTERPRISE", +"SQLSERVER_2022_EXPRESS", +"SQLSERVER_2022_WEB" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"This is an unknown database version.", +"The database version is MySQL 5.1.", +"The database version is MySQL 5.5.", +"The database version is MySQL 5.6.", +"The database version is MySQL 5.7.", +"The database version is SQL Server 2017 Standard.", +"The database version is SQL Server 2017 Enterprise.", +"The database version is SQL Server 2017 Express.", +"The database version is SQL Server 2017 Web.", +"The database version is PostgreSQL 9.6.", +"The database version is PostgreSQL 10.", +"The database version is PostgreSQL 11.", +"The database version is PostgreSQL 12.", +"The database version is PostgreSQL 13.", +"The database version is PostgreSQL 14.", +"The database version is PostgreSQL 15.", +"The database version is MySQL 8.", +"The database major version is MySQL 8.0 and the minor version is 18.", +"The database major version is MySQL 8.0 and the minor version is 26.", +"The database major version is MySQL 8.0 and the minor version is 27.", +"The database major version is MySQL 8.0 and the minor version is 28.", +"The database major version is MySQL 8.0 and the minor version is 29.", +"The database major version is MySQL 8.0 and the minor version is 30.", +"The database major version is MySQL 8.0 and the minor version is 31.", +"The database major version is MySQL 8.0 and the minor version is 32.", +"The database major version is MySQL 8.0 and the minor version is 33.", +"The database major version is MySQL 8.0 and the minor version is 34.", +"The database major version is MySQL 8.0 and the minor version is 35.", +"The database major version is MySQL 8.0 and the minor version is 36.", +"The database major version is MySQL 8.0 and the minor version is 37.", +"The database major version is MySQL 8.0 and the minor version is 38.", +"The database major version is MySQL 8.0 and the minor version is 39.", +"The database major version is MySQL 8.0 and the minor version is 40.", +"The database version is SQL Server 2019 Standard.", +"The database version is SQL Server 2019 Enterprise.", +"The database version is SQL Server 2019 Express.", +"The database version is SQL Server 2019 Web.", +"The database version is SQL Server 2022 Standard.", +"The database version is SQL Server 2022 Enterprise.", +"The database version is SQL Server 2022 Express.", +"The database version is SQL Server 2022 Web." +], +"type": "string" +}, +"dnsName": { +"description": "The dns name of the instance.", +"type": "string" +}, +"ipAddresses": { +"description": "The assigned IP addresses for the instance.", +"items": { +"$ref": "IpMapping" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#connectSettings`.", +"type": "string" +}, +"pscEnabled": { +"description": "Whether PSC connectivity is enabled for this instance.", +"type": "boolean" +}, +"region": { +"description": "The cloud region for the instance. For example, `us-central1`, `europe-west1`. The region cannot be changed after instance creation.", +"type": "string" +}, +"serverCaCert": { +"$ref": "SslCert", +"description": "SSL configuration." +} +}, +"type": "object" +}, +"DataCacheConfig": { +"description": "Data cache configurations.", +"id": "DataCacheConfig", +"properties": { +"dataCacheEnabled": { +"description": "Whether data cache is enabled for the instance.", +"type": "boolean" +} +}, +"type": "object" +}, +"Database": { +"description": "Represents a SQL database on the Cloud SQL instance.", +"id": "Database", +"properties": { +"charset": { +"description": "The Cloud SQL charset value.", +"type": "string" +}, +"collation": { +"description": "The Cloud SQL collation value.", +"type": "string" +}, +"etag": { +"description": "This field is deprecated and will be removed from a future version of the API.", +"type": "string" +}, +"instance": { +"description": "The name of the Cloud SQL instance. This does not include the project ID.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#database`.", +"type": "string" +}, +"name": { +"description": "The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.", +"type": "string" +}, +"project": { +"description": "The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"sqlserverDatabaseDetails": { +"$ref": "SqlServerDatabaseDetails" +} +}, +"type": "object" +}, +"DatabaseFlags": { +"description": "Database flags for Cloud SQL instances.", +"id": "DatabaseFlags", +"properties": { +"name": { +"description": "The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL documentation.", +"type": "string" +}, +"value": { +"description": "The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value.", +"type": "string" +} +}, +"type": "object" +}, +"DatabaseInstance": { +"description": "A Cloud SQL instance resource.", +"id": "DatabaseInstance", +"properties": { +"availableMaintenanceVersions": { +"description": "Output only. List all maintenance versions applicable on the instance", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"backendType": { +"description": "The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.", +"enum": [ +"SQL_BACKEND_TYPE_UNSPECIFIED", +"FIRST_GEN", +"SECOND_GEN", +"EXTERNAL" +], +"enumDeprecated": [ +false, +true, +false, +false +], +"enumDescriptions": [ +"This is an unknown backend type for instance.", +"V1 speckle instance.", +"V2 speckle instance.", +"On premises instance." +], +"type": "string" +}, +"connectionName": { +"description": "Connection name of the Cloud SQL instance used in connection strings.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"currentDiskSize": { +"deprecated": true, +"description": "The current disk usage of the instance in bytes. This property has been deprecated. Use the \"cloudsql.googleapis.com/database/disk/bytes_used\" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details.", +"format": "int64", +"type": "string" +}, +"databaseInstalledVersion": { +"description": "Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.", +"readOnly": true, +"type": "string" +}, +"databaseVersion": { +"description": "The database engine type and version. The `databaseVersion` field cannot be changed after instance creation.", +"enum": [ +"SQL_DATABASE_VERSION_UNSPECIFIED", +"MYSQL_5_1", +"MYSQL_5_5", +"MYSQL_5_6", +"MYSQL_5_7", +"SQLSERVER_2017_STANDARD", +"SQLSERVER_2017_ENTERPRISE", +"SQLSERVER_2017_EXPRESS", +"SQLSERVER_2017_WEB", +"POSTGRES_9_6", +"POSTGRES_10", +"POSTGRES_11", +"POSTGRES_12", +"POSTGRES_13", +"POSTGRES_14", +"POSTGRES_15", +"MYSQL_8_0", +"MYSQL_8_0_18", +"MYSQL_8_0_26", +"MYSQL_8_0_27", +"MYSQL_8_0_28", +"MYSQL_8_0_29", +"MYSQL_8_0_30", +"MYSQL_8_0_31", +"MYSQL_8_0_32", +"MYSQL_8_0_33", +"MYSQL_8_0_34", +"MYSQL_8_0_35", +"MYSQL_8_0_36", +"MYSQL_8_0_37", +"MYSQL_8_0_38", +"MYSQL_8_0_39", +"MYSQL_8_0_40", +"SQLSERVER_2019_STANDARD", +"SQLSERVER_2019_ENTERPRISE", +"SQLSERVER_2019_EXPRESS", +"SQLSERVER_2019_WEB", +"SQLSERVER_2022_STANDARD", +"SQLSERVER_2022_ENTERPRISE", +"SQLSERVER_2022_EXPRESS", +"SQLSERVER_2022_WEB" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"This is an unknown database version.", +"The database version is MySQL 5.1.", +"The database version is MySQL 5.5.", +"The database version is MySQL 5.6.", +"The database version is MySQL 5.7.", +"The database version is SQL Server 2017 Standard.", +"The database version is SQL Server 2017 Enterprise.", +"The database version is SQL Server 2017 Express.", +"The database version is SQL Server 2017 Web.", +"The database version is PostgreSQL 9.6.", +"The database version is PostgreSQL 10.", +"The database version is PostgreSQL 11.", +"The database version is PostgreSQL 12.", +"The database version is PostgreSQL 13.", +"The database version is PostgreSQL 14.", +"The database version is PostgreSQL 15.", +"The database version is MySQL 8.", +"The database major version is MySQL 8.0 and the minor version is 18.", +"The database major version is MySQL 8.0 and the minor version is 26.", +"The database major version is MySQL 8.0 and the minor version is 27.", +"The database major version is MySQL 8.0 and the minor version is 28.", +"The database major version is MySQL 8.0 and the minor version is 29.", +"The database major version is MySQL 8.0 and the minor version is 30.", +"The database major version is MySQL 8.0 and the minor version is 31.", +"The database major version is MySQL 8.0 and the minor version is 32.", +"The database major version is MySQL 8.0 and the minor version is 33.", +"The database major version is MySQL 8.0 and the minor version is 34.", +"The database major version is MySQL 8.0 and the minor version is 35.", +"The database major version is MySQL 8.0 and the minor version is 36.", +"The database major version is MySQL 8.0 and the minor version is 37.", +"The database major version is MySQL 8.0 and the minor version is 38.", +"The database major version is MySQL 8.0 and the minor version is 39.", +"The database major version is MySQL 8.0 and the minor version is 40.", +"The database version is SQL Server 2019 Standard.", +"The database version is SQL Server 2019 Enterprise.", +"The database version is SQL Server 2019 Express.", +"The database version is SQL Server 2019 Web.", +"The database version is SQL Server 2022 Standard.", +"The database version is SQL Server 2022 Enterprise.", +"The database version is SQL Server 2022 Express.", +"The database version is SQL Server 2022 Web." +], +"type": "string" +}, +"diskEncryptionConfiguration": { +"$ref": "DiskEncryptionConfiguration", +"description": "Disk encryption configuration specific to an instance." +}, +"diskEncryptionStatus": { +"$ref": "DiskEncryptionStatus", +"description": "Disk encryption status specific to an instance." +}, +"dnsName": { +"description": "Output only. The dns name of the instance.", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.", +"type": "string" +}, +"failoverReplica": { +"description": "The name and status of the failover replica.", +"properties": { +"available": { +"description": "The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.", +"type": "boolean" +}, +"name": { +"description": "The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID.", +"type": "string" +} +}, +"type": "object" +}, +"gceZone": { +"description": "The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance.", +"type": "string" +}, +"geminiConfig": { +"$ref": "GeminiInstanceConfig", +"description": "Gemini configuration." +}, +"instanceType": { +"description": "The instance type.", +"enum": [ +"SQL_INSTANCE_TYPE_UNSPECIFIED", +"CLOUD_SQL_INSTANCE", +"ON_PREMISES_INSTANCE", +"READ_REPLICA_INSTANCE" +], +"enumDescriptions": [ +"This is an unknown Cloud SQL instance type.", +"A regular Cloud SQL instance that is not replicating from a primary instance.", +"An instance running on the customer's premises that is not managed by Cloud SQL.", +"A Cloud SQL instance acting as a read-replica." +], +"type": "string" +}, +"ipAddresses": { +"description": "The assigned IP addresses for the instance.", +"items": { +"$ref": "IpMapping" +}, +"type": "array" +}, +"ipv6Address": { +"deprecated": true, +"description": "The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#instance`.", +"type": "string" +}, +"maintenanceVersion": { +"description": "The current software version on the instance.", +"type": "string" +}, +"masterInstanceName": { +"description": "The name of the instance which will act as primary in the replication setup.", +"type": "string" +}, +"maxDiskSize": { +"deprecated": true, +"description": "The maximum disk size of the instance in bytes.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Name of the Cloud SQL instance. This does not include the project ID.", +"type": "string" +}, +"onPremisesConfiguration": { +"$ref": "OnPremisesConfiguration", +"description": "Configuration specific to on-premises instances." +}, +"outOfDiskReport": { +"$ref": "SqlOutOfDiskReport", +"description": "This field represents the report generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job" +}, +"primaryDnsName": { +"deprecated": true, +"description": "Output only. DEPRECATED: please use write_endpoint instead.", +"readOnly": true, +"type": "string" +}, +"project": { +"description": "The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.", +"type": "string" +}, +"pscServiceAttachmentLink": { +"description": "Output only. The link to service attachment of PSC instance.", +"readOnly": true, +"type": "string" +}, +"region": { +"description": "The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.", +"type": "string" +}, +"replicaConfiguration": { +"$ref": "ReplicaConfiguration", +"description": "Configuration specific to failover replicas and read replicas." +}, +"replicaNames": { +"description": "The replicas of the instance.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replicationCluster": { +"$ref": "ReplicationCluster", +"description": "Optional. The pair of a primary instance and disaster recovery (DR) replica. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance has regional failure." +}, +"rootPassword": { +"description": "Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.", +"type": "string" +}, +"satisfiesPzs": { +"description": "The status indicating if instance satisfiesPzs. Reserved for future use.", +"type": "boolean" +}, +"scheduledMaintenance": { +"$ref": "SqlScheduledMaintenance", +"description": "The start time of any upcoming scheduled maintenance for this instance." +}, +"secondaryGceZone": { +"description": "The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"serverCaCert": { +"$ref": "SslCert", +"description": "SSL configuration." +}, +"serviceAccountEmailAddress": { +"description": "The service account email address assigned to the instance.\\This property is read-only.", +"type": "string" +}, +"settings": { +"$ref": "Settings", +"description": "The user settings." +}, +"sqlNetworkArchitecture": { +"enum": [ +"SQL_NETWORK_ARCHITECTURE_UNSPECIFIED", +"NEW_NETWORK_ARCHITECTURE", +"OLD_NETWORK_ARCHITECTURE" +], +"enumDescriptions": [ +"", +"The instance uses the new network architecture.", +"The instance uses the old network architecture." +], +"type": "string" +}, +"state": { +"description": "The current serving state of the Cloud SQL instance.", +"enum": [ +"SQL_INSTANCE_STATE_UNSPECIFIED", +"RUNNABLE", +"SUSPENDED", +"PENDING_DELETE", +"PENDING_CREATE", +"MAINTENANCE", +"FAILED", +"ONLINE_MAINTENANCE" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +true +], +"enumDescriptions": [ +"The state of the instance is unknown.", +"The instance is running, or has been stopped by owner.", +"The instance is not available, for example due to problems with billing.", +"The instance is being deleted.", +"The instance is being created.", +"The instance is down for maintenance.", +"The creation of the instance failed or a fatal error occurred during maintenance.", +"Deprecated" +], +"type": "string" +}, +"suspensionReason": { +"description": "If the instance state is SUSPENDED, the reason for the suspension.", +"items": { +"enum": [ +"SQL_SUSPENSION_REASON_UNSPECIFIED", +"BILLING_ISSUE", +"LEGAL_ISSUE", +"OPERATIONAL_ISSUE", +"KMS_KEY_ISSUE" +], +"enumDescriptions": [ +"This is an unknown suspension reason.", +"The instance is suspended due to billing issues (for example:, GCP account issue)", +"The instance is suspended due to illegal content (for example:, child pornography, copyrighted material, etc.).", +"The instance is causing operational issues (for example:, causing the database to crash).", +"The KMS key used by the instance is either revoked or denied access to" +], +"type": "string" +}, +"type": "array" +}, +"writeEndpoint": { +"description": "Output only. The dns name of the primary instance in a replication group.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"DatabasesListResponse": { +"description": "Database list response.", +"id": "DatabasesListResponse", +"properties": { +"items": { +"description": "List of database resources in the instance.", +"items": { +"$ref": "Database" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#databasesList`.", +"type": "string" +} +}, +"type": "object" +}, +"DemoteContext": { +"description": "This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.", +"id": "DemoteContext", +"properties": { +"kind": { +"description": "This is always `sql#demoteContext`.", +"type": "string" +}, +"sourceRepresentativeInstanceName": { +"description": "Required. The name of the instance which acts as the on-premises primary instance in the replication setup.", +"type": "string" +} +}, +"type": "object" +}, +"DemoteMasterConfiguration": { +"description": "Read-replica configuration for connecting to the on-premises primary instance.", +"id": "DemoteMasterConfiguration", +"properties": { +"kind": { +"description": "This is always `sql#demoteMasterConfiguration`.", +"type": "string" +}, +"mysqlReplicaConfiguration": { +"$ref": "DemoteMasterMySqlReplicaConfiguration", +"description": "MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory." +} +}, +"type": "object" +}, +"DemoteMasterContext": { +"description": "Database instance demote primary instance context.", +"id": "DemoteMasterContext", +"properties": { +"kind": { +"description": "This is always `sql#demoteMasterContext`.", +"type": "string" +}, +"masterInstanceName": { +"description": "The name of the instance which will act as on-premises primary instance in the replication setup.", +"type": "string" +}, +"replicaConfiguration": { +"$ref": "DemoteMasterConfiguration", +"description": "Configuration specific to read-replicas replicating from the on-premises primary instance." +}, +"skipReplicationSetup": { +"description": "Flag to skip replication setup on the instance.", +"type": "boolean" +}, +"verifyGtidConsistency": { +"description": "Verify the GTID consistency for demote operation. Default value: `True`. Setting this flag to `false` enables you to bypass the GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.", +"type": "boolean" +} +}, +"type": "object" +}, +"DemoteMasterMySqlReplicaConfiguration": { +"description": "Read-replica configuration specific to MySQL databases.", +"id": "DemoteMasterMySqlReplicaConfiguration", +"properties": { +"caCertificate": { +"description": "PEM representation of the trusted CA's x509 certificate.", +"type": "string" +}, +"clientCertificate": { +"description": "PEM representation of the replica's x509 certificate.", +"type": "string" +}, +"clientKey": { +"description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. The format of the replica's private key can be either PKCS #1 or PKCS #8.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#demoteMasterMysqlReplicaConfiguration`.", +"type": "string" +}, +"password": { +"description": "The password for the replication connection.", +"type": "string" +}, +"username": { +"description": "The username for the replication connection.", +"type": "string" +} +}, +"type": "object" +}, +"DenyMaintenancePeriod": { +"description": "Deny maintenance Periods. This specifies a date range during when all CSA rollout will be denied.", +"id": "DenyMaintenancePeriod", +"properties": { +"endDate": { +"description": "\"deny maintenance period\" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01", +"type": "string" +}, +"startDate": { +"description": "\"deny maintenance period\" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01", +"type": "string" +}, +"time": { +"description": "Time in UTC when the \"deny maintenance period\" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00", +"type": "string" +} +}, +"type": "object" +}, +"DiskEncryptionConfiguration": { +"description": "Disk encryption configuration for an instance.", +"id": "DiskEncryptionConfiguration", +"properties": { +"kind": { +"description": "This is always `sql#diskEncryptionConfiguration`.", +"type": "string" +}, +"kmsKeyName": { +"description": "Resource name of KMS key for disk encryption", +"type": "string" +} +}, +"type": "object" +}, +"DiskEncryptionStatus": { +"description": "Disk encryption status for an instance.", +"id": "DiskEncryptionStatus", +"properties": { +"kind": { +"description": "This is always `sql#diskEncryptionStatus`.", +"type": "string" +}, +"kmsKeyVersionName": { +"description": "KMS key version used to encrypt the Cloud SQL instance resource", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ExportContext": { +"description": "Database instance export context.", +"id": "ExportContext", +"properties": { +"bakExportOptions": { +"description": "Options for exporting BAK files (SQL Server-only)", +"properties": { +"bakType": { +"description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", +"enum": [ +"BAK_TYPE_UNSPECIFIED", +"FULL", +"DIFF", +"TLOG" +], +"enumDescriptions": [ +"Default type.", +"Full backup.", +"Differential backup.", +"Transaction Log backup" +], +"type": "string" +}, +"copyOnly": { +"deprecated": true, +"description": "Deprecated: copy_only is deprecated. Use differential_base instead", +"type": "boolean" +}, +"differentialBase": { +"description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", +"type": "boolean" +}, +"stripeCount": { +"description": "Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.", +"format": "int32", +"type": "integer" +}, +"striped": { +"description": "Whether or not the export should be striped.", +"type": "boolean" +} +}, +"type": "object" +}, +"csvExportOptions": { +"description": "Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.", +"properties": { +"escapeCharacter": { +"description": "Specifies the character that should appear before a data character that needs to be escaped.", +"type": "string" +}, +"fieldsTerminatedBy": { +"description": "Specifies the character that separates columns within each row (line) of the file.", +"type": "string" +}, +"linesTerminatedBy": { +"description": "This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.", +"type": "string" +}, +"quoteCharacter": { +"description": "Specifies the quoting character to be used when a data value is quoted.", +"type": "string" +}, +"selectQuery": { +"description": "The select query used to extract the data.", +"type": "string" +} +}, +"type": "object" +}, +"databases": { +"description": "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` You must specify one database to be exported. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"fileType": { +"description": "The file type for the specified uri.", +"enum": [ +"SQL_FILE_TYPE_UNSPECIFIED", +"SQL", +"CSV", +"BAK" +], +"enumDescriptions": [ +"Unknown file type.", +"File containing SQL statements.", +"File in CSV format.", +"" +], +"type": "string" +}, +"kind": { +"description": "This is always `sql#exportContext`.", +"type": "string" +}, +"offload": { +"description": "Option for export offload.", +"type": "boolean" +}, +"sqlExportOptions": { +"description": "Options for exporting data as SQL statements.", +"properties": { +"mysqlExportOptions": { +"description": "Options for exporting from MySQL.", +"properties": { +"masterData": { +"description": "Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"parallel": { +"description": "Optional. Whether or not the export should be parallel.", +"type": "boolean" +}, +"schemaOnly": { +"description": "Export only schemas.", +"type": "boolean" +}, +"tables": { +"description": "Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.", +"items": { +"type": "string" +}, +"type": "array" +}, +"threads": { +"description": "Optional. The number of threads to use for parallel export.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"uri": { +"description": "The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.", +"type": "string" +} +}, +"type": "object" +}, +"FailoverContext": { +"description": "Database instance failover context.", +"id": "FailoverContext", +"properties": { +"kind": { +"description": "This is always `sql#failoverContext`.", +"type": "string" +}, +"settingsVersion": { +"description": "The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Flag": { +"description": "A flag resource.", +"id": "Flag", +"properties": { +"allowedIntValues": { +"description": "Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"allowedStringValues": { +"description": "For `STRING` flags, a list of strings that the value can be set to.", +"items": { +"type": "string" +}, +"type": "array" +}, +"appliesTo": { +"description": "The database version this flag applies to. Can be MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. See [the complete list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"items": { +"enum": [ +"SQL_DATABASE_VERSION_UNSPECIFIED", +"MYSQL_5_1", +"MYSQL_5_5", +"MYSQL_5_6", +"MYSQL_5_7", +"SQLSERVER_2017_STANDARD", +"SQLSERVER_2017_ENTERPRISE", +"SQLSERVER_2017_EXPRESS", +"SQLSERVER_2017_WEB", +"POSTGRES_9_6", +"POSTGRES_10", +"POSTGRES_11", +"POSTGRES_12", +"POSTGRES_13", +"POSTGRES_14", +"POSTGRES_15", +"MYSQL_8_0", +"MYSQL_8_0_18", +"MYSQL_8_0_26", +"MYSQL_8_0_27", +"MYSQL_8_0_28", +"MYSQL_8_0_29", +"MYSQL_8_0_30", +"MYSQL_8_0_31", +"MYSQL_8_0_32", +"MYSQL_8_0_33", +"MYSQL_8_0_34", +"MYSQL_8_0_35", +"MYSQL_8_0_36", +"MYSQL_8_0_37", +"MYSQL_8_0_38", +"MYSQL_8_0_39", +"MYSQL_8_0_40", +"SQLSERVER_2019_STANDARD", +"SQLSERVER_2019_ENTERPRISE", +"SQLSERVER_2019_EXPRESS", +"SQLSERVER_2019_WEB", +"SQLSERVER_2022_STANDARD", +"SQLSERVER_2022_ENTERPRISE", +"SQLSERVER_2022_EXPRESS", +"SQLSERVER_2022_WEB" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"This is an unknown database version.", +"The database version is MySQL 5.1.", +"The database version is MySQL 5.5.", +"The database version is MySQL 5.6.", +"The database version is MySQL 5.7.", +"The database version is SQL Server 2017 Standard.", +"The database version is SQL Server 2017 Enterprise.", +"The database version is SQL Server 2017 Express.", +"The database version is SQL Server 2017 Web.", +"The database version is PostgreSQL 9.6.", +"The database version is PostgreSQL 10.", +"The database version is PostgreSQL 11.", +"The database version is PostgreSQL 12.", +"The database version is PostgreSQL 13.", +"The database version is PostgreSQL 14.", +"The database version is PostgreSQL 15.", +"The database version is MySQL 8.", +"The database major version is MySQL 8.0 and the minor version is 18.", +"The database major version is MySQL 8.0 and the minor version is 26.", +"The database major version is MySQL 8.0 and the minor version is 27.", +"The database major version is MySQL 8.0 and the minor version is 28.", +"The database major version is MySQL 8.0 and the minor version is 29.", +"The database major version is MySQL 8.0 and the minor version is 30.", +"The database major version is MySQL 8.0 and the minor version is 31.", +"The database major version is MySQL 8.0 and the minor version is 32.", +"The database major version is MySQL 8.0 and the minor version is 33.", +"The database major version is MySQL 8.0 and the minor version is 34.", +"The database major version is MySQL 8.0 and the minor version is 35.", +"The database major version is MySQL 8.0 and the minor version is 36.", +"The database major version is MySQL 8.0 and the minor version is 37.", +"The database major version is MySQL 8.0 and the minor version is 38.", +"The database major version is MySQL 8.0 and the minor version is 39.", +"The database major version is MySQL 8.0 and the minor version is 40.", +"The database version is SQL Server 2019 Standard.", +"The database version is SQL Server 2019 Enterprise.", +"The database version is SQL Server 2019 Express.", +"The database version is SQL Server 2019 Web.", +"The database version is SQL Server 2022 Standard.", +"The database version is SQL Server 2022 Enterprise.", +"The database version is SQL Server 2022 Express.", +"The database version is SQL Server 2022 Web." +], +"type": "string" +}, +"type": "array" +}, +"inBeta": { +"description": "Whether or not the flag is considered in beta.", +"type": "boolean" +}, +"kind": { +"description": "This is always `sql#flag`.", +"type": "string" +}, +"maxValue": { +"description": "For `INTEGER` flags, the maximum allowed value.", +"format": "int64", +"type": "string" +}, +"minValue": { +"description": "For `INTEGER` flags, the minimum allowed value.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "This is the name of the flag. Flag names always use underscores, not hyphens, for example: `max_allowed_packet`", +"type": "string" +}, +"requiresRestart": { +"description": "Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.", +"type": "boolean" +}, +"type": { +"description": "The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, `INTEGER` or `NONE`. `NONE` is used for flags that do not take a value, such as `skip_grant_tables`.", +"enum": [ +"SQL_FLAG_TYPE_UNSPECIFIED", +"BOOLEAN", +"STRING", +"INTEGER", +"NONE", +"MYSQL_TIMEZONE_OFFSET", +"FLOAT", +"REPEATED_STRING" +], +"enumDescriptions": [ +"This is an unknown flag type.", +"Boolean type flag.", +"String type flag.", +"Integer type flag.", +"Flag type used for a server startup option.", +"Type introduced specially for MySQL TimeZone offset. Accept a string value with the format [-12:59, 13:00].", +"Float type flag.", +"Comma-separated list of the strings in a SqlFlagType enum." +], +"type": "string" +} +}, +"type": "object" +}, +"FlagsListResponse": { +"description": "Flags list response.", +"id": "FlagsListResponse", +"properties": { +"items": { +"description": "List of flags.", +"items": { +"$ref": "Flag" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#flagsList`.", +"type": "string" +} +}, +"type": "object" +}, +"GeminiInstanceConfig": { +"description": "Gemini configuration.", +"id": "GeminiInstanceConfig", +"properties": { +"activeQueryEnabled": { +"description": "Output only. Whether active query is enabled.", +"readOnly": true, +"type": "boolean" +}, +"entitled": { +"description": "Output only. Whether gemini is enabled.", +"readOnly": true, +"type": "boolean" +}, +"flagRecommenderEnabled": { +"description": "Output only. Whether flag recommender is enabled.", +"readOnly": true, +"type": "boolean" +}, +"googleVacuumMgmtEnabled": { +"description": "Output only. Whether vacuum management is enabled.", +"readOnly": true, +"type": "boolean" +}, +"indexAdvisorEnabled": { +"description": "Output only. Whether index advisor is enabled.", +"readOnly": true, +"type": "boolean" +}, +"oomSessionCancelEnabled": { +"description": "Output only. Whether oom session cancel is enabled.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"GenerateEphemeralCertRequest": { +"description": "Ephemeral certificate creation request.", +"id": "GenerateEphemeralCertRequest", +"properties": { +"access_token": { +"description": "Optional. Access token to include in the signed certificate.", +"type": "string" +}, +"public_key": { +"description": "PEM encoded public key to include in the signed certificate.", +"type": "string" +}, +"readTime": { +"description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", +"format": "google-datetime", +"type": "string" +}, +"validDuration": { +"description": "Optional. If set, it will contain the cert valid duration.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GenerateEphemeralCertResponse": { +"description": "Ephemeral certificate creation request.", +"id": "GenerateEphemeralCertResponse", +"properties": { +"ephemeralCert": { +"$ref": "SslCert", +"description": "Generated cert" +} +}, +"type": "object" +}, +"ImportContext": { +"description": "Database instance import context.", +"id": "ImportContext", +"properties": { +"bakImportOptions": { +"description": "Import parameters specific to SQL Server .BAK files", +"properties": { +"bakType": { +"description": "Type of the bak content, FULL or DIFF", +"enum": [ +"BAK_TYPE_UNSPECIFIED", +"FULL", +"DIFF", +"TLOG" +], +"enumDescriptions": [ +"Default type.", +"Full backup.", +"Differential backup.", +"Transaction Log backup" +], +"type": "string" +}, +"encryptionOptions": { +"properties": { +"certPath": { +"description": "Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", +"type": "string" +}, +"pvkPassword": { +"description": "Password that encrypts the private key", +"type": "string" +}, +"pvkPath": { +"description": "Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", +"type": "string" +} +}, +"type": "object" +}, +"noRecovery": { +"description": "Whether or not the backup importing will restore database with NORECOVERY option Applies only to Cloud SQL for SQL Server.", +"type": "boolean" +}, +"recoveryOnly": { +"description": "Whether or not the backup importing request will just bring database online without downloading Bak content only one of \"no_recovery\" and \"recovery_only\" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.", +"type": "boolean" +}, +"stopAt": { +"description": "Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.", +"format": "google-datetime", +"type": "string" +}, +"stopAtMark": { +"description": "Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.", +"type": "string" +}, +"striped": { +"description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", +"type": "boolean" +} +}, +"type": "object" +}, +"csvImportOptions": { +"description": "Options for importing data as CSV.", +"properties": { +"columns": { +"description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", +"items": { +"type": "string" +}, +"type": "array" +}, +"escapeCharacter": { +"description": "Specifies the character that should appear before a data character that needs to be escaped.", +"type": "string" +}, +"fieldsTerminatedBy": { +"description": "Specifies the character that separates columns within each row (line) of the file.", +"type": "string" +}, +"linesTerminatedBy": { +"description": "This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.", +"type": "string" +}, +"quoteCharacter": { +"description": "Specifies the quoting character to be used when a data value is quoted.", +"type": "string" +}, +"table": { +"description": "The table to which CSV data is imported.", +"type": "string" +} +}, +"type": "object" +}, +"database": { +"description": "The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If `fileType` is `CSV`, one database must be specified.", +"type": "string" +}, +"fileType": { +"description": "The file type for the specified uri.\\`SQL`: The file contains SQL statements. \\`CSV`: The file contains CSV data.", +"enum": [ +"SQL_FILE_TYPE_UNSPECIFIED", +"SQL", +"CSV", +"BAK" +], +"enumDescriptions": [ +"Unknown file type.", +"File containing SQL statements.", +"File in CSV format.", +"" +], +"type": "string" +}, +"importUser": { +"description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#importContext`.", +"type": "string" +}, +"sqlImportOptions": { +"description": "Optional. Options for importing data from SQL statements.", +"properties": { +"parallel": { +"description": "Optional. Whether or not the import should be parallel.", +"type": "boolean" +}, +"threads": { +"description": "Optional. The number of threads to use for parallel import.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"uri": { +"description": "Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.", +"type": "string" +} +}, +"type": "object" +}, +"InsightsConfig": { +"description": "Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration.", +"id": "InsightsConfig", +"properties": { +"queryInsightsEnabled": { +"description": "Whether Query Insights feature is enabled.", +"type": "boolean" +}, +"queryPlansPerMinute": { +"description": "Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.", +"format": "int32", +"type": "integer" +}, +"queryStringLength": { +"description": "Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.", +"format": "int32", +"type": "integer" +}, +"recordApplicationTags": { +"description": "Whether Query Insights will record application tags from query when enabled.", +"type": "boolean" +}, +"recordClientAddress": { +"description": "Whether Query Insights will record client address when enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"InstanceReference": { +"description": "Reference to another Cloud SQL instance.", +"id": "InstanceReference", +"properties": { +"name": { +"description": "The name of the Cloud SQL instance being referenced. This does not include the project ID.", +"type": "string" +}, +"project": { +"description": "The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.", +"type": "string" +}, +"region": { +"description": "The region of the Cloud SQL instance being referenced.", +"type": "string" +} +}, +"type": "object" +}, +"InstancesAcquireSsrsLeaseRequest": { +"description": "Request to acquire a lease for SSRS.", +"id": "InstancesAcquireSsrsLeaseRequest", +"properties": { +"acquireSsrsLeaseContext": { +"$ref": "AcquireSsrsLeaseContext", +"description": "Contains details about the acquire SSRS lease operation." +} +}, +"type": "object" +}, +"InstancesCloneRequest": { +"description": "Database instance clone request.", +"id": "InstancesCloneRequest", +"properties": { +"cloneContext": { +"$ref": "CloneContext", +"description": "Contains details about the clone operation." +} +}, +"type": "object" +}, +"InstancesDemoteMasterRequest": { +"description": "Database demote primary instance request.", +"id": "InstancesDemoteMasterRequest", +"properties": { +"demoteMasterContext": { +"$ref": "DemoteMasterContext", +"description": "Contains details about the demoteMaster operation." +} +}, +"type": "object" +}, +"InstancesDemoteRequest": { +"description": "This request is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.", +"id": "InstancesDemoteRequest", +"properties": { +"demoteContext": { +"$ref": "DemoteContext", +"description": "Required. Contains details about the demote operation." +} +}, +"type": "object" +}, +"InstancesExportRequest": { +"description": "Database instance export request.", +"id": "InstancesExportRequest", +"properties": { +"exportContext": { +"$ref": "ExportContext", +"description": "Contains details about the export operation." +} +}, +"type": "object" +}, +"InstancesFailoverRequest": { +"description": "Instance failover request.", +"id": "InstancesFailoverRequest", +"properties": { +"failoverContext": { +"$ref": "FailoverContext", +"description": "Failover Context." +} +}, +"type": "object" +}, +"InstancesImportRequest": { +"description": "Database instance import request.", +"id": "InstancesImportRequest", +"properties": { +"importContext": { +"$ref": "ImportContext", +"description": "Contains details about the import operation." +} +}, +"type": "object" +}, +"InstancesListResponse": { +"description": "Database instances list response.", +"id": "InstancesListResponse", +"properties": { +"items": { +"description": "List of database instance resources.", +"items": { +"$ref": "DatabaseInstance" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#instancesList`.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +}, +"warnings": { +"description": "List of warnings that occurred while handling the request.", +"items": { +"$ref": "ApiWarning" +}, +"type": "array" +} +}, +"type": "object" +}, +"InstancesListServerCasResponse": { +"description": "Instances ListServerCas response.", +"id": "InstancesListServerCasResponse", +"properties": { +"activeVersion": { +"type": "string" +}, +"certs": { +"description": "List of server CA certificates for the instance.", +"items": { +"$ref": "SslCert" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#instancesListServerCas`.", +"type": "string" +} +}, +"type": "object" +}, +"InstancesReencryptRequest": { +"description": "Database Instance reencrypt request.", +"id": "InstancesReencryptRequest", +"properties": { +"backupReencryptionConfig": { +"$ref": "BackupReencryptionConfig", +"description": "Configuration specific to backup re-encryption" +} +}, +"type": "object" +}, +"InstancesRestoreBackupRequest": { +"description": "Database instance restore backup request.", +"id": "InstancesRestoreBackupRequest", +"properties": { +"restoreBackupContext": { +"$ref": "RestoreBackupContext", +"description": "Parameters required to perform the restore backup operation." +} +}, +"type": "object" +}, +"InstancesRotateServerCaRequest": { +"description": "Rotate server CA request.", +"id": "InstancesRotateServerCaRequest", +"properties": { +"rotateServerCaContext": { +"$ref": "RotateServerCaContext", +"description": "Contains details about the rotate server CA operation." +} +}, +"type": "object" +}, +"InstancesTruncateLogRequest": { +"description": "Instance truncate log request.", +"id": "InstancesTruncateLogRequest", +"properties": { +"truncateLogContext": { +"$ref": "TruncateLogContext", +"description": "Contains details about the truncate log operation." +} +}, +"type": "object" +}, +"IpConfiguration": { +"description": "IP Management configuration.", +"id": "IpConfiguration", +"properties": { +"allocatedIpRange": { +"description": "The name of the allocated ip range for the private ip Cloud SQL instance. For example: \"google-managed-services-default\". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`", +"type": "string" +}, +"authorizedNetworks": { +"description": "The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).", +"items": { +"$ref": "AclEntry" +}, +"type": "array" +}, +"enablePrivatePathForGoogleCloudServices": { +"description": "Controls connectivity to private IP instances from Google services, such as BigQuery.", +"type": "boolean" +}, +"ipv4Enabled": { +"description": "Whether the instance is assigned a public IP address or not.", +"type": "boolean" +}, +"privateNetwork": { +"description": "The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.", +"type": "string" +}, +"pscConfig": { +"$ref": "PscConfig", +"description": "PSC settings for this instance." +}, +"requireSsl": { +"description": "Use `ssl_mode` instead. Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the `ssl_mode` flag instead of the `require_ssl` flag.", +"type": "boolean" +}, +"sslMode": { +"description": "Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` gets priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the `require_ssl=false` means accept both non-SSL and SSL connections. MySQL and PostgreSQL databases respect `ssl_mode` in this case and accept only SSL connections.", +"enum": [ +"SSL_MODE_UNSPECIFIED", +"ALLOW_UNENCRYPTED_AND_ENCRYPTED", +"ENCRYPTED_ONLY", +"TRUSTED_CLIENT_CERTIFICATE_REQUIRED" +], +"enumDescriptions": [ +"The SSL mode is unknown.", +"Allow non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid the conflict between values of two flags.", +"Only allow connections encrypted with SSL/TLS. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid the conflict between values of two flags.", +"Only allow connections encrypted with SSL/TLS and with valid client certificates. When this value is used, the legacy `require_ssl` flag must be true or cleared to avoid the conflict between values of two flags. PostgreSQL clients or users that connect using IAM database authentication must use either the [Cloud SQL Auth Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or [Cloud SQL Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) to enforce client identity verification." +], +"type": "string" +} +}, +"type": "object" +}, +"IpMapping": { +"description": "Database instance IP mapping", +"id": "IpMapping", +"properties": { +"ipAddress": { +"description": "The IP address assigned.", +"type": "string" +}, +"timeToRetire": { +"description": "The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.", +"enum": [ +"SQL_IP_ADDRESS_TYPE_UNSPECIFIED", +"PRIMARY", +"OUTGOING", +"PRIVATE", +"MIGRATED_1ST_GEN" +], +"enumDescriptions": [ +"This is an unknown IP address type.", +"IP address the customer is supposed to connect to. Usually this is the load balancer's IP address", +"Source IP address of the connection a read replica establishes to its external primary instance. This IP address can be allowlisted by the customer in case it has a firewall that filters incoming connection to its on premises primary instance.", +"Private IP used when using private IPs and network peering.", +"V1 IP of a migrated instance. We want the user to decommission this IP as soon as the migration is complete. Note: V1 instances with V1 ip addresses will be counted as PRIMARY." +], +"type": "string" +} +}, +"type": "object" +}, +"LocationPreference": { +"description": "Preferred location. This specifies where a Cloud SQL instance is located. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.", +"id": "LocationPreference", +"properties": { +"followGaeApplication": { +"deprecated": true, +"description": "The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#locationPreference`.", +"type": "string" +}, +"secondaryZone": { +"description": "The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.", +"type": "string" +}, +"zone": { +"description": "The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.", +"type": "string" +} +}, +"type": "object" +}, +"MaintenanceWindow": { +"description": "Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes.", +"id": "MaintenanceWindow", +"properties": { +"day": { +"description": "day of week (1-7), starting on Monday.", +"format": "int32", +"type": "integer" +}, +"hour": { +"description": "hour of day - 0 to 23.", +"format": "int32", +"type": "integer" +}, +"kind": { +"description": "This is always `sql#maintenanceWindow`.", +"type": "string" +}, +"updateTrack": { +"description": "Maintenance timing setting: `canary` (Earlier) or `stable` (Later). [Learn more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen).", +"enum": [ +"SQL_UPDATE_TRACK_UNSPECIFIED", +"canary", +"stable", +"week5" +], +"enumDescriptions": [ +"This is an unknown maintenance timing preference.", +"For instance update that requires a restart, this update track indicates your instance prefer to restart for new version early in maintenance window.", +"For instance update that requires a restart, this update track indicates your instance prefer to let Cloud SQL choose the timing of restart (within its Maintenance window, if applicable).", +"For instance update that requires a restart, this update track indicates your instance prefer to let Cloud SQL choose the timing of restart (within its Maintenance window, if applicable) to be at least 5 weeks after the notification." +], +"type": "string" +} +}, +"type": "object" +}, +"MySqlReplicaConfiguration": { +"description": "Read-replica configuration specific to MySQL databases.", +"id": "MySqlReplicaConfiguration", +"properties": { +"caCertificate": { +"description": "PEM representation of the trusted CA's x509 certificate.", +"type": "string" +}, +"clientCertificate": { +"description": "PEM representation of the replica's x509 certificate.", +"type": "string" +}, +"clientKey": { +"description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.", +"type": "string" +}, +"connectRetryInterval": { +"description": "Seconds to wait between connect retries. MySQL's default is 60 seconds.", +"format": "int32", +"type": "integer" +}, +"dumpFilePath": { +"description": "Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#mysqlReplicaConfiguration`.", +"type": "string" +}, +"masterHeartbeatPeriod": { +"description": "Interval in milliseconds between replication heartbeats.", +"format": "int64", +"type": "string" +}, +"password": { +"description": "The password for the replication connection.", +"type": "string" +}, +"sslCipher": { +"description": "A list of permissible ciphers to use for SSL encryption.", +"type": "string" +}, +"username": { +"description": "The username for the replication connection.", +"type": "string" +}, +"verifyServerCertificate": { +"description": "Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake.", +"type": "boolean" +} +}, +"type": "object" +}, +"MySqlSyncConfig": { +"description": "MySQL-specific external server sync settings.", +"id": "MySqlSyncConfig", +"properties": { +"initialSyncFlags": { +"description": "Flags to use for the initial dump.", +"items": { +"$ref": "SyncFlags" +}, +"type": "array" +} +}, +"type": "object" +}, +"OnPremisesConfiguration": { +"description": "On-premises instance configuration.", +"id": "OnPremisesConfiguration", +"properties": { +"caCertificate": { +"description": "PEM representation of the trusted CA's x509 certificate.", +"type": "string" +}, +"clientCertificate": { +"description": "PEM representation of the replica's x509 certificate.", +"type": "string" +}, +"clientKey": { +"description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.", +"type": "string" +}, +"dumpFilePath": { +"description": "The dump file to create the Cloud SQL replica.", +"type": "string" +}, +"hostPort": { +"description": "The host and port of the on-premises instance in host:port format", +"type": "string" +}, +"kind": { +"description": "This is always `sql#onPremisesConfiguration`.", +"type": "string" +}, +"password": { +"description": "The password for connecting to on-premises instance.", +"type": "string" +}, +"sourceInstance": { +"$ref": "InstanceReference", +"description": "The reference to Cloud SQL instance if the source is Cloud SQL." +}, +"username": { +"description": "The username for connecting to on-premises instance.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", +"id": "Operation", +"properties": { +"acquireSsrsLeaseContext": { +"$ref": "AcquireSsrsLeaseContext", +"description": "The context for acquire SSRS lease operation, if applicable." +}, +"apiWarning": { +"$ref": "ApiWarning", +"description": "An Admin API warning message." +}, +"backupContext": { +"$ref": "BackupContext", +"description": "The context for backup operation, if applicable." +}, +"endTime": { +"description": "The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "OperationErrors", +"description": "If errors occurred during processing of this operation, this field will be populated." +}, +"exportContext": { +"$ref": "ExportContext", +"description": "The context for export operation, if applicable." +}, +"importContext": { +"$ref": "ImportContext", +"description": "The context for import operation, if applicable." +}, +"insertTime": { +"description": "The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"kind": { +"description": "This is always `sql#operation`.", +"type": "string" +}, +"name": { +"description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", +"type": "string" +}, +"operationType": { +"description": "The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`", +"enum": [ +"SQL_OPERATION_TYPE_UNSPECIFIED", +"IMPORT", +"EXPORT", +"CREATE", +"UPDATE", +"DELETE", +"RESTART", +"BACKUP", +"SNAPSHOT", +"BACKUP_VOLUME", +"DELETE_VOLUME", +"RESTORE_VOLUME", +"INJECT_USER", +"CLONE", +"STOP_REPLICA", +"START_REPLICA", +"PROMOTE_REPLICA", +"CREATE_REPLICA", +"CREATE_USER", +"DELETE_USER", +"UPDATE_USER", +"CREATE_DATABASE", +"DELETE_DATABASE", +"UPDATE_DATABASE", +"FAILOVER", +"DELETE_BACKUP", +"RECREATE_REPLICA", +"TRUNCATE_LOG", +"DEMOTE_MASTER", +"MAINTENANCE", +"ENABLE_PRIVATE_IP", +"DEFER_MAINTENANCE", +"CREATE_CLONE", +"RESCHEDULE_MAINTENANCE", +"START_EXTERNAL_SYNC", +"LOG_CLEANUP", +"AUTO_RESTART", +"REENCRYPT", +"SWITCHOVER", +"ACQUIRE_SSRS_LEASE", +"RELEASE_SSRS_LEASE", +"RECONFIGURE_OLD_PRIMARY" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unknown operation type.", +"Imports data into a Cloud SQL instance.", +"Exports data from a Cloud SQL instance to a Cloud Storage bucket.", +"Creates a new Cloud SQL instance.", +"Updates the settings of a Cloud SQL instance.", +"Deletes a Cloud SQL instance.", +"Restarts the Cloud SQL instance.", +"", +"", +"Performs instance backup.", +"Deletes an instance backup.", +"Restores an instance backup.", +"Injects a privileged user in mysql for MOB instances.", +"Clones a Cloud SQL instance.", +"Stops replication on a Cloud SQL read replica instance.", +"Starts replication on a Cloud SQL read replica instance.", +"Promotes a Cloud SQL replica instance.", +"Creates a Cloud SQL replica instance.", +"Creates a new user in a Cloud SQL instance.", +"Deletes a user from a Cloud SQL instance.", +"Updates an existing user in a Cloud SQL instance.", +"Creates a database in the Cloud SQL instance.", +"Deletes a database in the Cloud SQL instance.", +"Updates a database in the Cloud SQL instance.", +"Performs failover of an HA-enabled Cloud SQL failover replica.", +"Deletes the backup taken by a backup run.", +"", +"Truncates a general or slow log table in MySQL.", +"Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", +"Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.", +"This field is deprecated, and will be removed in future version of API.", +"", +"Creates clone instance.", +"Reschedule maintenance to another time.", +"Starts external sync of a Cloud SQL EM replica to an external primary instance.", +"Recovers logs from an instance's old data disk.", +"Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.", +"Re-encrypts CMEK instances with latest key version.", +"Switches over to replica instance from primary.", +"Acquire a lease for the setup of SQL Server Reporting Services (SSRS).", +"Release a lease for the setup of SQL Server Reporting Services (SSRS).", +"Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica." +], +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"startTime": { +"description": "The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"status": { +"description": "The status of an operation.", +"enum": [ +"SQL_OPERATION_STATUS_UNSPECIFIED", +"PENDING", +"RUNNING", +"DONE" +], +"enumDescriptions": [ +"The state of the operation is unknown.", +"The operation has been queued, but has not started yet.", +"The operation is running.", +"The operation completed." +], +"type": "string" +}, +"targetId": { +"description": "Name of the database instance related to this operation.", +"type": "string" +}, +"targetLink": { +"type": "string" +}, +"targetProject": { +"description": "The project ID of the target instance related to this operation.", +"type": "string" +}, +"user": { +"description": "The email address of the user who initiated this operation.", +"type": "string" +} +}, +"type": "object" +}, +"OperationError": { +"description": "Database instance operation error.", +"id": "OperationError", +"properties": { +"code": { +"description": "Identifies the specific error that occurred.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#operationError`.", +"type": "string" +}, +"message": { +"description": "Additional information about the error encountered.", +"type": "string" +} +}, +"type": "object" +}, +"OperationErrors": { +"description": "Database instance operation errors list wrapper.", +"id": "OperationErrors", +"properties": { +"errors": { +"description": "The list of errors encountered while processing this operation.", +"items": { +"$ref": "OperationError" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#operationErrors`.", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"cancelRequested": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"statusDetail": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OperationsListResponse": { +"description": "Operations list response.", +"id": "OperationsListResponse", +"properties": { +"items": { +"description": "List of operation resources.", +"items": { +"$ref": "Operation" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#operationsList`.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"PasswordStatus": { +"description": "Read-only password status.", +"id": "PasswordStatus", +"properties": { +"locked": { +"description": "If true, user does not have login privileges.", +"type": "boolean" +}, +"passwordExpirationTime": { +"description": "The expiration time of the current password.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"PasswordValidationPolicy": { +"description": "Database instance local user password validation policy", +"id": "PasswordValidationPolicy", +"properties": { +"complexity": { +"description": "The complexity of the password.", +"enum": [ +"COMPLEXITY_UNSPECIFIED", +"COMPLEXITY_DEFAULT" +], +"enumDescriptions": [ +"Complexity check is not specified.", +"A combination of lowercase, uppercase, numeric, and non-alphanumeric characters." +], +"type": "string" +}, +"disallowCompromisedCredentials": { +"deprecated": true, +"description": "This field is deprecated and will be removed in a future version of the API.", +"type": "boolean" +}, +"disallowUsernameSubstring": { +"description": "Disallow username as a part of the password.", +"type": "boolean" +}, +"enablePasswordPolicy": { +"description": "Whether the password policy is enabled or not.", +"type": "boolean" +}, +"minLength": { +"description": "Minimum number of characters allowed.", +"format": "int32", +"type": "integer" +}, +"passwordChangeInterval": { +"description": "Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.", +"format": "google-duration", +"type": "string" +}, +"reuseInterval": { +"description": "Number of previous passwords that cannot be reused.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PerformDiskShrinkContext": { +"description": "Perform disk shrink context.", +"id": "PerformDiskShrinkContext", +"properties": { +"targetSizeGb": { +"description": "The target disk shrink size in GigaBytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PscConfig": { +"description": "PSC settings for a Cloud SQL instance.", +"id": "PscConfig", +"properties": { +"allowedConsumerProjects": { +"description": "Optional. The list of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).", +"items": { +"type": "string" +}, +"type": "array" +}, +"pscEnabled": { +"description": "Whether PSC connectivity is enabled for this instance.", +"type": "boolean" +} +}, +"type": "object" +}, +"ReplicaConfiguration": { +"description": "Read-replica configuration for connecting to the primary instance.", +"id": "ReplicaConfiguration", +"properties": { +"cascadableReplica": { +"description": "Optional. Specifies if a SQL Server replica is a cascadable replica. A cascadable replica is a SQL Server cross region replica that supports replica(s) under it.", +"type": "boolean" +}, +"failoverTarget": { +"description": "Specifies if the replica is the failover target. If the field is set to `true`, the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.", +"type": "boolean" +}, +"kind": { +"description": "This is always `sql#replicaConfiguration`.", +"type": "string" +}, +"mysqlReplicaConfiguration": { +"$ref": "MySqlReplicaConfiguration", +"description": "MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory." +} +}, +"type": "object" +}, +"ReplicationCluster": { +"description": "Primary-DR replica pair", +"id": "ReplicationCluster", +"properties": { +"drReplica": { +"description": "Output only. read-only field that indicates if the replica is a dr_replica; not set for a primary.", +"readOnly": true, +"type": "boolean" +}, +"failoverDrReplicaName": { +"description": "Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Users can set this field to set a designated DR replica for a primary. Removing this field removes the DR replica.", +"type": "string" +} +}, +"type": "object" +}, +"Reschedule": { +"id": "Reschedule", +"properties": { +"rescheduleType": { +"description": "Required. The type of the reschedule.", +"enum": [ +"RESCHEDULE_TYPE_UNSPECIFIED", +"IMMEDIATE", +"NEXT_AVAILABLE_WINDOW", +"SPECIFIC_TIME" +], +"enumDescriptions": [ +"", +"Reschedules maintenance to happen now (within 5 minutes).", +"Reschedules maintenance to occur within one week from the originally scheduled day and time.", +"Reschedules maintenance to a specific time and day." +], +"type": "string" +}, +"scheduleTime": { +"description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RestoreBackupContext": { +"description": "Database instance restore from backup context. Backup context contains source instance id and project id.", +"id": "RestoreBackupContext", +"properties": { +"backupRunId": { +"description": "The ID of the backup run to restore from.", +"format": "int64", +"type": "string" +}, +"instanceId": { +"description": "The ID of the instance that the backup was taken from.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#restoreBackupContext`.", +"type": "string" +}, +"project": { +"description": "The full project ID of the source instance.", +"type": "string" +} +}, +"type": "object" +}, +"RotateServerCaContext": { +"description": "Instance rotate server CA context.", +"id": "RotateServerCaContext", +"properties": { +"kind": { +"description": "This is always `sql#rotateServerCaContext`.", +"type": "string" +}, +"nextVersion": { +"description": "The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version.", +"type": "string" +} +}, +"type": "object" +}, +"Settings": { +"description": "Database instance settings.", +"id": "Settings", +"properties": { +"activationPolicy": { +"description": "The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: * `ALWAYS`: The instance is on, and remains so even in the absence of connection requests. * `NEVER`: The instance is off; it is not activated, even if a connection request arrives.", +"enum": [ +"SQL_ACTIVATION_POLICY_UNSPECIFIED", +"ALWAYS", +"NEVER", +"ON_DEMAND" +], +"enumDeprecated": [ +false, +false, +false, +true +], +"enumDescriptions": [ +"Unknown activation plan.", +"The instance is always up and running.", +"The instance never starts.", +"The instance starts upon receiving requests." +], +"type": "string" +}, +"activeDirectoryConfig": { +"$ref": "SqlActiveDirectoryConfig", +"description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server." +}, +"advancedMachineFeatures": { +"$ref": "AdvancedMachineFeatures", +"description": "Specifies advance machine configuration for the instance relevant only for SQL Server." +}, +"authorizedGaeApplications": { +"deprecated": true, +"description": "The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"availabilityType": { +"description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see [Overview of the High Availability Configuration](https://cloud.google.com/sql/docs/mysql/high-availability).", +"enum": [ +"SQL_AVAILABILITY_TYPE_UNSPECIFIED", +"ZONAL", +"REGIONAL" +], +"enumDescriptions": [ +"This is an unknown Availability type.", +"Zonal available instance.", +"Regional available instance." +], +"type": "string" +}, +"backupConfiguration": { +"$ref": "BackupConfiguration", +"description": "The daily backup configuration for the instance." +}, +"collation": { +"description": "The name of server Instance collation.", +"type": "string" +}, +"connectorEnforcement": { +"description": "Specifies if connections must use Cloud SQL connectors. Option values include the following: `NOT_REQUIRED` (Cloud SQL instances can be connected without Cloud SQL Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL Connectors). Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.", +"enum": [ +"CONNECTOR_ENFORCEMENT_UNSPECIFIED", +"NOT_REQUIRED", +"REQUIRED" +], +"enumDescriptions": [ +"The requirement for Cloud SQL connectors is unknown.", +"Do not require Cloud SQL connectors.", +"Require all connections to use Cloud SQL connectors, including the Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. Note: This disables all existing authorized networks." +], +"type": "string" +}, +"crashSafeReplicationEnabled": { +"deprecated": true, +"description": "Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.", +"type": "boolean" +}, +"dataCacheConfig": { +"$ref": "DataCacheConfig", +"description": "Configuration for data cache." +}, +"dataDiskSizeGb": { +"description": "The size of data disk, in GB. The data disk size minimum is 10GB.", +"format": "int64", +"type": "string" +}, +"dataDiskType": { +"description": "The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for First Generation instances.", +"enum": [ +"SQL_DATA_DISK_TYPE_UNSPECIFIED", +"PD_SSD", +"PD_HDD", +"OBSOLETE_LOCAL_SSD" +], +"enumDeprecated": [ +false, +false, +false, +true +], +"enumDescriptions": [ +"This is an unknown data disk type.", +"An SSD data disk.", +"An HDD data disk.", +"This field is deprecated and will be removed from a future version of the API." +], +"type": "string" +}, +"databaseFlags": { +"description": "The database flags passed to the instance at startup.", +"items": { +"$ref": "DatabaseFlags" +}, +"type": "array" +}, +"databaseReplicationEnabled": { +"description": "Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.", +"type": "boolean" +}, +"deletionProtectionEnabled": { +"description": "Configuration to protect against accidental instance deletion.", +"type": "boolean" +}, +"denyMaintenancePeriods": { +"description": "Deny maintenance periods", +"items": { +"$ref": "DenyMaintenancePeriod" +}, +"type": "array" +}, +"edition": { +"description": "Optional. The edition of the instance.", +"enum": [ +"EDITION_UNSPECIFIED", +"ENTERPRISE", +"ENTERPRISE_PLUS" +], +"enumDescriptions": [ +"The instance did not specify the edition.", +"The instance is an enterprise edition.", +"The instance is an Enterprise Plus edition." +], +"type": "string" +}, +"enableGoogleMlIntegration": { +"description": "Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.", +"type": "boolean" +}, +"insightsConfig": { +"$ref": "InsightsConfig", +"description": "Insights configuration, for now relevant only for Postgres." +}, +"ipConfiguration": { +"$ref": "IpConfiguration", +"description": "The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances." +}, +"kind": { +"description": "This is always `sql#settings`.", +"type": "string" +}, +"locationPreference": { +"$ref": "LocationPreference", +"description": "The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances." +}, +"maintenanceWindow": { +"$ref": "MaintenanceWindow", +"description": "The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes." +}, +"passwordValidationPolicy": { +"$ref": "PasswordValidationPolicy", +"description": "The local user password validation policy of the instance." +}, +"pricingPlan": { +"description": "The pricing plan for this instance. This can be either `PER_USE` or `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.", +"enum": [ +"SQL_PRICING_PLAN_UNSPECIFIED", +"PACKAGE", +"PER_USE" +], +"enumDescriptions": [ +"This is an unknown pricing plan for this instance.", +"The instance is billed at a monthly flat rate.", +"The instance is billed per usage." +], +"type": "string" +}, +"replicationType": { +"deprecated": true, +"description": "The type of replication this instance uses. This can be either `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only applicable to First Generation instances.", +"enum": [ +"SQL_REPLICATION_TYPE_UNSPECIFIED", +"SYNCHRONOUS", +"ASYNCHRONOUS" +], +"enumDescriptions": [ +"This is an unknown replication type for a Cloud SQL instance.", +"The synchronous replication mode for First Generation instances. It is the default value.", +"The asynchronous replication mode for First Generation instances. It provides a slight performance gain, but if an outage occurs while this option is set to asynchronous, you can lose up to a few seconds of updates to your data." +], +"type": "string" +}, +"settingsVersion": { +"description": "The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.", +"format": "int64", +"type": "string" +}, +"sqlServerAuditConfig": { +"$ref": "SqlServerAuditConfig", +"description": "SQL Server specific audit configuration." +}, +"storageAutoResize": { +"description": "Configuration to increase storage size automatically. The default value is true.", +"type": "boolean" +}, +"storageAutoResizeLimit": { +"description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.", +"format": "int64", +"type": "string" +}, +"tier": { +"description": "The tier (or machine type) for this instance, for example `db-custom-1-3840`. WARNING: Changing this restarts the instance.", +"type": "string" +}, +"timeZone": { +"description": "Server timezone, relevant only for Cloud SQL for SQL Server.", +"type": "string" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", +"type": "object" +} +}, +"type": "object" +}, +"SqlActiveDirectoryConfig": { +"description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server.", +"id": "SqlActiveDirectoryConfig", +"properties": { +"domain": { +"description": "The name of the domain (e.g., mydomain.com).", +"type": "string" +}, +"kind": { +"description": "This is always sql#activeDirectoryConfig.", +"type": "string" +} +}, +"type": "object" +}, +"SqlExternalSyncSettingError": { +"description": "External primary instance migration setting error/warning.", +"id": "SqlExternalSyncSettingError", +"properties": { +"detail": { +"description": "Additional information about the error encountered.", +"type": "string" +}, +"kind": { +"description": "Can be `sql#externalSyncSettingError` or `sql#externalSyncSettingWarning`.", +"type": "string" +}, +"type": { +"description": "Identifies the specific error that occurred.", +"enum": [ +"SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED", +"CONNECTION_FAILURE", +"BINLOG_NOT_ENABLED", +"INCOMPATIBLE_DATABASE_VERSION", +"REPLICA_ALREADY_SETUP", +"INSUFFICIENT_PRIVILEGE", +"UNSUPPORTED_MIGRATION_TYPE", +"NO_PGLOGICAL_INSTALLED", +"PGLOGICAL_NODE_ALREADY_EXISTS", +"INVALID_WAL_LEVEL", +"INVALID_SHARED_PRELOAD_LIBRARY", +"INSUFFICIENT_MAX_REPLICATION_SLOTS", +"INSUFFICIENT_MAX_WAL_SENDERS", +"INSUFFICIENT_MAX_WORKER_PROCESSES", +"UNSUPPORTED_EXTENSIONS", +"INVALID_RDS_LOGICAL_REPLICATION", +"INVALID_LOGGING_SETUP", +"INVALID_DB_PARAM", +"UNSUPPORTED_GTID_MODE", +"SQLSERVER_AGENT_NOT_RUNNING", +"UNSUPPORTED_TABLE_DEFINITION", +"UNSUPPORTED_DEFINER", +"SQLSERVER_SERVERNAME_MISMATCH", +"PRIMARY_ALREADY_SETUP", +"UNSUPPORTED_BINLOG_FORMAT", +"BINLOG_RETENTION_SETTING", +"UNSUPPORTED_STORAGE_ENGINE", +"LIMITED_SUPPORT_TABLES", +"EXISTING_DATA_IN_REPLICA", +"MISSING_OPTIONAL_PRIVILEGES", +"RISKY_BACKUP_ADMIN_PRIVILEGE", +"INSUFFICIENT_GCS_PERMISSIONS", +"INVALID_FILE_INFO", +"UNSUPPORTED_DATABASE_SETTINGS", +"MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE", +"LOCAL_INFILE_OFF", +"TURN_ON_PITR_AFTER_PROMOTE", +"INCOMPATIBLE_DATABASE_MINOR_VERSION", +"SOURCE_MAX_SUBSCRIPTIONS", +"UNABLE_TO_VERIFY_DEFINERS", +"SUBSCRIPTION_CALCULATION_STATUS", +"PG_SUBSCRIPTION_COUNT", +"PG_SYNC_PARALLEL_LEVEL", +"INSUFFICIENT_DISK_SIZE", +"INSUFFICIENT_MACHINE_TIER" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"The replication user is missing privileges that are required.", +"Unsupported migration type.", +"No pglogical extension installed on databases, applicable for postgres.", +"pglogical node already exists on databases, applicable for postgres.", +"The value of parameter wal_level is not set to logical.", +"The value of parameter shared_preload_libraries does not include pglogical.", +"The value of parameter max_replication_slots is not sufficient.", +"The value of parameter max_wal_senders is not sufficient.", +"The value of parameter max_worker_processes is not sufficient.", +"Extensions installed are either not supported or having unsupported versions.", +"The value of parameter rds.logical_replication is not set to 1.", +"The primary instance logging setup doesn't allow EM sync.", +"The primary instance database parameter setup doesn't allow EM sync.", +"The gtid_mode is not supported, applicable for MySQL.", +"SQL Server Agent is not running.", +"The table definition is not support due to missing primary key or replica identity, applicable for postgres.", +"The customer has a definer that will break EM setup.", +"SQL Server @@SERVERNAME does not match actual host name.", +"The primary instance has been setup and will fail the setup.", +"The primary instance has unsupported binary log format.", +"The primary instance's binary log retention setting.", +"The primary instance has tables with unsupported storage engine.", +"Source has tables with limited support eg: PostgreSQL tables without primary keys.", +"The replica instance contains existing data.", +"The replication user is missing privileges that are optional.", +"Additional BACKUP_ADMIN privilege is granted to the replication user which may lock source MySQL 8 instance for DDLs during initial sync.", +"The Cloud Storage bucket is missing necessary permissions.", +"The Cloud Storage bucket has an error in the file or contains invalid file information.", +"The source instance has unsupported database settings for migration.", +"The replication user is missing parallel import specific privileges. (e.g. LOCK TABLES) for MySQL.", +"The global variable local_infile is off on external server replica.", +"This code instructs customers to turn on point-in-time recovery manually for the instance after promoting the Cloud SQL for PostgreSQL instance.", +"The minor version of replica database is incompatible with the source.", +"This warning message indicates that Cloud SQL uses the maximum number of subscriptions to migrate data from the source to the destination.", +"Unable to verify definers on the source for MySQL.", +"If a time out occurs while the subscription counts are calculated, then this value is set to 1. Otherwise, this value is set to 2.", +"Count of subscriptions needed to sync source data for PostgreSQL database.", +"Final parallel level that is used to do migration.", +"The disk size of the replica instance is smaller than the data size of the source instance.", +"The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." +], +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesAcquireSsrsLeaseResponse": { +"description": "Response for the acquire SSRS lease request.", +"id": "SqlInstancesAcquireSsrsLeaseResponse", +"properties": { +"operationId": { +"description": "The unique identifier for this operation.", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesGetDiskShrinkConfigResponse": { +"description": "Instance get disk shrink config response.", +"id": "SqlInstancesGetDiskShrinkConfigResponse", +"properties": { +"kind": { +"description": "This is always `sql#getDiskShrinkConfig`.", +"type": "string" +}, +"message": { +"description": "Additional message to customers.", +"type": "string" +}, +"minimalTargetSizeGb": { +"description": "The minimum size to which a disk can be shrunk in GigaBytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesGetLatestRecoveryTimeResponse": { +"description": "Instance get latest recovery time response.", +"id": "SqlInstancesGetLatestRecoveryTimeResponse", +"properties": { +"kind": { +"description": "This is always `sql#getLatestRecoveryTime`.", +"type": "string" +}, +"latestRecoveryTime": { +"description": "Timestamp, identifies the latest recovery time of the source instance.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesReleaseSsrsLeaseResponse": { +"description": "Response for the release SSRS lease request.", +"id": "SqlInstancesReleaseSsrsLeaseResponse", +"properties": { +"operationId": { +"description": "The unique identifier for this operation.", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesRescheduleMaintenanceRequestBody": { +"description": "Reschedule options for maintenance windows.", +"id": "SqlInstancesRescheduleMaintenanceRequestBody", +"properties": { +"reschedule": { +"$ref": "Reschedule", +"description": "Required. The type of the reschedule the user wants." +} +}, +"type": "object" +}, +"SqlInstancesResetReplicaSizeRequest": { +"description": "Instance reset replica size request.", +"id": "SqlInstancesResetReplicaSizeRequest", +"properties": {}, +"type": "object" +}, +"SqlInstancesStartExternalSyncRequest": { +"description": "Instance start external sync request.", +"id": "SqlInstancesStartExternalSyncRequest", +"properties": { +"migrationType": { +"description": "Optional. MigrationType decides if the migration is a physical file based migration or logical migration.", +"enum": [ +"MIGRATION_TYPE_UNSPECIFIED", +"LOGICAL", +"PHYSICAL" +], +"enumDescriptions": [ +"Default value is logical migration", +"Logical Migrations", +"Physical file based Migrations" +], +"type": "string" +}, +"mysqlSyncConfig": { +"$ref": "MySqlSyncConfig", +"description": "MySQL-specific settings for start external sync." +}, +"skipVerification": { +"description": "Whether to skip the verification step (VESS).", +"type": "boolean" +}, +"syncMode": { +"description": "External sync mode.", +"enum": [ +"EXTERNAL_SYNC_MODE_UNSPECIFIED", +"ONLINE", +"OFFLINE" +], +"enumDescriptions": [ +"Unknown external sync mode, will be defaulted to ONLINE mode", +"Online external sync will set up replication after initial data external sync", +"Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" +], +"type": "string" +}, +"syncParallelLevel": { +"description": "Optional. Parallel level for initial data sync. Currently only applicable for MySQL.", +"enum": [ +"EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED", +"MIN", +"OPTIMAL", +"MAX" +], +"enumDescriptions": [ +"Unknown sync parallel level. Will be defaulted to OPTIMAL.", +"Minimal parallel level.", +"Optimal parallel level.", +"Maximum parallel level." +], +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesVerifyExternalSyncSettingsRequest": { +"description": "Instance verify external sync settings request.", +"id": "SqlInstancesVerifyExternalSyncSettingsRequest", +"properties": { +"migrationType": { +"description": "Optional. MigrationType decides if the migration is a physical file based migration or logical migration", +"enum": [ +"MIGRATION_TYPE_UNSPECIFIED", +"LOGICAL", +"PHYSICAL" +], +"enumDescriptions": [ +"Default value is logical migration", +"Logical Migrations", +"Physical file based Migrations" +], +"type": "string" +}, +"mysqlSyncConfig": { +"$ref": "MySqlSyncConfig", +"description": "Optional. MySQL-specific settings for start external sync." +}, +"syncMode": { +"description": "External sync mode", +"enum": [ +"EXTERNAL_SYNC_MODE_UNSPECIFIED", +"ONLINE", +"OFFLINE" +], +"enumDescriptions": [ +"Unknown external sync mode, will be defaulted to ONLINE mode", +"Online external sync will set up replication after initial data external sync", +"Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" +], +"type": "string" +}, +"syncParallelLevel": { +"description": "Optional. Parallel level for initial data sync. Currently only applicable for PostgreSQL.", +"enum": [ +"EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED", +"MIN", +"OPTIMAL", +"MAX" +], +"enumDescriptions": [ +"Unknown sync parallel level. Will be defaulted to OPTIMAL.", +"Minimal parallel level.", +"Optimal parallel level.", +"Maximum parallel level." +], +"type": "string" +}, +"verifyConnectionOnly": { +"description": "Flag to enable verifying connection only", +"type": "boolean" +}, +"verifyReplicationOnly": { +"description": "Optional. Flag to verify settings required by replication setup only", +"type": "boolean" +} +}, +"type": "object" +}, +"SqlInstancesVerifyExternalSyncSettingsResponse": { +"description": "Instance verify external sync settings response.", +"id": "SqlInstancesVerifyExternalSyncSettingsResponse", +"properties": { +"errors": { +"description": "List of migration violations.", +"items": { +"$ref": "SqlExternalSyncSettingError" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#migrationSettingErrorList`.", +"type": "string" +}, +"warnings": { +"description": "List of migration warnings.", +"items": { +"$ref": "SqlExternalSyncSettingError" +}, +"type": "array" +} +}, +"type": "object" +}, +"SqlOutOfDiskReport": { +"description": "This message wraps up the information written by out-of-disk detection job.", +"id": "SqlOutOfDiskReport", +"properties": { +"sqlMinRecommendedIncreaseSizeGb": { +"description": "The minimum recommended increase size in GigaBytes This field is consumed by the frontend * Writers: * the proactive database wellness job for OOD. * Readers:", +"format": "int32", +"type": "integer" +}, +"sqlOutOfDiskState": { +"description": "This field represents the state generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job", +"enum": [ +"SQL_OUT_OF_DISK_STATE_UNSPECIFIED", +"NORMAL", +"SOFT_SHUTDOWN" +], +"enumDescriptions": [ +"Unspecified state", +"The instance has plenty space on data disk", +"Data disk is almost used up. It is shutdown to prevent data corruption." +], +"type": "string" +} +}, +"type": "object" +}, +"SqlScheduledMaintenance": { +"description": "Any scheduled maintenance for this instance.", +"id": "SqlScheduledMaintenance", +"properties": { +"canDefer": { +"deprecated": true, +"type": "boolean" +}, +"canReschedule": { +"description": "If the scheduled maintenance can be rescheduled.", +"type": "boolean" +}, +"scheduleDeadlineTime": { +"description": "Maintenance cannot be rescheduled to start beyond this deadline.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The start time of any upcoming scheduled maintenance for this instance.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SqlServerAuditConfig": { +"description": "SQL Server specific audit configuration.", +"id": "SqlServerAuditConfig", +"properties": { +"bucket": { +"description": "The name of the destination bucket (e.g., gs://mybucket).", +"type": "string" +}, +"kind": { +"description": "This is always sql#sqlServerAuditConfig", +"type": "string" +}, +"retentionInterval": { +"description": "How long to keep generated audit files.", +"format": "google-duration", +"type": "string" +}, +"uploadInterval": { +"description": "How often to upload generated audit files.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"SqlServerDatabaseDetails": { +"description": "Represents a Sql Server database on the Cloud SQL instance.", +"id": "SqlServerDatabaseDetails", +"properties": { +"compatibilityLevel": { +"description": "The version of SQL Server with which the database is to be made compatible", +"format": "int32", +"type": "integer" +}, +"recoveryModel": { +"description": "The recovery model of a SQL Server database", +"type": "string" +} +}, +"type": "object" +}, +"SqlServerUserDetails": { +"description": "Represents a Sql Server user on the Cloud SQL instance.", +"id": "SqlServerUserDetails", +"properties": { +"disabled": { +"description": "If the user has been disabled", +"type": "boolean" +}, +"serverRoles": { +"description": "The server roles for this user", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SslCert": { +"description": "SslCerts Resource", +"id": "SslCert", +"properties": { +"cert": { +"description": "PEM representation.", +"type": "string" +}, +"certSerialNumber": { +"description": "Serial number, as extracted from the certificate.", +"type": "string" +}, +"commonName": { +"description": "User supplied name. Constrained to [a-zA-Z.-_ ]+.", +"type": "string" +}, +"createTime": { +"description": "The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`", +"format": "google-datetime", +"type": "string" +}, +"expirationTime": { +"description": "The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"instance": { +"description": "Name of the database instance.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#sslCert`.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 Fingerprint.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertDetail": { +"description": "SslCertDetail.", +"id": "SslCertDetail", +"properties": { +"certInfo": { +"$ref": "SslCert", +"description": "The public information about the cert." +}, +"certPrivateKey": { +"description": "The private key for the client cert, in pem format. Keep private in order to protect your security.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertsCreateEphemeralRequest": { +"description": "SslCerts create ephemeral certificate request.", +"id": "SslCertsCreateEphemeralRequest", +"properties": { +"access_token": { +"description": "Access token to include in the signed certificate.", +"type": "string" +}, +"public_key": { +"description": "PEM encoded public key to include in the signed certificate.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertsInsertRequest": { +"description": "SslCerts insert request.", +"id": "SslCertsInsertRequest", +"properties": { +"commonName": { +"description": "User supplied name. Must be a distinct name from the other certificates for this instance.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertsInsertResponse": { +"description": "SslCert insert response.", +"id": "SslCertsInsertResponse", +"properties": { +"clientCert": { +"$ref": "SslCertDetail", +"description": "The new client certificate and private key." +}, +"kind": { +"description": "This is always `sql#sslCertsInsert`.", +"type": "string" +}, +"operation": { +"$ref": "Operation", +"description": "The operation to track the ssl certs insert request." +}, +"serverCaCert": { +"$ref": "SslCert", +"description": "The server Certificate Authority's certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource." +} +}, +"type": "object" +}, +"SslCertsListResponse": { +"description": "SslCerts list response.", +"id": "SslCertsListResponse", +"properties": { +"items": { +"description": "List of client certificates for the instance.", +"items": { +"$ref": "SslCert" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#sslCertsList`.", +"type": "string" +} +}, +"type": "object" +}, +"SyncFlags": { +"description": "Initial sync flags for certain Cloud SQL APIs. Currently used for the MySQL external server initial dump.", +"id": "SyncFlags", +"properties": { +"name": { +"description": "The name of the flag.", +"type": "string" +}, +"value": { +"description": "The value of the flag. This field must be omitted if the flag doesn't take a value.", +"type": "string" +} +}, +"type": "object" +}, +"Tier": { +"description": "A Google Cloud SQL service tier resource.", +"id": "Tier", +"properties": { +"DiskQuota": { +"description": "The maximum disk size of this tier in bytes.", +"format": "int64", +"type": "string" +}, +"RAM": { +"description": "The maximum RAM usage of this tier in bytes.", +"format": "int64", +"type": "string" +}, +"kind": { +"description": "This is always `sql#tier`.", +"type": "string" +}, +"region": { +"description": "The applicable regions for this tier.", +"items": { +"type": "string" +}, +"type": "array" +}, +"tier": { +"description": "An identifier for the machine type, for example, `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing).", +"type": "string" +} +}, +"type": "object" +}, +"TiersListResponse": { +"description": "Tiers list response.", +"id": "TiersListResponse", +"properties": { +"items": { +"description": "List of tiers.", +"items": { +"$ref": "Tier" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#tiersList`.", +"type": "string" +} +}, +"type": "object" +}, +"TruncateLogContext": { +"description": "Database Instance truncate log context.", +"id": "TruncateLogContext", +"properties": { +"kind": { +"description": "This is always `sql#truncateLogContext`.", +"type": "string" +}, +"logType": { +"description": "The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and `MYSQL_SLOW_TABLE`.", +"type": "string" +} +}, +"type": "object" +}, +"User": { +"description": "A Cloud SQL user resource.", +"id": "User", +"properties": { +"dualPasswordType": { +"description": "Dual password status for the user.", +"enum": [ +"DUAL_PASSWORD_TYPE_UNSPECIFIED", +"NO_MODIFY_DUAL_PASSWORD", +"NO_DUAL_PASSWORD", +"DUAL_PASSWORD" +], +"enumDescriptions": [ +"The default value.", +"Do not update the user's dual password status.", +"No dual password usable for connecting using this user.", +"Dual password usable for connecting using this user." +], +"type": "string" +}, +"etag": { +"description": "This field is deprecated and will be removed from a future version of the API.", +"type": "string" +}, +"host": { +"description": "Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.", +"type": "string" +}, +"instance": { +"description": "The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for `update` because it is already specified on the URL.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#user`.", +"type": "string" +}, +"name": { +"description": "The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.", +"type": "string" +}, +"password": { +"description": "The password for the user.", +"type": "string" +}, +"passwordPolicy": { +"$ref": "UserPasswordValidationPolicy", +"description": "User level password validation policy." +}, +"project": { +"description": "The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for `update` because it is already specified on the URL.", +"type": "string" +}, +"sqlserverUserDetails": { +"$ref": "SqlServerUserDetails" +}, +"type": { +"description": "The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.", +"enum": [ +"BUILT_IN", +"CLOUD_IAM_USER", +"CLOUD_IAM_SERVICE_ACCOUNT", +"CLOUD_IAM_GROUP", +"CLOUD_IAM_GROUP_USER", +"CLOUD_IAM_GROUP_SERVICE_ACCOUNT" +], +"enumDescriptions": [ +"The database's built-in user type.", +"Cloud IAM user.", +"Cloud IAM service account.", +"Cloud IAM group non-login user.", +"Cloud IAM group login user.", +"Cloud IAM group login service account." +], +"type": "string" +} +}, +"type": "object" +}, +"UserPasswordValidationPolicy": { +"description": "User level password validation policy.", +"id": "UserPasswordValidationPolicy", +"properties": { +"allowedFailedAttempts": { +"description": "Number of failed login attempts allowed before user get locked.", +"format": "int32", +"type": "integer" +}, +"enableFailedAttemptsCheck": { +"description": "If true, failed login attempts check will be enabled.", +"type": "boolean" +}, +"enablePasswordVerification": { +"description": "If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.", +"type": "boolean" +}, +"passwordExpirationDuration": { +"description": "Expiration duration after password is updated.", +"format": "google-duration", +"type": "string" +}, +"status": { +"$ref": "PasswordStatus", +"description": "Output only. Read-only password status.", +"readOnly": true +} +}, +"type": "object" +}, +"UsersListResponse": { +"description": "User list response.", +"id": "UsersListResponse", +"properties": { +"items": { +"description": "List of user resources in the instance.", +"items": { +"$ref": "User" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#usersList`.", +"type": "string" +}, +"nextPageToken": { +"deprecated": true, +"description": "Unused.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud SQL Admin API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sqladmin.v1beta4.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sqladmin.v1beta4.json new file mode 100644 index 0000000000000000000000000000000000000000..9bd699dd1170598a28cc19dd3c29efffa40a33dc --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sqladmin.v1beta4.json @@ -0,0 +1,6205 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/sqlservice.admin": { +"description": "Manage your Google SQL Service instances" +} +} +} +}, +"basePath": "", +"baseUrl": "https://sqladmin.googleapis.com/", +"batchPath": "batch", +"canonicalName": "SQL Admin", +"description": "API for Cloud SQL database instance management", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/cloud-sql/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "sqladmin:v1beta4", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://sqladmin.mtls.googleapis.com/", +"name": "sqladmin", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"backupRuns": { +"methods": { +"delete": { +"description": "Deletes the backup taken by a backup run.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}", +"httpMethod": "DELETE", +"id": "sql.backupRuns.delete", +"parameterOrder": [ +"project", +"instance", +"id" +], +"parameters": { +"id": { +"description": "The ID of the backup run to delete. To find a backup run ID, use the [list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1beta4/backupRuns/list) method.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a backup run.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}", +"httpMethod": "GET", +"id": "sql.backupRuns.get", +"parameterOrder": [ +"project", +"instance", +"id" +], +"parameters": { +"id": { +"description": "The ID of this backup run.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns/{id}", +"response": { +"$ref": "BackupRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Creates a new backup run on demand.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns", +"httpMethod": "POST", +"id": "sql.backupRuns.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns", +"request": { +"$ref": "BackupRun" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists all backup runs associated with the project or a given instance and configuration in the reverse chronological order of the backup initiation time.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns", +"httpMethod": "GET", +"id": "sql.backupRuns.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID, or \"-\" for all instances. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"maxResults": { +"description": "Maximum number of backup runs per response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/backupRuns", +"response": { +"$ref": "BackupRunsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"connect": { +"methods": { +"generateEphemeralCert": { +"description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}:generateEphemeralCert", +"httpMethod": "POST", +"id": "sql.connect.generateEphemeral", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}:generateEphemeralCert", +"request": { +"$ref": "GenerateEphemeralCertRequest" +}, +"response": { +"$ref": "GenerateEphemeralCertResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves connect settings about a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/connectSettings", +"httpMethod": "GET", +"id": "sql.connect.get", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"readTime": { +"description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", +"format": "google-datetime", +"location": "query", +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/connectSettings", +"response": { +"$ref": "ConnectSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"databases": { +"methods": { +"delete": { +"description": "Deletes a database from a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "DELETE", +"id": "sql.databases.delete", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database to be deleted in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a database inside a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "GET", +"id": "sql.databases.get", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"response": { +"$ref": "Database" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Inserts a resource containing information about a database inside a Cloud SQL instance. **Note:** You can't modify the default character set and collation.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases", +"httpMethod": "POST", +"id": "sql.databases.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/databases", +"request": { +"$ref": "Database" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists databases in the specified Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases", +"httpMethod": "GET", +"id": "sql.databases.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/databases", +"response": { +"$ref": "DatabasesListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"patch": { +"description": "Partially updates a resource containing information about a database inside a Cloud SQL instance. This method supports patch semantics.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "PATCH", +"id": "sql.databases.patch", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database to be updated in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"request": { +"$ref": "Database" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"update": { +"description": "Updates a resource containing information about a database inside a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"httpMethod": "PUT", +"id": "sql.databases.update", +"parameterOrder": [ +"project", +"instance", +"database" +], +"parameters": { +"database": { +"description": "Name of the database to be updated in the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/databases/{database}", +"request": { +"$ref": "Database" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"flags": { +"methods": { +"list": { +"description": "Lists all available database flags for Cloud SQL instances.", +"flatPath": "sql/v1beta4/flags", +"httpMethod": "GET", +"id": "sql.flags.list", +"parameterOrder": [], +"parameters": { +"databaseVersion": { +"description": "Database type and version you want to retrieve flags for. By default, this method returns flags for all database types and versions.", +"location": "query", +"type": "string" +} +}, +"path": "sql/v1beta4/flags", +"response": { +"$ref": "FlagsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"instances": { +"methods": { +"acquireSsrsLease": { +"description": "Acquire a lease for the setup of SQL Server Reporting Services (SSRS).", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease", +"httpMethod": "POST", +"id": "sql.instances.acquireSsrsLease", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Required. Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id).", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Required. ID of the project that contains the instance (Example: project-id).", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/acquireSsrsLease", +"request": { +"$ref": "InstancesAcquireSsrsLeaseRequest" +}, +"response": { +"$ref": "SqlInstancesAcquireSsrsLeaseResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"addServerCa": { +"description": "Add a new trusted Certificate Authority (CA) version for the specified instance. Required to prepare for a certificate rotation. If a CA version was previously added but never used in a certificate rotation, this operation replaces that version. There cannot be more than one CA version waiting to be rotated in.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/addServerCa", +"httpMethod": "POST", +"id": "sql.instances.addServerCa", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/addServerCa", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"clone": { +"description": "Creates a Cloud SQL instance as a clone of the source instance. Using this operation might cause your instance to restart.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/clone", +"httpMethod": "POST", +"id": "sql.instances.clone", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the source as well as the clone Cloud SQL instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/clone", +"request": { +"$ref": "InstancesCloneRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"delete": { +"description": "Deletes a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}", +"httpMethod": "DELETE", +"id": "sql.instances.delete", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance to be deleted.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"demote": { +"description": "Demotes an existing standalone instance to be a Cloud SQL read replica for an external database server.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/demote", +"httpMethod": "POST", +"id": "sql.instances.demote", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Required. The name of the Cloud SQL instance.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Required. The project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/demote", +"request": { +"$ref": "InstancesDemoteRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"demoteMaster": { +"description": "Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster", +"httpMethod": "POST", +"id": "sql.instances.demoteMaster", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/demoteMaster", +"request": { +"$ref": "InstancesDemoteMasterRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"export": { +"description": "Exports data from a Cloud SQL instance to a Cloud Storage bucket as a SQL dump or CSV file.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/export", +"httpMethod": "POST", +"id": "sql.instances.export", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "The Cloud SQL instance ID. This doesn't include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance to be exported.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/export", +"request": { +"$ref": "InstancesExportRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"failover": { +"description": "Initiates a manual failover of a high availability (HA) primary instance to a standby instance, which becomes the primary instance. Users are then rerouted to the new primary. For more information, see the [Overview of high availability](https://cloud.google.com/sql/docs/mysql/high-availability) page in the Cloud SQL documentation. If using Legacy HA (MySQL only), this causes the instance to failover to its failover replica instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/failover", +"httpMethod": "POST", +"id": "sql.instances.failover", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/failover", +"request": { +"$ref": "InstancesFailoverRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}", +"httpMethod": "GET", +"id": "sql.instances.get", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}", +"response": { +"$ref": "DatabaseInstance" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"import": { +"description": "Imports data into a Cloud SQL instance from a SQL dump or CSV file in Cloud Storage.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/import", +"httpMethod": "POST", +"id": "sql.instances.import", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/import", +"request": { +"$ref": "InstancesImportRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"insert": { +"description": "Creates a new Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances", +"httpMethod": "POST", +"id": "sql.instances.insert", +"parameterOrder": [ +"project" +], +"parameters": { +"project": { +"description": "Project ID of the project to which the newly created Cloud SQL instances should belong.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances", +"request": { +"$ref": "DatabaseInstance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists instances under a given project.", +"flatPath": "sql/v1beta4/projects/{project}/instances", +"httpMethod": "GET", +"id": "sql.instances.list", +"parameterOrder": [ +"project" +], +"parameters": { +"filter": { +"description": "A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000.", +"format": "uint32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project for which to list Cloud SQL instances.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances", +"response": { +"$ref": "InstancesListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"listServerCas": { +"description": "Lists all of the trusted Certificate Authorities (CAs) for the specified instance. There can be up to three CAs listed: the CA that was used to sign the certificate that is currently in use, a CA that has been added but not yet used to sign a certificate, and a CA used to sign a certificate that has previously rotated out.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/listServerCas", +"httpMethod": "GET", +"id": "sql.instances.listServerCas", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/listServerCas", +"response": { +"$ref": "InstancesListServerCasResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"patch": { +"description": "Partially updates settings of a Cloud SQL instance by merging the request with the current configuration. This method supports patch semantics.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}", +"httpMethod": "PATCH", +"id": "sql.instances.patch", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}", +"request": { +"$ref": "DatabaseInstance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"promoteReplica": { +"description": "Promotes the read replica instance to be a stand-alone Cloud SQL instance. Using this operation might cause your instance to restart.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica", +"httpMethod": "POST", +"id": "sql.instances.promoteReplica", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"failover": { +"description": "Set to true if the promote operation should attempt to re-add the original primary as a replica when it comes back online. Otherwise, if this value is false or not set, the original primary will be a standalone instance.", +"location": "query", +"type": "boolean" +}, +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/promoteReplica", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"reencrypt": { +"description": "Reencrypt CMEK instance with latest key version.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/reencrypt", +"httpMethod": "POST", +"id": "sql.instances.reencrypt", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/reencrypt", +"request": { +"$ref": "InstancesReencryptRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"releaseSsrsLease": { +"description": "Release a lease for the setup of SQL Server Reporting Services (SSRS).", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease", +"httpMethod": "POST", +"id": "sql.instances.releaseSsrsLease", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Required. The Cloud SQL instance ID. This doesn't include the project ID. It's composed of lowercase letters, numbers, and hyphens, and it must start with a letter. The total length must be 98 characters or less (Example: instance-id).", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Required. The ID of the project that contains the instance (Example: project-id).", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/releaseSsrsLease", +"response": { +"$ref": "SqlInstancesReleaseSsrsLeaseResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"resetSslConfig": { +"description": "Deletes all client certificates and generates a new server SSL certificate for the instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig", +"httpMethod": "POST", +"id": "sql.instances.resetSslConfig", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/resetSslConfig", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"restart": { +"description": "Restarts a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/restart", +"httpMethod": "POST", +"id": "sql.instances.restart", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance to be restarted.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/restart", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"restoreBackup": { +"description": "Restores a backup of a Cloud SQL instance. Using this operation might cause your instance to restart.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup", +"httpMethod": "POST", +"id": "sql.instances.restoreBackup", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/restoreBackup", +"request": { +"$ref": "InstancesRestoreBackupRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"rotateServerCa": { +"description": "Rotates the server certificate to one signed by the Certificate Authority (CA) version previously added with the addServerCA method.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa", +"httpMethod": "POST", +"id": "sql.instances.rotateServerCa", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/rotateServerCa", +"request": { +"$ref": "InstancesRotateServerCaRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"startReplica": { +"description": "Starts the replication in the read replica instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/startReplica", +"httpMethod": "POST", +"id": "sql.instances.startReplica", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/startReplica", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"stopReplica": { +"description": "Stops the replication in the read replica instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/stopReplica", +"httpMethod": "POST", +"id": "sql.instances.stopReplica", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/stopReplica", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"switchover": { +"description": "Switches over from the primary instance to a replica instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/switchover", +"httpMethod": "POST", +"id": "sql.instances.switchover", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"dbTimeout": { +"description": "Optional. (MySQL only) Cloud SQL instance operations timeout, which is a sum of all database operations. Default value is 10 minutes and can be modified to a maximum value of 24 hours.", +"format": "google-duration", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/switchover", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"truncateLog": { +"description": "Truncate MySQL general and slow query log tables MySQL only.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/truncateLog", +"httpMethod": "POST", +"id": "sql.instances.truncateLog", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the Cloud SQL project.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/truncateLog", +"request": { +"$ref": "InstancesTruncateLogRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"update": { +"description": "Updates settings of a Cloud SQL instance. Using this operation might cause your instance to restart.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}", +"httpMethod": "PUT", +"id": "sql.instances.update", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}", +"request": { +"$ref": "DatabaseInstance" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "Cancels an instance operation that has been performed on an instance.", +"flatPath": "sql/v1beta4/projects/{project}/operations/{operation}/cancel", +"httpMethod": "POST", +"id": "sql.operations.cancel", +"parameterOrder": [ +"project", +"operation" +], +"parameters": { +"operation": { +"description": "Instance operation ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/operations/{operation}/cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves an instance operation that has been performed on an instance.", +"flatPath": "sql/v1beta4/projects/{project}/operations/{operation}", +"httpMethod": "GET", +"id": "sql.operations.get", +"parameterOrder": [ +"project", +"operation" +], +"parameters": { +"operation": { +"description": "Instance operation ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/operations/{operation}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists all instance operations that have been performed on the given Cloud SQL instance in the reverse chronological order of the start time.", +"flatPath": "sql/v1beta4/projects/{project}/operations", +"httpMethod": "GET", +"id": "sql.operations.list", +"parameterOrder": [ +"project" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Maximum number of operations per response.", +"format": "uint32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/operations", +"response": { +"$ref": "OperationsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"projects": { +"resources": { +"instances": { +"methods": { +"getDiskShrinkConfig": { +"description": "Get Disk Shrink Config for a given instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig", +"httpMethod": "GET", +"id": "sql.projects.instances.getDiskShrinkConfig", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/getDiskShrinkConfig", +"response": { +"$ref": "SqlInstancesGetDiskShrinkConfigResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"getLatestRecoveryTime": { +"description": "Get Latest Recovery Time for a given instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime", +"httpMethod": "GET", +"id": "sql.projects.instances.getLatestRecoveryTime", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/getLatestRecoveryTime", +"response": { +"$ref": "SqlInstancesGetLatestRecoveryTimeResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"performDiskShrink": { +"description": "Perform Disk Shrink on primary instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink", +"httpMethod": "POST", +"id": "sql.projects.instances.performDiskShrink", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/performDiskShrink", +"request": { +"$ref": "PerformDiskShrinkContext" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"rescheduleMaintenance": { +"description": "Reschedules the maintenance on the given instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance", +"httpMethod": "POST", +"id": "sql.projects.instances.rescheduleMaintenance", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/rescheduleMaintenance", +"request": { +"$ref": "SqlInstancesRescheduleMaintenanceRequestBody" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"resetReplicaSize": { +"description": "Reset Replica Size to primary instance disk size.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize", +"httpMethod": "POST", +"id": "sql.projects.instances.resetReplicaSize", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL read replica instance name.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the read replica.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/resetReplicaSize", +"request": { +"$ref": "SqlInstancesResetReplicaSizeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"startExternalSync": { +"description": "Start External primary instance migration.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync", +"httpMethod": "POST", +"id": "sql.projects.instances.startExternalSync", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/startExternalSync", +"request": { +"$ref": "SqlInstancesStartExternalSyncRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"verifyExternalSyncSettings": { +"description": "Verify External primary instance external sync settings.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings", +"httpMethod": "POST", +"id": "sql.projects.instances.verifyExternalSyncSettings", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/verifyExternalSyncSettings", +"request": { +"$ref": "SqlInstancesVerifyExternalSyncSettingsRequest" +}, +"response": { +"$ref": "SqlInstancesVerifyExternalSyncSettingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +} +} +}, +"sslCerts": { +"methods": { +"createEphemeral": { +"description": "Generates a short-lived X509 certificate containing the provided public key and signed by a private key specific to the target instance. Users may use the certificate to authenticate as themselves when connecting to the database.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral", +"httpMethod": "POST", +"id": "sql.sslCerts.createEphemeral", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the Cloud SQL project.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/createEphemeral", +"request": { +"$ref": "SslCertsCreateEphemeralRequest" +}, +"response": { +"$ref": "SslCert" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"delete": { +"description": "Deletes the SSL certificate. For First Generation instances, the certificate remains valid until the instance is restarted.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"httpMethod": "DELETE", +"id": "sql.sslCerts.delete", +"parameterOrder": [ +"project", +"instance", +"sha1Fingerprint" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 FingerPrint.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a particular SSL certificate. Does not include the private key (required for usage). The private key must be saved from the response to initial creation.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"httpMethod": "GET", +"id": "sql.sslCerts.get", +"parameterOrder": [ +"project", +"instance", +"sha1Fingerprint" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 FingerPrint.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts/{sha1Fingerprint}", +"response": { +"$ref": "SslCert" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Creates an SSL certificate and returns it along with the private key and server certificate authority. The new certificate will not be usable until the instance is restarted.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts", +"httpMethod": "POST", +"id": "sql.sslCerts.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts", +"request": { +"$ref": "SslCertsInsertRequest" +}, +"response": { +"$ref": "SslCertsInsertResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists all of the current SSL certificates for the instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts", +"httpMethod": "GET", +"id": "sql.sslCerts.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Cloud SQL instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/sslCerts", +"response": { +"$ref": "SslCertsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"tiers": { +"methods": { +"list": { +"description": "Lists all available machine types (tiers) for Cloud SQL, for example, `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing).", +"flatPath": "sql/v1beta4/projects/{project}/tiers", +"httpMethod": "GET", +"id": "sql.tiers.list", +"parameterOrder": [ +"project" +], +"parameters": { +"project": { +"description": "Project ID of the project for which to list tiers.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/tiers", +"response": { +"$ref": "TiersListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +}, +"users": { +"methods": { +"delete": { +"description": "Deletes a user from a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"httpMethod": "DELETE", +"id": "sql.users.delete", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"host": { +"description": "Host of the user in the instance.", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "Name of the user in the instance.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"get": { +"description": "Retrieves a resource containing information about a user.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users/{name}", +"httpMethod": "GET", +"id": "sql.users.get", +"parameterOrder": [ +"project", +"instance", +"name" +], +"parameters": { +"host": { +"description": "Host of a user of the instance.", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "User of the instance.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/users/{name}", +"response": { +"$ref": "User" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"insert": { +"description": "Creates a new user in a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"httpMethod": "POST", +"id": "sql.users.insert", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"request": { +"$ref": "User" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"list": { +"description": "Lists users in the specified Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"httpMethod": "GET", +"id": "sql.users.list", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"response": { +"$ref": "UsersListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +}, +"update": { +"description": "Updates an existing user in a Cloud SQL instance.", +"flatPath": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"httpMethod": "PUT", +"id": "sql.users.update", +"parameterOrder": [ +"project", +"instance" +], +"parameters": { +"host": { +"description": "Optional. Host of the user in the instance.", +"location": "query", +"type": "string" +}, +"instance": { +"description": "Database instance ID. This does not include the project ID.", +"location": "path", +"required": true, +"type": "string" +}, +"name": { +"description": "Name of the user in the instance.", +"location": "query", +"type": "string" +}, +"project": { +"description": "Project ID of the project that contains the instance.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "sql/v1beta4/projects/{project}/instances/{instance}/users", +"request": { +"$ref": "User" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/sqlservice.admin" +] +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://sqladmin.googleapis.com/", +"schemas": { +"AclEntry": { +"description": "An entry for an Access Control list.", +"id": "AclEntry", +"properties": { +"expirationTime": { +"description": "The time when this access control entry expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"kind": { +"description": "This is always `sql#aclEntry`.", +"type": "string" +}, +"name": { +"description": "Optional. A label to identify this entry.", +"type": "string" +}, +"value": { +"description": "The allowlisted value for the access control list.", +"type": "string" +} +}, +"type": "object" +}, +"AcquireSsrsLeaseContext": { +"description": "Acquire SSRS lease context.", +"id": "AcquireSsrsLeaseContext", +"properties": { +"duration": { +"description": "Lease duration needed for the SSRS setup.", +"format": "google-duration", +"type": "string" +}, +"reportDatabase": { +"description": "The report database to be used for the SSRS setup.", +"type": "string" +}, +"serviceLogin": { +"description": "The username to be used as the service login to connect to the report database for SSRS setup.", +"type": "string" +}, +"setupLogin": { +"description": "The username to be used as the setup login to connect to the database server for SSRS setup.", +"type": "string" +} +}, +"type": "object" +}, +"AdvancedMachineFeatures": { +"description": "Specifies options for controlling advanced machine features.", +"id": "AdvancedMachineFeatures", +"properties": { +"threadsPerCore": { +"description": "The number of threads per physical core.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ApiWarning": { +"description": "An Admin API warning message.", +"id": "ApiWarning", +"properties": { +"code": { +"description": "Code to uniquely identify the warning type.", +"enum": [ +"SQL_API_WARNING_CODE_UNSPECIFIED", +"REGION_UNREACHABLE", +"MAX_RESULTS_EXCEEDS_LIMIT", +"COMPROMISED_CREDENTIALS", +"INTERNAL_STATE_FAILURE" +], +"enumDescriptions": [ +"An unknown or unset warning type from Cloud SQL API.", +"Warning when one or more regions are not reachable. The returned result set may be incomplete.", +"Warning when user provided maxResults parameter exceeds the limit. The returned result set may be incomplete.", +"Warning when user tries to create/update a user with credentials that have previously been compromised by a public data breach.", +"Warning when the operation succeeds but some non-critical workflow state failed." +], +"type": "string" +}, +"message": { +"description": "The warning message.", +"type": "string" +}, +"region": { +"description": "The region name for REGION_UNREACHABLE warning.", +"type": "string" +} +}, +"type": "object" +}, +"BackupConfiguration": { +"description": "Database instance backup configuration.", +"id": "BackupConfiguration", +"properties": { +"backupRetentionSettings": { +"$ref": "BackupRetentionSettings", +"description": "Backup retention settings." +}, +"binaryLogEnabled": { +"description": "(MySQL only) Whether binary log is enabled. If backup configuration is disabled, binarylog must be disabled as well.", +"type": "boolean" +}, +"enabled": { +"description": "Whether this configuration is enabled.", +"type": "boolean" +}, +"kind": { +"description": "This is always `sql#backupConfiguration`.", +"type": "string" +}, +"location": { +"description": "Location of the backup", +"type": "string" +}, +"pointInTimeRecoveryEnabled": { +"description": "Whether point in time recovery is enabled.", +"type": "boolean" +}, +"replicationLogArchivingEnabled": { +"description": "Reserved for future use.", +"type": "boolean" +}, +"startTime": { +"description": "Start time for the daily backup configuration in UTC timezone in the 24 hour format - `HH:MM`.", +"type": "string" +}, +"transactionLogRetentionDays": { +"description": "The number of days of transaction logs we retain for point in time restore, from 1-7.", +"format": "int32", +"type": "integer" +}, +"transactionalLogStorageState": { +"description": "Output only. This value contains the storage location of transactional logs for the database for point-in-time recovery.", +"enum": [ +"TRANSACTIONAL_LOG_STORAGE_STATE_UNSPECIFIED", +"DISK", +"SWITCHING_TO_CLOUD_STORAGE", +"SWITCHED_TO_CLOUD_STORAGE", +"CLOUD_STORAGE" +], +"enumDescriptions": [ +"Unspecified.", +"The transaction logs for the instance are stored on a data disk.", +"The transaction logs for the instance are switching from being stored on a data disk to being stored in Cloud Storage.", +"The transaction logs for the instance are now stored in Cloud Storage. Previously, they were stored on a data disk.", +"The transaction logs for the instance are stored in Cloud Storage." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"BackupContext": { +"description": "Backup context.", +"id": "BackupContext", +"properties": { +"backupId": { +"description": "The identifier of the backup.", +"format": "int64", +"type": "string" +}, +"kind": { +"description": "This is always `sql#backupContext`.", +"type": "string" +} +}, +"type": "object" +}, +"BackupReencryptionConfig": { +"description": "Backup Reencryption Config", +"id": "BackupReencryptionConfig", +"properties": { +"backupLimit": { +"description": "Backup re-encryption limit", +"format": "int32", +"type": "integer" +}, +"backupType": { +"description": "Type of backups users want to re-encrypt.", +"enum": [ +"BACKUP_TYPE_UNSPECIFIED", +"AUTOMATED", +"ON_DEMAND" +], +"enumDescriptions": [ +"Unknown backup type, will be defaulted to AUTOMATIC backup type", +"Reencrypt automatic backups", +"Reencrypt on-demand backups" +], +"type": "string" +} +}, +"type": "object" +}, +"BackupRetentionSettings": { +"description": "We currently only support backup retention by specifying the number of backups we will retain.", +"id": "BackupRetentionSettings", +"properties": { +"retainedBackups": { +"description": "Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit is 'COUNT', we will retain this many backups.", +"format": "int32", +"type": "integer" +}, +"retentionUnit": { +"description": "The unit that 'retained_backups' represents.", +"enum": [ +"RETENTION_UNIT_UNSPECIFIED", +"COUNT" +], +"enumDescriptions": [ +"Backup retention unit is unspecified, will be treated as COUNT.", +"Retention will be by count, eg. \"retain the most recent 7 backups\"." +], +"type": "string" +} +}, +"type": "object" +}, +"BackupRun": { +"description": "A BackupRun resource.", +"id": "BackupRun", +"properties": { +"backupKind": { +"description": "Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.", +"enum": [ +"SQL_BACKUP_KIND_UNSPECIFIED", +"SNAPSHOT", +"PHYSICAL" +], +"enumDescriptions": [ +"This is an unknown BackupKind.", +"The snapshot based backups", +"Physical backups" +], +"type": "string" +}, +"description": { +"description": "The description of this run, only applicable to on-demand backups.", +"type": "string" +}, +"diskEncryptionConfiguration": { +"$ref": "DiskEncryptionConfiguration", +"description": "Encryption configuration specific to a backup." +}, +"diskEncryptionStatus": { +"$ref": "DiskEncryptionStatus", +"description": "Encryption status specific to a backup." +}, +"endTime": { +"description": "The time the backup operation completed in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"enqueuedTime": { +"description": "The time the run was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "OperationError", +"description": "Information about why the backup operation failed. This is only present if the run has the FAILED status." +}, +"id": { +"description": "The identifier for this backup run. Unique only for a specific Cloud SQL instance.", +"format": "int64", +"type": "string" +}, +"instance": { +"description": "Name of the database instance.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#backupRun`.", +"type": "string" +}, +"location": { +"description": "Location of the backups.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"startTime": { +"description": "The time the backup operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"status": { +"description": "The status of this run.", +"enum": [ +"SQL_BACKUP_RUN_STATUS_UNSPECIFIED", +"ENQUEUED", +"OVERDUE", +"RUNNING", +"FAILED", +"SUCCESSFUL", +"SKIPPED", +"DELETION_PENDING", +"DELETION_FAILED", +"DELETED" +], +"enumDescriptions": [ +"The status of the run is unknown.", +"The backup operation was enqueued.", +"The backup is overdue across a given backup window. Indicates a problem. Example: Long-running operation in progress during the whole window.", +"The backup is in progress.", +"The backup failed.", +"The backup was successful.", +"The backup was skipped (without problems) for a given backup window. Example: Instance was idle.", +"The backup is about to be deleted.", +"The backup deletion failed.", +"The backup has been deleted." +], +"type": "string" +}, +"timeZone": { +"description": "Backup time zone to prevent restores to an instance with a different time zone. Now relevant only for SQL Server.", +"type": "string" +}, +"type": { +"description": "The type of this run; can be either \"AUTOMATED\" or \"ON_DEMAND\" or \"FINAL\". This field defaults to \"ON_DEMAND\" and is ignored, when specified for insert requests.", +"enum": [ +"SQL_BACKUP_RUN_TYPE_UNSPECIFIED", +"AUTOMATED", +"ON_DEMAND" +], +"enumDescriptions": [ +"This is an unknown BackupRun type.", +"The backup schedule automatically triggers a backup.", +"The user manually triggers a backup." +], +"type": "string" +}, +"windowStartTime": { +"description": "The start time of the backup window during which this the backup was attempted in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"BackupRunsListResponse": { +"description": "Backup run list results.", +"id": "BackupRunsListResponse", +"properties": { +"items": { +"description": "A list of backup runs in reverse chronological order of the enqueued time.", +"items": { +"$ref": "BackupRun" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#backupRunsList`.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"BinLogCoordinates": { +"description": "Binary log coordinates.", +"id": "BinLogCoordinates", +"properties": { +"binLogFileName": { +"description": "Name of the binary log file for a Cloud SQL instance.", +"type": "string" +}, +"binLogPosition": { +"description": "Position (offset) within the binary log file.", +"format": "int64", +"type": "string" +}, +"kind": { +"description": "This is always `sql#binLogCoordinates`.", +"type": "string" +} +}, +"type": "object" +}, +"CloneContext": { +"description": "Database instance clone context.", +"id": "CloneContext", +"properties": { +"allocatedIpRange": { +"description": "The name of the allocated ip range for the private ip Cloud SQL instance. For example: \"google-managed-services-default\". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. Reserved for future use.", +"type": "string" +}, +"binLogCoordinates": { +"$ref": "BinLogCoordinates", +"description": "Binary log coordinates, if specified, identify the position up to which the source instance is cloned. If not specified, the source instance is cloned up to the most recent binary log coordinates." +}, +"databaseNames": { +"description": "(SQL Server only) Clone only the specified databases from the source instance. Clone all databases if empty.", +"items": { +"type": "string" +}, +"type": "array" +}, +"destinationInstanceName": { +"description": "Name of the Cloud SQL instance to be created as a clone.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#cloneContext`.", +"type": "string" +}, +"pitrTimestampMs": { +"description": "Reserved for future use.", +"format": "int64", +"type": "string" +}, +"pointInTime": { +"description": "Timestamp, if specified, identifies the time to which the source instance is cloned.", +"format": "google-datetime", +"type": "string" +}, +"preferredZone": { +"description": "Optional. (Point-in-time recovery for PostgreSQL only) Clone to an instance in the specified zone. If no zone is specified, clone to the same zone as the source instance.", +"type": "string" +} +}, +"type": "object" +}, +"ConnectSettings": { +"description": "Connect settings retrieval response.", +"id": "ConnectSettings", +"properties": { +"backendType": { +"description": "`SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.", +"enum": [ +"SQL_BACKEND_TYPE_UNSPECIFIED", +"FIRST_GEN", +"SECOND_GEN", +"EXTERNAL" +], +"enumDeprecated": [ +false, +true, +false, +false +], +"enumDescriptions": [ +"This is an unknown backend type for instance.", +"V1 speckle instance.", +"V2 speckle instance.", +"On premises instance." +], +"type": "string" +}, +"databaseVersion": { +"description": "The database engine type and version. The `databaseVersion` field cannot be changed after instance creation. MySQL instances: `MYSQL_8_0`, `MYSQL_5_7` (default), or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11` or `POSTGRES_12` (default), `POSTGRES_13`, or `POSTGRES_14`. SQL Server instances: `SQLSERVER_2017_STANDARD` (default), `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`.", +"enum": [ +"SQL_DATABASE_VERSION_UNSPECIFIED", +"MYSQL_5_1", +"MYSQL_5_5", +"MYSQL_5_6", +"MYSQL_5_7", +"SQLSERVER_2017_STANDARD", +"SQLSERVER_2017_ENTERPRISE", +"SQLSERVER_2017_EXPRESS", +"SQLSERVER_2017_WEB", +"POSTGRES_9_6", +"POSTGRES_10", +"POSTGRES_11", +"POSTGRES_12", +"POSTGRES_13", +"POSTGRES_14", +"POSTGRES_15", +"MYSQL_8_0", +"MYSQL_8_0_18", +"MYSQL_8_0_26", +"MYSQL_8_0_27", +"MYSQL_8_0_28", +"MYSQL_8_0_29", +"MYSQL_8_0_30", +"MYSQL_8_0_31", +"MYSQL_8_0_32", +"MYSQL_8_0_33", +"MYSQL_8_0_34", +"MYSQL_8_0_35", +"MYSQL_8_0_36", +"MYSQL_8_0_37", +"MYSQL_8_0_38", +"MYSQL_8_0_39", +"MYSQL_8_0_40", +"SQLSERVER_2019_STANDARD", +"SQLSERVER_2019_ENTERPRISE", +"SQLSERVER_2019_EXPRESS", +"SQLSERVER_2019_WEB", +"SQLSERVER_2022_STANDARD", +"SQLSERVER_2022_ENTERPRISE", +"SQLSERVER_2022_EXPRESS", +"SQLSERVER_2022_WEB" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"This is an unknown database version.", +"The database version is MySQL 5.1.", +"The database version is MySQL 5.5.", +"The database version is MySQL 5.6.", +"The database version is MySQL 5.7.", +"The database version is SQL Server 2017 Standard.", +"The database version is SQL Server 2017 Enterprise.", +"The database version is SQL Server 2017 Express.", +"The database version is SQL Server 2017 Web.", +"The database version is PostgreSQL 9.6.", +"The database version is PostgreSQL 10.", +"The database version is PostgreSQL 11.", +"The database version is PostgreSQL 12.", +"The database version is PostgreSQL 13.", +"The database version is PostgreSQL 14.", +"The database version is PostgreSQL 15.", +"The database version is MySQL 8.", +"The database major version is MySQL 8.0 and the minor version is 18.", +"The database major version is MySQL 8.0 and the minor version is 26.", +"The database major version is MySQL 8.0 and the minor version is 27.", +"The database major version is MySQL 8.0 and the minor version is 28.", +"The database major version is MySQL 8.0 and the minor version is 29.", +"The database major version is MySQL 8.0 and the minor version is 30.", +"The database major version is MySQL 8.0 and the minor version is 31.", +"The database major version is MySQL 8.0 and the minor version is 32.", +"The database major version is MySQL 8.0 and the minor version is 33.", +"The database major version is MySQL 8.0 and the minor version is 34.", +"The database major version is MySQL 8.0 and the minor version is 35.", +"The database major version is MySQL 8.0 and the minor version is 36.", +"The database major version is MySQL 8.0 and the minor version is 37.", +"The database major version is MySQL 8.0 and the minor version is 38.", +"The database major version is MySQL 8.0 and the minor version is 39.", +"The database major version is MySQL 8.0 and the minor version is 40.", +"The database version is SQL Server 2019 Standard.", +"The database version is SQL Server 2019 Enterprise.", +"The database version is SQL Server 2019 Express.", +"The database version is SQL Server 2019 Web.", +"The database version is SQL Server 2022 Standard.", +"The database version is SQL Server 2022 Enterprise.", +"The database version is SQL Server 2022 Express.", +"The database version is SQL Server 2022 Web." +], +"type": "string" +}, +"dnsName": { +"description": "The dns name of the instance.", +"type": "string" +}, +"ipAddresses": { +"description": "The assigned IP addresses for the instance.", +"items": { +"$ref": "IpMapping" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#connectSettings`.", +"type": "string" +}, +"pscEnabled": { +"description": "Whether PSC connectivity is enabled for this instance.", +"type": "boolean" +}, +"region": { +"description": "The cloud region for the instance. e.g. `us-central1`, `europe-west1`. The region cannot be changed after instance creation.", +"type": "string" +}, +"serverCaCert": { +"$ref": "SslCert", +"description": "SSL configuration." +} +}, +"type": "object" +}, +"DataCacheConfig": { +"description": "Data cache configurations.", +"id": "DataCacheConfig", +"properties": { +"dataCacheEnabled": { +"description": "Whether data cache is enabled for the instance.", +"type": "boolean" +} +}, +"type": "object" +}, +"Database": { +"description": "Represents a SQL database on the Cloud SQL instance.", +"id": "Database", +"properties": { +"charset": { +"description": "The Cloud SQL charset value.", +"type": "string" +}, +"collation": { +"description": "The Cloud SQL collation value.", +"type": "string" +}, +"etag": { +"description": "This field is deprecated and will be removed from a future version of the API.", +"type": "string" +}, +"instance": { +"description": "The name of the Cloud SQL instance. This does not include the project ID.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#database`.", +"type": "string" +}, +"name": { +"description": "The name of the database in the Cloud SQL instance. This does not include the project ID or instance name.", +"type": "string" +}, +"project": { +"description": "The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"sqlserverDatabaseDetails": { +"$ref": "SqlServerDatabaseDetails" +} +}, +"type": "object" +}, +"DatabaseFlags": { +"description": "Database flags for Cloud SQL instances.", +"id": "DatabaseFlags", +"properties": { +"name": { +"description": "The name of the flag. These flags are passed at instance startup, so include both server options and system variables. Flags are specified with underscores, not hyphens. For more information, see [Configuring Database Flags](https://cloud.google.com/sql/docs/mysql/flags) in the Cloud SQL documentation.", +"type": "string" +}, +"value": { +"description": "The value of the flag. Boolean flags are set to `on` for true and `off` for false. This field must be omitted if the flag doesn't take a value.", +"type": "string" +} +}, +"type": "object" +}, +"DatabaseInstance": { +"description": "A Cloud SQL instance resource.", +"id": "DatabaseInstance", +"properties": { +"availableMaintenanceVersions": { +"description": "Output only. List all maintenance versions applicable on the instance", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"backendType": { +"description": "The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.", +"enum": [ +"SQL_BACKEND_TYPE_UNSPECIFIED", +"FIRST_GEN", +"SECOND_GEN", +"EXTERNAL" +], +"enumDeprecated": [ +false, +true, +false, +false +], +"enumDescriptions": [ +"This is an unknown backend type for instance.", +"V1 speckle instance.", +"V2 speckle instance.", +"On premises instance." +], +"type": "string" +}, +"connectionName": { +"description": "Connection name of the Cloud SQL instance used in connection strings.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the instance was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"currentDiskSize": { +"deprecated": true, +"description": "The current disk usage of the instance in bytes. This property has been deprecated. Use the \"cloudsql.googleapis.com/database/disk/bytes_used\" metric in Cloud Monitoring API instead. Please see [this announcement](https://groups.google.com/d/msg/google-cloud-sql-announce/I_7-F9EBhT0/BtvFtdFeAgAJ) for details.", +"format": "int64", +"type": "string" +}, +"databaseInstalledVersion": { +"description": "Output only. Stores the current database version running on the instance including minor version such as `MYSQL_8_0_18`.", +"readOnly": true, +"type": "string" +}, +"databaseVersion": { +"description": "The database engine type and version. The `databaseVersion` field cannot be changed after instance creation.", +"enum": [ +"SQL_DATABASE_VERSION_UNSPECIFIED", +"MYSQL_5_1", +"MYSQL_5_5", +"MYSQL_5_6", +"MYSQL_5_7", +"SQLSERVER_2017_STANDARD", +"SQLSERVER_2017_ENTERPRISE", +"SQLSERVER_2017_EXPRESS", +"SQLSERVER_2017_WEB", +"POSTGRES_9_6", +"POSTGRES_10", +"POSTGRES_11", +"POSTGRES_12", +"POSTGRES_13", +"POSTGRES_14", +"POSTGRES_15", +"MYSQL_8_0", +"MYSQL_8_0_18", +"MYSQL_8_0_26", +"MYSQL_8_0_27", +"MYSQL_8_0_28", +"MYSQL_8_0_29", +"MYSQL_8_0_30", +"MYSQL_8_0_31", +"MYSQL_8_0_32", +"MYSQL_8_0_33", +"MYSQL_8_0_34", +"MYSQL_8_0_35", +"MYSQL_8_0_36", +"MYSQL_8_0_37", +"MYSQL_8_0_38", +"MYSQL_8_0_39", +"MYSQL_8_0_40", +"SQLSERVER_2019_STANDARD", +"SQLSERVER_2019_ENTERPRISE", +"SQLSERVER_2019_EXPRESS", +"SQLSERVER_2019_WEB", +"SQLSERVER_2022_STANDARD", +"SQLSERVER_2022_ENTERPRISE", +"SQLSERVER_2022_EXPRESS", +"SQLSERVER_2022_WEB" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"This is an unknown database version.", +"The database version is MySQL 5.1.", +"The database version is MySQL 5.5.", +"The database version is MySQL 5.6.", +"The database version is MySQL 5.7.", +"The database version is SQL Server 2017 Standard.", +"The database version is SQL Server 2017 Enterprise.", +"The database version is SQL Server 2017 Express.", +"The database version is SQL Server 2017 Web.", +"The database version is PostgreSQL 9.6.", +"The database version is PostgreSQL 10.", +"The database version is PostgreSQL 11.", +"The database version is PostgreSQL 12.", +"The database version is PostgreSQL 13.", +"The database version is PostgreSQL 14.", +"The database version is PostgreSQL 15.", +"The database version is MySQL 8.", +"The database major version is MySQL 8.0 and the minor version is 18.", +"The database major version is MySQL 8.0 and the minor version is 26.", +"The database major version is MySQL 8.0 and the minor version is 27.", +"The database major version is MySQL 8.0 and the minor version is 28.", +"The database major version is MySQL 8.0 and the minor version is 29.", +"The database major version is MySQL 8.0 and the minor version is 30.", +"The database major version is MySQL 8.0 and the minor version is 31.", +"The database major version is MySQL 8.0 and the minor version is 32.", +"The database major version is MySQL 8.0 and the minor version is 33.", +"The database major version is MySQL 8.0 and the minor version is 34.", +"The database major version is MySQL 8.0 and the minor version is 35.", +"The database major version is MySQL 8.0 and the minor version is 36.", +"The database major version is MySQL 8.0 and the minor version is 37.", +"The database major version is MySQL 8.0 and the minor version is 38.", +"The database major version is MySQL 8.0 and the minor version is 39.", +"The database major version is MySQL 8.0 and the minor version is 40.", +"The database version is SQL Server 2019 Standard.", +"The database version is SQL Server 2019 Enterprise.", +"The database version is SQL Server 2019 Express.", +"The database version is SQL Server 2019 Web.", +"The database version is SQL Server 2022 Standard.", +"The database version is SQL Server 2022 Enterprise.", +"The database version is SQL Server 2022 Express.", +"The database version is SQL Server 2022 Web." +], +"type": "string" +}, +"diskEncryptionConfiguration": { +"$ref": "DiskEncryptionConfiguration", +"description": "Disk encryption configuration specific to an instance." +}, +"diskEncryptionStatus": { +"$ref": "DiskEncryptionStatus", +"description": "Disk encryption status specific to an instance." +}, +"dnsName": { +"description": "Output only. The dns name of the instance.", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "This field is deprecated and will be removed from a future version of the API. Use the `settings.settingsVersion` field instead.", +"type": "string" +}, +"failoverReplica": { +"description": "The name and status of the failover replica.", +"properties": { +"available": { +"description": "The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only failover to the failover replica when the status is true.", +"type": "boolean" +}, +"name": { +"description": "The name of the failover replica. If specified at instance creation, a failover replica is created for the instance. The name doesn't include the project ID.", +"type": "string" +} +}, +"type": "object" +}, +"gceZone": { +"description": "The Compute Engine zone that the instance is currently serving from. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary zone. WARNING: Changing this might restart the instance.", +"type": "string" +}, +"geminiConfig": { +"$ref": "GeminiInstanceConfig", +"description": "Gemini instance configuration." +}, +"instanceType": { +"description": "The instance type.", +"enum": [ +"SQL_INSTANCE_TYPE_UNSPECIFIED", +"CLOUD_SQL_INSTANCE", +"ON_PREMISES_INSTANCE", +"READ_REPLICA_INSTANCE" +], +"enumDescriptions": [ +"This is an unknown Cloud SQL instance type.", +"A regular Cloud SQL instance that is not replicating from a primary instance.", +"An instance running on the customer's premises that is not managed by Cloud SQL.", +"A Cloud SQL instance acting as a read-replica." +], +"type": "string" +}, +"ipAddresses": { +"description": "The assigned IP addresses for the instance.", +"items": { +"$ref": "IpMapping" +}, +"type": "array" +}, +"ipv6Address": { +"deprecated": true, +"description": "The IPv6 address assigned to the instance. (Deprecated) This property was applicable only to First Generation instances.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#instance`.", +"type": "string" +}, +"maintenanceVersion": { +"description": "The current software version on the instance.", +"type": "string" +}, +"masterInstanceName": { +"description": "The name of the instance which will act as primary in the replication setup.", +"type": "string" +}, +"maxDiskSize": { +"deprecated": true, +"description": "The maximum disk size of the instance in bytes.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Name of the Cloud SQL instance. This does not include the project ID.", +"type": "string" +}, +"onPremisesConfiguration": { +"$ref": "OnPremisesConfiguration", +"description": "Configuration specific to on-premises instances." +}, +"outOfDiskReport": { +"$ref": "SqlOutOfDiskReport", +"description": "This field represents the report generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job" +}, +"primaryDnsName": { +"deprecated": true, +"description": "Output only. DEPRECATED: please use write_endpoint instead.", +"readOnly": true, +"type": "string" +}, +"project": { +"description": "The project ID of the project containing the Cloud SQL instance. The Google apps domain is prefixed if applicable.", +"type": "string" +}, +"pscServiceAttachmentLink": { +"description": "Output only. The link to service attachment of PSC instance.", +"readOnly": true, +"type": "string" +}, +"region": { +"description": "The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.", +"type": "string" +}, +"replicaConfiguration": { +"$ref": "ReplicaConfiguration", +"description": "Configuration specific to failover replicas and read replicas." +}, +"replicaNames": { +"description": "The replicas of the instance.", +"items": { +"type": "string" +}, +"type": "array" +}, +"replicationCluster": { +"$ref": "ReplicationCluster", +"description": "The pair of a primary instance and disaster recovery (DR) replica. A DR replica is a cross-region replica that you designate for failover in the event that the primary instance has regional failure." +}, +"rootPassword": { +"description": "Initial root password. Use only on creation. You must set root passwords before you can connect to PostgreSQL instances.", +"type": "string" +}, +"satisfiesPzs": { +"description": "The status indicating if instance satisfiesPzs. Reserved for future use.", +"type": "boolean" +}, +"scheduledMaintenance": { +"$ref": "SqlScheduledMaintenance", +"description": "The start time of any upcoming scheduled maintenance for this instance." +}, +"secondaryGceZone": { +"description": "The Compute Engine zone that the failover instance is currently serving from for a regional instance. This value could be different from the zone that was specified when the instance was created if the instance has failed over to its secondary/failover zone.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"serverCaCert": { +"$ref": "SslCert", +"description": "SSL configuration." +}, +"serviceAccountEmailAddress": { +"description": "The service account email address assigned to the instance. \\This property is read-only.", +"type": "string" +}, +"settings": { +"$ref": "Settings", +"description": "The user settings." +}, +"sqlNetworkArchitecture": { +"description": "The SQL network architecture for the instance.", +"enum": [ +"SQL_NETWORK_ARCHITECTURE_UNSPECIFIED", +"NEW_NETWORK_ARCHITECTURE", +"OLD_NETWORK_ARCHITECTURE" +], +"enumDescriptions": [ +"", +"The instance uses the new network architecture.", +"The instance uses the old network architecture." +], +"type": "string" +}, +"state": { +"description": "The current serving state of the Cloud SQL instance.", +"enum": [ +"SQL_INSTANCE_STATE_UNSPECIFIED", +"RUNNABLE", +"SUSPENDED", +"PENDING_DELETE", +"PENDING_CREATE", +"MAINTENANCE", +"FAILED", +"ONLINE_MAINTENANCE" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +true +], +"enumDescriptions": [ +"The state of the instance is unknown.", +"The instance is running, or has been stopped by owner.", +"The instance is not available, for example due to problems with billing.", +"The instance is being deleted.", +"The instance is being created.", +"The instance is down for maintenance.", +"The creation of the instance failed or a fatal error occurred during maintenance.", +"Deprecated" +], +"type": "string" +}, +"suspensionReason": { +"description": "If the instance state is SUSPENDED, the reason for the suspension.", +"items": { +"enum": [ +"SQL_SUSPENSION_REASON_UNSPECIFIED", +"BILLING_ISSUE", +"LEGAL_ISSUE", +"OPERATIONAL_ISSUE", +"KMS_KEY_ISSUE" +], +"enumDescriptions": [ +"This is an unknown suspension reason.", +"The instance is suspended due to billing issues (for example:, GCP account issue)", +"The instance is suspended due to illegal content (for example:, child pornography, copyrighted material, etc.).", +"The instance is causing operational issues (for example:, causing the database to crash).", +"The KMS key used by the instance is either revoked or denied access to" +], +"type": "string" +}, +"type": "array" +}, +"writeEndpoint": { +"description": "Output only. The dns name of the primary instance in a replication group.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"DatabasesListResponse": { +"description": "Database list response.", +"id": "DatabasesListResponse", +"properties": { +"items": { +"description": "List of database resources in the instance.", +"items": { +"$ref": "Database" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#databasesList`.", +"type": "string" +} +}, +"type": "object" +}, +"DemoteContext": { +"description": "This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.", +"id": "DemoteContext", +"properties": { +"kind": { +"description": "This is always `sql#demoteContext`.", +"type": "string" +}, +"sourceRepresentativeInstanceName": { +"description": "Required. The name of the instance which acts as an on-premises primary instance in the replication setup.", +"type": "string" +} +}, +"type": "object" +}, +"DemoteMasterConfiguration": { +"description": "Read-replica configuration for connecting to the on-premises primary instance.", +"id": "DemoteMasterConfiguration", +"properties": { +"kind": { +"description": "This is always `sql#demoteMasterConfiguration`.", +"type": "string" +}, +"mysqlReplicaConfiguration": { +"$ref": "DemoteMasterMySqlReplicaConfiguration", +"description": "MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory." +} +}, +"type": "object" +}, +"DemoteMasterContext": { +"description": "Database instance demote primary instance context.", +"id": "DemoteMasterContext", +"properties": { +"kind": { +"description": "This is always `sql#demoteMasterContext`.", +"type": "string" +}, +"masterInstanceName": { +"description": "The name of the instance which will act as on-premises primary instance in the replication setup.", +"type": "string" +}, +"replicaConfiguration": { +"$ref": "DemoteMasterConfiguration", +"description": "Configuration specific to read-replicas replicating from the on-premises primary instance." +}, +"skipReplicationSetup": { +"description": "Flag to skip replication setup on the instance.", +"type": "boolean" +}, +"verifyGtidConsistency": { +"description": "Verify the GTID consistency for demote operation. Default value: `True`. Setting this flag to `false` enables you to bypass the GTID consistency check between on-premises primary instance and Cloud SQL instance during the demotion operation but also exposes you to the risk of future replication failures. Change the value only if you know the reason for the GTID divergence and are confident that doing so will not cause any replication issues.", +"type": "boolean" +} +}, +"type": "object" +}, +"DemoteMasterMySqlReplicaConfiguration": { +"description": "Read-replica configuration specific to MySQL databases.", +"id": "DemoteMasterMySqlReplicaConfiguration", +"properties": { +"caCertificate": { +"description": "PEM representation of the trusted CA's x509 certificate.", +"type": "string" +}, +"clientCertificate": { +"description": "PEM representation of the replica's x509 certificate.", +"type": "string" +}, +"clientKey": { +"description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate. The format of the replica's private key can be either PKCS #1 or PKCS #8.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#demoteMasterMysqlReplicaConfiguration`.", +"type": "string" +}, +"password": { +"description": "The password for the replication connection.", +"type": "string" +}, +"username": { +"description": "The username for the replication connection.", +"type": "string" +} +}, +"type": "object" +}, +"DenyMaintenancePeriod": { +"description": "Deny Maintenance Periods. This specifies a date range during when all CSA rollout will be denied.", +"id": "DenyMaintenancePeriod", +"properties": { +"endDate": { +"description": "\"deny maintenance period\" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01", +"type": "string" +}, +"startDate": { +"description": "\"deny maintenance period\" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01", +"type": "string" +}, +"time": { +"description": "Time in UTC when the \"deny maintenance period\" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00", +"type": "string" +} +}, +"type": "object" +}, +"DiskEncryptionConfiguration": { +"description": "Disk encryption configuration for an instance.", +"id": "DiskEncryptionConfiguration", +"properties": { +"kind": { +"description": "This is always `sql#diskEncryptionConfiguration`.", +"type": "string" +}, +"kmsKeyName": { +"description": "Resource name of KMS key for disk encryption", +"type": "string" +} +}, +"type": "object" +}, +"DiskEncryptionStatus": { +"description": "Disk encryption status for an instance.", +"id": "DiskEncryptionStatus", +"properties": { +"kind": { +"description": "This is always `sql#diskEncryptionStatus`.", +"type": "string" +}, +"kmsKeyVersionName": { +"description": "KMS key version used to encrypt the Cloud SQL instance resource", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ExportContext": { +"description": "Database instance export context.", +"id": "ExportContext", +"properties": { +"bakExportOptions": { +"description": "Options for exporting BAK files (SQL Server-only)", +"properties": { +"bakType": { +"description": "Type of this bak file will be export, FULL or DIFF, SQL Server only", +"enum": [ +"BAK_TYPE_UNSPECIFIED", +"FULL", +"DIFF", +"TLOG" +], +"enumDescriptions": [ +"Default type.", +"Full backup.", +"Differential backup.", +"SQL Server Transaction Log" +], +"type": "string" +}, +"copyOnly": { +"deprecated": true, +"description": "Deprecated: copy_only is deprecated. Use differential_base instead", +"type": "boolean" +}, +"differentialBase": { +"description": "Whether or not the backup can be used as a differential base copy_only backup can not be served as differential base", +"type": "boolean" +}, +"stripeCount": { +"description": "Option for specifying how many stripes to use for the export. If blank, and the value of the striped field is true, the number of stripes is automatically chosen.", +"format": "int32", +"type": "integer" +}, +"striped": { +"description": "Whether or not the export should be striped.", +"type": "boolean" +} +}, +"type": "object" +}, +"csvExportOptions": { +"description": "Options for exporting data as CSV. `MySQL` and `PostgreSQL` instances only.", +"properties": { +"escapeCharacter": { +"description": "Specifies the character that should appear before a data character that needs to be escaped.", +"type": "string" +}, +"fieldsTerminatedBy": { +"description": "Specifies the character that separates columns within each row (line) of the file.", +"type": "string" +}, +"linesTerminatedBy": { +"description": "This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.", +"type": "string" +}, +"quoteCharacter": { +"description": "Specifies the quoting character to be used when a data value is quoted.", +"type": "string" +}, +"selectQuery": { +"description": "The select query used to extract the data.", +"type": "string" +} +}, +"type": "object" +}, +"databases": { +"description": "Databases to be exported. `MySQL instances:` If `fileType` is `SQL` and no database is specified, all databases are exported, except for the `mysql` system database. If `fileType` is `CSV`, you can specify one database, either by using this property or by using the `csvExportOptions.selectQuery` property, which takes precedence over this property. `PostgreSQL instances:` You must specify one database to be exported. If `fileType` is `CSV`, this database must match the one specified in the `csvExportOptions.selectQuery` property. `SQL Server instances:` You must specify one database to be exported, and the `fileType` must be `BAK`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"fileType": { +"description": "The file type for the specified uri.", +"enum": [ +"SQL_FILE_TYPE_UNSPECIFIED", +"SQL", +"CSV", +"BAK" +], +"enumDescriptions": [ +"Unknown file type.", +"File containing SQL statements.", +"File in CSV format.", +"" +], +"type": "string" +}, +"kind": { +"description": "This is always `sql#exportContext`.", +"type": "string" +}, +"offload": { +"description": "Option for export offload.", +"type": "boolean" +}, +"sqlExportOptions": { +"description": "Options for exporting data as SQL statements.", +"properties": { +"mysqlExportOptions": { +"description": "Options for exporting from MySQL.", +"properties": { +"masterData": { +"description": "Option to include SQL statement required to set up replication. If set to `1`, the dump file includes a CHANGE MASTER TO statement with the binary log coordinates, and --set-gtid-purged is set to ON. If set to `2`, the CHANGE MASTER TO statement is written as a SQL comment and has no effect. If set to any value other than `1`, --set-gtid-purged is set to OFF.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"parallel": { +"description": "Optional. Whether or not the export should be parallel.", +"type": "boolean" +}, +"schemaOnly": { +"description": "Export only schemas.", +"type": "boolean" +}, +"tables": { +"description": "Tables to export, or that were exported, from the specified database. If you specify tables, specify one and only one database. For PostgreSQL instances, you can specify only one table.", +"items": { +"type": "string" +}, +"type": "array" +}, +"threads": { +"description": "Optional. The number of threads to use for parallel export.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"uri": { +"description": "The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.", +"type": "string" +} +}, +"type": "object" +}, +"FailoverContext": { +"description": "Database instance failover context.", +"id": "FailoverContext", +"properties": { +"kind": { +"description": "This is always `sql#failoverContext`.", +"type": "string" +}, +"settingsVersion": { +"description": "The current settings version of this instance. Request will be rejected if this version doesn't match the current settings version.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Flag": { +"description": "A flag resource.", +"id": "Flag", +"properties": { +"allowedIntValues": { +"description": "Use this field if only certain integers are accepted. Can be combined with min_value and max_value to add additional values.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"allowedStringValues": { +"description": "For `STRING` flags, a list of strings that the value can be set to.", +"items": { +"type": "string" +}, +"type": "array" +}, +"appliesTo": { +"description": "The database version this flag applies to. Can be MySQL instances: `MYSQL_8_0`, `MYSQL_8_0_18`, `MYSQL_8_0_26`, `MYSQL_5_7`, or `MYSQL_5_6`. PostgreSQL instances: `POSTGRES_9_6`, `POSTGRES_10`, `POSTGRES_11` or `POSTGRES_12`. SQL Server instances: `SQLSERVER_2017_STANDARD`, `SQLSERVER_2017_ENTERPRISE`, `SQLSERVER_2017_EXPRESS`, `SQLSERVER_2017_WEB`, `SQLSERVER_2019_STANDARD`, `SQLSERVER_2019_ENTERPRISE`, `SQLSERVER_2019_EXPRESS`, or `SQLSERVER_2019_WEB`. See [the complete list](/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion).", +"items": { +"enum": [ +"SQL_DATABASE_VERSION_UNSPECIFIED", +"MYSQL_5_1", +"MYSQL_5_5", +"MYSQL_5_6", +"MYSQL_5_7", +"SQLSERVER_2017_STANDARD", +"SQLSERVER_2017_ENTERPRISE", +"SQLSERVER_2017_EXPRESS", +"SQLSERVER_2017_WEB", +"POSTGRES_9_6", +"POSTGRES_10", +"POSTGRES_11", +"POSTGRES_12", +"POSTGRES_13", +"POSTGRES_14", +"POSTGRES_15", +"MYSQL_8_0", +"MYSQL_8_0_18", +"MYSQL_8_0_26", +"MYSQL_8_0_27", +"MYSQL_8_0_28", +"MYSQL_8_0_29", +"MYSQL_8_0_30", +"MYSQL_8_0_31", +"MYSQL_8_0_32", +"MYSQL_8_0_33", +"MYSQL_8_0_34", +"MYSQL_8_0_35", +"MYSQL_8_0_36", +"MYSQL_8_0_37", +"MYSQL_8_0_38", +"MYSQL_8_0_39", +"MYSQL_8_0_40", +"SQLSERVER_2019_STANDARD", +"SQLSERVER_2019_ENTERPRISE", +"SQLSERVER_2019_EXPRESS", +"SQLSERVER_2019_WEB", +"SQLSERVER_2022_STANDARD", +"SQLSERVER_2022_ENTERPRISE", +"SQLSERVER_2022_EXPRESS", +"SQLSERVER_2022_WEB" +], +"enumDeprecated": [ +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"This is an unknown database version.", +"The database version is MySQL 5.1.", +"The database version is MySQL 5.5.", +"The database version is MySQL 5.6.", +"The database version is MySQL 5.7.", +"The database version is SQL Server 2017 Standard.", +"The database version is SQL Server 2017 Enterprise.", +"The database version is SQL Server 2017 Express.", +"The database version is SQL Server 2017 Web.", +"The database version is PostgreSQL 9.6.", +"The database version is PostgreSQL 10.", +"The database version is PostgreSQL 11.", +"The database version is PostgreSQL 12.", +"The database version is PostgreSQL 13.", +"The database version is PostgreSQL 14.", +"The database version is PostgreSQL 15.", +"The database version is MySQL 8.", +"The database major version is MySQL 8.0 and the minor version is 18.", +"The database major version is MySQL 8.0 and the minor version is 26.", +"The database major version is MySQL 8.0 and the minor version is 27.", +"The database major version is MySQL 8.0 and the minor version is 28.", +"The database major version is MySQL 8.0 and the minor version is 29.", +"The database major version is MySQL 8.0 and the minor version is 30.", +"The database major version is MySQL 8.0 and the minor version is 31.", +"The database major version is MySQL 8.0 and the minor version is 32.", +"The database major version is MySQL 8.0 and the minor version is 33.", +"The database major version is MySQL 8.0 and the minor version is 34.", +"The database major version is MySQL 8.0 and the minor version is 35.", +"The database major version is MySQL 8.0 and the minor version is 36.", +"The database major version is MySQL 8.0 and the minor version is 37.", +"The database major version is MySQL 8.0 and the minor version is 38.", +"The database major version is MySQL 8.0 and the minor version is 39.", +"The database major version is MySQL 8.0 and the minor version is 40.", +"The database version is SQL Server 2019 Standard.", +"The database version is SQL Server 2019 Enterprise.", +"The database version is SQL Server 2019 Express.", +"The database version is SQL Server 2019 Web.", +"The database version is SQL Server 2022 Standard.", +"The database version is SQL Server 2022 Enterprise.", +"The database version is SQL Server 2022 Express.", +"The database version is SQL Server 2022 Web." +], +"type": "string" +}, +"type": "array" +}, +"inBeta": { +"description": "Whether or not the flag is considered in beta.", +"type": "boolean" +}, +"kind": { +"description": "This is always `sql#flag`.", +"type": "string" +}, +"maxValue": { +"description": "For `INTEGER` flags, the maximum allowed value.", +"format": "int64", +"type": "string" +}, +"minValue": { +"description": "For `INTEGER` flags, the minimum allowed value.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "This is the name of the flag. Flag names always use underscores, not hyphens, for example: `max_allowed_packet`", +"type": "string" +}, +"requiresRestart": { +"description": "Indicates whether changing this flag will trigger a database restart. Only applicable to Second Generation instances.", +"type": "boolean" +}, +"type": { +"description": "The type of the flag. Flags are typed to being `BOOLEAN`, `STRING`, `INTEGER` or `NONE`. `NONE` is used for flags which do not take a value, such as `skip_grant_tables`.", +"enum": [ +"SQL_FLAG_TYPE_UNSPECIFIED", +"BOOLEAN", +"STRING", +"INTEGER", +"NONE", +"MYSQL_TIMEZONE_OFFSET", +"FLOAT", +"REPEATED_STRING" +], +"enumDescriptions": [ +"This is an unknown flag type.", +"Boolean type flag.", +"String type flag.", +"Integer type flag.", +"Flag type used for a server startup option.", +"Type introduced specially for MySQL TimeZone offset. Accept a string value with the format [-12:59, 13:00].", +"Float type flag.", +"Comma-separated list of the strings in a SqlFlagType enum." +], +"type": "string" +} +}, +"type": "object" +}, +"FlagsListResponse": { +"description": "Flags list response.", +"id": "FlagsListResponse", +"properties": { +"items": { +"description": "List of flags.", +"items": { +"$ref": "Flag" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#flagsList`.", +"type": "string" +} +}, +"type": "object" +}, +"GeminiInstanceConfig": { +"description": "Gemini configuration.", +"id": "GeminiInstanceConfig", +"properties": { +"activeQueryEnabled": { +"description": "Output only. Whether active query is enabled.", +"readOnly": true, +"type": "boolean" +}, +"entitled": { +"description": "Output only. Whether Gemini is enabled.", +"readOnly": true, +"type": "boolean" +}, +"flagRecommenderEnabled": { +"description": "Output only. Whether flag recommender is enabled.", +"readOnly": true, +"type": "boolean" +}, +"googleVacuumMgmtEnabled": { +"description": "Output only. Whether vacuum management is enabled.", +"readOnly": true, +"type": "boolean" +}, +"indexAdvisorEnabled": { +"description": "Output only. Whether index advisor is enabled.", +"readOnly": true, +"type": "boolean" +}, +"oomSessionCancelEnabled": { +"description": "Output only. Whether oom session cancel is enabled.", +"readOnly": true, +"type": "boolean" +} +}, +"type": "object" +}, +"GenerateEphemeralCertRequest": { +"description": "Ephemeral certificate creation request.", +"id": "GenerateEphemeralCertRequest", +"properties": { +"access_token": { +"description": "Optional. Access token to include in the signed certificate.", +"type": "string" +}, +"public_key": { +"description": "PEM encoded public key to include in the signed certificate.", +"type": "string" +}, +"readTime": { +"description": "Optional. Optional snapshot read timestamp to trade freshness for performance.", +"format": "google-datetime", +"type": "string" +}, +"validDuration": { +"description": "Optional. If set, it will contain the cert valid duration.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GenerateEphemeralCertResponse": { +"description": "Ephemeral certificate creation request.", +"id": "GenerateEphemeralCertResponse", +"properties": { +"ephemeralCert": { +"$ref": "SslCert", +"description": "Generated cert" +} +}, +"type": "object" +}, +"ImportContext": { +"description": "Database instance import context.", +"id": "ImportContext", +"properties": { +"bakImportOptions": { +"description": "Import parameters specific to SQL Server .BAK files", +"properties": { +"bakType": { +"description": "Type of the bak content, FULL or DIFF.", +"enum": [ +"BAK_TYPE_UNSPECIFIED", +"FULL", +"DIFF", +"TLOG" +], +"enumDescriptions": [ +"Default type.", +"Full backup.", +"Differential backup.", +"SQL Server Transaction Log" +], +"type": "string" +}, +"encryptionOptions": { +"properties": { +"certPath": { +"description": "Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", +"type": "string" +}, +"pvkPassword": { +"description": "Password that encrypts the private key", +"type": "string" +}, +"pvkPath": { +"description": "Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.", +"type": "string" +} +}, +"type": "object" +}, +"noRecovery": { +"description": "Whether or not the backup importing will restore database with NORECOVERY option Applies only to Cloud SQL for SQL Server.", +"type": "boolean" +}, +"recoveryOnly": { +"description": "Whether or not the backup importing request will just bring database online without downloading Bak content only one of \"no_recovery\" and \"recovery_only\" can be true otherwise error will return. Applies only to Cloud SQL for SQL Server.", +"type": "boolean" +}, +"stopAt": { +"description": "Optional. The timestamp when the import should stop. This timestamp is in the [RFC 3339](https://tools.ietf.org/html/rfc3339) format (for example, `2023-10-01T16:19:00.094`). This field is equivalent to the STOPAT keyword and applies to Cloud SQL for SQL Server only.", +"format": "google-datetime", +"type": "string" +}, +"stopAtMark": { +"description": "Optional. The marked transaction where the import should stop. This field is equivalent to the STOPATMARK keyword and applies to Cloud SQL for SQL Server only.", +"type": "string" +}, +"striped": { +"description": "Whether or not the backup set being restored is striped. Applies only to Cloud SQL for SQL Server.", +"type": "boolean" +} +}, +"type": "object" +}, +"csvImportOptions": { +"description": "Options for importing data as CSV.", +"properties": { +"columns": { +"description": "The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.", +"items": { +"type": "string" +}, +"type": "array" +}, +"escapeCharacter": { +"description": "Specifies the character that should appear before a data character that needs to be escaped.", +"type": "string" +}, +"fieldsTerminatedBy": { +"description": "Specifies the character that separates columns within each row (line) of the file.", +"type": "string" +}, +"linesTerminatedBy": { +"description": "This is used to separate lines. If a line does not contain all fields, the rest of the columns are set to their default values.", +"type": "string" +}, +"quoteCharacter": { +"description": "Specifies the quoting character to be used when a data value is quoted.", +"type": "string" +}, +"table": { +"description": "The table to which CSV data is imported.", +"type": "string" +} +}, +"type": "object" +}, +"database": { +"description": "The target database for the import. If `fileType` is `SQL`, this field is required only if the import file does not specify a database, and is overridden by any database specification in the import file. If `fileType` is `CSV`, one database must be specified.", +"type": "string" +}, +"fileType": { +"description": "The file type for the specified uri. * `SQL`: The file contains SQL statements. * `CSV`: The file contains CSV data. * `BAK`: The file contains backup data for a SQL Server instance.", +"enum": [ +"SQL_FILE_TYPE_UNSPECIFIED", +"SQL", +"CSV", +"BAK" +], +"enumDescriptions": [ +"Unknown file type.", +"File containing SQL statements.", +"File in CSV format.", +"" +], +"type": "string" +}, +"importUser": { +"description": "The PostgreSQL user for this import operation. PostgreSQL instances only.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#importContext`.", +"type": "string" +}, +"sqlImportOptions": { +"description": "Optional. Options for importing data from SQL statements.", +"properties": { +"parallel": { +"description": "Optional. Whether or not the import should be parallel.", +"type": "boolean" +}, +"threads": { +"description": "Optional. The number of threads to use for parallel import.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"uri": { +"description": "Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.", +"type": "string" +} +}, +"type": "object" +}, +"InsightsConfig": { +"description": "Insights configuration. This specifies when Cloud SQL Insights feature is enabled and optional configuration.", +"id": "InsightsConfig", +"properties": { +"queryInsightsEnabled": { +"description": "Whether Query Insights feature is enabled.", +"type": "boolean" +}, +"queryPlansPerMinute": { +"description": "Number of query execution plans captured by Insights per minute for all queries combined. Default is 5.", +"format": "int32", +"type": "integer" +}, +"queryStringLength": { +"description": "Maximum query length stored in bytes. Default value: 1024 bytes. Range: 256-4500 bytes. Query length more than this field value will be truncated to this value. When unset, query length will be the default value. Changing query length will restart the database.", +"format": "int32", +"type": "integer" +}, +"recordApplicationTags": { +"description": "Whether Query Insights will record application tags from query when enabled.", +"type": "boolean" +}, +"recordClientAddress": { +"description": "Whether Query Insights will record client address when enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"InstanceReference": { +"description": "Reference to another Cloud SQL instance.", +"id": "InstanceReference", +"properties": { +"name": { +"description": "The name of the Cloud SQL instance being referenced. This does not include the project ID.", +"type": "string" +}, +"project": { +"description": "The project ID of the Cloud SQL instance being referenced. The default is the same project ID as the instance references it.", +"type": "string" +}, +"region": { +"description": "The region of the Cloud SQL instance being referenced.", +"type": "string" +} +}, +"type": "object" +}, +"InstancesAcquireSsrsLeaseRequest": { +"description": "Request to acquire an SSRS lease for an instance.", +"id": "InstancesAcquireSsrsLeaseRequest", +"properties": { +"acquireSsrsLeaseContext": { +"$ref": "AcquireSsrsLeaseContext", +"description": "Contains details about the acquire SSRS lease operation." +} +}, +"type": "object" +}, +"InstancesCloneRequest": { +"description": "Database instance clone request.", +"id": "InstancesCloneRequest", +"properties": { +"cloneContext": { +"$ref": "CloneContext", +"description": "Contains details about the clone operation." +} +}, +"type": "object" +}, +"InstancesDemoteMasterRequest": { +"description": "Database demote primary instance request.", +"id": "InstancesDemoteMasterRequest", +"properties": { +"demoteMasterContext": { +"$ref": "DemoteMasterContext", +"description": "Contains details about the demoteMaster operation." +} +}, +"type": "object" +}, +"InstancesDemoteRequest": { +"description": "This request is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server.", +"id": "InstancesDemoteRequest", +"properties": { +"demoteContext": { +"$ref": "DemoteContext", +"description": "Required. This context is used to demote an existing standalone instance to be a Cloud SQL read replica for an external database server." +} +}, +"type": "object" +}, +"InstancesExportRequest": { +"description": "Database instance export request.", +"id": "InstancesExportRequest", +"properties": { +"exportContext": { +"$ref": "ExportContext", +"description": "Contains details about the export operation." +} +}, +"type": "object" +}, +"InstancesFailoverRequest": { +"description": "Instance failover request.", +"id": "InstancesFailoverRequest", +"properties": { +"failoverContext": { +"$ref": "FailoverContext", +"description": "Failover Context." +} +}, +"type": "object" +}, +"InstancesImportRequest": { +"description": "Database instance import request.", +"id": "InstancesImportRequest", +"properties": { +"importContext": { +"$ref": "ImportContext", +"description": "Contains details about the import operation." +} +}, +"type": "object" +}, +"InstancesListResponse": { +"description": "Database instances list response.", +"id": "InstancesListResponse", +"properties": { +"items": { +"description": "List of database instance resources.", +"items": { +"$ref": "DatabaseInstance" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#instancesList`.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +}, +"warnings": { +"description": "List of warnings that occurred while handling the request.", +"items": { +"$ref": "ApiWarning" +}, +"type": "array" +} +}, +"type": "object" +}, +"InstancesListServerCasResponse": { +"description": "Instances ListServerCas response.", +"id": "InstancesListServerCasResponse", +"properties": { +"activeVersion": { +"type": "string" +}, +"certs": { +"description": "List of server CA certificates for the instance.", +"items": { +"$ref": "SslCert" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#instancesListServerCas`.", +"type": "string" +} +}, +"type": "object" +}, +"InstancesReencryptRequest": { +"description": "Database Instance reencrypt request.", +"id": "InstancesReencryptRequest", +"properties": { +"backupReencryptionConfig": { +"$ref": "BackupReencryptionConfig", +"description": "Configuration specific to backup re-encryption" +} +}, +"type": "object" +}, +"InstancesRestoreBackupRequest": { +"description": "Database instance restore backup request.", +"id": "InstancesRestoreBackupRequest", +"properties": { +"restoreBackupContext": { +"$ref": "RestoreBackupContext", +"description": "Parameters required to perform the restore backup operation." +} +}, +"type": "object" +}, +"InstancesRotateServerCaRequest": { +"description": "Rotate Server CA request.", +"id": "InstancesRotateServerCaRequest", +"properties": { +"rotateServerCaContext": { +"$ref": "RotateServerCaContext", +"description": "Contains details about the rotate server CA operation." +} +}, +"type": "object" +}, +"InstancesTruncateLogRequest": { +"description": "Instance truncate log request.", +"id": "InstancesTruncateLogRequest", +"properties": { +"truncateLogContext": { +"$ref": "TruncateLogContext", +"description": "Contains details about the truncate log operation." +} +}, +"type": "object" +}, +"IpConfiguration": { +"description": "IP Management configuration.", +"id": "IpConfiguration", +"properties": { +"allocatedIpRange": { +"description": "The name of the allocated ip range for the private ip Cloud SQL instance. For example: \"google-managed-services-default\". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?.`", +"type": "string" +}, +"authorizedNetworks": { +"description": "The list of external networks that are allowed to connect to the instance using the IP. In 'CIDR' notation, also known as 'slash' notation (for example: `157.197.200.0/24`).", +"items": { +"$ref": "AclEntry" +}, +"type": "array" +}, +"enablePrivatePathForGoogleCloudServices": { +"description": "Controls connectivity to private IP instances from Google services, such as BigQuery.", +"type": "boolean" +}, +"ipv4Enabled": { +"description": "Whether the instance is assigned a public IP address or not.", +"type": "boolean" +}, +"privateNetwork": { +"description": "The resource link for the VPC network from which the Cloud SQL instance is accessible for private IP. For example, `/projects/myProject/global/networks/default`. This setting can be updated, but it cannot be removed after it is set.", +"type": "string" +}, +"pscConfig": { +"$ref": "PscConfig", +"description": "PSC settings for this instance." +}, +"requireSsl": { +"description": "Use `ssl_mode` instead. Whether SSL/TLS connections over IP are enforced. If set to false, then allow both non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. If set to true, then only allow connections encrypted with SSL/TLS and with valid client certificates. If you want to enforce SSL/TLS without enforcing the requirement for valid client certificates, then use the `ssl_mode` flag instead of the legacy `require_ssl` flag.", +"type": "boolean" +}, +"sslMode": { +"description": "Specify how SSL/TLS is enforced in database connections. If you must use the `require_ssl` flag for backward compatibility, then only the following value pairs are valid: For PostgreSQL and MySQL: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false` * `ssl_mode=TRUSTED_CLIENT_CERTIFICATE_REQUIRED` and `require_ssl=true` For SQL Server: * `ssl_mode=ALLOW_UNENCRYPTED_AND_ENCRYPTED` and `require_ssl=false` * `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=true` The value of `ssl_mode` gets priority over the value of `require_ssl`. For example, for the pair `ssl_mode=ENCRYPTED_ONLY` and `require_ssl=false`, the `ssl_mode=ENCRYPTED_ONLY` means only accept SSL connections, while the `require_ssl=false` means accept both non-SSL and SSL connections. MySQL and PostgreSQL databases respect `ssl_mode` in this case and accept only SSL connections.", +"enum": [ +"SSL_MODE_UNSPECIFIED", +"ALLOW_UNENCRYPTED_AND_ENCRYPTED", +"ENCRYPTED_ONLY", +"TRUSTED_CLIENT_CERTIFICATE_REQUIRED" +], +"enumDescriptions": [ +"The SSL mode is unknown.", +"Allow non-SSL/non-TLS and SSL/TLS connections. For SSL/TLS connections, the client certificate won't be verified. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid the conflict between values of two flags.", +"Only allow connections encrypted with SSL/TLS. When this value is used, the legacy `require_ssl` flag must be false or cleared to avoid the conflict between values of two flags.", +"Only allow connections encrypted with SSL/TLS and with valid client certificates. When this value is used, the legacy `require_ssl` flag must be true or cleared to avoid the conflict between values of two flags. PostgreSQL clients or users that connect using IAM database authentication must use either the [Cloud SQL Auth Proxy](https://cloud.google.com/sql/docs/postgres/connect-auth-proxy) or [Cloud SQL Connectors](https://cloud.google.com/sql/docs/postgres/connect-connectors) to enforce client identity verification. This value is not applicable to SQL Server." +], +"type": "string" +} +}, +"type": "object" +}, +"IpMapping": { +"description": "Database instance IP mapping", +"id": "IpMapping", +"properties": { +"ipAddress": { +"description": "The IP address assigned.", +"type": "string" +}, +"timeToRetire": { +"description": "The due time for this IP to be retired in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`. This field is only available when the IP is scheduled to be retired.", +"format": "google-datetime", +"type": "string" +}, +"type": { +"description": "The type of this IP address. A `PRIMARY` address is a public address that can accept incoming connections. A `PRIVATE` address is a private address that can accept incoming connections. An `OUTGOING` address is the source address of connections originating from the instance, if supported.", +"enum": [ +"SQL_IP_ADDRESS_TYPE_UNSPECIFIED", +"PRIMARY", +"OUTGOING", +"PRIVATE", +"MIGRATED_1ST_GEN" +], +"enumDescriptions": [ +"This is an unknown IP address type.", +"IP address the customer is supposed to connect to. Usually this is the load balancer's IP address", +"Source IP address of the connection a read replica establishes to its external primary instance. This IP address can be allowlisted by the customer in case it has a firewall that filters incoming connection to its on premises primary instance.", +"Private IP used when using private IPs and network peering.", +"V1 IP of a migrated instance. We want the user to decommission this IP as soon as the migration is complete. Note: V1 instances with V1 ip addresses will be counted as PRIMARY." +], +"type": "string" +} +}, +"type": "object" +}, +"LocationPreference": { +"description": "Preferred location. This specifies where a Cloud SQL instance is located. Note that if the preferred location is not available, the instance will be located as close as possible within the region. Only one location may be specified.", +"id": "LocationPreference", +"properties": { +"followGaeApplication": { +"deprecated": true, +"description": "The App Engine application to follow, it must be in the same region as the Cloud SQL instance. WARNING: Changing this might restart the instance.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#locationPreference`.", +"type": "string" +}, +"secondaryZone": { +"description": "The preferred Compute Engine zone for the secondary/failover (for example: us-central1-a, us-central1-b, etc.). To disable this field, set it to 'no_secondary_zone'.", +"type": "string" +}, +"zone": { +"description": "The preferred Compute Engine zone (for example: us-central1-a, us-central1-b, etc.). WARNING: Changing this might restart the instance.", +"type": "string" +} +}, +"type": "object" +}, +"MaintenanceWindow": { +"description": "Maintenance window. This specifies when a Cloud SQL instance is restarted for system maintenance purposes.", +"id": "MaintenanceWindow", +"properties": { +"day": { +"description": "day of week (1-7), starting on Monday.", +"format": "int32", +"type": "integer" +}, +"hour": { +"description": "hour of day - 0 to 23.", +"format": "int32", +"type": "integer" +}, +"kind": { +"description": "This is always `sql#maintenanceWindow`.", +"type": "string" +}, +"updateTrack": { +"description": "Maintenance timing setting: `canary` (Earlier) or `stable` (Later). [Learn more](https://cloud.google.com/sql/docs/mysql/instance-settings#maintenance-timing-2ndgen).", +"enum": [ +"SQL_UPDATE_TRACK_UNSPECIFIED", +"canary", +"stable", +"week5" +], +"enumDescriptions": [ +"This is an unknown maintenance timing preference.", +"For instance update that requires a restart, this update track indicates your instance prefer to restart for new version early in maintenance window.", +"For instance update that requires a restart, this update track indicates your instance prefer to let Cloud SQL choose the timing of restart (within its Maintenance window, if applicable).", +"For instance update that requires a restart, this update track indicates your instance prefer to let Cloud SQL choose the timing of restart (within its Maintenance window, if applicable) to be at least 5 weeks after the notification." +], +"type": "string" +} +}, +"type": "object" +}, +"MySqlReplicaConfiguration": { +"description": "Read-replica configuration specific to MySQL databases.", +"id": "MySqlReplicaConfiguration", +"properties": { +"caCertificate": { +"description": "PEM representation of the trusted CA's x509 certificate.", +"type": "string" +}, +"clientCertificate": { +"description": "PEM representation of the replica's x509 certificate.", +"type": "string" +}, +"clientKey": { +"description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.", +"type": "string" +}, +"connectRetryInterval": { +"description": "Seconds to wait between connect retries. MySQL's default is 60 seconds.", +"format": "int32", +"type": "integer" +}, +"dumpFilePath": { +"description": "Path to a SQL dump file in Google Cloud Storage from which the replica instance is to be created. The URI is in the form gs://bucketName/fileName. Compressed gzip files (.gz) are also supported. Dumps have the binlog co-ordinates from which replication begins. This can be accomplished by setting --master-data to 1 when using mysqldump.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#mysqlReplicaConfiguration`.", +"type": "string" +}, +"masterHeartbeatPeriod": { +"description": "Interval in milliseconds between replication heartbeats.", +"format": "int64", +"type": "string" +}, +"password": { +"description": "The password for the replication connection.", +"type": "string" +}, +"sslCipher": { +"description": "A list of permissible ciphers to use for SSL encryption.", +"type": "string" +}, +"username": { +"description": "The username for the replication connection.", +"type": "string" +}, +"verifyServerCertificate": { +"description": "Whether or not to check the primary instance's Common Name value in the certificate that it sends during the SSL handshake.", +"type": "boolean" +} +}, +"type": "object" +}, +"MySqlSyncConfig": { +"description": "MySQL-specific external server sync settings.", +"id": "MySqlSyncConfig", +"properties": { +"initialSyncFlags": { +"description": "Flags to use for the initial dump.", +"items": { +"$ref": "SyncFlags" +}, +"type": "array" +} +}, +"type": "object" +}, +"OnPremisesConfiguration": { +"description": "On-premises instance configuration.", +"id": "OnPremisesConfiguration", +"properties": { +"caCertificate": { +"description": "PEM representation of the trusted CA's x509 certificate.", +"type": "string" +}, +"clientCertificate": { +"description": "PEM representation of the replica's x509 certificate.", +"type": "string" +}, +"clientKey": { +"description": "PEM representation of the replica's private key. The corresponsing public key is encoded in the client's certificate.", +"type": "string" +}, +"dumpFilePath": { +"description": "The dump file to create the Cloud SQL replica.", +"type": "string" +}, +"hostPort": { +"description": "The host and port of the on-premises instance in host:port format", +"type": "string" +}, +"kind": { +"description": "This is always `sql#onPremisesConfiguration`.", +"type": "string" +}, +"password": { +"description": "The password for connecting to on-premises instance.", +"type": "string" +}, +"sourceInstance": { +"$ref": "InstanceReference", +"description": "The reference to Cloud SQL instance if the source is Cloud SQL." +}, +"username": { +"description": "The username for connecting to on-premises instance.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "An Operation resource. For successful operations that return an Operation resource, only the fields relevant to the operation are populated in the resource.", +"id": "Operation", +"properties": { +"acquireSsrsLeaseContext": { +"$ref": "AcquireSsrsLeaseContext", +"description": "The context for acquire SSRS lease operation, if applicable." +}, +"apiWarning": { +"$ref": "ApiWarning", +"description": "An Admin API warning message." +}, +"backupContext": { +"$ref": "BackupContext", +"description": "The context for backup operation, if applicable." +}, +"endTime": { +"description": "The time this operation finished in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "OperationErrors", +"description": "If errors occurred during processing of this operation, this field will be populated." +}, +"exportContext": { +"$ref": "ExportContext", +"description": "The context for export operation, if applicable." +}, +"importContext": { +"$ref": "ImportContext", +"description": "The context for import operation, if applicable." +}, +"insertTime": { +"description": "The time this operation was enqueued in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"kind": { +"description": "This is always `sql#operation`.", +"type": "string" +}, +"name": { +"description": "An identifier that uniquely identifies the operation. You can use this identifier to retrieve the Operations resource that has information about the operation.", +"type": "string" +}, +"operationType": { +"description": "The type of the operation. Valid values are: * `CREATE` * `DELETE` * `UPDATE` * `RESTART` * `IMPORT` * `EXPORT` * `BACKUP_VOLUME` * `RESTORE_VOLUME` * `CREATE_USER` * `DELETE_USER` * `CREATE_DATABASE` * `DELETE_DATABASE`", +"enum": [ +"SQL_OPERATION_TYPE_UNSPECIFIED", +"IMPORT", +"EXPORT", +"CREATE", +"UPDATE", +"DELETE", +"RESTART", +"BACKUP", +"SNAPSHOT", +"BACKUP_VOLUME", +"DELETE_VOLUME", +"RESTORE_VOLUME", +"INJECT_USER", +"CLONE", +"STOP_REPLICA", +"START_REPLICA", +"PROMOTE_REPLICA", +"CREATE_REPLICA", +"CREATE_USER", +"DELETE_USER", +"UPDATE_USER", +"CREATE_DATABASE", +"DELETE_DATABASE", +"UPDATE_DATABASE", +"FAILOVER", +"DELETE_BACKUP", +"RECREATE_REPLICA", +"TRUNCATE_LOG", +"DEMOTE_MASTER", +"MAINTENANCE", +"ENABLE_PRIVATE_IP", +"DEFER_MAINTENANCE", +"CREATE_CLONE", +"RESCHEDULE_MAINTENANCE", +"START_EXTERNAL_SYNC", +"LOG_CLEANUP", +"AUTO_RESTART", +"REENCRYPT", +"SWITCHOVER", +"ACQUIRE_SSRS_LEASE", +"RELEASE_SSRS_LEASE", +"RECONFIGURE_OLD_PRIMARY" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +true, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Unknown operation type.", +"Imports data into a Cloud SQL instance.", +"Exports data from a Cloud SQL instance to a Cloud Storage bucket.", +"Creates a new Cloud SQL instance.", +"Updates the settings of a Cloud SQL instance.", +"Deletes a Cloud SQL instance.", +"Restarts the Cloud SQL instance.", +"", +"", +"Performs instance backup.", +"Deletes an instance backup.", +"Restores an instance backup.", +"Injects a privileged user in mysql for MOB instances.", +"Clones a Cloud SQL instance.", +"Stops replication on a Cloud SQL read replica instance.", +"Starts replication on a Cloud SQL read replica instance.", +"Promotes a Cloud SQL replica instance.", +"Creates a Cloud SQL replica instance.", +"Creates a new user in a Cloud SQL instance.", +"Deletes a user from a Cloud SQL instance.", +"Updates an existing user in a Cloud SQL instance.", +"Creates a database in the Cloud SQL instance.", +"Deletes a database in the Cloud SQL instance.", +"Updates a database in the Cloud SQL instance.", +"Performs failover of an HA-enabled Cloud SQL failover replica.", +"Deletes the backup taken by a backup run.", +"", +"Truncates a general or slow log table in MySQL.", +"Demotes the stand-alone instance to be a Cloud SQL read replica for an external database server.", +"Indicates that the instance is currently in maintenance. Maintenance typically causes the instance to be unavailable for 1-3 minutes.", +"This field is deprecated, and will be removed in future version of API.", +"", +"Creates clone instance.", +"Reschedule maintenance to another time.", +"Starts external sync of a Cloud SQL EM replica to an external primary instance.", +"Recovers logs from an instance's old data disk.", +"Performs auto-restart of an HA-enabled Cloud SQL database for auto recovery.", +"Re-encrypts CMEK instances with latest key version.", +"Switches over to replica instance from primary.", +"Acquire a lease for the setup of SQL Server Reporting Services (SSRS).", +"Release a lease for the setup of SQL Server Reporting Services (SSRS).", +"Reconfigures old primary after a promote replica operation. Effect of a promote operation to the old primary is executed in this operation, asynchronously from the promote replica operation executed to the replica." +], +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"startTime": { +"description": "The time this operation actually started in UTC timezone in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"status": { +"description": "The status of an operation.", +"enum": [ +"SQL_OPERATION_STATUS_UNSPECIFIED", +"PENDING", +"RUNNING", +"DONE" +], +"enumDescriptions": [ +"The state of the operation is unknown.", +"The operation has been queued, but has not started yet.", +"The operation is running.", +"The operation completed." +], +"type": "string" +}, +"targetId": { +"description": "Name of the database instance related to this operation.", +"type": "string" +}, +"targetLink": { +"type": "string" +}, +"targetProject": { +"description": "The project ID of the target instance related to this operation.", +"type": "string" +}, +"user": { +"description": "The email address of the user who initiated this operation.", +"type": "string" +} +}, +"type": "object" +}, +"OperationError": { +"description": "Database instance operation error.", +"id": "OperationError", +"properties": { +"code": { +"description": "Identifies the specific error that occurred.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#operationError`.", +"type": "string" +}, +"message": { +"description": "Additional information about the error encountered.", +"type": "string" +} +}, +"type": "object" +}, +"OperationErrors": { +"description": "Database instance operation errors list wrapper.", +"id": "OperationErrors", +"properties": { +"errors": { +"description": "The list of errors encountered while processing this operation.", +"items": { +"$ref": "OperationError" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#operationErrors`.", +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"cancelRequested": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"statusDetail": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OperationsListResponse": { +"description": "Operations list response.", +"id": "OperationsListResponse", +"properties": { +"items": { +"description": "List of operation resources.", +"items": { +"$ref": "Operation" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#operationsList`.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"PasswordStatus": { +"description": "Read-only password status.", +"id": "PasswordStatus", +"properties": { +"locked": { +"description": "If true, user does not have login privileges.", +"type": "boolean" +}, +"passwordExpirationTime": { +"description": "The expiration time of the current password.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"PasswordValidationPolicy": { +"description": "Database instance local user password validation policy", +"id": "PasswordValidationPolicy", +"properties": { +"complexity": { +"description": "The complexity of the password.", +"enum": [ +"COMPLEXITY_UNSPECIFIED", +"COMPLEXITY_DEFAULT" +], +"enumDescriptions": [ +"Complexity check is not specified.", +"A combination of lowercase, uppercase, numeric, and non-alphanumeric characters." +], +"type": "string" +}, +"disallowCompromisedCredentials": { +"deprecated": true, +"description": "This field is deprecated and will be removed in a future version of the API.", +"type": "boolean" +}, +"disallowUsernameSubstring": { +"description": "Disallow username as a part of the password.", +"type": "boolean" +}, +"enablePasswordPolicy": { +"description": "Whether the password policy is enabled or not.", +"type": "boolean" +}, +"minLength": { +"description": "Minimum number of characters allowed.", +"format": "int32", +"type": "integer" +}, +"passwordChangeInterval": { +"description": "Minimum interval after which the password can be changed. This flag is only supported for PostgreSQL.", +"format": "google-duration", +"type": "string" +}, +"reuseInterval": { +"description": "Number of previous passwords that cannot be reused.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PerformDiskShrinkContext": { +"description": "Perform disk shrink context.", +"id": "PerformDiskShrinkContext", +"properties": { +"targetSizeGb": { +"description": "The target disk shrink size in GigaBytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PscConfig": { +"description": "PSC settings for a Cloud SQL instance.", +"id": "PscConfig", +"properties": { +"allowedConsumerProjects": { +"description": "Optional. The list of consumer projects that are allow-listed for PSC connections to this instance. This instance can be connected to with PSC from any network in these projects. Each consumer project in this list may be represented by a project number (numeric) or by a project id (alphanumeric).", +"items": { +"type": "string" +}, +"type": "array" +}, +"pscEnabled": { +"description": "Whether PSC connectivity is enabled for this instance.", +"type": "boolean" +} +}, +"type": "object" +}, +"ReplicaConfiguration": { +"description": "Read-replica configuration for connecting to the primary instance.", +"id": "ReplicaConfiguration", +"properties": { +"cascadableReplica": { +"description": "Optional. Specifies if a SQL Server replica is a cascadable replica. A cascadable replica is a SQL Server cross region replica that supports replica(s) under it.", +"type": "boolean" +}, +"failoverTarget": { +"description": "Specifies if the replica is the failover target. If the field is set to `true` the replica will be designated as a failover replica. In case the primary instance fails, the replica instance will be promoted as the new primary instance. Only one replica can be specified as failover target, and the replica has to be in different zone with the primary instance.", +"type": "boolean" +}, +"kind": { +"description": "This is always `sql#replicaConfiguration`.", +"type": "string" +}, +"mysqlReplicaConfiguration": { +"$ref": "MySqlReplicaConfiguration", +"description": "MySQL specific configuration when replicating from a MySQL on-premises primary instance. Replication configuration information such as the username, password, certificates, and keys are not stored in the instance metadata. The configuration information is used only to set up the replication connection and is stored by MySQL in a file named `master.info` in the data directory." +} +}, +"type": "object" +}, +"ReplicationCluster": { +"description": "Primary-DR replica pair", +"id": "ReplicationCluster", +"properties": { +"drReplica": { +"description": "Output only. read-only field that indicates if the replica is a dr_replica; not set for a primary.", +"readOnly": true, +"type": "boolean" +}, +"failoverDrReplicaName": { +"description": "Optional. If the instance is a primary instance, then this field identifies the disaster recovery (DR) replica. A DR replica is an optional configuration for Enterprise Plus edition instances. If the instance is a read replica, then the field is not set. Users can set this field to set a designated DR replica for a primary. Removing this field removes the DR replica.", +"type": "string" +} +}, +"type": "object" +}, +"Reschedule": { +"id": "Reschedule", +"properties": { +"rescheduleType": { +"description": "Required. The type of the reschedule.", +"enum": [ +"RESCHEDULE_TYPE_UNSPECIFIED", +"IMMEDIATE", +"NEXT_AVAILABLE_WINDOW", +"SPECIFIC_TIME" +], +"enumDescriptions": [ +"", +"Reschedules maintenance to happen now (within 5 minutes).", +"Reschedules maintenance to occur within one week from the originally scheduled day and time.", +"Reschedules maintenance to a specific time and day." +], +"type": "string" +}, +"scheduleTime": { +"description": "Optional. Timestamp when the maintenance shall be rescheduled to if reschedule_type=SPECIFIC_TIME, in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"RestoreBackupContext": { +"description": "Database instance restore from backup context. Backup context contains source instance id and project id.", +"id": "RestoreBackupContext", +"properties": { +"backupRunId": { +"description": "The ID of the backup run to restore from.", +"format": "int64", +"type": "string" +}, +"instanceId": { +"description": "The ID of the instance that the backup was taken from.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#restoreBackupContext`.", +"type": "string" +}, +"project": { +"description": "The full project ID of the source instance.", +"type": "string" +} +}, +"type": "object" +}, +"RotateServerCaContext": { +"description": "Instance rotate server CA context.", +"id": "RotateServerCaContext", +"properties": { +"kind": { +"description": "This is always `sql#rotateServerCaContext`.", +"type": "string" +}, +"nextVersion": { +"description": "The fingerprint of the next version to be rotated to. If left unspecified, will be rotated to the most recently added server CA version.", +"type": "string" +} +}, +"type": "object" +}, +"Settings": { +"description": "Database instance settings.", +"id": "Settings", +"properties": { +"activationPolicy": { +"description": "The activation policy specifies when the instance is activated; it is applicable only when the instance state is RUNNABLE. Valid values: * `ALWAYS`: The instance is on, and remains so even in the absence of connection requests. * `NEVER`: The instance is off; it is not activated, even if a connection request arrives.", +"enum": [ +"SQL_ACTIVATION_POLICY_UNSPECIFIED", +"ALWAYS", +"NEVER", +"ON_DEMAND" +], +"enumDeprecated": [ +false, +false, +false, +true +], +"enumDescriptions": [ +"Unknown activation plan.", +"The instance is always up and running.", +"The instance never starts.", +"The instance starts upon receiving requests." +], +"type": "string" +}, +"activeDirectoryConfig": { +"$ref": "SqlActiveDirectoryConfig", +"description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server." +}, +"advancedMachineFeatures": { +"$ref": "AdvancedMachineFeatures", +"description": "Specifies advance machine configuration for the instance relevant only for SQL Server." +}, +"authorizedGaeApplications": { +"deprecated": true, +"description": "The App Engine app IDs that can access this instance. (Deprecated) Applied to First Generation instances only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"availabilityType": { +"description": "Availability type. Potential values: * `ZONAL`: The instance serves data from only one zone. Outages in that zone affect data accessibility. * `REGIONAL`: The instance can serve data from more than one zone in a region (it is highly available)./ For more information, see [Overview of the High Availability Configuration](https://cloud.google.com/sql/docs/mysql/high-availability).", +"enum": [ +"SQL_AVAILABILITY_TYPE_UNSPECIFIED", +"ZONAL", +"REGIONAL" +], +"enumDescriptions": [ +"This is an unknown Availability type.", +"Zonal available instance.", +"Regional available instance." +], +"type": "string" +}, +"backupConfiguration": { +"$ref": "BackupConfiguration", +"description": "The daily backup configuration for the instance." +}, +"collation": { +"description": "The name of server Instance collation.", +"type": "string" +}, +"connectorEnforcement": { +"description": "Specifies if connections must use Cloud SQL connectors. Option values include the following: `NOT_REQUIRED` (Cloud SQL instances can be connected without Cloud SQL Connectors) and `REQUIRED` (Only allow connections that use Cloud SQL Connectors) Note that using REQUIRED disables all existing authorized networks. If this field is not specified when creating a new instance, NOT_REQUIRED is used. If this field is not specified when patching or updating an existing instance, it is left unchanged in the instance.", +"enum": [ +"CONNECTOR_ENFORCEMENT_UNSPECIFIED", +"NOT_REQUIRED", +"REQUIRED" +], +"enumDescriptions": [ +"The requirement for Cloud SQL connectors is unknown.", +"Do not require Cloud SQL connectors.", +"Require all connections to use Cloud SQL connectors, including the Cloud SQL Auth Proxy and Cloud SQL Java, Python, and Go connectors. Note: This disables all existing authorized networks." +], +"type": "string" +}, +"crashSafeReplicationEnabled": { +"deprecated": true, +"description": "Configuration specific to read replica instances. Indicates whether database flags for crash-safe replication are enabled. This property was only applicable to First Generation instances.", +"type": "boolean" +}, +"dataCacheConfig": { +"$ref": "DataCacheConfig", +"description": "Configuration for data cache." +}, +"dataDiskSizeGb": { +"description": "The size of data disk, in GB. The data disk size minimum is 10GB.", +"format": "int64", +"type": "string" +}, +"dataDiskType": { +"description": "The type of data disk: `PD_SSD` (default) or `PD_HDD`. Not used for First Generation instances.", +"enum": [ +"SQL_DATA_DISK_TYPE_UNSPECIFIED", +"PD_SSD", +"PD_HDD", +"OBSOLETE_LOCAL_SSD" +], +"enumDeprecated": [ +false, +false, +false, +true +], +"enumDescriptions": [ +"This is an unknown data disk type.", +"An SSD data disk.", +"An HDD data disk.", +"This field is deprecated and will be removed from a future version of the API." +], +"type": "string" +}, +"databaseFlags": { +"description": "The database flags passed to the instance at startup.", +"items": { +"$ref": "DatabaseFlags" +}, +"type": "array" +}, +"databaseReplicationEnabled": { +"description": "Configuration specific to read replica instances. Indicates whether replication is enabled or not. WARNING: Changing this restarts the instance.", +"type": "boolean" +}, +"deletionProtectionEnabled": { +"description": "Configuration to protect against accidental instance deletion.", +"type": "boolean" +}, +"denyMaintenancePeriods": { +"description": "Deny maintenance periods", +"items": { +"$ref": "DenyMaintenancePeriod" +}, +"type": "array" +}, +"edition": { +"description": "Optional. The edition of the instance.", +"enum": [ +"EDITION_UNSPECIFIED", +"ENTERPRISE", +"ENTERPRISE_PLUS" +], +"enumDescriptions": [ +"The instance did not specify the edition.", +"The instance is an enterprise edition.", +"The instance is an Enterprise Plus edition." +], +"type": "string" +}, +"enableGoogleMlIntegration": { +"description": "Optional. When this parameter is set to true, Cloud SQL instances can connect to Vertex AI to pass requests for real-time predictions and insights to the AI. The default value is false. This applies only to Cloud SQL for PostgreSQL instances.", +"type": "boolean" +}, +"insightsConfig": { +"$ref": "InsightsConfig", +"description": "Insights configuration, for now relevant only for Postgres." +}, +"ipConfiguration": { +"$ref": "IpConfiguration", +"description": "The settings for IP Management. This allows to enable or disable the instance IP and manage which external networks can connect to the instance. The IPv4 address cannot be disabled for Second Generation instances." +}, +"kind": { +"description": "This is always `sql#settings`.", +"type": "string" +}, +"locationPreference": { +"$ref": "LocationPreference", +"description": "The location preference settings. This allows the instance to be located as near as possible to either an App Engine app or Compute Engine zone for better performance. App Engine co-location was only applicable to First Generation instances." +}, +"maintenanceWindow": { +"$ref": "MaintenanceWindow", +"description": "The maintenance window for this instance. This specifies when the instance can be restarted for maintenance purposes." +}, +"passwordValidationPolicy": { +"$ref": "PasswordValidationPolicy", +"description": "The local user password validation policy of the instance." +}, +"pricingPlan": { +"description": "The pricing plan for this instance. This can be either `PER_USE` or `PACKAGE`. Only `PER_USE` is supported for Second Generation instances.", +"enum": [ +"SQL_PRICING_PLAN_UNSPECIFIED", +"PACKAGE", +"PER_USE" +], +"enumDescriptions": [ +"This is an unknown pricing plan for this instance.", +"The instance is billed at a monthly flat rate.", +"The instance is billed per usage." +], +"type": "string" +}, +"replicationType": { +"deprecated": true, +"description": "The type of replication this instance uses. This can be either `ASYNCHRONOUS` or `SYNCHRONOUS`. (Deprecated) This property was only applicable to First Generation instances.", +"enum": [ +"SQL_REPLICATION_TYPE_UNSPECIFIED", +"SYNCHRONOUS", +"ASYNCHRONOUS" +], +"enumDescriptions": [ +"This is an unknown replication type for a Cloud SQL instance.", +"The synchronous replication mode for First Generation instances. It is the default value.", +"The asynchronous replication mode for First Generation instances. It provides a slight performance gain, but if an outage occurs while this option is set to asynchronous, you can lose up to a few seconds of updates to your data." +], +"type": "string" +}, +"settingsVersion": { +"description": "The version of instance settings. This is a required field for update method to make sure concurrent updates are handled properly. During update, use the most recent settingsVersion value for this instance and do not try to update this value.", +"format": "int64", +"type": "string" +}, +"sqlServerAuditConfig": { +"$ref": "SqlServerAuditConfig", +"description": "SQL Server specific audit configuration." +}, +"storageAutoResize": { +"description": "Configuration to increase storage size automatically. The default value is true.", +"type": "boolean" +}, +"storageAutoResizeLimit": { +"description": "The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit.", +"format": "int64", +"type": "string" +}, +"tier": { +"description": "The tier (or machine type) for this instance, for example `db-custom-1-3840`. WARNING: Changing this restarts the instance.", +"type": "string" +}, +"timeZone": { +"description": "Server timezone, relevant only for Cloud SQL for SQL Server.", +"type": "string" +}, +"userLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "User-provided labels, represented as a dictionary where each label is a single key value pair.", +"type": "object" +} +}, +"type": "object" +}, +"SqlActiveDirectoryConfig": { +"description": "Active Directory configuration, relevant only for Cloud SQL for SQL Server.", +"id": "SqlActiveDirectoryConfig", +"properties": { +"domain": { +"description": "The name of the domain (e.g., mydomain.com).", +"type": "string" +}, +"kind": { +"description": "This is always sql#activeDirectoryConfig.", +"type": "string" +} +}, +"type": "object" +}, +"SqlExternalSyncSettingError": { +"description": "External primary instance migration setting error/warning.", +"id": "SqlExternalSyncSettingError", +"properties": { +"detail": { +"description": "Additional information about the error encountered.", +"type": "string" +}, +"kind": { +"description": "Can be `sql#externalSyncSettingError` or `sql#externalSyncSettingWarning`.", +"type": "string" +}, +"type": { +"description": "Identifies the specific error that occurred.", +"enum": [ +"SQL_EXTERNAL_SYNC_SETTING_ERROR_TYPE_UNSPECIFIED", +"CONNECTION_FAILURE", +"BINLOG_NOT_ENABLED", +"INCOMPATIBLE_DATABASE_VERSION", +"REPLICA_ALREADY_SETUP", +"INSUFFICIENT_PRIVILEGE", +"UNSUPPORTED_MIGRATION_TYPE", +"NO_PGLOGICAL_INSTALLED", +"PGLOGICAL_NODE_ALREADY_EXISTS", +"INVALID_WAL_LEVEL", +"INVALID_SHARED_PRELOAD_LIBRARY", +"INSUFFICIENT_MAX_REPLICATION_SLOTS", +"INSUFFICIENT_MAX_WAL_SENDERS", +"INSUFFICIENT_MAX_WORKER_PROCESSES", +"UNSUPPORTED_EXTENSIONS", +"INVALID_RDS_LOGICAL_REPLICATION", +"INVALID_LOGGING_SETUP", +"INVALID_DB_PARAM", +"UNSUPPORTED_GTID_MODE", +"SQLSERVER_AGENT_NOT_RUNNING", +"UNSUPPORTED_TABLE_DEFINITION", +"UNSUPPORTED_DEFINER", +"SQLSERVER_SERVERNAME_MISMATCH", +"PRIMARY_ALREADY_SETUP", +"UNSUPPORTED_BINLOG_FORMAT", +"BINLOG_RETENTION_SETTING", +"UNSUPPORTED_STORAGE_ENGINE", +"LIMITED_SUPPORT_TABLES", +"EXISTING_DATA_IN_REPLICA", +"MISSING_OPTIONAL_PRIVILEGES", +"RISKY_BACKUP_ADMIN_PRIVILEGE", +"INSUFFICIENT_GCS_PERMISSIONS", +"INVALID_FILE_INFO", +"UNSUPPORTED_DATABASE_SETTINGS", +"MYSQL_PARALLEL_IMPORT_INSUFFICIENT_PRIVILEGE", +"LOCAL_INFILE_OFF", +"TURN_ON_PITR_AFTER_PROMOTE", +"INCOMPATIBLE_DATABASE_MINOR_VERSION", +"SOURCE_MAX_SUBSCRIPTIONS", +"UNABLE_TO_VERIFY_DEFINERS", +"SUBSCRIPTION_CALCULATION_STATUS", +"PG_SUBSCRIPTION_COUNT", +"PG_SYNC_PARALLEL_LEVEL", +"INSUFFICIENT_DISK_SIZE", +"INSUFFICIENT_MACHINE_TIER" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"The replication user is missing privileges that are required.", +"Unsupported migration type.", +"No pglogical extension installed on databases, applicable for postgres.", +"pglogical node already exists on databases, applicable for postgres.", +"The value of parameter wal_level is not set to logical.", +"The value of parameter shared_preload_libraries does not include pglogical.", +"The value of parameter max_replication_slots is not sufficient.", +"The value of parameter max_wal_senders is not sufficient.", +"The value of parameter max_worker_processes is not sufficient.", +"Extensions installed are either not supported or having unsupported versions", +"The value of parameter rds.logical_replication is not set to 1.", +"The primary instance logging setup doesn't allow EM sync.", +"The primary instance database parameter setup doesn't allow EM sync.", +"The gtid_mode is not supported, applicable for MySQL.", +"SQL Server Agent is not running.", +"The table definition is not support due to missing primary key or replica identity, applicable for postgres.", +"The customer has a definer that will break EM setup.", +"SQL Server @@SERVERNAME does not match actual host name.", +"The primary instance has been setup and will fail the setup.", +"The primary instance has unsupported binary log format.", +"The primary instance's binary log retention setting.", +"The primary instance has tables with unsupported storage engine.", +"Source has tables with limited support eg: PostgreSQL tables without primary keys.", +"The replica instance contains existing data.", +"The replication user is missing privileges that are optional.", +"Additional BACKUP_ADMIN privilege is granted to the replication user which may lock source MySQL 8 instance for DDLs during initial sync.", +"The Cloud Storage bucket is missing necessary permissions.", +"The Cloud Storage bucket has an error in the file or contains invalid file information.", +"The source instance has unsupported database settings for migration.", +"The replication user is missing parallel import specific privileges. (e.g. LOCK TABLES) for MySQL.", +"The global variable local_infile is off on external server replica.", +"This code instructs customers to turn on point-in-time recovery manually for the instance after promoting the Cloud SQL for PostgreSQL instance.", +"The minor version of replica database is incompatible with the source.", +"This warning message indicates that Cloud SQL uses the maximum number of subscriptions to migrate data from the source to the destination.", +"Unable to verify definers on the source for MySQL.", +"If a time out occurs while the subscription counts are calculated, then this value is set to 1. Otherwise, this value is set to 2.", +"Count of subscriptions needed to sync source data for PostgreSQL database.", +"Final parallel level that is used to do migration.", +"The disk size of the replica instance is smaller than the data size of the source instance.", +"The data size of the source instance is greater than 1 TB, the number of cores of the replica instance is less than 8, and the memory of the replica is less than 32 GB." +], +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesAcquireSsrsLeaseResponse": { +"description": "Acquire SSRS lease response.", +"id": "SqlInstancesAcquireSsrsLeaseResponse", +"properties": { +"operationId": { +"description": "The unique identifier for this operation.", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesGetDiskShrinkConfigResponse": { +"description": "Instance get disk shrink config response.", +"id": "SqlInstancesGetDiskShrinkConfigResponse", +"properties": { +"kind": { +"description": "This is always `sql#getDiskShrinkConfig`.", +"type": "string" +}, +"message": { +"description": "Additional message to customers.", +"type": "string" +}, +"minimalTargetSizeGb": { +"description": "The minimum size to which a disk can be shrunk in GigaBytes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesGetLatestRecoveryTimeResponse": { +"description": "Instance get latest recovery time response.", +"id": "SqlInstancesGetLatestRecoveryTimeResponse", +"properties": { +"kind": { +"description": "This is always `sql#getLatestRecoveryTime`.", +"type": "string" +}, +"latestRecoveryTime": { +"description": "Timestamp, identifies the latest recovery time of the source instance.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesReleaseSsrsLeaseResponse": { +"description": "The response for the release of the SSRS lease.", +"id": "SqlInstancesReleaseSsrsLeaseResponse", +"properties": { +"operationId": { +"description": "The operation ID.", +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesRescheduleMaintenanceRequestBody": { +"description": "Reschedule options for maintenance windows.", +"id": "SqlInstancesRescheduleMaintenanceRequestBody", +"properties": { +"reschedule": { +"$ref": "Reschedule", +"description": "Required. The type of the reschedule the user wants." +} +}, +"type": "object" +}, +"SqlInstancesResetReplicaSizeRequest": { +"description": "Instance reset replica size request.", +"id": "SqlInstancesResetReplicaSizeRequest", +"properties": {}, +"type": "object" +}, +"SqlInstancesStartExternalSyncRequest": { +"id": "SqlInstancesStartExternalSyncRequest", +"properties": { +"migrationType": { +"description": "Optional. MigrationType decides if the migration is a physical file based migration or logical migration.", +"enum": [ +"MIGRATION_TYPE_UNSPECIFIED", +"LOGICAL", +"PHYSICAL" +], +"enumDescriptions": [ +"If no migration type is specified it will be defaulted to LOGICAL.", +"Logical Migrations", +"Physical file based Migrations" +], +"type": "string" +}, +"mysqlSyncConfig": { +"$ref": "MySqlSyncConfig", +"description": "MySQL-specific settings for start external sync." +}, +"skipVerification": { +"description": "Whether to skip the verification step (VESS).", +"type": "boolean" +}, +"syncMode": { +"description": "External sync mode.", +"enum": [ +"EXTERNAL_SYNC_MODE_UNSPECIFIED", +"ONLINE", +"OFFLINE" +], +"enumDescriptions": [ +"Unknown external sync mode, will be defaulted to ONLINE mode", +"Online external sync will set up replication after initial data external sync", +"Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" +], +"type": "string" +}, +"syncParallelLevel": { +"description": "Optional. Parallel level for initial data sync. Currently only applicable for MySQL.", +"enum": [ +"EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED", +"MIN", +"OPTIMAL", +"MAX" +], +"enumDescriptions": [ +"Unknown sync parallel level. Will be defaulted to OPTIMAL.", +"Minimal parallel level.", +"Optimal parallel level.", +"Maximum parallel level." +], +"type": "string" +} +}, +"type": "object" +}, +"SqlInstancesVerifyExternalSyncSettingsRequest": { +"id": "SqlInstancesVerifyExternalSyncSettingsRequest", +"properties": { +"migrationType": { +"description": "Optional. MigrationType field decides if the migration is a physical file based migration or logical migration", +"enum": [ +"MIGRATION_TYPE_UNSPECIFIED", +"LOGICAL", +"PHYSICAL" +], +"enumDescriptions": [ +"If no migration type is specified it will be defaulted to LOGICAL.", +"Logical Migrations", +"Physical file based Migrations" +], +"type": "string" +}, +"mysqlSyncConfig": { +"$ref": "MySqlSyncConfig", +"description": "Optional. MySQL-specific settings for start external sync." +}, +"syncMode": { +"description": "External sync mode", +"enum": [ +"EXTERNAL_SYNC_MODE_UNSPECIFIED", +"ONLINE", +"OFFLINE" +], +"enumDescriptions": [ +"Unknown external sync mode, will be defaulted to ONLINE mode", +"Online external sync will set up replication after initial data external sync", +"Offline external sync only dumps and loads a one-time snapshot of the primary instance's data" +], +"type": "string" +}, +"syncParallelLevel": { +"description": "Optional. Parallel level for initial data sync. Currently only applicable for PostgreSQL.", +"enum": [ +"EXTERNAL_SYNC_PARALLEL_LEVEL_UNSPECIFIED", +"MIN", +"OPTIMAL", +"MAX" +], +"enumDescriptions": [ +"Unknown sync parallel level. Will be defaulted to OPTIMAL.", +"Minimal parallel level.", +"Optimal parallel level.", +"Maximum parallel level." +], +"type": "string" +}, +"verifyConnectionOnly": { +"description": "Flag to enable verifying connection only", +"type": "boolean" +}, +"verifyReplicationOnly": { +"description": "Optional. Flag to verify settings required by replication setup only", +"type": "boolean" +} +}, +"type": "object" +}, +"SqlInstancesVerifyExternalSyncSettingsResponse": { +"description": "Instance verify external sync settings response.", +"id": "SqlInstancesVerifyExternalSyncSettingsResponse", +"properties": { +"errors": { +"description": "List of migration violations.", +"items": { +"$ref": "SqlExternalSyncSettingError" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#migrationSettingErrorList`.", +"type": "string" +}, +"warnings": { +"description": "List of migration warnings.", +"items": { +"$ref": "SqlExternalSyncSettingError" +}, +"type": "array" +} +}, +"type": "object" +}, +"SqlOutOfDiskReport": { +"description": "This message wraps up the information written by out-of-disk detection job.", +"id": "SqlOutOfDiskReport", +"properties": { +"sqlMinRecommendedIncreaseSizeGb": { +"description": "The minimum recommended increase size in GigaBytes This field is consumed by the frontend * Writers: * the proactive database wellness job for OOD. * Readers:", +"format": "int32", +"type": "integer" +}, +"sqlOutOfDiskState": { +"description": "This field represents the state generated by the proactive database wellness job for OutOfDisk issues. * Writers: * the proactive database wellness job for OOD. * Readers: * the proactive database wellness job", +"enum": [ +"SQL_OUT_OF_DISK_STATE_UNSPECIFIED", +"NORMAL", +"SOFT_SHUTDOWN" +], +"enumDescriptions": [ +"Unspecified state", +"The instance has plenty space on data disk", +"Data disk is almost used up. It is shutdown to prevent data corruption." +], +"type": "string" +} +}, +"type": "object" +}, +"SqlScheduledMaintenance": { +"description": "Any scheduled maintenance for this instance.", +"id": "SqlScheduledMaintenance", +"properties": { +"canDefer": { +"deprecated": true, +"type": "boolean" +}, +"canReschedule": { +"description": "If the scheduled maintenance can be rescheduled.", +"type": "boolean" +}, +"scheduleDeadlineTime": { +"description": "Maintenance cannot be rescheduled to start beyond this deadline.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The start time of any upcoming scheduled maintenance for this instance.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SqlServerAuditConfig": { +"description": "SQL Server specific audit configuration.", +"id": "SqlServerAuditConfig", +"properties": { +"bucket": { +"description": "The name of the destination bucket (e.g., gs://mybucket).", +"type": "string" +}, +"kind": { +"description": "This is always sql#sqlServerAuditConfig", +"type": "string" +}, +"retentionInterval": { +"description": "How long to keep generated audit files.", +"format": "google-duration", +"type": "string" +}, +"uploadInterval": { +"description": "How often to upload generated audit files.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"SqlServerDatabaseDetails": { +"description": "Represents a Sql Server database on the Cloud SQL instance.", +"id": "SqlServerDatabaseDetails", +"properties": { +"compatibilityLevel": { +"description": "The version of SQL Server with which the database is to be made compatible", +"format": "int32", +"type": "integer" +}, +"recoveryModel": { +"description": "The recovery model of a SQL Server database", +"type": "string" +} +}, +"type": "object" +}, +"SqlServerUserDetails": { +"description": "Represents a Sql Server user on the Cloud SQL instance.", +"id": "SqlServerUserDetails", +"properties": { +"disabled": { +"description": "If the user has been disabled", +"type": "boolean" +}, +"serverRoles": { +"description": "The server roles for this user", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SslCert": { +"description": "SslCerts Resource", +"id": "SslCert", +"properties": { +"cert": { +"description": "PEM representation.", +"type": "string" +}, +"certSerialNumber": { +"description": "Serial number, as extracted from the certificate.", +"type": "string" +}, +"commonName": { +"description": "User supplied name. Constrained to [a-zA-Z.-_ ]+.", +"type": "string" +}, +"createTime": { +"description": "The time when the certificate was created in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"expirationTime": { +"description": "The time when the certificate expires in [RFC 3339](https://tools.ietf.org/html/rfc3339) format, for example `2012-11-15T16:19:00.094Z`.", +"format": "google-datetime", +"type": "string" +}, +"instance": { +"description": "Name of the database instance.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#sslCert`.", +"type": "string" +}, +"selfLink": { +"description": "The URI of this resource.", +"type": "string" +}, +"sha1Fingerprint": { +"description": "Sha1 Fingerprint.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertDetail": { +"description": "SslCertDetail.", +"id": "SslCertDetail", +"properties": { +"certInfo": { +"$ref": "SslCert", +"description": "The public information about the cert." +}, +"certPrivateKey": { +"description": "The private key for the client cert, in pem format. Keep private in order to protect your security.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertsCreateEphemeralRequest": { +"description": "SslCerts create ephemeral certificate request.", +"id": "SslCertsCreateEphemeralRequest", +"properties": { +"access_token": { +"description": "Access token to include in the signed certificate.", +"type": "string" +}, +"public_key": { +"description": "PEM encoded public key to include in the signed certificate.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertsInsertRequest": { +"description": "SslCerts insert request.", +"id": "SslCertsInsertRequest", +"properties": { +"commonName": { +"description": "User supplied name. Must be a distinct name from the other certificates for this instance.", +"type": "string" +} +}, +"type": "object" +}, +"SslCertsInsertResponse": { +"description": "SslCert insert response.", +"id": "SslCertsInsertResponse", +"properties": { +"clientCert": { +"$ref": "SslCertDetail", +"description": "The new client certificate and private key." +}, +"kind": { +"description": "This is always `sql#sslCertsInsert`.", +"type": "string" +}, +"operation": { +"$ref": "Operation", +"description": "The operation to track the ssl certs insert request." +}, +"serverCaCert": { +"$ref": "SslCert", +"description": "The server Certificate Authority's certificate. If this is missing you can force a new one to be generated by calling resetSslConfig method on instances resource." +} +}, +"type": "object" +}, +"SslCertsListResponse": { +"description": "SslCerts list response.", +"id": "SslCertsListResponse", +"properties": { +"items": { +"description": "List of client certificates for the instance.", +"items": { +"$ref": "SslCert" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#sslCertsList`.", +"type": "string" +} +}, +"type": "object" +}, +"SyncFlags": { +"description": "Initial sync flags for certain Cloud SQL APIs. Currently used for the MySQL external server initial dump.", +"id": "SyncFlags", +"properties": { +"name": { +"description": "The name of the flag.", +"type": "string" +}, +"value": { +"description": "The value of the flag. This field must be omitted if the flag doesn't take a value.", +"type": "string" +} +}, +"type": "object" +}, +"Tier": { +"description": "A Google Cloud SQL service tier resource.", +"id": "Tier", +"properties": { +"DiskQuota": { +"description": "The maximum disk size of this tier in bytes.", +"format": "int64", +"type": "string" +}, +"RAM": { +"description": "The maximum RAM usage of this tier in bytes.", +"format": "int64", +"type": "string" +}, +"kind": { +"description": "This is always `sql#tier`.", +"type": "string" +}, +"region": { +"description": "The applicable regions for this tier.", +"items": { +"type": "string" +}, +"type": "array" +}, +"tier": { +"description": "An identifier for the machine type, for example, `db-custom-1-3840`. For related information, see [Pricing](/sql/pricing).", +"type": "string" +} +}, +"type": "object" +}, +"TiersListResponse": { +"description": "Tiers list response.", +"id": "TiersListResponse", +"properties": { +"items": { +"description": "List of tiers.", +"items": { +"$ref": "Tier" +}, +"type": "array" +}, +"kind": { +"description": "This is always `sql#tiersList`.", +"type": "string" +} +}, +"type": "object" +}, +"TruncateLogContext": { +"description": "Database Instance truncate log context.", +"id": "TruncateLogContext", +"properties": { +"kind": { +"description": "This is always `sql#truncateLogContext`.", +"type": "string" +}, +"logType": { +"description": "The type of log to truncate. Valid values are `MYSQL_GENERAL_TABLE` and `MYSQL_SLOW_TABLE`.", +"type": "string" +} +}, +"type": "object" +}, +"User": { +"description": "A Cloud SQL user resource.", +"id": "User", +"properties": { +"dualPasswordType": { +"description": "Dual password status for the user.", +"enum": [ +"DUAL_PASSWORD_TYPE_UNSPECIFIED", +"NO_MODIFY_DUAL_PASSWORD", +"NO_DUAL_PASSWORD", +"DUAL_PASSWORD" +], +"enumDescriptions": [ +"The default value.", +"Do not update the user's dual password status.", +"No dual password usable for connecting using this user.", +"Dual password usable for connecting using this user." +], +"type": "string" +}, +"etag": { +"description": "This field is deprecated and will be removed from a future version of the API.", +"type": "string" +}, +"host": { +"description": "Optional. The host from which the user can connect. For `insert` operations, host defaults to an empty string. For `update` operations, host is specified as part of the request URL. The host name cannot be updated after insertion. For a MySQL instance, it's required; for a PostgreSQL or SQL Server instance, it's optional.", +"type": "string" +}, +"instance": { +"description": "The name of the Cloud SQL instance. This does not include the project ID. Can be omitted for *update* because it is already specified on the URL.", +"type": "string" +}, +"kind": { +"description": "This is always `sql#user`.", +"type": "string" +}, +"name": { +"description": "The name of the user in the Cloud SQL instance. Can be omitted for `update` because it is already specified in the URL.", +"type": "string" +}, +"password": { +"description": "The password for the user.", +"type": "string" +}, +"passwordPolicy": { +"$ref": "UserPasswordValidationPolicy", +"description": "User level password validation policy." +}, +"project": { +"description": "The project ID of the project containing the Cloud SQL database. The Google apps domain is prefixed if applicable. Can be omitted for *update* because it is already specified on the URL.", +"type": "string" +}, +"sqlserverUserDetails": { +"$ref": "SqlServerUserDetails" +}, +"type": { +"description": "The user type. It determines the method to authenticate the user during login. The default is the database's built-in user type.", +"enum": [ +"BUILT_IN", +"CLOUD_IAM_USER", +"CLOUD_IAM_SERVICE_ACCOUNT", +"CLOUD_IAM_GROUP", +"CLOUD_IAM_GROUP_USER", +"CLOUD_IAM_GROUP_SERVICE_ACCOUNT" +], +"enumDescriptions": [ +"The database's built-in user type.", +"Cloud IAM user.", +"Cloud IAM service account.", +"Cloud IAM group non-login user.", +"Cloud IAM group login user.", +"Cloud IAM group service account." +], +"type": "string" +} +}, +"type": "object" +}, +"UserPasswordValidationPolicy": { +"description": "User level password validation policy.", +"id": "UserPasswordValidationPolicy", +"properties": { +"allowedFailedAttempts": { +"description": "Number of failed login attempts allowed before user get locked.", +"format": "int32", +"type": "integer" +}, +"enableFailedAttemptsCheck": { +"description": "If true, failed login attempts check will be enabled.", +"type": "boolean" +}, +"enablePasswordVerification": { +"description": "If true, the user must specify the current password before changing the password. This flag is supported only for MySQL.", +"type": "boolean" +}, +"passwordExpirationDuration": { +"description": "Expiration duration after password is updated.", +"format": "google-duration", +"type": "string" +}, +"status": { +"$ref": "PasswordStatus", +"description": "Output only. Read-only password status.", +"readOnly": true +} +}, +"type": "object" +}, +"UsersListResponse": { +"description": "User list response.", +"id": "UsersListResponse", +"properties": { +"items": { +"description": "List of user resources in the instance.", +"items": { +"$ref": "User" +}, +"type": "array" +}, +"kind": { +"description": "This is always *sql#usersList*.", +"type": "string" +}, +"nextPageToken": { +"deprecated": true, +"description": "Unused.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud SQL Admin API", +"version": "v1beta4" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/storage.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/storage.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..6419b8d32437a44c216ad1d24cbf9833bd06190b --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/storage.v1.json @@ -0,0 +1,5725 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "View and manage your data across Google Cloud Platform services" +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud Platform services" +}, +"https://www.googleapis.com/auth/devstorage.full_control": { +"description": "Manage your data and permissions in Google Cloud Storage" +}, +"https://www.googleapis.com/auth/devstorage.read_only": { +"description": "View your data in Google Cloud Storage" +}, +"https://www.googleapis.com/auth/devstorage.read_write": { +"description": "Manage your data in Google Cloud Storage" +} +} +} +}, +"basePath": "/storage/v1/", +"baseUrl": "https://storage.googleapis.com/storage/v1/", +"batchPath": "batch/storage/v1", +"description": "Stores and retrieves potentially large, immutable data objects.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/storage/docs/json_api/", +"endpoints": [ +{ +"description": "Regional Endpoint", +"endpointUrl": "https://storage.me-central2.rep.googleapis.com/", +"location": "me-central2" +} +], +"etag": "\"33343637353532313731303535353536323439\"", +"icons": { +"x16": "https://www.google.com/images/icons/product/cloud_storage-16.png", +"x32": "https://www.google.com/images/icons/product/cloud_storage-32.png" +}, +"id": "storage:v1", +"kind": "discovery#restDescription", +"labels": [ +"labs" +], +"mtlsRootUrl": "https://storage.mtls.googleapis.com/", +"name": "storage", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"alt": { +"default": "json", +"description": "Data format for the response.", +"enum": [ +"json" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json" +], +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Upload protocol for media (e.g. \"media\", \"multipart\", \"resumable\").", +"location": "query", +"type": "string" +}, +"userIp": { +"description": "Deprecated. Please use quotaUser instead.", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"anywhereCaches": { +"methods": { +"disable": { +"description": "Disables an Anywhere Cache instance.", +"httpMethod": "POST", +"id": "storage.anywhereCaches.disable", +"parameterOrder": [ +"bucket", +"anywhereCacheId" +], +"parameters": { +"anywhereCacheId": { +"description": "The ID of requested Anywhere Cache instance.", +"location": "path", +"required": true, +"type": "string" +}, +"bucket": { +"description": "Name of the parent bucket.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/disable", +"response": { +"$ref": "AnywhereCache" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Returns the metadata of an Anywhere Cache instance.", +"httpMethod": "GET", +"id": "storage.anywhereCaches.get", +"parameterOrder": [ +"bucket", +"anywhereCacheId" +], +"parameters": { +"anywhereCacheId": { +"description": "The ID of requested Anywhere Cache instance.", +"location": "path", +"required": true, +"type": "string" +}, +"bucket": { +"description": "Name of the parent bucket.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", +"response": { +"$ref": "AnywhereCache" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"insert": { +"description": "Creates an Anywhere Cache instance.", +"httpMethod": "POST", +"id": "storage.anywhereCaches.insert", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the parent bucket.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/anywhereCaches", +"request": { +"$ref": "AnywhereCache" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"description": "Returns a list of Anywhere Cache instances of the bucket matching the criteria.", +"httpMethod": "GET", +"id": "storage.anywhereCaches.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the parent bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "Maximum number of items to return in a single page of responses. Maximum 1000.", +"format": "int32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/anywhereCaches", +"response": { +"$ref": "AnywhereCaches" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"pause": { +"description": "Pauses an Anywhere Cache instance.", +"httpMethod": "POST", +"id": "storage.anywhereCaches.pause", +"parameterOrder": [ +"bucket", +"anywhereCacheId" +], +"parameters": { +"anywhereCacheId": { +"description": "The ID of requested Anywhere Cache instance.", +"location": "path", +"required": true, +"type": "string" +}, +"bucket": { +"description": "Name of the parent bucket.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/pause", +"response": { +"$ref": "AnywhereCache" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"resume": { +"description": "Resumes a paused or disabled Anywhere Cache instance.", +"httpMethod": "POST", +"id": "storage.anywhereCaches.resume", +"parameterOrder": [ +"bucket", +"anywhereCacheId" +], +"parameters": { +"anywhereCacheId": { +"description": "The ID of requested Anywhere Cache instance.", +"location": "path", +"required": true, +"type": "string" +}, +"bucket": { +"description": "Name of the parent bucket.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}/resume", +"response": { +"$ref": "AnywhereCache" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"update": { +"description": "Updates the config(ttl and admissionPolicy) of an Anywhere Cache instance.", +"httpMethod": "PATCH", +"id": "storage.anywhereCaches.update", +"parameterOrder": [ +"bucket", +"anywhereCacheId" +], +"parameters": { +"anywhereCacheId": { +"description": "The ID of requested Anywhere Cache instance.", +"location": "path", +"required": true, +"type": "string" +}, +"bucket": { +"description": "Name of the parent bucket.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/anywhereCaches/{anywhereCacheId}", +"request": { +"$ref": "AnywhereCache" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +}, +"bucketAccessControls": { +"methods": { +"delete": { +"description": "Permanently deletes the ACL entry for the specified entity on the specified bucket.", +"httpMethod": "DELETE", +"id": "storage.bucketAccessControls.delete", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/acl/{entity}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"get": { +"description": "Returns the ACL entry for the specified entity on the specified bucket.", +"httpMethod": "GET", +"id": "storage.bucketAccessControls.get", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/acl/{entity}", +"response": { +"$ref": "BucketAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"description": "Creates a new ACL entry on the specified bucket.", +"httpMethod": "POST", +"id": "storage.bucketAccessControls.insert", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/acl", +"request": { +"$ref": "BucketAccessControl" +}, +"response": { +"$ref": "BucketAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"list": { +"description": "Retrieves ACL entries on the specified bucket.", +"httpMethod": "GET", +"id": "storage.bucketAccessControls.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/acl", +"response": { +"$ref": "BucketAccessControls" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"patch": { +"description": "Patches an ACL entry on the specified bucket.", +"httpMethod": "PATCH", +"id": "storage.bucketAccessControls.patch", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/acl/{entity}", +"request": { +"$ref": "BucketAccessControl" +}, +"response": { +"$ref": "BucketAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"update": { +"description": "Updates an ACL entry on the specified bucket.", +"httpMethod": "PUT", +"id": "storage.bucketAccessControls.update", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/acl/{entity}", +"request": { +"$ref": "BucketAccessControl" +}, +"response": { +"$ref": "BucketAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"buckets": { +"methods": { +"delete": { +"description": "Permanently deletes an empty bucket.", +"httpMethod": "DELETE", +"id": "storage.buckets.delete", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "If set, only deletes the bucket if its metageneration matches this value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "If set, only deletes the bucket if its metageneration does not match this value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Returns metadata for the specified bucket.", +"httpMethod": "GET", +"id": "storage.buckets.get", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit owner, acl and defaultObjectAcl properties." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}", +"response": { +"$ref": "Bucket" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"getIamPolicy": { +"description": "Returns an IAM policy for the specified bucket.", +"httpMethod": "GET", +"id": "storage.buckets.getIamPolicy", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"optionsRequestedPolicyVersion": { +"description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", +"format": "int32", +"location": "query", +"minimum": "1", +"type": "integer" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/iam", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"description": "Creates a new bucket.", +"httpMethod": "POST", +"id": "storage.buckets.insert", +"parameterOrder": [ +"project" +], +"parameters": { +"enableObjectRetention": { +"default": "false", +"description": "When set to true, object retention is enabled for this bucket.", +"location": "query", +"type": "boolean" +}, +"predefinedAcl": { +"description": "Apply a predefined set of access controls to this bucket.", +"enum": [ +"authenticatedRead", +"private", +"projectPrivate", +"publicRead", +"publicReadWrite" +], +"enumDescriptions": [ +"Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", +"Project team owners get OWNER access.", +"Project team members get access according to their roles.", +"Project team owners get OWNER access, and allUsers get READER access.", +"Project team owners get OWNER access, and allUsers get WRITER access." +], +"location": "query", +"type": "string" +}, +"predefinedDefaultObjectAcl": { +"description": "Apply a predefined set of default object access controls to this bucket.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"project": { +"description": "A valid API project identifier.", +"location": "query", +"required": true, +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl, unless the bucket resource specifies acl or defaultObjectAcl properties, when it defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit owner, acl and defaultObjectAcl properties." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "b", +"request": { +"$ref": "Bucket" +}, +"response": { +"$ref": "Bucket" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"description": "Retrieves a list of buckets for a given project.", +"httpMethod": "GET", +"id": "storage.buckets.list", +"parameterOrder": [ +"project" +], +"parameters": { +"maxResults": { +"default": "1000", +"description": "Maximum number of buckets to return in a single response. The service will use this parameter or 1,000 items, whichever is smaller.", +"format": "uint32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"prefix": { +"description": "Filter results to buckets whose names begin with this prefix.", +"location": "query", +"type": "string" +}, +"project": { +"description": "A valid API project identifier.", +"location": "query", +"required": true, +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit owner, acl and defaultObjectAcl properties." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "b", +"response": { +"$ref": "Buckets" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"lockRetentionPolicy": { +"description": "Locks retention policy on a bucket.", +"httpMethod": "POST", +"id": "storage.buckets.lockRetentionPolicy", +"parameterOrder": [ +"bucket", +"ifMetagenerationMatch" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether bucket's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/lockRetentionPolicy", +"response": { +"$ref": "Bucket" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"patch": { +"description": "Patches a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", +"httpMethod": "PATCH", +"id": "storage.buckets.patch", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"predefinedAcl": { +"description": "Apply a predefined set of access controls to this bucket.", +"enum": [ +"authenticatedRead", +"private", +"projectPrivate", +"publicRead", +"publicReadWrite" +], +"enumDescriptions": [ +"Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", +"Project team owners get OWNER access.", +"Project team members get access according to their roles.", +"Project team owners get OWNER access, and allUsers get READER access.", +"Project team owners get OWNER access, and allUsers get WRITER access." +], +"location": "query", +"type": "string" +}, +"predefinedDefaultObjectAcl": { +"description": "Apply a predefined set of default object access controls to this bucket.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit owner, acl and defaultObjectAcl properties." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}", +"request": { +"$ref": "Bucket" +}, +"response": { +"$ref": "Bucket" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"setIamPolicy": { +"description": "Updates an IAM policy for the specified bucket.", +"httpMethod": "PUT", +"id": "storage.buckets.setIamPolicy", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/iam", +"request": { +"$ref": "Policy" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"testIamPermissions": { +"description": "Tests a set of permissions on the given bucket to see which, if any, are held by the caller.", +"httpMethod": "GET", +"id": "storage.buckets.testIamPermissions", +"parameterOrder": [ +"bucket", +"permissions" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"permissions": { +"description": "Permissions to test.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/iam/testPermissions", +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"update": { +"description": "Updates a bucket. Changes to the bucket will be readable immediately after writing, but configuration changes may take time to propagate.", +"httpMethod": "PUT", +"id": "storage.buckets.update", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the return of the bucket metadata conditional on whether the bucket's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"predefinedAcl": { +"description": "Apply a predefined set of access controls to this bucket.", +"enum": [ +"authenticatedRead", +"private", +"projectPrivate", +"publicRead", +"publicReadWrite" +], +"enumDescriptions": [ +"Project team owners get OWNER access, and allAuthenticatedUsers get READER access.", +"Project team owners get OWNER access.", +"Project team members get access according to their roles.", +"Project team owners get OWNER access, and allUsers get READER access.", +"Project team owners get OWNER access, and allUsers get WRITER access." +], +"location": "query", +"type": "string" +}, +"predefinedDefaultObjectAcl": { +"description": "Apply a predefined set of default object access controls to this bucket.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit owner, acl and defaultObjectAcl properties." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}", +"request": { +"$ref": "Bucket" +}, +"response": { +"$ref": "Bucket" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"channels": { +"methods": { +"stop": { +"description": "Stop watching resources through this channel", +"httpMethod": "POST", +"id": "storage.channels.stop", +"path": "channels/stop", +"request": { +"$ref": "Channel", +"parameterName": "resource" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +}, +"defaultObjectAccessControls": { +"methods": { +"delete": { +"description": "Permanently deletes the default object ACL entry for the specified entity on the specified bucket.", +"httpMethod": "DELETE", +"id": "storage.defaultObjectAccessControls.delete", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"get": { +"description": "Returns the default object ACL entry for the specified entity on the specified bucket.", +"httpMethod": "GET", +"id": "storage.defaultObjectAccessControls.get", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"description": "Creates a new default object ACL entry on the specified bucket.", +"httpMethod": "POST", +"id": "storage.defaultObjectAccessControls.insert", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/defaultObjectAcl", +"request": { +"$ref": "ObjectAccessControl" +}, +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"list": { +"description": "Retrieves default object ACL entries on the specified bucket.", +"httpMethod": "GET", +"id": "storage.defaultObjectAccessControls.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "If present, only return default ACL listing if the bucket's current metageneration matches this value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "If present, only return default ACL listing if the bucket's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/defaultObjectAcl", +"response": { +"$ref": "ObjectAccessControls" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"patch": { +"description": "Patches a default object ACL entry on the specified bucket.", +"httpMethod": "PATCH", +"id": "storage.defaultObjectAccessControls.patch", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"request": { +"$ref": "ObjectAccessControl" +}, +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"update": { +"description": "Updates a default object ACL entry on the specified bucket.", +"httpMethod": "PUT", +"id": "storage.defaultObjectAccessControls.update", +"parameterOrder": [ +"bucket", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/defaultObjectAcl/{entity}", +"request": { +"$ref": "ObjectAccessControl" +}, +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"folders": { +"methods": { +"delete": { +"description": "Permanently deletes a folder. Only applicable to buckets with hierarchical namespace enabled.", +"httpMethod": "DELETE", +"id": "storage.folders.delete", +"parameterOrder": [ +"bucket", +"folder" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the folder resides.", +"location": "path", +"required": true, +"type": "string" +}, +"folder": { +"description": "Name of a folder.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "If set, only deletes the folder if its metageneration matches this value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "If set, only deletes the folder if its metageneration does not match this value.", +"format": "int64", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/folders/{folder}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Returns metadata for the specified folder. Only applicable to buckets with hierarchical namespace enabled.", +"httpMethod": "GET", +"id": "storage.folders.get", +"parameterOrder": [ +"bucket", +"folder" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the folder resides.", +"location": "path", +"required": true, +"type": "string" +}, +"folder": { +"description": "Name of a folder.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the return of the folder metadata conditional on whether the folder's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the return of the folder metadata conditional on whether the folder's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/folders/{folder}", +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"insert": { +"description": "Creates a new folder. Only applicable to buckets with hierarchical namespace enabled.", +"httpMethod": "POST", +"id": "storage.folders.insert", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the folder resides.", +"location": "path", +"required": true, +"type": "string" +}, +"recursive": { +"description": "If true, any parent folder which doesn\u2019t exist will be created automatically.", +"location": "query", +"type": "boolean" +} +}, +"path": "b/{bucket}/folders", +"request": { +"$ref": "Folder" +}, +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"description": "Retrieves a list of folders matching the criteria. Only applicable to buckets with hierarchical namespace enabled.", +"httpMethod": "GET", +"id": "storage.folders.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which to look for folders.", +"location": "path", +"required": true, +"type": "string" +}, +"delimiter": { +"description": "Returns results in a directory-like mode. The only supported value is '/'. If set, items will only contain folders that either exactly match the prefix, or are one level below the prefix.", +"location": "query", +"type": "string" +}, +"endOffset": { +"description": "Filter results to folders whose names are lexicographically before endOffset. If startOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of items to return in a single page of responses.", +"format": "int32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"prefix": { +"description": "Filter results to folders whose paths begin with this prefix. If set, the value must either be an empty string or end with a '/'.", +"location": "query", +"type": "string" +}, +"startOffset": { +"description": "Filter results to folders whose names are lexicographically equal to or after startOffset. If endOffset is also set, the folders listed will have names between startOffset (inclusive) and endOffset (exclusive).", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/folders", +"response": { +"$ref": "Folders" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"rename": { +"description": "Renames a source folder to a destination folder. Only applicable to buckets with hierarchical namespace enabled.", +"httpMethod": "POST", +"id": "storage.folders.rename", +"parameterOrder": [ +"bucket", +"sourceFolder", +"destinationFolder" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the folders are in.", +"location": "path", +"required": true, +"type": "string" +}, +"destinationFolder": { +"description": "Name of the destination folder.", +"location": "path", +"required": true, +"type": "string" +}, +"ifSourceMetagenerationMatch": { +"description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"sourceFolder": { +"description": "Name of the source folder.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/folders/{sourceFolder}/renameTo/folders/{destinationFolder}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +}, +"managedFolders": { +"methods": { +"delete": { +"description": "Permanently deletes a managed folder.", +"httpMethod": "DELETE", +"id": "storage.managedFolders.delete", +"parameterOrder": [ +"bucket", +"managedFolder" +], +"parameters": { +"allowNonEmpty": { +"description": "Allows the deletion of a managed folder even if it is not empty. A managed folder is empty if there are no objects or managed folders that it applies to. Callers must have storage.managedFolders.setIamPolicy permission.", +"location": "query", +"type": "boolean" +}, +"bucket": { +"description": "Name of the bucket containing the managed folder.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "If set, only deletes the managed folder if its metageneration matches this value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "If set, only deletes the managed folder if its metageneration does not match this value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"managedFolder": { +"description": "The managed folder name/path.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/managedFolders/{managedFolder}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Returns metadata of the specified managed folder.", +"httpMethod": "GET", +"id": "storage.managedFolders.get", +"parameterOrder": [ +"bucket", +"managedFolder" +], +"parameters": { +"bucket": { +"description": "Name of the bucket containing the managed folder.", +"location": "path", +"required": true, +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the return of the managed folder metadata conditional on whether the managed folder's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"managedFolder": { +"description": "The managed folder name/path.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/managedFolders/{managedFolder}", +"response": { +"$ref": "ManagedFolder" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"getIamPolicy": { +"description": "Returns an IAM policy for the specified managed folder.", +"httpMethod": "GET", +"id": "storage.managedFolders.getIamPolicy", +"parameterOrder": [ +"bucket", +"managedFolder" +], +"parameters": { +"bucket": { +"description": "Name of the bucket containing the managed folder.", +"location": "path", +"required": true, +"type": "string" +}, +"managedFolder": { +"description": "The managed folder name/path.", +"location": "path", +"required": true, +"type": "string" +}, +"optionsRequestedPolicyVersion": { +"description": "The IAM policy format version to be returned. If the optionsRequestedPolicyVersion is for an older version that doesn't support part of the requested IAM policy, the request fails.", +"format": "int32", +"location": "query", +"minimum": "1", +"type": "integer" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/managedFolders/{managedFolder}/iam", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"insert": { +"description": "Creates a new managed folder.", +"httpMethod": "POST", +"id": "storage.managedFolders.insert", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket containing the managed folder.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/managedFolders", +"request": { +"$ref": "ManagedFolder" +}, +"response": { +"$ref": "ManagedFolder" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"description": "Lists managed folders in the given bucket.", +"httpMethod": "GET", +"id": "storage.managedFolders.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket containing the managed folder.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "Maximum number of items to return in a single page of responses.", +"format": "int32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"prefix": { +"description": "The managed folder name/path prefix to filter the output list of results.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/managedFolders", +"response": { +"$ref": "ManagedFolders" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"setIamPolicy": { +"description": "Updates an IAM policy for the specified managed folder.", +"httpMethod": "PUT", +"id": "storage.managedFolders.setIamPolicy", +"parameterOrder": [ +"bucket", +"managedFolder" +], +"parameters": { +"bucket": { +"description": "Name of the bucket containing the managed folder.", +"location": "path", +"required": true, +"type": "string" +}, +"managedFolder": { +"description": "The managed folder name/path.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/managedFolders/{managedFolder}/iam", +"request": { +"$ref": "Policy" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"testIamPermissions": { +"description": "Tests a set of permissions on the given managed folder to see which, if any, are held by the caller.", +"httpMethod": "GET", +"id": "storage.managedFolders.testIamPermissions", +"parameterOrder": [ +"bucket", +"managedFolder", +"permissions" +], +"parameters": { +"bucket": { +"description": "Name of the bucket containing the managed folder.", +"location": "path", +"required": true, +"type": "string" +}, +"managedFolder": { +"description": "The managed folder name/path.", +"location": "path", +"required": true, +"type": "string" +}, +"permissions": { +"description": "Permissions to test.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/managedFolders/{managedFolder}/iam/testPermissions", +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +}, +"notifications": { +"methods": { +"delete": { +"description": "Permanently deletes a notification subscription.", +"httpMethod": "DELETE", +"id": "storage.notifications.delete", +"parameterOrder": [ +"bucket", +"notification" +], +"parameters": { +"bucket": { +"description": "The parent bucket of the notification.", +"location": "path", +"required": true, +"type": "string" +}, +"notification": { +"description": "ID of the notification to delete.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/notificationConfigs/{notification}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "View a notification configuration.", +"httpMethod": "GET", +"id": "storage.notifications.get", +"parameterOrder": [ +"bucket", +"notification" +], +"parameters": { +"bucket": { +"description": "The parent bucket of the notification.", +"location": "path", +"required": true, +"type": "string" +}, +"notification": { +"description": "Notification ID", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/notificationConfigs/{notification}", +"response": { +"$ref": "Notification" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"insert": { +"description": "Creates a notification subscription for a given bucket.", +"httpMethod": "POST", +"id": "storage.notifications.insert", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "The parent bucket of the notification.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/notificationConfigs", +"request": { +"$ref": "Notification" +}, +"response": { +"$ref": "Notification" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"description": "Retrieves a list of notification subscriptions for a given bucket.", +"httpMethod": "GET", +"id": "storage.notifications.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of a Google Cloud Storage bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/notificationConfigs", +"response": { +"$ref": "Notifications" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +}, +"objectAccessControls": { +"methods": { +"delete": { +"description": "Permanently deletes the ACL entry for the specified entity on the specified object.", +"httpMethod": "DELETE", +"id": "storage.objectAccessControls.delete", +"parameterOrder": [ +"bucket", +"object", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/acl/{entity}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"get": { +"description": "Returns the ACL entry for the specified entity on the specified object.", +"httpMethod": "GET", +"id": "storage.objectAccessControls.get", +"parameterOrder": [ +"bucket", +"object", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/acl/{entity}", +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"insert": { +"description": "Creates a new ACL entry on the specified object.", +"httpMethod": "POST", +"id": "storage.objectAccessControls.insert", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/acl", +"request": { +"$ref": "ObjectAccessControl" +}, +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"list": { +"description": "Retrieves ACL entries on the specified object.", +"httpMethod": "GET", +"id": "storage.objectAccessControls.list", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/acl", +"response": { +"$ref": "ObjectAccessControls" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"patch": { +"description": "Patches an ACL entry on the specified object.", +"httpMethod": "PATCH", +"id": "storage.objectAccessControls.patch", +"parameterOrder": [ +"bucket", +"object", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/acl/{entity}", +"request": { +"$ref": "ObjectAccessControl" +}, +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"update": { +"description": "Updates an ACL entry on the specified object.", +"httpMethod": "PUT", +"id": "storage.objectAccessControls.update", +"parameterOrder": [ +"bucket", +"object", +"entity" +], +"parameters": { +"bucket": { +"description": "Name of a bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"entity": { +"description": "The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, group-emailAddress, allUsers, or allAuthenticatedUsers.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/acl/{entity}", +"request": { +"$ref": "ObjectAccessControl" +}, +"response": { +"$ref": "ObjectAccessControl" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"objects": { +"methods": { +"bulkRestore": { +"description": "Initiates a long-running bulk restore operation on the specified bucket.", +"httpMethod": "POST", +"id": "storage.objects.bulkRestore", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/o/bulkRestore", +"request": { +"$ref": "BulkRestoreObjectsRequest" +}, +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"compose": { +"description": "Concatenates a list of existing objects into a new object in the same bucket.", +"httpMethod": "POST", +"id": "storage.objects.compose", +"parameterOrder": [ +"destinationBucket", +"destinationObject" +], +"parameters": { +"destinationBucket": { +"description": "Name of the bucket containing the source objects. The destination object is stored in this bucket.", +"location": "path", +"required": true, +"type": "string" +}, +"destinationObject": { +"description": "Name of the new object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"destinationPredefinedAcl": { +"description": "Apply a predefined set of access controls to the destination object.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"kmsKeyName": { +"description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{destinationBucket}/o/{destinationObject}/compose", +"request": { +"$ref": "ComposeRequest" +}, +"response": { +"$ref": "Object" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"copy": { +"description": "Copies a source object to a destination object. Optionally overrides metadata.", +"httpMethod": "POST", +"id": "storage.objects.copy", +"parameterOrder": [ +"sourceBucket", +"sourceObject", +"destinationBucket", +"destinationObject" +], +"parameters": { +"destinationBucket": { +"description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"destinationKmsKeyName": { +"description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", +"location": "query", +"type": "string" +}, +"destinationObject": { +"description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any.", +"location": "path", +"required": true, +"type": "string" +}, +"destinationPredefinedAcl": { +"description": "Apply a predefined set of access controls to the destination object.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the destination object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether the destination object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceGenerationMatch": { +"description": "Makes the operation conditional on whether the source object's current generation matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceGenerationNotMatch": { +"description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceMetagenerationMatch": { +"description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"sourceBucket": { +"description": "Name of the bucket in which to find the source object.", +"location": "path", +"required": true, +"type": "string" +}, +"sourceGeneration": { +"description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"sourceObject": { +"description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{sourceBucket}/o/{sourceObject}/copyTo/b/{destinationBucket}/o/{destinationObject}", +"request": { +"$ref": "Object" +}, +"response": { +"$ref": "Object" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"delete": { +"description": "Deletes an object and its metadata. Deletions are permanent if versioning is not enabled for the bucket, or if the generation parameter is used.", +"httpMethod": "DELETE", +"id": "storage.objects.delete", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, permanently deletes a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Retrieves an object or its metadata.", +"httpMethod": "GET", +"id": "storage.objects.get", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"softDeleted": { +"description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", +"location": "query", +"type": "boolean" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}", +"response": { +"$ref": "Object" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +], +"supportsMediaDownload": true, +"useMediaDownloadService": true +}, +"getIamPolicy": { +"description": "Returns an IAM policy for the specified object.", +"httpMethod": "GET", +"id": "storage.objects.getIamPolicy", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/iam", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"insert": { +"description": "Stores a new object and metadata.", +"httpMethod": "POST", +"id": "storage.objects.insert", +"mediaUpload": { +"accept": [ +"*/*" +], +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/storage/v1/b/{bucket}/o" +}, +"simple": { +"multipart": true, +"path": "/upload/storage/v1/b/{bucket}/o" +} +} +}, +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", +"location": "path", +"required": true, +"type": "string" +}, +"contentEncoding": { +"description": "If set, sets the contentEncoding property of the final object to this value. Setting this parameter is equivalent to setting the contentEncoding metadata property. This can be useful when uploading an object with uploadType=media to indicate the encoding of the content being uploaded.", +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"kmsKeyName": { +"description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Name of the object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "query", +"type": "string" +}, +"predefinedAcl": { +"description": "Apply a predefined set of access controls to this object.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o", +"request": { +"$ref": "Object" +}, +"response": { +"$ref": "Object" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +], +"supportsMediaUpload": true +}, +"list": { +"description": "Retrieves a list of objects matching the criteria.", +"httpMethod": "GET", +"id": "storage.objects.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which to look for objects.", +"location": "path", +"required": true, +"type": "string" +}, +"delimiter": { +"description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.", +"location": "query", +"type": "string" +}, +"endOffset": { +"description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", +"location": "query", +"type": "string" +}, +"includeFoldersAsPrefixes": { +"description": "Only applicable if delimiter is set to '/'. If true, will also include folders and managed folders (besides objects) in the returned prefixes.", +"location": "query", +"type": "boolean" +}, +"includeTrailingDelimiter": { +"description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", +"location": "query", +"type": "boolean" +}, +"matchGlob": { +"description": "Filter results to objects and prefixes that match this glob pattern.", +"location": "query", +"type": "string" +}, +"maxResults": { +"default": "1000", +"description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", +"format": "uint32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"prefix": { +"description": "Filter results to objects whose names begin with this prefix.", +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"softDeleted": { +"description": "If true, only soft-deleted object versions will be listed. The default is false. For more information, see Soft Delete.", +"location": "query", +"type": "boolean" +}, +"startOffset": { +"description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +}, +"versions": { +"description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", +"location": "query", +"type": "boolean" +} +}, +"path": "b/{bucket}/o", +"response": { +"$ref": "Objects" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +], +"supportsSubscription": true +}, +"patch": { +"description": "Patches an object's metadata.", +"httpMethod": "PATCH", +"id": "storage.objects.patch", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"overrideUnlockedRetention": { +"description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", +"location": "query", +"type": "boolean" +}, +"predefinedAcl": { +"description": "Apply a predefined set of access controls to this object.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request, for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}", +"request": { +"$ref": "Object" +}, +"response": { +"$ref": "Object" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"restore": { +"description": "Restores a soft-deleted object.", +"httpMethod": "POST", +"id": "storage.objects.restore", +"parameterOrder": [ +"bucket", +"object", +"generation" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"copySourceAcl": { +"description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.", +"location": "query", +"type": "boolean" +}, +"generation": { +"description": "Selects a specific revision of this object.", +"format": "int64", +"location": "query", +"required": true, +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's one live generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether none of the object's live generations match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the object's one live metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether none of the object's live metagenerations match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see Encoding URI Path Parts.", +"location": "path", +"required": true, +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/restore", +"response": { +"$ref": "Object" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"rewrite": { +"description": "Rewrites a source object to a destination object. Optionally overrides metadata.", +"httpMethod": "POST", +"id": "storage.objects.rewrite", +"parameterOrder": [ +"sourceBucket", +"sourceObject", +"destinationBucket", +"destinationObject" +], +"parameters": { +"destinationBucket": { +"description": "Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket value, if any.", +"location": "path", +"required": true, +"type": "string" +}, +"destinationKmsKeyName": { +"description": "Resource name of the Cloud KMS key, of the form projects/my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will be used to encrypt the object. Overrides the object metadata's kms_key_name value, if any.", +"location": "query", +"type": "string" +}, +"destinationObject": { +"description": "Name of the new object. Required when the object metadata is not otherwise provided. Overrides the object metadata's name value, if any. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"destinationPredefinedAcl": { +"description": "Apply a predefined set of access controls to the destination object.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the destination object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the destination object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceGenerationMatch": { +"description": "Makes the operation conditional on whether the source object's current generation matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceGenerationNotMatch": { +"description": "Makes the operation conditional on whether the source object's current generation does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceMetagenerationMatch": { +"description": "Makes the operation conditional on whether the source object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifSourceMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the source object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxBytesRewrittenPerCall": { +"description": "The maximum number of bytes that will be rewritten per rewrite request. Most callers shouldn't need to specify this parameter - it is primarily in place to support testing. If specified the value must be an integral multiple of 1 MiB (1048576). Also, this only applies to requests where the source and destination span locations and/or storage classes. Finally, this value must not change across rewrite calls else you'll get an error that the rewriteToken is invalid.", +"format": "int64", +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl, unless the object resource specifies the acl property, when it defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"rewriteToken": { +"description": "Include this field (from the previous rewrite response) on each rewrite request after the first one, until the rewrite response 'done' flag is true. Calls that provide a rewriteToken can omit all other request fields, but if included those fields must match the values provided in the first rewrite request.", +"location": "query", +"type": "string" +}, +"sourceBucket": { +"description": "Name of the bucket in which to find the source object.", +"location": "path", +"required": true, +"type": "string" +}, +"sourceGeneration": { +"description": "If present, selects a specific revision of the source object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"sourceObject": { +"description": "Name of the source object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{sourceBucket}/o/{sourceObject}/rewriteTo/b/{destinationBucket}/o/{destinationObject}", +"request": { +"$ref": "Object" +}, +"response": { +"$ref": "RewriteResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"setIamPolicy": { +"description": "Updates an IAM policy for the specified object.", +"httpMethod": "PUT", +"id": "storage.objects.setIamPolicy", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/iam", +"request": { +"$ref": "Policy" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"testIamPermissions": { +"description": "Tests a set of permissions on the given object to see which, if any, are held by the caller.", +"httpMethod": "GET", +"id": "storage.objects.testIamPermissions", +"parameterOrder": [ +"bucket", +"object", +"permissions" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"permissions": { +"description": "Permissions to test.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}/iam/testPermissions", +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"update": { +"description": "Updates an object's metadata.", +"httpMethod": "PUT", +"id": "storage.objects.update", +"parameterOrder": [ +"bucket", +"object" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which the object resides.", +"location": "path", +"required": true, +"type": "string" +}, +"generation": { +"description": "If present, selects a specific revision of this object (as opposed to the latest version, the default).", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationMatch": { +"description": "Makes the operation conditional on whether the object's current generation matches the given value. Setting to 0 makes the operation succeed only if there are no live versions of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifGenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current generation does not match the given value. If no live object exists, the precondition fails. Setting to 0 makes the operation succeed only if there is a live version of the object.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration matches the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"ifMetagenerationNotMatch": { +"description": "Makes the operation conditional on whether the object's current metageneration does not match the given value.", +"format": "int64", +"location": "query", +"type": "string" +}, +"object": { +"description": "Name of the object. For information about how to URL encode object names to be path safe, see [Encoding URI Path Parts](https://cloud.google.com/storage/docs/request-endpoints#encoding).", +"location": "path", +"required": true, +"type": "string" +}, +"overrideUnlockedRetention": { +"description": "Must be true to remove the retention configuration, reduce its unlocked retention period, or change its mode from unlocked to locked.", +"location": "query", +"type": "boolean" +}, +"predefinedAcl": { +"description": "Apply a predefined set of access controls to this object.", +"enum": [ +"authenticatedRead", +"bucketOwnerFullControl", +"bucketOwnerRead", +"private", +"projectPrivate", +"publicRead" +], +"enumDescriptions": [ +"Object owner gets OWNER access, and allAuthenticatedUsers get READER access.", +"Object owner gets OWNER access, and project team owners get OWNER access.", +"Object owner gets OWNER access, and project team owners get READER access.", +"Object owner gets OWNER access.", +"Object owner gets OWNER access, and project team members get access according to their roles.", +"Object owner gets OWNER access, and allUsers get READER access." +], +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to full.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/o/{object}", +"request": { +"$ref": "Object" +}, +"response": { +"$ref": "Object" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"watchAll": { +"description": "Watch for changes on all objects in a bucket.", +"httpMethod": "POST", +"id": "storage.objects.watchAll", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which to look for objects.", +"location": "path", +"required": true, +"type": "string" +}, +"delimiter": { +"description": "Returns results in a directory-like mode. items will contain only objects whose names, aside from the prefix, do not contain delimiter. Objects whose names, aside from the prefix, contain delimiter will have their name, truncated after the delimiter, returned in prefixes. Duplicate prefixes are omitted.", +"location": "query", +"type": "string" +}, +"endOffset": { +"description": "Filter results to objects whose names are lexicographically before endOffset. If startOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", +"location": "query", +"type": "string" +}, +"includeTrailingDelimiter": { +"description": "If true, objects that end in exactly one instance of delimiter will have their metadata included in items in addition to prefixes.", +"location": "query", +"type": "boolean" +}, +"maxResults": { +"default": "1000", +"description": "Maximum number of items plus prefixes to return in a single page of responses. As duplicate prefixes are omitted, fewer total results may be returned than requested. The service will use this parameter or 1,000 items, whichever is smaller.", +"format": "uint32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"prefix": { +"description": "Filter results to objects whose names begin with this prefix.", +"location": "query", +"type": "string" +}, +"projection": { +"description": "Set of properties to return. Defaults to noAcl.", +"enum": [ +"full", +"noAcl" +], +"enumDescriptions": [ +"Include all properties.", +"Omit the owner, acl property." +], +"location": "query", +"type": "string" +}, +"startOffset": { +"description": "Filter results to objects whose names are lexicographically equal to or after startOffset. If endOffset is also set, the objects listed will have names between startOffset (inclusive) and endOffset (exclusive).", +"location": "query", +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request. Required for Requester Pays buckets.", +"location": "query", +"type": "string" +}, +"versions": { +"description": "If true, lists all versions of an object as distinct results. The default is false. For more information, see Object Versioning.", +"location": "query", +"type": "boolean" +} +}, +"path": "b/{bucket}/o/watch", +"request": { +"$ref": "Channel", +"parameterName": "resource" +}, +"response": { +"$ref": "Channel" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +], +"supportsSubscription": true +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed.", +"httpMethod": "POST", +"id": "storage.buckets.operations.cancel", +"parameterOrder": [ +"bucket", +"operationId" +], +"parameters": { +"bucket": { +"description": "The parent bucket of the operation resource.", +"location": "path", +"required": true, +"type": "string" +}, +"operationId": { +"description": "The ID of the operation resource.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/operations/{operationId}/cancel", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation.", +"httpMethod": "GET", +"id": "storage.buckets.operations.get", +"parameterOrder": [ +"bucket", +"operationId" +], +"parameters": { +"bucket": { +"description": "The parent bucket of the operation resource.", +"location": "path", +"required": true, +"type": "string" +}, +"operationId": { +"description": "The ID of the operation resource.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "b/{bucket}/operations/{operationId}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request.", +"httpMethod": "GET", +"id": "storage.buckets.operations.list", +"parameterOrder": [ +"bucket" +], +"parameters": { +"bucket": { +"description": "Name of the bucket in which to look for operations.", +"location": "path", +"required": true, +"type": "string" +}, +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of items to return in a single page of responses. Fewer total results may be returned than requested. The service uses this parameter or 100 items, whichever is smaller.", +"format": "int32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +} +}, +"path": "b/{bucket}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +}, +"projects": { +"resources": { +"hmacKeys": { +"methods": { +"create": { +"description": "Creates a new HMAC key for the specified service account.", +"httpMethod": "POST", +"id": "storage.projects.hmacKeys.create", +"parameterOrder": [ +"projectId", +"serviceAccountEmail" +], +"parameters": { +"projectId": { +"description": "Project ID owning the service account.", +"location": "path", +"required": true, +"type": "string" +}, +"serviceAccountEmail": { +"description": "Email address of the service account.", +"location": "query", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "projects/{projectId}/hmacKeys", +"response": { +"$ref": "HmacKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +}, +"delete": { +"description": "Deletes an HMAC key.", +"httpMethod": "DELETE", +"id": "storage.projects.hmacKeys.delete", +"parameterOrder": [ +"projectId", +"accessId" +], +"parameters": { +"accessId": { +"description": "Name of the HMAC key to be deleted.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "Project ID owning the requested key", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "projects/{projectId}/hmacKeys/{accessId}", +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_write" +] +}, +"get": { +"description": "Retrieves an HMAC key's metadata", +"httpMethod": "GET", +"id": "storage.projects.hmacKeys.get", +"parameterOrder": [ +"projectId", +"accessId" +], +"parameters": { +"accessId": { +"description": "Name of the HMAC key.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "Project ID owning the service account of the requested key.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "projects/{projectId}/hmacKeys/{accessId}", +"response": { +"$ref": "HmacKeyMetadata" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only" +] +}, +"list": { +"description": "Retrieves a list of HMAC keys matching the criteria.", +"httpMethod": "GET", +"id": "storage.projects.hmacKeys.list", +"parameterOrder": [ +"projectId" +], +"parameters": { +"maxResults": { +"default": "250", +"description": "Maximum number of items to return in a single page of responses. The service uses this parameter or 250 items, whichever is smaller. The max number of items per page will also be limited by the number of distinct service accounts in the response. If the number of service accounts in a single response is too high, the page will truncated and a next page token will be returned.", +"format": "uint32", +"location": "query", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "A previously-returned page token representing part of the larger set of results to view.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "Name of the project in which to look for HMAC keys.", +"location": "path", +"required": true, +"type": "string" +}, +"serviceAccountEmail": { +"description": "If present, only keys for the given service account are returned.", +"location": "query", +"type": "string" +}, +"showDeletedKeys": { +"description": "Whether or not to show keys in the DELETED state.", +"location": "query", +"type": "boolean" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "projects/{projectId}/hmacKeys", +"response": { +"$ref": "HmacKeysMetadata" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only" +] +}, +"update": { +"description": "Updates the state of an HMAC key. See the HMAC Key resource descriptor for valid states.", +"httpMethod": "PUT", +"id": "storage.projects.hmacKeys.update", +"parameterOrder": [ +"projectId", +"accessId" +], +"parameters": { +"accessId": { +"description": "Name of the HMAC key being updated.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "Project ID owning the service account of the updated key.", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "projects/{projectId}/hmacKeys/{accessId}", +"request": { +"$ref": "HmacKeyMetadata" +}, +"response": { +"$ref": "HmacKeyMetadata" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/devstorage.full_control" +] +} +} +}, +"serviceAccount": { +"methods": { +"get": { +"description": "Get the email address of this project's Google Cloud Storage service account.", +"httpMethod": "GET", +"id": "storage.projects.serviceAccount.get", +"parameterOrder": [ +"projectId" +], +"parameters": { +"projectId": { +"description": "Project ID", +"location": "path", +"required": true, +"type": "string" +}, +"userProject": { +"description": "The project to be billed for this request.", +"location": "query", +"type": "string" +} +}, +"path": "projects/{projectId}/serviceAccount", +"response": { +"$ref": "ServiceAccount" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only", +"https://www.googleapis.com/auth/devstorage.full_control", +"https://www.googleapis.com/auth/devstorage.read_only", +"https://www.googleapis.com/auth/devstorage.read_write" +] +} +} +} +} +} +}, +"revision": "20240419", +"rootUrl": "https://storage.googleapis.com/", +"schemas": { +"AnywhereCache": { +"description": "An Anywhere Cache instance.", +"id": "AnywhereCache", +"properties": { +"admissionPolicy": { +"description": "The cache-level entry admission policy.", +"type": "string" +}, +"anywhereCacheId": { +"description": "The ID of the Anywhere cache instance.", +"type": "string" +}, +"bucket": { +"description": "The name of the bucket containing this cache instance.", +"type": "string" +}, +"createTime": { +"description": "The creation time of the cache instance in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"id": { +"description": "The ID of the resource, including the project number, bucket name and anywhere cache ID.", +"type": "string" +}, +"kind": { +"default": "storage#anywhereCache", +"description": "The kind of item this is. For Anywhere Cache, this is always storage#anywhereCache.", +"type": "string" +}, +"pendingUpdate": { +"description": "True if the cache instance has an active Update long-running operation.", +"type": "boolean" +}, +"selfLink": { +"description": "The link to this cache instance.", +"type": "string" +}, +"state": { +"description": "The current state of the cache instance.", +"type": "string" +}, +"ttl": { +"description": "The TTL of all cache entries in whole seconds. e.g., \"7200s\". ", +"format": "google-duration", +"type": "string" +}, +"updateTime": { +"description": "The modification time of the cache instance metadata in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"zone": { +"description": "The zone in which the cache instance is running. For example, us-central1-a.", +"type": "string" +} +}, +"type": "object" +}, +"AnywhereCaches": { +"description": "A list of Anywhere Caches.", +"id": "AnywhereCaches", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "AnywhereCache" +}, +"type": "array" +}, +"kind": { +"default": "storage#anywhereCaches", +"description": "The kind of item this is. For lists of Anywhere Caches, this is always storage#anywhereCaches.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"Bucket": { +"description": "A bucket.", +"id": "Bucket", +"properties": { +"acl": { +"annotations": { +"required": [ +"storage.buckets.update" +] +}, +"description": "Access controls on the bucket.", +"items": { +"$ref": "BucketAccessControl" +}, +"type": "array" +}, +"autoclass": { +"description": "The bucket's Autoclass configuration.", +"properties": { +"enabled": { +"description": "Whether or not Autoclass is enabled on this bucket", +"type": "boolean" +}, +"terminalStorageClass": { +"description": "The storage class that objects in the bucket eventually transition to if they are not read for a certain length of time. Valid values are NEARLINE and ARCHIVE.", +"type": "string" +}, +"terminalStorageClassUpdateTime": { +"description": "A date and time in RFC 3339 format representing the time of the most recent update to \"terminalStorageClass\".", +"format": "date-time", +"type": "string" +}, +"toggleTime": { +"description": "A date and time in RFC 3339 format representing the instant at which \"enabled\" was last toggled.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"billing": { +"description": "The bucket's billing configuration.", +"properties": { +"requesterPays": { +"description": "When set to true, Requester Pays is enabled for this bucket.", +"type": "boolean" +} +}, +"type": "object" +}, +"cors": { +"description": "The bucket's Cross-Origin Resource Sharing (CORS) configuration.", +"items": { +"properties": { +"maxAgeSeconds": { +"description": "The value, in seconds, to return in the Access-Control-Max-Age header used in preflight responses.", +"format": "int32", +"type": "integer" +}, +"method": { +"description": "The list of HTTP methods on which to include CORS response headers, (GET, OPTIONS, POST, etc) Note: \"*\" is permitted in the list of methods, and means \"any method\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"origin": { +"description": "The list of Origins eligible to receive CORS response headers. Note: \"*\" is permitted in the list of origins, and means \"any Origin\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"responseHeader": { +"description": "The list of HTTP headers other than the simple response headers to give permission for the user-agent to share across domains.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"type": "array" +}, +"customPlacementConfig": { +"description": "The bucket's custom placement configuration for Custom Dual Regions.", +"properties": { +"dataLocations": { +"description": "The list of regional locations in which data is placed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"defaultEventBasedHold": { +"description": "The default value for event-based hold on newly created objects in this bucket. Event-based hold is a way to retain objects indefinitely until an event occurs, signified by the hold's release. After being released, such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false. Objects under event-based hold cannot be deleted, overwritten or archived until the hold is removed.", +"type": "boolean" +}, +"defaultObjectAcl": { +"description": "Default access controls to apply to new objects when no ACL is provided.", +"items": { +"$ref": "ObjectAccessControl" +}, +"type": "array" +}, +"encryption": { +"description": "Encryption configuration for a bucket.", +"properties": { +"defaultKmsKeyName": { +"description": "A Cloud KMS key that will be used to encrypt objects inserted into this bucket, if no encryption method is specified.", +"type": "string" +} +}, +"type": "object" +}, +"etag": { +"description": "HTTP 1.1 Entity tag for the bucket.", +"type": "string" +}, +"hierarchicalNamespace": { +"description": "The bucket's hierarchical namespace configuration.", +"properties": { +"enabled": { +"description": "When set to true, hierarchical namespace is enabled for this bucket.", +"type": "boolean" +} +}, +"type": "object" +}, +"iamConfiguration": { +"description": "The bucket's IAM configuration.", +"properties": { +"bucketPolicyOnly": { +"description": "The bucket's uniform bucket-level access configuration. The feature was formerly known as Bucket Policy Only. For backward compatibility, this field will be populated with identical information as the uniformBucketLevelAccess field. We recommend using the uniformBucketLevelAccess field to enable and disable the feature.", +"properties": { +"enabled": { +"description": "If set, access is controlled only by bucket-level or above IAM policies.", +"type": "boolean" +}, +"lockedTime": { +"description": "The deadline for changing iamConfiguration.bucketPolicyOnly.enabled from true to false in RFC 3339 format. iamConfiguration.bucketPolicyOnly.enabled may be changed from true to false until the locked time, after which the field is immutable.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"publicAccessPrevention": { +"description": "The bucket's Public Access Prevention configuration. Currently, 'inherited' and 'enforced' are supported.", +"type": "string" +}, +"uniformBucketLevelAccess": { +"description": "The bucket's uniform bucket-level access configuration.", +"properties": { +"enabled": { +"description": "If set, access is controlled only by bucket-level or above IAM policies.", +"type": "boolean" +}, +"lockedTime": { +"description": "The deadline for changing iamConfiguration.uniformBucketLevelAccess.enabled from true to false in RFC 3339 format. iamConfiguration.uniformBucketLevelAccess.enabled may be changed from true to false until the locked time, after which the field is immutable.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +} +}, +"type": "object" +}, +"id": { +"description": "The ID of the bucket. For buckets, the id and name properties are the same.", +"type": "string" +}, +"kind": { +"default": "storage#bucket", +"description": "The kind of item this is. For buckets, this is always storage#bucket.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"description": "An individual label entry.", +"type": "string" +}, +"description": "User-provided labels, in key/value pairs.", +"type": "object" +}, +"lifecycle": { +"description": "The bucket's lifecycle configuration. See lifecycle management for more information.", +"properties": { +"rule": { +"description": "A lifecycle management rule, which is made of an action to take and the condition(s) under which the action will be taken.", +"items": { +"properties": { +"action": { +"description": "The action to take.", +"properties": { +"storageClass": { +"description": "Target storage class. Required iff the type of the action is SetStorageClass.", +"type": "string" +}, +"type": { +"description": "Type of the action. Currently, only Delete, SetStorageClass, and AbortIncompleteMultipartUpload are supported.", +"type": "string" +} +}, +"type": "object" +}, +"condition": { +"description": "The condition(s) under which the action will be taken.", +"properties": { +"age": { +"description": "Age of an object (in days). This condition is satisfied when an object reaches the specified age.", +"format": "int32", +"type": "integer" +}, +"createdBefore": { +"description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when an object is created before midnight of the specified date in UTC.", +"format": "date", +"type": "string" +}, +"customTimeBefore": { +"description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the custom time on an object is before this date in UTC.", +"format": "date", +"type": "string" +}, +"daysSinceCustomTime": { +"description": "Number of days elapsed since the user-specified timestamp set on an object. The condition is satisfied if the days elapsed is at least this number. If no custom timestamp is specified on an object, the condition does not apply.", +"format": "int32", +"type": "integer" +}, +"daysSinceNoncurrentTime": { +"description": "Number of days elapsed since the noncurrent timestamp of an object. The condition is satisfied if the days elapsed is at least this number. This condition is relevant only for versioned objects. The value of the field must be a nonnegative integer. If it's zero, the object version will become eligible for Lifecycle action as soon as it becomes noncurrent.", +"format": "int32", +"type": "integer" +}, +"isLive": { +"description": "Relevant only for versioned objects. If the value is true, this condition matches live objects; if the value is false, it matches archived objects.", +"type": "boolean" +}, +"matchesPattern": { +"description": "A regular expression that satisfies the RE2 syntax. This condition is satisfied when the name of the object matches the RE2 pattern. Note: This feature is currently in the \"Early Access\" launch stage and is only available to a whitelisted set of users; that means that this feature may be changed in backward-incompatible ways and that it is not guaranteed to be released.", +"type": "string" +}, +"matchesPrefix": { +"description": "List of object name prefixes. This condition will be satisfied when at least one of the prefixes exactly matches the beginning of the object name.", +"items": { +"type": "string" +}, +"type": "array" +}, +"matchesStorageClass": { +"description": "Objects having any of the storage classes specified by this condition will be matched. Values include MULTI_REGIONAL, REGIONAL, NEARLINE, COLDLINE, ARCHIVE, STANDARD, and DURABLE_REDUCED_AVAILABILITY.", +"items": { +"type": "string" +}, +"type": "array" +}, +"matchesSuffix": { +"description": "List of object name suffixes. This condition will be satisfied when at least one of the suffixes exactly matches the end of the object name.", +"items": { +"type": "string" +}, +"type": "array" +}, +"noncurrentTimeBefore": { +"description": "A date in RFC 3339 format with only the date part (for instance, \"2013-01-15\"). This condition is satisfied when the noncurrent time on an object is before this date in UTC. This condition is relevant only for versioned objects.", +"format": "date", +"type": "string" +}, +"numNewerVersions": { +"description": "Relevant only for versioned objects. If the value is N, this condition is satisfied when there are at least N versions (including the live version) newer than this version of the object.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +} +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"location": { +"description": "The location of the bucket. Object data for objects in the bucket resides in physical storage within this region. Defaults to US. See the developer's guide for the authoritative list.", +"type": "string" +}, +"locationType": { +"description": "The type of the bucket location.", +"type": "string" +}, +"logging": { +"description": "The bucket's logging configuration, which defines the destination bucket and optional name prefix for the current bucket's logs.", +"properties": { +"logBucket": { +"description": "The destination bucket where the current bucket's logs should be placed.", +"type": "string" +}, +"logObjectPrefix": { +"description": "A prefix for log object names.", +"type": "string" +} +}, +"type": "object" +}, +"metageneration": { +"description": "The metadata generation of this bucket.", +"format": "int64", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"storage.buckets.insert" +] +}, +"description": "The name of the bucket.", +"type": "string" +}, +"objectRetention": { +"description": "The bucket's object retention config.", +"properties": { +"mode": { +"description": "The bucket's object retention mode. Can be Enabled.", +"type": "string" +} +}, +"type": "object" +}, +"owner": { +"description": "The owner of the bucket. This is always the project team's owner group.", +"properties": { +"entity": { +"description": "The entity, in the form project-owner-projectId.", +"type": "string" +}, +"entityId": { +"description": "The ID for the entity.", +"type": "string" +} +}, +"type": "object" +}, +"projectNumber": { +"description": "The project number of the project the bucket belongs to.", +"format": "uint64", +"type": "string" +}, +"retentionPolicy": { +"description": "The bucket's retention policy. The retention policy enforces a minimum retention time for all objects contained in the bucket, based on their creation time. Any attempt to overwrite or delete objects younger than the retention period will result in a PERMISSION_DENIED error. An unlocked retention policy can be modified or removed from the bucket via a storage.buckets.update operation. A locked retention policy cannot be removed or shortened in duration for the lifetime of the bucket. Attempting to remove or decrease period of a locked retention policy will result in a PERMISSION_DENIED error.", +"properties": { +"effectiveTime": { +"description": "Server-determined value that indicates the time from which policy was enforced and effective. This value is in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"isLocked": { +"description": "Once locked, an object retention policy cannot be modified.", +"type": "boolean" +}, +"retentionPeriod": { +"description": "The duration in seconds that objects need to be retained. Retention duration must be greater than zero and less than 100 years. Note that enforcement of retention periods less than a day is not guaranteed. Such periods should only be used for testing purposes.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"rpo": { +"description": "The Recovery Point Objective (RPO) of this bucket. Set to ASYNC_TURBO to turn on Turbo Replication on a bucket.", +"type": "string" +}, +"satisfiesPZS": { +"description": "Reserved for future use.", +"type": "boolean" +}, +"selfLink": { +"description": "The URI of this bucket.", +"type": "string" +}, +"softDeletePolicy": { +"description": "The bucket's soft delete policy, which defines the period of time that soft-deleted objects will be retained, and cannot be permanently deleted.", +"properties": { +"effectiveTime": { +"description": "Server-determined value that indicates the time from which the policy, or one with a greater retention, was effective. This value is in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"retentionDurationSeconds": { +"description": "The duration in seconds that soft-deleted objects in the bucket will be retained and cannot be permanently deleted.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"storageClass": { +"description": "The bucket's default storage class, used whenever no storageClass is specified for a newly-created object. This defines how objects in the bucket are stored and determines the SLA and the cost of storage. Values include MULTI_REGIONAL, REGIONAL, STANDARD, NEARLINE, COLDLINE, ARCHIVE, and DURABLE_REDUCED_AVAILABILITY. If this value is not specified when the bucket is created, it will default to STANDARD. For more information, see storage classes.", +"type": "string" +}, +"timeCreated": { +"description": "The creation time of the bucket in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"updated": { +"description": "The modification time of the bucket in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"versioning": { +"description": "The bucket's versioning configuration.", +"properties": { +"enabled": { +"description": "While set to true, versioning is fully enabled for this bucket.", +"type": "boolean" +} +}, +"type": "object" +}, +"website": { +"description": "The bucket's website configuration, controlling how the service behaves when accessing bucket contents as a web site. See the Static Website Examples for more information.", +"properties": { +"mainPageSuffix": { +"description": "If the requested object path is missing, the service will ensure the path has a trailing '/', append this suffix, and attempt to retrieve the resulting object. This allows the creation of index.html objects to represent directory pages.", +"type": "string" +}, +"notFoundPage": { +"description": "If the requested object path is missing, and any mainPageSuffix object is missing, if applicable, the service will return the named object from this bucket as the content for a 404 Not Found result.", +"type": "string" +} +}, +"type": "object" +} +}, +"type": "object" +}, +"BucketAccessControl": { +"description": "An access-control entry.", +"id": "BucketAccessControl", +"properties": { +"bucket": { +"description": "The name of the bucket.", +"type": "string" +}, +"domain": { +"description": "The domain associated with the entity, if any.", +"type": "string" +}, +"email": { +"description": "The email address associated with the entity, if any.", +"type": "string" +}, +"entity": { +"annotations": { +"required": [ +"storage.bucketAccessControls.insert" +] +}, +"description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", +"type": "string" +}, +"entityId": { +"description": "The ID for the entity, if any.", +"type": "string" +}, +"etag": { +"description": "HTTP 1.1 Entity tag for the access-control entry.", +"type": "string" +}, +"id": { +"description": "The ID of the access-control entry.", +"type": "string" +}, +"kind": { +"default": "storage#bucketAccessControl", +"description": "The kind of item this is. For bucket access control entries, this is always storage#bucketAccessControl.", +"type": "string" +}, +"projectTeam": { +"description": "The project team associated with the entity, if any.", +"properties": { +"projectNumber": { +"description": "The project number.", +"type": "string" +}, +"team": { +"description": "The team.", +"type": "string" +} +}, +"type": "object" +}, +"role": { +"annotations": { +"required": [ +"storage.bucketAccessControls.insert" +] +}, +"description": "The access permission for the entity.", +"type": "string" +}, +"selfLink": { +"description": "The link to this access-control entry.", +"type": "string" +} +}, +"type": "object" +}, +"BucketAccessControls": { +"description": "An access-control list.", +"id": "BucketAccessControls", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "BucketAccessControl" +}, +"type": "array" +}, +"kind": { +"default": "storage#bucketAccessControls", +"description": "The kind of item this is. For lists of bucket access control entries, this is always storage#bucketAccessControls.", +"type": "string" +} +}, +"type": "object" +}, +"Buckets": { +"description": "A list of buckets.", +"id": "Buckets", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "Bucket" +}, +"type": "array" +}, +"kind": { +"default": "storage#buckets", +"description": "The kind of item this is. For lists of buckets, this is always storage#buckets.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"BulkRestoreObjectsRequest": { +"description": "A bulk restore objects request.", +"id": "BulkRestoreObjectsRequest", +"properties": { +"allowOverwrite": { +"description": "If false (default), the restore will not overwrite live objects with the same name at the destination. This means some deleted objects may be skipped. If true, live objects will be overwritten resulting in a noncurrent object (if versioning is enabled). If versioning is not enabled, overwriting the object will result in a soft-deleted object. In either case, if a noncurrent object already exists with the same name, a live version can be written without issue.", +"type": "boolean" +}, +"copySourceAcl": { +"description": "If true, copies the source object's ACL; otherwise, uses the bucket's default object ACL. The default is false.", +"type": "boolean" +}, +"matchGlobs": { +"description": "Restores only the objects matching any of the specified glob(s). If this parameter is not specified, all objects will be restored within the specified time range.", +"items": { +"type": "string" +}, +"type": "array" +}, +"softDeletedAfterTime": { +"description": "Restores only the objects that were soft-deleted after this time.", +"format": "date-time", +"type": "string" +}, +"softDeletedBeforeTime": { +"description": "Restores only the objects that were soft-deleted before this time.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"Channel": { +"description": "An notification channel used to watch for resource changes.", +"id": "Channel", +"properties": { +"address": { +"description": "The address where notifications are delivered for this channel.", +"type": "string" +}, +"expiration": { +"description": "Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.", +"format": "int64", +"type": "string" +}, +"id": { +"description": "A UUID or similar unique string that identifies this channel.", +"type": "string" +}, +"kind": { +"default": "api#channel", +"description": "Identifies this as a notification channel used to watch for changes to a resource, which is \"api#channel\".", +"type": "string" +}, +"params": { +"additionalProperties": { +"description": "Declares a new parameter by name.", +"type": "string" +}, +"description": "Additional parameters controlling delivery channel behavior. Optional.", +"type": "object" +}, +"payload": { +"description": "A Boolean value to indicate whether payload is wanted. Optional.", +"type": "boolean" +}, +"resourceId": { +"description": "An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.", +"type": "string" +}, +"resourceUri": { +"description": "A version-specific identifier for the watched resource.", +"type": "string" +}, +"token": { +"description": "An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.", +"type": "string" +}, +"type": { +"description": "The type of delivery mechanism used for this channel.", +"type": "string" +} +}, +"type": "object" +}, +"ComposeRequest": { +"description": "A Compose request.", +"id": "ComposeRequest", +"properties": { +"destination": { +"$ref": "Object", +"description": "Properties of the resulting object." +}, +"kind": { +"default": "storage#composeRequest", +"description": "The kind of item this is.", +"type": "string" +}, +"sourceObjects": { +"annotations": { +"required": [ +"storage.objects.compose" +] +}, +"description": "The list of source objects that will be concatenated into a single object.", +"items": { +"properties": { +"generation": { +"description": "The generation of this object to use as the source.", +"format": "int64", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"storage.objects.compose" +] +}, +"description": "The source object's name. All source objects must reside in the same bucket.", +"type": "string" +}, +"objectPreconditions": { +"description": "Conditions that must be met for this operation to execute.", +"properties": { +"ifGenerationMatch": { +"description": "Only perform the composition if the generation of the source object that would be used matches this value. If this value and a generation are both specified, they must be the same value or the call will fail.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"Expr": { +"description": "Represents an expression text. Example: title: \"User account presence\" description: \"Determines whether the request has a user account\" expression: \"size(request.user) > 0\"", +"id": "Expr", +"properties": { +"description": { +"description": "An optional description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax. The application context of the containing message determines which well-known feature set of CEL is supported.", +"type": "string" +}, +"location": { +"description": "An optional string indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "An optional title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"Folder": { +"description": "A folder. Only available in buckets with hierarchical namespace enabled.", +"id": "Folder", +"properties": { +"bucket": { +"description": "The name of the bucket containing this folder.", +"type": "string" +}, +"createTime": { +"description": "The creation time of the folder in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"id": { +"description": "The ID of the folder, including the bucket name, folder name.", +"type": "string" +}, +"kind": { +"default": "storage#folder", +"description": "The kind of item this is. For folders, this is always storage#folder.", +"type": "string" +}, +"metageneration": { +"description": "The version of the metadata for this folder. Used for preconditions and for detecting changes in metadata.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The name of the folder. Required if not specified by URL parameter.", +"type": "string" +}, +"pendingRenameInfo": { +"description": "Only present if the folder is part of an ongoing rename folder operation. Contains information which can be used to query the operation status.", +"properties": { +"operationId": { +"description": "The ID of the rename folder operation.", +"type": "string" +} +}, +"type": "object" +}, +"selfLink": { +"description": "The link to this folder.", +"type": "string" +}, +"updateTime": { +"description": "The modification time of the folder metadata in RFC 3339 format.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"Folders": { +"description": "A list of folders.", +"id": "Folders", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "Folder" +}, +"type": "array" +}, +"kind": { +"default": "storage#folders", +"description": "The kind of item this is. For lists of folders, this is always storage#folders.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for storage.buckets.operations.list.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is \"false\", it means the operation is still in progress. If \"true\", the operation is completed, and either \"error\" or \"response\" is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the \"name\" should be a resource name ending with \"operations/{operationId}\".", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal response of the operation in case of success. If the original method returns no data on success, such as \"Delete\", the response is google.protobuf.Empty. If the original method is standard Get/Create/Update, the response should be the resource. For other methods, the response should have the type \"XxxResponse\", where \"Xxx\" is the original method name. For example, if the original method name is \"TakeSnapshot()\", the inferred response type is \"TakeSnapshotResponse\".", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English.", +"type": "string" +} +}, +"type": "object" +}, +"HmacKey": { +"description": "JSON template to produce a JSON-style HMAC Key resource for Create responses.", +"id": "HmacKey", +"properties": { +"kind": { +"default": "storage#hmacKey", +"description": "The kind of item this is. For HMAC keys, this is always storage#hmacKey.", +"type": "string" +}, +"metadata": { +"$ref": "HmacKeyMetadata", +"description": "Key metadata." +}, +"secret": { +"description": "HMAC secret key material.", +"type": "string" +} +}, +"type": "object" +}, +"HmacKeyMetadata": { +"description": "JSON template to produce a JSON-style HMAC Key metadata resource.", +"id": "HmacKeyMetadata", +"properties": { +"accessId": { +"description": "The ID of the HMAC Key.", +"type": "string" +}, +"etag": { +"description": "HTTP 1.1 Entity tag for the HMAC key.", +"type": "string" +}, +"id": { +"description": "The ID of the HMAC key, including the Project ID and the Access ID.", +"type": "string" +}, +"kind": { +"default": "storage#hmacKeyMetadata", +"description": "The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.", +"type": "string" +}, +"projectId": { +"description": "Project ID owning the service account to which the key authenticates.", +"type": "string" +}, +"selfLink": { +"description": "The link to this resource.", +"type": "string" +}, +"serviceAccountEmail": { +"description": "The email address of the key's associated service account.", +"type": "string" +}, +"state": { +"description": "The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED.", +"type": "string" +}, +"timeCreated": { +"description": "The creation time of the HMAC key in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"updated": { +"description": "The last modification time of the HMAC key metadata in RFC 3339 format.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"HmacKeysMetadata": { +"description": "A list of hmacKeys.", +"id": "HmacKeysMetadata", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "HmacKeyMetadata" +}, +"type": "array" +}, +"kind": { +"default": "storage#hmacKeysMetadata", +"description": "The kind of item this is. For lists of hmacKeys, this is always storage#hmacKeysMetadata.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ManagedFolder": { +"description": "A managed folder.", +"id": "ManagedFolder", +"properties": { +"bucket": { +"description": "The name of the bucket containing this managed folder.", +"type": "string" +}, +"createTime": { +"description": "The creation time of the managed folder in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"id": { +"description": "The ID of the managed folder, including the bucket name and managed folder name.", +"type": "string" +}, +"kind": { +"default": "storage#managedFolder", +"description": "The kind of item this is. For managed folders, this is always storage#managedFolder.", +"type": "string" +}, +"metageneration": { +"description": "The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The name of the managed folder. Required if not specified by URL parameter.", +"type": "string" +}, +"selfLink": { +"description": "The link to this managed folder.", +"type": "string" +}, +"updateTime": { +"description": "The last update time of the managed folder metadata in RFC 3339 format.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"ManagedFolders": { +"description": "A list of managed folders.", +"id": "ManagedFolders", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "ManagedFolder" +}, +"type": "array" +}, +"kind": { +"default": "storage#managedFolders", +"description": "The kind of item this is. For lists of managed folders, this is always storage#managedFolders.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"Notification": { +"description": "A subscription to receive Google PubSub notifications.", +"id": "Notification", +"properties": { +"custom_attributes": { +"additionalProperties": { +"type": "string" +}, +"description": "An optional list of additional attributes to attach to each Cloud PubSub message published for this notification subscription.", +"type": "object" +}, +"etag": { +"description": "HTTP 1.1 Entity tag for this subscription notification.", +"type": "string" +}, +"event_types": { +"description": "If present, only send notifications about listed event types. If empty, sent notifications for all event types.", +"items": { +"type": "string" +}, +"type": "array" +}, +"id": { +"description": "The ID of the notification.", +"type": "string" +}, +"kind": { +"default": "storage#notification", +"description": "The kind of item this is. For notifications, this is always storage#notification.", +"type": "string" +}, +"object_name_prefix": { +"description": "If present, only apply this notification configuration to object names that begin with this prefix.", +"type": "string" +}, +"payload_format": { +"annotations": { +"required": [ +"storage.notifications.insert" +] +}, +"default": "JSON_API_V1", +"description": "The desired content of the Payload.", +"type": "string" +}, +"selfLink": { +"description": "The canonical URL of this notification.", +"type": "string" +}, +"topic": { +"annotations": { +"required": [ +"storage.notifications.insert" +] +}, +"description": "The Cloud PubSub topic to which this subscription publishes. Formatted as: '//pubsub.googleapis.com/projects/{project-identifier}/topics/{my-topic}'", +"type": "string" +} +}, +"type": "object" +}, +"Notifications": { +"description": "A list of notification subscriptions.", +"id": "Notifications", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "Notification" +}, +"type": "array" +}, +"kind": { +"default": "storage#notifications", +"description": "The kind of item this is. For lists of notifications, this is always storage#notifications.", +"type": "string" +} +}, +"type": "object" +}, +"Object": { +"description": "An object.", +"id": "Object", +"properties": { +"acl": { +"annotations": { +"required": [ +"storage.objects.update" +] +}, +"description": "Access controls on the object.", +"items": { +"$ref": "ObjectAccessControl" +}, +"type": "array" +}, +"bucket": { +"description": "The name of the bucket containing this object.", +"type": "string" +}, +"cacheControl": { +"description": "Cache-Control directive for the object data. If omitted, and the object is accessible to all anonymous users, the default will be public, max-age=3600.", +"type": "string" +}, +"componentCount": { +"description": "Number of underlying components that make up this object. Components are accumulated by compose operations.", +"format": "int32", +"type": "integer" +}, +"contentDisposition": { +"description": "Content-Disposition of the object data.", +"type": "string" +}, +"contentEncoding": { +"description": "Content-Encoding of the object data.", +"type": "string" +}, +"contentLanguage": { +"description": "Content-Language of the object data.", +"type": "string" +}, +"contentType": { +"description": "Content-Type of the object data. If an object is stored without a Content-Type, it is served as application/octet-stream.", +"type": "string" +}, +"crc32c": { +"description": "CRC32c checksum, as described in RFC 4960, Appendix B; encoded using base64 in big-endian byte order. For more information about using the CRC32c checksum, see Hashes and ETags: Best Practices.", +"type": "string" +}, +"customTime": { +"description": "A timestamp in RFC 3339 format specified by the user for an object.", +"format": "date-time", +"type": "string" +}, +"customerEncryption": { +"description": "Metadata of customer-supplied encryption key, if the object is encrypted by such a key.", +"properties": { +"encryptionAlgorithm": { +"description": "The encryption algorithm.", +"type": "string" +}, +"keySha256": { +"description": "SHA256 hash value of the encryption key.", +"type": "string" +} +}, +"type": "object" +}, +"etag": { +"description": "HTTP 1.1 Entity tag for the object.", +"type": "string" +}, +"eventBasedHold": { +"description": "Whether an object is under event-based hold. Event-based hold is a way to retain objects until an event occurs, which is signified by the hold's release (i.e. this value is set to false). After being released (set to false), such objects will be subject to bucket-level retention (if any). One sample use case of this flag is for banks to hold loan documents for at least 3 years after loan is paid in full. Here, bucket-level retention is 3 years and the event is the loan being paid in full. In this example, these objects will be held intact for any number of years until the event has occurred (event-based hold on the object is released) and then 3 more years after that. That means retention duration of the objects begins from the moment event-based hold transitioned from true to false.", +"type": "boolean" +}, +"generation": { +"description": "The content generation of this object. Used for object versioning.", +"format": "int64", +"type": "string" +}, +"hardDeleteTime": { +"description": "This is the time (in the future) when the soft-deleted object will no longer be restorable. It is equal to the soft delete time plus the current soft delete retention duration of the bucket.", +"format": "date-time", +"type": "string" +}, +"id": { +"description": "The ID of the object, including the bucket name, object name, and generation number.", +"type": "string" +}, +"kind": { +"default": "storage#object", +"description": "The kind of item this is. For objects, this is always storage#object.", +"type": "string" +}, +"kmsKeyName": { +"description": "Not currently supported. Specifying the parameter causes the request to fail with status code 400 - Bad Request.", +"type": "string" +}, +"md5Hash": { +"description": "MD5 hash of the data; encoded using base64. For more information about using the MD5 hash, see Hashes and ETags: Best Practices.", +"type": "string" +}, +"mediaLink": { +"description": "Media download link.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "An individual metadata entry.", +"type": "string" +}, +"description": "User-provided metadata, in key/value pairs.", +"type": "object" +}, +"metageneration": { +"description": "The version of the metadata for this object at this generation. Used for preconditions and for detecting changes in metadata. A metageneration number is only meaningful in the context of a particular generation of a particular object.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The name of the object. Required if not specified by URL parameter.", +"type": "string" +}, +"owner": { +"description": "The owner of the object. This will always be the uploader of the object.", +"properties": { +"entity": { +"description": "The entity, in the form user-userId.", +"type": "string" +}, +"entityId": { +"description": "The ID for the entity.", +"type": "string" +} +}, +"type": "object" +}, +"retention": { +"description": "A collection of object level retention parameters.", +"properties": { +"mode": { +"description": "The bucket's object retention mode, can only be Unlocked or Locked.", +"type": "string" +}, +"retainUntilTime": { +"description": "A time in RFC 3339 format until which object retention protects this object.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"retentionExpirationTime": { +"description": "A server-determined value that specifies the earliest time that the object's retention period expires. This value is in RFC 3339 format. Note 1: This field is not provided for objects with an active event-based hold, since retention expiration is unknown until the hold is removed. Note 2: This value can be provided even when temporary hold is set (so that the user can reason about policy without having to first unset the temporary hold).", +"format": "date-time", +"type": "string" +}, +"selfLink": { +"description": "The link to this object.", +"type": "string" +}, +"size": { +"description": "Content-Length of the data in bytes.", +"format": "uint64", +"type": "string" +}, +"softDeleteTime": { +"description": "The time at which the object became soft-deleted in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"storageClass": { +"description": "Storage class of the object.", +"type": "string" +}, +"temporaryHold": { +"description": "Whether an object is under temporary hold. While this flag is set to true, the object is protected against deletion and overwrites. A common use case of this flag is regulatory investigations where objects need to be retained while the investigation is ongoing. Note that unlike event-based hold, temporary hold does not impact retention expiration time of an object.", +"type": "boolean" +}, +"timeCreated": { +"description": "The creation time of the object in RFC 3339 format.", +"format": "date-time", +"type": "string" +}, +"timeDeleted": { +"description": "The time at which the object became noncurrent in RFC 3339 format. Will be returned if and only if this version of the object has been deleted.", +"format": "date-time", +"type": "string" +}, +"timeStorageClassUpdated": { +"description": "The time at which the object's storage class was last changed. When the object is initially created, it will be set to timeCreated.", +"format": "date-time", +"type": "string" +}, +"updated": { +"description": "The modification time of the object metadata in RFC 3339 format. Set initially to object creation time and then updated whenever any metadata of the object changes. This includes changes made by a requester, such as modifying custom metadata, as well as changes made by Cloud Storage on behalf of a requester, such as changing the storage class based on an Object Lifecycle Configuration.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"ObjectAccessControl": { +"description": "An access-control entry.", +"id": "ObjectAccessControl", +"properties": { +"bucket": { +"description": "The name of the bucket.", +"type": "string" +}, +"domain": { +"description": "The domain associated with the entity, if any.", +"type": "string" +}, +"email": { +"description": "The email address associated with the entity, if any.", +"type": "string" +}, +"entity": { +"annotations": { +"required": [ +"storage.defaultObjectAccessControls.insert", +"storage.objectAccessControls.insert" +] +}, +"description": "The entity holding the permission, in one of the following forms: \n- user-userId \n- user-email \n- group-groupId \n- group-email \n- domain-domain \n- project-team-projectId \n- allUsers \n- allAuthenticatedUsers Examples: \n- The user liz@example.com would be user-liz@example.com. \n- The group example@googlegroups.com would be group-example@googlegroups.com. \n- To refer to all members of the Google Apps for Business domain example.com, the entity would be domain-example.com.", +"type": "string" +}, +"entityId": { +"description": "The ID for the entity, if any.", +"type": "string" +}, +"etag": { +"description": "HTTP 1.1 Entity tag for the access-control entry.", +"type": "string" +}, +"generation": { +"description": "The content generation of the object, if applied to an object.", +"format": "int64", +"type": "string" +}, +"id": { +"description": "The ID of the access-control entry.", +"type": "string" +}, +"kind": { +"default": "storage#objectAccessControl", +"description": "The kind of item this is. For object access control entries, this is always storage#objectAccessControl.", +"type": "string" +}, +"object": { +"description": "The name of the object, if applied to an object.", +"type": "string" +}, +"projectTeam": { +"description": "The project team associated with the entity, if any.", +"properties": { +"projectNumber": { +"description": "The project number.", +"type": "string" +}, +"team": { +"description": "The team.", +"type": "string" +} +}, +"type": "object" +}, +"role": { +"annotations": { +"required": [ +"storage.defaultObjectAccessControls.insert", +"storage.objectAccessControls.insert" +] +}, +"description": "The access permission for the entity.", +"type": "string" +}, +"selfLink": { +"description": "The link to this access-control entry.", +"type": "string" +} +}, +"type": "object" +}, +"ObjectAccessControls": { +"description": "An access-control list.", +"id": "ObjectAccessControls", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "ObjectAccessControl" +}, +"type": "array" +}, +"kind": { +"default": "storage#objectAccessControls", +"description": "The kind of item this is. For lists of object access control entries, this is always storage#objectAccessControls.", +"type": "string" +} +}, +"type": "object" +}, +"Objects": { +"description": "A list of objects.", +"id": "Objects", +"properties": { +"items": { +"description": "The list of items.", +"items": { +"$ref": "Object" +}, +"type": "array" +}, +"kind": { +"default": "storage#objects", +"description": "The kind of item this is. For lists of objects, this is always storage#objects.", +"type": "string" +}, +"nextPageToken": { +"description": "The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results.", +"type": "string" +}, +"prefixes": { +"description": "The list of prefixes of objects matching-but-not-listed up to and including the requested delimiter.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Policy": { +"description": "A bucket/object/managedFolder IAM policy.", +"id": "Policy", +"properties": { +"bindings": { +"annotations": { +"required": [ +"storage.buckets.setIamPolicy", +"storage.objects.setIamPolicy", +"storage.managedFolders.setIamPolicy" +] +}, +"description": "An association between a role, which comes with a set of permissions, and members who may assume that role.", +"items": { +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. NOTE: an unsatisfied condition will not allow user access via current binding. Different bindings, including their conditions, are examined independently." +}, +"members": { +"annotations": { +"required": [ +"storage.buckets.setIamPolicy", +"storage.objects.setIamPolicy", +"storage.managedFolders.setIamPolicy" +] +}, +"description": "A collection of identifiers for members who may assume the provided role. Recognized identifiers are as follows: \n- allUsers \u2014 A special identifier that represents anyone on the internet; with or without a Google account. \n- allAuthenticatedUsers \u2014 A special identifier that represents anyone who is authenticated with a Google account or a service account. \n- user:emailid \u2014 An email address that represents a specific account. For example, user:alice@gmail.com or user:joe@example.com. \n- serviceAccount:emailid \u2014 An email address that represents a service account. For example, serviceAccount:my-other-app@appspot.gserviceaccount.com . \n- group:emailid \u2014 An email address that represents a Google group. For example, group:admins@example.com. \n- domain:domain \u2014 A Google Apps domain name that represents all the users of that domain. For example, domain:google.com or domain:example.com. \n- projectOwner:projectid \u2014 Owners of the given project. For example, projectOwner:my-example-project \n- projectEditor:projectid \u2014 Editors of the given project. For example, projectEditor:my-example-project \n- projectViewer:projectid \u2014 Viewers of the given project. For example, projectViewer:my-example-project", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"annotations": { +"required": [ +"storage.buckets.setIamPolicy", +"storage.objects.setIamPolicy", +"storage.managedFolders.setIamPolicy" +] +}, +"description": "The role to which members belong. Two types of roles are supported: new IAM roles, which grant permissions that do not map directly to those provided by ACLs, and legacy IAM roles, which do map directly to ACL permissions. All roles are of the format roles/storage.specificRole.\nThe new IAM roles are: \n- roles/storage.admin \u2014 Full control of Google Cloud Storage resources. \n- roles/storage.objectViewer \u2014 Read-Only access to Google Cloud Storage objects. \n- roles/storage.objectCreator \u2014 Access to create objects in Google Cloud Storage. \n- roles/storage.objectAdmin \u2014 Full control of Google Cloud Storage objects. The legacy IAM roles are: \n- roles/storage.legacyObjectReader \u2014 Read-only access to objects without listing. Equivalent to an ACL entry on an object with the READER role. \n- roles/storage.legacyObjectOwner \u2014 Read/write access to existing objects without listing. Equivalent to an ACL entry on an object with the OWNER role. \n- roles/storage.legacyBucketReader \u2014 Read access to buckets with object listing. Equivalent to an ACL entry on a bucket with the READER role. \n- roles/storage.legacyBucketWriter \u2014 Read access to buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the WRITER role. \n- roles/storage.legacyBucketOwner \u2014 Read and write access to existing buckets with object listing/creation/deletion. Equivalent to an ACL entry on a bucket with the OWNER role.", +"type": "string" +} +}, +"type": "object" +}, +"type": "array" +}, +"etag": { +"description": "HTTP 1.1 Entity tag for the policy.", +"format": "byte", +"type": "string" +}, +"kind": { +"default": "storage#policy", +"description": "The kind of item this is. For policies, this is always storage#policy. This field is ignored on input.", +"type": "string" +}, +"resourceId": { +"description": "The ID of the resource to which this policy belongs. Will be of the form projects/_/buckets/bucket for buckets, projects/_/buckets/bucket/objects/object for objects, and projects/_/buckets/bucket/managedFolders/managedFolder. A specific generation may be specified by appending #generationNumber to the end of the object name, e.g. projects/_/buckets/my-bucket/objects/data.txt#17. The current generation can be denoted with #0. This field is ignored on input.", +"type": "string" +}, +"version": { +"description": "The IAM policy format version.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"RewriteResponse": { +"description": "A rewrite response.", +"id": "RewriteResponse", +"properties": { +"done": { +"description": "true if the copy is finished; otherwise, false if the copy is in progress. This property is always present in the response.", +"type": "boolean" +}, +"kind": { +"default": "storage#rewriteResponse", +"description": "The kind of item this is.", +"type": "string" +}, +"objectSize": { +"description": "The total size of the object being copied in bytes. This property is always present in the response.", +"format": "int64", +"type": "string" +}, +"resource": { +"$ref": "Object", +"description": "A resource containing the metadata for the copied-to object. This property is present in the response only when copying completes." +}, +"rewriteToken": { +"description": "A token to use in subsequent requests to continue copying data. This token is present in the response only when there is more data to copy.", +"type": "string" +}, +"totalBytesRewritten": { +"description": "The total bytes written so far, which can be used to provide a waiting user with a progress indicator. This property is always present in the response.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ServiceAccount": { +"description": "A subscription to receive Google PubSub notifications.", +"id": "ServiceAccount", +"properties": { +"email_address": { +"description": "The ID of the notification.", +"type": "string" +}, +"kind": { +"default": "storage#serviceAccount", +"description": "The kind of item this is. For notifications, this is always storage#notification.", +"type": "string" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "A storage.(buckets|objects|managedFolders).testIamPermissions response.", +"id": "TestIamPermissionsResponse", +"properties": { +"kind": { +"default": "storage#testIamPermissionsResponse", +"description": "The kind of item this is.", +"type": "string" +}, +"permissions": { +"description": "The permissions held by the caller. Permissions are always of the format storage.resource.capability, where resource is one of buckets, objects, or managedFolders. The supported permissions are as follows: \n- storage.buckets.delete \u2014 Delete bucket. \n- storage.buckets.get \u2014 Read bucket metadata. \n- storage.buckets.getIamPolicy \u2014 Read bucket IAM policy. \n- storage.buckets.create \u2014 Create bucket. \n- storage.buckets.list \u2014 List buckets. \n- storage.buckets.setIamPolicy \u2014 Update bucket IAM policy. \n- storage.buckets.update \u2014 Update bucket metadata. \n- storage.objects.delete \u2014 Delete object. \n- storage.objects.get \u2014 Read object data and metadata. \n- storage.objects.getIamPolicy \u2014 Read object IAM policy. \n- storage.objects.create \u2014 Create object. \n- storage.objects.list \u2014 List objects. \n- storage.objects.setIamPolicy \u2014 Update object IAM policy. \n- storage.objects.update \u2014 Update object metadata. \n- storage.managedFolders.delete \u2014 Delete managed folder. \n- storage.managedFolders.get \u2014 Read managed folder metadata. \n- storage.managedFolders.getIamPolicy \u2014 Read managed folder IAM policy. \n- storage.managedFolders.create \u2014 Create managed folder. \n- storage.managedFolders.list \u2014 List managed folders. \n- storage.managedFolders.setIamPolicy \u2014 Update managed folder IAM policy.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "storage/v1/", +"title": "Cloud Storage JSON API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/storagetransfer.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/storagetransfer.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..1137b12c0f78584f40718b9bfd33ac2e196a578e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/storagetransfer.v1.json @@ -0,0 +1,1962 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://storagetransfer.googleapis.com/", +"batchPath": "batch", +"description": "Transfers data from external data sources to a Google Cloud Storage bucket or between Google Cloud Storage buckets. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/storage-transfer/docs", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "storagetransfer:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://storagetransfer.mtls.googleapis.com/", +"name": "storagetransfer", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"googleServiceAccounts": { +"methods": { +"get": { +"description": "Returns the Google service account that is used by Storage Transfer Service to access buckets in the project where transfers run or in other projects. Each Google service account is associated with one Google Cloud project. Users should add this service account to the Google Cloud Storage bucket ACLs to grant access to Storage Transfer Service. This service account is created and owned by Storage Transfer Service and can only be used by Storage Transfer Service.", +"flatPath": "v1/googleServiceAccounts/{projectId}", +"httpMethod": "GET", +"id": "storagetransfer.googleServiceAccounts.get", +"parameterOrder": [ +"projectId" +], +"parameters": { +"projectId": { +"description": "Required. The ID of the Google Cloud project that the Google service account is associated with.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/googleServiceAccounts/{projectId}", +"response": { +"$ref": "GoogleServiceAccount" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"projects": { +"resources": { +"agentPools": { +"methods": { +"create": { +"description": "Creates an agent pool resource.", +"flatPath": "v1/projects/{projectsId}/agentPools", +"httpMethod": "POST", +"id": "storagetransfer.projects.agentPools.create", +"parameterOrder": [ +"projectId" +], +"parameters": { +"agentPoolId": { +"description": "Required. The ID of the agent pool to create. The `agent_pool_id` must meet the following requirements: * Length of 128 characters or less. * Not start with the string `goog`. * Start with a lowercase ASCII character, followed by: * Zero or more: lowercase Latin alphabet characters, numerals, hyphens (`-`), periods (`.`), underscores (`_`), or tildes (`~`). * One or more numerals or lowercase ASCII characters. As expressed by the regular expression: `^(?!goog)[a-z]([a-z0-9-._~]*[a-z0-9])?$`.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "Required. The ID of the Google Cloud project that owns the agent pool.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{+projectId}/agentPools", +"request": { +"$ref": "AgentPool" +}, +"response": { +"$ref": "AgentPool" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an agent pool.", +"flatPath": "v1/projects/{projectsId}/agentPools/{agentPoolsId}", +"httpMethod": "DELETE", +"id": "storagetransfer.projects.agentPools.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the agent pool to delete.", +"location": "path", +"pattern": "^projects/[^/]+/agentPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets an agent pool.", +"flatPath": "v1/projects/{projectsId}/agentPools/{agentPoolsId}", +"httpMethod": "GET", +"id": "storagetransfer.projects.agentPools.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the agent pool to get.", +"location": "path", +"pattern": "^projects/[^/]+/agentPools/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "AgentPool" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists agent pools.", +"flatPath": "v1/projects/{projectsId}/agentPools", +"httpMethod": "GET", +"id": "storagetransfer.projects.agentPools.list", +"parameterOrder": [ +"projectId" +], +"parameters": { +"filter": { +"description": "An optional list of query parameters specified as JSON text in the form of: `{\"agentPoolNames\":[\"agentpool1\",\"agentpool2\",...]}` Since `agentPoolNames` support multiple values, its values must be specified with array notation. When the filter is either empty or not provided, the list returns all agent pools for the project.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The list page size. The max allowed value is `256`.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The list page token.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "Required. The ID of the Google Cloud project that owns the job.", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{+projectId}/agentPools", +"response": { +"$ref": "ListAgentPoolsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing agent pool resource.", +"flatPath": "v1/projects/{projectsId}/agentPools/{agentPoolsId}", +"httpMethod": "PATCH", +"id": "storagetransfer.projects.agentPools.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id}/agentPools/{agent_pool_id}`", +"location": "path", +"pattern": "^projects/[^/]+/agentPools/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The [field mask] (https://developers.google.com/protocol-buffers/docs/reference/google.protobuf) of the fields in `agentPool` to update in this request. The following `agentPool` fields can be updated: * display_name * bandwidth_limit", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "AgentPool" +}, +"response": { +"$ref": "AgentPool" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"transferJobs": { +"methods": { +"create": { +"description": "Creates a transfer job that runs periodically.", +"flatPath": "v1/transferJobs", +"httpMethod": "POST", +"id": "storagetransfer.transferJobs.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/transferJobs", +"request": { +"$ref": "TransferJob" +}, +"response": { +"$ref": "TransferJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a transfer job. Deleting a transfer job sets its status to DELETED.", +"flatPath": "v1/transferJobs/{transferJobsId}", +"httpMethod": "DELETE", +"id": "storagetransfer.transferJobs.delete", +"parameterOrder": [ +"jobName", +"projectId" +], +"parameters": { +"jobName": { +"description": "Required. The job to delete.", +"location": "path", +"pattern": "^transferJobs/.*$", +"required": true, +"type": "string" +}, +"projectId": { +"description": "Required. The ID of the Google Cloud project that owns the job.", +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "v1/{+jobName}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a transfer job.", +"flatPath": "v1/transferJobs/{transferJobsId}", +"httpMethod": "GET", +"id": "storagetransfer.transferJobs.get", +"parameterOrder": [ +"jobName", +"projectId" +], +"parameters": { +"jobName": { +"description": "Required. The job to get.", +"location": "path", +"pattern": "^transferJobs/.*$", +"required": true, +"type": "string" +}, +"projectId": { +"description": "Required. The ID of the Google Cloud project that owns the job.", +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "v1/{+jobName}", +"response": { +"$ref": "TransferJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists transfer jobs.", +"flatPath": "v1/transferJobs", +"httpMethod": "GET", +"id": "storagetransfer.transferJobs.list", +"parameterOrder": [ +"filter" +], +"parameters": { +"filter": { +"description": "Required. A list of query parameters specified as JSON text in the form of: `{\"projectId\":\"my_project_id\", \"jobNames\":[\"jobid1\",\"jobid2\",...], \"jobStatuses\":[\"status1\",\"status2\",...]}` Since `jobNames` and `jobStatuses` support multiple values, their values must be specified with array notation. `projectId` is required. `jobNames` and `jobStatuses` are optional. The valid values for `jobStatuses` are case-insensitive: ENABLED, DISABLED, and DELETED.", +"location": "query", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The list page size. The max allowed value is 256.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/transferJobs", +"response": { +"$ref": "ListTransferJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a transfer job. Updating a job's transfer spec does not affect transfer operations that are running already. **Note:** The job's status field can be modified using this RPC (for example, to set a job's status to DELETED, DISABLED, or ENABLED).", +"flatPath": "v1/transferJobs/{transferJobsId}", +"httpMethod": "PATCH", +"id": "storagetransfer.transferJobs.patch", +"parameterOrder": [ +"jobName" +], +"parameters": { +"jobName": { +"description": "Required. The name of job to update.", +"location": "path", +"pattern": "^transferJobs/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+jobName}", +"request": { +"$ref": "UpdateTransferJobRequest" +}, +"response": { +"$ref": "TransferJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"run": { +"description": "Starts a new operation for the specified transfer job. A `TransferJob` has a maximum of one active `TransferOperation`. If this method is called while a `TransferOperation` is active, an error is returned.", +"flatPath": "v1/transferJobs/{transferJobsId}:run", +"httpMethod": "POST", +"id": "storagetransfer.transferJobs.run", +"parameterOrder": [ +"jobName" +], +"parameters": { +"jobName": { +"description": "Required. The name of the transfer job.", +"location": "path", +"pattern": "^transferJobs/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+jobName}:run", +"request": { +"$ref": "RunTransferJobRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"transferOperations": { +"methods": { +"cancel": { +"description": "Cancels a transfer. Use the transferOperations.get method to check if the cancellation succeeded or if the operation completed despite the `cancel` request. When you cancel an operation, the currently running transfer is interrupted. For recurring transfer jobs, the next instance of the transfer job will still run. For example, if your job is configured to run every day at 1pm and you cancel Monday's operation at 1:05pm, Monday's transfer will stop. However, a transfer job will still be attempted on Tuesday. This applies only to currently running operations. If an operation is not currently running, `cancel` does nothing. *Caution:* Canceling a transfer job can leave your data in an unknown state. We recommend that you restore the state at both the destination and the source after the `cancel` request completes so that your data is in a consistent state. When you cancel a job, the next job computes a delta of files and may repair any inconsistent state. For instance, if you run a job every day, and today's job found 10 new files and transferred five files before you canceled the job, tomorrow's transfer operation will compute a new delta with the five files that were not copied today plus any new files discovered tomorrow.", +"flatPath": "v1/transferOperations/{transferOperationsId}:cancel", +"httpMethod": "POST", +"id": "storagetransfer.transferOperations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^transferOperations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/transferOperations/{transferOperationsId}", +"httpMethod": "GET", +"id": "storagetransfer.transferOperations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^transferOperations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists transfer operations. Operations are ordered by their creation time in reverse chronological order.", +"flatPath": "v1/transferOperations", +"httpMethod": "GET", +"id": "storagetransfer.transferOperations.list", +"parameterOrder": [ +"name", +"filter" +], +"parameters": { +"filter": { +"description": "Required. A list of query parameters specified as JSON text in the form of: `{\"projectId\":\"my_project_id\", \"jobNames\":[\"jobid1\",\"jobid2\",...], \"jobNamePattern\": \"job_name_pattern\", \"operationNames\":[\"opid1\",\"opid2\",...], \"operationNamePattern\": \"operation_name_pattern\", \"minCreationTime\": \"min_creation_time\", \"maxCreationTime\": \"max_creation_time\", \"transferStatuses\":[\"status1\",\"status2\",...]}` Since `jobNames`, `operationNames`, and `transferStatuses` support multiple values, they must be specified with array notation. `projectId` is the only argument that is required. If specified, `jobNamePattern` and `operationNamePattern` must match the full job or operation name respectively. '*' is a wildcard matching 0 or more characters. `minCreationTime` and `maxCreationTime` should be timestamps encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. The valid values for `transferStatuses` are case-insensitive: IN_PROGRESS, PAUSED, SUCCESS, FAILED, and ABORTED.", +"location": "query", +"required": true, +"type": "string" +}, +"name": { +"description": "Required. The name of the type being listed; must be `transferOperations`.", +"location": "path", +"pattern": "^transferOperations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The list page size. The max allowed value is 256.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pause": { +"description": "Pauses a transfer operation.", +"flatPath": "v1/transferOperations/{transferOperationsId}:pause", +"httpMethod": "POST", +"id": "storagetransfer.transferOperations.pause", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the transfer operation.", +"location": "path", +"pattern": "^transferOperations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:pause", +"request": { +"$ref": "PauseTransferOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resume": { +"description": "Resumes a transfer operation that is paused.", +"flatPath": "v1/transferOperations/{transferOperationsId}:resume", +"httpMethod": "POST", +"id": "storagetransfer.transferOperations.resume", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the transfer operation.", +"location": "path", +"pattern": "^transferOperations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:resume", +"request": { +"$ref": "ResumeTransferOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://storagetransfer.googleapis.com/", +"schemas": { +"AgentPool": { +"description": "Represents an agent pool.", +"id": "AgentPool", +"properties": { +"bandwidthLimit": { +"$ref": "BandwidthLimit", +"description": "Specifies the bandwidth limit details. If this field is unspecified, the default value is set as 'No Limit'." +}, +"displayName": { +"description": "Specifies the client-specified AgentPool description.", +"type": "string" +}, +"name": { +"description": "Required. Specifies a unique string that identifies the agent pool. Format: `projects/{project_id}/agentPools/{agent_pool_id}`", +"type": "string" +}, +"state": { +"description": "Output only. Specifies the state of the AgentPool.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"CREATED", +"DELETING" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"This is an initialization state. During this stage, resources are allocated for the AgentPool.", +"Determines that the AgentPool is created for use. At this state, Agents can join the AgentPool and participate in the transfer jobs in that pool.", +"Determines that the AgentPool deletion has been initiated, and all the resources are scheduled to be cleaned up and freed." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AwsAccessKey": { +"description": "AWS access key (see [AWS Security Credentials](https://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html)). For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials).", +"id": "AwsAccessKey", +"properties": { +"accessKeyId": { +"description": "Required. AWS access key ID.", +"type": "string" +}, +"secretAccessKey": { +"description": "Required. AWS secret access key. This field is not returned in RPC responses.", +"type": "string" +} +}, +"type": "object" +}, +"AwsS3CompatibleData": { +"description": "An AwsS3CompatibleData resource.", +"id": "AwsS3CompatibleData", +"properties": { +"bucketName": { +"description": "Required. Specifies the name of the bucket.", +"type": "string" +}, +"endpoint": { +"description": "Required. Specifies the endpoint of the storage service.", +"type": "string" +}, +"path": { +"description": "Specifies the root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.", +"type": "string" +}, +"region": { +"description": "Specifies the region to sign requests with. This can be left blank if requests should be signed with an empty region.", +"type": "string" +}, +"s3Metadata": { +"$ref": "S3CompatibleMetadata", +"description": "A S3 compatible metadata." +} +}, +"type": "object" +}, +"AwsS3Data": { +"description": "An AwsS3Data resource can be a data source, but not a data sink. In an AwsS3Data resource, an object's name is the S3 object's key name.", +"id": "AwsS3Data", +"properties": { +"awsAccessKey": { +"$ref": "AwsAccessKey", +"description": "Input only. AWS access key used to sign the API requests to the AWS S3 bucket. Permissions on the bucket must be granted to the access ID of the AWS access key. For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials)." +}, +"bucketName": { +"description": "Required. S3 Bucket name (see [Creating a bucket](https://docs.aws.amazon.com/AmazonS3/latest/dev/create-bucket-get-location-example.html)).", +"type": "string" +}, +"cloudfrontDomain": { +"description": "Optional. The CloudFront distribution domain name pointing to this bucket, to use when fetching. See [Transfer from S3 via CloudFront](https://cloud.google.com/storage-transfer/docs/s3-cloudfront) for more information. Format: `https://{id}.cloudfront.net` or any valid custom domain. Must begin with `https://`.", +"type": "string" +}, +"credentialsSecret": { +"description": "Optional. The Resource name of a secret in Secret Manager. AWS credentials must be stored in Secret Manager in JSON format: { \"access_key_id\": \"ACCESS_KEY_ID\", \"secret_access_key\": \"SECRET_ACCESS_KEY\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Amazon S3] (https://cloud.google.com/storage-transfer/docs/source-amazon-s3#secret_manager) for more information. If `credentials_secret` is specified, do not specify role_arn or aws_access_key. Format: `projects/{project_number}/secrets/{secret_name}`", +"type": "string" +}, +"path": { +"description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.", +"type": "string" +}, +"roleArn": { +"description": "The Amazon Resource Name (ARN) of the role to support temporary credentials via `AssumeRoleWithWebIdentity`. For more information about ARNs, see [IAM ARNs](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-arns). When a role ARN is provided, Transfer Service fetches temporary credentials for the session using a `AssumeRoleWithWebIdentity` call for the provided role using the GoogleServiceAccount for this project.", +"type": "string" +} +}, +"type": "object" +}, +"AzureBlobStorageData": { +"description": "An AzureBlobStorageData resource can be a data source, but not a data sink. An AzureBlobStorageData resource represents one Azure container. The storage account determines the [Azure endpoint](https://docs.microsoft.com/en-us/azure/storage/common/storage-create-storage-account#storage-account-endpoints). In an AzureBlobStorageData resource, a blobs's name is the [Azure Blob Storage blob's key name](https://docs.microsoft.com/en-us/rest/api/storageservices/naming-and-referencing-containers--blobs--and-metadata#blob-names).", +"id": "AzureBlobStorageData", +"properties": { +"azureCredentials": { +"$ref": "AzureCredentials", +"description": "Required. Input only. Credentials used to authenticate API requests to Azure. For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials)." +}, +"container": { +"description": "Required. The container to transfer from the Azure Storage account.", +"type": "string" +}, +"credentialsSecret": { +"description": "Optional. The Resource name of a secret in Secret Manager. The Azure SAS token must be stored in Secret Manager in JSON format: { \"sas_token\" : \"SAS_TOKEN\" } GoogleServiceAccount must be granted `roles/secretmanager.secretAccessor` for the resource. See [Configure access to a source: Microsoft Azure Blob Storage] (https://cloud.google.com/storage-transfer/docs/source-microsoft-azure#secret_manager) for more information. If `credentials_secret` is specified, do not specify azure_credentials. Format: `projects/{project_number}/secrets/{secret_name}`", +"type": "string" +}, +"path": { +"description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'.", +"type": "string" +}, +"storageAccount": { +"description": "Required. The name of the Azure Storage account.", +"type": "string" +} +}, +"type": "object" +}, +"AzureCredentials": { +"description": "Azure credentials For information on our data retention policy for user credentials, see [User credentials](/storage-transfer/docs/data-retention#user-credentials).", +"id": "AzureCredentials", +"properties": { +"sasToken": { +"description": "Required. Azure shared access signature (SAS). For more information about SAS, see [Grant limited access to Azure Storage resources using shared access signatures (SAS)](https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview).", +"type": "string" +} +}, +"type": "object" +}, +"BandwidthLimit": { +"description": "Specifies a bandwidth limit for an agent pool.", +"id": "BandwidthLimit", +"properties": { +"limitMbps": { +"description": "Bandwidth rate in megabytes per second, distributed across all the agents in the pool.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ErrorLogEntry": { +"description": "An entry describing an error that has occurred.", +"id": "ErrorLogEntry", +"properties": { +"errorDetails": { +"description": "A list of messages that carry the error details.", +"items": { +"type": "string" +}, +"type": "array" +}, +"url": { +"description": "Required. A URL that refers to the target (a data source, a data sink, or an object) with which the error is associated.", +"type": "string" +} +}, +"type": "object" +}, +"ErrorSummary": { +"description": "A summary of errors by error code, plus a count and sample error log entries.", +"id": "ErrorSummary", +"properties": { +"errorCode": { +"description": "Required.", +"enum": [ +"OK", +"CANCELLED", +"UNKNOWN", +"INVALID_ARGUMENT", +"DEADLINE_EXCEEDED", +"NOT_FOUND", +"ALREADY_EXISTS", +"PERMISSION_DENIED", +"UNAUTHENTICATED", +"RESOURCE_EXHAUSTED", +"FAILED_PRECONDITION", +"ABORTED", +"OUT_OF_RANGE", +"UNIMPLEMENTED", +"INTERNAL", +"UNAVAILABLE", +"DATA_LOSS" +], +"enumDescriptions": [ +"Not an error; returned on success. HTTP Mapping: 200 OK", +"The operation was cancelled, typically by the caller. HTTP Mapping: 499 Client Closed Request", +"Unknown error. For example, this error may be returned when a `Status` value received from another address space belongs to an error space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error. HTTP Mapping: 500 Internal Server Error", +"The client specified an invalid argument. Note that this differs from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name). HTTP Mapping: 400 Bad Request", +"The deadline expired before the operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire. HTTP Mapping: 504 Gateway Timeout", +"Some requested entity (e.g., file or directory) was not found. Note to server developers: if a request is denied for an entire class of users, such as gradual feature rollout or undocumented allowlist, `NOT_FOUND` may be used. If a request is denied for some users within a class of users, such as user-based access control, `PERMISSION_DENIED` must be used. HTTP Mapping: 404 Not Found", +"The entity that a client attempted to create (e.g., file or directory) already exists. HTTP Mapping: 409 Conflict", +"The caller does not have permission to execute the specified operation. `PERMISSION_DENIED` must not be used for rejections caused by exhausting some resource (use `RESOURCE_EXHAUSTED` instead for those errors). `PERMISSION_DENIED` must not be used if the caller can not be identified (use `UNAUTHENTICATED` instead for those errors). This error code does not imply the request is valid or the requested entity exists or satisfies other pre-conditions. HTTP Mapping: 403 Forbidden", +"The request does not have valid authentication credentials for the operation. HTTP Mapping: 401 Unauthorized", +"Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space. HTTP Mapping: 429 Too Many Requests", +"The operation was rejected because the system is not in a state required for the operation's execution. For example, the directory to be deleted is non-empty, an rmdir operation is applied to a non-directory, etc. Service implementors can use the following guidelines to decide between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: (a) Use `UNAVAILABLE` if the client can retry just the failing call. (b) Use `ABORTED` if the client should retry at a higher level. For example, when a client-specified test-and-set fails, indicating the client should restart a read-modify-write sequence. (c) Use `FAILED_PRECONDITION` if the client should not retry until the system state has been explicitly fixed. For example, if an \"rmdir\" fails because the directory is non-empty, `FAILED_PRECONDITION` should be returned since the client should not retry unless the files are deleted from the directory. HTTP Mapping: 400 Bad Request", +"The operation was aborted, typically due to a concurrency issue such as a sequencer check failure or transaction abort. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 409 Conflict", +"The operation was attempted past the valid range. E.g., seeking or reading past end-of-file. Unlike `INVALID_ARGUMENT`, this error indicates a problem that may be fixed if the system state changes. For example, a 32-bit file system will generate `INVALID_ARGUMENT` if asked to read at an offset that is not in the range [0,2^32-1], but it will generate `OUT_OF_RANGE` if asked to read from an offset past the current file size. There is a fair bit of overlap between `FAILED_PRECONDITION` and `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific error) when it applies so that callers who are iterating through a space can easily look for an `OUT_OF_RANGE` error to detect when they are done. HTTP Mapping: 400 Bad Request", +"The operation is not implemented or is not supported/enabled in this service. HTTP Mapping: 501 Not Implemented", +"Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for serious errors. HTTP Mapping: 500 Internal Server Error", +"The service is currently unavailable. This is most likely a transient condition, which can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations. See the guidelines above for deciding between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`. HTTP Mapping: 503 Service Unavailable", +"Unrecoverable data loss or corruption. HTTP Mapping: 500 Internal Server Error" +], +"type": "string" +}, +"errorCount": { +"description": "Required. Count of this type of error.", +"format": "int64", +"type": "string" +}, +"errorLogEntries": { +"description": "Error samples. At most 5 error log entries are recorded for a given error code for a single transfer operation.", +"items": { +"$ref": "ErrorLogEntry" +}, +"type": "array" +} +}, +"type": "object" +}, +"EventStream": { +"description": "Specifies the Event-driven transfer options. Event-driven transfers listen to an event stream to transfer updated files.", +"id": "EventStream", +"properties": { +"eventStreamExpirationTime": { +"description": "Specifies the data and time at which Storage Transfer Service stops listening for events from this stream. After this time, any transfers in progress will complete, but no new transfers are initiated.", +"format": "google-datetime", +"type": "string" +}, +"eventStreamStartTime": { +"description": "Specifies the date and time that Storage Transfer Service starts listening for events from this stream. If no start time is specified or start time is in the past, Storage Transfer Service starts listening immediately.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Required. Specifies a unique name of the resource such as AWS SQS ARN in the form 'arn:aws:sqs:region:account_id:queue_name', or Pub/Sub subscription resource name in the form 'projects/{project}/subscriptions/{sub}'.", +"type": "string" +} +}, +"type": "object" +}, +"GcsData": { +"description": "In a GcsData resource, an object's name is the Cloud Storage object's name and its \"last modification time\" refers to the object's `updated` property of Cloud Storage objects, which changes when the content or the metadata of the object is updated.", +"id": "GcsData", +"properties": { +"bucketName": { +"description": "Required. Cloud Storage bucket name. Must meet [Bucket Name Requirements](/storage/docs/naming#requirements).", +"type": "string" +}, +"managedFolderTransferEnabled": { +"description": "Preview. Enables the transfer of managed folders between Cloud Storage buckets. Set this option on the gcs_data_source. If set to true: - Managed folders in the source bucket are transferred to the destination bucket. - Managed folders in the destination bucket are overwritten. Other OVERWRITE options are not supported. See [Transfer Cloud Storage managed folders](/storage-transfer/docs/managed-folders).", +"type": "boolean" +}, +"path": { +"description": "Root path to transfer objects. Must be an empty string or full path name that ends with a '/'. This field is treated as an object prefix. As such, it should generally not begin with a '/'. The root path value must meet [Object Name Requirements](/storage/docs/naming#objectnames).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleServiceAccount": { +"description": "Google service account", +"id": "GoogleServiceAccount", +"properties": { +"accountEmail": { +"description": "Email address of the service account.", +"type": "string" +}, +"subjectId": { +"description": "Unique identifier for the service account.", +"type": "string" +} +}, +"type": "object" +}, +"HdfsData": { +"description": "An HdfsData resource specifies a path within an HDFS entity (e.g. a cluster). All cluster-specific settings, such as namenodes and ports, are configured on the transfer agents servicing requests, so HdfsData only contains the root path to the data in our transfer.", +"id": "HdfsData", +"properties": { +"path": { +"description": "Root path to transfer files.", +"type": "string" +} +}, +"type": "object" +}, +"HttpData": { +"description": "An HttpData resource specifies a list of objects on the web to be transferred over HTTP. The information of the objects to be transferred is contained in a file referenced by a URL. The first line in the file must be `\"TsvHttpData-1.0\"`, which specifies the format of the file. Subsequent lines specify the information of the list of objects, one object per list entry. Each entry has the following tab-delimited fields: * **HTTP URL** \u2014 The location of the object. * **Length** \u2014 The size of the object in bytes. * **MD5** \u2014 The base64-encoded MD5 hash of the object. For an example of a valid TSV file, see [Transferring data from URLs](https://cloud.google.com/storage-transfer/docs/create-url-list). When transferring data based on a URL list, keep the following in mind: * When an object located at `http(s)://hostname:port/` is transferred to a data sink, the name of the object at the data sink is `/`. * If the specified size of an object does not match the actual size of the object fetched, the object is not transferred. * If the specified MD5 does not match the MD5 computed from the transferred bytes, the object transfer fails. * Ensure that each URL you specify is publicly accessible. For example, in Cloud Storage you can [share an object publicly] (/storage/docs/cloud-console#_sharingdata) and get a link to it. * Storage Transfer Service obeys `robots.txt` rules and requires the source HTTP server to support `Range` requests and to return a `Content-Length` header in each response. * ObjectConditions have no effect when filtering objects to transfer.", +"id": "HttpData", +"properties": { +"listUrl": { +"description": "Required. The URL that points to the file that stores the object list entries. This file must allow public access. Currently, only URLs with HTTP and HTTPS schemes are supported.", +"type": "string" +} +}, +"type": "object" +}, +"ListAgentPoolsResponse": { +"description": "Response from ListAgentPools.", +"id": "ListAgentPoolsResponse", +"properties": { +"agentPools": { +"description": "A list of agent pools.", +"items": { +"$ref": "AgentPool" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The list next page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTransferJobsResponse": { +"description": "Response from ListTransferJobs.", +"id": "ListTransferJobsResponse", +"properties": { +"nextPageToken": { +"description": "The list next page token.", +"type": "string" +}, +"transferJobs": { +"description": "A list of transfer jobs.", +"items": { +"$ref": "TransferJob" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoggingConfig": { +"description": "Specifies the logging behavior for transfer operations. For cloud-to-cloud transfers, logs are sent to Cloud Logging. See [Read transfer logs](https://cloud.google.com/storage-transfer/docs/read-transfer-logs) for details. For transfers to or from a POSIX file system, logs are stored in the Cloud Storage bucket that is the source or sink of the transfer. See [Managing Transfer for on-premises jobs] (https://cloud.google.com/storage-transfer/docs/managing-on-prem-jobs#viewing-logs) for details.", +"id": "LoggingConfig", +"properties": { +"enableOnpremGcsTransferLogs": { +"description": "For transfers with a PosixFilesystem source, this option enables the Cloud Storage transfer logs for this transfer.", +"type": "boolean" +}, +"logActionStates": { +"description": "States in which `log_actions` are logged. If empty, no logs are generated. Not supported for transfers with PosixFilesystem data sources; use enable_onprem_gcs_transfer_logs instead.", +"items": { +"enum": [ +"LOGGABLE_ACTION_STATE_UNSPECIFIED", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"`LoggableAction` completed successfully. `SUCCEEDED` actions are logged as INFO.", +"`LoggableAction` terminated in an error state. `FAILED` actions are logged as ERROR." +], +"type": "string" +}, +"type": "array" +}, +"logActions": { +"description": "Specifies the actions to be logged. If empty, no logs are generated. Not supported for transfers with PosixFilesystem data sources; use enable_onprem_gcs_transfer_logs instead.", +"items": { +"enum": [ +"LOGGABLE_ACTION_UNSPECIFIED", +"FIND", +"DELETE", +"COPY" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Listing objects in a bucket.", +"Deleting objects at the source or the destination.", +"Copying objects to Google Cloud Storage." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"MetadataOptions": { +"description": "Specifies the metadata options for running a transfer.", +"id": "MetadataOptions", +"properties": { +"acl": { +"description": "Specifies how each object's ACLs should be preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as ACL_DESTINATION_BUCKET_DEFAULT.", +"enum": [ +"ACL_UNSPECIFIED", +"ACL_DESTINATION_BUCKET_DEFAULT", +"ACL_PRESERVE" +], +"enumDescriptions": [ +"ACL behavior is unspecified.", +"Use the destination bucket's default object ACLS, if applicable.", +"Preserve the object's original ACLs. This requires the service account to have `storage.objects.getIamPolicy` permission for the source object. [Uniform bucket-level access](https://cloud.google.com/storage/docs/uniform-bucket-level-access) must not be enabled on either the source or destination buckets." +], +"type": "string" +}, +"gid": { +"description": "Specifies how each file's POSIX group ID (GID) attribute should be handled by the transfer. By default, GID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", +"enum": [ +"GID_UNSPECIFIED", +"GID_SKIP", +"GID_NUMBER" +], +"enumDescriptions": [ +"GID behavior is unspecified.", +"Do not preserve GID during a transfer job.", +"Preserve GID during a transfer job." +], +"type": "string" +}, +"kmsKey": { +"description": "Specifies how each object's Cloud KMS customer-managed encryption key (CMEK) is preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as KMS_KEY_DESTINATION_BUCKET_DEFAULT.", +"enum": [ +"KMS_KEY_UNSPECIFIED", +"KMS_KEY_DESTINATION_BUCKET_DEFAULT", +"KMS_KEY_PRESERVE" +], +"enumDescriptions": [ +"KmsKey behavior is unspecified.", +"Use the destination bucket's default encryption settings.", +"Preserve the object's original Cloud KMS customer-managed encryption key (CMEK) if present. Objects that do not use a Cloud KMS encryption key will be encrypted using the destination bucket's encryption settings." +], +"type": "string" +}, +"mode": { +"description": "Specifies how each file's mode attribute should be handled by the transfer. By default, mode is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", +"enum": [ +"MODE_UNSPECIFIED", +"MODE_SKIP", +"MODE_PRESERVE" +], +"enumDescriptions": [ +"Mode behavior is unspecified.", +"Do not preserve mode during a transfer job.", +"Preserve mode during a transfer job." +], +"type": "string" +}, +"storageClass": { +"description": "Specifies the storage class to set on objects being transferred to Google Cloud Storage buckets. If unspecified, the default behavior is the same as STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT.", +"enum": [ +"STORAGE_CLASS_UNSPECIFIED", +"STORAGE_CLASS_DESTINATION_BUCKET_DEFAULT", +"STORAGE_CLASS_PRESERVE", +"STORAGE_CLASS_STANDARD", +"STORAGE_CLASS_NEARLINE", +"STORAGE_CLASS_COLDLINE", +"STORAGE_CLASS_ARCHIVE" +], +"enumDescriptions": [ +"Storage class behavior is unspecified.", +"Use the destination bucket's default storage class.", +"Preserve the object's original storage class. This is only supported for transfers from Google Cloud Storage buckets. REGIONAL and MULTI_REGIONAL storage classes will be mapped to STANDARD to ensure they can be written to the destination bucket.", +"Set the storage class to STANDARD.", +"Set the storage class to NEARLINE.", +"Set the storage class to COLDLINE.", +"Set the storage class to ARCHIVE." +], +"type": "string" +}, +"symlink": { +"description": "Specifies how symlinks should be handled by the transfer. By default, symlinks are not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", +"enum": [ +"SYMLINK_UNSPECIFIED", +"SYMLINK_SKIP", +"SYMLINK_PRESERVE" +], +"enumDescriptions": [ +"Symlink behavior is unspecified.", +"Do not preserve symlinks during a transfer job.", +"Preserve symlinks during a transfer job." +], +"type": "string" +}, +"temporaryHold": { +"description": "Specifies how each object's temporary hold status should be preserved for transfers between Google Cloud Storage buckets. If unspecified, the default behavior is the same as TEMPORARY_HOLD_PRESERVE.", +"enum": [ +"TEMPORARY_HOLD_UNSPECIFIED", +"TEMPORARY_HOLD_SKIP", +"TEMPORARY_HOLD_PRESERVE" +], +"enumDescriptions": [ +"Temporary hold behavior is unspecified.", +"Do not set a temporary hold on the destination object.", +"Preserve the object's original temporary hold status." +], +"type": "string" +}, +"timeCreated": { +"description": "Specifies how each object's `timeCreated` metadata is preserved for transfers. If unspecified, the default behavior is the same as TIME_CREATED_SKIP. This behavior is supported for transfers to GCS buckets from GCS, S3, Azure, S3 Compatible, and Azure sources.", +"enum": [ +"TIME_CREATED_UNSPECIFIED", +"TIME_CREATED_SKIP", +"TIME_CREATED_PRESERVE_AS_CUSTOM_TIME" +], +"enumDescriptions": [ +"TimeCreated behavior is unspecified.", +"Do not preserve the `timeCreated` metadata from the source object.", +"Preserves the source object's `timeCreated` or `lastModified` metadata in the `customTime` field in the destination object. Note that any value stored in the source object's `customTime` field will not be propagated to the destination object." +], +"type": "string" +}, +"uid": { +"description": "Specifies how each file's POSIX user ID (UID) attribute should be handled by the transfer. By default, UID is not preserved. Only applicable to transfers involving POSIX file systems, and ignored for other transfers.", +"enum": [ +"UID_UNSPECIFIED", +"UID_SKIP", +"UID_NUMBER" +], +"enumDescriptions": [ +"UID behavior is unspecified.", +"Do not preserve UID during a transfer job.", +"Preserve UID during a transfer job." +], +"type": "string" +} +}, +"type": "object" +}, +"NotificationConfig": { +"description": "Specification to configure notifications published to Pub/Sub. Notifications are published to the customer-provided topic using the following `PubsubMessage.attributes`: * `\"eventType\"`: one of the EventType values * `\"payloadFormat\"`: one of the PayloadFormat values * `\"projectId\"`: the project_id of the `TransferOperation` * `\"transferJobName\"`: the transfer_job_name of the `TransferOperation` * `\"transferOperationName\"`: the name of the `TransferOperation` The `PubsubMessage.data` contains a TransferOperation resource formatted according to the specified `PayloadFormat`.", +"id": "NotificationConfig", +"properties": { +"eventTypes": { +"description": "Event types for which a notification is desired. If empty, send notifications for all event types.", +"items": { +"enum": [ +"EVENT_TYPE_UNSPECIFIED", +"TRANSFER_OPERATION_SUCCESS", +"TRANSFER_OPERATION_FAILED", +"TRANSFER_OPERATION_ABORTED" +], +"enumDescriptions": [ +"Illegal value, to avoid allowing a default.", +"`TransferOperation` completed with status SUCCESS.", +"`TransferOperation` completed with status FAILED.", +"`TransferOperation` completed with status ABORTED." +], +"type": "string" +}, +"type": "array" +}, +"payloadFormat": { +"description": "Required. The desired format of the notification message payloads.", +"enum": [ +"PAYLOAD_FORMAT_UNSPECIFIED", +"NONE", +"JSON" +], +"enumDescriptions": [ +"Illegal value, to avoid allowing a default.", +"No payload is included with the notification.", +"`TransferOperation` is [formatted as a JSON response](https://developers.google.com/protocol-buffers/docs/proto3#json), in application/json." +], +"type": "string" +}, +"pubsubTopic": { +"description": "Required. The `Topic.name` of the Pub/Sub topic to which to publish notifications. Must be of the format: `projects/{project}/topics/{topic}`. Not matching this format results in an INVALID_ARGUMENT error.", +"type": "string" +} +}, +"type": "object" +}, +"ObjectConditions": { +"description": "Conditions that determine which objects are transferred. Applies only to Cloud Data Sources such as S3, Azure, and Cloud Storage. The \"last modification time\" refers to the time of the last change to the object's content or metadata \u2014 specifically, this is the `updated` property of Cloud Storage objects, the `LastModified` field of S3 objects, and the `Last-Modified` header of Azure blobs. Transfers with a PosixFilesystem source or destination don't support `ObjectConditions`.", +"id": "ObjectConditions", +"properties": { +"excludePrefixes": { +"description": "If you specify `exclude_prefixes`, Storage Transfer Service uses the items in the `exclude_prefixes` array to determine which objects to exclude from a transfer. Objects must not start with one of the matching `exclude_prefixes` for inclusion in a transfer. The following are requirements of `exclude_prefixes`: * Each exclude-prefix can contain any sequence of Unicode characters, to a max length of 1024 bytes when UTF8-encoded, and must not contain Carriage Return or Line Feed characters. Wildcard matching and regular expression matching are not supported. * Each exclude-prefix must omit the leading slash. For example, to exclude the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the exclude-prefix as `logs/y=2015/requests.gz`. * None of the exclude-prefix values can be empty, if specified. * Each exclude-prefix must exclude a distinct portion of the object namespace. No exclude-prefix may be a prefix of another exclude-prefix. * If include_prefixes is specified, then each exclude-prefix must start with the value of a path explicitly included by `include_prefixes`. The max size of `exclude_prefixes` is 1000. For more information, see [Filtering objects from transfers](/storage-transfer/docs/filtering-objects-from-transfers).", +"items": { +"type": "string" +}, +"type": "array" +}, +"includePrefixes": { +"description": "If you specify `include_prefixes`, Storage Transfer Service uses the items in the `include_prefixes` array to determine which objects to include in a transfer. Objects must start with one of the matching `include_prefixes` for inclusion in the transfer. If exclude_prefixes is specified, objects must not start with any of the `exclude_prefixes` specified for inclusion in the transfer. The following are requirements of `include_prefixes`: * Each include-prefix can contain any sequence of Unicode characters, to a max length of 1024 bytes when UTF8-encoded, and must not contain Carriage Return or Line Feed characters. Wildcard matching and regular expression matching are not supported. * Each include-prefix must omit the leading slash. For example, to include the object `s3://my-aws-bucket/logs/y=2015/requests.gz`, specify the include-prefix as `logs/y=2015/requests.gz`. * None of the include-prefix values can be empty, if specified. * Each include-prefix must include a distinct portion of the object namespace. No include-prefix may be a prefix of another include-prefix. The max size of `include_prefixes` is 1000. For more information, see [Filtering objects from transfers](/storage-transfer/docs/filtering-objects-from-transfers).", +"items": { +"type": "string" +}, +"type": "array" +}, +"lastModifiedBefore": { +"description": "If specified, only objects with a \"last modification time\" before this timestamp and objects that don't have a \"last modification time\" are transferred.", +"format": "google-datetime", +"type": "string" +}, +"lastModifiedSince": { +"description": "If specified, only objects with a \"last modification time\" on or after this timestamp and objects that don't have a \"last modification time\" are transferred. The `last_modified_since` and `last_modified_before` fields can be used together for chunked data processing. For example, consider a script that processes each day's worth of data at a time. For that you'd set each of the fields as follows: * `last_modified_since` to the start of the day * `last_modified_before` to the end of the day", +"format": "google-datetime", +"type": "string" +}, +"maxTimeElapsedSinceLastModification": { +"description": "Ensures that objects are not transferred if a specific maximum time has elapsed since the \"last modification time\". When a TransferOperation begins, objects with a \"last modification time\" are transferred only if the elapsed time between the start_time of the `TransferOperation`and the \"last modification time\" of the object is less than the value of max_time_elapsed_since_last_modification`. Objects that do not have a \"last modification time\" are also transferred.", +"format": "google-duration", +"type": "string" +}, +"minTimeElapsedSinceLastModification": { +"description": "Ensures that objects are not transferred until a specific minimum time has elapsed after the \"last modification time\". When a TransferOperation begins, objects with a \"last modification time\" are transferred only if the elapsed time between the start_time of the `TransferOperation` and the \"last modification time\" of the object is equal to or greater than the value of min_time_elapsed_since_last_modification`. Objects that do not have a \"last modification time\" are also transferred.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Represents the transfer operation object. To request a TransferOperation object, use transferOperations.get.", +"type": "object" +}, +"name": { +"description": "The server-assigned unique name. The format of `name` is `transferOperations/some/unique/name`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"PauseTransferOperationRequest": { +"description": "Request passed to PauseTransferOperation.", +"id": "PauseTransferOperationRequest", +"properties": {}, +"type": "object" +}, +"PosixFilesystem": { +"description": "A POSIX filesystem resource.", +"id": "PosixFilesystem", +"properties": { +"rootDirectory": { +"description": "Root directory path to the filesystem.", +"type": "string" +} +}, +"type": "object" +}, +"ReplicationSpec": { +"description": "Specifies the configuration for running a replication job.", +"id": "ReplicationSpec", +"properties": { +"gcsDataSink": { +"$ref": "GcsData", +"description": "Specifies cloud Storage data sink." +}, +"gcsDataSource": { +"$ref": "GcsData", +"description": "Specifies cloud Storage data source." +}, +"objectConditions": { +"$ref": "ObjectConditions", +"description": "Specifies the object conditions to only include objects that satisfy these conditions in the set of data source objects. Object conditions based on objects' \"last modification time\" do not exclude objects in a data sink." +}, +"transferOptions": { +"$ref": "TransferOptions", +"description": "Specifies the actions to be performed on the object during replication. Delete options are not supported for replication and when specified, the request fails with an INVALID_ARGUMENT error." +} +}, +"type": "object" +}, +"ResumeTransferOperationRequest": { +"description": "Request passed to ResumeTransferOperation.", +"id": "ResumeTransferOperationRequest", +"properties": {}, +"type": "object" +}, +"RunTransferJobRequest": { +"description": "Request passed to RunTransferJob.", +"id": "RunTransferJobRequest", +"properties": { +"projectId": { +"description": "Required. The ID of the Google Cloud project that owns the transfer job.", +"type": "string" +} +}, +"type": "object" +}, +"S3CompatibleMetadata": { +"description": "S3CompatibleMetadata contains the metadata fields that apply to the basic types of S3-compatible data providers.", +"id": "S3CompatibleMetadata", +"properties": { +"authMethod": { +"description": "Specifies the authentication and authorization method used by the storage service. When not specified, Transfer Service will attempt to determine right auth method to use.", +"enum": [ +"AUTH_METHOD_UNSPECIFIED", +"AUTH_METHOD_AWS_SIGNATURE_V4", +"AUTH_METHOD_AWS_SIGNATURE_V2" +], +"enumDescriptions": [ +"AuthMethod is not specified.", +"Auth requests with AWS SigV4.", +"Auth requests with AWS SigV2." +], +"type": "string" +}, +"listApi": { +"description": "The Listing API to use for discovering objects. When not specified, Transfer Service will attempt to determine the right API to use.", +"enum": [ +"LIST_API_UNSPECIFIED", +"LIST_OBJECTS_V2", +"LIST_OBJECTS" +], +"enumDescriptions": [ +"ListApi is not specified.", +"Perform listing using ListObjectsV2 API.", +"Legacy ListObjects API." +], +"type": "string" +}, +"protocol": { +"description": "Specifies the network protocol of the agent. When not specified, the default value of NetworkProtocol NETWORK_PROTOCOL_HTTPS is used.", +"enum": [ +"NETWORK_PROTOCOL_UNSPECIFIED", +"NETWORK_PROTOCOL_HTTPS", +"NETWORK_PROTOCOL_HTTP" +], +"enumDescriptions": [ +"NetworkProtocol is not specified.", +"Perform requests using HTTPS.", +"Not recommended: This sends data in clear-text. This is only appropriate within a closed network or for publicly available data. Perform requests using HTTP." +], +"type": "string" +}, +"requestModel": { +"description": "Specifies the API request model used to call the storage service. When not specified, the default value of RequestModel REQUEST_MODEL_VIRTUAL_HOSTED_STYLE is used.", +"enum": [ +"REQUEST_MODEL_UNSPECIFIED", +"REQUEST_MODEL_VIRTUAL_HOSTED_STYLE", +"REQUEST_MODEL_PATH_STYLE" +], +"enumDescriptions": [ +"RequestModel is not specified.", +"Perform requests using Virtual Hosted Style. Example: https://bucket-name.s3.region.amazonaws.com/key-name", +"Perform requests using Path Style. Example: https://s3.region.amazonaws.com/bucket-name/key-name" +], +"type": "string" +} +}, +"type": "object" +}, +"Schedule": { +"description": "Transfers can be scheduled to recur or to run just once.", +"id": "Schedule", +"properties": { +"endTimeOfDay": { +"$ref": "TimeOfDay", +"description": "The time in UTC that no further transfer operations are scheduled. Combined with schedule_end_date, `end_time_of_day` specifies the end date and time for starting new transfer operations. This field must be greater than or equal to the timestamp corresponding to the combintation of schedule_start_date and start_time_of_day, and is subject to the following: * If `end_time_of_day` is not set and `schedule_end_date` is set, then a default value of `23:59:59` is used for `end_time_of_day`. * If `end_time_of_day` is set and `schedule_end_date` is not set, then INVALID_ARGUMENT is returned." +}, +"repeatInterval": { +"description": "Interval between the start of each scheduled TransferOperation. If unspecified, the default value is 24 hours. This value may not be less than 1 hour.", +"format": "google-duration", +"type": "string" +}, +"scheduleEndDate": { +"$ref": "Date", +"description": "The last day a transfer runs. Date boundaries are determined relative to UTC time. A job runs once per 24 hours within the following guidelines: * If `schedule_end_date` and schedule_start_date are the same and in the future relative to UTC, the transfer is executed only one time. * If `schedule_end_date` is later than `schedule_start_date` and `schedule_end_date` is in the future relative to UTC, the job runs each day at start_time_of_day through `schedule_end_date`." +}, +"scheduleStartDate": { +"$ref": "Date", +"description": "Required. The start date of a transfer. Date boundaries are determined relative to UTC time. If `schedule_start_date` and start_time_of_day are in the past relative to the job's creation time, the transfer starts the day after you schedule the transfer request. **Note:** When starting jobs at or near midnight UTC it is possible that a job starts later than expected. For example, if you send an outbound request on June 1 one millisecond prior to midnight UTC and the Storage Transfer Service server receives the request on June 2, then it creates a TransferJob with `schedule_start_date` set to June 2 and a `start_time_of_day` set to midnight UTC. The first scheduled TransferOperation takes place on June 3 at midnight UTC." +}, +"startTimeOfDay": { +"$ref": "TimeOfDay", +"description": "The time in UTC that a transfer job is scheduled to run. Transfers may start later than this time. If `start_time_of_day` is not specified: * One-time transfers run immediately. * Recurring transfers run immediately, and each day at midnight UTC, through schedule_end_date. If `start_time_of_day` is specified: * One-time transfers run at the specified time. * Recurring transfers run at the specified time each day, through `schedule_end_date`." +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TimeOfDay": { +"description": "Represents a time of day. The date and time zone are either not significant or are specified elsewhere. An API may choose to allow leap seconds. Related types are google.type.Date and `google.protobuf.Timestamp`.", +"id": "TimeOfDay", +"properties": { +"hours": { +"description": "Hours of day in 24 hour format. Should be from 0 to 23. An API may choose to allow the value \"24:00:00\" for scenarios like business closing time.", +"format": "int32", +"type": "integer" +}, +"minutes": { +"description": "Minutes of hour of day. Must be from 0 to 59.", +"format": "int32", +"type": "integer" +}, +"nanos": { +"description": "Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Seconds of minutes of the time. Must normally be from 0 to 59. An API may allow the value 60 if it allows leap-seconds.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TransferCounters": { +"description": "A collection of counters that report the progress of a transfer operation.", +"id": "TransferCounters", +"properties": { +"bytesCopiedToSink": { +"description": "Bytes that are copied to the data sink.", +"format": "int64", +"type": "string" +}, +"bytesDeletedFromSink": { +"description": "Bytes that are deleted from the data sink.", +"format": "int64", +"type": "string" +}, +"bytesDeletedFromSource": { +"description": "Bytes that are deleted from the data source.", +"format": "int64", +"type": "string" +}, +"bytesFailedToDeleteFromSink": { +"description": "Bytes that failed to be deleted from the data sink.", +"format": "int64", +"type": "string" +}, +"bytesFoundFromSource": { +"description": "Bytes found in the data source that are scheduled to be transferred, excluding any that are filtered based on object conditions or skipped due to sync.", +"format": "int64", +"type": "string" +}, +"bytesFoundOnlyFromSink": { +"description": "Bytes found only in the data sink that are scheduled to be deleted.", +"format": "int64", +"type": "string" +}, +"bytesFromSourceFailed": { +"description": "Bytes in the data source that failed to be transferred or that failed to be deleted after being transferred.", +"format": "int64", +"type": "string" +}, +"bytesFromSourceSkippedBySync": { +"description": "Bytes in the data source that are not transferred because they already exist in the data sink.", +"format": "int64", +"type": "string" +}, +"directoriesFailedToListFromSource": { +"description": "For transfers involving PosixFilesystem only. Number of listing failures for each directory found at the source. Potential failures when listing a directory include permission failure or block failure. If listing a directory fails, no files in the directory are transferred.", +"format": "int64", +"type": "string" +}, +"directoriesFoundFromSource": { +"description": "For transfers involving PosixFilesystem only. Number of directories found while listing. For example, if the root directory of the transfer is `base/` and there are two other directories, `a/` and `b/` under this directory, the count after listing `base/`, `base/a/` and `base/b/` is 3.", +"format": "int64", +"type": "string" +}, +"directoriesSuccessfullyListedFromSource": { +"description": "For transfers involving PosixFilesystem only. Number of successful listings for each directory found at the source.", +"format": "int64", +"type": "string" +}, +"intermediateObjectsCleanedUp": { +"description": "Number of successfully cleaned up intermediate objects.", +"format": "int64", +"type": "string" +}, +"intermediateObjectsFailedCleanedUp": { +"description": "Number of intermediate objects failed cleaned up.", +"format": "int64", +"type": "string" +}, +"objectsCopiedToSink": { +"description": "Objects that are copied to the data sink.", +"format": "int64", +"type": "string" +}, +"objectsDeletedFromSink": { +"description": "Objects that are deleted from the data sink.", +"format": "int64", +"type": "string" +}, +"objectsDeletedFromSource": { +"description": "Objects that are deleted from the data source.", +"format": "int64", +"type": "string" +}, +"objectsFailedToDeleteFromSink": { +"description": "Objects that failed to be deleted from the data sink.", +"format": "int64", +"type": "string" +}, +"objectsFoundFromSource": { +"description": "Objects found in the data source that are scheduled to be transferred, excluding any that are filtered based on object conditions or skipped due to sync.", +"format": "int64", +"type": "string" +}, +"objectsFoundOnlyFromSink": { +"description": "Objects found only in the data sink that are scheduled to be deleted.", +"format": "int64", +"type": "string" +}, +"objectsFromSourceFailed": { +"description": "Objects in the data source that failed to be transferred or that failed to be deleted after being transferred.", +"format": "int64", +"type": "string" +}, +"objectsFromSourceSkippedBySync": { +"description": "Objects in the data source that are not transferred because they already exist in the data sink.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"TransferJob": { +"description": "This resource represents the configuration of a transfer job that runs periodically.", +"id": "TransferJob", +"properties": { +"creationTime": { +"description": "Output only. The time that the transfer job was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deletionTime": { +"description": "Output only. The time that the transfer job was deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "A description provided by the user for the job. Its max length is 1024 bytes when Unicode-encoded.", +"type": "string" +}, +"eventStream": { +"$ref": "EventStream", +"description": "Specifies the event stream for the transfer job for event-driven transfers. When EventStream is specified, the Schedule fields are ignored." +}, +"lastModificationTime": { +"description": "Output only. The time that the transfer job was last modified.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"latestOperationName": { +"description": "The name of the most recently started TransferOperation of this JobConfig. Present if a TransferOperation has been created for this JobConfig.", +"type": "string" +}, +"loggingConfig": { +"$ref": "LoggingConfig", +"description": "Logging configuration." +}, +"name": { +"description": "A unique name (within the transfer project) assigned when the job is created. If this field is empty in a CreateTransferJobRequest, Storage Transfer Service assigns a unique name. Otherwise, the specified name is used as the unique name for this job. If the specified name is in use by a job, the creation request fails with an ALREADY_EXISTS error. This name must start with `\"transferJobs/\"` prefix and end with a letter or a number, and should be no more than 128 characters. For transfers involving PosixFilesystem, this name must start with `transferJobs/OPI` specifically. For all other transfer types, this name must not start with `transferJobs/OPI`. Non-PosixFilesystem example: `\"transferJobs/^(?!OPI)[A-Za-z0-9-._~]*[A-Za-z0-9]$\"` PosixFilesystem example: `\"transferJobs/OPI^[A-Za-z0-9-._~]*[A-Za-z0-9]$\"` Applications must not rely on the enforcement of naming requirements involving OPI. Invalid job names fail with an INVALID_ARGUMENT error.", +"type": "string" +}, +"notificationConfig": { +"$ref": "NotificationConfig", +"description": "Notification configuration." +}, +"projectId": { +"description": "The ID of the Google Cloud project that owns the job.", +"type": "string" +}, +"replicationSpec": { +"$ref": "ReplicationSpec", +"description": "Replication specification." +}, +"schedule": { +"$ref": "Schedule", +"description": "Specifies schedule for the transfer job. This is an optional field. When the field is not set, the job never executes a transfer, unless you invoke RunTransferJob or update the job to have a non-empty schedule." +}, +"status": { +"description": "Status of the job. This value MUST be specified for `CreateTransferJobRequests`. **Note:** The effect of the new job status takes place during a subsequent job run. For example, if you change the job status from ENABLED to DISABLED, and an operation spawned by the transfer is running, the status change would not affect the current operation.", +"enum": [ +"STATUS_UNSPECIFIED", +"ENABLED", +"DISABLED", +"DELETED" +], +"enumDescriptions": [ +"Zero is an illegal value.", +"New transfers are performed based on the schedule.", +"New transfers are not scheduled.", +"This is a soft delete state. After a transfer job is set to this state, the job and all the transfer executions are subject to garbage collection. Transfer jobs become eligible for garbage collection 30 days after their status is set to `DELETED`." +], +"type": "string" +}, +"transferSpec": { +"$ref": "TransferSpec", +"description": "Transfer specification." +} +}, +"type": "object" +}, +"TransferManifest": { +"description": "Specifies where the manifest is located.", +"id": "TransferManifest", +"properties": { +"location": { +"description": "Specifies the path to the manifest in Cloud Storage. The Google-managed service account for the transfer must have `storage.objects.get` permission for this object. An example path is `gs://bucket_name/path/manifest.csv`.", +"type": "string" +} +}, +"type": "object" +}, +"TransferOperation": { +"description": "A description of the execution of a transfer.", +"id": "TransferOperation", +"properties": { +"counters": { +"$ref": "TransferCounters", +"description": "Information about the progress of the transfer operation." +}, +"endTime": { +"description": "End time of this transfer execution.", +"format": "google-datetime", +"type": "string" +}, +"errorBreakdowns": { +"description": "Summarizes errors encountered with sample error log entries.", +"items": { +"$ref": "ErrorSummary" +}, +"type": "array" +}, +"loggingConfig": { +"$ref": "LoggingConfig", +"description": "Cloud Logging configuration." +}, +"name": { +"description": "A globally unique ID assigned by the system.", +"type": "string" +}, +"notificationConfig": { +"$ref": "NotificationConfig", +"description": "Notification configuration." +}, +"projectId": { +"description": "The ID of the Google Cloud project that owns the operation.", +"type": "string" +}, +"startTime": { +"description": "Start time of this transfer execution.", +"format": "google-datetime", +"type": "string" +}, +"status": { +"description": "Status of the transfer operation.", +"enum": [ +"STATUS_UNSPECIFIED", +"IN_PROGRESS", +"PAUSED", +"SUCCESS", +"FAILED", +"ABORTED", +"QUEUED", +"SUSPENDING" +], +"enumDescriptions": [ +"Zero is an illegal value.", +"In progress.", +"Paused.", +"Completed successfully.", +"Terminated due to an unrecoverable failure.", +"Aborted by the user.", +"Temporarily delayed by the system. No user action is required.", +"The operation is suspending and draining the ongoing work to completion." +], +"type": "string" +}, +"transferJobName": { +"description": "The name of the transfer job that triggers this transfer operation.", +"type": "string" +}, +"transferSpec": { +"$ref": "TransferSpec", +"description": "Transfer specification." +} +}, +"type": "object" +}, +"TransferOptions": { +"description": "TransferOptions define the actions to be performed on objects in a transfer.", +"id": "TransferOptions", +"properties": { +"deleteObjectsFromSourceAfterTransfer": { +"description": "Whether objects should be deleted from the source after they are transferred to the sink. **Note:** This option and delete_objects_unique_in_sink are mutually exclusive.", +"type": "boolean" +}, +"deleteObjectsUniqueInSink": { +"description": "Whether objects that exist only in the sink should be deleted. **Note:** This option and delete_objects_from_source_after_transfer are mutually exclusive.", +"type": "boolean" +}, +"metadataOptions": { +"$ref": "MetadataOptions", +"description": "Represents the selected metadata options for a transfer job." +}, +"overwriteObjectsAlreadyExistingInSink": { +"description": "When to overwrite objects that already exist in the sink. The default is that only objects that are different from the source are ovewritten. If true, all objects in the sink whose name matches an object in the source are overwritten with the source object.", +"type": "boolean" +}, +"overwriteWhen": { +"description": "When to overwrite objects that already exist in the sink. If not set, overwrite behavior is determined by overwrite_objects_already_existing_in_sink.", +"enum": [ +"OVERWRITE_WHEN_UNSPECIFIED", +"DIFFERENT", +"NEVER", +"ALWAYS" +], +"enumDescriptions": [ +"Overwrite behavior is unspecified.", +"Overwrites destination objects with the source objects, only if the objects have the same name but different HTTP ETags or checksum values.", +"Never overwrites a destination object if a source object has the same name. In this case, the source object is not transferred.", +"Always overwrite the destination object with the source object, even if the HTTP Etags or checksum values are the same." +], +"type": "string" +} +}, +"type": "object" +}, +"TransferSpec": { +"description": "Configuration for running a transfer.", +"id": "TransferSpec", +"properties": { +"awsS3CompatibleDataSource": { +"$ref": "AwsS3CompatibleData", +"description": "An AWS S3 compatible data source." +}, +"awsS3DataSource": { +"$ref": "AwsS3Data", +"description": "An AWS S3 data source." +}, +"azureBlobStorageDataSource": { +"$ref": "AzureBlobStorageData", +"description": "An Azure Blob Storage data source." +}, +"gcsDataSink": { +"$ref": "GcsData", +"description": "A Cloud Storage data sink." +}, +"gcsDataSource": { +"$ref": "GcsData", +"description": "A Cloud Storage data source." +}, +"gcsIntermediateDataLocation": { +"$ref": "GcsData", +"description": "For transfers between file systems, specifies a Cloud Storage bucket to be used as an intermediate location through which to transfer data. See [Transfer data between file systems](https://cloud.google.com/storage-transfer/docs/file-to-file) for more information." +}, +"hdfsDataSource": { +"$ref": "HdfsData", +"description": "An HDFS cluster data source." +}, +"httpDataSource": { +"$ref": "HttpData", +"description": "An HTTP URL data source." +}, +"objectConditions": { +"$ref": "ObjectConditions", +"description": "Only objects that satisfy these object conditions are included in the set of data source and data sink objects. Object conditions based on objects' \"last modification time\" do not exclude objects in a data sink." +}, +"posixDataSink": { +"$ref": "PosixFilesystem", +"description": "A POSIX Filesystem data sink." +}, +"posixDataSource": { +"$ref": "PosixFilesystem", +"description": "A POSIX Filesystem data source." +}, +"sinkAgentPoolName": { +"description": "Specifies the agent pool name associated with the posix data sink. When unspecified, the default name is used.", +"type": "string" +}, +"sourceAgentPoolName": { +"description": "Specifies the agent pool name associated with the posix data source. When unspecified, the default name is used.", +"type": "string" +}, +"transferManifest": { +"$ref": "TransferManifest", +"description": "A manifest file provides a list of objects to be transferred from the data source. This field points to the location of the manifest file. Otherwise, the entire source bucket is used. ObjectConditions still apply." +}, +"transferOptions": { +"$ref": "TransferOptions", +"description": "If the option delete_objects_unique_in_sink is `true` and time-based object conditions such as 'last modification time' are specified, the request fails with an INVALID_ARGUMENT error." +} +}, +"type": "object" +}, +"UpdateTransferJobRequest": { +"description": "Request passed to UpdateTransferJob.", +"id": "UpdateTransferJobRequest", +"properties": { +"projectId": { +"description": "Required. The ID of the Google Cloud project that owns the job.", +"type": "string" +}, +"transferJob": { +"$ref": "TransferJob", +"description": "Required. The job to update. `transferJob` is expected to specify one or more of five fields: description, transfer_spec, notification_config, logging_config, and status. An `UpdateTransferJobRequest` that specifies other fields are rejected with the error INVALID_ARGUMENT. Updating a job status to DELETED requires `storagetransfer.jobs.delete` permission." +}, +"updateTransferJobFieldMask": { +"description": "The field mask of the fields in `transferJob` that are to be updated in this request. Fields in `transferJob` that can be updated are: description, transfer_spec, notification_config, logging_config, and status. To update the `transfer_spec` of the job, a complete transfer specification must be provided. An incomplete specification missing any required fields is rejected with the error INVALID_ARGUMENT.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Storage Transfer API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/streetviewpublish.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/streetviewpublish.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..f00f2e291c52d720acf4628cb5f3edd692c17145 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/streetviewpublish.v1.json @@ -0,0 +1,1333 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/streetviewpublish": { +"description": "Publish and manage your 360 photos on Google Street View" +} +} +} +}, +"basePath": "", +"baseUrl": "https://streetviewpublish.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Street View Publish", +"description": "Publishes 360 photos to Google Maps, along with position, orientation, and connectivity metadata. Apps can offer an interface for positioning, connecting, and uploading user-generated Street View images. ", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/streetview/publish/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "streetviewpublish:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://streetviewpublish.mtls.googleapis.com/", +"name": "streetviewpublish", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"photo": { +"methods": { +"create": { +"description": "After the client finishes uploading the photo with the returned UploadRef, CreatePhoto publishes the uploaded Photo to Street View on Google Maps. Currently, the only way to set heading, pitch, and roll in CreatePhoto is through the [Photo Sphere XMP metadata](https://developers.google.com/streetview/spherical-metadata) in the photo bytes. CreatePhoto ignores the `pose.heading`, `pose.pitch`, `pose.roll`, `pose.altitude`, and `pose.level` fields in Pose. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed or if the uploaded photo is not a 360 photo. * google.rpc.Code.NOT_FOUND if the upload reference does not exist. * google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the storage limit.", +"flatPath": "v1/photo", +"httpMethod": "POST", +"id": "streetviewpublish.photo.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/photo", +"request": { +"$ref": "Photo" +}, +"response": { +"$ref": "Photo" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"delete": { +"description": "Deletes a Photo and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.NOT_FOUND if the photo ID does not exist.", +"flatPath": "v1/photo/{photoId}", +"httpMethod": "DELETE", +"id": "streetviewpublish.photo.delete", +"parameterOrder": [ +"photoId" +], +"parameters": { +"photoId": { +"description": "Required. ID of the Photo.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/photo/{photoId}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"get": { +"description": "Gets the metadata of the specified Photo. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested Photo. * google.rpc.Code.NOT_FOUND if the requested Photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.", +"flatPath": "v1/photo/{photoId}", +"httpMethod": "GET", +"id": "streetviewpublish.photo.get", +"parameterOrder": [ +"photoId" +], +"parameters": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.", +"location": "query", +"type": "string" +}, +"photoId": { +"description": "Required. ID of the Photo.", +"location": "path", +"required": true, +"type": "string" +}, +"view": { +"description": "Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.", +"enum": [ +"BASIC", +"INCLUDE_DOWNLOAD_URL" +], +"enumDescriptions": [ +"Server responses do not include the download URL for the photo bytes. The default value.", +"Server responses include the download URL for the photo bytes." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/photo/{photoId}", +"response": { +"$ref": "Photo" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"startUpload": { +"description": "Creates an upload session to start uploading photo bytes. The method uses the upload URL of the returned UploadRef to upload the bytes for the Photo. In addition to the photo requirements shown in https://support.google.com/maps/answer/7012050?ref_topic=6275604, the photo must meet the following requirements: * Photo Sphere XMP metadata must be included in the photo metadata. See https://developers.google.com/streetview/spherical-metadata for the required fields. * The pixel size of the photo must meet the size requirements listed in https://support.google.com/maps/answer/7012050?ref_topic=6275604, and the photo must be a full 360 horizontally. After the upload completes, the method uses UploadRef with CreatePhoto to create the Photo object entry.", +"flatPath": "v1/photo:startUpload", +"httpMethod": "POST", +"id": "streetviewpublish.photo.startUpload", +"parameterOrder": [], +"parameters": {}, +"path": "v1/photo:startUpload", +"request": { +"$ref": "Empty" +}, +"response": { +"$ref": "UploadRef" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"update": { +"description": "Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing the pixels of a photo is not supported. Only the fields specified in the updateMask field are used. If `updateMask` is not present, the update applies to all fields. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the requested photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.", +"flatPath": "v1/photo/{id}", +"httpMethod": "PUT", +"id": "streetviewpublish.photo.update", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "A unique identifier for a photo.", +"location": "path", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask that identifies fields on the photo metadata to update. If not present, the old Photo metadata is entirely replaced with the new Photo metadata in this request. The update fails if invalid fields are specified. Multiple fields can be specified in a comma-delimited list. The following fields are valid: * `pose.heading` * `pose.lat_lng_pair` * `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections` * `places` > Note: When updateMask contains repeated fields, the entire set of repeated values get replaced with the new contents. For example, if updateMask contains `connections` and `UpdatePhotoRequest.photo.connections` is empty, all connections are removed.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/photo/{id}", +"request": { +"$ref": "Photo" +}, +"response": { +"$ref": "Photo" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +} +} +}, +"photoSequence": { +"methods": { +"create": { +"description": "After the client finishes uploading the PhotoSequence with the returned UploadRef, CreatePhotoSequence extracts a sequence of 360 photos from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to Street View on Google Maps. `CreatePhotoSequence` returns an Operation, with the PhotoSequence Id set in the `Operation.name` field. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the upload reference does not exist.", +"flatPath": "v1/photoSequence", +"httpMethod": "POST", +"id": "streetviewpublish.photoSequence.create", +"parameterOrder": [], +"parameters": { +"inputType": { +"description": "Required. The input form of PhotoSequence.", +"enum": [ +"INPUT_TYPE_UNSPECIFIED", +"VIDEO", +"XDM" +], +"enumDescriptions": [ +"Not specified. Server will return google.rpc.Code.INVALID_ARGUMENT.", +"360 Video.", +"Extensible Device Metadata, http://www.xdm.org" +], +"location": "query", +"type": "string" +} +}, +"path": "v1/photoSequence", +"request": { +"$ref": "PhotoSequence" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"delete": { +"description": "Deletes a PhotoSequence and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo sequence. * google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. * google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not yet finished processing.", +"flatPath": "v1/photoSequence/{sequenceId}", +"httpMethod": "DELETE", +"id": "streetviewpublish.photoSequence.delete", +"parameterOrder": [ +"sequenceId" +], +"parameters": { +"sequenceId": { +"description": "Required. ID of the PhotoSequence.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/photoSequence/{sequenceId}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"get": { +"description": "Gets the metadata of the specified PhotoSequence via the Operation interface. This method returns the following three types of responses: * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` is poulated, which contains a PhotoSequence message. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested PhotoSequence does not exist.", +"flatPath": "v1/photoSequence/{sequenceId}", +"httpMethod": "GET", +"id": "streetviewpublish.photoSequence.get", +"parameterOrder": [ +"sequenceId" +], +"parameters": { +"filter": { +"description": "Optional. The filter expression. For example: `published_status=PUBLISHED`. The filters supported are: `published_status`. See https://google.aip.dev/160 for more information.", +"location": "query", +"type": "string" +}, +"sequenceId": { +"description": "Required. ID of the photo sequence.", +"location": "path", +"required": true, +"type": "string" +}, +"view": { +"deprecated": true, +"description": "Specifies if a download URL for the photo sequence should be returned in `download_url` of individual photos in the PhotoSequence response. > Note: Currently not implemented.", +"enum": [ +"BASIC", +"INCLUDE_DOWNLOAD_URL" +], +"enumDescriptions": [ +"Server responses do not include the download URL for the photo bytes. The default value.", +"Server responses include the download URL for the photo bytes." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/photoSequence/{sequenceId}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"startUpload": { +"description": "Creates an upload session to start uploading photo sequence data. The upload URL of the returned UploadRef is used to upload the data for the `photoSequence`. After the upload is complete, the UploadRef is used with CreatePhotoSequence to create the PhotoSequence object entry.", +"flatPath": "v1/photoSequence:startUpload", +"httpMethod": "POST", +"id": "streetviewpublish.photoSequence.startUpload", +"parameterOrder": [], +"parameters": {}, +"path": "v1/photoSequence:startUpload", +"request": { +"$ref": "Empty" +}, +"response": { +"$ref": "UploadRef" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +} +} +}, +"photoSequences": { +"methods": { +"list": { +"description": "Lists all the PhotoSequences that belong to the user, in descending CreatePhotoSequence timestamp order.", +"flatPath": "v1/photoSequences", +"httpMethod": "GET", +"id": "streetviewpublish.photoSequences.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "Optional. The filter expression. For example: `imagery_type=SPHERICAL`. The filters supported are: `imagery_type`, `processing_state`, `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`, `filename_query`, `min_capture_time_seconds`, `max_capture_time_seconds. See https://google.aip.dev/160 for more information. Filename queries should sent as a Phrase in order to support multiple words and special characters by adding escaped quotes. Ex: filename_query=\"example of a phrase.mp4\"", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of photo sequences to return. `pageSize` must be non-negative. If `pageSize` is zero or is not provided, the default page size of 100 is used. The number of photo sequences returned in the response may be less than `pageSize` if the number of matches is less than `pageSize`. This is currently unimplemented but is in process.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The nextPageToken value returned from a previous ListPhotoSequences request, if any.", +"location": "query", +"type": "string" +} +}, +"path": "v1/photoSequences", +"response": { +"$ref": "ListPhotoSequencesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +} +} +}, +"photos": { +"methods": { +"batchDelete": { +"description": "Deletes a list of Photos and their metadata. Note that if BatchDeletePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchDeletePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchDeletePhotosResponse.results. See DeletePhoto for specific failures that can occur per photo.", +"flatPath": "v1/photos:batchDelete", +"httpMethod": "POST", +"id": "streetviewpublish.photos.batchDelete", +"parameterOrder": [], +"parameters": {}, +"path": "v1/photos:batchDelete", +"request": { +"$ref": "BatchDeletePhotosRequest" +}, +"response": { +"$ref": "BatchDeletePhotosResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"batchGet": { +"description": "Gets the metadata of the specified Photo batch. Note that if BatchGetPhotos fails, either critical fields are missing or there is an authentication error. Even if BatchGetPhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for specific failures that can occur per photo.", +"flatPath": "v1/photos:batchGet", +"httpMethod": "GET", +"id": "streetviewpublish.photos.batchGet", +"parameterOrder": [], +"parameters": { +"languageCode": { +"description": "Optional. The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.", +"location": "query", +"type": "string" +}, +"photoIds": { +"description": "Required. IDs of the Photos. For HTTP GET requests, the URL query parameter should be `photoIds=&photoIds=&...`.", +"location": "query", +"repeated": true, +"type": "string" +}, +"view": { +"description": "Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.", +"enum": [ +"BASIC", +"INCLUDE_DOWNLOAD_URL" +], +"enumDescriptions": [ +"Server responses do not include the download URL for the photo bytes. The default value.", +"Server responses include the download URL for the photo bytes." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/photos:batchGet", +"response": { +"$ref": "BatchGetPhotosResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"batchUpdate": { +"description": "Updates the metadata of Photos, such as pose, place association, connections, etc. Changing the pixels of photos is not supported. Note that if BatchUpdatePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures that can occur per photo. Only the fields specified in updateMask field are used. If `updateMask` is not present, the update applies to all fields. The number of UpdatePhotoRequest messages in a BatchUpdatePhotosRequest must not exceed 20. > Note: To update Pose.altitude, Pose.latLngPair has to be filled as well. Otherwise, the request will fail.", +"flatPath": "v1/photos:batchUpdate", +"httpMethod": "POST", +"id": "streetviewpublish.photos.batchUpdate", +"parameterOrder": [], +"parameters": {}, +"path": "v1/photos:batchUpdate", +"request": { +"$ref": "BatchUpdatePhotosRequest" +}, +"response": { +"$ref": "BatchUpdatePhotosResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +}, +"list": { +"description": "Lists all the Photos that belong to the user. > Note: Recently created photos that are still being indexed are not returned in the response.", +"flatPath": "v1/photos", +"httpMethod": "GET", +"id": "streetviewpublish.photos.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "Optional. The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The filters supported are: `placeId`, `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`. See https://google.aip.dev/160 for more information.", +"location": "query", +"type": "string" +}, +"languageCode": { +"description": "Optional. The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified, the user's language preference for Google services is used.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of photos to return. `pageSize` must be non-negative. If `pageSize` is zero or is not provided, the default page size of 100 is used. The number of photos returned in the response may be less than `pageSize` if the number of photos that belong to the user is less than `pageSize`.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The nextPageToken value returned from a previous ListPhotos request, if any.", +"location": "query", +"type": "string" +}, +"view": { +"description": "Required. Specifies if a download URL for the photos bytes should be returned in the Photos response.", +"enum": [ +"BASIC", +"INCLUDE_DOWNLOAD_URL" +], +"enumDescriptions": [ +"Server responses do not include the download URL for the photo bytes. The default value.", +"Server responses include the download URL for the photo bytes." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/photos", +"response": { +"$ref": "ListPhotosResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/streetviewpublish" +] +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://streetviewpublish.googleapis.com/", +"schemas": { +"BatchDeletePhotosRequest": { +"description": "Request to delete multiple Photos.", +"id": "BatchDeletePhotosRequest", +"properties": { +"photoIds": { +"description": "Required. IDs of the Photos. HTTP GET requests require the following syntax for the URL query parameter: `photoIds=&photoIds=&...`.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchDeletePhotosResponse": { +"description": "Response to batch delete of one or more Photos.", +"id": "BatchDeletePhotosResponse", +"properties": { +"status": { +"description": "The status for the operation to delete a single Photo in the batch request.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchGetPhotosResponse": { +"description": "Response to batch get of Photos.", +"id": "BatchGetPhotosResponse", +"properties": { +"results": { +"description": "List of results for each individual Photo requested, in the same order as the requests in BatchGetPhotos.", +"items": { +"$ref": "PhotoResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchUpdatePhotosRequest": { +"description": "Request to update the metadata of photos. Updating the pixels of photos is not supported.", +"id": "BatchUpdatePhotosRequest", +"properties": { +"updatePhotoRequests": { +"description": "Required. List of UpdatePhotoRequests.", +"items": { +"$ref": "UpdatePhotoRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchUpdatePhotosResponse": { +"description": "Response to batch update of metadata of one or more Photos.", +"id": "BatchUpdatePhotosResponse", +"properties": { +"results": { +"description": "List of results for each individual Photo updated, in the same order as the request.", +"items": { +"$ref": "PhotoResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"Connection": { +"description": "A connection is the link from a source photo to a destination photo.", +"id": "Connection", +"properties": { +"target": { +"$ref": "PhotoId", +"description": "Required. The destination of the connection from the containing photo to another photo." +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"GpsDataGapFailureDetails": { +"description": "Details related to ProcessingFailureReason#GPS_DATA_GAP. If there are multiple GPS data gaps, only the one with the largest duration is reported here.", +"id": "GpsDataGapFailureDetails", +"properties": { +"gapDuration": { +"description": "The duration of the gap in GPS data that was found.", +"format": "google-duration", +"type": "string" +}, +"gapStartTime": { +"description": "Relative time (from the start of the video stream) when the gap started.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Imu": { +"description": "IMU data from the device sensors.", +"id": "Imu", +"properties": { +"accelMpsps": { +"description": "The accelerometer measurements in meters/sec^2 with increasing timestamps from devices.", +"items": { +"$ref": "Measurement3d" +}, +"type": "array" +}, +"gyroRps": { +"description": "The gyroscope measurements in radians/sec with increasing timestamps from devices.", +"items": { +"$ref": "Measurement3d" +}, +"type": "array" +}, +"magUt": { +"description": "The magnetometer measurements of the magnetic field in microtesla (uT) with increasing timestamps from devices.", +"items": { +"$ref": "Measurement3d" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImuDataGapFailureDetails": { +"description": "Details related to ProcessingFailureReason#IMU_DATA_GAP. If there are multiple IMU data gaps, only the one with the largest duration is reported here.", +"id": "ImuDataGapFailureDetails", +"properties": { +"gapDuration": { +"description": "The duration of the gap in IMU data that was found.", +"format": "google-duration", +"type": "string" +}, +"gapStartTime": { +"description": "Relative time (from the start of the video stream) when the gap started.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"InsufficientGpsFailureDetails": { +"description": "Details related to ProcessingFailureReason#INSUFFICIENT_GPS.", +"id": "InsufficientGpsFailureDetails", +"properties": { +"gpsPointsFound": { +"description": "The number of GPS points that were found in the video.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"LatLng": { +"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", +"id": "LatLng", +"properties": { +"latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"LatLngBounds": { +"description": "A rectangle in geographical coordinates.", +"id": "LatLngBounds", +"properties": { +"northeast": { +"$ref": "LatLng", +"description": "The northeast corner of these bounds." +}, +"southwest": { +"$ref": "LatLng", +"description": "The southwest corner of these bounds." +} +}, +"type": "object" +}, +"Level": { +"description": "Level information containing level number and its corresponding name.", +"id": "Level", +"properties": { +"name": { +"description": "Required. A name assigned to this Level, restricted to 3 characters. Consider how the elevator buttons would be labeled for this level if there was an elevator.", +"type": "string" +}, +"number": { +"description": "Optional. Floor number, used for ordering. 0 indicates the ground level, 1 indicates the first level above ground level, -1 indicates the first level under ground level. Non-integer values are OK.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ListPhotoSequencesResponse": { +"description": "Response to list all photo sequences that belong to a user.", +"id": "ListPhotoSequencesResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"photoSequences": { +"description": "List of photo sequences via Operation interface. The maximum number of items returned is based on the pageSize field in the request. Each item in the list can have three possible states, * `Operation.done` = false, if the processing of PhotoSequence is not finished yet. * `Operation.done` = true and `Operation.error` is populated, if there was an error in processing. * `Operation.done` = true and `Operation.response` contains a PhotoSequence message, In each sequence, only Id is populated.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPhotosResponse": { +"description": "Response to list all photos that belong to a user.", +"id": "ListPhotosResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"photos": { +"description": "List of photos. The pageSize field in the request determines the number of items returned.", +"items": { +"$ref": "Photo" +}, +"type": "array" +} +}, +"type": "object" +}, +"Measurement3d": { +"description": "A Generic 3d measurement sample.", +"id": "Measurement3d", +"properties": { +"captureTime": { +"description": "The timestamp of the IMU measurement.", +"format": "google-datetime", +"type": "string" +}, +"x": { +"description": "The sensor measurement in the x axis.", +"format": "float", +"type": "number" +}, +"y": { +"description": "The sensor measurement in the y axis.", +"format": "float", +"type": "number" +}, +"z": { +"description": "The sensor measurement in the z axis.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"NoOverlapGpsFailureDetails": { +"description": "Details related to PhotoSequenceProcessingFailureReason#NO_OVERLAP_GPS.", +"id": "NoOverlapGpsFailureDetails", +"properties": { +"gpsEndTime": { +"description": "Time of last recorded GPS point.", +"format": "google-datetime", +"type": "string" +}, +"gpsStartTime": { +"description": "Time of first recorded GPS point.", +"format": "google-datetime", +"type": "string" +}, +"videoEndTime": { +"description": "End time of video.", +"format": "google-datetime", +"type": "string" +}, +"videoStartTime": { +"description": "Start time of video.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"NotOutdoorsFailureDetails": { +"description": "Details related to ProcessingFailureReason#NOT_OUTDOORS. If there are multiple indoor frames found, the first frame is recorded here.", +"id": "NotOutdoorsFailureDetails", +"properties": { +"startTime": { +"description": "Relative time (from the start of the video stream) when an indoor frame was found.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Photo": { +"description": "Photo is used to store 360 photos along with photo metadata.", +"id": "Photo", +"properties": { +"captureTime": { +"description": "Optional. Absolute time when the photo was captured. When the photo has no exif timestamp, this is used to set a timestamp in the photo metadata.", +"format": "google-datetime", +"type": "string" +}, +"connections": { +"description": "Optional. Connections to other photos. A connection represents the link from this photo to another photo.", +"items": { +"$ref": "Connection" +}, +"type": "array" +}, +"downloadUrl": { +"description": "Output only. The download URL for the photo bytes. This field is set only when GetPhotoRequest.view is set to PhotoView.INCLUDE_DOWNLOAD_URL.", +"readOnly": true, +"type": "string" +}, +"mapsPublishStatus": { +"description": "Output only. Status in Google Maps, whether this photo was published or rejected.", +"enum": [ +"UNSPECIFIED_MAPS_PUBLISH_STATUS", +"PUBLISHED", +"REJECTED_UNKNOWN" +], +"enumDescriptions": [ +"The status of the photo is unknown.", +"The photo is published to the public through Google Maps.", +"The photo has been rejected for an unknown reason." +], +"readOnly": true, +"type": "string" +}, +"photoId": { +"$ref": "PhotoId", +"description": "Required. Output only. Required when updating a photo. Output only when creating a photo. Identifier for the photo, which is unique among all photos in Google.", +"readOnly": true +}, +"places": { +"description": "Optional. Places where this photo belongs.", +"items": { +"$ref": "Place" +}, +"type": "array" +}, +"pose": { +"$ref": "Pose", +"description": "Optional. Pose of the photo." +}, +"shareLink": { +"description": "Output only. The share link for the photo.", +"readOnly": true, +"type": "string" +}, +"thumbnailUrl": { +"description": "Output only. The thumbnail URL for showing a preview of the given photo.", +"readOnly": true, +"type": "string" +}, +"transferStatus": { +"description": "Output only. Status of rights transfer on this photo.", +"enum": [ +"TRANSFER_STATUS_UNKNOWN", +"NEVER_TRANSFERRED", +"PENDING", +"COMPLETED", +"REJECTED", +"EXPIRED", +"CANCELLED", +"RECEIVED_VIA_TRANSFER" +], +"enumDescriptions": [ +"The status of this transfer is unspecified.", +"This photo has never been in a transfer.", +"This photo transfer has been initiated, but the receiver has not yet responded.", +"The photo transfer has been completed, and this photo has been transferred to the recipient.", +"The recipient rejected this photo transfer.", +"The photo transfer expired before the recipient took any action.", +"The sender cancelled this photo transfer.", +"The recipient owns this photo due to a rights transfer." +], +"readOnly": true, +"type": "string" +}, +"uploadReference": { +"$ref": "UploadRef", +"description": "Input only. Required when creating a photo. Input only. The resource URL where the photo bytes are uploaded to." +}, +"uploadTime": { +"description": "Output only. Time when the image was uploaded.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"viewCount": { +"description": "Output only. View count of the photo.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PhotoId": { +"description": "Identifier for a Photo.", +"id": "PhotoId", +"properties": { +"id": { +"description": "A unique identifier for a photo.", +"type": "string" +} +}, +"type": "object" +}, +"PhotoResponse": { +"description": "Response payload for a single Photo in batch operations including BatchGetPhotos and BatchUpdatePhotos.", +"id": "PhotoResponse", +"properties": { +"photo": { +"$ref": "Photo", +"description": "The Photo resource, if the request was successful." +}, +"status": { +"$ref": "Status", +"description": "The status for the operation to get or update a single photo in the batch request." +} +}, +"type": "object" +}, +"PhotoSequence": { +"description": "A sequence of 360 photos along with metadata.", +"id": "PhotoSequence", +"properties": { +"captureTimeOverride": { +"description": "Optional. Absolute time when the photo sequence starts to be captured. If the photo sequence is a video, this is the start time of the video. If this field is populated in input, it overrides the capture time in the video or XDM file.", +"format": "google-datetime", +"type": "string" +}, +"distanceMeters": { +"description": "Output only. The computed distance of the photo sequence in meters.", +"format": "double", +"readOnly": true, +"type": "number" +}, +"failureDetails": { +"$ref": "ProcessingFailureDetails", +"description": "Output only. If this sequence has `failure_reason` set, this may contain additional details about the failure.", +"readOnly": true +}, +"failureReason": { +"description": "Output only. If this sequence has processing_state = FAILED, this will contain the reason why it failed. If the processing_state is any other value, this field will be unset.", +"enum": [ +"PROCESSING_FAILURE_REASON_UNSPECIFIED", +"LOW_RESOLUTION", +"DUPLICATE", +"INSUFFICIENT_GPS", +"NO_OVERLAP_GPS", +"INVALID_GPS", +"FAILED_TO_REFINE_POSITIONS", +"TAKEDOWN", +"CORRUPT_VIDEO", +"INTERNAL", +"INVALID_VIDEO_FORMAT", +"INVALID_VIDEO_DIMENSIONS", +"INVALID_CAPTURE_TIME", +"GPS_DATA_GAP", +"JUMPY_GPS", +"INVALID_IMU", +"INSUFFICIENT_IMU", +"INSUFFICIENT_OVERLAP_TIME_SERIES", +"IMU_DATA_GAP", +"UNSUPPORTED_CAMERA", +"NOT_OUTDOORS", +"INSUFFICIENT_VIDEO_FRAMES", +"INSUFFICIENT_MOVEMENT", +"MAST_DOWN", +"CAMERA_COVERED" +], +"enumDescriptions": [ +"The failure reason is unspecified, this is the default value.", +"Video frame's resolution is too small.", +"This video has been uploaded before.", +"Too few GPS points.", +"No overlap between the time frame of GPS track and the time frame of video.", +"GPS is invalid (e.x. all GPS points are at (0,0))", +"The sequence of photos could not be accurately located in the world.", +"The sequence was taken down for policy reasons.", +"The video file was corrupt or could not be decoded.", +"A permanent failure in the underlying system occurred.", +"The video format is invalid or unsupported.", +"Invalid image aspect ratio found.", +"Invalid capture time. Timestamps were from the future.", +"GPS data contains a gap greater than 5 seconds in duration.", +"GPS data is too erratic to be processed.", +"IMU (Accelerometer, Gyroscope, etc.) data are not valid. They may be missing required fields (x, y, z or time), may not be formatted correctly, or any other issue that prevents our systems from parsing it.", +"Too few IMU points.", +"Insufficient overlap in the time frame between GPS, IMU, and other time series data.", +"IMU (Accelerometer, Gyroscope, etc.) data contain gaps greater than 0.1 seconds in duration.", +"The camera is not supported.", +"Some frames were indoors, which is unsupported.", +"Not enough video frames.", +"Not enough moving data.", +"Mast is down.", +"Camera is covered." +], +"readOnly": true, +"type": "string" +}, +"filename": { +"description": "Output only. The filename of the upload. Does not include the directory path. Only available if the sequence was uploaded on a platform that provides the filename.", +"readOnly": true, +"type": "string" +}, +"gpsSource": { +"description": "Input only. If both raw_gps_timeline and the Camera Motion Metadata Track (CAMM) contain GPS measurements, indicate which takes precedence.", +"enum": [ +"PHOTO_SEQUENCE", +"CAMERA_MOTION_METADATA_TRACK" +], +"enumDescriptions": [ +"GPS in raw_gps_timeline takes precedence if it exists.", +"GPS in Camera Motion Metadata Track (CAMM) takes precedence if it exists." +], +"type": "string" +}, +"id": { +"description": "Output only. Unique identifier for the photo sequence. This also acts as a long running operation ID if uploading is performed asynchronously.", +"readOnly": true, +"type": "string" +}, +"imu": { +"$ref": "Imu", +"description": "Input only. Three axis IMU data for the collection. If this data is too large to put in the request, then it should be put in the CAMM track for the video. This data always takes precedence over the equivalent CAMM data, if it exists." +}, +"photos": { +"description": "Output only. Photos with increasing timestamps.", +"items": { +"$ref": "Photo" +}, +"readOnly": true, +"type": "array" +}, +"processingState": { +"description": "Output only. The processing state of this sequence.", +"enum": [ +"PROCESSING_STATE_UNSPECIFIED", +"PENDING", +"PROCESSING", +"PROCESSED", +"FAILED" +], +"enumDescriptions": [ +"The state is unspecified, this is the default value.", +"The sequence has not yet started processing.", +"The sequence is currently in processing.", +"The sequence has finished processing including refining position.", +"The sequence failed processing. See FailureReason for more details." +], +"readOnly": true, +"type": "string" +}, +"rawGpsTimeline": { +"description": "Input only. Raw GPS measurements with increasing timestamps from the device that aren't time synced with each photo. These raw measurements will be used to infer the pose of each frame. Required in input when InputType is VIDEO and raw GPS measurements are not in Camera Motion Metadata Track (CAMM). User can indicate which takes precedence using gps_source if raw GPS measurements are provided in both raw_gps_timeline and Camera Motion Metadata Track (CAMM).", +"items": { +"$ref": "Pose" +}, +"type": "array" +}, +"sequenceBounds": { +"$ref": "LatLngBounds", +"description": "Output only. A rectangular box that encapsulates every image in this photo sequence.", +"readOnly": true +}, +"uploadReference": { +"$ref": "UploadRef", +"description": "Input only. Required when creating photo sequence. The resource name where the bytes of the photo sequence (in the form of video) are uploaded." +}, +"uploadTime": { +"description": "Output only. The time this photo sequence was created in uSV Store service.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"viewCount": { +"description": "Output only. The total number of views that all the published images in this PhotoSequence have received.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Place": { +"description": "Place metadata for an entity.", +"id": "Place", +"properties": { +"languageCode": { +"description": "Output only. The language_code that the name is localized with. This should be the language_code specified in the request, but may be a fallback.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The name of the place, localized to the language_code.", +"readOnly": true, +"type": "string" +}, +"placeId": { +"description": "Place identifier, as described in https://developers.google.com/places/place-id.", +"type": "string" +} +}, +"type": "object" +}, +"Pose": { +"description": "Raw pose measurement for an entity.", +"id": "Pose", +"properties": { +"accuracyMeters": { +"description": "The estimated horizontal accuracy of this pose in meters with 68% confidence (one standard deviation). For example, on Android, this value is available from this method: https://developer.android.com/reference/android/location/Location#getAccuracy(). Other platforms have different methods of obtaining similar accuracy estimations.", +"format": "float", +"type": "number" +}, +"altitude": { +"description": "Altitude of the pose in meters above WGS84 ellipsoid. NaN indicates an unmeasured quantity.", +"format": "double", +"type": "number" +}, +"gpsRecordTimestampUnixEpoch": { +"description": "Time of the GPS record since UTC epoch.", +"format": "google-datetime", +"type": "string" +}, +"heading": { +"description": "The following pose parameters pertain to the center of the photo. They match https://developers.google.com/streetview/spherical-metadata. Compass heading, measured at the center of the photo in degrees clockwise from North. Value must be >=0 and <360. NaN indicates an unmeasured quantity.", +"format": "double", +"type": "number" +}, +"latLngPair": { +"$ref": "LatLng", +"description": "Latitude and longitude pair of the pose, as explained here: https://cloud.google.com/datastore/docs/reference/rest/Shared.Types/LatLng When creating a Photo, if the latitude and longitude pair are not provided, the geolocation from the exif header is used. A latitude and longitude pair not provided in the photo or exif header causes the photo process to fail." +}, +"level": { +"$ref": "Level", +"description": "Level (the floor in a building) used to configure vertical navigation." +}, +"pitch": { +"description": "Pitch, measured at the center of the photo in degrees. Value must be >=-90 and <= 90. A value of -90 means looking directly down, and a value of 90 means looking directly up. NaN indicates an unmeasured quantity.", +"format": "double", +"type": "number" +}, +"roll": { +"description": "Roll, measured in degrees. Value must be >= 0 and <360. A value of 0 means level with the horizon. NaN indicates an unmeasured quantity.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"ProcessingFailureDetails": { +"description": "Additional details to accompany the ProcessingFailureReason enum. This message is always expected to be used in conjunction with ProcessingFailureReason, and the oneof value set in this message should match the FailureReason.", +"id": "ProcessingFailureDetails", +"properties": { +"gpsDataGapDetails": { +"$ref": "GpsDataGapFailureDetails", +"description": "See GpsDataGapFailureDetails." +}, +"imuDataGapDetails": { +"$ref": "ImuDataGapFailureDetails", +"description": "See ImuDataGapFailureDetails." +}, +"insufficientGpsDetails": { +"$ref": "InsufficientGpsFailureDetails", +"description": "See InsufficientGpsFailureDetails." +}, +"noOverlapGpsDetails": { +"$ref": "NoOverlapGpsFailureDetails", +"description": "See NoOverlapGpsFailureDetails." +}, +"notOutdoorsDetails": { +"$ref": "NotOutdoorsFailureDetails", +"description": "See NotOutdoorsFailureDetails." +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"UpdatePhotoRequest": { +"description": "Request to update the metadata of a Photo. Updating the pixels of a photo is not supported.", +"id": "UpdatePhotoRequest", +"properties": { +"photo": { +"$ref": "Photo", +"description": "Required. Photo object containing the new metadata." +}, +"updateMask": { +"description": "Required. Mask that identifies fields on the photo metadata to update. If not present, the old Photo metadata is entirely replaced with the new Photo metadata in this request. The update fails if invalid fields are specified. Multiple fields can be specified in a comma-delimited list. The following fields are valid: * `pose.heading` * `pose.lat_lng_pair` * `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections` * `places` > Note: When updateMask contains repeated fields, the entire set of repeated values get replaced with the new contents. For example, if updateMask contains `connections` and `UpdatePhotoRequest.photo.connections` is empty, all connections are removed.", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"UploadRef": { +"description": "Upload reference for media files.", +"id": "UploadRef", +"properties": { +"uploadUrl": { +"description": "An upload reference should be unique for each user. It follows the form: \"https://streetviewpublish.googleapis.com/media/user/{account_id}/photo/{upload_reference}\"", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Street View Publish API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sts.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sts.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..3de10925d5b1ce5ecccf6f242fc58b99086865d8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sts.v1.json @@ -0,0 +1,347 @@ +{ +"basePath": "", +"baseUrl": "https://sts.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Security Token", +"description": "The Security Token Service exchanges Google or third-party credentials for a short-lived access token to Google Cloud resources.", +"discoveryVersion": "v1", +"documentationLink": "http://cloud.google.com/iam/docs/workload-identity-federation", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "sts:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://sts.mtls.googleapis.com/", +"name": "sts", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"v1": { +"methods": { +"token": { +"description": "Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within an identity pool, or it applies a Credential Access Boundary to a Google access token. Note that workforce pools do not support Credential Access Boundaries. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.", +"flatPath": "v1/token", +"httpMethod": "POST", +"id": "sts.token", +"parameterOrder": [], +"parameters": {}, +"path": "v1/token", +"request": { +"$ref": "GoogleIdentityStsV1ExchangeTokenRequest" +}, +"response": { +"$ref": "GoogleIdentityStsV1ExchangeTokenResponse" +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://sts.googleapis.com/", +"schemas": { +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1AccessBoundary": { +"description": "An access boundary defines the upper bound of what a principal may access. It includes a list of access boundary rules that each defines the resource that may be allowed as well as permissions that may be used on those resources.", +"id": "GoogleIdentityStsV1AccessBoundary", +"properties": { +"accessBoundaryRules": { +"description": "A list of access boundary rules which defines the upper bound of the permission a principal may carry. If multiple rules are specified, the effective access boundary is the union of all the access boundary rules attached. One access boundary can contain at most 10 rules.", +"items": { +"$ref": "GoogleIdentityStsV1AccessBoundaryRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1AccessBoundaryRule": { +"description": "An access boundary rule defines an upper bound of IAM permissions on a single resource.", +"id": "GoogleIdentityStsV1AccessBoundaryRule", +"properties": { +"availabilityCondition": { +"$ref": "GoogleTypeExpr", +"description": "The availability condition further constrains the access allowed by the access boundary rule. If the condition evaluates to `true`, then this access boundary rule will provide access to the specified resource, assuming the principal has the required permissions for the resource. If the condition does not evaluate to `true`, then access to the specified resource will not be available. Note that all access boundary rules in an access boundary are evaluated together as a union. As such, another access boundary rule may allow access to the resource, even if this access boundary rule does not allow access. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). The maximum length of the `expression` field is 2048 characters." +}, +"availablePermissions": { +"description": "A list of permissions that may be allowed for use on the specified resource. The only supported values in the list are IAM roles, following the format of google.iam.v1.Binding.role. Example value: `inRole:roles/logging.viewer` for predefined roles and `inRole:organizations/{ORGANIZATION_ID}/roles/logging.viewer` for custom roles.", +"items": { +"type": "string" +}, +"type": "array" +}, +"availableResource": { +"description": "The full resource name of a Google Cloud resource entity. The format definition is at https://cloud.google.com/apis/design/resource_names. Example value: `//cloudresourcemanager.googleapis.com/projects/my-project`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1ExchangeTokenRequest": { +"description": "Request message for ExchangeToken.", +"id": "GoogleIdentityStsV1ExchangeTokenRequest", +"properties": { +"audience": { +"description": "The full resource name of the identity provider; for example: `//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/` for workload identity pool providers, or `//iam.googleapis.com/locations/global/workforcePools//providers/` for workforce pool providers. Required when exchanging an external credential for a Google access token.", +"type": "string" +}, +"grantType": { +"description": "Required. The grant type. Must be `urn:ietf:params:oauth:grant-type:token-exchange`, which indicates a token exchange.", +"type": "string" +}, +"options": { +"description": "A set of features that Security Token Service supports, in addition to the standard OAuth 2.0 token exchange, formatted as a serialized JSON object of Options. The size of the parameter value must not exceed 4096 characters.", +"type": "string" +}, +"requestedTokenType": { +"description": "Required. An identifier for the type of requested security token. Must be `urn:ietf:params:oauth:token-type:access_token`.", +"type": "string" +}, +"scope": { +"description": "The OAuth 2.0 scopes to include on the resulting access token, formatted as a list of space-delimited, case-sensitive strings. Required when exchanging an external credential for a Google access token.", +"type": "string" +}, +"subjectToken": { +"description": "Required. The input token. This token is either an external credential issued by a workload identity pool provider, or a short-lived access token issued by Google. If the token is an OIDC JWT, it must use the JWT format defined in [RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type` must be either `urn:ietf:params:oauth:token-type:jwt` or `urn:ietf:params:oauth:token-type:id_token`. The following headers are required: - `kid`: The identifier of the signing key securing the JWT. - `alg`: The cryptographic algorithm securing the JWT. Must be `RS256` or `ES256`. The following payload fields are required. For more information, see [RFC 7523, Section 3](https://tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer of the token. The issuer must provide a discovery document at the URL `/.well-known/openid-configuration`, where `` is the value of this field. The document must be formatted according to section 4.2 of the [OIDC 1.0 Discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds, since the Unix epoch. Must be less than 48 hours after `iat`. Shorter expiration times are more secure. If possible, we recommend setting an expiration time less than 6 hours. - `sub`: The identity asserted in the JWT. - `aud`: For workload identity pools, this must be a value specified in the allowed audiences for the workload identity pool provider, or one of the audiences allowed by default if no audiences were specified. See https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc. For workforce pools, this must match the client ID specified in the provider configuration. See https://cloud.google.com/iam/docs/reference/rest/v1/locations.workforcePools.providers#oidc. Example header: ``` { \"alg\": \"RS256\", \"kid\": \"us-east-11\" } ``` Example payload: ``` { \"iss\": \"https://accounts.google.com\", \"iat\": 1517963104, \"exp\": 1517966704, \"aud\": \"//iam.googleapis.com/projects/1234567890123/locations/global/workloadIdentityPools/my-pool/providers/my-provider\", \"sub\": \"113475438248934895348\", \"my_claims\": { \"additional_claim\": \"value\" } } ``` If `subject_token` is for AWS, it must be a serialized `GetCallerIdentity` token. This token contains the same information as a request to the AWS [`GetCallerIdentity()`](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity) method, as well as the AWS [signature](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) for the request information. Use Signature Version 4. Format the request as URL-encoded JSON, and set the `subject_token_type` parameter to `urn:ietf:params:aws:token-type:aws4_request`. The following parameters are required: - `url`: The URL of the AWS STS endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15`. Regional endpoints are also supported. - `method`: The HTTP request method: `POST`. - `headers`: The HTTP request headers, which must include: - `Authorization`: The request signature. - `x-amz-date`: The time you will send the request, formatted as an [ISO8601 Basic](https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#sigv4_elements_date) string. This value is typically set to the current time and is used to help prevent replay attacks. - `host`: The hostname of the `url` field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`: The full, canonical resource name of the workload identity pool provider, with or without an `https:` prefix. To help ensure data integrity, we recommend including this header in the `SignedHeaders` field of the signed request. For example: //iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ If you are using temporary security credentials provided by AWS, you must also include the header `x-amz-security-token`, with the value set to the session token. The following example shows a `GetCallerIdentity` token: ``` { \"headers\": [ {\"key\": \"x-amz-date\", \"value\": \"20200815T015049Z\"}, {\"key\": \"Authorization\", \"value\": \"AWS4-HMAC-SHA256+Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-resource,+Signature=$signature\"}, {\"key\": \"x-goog-cloud-target-resource\", \"value\": \"//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/\"}, {\"key\": \"host\", \"value\": \"sts.amazonaws.com\"} . ], \"method\": \"POST\", \"url\": \"https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15\" } ``` If the token is a SAML 2.0 assertion, it must use the format defined in [the SAML 2.0 spec](https://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0-cd-02.pdf), and the `subject_token_type` must be `urn:ietf:params:oauth:token-type:saml2`. See [Verification of external credentials](https://cloud.google.com/iam/docs/using-workload-identity-federation#verification_of_external_credentials) for details on how SAML 2.0 assertions are validated during token exchanges. You can also use a Google-issued OAuth 2.0 access token with this field to obtain an access token with new security attributes applied, such as a Credential Access Boundary. In this case, set `subject_token_type` to `urn:ietf:params:oauth:token-type:access_token`. If an access token already contains security attributes, you cannot apply additional security attributes.", +"type": "string" +}, +"subjectTokenType": { +"description": "Required. An identifier that indicates the type of the security token in the `subject_token` parameter. Supported values are `urn:ietf:params:oauth:token-type:jwt`, `urn:ietf:params:oauth:token-type:id_token`, `urn:ietf:params:aws:token-type:aws4_request`, `urn:ietf:params:oauth:token-type:access_token`, and `urn:ietf:params:oauth:token-type:saml2`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1ExchangeTokenResponse": { +"description": "Response message for ExchangeToken.", +"id": "GoogleIdentityStsV1ExchangeTokenResponse", +"properties": { +"access_token": { +"description": "An OAuth 2.0 security token, issued by Google, in response to the token exchange request. Tokens can vary in size, depending in part on the size of mapped claims, up to a maximum of 12288 bytes (12 KB). Google reserves the right to change the token size and the maximum length at any time.", +"type": "string" +}, +"expires_in": { +"description": "The amount of time, in seconds, between the time when the access token was issued and the time when the access token will expire. This field is absent when the `subject_token` in the request is a Google-issued, short-lived access token. In this case, the access token has the same expiration time as the `subject_token`.", +"format": "int32", +"type": "integer" +}, +"issued_token_type": { +"description": "The token type. Always matches the value of `requested_token_type` from the request.", +"type": "string" +}, +"token_type": { +"description": "The type of access token. Always has the value `Bearer`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1Options": { +"description": "An `Options` object configures features that the Security Token Service supports, but that are not supported by standard OAuth 2.0 token exchange endpoints, as defined in https://tools.ietf.org/html/rfc8693.", +"id": "GoogleIdentityStsV1Options", +"properties": { +"accessBoundary": { +"$ref": "GoogleIdentityStsV1AccessBoundary", +"description": "An access boundary that defines the upper bound of permissions the credential may have. The value should be a JSON object of AccessBoundary. The access boundary can include up to 10 rules. The size of the parameter value should not exceed 2048 characters." +}, +"audiences": { +"description": "The intended audience(s) of the credential. The audience value(s) should be the name(s) of services intended to receive the credential. Example: `[\"https://pubsub.googleapis.com/\", \"https://storage.googleapis.com/\"]`. A maximum of 5 audiences can be included. For each provided audience, the maximum length is 262 characters.", +"items": { +"type": "string" +}, +"type": "array" +}, +"userProject": { +"description": "A Google project used for quota and billing purposes when the credential is used to access Google APIs. The provided project overrides the project bound to the credential. The value must be a project number or a project ID. Example: `my-sample-project-191923`. The maximum length is 32 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaAccessBoundary": { +"description": "An access boundary defines the upper bound of what a principal may access. It includes a list of access boundary rules that each defines the resource that may be allowed as well as permissions that may be used on those resources.", +"id": "GoogleIdentityStsV1betaAccessBoundary", +"properties": { +"accessBoundaryRules": { +"description": "A list of access boundary rules which defines the upper bound of the permission a principal may carry. If multiple rules are specified, the effective access boundary is the union of all the access boundary rules attached. One access boundary can contain at most 10 rules.", +"items": { +"$ref": "GoogleIdentityStsV1betaAccessBoundaryRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaAccessBoundaryRule": { +"description": "An access boundary rule defines an upper bound of IAM permissions on a single resource.", +"id": "GoogleIdentityStsV1betaAccessBoundaryRule", +"properties": { +"availabilityCondition": { +"$ref": "GoogleTypeExpr", +"description": "The availability condition further constrains the access allowed by the access boundary rule. If the condition evaluates to `true`, then this access boundary rule will provide access to the specified resource, assuming the principal has the required permissions for the resource. If the condition does not evaluate to `true`, then access to the specified resource will not be available. Note that all access boundary rules in an access boundary are evaluated together as a union. As such, another access boundary rule may allow access to the resource, even if this access boundary rule does not allow access. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). The maximum length of the `expression` field is 2048 characters." +}, +"availablePermissions": { +"description": "A list of permissions that may be allowed for use on the specified resource. The only supported values in the list are IAM roles, following the format of google.iam.v1.Binding.role. Example value: `inRole:roles/logging.viewer` for predefined roles and `inRole:organizations/{ORGANIZATION_ID}/roles/logging.viewer` for custom roles.", +"items": { +"type": "string" +}, +"type": "array" +}, +"availableResource": { +"description": "The full resource name of a Google Cloud resource entity. The format definition is at https://cloud.google.com/apis/design/resource_names. Example value: `//cloudresourcemanager.googleapis.com/projects/my-project`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaOptions": { +"description": "An `Options` object configures features that the Security Token Service supports, but that are not supported by standard OAuth 2.0 token exchange endpoints, as defined in https://tools.ietf.org/html/rfc8693.", +"id": "GoogleIdentityStsV1betaOptions", +"properties": { +"accessBoundary": { +"$ref": "GoogleIdentityStsV1betaAccessBoundary", +"description": "An access boundary that defines the upper bound of permissions the credential may have. The value should be a JSON object of AccessBoundary. The access boundary can include up to 10 rules. The size of the parameter value should not exceed 2048 characters." +}, +"audiences": { +"description": "The intended audience(s) of the credential. The audience value(s) should be the name(s) of services intended to receive the credential. Example: `[\"https://pubsub.googleapis.com/\", \"https://storage.googleapis.com/\"]`. A maximum of 5 audiences can be included. For each provided audience, the maximum length is 262 characters.", +"items": { +"type": "string" +}, +"type": "array" +}, +"userProject": { +"description": "A Google project used for quota and billing purposes when the credential is used to access Google APIs. The provided project overrides the project bound to the credential. The value must be a project number or a project ID. Example: `my-sample-project-191923`. The maximum length is 32 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Security Token Service API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sts.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sts.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..58f2271b1e6200bdc1a8619c28473d4642281258 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/sts.v1beta.json @@ -0,0 +1,347 @@ +{ +"basePath": "", +"baseUrl": "https://sts.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Security Token", +"description": "The Security Token Service exchanges Google or third-party credentials for a short-lived access token to Google Cloud resources.", +"discoveryVersion": "v1", +"documentationLink": "http://cloud.google.com/iam/docs/workload-identity-federation", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "sts:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://sts.mtls.googleapis.com/", +"name": "sts", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"v1beta": { +"methods": { +"token": { +"description": "Exchanges a credential for a Google OAuth 2.0 access token. The token asserts an external identity within a workload identity pool, or it applies a Credential Access Boundary to a Google access token. When you call this method, do not send the `Authorization` HTTP header in the request. This method does not require the `Authorization` header, and using the header can cause the request to fail.", +"flatPath": "v1beta/token", +"httpMethod": "POST", +"id": "sts.token", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta/token", +"request": { +"$ref": "GoogleIdentityStsV1betaExchangeTokenRequest" +}, +"response": { +"$ref": "GoogleIdentityStsV1betaExchangeTokenResponse" +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://sts.googleapis.com/", +"schemas": { +"GoogleIamV1Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "GoogleIamV1Binding", +"properties": { +"condition": { +"$ref": "GoogleTypeExpr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1AccessBoundary": { +"description": "An access boundary defines the upper bound of what a principal may access. It includes a list of access boundary rules that each defines the resource that may be allowed as well as permissions that may be used on those resources.", +"id": "GoogleIdentityStsV1AccessBoundary", +"properties": { +"accessBoundaryRules": { +"description": "A list of access boundary rules which defines the upper bound of the permission a principal may carry. If multiple rules are specified, the effective access boundary is the union of all the access boundary rules attached. One access boundary can contain at most 10 rules.", +"items": { +"$ref": "GoogleIdentityStsV1AccessBoundaryRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1AccessBoundaryRule": { +"description": "An access boundary rule defines an upper bound of IAM permissions on a single resource.", +"id": "GoogleIdentityStsV1AccessBoundaryRule", +"properties": { +"availabilityCondition": { +"$ref": "GoogleTypeExpr", +"description": "The availability condition further constrains the access allowed by the access boundary rule. If the condition evaluates to `true`, then this access boundary rule will provide access to the specified resource, assuming the principal has the required permissions for the resource. If the condition does not evaluate to `true`, then access to the specified resource will not be available. Note that all access boundary rules in an access boundary are evaluated together as a union. As such, another access boundary rule may allow access to the resource, even if this access boundary rule does not allow access. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). The maximum length of the `expression` field is 2048 characters." +}, +"availablePermissions": { +"description": "A list of permissions that may be allowed for use on the specified resource. The only supported values in the list are IAM roles, following the format of google.iam.v1.Binding.role. Example value: `inRole:roles/logging.viewer` for predefined roles and `inRole:organizations/{ORGANIZATION_ID}/roles/logging.viewer` for custom roles.", +"items": { +"type": "string" +}, +"type": "array" +}, +"availableResource": { +"description": "The full resource name of a Google Cloud resource entity. The format definition is at https://cloud.google.com/apis/design/resource_names. Example value: `//cloudresourcemanager.googleapis.com/projects/my-project`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1Options": { +"description": "An `Options` object configures features that the Security Token Service supports, but that are not supported by standard OAuth 2.0 token exchange endpoints, as defined in https://tools.ietf.org/html/rfc8693.", +"id": "GoogleIdentityStsV1Options", +"properties": { +"accessBoundary": { +"$ref": "GoogleIdentityStsV1AccessBoundary", +"description": "An access boundary that defines the upper bound of permissions the credential may have. The value should be a JSON object of AccessBoundary. The access boundary can include up to 10 rules. The size of the parameter value should not exceed 2048 characters." +}, +"audiences": { +"description": "The intended audience(s) of the credential. The audience value(s) should be the name(s) of services intended to receive the credential. Example: `[\"https://pubsub.googleapis.com/\", \"https://storage.googleapis.com/\"]`. A maximum of 5 audiences can be included. For each provided audience, the maximum length is 262 characters.", +"items": { +"type": "string" +}, +"type": "array" +}, +"userProject": { +"description": "A Google project used for quota and billing purposes when the credential is used to access Google APIs. The provided project overrides the project bound to the credential. The value must be a project number or a project ID. Example: `my-sample-project-191923`. The maximum length is 32 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaAccessBoundary": { +"description": "An access boundary defines the upper bound of what a principal may access. It includes a list of access boundary rules that each defines the resource that may be allowed as well as permissions that may be used on those resources.", +"id": "GoogleIdentityStsV1betaAccessBoundary", +"properties": { +"accessBoundaryRules": { +"description": "A list of access boundary rules which defines the upper bound of the permission a principal may carry. If multiple rules are specified, the effective access boundary is the union of all the access boundary rules attached. One access boundary can contain at most 10 rules.", +"items": { +"$ref": "GoogleIdentityStsV1betaAccessBoundaryRule" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaAccessBoundaryRule": { +"description": "An access boundary rule defines an upper bound of IAM permissions on a single resource.", +"id": "GoogleIdentityStsV1betaAccessBoundaryRule", +"properties": { +"availabilityCondition": { +"$ref": "GoogleTypeExpr", +"description": "The availability condition further constrains the access allowed by the access boundary rule. If the condition evaluates to `true`, then this access boundary rule will provide access to the specified resource, assuming the principal has the required permissions for the resource. If the condition does not evaluate to `true`, then access to the specified resource will not be available. Note that all access boundary rules in an access boundary are evaluated together as a union. As such, another access boundary rule may allow access to the resource, even if this access boundary rule does not allow access. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). The maximum length of the `expression` field is 2048 characters." +}, +"availablePermissions": { +"description": "A list of permissions that may be allowed for use on the specified resource. The only supported values in the list are IAM roles, following the format of google.iam.v1.Binding.role. Example value: `inRole:roles/logging.viewer` for predefined roles and `inRole:organizations/{ORGANIZATION_ID}/roles/logging.viewer` for custom roles.", +"items": { +"type": "string" +}, +"type": "array" +}, +"availableResource": { +"description": "The full resource name of a Google Cloud resource entity. The format definition is at https://cloud.google.com/apis/design/resource_names. Example value: `//cloudresourcemanager.googleapis.com/projects/my-project`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaExchangeTokenRequest": { +"description": "Request message for ExchangeToken.", +"id": "GoogleIdentityStsV1betaExchangeTokenRequest", +"properties": { +"audience": { +"description": "The full resource name of the identity provider. For example, `//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/`. Required when exchanging an external credential for a Google access token.", +"type": "string" +}, +"grantType": { +"description": "Required. The grant type. Must be `urn:ietf:params:oauth:grant-type:token-exchange`, which indicates a token exchange.", +"type": "string" +}, +"options": { +"description": "A set of features that Security Token Service supports, in addition to the standard OAuth 2.0 token exchange, formatted as a serialized JSON object of Options. The size of the parameter value must not exceed 4096 characters.", +"type": "string" +}, +"requestedTokenType": { +"description": "Required. The type of security token. Must be `urn:ietf:params:oauth:token-type:access_token`, which indicates an OAuth 2.0 access token.", +"type": "string" +}, +"scope": { +"description": "The OAuth 2.0 scopes to include on the resulting access token, formatted as a list of space-delimited, case-sensitive strings. Required when exchanging an external credential for a Google access token.", +"type": "string" +}, +"subjectToken": { +"description": "Required. The input token. This token is either an external credential issued by a workload identity pool provider, or a short-lived access token issued by Google. If the token is an OIDC JWT, it must use the JWT format defined in [RFC 7523](https://tools.ietf.org/html/rfc7523), and the `subject_token_type` must be either `urn:ietf:params:oauth:token-type:jwt` or `urn:ietf:params:oauth:token-type:id_token`. The following headers are required: - `kid`: The identifier of the signing key securing the JWT. - `alg`: The cryptographic algorithm securing the JWT. Must be `RS256` or `ES256`. The following payload fields are required. For more information, see [RFC 7523, Section 3](https://tools.ietf.org/html/rfc7523#section-3): - `iss`: The issuer of the token. The issuer must provide a discovery document at the URL `/.well-known/openid-configuration`, where `` is the value of this field. The document must be formatted according to section 4.2 of the [OIDC 1.0 Discovery specification](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationResponse). - `iat`: The issue time, in seconds, since the Unix epoch. Must be in the past. - `exp`: The expiration time, in seconds, since the Unix epoch. Must be less than 48 hours after `iat`. Shorter expiration times are more secure. If possible, we recommend setting an expiration time less than 6 hours. - `sub`: The identity asserted in the JWT. - `aud`: For workload identity pools, this must be a value specified in the allowed audiences for the workload identity pool provider, or one of the audiences allowed by default if no audiences were specified. See https://cloud.google.com/iam/docs/reference/rest/v1/projects.locations.workloadIdentityPools.providers#oidc Example header: ``` { \"alg\": \"RS256\", \"kid\": \"us-east-11\" } ``` Example payload: ``` { \"iss\": \"https://accounts.google.com\", \"iat\": 1517963104, \"exp\": 1517966704, \"aud\": \"//iam.googleapis.com/projects/1234567890123/locations/global/workloadIdentityPools/my-pool/providers/my-provider\", \"sub\": \"113475438248934895348\", \"my_claims\": { \"additional_claim\": \"value\" } } ``` If `subject_token` is for AWS, it must be a serialized `GetCallerIdentity` token. This token contains the same information as a request to the AWS [`GetCallerIdentity()`](https://docs.aws.amazon.com/STS/latest/APIReference/API_GetCallerIdentity) method, as well as the AWS [signature](https://docs.aws.amazon.com/general/latest/gr/signing_aws_api_requests.html) for the request information. Use Signature Version 4. Format the request as URL-encoded JSON, and set the `subject_token_type` parameter to `urn:ietf:params:aws:token-type:aws4_request`. The following parameters are required: - `url`: The URL of the AWS STS endpoint for `GetCallerIdentity()`, such as `https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15`. Regional endpoints are also supported. - `method`: The HTTP request method: `POST`. - `headers`: The HTTP request headers, which must include: - `Authorization`: The request signature. - `x-amz-date`: The time you will send the request, formatted as an [ISO8601 Basic](https://docs.aws.amazon.com/general/latest/gr/sigv4_elements.html#sigv4_elements_date) string. This value is typically set to the current time and is used to help prevent replay attacks. - `host`: The hostname of the `url` field; for example, `sts.amazonaws.com`. - `x-goog-cloud-target-resource`: The full, canonical resource name of the workload identity pool provider, with or without an `https:` prefix. To help ensure data integrity, we recommend including this header in the `SignedHeaders` field of the signed request. For example: //iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/ If you are using temporary security credentials provided by AWS, you must also include the header `x-amz-security-token`, with the value set to the session token. The following example shows a `GetCallerIdentity` token: ``` { \"headers\": [ {\"key\": \"x-amz-date\", \"value\": \"20200815T015049Z\"}, {\"key\": \"Authorization\", \"value\": \"AWS4-HMAC-SHA256+Credential=$credential,+SignedHeaders=host;x-amz-date;x-goog-cloud-target-resource,+Signature=$signature\"}, {\"key\": \"x-goog-cloud-target-resource\", \"value\": \"//iam.googleapis.com/projects//locations/global/workloadIdentityPools//providers/\"}, {\"key\": \"host\", \"value\": \"sts.amazonaws.com\"} . ], \"method\": \"POST\", \"url\": \"https://sts.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15\" } ``` You can also use a Google-issued OAuth 2.0 access token with this field to obtain an access token with new security attributes applied, such as a Credential Access Boundary. In this case, set `subject_token_type` to `urn:ietf:params:oauth:token-type:access_token`. If an access token already contains security attributes, you cannot apply additional security attributes.", +"type": "string" +}, +"subjectTokenType": { +"description": "Required. An identifier that indicates the type of the security token in the `subject_token` parameter. Supported values are `urn:ietf:params:oauth:token-type:jwt`, `urn:ietf:params:oauth:token-type:id_token`, `urn:ietf:params:aws:token-type:aws4_request`, and `urn:ietf:params:oauth:token-type:access_token`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaExchangeTokenResponse": { +"description": "Response message for ExchangeToken.", +"id": "GoogleIdentityStsV1betaExchangeTokenResponse", +"properties": { +"access_token": { +"description": "An OAuth 2.0 security token, issued by Google, in response to the token exchange request. Tokens can vary in size, depending in part on the size of mapped claims, up to a maximum of 12288 bytes (12 KB). Google reserves the right to change the token size and the maximum length at any time.", +"type": "string" +}, +"expires_in": { +"description": "The amount of time, in seconds, between the time when the access token was issued and the time when the access token will expire. This field is absent when the `subject_token` in the request is a Google-issued, short-lived access token. In this case, the access token has the same expiration time as the `subject_token`.", +"format": "int32", +"type": "integer" +}, +"issued_token_type": { +"description": "The token type. Always matches the value of `requested_token_type` from the request.", +"type": "string" +}, +"token_type": { +"description": "The type of access token. Always has the value `Bearer`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleIdentityStsV1betaOptions": { +"description": "An `Options` object configures features that the Security Token Service supports, but that are not supported by standard OAuth 2.0 token exchange endpoints, as defined in https://tools.ietf.org/html/rfc8693.", +"id": "GoogleIdentityStsV1betaOptions", +"properties": { +"accessBoundary": { +"$ref": "GoogleIdentityStsV1betaAccessBoundary", +"description": "An access boundary that defines the upper bound of permissions the credential may have. The value should be a JSON object of AccessBoundary. The access boundary can include up to 10 rules. The size of the parameter value should not exceed 2048 characters." +}, +"audiences": { +"description": "The intended audience(s) of the credential. The audience value(s) should be the name(s) of services intended to receive the credential. Example: `[\"https://pubsub.googleapis.com/\", \"https://storage.googleapis.com/\"]`. A maximum of 5 audiences can be included. For each provided audience, the maximum length is 262 characters.", +"items": { +"type": "string" +}, +"type": "array" +}, +"userProject": { +"description": "A Google project used for quota and billing purposes when the credential is used to access Google APIs. The provided project overrides the project bound to the credential. The value must be a project number or a project ID. Example: `my-sample-project-191923`. The maximum length is 32 characters.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleTypeExpr": { +"description": "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.", +"id": "GoogleTypeExpr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Security Token Service API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tagmanager.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tagmanager.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..feb507214f32cef14df06bb9ca4d2b1739b85992 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tagmanager.v1.json @@ -0,0 +1,3489 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/tagmanager.delete.containers": { +"description": "Delete your Google Tag Manager containers" +}, +"https://www.googleapis.com/auth/tagmanager.edit.containers": { +"description": "Manage your Google Tag Manager container and its subcomponents, excluding versioning and publishing" +}, +"https://www.googleapis.com/auth/tagmanager.edit.containerversions": { +"description": "Manage your Google Tag Manager container versions" +}, +"https://www.googleapis.com/auth/tagmanager.manage.accounts": { +"description": "View and manage your Google Tag Manager accounts" +}, +"https://www.googleapis.com/auth/tagmanager.manage.users": { +"description": "Manage user permissions of your Google Tag Manager account and container" +}, +"https://www.googleapis.com/auth/tagmanager.publish": { +"description": "Publish your Google Tag Manager container versions" +}, +"https://www.googleapis.com/auth/tagmanager.readonly": { +"description": "View your Google Tag Manager container and its subcomponents" +} +} +} +}, +"basePath": "", +"baseUrl": "https://tagmanager.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Tag Manager", +"description": "This API allows clients to access and modify container and tag configuration.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/tag-manager", +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "tagmanager:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://tagmanager.mtls.googleapis.com/", +"name": "tagmanager", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"accounts": { +"methods": { +"get": { +"description": "Gets a GTM Account.", +"flatPath": "tagmanager/v1/accounts/{accountId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.get", +"parameterOrder": [ +"accountId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}", +"response": { +"$ref": "Account" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.manage.accounts", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Accounts that a user has access to.", +"flatPath": "tagmanager/v1/accounts", +"httpMethod": "GET", +"id": "tagmanager.accounts.list", +"parameterOrder": [], +"parameters": {}, +"path": "tagmanager/v1/accounts", +"response": { +"$ref": "ListAccountsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.manage.accounts", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a GTM Account.", +"flatPath": "tagmanager/v1/accounts/{accountId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.update", +"parameterOrder": [ +"accountId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the account in storage.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}", +"request": { +"$ref": "Account" +}, +"response": { +"$ref": "Account" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.accounts" +] +} +}, +"resources": { +"containers": { +"methods": { +"create": { +"description": "Creates a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.create", +"parameterOrder": [ +"accountId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers", +"request": { +"$ref": "Container" +}, +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.delete", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.delete.containers" +] +}, +"get": { +"description": "Gets a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.get", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}", +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all Containers that belongs to a GTM Account.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.list", +"parameterOrder": [ +"accountId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers", +"response": { +"$ref": "ListContainersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.update", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the container in storage.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}", +"request": { +"$ref": "Container" +}, +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +}, +"resources": { +"environments": { +"methods": { +"create": { +"description": "Creates a GTM Environment.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.environments.create", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments", +"request": { +"$ref": "Environment" +}, +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Environment.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.environments.delete", +"parameterOrder": [ +"accountId", +"containerId", +"environmentId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"environmentId": { +"description": "The GTM Environment ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Environment.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.environments.get", +"parameterOrder": [ +"accountId", +"containerId", +"environmentId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"environmentId": { +"description": "The GTM Environment ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}", +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Environments of a GTM Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.environments.list", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments", +"response": { +"$ref": "ListEnvironmentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a GTM Environment.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.environments.update", +"parameterOrder": [ +"accountId", +"containerId", +"environmentId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"environmentId": { +"description": "The GTM Environment ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the environment in storage.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/environments/{environmentId}", +"request": { +"$ref": "Environment" +}, +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"folders": { +"methods": { +"create": { +"description": "Creates a GTM Folder.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.folders.create", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders", +"request": { +"$ref": "Folder" +}, +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Folder.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.folders.delete", +"parameterOrder": [ +"accountId", +"containerId", +"folderId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"folderId": { +"description": "The GTM Folder ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Folder.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.folders.get", +"parameterOrder": [ +"accountId", +"containerId", +"folderId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"folderId": { +"description": "The GTM Folder ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}", +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Folders of a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.folders.list", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders", +"response": { +"$ref": "ListFoldersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a GTM Folder.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.folders.update", +"parameterOrder": [ +"accountId", +"containerId", +"folderId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the folder in storage.", +"location": "query", +"type": "string" +}, +"folderId": { +"description": "The GTM Folder ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}", +"request": { +"$ref": "Folder" +}, +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +}, +"resources": { +"entities": { +"methods": { +"list": { +"description": "List all entities in a GTM Folder.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.folders.entities.list", +"parameterOrder": [ +"accountId", +"containerId", +"folderId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"folderId": { +"description": "The GTM Folder ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/folders/{folderId}/entities", +"response": { +"$ref": "FolderEntities" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +} +} +} +} +}, +"move_folders": { +"methods": { +"update": { +"description": "Moves entities to a GTM Folder.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/move_folders/{folderId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.move_folders.update", +"parameterOrder": [ +"accountId", +"containerId", +"folderId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"folderId": { +"description": "The GTM Folder ID.", +"location": "path", +"required": true, +"type": "string" +}, +"tagId": { +"description": "The tags to be moved to the folder.", +"location": "query", +"repeated": true, +"type": "string" +}, +"triggerId": { +"description": "The triggers to be moved to the folder.", +"location": "query", +"repeated": true, +"type": "string" +}, +"variableId": { +"description": "The variables to be moved to the folder.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/move_folders/{folderId}", +"request": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"reauthorize_environments": { +"methods": { +"update": { +"description": "Re-generates the authorization code for a GTM Environment.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/reauthorize_environments/{environmentId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.reauthorize_environments.update", +"parameterOrder": [ +"accountId", +"containerId", +"environmentId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"environmentId": { +"description": "The GTM Environment ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/reauthorize_environments/{environmentId}", +"request": { +"$ref": "Environment" +}, +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.publish" +] +} +} +}, +"tags": { +"methods": { +"create": { +"description": "Creates a GTM Tag.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.tags.create", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags", +"request": { +"$ref": "Tag" +}, +"response": { +"$ref": "Tag" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Tag.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.tags.delete", +"parameterOrder": [ +"accountId", +"containerId", +"tagId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"tagId": { +"description": "The GTM Tag ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Tag.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.tags.get", +"parameterOrder": [ +"accountId", +"containerId", +"tagId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"tagId": { +"description": "The GTM Tag ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}", +"response": { +"$ref": "Tag" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Tags of a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.tags.list", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags", +"response": { +"$ref": "ListTagsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a GTM Tag.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.tags.update", +"parameterOrder": [ +"accountId", +"containerId", +"tagId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the tag in storage.", +"location": "query", +"type": "string" +}, +"tagId": { +"description": "The GTM Tag ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/tags/{tagId}", +"request": { +"$ref": "Tag" +}, +"response": { +"$ref": "Tag" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"triggers": { +"methods": { +"create": { +"description": "Creates a GTM Trigger.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.triggers.create", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers", +"request": { +"$ref": "Trigger" +}, +"response": { +"$ref": "Trigger" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Trigger.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.triggers.delete", +"parameterOrder": [ +"accountId", +"containerId", +"triggerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"triggerId": { +"description": "The GTM Trigger ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Trigger.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.triggers.get", +"parameterOrder": [ +"accountId", +"containerId", +"triggerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"triggerId": { +"description": "The GTM Trigger ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}", +"response": { +"$ref": "Trigger" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Triggers of a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.triggers.list", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers", +"response": { +"$ref": "ListTriggersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a GTM Trigger.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.triggers.update", +"parameterOrder": [ +"accountId", +"containerId", +"triggerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the trigger in storage.", +"location": "query", +"type": "string" +}, +"triggerId": { +"description": "The GTM Trigger ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/triggers/{triggerId}", +"request": { +"$ref": "Trigger" +}, +"response": { +"$ref": "Trigger" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"variables": { +"methods": { +"create": { +"description": "Creates a GTM Variable.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.variables.create", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables", +"request": { +"$ref": "Variable" +}, +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Variable.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.variables.delete", +"parameterOrder": [ +"accountId", +"containerId", +"variableId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"variableId": { +"description": "The GTM Variable ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Variable.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.variables.get", +"parameterOrder": [ +"accountId", +"containerId", +"variableId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"variableId": { +"description": "The GTM Variable ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}", +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Variables of a Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.variables.list", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables", +"response": { +"$ref": "ListVariablesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a GTM Variable.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.variables.update", +"parameterOrder": [ +"accountId", +"containerId", +"variableId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the variable in storage.", +"location": "query", +"type": "string" +}, +"variableId": { +"description": "The GTM Variable ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/variables/{variableId}", +"request": { +"$ref": "Variable" +}, +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"versions": { +"methods": { +"create": { +"description": "Creates a Container Version.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.versions.create", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions", +"request": { +"$ref": "CreateContainerVersionRequestVersionOptions" +}, +"response": { +"$ref": "CreateContainerVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +}, +"delete": { +"description": "Deletes a Container Version.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.versions.delete", +"parameterOrder": [ +"accountId", +"containerId", +"containerVersionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerVersionId": { +"description": "The GTM Container Version ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +}, +"get": { +"description": "Gets a Container Version.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.versions.get", +"parameterOrder": [ +"accountId", +"containerId", +"containerVersionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerVersionId": { +"description": "The GTM Container Version ID. Specify published to retrieve the currently published version.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}", +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.edit.containerversions", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all Container Versions of a GTM Container.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.versions.list", +"parameterOrder": [ +"accountId", +"containerId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"headers": { +"default": "false", +"description": "Retrieve headers only when true.", +"location": "query", +"type": "boolean" +}, +"includeDeleted": { +"default": "false", +"description": "Also retrieve deleted (archived) versions when true.", +"location": "query", +"type": "boolean" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions", +"response": { +"$ref": "ListContainerVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.edit.containerversions", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"publish": { +"description": "Publishes a Container Version.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/publish", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.versions.publish", +"parameterOrder": [ +"accountId", +"containerId", +"containerVersionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerVersionId": { +"description": "The GTM Container Version ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the container version in storage.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/publish", +"response": { +"$ref": "PublishContainerVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.publish" +] +}, +"restore": { +"description": "Restores a Container Version. This will overwrite the container's current configuration (including its variables, triggers and tags). The operation will not have any effect on the version that is being served (i.e. the published version).", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/restore", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.versions.restore", +"parameterOrder": [ +"accountId", +"containerId", +"containerVersionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerVersionId": { +"description": "The GTM Container Version ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/restore", +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"undelete": { +"description": "Undeletes a Container Version.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.versions.undelete", +"parameterOrder": [ +"accountId", +"containerId", +"containerVersionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerVersionId": { +"description": "The GTM Container Version ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}/undelete", +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +}, +"update": { +"description": "Updates a Container Version.", +"flatPath": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.versions.update", +"parameterOrder": [ +"accountId", +"containerId", +"containerVersionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerId": { +"description": "The GTM Container ID.", +"location": "path", +"required": true, +"type": "string" +}, +"containerVersionId": { +"description": "The GTM Container Version ID.", +"location": "path", +"required": true, +"type": "string" +}, +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the container version in storage.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/containers/{containerId}/versions/{containerVersionId}", +"request": { +"$ref": "ContainerVersion" +}, +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +} +} +} +} +}, +"permissions": { +"methods": { +"create": { +"description": "Creates a user's Account & Container Permissions.", +"flatPath": "tagmanager/v1/accounts/{accountId}/permissions", +"httpMethod": "POST", +"id": "tagmanager.accounts.permissions.create", +"parameterOrder": [ +"accountId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/permissions", +"request": { +"$ref": "UserAccess" +}, +"response": { +"$ref": "UserAccess" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"delete": { +"description": "Removes a user from the account, revoking access to it and all of its containers.", +"flatPath": "tagmanager/v1/accounts/{accountId}/permissions/{permissionId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.permissions.delete", +"parameterOrder": [ +"accountId", +"permissionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"permissionId": { +"description": "The GTM User ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/permissions/{permissionId}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"get": { +"description": "Gets a user's Account & Container Permissions.", +"flatPath": "tagmanager/v1/accounts/{accountId}/permissions/{permissionId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.permissions.get", +"parameterOrder": [ +"accountId", +"permissionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"permissionId": { +"description": "The GTM User ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/permissions/{permissionId}", +"response": { +"$ref": "UserAccess" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"list": { +"description": "List all users that have access to the account along with Account and Container Permissions granted to each of them.", +"flatPath": "tagmanager/v1/accounts/{accountId}/permissions", +"httpMethod": "GET", +"id": "tagmanager.accounts.permissions.list", +"parameterOrder": [ +"accountId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/permissions", +"response": { +"$ref": "ListAccountUsersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"update": { +"description": "Updates a user's Account & Container Permissions.", +"flatPath": "tagmanager/v1/accounts/{accountId}/permissions/{permissionId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.permissions.update", +"parameterOrder": [ +"accountId", +"permissionId" +], +"parameters": { +"accountId": { +"description": "The GTM Account ID.", +"location": "path", +"required": true, +"type": "string" +}, +"permissionId": { +"description": "The GTM User ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v1/accounts/{accountId}/permissions/{permissionId}", +"request": { +"$ref": "UserAccess" +}, +"response": { +"$ref": "UserAccess" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +} +} +} +} +} +}, +"revision": "20240419", +"rootUrl": "https://tagmanager.googleapis.com/", +"schemas": { +"Account": { +"description": "Represents a Google Tag Manager Account.", +"id": "Account", +"properties": { +"accountId": { +"description": "The Account ID uniquely identifies the GTM Account.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Account as computed at storage time. This value is recomputed whenever the account is modified.", +"type": "string" +}, +"name": { +"description": "Account display name. @mutable tagmanager.accounts.create @mutable tagmanager.accounts.update", +"type": "string" +}, +"shareData": { +"description": "Whether the account shares data anonymously with Google and others. @mutable tagmanager.accounts.create @mutable tagmanager.accounts.update", +"type": "boolean" +} +}, +"type": "object" +}, +"AccountAccess": { +"description": "Defines the Google Tag Manager Account access permissions.", +"id": "AccountAccess", +"properties": { +"permission": { +"annotations": { +"required": [ +"tagmanager.accounts.permissions.create" +] +}, +"description": "List of Account permissions. Valid account permissions are read and manage. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"items": { +"enum": [ +"read", +"edit", +"publish", +"delete", +"manage", +"editWorkspace" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Condition": { +"description": "Represents a predicate.", +"id": "Condition", +"properties": { +"parameter": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.triggers.create", +"tagmanager.accounts.containers.triggers.update" +] +}, +"description": "A list of named parameters (key/value), depending on the condition's type. Notes: - For binary operators, include parameters named arg0 and arg1 for specifying the left and right operands, respectively. - At this time, the left operand (arg0) must be a reference to a variable. - For case-insensitive Regex matching, include a boolean parameter named ignore_case that is set to true. If not specified or set to any other value, the matching will be case sensitive. - To negate an operator, include a boolean parameter named negate boolean parameter that is set to true. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.triggers.create", +"tagmanager.accounts.containers.triggers.update" +] +}, +"description": "The type of operator for this condition. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update", +"enum": [ +"equals", +"contains", +"startsWith", +"endsWith", +"matchRegex", +"greater", +"greaterOrEquals", +"less", +"lessOrEquals", +"cssSelector", +"urlMatches" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"Container": { +"description": "Represents a Google Tag Manager Container.", +"id": "Container", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "The Container ID uniquely identifies the GTM Container.", +"type": "string" +}, +"domainName": { +"description": "Optional list of domain names associated with the Container. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"enabledBuiltInVariable": { +"description": "List of enabled built-in variables. Valid values include: pageUrl, pageHostname, pagePath, referrer, event, clickElement, clickClasses, clickId, clickTarget, clickUrl, clickText, formElement, formClasses, formId, formTarget, formUrl, formText, errorMessage, errorUrl, errorLine, newHistoryFragment, oldHistoryFragment, newHistoryState, oldHistoryState, historySource, containerVersion, debugMode, randomNumber, containerId. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"items": { +"enum": [ +"pageUrl", +"pageHostname", +"pagePath", +"referrer", +"event", +"clickElement", +"clickClasses", +"clickId", +"clickTarget", +"clickUrl", +"clickText", +"firstPartyServingUrl", +"formElement", +"formClasses", +"formId", +"formTarget", +"formUrl", +"formText", +"environmentName", +"errorMessage", +"errorUrl", +"errorLine", +"newHistoryUrl", +"oldHistoryUrl", +"newHistoryFragment", +"oldHistoryFragment", +"newHistoryState", +"oldHistoryState", +"historySource", +"containerVersion", +"debugMode", +"randomNumber", +"containerId", +"appId", +"appName", +"appVersionCode", +"appVersionName", +"language", +"osVersion", +"platform", +"sdkVersion", +"deviceName", +"resolution", +"advertiserId", +"advertisingTrackingEnabled", +"htmlId", +"ampBrowserLanguage", +"ampCanonicalPath", +"ampCanonicalUrl", +"ampCanonicalHost", +"ampReferrer", +"ampTitle", +"ampClientId", +"ampClientTimezone", +"ampClientTimestamp", +"ampClientScreenWidth", +"ampClientScreenHeight", +"ampClientScrollX", +"ampClientScrollY", +"ampClientMaxScrollX", +"ampClientMaxScrollY", +"ampTotalEngagedTime", +"ampPageViewId", +"ampPageLoadTime", +"ampPageDownloadTime", +"ampGtmEvent", +"eventName", +"firebaseEventParameterCampaign", +"firebaseEventParameterCampaignAclid", +"firebaseEventParameterCampaignAnid", +"firebaseEventParameterCampaignClickTimestamp", +"firebaseEventParameterCampaignContent", +"firebaseEventParameterCampaignCp1", +"firebaseEventParameterCampaignGclid", +"firebaseEventParameterCampaignSource", +"firebaseEventParameterCampaignTerm", +"firebaseEventParameterCurrency", +"firebaseEventParameterDynamicLinkAcceptTime", +"firebaseEventParameterDynamicLinkLinkid", +"firebaseEventParameterNotificationMessageDeviceTime", +"firebaseEventParameterNotificationMessageId", +"firebaseEventParameterNotificationMessageName", +"firebaseEventParameterNotificationMessageTime", +"firebaseEventParameterNotificationTopic", +"firebaseEventParameterPreviousAppVersion", +"firebaseEventParameterPreviousOsVersion", +"firebaseEventParameterPrice", +"firebaseEventParameterProductId", +"firebaseEventParameterQuantity", +"firebaseEventParameterValue", +"videoProvider", +"videoUrl", +"videoTitle", +"videoDuration", +"videoPercent", +"videoVisible", +"videoStatus", +"videoCurrentTime", +"scrollDepthThreshold", +"scrollDepthUnits", +"scrollDepthDirection", +"elementVisibilityRatio", +"elementVisibilityTime", +"elementVisibilityFirstTime", +"elementVisibilityRecentTime" +], +"enumDescriptions": [ +"", +"", +"", +"", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"For web or mobile.", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Container as computed at storage time. This value is recomputed whenever the account is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.create" +] +}, +"description": "Container display name. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"type": "string" +}, +"notes": { +"description": "Container Notes. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"type": "string" +}, +"publicId": { +"description": "Container Public ID.", +"type": "string" +}, +"timeZoneCountryId": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.create" +] +}, +"description": "Container Country ID. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"type": "string" +}, +"timeZoneId": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.create" +] +}, +"description": "Container Time Zone ID. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"type": "string" +}, +"usageContext": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.create", +"tagmanager.accounts.containers.update" +] +}, +"description": "List of Usage Contexts for the Container. Valid values include: web, android, ios. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"items": { +"enum": [ +"web", +"android", +"ios", +"androidSdk5", +"iosSdk5", +"amp" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContainerAccess": { +"description": "Defines the Google Tag Manager Container access permissions.", +"id": "ContainerAccess", +"properties": { +"containerId": { +"description": "GTM Container ID. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"type": "string" +}, +"permission": { +"description": "List of Container permissions. Valid container permissions are: read, edit, delete, publish. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"items": { +"enum": [ +"read", +"edit", +"publish", +"delete", +"manage", +"editWorkspace" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContainerVersion": { +"description": "Represents a Google Tag Manager Container Version.", +"id": "ContainerVersion", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"container": { +"$ref": "Container", +"description": "The container that this version was taken from." +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"containerVersionId": { +"description": "The Container Version ID uniquely identifies the GTM Container Version.", +"type": "string" +}, +"deleted": { +"description": "A value of true indicates this container version has been deleted.", +"type": "boolean" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Container Version as computed at storage time. This value is recomputed whenever the container version is modified.", +"type": "string" +}, +"folder": { +"description": "The folders in the container that this version was taken from.", +"items": { +"$ref": "Folder" +}, +"type": "array" +}, +"macro": { +"deprecated": true, +"description": "The macros in the container that this version was taken from.", +"items": { +"$ref": "Macro" +}, +"type": "array" +}, +"name": { +"description": "Container version display name. @mutable tagmanager.accounts.containers.versions.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this container version in the container. @mutable tagmanager.accounts.containers.versions.update", +"type": "string" +}, +"rule": { +"deprecated": true, +"description": "The rules in the container that this version was taken from.", +"items": { +"$ref": "Rule" +}, +"type": "array" +}, +"tag": { +"description": "The tags in the container that this version was taken from.", +"items": { +"$ref": "Tag" +}, +"type": "array" +}, +"trigger": { +"description": "The triggers in the container that this version was taken from.", +"items": { +"$ref": "Trigger" +}, +"type": "array" +}, +"variable": { +"description": "The variables in the container that this version was taken from.", +"items": { +"$ref": "Variable" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContainerVersionHeader": { +"description": "Represents a Google Tag Manager Container Version Header.", +"id": "ContainerVersionHeader", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"containerVersionId": { +"description": "The Container Version ID uniquely identifies the GTM Container Version.", +"type": "string" +}, +"deleted": { +"description": "A value of true indicates this container version has been deleted.", +"type": "boolean" +}, +"name": { +"description": "Container version display name.", +"type": "string" +}, +"numMacros": { +"deprecated": true, +"description": "Number of macros in the container version.", +"type": "string" +}, +"numRules": { +"deprecated": true, +"description": "Number of rules in the container version.", +"type": "string" +}, +"numTags": { +"description": "Number of tags in the container version.", +"type": "string" +}, +"numTriggers": { +"description": "Number of triggers in the container version.", +"type": "string" +}, +"numVariables": { +"description": "Number of variables in the container version.", +"type": "string" +} +}, +"type": "object" +}, +"CreateContainerVersionRequestVersionOptions": { +"description": "Options for new container versions.", +"id": "CreateContainerVersionRequestVersionOptions", +"properties": { +"name": { +"description": "The name of the container version to be created.", +"type": "string" +}, +"notes": { +"description": "The notes of the container version to be created.", +"type": "string" +}, +"quickPreview": { +"description": "The creation of this version may be for quick preview and shouldn't be saved.", +"type": "boolean" +} +}, +"type": "object" +}, +"CreateContainerVersionResponse": { +"description": "Create container versions response.", +"id": "CreateContainerVersionResponse", +"properties": { +"compilerError": { +"description": "Compiler errors or not.", +"type": "boolean" +}, +"containerVersion": { +"$ref": "ContainerVersion", +"description": "The container version created." +} +}, +"type": "object" +}, +"Environment": { +"description": "Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.", +"id": "Environment", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"authorizationCode": { +"description": "The environment authorization code.", +"type": "string" +}, +"authorizationTimestampMs": { +"description": "The last update time-stamp for the authorization code.", +"format": "int64", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"containerVersionId": { +"type": "string" +}, +"description": { +"description": "The environment description. Can be set or changed only on USER type environments. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "string" +}, +"enableDebug": { +"description": "Whether or not to enable debug by default on for the environment. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "boolean" +}, +"environmentId": { +"description": "GTM Environment ID uniquely identifies the GTM Environment.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.environments.create", +"tagmanager.accounts.containers.environments.update" +] +}, +"description": "The environment display name. Can be set or changed only on USER type environments. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "string" +}, +"type": { +"description": "The type of this environment.", +"enum": [ +"user", +"live", +"latest", +"draft" +], +"enumDescriptions": [ +"Used for user defined environments.", +"Used for Live environment, which points to the live published container version.", +"Used for Latest environment, which points to the latest created container version.", +"Used for Draft environment, which points to the single draft in the container." +], +"type": "string" +}, +"url": { +"description": "Default preview page url for the environment. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "string" +} +}, +"type": "object" +}, +"Folder": { +"description": "Represents a Google Tag Manager Folder.", +"id": "Folder", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Folder as computed at storage time. This value is recomputed whenever the folder is modified.", +"type": "string" +}, +"folderId": { +"description": "The Folder ID uniquely identifies the GTM Folder.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.folders.create", +"tagmanager.accounts.containers.folders.update" +] +}, +"description": "Folder display name. @mutable tagmanager.accounts.containers.folders.create @mutable tagmanager.accounts.containers.folders.update", +"type": "string" +} +}, +"type": "object" +}, +"FolderEntities": { +"description": "Represents a Google Tag Manager Folder's contents.", +"id": "FolderEntities", +"properties": { +"tag": { +"description": "The list of tags inside the folder.", +"items": { +"$ref": "Tag" +}, +"type": "array" +}, +"trigger": { +"description": "The list of triggers inside the folder.", +"items": { +"$ref": "Trigger" +}, +"type": "array" +}, +"variable": { +"description": "The list of variables inside the folder.", +"items": { +"$ref": "Variable" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListAccountUsersResponse": { +"description": "List AccountUsers Response.", +"id": "ListAccountUsersResponse", +"properties": { +"userAccess": { +"description": "All GTM AccountUsers of a GTM Account.", +"items": { +"$ref": "UserAccess" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListAccountsResponse": { +"description": "List Accounts Response.", +"id": "ListAccountsResponse", +"properties": { +"accounts": { +"description": "List of GTM Accounts that a user has access to.", +"items": { +"$ref": "Account" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListContainerVersionsResponse": { +"description": "List container versions response.", +"id": "ListContainerVersionsResponse", +"properties": { +"containerVersion": { +"description": "All versions of a GTM Container.", +"items": { +"$ref": "ContainerVersion" +}, +"type": "array" +}, +"containerVersionHeader": { +"description": "All container version headers of a GTM Container.", +"items": { +"$ref": "ContainerVersionHeader" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListContainersResponse": { +"description": "List Containers Response.", +"id": "ListContainersResponse", +"properties": { +"containers": { +"description": "All Containers of a GTM Account.", +"items": { +"$ref": "Container" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListEnvironmentsResponse": { +"description": "List Environments Response.", +"id": "ListEnvironmentsResponse", +"properties": { +"environments": { +"description": "All Environments of a GTM Container.", +"items": { +"$ref": "Environment" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListFoldersResponse": { +"description": "List Folders Response.", +"id": "ListFoldersResponse", +"properties": { +"folders": { +"description": "All GTM Folders of a GTM Container.", +"items": { +"$ref": "Folder" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTagsResponse": { +"description": "List Tags Response.", +"id": "ListTagsResponse", +"properties": { +"tags": { +"description": "All GTM Tags of a GTM Container.", +"items": { +"$ref": "Tag" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTriggersResponse": { +"description": "List triggers response.", +"id": "ListTriggersResponse", +"properties": { +"triggers": { +"description": "All GTM Triggers of a GTM Container.", +"items": { +"$ref": "Trigger" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVariablesResponse": { +"description": "List Variables Response.", +"id": "ListVariablesResponse", +"properties": { +"variables": { +"description": "All GTM Variables of a GTM Container.", +"items": { +"$ref": "Variable" +}, +"type": "array" +} +}, +"type": "object" +}, +"Macro": { +"description": "Represents a Google Tag Manager Macro.", +"id": "Macro", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"disablingRuleId": { +"description": "For mobile containers only: A list of rule IDs for disabling conditional macros; the macro is enabled if one of the enabling rules is true while all the disabling rules are false. Treated as an unordered set. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"enablingRuleId": { +"description": "For mobile containers only: A list of rule IDs for enabling conditional macros; the macro is enabled if one of the enabling rules is true while all the disabling rules are false. Treated as an unordered set. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Macro as computed at storage time. This value is recomputed whenever the macro is modified.", +"type": "string" +}, +"macroId": { +"description": "The Macro ID uniquely identifies the GTM Macro.", +"type": "string" +}, +"name": { +"description": "Macro display name. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this macro in the container. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"type": "string" +}, +"parameter": { +"description": "The macro's parameters. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"scheduleEndMs": { +"description": "The end timestamp in milliseconds to schedule a macro. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"format": "int64", +"type": "string" +}, +"scheduleStartMs": { +"description": "The start timestamp in milliseconds to schedule a macro. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"format": "int64", +"type": "string" +}, +"type": { +"description": "GTM Macro Type. @mutable tagmanager.accounts.containers.macros.create @mutable tagmanager.accounts.containers.macros.update", +"type": "string" +} +}, +"type": "object" +}, +"Parameter": { +"description": "Represents a Google Tag Manager Parameter.", +"id": "Parameter", +"properties": { +"key": { +"description": "The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"type": "string" +}, +"list": { +"description": "This list parameter's parameters (keys will be ignored). @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"map": { +"description": "This map parameter's parameters (must have keys; keys must be unique). @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.tags.create", +"tagmanager.accounts.containers.tags.update", +"tagmanager.accounts.containers.triggers.create", +"tagmanager.accounts.containers.triggers.update", +"tagmanager.accounts.containers.variables.create", +"tagmanager.accounts.containers.variables.update" +] +}, +"description": "The parameter type. Valid values are: - boolean: The value represents a boolean, represented as 'true' or 'false' - integer: The value represents a 64-bit signed integer value, in base 10 - list: A list of parameters should be specified - map: A map of parameters should be specified - template: The value represents any text; this can include variable references (even variable references that might return non-string types) - trigger_reference: The value represents a trigger, represented as the trigger id - tag_reference: The value represents a tag, represented as the tag name @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"enum": [ +"template", +"integer", +"boolean", +"list", +"map", +"triggerReference", +"tagReference" +], +"enumDescriptions": [ +"May include variable references (such as \"{{myVariable}}\").", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"value": { +"description": "A parameter's value (may contain variable references such as \"{{myVariable}}\") as appropriate to the specified type. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"type": "string" +} +}, +"type": "object" +}, +"PublishContainerVersionResponse": { +"description": "Publish container version response.", +"id": "PublishContainerVersionResponse", +"properties": { +"compilerError": { +"description": "Compiler errors or not.", +"type": "boolean" +}, +"containerVersion": { +"$ref": "ContainerVersion", +"description": "The container version created." +} +}, +"type": "object" +}, +"Rule": { +"description": "Represents a Google Tag Manager Rule.", +"id": "Rule", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"condition": { +"description": "The list of conditions that make up this rule (implicit AND between them). @mutable tagmanager.accounts.containers.rules.create @mutable tagmanager.accounts.containers.rules.update", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Rule as computed at storage time. This value is recomputed whenever the rule is modified.", +"type": "string" +}, +"name": { +"description": "Rule display name. @mutable tagmanager.accounts.containers.rules.create @mutable tagmanager.accounts.containers.rules.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this rule in the container. @mutable tagmanager.accounts.containers.rules.create @mutable tagmanager.accounts.containers.rules.update", +"type": "string" +}, +"ruleId": { +"description": "The Rule ID uniquely identifies the GTM Rule.", +"type": "string" +} +}, +"type": "object" +}, +"SetupTag": { +"id": "SetupTag", +"properties": { +"stopOnSetupFailure": { +"description": "If true, fire the main tag if and only if the setup tag fires successfully. If false, fire the main tag regardless of setup tag firing status.", +"type": "boolean" +}, +"tagName": { +"description": "The name of the setup tag.", +"type": "string" +} +}, +"type": "object" +}, +"Tag": { +"description": "Represents a Google Tag Manager Tag.", +"id": "Tag", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"blockingRuleId": { +"deprecated": true, +"description": "Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"blockingTriggerId": { +"description": "Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.", +"type": "string" +}, +"firingRuleId": { +"deprecated": true, +"description": "Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"firingTriggerId": { +"description": "Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"liveOnly": { +"description": "If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode). @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"type": "boolean" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.tags.create", +"tagmanager.accounts.containers.tags.update" +] +}, +"description": "Tag display name. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this tag in the container. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"type": "string" +}, +"parameter": { +"description": "The tag's parameters. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"paused": { +"description": "True if the tag is paused. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"type": "boolean" +}, +"priority": { +"$ref": "Parameter", +"description": "User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update" +}, +"scheduleEndMs": { +"description": "The end timestamp in milliseconds to schedule a tag. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"format": "int64", +"type": "string" +}, +"scheduleStartMs": { +"description": "The start timestamp in milliseconds to schedule a tag. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"format": "int64", +"type": "string" +}, +"setupTag": { +"description": "The list of setup tags. Currently we only allow one.", +"items": { +"$ref": "SetupTag" +}, +"type": "array" +}, +"tagFiringOption": { +"description": "Option to fire this tag.", +"enum": [ +"unlimited", +"oncePerEvent", +"oncePerLoad" +], +"enumDescriptions": [ +"Tag can be fired multiple times per event.", +"Tag can only be fired per event but can be fired multiple times per load (e.g., app load or page load).", +"Tag can only be fired per load (e.g., app load or page load)." +], +"type": "string" +}, +"tagId": { +"description": "The Tag ID uniquely identifies the GTM Tag.", +"type": "string" +}, +"teardownTag": { +"description": "The list of teardown tags. Currently we only allow one.", +"items": { +"$ref": "TeardownTag" +}, +"type": "array" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.tags.create" +] +}, +"description": "GTM Tag Type. @mutable tagmanager.accounts.containers.tags.create @mutable tagmanager.accounts.containers.tags.update", +"type": "string" +} +}, +"type": "object" +}, +"TeardownTag": { +"id": "TeardownTag", +"properties": { +"stopTeardownOnFailure": { +"description": "If true, fire the teardown tag if and only if the main tag fires successfully. If false, fire the teardown tag regardless of main tag firing status.", +"type": "boolean" +}, +"tagName": { +"description": "The name of the teardown tag.", +"type": "string" +} +}, +"type": "object" +}, +"Trigger": { +"description": "Represents a Google Tag Manager Trigger", +"id": "Trigger", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"autoEventFilter": { +"description": "Used in the case of auto event tracking. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"checkValidation": { +"$ref": "Parameter", +"description": "Whether or not we should only fire tags if the form submit or link click event is not cancelled by some other event handler (e.g. because of validation). Only valid for Form Submission and Link Click triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"continuousTimeMinMilliseconds": { +"$ref": "Parameter", +"description": "A visibility trigger minimum continuous visible time (in milliseconds). Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"customEventFilter": { +"description": "Used in the case of custom event, which is fired iff all Conditions are true. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"eventName": { +"$ref": "Parameter", +"description": "Name of the GTM event that is fired. Only valid for Timer triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"filter": { +"description": "The trigger will only fire iff all Conditions are true. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Trigger as computed at storage time. This value is recomputed whenever the trigger is modified.", +"type": "string" +}, +"horizontalScrollPercentageList": { +"$ref": "Parameter", +"description": "List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled horizontally. Only valid for AMP scroll triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"interval": { +"$ref": "Parameter", +"description": "Time between triggering recurring Timer Events (in milliseconds). Only valid for Timer triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"intervalSeconds": { +"$ref": "Parameter", +"description": "Time between Timer Events to fire (in seconds). Only valid for AMP Timer trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"limit": { +"$ref": "Parameter", +"description": "Limit of the number of GTM events this Timer Trigger will fire. If no limit is set, we will continue to fire GTM events until the user leaves the page. Only valid for Timer triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"maxTimerLengthSeconds": { +"$ref": "Parameter", +"description": "Max time to fire Timer Events (in seconds). Only valid for AMP Timer trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.triggers.create", +"tagmanager.accounts.containers.triggers.update" +] +}, +"description": "Trigger display name. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update", +"type": "string" +}, +"parameter": { +"description": "Additional parameters. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"selector": { +"$ref": "Parameter", +"description": "A click trigger CSS selector (i.e. \"a\", \"button\" etc.). Only valid for AMP Click trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"totalTimeMinMilliseconds": { +"$ref": "Parameter", +"description": "A visibility trigger minimum total visible time (in milliseconds). Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"triggerId": { +"description": "The Trigger ID uniquely identifies the GTM Trigger.", +"type": "string" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.triggers.create" +] +}, +"description": "Defines the data layer event that causes this trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update", +"enum": [ +"pageview", +"domReady", +"windowLoaded", +"customEvent", +"triggerGroup", +"always", +"formSubmission", +"click", +"linkClick", +"jsError", +"historyChange", +"timer", +"ampClick", +"ampTimer", +"ampScroll", +"ampVisibility", +"youTubeVideo", +"scrollDepth", +"elementVisibility" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"uniqueTriggerId": { +"$ref": "Parameter", +"description": "Globally unique id of the trigger that auto-generates this (a Form Submit, Link Click or Timer listener) if any. Used to make incompatible auto-events work together with trigger filtering based on trigger ids. This value is populated during output generation since the tags implied by triggers don't exist until then. Only valid for Form Submit, Link Click and Timer triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"verticalScrollPercentageList": { +"$ref": "Parameter", +"description": "List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled vertically. Only valid for AMP scroll triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"visibilitySelector": { +"$ref": "Parameter", +"description": "A visibility trigger CSS selector (i.e. \"#id\"). Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"visiblePercentageMax": { +"$ref": "Parameter", +"description": "A visibility trigger maximum percent visibility. Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"visiblePercentageMin": { +"$ref": "Parameter", +"description": "A visibility trigger minimum percent visibility. Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"waitForTags": { +"$ref": "Parameter", +"description": "Whether or not we should delay the form submissions or link opening until all of the tags have fired (by preventing the default action and later simulating the default action). Only valid for Form Submission and Link Click triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +}, +"waitForTagsTimeout": { +"$ref": "Parameter", +"description": "How long to wait (in milliseconds) for tags to fire when 'waits_for_tags' above evaluates to true. Only valid for Form Submission and Link Click triggers. @mutable tagmanager.accounts.containers.triggers.create @mutable tagmanager.accounts.containers.triggers.update" +} +}, +"type": "object" +}, +"UserAccess": { +"description": "Represents a user's permissions to an account and its container.", +"id": "UserAccess", +"properties": { +"accountAccess": { +"$ref": "AccountAccess", +"annotations": { +"required": [ +"tagmanager.accounts.permissions.create" +] +}, +"description": "GTM Account access permissions. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update" +}, +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerAccess": { +"description": "GTM Container access permissions. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"items": { +"$ref": "ContainerAccess" +}, +"type": "array" +}, +"emailAddress": { +"annotations": { +"required": [ +"tagmanager.accounts.permissions.create" +] +}, +"description": "User's email address. @mutable tagmanager.accounts.permissions.create", +"type": "string" +}, +"permissionId": { +"description": "Account Permission ID.", +"type": "string" +} +}, +"type": "object" +}, +"Variable": { +"description": "Represents a Google Tag Manager Variable.", +"id": "Variable", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"disablingTriggerId": { +"description": "For mobile containers only: A list of trigger IDs for disabling conditional variables; the variable is enabled if one of the enabling trigger is true while all the disabling trigger are false. Treated as an unordered set. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"enablingTriggerId": { +"description": "For mobile containers only: A list of trigger IDs for enabling conditional variables; the variable is enabled if one of the enabling triggers is true while all the disabling triggers are false. Treated as an unordered set. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Variable as computed at storage time. This value is recomputed whenever the variable is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.variables.create", +"tagmanager.accounts.containers.variables.update" +] +}, +"description": "Variable display name. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this variable in the container. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"type": "string" +}, +"parameter": { +"description": "The variable's parameters. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"scheduleEndMs": { +"description": "The end timestamp in milliseconds to schedule a variable. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"format": "int64", +"type": "string" +}, +"scheduleStartMs": { +"description": "The start timestamp in milliseconds to schedule a variable. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"format": "int64", +"type": "string" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.variables.create", +"tagmanager.accounts.containers.variables.update" +] +}, +"description": "GTM Variable Type. @mutable tagmanager.accounts.containers.variables.create @mutable tagmanager.accounts.containers.variables.update", +"type": "string" +}, +"variableId": { +"description": "The Variable ID uniquely identifies the GTM Variable.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Tag Manager API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tagmanager.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tagmanager.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..e8500f00f5b365d432c21636176175b0ead07113 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tagmanager.v2.json @@ -0,0 +1,6619 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/tagmanager.delete.containers": { +"description": "Delete your Google Tag Manager containers" +}, +"https://www.googleapis.com/auth/tagmanager.edit.containers": { +"description": "Manage your Google Tag Manager container and its subcomponents, excluding versioning and publishing" +}, +"https://www.googleapis.com/auth/tagmanager.edit.containerversions": { +"description": "Manage your Google Tag Manager container versions" +}, +"https://www.googleapis.com/auth/tagmanager.manage.accounts": { +"description": "View and manage your Google Tag Manager accounts" +}, +"https://www.googleapis.com/auth/tagmanager.manage.users": { +"description": "Manage user permissions of your Google Tag Manager account and container" +}, +"https://www.googleapis.com/auth/tagmanager.publish": { +"description": "Publish your Google Tag Manager container versions" +}, +"https://www.googleapis.com/auth/tagmanager.readonly": { +"description": "View your Google Tag Manager container and its subcomponents" +} +} +} +}, +"basePath": "", +"baseUrl": "https://tagmanager.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Tag Manager", +"description": "This API allows clients to access and modify container and tag configuration.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/tag-manager", +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "tagmanager:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://tagmanager.mtls.googleapis.com/", +"name": "tagmanager", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"accounts": { +"methods": { +"get": { +"description": "Gets a GTM Account.", +"flatPath": "tagmanager/v2/accounts/{accountsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Account's API relative path. Example: accounts/{account_id}", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Account" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.manage.accounts", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Accounts that a user has access to.", +"flatPath": "tagmanager/v2/accounts", +"httpMethod": "GET", +"id": "tagmanager.accounts.list", +"parameterOrder": [], +"parameters": { +"includeGoogleTags": { +"description": "Also retrieve accounts associated with Google Tag when true.", +"location": "query", +"type": "boolean" +}, +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v2/accounts", +"response": { +"$ref": "ListAccountsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.manage.accounts", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a GTM Account.", +"flatPath": "tagmanager/v2/accounts/{accountsId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the account in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Account's API relative path. Example: accounts/{account_id}", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Account" +}, +"response": { +"$ref": "Account" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.accounts" +] +} +}, +"resources": { +"containers": { +"methods": { +"combine": { +"description": "Combines Containers.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}:combine", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.combine", +"parameterOrder": [ +"path" +], +"parameters": { +"allowUserPermissionFeatureUpdate": { +"description": "Must be set to true to allow features.user_permissions to change from false to true. If this operation causes an update but this bit is false, the operation will fail.", +"location": "query", +"type": "boolean" +}, +"containerId": { +"description": "ID of container that will be merged into the current container.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +}, +"settingSource": { +"description": "Specify the source of config setting after combine", +"enum": [ +"settingSourceUnspecified", +"current", +"other" +], +"enumDescriptions": [ +"", +"Keep the current container config setting after combine", +"Use config setting from the other tag after combine" +], +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:combine", +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"create": { +"description": "Creates a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Account's API relative path. Example: accounts/{account_id}.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/containers", +"request": { +"$ref": "Container" +}, +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.delete.containers" +] +}, +"get": { +"description": "Gets a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all Containers that belongs to a GTM Account.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Account's API relative path. Example: accounts/{account_id}.", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/containers", +"response": { +"$ref": "ListContainersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"lookup": { +"description": "Looks up a Container by destination ID.", +"flatPath": "tagmanager/v2/accounts/containers:lookup", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.lookup", +"parameterOrder": [], +"parameters": { +"destinationId": { +"description": "Destination ID linked to a GTM Container, e.g. AW-123456789. Example: accounts/containers:lookup?destination_id={destination_id}.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v2/accounts/containers:lookup", +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"move_tag_id": { +"description": "Move Tag ID out of a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}:move_tag_id", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.move_tag_id", +"parameterOrder": [ +"path" +], +"parameters": { +"allowUserPermissionFeatureUpdate": { +"description": "Must be set to true to allow features.user_permissions to change from false to true. If this operation causes an update but this bit is false, the operation will fail.", +"location": "query", +"type": "boolean" +}, +"copySettings": { +"description": "Whether or not to copy tag settings from this tag to the new tag.", +"location": "query", +"type": "boolean" +}, +"copyTermsOfService": { +"description": "Must be set to true to accept all terms of service agreements copied from the current tag to the newly created tag. If this bit is false, the operation will fail.", +"location": "query", +"type": "boolean" +}, +"copyUsers": { +"description": "Whether or not to copy users from this tag to the new tag.", +"location": "query", +"type": "boolean" +}, +"path": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +}, +"tagId": { +"description": "Tag ID to be removed from the current Container.", +"location": "query", +"type": "string" +}, +"tagName": { +"description": "The name for the newly created tag.", +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:move_tag_id", +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"snippet": { +"description": "Gets the tagging snippet for a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}:snippet", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.snippet", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "Container snippet's API relative path. Example: accounts/{account_id}/containers/{container_id}:snippet", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:snippet", +"response": { +"$ref": "GetContainerSnippetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the container in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Container" +}, +"response": { +"$ref": "Container" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +}, +"resources": { +"destinations": { +"methods": { +"get": { +"description": "Gets a Destination.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/destinations/{destinationsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.destinations.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "Google Tag Destination's API relative path. Example: accounts/{account_id}/containers/{container_id}/destinations/{destination_link_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/destinations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Destination" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"link": { +"description": "Adds a Destination to this Container and removes it from the Container to which it is currently linked.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/destinations:link", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.destinations.link", +"parameterOrder": [ +"parent" +], +"parameters": { +"allowUserPermissionFeatureUpdate": { +"description": "Must be set to true to allow features.user_permissions to change from false to true. If this operation causes an update but this bit is false, the operation will fail.", +"location": "query", +"type": "boolean" +}, +"destinationId": { +"description": "Destination ID to be linked to the current container.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM parent Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/destinations:link", +"response": { +"$ref": "Destination" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"list": { +"description": "Lists all Destinations linked to a GTM Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/destinations", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.destinations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM parent Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/destinations", +"response": { +"$ref": "ListDestinationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +} +} +}, +"environments": { +"methods": { +"create": { +"description": "Creates a GTM Environment.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/environments", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.environments.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/environments", +"request": { +"$ref": "Environment" +}, +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Environment.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/environments/{environmentsId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.environments.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/environments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Environment.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/environments/{environmentsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.environments.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/environments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Environments of a GTM Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/environments", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.environments.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/environments", +"response": { +"$ref": "ListEnvironmentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"reauthorize": { +"description": "Re-generates the authorization code for a GTM Environment.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/environments/{environmentsId}:reauthorize", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.environments.reauthorize", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/environments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:reauthorize", +"request": { +"$ref": "Environment" +}, +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.publish" +] +}, +"update": { +"description": "Updates a GTM Environment.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/environments/{environmentsId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.environments.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the environment in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Environment's API relative path. Example: accounts/{account_id}/containers/{container_id}/environments/{environment_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/environments/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Environment" +}, +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"version_headers": { +"methods": { +"latest": { +"description": "Gets the latest container version header", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/version_headers:latest", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.version_headers.latest", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/version_headers:latest", +"response": { +"$ref": "ContainerVersionHeader" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all Container Versions of a GTM Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/version_headers", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.version_headers.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"includeDeleted": { +"description": "Also retrieve deleted (archived) versions when true.", +"location": "query", +"type": "boolean" +}, +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/version_headers", +"response": { +"$ref": "ListContainerVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.edit.containerversions", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +} +} +}, +"versions": { +"methods": { +"delete": { +"description": "Deletes a Container Version.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/versions/{versionsId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.versions.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +}, +"get": { +"description": "Gets a Container Version.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/versions/{versionsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.versions.get", +"parameterOrder": [ +"path" +], +"parameters": { +"containerVersionId": { +"description": "The GTM ContainerVersion ID. Specify published to retrieve the currently published version.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.edit.containerversions", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"live": { +"description": "Gets the live (i.e. published) container version", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/versions:live", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.versions.live", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/versions:live", +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"publish": { +"description": "Publishes a Container Version.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/versions/{versionsId}:publish", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.versions.publish", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the container version in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:publish", +"response": { +"$ref": "PublishContainerVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.publish" +] +}, +"set_latest": { +"description": "Sets the latest version used for synchronization of workspaces when detecting conflicts and errors.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/versions/{versionsId}:set_latest", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.versions.set_latest", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:set_latest", +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"undelete": { +"description": "Undeletes a Container Version.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/versions/{versionsId}:undelete", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.versions.undelete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:undelete", +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +}, +"update": { +"description": "Updates a Container Version.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/versions/{versionsId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.versions.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the container version in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM ContainerVersion's API relative path. Example: accounts/{account_id}/containers/{container_id}/versions/{version_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "ContainerVersion" +}, +"response": { +"$ref": "ContainerVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +} +} +}, +"workspaces": { +"methods": { +"create": { +"description": "Creates a Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM parent Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/workspaces", +"request": { +"$ref": "Workspace" +}, +"response": { +"$ref": "Workspace" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"create_version": { +"description": "Creates a Container Version from the entities present in the workspace, deletes the workspace, and sets the base container version to the newly created version.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}:create_version", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.create_version", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:create_version", +"request": { +"$ref": "CreateContainerVersionRequestVersionOptions" +}, +"response": { +"$ref": "CreateContainerVersionResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +}, +"delete": { +"description": "Deletes a Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.delete.containers" +] +}, +"get": { +"description": "Gets a Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Workspace" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"getStatus": { +"description": "Finds conflicting and modified entities in the workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/status", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.getStatus", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}/status", +"response": { +"$ref": "GetWorkspaceStatusResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all Workspaces that belong to a GTM Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM parent Container's API relative path. Example: accounts/{account_id}/containers/{container_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/workspaces", +"response": { +"$ref": "ListWorkspacesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"quick_preview": { +"description": "Quick previews a workspace by creating a fake container version from all entities in the provided workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}:quick_preview", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.quick_preview", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:quick_preview", +"response": { +"$ref": "QuickPreviewResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containerversions" +] +}, +"resolve_conflict": { +"description": "Resolves a merge conflict for a workspace entity by updating it to the resolved entity passed in the request.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}:resolve_conflict", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.resolve_conflict", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the entity_in_workspace in the merge conflict.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:resolve_conflict", +"request": { +"$ref": "Entity" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"sync": { +"description": "Syncs a workspace to the latest container version by updating all unmodified workspace entities and displaying conflicts for modified entities.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}:sync", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.sync", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:sync", +"response": { +"$ref": "SyncWorkspaceResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the workspace in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Workspace" +}, +"response": { +"$ref": "Workspace" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +}, +"resources": { +"built_in_variables": { +"methods": { +"create": { +"description": "Creates one or more GTM Built-In Variables.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/built_in_variables", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.built_in_variables.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +}, +"type": { +"description": "The types of built-in variables to enable.", +"enum": [ +"builtInVariableTypeUnspecified", +"pageUrl", +"pageHostname", +"pagePath", +"referrer", +"event", +"clickElement", +"clickClasses", +"clickId", +"clickTarget", +"clickUrl", +"clickText", +"firstPartyServingUrl", +"formElement", +"formClasses", +"formId", +"formTarget", +"formUrl", +"formText", +"errorMessage", +"errorUrl", +"errorLine", +"newHistoryUrl", +"oldHistoryUrl", +"newHistoryFragment", +"oldHistoryFragment", +"newHistoryState", +"oldHistoryState", +"historySource", +"containerVersion", +"debugMode", +"randomNumber", +"containerId", +"appId", +"appName", +"appVersionCode", +"appVersionName", +"language", +"osVersion", +"platform", +"sdkVersion", +"deviceName", +"resolution", +"advertiserId", +"advertisingTrackingEnabled", +"htmlId", +"environmentName", +"ampBrowserLanguage", +"ampCanonicalPath", +"ampCanonicalUrl", +"ampCanonicalHost", +"ampReferrer", +"ampTitle", +"ampClientId", +"ampClientTimezone", +"ampClientTimestamp", +"ampClientScreenWidth", +"ampClientScreenHeight", +"ampClientScrollX", +"ampClientScrollY", +"ampClientMaxScrollX", +"ampClientMaxScrollY", +"ampTotalEngagedTime", +"ampPageViewId", +"ampPageLoadTime", +"ampPageDownloadTime", +"ampGtmEvent", +"eventName", +"firebaseEventParameterCampaign", +"firebaseEventParameterCampaignAclid", +"firebaseEventParameterCampaignAnid", +"firebaseEventParameterCampaignClickTimestamp", +"firebaseEventParameterCampaignContent", +"firebaseEventParameterCampaignCp1", +"firebaseEventParameterCampaignGclid", +"firebaseEventParameterCampaignSource", +"firebaseEventParameterCampaignTerm", +"firebaseEventParameterCurrency", +"firebaseEventParameterDynamicLinkAcceptTime", +"firebaseEventParameterDynamicLinkLinkid", +"firebaseEventParameterNotificationMessageDeviceTime", +"firebaseEventParameterNotificationMessageId", +"firebaseEventParameterNotificationMessageName", +"firebaseEventParameterNotificationMessageTime", +"firebaseEventParameterNotificationTopic", +"firebaseEventParameterPreviousAppVersion", +"firebaseEventParameterPreviousOsVersion", +"firebaseEventParameterPrice", +"firebaseEventParameterProductId", +"firebaseEventParameterQuantity", +"firebaseEventParameterValue", +"videoProvider", +"videoUrl", +"videoTitle", +"videoDuration", +"videoPercent", +"videoVisible", +"videoStatus", +"videoCurrentTime", +"scrollDepthThreshold", +"scrollDepthUnits", +"scrollDepthDirection", +"elementVisibilityRatio", +"elementVisibilityTime", +"elementVisibilityFirstTime", +"elementVisibilityRecentTime", +"requestPath", +"requestMethod", +"clientName", +"queryString", +"serverPageLocationUrl", +"serverPageLocationPath", +"serverPageLocationHostname", +"visitorRegion" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"For web or mobile.", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/built_in_variables", +"response": { +"$ref": "CreateBuiltInVariableResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes one or more GTM Built-In Variables.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/built_in_variables", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.built_in_variables.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM BuiltInVariable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_variables", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/built_in_variables$", +"required": true, +"type": "string" +}, +"type": { +"description": "The types of built-in variables to delete.", +"enum": [ +"builtInVariableTypeUnspecified", +"pageUrl", +"pageHostname", +"pagePath", +"referrer", +"event", +"clickElement", +"clickClasses", +"clickId", +"clickTarget", +"clickUrl", +"clickText", +"firstPartyServingUrl", +"formElement", +"formClasses", +"formId", +"formTarget", +"formUrl", +"formText", +"errorMessage", +"errorUrl", +"errorLine", +"newHistoryUrl", +"oldHistoryUrl", +"newHistoryFragment", +"oldHistoryFragment", +"newHistoryState", +"oldHistoryState", +"historySource", +"containerVersion", +"debugMode", +"randomNumber", +"containerId", +"appId", +"appName", +"appVersionCode", +"appVersionName", +"language", +"osVersion", +"platform", +"sdkVersion", +"deviceName", +"resolution", +"advertiserId", +"advertisingTrackingEnabled", +"htmlId", +"environmentName", +"ampBrowserLanguage", +"ampCanonicalPath", +"ampCanonicalUrl", +"ampCanonicalHost", +"ampReferrer", +"ampTitle", +"ampClientId", +"ampClientTimezone", +"ampClientTimestamp", +"ampClientScreenWidth", +"ampClientScreenHeight", +"ampClientScrollX", +"ampClientScrollY", +"ampClientMaxScrollX", +"ampClientMaxScrollY", +"ampTotalEngagedTime", +"ampPageViewId", +"ampPageLoadTime", +"ampPageDownloadTime", +"ampGtmEvent", +"eventName", +"firebaseEventParameterCampaign", +"firebaseEventParameterCampaignAclid", +"firebaseEventParameterCampaignAnid", +"firebaseEventParameterCampaignClickTimestamp", +"firebaseEventParameterCampaignContent", +"firebaseEventParameterCampaignCp1", +"firebaseEventParameterCampaignGclid", +"firebaseEventParameterCampaignSource", +"firebaseEventParameterCampaignTerm", +"firebaseEventParameterCurrency", +"firebaseEventParameterDynamicLinkAcceptTime", +"firebaseEventParameterDynamicLinkLinkid", +"firebaseEventParameterNotificationMessageDeviceTime", +"firebaseEventParameterNotificationMessageId", +"firebaseEventParameterNotificationMessageName", +"firebaseEventParameterNotificationMessageTime", +"firebaseEventParameterNotificationTopic", +"firebaseEventParameterPreviousAppVersion", +"firebaseEventParameterPreviousOsVersion", +"firebaseEventParameterPrice", +"firebaseEventParameterProductId", +"firebaseEventParameterQuantity", +"firebaseEventParameterValue", +"videoProvider", +"videoUrl", +"videoTitle", +"videoDuration", +"videoPercent", +"videoVisible", +"videoStatus", +"videoCurrentTime", +"scrollDepthThreshold", +"scrollDepthUnits", +"scrollDepthDirection", +"elementVisibilityRatio", +"elementVisibilityTime", +"elementVisibilityFirstTime", +"elementVisibilityRecentTime", +"requestPath", +"requestMethod", +"clientName", +"queryString", +"serverPageLocationUrl", +"serverPageLocationPath", +"serverPageLocationHostname", +"visitorRegion" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"For web or mobile.", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"list": { +"description": "Lists all the enabled Built-In Variables of a GTM Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/built_in_variables", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.built_in_variables.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/built_in_variables", +"response": { +"$ref": "ListEnabledBuiltInVariablesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Built-In Variables in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/built_in_variables:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.built_in_variables.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM BuiltInVariable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/built_in_variables", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +}, +"type": { +"description": "The type of built-in variable to revert.", +"enum": [ +"builtInVariableTypeUnspecified", +"pageUrl", +"pageHostname", +"pagePath", +"referrer", +"event", +"clickElement", +"clickClasses", +"clickId", +"clickTarget", +"clickUrl", +"clickText", +"firstPartyServingUrl", +"formElement", +"formClasses", +"formId", +"formTarget", +"formUrl", +"formText", +"errorMessage", +"errorUrl", +"errorLine", +"newHistoryUrl", +"oldHistoryUrl", +"newHistoryFragment", +"oldHistoryFragment", +"newHistoryState", +"oldHistoryState", +"historySource", +"containerVersion", +"debugMode", +"randomNumber", +"containerId", +"appId", +"appName", +"appVersionCode", +"appVersionName", +"language", +"osVersion", +"platform", +"sdkVersion", +"deviceName", +"resolution", +"advertiserId", +"advertisingTrackingEnabled", +"htmlId", +"environmentName", +"ampBrowserLanguage", +"ampCanonicalPath", +"ampCanonicalUrl", +"ampCanonicalHost", +"ampReferrer", +"ampTitle", +"ampClientId", +"ampClientTimezone", +"ampClientTimestamp", +"ampClientScreenWidth", +"ampClientScreenHeight", +"ampClientScrollX", +"ampClientScrollY", +"ampClientMaxScrollX", +"ampClientMaxScrollY", +"ampTotalEngagedTime", +"ampPageViewId", +"ampPageLoadTime", +"ampPageDownloadTime", +"ampGtmEvent", +"eventName", +"firebaseEventParameterCampaign", +"firebaseEventParameterCampaignAclid", +"firebaseEventParameterCampaignAnid", +"firebaseEventParameterCampaignClickTimestamp", +"firebaseEventParameterCampaignContent", +"firebaseEventParameterCampaignCp1", +"firebaseEventParameterCampaignGclid", +"firebaseEventParameterCampaignSource", +"firebaseEventParameterCampaignTerm", +"firebaseEventParameterCurrency", +"firebaseEventParameterDynamicLinkAcceptTime", +"firebaseEventParameterDynamicLinkLinkid", +"firebaseEventParameterNotificationMessageDeviceTime", +"firebaseEventParameterNotificationMessageId", +"firebaseEventParameterNotificationMessageName", +"firebaseEventParameterNotificationMessageTime", +"firebaseEventParameterNotificationTopic", +"firebaseEventParameterPreviousAppVersion", +"firebaseEventParameterPreviousOsVersion", +"firebaseEventParameterPrice", +"firebaseEventParameterProductId", +"firebaseEventParameterQuantity", +"firebaseEventParameterValue", +"videoProvider", +"videoUrl", +"videoTitle", +"videoDuration", +"videoPercent", +"videoVisible", +"videoStatus", +"videoCurrentTime", +"scrollDepthThreshold", +"scrollDepthUnits", +"scrollDepthDirection", +"elementVisibilityRatio", +"elementVisibilityTime", +"elementVisibilityFirstTime", +"elementVisibilityRecentTime", +"requestPath", +"requestMethod", +"clientName", +"queryString", +"serverPageLocationUrl", +"serverPageLocationPath", +"serverPageLocationHostname", +"visitorRegion" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"For web or mobile.", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"location": "query", +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}/built_in_variables:revert", +"response": { +"$ref": "RevertBuiltInVariableResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"clients": { +"methods": { +"create": { +"description": "Creates a GTM Client.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/clients", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.clients.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/clients", +"request": { +"$ref": "Client" +}, +"response": { +"$ref": "Client" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Client.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/clients/{clientsId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.clients.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Client's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/clients/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Client.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/clients/{clientsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.clients.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Client's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/clients/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Client" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Clients of a GTM container workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/clients", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.clients.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/clients", +"response": { +"$ref": "ListClientsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Client in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/clients/{clientsId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.clients.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the client in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Client's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/clients/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertClientResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Client.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/clients/{clientsId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.clients.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the client in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Client's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/clients/{client_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/clients/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Client" +}, +"response": { +"$ref": "Client" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"folders": { +"methods": { +"create": { +"description": "Creates a GTM Folder.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.folders.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/folders", +"request": { +"$ref": "Folder" +}, +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Folder.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.folders.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"entities": { +"description": "List all entities in a GTM Folder.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}:entities", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.folders.entities", +"parameterOrder": [ +"path" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:entities", +"response": { +"$ref": "FolderEntities" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"get": { +"description": "Gets a GTM Folder.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.folders.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Folders of a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.folders.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/folders", +"response": { +"$ref": "ListFoldersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"move_entities_to_folder": { +"description": "Moves entities to a GTM Folder. If {folder_id} in the request path equals 0, this will instead move entities out of the folder they currently belong to.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}:move_entities_to_folder", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.folders.move_entities_to_folder", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/folders/[^/]+$", +"required": true, +"type": "string" +}, +"tagId": { +"description": "The tags to be moved to the folder.", +"location": "query", +"repeated": true, +"type": "string" +}, +"triggerId": { +"description": "The triggers to be moved to the folder.", +"location": "query", +"repeated": true, +"type": "string" +}, +"variableId": { +"description": "The variables to be moved to the folder.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:move_entities_to_folder", +"request": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"revert": { +"description": "Reverts changes to a GTM Folder in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.folders.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the tag in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertFolderResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Folder.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/folders/{foldersId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.folders.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the folder in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Folder's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/folders/{folder_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/folders/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Folder" +}, +"response": { +"$ref": "Folder" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"gtag_config": { +"methods": { +"create": { +"description": "Creates a Google tag config.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/gtag_config", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.gtag_config.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/gtag_config", +"request": { +"$ref": "GtagConfig" +}, +"response": { +"$ref": "GtagConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a Google tag config.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/gtag_config/{gtag_configId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.gtag_config.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "Google tag config's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/gtag_config/{gtag_config_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/gtag_config/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a Google tag config.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/gtag_config/{gtag_configId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.gtag_config.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "Google tag config's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/gtag_config/{gtag_config_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/gtag_config/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "GtagConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all Google tag configs in a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/gtag_config", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.gtag_config.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/gtag_config", +"response": { +"$ref": "ListGtagConfigResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"update": { +"description": "Updates a Google tag config.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/gtag_config/{gtag_configId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.gtag_config.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the config in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "Google tag config's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/gtag_config/{gtag_config_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/gtag_config/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "GtagConfig" +}, +"response": { +"$ref": "GtagConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"tags": { +"methods": { +"create": { +"description": "Creates a GTM Tag.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/tags", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.tags.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/tags", +"request": { +"$ref": "Tag" +}, +"response": { +"$ref": "Tag" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Tag.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/tags/{tagsId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.tags.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/tags/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Tag.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/tags/{tagsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.tags.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/tags/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Tag" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Tags of a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/tags", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.tags.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/tags", +"response": { +"$ref": "ListTagsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Tag in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/tags/{tagsId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.tags.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of thetag in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/tags/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertTagResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Tag.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/tags/{tagsId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.tags.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the tag in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Tag's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/tags/{tag_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/tags/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Tag" +}, +"response": { +"$ref": "Tag" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"templates": { +"methods": { +"create": { +"description": "Creates a GTM Custom Template.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/templates", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.templates.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/templates", +"request": { +"$ref": "CustomTemplate" +}, +"response": { +"$ref": "CustomTemplate" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Template.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/templates/{templatesId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.templates.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Custom Template's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/{template_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/templates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Template.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/templates/{templatesId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.templates.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Custom Template's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/{template_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/templates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "CustomTemplate" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Templates of a GTM container workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/templates", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.templates.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/templates", +"response": { +"$ref": "ListTemplatesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Template in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/templates/{templatesId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.templates.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the template in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Custom Template's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/{template_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/templates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertTemplateResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Template.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/templates/{templatesId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.templates.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the templates in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Custom Template's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/templates/{template_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/templates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "CustomTemplate" +}, +"response": { +"$ref": "CustomTemplate" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"transformations": { +"methods": { +"create": { +"description": "Creates a GTM Transformation.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/transformations", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.transformations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/transformations", +"request": { +"$ref": "Transformation" +}, +"response": { +"$ref": "Transformation" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Transformation.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/transformations/{transformationsId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.transformations.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Transformation's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/transformations/{transformation_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/transformations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Transformation.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/transformations/{transformationsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.transformations.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Transformation's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/transformations/{transformation_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/transformations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Transformation" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Transformations of a GTM container workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/transformations", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.transformations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/transformations", +"response": { +"$ref": "ListTransformationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Transformation in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/transformations/{transformationsId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.transformations.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the transformation in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Transformation's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/transformations/{transformation_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/transformations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertTransformationResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Transformation.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/transformations/{transformationsId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.transformations.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the transformation in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Transformation's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/transformations/{transformation_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/transformations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Transformation" +}, +"response": { +"$ref": "Transformation" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"triggers": { +"methods": { +"create": { +"description": "Creates a GTM Trigger.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/triggers", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.triggers.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/triggers", +"request": { +"$ref": "Trigger" +}, +"response": { +"$ref": "Trigger" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Trigger.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/triggers/{triggersId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.triggers.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/triggers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Trigger.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/triggers/{triggersId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.triggers.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/triggers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Trigger" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Triggers of a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/triggers", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.triggers.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/triggers", +"response": { +"$ref": "ListTriggersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Trigger in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/triggers/{triggersId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.triggers.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the trigger in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/triggers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertTriggerResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Trigger.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/triggers/{triggersId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.triggers.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the trigger in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Trigger's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/triggers/{trigger_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/triggers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Trigger" +}, +"response": { +"$ref": "Trigger" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"variables": { +"methods": { +"create": { +"description": "Creates a GTM Variable.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/variables", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.variables.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/variables", +"request": { +"$ref": "Variable" +}, +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Variable.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/variables/{variablesId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.variables.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/variables/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Variable.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/variables/{variablesId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.variables.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/variables/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Variables of a Container.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/variables", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.variables.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/variables", +"response": { +"$ref": "ListVariablesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Variable in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/variables/{variablesId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.variables.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the variable in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/variables/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertVariableResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Variable.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/variables/{variablesId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.variables.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the variable in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Variable's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/variables/{variable_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/variables/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Variable" +}, +"response": { +"$ref": "Variable" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +}, +"zones": { +"methods": { +"create": { +"description": "Creates a GTM Zone.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/zones", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.zones.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/zones", +"request": { +"$ref": "Zone" +}, +"response": { +"$ref": "Zone" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"delete": { +"description": "Deletes a GTM Zone.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/zones/{zonesId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.containers.workspaces.zones.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/zones/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"get": { +"description": "Gets a GTM Zone.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/zones/{zonesId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.zones.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/zones/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "Zone" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"list": { +"description": "Lists all GTM Zones of a GTM container workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/zones", +"httpMethod": "GET", +"id": "tagmanager.accounts.containers.workspaces.zones.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Workspace's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/zones", +"response": { +"$ref": "ListZonesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers", +"https://www.googleapis.com/auth/tagmanager.readonly" +] +}, +"revert": { +"description": "Reverts changes to a GTM Zone in a GTM Workspace.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/zones/{zonesId}:revert", +"httpMethod": "POST", +"id": "tagmanager.accounts.containers.workspaces.zones.revert", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the zone in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/zones/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}:revert", +"response": { +"$ref": "RevertZoneResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +}, +"update": { +"description": "Updates a GTM Zone.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/containers/{containersId}/workspaces/{workspacesId}/zones/{zonesId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.containers.workspaces.zones.update", +"parameterOrder": [ +"path" +], +"parameters": { +"fingerprint": { +"description": "When provided, this fingerprint must match the fingerprint of the zone in storage.", +"location": "query", +"type": "string" +}, +"path": { +"description": "GTM Zone's API relative path. Example: accounts/{account_id}/containers/{container_id}/workspaces/{workspace_id}/zones/{zone_id}", +"location": "path", +"pattern": "^accounts/[^/]+/containers/[^/]+/workspaces/[^/]+/zones/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "Zone" +}, +"response": { +"$ref": "Zone" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.edit.containers" +] +} +} +} +} +} +} +}, +"user_permissions": { +"methods": { +"create": { +"description": "Creates a user's Account & Container access.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/user_permissions", +"httpMethod": "POST", +"id": "tagmanager.accounts.user_permissions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "GTM Account's API relative path. Example: accounts/{account_id}", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/user_permissions", +"request": { +"$ref": "UserPermission" +}, +"response": { +"$ref": "UserPermission" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"delete": { +"description": "Removes a user from the account, revoking access to it and all of its containers.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/user_permissions/{user_permissionsId}", +"httpMethod": "DELETE", +"id": "tagmanager.accounts.user_permissions.delete", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id}", +"location": "path", +"pattern": "^accounts/[^/]+/user_permissions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"get": { +"description": "Gets a user's Account & Container access.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/user_permissions/{user_permissionsId}", +"httpMethod": "GET", +"id": "tagmanager.accounts.user_permissions.get", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id}", +"location": "path", +"pattern": "^accounts/[^/]+/user_permissions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"response": { +"$ref": "UserPermission" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"list": { +"description": "List all users that have access to the account along with Account and Container user access granted to each of them.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/user_permissions", +"httpMethod": "GET", +"id": "tagmanager.accounts.user_permissions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageToken": { +"description": "Continuation token for fetching the next page of results.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "GTM Account's API relative path. Example: accounts/{account_id}", +"location": "path", +"pattern": "^accounts/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+parent}/user_permissions", +"response": { +"$ref": "ListUserPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +}, +"update": { +"description": "Updates a user's Account & Container access.", +"flatPath": "tagmanager/v2/accounts/{accountsId}/user_permissions/{user_permissionsId}", +"httpMethod": "PUT", +"id": "tagmanager.accounts.user_permissions.update", +"parameterOrder": [ +"path" +], +"parameters": { +"path": { +"description": "GTM UserPermission's API relative path. Example: accounts/{account_id}/user_permissions/{user_permission_id}", +"location": "path", +"pattern": "^accounts/[^/]+/user_permissions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "tagmanager/v2/{+path}", +"request": { +"$ref": "UserPermission" +}, +"response": { +"$ref": "UserPermission" +}, +"scopes": [ +"https://www.googleapis.com/auth/tagmanager.manage.users" +] +} +} +} +} +} +}, +"revision": "20240419", +"rootUrl": "https://tagmanager.googleapis.com/", +"schemas": { +"Account": { +"description": "Represents a Google Tag Manager Account.", +"id": "Account", +"properties": { +"accountId": { +"description": "The Account ID uniquely identifies the GTM Account.", +"type": "string" +}, +"features": { +"$ref": "AccountFeatures", +"description": "Read-only Account feature set" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Account as computed at storage time. This value is recomputed whenever the account is modified.", +"type": "string" +}, +"name": { +"description": "Account display name. @mutable tagmanager.accounts.create @mutable tagmanager.accounts.update", +"type": "string" +}, +"path": { +"description": "GTM Account's API relative path.", +"type": "string" +}, +"shareData": { +"description": "Whether the account shares data anonymously with Google and others. This flag enables benchmarking by sharing your data in an anonymous form. Google will remove all identifiable information about your website, combine the data with hundreds of other anonymous sites and report aggregate trends in the benchmarking service. @mutable tagmanager.accounts.create @mutable tagmanager.accounts.update", +"type": "boolean" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +} +}, +"type": "object" +}, +"AccountAccess": { +"description": "Defines the Google Tag Manager Account access permissions.", +"id": "AccountAccess", +"properties": { +"permission": { +"description": "Whether the user has no access, user access, or admin access to an account. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"enum": [ +"accountPermissionUnspecified", +"noAccess", +"user", +"admin" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"AccountFeatures": { +"id": "AccountFeatures", +"properties": { +"supportMultipleContainers": { +"description": "Whether this Account supports multiple Containers.", +"type": "boolean" +}, +"supportUserPermissions": { +"description": "Whether this Account supports user permissions managed by GTM.", +"type": "boolean" +} +}, +"type": "object" +}, +"BuiltInVariable": { +"description": "Built-in variables are a special category of variables that are pre-created and non-customizable. They provide common functionality like accessing properties of the gtm data layer, monitoring clicks, or accessing elements of a page URL.", +"id": "BuiltInVariable", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"name": { +"description": "Name of the built-in variable to be used to refer to the built-in variable.", +"type": "string" +}, +"path": { +"description": "GTM BuiltInVariable's API relative path.", +"type": "string" +}, +"type": { +"description": "Type of built-in variable. @required.tagmanager.accounts.containers.workspaces.built_in_variable.update @mutable tagmanager.accounts.containers.workspaces.built_in_variable.update", +"enum": [ +"builtInVariableTypeUnspecified", +"pageUrl", +"pageHostname", +"pagePath", +"referrer", +"event", +"clickElement", +"clickClasses", +"clickId", +"clickTarget", +"clickUrl", +"clickText", +"firstPartyServingUrl", +"formElement", +"formClasses", +"formId", +"formTarget", +"formUrl", +"formText", +"errorMessage", +"errorUrl", +"errorLine", +"newHistoryUrl", +"oldHistoryUrl", +"newHistoryFragment", +"oldHistoryFragment", +"newHistoryState", +"oldHistoryState", +"historySource", +"containerVersion", +"debugMode", +"randomNumber", +"containerId", +"appId", +"appName", +"appVersionCode", +"appVersionName", +"language", +"osVersion", +"platform", +"sdkVersion", +"deviceName", +"resolution", +"advertiserId", +"advertisingTrackingEnabled", +"htmlId", +"environmentName", +"ampBrowserLanguage", +"ampCanonicalPath", +"ampCanonicalUrl", +"ampCanonicalHost", +"ampReferrer", +"ampTitle", +"ampClientId", +"ampClientTimezone", +"ampClientTimestamp", +"ampClientScreenWidth", +"ampClientScreenHeight", +"ampClientScrollX", +"ampClientScrollY", +"ampClientMaxScrollX", +"ampClientMaxScrollY", +"ampTotalEngagedTime", +"ampPageViewId", +"ampPageLoadTime", +"ampPageDownloadTime", +"ampGtmEvent", +"eventName", +"firebaseEventParameterCampaign", +"firebaseEventParameterCampaignAclid", +"firebaseEventParameterCampaignAnid", +"firebaseEventParameterCampaignClickTimestamp", +"firebaseEventParameterCampaignContent", +"firebaseEventParameterCampaignCp1", +"firebaseEventParameterCampaignGclid", +"firebaseEventParameterCampaignSource", +"firebaseEventParameterCampaignTerm", +"firebaseEventParameterCurrency", +"firebaseEventParameterDynamicLinkAcceptTime", +"firebaseEventParameterDynamicLinkLinkid", +"firebaseEventParameterNotificationMessageDeviceTime", +"firebaseEventParameterNotificationMessageId", +"firebaseEventParameterNotificationMessageName", +"firebaseEventParameterNotificationMessageTime", +"firebaseEventParameterNotificationTopic", +"firebaseEventParameterPreviousAppVersion", +"firebaseEventParameterPreviousOsVersion", +"firebaseEventParameterPrice", +"firebaseEventParameterProductId", +"firebaseEventParameterQuantity", +"firebaseEventParameterValue", +"videoProvider", +"videoUrl", +"videoTitle", +"videoDuration", +"videoPercent", +"videoVisible", +"videoStatus", +"videoCurrentTime", +"scrollDepthThreshold", +"scrollDepthUnits", +"scrollDepthDirection", +"elementVisibilityRatio", +"elementVisibilityTime", +"elementVisibilityFirstTime", +"elementVisibilityRecentTime", +"requestPath", +"requestMethod", +"clientName", +"queryString", +"serverPageLocationUrl", +"serverPageLocationPath", +"serverPageLocationHostname", +"visitorRegion" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"For web or mobile.", +"", +"For web or mobile.", +"For web or mobile.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"Client": { +"id": "Client", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"clientId": { +"description": "The Client ID uniquely identifies the GTM client.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Client as computed at storage time. This value is recomputed whenever the client is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.clients.create", +"tagmanager.accounts.containers.workspaces.clients.update" +] +}, +"description": "Client display name. @mutable tagmanager.accounts.containers.workspaces.clients.create @mutable tagmanager.accounts.containers.workspaces.clients.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this tag in the container. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "string" +}, +"parameter": { +"description": "The client's parameters. @mutable tagmanager.accounts.containers.workspaces.clients.create @mutable tagmanager.accounts.containers.workspaces.clients.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"path": { +"description": "GTM client's API relative path.", +"type": "string" +}, +"priority": { +"description": "Priority determines relative firing order. @mutable tagmanager.accounts.containers.workspaces.clients.create @mutable tagmanager.accounts.containers.workspaces.clients.update", +"format": "int32", +"type": "integer" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.clients.create", +"tagmanager.accounts.containers.workspaces.clients.update" +] +}, +"description": "Client type. @mutable tagmanager.accounts.containers.workspaces.clients.create @mutable tagmanager.accounts.containers.workspaces.clients.update", +"type": "string" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"Condition": { +"description": "Represents a predicate.", +"id": "Condition", +"properties": { +"parameter": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.triggers.create", +"tagmanager.accounts.containers.workspaces.triggers.update" +] +}, +"description": "A list of named parameters (key/value), depending on the condition's type. Notes: - For binary operators, include parameters named arg0 and arg1 for specifying the left and right operands, respectively. - At this time, the left operand (arg0) must be a reference to a variable. - For case-insensitive Regex matching, include a boolean parameter named ignore_case that is set to true. If not specified or set to any other value, the matching will be case sensitive. - To negate an operator, include a boolean parameter named negate boolean parameter that is set to true. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.triggers.create", +"tagmanager.accounts.containers.workspaces.triggers.update" +] +}, +"description": "The type of operator for this condition. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"enum": [ +"conditionTypeUnspecified", +"equals", +"contains", +"startsWith", +"endsWith", +"matchRegex", +"greater", +"greaterOrEquals", +"less", +"lessOrEquals", +"cssSelector", +"urlMatches" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"NOTE(lanzone): When defining a ConditionType here, don't forget to also define a matching PredicateType (in condition.proto)." +], +"type": "string" +} +}, +"type": "object" +}, +"Container": { +"description": "Represents a Google Tag Manager Container, which specifies the platform tags will run on, manages workspaces, and retains container versions.", +"id": "Container", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "The Container ID uniquely identifies the GTM Container.", +"type": "string" +}, +"domainName": { +"description": "List of domain names associated with the Container. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"features": { +"$ref": "ContainerFeatures", +"description": "Read-only Container feature set." +}, +"fingerprint": { +"description": "The fingerprint of the GTM Container as computed at storage time. This value is recomputed whenever the account is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.create", +"tagmanager.accounts.containers.update" +] +}, +"description": "Container display name. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"type": "string" +}, +"notes": { +"description": "Container Notes. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"type": "string" +}, +"path": { +"description": "GTM Container's API relative path.", +"type": "string" +}, +"publicId": { +"description": "Container Public ID.", +"type": "string" +}, +"tagIds": { +"description": "All Tag IDs that refer to this Container.", +"items": { +"type": "string" +}, +"type": "array" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"taggingServerUrls": { +"description": "List of server-side container URLs for the Container. If multiple URLs are provided, all URL paths must match. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"usageContext": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.create", +"tagmanager.accounts.containers.update" +] +}, +"description": "List of Usage Contexts for the Container. Valid values include: web, android, or ios. @mutable tagmanager.accounts.containers.create @mutable tagmanager.accounts.containers.update", +"items": { +"enum": [ +"usageContextUnspecified", +"web", +"android", +"ios", +"androidSdk5", +"iosSdk5", +"amp", +"server" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContainerAccess": { +"description": "Defines the Google Tag Manager Container access permissions.", +"id": "ContainerAccess", +"properties": { +"containerId": { +"description": "GTM Container ID. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"type": "string" +}, +"permission": { +"description": "List of Container permissions. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"enum": [ +"containerPermissionUnspecified", +"noAccess", +"read", +"edit", +"approve", +"publish" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"ContainerFeatures": { +"id": "ContainerFeatures", +"properties": { +"supportBuiltInVariables": { +"description": "Whether this Container supports built-in variables", +"type": "boolean" +}, +"supportClients": { +"description": "Whether this Container supports clients.", +"type": "boolean" +}, +"supportEnvironments": { +"description": "Whether this Container supports environments.", +"type": "boolean" +}, +"supportFolders": { +"description": "Whether this Container supports folders.", +"type": "boolean" +}, +"supportGtagConfigs": { +"description": "Whether this Container supports Google tag config.", +"type": "boolean" +}, +"supportTags": { +"description": "Whether this Container supports tags.", +"type": "boolean" +}, +"supportTemplates": { +"description": "Whether this Container supports templates.", +"type": "boolean" +}, +"supportTransformations": { +"description": "Whether this Container supports transformations.", +"type": "boolean" +}, +"supportTriggers": { +"description": "Whether this Container supports triggers.", +"type": "boolean" +}, +"supportUserPermissions": { +"description": "Whether this Container supports user permissions managed by GTM.", +"type": "boolean" +}, +"supportVariables": { +"description": "Whether this Container supports variables.", +"type": "boolean" +}, +"supportVersions": { +"description": "Whether this Container supports Container versions.", +"type": "boolean" +}, +"supportWorkspaces": { +"description": "Whether this Container supports workspaces.", +"type": "boolean" +}, +"supportZones": { +"description": "Whether this Container supports zones.", +"type": "boolean" +} +}, +"type": "object" +}, +"ContainerVersion": { +"description": "Represents a Google Tag Manager Container Version.", +"id": "ContainerVersion", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"builtInVariable": { +"description": "The built-in variables in the container that this version was taken from.", +"items": { +"$ref": "BuiltInVariable" +}, +"type": "array" +}, +"client": { +"description": "The clients in the container that this version was taken from.", +"items": { +"$ref": "Client" +}, +"type": "array" +}, +"container": { +"$ref": "Container", +"description": "The container that this version was taken from." +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"containerVersionId": { +"description": "The Container Version ID uniquely identifies the GTM Container Version.", +"type": "string" +}, +"customTemplate": { +"description": "The custom templates in the container that this version was taken from.", +"items": { +"$ref": "CustomTemplate" +}, +"type": "array" +}, +"deleted": { +"description": "A value of true indicates this container version has been deleted.", +"type": "boolean" +}, +"description": { +"description": "Container version description. @mutable tagmanager.accounts.containers.versions.update", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Container Version as computed at storage time. This value is recomputed whenever the container version is modified.", +"type": "string" +}, +"folder": { +"description": "The folders in the container that this version was taken from.", +"items": { +"$ref": "Folder" +}, +"type": "array" +}, +"gtagConfig": { +"description": "The Google tag configs in the container that this version was taken from.", +"items": { +"$ref": "GtagConfig" +}, +"type": "array" +}, +"name": { +"description": "Container version display name. @mutable tagmanager.accounts.containers.versions.update", +"type": "string" +}, +"path": { +"description": "GTM Container Version's API relative path.", +"type": "string" +}, +"tag": { +"description": "The tags in the container that this version was taken from.", +"items": { +"$ref": "Tag" +}, +"type": "array" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"transformation": { +"description": "The transformations in the container that this version was taken from.", +"items": { +"$ref": "Transformation" +}, +"type": "array" +}, +"trigger": { +"description": "The triggers in the container that this version was taken from.", +"items": { +"$ref": "Trigger" +}, +"type": "array" +}, +"variable": { +"description": "The variables in the container that this version was taken from.", +"items": { +"$ref": "Variable" +}, +"type": "array" +}, +"zone": { +"description": "The zones in the container that this version was taken from.", +"items": { +"$ref": "Zone" +}, +"type": "array" +} +}, +"type": "object" +}, +"ContainerVersionHeader": { +"description": "Represents a Google Tag Manager Container Version Header.", +"id": "ContainerVersionHeader", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"containerVersionId": { +"description": "The Container Version ID uniquely identifies the GTM Container Version.", +"type": "string" +}, +"deleted": { +"description": "A value of true indicates this container version has been deleted.", +"type": "boolean" +}, +"name": { +"description": "Container version display name.", +"type": "string" +}, +"numClients": { +"description": "Number of clients in the container version.", +"type": "string" +}, +"numCustomTemplates": { +"description": "Number of custom templates in the container version.", +"type": "string" +}, +"numGtagConfigs": { +"description": "Number of Google tag configs in the container version.", +"type": "string" +}, +"numMacros": { +"deprecated": true, +"description": "Number of macros in the container version.", +"type": "string" +}, +"numRules": { +"deprecated": true, +"description": "Number of rules in the container version.", +"type": "string" +}, +"numTags": { +"description": "Number of tags in the container version.", +"type": "string" +}, +"numTransformations": { +"description": "Number of transformations in the container version.", +"type": "string" +}, +"numTriggers": { +"description": "Number of triggers in the container version.", +"type": "string" +}, +"numVariables": { +"description": "Number of variables in the container version.", +"type": "string" +}, +"numZones": { +"description": "Number of zones in the container version.", +"type": "string" +}, +"path": { +"description": "GTM Container Version's API relative path.", +"type": "string" +} +}, +"type": "object" +}, +"CreateBuiltInVariableResponse": { +"id": "CreateBuiltInVariableResponse", +"properties": { +"builtInVariable": { +"description": "List of created built-in variables.", +"items": { +"$ref": "BuiltInVariable" +}, +"type": "array" +} +}, +"type": "object" +}, +"CreateContainerVersionRequestVersionOptions": { +"description": "Options for new container versions.", +"id": "CreateContainerVersionRequestVersionOptions", +"properties": { +"name": { +"description": "The name of the container version to be created.", +"type": "string" +}, +"notes": { +"description": "The notes of the container version to be created.", +"type": "string" +} +}, +"type": "object" +}, +"CreateContainerVersionResponse": { +"description": "Create container versions response.", +"id": "CreateContainerVersionResponse", +"properties": { +"compilerError": { +"description": "Compiler errors or not.", +"type": "boolean" +}, +"containerVersion": { +"$ref": "ContainerVersion", +"description": "The container version created." +}, +"newWorkspacePath": { +"description": "Auto generated workspace path created as a result of version creation. This field should only be populated if the created version was not a quick preview.", +"type": "string" +}, +"syncStatus": { +"$ref": "SyncStatus", +"description": "Whether version creation failed when syncing the workspace to the latest container version." +} +}, +"type": "object" +}, +"CustomTemplate": { +"description": "Represents a Google Tag Manager Custom Template's contents.", +"id": "CustomTemplate", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Custom Template as computed at storage time. This value is recomputed whenever the template is modified.", +"type": "string" +}, +"galleryReference": { +"$ref": "GalleryReference", +"description": "A reference to the Community Template Gallery entry." +}, +"name": { +"description": "Custom Template display name.", +"type": "string" +}, +"path": { +"description": "GTM Custom Template's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"templateData": { +"description": "The custom template in text format.", +"type": "string" +}, +"templateId": { +"description": "The Custom Template ID uniquely identifies the GTM custom template.", +"type": "string" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"Destination": { +"description": "Represents a Google Tag Destination.", +"id": "Destination", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"destinationId": { +"description": "Destination ID.", +"type": "string" +}, +"destinationLinkId": { +"description": "The Destination link ID uniquely identifies the Destination.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the Google Tag Destination as computed at storage time. This value is recomputed whenever the destination is modified.", +"type": "string" +}, +"name": { +"description": "Destination display name.", +"type": "string" +}, +"path": { +"description": "Destination's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI.", +"type": "string" +} +}, +"type": "object" +}, +"Entity": { +"description": "A workspace entity that may represent a tag, trigger, variable, or folder in addition to its status in the workspace.", +"id": "Entity", +"properties": { +"builtInVariable": { +"$ref": "BuiltInVariable", +"description": "The built in variable being represented by the entity." +}, +"changeStatus": { +"description": "Represents how the entity has been changed in the workspace.", +"enum": [ +"changeStatusUnspecified", +"none", +"added", +"deleted", +"updated" +], +"enumDescriptions": [ +"", +"The entity has never been changed.", +"The entity is added to the workspace.", +"The entity is deleted from the workspace.", +"The entity has been updated in the workspace." +], +"type": "string" +}, +"client": { +"$ref": "Client", +"description": "The client being represented by the entity." +}, +"customTemplate": { +"$ref": "CustomTemplate", +"description": "The custom template being represented by the entity." +}, +"folder": { +"$ref": "Folder", +"description": "The folder being represented by the entity." +}, +"gtagConfig": { +"$ref": "GtagConfig", +"description": "The gtag config being represented by the entity." +}, +"tag": { +"$ref": "Tag", +"description": "The tag being represented by the entity." +}, +"transformation": { +"$ref": "Transformation", +"description": "The transformation being represented by the entity." +}, +"trigger": { +"$ref": "Trigger", +"description": "The trigger being represented by the entity." +}, +"variable": { +"$ref": "Variable", +"description": "The variable being represented by the entity." +}, +"zone": { +"$ref": "Zone", +"description": "The zone being represented by the entity." +} +}, +"type": "object" +}, +"Environment": { +"description": "Represents a Google Tag Manager Environment. Note that a user can create, delete and update environments of type USER, but can only update the enable_debug and url fields of environments of other types.", +"id": "Environment", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"authorizationCode": { +"description": "The environment authorization code.", +"type": "string" +}, +"authorizationTimestamp": { +"description": "The last update time-stamp for the authorization code.", +"format": "google-datetime", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"containerVersionId": { +"description": "Represents a link to a container version.", +"type": "string" +}, +"description": { +"description": "The environment description. Can be set or changed only on USER type environments. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "string" +}, +"enableDebug": { +"description": "Whether or not to enable debug by default for the environment. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "boolean" +}, +"environmentId": { +"description": "GTM Environment ID uniquely identifies the GTM Environment.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM environment as computed at storage time. This value is recomputed whenever the environment is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.environments.create", +"tagmanager.accounts.containers.environments.update" +] +}, +"description": "The environment display name. Can be set or changed only on USER type environments. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "string" +}, +"path": { +"description": "GTM Environment's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"type": { +"description": "The type of this environment.", +"enum": [ +"user", +"live", +"latest", +"workspace" +], +"enumDescriptions": [ +"Points to a user defined environment.", +"Points to the current live container version.", +"Points to the latest container version.", +"Automatically managed environment that points to a workspace preview or version created by a workspace." +], +"type": "string" +}, +"url": { +"description": "Default preview page url for the environment. @mutable tagmanager.accounts.containers.environments.create @mutable tagmanager.accounts.containers.environments.update", +"type": "string" +}, +"workspaceId": { +"description": "Represents a link to a quick preview of a workspace.", +"type": "string" +} +}, +"type": "object" +}, +"Folder": { +"description": "Represents a Google Tag Manager Folder.", +"id": "Folder", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Folder as computed at storage time. This value is recomputed whenever the folder is modified.", +"type": "string" +}, +"folderId": { +"description": "The Folder ID uniquely identifies the GTM Folder.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.folders.create", +"tagmanager.accounts.containers.workspaces.folders.update" +] +}, +"description": "Folder display name. @mutable tagmanager.accounts.containers.workspaces.folders.create @mutable tagmanager.accounts.containers.workspaces.folders.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this folder in the container. @mutable tagmanager.accounts.containers.workspaces.folders.create @mutable tagmanager.accounts.containers.workspaces.folders.update", +"type": "string" +}, +"path": { +"description": "GTM Folder's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"FolderEntities": { +"description": "Represents a Google Tag Manager Folder's contents.", +"id": "FolderEntities", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"tag": { +"description": "The list of tags inside the folder.", +"items": { +"$ref": "Tag" +}, +"type": "array" +}, +"trigger": { +"description": "The list of triggers inside the folder.", +"items": { +"$ref": "Trigger" +}, +"type": "array" +}, +"variable": { +"description": "The list of variables inside the folder.", +"items": { +"$ref": "Variable" +}, +"type": "array" +} +}, +"type": "object" +}, +"GalleryReference": { +"description": "Represents the link between a custom template and an entry on the Community Template Gallery site.", +"id": "GalleryReference", +"properties": { +"host": { +"description": "The name of the host for the community gallery template.", +"type": "string" +}, +"isModified": { +"description": "If a user has manually edited the community gallery template.", +"type": "boolean" +}, +"owner": { +"description": "The name of the owner for the community gallery template.", +"type": "string" +}, +"repository": { +"description": "The name of the repository for the community gallery template.", +"type": "string" +}, +"signature": { +"description": "The signature of the community gallery template as computed at import time. This value is recomputed whenever the template is updated from the gallery.", +"type": "string" +}, +"version": { +"description": "The version of the community gallery template.", +"type": "string" +} +}, +"type": "object" +}, +"GetContainerSnippetResponse": { +"id": "GetContainerSnippetResponse", +"properties": { +"snippet": { +"description": "Tagging snippet for a Container.", +"type": "string" +} +}, +"type": "object" +}, +"GetWorkspaceStatusResponse": { +"description": "The changes that have occurred in the workspace since the base container version.", +"id": "GetWorkspaceStatusResponse", +"properties": { +"mergeConflict": { +"description": "The merge conflict after sync.", +"items": { +"$ref": "MergeConflict" +}, +"type": "array" +}, +"workspaceChange": { +"description": "Entities that have been changed in the workspace.", +"items": { +"$ref": "Entity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GtagConfig": { +"description": "Represents a Google tag configuration.", +"id": "GtagConfig", +"properties": { +"accountId": { +"description": "Google tag account ID.", +"type": "string" +}, +"containerId": { +"description": "Google tag container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the Google tag config as computed at storage time. This value is recomputed whenever the config is modified.", +"type": "string" +}, +"gtagConfigId": { +"description": "The ID uniquely identifies the Google tag config.", +"type": "string" +}, +"parameter": { +"description": "The Google tag config's parameters. @mutable tagmanager.accounts.containers.workspaces.gtag_config.create @mutable tagmanager.accounts.containers.workspaces.gtag_config.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"path": { +"description": "Google tag config's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"type": { +"description": "Google tag config type. @required tagmanager.accounts.containers.workspaces.gtag_config.create @required tagmanager.accounts.containers.workspaces.gtag_config.update @mutable tagmanager.accounts.containers.workspaces.gtag_config.create @mutable tagmanager.accounts.containers.workspaces.gtag_config.update", +"type": "string" +}, +"workspaceId": { +"description": "Google tag workspace ID. Only used by GTM containers. Set to 0 otherwise.", +"type": "string" +} +}, +"type": "object" +}, +"ListAccountsResponse": { +"description": "List Accounts Response.", +"id": "ListAccountsResponse", +"properties": { +"account": { +"description": "List of GTM Accounts that a user has access to.", +"items": { +"$ref": "Account" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListClientsResponse": { +"id": "ListClientsResponse", +"properties": { +"client": { +"description": "All GTM Clients of a GTM Container.", +"items": { +"$ref": "Client" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListContainerVersionsResponse": { +"description": "List container versions response.", +"id": "ListContainerVersionsResponse", +"properties": { +"containerVersionHeader": { +"description": "All container version headers of a GTM Container.", +"items": { +"$ref": "ContainerVersionHeader" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListContainersResponse": { +"description": "List Containers Response.", +"id": "ListContainersResponse", +"properties": { +"container": { +"description": "All Containers of a GTM Account.", +"items": { +"$ref": "Container" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListDestinationsResponse": { +"id": "ListDestinationsResponse", +"properties": { +"destination": { +"description": "All Destinations linked to a GTM Container.", +"items": { +"$ref": "Destination" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListEnabledBuiltInVariablesResponse": { +"description": "A list of enabled built-in variables.", +"id": "ListEnabledBuiltInVariablesResponse", +"properties": { +"builtInVariable": { +"description": "All GTM BuiltInVariables of a GTM container.", +"items": { +"$ref": "BuiltInVariable" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListEnvironmentsResponse": { +"description": "List Environments Response.", +"id": "ListEnvironmentsResponse", +"properties": { +"environment": { +"description": "All Environments of a GTM Container.", +"items": { +"$ref": "Environment" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListFoldersResponse": { +"description": "List Folders Response.", +"id": "ListFoldersResponse", +"properties": { +"folder": { +"description": "All GTM Folders of a GTM Container.", +"items": { +"$ref": "Folder" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListGtagConfigResponse": { +"id": "ListGtagConfigResponse", +"properties": { +"gtagConfig": { +"description": "All Google tag configs in a Container.", +"items": { +"$ref": "GtagConfig" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListTagsResponse": { +"description": "List Tags Response.", +"id": "ListTagsResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"tag": { +"description": "All GTM Tags of a GTM Container.", +"items": { +"$ref": "Tag" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTemplatesResponse": { +"id": "ListTemplatesResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"template": { +"description": "All GTM Custom Templates of a GTM Container.", +"items": { +"$ref": "CustomTemplate" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTransformationsResponse": { +"id": "ListTransformationsResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"transformation": { +"description": "All GTM Transformations of a GTM Container.", +"items": { +"$ref": "Transformation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTriggersResponse": { +"description": "List triggers response.", +"id": "ListTriggersResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"trigger": { +"description": "All GTM Triggers of a GTM Container.", +"items": { +"$ref": "Trigger" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUserPermissionsResponse": { +"description": "List user permissions response.", +"id": "ListUserPermissionsResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"userPermission": { +"description": "All GTM UserPermissions of a GTM Account.", +"items": { +"$ref": "UserPermission" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVariablesResponse": { +"description": "List Variables Response.", +"id": "ListVariablesResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"variable": { +"description": "All GTM Variables of a GTM Container.", +"items": { +"$ref": "Variable" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkspacesResponse": { +"description": "A list of workspaces in a container.", +"id": "ListWorkspacesResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"workspace": { +"description": "All Workspaces of a GTM Container.", +"items": { +"$ref": "Workspace" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListZonesResponse": { +"id": "ListZonesResponse", +"properties": { +"nextPageToken": { +"description": "Continuation token for fetching the next page of results.", +"type": "string" +}, +"zone": { +"description": "All GTM Zones of a GTM Container.", +"items": { +"$ref": "Zone" +}, +"type": "array" +} +}, +"type": "object" +}, +"MergeConflict": { +"description": "Represents a merge conflict.", +"id": "MergeConflict", +"properties": { +"entityInBaseVersion": { +"$ref": "Entity", +"description": "The base version entity (since the latest sync operation) that has conflicting changes compared to the workspace. If this field is missing, it means the workspace entity is deleted from the base version." +}, +"entityInWorkspace": { +"$ref": "Entity", +"description": "The workspace entity that has conflicting changes compared to the base version. If an entity is deleted in a workspace, it will still appear with a deleted change status." +} +}, +"type": "object" +}, +"Parameter": { +"description": "Represents a Google Tag Manager Parameter.", +"id": "Parameter", +"properties": { +"isWeakReference": { +"description": "Whether or not a reference type parameter is strongly or weakly referenced. Only used by Transformations. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update", +"type": "boolean" +}, +"key": { +"description": "The named key that uniquely identifies a parameter. Required for top-level parameters, as well as map values. Ignored for list values. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "string" +}, +"list": { +"description": "This list parameter's parameters (keys will be ignored). @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"map": { +"description": "This map parameter's parameters (must have keys; keys must be unique). @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.tags.create", +"tagmanager.accounts.containers.workspaces.tags.update", +"tagmanager.accounts.containers.workspaces.triggers.create", +"tagmanager.accounts.containers.workspaces.triggers.update", +"tagmanager.accounts.containers.workspaces.variables.create", +"tagmanager.accounts.containers.workspaces.variables.update" +] +}, +"description": "The parameter type. Valid values are: - boolean: The value represents a boolean, represented as 'true' or 'false' - integer: The value represents a 64-bit signed integer value, in base 10 - list: A list of parameters should be specified - map: A map of parameters should be specified - template: The value represents any text; this can include variable references (even variable references that might return non-string types) - trigger_reference: The value represents a trigger, represented as the trigger id - tag_reference: The value represents a tag, represented as the tag name @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"enum": [ +"typeUnspecified", +"template", +"integer", +"boolean", +"list", +"map", +"triggerReference", +"tagReference" +], +"enumDescriptions": [ +"", +"May include variable references (such as \"{{myVariable}}\").", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"value": { +"description": "A parameter's value (may contain variable references such as \"{{myVariable}}\") as appropriate to the specified type. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "string" +} +}, +"type": "object" +}, +"PublishContainerVersionResponse": { +"description": "Publish container version response.", +"id": "PublishContainerVersionResponse", +"properties": { +"compilerError": { +"description": "Compiler errors or not.", +"type": "boolean" +}, +"containerVersion": { +"$ref": "ContainerVersion", +"description": "The container version created." +} +}, +"type": "object" +}, +"QuickPreviewResponse": { +"description": "Response to quick previewing a workspace.", +"id": "QuickPreviewResponse", +"properties": { +"compilerError": { +"description": "Were there compiler errors or not.", +"type": "boolean" +}, +"containerVersion": { +"$ref": "ContainerVersion", +"description": "The quick previewed container version." +}, +"syncStatus": { +"$ref": "SyncStatus", +"description": "Whether quick previewing failed when syncing the workspace to the latest container version." +} +}, +"type": "object" +}, +"RevertBuiltInVariableResponse": { +"description": "The result of reverting a built-in variable in a workspace.", +"id": "RevertBuiltInVariableResponse", +"properties": { +"enabled": { +"description": "Whether the built-in variable is enabled after reversion.", +"type": "boolean" +} +}, +"type": "object" +}, +"RevertClientResponse": { +"description": "The result of reverting a client in a workspace.", +"id": "RevertClientResponse", +"properties": { +"client": { +"$ref": "Client", +"description": "Client as it appears in the latest container version since the last workspace synchronization operation. If no client is present, that means the client was deleted in the latest container version." +} +}, +"type": "object" +}, +"RevertFolderResponse": { +"description": "The result of reverting folder changes in a workspace.", +"id": "RevertFolderResponse", +"properties": { +"folder": { +"$ref": "Folder", +"description": "Folder as it appears in the latest container version since the last workspace synchronization operation. If no folder is present, that means the folder was deleted in the latest container version." +} +}, +"type": "object" +}, +"RevertTagResponse": { +"description": "The result of reverting a tag in a workspace.", +"id": "RevertTagResponse", +"properties": { +"tag": { +"$ref": "Tag", +"description": "Tag as it appears in the latest container version since the last workspace synchronization operation. If no tag is present, that means the tag was deleted in the latest container version." +} +}, +"type": "object" +}, +"RevertTemplateResponse": { +"description": "The result of reverting a template in a workspace.", +"id": "RevertTemplateResponse", +"properties": { +"template": { +"$ref": "CustomTemplate", +"description": "Template as it appears in the latest container version since the last workspace synchronization operation. If no template is present, that means the template was deleted in the latest container version." +} +}, +"type": "object" +}, +"RevertTransformationResponse": { +"description": "The result of reverting a transformation in a workspace.", +"id": "RevertTransformationResponse", +"properties": { +"transformation": { +"$ref": "Transformation", +"description": "Transformation as it appears in the latest container version since the last workspace synchronization operation. If no transformation is present, that means the transformation was deleted in the latest container version." +} +}, +"type": "object" +}, +"RevertTriggerResponse": { +"description": "The result of reverting a trigger in a workspace.", +"id": "RevertTriggerResponse", +"properties": { +"trigger": { +"$ref": "Trigger", +"description": "Trigger as it appears in the latest container version since the last workspace synchronization operation. If no trigger is present, that means the trigger was deleted in the latest container version." +} +}, +"type": "object" +}, +"RevertVariableResponse": { +"description": "The result of reverting a variable in a workspace.", +"id": "RevertVariableResponse", +"properties": { +"variable": { +"$ref": "Variable", +"description": "Variable as it appears in the latest container version since the last workspace synchronization operation. If no variable is present, that means the variable was deleted in the latest container version." +} +}, +"type": "object" +}, +"RevertZoneResponse": { +"description": "The result of reverting a zone in a workspace.", +"id": "RevertZoneResponse", +"properties": { +"zone": { +"$ref": "Zone", +"description": "Zone as it appears in the latest container version since the last workspace synchronization operation. If no zone is present, that means the zone was deleted in the latest container version." +} +}, +"type": "object" +}, +"SetupTag": { +"description": "Represents a reference to atag that fires before another tag in order to set up dependencies.", +"id": "SetupTag", +"properties": { +"stopOnSetupFailure": { +"description": "If true, fire the main tag if and only if the setup tag fires successfully. If false, fire the main tag regardless of setup tag firing status.", +"type": "boolean" +}, +"tagName": { +"description": "The name of the setup tag.", +"type": "string" +} +}, +"type": "object" +}, +"SyncStatus": { +"description": "The status of a workspace after synchronization.", +"id": "SyncStatus", +"properties": { +"mergeConflict": { +"description": "Synchornization operation detected a merge conflict.", +"type": "boolean" +}, +"syncError": { +"description": "An error occurred during the synchronization operation.", +"type": "boolean" +} +}, +"type": "object" +}, +"SyncWorkspaceResponse": { +"description": "A response after synchronizing the workspace to the latest container version.", +"id": "SyncWorkspaceResponse", +"properties": { +"mergeConflict": { +"description": "The merge conflict after sync. If this field is not empty, the sync is still treated as successful. But a version cannot be created until all conflicts are resolved.", +"items": { +"$ref": "MergeConflict" +}, +"type": "array" +}, +"syncStatus": { +"$ref": "SyncStatus", +"description": "Indicates whether synchronization caused a merge conflict or sync error." +} +}, +"type": "object" +}, +"Tag": { +"description": "Represents a Google Tag Manager Tag.", +"id": "Tag", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"blockingRuleId": { +"deprecated": true, +"description": "Blocking rule IDs. If any of the listed rules evaluate to true, the tag will not fire. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"blockingTriggerId": { +"description": "Blocking trigger IDs. If any of the listed triggers evaluate to true, the tag will not fire. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"consentSettings": { +"$ref": "TagConsentSetting", +"description": "Consent settings of a tag. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Tag as computed at storage time. This value is recomputed whenever the tag is modified.", +"type": "string" +}, +"firingRuleId": { +"deprecated": true, +"description": "Firing rule IDs. A tag will fire when any of the listed rules are true and all of its blockingRuleIds (if any specified) are false. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"firingTriggerId": { +"description": "Firing trigger IDs. A tag will fire when any of the listed triggers are true and all of its blockingTriggerIds (if any specified) are false. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"liveOnly": { +"description": "If set to true, this tag will only fire in the live environment (e.g. not in preview or debug mode). @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "boolean" +}, +"monitoringMetadata": { +"$ref": "Parameter", +"description": "A map of key-value pairs of tag metadata to be included in the event data for tag monitoring. Notes: - This parameter must be type MAP. - Each parameter in the map are type TEMPLATE, however cannot contain variable references. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update" +}, +"monitoringMetadataTagNameKey": { +"description": "If non-empty, then the tag display name will be included in the monitoring metadata map using the key specified. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.tags.create", +"tagmanager.accounts.containers.workspaces.tags.update" +] +}, +"description": "Tag display name. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this tag in the container. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "string" +}, +"parameter": { +"description": "The tag's parameters. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"path": { +"description": "GTM Tag's API relative path.", +"type": "string" +}, +"paused": { +"description": "Indicates whether the tag is paused, which prevents the tag from firing. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "boolean" +}, +"priority": { +"$ref": "Parameter", +"description": "User defined numeric priority of the tag. Tags are fired asynchronously in order of priority. Tags with higher numeric value fire first. A tag's priority can be a positive or negative value. The default value is 0. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update" +}, +"scheduleEndMs": { +"description": "The end timestamp in milliseconds to schedule a tag. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"format": "int64", +"type": "string" +}, +"scheduleStartMs": { +"description": "The start timestamp in milliseconds to schedule a tag. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"format": "int64", +"type": "string" +}, +"setupTag": { +"description": "The list of setup tags. Currently we only allow one.", +"items": { +"$ref": "SetupTag" +}, +"type": "array" +}, +"tagFiringOption": { +"description": "Option to fire this tag.", +"enum": [ +"tagFiringOptionUnspecified", +"unlimited", +"oncePerEvent", +"oncePerLoad" +], +"enumDescriptions": [ +"", +"Tag can be fired multiple times per event.", +"Tag can only be fired per event but can be fired multiple times per load (e.g., app load or page load).", +"Tag can only be fired per load (e.g., app load or page load)." +], +"type": "string" +}, +"tagId": { +"description": "The Tag ID uniquely identifies the GTM Tag.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"teardownTag": { +"description": "The list of teardown tags. Currently we only allow one.", +"items": { +"$ref": "TeardownTag" +}, +"type": "array" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.tags.create", +"tagmanager.accounts.containers.workspaces.tags.update" +] +}, +"description": "GTM Tag Type. @mutable tagmanager.accounts.containers.workspaces.tags.create @mutable tagmanager.accounts.containers.workspaces.tags.update", +"type": "string" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"TagConsentSetting": { +"id": "TagConsentSetting", +"properties": { +"consentStatus": { +"description": "The tag's consent status. If set to NEEDED, the runtime will check that the consent types specified by the consent_type field have been granted.", +"enum": [ +"notSet", +"notNeeded", +"needed" +], +"enumDescriptions": [ +"Default value where user has not specified any setting on it.", +"Tag doesn't require any additional consent settings.", +"Tag requires additional consent settings." +], +"type": "string" +}, +"consentType": { +"$ref": "Parameter", +"description": "The type of consents to check for during tag firing if in the consent NEEDED state. This parameter must be of type LIST where each list item is of type STRING." +} +}, +"type": "object" +}, +"TeardownTag": { +"description": "Represents a tag that fires after another tag in order to tear down dependencies.", +"id": "TeardownTag", +"properties": { +"stopTeardownOnFailure": { +"description": "If true, fire the teardown tag if and only if the main tag fires successfully. If false, fire the teardown tag regardless of main tag firing status.", +"type": "boolean" +}, +"tagName": { +"description": "The name of the teardown tag.", +"type": "string" +} +}, +"type": "object" +}, +"Transformation": { +"description": "Represents a Google Tag Manager Transformation.", +"id": "Transformation", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Transformation as computed at storage time. This value is recomputed whenever the transformation is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.transformations.create", +"tagmanager.accounts.containers.workspaces.transformations.update" +] +}, +"description": "Transformation display name. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this transformation in the container. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update", +"type": "string" +}, +"parameter": { +"description": "The transformation's parameters. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"path": { +"description": "GTM transformation's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"transformationId": { +"description": "The Transformation ID uniquely identifies the GTM transformation.", +"type": "string" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.transformations.create", +"tagmanager.accounts.containers.workspaces.transformations.update" +] +}, +"description": "Transformation type. @mutable tagmanager.accounts.containers.workspaces.transformations.create @mutable tagmanager.accounts.containers.workspaces.transformations.update", +"type": "string" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"Trigger": { +"description": "Represents a Google Tag Manager Trigger", +"id": "Trigger", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"autoEventFilter": { +"description": "Used in the case of auto event tracking. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"checkValidation": { +"$ref": "Parameter", +"description": "Whether or not we should only fire tags if the form submit or link click event is not cancelled by some other event handler (e.g. because of validation). Only valid for Form Submission and Link Click triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"continuousTimeMinMilliseconds": { +"$ref": "Parameter", +"description": "A visibility trigger minimum continuous visible time (in milliseconds). Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"customEventFilter": { +"description": "Used in the case of custom event, which is fired iff all Conditions are true. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"eventName": { +"$ref": "Parameter", +"description": "Name of the GTM event that is fired. Only valid for Timer triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"filter": { +"description": "The trigger will only fire iff all Conditions are true. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Trigger as computed at storage time. This value is recomputed whenever the trigger is modified.", +"type": "string" +}, +"horizontalScrollPercentageList": { +"$ref": "Parameter", +"description": "List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled horizontally. Only valid for AMP scroll triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"interval": { +"$ref": "Parameter", +"description": "Time between triggering recurring Timer Events (in milliseconds). Only valid for Timer triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"intervalSeconds": { +"$ref": "Parameter", +"description": "Time between Timer Events to fire (in seconds). Only valid for AMP Timer trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"limit": { +"$ref": "Parameter", +"description": "Limit of the number of GTM events this Timer Trigger will fire. If no limit is set, we will continue to fire GTM events until the user leaves the page. Only valid for Timer triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"maxTimerLengthSeconds": { +"$ref": "Parameter", +"description": "Max time to fire Timer Events (in seconds). Only valid for AMP Timer trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.triggers.create", +"tagmanager.accounts.containers.workspaces.triggers.update" +] +}, +"description": "Trigger display name. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this trigger in the container. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"type": "string" +}, +"parameter": { +"description": "Additional parameters. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"path": { +"description": "GTM Trigger's API relative path.", +"type": "string" +}, +"selector": { +"$ref": "Parameter", +"description": "A click trigger CSS selector (i.e. \"a\", \"button\" etc.). Only valid for AMP Click trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"totalTimeMinMilliseconds": { +"$ref": "Parameter", +"description": "A visibility trigger minimum total visible time (in milliseconds). Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"triggerId": { +"description": "The Trigger ID uniquely identifies the GTM Trigger.", +"type": "string" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.triggers.create" +] +}, +"description": "Defines the data layer event that causes this trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update", +"enum": [ +"eventTypeUnspecified", +"pageview", +"domReady", +"windowLoaded", +"customEvent", +"triggerGroup", +"init", +"consentInit", +"serverPageview", +"always", +"firebaseAppException", +"firebaseAppUpdate", +"firebaseCampaign", +"firebaseFirstOpen", +"firebaseInAppPurchase", +"firebaseNotificationDismiss", +"firebaseNotificationForeground", +"firebaseNotificationOpen", +"firebaseNotificationReceive", +"firebaseOsUpdate", +"firebaseSessionStart", +"firebaseUserEngagement", +"formSubmission", +"click", +"linkClick", +"jsError", +"historyChange", +"timer", +"ampClick", +"ampTimer", +"ampScroll", +"ampVisibility", +"youTubeVideo", +"scrollDepth", +"elementVisibility" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"uniqueTriggerId": { +"$ref": "Parameter", +"description": "Globally unique id of the trigger that auto-generates this (a Form Submit, Link Click or Timer listener) if any. Used to make incompatible auto-events work together with trigger filtering based on trigger ids. This value is populated during output generation since the tags implied by triggers don't exist until then. Only valid for Form Submit, Link Click and Timer triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"verticalScrollPercentageList": { +"$ref": "Parameter", +"description": "List of integer percentage values for scroll triggers. The trigger will fire when each percentage is reached when the view is scrolled vertically. Only valid for AMP scroll triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"visibilitySelector": { +"$ref": "Parameter", +"description": "A visibility trigger CSS selector (i.e. \"#id\"). Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"visiblePercentageMax": { +"$ref": "Parameter", +"description": "A visibility trigger maximum percent visibility. Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"visiblePercentageMin": { +"$ref": "Parameter", +"description": "A visibility trigger minimum percent visibility. Only valid for AMP Visibility trigger. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"waitForTags": { +"$ref": "Parameter", +"description": "Whether or not we should delay the form submissions or link opening until all of the tags have fired (by preventing the default action and later simulating the default action). Only valid for Form Submission and Link Click triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"waitForTagsTimeout": { +"$ref": "Parameter", +"description": "How long to wait (in milliseconds) for tags to fire when 'waits_for_tags' above evaluates to true. Only valid for Form Submission and Link Click triggers. @mutable tagmanager.accounts.containers.workspaces.triggers.create @mutable tagmanager.accounts.containers.workspaces.triggers.update" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"UserPermission": { +"description": "Represents a user's permissions to an account and its container.", +"id": "UserPermission", +"properties": { +"accountAccess": { +"$ref": "AccountAccess", +"description": "GTM Account access permissions. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update" +}, +"accountId": { +"description": "The Account ID uniquely identifies the GTM Account.", +"type": "string" +}, +"containerAccess": { +"description": "GTM Container access permissions. @mutable tagmanager.accounts.permissions.create @mutable tagmanager.accounts.permissions.update", +"items": { +"$ref": "ContainerAccess" +}, +"type": "array" +}, +"emailAddress": { +"description": "User's email address. @mutable tagmanager.accounts.permissions.create", +"type": "string" +}, +"path": { +"description": "GTM UserPermission's API relative path.", +"type": "string" +} +}, +"type": "object" +}, +"Variable": { +"description": "Represents a Google Tag Manager Variable.", +"id": "Variable", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"disablingTriggerId": { +"description": "For mobile containers only: A list of trigger IDs for disabling conditional variables; the variable is enabled if one of the enabling trigger is true while all the disabling trigger are false. Treated as an unordered set. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"enablingTriggerId": { +"description": "For mobile containers only: A list of trigger IDs for enabling conditional variables; the variable is enabled if one of the enabling triggers is true while all the disabling triggers are false. Treated as an unordered set. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"items": { +"type": "string" +}, +"type": "array" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Variable as computed at storage time. This value is recomputed whenever the variable is modified.", +"type": "string" +}, +"formatValue": { +"$ref": "VariableFormatValue", +"description": "Option to convert a variable value to other value." +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.variables.create", +"tagmanager.accounts.containers.workspaces.variables.update" +] +}, +"description": "Variable display name. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this variable in the container. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"type": "string" +}, +"parameter": { +"description": "The variable's parameters. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"items": { +"$ref": "Parameter" +}, +"type": "array" +}, +"parentFolderId": { +"description": "Parent folder id.", +"type": "string" +}, +"path": { +"description": "GTM Variable's API relative path.", +"type": "string" +}, +"scheduleEndMs": { +"description": "The end timestamp in milliseconds to schedule a variable. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"format": "int64", +"type": "string" +}, +"scheduleStartMs": { +"description": "The start timestamp in milliseconds to schedule a variable. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"format": "int64", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"type": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.variables.create", +"tagmanager.accounts.containers.workspaces.variables.update" +] +}, +"description": "GTM Variable Type. @mutable tagmanager.accounts.containers.workspaces.variables.create @mutable tagmanager.accounts.containers.workspaces.variables.update", +"type": "string" +}, +"variableId": { +"description": "The Variable ID uniquely identifies the GTM Variable.", +"type": "string" +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +} +}, +"type": "object" +}, +"VariableFormatValue": { +"id": "VariableFormatValue", +"properties": { +"caseConversionType": { +"description": "The option to convert a string-type variable value to either lowercase or uppercase.", +"enum": [ +"none", +"lowercase", +"uppercase" +], +"enumDescriptions": [ +"", +"The option to convert a variable value to lowercase.", +"The option to convert a variable value to uppercase." +], +"type": "string" +}, +"convertFalseToValue": { +"$ref": "Parameter", +"description": "The value to convert if a variable value is false." +}, +"convertNullToValue": { +"$ref": "Parameter", +"description": "The value to convert if a variable value is null." +}, +"convertTrueToValue": { +"$ref": "Parameter", +"description": "The value to convert if a variable value is true." +}, +"convertUndefinedToValue": { +"$ref": "Parameter", +"description": "The value to convert if a variable value is undefined." +} +}, +"type": "object" +}, +"Workspace": { +"description": "Represents a Google Tag Manager Container Workspace.", +"id": "Workspace", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"description": { +"description": "Workspace description. @mutable tagmanager.accounts.containers.workspaces.create @mutable tagmanager.accounts.containers.workspaces.update", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Workspace as computed at storage time. This value is recomputed whenever the workspace is modified.", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"tagmanager.accounts.containers.workspaces.create", +"tagmanager.accounts.containers.workspaces.update" +] +}, +"description": "Workspace display name. @mutable tagmanager.accounts.containers.workspaces.create @mutable tagmanager.accounts.containers.workspaces.update", +"type": "string" +}, +"path": { +"description": "GTM Workspace's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"workspaceId": { +"description": "The Workspace ID uniquely identifies the GTM Workspace.", +"type": "string" +} +}, +"type": "object" +}, +"Zone": { +"description": "Represents a Google Tag Manager Zone's contents.", +"id": "Zone", +"properties": { +"accountId": { +"description": "GTM Account ID.", +"type": "string" +}, +"boundary": { +"$ref": "ZoneBoundary", +"description": "This Zone's boundary." +}, +"childContainer": { +"description": "Containers that are children of this Zone.", +"items": { +"$ref": "ZoneChildContainer" +}, +"type": "array" +}, +"containerId": { +"description": "GTM Container ID.", +"type": "string" +}, +"fingerprint": { +"description": "The fingerprint of the GTM Zone as computed at storage time. This value is recomputed whenever the zone is modified.", +"type": "string" +}, +"name": { +"description": "Zone display name.", +"type": "string" +}, +"notes": { +"description": "User notes on how to apply this zone in the container.", +"type": "string" +}, +"path": { +"description": "GTM Zone's API relative path.", +"type": "string" +}, +"tagManagerUrl": { +"description": "Auto generated link to the tag manager UI", +"type": "string" +}, +"typeRestriction": { +"$ref": "ZoneTypeRestriction", +"description": "This Zone's type restrictions." +}, +"workspaceId": { +"description": "GTM Workspace ID.", +"type": "string" +}, +"zoneId": { +"description": "The Zone ID uniquely identifies the GTM Zone.", +"type": "string" +} +}, +"type": "object" +}, +"ZoneBoundary": { +"description": "Represents a Zone's boundaries.", +"id": "ZoneBoundary", +"properties": { +"condition": { +"description": "The conditions that, when conjoined, make up the boundary.", +"items": { +"$ref": "Condition" +}, +"type": "array" +}, +"customEvaluationTriggerId": { +"description": "Custom evaluation trigger IDs. A zone will evaluate its boundary conditions when any of the listed triggers are true.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ZoneChildContainer": { +"description": "Represents a child container of a Zone.", +"id": "ZoneChildContainer", +"properties": { +"nickname": { +"description": "The zone's nickname for the child container.", +"type": "string" +}, +"publicId": { +"description": "The child container's public id.", +"type": "string" +} +}, +"type": "object" +}, +"ZoneTypeRestriction": { +"description": "Represents a Zone's type restrictions.", +"id": "ZoneTypeRestriction", +"properties": { +"enable": { +"description": "True if type restrictions have been enabled for this Zone.", +"type": "boolean" +}, +"whitelistedTypeId": { +"description": "List of type public ids that have been whitelisted for use in this Zone.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Tag Manager API", +"version": "v2" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tasks.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tasks.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..ca25fd8b27ee66a4ca24d07ec83c7ddf0a006814 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tasks.v1.json @@ -0,0 +1,743 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/tasks": { +"description": "Create, edit, organize, and delete all your tasks" +}, +"https://www.googleapis.com/auth/tasks.readonly": { +"description": "View your tasks" +} +} +} +}, +"basePath": "", +"baseUrl": "https://tasks.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Tasks", +"description": "The Google Tasks API lets you manage your tasks and task lists.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/tasks/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "tasks:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://tasks.mtls.googleapis.com/", +"name": "tasks", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"tasklists": { +"methods": { +"delete": { +"description": "Deletes the authenticated user's specified task list.", +"flatPath": "tasks/v1/users/@me/lists/{tasklist}", +"httpMethod": "DELETE", +"id": "tasks.tasklists.delete", +"parameterOrder": [ +"tasklist" +], +"parameters": { +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/users/@me/lists/{tasklist}", +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"get": { +"description": "Returns the authenticated user's specified task list.", +"flatPath": "tasks/v1/users/@me/lists/{tasklist}", +"httpMethod": "GET", +"id": "tasks.tasklists.get", +"parameterOrder": [ +"tasklist" +], +"parameters": { +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/users/@me/lists/{tasklist}", +"response": { +"$ref": "TaskList" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks", +"https://www.googleapis.com/auth/tasks.readonly" +] +}, +"insert": { +"description": "Creates a new task list and adds it to the authenticated user's task lists. A user can have up to 2000 lists at a time.", +"flatPath": "tasks/v1/users/@me/lists", +"httpMethod": "POST", +"id": "tasks.tasklists.insert", +"parameterOrder": [], +"parameters": {}, +"path": "tasks/v1/users/@me/lists", +"request": { +"$ref": "TaskList" +}, +"response": { +"$ref": "TaskList" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"list": { +"description": "Returns all the authenticated user's task lists. A user can have up to 2000 lists at a time.", +"flatPath": "tasks/v1/users/@me/lists", +"httpMethod": "GET", +"id": "tasks.tasklists.list", +"parameterOrder": [], +"parameters": { +"maxResults": { +"description": "Maximum number of task lists returned on one page. Optional. The default is 20 (max allowed: 100).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token specifying the result page to return. Optional.", +"location": "query", +"type": "string" +} +}, +"path": "tasks/v1/users/@me/lists", +"response": { +"$ref": "TaskLists" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks", +"https://www.googleapis.com/auth/tasks.readonly" +] +}, +"patch": { +"description": "Updates the authenticated user's specified task list. This method supports patch semantics.", +"flatPath": "tasks/v1/users/@me/lists/{tasklist}", +"httpMethod": "PATCH", +"id": "tasks.tasklists.patch", +"parameterOrder": [ +"tasklist" +], +"parameters": { +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/users/@me/lists/{tasklist}", +"request": { +"$ref": "TaskList" +}, +"response": { +"$ref": "TaskList" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"update": { +"description": "Updates the authenticated user's specified task list.", +"flatPath": "tasks/v1/users/@me/lists/{tasklist}", +"httpMethod": "PUT", +"id": "tasks.tasklists.update", +"parameterOrder": [ +"tasklist" +], +"parameters": { +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/users/@me/lists/{tasklist}", +"request": { +"$ref": "TaskList" +}, +"response": { +"$ref": "TaskList" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +} +} +}, +"tasks": { +"methods": { +"clear": { +"description": "Clears all completed tasks from the specified task list. The affected tasks will be marked as 'hidden' and no longer be returned by default when retrieving all tasks for a task list.", +"flatPath": "tasks/v1/lists/{tasklist}/clear", +"httpMethod": "POST", +"id": "tasks.tasks.clear", +"parameterOrder": [ +"tasklist" +], +"parameters": { +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/clear", +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"delete": { +"description": "Deletes the specified task from the task list.", +"flatPath": "tasks/v1/lists/{tasklist}/tasks/{task}", +"httpMethod": "DELETE", +"id": "tasks.tasks.delete", +"parameterOrder": [ +"tasklist", +"task" +], +"parameters": { +"task": { +"description": "Task identifier.", +"location": "path", +"required": true, +"type": "string" +}, +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/tasks/{task}", +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"get": { +"description": "Returns the specified task.", +"flatPath": "tasks/v1/lists/{tasklist}/tasks/{task}", +"httpMethod": "GET", +"id": "tasks.tasks.get", +"parameterOrder": [ +"tasklist", +"task" +], +"parameters": { +"task": { +"description": "Task identifier.", +"location": "path", +"required": true, +"type": "string" +}, +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/tasks/{task}", +"response": { +"$ref": "Task" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks", +"https://www.googleapis.com/auth/tasks.readonly" +] +}, +"insert": { +"description": "Creates a new task on the specified task list. A user can have up to 20,000 uncompleted tasks per list and up to 100,000 tasks in total at a time.", +"flatPath": "tasks/v1/lists/{tasklist}/tasks", +"httpMethod": "POST", +"id": "tasks.tasks.insert", +"parameterOrder": [ +"tasklist" +], +"parameters": { +"parent": { +"description": "Parent task identifier. If the task is created at the top level, this parameter is omitted. Optional.", +"location": "query", +"type": "string" +}, +"previous": { +"description": "Previous sibling task identifier. If the task is created at the first position among its siblings, this parameter is omitted. Optional.", +"location": "query", +"type": "string" +}, +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/tasks", +"request": { +"$ref": "Task" +}, +"response": { +"$ref": "Task" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"list": { +"description": "Returns all tasks in the specified task list. A user can have up to 20,000 uncompleted tasks per list and up to 100,000 tasks in total at a time.", +"flatPath": "tasks/v1/lists/{tasklist}/tasks", +"httpMethod": "GET", +"id": "tasks.tasks.list", +"parameterOrder": [ +"tasklist" +], +"parameters": { +"completedMax": { +"description": "Upper bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.", +"location": "query", +"type": "string" +}, +"completedMin": { +"description": "Lower bound for a task's completion date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by completion date.", +"location": "query", +"type": "string" +}, +"dueMax": { +"description": "Upper bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.", +"location": "query", +"type": "string" +}, +"dueMin": { +"description": "Lower bound for a task's due date (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by due date.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Maximum number of tasks returned on one page. Optional. The default is 20 (max allowed: 100).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Token specifying the result page to return. Optional.", +"location": "query", +"type": "string" +}, +"showCompleted": { +"description": "Flag indicating whether completed tasks are returned in the result. Optional. The default is True. Note that showHidden must also be True to show tasks completed in first party clients, such as the web UI and Google's mobile apps.", +"location": "query", +"type": "boolean" +}, +"showDeleted": { +"description": "Flag indicating whether deleted tasks are returned in the result. Optional. The default is False.", +"location": "query", +"type": "boolean" +}, +"showHidden": { +"description": "Flag indicating whether hidden tasks are returned in the result. Optional. The default is False.", +"location": "query", +"type": "boolean" +}, +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +}, +"updatedMin": { +"description": "Lower bound for a task's last modification time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by last modification time.", +"location": "query", +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/tasks", +"response": { +"$ref": "Tasks" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks", +"https://www.googleapis.com/auth/tasks.readonly" +] +}, +"move": { +"description": "Moves the specified task to another position in the task list. This can include putting it as a child task under a new parent and/or move it to a different position among its sibling tasks. A user can have up to 2,000 subtasks per task.", +"flatPath": "tasks/v1/lists/{tasklist}/tasks/{task}/move", +"httpMethod": "POST", +"id": "tasks.tasks.move", +"parameterOrder": [ +"tasklist", +"task" +], +"parameters": { +"parent": { +"description": "New parent task identifier. If the task is moved to the top level, this parameter is omitted. Optional.", +"location": "query", +"type": "string" +}, +"previous": { +"description": "New previous sibling task identifier. If the task is moved to the first position among its siblings, this parameter is omitted. Optional.", +"location": "query", +"type": "string" +}, +"task": { +"description": "Task identifier.", +"location": "path", +"required": true, +"type": "string" +}, +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/tasks/{task}/move", +"response": { +"$ref": "Task" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"patch": { +"description": "Updates the specified task. This method supports patch semantics.", +"flatPath": "tasks/v1/lists/{tasklist}/tasks/{task}", +"httpMethod": "PATCH", +"id": "tasks.tasks.patch", +"parameterOrder": [ +"tasklist", +"task" +], +"parameters": { +"task": { +"description": "Task identifier.", +"location": "path", +"required": true, +"type": "string" +}, +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/tasks/{task}", +"request": { +"$ref": "Task" +}, +"response": { +"$ref": "Task" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +}, +"update": { +"description": "Updates the specified task.", +"flatPath": "tasks/v1/lists/{tasklist}/tasks/{task}", +"httpMethod": "PUT", +"id": "tasks.tasks.update", +"parameterOrder": [ +"tasklist", +"task" +], +"parameters": { +"task": { +"description": "Task identifier.", +"location": "path", +"required": true, +"type": "string" +}, +"tasklist": { +"description": "Task list identifier.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "tasks/v1/lists/{tasklist}/tasks/{task}", +"request": { +"$ref": "Task" +}, +"response": { +"$ref": "Task" +}, +"scopes": [ +"https://www.googleapis.com/auth/tasks" +] +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://tasks.googleapis.com/", +"schemas": { +"Task": { +"id": "Task", +"properties": { +"completed": { +"description": "Completion date of the task (as a RFC 3339 timestamp). This field is omitted if the task has not been completed.", +"type": "string" +}, +"deleted": { +"description": "Flag indicating whether the task has been deleted. The default is False.", +"type": "boolean" +}, +"due": { +"description": "Due date of the task (as a RFC 3339 timestamp). Optional. The due date only records date information; the time portion of the timestamp is discarded when setting the due date. It isn't possible to read or write the time that a task is due via the API.", +"type": "string" +}, +"etag": { +"description": "ETag of the resource.", +"type": "string" +}, +"hidden": { +"description": "Flag indicating whether the task is hidden. This is the case if the task had been marked completed when the task list was last cleared. The default is False. This field is read-only.", +"type": "boolean" +}, +"id": { +"description": "Task identifier.", +"type": "string" +}, +"kind": { +"description": "Type of the resource. This is always \"tasks#task\".", +"type": "string" +}, +"links": { +"description": "Collection of links. This collection is read-only.", +"items": { +"properties": { +"description": { +"description": "The description. In HTML speak: Everything between and .", +"type": "string" +}, +"link": { +"description": "The URL.", +"type": "string" +}, +"type": { +"description": "Type of the link, e.g. \"email\".", +"type": "string" +} +}, +"type": "object" +}, +"type": "array" +}, +"notes": { +"description": "Notes describing the task. Optional. Maximum length allowed: 8192 characters.", +"type": "string" +}, +"parent": { +"description": "Parent task identifier. This field is omitted if it is a top-level task. This field is read-only. Use the \"move\" method to move the task under a different parent or to the top level.", +"type": "string" +}, +"position": { +"description": "String indicating the position of the task among its sibling tasks under the same parent task or at the top level. If this string is greater than another task's corresponding position string according to lexicographical ordering, the task is positioned after the other task under the same parent task (or at the top level). This field is read-only. Use the \"move\" method to move the task to another position.", +"type": "string" +}, +"selfLink": { +"description": "URL pointing to this task. Used to retrieve, update, or delete this task.", +"type": "string" +}, +"status": { +"description": "Status of the task. This is either \"needsAction\" or \"completed\".", +"type": "string" +}, +"title": { +"description": "Title of the task. Maximum length allowed: 1024 characters.", +"type": "string" +}, +"updated": { +"description": "Last modification time of the task (as a RFC 3339 timestamp).", +"type": "string" +}, +"webViewLink": { +"description": "An absolute link to the task in the Google Tasks Web UI. This field is read-only.", +"type": "string" +} +}, +"type": "object" +}, +"TaskList": { +"id": "TaskList", +"properties": { +"etag": { +"description": "ETag of the resource.", +"type": "string" +}, +"id": { +"description": "Task list identifier.", +"type": "string" +}, +"kind": { +"description": "Type of the resource. This is always \"tasks#taskList\".", +"type": "string" +}, +"selfLink": { +"description": "URL pointing to this task list. Used to retrieve, update, or delete this task list.", +"type": "string" +}, +"title": { +"description": "Title of the task list. Maximum length allowed: 1024 characters.", +"type": "string" +}, +"updated": { +"description": "Last modification time of the task list (as a RFC 3339 timestamp).", +"type": "string" +} +}, +"type": "object" +}, +"TaskLists": { +"id": "TaskLists", +"properties": { +"etag": { +"description": "ETag of the resource.", +"type": "string" +}, +"items": { +"description": "Collection of task lists.", +"items": { +"$ref": "TaskList" +}, +"type": "array" +}, +"kind": { +"description": "Type of the resource. This is always \"tasks#taskLists\".", +"type": "string" +}, +"nextPageToken": { +"description": "Token that can be used to request the next page of this result.", +"type": "string" +} +}, +"type": "object" +}, +"Tasks": { +"id": "Tasks", +"properties": { +"etag": { +"description": "ETag of the resource.", +"type": "string" +}, +"items": { +"description": "Collection of tasks.", +"items": { +"$ref": "Task" +}, +"type": "array" +}, +"kind": { +"description": "Type of the resource. This is always \"tasks#tasks\".", +"type": "string" +}, +"nextPageToken": { +"description": "Token used to access the next page of this result.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Tasks API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/testing.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/testing.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..d6fe2a5a3942cc97529d2bfb53e8f6d787613f8b --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/testing.v1.json @@ -0,0 +1,2828 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-platform.read-only": { +"description": "View your data across Google Cloud services and see the email address of your Google Account" +} +} +} +}, +"basePath": "", +"baseUrl": "https://testing.googleapis.com/", +"batchPath": "batch", +"description": "Allows developers to run automated tests for their mobile applications on Google infrastructure.", +"discoveryVersion": "v1", +"documentationLink": "https://firebase.google.com/docs/test-lab/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "testing:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://testing.mtls.googleapis.com/", +"name": "testing", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"applicationDetailService": { +"methods": { +"getApkDetails": { +"description": "Gets the details of an Android application APK.", +"flatPath": "v1/applicationDetailService/getApkDetails", +"httpMethod": "POST", +"id": "testing.applicationDetailService.getApkDetails", +"parameterOrder": [], +"parameters": { +"bundleLocation.gcsPath": { +"description": "A path to a file in Google Cloud Storage. Example: gs://build-app-1414623860166/app%40debug-unaligned.apk These paths are expected to be url encoded (percent encoding)", +"location": "query", +"type": "string" +} +}, +"path": "v1/applicationDetailService/getApkDetails", +"request": { +"$ref": "FileReference" +}, +"response": { +"$ref": "GetApkDetailsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"projects": { +"resources": { +"deviceSessions": { +"methods": { +"cancel": { +"description": "POST /v1/projects/{project_id}/deviceSessions/{device_session_id}:cancel Changes the DeviceSession to state FINISHED and terminates all connections. Canceled sessions are not deleted and can be retrieved or listed by the user until they expire based on the 28 day deletion policy.", +"flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}:cancel", +"httpMethod": "POST", +"id": "testing.projects.deviceSessions.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", +"location": "path", +"pattern": "^projects/[^/]+/deviceSessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelDeviceSessionRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "POST /v1/projects/{project_id}/deviceSessions", +"flatPath": "v1/projects/{projectsId}/deviceSessions", +"httpMethod": "POST", +"id": "testing.projects.deviceSessions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Compute Engine project under which this device will be allocated. \"projects/{project_id}\"", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/deviceSessions", +"request": { +"$ref": "DeviceSession" +}, +"response": { +"$ref": "DeviceSession" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "GET /v1/projects/{project_id}/deviceSessions/{device_session_id} Return a DeviceSession, which documents the allocation status and whether the device is allocated. Clients making requests from this API must poll GetDeviceSession.", +"flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}", +"httpMethod": "GET", +"id": "testing.projects.deviceSessions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", +"location": "path", +"pattern": "^projects/[^/]+/deviceSessions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "DeviceSession" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "GET /v1/projects/{project_id}/deviceSessions Lists device Sessions owned by the project user.", +"flatPath": "v1/projects/{projectsId}/deviceSessions", +"httpMethod": "GET", +"id": "testing.projects.deviceSessions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. If specified, responses will be filtered by the given filter. Allowed fields are: session_state.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of DeviceSessions to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A continuation token for paging.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the parent to request, e.g. \"projects/{project_id}\"", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/deviceSessions", +"response": { +"$ref": "ListDeviceSessionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "PATCH /v1/projects/{projectId}/deviceSessions/deviceSessionId}:updateDeviceSession Updates the current device session to the fields described by the update_mask.", +"flatPath": "v1/projects/{projectsId}/deviceSessions/{deviceSessionsId}", +"httpMethod": "PATCH", +"id": "testing.projects.deviceSessions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Optional. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", +"location": "path", +"pattern": "^projects/[^/]+/deviceSessions/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The list of fields to update.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "DeviceSession" +}, +"response": { +"$ref": "DeviceSession" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"testMatrices": { +"methods": { +"cancel": { +"description": "Cancels unfinished test executions in a test matrix. This call returns immediately and cancellation proceeds asynchronously. If the matrix is already final, this operation will have no effect. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Test Matrix does not exist", +"flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", +"httpMethod": "POST", +"id": "testing.projects.testMatrices.cancel", +"parameterOrder": [ +"projectId", +"testMatrixId" +], +"parameters": { +"projectId": { +"description": "Cloud project that owns the test.", +"location": "path", +"required": true, +"type": "string" +}, +"testMatrixId": { +"description": "Test matrix that will be canceled.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{projectId}/testMatrices/{testMatrixId}:cancel", +"response": { +"$ref": "CancelTestMatrixResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates and runs a matrix of tests according to the given specifications. Unsupported environments will be returned in the state UNSUPPORTED. A test matrix is limited to use at most 2000 devices in parallel. The returned matrix will not yet contain the executions that will be created for this matrix. Execution creation happens later on and will require a call to GetTestMatrix. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed or if the matrix tries to use too many simultaneous devices.", +"flatPath": "v1/projects/{projectId}/testMatrices", +"httpMethod": "POST", +"id": "testing.projects.testMatrices.create", +"parameterOrder": [ +"projectId" +], +"parameters": { +"projectId": { +"description": "The GCE project under which this job will run.", +"location": "path", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A string id used to detect duplicated requests. Ids are automatically scoped to a project, so users should ensure the ID is unique per-project. A UUID is recommended. Optional, but strongly recommended.", +"location": "query", +"type": "string" +} +}, +"path": "v1/projects/{projectId}/testMatrices", +"request": { +"$ref": "TestMatrix" +}, +"response": { +"$ref": "TestMatrix" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Checks the status of a test matrix and the executions once they are created. The test matrix will contain the list of test executions to run if and only if the resultStorage.toolResultsExecution fields have been populated. Note: Flaky test executions may be added to the matrix at a later stage. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Test Matrix does not exist", +"flatPath": "v1/projects/{projectId}/testMatrices/{testMatrixId}", +"httpMethod": "GET", +"id": "testing.projects.testMatrices.get", +"parameterOrder": [ +"projectId", +"testMatrixId" +], +"parameters": { +"projectId": { +"description": "Cloud project that owns the test matrix.", +"location": "path", +"required": true, +"type": "string" +}, +"testMatrixId": { +"description": "Unique test matrix id which was assigned by the service.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/projects/{projectId}/testMatrices/{testMatrixId}", +"response": { +"$ref": "TestMatrix" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +} +} +} +} +}, +"testEnvironmentCatalog": { +"methods": { +"get": { +"description": "Gets the catalog of supported test environments. May return any of the following canonical error codes: - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the environment type does not exist - INTERNAL - if an internal error occurred", +"flatPath": "v1/testEnvironmentCatalog/{environmentType}", +"httpMethod": "GET", +"id": "testing.testEnvironmentCatalog.get", +"parameterOrder": [ +"environmentType" +], +"parameters": { +"environmentType": { +"description": "Required. The type of environment that should be listed.", +"enum": [ +"ENVIRONMENT_TYPE_UNSPECIFIED", +"ANDROID", +"IOS", +"NETWORK_CONFIGURATION", +"PROVIDED_SOFTWARE", +"DEVICE_IP_BLOCKS" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"A device running a version of the Android OS.", +"A device running a version of iOS.", +"A network configuration to use when running a test.", +"The software environment provided by TestExecutionService.", +"The IP blocks used by devices in the test environment." +], +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "For authorization, the cloud project requesting the TestEnvironmentCatalog.", +"location": "query", +"type": "string" +} +}, +"path": "v1/testEnvironmentCatalog/{environmentType}", +"response": { +"$ref": "TestEnvironmentCatalog" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-platform.read-only" +] +} +} +} +}, +"revision": "20240416", +"rootUrl": "https://testing.googleapis.com/", +"schemas": { +"Account": { +"description": "Identifies an account and how to log into it.", +"id": "Account", +"properties": { +"googleAuto": { +"$ref": "GoogleAuto", +"description": "An automatic google login account." +} +}, +"type": "object" +}, +"AndroidDevice": { +"description": "A single Android device.", +"id": "AndroidDevice", +"properties": { +"androidModelId": { +"description": "Required. The id of the Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +}, +"androidVersionId": { +"description": "Required. The id of the Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +}, +"locale": { +"description": "Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +}, +"orientation": { +"description": "Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +} +}, +"type": "object" +}, +"AndroidDeviceCatalog": { +"description": "The currently supported Android devices.", +"id": "AndroidDeviceCatalog", +"properties": { +"models": { +"description": "The set of supported Android device models.", +"items": { +"$ref": "AndroidModel" +}, +"type": "array" +}, +"runtimeConfiguration": { +"$ref": "AndroidRuntimeConfiguration", +"description": "The set of supported runtime configurations." +}, +"versions": { +"description": "The set of supported Android OS versions.", +"items": { +"$ref": "AndroidVersion" +}, +"type": "array" +} +}, +"type": "object" +}, +"AndroidDeviceList": { +"description": "A list of Android device configurations in which the test is to be executed.", +"id": "AndroidDeviceList", +"properties": { +"androidDevices": { +"description": "Required. A list of Android devices.", +"items": { +"$ref": "AndroidDevice" +}, +"type": "array" +} +}, +"type": "object" +}, +"AndroidInstrumentationTest": { +"description": "A test of an Android application that can control an Android component independently of its normal lifecycle. Android instrumentation tests run an application APK and test APK inside the same process on a virtual or physical AndroidDevice. They also specify a test runner class, such as com.google.GoogleTestRunner, which can vary on the specific instrumentation framework chosen. See for more information on types of Android tests.", +"id": "AndroidInstrumentationTest", +"properties": { +"appApk": { +"$ref": "FileReference", +"description": "The APK for the application under test." +}, +"appBundle": { +"$ref": "AppBundle", +"description": "A multi-apk app bundle for the application under test." +}, +"appPackageId": { +"description": "The java package for the application under test. The default value is determined by examining the application's manifest.", +"type": "string" +}, +"orchestratorOption": { +"description": "The option of whether running each test within its own invocation of instrumentation with Android Test Orchestrator or not. ** Orchestrator is only compatible with AndroidJUnitRunner version 1.1 or higher! ** Orchestrator offers the following benefits: - No shared state - Crashes are isolated - Logs are scoped per test See for more information about Android Test Orchestrator. If not set, the test will be run without the orchestrator.", +"enum": [ +"ORCHESTRATOR_OPTION_UNSPECIFIED", +"USE_ORCHESTRATOR", +"DO_NOT_USE_ORCHESTRATOR" +], +"enumDescriptions": [ +"Default value: the server will choose the mode. Currently implies that the test will run without the orchestrator. In the future, all instrumentation tests will be run with the orchestrator. Using the orchestrator is highly encouraged because of all the benefits it offers.", +"Run test using orchestrator. ** Only compatible with AndroidJUnitRunner version 1.1 or higher! ** Recommended.", +"Run test without using orchestrator." +], +"type": "string" +}, +"shardingOption": { +"$ref": "ShardingOption", +"description": "The option to run tests in multiple shards in parallel." +}, +"testApk": { +"$ref": "FileReference", +"description": "Required. The APK containing the test code to be executed." +}, +"testPackageId": { +"description": "The java package for the test to be executed. The default value is determined by examining the application's manifest.", +"type": "string" +}, +"testRunnerClass": { +"description": "The InstrumentationTestRunner class. The default value is determined by examining the application's manifest.", +"type": "string" +}, +"testTargets": { +"description": "Each target must be fully qualified with the package name or class name, in one of these formats: - \"package package_name\" - \"class package_name.class_name\" - \"class package_name.class_name#method_name\" If empty, all targets in the module will be run.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AndroidMatrix": { +"description": "A set of Android device configuration permutations is defined by the the cross-product of the given axes. Internally, the given AndroidMatrix will be expanded into a set of AndroidDevices. Only supported permutations will be instantiated. Invalid permutations (e.g., incompatible models/versions) are ignored.", +"id": "AndroidMatrix", +"properties": { +"androidModelIds": { +"description": "Required. The ids of the set of Android device to be used. Use the TestEnvironmentDiscoveryService to get supported options.", +"items": { +"type": "string" +}, +"type": "array" +}, +"androidVersionIds": { +"description": "Required. The ids of the set of Android OS version to be used. Use the TestEnvironmentDiscoveryService to get supported options.", +"items": { +"type": "string" +}, +"type": "array" +}, +"locales": { +"description": "Required. The set of locales the test device will enable for testing. Use the TestEnvironmentDiscoveryService to get supported options.", +"items": { +"type": "string" +}, +"type": "array" +}, +"orientations": { +"description": "Required. The set of orientations to test with. Use the TestEnvironmentDiscoveryService to get supported options.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AndroidModel": { +"description": "A description of an Android device tests may be run on.", +"id": "AndroidModel", +"properties": { +"brand": { +"description": "The company that this device is branded with. Example: \"Google\", \"Samsung\".", +"type": "string" +}, +"codename": { +"description": "The name of the industrial design. This corresponds to android.os.Build.DEVICE.", +"type": "string" +}, +"form": { +"description": "Whether this device is virtual or physical.", +"enum": [ +"DEVICE_FORM_UNSPECIFIED", +"VIRTUAL", +"PHYSICAL", +"EMULATOR" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"Android virtual device using Compute Engine native virtualization. Firebase Test Lab only.", +"Actual hardware.", +"Android virtual device using emulator in nested virtualization. Equivalent to Android Studio." +], +"type": "string" +}, +"formFactor": { +"description": "Whether this device is a phone, tablet, wearable, etc.", +"enum": [ +"DEVICE_FORM_FACTOR_UNSPECIFIED", +"PHONE", +"TABLET", +"WEARABLE" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"This device has the shape of a phone.", +"This device has the shape of a tablet.", +"This device has the shape of a watch or other wearable." +], +"type": "string" +}, +"id": { +"description": "The unique opaque id for this model. Use this for invoking the TestExecutionService.", +"type": "string" +}, +"lowFpsVideoRecording": { +"description": "True if and only if tests with this model are recorded by stitching together screenshots. See use_low_spec_video_recording in device config.", +"type": "boolean" +}, +"manufacturer": { +"description": "The manufacturer of this device.", +"type": "string" +}, +"name": { +"description": "The human-readable marketing name for this device model. Examples: \"Nexus 5\", \"Galaxy S5\".", +"type": "string" +}, +"perVersionInfo": { +"description": "Version-specific information of an Android model.", +"items": { +"$ref": "PerAndroidVersionInfo" +}, +"type": "array" +}, +"screenDensity": { +"description": "Screen density in DPI. This corresponds to ro.sf.lcd_density", +"format": "int32", +"type": "integer" +}, +"screenX": { +"description": "Screen size in the horizontal (X) dimension measured in pixels.", +"format": "int32", +"type": "integer" +}, +"screenY": { +"description": "Screen size in the vertical (Y) dimension measured in pixels.", +"format": "int32", +"type": "integer" +}, +"supportedAbis": { +"description": "The list of supported ABIs for this device. This corresponds to either android.os.Build.SUPPORTED_ABIS (for API level 21 and above) or android.os.Build.CPU_ABI/CPU_ABI2. The most preferred ABI is the first element in the list. Elements are optionally prefixed by \"version_id:\" (where version_id is the id of an AndroidVersion), denoting an ABI that is supported only on a particular version.", +"items": { +"type": "string" +}, +"type": "array" +}, +"supportedVersionIds": { +"description": "The set of Android versions this device supports.", +"items": { +"type": "string" +}, +"type": "array" +}, +"tags": { +"description": "Tags for this dimension. Examples: \"default\", \"preview\", \"deprecated\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"thumbnailUrl": { +"description": "URL of a thumbnail image (photo) of the device.", +"type": "string" +} +}, +"type": "object" +}, +"AndroidRoboTest": { +"description": "A test of an android application that explores the application on a virtual or physical Android Device, finding culprits and crashes as it goes.", +"id": "AndroidRoboTest", +"properties": { +"appApk": { +"$ref": "FileReference", +"description": "The APK for the application under test." +}, +"appBundle": { +"$ref": "AppBundle", +"description": "A multi-apk app bundle for the application under test." +}, +"appInitialActivity": { +"description": "The initial activity that should be used to start the app.", +"type": "string" +}, +"appPackageId": { +"description": "The java package for the application under test. The default value is determined by examining the application's manifest.", +"type": "string" +}, +"maxDepth": { +"deprecated": true, +"description": "The max depth of the traversal stack Robo can explore. Needs to be at least 2 to make Robo explore the app beyond the first activity. Default is 50.", +"format": "int32", +"type": "integer" +}, +"maxSteps": { +"deprecated": true, +"description": "The max number of steps Robo can execute. Default is no limit.", +"format": "int32", +"type": "integer" +}, +"roboDirectives": { +"description": "A set of directives Robo should apply during the crawl. This allows users to customize the crawl. For example, the username and password for a test account can be provided.", +"items": { +"$ref": "RoboDirective" +}, +"type": "array" +}, +"roboMode": { +"description": "The mode in which Robo should run. Most clients should allow the server to populate this field automatically.", +"enum": [ +"ROBO_MODE_UNSPECIFIED", +"ROBO_VERSION_1", +"ROBO_VERSION_2" +], +"enumDescriptions": [ +"This means that the server should choose the mode. Recommended.", +"Runs Robo in UIAutomator-only mode without app resigning", +"Runs Robo in standard Espresso with UIAutomator fallback" +], +"type": "string" +}, +"roboScript": { +"$ref": "FileReference", +"description": "A JSON file with a sequence of actions Robo should perform as a prologue for the crawl." +}, +"startingIntents": { +"description": "The intents used to launch the app for the crawl. If none are provided, then the main launcher activity is launched. If some are provided, then only those provided are launched (the main launcher activity must be provided explicitly).", +"items": { +"$ref": "RoboStartingIntent" +}, +"type": "array" +} +}, +"type": "object" +}, +"AndroidRuntimeConfiguration": { +"description": "Android configuration that can be selected at the time a test is run.", +"id": "AndroidRuntimeConfiguration", +"properties": { +"locales": { +"description": "The set of available locales.", +"items": { +"$ref": "Locale" +}, +"type": "array" +}, +"orientations": { +"description": "The set of available orientations.", +"items": { +"$ref": "Orientation" +}, +"type": "array" +} +}, +"type": "object" +}, +"AndroidTestLoop": { +"description": "A test of an Android Application with a Test Loop. The intent \\ will be implicitly added, since Games is the only user of this api, for the time being.", +"id": "AndroidTestLoop", +"properties": { +"appApk": { +"$ref": "FileReference", +"description": "The APK for the application under test." +}, +"appBundle": { +"$ref": "AppBundle", +"description": "A multi-apk app bundle for the application under test." +}, +"appPackageId": { +"description": "The java package for the application under test. The default is determined by examining the application's manifest.", +"type": "string" +}, +"scenarioLabels": { +"description": "The list of scenario labels that should be run during the test. The scenario labels should map to labels defined in the application's manifest. For example, player_experience and com.google.test.loops.player_experience add all of the loops labeled in the manifest with the com.google.test.loops.player_experience name to the execution. Scenarios can also be specified in the scenarios field.", +"items": { +"type": "string" +}, +"type": "array" +}, +"scenarios": { +"description": "The list of scenarios that should be run during the test. The default is all test loops, derived from the application's manifest.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"AndroidVersion": { +"description": "A version of the Android OS.", +"id": "AndroidVersion", +"properties": { +"apiLevel": { +"description": "The API level for this Android version. Examples: 18, 19.", +"format": "int32", +"type": "integer" +}, +"codeName": { +"description": "The code name for this Android version. Examples: \"JellyBean\", \"KitKat\".", +"type": "string" +}, +"distribution": { +"$ref": "Distribution", +"description": "Market share for this version." +}, +"id": { +"description": "An opaque id for this Android version. Use this id to invoke the TestExecutionService.", +"type": "string" +}, +"releaseDate": { +"$ref": "Date", +"description": "The date this Android version became available in the market." +}, +"tags": { +"description": "Tags for this dimension. Examples: \"default\", \"preview\", \"deprecated\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"versionString": { +"description": "A string representing this version of the Android OS. Examples: \"4.3\", \"4.4\".", +"type": "string" +} +}, +"type": "object" +}, +"Apk": { +"description": "An Android package file to install.", +"id": "Apk", +"properties": { +"location": { +"$ref": "FileReference", +"description": "The path to an APK to be installed on the device before the test begins." +}, +"packageName": { +"description": "The java package for the APK to be installed. Value is determined by examining the application's manifest.", +"type": "string" +} +}, +"type": "object" +}, +"ApkDetail": { +"description": "Android application details based on application manifest and archive contents.", +"id": "ApkDetail", +"properties": { +"apkManifest": { +"$ref": "ApkManifest" +} +}, +"type": "object" +}, +"ApkManifest": { +"description": "An Android app manifest. See http://developer.android.com/guide/topics/manifest/manifest-intro.html", +"id": "ApkManifest", +"properties": { +"applicationLabel": { +"description": "User-readable name for the application.", +"type": "string" +}, +"intentFilters": { +"items": { +"$ref": "IntentFilter" +}, +"type": "array" +}, +"maxSdkVersion": { +"description": "Maximum API level on which the application is designed to run.", +"format": "int32", +"type": "integer" +}, +"metadata": { +"description": "Meta-data tags defined in the manifest.", +"items": { +"$ref": "Metadata" +}, +"type": "array" +}, +"minSdkVersion": { +"description": "Minimum API level required for the application to run.", +"format": "int32", +"type": "integer" +}, +"packageName": { +"description": "Full Java-style package name for this application, e.g. \"com.example.foo\".", +"type": "string" +}, +"services": { +"description": "Services contained in the tag.", +"items": { +"$ref": "Service" +}, +"type": "array" +}, +"targetSdkVersion": { +"description": "Specifies the API Level on which the application is designed to run.", +"format": "int32", +"type": "integer" +}, +"usesFeature": { +"description": "Feature usage tags defined in the manifest.", +"items": { +"$ref": "UsesFeature" +}, +"type": "array" +}, +"usesPermission": { +"description": "Permissions declared to be used by the application", +"items": { +"type": "string" +}, +"type": "array" +}, +"versionCode": { +"description": "Version number used internally by the app.", +"format": "int64", +"type": "string" +}, +"versionName": { +"description": "Version number shown to users.", +"type": "string" +} +}, +"type": "object" +}, +"AppBundle": { +"description": "An Android App Bundle file format, containing a BundleConfig.pb file, a base module directory, zero or more dynamic feature module directories. See https://developer.android.com/guide/app-bundle/build for guidance on building App Bundles.", +"id": "AppBundle", +"properties": { +"bundleLocation": { +"$ref": "FileReference", +"description": ".aab file representing the app bundle under test." +} +}, +"type": "object" +}, +"CancelDeviceSessionRequest": { +"description": "The request object for cancelling a Device Session.", +"id": "CancelDeviceSessionRequest", +"properties": {}, +"type": "object" +}, +"CancelTestMatrixResponse": { +"description": "Response containing the current state of the specified test matrix.", +"id": "CancelTestMatrixResponse", +"properties": { +"testState": { +"description": "The current rolled-up state of the test matrix. If this state is already final, then the cancelation request will have no effect.", +"enum": [ +"TEST_STATE_UNSPECIFIED", +"VALIDATING", +"PENDING", +"RUNNING", +"FINISHED", +"ERROR", +"UNSUPPORTED_ENVIRONMENT", +"INCOMPATIBLE_ENVIRONMENT", +"INCOMPATIBLE_ARCHITECTURE", +"CANCELLED", +"INVALID" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The execution or matrix is being validated.", +"The execution or matrix is waiting for resources to become available.", +"The execution is currently being processed. Can only be set on an execution.", +"The execution or matrix has terminated normally. On a matrix this means that the matrix level processing completed normally, but individual executions may be in an ERROR state.", +"The execution or matrix has stopped because it encountered an infrastructure failure.", +"The execution was not run because it corresponds to a unsupported environment. Can only be set on an execution.", +"The execution was not run because the provided inputs are incompatible with the requested environment. Example: requested AndroidVersion is lower than APK's minSdkVersion Can only be set on an execution.", +"The execution was not run because the provided inputs are incompatible with the requested architecture. Example: requested device does not support running the native code in the supplied APK Can only be set on an execution.", +"The user cancelled the execution. Can only be set on an execution.", +"The execution or matrix was not run because the provided inputs are not valid. Examples: input file is not of the expected type, is malformed/corrupt, or was flagged as malware" +], +"type": "string" +} +}, +"type": "object" +}, +"ClientInfo": { +"description": "Information about the client which invoked the test.", +"id": "ClientInfo", +"properties": { +"clientInfoDetails": { +"description": "The list of detailed information about client.", +"items": { +"$ref": "ClientInfoDetail" +}, +"type": "array" +}, +"name": { +"description": "Required. Client name, such as gcloud.", +"type": "string" +} +}, +"type": "object" +}, +"ClientInfoDetail": { +"description": "Key-value pair of detailed information about the client which invoked the test. Examples: {'Version', '1.0'}, {'Release Track', 'BETA'}.", +"id": "ClientInfoDetail", +"properties": { +"key": { +"description": "Required. The key of detailed client information.", +"type": "string" +}, +"value": { +"description": "Required. The value of detailed client information.", +"type": "string" +} +}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DeviceFile": { +"description": "A single device file description.", +"id": "DeviceFile", +"properties": { +"obbFile": { +"$ref": "ObbFile", +"description": "A reference to an opaque binary blob file." +}, +"regularFile": { +"$ref": "RegularFile", +"description": "A reference to a regular file." +} +}, +"type": "object" +}, +"DeviceIpBlock": { +"description": "A single device IP block", +"id": "DeviceIpBlock", +"properties": { +"addedDate": { +"$ref": "Date", +"description": "The date this block was added to Firebase Test Lab" +}, +"block": { +"description": "An IP address block in CIDR notation eg: 34.68.194.64/29", +"type": "string" +}, +"form": { +"description": "Whether this block is used by physical or virtual devices", +"enum": [ +"DEVICE_FORM_UNSPECIFIED", +"VIRTUAL", +"PHYSICAL", +"EMULATOR" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"Android virtual device using Compute Engine native virtualization. Firebase Test Lab only.", +"Actual hardware.", +"Android virtual device using emulator in nested virtualization. Equivalent to Android Studio." +], +"type": "string" +} +}, +"type": "object" +}, +"DeviceIpBlockCatalog": { +"description": "List of IP blocks used by the Firebase Test Lab", +"id": "DeviceIpBlockCatalog", +"properties": { +"ipBlocks": { +"description": "The device IP blocks used by Firebase Test Lab", +"items": { +"$ref": "DeviceIpBlock" +}, +"type": "array" +} +}, +"type": "object" +}, +"DeviceSession": { +"description": "Protobuf message describing the device message, used from several RPCs.", +"id": "DeviceSession", +"properties": { +"activeStartTime": { +"description": "Output only. The timestamp that the session first became ACTIVE.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"androidDevice": { +"$ref": "AndroidDevice", +"description": "Required. The requested device" +}, +"createTime": { +"description": "Output only. The time that the Session was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Output only. The title of the DeviceSession to be presented in the UI.", +"readOnly": true, +"type": "string" +}, +"expireTime": { +"description": "Optional. If the device is still in use at this time, any connections will be ended and the SessionState will transition from ACTIVE to FINISHED.", +"format": "google-datetime", +"type": "string" +}, +"inactivityTimeout": { +"description": "Output only. The interval of time that this device must be interacted with before it transitions from ACTIVE to TIMEOUT_INACTIVITY.", +"format": "google-duration", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Optional. Name of the DeviceSession, e.g. \"projects/{project_id}/deviceSessions/{session_id}\"", +"type": "string" +}, +"state": { +"description": "Output only. Current state of the DeviceSession.", +"enum": [ +"SESSION_STATE_UNSPECIFIED", +"REQUESTED", +"PENDING", +"ACTIVE", +"EXPIRED", +"FINISHED", +"UNAVAILABLE", +"ERROR" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Initial state of a session request. The session is being validated for correctness and a device is not yet requested.", +"The session has been validated and is in the queue for a device.", +"The session has been granted and the device is accepting connections.", +"The session duration exceeded the device\u2019s reservation time period and timed out automatically.", +"The user is finished with the session and it was canceled by the user while the request was still getting allocated or after allocation and during device usage period.", +"Unable to complete the session because the device was unavailable and it failed to allocate through the scheduler. For example, a device not in the catalog was requested or the request expired in the allocation queue.", +"Unable to complete the session for an internal reason, such as an infrastructure failure." +], +"readOnly": true, +"type": "string" +}, +"stateHistories": { +"description": "Output only. The historical state transitions of the session_state message including the current session state.", +"items": { +"$ref": "SessionStateEvent" +}, +"readOnly": true, +"type": "array" +}, +"ttl": { +"description": "Optional. The amount of time that a device will be initially allocated for. This can eventually be extended with the UpdateDeviceSession RPC. Default: 15 minutes.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"DirectAccessVersionInfo": { +"description": "Denotes whether Direct Access is supported, and by which client versions. DirectAccessService is currently available as a preview to select developers. You can register today on behalf of you and your team at https://developer.android.com/studio/preview/android-device-streaming", +"id": "DirectAccessVersionInfo", +"properties": { +"directAccessSupported": { +"description": "Whether direct access is supported at all. Clients are expected to filter down the device list to only android models and versions which support Direct Access when that is the user intent.", +"type": "boolean" +}, +"minimumAndroidStudioVersion": { +"description": "Output only. Indicates client-device compatibility, where a device is known to work only with certain workarounds implemented in the Android Studio client. Expected format \"major.minor.micro.patch\", e.g. \"5921.22.2211.8881706\".", +"type": "string" +} +}, +"type": "object" +}, +"Distribution": { +"description": "Data about the relative number of devices running a given configuration of the Android platform.", +"id": "Distribution", +"properties": { +"marketShare": { +"description": "Output only. The estimated fraction (0-1) of the total market with this configuration.", +"format": "double", +"type": "number" +}, +"measurementTime": { +"description": "Output only. The time this distribution was measured.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Environment": { +"description": "The environment in which the test is run.", +"id": "Environment", +"properties": { +"androidDevice": { +"$ref": "AndroidDevice", +"description": "An Android device which must be used with an Android test." +}, +"iosDevice": { +"$ref": "IosDevice", +"description": "An iOS device which must be used with an iOS test." +} +}, +"type": "object" +}, +"EnvironmentMatrix": { +"description": "The matrix of environments in which the test is to be executed.", +"id": "EnvironmentMatrix", +"properties": { +"androidDeviceList": { +"$ref": "AndroidDeviceList", +"description": "A list of Android devices; the test will be run only on the specified devices." +}, +"androidMatrix": { +"$ref": "AndroidMatrix", +"description": "A matrix of Android devices." +}, +"iosDeviceList": { +"$ref": "IosDeviceList", +"description": "A list of iOS devices." +} +}, +"type": "object" +}, +"EnvironmentVariable": { +"description": "A key-value pair passed as an environment variable to the test.", +"id": "EnvironmentVariable", +"properties": { +"key": { +"description": "Key for the environment variable.", +"type": "string" +}, +"value": { +"description": "Value for the environment variable.", +"type": "string" +} +}, +"type": "object" +}, +"FileReference": { +"description": "A reference to a file, used for user inputs.", +"id": "FileReference", +"properties": { +"gcsPath": { +"description": "A path to a file in Google Cloud Storage. Example: gs://build-app-1414623860166/app%40debug-unaligned.apk These paths are expected to be url encoded (percent encoding)", +"type": "string" +} +}, +"type": "object" +}, +"GetApkDetailsResponse": { +"description": "Response containing the details of the specified Android application.", +"id": "GetApkDetailsResponse", +"properties": { +"apkDetail": { +"$ref": "ApkDetail", +"description": "Details of the Android App." +} +}, +"type": "object" +}, +"GoogleAuto": { +"description": "Enables automatic Google account login. If set, the service automatically generates a Google test account and adds it to the device, before executing the test. Note that test accounts might be reused. Many applications show their full set of functionalities when an account is present on the device. Logging into the device with these generated accounts allows testing more functionalities.", +"id": "GoogleAuto", +"properties": {}, +"type": "object" +}, +"GoogleCloudStorage": { +"description": "A storage location within Google cloud storage (GCS).", +"id": "GoogleCloudStorage", +"properties": { +"gcsPath": { +"description": "Required. The path to a directory in GCS that will eventually contain the results for this test. The requesting user must have write access on the bucket in the supplied path.", +"type": "string" +} +}, +"type": "object" +}, +"IntentFilter": { +"description": "The section of an tag. https://developer.android.com/guide/topics/manifest/intent-filter-element.html", +"id": "IntentFilter", +"properties": { +"actionNames": { +"description": "The android:name value of the tag.", +"items": { +"type": "string" +}, +"type": "array" +}, +"categoryNames": { +"description": "The android:name value of the tag.", +"items": { +"type": "string" +}, +"type": "array" +}, +"mimeType": { +"description": "The android:mimeType value of the tag.", +"type": "string" +} +}, +"type": "object" +}, +"IosDevice": { +"description": "A single iOS device.", +"id": "IosDevice", +"properties": { +"iosModelId": { +"description": "Required. The id of the iOS device to be used. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +}, +"iosVersionId": { +"description": "Required. The id of the iOS major software version to be used. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +}, +"locale": { +"description": "Required. The locale the test device used for testing. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +}, +"orientation": { +"description": "Required. How the device is oriented during the test. Use the TestEnvironmentDiscoveryService to get supported options.", +"type": "string" +} +}, +"type": "object" +}, +"IosDeviceCatalog": { +"description": "The currently supported iOS devices.", +"id": "IosDeviceCatalog", +"properties": { +"models": { +"description": "The set of supported iOS device models.", +"items": { +"$ref": "IosModel" +}, +"type": "array" +}, +"runtimeConfiguration": { +"$ref": "IosRuntimeConfiguration", +"description": "The set of supported runtime configurations." +}, +"versions": { +"description": "The set of supported iOS software versions.", +"items": { +"$ref": "IosVersion" +}, +"type": "array" +}, +"xcodeVersions": { +"description": "The set of supported Xcode versions.", +"items": { +"$ref": "XcodeVersion" +}, +"type": "array" +} +}, +"type": "object" +}, +"IosDeviceFile": { +"description": "A file or directory to install on the device before the test starts.", +"id": "IosDeviceFile", +"properties": { +"bundleId": { +"description": "The bundle id of the app where this file lives. iOS apps sandbox their own filesystem, so app files must specify which app installed on the device.", +"type": "string" +}, +"content": { +"$ref": "FileReference", +"description": "The source file" +}, +"devicePath": { +"description": "Location of the file on the device, inside the app's sandboxed filesystem", +"type": "string" +} +}, +"type": "object" +}, +"IosDeviceList": { +"description": "A list of iOS device configurations in which the test is to be executed.", +"id": "IosDeviceList", +"properties": { +"iosDevices": { +"description": "Required. A list of iOS devices.", +"items": { +"$ref": "IosDevice" +}, +"type": "array" +} +}, +"type": "object" +}, +"IosModel": { +"description": "A description of an iOS device tests may be run on.", +"id": "IosModel", +"properties": { +"deviceCapabilities": { +"description": "Device capabilities. Copied from https://developer.apple.com/library/archive/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html", +"items": { +"type": "string" +}, +"type": "array" +}, +"formFactor": { +"description": "Whether this device is a phone, tablet, wearable, etc.", +"enum": [ +"DEVICE_FORM_FACTOR_UNSPECIFIED", +"PHONE", +"TABLET", +"WEARABLE" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"This device has the shape of a phone.", +"This device has the shape of a tablet.", +"This device has the shape of a watch or other wearable." +], +"type": "string" +}, +"id": { +"description": "The unique opaque id for this model. Use this for invoking the TestExecutionService.", +"type": "string" +}, +"name": { +"description": "The human-readable name for this device model. Examples: \"iPhone 4s\", \"iPad Mini 2\".", +"type": "string" +}, +"perVersionInfo": { +"description": "Version-specific information of an iOS model.", +"items": { +"$ref": "PerIosVersionInfo" +}, +"type": "array" +}, +"screenDensity": { +"description": "Screen density in DPI.", +"format": "int32", +"type": "integer" +}, +"screenX": { +"description": "Screen size in the horizontal (X) dimension measured in pixels.", +"format": "int32", +"type": "integer" +}, +"screenY": { +"description": "Screen size in the vertical (Y) dimension measured in pixels.", +"format": "int32", +"type": "integer" +}, +"supportedVersionIds": { +"description": "The set of iOS major software versions this device supports.", +"items": { +"type": "string" +}, +"type": "array" +}, +"tags": { +"description": "Tags for this dimension. Examples: \"default\", \"preview\", \"deprecated\".", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"IosRoboTest": { +"description": "A test that explores an iOS application on an iOS device.", +"id": "IosRoboTest", +"properties": { +"appBundleId": { +"description": "The bundle ID for the app-under-test. This is determined by examining the application's \"Info.plist\" file.", +"type": "string" +}, +"appIpa": { +"$ref": "FileReference", +"description": "Required. The ipa stored at this file should be used to run the test." +}, +"roboScript": { +"$ref": "FileReference", +"description": "An optional Roboscript to customize the crawl. See https://firebase.google.com/docs/test-lab/android/robo-scripts-reference for more information about Roboscripts." +} +}, +"type": "object" +}, +"IosRuntimeConfiguration": { +"description": "iOS configuration that can be selected at the time a test is run.", +"id": "IosRuntimeConfiguration", +"properties": { +"locales": { +"description": "The set of available locales.", +"items": { +"$ref": "Locale" +}, +"type": "array" +}, +"orientations": { +"description": "The set of available orientations.", +"items": { +"$ref": "Orientation" +}, +"type": "array" +} +}, +"type": "object" +}, +"IosTestLoop": { +"description": "A test of an iOS application that implements one or more game loop scenarios. This test type accepts an archived application (.ipa file) and a list of integer scenarios that will be executed on the app sequentially.", +"id": "IosTestLoop", +"properties": { +"appBundleId": { +"description": "Output only. The bundle id for the application under test.", +"type": "string" +}, +"appIpa": { +"$ref": "FileReference", +"description": "Required. The .ipa of the application to test." +}, +"scenarios": { +"description": "The list of scenarios that should be run during the test. Defaults to the single scenario 0 if unspecified.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"IosTestSetup": { +"description": "A description of how to set up an iOS device prior to running the test.", +"id": "IosTestSetup", +"properties": { +"additionalIpas": { +"description": "iOS apps to install in addition to those being directly tested.", +"items": { +"$ref": "FileReference" +}, +"type": "array" +}, +"networkProfile": { +"description": "The network traffic profile used for running the test. Available network profiles can be queried by using the NETWORK_CONFIGURATION environment type when calling TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.", +"type": "string" +}, +"pullDirectories": { +"description": "List of directories on the device to upload to Cloud Storage at the end of the test. Directories should either be in a shared directory (such as /private/var/mobile/Media) or within an accessible directory inside the app's filesystem (such as /Documents) by specifying the bundle ID.", +"items": { +"$ref": "IosDeviceFile" +}, +"type": "array" +}, +"pushFiles": { +"description": "List of files to push to the device before starting the test.", +"items": { +"$ref": "IosDeviceFile" +}, +"type": "array" +} +}, +"type": "object" +}, +"IosVersion": { +"description": "An iOS version.", +"id": "IosVersion", +"properties": { +"id": { +"description": "An opaque id for this iOS version. Use this id to invoke the TestExecutionService.", +"type": "string" +}, +"majorVersion": { +"description": "An integer representing the major iOS version. Examples: \"8\", \"9\".", +"format": "int32", +"type": "integer" +}, +"minorVersion": { +"description": "An integer representing the minor iOS version. Examples: \"1\", \"2\".", +"format": "int32", +"type": "integer" +}, +"supportedXcodeVersionIds": { +"description": "The available Xcode versions for this version.", +"items": { +"type": "string" +}, +"type": "array" +}, +"tags": { +"description": "Tags for this dimension. Examples: \"default\", \"preview\", \"deprecated\".", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"IosXcTest": { +"description": "A test of an iOS application that uses the XCTest framework. Xcode supports the option to \"build for testing\", which generates an .xctestrun file that contains a test specification (arguments, test methods, etc). This test type accepts a zip file containing the .xctestrun file and the corresponding contents of the Build/Products directory that contains all the binaries needed to run the tests.", +"id": "IosXcTest", +"properties": { +"appBundleId": { +"description": "Output only. The bundle id for the application under test.", +"type": "string" +}, +"testSpecialEntitlements": { +"description": "The option to test special app entitlements. Setting this would re-sign the app having special entitlements with an explicit application-identifier. Currently supports testing aps-environment entitlement.", +"type": "boolean" +}, +"testsZip": { +"$ref": "FileReference", +"description": "Required. The .zip containing the .xctestrun file and the contents of the DerivedData/Build/Products directory. The .xctestrun file in this zip is ignored if the xctestrun field is specified." +}, +"xcodeVersion": { +"description": "The Xcode version that should be used for the test. Use the TestEnvironmentDiscoveryService to get supported options. Defaults to the latest Xcode version Firebase Test Lab supports.", +"type": "string" +}, +"xctestrun": { +"$ref": "FileReference", +"description": "An .xctestrun file that will override the .xctestrun file in the tests zip. Because the .xctestrun file contains environment variables along with test methods to run and/or ignore, this can be useful for sharding tests. Default is taken from the tests zip." +} +}, +"type": "object" +}, +"LauncherActivityIntent": { +"description": "Specifies an intent that starts the main launcher activity.", +"id": "LauncherActivityIntent", +"properties": {}, +"type": "object" +}, +"ListDeviceSessionsResponse": { +"description": "A list of device sessions.", +"id": "ListDeviceSessionsResponse", +"properties": { +"deviceSessions": { +"description": "The sessions matching the specified filter in the given cloud project.", +"items": { +"$ref": "DeviceSession" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"Locale": { +"description": "A location/region designation for language.", +"id": "Locale", +"properties": { +"id": { +"description": "The id for this locale. Example: \"en_US\".", +"type": "string" +}, +"name": { +"description": "A human-friendly name for this language/locale. Example: \"English\".", +"type": "string" +}, +"region": { +"description": "A human-friendly string representing the region for this locale. Example: \"United States\". Not present for every locale.", +"type": "string" +}, +"tags": { +"description": "Tags for this dimension. Example: \"default\".", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ManualSharding": { +"description": "Shards test cases into the specified groups of packages, classes, and/or methods. With manual sharding enabled, specifying test targets via environment_variables or in InstrumentationTest is invalid.", +"id": "ManualSharding", +"properties": { +"testTargetsForShard": { +"description": "Required. Group of packages, classes, and/or test methods to be run for each manually-created shard. You must specify at least one shard if this field is present. When you select one or more physical devices, the number of repeated test_targets_for_shard must be <= 50. When you select one or more ARM virtual devices, it must be <= 200. When you select only x86 virtual devices, it must be <= 500.", +"items": { +"$ref": "TestTargetsForShard" +}, +"type": "array" +} +}, +"type": "object" +}, +"MatrixErrorDetail": { +"description": "Describes a single error or issue with a matrix.", +"id": "MatrixErrorDetail", +"properties": { +"message": { +"description": "Output only. A human-readable message about how the error in the TestMatrix. Expands on the `reason` field with additional details and possible options to fix the issue.", +"readOnly": true, +"type": "string" +}, +"reason": { +"description": "Output only. The reason for the error. This is a constant value in UPPER_SNAKE_CASE that identifies the cause of the error.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Metadata": { +"description": "A tag within a manifest. https://developer.android.com/guide/topics/manifest/meta-data-element.html", +"id": "Metadata", +"properties": { +"name": { +"description": "The android:name value", +"type": "string" +}, +"value": { +"description": "The android:value value", +"type": "string" +} +}, +"type": "object" +}, +"NetworkConfiguration": { +"id": "NetworkConfiguration", +"properties": { +"downRule": { +"$ref": "TrafficRule", +"description": "The emulation rule applying to the download traffic." +}, +"id": { +"description": "The unique opaque id for this network traffic configuration.", +"type": "string" +}, +"upRule": { +"$ref": "TrafficRule", +"description": "The emulation rule applying to the upload traffic." +} +}, +"type": "object" +}, +"NetworkConfigurationCatalog": { +"id": "NetworkConfigurationCatalog", +"properties": { +"configurations": { +"items": { +"$ref": "NetworkConfiguration" +}, +"type": "array" +} +}, +"type": "object" +}, +"NoActivityIntent": { +"description": "Skips the starting activity", +"id": "NoActivityIntent", +"properties": {}, +"type": "object" +}, +"ObbFile": { +"description": "An opaque binary blob file to install on the device before the test starts.", +"id": "ObbFile", +"properties": { +"obb": { +"$ref": "FileReference", +"description": "Required. Opaque Binary Blob (OBB) file(s) to install on the device." +}, +"obbFileName": { +"description": "Required. OBB file name which must conform to the format as specified by Android e.g. [main|patch].0300110.com.example.android.obb which will be installed into \\/Android/obb/\\/ on the device.", +"type": "string" +} +}, +"type": "object" +}, +"Orientation": { +"description": "Screen orientation of the device.", +"id": "Orientation", +"properties": { +"id": { +"description": "The id for this orientation. Example: \"portrait\".", +"type": "string" +}, +"name": { +"description": "A human-friendly name for this orientation. Example: \"portrait\".", +"type": "string" +}, +"tags": { +"description": "Tags for this dimension. Example: \"default\".", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"PerAndroidVersionInfo": { +"description": "A version-specific information of an Android model.", +"id": "PerAndroidVersionInfo", +"properties": { +"deviceCapacity": { +"description": "The number of online devices for an Android version.", +"enum": [ +"DEVICE_CAPACITY_UNSPECIFIED", +"DEVICE_CAPACITY_HIGH", +"DEVICE_CAPACITY_MEDIUM", +"DEVICE_CAPACITY_LOW", +"DEVICE_CAPACITY_NONE" +], +"enumDescriptions": [ +"The value of device capacity is unknown or unset.", +"Devices that are high in capacity (The lab has a large number of these devices). These devices are generally suggested for running a large number of simultaneous tests (e.g. more than 100 tests). Please note that high capacity devices do not guarantee short wait times due to several factors: 1. Traffic (how heavily they are used at any given moment) 2. High capacity devices are prioritized for certain usages, which may cause user tests to be slower than selecting other similar device types.", +"Devices that are medium in capacity (The lab has a decent number of these devices, though not as many as high capacity devices). These devices are suitable for fewer test runs (e.g. fewer than 100 tests) and only for low shard counts (e.g. less than 10 shards).", +"Devices that are low in capacity (The lab has a small number of these devices). These devices may be used if users need to test on this specific device model and version. Please note that due to low capacity, the tests may take much longer to finish, especially if a large number of tests are invoked at once. These devices are not suitable for test sharding.", +"Devices that are completely missing from the lab. These devices are unavailable either temporarily or permanently and should not be requested. If the device is also marked as deprecated, this state is very likely permanent." +], +"type": "string" +}, +"directAccessVersionInfo": { +"$ref": "DirectAccessVersionInfo", +"description": "Output only. Identifies supported clients for DirectAccess for this Android version.", +"readOnly": true +}, +"interactiveDeviceAvailabilityEstimate": { +"description": "Output only. The estimated wait time for a single interactive device session using Direct Access.", +"format": "google-duration", +"readOnly": true, +"type": "string" +}, +"versionId": { +"description": "An Android version.", +"type": "string" +} +}, +"type": "object" +}, +"PerIosVersionInfo": { +"description": "A version-specific information of an iOS model.", +"id": "PerIosVersionInfo", +"properties": { +"deviceCapacity": { +"description": "The number of online devices for an iOS version.", +"enum": [ +"DEVICE_CAPACITY_UNSPECIFIED", +"DEVICE_CAPACITY_HIGH", +"DEVICE_CAPACITY_MEDIUM", +"DEVICE_CAPACITY_LOW", +"DEVICE_CAPACITY_NONE" +], +"enumDescriptions": [ +"The value of device capacity is unknown or unset.", +"Devices that are high in capacity (The lab has a large number of these devices). These devices are generally suggested for running a large number of simultaneous tests (e.g. more than 100 tests). Please note that high capacity devices do not guarantee short wait times due to several factors: 1. Traffic (how heavily they are used at any given moment) 2. High capacity devices are prioritized for certain usages, which may cause user tests to be slower than selecting other similar device types.", +"Devices that are medium in capacity (The lab has a decent number of these devices, though not as many as high capacity devices). These devices are suitable for fewer test runs (e.g. fewer than 100 tests) and only for low shard counts (e.g. less than 10 shards).", +"Devices that are low in capacity (The lab has a small number of these devices). These devices may be used if users need to test on this specific device model and version. Please note that due to low capacity, the tests may take much longer to finish, especially if a large number of tests are invoked at once. These devices are not suitable for test sharding.", +"Devices that are completely missing from the lab. These devices are unavailable either temporarily or permanently and should not be requested. If the device is also marked as deprecated, this state is very likely permanent." +], +"type": "string" +}, +"versionId": { +"description": "An iOS version.", +"type": "string" +} +}, +"type": "object" +}, +"ProvidedSoftwareCatalog": { +"description": "The currently provided software environment on the devices under test.", +"id": "ProvidedSoftwareCatalog", +"properties": { +"androidxOrchestratorVersion": { +"description": "A string representing the current version of AndroidX Test Orchestrator that is used in the environment. The package is available at https://maven.google.com/web/index.html#androidx.test:orchestrator.", +"type": "string" +}, +"orchestratorVersion": { +"deprecated": true, +"description": "Deprecated: Use AndroidX Test Orchestrator going forward. A string representing the current version of Android Test Orchestrator that is used in the environment. The package is available at https://maven.google.com/web/index.html#com.android.support.test:orchestrator.", +"type": "string" +} +}, +"type": "object" +}, +"RegularFile": { +"description": "A file or directory to install on the device before the test starts.", +"id": "RegularFile", +"properties": { +"content": { +"$ref": "FileReference", +"description": "Required. The source file." +}, +"devicePath": { +"description": "Required. Where to put the content on the device. Must be an absolute, allowlisted path. If the file exists, it will be replaced. The following device-side directories and any of their subdirectories are allowlisted: ${EXTERNAL_STORAGE}, /sdcard, or /storage ${ANDROID_DATA}/local/tmp, or /data/local/tmp Specifying a path outside of these directory trees is invalid. The paths /sdcard and /data will be made available and treated as implicit path substitutions. E.g. if /sdcard on a particular device does not map to external storage, the system will replace it with the external storage path prefix for that device and copy the file there. It is strongly advised to use the Environment API in app and test code to access files on the device in a portable way.", +"type": "string" +} +}, +"type": "object" +}, +"ResultStorage": { +"description": "Locations where the results of running the test are stored.", +"id": "ResultStorage", +"properties": { +"googleCloudStorage": { +"$ref": "GoogleCloudStorage", +"description": "Required." +}, +"resultsUrl": { +"description": "Output only. URL to the results in the Firebase Web Console.", +"type": "string" +}, +"toolResultsExecution": { +"$ref": "ToolResultsExecution", +"description": "Output only. The tool results execution that results are written to." +}, +"toolResultsHistory": { +"$ref": "ToolResultsHistory", +"description": "The tool results history that contains the tool results execution that results are written to. If not provided, the service will choose an appropriate value." +} +}, +"type": "object" +}, +"RoboDirective": { +"description": "Directs Robo to interact with a specific UI element if it is encountered during the crawl. Currently, Robo can perform text entry or element click.", +"id": "RoboDirective", +"properties": { +"actionType": { +"description": "Required. The type of action that Robo should perform on the specified element.", +"enum": [ +"ACTION_TYPE_UNSPECIFIED", +"SINGLE_CLICK", +"ENTER_TEXT", +"IGNORE" +], +"enumDescriptions": [ +"DO NOT USE. For proto versioning only.", +"Direct Robo to click on the specified element. No-op if specified element is not clickable.", +"Direct Robo to enter text on the specified element. No-op if specified element is not enabled or does not allow text entry.", +"Direct Robo to ignore interactions with a specific element." +], +"type": "string" +}, +"inputText": { +"description": "The text that Robo is directed to set. If left empty, the directive will be treated as a CLICK on the element matching the resource_name.", +"type": "string" +}, +"resourceName": { +"description": "Required. The android resource name of the target UI element. For example, in Java: R.string.foo in xml: @string/foo Only the \"foo\" part is needed. Reference doc: https://developer.android.com/guide/topics/resources/accessing-resources.html", +"type": "string" +} +}, +"type": "object" +}, +"RoboStartingIntent": { +"description": "Message for specifying the start activities to crawl.", +"id": "RoboStartingIntent", +"properties": { +"launcherActivity": { +"$ref": "LauncherActivityIntent", +"description": "An intent that starts the main launcher activity." +}, +"noActivity": { +"$ref": "NoActivityIntent", +"description": "Skips the starting activity" +}, +"startActivity": { +"$ref": "StartActivityIntent", +"description": "An intent that starts an activity with specific details." +}, +"timeout": { +"description": "Timeout in seconds for each intent.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Service": { +"description": "The section of an tag. https://developer.android.com/guide/topics/manifest/service-element", +"id": "Service", +"properties": { +"intentFilter": { +"description": "Intent filters in the service", +"items": { +"$ref": "IntentFilter" +}, +"type": "array" +}, +"name": { +"description": "The android:name value", +"type": "string" +} +}, +"type": "object" +}, +"SessionStateEvent": { +"description": "A message encapsulating a series of Session states and the time that the DeviceSession first entered those states.", +"id": "SessionStateEvent", +"properties": { +"eventTime": { +"description": "Output only. The time that the session_state first encountered that state.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"sessionState": { +"description": "Output only. The session_state tracked by this event", +"enum": [ +"SESSION_STATE_UNSPECIFIED", +"REQUESTED", +"PENDING", +"ACTIVE", +"EXPIRED", +"FINISHED", +"UNAVAILABLE", +"ERROR" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"Initial state of a session request. The session is being validated for correctness and a device is not yet requested.", +"The session has been validated and is in the queue for a device.", +"The session has been granted and the device is accepting connections.", +"The session duration exceeded the device\u2019s reservation time period and timed out automatically.", +"The user is finished with the session and it was canceled by the user while the request was still getting allocated or after allocation and during device usage period.", +"Unable to complete the session because the device was unavailable and it failed to allocate through the scheduler. For example, a device not in the catalog was requested or the request expired in the allocation queue.", +"Unable to complete the session for an internal reason, such as an infrastructure failure." +], +"readOnly": true, +"type": "string" +}, +"stateMessage": { +"description": "Output only. A human-readable message to explain the state.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Shard": { +"description": "Output only. Details about the shard.", +"id": "Shard", +"properties": { +"estimatedShardDuration": { +"description": "Output only. The estimated shard duration based on previous test case timing records, if available.", +"format": "google-duration", +"readOnly": true, +"type": "string" +}, +"numShards": { +"description": "Output only. The total number of shards.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"shardIndex": { +"description": "Output only. The index of the shard among all the shards.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"testTargetsForShard": { +"$ref": "TestTargetsForShard", +"description": "Output only. Test targets for each shard. Only set for manual sharding.", +"readOnly": true +} +}, +"type": "object" +}, +"ShardingOption": { +"description": "Options for enabling sharding.", +"id": "ShardingOption", +"properties": { +"manualSharding": { +"$ref": "ManualSharding", +"description": "Shards test cases into the specified groups of packages, classes, and/or methods." +}, +"smartSharding": { +"$ref": "SmartSharding", +"description": "Shards test based on previous test case timing records." +}, +"uniformSharding": { +"$ref": "UniformSharding", +"description": "Uniformly shards test cases given a total number of shards." +} +}, +"type": "object" +}, +"SmartSharding": { +"description": "Shards test based on previous test case timing records.", +"id": "SmartSharding", +"properties": { +"targetedShardDuration": { +"description": "The amount of time tests within a shard should take. Default: 300 seconds (5 minutes). The minimum allowed: 120 seconds (2 minutes). The shard count is dynamically set based on time, up to the maximum shard limit (described below). To guarantee at least one test case for each shard, the number of shards will not exceed the number of test cases. Shard duration will be exceeded if: - The maximum shard limit is reached and there is more calculated test time remaining to allocate into shards. - Any individual test is estimated to be longer than the targeted shard duration. Shard duration is not guaranteed because smart sharding uses test case history and default durations which may not be accurate. The rules for finding the test case timing records are: - If the service has processed a test case in the last 30 days, the record of the latest successful test case will be used. - For new test cases, the average duration of other known test cases will be used. - If there are no previous test case timing records available, the default test case duration is 15 seconds. Because the actual shard duration can exceed the targeted shard duration, we recommend that you set the targeted value at least 5 minutes less than the maximum allowed test timeout (45 minutes for physical devices and 60 minutes for virtual), or that you use the custom test timeout value that you set. This approach avoids cancelling the shard before all tests can finish. Note that there is a limit for maximum number of shards. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 200. When you select only x86 virtual devices, it must be <= 500. To guarantee at least one test case for per shard, the number of shards will not exceed the number of test cases. Each shard created counts toward daily test quota.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"StartActivityIntent": { +"description": "A starting intent specified by an action, uri, and categories.", +"id": "StartActivityIntent", +"properties": { +"action": { +"description": "Action name. Required for START_ACTIVITY.", +"type": "string" +}, +"categories": { +"description": "Intent categories to set on the intent.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uri": { +"description": "URI for the action.", +"type": "string" +} +}, +"type": "object" +}, +"SystraceSetup": { +"id": "SystraceSetup", +"properties": { +"durationSeconds": { +"deprecated": true, +"description": "Systrace duration in seconds. Should be between 1 and 30 seconds. 0 disables systrace.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TestDetails": { +"description": "Additional details about the progress of the running test.", +"id": "TestDetails", +"properties": { +"errorMessage": { +"description": "Output only. If the TestState is ERROR, then this string will contain human-readable details about the error.", +"type": "string" +}, +"progressMessages": { +"description": "Output only. Human-readable, detailed descriptions of the test's progress. For example: \"Provisioning a device\", \"Starting Test\". During the course of execution new data may be appended to the end of progress_messages.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestEnvironmentCatalog": { +"description": "A description of a test environment.", +"id": "TestEnvironmentCatalog", +"properties": { +"androidDeviceCatalog": { +"$ref": "AndroidDeviceCatalog", +"description": "Supported Android devices." +}, +"deviceIpBlockCatalog": { +"$ref": "DeviceIpBlockCatalog", +"description": "The IP blocks used by devices in the test environment." +}, +"iosDeviceCatalog": { +"$ref": "IosDeviceCatalog", +"description": "Supported iOS devices." +}, +"networkConfigurationCatalog": { +"$ref": "NetworkConfigurationCatalog", +"description": "Supported network configurations." +}, +"softwareCatalog": { +"$ref": "ProvidedSoftwareCatalog", +"description": "The software test environment provided by TestExecutionService." +} +}, +"type": "object" +}, +"TestExecution": { +"description": "A single test executed in a single environment.", +"id": "TestExecution", +"properties": { +"environment": { +"$ref": "Environment", +"description": "Output only. How the host machine(s) are configured." +}, +"id": { +"description": "Output only. Unique id set by the service.", +"type": "string" +}, +"matrixId": { +"description": "Output only. Id of the containing TestMatrix.", +"type": "string" +}, +"projectId": { +"description": "Output only. The cloud project that owns the test execution.", +"type": "string" +}, +"shard": { +"$ref": "Shard", +"description": "Output only. Details about the shard." +}, +"state": { +"description": "Output only. Indicates the current progress of the test execution (e.g., FINISHED).", +"enum": [ +"TEST_STATE_UNSPECIFIED", +"VALIDATING", +"PENDING", +"RUNNING", +"FINISHED", +"ERROR", +"UNSUPPORTED_ENVIRONMENT", +"INCOMPATIBLE_ENVIRONMENT", +"INCOMPATIBLE_ARCHITECTURE", +"CANCELLED", +"INVALID" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The execution or matrix is being validated.", +"The execution or matrix is waiting for resources to become available.", +"The execution is currently being processed. Can only be set on an execution.", +"The execution or matrix has terminated normally. On a matrix this means that the matrix level processing completed normally, but individual executions may be in an ERROR state.", +"The execution or matrix has stopped because it encountered an infrastructure failure.", +"The execution was not run because it corresponds to a unsupported environment. Can only be set on an execution.", +"The execution was not run because the provided inputs are incompatible with the requested environment. Example: requested AndroidVersion is lower than APK's minSdkVersion Can only be set on an execution.", +"The execution was not run because the provided inputs are incompatible with the requested architecture. Example: requested device does not support running the native code in the supplied APK Can only be set on an execution.", +"The user cancelled the execution. Can only be set on an execution.", +"The execution or matrix was not run because the provided inputs are not valid. Examples: input file is not of the expected type, is malformed/corrupt, or was flagged as malware" +], +"type": "string" +}, +"testDetails": { +"$ref": "TestDetails", +"description": "Output only. Additional details about the running test." +}, +"testSpecification": { +"$ref": "TestSpecification", +"description": "Output only. How to run the test." +}, +"timestamp": { +"description": "Output only. The time this test execution was initially created.", +"format": "google-datetime", +"type": "string" +}, +"toolResultsStep": { +"$ref": "ToolResultsStep", +"description": "Output only. Where the results for this execution are written." +} +}, +"type": "object" +}, +"TestMatrix": { +"description": "TestMatrix captures all details about a test. It contains the environment configuration, test specification, test executions and overall state and outcome.", +"id": "TestMatrix", +"properties": { +"clientInfo": { +"$ref": "ClientInfo", +"description": "Information about the client which invoked the test." +}, +"environmentMatrix": { +"$ref": "EnvironmentMatrix", +"description": "Required. The devices the tests are being executed on." +}, +"extendedInvalidMatrixDetails": { +"description": "Output only. Details about why a matrix was deemed invalid. If multiple checks can be safely performed, they will be reported but no assumptions should be made about the length of this list.", +"items": { +"$ref": "MatrixErrorDetail" +}, +"readOnly": true, +"type": "array" +}, +"failFast": { +"description": "If true, only a single attempt at most will be made to run each execution/shard in the matrix. Flaky test attempts are not affected. Normally, 2 or more attempts are made if a potential infrastructure issue is detected. This feature is for latency sensitive workloads. The incidence of execution failures may be significantly greater for fail-fast matrices and support is more limited because of that expectation.", +"type": "boolean" +}, +"flakyTestAttempts": { +"description": "The number of times a TestExecution should be re-attempted if one or more of its test cases fail for any reason. The maximum number of reruns allowed is 10. Default is 0, which implies no reruns.", +"format": "int32", +"type": "integer" +}, +"invalidMatrixDetails": { +"description": "Output only. Describes why the matrix is considered invalid. Only useful for matrices in the INVALID state.", +"enum": [ +"INVALID_MATRIX_DETAILS_UNSPECIFIED", +"DETAILS_UNAVAILABLE", +"MALFORMED_APK", +"MALFORMED_TEST_APK", +"NO_MANIFEST", +"NO_PACKAGE_NAME", +"INVALID_PACKAGE_NAME", +"TEST_SAME_AS_APP", +"NO_INSTRUMENTATION", +"NO_SIGNATURE", +"INSTRUMENTATION_ORCHESTRATOR_INCOMPATIBLE", +"NO_TEST_RUNNER_CLASS", +"NO_LAUNCHER_ACTIVITY", +"FORBIDDEN_PERMISSIONS", +"INVALID_ROBO_DIRECTIVES", +"INVALID_RESOURCE_NAME", +"INVALID_DIRECTIVE_ACTION", +"TEST_LOOP_INTENT_FILTER_NOT_FOUND", +"SCENARIO_LABEL_NOT_DECLARED", +"SCENARIO_LABEL_MALFORMED", +"SCENARIO_NOT_DECLARED", +"DEVICE_ADMIN_RECEIVER", +"MALFORMED_XC_TEST_ZIP", +"BUILT_FOR_IOS_SIMULATOR", +"NO_TESTS_IN_XC_TEST_ZIP", +"USE_DESTINATION_ARTIFACTS", +"TEST_NOT_APP_HOSTED", +"PLIST_CANNOT_BE_PARSED", +"TEST_ONLY_APK", +"MALFORMED_IPA", +"MISSING_URL_SCHEME", +"MALFORMED_APP_BUNDLE", +"NO_CODE_APK", +"INVALID_INPUT_APK", +"INVALID_APK_PREVIEW_SDK", +"MATRIX_TOO_LARGE", +"TEST_QUOTA_EXCEEDED", +"SERVICE_NOT_ACTIVATED", +"UNKNOWN_PERMISSION_ERROR" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false, +true, +false, +false, +false, +false, +false, +false, +false, +false, +false, +false +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The matrix is INVALID, but there are no further details available.", +"The input app APK could not be parsed.", +"The input test APK could not be parsed.", +"The AndroidManifest.xml could not be found.", +"The APK manifest does not declare a package name.", +"The APK application ID (aka package name) is invalid. See also https://developer.android.com/studio/build/application-id", +"The test package and app package are the same.", +"The test apk does not declare an instrumentation.", +"The input app apk does not have a signature.", +"The test runner class specified by user or in the test APK's manifest file is not compatible with Android Test Orchestrator. Orchestrator is only compatible with AndroidJUnitRunner version 1.1 or higher. Orchestrator can be disabled by using DO_NOT_USE_ORCHESTRATOR OrchestratorOption.", +"The test APK does not contain the test runner class specified by the user or in the manifest file. This can be caused by one of the following reasons: - the user provided a runner class name that's incorrect, or - the test runner isn't built into the test APK (might be in the app APK instead).", +"A main launcher activity could not be found.", +"The app declares one or more permissions that are not allowed.", +"There is a conflict in the provided robo_directives.", +"There is at least one invalid resource name in the provided robo directives", +"Invalid definition of action in the robo directives (e.g. a click or ignore action includes an input text field)", +"There is no test loop intent filter, or the one that is given is not formatted correctly.", +"The request contains a scenario label that was not declared in the manifest.", +"There was an error when parsing a label's value.", +"The request contains a scenario number that was not declared in the manifest.", +"Device administrator applications are not allowed.", +"The zipped XCTest was malformed. The zip did not contain a single .xctestrun file and the contents of the DerivedData/Build/Products directory.", +"The zipped XCTest was built for the iOS simulator rather than for a physical device.", +"The .xctestrun file did not specify any test targets.", +"One or more of the test targets defined in the .xctestrun file specifies \"UseDestinationArtifacts\", which is disallowed.", +"XC tests which run on physical devices must have \"IsAppHostedTestBundle\" == \"true\" in the xctestrun file.", +"An Info.plist file in the XCTest zip could not be parsed.", +"The APK is marked as \"testOnly\". Deprecated and not currently used.", +"The input IPA could not be parsed.", +"The application doesn't register the game loop URL scheme.", +"The iOS application bundle (.app) couldn't be processed.", +"APK contains no code. See also https://developer.android.com/guide/topics/manifest/application-element.html#code", +"Either the provided input APK path was malformed, the APK file does not exist, or the user does not have permission to access the APK file.", +"APK is built for a preview SDK which is unsupported", +"The matrix expanded to contain too many executions.", +"Not enough test quota to run the executions in this matrix.", +"A required cloud service api is not activated. See: https://firebase.google.com/docs/test-lab/android/continuous#requirements", +"There was an unknown permission issue running this test." +], +"type": "string" +}, +"outcomeSummary": { +"description": "Output Only. The overall outcome of the test. Only set when the test matrix state is FINISHED.", +"enum": [ +"OUTCOME_SUMMARY_UNSPECIFIED", +"SUCCESS", +"FAILURE", +"INCONCLUSIVE", +"SKIPPED" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The test matrix run was successful, for instance: - All the test cases passed. - Robo did not detect a crash of the application under test.", +"A run failed, for instance: - One or more test cases failed. - A test timed out. - The application under test crashed.", +"Something unexpected happened. The run should still be considered unsuccessful but this is likely a transient problem and re-running the test might be successful.", +"All tests were skipped, for instance: - All device configurations were incompatible." +], +"type": "string" +}, +"projectId": { +"description": "The cloud project that owns the test matrix.", +"type": "string" +}, +"resultStorage": { +"$ref": "ResultStorage", +"description": "Required. Where the results for the matrix are written." +}, +"state": { +"description": "Output only. Indicates the current progress of the test matrix.", +"enum": [ +"TEST_STATE_UNSPECIFIED", +"VALIDATING", +"PENDING", +"RUNNING", +"FINISHED", +"ERROR", +"UNSUPPORTED_ENVIRONMENT", +"INCOMPATIBLE_ENVIRONMENT", +"INCOMPATIBLE_ARCHITECTURE", +"CANCELLED", +"INVALID" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The execution or matrix is being validated.", +"The execution or matrix is waiting for resources to become available.", +"The execution is currently being processed. Can only be set on an execution.", +"The execution or matrix has terminated normally. On a matrix this means that the matrix level processing completed normally, but individual executions may be in an ERROR state.", +"The execution or matrix has stopped because it encountered an infrastructure failure.", +"The execution was not run because it corresponds to a unsupported environment. Can only be set on an execution.", +"The execution was not run because the provided inputs are incompatible with the requested environment. Example: requested AndroidVersion is lower than APK's minSdkVersion Can only be set on an execution.", +"The execution was not run because the provided inputs are incompatible with the requested architecture. Example: requested device does not support running the native code in the supplied APK Can only be set on an execution.", +"The user cancelled the execution. Can only be set on an execution.", +"The execution or matrix was not run because the provided inputs are not valid. Examples: input file is not of the expected type, is malformed/corrupt, or was flagged as malware" +], +"type": "string" +}, +"testExecutions": { +"description": "Output only. The list of test executions that the service creates for this matrix.", +"items": { +"$ref": "TestExecution" +}, +"type": "array" +}, +"testMatrixId": { +"description": "Output only. Unique id set by the service.", +"type": "string" +}, +"testSpecification": { +"$ref": "TestSpecification", +"description": "Required. How to run the test." +}, +"timestamp": { +"description": "Output only. The time this test matrix was initially created.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"TestSetup": { +"description": "A description of how to set up the Android device prior to running the test.", +"id": "TestSetup", +"properties": { +"account": { +"$ref": "Account", +"description": "The device will be logged in on this account for the duration of the test." +}, +"additionalApks": { +"description": "APKs to install in addition to those being directly tested. These will be installed after the app under test. Currently capped at 100.", +"items": { +"$ref": "Apk" +}, +"type": "array" +}, +"directoriesToPull": { +"description": "List of directories on the device to upload to GCS at the end of the test; they must be absolute paths under /sdcard, /storage or /data/local/tmp. Path names are restricted to characters a-z A-Z 0-9 _ - . + and / Note: The paths /sdcard and /data will be made available and treated as implicit path substitutions. E.g. if /sdcard on a particular device does not map to external storage, the system will replace it with the external storage path prefix for that device.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dontAutograntPermissions": { +"description": "Whether to prevent all runtime permissions to be granted at app install", +"type": "boolean" +}, +"environmentVariables": { +"description": "Environment variables to set for the test (only applicable for instrumentation tests).", +"items": { +"$ref": "EnvironmentVariable" +}, +"type": "array" +}, +"filesToPush": { +"description": "List of files to push to the device before starting the test.", +"items": { +"$ref": "DeviceFile" +}, +"type": "array" +}, +"initialSetupApks": { +"description": "Optional. Initial setup APKs to install before the app under test is installed. Currently capped at 100.", +"items": { +"$ref": "Apk" +}, +"type": "array" +}, +"networkProfile": { +"description": "The network traffic profile used for running the test. Available network profiles can be queried by using the NETWORK_CONFIGURATION environment type when calling TestEnvironmentDiscoveryService.GetTestEnvironmentCatalog.", +"type": "string" +}, +"systrace": { +"$ref": "SystraceSetup", +"deprecated": true, +"description": "Systrace configuration for the run. Deprecated: Systrace used Python 2 which was sunsetted on 2020-01-01. Systrace is no longer supported in the Cloud Testing API, and no Systrace file will be provided in the results." +} +}, +"type": "object" +}, +"TestSpecification": { +"description": "A description of how to run the test.", +"id": "TestSpecification", +"properties": { +"androidInstrumentationTest": { +"$ref": "AndroidInstrumentationTest", +"description": "An Android instrumentation test." +}, +"androidRoboTest": { +"$ref": "AndroidRoboTest", +"description": "An Android robo test." +}, +"androidTestLoop": { +"$ref": "AndroidTestLoop", +"description": "An Android Application with a Test Loop." +}, +"disablePerformanceMetrics": { +"description": "Disables performance metrics recording. May reduce test latency.", +"type": "boolean" +}, +"disableVideoRecording": { +"description": "Disables video recording. May reduce test latency.", +"type": "boolean" +}, +"iosRoboTest": { +"$ref": "IosRoboTest", +"description": "An iOS Robo test." +}, +"iosTestLoop": { +"$ref": "IosTestLoop", +"description": "An iOS application with a test loop." +}, +"iosTestSetup": { +"$ref": "IosTestSetup", +"description": "Test setup requirements for iOS." +}, +"iosXcTest": { +"$ref": "IosXcTest", +"description": "An iOS XCTest, via an .xctestrun file." +}, +"testSetup": { +"$ref": "TestSetup", +"description": "Test setup requirements for Android e.g. files to install, bootstrap scripts." +}, +"testTimeout": { +"description": "Max time a test execution is allowed to run before it is automatically cancelled. The default value is 5 min.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"TestTargetsForShard": { +"description": "Test targets for a shard.", +"id": "TestTargetsForShard", +"properties": { +"testTargets": { +"description": "Group of packages, classes, and/or test methods to be run for each shard. The targets need to be specified in AndroidJUnitRunner argument format. For example, \"package com.my.packages\" \"class com.my.package.MyClass\". The number of test_targets must be greater than 0.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ToolResultsExecution": { +"description": "Represents a tool results execution resource. This has the results of a TestMatrix.", +"id": "ToolResultsExecution", +"properties": { +"executionId": { +"description": "Output only. A tool results execution ID.", +"type": "string" +}, +"historyId": { +"description": "Output only. A tool results history ID.", +"type": "string" +}, +"projectId": { +"description": "Output only. The cloud project that owns the tool results execution.", +"type": "string" +} +}, +"type": "object" +}, +"ToolResultsHistory": { +"description": "Represents a tool results history resource.", +"id": "ToolResultsHistory", +"properties": { +"historyId": { +"description": "Required. A tool results history ID.", +"type": "string" +}, +"projectId": { +"description": "Required. The cloud project that owns the tool results history.", +"type": "string" +} +}, +"type": "object" +}, +"ToolResultsStep": { +"description": "Represents a tool results step resource. This has the results of a TestExecution.", +"id": "ToolResultsStep", +"properties": { +"executionId": { +"description": "Output only. A tool results execution ID.", +"type": "string" +}, +"historyId": { +"description": "Output only. A tool results history ID.", +"type": "string" +}, +"projectId": { +"description": "Output only. The cloud project that owns the tool results step.", +"type": "string" +}, +"stepId": { +"description": "Output only. A tool results step ID.", +"type": "string" +} +}, +"type": "object" +}, +"TrafficRule": { +"description": "Network emulation parameters.", +"id": "TrafficRule", +"properties": { +"bandwidth": { +"description": "Bandwidth in kbits/second.", +"format": "float", +"type": "number" +}, +"burst": { +"description": "Burst size in kbits.", +"format": "float", +"type": "number" +}, +"delay": { +"description": "Packet delay, must be >= 0.", +"format": "google-duration", +"type": "string" +}, +"packetDuplicationRatio": { +"description": "Packet duplication ratio (0.0 - 1.0).", +"format": "float", +"type": "number" +}, +"packetLossRatio": { +"description": "Packet loss ratio (0.0 - 1.0).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"UniformSharding": { +"description": "Uniformly shards test cases given a total number of shards. For instrumentation tests, it will be translated to \"-e numShard\" and \"-e shardIndex\" AndroidJUnitRunner arguments. With uniform sharding enabled, specifying either of these sharding arguments via `environment_variables` is invalid. Based on the sharding mechanism AndroidJUnitRunner uses, there is no guarantee that test cases will be distributed uniformly across all shards.", +"id": "UniformSharding", +"properties": { +"numShards": { +"description": "Required. The total number of shards to create. This must always be a positive number that is no greater than the total number of test cases. When you select one or more physical devices, the number of shards must be <= 50. When you select one or more ARM virtual devices, it must be <= 200. When you select only x86 virtual devices, it must be <= 500.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"UsesFeature": { +"description": "A tag within a manifest. https://developer.android.com/guide/topics/manifest/uses-feature-element.html", +"id": "UsesFeature", +"properties": { +"isRequired": { +"description": "The android:required value", +"type": "boolean" +}, +"name": { +"description": "The android:name value", +"type": "string" +} +}, +"type": "object" +}, +"XcodeVersion": { +"description": "An Xcode version that an iOS version is compatible with.", +"id": "XcodeVersion", +"properties": { +"tags": { +"description": "Tags for this Xcode version. Example: \"default\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The id for this version. Example: \"9.2\".", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Testing API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/texttospeech.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/texttospeech.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..c2a75884611c0617f0e32d0c58f68aeb76722e6c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/texttospeech.v1.json @@ -0,0 +1,704 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://texttospeech.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Texttospeech", +"description": "Synthesizes natural-sounding speech by applying powerful neural network models.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/text-to-speech/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "texttospeech:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://texttospeech.mtls.googleapis.com/", +"name": "texttospeech", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "texttospeech.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "texttospeech.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"projects": { +"resources": { +"locations": { +"methods": { +"synthesizeLongAudio": { +"description": "Synthesizes long form text asynchronously.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}:synthesizeLongAudio", +"httpMethod": "POST", +"id": "texttospeech.projects.locations.synthesizeLongAudio", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The resource states of the request in the form of `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}:synthesizeLongAudio", +"request": { +"$ref": "SynthesizeLongAudioRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "texttospeech.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "texttospeech.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"text": { +"methods": { +"synthesize": { +"description": "Synthesizes speech synchronously: receive results after all text input has been processed.", +"flatPath": "v1/text:synthesize", +"httpMethod": "POST", +"id": "texttospeech.text.synthesize", +"parameterOrder": [], +"parameters": {}, +"path": "v1/text:synthesize", +"request": { +"$ref": "SynthesizeSpeechRequest" +}, +"response": { +"$ref": "SynthesizeSpeechResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"voices": { +"methods": { +"list": { +"description": "Returns a list of Voice supported for synthesis.", +"flatPath": "v1/voices", +"httpMethod": "GET", +"id": "texttospeech.voices.list", +"parameterOrder": [], +"parameters": { +"languageCode": { +"description": "Optional. Recommended. [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If not specified, the API will return all supported voices. If specified, the ListVoices call will only return voices that can be used to synthesize this language_code. For example, if you specify `\"en-NZ\"`, all `\"en-NZ\"` voices will be returned. If you specify `\"no\"`, both `\"no-\\*\"` (Norwegian) and `\"nb-\\*\"` (Norwegian Bokmal) voices will be returned.", +"location": "query", +"type": "string" +} +}, +"path": "v1/voices", +"response": { +"$ref": "ListVoicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240327", +"rootUrl": "https://texttospeech.googleapis.com/", +"schemas": { +"AudioConfig": { +"description": "Description of audio data to be synthesized.", +"id": "AudioConfig", +"properties": { +"audioEncoding": { +"description": "Required. The format of the audio byte stream.", +"enum": [ +"AUDIO_ENCODING_UNSPECIFIED", +"LINEAR16", +"MP3", +"OGG_OPUS", +"MULAW", +"ALAW" +], +"enumDescriptions": [ +"Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", +"Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.", +"MP3 audio at 32kbps.", +"Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.", +"8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.", +"8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header." +], +"type": "string" +}, +"effectsProfileId": { +"description": "Optional. Input only. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. See [audio profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for current supported profile ids.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pitch": { +"description": "Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.", +"format": "double", +"type": "number" +}, +"sampleRateHertz": { +"description": "Optional. The synthesis sample rate (in hertz) for this audio. When this is specified in SynthesizeSpeechRequest, if this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality), unless the specified sample rate is not supported for the encoding chosen, in which case it will fail the request and return google.rpc.Code.INVALID_ARGUMENT.", +"format": "int32", +"type": "integer" +}, +"speakingRate": { +"description": "Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.", +"format": "double", +"type": "number" +}, +"volumeGainDb": { +"description": "Optional. Input only. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. Strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CustomVoiceParams": { +"description": "Description of the custom voice to be synthesized.", +"id": "CustomVoiceParams", +"properties": { +"model": { +"description": "Required. The name of the AutoML model that synthesizes the custom voice.", +"type": "string" +}, +"reportedUsage": { +"deprecated": true, +"description": "Optional. Deprecated. The usage of the synthesized audio to be reported.", +"enum": [ +"REPORTED_USAGE_UNSPECIFIED", +"REALTIME", +"OFFLINE" +], +"enumDescriptions": [ +"Request with reported usage unspecified will be rejected.", +"For scenarios where the synthesized audio is not downloadable and can only be used once. For example, real-time request in IVR system.", +"For scenarios where the synthesized audio is downloadable and can be reused. For example, the synthesized audio is downloaded, stored in customer service system and played repeatedly." +], +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata": { +"description": "Metadata for response returned by the `SynthesizeLongAudio` method.", +"id": "GoogleCloudTexttospeechV1SynthesizeLongAudioMetadata", +"properties": { +"lastUpdateTime": { +"deprecated": true, +"description": "Deprecated. Do not use.", +"format": "google-datetime", +"type": "string" +}, +"progressPercentage": { +"description": "The progress of the most recent processing update in percentage, ie. 70.0%.", +"format": "double", +"type": "number" +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVoicesResponse": { +"description": "The message returned to the client by the `ListVoices` method.", +"id": "ListVoicesResponse", +"properties": { +"voices": { +"description": "The list of voices.", +"items": { +"$ref": "Voice" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SynthesisInput": { +"description": "Contains text input to be synthesized. Either `text` or `ssml` must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. The input size is limited to 5000 bytes.", +"id": "SynthesisInput", +"properties": { +"ssml": { +"description": "The SSML document to be synthesized. The SSML document must be valid and well-formed. Otherwise the RPC will fail and return google.rpc.Code.INVALID_ARGUMENT. For more information, see [SSML](https://cloud.google.com/text-to-speech/docs/ssml).", +"type": "string" +}, +"text": { +"description": "The raw text to be synthesized.", +"type": "string" +} +}, +"type": "object" +}, +"SynthesizeLongAudioMetadata": { +"description": "Metadata for response returned by the `SynthesizeLongAudio` method.", +"id": "SynthesizeLongAudioMetadata", +"properties": { +"lastUpdateTime": { +"deprecated": true, +"description": "Deprecated. Do not use.", +"format": "google-datetime", +"type": "string" +}, +"progressPercentage": { +"description": "The progress of the most recent processing update in percentage, ie. 70.0%.", +"format": "double", +"type": "number" +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SynthesizeLongAudioRequest": { +"description": "The top-level message sent by the client for the `SynthesizeLongAudio` method.", +"id": "SynthesizeLongAudioRequest", +"properties": { +"audioConfig": { +"$ref": "AudioConfig", +"description": "Required. The configuration of the synthesized audio." +}, +"input": { +"$ref": "SynthesisInput", +"description": "Required. The Synthesizer requires either plain text or SSML as input. While Long Audio is in preview, SSML is temporarily unsupported." +}, +"outputGcsUri": { +"description": "Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.", +"type": "string" +}, +"voice": { +"$ref": "VoiceSelectionParams", +"description": "Required. The desired voice of the synthesized audio." +} +}, +"type": "object" +}, +"SynthesizeSpeechRequest": { +"description": "The top-level message sent by the client for the `SynthesizeSpeech` method.", +"id": "SynthesizeSpeechRequest", +"properties": { +"audioConfig": { +"$ref": "AudioConfig", +"description": "Required. The configuration of the synthesized audio." +}, +"input": { +"$ref": "SynthesisInput", +"description": "Required. The Synthesizer requires either plain text or SSML as input." +}, +"voice": { +"$ref": "VoiceSelectionParams", +"description": "Required. The desired voice of the synthesized audio." +} +}, +"type": "object" +}, +"SynthesizeSpeechResponse": { +"description": "The message returned to the client by the `SynthesizeSpeech` method.", +"id": "SynthesizeSpeechResponse", +"properties": { +"audioContent": { +"description": "The audio data bytes encoded as specified in the request, including the header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). For LINEAR16 audio, we include the WAV header. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"Voice": { +"description": "Description of a voice supported by the TTS service.", +"id": "Voice", +"properties": { +"languageCodes": { +"description": "The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. \"en-US\", \"es-419\", \"cmn-tw\").", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The name of this voice. Each distinct voice has a unique name.", +"type": "string" +}, +"naturalSampleRateHertz": { +"description": "The natural sample rate (in hertz) for this voice.", +"format": "int32", +"type": "integer" +}, +"ssmlGender": { +"description": "The gender of this voice.", +"enum": [ +"SSML_VOICE_GENDER_UNSPECIFIED", +"MALE", +"FEMALE", +"NEUTRAL" +], +"enumDescriptions": [ +"An unspecified gender. In VoiceSelectionParams, this means that the client doesn't care which gender the selected voice will have. In the Voice field of ListVoicesResponse, this may mean that the voice doesn't fit any of the other categories in this enum, or that the gender of the voice isn't known.", +"A male voice.", +"A female voice.", +"A gender-neutral voice. This voice is not yet supported." +], +"type": "string" +} +}, +"type": "object" +}, +"VoiceSelectionParams": { +"description": "Description of which voice to use for a synthesis request.", +"id": "VoiceSelectionParams", +"properties": { +"customVoice": { +"$ref": "CustomVoiceParams", +"description": "The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration." +}, +"languageCode": { +"description": "Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. \"en-US\". This should not include a script tag (e.g. use \"cmn-cn\" rather than \"cmn-Hant-cn\"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using \"nb\" (Norwegian Bokmal) instead of \"no\" (Norwegian)\".", +"type": "string" +}, +"name": { +"description": "The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender.", +"type": "string" +}, +"ssmlGender": { +"description": "The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.", +"enum": [ +"SSML_VOICE_GENDER_UNSPECIFIED", +"MALE", +"FEMALE", +"NEUTRAL" +], +"enumDescriptions": [ +"An unspecified gender. In VoiceSelectionParams, this means that the client doesn't care which gender the selected voice will have. In the Voice field of ListVoicesResponse, this may mean that the voice doesn't fit any of the other categories in this enum, or that the gender of the voice isn't known.", +"A male voice.", +"A female voice.", +"A gender-neutral voice. This voice is not yet supported." +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Text-to-Speech API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/texttospeech.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/texttospeech.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..2109a10441622656a0c6c3f73cf79ee14cf28dec --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/texttospeech.v1beta1.json @@ -0,0 +1,679 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://texttospeech.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Texttospeech", +"description": "Synthesizes natural-sounding speech by applying powerful neural network models.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/text-to-speech/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "texttospeech:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://texttospeech.mtls.googleapis.com/", +"name": "texttospeech", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"synthesizeLongAudio": { +"description": "Synthesizes long form text asynchronously.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}:synthesizeLongAudio", +"httpMethod": "POST", +"id": "texttospeech.projects.locations.synthesizeLongAudio", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "The resource states of the request in the form of `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}:synthesizeLongAudio", +"request": { +"$ref": "SynthesizeLongAudioRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "texttospeech.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "texttospeech.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"text": { +"methods": { +"synthesize": { +"description": "Synthesizes speech synchronously: receive results after all text input has been processed.", +"flatPath": "v1beta1/text:synthesize", +"httpMethod": "POST", +"id": "texttospeech.text.synthesize", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta1/text:synthesize", +"request": { +"$ref": "SynthesizeSpeechRequest" +}, +"response": { +"$ref": "SynthesizeSpeechResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"voices": { +"methods": { +"list": { +"description": "Returns a list of Voice supported for synthesis.", +"flatPath": "v1beta1/voices", +"httpMethod": "GET", +"id": "texttospeech.voices.list", +"parameterOrder": [], +"parameters": { +"languageCode": { +"description": "Optional. Recommended. [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If not specified, the API will return all supported voices. If specified, the ListVoices call will only return voices that can be used to synthesize this language_code. For example, if you specify `\"en-NZ\"`, all `\"en-NZ\"` voices will be returned. If you specify `\"no\"`, both `\"no-\\*\"` (Norwegian) and `\"nb-\\*\"` (Norwegian Bokmal) voices will be returned.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/voices", +"response": { +"$ref": "ListVoicesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240327", +"rootUrl": "https://texttospeech.googleapis.com/", +"schemas": { +"AudioConfig": { +"description": "Description of audio data to be synthesized.", +"id": "AudioConfig", +"properties": { +"audioEncoding": { +"description": "Required. The format of the audio byte stream.", +"enum": [ +"AUDIO_ENCODING_UNSPECIFIED", +"LINEAR16", +"MP3", +"MP3_64_KBPS", +"OGG_OPUS", +"MULAW", +"ALAW" +], +"enumDescriptions": [ +"Not specified. Will return result google.rpc.Code.INVALID_ARGUMENT.", +"Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.", +"MP3 audio at 32kbps.", +"MP3 at 64kbps.", +"Opus encoded audio wrapped in an ogg container. The result will be a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.", +"8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.", +"8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header." +], +"type": "string" +}, +"effectsProfileId": { +"description": "Optional. Input only. An identifier which selects 'audio effects' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given. See [audio profiles](https://cloud.google.com/text-to-speech/docs/audio-profiles) for current supported profile ids.", +"items": { +"type": "string" +}, +"type": "array" +}, +"pitch": { +"description": "Optional. Input only. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.", +"format": "double", +"type": "number" +}, +"sampleRateHertz": { +"description": "Optional. The synthesis sample rate (in hertz) for this audio. When this is specified in SynthesizeSpeechRequest, if this is different from the voice's natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality), unless the specified sample rate is not supported for the encoding chosen, in which case it will fail the request and return google.rpc.Code.INVALID_ARGUMENT.", +"format": "int32", +"type": "integer" +}, +"speakingRate": { +"description": "Optional. Input only. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values < 0.25 or > 4.0 will return an error.", +"format": "double", +"type": "number" +}, +"volumeGainDb": { +"description": "Optional. Input only. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. Strongly recommend not to exceed +10 (dB) as there's usually no effective increase in loudness for any value greater than that.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"CustomVoiceParams": { +"description": "Description of the custom voice to be synthesized.", +"id": "CustomVoiceParams", +"properties": { +"model": { +"description": "Required. The name of the AutoML model that synthesizes the custom voice.", +"type": "string" +}, +"reportedUsage": { +"deprecated": true, +"description": "Optional. Deprecated. The usage of the synthesized audio to be reported.", +"enum": [ +"REPORTED_USAGE_UNSPECIFIED", +"REALTIME", +"OFFLINE" +], +"enumDescriptions": [ +"Request with reported usage unspecified will be rejected.", +"For scenarios where the synthesized audio is not downloadable and can only be used once. For example, real-time request in IVR system.", +"For scenarios where the synthesized audio is downloadable and can be reused. For example, the synthesized audio is downloaded, stored in customer service system and played repeatedly." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata": { +"description": "Metadata for response returned by the `SynthesizeLongAudio` method.", +"id": "GoogleCloudTexttospeechV1beta1SynthesizeLongAudioMetadata", +"properties": { +"lastUpdateTime": { +"deprecated": true, +"description": "Deprecated. Do not use.", +"format": "google-datetime", +"type": "string" +}, +"progressPercentage": { +"description": "The progress of the most recent processing update in percentage, ie. 70.0%.", +"format": "double", +"type": "number" +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVoicesResponse": { +"description": "The message returned to the client by the `ListVoices` method.", +"id": "ListVoicesResponse", +"properties": { +"voices": { +"description": "The list of voices.", +"items": { +"$ref": "Voice" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SynthesisInput": { +"description": "Contains text input to be synthesized. Either `text` or `ssml` must be supplied. Supplying both or neither returns google.rpc.Code.INVALID_ARGUMENT. The input size is limited to 5000 bytes.", +"id": "SynthesisInput", +"properties": { +"ssml": { +"description": "The SSML document to be synthesized. The SSML document must be valid and well-formed. Otherwise the RPC will fail and return google.rpc.Code.INVALID_ARGUMENT. For more information, see [SSML](https://cloud.google.com/text-to-speech/docs/ssml).", +"type": "string" +}, +"text": { +"description": "The raw text to be synthesized.", +"type": "string" +} +}, +"type": "object" +}, +"SynthesizeLongAudioMetadata": { +"description": "Metadata for response returned by the `SynthesizeLongAudio` method.", +"id": "SynthesizeLongAudioMetadata", +"properties": { +"lastUpdateTime": { +"deprecated": true, +"description": "Deprecated. Do not use.", +"format": "google-datetime", +"type": "string" +}, +"progressPercentage": { +"description": "The progress of the most recent processing update in percentage, ie. 70.0%.", +"format": "double", +"type": "number" +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SynthesizeLongAudioRequest": { +"description": "The top-level message sent by the client for the `SynthesizeLongAudio` method.", +"id": "SynthesizeLongAudioRequest", +"properties": { +"audioConfig": { +"$ref": "AudioConfig", +"description": "Required. The configuration of the synthesized audio." +}, +"input": { +"$ref": "SynthesisInput", +"description": "Required. The Synthesizer requires either plain text or SSML as input. While Long Audio is in preview, SSML is temporarily unsupported." +}, +"outputGcsUri": { +"description": "Required. Specifies a Cloud Storage URI for the synthesis results. Must be specified in the format: `gs://bucket_name/object_name`, and the bucket must already exist.", +"type": "string" +}, +"voice": { +"$ref": "VoiceSelectionParams", +"description": "Required. The desired voice of the synthesized audio." +} +}, +"type": "object" +}, +"SynthesizeSpeechRequest": { +"description": "The top-level message sent by the client for the `SynthesizeSpeech` method.", +"id": "SynthesizeSpeechRequest", +"properties": { +"audioConfig": { +"$ref": "AudioConfig", +"description": "Required. The configuration of the synthesized audio." +}, +"enableTimePointing": { +"description": "Whether and what timepoints are returned in the response.", +"items": { +"enum": [ +"TIMEPOINT_TYPE_UNSPECIFIED", +"SSML_MARK" +], +"enumDescriptions": [ +"Not specified. No timepoint information will be returned.", +"Timepoint information of `` tags in SSML input will be returned." +], +"type": "string" +}, +"type": "array" +}, +"input": { +"$ref": "SynthesisInput", +"description": "Required. The Synthesizer requires either plain text or SSML as input." +}, +"voice": { +"$ref": "VoiceSelectionParams", +"description": "Required. The desired voice of the synthesized audio." +} +}, +"type": "object" +}, +"SynthesizeSpeechResponse": { +"description": "The message returned to the client by the `SynthesizeSpeech` method.", +"id": "SynthesizeSpeechResponse", +"properties": { +"audioConfig": { +"$ref": "AudioConfig", +"description": "The audio metadata of `audio_content`." +}, +"audioContent": { +"description": "The audio data bytes encoded as specified in the request, including the header for encodings that are wrapped in containers (e.g. MP3, OGG_OPUS). For LINEAR16 audio, we include the WAV header. Note: as with all bytes fields, protobuffers use a pure binary representation, whereas JSON representations use base64.", +"format": "byte", +"type": "string" +}, +"timepoints": { +"description": "A link between a position in the original request input and a corresponding time in the output audio. It's only supported via `` of SSML input.", +"items": { +"$ref": "Timepoint" +}, +"type": "array" +} +}, +"type": "object" +}, +"Timepoint": { +"description": "This contains a mapping between a certain point in the input text and a corresponding time in the output audio.", +"id": "Timepoint", +"properties": { +"markName": { +"description": "Timepoint name as received from the client within `` tag.", +"type": "string" +}, +"timeSeconds": { +"description": "Time offset in seconds from the start of the synthesized audio.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Voice": { +"description": "Description of a voice supported by the TTS service.", +"id": "Voice", +"properties": { +"languageCodes": { +"description": "The languages that this voice supports, expressed as [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g. \"en-US\", \"es-419\", \"cmn-tw\").", +"items": { +"type": "string" +}, +"type": "array" +}, +"name": { +"description": "The name of this voice. Each distinct voice has a unique name.", +"type": "string" +}, +"naturalSampleRateHertz": { +"description": "The natural sample rate (in hertz) for this voice.", +"format": "int32", +"type": "integer" +}, +"ssmlGender": { +"description": "The gender of this voice.", +"enum": [ +"SSML_VOICE_GENDER_UNSPECIFIED", +"MALE", +"FEMALE", +"NEUTRAL" +], +"enumDescriptions": [ +"An unspecified gender. In VoiceSelectionParams, this means that the client doesn't care which gender the selected voice will have. In the Voice field of ListVoicesResponse, this may mean that the voice doesn't fit any of the other categories in this enum, or that the gender of the voice isn't known.", +"A male voice.", +"A female voice.", +"A gender-neutral voice. This voice is not yet supported." +], +"type": "string" +} +}, +"type": "object" +}, +"VoiceSelectionParams": { +"description": "Description of which voice to use for a synthesis request.", +"id": "VoiceSelectionParams", +"properties": { +"customVoice": { +"$ref": "CustomVoiceParams", +"description": "The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration." +}, +"languageCode": { +"description": "Required. The language (and potentially also the region) of the voice expressed as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g. \"en-US\". This should not include a script tag (e.g. use \"cmn-cn\" rather than \"cmn-Hant-cn\"), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn't a Canadian voice available), or even a different language, e.g. using \"nb\" (Norwegian Bokmal) instead of \"no\" (Norwegian)\".", +"type": "string" +}, +"name": { +"description": "The name of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and gender.", +"type": "string" +}, +"ssmlGender": { +"description": "The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.", +"enum": [ +"SSML_VOICE_GENDER_UNSPECIFIED", +"MALE", +"FEMALE", +"NEUTRAL" +], +"enumDescriptions": [ +"An unspecified gender. In VoiceSelectionParams, this means that the client doesn't care which gender the selected voice will have. In the Voice field of ListVoicesResponse, this may mean that the voice doesn't fit any of the other categories in this enum, or that the gender of the voice isn't known.", +"A male voice.", +"A female voice.", +"A gender-neutral voice. This voice is not yet supported." +], +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Text-to-Speech API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/toolresults.v1beta3.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/toolresults.v1beta3.json new file mode 100644 index 0000000000000000000000000000000000000000..616881f6d6662100cc901a5eb93fd2ccf065ecca --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/toolresults.v1beta3.json @@ -0,0 +1,3933 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://toolresults.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Tool Results", +"description": "API to publish and access results from developer tools.", +"discoveryVersion": "v1", +"documentationLink": "https://firebase.google.com/docs/test-lab/", +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "toolresults:v1beta3", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://toolresults.mtls.googleapis.com/", +"name": "toolresults", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"methods": { +"getSettings": { +"description": "Gets the Tool Results settings for a project. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from project", +"flatPath": "toolresults/v1beta3/projects/{projectId}/settings", +"httpMethod": "GET", +"id": "toolresults.projects.getSettings", +"parameterOrder": [ +"projectId" +], +"parameters": { +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/settings", +"response": { +"$ref": "ProjectSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"initializeSettings": { +"description": "Creates resources for settings which have not yet been set. Currently, this creates a single resource: a Google Cloud Storage bucket, to be used as the default bucket for this project. The bucket is created in an FTL-own storage project. Except for in rare cases, calling this method in parallel from multiple clients will only create a single bucket. In order to avoid unnecessary storage charges, the bucket is configured to automatically delete objects older than 90 days. The bucket is created with the following permissions: - Owner access for owners of central storage project (FTL-owned) - Writer access for owners/editors of customer project - Reader access for viewers of customer project The default ACL on objects created in the bucket is: - Owner access for owners of central storage project - Reader access for owners/editors/viewers of customer project See Google Cloud Storage documentation for more details. If there is already a default bucket set and the project can access the bucket, this call does nothing. However, if the project doesn't have the permission to access the bucket or the bucket is deleted, a new bucket will be created. May return any canonical error codes, including the following: - PERMISSION_DENIED - if the user is not authorized to write to project - Any error code raised by Google Cloud Storage", +"flatPath": "toolresults/v1beta3/projects/{projectId}:initializeSettings", +"httpMethod": "POST", +"id": "toolresults.projects.initializeSettings", +"parameterOrder": [ +"projectId" +], +"parameters": { +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}:initializeSettings", +"response": { +"$ref": "ProjectSettings" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"histories": { +"methods": { +"create": { +"description": "Creates a History. The returned History will have the id set. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing project does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories", +"httpMethod": "POST", +"id": "toolresults.projects.histories.create", +"parameterOrder": [ +"projectId" +], +"parameters": { +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A unique request ID for server to detect duplicated requests. For example, a UUID. Optional, but strongly recommended.", +"location": "query", +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories", +"request": { +"$ref": "History" +}, +"response": { +"$ref": "History" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a History. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}", +"httpMethod": "GET", +"id": "toolresults.projects.histories.get", +"parameterOrder": [ +"projectId", +"historyId" +], +"parameters": { +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}", +"response": { +"$ref": "History" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Histories for a given Project. The histories are sorted by modification time in descending order. The history_id key will be used to order the history with the same modification time. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the History does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories", +"httpMethod": "GET", +"id": "toolresults.projects.histories.list", +"parameterOrder": [ +"projectId" +], +"parameters": { +"filterByName": { +"description": "If set, only return histories with the given name. Optional.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of Histories to fetch. Default value: 20. The server will use this default if the field is not set or has a value of 0. Any value greater than 100 will be treated as 100. Optional.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A continuation token to resume the query at the next item. Optional.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories", +"response": { +"$ref": "ListHistoriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"executions": { +"methods": { +"create": { +"description": "Creates an Execution. The returned Execution will have the id set. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions", +"httpMethod": "POST", +"id": "toolresults.projects.histories.executions.create", +"parameterOrder": [ +"projectId", +"historyId" +], +"parameters": { +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A unique request ID for server to detect duplicated requests. For example, a UUID. Optional, but strongly recommended.", +"location": "query", +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions", +"request": { +"$ref": "Execution" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets an Execution. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Execution does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.get", +"parameterOrder": [ +"projectId", +"historyId", +"executionId" +], +"parameters": { +"executionId": { +"description": "An Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}", +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Executions for a given History. The executions are sorted by creation_time in descending order. The execution_id key will be used to order the executions with the same creation_time. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing History does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.list", +"parameterOrder": [ +"projectId", +"historyId" +], +"parameters": { +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of Executions to fetch. Default value: 25. The server will use this default if the field is not set or has a value of 0. Optional.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A continuation token to resume the query at the next item. Optional.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions", +"response": { +"$ref": "ListExecutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing Execution with the supplied partial entity. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal - NOT_FOUND - if the containing History does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}", +"httpMethod": "PATCH", +"id": "toolresults.projects.histories.executions.patch", +"parameterOrder": [ +"projectId", +"historyId", +"executionId" +], +"parameters": { +"executionId": { +"description": "Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A unique request ID for server to detect duplicated requests. For example, a UUID. Optional, but strongly recommended.", +"location": "query", +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}", +"request": { +"$ref": "Execution" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"clusters": { +"methods": { +"get": { +"description": "Retrieves a single screenshot cluster by its ID", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.clusters.get", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"clusterId" +], +"parameters": { +"clusterId": { +"description": "A Cluster id Required.", +"location": "path", +"required": true, +"type": "string" +}, +"executionId": { +"description": "An Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/clusters/{clusterId}", +"response": { +"$ref": "ScreenshotCluster" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Screenshot Clusters Returns the list of screenshot clusters corresponding to an execution. Screenshot clusters are created after the execution is finished. Clusters are created from a set of screenshots. Between any two screenshots, a matching score is calculated based off their metadata that determines how similar they are. Screenshots are placed in the cluster that has screens which have the highest matching scores.", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/clusters", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.clusters.list", +"parameterOrder": [ +"projectId", +"historyId", +"executionId" +], +"parameters": { +"executionId": { +"description": "An Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/clusters", +"response": { +"$ref": "ListScreenshotClustersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"environments": { +"methods": { +"get": { +"description": "Gets an Environment. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Environment does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/environments/{environmentId}", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.environments.get", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"environmentId" +], +"parameters": { +"environmentId": { +"description": "Required. An Environment id.", +"location": "path", +"required": true, +"type": "string" +}, +"executionId": { +"description": "Required. An Execution id.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "Required. A History id.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "Required. A Project id.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/environments/{environmentId}", +"response": { +"$ref": "Environment" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Environments for a given Execution. The Environments are sorted by display name. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing Execution does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/environments", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.environments.list", +"parameterOrder": [ +"projectId", +"historyId", +"executionId" +], +"parameters": { +"executionId": { +"description": "Required. An Execution id.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "Required. A History id.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of Environments to fetch. Default value: 25. The server will use this default if the field is not set or has a value of 0.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A continuation token to resume the query at the next item.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "Required. A Project id.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/environments", +"response": { +"$ref": "ListEnvironmentsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"steps": { +"methods": { +"accessibilityClusters": { +"description": "Lists accessibility clusters for a given Step May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if the locale format is incorrect - NOT_FOUND - if the containing Step does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectsId}/histories/{historiesId}/executions/{executionsId}/steps/{stepsId}:accessibilityClusters", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.accessibilityClusters", +"parameterOrder": [ +"name" +], +"parameters": { +"locale": { +"description": "The accepted format is the canonical Unicode format with hyphen as a delimiter. Language must be lowercase, Language Script - Capitalized, Region - UPPERCASE. See http://www.unicode.org/reports/tr35/#Unicode_locale_identifier for details. Required.", +"location": "query", +"type": "string" +}, +"name": { +"description": "A full resource name of the step. For example, projects/my-project/histories/bh.1234567890abcdef/executions/ 1234567890123456789/steps/bs.1234567890abcdef Required.", +"location": "path", +"pattern": "^projects/[^/]+/histories/[^/]+/executions/[^/]+/steps/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/{+name}:accessibilityClusters", +"response": { +"$ref": "ListStepAccessibilityClustersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a Step. The returned Step will have the id set. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps", +"httpMethod": "POST", +"id": "toolresults.projects.histories.executions.steps.create", +"parameterOrder": [ +"projectId", +"historyId", +"executionId" +], +"parameters": { +"executionId": { +"description": "Required. An Execution id.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "Required. A History id.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "Required. A Project id.", +"location": "path", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A unique request ID for server to detect duplicated requests. For example, a UUID. Optional, but strongly recommended.", +"location": "query", +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps", +"request": { +"$ref": "Step" +}, +"response": { +"$ref": "Step" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Step. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the Step does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.get", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A Step id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", +"response": { +"$ref": "Step" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getPerfMetricsSummary": { +"description": "Retrieves a PerfMetricsSummary. May return any of the following error code(s): - NOT_FOUND - The specified PerfMetricsSummary does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.getPerfMetricsSummary", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A tool results execution ID.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A tool results history ID.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The cloud project", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A tool results step ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", +"response": { +"$ref": "PerfMetricsSummary" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Steps for a given Execution. The steps are sorted by creation_time in descending order. The step_id key will be used to order the steps with the same creation_time. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if an argument in the request happens to be invalid; e.g. if an attempt is made to list the children of a nonexistent Step - NOT_FOUND - if the containing Execution does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.list", +"parameterOrder": [ +"projectId", +"historyId", +"executionId" +], +"parameters": { +"executionId": { +"description": "A Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of Steps to fetch. Default value: 25. The server will use this default if the field is not set or has a value of 0. Optional.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A continuation token to resume the query at the next item. Optional.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps", +"response": { +"$ref": "ListStepsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing Step with the supplied partial entity. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal (e.g try to upload a duplicate xml file), if the updated step is too large (more than 10Mib) - NOT_FOUND - if the containing Execution does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", +"httpMethod": "PATCH", +"id": "toolresults.projects.histories.executions.steps.patch", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A unique request ID for server to detect duplicated requests. For example, a UUID. Optional, but strongly recommended.", +"location": "query", +"type": "string" +}, +"stepId": { +"description": "A Step id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}", +"request": { +"$ref": "Step" +}, +"response": { +"$ref": "Step" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"publishXunitXmlFiles": { +"description": "Publish xml files to an existing Step. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write project - INVALID_ARGUMENT - if the request is malformed - FAILED_PRECONDITION - if the requested state transition is illegal, e.g. try to upload a duplicate xml file or a file too large. - NOT_FOUND - if the containing Execution does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles", +"httpMethod": "POST", +"id": "toolresults.projects.histories.executions.steps.publishXunitXmlFiles", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A Step id. Note: This step must include a TestExecutionStep. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}:publishXunitXmlFiles", +"request": { +"$ref": "PublishXunitXmlFilesRequest" +}, +"response": { +"$ref": "Step" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"perfMetricsSummary": { +"methods": { +"create": { +"description": "Creates a PerfMetricsSummary resource. Returns the existing one if it has already been created. May return any of the following error code(s): - NOT_FOUND - The containing Step does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", +"httpMethod": "POST", +"id": "toolresults.projects.histories.executions.steps.perfMetricsSummary.create", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A tool results execution ID.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A tool results history ID.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The cloud project", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A tool results step ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfMetricsSummary", +"request": { +"$ref": "PerfMetricsSummary" +}, +"response": { +"$ref": "PerfMetricsSummary" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"perfSampleSeries": { +"methods": { +"create": { +"description": "Creates a PerfSampleSeries. May return any of the following error code(s): - ALREADY_EXISTS - PerfMetricSummary already exists for the given Step - NOT_FOUND - The containing Step does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", +"httpMethod": "POST", +"id": "toolresults.projects.histories.executions.steps.perfSampleSeries.create", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A tool results execution ID.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A tool results history ID.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The cloud project", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A tool results step ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", +"request": { +"$ref": "PerfSampleSeries" +}, +"response": { +"$ref": "PerfSampleSeries" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a PerfSampleSeries. May return any of the following error code(s): - NOT_FOUND - The specified PerfSampleSeries does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.perfSampleSeries.get", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId", +"sampleSeriesId" +], +"parameters": { +"executionId": { +"description": "A tool results execution ID.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A tool results history ID.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The cloud project", +"location": "path", +"required": true, +"type": "string" +}, +"sampleSeriesId": { +"description": "A sample series id", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A tool results step ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}", +"response": { +"$ref": "PerfSampleSeries" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists PerfSampleSeries for a given Step. The request provides an optional filter which specifies one or more PerfMetricsType to include in the result; if none returns all. The resulting PerfSampleSeries are sorted by ids. May return any of the following canonical error codes: - NOT_FOUND - The containing Step does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.perfSampleSeries.list", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A tool results execution ID.", +"location": "path", +"required": true, +"type": "string" +}, +"filter": { +"description": "Specify one or more PerfMetricType values such as CPU to filter the result", +"enum": [ +"perfMetricTypeUnspecified", +"memory", +"cpu", +"network", +"graphics" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"location": "query", +"repeated": true, +"type": "string" +}, +"historyId": { +"description": "A tool results history ID.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The cloud project", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A tool results step ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries", +"response": { +"$ref": "ListPerfSampleSeriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"samples": { +"methods": { +"batchCreate": { +"description": "Creates a batch of PerfSamples - a client can submit multiple batches of Perf Samples through repeated calls to this method in order to split up a large request payload - duplicates and existing timestamp entries will be ignored. - the batch operation may partially succeed - the set of elements successfully inserted is returned in the response (omits items which already existed in the database). May return any of the following canonical error codes: - NOT_FOUND - The containing PerfSampleSeries does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate", +"httpMethod": "POST", +"id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.batchCreate", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId", +"sampleSeriesId" +], +"parameters": { +"executionId": { +"description": "A tool results execution ID.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A tool results history ID.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "The cloud project", +"location": "path", +"required": true, +"type": "string" +}, +"sampleSeriesId": { +"description": "A sample series id", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A tool results step ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples:batchCreate", +"request": { +"$ref": "BatchCreatePerfSamplesRequest" +}, +"response": { +"$ref": "BatchCreatePerfSamplesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the Performance Samples of a given Sample Series - The list results are sorted by timestamps ascending - The default page size is 500 samples; and maximum size allowed 5000 - The response token indicates the last returned PerfSample timestamp - When the results size exceeds the page size, submit a subsequent request including the page token to return the rest of the samples up to the page limit May return any of the following canonical error codes: - OUT_OF_RANGE - The specified request page_token is out of valid range - NOT_FOUND - The containing PerfSampleSeries does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.perfSampleSeries.samples.list", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId", +"sampleSeriesId" +], +"parameters": { +"executionId": { +"description": "A tool results execution ID.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A tool results history ID.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The default page size is 500 samples, and the maximum size is 5000. If the page_size is greater than 5000, the effective page size will be 5000", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional, the next_page_token returned in the previous response", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "The cloud project", +"location": "path", +"required": true, +"type": "string" +}, +"sampleSeriesId": { +"description": "A sample series id", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A tool results step ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/perfSampleSeries/{sampleSeriesId}/samples", +"response": { +"$ref": "ListPerfSamplesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"testCases": { +"methods": { +"get": { +"description": "Gets details of a Test Case for a Step. Experimental test cases API. Still in active development. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing Test Case does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/testCases/{testCaseId}", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.testCases.get", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId", +"testCaseId" +], +"parameters": { +"executionId": { +"description": "A Execution id Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A Step id. Note: This step must include a TestExecutionStep. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"testCaseId": { +"description": "A Test Case id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/testCases/{testCaseId}", +"response": { +"$ref": "TestCase" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Test Cases attached to a Step. Experimental test cases API. Still in active development. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to write to project - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the containing Step does not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/testCases", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.testCases.list", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "A Execution id Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of TestCases to fetch. Default value: 100. The server will use this default if the field is not set or has a value of 0. Optional.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A continuation token to resume the query at the next item. Optional.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A Step id. Note: This step must include a TestExecutionStep. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/testCases", +"response": { +"$ref": "ListTestCasesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"thumbnails": { +"methods": { +"list": { +"description": "Lists thumbnails of images attached to a step. May return any of the following canonical error codes: - PERMISSION_DENIED - if the user is not authorized to read from the project, or from any of the images - INVALID_ARGUMENT - if the request is malformed - NOT_FOUND - if the step does not exist, or if any of the images do not exist", +"flatPath": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails", +"httpMethod": "GET", +"id": "toolresults.projects.histories.executions.steps.thumbnails.list", +"parameterOrder": [ +"projectId", +"historyId", +"executionId", +"stepId" +], +"parameters": { +"executionId": { +"description": "An Execution id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"historyId": { +"description": "A History id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of thumbnails to fetch. Default value: 50. The server will use this default if the field is not set or has a value of 0. Optional.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A continuation token to resume the query at the next item. Optional.", +"location": "query", +"type": "string" +}, +"projectId": { +"description": "A Project id. Required.", +"location": "path", +"required": true, +"type": "string" +}, +"stepId": { +"description": "A Step id. Required.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "toolresults/v1beta3/projects/{projectId}/histories/{historyId}/executions/{executionId}/steps/{stepId}/thumbnails", +"response": { +"$ref": "ListStepThumbnailsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +} +} +}, +"revision": "20240422", +"rootUrl": "https://toolresults.googleapis.com/", +"schemas": { +"ANR": { +"description": "Additional details for an ANR crash.", +"id": "ANR", +"properties": { +"stackTrace": { +"$ref": "StackTrace", +"description": "The stack trace of the ANR crash. Optional." +} +}, +"type": "object" +}, +"AndroidAppInfo": { +"description": "Android app information.", +"id": "AndroidAppInfo", +"properties": { +"name": { +"description": "The name of the app. Optional", +"type": "string" +}, +"packageName": { +"description": "The package name of the app. Required.", +"type": "string" +}, +"versionCode": { +"description": "The internal version code of the app. Optional.", +"type": "string" +}, +"versionName": { +"description": "The version name of the app. Optional.", +"type": "string" +} +}, +"type": "object" +}, +"AndroidInstrumentationTest": { +"description": "A test of an Android application that can control an Android component independently of its normal lifecycle. See for more information on types of Android tests.", +"id": "AndroidInstrumentationTest", +"properties": { +"testPackageId": { +"description": "The java package for the test to be executed. Required", +"type": "string" +}, +"testRunnerClass": { +"description": "The InstrumentationTestRunner class. Required", +"type": "string" +}, +"testTargets": { +"description": "Each target must be fully qualified with the package name or class name, in one of these formats: - \"package package_name\" - \"class package_name.class_name\" - \"class package_name.class_name#method_name\" If empty, all targets in the module will be run.", +"items": { +"type": "string" +}, +"type": "array" +}, +"useOrchestrator": { +"description": "The flag indicates whether Android Test Orchestrator will be used to run test or not.", +"type": "boolean" +} +}, +"type": "object" +}, +"AndroidRoboTest": { +"description": "A test of an android application that explores the application on a virtual or physical Android device, finding culprits and crashes as it goes.", +"id": "AndroidRoboTest", +"properties": { +"appInitialActivity": { +"description": "The initial activity that should be used to start the app. Optional", +"type": "string" +}, +"bootstrapPackageId": { +"description": "The java package for the bootstrap. Optional", +"type": "string" +}, +"bootstrapRunnerClass": { +"description": "The runner class for the bootstrap. Optional", +"type": "string" +}, +"maxDepth": { +"description": "The max depth of the traversal stack Robo can explore. Optional", +"format": "int32", +"type": "integer" +}, +"maxSteps": { +"description": "The max number of steps/actions Robo can execute. Default is no limit (0). Optional", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AndroidTest": { +"description": "An Android mobile test specification.", +"id": "AndroidTest", +"properties": { +"androidAppInfo": { +"$ref": "AndroidAppInfo", +"description": "Information about the application under test." +}, +"androidInstrumentationTest": { +"$ref": "AndroidInstrumentationTest", +"description": "An Android instrumentation test." +}, +"androidRoboTest": { +"$ref": "AndroidRoboTest", +"description": "An Android robo test." +}, +"androidTestLoop": { +"$ref": "AndroidTestLoop", +"description": "An Android test loop." +}, +"testTimeout": { +"$ref": "Duration", +"description": "Max time a test is allowed to run before it is automatically cancelled." +} +}, +"type": "object" +}, +"AndroidTestLoop": { +"description": "Test Loops are tests that can be launched by the app itself, determining when to run by listening for an intent.", +"id": "AndroidTestLoop", +"properties": {}, +"type": "object" +}, +"Any": { +"description": " `Any` contains an arbitrary serialized protocol buffer message along with a URL that describes the type of the serialized message. Protobuf library provides support to pack/unpack Any values in the form of utility functions or additional generated methods of the Any type. Example 1: Pack and unpack a message in C++. Foo foo = ...; Any any; any.PackFrom(foo); ... if (any.UnpackTo(&foo)) { ... } Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); ... if (any.is(Foo.class)) { foo = any.unpack(Foo.class); } Example 3: Pack and unpack a message in Python. foo = Foo(...) any = Any() any.Pack(foo) ... if any.Is(Foo.DESCRIPTOR): any.Unpack(foo) ... Example 4: Pack and unpack a message in Go foo := &pb.Foo{...} any, err := ptypes.MarshalAny(foo) ... foo := &pb.Foo{} if err := ptypes.UnmarshalAny(any, foo); err != nil { ... } The pack methods provided by protobuf library will by default use 'type.googleapis.com/full.type.name' as the type URL and the unpack methods only use the fully qualified type name after the last '/' in the type URL, for example \"foo.bar.com/x/y.z\" will yield type name \"y.z\". # JSON The JSON representation of an `Any` value uses the regular representation of the deserialized, embedded message, with an additional field `@type` which contains the type URL. Example: package google.profile; message Person { string first_name = 1; string last_name = 2; } { \"@type\": \"type.googleapis.com/google.profile.Person\", \"firstName\": , \"lastName\": } If the embedded message type is well-known and has a custom JSON representation, that representation will be embedded adding a field `value` which holds the custom JSON in addition to the `@type` field. Example (for message google.protobuf.Duration): { \"@type\": \"type.googleapis.com/google.protobuf.Duration\", \"value\": \"1.212s\" }", +"id": "Any", +"properties": { +"typeUrl": { +"description": "A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one \"/\" character. The last segment of the URL's path must represent the fully qualified name of the type (as in `path/google.protobuf.Duration`). The name should be in a canonical form (e.g., leading \".\" is not accepted). In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme `http`, `https`, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows: * If no scheme is provided, `https` is assumed. * An HTTP GET on the URL must yield a google.protobuf.Type value in binary format, or produce an error. * Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.) Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. Schemes other than `http`, `https` (or the empty scheme) might be used with implementation specific semantics.", +"type": "string" +}, +"value": { +"description": "Must be a valid serialized protocol buffer of the above specified type.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"AppStartTime": { +"id": "AppStartTime", +"properties": { +"fullyDrawnTime": { +"$ref": "Duration", +"description": "Optional. The time from app start to reaching the developer-reported \"fully drawn\" time. This is only stored if the app includes a call to Activity.reportFullyDrawn(). See https://developer.android.com/topic/performance/launch-time.html#time-full" +}, +"initialDisplayTime": { +"$ref": "Duration", +"description": "The time from app start to the first displayed activity being drawn, as reported in Logcat. See https://developer.android.com/topic/performance/launch-time.html#time-initial" +} +}, +"type": "object" +}, +"AssetIssue": { +"description": "There was an issue with the assets in this test.", +"id": "AssetIssue", +"properties": {}, +"type": "object" +}, +"AvailableDeepLinks": { +"description": "A suggestion to use deep links for a Robo run.", +"id": "AvailableDeepLinks", +"properties": {}, +"type": "object" +}, +"BasicPerfSampleSeries": { +"description": "Encapsulates the metadata for basic sample series represented by a line chart", +"id": "BasicPerfSampleSeries", +"properties": { +"perfMetricType": { +"enum": [ +"perfMetricTypeUnspecified", +"memory", +"cpu", +"network", +"graphics" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +}, +"perfUnit": { +"enum": [ +"perfUnitUnspecified", +"kibibyte", +"percent", +"bytesPerSecond", +"framesPerSecond", +"byte" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"sampleSeriesLabel": { +"enum": [ +"sampleSeriesTypeUnspecified", +"memoryRssPrivate", +"memoryRssShared", +"memoryRssTotal", +"memoryTotal", +"cpuUser", +"cpuKernel", +"cpuTotal", +"ntBytesTransferred", +"ntBytesReceived", +"networkSent", +"networkReceived", +"graphicsFrameRate" +], +"enumDescriptions": [ +"", +"Memory sample series", +"", +"", +"", +"CPU sample series", +"", +"", +"Network sample series", +"", +"", +"", +"Graphics sample series" +], +"type": "string" +} +}, +"type": "object" +}, +"BatchCreatePerfSamplesRequest": { +"description": "The request must provide up to a maximum of 5000 samples to be created; a larger sample size will cause an INVALID_ARGUMENT error", +"id": "BatchCreatePerfSamplesRequest", +"properties": { +"perfSamples": { +"description": "The set of PerfSamples to create should not include existing timestamps", +"items": { +"$ref": "PerfSample" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchCreatePerfSamplesResponse": { +"id": "BatchCreatePerfSamplesResponse", +"properties": { +"perfSamples": { +"items": { +"$ref": "PerfSample" +}, +"type": "array" +} +}, +"type": "object" +}, +"BlankScreen": { +"description": "A warning that Robo encountered a screen that was mostly blank; this may indicate a problem with the app.", +"id": "BlankScreen", +"properties": { +"screenId": { +"description": "The screen id of the element", +"type": "string" +} +}, +"type": "object" +}, +"CPUInfo": { +"id": "CPUInfo", +"properties": { +"cpuProcessor": { +"description": "description of the device processor ie '1.8 GHz hexa core 64-bit ARMv8-A'", +"type": "string" +}, +"cpuSpeedInGhz": { +"description": "the CPU clock speed in GHz", +"format": "float", +"type": "number" +}, +"numberOfCores": { +"description": "the number of CPU cores", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"CrashDialogError": { +"description": "Crash dialog was detected during the test execution", +"id": "CrashDialogError", +"properties": { +"crashPackage": { +"description": "The name of the package that caused the dialog.", +"type": "string" +} +}, +"type": "object" +}, +"DetectedAppSplashScreen": { +"description": "A notification that Robo detected a splash screen provided by app (vs. Android OS splash screen).", +"id": "DetectedAppSplashScreen", +"properties": {}, +"type": "object" +}, +"DeviceOutOfMemory": { +"description": "A warning that device ran out of memory", +"id": "DeviceOutOfMemory", +"properties": {}, +"type": "object" +}, +"Duration": { +"description": " A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.", +"id": "Duration", +"properties": { +"nanos": { +"description": "Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 `seconds` field and a positive or negative `nanos` field. For durations of one second or more, a non-zero value for the `nanos` field must be of the same sign as the `seconds` field. Must be from -999,999,999 to +999,999,999 inclusive.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"EncounteredLoginScreen": { +"description": "Additional details about encountered login screens.", +"id": "EncounteredLoginScreen", +"properties": { +"distinctScreens": { +"description": "Number of encountered distinct login screens.", +"format": "int32", +"type": "integer" +}, +"screenIds": { +"description": "Subset of login screens.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"EncounteredNonAndroidUiWidgetScreen": { +"description": "Additional details about encountered screens with elements that are not Android UI widgets.", +"id": "EncounteredNonAndroidUiWidgetScreen", +"properties": { +"distinctScreens": { +"description": "Number of encountered distinct screens with non Android UI widgets.", +"format": "int32", +"type": "integer" +}, +"screenIds": { +"description": "Subset of screens which contain non Android UI widgets.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Environment": { +"description": "An Environment represents the set of test runs (Steps) from the parent Execution that are configured with the same set of dimensions (Model, Version, Locale, and Orientation). Multiple such runs occur particularly because of features like sharding (splitting up a test suite to run in parallel across devices) and reruns (running a test multiple times to check for different outcomes).", +"id": "Environment", +"properties": { +"completionTime": { +"$ref": "Timestamp", +"description": "Output only. The time when the Environment status was set to complete. This value will be set automatically when state transitions to COMPLETE." +}, +"creationTime": { +"$ref": "Timestamp", +"description": "Output only. The time when the Environment was created." +}, +"dimensionValue": { +"description": "Dimension values describing the environment. Dimension values always consist of \"Model\", \"Version\", \"Locale\", and \"Orientation\". - In response: always set - In create request: always set - In update request: never set", +"items": { +"$ref": "EnvironmentDimensionValueEntry" +}, +"type": "array" +}, +"displayName": { +"description": "A short human-readable name to display in the UI. Maximum of 100 characters. For example: Nexus 5, API 27.", +"type": "string" +}, +"environmentId": { +"description": "Output only. An Environment id.", +"type": "string" +}, +"environmentResult": { +"$ref": "MergedResult", +"description": "Merged result of the environment." +}, +"executionId": { +"description": "Output only. An Execution id.", +"type": "string" +}, +"historyId": { +"description": "Output only. A History id.", +"type": "string" +}, +"projectId": { +"description": "Output only. A Project id.", +"type": "string" +}, +"resultsStorage": { +"$ref": "ResultsStorage", +"description": "The location where output files are stored in the user bucket." +}, +"shardSummaries": { +"description": "Output only. Summaries of shards. Only one shard will present unless sharding feature is enabled in TestExecutionService.", +"items": { +"$ref": "ShardSummary" +}, +"type": "array" +} +}, +"type": "object" +}, +"EnvironmentDimensionValueEntry": { +"id": "EnvironmentDimensionValueEntry", +"properties": { +"key": { +"type": "string" +}, +"value": { +"type": "string" +} +}, +"type": "object" +}, +"Execution": { +"description": "An Execution represents a collection of Steps. For instance, it could represent: - a mobile test executed across a range of device configurations - a jenkins job with a build step followed by a test step The maximum size of an execution message is 1 MiB. An Execution can be updated until its state is set to COMPLETE at which point it becomes immutable.", +"id": "Execution", +"properties": { +"completionTime": { +"$ref": "Timestamp", +"description": "The time when the Execution status transitioned to COMPLETE. This value will be set automatically when state transitions to COMPLETE. - In response: set if the execution state is COMPLETE. - In create/update request: never set" +}, +"creationTime": { +"$ref": "Timestamp", +"description": "The time when the Execution was created. This value will be set automatically when CreateExecution is called. - In response: always set - In create/update request: never set" +}, +"dimensionDefinitions": { +"description": "The dimensions along which different steps in this execution may vary. This must remain fixed over the life of the execution. Returns INVALID_ARGUMENT if this field is set in an update request. Returns INVALID_ARGUMENT if the same name occurs in more than one dimension_definition. Returns INVALID_ARGUMENT if the size of the list is over 100. - In response: present if set by create - In create request: optional - In update request: never set", +"items": { +"$ref": "MatrixDimensionDefinition" +}, +"type": "array" +}, +"executionId": { +"description": "A unique identifier within a History for this Execution. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response always set - In create/update request: never set", +"type": "string" +}, +"outcome": { +"$ref": "Outcome", +"description": "Classify the result, for example into SUCCESS or FAILURE - In response: present if set by create/update request - In create/update request: optional" +}, +"specification": { +"$ref": "Specification", +"description": "Lightweight information about execution request. - In response: present if set by create - In create: optional - In update: optional" +}, +"state": { +"description": "The initial state is IN_PROGRESS. The only legal state transitions is from IN_PROGRESS to COMPLETE. A PRECONDITION_FAILED will be returned if an invalid transition is requested. The state can only be set to COMPLETE once. A FAILED_PRECONDITION will be returned if the state is set to COMPLETE multiple times. If the state is set to COMPLETE, all the in-progress steps within the execution will be set as COMPLETE. If the outcome of the step is not set, the outcome will be set to INCONCLUSIVE. - In response always set - In create/update request: optional", +"enum": [ +"unknownState", +"pending", +"inProgress", +"complete" +], +"enumDescriptions": [ +"Should never be in this state. Exists for proto deserialization backward compatibility.", +"The Execution/Step is created, ready to run, but not running yet. If an Execution/Step is created without initial state, it is assumed that the Execution/Step is in PENDING state.", +"The Execution/Step is in progress.", +"The finalized, immutable state. Steps/Executions in this state cannot be modified." +], +"type": "string" +}, +"testExecutionMatrixId": { +"description": "TestExecution Matrix ID that the TestExecutionService uses. - In response: present if set by create - In create: optional - In update: never set", +"type": "string" +} +}, +"type": "object" +}, +"FailedToInstall": { +"description": "Failed to install the App.", +"id": "FailedToInstall", +"properties": {}, +"type": "object" +}, +"FailureDetail": { +"description": "Details for an outcome with a FAILURE outcome summary.", +"id": "FailureDetail", +"properties": { +"crashed": { +"description": "If the failure was severe because the system (app) under test crashed.", +"type": "boolean" +}, +"deviceOutOfMemory": { +"description": "If the device ran out of memory during a test, causing the test to crash.", +"type": "boolean" +}, +"failedRoboscript": { +"description": "If the Roboscript failed to complete successfully, e.g., because a Roboscript action or assertion failed or a Roboscript action could not be matched during the entire crawl.", +"type": "boolean" +}, +"notInstalled": { +"description": "If an app is not installed and thus no test can be run with the app. This might be caused by trying to run a test on an unsupported platform.", +"type": "boolean" +}, +"otherNativeCrash": { +"description": "If a native process (including any other than the app) crashed.", +"type": "boolean" +}, +"timedOut": { +"description": "If the test overran some time limit, and that is why it failed.", +"type": "boolean" +}, +"unableToCrawl": { +"description": "If the robo was unable to crawl the app; perhaps because the app did not start.", +"type": "boolean" +} +}, +"type": "object" +}, +"FatalException": { +"description": "Additional details for a fatal exception.", +"id": "FatalException", +"properties": { +"stackTrace": { +"$ref": "StackTrace", +"description": "The stack trace of the fatal exception. Optional." +} +}, +"type": "object" +}, +"FileReference": { +"description": "A reference to a file.", +"id": "FileReference", +"properties": { +"fileUri": { +"description": "The URI of a file stored in Google Cloud Storage. For example: http://storage.googleapis.com/mybucket/path/to/test.xml or in gsutil format: gs://mybucket/path/to/test.xml with version-specific info, gs://mybucket/path/to/test.xml#1360383693690000 An INVALID_ARGUMENT error will be returned if the URI format is not supported. - In response: always set - In create/update request: always set", +"type": "string" +} +}, +"type": "object" +}, +"GraphicsStats": { +"description": "Graphics statistics for the App. The information is collected from 'adb shell dumpsys graphicsstats'. For more info see: https://developer.android.com/training/testing/performance.html Statistics will only be present for API 23+.", +"id": "GraphicsStats", +"properties": { +"buckets": { +"description": "Histogram of frame render times. There should be 154 buckets ranging from [5ms, 6ms) to [4950ms, infinity)", +"items": { +"$ref": "GraphicsStatsBucket" +}, +"type": "array" +}, +"highInputLatencyCount": { +"description": "Total \"high input latency\" events.", +"format": "int64", +"type": "string" +}, +"jankyFrames": { +"description": "Total frames with slow render time. Should be <= total_frames.", +"format": "int64", +"type": "string" +}, +"missedVsyncCount": { +"description": "Total \"missed vsync\" events.", +"format": "int64", +"type": "string" +}, +"p50Millis": { +"description": "50th percentile frame render time in milliseconds.", +"format": "int64", +"type": "string" +}, +"p90Millis": { +"description": "90th percentile frame render time in milliseconds.", +"format": "int64", +"type": "string" +}, +"p95Millis": { +"description": "95th percentile frame render time in milliseconds.", +"format": "int64", +"type": "string" +}, +"p99Millis": { +"description": "99th percentile frame render time in milliseconds.", +"format": "int64", +"type": "string" +}, +"slowBitmapUploadCount": { +"description": "Total \"slow bitmap upload\" events.", +"format": "int64", +"type": "string" +}, +"slowDrawCount": { +"description": "Total \"slow draw\" events.", +"format": "int64", +"type": "string" +}, +"slowUiThreadCount": { +"description": "Total \"slow UI thread\" events.", +"format": "int64", +"type": "string" +}, +"totalFrames": { +"description": "Total frames rendered by package.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GraphicsStatsBucket": { +"id": "GraphicsStatsBucket", +"properties": { +"frameCount": { +"description": "Number of frames in the bucket.", +"format": "int64", +"type": "string" +}, +"renderMillis": { +"description": "Lower bound of render time in milliseconds.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"History": { +"description": "A History represents a sorted list of Executions ordered by the start_timestamp_millis field (descending). It can be used to group all the Executions of a continuous build. Note that the ordering only operates on one-dimension. If a repository has multiple branches, it means that multiple histories will need to be used in order to order Executions per branch.", +"id": "History", +"properties": { +"displayName": { +"description": "A short human-readable (plain text) name to display in the UI. Maximum of 100 characters. - In response: present if set during create. - In create request: optional", +"type": "string" +}, +"historyId": { +"description": "A unique identifier within a project for this History. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response always set - In create request: never set", +"type": "string" +}, +"name": { +"description": "A name to uniquely identify a history within a project. Maximum of 200 characters. - In response always set - In create request: always set", +"type": "string" +}, +"testPlatform": { +"description": "The platform of the test history. - In response: always set. Returns the platform of the last execution if unknown.", +"enum": [ +"unknownPlatform", +"android", +"ios" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"Image": { +"description": "An image, with a link to the main image and a thumbnail.", +"id": "Image", +"properties": { +"error": { +"$ref": "Status", +"description": "An error explaining why the thumbnail could not be rendered." +}, +"sourceImage": { +"$ref": "ToolOutputReference", +"description": "A reference to the full-size, original image. This is the same as the tool_outputs entry for the image under its Step. Always set." +}, +"stepId": { +"description": "The step to which the image is attached. Always set.", +"type": "string" +}, +"thumbnail": { +"$ref": "Thumbnail", +"description": "The thumbnail." +} +}, +"type": "object" +}, +"InAppPurchasesFound": { +"description": "Additional details of in-app purchases encountered during the crawl.", +"id": "InAppPurchasesFound", +"properties": { +"inAppPurchasesFlowsExplored": { +"description": "The total number of in-app purchases flows explored: how many times the robo tries to buy a SKU.", +"format": "int32", +"type": "integer" +}, +"inAppPurchasesFlowsStarted": { +"description": "The total number of in-app purchases flows started.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"InconclusiveDetail": { +"description": "Details for an outcome with an INCONCLUSIVE outcome summary.", +"id": "InconclusiveDetail", +"properties": { +"abortedByUser": { +"description": "If the end user aborted the test execution before a pass or fail could be determined. For example, the user pressed ctrl-c which sent a kill signal to the test runner while the test was running.", +"type": "boolean" +}, +"hasErrorLogs": { +"description": "If results are being provided to the user in certain cases of infrastructure failures", +"type": "boolean" +}, +"infrastructureFailure": { +"description": "If the test runner could not determine success or failure because the test depends on a component other than the system under test which failed. For example, a mobile test requires provisioning a device where the test executes, and that provisioning can fail.", +"type": "boolean" +} +}, +"type": "object" +}, +"IndividualOutcome": { +"description": "Step Id and outcome of each individual step that was run as a group with other steps with the same configuration.", +"id": "IndividualOutcome", +"properties": { +"multistepNumber": { +"description": "Unique int given to each step. Ranges from 0(inclusive) to total number of steps(exclusive). The primary step is 0.", +"format": "int32", +"type": "integer" +}, +"outcomeSummary": { +"enum": [ +"unset", +"success", +"failure", +"inconclusive", +"skipped", +"flaky" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The test matrix run was successful, for instance: - All the test cases passed. - Robo did not detect a crash of the application under test.", +"A run failed, for instance: - One or more test case failed. - A test timed out. - The application under test crashed.", +"Something unexpected happened. The run should still be considered unsuccessful but this is likely a transient problem and re-running the test might be successful.", +"All tests were skipped, for instance: - All device configurations were incompatible.", +"A group of steps that were run with the same configuration had both failure and success outcomes." +], +"type": "string" +}, +"runDuration": { +"$ref": "Duration", +"description": "How long it took for this step to run." +}, +"stepId": { +"type": "string" +} +}, +"type": "object" +}, +"InsufficientCoverage": { +"description": "A warning that Robo did not crawl potentially important parts of the app.", +"id": "InsufficientCoverage", +"properties": {}, +"type": "object" +}, +"IosAppCrashed": { +"description": "Additional details for an iOS app crash.", +"id": "IosAppCrashed", +"properties": { +"stackTrace": { +"$ref": "StackTrace", +"description": "The stack trace, if one is available. Optional." +} +}, +"type": "object" +}, +"IosAppInfo": { +"description": "iOS app information", +"id": "IosAppInfo", +"properties": { +"name": { +"description": "The name of the app. Required", +"type": "string" +} +}, +"type": "object" +}, +"IosRoboTest": { +"description": "A Robo test for an iOS application.", +"id": "IosRoboTest", +"properties": {}, +"type": "object" +}, +"IosTest": { +"description": "A iOS mobile test specification", +"id": "IosTest", +"properties": { +"iosAppInfo": { +"$ref": "IosAppInfo", +"description": "Information about the application under test." +}, +"iosRoboTest": { +"$ref": "IosRoboTest", +"description": "An iOS Robo test." +}, +"iosTestLoop": { +"$ref": "IosTestLoop", +"description": "An iOS test loop." +}, +"iosXcTest": { +"$ref": "IosXcTest", +"description": "An iOS XCTest." +}, +"testTimeout": { +"$ref": "Duration", +"description": "Max time a test is allowed to run before it is automatically cancelled." +} +}, +"type": "object" +}, +"IosTestLoop": { +"description": "A game loop test of an iOS application.", +"id": "IosTestLoop", +"properties": { +"bundleId": { +"description": "Bundle ID of the app.", +"type": "string" +} +}, +"type": "object" +}, +"IosXcTest": { +"description": "A test of an iOS application that uses the XCTest framework.", +"id": "IosXcTest", +"properties": { +"bundleId": { +"description": "Bundle ID of the app.", +"type": "string" +}, +"xcodeVersion": { +"description": "Xcode version that the test was run with.", +"type": "string" +} +}, +"type": "object" +}, +"LauncherActivityNotFound": { +"description": "Failed to find the launcher activity of an app.", +"id": "LauncherActivityNotFound", +"properties": {}, +"type": "object" +}, +"ListEnvironmentsResponse": { +"description": "Response message for EnvironmentService.ListEnvironments.", +"id": "ListEnvironmentsResponse", +"properties": { +"environments": { +"description": "Environments. Always set.", +"items": { +"$ref": "Environment" +}, +"type": "array" +}, +"executionId": { +"description": "A Execution id Always set.", +"type": "string" +}, +"historyId": { +"description": "A History id. Always set.", +"type": "string" +}, +"nextPageToken": { +"description": "A continuation token to resume the query at the next item. Will only be set if there are more Environments to fetch.", +"type": "string" +}, +"projectId": { +"description": "A Project id. Always set.", +"type": "string" +} +}, +"type": "object" +}, +"ListExecutionsResponse": { +"id": "ListExecutionsResponse", +"properties": { +"executions": { +"description": "Executions. Always set.", +"items": { +"$ref": "Execution" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A continuation token to resume the query at the next item. Will only be set if there are more Executions to fetch.", +"type": "string" +} +}, +"type": "object" +}, +"ListHistoriesResponse": { +"description": "Response message for HistoryService.List", +"id": "ListHistoriesResponse", +"properties": { +"histories": { +"description": "Histories.", +"items": { +"$ref": "History" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A continuation token to resume the query at the next item. Will only be set if there are more histories to fetch. Tokens are valid for up to one hour from the time of the first list request. For instance, if you make a list request at 1PM and use the token from this first request 10 minutes later, the token from this second response will only be valid for 50 minutes.", +"type": "string" +} +}, +"type": "object" +}, +"ListPerfSampleSeriesResponse": { +"id": "ListPerfSampleSeriesResponse", +"properties": { +"perfSampleSeries": { +"description": "The resulting PerfSampleSeries sorted by id", +"items": { +"$ref": "PerfSampleSeries" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPerfSamplesResponse": { +"id": "ListPerfSamplesResponse", +"properties": { +"nextPageToken": { +"description": "Optional, returned if result size exceeds the page size specified in the request (or the default page size, 500, if unspecified). It indicates the last sample timestamp to be used as page_token in subsequent request", +"type": "string" +}, +"perfSamples": { +"items": { +"$ref": "PerfSample" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListScreenshotClustersResponse": { +"id": "ListScreenshotClustersResponse", +"properties": { +"clusters": { +"description": "The set of clusters associated with an execution Always set", +"items": { +"$ref": "ScreenshotCluster" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListStepAccessibilityClustersResponse": { +"description": "Response message for AccessibilityService.ListStepAccessibilityClusters.", +"id": "ListStepAccessibilityClustersResponse", +"properties": { +"clusters": { +"description": "A sequence of accessibility suggestions, grouped into clusters. Within the sequence, clusters that belong to the same SuggestionCategory should be adjacent. Within each category, clusters should be ordered by their SuggestionPriority (ERRORs first). The categories should be ordered by their highest priority cluster.", +"items": { +"$ref": "SuggestionClusterProto" +}, +"type": "array" +}, +"name": { +"description": "A full resource name of the step. For example, projects/my-project/histories/bh.1234567890abcdef/executions/ 1234567890123456789/steps/bs.1234567890abcdef Always presents.", +"type": "string" +} +}, +"type": "object" +}, +"ListStepThumbnailsResponse": { +"description": "A response containing the thumbnails in a step.", +"id": "ListStepThumbnailsResponse", +"properties": { +"nextPageToken": { +"description": "A continuation token to resume the query at the next item. If set, indicates that there are more thumbnails to read, by calling list again with this value in the page_token field.", +"type": "string" +}, +"thumbnails": { +"description": "A list of image data. Images are returned in a deterministic order; they are ordered by these factors, in order of importance: * First, by their associated test case. Images without a test case are considered greater than images with one. * Second, by their creation time. Images without a creation time are greater than images with one. * Third, by the order in which they were added to the step (by calls to CreateStep or UpdateStep).", +"items": { +"$ref": "Image" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListStepsResponse": { +"description": "Response message for StepService.List.", +"id": "ListStepsResponse", +"properties": { +"nextPageToken": { +"description": "A continuation token to resume the query at the next item. If set, indicates that there are more steps to read, by calling list again with this value in the page_token field.", +"type": "string" +}, +"steps": { +"description": "Steps.", +"items": { +"$ref": "Step" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTestCasesResponse": { +"description": "Response message for StepService.ListTestCases.", +"id": "ListTestCasesResponse", +"properties": { +"nextPageToken": { +"type": "string" +}, +"testCases": { +"description": "List of test cases.", +"items": { +"$ref": "TestCase" +}, +"type": "array" +} +}, +"type": "object" +}, +"LogcatCollectionError": { +"description": "A warning that there were issues in logcat collection.", +"id": "LogcatCollectionError", +"properties": {}, +"type": "object" +}, +"MatrixDimensionDefinition": { +"description": "One dimension of the matrix of different runs of a step.", +"id": "MatrixDimensionDefinition", +"properties": {}, +"type": "object" +}, +"MemoryInfo": { +"id": "MemoryInfo", +"properties": { +"memoryCapInKibibyte": { +"description": "Maximum memory that can be allocated to the process in KiB", +"format": "int64", +"type": "string" +}, +"memoryTotalInKibibyte": { +"description": "Total memory available on the device in KiB", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"MergedResult": { +"description": "Merged test result for environment. If the environment has only one step (no reruns or shards), then the merged result is the same as the step result. If the environment has multiple shards and/or reruns, then the results of shards and reruns that belong to the same environment are merged into one environment result.", +"id": "MergedResult", +"properties": { +"outcome": { +"$ref": "Outcome", +"description": "Outcome of the resource" +}, +"state": { +"description": "State of the resource", +"enum": [ +"unknownState", +"pending", +"inProgress", +"complete" +], +"enumDescriptions": [ +"Should never be in this state. Exists for proto deserialization backward compatibility.", +"The Execution/Step is created, ready to run, but not running yet. If an Execution/Step is created without initial state, it is assumed that the Execution/Step is in PENDING state.", +"The Execution/Step is in progress.", +"The finalized, immutable state. Steps/Executions in this state cannot be modified." +], +"type": "string" +}, +"testSuiteOverviews": { +"description": "The combined and rolled-up result of each test suite that was run as part of this environment. Combining: When the test cases from a suite are run in different steps (sharding), the results are added back together in one overview. (e.g., if shard1 has 2 failures and shard2 has 1 failure than the overview failure_count = 3). Rollup: When test cases from the same suite are run multiple times (flaky), the results are combined (e.g., if testcase1.run1 fails, testcase1.run2 passes, and both testcase2.run1 and testcase2.run2 fail then the overview flaky_count = 1 and failure_count = 1).", +"items": { +"$ref": "TestSuiteOverview" +}, +"type": "array" +} +}, +"type": "object" +}, +"MultiStep": { +"description": "Details when multiple steps are run with the same configuration as a group.", +"id": "MultiStep", +"properties": { +"multistepNumber": { +"description": "Unique int given to each step. Ranges from 0(inclusive) to total number of steps(exclusive). The primary step is 0.", +"format": "int32", +"type": "integer" +}, +"primaryStep": { +"$ref": "PrimaryStep", +"description": "Present if it is a primary (original) step." +}, +"primaryStepId": { +"description": "Step Id of the primary (original) step, which might be this step.", +"type": "string" +} +}, +"type": "object" +}, +"NativeCrash": { +"description": "Additional details for a native crash.", +"id": "NativeCrash", +"properties": { +"stackTrace": { +"$ref": "StackTrace", +"description": "The stack trace of the native crash. Optional." +} +}, +"type": "object" +}, +"NonSdkApi": { +"description": "A non-sdk API and examples of it being called along with other metadata See https://developer.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces", +"id": "NonSdkApi", +"properties": { +"apiSignature": { +"description": "The signature of the Non-SDK API", +"type": "string" +}, +"exampleStackTraces": { +"description": "Example stack traces of this API being called.", +"items": { +"type": "string" +}, +"type": "array" +}, +"insights": { +"description": "Optional debugging insights for non-SDK API violations.", +"items": { +"$ref": "NonSdkApiInsight" +}, +"type": "array" +}, +"invocationCount": { +"description": "The total number of times this API was observed to have been called.", +"format": "int32", +"type": "integer" +}, +"list": { +"description": "Which list this API appears on", +"enum": [ +"NONE", +"WHITE", +"BLACK", +"GREY", +"GREY_MAX_O", +"GREY_MAX_P", +"GREY_MAX_Q", +"GREY_MAX_R", +"GREY_MAX_S" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"NonSdkApiInsight": { +"description": "Non-SDK API insights (to address debugging solutions).", +"id": "NonSdkApiInsight", +"properties": { +"exampleTraceMessages": { +"description": "Optional sample stack traces, for which this insight applies (there should be at least one).", +"items": { +"type": "string" +}, +"type": "array" +}, +"matcherId": { +"description": "A unique ID, to be used for determining the effectiveness of this particular insight in the context of a matcher. (required)", +"type": "string" +}, +"pendingGoogleUpdateInsight": { +"$ref": "PendingGoogleUpdateInsight", +"description": "An insight indicating that the hidden API usage originates from a Google-provided library." +}, +"upgradeInsight": { +"$ref": "UpgradeInsight", +"description": "An insight indicating that the hidden API usage originates from the use of a library that needs to be upgraded." +} +}, +"type": "object" +}, +"NonSdkApiUsageViolation": { +"description": "Additional details for a non-sdk API usage violation.", +"id": "NonSdkApiUsageViolation", +"properties": { +"apiSignatures": { +"description": "Signatures of a subset of those hidden API's.", +"items": { +"type": "string" +}, +"type": "array" +}, +"uniqueApis": { +"description": "Total number of unique hidden API's accessed.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"NonSdkApiUsageViolationReport": { +"description": "Contains a summary and examples of non-sdk API usage violations.", +"id": "NonSdkApiUsageViolationReport", +"properties": { +"exampleApis": { +"description": "Examples of the detected API usages.", +"items": { +"$ref": "NonSdkApi" +}, +"type": "array" +}, +"minSdkVersion": { +"description": "Minimum API level required for the application to run.", +"format": "int32", +"type": "integer" +}, +"targetSdkVersion": { +"description": "Specifies the API Level on which the application is designed to run.", +"format": "int32", +"type": "integer" +}, +"uniqueApis": { +"description": "Total number of unique Non-SDK API's accessed.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Outcome": { +"description": "Interprets a result so that humans and machines can act on it.", +"id": "Outcome", +"properties": { +"failureDetail": { +"$ref": "FailureDetail", +"description": "More information about a FAILURE outcome. Returns INVALID_ARGUMENT if this field is set but the summary is not FAILURE. Optional" +}, +"inconclusiveDetail": { +"$ref": "InconclusiveDetail", +"description": "More information about an INCONCLUSIVE outcome. Returns INVALID_ARGUMENT if this field is set but the summary is not INCONCLUSIVE. Optional" +}, +"skippedDetail": { +"$ref": "SkippedDetail", +"description": "More information about a SKIPPED outcome. Returns INVALID_ARGUMENT if this field is set but the summary is not SKIPPED. Optional" +}, +"successDetail": { +"$ref": "SuccessDetail", +"description": "More information about a SUCCESS outcome. Returns INVALID_ARGUMENT if this field is set but the summary is not SUCCESS. Optional" +}, +"summary": { +"description": "The simplest way to interpret a result. Required", +"enum": [ +"unset", +"success", +"failure", +"inconclusive", +"skipped", +"flaky" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The test matrix run was successful, for instance: - All the test cases passed. - Robo did not detect a crash of the application under test.", +"A run failed, for instance: - One or more test case failed. - A test timed out. - The application under test crashed.", +"Something unexpected happened. The run should still be considered unsuccessful but this is likely a transient problem and re-running the test might be successful.", +"All tests were skipped, for instance: - All device configurations were incompatible.", +"A group of steps that were run with the same configuration had both failure and success outcomes." +], +"type": "string" +} +}, +"type": "object" +}, +"OverlappingUIElements": { +"description": "A warning that Robo encountered a screen that has overlapping clickable elements; this may indicate a potential UI issue.", +"id": "OverlappingUIElements", +"properties": { +"resourceName": { +"description": "Resource names of the overlapping screen elements", +"items": { +"type": "string" +}, +"type": "array" +}, +"screenId": { +"description": "The screen id of the elements", +"type": "string" +} +}, +"type": "object" +}, +"PendingGoogleUpdateInsight": { +"description": "This insight indicates that the hidden API usage originates from a Google-provided library. Users need not take any action.", +"id": "PendingGoogleUpdateInsight", +"properties": { +"nameOfGoogleLibrary": { +"description": "The name of the Google-provided library with the non-SDK API dependency.", +"type": "string" +} +}, +"type": "object" +}, +"PerfEnvironment": { +"description": "Encapsulates performance environment info", +"id": "PerfEnvironment", +"properties": { +"cpuInfo": { +"$ref": "CPUInfo", +"description": "CPU related environment info" +}, +"memoryInfo": { +"$ref": "MemoryInfo", +"description": "Memory related environment info" +} +}, +"type": "object" +}, +"PerfMetricsSummary": { +"description": "A summary of perf metrics collected and performance environment info", +"id": "PerfMetricsSummary", +"properties": { +"appStartTime": { +"$ref": "AppStartTime" +}, +"executionId": { +"description": "A tool results execution ID. @OutputOnly", +"type": "string" +}, +"graphicsStats": { +"$ref": "GraphicsStats", +"deprecated": true, +"description": "Graphics statistics for the entire run. Statistics are reset at the beginning of the run and collected at the end of the run." +}, +"historyId": { +"description": "A tool results history ID. @OutputOnly", +"type": "string" +}, +"perfEnvironment": { +"$ref": "PerfEnvironment", +"description": "Describes the environment in which the performance metrics were collected" +}, +"perfMetrics": { +"description": "Set of resource collected", +"items": { +"enum": [ +"perfMetricTypeUnspecified", +"memory", +"cpu", +"network", +"graphics" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +}, +"projectId": { +"description": "The cloud project @OutputOnly", +"type": "string" +}, +"stepId": { +"description": "A tool results step ID. @OutputOnly", +"type": "string" +} +}, +"type": "object" +}, +"PerfSample": { +"description": "Resource representing a single performance measure or data point", +"id": "PerfSample", +"properties": { +"sampleTime": { +"$ref": "Timestamp", +"description": "Timestamp of collection." +}, +"value": { +"description": "Value observed", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"PerfSampleSeries": { +"description": "Resource representing a collection of performance samples (or data points)", +"id": "PerfSampleSeries", +"properties": { +"basicPerfSampleSeries": { +"$ref": "BasicPerfSampleSeries", +"description": "Basic series represented by a line chart" +}, +"executionId": { +"description": "A tool results execution ID. @OutputOnly", +"type": "string" +}, +"historyId": { +"description": "A tool results history ID. @OutputOnly", +"type": "string" +}, +"projectId": { +"description": "The cloud project @OutputOnly", +"type": "string" +}, +"sampleSeriesId": { +"description": "A sample series id @OutputOnly", +"type": "string" +}, +"stepId": { +"description": "A tool results step ID. @OutputOnly", +"type": "string" +} +}, +"type": "object" +}, +"PerformedGoogleLogin": { +"description": "A notification that Robo signed in with Google.", +"id": "PerformedGoogleLogin", +"properties": {}, +"type": "object" +}, +"PerformedMonkeyActions": { +"description": "A notification that Robo performed some monkey actions.", +"id": "PerformedMonkeyActions", +"properties": { +"totalActions": { +"description": "The total number of monkey actions performed during the crawl.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PrimaryStep": { +"description": "Stores rollup test status of multiple steps that were run as a group and outcome of each individual step.", +"id": "PrimaryStep", +"properties": { +"individualOutcome": { +"description": "Step Id and outcome of each individual step.", +"items": { +"$ref": "IndividualOutcome" +}, +"type": "array" +}, +"rollUp": { +"description": "Rollup test status of multiple steps that were run with the same configuration as a group.", +"enum": [ +"unset", +"success", +"failure", +"inconclusive", +"skipped", +"flaky" +], +"enumDescriptions": [ +"Do not use. For proto versioning only.", +"The test matrix run was successful, for instance: - All the test cases passed. - Robo did not detect a crash of the application under test.", +"A run failed, for instance: - One or more test case failed. - A test timed out. - The application under test crashed.", +"Something unexpected happened. The run should still be considered unsuccessful but this is likely a transient problem and re-running the test might be successful.", +"All tests were skipped, for instance: - All device configurations were incompatible.", +"A group of steps that were run with the same configuration had both failure and success outcomes." +], +"type": "string" +} +}, +"type": "object" +}, +"ProjectSettings": { +"description": "Per-project settings for the Tool Results service.", +"id": "ProjectSettings", +"properties": { +"defaultBucket": { +"description": "The name of the Google Cloud Storage bucket to which results are written. By default, this is unset. In update request: optional In response: optional", +"type": "string" +}, +"name": { +"description": "The name of the project's settings. Always of the form: projects/{project-id}/settings In update request: never set In response: always set", +"type": "string" +} +}, +"type": "object" +}, +"PublishXunitXmlFilesRequest": { +"description": "Request message for StepService.PublishXunitXmlFiles.", +"id": "PublishXunitXmlFilesRequest", +"properties": { +"xunitXmlFiles": { +"description": "URI of the Xunit XML files to publish. The maximum size of the file this reference is pointing to is 50MB. Required.", +"items": { +"$ref": "FileReference" +}, +"type": "array" +} +}, +"type": "object" +}, +"RegionProto": { +"description": "A rectangular region.", +"id": "RegionProto", +"properties": { +"heightPx": { +"description": "The height, in pixels. Always set.", +"format": "int32", +"type": "integer" +}, +"leftPx": { +"description": "The left side of the rectangle, in pixels. Always set.", +"format": "int32", +"type": "integer" +}, +"topPx": { +"description": "The top of the rectangle, in pixels. Always set.", +"format": "int32", +"type": "integer" +}, +"widthPx": { +"description": "The width, in pixels. Always set.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ResultsStorage": { +"description": "The storage for test results.", +"id": "ResultsStorage", +"properties": { +"resultsStoragePath": { +"$ref": "FileReference", +"description": "The root directory for test results." +}, +"xunitXmlFile": { +"$ref": "FileReference", +"description": "The path to the Xunit XML file." +} +}, +"type": "object" +}, +"RoboScriptExecution": { +"description": "Execution stats for a user-provided Robo script.", +"id": "RoboScriptExecution", +"properties": { +"successfulActions": { +"description": "The number of Robo script actions executed successfully.", +"format": "int32", +"type": "integer" +}, +"totalActions": { +"description": "The total number of actions in the Robo script.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"SafeHtmlProto": { +"description": "IMPORTANT: It is unsafe to accept this message from an untrusted source, since it's trivial for an attacker to forge serialized messages that don't fulfill the type's safety contract -- for example, it could contain attacker controlled script. A system which receives a SafeHtmlProto implicitly trusts the producer of the SafeHtmlProto. So, it's generally safe to return this message in RPC responses, but generally unsafe to accept it in RPC requests.", +"id": "SafeHtmlProto", +"properties": { +"privateDoNotAccessOrElseSafeHtmlWrappedValue": { +"description": "IMPORTANT: Never set or read this field, even from tests, it is private. See documentation at the top of .proto file for programming language packages with which to create or read this message.", +"type": "string" +} +}, +"type": "object" +}, +"Screen": { +"id": "Screen", +"properties": { +"fileReference": { +"description": "File reference of the png file. Required.", +"type": "string" +}, +"locale": { +"description": "Locale of the device that the screenshot was taken on. Required.", +"type": "string" +}, +"model": { +"description": "Model of the device that the screenshot was taken on. Required.", +"type": "string" +}, +"version": { +"description": "OS version of the device that the screenshot was taken on. Required.", +"type": "string" +} +}, +"type": "object" +}, +"ScreenshotCluster": { +"id": "ScreenshotCluster", +"properties": { +"activity": { +"description": "A string that describes the activity of every screen in the cluster.", +"type": "string" +}, +"clusterId": { +"description": "A unique identifier for the cluster. @OutputOnly", +"type": "string" +}, +"keyScreen": { +"$ref": "Screen", +"description": "A singular screen that represents the cluster as a whole. This screen will act as the \"cover\" of the entire cluster. When users look at the clusters, only the key screen from each cluster will be shown. Which screen is the key screen is determined by the ClusteringAlgorithm" +}, +"screens": { +"description": "Full list of screens.", +"items": { +"$ref": "Screen" +}, +"type": "array" +} +}, +"type": "object" +}, +"ShardSummary": { +"description": "Result summary for a shard in an environment.", +"id": "ShardSummary", +"properties": { +"runs": { +"description": "Summaries of the steps belonging to the shard. With flaky_test_attempts enabled from TestExecutionService, more than one run (Step) can present. And the runs will be sorted by multistep_number.", +"items": { +"$ref": "StepSummary" +}, +"type": "array" +}, +"shardResult": { +"$ref": "MergedResult", +"description": "Merged result of the shard." +} +}, +"type": "object" +}, +"SkippedDetail": { +"description": "Details for an outcome with a SKIPPED outcome summary.", +"id": "SkippedDetail", +"properties": { +"incompatibleAppVersion": { +"description": "If the App doesn't support the specific API level.", +"type": "boolean" +}, +"incompatibleArchitecture": { +"description": "If the App doesn't run on the specific architecture, for example, x86.", +"type": "boolean" +}, +"incompatibleDevice": { +"description": "If the requested OS version doesn't run on the specific device model.", +"type": "boolean" +} +}, +"type": "object" +}, +"Specification": { +"description": "The details about how to run the execution.", +"id": "Specification", +"properties": { +"androidTest": { +"$ref": "AndroidTest", +"description": "An Android mobile test execution specification." +}, +"iosTest": { +"$ref": "IosTest", +"description": "An iOS mobile test execution specification." +} +}, +"type": "object" +}, +"StackTrace": { +"description": "A stacktrace.", +"id": "StackTrace", +"properties": { +"exception": { +"description": "The stack trace message. Required", +"type": "string" +} +}, +"type": "object" +}, +"StartActivityNotFound": { +"description": "User provided intent failed to resolve to an activity.", +"id": "StartActivityNotFound", +"properties": { +"action": { +"type": "string" +}, +"uri": { +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Step": { +"description": "A Step represents a single operation performed as part of Execution. A step can be used to represent the execution of a tool ( for example a test runner execution or an execution of a compiler). Steps can overlap (for instance two steps might have the same start time if some operations are done in parallel). Here is an example, let's consider that we have a continuous build is executing a test runner for each iteration. The workflow would look like: - user creates a Execution with id 1 - user creates a TestExecutionStep with id 100 for Execution 1 - user update TestExecutionStep with id 100 to add a raw xml log + the service parses the xml logs and returns a TestExecutionStep with updated TestResult(s). - user update the status of TestExecutionStep with id 100 to COMPLETE A Step can be updated until its state is set to COMPLETE at which points it becomes immutable.", +"id": "Step", +"properties": { +"completionTime": { +"$ref": "Timestamp", +"description": "The time when the step status was set to complete. This value will be set automatically when state transitions to COMPLETE. - In response: set if the execution state is COMPLETE. - In create/update request: never set" +}, +"creationTime": { +"$ref": "Timestamp", +"description": "The time when the step was created. - In response: always set - In create/update request: never set" +}, +"description": { +"description": "A description of this tool For example: mvn clean package -D skipTests=true - In response: present if set by create/update request - In create/update request: optional", +"type": "string" +}, +"deviceUsageDuration": { +"$ref": "Duration", +"description": "How much the device resource is used to perform the test. This is the device usage used for billing purpose, which is different from the run_duration, for example, infrastructure failure won't be charged for device usage. PRECONDITION_FAILED will be returned if one attempts to set a device_usage on a step which already has this field set. - In response: present if previously set. - In create request: optional - In update request: optional" +}, +"dimensionValue": { +"description": "If the execution containing this step has any dimension_definition set, then this field allows the child to specify the values of the dimensions. The keys must exactly match the dimension_definition of the execution. For example, if the execution has `dimension_definition = ['attempt', 'device']` then a step must define values for those dimensions, eg. `dimension_value = ['attempt': '1', 'device': 'Nexus 6']` If a step does not participate in one dimension of the matrix, the value for that dimension should be empty string. For example, if one of the tests is executed by a runner which does not support retries, the step could have `dimension_value = ['attempt': '', 'device': 'Nexus 6']` If the step does not participate in any dimensions of the matrix, it may leave dimension_value unset. A PRECONDITION_FAILED will be returned if any of the keys do not exist in the dimension_definition of the execution. A PRECONDITION_FAILED will be returned if another step in this execution already has the same name and dimension_value, but differs on other data fields, for example, step field is different. A PRECONDITION_FAILED will be returned if dimension_value is set, and there is a dimension_definition in the execution which is not specified as one of the keys. - In response: present if set by create - In create request: optional - In update request: never set", +"items": { +"$ref": "StepDimensionValueEntry" +}, +"type": "array" +}, +"hasImages": { +"description": "Whether any of the outputs of this step are images whose thumbnails can be fetched with ListThumbnails. - In response: always set - In create/update request: never set", +"type": "boolean" +}, +"labels": { +"description": "Arbitrary user-supplied key/value pairs that are associated with the step. Users are responsible for managing the key namespace such that keys don't accidentally collide. An INVALID_ARGUMENT will be returned if the number of labels exceeds 100 or if the length of any of the keys or values exceeds 100 characters. - In response: always set - In create request: optional - In update request: optional; any new key/value pair will be added to the map, and any new value for an existing key will update that key's value", +"items": { +"$ref": "StepLabelsEntry" +}, +"type": "array" +}, +"multiStep": { +"$ref": "MultiStep", +"description": "Details when multiple steps are run with the same configuration as a group. These details can be used identify which group this step is part of. It also identifies the groups 'primary step' which indexes all the group members. - In response: present if previously set. - In create request: optional, set iff this step was performed more than once. - In update request: optional" +}, +"name": { +"description": "A short human-readable name to display in the UI. Maximum of 100 characters. For example: Clean build A PRECONDITION_FAILED will be returned upon creating a new step if it shares its name and dimension_value with an existing step. If two steps represent a similar action, but have different dimension values, they should share the same name. For instance, if the same set of tests is run on two different platforms, the two steps should have the same name. - In response: always set - In create request: always set - In update request: never set", +"type": "string" +}, +"outcome": { +"$ref": "Outcome", +"description": "Classification of the result, for example into SUCCESS or FAILURE - In response: present if set by create/update request - In create/update request: optional" +}, +"runDuration": { +"$ref": "Duration", +"description": "How long it took for this step to run. If unset, this is set to the difference between creation_time and completion_time when the step is set to the COMPLETE state. In some cases, it is appropriate to set this value separately: For instance, if a step is created, but the operation it represents is queued for a few minutes before it executes, it would be appropriate not to include the time spent queued in its run_duration. PRECONDITION_FAILED will be returned if one attempts to set a run_duration on a step which already has this field set. - In response: present if previously set; always present on COMPLETE step - In create request: optional - In update request: optional" +}, +"state": { +"description": "The initial state is IN_PROGRESS. The only legal state transitions are * IN_PROGRESS -> COMPLETE A PRECONDITION_FAILED will be returned if an invalid transition is requested. It is valid to create Step with a state set to COMPLETE. The state can only be set to COMPLETE once. A PRECONDITION_FAILED will be returned if the state is set to COMPLETE multiple times. - In response: always set - In create/update request: optional", +"enum": [ +"unknownState", +"pending", +"inProgress", +"complete" +], +"enumDescriptions": [ +"Should never be in this state. Exists for proto deserialization backward compatibility.", +"The Execution/Step is created, ready to run, but not running yet. If an Execution/Step is created without initial state, it is assumed that the Execution/Step is in PENDING state.", +"The Execution/Step is in progress.", +"The finalized, immutable state. Steps/Executions in this state cannot be modified." +], +"type": "string" +}, +"stepId": { +"description": "A unique identifier within a Execution for this Step. Returns INVALID_ARGUMENT if this field is set or overwritten by the caller. - In response: always set - In create/update request: never set", +"type": "string" +}, +"testExecutionStep": { +"$ref": "TestExecutionStep", +"description": "An execution of a test runner." +}, +"toolExecutionStep": { +"$ref": "ToolExecutionStep", +"description": "An execution of a tool (used for steps we don't explicitly support)." +} +}, +"type": "object" +}, +"StepDimensionValueEntry": { +"id": "StepDimensionValueEntry", +"properties": { +"key": { +"type": "string" +}, +"value": { +"type": "string" +} +}, +"type": "object" +}, +"StepLabelsEntry": { +"id": "StepLabelsEntry", +"properties": { +"key": { +"type": "string" +}, +"value": { +"type": "string" +} +}, +"type": "object" +}, +"StepSummary": { +"description": "Lightweight summary of a step within this execution.", +"id": "StepSummary", +"properties": {}, +"type": "object" +}, +"SuccessDetail": { +"description": "Details for an outcome with a SUCCESS outcome summary. LINT.IfChange", +"id": "SuccessDetail", +"properties": { +"otherNativeCrash": { +"description": "If a native process other than the app crashed.", +"type": "boolean" +} +}, +"type": "object" +}, +"SuggestionClusterProto": { +"description": "A set of similar suggestions that we suspect are closely related. This proto and most of the nested protos are branched from foxandcrown.prelaunchreport.service.SuggestionClusterProto, replacing PLR's dependencies with FTL's.", +"id": "SuggestionClusterProto", +"properties": { +"category": { +"description": "Category in which these types of suggestions should appear. Always set.", +"enum": [ +"unknownCategory", +"contentLabeling", +"touchTargetSize", +"lowContrast", +"implementation" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +}, +"suggestions": { +"description": "A sequence of suggestions. All of the suggestions within a cluster must have the same SuggestionPriority and belong to the same SuggestionCategory. Suggestions with the same screenshot URL should be adjacent.", +"items": { +"$ref": "SuggestionProto" +}, +"type": "array" +} +}, +"type": "object" +}, +"SuggestionProto": { +"id": "SuggestionProto", +"properties": { +"helpUrl": { +"description": "Reference to a help center article concerning this type of suggestion. Always set.", +"type": "string" +}, +"longMessage": { +"$ref": "SafeHtmlProto", +"description": "Message, in the user's language, explaining the suggestion, which may contain markup. Always set." +}, +"priority": { +"description": "Relative importance of a suggestion. Always set.", +"enum": [ +"unknownPriority", +"error", +"warning", +"info" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"pseudoResourceId": { +"description": "A somewhat human readable identifier of the source view, if it does not have a resource_name. This is a path within the accessibility hierarchy, an element with resource name; similar to an XPath.", +"type": "string" +}, +"region": { +"$ref": "RegionProto", +"description": "Region within the screenshot that is relevant to this suggestion. Optional." +}, +"resourceName": { +"description": "Reference to a view element, identified by its resource name, if it has one.", +"type": "string" +}, +"screenId": { +"description": "ID of the screen for the suggestion. It is used for getting the corresponding screenshot path. For example, screen_id \"1\" corresponds to \"1.png\" file in GCS. Always set.", +"type": "string" +}, +"secondaryPriority": { +"description": "Relative importance of a suggestion as compared with other suggestions that have the same priority and category. This is a meaningless value that can be used to order suggestions that are in the same category and have the same priority. The larger values have higher priority (i.e., are more important). Optional.", +"format": "double", +"type": "number" +}, +"shortMessage": { +"$ref": "SafeHtmlProto", +"description": "Concise message, in the user's language, representing the suggestion, which may contain markup. Always set." +}, +"title": { +"description": "General title for the suggestion, in the user's language, without markup. Always set.", +"type": "string" +} +}, +"type": "object" +}, +"TestCase": { +"id": "TestCase", +"properties": { +"elapsedTime": { +"$ref": "Duration", +"description": "The elapsed run time of the test case. Required." +}, +"endTime": { +"$ref": "Timestamp", +"description": "The end time of the test case." +}, +"skippedMessage": { +"description": "Why the test case was skipped. Present only for skipped test case", +"type": "string" +}, +"stackTraces": { +"description": "The stack trace details if the test case failed or encountered an error. The maximum size of the stack traces is 100KiB, beyond which the stack track will be truncated. Zero if the test case passed.", +"items": { +"$ref": "StackTrace" +}, +"type": "array" +}, +"startTime": { +"$ref": "Timestamp", +"description": "The start time of the test case." +}, +"status": { +"description": "The status of the test case. Required.", +"enum": [ +"passed", +"failed", +"error", +"skipped", +"flaky" +], +"enumDescriptions": [ +"Test passed.", +"Test failed.", +"Test encountered an error", +"Test skipped", +"Test flaked. Present only for rollup test cases; test cases from steps that were run with the same configuration had both failure and success outcomes." +], +"type": "string" +}, +"testCaseId": { +"description": "A unique identifier within a Step for this Test Case.", +"type": "string" +}, +"testCaseReference": { +"$ref": "TestCaseReference", +"description": "Test case reference, e.g. name, class name and test suite name. Required." +}, +"toolOutputs": { +"description": "References to opaque files of any format output by the tool execution. @OutputOnly", +"items": { +"$ref": "ToolOutputReference" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestCaseReference": { +"description": "A reference to a test case. Test case references are canonically ordered lexicographically by these three factors: * First, by test_suite_name. * Second, by class_name. * Third, by name.", +"id": "TestCaseReference", +"properties": { +"className": { +"description": "The name of the class.", +"type": "string" +}, +"name": { +"description": "The name of the test case. Required.", +"type": "string" +}, +"testSuiteName": { +"description": "The name of the test suite to which this test case belongs.", +"type": "string" +} +}, +"type": "object" +}, +"TestExecutionStep": { +"description": "A step that represents running tests. It accepts ant-junit xml files which will be parsed into structured test results by the service. Xml file paths are updated in order to append more files, however they can't be deleted. Users can also add test results manually by using the test_result field.", +"id": "TestExecutionStep", +"properties": { +"testIssues": { +"description": "Issues observed during the test execution. For example, if the mobile app under test crashed during the test, the error message and the stack trace content can be recorded here to assist debugging. - In response: present if set by create or update - In create/update request: optional", +"items": { +"$ref": "TestIssue" +}, +"type": "array" +}, +"testSuiteOverviews": { +"description": "List of test suite overview contents. This could be parsed from xUnit XML log by server, or uploaded directly by user. This references should only be called when test suites are fully parsed or uploaded. The maximum allowed number of test suite overviews per step is 1000. - In response: always set - In create request: optional - In update request: never (use publishXunitXmlFiles custom method instead)", +"items": { +"$ref": "TestSuiteOverview" +}, +"type": "array" +}, +"testTiming": { +"$ref": "TestTiming", +"description": "The timing break down of the test execution. - In response: present if set by create or update - In create/update request: optional" +}, +"toolExecution": { +"$ref": "ToolExecution", +"description": "Represents the execution of the test runner. The exit code of this tool will be used to determine if the test passed. - In response: always set - In create/update request: optional" +} +}, +"type": "object" +}, +"TestIssue": { +"description": "An issue detected occurring during a test execution.", +"id": "TestIssue", +"properties": { +"category": { +"description": "Category of issue. Required.", +"enum": [ +"unspecifiedCategory", +"common", +"robo" +], +"enumDescriptions": [ +"Default unspecified category. Do not use. For versioning only.", +"Issue is not specific to a particular test kind (e.g., a native crash).", +"Issue is specific to Robo run." +], +"type": "string" +}, +"errorMessage": { +"description": "A brief human-readable message describing the issue. Required.", +"type": "string" +}, +"severity": { +"description": "Severity of issue. Required.", +"enum": [ +"unspecifiedSeverity", +"info", +"suggestion", +"warning", +"severe" +], +"enumDescriptions": [ +"Default unspecified severity. Do not use. For versioning only.", +"Non critical issue, providing users with some info about the test run.", +"Non critical issue, providing users with some hints on improving their testing experience, e.g., suggesting to use Game Loops.", +"Potentially critical issue.", +"Critical issue." +], +"type": "string" +}, +"stackTrace": { +"$ref": "StackTrace", +"deprecated": true, +"description": "Deprecated in favor of stack trace fields inside specific warnings." +}, +"type": { +"description": "Type of issue. Required.", +"enum": [ +"unspecifiedType", +"fatalException", +"nativeCrash", +"anr", +"unusedRoboDirective", +"compatibleWithOrchestrator", +"launcherActivityNotFound", +"startActivityNotFound", +"incompleteRoboScriptExecution", +"completeRoboScriptExecution", +"failedToInstall", +"availableDeepLinks", +"nonSdkApiUsageViolation", +"nonSdkApiUsageReport", +"encounteredNonAndroidUiWidgetScreen", +"encounteredLoginScreen", +"performedGoogleLogin", +"iosException", +"iosCrash", +"performedMonkeyActions", +"usedRoboDirective", +"usedRoboIgnoreDirective", +"insufficientCoverage", +"inAppPurchases", +"crashDialogError", +"uiElementsTooDeep", +"blankScreen", +"overlappingUiElements", +"unityException", +"deviceOutOfMemory", +"logcatCollectionError", +"detectedAppSplashScreen", +"assetIssue" +], +"enumDescriptions": [ +"Default unspecified type. Do not use. For versioning only.", +"Issue is a fatal exception.", +"Issue is a native crash.", +"Issue is an ANR crash.", +"Issue is an unused robo directive.", +"Issue is a suggestion to use orchestrator.", +"Issue with finding a launcher activity", +"Issue with resolving a user-provided intent to start an activity", +"A Robo script was not fully executed.", +"A Robo script was fully and successfully executed.", +"The APK failed to install.", +"The app-under-test has deep links, but none were provided to Robo.", +"App accessed a non-sdk Api.", +"App accessed a non-sdk Api (new detailed report)", +"Robo crawl encountered at least one screen with elements that are not Android UI widgets.", +"Robo crawl encountered at least one probable login screen.", +"Robo signed in with Google.", +"iOS App crashed with an exception.", +"iOS App crashed without an exception (e.g. killed).", +"Robo crawl involved performing some monkey actions.", +"Robo crawl used a Robo directive.", +"Robo crawl used a Robo directive to ignore an UI element.", +"Robo did not crawl some potentially important parts of the app.", +"Robo crawl involved some in-app purchases.", +"Crash dialog was detected during the test execution", +"UI element depth is greater than the threshold", +"Blank screen is found in the Robo crawl", +"Overlapping UI elements are found in the Robo crawl", +"An uncaught Unity exception was detected (these don't crash apps).", +"Device running out of memory was detected", +"Problems detected while collecting logcat", +"Robo detected a splash screen provided by app (vs. Android OS splash screen).", +"There was an issue with the assets in this test." +], +"type": "string" +}, +"warning": { +"$ref": "Any", +"description": "Warning message with additional details of the issue. Should always be a message from com.google.devtools.toolresults.v1.warnings" +} +}, +"type": "object" +}, +"TestSuiteOverview": { +"description": "A summary of a test suite result either parsed from XML or uploaded directly by a user. Note: the API related comments are for StepService only. This message is also being used in ExecutionService in a read only mode for the corresponding step.", +"id": "TestSuiteOverview", +"properties": { +"elapsedTime": { +"$ref": "Duration", +"description": "Elapsed time of test suite." +}, +"errorCount": { +"description": "Number of test cases in error, typically set by the service by parsing the xml_source. - In create/response: always set - In update request: never", +"format": "int32", +"type": "integer" +}, +"failureCount": { +"description": "Number of failed test cases, typically set by the service by parsing the xml_source. May also be set by the user. - In create/response: always set - In update request: never", +"format": "int32", +"type": "integer" +}, +"flakyCount": { +"description": "Number of flaky test cases, set by the service by rolling up flaky test attempts. Present only for rollup test suite overview at environment level. A step cannot have flaky test cases.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The name of the test suite. - In create/response: always set - In update request: never", +"type": "string" +}, +"skippedCount": { +"description": "Number of test cases not run, typically set by the service by parsing the xml_source. - In create/response: always set - In update request: never", +"format": "int32", +"type": "integer" +}, +"totalCount": { +"description": "Number of test cases, typically set by the service by parsing the xml_source. - In create/response: always set - In update request: never", +"format": "int32", +"type": "integer" +}, +"xmlSource": { +"$ref": "FileReference", +"description": "If this test suite was parsed from XML, this is the URI where the original XML file is stored. Note: Multiple test suites can share the same xml_source Returns INVALID_ARGUMENT if the uri format is not supported. - In create/response: optional - In update request: never" +} +}, +"type": "object" +}, +"TestTiming": { +"description": "Testing timing break down to know phases.", +"id": "TestTiming", +"properties": { +"testProcessDuration": { +"$ref": "Duration", +"description": "How long it took to run the test process. - In response: present if previously set. - In create/update request: optional" +} +}, +"type": "object" +}, +"Thumbnail": { +"description": "A single thumbnail, with its size and format.", +"id": "Thumbnail", +"properties": { +"contentType": { +"description": "The thumbnail's content type, i.e. \"image/png\". Always set.", +"type": "string" +}, +"data": { +"description": "The thumbnail file itself. That is, the bytes here are precisely the bytes that make up the thumbnail file; they can be served as an image as-is (with the appropriate content type.) Always set.", +"format": "byte", +"type": "string" +}, +"heightPx": { +"description": "The height of the thumbnail, in pixels. Always set.", +"format": "int32", +"type": "integer" +}, +"widthPx": { +"description": "The width of the thumbnail, in pixels. Always set.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Timestamp": { +"description": "A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings.", +"id": "Timestamp", +"properties": { +"nanos": { +"description": "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive.", +"format": "int32", +"type": "integer" +}, +"seconds": { +"description": "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ToolExecution": { +"description": "An execution of an arbitrary tool. It could be a test runner or a tool copying artifacts or deploying code.", +"id": "ToolExecution", +"properties": { +"commandLineArguments": { +"description": "The full tokenized command line including the program name (equivalent to argv in a C program). - In response: present if set by create request - In create request: optional - In update request: never set", +"items": { +"type": "string" +}, +"type": "array" +}, +"exitCode": { +"$ref": "ToolExitCode", +"description": "Tool execution exit code. This field will be set once the tool has exited. - In response: present if set by create/update request - In create request: optional - In update request: optional, a FAILED_PRECONDITION error will be returned if an exit_code is already set." +}, +"toolLogs": { +"description": "References to any plain text logs output the tool execution. This field can be set before the tool has exited in order to be able to have access to a live view of the logs while the tool is running. The maximum allowed number of tool logs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list", +"items": { +"$ref": "FileReference" +}, +"type": "array" +}, +"toolOutputs": { +"description": "References to opaque files of any format output by the tool execution. The maximum allowed number of tool outputs per step is 1000. - In response: present if set by create/update request - In create request: optional - In update request: optional, any value provided will be appended to the existing list", +"items": { +"$ref": "ToolOutputReference" +}, +"type": "array" +} +}, +"type": "object" +}, +"ToolExecutionStep": { +"description": "Generic tool step to be used for binaries we do not explicitly support. For example: running cp to copy artifacts from one location to another.", +"id": "ToolExecutionStep", +"properties": { +"toolExecution": { +"$ref": "ToolExecution", +"description": "A Tool execution. - In response: present if set by create/update request - In create/update request: optional" +} +}, +"type": "object" +}, +"ToolExitCode": { +"description": "Exit code from a tool execution.", +"id": "ToolExitCode", +"properties": { +"number": { +"description": "Tool execution exit code. A value of 0 means that the execution was successful. - In response: always set - In create/update request: always set", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"ToolOutputReference": { +"description": "A reference to a ToolExecution output file.", +"id": "ToolOutputReference", +"properties": { +"creationTime": { +"$ref": "Timestamp", +"description": "The creation time of the file. - In response: present if set by create/update request - In create/update request: optional" +}, +"output": { +"$ref": "FileReference", +"description": "A FileReference to an output file. - In response: always set - In create/update request: always set" +}, +"testCase": { +"$ref": "TestCaseReference", +"description": "The test case to which this output file belongs. - In response: present if set by create/update request - In create/update request: optional" +} +}, +"type": "object" +}, +"UIElementTooDeep": { +"description": "A warning that the screen hierarchy is deeper than the recommended threshold.", +"id": "UIElementTooDeep", +"properties": { +"depth": { +"description": "The depth of the screen element", +"format": "int32", +"type": "integer" +}, +"screenId": { +"description": "The screen id of the element", +"type": "string" +}, +"screenStateId": { +"description": "The screen state id of the element", +"type": "string" +} +}, +"type": "object" +}, +"UnspecifiedWarning": { +"description": "Default unspecified warning.", +"id": "UnspecifiedWarning", +"properties": {}, +"type": "object" +}, +"UnusedRoboDirective": { +"description": "Additional details of an unused robodirective.", +"id": "UnusedRoboDirective", +"properties": { +"resourceName": { +"description": "The name of the resource that was unused.", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeInsight": { +"description": "This insight is a recommendation to upgrade a given library to the specified version, in order to avoid dependencies on non-SDK APIs.", +"id": "UpgradeInsight", +"properties": { +"packageName": { +"description": "The name of the package to be upgraded.", +"type": "string" +}, +"upgradeToVersion": { +"description": "The suggested version to upgrade to. Optional: In case we are not sure which version solves this problem", +"type": "string" +} +}, +"type": "object" +}, +"UsedRoboDirective": { +"description": "Additional details of a used Robo directive.", +"id": "UsedRoboDirective", +"properties": { +"resourceName": { +"description": "The name of the resource that was used.", +"type": "string" +} +}, +"type": "object" +}, +"UsedRoboIgnoreDirective": { +"description": "Additional details of a used Robo directive with an ignore action. Note: This is a different scenario than unused directive.", +"id": "UsedRoboIgnoreDirective", +"properties": { +"resourceName": { +"description": "The name of the resource that was ignored.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Tool Results API", +"version": "v1beta3" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..ff57dbaaff3d0171bfffa011a8f59e8557c26bb8 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v1.json @@ -0,0 +1,1211 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://tpu.googleapis.com/", +"batchPath": "batch", +"canonicalName": "TPU", +"description": "TPU API provides customers with access to Google TPU technology.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/tpu/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "tpu:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://tpu.mtls.googleapis.com/", +"name": "tpu", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "tpu.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"acceleratorTypes": { +"methods": { +"get": { +"description": "Gets AcceleratorType.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes/{acceleratorTypesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "AcceleratorType" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists accelerator types supported by this API.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/acceleratorTypes", +"response": { +"$ref": "ListAcceleratorTypesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a node.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"nodeId": { +"description": "The unqualified resource name.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/nodes", +"request": { +"$ref": "Node" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a node.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Node" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/nodes", +"response": { +"$ref": "ListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reimage": { +"description": "Reimages a node's OS.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:reimage", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.reimage", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:reimage", +"request": { +"$ref": "ReimageNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts a node.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:start", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:start", +"request": { +"$ref": "StartNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a node, this operation is only available with single TPU nodes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:stop", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:stop", +"request": { +"$ref": "StopNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "tpu.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tensorflowVersions": { +"methods": { +"get": { +"description": "Gets TensorFlow Version.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tensorflowVersions/{tensorflowVersionsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.tensorflowVersions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tensorflowVersions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "TensorFlowVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List TensorFlow versions supported by this API.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/tensorflowVersions", +"httpMethod": "GET", +"id": "tpu.projects.locations.tensorflowVersions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/tensorflowVersions", +"response": { +"$ref": "ListTensorFlowVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://tpu.googleapis.com/", +"schemas": { +"AcceleratorType": { +"description": "A accelerator type that a Node can be configured with.", +"id": "AcceleratorType", +"properties": { +"name": { +"description": "The resource name.", +"type": "string" +}, +"type": { +"description": "the accelerator type.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ListAcceleratorTypesResponse": { +"description": "Response for ListAcceleratorTypes.", +"id": "ListAcceleratorTypesResponse", +"properties": { +"acceleratorTypes": { +"description": "The listed nodes.", +"items": { +"$ref": "AcceleratorType" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListNodesResponse": { +"description": "Response for ListNodes.", +"id": "ListNodesResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"nodes": { +"description": "The listed nodes.", +"items": { +"$ref": "Node" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTensorFlowVersionsResponse": { +"description": "Response for ListTensorFlowVersions.", +"id": "ListTensorFlowVersionsResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"tensorflowVersions": { +"description": "The listed nodes.", +"items": { +"$ref": "TensorFlowVersion" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"NetworkEndpoint": { +"description": "A network endpoint over which a TPU worker can be reached.", +"id": "NetworkEndpoint", +"properties": { +"ipAddress": { +"description": "The IP address of this network endpoint.", +"type": "string" +}, +"port": { +"description": "The port of this network endpoint.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Node": { +"description": "A TPU instance.", +"id": "Node", +"properties": { +"acceleratorType": { +"description": "Required. The type of hardware accelerators associated with this node.", +"type": "string" +}, +"apiVersion": { +"description": "Output only. The API version that created this Node.", +"enum": [ +"API_VERSION_UNSPECIFIED", +"V1_ALPHA1", +"V1", +"V2_ALPHA1" +], +"enumDescriptions": [ +"API version is unknown.", +"TPU API V1Alpha1 version.", +"TPU API V1 version.", +"TPU API V2Alpha1 version." +], +"readOnly": true, +"type": "string" +}, +"cidrBlock": { +"description": "The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the node was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "The user-supplied description of the TPU. Maximum of 512 characters.", +"type": "string" +}, +"health": { +"description": "The health status of the TPU node.", +"enum": [ +"HEALTH_UNSPECIFIED", +"HEALTHY", +"DEPRECATED_UNHEALTHY", +"TIMEOUT", +"UNHEALTHY_TENSORFLOW", +"UNHEALTHY_MAINTENANCE" +], +"enumDescriptions": [ +"Health status is unknown: not initialized or failed to retrieve.", +"The resource is healthy.", +"The resource is unhealthy.", +"The resource is unresponsive.", +"The in-guest ML stack is unhealthy.", +"The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled." +], +"type": "string" +}, +"healthDescription": { +"description": "Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.", +"readOnly": true, +"type": "string" +}, +"ipAddress": { +"deprecated": true, +"description": "Output only. DEPRECATED! Use network_endpoints instead. The network address for the TPU Node as visible to Compute Engine instances.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user-provided metadata.", +"type": "object" +}, +"name": { +"description": "Output only. Immutable. The name of the TPU", +"readOnly": true, +"type": "string" +}, +"network": { +"description": "The name of a network they wish to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, \"default\" will be used.", +"type": "string" +}, +"networkEndpoints": { +"description": "Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node reach out to the 0th entry in this map first.", +"items": { +"$ref": "NetworkEndpoint" +}, +"readOnly": true, +"type": "array" +}, +"port": { +"deprecated": true, +"description": "Output only. DEPRECATED! Use network_endpoints instead. The network port for the TPU Node as visible to Compute Engine instances.", +"type": "string" +}, +"schedulingConfig": { +"$ref": "SchedulingConfig", +"description": "The scheduling options for this node." +}, +"serviceAccount": { +"description": "Output only. The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current state for the TPU Node.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY", +"RESTARTING", +"REIMAGING", +"DELETING", +"REPAIRING", +"STOPPED", +"STOPPING", +"STARTING", +"PREEMPTED", +"TERMINATED", +"HIDING", +"HIDDEN", +"UNHIDING" +], +"enumDescriptions": [ +"TPU node state is not known/set.", +"TPU node is being created.", +"TPU node has been created.", +"TPU node is restarting.", +"TPU node is undergoing reimaging.", +"TPU node is being deleted.", +"TPU node is being repaired and may be unusable. Details can be found in the `help_description` field.", +"TPU node is stopped.", +"TPU node is currently stopping.", +"TPU node is currently starting.", +"TPU node has been preempted. Only applies to Preemptible TPU Nodes.", +"TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", +"TPU node is currently hiding.", +"TPU node has been hidden.", +"TPU node is currently unhiding." +], +"readOnly": true, +"type": "string" +}, +"symptoms": { +"description": "Output only. The Symptoms that have occurred to the TPU Node.", +"items": { +"$ref": "Symptom" +}, +"readOnly": true, +"type": "array" +}, +"tensorflowVersion": { +"description": "Required. The version of Tensorflow running in the Node.", +"type": "string" +}, +"useServiceNetworking": { +"description": "Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network, that you want to peer the TPU Node to, is Shared VPC networks, the node must be created with this this field enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata describing an Operation", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version.", +"type": "string" +}, +"cancelRequested": { +"description": "Specifies if cancellation was requested for the operation.", +"type": "boolean" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"statusDetail": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Target of the operation - for example projects/project-1/connectivityTests/test-1", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"ReimageNodeRequest": { +"description": "Request for ReimageNode.", +"id": "ReimageNodeRequest", +"properties": { +"tensorflowVersion": { +"description": "The version for reimage to create.", +"type": "string" +} +}, +"type": "object" +}, +"SchedulingConfig": { +"description": "Sets the scheduling options for this node.", +"id": "SchedulingConfig", +"properties": { +"preemptible": { +"description": "Defines whether the node is preemptible.", +"type": "boolean" +}, +"reserved": { +"description": "Whether the node is created under a reservation.", +"type": "boolean" +} +}, +"type": "object" +}, +"StartNodeRequest": { +"description": "Request for StartNode.", +"id": "StartNodeRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopNodeRequest": { +"description": "Request for StopNode.", +"id": "StopNodeRequest", +"properties": {}, +"type": "object" +}, +"Symptom": { +"description": "A Symptom instance.", +"id": "Symptom", +"properties": { +"createTime": { +"description": "Timestamp when the Symptom is created.", +"format": "google-datetime", +"type": "string" +}, +"details": { +"description": "Detailed information of the current Symptom.", +"type": "string" +}, +"symptomType": { +"description": "Type of the Symptom.", +"enum": [ +"SYMPTOM_TYPE_UNSPECIFIED", +"LOW_MEMORY", +"OUT_OF_MEMORY", +"EXECUTE_TIMED_OUT", +"MESH_BUILD_FAIL", +"HBM_OUT_OF_MEMORY", +"PROJECT_ABUSE" +], +"enumDescriptions": [ +"Unspecified symptom.", +"TPU VM memory is low.", +"TPU runtime is out of memory.", +"TPU runtime execution has timed out.", +"TPU runtime fails to construct a mesh that recognizes each TPU device's neighbors.", +"TPU HBM is out of memory.", +"Abusive behaviors have been identified on the current project." +], +"type": "string" +}, +"workerId": { +"description": "A string used to uniquely distinguish a worker within a TPU node.", +"type": "string" +} +}, +"type": "object" +}, +"TensorFlowVersion": { +"description": "A tensorflow version that a Node can be configured with.", +"id": "TensorFlowVersion", +"properties": { +"name": { +"description": "The resource name.", +"type": "string" +}, +"version": { +"description": "the tensorflow version.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud TPU API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..87bf1fa80f024b1a231107476154d275e00a7de7 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v1alpha1.json @@ -0,0 +1,1221 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://tpu.googleapis.com/", +"batchPath": "batch", +"canonicalName": "TPU", +"description": "TPU API provides customers with access to Google TPU technology.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/tpu/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "tpu:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://tpu.mtls.googleapis.com/", +"name": "tpu", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1alpha1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "tpu.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"acceleratorTypes": { +"methods": { +"get": { +"description": "Gets AcceleratorType.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes/{acceleratorTypesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "AcceleratorType" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists accelerator types supported by this API.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/acceleratorTypes", +"response": { +"$ref": "ListAcceleratorTypesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a node.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"nodeId": { +"description": "The unqualified resource name.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"request": { +"$ref": "Node" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a node.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Node" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/nodes", +"response": { +"$ref": "ListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reimage": { +"description": "Reimages a node's OS.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:reimage", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.reimage", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:reimage", +"request": { +"$ref": "ReimageNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts a node.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:start", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:start", +"request": { +"$ref": "StartNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a node. This operation is only available with single TPU nodes.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:stop", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:stop", +"request": { +"$ref": "StopNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "tpu.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"tensorflowVersions": { +"methods": { +"get": { +"description": "Gets TensorFlow Version.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/tensorflowVersions/{tensorflowVersionsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.tensorflowVersions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/tensorflowVersions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "TensorFlowVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TensorFlow versions supported by this API.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/tensorflowVersions", +"httpMethod": "GET", +"id": "tpu.projects.locations.tensorflowVersions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/tensorflowVersions", +"response": { +"$ref": "ListTensorFlowVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://tpu.googleapis.com/", +"schemas": { +"AcceleratorType": { +"description": "A accelerator type that a Node can be configured with.", +"id": "AcceleratorType", +"properties": { +"name": { +"description": "The resource name.", +"type": "string" +}, +"type": { +"description": "the accelerator type.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ListAcceleratorTypesResponse": { +"description": "Response for ListAcceleratorTypes.", +"id": "ListAcceleratorTypesResponse", +"properties": { +"acceleratorTypes": { +"description": "The listed nodes.", +"items": { +"$ref": "AcceleratorType" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListNodesResponse": { +"description": "Response for ListNodes.", +"id": "ListNodesResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"nodes": { +"description": "The listed nodes.", +"items": { +"$ref": "Node" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTensorFlowVersionsResponse": { +"description": "Response for ListTensorFlowVersions.", +"id": "ListTensorFlowVersionsResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"tensorflowVersions": { +"description": "The listed nodes.", +"items": { +"$ref": "TensorFlowVersion" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"NetworkEndpoint": { +"description": "A network endpoint over which a TPU worker can be reached.", +"id": "NetworkEndpoint", +"properties": { +"ipAddress": { +"description": "The IP address of this network endpoint.", +"type": "string" +}, +"port": { +"description": "The port of this network endpoint.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Node": { +"description": "A TPU instance.", +"id": "Node", +"properties": { +"acceleratorType": { +"description": "Required. The type of hardware accelerators associated with this node.", +"type": "string" +}, +"apiVersion": { +"description": "Output only. The API version that created this Node.", +"enum": [ +"API_VERSION_UNSPECIFIED", +"V1_ALPHA1", +"V1", +"V2_ALPHA1" +], +"enumDescriptions": [ +"API version is unknown.", +"TPU API V1Alpha1 version.", +"TPU API V1 version.", +"TPU API V2Alpha1 version." +], +"readOnly": true, +"type": "string" +}, +"cidrBlock": { +"description": "The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the node was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "The user-supplied description of the TPU. Maximum of 512 characters.", +"type": "string" +}, +"health": { +"description": "The health status of the TPU node.", +"enum": [ +"HEALTH_UNSPECIFIED", +"HEALTHY", +"DEPRECATED_UNHEALTHY", +"TIMEOUT", +"UNHEALTHY_TENSORFLOW", +"UNHEALTHY_MAINTENANCE" +], +"enumDescriptions": [ +"Health status is unknown: not initialized or failed to retrieve.", +"The resource is healthy.", +"The resource is unhealthy.", +"The resource is unresponsive.", +"The in-guest ML stack is unhealthy.", +"The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled." +], +"type": "string" +}, +"healthDescription": { +"description": "Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.", +"readOnly": true, +"type": "string" +}, +"ipAddress": { +"deprecated": true, +"description": "Output only. DEPRECATED! Use network_endpoints instead. The network address for the TPU Node as visible to Compute Engine instances.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user-provided metadata.", +"type": "object" +}, +"name": { +"description": "Output only. Immutable. The name of the TPU", +"readOnly": true, +"type": "string" +}, +"network": { +"description": "The name of a network they wish to peer the TPU node to. It must be a preexisting Compute Engine network inside of the project on which this API has been activated. If none is provided, \"default\" will be used.", +"type": "string" +}, +"networkEndpoints": { +"description": "Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that Tensorflow clients of the node reach out to the 0th entry in this map first.", +"items": { +"$ref": "NetworkEndpoint" +}, +"readOnly": true, +"type": "array" +}, +"port": { +"deprecated": true, +"description": "Output only. DEPRECATED! Use network_endpoints instead. The network port for the TPU Node as visible to Compute Engine instances.", +"type": "string" +}, +"schedulingConfig": { +"$ref": "SchedulingConfig", +"description": "The scheduling options for this node." +}, +"serviceAccount": { +"description": "Output only. The service account used to run the tensor flow services within the node. To share resources, including Google Cloud Storage data, with the Tensorflow job running in the Node, this account must have permissions to that data.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current state for the TPU Node.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY", +"RESTARTING", +"REIMAGING", +"DELETING", +"REPAIRING", +"STOPPED", +"STOPPING", +"STARTING", +"PREEMPTED", +"TERMINATED", +"HIDING", +"HIDDEN", +"UNHIDING" +], +"enumDescriptions": [ +"TPU node state is not known/set.", +"TPU node is being created.", +"TPU node has been created.", +"TPU node is restarting.", +"TPU node is undergoing reimaging.", +"TPU node is being deleted.", +"TPU node is being repaired and may be unusable. Details can be found in the `help_description` field.", +"TPU node is stopped.", +"TPU node is currently stopping.", +"TPU node is currently starting.", +"TPU node has been preempted. Only applies to Preemptible TPU Nodes.", +"TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", +"TPU node is currently hiding.", +"TPU node has been hidden.", +"TPU node is currently unhiding." +], +"readOnly": true, +"type": "string" +}, +"symptoms": { +"description": "Output only. The Symptoms that have occurred to the TPU Node.", +"items": { +"$ref": "Symptom" +}, +"readOnly": true, +"type": "array" +}, +"tensorflowVersion": { +"description": "Required. The version of Tensorflow running in the Node.", +"type": "string" +}, +"useServiceNetworking": { +"description": "Whether the VPC peering for the node is set up through Service Networking API. The VPC Peering should be set up before provisioning the node. If this field is set, cidr_block field should not be specified. If the network, that you want to peer the TPU Node to, is Shared VPC networks, the node must be created with this this field enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata describing an Operation", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version.", +"type": "string" +}, +"cancelRequested": { +"description": "Specifies if cancellation was requested for the operation.", +"type": "boolean" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"statusDetail": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Target of the operation - for example projects/project-1/connectivityTests/test-1", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"ReimageNodeRequest": { +"description": "Request for ReimageNode.", +"id": "ReimageNodeRequest", +"properties": { +"tensorflowVersion": { +"description": "The version for reimage to create.", +"type": "string" +} +}, +"type": "object" +}, +"SchedulingConfig": { +"description": "Sets the scheduling options for this node.", +"id": "SchedulingConfig", +"properties": { +"preemptible": { +"description": "Defines whether the node is preemptible.", +"type": "boolean" +}, +"reserved": { +"description": "Whether the node is created under a reservation.", +"type": "boolean" +} +}, +"type": "object" +}, +"StartNodeRequest": { +"description": "Request for StartNode.", +"id": "StartNodeRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopNodeRequest": { +"description": "Request for StopNode.", +"id": "StopNodeRequest", +"properties": {}, +"type": "object" +}, +"Symptom": { +"description": "A Symptom instance.", +"id": "Symptom", +"properties": { +"createTime": { +"description": "Timestamp when the Symptom is created.", +"format": "google-datetime", +"type": "string" +}, +"details": { +"description": "Detailed information of the current Symptom.", +"type": "string" +}, +"symptomType": { +"description": "Type of the Symptom.", +"enum": [ +"SYMPTOM_TYPE_UNSPECIFIED", +"LOW_MEMORY", +"OUT_OF_MEMORY", +"EXECUTE_TIMED_OUT", +"MESH_BUILD_FAIL", +"HBM_OUT_OF_MEMORY", +"PROJECT_ABUSE" +], +"enumDescriptions": [ +"Unspecified symptom.", +"TPU VM memory is low.", +"TPU runtime is out of memory.", +"TPU runtime execution has timed out.", +"TPU runtime fails to construct a mesh that recognizes each TPU device's neighbors.", +"TPU HBM is out of memory.", +"Abusive behaviors have been identified on the current project." +], +"type": "string" +}, +"workerId": { +"description": "A string used to uniquely distinguish a worker within a TPU node.", +"type": "string" +} +}, +"type": "object" +}, +"TensorFlowVersion": { +"description": "A tensorflow version that a Node can be configured with.", +"id": "TensorFlowVersion", +"properties": { +"name": { +"description": "The resource name.", +"type": "string" +}, +"version": { +"description": "the tensorflow version.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud TPU API", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..004bb1ed777d66994a937741c5b751c3d908e8f9 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v2.json @@ -0,0 +1,2042 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://tpu.googleapis.com/", +"batchPath": "batch", +"canonicalName": "TPU", +"description": "TPU API provides customers with access to Google TPU technology.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/tpu/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "tpu:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://tpu.mtls.googleapis.com/", +"name": "tpu", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"generateServiceIdentity": { +"description": "Generates the Cloud TPU service identity for the project.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}:generateServiceIdentity", +"httpMethod": "POST", +"id": "tpu.projects.locations.generateServiceIdentity", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}:generateServiceIdentity", +"request": { +"$ref": "GenerateServiceIdentityRequest" +}, +"response": { +"$ref": "GenerateServiceIdentityResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a location.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v2/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "tpu.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"acceleratorTypes": { +"methods": { +"get": { +"description": "Gets AcceleratorType.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/acceleratorTypes/{acceleratorTypesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "AcceleratorType" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists accelerator types supported by this API.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/acceleratorTypes", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/acceleratorTypes", +"response": { +"$ref": "ListAcceleratorTypesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a node.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"nodeId": { +"description": "The unqualified resource name.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/nodes", +"request": { +"$ref": "Node" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a node.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Node" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getGuestAttributes": { +"description": "Retrieves the guest attributes for the node.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getGuestAttributes", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.getGuestAttributes", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:getGuestAttributes", +"request": { +"$ref": "GetGuestAttributesRequest" +}, +"response": { +"$ref": "GetGuestAttributesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/nodes", +"response": { +"$ref": "ListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the configurations of a node.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "PATCH", +"id": "tpu.projects.locations.nodes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Immutable. The name of the TPU.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"request": { +"$ref": "Node" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts a node.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:start", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:start", +"request": { +"$ref": "StartNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a node. This operation is only available with single TPU nodes.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:stop", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:stop", +"request": { +"$ref": "StopNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "tpu.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"queuedResources": { +"methods": { +"create": { +"description": "Creates a QueuedResource TPU instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queuedResources", +"httpMethod": "POST", +"id": "tpu.projects.locations.queuedResources.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"queuedResourceId": { +"description": "Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.", +"location": "query", +"type": "string" +}, +"requestId": { +"description": "Optional. Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+parent}/queuedResources", +"request": { +"$ref": "QueuedResource" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a QueuedResource TPU instance.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queuedResources/{queuedResourcesId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.queuedResources.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Optional. If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a queued resource.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queuedResources/{queuedResourcesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.queuedResources.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "QueuedResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists queued resources.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queuedResources", +"httpMethod": "GET", +"id": "tpu.projects.locations.queuedResources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/queuedResources", +"response": { +"$ref": "ListQueuedResourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reset": { +"description": "Resets a QueuedResource TPU instance", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/queuedResources/{queuedResourcesId}:reset", +"httpMethod": "POST", +"id": "tpu.projects.locations.queuedResources.reset", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the queued resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}:reset", +"request": { +"$ref": "ResetQueuedResourceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"runtimeVersions": { +"methods": { +"get": { +"description": "Gets a runtime version.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimeVersions/{runtimeVersionsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.runtimeVersions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimeVersions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+name}", +"response": { +"$ref": "RuntimeVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists runtime versions supported by this API.", +"flatPath": "v2/projects/{projectsId}/locations/{locationsId}/runtimeVersions", +"httpMethod": "GET", +"id": "tpu.projects.locations.runtimeVersions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2/{+parent}/runtimeVersions", +"response": { +"$ref": "ListRuntimeVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://tpu.googleapis.com/", +"schemas": { +"AcceleratorConfig": { +"description": "A TPU accelerator configuration.", +"id": "AcceleratorConfig", +"properties": { +"topology": { +"description": "Required. Topology of TPU in chips.", +"type": "string" +}, +"type": { +"description": "Required. Type of TPU.", +"enum": [ +"TYPE_UNSPECIFIED", +"V2", +"V3", +"V4", +"V5P" +], +"enumDescriptions": [ +"Unspecified version.", +"TPU v2.", +"TPU v3.", +"TPU v4.", +"TPU v5p" +], +"type": "string" +} +}, +"type": "object" +}, +"AcceleratorType": { +"description": "A accelerator type that a Node can be configured with.", +"id": "AcceleratorType", +"properties": { +"acceleratorConfigs": { +"description": "The accelerator config.", +"items": { +"$ref": "AcceleratorConfig" +}, +"type": "array" +}, +"name": { +"description": "The resource name.", +"type": "string" +}, +"type": { +"description": "The accelerator type.", +"type": "string" +} +}, +"type": "object" +}, +"AcceptedData": { +"description": "Further data for the accepted state.", +"id": "AcceptedData", +"properties": {}, +"type": "object" +}, +"AccessConfig": { +"description": "An access config attached to the TPU worker.", +"id": "AccessConfig", +"properties": { +"externalIp": { +"description": "Output only. An external IP address associated with the TPU worker.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ActiveData": { +"description": "Further data for the active state.", +"id": "ActiveData", +"properties": {}, +"type": "object" +}, +"AttachedDisk": { +"description": "A node-attached disk resource. Next ID: 8;", +"id": "AttachedDisk", +"properties": { +"mode": { +"description": "The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks.", +"enum": [ +"DISK_MODE_UNSPECIFIED", +"READ_WRITE", +"READ_ONLY" +], +"enumDescriptions": [ +"The disk mode is not known/set.", +"Attaches the disk in read-write mode. Only one TPU node can attach a disk in read-write mode at a time.", +"Attaches the disk in read-only mode. Multiple TPU nodes can attach a disk in read-only mode at a time." +], +"type": "string" +}, +"sourceDisk": { +"description": "Specifies the full path to an existing disk. For example: \"projects/my-project/zones/us-central1-c/disks/my-disk\".", +"type": "string" +} +}, +"type": "object" +}, +"CreatingData": { +"description": "Further data for the creating state.", +"id": "CreatingData", +"properties": {}, +"type": "object" +}, +"DeletingData": { +"description": "Further data for the deleting state.", +"id": "DeletingData", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"FailedData": { +"description": "Further data for the failed state.", +"id": "FailedData", +"properties": { +"error": { +"$ref": "Status", +"description": "Output only. The error that caused the queued resource to enter the FAILED state.", +"readOnly": true +} +}, +"type": "object" +}, +"GenerateServiceIdentityRequest": { +"description": "Request for GenerateServiceIdentity.", +"id": "GenerateServiceIdentityRequest", +"properties": {}, +"type": "object" +}, +"GenerateServiceIdentityResponse": { +"description": "Response for GenerateServiceIdentity.", +"id": "GenerateServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "ServiceIdentity", +"description": "ServiceIdentity that was created or retrieved." +} +}, +"type": "object" +}, +"GetGuestAttributesRequest": { +"description": "Request for GetGuestAttributes.", +"id": "GetGuestAttributesRequest", +"properties": { +"queryPath": { +"description": "The guest attributes path to be queried.", +"type": "string" +}, +"workerIds": { +"description": "The 0-based worker ID. If it is empty, all workers' GuestAttributes will be returned.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GetGuestAttributesResponse": { +"description": "Response for GetGuestAttributes.", +"id": "GetGuestAttributesResponse", +"properties": { +"guestAttributes": { +"description": "The guest attributes for the TPU workers.", +"items": { +"$ref": "GuestAttributes" +}, +"type": "array" +} +}, +"type": "object" +}, +"Guaranteed": { +"description": "Guaranteed tier definition.", +"id": "Guaranteed", +"properties": { +"minDuration": { +"description": "Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GuestAttributes": { +"description": "A guest attributes.", +"id": "GuestAttributes", +"properties": { +"queryPath": { +"description": "The path to be queried. This can be the default namespace ('/') or a nested namespace ('/\\/') or a specified key ('/\\/\\')", +"type": "string" +}, +"queryValue": { +"$ref": "GuestAttributesValue", +"description": "The value of the requested queried path." +} +}, +"type": "object" +}, +"GuestAttributesEntry": { +"description": "A guest attributes namespace/key/value entry.", +"id": "GuestAttributesEntry", +"properties": { +"key": { +"description": "Key for the guest attribute entry.", +"type": "string" +}, +"namespace": { +"description": "Namespace for the guest attribute entry.", +"type": "string" +}, +"value": { +"description": "Value for the guest attribute entry.", +"type": "string" +} +}, +"type": "object" +}, +"GuestAttributesValue": { +"description": "Array of guest attribute namespace/key/value tuples.", +"id": "GuestAttributesValue", +"properties": { +"items": { +"description": "The list of guest attributes entries.", +"items": { +"$ref": "GuestAttributesEntry" +}, +"type": "array" +} +}, +"type": "object" +}, +"Interval": { +"description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", +"id": "Interval", +"properties": { +"endTime": { +"description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ListAcceleratorTypesResponse": { +"description": "Response for ListAcceleratorTypes.", +"id": "ListAcceleratorTypesResponse", +"properties": { +"acceleratorTypes": { +"description": "The listed nodes.", +"items": { +"$ref": "AcceleratorType" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListNodesResponse": { +"description": "Response for ListNodes.", +"id": "ListNodesResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"nodes": { +"description": "The listed nodes.", +"items": { +"$ref": "Node" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListQueuedResourcesResponse": { +"description": "Response for ListQueuedResources.", +"id": "ListQueuedResourcesResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"queuedResources": { +"description": "The listed queued resources.", +"items": { +"$ref": "QueuedResource" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListRuntimeVersionsResponse": { +"description": "Response for ListRuntimeVersions.", +"id": "ListRuntimeVersionsResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"runtimeVersions": { +"description": "The listed nodes.", +"items": { +"$ref": "RuntimeVersion" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"MultisliceParams": { +"description": "Parameters to specify for multislice QueuedResource requests. This message must be populated in case of multislice requests instead of node_id.", +"id": "MultisliceParams", +"properties": { +"nodeCount": { +"description": "Required. Number of nodes with this spec. The system will attempt to provison \"node_count\" nodes as part of the request. This needs to be > 1.", +"format": "int32", +"type": "integer" +}, +"nodeIdPrefix": { +"description": "Optional. Prefix of node_ids in case of multislice request. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and node_id_prefix = \"np\", node ids of nodes created will be \"np-0\", \"np-1\", \"np-2\". If this field is not provided we use queued_resource_id as the node_id_prefix.", +"type": "string" +} +}, +"type": "object" +}, +"NetworkConfig": { +"description": "Network related configurations.", +"id": "NetworkConfig", +"properties": { +"canIpForward": { +"description": "Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.", +"type": "boolean" +}, +"enableExternalIps": { +"description": "Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.", +"type": "boolean" +}, +"network": { +"description": "The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, \"default\" will be used.", +"type": "string" +}, +"queueCount": { +"description": "Optional. Specifies networking queue count for TPU VM instance's network interface.", +"format": "int32", +"type": "integer" +}, +"subnetwork": { +"description": "The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, \"default\" will be used.", +"type": "string" +} +}, +"type": "object" +}, +"NetworkEndpoint": { +"description": "A network endpoint over which a TPU worker can be reached.", +"id": "NetworkEndpoint", +"properties": { +"accessConfig": { +"$ref": "AccessConfig", +"description": "The access config for the TPU worker." +}, +"ipAddress": { +"description": "The internal IP address of this network endpoint.", +"type": "string" +}, +"port": { +"description": "The port of this network endpoint.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Node": { +"description": "A TPU instance.", +"id": "Node", +"properties": { +"acceleratorConfig": { +"$ref": "AcceleratorConfig", +"description": "The AccleratorConfig for the TPU Node." +}, +"acceleratorType": { +"description": "Optional. The type of hardware accelerators associated with this node.", +"type": "string" +}, +"apiVersion": { +"description": "Output only. The API version that created this Node.", +"enum": [ +"API_VERSION_UNSPECIFIED", +"V1_ALPHA1", +"V1", +"V2_ALPHA1", +"V2" +], +"enumDescriptions": [ +"API version is unknown.", +"TPU API V1Alpha1 version.", +"TPU API V1 version.", +"TPU API V2Alpha1 version.", +"TPU API V2 version." +], +"readOnly": true, +"type": "string" +}, +"cidrBlock": { +"description": "The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the node was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataDisks": { +"description": "The additional data disks for the Node.", +"items": { +"$ref": "AttachedDisk" +}, +"type": "array" +}, +"description": { +"description": "The user-supplied description of the TPU. Maximum of 512 characters.", +"type": "string" +}, +"health": { +"description": "The health status of the TPU node.", +"enum": [ +"HEALTH_UNSPECIFIED", +"HEALTHY", +"TIMEOUT", +"UNHEALTHY_TENSORFLOW", +"UNHEALTHY_MAINTENANCE" +], +"enumDescriptions": [ +"Health status is unknown: not initialized or failed to retrieve.", +"The resource is healthy.", +"The resource is unresponsive.", +"The in-guest ML stack is unhealthy.", +"The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled." +], +"type": "string" +}, +"healthDescription": { +"description": "Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. The unique identifier for the TPU Node.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user-provided metadata.", +"type": "object" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script", +"type": "object" +}, +"multisliceNode": { +"description": "Output only. Whether the Node belongs to a Multislice group.", +"readOnly": true, +"type": "boolean" +}, +"name": { +"description": "Output only. Immutable. The name of the TPU.", +"readOnly": true, +"type": "string" +}, +"networkConfig": { +"$ref": "NetworkConfig", +"description": "Network configurations for the TPU node." +}, +"networkEndpoints": { +"description": "Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.", +"items": { +"$ref": "NetworkEndpoint" +}, +"readOnly": true, +"type": "array" +}, +"queuedResource": { +"description": "Output only. The qualified name of the QueuedResource that requested this Node.", +"readOnly": true, +"type": "string" +}, +"runtimeVersion": { +"description": "Required. The runtime version running in the Node.", +"type": "string" +}, +"schedulingConfig": { +"$ref": "SchedulingConfig", +"description": "The scheduling options for this node." +}, +"serviceAccount": { +"$ref": "ServiceAccount", +"description": "The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used." +}, +"shieldedInstanceConfig": { +"$ref": "ShieldedInstanceConfig", +"description": "Shielded Instance options." +}, +"state": { +"description": "Output only. The current state for the TPU Node.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY", +"RESTARTING", +"REIMAGING", +"DELETING", +"REPAIRING", +"STOPPED", +"STOPPING", +"STARTING", +"PREEMPTED", +"TERMINATED", +"HIDING", +"HIDDEN", +"UNHIDING" +], +"enumDescriptions": [ +"TPU node state is not known/set.", +"TPU node is being created.", +"TPU node has been created.", +"TPU node is restarting.", +"TPU node is undergoing reimaging.", +"TPU node is being deleted.", +"TPU node is being repaired and may be unusable. Details can be found in the 'help_description' field.", +"TPU node is stopped.", +"TPU node is currently stopping.", +"TPU node is currently starting.", +"TPU node has been preempted. Only applies to Preemptible TPU Nodes.", +"TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", +"TPU node is currently hiding.", +"TPU node has been hidden.", +"TPU node is currently unhiding." +], +"readOnly": true, +"type": "string" +}, +"symptoms": { +"description": "Output only. The Symptoms that have occurred to the TPU Node.", +"items": { +"$ref": "Symptom" +}, +"readOnly": true, +"type": "array" +}, +"tags": { +"description": "Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"NodeSpec": { +"description": "Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created.", +"id": "NodeSpec", +"properties": { +"multisliceParams": { +"$ref": "MultisliceParams", +"description": "Optional. Fields to specify in case of multislice request." +}, +"node": { +"$ref": "Node", +"description": "Required. The node." +}, +"nodeId": { +"description": "Optional. The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multislice requests, multislice_params must be populated instead.", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata describing an Operation", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version.", +"type": "string" +}, +"cancelRequested": { +"description": "Specifies if cancellation was requested for the operation.", +"type": "boolean" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"statusDetail": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Target of the operation - for example projects/project-1/connectivityTests/test-1", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"ProvisioningData": { +"description": "Further data for the provisioning state.", +"id": "ProvisioningData", +"properties": {}, +"type": "object" +}, +"QueuedResource": { +"description": "A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.", +"id": "QueuedResource", +"properties": { +"createTime": { +"description": "Output only. The time when the QueuedResource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"guaranteed": { +"$ref": "Guaranteed", +"description": "Optional. The Guaranteed tier" +}, +"name": { +"description": "Output only. Immutable. The name of the QueuedResource.", +"readOnly": true, +"type": "string" +}, +"queueingPolicy": { +"$ref": "QueueingPolicy", +"description": "Optional. The queueing policy of the QueuedRequest." +}, +"reservationName": { +"description": "Optional. Name of the reservation in which the resource should be provisioned. Format: projects/{project}/locations/{zone}/reservations/{reservation}", +"type": "string" +}, +"spot": { +"$ref": "Spot", +"description": "Optional. The Spot tier." +}, +"state": { +"$ref": "QueuedResourceState", +"description": "Output only. State of the QueuedResource request.", +"readOnly": true +}, +"tpu": { +"$ref": "Tpu", +"description": "Optional. Defines a TPU resource." +} +}, +"type": "object" +}, +"QueuedResourceState": { +"description": "QueuedResourceState defines the details of the QueuedResource request.", +"id": "QueuedResourceState", +"properties": { +"acceptedData": { +"$ref": "AcceptedData", +"description": "Output only. Further data for the accepted state.", +"readOnly": true +}, +"activeData": { +"$ref": "ActiveData", +"description": "Output only. Further data for the active state.", +"readOnly": true +}, +"creatingData": { +"$ref": "CreatingData", +"description": "Output only. Further data for the creating state.", +"readOnly": true +}, +"deletingData": { +"$ref": "DeletingData", +"description": "Output only. Further data for the deleting state.", +"readOnly": true +}, +"failedData": { +"$ref": "FailedData", +"description": "Output only. Further data for the failed state.", +"readOnly": true +}, +"provisioningData": { +"$ref": "ProvisioningData", +"description": "Output only. Further data for the provisioning state.", +"readOnly": true +}, +"state": { +"description": "Output only. State of the QueuedResource request.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACCEPTED", +"PROVISIONING", +"FAILED", +"DELETING", +"ACTIVE", +"SUSPENDING", +"SUSPENDED", +"WAITING_FOR_RESOURCES" +], +"enumDescriptions": [ +"State of the QueuedResource request is not known/set.", +"The QueuedResource request has been received. We're still working on determining if we will be able to honor this request.", +"The QueuedResource request has passed initial validation/admission control and has been persisted in the queue.", +"The QueuedResource request has been selected. The associated resources are currently being provisioned (or very soon will begin provisioning).", +"The request could not be completed. This may be due to some late-discovered problem with the request itself, or due to unavailability of resources within the constraints of the request (e.g., the 'valid until' start timing constraint expired).", +"The QueuedResource is being deleted.", +"The resources specified in the QueuedResource request have been provisioned and are ready for use by the end-user/consumer.", +"The resources specified in the QueuedResource request are being deleted. This may have been initiated by the user, or the Cloud TPU service. Inspect the state data for more details.", +"The resources specified in the QueuedResource request have been deleted.", +"The QueuedResource request has passed initial validation and has been persisted in the queue. It will remain in this state until there are sufficient free resources to begin provisioning your request. Wait times will vary significantly depending on demand levels. When demand is high, not all requests can be immediately provisioned. If you need more reliable obtainability of TPUs consider purchasing a reservation. To put a limit on how long you are willing to wait, use [timing constraints](https://cloud.google.com/tpu/docs/queued-resources#request_a_queued_resource_before_a_specified_time)." +], +"readOnly": true, +"type": "string" +}, +"stateInitiator": { +"description": "Output only. The initiator of the QueuedResources's current state. Used to indicate whether the SUSPENDING/SUSPENDED state was initiated by the user or the service.", +"enum": [ +"STATE_INITIATOR_UNSPECIFIED", +"USER", +"SERVICE" +], +"enumDescriptions": [ +"The state initiator is unspecified.", +"The current QueuedResource state was initiated by the user.", +"The current QueuedResource state was initiated by the service." +], +"readOnly": true, +"type": "string" +}, +"suspendedData": { +"$ref": "SuspendedData", +"description": "Output only. Further data for the suspended state.", +"readOnly": true +}, +"suspendingData": { +"$ref": "SuspendingData", +"description": "Output only. Further data for the suspending state.", +"readOnly": true +} +}, +"type": "object" +}, +"QueueingPolicy": { +"description": "Defines the policy of the QueuedRequest.", +"id": "QueueingPolicy", +"properties": { +"validAfterDuration": { +"description": "Optional. A relative time after which resources may be created.", +"format": "google-duration", +"type": "string" +}, +"validAfterTime": { +"description": "Optional. An absolute time after which resources may be created.", +"format": "google-datetime", +"type": "string" +}, +"validInterval": { +"$ref": "Interval", +"description": "Optional. An absolute time interval within which resources may be created." +}, +"validUntilDuration": { +"description": "Optional. A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.", +"format": "google-duration", +"type": "string" +}, +"validUntilTime": { +"description": "Optional. An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ResetQueuedResourceRequest": { +"description": "Request for ResetQueuedResource.", +"id": "ResetQueuedResourceRequest", +"properties": {}, +"type": "object" +}, +"RuntimeVersion": { +"description": "A runtime version that a Node can be configured with.", +"id": "RuntimeVersion", +"properties": { +"name": { +"description": "The resource name.", +"type": "string" +}, +"version": { +"description": "The runtime version.", +"type": "string" +} +}, +"type": "object" +}, +"SchedulingConfig": { +"description": "Sets the scheduling options for this node.", +"id": "SchedulingConfig", +"properties": { +"preemptible": { +"description": "Defines whether the node is preemptible.", +"type": "boolean" +}, +"reserved": { +"description": "Whether the node is created under a reservation.", +"type": "boolean" +}, +"spot": { +"description": "Optional. Defines whether the node is Spot VM.", +"type": "boolean" +} +}, +"type": "object" +}, +"ServiceAccount": { +"description": "A service account.", +"id": "ServiceAccount", +"properties": { +"email": { +"description": "Email address of the service account. If empty, default Compute service account will be used.", +"type": "string" +}, +"scope": { +"description": "The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ServiceIdentity": { +"description": "The per-product per-project service identity for Cloud TPU service.", +"id": "ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service identity.", +"type": "string" +} +}, +"type": "object" +}, +"ShieldedInstanceConfig": { +"description": "A set of Shielded Instance options.", +"id": "ShieldedInstanceConfig", +"properties": { +"enableSecureBoot": { +"description": "Defines whether the instance has Secure Boot enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"Spot": { +"description": "Spot tier definition.", +"id": "Spot", +"properties": {}, +"type": "object" +}, +"StartNodeRequest": { +"description": "Request for StartNode.", +"id": "StartNodeRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopNodeRequest": { +"description": "Request for StopNode.", +"id": "StopNodeRequest", +"properties": {}, +"type": "object" +}, +"SuspendedData": { +"description": "Further data for the suspended state.", +"id": "SuspendedData", +"properties": {}, +"type": "object" +}, +"SuspendingData": { +"description": "Further data for the suspending state.", +"id": "SuspendingData", +"properties": {}, +"type": "object" +}, +"Symptom": { +"description": "A Symptom instance.", +"id": "Symptom", +"properties": { +"createTime": { +"description": "Timestamp when the Symptom is created.", +"format": "google-datetime", +"type": "string" +}, +"details": { +"description": "Detailed information of the current Symptom.", +"type": "string" +}, +"symptomType": { +"description": "Type of the Symptom.", +"enum": [ +"SYMPTOM_TYPE_UNSPECIFIED", +"LOW_MEMORY", +"OUT_OF_MEMORY", +"EXECUTE_TIMED_OUT", +"MESH_BUILD_FAIL", +"HBM_OUT_OF_MEMORY", +"PROJECT_ABUSE" +], +"enumDescriptions": [ +"Unspecified symptom.", +"TPU VM memory is low.", +"TPU runtime is out of memory.", +"TPU runtime execution has timed out.", +"TPU runtime fails to construct a mesh that recognizes each TPU device's neighbors.", +"TPU HBM is out of memory.", +"Abusive behaviors have been identified on the current project." +], +"type": "string" +}, +"workerId": { +"description": "A string used to uniquely distinguish a worker within a TPU node.", +"type": "string" +} +}, +"type": "object" +}, +"Tpu": { +"description": "Details of the TPU resource(s) being requested.", +"id": "Tpu", +"properties": { +"nodeSpec": { +"description": "Optional. The TPU node(s) being requested.", +"items": { +"$ref": "NodeSpec" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud TPU API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v2alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v2alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..36332d1a6b9ff3c2252efd257a4d6f5abdc790b1 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/tpu.v2alpha1.json @@ -0,0 +1,2271 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://tpu.googleapis.com/", +"batchPath": "batch", +"canonicalName": "TPU", +"description": "TPU API provides customers with access to Google TPU technology.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/tpu/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "tpu:v2alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://tpu.mtls.googleapis.com/", +"name": "tpu", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"generateServiceIdentity": { +"description": "Generates the Cloud TPU service identity for the project.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}:generateServiceIdentity", +"httpMethod": "POST", +"id": "tpu.projects.locations.generateServiceIdentity", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+parent}:generateServiceIdentity", +"request": { +"$ref": "GenerateServiceIdentityRequest" +}, +"response": { +"$ref": "GenerateServiceIdentityResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets information about a location.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v2alpha1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "tpu.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"acceleratorTypes": { +"methods": { +"get": { +"description": "Gets AcceleratorType.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes/{acceleratorTypesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/acceleratorTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "AcceleratorType" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists accelerator types supported by this API.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/acceleratorTypes", +"httpMethod": "GET", +"id": "tpu.projects.locations.acceleratorTypes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+parent}/acceleratorTypes", +"response": { +"$ref": "ListAcceleratorTypesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"nodes": { +"methods": { +"create": { +"description": "Creates a node.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"nodeId": { +"description": "The unqualified resource name.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha1/{+parent}/nodes", +"request": { +"$ref": "Node" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a node.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.nodes.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the details of a node.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "Node" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getGuestAttributes": { +"description": "Retrieves the guest attributes for the node.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:getGuestAttributes", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.getGuestAttributes", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}:getGuestAttributes", +"request": { +"$ref": "GetGuestAttributesRequest" +}, +"response": { +"$ref": "GetGuestAttributesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists nodes.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes", +"httpMethod": "GET", +"id": "tpu.projects.locations.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+parent}/nodes", +"response": { +"$ref": "ListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the configurations of a node.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}", +"httpMethod": "PATCH", +"id": "tpu.projects.locations.nodes.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. Immutable. The name of the TPU.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask of fields from Node to update. Supported fields: [description, tags, labels, metadata, network_config.enable_external_ips].", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"request": { +"$ref": "Node" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"simulateMaintenanceEvent": { +"description": "Simulates a maintenance event.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:simulateMaintenanceEvent", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.simulateMaintenanceEvent", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}:simulateMaintenanceEvent", +"request": { +"$ref": "SimulateMaintenanceEventRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts a node.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:start", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}:start", +"request": { +"$ref": "StartNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a node. This operation is only available with single TPU nodes.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/nodes/{nodesId}:stop", +"httpMethod": "POST", +"id": "tpu.projects.locations.nodes.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}:stop", +"request": { +"$ref": "StopNodeRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "tpu.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}:cancel", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "tpu.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"queuedResources": { +"methods": { +"create": { +"description": "Creates a QueuedResource TPU instance.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/queuedResources", +"httpMethod": "POST", +"id": "tpu.projects.locations.queuedResources.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"queuedResourceId": { +"description": "The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format.", +"location": "query", +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha1/{+parent}/queuedResources", +"request": { +"$ref": "QueuedResource" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a QueuedResource TPU instance.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/queuedResources/{queuedResourcesId}", +"httpMethod": "DELETE", +"id": "tpu.projects.locations.queuedResources.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "If set to true, all running nodes belonging to this queued resource will be deleted first and then the queued resource will be deleted. Otherwise (i.e. force=false), the queued resource will only be deleted if its nodes have already been deleted or the queued resource is in the ACCEPTED, FAILED, or SUSPENDED state.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Idempotent request UUID.", +"location": "query", +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a queued resource.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/queuedResources/{queuedResourcesId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.queuedResources.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "QueuedResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists queued resources.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/queuedResources", +"httpMethod": "GET", +"id": "tpu.projects.locations.queuedResources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+parent}/queuedResources", +"response": { +"$ref": "ListQueuedResourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"reset": { +"description": "Resets a QueuedResource TPU instance", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/queuedResources/{queuedResourcesId}:reset", +"httpMethod": "POST", +"id": "tpu.projects.locations.queuedResources.reset", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the queued resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/queuedResources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}:reset", +"request": { +"$ref": "ResetQueuedResourceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"reservations": { +"methods": { +"list": { +"description": "Retrieves the reservations for the given project in the given location.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/reservations", +"httpMethod": "GET", +"id": "tpu.projects.locations.reservations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent for reservations.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+parent}/reservations", +"response": { +"$ref": "ListReservationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"runtimeVersions": { +"methods": { +"get": { +"description": "Gets a runtime version.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/runtimeVersions/{runtimeVersionsId}", +"httpMethod": "GET", +"id": "tpu.projects.locations.runtimeVersions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/runtimeVersions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+name}", +"response": { +"$ref": "RuntimeVersion" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists runtime versions supported by this API.", +"flatPath": "v2alpha1/projects/{projectsId}/locations/{locationsId}/runtimeVersions", +"httpMethod": "GET", +"id": "tpu.projects.locations.runtimeVersions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "List filter.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sort results.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v2alpha1/{+parent}/runtimeVersions", +"response": { +"$ref": "ListRuntimeVersionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://tpu.googleapis.com/", +"schemas": { +"AcceleratorConfig": { +"description": "A TPU accelerator configuration.", +"id": "AcceleratorConfig", +"properties": { +"topology": { +"description": "Required. Topology of TPU in chips.", +"type": "string" +}, +"type": { +"description": "Required. Type of TPU.", +"enum": [ +"TYPE_UNSPECIFIED", +"V2", +"V3", +"V4", +"V5P" +], +"enumDescriptions": [ +"Unspecified version.", +"TPU v2.", +"TPU v3.", +"TPU v4.", +"TPU v5." +], +"type": "string" +} +}, +"type": "object" +}, +"AcceleratorType": { +"description": "A accelerator type that a Node can be configured with.", +"id": "AcceleratorType", +"properties": { +"acceleratorConfigs": { +"description": "The accelerator config.", +"items": { +"$ref": "AcceleratorConfig" +}, +"type": "array" +}, +"name": { +"description": "The resource name.", +"type": "string" +}, +"type": { +"description": "The accelerator type.", +"type": "string" +} +}, +"type": "object" +}, +"AcceptedData": { +"description": "Further data for the accepted state.", +"id": "AcceptedData", +"properties": {}, +"type": "object" +}, +"AccessConfig": { +"description": "An access config attached to the TPU worker.", +"id": "AccessConfig", +"properties": { +"externalIp": { +"description": "Output only. An external IP address associated with the TPU worker.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ActiveData": { +"description": "Further data for the active state.", +"id": "ActiveData", +"properties": {}, +"type": "object" +}, +"AttachedDisk": { +"description": "A node-attached disk resource. Next ID: 8;", +"id": "AttachedDisk", +"properties": { +"mode": { +"description": "The mode in which to attach this disk. If not specified, the default is READ_WRITE mode. Only applicable to data_disks.", +"enum": [ +"DISK_MODE_UNSPECIFIED", +"READ_WRITE", +"READ_ONLY" +], +"enumDescriptions": [ +"The disk mode is not known/set.", +"Attaches the disk in read-write mode. Only one TPU node can attach a disk in read-write mode at a time.", +"Attaches the disk in read-only mode. Multiple TPU nodes can attach a disk in read-only mode at a time." +], +"type": "string" +}, +"sourceDisk": { +"description": "Specifies the full path to an existing disk. For example: \"projects/my-project/zones/us-central1-c/disks/my-disk\".", +"type": "string" +} +}, +"type": "object" +}, +"BestEffort": { +"description": "BestEffort tier definition.", +"id": "BestEffort", +"properties": {}, +"type": "object" +}, +"BootDiskConfig": { +"description": "Boot disk configurations.", +"id": "BootDiskConfig", +"properties": { +"customerEncryptionKey": { +"$ref": "CustomerEncryptionKey", +"description": "Optional. Customer encryption key for boot disk." +}, +"enableConfidentialCompute": { +"description": "Optional. Whether the boot disk will be created with confidential compute mode.", +"type": "boolean" +} +}, +"type": "object" +}, +"CreatingData": { +"description": "Further data for the creating state.", +"id": "CreatingData", +"properties": {}, +"type": "object" +}, +"CustomerEncryptionKey": { +"description": "Customer's encryption key.", +"id": "CustomerEncryptionKey", +"properties": { +"kmsKeyName": { +"description": "The name of the encryption key that is stored in Google Cloud KMS. For example: \"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key The fully-qualifed key name may be returned for resource GET requests. For example: \"kmsKeyName\": \"projects/kms_project_id/locations/region/keyRings/ key_region/cryptoKeys/key /cryptoKeyVersions/1 ", +"type": "string" +} +}, +"type": "object" +}, +"DeletingData": { +"description": "Further data for the deleting state.", +"id": "DeletingData", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"FailedData": { +"description": "Further data for the failed state.", +"id": "FailedData", +"properties": { +"error": { +"$ref": "Status", +"description": "The error that caused the queued resource to enter the FAILED state." +} +}, +"type": "object" +}, +"GenerateServiceIdentityRequest": { +"description": "Request for GenerateServiceIdentity.", +"id": "GenerateServiceIdentityRequest", +"properties": {}, +"type": "object" +}, +"GenerateServiceIdentityResponse": { +"description": "Response for GenerateServiceIdentity.", +"id": "GenerateServiceIdentityResponse", +"properties": { +"identity": { +"$ref": "ServiceIdentity", +"description": "ServiceIdentity that was created or retrieved." +} +}, +"type": "object" +}, +"GetGuestAttributesRequest": { +"description": "Request for GetGuestAttributes.", +"id": "GetGuestAttributesRequest", +"properties": { +"queryPath": { +"description": "The guest attributes path to be queried.", +"type": "string" +}, +"workerIds": { +"description": "The 0-based worker ID. If it is empty, all workers' GuestAttributes will be returned.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GetGuestAttributesResponse": { +"description": "Response for GetGuestAttributes.", +"id": "GetGuestAttributesResponse", +"properties": { +"guestAttributes": { +"description": "The guest attributes for the TPU workers.", +"items": { +"$ref": "GuestAttributes" +}, +"type": "array" +} +}, +"type": "object" +}, +"Guaranteed": { +"description": "Guaranteed tier definition.", +"id": "Guaranteed", +"properties": { +"minDuration": { +"description": "Optional. Defines the minimum duration of the guarantee. If specified, the requested resources will only be provisioned if they can be allocated for at least the given duration.", +"format": "google-duration", +"type": "string" +}, +"reserved": { +"description": "Optional. Specifies the request should be scheduled on reserved capacity.", +"type": "boolean" +} +}, +"type": "object" +}, +"GuestAttributes": { +"description": "A guest attributes.", +"id": "GuestAttributes", +"properties": { +"queryPath": { +"description": "The path to be queried. This can be the default namespace ('/') or a nested namespace ('/\\/') or a specified key ('/\\/\\')", +"type": "string" +}, +"queryValue": { +"$ref": "GuestAttributesValue", +"description": "The value of the requested queried path." +} +}, +"type": "object" +}, +"GuestAttributesEntry": { +"description": "A guest attributes namespace/key/value entry.", +"id": "GuestAttributesEntry", +"properties": { +"key": { +"description": "Key for the guest attribute entry.", +"type": "string" +}, +"namespace": { +"description": "Namespace for the guest attribute entry.", +"type": "string" +}, +"value": { +"description": "Value for the guest attribute entry.", +"type": "string" +} +}, +"type": "object" +}, +"GuestAttributesValue": { +"description": "Array of guest attribute namespace/key/value tuples.", +"id": "GuestAttributesValue", +"properties": { +"items": { +"description": "The list of guest attributes entries.", +"items": { +"$ref": "GuestAttributesEntry" +}, +"type": "array" +} +}, +"type": "object" +}, +"Interval": { +"description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", +"id": "Interval", +"properties": { +"endTime": { +"description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ListAcceleratorTypesResponse": { +"description": "Response for ListAcceleratorTypes.", +"id": "ListAcceleratorTypesResponse", +"properties": { +"acceleratorTypes": { +"description": "The listed nodes.", +"items": { +"$ref": "AcceleratorType" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListNodesResponse": { +"description": "Response for ListNodes.", +"id": "ListNodesResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"nodes": { +"description": "The listed nodes.", +"items": { +"$ref": "Node" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListQueuedResourcesResponse": { +"description": "Response for ListQueuedResources.", +"id": "ListQueuedResourcesResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"queuedResources": { +"description": "The listed queued resources.", +"items": { +"$ref": "QueuedResource" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListReservationsResponse": { +"description": "Response for ListReservations.", +"id": "ListReservationsResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"reservations": { +"description": "The listed reservations.", +"items": { +"$ref": "Reservation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListRuntimeVersionsResponse": { +"description": "Response for ListRuntimeVersions.", +"id": "ListRuntimeVersionsResponse", +"properties": { +"nextPageToken": { +"description": "The next page token or empty if none.", +"type": "string" +}, +"runtimeVersions": { +"description": "The listed nodes.", +"items": { +"$ref": "RuntimeVersion" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"MultiNodeParams": { +"description": "Parameters to specify for multi-node QueuedResource requests. This field must be populated in case of multi-node requests instead of node_id. It's an error to specify both node_id and multi_node_params.", +"id": "MultiNodeParams", +"properties": { +"nodeCount": { +"description": "Required. Number of nodes with this spec. The system will attempt to provison \"node_count\" nodes as part of the request. This needs to be > 1.", +"format": "int32", +"type": "integer" +}, +"nodeIdPrefix": { +"description": "Prefix of node_ids in case of multi-node request Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. If node_count = 3 and node_id_prefix = \"np\", node ids of nodes created will be \"np-0\", \"np-1\", \"np-2\". If this field is not provided we use queued_resource_id as the node_id_prefix.", +"type": "string" +} +}, +"type": "object" +}, +"NetworkConfig": { +"description": "Network related configurations.", +"id": "NetworkConfig", +"properties": { +"canIpForward": { +"description": "Allows the TPU node to send and receive packets with non-matching destination or source IPs. This is required if you plan to use the TPU workers to forward routes.", +"type": "boolean" +}, +"enableExternalIps": { +"description": "Indicates that external IP addresses would be associated with the TPU workers. If set to false, the specified subnetwork or network should have Private Google Access enabled.", +"type": "boolean" +}, +"network": { +"description": "The name of the network for the TPU node. It must be a preexisting Google Compute Engine network. If none is provided, \"default\" will be used.", +"type": "string" +}, +"queueCount": { +"description": "Optional. Specifies networking queue count for TPU VM instance's network interface.", +"format": "int32", +"type": "integer" +}, +"subnetwork": { +"description": "The name of the subnetwork for the TPU node. It must be a preexisting Google Compute Engine subnetwork. If none is provided, \"default\" will be used.", +"type": "string" +} +}, +"type": "object" +}, +"NetworkEndpoint": { +"description": "A network endpoint over which a TPU worker can be reached.", +"id": "NetworkEndpoint", +"properties": { +"accessConfig": { +"$ref": "AccessConfig", +"description": "The access config for the TPU worker." +}, +"ipAddress": { +"description": "The internal IP address of this network endpoint.", +"type": "string" +}, +"port": { +"description": "The port of this network endpoint.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Node": { +"description": "A TPU instance.", +"id": "Node", +"properties": { +"acceleratorConfig": { +"$ref": "AcceleratorConfig", +"description": "The AccleratorConfig for the TPU Node." +}, +"acceleratorType": { +"description": "The type of hardware accelerators associated with this node.", +"type": "string" +}, +"apiVersion": { +"description": "Output only. The API version that created this Node.", +"enum": [ +"API_VERSION_UNSPECIFIED", +"V1_ALPHA1", +"V1", +"V2_ALPHA1" +], +"enumDescriptions": [ +"API version is unknown.", +"TPU API V1Alpha1 version.", +"TPU API V1 version.", +"TPU API V2Alpha1 version." +], +"readOnly": true, +"type": "string" +}, +"autocheckpointEnabled": { +"description": "Optional. Whether Autocheckpoint is enabled.", +"type": "boolean" +}, +"bootDiskConfig": { +"$ref": "BootDiskConfig", +"description": "Optional. Boot disk configuration." +}, +"cidrBlock": { +"description": "The CIDR block that the TPU node will use when selecting an IP address. This CIDR block must be a /29 block; the Compute Engine networks API forbids a smaller block, and using a larger block would be wasteful (a node can only consume one IP address). Errors will occur if the CIDR block has already been used for a currently existing TPU node, the CIDR block conflicts with any subnetworks in the user's provided network, or the provided network is peered with another network that is using that CIDR block.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the node was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataDisks": { +"description": "The additional data disks for the Node.", +"items": { +"$ref": "AttachedDisk" +}, +"type": "array" +}, +"description": { +"description": "The user-supplied description of the TPU. Maximum of 512 characters.", +"type": "string" +}, +"health": { +"description": "The health status of the TPU node.", +"enum": [ +"HEALTH_UNSPECIFIED", +"HEALTHY", +"TIMEOUT", +"UNHEALTHY_TENSORFLOW", +"UNHEALTHY_MAINTENANCE" +], +"enumDescriptions": [ +"Health status is unknown: not initialized or failed to retrieve.", +"The resource is healthy.", +"The resource is unresponsive.", +"The in-guest ML stack is unhealthy.", +"The node is under maintenance/priority boost caused rescheduling and will resume running once rescheduled." +], +"type": "string" +}, +"healthDescription": { +"description": "Output only. If this field is populated, it contains a description of why the TPU Node is unhealthy.", +"readOnly": true, +"type": "string" +}, +"id": { +"description": "Output only. The unique identifier for the TPU Node.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Resource labels to represent user-provided metadata.", +"type": "object" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Custom metadata to apply to the TPU Node. Can set startup-script and shutdown-script", +"type": "object" +}, +"multisliceNode": { +"description": "Output only. Whether the Node belongs to a Multislice group.", +"readOnly": true, +"type": "boolean" +}, +"name": { +"description": "Output only. Immutable. The name of the TPU.", +"readOnly": true, +"type": "string" +}, +"networkConfig": { +"$ref": "NetworkConfig", +"description": "Network configurations for the TPU node." +}, +"networkEndpoints": { +"description": "Output only. The network endpoints where TPU workers can be accessed and sent work. It is recommended that runtime clients of the node reach out to the 0th entry in this map first.", +"items": { +"$ref": "NetworkEndpoint" +}, +"readOnly": true, +"type": "array" +}, +"queuedResource": { +"description": "Output only. The qualified name of the QueuedResource that requested this Node.", +"readOnly": true, +"type": "string" +}, +"runtimeVersion": { +"description": "Required. The runtime version running in the Node.", +"type": "string" +}, +"schedulingConfig": { +"$ref": "SchedulingConfig", +"description": "The scheduling options for this node." +}, +"serviceAccount": { +"$ref": "ServiceAccount", +"description": "The Google Cloud Platform Service Account to be used by the TPU node VMs. If None is specified, the default compute service account will be used." +}, +"shieldedInstanceConfig": { +"$ref": "ShieldedInstanceConfig", +"description": "Shielded Instance options." +}, +"state": { +"description": "Output only. The current state for the TPU Node.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"READY", +"RESTARTING", +"REIMAGING", +"DELETING", +"REPAIRING", +"STOPPED", +"STOPPING", +"STARTING", +"PREEMPTED", +"TERMINATED", +"HIDING", +"HIDDEN", +"UNHIDING" +], +"enumDescriptions": [ +"TPU node state is not known/set.", +"TPU node is being created.", +"TPU node has been created.", +"TPU node is restarting.", +"TPU node is undergoing reimaging.", +"TPU node is being deleted.", +"TPU node is being repaired and may be unusable. Details can be found in the 'help_description' field.", +"TPU node is stopped.", +"TPU node is currently stopping.", +"TPU node is currently starting.", +"TPU node has been preempted. Only applies to Preemptible TPU Nodes.", +"TPU node has been terminated due to maintenance or has reached the end of its life cycle (for preemptible nodes).", +"TPU node is currently hiding.", +"TPU node has been hidden.", +"TPU node is currently unhiding." +], +"readOnly": true, +"type": "string" +}, +"symptoms": { +"description": "Output only. The Symptoms that have occurred to the TPU Node.", +"items": { +"$ref": "Symptom" +}, +"readOnly": true, +"type": "array" +}, +"tags": { +"description": "Tags to apply to the TPU Node. Tags are used to identify valid sources or targets for network firewalls.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"NodeSpec": { +"description": "Details of the TPU node(s) being requested. Users can request either a single node or multiple nodes. NodeSpec provides the specification for node(s) to be created.", +"id": "NodeSpec", +"properties": { +"multiNodeParams": { +"$ref": "MultiNodeParams", +"description": "Optional. Fields to specify in case of multi-node request." +}, +"node": { +"$ref": "Node", +"description": "Required. The node." +}, +"nodeId": { +"description": "The unqualified resource name. Should follow the `^[A-Za-z0-9_.~+%-]+$` regex format. This is only specified when requesting a single node. In case of multi-node requests, multi_node_params must be populated instead. It's an error to specify both node_id and multi_node_params.", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata describing an Operation", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version.", +"type": "string" +}, +"cancelRequested": { +"description": "Specifies if cancellation was requested for the operation.", +"type": "boolean" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"statusDetail": { +"description": "Human-readable status of the operation, if any.", +"type": "string" +}, +"target": { +"description": "Target of the operation - for example projects/project-1/connectivityTests/test-1", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"ProvisioningData": { +"description": "Further data for the provisioning state.", +"id": "ProvisioningData", +"properties": {}, +"type": "object" +}, +"QueuedResource": { +"description": "A QueuedResource represents a request for resources that will be placed in a queue and fulfilled when the necessary resources are available.", +"id": "QueuedResource", +"properties": { +"bestEffort": { +"$ref": "BestEffort", +"description": "The BestEffort tier." +}, +"createTime": { +"description": "Output only. The time when the QueuedResource was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"guaranteed": { +"$ref": "Guaranteed", +"description": "The Guaranteed tier." +}, +"name": { +"description": "Output only. Immutable. The name of the QueuedResource.", +"readOnly": true, +"type": "string" +}, +"queueingPolicy": { +"$ref": "QueueingPolicy", +"description": "The queueing policy of the QueuedRequest." +}, +"reservationName": { +"description": "Name of the reservation in which the resource should be provisioned. Format: projects/{project}/locations/{zone}/reservations/{reservation}", +"type": "string" +}, +"spot": { +"$ref": "Spot", +"description": "Optional. The Spot tier." +}, +"state": { +"$ref": "QueuedResourceState", +"description": "Output only. State of the QueuedResource request.", +"readOnly": true +}, +"tpu": { +"$ref": "Tpu", +"description": "Defines a TPU resource." +} +}, +"type": "object" +}, +"QueuedResourceState": { +"description": "QueuedResourceState defines the details of the QueuedResource request.", +"id": "QueuedResourceState", +"properties": { +"acceptedData": { +"$ref": "AcceptedData", +"description": "Further data for the accepted state." +}, +"activeData": { +"$ref": "ActiveData", +"description": "Further data for the active state." +}, +"creatingData": { +"$ref": "CreatingData", +"description": "Further data for the creating state." +}, +"deletingData": { +"$ref": "DeletingData", +"description": "Further data for the deleting state." +}, +"failedData": { +"$ref": "FailedData", +"description": "Further data for the failed state." +}, +"provisioningData": { +"$ref": "ProvisioningData", +"description": "Further data for the provisioning state." +}, +"state": { +"description": "State of the QueuedResource request.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACCEPTED", +"PROVISIONING", +"FAILED", +"DELETING", +"ACTIVE", +"SUSPENDING", +"SUSPENDED", +"WAITING_FOR_RESOURCES" +], +"enumDescriptions": [ +"State of the QueuedResource request is not known/set.", +"The QueuedResource request has been received. We're still working on determining if we will be able to honor this request.", +"The QueuedResource request has passed initial validation/admission control and has been persisted in the queue.", +"The QueuedResource request has been selected. The associated resources are currently being provisioned (or very soon will begin provisioning).", +"The request could not be completed. This may be due to some late-discovered problem with the request itself, or due to unavailability of resources within the constraints of the request (e.g., the 'valid until' start timing constraint expired).", +"The QueuedResource is being deleted.", +"The resources specified in the QueuedResource request have been provisioned and are ready for use by the end-user/consumer.", +"The resources specified in the QueuedResource request are being deleted. This may have been initiated by the user, or the Cloud TPU service. Inspect the state data for more details.", +"The resources specified in the QueuedResource request have been deleted.", +"The QueuedResource request has passed initial validation and has been persisted in the queue. It will remain in this state until there are sufficient free resources to begin provisioning your request. Wait times will vary significantly depending on demand levels. When demand is high, not all requests can be immediately provisioned. If you need more reliable obtainability of TPUs consider purchasing a reservation. To put a limit on how long you are willing to wait, use [timing constraints](https://cloud.google.com/tpu/docs/queued-resources#request_a_queued_resource_before_a_specified_time)." +], +"type": "string" +}, +"stateInitiator": { +"description": "Output only. The initiator of the QueuedResources's current state. Used to indicate whether the SUSPENDING/SUSPENDED state was initiated by the user or the service.", +"enum": [ +"STATE_INITIATOR_UNSPECIFIED", +"USER", +"SERVICE" +], +"enumDescriptions": [ +"The state initiator is unspecified.", +"The current QueuedResource state was initiated by the user.", +"The current QueuedResource state was initiated by the service." +], +"readOnly": true, +"type": "string" +}, +"suspendedData": { +"$ref": "SuspendedData", +"description": "Further data for the suspended state." +}, +"suspendingData": { +"$ref": "SuspendingData", +"description": "Further data for the suspending state." +} +}, +"type": "object" +}, +"QueueingPolicy": { +"description": "Defines the policy of the QueuedRequest.", +"id": "QueueingPolicy", +"properties": { +"validAfterDuration": { +"description": "A relative time after which resources may be created.", +"format": "google-duration", +"type": "string" +}, +"validAfterTime": { +"description": "An absolute time at which resources may be created.", +"format": "google-datetime", +"type": "string" +}, +"validInterval": { +"$ref": "Interval", +"description": "An absolute time interval within which resources may be created." +}, +"validUntilDuration": { +"description": "A relative time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.", +"format": "google-duration", +"type": "string" +}, +"validUntilTime": { +"description": "An absolute time after which resources should not be created. If the request cannot be fulfilled by this time the request will be failed.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Reservation": { +"description": "A reservation describes the amount of a resource 'allotted' for a defined period of time.", +"id": "Reservation", +"properties": { +"name": { +"description": "The reservation name with the format: projects/{projectID}/locations/{location}/reservations/{reservationID}", +"type": "string" +}, +"standard": { +"$ref": "Standard" +}, +"state": { +"description": "Output only. The state of the Reservation.", +"enum": [ +"STATE_UNSPECIFIED", +"APPROVED", +"PROVISIONING", +"ACTIVE", +"DEPROVISIONING", +"EXPIRED", +"FAILED" +], +"enumDescriptions": [ +"The Reservation state is unspecified.", +"The Reservation has been approved.", +"The Reservation is being provisioned.", +"The Reservation is active.", +"The Reservation is being deprovisioned.", +"The Reservation is past its end date.", +"The Reservation encountered a failure during mutation." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ResetQueuedResourceRequest": { +"description": "Request for ResetQueuedResource.", +"id": "ResetQueuedResourceRequest", +"properties": {}, +"type": "object" +}, +"RuntimeVersion": { +"description": "A runtime version that a Node can be configured with.", +"id": "RuntimeVersion", +"properties": { +"name": { +"description": "The resource name.", +"type": "string" +}, +"version": { +"description": "The runtime version.", +"type": "string" +} +}, +"type": "object" +}, +"SchedulingConfig": { +"description": "Sets the scheduling options for this node.", +"id": "SchedulingConfig", +"properties": { +"preemptible": { +"description": "Defines whether the node is preemptible.", +"type": "boolean" +}, +"reserved": { +"description": "Whether the node is created under a reservation.", +"type": "boolean" +}, +"spot": { +"description": "Optional. Defines whether the node is Spot VM.", +"type": "boolean" +} +}, +"type": "object" +}, +"ServiceAccount": { +"description": "A service account.", +"id": "ServiceAccount", +"properties": { +"email": { +"description": "Email address of the service account. If empty, default Compute service account will be used.", +"type": "string" +}, +"scope": { +"description": "The list of scopes to be made available for this service account. If empty, access to all Cloud APIs will be allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ServiceIdentity": { +"description": "The per-product per-project service identity for Cloud TPU service.", +"id": "ServiceIdentity", +"properties": { +"email": { +"description": "The email address of the service identity.", +"type": "string" +} +}, +"type": "object" +}, +"ShieldedInstanceConfig": { +"description": "A set of Shielded Instance options.", +"id": "ShieldedInstanceConfig", +"properties": { +"enableSecureBoot": { +"description": "Defines whether the instance has Secure Boot enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"SimulateMaintenanceEventRequest": { +"description": "Request for SimulateMaintenanceEvent.", +"id": "SimulateMaintenanceEventRequest", +"properties": { +"workerIds": { +"description": "The 0-based worker ID. If it is empty, worker ID 0 will be selected for maintenance event simulation. A maintenance event will only be fired on the first specified worker ID. Future implementations may support firing on multiple workers.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Spot": { +"description": "Spot tier definition.", +"id": "Spot", +"properties": {}, +"type": "object" +}, +"Standard": { +"id": "Standard", +"properties": { +"capacityUnits": { +"enum": [ +"CAPACITY_UNITS_UNSPECIFIED", +"CORES", +"CHIPS" +], +"enumDescriptions": [ +"The capacity units is not known/set.", +"The capacity unit is set to CORES.", +"The capacity unit is set to CHIPS." +], +"type": "string" +}, +"interval": { +"$ref": "Interval", +"description": "The start and end time of the reservation." +}, +"resourceType": { +"description": "The resource type of the reservation.", +"type": "string" +}, +"size": { +"description": "The size of the reservation, in the units specified in the 'capacity_units' field.", +"format": "int32", +"type": "integer" +}, +"usage": { +"$ref": "Usage" +} +}, +"type": "object" +}, +"StartNodeRequest": { +"description": "Request for StartNode.", +"id": "StartNodeRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopNodeRequest": { +"description": "Request for StopNode.", +"id": "StopNodeRequest", +"properties": {}, +"type": "object" +}, +"SuspendedData": { +"description": "Further data for the suspended state.", +"id": "SuspendedData", +"properties": {}, +"type": "object" +}, +"SuspendingData": { +"description": "Further data for the suspending state.", +"id": "SuspendingData", +"properties": {}, +"type": "object" +}, +"Symptom": { +"description": "A Symptom instance.", +"id": "Symptom", +"properties": { +"createTime": { +"description": "Timestamp when the Symptom is created.", +"format": "google-datetime", +"type": "string" +}, +"details": { +"description": "Detailed information of the current Symptom.", +"type": "string" +}, +"symptomType": { +"description": "Type of the Symptom.", +"enum": [ +"SYMPTOM_TYPE_UNSPECIFIED", +"LOW_MEMORY", +"OUT_OF_MEMORY", +"EXECUTE_TIMED_OUT", +"MESH_BUILD_FAIL", +"HBM_OUT_OF_MEMORY", +"PROJECT_ABUSE" +], +"enumDescriptions": [ +"Unspecified symptom.", +"TPU VM memory is low.", +"TPU runtime is out of memory.", +"TPU runtime execution has timed out.", +"TPU runtime fails to construct a mesh that recognizes each TPU device's neighbors.", +"TPU HBM is out of memory.", +"Abusive behaviors have been identified on the current project." +], +"type": "string" +}, +"workerId": { +"description": "A string used to uniquely distinguish a worker within a TPU node.", +"type": "string" +} +}, +"type": "object" +}, +"Tpu": { +"description": "Details of the TPU resource(s) being requested.", +"id": "Tpu", +"properties": { +"nodeSpec": { +"description": "The TPU node(s) being requested.", +"items": { +"$ref": "NodeSpec" +}, +"type": "array" +} +}, +"type": "object" +}, +"Usage": { +"id": "Usage", +"properties": { +"total": { +"description": "The real-time value of usage within the reservation, with the unit specified in field capacity_units.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud TPU API", +"version": "v2alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/trafficdirector.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/trafficdirector.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..6adefaea02c6f52715133da12d06df283ad557b6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/trafficdirector.v2.json @@ -0,0 +1,956 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://trafficdirector.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Traffic Director Service", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/traffic-director", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "trafficdirector:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://trafficdirector.mtls.googleapis.com/", +"name": "trafficdirector", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"discovery": { +"methods": { +"client_status": { +"description": "", +"flatPath": "v2/discovery:client_status", +"httpMethod": "POST", +"id": "trafficdirector.discovery.client_status", +"parameterOrder": [], +"parameters": {}, +"path": "v2/discovery:client_status", +"request": { +"$ref": "ClientStatusRequest" +}, +"response": { +"$ref": "ClientStatusResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240322", +"rootUrl": "https://trafficdirector.googleapis.com/", +"schemas": { +"Address": { +"description": "Addresses specify either a logical or physical address and port, which are used to tell Envoy where to bind/listen, connect to upstream and find management servers.", +"id": "Address", +"properties": { +"pipe": { +"$ref": "Pipe" +}, +"socketAddress": { +"$ref": "SocketAddress" +} +}, +"type": "object" +}, +"BuildVersion": { +"description": "BuildVersion combines SemVer version of extension with free-form build information (i.e. 'alpha', 'private-build') as a set of strings.", +"id": "BuildVersion", +"properties": { +"metadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Free-form build information. Envoy defines several well known keys in the source/common/version/version.h file", +"type": "object" +}, +"version": { +"$ref": "SemanticVersion", +"description": "SemVer version of extension." +} +}, +"type": "object" +}, +"ClientConfig": { +"description": "All xds configs for a particular client.", +"id": "ClientConfig", +"properties": { +"node": { +"$ref": "Node", +"description": "Node for a particular client." +}, +"xdsConfig": { +"items": { +"$ref": "PerXdsConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClientStatusRequest": { +"description": "Request for client status of clients identified by a list of NodeMatchers.", +"id": "ClientStatusRequest", +"properties": { +"nodeMatchers": { +"description": "Management server can use these match criteria to identify clients. The match follows OR semantics.", +"items": { +"$ref": "NodeMatcher" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClientStatusResponse": { +"id": "ClientStatusResponse", +"properties": { +"config": { +"description": "Client configs for the clients specified in the ClientStatusRequest.", +"items": { +"$ref": "ClientConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClustersConfigDump": { +"description": "Envoy's cluster manager fills this message with all currently known clusters. Cluster configuration information can be used to recreate an Envoy configuration by populating all clusters as static clusters or by returning them in a CDS response.", +"id": "ClustersConfigDump", +"properties": { +"dynamicActiveClusters": { +"description": "The dynamically loaded active clusters. These are clusters that are available to service data plane traffic.", +"items": { +"$ref": "DynamicCluster" +}, +"type": "array" +}, +"dynamicWarmingClusters": { +"description": "The dynamically loaded warming clusters. These are clusters that are currently undergoing warming in preparation to service data plane traffic. Note that if attempting to recreate an Envoy configuration from a configuration dump, the warming clusters should generally be discarded.", +"items": { +"$ref": "DynamicCluster" +}, +"type": "array" +}, +"staticClusters": { +"description": "The statically loaded cluster configs.", +"items": { +"$ref": "StaticCluster" +}, +"type": "array" +}, +"versionInfo": { +"description": "This is the :ref:`version_info ` in the last processed CDS discovery response. If there are only static bootstrap clusters, this field will be \"\".", +"type": "string" +} +}, +"type": "object" +}, +"DoubleMatcher": { +"description": "Specifies the way to match a double value.", +"id": "DoubleMatcher", +"properties": { +"exact": { +"description": "If specified, the input double value must be equal to the value specified here.", +"format": "double", +"type": "number" +}, +"range": { +"$ref": "DoubleRange", +"description": "If specified, the input double value must be in the range specified here. Note: The range is using half-open interval semantics [start, end)." +} +}, +"type": "object" +}, +"DoubleRange": { +"description": "Specifies the double start and end of the range using half-open interval semantics [start, end).", +"id": "DoubleRange", +"properties": { +"end": { +"description": "end of the range (exclusive)", +"format": "double", +"type": "number" +}, +"start": { +"description": "start of the range (inclusive)", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"DynamicCluster": { +"description": "Describes a dynamically loaded cluster via the CDS API.", +"id": "DynamicCluster", +"properties": { +"cluster": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The cluster config.", +"type": "object" +}, +"lastUpdated": { +"description": "The timestamp when the Cluster was last updated.", +"format": "google-datetime", +"type": "string" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the cluster was loaded. In the future, discrete per-cluster versions may be supported by the API.", +"type": "string" +} +}, +"type": "object" +}, +"DynamicListener": { +"description": "Describes a dynamically loaded listener via the LDS API. [#next-free-field: 6]", +"id": "DynamicListener", +"properties": { +"activeState": { +"$ref": "DynamicListenerState", +"description": "The listener state for any active listener by this name. These are listeners that are available to service data plane traffic." +}, +"drainingState": { +"$ref": "DynamicListenerState", +"description": "The listener state for any draining listener by this name. These are listeners that are currently undergoing draining in preparation to stop servicing data plane traffic. Note that if attempting to recreate an Envoy configuration from a configuration dump, the draining listeners should generally be discarded." +}, +"errorState": { +"$ref": "UpdateFailureState", +"description": "Set if the last update failed, cleared after the next successful update." +}, +"name": { +"description": "The name or unique id of this listener, pulled from the DynamicListenerState config.", +"type": "string" +}, +"warmingState": { +"$ref": "DynamicListenerState", +"description": "The listener state for any warming listener by this name. These are listeners that are currently undergoing warming in preparation to service data plane traffic. Note that if attempting to recreate an Envoy configuration from a configuration dump, the warming listeners should generally be discarded." +} +}, +"type": "object" +}, +"DynamicListenerState": { +"id": "DynamicListenerState", +"properties": { +"lastUpdated": { +"description": "The timestamp when the Listener was last successfully updated.", +"format": "google-datetime", +"type": "string" +}, +"listener": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The listener config.", +"type": "object" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the listener was loaded. In the future, discrete per-listener versions may be supported by the API.", +"type": "string" +} +}, +"type": "object" +}, +"DynamicRouteConfig": { +"id": "DynamicRouteConfig", +"properties": { +"lastUpdated": { +"description": "The timestamp when the Route was last updated.", +"format": "google-datetime", +"type": "string" +}, +"routeConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The route config.", +"type": "object" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the route configuration was loaded.", +"type": "string" +} +}, +"type": "object" +}, +"DynamicScopedRouteConfigs": { +"id": "DynamicScopedRouteConfigs", +"properties": { +"lastUpdated": { +"description": "The timestamp when the scoped route config set was last updated.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The name assigned to the scoped route configurations.", +"type": "string" +}, +"scopedRouteConfigs": { +"description": "The scoped route configurations.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the scoped routes configuration was loaded.", +"type": "string" +} +}, +"type": "object" +}, +"Extension": { +"description": "Version and identification for an Envoy extension. [#next-free-field: 6]", +"id": "Extension", +"properties": { +"category": { +"description": "Category of the extension. Extension category names use reverse DNS notation. For instance \"envoy.filters.listener\" for Envoy's built-in listener filters or \"com.acme.filters.http\" for HTTP filters from acme.com vendor. [#comment:", +"type": "string" +}, +"disabled": { +"description": "Indicates that the extension is present but was disabled via dynamic configuration.", +"type": "boolean" +}, +"name": { +"description": "This is the name of the Envoy filter as specified in the Envoy configuration, e.g. envoy.filters.http.router, com.acme.widget.", +"type": "string" +}, +"typeDescriptor": { +"description": "[#not-implemented-hide:] Type descriptor of extension configuration proto. [#comment:", +"type": "string" +}, +"version": { +"$ref": "BuildVersion", +"description": "The version is a property of the extension and maintained independently of other extensions and the Envoy API. This field is not set when extension did not provide version information." +} +}, +"type": "object" +}, +"GoogleRE2": { +"description": "Google's `RE2 `_ regex engine. The regex string must adhere to the documented `syntax `_. The engine is designed to complete execution in linear time as well as limit the amount of memory used. Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level`` and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or complexity that a compiled regex can have before an exception is thrown or a warning is logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning). Envoy emits two stats for tracking the program size of regexes: the histogram `re2.program_size`, which records the program size, and the counter `re2.exceeded_warn_level`, which is incremented each time the program size exceeds the warn level threshold.", +"id": "GoogleRE2", +"properties": { +"maxProgramSize": { +"deprecated": true, +"description": "This field controls the RE2 \"program size\" which is a rough estimate of how complex a compiled regex is to evaluate. A regex that has a program size greater than the configured value will fail to compile. In this case, the configured max program size can be increased or the regex can be simplified. If not specified, the default is 100. This field is deprecated; regexp validation should be performed on the management server instead of being done by each individual client.", +"format": "uint32", +"type": "integer" +} +}, +"type": "object" +}, +"InlineScopedRouteConfigs": { +"id": "InlineScopedRouteConfigs", +"properties": { +"lastUpdated": { +"description": "The timestamp when the scoped route config set was last updated.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The name assigned to the scoped route configurations.", +"type": "string" +}, +"scopedRouteConfigs": { +"description": "The scoped route configurations.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListMatcher": { +"description": "Specifies the way to match a list value.", +"id": "ListMatcher", +"properties": { +"oneOf": { +"$ref": "ValueMatcher", +"description": "If specified, at least one of the values in the list must match the value specified." +} +}, +"type": "object" +}, +"ListenersConfigDump": { +"description": "Envoy's listener manager fills this message with all currently known listeners. Listener configuration information can be used to recreate an Envoy configuration by populating all listeners as static listeners or by returning them in a LDS response.", +"id": "ListenersConfigDump", +"properties": { +"dynamicListeners": { +"description": "State for any warming, active, or draining listeners.", +"items": { +"$ref": "DynamicListener" +}, +"type": "array" +}, +"staticListeners": { +"description": "The statically loaded listener configs.", +"items": { +"$ref": "StaticListener" +}, +"type": "array" +}, +"versionInfo": { +"description": "This is the :ref:`version_info ` in the last processed LDS discovery response. If there are only static bootstrap listeners, this field will be \"\".", +"type": "string" +} +}, +"type": "object" +}, +"Locality": { +"description": "Identifies location of where either Envoy runs or where upstream hosts run.", +"id": "Locality", +"properties": { +"region": { +"description": "Region this :ref:`zone ` belongs to.", +"type": "string" +}, +"subZone": { +"description": "When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.", +"type": "string" +}, +"zone": { +"description": "Defines the local service zone where Envoy is running. Though optional, it should be set if discovery service routing is used and the discovery service exposes :ref:`zone data `, either in this message or via :option:`--service-zone`. The meaning of zone is context dependent, e.g. `Availability Zone (AZ) `_ on AWS, `Zone `_ on GCP, etc.", +"type": "string" +} +}, +"type": "object" +}, +"Node": { +"description": "Identifies a specific Envoy instance. The node identifier is presented to the management server, which may use this identifier to distinguish per Envoy configuration for serving. [#next-free-field: 12]", +"id": "Node", +"properties": { +"buildVersion": { +"deprecated": true, +"description": "This is motivated by informing a management server during canary which version of Envoy is being tested in a heterogeneous fleet. This will be set by Envoy in management server RPCs. This field is deprecated in favor of the user_agent_name and user_agent_version values.", +"type": "string" +}, +"clientFeatures": { +"description": "Client feature support list. These are well known features described in the Envoy API repository for a given major version of an API. Client features use reverse DNS naming scheme, for example `com.acme.feature`. See :ref:`the list of features ` that xDS client may support.", +"items": { +"type": "string" +}, +"type": "array" +}, +"cluster": { +"description": "Defines the local service cluster name where Envoy is running. Though optional, it should be set if any of the following features are used: :ref:`statsd `, :ref:`health check cluster verification `, :ref:`runtime override directory `, :ref:`user agent addition `, :ref:`HTTP global rate limiting `, :ref:`CDS `, and :ref:`HTTP tracing `, either in this message or via :option:`--service-cluster`.", +"type": "string" +}, +"extensions": { +"description": "List of extensions and their versions supported by the node.", +"items": { +"$ref": "Extension" +}, +"type": "array" +}, +"id": { +"description": "An opaque node identifier for the Envoy node. This also provides the local service node name. It should be set if any of the following features are used: :ref:`statsd `, :ref:`CDS `, and :ref:`HTTP tracing `, either in this message or via :option:`--service-node`.", +"type": "string" +}, +"listeningAddresses": { +"description": "Known listening ports on the node as a generic hint to the management server for filtering :ref:`listeners ` to be returned. For example, if there is a listener bound to port 80, the list can optionally contain the SocketAddress `(0.0.0.0,80)`. The field is optional and just a hint.", +"items": { +"$ref": "Address" +}, +"type": "array" +}, +"locality": { +"$ref": "Locality", +"description": "Locality specifying where the Envoy instance is running." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Opaque metadata extending the node identifier. Envoy will pass this directly to the management server.", +"type": "object" +}, +"userAgentBuildVersion": { +"$ref": "BuildVersion", +"description": "Structured version of the entity requesting config." +}, +"userAgentName": { +"description": "Free-form string that identifies the entity requesting config. E.g. \"envoy\" or \"grpc\"", +"type": "string" +}, +"userAgentVersion": { +"description": "Free-form string that identifies the version of the entity requesting config. E.g. \"1.12.2\" or \"abcd1234\", or \"SpecialEnvoyBuild\"", +"type": "string" +} +}, +"type": "object" +}, +"NodeMatcher": { +"description": "Specifies the way to match a Node. The match follows AND semantics.", +"id": "NodeMatcher", +"properties": { +"nodeId": { +"$ref": "StringMatcher", +"description": "Specifies match criteria on the node id." +}, +"nodeMetadatas": { +"description": "Specifies match criteria on the node metadata.", +"items": { +"$ref": "StructMatcher" +}, +"type": "array" +} +}, +"type": "object" +}, +"NullMatch": { +"description": "NullMatch is an empty message to specify a null value.", +"id": "NullMatch", +"properties": {}, +"type": "object" +}, +"PathSegment": { +"description": "Specifies the segment in a path to retrieve value from Struct.", +"id": "PathSegment", +"properties": { +"key": { +"description": "If specified, use the key to retrieve the value in a Struct.", +"type": "string" +} +}, +"type": "object" +}, +"PerXdsConfig": { +"description": "Detailed config (per xDS) with status. [#next-free-field: 6]", +"id": "PerXdsConfig", +"properties": { +"clusterConfig": { +"$ref": "ClustersConfigDump" +}, +"listenerConfig": { +"$ref": "ListenersConfigDump" +}, +"routeConfig": { +"$ref": "RoutesConfigDump" +}, +"scopedRouteConfig": { +"$ref": "ScopedRoutesConfigDump" +}, +"status": { +"enum": [ +"UNKNOWN", +"SYNCED", +"NOT_SENT", +"STALE", +"ERROR" +], +"enumDescriptions": [ +"Status info is not available/unknown.", +"Management server has sent the config to client and received ACK.", +"Config is not sent.", +"Management server has sent the config to client but hasn\u2019t received ACK/NACK.", +"Management server has sent the config to client but received NACK." +], +"type": "string" +} +}, +"type": "object" +}, +"Pipe": { +"id": "Pipe", +"properties": { +"mode": { +"description": "The mode for the Pipe. Not applicable for abstract sockets.", +"format": "uint32", +"type": "integer" +}, +"path": { +"description": "Unix Domain Socket path. On Linux, paths starting with '@' will use the abstract namespace. The starting '@' is replaced by a null byte by Envoy. Paths starting with '@' will result in an error in environments other than Linux.", +"type": "string" +} +}, +"type": "object" +}, +"RegexMatcher": { +"description": "A regex matcher designed for safety when used with untrusted input.", +"id": "RegexMatcher", +"properties": { +"googleRe2": { +"$ref": "GoogleRE2", +"description": "Google's RE2 regex engine." +}, +"regex": { +"description": "The regex match string. The string must be supported by the configured engine.", +"type": "string" +} +}, +"type": "object" +}, +"RoutesConfigDump": { +"description": "Envoy's RDS implementation fills this message with all currently loaded routes, as described by their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration or defined inline while configuring listeners are separated from those configured dynamically via RDS. Route configuration information can be used to recreate an Envoy configuration by populating all routes as static routes or by returning them in RDS responses.", +"id": "RoutesConfigDump", +"properties": { +"dynamicRouteConfigs": { +"description": "The dynamically loaded route configs.", +"items": { +"$ref": "DynamicRouteConfig" +}, +"type": "array" +}, +"staticRouteConfigs": { +"description": "The statically loaded route configs.", +"items": { +"$ref": "StaticRouteConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ScopedRoutesConfigDump": { +"description": "Envoy's scoped RDS implementation fills this message with all currently loaded route configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the dynamically obtained scopes via the SRDS API.", +"id": "ScopedRoutesConfigDump", +"properties": { +"dynamicScopedRouteConfigs": { +"description": "The dynamically loaded scoped route configs.", +"items": { +"$ref": "DynamicScopedRouteConfigs" +}, +"type": "array" +}, +"inlineScopedRouteConfigs": { +"description": "The statically loaded scoped route configs.", +"items": { +"$ref": "InlineScopedRouteConfigs" +}, +"type": "array" +} +}, +"type": "object" +}, +"SemanticVersion": { +"description": "Envoy uses SemVer (https://semver.org/). Major/minor versions indicate expected behaviors and APIs, the patch version field is used only for security fixes and can be generally ignored.", +"id": "SemanticVersion", +"properties": { +"majorNumber": { +"format": "uint32", +"type": "integer" +}, +"minorNumber": { +"format": "uint32", +"type": "integer" +}, +"patch": { +"format": "uint32", +"type": "integer" +} +}, +"type": "object" +}, +"SocketAddress": { +"description": "[#next-free-field: 7]", +"id": "SocketAddress", +"properties": { +"address": { +"description": "The address for this socket. :ref:`Listeners ` will bind to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref:`FilterChainMatch `.] When used within an upstream :ref:`BindConfig `, the address controls the source address of outbound connections. For :ref:`clusters `, the cluster type determines whether the address must be an IP (*STATIC* or *EDS* clusters) or a hostname resolved by DNS (*STRICT_DNS* or *LOGICAL_DNS* clusters). Address resolution can be customized via :ref:`resolver_name `.", +"type": "string" +}, +"ipv4Compat": { +"description": "When binding to an IPv6 address above, this enables `IPv4 compatibility `_. Binding to ``::`` will allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 space as ``::FFFF:``.", +"type": "boolean" +}, +"namedPort": { +"description": "This is only valid if :ref:`resolver_name ` is specified below and the named resolver is capable of named port resolution.", +"type": "string" +}, +"portValue": { +"format": "uint32", +"type": "integer" +}, +"protocol": { +"enum": [ +"TCP", +"UDP" +], +"enumDescriptions": [ +"", +"" +], +"type": "string" +}, +"resolverName": { +"description": "The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with *STRICT_DNS* or *LOGICAL_DNS* will generate an error at runtime.", +"type": "string" +} +}, +"type": "object" +}, +"StaticCluster": { +"description": "Describes a statically loaded cluster.", +"id": "StaticCluster", +"properties": { +"cluster": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The cluster config.", +"type": "object" +}, +"lastUpdated": { +"description": "The timestamp when the Cluster was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"StaticListener": { +"description": "Describes a statically loaded listener.", +"id": "StaticListener", +"properties": { +"lastUpdated": { +"description": "The timestamp when the Listener was last successfully updated.", +"format": "google-datetime", +"type": "string" +}, +"listener": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The listener config.", +"type": "object" +} +}, +"type": "object" +}, +"StaticRouteConfig": { +"id": "StaticRouteConfig", +"properties": { +"lastUpdated": { +"description": "The timestamp when the Route was last updated.", +"format": "google-datetime", +"type": "string" +}, +"routeConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The route config.", +"type": "object" +} +}, +"type": "object" +}, +"StringMatcher": { +"description": "Specifies the way to match a string. [#next-free-field: 7]", +"id": "StringMatcher", +"properties": { +"exact": { +"description": "The input string must match exactly the string specified here. Examples: * *abc* only matches the value *abc*.", +"type": "string" +}, +"ignoreCase": { +"description": "If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher *data* will match both input string *Data* and *data* if set to true.", +"type": "boolean" +}, +"prefix": { +"description": "The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *abc.xyz*", +"type": "string" +}, +"regex": { +"deprecated": true, +"description": "The input string must match the regular expression specified here. The regex grammar is defined `here `_. Examples: * The regex ``\\d{3}`` matches the value *123* * The regex ``\\d{3}`` does not match the value *1234* * The regex ``\\d{3}`` does not match the value *123.456* .. attention:: This field has been deprecated in favor of `safe_regex` as it is not safe for use with untrusted input in all cases.", +"type": "string" +}, +"safeRegex": { +"$ref": "RegexMatcher", +"description": "The input string must match the regular expression specified here." +}, +"suffix": { +"description": "The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * *abc* matches the value *xyz.abc*", +"type": "string" +} +}, +"type": "object" +}, +"StructMatcher": { +"description": "StructMatcher provides a general interface to check if a given value is matched in google.protobuf.Struct. It uses `path` to retrieve the value from the struct and then check if it's matched to the specified value. For example, for the following Struct: .. code-block:: yaml fields: a: struct_value: fields: b: struct_value: fields: c: string_value: pro t: list_value: values: - string_value: m - string_value: n The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value \"pro\" from the Metadata which is matched to the specified prefix match. .. code-block:: yaml path: - key: a - key: b - key: c value: string_match: prefix: pr The following StructMatcher is matched as the code will match one of the string values in the list at the path [a, t]. .. code-block:: yaml path: - key: a - key: t value: list_match: one_of: string_match: exact: m An example use of StructMatcher is to match metadata in envoy.v*.core.Node.", +"id": "StructMatcher", +"properties": { +"path": { +"description": "The path to retrieve the Value from the Struct.", +"items": { +"$ref": "PathSegment" +}, +"type": "array" +}, +"value": { +"$ref": "ValueMatcher", +"description": "The StructMatcher is matched if the value retrieved by path is matched to this value." +} +}, +"type": "object" +}, +"UpdateFailureState": { +"id": "UpdateFailureState", +"properties": { +"details": { +"description": "Details about the last failed update attempt.", +"type": "string" +}, +"failedConfiguration": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "What the component configuration would have been if the update had succeeded.", +"type": "object" +}, +"lastUpdateAttempt": { +"description": "Time of the latest failed update attempt.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ValueMatcher": { +"description": "Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. StructValue is not supported and is always not matched. [#next-free-field: 7]", +"id": "ValueMatcher", +"properties": { +"boolMatch": { +"description": "If specified, a match occurs if and only if the target value is a bool value and is equal to this field.", +"type": "boolean" +}, +"doubleMatch": { +"$ref": "DoubleMatcher", +"description": "If specified, a match occurs if and only if the target value is a double value and is matched to this field." +}, +"listMatch": { +"$ref": "ListMatcher", +"description": "If specified, a match occurs if and only if the target value is a list value and is matched to this field." +}, +"nullMatch": { +"$ref": "NullMatch", +"description": "If specified, a match occurs if and only if the target value is a NullValue." +}, +"presentMatch": { +"description": "If specified, value match will be performed based on whether the path is referring to a valid primitive value in the metadata. If the path is referring to a non-primitive value, the result is always not matched.", +"type": "boolean" +}, +"stringMatch": { +"$ref": "StringMatcher", +"description": "If specified, a match occurs if and only if the target value is a string value and is matched to this field." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Traffic Director API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/trafficdirector.v3.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/trafficdirector.v3.json new file mode 100644 index 0000000000000000000000000000000000000000..22ba537d08a16d283ed8d746573f752519999f2c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/trafficdirector.v3.json @@ -0,0 +1,1333 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://trafficdirector.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Traffic Director Service", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/traffic-director", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "trafficdirector:v3", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://trafficdirector.mtls.googleapis.com/", +"name": "trafficdirector", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"discovery": { +"methods": { +"client_status": { +"description": "", +"flatPath": "v3/discovery:client_status", +"httpMethod": "POST", +"id": "trafficdirector.discovery.client_status", +"parameterOrder": [], +"parameters": {}, +"path": "v3/discovery:client_status", +"request": { +"$ref": "ClientStatusRequest" +}, +"response": { +"$ref": "ClientStatusResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240322", +"rootUrl": "https://trafficdirector.googleapis.com/", +"schemas": { +"Address": { +"description": "Addresses specify either a logical or physical address and port, which are used to tell Envoy where to bind/listen, connect to upstream and find management servers.", +"id": "Address", +"properties": { +"envoyInternalAddress": { +"$ref": "EnvoyInternalAddress", +"description": "Specifies a user-space address handled by :ref:`internal listeners `." +}, +"pipe": { +"$ref": "Pipe" +}, +"socketAddress": { +"$ref": "SocketAddress" +} +}, +"type": "object" +}, +"BuildVersion": { +"description": "BuildVersion combines SemVer version of extension with free-form build information (i.e. 'alpha', 'private-build') as a set of strings.", +"id": "BuildVersion", +"properties": { +"metadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Free-form build information. Envoy defines several well known keys in the source/common/version/version.h file", +"type": "object" +}, +"version": { +"$ref": "SemanticVersion", +"description": "SemVer version of extension." +} +}, +"type": "object" +}, +"ClientConfig": { +"description": "All xds configs for a particular client.", +"id": "ClientConfig", +"properties": { +"clientScope": { +"description": "For xDS clients, the scope in which the data is used. For example, gRPC indicates the data plane target or that the data is associated with gRPC server(s).", +"type": "string" +}, +"genericXdsConfigs": { +"description": "Represents generic xDS config and the exact config structure depends on the type URL (like Cluster if it is CDS)", +"items": { +"$ref": "GenericXdsConfig" +}, +"type": "array" +}, +"node": { +"$ref": "Node", +"description": "Node for a particular client." +}, +"xdsConfig": { +"deprecated": true, +"description": "This field is deprecated in favor of generic_xds_configs which is much simpler and uniform in structure.", +"items": { +"$ref": "PerXdsConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClientStatusRequest": { +"description": "Request for client status of clients identified by a list of NodeMatchers.", +"id": "ClientStatusRequest", +"properties": { +"excludeResourceContents": { +"description": "If true, the server will not include the resource contents in the response (i.e., the generic_xds_configs.xds_config field will not be populated). [#not-implemented-hide:]", +"type": "boolean" +}, +"node": { +"$ref": "Node", +"description": "The node making the csds request." +}, +"nodeMatchers": { +"description": "Management server can use these match criteria to identify clients. The match follows OR semantics.", +"items": { +"$ref": "NodeMatcher" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClientStatusResponse": { +"id": "ClientStatusResponse", +"properties": { +"config": { +"description": "Client configs for the clients specified in the ClientStatusRequest.", +"items": { +"$ref": "ClientConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClustersConfigDump": { +"description": "Envoy's cluster manager fills this message with all currently known clusters. Cluster configuration information can be used to recreate an Envoy configuration by populating all clusters as static clusters or by returning them in a CDS response.", +"id": "ClustersConfigDump", +"properties": { +"dynamicActiveClusters": { +"description": "The dynamically loaded active clusters. These are clusters that are available to service data plane traffic.", +"items": { +"$ref": "DynamicCluster" +}, +"type": "array" +}, +"dynamicWarmingClusters": { +"description": "The dynamically loaded warming clusters. These are clusters that are currently undergoing warming in preparation to service data plane traffic. Note that if attempting to recreate an Envoy configuration from a configuration dump, the warming clusters should generally be discarded.", +"items": { +"$ref": "DynamicCluster" +}, +"type": "array" +}, +"staticClusters": { +"description": "The statically loaded cluster configs.", +"items": { +"$ref": "StaticCluster" +}, +"type": "array" +}, +"versionInfo": { +"description": "This is the :ref:`version_info ` in the last processed CDS discovery response. If there are only static bootstrap clusters, this field will be \"\".", +"type": "string" +} +}, +"type": "object" +}, +"ContextParams": { +"description": "Additional parameters that can be used to select resource variants. These include any global context parameters, per-resource type client feature capabilities and per-resource type functional attributes. All per-resource type attributes will be `xds.resource.` prefixed and some of these are documented below: `xds.resource.listening_address`: The value is \"IP:port\" (e.g. \"10.1.1.3:8080\") which is the listening address of a Listener. Used in a Listener resource query.", +"id": "ContextParams", +"properties": { +"params": { +"additionalProperties": { +"type": "string" +}, +"type": "object" +} +}, +"type": "object" +}, +"DoubleMatcher": { +"description": "Specifies the way to match a double value.", +"id": "DoubleMatcher", +"properties": { +"exact": { +"description": "If specified, the input double value must be equal to the value specified here.", +"format": "double", +"type": "number" +}, +"range": { +"$ref": "DoubleRange", +"description": "If specified, the input double value must be in the range specified here. Note: The range is using half-open interval semantics [start, end)." +} +}, +"type": "object" +}, +"DoubleRange": { +"description": "Specifies the double start and end of the range using half-open interval semantics [start, end).", +"id": "DoubleRange", +"properties": { +"end": { +"description": "end of the range (exclusive)", +"format": "double", +"type": "number" +}, +"start": { +"description": "start of the range (inclusive)", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"DynamicCluster": { +"description": "Describes a dynamically loaded cluster via the CDS API. [#next-free-field: 6]", +"id": "DynamicCluster", +"properties": { +"clientStatus": { +"description": "The client status of this resource. [#not-implemented-hide:]", +"enum": [ +"UNKNOWN", +"REQUESTED", +"DOES_NOT_EXIST", +"ACKED", +"NACKED" +], +"enumDescriptions": [ +"Resource status is not available/unknown.", +"Client requested this resource but hasn't received any update from management server. The client will not fail requests, but will queue them until update arrives or the client times out waiting for the resource.", +"This resource has been requested by the client but has either not been delivered by the server or was previously delivered by the server and then subsequently removed from resources provided by the server. For more information, please refer to the :ref:`\"Knowing When a Requested Resource Does Not Exist\" ` section.", +"Client received this resource and replied with ACK.", +"Client received this resource and replied with NACK." +], +"type": "string" +}, +"cluster": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The cluster config.", +"type": "object" +}, +"errorState": { +"$ref": "UpdateFailureState", +"description": "Set if the last update failed, cleared after the next successful update. The ``error_state`` field contains the rejected version of this particular resource along with the reason and timestamp. For successfully updated or acknowledged resource, this field should be empty. [#not-implemented-hide:]" +}, +"lastUpdated": { +"description": "The timestamp when the Cluster was last updated.", +"format": "google-datetime", +"type": "string" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the cluster was loaded. In the future, discrete per-cluster versions may be supported by the API.", +"type": "string" +} +}, +"type": "object" +}, +"DynamicEndpointConfig": { +"description": "[#next-free-field: 6]", +"id": "DynamicEndpointConfig", +"properties": { +"clientStatus": { +"description": "The client status of this resource. [#not-implemented-hide:]", +"enum": [ +"UNKNOWN", +"REQUESTED", +"DOES_NOT_EXIST", +"ACKED", +"NACKED" +], +"enumDescriptions": [ +"Resource status is not available/unknown.", +"Client requested this resource but hasn't received any update from management server. The client will not fail requests, but will queue them until update arrives or the client times out waiting for the resource.", +"This resource has been requested by the client but has either not been delivered by the server or was previously delivered by the server and then subsequently removed from resources provided by the server. For more information, please refer to the :ref:`\"Knowing When a Requested Resource Does Not Exist\" ` section.", +"Client received this resource and replied with ACK.", +"Client received this resource and replied with NACK." +], +"type": "string" +}, +"endpointConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The endpoint config.", +"type": "object" +}, +"errorState": { +"$ref": "UpdateFailureState", +"description": "Set if the last update failed, cleared after the next successful update. The ``error_state`` field contains the rejected version of this particular resource along with the reason and timestamp. For successfully updated or acknowledged resource, this field should be empty. [#not-implemented-hide:]" +}, +"lastUpdated": { +"description": "[#not-implemented-hide:] The timestamp when the Endpoint was last updated.", +"format": "google-datetime", +"type": "string" +}, +"versionInfo": { +"description": "[#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the endpoint configuration was loaded.", +"type": "string" +} +}, +"type": "object" +}, +"DynamicListener": { +"description": "Describes a dynamically loaded listener via the LDS API. [#next-free-field: 7]", +"id": "DynamicListener", +"properties": { +"activeState": { +"$ref": "DynamicListenerState", +"description": "The listener state for any active listener by this name. These are listeners that are available to service data plane traffic." +}, +"clientStatus": { +"description": "The client status of this resource. [#not-implemented-hide:]", +"enum": [ +"UNKNOWN", +"REQUESTED", +"DOES_NOT_EXIST", +"ACKED", +"NACKED" +], +"enumDescriptions": [ +"Resource status is not available/unknown.", +"Client requested this resource but hasn't received any update from management server. The client will not fail requests, but will queue them until update arrives or the client times out waiting for the resource.", +"This resource has been requested by the client but has either not been delivered by the server or was previously delivered by the server and then subsequently removed from resources provided by the server. For more information, please refer to the :ref:`\"Knowing When a Requested Resource Does Not Exist\" ` section.", +"Client received this resource and replied with ACK.", +"Client received this resource and replied with NACK." +], +"type": "string" +}, +"drainingState": { +"$ref": "DynamicListenerState", +"description": "The listener state for any draining listener by this name. These are listeners that are currently undergoing draining in preparation to stop servicing data plane traffic. Note that if attempting to recreate an Envoy configuration from a configuration dump, the draining listeners should generally be discarded." +}, +"errorState": { +"$ref": "UpdateFailureState", +"description": "Set if the last update failed, cleared after the next successful update. The ``error_state`` field contains the rejected version of this particular resource along with the reason and timestamp. For successfully updated or acknowledged resource, this field should be empty." +}, +"name": { +"description": "The name or unique id of this listener, pulled from the DynamicListenerState config.", +"type": "string" +}, +"warmingState": { +"$ref": "DynamicListenerState", +"description": "The listener state for any warming listener by this name. These are listeners that are currently undergoing warming in preparation to service data plane traffic. Note that if attempting to recreate an Envoy configuration from a configuration dump, the warming listeners should generally be discarded." +} +}, +"type": "object" +}, +"DynamicListenerState": { +"id": "DynamicListenerState", +"properties": { +"lastUpdated": { +"description": "The timestamp when the Listener was last successfully updated.", +"format": "google-datetime", +"type": "string" +}, +"listener": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The listener config.", +"type": "object" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the listener was loaded. In the future, discrete per-listener versions may be supported by the API.", +"type": "string" +} +}, +"type": "object" +}, +"DynamicRouteConfig": { +"description": "[#next-free-field: 6]", +"id": "DynamicRouteConfig", +"properties": { +"clientStatus": { +"description": "The client status of this resource. [#not-implemented-hide:]", +"enum": [ +"UNKNOWN", +"REQUESTED", +"DOES_NOT_EXIST", +"ACKED", +"NACKED" +], +"enumDescriptions": [ +"Resource status is not available/unknown.", +"Client requested this resource but hasn't received any update from management server. The client will not fail requests, but will queue them until update arrives or the client times out waiting for the resource.", +"This resource has been requested by the client but has either not been delivered by the server or was previously delivered by the server and then subsequently removed from resources provided by the server. For more information, please refer to the :ref:`\"Knowing When a Requested Resource Does Not Exist\" ` section.", +"Client received this resource and replied with ACK.", +"Client received this resource and replied with NACK." +], +"type": "string" +}, +"errorState": { +"$ref": "UpdateFailureState", +"description": "Set if the last update failed, cleared after the next successful update. The ``error_state`` field contains the rejected version of this particular resource along with the reason and timestamp. For successfully updated or acknowledged resource, this field should be empty. [#not-implemented-hide:]" +}, +"lastUpdated": { +"description": "The timestamp when the Route was last updated.", +"format": "google-datetime", +"type": "string" +}, +"routeConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The route config.", +"type": "object" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the route configuration was loaded.", +"type": "string" +} +}, +"type": "object" +}, +"DynamicScopedRouteConfigs": { +"description": "[#next-free-field: 7]", +"id": "DynamicScopedRouteConfigs", +"properties": { +"clientStatus": { +"description": "The client status of this resource. [#not-implemented-hide:]", +"enum": [ +"UNKNOWN", +"REQUESTED", +"DOES_NOT_EXIST", +"ACKED", +"NACKED" +], +"enumDescriptions": [ +"Resource status is not available/unknown.", +"Client requested this resource but hasn't received any update from management server. The client will not fail requests, but will queue them until update arrives or the client times out waiting for the resource.", +"This resource has been requested by the client but has either not been delivered by the server or was previously delivered by the server and then subsequently removed from resources provided by the server. For more information, please refer to the :ref:`\"Knowing When a Requested Resource Does Not Exist\" ` section.", +"Client received this resource and replied with ACK.", +"Client received this resource and replied with NACK." +], +"type": "string" +}, +"errorState": { +"$ref": "UpdateFailureState", +"description": "Set if the last update failed, cleared after the next successful update. The ``error_state`` field contains the rejected version of this particular resource along with the reason and timestamp. For successfully updated or acknowledged resource, this field should be empty. [#not-implemented-hide:]" +}, +"lastUpdated": { +"description": "The timestamp when the scoped route config set was last updated.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The name assigned to the scoped route configurations.", +"type": "string" +}, +"scopedRouteConfigs": { +"description": "The scoped route configurations.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"versionInfo": { +"description": "This is the per-resource version information. This version is currently taken from the :ref:`version_info ` field at the time that the scoped routes configuration was loaded.", +"type": "string" +} +}, +"type": "object" +}, +"EndpointsConfigDump": { +"description": "Envoy's admin fill this message with all currently known endpoints. Endpoint configuration information can be used to recreate an Envoy configuration by populating all endpoints as static endpoints or by returning them in an EDS response.", +"id": "EndpointsConfigDump", +"properties": { +"dynamicEndpointConfigs": { +"description": "The dynamically loaded endpoint configs.", +"items": { +"$ref": "DynamicEndpointConfig" +}, +"type": "array" +}, +"staticEndpointConfigs": { +"description": "The statically loaded endpoint configs.", +"items": { +"$ref": "StaticEndpointConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"EnvoyInternalAddress": { +"description": "The address represents an envoy internal listener. [#comment: ", +"id": "EnvoyInternalAddress", +"properties": { +"endpointId": { +"description": "Specifies an endpoint identifier to distinguish between multiple endpoints for the same internal listener in a single upstream pool. Only used in the upstream addresses for tracking changes to individual endpoints. This, for example, may be set to the final destination IP for the target internal listener.", +"type": "string" +}, +"serverListenerName": { +"description": "Specifies the :ref:`name ` of the internal listener.", +"type": "string" +} +}, +"type": "object" +}, +"Extension": { +"description": "Version and identification for an Envoy extension. [#next-free-field: 7]", +"id": "Extension", +"properties": { +"category": { +"description": "Category of the extension. Extension category names use reverse DNS notation. For instance \"envoy.filters.listener\" for Envoy's built-in listener filters or \"com.acme.filters.http\" for HTTP filters from acme.com vendor. [#comment:", +"type": "string" +}, +"disabled": { +"description": "Indicates that the extension is present but was disabled via dynamic configuration.", +"type": "boolean" +}, +"name": { +"description": "This is the name of the Envoy filter as specified in the Envoy configuration, e.g. envoy.filters.http.router, com.acme.widget.", +"type": "string" +}, +"typeDescriptor": { +"deprecated": true, +"description": "[#not-implemented-hide:] Type descriptor of extension configuration proto. [#comment:", +"type": "string" +}, +"typeUrls": { +"description": "Type URLs of extension configuration protos.", +"items": { +"type": "string" +}, +"type": "array" +}, +"version": { +"$ref": "BuildVersion", +"description": "The version is a property of the extension and maintained independently of other extensions and the Envoy API. This field is not set when extension did not provide version information." +} +}, +"type": "object" +}, +"GenericXdsConfig": { +"description": "GenericXdsConfig is used to specify the config status and the dump of any xDS resource identified by their type URL. It is the generalized version of the now deprecated ListenersConfigDump, ClustersConfigDump etc [#next-free-field: 10]", +"id": "GenericXdsConfig", +"properties": { +"clientStatus": { +"description": "Per xDS resource status from the view of a xDS client", +"enum": [ +"UNKNOWN", +"REQUESTED", +"DOES_NOT_EXIST", +"ACKED", +"NACKED" +], +"enumDescriptions": [ +"Resource status is not available/unknown.", +"Client requested this resource but hasn't received any update from management server. The client will not fail requests, but will queue them until update arrives or the client times out waiting for the resource.", +"This resource has been requested by the client but has either not been delivered by the server or was previously delivered by the server and then subsequently removed from resources provided by the server. For more information, please refer to the :ref:`\"Knowing When a Requested Resource Does Not Exist\" ` section.", +"Client received this resource and replied with ACK.", +"Client received this resource and replied with NACK." +], +"type": "string" +}, +"configStatus": { +"description": "Per xDS resource config status. It is generated by management servers. It will not be present if the CSDS server is an xDS client.", +"enum": [ +"UNKNOWN", +"SYNCED", +"NOT_SENT", +"STALE", +"ERROR" +], +"enumDescriptions": [ +"Status info is not available/unknown.", +"Management server has sent the config to client and received ACK.", +"Config is not sent.", +"Management server has sent the config to client but hasn\u2019t received ACK/NACK.", +"Management server has sent the config to client but received NACK. The attached config dump will be the latest config (the rejected one), since it is the persisted version in the management server." +], +"type": "string" +}, +"errorState": { +"$ref": "UpdateFailureState", +"description": "Set if the last update failed, cleared after the next successful update. The *error_state* field contains the rejected version of this particular resource along with the reason and timestamp. For successfully updated or acknowledged resource, this field should be empty. [#not-implemented-hide:]" +}, +"isStaticResource": { +"description": "Is static resource is true if it is specified in the config supplied through the file at the startup.", +"type": "boolean" +}, +"lastUpdated": { +"description": "Timestamp when the xDS resource was last updated", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Name of the xDS resource", +"type": "string" +}, +"typeUrl": { +"description": "Type_url represents the fully qualified name of xDS resource type like envoy.v3.Cluster, envoy.v3.ClusterLoadAssignment etc.", +"type": "string" +}, +"versionInfo": { +"description": "This is the :ref:`version_info ` in the last processed xDS discovery response. If there are only static bootstrap listeners, this field will be \"\"", +"type": "string" +}, +"xdsConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The xDS resource config. Actual content depends on the type", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRE2": { +"description": "Google's `RE2 `_ regex engine. The regex string must adhere to the documented `syntax `_. The engine is designed to complete execution in linear time as well as limit the amount of memory used. Envoy supports program size checking via runtime. The runtime keys ``re2.max_program_size.error_level`` and ``re2.max_program_size.warn_level`` can be set to integers as the maximum program size or complexity that a compiled regex can have before an exception is thrown or a warning is logged, respectively. ``re2.max_program_size.error_level`` defaults to 100, and ``re2.max_program_size.warn_level`` has no default if unset (will not check/log a warning). Envoy emits two stats for tracking the program size of regexes: the histogram ``re2.program_size``, which records the program size, and the counter ``re2.exceeded_warn_level``, which is incremented each time the program size exceeds the warn level threshold.", +"id": "GoogleRE2", +"properties": { +"maxProgramSize": { +"deprecated": true, +"description": "This field controls the RE2 \"program size\" which is a rough estimate of how complex a compiled regex is to evaluate. A regex that has a program size greater than the configured value will fail to compile. In this case, the configured max program size can be increased or the regex can be simplified. If not specified, the default is 100. This field is deprecated; regexp validation should be performed on the management server instead of being done by each individual client. .. note:: Although this field is deprecated, the program size will still be checked against the global ``re2.max_program_size.error_level`` runtime value.", +"format": "uint32", +"type": "integer" +} +}, +"type": "object" +}, +"InlineScopedRouteConfigs": { +"id": "InlineScopedRouteConfigs", +"properties": { +"lastUpdated": { +"description": "The timestamp when the scoped route config set was last updated.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "The name assigned to the scoped route configurations.", +"type": "string" +}, +"scopedRouteConfigs": { +"description": "The scoped route configurations.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListMatcher": { +"description": "Specifies the way to match a list value.", +"id": "ListMatcher", +"properties": { +"oneOf": { +"$ref": "ValueMatcher", +"description": "If specified, at least one of the values in the list must match the value specified." +} +}, +"type": "object" +}, +"ListenersConfigDump": { +"description": "Envoy's listener manager fills this message with all currently known listeners. Listener configuration information can be used to recreate an Envoy configuration by populating all listeners as static listeners or by returning them in a LDS response.", +"id": "ListenersConfigDump", +"properties": { +"dynamicListeners": { +"description": "State for any warming, active, or draining listeners.", +"items": { +"$ref": "DynamicListener" +}, +"type": "array" +}, +"staticListeners": { +"description": "The statically loaded listener configs.", +"items": { +"$ref": "StaticListener" +}, +"type": "array" +}, +"versionInfo": { +"description": "This is the :ref:`version_info ` in the last processed LDS discovery response. If there are only static bootstrap listeners, this field will be \"\".", +"type": "string" +} +}, +"type": "object" +}, +"Locality": { +"description": "Identifies location of where either Envoy runs or where upstream hosts run.", +"id": "Locality", +"properties": { +"region": { +"description": "Region this :ref:`zone ` belongs to.", +"type": "string" +}, +"subZone": { +"description": "When used for locality of upstream hosts, this field further splits zone into smaller chunks of sub-zones so they can be load balanced independently.", +"type": "string" +}, +"zone": { +"description": "Defines the local service zone where Envoy is running. Though optional, it should be set if discovery service routing is used and the discovery service exposes :ref:`zone data `, either in this message or via :option:`--service-zone`. The meaning of zone is context dependent, e.g. `Availability Zone (AZ) `_ on AWS, `Zone `_ on GCP, etc.", +"type": "string" +} +}, +"type": "object" +}, +"Node": { +"description": "Identifies a specific Envoy instance. The node identifier is presented to the management server, which may use this identifier to distinguish per Envoy configuration for serving. [#next-free-field: 13]", +"id": "Node", +"properties": { +"clientFeatures": { +"description": "Client feature support list. These are well known features described in the Envoy API repository for a given major version of an API. Client features use reverse DNS naming scheme, for example ``com.acme.feature``. See :ref:`the list of features ` that xDS client may support.", +"items": { +"type": "string" +}, +"type": "array" +}, +"cluster": { +"description": "Defines the local service cluster name where Envoy is running. Though optional, it should be set if any of the following features are used: :ref:`statsd `, :ref:`health check cluster verification `, :ref:`runtime override directory `, :ref:`user agent addition `, :ref:`HTTP global rate limiting `, :ref:`CDS `, and :ref:`HTTP tracing `, either in this message or via :option:`--service-cluster`.", +"type": "string" +}, +"dynamicParameters": { +"additionalProperties": { +"$ref": "ContextParams" +}, +"description": "Map from xDS resource type URL to dynamic context parameters. These may vary at runtime (unlike other fields in this message). For example, the xDS client may have a shard identifier that changes during the lifetime of the xDS client. In Envoy, this would be achieved by updating the dynamic context on the Server::Instance's LocalInfo context provider. The shard ID dynamic parameter then appears in this field during future discovery requests.", +"type": "object" +}, +"extensions": { +"description": "List of extensions and their versions supported by the node.", +"items": { +"$ref": "Extension" +}, +"type": "array" +}, +"id": { +"description": "An opaque node identifier for the Envoy node. This also provides the local service node name. It should be set if any of the following features are used: :ref:`statsd `, :ref:`CDS `, and :ref:`HTTP tracing `, either in this message or via :option:`--service-node`.", +"type": "string" +}, +"listeningAddresses": { +"deprecated": true, +"description": "Known listening ports on the node as a generic hint to the management server for filtering :ref:`listeners ` to be returned. For example, if there is a listener bound to port 80, the list can optionally contain the SocketAddress ``(0.0.0.0,80)``. The field is optional and just a hint.", +"items": { +"$ref": "Address" +}, +"type": "array" +}, +"locality": { +"$ref": "Locality", +"description": "Locality specifying where the Envoy instance is running." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object.", +"type": "any" +}, +"description": "Opaque metadata extending the node identifier. Envoy will pass this directly to the management server.", +"type": "object" +}, +"userAgentBuildVersion": { +"$ref": "BuildVersion", +"description": "Structured version of the entity requesting config." +}, +"userAgentName": { +"description": "Free-form string that identifies the entity requesting config. E.g. \"envoy\" or \"grpc\"", +"type": "string" +}, +"userAgentVersion": { +"description": "Free-form string that identifies the version of the entity requesting config. E.g. \"1.12.2\" or \"abcd1234\", or \"SpecialEnvoyBuild\"", +"type": "string" +} +}, +"type": "object" +}, +"NodeMatcher": { +"description": "Specifies the way to match a Node. The match follows AND semantics.", +"id": "NodeMatcher", +"properties": { +"nodeId": { +"$ref": "StringMatcher", +"description": "Specifies match criteria on the node id." +}, +"nodeMetadatas": { +"description": "Specifies match criteria on the node metadata.", +"items": { +"$ref": "StructMatcher" +}, +"type": "array" +} +}, +"type": "object" +}, +"NullMatch": { +"description": "NullMatch is an empty message to specify a null value.", +"id": "NullMatch", +"properties": {}, +"type": "object" +}, +"OrMatcher": { +"description": "Specifies a list of alternatives for the match.", +"id": "OrMatcher", +"properties": { +"valueMatchers": { +"items": { +"$ref": "ValueMatcher" +}, +"type": "array" +} +}, +"type": "object" +}, +"PathSegment": { +"description": "Specifies the segment in a path to retrieve value from Struct.", +"id": "PathSegment", +"properties": { +"key": { +"description": "If specified, use the key to retrieve the value in a Struct.", +"type": "string" +} +}, +"type": "object" +}, +"PerXdsConfig": { +"description": "Detailed config (per xDS) with status. [#next-free-field: 8]", +"id": "PerXdsConfig", +"properties": { +"clientStatus": { +"deprecated": true, +"description": "Client config status is populated by xDS clients. Will not be present if the CSDS server is an xDS server. No matter what the client config status is, xDS clients should always dump the most recent accepted xDS config. .. attention:: This field is deprecated. Use :ref:`ClientResourceStatus ` for per-resource config status instead.", +"enum": [ +"CLIENT_UNKNOWN", +"CLIENT_REQUESTED", +"CLIENT_ACKED", +"CLIENT_NACKED" +], +"enumDescriptions": [ +"Config status is not available/unknown.", +"Client requested the config but hasn't received any config from management server yet.", +"Client received the config and replied with ACK.", +"Client received the config and replied with NACK. Notably, the attached config dump is not the NACKed version, but the most recent accepted one. If no config is accepted yet, the attached config dump will be empty." +], +"type": "string" +}, +"clusterConfig": { +"$ref": "ClustersConfigDump" +}, +"endpointConfig": { +"$ref": "EndpointsConfigDump" +}, +"listenerConfig": { +"$ref": "ListenersConfigDump" +}, +"routeConfig": { +"$ref": "RoutesConfigDump" +}, +"scopedRouteConfig": { +"$ref": "ScopedRoutesConfigDump" +}, +"status": { +"description": "Config status generated by management servers. Will not be present if the CSDS server is an xDS client.", +"enum": [ +"UNKNOWN", +"SYNCED", +"NOT_SENT", +"STALE", +"ERROR" +], +"enumDescriptions": [ +"Status info is not available/unknown.", +"Management server has sent the config to client and received ACK.", +"Config is not sent.", +"Management server has sent the config to client but hasn\u2019t received ACK/NACK.", +"Management server has sent the config to client but received NACK. The attached config dump will be the latest config (the rejected one), since it is the persisted version in the management server." +], +"type": "string" +} +}, +"type": "object" +}, +"Pipe": { +"id": "Pipe", +"properties": { +"mode": { +"description": "The mode for the Pipe. Not applicable for abstract sockets.", +"format": "uint32", +"type": "integer" +}, +"path": { +"description": "Unix Domain Socket path. On Linux, paths starting with '@' will use the abstract namespace. The starting '@' is replaced by a null byte by Envoy. Paths starting with '@' will result in an error in environments other than Linux.", +"type": "string" +} +}, +"type": "object" +}, +"RegexMatcher": { +"description": "A regex matcher designed for safety when used with untrusted input.", +"id": "RegexMatcher", +"properties": { +"googleRe2": { +"$ref": "GoogleRE2", +"deprecated": true, +"description": "Google's RE2 regex engine." +}, +"regex": { +"description": "The regex match string. The string must be supported by the configured engine. The regex is matched against the full string, not as a partial match.", +"type": "string" +} +}, +"type": "object" +}, +"RoutesConfigDump": { +"description": "Envoy's RDS implementation fills this message with all currently loaded routes, as described by their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration or defined inline while configuring listeners are separated from those configured dynamically via RDS. Route configuration information can be used to recreate an Envoy configuration by populating all routes as static routes or by returning them in RDS responses.", +"id": "RoutesConfigDump", +"properties": { +"dynamicRouteConfigs": { +"description": "The dynamically loaded route configs.", +"items": { +"$ref": "DynamicRouteConfig" +}, +"type": "array" +}, +"staticRouteConfigs": { +"description": "The statically loaded route configs.", +"items": { +"$ref": "StaticRouteConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ScopedRoutesConfigDump": { +"description": "Envoy's scoped RDS implementation fills this message with all currently loaded route configuration scopes (defined via ScopedRouteConfigurationsSet protos). This message lists both the scopes defined inline with the higher order object (i.e., the HttpConnectionManager) and the dynamically obtained scopes via the SRDS API.", +"id": "ScopedRoutesConfigDump", +"properties": { +"dynamicScopedRouteConfigs": { +"description": "The dynamically loaded scoped route configs.", +"items": { +"$ref": "DynamicScopedRouteConfigs" +}, +"type": "array" +}, +"inlineScopedRouteConfigs": { +"description": "The statically loaded scoped route configs.", +"items": { +"$ref": "InlineScopedRouteConfigs" +}, +"type": "array" +} +}, +"type": "object" +}, +"SemanticVersion": { +"description": "Envoy uses SemVer (https://semver.org/). Major/minor versions indicate expected behaviors and APIs, the patch version field is used only for security fixes and can be generally ignored.", +"id": "SemanticVersion", +"properties": { +"majorNumber": { +"format": "uint32", +"type": "integer" +}, +"minorNumber": { +"format": "uint32", +"type": "integer" +}, +"patch": { +"format": "uint32", +"type": "integer" +} +}, +"type": "object" +}, +"SocketAddress": { +"description": "[#next-free-field: 7]", +"id": "SocketAddress", +"properties": { +"address": { +"description": "The address for this socket. :ref:`Listeners ` will bind to the address. An empty address is not allowed. Specify ``0.0.0.0`` or ``::`` to bind to any address. [#comment:TODO(zuercher) reinstate when implemented: It is possible to distinguish a Listener address via the prefix/suffix matching in :ref:`FilterChainMatch `.] When used within an upstream :ref:`BindConfig `, the address controls the source address of outbound connections. For :ref:`clusters `, the cluster type determines whether the address must be an IP (``STATIC`` or ``EDS`` clusters) or a hostname resolved by DNS (``STRICT_DNS`` or ``LOGICAL_DNS`` clusters). Address resolution can be customized via :ref:`resolver_name `.", +"type": "string" +}, +"ipv4Compat": { +"description": "When binding to an IPv6 address above, this enables `IPv4 compatibility `_. Binding to ``::`` will allow both IPv4 and IPv6 connections, with peer IPv4 addresses mapped into IPv6 space as ``::FFFF:``.", +"type": "boolean" +}, +"namedPort": { +"description": "This is only valid if :ref:`resolver_name ` is specified below and the named resolver is capable of named port resolution.", +"type": "string" +}, +"portValue": { +"format": "uint32", +"type": "integer" +}, +"protocol": { +"enum": [ +"TCP", +"UDP" +], +"enumDescriptions": [ +"", +"" +], +"type": "string" +}, +"resolverName": { +"description": "The name of the custom resolver. This must have been registered with Envoy. If this is empty, a context dependent default applies. If the address is a concrete IP address, no resolution will occur. If address is a hostname this should be set for resolution other than DNS. Specifying a custom resolver with ``STRICT_DNS`` or ``LOGICAL_DNS`` will generate an error at runtime.", +"type": "string" +} +}, +"type": "object" +}, +"StaticCluster": { +"description": "Describes a statically loaded cluster.", +"id": "StaticCluster", +"properties": { +"cluster": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The cluster config.", +"type": "object" +}, +"lastUpdated": { +"description": "The timestamp when the Cluster was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"StaticEndpointConfig": { +"id": "StaticEndpointConfig", +"properties": { +"endpointConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The endpoint config.", +"type": "object" +}, +"lastUpdated": { +"description": "[#not-implemented-hide:] The timestamp when the Endpoint was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"StaticListener": { +"description": "Describes a statically loaded listener.", +"id": "StaticListener", +"properties": { +"lastUpdated": { +"description": "The timestamp when the Listener was last successfully updated.", +"format": "google-datetime", +"type": "string" +}, +"listener": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The listener config.", +"type": "object" +} +}, +"type": "object" +}, +"StaticRouteConfig": { +"id": "StaticRouteConfig", +"properties": { +"lastUpdated": { +"description": "The timestamp when the Route was last updated.", +"format": "google-datetime", +"type": "string" +}, +"routeConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The route config.", +"type": "object" +} +}, +"type": "object" +}, +"StringMatcher": { +"description": "Specifies the way to match a string. [#next-free-field: 9]", +"id": "StringMatcher", +"properties": { +"contains": { +"description": "The input string must have the substring specified here. Note: empty contains match is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc.def``", +"type": "string" +}, +"custom": { +"$ref": "TypedExtensionConfig", +"description": "Use an extension as the matcher type. [#extension-category: envoy.string_matcher]" +}, +"exact": { +"description": "The input string must match exactly the string specified here. Examples: * ``abc`` only matches the value ``abc``.", +"type": "string" +}, +"ignoreCase": { +"description": "If true, indicates the exact/prefix/suffix/contains matching should be case insensitive. This has no effect for the safe_regex match. For example, the matcher ``data`` will match both input string ``Data`` and ``data`` if set to true.", +"type": "boolean" +}, +"prefix": { +"description": "The input string must have the prefix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``abc.xyz``", +"type": "string" +}, +"safeRegex": { +"$ref": "RegexMatcher", +"description": "The input string must match the regular expression specified here." +}, +"suffix": { +"description": "The input string must have the suffix specified here. Note: empty prefix is not allowed, please use regex instead. Examples: * ``abc`` matches the value ``xyz.abc``", +"type": "string" +} +}, +"type": "object" +}, +"StructMatcher": { +"description": "StructMatcher provides a general interface to check if a given value is matched in google.protobuf.Struct. It uses ``path`` to retrieve the value from the struct and then check if it's matched to the specified value. For example, for the following Struct: .. code-block:: yaml fields: a: struct_value: fields: b: struct_value: fields: c: string_value: pro t: list_value: values: - string_value: m - string_value: n The following MetadataMatcher is matched as the path [a, b, c] will retrieve a string value \"pro\" from the Metadata which is matched to the specified prefix match. .. code-block:: yaml path: - key: a - key: b - key: c value: string_match: prefix: pr The following StructMatcher is matched as the code will match one of the string values in the list at the path [a, t]. .. code-block:: yaml path: - key: a - key: t value: list_match: one_of: string_match: exact: m An example use of StructMatcher is to match metadata in envoy.v*.core.Node.", +"id": "StructMatcher", +"properties": { +"path": { +"description": "The path to retrieve the Value from the Struct.", +"items": { +"$ref": "PathSegment" +}, +"type": "array" +}, +"value": { +"$ref": "ValueMatcher", +"description": "The StructMatcher is matched if the value retrieved by path is matched to this value." +} +}, +"type": "object" +}, +"TypedExtensionConfig": { +"description": "Message type for extension configuration.", +"id": "TypedExtensionConfig", +"properties": { +"name": { +"description": "The name of an extension. This is not used to select the extension, instead it serves the role of an opaque identifier.", +"type": "string" +}, +"typedConfig": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The typed config for the extension. The type URL will be used to identify the extension. In the case that the type URL is *xds.type.v3.TypedStruct* (or, for historical reasons, *udpa.type.v1.TypedStruct*), the inner type URL of *TypedStruct* will be utilized. See the :ref:`extension configuration overview ` for further details.", +"type": "object" +} +}, +"type": "object" +}, +"UpdateFailureState": { +"id": "UpdateFailureState", +"properties": { +"details": { +"description": "Details about the last failed update attempt.", +"type": "string" +}, +"failedConfiguration": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "What the component configuration would have been if the update had succeeded. This field may not be populated by xDS clients due to storage overhead.", +"type": "object" +}, +"lastUpdateAttempt": { +"description": "Time of the latest failed update attempt.", +"format": "google-datetime", +"type": "string" +}, +"versionInfo": { +"description": "This is the version of the rejected resource. [#not-implemented-hide:]", +"type": "string" +} +}, +"type": "object" +}, +"ValueMatcher": { +"description": "Specifies the way to match a ProtobufWkt::Value. Primitive values and ListValue are supported. StructValue is not supported and is always not matched. [#next-free-field: 8]", +"id": "ValueMatcher", +"properties": { +"boolMatch": { +"description": "If specified, a match occurs if and only if the target value is a bool value and is equal to this field.", +"type": "boolean" +}, +"doubleMatch": { +"$ref": "DoubleMatcher", +"description": "If specified, a match occurs if and only if the target value is a double value and is matched to this field." +}, +"listMatch": { +"$ref": "ListMatcher", +"description": "If specified, a match occurs if and only if the target value is a list value and is matched to this field." +}, +"nullMatch": { +"$ref": "NullMatch", +"description": "If specified, a match occurs if and only if the target value is a NullValue." +}, +"orMatch": { +"$ref": "OrMatcher", +"description": "If specified, a match occurs if and only if any of the alternatives in the match accept the value." +}, +"presentMatch": { +"description": "If specified, value match will be performed based on whether the path is referring to a valid primitive value in the metadata. If the path is referring to a non-primitive value, the result is always not matched.", +"type": "boolean" +}, +"stringMatch": { +"$ref": "StringMatcher", +"description": "If specified, a match occurs if and only if the target value is a string value and is matched to this field." +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Traffic Director API", +"version": "v3", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/transcoder.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/transcoder.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..323c9d11fa4a71e463576c547859994886c4bc21 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/transcoder.v1.json @@ -0,0 +1,1954 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://transcoder.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Transcoder", +"description": "This API converts video files into formats suitable for consumer distribution. For more information, see the Transcoder API overview. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/transcoder/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "transcoder:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://transcoder.mtls.googleapis.com/", +"name": "transcoder", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"jobTemplates": { +"methods": { +"create": { +"description": "Creates a job template in the specified region.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobTemplates", +"httpMethod": "POST", +"id": "transcoder.projects.locations.jobTemplates.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"jobTemplateId": { +"description": "Required. The ID to use for the job template, which will become the final component of the job template's resource name. This value should be 4-63 characters, and valid characters must match the regular expression `a-zA-Z*`.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent location to create this job template. Format: `projects/{project}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/jobTemplates", +"request": { +"$ref": "JobTemplate" +}, +"response": { +"$ref": "JobTemplate" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a job template.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobTemplates/{jobTemplatesId}", +"httpMethod": "DELETE", +"id": "transcoder.projects.locations.jobTemplates.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "If set to true, and the job template is not found, the request will succeed but no action will be taken on the server.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The name of the job template to delete. `projects/{project}/locations/{location}/jobTemplates/{job_template}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the job template data.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobTemplates/{jobTemplatesId}", +"httpMethod": "GET", +"id": "transcoder.projects.locations.jobTemplates.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the job template to retrieve. Format: `projects/{project}/locations/{location}/jobTemplates/{job_template}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "JobTemplate" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists job templates in the specified region.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobTemplates", +"httpMethod": "GET", +"id": "transcoder.projects.locations.jobTemplates.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression, following the syntax outlined in https://google.aip.dev/160.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The `next_page_token` value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent location from which to retrieve the collection of job templates. Format: `projects/{project}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/jobTemplates", +"response": { +"$ref": "ListJobTemplatesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"jobs": { +"methods": { +"create": { +"description": "Creates a job in the specified region.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs", +"httpMethod": "POST", +"id": "transcoder.projects.locations.jobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent location to create and process this job. Format: `projects/{project}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/jobs", +"request": { +"$ref": "Job" +}, +"response": { +"$ref": "Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a job.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", +"httpMethod": "DELETE", +"id": "transcoder.projects.locations.jobs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "If set to true, and the job is not found, the request will succeed but no action will be taken on the server.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The name of the job to delete. Format: `projects/{project}/locations/{location}/jobs/{job}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the job data.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", +"httpMethod": "GET", +"id": "transcoder.projects.locations.jobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the job to retrieve. Format: `projects/{project}/locations/{location}/jobs/{job}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Job" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists jobs in the specified region.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/jobs", +"httpMethod": "GET", +"id": "transcoder.projects.locations.jobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression, following the syntax outlined in https://google.aip.dev/160.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "One or more fields to compare and use to sort the output. See https://google.aip.dev/132#ordering.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The `next_page_token` value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Format: `projects/{project}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/jobs", +"response": { +"$ref": "ListJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://transcoder.googleapis.com/", +"schemas": { +"AdBreak": { +"description": "Ad break.", +"id": "AdBreak", +"properties": { +"startTimeOffset": { +"description": "Start time in seconds for the ad break, relative to the output file timeline. The default is `0s`.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"Aes128Encryption": { +"description": "Configuration for AES-128 encryption.", +"id": "Aes128Encryption", +"properties": {}, +"type": "object" +}, +"Animation": { +"description": "Animation types.", +"id": "Animation", +"properties": { +"animationEnd": { +"$ref": "AnimationEnd", +"description": "End previous animation." +}, +"animationFade": { +"$ref": "AnimationFade", +"description": "Display overlay object with fade animation." +}, +"animationStatic": { +"$ref": "AnimationStatic", +"description": "Display static overlay object." +} +}, +"type": "object" +}, +"AnimationEnd": { +"description": "End previous overlay animation from the video. Without `AnimationEnd`, the overlay object will keep the state of previous animation until the end of the video.", +"id": "AnimationEnd", +"properties": { +"startTimeOffset": { +"description": "The time to end overlay object, in seconds. Default: 0", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"AnimationFade": { +"description": "Display overlay object with fade animation.", +"id": "AnimationFade", +"properties": { +"endTimeOffset": { +"description": "The time to end the fade animation, in seconds. Default: `start_time_offset` + 1s", +"format": "google-duration", +"type": "string" +}, +"fadeType": { +"description": "Required. Type of fade animation: `FADE_IN` or `FADE_OUT`.", +"enum": [ +"FADE_TYPE_UNSPECIFIED", +"FADE_IN", +"FADE_OUT" +], +"enumDescriptions": [ +"The fade type is not specified.", +"Fade the overlay object into view.", +"Fade the overlay object out of view." +], +"type": "string" +}, +"startTimeOffset": { +"description": "The time to start the fade animation, in seconds. Default: 0", +"format": "google-duration", +"type": "string" +}, +"xy": { +"$ref": "NormalizedCoordinate", +"description": "Normalized coordinates based on output video resolution. Valid values: `0.0`\u2013`1.0`. `xy` is the upper-left coordinate of the overlay object. For example, use the x and y coordinates {0,0} to position the top-left corner of the overlay animation in the top-left corner of the output video." +} +}, +"type": "object" +}, +"AnimationStatic": { +"description": "Display static overlay object.", +"id": "AnimationStatic", +"properties": { +"startTimeOffset": { +"description": "The time to start displaying the overlay object, in seconds. Default: 0", +"format": "google-duration", +"type": "string" +}, +"xy": { +"$ref": "NormalizedCoordinate", +"description": "Normalized coordinates based on output video resolution. Valid values: `0.0`\u2013`1.0`. `xy` is the upper-left coordinate of the overlay object. For example, use the x and y coordinates {0,0} to position the top-left corner of the overlay animation in the top-left corner of the output video." +} +}, +"type": "object" +}, +"Audio": { +"description": "Audio preprocessing configuration.", +"id": "Audio", +"properties": { +"highBoost": { +"description": "Enable boosting high frequency components. The default is `false`. **Note:** This field is not supported.", +"type": "boolean" +}, +"lowBoost": { +"description": "Enable boosting low frequency components. The default is `false`. **Note:** This field is not supported.", +"type": "boolean" +}, +"lufs": { +"description": "Specify audio loudness normalization in loudness units relative to full scale (LUFS). Enter a value between -24 and 0 (the default), where: * -24 is the Advanced Television Systems Committee (ATSC A/85) standard * -23 is the EU R128 broadcast standard * -19 is the prior standard for online mono audio * -18 is the ReplayGain standard * -16 is the prior standard for stereo audio * -14 is the new online audio standard recommended by Spotify, as well as Amazon Echo * 0 disables normalization", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"AudioMapping": { +"description": "The mapping for the JobConfig.edit_list atoms with audio EditAtom.inputs.", +"id": "AudioMapping", +"properties": { +"atomKey": { +"description": "Required. The EditAtom.key that references the atom with audio inputs in the JobConfig.edit_list.", +"type": "string" +}, +"gainDb": { +"description": "Audio volume control in dB. Negative values decrease volume, positive values increase. The default is 0.", +"format": "double", +"type": "number" +}, +"inputChannel": { +"description": "Required. The zero-based index of the channel in the input audio stream.", +"format": "int32", +"type": "integer" +}, +"inputKey": { +"description": "Required. The Input.key that identifies the input file.", +"type": "string" +}, +"inputTrack": { +"description": "Required. The zero-based index of the track in the input file.", +"format": "int32", +"type": "integer" +}, +"outputChannel": { +"description": "Required. The zero-based index of the channel in the output audio stream.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AudioStream": { +"description": "Audio stream resource.", +"id": "AudioStream", +"properties": { +"bitrateBps": { +"description": "Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.", +"format": "int32", +"type": "integer" +}, +"channelCount": { +"description": "Number of audio channels. Must be between 1 and 6. The default is 2.", +"format": "int32", +"type": "integer" +}, +"channelLayout": { +"description": "A list of channel names specifying layout of the audio channels. This only affects the metadata embedded in the container headers, if supported by the specified format. The default is `[\"fl\", \"fr\"]`. Supported channel names: - `fl` - Front left channel - `fr` - Front right channel - `sl` - Side left channel - `sr` - Side right channel - `fc` - Front center channel - `lfe` - Low frequency", +"items": { +"type": "string" +}, +"type": "array" +}, +"codec": { +"description": "The codec for this audio stream. The default is `aac`. Supported audio codecs: - `aac` - `aac-he` - `aac-he-v2` - `mp3` - `ac3` - `eac3`", +"type": "string" +}, +"displayName": { +"description": "The name for this particular audio stream that will be added to the HLS/DASH manifest. Not supported in MP4 files.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not supported in MP4 files.", +"type": "string" +}, +"mapping": { +"description": "The mapping for the JobConfig.edit_list atoms with audio EditAtom.inputs.", +"items": { +"$ref": "AudioMapping" +}, +"type": "array" +}, +"sampleRateHertz": { +"description": "The audio sample rate in Hertz. The default is 48000 Hertz.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"BwdifConfig": { +"description": "Bob Weaver Deinterlacing Filter Configuration.", +"id": "BwdifConfig", +"properties": { +"deinterlaceAllFrames": { +"description": "Deinterlace all frames rather than just the frames identified as interlaced. The default is `false`.", +"type": "boolean" +}, +"mode": { +"description": "Specifies the deinterlacing mode to adopt. The default is `send_frame`. Supported values: - `send_frame`: Output one frame for each frame - `send_field`: Output one frame for each field", +"type": "string" +}, +"parity": { +"description": "The picture field parity assumed for the input interlaced video. The default is `auto`. Supported values: - `tff`: Assume the top field is first - `bff`: Assume the bottom field is first - `auto`: Enable automatic detection of field parity", +"type": "string" +} +}, +"type": "object" +}, +"Clearkey": { +"description": "Clearkey configuration.", +"id": "Clearkey", +"properties": {}, +"type": "object" +}, +"Color": { +"description": "Color preprocessing configuration. **Note:** This configuration is not supported.", +"id": "Color", +"properties": { +"brightness": { +"description": "Control brightness of the video. Enter a value between -1 and 1, where -1 is minimum brightness and 1 is maximum brightness. 0 is no change. The default is 0.", +"format": "double", +"type": "number" +}, +"contrast": { +"description": "Control black and white contrast of the video. Enter a value between -1 and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no change. The default is 0.", +"format": "double", +"type": "number" +}, +"saturation": { +"description": "Control color saturation of the video. Enter a value between -1 and 1, where -1 is fully desaturated and 1 is maximum saturation. 0 is no change. The default is 0.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Crop": { +"description": "Video cropping configuration for the input video. The cropped input video is scaled to match the output resolution.", +"id": "Crop", +"properties": { +"bottomPixels": { +"description": "The number of pixels to crop from the bottom. The default is 0.", +"format": "int32", +"type": "integer" +}, +"leftPixels": { +"description": "The number of pixels to crop from the left. The default is 0.", +"format": "int32", +"type": "integer" +}, +"rightPixels": { +"description": "The number of pixels to crop from the right. The default is 0.", +"format": "int32", +"type": "integer" +}, +"topPixels": { +"description": "The number of pixels to crop from the top. The default is 0.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DashConfig": { +"description": "`DASH` manifest configuration.", +"id": "DashConfig", +"properties": { +"segmentReferenceScheme": { +"description": "The segment reference scheme for a `DASH` manifest. The default is `SEGMENT_LIST`.", +"enum": [ +"SEGMENT_REFERENCE_SCHEME_UNSPECIFIED", +"SEGMENT_LIST", +"SEGMENT_TEMPLATE_NUMBER" +], +"enumDescriptions": [ +"The segment reference scheme is not specified.", +"Explicitly lists the URLs of media files for each segment. For example, if SegmentSettings.individual_segments is `true`, then the manifest contains fields similar to the following: ```xml ... ```", +"SegmentSettings.individual_segments must be set to `true` to use this segment reference scheme. Uses the DASH specification `` tag to determine the URLs of media files for each segment. For example: ```xml ... ```" +], +"type": "string" +} +}, +"type": "object" +}, +"Deblock": { +"description": "Deblock preprocessing configuration. **Note:** This configuration is not supported.", +"id": "Deblock", +"properties": { +"enabled": { +"description": "Enable deblocker. The default is `false`.", +"type": "boolean" +}, +"strength": { +"description": "Set strength of the deblocker. Enter a value between 0 and 1. The higher the value, the stronger the block removal. 0 is no deblocking. The default is 0.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Deinterlace": { +"description": "Deinterlace configuration for input video.", +"id": "Deinterlace", +"properties": { +"bwdif": { +"$ref": "BwdifConfig", +"description": "Specifies the Bob Weaver Deinterlacing Filter Configuration." +}, +"yadif": { +"$ref": "YadifConfig", +"description": "Specifies the Yet Another Deinterlacing Filter Configuration." +} +}, +"type": "object" +}, +"Denoise": { +"description": "Denoise preprocessing configuration. **Note:** This configuration is not supported.", +"id": "Denoise", +"properties": { +"strength": { +"description": "Set strength of the denoise. Enter a value between 0 and 1. The higher the value, the smoother the image. 0 is no denoising. The default is 0.", +"format": "double", +"type": "number" +}, +"tune": { +"description": "Set the denoiser mode. The default is `standard`. Supported denoiser modes: - `standard` - `grain`", +"type": "string" +} +}, +"type": "object" +}, +"DrmSystems": { +"description": "Defines configuration for DRM systems in use.", +"id": "DrmSystems", +"properties": { +"clearkey": { +"$ref": "Clearkey", +"description": "Clearkey configuration." +}, +"fairplay": { +"$ref": "Fairplay", +"description": "Fairplay configuration." +}, +"playready": { +"$ref": "Playready", +"description": "Playready configuration." +}, +"widevine": { +"$ref": "Widevine", +"description": "Widevine configuration." +} +}, +"type": "object" +}, +"EditAtom": { +"description": "Edit atom.", +"id": "EditAtom", +"properties": { +"endTimeOffset": { +"description": "End time in seconds for the atom, relative to the input file timeline. When `end_time_offset` is not specified, the `inputs` are used until the end of the atom.", +"format": "google-duration", +"type": "string" +}, +"inputs": { +"description": "List of Input.key values identifying files that should be used in this atom. The listed `inputs` must have the same timeline.", +"items": { +"type": "string" +}, +"type": "array" +}, +"key": { +"description": "A unique key for this atom. Must be specified when using advanced mapping.", +"type": "string" +}, +"startTimeOffset": { +"description": "Start time in seconds for the atom, relative to the input file timeline. The default is `0s`.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"ElementaryStream": { +"description": "Encoding of an input file such as an audio, video, or text track. Elementary streams must be packaged before mapping and sharing between different output formats.", +"id": "ElementaryStream", +"properties": { +"audioStream": { +"$ref": "AudioStream", +"description": "Encoding of an audio stream." +}, +"key": { +"description": "A unique key for this elementary stream.", +"type": "string" +}, +"textStream": { +"$ref": "TextStream", +"description": "Encoding of a text stream. For example, closed captions or subtitles." +}, +"videoStream": { +"$ref": "VideoStream", +"description": "Encoding of a video stream." +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Encryption": { +"description": "Encryption settings.", +"id": "Encryption", +"properties": { +"aes128": { +"$ref": "Aes128Encryption", +"description": "Configuration for AES-128 encryption." +}, +"drmSystems": { +"$ref": "DrmSystems", +"description": "Required. DRM system(s) to use; at least one must be specified. If a DRM system is omitted, it is considered disabled." +}, +"id": { +"description": "Required. Identifier for this set of encryption options.", +"type": "string" +}, +"mpegCenc": { +"$ref": "MpegCommonEncryption", +"description": "Configuration for MPEG Common Encryption (MPEG-CENC)." +}, +"sampleAes": { +"$ref": "SampleAesEncryption", +"description": "Configuration for SAMPLE-AES encryption." +}, +"secretManagerKeySource": { +"$ref": "SecretManagerSource", +"description": "Keys are stored in Google Secret Manager." +} +}, +"type": "object" +}, +"Fairplay": { +"description": "Fairplay configuration.", +"id": "Fairplay", +"properties": {}, +"type": "object" +}, +"Fmp4Config": { +"description": "`fmp4` container configuration.", +"id": "Fmp4Config", +"properties": { +"codecTag": { +"description": "Optional. Specify the codec tag string that will be used in the media bitstream. When not specified, the codec appropriate value is used. Supported H265 codec tags: - `hvc1` (default) - `hev1`", +"type": "string" +} +}, +"type": "object" +}, +"H264CodecSettings": { +"description": "H264 codec settings.", +"id": "H264CodecSettings", +"properties": { +"allowOpenGop": { +"description": "Specifies whether an open Group of Pictures (GOP) structure should be allowed or not. The default is `false`.", +"type": "boolean" +}, +"aqStrength": { +"description": "Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A higher value equals a lower bitrate but smoother image. The default is 0.", +"format": "double", +"type": "number" +}, +"bFrameCount": { +"description": "The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than H264CodecSettings.gop_frame_count if set. The default is 0.", +"format": "int32", +"type": "integer" +}, +"bPyramid": { +"description": "Allow B-pyramid for reference frame selection. This may not be supported on all decoders. The default is `false`.", +"type": "boolean" +}, +"bitrateBps": { +"description": "Required. The video bitrate in bits per second. The minimum value is 1,000. The maximum value is 800,000,000.", +"format": "int32", +"type": "integer" +}, +"crfLevel": { +"description": "Target CRF level. Must be between 10 and 36, where 10 is the highest quality and 36 is the most efficient compression. The default is 21.", +"format": "int32", +"type": "integer" +}, +"enableTwoPass": { +"description": "Use two-pass encoding strategy to achieve better video quality. H264CodecSettings.rate_control_mode must be `vbr`. The default is `false`.", +"type": "boolean" +}, +"entropyCoder": { +"description": "The entropy coder to use. The default is `cabac`. Supported entropy coders: - `cavlc` - `cabac`", +"type": "string" +}, +"frameRate": { +"description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120.", +"format": "double", +"type": "number" +}, +"frameRateConversionStrategy": { +"description": "Optional. Frame rate conversion strategy for desired frame rate. The default is `DOWNSAMPLE`.", +"enum": [ +"FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED", +"DOWNSAMPLE", +"DROP_DUPLICATE" +], +"enumDescriptions": [ +"Unspecified frame rate conversion strategy.", +"Selectively retain frames to reduce the output frame rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / target frame rate)`. When _n_ = 1 (that is, the target frame rate is greater than the input frame rate), the output frame rate matches the input frame rate. When _n_ > 1, frames are dropped and the output frame rate is equal to `(input frame rate / n)`. For more information, see [Calculate frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate).", +"Drop or duplicate frames to match the specified frame rate." +], +"type": "string" +}, +"gopDuration": { +"description": "Select the GOP size based on the specified duration. The default is `3s`. Note that `gopDuration` must be less than or equal to [`segmentDuration`](#SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`.", +"format": "google-duration", +"type": "string" +}, +"gopFrameCount": { +"description": "Select the GOP size based on the specified frame count. Must be greater than zero.", +"format": "int32", +"type": "integer" +}, +"heightPixels": { +"description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +}, +"hlg": { +"$ref": "H264ColorFormatHLG", +"description": "Optional. HLG color format setting for H264." +}, +"pixelFormat": { +"description": "Pixel format to use. The default is `yuv420p`. Supported pixel formats: - `yuv420p` pixel format - `yuv422p` pixel format - `yuv444p` pixel format - `yuv420p10` 10-bit HDR pixel format - `yuv422p10` 10-bit HDR pixel format - `yuv444p10` 10-bit HDR pixel format - `yuv420p12` 12-bit HDR pixel format - `yuv422p12` 12-bit HDR pixel format - `yuv444p12` 12-bit HDR pixel format", +"type": "string" +}, +"preset": { +"description": "Enforces the specified codec preset. The default is `veryfast`. The available options are [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset). Note that certain values for this field may cause the transcoder to override other fields you set in the `H264CodecSettings` message.", +"type": "string" +}, +"profile": { +"description": "Enforces the specified codec profile. The following profiles are supported: * `baseline` * `main` * `high` (default) The available options are [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). Note that certain values for this field may cause the transcoder to override other fields you set in the `H264CodecSettings` message.", +"type": "string" +}, +"rateControlMode": { +"description": "Specify the mode. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate - `crf` - constant rate factor", +"type": "string" +}, +"sdr": { +"$ref": "H264ColorFormatSDR", +"description": "Optional. SDR color format setting for H264." +}, +"tune": { +"description": "Enforces the specified codec tune. The available options are [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.264#Tune). Note that certain values for this field may cause the transcoder to override other fields you set in the `H264CodecSettings` message.", +"type": "string" +}, +"vbvFullnessBits": { +"description": "Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of H264CodecSettings.vbv_size_bits.", +"format": "int32", +"type": "integer" +}, +"vbvSizeBits": { +"description": "Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to H264CodecSettings.bitrate_bps.", +"format": "int32", +"type": "integer" +}, +"widthPixels": { +"description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"H264ColorFormatHLG": { +"description": "Convert the input video to a Hybrid Log Gamma (HLG) video.", +"id": "H264ColorFormatHLG", +"properties": {}, +"type": "object" +}, +"H264ColorFormatSDR": { +"description": "Convert the input video to a Standard Dynamic Range (SDR) video.", +"id": "H264ColorFormatSDR", +"properties": {}, +"type": "object" +}, +"H265CodecSettings": { +"description": "H265 codec settings.", +"id": "H265CodecSettings", +"properties": { +"allowOpenGop": { +"description": "Specifies whether an open Group of Pictures (GOP) structure should be allowed or not. The default is `false`.", +"type": "boolean" +}, +"aqStrength": { +"description": "Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A higher value equals a lower bitrate but smoother image. The default is 0.", +"format": "double", +"type": "number" +}, +"bFrameCount": { +"description": "The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than H265CodecSettings.gop_frame_count if set. The default is 0.", +"format": "int32", +"type": "integer" +}, +"bPyramid": { +"description": "Allow B-pyramid for reference frame selection. This may not be supported on all decoders. The default is `false`.", +"type": "boolean" +}, +"bitrateBps": { +"description": "Required. The video bitrate in bits per second. The minimum value is 1,000. The maximum value is 800,000,000.", +"format": "int32", +"type": "integer" +}, +"crfLevel": { +"description": "Target CRF level. Must be between 10 and 36, where 10 is the highest quality and 36 is the most efficient compression. The default is 21.", +"format": "int32", +"type": "integer" +}, +"enableTwoPass": { +"description": "Use two-pass encoding strategy to achieve better video quality. H265CodecSettings.rate_control_mode must be `vbr`. The default is `false`.", +"type": "boolean" +}, +"frameRate": { +"description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120.", +"format": "double", +"type": "number" +}, +"frameRateConversionStrategy": { +"description": "Optional. Frame rate conversion strategy for desired frame rate. The default is `DOWNSAMPLE`.", +"enum": [ +"FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED", +"DOWNSAMPLE", +"DROP_DUPLICATE" +], +"enumDescriptions": [ +"Unspecified frame rate conversion strategy.", +"Selectively retain frames to reduce the output frame rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / target frame rate)`. When _n_ = 1 (that is, the target frame rate is greater than the input frame rate), the output frame rate matches the input frame rate. When _n_ > 1, frames are dropped and the output frame rate is equal to `(input frame rate / n)`. For more information, see [Calculate frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate).", +"Drop or duplicate frames to match the specified frame rate." +], +"type": "string" +}, +"gopDuration": { +"description": "Select the GOP size based on the specified duration. The default is `3s`. Note that `gopDuration` must be less than or equal to [`segmentDuration`](#SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`.", +"format": "google-duration", +"type": "string" +}, +"gopFrameCount": { +"description": "Select the GOP size based on the specified frame count. Must be greater than zero.", +"format": "int32", +"type": "integer" +}, +"hdr10": { +"$ref": "H265ColorFormatHDR10", +"description": "Optional. HDR10 color format setting for H265." +}, +"heightPixels": { +"description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +}, +"hlg": { +"$ref": "H265ColorFormatHLG", +"description": "Optional. HLG color format setting for H265." +}, +"pixelFormat": { +"description": "Pixel format to use. The default is `yuv420p`. Supported pixel formats: - `yuv420p` pixel format - `yuv422p` pixel format - `yuv444p` pixel format - `yuv420p10` 10-bit HDR pixel format - `yuv422p10` 10-bit HDR pixel format - `yuv444p10` 10-bit HDR pixel format - `yuv420p12` 12-bit HDR pixel format - `yuv422p12` 12-bit HDR pixel format - `yuv444p12` 12-bit HDR pixel format", +"type": "string" +}, +"preset": { +"description": "Enforces the specified codec preset. The default is `veryfast`. The available options are [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). Note that certain values for this field may cause the transcoder to override other fields you set in the `H265CodecSettings` message.", +"type": "string" +}, +"profile": { +"description": "Enforces the specified codec profile. The following profiles are supported: * 8-bit profiles * `main` (default) * `main-intra` * `mainstillpicture` * 10-bit profiles * `main10` (default) * `main10-intra` * `main422-10` * `main422-10-intra` * `main444-10` * `main444-10-intra` * 12-bit profiles * `main12` (default) * `main12-intra` * `main422-12` * `main422-12-intra` * `main444-12` * `main444-12-intra` The available options are [FFmpeg-compatible](https://x265.readthedocs.io/). Note that certain values for this field may cause the transcoder to override other fields you set in the `H265CodecSettings` message.", +"type": "string" +}, +"rateControlMode": { +"description": "Specify the mode. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate - `crf` - constant rate factor", +"type": "string" +}, +"sdr": { +"$ref": "H265ColorFormatSDR", +"description": "Optional. SDR color format setting for H265." +}, +"tune": { +"description": "Enforces the specified codec tune. The available options are [FFmpeg-compatible](https://trac.ffmpeg.org/wiki/Encode/H.265). Note that certain values for this field may cause the transcoder to override other fields you set in the `H265CodecSettings` message.", +"type": "string" +}, +"vbvFullnessBits": { +"description": "Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of H265CodecSettings.vbv_size_bits.", +"format": "int32", +"type": "integer" +}, +"vbvSizeBits": { +"description": "Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to `VideoStream.bitrate_bps`.", +"format": "int32", +"type": "integer" +}, +"widthPixels": { +"description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"H265ColorFormatHDR10": { +"description": "Convert the input video to a High Dynamic Range 10 (HDR10) video.", +"id": "H265ColorFormatHDR10", +"properties": {}, +"type": "object" +}, +"H265ColorFormatHLG": { +"description": "Convert the input video to a Hybrid Log Gamma (HLG) video.", +"id": "H265ColorFormatHLG", +"properties": {}, +"type": "object" +}, +"H265ColorFormatSDR": { +"description": "Convert the input video to a Standard Dynamic Range (SDR) video.", +"id": "H265ColorFormatSDR", +"properties": {}, +"type": "object" +}, +"Image": { +"description": "Overlaid image.", +"id": "Image", +"properties": { +"alpha": { +"description": "Target image opacity. Valid values are from `1.0` (solid, default) to `0.0` (transparent), exclusive. Set this to a value greater than `0.0`.", +"format": "double", +"type": "number" +}, +"resolution": { +"$ref": "NormalizedCoordinate", +"description": "Normalized image resolution, based on output video resolution. Valid values: `0.0`\u2013`1.0`. To respect the original image aspect ratio, set either `x` or `y` to `0.0`. To use the original image resolution, set both `x` and `y` to `0.0`." +}, +"uri": { +"description": "Required. URI of the image in Cloud Storage. For example, `gs://bucket/inputs/image.png`. Only PNG and JPEG images are supported.", +"type": "string" +} +}, +"type": "object" +}, +"Input": { +"description": "Input asset.", +"id": "Input", +"properties": { +"key": { +"description": "A unique key for this input. Must be specified when using advanced mapping and edit lists.", +"type": "string" +}, +"preprocessingConfig": { +"$ref": "PreprocessingConfig", +"description": "Preprocessing configurations." +}, +"uri": { +"description": "URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). If empty, the value is populated from Job.input_uri. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", +"type": "string" +} +}, +"type": "object" +}, +"Job": { +"description": "Transcoding job resource.", +"id": "Job", +"properties": { +"batchModePriority": { +"description": "The processing priority of a batch job. This field can only be set for batch mode jobs. The default value is 0. This value cannot be negative. Higher values correspond to higher priorities for the job.", +"format": "int32", +"type": "integer" +}, +"config": { +"$ref": "JobConfig", +"description": "The configuration for this job." +}, +"createTime": { +"description": "Output only. The time the job was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the transcoding finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. An error object that describes the reason for the failure. This property is always present when ProcessingState is `FAILED`.", +"readOnly": true +}, +"inputUri": { +"description": "Input only. Specify the `input_uri` to populate empty `uri` fields in each element of `Job.config.inputs` or `JobTemplate.config.inputs` when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels associated with this job. You can use these to organize and group your jobs.", +"type": "object" +}, +"mode": { +"description": "The processing mode of the job. The default is `PROCESSING_MODE_INTERACTIVE`.", +"enum": [ +"PROCESSING_MODE_UNSPECIFIED", +"PROCESSING_MODE_INTERACTIVE", +"PROCESSING_MODE_BATCH" +], +"enumDescriptions": [ +"The job processing mode is not specified.", +"The job processing mode is interactive mode. Interactive job will either be ran or rejected if quota does not allow for it.", +"The job processing mode is batch mode. Batch mode allows queuing of jobs." +], +"type": "string" +}, +"name": { +"description": "The resource name of the job. Format: `projects/{project_number}/locations/{location}/jobs/{job}`", +"type": "string" +}, +"optimization": { +"description": "Optional. The optimization strategy of the job. The default is `AUTODETECT`.", +"enum": [ +"OPTIMIZATION_STRATEGY_UNSPECIFIED", +"AUTODETECT", +"DISABLED" +], +"enumDescriptions": [ +"The optimization strategy is not specified.", +"Prioritize job processing speed.", +"Disable all optimizations." +], +"type": "string" +}, +"outputUri": { +"description": "Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or `JobTemplate.config.output.uri` when using template. URI for the output file(s). For example, `gs://my-bucket/outputs/`. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", +"type": "string" +}, +"startTime": { +"description": "Output only. The time the transcoding started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The current state of the job.", +"enum": [ +"PROCESSING_STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"The processing state is not specified.", +"The job is enqueued and will be picked up for processing soon.", +"The job is being processed.", +"The job has been completed successfully.", +"The job has failed. For additional information, see [Troubleshooting](https://cloud.google.com/transcoder/docs/troubleshooting)." +], +"readOnly": true, +"type": "string" +}, +"templateId": { +"description": "Input only. Specify the `template_id` to use for populating `Job.config`. The default is `preset/web-hd`, which is the only supported preset. User defined JobTemplate: `{job_template_id}`", +"type": "string" +}, +"ttlAfterCompletionDays": { +"description": "Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"JobConfig": { +"description": "Job configuration", +"id": "JobConfig", +"properties": { +"adBreaks": { +"description": "List of ad breaks. Specifies where to insert ad break tags in the output manifests.", +"items": { +"$ref": "AdBreak" +}, +"type": "array" +}, +"editList": { +"description": "List of edit atoms. Defines the ultimate timeline of the resulting file or manifest.", +"items": { +"$ref": "EditAtom" +}, +"type": "array" +}, +"elementaryStreams": { +"description": "List of elementary streams.", +"items": { +"$ref": "ElementaryStream" +}, +"type": "array" +}, +"encryptions": { +"description": "List of encryption configurations for the content. Each configuration has an ID. Specify this ID in the MuxStream.encryption_id field to indicate the configuration to use for that `MuxStream` output.", +"items": { +"$ref": "Encryption" +}, +"type": "array" +}, +"inputs": { +"description": "List of input assets stored in Cloud Storage.", +"items": { +"$ref": "Input" +}, +"type": "array" +}, +"manifests": { +"description": "List of output manifests.", +"items": { +"$ref": "Manifest" +}, +"type": "array" +}, +"muxStreams": { +"description": "List of multiplexing settings for output streams.", +"items": { +"$ref": "MuxStream" +}, +"type": "array" +}, +"output": { +"$ref": "Output", +"description": "Output configuration." +}, +"overlays": { +"description": "List of overlays on the output video, in descending Z-order.", +"items": { +"$ref": "Overlay" +}, +"type": "array" +}, +"pubsubDestination": { +"$ref": "PubsubDestination", +"description": "Destination on Pub/Sub." +}, +"spriteSheets": { +"description": "List of output sprite sheets. Spritesheets require at least one VideoStream in the Jobconfig.", +"items": { +"$ref": "SpriteSheet" +}, +"type": "array" +} +}, +"type": "object" +}, +"JobTemplate": { +"description": "Transcoding job template resource.", +"id": "JobTemplate", +"properties": { +"config": { +"$ref": "JobConfig", +"description": "The configuration for this template." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels associated with this job template. You can use these to organize and group your job templates.", +"type": "object" +}, +"name": { +"description": "The resource name of the job template. Format: `projects/{project_number}/locations/{location}/jobTemplates/{job_template}`", +"type": "string" +} +}, +"type": "object" +}, +"ListJobTemplatesResponse": { +"description": "Response message for `TranscoderService.ListJobTemplates`.", +"id": "ListJobTemplatesResponse", +"properties": { +"jobTemplates": { +"description": "List of job templates in the specified region.", +"items": { +"$ref": "JobTemplate" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The pagination token.", +"type": "string" +}, +"unreachable": { +"description": "List of regions that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListJobsResponse": { +"description": "Response message for `TranscoderService.ListJobs`.", +"id": "ListJobsResponse", +"properties": { +"jobs": { +"description": "List of jobs in the specified region.", +"items": { +"$ref": "Job" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The pagination token.", +"type": "string" +}, +"unreachable": { +"description": "List of regions that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Manifest": { +"description": "Manifest configuration.", +"id": "Manifest", +"properties": { +"dash": { +"$ref": "DashConfig", +"description": "`DASH` manifest configuration." +}, +"fileName": { +"description": "The name of the generated file. The default is `manifest` with the extension suffix corresponding to the Manifest.type.", +"type": "string" +}, +"muxStreams": { +"description": "Required. List of user supplied MuxStream.key values that should appear in this manifest. When Manifest.type is `HLS`, a media manifest with name MuxStream.key and `.m3u8` extension is generated for each element in this list.", +"items": { +"type": "string" +}, +"type": "array" +}, +"type": { +"description": "Required. Type of the manifest.", +"enum": [ +"MANIFEST_TYPE_UNSPECIFIED", +"HLS", +"DASH" +], +"enumDescriptions": [ +"The manifest type is not specified.", +"Create an HLS manifest. The corresponding file extension is `.m3u8`.", +"Create an MPEG-DASH manifest. The corresponding file extension is `.mpd`." +], +"type": "string" +} +}, +"type": "object" +}, +"MpegCommonEncryption": { +"description": "Configuration for MPEG Common Encryption (MPEG-CENC).", +"id": "MpegCommonEncryption", +"properties": { +"scheme": { +"description": "Required. Specify the encryption scheme. Supported encryption schemes: - `cenc` - `cbcs`", +"type": "string" +} +}, +"type": "object" +}, +"MuxStream": { +"description": "Multiplexing settings for output stream.", +"id": "MuxStream", +"properties": { +"container": { +"description": "The container format. The default is `mp4` Supported container formats: - `ts` - `fmp4`- the corresponding file extension is `.m4s` - `mp4` - `vtt` See also: [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats)", +"type": "string" +}, +"elementaryStreams": { +"description": "List of ElementaryStream.key values multiplexed in this stream.", +"items": { +"type": "string" +}, +"type": "array" +}, +"encryptionId": { +"description": "Identifier of the encryption configuration to use. If omitted, output will be unencrypted.", +"type": "string" +}, +"fileName": { +"description": "The name of the generated file. The default is MuxStream.key with the extension suffix corresponding to the MuxStream.container. Individual segments also have an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `mux_stream0000000123.ts`.", +"type": "string" +}, +"fmp4": { +"$ref": "Fmp4Config", +"description": "Optional. `fmp4` container configuration." +}, +"key": { +"description": "A unique key for this multiplexed stream.", +"type": "string" +}, +"segmentSettings": { +"$ref": "SegmentSettings", +"description": "Segment settings for `ts`, `fmp4` and `vtt`." +} +}, +"type": "object" +}, +"NormalizedCoordinate": { +"description": "2D normalized coordinates. Default: `{0.0, 0.0}`", +"id": "NormalizedCoordinate", +"properties": { +"x": { +"description": "Normalized x coordinate.", +"format": "double", +"type": "number" +}, +"y": { +"description": "Normalized y coordinate.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"Output": { +"description": "Location of output file(s) in a Cloud Storage bucket.", +"id": "Output", +"properties": { +"uri": { +"description": "URI for the output file(s). For example, `gs://my-bucket/outputs/`. If empty, the value is populated from Job.output_uri. See [Supported input and output formats](https://cloud.google.com/transcoder/docs/concepts/supported-input-and-output-formats).", +"type": "string" +} +}, +"type": "object" +}, +"Overlay": { +"description": "Overlay configuration.", +"id": "Overlay", +"properties": { +"animations": { +"description": "List of animations. The list should be chronological, without any time overlap.", +"items": { +"$ref": "Animation" +}, +"type": "array" +}, +"image": { +"$ref": "Image", +"description": "Image overlay." +} +}, +"type": "object" +}, +"Pad": { +"description": "Pad filter configuration for the input video. The padded input video is scaled after padding with black to match the output resolution.", +"id": "Pad", +"properties": { +"bottomPixels": { +"description": "The number of pixels to add to the bottom. The default is 0.", +"format": "int32", +"type": "integer" +}, +"leftPixels": { +"description": "The number of pixels to add to the left. The default is 0.", +"format": "int32", +"type": "integer" +}, +"rightPixels": { +"description": "The number of pixels to add to the right. The default is 0.", +"format": "int32", +"type": "integer" +}, +"topPixels": { +"description": "The number of pixels to add to the top. The default is 0.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Playready": { +"description": "Playready configuration.", +"id": "Playready", +"properties": {}, +"type": "object" +}, +"PreprocessingConfig": { +"description": "Preprocessing configurations.", +"id": "PreprocessingConfig", +"properties": { +"audio": { +"$ref": "Audio", +"description": "Audio preprocessing configuration." +}, +"color": { +"$ref": "Color", +"description": "Color preprocessing configuration." +}, +"crop": { +"$ref": "Crop", +"description": "Specify the video cropping configuration." +}, +"deblock": { +"$ref": "Deblock", +"description": "Deblock preprocessing configuration." +}, +"deinterlace": { +"$ref": "Deinterlace", +"description": "Specify the video deinterlace configuration." +}, +"denoise": { +"$ref": "Denoise", +"description": "Denoise preprocessing configuration." +}, +"pad": { +"$ref": "Pad", +"description": "Specify the video pad filter configuration." +} +}, +"type": "object" +}, +"PubsubDestination": { +"description": "A Pub/Sub destination.", +"id": "PubsubDestination", +"properties": { +"topic": { +"description": "The name of the Pub/Sub topic to publish job completion notification to. For example: `projects/{project}/topics/{topic}`.", +"type": "string" +} +}, +"type": "object" +}, +"SampleAesEncryption": { +"description": "Configuration for SAMPLE-AES encryption.", +"id": "SampleAesEncryption", +"properties": {}, +"type": "object" +}, +"SecretManagerSource": { +"description": "Configuration for secrets stored in Google Secret Manager.", +"id": "SecretManagerSource", +"properties": { +"secretVersion": { +"description": "Required. The name of the Secret Version containing the encryption key in the following format: `projects/{project}/secrets/{secret_id}/versions/{version_number}` Note that only numbered versions are supported. Aliases like \"latest\" are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"SegmentSettings": { +"description": "Segment settings for `ts`, `fmp4` and `vtt`.", +"id": "SegmentSettings", +"properties": { +"individualSegments": { +"description": "Required. Create an individual segment file. The default is `false`.", +"type": "boolean" +}, +"segmentDuration": { +"description": "Duration of the segments in seconds. The default is `6.0s`. Note that `segmentDuration` must be greater than or equal to [`gopDuration`](#videostream), and `segmentDuration` must be divisible by [`gopDuration`](#videostream).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"SpriteSheet": { +"description": "Sprite sheet configuration.", +"id": "SpriteSheet", +"properties": { +"columnCount": { +"description": "The maximum number of sprites per row in a sprite sheet. The default is 0, which indicates no maximum limit.", +"format": "int32", +"type": "integer" +}, +"endTimeOffset": { +"description": "End time in seconds, relative to the output file timeline. When `end_time_offset` is not specified, the sprites are generated until the end of the output file.", +"format": "google-duration", +"type": "string" +}, +"filePrefix": { +"description": "Required. File name prefix for the generated sprite sheets. Each sprite sheet has an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `sprite_sheet0000000123.jpeg`.", +"type": "string" +}, +"format": { +"description": "Format type. The default is `jpeg`. Supported formats: - `jpeg`", +"type": "string" +}, +"interval": { +"description": "Starting from `0s`, create sprites at regular intervals. Specify the interval value in seconds.", +"format": "google-duration", +"type": "string" +}, +"quality": { +"description": "The quality of the generated sprite sheet. Enter a value between 1 and 100, where 1 is the lowest quality and 100 is the highest quality. The default is 100. A high quality value corresponds to a low image data compression ratio.", +"format": "int32", +"type": "integer" +}, +"rowCount": { +"description": "The maximum number of rows per sprite sheet. When the sprite sheet is full, a new sprite sheet is created. The default is 0, which indicates no maximum limit.", +"format": "int32", +"type": "integer" +}, +"spriteHeightPixels": { +"description": "Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field). For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +}, +"spriteWidthPixels": { +"description": "Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field). For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +}, +"startTimeOffset": { +"description": "Start time in seconds, relative to the output file timeline. Determines the first sprite to pick. The default is `0s`.", +"format": "google-duration", +"type": "string" +}, +"totalCount": { +"description": "Total number of sprites. Create the specified number of sprites distributed evenly across the timeline of the output media. The default is 100.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TextMapping": { +"description": "The mapping for the JobConfig.edit_list atoms with text EditAtom.inputs.", +"id": "TextMapping", +"properties": { +"atomKey": { +"description": "Required. The EditAtom.key that references atom with text inputs in the JobConfig.edit_list.", +"type": "string" +}, +"inputKey": { +"description": "Required. The Input.key that identifies the input file.", +"type": "string" +}, +"inputTrack": { +"description": "Required. The zero-based index of the track in the input file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"TextStream": { +"description": "Encoding of a text stream. For example, closed captions or subtitles.", +"id": "TextStream", +"properties": { +"codec": { +"description": "The codec for this text stream. The default is `webvtt`. Supported text codecs: - `srt` - `ttml` - `cea608` - `cea708` - `webvtt`", +"type": "string" +}, +"displayName": { +"description": "The name for this particular text stream that will be added to the HLS/DASH manifest. Not supported in MP4 files.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code, such as `en-US` or `sr-Latn`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. Not supported in MP4 files.", +"type": "string" +}, +"mapping": { +"description": "The mapping for the JobConfig.edit_list atoms with text EditAtom.inputs.", +"items": { +"$ref": "TextMapping" +}, +"type": "array" +} +}, +"type": "object" +}, +"VideoStream": { +"description": "Video stream resource.", +"id": "VideoStream", +"properties": { +"h264": { +"$ref": "H264CodecSettings", +"description": "H264 codec settings." +}, +"h265": { +"$ref": "H265CodecSettings", +"description": "H265 codec settings." +}, +"vp9": { +"$ref": "Vp9CodecSettings", +"description": "VP9 codec settings." +} +}, +"type": "object" +}, +"Vp9CodecSettings": { +"description": "VP9 codec settings.", +"id": "Vp9CodecSettings", +"properties": { +"bitrateBps": { +"description": "Required. The video bitrate in bits per second. The minimum value is 1,000. The maximum value is 480,000,000.", +"format": "int32", +"type": "integer" +}, +"crfLevel": { +"description": "Target CRF level. Must be between 10 and 36, where 10 is the highest quality and 36 is the most efficient compression. The default is 21. **Note:** This field is not supported.", +"format": "int32", +"type": "integer" +}, +"frameRate": { +"description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120.", +"format": "double", +"type": "number" +}, +"frameRateConversionStrategy": { +"description": "Optional. Frame rate conversion strategy for desired frame rate. The default is `DOWNSAMPLE`.", +"enum": [ +"FRAME_RATE_CONVERSION_STRATEGY_UNSPECIFIED", +"DOWNSAMPLE", +"DROP_DUPLICATE" +], +"enumDescriptions": [ +"Unspecified frame rate conversion strategy.", +"Selectively retain frames to reduce the output frame rate. Every _n_ th frame is kept, where `n = ceil(input frame rate / target frame rate)`. When _n_ = 1 (that is, the target frame rate is greater than the input frame rate), the output frame rate matches the input frame rate. When _n_ > 1, frames are dropped and the output frame rate is equal to `(input frame rate / n)`. For more information, see [Calculate frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate).", +"Drop or duplicate frames to match the specified frame rate." +], +"type": "string" +}, +"gopDuration": { +"description": "Select the GOP size based on the specified duration. The default is `3s`. Note that `gopDuration` must be less than or equal to [`segmentDuration`](#SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`.", +"format": "google-duration", +"type": "string" +}, +"gopFrameCount": { +"description": "Select the GOP size based on the specified frame count. Must be greater than zero.", +"format": "int32", +"type": "integer" +}, +"heightPixels": { +"description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the height, in pixels, per the horizontal ASR. The API calculates the width per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +}, +"hlg": { +"$ref": "Vp9ColorFormatHLG", +"description": "Optional. HLG color format setting for VP9." +}, +"pixelFormat": { +"description": "Pixel format to use. The default is `yuv420p`. Supported pixel formats: - `yuv420p` pixel format - `yuv422p` pixel format - `yuv444p` pixel format - `yuv420p10` 10-bit HDR pixel format - `yuv422p10` 10-bit HDR pixel format - `yuv444p10` 10-bit HDR pixel format - `yuv420p12` 12-bit HDR pixel format - `yuv422p12` 12-bit HDR pixel format - `yuv444p12` 12-bit HDR pixel format", +"type": "string" +}, +"profile": { +"description": "Enforces the specified codec profile. The following profiles are supported: * `profile0` (default) * `profile1` * `profile2` * `profile3` The available options are [WebM-compatible](https://www.webmproject.org/vp9/profiles/). Note that certain values for this field may cause the transcoder to override other fields you set in the `Vp9CodecSettings` message.", +"type": "string" +}, +"rateControlMode": { +"description": "Specify the mode. The default is `vbr`. Supported rate control modes: - `vbr` - variable bitrate", +"type": "string" +}, +"sdr": { +"$ref": "Vp9ColorFormatSDR", +"description": "Optional. SDR color format setting for VP9." +}, +"widthPixels": { +"description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used. For portrait videos that contain horizontal ASR and rotation metadata, provide the width, in pixels, per the horizontal ASR. The API calculates the height per the horizontal ASR. The API detects any rotation metadata and swaps the requested height and width for the output.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Vp9ColorFormatHLG": { +"description": "Convert the input video to a Hybrid Log Gamma (HLG) video.", +"id": "Vp9ColorFormatHLG", +"properties": {}, +"type": "object" +}, +"Vp9ColorFormatSDR": { +"description": "Convert the input video to a Standard Dynamic Range (SDR) video.", +"id": "Vp9ColorFormatSDR", +"properties": {}, +"type": "object" +}, +"Widevine": { +"description": "Widevine configuration.", +"id": "Widevine", +"properties": {}, +"type": "object" +}, +"YadifConfig": { +"description": "Yet Another Deinterlacing Filter Configuration.", +"id": "YadifConfig", +"properties": { +"deinterlaceAllFrames": { +"description": "Deinterlace all frames rather than just the frames identified as interlaced. The default is `false`.", +"type": "boolean" +}, +"disableSpatialInterlacing": { +"description": "Disable spacial interlacing. The default is `false`.", +"type": "boolean" +}, +"mode": { +"description": "Specifies the deinterlacing mode to adopt. The default is `send_frame`. Supported values: - `send_frame`: Output one frame for each frame - `send_field`: Output one frame for each field", +"type": "string" +}, +"parity": { +"description": "The picture field parity assumed for the input interlaced video. The default is `auto`. Supported values: - `tff`: Assume the top field is first - `bff`: Assume the bottom field is first - `auto`: Enable automatic detection of field parity", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Transcoder API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/transcoder.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/transcoder.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..e4d9b5ae1e34681de88f4e183beac535bcbf0746 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/transcoder.v1beta1.json @@ -0,0 +1,1506 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." + } + } + } + }, + "basePath": "", + "baseUrl": "https://transcoder.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Transcoder", + "description": "This API converts video files into formats suitable for consumer distribution. ", + "discoveryVersion": "v1", + "documentationLink": "https://cloud.google.com/transcoder/docs/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "transcoder:v1beta1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://transcoder.mtls.googleapis.com/", + "name": "transcoder", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "projects": { + "resources": { + "locations": { + "resources": { + "jobTemplates": { + "methods": { + "create": { + "description": "Creates a job template in the specified region.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates", + "httpMethod": "POST", + "id": "transcoder.projects.locations.jobTemplates.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "jobTemplateId": { + "description": "Required. The ID to use for the job template, which will become the final component of the job template's resource name. This value should be 4-63 characters, and valid characters must match the regular expression `a-zA-Z*`.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location to create this job template. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/jobTemplates", + "request": { + "$ref": "JobTemplate" + }, + "response": { + "$ref": "JobTemplate" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a job template.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates/{jobTemplatesId}", + "httpMethod": "DELETE", + "id": "transcoder.projects.locations.jobTemplates.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the job template to delete. `projects/{project}/locations/{location}/jobTemplates/{job_template}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the job template data.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates/{jobTemplatesId}", + "httpMethod": "GET", + "id": "transcoder.projects.locations.jobTemplates.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the job template to retrieve. Format: `projects/{project}/locations/{location}/jobTemplates/{job_template}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobTemplates/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "JobTemplate" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists job templates in the specified region.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobTemplates", + "httpMethod": "GET", + "id": "transcoder.projects.locations.jobTemplates.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The `next_page_token` value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. The parent location from which to retrieve the collection of job templates. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/jobTemplates", + "response": { + "$ref": "ListJobTemplatesResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + }, + "jobs": { + "methods": { + "create": { + "description": "Creates a job in the specified region.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs", + "httpMethod": "POST", + "id": "transcoder.projects.locations.jobs.create", + "parameterOrder": [ + "parent" + ], + "parameters": { + "parent": { + "description": "Required. The parent location to create and process this job. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/jobs", + "request": { + "$ref": "Job" + }, + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "delete": { + "description": "Deletes a job.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", + "httpMethod": "DELETE", + "id": "transcoder.projects.locations.jobs.delete", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the job to delete. Format: `projects/{project}/locations/{location}/jobs/{job}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Empty" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "get": { + "description": "Returns the job data.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs/{jobsId}", + "httpMethod": "GET", + "id": "transcoder.projects.locations.jobs.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "name": { + "description": "Required. The name of the job to retrieve. Format: `projects/{project}/locations/{location}/jobs/{job}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+/jobs/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+name}", + "response": { + "$ref": "Job" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + }, + "list": { + "description": "Lists jobs in the specified region.", + "flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/jobs", + "httpMethod": "GET", + "id": "transcoder.projects.locations.jobs.list", + "parameterOrder": [ + "parent" + ], + "parameters": { + "pageSize": { + "description": "The maximum number of items to return.", + "format": "int32", + "location": "query", + "type": "integer" + }, + "pageToken": { + "description": "The `next_page_token` value returned from a previous List request, if any.", + "location": "query", + "type": "string" + }, + "parent": { + "description": "Required. Format: `projects/{project}/locations/{location}`", + "location": "path", + "pattern": "^projects/[^/]+/locations/[^/]+$", + "required": true, + "type": "string" + } + }, + "path": "v1beta1/{+parent}/jobs", + "response": { + "$ref": "ListJobsResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } + } + } + } + } + } + } + }, + "revision": "20211108", + "rootUrl": "https://transcoder.googleapis.com/", + "schemas": { + "AdBreak": { + "description": "Ad break.", + "id": "AdBreak", + "properties": { + "startTimeOffset": { + "description": "Start time in seconds for the ad break, relative to the output file timeline. The default is `0s`.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "Aes128Encryption": { + "description": "Configuration for AES-128 encryption.", + "id": "Aes128Encryption", + "properties": { + "keyUri": { + "description": "Required. URI of the key delivery service. This URI is inserted into the M3U8 header.", + "type": "string" + } + }, + "type": "object" + }, + "Animation": { + "description": "Animation types.", + "id": "Animation", + "properties": { + "animationEnd": { + "$ref": "AnimationEnd", + "description": "End previous animation." + }, + "animationFade": { + "$ref": "AnimationFade", + "description": "Display overlay object with fade animation." + }, + "animationStatic": { + "$ref": "AnimationStatic", + "description": "Display static overlay object." + } + }, + "type": "object" + }, + "AnimationEnd": { + "description": "End previous overlay animation from the video. Without AnimationEnd, the overlay object will keep the state of previous animation until the end of the video.", + "id": "AnimationEnd", + "properties": { + "startTimeOffset": { + "description": "The time to end overlay object, in seconds. Default: 0", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "AnimationFade": { + "description": "Display overlay object with fade animation.", + "id": "AnimationFade", + "properties": { + "endTimeOffset": { + "description": "The time to end the fade animation, in seconds. Default: `start_time_offset` + 1s", + "format": "google-duration", + "type": "string" + }, + "fadeType": { + "description": "Required. Type of fade animation: `FADE_IN` or `FADE_OUT`.", + "enum": [ + "FADE_TYPE_UNSPECIFIED", + "FADE_IN", + "FADE_OUT" + ], + "enumDescriptions": [ + "The fade type is not specified.", + "Fade the overlay object into view.", + "Fade the overlay object out of view." + ], + "type": "string" + }, + "startTimeOffset": { + "description": "The time to start the fade animation, in seconds. Default: 0", + "format": "google-duration", + "type": "string" + }, + "xy": { + "$ref": "NormalizedCoordinate", + "description": "Normalized coordinates based on output video resolution. Valid values: `0.0`\u2013`1.0`. `xy` is the upper-left coordinate of the overlay object. For example, use the x and y coordinates {0,0} to position the top-left corner of the overlay animation in the top-left corner of the output video." + } + }, + "type": "object" + }, + "AnimationStatic": { + "description": "Display static overlay object.", + "id": "AnimationStatic", + "properties": { + "startTimeOffset": { + "description": "The time to start displaying the overlay object, in seconds. Default: 0", + "format": "google-duration", + "type": "string" + }, + "xy": { + "$ref": "NormalizedCoordinate", + "description": "Normalized coordinates based on output video resolution. Valid values: `0.0`\u2013`1.0`. `xy` is the upper-left coordinate of the overlay object. For example, use the x and y coordinates {0,0} to position the top-left corner of the overlay animation in the top-left corner of the output video." + } + }, + "type": "object" + }, + "Audio": { + "description": "Audio preprocessing configuration.", + "id": "Audio", + "properties": { + "highBoost": { + "description": "Enable boosting high frequency components. The default is `false`.", + "type": "boolean" + }, + "lowBoost": { + "description": "Enable boosting low frequency components. The default is `false`.", + "type": "boolean" + }, + "lufs": { + "description": "Specify audio loudness normalization in loudness units relative to full scale (LUFS). Enter a value between -24 and 0 (the default), where: * -24 is the Advanced Television Systems Committee (ATSC A/85) standard * -23 is the EU R128 broadcast standard * -19 is the prior standard for online mono audio * -18 is the ReplayGain standard * -16 is the prior standard for stereo audio * -14 is the new online audio standard recommended by Spotify, as well as Amazon Echo * 0 disables normalization", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "AudioAtom": { + "description": "The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.", + "id": "AudioAtom", + "properties": { + "channels": { + "description": "List of `Channel`s for this audio stream. for in-depth explanation.", + "items": { + "$ref": "AudioChannel" + }, + "type": "array" + }, + "key": { + "description": "Required. The `EditAtom.key` that references the atom with audio inputs in the `Job.edit_list`.", + "type": "string" + } + }, + "type": "object" + }, + "AudioChannel": { + "description": "The audio channel.", + "id": "AudioChannel", + "properties": { + "inputs": { + "description": "List of `Job.inputs` for this audio channel.", + "items": { + "$ref": "AudioChannelInput" + }, + "type": "array" + } + }, + "type": "object" + }, + "AudioChannelInput": { + "description": "Identifies which input file, track, and channel should be used.", + "id": "AudioChannelInput", + "properties": { + "channel": { + "description": "Required. The zero-based index of the channel in the input file.", + "format": "int32", + "type": "integer" + }, + "gainDb": { + "description": "Audio volume control in dB. Negative values decrease volume, positive values increase. The default is 0.", + "format": "double", + "type": "number" + }, + "key": { + "description": "Required. The `Input.key` that identifies the input file.", + "type": "string" + }, + "track": { + "description": "Required. The zero-based index of the track in the input file.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "AudioStream": { + "description": "Audio stream resource.", + "id": "AudioStream", + "properties": { + "bitrateBps": { + "description": "Required. Audio bitrate in bits per second. Must be between 1 and 10,000,000.", + "format": "int32", + "type": "integer" + }, + "channelCount": { + "description": "Number of audio channels. Must be between 1 and 6. The default is 2.", + "format": "int32", + "type": "integer" + }, + "channelLayout": { + "description": "A list of channel names specifying layout of the audio channels. This only affects the metadata embedded in the container headers, if supported by the specified format. The default is `[\"fl\", \"fr\"]`. Supported channel names: - 'fl' - Front left channel - 'fr' - Front right channel - 'sl' - Side left channel - 'sr' - Side right channel - 'fc' - Front center channel - 'lfe' - Low frequency", + "items": { + "type": "string" + }, + "type": "array" + }, + "codec": { + "description": "The codec for this audio stream. The default is `\"aac\"`. Supported audio codecs: - 'aac' - 'aac-he' - 'aac-he-v2' - 'mp3' - 'ac3' - 'eac3'", + "type": "string" + }, + "mapping": { + "description": "The mapping for the `Job.edit_list` atoms with audio `EditAtom.inputs`.", + "items": { + "$ref": "AudioAtom" + }, + "type": "array" + }, + "sampleRateHertz": { + "description": "The audio sample rate in Hertz. The default is 48000 Hertz.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Color": { + "description": "Color preprocessing configuration.", + "id": "Color", + "properties": { + "brightness": { + "description": "Control brightness of the video. Enter a value between -1 and 1, where -1 is minimum brightness and 1 is maximum brightness. 0 is no change. The default is 0.", + "format": "double", + "type": "number" + }, + "contrast": { + "description": "Control black and white contrast of the video. Enter a value between -1 and 1, where -1 is minimum contrast and 1 is maximum contrast. 0 is no change. The default is 0.", + "format": "double", + "type": "number" + }, + "saturation": { + "description": "Control color saturation of the video. Enter a value between -1 and 1, where -1 is fully desaturated and 1 is maximum saturation. 0 is no change. The default is 0.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Crop": { + "description": "Video cropping configuration for the input video. The cropped input video is scaled to match the output resolution.", + "id": "Crop", + "properties": { + "bottomPixels": { + "description": "The number of pixels to crop from the bottom. The default is 0.", + "format": "int32", + "type": "integer" + }, + "leftPixels": { + "description": "The number of pixels to crop from the left. The default is 0.", + "format": "int32", + "type": "integer" + }, + "rightPixels": { + "description": "The number of pixels to crop from the right. The default is 0.", + "format": "int32", + "type": "integer" + }, + "topPixels": { + "description": "The number of pixels to crop from the top. The default is 0.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Deblock": { + "description": "Deblock preprocessing configuration.", + "id": "Deblock", + "properties": { + "enabled": { + "description": "Enable deblocker. The default is `false`.", + "type": "boolean" + }, + "strength": { + "description": "Set strength of the deblocker. Enter a value between 0 and 1. The higher the value, the stronger the block removal. 0 is no deblocking. The default is 0.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "Denoise": { + "description": "Denoise preprocessing configuration.", + "id": "Denoise", + "properties": { + "strength": { + "description": "Set strength of the denoise. Enter a value between 0 and 1. The higher the value, the smoother the image. 0 is no denoising. The default is 0.", + "format": "double", + "type": "number" + }, + "tune": { + "description": "Set the denoiser mode. The default is `\"standard\"`. Supported denoiser modes: - 'standard' - 'grain'", + "type": "string" + } + }, + "type": "object" + }, + "EditAtom": { + "description": "Edit atom.", + "id": "EditAtom", + "properties": { + "endTimeOffset": { + "description": "End time in seconds for the atom, relative to the input file timeline. When `end_time_offset` is not specified, the `inputs` are used until the end of the atom.", + "format": "google-duration", + "type": "string" + }, + "inputs": { + "description": "List of `Input.key`s identifying files that should be used in this atom. The listed `inputs` must have the same timeline.", + "items": { + "type": "string" + }, + "type": "array" + }, + "key": { + "description": "A unique key for this atom. Must be specified when using advanced mapping.", + "type": "string" + }, + "startTimeOffset": { + "description": "Start time in seconds for the atom, relative to the input file timeline. The default is `0s`.", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "ElementaryStream": { + "description": "Encoding of an input file such as an audio, video, or text track. Elementary streams must be packaged before mapping and sharing between different output formats.", + "id": "ElementaryStream", + "properties": { + "audioStream": { + "$ref": "AudioStream", + "description": "Encoding of an audio stream." + }, + "key": { + "description": "A unique key for this elementary stream.", + "type": "string" + }, + "textStream": { + "$ref": "TextStream", + "description": "Encoding of a text stream. For example, closed captions or subtitles." + }, + "videoStream": { + "$ref": "VideoStream", + "description": "Encoding of a video stream." + } + }, + "type": "object" + }, + "Empty": { + "description": "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 `{}`.", + "id": "Empty", + "properties": {}, + "type": "object" + }, + "Encryption": { + "description": "Encryption settings.", + "id": "Encryption", + "properties": { + "aes128": { + "$ref": "Aes128Encryption", + "description": "Configuration for AES-128 encryption." + }, + "iv": { + "description": "Required. 128 bit Initialization Vector (IV) represented as lowercase hexadecimal digits.", + "type": "string" + }, + "key": { + "description": "Required. 128 bit encryption key represented as lowercase hexadecimal digits.", + "type": "string" + }, + "mpegCenc": { + "$ref": "MpegCommonEncryption", + "description": "Configuration for MPEG Common Encryption (MPEG-CENC)." + }, + "sampleAes": { + "$ref": "SampleAesEncryption", + "description": "Configuration for SAMPLE-AES encryption." + } + }, + "type": "object" + }, + "FailureDetail": { + "description": "Additional information about the reasons for the failure.", + "id": "FailureDetail", + "properties": { + "description": { + "description": "A description of the failure.", + "type": "string" + } + }, + "type": "object" + }, + "Image": { + "description": "Overlaid jpeg image.", + "id": "Image", + "properties": { + "alpha": { + "description": "Target image opacity. Valid values are from `1.0` (solid, default) to `0.0` (transparent), exclusive. Set this to a value greater than `0.0`.", + "format": "double", + "type": "number" + }, + "resolution": { + "$ref": "NormalizedCoordinate", + "description": "Normalized image resolution, based on output video resolution. Valid values: `0.0`\u2013`1.0`. To respect the original image aspect ratio, set either `x` or `y` to `0.0`. To use the original image resolution, set both `x` and `y` to `0.0`." + }, + "uri": { + "description": "Required. URI of the JPEG image in Cloud Storage. For example, `gs://bucket/inputs/image.jpeg`. JPEG is the only supported image type.", + "type": "string" + } + }, + "type": "object" + }, + "Input": { + "description": "Input asset.", + "id": "Input", + "properties": { + "key": { + "description": "A unique key for this input. Must be specified when using advanced mapping and edit lists.", + "type": "string" + }, + "preprocessingConfig": { + "$ref": "PreprocessingConfig", + "description": "Preprocessing configurations." + }, + "uri": { + "description": "URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`). If empty, the value will be populated from `Job.input_uri`.", + "type": "string" + } + }, + "type": "object" + }, + "Job": { + "description": "Transcoding job resource.", + "id": "Job", + "properties": { + "config": { + "$ref": "JobConfig", + "description": "The configuration for this job." + }, + "createTime": { + "description": "Output only. The time the job was created.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "endTime": { + "description": "Output only. The time the transcoding finished.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "failureDetails": { + "description": "Output only. List of failure details. This property may contain additional information about the failure when `failure_reason` is present. *Note*: This feature is not yet available.", + "items": { + "$ref": "FailureDetail" + }, + "readOnly": true, + "type": "array" + }, + "failureReason": { + "description": "Output only. A description of the reason for the failure. This property is always present when `state` is `FAILED`.", + "readOnly": true, + "type": "string" + }, + "inputUri": { + "description": "Input only. Specify the `input_uri` to populate empty `uri` fields in each element of `Job.config.inputs` or `JobTemplate.config.inputs` when using template. URI of the media. Input files must be at least 5 seconds in duration and stored in Cloud Storage (for example, `gs://bucket/inputs/file.mp4`).", + "type": "string" + }, + "name": { + "description": "The resource name of the job. Format: `projects/{project}/locations/{location}/jobs/{job}`", + "type": "string" + }, + "originUri": { + "$ref": "OriginUri", + "description": "Output only. The origin URI. *Note*: This feature is not yet available.", + "readOnly": true + }, + "outputUri": { + "description": "Input only. Specify the `output_uri` to populate an empty `Job.config.output.uri` or `JobTemplate.config.output.uri` when using template. URI for the output file(s). For example, `gs://my-bucket/outputs/`.", + "type": "string" + }, + "priority": { + "description": "Specify the priority of the job. Enter a value between 0 and 100, where 0 is the lowest priority and 100 is the highest priority. The default is 0.", + "format": "int32", + "type": "integer" + }, + "progress": { + "$ref": "Progress", + "description": "Output only. Estimated fractional progress, from `0` to `1` for each step. *Note*: This feature is not yet available.", + "readOnly": true + }, + "startTime": { + "description": "Output only. The time the transcoding started.", + "format": "google-datetime", + "readOnly": true, + "type": "string" + }, + "state": { + "description": "Output only. The current state of the job.", + "enum": [ + "PROCESSING_STATE_UNSPECIFIED", + "PENDING", + "RUNNING", + "SUCCEEDED", + "FAILED" + ], + "enumDescriptions": [ + "The processing state is not specified.", + "The job is enqueued and will be picked up for processing soon.", + "The job is being processed.", + "The job has been completed successfully.", + "The job has failed. For additional information, see `failure_reason` and `failure_details`" + ], + "readOnly": true, + "type": "string" + }, + "templateId": { + "description": "Input only. Specify the `template_id` to use for populating `Job.config`. The default is `preset/web-hd`. Preset Transcoder templates: - `preset/{preset_id}` - User defined JobTemplate: `{job_template_id}`", + "type": "string" + }, + "ttlAfterCompletionDays": { + "description": "Job time to live value in days, which will be effective after job completion. Job should be deleted automatically after the given TTL. Enter a value between 1 and 90. The default is 30.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "JobConfig": { + "description": "Job configuration", + "id": "JobConfig", + "properties": { + "adBreaks": { + "description": "List of ad breaks. Specifies where to insert ad break tags in the output manifests.", + "items": { + "$ref": "AdBreak" + }, + "type": "array" + }, + "editList": { + "description": "List of `Edit atom`s. Defines the ultimate timeline of the resulting file or manifest.", + "items": { + "$ref": "EditAtom" + }, + "type": "array" + }, + "elementaryStreams": { + "description": "List of elementary streams.", + "items": { + "$ref": "ElementaryStream" + }, + "type": "array" + }, + "inputs": { + "description": "List of input assets stored in Cloud Storage.", + "items": { + "$ref": "Input" + }, + "type": "array" + }, + "manifests": { + "description": "List of output manifests.", + "items": { + "$ref": "Manifest" + }, + "type": "array" + }, + "muxStreams": { + "description": "List of multiplexing settings for output streams.", + "items": { + "$ref": "MuxStream" + }, + "type": "array" + }, + "output": { + "$ref": "Output", + "description": "Output configuration." + }, + "overlays": { + "description": "List of overlays on the output video, in descending Z-order.", + "items": { + "$ref": "Overlay" + }, + "type": "array" + }, + "pubsubDestination": { + "$ref": "PubsubDestination", + "description": "Destination on Pub/Sub." + }, + "spriteSheets": { + "description": "List of output sprite sheets.", + "items": { + "$ref": "SpriteSheet" + }, + "type": "array" + } + }, + "type": "object" + }, + "JobTemplate": { + "description": "Transcoding job template resource.", + "id": "JobTemplate", + "properties": { + "config": { + "$ref": "JobConfig", + "description": "The configuration for this template." + }, + "name": { + "description": "The resource name of the job template. Format: `projects/{project}/locations/{location}/jobTemplates/{job_template}`", + "type": "string" + } + }, + "type": "object" + }, + "ListJobTemplatesResponse": { + "description": "Response message for `TranscoderService.ListJobTemplates`.", + "id": "ListJobTemplatesResponse", + "properties": { + "jobTemplates": { + "description": "List of job templates in the specified region.", + "items": { + "$ref": "JobTemplate" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The pagination token.", + "type": "string" + } + }, + "type": "object" + }, + "ListJobsResponse": { + "description": "Response message for `TranscoderService.ListJobs`.", + "id": "ListJobsResponse", + "properties": { + "jobs": { + "description": "List of jobs in the specified region.", + "items": { + "$ref": "Job" + }, + "type": "array" + }, + "nextPageToken": { + "description": "The pagination token.", + "type": "string" + } + }, + "type": "object" + }, + "Manifest": { + "description": "Manifest configuration.", + "id": "Manifest", + "properties": { + "fileName": { + "description": "The name of the generated file. The default is `\"manifest\"` with the extension suffix corresponding to the `Manifest.type`.", + "type": "string" + }, + "muxStreams": { + "description": "Required. List of user given `MuxStream.key`s that should appear in this manifest. When `Manifest.type` is `HLS`, a media manifest with name `MuxStream.key` and `.m3u8` extension is generated for each element of the `Manifest.mux_streams`.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "description": "Required. Type of the manifest, can be \"HLS\" or \"DASH\".", + "enum": [ + "MANIFEST_TYPE_UNSPECIFIED", + "HLS", + "DASH" + ], + "enumDescriptions": [ + "The manifest type is not specified.", + "Create `\"HLS\"` manifest. The corresponding file extension is `\".m3u8\"`.", + "Create `\"DASH\"` manifest. The corresponding file extension is `\".mpd\"`." + ], + "type": "string" + } + }, + "type": "object" + }, + "MpegCommonEncryption": { + "description": "Configuration for MPEG Common Encryption (MPEG-CENC).", + "id": "MpegCommonEncryption", + "properties": { + "keyId": { + "description": "Required. 128 bit Key ID represented as lowercase hexadecimal digits for use with common encryption.", + "type": "string" + }, + "scheme": { + "description": "Required. Specify the encryption scheme. Supported encryption schemes: - 'cenc' - 'cbcs'", + "type": "string" + } + }, + "type": "object" + }, + "MuxStream": { + "description": "Multiplexing settings for output stream.", + "id": "MuxStream", + "properties": { + "container": { + "description": "The container format. The default is `\"mp4\"` Supported container formats: - 'ts' - 'fmp4'- the corresponding file extension is `\".m4s\"` - 'mp4' - 'vtt'", + "type": "string" + }, + "elementaryStreams": { + "description": "List of `ElementaryStream.key`s multiplexed in this stream.", + "items": { + "type": "string" + }, + "type": "array" + }, + "encryption": { + "$ref": "Encryption", + "description": "Encryption settings." + }, + "fileName": { + "description": "The name of the generated file. The default is `MuxStream.key` with the extension suffix corresponding to the `MuxStream.container`. Individual segments also have an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `\"mux_stream0000000123.ts\"`.", + "type": "string" + }, + "key": { + "description": "A unique key for this multiplexed stream. HLS media manifests will be named `MuxStream.key` with the `\".m3u8\"` extension suffix.", + "type": "string" + }, + "segmentSettings": { + "$ref": "SegmentSettings", + "description": "Segment settings for `\"ts\"`, `\"fmp4\"` and `\"vtt\"`." + } + }, + "type": "object" + }, + "NormalizedCoordinate": { + "description": "2D normalized coordinates. Default: `{0.0, 0.0}`", + "id": "NormalizedCoordinate", + "properties": { + "x": { + "description": "Normalized x coordinate.", + "format": "double", + "type": "number" + }, + "y": { + "description": "Normalized y coordinate.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "OriginUri": { + "description": "The origin URI.", + "id": "OriginUri", + "properties": { + "dash": { + "description": "Dash manifest URI. If multiple Dash manifests are created, only the first one is listed.", + "type": "string" + }, + "hls": { + "description": "HLS manifest URI per https://tools.ietf.org/html/rfc8216#section-4.3.4. If multiple HLS manifests are created, only the first one is listed.", + "type": "string" + } + }, + "type": "object" + }, + "Output": { + "description": "Location of output file(s) in a Cloud Storage bucket.", + "id": "Output", + "properties": { + "uri": { + "description": "URI for the output file(s). For example, `gs://my-bucket/outputs/`. If empty the value is populated from `Job.output_uri`.", + "type": "string" + } + }, + "type": "object" + }, + "Overlay": { + "description": "Overlay configuration.", + "id": "Overlay", + "properties": { + "animations": { + "description": "List of Animations. The list should be chronological, without any time overlap.", + "items": { + "$ref": "Animation" + }, + "type": "array" + }, + "image": { + "$ref": "Image", + "description": "Image overlay." + } + }, + "type": "object" + }, + "Pad": { + "description": "Pad filter configuration for the input video. The padded input video is scaled after padding with black to match the output resolution.", + "id": "Pad", + "properties": { + "bottomPixels": { + "description": "The number of pixels to add to the bottom. The default is 0.", + "format": "int32", + "type": "integer" + }, + "leftPixels": { + "description": "The number of pixels to add to the left. The default is 0.", + "format": "int32", + "type": "integer" + }, + "rightPixels": { + "description": "The number of pixels to add to the right. The default is 0.", + "format": "int32", + "type": "integer" + }, + "topPixels": { + "description": "The number of pixels to add to the top. The default is 0.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "PreprocessingConfig": { + "description": "Preprocessing configurations.", + "id": "PreprocessingConfig", + "properties": { + "audio": { + "$ref": "Audio", + "description": "Audio preprocessing configuration." + }, + "color": { + "$ref": "Color", + "description": "Color preprocessing configuration." + }, + "crop": { + "$ref": "Crop", + "description": "Specify the video cropping configuration." + }, + "deblock": { + "$ref": "Deblock", + "description": "Deblock preprocessing configuration." + }, + "denoise": { + "$ref": "Denoise", + "description": "Denoise preprocessing configuration." + }, + "pad": { + "$ref": "Pad", + "description": "Specify the video pad filter configuration." + } + }, + "type": "object" + }, + "Progress": { + "description": "Estimated fractional progress for each step, from `0` to `1`.", + "id": "Progress", + "properties": { + "analyzed": { + "description": "Estimated fractional progress for `analyzing` step.", + "format": "double", + "type": "number" + }, + "encoded": { + "description": "Estimated fractional progress for `encoding` step.", + "format": "double", + "type": "number" + }, + "notified": { + "description": "Estimated fractional progress for `notifying` step.", + "format": "double", + "type": "number" + }, + "uploaded": { + "description": "Estimated fractional progress for `uploading` step.", + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "PubsubDestination": { + "description": "A Pub/Sub destination.", + "id": "PubsubDestination", + "properties": { + "topic": { + "description": "The name of the Pub/Sub topic to publish job completion notification to. For example: `projects/{project}/topics/{topic}`.", + "type": "string" + } + }, + "type": "object" + }, + "SampleAesEncryption": { + "description": "Configuration for SAMPLE-AES encryption.", + "id": "SampleAesEncryption", + "properties": { + "keyUri": { + "description": "Required. URI of the key delivery service. This URI is inserted into the M3U8 header.", + "type": "string" + } + }, + "type": "object" + }, + "SegmentSettings": { + "description": "Segment settings for `\"ts\"`, `\"fmp4\"` and `\"vtt\"`.", + "id": "SegmentSettings", + "properties": { + "individualSegments": { + "description": "Required. Create an individual segment file. The default is `false`.", + "type": "boolean" + }, + "segmentDuration": { + "description": "Duration of the segments in seconds. The default is `\"6.0s\"`. Note that `segmentDuration` must be greater than or equal to [`gopDuration`](#videostream), and `segmentDuration` must be divisible by [`gopDuration`](#videostream).", + "format": "google-duration", + "type": "string" + } + }, + "type": "object" + }, + "SpriteSheet": { + "description": "Sprite sheet configuration.", + "id": "SpriteSheet", + "properties": { + "columnCount": { + "description": "The maximum number of sprites per row in a sprite sheet. The default is 0, which indicates no maximum limit.", + "format": "int32", + "type": "integer" + }, + "endTimeOffset": { + "description": "End time in seconds, relative to the output file timeline. When `end_time_offset` is not specified, the sprites are generated until the end of the output file.", + "format": "google-duration", + "type": "string" + }, + "filePrefix": { + "description": "Required. File name prefix for the generated sprite sheets. Each sprite sheet has an incremental 10-digit zero-padded suffix starting from 0 before the extension, such as `\"sprite_sheet0000000123.jpeg\"`.", + "type": "string" + }, + "format": { + "description": "Format type. The default is `\"jpeg\"`. Supported formats: - 'jpeg'", + "type": "string" + }, + "interval": { + "description": "Starting from `0s`, create sprites at regular intervals. Specify the interval value in seconds.", + "format": "google-duration", + "type": "string" + }, + "quality": { + "description": "The quality of the generated sprite sheet. Enter a value between 1 and 100, where 1 is the lowest quality and 100 is the highest quality. The default is 100. A high quality value corresponds to a low image data compression ratio.", + "format": "int32", + "type": "integer" + }, + "rowCount": { + "description": "The maximum number of rows per sprite sheet. When the sprite sheet is full, a new sprite sheet is created. The default is 0, which indicates no maximum limit.", + "format": "int32", + "type": "integer" + }, + "spriteHeightPixels": { + "description": "Required. The height of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_height_pixels field or the SpriteSheet.sprite_width_pixels field, but not both (the API will automatically calculate the missing field).", + "format": "int32", + "type": "integer" + }, + "spriteWidthPixels": { + "description": "Required. The width of sprite in pixels. Must be an even integer. To preserve the source aspect ratio, set the SpriteSheet.sprite_width_pixels field or the SpriteSheet.sprite_height_pixels field, but not both (the API will automatically calculate the missing field).", + "format": "int32", + "type": "integer" + }, + "startTimeOffset": { + "description": "Start time in seconds, relative to the output file timeline. Determines the first sprite to pick. The default is `0s`.", + "format": "google-duration", + "type": "string" + }, + "totalCount": { + "description": "Total number of sprites. Create the specified number of sprites distributed evenly across the timeline of the output media. The default is 100.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TextAtom": { + "description": "The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.", + "id": "TextAtom", + "properties": { + "inputs": { + "description": "List of `Job.inputs` that should be embedded in this atom. Only one input is supported.", + "items": { + "$ref": "TextInput" + }, + "type": "array" + }, + "key": { + "description": "Required. The `EditAtom.key` that references atom with text inputs in the `Job.edit_list`.", + "type": "string" + } + }, + "type": "object" + }, + "TextInput": { + "description": "Identifies which input file and track should be used.", + "id": "TextInput", + "properties": { + "key": { + "description": "Required. The `Input.key` that identifies the input file.", + "type": "string" + }, + "track": { + "description": "Required. The zero-based index of the track in the input file.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TextStream": { + "description": "Encoding of a text stream. For example, closed captions or subtitles.", + "id": "TextStream", + "properties": { + "codec": { + "description": "The codec for this text stream. The default is `\"webvtt\"`. Supported text codecs: - 'srt' - 'ttml' - 'cea608' - 'cea708' - 'webvtt'", + "type": "string" + }, + "languageCode": { + "description": "Required. The BCP-47 language code, such as `\"en-US\"` or `\"sr-Latn\"`. For more information, see https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "type": "string" + }, + "mapping": { + "description": "The mapping for the `Job.edit_list` atoms with text `EditAtom.inputs`.", + "items": { + "$ref": "TextAtom" + }, + "type": "array" + } + }, + "type": "object" + }, + "VideoStream": { + "description": "Video stream resource.", + "id": "VideoStream", + "properties": { + "allowOpenGop": { + "description": "Specifies whether an open Group of Pictures (GOP) structure should be allowed or not. The default is `false`.", + "type": "boolean" + }, + "aqStrength": { + "description": "Specify the intensity of the adaptive quantizer (AQ). Must be between 0 and 1, where 0 disables the quantizer and 1 maximizes the quantizer. A higher value equals a lower bitrate but smoother image. The default is 0.", + "format": "double", + "type": "number" + }, + "bFrameCount": { + "description": "The number of consecutive B-frames. Must be greater than or equal to zero. Must be less than `VideoStream.gop_frame_count` if set. The default is 0.", + "format": "int32", + "type": "integer" + }, + "bPyramid": { + "description": "Allow B-pyramid for reference frame selection. This may not be supported on all decoders. The default is `false`.", + "type": "boolean" + }, + "bitrateBps": { + "description": "Required. The video bitrate in bits per second. The minimum value is 1,000. The maximum value for H264/H265 is 800,000,000. The maximum value for VP9 is 480,000,000.", + "format": "int32", + "type": "integer" + }, + "codec": { + "description": "Codec type. The following codecs are supported: * `h264` (default) * `h265` * `vp9`", + "type": "string" + }, + "crfLevel": { + "description": "Target CRF level. Must be between 10 and 36, where 10 is the highest quality and 36 is the most efficient compression. The default is 21.", + "format": "int32", + "type": "integer" + }, + "enableTwoPass": { + "description": "Use two-pass encoding strategy to achieve better video quality. `VideoStream.rate_control_mode` must be `\"vbr\"`. The default is `false`.", + "type": "boolean" + }, + "entropyCoder": { + "description": "The entropy coder to use. The default is `\"cabac\"`. Supported entropy coders: - 'cavlc' - 'cabac'", + "type": "string" + }, + "frameRate": { + "description": "Required. The target video frame rate in frames per second (FPS). Must be less than or equal to 120. Will default to the input frame rate if larger than the input frame rate. The API will generate an output FPS that is divisible by the input FPS, and smaller or equal to the target FPS. See [Calculate frame rate](https://cloud.google.com/transcoder/docs/concepts/frame-rate) for more information.", + "format": "double", + "type": "number" + }, + "gopDuration": { + "description": "Select the GOP size based on the specified duration. The default is `\"3s\"`. Note that `gopDuration` must be less than or equal to [`segmentDuration`](#SegmentSettings), and [`segmentDuration`](#SegmentSettings) must be divisible by `gopDuration`.", + "format": "google-duration", + "type": "string" + }, + "gopFrameCount": { + "description": "Select the GOP size based on the specified frame count. Must be greater than zero.", + "format": "int32", + "type": "integer" + }, + "heightPixels": { + "description": "The height of the video in pixels. Must be an even integer. When not specified, the height is adjusted to match the specified width and input aspect ratio. If both are omitted, the input height is used.", + "format": "int32", + "type": "integer" + }, + "pixelFormat": { + "description": "Pixel format to use. The default is `\"yuv420p\"`. Supported pixel formats: - 'yuv420p' pixel format. - 'yuv422p' pixel format. - 'yuv444p' pixel format. - 'yuv420p10' 10-bit HDR pixel format. - 'yuv422p10' 10-bit HDR pixel format. - 'yuv444p10' 10-bit HDR pixel format. - 'yuv420p12' 12-bit HDR pixel format. - 'yuv422p12' 12-bit HDR pixel format. - 'yuv444p12' 12-bit HDR pixel format.", + "type": "string" + }, + "preset": { + "description": "Enforces the specified codec preset. The default is `veryfast`. The available options are FFmpeg-compatible. Note that certain values for this field may cause the transcoder to override other fields you set in the `VideoStream` message.", + "type": "string" + }, + "profile": { + "description": "Enforces the specified codec profile. The following profiles are supported: * `baseline` * `main` * `high` (default) The available options are FFmpeg-compatible. Note that certain values for this field may cause the transcoder to override other fields you set in the `VideoStream` message.", + "type": "string" + }, + "rateControlMode": { + "description": "Specify the `rate_control_mode`. The default is `\"vbr\"`. Supported rate control modes: - 'vbr' - variable bitrate - 'crf' - constant rate factor", + "type": "string" + }, + "tune": { + "description": "Enforces the specified codec tune. The available options are FFmpeg-compatible. Note that certain values for this field may cause the transcoder to override other fields you set in the `VideoStream` message.", + "type": "string" + }, + "vbvFullnessBits": { + "description": "Initial fullness of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to 90% of `VideoStream.vbv_size_bits`.", + "format": "int32", + "type": "integer" + }, + "vbvSizeBits": { + "description": "Size of the Video Buffering Verifier (VBV) buffer in bits. Must be greater than zero. The default is equal to `VideoStream.bitrate_bps`.", + "format": "int32", + "type": "integer" + }, + "widthPixels": { + "description": "The width of the video in pixels. Must be an even integer. When not specified, the width is adjusted to match the specified height and input aspect ratio. If both are omitted, the input width is used.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Transcoder API", + "version": "v1beta1", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..ae15acce060d46df929057365fd53531d135ede9 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v2.json @@ -0,0 +1,440 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "View and manage your data across Google Cloud Platform services" +}, +"https://www.googleapis.com/auth/cloud-translation": { +"description": "Translate text from one language to another using Google Translate" +} +} +} +}, +"basePath": "/language/translate/", +"baseUrl": "https://translation.googleapis.com/language/translate/", +"batchPath": "batch/translate", +"canonicalName": "Translate", +"description": "The Google Cloud Translation API lets websites and programs integrate with\n Google Translate programmatically.", +"discoveryVersion": "v1", +"documentationLink": "https://code.google.com/apis/language/translate/v2/getting_started.html", +"features": [ +"dataWrapper" +], +"icons": { +"x16": "https://www.google.com/images/icons/product/translate-16.png", +"x32": "https://www.google.com/images/icons/product/translate-32.png" +}, +"id": "translate:v2", +"kind": "discovery#restDescription", +"name": "translate", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"bearer_token": { +"description": "OAuth bearer token.", +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"pp": { +"default": "true", +"description": "Pretty-print response.", +"location": "query", +"type": "boolean" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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. Overrides userIp if both are provided.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"detections": { +"methods": { +"detect": { +"description": "Detects the language of text within a request.", +"httpMethod": "POST", +"id": "language.detections.detect", +"parameterOrder": [], +"parameters": {}, +"path": "v2/detect", +"request": { +"$ref": "DetectLanguageRequest" +}, +"response": { +"$ref": "DetectionsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-translation", +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Detects the language of text within a request.", +"httpMethod": "GET", +"id": "language.detections.list", +"parameterOrder": [ +"q" +], +"parameters": { +"q": { +"description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "v2/detect", +"response": { +"$ref": "DetectionsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-translation", +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"languages": { +"methods": { +"list": { +"description": "Returns a list of supported languages for translation.", +"httpMethod": "GET", +"id": "language.languages.list", +"parameters": { +"model": { +"description": "The model type for which supported languages should be returned.", +"location": "query", +"type": "string" +}, +"target": { +"description": "The language to use to return localized, human readable names of supported\nlanguages.", +"location": "query", +"type": "string" +} +}, +"path": "v2/languages", +"response": { +"$ref": "LanguagesListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-translation", +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"translations": { +"methods": { +"list": { +"description": "Translates input text, returning translated text.", +"httpMethod": "GET", +"id": "language.translations.list", +"parameterOrder": [ +"q", +"target" +], +"parameters": { +"cid": { +"description": "The customization id for translate", +"location": "query", +"repeated": true, +"type": "string" +}, +"format": { +"description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.", +"enum": [ +"html", +"text" +], +"enumDescriptions": [ +"Specifies the input is in HTML", +"Specifies the input is in plain textual format" +], +"location": "query", +"type": "string" +}, +"model": { +"description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", +"location": "query", +"type": "string" +}, +"q": { +"description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"source": { +"description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", +"location": "query", +"type": "string" +}, +"target": { +"description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.", +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "v2", +"response": { +"$ref": "TranslationsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-translation", +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"translate": { +"description": "Translates input text, returning translated text.", +"httpMethod": "POST", +"id": "language.translations.translate", +"parameterOrder": [], +"parameters": {}, +"path": "v2", +"request": { +"$ref": "TranslateTextRequest" +}, +"response": { +"$ref": "TranslationsListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-translation", +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20170525", +"rootUrl": "https://translation.googleapis.com/", +"schemas": { +"DetectLanguageRequest": { +"description": "The request message for language detection.", +"id": "DetectLanguageRequest", +"properties": { +"q": { +"description": "The input text upon which to perform language detection. Repeat this\nparameter to perform language detection on multiple text inputs.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"DetectionsListResponse": { +"id": "DetectionsListResponse", +"properties": { +"detections": { +"description": "A detections contains detection results of several text", +"items": { +"$ref": "DetectionsResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"DetectionsResource": { +"description": "An array of languages which we detect for the given text The most likely language list first.", +"id": "DetectionsResource", +"items": { +"properties": { +"confidence": { +"description": "The confidence of the detection result of this language.", +"format": "float", +"type": "number" +}, +"isReliable": { +"description": "A boolean to indicate is the language detection result reliable.", +"type": "boolean" +}, +"language": { +"description": "The language we detected.", +"type": "string" +} +}, +"type": "object" +}, +"type": "array" +}, +"GetSupportedLanguagesRequest": { +"description": "The request message for discovering supported languages.", +"id": "GetSupportedLanguagesRequest", +"properties": { +"target": { +"description": "The language to use to return localized, human readable names of supported\nlanguages.", +"type": "string" +} +}, +"type": "object" +}, +"LanguagesListResponse": { +"id": "LanguagesListResponse", +"properties": { +"languages": { +"description": "List of source/target languages supported by the translation API. If target parameter is unspecified, the list is sorted by the ASCII code point order of the language code. If target parameter is specified, the list is sorted by the collation order of the language name in the target language.", +"items": { +"$ref": "LanguagesResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"LanguagesResource": { +"id": "LanguagesResource", +"properties": { +"language": { +"description": "Supported language code, generally consisting of its ISO 639-1\nidentifier. (E.g. 'en', 'ja'). In certain cases, BCP-47 codes including\nlanguage + region identifiers are returned (e.g. 'zh-TW' and 'zh-CH')", +"type": "string" +}, +"name": { +"description": "Human readable name of the language localized to the target language.", +"type": "string" +} +}, +"type": "object" +}, +"TranslateTextRequest": { +"description": "The main translation request message for the Cloud Translation API.", +"id": "TranslateTextRequest", +"properties": { +"format": { +"description": "The format of the source text, in either HTML (default) or plain-text. A\nvalue of \"html\" indicates HTML and a value of \"text\" indicates plain-text.", +"type": "string" +}, +"model": { +"description": "The `model` type requested for this translation. Valid values are\nlisted in public documentation.", +"type": "string" +}, +"q": { +"description": "The input text to translate. Repeat this parameter to perform translation\noperations on multiple text inputs.", +"items": { +"type": "string" +}, +"type": "array" +}, +"source": { +"description": "The language of the source text, set to one of the language codes listed in\nLanguage Support. If the source language is not specified, the API will\nattempt to identify the source language automatically and return it within\nthe response.", +"type": "string" +}, +"target": { +"description": "The language to use for translation of the input text, set to one of the\nlanguage codes listed in Language Support.", +"type": "string" +} +}, +"type": "object" +}, +"TranslationsListResponse": { +"description": "The main language translation response message.", +"id": "TranslationsListResponse", +"properties": { +"translations": { +"description": "Translations contains list of translation results of given text", +"items": { +"$ref": "TranslationsResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"TranslationsResource": { +"id": "TranslationsResource", +"properties": { +"detectedSourceLanguage": { +"description": "The source language of the initial request, detected automatically, if\nno source language was passed within the initial request. If the\nsource language was passed, auto-detection of the language will not\noccur and this field will be empty.", +"type": "string" +}, +"model": { +"description": "The `model` type used for this translation. Valid values are\nlisted in public documentation. Can be different from requested `model`.\nPresent only if specific model type was explicitly requested.", +"type": "string" +}, +"translatedText": { +"description": "Text translated into the target language.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "language/translate/", +"title": "Google Cloud Translation API", +"version": "v2" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v3.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v3.json new file mode 100644 index 0000000000000000000000000000000000000000..70e8060f012aec36c20ec3bbfbc7ed585c5b90bb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v3.json @@ -0,0 +1,3170 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-translation": { +"description": "Translate text from one language to another using Google Translate" +} +} +} +}, +"basePath": "", +"baseUrl": "https://translation.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Translate", +"description": "Integrates text translation into your website or application.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/translate/docs/quickstarts", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "translate:v3", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://translation.mtls.googleapis.com/", +"name": "translate", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"methods": { +"detectLanguage": { +"description": "Detects the language of text within a request.", +"flatPath": "v3/projects/{projectsId}:detectLanguage", +"httpMethod": "POST", +"id": "translate.projects.detectLanguage", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}` or `projects/{project-number-or-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:detectLanguage", +"request": { +"$ref": "DetectLanguageRequest" +}, +"response": { +"$ref": "DetectLanguageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"getSupportedLanguages": { +"description": "Returns a list of supported languages for translation.", +"flatPath": "v3/projects/{projectsId}/supportedLanguages", +"httpMethod": "GET", +"id": "translate.projects.getSupportedLanguages", +"parameterOrder": [ +"parent" +], +"parameters": { +"displayLanguageCode": { +"description": "Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.", +"location": "query", +"type": "string" +}, +"model": { +"description": "Optional. Get supported languages of this model. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, Returns languages supported by the specified model. If missing, we get supported languages of Google general NMT model.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/supportedLanguages", +"response": { +"$ref": "SupportedLanguages" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"romanizeText": { +"description": "Romanize input text written in non-Latin scripts to Latin text.", +"flatPath": "v3/projects/{projectsId}:romanizeText", +"httpMethod": "POST", +"id": "translate.projects.romanizeText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}` or `projects/{project-number-or-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:romanizeText", +"request": { +"$ref": "RomanizeTextRequest" +}, +"response": { +"$ref": "RomanizeTextResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"translateText": { +"description": "Translates input text and returns translated text.", +"flatPath": "v3/projects/{projectsId}:translateText", +"httpMethod": "POST", +"id": "translate.projects.translateText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:translateText", +"request": { +"$ref": "TranslateTextRequest" +}, +"response": { +"$ref": "TranslateTextResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +}, +"resources": { +"locations": { +"methods": { +"adaptiveMtTranslate": { +"description": "Translate text using Adaptive MT.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}:adaptiveMtTranslate", +"httpMethod": "POST", +"id": "translate.projects.locations.adaptiveMtTranslate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:adaptiveMtTranslate", +"request": { +"$ref": "AdaptiveMtTranslateRequest" +}, +"response": { +"$ref": "AdaptiveMtTranslateResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"batchTranslateDocument": { +"description": "Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}:batchTranslateDocument", +"httpMethod": "POST", +"id": "translate.projects.locations.batchTranslateDocument", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:batchTranslateDocument", +"request": { +"$ref": "BatchTranslateDocumentRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"batchTranslateText": { +"description": "Translates a large volume of text in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}:batchTranslateText", +"httpMethod": "POST", +"id": "translate.projects.locations.batchTranslateText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:batchTranslateText", +"request": { +"$ref": "BatchTranslateTextRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"detectLanguage": { +"description": "Detects the language of text within a request.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}:detectLanguage", +"httpMethod": "POST", +"id": "translate.projects.locations.detectLanguage", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}` or `projects/{project-number-or-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:detectLanguage", +"request": { +"$ref": "DetectLanguageRequest" +}, +"response": { +"$ref": "DetectLanguageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets information about a location.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "translate.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"getSupportedLanguages": { +"description": "Returns a list of supported languages for translation.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/supportedLanguages", +"httpMethod": "GET", +"id": "translate.projects.locations.getSupportedLanguages", +"parameterOrder": [ +"parent" +], +"parameters": { +"displayLanguageCode": { +"description": "Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.", +"location": "query", +"type": "string" +}, +"model": { +"description": "Optional. Get supported languages of this model. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, Returns languages supported by the specified model. If missing, we get supported languages of Google general NMT model.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/supportedLanguages", +"response": { +"$ref": "SupportedLanguages" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v3/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "translate.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"romanizeText": { +"description": "Romanize input text written in non-Latin scripts to Latin text.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}:romanizeText", +"httpMethod": "POST", +"id": "translate.projects.locations.romanizeText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}` or `projects/{project-number-or-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:romanizeText", +"request": { +"$ref": "RomanizeTextRequest" +}, +"response": { +"$ref": "RomanizeTextResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"translateDocument": { +"description": "Translates documents in synchronous mode.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}:translateDocument", +"httpMethod": "POST", +"id": "translate.projects.locations.translateDocument", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:translateDocument", +"request": { +"$ref": "TranslateDocumentRequest" +}, +"response": { +"$ref": "TranslateDocumentResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"translateText": { +"description": "Translates input text and returns translated text.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}:translateText", +"httpMethod": "POST", +"id": "translate.projects.locations.translateText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:translateText", +"request": { +"$ref": "TranslateTextRequest" +}, +"response": { +"$ref": "TranslateTextResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +}, +"resources": { +"adaptiveMtDatasets": { +"methods": { +"create": { +"description": "Creates an Adaptive MT dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets", +"httpMethod": "POST", +"id": "translate.projects.locations.adaptiveMtDatasets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the parent project. In form of `projects/{project-number-or-id}/locations/{location-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/adaptiveMtDatasets", +"request": { +"$ref": "AdaptiveMtDataset" +}, +"response": { +"$ref": "AdaptiveMtDataset" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"delete": { +"description": "Deletes an Adaptive MT dataset, including all its entries and associated metadata.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.adaptiveMtDatasets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets the Adaptive MT dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}", +"httpMethod": "GET", +"id": "translate.projects.locations.adaptiveMtDatasets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the dataset. In the form of `projects/{project-number-or-id}/locations/{location-id}/adaptiveMtDatasets/{adaptive-mt-dataset-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "AdaptiveMtDataset" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"importAdaptiveMtFile": { +"description": "Imports an AdaptiveMtFile and adds all of its sentences into the AdaptiveMtDataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}:importAdaptiveMtFile", +"httpMethod": "POST", +"id": "translate.projects.locations.adaptiveMtDatasets.importAdaptiveMtFile", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}:importAdaptiveMtFile", +"request": { +"$ref": "ImportAdaptiveMtFileRequest" +}, +"response": { +"$ref": "ImportAdaptiveMtFileResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists all Adaptive MT datasets for which the caller has read permission.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets", +"httpMethod": "GET", +"id": "translate.projects.locations.adaptiveMtDatasets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. An expression for filtering the results of the request. Filter is not supported yet.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server may return fewer results than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtDatasetsResponse.next_page_token returned from the previous call to `ListAdaptiveMtDatasets` method. The first page is returned if `page_token`is empty or missing.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project from which to list the Adaptive MT datasets. `projects/{project-number-or-id}/locations/{location-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/adaptiveMtDatasets", +"response": { +"$ref": "ListAdaptiveMtDatasetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +}, +"resources": { +"adaptiveMtFiles": { +"methods": { +"delete": { +"description": "Deletes an AdaptiveMtFile along with its sentences.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the file to delete, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets and AdaptiveMtFile", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}", +"httpMethod": "GET", +"id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "AdaptiveMtFile" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists all AdaptiveMtFiles associated to an AdaptiveMtDataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles", +"httpMethod": "GET", +"id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. ", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtFilesResponse.next_page_token returned from the previous call to `ListAdaptiveMtFiles` method. The first page is returned if `page_token`is empty or missing.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project from which to list the Adaptive MT files. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/adaptiveMtFiles", +"response": { +"$ref": "ListAdaptiveMtFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +}, +"resources": { +"adaptiveMtSentences": { +"methods": { +"list": { +"description": "Lists all AdaptiveMtSentences under a given file/dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtFiles/{adaptiveMtFilesId}/adaptiveMtSentences", +"httpMethod": "GET", +"id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtFiles.adaptiveMtSentences.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned from the previous call to `ListTranslationMemories` method. The first page is returned if `page_token` is empty or missing.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` The following format lists all sentences within a dataset. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+/adaptiveMtFiles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/adaptiveMtSentences", +"response": { +"$ref": "ListAdaptiveMtSentencesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +} +} +}, +"adaptiveMtSentences": { +"methods": { +"list": { +"description": "Lists all AdaptiveMtSentences under a given file/dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/adaptiveMtDatasets/{adaptiveMtDatasetsId}/adaptiveMtSentences", +"httpMethod": "GET", +"id": "translate.projects.locations.adaptiveMtDatasets.adaptiveMtSentences.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return. Typically, this is the value of ListAdaptiveMtSentencesRequest.next_page_token returned from the previous call to `ListTranslationMemories` method. The first page is returned if `page_token` is empty or missing.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the project from which to list the Adaptive MT files. The following format lists all sentences under a file. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}` The following format lists all sentences within a dataset. `projects/{project}/locations/{location}/adaptiveMtDatasets/{dataset}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/adaptiveMtDatasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/adaptiveMtSentences", +"response": { +"$ref": "ListAdaptiveMtSentencesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +} +} +}, +"datasets": { +"methods": { +"create": { +"description": "Creates a Dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/datasets", +"httpMethod": "POST", +"id": "translate.projects.locations.datasets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/datasets", +"request": { +"$ref": "Dataset" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"delete": { +"description": "Deletes a dataset and all of its contents.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.datasets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the dataset to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"exportData": { +"description": "Exports dataset's data to the provided output location.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:exportData", +"httpMethod": "POST", +"id": "translate.projects.locations.datasets.exportData", +"parameterOrder": [ +"dataset" +], +"parameters": { +"dataset": { +"description": "Required. Name of the dataset. In form of `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+dataset}:exportData", +"request": { +"$ref": "ExportDataRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets a Dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}", +"httpMethod": "GET", +"id": "translate.projects.locations.datasets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the dataset to retrieve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Dataset" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"importData": { +"description": "Import sentence pairs into translation Dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}:importData", +"httpMethod": "POST", +"id": "translate.projects.locations.datasets.importData", +"parameterOrder": [ +"dataset" +], +"parameters": { +"dataset": { +"description": "Required. Name of the dataset. In form of `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+dataset}:importData", +"request": { +"$ref": "ImportDataRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists datasets.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/datasets", +"httpMethod": "GET", +"id": "translate.projects.locations.datasets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Requested page size. The server can return fewer results than requested.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results for the server to return. Typically obtained from next_page_token field in the response of a ListDatasets call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent project. In form of `projects/{project-number-or-id}/locations/{location-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/datasets", +"response": { +"$ref": "ListDatasetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +}, +"resources": { +"examples": { +"methods": { +"list": { +"description": "Lists sentence pairs in the dataset.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/datasets/{datasetsId}/examples", +"httpMethod": "GET", +"id": "translate.projects.locations.datasets.examples.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. An expression for filtering the examples that will be returned. Example filter: * `usage=TRAIN`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server can return fewer results than requested.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results for the server to return. Typically obtained from next_page_token field in the response of a ListExamples call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent dataset. In form of `projects/{project-number-or-id}/locations/{location-id}/datasets/{dataset-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/datasets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/examples", +"response": { +"$ref": "ListExamplesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +} +} +}, +"glossaries": { +"methods": { +"create": { +"description": "Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries", +"httpMethod": "POST", +"id": "translate.projects.locations.glossaries.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/glossaries", +"request": { +"$ref": "Glossary" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.glossaries.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the glossary to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}", +"httpMethod": "GET", +"id": "translate.projects.locations.glossaries.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the glossary to retrieve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Glossary" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries", +"httpMethod": "GET", +"id": "translate.projects.locations.glossaries.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter specifying constraints of a list operation. Specify the constraint by the format of \"key=value\", where key must be \"src\" or \"tgt\", and the value must be a valid language code. For multiple restrictions, concatenate them by \"AND\" (uppercase only), such as: \"src=en-US AND tgt=zh-CN\". Notice that the exact match is used here, which means using 'en-US' and 'en' can lead to different results, which depends on the language code you used when you create the glossary. For the unidirectional glossaries, the \"src\" and \"tgt\" add restrictions on the source and target language code separately. For the equivalent term set glossaries, the \"src\" and/or \"tgt\" add restrictions on the term set. For example: \"src=en-US AND tgt=zh-CN\" will only pick the unidirectional glossaries which exactly match the source language code as \"en-US\" and the target language code \"zh-CN\", but all equivalent term set glossaries which contain \"en-US\" and \"zh-CN\" in their language set will be picked. If missing, no filtering is performed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server may return fewer glossaries than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of [ListGlossariesResponse.next_page_token] returned from the previous call to `ListGlossaries` method. The first page is returned if `page_token`is empty or missing.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project from which to list all of the glossaries.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/glossaries", +"response": { +"$ref": "ListGlossariesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"patch": { +"description": "Updates a glossary. A LRO is used since the update can be async if the glossary's entry file is updated.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}", +"httpMethod": "PATCH", +"id": "translate.projects.locations.glossaries.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The list of fields to be updated. Currently only `display_name` and 'input_config'", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "Glossary" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"glossaryEntries": { +"methods": { +"create": { +"description": "Creates a glossary entry.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/glossaryEntries", +"httpMethod": "POST", +"id": "translate.projects.locations.glossaries.glossaryEntries.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the glossary to create the entry under.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/glossaryEntries", +"request": { +"$ref": "GlossaryEntry" +}, +"response": { +"$ref": "GlossaryEntry" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"delete": { +"description": "Deletes a single entry from the glossary", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/glossaryEntries/{glossaryEntriesId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.glossaries.glossaryEntries.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the glossary entry to delete", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets a single glossary entry by the given id.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/glossaryEntries/{glossaryEntriesId}", +"httpMethod": "GET", +"id": "translate.projects.locations.glossaries.glossaryEntries.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the glossary entry to get", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "GlossaryEntry" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "List the entries for the glossary.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/glossaryEntries", +"httpMethod": "GET", +"id": "translate.projects.locations.glossaries.glossaryEntries.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Requested page size. The server may return fewer glossary entries than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of [ListGlossaryEntriesResponse.next_page_token] returned from the previous call. The first page is returned if `page_token`is empty or missing.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent glossary resource name for listing the glossary's entries.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/glossaryEntries", +"response": { +"$ref": "ListGlossaryEntriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"patch": { +"description": "Updates a glossary entry.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}/glossaryEntries/{glossaryEntriesId}", +"httpMethod": "PATCH", +"id": "translate.projects.locations.glossaries.glossaryEntries.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+/glossaryEntries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"request": { +"$ref": "GlossaryEntry" +}, +"response": { +"$ref": "GlossaryEntry" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +} +} +}, +"models": { +"methods": { +"create": { +"description": "Creates a Model.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/models", +"httpMethod": "POST", +"id": "translate.projects.locations.models.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project name, in form of `projects/{project}/locations/{location}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/models", +"request": { +"$ref": "Model" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"delete": { +"description": "Deletes a model.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/models/{modelsId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.models.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the model to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets a model.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/models/{modelsId}", +"httpMethod": "GET", +"id": "translate.projects.locations.models.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the model to retrieve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/models/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Model" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists models.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/models", +"httpMethod": "GET", +"id": "translate.projects.locations.models.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. An expression for filtering the models that will be returned. Supported filter: `dataset_id=${dataset_id}`", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server can return fewer results than requested.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results for the server to return. Typically obtained from next_page_token field in the response of a ListModels call.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the parent project. In form of `projects/{project-number-or-id}/locations/{location-id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+parent}/models", +"response": { +"$ref": "ListModelsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "translate.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "translate.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "translate.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v3/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"wait": { +"description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", +"flatPath": "v3/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:wait", +"httpMethod": "POST", +"id": "translate.projects.locations.operations.wait", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to wait on.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3/{+name}:wait", +"request": { +"$ref": "WaitOperationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +} +} +} +} +} +}, +"revision": "20240301", +"rootUrl": "https://translation.googleapis.com/", +"schemas": { +"AdaptiveMtDataset": { +"description": "An Adaptive MT Dataset.", +"id": "AdaptiveMtDataset", +"properties": { +"createTime": { +"description": "Output only. Timestamp when this dataset was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.", +"type": "string" +}, +"exampleCount": { +"description": "The number of examples in the dataset.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset_id}`", +"type": "string" +}, +"sourceLanguageCode": { +"description": "The BCP-47 language code of the source language.", +"type": "string" +}, +"targetLanguageCode": { +"description": "The BCP-47 language code of the target language.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp when this dataset was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AdaptiveMtFile": { +"description": "An AdaptiveMtFile.", +"id": "AdaptiveMtFile", +"properties": { +"createTime": { +"description": "Output only. Timestamp when this file was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "The file's display name.", +"type": "string" +}, +"entryCount": { +"description": "The number of entries that the file contains.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}`", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp when this file was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AdaptiveMtSentence": { +"description": "An AdaptiveMt sentence entry.", +"id": "AdaptiveMtSentence", +"properties": { +"createTime": { +"description": "Output only. Timestamp when this sentence was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Required. The resource name of the file, in form of `projects/{project-number-or-id}/locations/{location_id}/adaptiveMtDatasets/{dataset}/adaptiveMtFiles/{file}/adaptiveMtSentences/{sentence}`", +"type": "string" +}, +"sourceSentence": { +"description": "Required. The source sentence.", +"type": "string" +}, +"targetSentence": { +"description": "Required. The target sentence.", +"type": "string" +}, +"updateTime": { +"description": "Output only. Timestamp when this sentence was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AdaptiveMtTranslateRequest": { +"description": "The request for sending an AdaptiveMt translation query.", +"id": "AdaptiveMtTranslateRequest", +"properties": { +"content": { +"description": "Required. The content of the input in string format. For now only one sentence per request is supported.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dataset": { +"description": "Required. The resource name for the dataset to use for adaptive MT. `projects/{project}/locations/{location-id}/adaptiveMtDatasets/{dataset}`", +"type": "string" +} +}, +"type": "object" +}, +"AdaptiveMtTranslateResponse": { +"description": "An AdaptiveMtTranslate response.", +"id": "AdaptiveMtTranslateResponse", +"properties": { +"languageCode": { +"description": "Output only. The translation's language code.", +"readOnly": true, +"type": "string" +}, +"translations": { +"description": "Output only. The translation.", +"items": { +"$ref": "AdaptiveMtTranslation" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"AdaptiveMtTranslation": { +"description": "An AdaptiveMt translation.", +"id": "AdaptiveMtTranslation", +"properties": { +"translatedText": { +"description": "Output only. The translated text.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"BatchDocumentInputConfig": { +"description": "Input configuration for BatchTranslateDocument request.", +"id": "BatchDocumentInputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Google Cloud Storage location for the source input. This can be a single file (for example, `gs://translation-test/input.docx`) or a wildcard (for example, `gs://translation-test/*`). File mime type is determined based on extension. Supported mime type includes: - `pdf`, application/pdf - `docx`, application/vnd.openxmlformats-officedocument.wordprocessingml.document - `pptx`, application/vnd.openxmlformats-officedocument.presentationml.presentation - `xlsx`, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. The max file size to support for `.pdf` is 1GB and the max page limit is 1000 pages. The max file size to support for all input documents is 1GB." +} +}, +"type": "object" +}, +"BatchDocumentOutputConfig": { +"description": "Output configuration for BatchTranslateDocument request.", +"id": "BatchDocumentOutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Google Cloud Storage destination for output content. For every single input document (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateDocumentRequest). While the input documents are being processed, we write/update an index file `index.csv` under `gcs_destination.output_uri_prefix` (for example, gs://translation_output/index.csv) The index file is generated/updated as new files are being translated. The format is: input_document,target_language_code,translation_output,error_output, glossary_translation_output,glossary_error_output `input_document` is one file we matched using gcs_source.input_uri. `target_language_code` is provided in the request. `translation_output` contains the translations. (details provided below) `error_output` contains the error message during processing of the file. Both translations_file and errors_file could be empty strings if we have no content to output. `glossary_translation_output` and `glossary_error_output` are the translated output/error when we apply glossaries. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The naming format of translation output files follows (for target language code [trg]): `translation_output`: `gs://translation_output/a_b_c_[trg]_translation.[extension]` `glossary_translation_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The output document will maintain the same file format as the input document. The naming format of error output files follows (for target language code [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` `glossary_error_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.txt`. The error output is a txt file containing error details." +} +}, +"type": "object" +}, +"BatchTranslateDocumentRequest": { +"description": "The BatchTranslateDocument request.", +"id": "BatchTranslateDocumentRequest", +"properties": { +"customizedAttribution": { +"description": "Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos", +"type": "string" +}, +"enableRotationCorrection": { +"description": "Optional. If true, enable auto rotation correction in DVS.", +"type": "boolean" +}, +"enableShadowRemovalNativePdf": { +"description": "Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when is_translate_native_pdf_only: false && pdf_native_only: false", +"type": "boolean" +}, +"formatConversions": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The file format conversion map that is applied to all input files. The map key is the original mime_type. The map value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.", +"type": "object" +}, +"glossaries": { +"additionalProperties": { +"$ref": "TranslateTextGlossaryConfig" +}, +"description": "Optional. Glossaries to be applied. It's keyed by target language code.", +"type": "object" +}, +"inputConfigs": { +"description": "Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.", +"items": { +"$ref": "BatchDocumentInputConfig" +}, +"type": "array" +}, +"models": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The models to use for translation. Map's key is target language code. Map's value is the model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.", +"type": "object" +}, +"outputConfig": { +"$ref": "BatchDocumentOutputConfig", +"description": "Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs." +}, +"sourceLanguageCode": { +"description": "Required. The ISO-639 language code of the input document if known, for example, \"en-US\" or \"sr-Latn\". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).", +"type": "string" +}, +"targetLanguageCodes": { +"description": "Required. The ISO-639 language code to use for translation of the input document. Specify up to 10 language codes here.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchTranslateTextRequest": { +"description": "The batch translation request.", +"id": "BatchTranslateTextRequest", +"properties": { +"glossaries": { +"additionalProperties": { +"$ref": "TranslateTextGlossaryConfig" +}, +"description": "Optional. Glossaries to be applied for translation. It's keyed by target language code.", +"type": "object" +}, +"inputConfigs": { +"description": "Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.", +"items": { +"$ref": "InputConfig" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.", +"type": "object" +}, +"models": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The models to use for translation. Map's key is target language code. Map's value is model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.", +"type": "object" +}, +"outputConfig": { +"$ref": "OutputConfig", +"description": "Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs." +}, +"sourceLanguageCode": { +"description": "Required. Source language code.", +"type": "string" +}, +"targetLanguageCodes": { +"description": "Required. Specify up to 10 language codes here.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Dataset": { +"description": "A dataset that hosts the examples (sentence pairs) used for translation models.", +"id": "Dataset", +"properties": { +"createTime": { +"description": "Output only. Timestamp when this dataset was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "The name of the dataset to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.", +"type": "string" +}, +"exampleCount": { +"description": "Output only. The number of examples in the dataset.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"name": { +"description": "The resource name of the dataset, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`", +"type": "string" +}, +"sourceLanguageCode": { +"description": "The BCP-47 language code of the source language.", +"type": "string" +}, +"targetLanguageCode": { +"description": "The BCP-47 language code of the target language.", +"type": "string" +}, +"testExampleCount": { +"description": "Output only. Number of test examples (sentence pairs).", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"trainExampleCount": { +"description": "Output only. Number of training examples (sentence pairs).", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"updateTime": { +"description": "Output only. Timestamp when this dataset was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"validateExampleCount": { +"description": "Output only. Number of validation examples (sentence pairs).", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"DatasetInputConfig": { +"description": "Input configuration for datasets.", +"id": "DatasetInputConfig", +"properties": { +"inputFiles": { +"description": "Files containing the sentence pairs to be imported to the dataset.", +"items": { +"$ref": "InputFile" +}, +"type": "array" +} +}, +"type": "object" +}, +"DatasetOutputConfig": { +"description": "Output configuration for datasets.", +"id": "DatasetOutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsOutputDestination", +"description": "Google Cloud Storage destination to write the output." +} +}, +"type": "object" +}, +"DetectLanguageRequest": { +"description": "The request message for language detection.", +"id": "DetectLanguageRequest", +"properties": { +"content": { +"description": "The content of the input stored as a string.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.", +"type": "object" +}, +"mimeType": { +"description": "Optional. The format of the source text, for example, \"text/html\", \"text/plain\". If left blank, the MIME type defaults to \"text/html\".", +"type": "string" +}, +"model": { +"description": "Optional. The language detection model to be used. Format: `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` Only one language detection model is currently supported: `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. If not specified, the default model is used.", +"type": "string" +} +}, +"type": "object" +}, +"DetectLanguageResponse": { +"description": "The response message for language detection.", +"id": "DetectLanguageResponse", +"properties": { +"languages": { +"description": "The most probable language detected by the Translation API. For each request, the Translation API will always return only one result.", +"items": { +"$ref": "DetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"DetectedLanguage": { +"description": "The response message for language detection.", +"id": "DetectedLanguage", +"properties": { +"confidence": { +"description": "The confidence of the detection result for this language.", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The ISO-639 language code of the source content in the request, detected automatically.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentInputConfig": { +"description": "A document translation request input config.", +"id": "DocumentInputConfig", +"properties": { +"content": { +"description": "Document's content represented as a stream of bytes.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GcsSource", +"description": "Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf" +}, +"mimeType": { +"description": "Specifies the input document's mime_type. If not specified it will be determined using the file extension for gcs_source provided files. For a file provided through bytes content the mime_type must be provided. Currently supported mime types are: - application/pdf - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", +"type": "string" +} +}, +"type": "object" +}, +"DocumentOutputConfig": { +"description": "A document translation request output config.", +"id": "DocumentOutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Optional. Google Cloud Storage destination for the translation output, e.g., `gs://my_bucket/my_directory/`. The destination directory provided does not have to be empty, but the bucket must exist. If a file with the same name as the output file already exists in the destination an error will be returned. For a DocumentInputConfig.contents provided document, the output file will have the name \"output_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. For a DocumentInputConfig.gcs_uri provided document, the output file will have a name according to its URI. For example: an input file with URI: `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name \"my_bucket\" will have an output URI: `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If the document was directly provided through the request, then the output document will have the format: `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If a glossary was provided, then the output URI for the glossary translation will be equal to the default output URI but have `glossary_translations` instead of `translations`. For the previous example, its glossary URI would be: `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. Thus the max number of output files will be 2 (Translated document, Glossary translated document). Callers should expect no partial outputs. If there is any error during document translation, no output will be stored in the Cloud Storage bucket." +}, +"mimeType": { +"description": "Optional. Specifies the translated document's mime_type. If not specified, the translated file's mime type will be the same as the input file's mime type. Currently only support the output mime type to be the same as input mime type. - application/pdf - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", +"type": "string" +} +}, +"type": "object" +}, +"DocumentTranslation": { +"description": "A translated document message.", +"id": "DocumentTranslation", +"properties": { +"byteStreamOutputs": { +"description": "The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.", +"items": { +"format": "byte", +"type": "string" +}, +"type": "array" +}, +"detectedLanguageCode": { +"description": "The detected language for the input document. If the user did not provide the source language for the input document, this field will have the language code automatically detected. If the source language was passed, auto-detection of the language does not occur and this field is empty.", +"type": "string" +}, +"mimeType": { +"description": "The translated document's mime type.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Example": { +"description": "A sentence pair.", +"id": "Example", +"properties": { +"name": { +"description": "Output only. The resource name of the example, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}/examples/{example_id}'", +"readOnly": true, +"type": "string" +}, +"sourceText": { +"description": "Sentence in source language.", +"type": "string" +}, +"targetText": { +"description": "Sentence in target language.", +"type": "string" +}, +"usage": { +"description": "Output only. Usage of the sentence pair. Options are TRAIN|VALIDATION|TEST.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExportDataRequest": { +"description": "Request message for ExportData.", +"id": "ExportDataRequest", +"properties": { +"outputConfig": { +"$ref": "DatasetOutputConfig", +"description": "Required. The config for the output content." +} +}, +"type": "object" +}, +"FileInputSource": { +"description": "An inlined file.", +"id": "FileInputSource", +"properties": { +"content": { +"description": "Required. The file's byte contents.", +"format": "byte", +"type": "string" +}, +"displayName": { +"description": "Required. The file's display name.", +"type": "string" +}, +"mimeType": { +"description": "Required. The file's mime type.", +"type": "string" +} +}, +"type": "object" +}, +"GcsDestination": { +"description": "The Google Cloud Storage location for the output content.", +"id": "GcsDestination", +"properties": { +"outputUriPrefix": { +"description": "Required. The bucket used in 'output_uri_prefix' must exist and there must be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with \"/\" and start with \"gs://\". One 'output_uri_prefix' can only be used by one batch translation job at a time. Otherwise an INVALID_ARGUMENT (400) error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GcsInputSource": { +"description": "The Google Cloud Storage location for the input content.", +"id": "GcsInputSource", +"properties": { +"inputUri": { +"description": "Required. Source data URI. For example, `gs://my_bucket/my_object`.", +"type": "string" +} +}, +"type": "object" +}, +"GcsOutputDestination": { +"description": "The Google Cloud Storage location for the output content.", +"id": "GcsOutputDestination", +"properties": { +"outputUriPrefix": { +"description": "Required. Google Cloud Storage URI to output directory. For example, `gs://bucket/directory`. The requesting user must have write permission to the bucket. The directory will be created if it doesn't exist.", +"type": "string" +} +}, +"type": "object" +}, +"GcsSource": { +"description": "The Google Cloud Storage location for the input content.", +"id": "GcsSource", +"properties": { +"inputUri": { +"description": "Required. Source data URI. For example, `gs://my_bucket/my_object`.", +"type": "string" +} +}, +"type": "object" +}, +"Glossary": { +"description": "Represents a glossary built from user-provided data.", +"id": "Glossary", +"properties": { +"displayName": { +"description": "Optional. The display name of the glossary.", +"type": "string" +}, +"endTime": { +"description": "Output only. When the glossary creation was finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"entryCount": { +"description": "Output only. The number of entries defined in the glossary.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"inputConfig": { +"$ref": "GlossaryInputConfig", +"description": "Required. Provides examples to build the glossary from. Total glossary must not exceed 10M Unicode codepoints." +}, +"languageCodesSet": { +"$ref": "LanguageCodesSet", +"description": "Used with equivalent term set glossaries." +}, +"languagePair": { +"$ref": "LanguageCodePair", +"description": "Used with unidirectional glossaries." +}, +"name": { +"description": "Required. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.", +"type": "string" +}, +"submitTime": { +"description": "Output only. When CreateGlossary was called.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GlossaryEntry": { +"description": "Represents a single entry in a glossary.", +"id": "GlossaryEntry", +"properties": { +"description": { +"description": "Describes the glossary entry.", +"type": "string" +}, +"name": { +"description": "Required. The resource name of the entry. Format: \"projects/*/locations/*/glossaries/*/glossaryEntries/*\"", +"type": "string" +}, +"termsPair": { +"$ref": "GlossaryTermsPair", +"description": "Used for an unidirectional glossary." +}, +"termsSet": { +"$ref": "GlossaryTermsSet", +"description": "Used for an equivalent term sets glossary." +} +}, +"type": "object" +}, +"GlossaryInputConfig": { +"description": "Input configuration for glossaries.", +"id": "GlossaryInputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Required. Google Cloud Storage location of glossary data. File format is determined based on the filename extension. API returns [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file formats. Wildcards are not allowed. This must be a single file in one of the following formats: For unidirectional glossaries: - TSV/CSV (`.tsv`/`.csv`): Two column file, tab- or comma-separated. The first column is source text. The second column is target text. No headers in this file. The first row contains data and not column names. - TMX (`.tmx`): TMX file with parallel data defining source/target term pairs. For equivalent term sets glossaries: - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms in multiple languages. See documentation for more information - [glossaries](https://cloud.google.com/translate/docs/advanced/glossary)." +} +}, +"type": "object" +}, +"GlossaryTerm": { +"description": "Represents a single glossary term", +"id": "GlossaryTerm", +"properties": { +"languageCode": { +"description": "The language for this glossary term.", +"type": "string" +}, +"text": { +"description": "The text for the glossary term.", +"type": "string" +} +}, +"type": "object" +}, +"GlossaryTermsPair": { +"description": "Represents a single entry for an unidirectional glossary.", +"id": "GlossaryTermsPair", +"properties": { +"sourceTerm": { +"$ref": "GlossaryTerm", +"description": "The source term is the term that will get match in the text," +}, +"targetTerm": { +"$ref": "GlossaryTerm", +"description": "The term that will replace the match source term." +} +}, +"type": "object" +}, +"GlossaryTermsSet": { +"description": "Represents a single entry for an equivalent term set glossary. This is used for equivalent term sets where each term can be replaced by the other terms in the set.", +"id": "GlossaryTermsSet", +"properties": { +"terms": { +"description": "Each term in the set represents a term that can be replaced by the other terms.", +"items": { +"$ref": "GlossaryTerm" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImportAdaptiveMtFileRequest": { +"description": "The request for importing an AdaptiveMt file along with its sentences.", +"id": "ImportAdaptiveMtFileRequest", +"properties": { +"fileInputSource": { +"$ref": "FileInputSource", +"description": "Inline file source." +}, +"gcsInputSource": { +"$ref": "GcsInputSource", +"description": "Google Cloud Storage file source." +} +}, +"type": "object" +}, +"ImportAdaptiveMtFileResponse": { +"description": "The response for importing an AdaptiveMtFile", +"id": "ImportAdaptiveMtFileResponse", +"properties": { +"adaptiveMtFile": { +"$ref": "AdaptiveMtFile", +"description": "Output only. The Adaptive MT file that was imported.", +"readOnly": true +} +}, +"type": "object" +}, +"ImportDataRequest": { +"description": "Request message for ImportData.", +"id": "ImportDataRequest", +"properties": { +"inputConfig": { +"$ref": "DatasetInputConfig", +"description": "Required. The config for the input content." +} +}, +"type": "object" +}, +"InputConfig": { +"description": "Input configuration for BatchTranslateText request.", +"id": "InputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Required. Google Cloud Storage location for the source input. This can be a single file (for example, `gs://translation-test/input.tsv`) or a wildcard (for example, `gs://translation-test/*`). If a file extension is `.tsv`, it can contain either one or two columns. The first column (optional) is the id of the text request. If the first column is missing, we use the row number (0-based) from the input file as the ID in the output file. The second column is the actual text to be translated. We recommend each row be <= 10K Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant. You could use https://github.com/Clever/csvlint to check potential formatting errors in your tsv file. csvlint --delimiter='\\t' your_input_file.tsv The other supported file extensions are `.txt` or `.html`, which is treated as a single large chunk of text." +}, +"mimeType": { +"description": "Optional. Can be \"text/plain\" or \"text/html\". For `.tsv`, \"text/html\" is used if mime_type is missing. For `.html`, this field must be \"text/html\" or empty. For `.txt`, this field must be \"text/plain\" or empty.", +"type": "string" +} +}, +"type": "object" +}, +"InputFile": { +"description": "An input file.", +"id": "InputFile", +"properties": { +"gcsSource": { +"$ref": "GcsInputSource", +"description": "Google Cloud Storage file source." +}, +"usage": { +"description": "Optional. Usage of the file contents. Options are TRAIN|VALIDATION|TEST, or UNASSIGNED (by default) for auto split.", +"type": "string" +} +}, +"type": "object" +}, +"LanguageCodePair": { +"description": "Used with unidirectional glossaries.", +"id": "LanguageCodePair", +"properties": { +"sourceLanguageCode": { +"description": "Required. The ISO-639 language code of the input text, for example, \"en-US\". Expected to be an exact match for GlossaryTerm.language_code.", +"type": "string" +}, +"targetLanguageCode": { +"description": "Required. The ISO-639 language code for translation output, for example, \"zh-CN\". Expected to be an exact match for GlossaryTerm.language_code.", +"type": "string" +} +}, +"type": "object" +}, +"LanguageCodesSet": { +"description": "Used with equivalent term set glossaries.", +"id": "LanguageCodesSet", +"properties": { +"languageCodes": { +"description": "The ISO-639 language code(s) for terms defined in the glossary. All entries are unique. The list contains at least two entries. Expected to be an exact match for GlossaryTerm.language_code.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListAdaptiveMtDatasetsResponse": { +"description": "A list of AdaptiveMtDatasets.", +"id": "ListAdaptiveMtDatasetsResponse", +"properties": { +"adaptiveMtDatasets": { +"description": "Output only. A list of Adaptive MT datasets.", +"items": { +"$ref": "AdaptiveMtDataset" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Optional. A token to retrieve a page of results. Pass this value in the [ListAdaptiveMtDatasetsRequest.page_token] field in the subsequent call to `ListAdaptiveMtDatasets` method to retrieve the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListAdaptiveMtFilesResponse": { +"description": "The response for listing all AdaptiveMt files under a given dataset.", +"id": "ListAdaptiveMtFilesResponse", +"properties": { +"adaptiveMtFiles": { +"description": "Output only. The Adaptive MT files.", +"items": { +"$ref": "AdaptiveMtFile" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Optional. A token to retrieve a page of results. Pass this value in the ListAdaptiveMtFilesRequest.page_token field in the subsequent call to `ListAdaptiveMtFiles` method to retrieve the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListAdaptiveMtSentencesResponse": { +"description": "List AdaptiveMt sentences response.", +"id": "ListAdaptiveMtSentencesResponse", +"properties": { +"adaptiveMtSentences": { +"description": "Output only. The list of AdaptiveMtSentences.", +"items": { +"$ref": "AdaptiveMtSentence" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Optional. ", +"type": "string" +} +}, +"type": "object" +}, +"ListDatasetsResponse": { +"description": "Response message for ListDatasets.", +"id": "ListDatasetsResponse", +"properties": { +"datasets": { +"description": "The datasets read.", +"items": { +"$ref": "Dataset" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this token to the page_token field in the ListDatasetsRequest to obtain the corresponding page.", +"type": "string" +} +}, +"type": "object" +}, +"ListExamplesResponse": { +"description": "Response message for ListExamples.", +"id": "ListExamplesResponse", +"properties": { +"examples": { +"description": "The sentence pairs.", +"items": { +"$ref": "Example" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this token to the page_token field in the ListExamplesRequest to obtain the corresponding page.", +"type": "string" +} +}, +"type": "object" +}, +"ListGlossariesResponse": { +"description": "Response message for ListGlossaries.", +"id": "ListGlossariesResponse", +"properties": { +"glossaries": { +"description": "The list of glossaries for a project.", +"items": { +"$ref": "Glossary" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve a page of results. Pass this value in the [ListGlossariesRequest.page_token] field in the subsequent call to `ListGlossaries` method to retrieve the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListGlossaryEntriesResponse": { +"description": "Response message for ListGlossaryEntries", +"id": "ListGlossaryEntriesResponse", +"properties": { +"glossaryEntries": { +"description": "Optional. The Glossary Entries", +"items": { +"$ref": "GlossaryEntry" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Optional. A token to retrieve a page of results. Pass this value in the [ListGLossaryEntriesRequest.page_token] field in the subsequent calls.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListModelsResponse": { +"description": "Response message for ListModels.", +"id": "ListModelsResponse", +"properties": { +"models": { +"description": "The models read.", +"items": { +"$ref": "Model" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this token to the page_token field in the ListModelsRequest to obtain the corresponding page.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Model": { +"description": "A trained translation model.", +"id": "Model", +"properties": { +"createTime": { +"description": "Output only. Timestamp when the model resource was created, which is also when the training started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"dataset": { +"description": "The dataset from which the model is trained, in form of `projects/{project-number-or-id}/locations/{location_id}/datasets/{dataset_id}`", +"type": "string" +}, +"displayName": { +"description": "The name of the model to show in the interface. The name can be up to 32 characters long and can consist only of ASCII Latin letters A-Z and a-z, underscores (_), and ASCII digits 0-9.", +"type": "string" +}, +"name": { +"description": "The resource name of the model, in form of `projects/{project-number-or-id}/locations/{location_id}/models/{model_id}`", +"type": "string" +}, +"sourceLanguageCode": { +"description": "Output only. The BCP-47 language code of the source language.", +"readOnly": true, +"type": "string" +}, +"targetLanguageCode": { +"description": "Output only. The BCP-47 language code of the target language.", +"readOnly": true, +"type": "string" +}, +"testExampleCount": { +"description": "Output only. Number of examples (sentence pairs) used to test the model.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"trainExampleCount": { +"description": "Output only. Number of examples (sentence pairs) used to train the model.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"updateTime": { +"description": "Output only. Timestamp when this model was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"validateExampleCount": { +"description": "Output only. Number of examples (sentence pairs) used to validate the model.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OutputConfig": { +"description": "Output configuration for BatchTranslateText request.", +"id": "OutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are '\\n' instead of '\\r\\n'. We don't provide any way to change record delimiters. While the input files are being processed, we write/update an index file 'index.csv' under 'output_uri_prefix' (for example, gs://translation-test/index.csv) The index file is generated/updated as new files are being translated. The format is: input_file,target_language_code,translations_file,errors_file, glossary_translations_file,glossary_errors_file input_file is one file we matched using gcs_source.input_uri. target_language_code is provided in the request. translations_file contains the translations. (details provided below) errors_file contains the errors during processing of the file. (details below). Both translations_file and errors_file could be empty strings if we have no content to output. glossary_translations_file and glossary_errors_file are always empty strings if the input_file is tsv. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The format of translations_file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input file extension is tsv, the output has the following columns: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: translation without applying a glossary. Empty string if there is an error. Column 4 (only present if a glossary is provided in the request): translation after applying the glossary. Empty string if there is an error applying the glossary. Could be same string as column 3 if there is no glossary applied. If input file extension is a txt or html, the translation is directly written to the output file. If glossary is requested, a separate glossary_translations_file has format of `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` The format of errors file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_errors.[extension]` If the input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or html, glossary_error_file will be generated that contains error details. glossary_error_file has format of `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`" +} +}, +"type": "object" +}, +"Romanization": { +"description": "A single romanization response.", +"id": "Romanization", +"properties": { +"detectedLanguageCode": { +"description": "The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.", +"type": "string" +}, +"romanizedText": { +"description": "Romanized text. If an error occurs during romanization, this field might be excluded from the response.", +"type": "string" +} +}, +"type": "object" +}, +"RomanizeTextRequest": { +"description": "The request message for synchronous romanization.", +"id": "RomanizeTextRequest", +"properties": { +"contents": { +"description": "Required. The content of the input in string format.", +"items": { +"type": "string" +}, +"type": "array" +}, +"sourceLanguageCode": { +"description": "Optional. The ISO-639 language code of the input text if known, for example, \"hi\" or \"zh\". If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language for each content in the response.", +"type": "string" +} +}, +"type": "object" +}, +"RomanizeTextResponse": { +"description": "The response message for synchronous romanization.", +"id": "RomanizeTextResponse", +"properties": { +"romanizations": { +"description": "Text romanization responses. This field has the same length as `contents`.", +"items": { +"$ref": "Romanization" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SupportedLanguage": { +"description": "A single supported language response corresponds to information related to one supported language.", +"id": "SupportedLanguage", +"properties": { +"displayName": { +"description": "Human-readable name of the language localized in the display language specified in the request.", +"type": "string" +}, +"languageCode": { +"description": "Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'. In certain cases, ISO-639 codes including language and region identifiers are returned (for example, 'zh-TW' and 'zh-CN').", +"type": "string" +}, +"supportSource": { +"description": "Can be used as a source language.", +"type": "boolean" +}, +"supportTarget": { +"description": "Can be used as a target language.", +"type": "boolean" +} +}, +"type": "object" +}, +"SupportedLanguages": { +"description": "The response message for discovering supported languages.", +"id": "SupportedLanguages", +"properties": { +"languages": { +"description": "A list of supported language responses. This list contains an entry for each language the Translation API supports.", +"items": { +"$ref": "SupportedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"TranslateDocumentRequest": { +"description": "A document translation request.", +"id": "TranslateDocumentRequest", +"properties": { +"customizedAttribution": { +"description": "Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos", +"type": "string" +}, +"documentInputConfig": { +"$ref": "DocumentInputConfig", +"description": "Required. Input configurations." +}, +"documentOutputConfig": { +"$ref": "DocumentOutputConfig", +"description": "Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type." +}, +"enableRotationCorrection": { +"description": "Optional. If true, enable auto rotation correction in DVS.", +"type": "boolean" +}, +"enableShadowRemovalNativePdf": { +"description": "Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when is_translate_native_pdf_only: false && pdf_native_only: false", +"type": "boolean" +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned." +}, +"isTranslateNativePdfOnly": { +"description": "Optional. is_translate_native_pdf_only field for external customers. If true, the page limit of online native pdf translation is 300 and only native pdf pages will be translated.", +"type": "boolean" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.", +"type": "object" +}, +"model": { +"description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If not provided, the default Google model (NMT) will be used for translation.", +"type": "string" +}, +"sourceLanguageCode": { +"description": "Optional. The ISO-639 language code of the input document if known, for example, \"en-US\" or \"sr-Latn\". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.", +"type": "string" +}, +"targetLanguageCode": { +"description": "Required. The ISO-639 language code to use for translation of the input document, set to one of the language codes listed in Language Support.", +"type": "string" +} +}, +"type": "object" +}, +"TranslateDocumentResponse": { +"description": "A translated document response message.", +"id": "TranslateDocumentResponse", +"properties": { +"documentTranslation": { +"$ref": "DocumentTranslation", +"description": "Translated document." +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "The `glossary_config` used for this translation." +}, +"glossaryDocumentTranslation": { +"$ref": "DocumentTranslation", +"description": "The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply." +}, +"model": { +"description": "Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.", +"type": "string" +} +}, +"type": "object" +}, +"TranslateTextGlossaryConfig": { +"description": "Configures which glossary is used for a specific target language and defines options for applying that glossary.", +"id": "TranslateTextGlossaryConfig", +"properties": { +"glossary": { +"description": "Required. The `glossary` to be applied for this translation. The format depends on the glossary: - User-provided custom glossary: `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`", +"type": "string" +}, +"ignoreCase": { +"description": "Optional. Indicates match is case insensitive. The default value is `false` if missing.", +"type": "boolean" +} +}, +"type": "object" +}, +"TranslateTextRequest": { +"description": "The request message for synchronous translation.", +"id": "TranslateTextRequest", +"properties": { +"contents": { +"description": "Required. The content of the input in string format. We recommend the total content be less than 30,000 codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.", +"items": { +"type": "string" +}, +"type": "array" +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.", +"type": "object" +}, +"mimeType": { +"description": "Optional. The format of the source text, for example, \"text/html\", \"text/plain\". If left blank, the MIME type defaults to \"text/html\".", +"type": "string" +}, +"model": { +"description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used", +"type": "string" +}, +"sourceLanguageCode": { +"description": "Optional. The ISO-639 language code of the input text if known, for example, \"en-US\" or \"sr-Latn\". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.", +"type": "string" +}, +"targetLanguageCode": { +"description": "Required. The ISO-639 language code to use for translation of the input text, set to one of the language codes listed in Language Support.", +"type": "string" +}, +"transliterationConfig": { +"$ref": "TransliterationConfig", +"description": "Optional. Transliteration to be applied." +} +}, +"type": "object" +}, +"TranslateTextResponse": { +"id": "TranslateTextResponse", +"properties": { +"glossaryTranslations": { +"description": "Text translation responses if a glossary is provided in the request. This can be the same as `translations` if no terms apply. This field has the same length as `contents`.", +"items": { +"$ref": "Translation" +}, +"type": "array" +}, +"translations": { +"description": "Text translation responses with no glossary applied. This field has the same length as `contents`.", +"items": { +"$ref": "Translation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Translation": { +"description": "A single translation response.", +"id": "Translation", +"properties": { +"detectedLanguageCode": { +"description": "The ISO-639 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.", +"type": "string" +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "The `glossary_config` used for this translation." +}, +"model": { +"description": "Only present when `model` is present in the request. `model` here is normalized to have project number. For example: If the `model` requested in TranslationTextRequest is `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.", +"type": "string" +}, +"translatedText": { +"description": "Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.", +"type": "string" +} +}, +"type": "object" +}, +"TransliterationConfig": { +"description": "Configures transliteration feature on top of translation.", +"id": "TransliterationConfig", +"properties": { +"enableTransliteration": { +"description": "If true, source text in romanized form can be translated to the target language.", +"type": "boolean" +} +}, +"type": "object" +}, +"WaitOperationRequest": { +"description": "The request message for Operations.WaitOperation.", +"id": "WaitOperationRequest", +"properties": { +"timeout": { +"description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Translation API", +"version": "v3", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v3beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v3beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..98145fc3d4c38a9d4329839acb2e869d77d1b583 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/translate.v3beta1.json @@ -0,0 +1,1519 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-translation": { +"description": "Translate text from one language to another using Google Translate" +} +} +} +}, +"basePath": "", +"baseUrl": "https://translation.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Translate", +"description": "Integrates text translation into your website or application.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/translate/docs/quickstarts", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "translate:v3beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://translation.mtls.googleapis.com/", +"name": "translate", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"methods": { +"detectLanguage": { +"description": "Detects the language of text within a request.", +"flatPath": "v3beta1/projects/{projectsId}:detectLanguage", +"httpMethod": "POST", +"id": "translate.projects.detectLanguage", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}` or `projects/{project-number-or-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}:detectLanguage", +"request": { +"$ref": "DetectLanguageRequest" +}, +"response": { +"$ref": "DetectLanguageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"getSupportedLanguages": { +"description": "Returns a list of supported languages for translation.", +"flatPath": "v3beta1/projects/{projectsId}/supportedLanguages", +"httpMethod": "GET", +"id": "translate.projects.getSupportedLanguages", +"parameterOrder": [ +"parent" +], +"parameters": { +"displayLanguageCode": { +"description": "Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.", +"location": "query", +"type": "string" +}, +"model": { +"description": "Optional. Get supported languages of this model. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, Returns languages supported by the specified model. If missing, we get supported languages of Google general NMT model.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}/supportedLanguages", +"response": { +"$ref": "SupportedLanguages" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"translateText": { +"description": "Translates input text and returns translated text.", +"flatPath": "v3beta1/projects/{projectsId}:translateText", +"httpMethod": "POST", +"id": "translate.projects.translateText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}:translateText", +"request": { +"$ref": "TranslateTextRequest" +}, +"response": { +"$ref": "TranslateTextResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +}, +"resources": { +"locations": { +"methods": { +"batchTranslateDocument": { +"description": "Translates a large volume of document in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}:batchTranslateDocument", +"httpMethod": "POST", +"id": "translate.projects.locations.batchTranslateDocument", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}:batchTranslateDocument", +"request": { +"$ref": "BatchTranslateDocumentRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"batchTranslateText": { +"description": "Translates a large volume of text in asynchronous batch mode. This function provides real-time output as the inputs are being processed. If caller cancels a request, the partial results (for an input file, it's all or nothing) may still be available on the specified output location. This call returns immediately and you can use google.longrunning.Operation.name to poll the status of the call.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}:batchTranslateText", +"httpMethod": "POST", +"id": "translate.projects.locations.batchTranslateText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}`. The `global` location is not supported for batch translation. Only AutoML Translation models or glossaries within the same region (have the same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}:batchTranslateText", +"request": { +"$ref": "BatchTranslateTextRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"detectLanguage": { +"description": "Detects the language of text within a request.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}:detectLanguage", +"httpMethod": "POST", +"id": "translate.projects.locations.detectLanguage", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}/locations/{location-id}` or `projects/{project-number-or-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Only models within the same region (has same location-id) can be used. Otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}:detectLanguage", +"request": { +"$ref": "DetectLanguageRequest" +}, +"response": { +"$ref": "DetectLanguageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets information about a location.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "translate.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"getSupportedLanguages": { +"description": "Returns a list of supported languages for translation.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/supportedLanguages", +"httpMethod": "GET", +"id": "translate.projects.locations.getSupportedLanguages", +"parameterOrder": [ +"parent" +], +"parameters": { +"displayLanguageCode": { +"description": "Optional. The language to use to return localized, human readable names of supported languages. If missing, then display names are not returned in a response.", +"location": "query", +"type": "string" +}, +"model": { +"description": "Optional. Get supported languages of this model. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, Returns languages supported by the specified model. If missing, we get supported languages of Google general NMT model.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for AutoML models. Only models within the same region (have same location-id) can be used, otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}/supportedLanguages", +"response": { +"$ref": "SupportedLanguages" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v3beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "translate.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v3beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"translateDocument": { +"description": "Translates documents in synchronous mode.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}:translateDocument", +"httpMethod": "POST", +"id": "translate.projects.locations.translateDocument", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Location to make a regional call. Format: `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have the same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}:translateDocument", +"request": { +"$ref": "TranslateDocumentRequest" +}, +"response": { +"$ref": "TranslateDocumentResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"translateText": { +"description": "Translates input text and returns translated text.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}:translateText", +"httpMethod": "POST", +"id": "translate.projects.locations.translateText", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project or location to make a call. Must refer to a caller's project. Format: `projects/{project-number-or-id}` or `projects/{project-number-or-id}/locations/{location-id}`. For global calls, use `projects/{project-number-or-id}/locations/global` or `projects/{project-number-or-id}`. Non-global location is required for requests using AutoML models or custom glossaries. Models and glossaries must be within the same region (have same location-id), otherwise an INVALID_ARGUMENT (400) error is returned.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}:translateText", +"request": { +"$ref": "TranslateTextRequest" +}, +"response": { +"$ref": "TranslateTextResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +}, +"resources": { +"glossaries": { +"methods": { +"create": { +"description": "Creates a glossary and returns the long-running operation. Returns NOT_FOUND, if the project doesn't exist.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/glossaries", +"httpMethod": "POST", +"id": "translate.projects.locations.glossaries.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}/glossaries", +"request": { +"$ref": "Glossary" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a glossary, or cancels glossary construction if the glossary isn't created yet. Returns NOT_FOUND, if the glossary doesn't exist.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.glossaries.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the glossary to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets a glossary. Returns NOT_FOUND, if the glossary doesn't exist.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/glossaries/{glossariesId}", +"httpMethod": "GET", +"id": "translate.projects.locations.glossaries.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the glossary to retrieve.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/glossaries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+name}", +"response": { +"$ref": "Glossary" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists glossaries in a project. Returns NOT_FOUND, if the project doesn't exist.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/glossaries", +"httpMethod": "GET", +"id": "translate.projects.locations.glossaries.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter specifying constraints of a list operation. Specify the constraint by the format of \"key=value\", where key must be \"src\" or \"tgt\", and the value must be a valid language code. For multiple restrictions, concatenate them by \"AND\" (uppercase only), such as: \"src=en-US AND tgt=zh-CN\". Notice that the exact match is used here, which means using 'en-US' and 'en' can lead to different results, which depends on the language code you used when you create the glossary. For the unidirectional glossaries, the \"src\" and \"tgt\" add restrictions on the source and target language code separately. For the equivalent term set glossaries, the \"src\" and/or \"tgt\" add restrictions on the term set. For example: \"src=en-US AND tgt=zh-CN\" will only pick the unidirectional glossaries which exactly match the source language code as \"en-US\" and the target language code \"zh-CN\", but all equivalent term set glossaries which contain \"en-US\" and \"zh-CN\" in their language set will be picked. If missing, no filtering is performed.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Requested page size. The server may return fewer glossaries than requested. If unspecified, the server picks an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A token identifying a page of results the server should return. Typically, this is the value of [ListGlossariesResponse.next_page_token] returned from the previous call to `ListGlossaries` method. The first page is returned if `page_token`is empty or missing.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The name of the project from which to list all of the glossaries.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+parent}/glossaries", +"response": { +"$ref": "ListGlossariesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "translate.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "translate.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "translate.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "translate.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v3beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +}, +"wait": { +"description": "Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.", +"flatPath": "v3beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:wait", +"httpMethod": "POST", +"id": "translate.projects.locations.operations.wait", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to wait on.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v3beta1/{+name}:wait", +"request": { +"$ref": "WaitOperationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-translation" +] +} +} +} +} +} +} +} +}, +"revision": "20240301", +"rootUrl": "https://translation.googleapis.com/", +"schemas": { +"BatchDocumentInputConfig": { +"description": "Input configuration for BatchTranslateDocument request.", +"id": "BatchDocumentInputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Google Cloud Storage location for the source input. This can be a single file (for example, `gs://translation-test/input.docx`) or a wildcard (for example, `gs://translation-test/*`). File mime type is determined based on extension. Supported mime type includes: - `pdf`, application/pdf - `docx`, application/vnd.openxmlformats-officedocument.wordprocessingml.document - `pptx`, application/vnd.openxmlformats-officedocument.presentationml.presentation - `xlsx`, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet The max file size to support for `.docx`, `.pptx` and `.xlsx` is 100MB. The max file size to support for `.pdf` is 1GB and the max page limit is 1000 pages. The max file size to support for all input documents is 1GB." +} +}, +"type": "object" +}, +"BatchDocumentOutputConfig": { +"description": "Output configuration for BatchTranslateDocument request.", +"id": "BatchDocumentOutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Google Cloud Storage destination for output content. For every single input document (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateDocumentRequest). While the input documents are being processed, we write/update an index file `index.csv` under `gcs_destination.output_uri_prefix` (for example, gs://translation_output/index.csv) The index file is generated/updated as new files are being translated. The format is: input_document,target_language_code,translation_output,error_output, glossary_translation_output,glossary_error_output `input_document` is one file we matched using gcs_source.input_uri. `target_language_code` is provided in the request. `translation_output` contains the translations. (details provided below) `error_output` contains the error message during processing of the file. Both translations_file and errors_file could be empty strings if we have no content to output. `glossary_translation_output` and `glossary_error_output` are the translated output/error when we apply glossaries. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The naming format of translation output files follows (for target language code [trg]): `translation_output`: `gs://translation_output/a_b_c_[trg]_translation.[extension]` `glossary_translation_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.[extension]`. The output document will maintain the same file format as the input document. The naming format of error output files follows (for target language code [trg]): `error_output`: `gs://translation_test/a_b_c_[trg]_errors.txt` `glossary_error_output`: `gs://translation_test/a_b_c_[trg]_glossary_translation.txt` The error output is a txt file containing error details." +} +}, +"type": "object" +}, +"BatchTranslateDocumentRequest": { +"description": "The BatchTranslateDocument request.", +"id": "BatchTranslateDocumentRequest", +"properties": { +"customizedAttribution": { +"description": "Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos", +"type": "string" +}, +"enableRotationCorrection": { +"description": "Optional. If true, enable auto rotation correction in DVS.", +"type": "boolean" +}, +"enableShadowRemovalNativePdf": { +"description": "Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when is_translate_native_pdf_only: false && pdf_native_only: false", +"type": "boolean" +}, +"formatConversions": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. File format conversion map to be applied to all input files. Map's key is the original mime_type. Map's value is the target mime_type of translated documents. Supported file format conversion includes: - `application/pdf` to `application/vnd.openxmlformats-officedocument.wordprocessingml.document` If nothing specified, output files will be in the same format as the original file.", +"type": "object" +}, +"glossaries": { +"additionalProperties": { +"$ref": "TranslateTextGlossaryConfig" +}, +"description": "Optional. Glossaries to be applied. It's keyed by target language code.", +"type": "object" +}, +"inputConfigs": { +"description": "Required. Input configurations. The total number of files matched should be <= 100. The total content size to translate should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.", +"items": { +"$ref": "BatchDocumentInputConfig" +}, +"type": "array" +}, +"models": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The models to use for translation. Map's key is target language code. Map's value is the model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.", +"type": "object" +}, +"outputConfig": { +"$ref": "BatchDocumentOutputConfig", +"description": "Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs." +}, +"sourceLanguageCode": { +"description": "Required. The BCP-47 language code of the input document if known, for example, \"en-US\" or \"sr-Latn\". Supported language codes are listed in [Language Support](https://cloud.google.com/translate/docs/languages).", +"type": "string" +}, +"targetLanguageCodes": { +"description": "Required. The BCP-47 language code to use for translation of the input document. Specify up to 10 language codes here.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchTranslateTextRequest": { +"description": "The batch translation request.", +"id": "BatchTranslateTextRequest", +"properties": { +"glossaries": { +"additionalProperties": { +"$ref": "TranslateTextGlossaryConfig" +}, +"description": "Optional. Glossaries to be applied for translation. It's keyed by target language code.", +"type": "object" +}, +"inputConfigs": { +"description": "Required. Input configurations. The total number of files matched should be <= 100. The total content size should be <= 100M Unicode codepoints. The files must use UTF-8 encoding.", +"items": { +"$ref": "InputConfig" +}, +"type": "array" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.", +"type": "object" +}, +"models": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The models to use for translation. Map's key is target language code. Map's value is model name. Value can be a built-in general model, or an AutoML Translation model. The value format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If the map is empty or a specific model is not requested for a language pair, then default google model (nmt) is used.", +"type": "object" +}, +"outputConfig": { +"$ref": "OutputConfig", +"description": "Required. Output configuration. If 2 input configs match to the same file (that is, same input path), we don't generate output for duplicate inputs." +}, +"sourceLanguageCode": { +"description": "Required. Source language code.", +"type": "string" +}, +"targetLanguageCodes": { +"description": "Required. Specify up to 10 language codes here.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"DetectLanguageRequest": { +"description": "The request message for language detection.", +"id": "DetectLanguageRequest", +"properties": { +"content": { +"description": "The content of the input stored as a string.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.", +"type": "object" +}, +"mimeType": { +"description": "Optional. The format of the source text, for example, \"text/html\", \"text/plain\". If left blank, the MIME type defaults to \"text/html\".", +"type": "string" +}, +"model": { +"description": "Optional. The language detection model to be used. Format: `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/{model-id}` Only one language detection model is currently supported: `projects/{project-number-or-id}/locations/{location-id}/models/language-detection/default`. If not specified, the default model is used.", +"type": "string" +} +}, +"type": "object" +}, +"DetectLanguageResponse": { +"description": "The response message for language detection.", +"id": "DetectLanguageResponse", +"properties": { +"languages": { +"description": "A list of detected languages sorted by detection confidence in descending order. The most probable language first.", +"items": { +"$ref": "DetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"DetectedLanguage": { +"description": "The response message for language detection.", +"id": "DetectedLanguage", +"properties": { +"confidence": { +"description": "The confidence of the detection result for this language.", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code of source content in the request, detected automatically.", +"type": "string" +} +}, +"type": "object" +}, +"DocumentInputConfig": { +"description": "A document translation request input config.", +"id": "DocumentInputConfig", +"properties": { +"content": { +"description": "Document's content represented as a stream of bytes.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GcsSource", +"description": "Google Cloud Storage location. This must be a single file. For example: gs://example_bucket/example_file.pdf" +}, +"mimeType": { +"description": "Specifies the input document's mime_type. If not specified it will be determined using the file extension for gcs_source provided files. For a file provided through bytes content the mime_type must be provided. Currently supported mime types are: - application/pdf - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", +"type": "string" +} +}, +"type": "object" +}, +"DocumentOutputConfig": { +"description": "A document translation request output config.", +"id": "DocumentOutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Optional. Google Cloud Storage destination for the translation output, e.g., `gs://my_bucket/my_directory/`. The destination directory provided does not have to be empty, but the bucket must exist. If a file with the same name as the output file already exists in the destination an error will be returned. For a DocumentInputConfig.contents provided document, the output file will have the name \"output_[trg]_translations.[ext]\", where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. For a DocumentInputConfig.gcs_uri provided document, the output file will have a name according to its URI. For example: an input file with URI: `gs://a/b/c.[extension]` stored in a gcs_destination bucket with name \"my_bucket\" will have an output URI: `gs://my_bucket/a_b_c_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If the document was directly provided through the request, then the output document will have the format: `gs://my_bucket/translated_document_[trg]_translations.[ext]`, where - [trg] corresponds to the translated file's language code, - [ext] corresponds to the translated file's extension according to its mime type. If a glossary was provided, then the output URI for the glossary translation will be equal to the default output URI but have `glossary_translations` instead of `translations`. For the previous example, its glossary URI would be: `gs://my_bucket/a_b_c_[trg]_glossary_translations.[ext]`. Thus the max number of output files will be 2 (Translated document, Glossary translated document). Callers should expect no partial outputs. If there is any error during document translation, no output will be stored in the Cloud Storage bucket." +}, +"mimeType": { +"description": "Optional. Specifies the translated document's mime_type. If not specified, the translated file's mime type will be the same as the input file's mime type. Currently only support the output mime type to be the same as input mime type. - application/pdf - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/vnd.openxmlformats-officedocument.presentationml.presentation - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", +"type": "string" +} +}, +"type": "object" +}, +"DocumentTranslation": { +"description": "A translated document message.", +"id": "DocumentTranslation", +"properties": { +"byteStreamOutputs": { +"description": "The array of translated documents. It is expected to be size 1 for now. We may produce multiple translated documents in the future for other type of file formats.", +"items": { +"format": "byte", +"type": "string" +}, +"type": "array" +}, +"detectedLanguageCode": { +"description": "The detected language for the input document. If the user did not provide the source language for the input document, this field will have the language code automatically detected. If the source language was passed, auto-detection of the language does not occur and this field is empty.", +"type": "string" +}, +"mimeType": { +"description": "The translated document's mime type.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"GcsDestination": { +"description": "The Google Cloud Storage location for the output content.", +"id": "GcsDestination", +"properties": { +"outputUriPrefix": { +"description": "Required. There must be no files under 'output_uri_prefix'. 'output_uri_prefix' must end with \"/\" and start with \"gs://\", otherwise an INVALID_ARGUMENT (400) error is returned.", +"type": "string" +} +}, +"type": "object" +}, +"GcsSource": { +"description": "The Google Cloud Storage location for the input content.", +"id": "GcsSource", +"properties": { +"inputUri": { +"description": "Required. Source data URI. For example, `gs://my_bucket/my_object`.", +"type": "string" +} +}, +"type": "object" +}, +"Glossary": { +"description": "Represents a glossary built from user provided data.", +"id": "Glossary", +"properties": { +"endTime": { +"description": "Output only. When the glossary creation was finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"entryCount": { +"description": "Output only. The number of entries defined in the glossary.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"inputConfig": { +"$ref": "GlossaryInputConfig", +"description": "Required. Provides examples to build the glossary from. Total glossary must not exceed 10M Unicode codepoints." +}, +"languageCodesSet": { +"$ref": "LanguageCodesSet", +"description": "Used with equivalent term set glossaries." +}, +"languagePair": { +"$ref": "LanguageCodePair", +"description": "Used with unidirectional glossaries." +}, +"name": { +"description": "Required. The resource name of the glossary. Glossary names have the form `projects/{project-number-or-id}/locations/{location-id}/glossaries/{glossary-id}`.", +"type": "string" +}, +"submitTime": { +"description": "Output only. When CreateGlossary was called.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GlossaryInputConfig": { +"description": "Input configuration for glossaries.", +"id": "GlossaryInputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Required. Google Cloud Storage location of glossary data. File format is determined based on the filename extension. API returns [google.rpc.Code.INVALID_ARGUMENT] for unsupported URI-s and file formats. Wildcards are not allowed. This must be a single file in one of the following formats: For unidirectional glossaries: - TSV/CSV (`.tsv`/`.csv`): 2 column file, tab- or comma-separated. The first column is source text. The second column is target text. The file must not contain headers. That is, the first row is data, not column names. - TMX (`.tmx`): TMX file with parallel data defining source/target term pairs. For equivalent term sets glossaries: - CSV (`.csv`): Multi-column CSV file defining equivalent glossary terms in multiple languages. See documentation for more information - [glossaries](https://cloud.google.com/translate/docs/advanced/glossary)." +} +}, +"type": "object" +}, +"InputConfig": { +"description": "Input configuration for BatchTranslateText request.", +"id": "InputConfig", +"properties": { +"gcsSource": { +"$ref": "GcsSource", +"description": "Required. Google Cloud Storage location for the source input. This can be a single file (for example, `gs://translation-test/input.tsv`) or a wildcard (for example, `gs://translation-test/*`). If a file extension is `.tsv`, it can contain either one or two columns. The first column (optional) is the id of the text request. If the first column is missing, we use the row number (0-based) from the input file as the ID in the output file. The second column is the actual text to be translated. We recommend each row be <= 10K Unicode codepoints, otherwise an error might be returned. Note that the input tsv must be RFC 4180 compliant. You could use https://github.com/Clever/csvlint to check potential formatting errors in your tsv file. csvlint --delimiter='\\t' your_input_file.tsv The other supported file extensions are `.txt` or `.html`, which is treated as a single large chunk of text." +}, +"mimeType": { +"description": "Optional. Can be \"text/plain\" or \"text/html\". For `.tsv`, \"text/html\" is used if mime_type is missing. For `.html`, this field must be \"text/html\" or empty. For `.txt`, this field must be \"text/plain\" or empty.", +"type": "string" +} +}, +"type": "object" +}, +"LanguageCodePair": { +"description": "Used with unidirectional glossaries.", +"id": "LanguageCodePair", +"properties": { +"sourceLanguageCode": { +"description": "Required. The BCP-47 language code of the input text, for example, \"en-US\". Expected to be an exact match for GlossaryTerm.language_code.", +"type": "string" +}, +"targetLanguageCode": { +"description": "Required. The BCP-47 language code for translation output, for example, \"zh-CN\". Expected to be an exact match for GlossaryTerm.language_code.", +"type": "string" +} +}, +"type": "object" +}, +"LanguageCodesSet": { +"description": "Used with equivalent term set glossaries.", +"id": "LanguageCodesSet", +"properties": { +"languageCodes": { +"description": "The BCP-47 language code(s) for terms defined in the glossary. All entries are unique. The list contains at least two entries. Expected to be an exact match for GlossaryTerm.language_code.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListGlossariesResponse": { +"description": "Response message for ListGlossaries.", +"id": "ListGlossariesResponse", +"properties": { +"glossaries": { +"description": "The list of glossaries for a project.", +"items": { +"$ref": "Glossary" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token to retrieve a page of results. Pass this value in the [ListGlossariesRequest.page_token] field in the subsequent call to `ListGlossaries` method to retrieve the next page of results.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OutputConfig": { +"description": "Output configuration for BatchTranslateText request.", +"id": "OutputConfig", +"properties": { +"gcsDestination": { +"$ref": "GcsDestination", +"description": "Google Cloud Storage destination for output content. For every single input file (for example, gs://a/b/c.[extension]), we generate at most 2 * n output files. (n is the # of target_language_codes in the BatchTranslateTextRequest). Output files (tsv) generated are compliant with RFC 4180 except that record delimiters are '\\n' instead of '\\r\\n'. We don't provide any way to change record delimiters. While the input files are being processed, we write/update an index file 'index.csv' under 'output_uri_prefix' (for example, gs://translation-test/index.csv) The index file is generated/updated as new files are being translated. The format is: input_file,target_language_code,translations_file,errors_file, glossary_translations_file,glossary_errors_file input_file is one file we matched using gcs_source.input_uri. target_language_code is provided in the request. translations_file contains the translations. (details provided below) errors_file contains the errors during processing of the file. (details below). Both translations_file and errors_file could be empty strings if we have no content to output. glossary_translations_file and glossary_errors_file are always empty strings if the input_file is tsv. They could also be empty if we have no content to output. Once a row is present in index.csv, the input/output matching never changes. Callers should also expect all the content in input_file are processed and ready to be consumed (that is, no partial output file is written). Since index.csv will be keeping updated during the process, please make sure there is no custom retention policy applied on the output bucket that may avoid file updating. (https://cloud.google.com/storage/docs/bucket-lock#retention-policy) The format of translations_file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_translations.[extension]` If the input file extension is tsv, the output has the following columns: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: translation without applying a glossary. Empty string if there is an error. Column 4 (only present if a glossary is provided in the request): translation after applying the glossary. Empty string if there is an error applying the glossary. Could be same string as column 3 if there is no glossary applied. If input file extension is a txt or html, the translation is directly written to the output file. If glossary is requested, a separate glossary_translations_file has format of `gs://translation_test/a_b_c_'trg'_glossary_translations.[extension]` The format of errors file (for target language code 'trg') is: `gs://translation_test/a_b_c_'trg'_errors.[extension]` If the input file extension is tsv, errors_file contains the following: Column 1: ID of the request provided in the input, if it's not provided in the input, then the input row number is used (0-based). Column 2: source sentence. Column 3: Error detail for the translation. Could be empty. Column 4 (only present if a glossary is provided in the request): Error when applying the glossary. If the input file extension is txt or html, glossary_error_file will be generated that contains error details. glossary_error_file has format of `gs://translation_test/a_b_c_'trg'_glossary_errors.[extension]`" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"SupportedLanguage": { +"description": "A single supported language response corresponds to information related to one supported language.", +"id": "SupportedLanguage", +"properties": { +"displayName": { +"description": "Human readable name of the language localized in the display language specified in the request.", +"type": "string" +}, +"languageCode": { +"description": "Supported language code, generally consisting of its ISO 639-1 identifier, for example, 'en', 'ja'. In certain cases, BCP-47 codes including language and region identifiers are returned (for example, 'zh-TW' and 'zh-CN')", +"type": "string" +}, +"supportSource": { +"description": "Can be used as source language.", +"type": "boolean" +}, +"supportTarget": { +"description": "Can be used as target language.", +"type": "boolean" +} +}, +"type": "object" +}, +"SupportedLanguages": { +"description": "The response message for discovering supported languages.", +"id": "SupportedLanguages", +"properties": { +"languages": { +"description": "A list of supported language responses. This list contains an entry for each language the Translation API supports.", +"items": { +"$ref": "SupportedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"TranslateDocumentRequest": { +"description": "A document translation request.", +"id": "TranslateDocumentRequest", +"properties": { +"customizedAttribution": { +"description": "Optional. This flag is to support user customized attribution. If not provided, the default is `Machine Translated by Google`. Customized attribution should follow rules in https://cloud.google.com/translate/attribution#attribution_and_logos", +"type": "string" +}, +"documentInputConfig": { +"$ref": "DocumentInputConfig", +"description": "Required. Input configurations." +}, +"documentOutputConfig": { +"$ref": "DocumentOutputConfig", +"description": "Optional. Output configurations. Defines if the output file should be stored within Cloud Storage as well as the desired output format. If not provided the translated file will only be returned through a byte-stream and its output mime type will be the same as the input file's mime type." +}, +"enableRotationCorrection": { +"description": "Optional. If true, enable auto rotation correction in DVS.", +"type": "boolean" +}, +"enableShadowRemovalNativePdf": { +"description": "Optional. If true, use the text removal server to remove the shadow text on background image for native pdf translation. Shadow removal feature can only be enabled when is_translate_native_pdf_only: false && pdf_native_only: false", +"type": "boolean" +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned." +}, +"isTranslateNativePdfOnly": { +"description": "Optional. is_translate_native_pdf_only field for external customers. If true, the page limit of online native pdf translation is 300 and only native pdf pages will be translated.", +"type": "boolean" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/advanced/labels for more information.", +"type": "object" +}, +"model": { +"description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, If not provided, the default Google model (NMT) will be used for translation.", +"type": "string" +}, +"sourceLanguageCode": { +"description": "Optional. The BCP-47 language code of the input document if known, for example, \"en-US\" or \"sr-Latn\". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response. Source language must be specified if the request contains a glossary or a custom model.", +"type": "string" +}, +"targetLanguageCode": { +"description": "Required. The BCP-47 language code to use for translation of the input document, set to one of the language codes listed in Language Support.", +"type": "string" +} +}, +"type": "object" +}, +"TranslateDocumentResponse": { +"description": "A translated document response message.", +"id": "TranslateDocumentResponse", +"properties": { +"documentTranslation": { +"$ref": "DocumentTranslation", +"description": "Translated document." +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "The `glossary_config` used for this translation." +}, +"glossaryDocumentTranslation": { +"$ref": "DocumentTranslation", +"description": "The document's translation output if a glossary is provided in the request. This can be the same as [TranslateDocumentResponse.document_translation] if no glossary terms apply." +}, +"model": { +"description": "Only present when 'model' is present in the request. 'model' is normalized to have a project number. For example: If the 'model' field in TranslateDocumentRequest is: `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.", +"type": "string" +} +}, +"type": "object" +}, +"TranslateTextGlossaryConfig": { +"description": "Configures which glossary should be used for a specific target language, and defines options for applying that glossary.", +"id": "TranslateTextGlossaryConfig", +"properties": { +"glossary": { +"description": "Required. Specifies the glossary used for this translation. Use this format: projects/*/locations/*/glossaries/*", +"type": "string" +}, +"ignoreCase": { +"description": "Optional. Indicates match is case-insensitive. Default value is false if missing.", +"type": "boolean" +} +}, +"type": "object" +}, +"TranslateTextRequest": { +"description": "The request message for synchronous translation.", +"id": "TranslateTextRequest", +"properties": { +"contents": { +"description": "Required. The content of the input in string format. We recommend the total content be less than 30k codepoints. The max length of this field is 1024. Use BatchTranslateText for larger text.", +"items": { +"type": "string" +}, +"type": "array" +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "Optional. Glossary to be applied. The glossary must be within the same region (have the same location-id) as the model, otherwise an INVALID_ARGUMENT (400) error is returned." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter. See https://cloud.google.com/translate/docs/labels for more information.", +"type": "object" +}, +"mimeType": { +"description": "Optional. The format of the source text, for example, \"text/html\", \"text/plain\". If left blank, the MIME type defaults to \"text/html\".", +"type": "string" +}, +"model": { +"description": "Optional. The `model` type requested for this translation. The format depends on model type: - AutoML Translation models: `projects/{project-number-or-id}/locations/{location-id}/models/{model-id}` - General (built-in) models: `projects/{project-number-or-id}/locations/{location-id}/models/general/nmt`, For global (non-regionalized) requests, use `location-id` `global`. For example, `projects/{project-number-or-id}/locations/global/models/general/nmt`. If not provided, the default Google model (NMT) will be used", +"type": "string" +}, +"sourceLanguageCode": { +"description": "Optional. The BCP-47 language code of the input text if known, for example, \"en-US\" or \"sr-Latn\". Supported language codes are listed in Language Support. If the source language isn't specified, the API attempts to identify the source language automatically and returns the source language within the response.", +"type": "string" +}, +"targetLanguageCode": { +"description": "Required. The BCP-47 language code to use for translation of the input text, set to one of the language codes listed in Language Support.", +"type": "string" +} +}, +"type": "object" +}, +"TranslateTextResponse": { +"id": "TranslateTextResponse", +"properties": { +"glossaryTranslations": { +"description": "Text translation responses if a glossary is provided in the request. This can be the same as `translations` if no terms apply. This field has the same length as `contents`.", +"items": { +"$ref": "Translation" +}, +"type": "array" +}, +"translations": { +"description": "Text translation responses with no glossary applied. This field has the same length as `contents`.", +"items": { +"$ref": "Translation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Translation": { +"description": "A single translation response.", +"id": "Translation", +"properties": { +"detectedLanguageCode": { +"description": "The BCP-47 language code of source text in the initial request, detected automatically, if no source language was passed within the initial request. If the source language was passed, auto-detection of the language does not occur and this field is empty.", +"type": "string" +}, +"glossaryConfig": { +"$ref": "TranslateTextGlossaryConfig", +"description": "The `glossary_config` used for this translation." +}, +"model": { +"description": "Only present when `model` is present in the request. `model` here is normalized to have project number. For example: If the `model` requested in TranslationTextRequest is `projects/{project-id}/locations/{location-id}/models/general/nmt` then `model` here would be normalized to `projects/{project-number}/locations/{location-id}/models/general/nmt`.", +"type": "string" +}, +"translatedText": { +"description": "Text translated into the target language. If an error occurs during translation, this field might be excluded from the response.", +"type": "string" +} +}, +"type": "object" +}, +"WaitOperationRequest": { +"description": "The request message for Operations.WaitOperation.", +"id": "WaitOperationRequest", +"properties": { +"timeout": { +"description": "The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Translation API", +"version": "v3beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/travelimpactmodel.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/travelimpactmodel.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..e8a93cff4833f23431d4cf2ed966af5ea91a8d87 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/travelimpactmodel.v1.json @@ -0,0 +1,277 @@ +{ +"basePath": "", +"baseUrl": "https://travelimpactmodel.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Travel Impact Model", +"description": "Travel Impact Model API lets you query travel carbon emission estimates.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/travel/impact-model", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "travelimpactmodel:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://travelimpactmodel.mtls.googleapis.com/", +"name": "travelimpactmodel", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"flights": { +"methods": { +"computeFlightEmissions": { +"description": "Stateless method to retrieve emission estimates. Details on how emission estimates are computed: https://github.com/google/travel-impact-model The response will contain all entries that match the input flight legs, in the same order. If there are no estimates available for a certain flight leg, the response will return the flight leg object with empty emission fields. The request will still be considered successful. Reasons for missing emission estimates include: - The flight is unknown to the server. - The input flight leg is missing one or more identifiers. - The flight date is in the past. - The aircraft type is not supported by the model. - Missing seat configuration. The request can contain up to 1000 flight legs. If the request has more than 1000 direct flights, if will fail with an INVALID_ARGUMENT error.", +"flatPath": "v1/flights:computeFlightEmissions", +"httpMethod": "POST", +"id": "travelimpactmodel.flights.computeFlightEmissions", +"parameterOrder": [], +"parameters": {}, +"path": "v1/flights:computeFlightEmissions", +"request": { +"$ref": "ComputeFlightEmissionsRequest" +}, +"response": { +"$ref": "ComputeFlightEmissionsResponse" +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://travelimpactmodel.googleapis.com/", +"schemas": { +"ComputeFlightEmissionsRequest": { +"description": "Input definition for the ComputeFlightEmissions request.", +"id": "ComputeFlightEmissionsRequest", +"properties": { +"flights": { +"description": "Required. Direct flights to return emission estimates for.", +"items": { +"$ref": "Flight" +}, +"type": "array" +} +}, +"type": "object" +}, +"ComputeFlightEmissionsResponse": { +"description": "Output definition for the ComputeFlightEmissions response.", +"id": "ComputeFlightEmissionsResponse", +"properties": { +"flightEmissions": { +"description": "List of flight legs with emission estimates.", +"items": { +"$ref": "FlightWithEmissions" +}, +"type": "array" +}, +"modelVersion": { +"$ref": "ModelVersion", +"description": "The model version under which emission estimates for all flights in this response were computed." +} +}, +"type": "object" +}, +"Date": { +"description": "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, 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", +"id": "Date", +"properties": { +"day": { +"description": "Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 to specify a year by itself or a year and month where the day isn't significant.", +"format": "int32", +"type": "integer" +}, +"month": { +"description": "Month of a year. Must be from 1 to 12, or 0 to specify a year without a month and day.", +"format": "int32", +"type": "integer" +}, +"year": { +"description": "Year of the date. Must be from 1 to 9999, or 0 to specify a date without a year.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"EmissionsGramsPerPax": { +"description": "Grouped emissions per seating class results.", +"id": "EmissionsGramsPerPax", +"properties": { +"business": { +"description": "Emissions for one passenger in business class in grams. This field is always computed and populated, regardless of whether the aircraft has business class seats or not.", +"format": "int32", +"type": "integer" +}, +"economy": { +"description": "Emissions for one passenger in economy class in grams. This field is always computed and populated, regardless of whether the aircraft has economy class seats or not.", +"format": "int32", +"type": "integer" +}, +"first": { +"description": "Emissions for one passenger in first class in grams. This field is always computed and populated, regardless of whether the aircraft has first class seats or not.", +"format": "int32", +"type": "integer" +}, +"premiumEconomy": { +"description": "Emissions for one passenger in premium economy class in grams. This field is always computed and populated, regardless of whether the aircraft has premium economy class seats or not.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Flight": { +"description": "All details related to a single request item for a direct flight emission estimates.", +"id": "Flight", +"properties": { +"departureDate": { +"$ref": "Date", +"description": "Required. Date of the flight in the time zone of the origin airport. Must be a date in the present or future." +}, +"destination": { +"description": "Required. IATA airport code for flight destination, e.g. \"JFK\".", +"type": "string" +}, +"flightNumber": { +"description": "Required. Flight number, e.g. 324.", +"format": "int32", +"type": "integer" +}, +"operatingCarrierCode": { +"description": "Required. IATA carrier code, e.g. \"AA\".", +"type": "string" +}, +"origin": { +"description": "Required. IATA airport code for flight origin, e.g. \"LHR\".", +"type": "string" +} +}, +"type": "object" +}, +"FlightWithEmissions": { +"description": "Direct flight with emission estimates.", +"id": "FlightWithEmissions", +"properties": { +"emissionsGramsPerPax": { +"$ref": "EmissionsGramsPerPax", +"description": "Optional. Per-passenger emission estimate numbers. Will not be present if emissions could not be computed. For the list of reasons why emissions could not be computed, see ComputeFlightEmissions. Note this field is currently equivalent to ttw_emissions_grams_per_pax until TIM version 1.X.0 which will update this to be total wtw emissions aka wtt_emissions_grams_per_pax + ttw_emissions_grams_per_pax." +}, +"flight": { +"$ref": "Flight", +"description": "Required. Matches the flight identifiers in the request. Note: all IATA codes are capitalized." +} +}, +"type": "object" +}, +"ModelVersion": { +"description": "Travel Impact Model version. For more information about the model versioning see https://github.com/google/travel-impact-model/#versioning.", +"id": "ModelVersion", +"properties": { +"dated": { +"description": "Dated versions: Model datasets are recreated with refreshed input data but no change to the algorithms regularly.", +"type": "string" +}, +"major": { +"description": "Major versions: Major changes to methodology (e.g. adding new data sources to the model that lead to major output changes). Such changes will be infrequent and announced well in advance. Might involve API version changes, which will respect guidelines in https://cloud.google.com/endpoints/docs/openapi/versioning-an-api#backwards-incompatible", +"format": "int32", +"type": "integer" +}, +"minor": { +"description": "Minor versions: Changes to the model that, while being consistent across schema versions, change the model parameters or implementation.", +"format": "int32", +"type": "integer" +}, +"patch": { +"description": "Patch versions: Implementation changes meant to address bugs or inaccuracies in the model implementation.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Travel Impact Model API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vault.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vault.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..643d86e32182038c9fa16c658991b8f8b11d6ec9 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vault.v1.json @@ -0,0 +1,2791 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/ediscovery": { +"description": "Manage your eDiscovery data" +}, +"https://www.googleapis.com/auth/ediscovery.readonly": { +"description": "View your eDiscovery data" +} +} +} +}, +"basePath": "", +"baseUrl": "https://vault.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Vault", +"description": "Retention and eDiscovery for Google Workspace. To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege. For example, to download an export, an account needs the **Manage Exports** privilege and the matter shared with them. ", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/vault", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vault:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vault.mtls.googleapis.com/", +"name": "vault", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"matters": { +"methods": { +"addPermissions": { +"description": "Adds an account as a matter collaborator.", +"flatPath": "v1/matters/{matterId}:addPermissions", +"httpMethod": "POST", +"id": "vault.matters.addPermissions", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}:addPermissions", +"request": { +"$ref": "AddMatterPermissionsRequest" +}, +"response": { +"$ref": "MatterPermission" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"close": { +"description": "Closes the specified matter. Returns the matter with updated state.", +"flatPath": "v1/matters/{matterId}:close", +"httpMethod": "POST", +"id": "vault.matters.close", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}:close", +"request": { +"$ref": "CloseMatterRequest" +}, +"response": { +"$ref": "CloseMatterResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"count": { +"description": "Counts the accounts processed by the specified query.", +"flatPath": "v1/matters/{matterId}:count", +"httpMethod": "POST", +"id": "vault.matters.count", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}:count", +"request": { +"$ref": "CountArtifactsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"create": { +"description": "Creates a matter with the given name and description. The initial state is open, and the owner is the method caller. Returns the created matter with default view.", +"flatPath": "v1/matters", +"httpMethod": "POST", +"id": "vault.matters.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/matters", +"request": { +"$ref": "Matter" +}, +"response": { +"$ref": "Matter" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"delete": { +"description": "Deletes the specified matter. Returns the matter with updated state.", +"flatPath": "v1/matters/{matterId}", +"httpMethod": "DELETE", +"id": "vault.matters.delete", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}", +"response": { +"$ref": "Matter" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"get": { +"description": "Gets the specified matter.", +"flatPath": "v1/matters/{matterId}", +"httpMethod": "GET", +"id": "vault.matters.get", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +}, +"view": { +"description": "Specifies how much information about the matter to return in the response.", +"enum": [ +"VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The amount of detail is unspecified. Same as **BASIC**.", +"Returns the matter ID, name, description, and state. Default choice.", +"Returns the basic details and a list of matter owners and collaborators (see [MatterPermissions](https://developers.google.com/vault/reference/rest/v1/matters#matterpermission))." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/matters/{matterId}", +"response": { +"$ref": "Matter" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +}, +"list": { +"description": "Lists matters the requestor has access to.", +"flatPath": "v1/matters", +"httpMethod": "GET", +"id": "vault.matters.list", +"parameterOrder": [], +"parameters": { +"pageSize": { +"description": "The number of matters to return in the response. Default and maximum are 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The pagination token as returned in the response.", +"location": "query", +"type": "string" +}, +"state": { +"description": "If set, lists only matters with the specified state. The default lists matters of all states.", +"enum": [ +"STATE_UNSPECIFIED", +"OPEN", +"CLOSED", +"DELETED" +], +"enumDescriptions": [ +"The matter has no specified state.", +"The matter is open.", +"The matter is closed.", +"The matter is deleted." +], +"location": "query", +"type": "string" +}, +"view": { +"description": "Specifies how much information about the matter to return in response.", +"enum": [ +"VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The amount of detail is unspecified. Same as **BASIC**.", +"Returns the matter ID, name, description, and state. Default choice.", +"Returns the basic details and a list of matter owners and collaborators (see [MatterPermissions](https://developers.google.com/vault/reference/rest/v1/matters#matterpermission))." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/matters", +"response": { +"$ref": "ListMattersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +}, +"removePermissions": { +"description": "Removes an account as a matter collaborator.", +"flatPath": "v1/matters/{matterId}:removePermissions", +"httpMethod": "POST", +"id": "vault.matters.removePermissions", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}:removePermissions", +"request": { +"$ref": "RemoveMatterPermissionsRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"reopen": { +"description": "Reopens the specified matter. Returns the matter with updated state.", +"flatPath": "v1/matters/{matterId}:reopen", +"httpMethod": "POST", +"id": "vault.matters.reopen", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}:reopen", +"request": { +"$ref": "ReopenMatterRequest" +}, +"response": { +"$ref": "ReopenMatterResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"undelete": { +"description": "Undeletes the specified matter. Returns the matter with updated state.", +"flatPath": "v1/matters/{matterId}:undelete", +"httpMethod": "POST", +"id": "vault.matters.undelete", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}:undelete", +"request": { +"$ref": "UndeleteMatterRequest" +}, +"response": { +"$ref": "Matter" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"update": { +"description": "Updates the specified matter. This updates only the name and description of the matter, identified by matter ID. Changes to any other fields are ignored. Returns the default view of the matter.", +"flatPath": "v1/matters/{matterId}", +"httpMethod": "PUT", +"id": "vault.matters.update", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}", +"request": { +"$ref": "Matter" +}, +"response": { +"$ref": "Matter" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +} +}, +"resources": { +"exports": { +"methods": { +"create": { +"description": "Creates an export.", +"flatPath": "v1/matters/{matterId}/exports", +"httpMethod": "POST", +"id": "vault.matters.exports.create", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/exports", +"request": { +"$ref": "Export" +}, +"response": { +"$ref": "Export" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"delete": { +"description": "Deletes an export.", +"flatPath": "v1/matters/{matterId}/exports/{exportId}", +"httpMethod": "DELETE", +"id": "vault.matters.exports.delete", +"parameterOrder": [ +"matterId", +"exportId" +], +"parameters": { +"exportId": { +"description": "The export ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/exports/{exportId}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"get": { +"description": "Gets an export.", +"flatPath": "v1/matters/{matterId}/exports/{exportId}", +"httpMethod": "GET", +"id": "vault.matters.exports.get", +"parameterOrder": [ +"matterId", +"exportId" +], +"parameters": { +"exportId": { +"description": "The export ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/exports/{exportId}", +"response": { +"$ref": "Export" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +}, +"list": { +"description": "Lists details about the exports in the specified matter.", +"flatPath": "v1/matters/{matterId}/exports", +"httpMethod": "GET", +"id": "vault.matters.exports.list", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The number of exports to return in the response.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The pagination token as returned in the response.", +"location": "query", +"type": "string" +} +}, +"path": "v1/matters/{matterId}/exports", +"response": { +"$ref": "ListExportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +} +} +}, +"holds": { +"methods": { +"addHeldAccounts": { +"description": "Adds accounts to a hold. Returns a list of accounts that have been successfully added. Accounts can be added only to an existing account-based hold.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts", +"httpMethod": "POST", +"id": "vault.matters.holds.addHeldAccounts", +"parameterOrder": [ +"matterId", +"holdId" +], +"parameters": { +"holdId": { +"description": "The hold ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}:addHeldAccounts", +"request": { +"$ref": "AddHeldAccountsRequest" +}, +"response": { +"$ref": "AddHeldAccountsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"create": { +"description": "Creates a hold in the specified matter.", +"flatPath": "v1/matters/{matterId}/holds", +"httpMethod": "POST", +"id": "vault.matters.holds.create", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds", +"request": { +"$ref": "Hold" +}, +"response": { +"$ref": "Hold" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"delete": { +"description": "Removes the specified hold and releases the accounts or organizational unit covered by the hold. If the data is not preserved by another hold or retention rule, it might be purged.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}", +"httpMethod": "DELETE", +"id": "vault.matters.holds.delete", +"parameterOrder": [ +"matterId", +"holdId" +], +"parameters": { +"holdId": { +"description": "The hold ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"get": { +"description": "Gets the specified hold.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}", +"httpMethod": "GET", +"id": "vault.matters.holds.get", +"parameterOrder": [ +"matterId", +"holdId" +], +"parameters": { +"holdId": { +"description": "The hold ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +}, +"view": { +"description": "The amount of detail to return for a hold.", +"enum": [ +"HOLD_VIEW_UNSPECIFIED", +"BASIC_HOLD", +"FULL_HOLD" +], +"enumDescriptions": [ +"Not specified. Defaults to **FULL_HOLD**.", +"Returns the hold ID, name, update time, service, and query.", +"Returns all details of **BASIC_HOLD** and the entities the hold applies to, such as accounts or organizational unit." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}", +"response": { +"$ref": "Hold" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +}, +"list": { +"description": "Lists the holds in a matter.", +"flatPath": "v1/matters/{matterId}/holds", +"httpMethod": "GET", +"id": "vault.matters.holds.list", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The number of holds to return in the response, between 0 and 100 inclusive. Leaving this empty, or as 0, is the same as **page_size** = 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The pagination token as returned in the response. An empty token means start from the beginning.", +"location": "query", +"type": "string" +}, +"view": { +"description": "The amount of detail to return for a hold.", +"enum": [ +"HOLD_VIEW_UNSPECIFIED", +"BASIC_HOLD", +"FULL_HOLD" +], +"enumDescriptions": [ +"Not specified. Defaults to **FULL_HOLD**.", +"Returns the hold ID, name, update time, service, and query.", +"Returns all details of **BASIC_HOLD** and the entities the hold applies to, such as accounts or organizational unit." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds", +"response": { +"$ref": "ListHoldsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +}, +"removeHeldAccounts": { +"description": "Removes the specified accounts from a hold. Returns a list of statuses in the same order as the request.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts", +"httpMethod": "POST", +"id": "vault.matters.holds.removeHeldAccounts", +"parameterOrder": [ +"matterId", +"holdId" +], +"parameters": { +"holdId": { +"description": "The hold ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}:removeHeldAccounts", +"request": { +"$ref": "RemoveHeldAccountsRequest" +}, +"response": { +"$ref": "RemoveHeldAccountsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"update": { +"description": "Updates the scope (organizational unit or accounts) and query parameters of a hold. You cannot add accounts to a hold that covers an organizational unit, nor can you add organizational units to a hold that covers individual accounts. If you try, the unsupported values are ignored.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}", +"httpMethod": "PUT", +"id": "vault.matters.holds.update", +"parameterOrder": [ +"matterId", +"holdId" +], +"parameters": { +"holdId": { +"description": "The ID of the hold.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}", +"request": { +"$ref": "Hold" +}, +"response": { +"$ref": "Hold" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +} +}, +"resources": { +"accounts": { +"methods": { +"create": { +"description": "Adds an account to a hold. Accounts can be added only to a hold that does not have an organizational unit set. If you try to add an account to an organizational unit-based hold, an error is returned.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", +"httpMethod": "POST", +"id": "vault.matters.holds.accounts.create", +"parameterOrder": [ +"matterId", +"holdId" +], +"parameters": { +"holdId": { +"description": "The hold ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}/accounts", +"request": { +"$ref": "HeldAccount" +}, +"response": { +"$ref": "HeldAccount" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"delete": { +"description": "Removes an account from a hold.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", +"httpMethod": "DELETE", +"id": "vault.matters.holds.accounts.delete", +"parameterOrder": [ +"matterId", +"holdId", +"accountId" +], +"parameters": { +"accountId": { +"description": "The ID of the account to remove from the hold.", +"location": "path", +"required": true, +"type": "string" +}, +"holdId": { +"description": "The hold ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}/accounts/{accountId}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"list": { +"description": "Lists the accounts covered by a hold. This can list only individually-specified accounts covered by the hold. If the hold covers an organizational unit, use the [Admin SDK](https://developers.google.com/admin-sdk/). to list the members of the organizational unit on hold.", +"flatPath": "v1/matters/{matterId}/holds/{holdId}/accounts", +"httpMethod": "GET", +"id": "vault.matters.holds.accounts.list", +"parameterOrder": [ +"matterId", +"holdId" +], +"parameters": { +"holdId": { +"description": "The hold ID.", +"location": "path", +"required": true, +"type": "string" +}, +"matterId": { +"description": "The matter ID.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/holds/{holdId}/accounts", +"response": { +"$ref": "ListHeldAccountsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +} +} +} +} +}, +"savedQueries": { +"methods": { +"create": { +"description": "Creates a saved query.", +"flatPath": "v1/matters/{matterId}/savedQueries", +"httpMethod": "POST", +"id": "vault.matters.savedQueries.create", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The ID of the matter to create the saved query in.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/savedQueries", +"request": { +"$ref": "SavedQuery" +}, +"response": { +"$ref": "SavedQuery" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"delete": { +"description": "Deletes the specified saved query.", +"flatPath": "v1/matters/{matterId}/savedQueries/{savedQueryId}", +"httpMethod": "DELETE", +"id": "vault.matters.savedQueries.delete", +"parameterOrder": [ +"matterId", +"savedQueryId" +], +"parameters": { +"matterId": { +"description": "The ID of the matter to delete the saved query from.", +"location": "path", +"required": true, +"type": "string" +}, +"savedQueryId": { +"description": "ID of the saved query to delete.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/savedQueries/{savedQueryId}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"get": { +"description": "Retrieves the specified saved query.", +"flatPath": "v1/matters/{matterId}/savedQueries/{savedQueryId}", +"httpMethod": "GET", +"id": "vault.matters.savedQueries.get", +"parameterOrder": [ +"matterId", +"savedQueryId" +], +"parameters": { +"matterId": { +"description": "The ID of the matter to get the saved query from.", +"location": "path", +"required": true, +"type": "string" +}, +"savedQueryId": { +"description": "ID of the saved query to retrieve.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "v1/matters/{matterId}/savedQueries/{savedQueryId}", +"response": { +"$ref": "SavedQuery" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +}, +"list": { +"description": "Lists the saved queries in a matter.", +"flatPath": "v1/matters/{matterId}/savedQueries", +"httpMethod": "GET", +"id": "vault.matters.savedQueries.list", +"parameterOrder": [ +"matterId" +], +"parameters": { +"matterId": { +"description": "The ID of the matter to get the saved queries for.", +"location": "path", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of saved queries to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The pagination token as returned in the previous response. An empty token means start from the beginning.", +"location": "query", +"type": "string" +} +}, +"path": "v1/matters/{matterId}/savedQueries", +"response": { +"$ref": "ListSavedQueriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "vault.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "vault.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "vault.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "vault.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/ediscovery", +"https://www.googleapis.com/auth/ediscovery.readonly" +] +} +} +} +}, +"revision": "20240415", +"rootUrl": "https://vault.googleapis.com/", +"schemas": { +"AccountCount": { +"description": "The results count for each account.", +"id": "AccountCount", +"properties": { +"account": { +"$ref": "UserInfo", +"description": "Account owner." +}, +"count": { +"description": "The number of results (messages or files) found for this account.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"AccountCountError": { +"description": "An error that occurred when querying a specific account", +"id": "AccountCountError", +"properties": { +"account": { +"$ref": "UserInfo", +"description": "Account owner." +}, +"errorType": { +"description": "Account query error.", +"enum": [ +"ERROR_TYPE_UNSPECIFIED", +"WILDCARD_TOO_BROAD", +"TOO_MANY_TERMS", +"LOCATION_UNAVAILABLE", +"UNKNOWN", +"DEADLINE_EXCEEDED" +], +"enumDescriptions": [ +"Default.", +"Permanent - prefix terms expanded to too many query terms.", +"Permanent - query contains too many terms.", +"Transient - data in transit between storage replicas, temporarily unavailable.", +"Unrecognized error.", +"Deadline exceeded when querying the account." +], +"type": "string" +} +}, +"type": "object" +}, +"AccountInfo": { +"description": "The accounts to search", +"id": "AccountInfo", +"properties": { +"emails": { +"description": "A set of accounts to search.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddHeldAccountResult": { +"description": "The status of each account creation, and the **HeldAccount**, if successful.", +"id": "AddHeldAccountResult", +"properties": { +"account": { +"$ref": "HeldAccount", +"description": "Returned when the account was successfully created." +}, +"status": { +"$ref": "Status", +"description": "Reports the request status. If it failed, returns an error message." +} +}, +"type": "object" +}, +"AddHeldAccountsRequest": { +"description": "Add a list of accounts to a hold.", +"id": "AddHeldAccountsRequest", +"properties": { +"accountIds": { +"description": "A comma-separated list of the account IDs of the accounts to add to the hold. Specify either **emails** or **account_ids**, but not both.", +"items": { +"type": "string" +}, +"type": "array" +}, +"emails": { +"description": "A comma-separated list of the emails of the accounts to add to the hold. Specify either **emails** or **account_ids**, but not both.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddHeldAccountsResponse": { +"description": "Response for batch create held accounts.", +"id": "AddHeldAccountsResponse", +"properties": { +"responses": { +"description": "The list of responses, in the same order as the batch request.", +"items": { +"$ref": "AddHeldAccountResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"AddMatterPermissionsRequest": { +"description": "Add an account with the permission specified. The role cannot be owner. If an account already has a role in the matter, the existing role is overwritten.", +"id": "AddMatterPermissionsRequest", +"properties": { +"ccMe": { +"description": "Only relevant if **sendEmails** is **true**. To CC the requestor in the email message, set to **true**. To not CC requestor, set to **false**.", +"type": "boolean" +}, +"matterPermission": { +"$ref": "MatterPermission", +"description": "The account and its role to add." +}, +"sendEmails": { +"description": "To send a notification email to the added account, set to **true**. To not send a notification email, set to **false**.", +"type": "boolean" +} +}, +"type": "object" +}, +"CalendarExportOptions": { +"description": "The options for Calendar exports.", +"id": "CalendarExportOptions", +"properties": { +"exportFormat": { +"description": "The file format for exported text messages.", +"enum": [ +"EXPORT_FORMAT_UNSPECIFIED", +"MBOX", +"PST", +"ICS" +], +"enumDescriptions": [ +"No export format specified.", +"Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", +"Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar.", +"Export as ICS. Only available for Calendar." +], +"type": "string" +} +}, +"type": "object" +}, +"CalendarOptions": { +"description": "Additional options for Calendar search", +"id": "CalendarOptions", +"properties": { +"locationQuery": { +"description": "Matches only those events whose location contains all of the words in the given set. If the string contains quoted phrases, this method only matches those events whose location contain the exact phrase. Entries in the set are considered in \"and\". Word splitting example: [\"New Zealand\"] vs [\"New\",\"Zealand\"] \"New Zealand\": matched by both \"New and better Zealand\": only matched by the later", +"items": { +"type": "string" +}, +"type": "array" +}, +"minusWords": { +"description": "Matches only those events that do not contain any of the words in the given set in title, description, location, or attendees. Entries in the set are considered in \"or\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"peopleQuery": { +"description": "Matches only those events whose attendees contain all of the words in the given set. Entries in the set are considered in \"and\".", +"items": { +"type": "string" +}, +"type": "array" +}, +"responseStatuses": { +"description": "Matches only events for which the custodian gave one of these responses. If the set is empty or contains ATTENDEE_RESPONSE_UNSPECIFIED there will be no filtering on responses.", +"items": { +"enum": [ +"ATTENDEE_RESPONSE_UNSPECIFIED", +"ATTENDEE_RESPONSE_NEEDS_ACTION", +"ATTENDEE_RESPONSE_ACCEPTED", +"ATTENDEE_RESPONSE_DECLINED", +"ATTENDEE_RESPONSE_TENTATIVE" +], +"enumDescriptions": [ +"Attendee response unspecified. If this is set no filtering on responses will be done, all other attendee responses that are part of the query options are ignored.", +"The participant has been invited but has not responded yet.", +"The participant plans to attend.", +"The participant does not plan to attend.", +"The participant expects to possibly attend." +], +"type": "string" +}, +"type": "array" +}, +"versionDate": { +"description": "Search the current version of the Calendar event, but export the contents of the last version saved before 12:00 AM UTC on the specified date. Enter the date in UTC.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"CloseMatterRequest": { +"description": "Close a matter by ID.", +"id": "CloseMatterRequest", +"properties": {}, +"type": "object" +}, +"CloseMatterResponse": { +"description": "Response to a CloseMatterRequest.", +"id": "CloseMatterResponse", +"properties": { +"matter": { +"$ref": "Matter", +"description": "The updated matter, with state **CLOSED**." +} +}, +"type": "object" +}, +"CloudStorageFile": { +"description": "The export file in Cloud Storage", +"id": "CloudStorageFile", +"properties": { +"bucketName": { +"description": "The name of the Cloud Storage bucket for the export file. You can use this value in the Cloud Storage [JSON API](https://cloud.google.com/storage/docs/json_api) or [XML API](https://cloud.google.com/storage/docs/xml-api), but not to list the bucket contents. Instead, you can [get individual export files](https://cloud.google.com/storage/docs/json_api/v1/objects/get) by object name.", +"type": "string" +}, +"md5Hash": { +"description": "The md5 hash of the file.", +"type": "string" +}, +"objectName": { +"description": "The name of the Cloud Storage object for the export file. You can use this value in the Cloud Storage [JSON API](https://cloud.google.com/storage/docs/json_api) or [XML API](https://cloud.google.com/storage/docs/xml-api).", +"type": "string" +}, +"size": { +"description": "The export file size.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"CloudStorageSink": { +"description": "Export sink for Cloud Storage files.", +"id": "CloudStorageSink", +"properties": { +"files": { +"description": "Output only. The exported files in Cloud Storage.", +"items": { +"$ref": "CloudStorageFile" +}, +"type": "array" +} +}, +"type": "object" +}, +"CorpusQuery": { +"description": "Service-specific options for holds.", +"id": "CorpusQuery", +"properties": { +"driveQuery": { +"$ref": "HeldDriveQuery", +"description": "Service-specific options for Drive holds. If set, **CorpusType** must be **DRIVE**." +}, +"groupsQuery": { +"$ref": "HeldGroupsQuery", +"description": "Service-specific options for Groups holds. If set, **CorpusType** must be **GROUPS**." +}, +"hangoutsChatQuery": { +"$ref": "HeldHangoutsChatQuery", +"description": "Service-specific options for Chat holds. If set, **CorpusType** must be **HANGOUTS_CHAT**." +}, +"mailQuery": { +"$ref": "HeldMailQuery", +"description": "Service-specific options for Gmail holds. If set, **CorpusType** must be **MAIL**." +}, +"voiceQuery": { +"$ref": "HeldVoiceQuery", +"description": "Service-specific options for Voice holds. If set, **CorpusType** must be **VOICE**." +} +}, +"type": "object" +}, +"CountArtifactsMetadata": { +"description": "Long running operation metadata for CountArtifacts.", +"id": "CountArtifactsMetadata", +"properties": { +"endTime": { +"description": "End time of count operation. Available when operation is done.", +"format": "google-datetime", +"type": "string" +}, +"matterId": { +"description": "The matter ID of the associated matter.", +"type": "string" +}, +"query": { +"$ref": "Query", +"description": "The search query from the request." +}, +"startTime": { +"description": "Creation time of count operation.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"CountArtifactsRequest": { +"description": "Count artifacts request.", +"id": "CountArtifactsRequest", +"properties": { +"query": { +"$ref": "Query", +"description": "The search query." +}, +"view": { +"description": "Sets the granularity of the count results.", +"enum": [ +"COUNT_RESULT_VIEW_UNSPECIFIED", +"TOTAL_COUNT", +"ALL" +], +"enumDescriptions": [ +"Default. Same as **TOTAL_COUNT**.", +"Response includes counts of the total accounts, queried accounts, matching accounts, non-queryable accounts, and queried account errors.", +"Response includes the same details as **TOTAL_COUNT**, plus additional account breakdown." +], +"type": "string" +} +}, +"type": "object" +}, +"CountArtifactsResponse": { +"description": "Definition of the response for method CountArtifacts.", +"id": "CountArtifactsResponse", +"properties": { +"groupsCountResult": { +"$ref": "GroupsCountResult", +"description": "Count metrics for Groups." +}, +"mailCountResult": { +"$ref": "MailCountResult", +"description": "Count metrics for Gmail and classic Hangouts." +}, +"totalCount": { +"description": "Total count of messages.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"DriveExportOptions": { +"description": "Options for Drive exports.", +"id": "DriveExportOptions", +"properties": { +"includeAccessInfo": { +"description": "To include access level information for users with [indirect access](https://support.google.com/vault/answer/6099459#metadata) to files, set to **true**.", +"type": "boolean" +} +}, +"type": "object" +}, +"DriveOptions": { +"description": "Additional options for Drive search", +"id": "DriveOptions", +"properties": { +"clientSideEncryptedOption": { +"description": "Set whether the results include only content encrypted with [Google Workspace Client-side encryption](https://support.google.com/a?p=cse_ov) content, only unencrypted content, or both. Defaults to both. Currently supported for Drive.", +"enum": [ +"CLIENT_SIDE_ENCRYPTED_OPTION_UNSPECIFIED", +"CLIENT_SIDE_ENCRYPTED_OPTION_ANY", +"CLIENT_SIDE_ENCRYPTED_OPTION_ENCRYPTED", +"CLIENT_SIDE_ENCRYPTED_OPTION_UNENCRYPTED" +], +"enumDescriptions": [ +"Encryption status unspecified. Results include both client-side encrypted and non-encrypted content.", +"Include both client-side encrypted and unencrypted content in results.", +"Include client-side encrypted content only.", +"Include unencrypted content only." +], +"type": "string" +}, +"includeSharedDrives": { +"description": "Set to **true** to include shared drives.", +"type": "boolean" +}, +"includeTeamDrives": { +"deprecated": true, +"description": "Set to true to include Team Drive.", +"type": "boolean" +}, +"versionDate": { +"description": "Search the current version of the Drive file, but export the contents of the last version saved before 12:00 AM UTC on the specified date. Enter the date in UTC.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Export": { +"description": "An export. To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege.", +"id": "Export", +"properties": { +"cloudStorageSink": { +"$ref": "CloudStorageSink", +"description": "Output only. The sink for export files in Cloud Storage." +}, +"createTime": { +"description": "Output only. The time when the export was created.", +"format": "google-datetime", +"type": "string" +}, +"exportOptions": { +"$ref": "ExportOptions", +"description": "Additional export options." +}, +"id": { +"description": "Output only. The generated export ID.", +"type": "string" +}, +"matterId": { +"description": "Output only. The matter ID.", +"type": "string" +}, +"name": { +"description": "The export name. Don't use special characters (~!$'(),;@:/?) in the name, they can prevent you from downloading exports.", +"type": "string" +}, +"parentExportId": { +"description": "Output only. Identifies the parent export that spawned this child export. This is only set on child exports.", +"readOnly": true, +"type": "string" +}, +"query": { +"$ref": "Query", +"description": "The query parameters used to create the export." +}, +"requester": { +"$ref": "UserInfo", +"description": "Output only. The requester of the export." +}, +"stats": { +"$ref": "ExportStats", +"description": "Output only. Details about the export progress and size." +}, +"status": { +"description": "Output only. The status of the export.", +"enum": [ +"EXPORT_STATUS_UNSPECIFIED", +"COMPLETED", +"FAILED", +"IN_PROGRESS" +], +"enumDescriptions": [ +"The status is unspecified.", +"The export completed.", +"The export failed.", +"The export is in progress." +], +"type": "string" +} +}, +"type": "object" +}, +"ExportOptions": { +"description": "Additional options for exports", +"id": "ExportOptions", +"properties": { +"calendarOptions": { +"$ref": "CalendarExportOptions", +"description": "Option available for Calendar export." +}, +"driveOptions": { +"$ref": "DriveExportOptions", +"description": "Options for Drive exports." +}, +"groupsOptions": { +"$ref": "GroupsExportOptions", +"description": "Options for Groups exports." +}, +"hangoutsChatOptions": { +"$ref": "HangoutsChatExportOptions", +"description": "Options for Chat exports." +}, +"mailOptions": { +"$ref": "MailExportOptions", +"description": "Options for Gmail exports." +}, +"region": { +"description": "The requested data region for the export.", +"enum": [ +"EXPORT_REGION_UNSPECIFIED", +"ANY", +"US", +"EUROPE" +], +"enumDescriptions": [ +"The region is unspecified. Defaults to ANY.", +"Any region.", +"United States region.", +"Europe region." +], +"type": "string" +}, +"voiceOptions": { +"$ref": "VoiceExportOptions", +"description": "Options for Voice exports." +} +}, +"type": "object" +}, +"ExportStats": { +"description": "Progress information for an export.", +"id": "ExportStats", +"properties": { +"exportedArtifactCount": { +"description": "The number of messages or files already processed for export.", +"format": "int64", +"type": "string" +}, +"sizeInBytes": { +"description": "The size of export in bytes.", +"format": "int64", +"type": "string" +}, +"totalArtifactCount": { +"description": "The number of messages or files to be exported.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GroupsCountResult": { +"description": "Groups specific count metrics.", +"id": "GroupsCountResult", +"properties": { +"accountCountErrors": { +"description": "Error occurred when querying these accounts.", +"items": { +"$ref": "AccountCountError" +}, +"type": "array" +}, +"accountCounts": { +"description": "Subtotal count per matching account that have more than zero messages.", +"items": { +"$ref": "AccountCount" +}, +"type": "array" +}, +"matchingAccountsCount": { +"description": "Total number of accounts that can be queried and have more than zero messages.", +"format": "int64", +"type": "string" +}, +"nonQueryableAccounts": { +"description": "When **DataScope** is **HELD_DATA**, these accounts in the request are not queried because they are not on hold. For other data scope, this field is not set.", +"items": { +"type": "string" +}, +"type": "array" +}, +"queriedAccountsCount": { +"description": "Total number of accounts involved in this count operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GroupsExportOptions": { +"description": "Options for Groups exports.", +"id": "GroupsExportOptions", +"properties": { +"exportFormat": { +"description": "The file format for exported messages.", +"enum": [ +"EXPORT_FORMAT_UNSPECIFIED", +"MBOX", +"PST", +"ICS" +], +"enumDescriptions": [ +"No export format specified.", +"Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", +"Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar.", +"Export as ICS. Only available for Calendar." +], +"type": "string" +} +}, +"type": "object" +}, +"HangoutsChatExportOptions": { +"description": "Options for Chat exports.", +"id": "HangoutsChatExportOptions", +"properties": { +"exportFormat": { +"description": "The file format for exported messages.", +"enum": [ +"EXPORT_FORMAT_UNSPECIFIED", +"MBOX", +"PST", +"ICS" +], +"enumDescriptions": [ +"No export format specified.", +"Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", +"Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar.", +"Export as ICS. Only available for Calendar." +], +"type": "string" +} +}, +"type": "object" +}, +"HangoutsChatInfo": { +"description": "The Chat spaces to search", +"id": "HangoutsChatInfo", +"properties": { +"roomId": { +"description": "A list of Chat spaces IDs, as provided by the [Chat API](https://developers.google.com/chat). There is a limit of exporting from 500 Chat spaces per request.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"HangoutsChatOptions": { +"description": "Additional options for Google Chat search", +"id": "HangoutsChatOptions", +"properties": { +"includeRooms": { +"description": "For searches by account or organizational unit, set to **true** to include rooms.", +"type": "boolean" +} +}, +"type": "object" +}, +"HeldAccount": { +"description": "An account covered by a hold. This structure is immutable. It can be an individual account or a Google Group, depending on the service. To work with Vault resources, the account must have the [required Vault privileges] (https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege.", +"id": "HeldAccount", +"properties": { +"accountId": { +"description": "The account ID, as provided by the [Admin SDK](https://developers.google.com/admin-sdk/).", +"type": "string" +}, +"email": { +"description": "The primary email address of the account. If used as an input, this takes precedence over **accountId**.", +"type": "string" +}, +"firstName": { +"description": "Output only. The first name of the account holder.", +"type": "string" +}, +"holdTime": { +"description": "Output only. When the account was put on hold.", +"format": "google-datetime", +"type": "string" +}, +"lastName": { +"description": "Output only. The last name of the account holder.", +"type": "string" +} +}, +"type": "object" +}, +"HeldDriveQuery": { +"description": "Options for Drive holds.", +"id": "HeldDriveQuery", +"properties": { +"includeSharedDriveFiles": { +"description": "To include files in shared drives in the hold, set to **true**.", +"type": "boolean" +}, +"includeTeamDriveFiles": { +"deprecated": true, +"description": "To include files in Team Drives in the hold, set to **true**.", +"type": "boolean" +} +}, +"type": "object" +}, +"HeldGroupsQuery": { +"description": "Query options for group holds.", +"id": "HeldGroupsQuery", +"properties": { +"endTime": { +"description": "The end time for the query. Specify in GMT. The value is rounded to 12 AM on the specified date.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The start time for the query. Specify in GMT. The value is rounded to 12 AM on the specified date.", +"format": "google-datetime", +"type": "string" +}, +"terms": { +"description": "The [search operators](https://support.google.com/vault/answer/2474474) used to refine the messages covered by the hold.", +"type": "string" +} +}, +"type": "object" +}, +"HeldHangoutsChatQuery": { +"description": "Options for Chat holds.", +"id": "HeldHangoutsChatQuery", +"properties": { +"includeRooms": { +"description": "To include messages in Chat spaces the user was a member of, set to **true**.", +"type": "boolean" +} +}, +"type": "object" +}, +"HeldMailQuery": { +"description": "Query options for Gmail holds.", +"id": "HeldMailQuery", +"properties": { +"endTime": { +"description": "The end time for the query. Specify in GMT. The value is rounded to 12 AM on the specified date.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "The start time for the query. Specify in GMT. The value is rounded to 12 AM on the specified date.", +"format": "google-datetime", +"type": "string" +}, +"terms": { +"description": "The [search operators](https://support.google.com/vault/answer/2474474) used to refine the messages covered by the hold.", +"type": "string" +} +}, +"type": "object" +}, +"HeldOrgUnit": { +"description": "The organizational unit covered by a hold. This structure is immutable.", +"id": "HeldOrgUnit", +"properties": { +"holdTime": { +"description": "When the organizational unit was put on hold. This property is immutable.", +"format": "google-datetime", +"type": "string" +}, +"orgUnitId": { +"description": "The organizational unit's immutable ID as provided by the [Admin SDK](https://developers.google.com/admin-sdk/).", +"type": "string" +} +}, +"type": "object" +}, +"HeldVoiceQuery": { +"description": "Options for Voice holds.", +"id": "HeldVoiceQuery", +"properties": { +"coveredData": { +"description": "A list of data types covered by the hold. Should be non-empty. Order does not matter and duplicates are ignored.", +"items": { +"enum": [ +"COVERED_DATA_UNSPECIFIED", +"TEXT_MESSAGES", +"VOICEMAILS", +"CALL_LOGS" +], +"enumDescriptions": [ +"Covered data unspecified.", +"Voice text messages.", +"Voicemails and their transcripts.", +"Call logs." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Hold": { +"description": "A hold. A hold prevents the specified Google Workspace service from purging data for specific accounts or all members of an organizational unit. To work with Vault resources, the account must have the [required Vault privileges] (https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege.", +"id": "Hold", +"properties": { +"accounts": { +"description": "If set, the hold applies to the specified accounts and **orgUnit** must be empty.", +"items": { +"$ref": "HeldAccount" +}, +"type": "array" +}, +"corpus": { +"description": "The service to be searched.", +"enum": [ +"CORPUS_TYPE_UNSPECIFIED", +"DRIVE", +"MAIL", +"GROUPS", +"HANGOUTS_CHAT", +"VOICE", +"CALENDAR" +], +"enumDescriptions": [ +"No service specified.", +"Drive, including Meet and Sites.", +"For search, Gmail and classic Hangouts. For holds, Gmail only.", +"Groups.", +"For export, Google Chat only. For holds, Google Chat and classic Hangouts.", +"Google Voice.", +"Calendar." +], +"type": "string" +}, +"holdId": { +"description": "The unique immutable ID of the hold. Assigned during creation.", +"type": "string" +}, +"name": { +"description": "The name of the hold.", +"type": "string" +}, +"orgUnit": { +"$ref": "HeldOrgUnit", +"description": "If set, the hold applies to all members of the organizational unit and **accounts** must be empty. This property is mutable. For Groups holds, set **accounts**." +}, +"query": { +"$ref": "CorpusQuery", +"description": "Service-specific options. If set, **CorpusQuery** must match **CorpusType**." +}, +"updateTime": { +"description": "The last time this hold was modified.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ListExportsResponse": { +"description": "The exports for a matter.", +"id": "ListExportsResponse", +"properties": { +"exports": { +"description": "The list of exports.", +"items": { +"$ref": "Export" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token to retrieve the next page of results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListHeldAccountsResponse": { +"description": "Returns a list of the accounts covered by a hold.", +"id": "ListHeldAccountsResponse", +"properties": { +"accounts": { +"description": "The held accounts on a hold.", +"items": { +"$ref": "HeldAccount" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListHoldsResponse": { +"description": "The holds for a matter.", +"id": "ListHoldsResponse", +"properties": { +"holds": { +"description": "The list of holds.", +"items": { +"$ref": "Hold" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token to retrieve the next page of results in the list. If this is empty, then there are no more holds to list.", +"type": "string" +} +}, +"type": "object" +}, +"ListMattersResponse": { +"description": "Provides the list of matters.", +"id": "ListMattersResponse", +"properties": { +"matters": { +"description": "List of matters.", +"items": { +"$ref": "Matter" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Page token to retrieve the next page of results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSavedQueriesResponse": { +"description": "Definition of the response for method ListSaveQuery.", +"id": "ListSavedQueriesResponse", +"properties": { +"nextPageToken": { +"description": "Page token to retrieve the next page of results in the list. If this is empty, then there are no more saved queries to list.", +"type": "string" +}, +"savedQueries": { +"description": "List of saved queries.", +"items": { +"$ref": "SavedQuery" +}, +"type": "array" +} +}, +"type": "object" +}, +"MailCountResult": { +"description": "Gmail and classic Hangouts-specific count metrics.", +"id": "MailCountResult", +"properties": { +"accountCountErrors": { +"description": "Errors occurred when querying these accounts.", +"items": { +"$ref": "AccountCountError" +}, +"type": "array" +}, +"accountCounts": { +"description": "Subtotal count per matching account that have more than zero messages.", +"items": { +"$ref": "AccountCount" +}, +"type": "array" +}, +"matchingAccountsCount": { +"description": "Total number of accounts that can be queried and have more than zero messages.", +"format": "int64", +"type": "string" +}, +"nonQueryableAccounts": { +"description": "When **DataScope** is **HELD_DATA** and when account emails are passed in explicitly, the list of accounts in the request that are not queried because they are not on hold in the matter. For other data scopes, this field is not set.", +"items": { +"type": "string" +}, +"type": "array" +}, +"queriedAccountsCount": { +"description": "Total number of accounts involved in this count operation.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"MailExportOptions": { +"description": "Options for Gmail exports.", +"id": "MailExportOptions", +"properties": { +"exportFormat": { +"description": "The file format for exported messages.", +"enum": [ +"EXPORT_FORMAT_UNSPECIFIED", +"MBOX", +"PST", +"ICS" +], +"enumDescriptions": [ +"No export format specified.", +"Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", +"Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar.", +"Export as ICS. Only available for Calendar." +], +"type": "string" +}, +"exportLinkedDriveFiles": { +"description": "Optional. To enable exporting linked Drive files, set to **true**.", +"type": "boolean" +}, +"showConfidentialModeContent": { +"description": "To export confidential mode content, set to **true**.", +"type": "boolean" +}, +"useNewExport": { +"description": "To use the new export system, set to **true**.", +"type": "boolean" +} +}, +"type": "object" +}, +"MailOptions": { +"description": "Additional options for Gmail search", +"id": "MailOptions", +"properties": { +"clientSideEncryptedOption": { +"description": "Specifies whether the results should include encrypted content, unencrypted content, or both. Defaults to including both.", +"enum": [ +"CLIENT_SIDE_ENCRYPTED_OPTION_UNSPECIFIED", +"CLIENT_SIDE_ENCRYPTED_OPTION_ANY", +"CLIENT_SIDE_ENCRYPTED_OPTION_ENCRYPTED", +"CLIENT_SIDE_ENCRYPTED_OPTION_UNENCRYPTED" +], +"enumDescriptions": [ +"Encryption status unspecified. Results include both client-side encrypted and non-encrypted content.", +"Include both client-side encrypted and unencrypted content in results.", +"Include client-side encrypted content only.", +"Include unencrypted content only." +], +"type": "string" +}, +"excludeDrafts": { +"description": "Set to **true** to exclude drafts.", +"type": "boolean" +} +}, +"type": "object" +}, +"Matter": { +"description": "Represents a matter. To work with Vault resources, the account must have the [required Vault privileges] (https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege.", +"id": "Matter", +"properties": { +"description": { +"description": "An optional description for the matter.", +"type": "string" +}, +"matterId": { +"description": "The matter ID, which is generated by the server. Leave blank when creating a matter.", +"type": "string" +}, +"matterPermissions": { +"description": "Lists the users and their permission for the matter. Currently there is no programmer defined limit on the number of permissions a matter can have.", +"items": { +"$ref": "MatterPermission" +}, +"type": "array" +}, +"name": { +"description": "The name of the matter.", +"type": "string" +}, +"state": { +"description": "The state of the matter.", +"enum": [ +"STATE_UNSPECIFIED", +"OPEN", +"CLOSED", +"DELETED" +], +"enumDescriptions": [ +"The matter has no specified state.", +"The matter is open.", +"The matter is closed.", +"The matter is deleted." +], +"type": "string" +} +}, +"type": "object" +}, +"MatterPermission": { +"description": "Users can be matter owners or collaborators. Each matter has only one owner. All others users who can access the matter are collaborators. When an account is purged, its corresponding MatterPermission resources cease to exist.", +"id": "MatterPermission", +"properties": { +"accountId": { +"description": "The account ID, as provided by the [Admin SDK](https://developers.google.com/admin-sdk/).", +"type": "string" +}, +"role": { +"description": "The user's role for the matter.", +"enum": [ +"ROLE_UNSPECIFIED", +"COLLABORATOR", +"OWNER" +], +"enumDescriptions": [ +"No role assigned.", +"A collaborator on the matter.", +"The owner of the matter." +], +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OrgUnitInfo": { +"description": "The organizational unit to search", +"id": "OrgUnitInfo", +"properties": { +"orgUnitId": { +"description": "The name of the organizational unit to search, as provided by the [Admin SDK Directory API](https://developers.google.com/admin-sdk/directory/).", +"type": "string" +} +}, +"type": "object" +}, +"Query": { +"description": "The query definition used for search and export.", +"id": "Query", +"properties": { +"accountInfo": { +"$ref": "AccountInfo", +"description": "Required when **SearchMethod** is **ACCOUNT**." +}, +"calendarOptions": { +"$ref": "CalendarOptions", +"description": "Set Calendar search-specific options." +}, +"corpus": { +"description": "The Google Workspace service to search.", +"enum": [ +"CORPUS_TYPE_UNSPECIFIED", +"DRIVE", +"MAIL", +"GROUPS", +"HANGOUTS_CHAT", +"VOICE", +"CALENDAR" +], +"enumDescriptions": [ +"No service specified.", +"Drive, including Meet and Sites.", +"For search, Gmail and classic Hangouts. For holds, Gmail only.", +"Groups.", +"For export, Google Chat only. For holds, Google Chat and classic Hangouts.", +"Google Voice.", +"Calendar." +], +"type": "string" +}, +"dataScope": { +"description": "The data source to search.", +"enum": [ +"DATA_SCOPE_UNSPECIFIED", +"ALL_DATA", +"HELD_DATA", +"UNPROCESSED_DATA" +], +"enumDescriptions": [ +"No data source specified.", +"All available data.", +"Only data on hold.", +"Only data not yet processed by Vault. (Gmail and Groups only)" +], +"type": "string" +}, +"driveOptions": { +"$ref": "DriveOptions", +"description": "Set Drive search-specific options." +}, +"endTime": { +"description": "The end time for the search query. Specify in GMT. The value is rounded to 12 AM on the specified date.", +"format": "google-datetime", +"type": "string" +}, +"hangoutsChatInfo": { +"$ref": "HangoutsChatInfo", +"description": "Required when **SearchMethod** is **ROOM**. (read-only)" +}, +"hangoutsChatOptions": { +"$ref": "HangoutsChatOptions", +"description": "Set Chat search-specific options. (read-only)" +}, +"mailOptions": { +"$ref": "MailOptions", +"description": "Set Gmail search-specific options." +}, +"method": { +"description": "The entity to search. This field replaces **searchMethod** to support shared drives. When **searchMethod** is **TEAM_DRIVE**, the response of this field is **SHARED_DRIVE**.", +"enum": [ +"SEARCH_METHOD_UNSPECIFIED", +"ACCOUNT", +"ORG_UNIT", +"TEAM_DRIVE", +"ENTIRE_ORG", +"ROOM", +"SITES_URL", +"SHARED_DRIVE" +], +"enumDeprecated": [ +false, +false, +false, +true, +false, +false, +false, +false +], +"enumDescriptions": [ +"A search method must be specified or else it is rejected.", +"Search the data of the accounts specified in [AccountInfo](https://developers.google.com/vault/reference/rest/v1/Query#accountinfo).", +"Search the data of all accounts in the organizational unit specified in [OrgUnitInfo](https://developers.google.com/vault/reference/rest/v1/Query#orgunitinfo).", +"Search the data in the Team Drive specified in **team_drive_info**.", +"Search the data of all accounts in the organization. Supported only for Gmail. When specified, you don't need to specify **AccountInfo** or **OrgUnitInfo**.", +"Search messages in the Chat spaces specified in [HangoutsChatInfo](https://developers.google.com/vault/reference/rest/v1/Query#hangoutschatinfo).", +"Search for sites by the published site URLs specified in [SitesUrlInfo](https://developers.google.com/vault/reference/rest/v1/Query#sitesurlinfo).", +"Search the files in the shared drives specified in [SharedDriveInfo](https://developers.google.com/vault/reference/rest/v1/Query#shareddriveinfo)." +], +"type": "string" +}, +"orgUnitInfo": { +"$ref": "OrgUnitInfo", +"description": "Required when **SearchMethod** is **ORG_UNIT**." +}, +"searchMethod": { +"deprecated": true, +"description": "The search method to use.", +"enum": [ +"SEARCH_METHOD_UNSPECIFIED", +"ACCOUNT", +"ORG_UNIT", +"TEAM_DRIVE", +"ENTIRE_ORG", +"ROOM", +"SITES_URL", +"SHARED_DRIVE" +], +"enumDeprecated": [ +false, +false, +false, +true, +false, +false, +false, +false +], +"enumDescriptions": [ +"A search method must be specified or else it is rejected.", +"Search the data of the accounts specified in [AccountInfo](https://developers.google.com/vault/reference/rest/v1/Query#accountinfo).", +"Search the data of all accounts in the organizational unit specified in [OrgUnitInfo](https://developers.google.com/vault/reference/rest/v1/Query#orgunitinfo).", +"Search the data in the Team Drive specified in **team_drive_info**.", +"Search the data of all accounts in the organization. Supported only for Gmail. When specified, you don't need to specify **AccountInfo** or **OrgUnitInfo**.", +"Search messages in the Chat spaces specified in [HangoutsChatInfo](https://developers.google.com/vault/reference/rest/v1/Query#hangoutschatinfo).", +"Search for sites by the published site URLs specified in [SitesUrlInfo](https://developers.google.com/vault/reference/rest/v1/Query#sitesurlinfo).", +"Search the files in the shared drives specified in [SharedDriveInfo](https://developers.google.com/vault/reference/rest/v1/Query#shareddriveinfo)." +], +"type": "string" +}, +"sharedDriveInfo": { +"$ref": "SharedDriveInfo", +"description": "Required when **SearchMethod** is **SHARED_DRIVE**." +}, +"sitesUrlInfo": { +"$ref": "SitesUrlInfo", +"description": "Required when **SearchMethod** is **SITES_URL**." +}, +"startTime": { +"description": "The start time for the search query. Specify in GMT. The value is rounded to 12 AM on the specified date.", +"format": "google-datetime", +"type": "string" +}, +"teamDriveInfo": { +"$ref": "TeamDriveInfo", +"deprecated": true, +"description": "Required when **SearchMethod** is **TEAM_DRIVE**." +}, +"terms": { +"description": "Service-specific [search operators](https://support.google.com/vault/answer/2474474) to filter search results.", +"type": "string" +}, +"timeZone": { +"description": "The time zone name. It should be an IANA TZ name, such as \"America/Los_Angeles\". For a list of time zone names, see [Time Zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For more information about how Vault uses time zones, see [the Vault help center](https://support.google.com/vault/answer/6092995#time).", +"type": "string" +}, +"voiceOptions": { +"$ref": "VoiceOptions", +"description": "Set Voice search-specific options." +} +}, +"type": "object" +}, +"RemoveHeldAccountsRequest": { +"description": "Remove a list of accounts from a hold.", +"id": "RemoveHeldAccountsRequest", +"properties": { +"accountIds": { +"description": "The account IDs of the accounts to remove from the hold.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"RemoveHeldAccountsResponse": { +"description": "Response for batch delete held accounts.", +"id": "RemoveHeldAccountsResponse", +"properties": { +"statuses": { +"description": "A list of statuses for the deleted accounts. Results have the same order as the request.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"RemoveMatterPermissionsRequest": { +"description": "Remove an account as a matter collaborator.", +"id": "RemoveMatterPermissionsRequest", +"properties": { +"accountId": { +"description": "The account ID.", +"type": "string" +} +}, +"type": "object" +}, +"ReopenMatterRequest": { +"description": "Reopen a matter by ID.", +"id": "ReopenMatterRequest", +"properties": {}, +"type": "object" +}, +"ReopenMatterResponse": { +"description": "Response to a ReopenMatterRequest.", +"id": "ReopenMatterResponse", +"properties": { +"matter": { +"$ref": "Matter", +"description": "The updated matter, with state **OPEN**." +} +}, +"type": "object" +}, +"SavedQuery": { +"description": "The definition of a saved query. To work with Vault resources, the account must have the [required Vault privileges](https://support.google.com/vault/answer/2799699) and access to the matter. To access a matter, the account must have created the matter, have the matter shared with them, or have the **View All Matters** privilege.", +"id": "SavedQuery", +"properties": { +"createTime": { +"description": "Output only. The server-generated timestamp when the saved query was created.", +"format": "google-datetime", +"type": "string" +}, +"displayName": { +"description": "The name of the saved query.", +"type": "string" +}, +"matterId": { +"description": "Output only. The matter ID of the matter the saved query is saved in. The server does not use this field during create and always uses matter ID in the URL.", +"type": "string" +}, +"query": { +"$ref": "Query", +"description": "The search parameters of the saved query." +}, +"savedQueryId": { +"description": "A unique identifier for the saved query.", +"type": "string" +} +}, +"type": "object" +}, +"SharedDriveInfo": { +"description": "The shared drives to search", +"id": "SharedDriveInfo", +"properties": { +"sharedDriveIds": { +"description": "A list of shared drive IDs, as provided by the [Drive API](https://developers.google.com/drive).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SitesUrlInfo": { +"description": "The published site URLs of new Google Sites to search", +"id": "SitesUrlInfo", +"properties": { +"urls": { +"description": "A list of published site URLs.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"TeamDriveInfo": { +"deprecated": true, +"description": "Team Drives to search", +"id": "TeamDriveInfo", +"properties": { +"teamDriveIds": { +"deprecated": true, +"description": "List of Team Drive IDs, as provided by the [Drive API](https://developers.google.com/drive).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UndeleteMatterRequest": { +"description": "Undelete a matter by ID.", +"id": "UndeleteMatterRequest", +"properties": {}, +"type": "object" +}, +"UserInfo": { +"description": "User's information.", +"id": "UserInfo", +"properties": { +"displayName": { +"description": "The displayed name of the user.", +"type": "string" +}, +"email": { +"description": "The email address of the user.", +"type": "string" +} +}, +"type": "object" +}, +"VoiceExportOptions": { +"description": "The options for Voice exports.", +"id": "VoiceExportOptions", +"properties": { +"exportFormat": { +"description": "The file format for exported text messages.", +"enum": [ +"EXPORT_FORMAT_UNSPECIFIED", +"MBOX", +"PST", +"ICS" +], +"enumDescriptions": [ +"No export format specified.", +"Export as MBOX. Only available for Gmail, Groups, Hangouts and Voice.", +"Export as PST. Only available for Gmail, Groups, Hangouts, Voice and Calendar.", +"Export as ICS. Only available for Calendar." +], +"type": "string" +} +}, +"type": "object" +}, +"VoiceOptions": { +"description": "Additional options for Voice search", +"id": "VoiceOptions", +"properties": { +"coveredData": { +"description": "Datatypes to search", +"items": { +"enum": [ +"COVERED_DATA_UNSPECIFIED", +"TEXT_MESSAGES", +"VOICEMAILS", +"CALL_LOGS" +], +"enumDescriptions": [ +"Covered data unspecified.", +"Voice text messages.", +"Voicemails and their transcripts.", +"Call logs." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Vault API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vectortile.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vectortile.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..e6c795eca366888679f0d8a8c528061bcc9030c2 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vectortile.v1.json @@ -0,0 +1,907 @@ +{ + "basePath": "", + "baseUrl": "https://vectortile.googleapis.com/", + "batchPath": "batch", + "canonicalName": "Semantic Tile", + "description": "Serves vector tiles containing geospatial data. ", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/maps/contact-sales/", + "fullyEncodeReservedExpansion": true, + "icons": { + "x16": "http://www.google.com/images/icons/product/search-16.gif", + "x32": "http://www.google.com/images/icons/product/search-32.gif" + }, + "id": "vectortile:v1", + "kind": "discovery#restDescription", + "mtlsRootUrl": "https://vectortile.mtls.googleapis.com/", + "name": "vectortile", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "$.xgafv": { + "description": "V1 error format.", + "enum": [ + "1", + "2" + ], + "enumDescriptions": [ + "v1 error format", + "v2 error format" + ], + "location": "query", + "type": "string" + }, + "access_token": { + "description": "OAuth access token.", + "location": "query", + "type": "string" + }, + "alt": { + "default": "json", + "description": "Data format for response.", + "enum": [ + "json", + "media", + "proto" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json", + "Media download with context-dependent Content-Type", + "Responses with Content-Type of application/x-protobuf" + ], + "location": "query", + "type": "string" + }, + "callback": { + "description": "JSONP", + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "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.", + "location": "query", + "type": "string" + }, + "uploadType": { + "description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", + "location": "query", + "type": "string" + }, + "upload_protocol": { + "description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "featuretiles": { + "methods": { + "get": { + "description": "Gets a feature tile by its tile resource name.", + "flatPath": "v1/featuretiles/{featuretilesId}", + "httpMethod": "GET", + "id": "vectortile.featuretiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "alwaysIncludeBuildingFootprints": { + "description": "Flag indicating whether the returned tile will always contain 2.5D footprints for structures. If enabled_modeled_volumes is set, this will mean that structures will have both their 3D models and 2.5D footprints returned.", + "location": "query", + "type": "boolean" + }, + "clientInfo.apiClient": { + "description": "API client name and version. For example, the SDK calling the API. The exact format is up to the client.", + "location": "query", + "type": "string" + }, + "clientInfo.applicationId": { + "description": "Application ID, such as the package name on Android and the bundle identifier on iOS platforms.", + "location": "query", + "type": "string" + }, + "clientInfo.applicationVersion": { + "description": "Application version number, such as \"1.2.3\". The exact format is application-dependent.", + "location": "query", + "type": "string" + }, + "clientInfo.deviceModel": { + "description": "Device model as reported by the device. The exact format is platform-dependent.", + "location": "query", + "type": "string" + }, + "clientInfo.operatingSystem": { + "description": "Operating system name and version as reported by the OS. For example, \"Mac OS X 10.10.4\". The exact format is platform-dependent.", + "location": "query", + "type": "string" + }, + "clientInfo.platform": { + "description": "Platform where the application is running.", + "enum": [ + "PLATFORM_UNSPECIFIED", + "EDITOR", + "MAC_OS", + "WINDOWS", + "LINUX", + "ANDROID", + "IOS", + "WEB_GL" + ], + "enumDescriptions": [ + "Unspecified or unknown OS.", + "Development environment.", + "macOS.", + "Windows.", + "Linux", + "Android", + "iOS", + "WebGL." + ], + "location": "query", + "type": "string" + }, + "clientInfo.userId": { + "description": "Required. A client-generated user ID. The ID should be generated and persisted during the first user session or whenever a pre-existing ID is not found. The exact format is up to the client. This must be non-empty in a GetFeatureTileRequest (whether via the header or GetFeatureTileRequest.client_info).", + "location": "query", + "type": "string" + }, + "clientTileVersionId": { + "description": "Optional version id identifying the tile that is already in the client's cache. This field should be populated with the most recent version_id value returned by the API for the requested tile. If the version id is empty the server always returns a newly rendered tile. If it is provided the server checks if the tile contents would be identical to one that's already on the client, and if so, returns a stripped-down response tile with STATUS_OK_DATA_UNCHANGED instead.", + "location": "query", + "type": "string" + }, + "enableDetailedHighwayTypes": { + "description": "Flag indicating whether detailed highway types should be returned. If this is set, the CONTROLLED_ACCESS_HIGHWAY type may be returned. If not, then these highways will have the generic HIGHWAY type. This exists for backwards compatibility reasons.", + "location": "query", + "type": "boolean" + }, + "enableFeatureNames": { + "description": "Flag indicating whether human-readable names should be returned for features. If this is set, the display_name field on the feature will be filled out.", + "location": "query", + "type": "boolean" + }, + "enableModeledVolumes": { + "description": "Flag indicating whether 3D building models should be enabled. If this is set structures will be returned as 3D modeled volumes rather than 2.5D extruded areas where possible.", + "location": "query", + "type": "boolean" + }, + "enablePoliticalFeatures": { + "description": "Flag indicating whether political features should be returned.", + "location": "query", + "type": "boolean" + }, + "enablePrivateRoads": { + "description": "Flag indicating whether the returned tile will contain road features that are marked private. Private roads are indicated by the Feature.segment_info.road_info.is_private field.", + "location": "query", + "type": "boolean" + }, + "enableUnclippedBuildings": { + "description": "Flag indicating whether unclipped buildings should be returned. If this is set, building render ops will extend beyond the tile boundary. Buildings will only be returned on the tile that contains their centroid.", + "location": "query", + "type": "boolean" + }, + "languageCode": { + "description": "Required. The BCP-47 language code corresponding to the language in which the name was requested, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", + "location": "query", + "type": "string" + }, + "name": { + "description": "Required. Resource name of the tile. The tile resource name is prefixed by its collection ID `tiles/` followed by the resource ID, which encodes the tile's global x and y coordinates and zoom level as `@,,z`. For example, `tiles/@1,2,3z`.", + "location": "path", + "pattern": "^featuretiles/[^/]+$", + "required": true, + "type": "string" + }, + "regionCode": { + "description": "Required. The Unicode country/region code (CLDR) of the location from which the request is coming from, such as \"US\" and \"419\". For more information, see http://www.unicode.org/reports/tr35/#unicode_region_subtag.", + "location": "query", + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "FeatureTile" + } + } + } + }, + "terraintiles": { + "methods": { + "get": { + "description": "Gets a terrain tile by its tile resource name.", + "flatPath": "v1/terraintiles/{terraintilesId}", + "httpMethod": "GET", + "id": "vectortile.terraintiles.get", + "parameterOrder": [ + "name" + ], + "parameters": { + "altitudePrecisionCentimeters": { + "description": "The precision of terrain altitudes in centimeters. Possible values: between 1 (cm level precision) and 1,000,000 (10-kilometer level precision).", + "format": "int32", + "location": "query", + "type": "integer" + }, + "clientInfo.apiClient": { + "description": "API client name and version. For example, the SDK calling the API. The exact format is up to the client.", + "location": "query", + "type": "string" + }, + "clientInfo.applicationId": { + "description": "Application ID, such as the package name on Android and the bundle identifier on iOS platforms.", + "location": "query", + "type": "string" + }, + "clientInfo.applicationVersion": { + "description": "Application version number, such as \"1.2.3\". The exact format is application-dependent.", + "location": "query", + "type": "string" + }, + "clientInfo.deviceModel": { + "description": "Device model as reported by the device. The exact format is platform-dependent.", + "location": "query", + "type": "string" + }, + "clientInfo.operatingSystem": { + "description": "Operating system name and version as reported by the OS. For example, \"Mac OS X 10.10.4\". The exact format is platform-dependent.", + "location": "query", + "type": "string" + }, + "clientInfo.platform": { + "description": "Platform where the application is running.", + "enum": [ + "PLATFORM_UNSPECIFIED", + "EDITOR", + "MAC_OS", + "WINDOWS", + "LINUX", + "ANDROID", + "IOS", + "WEB_GL" + ], + "enumDescriptions": [ + "Unspecified or unknown OS.", + "Development environment.", + "macOS.", + "Windows.", + "Linux", + "Android", + "iOS", + "WebGL." + ], + "location": "query", + "type": "string" + }, + "clientInfo.userId": { + "description": "Required. A client-generated user ID. The ID should be generated and persisted during the first user session or whenever a pre-existing ID is not found. The exact format is up to the client. This must be non-empty in a GetFeatureTileRequest (whether via the header or GetFeatureTileRequest.client_info).", + "location": "query", + "type": "string" + }, + "maxElevationResolutionCells": { + "description": "The maximum allowed resolution for the returned elevation heightmap. Possible values: between 1 and 1024 (and not less than min_elevation_resolution_cells). Over-sized heightmaps will be non-uniformly down-sampled such that each edge is no longer than this value. Non-uniformity is chosen to maximise the amount of preserved data. For example: Original resolution: 100px (width) * 30px (height) max_elevation_resolution: 30 New resolution: 30px (width) * 30px (height)", + "format": "int32", + "location": "query", + "type": "integer" + }, + "minElevationResolutionCells": { + "description": " api-linter: core::0131::request-unknown-fields=disabled aip.dev/not-precedent: Maintaining existing request parameter pattern. The minimum allowed resolution for the returned elevation heightmap. Possible values: between 0 and 1024 (and not more than max_elevation_resolution_cells). Zero is supported for backward compatibility. Under-sized heightmaps will be non-uniformly up-sampled such that each edge is no shorter than this value. Non-uniformity is chosen to maximise the amount of preserved data. For example: Original resolution: 30px (width) * 10px (height) min_elevation_resolution: 30 New resolution: 30px (width) * 30px (height)", + "format": "int32", + "location": "query", + "type": "integer" + }, + "name": { + "description": "Required. Resource name of the tile. The tile resource name is prefixed by its collection ID `terraintiles/` followed by the resource ID, which encodes the tile's global x and y coordinates and zoom level as `@,,z`. For example, `terraintiles/@1,2,3z`.", + "location": "path", + "pattern": "^terraintiles/[^/]+$", + "required": true, + "type": "string" + }, + "terrainFormats": { + "description": "Terrain formats that the client understands.", + "enum": [ + "TERRAIN_FORMAT_UNKNOWN", + "FIRST_DERIVATIVE", + "SECOND_DERIVATIVE" + ], + "enumDescriptions": [ + "An unknown or unspecified terrain format.", + "Terrain elevation data encoded as a FirstDerivativeElevationGrid. .", + "Terrain elevation data encoded as a SecondDerivativeElevationGrid." + ], + "location": "query", + "repeated": true, + "type": "string" + } + }, + "path": "v1/{+name}", + "response": { + "$ref": "TerrainTile" + } + } + } + } + }, + "revision": "20211008", + "rootUrl": "https://vectortile.googleapis.com/", + "schemas": { + "Area": { + "description": "Represents an area. Used to represent regions such as water, parks, etc. Next ID: 10", + "id": "Area", + "properties": { + "basemapZOrder": { + "$ref": "BasemapZOrder", + "description": "The z-order of this geometry when rendered on a flat basemap. Geometry with a lower z-order should be rendered beneath geometry with a higher z-order. This z-ordering does not imply anything about the altitude of the area relative to the ground, but it can be used to prevent z-fighting. Unlike Area.z_order this can be used to compare with Line.basemap_z_order, and in fact may yield more accurate rendering (where a line may be rendered beneath an area)." + }, + "hasExternalEdges": { + "description": "True if the polygon is not entirely internal to the feature that it belongs to: that is, some of the edges are bordering another feature.", + "type": "boolean" + }, + "internalEdges": { + "description": "When has_external_edges is true, the polygon has some edges that border another feature. This field indicates the internal edges that do not border another feature. Each value is an index into the vertices array, and denotes the start vertex of the internal edge (the next vertex in the boundary loop is the end of the edge). If the selected vertex is the last vertex in the boundary loop, then the edge between that vertex and the starting vertex of the loop is internal. This field may be used for styling. For example, building parapets could be placed only on the external edges of a building polygon, or water could be lighter colored near the external edges of a body of water. If has_external_edges is false, all edges are internal and this field will be empty.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "loopBreaks": { + "description": "Identifies the boundary loops of the polygon. Only set for INDEXED_TRIANGLE polygons. Each value is an index into the vertices array indicating the beginning of a loop. For instance, values of [2, 5] would indicate loop_data contained 3 loops with indices 0-1, 2-4, and 5-end. This may be used in conjunction with the internal_edges field for styling polygon boundaries. Note that an edge may be on a polygon boundary but still internal to the feature. For example, a feature split across multiple tiles will have an internal polygon boundary edge along the edge of the tile.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "triangleIndices": { + "description": "When the polygon encoding is of type INDEXED_TRIANGLES, this contains the indices of the triangle vertices in the vertex_offsets field. There are 3 vertex indices per triangle.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "type": { + "description": "The polygon encoding type used for this area.", + "enum": [ + "TRIANGLE_FAN", + "INDEXED_TRIANGLES", + "TRIANGLE_STRIP" + ], + "enumDescriptions": [ + "The first vertex in vertex_offset is the center of a triangle fan. The other vertices are arranged around this vertex in a fan shape. The following diagram showes a triangle fan polygon with the vertices labelled with their indices in the vertex_offset list. Triangle fan polygons always have a single boundary loop. Vertices may be in either a clockwise or counterclockwise order. (1) / \\ / \\ / \\ (0)-----(2) / \\ / / \\ / / \\ / (4)-----(3)", + "The polygon is a set of triangles with three vertex indices per triangle. The vertex indices can be found in the triangle_indices field. Indexed triangle polygons also contain information about boundary loops. These identify the loops at the boundary of the polygon and may be used in conjunction with the internal_edges field for styling. Boundary loops may represent either a hole or a disconnected component of the polygon. The following diagram shows an indexed triangle polygon with two boundary loops. (0) (4) / \\ / \\ / \\ / \\ (1)----(2) (3)----(5)", + "A strip of triangles, where each triangle uses the last edge of the previous triangle. Vertices may be in either a clockwise or counterclockwise order. Only polygons without the has_external_edges flag set will use triangle strips. (0) / \\ / \\ / \\ (2)-----(1) / \\ / / \\ / / \\ / (4)-----(3)" + ], + "type": "string" + }, + "vertexOffsets": { + "$ref": "Vertex2DList", + "description": "The vertices present in the polygon defining the area." + }, + "zOrder": { + "description": "The z-ordering of this area. Areas with a lower z-order should be rendered beneath areas with a higher z-order. This z-ordering does not imply anything about the altitude of the line relative to the ground, but it can be used to prevent z-fighting during rendering on the client. This z-ordering can only be used to compare areas, and cannot be compared with the z_order field in the Line message. The z-order may be negative or zero. Prefer Area.basemap_z_order.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "BasemapZOrder": { + "description": "Metadata necessary to determine the ordering of a particular basemap element relative to others. To render the basemap correctly, sort by z-plane, then z-grade, then z-within-grade.", + "id": "BasemapZOrder", + "properties": { + "zGrade": { + "description": "The second most significant component of the ordering of a component to be rendered onto the basemap.", + "format": "int32", + "type": "integer" + }, + "zPlane": { + "description": "The most significant component of the ordering of a component to be rendered onto the basemap.", + "format": "int32", + "type": "integer" + }, + "zWithinGrade": { + "description": "The least significant component of the ordering of a component to be rendered onto the basemap.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ExtrudedArea": { + "description": "Represents a height-extruded area: a 3D prism with a constant X-Y plane cross section. Used to represent extruded buildings. A single building may consist of several extruded areas. The min_z and max_z fields are scaled to the size of the tile. An extruded area with a max_z value of 4096 has the same height as the width of the tile that it is on.", + "id": "ExtrudedArea", + "properties": { + "area": { + "$ref": "Area", + "description": "The area representing the footprint of the extruded area." + }, + "maxZ": { + "description": "The z-value in local tile coordinates where the extruded area ends.", + "format": "int32", + "type": "integer" + }, + "minZ": { + "description": "The z-value in local tile coordinates where the extruded area begins. This is non-zero for extruded areas that begin off the ground. For example, a building with a skybridge may have an extruded area component with a non-zero min_z.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "Feature": { + "description": "A feature representing a single geographic entity.", + "id": "Feature", + "properties": { + "displayName": { + "description": "The localized name of this feature. Currently only returned for roads.", + "type": "string" + }, + "geometry": { + "$ref": "Geometry", + "description": "The geometry of this feature, representing the space that it occupies in the world." + }, + "placeId": { + "description": "Place ID of this feature, suitable for use in Places API details requests.", + "type": "string" + }, + "relations": { + "description": "Relations to other features.", + "items": { + "$ref": "Relation" + }, + "type": "array" + }, + "segmentInfo": { + "$ref": "SegmentInfo", + "description": "Metadata for features with the SEGMENT FeatureType." + }, + "type": { + "description": "The type of this feature.", + "enum": [ + "FEATURE_TYPE_UNSPECIFIED", + "STRUCTURE", + "BAR", + "BANK", + "LODGING", + "CAFE", + "RESTAURANT", + "EVENT_VENUE", + "TOURIST_DESTINATION", + "SHOPPING", + "SCHOOL", + "SEGMENT", + "ROAD", + "LOCAL_ROAD", + "ARTERIAL_ROAD", + "HIGHWAY", + "CONTROLLED_ACCESS_HIGHWAY", + "FOOTPATH", + "RAIL", + "FERRY", + "REGION", + "PARK", + "BEACH", + "FOREST", + "POLITICAL", + "ADMINISTRATIVE_AREA1", + "LOCALITY", + "SUBLOCALITY", + "WATER" + ], + "enumDescriptions": [ + "Unknown feature type.", + "Structures such as buildings and bridges.", + "A business serving alcoholic drinks to be consumed onsite.", + "A financial institution that offers services to the general public.", + "A place that provides any type of lodging for travelers.", + "A business that sells coffee, tea, and sometimes small meals.", + "A business that prepares meals on-site for service to customers.", + "A venue for private and public events.", + "Place of interest to tourists, typically for natural or cultural value.", + "A structure containing a business or businesses that sell goods.", + "Institution where young people receive general (not vocation or professional) education.", + "Segments such as roads and train lines.", + "A way leading from one place to another intended for use by vehicles.", + "A small city street, typically for travel in a residential neighborhood.", + "Major through road that's expected to carry large volumes of traffic.", + "A major road including freeways and state highways.", + "A highway with grade-separated crossings that is accessed exclusively by ramps. These are usually called \"freeways\" or \"motorways\". The enable_detailed_highway_types request flag must be set in order for this type to be returned.", + "A path that's primarily intended for use by pedestrians and/or cyclists.", + "Tracks intended for use by trains.", + "Services which are part of the road network but are not roads.", + "Non-water areas such as parks and forest.", + "Outdoor areas such as parks and botanical gardens.", + "A pebbly or sandy shore along the edge of a sea or lake.", + "Area of land covered by trees.", + "Political entities, such as provinces and districts.", + "Top-level divisions within a country, such as prefectures or states.", + "Cities, towns, and other municipalities.", + "Divisions within a locality like a borough or ward.", + "Water features such as rivers and lakes." + ], + "type": "string" + } + }, + "type": "object" + }, + "FeatureTile": { + "description": "A tile containing information about the map features located in the region it covers.", + "id": "FeatureTile", + "properties": { + "coordinates": { + "$ref": "TileCoordinates", + "description": "The global tile coordinates that uniquely identify this tile." + }, + "features": { + "description": "Features present on this map tile.", + "items": { + "$ref": "Feature" + }, + "type": "array" + }, + "name": { + "description": "Resource name of the tile. The tile resource name is prefixed by its collection ID `tiles/` followed by the resource ID, which encodes the tile's global x and y coordinates and zoom level as `@,,z`. For example, `tiles/@1,2,3z`.", + "type": "string" + }, + "providers": { + "description": "Data providers for the data contained in this tile.", + "items": { + "$ref": "ProviderInfo" + }, + "type": "array" + }, + "status": { + "description": "Tile response status code to support tile caching.", + "enum": [ + "STATUS_OK", + "STATUS_OK_DATA_UNCHANGED" + ], + "enumDescriptions": [ + "Everything worked out OK. The cache-control header determines how long this Tile response may be cached by the client. See also version_id and STATUS_OK_DATA_UNCHANGED.", + "Indicates that the request was processed successfully and that the tile data that would have been returned are identical to the data already in the client's cache, as specified by the value of client_tile_version_id contained in GetFeatureTileRequest. In particular, the tile's features and providers will not be populated when the tile data is identical. However, the cache-control header and version_id can still change even when the tile contents itself does not, so clients should always use the most recent values returned by the API." + ], + "type": "string" + }, + "versionId": { + "description": "An opaque value, usually less than 30 characters, that contains version info about this tile and the data that was used to generate it. The client should store this value in its tile cache and pass it back to the API in the client_tile_version_id field of subsequent tile requests in order to enable the API to detect when the new tile would be the same as the one the client already has in its cache. Also see STATUS_OK_DATA_UNCHANGED.", + "type": "string" + } + }, + "type": "object" + }, + "FirstDerivativeElevationGrid": { + "description": "A packed representation of a 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. Elevations provided are (generally) relative to the EGM96 geoid, however some areas will be relative to NAVD88. EGM96 and NAVD88 are off by no more than 2 meters. The grid is oriented north-west to south-east, as illustrated: rows[0].a[0] rows[0].a[m] +-----------------+ | | | N | | ^ | | | | | W <-----> E | | | | | v | | S | | | +-----------------+ rows[n].a[0] rows[n].a[m] Rather than storing the altitudes directly, we store the diffs between them as integers at some requested level of precision to take advantage of integer packing. The actual altitude values a[] can be reconstructed using the scale and each row's first_altitude and altitude_diff fields. More details in go/elevation-encoding-options-for-enduro under \"Recommended implementation\".", + "id": "FirstDerivativeElevationGrid", + "properties": { + "altitudeMultiplier": { + "description": "A multiplier applied to the altitude fields below to extract the actual altitudes in meters from the elevation grid.", + "format": "float", + "type": "number" + }, + "rows": { + "description": "Rows of points containing altitude data making up the elevation grid. Each row is the same length. Rows are ordered from north to south. E.g: rows[0] is the north-most row, and rows[n] is the south-most row.", + "items": { + "$ref": "Row" + }, + "type": "array" + } + }, + "type": "object" + }, + "Geometry": { + "description": "Represents the geometry of a feature, that is, the shape that it has on the map. The local tile coordinate system has the origin at the north-west (upper-left) corner of the tile, and is scaled to 4096 units across each edge. The height (Z) axis has the same scale factor: an extruded area with a max_z value of 4096 has the same height as the width of the tile that it is on. There is no clipping boundary, so it is possible that some coordinates will lie outside the tile boundaries.", + "id": "Geometry", + "properties": { + "areas": { + "description": "The areas present in this geometry.", + "items": { + "$ref": "Area" + }, + "type": "array" + }, + "extrudedAreas": { + "description": "The extruded areas present in this geometry. Not populated if modeled_volumes are included in this geometry unless always_include_building_footprints is set in GetFeatureTileRequest, in which case the client should decide which (extruded areas or modeled volumes) should be used (they should not be rendered together).", + "items": { + "$ref": "ExtrudedArea" + }, + "type": "array" + }, + "lines": { + "description": "The lines present in this geometry.", + "items": { + "$ref": "Line" + }, + "type": "array" + }, + "modeledVolumes": { + "description": "The modeled volumes present in this geometry. Not populated unless enable_modeled_volumes has been set in GetFeatureTileRequest.", + "items": { + "$ref": "ModeledVolume" + }, + "type": "array" + } + }, + "type": "object" + }, + "Line": { + "description": "Represents a 2D polyline. Used to represent segments such as roads, train tracks, etc.", + "id": "Line", + "properties": { + "basemapZOrder": { + "$ref": "BasemapZOrder", + "description": "The z-order of this geometry when rendered on a flat basemap. Geometry with a lower z-order should be rendered beneath geometry with a higher z-order. This z-ordering does not imply anything about the altitude of the area relative to the ground, but it can be used to prevent z-fighting. Unlike Line.z_order this can be used to compare with Area.basemap_z_order, and in fact may yield more accurate rendering (where a line may be rendered beneath an area)." + }, + "vertexOffsets": { + "$ref": "Vertex2DList", + "description": "The vertices present in the polyline." + }, + "zOrder": { + "description": "The z-order of the line. Lines with a lower z-order should be rendered beneath lines with a higher z-order. This z-ordering does not imply anything about the altitude of the area relative to the ground, but it can be used to prevent z-fighting during rendering on the client. In general, larger and more important road features will have a higher z-order line associated with them. This z-ordering can only be used to compare lines, and cannot be compared with the z_order field in the Area message. The z-order may be negative or zero. Prefer Line.basemap_z_order.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "ModeledVolume": { + "description": "Represents a modeled volume in 3D space. Used to represent 3D buildings.", + "id": "ModeledVolume", + "properties": { + "strips": { + "description": "The triangle strips present in this mesh.", + "items": { + "$ref": "TriangleStrip" + }, + "type": "array" + }, + "vertexOffsets": { + "$ref": "Vertex3DList", + "description": "The vertices present in the mesh defining the modeled volume." + } + }, + "type": "object" + }, + "ProviderInfo": { + "description": "Information about the data providers that should be included in the attribution string shown by the client.", + "id": "ProviderInfo", + "properties": { + "description": { + "description": "Attribution string for this provider. This string is not localized.", + "type": "string" + } + }, + "type": "object" + }, + "Relation": { + "description": "Represents a relation to another feature in the tile. For example, a building might be occupied by a given POI. The related feature can be retrieved using the related feature index.", + "id": "Relation", + "properties": { + "relatedFeatureIndex": { + "description": "Zero-based index to look up the related feature from the list of features in the tile.", + "format": "int32", + "type": "integer" + }, + "relationType": { + "description": "Relation type between the origin feature to the related feature.", + "enum": [ + "RELATION_TYPE_UNSPECIFIED", + "OCCUPIES", + "PRIMARILY_OCCUPIED_BY" + ], + "enumDescriptions": [ + "Unspecified relation type. Should never happen.", + "The origin feature occupies the related feature.", + "The origin feature is primarily occupied by the related feature." + ], + "type": "string" + } + }, + "type": "object" + }, + "RoadInfo": { + "description": "Extra metadata relating to roads.", + "id": "RoadInfo", + "properties": { + "isPrivate": { + "description": "Road has signage discouraging or prohibiting use by the general public. E.g., roads with signs that say \"Private\", or \"No trespassing.\"", + "type": "boolean" + } + }, + "type": "object" + }, + "Row": { + "description": "A row of altitude points in the elevation grid, ordered from west to east.", + "id": "Row", + "properties": { + "altitudeDiffs": { + "description": "The difference between each successive pair of altitudes, from west to east. The first, westmost point, is just the altitude rather than a diff. The units are specified by the altitude_multiplier parameter above; the value in meters is given by altitude_multiplier * altitude_diffs[n]. The altitude row (in metres above sea level) can be reconstructed with: a[0] = altitude_diffs[0] * altitude_multiplier when n > 0, a[n] = a[n-1] + altitude_diffs[n-1] * altitude_multiplier.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + }, + "SecondDerivativeElevationGrid": { + "description": "A packed representation of a 2D grid of uniformly spaced points containing elevation data. Each point within the grid represents the altitude in meters above average sea level at that location within the tile. Elevations provided are (generally) relative to the EGM96 geoid, however some areas will be relative to NAVD88. EGM96 and NAVD88 are off by no more than 2 meters. The grid is oriented north-west to south-east, as illustrated: rows[0].a[0] rows[0].a[m] +-----------------+ | | | N | | ^ | | | | | W <-----> E | | | | | v | | S | | | +-----------------+ rows[n].a[0] rows[n].a[m] Rather than storing the altitudes directly, we store the diffs of the diffs between them as integers at some requested level of precision to take advantage of integer packing. Note that the data is packed in such a way that is fast to decode in Unity and that further optimizes wire size.", + "id": "SecondDerivativeElevationGrid", + "properties": { + "altitudeMultiplier": { + "description": "A multiplier applied to the elements in the encoded data to extract the actual altitudes in meters.", + "format": "float", + "type": "number" + }, + "columnCount": { + "description": "The number of columns included in the encoded elevation data (i.e. the horizontal resolution of the grid).", + "format": "int32", + "type": "integer" + }, + "encodedData": { + "description": "A stream of elements each representing a point on the tile running across each row from left to right, top to bottom. There will be precisely horizontal_resolution * vertical_resolution elements in the stream. The elements are not the heights, rather the second order derivative of the values one would expect in a stream of height data. Each element is a varint with the following encoding: ------------------------------------------------------------------------| | Head Nibble | ------------------------------------------------------------------------| | Bit 0 | Bit 1 | Bits 2-3 | | Terminator| Sign (1=neg) | Least significant 2 bits of absolute error | ------------------------------------------------------------------------| | Tail Nibble #1 | ------------------------------------------------------------------------| | Bit 0 | Bit 1-3 | | Terminator| Least significant 3 bits of absolute error | ------------------------------------------------------------------------| | ... | Tail Nibble #n | ------------------------------------------------------------------------| | Bit 0 | Bit 1-3 | | Terminator| Least significant 3 bits of absolute error | ------------------------------------------------------------------------|", + "format": "byte", + "type": "string" + }, + "rowCount": { + "description": "The number of rows included in the encoded elevation data (i.e. the vertical resolution of the grid).", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SegmentInfo": { + "description": "Extra metadata relating to segments.", + "id": "SegmentInfo", + "properties": { + "roadInfo": { + "$ref": "RoadInfo", + "description": "Metadata for features with the ROAD FeatureType." + } + }, + "type": "object" + }, + "TerrainTile": { + "description": "A tile containing information about the terrain located in the region it covers.", + "id": "TerrainTile", + "properties": { + "coordinates": { + "$ref": "TileCoordinates", + "description": "The global tile coordinates that uniquely identify this tile." + }, + "firstDerivative": { + "$ref": "FirstDerivativeElevationGrid", + "description": "Terrain elevation data encoded as a FirstDerivativeElevationGrid. cs/symbol:FirstDerivativeElevationGrid." + }, + "name": { + "description": "Resource name of the tile. The tile resource name is prefixed by its collection ID `terrain/` followed by the resource ID, which encodes the tile's global x and y coordinates and zoom level as `@,,z`. For example, `terrain/@1,2,3z`.", + "type": "string" + }, + "secondDerivative": { + "$ref": "SecondDerivativeElevationGrid", + "description": "Terrain elevation data encoded as a SecondDerivativeElevationGrid. cs/symbol:SecondDerivativeElevationGrid. See go/byte-encoded-terrain for more details." + } + }, + "type": "object" + }, + "TileCoordinates": { + "description": "Global tile coordinates. Global tile coordinates reference a specific tile on the map at a specific zoom level. The origin of this coordinate system is always at the northwest corner of the map, with x values increasing from west to east and y values increasing from north to south. Tiles are indexed using x, y coordinates from that origin. The zoom level containing the entire world in a tile is 0, and it increases as you zoom in. Zoom level n + 1 will contain 4 times as many tiles as zoom level n. The zoom level controls the level of detail of the data that is returned. In particular, this affects the set of feature types returned, their density, and geometry simplification. The exact tile contents may change over time, but care will be taken to keep supporting the most important use cases. For example, zoom level 15 shows roads for orientation and planning in the local neighborhood and zoom level 17 shows buildings to give users on foot a sense of situational awareness.", + "id": "TileCoordinates", + "properties": { + "x": { + "description": "Required. The x coordinate.", + "format": "int32", + "type": "integer" + }, + "y": { + "description": "Required. The y coordinate.", + "format": "int32", + "type": "integer" + }, + "zoom": { + "description": "Required. The Google Maps API zoom level.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "TriangleStrip": { + "description": "Represents a strip of triangles. Each triangle uses the last edge of the previous one. The following diagram shows an example of a triangle strip, with each vertex labeled with its index in the vertex_index array. (1)-----(3) / \\ / \\ / \\ / \\ / \\ / \\ (0)-----(2)-----(4) Vertices may be in either clockwise or counter-clockwise order.", + "id": "TriangleStrip", + "properties": { + "vertexIndices": { + "description": "Index into the vertex_offset array representing the next vertex in the triangle strip.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + }, + "Vertex2DList": { + "description": "2D vertex list used for lines and areas. Each entry represents an offset from the previous one in local tile coordinates. The first entry is offset from (0, 0). For example, the list of vertices [(1,1), (2, 2), (1, 2)] would be encoded in vertex offsets as [(1, 1), (1, 1), (-1, 0)].", + "id": "Vertex2DList", + "properties": { + "xOffsets": { + "description": "List of x-offsets in local tile coordinates.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "yOffsets": { + "description": "List of y-offsets in local tile coordinates.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + }, + "Vertex3DList": { + "description": "3D vertex list used for modeled volumes. Each entry represents an offset from the previous one in local tile coordinates. The first coordinate is offset from (0, 0, 0).", + "id": "Vertex3DList", + "properties": { + "xOffsets": { + "description": "List of x-offsets in local tile coordinates.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "yOffsets": { + "description": "List of y-offsets in local tile coordinates.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + }, + "zOffsets": { + "description": "List of z-offsets in local tile coordinates.", + "items": { + "format": "int32", + "type": "integer" + }, + "type": "array" + } + }, + "type": "object" + } + }, + "servicePath": "", + "title": "Semantic Tile API", + "version": "v1", + "version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/verifiedaccess.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/verifiedaccess.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..8b6c302de032824ad058f3b121cd079d6e95673d --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/verifiedaccess.v1.json @@ -0,0 +1,238 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/verifiedaccess": { +"description": "Verify your enterprise credentials" +} +} +} +}, +"basePath": "", +"baseUrl": "https://verifiedaccess.googleapis.com/", +"batchPath": "batch", +"canonicalName": "verifiedaccess", +"description": "API for Verified Access chrome extension to provide credential verification for chrome devices connecting to an enterprise network", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/chrome/verified-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "verifiedaccess:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://verifiedaccess.mtls.googleapis.com/", +"name": "verifiedaccess", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"challenge": { +"methods": { +"create": { +"description": "CreateChallenge API", +"flatPath": "v1/challenge", +"httpMethod": "POST", +"id": "verifiedaccess.challenge.create", +"parameterOrder": [], +"parameters": {}, +"path": "v1/challenge", +"request": { +"$ref": "Empty" +}, +"response": { +"$ref": "Challenge" +}, +"scopes": [ +"https://www.googleapis.com/auth/verifiedaccess" +] +}, +"verify": { +"description": "VerifyChallengeResponse API", +"flatPath": "v1/challenge:verify", +"httpMethod": "POST", +"id": "verifiedaccess.challenge.verify", +"parameterOrder": [], +"parameters": {}, +"path": "v1/challenge:verify", +"request": { +"$ref": "VerifyChallengeResponseRequest" +}, +"response": { +"$ref": "VerifyChallengeResponseResult" +}, +"scopes": [ +"https://www.googleapis.com/auth/verifiedaccess" +] +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://verifiedaccess.googleapis.com/", +"schemas": { +"Challenge": { +"description": "Result message for VerifiedAccess.CreateChallenge.", +"id": "Challenge", +"properties": { +"alternativeChallenge": { +"$ref": "SignedData", +"description": "Challenge generated with the old signing key (this will only be present during key rotation)" +}, +"challenge": { +"$ref": "SignedData", +"description": "Generated challenge" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"SignedData": { +"description": "The wrapper message of any data and its signature.", +"id": "SignedData", +"properties": { +"data": { +"description": "The data to be signed.", +"format": "byte", +"type": "string" +}, +"signature": { +"description": "The signature of the data field.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"VerifyChallengeResponseRequest": { +"description": "signed ChallengeResponse", +"id": "VerifyChallengeResponseRequest", +"properties": { +"challengeResponse": { +"$ref": "SignedData", +"description": "The generated response to the challenge" +}, +"expectedIdentity": { +"description": "Service can optionally provide identity information about the device or user associated with the key. For an EMK, this value is the enrolled domain. For an EUK, this value is the user's email address. If present, this value will be checked against contents of the response, and verification will fail if there is no match.", +"type": "string" +} +}, +"type": "object" +}, +"VerifyChallengeResponseResult": { +"description": "Result message for VerifiedAccess.VerifyChallengeResponse.", +"id": "VerifyChallengeResponseResult", +"properties": { +"attestedDeviceId": { +"description": "Attested device id (ADID) of the device, read from the verified data.", +"type": "string" +}, +"deviceEnrollmentId": { +"description": "Device enrollment id is returned in this field (for the machine response only).", +"type": "string" +}, +"devicePermanentId": { +"description": "Device permanent id is returned in this field (for the machine response only).", +"type": "string" +}, +"signedPublicKeyAndChallenge": { +"description": "Certificate Signing Request (in the SPKAC format, base64 encoded) is returned in this field. This field will be set only if device has included CSR in its challenge response. (the option to include CSR is now available for both user and machine responses)", +"type": "string" +}, +"verificationOutput": { +"deprecated": true, +"description": "For EMCert check, device permanent id is returned here. For EUCert check, signed_public_key_and_challenge [base64 encoded] is returned if present, otherwise empty string is returned. This field is deprecated, please use device_permanent_id or signed_public_key_and_challenge fields.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Chrome Verified Access API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/verifiedaccess.v2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/verifiedaccess.v2.json new file mode 100644 index 0000000000000000000000000000000000000000..7e1b0aacb9c52057f0eacf8525f953e6f5235621 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/verifiedaccess.v2.json @@ -0,0 +1,556 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/verifiedaccess": { +"description": "Verify your enterprise credentials" +} +} +} +}, +"basePath": "", +"baseUrl": "https://verifiedaccess.googleapis.com/", +"batchPath": "batch", +"canonicalName": "verifiedaccess", +"description": "API for Verified Access chrome extension to provide credential verification for chrome devices connecting to an enterprise network", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/chrome/verified-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "verifiedaccess:v2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://verifiedaccess.mtls.googleapis.com/", +"name": "verifiedaccess", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"challenge": { +"methods": { +"generate": { +"description": "Generates a new challenge.", +"flatPath": "v2/challenge:generate", +"httpMethod": "POST", +"id": "verifiedaccess.challenge.generate", +"parameterOrder": [], +"parameters": {}, +"path": "v2/challenge:generate", +"request": { +"$ref": "Empty" +}, +"response": { +"$ref": "Challenge" +}, +"scopes": [ +"https://www.googleapis.com/auth/verifiedaccess" +] +}, +"verify": { +"description": "Verifies the challenge response.", +"flatPath": "v2/challenge:verify", +"httpMethod": "POST", +"id": "verifiedaccess.challenge.verify", +"parameterOrder": [], +"parameters": {}, +"path": "v2/challenge:verify", +"request": { +"$ref": "VerifyChallengeResponseRequest" +}, +"response": { +"$ref": "VerifyChallengeResponseResult" +}, +"scopes": [ +"https://www.googleapis.com/auth/verifiedaccess" +] +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://verifiedaccess.googleapis.com/", +"schemas": { +"Challenge": { +"description": "Result message for VerifiedAccess.GenerateChallenge.", +"id": "Challenge", +"properties": { +"challenge": { +"description": "Generated challenge, the bytes representation of SignedData.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"CrowdStrikeAgent": { +"description": "Properties of the CrowdStrike agent installed on a device.", +"id": "CrowdStrikeAgent", +"properties": { +"agentId": { +"description": "The Agent ID of the Crowdstrike agent.", +"type": "string" +}, +"customerId": { +"description": "The Customer ID to which the agent belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"DeviceSignals": { +"description": "The device signals as reported by Chrome. Unless otherwise specified, signals are available on all platforms.", +"id": "DeviceSignals", +"properties": { +"allowScreenLock": { +"description": "Value of the AllowScreenLock policy on the device. See https://chromeenterprise.google/policies/?policy=AllowScreenLock for more details. Available on ChromeOS only.", +"type": "boolean" +}, +"browserVersion": { +"description": "Current version of the Chrome browser which generated this set of signals. Example value: \"107.0.5286.0\".", +"type": "string" +}, +"builtInDnsClientEnabled": { +"description": "Whether Chrome's built-in DNS client is used. The OS DNS client is otherwise used. This value may be controlled by an enterprise policy: https://chromeenterprise.google/policies/#BuiltInDnsClientEnabled.", +"type": "boolean" +}, +"chromeRemoteDesktopAppBlocked": { +"description": "Whether access to the Chrome Remote Desktop application is blocked via a policy.", +"type": "boolean" +}, +"crowdStrikeAgent": { +"$ref": "CrowdStrikeAgent", +"description": "Crowdstrike agent properties installed on the device, if any. Available on Windows and MacOS only." +}, +"deviceAffiliationIds": { +"description": "Affiliation IDs of the organizations that are affiliated with the organization that is currently managing the device. When the sets of device and profile affiliation IDs overlap, it means that the organizations managing the device and user are affiliated. To learn more about user affiliation, visit https://support.google.com/chrome/a/answer/12801245?ref_topic=9027936.", +"items": { +"type": "string" +}, +"type": "array" +}, +"deviceEnrollmentDomain": { +"description": "Enrollment domain of the customer which is currently managing the device.", +"type": "string" +}, +"deviceManufacturer": { +"description": "The name of the device's manufacturer.", +"type": "string" +}, +"deviceModel": { +"description": "The name of the device's model.", +"type": "string" +}, +"diskEncryption": { +"description": "The encryption state of the disk. On ChromeOS, the main disk is always ENCRYPTED.", +"enum": [ +"DISK_ENCRYPTION_UNSPECIFIED", +"DISK_ENCRYPTION_UNKNOWN", +"DISK_ENCRYPTION_DISABLED", +"DISK_ENCRYPTION_ENCRYPTED" +], +"enumDescriptions": [ +"Unspecified.", +"Chrome could not evaluate the encryption state.", +"The main disk is not encrypted.", +"The main disk is encrypted." +], +"type": "string" +}, +"displayName": { +"description": "The display name of the device, as defined by the user.", +"type": "string" +}, +"hostname": { +"description": "Hostname of the device.", +"type": "string" +}, +"imei": { +"description": "International Mobile Equipment Identity (IMEI) of the device. Available on ChromeOS only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"macAddresses": { +"description": "MAC addresses of the device.", +"items": { +"type": "string" +}, +"type": "array" +}, +"meid": { +"description": "Mobile Equipment Identifier (MEID) of the device. Available on ChromeOS only.", +"items": { +"type": "string" +}, +"type": "array" +}, +"operatingSystem": { +"description": "The type of the Operating System currently running on the device.", +"enum": [ +"OPERATING_SYSTEM_UNSPECIFIED", +"CHROME_OS", +"CHROMIUM_OS", +"WINDOWS", +"MAC_OS_X", +"LINUX" +], +"enumDescriptions": [ +"UNSPECIFIED.", +"ChromeOS.", +"ChromiumOS.", +"Windows.", +"Mac Os X.", +"Linux" +], +"type": "string" +}, +"osFirewall": { +"description": "The state of the OS level firewall. On ChromeOS, the value will always be ENABLED on regular devices and UNKNOWN on devices in developer mode.", +"enum": [ +"OS_FIREWALL_UNSPECIFIED", +"OS_FIREWALL_UNKNOWN", +"OS_FIREWALL_DISABLED", +"OS_FIREWALL_ENABLED" +], +"enumDescriptions": [ +"Unspecified.", +"Chrome could not evaluate the OS firewall state.", +"The OS firewall is disabled.", +"The OS firewall is enabled." +], +"type": "string" +}, +"osVersion": { +"description": "The current version of the Operating System. On Windows and linux, the value will also include the security patch information.", +"type": "string" +}, +"passwordProtectionWarningTrigger": { +"description": "Whether the Password Protection Warning feature is enabled or not. Password protection alerts users when they reuse their protected password on potentially suspicious sites. This setting is controlled by an enterprise policy: https://chromeenterprise.google/policies/#PasswordProtectionWarningTrigger. Note that the policy unset does not have the same effects as having the policy explicitly set to `PASSWORD_PROTECTION_OFF`.", +"enum": [ +"PASSWORD_PROTECTION_WARNING_TRIGGER_UNSPECIFIED", +"POLICY_UNSET", +"PASSWORD_PROTECTION_OFF", +"PASSWORD_REUSE", +"PHISHING_REUSE" +], +"enumDescriptions": [ +"Unspecified.", +"The policy is not set.", +"No password protection warning will be shown.", +"Password protection warning is shown if a protected password is re-used.", +"Password protection warning is shown if a protected password is re-used on a known phishing website." +], +"type": "string" +}, +"profileAffiliationIds": { +"description": "Affiliation IDs of the organizations that are affiliated with the organization that is currently managing the Chrome Profile\u2019s user or ChromeOS user.", +"items": { +"type": "string" +}, +"type": "array" +}, +"profileEnrollmentDomain": { +"description": "Enrollment domain of the customer which is currently managing the profile.", +"type": "string" +}, +"realtimeUrlCheckMode": { +"description": "Whether Enterprise-grade (i.e. custom) unsafe URL scanning is enabled or not. This setting may be controlled by an enterprise policy: https://chromeenterprise.google/policies/#EnterpriseRealTimeUrlCheckMode", +"enum": [ +"REALTIME_URL_CHECK_MODE_UNSPECIFIED", +"REALTIME_URL_CHECK_MODE_DISABLED", +"REALTIME_URL_CHECK_MODE_ENABLED_MAIN_FRAME" +], +"enumDescriptions": [ +"Unspecified.", +"Disabled. Consumer Safe Browsing checks are applied.", +"Realtime check for main frame URLs is enabled." +], +"type": "string" +}, +"safeBrowsingProtectionLevel": { +"description": "Safe Browsing Protection Level. That setting may be controlled by an enterprise policy: https://chromeenterprise.google/policies/#SafeBrowsingProtectionLevel.", +"enum": [ +"SAFE_BROWSING_PROTECTION_LEVEL_UNSPECIFIED", +"INACTIVE", +"STANDARD", +"ENHANCED" +], +"enumDescriptions": [ +"Unspecified.", +"Safe Browsing is disabled.", +"Safe Browsing is active in the standard mode.", +"Safe Browsing is active in the enhanced mode." +], +"type": "string" +}, +"screenLockSecured": { +"description": "The state of the Screen Lock password protection. On ChromeOS, this value will always be ENABLED as there is not way to disable requiring a password or pin when unlocking the device.", +"enum": [ +"SCREEN_LOCK_SECURED_UNSPECIFIED", +"SCREEN_LOCK_SECURED_UNKNOWN", +"SCREEN_LOCK_SECURED_DISABLED", +"SCREEN_LOCK_SECURED_ENABLED" +], +"enumDescriptions": [ +"Unspecified.", +"Chrome could not evaluate the state of the Screen Lock mechanism.", +"The Screen Lock is not password-protected.", +"The Screen Lock is password-protected." +], +"type": "string" +}, +"secureBootMode": { +"description": "Whether the device's startup software has its Secure Boot feature enabled. Available on Windows only.", +"enum": [ +"SECURE_BOOT_MODE_UNSPECIFIED", +"SECURE_BOOT_MODE_UNKNOWN", +"SECURE_BOOT_MODE_DISABLED", +"SECURE_BOOT_MODE_ENABLED" +], +"enumDescriptions": [ +"Unspecified.", +"Chrome was unable to determine the Secure Boot mode.", +"Secure Boot was disabled on the startup software.", +"Secure Boot was enabled on the startup software." +], +"type": "string" +}, +"serialNumber": { +"description": "The serial number of the device. On Windows, this represents the BIOS's serial number. Not available on most Linux distributions.", +"type": "string" +}, +"siteIsolationEnabled": { +"description": "Whether the Site Isolation (a.k.a Site Per Process) setting is enabled. That setting may be controlled by an enterprise policy: https://chromeenterprise.google/policies/#SitePerProcess", +"type": "boolean" +}, +"systemDnsServers": { +"description": "List of the addesses of all OS level DNS servers configured in the device's network settings.", +"items": { +"type": "string" +}, +"type": "array" +}, +"thirdPartyBlockingEnabled": { +"description": "Whether Chrome is blocking third-party software injection or not. This setting may be controlled by an enterprise policy: https://chromeenterprise.google/policies/?policy=ThirdPartyBlockingEnabled. Available on Windows only.", +"type": "boolean" +}, +"trigger": { +"description": "The trigger which generated this set of signals.", +"enum": [ +"TRIGGER_UNSPECIFIED", +"TRIGGER_BROWSER_NAVIGATION", +"TRIGGER_LOGIN_SCREEN" +], +"enumDescriptions": [ +"Unspecified.", +"When navigating to an URL inside a browser.", +"When signing into an account on the ChromeOS login screen." +], +"type": "string" +}, +"windowsMachineDomain": { +"description": "Windows domain that the current machine has joined. Available on Windows only.", +"type": "string" +}, +"windowsUserDomain": { +"description": "Windows domain for the current OS user. Available on Windows only.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"VerifyChallengeResponseRequest": { +"description": "Signed ChallengeResponse.", +"id": "VerifyChallengeResponseRequest", +"properties": { +"challengeResponse": { +"description": "Required. The generated response to the challenge, the bytes representation of SignedData.", +"format": "byte", +"type": "string" +}, +"expectedIdentity": { +"description": "Optional. Service can optionally provide identity information about the device or user associated with the key. For an EMK, this value is the enrolled domain. For an EUK, this value is the user's email address. If present, this value will be checked against contents of the response, and verification will fail if there is no match.", +"type": "string" +} +}, +"type": "object" +}, +"VerifyChallengeResponseResult": { +"description": "Result message for VerifiedAccess.VerifyChallengeResponse.", +"id": "VerifyChallengeResponseResult", +"properties": { +"attestedDeviceId": { +"description": "Attested device ID (ADID).", +"type": "string" +}, +"customerId": { +"description": "Unique customer id that this device belongs to, as defined by the Google Admin SDK at https://developers.google.com/admin-sdk/directory/v1/guides/manage-customers", +"type": "string" +}, +"deviceEnrollmentId": { +"description": "Device enrollment id for ChromeOS devices.", +"type": "string" +}, +"devicePermanentId": { +"description": "Device permanent id is returned in this field (for the machine response only).", +"type": "string" +}, +"deviceSignal": { +"description": "Deprecated. Device signal in json string representation. Prefer using `device_signals` instead.", +"type": "string" +}, +"deviceSignals": { +"$ref": "DeviceSignals", +"description": "Device signals." +}, +"keyTrustLevel": { +"description": "Device attested key trust level.", +"enum": [ +"KEY_TRUST_LEVEL_UNSPECIFIED", +"CHROME_OS_VERIFIED_MODE", +"CHROME_OS_DEVELOPER_MODE", +"CHROME_BROWSER_HW_KEY", +"CHROME_BROWSER_OS_KEY", +"CHROME_BROWSER_NO_KEY" +], +"enumDescriptions": [ +"UNSPECIFIED.", +"ChromeOS device in verified mode.", +"ChromeOS device in developer mode.", +"Chrome Browser with the key stored in the device hardware.", +"Chrome Browser with the key stored at OS level.", +"Chrome Browser without an attestation key." +], +"type": "string" +}, +"profileCustomerId": { +"description": "Unique customer id that this profile belongs to, as defined by the Google Admin SDK at https://developers.google.com/admin-sdk/directory/v1/guides/manage-customers", +"type": "string" +}, +"profileKeyTrustLevel": { +"description": "Profile attested key trust level.", +"enum": [ +"KEY_TRUST_LEVEL_UNSPECIFIED", +"CHROME_OS_VERIFIED_MODE", +"CHROME_OS_DEVELOPER_MODE", +"CHROME_BROWSER_HW_KEY", +"CHROME_BROWSER_OS_KEY", +"CHROME_BROWSER_NO_KEY" +], +"enumDescriptions": [ +"UNSPECIFIED.", +"ChromeOS device in verified mode.", +"ChromeOS device in developer mode.", +"Chrome Browser with the key stored in the device hardware.", +"Chrome Browser with the key stored at OS level.", +"Chrome Browser without an attestation key." +], +"type": "string" +}, +"signedPublicKeyAndChallenge": { +"description": "Certificate Signing Request (in the SPKAC format, base64 encoded) is returned in this field. This field will be set only if device has included CSR in its challenge response. (the option to include CSR is now available for both user and machine responses)", +"type": "string" +}, +"virtualDeviceId": { +"description": "Virtual device id of the device. The definition of virtual device id is platform-specific.", +"type": "string" +}, +"virtualProfileId": { +"description": "The ID of a profile on the device.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Chrome Verified Access API", +"version": "v2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/versionhistory.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/versionhistory.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..a79e8c1a235cfe4bd513124b1504615ddefd422a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/versionhistory.v1.json @@ -0,0 +1,505 @@ +{ +"basePath": "", +"baseUrl": "https://versionhistory.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Version History", +"description": "Version History API - Prod", +"discoveryVersion": "v1", +"documentationLink": "https://developers.chrome.com/versionhistory", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "versionhistory:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://versionhistory.mtls.googleapis.com/", +"name": "versionhistory", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"platforms": { +"methods": { +"list": { +"description": "Returns list of platforms that are available for a given product. The resource \"product\" has no resource name in its name.", +"flatPath": "v1/{v1Id}/platforms", +"httpMethod": "GET", +"id": "versionhistory.platforms.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListChannels` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The product, which owns this collection of platforms. Format: {product}", +"location": "path", +"pattern": "^[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/platforms", +"response": { +"$ref": "ListPlatformsResponse" +} +} +}, +"resources": { +"channels": { +"methods": { +"list": { +"description": "Returns list of channels that are available for a given platform.", +"flatPath": "v1/{v1Id}/platforms/{platformsId}/channels", +"httpMethod": "GET", +"id": "versionhistory.platforms.channels.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Optional limit on the number of channels to include in the response. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListChannels` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The platform, which owns this collection of channels. Format: {product}/platforms/{platform}", +"location": "path", +"pattern": "^[^/]+/platforms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/channels", +"response": { +"$ref": "ListChannelsResponse" +} +} +}, +"resources": { +"versions": { +"methods": { +"list": { +"description": "Returns list of version for the given platform/channel.", +"flatPath": "v1/{v1Id}/platforms/{platformsId}/channels/{channelsId}/versions", +"httpMethod": "GET", +"id": "versionhistory.platforms.channels.versions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical \"and\". Valid field_names are \"version\", \"name\", \"platform\", and \"channel\". Valid operators are \"<\", \"<=\", \"=\", \">=\", and \">\". Channel comparison is done by distance from stable. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. If version is not entirely written, the version will be appended with 0 in missing fields. Ex) version > 80 becoms version > 80.0.0.0 Name and platform are filtered by string comparison. Ex) \"...?filter=channel<=beta, version >= 80 Ex) \"...?filter=version > 80, version < 81", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Ordering string. Valid order_by strings are \"version\", \"name\", \"platform\", and \"channel\". Optionally, you can append \" desc\" or \" asc\" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by version in descending order. Ex) \"...?order_by=version asc\" Ex) \"...?order_by=platform desc, channel, version\"", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Optional limit on the number of versions to include in the response. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListVersions` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The channel, which owns this collection of versions. Format: {product}/platforms/{platform}/channels/{channel}", +"location": "path", +"pattern": "^[^/]+/platforms/[^/]+/channels/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/versions", +"response": { +"$ref": "ListVersionsResponse" +} +} +}, +"resources": { +"releases": { +"methods": { +"list": { +"description": "Returns list of releases of the given version.", +"flatPath": "v1/{v1Id}/platforms/{platformsId}/channels/{channelsId}/versions/{versionsId}/releases", +"httpMethod": "GET", +"id": "versionhistory.platforms.channels.versions.releases.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filter string. Format is a comma separated list of All comma separated filter clauses are conjoined with a logical \"and\". Valid field_names are \"version\", \"name\", \"platform\", \"channel\", \"fraction\" \"starttime\", and \"endtime\". Valid operators are \"<\", \"<=\", \"=\", \">=\", and \">\". Channel comparison is done by distance from stable. must be a valid channel when filtering by channel. Ex) stable < beta, beta < dev, canary < canary_asan. Version comparison is done numerically. Ex) 1.0.0.8 < 1.0.0.10. If version is not entirely written, the version will be appended with 0 for the missing fields. Ex) version > 80 becoms version > 80.0.0.0 When filtering by starttime or endtime, string must be in RFC 3339 date string format. Name and platform are filtered by string comparison. Ex) \"...?filter=channel<=beta, version >= 80 Ex) \"...?filter=version > 80, version < 81 Ex) \"...?filter=starttime>2020-01-01T00:00:00Z", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Ordering string. Valid order_by strings are \"version\", \"name\", \"starttime\", \"endtime\", \"platform\", \"channel\", and \"fraction\". Optionally, you can append \"desc\" or \"asc\" to specify the sorting order. Multiple order_by strings can be used in a comma separated list. Ordering by channel will sort by distance from the stable channel (not alphabetically). A list of channels sorted in this order is: stable, beta, dev, canary, and canary_asan. Sorting by name may cause unexpected behaviour as it is a naive string sort. For example, 1.0.0.8 will be before 1.0.0.10 in descending order. If order_by is not specified the response will be sorted by starttime in descending order. Ex) \"...?order_by=starttime asc\" Ex) \"...?order_by=platform desc, channel, startime desc\"", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Optional limit on the number of releases to include in the response. If unspecified, the server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListReleases` call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The version, which owns this collection of releases. Format: {product}/platforms/{platform}/channels/{channel}/versions/{version}", +"location": "path", +"pattern": "^[^/]+/platforms/[^/]+/channels/[^/]+/versions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/releases", +"response": { +"$ref": "ListReleasesResponse" +} +} +} +} +} +} +} +} +} +} +}, +"revision": "20240420", +"rootUrl": "https://versionhistory.googleapis.com/", +"schemas": { +"Channel": { +"description": "Each Channel is owned by a Platform and owns a collection of versions. Possible Channels are listed in the Channel enum below. Not all Channels are available for every Platform (e.g. CANARY does not exist for LINUX).", +"id": "Channel", +"properties": { +"channelType": { +"description": "Type of channel.", +"enum": [ +"CHANNEL_TYPE_UNSPECIFIED", +"STABLE", +"BETA", +"DEV", +"CANARY", +"CANARY_ASAN", +"ALL", +"EXTENDED", +"LTS", +"LTC" +], +"enumDescriptions": [ +"", +"The Stable channel.", +"The Beta channel.", +"The Dev channel.", +"The Canary channel.", +"The Canary channel for Chrome, with DCHECK/ASAN enabled.", +"", +"The Extended Stable channel for Chrome.", +"The Long-term support channel for ChromeOS.", +"The Long-term support candidate channel for ChromeOS." +], +"type": "string" +}, +"name": { +"description": "Channel name. Format is \"{product}/platforms/{platform}/channels/{channel}\"", +"type": "string" +} +}, +"type": "object" +}, +"Interval": { +"description": "Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time.", +"id": "Interval", +"properties": { +"endTime": { +"description": "Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end.", +"format": "google-datetime", +"type": "string" +}, +"startTime": { +"description": "Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ListChannelsResponse": { +"description": "Response message for ListChannels.", +"id": "ListChannelsResponse", +"properties": { +"channels": { +"description": "The list of channels.", +"items": { +"$ref": "Channel" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListPlatformsResponse": { +"description": "Response message for ListPlatforms.", +"id": "ListPlatformsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"platforms": { +"description": "The list of platforms.", +"items": { +"$ref": "Platform" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListReleasesResponse": { +"description": "Response message for ListReleases.", +"id": "ListReleasesResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"releases": { +"description": "The list of releases.", +"items": { +"$ref": "Release" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVersionsResponse": { +"description": "Response message for ListVersions.", +"id": "ListVersionsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"versions": { +"description": "The list of versions.", +"items": { +"$ref": "Version" +}, +"type": "array" +} +}, +"type": "object" +}, +"Platform": { +"description": "Each Platform is owned by a Product and owns a collection of channels. Available platforms are listed in Platform enum below. Not all Channels are available for every Platform (e.g. CANARY does not exist for LINUX).", +"id": "Platform", +"properties": { +"name": { +"description": "Platform name. Format is \"{product}/platforms/{platform}\"", +"type": "string" +}, +"platformType": { +"description": "Type of platform.", +"enum": [ +"PLATFORM_TYPE_UNSPECIFIED", +"WIN", +"WIN64", +"MAC", +"LINUX", +"ANDROID", +"WEBVIEW", +"IOS", +"ALL", +"MAC_ARM64", +"LACROS", +"LACROS_ARM32", +"CHROMEOS", +"LACROS_ARM64", +"FUCHSIA", +"WIN_ARM64" +], +"enumDescriptions": [ +"", +"Chrome Desktop for Windows (32-bit).", +"Chrome Desktop for Windows (x86_64).", +"Chrome Desktop for macOS (x86_64).", +"Chrome Desktop for Linux.", +"Chrome for Android.", +"WebView for Android.", +"Chrome for iOS.", +"", +"Chrome for macOS (ARM64).", +"ChromeOS Lacros (x86_64).", +"ChromeOS Lacros (ARM).", +"ChromeOS.", +"ChromeOS Lacros (ARM64).", +"Chrome for Fuchsia.", +"Chrome Desktop for Windows (ARM64)." +], +"type": "string" +} +}, +"type": "object" +}, +"Release": { +"description": "A Release is owned by a Version. A Release contains information about the release(s) of its parent version. This includes when the release began and ended, as well as what percentage it was released at. If the version is released again, or if the serving percentage changes, it will create another release under the version.", +"id": "Release", +"properties": { +"fraction": { +"description": "Rollout fraction. This fraction indicates the fraction of people that should receive this version in this release. If the fraction is not specified in ReleaseManager, the API will assume fraction is 1.", +"format": "double", +"type": "number" +}, +"fractionGroup": { +"description": "Rollout fraction group. Only fractions with the same fraction_group are statistically comparable: there may be non-fractional differences between different fraction groups.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "Release name. Format is \"{product}/platforms/{platform}/channels/{channel}/versions/{version}/releases/{release}\"", +"type": "string" +}, +"serving": { +"$ref": "Interval", +"description": "Timestamp interval of when the release was live. If end_time is unspecified, the release is currently live." +}, +"version": { +"description": "String containing just the version number. e.g. \"84.0.4147.38\"", +"type": "string" +} +}, +"type": "object" +}, +"Version": { +"description": "Each Version is owned by a Channel. A Version only displays the Version number (e.g. 84.0.4147.38). A Version owns a collection of releases.", +"id": "Version", +"properties": { +"name": { +"description": "Version name. Format is \"{product}/platforms/{platform}/channels/{channel}/versions/{version}\" e.g. \"chrome/platforms/win/channels/beta/versions/84.0.4147.38\"", +"type": "string" +}, +"version": { +"description": "String containing just the version number. e.g. \"84.0.4147.38\"", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "versionhistory.googleapis.com API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..a1b44739530493cd8fdc5bd0e4087fdf6b793de5 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1.json @@ -0,0 +1,5027 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://videointelligence.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Video Intelligence", +"description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/video-intelligence/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "videointelligence:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://videointelligence.mtls.googleapis.com/", +"name": "videointelligence", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "videointelligence.operations.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/operations/{+name}:cancel", +"response": { +"$ref": "GoogleProtobuf_Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "videointelligence.operations.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/operations/{+name}", +"response": { +"$ref": "GoogleProtobuf_Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "videointelligence.operations.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/operations/{+name}", +"response": { +"$ref": "GoogleLongrunning_Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +}, +"projects": { +"resources": { +"locations": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "videointelligence.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "GoogleLongrunning_CancelOperationRequest" +}, +"response": { +"$ref": "GoogleProtobuf_Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "videointelligence.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleProtobuf_Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "videointelligence.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunning_Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "videointelligence.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunning_ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"videos": { +"methods": { +"annotate": { +"description": "Performs asynchronous video annotation. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` (results).", +"flatPath": "v1/videos:annotate", +"httpMethod": "POST", +"id": "videointelligence.videos.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1/videos:annotate", +"request": { +"$ref": "GoogleCloudVideointelligenceV1_AnnotateVideoRequest" +}, +"response": { +"$ref": "GoogleLongrunning_Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240327", +"rootUrl": "https://videointelligence.googleapis.com/", +"schemas": { +"GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_AnnotateVideoRequest": { +"description": "Video annotation request.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoRequest", +"properties": { +"features": { +"description": "Required. Requested video annotation features.", +"items": { +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"type": "array" +}, +"inputContent": { +"description": "The video data bytes. If unset, the input video(s) should be specified via the `input_uri`. If set, `input_uri` must be unset.", +"format": "byte", +"type": "string" +}, +"inputUri": { +"description": "Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify multiple videos, a video URI may include wildcards in the `object-id`. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` must be unset.", +"type": "string" +}, +"locationId": { +"description": "Optional. Cloud region where annotation should take place. Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, the region will be determined based on video file location.", +"type": "string" +}, +"outputUri": { +"description": "Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. These must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).", +"type": "string" +}, +"videoContext": { +"$ref": "GoogleCloudVideointelligenceV1_VideoContext", +"description": "Additional video context and/or feature-specific parameters." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentDetectionConfig": { +"description": "Config for EXPLICIT_CONTENT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentDetectionConfig", +"properties": { +"model": { +"description": "Model to use for explicit content detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceDetectionConfig": { +"description": "Config for FACE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1_FaceDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable face attributes detection, such as glasses, dark_glasses, mouth_open etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the face annotation output.", +"type": "boolean" +}, +"model": { +"description": "Model to use for face detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelDetectionConfig": { +"description": "Config for LABEL_DETECTION.", +"id": "GoogleCloudVideointelligenceV1_LabelDetectionConfig", +"properties": { +"frameConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +}, +"labelDetectionMode": { +"description": "What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to `SHOT_MODE`.", +"enum": [ +"LABEL_DETECTION_MODE_UNSPECIFIED", +"SHOT_MODE", +"FRAME_MODE", +"SHOT_AND_FRAME_MODE" +], +"enumDescriptions": [ +"Unspecified.", +"Detect shot-level labels.", +"Detect frame-level labels.", +"Detect both shot-level and frame-level labels." +], +"type": "string" +}, +"model": { +"description": "Model to use for label detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +}, +"stationaryCamera": { +"description": "Whether the video has been shot from a stationary (i.e., non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.", +"type": "boolean" +}, +"videoConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it's set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingConfig": { +"description": "Config for OBJECT_TRACKING.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingConfig", +"properties": { +"model": { +"description": "Model to use for object tracking. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_PersonDetectionConfig": { +"description": "Config for PERSON_DETECTION.", +"id": "GoogleCloudVideointelligenceV1_PersonDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable person attributes detection, such as cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the person detection annotation output.", +"type": "boolean" +}, +"includePoseLandmarks": { +"description": "Whether to enable pose landmarks detection. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ShotChangeDetectionConfig": { +"description": "Config for SHOT_CHANGE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1_ShotChangeDetectionConfig", +"properties": { +"model": { +"description": "Model to use for shot change detection. Supported values: \"builtin/stable\" (the default if unset), \"builtin/latest\", and \"builtin/legacy\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechContext": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "GoogleCloudVideointelligenceV1_SpeechContext", +"properties": { +"phrases": { +"description": "Optional. A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechTranscriptionConfig": { +"description": "Config for SPEECH_TRANSCRIPTION.", +"id": "GoogleCloudVideointelligenceV1_SpeechTranscriptionConfig", +"properties": { +"audioTracks": { +"description": "Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"diarizationSpeakerCount": { +"description": "Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to '2'. Ignored unless enable_speaker_diarization is set to true.", +"format": "int32", +"type": "integer" +}, +"enableAutomaticPunctuation": { +"description": "Optional. If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses. NOTE: \"This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature.\"", +"type": "boolean" +}, +"enableSpeakerDiarization": { +"description": "Optional. If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.", +"type": "boolean" +}, +"enableWordConfidence": { +"description": "Optional. If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.", +"type": "boolean" +}, +"filterProfanity": { +"description": "Optional. If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. \"f***\". If set to `false` or omitted, profanities won't be filtered out.", +"type": "boolean" +}, +"languageCode": { +"description": "Required. *Required* The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech/docs/languages) for a list of the currently supported language codes.", +"type": "string" +}, +"maxAlternatives": { +"description": "Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechTranscription`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.", +"format": "int32", +"type": "integer" +}, +"speechContexts": { +"description": "Optional. A means to provide context to assist the speech recognition.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechContext" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextDetectionConfig": { +"description": "Config for TEXT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1_TextDetectionConfig", +"properties": { +"languageHints": { +"description": "Language hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format. Automatic language detection is performed if no hint is provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"model": { +"description": "Model to use for text detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoContext": { +"description": "Video context and/or feature-specific parameters.", +"id": "GoogleCloudVideointelligenceV1_VideoContext", +"properties": { +"explicitContentDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentDetectionConfig", +"description": "Config for EXPLICIT_CONTENT_DETECTION." +}, +"faceDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1_FaceDetectionConfig", +"description": "Config for FACE_DETECTION." +}, +"labelDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1_LabelDetectionConfig", +"description": "Config for LABEL_DETECTION." +}, +"objectTrackingConfig": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingConfig", +"description": "Config for OBJECT_TRACKING." +}, +"personDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1_PersonDetectionConfig", +"description": "Config for PERSON_DETECTION." +}, +"segments": { +"description": "Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"shotChangeDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1_ShotChangeDetectionConfig", +"description": "Config for SHOT_CHANGE_DETECTION." +}, +"speechTranscriptionConfig": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechTranscriptionConfig", +"description": "Config for SPEECH_TRANSCRIPTION." +}, +"textDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1_TextDetectionConfig", +"description": "Config for TEXT_DETECTION." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1beta2_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1beta2_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1beta2_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1beta2_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1beta2_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p1beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p2beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Celebrity": { +"description": "Celebrity definition.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"properties": { +"description": { +"description": "Textual description of additional information about the celebrity, if applicable.", +"type": "string" +}, +"displayName": { +"description": "The celebrity name.", +"type": "string" +}, +"name": { +"description": "The resource name of the celebrity. Have the format `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. kg-mid is the id in Google knowledge graph, which is unique for the celebrity.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation": { +"description": "Celebrity recognition annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"properties": { +"celebrityTracks": { +"description": "The tracks detected from the input video, including recognized celebrities and other detected faces in the video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack": { +"description": "The annotation result of a celebrity face track. RecognizedCelebrity field could be empty if the face track does not have any matched celebrities.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack", +"properties": { +"celebrities": { +"description": "Top N match of the celebrities for the face in this track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity" +}, +"type": "array" +}, +"faceTrack": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track", +"description": "A track of a person's face." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity": { +"description": "The recognized celebrity with confidence score.", +"id": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"description": "The recognized celebrity." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse": { +"description": "`StreamingAnnotateVideoResponse` is the only message returned to the client by `StreamingAnnotateVideo`. A series of zero or more `StreamingAnnotateVideoResponse` messages are streamed back to the client.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse", +"properties": { +"annotationResults": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"description": "Streaming annotation results." +}, +"annotationResultsUri": { +"description": "Google Cloud Storage URI that stores annotation results of one streaming session in JSON format. It is the annotation_result_storage_directory from the request followed by '/cloud_project_number-session_id'.", +"type": "string" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, returns a google.rpc.Status message that specifies the error for the operation." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults": { +"description": "Streaming annotation results corresponding to a portion of the video that is currently being processed. Only ONE type of annotation will be specified in the response.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"properties": { +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation results." +}, +"frameTimestamp": { +"description": "Timestamp of the processed frame in microseconds.", +"format": "google-duration", +"type": "string" +}, +"labelAnnotations": { +"description": "Label annotation results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Object tracking results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotation results. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"CELEBRITY_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Celebrity recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults", +"properties": { +"celebrityRecognitionAnnotations": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"description": "Celebrity recognition annotations." +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p3beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunning_CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "GoogleLongrunning_CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"GoogleLongrunning_ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunning_ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunning_Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunning_Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunning_Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleProtobuf_Empty": { +"description": "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); }", +"id": "GoogleProtobuf_Empty", +"properties": {}, +"type": "object" +}, +"GoogleRpc_Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpc_Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Video Intelligence API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1beta2.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1beta2.json new file mode 100644 index 0000000000000000000000000000000000000000..a41eeab71c25bdbd96f1105e859dbe4c03bf046a --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1beta2.json @@ -0,0 +1,4775 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://videointelligence.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Video Intelligence", +"description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/video-intelligence/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "videointelligence:v1beta2", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://videointelligence.mtls.googleapis.com/", +"name": "videointelligence", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"videos": { +"methods": { +"annotate": { +"description": "Performs asynchronous video annotation. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` (results).", +"flatPath": "v1beta2/videos:annotate", +"httpMethod": "POST", +"id": "videointelligence.videos.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1beta2/videos:annotate", +"request": { +"$ref": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoRequest" +}, +"response": { +"$ref": "GoogleLongrunning_Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240327", +"rootUrl": "https://videointelligence.googleapis.com/", +"schemas": { +"GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoRequest": { +"description": "Video annotation request.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoRequest", +"properties": { +"features": { +"description": "Required. Requested video annotation features.", +"items": { +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"type": "array" +}, +"inputContent": { +"description": "The video data bytes. If unset, the input video(s) should be specified via the `input_uri`. If set, `input_uri` must be unset.", +"format": "byte", +"type": "string" +}, +"inputUri": { +"description": "Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify multiple videos, a video URI may include wildcards in the `object-id`. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` must be unset.", +"type": "string" +}, +"locationId": { +"description": "Optional. Cloud region where annotation should take place. Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, the region will be determined based on video file location.", +"type": "string" +}, +"outputUri": { +"description": "Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. These must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).", +"type": "string" +}, +"videoContext": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoContext", +"description": "Additional video context and/or feature-specific parameters." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1beta2_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentDetectionConfig": { +"description": "Config for EXPLICIT_CONTENT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentDetectionConfig", +"properties": { +"model": { +"description": "Model to use for explicit content detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceDetectionConfig": { +"description": "Config for FACE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable face attributes detection, such as glasses, dark_glasses, mouth_open etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the face annotation output.", +"type": "boolean" +}, +"model": { +"description": "Model to use for face detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelDetectionConfig": { +"description": "Config for LABEL_DETECTION.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelDetectionConfig", +"properties": { +"frameConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +}, +"labelDetectionMode": { +"description": "What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to `SHOT_MODE`.", +"enum": [ +"LABEL_DETECTION_MODE_UNSPECIFIED", +"SHOT_MODE", +"FRAME_MODE", +"SHOT_AND_FRAME_MODE" +], +"enumDescriptions": [ +"Unspecified.", +"Detect shot-level labels.", +"Detect frame-level labels.", +"Detect both shot-level and frame-level labels." +], +"type": "string" +}, +"model": { +"description": "Model to use for label detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +}, +"stationaryCamera": { +"description": "Whether the video has been shot from a stationary (i.e., non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.", +"type": "boolean" +}, +"videoConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it's set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingConfig": { +"description": "Config for OBJECT_TRACKING.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingConfig", +"properties": { +"model": { +"description": "Model to use for object tracking. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_PersonDetectionConfig": { +"description": "Config for PERSON_DETECTION.", +"id": "GoogleCloudVideointelligenceV1beta2_PersonDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable person attributes detection, such as cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the person detection annotation output.", +"type": "boolean" +}, +"includePoseLandmarks": { +"description": "Whether to enable pose landmarks detection. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ShotChangeDetectionConfig": { +"description": "Config for SHOT_CHANGE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1beta2_ShotChangeDetectionConfig", +"properties": { +"model": { +"description": "Model to use for shot change detection. Supported values: \"builtin/stable\" (the default if unset), \"builtin/latest\", and \"builtin/legacy\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechContext": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechContext", +"properties": { +"phrases": { +"description": "Optional. A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechTranscriptionConfig": { +"description": "Config for SPEECH_TRANSCRIPTION.", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechTranscriptionConfig", +"properties": { +"audioTracks": { +"description": "Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"diarizationSpeakerCount": { +"description": "Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to '2'. Ignored unless enable_speaker_diarization is set to true.", +"format": "int32", +"type": "integer" +}, +"enableAutomaticPunctuation": { +"description": "Optional. If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses. NOTE: \"This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature.\"", +"type": "boolean" +}, +"enableSpeakerDiarization": { +"description": "Optional. If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.", +"type": "boolean" +}, +"enableWordConfidence": { +"description": "Optional. If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.", +"type": "boolean" +}, +"filterProfanity": { +"description": "Optional. If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. \"f***\". If set to `false` or omitted, profanities won't be filtered out.", +"type": "boolean" +}, +"languageCode": { +"description": "Required. *Required* The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech/docs/languages) for a list of the currently supported language codes.", +"type": "string" +}, +"maxAlternatives": { +"description": "Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechTranscription`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.", +"format": "int32", +"type": "integer" +}, +"speechContexts": { +"description": "Optional. A means to provide context to assist the speech recognition.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechContext" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextDetectionConfig": { +"description": "Config for TEXT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1beta2_TextDetectionConfig", +"properties": { +"languageHints": { +"description": "Language hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format. Automatic language detection is performed if no hint is provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"model": { +"description": "Model to use for text detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1beta2_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1beta2_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1beta2_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoContext": { +"description": "Video context and/or feature-specific parameters.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoContext", +"properties": { +"explicitContentDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentDetectionConfig", +"description": "Config for EXPLICIT_CONTENT_DETECTION." +}, +"faceDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceDetectionConfig", +"description": "Config for FACE_DETECTION." +}, +"labelDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelDetectionConfig", +"description": "Config for LABEL_DETECTION." +}, +"objectTrackingConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingConfig", +"description": "Config for OBJECT_TRACKING." +}, +"personDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_PersonDetectionConfig", +"description": "Config for PERSON_DETECTION." +}, +"segments": { +"description": "Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"shotChangeDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ShotChangeDetectionConfig", +"description": "Config for SHOT_CHANGE_DETECTION." +}, +"speechTranscriptionConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechTranscriptionConfig", +"description": "Config for SPEECH_TRANSCRIPTION." +}, +"textDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextDetectionConfig", +"description": "Config for TEXT_DETECTION." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1beta2_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p1beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p2beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Celebrity": { +"description": "Celebrity definition.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"properties": { +"description": { +"description": "Textual description of additional information about the celebrity, if applicable.", +"type": "string" +}, +"displayName": { +"description": "The celebrity name.", +"type": "string" +}, +"name": { +"description": "The resource name of the celebrity. Have the format `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. kg-mid is the id in Google knowledge graph, which is unique for the celebrity.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation": { +"description": "Celebrity recognition annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"properties": { +"celebrityTracks": { +"description": "The tracks detected from the input video, including recognized celebrities and other detected faces in the video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack": { +"description": "The annotation result of a celebrity face track. RecognizedCelebrity field could be empty if the face track does not have any matched celebrities.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack", +"properties": { +"celebrities": { +"description": "Top N match of the celebrities for the face in this track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity" +}, +"type": "array" +}, +"faceTrack": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track", +"description": "A track of a person's face." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity": { +"description": "The recognized celebrity with confidence score.", +"id": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"description": "The recognized celebrity." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse": { +"description": "`StreamingAnnotateVideoResponse` is the only message returned to the client by `StreamingAnnotateVideo`. A series of zero or more `StreamingAnnotateVideoResponse` messages are streamed back to the client.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse", +"properties": { +"annotationResults": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"description": "Streaming annotation results." +}, +"annotationResultsUri": { +"description": "Google Cloud Storage URI that stores annotation results of one streaming session in JSON format. It is the annotation_result_storage_directory from the request followed by '/cloud_project_number-session_id'.", +"type": "string" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, returns a google.rpc.Status message that specifies the error for the operation." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults": { +"description": "Streaming annotation results corresponding to a portion of the video that is currently being processed. Only ONE type of annotation will be specified in the response.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"properties": { +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation results." +}, +"frameTimestamp": { +"description": "Timestamp of the processed frame in microseconds.", +"format": "google-duration", +"type": "string" +}, +"labelAnnotations": { +"description": "Label annotation results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Object tracking results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotation results. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"CELEBRITY_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Celebrity recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults", +"properties": { +"celebrityRecognitionAnnotations": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"description": "Celebrity recognition annotations." +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p3beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunning_Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunning_Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpc_Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpc_Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Video Intelligence API", +"version": "v1beta2", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..efcbfeb3f53dbd43ef239c515514564772da59f5 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p1beta1.json @@ -0,0 +1,4775 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://videointelligence.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Video Intelligence", +"description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/video-intelligence/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "videointelligence:v1p1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://videointelligence.mtls.googleapis.com/", +"name": "videointelligence", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"videos": { +"methods": { +"annotate": { +"description": "Performs asynchronous video annotation. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` (results).", +"flatPath": "v1p1beta1/videos:annotate", +"httpMethod": "POST", +"id": "videointelligence.videos.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p1beta1/videos:annotate", +"request": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoRequest" +}, +"response": { +"$ref": "GoogleLongrunning_Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240327", +"rootUrl": "https://videointelligence.googleapis.com/", +"schemas": { +"GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1beta2_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1beta2_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1beta2_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1beta2_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1beta2_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoRequest": { +"description": "Video annotation request.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoRequest", +"properties": { +"features": { +"description": "Required. Requested video annotation features.", +"items": { +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"type": "array" +}, +"inputContent": { +"description": "The video data bytes. If unset, the input video(s) should be specified via the `input_uri`. If set, `input_uri` must be unset.", +"format": "byte", +"type": "string" +}, +"inputUri": { +"description": "Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify multiple videos, a video URI may include wildcards in the `object-id`. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` must be unset.", +"type": "string" +}, +"locationId": { +"description": "Optional. Cloud region where annotation should take place. Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, the region will be determined based on video file location.", +"type": "string" +}, +"outputUri": { +"description": "Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. These must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).", +"type": "string" +}, +"videoContext": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoContext", +"description": "Additional video context and/or feature-specific parameters." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentDetectionConfig": { +"description": "Config for EXPLICIT_CONTENT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentDetectionConfig", +"properties": { +"model": { +"description": "Model to use for explicit content detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceDetectionConfig": { +"description": "Config for FACE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable face attributes detection, such as glasses, dark_glasses, mouth_open etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the face annotation output.", +"type": "boolean" +}, +"model": { +"description": "Model to use for face detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelDetectionConfig": { +"description": "Config for LABEL_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelDetectionConfig", +"properties": { +"frameConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +}, +"labelDetectionMode": { +"description": "What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to `SHOT_MODE`.", +"enum": [ +"LABEL_DETECTION_MODE_UNSPECIFIED", +"SHOT_MODE", +"FRAME_MODE", +"SHOT_AND_FRAME_MODE" +], +"enumDescriptions": [ +"Unspecified.", +"Detect shot-level labels.", +"Detect frame-level labels.", +"Detect both shot-level and frame-level labels." +], +"type": "string" +}, +"model": { +"description": "Model to use for label detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +}, +"stationaryCamera": { +"description": "Whether the video has been shot from a stationary (i.e., non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.", +"type": "boolean" +}, +"videoConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it's set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingConfig": { +"description": "Config for OBJECT_TRACKING.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingConfig", +"properties": { +"model": { +"description": "Model to use for object tracking. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_PersonDetectionConfig": { +"description": "Config for PERSON_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable person attributes detection, such as cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the person detection annotation output.", +"type": "boolean" +}, +"includePoseLandmarks": { +"description": "Whether to enable pose landmarks detection. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ShotChangeDetectionConfig": { +"description": "Config for SHOT_CHANGE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ShotChangeDetectionConfig", +"properties": { +"model": { +"description": "Model to use for shot change detection. Supported values: \"builtin/stable\" (the default if unset), \"builtin/latest\", and \"builtin/legacy\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechContext": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechContext", +"properties": { +"phrases": { +"description": "Optional. A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechTranscriptionConfig": { +"description": "Config for SPEECH_TRANSCRIPTION.", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscriptionConfig", +"properties": { +"audioTracks": { +"description": "Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"diarizationSpeakerCount": { +"description": "Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to '2'. Ignored unless enable_speaker_diarization is set to true.", +"format": "int32", +"type": "integer" +}, +"enableAutomaticPunctuation": { +"description": "Optional. If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses. NOTE: \"This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature.\"", +"type": "boolean" +}, +"enableSpeakerDiarization": { +"description": "Optional. If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.", +"type": "boolean" +}, +"enableWordConfidence": { +"description": "Optional. If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.", +"type": "boolean" +}, +"filterProfanity": { +"description": "Optional. If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. \"f***\". If set to `false` or omitted, profanities won't be filtered out.", +"type": "boolean" +}, +"languageCode": { +"description": "Required. *Required* The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech/docs/languages) for a list of the currently supported language codes.", +"type": "string" +}, +"maxAlternatives": { +"description": "Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechTranscription`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.", +"format": "int32", +"type": "integer" +}, +"speechContexts": { +"description": "Optional. A means to provide context to assist the speech recognition.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechContext" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextDetectionConfig": { +"description": "Config for TEXT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextDetectionConfig", +"properties": { +"languageHints": { +"description": "Language hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format. Automatic language detection is performed if no hint is provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"model": { +"description": "Model to use for text detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoContext": { +"description": "Video context and/or feature-specific parameters.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoContext", +"properties": { +"explicitContentDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentDetectionConfig", +"description": "Config for EXPLICIT_CONTENT_DETECTION." +}, +"faceDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionConfig", +"description": "Config for FACE_DETECTION." +}, +"labelDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelDetectionConfig", +"description": "Config for LABEL_DETECTION." +}, +"objectTrackingConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingConfig", +"description": "Config for OBJECT_TRACKING." +}, +"personDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionConfig", +"description": "Config for PERSON_DETECTION." +}, +"segments": { +"description": "Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"shotChangeDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ShotChangeDetectionConfig", +"description": "Config for SHOT_CHANGE_DETECTION." +}, +"speechTranscriptionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscriptionConfig", +"description": "Config for SPEECH_TRANSCRIPTION." +}, +"textDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextDetectionConfig", +"description": "Config for TEXT_DETECTION." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p1beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p2beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Celebrity": { +"description": "Celebrity definition.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"properties": { +"description": { +"description": "Textual description of additional information about the celebrity, if applicable.", +"type": "string" +}, +"displayName": { +"description": "The celebrity name.", +"type": "string" +}, +"name": { +"description": "The resource name of the celebrity. Have the format `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. kg-mid is the id in Google knowledge graph, which is unique for the celebrity.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation": { +"description": "Celebrity recognition annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"properties": { +"celebrityTracks": { +"description": "The tracks detected from the input video, including recognized celebrities and other detected faces in the video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack": { +"description": "The annotation result of a celebrity face track. RecognizedCelebrity field could be empty if the face track does not have any matched celebrities.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack", +"properties": { +"celebrities": { +"description": "Top N match of the celebrities for the face in this track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity" +}, +"type": "array" +}, +"faceTrack": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track", +"description": "A track of a person's face." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity": { +"description": "The recognized celebrity with confidence score.", +"id": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"description": "The recognized celebrity." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse": { +"description": "`StreamingAnnotateVideoResponse` is the only message returned to the client by `StreamingAnnotateVideo`. A series of zero or more `StreamingAnnotateVideoResponse` messages are streamed back to the client.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse", +"properties": { +"annotationResults": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"description": "Streaming annotation results." +}, +"annotationResultsUri": { +"description": "Google Cloud Storage URI that stores annotation results of one streaming session in JSON format. It is the annotation_result_storage_directory from the request followed by '/cloud_project_number-session_id'.", +"type": "string" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, returns a google.rpc.Status message that specifies the error for the operation." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults": { +"description": "Streaming annotation results corresponding to a portion of the video that is currently being processed. Only ONE type of annotation will be specified in the response.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"properties": { +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation results." +}, +"frameTimestamp": { +"description": "Timestamp of the processed frame in microseconds.", +"format": "google-duration", +"type": "string" +}, +"labelAnnotations": { +"description": "Label annotation results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Object tracking results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotation results. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"CELEBRITY_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Celebrity recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults", +"properties": { +"celebrityRecognitionAnnotations": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"description": "Celebrity recognition annotations." +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p3beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunning_Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunning_Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpc_Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpc_Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Video Intelligence API", +"version": "v1p1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p2beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p2beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..462c4b38e8b408c1e66d7323775a7e3292753b58 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p2beta1.json @@ -0,0 +1,4775 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://videointelligence.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Video Intelligence", +"description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/video-intelligence/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "videointelligence:v1p2beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://videointelligence.mtls.googleapis.com/", +"name": "videointelligence", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"videos": { +"methods": { +"annotate": { +"description": "Performs asynchronous video annotation. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` (results).", +"flatPath": "v1p2beta1/videos:annotate", +"httpMethod": "POST", +"id": "videointelligence.videos.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p2beta1/videos:annotate", +"request": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoRequest" +}, +"response": { +"$ref": "GoogleLongrunning_Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240327", +"rootUrl": "https://videointelligence.googleapis.com/", +"schemas": { +"GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1beta2_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1beta2_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1beta2_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1beta2_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1beta2_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p1beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoRequest": { +"description": "Video annotation request.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoRequest", +"properties": { +"features": { +"description": "Required. Requested video annotation features.", +"items": { +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"type": "array" +}, +"inputContent": { +"description": "The video data bytes. If unset, the input video(s) should be specified via the `input_uri`. If set, `input_uri` must be unset.", +"format": "byte", +"type": "string" +}, +"inputUri": { +"description": "Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify multiple videos, a video URI may include wildcards in the `object-id`. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` must be unset.", +"type": "string" +}, +"locationId": { +"description": "Optional. Cloud region where annotation should take place. Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, the region will be determined based on video file location.", +"type": "string" +}, +"outputUri": { +"description": "Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. These must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).", +"type": "string" +}, +"videoContext": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoContext", +"description": "Additional video context and/or feature-specific parameters." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentDetectionConfig": { +"description": "Config for EXPLICIT_CONTENT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentDetectionConfig", +"properties": { +"model": { +"description": "Model to use for explicit content detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceDetectionConfig": { +"description": "Config for FACE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable face attributes detection, such as glasses, dark_glasses, mouth_open etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the face annotation output.", +"type": "boolean" +}, +"model": { +"description": "Model to use for face detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelDetectionConfig": { +"description": "Config for LABEL_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelDetectionConfig", +"properties": { +"frameConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +}, +"labelDetectionMode": { +"description": "What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to `SHOT_MODE`.", +"enum": [ +"LABEL_DETECTION_MODE_UNSPECIFIED", +"SHOT_MODE", +"FRAME_MODE", +"SHOT_AND_FRAME_MODE" +], +"enumDescriptions": [ +"Unspecified.", +"Detect shot-level labels.", +"Detect frame-level labels.", +"Detect both shot-level and frame-level labels." +], +"type": "string" +}, +"model": { +"description": "Model to use for label detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +}, +"stationaryCamera": { +"description": "Whether the video has been shot from a stationary (i.e., non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.", +"type": "boolean" +}, +"videoConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it's set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingConfig": { +"description": "Config for OBJECT_TRACKING.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingConfig", +"properties": { +"model": { +"description": "Model to use for object tracking. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_PersonDetectionConfig": { +"description": "Config for PERSON_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable person attributes detection, such as cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the person detection annotation output.", +"type": "boolean" +}, +"includePoseLandmarks": { +"description": "Whether to enable pose landmarks detection. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ShotChangeDetectionConfig": { +"description": "Config for SHOT_CHANGE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ShotChangeDetectionConfig", +"properties": { +"model": { +"description": "Model to use for shot change detection. Supported values: \"builtin/stable\" (the default if unset), \"builtin/latest\", and \"builtin/legacy\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechContext": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechContext", +"properties": { +"phrases": { +"description": "Optional. A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechTranscriptionConfig": { +"description": "Config for SPEECH_TRANSCRIPTION.", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscriptionConfig", +"properties": { +"audioTracks": { +"description": "Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"diarizationSpeakerCount": { +"description": "Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to '2'. Ignored unless enable_speaker_diarization is set to true.", +"format": "int32", +"type": "integer" +}, +"enableAutomaticPunctuation": { +"description": "Optional. If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses. NOTE: \"This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature.\"", +"type": "boolean" +}, +"enableSpeakerDiarization": { +"description": "Optional. If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.", +"type": "boolean" +}, +"enableWordConfidence": { +"description": "Optional. If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.", +"type": "boolean" +}, +"filterProfanity": { +"description": "Optional. If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. \"f***\". If set to `false` or omitted, profanities won't be filtered out.", +"type": "boolean" +}, +"languageCode": { +"description": "Required. *Required* The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech/docs/languages) for a list of the currently supported language codes.", +"type": "string" +}, +"maxAlternatives": { +"description": "Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechTranscription`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.", +"format": "int32", +"type": "integer" +}, +"speechContexts": { +"description": "Optional. A means to provide context to assist the speech recognition.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechContext" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextDetectionConfig": { +"description": "Config for TEXT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextDetectionConfig", +"properties": { +"languageHints": { +"description": "Language hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format. Automatic language detection is performed if no hint is provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"model": { +"description": "Model to use for text detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoContext": { +"description": "Video context and/or feature-specific parameters.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoContext", +"properties": { +"explicitContentDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentDetectionConfig", +"description": "Config for EXPLICIT_CONTENT_DETECTION." +}, +"faceDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionConfig", +"description": "Config for FACE_DETECTION." +}, +"labelDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelDetectionConfig", +"description": "Config for LABEL_DETECTION." +}, +"objectTrackingConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingConfig", +"description": "Config for OBJECT_TRACKING." +}, +"personDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionConfig", +"description": "Config for PERSON_DETECTION." +}, +"segments": { +"description": "Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"shotChangeDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ShotChangeDetectionConfig", +"description": "Config for SHOT_CHANGE_DETECTION." +}, +"speechTranscriptionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscriptionConfig", +"description": "Config for SPEECH_TRANSCRIPTION." +}, +"textDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextDetectionConfig", +"description": "Config for TEXT_DETECTION." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p2beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Celebrity": { +"description": "Celebrity definition.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"properties": { +"description": { +"description": "Textual description of additional information about the celebrity, if applicable.", +"type": "string" +}, +"displayName": { +"description": "The celebrity name.", +"type": "string" +}, +"name": { +"description": "The resource name of the celebrity. Have the format `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. kg-mid is the id in Google knowledge graph, which is unique for the celebrity.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation": { +"description": "Celebrity recognition annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"properties": { +"celebrityTracks": { +"description": "The tracks detected from the input video, including recognized celebrities and other detected faces in the video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack": { +"description": "The annotation result of a celebrity face track. RecognizedCelebrity field could be empty if the face track does not have any matched celebrities.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack", +"properties": { +"celebrities": { +"description": "Top N match of the celebrities for the face in this track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity" +}, +"type": "array" +}, +"faceTrack": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track", +"description": "A track of a person's face." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity": { +"description": "The recognized celebrity with confidence score.", +"id": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"description": "The recognized celebrity." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse": { +"description": "`StreamingAnnotateVideoResponse` is the only message returned to the client by `StreamingAnnotateVideo`. A series of zero or more `StreamingAnnotateVideoResponse` messages are streamed back to the client.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse", +"properties": { +"annotationResults": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"description": "Streaming annotation results." +}, +"annotationResultsUri": { +"description": "Google Cloud Storage URI that stores annotation results of one streaming session in JSON format. It is the annotation_result_storage_directory from the request followed by '/cloud_project_number-session_id'.", +"type": "string" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, returns a google.rpc.Status message that specifies the error for the operation." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults": { +"description": "Streaming annotation results corresponding to a portion of the video that is currently being processed. Only ONE type of annotation will be specified in the response.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"properties": { +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation results." +}, +"frameTimestamp": { +"description": "Timestamp of the processed frame in microseconds.", +"format": "google-duration", +"type": "string" +}, +"labelAnnotations": { +"description": "Label annotation results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Object tracking results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotation results. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"CELEBRITY_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Celebrity recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults", +"properties": { +"celebrityRecognitionAnnotations": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"description": "Celebrity recognition annotations." +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p3beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunning_Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunning_Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpc_Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpc_Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Video Intelligence API", +"version": "v1p2beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p3beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p3beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..e1324b3c10d6621cc75110b7566bae643bba87ec --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/videointelligence.v1p3beta1.json @@ -0,0 +1,4777 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://videointelligence.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Video Intelligence", +"description": "Detects objects, explicit content, and scene changes in videos. It also specifies the region for annotation and transcribes speech to text. Supports both asynchronous API and streaming API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/video-intelligence/docs/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "videointelligence:v1p3beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://videointelligence.mtls.googleapis.com/", +"name": "videointelligence", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"videos": { +"methods": { +"annotate": { +"description": "Performs asynchronous video annotation. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `AnnotateVideoProgress` (progress). `Operation.response` contains `AnnotateVideoResponse` (results).", +"flatPath": "v1p3beta1/videos:annotate", +"httpMethod": "POST", +"id": "videointelligence.videos.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p3beta1/videos:annotate", +"request": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoRequest" +}, +"response": { +"$ref": "GoogleLongrunning_Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240327", +"rootUrl": "https://videointelligence.googleapis.com/", +"schemas": { +"GoogleCloudVideointelligenceV1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1beta2_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1beta2_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1beta2_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1beta2_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1beta2_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1beta2_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1beta2_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1beta2_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1beta2_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1beta2_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1beta2_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1beta2_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1beta2_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1beta2_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p1beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p1beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p1beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p1beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p1beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p1beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p1beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p2beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p2beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p2beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoAnnotationResults", +"properties": { +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p2beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p2beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p2beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p2beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress": { +"description": "Video annotation progress. Included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoProgress", +"properties": { +"annotationProgress": { +"description": "Progress metadata for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoRequest": { +"description": "Video annotation request.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoRequest", +"properties": { +"features": { +"description": "Required. Requested video annotation features.", +"items": { +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"CELEBRITY_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Celebrity recognition.", +"Person detection." +], +"type": "string" +}, +"type": "array" +}, +"inputContent": { +"description": "The video data bytes. If unset, the input video(s) should be specified via the `input_uri`. If set, `input_uri` must be unset.", +"format": "byte", +"type": "string" +}, +"inputUri": { +"description": "Input video location. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. URIs must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints). To identify multiple videos, a video URI may include wildcards in the `object-id`. Supported wildcards: '*' to match 0 or more characters; '?' to match 1 character. If unset, the input video should be embedded in the request as `input_content`. If set, `input_content` must be unset.", +"type": "string" +}, +"locationId": { +"description": "Optional. Cloud region where annotation should take place. Supported cloud regions are: `us-east1`, `us-west1`, `europe-west1`, `asia-east1`. If no region is specified, the region will be determined based on video file location.", +"type": "string" +}, +"outputUri": { +"description": "Optional. Location where the output (in JSON format) should be stored. Currently, only [Cloud Storage](https://cloud.google.com/storage/) URIs are supported. These must be specified in the following format: `gs://bucket-id/object-id` (other URI formats return google.rpc.Code.INVALID_ARGUMENT). For more information, see [Request URIs](https://cloud.google.com/storage/docs/request-endpoints).", +"type": "string" +}, +"videoContext": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoContext", +"description": "Additional video context and/or feature-specific parameters." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse": { +"description": "Video annotation response. Included in the `response` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVideointelligenceV1p3beta1_AnnotateVideoResponse", +"properties": { +"annotationResults": { +"description": "Annotation results for all videos specified in `AnnotateVideoRequest`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Celebrity": { +"description": "Celebrity definition.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"properties": { +"description": { +"description": "Textual description of additional information about the celebrity, if applicable.", +"type": "string" +}, +"displayName": { +"description": "The celebrity name.", +"type": "string" +}, +"name": { +"description": "The resource name of the celebrity. Have the format `video-intelligence/kg-mid` indicates a celebrity from preloaded gallery. kg-mid is the id in Google knowledge graph, which is unique for the celebrity.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation": { +"description": "Celebrity recognition annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"properties": { +"celebrityTracks": { +"description": "The tracks detected from the input video, including recognized celebrities and other detected faces in the video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack": { +"description": "The annotation result of a celebrity face track. RecognizedCelebrity field could be empty if the face track does not have any matched celebrities.", +"id": "GoogleCloudVideointelligenceV1p3beta1_CelebrityTrack", +"properties": { +"celebrities": { +"description": "Top N match of the celebrities for the face in this track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity" +}, +"type": "array" +}, +"faceTrack": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track", +"description": "A track of a person's face." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute": { +"description": "A generic detected attribute represented by name in string format.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute", +"properties": { +"confidence": { +"description": "Detected attribute confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of the attribute, for example, glasses, dark_glasses, mouth_open. A full list of supported type names will be provided in the document.", +"type": "string" +}, +"value": { +"description": "Text value of the detection result. For example, the value for \"HairColor\" can be \"black\", \"blonde\", etc.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark": { +"description": "A generic detected landmark represented by name in string format and a 2D location.", +"id": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark", +"properties": { +"confidence": { +"description": "The confidence score of the detected landmark. Range [0, 1].", +"format": "float", +"type": "number" +}, +"name": { +"description": "The name of this landmark, for example, left_hand, right_shoulder.", +"type": "string" +}, +"point": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"description": "The 2D point of the detected landmark using the normalized image coordindate system. The normalized coordinates have the range from 0 to 1." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Entity": { +"description": "Detected entity from video analysis.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"properties": { +"description": { +"description": "Textual description, e.g., `Fixed-gear bicycle`.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"languageCode": { +"description": "Language code for `description` in BCP-47 format.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation": { +"description": "Explicit content annotation (based on per-frame visual signals only). If no explicit content has been detected in a frame, no annotations are present for that frame.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"properties": { +"frames": { +"description": "All video frames where explicit content was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentDetectionConfig": { +"description": "Config for EXPLICIT_CONTENT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentDetectionConfig", +"properties": { +"model": { +"description": "Model to use for explicit content detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame": { +"description": "Video frame level annotation results for explicit content.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentFrame", +"properties": { +"pornographyLikelihood": { +"description": "Likelihood of the pornography content..", +"enum": [ +"LIKELIHOOD_UNSPECIFIED", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unspecified likelihood.", +"Very unlikely.", +"Unlikely.", +"Possible.", +"Likely.", +"Very likely." +], +"type": "string" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation", +"properties": { +"frames": { +"description": "All video frames where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a face was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment" +}, +"type": "array" +}, +"thumbnail": { +"description": "Thumbnail of a representative face view (in JPEG format).", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation": { +"description": "Face detection annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation", +"properties": { +"thumbnail": { +"description": "The thumbnail of a person's face.", +"format": "byte", +"type": "string" +}, +"tracks": { +"description": "The face tracks with attributes.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceDetectionConfig": { +"description": "Config for FACE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable face attributes detection, such as glasses, dark_glasses, mouth_open etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the face annotation output.", +"type": "boolean" +}, +"model": { +"description": "Model to use for face detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceFrame": { +"deprecated": true, +"description": "Deprecated. No effect.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceFrame", +"properties": { +"normalizedBoundingBoxes": { +"description": "Normalized Bounding boxes in a frame. There can be more than one boxes if the same face is detected in multiple locations within the current frame.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox" +}, +"type": "array" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_FaceSegment": { +"description": "Video segment level annotation results for face detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_FaceSegment", +"properties": { +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a face was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation": { +"description": "Label annotation.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation", +"properties": { +"categoryEntities": { +"description": "Common categories for the detected entity. For example, when the label is `Terrier`, the category is likely `dog`. And in some cases there might be more than one categories e.g., `Terrier` could also be a `pet`.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity" +}, +"type": "array" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Detected entity." +}, +"frames": { +"description": "All video frames where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame" +}, +"type": "array" +}, +"segments": { +"description": "All video segments where a label was detected.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelDetectionConfig": { +"description": "Config for LABEL_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelDetectionConfig", +"properties": { +"frameConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from frame-level detection. If not set, it is set to 0.4 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +}, +"labelDetectionMode": { +"description": "What labels should be detected with LABEL_DETECTION, in addition to video-level labels or segment-level labels. If unspecified, defaults to `SHOT_MODE`.", +"enum": [ +"LABEL_DETECTION_MODE_UNSPECIFIED", +"SHOT_MODE", +"FRAME_MODE", +"SHOT_AND_FRAME_MODE" +], +"enumDescriptions": [ +"Unspecified.", +"Detect shot-level labels.", +"Detect frame-level labels.", +"Detect both shot-level and frame-level labels." +], +"type": "string" +}, +"model": { +"description": "Model to use for label detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +}, +"stationaryCamera": { +"description": "Whether the video has been shot from a stationary (i.e., non-moving) camera. When set to true, might improve detection accuracy for moving objects. Should be used with `SHOT_AND_FRAME_MODE` enabled.", +"type": "boolean" +}, +"videoConfidenceThreshold": { +"description": "The confidence threshold we perform filtering on the labels from video-level and shot-level detections. If not set, it's set to 0.3 by default. The valid range for this threshold is [0.1, 0.9]. Any value set outside of this range will be clipped. Note: For best results, follow the default threshold. We will update the default threshold everytime when we release a new model.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelFrame": { +"description": "Video frame level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelFrame", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this location.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LabelSegment": { +"description": "Video segment level annotation results for label detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LabelSegment", +"properties": { +"confidence": { +"description": "Confidence that the label is accurate. Range: [0, 1].", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a label was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation": { +"description": "Annotation corresponding to one detected, tracked and recognized logo class.", +"id": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation", +"properties": { +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity category information to specify the logo class that all the logo tracks within this LogoRecognitionAnnotation are recognized as." +}, +"segments": { +"description": "All video segments where the recognized logo appears. There might be multiple instances of the same logo class appearing in one VideoSegment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"tracks": { +"description": "All logo tracks where the recognized logo appears. Each track corresponds to one logo instance appearing in consecutive frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox": { +"description": "Normalized bounding box. The normalized vertex coordinates are relative to the original image. Range: [0, 1].", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"properties": { +"bottom": { +"description": "Bottom Y coordinate.", +"format": "float", +"type": "number" +}, +"left": { +"description": "Left X coordinate.", +"format": "float", +"type": "number" +}, +"right": { +"description": "Right X coordinate.", +"format": "float", +"type": "number" +}, +"top": { +"description": "Top Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly": { +"description": "Normalized bounding polygon for text (that might not be aligned with axis). Contains list of the corner points in clockwise order starting from top-left corner. For example, for a rectangular bounding box: When the text is horizontal it might look like: 0----1 | | 3----2 When it's clockwise rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3). Note that values can be less than 0, or greater than 1 due to trignometric calculations for location of the box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"properties": { +"vertices": { +"description": "Normalized vertices of the bounding polygon.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVideointelligenceV1p3beta1_NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation": { +"description": "Annotations corresponding to one tracked object.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation", +"properties": { +"confidence": { +"description": "Object category's labeling confidence of this track.", +"format": "float", +"type": "number" +}, +"entity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Entity", +"description": "Entity to specify the object category that this track is labeled as." +}, +"frames": { +"description": "Information corresponding to all frames where this object track appears. Non-streaming batch mode: it may be one or multiple ObjectTrackingFrame messages in frames. Streaming mode: it can only be one ObjectTrackingFrame message in frames.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Non-streaming batch mode ONLY. Each object track corresponds to one video segment where it appears." +}, +"trackId": { +"description": "Streaming mode ONLY. In streaming mode, we do not know the end time of a tracked object before it is completed. Hence, there is no VideoSegment info returned. Instead, we provide a unique identifiable integer track_id so that the customers can correlate the results of the ongoing ObjectTrackAnnotation of the same track_id over time.", +"format": "int64", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingConfig": { +"description": "Config for OBJECT_TRACKING.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingConfig", +"properties": { +"model": { +"description": "Model to use for object tracking. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame": { +"description": "Video frame level annotations for object detection and tracking. This field stores per frame location, time offset, and confidence.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingFrame", +"properties": { +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "The normalized bounding box location of this object track for the frame." +}, +"timeOffset": { +"description": "The timestamp of the frame in microseconds.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation": { +"description": "Person detection annotation per video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation", +"properties": { +"tracks": { +"description": "The detected tracks of a person.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Track" +}, +"type": "array" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_PersonDetectionConfig": { +"description": "Config for PERSON_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionConfig", +"properties": { +"includeAttributes": { +"description": "Whether to enable person attributes detection, such as cloth color (black, blue, etc), type (coat, dress, etc), pattern (plain, floral, etc), hair, etc. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +}, +"includeBoundingBoxes": { +"description": "Whether bounding boxes are included in the person detection annotation output.", +"type": "boolean" +}, +"includePoseLandmarks": { +"description": "Whether to enable pose landmarks detection. Ignored if 'include_bounding_boxes' is set to false.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity": { +"description": "The recognized celebrity with confidence score.", +"id": "GoogleCloudVideointelligenceV1p3beta1_RecognizedCelebrity", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_Celebrity", +"description": "The recognized celebrity." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_ShotChangeDetectionConfig": { +"description": "Config for SHOT_CHANGE_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p3beta1_ShotChangeDetectionConfig", +"properties": { +"model": { +"description": "Model to use for shot change detection. Supported values: \"builtin/stable\" (the default if unset), \"builtin/latest\", and \"builtin/legacy\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechContext": { +"description": "Provides \"hints\" to the speech recognizer to favor specific words and phrases in the results.", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechContext", +"properties": { +"phrases": { +"description": "Optional. A list of strings containing words and phrases \"hints\" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative": { +"description": "Alternative hypotheses (a.k.a. n-best list).", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"transcript": { +"description": "Transcript text representing the words that the user spoke.", +"type": "string" +}, +"words": { +"description": "Output only. A list of word-specific information for each recognized word. Note: When `enable_speaker_diarization` is set to true, you will see all the words from the beginning of the audio.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_WordInfo" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription": { +"description": "A speech recognition result corresponding to a portion of the audio.", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription", +"properties": { +"alternatives": { +"description": "May contain one or more recognition hypotheses (up to the maximum specified in `max_alternatives`). These alternatives are ordered in terms of accuracy, with the top (first) alternative being the most probable, as ranked by the recognizer.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechRecognitionAlternative" +}, +"type": "array" +}, +"languageCode": { +"description": "Output only. The [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag of the language in this result. This language code was detected to have the most likelihood of being spoken in the audio.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_SpeechTranscriptionConfig": { +"description": "Config for SPEECH_TRANSCRIPTION.", +"id": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscriptionConfig", +"properties": { +"audioTracks": { +"description": "Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +}, +"diarizationSpeakerCount": { +"description": "Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to '2'. Ignored unless enable_speaker_diarization is set to true.", +"format": "int32", +"type": "integer" +}, +"enableAutomaticPunctuation": { +"description": "Optional. If 'true', adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default 'false' value does not add punctuation to result hypotheses. NOTE: \"This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature.\"", +"type": "boolean" +}, +"enableSpeakerDiarization": { +"description": "Optional. If 'true', enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.", +"type": "boolean" +}, +"enableWordConfidence": { +"description": "Optional. If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.", +"type": "boolean" +}, +"filterProfanity": { +"description": "Optional. If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, e.g. \"f***\". If set to `false` or omitted, profanities won't be filtered out.", +"type": "boolean" +}, +"languageCode": { +"description": "Required. *Required* The language of the supplied audio as a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: \"en-US\". See [Language Support](https://cloud.google.com/speech/docs/languages) for a list of the currently supported language codes.", +"type": "string" +}, +"maxAlternatives": { +"description": "Optional. Maximum number of recognition hypotheses to be returned. Specifically, the maximum number of `SpeechRecognitionAlternative` messages within each `SpeechTranscription`. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.", +"format": "int32", +"type": "integer" +}, +"speechContexts": { +"description": "Optional. A means to provide context to assist the speech recognition.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechContext" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse": { +"description": "`StreamingAnnotateVideoResponse` is the only message returned to the client by `StreamingAnnotateVideo`. A series of zero or more `StreamingAnnotateVideoResponse` messages are streamed back to the client.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingAnnotateVideoResponse", +"properties": { +"annotationResults": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"description": "Streaming annotation results." +}, +"annotationResultsUri": { +"description": "Google Cloud Storage URI that stores annotation results of one streaming session in JSON format. It is the annotation_result_storage_directory from the request followed by '/cloud_project_number-session_id'.", +"type": "string" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, returns a google.rpc.Status message that specifies the error for the operation." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults": { +"description": "Streaming annotation results corresponding to a portion of the video that is currently being processed. Only ONE type of annotation will be specified in the response.", +"id": "GoogleCloudVideointelligenceV1p3beta1_StreamingVideoAnnotationResults", +"properties": { +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation results." +}, +"frameTimestamp": { +"description": "Timestamp of the processed frame in microseconds.", +"format": "google-duration", +"type": "string" +}, +"labelAnnotations": { +"description": "Label annotation results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Object tracking results.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotation results. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextAnnotation": { +"description": "Annotations related to one detected OCR text snippet. This will contain the corresponding text, confidence value, and frame level information for each detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation", +"properties": { +"segments": { +"description": "All video segments where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextSegment" +}, +"type": "array" +}, +"text": { +"description": "The detected text.", +"type": "string" +}, +"version": { +"description": "Feature version.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextDetectionConfig": { +"description": "Config for TEXT_DETECTION.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextDetectionConfig", +"properties": { +"languageHints": { +"description": "Language hint can be specified if the language to be detected is known a priori. It can increase the accuracy of the detection. Language hint must be language code in BCP-47 format. Automatic language detection is performed if no hint is provided.", +"items": { +"type": "string" +}, +"type": "array" +}, +"model": { +"description": "Model to use for text detection. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\".", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextFrame": { +"description": "Video frame level annotation results for text annotation (OCR). Contains information regarding timestamp and bounding box locations for the frames containing detected OCR text snippets.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextFrame", +"properties": { +"rotatedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingPoly", +"description": "Bounding polygon of the detected text for this frame." +}, +"timeOffset": { +"description": "Timestamp of this frame.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TextSegment": { +"description": "Video segment level annotation results for text detection.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TextSegment", +"properties": { +"confidence": { +"description": "Confidence for the track of detected text. It is calculated as the highest over all frames where OCR detected text appears.", +"format": "float", +"type": "number" +}, +"frames": { +"description": "Information related to the frames where OCR detected text appears.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextFrame" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment where a text snippet was detected." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_TimestampedObject": { +"description": "For tracking related features. An object at time_offset with attributes, and located with normalized_bounding_box.", +"id": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject", +"properties": { +"attributes": { +"description": "Optional. The attributes of the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"landmarks": { +"description": "Optional. The detected landmarks.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedLandmark" +}, +"type": "array" +}, +"normalizedBoundingBox": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_NormalizedBoundingBox", +"description": "Normalized Bounding box in a frame, where the object is located." +}, +"timeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the video frame for this object.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_Track": { +"description": "A track of an object instance.", +"id": "GoogleCloudVideointelligenceV1p3beta1_Track", +"properties": { +"attributes": { +"description": "Optional. Attributes in the track level.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_DetectedAttribute" +}, +"type": "array" +}, +"confidence": { +"description": "Optional. The confidence score of the tracked object.", +"format": "float", +"type": "number" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment of a track." +}, +"timestampedObjects": { +"description": "The object with timestamp and attributes per frame in the track.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TimestampedObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress": { +"description": "Annotation progress for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationProgress", +"properties": { +"feature": { +"description": "Specifies which feature is being tracked if the request contains more than one feature.", +"enum": [ +"FEATURE_UNSPECIFIED", +"LABEL_DETECTION", +"SHOT_CHANGE_DETECTION", +"EXPLICIT_CONTENT_DETECTION", +"FACE_DETECTION", +"SPEECH_TRANSCRIPTION", +"TEXT_DETECTION", +"OBJECT_TRACKING", +"LOGO_RECOGNITION", +"CELEBRITY_RECOGNITION", +"PERSON_DETECTION" +], +"enumDescriptions": [ +"Unspecified.", +"Label detection. Detect objects, such as dog or flower.", +"Shot change detection.", +"Explicit content detection.", +"Human face detection.", +"Speech transcription.", +"OCR text detection and tracking.", +"Object detection and tracking.", +"Logo detection, tracking, and recognition.", +"Celebrity recognition.", +"Person detection." +], +"type": "string" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"progressPercent": { +"description": "Approximate percentage processed thus far. Guaranteed to be 100 when fully processed.", +"format": "int32", +"type": "integer" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Specifies which segment is being tracked if the request contains more than one segment." +}, +"startTime": { +"description": "Time when the request was received.", +"format": "google-datetime", +"type": "string" +}, +"updateTime": { +"description": "Time of the most recent update.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults": { +"description": "Annotation results for a single video.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoAnnotationResults", +"properties": { +"celebrityRecognitionAnnotations": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_CelebrityRecognitionAnnotation", +"description": "Celebrity recognition annotations." +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "If set, indicates an error. Note that for a single `AnnotateVideoRequest` some videos may succeed and some may fail." +}, +"explicitAnnotation": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentAnnotation", +"description": "Explicit content annotation." +}, +"faceAnnotations": { +"deprecated": true, +"description": "Deprecated. Please use `face_detection_annotations` instead.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceAnnotation" +}, +"type": "array" +}, +"faceDetectionAnnotations": { +"description": "Face detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionAnnotation" +}, +"type": "array" +}, +"frameLabelAnnotations": { +"description": "Label annotations on frame level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"inputUri": { +"description": "Video file location in [Cloud Storage](https://cloud.google.com/storage/).", +"type": "string" +}, +"logoRecognitionAnnotations": { +"description": "Annotations for list of logos detected, tracked and recognized in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LogoRecognitionAnnotation" +}, +"type": "array" +}, +"objectAnnotations": { +"description": "Annotations for list of objects detected and tracked in video.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingAnnotation" +}, +"type": "array" +}, +"personDetectionAnnotations": { +"description": "Person detection annotations.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionAnnotation" +}, +"type": "array" +}, +"segment": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"description": "Video segment on which the annotation is run." +}, +"segmentLabelAnnotations": { +"description": "Topical label annotations on video level or user-specified segment level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"segmentPresenceLabelAnnotations": { +"description": "Presence label annotations on video level or user-specified segment level. There is exactly one element for each unique label. Compared to the existing topical `segment_label_annotations`, this field presents more fine-grained, segment-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotAnnotations": { +"description": "Shot annotations. Each shot is represented as a video segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"shotLabelAnnotations": { +"description": "Topical label annotations on shot level. There is exactly one element for each unique label.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"shotPresenceLabelAnnotations": { +"description": "Presence label annotations on shot level. There is exactly one element for each unique label. Compared to the existing topical `shot_label_annotations`, this field presents more fine-grained, shot-level labels detected in video content and is made available only when the client sets `LabelDetectionConfig.model` to \"builtin/latest\" in the request.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelAnnotation" +}, +"type": "array" +}, +"speechTranscriptions": { +"description": "Speech transcription.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscription" +}, +"type": "array" +}, +"textAnnotations": { +"description": "OCR text detection and tracking. Annotations for list of detected text snippets. Each will have list of frame information associated with it.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextAnnotation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoContext": { +"description": "Video context and/or feature-specific parameters.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoContext", +"properties": { +"explicitContentDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ExplicitContentDetectionConfig", +"description": "Config for EXPLICIT_CONTENT_DETECTION." +}, +"faceDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_FaceDetectionConfig", +"description": "Config for FACE_DETECTION." +}, +"labelDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_LabelDetectionConfig", +"description": "Config for LABEL_DETECTION." +}, +"objectTrackingConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ObjectTrackingConfig", +"description": "Config for OBJECT_TRACKING." +}, +"personDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_PersonDetectionConfig", +"description": "Config for PERSON_DETECTION." +}, +"segments": { +"description": "Video segments to annotate. The segments may overlap and are not required to be contiguous or span the whole video. If unspecified, each video is treated as a single segment.", +"items": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment" +}, +"type": "array" +}, +"shotChangeDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_ShotChangeDetectionConfig", +"description": "Config for SHOT_CHANGE_DETECTION." +}, +"speechTranscriptionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_SpeechTranscriptionConfig", +"description": "Config for SPEECH_TRANSCRIPTION." +}, +"textDetectionConfig": { +"$ref": "GoogleCloudVideointelligenceV1p3beta1_TextDetectionConfig", +"description": "Config for TEXT_DETECTION." +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_VideoSegment": { +"description": "Video segment.", +"id": "GoogleCloudVideointelligenceV1p3beta1_VideoSegment", +"properties": { +"endTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the end of the segment (inclusive).", +"format": "google-duration", +"type": "string" +}, +"startTimeOffset": { +"description": "Time-offset, relative to the beginning of the video, corresponding to the start of the segment (inclusive).", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVideointelligenceV1p3beta1_WordInfo": { +"description": "Word-specific information for recognized words. Word information is only included in the response when certain request parameters are set, such as `enable_word_time_offsets`.", +"id": "GoogleCloudVideointelligenceV1p3beta1_WordInfo", +"properties": { +"confidence": { +"description": "Output only. The confidence estimate between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. This field is set only for the top alternative. This field is not guaranteed to be accurate and users should not rely on it to be always provided. The default of 0.0 is a sentinel value indicating `confidence` was not set.", +"format": "float", +"readOnly": true, +"type": "number" +}, +"endTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the end of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"speakerTag": { +"description": "Output only. A distinct integer value is assigned for every speaker within the audio. This field specifies which one of those speakers was detected to have spoken this word. Value ranges from 1 up to diarization_speaker_count, and is only set if speaker diarization is enabled.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"startTime": { +"description": "Time offset relative to the beginning of the audio, and corresponding to the start of the spoken word. This field is only set if `enable_word_time_offsets=true` and only in the top hypothesis. This is an experimental feature and the accuracy of the time offset can vary.", +"format": "google-duration", +"type": "string" +}, +"word": { +"description": "The word corresponding to this set of information.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleLongrunning_Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunning_Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpc_Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleRpc_Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpc_Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Video Intelligence API", +"version": "v1p3beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..c75e1d26815458b5f675cdf4cd8dacf5a9c4c651 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1.json @@ -0,0 +1,9410 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-vision": { +"description": "Apply machine learning models to understand and label images" +} +} +} +}, +"basePath": "", +"baseUrl": "https://vision.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Vision", +"description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/vision/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vision:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vision.mtls.googleapis.com/", +"name": "vision", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1/files:annotate", +"httpMethod": "POST", +"id": "vision.files.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1/files:annotate", +"request": { +"$ref": "BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.files.asyncBatchAnnotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1/files:asyncBatchAnnotate", +"request": { +"$ref": "AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1/images:annotate", +"httpMethod": "POST", +"id": "vision.images.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1/images:annotate", +"request": { +"$ref": "BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.images.asyncBatchAnnotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1/images:asyncBatchAnnotate", +"request": { +"$ref": "AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"locations": { +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vision.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "vision.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "vision.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "vision.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/operations", +"httpMethod": "GET", +"id": "vision.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^operations$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"projects": { +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1/projects/{projectsId}/files:annotate", +"httpMethod": "POST", +"id": "vision.projects.files.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/files:annotate", +"request": { +"$ref": "BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1/projects/{projectsId}/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.files.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/files:asyncBatchAnnotate", +"request": { +"$ref": "AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1/projects/{projectsId}/images:annotate", +"httpMethod": "POST", +"id": "vision.projects.images.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/images:annotate", +"request": { +"$ref": "BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1/projects/{projectsId}/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.images.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/images:asyncBatchAnnotate", +"request": { +"$ref": "AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"locations": { +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/files:annotate", +"httpMethod": "POST", +"id": "vision.projects.locations.files.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/files:annotate", +"request": { +"$ref": "BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.locations.files.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/files:asyncBatchAnnotate", +"request": { +"$ref": "AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/images:annotate", +"httpMethod": "POST", +"id": "vision.projects.locations.images.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/images:annotate", +"request": { +"$ref": "BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.locations.images.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/images:asyncBatchAnnotate", +"request": { +"$ref": "AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vision.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"productSets": { +"methods": { +"addProduct": { +"description": "Adds a Product to the specified ProductSet. If the Product is already present, no change is made. One Product can be added to at most 100 ProductSets. Possible errors: * Returns NOT_FOUND if the Product or the ProductSet doesn't exist.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}:addProduct", +"httpMethod": "POST", +"id": "vision.projects.locations.productSets.addProduct", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for the ProductSet to modify. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:addProduct", +"request": { +"$ref": "AddProductToProductSetRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"create": { +"description": "Creates and returns a new ProductSet resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing, or is longer than 4096 characters.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets", +"httpMethod": "POST", +"id": "vision.projects.locations.productSets.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project in which the ProductSet should be created. Format is `projects/PROJECT_ID/locations/LOC_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"productSetId": { +"description": "A user-supplied resource id for this ProductSet. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character `/`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/productSets", +"request": { +"$ref": "ProductSet" +}, +"response": { +"$ref": "ProductSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"delete": { +"description": "Permanently deletes a ProductSet. Products and ReferenceImages in the ProductSet are not deleted. The actual image files are not deleted from Google Cloud Storage.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}", +"httpMethod": "DELETE", +"id": "vision.projects.locations.productSets.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the ProductSet to delete. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"get": { +"description": "Gets information associated with a ProductSet. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}", +"httpMethod": "GET", +"id": "vision.projects.locations.productSets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the ProductSet to get. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ProductSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"import": { +"description": "Asynchronous API that imports a list of reference images to specified product sets based on a list of image information. The google.longrunning.Operation API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress) `Operation.response` contains `ImportProductSetsResponse`. (results) The input source of this method is a csv file on Google Cloud Storage. For the format of the csv file please see ImportProductSetsGcsSource.csv_file_uri.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets:import", +"httpMethod": "POST", +"id": "vision.projects.locations.productSets.import", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project in which the ProductSets should be imported. Format is `projects/PROJECT_ID/locations/LOC_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/productSets:import", +"request": { +"$ref": "ImportProductSetsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"list": { +"description": "Lists ProductSets in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100, or less than 1.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets", +"httpMethod": "GET", +"id": "vision.projects.locations.productSets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return. Default 10, maximum 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project from which ProductSets should be listed. Format is `projects/PROJECT_ID/locations/LOC_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/productSets", +"response": { +"$ref": "ListProductSetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"patch": { +"description": "Makes changes to a ProductSet resource. Only display_name can be updated currently. Possible errors: * Returns NOT_FOUND if the ProductSet does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but missing from the request or longer than 4096 characters.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}", +"httpMethod": "PATCH", +"id": "vision.projects.locations.productSets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ProductSet. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. This field is ignored when creating a ProductSet.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask that specifies which fields to update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask path is `display_name`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ProductSet" +}, +"response": { +"$ref": "ProductSet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"removeProduct": { +"description": "Removes a Product from the specified ProductSet.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}:removeProduct", +"httpMethod": "POST", +"id": "vision.projects.locations.productSets.removeProduct", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name for the ProductSet to modify. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:removeProduct", +"request": { +"$ref": "RemoveProductFromProductSetRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +}, +"resources": { +"products": { +"methods": { +"list": { +"description": "Lists the Products in a ProductSet, in an unspecified order. If the ProductSet does not exist, the products field of the response will be empty. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/productSets/{productSetsId}/products", +"httpMethod": "GET", +"id": "vision.projects.locations.productSets.products.list", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ProductSet resource for which to retrieve Products. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/productSets/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return. Default 10, maximum 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token returned from a previous List request, if any.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/products", +"response": { +"$ref": "ListProductsInProductSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +} +} +}, +"products": { +"methods": { +"create": { +"description": "Creates and returns a new product resource. Possible errors: * Returns INVALID_ARGUMENT if display_name is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is missing or invalid.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products", +"httpMethod": "POST", +"id": "vision.projects.locations.products.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project in which the Product should be created. Format is `projects/PROJECT_ID/locations/LOC_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"productId": { +"description": "A user-supplied resource id for this Product. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character `/`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/products", +"request": { +"$ref": "Product" +}, +"response": { +"$ref": "Product" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"delete": { +"description": "Permanently deletes a product and its reference images. Metadata of the product and all its images will be deleted right away, but search queries against ProductSets containing the product may still work until all related caches are refreshed.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}", +"httpMethod": "DELETE", +"id": "vision.projects.locations.products.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of product to delete. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"get": { +"description": "Gets information associated with a Product. Possible errors: * Returns NOT_FOUND if the Product does not exist.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}", +"httpMethod": "GET", +"id": "vision.projects.locations.products.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the Product to get. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Product" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"list": { +"description": "Lists products in an unspecified order. Possible errors: * Returns INVALID_ARGUMENT if page_size is greater than 100 or less than 1.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products", +"httpMethod": "GET", +"id": "vision.projects.locations.products.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return. Default 10, maximum 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The next_page_token returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project OR ProductSet from which Products should be listed. Format: `projects/PROJECT_ID/locations/LOC_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/products", +"response": { +"$ref": "ListProductsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"patch": { +"description": "Makes changes to a Product resource. Only the `display_name`, `description`, and `labels` fields can be updated right now. If labels are updated, the change will not be reflected in queries until the next index time. Possible errors: * Returns NOT_FOUND if the Product does not exist. * Returns INVALID_ARGUMENT if display_name is present in update_mask but is missing from the request or longer than 4096 characters. * Returns INVALID_ARGUMENT if description is present in update_mask but is longer than 4096 characters. * Returns INVALID_ARGUMENT if product_category is present in update_mask.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}", +"httpMethod": "PATCH", +"id": "vision.projects.locations.products.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The FieldMask that specifies which fields to update. If update_mask isn't specified, all mutable fields are to be updated. Valid mask paths include `product_labels`, `display_name`, and `description`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Product" +}, +"response": { +"$ref": "Product" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"purge": { +"description": "Asynchronous API to delete all Products in a ProductSet or all Products that are in no ProductSet. If a Product is a member of the specified ProductSet in addition to other ProductSets, the Product will still be deleted. It is recommended to not delete the specified ProductSet until after this operation has completed. It is also recommended to not add any of the Products involved in the batch delete to a new ProductSet while this operation is running because those Products may still end up deleted. It's not possible to undo the PurgeProducts operation. Therefore, it is recommended to keep the csv files used in ImportProductSets (if that was how you originally built the Product Set) before starting PurgeProducts, in case you need to re-import the data after deletion. If the plan is to purge all of the Products from a ProductSet and then re-use the empty ProductSet to re-import new Products into the empty ProductSet, you must wait until the PurgeProducts operation has finished for that ProductSet. The google.longrunning.Operation API can be used to keep track of the progress and results of the request. `Operation.metadata` contains `BatchOperationMetadata`. (progress)", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products:purge", +"httpMethod": "POST", +"id": "vision.projects.locations.products.purge", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The project and location in which the Products should be deleted. Format is `projects/PROJECT_ID/locations/LOC_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/products:purge", +"request": { +"$ref": "PurgeProductsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +}, +"resources": { +"referenceImages": { +"methods": { +"create": { +"description": "Creates and returns a new ReferenceImage resource. The `bounding_poly` field is optional. If `bounding_poly` is not specified, the system will try to detect regions of interest in the image that are compatible with the product_category on the parent product. If it is specified, detection is ALWAYS skipped. The system converts polygons into non-rotated rectangles. Note that the pipeline will resize the image if the image resolution is too large to process (above 50MP). Possible errors: * Returns INVALID_ARGUMENT if the image_uri is missing or longer than 4096 characters. * Returns INVALID_ARGUMENT if the product does not exist. * Returns INVALID_ARGUMENT if bounding_poly is not provided, and nothing compatible with the parent product's product_category is detected. * Returns INVALID_ARGUMENT if bounding_poly contains more than 10 polygons.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages", +"httpMethod": "POST", +"id": "vision.projects.locations.products.referenceImages.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Resource name of the product in which to create the reference image. Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$", +"required": true, +"type": "string" +}, +"referenceImageId": { +"description": "A user-supplied resource id for the ReferenceImage to be added. If set, the server will attempt to use this value as the resource id. If it is already in use, an error is returned with code ALREADY_EXISTS. Must be at most 128 characters long. It cannot contain the character `/`.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/referenceImages", +"request": { +"$ref": "ReferenceImage" +}, +"response": { +"$ref": "ReferenceImage" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"delete": { +"description": "Permanently deletes a reference image. The image metadata will be deleted right away, but search queries against ProductSets containing the image may still work until all related caches are refreshed. The actual image files are not deleted from Google Cloud Storage.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages/{referenceImagesId}", +"httpMethod": "DELETE", +"id": "vision.projects.locations.products.referenceImages.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the reference image to delete. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"get": { +"description": "Gets information associated with a ReferenceImage. Possible errors: * Returns NOT_FOUND if the specified image does not exist.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages/{referenceImagesId}", +"httpMethod": "GET", +"id": "vision.projects.locations.products.referenceImages.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ReferenceImage to get. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+/referenceImages/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ReferenceImage" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"list": { +"description": "Lists reference images. Possible errors: * Returns NOT_FOUND if the parent product does not exist. * Returns INVALID_ARGUMENT if the page_size is greater than 100, or less than 1.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/products/{productsId}/referenceImages", +"httpMethod": "GET", +"id": "vision.projects.locations.products.referenceImages.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of items to return. Default 10, maximum 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This is the value of `nextPageToken` returned in a previous reference image list request. Defaults to the first page if not specified.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Resource name of the product containing the reference images. Format is `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/products/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/referenceImages", +"response": { +"$ref": "ListReferenceImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +} +} +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vision.projects.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://vision.googleapis.com/", +"schemas": { +"AddProductToProductSetRequest": { +"description": "Request message for the `AddProductToProductSet` method.", +"id": "AddProductToProductSetRequest", +"properties": { +"product": { +"description": "Required. The resource name for the Product to be added to this ProductSet. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`", +"type": "string" +} +}, +"type": "object" +}, +"AnnotateFileRequest": { +"description": "A request to annotate one single file, e.g. a PDF, TIFF or GIF file.", +"id": "AnnotateFileRequest", +"properties": { +"features": { +"description": "Required. Requested features.", +"items": { +"$ref": "Feature" +}, +"type": "array" +}, +"imageContext": { +"$ref": "ImageContext", +"description": "Additional context that may accompany the image(s) in the file." +}, +"inputConfig": { +"$ref": "InputConfig", +"description": "Required. Information about the input file." +}, +"pages": { +"description": "Pages of the file to perform image annotation. Pages starts from 1, we assume the first page of the file is page 1. At most 5 pages are supported per request. Pages can be negative. Page 1 means the first page. Page 2 means the second page. Page -1 means the last page. Page -2 means the second to the last page. If the file is GIF instead of PDF or TIFF, page refers to GIF frames. If this field is empty, by default the service performs image annotation for the first 5 pages of the file.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AnnotateImageRequest": { +"description": "Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features, and with context information.", +"id": "AnnotateImageRequest", +"properties": { +"features": { +"description": "Requested features.", +"items": { +"$ref": "Feature" +}, +"type": "array" +}, +"image": { +"$ref": "Image", +"description": "The image to be processed." +}, +"imageContext": { +"$ref": "ImageContext", +"description": "Additional context that may accompany the image." +} +}, +"type": "object" +}, +"AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "AnnotateImageResponse", +"properties": { +"context": { +"$ref": "ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"AsyncAnnotateFileRequest": { +"description": "An offline file annotation request.", +"id": "AsyncAnnotateFileRequest", +"properties": { +"features": { +"description": "Required. Requested features.", +"items": { +"$ref": "Feature" +}, +"type": "array" +}, +"imageContext": { +"$ref": "ImageContext", +"description": "Additional context that may accompany the image(s) in the file." +}, +"inputConfig": { +"$ref": "InputConfig", +"description": "Required. Information about the input file." +}, +"outputConfig": { +"$ref": "OutputConfig", +"description": "Required. The desired output location and metadata (e.g. format)." +} +}, +"type": "object" +}, +"AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"AsyncBatchAnnotateFilesRequest": { +"description": "Multiple async file annotation requests are batched into a single service call.", +"id": "AsyncBatchAnnotateFilesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual async file annotation requests for this batch.", +"items": { +"$ref": "AsyncAnnotateFileRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"AsyncBatchAnnotateImagesRequest": { +"description": "Request for async image annotation for a list of images.", +"id": "AsyncBatchAnnotateImagesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"outputConfig": { +"$ref": "OutputConfig", +"description": "Required. The desired output location and metadata (e.g. format)." +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual image annotation requests for this batch.", +"items": { +"$ref": "AnnotateImageRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"AsyncBatchAnnotateImagesResponse": { +"description": "Response to an async batch image annotation request.", +"id": "AsyncBatchAnnotateImagesResponse", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "The output location and metadata from AsyncBatchAnnotateImagesRequest." +} +}, +"type": "object" +}, +"BatchAnnotateFilesRequest": { +"description": "A list of requests to annotate files using the BatchAnnotateFiles API.", +"id": "BatchAnnotateFilesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. The list of file annotation requests. Right now we support only one AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "AnnotateFileRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchAnnotateImagesRequest": { +"description": "Multiple image annotation requests are batched into a single service call.", +"id": "BatchAnnotateImagesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual image annotation requests for this batch.", +"items": { +"$ref": "AnnotateImageRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchAnnotateImagesResponse": { +"description": "Response to a batch image annotation request.", +"id": "BatchAnnotateImagesResponse", +"properties": { +"responses": { +"description": "Individual responses to image annotation requests within the batch.", +"items": { +"$ref": "AnnotateImageResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Block": { +"description": "Logical element on the page.", +"id": "Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Color": { +"description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value\u2014for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", +"id": "Color", +"properties": { +"alpha": { +"description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", +"format": "float", +"type": "number" +}, +"blue": { +"description": "The amount of blue in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"green": { +"description": "The amount of green in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"red": { +"description": "The amount of red in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "CropHint", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"CropHintsParams": { +"description": "Parameters for crop hints annotation request.", +"id": "CropHintsParams", +"properties": { +"aspectRatios": { +"description": "Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.", +"items": { +"format": "float", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"DetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "DetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"DetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "DetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "Landmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"Feature": { +"description": "The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list.", +"id": "Feature", +"properties": { +"maxResults": { +"description": "Maximum number of results of this type. Does not apply to `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.", +"format": "int32", +"type": "integer" +}, +"model": { +"description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support \"builtin/weekly\" for the bleeding edge release updated weekly.", +"type": "string" +}, +"type": { +"description": "The feature type.", +"enum": [ +"TYPE_UNSPECIFIED", +"FACE_DETECTION", +"LANDMARK_DETECTION", +"LOGO_DETECTION", +"LABEL_DETECTION", +"TEXT_DETECTION", +"DOCUMENT_TEXT_DETECTION", +"SAFE_SEARCH_DETECTION", +"IMAGE_PROPERTIES", +"CROP_HINTS", +"WEB_DETECTION", +"PRODUCT_SEARCH", +"OBJECT_LOCALIZATION" +], +"enumDescriptions": [ +"Unspecified feature type.", +"Run face detection.", +"Run landmark detection.", +"Run logo detection.", +"Run label detection.", +"Run text detection / optical character recognition (OCR). Text detection is optimized for areas of text within a larger image; if the image is a document, use `DOCUMENT_TEXT_DETECTION` instead.", +"Run dense text document OCR. Takes precedence when both `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.", +"Run Safe Search to detect potentially unsafe or undesirable content.", +"Compute a set of image properties, such as the image's dominant colors.", +"Run crop hints.", +"Run web detection.", +"Run Product Search.", +"Run localizer for object detection." +], +"type": "string" +} +}, +"type": "object" +}, +"GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p1beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p1beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p1beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p1beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p1beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p1beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p1beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p1beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p1beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p1beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p1beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p1beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p1beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p1beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p1beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p1beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p1beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p1beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p1beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p1beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p1beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p1beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p1beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p1beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p1beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p1beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p1beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p1beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p1beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p1beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p1beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p1beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p1beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p1beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p1beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p1beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p2beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p2beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p2beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p2beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p2beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p2beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p2beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p2beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p2beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p2beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p2beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p2beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p2beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p2beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p2beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p2beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p2beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p2beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p2beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p2beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p2beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p2beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p2beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p2beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p2beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p2beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p2beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p2beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p2beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p2beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p2beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p2beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p2beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p2beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p2beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p2beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p3beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p3beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p3beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p3beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p3beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVisionV1p3beta1BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p3beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p3beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p3beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p3beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p3beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p3beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p3beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p3beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p3beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p3beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p3beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p3beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p3beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p3beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "GoogleCloudVisionV1p3beta1ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p3beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p3beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p3beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p3beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p3beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p3beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p3beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p3beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p3beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p3beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p3beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p3beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p3beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p3beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "GoogleCloudVisionV1p3beta1ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p3beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p3beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p3beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p3beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p3beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p4beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p4beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p4beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse": { +"description": "Response to an async batch image annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1OutputConfig", +"description": "The output location and metadata from AsyncBatchAnnotateImagesRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVisionV1p4beta1BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p4beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p4beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Celebrity": { +"description": "A Celebrity is a group of Faces with an identity.", +"id": "GoogleCloudVisionV1p4beta1Celebrity", +"properties": { +"description": { +"description": "The Celebrity's description.", +"type": "string" +}, +"displayName": { +"description": "The Celebrity's display name.", +"type": "string" +}, +"name": { +"description": "The resource name of the preloaded Celebrity. Has the format `builtin/{mid}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p4beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p4beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p4beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p4beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p4beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p4beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"recognitionResult": { +"description": "Additional recognition information. Only computed if image_context.face_recognition_params is provided, **and** a match is found to a Celebrity in the input CelebritySet. This field is sorted in order of decreasing confidence values.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceRecognitionResult" +}, +"type": "array" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p4beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceRecognitionResult": { +"description": "Information about a face's identity.", +"id": "GoogleCloudVisionV1p4beta1FaceRecognitionResult", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVisionV1p4beta1Celebrity", +"description": "The Celebrity that this face was matched to." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p4beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p4beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p4beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p4beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p4beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "GoogleCloudVisionV1p4beta1ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p4beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p4beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p4beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p4beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p4beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p4beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p4beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p4beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p4beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p4beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p4beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p4beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p4beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p4beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "GoogleCloudVisionV1p4beta1ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p4beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p4beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p4beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p4beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p4beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GroupedResult", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "ObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "Result" +}, +"type": "array" +} +}, +"type": "object" +}, +"Image": { +"description": "Client image to perform Google Cloud Vision API tasks over.", +"id": "Image", +"properties": { +"content": { +"description": "Image content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateImages requests. It does not work for AsyncBatchAnnotateImages requests.", +"format": "byte", +"type": "string" +}, +"source": { +"$ref": "ImageSource", +"description": "Google Cloud Storage image location, or publicly-accessible image URL. If both `content` and `source` are provided for an image, `content` takes precedence and is used to perform the image annotation request." +} +}, +"type": "object" +}, +"ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"ImageContext": { +"description": "Image context and/or feature-specific parameters.", +"id": "ImageContext", +"properties": { +"cropHintsParams": { +"$ref": "CropHintsParams", +"description": "Parameters for crop hints annotation request." +}, +"languageHints": { +"description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).", +"items": { +"type": "string" +}, +"type": "array" +}, +"latLongRect": { +"$ref": "LatLongRect", +"description": "Not used." +}, +"productSearchParams": { +"$ref": "ProductSearchParams", +"description": "Parameters for product search." +}, +"textDetectionParams": { +"$ref": "TextDetectionParams", +"description": "Parameters for text detection and document text detection." +}, +"webDetectionParams": { +"$ref": "WebDetectionParams", +"description": "Parameters for web detection." +} +}, +"type": "object" +}, +"ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "ImageProperties", +"properties": { +"dominantColors": { +"$ref": "DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"ImageSource": { +"description": "External image source (Google Cloud Storage or web URL image location).", +"id": "ImageSource", +"properties": { +"gcsImageUri": { +"description": "**Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", +"type": "string" +}, +"imageUri": { +"description": "The URI of the source image. Can be either: 1. A Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production applications. When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes precedence.", +"type": "string" +} +}, +"type": "object" +}, +"ImportProductSetsGcsSource": { +"description": "The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line.", +"id": "ImportProductSetsGcsSource", +"properties": { +"csvFileUri": { +"description": "The Google Cloud Storage URI of the input csv file. The URI must start with `gs://`. The format of the input csv file should be one image per line. In each line, there are 8 columns. 1. image-uri 2. image-id 3. product-set-id 4. product-id 5. product-category 6. product-display-name 7. labels 8. bounding-poly The `image-uri`, `product-set-id`, `product-id`, and `product-category` columns are required. All other columns are optional. If the `ProductSet` or `Product` specified by the `product-set-id` and `product-id` values does not exist, then the system will create a new `ProductSet` or `Product` for the image. In this case, the `product-display-name` column refers to display_name, the `product-category` column refers to product_category, and the `labels` column refers to product_labels. The `image-id` column is optional but must be unique if provided. If it is empty, the system will automatically assign a unique id to the image. The `product-display-name` column is optional. If it is empty, the system sets the display_name field for the product to a space (\" \"). You can update the `display_name` later by using the API. If a `Product` with the specified `product-id` already exists, then the system ignores the `product-display-name`, `product-category`, and `labels` columns. The `labels` column (optional) is a line containing a list of comma-separated key-value pairs, in the following format: \"key_1=value_1,key_2=value_2,...,key_n=value_n\" The `bounding-poly` column (optional) identifies one region of interest from the image in the same manner as `CreateReferenceImage`. If you do not specify the `bounding-poly` column, then the system will try to detect regions of interest automatically. At most one `bounding-poly` column is allowed per line. If the image contains multiple regions of interest, add a line to the CSV file that includes the same product information, and the `bounding-poly` values for each region of interest. The `bounding-poly` column must contain an even number of comma-separated numbers, in the format \"p1_x,p1_y,p2_x,p2_y,...,pn_x,pn_y\". Use non-negative integers for absolute bounding polygons, and float values in [0, 1] for normalized bounding polygons. The system will resize the image if the image resolution is too large to process (larger than 20MP).", +"type": "string" +} +}, +"type": "object" +}, +"ImportProductSetsInputConfig": { +"description": "The input content for the `ImportProductSets` method.", +"id": "ImportProductSetsInputConfig", +"properties": { +"gcsSource": { +"$ref": "ImportProductSetsGcsSource", +"description": "The Google Cloud Storage location for a csv file which preserves a list of ImportProductSetRequests in each line." +} +}, +"type": "object" +}, +"ImportProductSetsRequest": { +"description": "Request message for the `ImportProductSets` method.", +"id": "ImportProductSetsRequest", +"properties": { +"inputConfig": { +"$ref": "ImportProductSetsInputConfig", +"description": "Required. The input content for the list of requests." +} +}, +"type": "object" +}, +"ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"InputConfig": { +"description": "The desired input location and metadata.", +"id": "InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"KeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "KeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"Landmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "Landmark", +"properties": { +"position": { +"$ref": "Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"LatLng": { +"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", +"id": "LatLng", +"properties": { +"latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"LatLongRect": { +"description": "Rectangle determined by min and max `LatLng` pairs.", +"id": "LatLongRect", +"properties": { +"maxLatLng": { +"$ref": "LatLng", +"description": "Max lat/long pair." +}, +"minLatLng": { +"$ref": "LatLng", +"description": "Min lat/long pair." +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListProductSetsResponse": { +"description": "Response message for the `ListProductSets` method.", +"id": "ListProductSetsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"productSets": { +"description": "List of ProductSets.", +"items": { +"$ref": "ProductSet" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListProductsInProductSetResponse": { +"description": "Response message for the `ListProductsInProductSet` method.", +"id": "ListProductsInProductSetResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"products": { +"description": "The list of Products.", +"items": { +"$ref": "Product" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListProductsResponse": { +"description": "Response message for the `ListProducts` method.", +"id": "ListProductsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"products": { +"description": "List of products.", +"items": { +"$ref": "Product" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListReferenceImagesResponse": { +"description": "Response message for the `ListReferenceImages` method.", +"id": "ListReferenceImagesResponse", +"properties": { +"nextPageToken": { +"description": "The next_page_token returned from a previous List request, if any.", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of items to return. Default 10, maximum 100.", +"format": "int32", +"type": "integer" +}, +"referenceImages": { +"description": "The list of reference images.", +"items": { +"$ref": "ReferenceImage" +}, +"type": "array" +} +}, +"type": "object" +}, +"LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"LocationInfo": { +"description": "Detected entity location information.", +"id": "LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"ObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "ObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OutputConfig": { +"description": "The desired output location and metadata.", +"id": "OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"Page": { +"description": "Detected page from OCR.", +"id": "Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "Paragraph", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"Product": { +"description": "A Product contains ReferenceImages.", +"id": "Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "KeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"ProductSearchParams": { +"description": "Parameters for a product search request.", +"id": "ProductSearchParams", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied." +}, +"filter": { +"description": "The filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within an OR must have the same key. An '=' should be used to connect the key and value. For example, \"(color = red OR color = blue) AND brand = Google\" is acceptable, but \"(color = red OR brand = Google)\" is not acceptable. \"color: red\" is not acceptable because it uses a ':' instead of an '='.", +"type": "string" +}, +"productCategories": { +"description": "The list of product categories to search in. Currently, we only consider the first category, and either \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\", or \"general-v1\" should be specified. The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported but will be deprecated. For new products, please use \"homegoods-v2\", \"apparel-v2\", or \"toys-v2\" for better product search accuracy. It is recommended to migrate existing products to these categories as well.", +"items": { +"type": "string" +}, +"type": "array" +}, +"productSet": { +"description": "The resource name of a ProductSet to be searched for similar images. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.", +"type": "string" +} +}, +"type": "object" +}, +"ProductSearchResults": { +"description": "Results for a product search request.", +"id": "ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "Result" +}, +"type": "array" +} +}, +"type": "object" +}, +"ProductSet": { +"description": "A ProductSet contains Products. A ProductSet can contain a maximum of 1 million reference images. If the limit is exceeded, periodic indexing will fail.", +"id": "ProductSet", +"properties": { +"displayName": { +"description": "The user-provided name for this ProductSet. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"indexError": { +"$ref": "Status", +"description": "Output only. If there was an error with indexing the product set, the field is populated. This field is ignored when creating a ProductSet.", +"readOnly": true +}, +"indexTime": { +"description": "Output only. The time at which this ProductSet was last indexed. Query results will reflect all updates before this time. If this ProductSet has never been indexed, this timestamp is the default value \"1970-01-01T00:00:00Z\". This field is ignored when creating a ProductSet.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "The resource name of the ProductSet. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`. This field is ignored when creating a ProductSet.", +"type": "string" +} +}, +"type": "object" +}, +"ProductSetPurgeConfig": { +"description": "Config to control which ProductSet contains the Products to be deleted.", +"id": "ProductSetPurgeConfig", +"properties": { +"productSetId": { +"description": "The ProductSet that contains the Products to delete. If a Product is a member of product_set_id in addition to other ProductSets, the Product will still be deleted.", +"type": "string" +} +}, +"type": "object" +}, +"Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"PurgeProductsRequest": { +"description": "Request message for the `PurgeProducts` method.", +"id": "PurgeProductsRequest", +"properties": { +"deleteOrphanProducts": { +"description": "If delete_orphan_products is true, all Products that are not in any ProductSet will be deleted.", +"type": "boolean" +}, +"force": { +"description": "The default value is false. Override this value to true to actually perform the purge.", +"type": "boolean" +}, +"productSetPurgeConfig": { +"$ref": "ProductSetPurgeConfig", +"description": "Specify which ProductSet contains the Products to be deleted." +} +}, +"type": "object" +}, +"ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"RemoveProductFromProductSetRequest": { +"description": "Request message for the `RemoveProductFromProductSet` method.", +"id": "RemoveProductFromProductSetRequest", +"properties": { +"product": { +"description": "Required. The resource name for the Product to be removed from this ProductSet. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`", +"type": "string" +} +}, +"type": "object" +}, +"Result": { +"description": "Information about a product.", +"id": "Result", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Symbol": { +"description": "A single symbol representation.", +"id": "Symbol", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"TextDetectionParams": { +"description": "Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.", +"id": "TextDetectionParams", +"properties": { +"advancedOcrOptions": { +"description": "A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"enableTextDetectionConfidenceScore": { +"description": "By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.", +"type": "boolean" +} +}, +"type": "object" +}, +"TextProperty": { +"description": "Additional information detected on the structural component.", +"id": "TextProperty", +"properties": { +"detectedBreak": { +"$ref": "DetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "DetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "WebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "WebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "WebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"WebDetectionParams": { +"description": "Parameters for web detection request.", +"id": "WebDetectionParams", +"properties": { +"includeGeoResults": { +"deprecated": true, +"description": "This field has no effect on results.", +"type": "boolean" +} +}, +"type": "object" +}, +"WebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "WebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"WebImage": { +"description": "Metadata for online images.", +"id": "WebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"WebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "WebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"WebPage": { +"description": "Metadata for web pages.", +"id": "WebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"Word": { +"description": "A word representation.", +"id": "Word", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "Symbol" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Vision API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1p1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1p1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..abd2260cc80b40801fc335f3a5fe71c9abdec52c --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1p1beta1.json @@ -0,0 +1,8373 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-vision": { +"description": "Apply machine learning models to understand and label images" +} +} +} +}, +"basePath": "", +"baseUrl": "https://vision.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Vision", +"description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/vision/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vision:v1p1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vision.mtls.googleapis.com/", +"name": "vision", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1p1beta1/files:annotate", +"httpMethod": "POST", +"id": "vision.files.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p1beta1/files:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1p1beta1/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.files.asyncBatchAnnotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p1beta1/files:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1p1beta1/images:annotate", +"httpMethod": "POST", +"id": "vision.images.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p1beta1/images:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1p1beta1/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.images.asyncBatchAnnotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p1beta1/images:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"projects": { +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1p1beta1/projects/{projectsId}/files:annotate", +"httpMethod": "POST", +"id": "vision.projects.files.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/files:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1p1beta1/projects/{projectsId}/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.files.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/files:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1p1beta1/projects/{projectsId}/images:annotate", +"httpMethod": "POST", +"id": "vision.projects.images.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/images:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1p1beta1/projects/{projectsId}/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.images.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/images:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"locations": { +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/files:annotate", +"httpMethod": "POST", +"id": "vision.projects.locations.files.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/files:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.locations.files.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/files:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/images:annotate", +"httpMethod": "POST", +"id": "vision.projects.locations.images.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/images:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1p1beta1/projects/{projectsId}/locations/{locationsId}/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.locations.images.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p1beta1/{+parent}/images:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://vision.googleapis.com/", +"schemas": { +"AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "AnnotateImageResponse", +"properties": { +"context": { +"$ref": "ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"AsyncBatchAnnotateImagesResponse": { +"description": "Response to an async batch image annotation request.", +"id": "AsyncBatchAnnotateImagesResponse", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "The output location and metadata from AsyncBatchAnnotateImagesRequest." +} +}, +"type": "object" +}, +"BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Block": { +"description": "Logical element on the page.", +"id": "Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"Color": { +"description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value\u2014for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", +"id": "Color", +"properties": { +"alpha": { +"description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", +"format": "float", +"type": "number" +}, +"blue": { +"description": "The amount of blue in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"green": { +"description": "The amount of green in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"red": { +"description": "The amount of red in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "CropHint", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"DetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "DetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"DetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "DetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "Landmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateFileRequest": { +"description": "A request to annotate one single file, e.g. a PDF, TIFF or GIF file.", +"id": "GoogleCloudVisionV1p1beta1AnnotateFileRequest", +"properties": { +"features": { +"description": "Required. Requested features.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Feature" +}, +"type": "array" +}, +"imageContext": { +"$ref": "GoogleCloudVisionV1p1beta1ImageContext", +"description": "Additional context that may accompany the image(s) in the file." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1InputConfig", +"description": "Required. Information about the input file." +}, +"pages": { +"description": "Pages of the file to perform image annotation. Pages starts from 1, we assume the first page of the file is page 1. At most 5 pages are supported per request. Pages can be negative. Page 1 means the first page. Page 2 means the second page. Page -1 means the last page. Page -2 means the second to the last page. If the file is GIF instead of PDF or TIFF, page refers to GIF frames. If this field is empty, by default the service performs image annotation for the first 5 pages of the file.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p1beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateImageRequest": { +"description": "Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features, and with context information.", +"id": "GoogleCloudVisionV1p1beta1AnnotateImageRequest", +"properties": { +"features": { +"description": "Requested features.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Feature" +}, +"type": "array" +}, +"image": { +"$ref": "GoogleCloudVisionV1p1beta1Image", +"description": "The image to be processed." +}, +"imageContext": { +"$ref": "GoogleCloudVisionV1p1beta1ImageContext", +"description": "Additional context that may accompany the image." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p1beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p1beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest": { +"description": "An offline file annotation request.", +"id": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest", +"properties": { +"features": { +"description": "Required. Requested features.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Feature" +}, +"type": "array" +}, +"imageContext": { +"$ref": "GoogleCloudVisionV1p1beta1ImageContext", +"description": "Additional context that may accompany the image(s) in the file." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1InputConfig", +"description": "Required. Information about the input file." +}, +"outputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1OutputConfig", +"description": "Required. The desired output location and metadata (e.g. format)." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest": { +"description": "Multiple async file annotation requests are batched into a single service call.", +"id": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual async file annotation requests for this batch.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest": { +"description": "Request for async image annotation for a list of images.", +"id": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateImagesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"outputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1OutputConfig", +"description": "Required. The desired output location and metadata (e.g. format)." +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual image annotation requests for this batch.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateImageRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest": { +"description": "A list of requests to annotate files using the BatchAnnotateFiles API.", +"id": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. The list of file annotation requests. Right now we support only one AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateFileRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "GoogleCloudVisionV1p1beta1BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest": { +"description": "Multiple image annotation requests are batched into a single service call.", +"id": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual image annotation requests for this batch.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateImageRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse": { +"description": "Response to a batch image annotation request.", +"id": "GoogleCloudVisionV1p1beta1BatchAnnotateImagesResponse", +"properties": { +"responses": { +"description": "Individual responses to image annotation requests within the batch.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateImageResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p1beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p1beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p1beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p1beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p1beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1CropHintsParams": { +"description": "Parameters for crop hints annotation request.", +"id": "GoogleCloudVisionV1p1beta1CropHintsParams", +"properties": { +"aspectRatios": { +"description": "Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.", +"items": { +"format": "float", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p1beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p1beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p1beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p1beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Feature": { +"description": "The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list.", +"id": "GoogleCloudVisionV1p1beta1Feature", +"properties": { +"maxResults": { +"description": "Maximum number of results of this type. Does not apply to `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.", +"format": "int32", +"type": "integer" +}, +"model": { +"description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support \"builtin/weekly\" for the bleeding edge release updated weekly.", +"type": "string" +}, +"type": { +"description": "The feature type.", +"enum": [ +"TYPE_UNSPECIFIED", +"FACE_DETECTION", +"LANDMARK_DETECTION", +"LOGO_DETECTION", +"LABEL_DETECTION", +"TEXT_DETECTION", +"DOCUMENT_TEXT_DETECTION", +"SAFE_SEARCH_DETECTION", +"IMAGE_PROPERTIES", +"CROP_HINTS", +"WEB_DETECTION", +"PRODUCT_SEARCH", +"OBJECT_LOCALIZATION" +], +"enumDescriptions": [ +"Unspecified feature type.", +"Run face detection.", +"Run landmark detection.", +"Run logo detection.", +"Run label detection.", +"Run text detection / optical character recognition (OCR). Text detection is optimized for areas of text within a larger image; if the image is a document, use `DOCUMENT_TEXT_DETECTION` instead.", +"Run dense text document OCR. Takes precedence when both `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.", +"Run Safe Search to detect potentially unsafe or undesirable content.", +"Compute a set of image properties, such as the image's dominant colors.", +"Run crop hints.", +"Run web detection.", +"Run Product Search.", +"Run localizer for object detection." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p1beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p1beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Image": { +"description": "Client image to perform Google Cloud Vision API tasks over.", +"id": "GoogleCloudVisionV1p1beta1Image", +"properties": { +"content": { +"description": "Image content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateImages requests. It does not work for AsyncBatchAnnotateImages requests.", +"format": "byte", +"type": "string" +}, +"source": { +"$ref": "GoogleCloudVisionV1p1beta1ImageSource", +"description": "Google Cloud Storage image location, or publicly-accessible image URL. If both `content` and `source` are provided for an image, `content` takes precedence and is used to perform the image annotation request." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p1beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageContext": { +"description": "Image context and/or feature-specific parameters.", +"id": "GoogleCloudVisionV1p1beta1ImageContext", +"properties": { +"cropHintsParams": { +"$ref": "GoogleCloudVisionV1p1beta1CropHintsParams", +"description": "Parameters for crop hints annotation request." +}, +"languageHints": { +"description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).", +"items": { +"type": "string" +}, +"type": "array" +}, +"latLongRect": { +"$ref": "GoogleCloudVisionV1p1beta1LatLongRect", +"description": "Not used." +}, +"productSearchParams": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchParams", +"description": "Parameters for product search." +}, +"textDetectionParams": { +"$ref": "GoogleCloudVisionV1p1beta1TextDetectionParams", +"description": "Parameters for text detection and document text detection." +}, +"webDetectionParams": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionParams", +"description": "Parameters for web detection." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p1beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p1beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageSource": { +"description": "External image source (Google Cloud Storage or web URL image location).", +"id": "GoogleCloudVisionV1p1beta1ImageSource", +"properties": { +"gcsImageUri": { +"description": "**Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", +"type": "string" +}, +"imageUri": { +"description": "The URI of the source image. Can be either: 1. A Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production applications. When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes precedence.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p1beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p1beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1LatLongRect": { +"description": "Rectangle determined by min and max `LatLng` pairs.", +"id": "GoogleCloudVisionV1p1beta1LatLongRect", +"properties": { +"maxLatLng": { +"$ref": "LatLng", +"description": "Max lat/long pair." +}, +"minLatLng": { +"$ref": "LatLng", +"description": "Min lat/long pair." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p1beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p1beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p1beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p1beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p1beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p1beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p1beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p1beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p1beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p1beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchParams": { +"description": "Parameters for a product search request.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchParams", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied." +}, +"filter": { +"description": "The filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within an OR must have the same key. An '=' should be used to connect the key and value. For example, \"(color = red OR color = blue) AND brand = Google\" is acceptable, but \"(color = red OR brand = Google)\" is not acceptable. \"color: red\" is not acceptable because it uses a ':' instead of an '='.", +"type": "string" +}, +"productCategories": { +"description": "The list of product categories to search in. Currently, we only consider the first category, and either \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\", or \"general-v1\" should be specified. The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported but will be deprecated. For new products, please use \"homegoods-v2\", \"apparel-v2\", or \"toys-v2\" for better product search accuracy. It is recommended to migrate existing products to these categories as well.", +"items": { +"type": "string" +}, +"type": "array" +}, +"productSet": { +"description": "The resource name of a ProductSet to be searched for similar images. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p1beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p1beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p1beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p1beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextDetectionParams": { +"description": "Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.", +"id": "GoogleCloudVisionV1p1beta1TextDetectionParams", +"properties": { +"advancedOcrOptions": { +"description": "A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"enableTextDetectionConfidenceScore": { +"description": "By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p1beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p1beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionParams": { +"description": "Parameters for web detection request.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionParams", +"properties": { +"includeGeoResults": { +"deprecated": true, +"description": "This field has no effect on results.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p1beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p2beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p2beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p2beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p2beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p2beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p2beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p2beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p2beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p2beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p2beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p2beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p2beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p2beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p2beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p2beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p2beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p2beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p2beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p2beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p2beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p2beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p2beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p2beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p2beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p2beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p2beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p2beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p2beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p2beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p2beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p2beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p2beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p2beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p2beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p2beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p2beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p3beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p3beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p3beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p3beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p3beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVisionV1p3beta1BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p3beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p3beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p3beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p3beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p3beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p3beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p3beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p3beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p3beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p3beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p3beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p3beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p3beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p3beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "GoogleCloudVisionV1p3beta1ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p3beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p3beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p3beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p3beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p3beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p3beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p3beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p3beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p3beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p3beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p3beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p3beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p3beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p3beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "GoogleCloudVisionV1p3beta1ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p3beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p3beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p3beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p3beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p3beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p4beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p4beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p4beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse": { +"description": "Response to an async batch image annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1OutputConfig", +"description": "The output location and metadata from AsyncBatchAnnotateImagesRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVisionV1p4beta1BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p4beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p4beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Celebrity": { +"description": "A Celebrity is a group of Faces with an identity.", +"id": "GoogleCloudVisionV1p4beta1Celebrity", +"properties": { +"description": { +"description": "The Celebrity's description.", +"type": "string" +}, +"displayName": { +"description": "The Celebrity's display name.", +"type": "string" +}, +"name": { +"description": "The resource name of the preloaded Celebrity. Has the format `builtin/{mid}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p4beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p4beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p4beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p4beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p4beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p4beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"recognitionResult": { +"description": "Additional recognition information. Only computed if image_context.face_recognition_params is provided, **and** a match is found to a Celebrity in the input CelebritySet. This field is sorted in order of decreasing confidence values.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceRecognitionResult" +}, +"type": "array" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p4beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceRecognitionResult": { +"description": "Information about a face's identity.", +"id": "GoogleCloudVisionV1p4beta1FaceRecognitionResult", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVisionV1p4beta1Celebrity", +"description": "The Celebrity that this face was matched to." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p4beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p4beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p4beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p4beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p4beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "GoogleCloudVisionV1p4beta1ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p4beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p4beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p4beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p4beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p4beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p4beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p4beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p4beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p4beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p4beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p4beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p4beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p4beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p4beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "GoogleCloudVisionV1p4beta1ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p4beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p4beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p4beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p4beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p4beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GroupedResult", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "ObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "Result" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "ImageProperties", +"properties": { +"dominantColors": { +"$ref": "DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"InputConfig": { +"description": "The desired input location and metadata.", +"id": "InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"KeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "KeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"Landmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "Landmark", +"properties": { +"position": { +"$ref": "Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"LatLng": { +"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", +"id": "LatLng", +"properties": { +"latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"LocationInfo": { +"description": "Detected entity location information.", +"id": "LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"ObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "ObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OutputConfig": { +"description": "The desired output location and metadata.", +"id": "OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"Page": { +"description": "Detected page from OCR.", +"id": "Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "Paragraph", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"Product": { +"description": "A Product contains ReferenceImages.", +"id": "Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "KeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"ProductSearchResults": { +"description": "Results for a product search request.", +"id": "ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "Result" +}, +"type": "array" +} +}, +"type": "object" +}, +"Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"Result": { +"description": "Information about a product.", +"id": "Result", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Symbol": { +"description": "A single symbol representation.", +"id": "Symbol", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"TextProperty": { +"description": "Additional information detected on the structural component.", +"id": "TextProperty", +"properties": { +"detectedBreak": { +"$ref": "DetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "DetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "WebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "WebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "WebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"WebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "WebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"WebImage": { +"description": "Metadata for online images.", +"id": "WebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"WebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "WebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"WebPage": { +"description": "Metadata for web pages.", +"id": "WebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"Word": { +"description": "A word representation.", +"id": "Word", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "Symbol" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Vision API", +"version": "v1p1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1p2beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1p2beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..36f4308fa0a5ada5c5445b893ac75be7e0e70e5e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vision.v1p2beta1.json @@ -0,0 +1,8373 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +}, +"https://www.googleapis.com/auth/cloud-vision": { +"description": "Apply machine learning models to understand and label images" +} +} +} +}, +"basePath": "", +"baseUrl": "https://vision.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Vision", +"description": "Integrates Google Vision features, including image labeling, face, logo, and landmark detection, optical character recognition (OCR), and detection of explicit content, into applications.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/vision/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vision:v1p2beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vision.mtls.googleapis.com/", +"name": "vision", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1p2beta1/files:annotate", +"httpMethod": "POST", +"id": "vision.files.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p2beta1/files:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1p2beta1/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.files.asyncBatchAnnotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p2beta1/files:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1p2beta1/images:annotate", +"httpMethod": "POST", +"id": "vision.images.annotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p2beta1/images:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1p2beta1/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.images.asyncBatchAnnotate", +"parameterOrder": [], +"parameters": {}, +"path": "v1p2beta1/images:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"projects": { +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1p2beta1/projects/{projectsId}/files:annotate", +"httpMethod": "POST", +"id": "vision.projects.files.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/files:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1p2beta1/projects/{projectsId}/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.files.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/files:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1p2beta1/projects/{projectsId}/images:annotate", +"httpMethod": "POST", +"id": "vision.projects.images.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/images:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1p2beta1/projects/{projectsId}/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.images.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/images:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"locations": { +"resources": { +"files": { +"methods": { +"annotate": { +"description": "Service that performs image detection and annotation for a batch of files. Now only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. This service will extract at most 5 (customers can specify which 5 in AnnotateFileRequest.pages) frames (gif) or pages (pdf or tiff) from each file provided and perform detection and annotation for each image extracted.", +"flatPath": "v1p2beta1/projects/{projectsId}/locations/{locationsId}/files:annotate", +"httpMethod": "POST", +"id": "vision.projects.locations.files.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/files:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of generic files, such as PDF files, which may contain multiple pages and multiple images per page. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateFilesResponse` (results).", +"flatPath": "v1p2beta1/projects/{projectsId}/locations/{locationsId}/files:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.locations.files.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/files:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +}, +"images": { +"methods": { +"annotate": { +"description": "Run image detection and annotation for a batch of images.", +"flatPath": "v1p2beta1/projects/{projectsId}/locations/{locationsId}/images:annotate", +"httpMethod": "POST", +"id": "vision.projects.locations.images.annotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/images:annotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest" +}, +"response": { +"$ref": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +}, +"asyncBatchAnnotate": { +"description": "Run asynchronous image detection and annotation for a list of images. Progress and results can be retrieved through the `google.longrunning.Operations` interface. `Operation.metadata` contains `OperationMetadata` (metadata). `Operation.response` contains `AsyncBatchAnnotateImagesResponse` (results). This service will write image annotation outputs to json files in customer GCS bucket, each json file containing BatchAnnotateImagesResponse proto.", +"flatPath": "v1p2beta1/projects/{projectsId}/locations/{locationsId}/images:asyncBatchAnnotate", +"httpMethod": "POST", +"id": "vision.projects.locations.images.asyncBatchAnnotate", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1p2beta1/{+parent}/images:asyncBatchAnnotate", +"request": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform", +"https://www.googleapis.com/auth/cloud-vision" +] +} +} +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://vision.googleapis.com/", +"schemas": { +"AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "AnnotateImageResponse", +"properties": { +"context": { +"$ref": "ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"AsyncBatchAnnotateImagesResponse": { +"description": "Response to an async batch image annotation request.", +"id": "AsyncBatchAnnotateImagesResponse", +"properties": { +"outputConfig": { +"$ref": "OutputConfig", +"description": "The output location and metadata from AsyncBatchAnnotateImagesRequest." +} +}, +"type": "object" +}, +"BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"Block": { +"description": "Logical element on the page.", +"id": "Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"Color": { +"description": "Represents a color in the RGBA color space. This representation is designed for simplicity of conversion to and from color representations in various languages over compactness. For example, the fields of this representation can be trivially provided to the constructor of `java.awt.Color` in Java; it can also be trivially provided to UIColor's `+colorWithRed:green:blue:alpha` method in iOS; and, with just a little work, it can be easily formatted into a CSS `rgba()` string in JavaScript. This reference page doesn't have information about the absolute color space that should be used to interpret the RGB value\u2014for example, sRGB, Adobe RGB, DCI-P3, and BT.2020. By default, applications should assume the sRGB color space. When color equality needs to be decided, implementations, unless documented otherwise, treat two colors as equal if all their red, green, blue, and alpha values each differ by at most `1e-5`. Example (Java): import com.google.type.Color; // ... public static java.awt.Color fromProto(Color protocolor) { float alpha = protocolor.hasAlpha() ? protocolor.getAlpha().getValue() : 1.0; return new java.awt.Color( protocolor.getRed(), protocolor.getGreen(), protocolor.getBlue(), alpha); } public static Color toProto(java.awt.Color color) { float red = (float) color.getRed(); float green = (float) color.getGreen(); float blue = (float) color.getBlue(); float denominator = 255.0; Color.Builder resultBuilder = Color .newBuilder() .setRed(red / denominator) .setGreen(green / denominator) .setBlue(blue / denominator); int alpha = color.getAlpha(); if (alpha != 255) { result.setAlpha( FloatValue .newBuilder() .setValue(((float) alpha) / denominator) .build()); } return resultBuilder.build(); } // ... Example (iOS / Obj-C): // ... static UIColor* fromProto(Color* protocolor) { float red = [protocolor red]; float green = [protocolor green]; float blue = [protocolor blue]; FloatValue* alpha_wrapper = [protocolor alpha]; float alpha = 1.0; if (alpha_wrapper != nil) { alpha = [alpha_wrapper value]; } return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; } static Color* toProto(UIColor* color) { CGFloat red, green, blue, alpha; if (![color getRed:&red green:&green blue:&blue alpha:&alpha]) { return nil; } Color* result = [[Color alloc] init]; [result setRed:red]; [result setGreen:green]; [result setBlue:blue]; if (alpha <= 0.9999) { [result setAlpha:floatWrapperWithValue(alpha)]; } [result autorelease]; return result; } // ... Example (JavaScript): // ... var protoToCssColor = function(rgb_color) { var redFrac = rgb_color.red || 0.0; var greenFrac = rgb_color.green || 0.0; var blueFrac = rgb_color.blue || 0.0; var red = Math.floor(redFrac * 255); var green = Math.floor(greenFrac * 255); var blue = Math.floor(blueFrac * 255); if (!('alpha' in rgb_color)) { return rgbToCssColor(red, green, blue); } var alphaFrac = rgb_color.alpha.value || 0.0; var rgbParams = [red, green, blue].join(','); return ['rgba(', rgbParams, ',', alphaFrac, ')'].join(''); }; var rgbToCssColor = function(red, green, blue) { var rgbNumber = new Number((red << 16) | (green << 8) | blue); var hexString = rgbNumber.toString(16); var missingZeros = 6 - hexString.length; var resultBuilder = ['#']; for (var i = 0; i < missingZeros; i++) { resultBuilder.push('0'); } resultBuilder.push(hexString); return resultBuilder.join(''); }; // ...", +"id": "Color", +"properties": { +"alpha": { +"description": "The fraction of this color that should be applied to the pixel. That is, the final pixel color is defined by the equation: `pixel color = alpha * (this color) + (1.0 - alpha) * (background color)` This means that a value of 1.0 corresponds to a solid color, whereas a value of 0.0 corresponds to a completely transparent color. This uses a wrapper message rather than a simple float scalar so that it is possible to distinguish between a default value and the value being unset. If omitted, this color object is rendered as a solid color (as if the alpha value had been explicitly given a value of 1.0).", +"format": "float", +"type": "number" +}, +"blue": { +"description": "The amount of blue in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"green": { +"description": "The amount of green in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +}, +"red": { +"description": "The amount of red in the color as a value in the interval [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "CropHint", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"DetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "DetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"DetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "DetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "Landmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p1beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p1beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p1beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p1beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p1beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p1beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p1beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p1beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p1beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p1beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p1beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p1beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p1beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p1beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p1beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p1beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p1beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p1beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p1beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p1beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p1beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p1beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p1beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p1beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p1beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p1beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p1beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p1beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p1beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p1beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p1beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p1beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p1beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p1beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p1beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p1beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p1beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p1beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p1beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p1beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p1beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p1beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p1beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p1beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p1beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p1beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p1beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateFileRequest": { +"description": "A request to annotate one single file, e.g. a PDF, TIFF or GIF file.", +"id": "GoogleCloudVisionV1p2beta1AnnotateFileRequest", +"properties": { +"features": { +"description": "Required. Requested features.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Feature" +}, +"type": "array" +}, +"imageContext": { +"$ref": "GoogleCloudVisionV1p2beta1ImageContext", +"description": "Additional context that may accompany the image(s) in the file." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1InputConfig", +"description": "Required. Information about the input file." +}, +"pages": { +"description": "Pages of the file to perform image annotation. Pages starts from 1, we assume the first page of the file is page 1. At most 5 pages are supported per request. Pages can be negative. Page 1 means the first page. Page 2 means the second page. Page -1 means the last page. Page -2 means the second to the last page. If the file is GIF instead of PDF or TIFF, page refers to GIF frames. If this field is empty, by default the service performs image annotation for the first 5 pages of the file.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p2beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateImageRequest": { +"description": "Request for performing Google Cloud Vision API tasks over a user-provided image, with user-requested features, and with context information.", +"id": "GoogleCloudVisionV1p2beta1AnnotateImageRequest", +"properties": { +"features": { +"description": "Requested features.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Feature" +}, +"type": "array" +}, +"image": { +"$ref": "GoogleCloudVisionV1p2beta1Image", +"description": "The image to be processed." +}, +"imageContext": { +"$ref": "GoogleCloudVisionV1p2beta1ImageContext", +"description": "Additional context that may accompany the image." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p2beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p2beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p2beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest": { +"description": "An offline file annotation request.", +"id": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest", +"properties": { +"features": { +"description": "Required. Requested features.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Feature" +}, +"type": "array" +}, +"imageContext": { +"$ref": "GoogleCloudVisionV1p2beta1ImageContext", +"description": "Additional context that may accompany the image(s) in the file." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1InputConfig", +"description": "Required. Information about the input file." +}, +"outputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1OutputConfig", +"description": "Required. The desired output location and metadata (e.g. format)." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest": { +"description": "Multiple async file annotation requests are batched into a single service call.", +"id": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual async file annotation requests for this batch.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest": { +"description": "Request for async image annotation for a list of images.", +"id": "GoogleCloudVisionV1p2beta1AsyncBatchAnnotateImagesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"outputConfig": { +"$ref": "GoogleCloudVisionV1p2beta1OutputConfig", +"description": "Required. The desired output location and metadata (e.g. format)." +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual image annotation requests for this batch.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateImageRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest": { +"description": "A list of requests to annotate files using the BatchAnnotateFiles API.", +"id": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. The list of file annotation requests. Right now we support only one AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateFileRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "GoogleCloudVisionV1p2beta1BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest": { +"description": "Multiple image annotation requests are batched into a single service call.", +"id": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesRequest", +"properties": { +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The labels with user-defined metadata for the request. Label keys and values can be no longer than 63 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.", +"type": "object" +}, +"parent": { +"description": "Optional. Target project and location to make a call. Format: `projects/{project-id}/locations/{location-id}`. If no parent is specified, a region will be chosen automatically. Supported location-ids: `us`: USA country only, `asia`: East asia areas, like Japan, Taiwan, `eu`: The European Union. Example: `projects/project-A/locations/eu`.", +"type": "string" +}, +"requests": { +"description": "Required. Individual image annotation requests for this batch.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateImageRequest" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse": { +"description": "Response to a batch image annotation request.", +"id": "GoogleCloudVisionV1p2beta1BatchAnnotateImagesResponse", +"properties": { +"responses": { +"description": "Individual responses to image annotation requests within the batch.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1AnnotateImageResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p2beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p2beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p2beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p2beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p2beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1CropHintsParams": { +"description": "Parameters for crop hints annotation request.", +"id": "GoogleCloudVisionV1p2beta1CropHintsParams", +"properties": { +"aspectRatios": { +"description": "Aspect ratios in floats, representing the ratio of the width to the height of the image. For example, if the desired aspect ratio is 4/3, the corresponding float value should be 1.33333. If not specified, the best possible crop is returned. The number of provided aspect ratios is limited to a maximum of 16; any aspect ratios provided after the 16th are ignored.", +"items": { +"format": "float", +"type": "number" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p2beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p2beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p2beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p2beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p2beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Feature": { +"description": "The type of Google Cloud Vision API detection to perform, and the maximum number of results to return for that type. Multiple `Feature` objects can be specified in the `features` list.", +"id": "GoogleCloudVisionV1p2beta1Feature", +"properties": { +"maxResults": { +"description": "Maximum number of results of this type. Does not apply to `TEXT_DETECTION`, `DOCUMENT_TEXT_DETECTION`, or `CROP_HINTS`.", +"format": "int32", +"type": "integer" +}, +"model": { +"description": "Model to use for the feature. Supported values: \"builtin/stable\" (the default if unset) and \"builtin/latest\". `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` also support \"builtin/weekly\" for the bleeding edge release updated weekly.", +"type": "string" +}, +"type": { +"description": "The feature type.", +"enum": [ +"TYPE_UNSPECIFIED", +"FACE_DETECTION", +"LANDMARK_DETECTION", +"LOGO_DETECTION", +"LABEL_DETECTION", +"TEXT_DETECTION", +"DOCUMENT_TEXT_DETECTION", +"SAFE_SEARCH_DETECTION", +"IMAGE_PROPERTIES", +"CROP_HINTS", +"WEB_DETECTION", +"PRODUCT_SEARCH", +"OBJECT_LOCALIZATION" +], +"enumDescriptions": [ +"Unspecified feature type.", +"Run face detection.", +"Run landmark detection.", +"Run logo detection.", +"Run label detection.", +"Run text detection / optical character recognition (OCR). Text detection is optimized for areas of text within a larger image; if the image is a document, use `DOCUMENT_TEXT_DETECTION` instead.", +"Run dense text document OCR. Takes precedence when both `DOCUMENT_TEXT_DETECTION` and `TEXT_DETECTION` are present.", +"Run Safe Search to detect potentially unsafe or undesirable content.", +"Compute a set of image properties, such as the image's dominant colors.", +"Run crop hints.", +"Run web detection.", +"Run Product Search.", +"Run localizer for object detection." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p2beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p2beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Image": { +"description": "Client image to perform Google Cloud Vision API tasks over.", +"id": "GoogleCloudVisionV1p2beta1Image", +"properties": { +"content": { +"description": "Image content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateImages requests. It does not work for AsyncBatchAnnotateImages requests.", +"format": "byte", +"type": "string" +}, +"source": { +"$ref": "GoogleCloudVisionV1p2beta1ImageSource", +"description": "Google Cloud Storage image location, or publicly-accessible image URL. If both `content` and `source` are provided for an image, `content` takes precedence and is used to perform the image annotation request." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p2beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageContext": { +"description": "Image context and/or feature-specific parameters.", +"id": "GoogleCloudVisionV1p2beta1ImageContext", +"properties": { +"cropHintsParams": { +"$ref": "GoogleCloudVisionV1p2beta1CropHintsParams", +"description": "Parameters for crop hints annotation request." +}, +"languageHints": { +"description": "List of languages to use for TEXT_DETECTION. In most cases, an empty value yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting `language_hints` is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Text detection returns an error if one or more of the specified languages is not one of the [supported languages](https://cloud.google.com/vision/docs/languages).", +"items": { +"type": "string" +}, +"type": "array" +}, +"latLongRect": { +"$ref": "GoogleCloudVisionV1p2beta1LatLongRect", +"description": "Not used." +}, +"productSearchParams": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchParams", +"description": "Parameters for product search." +}, +"textDetectionParams": { +"$ref": "GoogleCloudVisionV1p2beta1TextDetectionParams", +"description": "Parameters for text detection and document text detection." +}, +"webDetectionParams": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionParams", +"description": "Parameters for web detection." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p2beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p2beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ImageSource": { +"description": "External image source (Google Cloud Storage or web URL image location).", +"id": "GoogleCloudVisionV1p2beta1ImageSource", +"properties": { +"gcsImageUri": { +"description": "**Use `image_uri` instead.** The Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info.", +"type": "string" +}, +"imageUri": { +"description": "The URI of the source image. Can be either: 1. A Google Cloud Storage URI of the form `gs://bucket_name/object_name`. Object versioning is not supported. See [Google Cloud Storage Request URIs](https://cloud.google.com/storage/docs/reference-uris) for more info. 2. A publicly-accessible image HTTP/HTTPS URL. When fetching images from HTTP/HTTPS URLs, Google cannot guarantee that the request will be completed. Your request may fail if the specified host denies the request (e.g. due to request throttling or DOS prevention), or if Google throttles requests to the site for abuse prevention. You should not depend on externally-hosted images for production applications. When both `gcs_image_uri` and `image_uri` are specified, `image_uri` takes precedence.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p2beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p2beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1LatLongRect": { +"description": "Rectangle determined by min and max `LatLng` pairs.", +"id": "GoogleCloudVisionV1p2beta1LatLongRect", +"properties": { +"maxLatLng": { +"$ref": "LatLng", +"description": "Max lat/long pair." +}, +"minLatLng": { +"$ref": "LatLng", +"description": "Min lat/long pair." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p2beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p2beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p2beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p2beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p2beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p2beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p2beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p2beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p2beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p2beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p2beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchParams": { +"description": "Parameters for a product search request.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchParams", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon around the area of interest in the image. If it is not specified, system discretion will be applied." +}, +"filter": { +"description": "The filtering expression. This can be used to restrict search results based on Product labels. We currently support an AND of OR of key-value expressions, where each expression within an OR must have the same key. An '=' should be used to connect the key and value. For example, \"(color = red OR color = blue) AND brand = Google\" is acceptable, but \"(color = red OR brand = Google)\" is not acceptable. \"color: red\" is not acceptable because it uses a ':' instead of an '='.", +"type": "string" +}, +"productCategories": { +"description": "The list of product categories to search in. Currently, we only consider the first category, and either \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\", or \"general-v1\" should be specified. The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported but will be deprecated. For new products, please use \"homegoods-v2\", \"apparel-v2\", or \"toys-v2\" for better product search accuracy. It is recommended to migrate existing products to these categories as well.", +"items": { +"type": "string" +}, +"type": "array" +}, +"productSet": { +"description": "The resource name of a ProductSet to be searched for similar images. Format is: `projects/PROJECT_ID/locations/LOC_ID/productSets/PRODUCT_SET_ID`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p2beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p2beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p2beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p2beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p2beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1TextDetectionParams": { +"description": "Parameters for text detections. This is used to control TEXT_DETECTION and DOCUMENT_TEXT_DETECTION features.", +"id": "GoogleCloudVisionV1p2beta1TextDetectionParams", +"properties": { +"advancedOcrOptions": { +"description": "A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are: - `legacy_layout`: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.", +"items": { +"type": "string" +}, +"type": "array" +}, +"enableTextDetectionConfidenceScore": { +"description": "By default, Cloud Vision API only includes confidence score for DOCUMENT_TEXT_DETECTION result. Set the flag to true to include confidence score for TEXT_DETECTION as well.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p2beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p2beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionParams": { +"description": "Parameters for web detection request.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionParams", +"properties": { +"includeGeoResults": { +"deprecated": true, +"description": "This field has no effect on results.", +"type": "boolean" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p2beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p2beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p2beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p2beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p2beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p2beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p3beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p3beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p3beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p3beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p3beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p3beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p3beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVisionV1p3beta1BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p3beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p3beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p3beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p3beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p3beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p3beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p3beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p3beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p3beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p3beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p3beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p3beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p3beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p3beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p3beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "GoogleCloudVisionV1p3beta1ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p3beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p3beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p3beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p3beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p3beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p3beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p3beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p3beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p3beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p3beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p3beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p3beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p3beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p3beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p3beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p3beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "GoogleCloudVisionV1p3beta1ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p3beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p3beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p3beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p3beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p3beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p3beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p3beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p3beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p3beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p3beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AnnotateFileResponse": { +"description": "Response to a single file annotation request. A file may contain one or more images, which individually have their own responses.", +"id": "GoogleCloudVisionV1p4beta1AnnotateFileResponse", +"properties": { +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the failed request. The `responses` field will not be set in this case." +}, +"inputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1InputConfig", +"description": "Information about the file for which this response is generated." +}, +"responses": { +"description": "Individual responses to images found within the file. This field will be empty if the `error` field is set.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AnnotateImageResponse" +}, +"type": "array" +}, +"totalPages": { +"description": "This field gives the total number of pages in the file.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AnnotateImageResponse": { +"description": "Response to an image annotation request.", +"id": "GoogleCloudVisionV1p4beta1AnnotateImageResponse", +"properties": { +"context": { +"$ref": "GoogleCloudVisionV1p4beta1ImageAnnotationContext", +"description": "If present, contextual information is needed to understand where this image comes from." +}, +"cropHintsAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1CropHintsAnnotation", +"description": "If present, crop hints have completed successfully." +}, +"error": { +"$ref": "Status", +"description": "If set, represents the error message for the operation. Note that filled-in image annotations are guaranteed to be correct, even when `error` is set." +}, +"faceAnnotations": { +"description": "If present, face detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceAnnotation" +}, +"type": "array" +}, +"fullTextAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotation", +"description": "If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text." +}, +"imagePropertiesAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1ImageProperties", +"description": "If present, image properties were extracted successfully." +}, +"labelAnnotations": { +"description": "If present, label detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"landmarkAnnotations": { +"description": "If present, landmark detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"localizedObjectAnnotations": { +"description": "If present, localized object detection has completed successfully. This will be sorted descending by confidence score.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation" +}, +"type": "array" +}, +"logoAnnotations": { +"description": "If present, logo detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"productSearchResults": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResults", +"description": "If present, product search has completed successfully." +}, +"safeSearchAnnotation": { +"$ref": "GoogleCloudVisionV1p4beta1SafeSearchAnnotation", +"description": "If present, safe-search annotation has completed successfully." +}, +"textAnnotations": { +"description": "If present, text (OCR) detection has completed successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1EntityAnnotation" +}, +"type": "array" +}, +"webDetection": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetection", +"description": "If present, web detection has completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse": { +"description": "The response for a single offline file annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1OutputConfig", +"description": "The output location and metadata from AsyncAnnotateFileRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse": { +"description": "Response to an async batch file annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncBatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, one for each request in AsyncBatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AsyncAnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse": { +"description": "Response to an async batch image annotation request.", +"id": "GoogleCloudVisionV1p4beta1AsyncBatchAnnotateImagesResponse", +"properties": { +"outputConfig": { +"$ref": "GoogleCloudVisionV1p4beta1OutputConfig", +"description": "The output location and metadata from AsyncBatchAnnotateImagesRequest." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse": { +"description": "A list of file annotation responses.", +"id": "GoogleCloudVisionV1p4beta1BatchAnnotateFilesResponse", +"properties": { +"responses": { +"description": "The list of file annotation responses, each response corresponding to each AnnotateFileRequest in BatchAnnotateFilesRequest.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1AnnotateFileResponse" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BatchOperationMetadata": { +"description": "Metadata for the batch operations such as the current state. This is included in the `metadata` field of the `Operation` returned by the `GetOperation` call of the `google::longrunning::Operations` service.", +"id": "GoogleCloudVisionV1p4beta1BatchOperationMetadata", +"properties": { +"endTime": { +"description": "The time when the batch request is finished and google.longrunning.Operation.done is set to true.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"PROCESSING", +"SUCCESSFUL", +"FAILED", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is actively being processed.", +"The request is done and at least one item has been successfully processed.", +"The request is done and no item has been successfully processed.", +"The request is done after the longrunning.Operations.CancelOperation has been called by the user. Any records that were processed before the cancel command are output as specified in the request." +], +"type": "string" +}, +"submitTime": { +"description": "The time when the batch request was submitted to the server.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Block": { +"description": "Logical element on the page.", +"id": "GoogleCloudVisionV1p4beta1Block", +"properties": { +"blockType": { +"description": "Detected block type (text, image etc) for this block.", +"enum": [ +"UNKNOWN", +"TEXT", +"TABLE", +"PICTURE", +"RULER", +"BARCODE" +], +"enumDescriptions": [ +"Unknown block type.", +"Regular text block.", +"Table block.", +"Image block.", +"Horizontal/vertical line box.", +"Barcode block." +], +"type": "string" +}, +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the block. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results on the block. Range [0, 1].", +"format": "float", +"type": "number" +}, +"paragraphs": { +"description": "List of paragraphs in this block (if this blocks is of type text).", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Paragraph" +}, +"type": "array" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the block." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1BoundingPoly": { +"description": "A bounding polygon for the detected image annotation.", +"id": "GoogleCloudVisionV1p4beta1BoundingPoly", +"properties": { +"normalizedVertices": { +"description": "The bounding polygon normalized vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1NormalizedVertex" +}, +"type": "array" +}, +"vertices": { +"description": "The bounding polygon vertices.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Vertex" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Celebrity": { +"description": "A Celebrity is a group of Faces with an identity.", +"id": "GoogleCloudVisionV1p4beta1Celebrity", +"properties": { +"description": { +"description": "The Celebrity's description.", +"type": "string" +}, +"displayName": { +"description": "The Celebrity's display name.", +"type": "string" +}, +"name": { +"description": "The resource name of the preloaded Celebrity. Has the format `builtin/{mid}`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ColorInfo": { +"description": "Color information consists of RGB channels, score, and the fraction of the image that the color occupies in the image.", +"id": "GoogleCloudVisionV1p4beta1ColorInfo", +"properties": { +"color": { +"$ref": "Color", +"description": "RGB components of the color." +}, +"pixelFraction": { +"description": "The fraction of pixels the color occupies in the image. Value in range [0, 1].", +"format": "float", +"type": "number" +}, +"score": { +"description": "Image-specific score for this color. Value in range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1CropHint": { +"description": "Single crop hint that is used to generate a new crop when serving an image.", +"id": "GoogleCloudVisionV1p4beta1CropHint", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon for the crop region. The coordinates of the bounding box are in the original image's scale." +}, +"confidence": { +"description": "Confidence of this being a salient region. Range [0, 1].", +"format": "float", +"type": "number" +}, +"importanceFraction": { +"description": "Fraction of importance of this salient region with respect to the original image.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1CropHintsAnnotation": { +"description": "Set of crop hints that are used to generate new crops when serving images.", +"id": "GoogleCloudVisionV1p4beta1CropHintsAnnotation", +"properties": { +"cropHints": { +"description": "Crop hint results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1CropHint" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1DominantColorsAnnotation": { +"description": "Set of dominant colors and their corresponding scores.", +"id": "GoogleCloudVisionV1p4beta1DominantColorsAnnotation", +"properties": { +"colors": { +"description": "RGB color values with their score and pixel fraction.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ColorInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1EntityAnnotation": { +"description": "Set of detected entity features.", +"id": "GoogleCloudVisionV1p4beta1EntityAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "Image region to which this entity belongs. Not produced for `LABEL_DETECTION` features." +}, +"confidence": { +"deprecated": true, +"description": "**Deprecated. Use `score` instead.** The accuracy of the entity detection in an image. For example, for an image in which the \"Eiffel Tower\" entity is detected, this field represents the confidence that there is a tower in the query image. Range [0, 1].", +"format": "float", +"type": "number" +}, +"description": { +"description": "Entity textual description, expressed in its `locale` language.", +"type": "string" +}, +"locale": { +"description": "The language code for the locale in which the entity textual `description` is expressed.", +"type": "string" +}, +"locations": { +"description": "The location information for the detected entity. Multiple `LocationInfo` elements can be present because one location may indicate the location of the scene in the image, and another location may indicate the location of the place where the image was taken. Location information is usually present for landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1LocationInfo" +}, +"type": "array" +}, +"mid": { +"description": "Opaque entity ID. Some IDs may be available in [Google Knowledge Graph Search API](https://developers.google.com/knowledge-graph/).", +"type": "string" +}, +"properties": { +"description": "Some entities may have optional user-supplied `Property` (name/value) fields, such a score or string that qualifies the entity.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Property" +}, +"type": "array" +}, +"score": { +"description": "Overall score of the result. Range [0, 1].", +"format": "float", +"type": "number" +}, +"topicality": { +"description": "The relevancy of the ICA (Image Content Annotation) label to the image. For example, the relevancy of \"tower\" is likely higher to an image containing the detected \"Eiffel Tower\" than to an image containing a detected distant towering building, even though the confidence that there is a tower in each image may be the same. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceAnnotation": { +"description": "A face annotation object contains the results of face detection.", +"id": "GoogleCloudVisionV1p4beta1FaceAnnotation", +"properties": { +"angerLikelihood": { +"description": "Anger likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"blurredLikelihood": { +"description": "Blurred likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon around the face. The coordinates of the bounding box are in the original image's scale. The bounding box is computed to \"frame\" the face in accordance with human expectations. It is based on the landmarker results. Note that one or more x and/or y coordinates may not be generated in the `BoundingPoly` (the polygon will be unbounded) if only a partial face appears in the image to be annotated." +}, +"detectionConfidence": { +"description": "Detection confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"fdBoundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The `fd_bounding_poly` bounding polygon is tighter than the `boundingPoly`, and encloses only the skin part of the face. Typically, it is used to eliminate the face from any image analysis that detects the \"amount of skin\" visible in an image. It is not based on the landmarker results, only on the initial face detection, hence the fd (face detection) prefix." +}, +"headwearLikelihood": { +"description": "Headwear likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"joyLikelihood": { +"description": "Joy likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"landmarkingConfidence": { +"description": "Face landmarking confidence. Range [0, 1].", +"format": "float", +"type": "number" +}, +"landmarks": { +"description": "Detected face landmarks.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark" +}, +"type": "array" +}, +"panAngle": { +"description": "Yaw angle, which indicates the leftward/rightward angle that the face is pointing relative to the vertical plane perpendicular to the image. Range [-180,180].", +"format": "float", +"type": "number" +}, +"recognitionResult": { +"description": "Additional recognition information. Only computed if image_context.face_recognition_params is provided, **and** a match is found to a Celebrity in the input CelebritySet. This field is sorted in order of decreasing confidence values.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1FaceRecognitionResult" +}, +"type": "array" +}, +"rollAngle": { +"description": "Roll angle, which indicates the amount of clockwise/anti-clockwise rotation of the face relative to the image vertical about the axis perpendicular to the face. Range [-180,180].", +"format": "float", +"type": "number" +}, +"sorrowLikelihood": { +"description": "Sorrow likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"surpriseLikelihood": { +"description": "Surprise likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"tiltAngle": { +"description": "Pitch angle, which indicates the upwards/downwards angle that the face is pointing relative to the image's horizontal plane. Range [-180,180].", +"format": "float", +"type": "number" +}, +"underExposedLikelihood": { +"description": "Under-exposed likelihood.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceAnnotationLandmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "GoogleCloudVisionV1p4beta1FaceAnnotationLandmark", +"properties": { +"position": { +"$ref": "GoogleCloudVisionV1p4beta1Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1FaceRecognitionResult": { +"description": "Information about a face's identity.", +"id": "GoogleCloudVisionV1p4beta1FaceRecognitionResult", +"properties": { +"celebrity": { +"$ref": "GoogleCloudVisionV1p4beta1Celebrity", +"description": "The Celebrity that this face was matched to." +}, +"confidence": { +"description": "Recognition confidence. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1GcsDestination": { +"description": "The Google Cloud Storage location where the output will be written to.", +"id": "GoogleCloudVisionV1p4beta1GcsDestination", +"properties": { +"uri": { +"description": "Google Cloud Storage URI prefix where the results will be stored. Results will be in JSON format and preceded by its corresponding input URI prefix. This field can either represent a gcs file prefix or gcs directory. In either case, the uri should be unique because in order to get all of the output files, you will need to do a wildcard gcs search on the uri prefix you provide. Examples: * File Prefix: gs://bucket-name/here/filenameprefix The output files will be created in gs://bucket-name/here/ and the names of the output files will begin with \"filenameprefix\". * Directory Prefix: gs://bucket-name/some/location/ The output files will be created in gs://bucket-name/some/location/ and the names of the output files could be anything because there was no filename prefix specified. If multiple outputs, each response is still AnnotateFileResponse, each of which contains some subset of the full list of AnnotateImageResponse. Multiple outputs can happen if, for example, the output JSON is too large and overflows into multiple sharded files.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1GcsSource": { +"description": "The Google Cloud Storage location where the input will be read from.", +"id": "GoogleCloudVisionV1p4beta1GcsSource", +"properties": { +"uri": { +"description": "Google Cloud Storage URI for the input file. This must only be a Google Cloud Storage object. Wildcards are not currently supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "GoogleCloudVisionV1p4beta1ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "GoogleCloudVisionV1p4beta1ImageProperties", +"properties": { +"dominantColors": { +"$ref": "GoogleCloudVisionV1p4beta1DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "GoogleCloudVisionV1p4beta1ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1InputConfig": { +"description": "The desired input location and metadata.", +"id": "GoogleCloudVisionV1p4beta1InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GoogleCloudVisionV1p4beta1GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "GoogleCloudVisionV1p4beta1LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1LocationInfo": { +"description": "Detected entity location information.", +"id": "GoogleCloudVisionV1p4beta1LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "GoogleCloudVisionV1p4beta1NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "GoogleCloudVisionV1p4beta1OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1OutputConfig": { +"description": "The desired output location and metadata.", +"id": "GoogleCloudVisionV1p4beta1OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GoogleCloudVisionV1p4beta1GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Page": { +"description": "Detected page from OCR.", +"id": "GoogleCloudVisionV1p4beta1Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "GoogleCloudVisionV1p4beta1Paragraph", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p4beta1Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Product": { +"description": "A Product contains ReferenceImages.", +"id": "GoogleCloudVisionV1p4beta1Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductKeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductKeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "GoogleCloudVisionV1p4beta1ProductKeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResults": { +"description": "Results for a product search request.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsGroupedResult", +"properties": { +"boundingPoly": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ProductSearchResultsResult": { +"description": "Information about a product.", +"id": "GoogleCloudVisionV1p4beta1ProductSearchResultsResult", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "GoogleCloudVisionV1p4beta1Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "GoogleCloudVisionV1p4beta1Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "GoogleCloudVisionV1p4beta1ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "GoogleCloudVisionV1p4beta1SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Symbol": { +"description": "A single symbol representation.", +"id": "GoogleCloudVisionV1p4beta1Symbol", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak": { +"description": "Detected start or end of a structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak", +"properties": { +"isPrefix": { +"description": "True if break prepends the element.", +"type": "boolean" +}, +"type": { +"description": "Detected break type.", +"enum": [ +"UNKNOWN", +"SPACE", +"SURE_SPACE", +"EOL_SURE_SPACE", +"HYPHEN", +"LINE_BREAK" +], +"enumDescriptions": [ +"Unknown break label type.", +"Regular space.", +"Sure space (very wide).", +"Line-wrapping break.", +"End-line hyphen that is not present in text; does not co-occur with `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.", +"Line break that ends a paragraph." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage": { +"description": "Detected language for a structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage", +"properties": { +"confidence": { +"description": "Confidence of detected language. Range [0, 1].", +"format": "float", +"type": "number" +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1TextAnnotationTextProperty": { +"description": "Additional information detected on the structural component.", +"id": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"properties": { +"detectedBreak": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationDetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "GoogleCloudVisionV1p4beta1Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "GoogleCloudVisionV1p4beta1WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebImage": { +"description": "Metadata for online images.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1WebDetectionWebPage": { +"description": "Metadata for web pages.", +"id": "GoogleCloudVisionV1p4beta1WebDetectionWebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1WebDetectionWebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudVisionV1p4beta1Word": { +"description": "A word representation.", +"id": "GoogleCloudVisionV1p4beta1Word", +"properties": { +"boundingBox": { +"$ref": "GoogleCloudVisionV1p4beta1BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "GoogleCloudVisionV1p4beta1TextAnnotationTextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "GoogleCloudVisionV1p4beta1Symbol" +}, +"type": "array" +} +}, +"type": "object" +}, +"GroupedResult": { +"description": "Information about the products similar to a single product in a query image.", +"id": "GroupedResult", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "The bounding polygon around the product detected in the query image." +}, +"objectAnnotations": { +"description": "List of generic predictions for the object in the bounding box.", +"items": { +"$ref": "ObjectAnnotation" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "Result" +}, +"type": "array" +} +}, +"type": "object" +}, +"ImageAnnotationContext": { +"description": "If an image was produced from a file (e.g. a PDF), this message gives information about the source of that image.", +"id": "ImageAnnotationContext", +"properties": { +"pageNumber": { +"description": "If the file was a PDF or TIFF, this field gives the page number within the file used to produce the image.", +"format": "int32", +"type": "integer" +}, +"uri": { +"description": "The URI of the file used to produce the image.", +"type": "string" +} +}, +"type": "object" +}, +"ImageProperties": { +"description": "Stores image properties, such as dominant colors.", +"id": "ImageProperties", +"properties": { +"dominantColors": { +"$ref": "DominantColorsAnnotation", +"description": "If present, dominant colors completed successfully." +} +}, +"type": "object" +}, +"ImportProductSetsResponse": { +"description": "Response message for the `ImportProductSets` method. This message is returned by the google.longrunning.Operations.GetOperation method in the returned google.longrunning.Operation.response field.", +"id": "ImportProductSetsResponse", +"properties": { +"referenceImages": { +"description": "The list of reference_images that are imported successfully.", +"items": { +"$ref": "ReferenceImage" +}, +"type": "array" +}, +"statuses": { +"description": "The rpc status for each ImportProductSet request, including both successes and errors. The number of statuses here matches the number of lines in the csv file, and statuses[i] stores the success or failure status of processing the i-th line of the csv, starting from line 0.", +"items": { +"$ref": "Status" +}, +"type": "array" +} +}, +"type": "object" +}, +"InputConfig": { +"description": "The desired input location and metadata.", +"id": "InputConfig", +"properties": { +"content": { +"description": "File content, represented as a stream of bytes. Note: As with all `bytes` fields, protobuffers use a pure binary representation, whereas JSON representations use base64. Currently, this field only works for BatchAnnotateFiles requests. It does not work for AsyncBatchAnnotateFiles requests.", +"format": "byte", +"type": "string" +}, +"gcsSource": { +"$ref": "GcsSource", +"description": "The Google Cloud Storage location to read the input from." +}, +"mimeType": { +"description": "The type of the file. Currently only \"application/pdf\", \"image/tiff\" and \"image/gif\" are supported. Wildcards are not supported.", +"type": "string" +} +}, +"type": "object" +}, +"KeyValue": { +"description": "A product label represented as a key-value pair.", +"id": "KeyValue", +"properties": { +"key": { +"description": "The key of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +}, +"value": { +"description": "The value of the label attached to the product. Cannot be empty and cannot exceed 128 bytes.", +"type": "string" +} +}, +"type": "object" +}, +"Landmark": { +"description": "A face-specific landmark (for example, a face feature).", +"id": "Landmark", +"properties": { +"position": { +"$ref": "Position", +"description": "Face landmark position." +}, +"type": { +"description": "Face landmark type.", +"enum": [ +"UNKNOWN_LANDMARK", +"LEFT_EYE", +"RIGHT_EYE", +"LEFT_OF_LEFT_EYEBROW", +"RIGHT_OF_LEFT_EYEBROW", +"LEFT_OF_RIGHT_EYEBROW", +"RIGHT_OF_RIGHT_EYEBROW", +"MIDPOINT_BETWEEN_EYES", +"NOSE_TIP", +"UPPER_LIP", +"LOWER_LIP", +"MOUTH_LEFT", +"MOUTH_RIGHT", +"MOUTH_CENTER", +"NOSE_BOTTOM_RIGHT", +"NOSE_BOTTOM_LEFT", +"NOSE_BOTTOM_CENTER", +"LEFT_EYE_TOP_BOUNDARY", +"LEFT_EYE_RIGHT_CORNER", +"LEFT_EYE_BOTTOM_BOUNDARY", +"LEFT_EYE_LEFT_CORNER", +"RIGHT_EYE_TOP_BOUNDARY", +"RIGHT_EYE_RIGHT_CORNER", +"RIGHT_EYE_BOTTOM_BOUNDARY", +"RIGHT_EYE_LEFT_CORNER", +"LEFT_EYEBROW_UPPER_MIDPOINT", +"RIGHT_EYEBROW_UPPER_MIDPOINT", +"LEFT_EAR_TRAGION", +"RIGHT_EAR_TRAGION", +"LEFT_EYE_PUPIL", +"RIGHT_EYE_PUPIL", +"FOREHEAD_GLABELLA", +"CHIN_GNATHION", +"CHIN_LEFT_GONION", +"CHIN_RIGHT_GONION", +"LEFT_CHEEK_CENTER", +"RIGHT_CHEEK_CENTER" +], +"enumDescriptions": [ +"Unknown face landmark detected. Should not be filled.", +"Left eye.", +"Right eye.", +"Left of left eyebrow.", +"Right of left eyebrow.", +"Left of right eyebrow.", +"Right of right eyebrow.", +"Midpoint between eyes.", +"Nose tip.", +"Upper lip.", +"Lower lip.", +"Mouth left.", +"Mouth right.", +"Mouth center.", +"Nose, bottom right.", +"Nose, bottom left.", +"Nose, bottom center.", +"Left eye, top boundary.", +"Left eye, right corner.", +"Left eye, bottom boundary.", +"Left eye, left corner.", +"Right eye, top boundary.", +"Right eye, right corner.", +"Right eye, bottom boundary.", +"Right eye, left corner.", +"Left eyebrow, upper midpoint.", +"Right eyebrow, upper midpoint.", +"Left ear tragion.", +"Right ear tragion.", +"Left eye pupil.", +"Right eye pupil.", +"Forehead glabella.", +"Chin gnathion.", +"Chin left gonion.", +"Chin right gonion.", +"Left cheek center.", +"Right cheek center." +], +"type": "string" +} +}, +"type": "object" +}, +"LatLng": { +"description": "An object that represents a latitude/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.", +"id": "LatLng", +"properties": { +"latitude": { +"description": "The latitude in degrees. It must be in the range [-90.0, +90.0].", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude in degrees. It must be in the range [-180.0, +180.0].", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"LocalizedObjectAnnotation": { +"description": "Set of detected objects with bounding boxes.", +"id": "LocalizedObjectAnnotation", +"properties": { +"boundingPoly": { +"$ref": "BoundingPoly", +"description": "Image region to which this object belongs. This must be populated." +}, +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"LocationInfo": { +"description": "Detected entity location information.", +"id": "LocationInfo", +"properties": { +"latLng": { +"$ref": "LatLng", +"description": "lat/long location coordinates." +} +}, +"type": "object" +}, +"NormalizedVertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the normalized vertex coordinates are relative to the original image and range from 0 to 1.", +"id": "NormalizedVertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"ObjectAnnotation": { +"description": "Prediction for what the object in the bounding box is.", +"id": "ObjectAnnotation", +"properties": { +"languageCode": { +"description": "The BCP-47 language code, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +}, +"mid": { +"description": "Object ID that should align with EntityAnnotation mid.", +"type": "string" +}, +"name": { +"description": "Object name, expressed in its `language_code` language.", +"type": "string" +}, +"score": { +"description": "Score of the result. Range [0, 1].", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Contains metadata for the BatchAnnotateImages operation.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "The time when the batch request was received.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "Current state of the batch operation.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATED", +"RUNNING", +"DONE", +"CANCELLED" +], +"enumDescriptions": [ +"Invalid.", +"Request is received.", +"Request is actively being processed.", +"The batch processing is done.", +"The batch processing was cancelled." +], +"type": "string" +}, +"updateTime": { +"description": "The time when the operation result was last updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"OutputConfig": { +"description": "The desired output location and metadata.", +"id": "OutputConfig", +"properties": { +"batchSize": { +"description": "The max number of response protos to put into each output JSON file on Google Cloud Storage. The valid range is [1, 100]. If not specified, the default value is 20. For example, for one pdf file with 100 pages, 100 response protos will be generated. If `batch_size` = 20, then 5 json files each containing 20 response protos will be written under the prefix `gcs_destination`.`uri`. Currently, batch_size only applies to GcsDestination, with potential future support for other output configurations.", +"format": "int32", +"type": "integer" +}, +"gcsDestination": { +"$ref": "GcsDestination", +"description": "The Google Cloud Storage location to write the output(s) to." +} +}, +"type": "object" +}, +"Page": { +"description": "Detected page from OCR.", +"id": "Page", +"properties": { +"blocks": { +"description": "List of blocks of text, images etc on this page.", +"items": { +"$ref": "Block" +}, +"type": "array" +}, +"confidence": { +"description": "Confidence of the OCR results on the page. Range [0, 1].", +"format": "float", +"type": "number" +}, +"height": { +"description": "Page height. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected on the page." +}, +"width": { +"description": "Page width. For PDFs the unit is points. For images (including TIFFs) the unit is pixels.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Paragraph": { +"description": "Structural unit of text representing a number of words in certain order.", +"id": "Paragraph", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the paragraph. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the paragraph. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the paragraph." +}, +"words": { +"description": "List of all words in this paragraph.", +"items": { +"$ref": "Word" +}, +"type": "array" +} +}, +"type": "object" +}, +"Position": { +"description": "A 3D position in the image, used primarily for Face detection landmarks. A valid Position must have both x and y coordinates. The position coordinates are in the same scale as the original image.", +"id": "Position", +"properties": { +"x": { +"description": "X coordinate.", +"format": "float", +"type": "number" +}, +"y": { +"description": "Y coordinate.", +"format": "float", +"type": "number" +}, +"z": { +"description": "Z coordinate (or depth).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"Product": { +"description": "A Product contains ReferenceImages.", +"id": "Product", +"properties": { +"description": { +"description": "User-provided metadata to be stored with this product. Must be at most 4096 characters long.", +"type": "string" +}, +"displayName": { +"description": "The user-provided name for this Product. Must not be empty. Must be at most 4096 characters long.", +"type": "string" +}, +"name": { +"description": "The resource name of the product. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID`. This field is ignored when creating a product.", +"type": "string" +}, +"productCategory": { +"description": "Immutable. The category for the product identified by the reference image. This should be one of \"homegoods-v2\", \"apparel-v2\", \"toys-v2\", \"packagedgoods-v1\" or \"general-v1\". The legacy categories \"homegoods\", \"apparel\", and \"toys\" are still supported, but these should not be used for new products.", +"type": "string" +}, +"productLabels": { +"description": "Key-value pairs that can be attached to a product. At query time, constraints can be specified based on the product_labels. Note that integer values can be provided as strings, e.g. \"1199\". Only strings with integer values can match a range-based restriction which is to be supported soon. Multiple values can be assigned to the same key. One product may have up to 500 product_labels. Notice that the total number of distinct product_labels over all products in one ProductSet cannot exceed 1M, otherwise the product search pipeline will refuse to work for that ProductSet.", +"items": { +"$ref": "KeyValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"ProductSearchResults": { +"description": "Results for a product search request.", +"id": "ProductSearchResults", +"properties": { +"indexTime": { +"description": "Timestamp of the index which provided these results. Products added to the product set and products removed from the product set after this time are not reflected in the current results.", +"format": "google-datetime", +"type": "string" +}, +"productGroupedResults": { +"description": "List of results grouped by products detected in the query image. Each entry corresponds to one bounding polygon in the query image, and contains the matching products specific to that region. There may be duplicate product matches in the union of all the per-product results.", +"items": { +"$ref": "GroupedResult" +}, +"type": "array" +}, +"results": { +"description": "List of results, one for each product match.", +"items": { +"$ref": "Result" +}, +"type": "array" +} +}, +"type": "object" +}, +"Property": { +"description": "A `Property` consists of a user-supplied name/value pair.", +"id": "Property", +"properties": { +"name": { +"description": "Name of the property.", +"type": "string" +}, +"uint64Value": { +"description": "Value of numeric properties.", +"format": "uint64", +"type": "string" +}, +"value": { +"description": "Value of the property.", +"type": "string" +} +}, +"type": "object" +}, +"ReferenceImage": { +"description": "A `ReferenceImage` represents a product image and its associated metadata, such as bounding boxes.", +"id": "ReferenceImage", +"properties": { +"boundingPolys": { +"description": "Optional. Bounding polygons around the areas of interest in the reference image. If this field is empty, the system will try to detect regions of interest. At most 10 bounding polygons will be used. The provided shape is converted into a non-rotated rectangle. Once converted, the small edge of the rectangle must be greater than or equal to 300 pixels. The aspect ratio must be 1:4 or less (i.e. 1:3 is ok; 1:5 is not).", +"items": { +"$ref": "BoundingPoly" +}, +"type": "array" +}, +"name": { +"description": "The resource name of the reference image. Format is: `projects/PROJECT_ID/locations/LOC_ID/products/PRODUCT_ID/referenceImages/IMAGE_ID`. This field is ignored when creating a reference image.", +"type": "string" +}, +"uri": { +"description": "Required. The Google Cloud Storage URI of the reference image. The URI must start with `gs://`.", +"type": "string" +} +}, +"type": "object" +}, +"Result": { +"description": "Information about a product.", +"id": "Result", +"properties": { +"image": { +"description": "The resource name of the image from the product that is the closest match to the query.", +"type": "string" +}, +"product": { +"$ref": "Product", +"description": "The Product." +}, +"score": { +"description": "A confidence level on the match, ranging from 0 (no confidence) to 1 (full confidence).", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"SafeSearchAnnotation": { +"description": "Set of features pertaining to the image, computed by computer vision methods over safe-search verticals (for example, adult, spoof, medical, violence).", +"id": "SafeSearchAnnotation", +"properties": { +"adult": { +"description": "Represents the adult content likelihood for the image. Adult content may contain elements such as nudity, pornographic images or cartoons, or sexual activities.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"medical": { +"description": "Likelihood that this is a medical image.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"racy": { +"description": "Likelihood that the request image contains racy content. Racy content may include (but is not limited to) skimpy or sheer clothing, strategically covered nudity, lewd or provocative poses, or close-ups of sensitive body areas.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"spoof": { +"description": "Spoof likelihood. The likelihood that an modification was made to the image's canonical version to make it appear funny or offensive.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +}, +"violence": { +"description": "Likelihood that this image contains violent content. Violent content may include death, serious harm, or injury to individuals or groups of individuals.", +"enum": [ +"UNKNOWN", +"VERY_UNLIKELY", +"UNLIKELY", +"POSSIBLE", +"LIKELY", +"VERY_LIKELY" +], +"enumDescriptions": [ +"Unknown likelihood.", +"It is very unlikely.", +"It is unlikely.", +"It is possible.", +"It is likely.", +"It is very likely." +], +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Symbol": { +"description": "A single symbol representation.", +"id": "Symbol", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the symbol. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the symbol. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the symbol." +}, +"text": { +"description": "The actual UTF-8 representation of the symbol.", +"type": "string" +} +}, +"type": "object" +}, +"TextAnnotation": { +"description": "TextAnnotation contains a structured representation of OCR extracted text. The hierarchy of an OCR extracted text structure is like this: TextAnnotation -> Page -> Block -> Paragraph -> Word -> Symbol Each structural component, starting from Page, may further have their own properties. Properties describe detected languages, breaks etc.. Please refer to the TextAnnotation.TextProperty message definition below for more detail.", +"id": "TextAnnotation", +"properties": { +"pages": { +"description": "List of pages detected by OCR.", +"items": { +"$ref": "Page" +}, +"type": "array" +}, +"text": { +"description": "UTF-8 text detected on the pages.", +"type": "string" +} +}, +"type": "object" +}, +"TextProperty": { +"description": "Additional information detected on the structural component.", +"id": "TextProperty", +"properties": { +"detectedBreak": { +"$ref": "DetectedBreak", +"description": "Detected start or end of a text segment." +}, +"detectedLanguages": { +"description": "A list of detected languages together with confidence.", +"items": { +"$ref": "DetectedLanguage" +}, +"type": "array" +} +}, +"type": "object" +}, +"Vertex": { +"description": "A vertex represents a 2D point in the image. NOTE: the vertex coordinates are in the same scale as the original image.", +"id": "Vertex", +"properties": { +"x": { +"description": "X coordinate.", +"format": "int32", +"type": "integer" +}, +"y": { +"description": "Y coordinate.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"WebDetection": { +"description": "Relevant information for the image from the Internet.", +"id": "WebDetection", +"properties": { +"bestGuessLabels": { +"description": "The service's best guess as to the topic of the request image. Inferred from similar images on the open web.", +"items": { +"$ref": "WebLabel" +}, +"type": "array" +}, +"fullMatchingImages": { +"description": "Fully matching images from the Internet. Can include resized copies of the query image.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"pagesWithMatchingImages": { +"description": "Web pages containing the matching images from the Internet.", +"items": { +"$ref": "WebPage" +}, +"type": "array" +}, +"partialMatchingImages": { +"description": "Partial matching images from the Internet. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"visuallySimilarImages": { +"description": "The visually similar image results.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"webEntities": { +"description": "Deduced entities from similar images on the Internet.", +"items": { +"$ref": "WebEntity" +}, +"type": "array" +} +}, +"type": "object" +}, +"WebEntity": { +"description": "Entity deduced from similar images on the Internet.", +"id": "WebEntity", +"properties": { +"description": { +"description": "Canonical description of the entity, in English.", +"type": "string" +}, +"entityId": { +"description": "Opaque entity ID.", +"type": "string" +}, +"score": { +"description": "Overall relevancy score for the entity. Not normalized and not comparable across different image queries.", +"format": "float", +"type": "number" +} +}, +"type": "object" +}, +"WebImage": { +"description": "Metadata for online images.", +"id": "WebImage", +"properties": { +"score": { +"description": "(Deprecated) Overall relevancy score for the image.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result image URL.", +"type": "string" +} +}, +"type": "object" +}, +"WebLabel": { +"description": "Label to provide extra metadata for the web detection.", +"id": "WebLabel", +"properties": { +"label": { +"description": "Label for extra metadata.", +"type": "string" +}, +"languageCode": { +"description": "The BCP-47 language code for `label`, such as \"en-US\" or \"sr-Latn\". For more information, see http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.", +"type": "string" +} +}, +"type": "object" +}, +"WebPage": { +"description": "Metadata for web pages.", +"id": "WebPage", +"properties": { +"fullMatchingImages": { +"description": "Fully matching images on the page. Can include resized copies of the query image.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"pageTitle": { +"description": "Title for the web page, may contain HTML markups.", +"type": "string" +}, +"partialMatchingImages": { +"description": "Partial matching images on the page. Those images are similar enough to share some key-point features. For example an original image will likely have partial matching for its crops.", +"items": { +"$ref": "WebImage" +}, +"type": "array" +}, +"score": { +"description": "(Deprecated) Overall relevancy score for the web page.", +"format": "float", +"type": "number" +}, +"url": { +"description": "The result web page URL.", +"type": "string" +} +}, +"type": "object" +}, +"Word": { +"description": "A word representation.", +"id": "Word", +"properties": { +"boundingBox": { +"$ref": "BoundingPoly", +"description": "The bounding box for the word. The vertices are in the order of top-left, top-right, bottom-right, bottom-left. When a rotation of the bounding box is detected the rotation is represented as around the top-left corner as defined when the text is read in the 'natural' orientation. For example: * when the text is horizontal it might look like: 0----1 | | 3----2 * when it's rotated 180 degrees around the top-left corner it becomes: 2----3 | | 1----0 and the vertex order will still be (0, 1, 2, 3)." +}, +"confidence": { +"description": "Confidence of the OCR results for the word. Range [0, 1].", +"format": "float", +"type": "number" +}, +"property": { +"$ref": "TextProperty", +"description": "Additional information detected for the word." +}, +"symbols": { +"description": "List of symbols in the word. The order of the symbols follows the natural reading order.", +"items": { +"$ref": "Symbol" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Vision API", +"version": "v1p2beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmmigration.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmmigration.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..43d5366c2cfe12a9c60765ac63607fa6574f80a6 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmmigration.v1.json @@ -0,0 +1,5795 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://vmmigration.googleapis.com/", +"batchPath": "batch", +"canonicalName": "VM Migration Service", +"description": "Use the Migrate to Virtual Machines API to programmatically migrate workloads. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/migrate/virtual-machines", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vmmigration:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vmmigration.mtls.googleapis.com/", +"name": "vmmigration", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"groups": { +"methods": { +"addGroupMigration": { +"description": "Adds a MigratingVm to a Group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:addGroupMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.groups.addGroupMigration", +"parameterOrder": [ +"group" +], +"parameters": { +"group": { +"description": "Required. The full path name of the Group to add to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+group}:addGroupMigration", +"request": { +"$ref": "AddGroupMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Group in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.groups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"groupId": { +"description": "Required. The group identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Group's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/groups", +"request": { +"$ref": "Group" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.groups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Group name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.groups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The group name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Group" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Groups in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.groups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 500 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of groups.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/groups", +"response": { +"$ref": "ListGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.groups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The Group name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the Group resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Group" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeGroupMigration": { +"description": "Removes a MigratingVm from a Group.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:removeGroupMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.groups.removeGroupMigration", +"parameterOrder": [ +"group" +], +"parameters": { +"group": { +"description": "Required. The name of the Group.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+group}:removeGroupMigration", +"request": { +"$ref": "RemoveGroupMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"imageImports": { +"methods": { +"create": { +"description": "Creates a new ImageImport in a given project.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.imageImports.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"imageImportId": { +"description": "Required. The image import identifier. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The ImageImport's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/imageImports", +"request": { +"$ref": "ImageImport" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ImageImport.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.imageImports.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ImageImport name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ImageImport.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ImageImport name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ImageImport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ImageImports in a given project.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request (according to https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListImageImports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of targets.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/imageImports", +"response": { +"$ref": "ListImageImportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"imageImportJobs": { +"methods": { +"cancel": { +"description": "Initiates the cancellation of a running clone job.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.imageImports.imageImportJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The image import job id.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelImageImportJobRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ImageImportJob.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.imageImportJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ImageImportJob name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ImageImportJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ImageImportJobs in a given project.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.imageImportJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request (according to https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListImageImportJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImportJobs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of targets.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/imageImportJobs", +"response": { +"$ref": "ListImageImportJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"sources": { +"methods": { +"create": { +"description": "Creates a new Source in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Source's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"sourceId": { +"description": "Required. The source identifier.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/sources", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Source name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"fetchInventory": { +"description": "List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.fetchInventory", +"parameterOrder": [ +"source" +], +"parameters": { +"forceRefresh": { +"description": "If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower.", +"location": "query", +"type": "boolean" +}, +"pageSize": { +"description": "The maximum number of VMs to return. The service may return fewer than this value. For AWS source: If unspecified, at most 500 VMs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. For VMWare source: If unspecified, all VMs will be returned. There is no limit for maximum value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `FetchInventory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchInventory` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"source": { +"description": "Required. The name of the Source.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+source}:fetchInventory", +"response": { +"$ref": "FetchInventoryResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Source name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Sources in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of sources to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSources` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of sources.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/sources", +"response": { +"$ref": "ListSourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.sources.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The Source name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the Source resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"datacenterConnectors": { +"methods": { +"create": { +"description": "Creates a new DatacenterConnector in a given Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"datacenterConnectorId": { +"description": "Required. The datacenterConnector identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The DatacenterConnector's parent. Required. The Source in where the new DatacenterConnector will be created. For example: `projects/my-project/locations/us-central1/sources/my-source`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/datacenterConnectors", +"request": { +"$ref": "DatacenterConnector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single DatacenterConnector.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The DatacenterConnector name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single DatacenterConnector.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the DatacenterConnector.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "DatacenterConnector" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists DatacenterConnectors in a given Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of connectors to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListDatacenterConnectors` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDatacenterConnectors` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of connectors.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/datacenterConnectors", +"response": { +"$ref": "ListDatacenterConnectorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgradeAppliance": { +"description": "Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}:upgradeAppliance", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.upgradeAppliance", +"parameterOrder": [ +"datacenterConnector" +], +"parameters": { +"datacenterConnector": { +"description": "Required. The DatacenterConnector name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+datacenterConnector}:upgradeAppliance", +"request": { +"$ref": "UpgradeApplianceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"migratingVms": { +"methods": { +"create": { +"description": "Creates a new MigratingVm in a given Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"migratingVmId": { +"description": "Required. The migratingVm identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The MigratingVm's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/migratingVms", +"request": { +"$ref": "MigratingVm" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single MigratingVm.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.migratingVms.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"finalizeMigration": { +"description": "Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:finalizeMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.finalizeMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+migratingVm}:finalizeMigration", +"request": { +"$ref": "FinalizeMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single MigratingVm.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of the migrating VM.", +"enum": [ +"MIGRATING_VM_VIEW_UNSPECIFIED", +"MIGRATING_VM_VIEW_BASIC", +"MIGRATING_VM_VIEW_FULL" +], +"enumDescriptions": [ +"View is unspecified. The API will fallback to the default value.", +"Get the migrating VM basic details. The basic details do not include the recent clone jobs and recent cutover jobs lists.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "MigratingVm" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists MigratingVms in a given Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of migrating VMs to return. The service may return fewer than this value. If unspecified, at most 500 migrating VMs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListMigratingVms` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMigratingVms` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of MigratingVms.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of each migrating VM.", +"enum": [ +"MIGRATING_VM_VIEW_UNSPECIFIED", +"MIGRATING_VM_VIEW_BASIC", +"MIGRATING_VM_VIEW_FULL" +], +"enumDescriptions": [ +"View is unspecified. The API will fallback to the default value.", +"Get the migrating VM basic details. The basic details do not include the recent clone jobs and recent cutover jobs lists.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/migratingVms", +"response": { +"$ref": "ListMigratingVmsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single MigratingVm.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.sources.migratingVms.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The identifier of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the MigratingVm resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "MigratingVm" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pauseMigration": { +"description": "Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:pauseMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.pauseMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+migratingVm}:pauseMigration", +"request": { +"$ref": "PauseMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resumeMigration": { +"description": "Resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:resumeMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.resumeMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+migratingVm}:resumeMigration", +"request": { +"$ref": "ResumeMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"startMigration": { +"description": "Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:startMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.startMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+migratingVm}:startMigration", +"request": { +"$ref": "StartMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"cloneJobs": { +"methods": { +"cancel": { +"description": "Initiates the cancellation of a running clone job.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The clone job id", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelCloneJobRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Initiates a Clone of a specific migrating VM.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"cloneJobId": { +"description": "Required. The clone job identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Clone's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/cloneJobs", +"request": { +"$ref": "CloneJob" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single CloneJob.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CloneJob.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CloneJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are listed.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of clone jobs to return. The service may return fewer than this value. If unspecified, at most 500 clone jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListCloneJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCloneJobs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of source VMs.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/cloneJobs", +"response": { +"$ref": "ListCloneJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"cutoverJobs": { +"methods": { +"cancel": { +"description": "Initiates the cancellation of a running cutover job.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The cutover job id", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelCutoverJobRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"cutoverJobId": { +"description": "Required. The cutover job identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Cutover's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/cutoverJobs", +"request": { +"$ref": "CutoverJob" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single CutoverJob.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CutoverJob.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "CutoverJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs are listed.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of cutover jobs to return. The service may return fewer than this value. If unspecified, at most 500 cutover jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListCutoverJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCutoverJobs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of migrating VMs.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/cutoverJobs", +"response": { +"$ref": "ListCutoverJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"replicationCycles": { +"methods": { +"get": { +"description": "Gets details of a single ReplicationCycle.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles/{replicationCyclesId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ReplicationCycle.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/replicationCycles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ReplicationCycle" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ReplicationCycles in a given MigratingVM.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of replication cycles to return. The service may return fewer than this value. If unspecified, at most 100 migrating VMs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListReplicationCycles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReplicationCycles` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of ReplicationCycles.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/replicationCycles", +"response": { +"$ref": "ListReplicationCyclesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"utilizationReports": { +"methods": { +"create": { +"description": "Creates a new UtilizationReport.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.utilizationReports.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Utilization Report's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"utilizationReportId": { +"description": "Required. The ID to use for the report, which will become the final component of the reports's resource name. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/utilizationReports", +"request": { +"$ref": "UtilizationReport" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Utilization Report.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.utilizationReports.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Utilization Report name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a single Utilization Report.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.utilizationReports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Utilization Report name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of the report. Defaults to FULL", +"enum": [ +"UTILIZATION_REPORT_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.", +"Get the report metadata, without the list of VMs and their utilization info.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "UtilizationReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Utilization Reports of the given Source.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.utilizationReports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of reports to return. The service may return fewer than this value. If unspecified, at most 500 reports will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListUtilizationReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUtilizationReports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Utilization Reports parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of each report. Defaults to BASIC.", +"enum": [ +"UTILIZATION_REPORT_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.", +"Get the report metadata, without the list of VMs and their utilization info.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/utilizationReports", +"response": { +"$ref": "ListUtilizationReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"targetProjects": { +"methods": { +"create": { +"description": "Creates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.targetProjects.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The TargetProject's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"targetProjectId": { +"description": "Required. The target_project identifier.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/targetProjects", +"request": { +"$ref": "TargetProject" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.targetProjects.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The TargetProject name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.targetProjects.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The TargetProject name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "TargetProject" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.targetProjects.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListTargets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargets` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of targets.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/targetProjects", +"response": { +"$ref": "ListTargetProjectsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.targetProjects.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The name of the target project.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the TargetProject resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "TargetProject" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://vmmigration.googleapis.com/", +"schemas": { +"AccessKeyCredentials": { +"description": "Message describing AWS Credentials using access key id and secret.", +"id": "AccessKeyCredentials", +"properties": { +"accessKeyId": { +"description": "AWS access key ID.", +"type": "string" +}, +"secretAccessKey": { +"description": "Input only. AWS secret access key.", +"type": "string" +}, +"sessionToken": { +"description": "Input only. AWS session token. Used only when AWS security token service (STS) is responsible for creating the temporary credentials.", +"type": "string" +} +}, +"type": "object" +}, +"AdaptingOSStep": { +"description": "AdaptingOSStep contains specific step details.", +"id": "AdaptingOSStep", +"properties": {}, +"type": "object" +}, +"AddGroupMigrationRequest": { +"description": "Request message for 'AddGroupMigration' request.", +"id": "AddGroupMigrationRequest", +"properties": { +"migratingVm": { +"description": "The full path name of the MigratingVm to add.", +"type": "string" +} +}, +"type": "object" +}, +"ApplianceVersion": { +"description": "Describes an appliance version.", +"id": "ApplianceVersion", +"properties": { +"critical": { +"description": "Determine whether it's critical to upgrade the appliance to this version.", +"type": "boolean" +}, +"releaseNotesUri": { +"description": "Link to a page that contains the version release notes.", +"type": "string" +}, +"uri": { +"description": "A link for downloading the version.", +"type": "string" +}, +"version": { +"description": "The appliance version.", +"type": "string" +} +}, +"type": "object" +}, +"AppliedLicense": { +"description": "AppliedLicense holds the license data returned by adaptation module report.", +"id": "AppliedLicense", +"properties": { +"osLicense": { +"description": "The OS license returned from the adaptation module's report.", +"type": "string" +}, +"type": { +"description": "The license type that was used in OS adaptation.", +"enum": [ +"TYPE_UNSPECIFIED", +"NONE", +"PAYG", +"BYOL" +], +"enumDescriptions": [ +"Unspecified license for the OS.", +"No license available for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +} +}, +"type": "object" +}, +"AvailableUpdates": { +"description": "Holds informatiom about the available versions for upgrade.", +"id": "AvailableUpdates", +"properties": { +"inPlaceUpdate": { +"$ref": "ApplianceVersion", +"description": "The latest version for in place update. The current appliance can be updated to this version using the API or m4c CLI." +}, +"newDeployableAppliance": { +"$ref": "ApplianceVersion", +"description": "The newest deployable version of the appliance. The current appliance can't be updated into this version, and the owner must manually deploy this OVA to a new appliance." +} +}, +"type": "object" +}, +"AwsDiskDetails": { +"description": "The details of an AWS instance disk.", +"id": "AwsDiskDetails", +"properties": { +"diskNumber": { +"description": "The ordinal number of the disk.", +"format": "int32", +"type": "integer" +}, +"sizeGb": { +"description": "Size in GB.", +"format": "int64", +"type": "string" +}, +"volumeId": { +"description": "AWS volume ID.", +"type": "string" +} +}, +"type": "object" +}, +"AwsSecurityGroup": { +"description": "AwsSecurityGroup describes a security group of an AWS VM.", +"id": "AwsSecurityGroup", +"properties": { +"id": { +"description": "The AWS security group id.", +"type": "string" +}, +"name": { +"description": "The AWS security group name.", +"type": "string" +} +}, +"type": "object" +}, +"AwsSourceDetails": { +"description": "AwsSourceDetails message describes a specific source details for the AWS source type.", +"id": "AwsSourceDetails", +"properties": { +"accessKeyCreds": { +"$ref": "AccessKeyCredentials", +"description": "AWS Credentials using access key id and secret." +}, +"awsRegion": { +"description": "Immutable. The AWS region that the source VMs will be migrated from.", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Source in case of an error.", +"readOnly": true +}, +"inventorySecurityGroupNames": { +"description": "AWS security group names to limit the scope of the source inventory.", +"items": { +"type": "string" +}, +"type": "array" +}, +"inventoryTagList": { +"description": "AWS resource tags to limit the scope of the source inventory.", +"items": { +"$ref": "Tag" +}, +"type": "array" +}, +"migrationResourcesUserTags": { +"additionalProperties": { +"type": "string" +}, +"description": "User specified tags to add to every M2VM generated resource in AWS. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m2vm`.", +"type": "object" +}, +"publicIp": { +"description": "Output only. The source's public IP. All communication initiated by this source will originate from this IP.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of the source as determined by the health check.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"FAILED", +"ACTIVE" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The state was not sampled by the health checks yet.", +"The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details.", +"The source exists and its credentials were verified." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AwsSourceVmDetails": { +"description": "Represent the source AWS VM details.", +"id": "AwsSourceVmDetails", +"properties": { +"committedStorageBytes": { +"description": "The total size of the disks being migrated in bytes.", +"format": "int64", +"type": "string" +}, +"disks": { +"description": "The disks attached to the source VM.", +"items": { +"$ref": "AwsDiskDetails" +}, +"type": "array" +}, +"firmware": { +"description": "The firmware type of the source VM.", +"enum": [ +"FIRMWARE_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The firmware is unknown.", +"The firmware is EFI.", +"The firmware is BIOS." +], +"type": "string" +}, +"vmCapabilitiesInfo": { +"$ref": "VmCapabilities", +"description": "Output only. Information about VM capabilities needed for some Compute Engine features.", +"readOnly": true +} +}, +"type": "object" +}, +"AwsVmDetails": { +"description": "AwsVmDetails describes a VM in AWS.", +"id": "AwsVmDetails", +"properties": { +"architecture": { +"description": "The CPU architecture.", +"enum": [ +"VM_ARCHITECTURE_UNSPECIFIED", +"I386", +"X86_64", +"ARM64", +"X86_64_MAC" +], +"enumDescriptions": [ +"The architecture is unknown.", +"The architecture is I386.", +"The architecture is X86_64.", +"The architecture is ARM64.", +"The architecture is X86_64_MAC." +], +"type": "string" +}, +"bootOption": { +"description": "The VM Boot Option.", +"enum": [ +"BOOT_OPTION_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is UEFI.", +"The boot option is LEGACY-BIOS." +], +"type": "string" +}, +"committedStorageMb": { +"description": "The total size of the storage allocated to the VM in MB.", +"format": "int64", +"type": "string" +}, +"cpuCount": { +"description": "The number of cpus the VM has.", +"format": "int32", +"type": "integer" +}, +"diskCount": { +"description": "The number of disks the VM has.", +"format": "int32", +"type": "integer" +}, +"displayName": { +"description": "The display name of the VM. Note that this value is not necessarily unique.", +"type": "string" +}, +"instanceType": { +"description": "The instance type of the VM.", +"type": "string" +}, +"memoryMb": { +"description": "The memory size of the VM in MB.", +"format": "int32", +"type": "integer" +}, +"osDescription": { +"description": "The VM's OS.", +"type": "string" +}, +"powerState": { +"description": "Output only. The power state of the VM at the moment list was taken.", +"enum": [ +"POWER_STATE_UNSPECIFIED", +"ON", +"OFF", +"SUSPENDED", +"PENDING" +], +"enumDescriptions": [ +"Power state is not specified.", +"The VM is turned on.", +"The VM is turned off.", +"The VM is suspended. This is similar to hibernation or sleep mode.", +"The VM is starting." +], +"readOnly": true, +"type": "string" +}, +"securityGroups": { +"description": "The security groups the VM belongs to.", +"items": { +"$ref": "AwsSecurityGroup" +}, +"type": "array" +}, +"sourceDescription": { +"description": "The descriptive name of the AWS's source this VM is connected to.", +"type": "string" +}, +"sourceId": { +"description": "The id of the AWS's source this VM is connected to.", +"type": "string" +}, +"tags": { +"additionalProperties": { +"type": "string" +}, +"description": "The tags of the VM.", +"type": "object" +}, +"virtualizationType": { +"description": "The virtualization type.", +"enum": [ +"VM_VIRTUALIZATION_TYPE_UNSPECIFIED", +"HVM", +"PARAVIRTUAL" +], +"enumDescriptions": [ +"The virtualization type is unknown.", +"The virtualziation type is HVM.", +"The virtualziation type is PARAVIRTUAL." +], +"type": "string" +}, +"vmId": { +"description": "The VM ID in AWS.", +"type": "string" +}, +"vpcId": { +"description": "The VPC ID the VM belongs to.", +"type": "string" +}, +"zone": { +"description": "The AWS zone of the VM.", +"type": "string" +} +}, +"type": "object" +}, +"AwsVmsDetails": { +"description": "AWSVmsDetails describes VMs in AWS.", +"id": "AwsVmsDetails", +"properties": { +"details": { +"description": "The details of the AWS VMs.", +"items": { +"$ref": "AwsVmDetails" +}, +"type": "array" +} +}, +"type": "object" +}, +"AzureDiskDetails": { +"description": "The details of an Azure VM disk.", +"id": "AzureDiskDetails", +"properties": { +"diskId": { +"description": "Azure disk ID.", +"type": "string" +}, +"diskNumber": { +"description": "The ordinal number of the disk.", +"format": "int32", +"type": "integer" +}, +"sizeGb": { +"description": "Size in GB.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"AzureSourceDetails": { +"description": "AzureSourceDetails message describes a specific source details for the Azure source type.", +"id": "AzureSourceDetails", +"properties": { +"azureLocation": { +"description": "Immutable. The Azure location (region) that the source VMs will be migrated from.", +"type": "string" +}, +"clientSecretCreds": { +"$ref": "ClientSecretCredentials", +"description": "Azure Credentials using tenant ID, client ID and secret." +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Source in case of an error.", +"readOnly": true +}, +"migrationResourcesUserTags": { +"additionalProperties": { +"type": "string" +}, +"description": "User specified tags to add to every M2VM generated resource in Azure. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m4ce` or `m2vm`.", +"type": "object" +}, +"resourceGroupId": { +"description": "Output only. The ID of the Azure resource group that contains all resources related to the migration process of this source.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of the source as determined by the health check.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"FAILED", +"ACTIVE" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The state was not sampled by the health checks yet.", +"The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details.", +"The source exists and its credentials were verified." +], +"readOnly": true, +"type": "string" +}, +"subscriptionId": { +"description": "Immutable. Azure subscription ID.", +"type": "string" +} +}, +"type": "object" +}, +"AzureSourceVmDetails": { +"description": "Represent the source Azure VM details.", +"id": "AzureSourceVmDetails", +"properties": { +"committedStorageBytes": { +"description": "The total size of the disks being migrated in bytes.", +"format": "int64", +"type": "string" +}, +"disks": { +"description": "The disks attached to the source VM.", +"items": { +"$ref": "AzureDiskDetails" +}, +"type": "array" +}, +"firmware": { +"description": "The firmware type of the source VM.", +"enum": [ +"FIRMWARE_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The firmware is unknown.", +"The firmware is EFI.", +"The firmware is BIOS." +], +"type": "string" +}, +"vmCapabilitiesInfo": { +"$ref": "VmCapabilities", +"description": "Output only. Information about VM capabilities needed for some Compute Engine features.", +"readOnly": true +} +}, +"type": "object" +}, +"AzureVmDetails": { +"description": "AzureVmDetails describes a VM in Azure.", +"id": "AzureVmDetails", +"properties": { +"bootOption": { +"description": "The VM Boot Option.", +"enum": [ +"BOOT_OPTION_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is UEFI.", +"The boot option is BIOS." +], +"type": "string" +}, +"committedStorageMb": { +"description": "The total size of the storage allocated to the VM in MB.", +"format": "int64", +"type": "string" +}, +"computerName": { +"description": "The VM's ComputerName.", +"type": "string" +}, +"cpuCount": { +"description": "The number of cpus the VM has.", +"format": "int32", +"type": "integer" +}, +"diskCount": { +"description": "The number of disks the VM has, including OS disk.", +"format": "int32", +"type": "integer" +}, +"disks": { +"description": "Description of the data disks.", +"items": { +"$ref": "Disk" +}, +"type": "array" +}, +"memoryMb": { +"description": "The memory size of the VM in MB.", +"format": "int32", +"type": "integer" +}, +"osDescription": { +"$ref": "OSDescription", +"description": "Description of the OS." +}, +"osDisk": { +"$ref": "OSDisk", +"description": "Description of the OS disk." +}, +"powerState": { +"description": "The power state of the VM at the moment list was taken.", +"enum": [ +"POWER_STATE_UNSPECIFIED", +"STARTING", +"RUNNING", +"STOPPING", +"STOPPED", +"DEALLOCATING", +"DEALLOCATED", +"UNKNOWN" +], +"enumDescriptions": [ +"Power state is not specified.", +"The VM is starting.", +"The VM is running.", +"The VM is stopping.", +"The VM is stopped.", +"The VM is deallocating.", +"The VM is deallocated.", +"The VM's power state is unknown." +], +"type": "string" +}, +"tags": { +"additionalProperties": { +"type": "string" +}, +"description": "The tags of the VM.", +"type": "object" +}, +"vmId": { +"description": "The VM full path in Azure.", +"type": "string" +}, +"vmSize": { +"description": "VM size as configured in Azure. Determines the VM's hardware spec.", +"type": "string" +} +}, +"type": "object" +}, +"AzureVmsDetails": { +"description": "AzureVmsDetails describes VMs in Azure.", +"id": "AzureVmsDetails", +"properties": { +"details": { +"description": "The details of the Azure VMs.", +"items": { +"$ref": "AzureVmDetails" +}, +"type": "array" +} +}, +"type": "object" +}, +"BootDiskDefaults": { +"description": "BootDiskDefaults hold information about the boot disk of a VM.", +"id": "BootDiskDefaults", +"properties": { +"deviceName": { +"description": "Optional. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", +"type": "string" +}, +"diskName": { +"description": "Optional. The name of the disk.", +"type": "string" +}, +"diskType": { +"description": "Optional. The type of disk provisioning to use for the VM.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the boot disk." +}, +"image": { +"$ref": "DiskImageDefaults", +"description": "The image to use when creating the disk." +} +}, +"type": "object" +}, +"CancelCloneJobRequest": { +"description": "Request message for 'CancelCloneJob' request.", +"id": "CancelCloneJobRequest", +"properties": {}, +"type": "object" +}, +"CancelCutoverJobRequest": { +"description": "Request message for 'CancelCutoverJob' request.", +"id": "CancelCutoverJobRequest", +"properties": {}, +"type": "object" +}, +"CancelImageImportJobRequest": { +"description": "Request message for 'CancelImageImportJob' request.", +"id": "CancelImageImportJobRequest", +"properties": {}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"ClientSecretCredentials": { +"description": "Message describing Azure Credentials using tenant ID, client ID and secret.", +"id": "ClientSecretCredentials", +"properties": { +"clientId": { +"description": "Azure client ID.", +"type": "string" +}, +"clientSecret": { +"description": "Input only. Azure client secret.", +"type": "string" +}, +"tenantId": { +"description": "Azure tenant ID.", +"type": "string" +} +}, +"type": "object" +}, +"CloneJob": { +"description": "CloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.", +"id": "CloneJob", +"properties": { +"computeEngineDisksTargetDetails": { +"$ref": "ComputeEngineDisksTargetDetails", +"description": "Output only. Details of the target Persistent Disks in Compute Engine.", +"readOnly": true +}, +"computeEngineTargetDetails": { +"$ref": "ComputeEngineTargetDetails", +"description": "Output only. Details of the target VM in Compute Engine.", +"readOnly": true +}, +"createTime": { +"description": "Output only. The time the clone job was created (as an API call, not when it was actually created in the target).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the clone job was ended.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details for the errors that led to the Clone Job's state.", +"readOnly": true +}, +"name": { +"description": "Output only. The name of the clone.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of the clone job.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED", +"SUCCEEDED", +"CANCELLED", +"CANCELLING", +"ADAPTING_OS" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The clone job has not yet started.", +"The clone job is active and running.", +"The clone job finished with errors.", +"The clone job finished successfully.", +"The clone job was cancelled.", +"The clone job is being cancelled.", +"OS adaptation is running as part of the clone job to generate license." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Output only. The clone steps list representing its progress.", +"items": { +"$ref": "CloneStep" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"CloneStep": { +"description": "CloneStep holds information about the clone step progress.", +"id": "CloneStep", +"properties": { +"adaptingOs": { +"$ref": "AdaptingOSStep", +"description": "Adapting OS step." +}, +"endTime": { +"description": "The time the step has ended.", +"format": "google-datetime", +"type": "string" +}, +"instantiatingMigratedVm": { +"$ref": "InstantiatingMigratedVMStep", +"description": "Instantiating migrated VM step." +}, +"preparingVmDisks": { +"$ref": "PreparingVMDisksStep", +"description": "Preparing VM disks step." +}, +"startTime": { +"description": "The time the step has started.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ComputeEngineDisksTargetDefaults": { +"description": "ComputeEngineDisksTargetDefaults is a collection of details for creating Persistent Disks in a target Compute Engine project.", +"id": "ComputeEngineDisksTargetDefaults", +"properties": { +"disks": { +"description": "The details of each Persistent Disk to create.", +"items": { +"$ref": "PersistentDiskDefaults" +}, +"type": "array" +}, +"disksTargetDefaults": { +"$ref": "DisksMigrationDisksTargetDefaults", +"description": "Details of the disk only migration target." +}, +"targetProject": { +"description": "The full path of the resource of type TargetProject which represents the Compute Engine project in which to create the Persistent Disks.", +"type": "string" +}, +"vmTargetDefaults": { +"$ref": "DisksMigrationVmTargetDefaults", +"description": "Details of the VM migration target." +}, +"zone": { +"description": "The zone in which to create the Persistent Disks.", +"type": "string" +} +}, +"type": "object" +}, +"ComputeEngineDisksTargetDetails": { +"description": "ComputeEngineDisksTargetDetails is a collection of created Persistent Disks details.", +"id": "ComputeEngineDisksTargetDetails", +"properties": { +"disks": { +"description": "The details of each created Persistent Disk.", +"items": { +"$ref": "PersistentDisk" +}, +"type": "array" +}, +"disksTargetDetails": { +"$ref": "DisksMigrationDisksTargetDetails", +"description": "Details of the disks-only migration target." +}, +"vmTargetDetails": { +"$ref": "DisksMigrationVmTargetDetails", +"description": "Details for the VM the migrated data disks are attached to." +} +}, +"type": "object" +}, +"ComputeEngineTargetDefaults": { +"description": "ComputeEngineTargetDefaults is a collection of details for creating a VM in a target Compute Engine project.", +"id": "ComputeEngineTargetDefaults", +"properties": { +"additionalLicenses": { +"description": "Additional licenses to assign to the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"appliedLicense": { +"$ref": "AppliedLicense", +"description": "Output only. The OS license returned from the adaptation module report.", +"readOnly": true +}, +"bootOption": { +"description": "Output only. The VM Boot Option, as set in the source VM.", +"enum": [ +"COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED", +"COMPUTE_ENGINE_BOOT_OPTION_EFI", +"COMPUTE_ENGINE_BOOT_OPTION_BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is EFI.", +"The boot option is BIOS." +], +"readOnly": true, +"type": "string" +}, +"computeScheduling": { +"$ref": "ComputeScheduling", +"description": "Compute instance scheduling information (if empty default is used)." +}, +"diskType": { +"description": "The disk type to use in the VM.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. Immutable. The encryption to apply to the VM disks." +}, +"hostname": { +"description": "The hostname to assign to the VM.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of labels to associate with the VM.", +"type": "object" +}, +"licenseType": { +"description": "The license type to use in OS adaptation.", +"enum": [ +"COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", +"COMPUTE_ENGINE_LICENSE_TYPE_PAYG", +"COMPUTE_ENGINE_LICENSE_TYPE_BYOL" +], +"enumDescriptions": [ +"The license type is the default for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +}, +"machineType": { +"description": "The machine type to create the VM with.", +"type": "string" +}, +"machineTypeSeries": { +"description": "The machine type series to create the VM with.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "The metadata key/value pairs to assign to the VM.", +"type": "object" +}, +"networkInterfaces": { +"description": "List of NICs connected to this VM.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"networkTags": { +"description": "A list of network tags to associate with the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"secureBoot": { +"description": "Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.", +"type": "boolean" +}, +"serviceAccount": { +"description": "The service account to associate the VM with.", +"type": "string" +}, +"targetProject": { +"description": "The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM.", +"type": "string" +}, +"vmName": { +"description": "The name of the VM to create.", +"type": "string" +}, +"zone": { +"description": "The zone in which to create the VM.", +"type": "string" +} +}, +"type": "object" +}, +"ComputeEngineTargetDetails": { +"description": "ComputeEngineTargetDetails is a collection of details for creating a VM in a target Compute Engine project.", +"id": "ComputeEngineTargetDetails", +"properties": { +"additionalLicenses": { +"description": "Additional licenses to assign to the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"appliedLicense": { +"$ref": "AppliedLicense", +"description": "The OS license returned from the adaptation module report." +}, +"bootOption": { +"description": "The VM Boot Option, as set in the source VM.", +"enum": [ +"COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED", +"COMPUTE_ENGINE_BOOT_OPTION_EFI", +"COMPUTE_ENGINE_BOOT_OPTION_BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is EFI.", +"The boot option is BIOS." +], +"type": "string" +}, +"computeScheduling": { +"$ref": "ComputeScheduling", +"description": "Compute instance scheduling information (if empty default is used)." +}, +"diskType": { +"description": "The disk type to use in the VM.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the VM disks." +}, +"hostname": { +"description": "The hostname to assign to the VM.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of labels to associate with the VM.", +"type": "object" +}, +"licenseType": { +"description": "The license type to use in OS adaptation.", +"enum": [ +"COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", +"COMPUTE_ENGINE_LICENSE_TYPE_PAYG", +"COMPUTE_ENGINE_LICENSE_TYPE_BYOL" +], +"enumDescriptions": [ +"The license type is the default for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +}, +"machineType": { +"description": "The machine type to create the VM with.", +"type": "string" +}, +"machineTypeSeries": { +"description": "The machine type series to create the VM with.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "The metadata key/value pairs to assign to the VM.", +"type": "object" +}, +"networkInterfaces": { +"description": "List of NICs connected to this VM.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"networkTags": { +"description": "A list of network tags to associate with the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"project": { +"description": "The Google Cloud target project ID or project name.", +"type": "string" +}, +"secureBoot": { +"description": "Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.", +"type": "boolean" +}, +"serviceAccount": { +"description": "The service account to associate the VM with.", +"type": "string" +}, +"vmName": { +"description": "The name of the VM to create.", +"type": "string" +}, +"zone": { +"description": "The zone in which to create the VM.", +"type": "string" +} +}, +"type": "object" +}, +"ComputeScheduling": { +"description": "Scheduling information for VM on maintenance/restart behaviour and node allocation in sole tenant nodes.", +"id": "ComputeScheduling", +"properties": { +"minNodeCpus": { +"description": "The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.", +"format": "int32", +"type": "integer" +}, +"nodeAffinities": { +"description": "A set of node affinity and anti-affinity configurations for sole tenant nodes.", +"items": { +"$ref": "SchedulingNodeAffinity" +}, +"type": "array" +}, +"onHostMaintenance": { +"description": "How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.", +"enum": [ +"ON_HOST_MAINTENANCE_UNSPECIFIED", +"TERMINATE", +"MIGRATE" +], +"enumDescriptions": [ +"An unknown, unexpected behavior.", +"Terminate the instance when the host machine undergoes maintenance.", +"Migrate the instance when the host machine undergoes maintenance." +], +"type": "string" +}, +"restartType": { +"description": "Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user). This configuration is identical to `automaticRestart` field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.", +"enum": [ +"RESTART_TYPE_UNSPECIFIED", +"AUTOMATIC_RESTART", +"NO_AUTOMATIC_RESTART" +], +"enumDescriptions": [ +"Unspecified behavior. This will use the default.", +"The Instance should be automatically restarted whenever it is terminated by Compute Engine.", +"The Instance isn't automatically restarted whenever it is terminated by Compute Engine." +], +"type": "string" +} +}, +"type": "object" +}, +"CreatingImageStep": { +"description": "CreatingImageStep contains specific step details.", +"id": "CreatingImageStep", +"properties": {}, +"type": "object" +}, +"CutoverForecast": { +"description": "CutoverForecast holds information about future CutoverJobs of a MigratingVm.", +"id": "CutoverForecast", +"properties": { +"estimatedCutoverJobDuration": { +"description": "Output only. Estimation of the CutoverJob duration.", +"format": "google-duration", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CutoverJob": { +"description": "CutoverJob message describes a cutover of a migrating VM. The CutoverJob is the operation of shutting down the VM, creating a snapshot and clonning the VM using the replicated snapshot.", +"id": "CutoverJob", +"properties": { +"computeEngineDisksTargetDetails": { +"$ref": "ComputeEngineDisksTargetDetails", +"description": "Output only. Details of the target Persistent Disks in Compute Engine.", +"readOnly": true +}, +"computeEngineTargetDetails": { +"$ref": "ComputeEngineTargetDetails", +"description": "Output only. Details of the target VM in Compute Engine.", +"readOnly": true +}, +"createTime": { +"description": "Output only. The time the cutover job was created (as an API call, not when it was actually created in the target).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the cutover job had finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details for the errors that led to the Cutover Job's state.", +"readOnly": true +}, +"name": { +"description": "Output only. The name of the cutover job.", +"readOnly": true, +"type": "string" +}, +"progressPercent": { +"description": "Output only. The current progress in percentage of the cutover job.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"state": { +"description": "Output only. State of the cutover job.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"FAILED", +"SUCCEEDED", +"CANCELLED", +"CANCELLING", +"ACTIVE", +"ADAPTING_OS" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The cutover job has not yet started.", +"The cutover job finished with errors.", +"The cutover job finished successfully.", +"The cutover job was cancelled.", +"The cutover job is being cancelled.", +"The cutover job is active and running.", +"OS adaptation is running as part of the cutover job to generate license." +], +"readOnly": true, +"type": "string" +}, +"stateMessage": { +"description": "Output only. A message providing possible extra details about the current state.", +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Output only. The cutover steps list representing its progress.", +"items": { +"$ref": "CutoverStep" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"CutoverStep": { +"description": "CutoverStep holds information about the cutover step progress.", +"id": "CutoverStep", +"properties": { +"endTime": { +"description": "The time the step has ended.", +"format": "google-datetime", +"type": "string" +}, +"finalSync": { +"$ref": "ReplicationCycle", +"description": "Final sync step." +}, +"instantiatingMigratedVm": { +"$ref": "InstantiatingMigratedVMStep", +"description": "Instantiating migrated VM step." +}, +"preparingVmDisks": { +"$ref": "PreparingVMDisksStep", +"description": "Preparing VM disks step." +}, +"previousReplicationCycle": { +"$ref": "ReplicationCycle", +"description": "A replication cycle prior cutover step." +}, +"shuttingDownSourceVm": { +"$ref": "ShuttingDownSourceVMStep", +"description": "Shutting down VM step." +}, +"startTime": { +"description": "The time the step has started.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"CycleStep": { +"description": "CycleStep holds information about a step progress.", +"id": "CycleStep", +"properties": { +"endTime": { +"description": "The time the cycle step has ended.", +"format": "google-datetime", +"type": "string" +}, +"initializingReplication": { +"$ref": "InitializingReplicationStep", +"description": "Initializing replication step." +}, +"postProcessing": { +"$ref": "PostProcessingStep", +"description": "Post processing step." +}, +"replicating": { +"$ref": "ReplicatingStep", +"description": "Replicating step." +}, +"startTime": { +"description": "The time the cycle step has started.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"DataDiskImageImport": { +"description": "Mentions that the image import is not using OS adaptation process.", +"id": "DataDiskImageImport", +"properties": {}, +"type": "object" +}, +"DatacenterConnector": { +"description": "DatacenterConnector message describes a connector between the Source and Google Cloud, which is installed on a vmware datacenter (an OVA vm installed by the user) to connect the Datacenter to Google Cloud and support vm migration data transfer.", +"id": "DatacenterConnector", +"properties": { +"applianceInfrastructureVersion": { +"description": "Output only. Appliance OVA version. This is the OVA which is manually installed by the user and contains the infrastructure for the automatically updatable components on the appliance.", +"readOnly": true, +"type": "string" +}, +"applianceSoftwareVersion": { +"description": "Output only. Appliance last installed update bundle version. This is the version of the automatically updatable components on the appliance.", +"readOnly": true, +"type": "string" +}, +"availableVersions": { +"$ref": "AvailableUpdates", +"description": "Output only. The available versions for updating this appliance.", +"readOnly": true +}, +"bucket": { +"description": "Output only. The communication channel between the datacenter connector and Google Cloud.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the connector was created (as an API call, not when it was actually installed).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Datacenter Connector in case of an error.", +"readOnly": true +}, +"name": { +"description": "Output only. The connector's name.", +"readOnly": true, +"type": "string" +}, +"registrationId": { +"description": "Immutable. A unique key for this connector. This key is internal to the OVA connector and is supplied with its creation during the registration process and can not be modified.", +"type": "string" +}, +"serviceAccount": { +"description": "The service account to use in the connector when communicating with the cloud.", +"type": "string" +}, +"state": { +"description": "Output only. State of the DatacenterConnector, as determined by the health checks.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"OFFLINE", +"FAILED", +"ACTIVE" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The state was not sampled by the health checks yet.", +"The source was sampled by health checks and is not available.", +"The source is available but might not be usable yet due to unvalidated credentials or another reason. The credentials referred to are the ones to the Source. The error message will contain further details.", +"The source exists and its credentials were verified." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last set.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time the connector was updated with an API call.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upgradeStatus": { +"$ref": "UpgradeStatus", +"description": "Output only. The status of the current / last upgradeAppliance operation.", +"readOnly": true +}, +"version": { +"description": "The version running in the DatacenterConnector. This is supplied by the OVA connector during the registration process and can not be modified.", +"type": "string" +} +}, +"type": "object" +}, +"Disk": { +"description": "A message describing a data disk.", +"id": "Disk", +"properties": { +"lun": { +"description": "The disk's Logical Unit Number (LUN).", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The disk name.", +"type": "string" +}, +"sizeGb": { +"description": "The disk size in GB.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DiskImageDefaults": { +"description": "Contains details about the image source used to create the disk.", +"id": "DiskImageDefaults", +"properties": { +"sourceImage": { +"description": "Required. The Image resource used when creating the disk.", +"type": "string" +} +}, +"type": "object" +}, +"DiskImageTargetDetails": { +"description": "The target details of the image resource that will be created by the import job.", +"id": "DiskImageTargetDetails", +"properties": { +"additionalLicenses": { +"description": "Optional. Additional licenses to assign to the image.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dataDiskImageImport": { +"$ref": "DataDiskImageImport", +"description": "Optional. Use to skip OS adaptation process." +}, +"description": { +"description": "Optional. An optional description of the image.", +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Immutable. The encryption to apply to the image." +}, +"familyName": { +"description": "Optional. The name of the image family to which the new image belongs.", +"type": "string" +}, +"imageName": { +"description": "Required. The name of the image to be created.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. A map of labels to associate with the image.", +"type": "object" +}, +"osAdaptationParameters": { +"$ref": "ImageImportOsAdaptationParameters", +"description": "Optional. Use to set the parameters relevant for the OS adaptation process." +}, +"singleRegionStorage": { +"description": "Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.", +"type": "boolean" +}, +"targetProject": { +"description": "Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.", +"type": "string" +} +}, +"type": "object" +}, +"DisksMigrationDisksTargetDefaults": { +"description": "Details for a disk only migration.", +"id": "DisksMigrationDisksTargetDefaults", +"properties": {}, +"type": "object" +}, +"DisksMigrationDisksTargetDetails": { +"description": "Details for a disks-only migration.", +"id": "DisksMigrationDisksTargetDetails", +"properties": {}, +"type": "object" +}, +"DisksMigrationVmTargetDefaults": { +"description": "Details for creation of a VM that migrated data disks will be attached to.", +"id": "DisksMigrationVmTargetDefaults", +"properties": { +"additionalLicenses": { +"description": "Optional. Additional licenses to assign to the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"bootDiskDefaults": { +"$ref": "BootDiskDefaults", +"description": "Optional. Details of the boot disk of the VM." +}, +"computeScheduling": { +"$ref": "ComputeScheduling", +"description": "Optional. Compute instance scheduling information (if empty default is used)." +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the VM." +}, +"hostname": { +"description": "Optional. The hostname to assign to the VM.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. A map of labels to associate with the VM.", +"type": "object" +}, +"machineType": { +"description": "Required. The machine type to create the VM with.", +"type": "string" +}, +"machineTypeSeries": { +"description": "Optional. The machine type series to create the VM with. For presentation only.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The metadata key/value pairs to assign to the VM.", +"type": "object" +}, +"networkInterfaces": { +"description": "Optional. NICs to attach to the VM.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"networkTags": { +"description": "Optional. A list of network tags to associate with the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"secureBoot": { +"description": "Optional. Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.", +"type": "boolean" +}, +"serviceAccount": { +"description": "Optional. The service account to associate the VM with.", +"type": "string" +}, +"vmName": { +"description": "Required. The name of the VM to create.", +"type": "string" +} +}, +"type": "object" +}, +"DisksMigrationVmTargetDetails": { +"description": "Details for the VM created VM as part of disks migration.", +"id": "DisksMigrationVmTargetDetails", +"properties": { +"vmUri": { +"description": "Output only. The URI of the Compute Engine VM.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Encryption": { +"description": "Encryption message describes the details of the applied encryption.", +"id": "Encryption", +"properties": { +"kmsKey": { +"description": "Required. The name of the encryption key that is stored in Google Cloud KMS.", +"type": "string" +} +}, +"type": "object" +}, +"FetchInventoryResponse": { +"description": "Response message for fetchInventory.", +"id": "FetchInventoryResponse", +"properties": { +"awsVms": { +"$ref": "AwsVmsDetails", +"description": "The description of the VMs in a Source of type AWS." +}, +"azureVms": { +"$ref": "AzureVmsDetails", +"description": "The description of the VMs in a Source of type Azure." +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the source was last queried (if the result is from the cache).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareVms": { +"$ref": "VmwareVmsDetails", +"description": "The description of the VMs in a Source of type Vmware." +} +}, +"type": "object" +}, +"FinalizeMigrationRequest": { +"description": "Request message for 'FinalizeMigration' request.", +"id": "FinalizeMigrationRequest", +"properties": {}, +"type": "object" +}, +"Group": { +"description": "Describes message for 'Group' resource. The Group is a collections of several MigratingVms.", +"id": "Group", +"properties": { +"createTime": { +"description": "Output only. The create time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description of the group.", +"type": "string" +}, +"displayName": { +"description": "Display name is a user defined name for this group which can be updated.", +"type": "string" +}, +"migrationTargetType": { +"description": "Immutable. The target type of this group.", +"enum": [ +"MIGRATION_TARGET_TYPE_UNSPECIFIED", +"MIGRATION_TARGET_TYPE_GCE", +"MIGRATION_TARGET_TYPE_DISKS" +], +"enumDescriptions": [ +"Group type is not specified. This defaults to Compute Engine targets.", +"All MigratingVMs in the group must have Compute Engine targets.", +"All MigratingVMs in the group must have Compute Engine Disks targets." +], +"type": "string" +}, +"name": { +"description": "Output only. The Group name.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The update time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ImageImport": { +"description": "ImageImport describes the configuration of the image import to run.", +"id": "ImageImport", +"properties": { +"cloudStorageUri": { +"description": "Immutable. The path to the Cloud Storage file from which the image should be imported.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time the image import was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"diskImageTargetDefaults": { +"$ref": "DiskImageTargetDetails", +"description": "Immutable. Target details for importing a disk image, will be used by ImageImportJob." +}, +"encryption": { +"$ref": "Encryption", +"description": "Immutable. The encryption details used by the image import process during the image adaptation for Compute Engine." +}, +"name": { +"description": "Output only. The resource path of the ImageImport.", +"readOnly": true, +"type": "string" +}, +"recentImageImportJobs": { +"description": "Output only. The result of the most recent runs for this ImageImport. All jobs for this ImageImport can be listed via ListImageImportJobs.", +"items": { +"$ref": "ImageImportJob" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ImageImportJob": { +"description": "ImageImportJob describes the progress and result of an image import.", +"id": "ImageImportJob", +"properties": { +"cloudStorageUri": { +"description": "Output only. The path to the Cloud Storage file from which the image should be imported.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the image import was created (as an API call, not when it was actually created in the target).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"createdResources": { +"description": "Output only. The resource paths of the resources created by the image import job.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"diskImageTargetDetails": { +"$ref": "DiskImageTargetDetails", +"description": "Output only. Target details used to import a disk image.", +"readOnly": true +}, +"endTime": { +"description": "Output only. The time the image import was ended.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"errors": { +"description": "Output only. Provides details on the error that led to the image import state in case of an error.", +"items": { +"$ref": "Status" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource path of the ImageImportJob.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the image import.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED", +"CANCELLING", +"CANCELLED" +], +"enumDescriptions": [ +"The state is unknown.", +"The image import has not yet started.", +"The image import is active and running.", +"The image import has finished successfully.", +"The image import has finished with errors.", +"The image import is being cancelled.", +"The image import was cancelled." +], +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Output only. The image import steps list representing its progress.", +"items": { +"$ref": "ImageImportStep" +}, +"readOnly": true, +"type": "array" +}, +"warnings": { +"description": "Output only. Warnings that occurred during the image import.", +"items": { +"$ref": "MigrationWarning" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ImageImportOsAdaptationParameters": { +"description": "Parameters affecting the OS adaptation process.", +"id": "ImageImportOsAdaptationParameters", +"properties": { +"generalize": { +"description": "Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).", +"type": "boolean" +}, +"licenseType": { +"description": "Optional. Choose which type of license to apply to the imported image.", +"enum": [ +"COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", +"COMPUTE_ENGINE_LICENSE_TYPE_PAYG", +"COMPUTE_ENGINE_LICENSE_TYPE_BYOL" +], +"enumDescriptions": [ +"The license type is the default for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +} +}, +"type": "object" +}, +"ImageImportStep": { +"description": "ImageImportStep holds information about the image import step progress.", +"id": "ImageImportStep", +"properties": { +"adaptingOs": { +"$ref": "AdaptingOSStep", +"description": "Adapting OS step." +}, +"creatingImage": { +"$ref": "CreatingImageStep", +"description": "Creating image step." +}, +"endTime": { +"description": "Output only. The time the step has ended.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"initializing": { +"$ref": "InitializingImageImportStep", +"description": "Initializing step." +}, +"loadingSourceFiles": { +"$ref": "LoadingImageSourceFilesStep", +"description": "Loading source files step." +}, +"startTime": { +"description": "Output only. The time the step has started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InitializingImageImportStep": { +"description": "InitializingImageImportStep contains specific step details.", +"id": "InitializingImageImportStep", +"properties": {}, +"type": "object" +}, +"InitializingReplicationStep": { +"description": "InitializingReplicationStep contains specific step details.", +"id": "InitializingReplicationStep", +"properties": {}, +"type": "object" +}, +"InstantiatingMigratedVMStep": { +"description": "InstantiatingMigratedVMStep contains specific step details.", +"id": "InstantiatingMigratedVMStep", +"properties": {}, +"type": "object" +}, +"Link": { +"description": "Describes a URL link.", +"id": "Link", +"properties": { +"description": { +"description": "Describes what the link offers.", +"type": "string" +}, +"url": { +"description": "The URL of the link.", +"type": "string" +} +}, +"type": "object" +}, +"ListCloneJobsResponse": { +"description": "Response message for 'ListCloneJobs' request.", +"id": "ListCloneJobsResponse", +"properties": { +"cloneJobs": { +"description": "Output only. The list of clone jobs response.", +"items": { +"$ref": "CloneJob" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListCutoverJobsResponse": { +"description": "Response message for 'ListCutoverJobs' request.", +"id": "ListCutoverJobsResponse", +"properties": { +"cutoverJobs": { +"description": "Output only. The list of cutover jobs response.", +"items": { +"$ref": "CutoverJob" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListDatacenterConnectorsResponse": { +"description": "Response message for 'ListDatacenterConnectors' request.", +"id": "ListDatacenterConnectorsResponse", +"properties": { +"datacenterConnectors": { +"description": "Output only. The list of sources response.", +"items": { +"$ref": "DatacenterConnector" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListGroupsResponse": { +"description": "Response message for 'ListGroups' request.", +"id": "ListGroupsResponse", +"properties": { +"groups": { +"description": "Output only. The list of groups response.", +"items": { +"$ref": "Group" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListImageImportJobsResponse": { +"description": "Response message for 'ListImageImportJobs' call.", +"id": "ListImageImportJobsResponse", +"properties": { +"imageImportJobs": { +"description": "Output only. The list of target response.", +"items": { +"$ref": "ImageImportJob" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListImageImportsResponse": { +"description": "Response message for 'ListImageImports' call.", +"id": "ListImageImportsResponse", +"properties": { +"imageImports": { +"description": "Output only. The list of target response.", +"items": { +"$ref": "ImageImport" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListMigratingVmsResponse": { +"description": "Response message for 'ListMigratingVms' request.", +"id": "ListMigratingVmsResponse", +"properties": { +"migratingVms": { +"description": "Output only. The list of Migrating VMs response.", +"items": { +"$ref": "MigratingVm" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListReplicationCyclesResponse": { +"description": "Response message for 'ListReplicationCycles' request.", +"id": "ListReplicationCyclesResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"replicationCycles": { +"description": "Output only. The list of replication cycles response.", +"items": { +"$ref": "ReplicationCycle" +}, +"readOnly": true, +"type": "array" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListSourcesResponse": { +"description": "Response message for 'ListSources' request.", +"id": "ListSourcesResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"sources": { +"description": "Output only. The list of sources response.", +"items": { +"$ref": "Source" +}, +"readOnly": true, +"type": "array" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListTargetProjectsResponse": { +"description": "Response message for 'ListTargetProjects' call.", +"id": "ListTargetProjectsResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"targetProjects": { +"description": "Output only. The list of target response.", +"items": { +"$ref": "TargetProject" +}, +"readOnly": true, +"type": "array" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListUtilizationReportsResponse": { +"description": "Response message for 'ListUtilizationReports' request.", +"id": "ListUtilizationReportsResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"utilizationReports": { +"description": "Output only. The list of reports.", +"items": { +"$ref": "UtilizationReport" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"LoadingImageSourceFilesStep": { +"description": "LoadingImageSourceFilesStep contains specific step details.", +"id": "LoadingImageSourceFilesStep", +"properties": {}, +"type": "object" +}, +"LocalizedMessage": { +"description": "Provides a localized error message that is safe to return to the user which can be attached to an RPC error.", +"id": "LocalizedMessage", +"properties": { +"locale": { +"description": "The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: \"en-US\", \"fr-CH\", \"es-MX\"", +"type": "string" +}, +"message": { +"description": "The localized error message in the above locale.", +"type": "string" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"MigratingVm": { +"description": "MigratingVm describes the VM that will be migrated from a Source environment and its replication state.", +"id": "MigratingVm", +"properties": { +"awsSourceVmDetails": { +"$ref": "AwsSourceVmDetails", +"description": "Output only. Details of the VM from an AWS source.", +"readOnly": true +}, +"azureSourceVmDetails": { +"$ref": "AzureSourceVmDetails", +"description": "Output only. Details of the VM from an Azure source.", +"readOnly": true +}, +"computeEngineDisksTargetDefaults": { +"$ref": "ComputeEngineDisksTargetDefaults", +"description": "Details of the target Persistent Disks in Compute Engine." +}, +"computeEngineTargetDefaults": { +"$ref": "ComputeEngineTargetDefaults", +"description": "Details of the target VM in Compute Engine." +}, +"createTime": { +"description": "Output only. The time the migrating VM was created (this refers to this resource and not to the time it was installed in the source).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"currentSyncInfo": { +"$ref": "ReplicationCycle", +"description": "Output only. Details of the current running replication cycle.", +"readOnly": true +}, +"cutoverForecast": { +"$ref": "CutoverForecast", +"description": "Output only. Provides details of future CutoverJobs of a MigratingVm. Set to empty when cutover forecast is unavailable.", +"readOnly": true +}, +"description": { +"description": "The description attached to the migrating VM by the user.", +"type": "string" +}, +"displayName": { +"description": "The display name attached to the MigratingVm by the user.", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Migrating VM in case of an error in replication.", +"readOnly": true +}, +"group": { +"description": "Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels of the migrating VM.", +"type": "object" +}, +"lastReplicationCycle": { +"$ref": "ReplicationCycle", +"description": "Output only. Details of the last replication cycle. This will be updated whenever a replication cycle is finished and is not to be confused with last_sync which is only updated on successful replication cycles.", +"readOnly": true +}, +"lastSync": { +"$ref": "ReplicationSync", +"description": "Output only. The most updated snapshot created time in the source that finished replication.", +"readOnly": true +}, +"name": { +"description": "Output only. The identifier of the MigratingVm.", +"readOnly": true, +"type": "string" +}, +"policy": { +"$ref": "SchedulePolicy", +"description": "The replication schedule policy." +}, +"recentCloneJobs": { +"description": "Output only. The recent clone jobs performed on the migrating VM. This field holds the vm's last completed clone job and the vm's running clone job, if one exists. Note: To have this field populated you need to explicitly request it via the \"view\" parameter of the Get/List request.", +"items": { +"$ref": "CloneJob" +}, +"readOnly": true, +"type": "array" +}, +"recentCutoverJobs": { +"description": "Output only. The recent cutover jobs performed on the migrating VM. This field holds the vm's last completed cutover job and the vm's running cutover job, if one exists. Note: To have this field populated you need to explicitly request it via the \"view\" parameter of the Get/List request.", +"items": { +"$ref": "CutoverJob" +}, +"readOnly": true, +"type": "array" +}, +"sourceVmId": { +"description": "The unique ID of the VM in the source. The VM's name in vSphere can be changed, so this is not the VM's name but rather its moRef id. This id is of the form vm-.", +"type": "string" +}, +"state": { +"description": "Output only. State of the MigratingVm.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"READY", +"FIRST_SYNC", +"ACTIVE", +"CUTTING_OVER", +"CUTOVER", +"FINAL_SYNC", +"PAUSED", +"FINALIZING", +"FINALIZED", +"ERROR" +], +"enumDescriptions": [ +"The state was not sampled by the health checks yet.", +"The VM in the source is being verified.", +"The source VM was verified, and it's ready to start replication.", +"Migration is going through the first sync cycle.", +"The replication is active, and it's running or scheduled to run.", +"The source VM is being turned off, and a final replication is currently running.", +"The source VM was stopped and replicated. The replication is currently paused.", +"A cutover job is active and replication cycle is running the final sync.", +"The replication was paused by the user and no cycles are scheduled to run.", +"The migrating VM is being finalized and migration resources are being removed.", +"The replication process is done. The migrating VM is finalized and no longer consumes billable resources.", +"The replication process encountered an unrecoverable error and was aborted." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The last time the migrating VM state was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time the migrating VM resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareSourceVmDetails": { +"$ref": "VmwareSourceVmDetails", +"description": "Output only. Details of the VM from a Vmware source.", +"readOnly": true +} +}, +"type": "object" +}, +"MigrationError": { +"description": "Represents migration resource error information that can be used with google.rpc.Status message. MigrationError is used to present the user with error information in migration operations.", +"id": "MigrationError", +"properties": { +"actionItem": { +"$ref": "LocalizedMessage", +"description": "Output only. Suggested action for solving the error.", +"readOnly": true +}, +"code": { +"description": "Output only. The error code.", +"enum": [ +"ERROR_CODE_UNSPECIFIED", +"UNKNOWN_ERROR", +"SOURCE_VALIDATION_ERROR", +"SOURCE_REPLICATION_ERROR", +"TARGET_REPLICATION_ERROR", +"OS_ADAPTATION_ERROR", +"CLONE_ERROR", +"CUTOVER_ERROR", +"UTILIZATION_REPORT_ERROR", +"APPLIANCE_UPGRADE_ERROR", +"IMAGE_IMPORT_ERROR" +], +"enumDescriptions": [ +"Default value. This value is not used.", +"Migrate to Virtual Machines encountered an unknown error.", +"Migrate to Virtual Machines encountered an error while validating replication source health.", +"Migrate to Virtual Machines encountered an error during source data operation.", +"Migrate to Virtual Machines encountered an error during target data operation.", +"Migrate to Virtual Machines encountered an error during OS adaptation.", +"Migrate to Virtual Machines encountered an error in clone operation.", +"Migrate to Virtual Machines encountered an error in cutover operation.", +"Migrate to Virtual Machines encountered an error during utilization report creation.", +"Migrate to Virtual Machines encountered an error during appliance upgrade.", +"Migrate to Virtual Machines encountered an error in image import operation." +], +"readOnly": true, +"type": "string" +}, +"errorMessage": { +"$ref": "LocalizedMessage", +"description": "Output only. The localized error message.", +"readOnly": true +}, +"errorTime": { +"description": "Output only. The time the error occurred.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"helpLinks": { +"description": "Output only. URL(s) pointing to additional information on handling the current error.", +"items": { +"$ref": "Link" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"MigrationWarning": { +"description": "Represents migration resource warning information that can be used with google.rpc.Status message. MigrationWarning is used to present the user with warning information in migration operations.", +"id": "MigrationWarning", +"properties": { +"actionItem": { +"$ref": "LocalizedMessage", +"description": "Suggested action for solving the warning." +}, +"code": { +"description": "The warning code.", +"enum": [ +"WARNING_CODE_UNSPECIFIED", +"ADAPTATION_WARNING" +], +"enumDescriptions": [ +"Default value. This value is not used.", +"A warning originated from OS Adaptation." +], +"type": "string" +}, +"helpLinks": { +"description": "URL(s) pointing to additional information on handling the current warning.", +"items": { +"$ref": "Link" +}, +"type": "array" +}, +"warningMessage": { +"$ref": "LocalizedMessage", +"description": "The localized warning message." +}, +"warningTime": { +"description": "The time the warning occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"NetworkInterface": { +"description": "NetworkInterface represents a NIC of a VM.", +"id": "NetworkInterface", +"properties": { +"externalIp": { +"description": "The external IP to define in the NIC.", +"type": "string" +}, +"internalIp": { +"description": "The internal IP to define in the NIC. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path.", +"type": "string" +}, +"network": { +"description": "The network to connect the NIC to.", +"type": "string" +}, +"subnetwork": { +"description": "The subnetwork to connect the NIC to.", +"type": "string" +} +}, +"type": "object" +}, +"OSDescription": { +"description": "A message describing the VM's OS. Including OS, Publisher, Offer and Plan if applicable.", +"id": "OSDescription", +"properties": { +"offer": { +"description": "OS offer.", +"type": "string" +}, +"plan": { +"description": "OS plan.", +"type": "string" +}, +"publisher": { +"description": "OS publisher.", +"type": "string" +}, +"type": { +"description": "OS type.", +"type": "string" +} +}, +"type": "object" +}, +"OSDisk": { +"description": "A message describing the OS disk.", +"id": "OSDisk", +"properties": { +"name": { +"description": "The disk's full name.", +"type": "string" +}, +"sizeGb": { +"description": "The disk's size in GB.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "The disk's type.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PauseMigrationRequest": { +"description": "Request message for 'PauseMigration' request.", +"id": "PauseMigrationRequest", +"properties": {}, +"type": "object" +}, +"PersistentDisk": { +"description": "Details of a created Persistent Disk.", +"id": "PersistentDisk", +"properties": { +"diskUri": { +"description": "The URI of the Persistent Disk.", +"type": "string" +}, +"sourceDiskNumber": { +"description": "The ordinal number of the source VM disk.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PersistentDiskDefaults": { +"description": "Details for creation of a Persistent Disk.", +"id": "PersistentDiskDefaults", +"properties": { +"additionalLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of labels to associate with the Persistent Disk.", +"type": "object" +}, +"diskName": { +"description": "Optional. The name of the Persistent Disk to create.", +"type": "string" +}, +"diskType": { +"description": "The disk type to use.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the disk." +}, +"sourceDiskNumber": { +"description": "Required. The ordinal number of the source VM disk.", +"format": "int32", +"type": "integer" +}, +"vmAttachmentDetails": { +"$ref": "VmAttachmentDetails", +"description": "Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attacked to a target VM." +} +}, +"type": "object" +}, +"PostProcessingStep": { +"description": "PostProcessingStep contains specific step details.", +"id": "PostProcessingStep", +"properties": {}, +"type": "object" +}, +"PreparingVMDisksStep": { +"description": "PreparingVMDisksStep contains specific step details.", +"id": "PreparingVMDisksStep", +"properties": {}, +"type": "object" +}, +"RemoveGroupMigrationRequest": { +"description": "Request message for 'RemoveMigration' request.", +"id": "RemoveGroupMigrationRequest", +"properties": { +"migratingVm": { +"description": "The MigratingVm to remove.", +"type": "string" +} +}, +"type": "object" +}, +"ReplicatingStep": { +"description": "ReplicatingStep contains specific step details.", +"id": "ReplicatingStep", +"properties": { +"lastThirtyMinutesAverageBytesPerSecond": { +"description": "The source disks replication rate for the last 30 minutes in bytes per second.", +"format": "int64", +"type": "string" +}, +"lastTwoMinutesAverageBytesPerSecond": { +"description": "The source disks replication rate for the last 2 minutes in bytes per second.", +"format": "int64", +"type": "string" +}, +"replicatedBytes": { +"description": "Replicated bytes in the step.", +"format": "int64", +"type": "string" +}, +"totalBytes": { +"description": "Total bytes to be handled in the step.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ReplicationCycle": { +"description": "ReplicationCycle contains information about the current replication cycle status.", +"id": "ReplicationCycle", +"properties": { +"cycleNumber": { +"description": "The cycle's ordinal number.", +"format": "int32", +"type": "integer" +}, +"endTime": { +"description": "The time the replication cycle has ended.", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Provides details on the state of the cycle in case of an error." +}, +"name": { +"description": "The identifier of the ReplicationCycle.", +"type": "string" +}, +"progressPercent": { +"deprecated": true, +"description": "The current progress in percentage of this cycle. Was replaced by 'steps' field, which breaks down the cycle progression more accurately.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "The time the replication cycle has started.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "State of the ReplicationCycle.", +"enum": [ +"STATE_UNSPECIFIED", +"RUNNING", +"PAUSED", +"FAILED", +"SUCCEEDED" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The replication cycle is running.", +"The replication cycle is paused.", +"The replication cycle finished with errors.", +"The replication cycle finished successfully." +], +"type": "string" +}, +"steps": { +"description": "The cycle's steps list representing its progress.", +"items": { +"$ref": "CycleStep" +}, +"type": "array" +}, +"totalPauseDuration": { +"description": "The accumulated duration the replication cycle was paused.", +"format": "google-duration", +"type": "string" +}, +"warnings": { +"description": "Output only. Warnings that occurred during the cycle.", +"items": { +"$ref": "MigrationWarning" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ReplicationSync": { +"description": "ReplicationSync contain information about the last replica sync to the cloud.", +"id": "ReplicationSync", +"properties": { +"lastSyncTime": { +"description": "The most updated snapshot created time in the source that finished replication.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ResumeMigrationRequest": { +"description": "Request message for 'ResumeMigration' request.", +"id": "ResumeMigrationRequest", +"properties": {}, +"type": "object" +}, +"SchedulePolicy": { +"description": "A policy for scheduling replications.", +"id": "SchedulePolicy", +"properties": { +"idleDuration": { +"description": "The idle duration between replication stages.", +"format": "google-duration", +"type": "string" +}, +"skipOsAdaptation": { +"description": "A flag to indicate whether to skip OS adaptation during the replication sync. OS adaptation is a process where the VM's operating system undergoes changes and adaptations to fully function on Compute Engine.", +"type": "boolean" +} +}, +"type": "object" +}, +"SchedulingNodeAffinity": { +"description": "Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled. Based on https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling", +"id": "SchedulingNodeAffinity", +"properties": { +"key": { +"description": "The label key of Node resource to reference.", +"type": "string" +}, +"operator": { +"description": "The operator to use for the node resources specified in the `values` parameter.", +"enum": [ +"OPERATOR_UNSPECIFIED", +"IN", +"NOT_IN" +], +"enumDescriptions": [ +"An unknown, unexpected behavior.", +"The node resource group should be in these resources affinity.", +"The node resource group should not be in these resources affinity." +], +"type": "string" +}, +"values": { +"description": "Corresponds to the label values of Node resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ShuttingDownSourceVMStep": { +"description": "ShuttingDownSourceVMStep contains specific step details.", +"id": "ShuttingDownSourceVMStep", +"properties": {}, +"type": "object" +}, +"Source": { +"description": "Source message describes a specific vm migration Source resource. It contains the source environment information.", +"id": "Source", +"properties": { +"aws": { +"$ref": "AwsSourceDetails", +"description": "AWS type source details." +}, +"azure": { +"$ref": "AzureSourceDetails", +"description": "Azure type source details." +}, +"createTime": { +"description": "Output only. The create time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description of the source.", +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. Immutable. The encryption details of the source data stored by the service." +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels of the source.", +"type": "object" +}, +"name": { +"description": "Output only. The Source name.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The update time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmware": { +"$ref": "VmwareSourceDetails", +"description": "Vmware type source details." +} +}, +"type": "object" +}, +"StartMigrationRequest": { +"description": "Request message for 'StartMigrationRequest' request.", +"id": "StartMigrationRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Tag": { +"description": "Tag is an AWS tag representation.", +"id": "Tag", +"properties": { +"key": { +"description": "Key of tag.", +"type": "string" +}, +"value": { +"description": "Value of tag.", +"type": "string" +} +}, +"type": "object" +}, +"TargetProject": { +"description": "TargetProject message represents a target Compute Engine project for a migration or a clone.", +"id": "TargetProject", +"properties": { +"createTime": { +"description": "Output only. The time this target project resource was created (not related to when the Compute Engine project it points to was created).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "The target project's description.", +"type": "string" +}, +"name": { +"description": "Output only. The name of the target project.", +"readOnly": true, +"type": "string" +}, +"project": { +"description": "Required. The target project ID (number) or project name.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time the target project resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"UpgradeApplianceRequest": { +"description": "Request message for 'UpgradeAppliance' request.", +"id": "UpgradeApplianceRequest", +"properties": { +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeStatus": { +"description": "UpgradeStatus contains information about upgradeAppliance operation.", +"id": "UpgradeStatus", +"properties": { +"error": { +"$ref": "Status", +"description": "Provides details on the state of the upgrade operation in case of an error." +}, +"previousVersion": { +"description": "The version from which we upgraded.", +"type": "string" +}, +"startTime": { +"description": "The time the operation was started.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The state of the upgradeAppliance operation.", +"enum": [ +"STATE_UNSPECIFIED", +"RUNNING", +"FAILED", +"SUCCEEDED" +], +"enumDescriptions": [ +"The state was not sampled by the health checks yet.", +"The upgrade has started.", +"The upgrade failed.", +"The upgrade finished successfully." +], +"type": "string" +}, +"version": { +"description": "The version to upgrade to.", +"type": "string" +} +}, +"type": "object" +}, +"UtilizationReport": { +"description": "Utilization report details the utilization (CPU, memory, etc.) of selected source VMs.", +"id": "UtilizationReport", +"properties": { +"createTime": { +"description": "Output only. The time the report was created (this refers to the time of the request, not the time the report creation completed).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "The report display name, as assigned by the user.", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the report in case of an error.", +"readOnly": true +}, +"frameEndTime": { +"description": "Output only. The point in time when the time frame ends. Notice that the time frame is counted backwards. For instance if the \"frame_end_time\" value is 2021/01/20 and the time frame is WEEK then the report covers the week between 2021/01/20 and 2021/01/14.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The report unique name.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. Current state of the report.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"The state is unknown. This value is not in use.", +"The report is in the making.", +"Report creation completed successfully.", +"Report creation failed." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last set.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"timeFrame": { +"description": "Time frame of the report.", +"enum": [ +"TIME_FRAME_UNSPECIFIED", +"WEEK", +"MONTH", +"YEAR" +], +"enumDescriptions": [ +"The time frame was not specified and will default to WEEK.", +"One week.", +"One month.", +"One year." +], +"type": "string" +}, +"vmCount": { +"description": "Output only. Total number of VMs included in the report.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"vms": { +"description": "List of utilization information per VM. When sent as part of the request, the \"vm_id\" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.", +"items": { +"$ref": "VmUtilizationInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"VmAttachmentDetails": { +"description": "Details for attachment of the disk to a VM.", +"id": "VmAttachmentDetails", +"properties": { +"deviceName": { +"description": "Optional. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", +"type": "string" +} +}, +"type": "object" +}, +"VmCapabilities": { +"description": "Migrating VM source information about the VM capabilities needed for some Compute Engine features.", +"id": "VmCapabilities", +"properties": { +"lastOsCapabilitiesUpdateTime": { +"description": "Output only. The last time OS capabilities list was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"osCapabilities": { +"description": "Output only. Unordered list. List of certain VM OS capabilities needed for some Compute Engine features.", +"items": { +"enum": [ +"OS_CAPABILITY_UNSPECIFIED", +"OS_CAPABILITY_NVME_STORAGE_ACCESS", +"OS_CAPABILITY_GVNIC_NETWORK_INTERFACE" +], +"enumDescriptions": [ +"This is for API compatibility only and is not in use.", +"NVMe driver installed and the VM can use NVMe PD or local SSD.", +"gVNIC virtual NIC driver supported." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"VmUtilizationInfo": { +"description": "Utilization information of a single VM.", +"id": "VmUtilizationInfo", +"properties": { +"utilization": { +"$ref": "VmUtilizationMetrics", +"description": "Utilization metrics for this VM." +}, +"vmId": { +"description": "The VM's ID in the source.", +"type": "string" +}, +"vmwareVmDetails": { +"$ref": "VmwareVmDetails", +"description": "The description of the VM in a Source of type Vmware." +} +}, +"type": "object" +}, +"VmUtilizationMetrics": { +"description": "Utilization metrics values for a single VM.", +"id": "VmUtilizationMetrics", +"properties": { +"cpuAveragePercent": { +"description": "Average CPU usage, percent.", +"format": "int32", +"type": "integer" +}, +"cpuMaxPercent": { +"description": "Max CPU usage, percent.", +"format": "int32", +"type": "integer" +}, +"diskIoRateAverageKbps": { +"description": "Average disk IO rate, in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"diskIoRateMaxKbps": { +"description": "Max disk IO rate, in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"memoryAveragePercent": { +"description": "Average memory usage, percent.", +"format": "int32", +"type": "integer" +}, +"memoryMaxPercent": { +"description": "Max memory usage, percent.", +"format": "int32", +"type": "integer" +}, +"networkThroughputAverageKbps": { +"description": "Average network throughput (combined transmit-rates and receive-rates), in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"networkThroughputMaxKbps": { +"description": "Max network throughput (combined transmit-rates and receive-rates), in kilobytes per second.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"VmwareDiskDetails": { +"description": "The details of a Vmware VM disk.", +"id": "VmwareDiskDetails", +"properties": { +"diskNumber": { +"description": "The ordinal number of the disk.", +"format": "int32", +"type": "integer" +}, +"label": { +"description": "The disk label.", +"type": "string" +}, +"sizeGb": { +"description": "Size in GB.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"VmwareSourceDetails": { +"description": "VmwareSourceDetails message describes a specific source details for the vmware source type.", +"id": "VmwareSourceDetails", +"properties": { +"password": { +"description": "Input only. The credentials password. This is write only and can not be read in a GET operation.", +"type": "string" +}, +"resolvedVcenterHost": { +"description": "The hostname of the vcenter.", +"type": "string" +}, +"thumbprint": { +"description": "The thumbprint representing the certificate for the vcenter.", +"type": "string" +}, +"username": { +"description": "The credentials username.", +"type": "string" +}, +"vcenterIp": { +"description": "The ip address of the vcenter this Source represents.", +"type": "string" +} +}, +"type": "object" +}, +"VmwareSourceVmDetails": { +"description": "Represent the source Vmware VM details.", +"id": "VmwareSourceVmDetails", +"properties": { +"committedStorageBytes": { +"description": "The total size of the disks being migrated in bytes.", +"format": "int64", +"type": "string" +}, +"disks": { +"description": "The disks attached to the source VM.", +"items": { +"$ref": "VmwareDiskDetails" +}, +"type": "array" +}, +"firmware": { +"description": "The firmware type of the source VM.", +"enum": [ +"FIRMWARE_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The firmware is unknown.", +"The firmware is EFI.", +"The firmware is BIOS." +], +"type": "string" +}, +"vmCapabilitiesInfo": { +"$ref": "VmCapabilities", +"description": "Output only. Information about VM capabilities needed for some Compute Engine features.", +"readOnly": true +} +}, +"type": "object" +}, +"VmwareVmDetails": { +"description": "VmwareVmDetails describes a VM in vCenter.", +"id": "VmwareVmDetails", +"properties": { +"bootOption": { +"description": "Output only. The VM Boot Option.", +"enum": [ +"BOOT_OPTION_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is EFI.", +"The boot option is BIOS." +], +"readOnly": true, +"type": "string" +}, +"committedStorageMb": { +"description": "The total size of the storage allocated to the VM in MB.", +"format": "int64", +"type": "string" +}, +"cpuCount": { +"description": "The number of cpus in the VM.", +"format": "int32", +"type": "integer" +}, +"datacenterDescription": { +"description": "The descriptive name of the vCenter's datacenter this VM is contained in.", +"type": "string" +}, +"datacenterId": { +"description": "The id of the vCenter's datacenter this VM is contained in.", +"type": "string" +}, +"diskCount": { +"description": "The number of disks the VM has.", +"format": "int32", +"type": "integer" +}, +"displayName": { +"description": "The display name of the VM. Note that this is not necessarily unique.", +"type": "string" +}, +"guestDescription": { +"description": "The VM's OS. See for example https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html for types of strings this might hold.", +"type": "string" +}, +"memoryMb": { +"description": "The size of the memory of the VM in MB.", +"format": "int32", +"type": "integer" +}, +"powerState": { +"description": "The power state of the VM at the moment list was taken.", +"enum": [ +"POWER_STATE_UNSPECIFIED", +"ON", +"OFF", +"SUSPENDED" +], +"enumDescriptions": [ +"Power state is not specified.", +"The VM is turned ON.", +"The VM is turned OFF.", +"The VM is suspended. This is similar to hibernation or sleep mode." +], +"type": "string" +}, +"uuid": { +"description": "The unique identifier of the VM in vCenter.", +"type": "string" +}, +"vmId": { +"description": "The VM's id in the source (note that this is not the MigratingVm's id). This is the moref id of the VM.", +"type": "string" +} +}, +"type": "object" +}, +"VmwareVmsDetails": { +"description": "VmwareVmsDetails describes VMs in vCenter.", +"id": "VmwareVmsDetails", +"properties": { +"details": { +"description": "The details of the vmware VMs.", +"items": { +"$ref": "VmwareVmDetails" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "VM Migration API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmmigration.v1alpha1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmmigration.v1alpha1.json new file mode 100644 index 0000000000000000000000000000000000000000..4d3337cd850f6bf897a9a28808edcd0591f8f225 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmmigration.v1alpha1.json @@ -0,0 +1,6053 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://vmmigration.googleapis.com/", +"batchPath": "batch", +"canonicalName": "VM Migration Service", +"description": "Use the Migrate to Virtual Machines API to programmatically migrate workloads. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/migrate/virtual-machines", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vmmigration:v1alpha1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vmmigration.mtls.googleapis.com/", +"name": "vmmigration", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1alpha1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"groups": { +"methods": { +"addGroupMigration": { +"description": "Adds a MigratingVm to a Group.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:addGroupMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.groups.addGroupMigration", +"parameterOrder": [ +"group" +], +"parameters": { +"group": { +"description": "Required. The full path name of the Group to add to.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+group}:addGroupMigration", +"request": { +"$ref": "AddGroupMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new Group in a given project and location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.groups.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"groupId": { +"description": "Required. The group identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Group's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/groups", +"request": { +"$ref": "Group" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Group.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.groups.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Group name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Group.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.groups.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The group name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Group" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Groups in a given project and location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.groups.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of groups to return. The service may return fewer than this value. If unspecified, at most 500 groups will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListGroups` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListGroups` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of groups.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/groups", +"response": { +"$ref": "ListGroupsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Group.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.groups.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The Group name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the Group resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "Group" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"removeGroupMigration": { +"description": "Removes a MigratingVm from a Group.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/groups/{groupsId}:removeGroupMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.groups.removeGroupMigration", +"parameterOrder": [ +"group" +], +"parameters": { +"group": { +"description": "Required. The name of the Group.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/groups/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+group}:removeGroupMigration", +"request": { +"$ref": "RemoveGroupMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"imageImports": { +"methods": { +"create": { +"description": "Creates a new ImageImport in a given project.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.imageImports.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"imageImportId": { +"description": "Required. The image import identifier. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The ImageImport's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/imageImports", +"request": { +"$ref": "ImageImport" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single ImageImport.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.imageImports.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ImageImport name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and t he request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ImageImport.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ImageImport name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "ImageImport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ImageImports in a given project.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request (according to https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListImageImports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of targets.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/imageImports", +"response": { +"$ref": "ListImageImportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"imageImportJobs": { +"methods": { +"cancel": { +"description": "Initiates the cancellation of a running clone job.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.imageImports.imageImportJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The image import job id.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:cancel", +"request": { +"$ref": "CancelImageImportJobRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single ImageImportJob.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs/{imageImportJobsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.imageImportJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The ImageImportJob name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+/imageImportJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "ImageImportJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ImageImportJobs in a given project.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/imageImports/{imageImportsId}/imageImportJobs", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.imageImports.imageImportJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request (according to https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. The order by fields for the result (according to https://google.aip.dev/132#ordering). Currently ordering is only possible by \"name\" field.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListImageImportJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListImageImportJobs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of targets.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/imageImports/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/imageImportJobs", +"response": { +"$ref": "ListImageImportJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"sources": { +"methods": { +"create": { +"description": "Creates a new Source in a given project and location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Source's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"sourceId": { +"description": "Required. The source identifier.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/sources", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Source name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"fetchInventory": { +"description": "List remote source's inventory of VMs. The remote source is the onprem vCenter (remote in the sense it's not in Compute Engine). The inventory describes the list of existing VMs in that source. Note that this operation lists the VMs on the remote source, as opposed to listing the MigratingVms resources in the vmmigration service.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}:fetchInventory", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.fetchInventory", +"parameterOrder": [ +"source" +], +"parameters": { +"forceRefresh": { +"description": "If this flag is set to true, the source will be queried instead of using cached results. Using this flag will make the call slower.", +"location": "query", +"type": "boolean" +}, +"pageSize": { +"description": "The maximum number of VMs to return. The service may return fewer than this value. For AWS source: If unspecified, at most 500 VMs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000. For VMWare source: If unspecified, all VMs will be returned. There is no limit for maximum value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `FetchInventory` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `FetchInventory` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"source": { +"description": "Required. The name of the Source.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+source}:fetchInventory", +"response": { +"$ref": "FetchInventoryResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Source name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Source" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Sources in a given project and location.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of sources to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListSources` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSources` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of sources.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/sources", +"response": { +"$ref": "ListSourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.sources.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The Source name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the Source resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "Source" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"datacenterConnectors": { +"methods": { +"create": { +"description": "Creates a new DatacenterConnector in a given Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"datacenterConnectorId": { +"description": "Required. The datacenterConnector identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The DatacenterConnector's parent. Required. The Source in where the new DatacenterConnector will be created. For example: `projects/my-project/locations/us-central1/sources/my-source`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/datacenterConnectors", +"request": { +"$ref": "DatacenterConnector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single DatacenterConnector.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The DatacenterConnector name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single DatacenterConnector.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the DatacenterConnector.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "DatacenterConnector" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists DatacenterConnectors in a given Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of connectors to return. The service may return fewer than this value. If unspecified, at most 500 sources will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListDatacenterConnectors` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListDatacenterConnectors` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of connectors.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/datacenterConnectors", +"response": { +"$ref": "ListDatacenterConnectorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"upgradeAppliance": { +"description": "Upgrades the appliance relate to this DatacenterConnector to the in-place updateable version.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/datacenterConnectors/{datacenterConnectorsId}:upgradeAppliance", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.datacenterConnectors.upgradeAppliance", +"parameterOrder": [ +"datacenterConnector" +], +"parameters": { +"datacenterConnector": { +"description": "Required. The DatacenterConnector name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/datacenterConnectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+datacenterConnector}:upgradeAppliance", +"request": { +"$ref": "UpgradeApplianceRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"migratingVms": { +"methods": { +"create": { +"description": "Creates a new MigratingVm in a given Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"migratingVmId": { +"description": "Required. The migratingVm identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The MigratingVm's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/migratingVms", +"request": { +"$ref": "MigratingVm" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single MigratingVm.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.migratingVms.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"finalizeMigration": { +"description": "Marks a migration as completed, deleting migration resources that are no longer being used. Only applicable after cutover is done.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:finalizeMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.finalizeMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+migratingVm}:finalizeMigration", +"request": { +"$ref": "FinalizeMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single MigratingVm.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of the migrating VM.", +"enum": [ +"MIGRATING_VM_VIEW_UNSPECIFIED", +"MIGRATING_VM_VIEW_BASIC", +"MIGRATING_VM_VIEW_FULL" +], +"enumDescriptions": [ +"View is unspecified. The API will fallback to the default value.", +"Get the migrating VM basic details. The basic details do not include the recent clone jobs and recent cutover jobs lists.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "MigratingVm" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists MigratingVms in a given Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of migrating VMs to return. The service may return fewer than this value. If unspecified, at most 500 migrating VMs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListMigratingVms` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListMigratingVms` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of MigratingVms.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of each migrating VM.", +"enum": [ +"MIGRATING_VM_VIEW_UNSPECIFIED", +"MIGRATING_VM_VIEW_BASIC", +"MIGRATING_VM_VIEW_FULL" +], +"enumDescriptions": [ +"View is unspecified. The API will fallback to the default value.", +"Get the migrating VM basic details. The basic details do not include the recent clone jobs and recent cutover jobs lists.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/migratingVms", +"response": { +"$ref": "ListMigratingVmsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single MigratingVm.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.sources.migratingVms.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The identifier of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the MigratingVm resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "MigratingVm" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"pauseMigration": { +"description": "Pauses a migration for a VM. If cycle tasks are running they will be cancelled, preserving source task data. Further replication cycles will not be triggered while the VM is paused.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:pauseMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.pauseMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+migratingVm}:pauseMigration", +"request": { +"$ref": "PauseMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resumeMigration": { +"description": "Resumes a migration for a VM. When called on a paused migration, will start the process of uploading data and creating snapshots; when called on a completed cut-over migration, will update the migration to active state and start the process of uploading data and creating snapshots.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:resumeMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.resumeMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+migratingVm}:resumeMigration", +"request": { +"$ref": "ResumeMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"startMigration": { +"description": "Starts migration for a VM. Starts the process of uploading data and creating snapshots, in replication cycles scheduled by the policy.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}:startMigration", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.startMigration", +"parameterOrder": [ +"migratingVm" +], +"parameters": { +"migratingVm": { +"description": "Required. The name of the MigratingVm.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+migratingVm}:startMigration", +"request": { +"$ref": "StartMigrationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"cloneJobs": { +"methods": { +"cancel": { +"description": "Initiates the cancellation of a running clone job.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The clone job id", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:cancel", +"request": { +"$ref": "CancelCloneJobRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Initiates a Clone of a specific migrating VM.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"cloneJobId": { +"description": "Required. The clone job identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Clone's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/cloneJobs", +"request": { +"$ref": "CloneJob" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single CloneJob.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs/{cloneJobsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CloneJob.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cloneJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "CloneJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the CloneJobs of a migrating VM. Only 25 most recent CloneJobs are listed.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cloneJobs", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cloneJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of clone jobs to return. The service may return fewer than this value. If unspecified, at most 500 clone jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListCloneJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCloneJobs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of source VMs.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/cloneJobs", +"response": { +"$ref": "ListCloneJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"cutoverJobs": { +"methods": { +"cancel": { +"description": "Initiates the cancellation of a running cutover job.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}:cancel", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The cutover job id", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}:cancel", +"request": { +"$ref": "CancelCutoverJobRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Initiates a Cutover of a specific migrating VM. The returned LRO is completed when the cutover job resource is created and the job is initiated.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"cutoverJobId": { +"description": "Required. The cutover job identifier.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Cutover's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/cutoverJobs", +"request": { +"$ref": "CutoverJob" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single CutoverJob.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs/{cutoverJobsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the CutoverJob.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/cutoverJobs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "CutoverJob" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists the CutoverJobs of a migrating VM. Only 25 most recent CutoverJobs are listed.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/cutoverJobs", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.cutoverJobs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of cutover jobs to return. The service may return fewer than this value. If unspecified, at most 500 cutover jobs will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListCutoverJobs` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListCutoverJobs` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of migrating VMs.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/cutoverJobs", +"response": { +"$ref": "ListCutoverJobsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"replicationCycles": { +"methods": { +"get": { +"description": "Gets details of a single ReplicationCycle.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles/{replicationCyclesId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the ReplicationCycle.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+/replicationCycles/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "ReplicationCycle" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ReplicationCycles in a given MigratingVM.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/migratingVms/{migratingVmsId}/replicationCycles", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.migratingVms.replicationCycles.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of replication cycles to return. The service may return fewer than this value. If unspecified, at most 100 migrating VMs will be returned. The maximum value is 100; values above 100 will be coerced to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListReplicationCycles` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListReplicationCycles` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of ReplicationCycles.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/migratingVms/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/replicationCycles", +"response": { +"$ref": "ListReplicationCyclesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"utilizationReports": { +"methods": { +"create": { +"description": "Creates a new UtilizationReport.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.sources.utilizationReports.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The Utilization Report's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"utilizationReportId": { +"description": "Required. The ID to use for the report, which will become the final component of the reports's resource name. This value maximum length is 63 characters, and valid characters are /a-z-/. It must start with an english letter and must not end with a hyphen.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/utilizationReports", +"request": { +"$ref": "UtilizationReport" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Utilization Report.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.sources.utilizationReports.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Utilization Report name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a single Utilization Report.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports/{utilizationReportsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.utilizationReports.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The Utilization Report name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+/utilizationReports/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of the report. Defaults to FULL", +"enum": [ +"UTILIZATION_REPORT_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.", +"Get the report metadata, without the list of VMs and their utilization info.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "UtilizationReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Utilization Reports of the given Source.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/sources/{sourcesId}/utilizationReports", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.sources.utilizationReports.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of reports to return. The service may return fewer than this value. If unspecified, at most 500 reports will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListUtilizationReports` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListUtilizationReports` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The Utilization Reports parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/sources/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. The level of details of each report. Defaults to BASIC.", +"enum": [ +"UTILIZATION_REPORT_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value. The API will default to FULL on single report request and BASIC for multiple reports request.", +"Get the report metadata, without the list of VMs and their utilization info.", +"Include everything." +], +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/utilizationReports", +"response": { +"$ref": "ListUtilizationReportsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"targetProjects": { +"methods": { +"create": { +"description": "Creates a new TargetProject in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects", +"httpMethod": "POST", +"id": "vmmigration.projects.locations.targetProjects.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The TargetProject's parent.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"targetProjectId": { +"description": "Required. The target_project identifier.", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/targetProjects", +"request": { +"$ref": "TargetProject" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}", +"httpMethod": "DELETE", +"id": "vmmigration.projects.locations.targetProjects.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The TargetProject name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.targetProjects.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The TargetProject name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"response": { +"$ref": "TargetProject" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists TargetProjects in a given project. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects", +"httpMethod": "GET", +"id": "vmmigration.projects.locations.targetProjects.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. The filter request.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. the order by fields for the result.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of targets to return. The service may return fewer than this value. If unspecified, at most 500 targets will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Required. A page token, received from a previous `ListTargets` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTargets` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent, which owns this collection of targets.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha1/{+parent}/targetProjects", +"response": { +"$ref": "ListTargetProjectsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single TargetProject. NOTE: TargetProject is a global resource; hence the only supported value for location is `global`.", +"flatPath": "v1alpha1/projects/{projectsId}/locations/{locationsId}/targetProjects/{targetProjectsId}", +"httpMethod": "PATCH", +"id": "vmmigration.projects.locations.targetProjects.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The name of the target project.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/targetProjects/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Field mask is used to specify the fields to be overwritten in the TargetProject resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha1/{+name}", +"request": { +"$ref": "TargetProject" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240411", +"rootUrl": "https://vmmigration.googleapis.com/", +"schemas": { +"AccessKeyCredentials": { +"description": "Message describing AWS Credentials using access key id and secret.", +"id": "AccessKeyCredentials", +"properties": { +"accessKeyId": { +"description": "AWS access key ID.", +"type": "string" +}, +"secretAccessKey": { +"description": "Input only. AWS secret access key.", +"type": "string" +}, +"sessionToken": { +"description": "Input only. AWS session token. Used only when AWS security token service (STS) is responsible for creating the temporary credentials.", +"type": "string" +} +}, +"type": "object" +}, +"AdaptingOSStep": { +"description": "AdaptingOSStep contains specific step details.", +"id": "AdaptingOSStep", +"properties": {}, +"type": "object" +}, +"AddGroupMigrationRequest": { +"description": "Request message for 'AddGroupMigration' request.", +"id": "AddGroupMigrationRequest", +"properties": { +"migratingVm": { +"description": "The full path name of the MigratingVm to add.", +"type": "string" +} +}, +"type": "object" +}, +"ApplianceVersion": { +"description": "Describes an appliance version.", +"id": "ApplianceVersion", +"properties": { +"critical": { +"description": "Determine whether it's critical to upgrade the appliance to this version.", +"type": "boolean" +}, +"releaseNotesUri": { +"description": "Link to a page that contains the version release notes.", +"type": "string" +}, +"uri": { +"description": "A link for downloading the version.", +"type": "string" +}, +"version": { +"description": "The appliance version.", +"type": "string" +} +}, +"type": "object" +}, +"AppliedLicense": { +"description": "AppliedLicense holds the license data returned by adaptation module report.", +"id": "AppliedLicense", +"properties": { +"osLicense": { +"description": "The OS license returned from the adaptation module's report.", +"type": "string" +}, +"type": { +"description": "The license type that was used in OS adaptation.", +"enum": [ +"TYPE_UNSPECIFIED", +"NONE", +"PAYG", +"BYOL" +], +"enumDescriptions": [ +"Unspecified license for the OS.", +"No license available for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +} +}, +"type": "object" +}, +"AvailableUpdates": { +"description": "Holds informatiom about the available versions for upgrade.", +"id": "AvailableUpdates", +"properties": { +"inPlaceUpdate": { +"$ref": "ApplianceVersion", +"description": "The latest version for in place update. The current appliance can be updated to this version using the API or m4c CLI." +}, +"newDeployableAppliance": { +"$ref": "ApplianceVersion", +"description": "The newest deployable version of the appliance. The current appliance can't be updated into this version, and the owner must manually deploy this OVA to a new appliance." +} +}, +"type": "object" +}, +"AwsDiskDetails": { +"description": "The details of an AWS instance disk.", +"id": "AwsDiskDetails", +"properties": { +"diskNumber": { +"description": "The ordinal number of the disk.", +"format": "int32", +"type": "integer" +}, +"sizeGb": { +"description": "Size in GB.", +"format": "int64", +"type": "string" +}, +"volumeId": { +"description": "AWS volume ID.", +"type": "string" +} +}, +"type": "object" +}, +"AwsSecurityGroup": { +"description": "AwsSecurityGroup describes a security group of an AWS VM.", +"id": "AwsSecurityGroup", +"properties": { +"id": { +"description": "The AWS security group id.", +"type": "string" +}, +"name": { +"description": "The AWS security group name.", +"type": "string" +} +}, +"type": "object" +}, +"AwsSourceDetails": { +"description": "AwsSourceDetails message describes a specific source details for the AWS source type.", +"id": "AwsSourceDetails", +"properties": { +"accessKeyCreds": { +"$ref": "AccessKeyCredentials", +"description": "AWS Credentials using access key id and secret." +}, +"awsRegion": { +"description": "Immutable. The AWS region that the source VMs will be migrated from.", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Source in case of an error.", +"readOnly": true +}, +"inventorySecurityGroupNames": { +"description": "AWS security group names to limit the scope of the source inventory.", +"items": { +"type": "string" +}, +"type": "array" +}, +"inventoryTagList": { +"description": "AWS resource tags to limit the scope of the source inventory.", +"items": { +"$ref": "Tag" +}, +"type": "array" +}, +"migrationResourcesUserTags": { +"additionalProperties": { +"type": "string" +}, +"description": "User specified tags to add to every M2VM generated resource in AWS. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m2vm`.", +"type": "object" +}, +"publicIp": { +"description": "Output only. The source's public IP. All communication initiated by this source will originate from this IP.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of the source as determined by the health check.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"FAILED", +"ACTIVE" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The state was not sampled by the health checks yet.", +"The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details.", +"The source exists and its credentials were verified." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"AwsSourceVmDetails": { +"description": "Represent the source AWS VM details.", +"id": "AwsSourceVmDetails", +"properties": { +"committedStorageBytes": { +"description": "The total size of the disks being migrated in bytes.", +"format": "int64", +"type": "string" +}, +"disks": { +"description": "The disks attached to the source VM.", +"items": { +"$ref": "AwsDiskDetails" +}, +"type": "array" +}, +"firmware": { +"description": "The firmware type of the source VM.", +"enum": [ +"FIRMWARE_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The firmware is unknown.", +"The firmware is EFI.", +"The firmware is BIOS." +], +"type": "string" +}, +"vmCapabilitiesInfo": { +"$ref": "VmCapabilities", +"description": "Output only. Information about VM capabilities needed for some Compute Engine features.", +"readOnly": true +} +}, +"type": "object" +}, +"AwsVmDetails": { +"description": "AwsVmDetails describes a VM in AWS.", +"id": "AwsVmDetails", +"properties": { +"architecture": { +"description": "The CPU architecture.", +"enum": [ +"VM_ARCHITECTURE_UNSPECIFIED", +"I386", +"X86_64", +"ARM64", +"X86_64_MAC" +], +"enumDescriptions": [ +"The architecture is unknown.", +"The architecture is I386.", +"The architecture is X86_64.", +"The architecture is ARM64.", +"The architecture is X86_64_MAC." +], +"type": "string" +}, +"bootOption": { +"description": "The VM Boot Option.", +"enum": [ +"BOOT_OPTION_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is UEFI.", +"The boot option is LEGACY-BIOS." +], +"type": "string" +}, +"committedStorageMb": { +"description": "The total size of the storage allocated to the VM in MB.", +"format": "int64", +"type": "string" +}, +"cpuCount": { +"description": "The number of cpus the VM has.", +"format": "int32", +"type": "integer" +}, +"diskCount": { +"description": "The number of disks the VM has.", +"format": "int32", +"type": "integer" +}, +"displayName": { +"description": "The display name of the VM. Note that this value is not necessarily unique.", +"type": "string" +}, +"instanceType": { +"description": "The instance type of the VM.", +"type": "string" +}, +"memoryMb": { +"description": "The memory size of the VM in MB.", +"format": "int32", +"type": "integer" +}, +"osDescription": { +"description": "The VM's OS.", +"type": "string" +}, +"powerState": { +"description": "Output only. The power state of the VM at the moment list was taken.", +"enum": [ +"POWER_STATE_UNSPECIFIED", +"ON", +"OFF", +"SUSPENDED", +"PENDING" +], +"enumDescriptions": [ +"Power state is not specified.", +"The VM is turned on.", +"The VM is turned off.", +"The VM is suspended. This is similar to hibernation or sleep mode.", +"The VM is starting." +], +"readOnly": true, +"type": "string" +}, +"securityGroups": { +"description": "The security groups the VM belongs to.", +"items": { +"$ref": "AwsSecurityGroup" +}, +"type": "array" +}, +"sourceDescription": { +"description": "The descriptive name of the AWS's source this VM is connected to.", +"type": "string" +}, +"sourceId": { +"description": "The id of the AWS's source this VM is connected to.", +"type": "string" +}, +"tags": { +"additionalProperties": { +"type": "string" +}, +"description": "The tags of the VM.", +"type": "object" +}, +"virtualizationType": { +"description": "The virtualization type.", +"enum": [ +"VM_VIRTUALIZATION_TYPE_UNSPECIFIED", +"HVM", +"PARAVIRTUAL" +], +"enumDescriptions": [ +"The virtualization type is unknown.", +"The virtualziation type is HVM.", +"The virtualziation type is PARAVIRTUAL." +], +"type": "string" +}, +"vmId": { +"description": "The VM ID in AWS.", +"type": "string" +}, +"vpcId": { +"description": "The VPC ID the VM belongs to.", +"type": "string" +}, +"zone": { +"description": "The AWS zone of the VM.", +"type": "string" +} +}, +"type": "object" +}, +"AwsVmsDetails": { +"description": "AWSVmsDetails describes VMs in AWS.", +"id": "AwsVmsDetails", +"properties": { +"details": { +"description": "The details of the AWS VMs.", +"items": { +"$ref": "AwsVmDetails" +}, +"type": "array" +} +}, +"type": "object" +}, +"AzureDiskDetails": { +"description": "The details of an Azure VM disk.", +"id": "AzureDiskDetails", +"properties": { +"diskId": { +"description": "Azure disk ID.", +"type": "string" +}, +"diskNumber": { +"description": "The ordinal number of the disk.", +"format": "int32", +"type": "integer" +}, +"sizeGb": { +"description": "Size in GB.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"AzureSourceDetails": { +"description": "AzureSourceDetails message describes a specific source details for the Azure source type.", +"id": "AzureSourceDetails", +"properties": { +"azureLocation": { +"description": "Immutable. The Azure location (region) that the source VMs will be migrated from.", +"type": "string" +}, +"clientSecretCreds": { +"$ref": "ClientSecretCredentials", +"description": "Azure Credentials using tenant ID, client ID and secret." +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Source in case of an error.", +"readOnly": true +}, +"migrationResourcesUserTags": { +"additionalProperties": { +"type": "string" +}, +"description": "User specified tags to add to every M2VM generated resource in Azure. These tags will be set in addition to the default tags that are set as part of the migration process. The tags must not begin with the reserved prefix `m4ce` or `m2vm`.", +"type": "object" +}, +"resourceGroupId": { +"description": "Output only. The ID of the Azure resource group that contains all resources related to the migration process of this source.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of the source as determined by the health check.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"FAILED", +"ACTIVE" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The state was not sampled by the health checks yet.", +"The source is available but might not be usable yet due to invalid credentials or another reason. The error message will contain further details.", +"The source exists and its credentials were verified." +], +"readOnly": true, +"type": "string" +}, +"subscriptionId": { +"description": "Immutable. Azure subscription ID.", +"type": "string" +} +}, +"type": "object" +}, +"AzureSourceVmDetails": { +"description": "Represent the source Azure VM details.", +"id": "AzureSourceVmDetails", +"properties": { +"committedStorageBytes": { +"description": "The total size of the disks being migrated in bytes.", +"format": "int64", +"type": "string" +}, +"disks": { +"description": "The disks attached to the source VM.", +"items": { +"$ref": "AzureDiskDetails" +}, +"type": "array" +}, +"firmware": { +"description": "The firmware type of the source VM.", +"enum": [ +"FIRMWARE_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The firmware is unknown.", +"The firmware is EFI.", +"The firmware is BIOS." +], +"type": "string" +}, +"vmCapabilitiesInfo": { +"$ref": "VmCapabilities", +"description": "Output only. Information about VM capabilities needed for some Compute Engine features.", +"readOnly": true +} +}, +"type": "object" +}, +"AzureVmDetails": { +"description": "AzureVmDetails describes a VM in Azure.", +"id": "AzureVmDetails", +"properties": { +"bootOption": { +"description": "The VM Boot Option.", +"enum": [ +"BOOT_OPTION_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is UEFI.", +"The boot option is BIOS." +], +"type": "string" +}, +"committedStorageMb": { +"description": "The total size of the storage allocated to the VM in MB.", +"format": "int64", +"type": "string" +}, +"computerName": { +"description": "The VM's ComputerName.", +"type": "string" +}, +"cpuCount": { +"description": "The number of cpus the VM has.", +"format": "int32", +"type": "integer" +}, +"diskCount": { +"description": "The number of disks the VM has, including OS disk.", +"format": "int32", +"type": "integer" +}, +"disks": { +"description": "Description of the data disks.", +"items": { +"$ref": "Disk" +}, +"type": "array" +}, +"memoryMb": { +"description": "The memory size of the VM in MB.", +"format": "int32", +"type": "integer" +}, +"osDescription": { +"$ref": "OSDescription", +"description": "Description of the OS." +}, +"osDisk": { +"$ref": "OSDisk", +"description": "Description of the OS disk." +}, +"powerState": { +"description": "The power state of the VM at the moment list was taken.", +"enum": [ +"POWER_STATE_UNSPECIFIED", +"STARTING", +"RUNNING", +"STOPPING", +"STOPPED", +"DEALLOCATING", +"DEALLOCATED", +"UNKNOWN" +], +"enumDescriptions": [ +"Power state is not specified.", +"The VM is starting.", +"The VM is running.", +"The VM is stopping.", +"The VM is stopped.", +"The VM is deallocating.", +"The VM is deallocated.", +"The VM's power state is unknown." +], +"type": "string" +}, +"tags": { +"additionalProperties": { +"type": "string" +}, +"description": "The tags of the VM.", +"type": "object" +}, +"vmId": { +"description": "The VM full path in Azure.", +"type": "string" +}, +"vmSize": { +"description": "VM size as configured in Azure. Determines the VM's hardware spec.", +"type": "string" +} +}, +"type": "object" +}, +"AzureVmsDetails": { +"description": "AzureVmsDetails describes VMs in Azure.", +"id": "AzureVmsDetails", +"properties": { +"details": { +"description": "The details of the Azure VMs.", +"items": { +"$ref": "AzureVmDetails" +}, +"type": "array" +} +}, +"type": "object" +}, +"BootDiskDefaults": { +"description": "BootDiskDefaults hold information about the boot disk of a VM.", +"id": "BootDiskDefaults", +"properties": { +"deviceName": { +"description": "Optional. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", +"type": "string" +}, +"diskName": { +"description": "Optional. The name of the disk.", +"type": "string" +}, +"diskType": { +"description": "Optional. The type of disk provisioning to use for the VM.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the boot disk." +}, +"image": { +"$ref": "DiskImageDefaults", +"description": "The image to use when creating the disk." +} +}, +"type": "object" +}, +"CancelCloneJobRequest": { +"description": "Request message for 'CancelCloneJob' request.", +"id": "CancelCloneJobRequest", +"properties": {}, +"type": "object" +}, +"CancelCutoverJobRequest": { +"description": "Request message for 'CancelCutoverJob' request.", +"id": "CancelCutoverJobRequest", +"properties": {}, +"type": "object" +}, +"CancelImageImportJobRequest": { +"description": "Request message for 'CancelImageImportJob' request.", +"id": "CancelImageImportJobRequest", +"properties": {}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"ClientSecretCredentials": { +"description": "Message describing Azure Credentials using tenant ID, client ID and secret.", +"id": "ClientSecretCredentials", +"properties": { +"clientId": { +"description": "Azure client ID.", +"type": "string" +}, +"clientSecret": { +"description": "Input only. Azure client secret.", +"type": "string" +}, +"tenantId": { +"description": "Azure tenant ID.", +"type": "string" +} +}, +"type": "object" +}, +"CloneJob": { +"description": "CloneJob describes the process of creating a clone of a MigratingVM to the requested target based on the latest successful uploaded snapshots. While the migration cycles of a MigratingVm take place, it is possible to verify the uploaded VM can be started in the cloud, by creating a clone. The clone can be created without any downtime, and it is created using the latest snapshots which are already in the cloud. The cloneJob is only responsible for its work, not its products, which means once it is finished, it will never touch the instance it created. It will only delete it in case of the CloneJob being cancelled or upon failure to clone.", +"id": "CloneJob", +"properties": { +"computeEngineDisksTargetDetails": { +"$ref": "ComputeEngineDisksTargetDetails", +"description": "Output only. Details of the target Persistent Disks in Compute Engine.", +"readOnly": true +}, +"computeEngineTargetDetails": { +"$ref": "ComputeEngineTargetDetails", +"description": "Output only. Details of the target VM in Compute Engine.", +"readOnly": true +}, +"computeEngineVmDetails": { +"$ref": "TargetVMDetails", +"deprecated": true, +"description": "Output only. Details of the VM in Compute Engine. Deprecated: Use compute_engine_target_details instead.", +"readOnly": true +}, +"createTime": { +"description": "Output only. The time the clone job was created (as an API call, not when it was actually created in the target).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the clone job was ended.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details for the errors that led to the Clone Job's state.", +"readOnly": true +}, +"name": { +"description": "Output only. The name of the clone.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of the clone job.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"ACTIVE", +"FAILED", +"SUCCEEDED", +"CANCELLED", +"CANCELLING", +"ADAPTING_OS" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The clone job has not yet started.", +"The clone job is active and running.", +"The clone job finished with errors.", +"The clone job finished successfully.", +"The clone job was cancelled.", +"The clone job is being cancelled.", +"OS adaptation is running as part of the clone job to generate license." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Output only. The clone steps list representing its progress.", +"items": { +"$ref": "CloneStep" +}, +"readOnly": true, +"type": "array" +}, +"targetDetails": { +"$ref": "TargetVMDetails", +"deprecated": true, +"description": "Output only. Details of the VM to create as the target of this clone job. Deprecated: Use compute_engine_target_details instead.", +"readOnly": true +} +}, +"type": "object" +}, +"CloneStep": { +"description": "CloneStep holds information about the clone step progress.", +"id": "CloneStep", +"properties": { +"adaptingOs": { +"$ref": "AdaptingOSStep", +"description": "Adapting OS step." +}, +"endTime": { +"description": "The time the step has ended.", +"format": "google-datetime", +"type": "string" +}, +"instantiatingMigratedVm": { +"$ref": "InstantiatingMigratedVMStep", +"description": "Instantiating migrated VM step." +}, +"preparingVmDisks": { +"$ref": "PreparingVMDisksStep", +"description": "Preparing VM disks step." +}, +"startTime": { +"description": "The time the step has started.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ComputeEngineDisksTargetDefaults": { +"description": "ComputeEngineDisksTargetDefaults is a collection of details for creating Persistent Disks in a target Compute Engine project.", +"id": "ComputeEngineDisksTargetDefaults", +"properties": { +"disks": { +"description": "The details of each Persistent Disk to create.", +"items": { +"$ref": "PersistentDiskDefaults" +}, +"type": "array" +}, +"disksTargetDefaults": { +"$ref": "DisksMigrationDisksTargetDefaults", +"description": "Details of the disk only migration target." +}, +"targetProject": { +"description": "The full path of the resource of type TargetProject which represents the Compute Engine project in which to create the Persistent Disks.", +"type": "string" +}, +"vmTargetDefaults": { +"$ref": "DisksMigrationVmTargetDefaults", +"description": "Details of the VM migration target." +}, +"zone": { +"description": "The zone in which to create the Persistent Disks.", +"type": "string" +} +}, +"type": "object" +}, +"ComputeEngineDisksTargetDetails": { +"description": "ComputeEngineDisksTargetDetails is a collection of created Persistent Disks details.", +"id": "ComputeEngineDisksTargetDetails", +"properties": { +"disks": { +"description": "The details of each created Persistent Disk.", +"items": { +"$ref": "PersistentDisk" +}, +"type": "array" +}, +"disksTargetDetails": { +"$ref": "DisksMigrationDisksTargetDetails", +"description": "Details of the disks-only migration target." +}, +"vmTargetDetails": { +"$ref": "DisksMigrationVmTargetDetails", +"description": "Details for the VM the migrated data disks are attached to." +} +}, +"type": "object" +}, +"ComputeEngineTargetDefaults": { +"description": "ComputeEngineTargetDefaults is a collection of details for creating a VM in a target Compute Engine project.", +"id": "ComputeEngineTargetDefaults", +"properties": { +"additionalLicenses": { +"description": "Additional licenses to assign to the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"appliedLicense": { +"$ref": "AppliedLicense", +"description": "Output only. The OS license returned from the adaptation module report.", +"readOnly": true +}, +"bootOption": { +"description": "Output only. The VM Boot Option, as set in the source VM.", +"enum": [ +"COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED", +"COMPUTE_ENGINE_BOOT_OPTION_EFI", +"COMPUTE_ENGINE_BOOT_OPTION_BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is EFI.", +"The boot option is BIOS." +], +"readOnly": true, +"type": "string" +}, +"computeScheduling": { +"$ref": "ComputeScheduling", +"description": "Compute instance scheduling information (if empty default is used)." +}, +"diskType": { +"description": "The disk type to use in the VM.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. Immutable. The encryption to apply to the VM disks." +}, +"hostname": { +"description": "The hostname to assign to the VM.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of labels to associate with the VM.", +"type": "object" +}, +"licenseType": { +"description": "The license type to use in OS adaptation.", +"enum": [ +"COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", +"COMPUTE_ENGINE_LICENSE_TYPE_PAYG", +"COMPUTE_ENGINE_LICENSE_TYPE_BYOL" +], +"enumDescriptions": [ +"The license type is the default for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +}, +"machineType": { +"description": "The machine type to create the VM with.", +"type": "string" +}, +"machineTypeSeries": { +"description": "The machine type series to create the VM with.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "The metadata key/value pairs to assign to the VM.", +"type": "object" +}, +"networkInterfaces": { +"description": "List of NICs connected to this VM.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"networkTags": { +"description": "A list of network tags to associate with the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"secureBoot": { +"description": "Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.", +"type": "boolean" +}, +"serviceAccount": { +"description": "The service account to associate the VM with.", +"type": "string" +}, +"targetProject": { +"description": "The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM.", +"type": "string" +}, +"vmName": { +"description": "The name of the VM to create.", +"type": "string" +}, +"zone": { +"description": "The zone in which to create the VM.", +"type": "string" +} +}, +"type": "object" +}, +"ComputeEngineTargetDetails": { +"description": "ComputeEngineTargetDetails is a collection of details for creating a VM in a target Compute Engine project.", +"id": "ComputeEngineTargetDetails", +"properties": { +"additionalLicenses": { +"description": "Additional licenses to assign to the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"appliedLicense": { +"$ref": "AppliedLicense", +"description": "The OS license returned from the adaptation module report." +}, +"bootOption": { +"description": "The VM Boot Option, as set in the source VM.", +"enum": [ +"COMPUTE_ENGINE_BOOT_OPTION_UNSPECIFIED", +"COMPUTE_ENGINE_BOOT_OPTION_EFI", +"COMPUTE_ENGINE_BOOT_OPTION_BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is EFI.", +"The boot option is BIOS." +], +"type": "string" +}, +"computeScheduling": { +"$ref": "ComputeScheduling", +"description": "Compute instance scheduling information (if empty default is used)." +}, +"diskType": { +"description": "The disk type to use in the VM.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the VM disks." +}, +"hostname": { +"description": "The hostname to assign to the VM.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of labels to associate with the VM.", +"type": "object" +}, +"licenseType": { +"description": "The license type to use in OS adaptation.", +"enum": [ +"COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", +"COMPUTE_ENGINE_LICENSE_TYPE_PAYG", +"COMPUTE_ENGINE_LICENSE_TYPE_BYOL" +], +"enumDescriptions": [ +"The license type is the default for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +}, +"machineType": { +"description": "The machine type to create the VM with.", +"type": "string" +}, +"machineTypeSeries": { +"description": "The machine type series to create the VM with.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "The metadata key/value pairs to assign to the VM.", +"type": "object" +}, +"networkInterfaces": { +"description": "List of NICs connected to this VM.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"networkTags": { +"description": "A list of network tags to associate with the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"project": { +"description": "The Google Cloud target project ID or project name.", +"type": "string" +}, +"secureBoot": { +"description": "Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.", +"type": "boolean" +}, +"serviceAccount": { +"description": "The service account to associate the VM with.", +"type": "string" +}, +"vmName": { +"description": "The name of the VM to create.", +"type": "string" +}, +"zone": { +"description": "The zone in which to create the VM.", +"type": "string" +} +}, +"type": "object" +}, +"ComputeScheduling": { +"description": "Scheduling information for VM on maintenance/restart behaviour and node allocation in sole tenant nodes.", +"id": "ComputeScheduling", +"properties": { +"automaticRestart": { +"deprecated": true, +"type": "boolean" +}, +"minNodeCpus": { +"description": "The minimum number of virtual CPUs this instance will consume when running on a sole-tenant node. Ignored if no node_affinites are configured.", +"format": "int32", +"type": "integer" +}, +"nodeAffinities": { +"description": "A set of node affinity and anti-affinity configurations for sole tenant nodes.", +"items": { +"$ref": "SchedulingNodeAffinity" +}, +"type": "array" +}, +"onHostMaintenance": { +"description": "How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.", +"enum": [ +"ON_HOST_MAINTENANCE_UNSPECIFIED", +"TERMINATE", +"MIGRATE" +], +"enumDescriptions": [ +"An unknown, unexpected behavior.", +"Terminate the instance when the host machine undergoes maintenance.", +"Migrate the instance when the host machine undergoes maintenance." +], +"type": "string" +}, +"restartType": { +"description": "Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user). This configuration is identical to `automaticRestart` field in Compute Engine create instance under scheduling. It was changed to an enum (instead of a boolean) to match the default value in Compute Engine which is automatic restart.", +"enum": [ +"RESTART_TYPE_UNSPECIFIED", +"AUTOMATIC_RESTART", +"NO_AUTOMATIC_RESTART" +], +"enumDescriptions": [ +"Unspecified behavior. This will use the default.", +"The Instance should be automatically restarted whenever it is terminated by Compute Engine.", +"The Instance isn't automatically restarted whenever it is terminated by Compute Engine." +], +"type": "string" +} +}, +"type": "object" +}, +"CreatingImageStep": { +"description": "CreatingImageStep contains specific step details.", +"id": "CreatingImageStep", +"properties": {}, +"type": "object" +}, +"CutoverForecast": { +"description": "CutoverForecast holds information about future CutoverJobs of a MigratingVm.", +"id": "CutoverForecast", +"properties": { +"estimatedCutoverJobDuration": { +"description": "Output only. Estimation of the CutoverJob duration.", +"format": "google-duration", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CutoverJob": { +"description": "CutoverJob message describes a cutover of a migrating VM. The CutoverJob is the operation of shutting down the VM, creating a snapshot and clonning the VM using the replicated snapshot.", +"id": "CutoverJob", +"properties": { +"computeEngineDisksTargetDetails": { +"$ref": "ComputeEngineDisksTargetDetails", +"description": "Output only. Details of the target Persistent Disks in Compute Engine.", +"readOnly": true +}, +"computeEngineTargetDetails": { +"$ref": "ComputeEngineTargetDetails", +"description": "Output only. Details of the target VM in Compute Engine.", +"readOnly": true +}, +"computeEngineVmDetails": { +"$ref": "TargetVMDetails", +"deprecated": true, +"description": "Output only. Details of the VM in Compute Engine. Deprecated: Use compute_engine_target_details instead.", +"readOnly": true +}, +"createTime": { +"description": "Output only. The time the cutover job was created (as an API call, not when it was actually created in the target).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the cutover job had finished.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details for the errors that led to the Cutover Job's state.", +"readOnly": true +}, +"name": { +"description": "Output only. The name of the cutover job.", +"readOnly": true, +"type": "string" +}, +"progress": { +"deprecated": true, +"description": "Output only. The current progress in percentage of the cutover job.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"progressPercent": { +"description": "Output only. The current progress in percentage of the cutover job.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"state": { +"description": "Output only. State of the cutover job.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"FAILED", +"SUCCEEDED", +"CANCELLED", +"CANCELLING", +"ACTIVE", +"ADAPTING_OS" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The cutover job has not yet started.", +"The cutover job finished with errors.", +"The cutover job finished successfully.", +"The cutover job was cancelled.", +"The cutover job is being cancelled.", +"The cutover job is active and running.", +"OS adaptation is running as part of the cutover job to generate license." +], +"readOnly": true, +"type": "string" +}, +"stateMessage": { +"description": "Output only. A message providing possible extra details about the current state.", +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Output only. The cutover steps list representing its progress.", +"items": { +"$ref": "CutoverStep" +}, +"readOnly": true, +"type": "array" +}, +"targetDetails": { +"$ref": "TargetVMDetails", +"deprecated": true, +"description": "Output only. Details of the VM to create as the target of this cutover job. Deprecated: Use compute_engine_target_details instead.", +"readOnly": true +} +}, +"type": "object" +}, +"CutoverStep": { +"description": "CutoverStep holds information about the cutover step progress.", +"id": "CutoverStep", +"properties": { +"endTime": { +"description": "The time the step has ended.", +"format": "google-datetime", +"type": "string" +}, +"finalSync": { +"$ref": "ReplicationCycle", +"description": "Final sync step." +}, +"instantiatingMigratedVm": { +"$ref": "InstantiatingMigratedVMStep", +"description": "Instantiating migrated VM step." +}, +"preparingVmDisks": { +"$ref": "PreparingVMDisksStep", +"description": "Preparing VM disks step." +}, +"previousReplicationCycle": { +"$ref": "ReplicationCycle", +"description": "A replication cycle prior cutover step." +}, +"shuttingDownSourceVm": { +"$ref": "ShuttingDownSourceVMStep", +"description": "Shutting down VM step." +}, +"startTime": { +"description": "The time the step has started.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"CycleStep": { +"description": "CycleStep holds information about a step progress.", +"id": "CycleStep", +"properties": { +"endTime": { +"description": "The time the cycle step has ended.", +"format": "google-datetime", +"type": "string" +}, +"initializingReplication": { +"$ref": "InitializingReplicationStep", +"description": "Initializing replication step." +}, +"postProcessing": { +"$ref": "PostProcessingStep", +"description": "Post processing step." +}, +"replicating": { +"$ref": "ReplicatingStep", +"description": "Replicating step." +}, +"startTime": { +"description": "The time the cycle step has started.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"DataDiskImageImport": { +"description": "Mentions that the image import is not using OS adaptation process.", +"id": "DataDiskImageImport", +"properties": {}, +"type": "object" +}, +"DatacenterConnector": { +"description": "DatacenterConnector message describes a connector between the Source and Google Cloud, which is installed on a vmware datacenter (an OVA vm installed by the user) to connect the Datacenter to Google Cloud and support vm migration data transfer.", +"id": "DatacenterConnector", +"properties": { +"applianceInfrastructureVersion": { +"description": "Output only. Appliance OVA version. This is the OVA which is manually installed by the user and contains the infrastructure for the automatically updatable components on the appliance.", +"readOnly": true, +"type": "string" +}, +"applianceSoftwareVersion": { +"description": "Output only. Appliance last installed update bundle version. This is the version of the automatically updatable components on the appliance.", +"readOnly": true, +"type": "string" +}, +"availableVersions": { +"$ref": "AvailableUpdates", +"description": "Output only. The available versions for updating this appliance.", +"readOnly": true +}, +"bucket": { +"description": "Output only. The communication channel between the datacenter connector and Google Cloud.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the connector was created (as an API call, not when it was actually installed).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Datacenter Connector in case of an error.", +"readOnly": true +}, +"name": { +"description": "Output only. The connector's name.", +"readOnly": true, +"type": "string" +}, +"registrationId": { +"description": "Immutable. A unique key for this connector. This key is internal to the OVA connector and is supplied with its creation during the registration process and can not be modified.", +"type": "string" +}, +"serviceAccount": { +"description": "The service account to use in the connector when communicating with the cloud.", +"type": "string" +}, +"state": { +"description": "Output only. State of the DatacenterConnector, as determined by the health checks.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"OFFLINE", +"FAILED", +"ACTIVE" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The state was not sampled by the health checks yet.", +"The source was sampled by health checks and is not available.", +"The source is available but might not be usable yet due to unvalidated credentials or another reason. The credentials referred to are the ones to the Source. The error message will contain further details.", +"The source exists and its credentials were verified." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last set.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time the connector was updated with an API call.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"upgradeStatus": { +"$ref": "UpgradeStatus", +"description": "Output only. The status of the current / last upgradeAppliance operation.", +"readOnly": true +}, +"version": { +"description": "The version running in the DatacenterConnector. This is supplied by the OVA connector during the registration process and can not be modified.", +"type": "string" +} +}, +"type": "object" +}, +"Disk": { +"description": "A message describing a data disk.", +"id": "Disk", +"properties": { +"lun": { +"description": "The disk's Logical Unit Number (LUN).", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The disk name.", +"type": "string" +}, +"sizeGb": { +"description": "The disk size in GB.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"DiskImageDefaults": { +"description": "Contains details about the image source used to create the disk.", +"id": "DiskImageDefaults", +"properties": { +"sourceImage": { +"description": "Required. The Image resource used when creating the disk.", +"type": "string" +} +}, +"type": "object" +}, +"DiskImageTargetDetails": { +"description": "The target details of the image resource that will be created by the import job.", +"id": "DiskImageTargetDetails", +"properties": { +"additionalLicenses": { +"description": "Optional. Additional licenses to assign to the image.", +"items": { +"type": "string" +}, +"type": "array" +}, +"dataDiskImageImport": { +"$ref": "DataDiskImageImport", +"description": "Optional. Use to skip OS adaptation process." +}, +"description": { +"description": "Optional. An optional description of the image.", +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Immutable. The encryption to apply to the image." +}, +"familyName": { +"description": "Optional. The name of the image family to which the new image belongs.", +"type": "string" +}, +"imageName": { +"description": "Required. The name of the image to be created.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. A map of labels to associate with the image.", +"type": "object" +}, +"osAdaptationParameters": { +"$ref": "ImageImportOsAdaptationParameters", +"description": "Optional. Use to set the parameters relevant for the OS adaptation process." +}, +"singleRegionStorage": { +"description": "Optional. Set to true to set the image storageLocations to the single region of the import job. When false, the closest multi-region is selected.", +"type": "boolean" +}, +"targetProject": { +"description": "Required. Reference to the TargetProject resource that represents the target project in which the imported image will be created.", +"type": "string" +} +}, +"type": "object" +}, +"DisksMigrationDisksTargetDefaults": { +"description": "Details for a disk only migration.", +"id": "DisksMigrationDisksTargetDefaults", +"properties": {}, +"type": "object" +}, +"DisksMigrationDisksTargetDetails": { +"description": "Details for a disks-only migration.", +"id": "DisksMigrationDisksTargetDetails", +"properties": {}, +"type": "object" +}, +"DisksMigrationVmTargetDefaults": { +"description": "Details for creation of a VM that migrated data disks will be attached to.", +"id": "DisksMigrationVmTargetDefaults", +"properties": { +"additionalLicenses": { +"description": "Optional. Additional licenses to assign to the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"bootDiskDefaults": { +"$ref": "BootDiskDefaults", +"description": "Optional. Details of the boot disk of the VM." +}, +"computeScheduling": { +"$ref": "ComputeScheduling", +"description": "Optional. Compute instance scheduling information (if empty default is used)." +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the VM." +}, +"hostname": { +"description": "Optional. The hostname to assign to the VM.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. A map of labels to associate with the VM.", +"type": "object" +}, +"machineType": { +"description": "Required. The machine type to create the VM with.", +"type": "string" +}, +"machineTypeSeries": { +"description": "Optional. The machine type series to create the VM with. For presentation only.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The metadata key/value pairs to assign to the VM.", +"type": "object" +}, +"networkInterfaces": { +"description": "Optional. NICs to attach to the VM.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"networkTags": { +"description": "Optional. A list of network tags to associate with the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"secureBoot": { +"description": "Optional. Defines whether the instance has Secure Boot enabled. This can be set to true only if the VM boot option is EFI.", +"type": "boolean" +}, +"serviceAccount": { +"description": "Optional. The service account to associate the VM with.", +"type": "string" +}, +"vmName": { +"description": "Required. The name of the VM to create.", +"type": "string" +} +}, +"type": "object" +}, +"DisksMigrationVmTargetDetails": { +"description": "Details for the VM created VM as part of disks migration.", +"id": "DisksMigrationVmTargetDetails", +"properties": { +"vmUri": { +"description": "Output only. The URI of the Compute Engine VM.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Encryption": { +"description": "Encryption message describes the details of the applied encryption.", +"id": "Encryption", +"properties": { +"kmsKey": { +"description": "Required. The name of the encryption key that is stored in Google Cloud KMS.", +"type": "string" +} +}, +"type": "object" +}, +"FetchInventoryResponse": { +"description": "Response message for fetchInventory.", +"id": "FetchInventoryResponse", +"properties": { +"awsVms": { +"$ref": "AwsVmsDetails", +"description": "The description of the VMs in a Source of type AWS." +}, +"azureVms": { +"$ref": "AzureVmsDetails", +"description": "The description of the VMs in a Source of type Azure." +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The timestamp when the source was last queried (if the result is from the cache).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareVms": { +"$ref": "VmwareVmsDetails", +"description": "The description of the VMs in a Source of type Vmware." +} +}, +"type": "object" +}, +"FinalizeMigrationRequest": { +"description": "Request message for 'FinalizeMigration' request.", +"id": "FinalizeMigrationRequest", +"properties": {}, +"type": "object" +}, +"Group": { +"description": "Describes message for 'Group' resource. The Group is a collections of several MigratingVms.", +"id": "Group", +"properties": { +"createTime": { +"description": "Output only. The create time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description of the group.", +"type": "string" +}, +"displayName": { +"description": "Display name is a user defined name for this group which can be updated.", +"type": "string" +}, +"migrationTargetType": { +"description": "Immutable. The target type of this group.", +"enum": [ +"MIGRATION_TARGET_TYPE_UNSPECIFIED", +"MIGRATION_TARGET_TYPE_GCE", +"MIGRATION_TARGET_TYPE_DISKS" +], +"enumDescriptions": [ +"Group type is not specified. This defaults to Compute Engine targets.", +"All MigratingVMs in the group must have Compute Engine targets.", +"All MigratingVMs in the group must have Compute Engine Disks targets." +], +"type": "string" +}, +"name": { +"description": "Output only. The Group name.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The update time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ImageImport": { +"description": "ImageImport describes the configuration of the image import to run.", +"id": "ImageImport", +"properties": { +"cloudStorageUri": { +"description": "Immutable. The path to the Cloud Storage file from which the image should be imported.", +"type": "string" +}, +"createTime": { +"description": "Output only. The time the image import was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"diskImageTargetDefaults": { +"$ref": "DiskImageTargetDetails", +"description": "Immutable. Target details for importing a disk image, will be used by ImageImportJob." +}, +"encryption": { +"$ref": "Encryption", +"description": "Immutable. The encryption details used by the image import process during the image adaptation for Compute Engine." +}, +"name": { +"description": "Output only. The resource path of the ImageImport.", +"readOnly": true, +"type": "string" +}, +"recentImageImportJobs": { +"description": "Output only. The result of the most recent runs for this ImageImport. All jobs for this ImageImport can be listed via ListImageImportJobs.", +"items": { +"$ref": "ImageImportJob" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ImageImportJob": { +"description": "ImageImportJob describes the progress and result of an image import.", +"id": "ImageImportJob", +"properties": { +"cloudStorageUri": { +"description": "Output only. The path to the Cloud Storage file from which the image should be imported.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the image import was created (as an API call, not when it was actually created in the target).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"createdResources": { +"description": "Output only. The resource paths of the resources created by the image import job.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"diskImageTargetDetails": { +"$ref": "DiskImageTargetDetails", +"description": "Output only. Target details used to import a disk image.", +"readOnly": true +}, +"endTime": { +"description": "Output only. The time the image import was ended.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"errors": { +"description": "Output only. Provides details on the error that led to the image import state in case of an error.", +"items": { +"$ref": "Status" +}, +"readOnly": true, +"type": "array" +}, +"name": { +"description": "Output only. The resource path of the ImageImportJob.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the image import.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"RUNNING", +"SUCCEEDED", +"FAILED", +"CANCELLING", +"CANCELLED" +], +"enumDescriptions": [ +"The state is unknown.", +"The image import has not yet started.", +"The image import is active and running.", +"The image import has finished successfully.", +"The image import has finished with errors.", +"The image import is being cancelled.", +"The image import was cancelled." +], +"readOnly": true, +"type": "string" +}, +"steps": { +"description": "Output only. The image import steps list representing its progress.", +"items": { +"$ref": "ImageImportStep" +}, +"readOnly": true, +"type": "array" +}, +"warnings": { +"description": "Output only. Warnings that occurred during the image import.", +"items": { +"$ref": "MigrationWarning" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ImageImportOsAdaptationParameters": { +"description": "Parameters affecting the OS adaptation process.", +"id": "ImageImportOsAdaptationParameters", +"properties": { +"generalize": { +"description": "Optional. Set to true in order to generalize the imported image. The generalization process enables co-existence of multiple VMs created from the same image. For Windows, generalizing the image removes computer-specific information such as installed drivers and the computer security identifier (SID).", +"type": "boolean" +}, +"licenseType": { +"description": "Optional. Choose which type of license to apply to the imported image.", +"enum": [ +"COMPUTE_ENGINE_LICENSE_TYPE_DEFAULT", +"COMPUTE_ENGINE_LICENSE_TYPE_PAYG", +"COMPUTE_ENGINE_LICENSE_TYPE_BYOL" +], +"enumDescriptions": [ +"The license type is the default for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +} +}, +"type": "object" +}, +"ImageImportStep": { +"description": "ImageImportStep holds information about the image import step progress.", +"id": "ImageImportStep", +"properties": { +"adaptingOs": { +"$ref": "AdaptingOSStep", +"description": "Adapting OS step." +}, +"creatingImage": { +"$ref": "CreatingImageStep", +"description": "Creating image step." +}, +"endTime": { +"description": "Output only. The time the step has ended.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"initializing": { +"$ref": "InitializingImageImportStep", +"description": "Initializing step." +}, +"loadingSourceFiles": { +"$ref": "LoadingImageSourceFilesStep", +"description": "Loading source files step." +}, +"startTime": { +"description": "Output only. The time the step has started.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"InitializingImageImportStep": { +"description": "InitializingImageImportStep contains specific step details.", +"id": "InitializingImageImportStep", +"properties": {}, +"type": "object" +}, +"InitializingReplicationStep": { +"description": "InitializingReplicationStep contains specific step details.", +"id": "InitializingReplicationStep", +"properties": {}, +"type": "object" +}, +"InstantiatingMigratedVMStep": { +"description": "InstantiatingMigratedVMStep contains specific step details.", +"id": "InstantiatingMigratedVMStep", +"properties": {}, +"type": "object" +}, +"Link": { +"description": "Describes a URL link.", +"id": "Link", +"properties": { +"description": { +"description": "Describes what the link offers.", +"type": "string" +}, +"url": { +"description": "The URL of the link.", +"type": "string" +} +}, +"type": "object" +}, +"ListCloneJobsResponse": { +"description": "Response message for 'ListCloneJobs' request.", +"id": "ListCloneJobsResponse", +"properties": { +"cloneJobs": { +"description": "Output only. The list of clone jobs response.", +"items": { +"$ref": "CloneJob" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListCutoverJobsResponse": { +"description": "Response message for 'ListCutoverJobs' request.", +"id": "ListCutoverJobsResponse", +"properties": { +"cutoverJobs": { +"description": "Output only. The list of cutover jobs response.", +"items": { +"$ref": "CutoverJob" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListDatacenterConnectorsResponse": { +"description": "Response message for 'ListDatacenterConnectors' request.", +"id": "ListDatacenterConnectorsResponse", +"properties": { +"datacenterConnectors": { +"description": "Output only. The list of sources response.", +"items": { +"$ref": "DatacenterConnector" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListGroupsResponse": { +"description": "Response message for 'ListGroups' request.", +"id": "ListGroupsResponse", +"properties": { +"groups": { +"description": "Output only. The list of groups response.", +"items": { +"$ref": "Group" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListImageImportJobsResponse": { +"description": "Response message for 'ListImageImportJobs' call.", +"id": "ListImageImportJobsResponse", +"properties": { +"imageImportJobs": { +"description": "Output only. The list of target response.", +"items": { +"$ref": "ImageImportJob" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListImageImportsResponse": { +"description": "Response message for 'ListImageImports' call.", +"id": "ListImageImportsResponse", +"properties": { +"imageImports": { +"description": "Output only. The list of target response.", +"items": { +"$ref": "ImageImport" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListMigratingVmsResponse": { +"description": "Response message for 'ListMigratingVms' request.", +"id": "ListMigratingVmsResponse", +"properties": { +"migratingVms": { +"description": "Output only. The list of Migrating VMs response.", +"items": { +"$ref": "MigratingVm" +}, +"readOnly": true, +"type": "array" +}, +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListReplicationCyclesResponse": { +"description": "Response message for 'ListReplicationCycles' request.", +"id": "ListReplicationCyclesResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"replicationCycles": { +"description": "Output only. The list of replication cycles response.", +"items": { +"$ref": "ReplicationCycle" +}, +"readOnly": true, +"type": "array" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListSourcesResponse": { +"description": "Response message for 'ListSources' request.", +"id": "ListSourcesResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"sources": { +"description": "Output only. The list of sources response.", +"items": { +"$ref": "Source" +}, +"readOnly": true, +"type": "array" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListTargetProjectsResponse": { +"description": "Response message for 'ListTargetProjects' call.", +"id": "ListTargetProjectsResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"targetProjects": { +"description": "Output only. The list of target response.", +"items": { +"$ref": "TargetProject" +}, +"readOnly": true, +"type": "array" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ListUtilizationReportsResponse": { +"description": "Response message for 'ListUtilizationReports' request.", +"id": "ListUtilizationReportsResponse", +"properties": { +"nextPageToken": { +"description": "Output only. A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"readOnly": true, +"type": "string" +}, +"unreachable": { +"description": "Output only. Locations that could not be reached.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"utilizationReports": { +"description": "Output only. The list of reports.", +"items": { +"$ref": "UtilizationReport" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"LoadingImageSourceFilesStep": { +"description": "LoadingImageSourceFilesStep contains specific step details.", +"id": "LoadingImageSourceFilesStep", +"properties": {}, +"type": "object" +}, +"LocalizedMessage": { +"description": "Provides a localized error message that is safe to return to the user which can be attached to an RPC error.", +"id": "LocalizedMessage", +"properties": { +"locale": { +"description": "The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: \"en-US\", \"fr-CH\", \"es-MX\"", +"type": "string" +}, +"message": { +"description": "The localized error message in the above locale.", +"type": "string" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"MigratingVm": { +"description": "MigratingVm describes the VM that will be migrated from a Source environment and its replication state.", +"id": "MigratingVm", +"properties": { +"awsSourceVmDetails": { +"$ref": "AwsSourceVmDetails", +"description": "Output only. Details of the VM from an AWS source.", +"readOnly": true +}, +"azureSourceVmDetails": { +"$ref": "AzureSourceVmDetails", +"description": "Output only. Details of the VM from an Azure source.", +"readOnly": true +}, +"computeEngineDisksTargetDefaults": { +"$ref": "ComputeEngineDisksTargetDefaults", +"description": "Details of the target Persistent Disks in Compute Engine." +}, +"computeEngineTargetDefaults": { +"$ref": "ComputeEngineTargetDefaults", +"description": "Details of the target VM in Compute Engine." +}, +"computeEngineVmDefaults": { +"$ref": "TargetVMDetails", +"deprecated": true, +"description": "Details of the VM in Compute Engine. Deprecated: Use compute_engine_target_defaults instead." +}, +"createTime": { +"description": "Output only. The time the migrating VM was created (this refers to this resource and not to the time it was installed in the source).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"currentSyncInfo": { +"$ref": "ReplicationCycle", +"description": "Output only. Details of the current running replication cycle.", +"readOnly": true +}, +"cutoverForecast": { +"$ref": "CutoverForecast", +"description": "Output only. Provides details of future CutoverJobs of a MigratingVm. Set to empty when cutover forecast is unavailable.", +"readOnly": true +}, +"description": { +"description": "The description attached to the migrating VM by the user.", +"type": "string" +}, +"displayName": { +"description": "The display name attached to the MigratingVm by the user.", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the Migrating VM in case of an error in replication.", +"readOnly": true +}, +"group": { +"description": "Output only. The group this migrating vm is included in, if any. The group is represented by the full path of the appropriate Group resource.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels of the migrating VM.", +"type": "object" +}, +"lastReplicationCycle": { +"$ref": "ReplicationCycle", +"description": "Output only. Details of the last replication cycle. This will be updated whenever a replication cycle is finished and is not to be confused with last_sync which is only updated on successful replication cycles.", +"readOnly": true +}, +"lastSync": { +"$ref": "ReplicationSync", +"description": "Output only. The most updated snapshot created time in the source that finished replication.", +"readOnly": true +}, +"name": { +"description": "Output only. The identifier of the MigratingVm.", +"readOnly": true, +"type": "string" +}, +"policy": { +"$ref": "SchedulePolicy", +"description": "The replication schedule policy." +}, +"recentCloneJobs": { +"description": "Output only. The recent clone jobs performed on the migrating VM. This field holds the vm's last completed clone job and the vm's running clone job, if one exists. Note: To have this field populated you need to explicitly request it via the \"view\" parameter of the Get/List request.", +"items": { +"$ref": "CloneJob" +}, +"readOnly": true, +"type": "array" +}, +"recentCutoverJobs": { +"description": "Output only. The recent cutover jobs performed on the migrating VM. This field holds the vm's last completed cutover job and the vm's running cutover job, if one exists. Note: To have this field populated you need to explicitly request it via the \"view\" parameter of the Get/List request.", +"items": { +"$ref": "CutoverJob" +}, +"readOnly": true, +"type": "array" +}, +"sourceVmId": { +"description": "The unique ID of the VM in the source. The VM's name in vSphere can be changed, so this is not the VM's name but rather its moRef id. This id is of the form vm-.", +"type": "string" +}, +"state": { +"description": "Output only. State of the MigratingVm.", +"enum": [ +"STATE_UNSPECIFIED", +"PENDING", +"READY", +"FIRST_SYNC", +"ACTIVE", +"CUTTING_OVER", +"CUTOVER", +"FINAL_SYNC", +"PAUSED", +"FINALIZING", +"FINALIZED", +"ERROR" +], +"enumDescriptions": [ +"The state was not sampled by the health checks yet.", +"The VM in the source is being verified.", +"The source VM was verified, and it's ready to start replication.", +"Migration is going through the first sync cycle.", +"The replication is active, and it's running or scheduled to run.", +"The source VM is being turned off, and a final replication is currently running.", +"The source VM was stopped and replicated. The replication is currently paused.", +"A cutover job is active and replication cycle is running the final sync.", +"The replication was paused by the user and no cycles are scheduled to run.", +"The migrating VM is being finalized and migration resources are being removed.", +"The replication process is done. The migrating VM is finalized and no longer consumes billable resources.", +"The replication process encountered an unrecoverable error and was aborted." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The last time the migrating VM state was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"targetDefaults": { +"$ref": "TargetVMDetails", +"deprecated": true, +"description": "The default configuration of the target VM that will be created in Google Cloud as a result of the migration. Deprecated: Use compute_engine_target_defaults instead." +}, +"updateTime": { +"description": "Output only. The last time the migrating VM resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareSourceVmDetails": { +"$ref": "VmwareSourceVmDetails", +"description": "Output only. Details of the VM from a Vmware source.", +"readOnly": true +} +}, +"type": "object" +}, +"MigrationError": { +"description": "Represents migration resource error information that can be used with google.rpc.Status message. MigrationError is used to present the user with error information in migration operations.", +"id": "MigrationError", +"properties": { +"actionItem": { +"$ref": "LocalizedMessage", +"description": "Output only. Suggested action for solving the error.", +"readOnly": true +}, +"code": { +"description": "Output only. The error code.", +"enum": [ +"ERROR_CODE_UNSPECIFIED", +"UNKNOWN_ERROR", +"SOURCE_VALIDATION_ERROR", +"SOURCE_REPLICATION_ERROR", +"TARGET_REPLICATION_ERROR", +"OS_ADAPTATION_ERROR", +"CLONE_ERROR", +"CUTOVER_ERROR", +"UTILIZATION_REPORT_ERROR", +"APPLIANCE_UPGRADE_ERROR", +"IMAGE_IMPORT_ERROR" +], +"enumDescriptions": [ +"Default value. This value is not used.", +"Migrate to Virtual Machines encountered an unknown error.", +"Migrate to Virtual Machines encountered an error while validating replication source health.", +"Migrate to Virtual Machines encountered an error during source data operation.", +"Migrate to Virtual Machines encountered an error during target data operation.", +"Migrate to Virtual Machines encountered an error during OS adaptation.", +"Migrate to Virtual Machines encountered an error in clone operation.", +"Migrate to Virtual Machines encountered an error in cutover operation.", +"Migrate to Virtual Machines encountered an error during utilization report creation.", +"Migrate to Virtual Machines encountered an error during appliance upgrade.", +"Migrate to Virtual Machines encountered an error in image import operation." +], +"readOnly": true, +"type": "string" +}, +"errorMessage": { +"$ref": "LocalizedMessage", +"description": "Output only. The localized error message.", +"readOnly": true +}, +"errorTime": { +"description": "Output only. The time the error occurred.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"helpLinks": { +"description": "Output only. URL(s) pointing to additional information on handling the current error.", +"items": { +"$ref": "Link" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"MigrationWarning": { +"description": "Represents migration resource warning information that can be used with google.rpc.Status message. MigrationWarning is used to present the user with warning information in migration operations.", +"id": "MigrationWarning", +"properties": { +"actionItem": { +"$ref": "LocalizedMessage", +"description": "Suggested action for solving the warning." +}, +"code": { +"description": "The warning code.", +"enum": [ +"WARNING_CODE_UNSPECIFIED", +"ADAPTATION_WARNING" +], +"enumDescriptions": [ +"Default value. This value is not used.", +"A warning originated from OS Adaptation." +], +"type": "string" +}, +"helpLinks": { +"description": "URL(s) pointing to additional information on handling the current warning.", +"items": { +"$ref": "Link" +}, +"type": "array" +}, +"warningMessage": { +"$ref": "LocalizedMessage", +"description": "The localized warning message." +}, +"warningTime": { +"description": "The time the warning occurred.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"NetworkInterface": { +"description": "NetworkInterface represents a NIC of a VM.", +"id": "NetworkInterface", +"properties": { +"externalIp": { +"description": "The external IP to define in the NIC.", +"type": "string" +}, +"internalIp": { +"description": "The internal IP to define in the NIC. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path.", +"type": "string" +}, +"network": { +"description": "The network to connect the NIC to.", +"type": "string" +}, +"subnetwork": { +"description": "The subnetwork to connect the NIC to.", +"type": "string" +} +}, +"type": "object" +}, +"OSDescription": { +"description": "A message describing the VM's OS. Including OS, Publisher, Offer and Plan if applicable.", +"id": "OSDescription", +"properties": { +"offer": { +"description": "OS offer.", +"type": "string" +}, +"plan": { +"description": "OS plan.", +"type": "string" +}, +"publisher": { +"description": "OS publisher.", +"type": "string" +}, +"type": { +"description": "OS type.", +"type": "string" +} +}, +"type": "object" +}, +"OSDisk": { +"description": "A message describing the OS disk.", +"id": "OSDisk", +"properties": { +"name": { +"description": "The disk's full name.", +"type": "string" +}, +"sizeGb": { +"description": "The disk's size in GB.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "The disk's type.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PauseMigrationRequest": { +"description": "Request message for 'PauseMigration' request.", +"id": "PauseMigrationRequest", +"properties": {}, +"type": "object" +}, +"PersistentDisk": { +"description": "Details of a created Persistent Disk.", +"id": "PersistentDisk", +"properties": { +"diskUri": { +"description": "The URI of the Persistent Disk.", +"type": "string" +}, +"sourceDiskNumber": { +"description": "The ordinal number of the source VM disk.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PersistentDiskDefaults": { +"description": "Details for creation of a Persistent Disk.", +"id": "PersistentDiskDefaults", +"properties": { +"additionalLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of labels to associate with the Persistent Disk.", +"type": "object" +}, +"diskName": { +"description": "Optional. The name of the Persistent Disk to create.", +"type": "string" +}, +"diskType": { +"description": "The disk type to use.", +"enum": [ +"COMPUTE_ENGINE_DISK_TYPE_UNSPECIFIED", +"COMPUTE_ENGINE_DISK_TYPE_STANDARD", +"COMPUTE_ENGINE_DISK_TYPE_SSD", +"COMPUTE_ENGINE_DISK_TYPE_BALANCED" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"SSD hard disk type.", +"An alternative to SSD persistent disks that balance performance and cost." +], +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. The encryption to apply to the disk." +}, +"sourceDiskNumber": { +"description": "Required. The ordinal number of the source VM disk.", +"format": "int32", +"type": "integer" +}, +"vmAttachmentDetails": { +"$ref": "VmAttachmentDetails", +"description": "Optional. Details for attachment of the disk to a VM. Used when the disk is set to be attacked to a target VM." +} +}, +"type": "object" +}, +"PostProcessingStep": { +"description": "PostProcessingStep contains specific step details.", +"id": "PostProcessingStep", +"properties": {}, +"type": "object" +}, +"PreparingVMDisksStep": { +"description": "PreparingVMDisksStep contains specific step details.", +"id": "PreparingVMDisksStep", +"properties": {}, +"type": "object" +}, +"RemoveGroupMigrationRequest": { +"description": "Request message for 'RemoveMigration' request.", +"id": "RemoveGroupMigrationRequest", +"properties": { +"migratingVm": { +"description": "The MigratingVm to remove.", +"type": "string" +} +}, +"type": "object" +}, +"ReplicatingStep": { +"description": "ReplicatingStep contains specific step details.", +"id": "ReplicatingStep", +"properties": { +"lastThirtyMinutesAverageBytesPerSecond": { +"description": "The source disks replication rate for the last 30 minutes in bytes per second.", +"format": "int64", +"type": "string" +}, +"lastTwoMinutesAverageBytesPerSecond": { +"description": "The source disks replication rate for the last 2 minutes in bytes per second.", +"format": "int64", +"type": "string" +}, +"replicatedBytes": { +"description": "Replicated bytes in the step.", +"format": "int64", +"type": "string" +}, +"totalBytes": { +"description": "Total bytes to be handled in the step.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"ReplicationCycle": { +"description": "ReplicationCycle contains information about the current replication cycle status.", +"id": "ReplicationCycle", +"properties": { +"cycleNumber": { +"description": "The cycle's ordinal number.", +"format": "int32", +"type": "integer" +}, +"endTime": { +"description": "The time the replication cycle has ended.", +"format": "google-datetime", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Provides details on the state of the cycle in case of an error." +}, +"name": { +"description": "The identifier of the ReplicationCycle.", +"type": "string" +}, +"progress": { +"deprecated": true, +"description": "The current progress in percentage of this cycle.", +"format": "int32", +"type": "integer" +}, +"progressPercent": { +"deprecated": true, +"description": "The current progress in percentage of this cycle. Was replaced by 'steps' field, which breaks down the cycle progression more accurately.", +"format": "int32", +"type": "integer" +}, +"startTime": { +"description": "The time the replication cycle has started.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "State of the ReplicationCycle.", +"enum": [ +"STATE_UNSPECIFIED", +"RUNNING", +"PAUSED", +"FAILED", +"SUCCEEDED" +], +"enumDescriptions": [ +"The state is unknown. This is used for API compatibility only and is not used by the system.", +"The replication cycle is running.", +"The replication cycle is paused.", +"The replication cycle finished with errors.", +"The replication cycle finished successfully." +], +"type": "string" +}, +"steps": { +"description": "The cycle's steps list representing its progress.", +"items": { +"$ref": "CycleStep" +}, +"type": "array" +}, +"totalPauseDuration": { +"description": "The accumulated duration the replication cycle was paused.", +"format": "google-duration", +"type": "string" +}, +"warnings": { +"description": "Output only. Warnings that occurred during the cycle.", +"items": { +"$ref": "MigrationWarning" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"ReplicationSync": { +"description": "ReplicationSync contain information about the last replica sync to the cloud.", +"id": "ReplicationSync", +"properties": { +"lastSyncTime": { +"description": "The most updated snapshot created time in the source that finished replication.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"ResumeMigrationRequest": { +"description": "Request message for 'ResumeMigration' request.", +"id": "ResumeMigrationRequest", +"properties": {}, +"type": "object" +}, +"SchedulePolicy": { +"description": "A policy for scheduling replications.", +"id": "SchedulePolicy", +"properties": { +"idleDuration": { +"description": "The idle duration between replication stages.", +"format": "google-duration", +"type": "string" +}, +"skipOsAdaptation": { +"description": "A flag to indicate whether to skip OS adaptation during the replication sync. OS adaptation is a process where the VM's operating system undergoes changes and adaptations to fully function on Compute Engine.", +"type": "boolean" +} +}, +"type": "object" +}, +"SchedulingNodeAffinity": { +"description": "Node Affinity: the configuration of desired nodes onto which this Instance could be scheduled. Based on https://cloud.google.com/compute/docs/reference/rest/v1/instances/setScheduling", +"id": "SchedulingNodeAffinity", +"properties": { +"key": { +"description": "The label key of Node resource to reference.", +"type": "string" +}, +"operator": { +"description": "The operator to use for the node resources specified in the `values` parameter.", +"enum": [ +"OPERATOR_UNSPECIFIED", +"IN", +"NOT_IN" +], +"enumDescriptions": [ +"An unknown, unexpected behavior.", +"The node resource group should be in these resources affinity.", +"The node resource group should not be in these resources affinity." +], +"type": "string" +}, +"values": { +"description": "Corresponds to the label values of Node resource.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ShuttingDownSourceVMStep": { +"description": "ShuttingDownSourceVMStep contains specific step details.", +"id": "ShuttingDownSourceVMStep", +"properties": {}, +"type": "object" +}, +"Source": { +"description": "Source message describes a specific vm migration Source resource. It contains the source environment information.", +"id": "Source", +"properties": { +"aws": { +"$ref": "AwsSourceDetails", +"description": "AWS type source details." +}, +"azure": { +"$ref": "AzureSourceDetails", +"description": "Azure type source details." +}, +"createTime": { +"description": "Output only. The create time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description of the source.", +"type": "string" +}, +"encryption": { +"$ref": "Encryption", +"description": "Optional. Immutable. The encryption details of the source data stored by the service." +}, +"error": { +"$ref": "Status", +"deprecated": true, +"description": "Output only. Provides details on the state of the Source in case of an error.", +"readOnly": true +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "The labels of the source.", +"type": "object" +}, +"name": { +"description": "Output only. The Source name.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The update time timestamp.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmware": { +"$ref": "VmwareSourceDetails", +"description": "Vmware type source details." +} +}, +"type": "object" +}, +"StartMigrationRequest": { +"description": "Request message for 'StartMigrationRequest' request.", +"id": "StartMigrationRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Tag": { +"description": "Tag is an AWS tag representation.", +"id": "Tag", +"properties": { +"key": { +"description": "Key of tag.", +"type": "string" +}, +"value": { +"description": "Value of tag.", +"type": "string" +} +}, +"type": "object" +}, +"TargetProject": { +"description": "TargetProject message represents a target Compute Engine project for a migration or a clone.", +"id": "TargetProject", +"properties": { +"createTime": { +"description": "Output only. The time this target project resource was created (not related to when the Compute Engine project it points to was created).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "The target project's description.", +"type": "string" +}, +"name": { +"description": "Output only. The name of the target project.", +"readOnly": true, +"type": "string" +}, +"project": { +"description": "Required. The target project ID (number) or project name.", +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time the target project resource was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"TargetVMDetails": { +"deprecated": true, +"description": "TargetVMDetails is a collection of details for creating a VM in a target Compute Engine project.", +"id": "TargetVMDetails", +"properties": { +"appliedLicense": { +"$ref": "AppliedLicense", +"description": "Output only. The OS license returned from the adaptation module report.", +"readOnly": true +}, +"bootOption": { +"description": "Output only. The VM Boot Option, as set in the source VM.", +"enum": [ +"BOOT_OPTION_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is EFI.", +"The boot option is BIOS." +], +"readOnly": true, +"type": "string" +}, +"computeScheduling": { +"$ref": "ComputeScheduling", +"description": "Compute instance scheduling information (if empty default is used)." +}, +"diskType": { +"description": "The disk type to use in the VM.", +"enum": [ +"DISK_TYPE_UNSPECIFIED", +"STANDARD", +"BALANCED", +"SSD" +], +"enumDescriptions": [ +"An unspecified disk type. Will be used as STANDARD.", +"A Standard disk type.", +"An alternative to SSD persistent disks that balance performance and cost.", +"SSD hard disk type." +], +"type": "string" +}, +"externalIp": { +"description": "The external IP to define in the VM.", +"type": "string" +}, +"internalIp": { +"description": "The internal IP to define in the VM. The formats accepted are: `ephemeral` \\ ipv4 address \\ a named address resource full path.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "A map of labels to associate with the VM.", +"type": "object" +}, +"licenseType": { +"description": "The license type to use in OS adaptation.", +"enum": [ +"DEFAULT", +"PAYG", +"BYOL" +], +"enumDescriptions": [ +"The license type is the default for the OS.", +"The license type is Pay As You Go license type.", +"The license type is Bring Your Own License type." +], +"type": "string" +}, +"machineType": { +"description": "The machine type to create the VM with.", +"type": "string" +}, +"machineTypeSeries": { +"description": "The machine type series to create the VM with.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"type": "string" +}, +"description": "The metadata key/value pairs to assign to the VM.", +"type": "object" +}, +"name": { +"description": "The name of the VM to create.", +"type": "string" +}, +"network": { +"description": "The network to connect the VM to.", +"type": "string" +}, +"networkInterfaces": { +"description": "List of NICs connected to this VM.", +"items": { +"$ref": "NetworkInterface" +}, +"type": "array" +}, +"networkTags": { +"description": "A list of network tags to associate with the VM.", +"items": { +"type": "string" +}, +"type": "array" +}, +"project": { +"deprecated": true, +"description": "Output only. The project in which to create the VM.", +"readOnly": true, +"type": "string" +}, +"secureBoot": { +"description": "Defines whether the instance has Secure Boot enabled. This can be set to true only if the vm boot option is EFI.", +"type": "boolean" +}, +"serviceAccount": { +"description": "The service account to associate the VM with.", +"type": "string" +}, +"subnetwork": { +"description": "The subnetwork to connect the VM to.", +"type": "string" +}, +"targetProject": { +"description": "The full path of the resource of type TargetProject which represents the Compute Engine project in which to create this VM.", +"type": "string" +}, +"zone": { +"description": "The zone in which to create the VM.", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeApplianceRequest": { +"description": "Request message for 'UpgradeAppliance' request.", +"id": "UpgradeApplianceRequest", +"properties": { +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"UpgradeStatus": { +"description": "UpgradeStatus contains information about upgradeAppliance operation.", +"id": "UpgradeStatus", +"properties": { +"error": { +"$ref": "Status", +"description": "Provides details on the state of the upgrade operation in case of an error." +}, +"previousVersion": { +"description": "The version from which we upgraded.", +"type": "string" +}, +"startTime": { +"description": "The time the operation was started.", +"format": "google-datetime", +"type": "string" +}, +"state": { +"description": "The state of the upgradeAppliance operation.", +"enum": [ +"STATE_UNSPECIFIED", +"RUNNING", +"FAILED", +"SUCCEEDED" +], +"enumDescriptions": [ +"The state was not sampled by the health checks yet.", +"The upgrade has started.", +"The upgrade failed.", +"The upgrade finished successfully." +], +"type": "string" +}, +"version": { +"description": "The version to upgrade to.", +"type": "string" +} +}, +"type": "object" +}, +"UtilizationReport": { +"description": "Utilization report details the utilization (CPU, memory, etc.) of selected source VMs.", +"id": "UtilizationReport", +"properties": { +"createTime": { +"description": "Output only. The time the report was created (this refers to the time of the request, not the time the report creation completed).", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "The report display name, as assigned by the user.", +"type": "string" +}, +"error": { +"$ref": "Status", +"description": "Output only. Provides details on the state of the report in case of an error.", +"readOnly": true +}, +"frameEndTime": { +"description": "Output only. The point in time when the time frame ends. Notice that the time frame is counted backwards. For instance if the \"frame_end_time\" value is 2021/01/20 and the time frame is WEEK then the report covers the week between 2021/01/20 and 2021/01/14.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The report unique name.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. Current state of the report.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"The state is unknown. This value is not in use.", +"The report is in the making.", +"Report creation completed successfully.", +"Report creation failed." +], +"readOnly": true, +"type": "string" +}, +"stateTime": { +"description": "Output only. The time the state was last set.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"timeFrame": { +"description": "Time frame of the report.", +"enum": [ +"TIME_FRAME_UNSPECIFIED", +"WEEK", +"MONTH", +"YEAR" +], +"enumDescriptions": [ +"The time frame was not specified and will default to WEEK.", +"One week.", +"One month.", +"One year." +], +"type": "string" +}, +"vmCount": { +"description": "Output only. Total number of VMs included in the report.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"vms": { +"description": "List of utilization information per VM. When sent as part of the request, the \"vm_id\" field is used in order to specify which VMs to include in the report. In that case all other fields are ignored.", +"items": { +"$ref": "VmUtilizationInfo" +}, +"type": "array" +}, +"vmsCount": { +"deprecated": true, +"description": "Output only. Total number of VMs included in the report.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"VmAttachmentDetails": { +"description": "Details for attachment of the disk to a VM.", +"id": "VmAttachmentDetails", +"properties": { +"deviceName": { +"description": "Optional. Specifies a unique device name of your choice that is reflected into the /dev/disk/by-id/google-* tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk, in the form persistent-disk-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks.", +"type": "string" +} +}, +"type": "object" +}, +"VmCapabilities": { +"description": "Migrating VM source information about the VM capabilities needed for some Compute Engine features.", +"id": "VmCapabilities", +"properties": { +"lastOsCapabilitiesUpdateTime": { +"description": "Output only. The last time OS capabilities list was updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"osCapabilities": { +"description": "Output only. Unordered list. List of certain VM OS capabilities needed for some Compute Engine features.", +"items": { +"enum": [ +"OS_CAPABILITY_UNSPECIFIED", +"OS_CAPABILITY_NVME_STORAGE_ACCESS", +"OS_CAPABILITY_GVNIC_NETWORK_INTERFACE" +], +"enumDescriptions": [ +"This is for API compatibility only and is not in use.", +"NVMe driver installed and the VM can use NVMe PD or local SSD.", +"gVNIC virtual NIC driver supported." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"VmUtilizationInfo": { +"description": "Utilization information of a single VM.", +"id": "VmUtilizationInfo", +"properties": { +"utilization": { +"$ref": "VmUtilizationMetrics", +"description": "Utilization metrics for this VM." +}, +"vmId": { +"description": "The VM's ID in the source.", +"type": "string" +}, +"vmwareVmDetails": { +"$ref": "VmwareVmDetails", +"description": "The description of the VM in a Source of type Vmware." +} +}, +"type": "object" +}, +"VmUtilizationMetrics": { +"description": "Utilization metrics values for a single VM.", +"id": "VmUtilizationMetrics", +"properties": { +"cpuAverage": { +"deprecated": true, +"description": "Average CPU usage, percent.", +"format": "int32", +"type": "integer" +}, +"cpuAveragePercent": { +"description": "Average CPU usage, percent.", +"format": "int32", +"type": "integer" +}, +"cpuMax": { +"deprecated": true, +"description": "Max CPU usage, percent.", +"format": "int32", +"type": "integer" +}, +"cpuMaxPercent": { +"description": "Max CPU usage, percent.", +"format": "int32", +"type": "integer" +}, +"diskIoRateAverage": { +"deprecated": true, +"description": "Average disk IO rate, in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"diskIoRateAverageKbps": { +"description": "Average disk IO rate, in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"diskIoRateMax": { +"deprecated": true, +"description": "Max disk IO rate, in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"diskIoRateMaxKbps": { +"description": "Max disk IO rate, in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"memoryAverage": { +"deprecated": true, +"description": "Average memory usage, percent.", +"format": "int32", +"type": "integer" +}, +"memoryAveragePercent": { +"description": "Average memory usage, percent.", +"format": "int32", +"type": "integer" +}, +"memoryMax": { +"deprecated": true, +"description": "Max memory usage, percent.", +"format": "int32", +"type": "integer" +}, +"memoryMaxPercent": { +"description": "Max memory usage, percent.", +"format": "int32", +"type": "integer" +}, +"networkThroughputAverage": { +"deprecated": true, +"description": "Average network throughput (combined transmit-rates and receive-rates), in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"networkThroughputAverageKbps": { +"description": "Average network throughput (combined transmit-rates and receive-rates), in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"networkThroughputMax": { +"deprecated": true, +"description": "Max network throughput (combined transmit-rates and receive-rates), in kilobytes per second.", +"format": "int64", +"type": "string" +}, +"networkThroughputMaxKbps": { +"description": "Max network throughput (combined transmit-rates and receive-rates), in kilobytes per second.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"VmwareDiskDetails": { +"description": "The details of a Vmware VM disk.", +"id": "VmwareDiskDetails", +"properties": { +"diskNumber": { +"description": "The ordinal number of the disk.", +"format": "int32", +"type": "integer" +}, +"label": { +"description": "The disk label.", +"type": "string" +}, +"sizeGb": { +"description": "Size in GB.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"VmwareSourceDetails": { +"description": "VmwareSourceDetails message describes a specific source details for the vmware source type.", +"id": "VmwareSourceDetails", +"properties": { +"password": { +"description": "Input only. The credentials password. This is write only and can not be read in a GET operation.", +"type": "string" +}, +"resolvedVcenterHost": { +"description": "The hostname of the vcenter.", +"type": "string" +}, +"thumbprint": { +"description": "The thumbprint representing the certificate for the vcenter.", +"type": "string" +}, +"username": { +"description": "The credentials username.", +"type": "string" +}, +"vcenterIp": { +"description": "The ip address of the vcenter this Source represents.", +"type": "string" +} +}, +"type": "object" +}, +"VmwareSourceVmDetails": { +"description": "Represent the source Vmware VM details.", +"id": "VmwareSourceVmDetails", +"properties": { +"committedStorageBytes": { +"description": "The total size of the disks being migrated in bytes.", +"format": "int64", +"type": "string" +}, +"disks": { +"description": "The disks attached to the source VM.", +"items": { +"$ref": "VmwareDiskDetails" +}, +"type": "array" +}, +"firmware": { +"description": "The firmware type of the source VM.", +"enum": [ +"FIRMWARE_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The firmware is unknown.", +"The firmware is EFI.", +"The firmware is BIOS." +], +"type": "string" +}, +"vmCapabilitiesInfo": { +"$ref": "VmCapabilities", +"description": "Output only. Information about VM capabilities needed for some Compute Engine features.", +"readOnly": true +} +}, +"type": "object" +}, +"VmwareVmDetails": { +"description": "VmwareVmDetails describes a VM in vCenter.", +"id": "VmwareVmDetails", +"properties": { +"bootOption": { +"description": "Output only. The VM Boot Option.", +"enum": [ +"BOOT_OPTION_UNSPECIFIED", +"EFI", +"BIOS" +], +"enumDescriptions": [ +"The boot option is unknown.", +"The boot option is EFI.", +"The boot option is BIOS." +], +"readOnly": true, +"type": "string" +}, +"committedStorage": { +"deprecated": true, +"description": "The total size of the storage allocated to the VM in MB.", +"format": "int64", +"type": "string" +}, +"committedStorageMb": { +"description": "The total size of the storage allocated to the VM in MB.", +"format": "int64", +"type": "string" +}, +"cpuCount": { +"description": "The number of cpus in the VM.", +"format": "int32", +"type": "integer" +}, +"datacenterDescription": { +"description": "The descriptive name of the vCenter's datacenter this VM is contained in.", +"type": "string" +}, +"datacenterId": { +"description": "The id of the vCenter's datacenter this VM is contained in.", +"type": "string" +}, +"diskCount": { +"description": "The number of disks the VM has.", +"format": "int32", +"type": "integer" +}, +"displayName": { +"description": "The display name of the VM. Note that this is not necessarily unique.", +"type": "string" +}, +"guestDescription": { +"description": "The VM's OS. See for example https://vdc-repo.vmware.com/vmwb-repository/dcr-public/da47f910-60ac-438b-8b9b-6122f4d14524/16b7274a-bf8b-4b4c-a05e-746f2aa93c8c/doc/vim.vm.GuestOsDescriptor.GuestOsIdentifier.html for types of strings this might hold.", +"type": "string" +}, +"memoryMb": { +"description": "The size of the memory of the VM in MB.", +"format": "int32", +"type": "integer" +}, +"powerState": { +"description": "The power state of the VM at the moment list was taken.", +"enum": [ +"POWER_STATE_UNSPECIFIED", +"ON", +"OFF", +"SUSPENDED" +], +"enumDescriptions": [ +"Power state is not specified.", +"The VM is turned ON.", +"The VM is turned OFF.", +"The VM is suspended. This is similar to hibernation or sleep mode." +], +"type": "string" +}, +"uuid": { +"description": "The unique identifier of the VM in vCenter.", +"type": "string" +}, +"vmId": { +"description": "The VM's id in the source (note that this is not the MigratingVm's id). This is the moref id of the VM.", +"type": "string" +} +}, +"type": "object" +}, +"VmwareVmsDetails": { +"description": "VmwareVmsDetails describes VMs in vCenter.", +"id": "VmwareVmsDetails", +"properties": { +"details": { +"description": "The details of the vmware VMs.", +"items": { +"$ref": "VmwareVmDetails" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "VM Migration API", +"version": "v1alpha1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmwareengine.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmwareengine.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..1c67040362c4ce29e8fe1975744ad4cacf4b6ac2 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vmwareengine.v1.json @@ -0,0 +1,5538 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://vmwareengine.googleapis.com/", +"batchPath": "batch", +"canonicalName": "VMware Engine", +"description": "The Google VMware Engine API lets you programmatically manage VMware environments.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/solutions/vmware-as-a-service", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vmwareengine:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vmwareengine.mtls.googleapis.com/", +"name": "vmwareengine", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getDnsBindPermission": { +"description": "Gets all the principals having bind permission on the intranet VPC associated with the consumer project granted by the Grant API. DnsBindPermission is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dnsBindPermission", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.getDnsBindPermission", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/dnsBindPermission$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "DnsBindPermission" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"dnsBindPermission": { +"methods": { +"grant": { +"description": "Grants the bind permission to the customer provided principal(user / service account) to bind their DNS zone with the intranet VPC associated with the project. DnsBindPermission is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dnsBindPermission:grant", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.dnsBindPermission.grant", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/dnsBindPermission$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:grant", +"request": { +"$ref": "GrantDnsBindPermissionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"revoke": { +"description": "Revokes the bind permission from the customer provided principal(user / service account) on the intranet VPC associated with the consumer project. DnsBindPermission is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/dnsBindPermission:revoke", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.dnsBindPermission.revoke", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/dnsBindPermission$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:revoke", +"request": { +"$ref": "RevokeDnsBindPermissionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"networkPeerings": { +"methods": { +"create": { +"description": "Creates a new network peering between the peer network and VMware Engine network provided in a `NetworkPeering` resource. NetworkPeering is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPeerings", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.networkPeerings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"networkPeeringId": { +"description": "Required. The user-provided identifier of the new `NetworkPeering`. This identifier must be unique among `NetworkPeering` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location to create the new network peering in. This value is always `global`, because `NetworkPeering` is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/networkPeerings", +"request": { +"$ref": "NetworkPeering" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a `NetworkPeering` resource. When a network peering is deleted for a VMware Engine network, the peer network becomes inaccessible to that VMware Engine network. NetworkPeering is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPeerings/{networkPeeringsId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.networkPeerings.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the network peering to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPeerings/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a `NetworkPeering` resource by its resource name. The resource contains details of the network peering, such as peered networks, import and export custom route configurations, and peering state. NetworkPeering is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPeerings/{networkPeeringsId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPeerings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the network peering to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPeerings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "NetworkPeering" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `NetworkPeering` resources in a given project. NetworkPeering is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPeerings", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPeerings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of network peerings, you can exclude the ones named `example-peering` by specifying `name != \"example-peering\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-peering\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-peering-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-peering-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of network peerings to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListNetworkPeerings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPeerings` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location (global) to query for network peerings. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/networkPeerings", +"response": { +"$ref": "ListNetworkPeeringsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Modifies a `NetworkPeering` resource. Only the `description` field can be updated. Only fields specified in `updateMask` are applied. NetworkPeering is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPeerings/{networkPeeringsId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.networkPeerings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the network peering. NetworkPeering is a global resource and location can only be global. Resource names are scheme-less URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPeerings/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPeering` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "NetworkPeering" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"peeringRoutes": { +"methods": { +"list": { +"description": "Lists the network peering routes exchanged over a peering connection. NetworkPeering is a global resource and location can only be global.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPeerings/{networkPeeringsId}/peeringRoutes", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPeerings.peeringRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. Currently, only filtering on the `direction` field is supported. To return routes imported from the peer network, provide \"direction=INCOMING\". To return routes exported from the VMware Engine network, provide \"direction=OUTGOING\". Other filter expressions return an error.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of peering routes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListPeeringRoutes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPeeringRoutes` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the network peering to retrieve peering routes from. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPeerings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/peeringRoutes", +"response": { +"$ref": "ListPeeringRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"networkPolicies": { +"methods": { +"create": { +"description": "Creates a new network policy in a given VMware Engine network of a project and location (region). A new network policy cannot be created if another network policy already exists in the same scope.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.networkPolicies.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"networkPolicyId": { +"description": "Required. The user-provided identifier of the network policy to be created. This identifier must be unique within parent `projects/{my-project}/locations/{us-central1}/networkPolicies` and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location (region) to create the new network policy in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/networkPolicies", +"request": { +"$ref": "NetworkPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a `NetworkPolicy` resource. A network policy cannot be deleted when `NetworkService.state` is set to `RECONCILING` for either its external IP or internet access service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.networkPolicies.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the network policy to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"fetchExternalAddresses": { +"description": "Lists external IP addresses assigned to VMware workload VMs within the scope of the given network policy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}:fetchExternalAddresses", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPolicies.fetchExternalAddresses", +"parameterOrder": [ +"networkPolicy" +], +"parameters": { +"networkPolicy": { +"description": "Required. The resource name of the network policy to query for assigned external IP addresses. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of external IP addresses to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `FetchNetworkPolicyExternalAddresses` call. Provide this to retrieve the subsequent page. When paginating, all parameters provided to `FetchNetworkPolicyExternalAddresses`, except for `page_size` and `page_token`, must match the call that provided the page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+networkPolicy}:fetchExternalAddresses", +"response": { +"$ref": "FetchNetworkPolicyExternalAddressesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a `NetworkPolicy` resource by its resource name.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPolicies.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the network policy to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "NetworkPolicy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `NetworkPolicy` resources in a specified project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPolicies.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of network policies, you can exclude the ones named `example-policy` by specifying `name != \"example-policy\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-policy\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-policy-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-policy-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of network policies to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListNetworkPolicies` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNetworkPolicies` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location (region) to query for network policies. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/networkPolicies", +"response": { +"$ref": "ListNetworkPoliciesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Modifies a `NetworkPolicy` resource. Only the following fields can be updated: `internet_access`, `external_ip`, `edge_services_cidr`. Only fields specified in `updateMask` are applied. When updating a network policy, the external IP network service can only be disabled if there are no external IP addresses present in the scope of the policy. Also, a `NetworkService` cannot be updated when `NetworkService.state` is set to `RECONCILING`. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.networkPolicies.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `NetworkPolicy` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "NetworkPolicy" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"externalAccessRules": { +"methods": { +"create": { +"description": "Creates a new external access rule in a given network policy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"externalAccessRuleId": { +"description": "Required. The user-provided identifier of the `ExternalAccessRule` to be created. This identifier must be unique among `ExternalAccessRule` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the network policy to create a new external access firewall rule in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/externalAccessRules", +"request": { +"$ref": "ExternalAccessRule" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single external access rule.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the external access firewall rule to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single external access rule.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the external access firewall rule to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ExternalAccessRule" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `ExternalAccessRule` resources in the specified network policy.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of external access rules, you can exclude the ones named `example-rule` by specifying `name != \"example-rule\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-rule\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-rule-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-rule-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of external access rules to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListExternalAccessRulesRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExternalAccessRulesRequest` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the network policy to query for external access firewall rules. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/externalAccessRules", +"response": { +"$ref": "ListExternalAccessRulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single external access rule. Only fields specified in `update_mask` are applied.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/networkPolicies/{networkPoliciesId}/externalAccessRules/{externalAccessRulesId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.networkPolicies.externalAccessRules.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this external access rule. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/networkPolicies/[^/]+/externalAccessRules/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `ExternalAccessRule` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ExternalAccessRule" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"nodeTypes": { +"methods": { +"get": { +"description": "Gets details of a single `NodeType`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes/{nodeTypesId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.nodeTypes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the node type to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/nodeTypes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "NodeType" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists node types", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/nodeTypes", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.nodeTypes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of node types, you can exclude the ones named `standard-72` by specifying `name != \"standard-72\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"standard-72\") (virtual_cpu_count > 2) ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"standard-96\") AND (virtual_cpu_count > 2) OR (name = \"standard-72\") ```", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of node types to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListNodeTypes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodeTypes` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location to be queried for node types. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/nodeTypes", +"response": { +"$ref": "ListNodeTypesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"privateClouds": { +"methods": { +"create": { +"description": "Creates a new `PrivateCloud` resource in a given project and location. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional. Creating a private cloud also creates a [management cluster](https://cloud.google.com/vmware-engine/docs/concepts-vmware-components) for that private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the location to create the new private cloud in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"privateCloudId": { +"description": "Required. The user-provided identifier of the private cloud to be created. This identifier must be unique among each `PrivateCloud` within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"requestId": { +"description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. True if you want the request to be validated and not executed; false otherwise.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/privateClouds", +"request": { +"$ref": "PrivateCloud" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Schedules a `PrivateCloud` resource for deletion. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `expireTime` set to the time when deletion is final and can no longer be reversed. The delete operation is marked as done as soon as the `PrivateCloud` is successfully scheduled for deletion (this also applies when `delayHours` is set to zero), and the operation is not kept in pending state until `PrivateCloud` is purged. `PrivateCloud` can be restored using `UndeletePrivateCloud` method before the `expireTime` elapses. When `expireTime` is reached, deletion is final and all private cloud resources are irreversibly removed and billing stops. During the final removal process, `PrivateCloud.state` is set to `PURGING`. `PrivateCloud` can be polled using standard `GET` method for the whole period of deletion and purging. It will not be returned only when it is completely purged.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.privateClouds.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"delayHours": { +"description": "Optional. Time delay of the deletion specified in hours. The default value is `3`. Specifying a non-zero value for this field changes the value of `PrivateCloud.state` to `DELETED` and sets `expire_time` to the planned deletion time. Deletion can be cancelled before `expire_time` elapses using VmwareEngine.UndeletePrivateCloud. Specifying a value of `0` for this field instead begins the deletion process and ceases billing immediately. During the final deletion process, the value of `PrivateCloud.state` becomes `PURGING`.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"force": { +"description": "Optional. If set to true, cascade delete is enabled and all children of this private cloud resource are also deleted. When this flag is set to false, the private cloud will not be deleted if there are any children other than the management cluster. The management cluster is always deleted.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. The resource name of the private cloud to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a `PrivateCloud` resource by its resource name.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the private cloud to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PrivateCloud" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getDnsForwarding": { +"description": "Gets details of the `DnsForwarding` config.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/dnsForwarding", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.getDnsForwarding", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of a `DnsForwarding` to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/dnsForwarding$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "DnsForwarding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:getIamPolicy", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `PrivateCloud` resources in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of private clouds, you can exclude the ones named `example-pc` by specifying `name != \"example-pc\"`. You can also filter nested fields. For example, you could specify `networkConfig.managementCidr = \"192.168.0.0/24\"` to include private clouds only if they have a matching address in their network configuration. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-pc\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"private-cloud-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"private-cloud-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of private clouds to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListPrivateClouds` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateClouds` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to be queried for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/privateClouds", +"response": { +"$ref": "ListPrivateCloudsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Modifies a `PrivateCloud` resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateClouds.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateCloud` resource by the update. The fields specified in `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "PrivateCloud" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resetNsxCredentials": { +"description": "Resets credentials of the NSX appliance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetNsxCredentials", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.resetNsxCredentials", +"parameterOrder": [ +"privateCloud" +], +"parameters": { +"privateCloud": { +"description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+privateCloud}:resetNsxCredentials", +"request": { +"$ref": "ResetNsxCredentialsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"resetVcenterCredentials": { +"description": "Resets credentials of the Vcenter appliance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:resetVcenterCredentials", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.resetVcenterCredentials", +"parameterOrder": [ +"privateCloud" +], +"parameters": { +"privateCloud": { +"description": "Required. The resource name of the private cloud to reset credentials for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+privateCloud}:resetVcenterCredentials", +"request": { +"$ref": "ResetVcenterCredentialsRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:setIamPolicy", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"showNsxCredentials": { +"description": "Gets details of credentials for NSX appliance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showNsxCredentials", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.showNsxCredentials", +"parameterOrder": [ +"privateCloud" +], +"parameters": { +"privateCloud": { +"description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+privateCloud}:showNsxCredentials", +"response": { +"$ref": "Credentials" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"showVcenterCredentials": { +"description": "Gets details of credentials for Vcenter appliance.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:showVcenterCredentials", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.showVcenterCredentials", +"parameterOrder": [ +"privateCloud" +], +"parameters": { +"privateCloud": { +"description": "Required. The resource name of the private cloud to be queried for credentials. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"username": { +"description": "Optional. The username of the user to be queried for credentials. The default value of this field is CloudOwner@gve.local. The provided value must be one of the following: CloudOwner@gve.local, solution-user-01@gve.local, solution-user-02@gve.local, solution-user-03@gve.local, solution-user-04@gve.local, solution-user-05@gve.local, zertoadmin@gve.local.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+privateCloud}:showVcenterCredentials", +"response": { +"$ref": "Credentials" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:testIamPermissions", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"undelete": { +"description": "Restores a private cloud that was previously scheduled for deletion by `DeletePrivateCloud`. A `PrivateCloud` resource scheduled for deletion has `PrivateCloud.state` set to `DELETED` and `PrivateCloud.expireTime` set to the time when deletion can no longer be reversed.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}:undelete", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.undelete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the private cloud scheduled for deletion. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:undelete", +"request": { +"$ref": "UndeletePrivateCloudRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"updateDnsForwarding": { +"description": "Updates the parameters of the `DnsForwarding` config, like associated domains. Only fields specified in `update_mask` are applied.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/dnsForwarding", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateClouds.updateDnsForwarding", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this DNS profile. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/dnsForwarding$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `DnsForwarding` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "DnsForwarding" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"clusters": { +"methods": { +"create": { +"description": "Creates a new cluster in a given private cloud. Creating a new cluster provides additional nodes for use in the parent private cloud and requires sufficient [node quota](https://cloud.google.com/vmware-engine/quotas).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.clusters.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"clusterId": { +"description": "Required. The user-provided identifier of the new `Cluster`. This identifier must be unique among clusters within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to create a new cluster in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. True if you want the request to be validated and not executed; false otherwise.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+parent}/clusters", +"request": { +"$ref": "Cluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a `Cluster` resource. To avoid unintended data loss, migrate or gracefully shut down any workloads running on the cluster before deletion. You cannot delete the management cluster of a private cloud using this method.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.privateClouds.clusters.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the cluster to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a `Cluster` resource by its resource name.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.clusters.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The cluster resource name to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Cluster" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:getIamPolicy", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.clusters.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `Cluster` resources in a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.clusters.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": " To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-cluster\") (nodeCount = \"3\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-cluster-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-cluster-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of clusters to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListClusters` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListClusters` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to query for clusters. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/clusters", +"response": { +"$ref": "ListClustersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Modifies a `Cluster` resource. Only fields specified in `updateMask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateClouds.clusters.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `Cluster` resource by the update. The fields specified in the `updateMask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. True if you want the request to be validated and not executed; false otherwise.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Cluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:setIamPolicy", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.clusters.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}:testIamPermissions", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.clusters.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"nodes": { +"methods": { +"get": { +"description": "Gets details of a single node.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}/nodes/{nodesId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.clusters.nodes.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the node to retrieve. For example: `projects/{project}/locations/{location}/privateClouds/{private_cloud}/clusters/{cluster}/nodes/{node}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+/nodes/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Node" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists nodes in a given cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/clusters/{clustersId}/nodes", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.clusters.nodes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of nodes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListNodes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListNodes` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the cluster to be queried for nodes. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/clusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/nodes", +"response": { +"$ref": "ListNodesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"externalAddresses": { +"methods": { +"create": { +"description": "Creates a new `ExternalAddress` resource in a given private cloud. The network policy that corresponds to the private cloud must have the external IP address network service enabled (`NetworkPolicy.external_ip`).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.externalAddresses.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"externalAddressId": { +"description": "Required. The user-provided identifier of the `ExternalAddress` to be created. This identifier must be unique among `ExternalAddress` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to create a new external IP address in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/externalAddresses", +"request": { +"$ref": "ExternalAddress" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single external IP address. When you delete an external IP address, connectivity between the external IP address and the corresponding internal IP address is lost.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.privateClouds.externalAddresses.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the external IP address to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single external IP address.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.externalAddresses.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the external IP address to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-ip`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ExternalAddress" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists external IP addresses assigned to VMware workload VMs in a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.externalAddresses.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of IP addresses, you can exclude the ones named `example-ip` by specifying `name != \"example-ip\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-ip\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-ip-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-ip-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of external IP addresses to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListExternalAddresses` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExternalAddresses` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to be queried for external IP addresses. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/externalAddresses", +"response": { +"$ref": "ListExternalAddressesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single external IP address. Only fields specified in `update_mask` are applied. During operation processing, the resource is temporarily in the `ACTIVE` state before the operation fully completes. For that period of time, you can't update the resource. Use the operation status to determine when the processing fully completes.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/externalAddresses/{externalAddressesId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateClouds.externalAddresses.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this external IP address. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/externalAddresses/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `ExternalAddress` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ExternalAddress" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"hcxActivationKeys": { +"methods": { +"create": { +"description": "Creates a new HCX activation key in a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"hcxActivationKeyId": { +"description": "Required. The user-provided identifier of the `HcxActivationKey` to be created. This identifier must be unique among `HcxActivationKey` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to create the key for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/hcxActivationKeys", +"request": { +"$ref": "HcxActivationKey" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a `HcxActivationKey` resource by its resource name.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the HCX activation key to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "HcxActivationKey" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:getIamPolicy", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `HcxActivationKey` resources in a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of HCX activation keys to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListHcxActivationKeys` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListHcxActivationKeys` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to be queried for HCX activation keys. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/hcxActivationKeys", +"response": { +"$ref": "ListHcxActivationKeysResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:setIamPolicy", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/hcxActivationKeys/{hcxActivationKeysId}:testIamPermissions", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.hcxActivationKeys.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/hcxActivationKeys/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"loggingServers": { +"methods": { +"create": { +"description": "Create a new logging server for a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.loggingServers.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"loggingServerId": { +"description": "Required. The user-provided identifier of the `LoggingServer` to be created. This identifier must be unique among `LoggingServer` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to create a new Logging Server in. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/loggingServers", +"request": { +"$ref": "LoggingServer" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single logging server.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.privateClouds.loggingServers.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the logging server to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a logging server.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.loggingServers.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Logging Server to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "LoggingServer" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists logging servers configured for a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.loggingServers.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of logging servers, you can exclude the ones named `example-server` by specifying `name != \"example-server\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-server\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-server-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-server-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of logging servers to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListLoggingServersRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListLoggingServersRequest` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to be queried for logging servers. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/loggingServers", +"response": { +"$ref": "ListLoggingServersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single logging server. Only fields specified in `update_mask` are applied.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/loggingServers/{loggingServersId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateClouds.loggingServers.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this logging server. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/loggingServers/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `LoggingServer` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "LoggingServer" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"managementDnsZoneBindings": { +"methods": { +"create": { +"description": "Creates a new `ManagementDnsZoneBinding` resource in a private cloud. This RPC creates the DNS binding and the resource that represents the DNS binding of the consumer VPC network to the management DNS zone. A management DNS zone is the Cloud DNS cross-project binding zone that VMware Engine creates for each private cloud. It contains FQDNs and corresponding IP addresses for the private cloud's ESXi hosts and management VM appliances like vCenter and NSX Manager.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"managementDnsZoneBindingId": { +"description": "Required. The user-provided identifier of the `ManagementDnsZoneBinding` resource to be created. This identifier must be unique among `ManagementDnsZoneBinding` resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to create a new management DNS zone binding for. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/managementDnsZoneBindings", +"request": { +"$ref": "ManagementDnsZoneBinding" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a `ManagementDnsZoneBinding` resource. When a management DNS zone binding is deleted, the corresponding consumer VPC network is no longer bound to the management DNS zone.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the management DNS zone binding to delete. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a 'ManagementDnsZoneBinding' resource by its resource name.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the management DNS zone binding to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ManagementDnsZoneBinding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Consumer VPCs bound to Management DNS Zone of a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of Management DNS Zone Bindings, you can exclude the ones named `example-management-dns-zone-binding` by specifying `name != \"example-management-dns-zone-binding\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-management-dns-zone-binding\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-management-dns-zone-binding-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-management-dns-zone-binding-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of management DNS zone bindings to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListManagementDnsZoneBindings` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListManagementDnsZoneBindings` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to be queried for management DNS zone bindings. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/managementDnsZoneBindings", +"response": { +"$ref": "ListManagementDnsZoneBindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a `ManagementDnsZoneBinding` resource. Only fields specified in `update_mask` are applied.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this binding. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `ManagementDnsZoneBinding` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ManagementDnsZoneBinding" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"repair": { +"description": "Retries to create a `ManagementDnsZoneBinding` resource that is in failed state.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/managementDnsZoneBindings/{managementDnsZoneBindingsId}:repair", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateClouds.managementDnsZoneBindings.repair", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the management DNS zone binding to repair. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/managementDnsZoneBindings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:repair", +"request": { +"$ref": "RepairManagementDnsZoneBindingRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"subnets": { +"methods": { +"get": { +"description": "Gets details of a single subnet.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets/{subnetsId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.subnets.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the subnet to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/subnets/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Subnet" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists subnets in a given private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateClouds.subnets.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of subnets to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListSubnetsRequest` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubnetsRequest` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private cloud to be queried for subnets. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/subnets", +"response": { +"$ref": "ListSubnetsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates the parameters of a single subnet. Only fields specified in `update_mask` are applied. *Note*: This API is synchronous and always returns a successful `google.longrunning.Operation` (LRO). The returned LRO will only have `done` and `response` fields.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateClouds/{privateCloudsId}/subnets/{subnetsId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateClouds.subnets.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateClouds/[^/]+/subnets/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `Subnet` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Subnet" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"privateConnections": { +"methods": { +"create": { +"description": "Creates a new private connection that can be used for accessing private Clouds.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.privateConnections.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the location to create the new private connection in. Private connection is a regional resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"privateConnectionId": { +"description": "Required. The user-provided identifier of the new private connection. This identifier must be unique among private connection resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/privateConnections", +"request": { +"$ref": "PrivateConnection" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a `PrivateConnection` resource. When a private connection is deleted for a VMware Engine network, the connected network becomes inaccessible to that VMware Engine network.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.privateConnections.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the private connection to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a `PrivateConnection` resource by its resource name. The resource contains details of the private connection, such as connected network, routing mode and state.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateConnections.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the private connection to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "PrivateConnection" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `PrivateConnection` resources in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateConnections.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of private connections, you can exclude the ones named `example-connection` by specifying `name != \"example-connection\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-connection\") (createTime > \"2022-09-22T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-connection-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-connection-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of private connections to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListPrivateConnections` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnections` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location to query for private connections. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/privateConnections", +"response": { +"$ref": "ListPrivateConnectionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Modifies a `PrivateConnection` resource. Only `description` and `routing_mode` fields can be updated. Only fields specified in `updateMask` are applied.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.privateConnections.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the private connection. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the `PrivateConnection` resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "PrivateConnection" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"peeringRoutes": { +"methods": { +"list": { +"description": "Lists the private connection routes exchanged over a peering connection.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/privateConnections/{privateConnectionsId}/peeringRoutes", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.privateConnections.peeringRoutes.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of peering routes to return in one page. The service may return fewer than this value. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListPrivateConnectionPeeringRoutes` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPrivateConnectionPeeringRoutes` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the private connection to retrieve peering routes from. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-west1/privateConnections/my-connection`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/privateConnections/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/peeringRoutes", +"response": { +"$ref": "ListPrivateConnectionPeeringRoutesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"vmwareEngineNetworks": { +"methods": { +"create": { +"description": "Creates a new VMware Engine network that can be used by a private cloud.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks", +"httpMethod": "POST", +"id": "vmwareengine.projects.locations.vmwareEngineNetworks.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The resource name of the location to create the new VMware Engine network in. A VMware Engine network of type `LEGACY` is a regional resource, and a VMware Engine network of type `STANDARD` is a global resource. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"vmwareEngineNetworkId": { +"description": "Required. The user-provided identifier of the new VMware Engine network. This identifier must be unique among VMware Engine network resources within the parent and becomes the final token in the name URI. The identifier must meet the following requirements: * For networks of type LEGACY, adheres to the format: `{region-id}-default`. Replace `{region-id}` with the region where you want to create the VMware Engine network. For example, \"us-central1-default\". * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/vmwareEngineNetworks", +"request": { +"$ref": "VmwareEngineNetwork" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a `VmwareEngineNetwork` resource. You can only delete a VMware Engine network after all resources that refer to it are deleted. For example, a private cloud, a network peering, and a network policy can all refer to the same VMware Engine network.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", +"httpMethod": "DELETE", +"id": "vmwareengine.projects.locations.vmwareEngineNetworks.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. Checksum used to ensure that the user-provided value is up to date before the server processes the request. The server compares provided checksum with the current checksum of the resource. If the user-provided value is out of date, this request returns an `ABORTED` error.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. The resource name of the VMware Engine network to be deleted. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Retrieves a `VmwareEngineNetwork` resource by its resource name. The resource contains details of the VMware Engine network, such as its VMware Engine network type, peered networks in a service project, and state (for example, `CREATING`, `ACTIVE`, `DELETING`).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.vmwareEngineNetworks.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the VMware Engine network to retrieve. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "VmwareEngineNetwork" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists `VmwareEngineNetwork` resources in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks", +"httpMethod": "GET", +"id": "vmwareengine.projects.locations.vmwareEngineNetworks.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "A filter expression that matches resources returned in the response. The expression must specify the field name, a comparison operator, and the value that you want to use for filtering. The value must be a string, a number, or a boolean. The comparison operator must be `=`, `!=`, `>`, or `<`. For example, if you are filtering a list of network peerings, you can exclude the ones named `example-network` by specifying `name != \"example-network\"`. To filter on multiple expressions, provide each separate expression within parentheses. For example: ``` (name = \"example-network\") (createTime > \"2021-04-12T08:15:10.40Z\") ``` By default, each expression is an `AND` expression. However, you can include `AND` and `OR` expressions explicitly. For example: ``` (name = \"example-network-1\") AND (createTime > \"2021-04-12T08:15:10.40Z\") OR (name = \"example-network-2\") ```", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Sorts list results by a certain order. By default, returned results are ordered by `name` in ascending order. You can also sort results in descending order based on the `name` value using `orderBy=\"name desc\"`. Currently, only ordering by `name` is supported.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return in one page. The maximum value is coerced to 1000. The default value of this field is 500.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListVmwareEngineNetworks` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListVmwareEngineNetworks` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource name of the location to query for VMware Engine networks. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/vmwareEngineNetworks", +"response": { +"$ref": "ListVmwareEngineNetworksResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Modifies a VMware Engine network resource. Only the following fields can be updated: `description`. Only fields specified in `updateMask` are applied.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/vmwareEngineNetworks/{vmwareEngineNetworksId}", +"httpMethod": "PATCH", +"id": "vmwareengine.projects.locations.vmwareEngineNetworks.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Output only. The resource name of the VMware Engine network. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/vmwareEngineNetworks/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +}, +"updateMask": { +"description": "Required. Field mask is used to specify the fields to be overwritten in the VMware Engine network resource by the update. The fields specified in the `update_mask` are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. Only the following fields can be updated: `description`.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "VmwareEngineNetwork" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240412", +"rootUrl": "https://vmwareengine.googleapis.com/", +"schemas": { +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"Cluster": { +"description": "A cluster in a private cloud.", +"id": "Cluster", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"management": { +"description": "Output only. True if the cluster is a management cluster; false otherwise. There can only be one management cluster in a private cloud and it has to be the first one.", +"readOnly": true, +"type": "boolean" +}, +"name": { +"description": "Output only. The resource name of this cluster. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster`", +"readOnly": true, +"type": "string" +}, +"nodeTypeConfigs": { +"additionalProperties": { +"$ref": "NodeTypeConfig" +}, +"description": "Required. The map of cluster node types in this cluster, where the key is canonical identifier of the node type (corresponds to the `NodeType`).", +"type": "object" +}, +"state": { +"description": "Output only. State of the resource.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING", +"UPDATING", +"DELETING", +"REPAIRING" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"The Cluster is operational and can be used by the user.", +"The Cluster is being deployed.", +"Adding or removing of a node to the cluster, any other cluster specific updates.", +"The Cluster is being deleted.", +"The Cluster is undergoing maintenance, for example: a failed node is getting replaced." +], +"readOnly": true, +"type": "string" +}, +"stretchedClusterConfig": { +"$ref": "StretchedClusterConfig", +"description": "Optional. Configuration of a stretched cluster. Required for clusters that belong to a STRETCHED private cloud." +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Credentials": { +"description": "Credentials for a private cloud.", +"id": "Credentials", +"properties": { +"password": { +"description": "Initial password.", +"type": "string" +}, +"username": { +"description": "Initial username.", +"type": "string" +} +}, +"type": "object" +}, +"DnsBindPermission": { +"description": "DnsBindPermission resource that contains the accounts having the consumer DNS bind permission on the corresponding intranet VPC of the consumer project.", +"id": "DnsBindPermission", +"properties": { +"name": { +"description": "Required. Output only. The name of the resource which stores the users/service accounts having the permission to bind to the corresponding intranet VPC of the consumer project. DnsBindPermission is a global resource and location can only be global. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/dnsBindPermission`", +"readOnly": true, +"type": "string" +}, +"principals": { +"description": "Output only. Users/Service accounts which have access for binding on the intranet VPC project corresponding to the consumer project.", +"items": { +"$ref": "Principal" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"DnsForwarding": { +"description": "DNS forwarding config. This config defines a list of domain to name server mappings, and is attached to the private cloud for custom domain resolution.", +"id": "DnsForwarding", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"forwardingRules": { +"description": "Required. List of domain mappings to configure", +"items": { +"$ref": "ForwardingRule" +}, +"type": "array" +}, +"name": { +"description": "Output only. The resource name of this DNS profile. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/dnsForwarding`", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"ExternalAccessRule": { +"description": "External access firewall rules for filtering incoming traffic destined to `ExternalAddress` resources.", +"id": "ExternalAccessRule", +"properties": { +"action": { +"description": "The action that the external access rule performs.", +"enum": [ +"ACTION_UNSPECIFIED", +"ALLOW", +"DENY" +], +"enumDescriptions": [ +"Defaults to allow.", +"Allows connections that match the other specified components.", +"Blocks connections that match the other specified components." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description for this external access rule.", +"type": "string" +}, +"destinationIpRanges": { +"description": "If destination ranges are specified, the external access rule applies only to the traffic that has a destination IP address in these ranges. The specified IP addresses must have reserved external IP addresses in the scope of the parent network policy. To match all external IP addresses in the scope of the parent network policy, specify `0.0.0.0/0`. To match a specific external IP address, specify it using the `IpRange.external_address` property.", +"items": { +"$ref": "IpRange" +}, +"type": "array" +}, +"destinationPorts": { +"description": "A list of destination ports to which the external access rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. For example: `[\"22\"]`, `[\"80\",\"443\"]`, or `[\"12345-12349\"]`. To match all destination ports, specify `[\"0-65535\"]`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"ipProtocol": { +"description": "The IP protocol to which the external access rule applies. This value can be one of the following three protocol strings (not case-sensitive): `tcp`, `udp`, or `icmp`.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of this external access rule. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-policy/externalAccessRules/my-rule`", +"readOnly": true, +"type": "string" +}, +"priority": { +"description": "External access rule priority, which determines the external access rule to use when multiple rules apply. If multiple rules have the same priority, their ordering is non-deterministic. If specific ordering is required, assign unique priorities to enforce such ordering. The external access rule priority is an integer from 100 to 4096, both inclusive. Lower integers indicate higher precedence. For example, a rule with priority `100` has higher precedence than a rule with priority `101`.", +"format": "int32", +"type": "integer" +}, +"sourceIpRanges": { +"description": "If source ranges are specified, the external access rule applies only to traffic that has a source IP address in these ranges. These ranges can either be expressed in the CIDR format or as an IP address. As only inbound rules are supported, `ExternalAddress` resources cannot be the source IP addresses of an external access rule. To match all source addresses, specify `0.0.0.0/0`.", +"items": { +"$ref": "IpRange" +}, +"type": "array" +}, +"sourcePorts": { +"description": "A list of source ports to which the external access rule applies. This field is only applicable for the UDP or TCP protocol. Each entry must be either an integer or a range. For example: `[\"22\"]`, `[\"80\",\"443\"]`, or `[\"12345-12349\"]`. To match all source ports, specify `[\"0-65535\"]`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"state": { +"description": "Output only. The state of the resource.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING", +"UPDATING", +"DELETING" +], +"enumDescriptions": [ +"The default value. This value is used if the state is omitted.", +"The rule is ready.", +"The rule is being created.", +"The rule is being updated.", +"The rule is being deleted." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExternalAddress": { +"description": "Represents an allocated external IP address and its corresponding internal IP address in a private cloud.", +"id": "ExternalAddress", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description for this resource.", +"type": "string" +}, +"externalIp": { +"description": "Output only. The external IP address of a workload VM.", +"readOnly": true, +"type": "string" +}, +"internalIp": { +"description": "The internal IP address of a workload VM.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of this external IP address. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the resource.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING", +"UPDATING", +"DELETING" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"The address is ready.", +"The address is being created.", +"The address is being updated.", +"The address is being deleted." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"FetchNetworkPolicyExternalAddressesResponse": { +"description": "Response message for VmwareEngine.FetchNetworkPolicyExternalAddresses", +"id": "FetchNetworkPolicyExternalAddressesResponse", +"properties": { +"externalAddresses": { +"description": "A list of external IP addresses assigned to VMware workload VMs within the scope of the given network policy.", +"items": { +"$ref": "ExternalAddress" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ForwardingRule": { +"description": "A forwarding rule is a mapping of a `domain` to `name_servers`. This mapping allows VMware Engine to resolve domains for attached private clouds by forwarding DNS requests for a given domain to the specified nameservers.", +"id": "ForwardingRule", +"properties": { +"domain": { +"description": "Required. Domain used to resolve a `name_servers` list.", +"type": "string" +}, +"nameServers": { +"description": "Required. List of DNS servers to use for domain resolution", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GrantDnsBindPermissionRequest": { +"description": "Request message for VmwareEngine.GrantDnsBindPermission", +"id": "GrantDnsBindPermissionRequest", +"properties": { +"principal": { +"$ref": "Principal", +"description": "Required. The consumer provided user/service account which needs to be granted permission to bind with the intranet VPC corresponding to the consumer project." +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"Hcx": { +"description": "Details about a HCX Cloud Manager appliance.", +"id": "Hcx", +"properties": { +"fqdn": { +"description": "Fully qualified domain name of the appliance.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of the appliance.", +"type": "string" +}, +"state": { +"description": "Output only. The state of the appliance.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING" +], +"enumDescriptions": [ +"Unspecified appliance state. This is the default value.", +"The appliance is operational and can be used.", +"The appliance is being deployed." +], +"readOnly": true, +"type": "string" +}, +"version": { +"description": "Version of the appliance.", +"type": "string" +} +}, +"type": "object" +}, +"HcxActivationKey": { +"description": "HCX activation key. A default key is created during private cloud provisioning, but this behavior is subject to change and you should always verify active keys. Use VmwareEngine.ListHcxActivationKeys to retrieve existing keys and VmwareEngine.CreateHcxActivationKey to create new ones.", +"id": "HcxActivationKey", +"properties": { +"activationKey": { +"description": "Output only. HCX activation key.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. Creation time of HCX activation key.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of this HcxActivationKey. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateClouds/my-cloud/hcxActivationKeys/my-key`", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of HCX activation key.", +"enum": [ +"STATE_UNSPECIFIED", +"AVAILABLE", +"CONSUMED", +"CREATING" +], +"enumDescriptions": [ +"Unspecified state.", +"State of a newly generated activation key.", +"State of key when it has been used to activate HCX appliance.", +"State of key when it is being created." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"IpRange": { +"description": "An IP range provided in any one of the supported formats.", +"id": "IpRange", +"properties": { +"externalAddress": { +"description": "The name of an `ExternalAddress` resource. The external address must have been reserved in the scope of this external access rule's parent network policy. Provide the external address name in the form of `projects/{project}/locations/{location}/privateClouds/{private_cloud}/externalAddresses/{external_address}`. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/externalAddresses/my-address`.", +"type": "string" +}, +"ipAddress": { +"description": "A single IP address. For example: `10.0.0.5`.", +"type": "string" +}, +"ipAddressRange": { +"description": "An IP address range in the CIDR format. For example: `10.0.0.0/24`.", +"type": "string" +} +}, +"type": "object" +}, +"ListClustersResponse": { +"description": "Response message for VmwareEngine.ListClusters", +"id": "ListClustersResponse", +"properties": { +"clusters": { +"description": "A list of private cloud clusters.", +"items": { +"$ref": "Cluster" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListExternalAccessRulesResponse": { +"description": "Response message for VmwareEngine.ListExternalAccessRules", +"id": "ListExternalAccessRulesResponse", +"properties": { +"externalAccessRules": { +"description": "A list of external access firewall rules.", +"items": { +"$ref": "ExternalAccessRule" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListExternalAddressesResponse": { +"description": "Response message for VmwareEngine.ListExternalAddresses", +"id": "ListExternalAddressesResponse", +"properties": { +"externalAddresses": { +"description": "A list of external IP addresses.", +"items": { +"$ref": "ExternalAddress" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListHcxActivationKeysResponse": { +"description": "Response message for VmwareEngine.ListHcxActivationKeys", +"id": "ListHcxActivationKeysResponse", +"properties": { +"hcxActivationKeys": { +"description": "List of HCX activation keys.", +"items": { +"$ref": "HcxActivationKey" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListLoggingServersResponse": { +"description": "Response message for VmwareEngine.ListLoggingServers", +"id": "ListLoggingServersResponse", +"properties": { +"loggingServers": { +"description": "A list of Logging Servers.", +"items": { +"$ref": "LoggingServer" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListManagementDnsZoneBindingsResponse": { +"description": "Response message for VmwareEngine.ListManagementDnsZoneBindings", +"id": "ListManagementDnsZoneBindingsResponse", +"properties": { +"managementDnsZoneBindings": { +"description": "A list of management DNS zone bindings.", +"items": { +"$ref": "ManagementDnsZoneBinding" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListNetworkPeeringsResponse": { +"description": "Response message for VmwareEngine.ListNetworkPeerings", +"id": "ListNetworkPeeringsResponse", +"properties": { +"networkPeerings": { +"description": "A list of network peerings.", +"items": { +"$ref": "NetworkPeering" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListNetworkPoliciesResponse": { +"description": "Response message for VmwareEngine.ListNetworkPolicies", +"id": "ListNetworkPoliciesResponse", +"properties": { +"networkPolicies": { +"description": "A list of network policies.", +"items": { +"$ref": "NetworkPolicy" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be send as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListNodeTypesResponse": { +"description": "Response message for VmwareEngine.ListNodeTypes", +"id": "ListNodeTypesResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"nodeTypes": { +"description": "A list of Node Types.", +"items": { +"$ref": "NodeType" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListNodesResponse": { +"description": "Response message for VmwareEngine.ListNodes", +"id": "ListNodesResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"nodes": { +"description": "The nodes.", +"items": { +"$ref": "Node" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPeeringRoutesResponse": { +"description": "Response message for VmwareEngine.ListPeeringRoutes", +"id": "ListPeeringRoutesResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"peeringRoutes": { +"description": "A list of peering routes.", +"items": { +"$ref": "PeeringRoute" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPrivateCloudsResponse": { +"description": "Response message for VmwareEngine.ListPrivateClouds", +"id": "ListPrivateCloudsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"privateClouds": { +"description": "A list of private clouds.", +"items": { +"$ref": "PrivateCloud" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPrivateConnectionPeeringRoutesResponse": { +"description": "Response message for VmwareEngine.ListPrivateConnectionPeeringRoutes", +"id": "ListPrivateConnectionPeeringRoutesResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"peeringRoutes": { +"description": "A list of peering routes.", +"items": { +"$ref": "PeeringRoute" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListPrivateConnectionsResponse": { +"description": "Response message for VmwareEngine.ListPrivateConnections", +"id": "ListPrivateConnectionsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"privateConnections": { +"description": "A list of private connections.", +"items": { +"$ref": "PrivateConnection" +}, +"type": "array" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListSubnetsResponse": { +"description": "Response message for VmwareEngine.ListSubnets", +"id": "ListSubnetsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"subnets": { +"description": "A list of subnets.", +"items": { +"$ref": "Subnet" +}, +"type": "array" +}, +"unreachable": { +"description": "Locations that could not be reached when making an aggregated query using wildcards.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListVmwareEngineNetworksResponse": { +"description": "Response message for VmwareEngine.ListVmwareEngineNetworks", +"id": "ListVmwareEngineNetworksResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"vmwareEngineNetworks": { +"description": "A list of VMware Engine networks.", +"items": { +"$ref": "VmwareEngineNetwork" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"LocationMetadata": { +"description": "VmwareEngine specific metadata for the given google.cloud.location.Location. It is returned as a content of the `google.cloud.location.Location.metadata` field.", +"id": "LocationMetadata", +"properties": { +"capabilities": { +"description": "Output only. Capabilities of this location.", +"items": { +"enum": [ +"CAPABILITY_UNSPECIFIED", +"STRETCHED_CLUSTERS" +], +"enumDescriptions": [ +"The default value. This value is used if the capability is omitted or unknown.", +"Stretch clusters are supported in this location." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"LoggingServer": { +"description": "Logging server to receive vCenter or ESXi logs.", +"id": "LoggingServer", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"hostname": { +"description": "Required. Fully-qualified domain name (FQDN) or IP Address of the logging server.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of this logging server. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/loggingServers/my-logging-server`", +"readOnly": true, +"type": "string" +}, +"port": { +"description": "Required. Port number at which the logging server receives logs.", +"format": "int32", +"type": "integer" +}, +"protocol": { +"description": "Required. Protocol used by vCenter to send logs to a logging server.", +"enum": [ +"PROTOCOL_UNSPECIFIED", +"UDP", +"TCP", +"TLS", +"SSL", +"RELP" +], +"enumDescriptions": [ +"Unspecified communications protocol. This is the default value.", +"UDP", +"TCP", +"TLS", +"SSL", +"RELP" +], +"type": "string" +}, +"sourceType": { +"description": "Required. The type of component that produces logs that will be forwarded to this logging server.", +"enum": [ +"SOURCE_TYPE_UNSPECIFIED", +"ESXI", +"VCSA" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"Logs produced by ESXI hosts", +"Logs produced by vCenter server" +], +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ManagementCluster": { +"description": "Management cluster configuration.", +"id": "ManagementCluster", +"properties": { +"clusterId": { +"description": "Required. The user-provided identifier of the new `Cluster`. The identifier must meet the following requirements: * Only contains 1-63 alphanumeric characters and hyphens * Begins with an alphabetical character * Ends with a non-hyphen character * Not formatted as a UUID * Complies with [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034) (section 3.5)", +"type": "string" +}, +"nodeTypeConfigs": { +"additionalProperties": { +"$ref": "NodeTypeConfig" +}, +"description": "Required. The map of cluster node types in this cluster, where the key is canonical identifier of the node type (corresponds to the `NodeType`).", +"type": "object" +}, +"stretchedClusterConfig": { +"$ref": "StretchedClusterConfig", +"description": "Optional. Configuration of a stretched cluster. Required for STRETCHED private clouds." +} +}, +"type": "object" +}, +"ManagementDnsZoneBinding": { +"description": "Represents a binding between a network and the management DNS zone. A management DNS zone is the Cloud DNS cross-project binding zone that VMware Engine creates for each private cloud. It contains FQDNs and corresponding IP addresses for the private cloud's ESXi hosts and management VM appliances like vCenter and NSX Manager.", +"id": "ManagementDnsZoneBinding", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description for this resource.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of this binding. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/managementDnsZoneBindings/my-management-dns-zone-binding`", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the resource.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING", +"UPDATING", +"DELETING", +"FAILED" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"The binding is ready.", +"The binding is being created.", +"The binding is being updated.", +"The binding is being deleted.", +"The binding has failed." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareEngineNetwork": { +"description": "Network to bind is a VMware Engine network. Specify the name in the following form for VMware engine network: `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. `{project}` can either be a project number or a project ID.", +"type": "string" +}, +"vpcNetwork": { +"description": "Network to bind is a standard consumer VPC. Specify the name in the following form for consumer VPC network: `projects/{project}/global/networks/{network_id}`. `{project}` can either be a project number or a project ID.", +"type": "string" +} +}, +"type": "object" +}, +"NetworkConfig": { +"description": "Network configuration in the consumer project with which the peering has to be done.", +"id": "NetworkConfig", +"properties": { +"dnsServerIp": { +"description": "Output only. DNS Server IP of the Private Cloud. All DNS queries can be forwarded to this address for name resolution of Private Cloud's management entities like vCenter, NSX-T Manager and ESXi hosts.", +"readOnly": true, +"type": "string" +}, +"managementCidr": { +"description": "Required. Management CIDR used by VMware management appliances.", +"type": "string" +}, +"managementIpAddressLayoutVersion": { +"description": "Output only. The IP address layout version of the management IP address range. Possible versions include: * `managementIpAddressLayoutVersion=1`: Indicates the legacy IP address layout used by some existing private clouds. This is no longer supported for new private clouds as it does not support all features. * `managementIpAddressLayoutVersion=2`: Indicates the latest IP address layout used by all newly created private clouds. This version supports all current features.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"vmwareEngineNetwork": { +"description": "Optional. The relative resource name of the VMware Engine network attached to the private cloud. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.", +"type": "string" +}, +"vmwareEngineNetworkCanonical": { +"description": "Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"NetworkPeering": { +"description": "Details of a network peering.", +"id": "NetworkPeering", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. User-provided description for this network peering.", +"type": "string" +}, +"exchangeSubnetRoutes": { +"description": "Optional. True if full mesh connectivity is created and managed automatically between peered networks; false otherwise. Currently this field is always true because Google Compute Engine automatically creates and manages subnetwork routes between two VPC networks when peering state is 'ACTIVE'.", +"type": "boolean" +}, +"exportCustomRoutes": { +"description": "Optional. True if custom routes are exported to the peered network; false otherwise. The default value is true.", +"type": "boolean" +}, +"exportCustomRoutesWithPublicIp": { +"description": "Optional. True if all subnet routes with a public IP address range are exported; false otherwise. The default value is true. IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field.", +"type": "boolean" +}, +"importCustomRoutes": { +"description": "Optional. True if custom routes are imported from the peered network; false otherwise. The default value is true.", +"type": "boolean" +}, +"importCustomRoutesWithPublicIp": { +"description": "Optional. True if all subnet routes with public IP address range are imported; false otherwise. The default value is true. IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported to peers and are not controlled by this field.", +"type": "boolean" +}, +"name": { +"description": "Output only. The resource name of the network peering. NetworkPeering is a global resource and location can only be global. Resource names are scheme-less URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/networkPeerings/my-peering`", +"readOnly": true, +"type": "string" +}, +"peerMtu": { +"description": "Optional. Maximum transmission unit (MTU) in bytes. The default value is `1500`. If a value of `0` is provided for this field, VMware Engine uses the default value instead.", +"format": "int32", +"type": "integer" +}, +"peerNetwork": { +"description": "Required. The relative resource name of the network to peer with a standard VMware Engine network. The provided network can be a consumer VPC network or another standard VMware Engine network. If the `peer_network_type` is VMWARE_ENGINE_NETWORK, specify the name in the form: `projects/{project}/locations/global/vmwareEngineNetworks/{vmware_engine_network_id}`. Otherwise specify the name in the form: `projects/{project}/global/networks/{network_id}`, where `{project}` can either be a project number or a project ID.", +"type": "string" +}, +"peerNetworkType": { +"description": "Required. The type of the network to peer with the VMware Engine network.", +"enum": [ +"PEER_NETWORK_TYPE_UNSPECIFIED", +"STANDARD", +"VMWARE_ENGINE_NETWORK", +"PRIVATE_SERVICES_ACCESS", +"NETAPP_CLOUD_VOLUMES", +"THIRD_PARTY_SERVICE", +"DELL_POWERSCALE" +], +"enumDescriptions": [ +"Unspecified", +"Peering connection used for connecting to another VPC network established by the same user. For example, a peering connection to another VPC network in the same project or to an on-premises network.", +"Peering connection used for connecting to another VMware Engine network.", +"Peering connection used for establishing [private services access](https://cloud.google.com/vpc/docs/private-services-access).", +"Peering connection used for connecting to NetApp Cloud Volumes.", +"Peering connection used for connecting to third-party services. Most third-party services require manual setup of reverse peering on the VPC network associated with the third-party service.", +"Peering connection used for connecting to Dell PowerScale Filers" +], +"type": "string" +}, +"state": { +"description": "Output only. State of the network peering. This field has a value of 'ACTIVE' when there's a matching configuration in the peer network. New values may be added to this enum when appropriate.", +"enum": [ +"STATE_UNSPECIFIED", +"INACTIVE", +"ACTIVE", +"CREATING", +"DELETING" +], +"enumDescriptions": [ +"Unspecified network peering state. This is the default value.", +"The peering is not active.", +"The peering is active.", +"The peering is being created.", +"The peering is being deleted." +], +"readOnly": true, +"type": "string" +}, +"stateDetails": { +"description": "Output only. Output Only. Details about the current state of the network peering.", +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareEngineNetwork": { +"description": "Required. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.", +"type": "string" +} +}, +"type": "object" +}, +"NetworkPolicy": { +"description": "Represents a network policy resource. Network policies are regional resources. You can use a network policy to enable or disable internet access and external IP access. Network policies are associated with a VMware Engine network, which might span across regions. For a given region, a network policy applies to all private clouds in the VMware Engine network associated with the policy.", +"id": "NetworkPolicy", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. User-provided description for this network policy.", +"type": "string" +}, +"edgeServicesCidr": { +"description": "Required. IP address range in CIDR notation used to create internet access and external IP access. An RFC 1918 CIDR block, with a \"/26\" prefix, is required. The range cannot overlap with any prefixes either in the consumer VPC network or in use by the private clouds attached to that VPC network.", +"type": "string" +}, +"externalIp": { +"$ref": "NetworkService", +"description": "Network service that allows External IP addresses to be assigned to VMware workloads. This service can only be enabled when `internet_access` is also enabled." +}, +"internetAccess": { +"$ref": "NetworkService", +"description": "Network service that allows VMware workloads to access the internet." +}, +"name": { +"description": "Output only. The resource name of this network policy. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/networkPolicies/my-network-policy`", +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareEngineNetwork": { +"description": "Optional. The relative resource name of the VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}` can either be a project number or a project ID.", +"type": "string" +}, +"vmwareEngineNetworkCanonical": { +"description": "Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"NetworkService": { +"description": "Represents a network service that is managed by a `NetworkPolicy` resource. A network service provides a way to control an aspect of external access to VMware workloads. For example, whether the VMware workloads in the private clouds governed by a network policy can access or be accessed from the internet.", +"id": "NetworkService", +"properties": { +"enabled": { +"description": "True if the service is enabled; false otherwise.", +"type": "boolean" +}, +"state": { +"description": "Output only. State of the service. New values may be added to this enum when appropriate.", +"enum": [ +"STATE_UNSPECIFIED", +"UNPROVISIONED", +"RECONCILING", +"ACTIVE" +], +"enumDescriptions": [ +"Unspecified service state. This is the default value.", +"Service is not provisioned.", +"Service is in the process of being provisioned/deprovisioned.", +"Service is active." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Node": { +"description": "Node in a cluster.", +"id": "Node", +"properties": { +"customCoreCount": { +"description": "Output only. Customized number of cores", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"fqdn": { +"description": "Output only. Fully qualified domain name of the node.", +"readOnly": true, +"type": "string" +}, +"internalIp": { +"description": "Output only. Internal IP address of the node.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of this node. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: projects/my-project/locations/us-central1-a/privateClouds/my-cloud/clusters/my-cluster/nodes/my-node", +"readOnly": true, +"type": "string" +}, +"nodeTypeId": { +"description": "Output only. The canonical identifier of the node type (corresponds to the `NodeType`). For example: standard-72.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the appliance.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING", +"FAILED", +"UPGRADING" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"Node is operational and can be used by the user.", +"Node is being provisioned.", +"Node is in a failed state.", +"Node is undergoing maintenance, e.g.: during private cloud upgrade." +], +"readOnly": true, +"type": "string" +}, +"version": { +"description": "Output only. The version number of the VMware ESXi management component in this cluster.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"NodeType": { +"description": "Describes node type.", +"id": "NodeType", +"properties": { +"availableCustomCoreCounts": { +"description": "Output only. List of possible values of custom core count.", +"items": { +"format": "int32", +"type": "integer" +}, +"readOnly": true, +"type": "array" +}, +"capabilities": { +"description": "Output only. Capabilities of this node type.", +"items": { +"enum": [ +"CAPABILITY_UNSPECIFIED", +"STRETCHED_CLUSTERS" +], +"enumDescriptions": [ +"The default value. This value is used if the capability is omitted or unknown.", +"This node type supports stretch clusters." +], +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"diskSizeGb": { +"description": "Output only. The amount of storage available, defined in GB.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"displayName": { +"description": "Output only. The friendly name for this node type. For example: ve1-standard-72", +"readOnly": true, +"type": "string" +}, +"families": { +"description": "Output only. Families of the node type. For node types to be in the same cluster they must share at least one element in the `families`.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"kind": { +"description": "Output only. The type of the resource.", +"enum": [ +"KIND_UNSPECIFIED", +"STANDARD", +"STORAGE_ONLY" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"Standard HCI node.", +"Storage only Node." +], +"readOnly": true, +"type": "string" +}, +"memoryGb": { +"description": "Output only. The amount of physical memory available, defined in GB.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"name": { +"description": "Output only. The resource name of this node type. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-proj/locations/us-central1-a/nodeTypes/standard-72`", +"readOnly": true, +"type": "string" +}, +"nodeTypeId": { +"description": "Output only. The canonical identifier of the node type (corresponds to the `NodeType`). For example: standard-72.", +"readOnly": true, +"type": "string" +}, +"totalCoreCount": { +"description": "Output only. The total number of CPU cores in a single node.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"virtualCpuCount": { +"description": "Output only. The total number of virtual CPUs in a single node.", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"NodeTypeConfig": { +"description": "Information about the type and number of nodes associated with the cluster.", +"id": "NodeTypeConfig", +"properties": { +"customCoreCount": { +"description": "Optional. Customized number of cores available to each node of the type. This number must always be one of `nodeType.availableCustomCoreCounts`. If zero is provided max value from `nodeType.availableCustomCoreCounts` will be used.", +"format": "int32", +"type": "integer" +}, +"nodeCount": { +"description": "Required. The number of nodes of this type in the cluster", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Nsx": { +"description": "Details about a NSX Manager appliance.", +"id": "Nsx", +"properties": { +"fqdn": { +"description": "Fully qualified domain name of the appliance.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of the appliance.", +"type": "string" +}, +"state": { +"description": "Output only. The state of the appliance.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING" +], +"enumDescriptions": [ +"Unspecified appliance state. This is the default value.", +"The appliance is operational and can be used.", +"The appliance is being deployed." +], +"readOnly": true, +"type": "string" +}, +"version": { +"description": "Version of the appliance.", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. True if the user has requested cancellation of the operation; false otherwise. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PeeringRoute": { +"description": "Exchanged network peering route.", +"id": "PeeringRoute", +"properties": { +"destRange": { +"description": "Output only. Destination range of the peering route in CIDR notation.", +"readOnly": true, +"type": "string" +}, +"direction": { +"description": "Output only. Direction of the routes exchanged with the peer network, from the VMware Engine network perspective: * Routes of direction `INCOMING` are imported from the peer network. * Routes of direction `OUTGOING` are exported from the intranet VPC network of the VMware Engine network.", +"enum": [ +"DIRECTION_UNSPECIFIED", +"INCOMING", +"OUTGOING" +], +"enumDescriptions": [ +"Unspecified exchanged routes direction. This is default.", +"Routes imported from the peer network.", +"Routes exported to the peer network." +], +"readOnly": true, +"type": "string" +}, +"imported": { +"description": "Output only. True if the peering route has been imported from a peered VPC network; false otherwise. The import happens if the field `NetworkPeering.importCustomRoutes` is true for this network, `NetworkPeering.exportCustomRoutes` is true for the peer VPC network, and the import does not result in a route conflict.", +"readOnly": true, +"type": "boolean" +}, +"nextHopRegion": { +"description": "Output only. Region containing the next hop of the peering route. This field only applies to dynamic routes in the peer VPC network.", +"readOnly": true, +"type": "string" +}, +"priority": { +"description": "Output only. The priority of the peering route.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Output only. Type of the route in the peer VPC network.", +"enum": [ +"TYPE_UNSPECIFIED", +"DYNAMIC_PEERING_ROUTE", +"STATIC_PEERING_ROUTE", +"SUBNET_PEERING_ROUTE" +], +"enumDescriptions": [ +"Unspecified peering route type. This is the default value.", +"Dynamic routes in the peer network.", +"Static routes in the peer network.", +"Created, updated, and removed automatically by Google Cloud when subnets are created, modified, or deleted in the peer network." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Principal": { +"description": "Users/Service accounts which have access for DNS binding on the intranet VPC corresponding to the consumer project.", +"id": "Principal", +"properties": { +"serviceAccount": { +"description": "The service account which needs to be granted the permission.", +"type": "string" +}, +"user": { +"description": "The user who needs to be granted permission.", +"type": "string" +} +}, +"type": "object" +}, +"PrivateCloud": { +"description": "Represents a private cloud resource. Private clouds of type `STANDARD` and `TIME_LIMITED` are zonal resources, `STRETCHED` private clouds are regional.", +"id": "PrivateCloud", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. Time when the resource was scheduled for deletion.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description for this private cloud.", +"type": "string" +}, +"expireTime": { +"description": "Output only. Time when the resource will be irreversibly deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"hcx": { +"$ref": "Hcx", +"description": "Output only. HCX appliance.", +"readOnly": true +}, +"managementCluster": { +"$ref": "ManagementCluster", +"description": "Required. Input only. The management cluster for this private cloud. This field is required during creation of the private cloud to provide details for the default cluster. The following fields can't be changed after private cloud creation: `ManagementCluster.clusterId`, `ManagementCluster.nodeTypeId`." +}, +"name": { +"description": "Output only. The resource name of this private cloud. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud`", +"readOnly": true, +"type": "string" +}, +"networkConfig": { +"$ref": "NetworkConfig", +"description": "Required. Network configuration of the private cloud." +}, +"nsx": { +"$ref": "Nsx", +"description": "Output only. NSX appliance.", +"readOnly": true +}, +"state": { +"description": "Output only. State of the resource. New values may be added to this enum when appropriate.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING", +"UPDATING", +"FAILED", +"DELETED", +"PURGING" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"The private cloud is ready.", +"The private cloud is being created.", +"The private cloud is being updated.", +"The private cloud is in failed state.", +"The private cloud is scheduled for deletion. The deletion process can be cancelled by using the corresponding undelete method.", +"The private cloud is irreversibly deleted and is being removed from the system." +], +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Optional. Type of the private cloud. Defaults to STANDARD.", +"enum": [ +"STANDARD", +"TIME_LIMITED", +"STRETCHED" +], +"enumDescriptions": [ +"Standard private is a zonal resource, with 3+ nodes. Default type.", +"Time limited private cloud is a zonal resource, can have only 1 node and has limited life span. Will be deleted after defined period of time, can be converted into standard private cloud by expanding it up to 3 or more nodes.", +"Stretched private cloud is a regional resource with redundancy, with a minimum of 6 nodes, nodes count has to be even." +], +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vcenter": { +"$ref": "Vcenter", +"description": "Output only. Vcenter appliance.", +"readOnly": true +} +}, +"type": "object" +}, +"PrivateConnection": { +"description": "Private connection resource that provides connectivity for VMware Engine private clouds.", +"id": "PrivateConnection", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Optional. User-provided description for this private connection.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the private connection. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1/privateConnections/my-connection`", +"readOnly": true, +"type": "string" +}, +"peeringId": { +"description": "Output only. VPC network peering id between given network VPC and VMwareEngineNetwork.", +"readOnly": true, +"type": "string" +}, +"peeringState": { +"description": "Output only. Peering state between service network and VMware Engine network.", +"enum": [ +"PEERING_STATE_UNSPECIFIED", +"PEERING_ACTIVE", +"PEERING_INACTIVE" +], +"enumDescriptions": [ +"The default value. This value is used if the peering state is omitted or unknown.", +"The peering is in active state.", +"The peering is in inactive state." +], +"readOnly": true, +"type": "string" +}, +"routingMode": { +"description": "Optional. Routing Mode. Default value is set to GLOBAL. For type = PRIVATE_SERVICE_ACCESS, this field can be set to GLOBAL or REGIONAL, for other types only GLOBAL is supported.", +"enum": [ +"ROUTING_MODE_UNSPECIFIED", +"GLOBAL", +"REGIONAL" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"Global Routing Mode", +"Regional Routing Mode" +], +"type": "string" +}, +"serviceNetwork": { +"description": "Required. Service network to create private connection. Specify the name in the following form: `projects/{project}/global/networks/{network_id}` For type = PRIVATE_SERVICE_ACCESS, this field represents servicenetworking VPC, e.g. projects/project-tp/global/networks/servicenetworking. For type = NETAPP_CLOUD_VOLUME, this field represents NetApp service VPC, e.g. projects/project-tp/global/networks/netapp-tenant-vpc. For type = DELL_POWERSCALE, this field represent Dell service VPC, e.g. projects/project-tp/global/networks/dell-tenant-vpc. For type= THIRD_PARTY_SERVICE, this field could represent a consumer VPC or any other producer VPC to which the VMware Engine Network needs to be connected, e.g. projects/project/global/networks/vpc.", +"type": "string" +}, +"state": { +"description": "Output only. State of the private connection.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"UPDATING", +"DELETING", +"UNPROVISIONED", +"FAILED" +], +"enumDescriptions": [ +"The default value. This value is used if the state is omitted.", +"The private connection is being created.", +"The private connection is ready.", +"The private connection is being updated.", +"The private connection is being deleted.", +"The private connection is not provisioned, since no private cloud is present for which this private connection is needed.", +"The private connection is in failed state." +], +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. Private connection type.", +"enum": [ +"TYPE_UNSPECIFIED", +"PRIVATE_SERVICE_ACCESS", +"NETAPP_CLOUD_VOLUMES", +"DELL_POWERSCALE", +"THIRD_PARTY_SERVICE" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"Connection used for establishing [private services access](https://cloud.google.com/vpc/docs/private-services-access).", +"Connection used for connecting to NetApp Cloud Volumes.", +"Connection used for connecting to Dell PowerScale.", +"Connection used for connecting to third-party services." +], +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vmwareEngineNetwork": { +"description": "Required. The relative resource name of Legacy VMware Engine network. Specify the name in the following form: `projects/{project}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}` where `{project}`, `{location}` will be same as specified in private connection resource name and `{vmware_engine_network_id}` will be in the form of `{location}`-default e.g. projects/project/locations/us-central1/vmwareEngineNetworks/us-central1-default.", +"type": "string" +}, +"vmwareEngineNetworkCanonical": { +"description": "Output only. The canonical name of the VMware Engine network in the form: `projects/{project_number}/locations/{location}/vmwareEngineNetworks/{vmware_engine_network_id}`", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"RepairManagementDnsZoneBindingRequest": { +"description": "Request message for VmwareEngine.RepairManagementDnsZoneBindings", +"id": "RepairManagementDnsZoneBindingRequest", +"properties": { +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if the original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"ResetNsxCredentialsRequest": { +"description": "Request message for VmwareEngine.ResetNsxCredentials", +"id": "ResetNsxCredentialsRequest", +"properties": { +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"ResetVcenterCredentialsRequest": { +"description": "Request message for VmwareEngine.ResetVcenterCredentials", +"id": "ResetVcenterCredentialsRequest", +"properties": { +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +}, +"username": { +"description": "Optional. The username of the user to be to reset the credentials. The default value of this field is CloudOwner@gve.local. The provided value should be one of the following: solution-user-01@gve.local, solution-user-02@gve.local, solution-user-03@gve.local, solution-user-04@gve.local, solution-user-05@gve.local, zertoadmin@gve.local.", +"type": "string" +} +}, +"type": "object" +}, +"RevokeDnsBindPermissionRequest": { +"description": "Request message for VmwareEngine.RevokeDnsBindPermission", +"id": "RevokeDnsBindPermissionRequest", +"properties": { +"principal": { +"$ref": "Principal", +"description": "Required. The consumer provided user/service account which needs to be granted permission to bind with the intranet VPC corresponding to the consumer project." +}, +"requestId": { +"description": "Optional. A request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server guarantees that a request doesn't result in creation of duplicate commitments for at least 60 minutes. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StretchedClusterConfig": { +"description": "Configuration of a stretched cluster.", +"id": "StretchedClusterConfig", +"properties": { +"preferredLocation": { +"description": "Required. Zone that will remain operational when connection between the two zones is lost. Specify the resource name of a zone that belongs to the region of the private cloud. For example: `projects/{project}/locations/europe-west3-a` where `{project}` can either be a project number or a project ID.", +"type": "string" +}, +"secondaryLocation": { +"description": "Required. Additional zone for a higher level of availability and load balancing. Specify the resource name of a zone that belongs to the region of the private cloud. For example: `projects/{project}/locations/europe-west3-b` where `{project}` can either be a project number or a project ID.", +"type": "string" +} +}, +"type": "object" +}, +"Subnet": { +"description": "Subnet in a private cloud. Either `management` subnets (such as vMotion) that are read-only, or `userDefined`, which can also be updated.", +"id": "Subnet", +"properties": { +"gatewayIp": { +"description": "The IP address of the gateway of this subnet. Must fall within the IP prefix defined above.", +"type": "string" +}, +"ipCidrRange": { +"description": "The IP address range of the subnet in CIDR format '10.0.0.0/24'.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of this subnet. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/us-central1-a/privateClouds/my-cloud/subnets/my-subnet`", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the resource.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING", +"UPDATING", +"DELETING", +"RECONCILING", +"FAILED" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"The subnet is ready.", +"The subnet is being created.", +"The subnet is being updated.", +"The subnet is being deleted.", +"Changes requested in the last operation are being propagated.", +"Last operation on the subnet did not succeed. Subnet's payload is reverted back to its most recent working state." +], +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Output only. The type of the subnet. For example \"management\" or \"userDefined\".", +"readOnly": true, +"type": "string" +}, +"vlanId": { +"description": "Output only. VLAN ID of the VLAN on which the subnet is configured", +"format": "int32", +"readOnly": true, +"type": "integer" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"UndeletePrivateCloudRequest": { +"description": "Request message for VmwareEngine.UndeletePrivateCloud", +"id": "UndeletePrivateCloudRequest", +"properties": { +"requestId": { +"description": "Optional. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"Vcenter": { +"description": "Details about a vCenter Server management appliance.", +"id": "Vcenter", +"properties": { +"fqdn": { +"description": "Fully qualified domain name of the appliance.", +"type": "string" +}, +"internalIp": { +"description": "Internal IP address of the appliance.", +"type": "string" +}, +"state": { +"description": "Output only. The state of the appliance.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"CREATING" +], +"enumDescriptions": [ +"Unspecified appliance state. This is the default value.", +"The appliance is operational and can be used.", +"The appliance is being deployed." +], +"readOnly": true, +"type": "string" +}, +"version": { +"description": "Version of the appliance.", +"type": "string" +} +}, +"type": "object" +}, +"VmwareEngineNetwork": { +"description": "VMware Engine network resource that provides connectivity for VMware Engine private clouds.", +"id": "VmwareEngineNetwork", +"properties": { +"createTime": { +"description": "Output only. Creation time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "User-provided description for this VMware Engine network.", +"type": "string" +}, +"etag": { +"description": "Checksum that may be sent on update and delete requests to ensure that the user-provided value is up to date before the server processes a request. The server computes checksums based on the value of other fields in the request.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the VMware Engine network. Resource names are schemeless URIs that follow the conventions in https://cloud.google.com/apis/design/resource_names. For example: `projects/my-project/locations/global/vmwareEngineNetworks/my-network`", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. State of the VMware Engine network.", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"UPDATING", +"DELETING" +], +"enumDescriptions": [ +"The default value. This value is used if the state is omitted.", +"The VMware Engine network is being created.", +"The VMware Engine network is ready.", +"The VMware Engine network is being updated.", +"The VMware Engine network is being deleted." +], +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Required. VMware Engine network type.", +"enum": [ +"TYPE_UNSPECIFIED", +"LEGACY", +"STANDARD" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"Network type used by private clouds created in projects without a network of type `STANDARD`. This network type is no longer used for new VMware Engine private cloud deployments.", +"Standard network type used for private cloud connectivity." +], +"type": "string" +}, +"uid": { +"description": "Output only. System-generated unique identifier for the resource.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Last update time of this resource.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"vpcNetworks": { +"description": "Output only. VMware Engine service VPC networks that provide connectivity from a private cloud to customer projects, the internet, and other Google Cloud services.", +"items": { +"$ref": "VpcNetwork" +}, +"readOnly": true, +"type": "array" +} +}, +"type": "object" +}, +"VpcNetwork": { +"description": "Represents a VMware Engine VPC network that is managed by a VMware Engine network resource.", +"id": "VpcNetwork", +"properties": { +"network": { +"description": "Output only. The relative resource name of the service VPC network this VMware Engine network is attached to. For example: `projects/123123/global/networks/my-network`", +"readOnly": true, +"type": "string" +}, +"type": { +"description": "Output only. Type of VPC network (INTRANET, INTERNET, or GOOGLE_CLOUD)", +"enum": [ +"TYPE_UNSPECIFIED", +"INTRANET", +"INTERNET", +"GOOGLE_CLOUD" +], +"enumDescriptions": [ +"The default value. This value should never be used.", +"VPC network that will be peered with a consumer VPC network or the intranet VPC of another VMware Engine network. Access a private cloud through Compute Engine VMs on a peered VPC network or an on-premises resource connected to a peered consumer VPC network.", +"VPC network used for internet access to and from a private cloud.", +"VPC network used for access to Google Cloud services like Cloud Storage." +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "VMware Engine API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vpcaccess.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vpcaccess.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..aa215abfcd48f10848a393880da0cf92871d67cd --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vpcaccess.v1.json @@ -0,0 +1,723 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://vpcaccess.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Serverless VPC Access", +"description": "API for managing VPC access connectors.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/vpc/docs/configure-serverless-vpc-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vpcaccess:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vpcaccess.mtls.googleapis.com/", +"name": "vpcaccess", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"connectors": { +"methods": { +"create": { +"description": "Creates a Serverless VPC Access connector, returns an operation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectors", +"httpMethod": "POST", +"id": "vpcaccess.projects.locations.connectors.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"connectorId": { +"description": "Required. The ID to use for this connector.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project ID and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/connectors", +"request": { +"$ref": "Connector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", +"httpMethod": "DELETE", +"id": "vpcaccess.projects.locations.connectors.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of a Serverless VPC Access connector to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.connectors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of a Serverless VPC Access connector to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Connector" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Serverless VPC Access connectors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectors", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.connectors.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of functions to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Continuation token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the routes should be listed.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/connectors", +"response": { +"$ref": "ListConnectorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Serverless VPC Access connector, returns an operation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", +"httpMethod": "PATCH", +"id": "vpcaccess.projects.locations.connectors.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name in the format `projects/*/locations/*/connectors/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The fields to update on the entry group. If absent or empty, all modifiable fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Connector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240314", +"rootUrl": "https://vpcaccess.googleapis.com/", +"schemas": { +"Connector": { +"description": "Definition of a Serverless VPC Access connector.", +"id": "Connector", +"properties": { +"connectedProjects": { +"description": "Output only. List of projects using the connector.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"ipCidrRange": { +"description": "The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.", +"type": "string" +}, +"machineType": { +"description": "Machine type of VM Instance underlying connector. Default is e2-micro", +"type": "string" +}, +"maxInstances": { +"description": "Maximum value of instances in autoscaling group underlying the connector.", +"format": "int32", +"type": "integer" +}, +"maxThroughput": { +"description": "Maximum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by --min-throughput. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput. The use of `max-throughput` is discouraged in favor of `max-instances`.", +"format": "int32", +"type": "integer" +}, +"minInstances": { +"description": "Minimum value of instances in autoscaling group underlying the connector.", +"format": "int32", +"type": "integer" +}, +"minThroughput": { +"description": "Minimum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by --max-throughput. If both min-throughput and min-instances are provided, min-instances takes precedence over min-throughput. The use of `min-throughput` is discouraged in favor of `min-instances`.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The resource name in the format `projects/*/locations/*/connectors/*`.", +"type": "string" +}, +"network": { +"description": "Name of a VPC network.", +"type": "string" +}, +"state": { +"description": "Output only. State of the VPC access connector.", +"enum": [ +"STATE_UNSPECIFIED", +"READY", +"CREATING", +"DELETING", +"ERROR", +"UPDATING" +], +"enumDescriptions": [ +"Invalid state.", +"Connector is deployed and ready to receive traffic.", +"An Insert operation is in progress. Transient condition.", +"A Delete operation is in progress. Transient condition.", +"Connector is in a bad state, manual deletion recommended.", +"The connector is being updated." +], +"readOnly": true, +"type": "string" +}, +"subnet": { +"$ref": "Subnet", +"description": "The subnet in which to house the VPC Access Connector." +} +}, +"type": "object" +}, +"ListConnectorsResponse": { +"description": "Response for listing Serverless VPC Access connectors.", +"id": "ListConnectorsResponse", +"properties": { +"connectors": { +"description": "List of Serverless VPC Access connectors.", +"items": { +"$ref": "Connector" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata for google.longrunning.Operation.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "Output only. Time when the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Time when the operation completed.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"method": { +"description": "Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1.Connectors.CreateConnector.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadataV1Alpha1": { +"description": "Metadata for google.longrunning.Operation.", +"id": "OperationMetadataV1Alpha1", +"properties": { +"endTime": { +"description": "Output only. Time when the operation completed.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"insertTime": { +"description": "Output only. Time when the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"method": { +"description": "Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1alpha1.Connectors.CreateConnector.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadataV1Beta1": { +"description": "Metadata for google.longrunning.Operation.", +"id": "OperationMetadataV1Beta1", +"properties": { +"createTime": { +"description": "Output only. Time when the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Time when the operation completed.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"method": { +"description": "Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1beta1.Connectors.CreateConnector.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subnet": { +"description": "The subnet in which to house the connector", +"id": "Subnet", +"properties": { +"name": { +"description": "Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}", +"type": "string" +}, +"projectId": { +"description": "Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Serverless VPC Access API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vpcaccess.v1beta1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vpcaccess.v1beta1.json new file mode 100644 index 0000000000000000000000000000000000000000..3168ff08a74ba3839f12af5a3b8000cd3d10a809 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/vpcaccess.v1beta1.json @@ -0,0 +1,735 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://vpcaccess.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Serverless VPC Access", +"description": "API for managing VPC access connectors.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/vpc/docs/configure-serverless-vpc-access", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "vpcaccess:v1beta1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://vpcaccess.mtls.googleapis.com/", +"name": "vpcaccess", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"connectors": { +"methods": { +"create": { +"description": "Creates a Serverless VPC Access connector, returns an operation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/connectors", +"httpMethod": "POST", +"id": "vpcaccess.projects.locations.connectors.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"connectorId": { +"description": "Required. The ID to use for this connector.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project ID and location in which the configuration should be created, specified in the format `projects/*/locations/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/connectors", +"request": { +"$ref": "Connector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", +"httpMethod": "DELETE", +"id": "vpcaccess.projects.locations.connectors.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of a Serverless VPC Access connector to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.connectors.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of a Serverless VPC Access connector to get.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Connector" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Serverless VPC Access connectors.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/connectors", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.connectors.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of functions to return per call.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Continuation token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The project and location from which the routes should be listed.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+parent}/connectors", +"response": { +"$ref": "ListConnectorsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a Serverless VPC Access connector, returns an operation.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/connectors/{connectorsId}", +"httpMethod": "PATCH", +"id": "vpcaccess.projects.locations.connectors.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name in the format `projects/*/locations/*/connectors/*`.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/connectors/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "The fields to update on the entry group. If absent or empty, all modifiable fields are updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"request": { +"$ref": "Connector" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "vpcaccess.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240229", +"rootUrl": "https://vpcaccess.googleapis.com/", +"schemas": { +"Connector": { +"description": "Definition of a Serverless VPC Access connector.", +"id": "Connector", +"properties": { +"connectedProjects": { +"description": "Output only. List of projects using the connector.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"createTime": { +"description": "Output only. The creation time of the connector.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"ipCidrRange": { +"description": "The range of internal addresses that follows RFC 4632 notation. Example: `10.132.0.0/28`.", +"type": "string" +}, +"lastRestartTime": { +"description": "Output only. The last restart time of the connector.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"machineType": { +"description": "Machine type of VM Instance underlying connector. Default is e2-micro", +"type": "string" +}, +"maxInstances": { +"description": "Maximum value of instances in autoscaling group underlying the connector.", +"format": "int32", +"type": "integer" +}, +"maxThroughput": { +"description": "Maximum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 300 through 1000. Must be higher than the value specified by --min-throughput. If both max-throughput and max-instances are provided, max-instances takes precedence over max-throughput. The use of `max-throughput` is discouraged in favor of `max-instances`.", +"format": "int32", +"type": "integer" +}, +"minInstances": { +"description": "Minimum value of instances in autoscaling group underlying the connector.", +"format": "int32", +"type": "integer" +}, +"minThroughput": { +"description": "Minimum throughput of the connector in Mbps. Refers to the expected throughput when using an `e2-micro` machine type. Value must be a multiple of 100 from 200 through 900. Must be lower than the value specified by --max-throughput. If both min-throughput and min-instances are provided, min-instances takes precedence over min-throughput. The use of `min-throughput` is discouraged in favor of `min-instances`.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The resource name in the format `projects/*/locations/*/connectors/*`.", +"type": "string" +}, +"network": { +"description": "Name of a VPC network.", +"type": "string" +}, +"state": { +"description": "Output only. State of the VPC access connector.", +"enum": [ +"STATE_UNSPECIFIED", +"READY", +"CREATING", +"DELETING", +"ERROR", +"UPDATING" +], +"enumDescriptions": [ +"Invalid state.", +"Connector is deployed and ready to receive traffic.", +"An Insert operation is in progress. Transient condition.", +"A Delete operation is in progress. Transient condition.", +"Connector is in a bad state, manual deletion recommended.", +"The connector is being updated." +], +"readOnly": true, +"type": "string" +}, +"subnet": { +"$ref": "Subnet", +"description": "The subnet in which to house the VPC Access Connector." +} +}, +"type": "object" +}, +"ListConnectorsResponse": { +"description": "Response for listing Serverless VPC Access connectors.", +"id": "ListConnectorsResponse", +"properties": { +"connectors": { +"description": "List of Serverless VPC Access connectors.", +"items": { +"$ref": "Connector" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Continuation token.", +"type": "string" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata for google.longrunning.Operation.", +"id": "OperationMetadata", +"properties": { +"createTime": { +"description": "Output only. Time when the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Time when the operation completed.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"method": { +"description": "Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1.Connectors.CreateConnector.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadataV1Alpha1": { +"description": "Metadata for google.longrunning.Operation.", +"id": "OperationMetadataV1Alpha1", +"properties": { +"endTime": { +"description": "Output only. Time when the operation completed.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"insertTime": { +"description": "Output only. Time when the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"method": { +"description": "Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1alpha1.Connectors.CreateConnector.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"OperationMetadataV1Beta1": { +"description": "Metadata for google.longrunning.Operation.", +"id": "OperationMetadataV1Beta1", +"properties": { +"createTime": { +"description": "Output only. Time when the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Time when the operation completed.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"method": { +"description": "Output only. Method that initiated the operation e.g. google.cloud.vpcaccess.v1beta1.Connectors.CreateConnector.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Name of the resource that this operation is acting on e.g. projects/my-project/locations/us-central1/connectors/v1.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subnet": { +"description": "The subnet in which to house the connector", +"id": "Subnet", +"properties": { +"name": { +"description": "Subnet name (relative, not fully qualified). E.g. if the full subnet selfLink is https://compute.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetName} the correct input for this field would be {subnetName}", +"type": "string" +}, +"projectId": { +"description": "Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Serverless VPC Access API", +"version": "v1beta1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/walletobjects.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/walletobjects.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..0bdbd93f2f3dd16b9058734a0411dd56b3f5807b --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/walletobjects.v1.json @@ -0,0 +1,9185 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/wallet_object.issuer": { +"description": "Private Service: https://www.googleapis.com/auth/wallet_object.issuer" +} +} +} +}, +"basePath": "", +"baseUrl": "https://walletobjects.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Walletobjects", +"description": "API for issuers to save and manage Google Wallet Objects.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/pay/passes", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "walletobjects:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://walletobjects.mtls.googleapis.com/", +"name": "walletobjects", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"eventticketclass": { +"methods": { +"addmessage": { +"description": "Adds a message to the event ticket class referenced by the given class ID.", +"flatPath": "walletobjects/v1/eventTicketClass/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.eventticketclass.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketClass/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "EventTicketClassAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the event ticket class with the given class ID.", +"flatPath": "walletobjects/v1/eventTicketClass/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.eventticketclass.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketClass/{resourceId}", +"response": { +"$ref": "EventTicketClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an event ticket class with the given ID and properties.", +"flatPath": "walletobjects/v1/eventTicketClass", +"httpMethod": "POST", +"id": "walletobjects.eventticketclass.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/eventTicketClass", +"request": { +"$ref": "EventTicketClass" +}, +"response": { +"$ref": "EventTicketClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all event ticket classes for a given issuer ID.", +"flatPath": "walletobjects/v1/eventTicketClass", +"httpMethod": "GET", +"id": "walletobjects.eventticketclass.list", +"parameterOrder": [], +"parameters": { +"issuerId": { +"description": "The ID of the issuer authorized to list classes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` classes are available in a list. For example, if you have a list of 200 classes and you call list with `maxResults` set to 20, list will return the first 20 classes and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 classes.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketClass", +"response": { +"$ref": "EventTicketClassListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the event ticket class referenced by the given class ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/eventTicketClass/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.eventticketclass.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketClass/{resourceId}", +"request": { +"$ref": "EventTicketClass" +}, +"response": { +"$ref": "EventTicketClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the event ticket class referenced by the given class ID.", +"flatPath": "walletobjects/v1/eventTicketClass/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.eventticketclass.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketClass/{resourceId}", +"request": { +"$ref": "EventTicketClass" +}, +"response": { +"$ref": "EventTicketClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"eventticketobject": { +"methods": { +"addmessage": { +"description": "Adds a message to the event ticket object referenced by the given object ID.", +"flatPath": "walletobjects/v1/eventTicketObject/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.eventticketobject.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketObject/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "EventTicketObjectAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the event ticket object with the given object ID.", +"flatPath": "walletobjects/v1/eventTicketObject/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.eventticketobject.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketObject/{resourceId}", +"response": { +"$ref": "EventTicketObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an event ticket object with the given ID and properties.", +"flatPath": "walletobjects/v1/eventTicketObject", +"httpMethod": "POST", +"id": "walletobjects.eventticketobject.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/eventTicketObject", +"request": { +"$ref": "EventTicketObject" +}, +"response": { +"$ref": "EventTicketObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all event ticket objects for a given issuer ID.", +"flatPath": "walletobjects/v1/eventTicketObject", +"httpMethod": "GET", +"id": "walletobjects.eventticketobject.list", +"parameterOrder": [], +"parameters": { +"classId": { +"description": "The ID of the class whose objects will be listed.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` objects are available in a list. For example, if you have a list of 200 objects and you call list with `maxResults` set to 20, list will return the first 20 objects and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 objects.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketObject", +"response": { +"$ref": "EventTicketObjectListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"modifylinkedofferobjects": { +"description": "Modifies linked offer objects for the event ticket object with the given ID.", +"flatPath": "walletobjects/v1/eventTicketObject/{resourceId}/modifyLinkedOfferObjects", +"httpMethod": "POST", +"id": "walletobjects.eventticketobject.modifylinkedofferobjects", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketObject/{resourceId}/modifyLinkedOfferObjects", +"request": { +"$ref": "ModifyLinkedOfferObjectsRequest" +}, +"response": { +"$ref": "EventTicketObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the event ticket object referenced by the given object ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/eventTicketObject/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.eventticketobject.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketObject/{resourceId}", +"request": { +"$ref": "EventTicketObject" +}, +"response": { +"$ref": "EventTicketObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the event ticket object referenced by the given object ID.", +"flatPath": "walletobjects/v1/eventTicketObject/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.eventticketobject.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/eventTicketObject/{resourceId}", +"request": { +"$ref": "EventTicketObject" +}, +"response": { +"$ref": "EventTicketObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"flightclass": { +"methods": { +"addmessage": { +"description": "Adds a message to the flight class referenced by the given class ID.", +"flatPath": "walletobjects/v1/flightClass/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.flightclass.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightClass/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "FlightClassAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the flight class with the given class ID.", +"flatPath": "walletobjects/v1/flightClass/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.flightclass.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightClass/{resourceId}", +"response": { +"$ref": "FlightClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an flight class with the given ID and properties.", +"flatPath": "walletobjects/v1/flightClass", +"httpMethod": "POST", +"id": "walletobjects.flightclass.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/flightClass", +"request": { +"$ref": "FlightClass" +}, +"response": { +"$ref": "FlightClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all flight classes for a given issuer ID.", +"flatPath": "walletobjects/v1/flightClass", +"httpMethod": "GET", +"id": "walletobjects.flightclass.list", +"parameterOrder": [], +"parameters": { +"issuerId": { +"description": "The ID of the issuer authorized to list classes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` classes are available in a list. For example, if you have a list of 200 classes and you call list with `maxResults` set to 20, list will return the first 20 classes and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 classes.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/flightClass", +"response": { +"$ref": "FlightClassListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the flight class referenced by the given class ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/flightClass/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.flightclass.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightClass/{resourceId}", +"request": { +"$ref": "FlightClass" +}, +"response": { +"$ref": "FlightClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the flight class referenced by the given class ID.", +"flatPath": "walletobjects/v1/flightClass/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.flightclass.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightClass/{resourceId}", +"request": { +"$ref": "FlightClass" +}, +"response": { +"$ref": "FlightClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"flightobject": { +"methods": { +"addmessage": { +"description": "Adds a message to the flight object referenced by the given object ID.", +"flatPath": "walletobjects/v1/flightObject/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.flightobject.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightObject/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "FlightObjectAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the flight object with the given object ID.", +"flatPath": "walletobjects/v1/flightObject/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.flightobject.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightObject/{resourceId}", +"response": { +"$ref": "FlightObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an flight object with the given ID and properties.", +"flatPath": "walletobjects/v1/flightObject", +"httpMethod": "POST", +"id": "walletobjects.flightobject.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/flightObject", +"request": { +"$ref": "FlightObject" +}, +"response": { +"$ref": "FlightObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all flight objects for a given issuer ID.", +"flatPath": "walletobjects/v1/flightObject", +"httpMethod": "GET", +"id": "walletobjects.flightobject.list", +"parameterOrder": [], +"parameters": { +"classId": { +"description": "The ID of the class whose objects will be listed.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` objects are available in a list. For example, if you have a list of 200 objects and you call list with `maxResults` set to 20, list will return the first 20 objects and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 objects.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/flightObject", +"response": { +"$ref": "FlightObjectListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the flight object referenced by the given object ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/flightObject/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.flightobject.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightObject/{resourceId}", +"request": { +"$ref": "FlightObject" +}, +"response": { +"$ref": "FlightObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the flight object referenced by the given object ID.", +"flatPath": "walletobjects/v1/flightObject/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.flightobject.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/flightObject/{resourceId}", +"request": { +"$ref": "FlightObject" +}, +"response": { +"$ref": "FlightObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"genericclass": { +"methods": { +"addmessage": { +"description": "Adds a message to the generic class referenced by the given class ID.", +"flatPath": "walletobjects/v1/genericClass/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.genericclass.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericClass/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "GenericClassAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the generic class with the given class ID.", +"flatPath": "walletobjects/v1/genericClass/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.genericclass.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericClass/{resourceId}", +"response": { +"$ref": "GenericClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts a generic class with the given ID and properties.", +"flatPath": "walletobjects/v1/genericClass", +"httpMethod": "POST", +"id": "walletobjects.genericclass.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/genericClass", +"request": { +"$ref": "GenericClass" +}, +"response": { +"$ref": "GenericClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all generic classes for a given issuer ID.", +"flatPath": "walletobjects/v1/genericClass", +"httpMethod": "GET", +"id": "walletobjects.genericclass.list", +"parameterOrder": [], +"parameters": { +"issuerId": { +"description": "The ID of the issuer authorized to list classes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` classes are available in a list. For example, if you have a list of 200 classes and you call list with `maxResults` set to 20, list will return the first 20 classes and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 classes.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/genericClass", +"response": { +"$ref": "GenericClassListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the generic class referenced by the given class ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/genericClass/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.genericclass.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericClass/{resourceId}", +"request": { +"$ref": "GenericClass" +}, +"response": { +"$ref": "GenericClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the Generic class referenced by the given class ID.", +"flatPath": "walletobjects/v1/genericClass/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.genericclass.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericClass/{resourceId}", +"request": { +"$ref": "GenericClass" +}, +"response": { +"$ref": "GenericClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"genericobject": { +"methods": { +"addmessage": { +"description": "Adds a message to the generic object referenced by the given object ID.", +"flatPath": "walletobjects/v1/genericObject/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.genericobject.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericObject/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "GenericObjectAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the generic object with the given object ID.", +"flatPath": "walletobjects/v1/genericObject/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.genericobject.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericObject/{resourceId}", +"response": { +"$ref": "GenericObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts a generic object with the given ID and properties.", +"flatPath": "walletobjects/v1/genericObject", +"httpMethod": "POST", +"id": "walletobjects.genericobject.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/genericObject", +"request": { +"$ref": "GenericObject" +}, +"response": { +"$ref": "GenericObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all generic objects for a given issuer ID.", +"flatPath": "walletobjects/v1/genericObject", +"httpMethod": "GET", +"id": "walletobjects.genericobject.list", +"parameterOrder": [], +"parameters": { +"classId": { +"description": "The ID of the class whose objects will be listed.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` objects are available in a list. For example, if you have a list of 200 objects and you call list with `maxResults` set to 20, list will return the first 20 objects and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 objects.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/genericObject", +"response": { +"$ref": "GenericObjectListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the generic object referenced by the given object ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/genericObject/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.genericobject.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericObject/{resourceId}", +"request": { +"$ref": "GenericObject" +}, +"response": { +"$ref": "GenericObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the generic object referenced by the given object ID.", +"flatPath": "walletobjects/v1/genericObject/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.genericobject.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/genericObject/{resourceId}", +"request": { +"$ref": "GenericObject" +}, +"response": { +"$ref": "GenericObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"giftcardclass": { +"methods": { +"addmessage": { +"description": "Adds a message to the gift card class referenced by the given class ID.", +"flatPath": "walletobjects/v1/giftCardClass/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.giftcardclass.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardClass/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "GiftCardClassAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the gift card class with the given class ID.", +"flatPath": "walletobjects/v1/giftCardClass/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.giftcardclass.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardClass/{resourceId}", +"response": { +"$ref": "GiftCardClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an gift card class with the given ID and properties.", +"flatPath": "walletobjects/v1/giftCardClass", +"httpMethod": "POST", +"id": "walletobjects.giftcardclass.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/giftCardClass", +"request": { +"$ref": "GiftCardClass" +}, +"response": { +"$ref": "GiftCardClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all gift card classes for a given issuer ID.", +"flatPath": "walletobjects/v1/giftCardClass", +"httpMethod": "GET", +"id": "walletobjects.giftcardclass.list", +"parameterOrder": [], +"parameters": { +"issuerId": { +"description": "The ID of the issuer authorized to list classes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` classes are available in a list. For example, if you have a list of 200 classes and you call list with `maxResults` set to 20, list will return the first 20 classes and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 classes.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardClass", +"response": { +"$ref": "GiftCardClassListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the gift card class referenced by the given class ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/giftCardClass/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.giftcardclass.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardClass/{resourceId}", +"request": { +"$ref": "GiftCardClass" +}, +"response": { +"$ref": "GiftCardClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the gift card class referenced by the given class ID.", +"flatPath": "walletobjects/v1/giftCardClass/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.giftcardclass.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardClass/{resourceId}", +"request": { +"$ref": "GiftCardClass" +}, +"response": { +"$ref": "GiftCardClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"giftcardobject": { +"methods": { +"addmessage": { +"description": "Adds a message to the gift card object referenced by the given object ID.", +"flatPath": "walletobjects/v1/giftCardObject/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.giftcardobject.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardObject/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "GiftCardObjectAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the gift card object with the given object ID.", +"flatPath": "walletobjects/v1/giftCardObject/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.giftcardobject.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardObject/{resourceId}", +"response": { +"$ref": "GiftCardObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an gift card object with the given ID and properties.", +"flatPath": "walletobjects/v1/giftCardObject", +"httpMethod": "POST", +"id": "walletobjects.giftcardobject.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/giftCardObject", +"request": { +"$ref": "GiftCardObject" +}, +"response": { +"$ref": "GiftCardObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all gift card objects for a given issuer ID.", +"flatPath": "walletobjects/v1/giftCardObject", +"httpMethod": "GET", +"id": "walletobjects.giftcardobject.list", +"parameterOrder": [], +"parameters": { +"classId": { +"description": "The ID of the class whose objects will be listed.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` objects are available in a list. For example, if you have a list of 200 objects and you call list with `maxResults` set to 20, list will return the first 20 objects and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 objects.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardObject", +"response": { +"$ref": "GiftCardObjectListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the gift card object referenced by the given object ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/giftCardObject/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.giftcardobject.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardObject/{resourceId}", +"request": { +"$ref": "GiftCardObject" +}, +"response": { +"$ref": "GiftCardObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the gift card object referenced by the given object ID.", +"flatPath": "walletobjects/v1/giftCardObject/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.giftcardobject.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/giftCardObject/{resourceId}", +"request": { +"$ref": "GiftCardObject" +}, +"response": { +"$ref": "GiftCardObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"issuer": { +"methods": { +"get": { +"description": "Returns the issuer with the given issuer ID.", +"flatPath": "walletobjects/v1/issuer/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.issuer.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an issuer.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/issuer/{resourceId}", +"response": { +"$ref": "Issuer" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an issuer with the given ID and properties.", +"flatPath": "walletobjects/v1/issuer", +"httpMethod": "POST", +"id": "walletobjects.issuer.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/issuer", +"request": { +"$ref": "Issuer" +}, +"response": { +"$ref": "Issuer" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all issuers shared to the caller.", +"flatPath": "walletobjects/v1/issuer", +"httpMethod": "GET", +"id": "walletobjects.issuer.list", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/issuer", +"response": { +"$ref": "IssuerListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the issuer referenced by the given issuer ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/issuer/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.issuer.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an issuer.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/issuer/{resourceId}", +"request": { +"$ref": "Issuer" +}, +"response": { +"$ref": "Issuer" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the issuer referenced by the given issuer ID.", +"flatPath": "walletobjects/v1/issuer/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.issuer.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an issuer.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/issuer/{resourceId}", +"request": { +"$ref": "Issuer" +}, +"response": { +"$ref": "Issuer" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"jwt": { +"methods": { +"insert": { +"description": "Inserts the resources in the JWT.", +"flatPath": "walletobjects/v1/jwt", +"httpMethod": "POST", +"id": "walletobjects.jwt.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/jwt", +"request": { +"$ref": "JwtResource" +}, +"response": { +"$ref": "JwtInsertResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"loyaltyclass": { +"methods": { +"addmessage": { +"description": "Adds a message to the loyalty class referenced by the given class ID.", +"flatPath": "walletobjects/v1/loyaltyClass/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.loyaltyclass.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyClass/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "LoyaltyClassAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the loyalty class with the given class ID.", +"flatPath": "walletobjects/v1/loyaltyClass/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.loyaltyclass.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyClass/{resourceId}", +"response": { +"$ref": "LoyaltyClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an loyalty class with the given ID and properties.", +"flatPath": "walletobjects/v1/loyaltyClass", +"httpMethod": "POST", +"id": "walletobjects.loyaltyclass.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/loyaltyClass", +"request": { +"$ref": "LoyaltyClass" +}, +"response": { +"$ref": "LoyaltyClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all loyalty classes for a given issuer ID.", +"flatPath": "walletobjects/v1/loyaltyClass", +"httpMethod": "GET", +"id": "walletobjects.loyaltyclass.list", +"parameterOrder": [], +"parameters": { +"issuerId": { +"description": "The ID of the issuer authorized to list classes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` classes are available in a list. For example, if you have a list of 200 classes and you call list with `maxResults` set to 20, list will return the first 20 classes and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 classes.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyClass", +"response": { +"$ref": "LoyaltyClassListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the loyalty class referenced by the given class ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/loyaltyClass/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.loyaltyclass.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyClass/{resourceId}", +"request": { +"$ref": "LoyaltyClass" +}, +"response": { +"$ref": "LoyaltyClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the loyalty class referenced by the given class ID.", +"flatPath": "walletobjects/v1/loyaltyClass/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.loyaltyclass.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyClass/{resourceId}", +"request": { +"$ref": "LoyaltyClass" +}, +"response": { +"$ref": "LoyaltyClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"loyaltyobject": { +"methods": { +"addmessage": { +"description": "Adds a message to the loyalty object referenced by the given object ID.", +"flatPath": "walletobjects/v1/loyaltyObject/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.loyaltyobject.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyObject/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "LoyaltyObjectAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the loyalty object with the given object ID.", +"flatPath": "walletobjects/v1/loyaltyObject/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.loyaltyobject.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyObject/{resourceId}", +"response": { +"$ref": "LoyaltyObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an loyalty object with the given ID and properties.", +"flatPath": "walletobjects/v1/loyaltyObject", +"httpMethod": "POST", +"id": "walletobjects.loyaltyobject.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/loyaltyObject", +"request": { +"$ref": "LoyaltyObject" +}, +"response": { +"$ref": "LoyaltyObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all loyalty objects for a given issuer ID.", +"flatPath": "walletobjects/v1/loyaltyObject", +"httpMethod": "GET", +"id": "walletobjects.loyaltyobject.list", +"parameterOrder": [], +"parameters": { +"classId": { +"description": "The ID of the class whose objects will be listed.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` objects are available in a list. For example, if you have a list of 200 objects and you call list with `maxResults` set to 20, list will return the first 20 objects and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 objects.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyObject", +"response": { +"$ref": "LoyaltyObjectListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"modifylinkedofferobjects": { +"description": "Modifies linked offer objects for the loyalty object with the given ID.", +"flatPath": "walletobjects/v1/loyaltyObject/{resourceId}/modifyLinkedOfferObjects", +"httpMethod": "POST", +"id": "walletobjects.loyaltyobject.modifylinkedofferobjects", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyObject/{resourceId}/modifyLinkedOfferObjects", +"request": { +"$ref": "ModifyLinkedOfferObjectsRequest" +}, +"response": { +"$ref": "LoyaltyObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the loyalty object referenced by the given object ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/loyaltyObject/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.loyaltyobject.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyObject/{resourceId}", +"request": { +"$ref": "LoyaltyObject" +}, +"response": { +"$ref": "LoyaltyObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the loyalty object referenced by the given object ID.", +"flatPath": "walletobjects/v1/loyaltyObject/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.loyaltyobject.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/loyaltyObject/{resourceId}", +"request": { +"$ref": "LoyaltyObject" +}, +"response": { +"$ref": "LoyaltyObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"media": { +"methods": { +"download": { +"description": "Downloads rotating barcode values for the transit object referenced by the given object ID.", +"flatPath": "walletobjects/v1/transitObject/{resourceId}/downloadRotatingBarcodeValues", +"httpMethod": "GET", +"id": "walletobjects.media.download", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitObject/{resourceId}/downloadRotatingBarcodeValues", +"response": { +"$ref": "Media" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +], +"supportsMediaDownload": true, +"useMediaDownloadService": true +}, +"upload": { +"description": "Uploads rotating barcode values for the transit object referenced by the given object ID. Note the max upload size is specified in google3/production/config/cdd/apps-upload/customers/payments-consumer-passes/config.gcl and enforced by Scotty.", +"flatPath": "walletobjects/v1/transitObject/{resourceId}/uploadRotatingBarcodeValues", +"httpMethod": "POST", +"id": "walletobjects.media.upload", +"mediaUpload": { +"accept": [ +"*/*" +], +"protocols": { +"simple": { +"multipart": true, +"path": "/upload/walletobjects/v1/transitObject/{resourceId}/uploadRotatingBarcodeValues" +} +} +}, +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitObject/{resourceId}/uploadRotatingBarcodeValues", +"request": { +"$ref": "TransitObjectUploadRotatingBarcodeValuesRequest" +}, +"response": { +"$ref": "TransitObjectUploadRotatingBarcodeValuesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +], +"supportsMediaUpload": true +} +} +}, +"offerclass": { +"methods": { +"addmessage": { +"description": "Adds a message to the offer class referenced by the given class ID.", +"flatPath": "walletobjects/v1/offerClass/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.offerclass.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerClass/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "OfferClassAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the offer class with the given class ID.", +"flatPath": "walletobjects/v1/offerClass/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.offerclass.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerClass/{resourceId}", +"response": { +"$ref": "OfferClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an offer class with the given ID and properties.", +"flatPath": "walletobjects/v1/offerClass", +"httpMethod": "POST", +"id": "walletobjects.offerclass.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/offerClass", +"request": { +"$ref": "OfferClass" +}, +"response": { +"$ref": "OfferClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all offer classes for a given issuer ID.", +"flatPath": "walletobjects/v1/offerClass", +"httpMethod": "GET", +"id": "walletobjects.offerclass.list", +"parameterOrder": [], +"parameters": { +"issuerId": { +"description": "The ID of the issuer authorized to list classes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` classes are available in a list. For example, if you have a list of 200 classes and you call list with `maxResults` set to 20, list will return the first 20 classes and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 classes.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/offerClass", +"response": { +"$ref": "OfferClassListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the offer class referenced by the given class ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/offerClass/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.offerclass.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerClass/{resourceId}", +"request": { +"$ref": "OfferClass" +}, +"response": { +"$ref": "OfferClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the offer class referenced by the given class ID.", +"flatPath": "walletobjects/v1/offerClass/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.offerclass.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerClass/{resourceId}", +"request": { +"$ref": "OfferClass" +}, +"response": { +"$ref": "OfferClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"offerobject": { +"methods": { +"addmessage": { +"description": "Adds a message to the offer object referenced by the given object ID.", +"flatPath": "walletobjects/v1/offerObject/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.offerobject.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerObject/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "OfferObjectAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the offer object with the given object ID.", +"flatPath": "walletobjects/v1/offerObject/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.offerobject.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerObject/{resourceId}", +"response": { +"$ref": "OfferObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an offer object with the given ID and properties.", +"flatPath": "walletobjects/v1/offerObject", +"httpMethod": "POST", +"id": "walletobjects.offerobject.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/offerObject", +"request": { +"$ref": "OfferObject" +}, +"response": { +"$ref": "OfferObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all offer objects for a given issuer ID.", +"flatPath": "walletobjects/v1/offerObject", +"httpMethod": "GET", +"id": "walletobjects.offerobject.list", +"parameterOrder": [], +"parameters": { +"classId": { +"description": "The ID of the class whose objects will be listed.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` objects are available in a list. For example, if you have a list of 200 objects and you call list with `maxResults` set to 20, list will return the first 20 objects and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 objects.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/offerObject", +"response": { +"$ref": "OfferObjectListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the offer object referenced by the given object ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/offerObject/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.offerobject.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerObject/{resourceId}", +"request": { +"$ref": "OfferObject" +}, +"response": { +"$ref": "OfferObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the offer object referenced by the given object ID.", +"flatPath": "walletobjects/v1/offerObject/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.offerobject.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/offerObject/{resourceId}", +"request": { +"$ref": "OfferObject" +}, +"response": { +"$ref": "OfferObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"permissions": { +"methods": { +"get": { +"description": "Returns the permissions for the given issuer id.", +"flatPath": "walletobjects/v1/permissions/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.permissions.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an issuer. This ID must be unique across all issuers.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/permissions/{resourceId}", +"response": { +"$ref": "Permissions" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the permissions for the given issuer.", +"flatPath": "walletobjects/v1/permissions/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.permissions.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an issuer. This ID must be unique across all issuers.", +"format": "int64", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/permissions/{resourceId}", +"request": { +"$ref": "Permissions" +}, +"response": { +"$ref": "Permissions" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"smarttap": { +"methods": { +"insert": { +"description": "Inserts the smart tap.", +"flatPath": "walletobjects/v1/smartTap", +"httpMethod": "POST", +"id": "walletobjects.smarttap.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/smartTap", +"request": { +"$ref": "SmartTap" +}, +"response": { +"$ref": "SmartTap" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"transitclass": { +"methods": { +"addmessage": { +"description": "Adds a message to the transit class referenced by the given class ID.", +"flatPath": "walletobjects/v1/transitClass/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.transitclass.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitClass/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "TransitClassAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the transit class with the given class ID.", +"flatPath": "walletobjects/v1/transitClass/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.transitclass.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitClass/{resourceId}", +"response": { +"$ref": "TransitClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts a transit class with the given ID and properties.", +"flatPath": "walletobjects/v1/transitClass", +"httpMethod": "POST", +"id": "walletobjects.transitclass.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/transitClass", +"request": { +"$ref": "TransitClass" +}, +"response": { +"$ref": "TransitClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all transit classes for a given issuer ID.", +"flatPath": "walletobjects/v1/transitClass", +"httpMethod": "GET", +"id": "walletobjects.transitclass.list", +"parameterOrder": [], +"parameters": { +"issuerId": { +"description": "The ID of the issuer authorized to list classes.", +"format": "int64", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` classes are available in a list. For example, if you have a list of 200 classes and you call list with `maxResults` set to 20, list will return the first 20 classes and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 classes.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/transitClass", +"response": { +"$ref": "TransitClassListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the transit class referenced by the given class ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/transitClass/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.transitclass.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitClass/{resourceId}", +"request": { +"$ref": "TransitClass" +}, +"response": { +"$ref": "TransitClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the transit class referenced by the given class ID.", +"flatPath": "walletobjects/v1/transitClass/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.transitclass.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitClass/{resourceId}", +"request": { +"$ref": "TransitClass" +}, +"response": { +"$ref": "TransitClass" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +}, +"transitobject": { +"methods": { +"addmessage": { +"description": "Adds a message to the transit object referenced by the given object ID.", +"flatPath": "walletobjects/v1/transitObject/{resourceId}/addMessage", +"httpMethod": "POST", +"id": "walletobjects.transitobject.addmessage", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitObject/{resourceId}/addMessage", +"request": { +"$ref": "AddMessageRequest" +}, +"response": { +"$ref": "TransitObjectAddMessageResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"get": { +"description": "Returns the transit object with the given object ID.", +"flatPath": "walletobjects/v1/transitObject/{resourceId}", +"httpMethod": "GET", +"id": "walletobjects.transitobject.get", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitObject/{resourceId}", +"response": { +"$ref": "TransitObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"insert": { +"description": "Inserts an transit object with the given ID and properties.", +"flatPath": "walletobjects/v1/transitObject", +"httpMethod": "POST", +"id": "walletobjects.transitobject.insert", +"parameterOrder": [], +"parameters": {}, +"path": "walletobjects/v1/transitObject", +"request": { +"$ref": "TransitObject" +}, +"response": { +"$ref": "TransitObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"list": { +"description": "Returns a list of all transit objects for a given issuer ID.", +"flatPath": "walletobjects/v1/transitObject", +"httpMethod": "GET", +"id": "walletobjects.transitobject.list", +"parameterOrder": [], +"parameters": { +"classId": { +"description": "The ID of the class whose objects will be listed.", +"location": "query", +"type": "string" +}, +"maxResults": { +"description": "Identifies the max number of results returned by a list. All results are returned if `maxResults` isn't defined.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"token": { +"description": "Used to get the next set of results if `maxResults` is specified, but more than `maxResults` objects are available in a list. For example, if you have a list of 200 objects and you call list with `maxResults` set to 20, list will return the first 20 objects and a token. Call list again with `maxResults` set to 20 and the token to get the next 20 objects.", +"location": "query", +"type": "string" +} +}, +"path": "walletobjects/v1/transitObject", +"response": { +"$ref": "TransitObjectListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"patch": { +"description": "Updates the transit object referenced by the given object ID. This method supports patch semantics.", +"flatPath": "walletobjects/v1/transitObject/{resourceId}", +"httpMethod": "PATCH", +"id": "walletobjects.transitobject.patch", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitObject/{resourceId}", +"request": { +"$ref": "TransitObject" +}, +"response": { +"$ref": "TransitObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +}, +"update": { +"description": "Updates the transit object referenced by the given object ID.", +"flatPath": "walletobjects/v1/transitObject/{resourceId}", +"httpMethod": "PUT", +"id": "walletobjects.transitobject.update", +"parameterOrder": [ +"resourceId" +], +"parameters": { +"resourceId": { +"description": "The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"location": "path", +"required": true, +"type": "string" +} +}, +"path": "walletobjects/v1/transitObject/{resourceId}", +"request": { +"$ref": "TransitObject" +}, +"response": { +"$ref": "TransitObject" +}, +"scopes": [ +"https://www.googleapis.com/auth/wallet_object.issuer" +] +} +} +} +}, +"revision": "20240422", +"rootUrl": "https://walletobjects.googleapis.com/", +"schemas": { +"ActivationOptions": { +"description": "ActivationOptions for the class", +"id": "ActivationOptions", +"properties": { +"activationUrl": { +"description": "HTTPS URL that supports REST semantics. Would be used for requesting activation from partners for given valuable, triggered by the users.", +"type": "string" +}, +"allowReactivation": { +"description": "Flag to allow users to make activation call from different device. This allows client to render the activation button enabled even if the activationStatus is ACTIVATED but the requested device is different than the current device.", +"type": "boolean" +} +}, +"type": "object" +}, +"ActivationStatus": { +"description": "The activation status of the object. This field includes activation status if valuable supports activation.", +"id": "ActivationStatus", +"properties": { +"state": { +"enum": [ +"UNKNOWN_STATE", +"NOT_ACTIVATED", +"not_activated", +"ACTIVATED", +"activated" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Not-Activated, this is the default status", +"Legacy alias for `NOT_ACTIVATED`. Deprecated.", +"Activated", +"Legacy alias for `ACTIVATED`. Deprecated." +], +"type": "string" +} +}, +"type": "object" +}, +"AddMessageRequest": { +"description": "Resource used when the AddMessage endpoints are called.", +"id": "AddMessageRequest", +"properties": { +"message": { +"$ref": "Message" +} +}, +"type": "object" +}, +"AirportInfo": { +"id": "AirportInfo", +"properties": { +"airportIataCode": { +"description": "Three character IATA airport code. This is a required field for `origin` and `destination`. Eg: \"SFO\"", +"type": "string" +}, +"airportNameOverride": { +"$ref": "LocalizedString", +"description": "Optional field that overrides the airport city name defined by IATA. By default, Google takes the `airportIataCode` provided and maps it to the official airport city name defined by IATA. Official IATA airport city names can be found at IATA airport city names website. For example, for the airport IATA code \"LTN\", IATA website tells us that the corresponding airport city is \"London\". If this field is not populated, Google would display \"London\". However, populating this field with a custom name (eg: \"London Luton\") would override it." +}, +"gate": { +"description": "A name of the gate. Eg: \"B59\" or \"59\"", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#airportInfo\"`.", +"type": "string" +}, +"terminal": { +"description": "Terminal name. Eg: \"INTL\" or \"I\"", +"type": "string" +} +}, +"type": "object" +}, +"AppLinkData": { +"id": "AppLinkData", +"properties": { +"androidAppLinkInfo": { +"$ref": "AppLinkDataAppLinkInfo", +"description": "Optional information about the partner app link. If included, the app link link module will be rendered on the valuable details on the android client." +}, +"iosAppLinkInfo": { +"$ref": "AppLinkDataAppLinkInfo", +"description": "Optional information about the partner app link. If included, the app link link module will be rendered on the valuable details on the ios client." +}, +"webAppLinkInfo": { +"$ref": "AppLinkDataAppLinkInfo", +"description": "Optional information about the partner app link. If included, the app link link module will be rendered on the valuable details on the web client." +} +}, +"type": "object" +}, +"AppLinkDataAppLinkInfo": { +"id": "AppLinkDataAppLinkInfo", +"properties": { +"appLogoImage": { +"$ref": "Image", +"description": "Optional image to be displayed in the App Link Module" +}, +"appTarget": { +"$ref": "AppLinkDataAppLinkInfoAppTarget", +"description": "Url to follow when opening the App Link Module on clients. It will be used by partners to open their webpage or deeplink into their app." +}, +"description": { +"$ref": "LocalizedString", +"description": "String to be displayed in the description of the App Link Module Required" +}, +"title": { +"$ref": "LocalizedString", +"description": "String to be displayed in the title of the App Link Module Required" +} +}, +"type": "object" +}, +"AppLinkDataAppLinkInfoAppTarget": { +"id": "AppLinkDataAppLinkInfoAppTarget", +"properties": { +"packageName": { +"description": "Package name for AppTarget. For example: com.google.android.gm", +"type": "string" +}, +"targetUri": { +"$ref": "Uri", +"description": "URI for AppTarget. The description on the URI must be set. Prefer setting package field instead, if this target is defined for your application." +} +}, +"type": "object" +}, +"AuthenticationKey": { +"id": "AuthenticationKey", +"properties": { +"id": { +"description": "Available only to Smart Tap enabled partners. Contact support for additional guidance.", +"format": "int32", +"type": "integer" +}, +"publicKeyPem": { +"description": "Available only to Smart Tap enabled partners. Contact support for additional guidance.", +"type": "string" +} +}, +"type": "object" +}, +"Barcode": { +"id": "Barcode", +"properties": { +"alternateText": { +"description": "An optional text that will override the default text that shows under the barcode. This field is intended for a human readable equivalent of the barcode value, used when the barcode cannot be scanned.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#barcode\"`.", +"type": "string" +}, +"renderEncoding": { +"description": "The render encoding for the barcode. When specified, barcode is rendered in the given encoding. Otherwise best known encoding is chosen by Google.", +"enum": [ +"RENDER_ENCODING_UNSPECIFIED", +"UTF_8" +], +"enumDescriptions": [ +"", +"UTF_8 encoding for barcodes. This is only supported for barcode type qrCode." +], +"type": "string" +}, +"showCodeText": { +"$ref": "LocalizedString", +"description": "Optional text that will be shown when the barcode is hidden behind a click action. This happens in cases where a pass has Smart Tap enabled. If not specified, a default is chosen by Google." +}, +"type": { +"description": "The type of barcode.", +"enum": [ +"BARCODE_TYPE_UNSPECIFIED", +"AZTEC", +"aztec", +"CODE_39", +"code39", +"CODE_128", +"code128", +"CODABAR", +"codabar", +"DATA_MATRIX", +"dataMatrix", +"EAN_8", +"ean8", +"EAN_13", +"ean13", +"EAN13", +"ITF_14", +"itf14", +"PDF_417", +"pdf417", +"PDF417", +"QR_CODE", +"qrCode", +"qrcode", +"UPC_A", +"upcA", +"TEXT_ONLY", +"textOnly" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +true, +false, +true, +false, +true, +true, +false, +true, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Not supported for Rotating Barcodes.", +"Legacy alias for `AZTEC`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `CODE_39`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `CODE_128`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `CODABAR`. Deprecated. Not supported for Rotating Barcodes.", +"A 2D matrix barcode consisting of black and white. Cells or modules are arranged in either a square or rectangle. Not supported for Rotating Barcodes.", +"Legacy alias for `DATA_MATRIX`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `EAN_8`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `EAN_13`. Deprecated. Not supported for Rotating Barcodes.", +"Legacy alias for `EAN_13`. Deprecated. Not supported for Rotating Barcodes.", +"14 digit ITF code Not supported for Rotating Barcodes.", +"Legacy alias for `ITF_14`. Deprecated. Not supported for Rotating Barcodes.", +"Supported for Rotating Barcodes.", +"Legacy alias for `PDF_417`. Deprecated.", +"Legacy alias for `PDF_417`. Deprecated.", +"Supported for Rotating Barcodes.", +"Legacy alias for `QR_CODE`. Deprecated.", +"Legacy alias for `QR_CODE`. Deprecated.", +"11 or 12 digit codes Not supported for Rotating Barcodes.", +"Legacy alias for `UPC_A`. Deprecated. Not supported for Rotating Barcodes.", +"Renders the field as a text field. The `alternateText` field may not be used with a barcode of type `textOnly`. Not supported for Rotating Barcodes.", +"Legacy alias for `TEXT_ONLY`. Deprecated. Not supported for Rotating Barcodes." +], +"type": "string" +}, +"value": { +"description": "The value encoded in the barcode.", +"type": "string" +} +}, +"type": "object" +}, +"BarcodeSectionDetail": { +"id": "BarcodeSectionDetail", +"properties": { +"fieldSelector": { +"$ref": "FieldSelector", +"description": "A reference to an existing text-based or image field to display." +} +}, +"type": "object" +}, +"Blobstore2Info": { +"description": "Information to read/write to blobstore2.", +"id": "Blobstore2Info", +"properties": { +"blobGeneration": { +"description": "The blob generation id.", +"format": "int64", +"type": "string" +}, +"blobId": { +"description": "The blob id, e.g., /blobstore/prod/playground/scotty", +"type": "string" +}, +"downloadReadHandle": { +"description": "Read handle passed from Bigstore -> Scotty for a GCS download. This is a signed, serialized blobstore2.ReadHandle proto which must never be set outside of Bigstore, and is not applicable to non-GCS media downloads.", +"format": "byte", +"type": "string" +}, +"readToken": { +"description": "The blob read token. Needed to read blobs that have not been replicated. Might not be available until the final call.", +"type": "string" +}, +"uploadMetadataContainer": { +"description": "Metadata passed from Blobstore -> Scotty for a new GCS upload. This is a signed, serialized blobstore2.BlobMetadataContainer proto which must never be consumed outside of Bigstore, and is not applicable to non-GCS media uploads.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"BoardingAndSeatingInfo": { +"id": "BoardingAndSeatingInfo", +"properties": { +"boardingDoor": { +"description": "Set this field only if this flight boards through more than one door or bridge and you want to explicitly print the door location on the boarding pass. Most airlines route their passengers to the right door or bridge by refering to doors/bridges by the `seatClass`. In those cases `boardingDoor` should not be set.", +"enum": [ +"BOARDING_DOOR_UNSPECIFIED", +"FRONT", +"front", +"BACK", +"back" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `FRONT`. Deprecated.", +"", +"Legacy alias for `BACK`. Deprecated." +], +"type": "string" +}, +"boardingGroup": { +"description": "The value of boarding group (or zone) this passenger shall board with. eg: \"B\" The label for this value will be determined by the `boardingPolicy` field in the `flightClass` referenced by this object.", +"type": "string" +}, +"boardingPosition": { +"description": "The value of boarding position. eg: \"76\"", +"type": "string" +}, +"boardingPrivilegeImage": { +"$ref": "Image", +"description": "A small image shown above the boarding barcode. Airlines can use it to communicate any special boarding privileges. In the event the security program logo is also set, this image might be rendered alongside the logo for that security program." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#boardingAndSeatingInfo\"`.", +"type": "string" +}, +"seatAssignment": { +"$ref": "LocalizedString", +"description": "The passenger's seat assignment. To be used when there is no specific identifier to use in `seatNumber`. eg: \"assigned at gate\"" +}, +"seatClass": { +"description": "The value of the seat class. eg: \"Economy\" or \"Economy Plus\"", +"type": "string" +}, +"seatNumber": { +"description": "The value of passenger seat. If there is no specific identifier, use `seatAssignment` instead. eg: \"25A\"", +"type": "string" +}, +"sequenceNumber": { +"description": "The sequence number on the boarding pass. This usually matches the sequence in which the passengers checked in. Airline might use the number for manual boarding and bag tags. eg: \"49\"", +"type": "string" +} +}, +"type": "object" +}, +"BoardingAndSeatingPolicy": { +"id": "BoardingAndSeatingPolicy", +"properties": { +"boardingPolicy": { +"description": "Indicates the policy the airline uses for boarding. If unset, Google will default to `zoneBased`.", +"enum": [ +"BOARDING_POLICY_UNSPECIFIED", +"ZONE_BASED", +"zoneBased", +"GROUP_BASED", +"groupBased", +"BOARDING_POLICY_OTHER", +"boardingPolicyOther" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `ZONE_BASED`. Deprecated.", +"", +"Legacy alias for `GROUP_BASED`. Deprecated.", +"", +"Legacy alias for `BOARDING_POLICY_OTHER`. Deprecated." +], +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#boardingAndSeatingPolicy\"`.", +"type": "string" +}, +"seatClassPolicy": { +"description": "Seating policy which dictates how we display the seat class. If unset, Google will default to `cabinBased`.", +"enum": [ +"SEAT_CLASS_POLICY_UNSPECIFIED", +"CABIN_BASED", +"cabinBased", +"CLASS_BASED", +"classBased", +"TIER_BASED", +"tierBased", +"SEAT_CLASS_POLICY_OTHER", +"seatClassPolicyOther" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `CABIN_BASED`. Deprecated.", +"", +"Legacy alias for `CLASS_BASED`. Deprecated.", +"", +"Legacy alias for `TIER_BASED`. Deprecated.", +"", +"Legacy alias for `SEAT_CLASS_POLICY_OTHER`. Deprecated." +], +"type": "string" +} +}, +"type": "object" +}, +"CallbackOptions": { +"id": "CallbackOptions", +"properties": { +"updateRequestUrl": { +"deprecated": true, +"description": "URL for the merchant endpoint that would be called to request updates. The URL should be hosted on HTTPS and robots.txt should allow the URL path to be accessible by UserAgent:Googlebot. Deprecated.", +"type": "string" +}, +"url": { +"description": "The HTTPS url configured by the merchant. The URL should be hosted on HTTPS and robots.txt should allow the URL path to be accessible by UserAgent:Googlebot.", +"type": "string" +} +}, +"type": "object" +}, +"CardBarcodeSectionDetails": { +"id": "CardBarcodeSectionDetails", +"properties": { +"firstBottomDetail": { +"$ref": "BarcodeSectionDetail", +"description": "Optional information to display below the barcode." +}, +"firstTopDetail": { +"$ref": "BarcodeSectionDetail", +"description": "Optional information to display above the barcode. If `secondTopDetail` is defined, this will be displayed to the start side of this detail section." +}, +"secondTopDetail": { +"$ref": "BarcodeSectionDetail", +"description": "Optional second piece of information to display above the barcode. If `firstTopDetail` is defined, this will be displayed to the end side of this detail section." +} +}, +"type": "object" +}, +"CardRowOneItem": { +"id": "CardRowOneItem", +"properties": { +"item": { +"$ref": "TemplateItem", +"description": "The item to be displayed in the row. This item will be automatically centered." +} +}, +"type": "object" +}, +"CardRowTemplateInfo": { +"id": "CardRowTemplateInfo", +"properties": { +"oneItem": { +"$ref": "CardRowOneItem", +"description": "Template for a row containing one item. Exactly one of \"one_item\", \"two_items\", \"three_items\" must be set." +}, +"threeItems": { +"$ref": "CardRowThreeItems", +"description": "Template for a row containing three items. Exactly one of \"one_item\", \"two_items\", \"three_items\" must be set." +}, +"twoItems": { +"$ref": "CardRowTwoItems", +"description": "Template for a row containing two items. Exactly one of \"one_item\", \"two_items\", \"three_items\" must be set." +} +}, +"type": "object" +}, +"CardRowThreeItems": { +"id": "CardRowThreeItems", +"properties": { +"endItem": { +"$ref": "TemplateItem", +"description": "The item to be displayed at the end of the row. This item will be aligned to the right." +}, +"middleItem": { +"$ref": "TemplateItem", +"description": "The item to be displayed in the middle of the row. This item will be centered between the start and end items." +}, +"startItem": { +"$ref": "TemplateItem", +"description": "The item to be displayed at the start of the row. This item will be aligned to the left." +} +}, +"type": "object" +}, +"CardRowTwoItems": { +"id": "CardRowTwoItems", +"properties": { +"endItem": { +"$ref": "TemplateItem", +"description": "The item to be displayed at the end of the row. This item will be aligned to the right." +}, +"startItem": { +"$ref": "TemplateItem", +"description": "The item to be displayed at the start of the row. This item will be aligned to the left." +} +}, +"type": "object" +}, +"CardTemplateOverride": { +"id": "CardTemplateOverride", +"properties": { +"cardRowTemplateInfos": { +"description": "Template information for rows in the card view. At most three rows are allowed to be specified.", +"items": { +"$ref": "CardRowTemplateInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"ClassTemplateInfo": { +"id": "ClassTemplateInfo", +"properties": { +"cardBarcodeSectionDetails": { +"$ref": "CardBarcodeSectionDetails", +"description": "Specifies extra information to be displayed above and below the barcode." +}, +"cardTemplateOverride": { +"$ref": "CardTemplateOverride", +"description": "Override for the card view." +}, +"detailsTemplateOverride": { +"$ref": "DetailsTemplateOverride", +"description": "Override for the details view (beneath the card view)." +}, +"listTemplateOverride": { +"$ref": "ListTemplateOverride", +"description": "Override for the passes list view." +} +}, +"type": "object" +}, +"CompositeMedia": { +"description": "A sequence of media data references representing composite data. Introduced to support Bigstore composite objects. For details, visit http://go/bigstore-composites.", +"id": "CompositeMedia", +"properties": { +"blobRef": { +"deprecated": true, +"description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef.", +"format": "byte", +"type": "string" +}, +"blobstore2Info": { +"$ref": "Blobstore2Info", +"description": "Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob." +}, +"cosmoBinaryReference": { +"description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field.", +"format": "byte", +"type": "string" +}, +"crc32cHash": { +"description": "crc32.c hash for the payload.", +"format": "uint32", +"type": "integer" +}, +"inline": { +"description": "Media data, set if reference_type is INLINE", +"format": "byte", +"type": "string" +}, +"length": { +"description": "Size of the data, in bytes", +"format": "int64", +"type": "string" +}, +"md5Hash": { +"description": "MD5 hash for the payload.", +"format": "byte", +"type": "string" +}, +"objectId": { +"$ref": "ObjectId", +"description": "Reference to a TI Blob, set if reference_type is BIGSTORE_REF." +}, +"path": { +"description": "Path to the data, set if reference_type is PATH", +"type": "string" +}, +"referenceType": { +"description": "Describes what the field reference contains.", +"enum": [ +"PATH", +"BLOB_REF", +"INLINE", +"BIGSTORE_REF", +"COSMO_BINARY_REFERENCE" +], +"enumDescriptions": [ +"Reference contains a GFS path or a local path.", +"Reference points to a blobstore object. This could be either a v1 blob_ref or a v2 blobstore2_info. Clients should check blobstore2_info first, since v1 is being deprecated.", +"Data is included into this proto buffer", +"Reference points to a bigstore object", +"Indicates the data is stored in cosmo_binary_reference." +], +"type": "string" +}, +"sha1Hash": { +"description": "SHA-1 hash for the payload.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"ContentTypeInfo": { +"description": "Detailed Content-Type information from Scotty. The Content-Type of the media will typically be filled in by the header or Scotty's best_guess, but this extended information provides the backend with more information so that it can make a better decision if needed. This is only used on media upload requests from Scotty.", +"id": "ContentTypeInfo", +"properties": { +"bestGuess": { +"description": "Scotty's best guess of what the content type of the file is.", +"type": "string" +}, +"fromBytes": { +"description": "The content type of the file derived by looking at specific bytes (i.e. \"magic bytes\") of the actual file.", +"type": "string" +}, +"fromFileName": { +"description": "The content type of the file derived from the file extension of the original file name used by the client.", +"type": "string" +}, +"fromHeader": { +"description": "The content type of the file as specified in the request headers, multipart headers, or RUPIO start request.", +"type": "string" +}, +"fromUrlPath": { +"description": "The content type of the file derived from the file extension of the URL path. The URL path is assumed to represent a file name (which is typically only true for agents that are providing a REST API).", +"type": "string" +} +}, +"type": "object" +}, +"DateTime": { +"id": "DateTime", +"properties": { +"date": { +"description": "An ISO 8601 extended format date/time. Offset may or may not be required (refer to the parent field's documentation). Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the date/time is intended for a physical location in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. Providing an offset makes this an absolute instant in time around the world. The date/time will be adjusted based on the user's time zone. For example, a time of `2018-06-19T18:30:00-04:00` will be 18:30:00 for a user in New York and 15:30:00 for a user in Los Angeles. Omitting the offset makes this a local date/time, representing several instants in time around the world. The date/time will always be in the user's current time zone. For example, a time of `2018-06-19T18:30:00` will be 18:30:00 for a user in New York and also 18:30:00 for a user in Los Angeles. This is useful when the same local date/time should apply to many physical locations across several time zones.", +"type": "string" +} +}, +"type": "object" +}, +"DetailsItemInfo": { +"id": "DetailsItemInfo", +"properties": { +"item": { +"$ref": "TemplateItem", +"description": "The item to be displayed in the details list." +} +}, +"type": "object" +}, +"DetailsTemplateOverride": { +"id": "DetailsTemplateOverride", +"properties": { +"detailsItemInfos": { +"description": "Information for the \"nth\" item displayed in the details list.", +"items": { +"$ref": "DetailsItemInfo" +}, +"type": "array" +} +}, +"type": "object" +}, +"DeviceContext": { +"description": "Device context associated with the object.", +"id": "DeviceContext", +"properties": { +"deviceToken": { +"description": "If set, redemption information will only be returned to the given device upon activation of the object. This should not be used as a stable identifier to trace a user's device. It can change across different passes for the same device or even across different activations for the same device. When setting this, callers must also set has_linked_device on the object being activated.", +"type": "string" +} +}, +"type": "object" +}, +"DiffChecksumsResponse": { +"description": "Backend response for a Diff get checksums response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", +"id": "DiffChecksumsResponse", +"properties": { +"checksumsLocation": { +"$ref": "CompositeMedia", +"description": "Exactly one of these fields must be populated. If checksums_location is filled, the server will return the corresponding contents to the user. If object_location is filled, the server will calculate the checksums based on the content there and return that to the user. For details on the format of the checksums, see http://go/scotty-diff-protocol." +}, +"chunkSizeBytes": { +"description": "The chunk size of checksums. Must be a multiple of 256KB.", +"format": "int64", +"type": "string" +}, +"objectLocation": { +"$ref": "CompositeMedia", +"description": "If set, calculate the checksums based on the contents and return them to the caller." +}, +"objectSizeBytes": { +"description": "The total size of the server object.", +"format": "int64", +"type": "string" +}, +"objectVersion": { +"description": "The object version of the object the checksums are being returned for.", +"type": "string" +} +}, +"type": "object" +}, +"DiffDownloadResponse": { +"description": "Backend response for a Diff download response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", +"id": "DiffDownloadResponse", +"properties": { +"objectLocation": { +"$ref": "CompositeMedia", +"description": "The original object location." +} +}, +"type": "object" +}, +"DiffUploadRequest": { +"description": "A Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", +"id": "DiffUploadRequest", +"properties": { +"checksumsInfo": { +"$ref": "CompositeMedia", +"description": "The location of the checksums for the new object. Agents must clone the object located here, as the upload server will delete the contents once a response is received. For details on the format of the checksums, see http://go/scotty-diff-protocol." +}, +"objectInfo": { +"$ref": "CompositeMedia", +"description": "The location of the new object. Agents must clone the object located here, as the upload server will delete the contents once a response is received." +}, +"objectVersion": { +"description": "The object version of the object that is the base version the incoming diff script will be applied to. This field will always be filled in.", +"type": "string" +} +}, +"type": "object" +}, +"DiffUploadResponse": { +"description": "Backend response for a Diff upload request. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", +"id": "DiffUploadResponse", +"properties": { +"objectVersion": { +"description": "The object version of the object at the server. Must be included in the end notification response. The version in the end notification response must correspond to the new version of the object that is now stored at the server, after the upload.", +"type": "string" +}, +"originalObject": { +"$ref": "CompositeMedia", +"description": "The location of the original file for a diff upload request. Must be filled in if responding to an upload start notification." +} +}, +"type": "object" +}, +"DiffVersionResponse": { +"description": "Backend response for a Diff get version response. For details on the Scotty Diff protocol, visit http://go/scotty-diff-protocol.", +"id": "DiffVersionResponse", +"properties": { +"objectSizeBytes": { +"description": "The total size of the server object.", +"format": "int64", +"type": "string" +}, +"objectVersion": { +"description": "The version of the object stored at the server.", +"type": "string" +} +}, +"type": "object" +}, +"DiscoverableProgram": { +"description": "Information about how a class may be discovered and instantiated from within the Android Pay app. This is done by searching for a loyalty or gift card program and scanning or manually entering.", +"id": "DiscoverableProgram", +"properties": { +"merchantSigninInfo": { +"$ref": "DiscoverableProgramMerchantSigninInfo", +"description": "Information about the ability to signin and add a valuable for this program through a merchant site. Used when MERCHANT_HOSTED_SIGNIN is enabled." +}, +"merchantSignupInfo": { +"$ref": "DiscoverableProgramMerchantSignupInfo", +"description": "Information about the ability to signup and add a valuable for this program through a merchant site. Used when MERCHANT_HOSTED_SIGNUP is enabled." +}, +"state": { +"description": "Visibility state of the discoverable program.", +"enum": [ +"STATE_UNSPECIFIED", +"TRUSTED_TESTERS", +"trustedTesters", +"LIVE", +"live", +"DISABLED", +"disabled" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Visible only to testers that have access to issuer account.", +"Legacy alias for `TRUSTED_TESTERS`. Deprecated.", +"Visible to all.", +"Legacy alias for `LIVE`. Deprecated.", +"Not visible.", +"Legacy alias for `DISABLED`. Deprecated." +], +"type": "string" +} +}, +"type": "object" +}, +"DiscoverableProgramMerchantSigninInfo": { +"description": "Information about the merchant hosted signin flow for a program.", +"id": "DiscoverableProgramMerchantSigninInfo", +"properties": { +"signinWebsite": { +"$ref": "Uri", +"description": "The URL to direct the user to for the merchant's signin site." +} +}, +"type": "object" +}, +"DiscoverableProgramMerchantSignupInfo": { +"description": "Information about the merchant hosted signup flow for a program.", +"id": "DiscoverableProgramMerchantSignupInfo", +"properties": { +"signupSharedDatas": { +"description": " User data that is sent in a POST request to the signup website URL. This information is encoded and then shared so that the merchant's website can prefill fields used to enroll the user for the discoverable program.", +"items": { +"enum": [ +"SHARED_DATA_TYPE_UNSPECIFIED", +"FIRST_NAME", +"LAST_NAME", +"STREET_ADDRESS", +"ADDRESS_LINE_1", +"ADDRESS_LINE_2", +"ADDRESS_LINE_3", +"CITY", +"STATE", +"ZIPCODE", +"COUNTRY", +"EMAIL", +"PHONE" +], +"enumDescriptions": [ +"", +"", +"", +"single line address field", +"multi line address fields", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +}, +"signupWebsite": { +"$ref": "Uri", +"description": "The URL to direct the user to for the merchant's signup site." +} +}, +"type": "object" +}, +"DownloadParameters": { +"description": "Parameters specific to media downloads.", +"id": "DownloadParameters", +"properties": { +"allowGzipCompression": { +"description": "A boolean to be returned in the response to Scotty. Allows/disallows gzip encoding of the payload content when the server thinks it's advantageous (hence, does not guarantee compression) which allows Scotty to GZip the response to the client.", +"type": "boolean" +}, +"ignoreRange": { +"description": "Determining whether or not Apiary should skip the inclusion of any Content-Range header on its response to Scotty.", +"type": "boolean" +} +}, +"type": "object" +}, +"EventDateTime": { +"id": "EventDateTime", +"properties": { +"customDoorsOpenLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the doors open value (`doorsOpen`) on the card detail view. This should only be used if the default \"Doors Open\" label or one of the `doorsOpenLabel` options is not sufficient. Both `doorsOpenLabel` and `customDoorsOpenLabel` may not be set. If neither is set, the label will default to \"Doors Open\", localized. If the doors open field is unset, this label will not be used." +}, +"doorsOpen": { +"description": "The date/time when the doors open at the venue. This is an ISO 8601 extended format date/time, with or without an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. The portion of the date/time without the offset is considered the \"local date/time\". This should be the local date/time at the venue. For example, if the event occurs at the 20th hour of June 5th, 2018 at the venue, the local date/time portion should be `2018-06-05T20:00:00`. If the local date/time at the venue is 4 hours before UTC, an offset of `-04:00` may be appended. Without offset information, some rich features may not be available.", +"type": "string" +}, +"doorsOpenLabel": { +"description": "The label to use for the doors open value (`doorsOpen`) on the card detail view. Each available option maps to a set of localized strings, so that translations are shown to the user based on their locale. Both `doorsOpenLabel` and `customDoorsOpenLabel` may not be set. If neither is set, the label will default to \"Doors Open\", localized. If the doors open field is unset, this label will not be used.", +"enum": [ +"DOORS_OPEN_LABEL_UNSPECIFIED", +"DOORS_OPEN", +"doorsOpen", +"GATES_OPEN", +"gatesOpen" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `DOORS_OPEN`. Deprecated.", +"", +"Legacy alias for `GATES_OPEN`. Deprecated." +], +"type": "string" +}, +"end": { +"description": "The date/time when the event ends. If the event spans multiple days, it should be the end date/time on the last day. This is an ISO 8601 extended format date/time, with or without an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. The portion of the date/time without the offset is considered the \"local date/time\". This should be the local date/time at the venue. For example, if the event occurs at the 20th hour of June 5th, 2018 at the venue, the local date/time portion should be `2018-06-05T20:00:00`. If the local date/time at the venue is 4 hours before UTC, an offset of `-04:00` may be appended. Without offset information, some rich features may not be available.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#eventDateTime\"`.", +"type": "string" +}, +"start": { +"description": "The date/time when the event starts. If the event spans multiple days, it should be the start date/time on the first day. This is an ISO 8601 extended format date/time, with or without an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. The portion of the date/time without the offset is considered the \"local date/time\". This should be the local date/time at the venue. For example, if the event occurs at the 20th hour of June 5th, 2018 at the venue, the local date/time portion should be `2018-06-05T20:00:00`. If the local date/time at the venue is 4 hours before UTC, an offset of `-04:00` may be appended. Without offset information, some rich features may not be available.", +"type": "string" +} +}, +"type": "object" +}, +"EventReservationInfo": { +"id": "EventReservationInfo", +"properties": { +"confirmationCode": { +"description": "The confirmation code of the event reservation. This may also take the form of an \"order number\", \"confirmation number\", \"reservation number\", or other equivalent.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#eventReservationInfo\"`.", +"type": "string" +} +}, +"type": "object" +}, +"EventSeat": { +"id": "EventSeat", +"properties": { +"gate": { +"$ref": "LocalizedString", +"description": "The gate the ticket holder should enter to get to their seat, such as \"A\" or \"West\". This field is localizable so you may translate words or use different alphabets for the characters in an identifier." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#eventSeat\"`.", +"type": "string" +}, +"row": { +"$ref": "LocalizedString", +"description": "The row of the seat, such as \"1\", E\", \"BB\", or \"A5\". This field is localizable so you may translate words or use different alphabets for the characters in an identifier." +}, +"seat": { +"$ref": "LocalizedString", +"description": "The seat number, such as \"1\", \"2\", \"3\", or any other seat identifier. This field is localizable so you may translate words or use different alphabets for the characters in an identifier." +}, +"section": { +"$ref": "LocalizedString", +"description": "The section of the seat, such as \"121\". This field is localizable so you may translate words or use different alphabets for the characters in an identifier." +} +}, +"type": "object" +}, +"EventTicketClass": { +"id": "EventTicketClass", +"properties": { +"allowMultipleUsersPerObject": { +"deprecated": true, +"description": "Deprecated. Use `multipleDevicesAndHoldersAllowedStatus` instead.", +"type": "boolean" +}, +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback." +}, +"classTemplateInfo": { +"$ref": "ClassTemplateInfo", +"description": "Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display." +}, +"confirmationCodeLabel": { +"description": "The label to use for the confirmation code value (`eventTicketObject.reservationInfo.confirmationCode`) on the card detail view. Each available option maps to a set of localized strings, so that translations are shown to the user based on their locale. Both `confirmationCodeLabel` and `customConfirmationCodeLabel` may not be set. If neither is set, the label will default to \"Confirmation Code\", localized. If the confirmation code field is unset, this label will not be used.", +"enum": [ +"CONFIRMATION_CODE_LABEL_UNSPECIFIED", +"CONFIRMATION_CODE", +"confirmationCode", +"CONFIRMATION_NUMBER", +"confirmationNumber", +"ORDER_NUMBER", +"orderNumber", +"RESERVATION_NUMBER", +"reservationNumber" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `CONFIRMATION_CODE`. Deprecated.", +"", +"Legacy alias for `CONFIRMATION_NUMBER`. Deprecated.", +"", +"Legacy alias for `ORDER_NUMBER`. Deprecated.", +"", +"Legacy alias for `RESERVATION_NUMBER`. Deprecated." +], +"type": "string" +}, +"countryCode": { +"description": "Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.", +"type": "string" +}, +"customConfirmationCodeLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the confirmation code value (`eventTicketObject.reservationInfo.confirmationCode`) on the card detail view. This should only be used if the default \"Confirmation Code\" label or one of the `confirmationCodeLabel` options is not sufficient. Both `confirmationCodeLabel` and `customConfirmationCodeLabel` may not be set. If neither is set, the label will default to \"Confirmation Code\", localized. If the confirmation code field is unset, this label will not be used." +}, +"customGateLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the gate value (`eventTicketObject.seatInfo.gate`) on the card detail view. This should only be used if the default \"Gate\" label or one of the `gateLabel` options is not sufficient. Both `gateLabel` and `customGateLabel` may not be set. If neither is set, the label will default to \"Gate\", localized. If the gate field is unset, this label will not be used." +}, +"customRowLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the row value (`eventTicketObject.seatInfo.row`) on the card detail view. This should only be used if the default \"Row\" label or one of the `rowLabel` options is not sufficient. Both `rowLabel` and `customRowLabel` may not be set. If neither is set, the label will default to \"Row\", localized. If the row field is unset, this label will not be used." +}, +"customSeatLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the seat value (`eventTicketObject.seatInfo.seat`) on the card detail view. This should only be used if the default \"Seat\" label or one of the `seatLabel` options is not sufficient. Both `seatLabel` and `customSeatLabel` may not be set. If neither is set, the label will default to \"Seat\", localized. If the seat field is unset, this label will not be used." +}, +"customSectionLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the section value (`eventTicketObject.seatInfo.section`) on the card detail view. This should only be used if the default \"Section\" label or one of the `sectionLabel` options is not sufficient. Both `sectionLabel` and `customSectionLabel` may not be set. If neither is set, the label will default to \"Section\", localized. If the section field is unset, this label will not be used." +}, +"dateTime": { +"$ref": "EventDateTime", +"description": "The date & time information of the event." +}, +"enableSmartTap": { +"description": "Identifies whether this class supports Smart Tap. The `redemptionIssuers` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"type": "boolean" +}, +"eventId": { +"description": "The ID of the event. This ID should be unique for every event in an account. It is used to group tickets together if the user has saved multiple tickets for the same event. It can be at most 64 characters. If provided, the grouping will be stable. Be wary of unintentional collision to avoid grouping tickets that should not be grouped. If you use only one class per event, you can simply set this to the `classId` (with or without the issuer ID portion). If not provided, the platform will attempt to use other data to group tickets (potentially unstable).", +"type": "string" +}, +"eventName": { +"$ref": "LocalizedString", +"description": "Required. The name of the event, such as \"LA Dodgers at SF Giants\"." +}, +"finePrint": { +"$ref": "LocalizedString", +"description": "The fine print, terms, or conditions of the ticket." +}, +"gateLabel": { +"description": "The label to use for the gate value (`eventTicketObject.seatInfo.gate`) on the card detail view. Each available option maps to a set of localized strings, so that translations are shown to the user based on their locale. Both `gateLabel` and `customGateLabel` may not be set. If neither is set, the label will default to \"Gate\", localized. If the gate field is unset, this label will not be used.", +"enum": [ +"GATE_LABEL_UNSPECIFIED", +"GATE", +"gate", +"DOOR", +"door", +"ENTRANCE", +"entrance" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `GATE`. Deprecated.", +"", +"Legacy alias for `DOOR`. Deprecated.", +"", +"Legacy alias for `ENTRANCE`. Deprecated." +], +"type": "string" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"homepageUri": { +"$ref": "Uri", +"description": "The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object)." +}, +"id": { +"description": "Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"deprecated": true, +"description": "Deprecated. Use textModulesData instead." +}, +"issuerName": { +"description": "Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#eventTicketClass\"`.", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the object, both will be displayed." +}, +"localizedIssuerName": { +"$ref": "LocalizedString", +"description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"logo": { +"$ref": "Image", +"description": "The logo image of the ticket. This image is displayed in the card detail view of the app." +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"multipleDevicesAndHoldersAllowedStatus": { +"description": "Identifies whether multiple users and devices will save the same object referencing this class.", +"enum": [ +"STATUS_UNSPECIFIED", +"MULTIPLE_HOLDERS", +"ONE_USER_ALL_DEVICES", +"ONE_USER_ONE_DEVICE", +"multipleHolders", +"oneUserAllDevices", +"oneUserOneDevice" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +true, +true +], +"enumDescriptions": [ +"Unspecified preference.", +"The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", +"An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", +"An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", +"Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", +"Legacy alias for `ONE_USER_ALL_DEVICES`. Deprecated.", +"Legacy alias for `ONE_USER_ONE_DEVICE`. Deprecated." +], +"type": "string" +}, +"redemptionIssuers": { +"description": "Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The `enableSmartTap` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"review": { +"$ref": "Review", +"description": "The review comments set by the platform when a class is marked `approved` or `rejected`." +}, +"reviewStatus": { +"description": "Required. The status of the class. This field can be set to `draft` or `underReview` using the insert, patch, or update API calls. Once the review state is changed from `draft` it may not be changed back to `draft`. You should keep this field to `draft` when the class is under development. A `draft` class cannot be used to create any object. You should set this field to `underReview` when you believe the class is ready for use. The platform will automatically set this field to `approved` and it can be immediately used to create or migrate objects. When updating an already `approved` class you should keep setting this field to `underReview`.", +"enum": [ +"REVIEW_STATUS_UNSPECIFIED", +"UNDER_REVIEW", +"underReview", +"APPROVED", +"approved", +"REJECTED", +"rejected", +"DRAFT", +"draft" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `UNDER_REVIEW`. Deprecated.", +"", +"Legacy alias for `APPROVED`. Deprecated.", +"", +"Legacy alias for `REJECTED`. Deprecated.", +"", +"Legacy alias for `DRAFT`. Deprecated." +], +"type": "string" +}, +"rowLabel": { +"description": "The label to use for the row value (`eventTicketObject.seatInfo.row`) on the card detail view. Each available option maps to a set of localized strings, so that translations are shown to the user based on their locale. Both `rowLabel` and `customRowLabel` may not be set. If neither is set, the label will default to \"Row\", localized. If the row field is unset, this label will not be used.", +"enum": [ +"ROW_LABEL_UNSPECIFIED", +"ROW", +"row" +], +"enumDeprecated": [ +false, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `ROW`. Deprecated." +], +"type": "string" +}, +"seatLabel": { +"description": "The label to use for the seat value (`eventTicketObject.seatInfo.seat`) on the card detail view. Each available option maps to a set of localized strings, so that translations are shown to the user based on their locale. Both `seatLabel` and `customSeatLabel` may not be set. If neither is set, the label will default to \"Seat\", localized. If the seat field is unset, this label will not be used.", +"enum": [ +"SEAT_LABEL_UNSPECIFIED", +"SEAT", +"seat" +], +"enumDeprecated": [ +false, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `SEAT`. Deprecated." +], +"type": "string" +}, +"sectionLabel": { +"description": "The label to use for the section value (`eventTicketObject.seatInfo.section`) on the card detail view. Each available option maps to a set of localized strings, so that translations are shown to the user based on their locale. Both `sectionLabel` and `customSectionLabel` may not be set. If neither is set, the label will default to \"Section\", localized. If the section field is unset, this label will not be used.", +"enum": [ +"SECTION_LABEL_UNSPECIFIED", +"SECTION", +"section", +"THEATER", +"theater" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `SECTION`. Deprecated.", +"", +"Legacy alias for `THEATER`. Deprecated." +], +"type": "string" +}, +"securityAnimation": { +"$ref": "SecurityAnimation", +"description": "Optional information about the security animation. If this is set a security animation will be rendered on pass details." +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"venue": { +"$ref": "EventVenue", +"description": "Event venue details." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +}, +"viewUnlockRequirement": { +"description": "View Unlock Requirement options for the event ticket.", +"enum": [ +"VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED", +"UNLOCK_NOT_REQUIRED", +"UNLOCK_REQUIRED_TO_VIEW" +], +"enumDescriptions": [ +"Default value, same as UNLOCK_NOT_REQUIRED.", +"Default behavior for all the existing Passes if ViewUnlockRequirement is not set.", +"Requires the user to unlock their device each time the pass is viewed. If the user removes their device lock after saving the pass, then they will be prompted to create a device lock before the pass can be viewed." +], +"type": "string" +}, +"wideLogo": { +"$ref": "Image", +"description": "The wide logo of the ticket. When provided, this will be used in place of the logo in the top left of the card view." +}, +"wordMark": { +"$ref": "Image", +"deprecated": true, +"description": "Deprecated." +} +}, +"type": "object" +}, +"EventTicketClassAddMessageResponse": { +"id": "EventTicketClassAddMessageResponse", +"properties": { +"resource": { +"$ref": "EventTicketClass", +"description": "The updated EventTicketClass resource." +} +}, +"type": "object" +}, +"EventTicketClassListResponse": { +"id": "EventTicketClassListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "EventTicketClass" +}, +"type": "array" +} +}, +"type": "object" +}, +"EventTicketObject": { +"id": "EventTicketObject", +"properties": { +"appLinkData": { +"$ref": "AppLinkData", +"description": "Optional information about the partner app link." +}, +"barcode": { +"$ref": "Barcode", +"description": "The barcode type and value." +}, +"classId": { +"description": "Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you.", +"type": "string" +}, +"classReference": { +"$ref": "EventTicketClass", +"description": "A copy of the inherited fields of the parent class. These fields are retrieved during a GET." +}, +"disableExpirationNotification": { +"description": "Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the `messages` field, expiration notifications to the user will be suppressed. By default, this field is set to false. Currently, this can only be set for offers.", +"type": "boolean" +}, +"faceValue": { +"$ref": "Money", +"description": "The face value of the ticket, matching what would be printed on a physical version of the ticket." +}, +"groupingInfo": { +"$ref": "GroupingInfo", +"description": "Information that controls how passes are grouped together." +}, +"hasLinkedDevice": { +"description": "Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.", +"type": "boolean" +}, +"hasUsers": { +"description": "Indicates if the object has users. This field is set by the platform.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"id": { +"description": "Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. The unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"description": "Deprecated. Use textModulesData instead." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#eventTicketObject\"`.", +"type": "string" +}, +"linkedOfferIds": { +"description": "A list of offer objects linked to this event ticket. The offer objects must already exist. Offer object IDs should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you.", +"items": { +"type": "string" +}, +"type": "array" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the class, both will be displayed." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"passConstraints": { +"$ref": "PassConstraints", +"description": "Pass constraints for the object. Includes limiting NFC and screenshot behaviors." +}, +"reservationInfo": { +"$ref": "EventReservationInfo", +"description": "Reservation details for this ticket. This is expected to be shared amongst all tickets that were purchased in the same order." +}, +"rotatingBarcode": { +"$ref": "RotatingBarcode", +"description": "The rotating barcode type and value." +}, +"seatInfo": { +"$ref": "EventSeat", +"description": "Seating details for this ticket." +}, +"smartTapRedemptionValue": { +"description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", +"type": "string" +}, +"state": { +"description": "Required. The state of the object. This field is used to determine how an object is displayed in the app. For example, an `inactive` object is moved to the \"Expired passes\" section.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"active", +"COMPLETED", +"completed", +"EXPIRED", +"expired", +"INACTIVE", +"inactive" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Object is active and displayed to with other active objects.", +"Legacy alias for `ACTIVE`. Deprecated.", +"", +"Legacy alias for `COMPLETED`. Deprecated.", +"Object is no longer valid (`validTimeInterval` passed).", +"Legacy alias for `EXPIRED`. Deprecated.", +"", +"Legacy alias for `INACTIVE`. Deprecated." +], +"type": "string" +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"ticketHolderName": { +"description": "Name of the ticket holder, if the ticket is assigned to a person. E.g. \"John Doe\" or \"Jane Doe\".", +"type": "string" +}, +"ticketNumber": { +"description": "The number of the ticket. This can be a unique identifier across all tickets in an issuer's system, all tickets for the event (e.g. XYZ1234512345), or all tickets in the order (1, 2, 3, etc.).", +"type": "string" +}, +"ticketType": { +"$ref": "LocalizedString", +"description": "The type of the ticket, such as \"Adult\" or \"Child\", or \"VIP\" or \"Standard\"." +}, +"validTimeInterval": { +"$ref": "TimeInterval", +"description": "The time period this object will be `active` and object can be used. An object's state will be changed to `expired` when this time period has passed." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"EventTicketObjectAddMessageResponse": { +"id": "EventTicketObjectAddMessageResponse", +"properties": { +"resource": { +"$ref": "EventTicketObject", +"description": "The updated EventTicketObject resource." +} +}, +"type": "object" +}, +"EventTicketObjectListResponse": { +"id": "EventTicketObjectListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "EventTicketObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"EventVenue": { +"id": "EventVenue", +"properties": { +"address": { +"$ref": "LocalizedString", +"description": "The address of the venue, such as \"24 Willie Mays Plaza\\nSan Francisco, CA 94107\". Address lines are separated by line feed (`\\n`) characters. This is required." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#eventVenue\"`.", +"type": "string" +}, +"name": { +"$ref": "LocalizedString", +"description": "The name of the venue, such as \"AT&T Park\". This is required." +} +}, +"type": "object" +}, +"ExpiryNotification": { +"description": "Indicates that the issuer would like Google Wallet to send expiry notifications 2 days prior to the card expiration.", +"id": "ExpiryNotification", +"properties": { +"enableNotification": { +"description": "Indicates if the object needs to have expiry notification enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"FieldReference": { +"description": "Reference definition to use with field overrides.", +"id": "FieldReference", +"properties": { +"dateFormat": { +"description": "Only valid if the `fieldPath` references a date field. Chooses how the date field will be formatted and displayed in the UI.", +"enum": [ +"DATE_FORMAT_UNSPECIFIED", +"DATE_TIME", +"dateTime", +"DATE_ONLY", +"dateOnly", +"TIME_ONLY", +"timeOnly", +"DATE_TIME_YEAR", +"dateTimeYear", +"DATE_YEAR", +"dateYear", +"YEAR_MONTH", +"YEAR_MONTH_DAY" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +false, +false +], +"enumDescriptions": [ +"Default option when no format is specified, when selected, no formatting will be applied.", +"Renders `2018-12-14T13:00:00` as `Dec 14, 1:00 PM` in `en_US`.", +"Legacy alias for `DATE_TIME`. Deprecated.", +"Renders `2018-12-14T13:00:00` as `Dec 14` in `en_US`.", +"Legacy alias for `DATE_ONLY`. Deprecated.", +"Renders `2018-12-14T13:00:00` as `1:00 PM` in `en_US`.", +"Legacy alias for `TIME_ONLY`. Deprecated.", +"Renders `2018-12-14T13:00:00` as `Dec 14, 2018, 1:00 PM` in `en_US`.", +"Legacy alias for `DATE_TIME_YEAR`. Deprecated.", +"Renders `2018-12-14T13:00:00` as `Dec 14, 2018` in `en_US`.", +"Legacy alias for `DATE_YEAR`. Deprecated.", +"Renders `2018-12-14T13:00:00` as `2018-12`.", +"Renders `2018-12-14T13:00:00` as `2018-12-14`." +], +"type": "string" +}, +"fieldPath": { +"description": "Path to the field being referenced, prefixed with \"object\" or \"class\" and separated with dots. For example, it may be the string \"object.purchaseDetails.purchasePrice\".", +"type": "string" +} +}, +"type": "object" +}, +"FieldSelector": { +"description": "Custom field selector to use with field overrides.", +"id": "FieldSelector", +"properties": { +"fields": { +"description": "If more than one reference is supplied, then the first one that references a non-empty field will be displayed.", +"items": { +"$ref": "FieldReference" +}, +"type": "array" +} +}, +"type": "object" +}, +"FirstRowOption": { +"id": "FirstRowOption", +"properties": { +"fieldOption": { +"$ref": "FieldSelector", +"description": "A reference to the field to be displayed in the first row." +}, +"transitOption": { +"enum": [ +"TRANSIT_OPTION_UNSPECIFIED", +"ORIGIN_AND_DESTINATION_NAMES", +"originAndDestinationNames", +"ORIGIN_AND_DESTINATION_CODES", +"originAndDestinationCodes", +"ORIGIN_NAME", +"originName" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `ORIGIN_AND_DESTINATION_NAMES`. Deprecated.", +"", +"Legacy alias for `ORIGIN_AND_DESTINATION_CODES`. Deprecated.", +"", +"Legacy alias for `ORIGIN_NAME`. Deprecated." +], +"type": "string" +} +}, +"type": "object" +}, +"FlightCarrier": { +"id": "FlightCarrier", +"properties": { +"airlineAllianceLogo": { +"$ref": "Image", +"description": "A logo for the airline alliance, displayed below the QR code that the passenger scans to board." +}, +"airlineLogo": { +"$ref": "Image", +"description": "A logo for the airline described by carrierIataCode and localizedAirlineName. This logo will be rendered at the top of the detailed card view." +}, +"airlineName": { +"$ref": "LocalizedString", +"description": "A localized name of the airline specified by carrierIataCode. If unset, `issuer_name` or `localized_issuer_name` from `FlightClass` will be used for display purposes. eg: \"Swiss Air\" for \"LX\"" +}, +"carrierIataCode": { +"description": "Two character IATA airline code of the marketing carrier (as opposed to operating carrier). Exactly one of this or `carrierIcaoCode` needs to be provided for `carrier` and `operatingCarrier`. eg: \"LX\" for Swiss Air", +"type": "string" +}, +"carrierIcaoCode": { +"description": "Three character ICAO airline code of the marketing carrier (as opposed to operating carrier). Exactly one of this or `carrierIataCode` needs to be provided for `carrier` and `operatingCarrier`. eg: \"EZY\" for Easy Jet", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#flightCarrier\"`.", +"type": "string" +}, +"wideAirlineLogo": { +"$ref": "Image", +"description": "The wide logo of the airline. When provided, this will be used in place of the airline logo in the top left of the card view." +} +}, +"type": "object" +}, +"FlightClass": { +"id": "FlightClass", +"properties": { +"allowMultipleUsersPerObject": { +"deprecated": true, +"description": "Deprecated. Use `multipleDevicesAndHoldersAllowedStatus` instead.", +"type": "boolean" +}, +"boardingAndSeatingPolicy": { +"$ref": "BoardingAndSeatingPolicy", +"description": "Policies for boarding and seating. These will inform which labels will be shown to users." +}, +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback." +}, +"classTemplateInfo": { +"$ref": "ClassTemplateInfo", +"description": "Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display." +}, +"countryCode": { +"description": "Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.", +"type": "string" +}, +"destination": { +"$ref": "AirportInfo", +"description": "Required. Destination airport." +}, +"enableSmartTap": { +"description": "Identifies whether this class supports Smart Tap. The `redemptionIssuers` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"type": "boolean" +}, +"flightHeader": { +"$ref": "FlightHeader", +"description": "Required. Information about the flight carrier and number." +}, +"flightStatus": { +"description": "Status of this flight. If unset, Google will compute status based on data from other sources, such as FlightStats, etc. Note: Google-computed status will not be returned in API responses.", +"enum": [ +"FLIGHT_STATUS_UNSPECIFIED", +"SCHEDULED", +"scheduled", +"ACTIVE", +"active", +"LANDED", +"landed", +"CANCELLED", +"cancelled", +"REDIRECTED", +"redirected", +"DIVERTED", +"diverted" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Flight is on time, early, or delayed.", +"Legacy alias for `SCHEDULED`. Deprecated.", +"Flight is in progress (taxiing, taking off, landing, airborne).", +"Legacy alias for `ACTIVE`. Deprecated.", +"Flight landed at the original destination.", +"Legacy alias for `LANDED`. Deprecated.", +"Flight is cancelled.", +"Legacy alias for `CANCELLED`. Deprecated.", +"Flight is airborne but heading to a different airport than the original destination.", +"Legacy alias for `REDIRECTED`. Deprecated.", +"Flight has already landed at a different airport than the original destination.", +"Legacy alias for `DIVERTED`. Deprecated." +], +"type": "string" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"homepageUri": { +"$ref": "Uri", +"description": "The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object)." +}, +"id": { +"description": "Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"deprecated": true, +"description": "Deprecated. Use textModulesData instead." +}, +"issuerName": { +"description": "Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#flightClass\"`.", +"type": "string" +}, +"languageOverride": { +"description": "If this field is present, boarding passes served to a user's device will always be in this language. Represents the BCP 47 language tag. Example values are \"en-US\", \"en-GB\", \"de\", or \"de-AT\".", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the object, both will be displayed." +}, +"localBoardingDateTime": { +"description": "The boarding time as it would be printed on the boarding pass. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport. If this is not set, Google will set it based on data from other sources.", +"type": "string" +}, +"localEstimatedOrActualArrivalDateTime": { +"description": "The estimated time the aircraft plans to reach the destination gate (not the runway) or the actual time it reached the gate. This field should be set if at least one of the below is true: - It differs from the scheduled time. Google will use it to calculate the delay. - The aircraft already arrived at the gate. Google will use it to inform the user that the flight has arrived at the gate. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on arrival airport. If this is not set, Google will set it based on data from other sources.", +"type": "string" +}, +"localEstimatedOrActualDepartureDateTime": { +"description": "The estimated time the aircraft plans to pull from the gate or the actual time the aircraft already pulled from the gate. Note: This is not the runway time. This field should be set if at least one of the below is true: - It differs from the scheduled time. Google will use it to calculate the delay. - The aircraft already pulled from the gate. Google will use it to inform the user when the flight actually departed. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport. If this is not set, Google will set it based on data from other sources.", +"type": "string" +}, +"localGateClosingDateTime": { +"description": "The gate closing time as it would be printed on the boarding pass. Do not set this field if you do not want to print it in the boarding pass. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport.", +"type": "string" +}, +"localScheduledArrivalDateTime": { +"description": "The scheduled time the aircraft plans to reach the destination gate (not the runway). Note: This field should not change too close to the flight time. For updates to departure times (delays, etc), please set `localEstimatedOrActualArrivalDateTime`. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on arrival airport. If this is not set, Google will set it based on data from other sources.", +"type": "string" +}, +"localScheduledDepartureDateTime": { +"description": "Required. The scheduled date and time when the aircraft is expected to depart the gate (not the runway) Note: This field should not change too close to the departure time. For updates to departure times (delays, etc), please set `localEstimatedOrActualDepartureDateTime`. This is an ISO 8601 extended format date/time without an offset. Time may be specified up to millisecond precision. eg: `2027-03-05T06:30:00` This should be the local date/time at the airport (not a UTC time). Google will reject the request if UTC offset is provided. Time zones will be calculated by Google based on departure airport.", +"type": "string" +}, +"localizedIssuerName": { +"$ref": "LocalizedString", +"description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"multipleDevicesAndHoldersAllowedStatus": { +"description": "Identifies whether multiple users and devices will save the same object referencing this class.", +"enum": [ +"STATUS_UNSPECIFIED", +"MULTIPLE_HOLDERS", +"ONE_USER_ALL_DEVICES", +"ONE_USER_ONE_DEVICE", +"multipleHolders", +"oneUserAllDevices", +"oneUserOneDevice" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +true, +true +], +"enumDescriptions": [ +"Unspecified preference.", +"The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", +"An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", +"An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", +"Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", +"Legacy alias for `ONE_USER_ALL_DEVICES`. Deprecated.", +"Legacy alias for `ONE_USER_ONE_DEVICE`. Deprecated." +], +"type": "string" +}, +"origin": { +"$ref": "AirportInfo", +"description": "Required. Origin airport." +}, +"redemptionIssuers": { +"description": "Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The `enableSmartTap` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"review": { +"$ref": "Review", +"description": "The review comments set by the platform when a class is marked `approved` or `rejected`." +}, +"reviewStatus": { +"description": "Required. The status of the class. This field can be set to `draft` or `underReview` using the insert, patch, or update API calls. Once the review state is changed from `draft` it may not be changed back to `draft`. You should keep this field to `draft` when the class is under development. A `draft` class cannot be used to create any object. You should set this field to `underReview` when you believe the class is ready for use. The platform will automatically set this field to `approved` and it can be immediately used to create or migrate objects. When updating an already `approved` class you should keep setting this field to `underReview`.", +"enum": [ +"REVIEW_STATUS_UNSPECIFIED", +"UNDER_REVIEW", +"underReview", +"APPROVED", +"approved", +"REJECTED", +"rejected", +"DRAFT", +"draft" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `UNDER_REVIEW`. Deprecated.", +"", +"Legacy alias for `APPROVED`. Deprecated.", +"", +"Legacy alias for `REJECTED`. Deprecated.", +"", +"Legacy alias for `DRAFT`. Deprecated." +], +"type": "string" +}, +"securityAnimation": { +"$ref": "SecurityAnimation", +"description": "Optional information about the security animation. If this is set a security animation will be rendered on pass details." +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +}, +"viewUnlockRequirement": { +"description": "View Unlock Requirement options for the boarding pass.", +"enum": [ +"VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED", +"UNLOCK_NOT_REQUIRED", +"UNLOCK_REQUIRED_TO_VIEW" +], +"enumDescriptions": [ +"Default value, same as UNLOCK_NOT_REQUIRED.", +"Default behavior for all the existing Passes if ViewUnlockRequirement is not set.", +"Requires the user to unlock their device each time the pass is viewed. If the user removes their device lock after saving the pass, then they will be prompted to create a device lock before the pass can be viewed." +], +"type": "string" +}, +"wordMark": { +"$ref": "Image", +"deprecated": true, +"description": "Deprecated." +} +}, +"type": "object" +}, +"FlightClassAddMessageResponse": { +"id": "FlightClassAddMessageResponse", +"properties": { +"resource": { +"$ref": "FlightClass", +"description": "The updated FlightClass resource." +} +}, +"type": "object" +}, +"FlightClassListResponse": { +"id": "FlightClassListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "FlightClass" +}, +"type": "array" +} +}, +"type": "object" +}, +"FlightHeader": { +"id": "FlightHeader", +"properties": { +"carrier": { +"$ref": "FlightCarrier", +"description": "Information about airline carrier. This is a required property of `flightHeader`." +}, +"flightNumber": { +"description": "The flight number without IATA carrier code. This field should contain only digits. This is a required property of `flightHeader`. eg: \"123\"", +"type": "string" +}, +"flightNumberDisplayOverride": { +"description": "Override value to use for flight number. The default value used for display purposes is carrier + flight_number. If a different value needs to be shown to passengers, use this field to override the default behavior. eg: \"XX1234 / YY576\"", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#flightHeader\"`.", +"type": "string" +}, +"operatingCarrier": { +"$ref": "FlightCarrier", +"description": "Information about operating airline carrier." +}, +"operatingFlightNumber": { +"description": "The flight number used by the operating carrier without IATA carrier code. This field should contain only digits. eg: \"234\"", +"type": "string" +} +}, +"type": "object" +}, +"FlightObject": { +"id": "FlightObject", +"properties": { +"appLinkData": { +"$ref": "AppLinkData", +"description": "Optional information about the partner app link." +}, +"barcode": { +"$ref": "Barcode", +"description": "The barcode type and value." +}, +"boardingAndSeatingInfo": { +"$ref": "BoardingAndSeatingInfo", +"description": "Passenger specific information about boarding and seating." +}, +"classId": { +"description": "Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you.", +"type": "string" +}, +"classReference": { +"$ref": "FlightClass", +"description": "A copy of the inherited fields of the parent class. These fields are retrieved during a GET." +}, +"disableExpirationNotification": { +"description": "Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the `messages` field, expiration notifications to the user will be suppressed. By default, this field is set to false. Currently, this can only be set for Flights.", +"type": "boolean" +}, +"groupingInfo": { +"$ref": "GroupingInfo", +"description": "Information that controls how passes are grouped together." +}, +"hasLinkedDevice": { +"description": "Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.", +"type": "boolean" +}, +"hasUsers": { +"description": "Indicates if the object has users. This field is set by the platform.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"id": { +"description": "Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. The unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"description": "Deprecated. Use textModulesData instead." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#flightObject\"`.", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the class, both will be displayed." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"passConstraints": { +"$ref": "PassConstraints", +"description": "Pass constraints for the object. Includes limiting NFC and screenshot behaviors." +}, +"passengerName": { +"description": "Required. Passenger name as it would appear on the boarding pass. eg: \"Dave M Gahan\" or \"Gahan/Dave\" or \"GAHAN/DAVEM\"", +"type": "string" +}, +"reservationInfo": { +"$ref": "ReservationInfo", +"description": "Required. Information about flight reservation." +}, +"rotatingBarcode": { +"$ref": "RotatingBarcode", +"description": "The rotating barcode type and value." +}, +"securityProgramLogo": { +"$ref": "Image", +"description": "An image for the security program that applies to the passenger." +}, +"smartTapRedemptionValue": { +"description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", +"type": "string" +}, +"state": { +"description": "Required. The state of the object. This field is used to determine how an object is displayed in the app. For example, an `inactive` object is moved to the \"Expired passes\" section.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"active", +"COMPLETED", +"completed", +"EXPIRED", +"expired", +"INACTIVE", +"inactive" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Object is active and displayed to with other active objects.", +"Legacy alias for `ACTIVE`. Deprecated.", +"", +"Legacy alias for `COMPLETED`. Deprecated.", +"Object is no longer valid (`validTimeInterval` passed).", +"Legacy alias for `EXPIRED`. Deprecated.", +"", +"Legacy alias for `INACTIVE`. Deprecated." +], +"type": "string" +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"validTimeInterval": { +"$ref": "TimeInterval", +"description": "The time period this object will be `active` and object can be used. An object's state will be changed to `expired` when this time period has passed." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"FlightObjectAddMessageResponse": { +"id": "FlightObjectAddMessageResponse", +"properties": { +"resource": { +"$ref": "FlightObject", +"description": "The updated FlightObject resource." +} +}, +"type": "object" +}, +"FlightObjectListResponse": { +"id": "FlightObjectListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "FlightObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"FrequentFlyerInfo": { +"id": "FrequentFlyerInfo", +"properties": { +"frequentFlyerNumber": { +"description": "Frequent flyer number. Required for each nested object of kind `walletobjects#frequentFlyerInfo`.", +"type": "string" +}, +"frequentFlyerProgramName": { +"$ref": "LocalizedString", +"description": "Frequent flyer program name. eg: \"Lufthansa Miles & More\"" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#frequentFlyerInfo\"`.", +"type": "string" +} +}, +"type": "object" +}, +"GenericClass": { +"description": "Generic Class", +"id": "GenericClass", +"properties": { +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback." +}, +"classTemplateInfo": { +"$ref": "ClassTemplateInfo", +"description": "Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display." +}, +"enableSmartTap": { +"description": "Available only to Smart Tap enabled partners. Contact support for additional guidance.", +"type": "boolean" +}, +"id": { +"description": "Required. The unique identifier for the class. This ID must be unique across all from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. If `imageModulesData` is also defined on the object, both will be displayed. Only one of the image from class and one from object level will be rendered when both set.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If `linksModuleData` is also defined on the object, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object." +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"multipleDevicesAndHoldersAllowedStatus": { +"description": "Identifies whether multiple users and devices will save the same object referencing this class.", +"enum": [ +"STATUS_UNSPECIFIED", +"MULTIPLE_HOLDERS", +"ONE_USER_ALL_DEVICES", +"ONE_USER_ONE_DEVICE", +"multipleHolders", +"oneUserAllDevices", +"oneUserOneDevice" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +true, +true +], +"enumDescriptions": [ +"Unspecified preference.", +"The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", +"An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", +"An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", +"Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", +"Legacy alias for `ONE_USER_ALL_DEVICES`. Deprecated.", +"Legacy alias for `ONE_USER_ONE_DEVICE`. Deprecated." +], +"type": "string" +}, +"redemptionIssuers": { +"description": "Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The `enableSmartTap` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"securityAnimation": { +"$ref": "SecurityAnimation", +"description": "Optional information about the security animation. If this is set a security animation will be rendered on pass details." +}, +"textModulesData": { +"description": "Text module data. If `textModulesData` is also defined on the object, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"viewUnlockRequirement": { +"description": "View Unlock Requirement options for the generic pass.", +"enum": [ +"VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED", +"UNLOCK_NOT_REQUIRED", +"UNLOCK_REQUIRED_TO_VIEW" +], +"enumDescriptions": [ +"Default value, same as UNLOCK_NOT_REQUIRED.", +"Default behavior for all the existing Passes if ViewUnlockRequirement is not set.", +"Requires the user to unlock their device each time the pass is viewed. If the user removes their device lock after saving the pass, then they will be prompted to create a device lock before the pass can be viewed." +], +"type": "string" +} +}, +"type": "object" +}, +"GenericClassAddMessageResponse": { +"description": "Response to adding a new issuer message to the class. This contains the entire updated GenericClass.", +"id": "GenericClassAddMessageResponse", +"properties": { +"resource": { +"$ref": "GenericClass", +"description": "The updated EventTicketClass resource." +} +}, +"type": "object" +}, +"GenericClassListResponse": { +"description": "List response which contains the list of all generic classes for a given issuer ID.", +"id": "GenericClassListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "GenericClass" +}, +"type": "array" +} +}, +"type": "object" +}, +"GenericObject": { +"description": "Generic Object Next ID: 121", +"id": "GenericObject", +"properties": { +"appLinkData": { +"$ref": "AppLinkData", +"description": "Information about the partner app link. The maximum number of these fields displayed is 10." +}, +"barcode": { +"$ref": "Barcode", +"description": "The barcode type and value. If pass does not have a barcode, we can allow the issuer to set Barcode.alternate_text and display just that." +}, +"cardTitle": { +"$ref": "LocalizedString", +"description": "Required. The header of the pass. This is usually the Business name such as \"XXX Gym\", \"AAA Insurance\". This field is required and appears in the header row at the very top of the pass." +}, +"classId": { +"description": "Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you.", +"type": "string" +}, +"genericType": { +"description": "Specify which `GenericType` the card belongs to.", +"enum": [ +"GENERIC_TYPE_UNSPECIFIED", +"GENERIC_SEASON_PASS", +"GENERIC_UTILITY_BILLS", +"GENERIC_PARKING_PASS", +"GENERIC_VOUCHER", +"GENERIC_GYM_MEMBERSHIP", +"GENERIC_LIBRARY_MEMBERSHIP", +"GENERIC_RESERVATIONS", +"GENERIC_AUTO_INSURANCE", +"GENERIC_HOME_INSURANCE", +"GENERIC_ENTRY_TICKET", +"GENERIC_RECEIPT", +"GENERIC_OTHER" +], +"enumDescriptions": [ +"Unspecified generic type.", +"Season pass", +"Utility bills", +"Parking pass", +"Voucher", +"Gym membership cards", +"Library membership cards", +"Reservations", +"Auto-insurance cards", +"Home-insurance cards", +"Entry tickets", +"Receipts", +"Other type" +], +"type": "string" +}, +"groupingInfo": { +"$ref": "GroupingInfo", +"description": "Information that controls how passes are grouped together." +}, +"hasUsers": { +"description": "Indicates if the object has users. This field is set by the platform.", +"type": "boolean" +}, +"header": { +"$ref": "LocalizedString", +"description": "Required. The title of the pass, such as \"50% off coupon\" or \"Library card\" or \"Voucher\". This field is required and appears in the title row of the pass detail view." +}, +"heroImage": { +"$ref": "Image", +"description": "Banner image displayed on the front of the card if present. The image will be displayed at 100% width." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set, the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used and if logo is not set, a color would be chosen by Google.", +"type": "string" +}, +"id": { +"description": "Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value needs to follow the format `issuerID.identifier` where `issuerID` is issued by Google and `identifier` is chosen by you. The unique identifier can only include alphanumeric characters, `.`, `_`, or `-`.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. Only one of the image from class and one from object level will be rendered when both set.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If `linksModuleData` is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object." +}, +"logo": { +"$ref": "Image", +"description": "The logo image of the pass. This image is displayed in the card detail view in upper left, and also on the list/thumbnail view. If the logo is not present, the first letter of `cardTitle` would be shown as logo." +}, +"notifications": { +"$ref": "Notifications", +"description": "The notification settings that are enabled for this object." +}, +"passConstraints": { +"$ref": "PassConstraints", +"description": "Pass constraints for the object. Includes limiting NFC and screenshot behaviors." +}, +"rotatingBarcode": { +"$ref": "RotatingBarcode", +"description": "The rotating barcode settings/details." +}, +"smartTapRedemptionValue": { +"description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", +"type": "string" +}, +"state": { +"description": "The state of the object. This field is used to determine how an object is displayed in the app. For example, an `inactive` object is moved to the \"Expired passes\" section. If this is not provided, the object would be considered `ACTIVE`.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"active", +"COMPLETED", +"completed", +"EXPIRED", +"expired", +"INACTIVE", +"inactive" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Object is active and displayed to with other active objects.", +"Legacy alias for `ACTIVE`. Deprecated.", +"", +"Legacy alias for `COMPLETED`. Deprecated.", +"Object is no longer valid (`validTimeInterval` passed).", +"Legacy alias for `EXPIRED`. Deprecated.", +"", +"Legacy alias for `INACTIVE`. Deprecated." +], +"type": "string" +}, +"subheader": { +"$ref": "LocalizedString", +"description": "The title label of the pass, such as location where this pass can be used. Appears right above the title in the title row in the pass detail view." +}, +"textModulesData": { +"description": "Text module data. If `textModulesData` is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"validTimeInterval": { +"$ref": "TimeInterval", +"description": "The time period this object will be considered valid or usable. When the time period is passed, the object will be considered expired, which will affect the rendering on user's devices." +}, +"wideLogo": { +"$ref": "Image", +"description": "The wide logo of the pass. When provided, this will be used in place of the logo in the top left of the card view." +} +}, +"type": "object" +}, +"GenericObjectAddMessageResponse": { +"description": "Response to adding a new issuer message to the object. This contains the entire updated GenericObject.", +"id": "GenericObjectAddMessageResponse", +"properties": { +"resource": { +"$ref": "GenericObject", +"description": "The updated GenericObject resource." +} +}, +"type": "object" +}, +"GenericObjectListResponse": { +"description": "List response which contains the list of all generic objects for a given issuer ID.", +"id": "GenericObjectListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "GenericObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GiftCardClass": { +"id": "GiftCardClass", +"properties": { +"allowBarcodeRedemption": { +"description": "Determines whether the merchant supports gift card redemption using barcode. If true, app displays a barcode for the gift card on the Gift card details screen. If false, a barcode is not displayed.", +"type": "boolean" +}, +"allowMultipleUsersPerObject": { +"deprecated": true, +"description": "Deprecated. Use `multipleDevicesAndHoldersAllowedStatus` instead.", +"type": "boolean" +}, +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback." +}, +"cardNumberLabel": { +"description": "The label to display for the card number, such as \"Card Number\".", +"type": "string" +}, +"classTemplateInfo": { +"$ref": "ClassTemplateInfo", +"description": "Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display." +}, +"countryCode": { +"description": "Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.", +"type": "string" +}, +"enableSmartTap": { +"description": "Identifies whether this class supports Smart Tap. The `redemptionIssuers` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"type": "boolean" +}, +"eventNumberLabel": { +"description": "The label to display for event number, such as \"Target Event #\".", +"type": "string" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"homepageUri": { +"$ref": "Uri", +"description": "The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object)." +}, +"id": { +"description": "Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"deprecated": true, +"description": "Deprecated. Use textModulesData instead." +}, +"issuerName": { +"description": "Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#giftCardClass\"`.", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the object, both will be displayed." +}, +"localizedCardNumberLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the card_number_label." +}, +"localizedEventNumberLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the event_number_label." +}, +"localizedIssuerName": { +"$ref": "LocalizedString", +"description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." +}, +"localizedMerchantName": { +"$ref": "LocalizedString", +"description": "Translated strings for the merchant_name. The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens." +}, +"localizedPinLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the pin_label." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"merchantName": { +"description": "Merchant name, such as \"Adam's Apparel\". The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"multipleDevicesAndHoldersAllowedStatus": { +"description": "Identifies whether multiple users and devices will save the same object referencing this class.", +"enum": [ +"STATUS_UNSPECIFIED", +"MULTIPLE_HOLDERS", +"ONE_USER_ALL_DEVICES", +"ONE_USER_ONE_DEVICE", +"multipleHolders", +"oneUserAllDevices", +"oneUserOneDevice" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +true, +true +], +"enumDescriptions": [ +"Unspecified preference.", +"The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", +"An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", +"An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", +"Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", +"Legacy alias for `ONE_USER_ALL_DEVICES`. Deprecated.", +"Legacy alias for `ONE_USER_ONE_DEVICE`. Deprecated." +], +"type": "string" +}, +"pinLabel": { +"description": "The label to display for the PIN, such as \"4-digit PIN\".", +"type": "string" +}, +"programLogo": { +"$ref": "Image", +"description": "The logo of the gift card program or company. This logo is displayed in both the details and list views of the app." +}, +"redemptionIssuers": { +"description": "Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The `enableSmartTap` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"review": { +"$ref": "Review", +"description": "The review comments set by the platform when a class is marked `approved` or `rejected`." +}, +"reviewStatus": { +"description": "Required. The status of the class. This field can be set to `draft` or `underReview` using the insert, patch, or update API calls. Once the review state is changed from `draft` it may not be changed back to `draft`. You should keep this field to `draft` when the class is under development. A `draft` class cannot be used to create any object. You should set this field to `underReview` when you believe the class is ready for use. The platform will automatically set this field to `approved` and it can be immediately used to create or migrate objects. When updating an already `approved` class you should keep setting this field to `underReview`.", +"enum": [ +"REVIEW_STATUS_UNSPECIFIED", +"UNDER_REVIEW", +"underReview", +"APPROVED", +"approved", +"REJECTED", +"rejected", +"DRAFT", +"draft" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `UNDER_REVIEW`. Deprecated.", +"", +"Legacy alias for `APPROVED`. Deprecated.", +"", +"Legacy alias for `REJECTED`. Deprecated.", +"", +"Legacy alias for `DRAFT`. Deprecated." +], +"type": "string" +}, +"securityAnimation": { +"$ref": "SecurityAnimation", +"description": "Optional information about the security animation. If this is set a security animation will be rendered on pass details." +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +}, +"viewUnlockRequirement": { +"description": "View Unlock Requirement options for the gift card.", +"enum": [ +"VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED", +"UNLOCK_NOT_REQUIRED", +"UNLOCK_REQUIRED_TO_VIEW" +], +"enumDescriptions": [ +"Default value, same as UNLOCK_NOT_REQUIRED.", +"Default behavior for all the existing Passes if ViewUnlockRequirement is not set.", +"Requires the user to unlock their device each time the pass is viewed. If the user removes their device lock after saving the pass, then they will be prompted to create a device lock before the pass can be viewed." +], +"type": "string" +}, +"wideProgramLogo": { +"$ref": "Image", +"description": "The wide logo of the gift card program or company. When provided, this will be used in place of the program logo in the top left of the card view." +}, +"wordMark": { +"$ref": "Image", +"deprecated": true, +"description": "Deprecated." +} +}, +"type": "object" +}, +"GiftCardClassAddMessageResponse": { +"id": "GiftCardClassAddMessageResponse", +"properties": { +"resource": { +"$ref": "GiftCardClass", +"description": "The updated GiftCardClass resource." +} +}, +"type": "object" +}, +"GiftCardClassListResponse": { +"id": "GiftCardClassListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "GiftCardClass" +}, +"type": "array" +} +}, +"type": "object" +}, +"GiftCardObject": { +"id": "GiftCardObject", +"properties": { +"appLinkData": { +"$ref": "AppLinkData", +"description": "Optional information about the partner app link." +}, +"balance": { +"$ref": "Money", +"description": "The card's monetary balance." +}, +"balanceUpdateTime": { +"$ref": "DateTime", +"description": "The date and time when the balance was last updated. Offset is required. If balance is updated and this property is not provided, system will default to the current time." +}, +"barcode": { +"$ref": "Barcode", +"description": "The barcode type and value." +}, +"cardNumber": { +"description": "Required. The card's number.", +"type": "string" +}, +"classId": { +"description": "Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you.", +"type": "string" +}, +"classReference": { +"$ref": "GiftCardClass", +"description": "A copy of the inherited fields of the parent class. These fields are retrieved during a GET." +}, +"disableExpirationNotification": { +"description": "Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the `messages` field, expiration notifications to the user will be suppressed. By default, this field is set to false. Currently, this can only be set for offers.", +"type": "boolean" +}, +"eventNumber": { +"description": "The card's event number, an optional field used by some gift cards.", +"type": "string" +}, +"groupingInfo": { +"$ref": "GroupingInfo", +"description": "Information that controls how passes are grouped together." +}, +"hasLinkedDevice": { +"description": "Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.", +"type": "boolean" +}, +"hasUsers": { +"description": "Indicates if the object has users. This field is set by the platform.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed." +}, +"id": { +"description": "Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. The unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"description": "Deprecated. Use textModulesData instead." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#giftCardObject\"`.", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the class, both will be displayed." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"passConstraints": { +"$ref": "PassConstraints", +"description": "Pass constraints for the object. Includes limiting NFC and screenshot behaviors." +}, +"pin": { +"description": "The card's PIN.", +"type": "string" +}, +"rotatingBarcode": { +"$ref": "RotatingBarcode", +"description": "The rotating barcode type and value." +}, +"smartTapRedemptionValue": { +"description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", +"type": "string" +}, +"state": { +"description": "Required. The state of the object. This field is used to determine how an object is displayed in the app. For example, an `inactive` object is moved to the \"Expired passes\" section.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"active", +"COMPLETED", +"completed", +"EXPIRED", +"expired", +"INACTIVE", +"inactive" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Object is active and displayed to with other active objects.", +"Legacy alias for `ACTIVE`. Deprecated.", +"", +"Legacy alias for `COMPLETED`. Deprecated.", +"Object is no longer valid (`validTimeInterval` passed).", +"Legacy alias for `EXPIRED`. Deprecated.", +"", +"Legacy alias for `INACTIVE`. Deprecated." +], +"type": "string" +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"validTimeInterval": { +"$ref": "TimeInterval", +"description": "The time period this object will be `active` and object can be used. An object's state will be changed to `expired` when this time period has passed." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"GiftCardObjectAddMessageResponse": { +"id": "GiftCardObjectAddMessageResponse", +"properties": { +"resource": { +"$ref": "GiftCardObject", +"description": "The updated GiftCardObject resource." +} +}, +"type": "object" +}, +"GiftCardObjectListResponse": { +"id": "GiftCardObjectListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "GiftCardObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"GroupingInfo": { +"id": "GroupingInfo", +"properties": { +"groupingId": { +"description": "Optional grouping ID for grouping the passes with the same ID visually together. Grouping with different types of passes is allowed.", +"type": "string" +}, +"sortIndex": { +"description": "Optional index for sorting the passes when they are grouped with other passes. Passes with lower sort index are shown before passes with higher sort index. If unspecified, the value is assumed to be INT_MAX. For two passes with the same sort index, the sorting behavior is undefined.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Image": { +"description": "Wrapping type for Google hosted images. Next ID: 7", +"id": "Image", +"properties": { +"contentDescription": { +"$ref": "LocalizedString", +"description": "Description of the image used for accessibility." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#image\"`.", +"type": "string" +}, +"sourceUri": { +"$ref": "ImageUri", +"description": "The URI for the image." +} +}, +"type": "object" +}, +"ImageModuleData": { +"id": "ImageModuleData", +"properties": { +"id": { +"description": "The ID associated with an image module. This field is here to enable ease of management of image modules.", +"type": "string" +}, +"mainImage": { +"$ref": "Image", +"description": "A 100% width image." +} +}, +"type": "object" +}, +"ImageUri": { +"id": "ImageUri", +"properties": { +"description": { +"deprecated": true, +"description": "Additional information about the image, which is unused and retained only for backward compatibility.", +"type": "string" +}, +"localizedDescription": { +"$ref": "LocalizedString", +"deprecated": true, +"description": "Translated strings for the description, which are unused and retained only for backward compatibility." +}, +"uri": { +"description": "The location of the image. URIs must have a scheme.", +"type": "string" +} +}, +"type": "object" +}, +"InfoModuleData": { +"id": "InfoModuleData", +"properties": { +"labelValueRows": { +"description": "A list of collections of labels and values. These will be displayed one after the other in a singular column.", +"items": { +"$ref": "LabelValueRow" +}, +"type": "array" +}, +"showLastUpdateTime": { +"deprecated": true, +"type": "boolean" +} +}, +"type": "object" +}, +"Issuer": { +"id": "Issuer", +"properties": { +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Allows the issuer to provide their callback settings." +}, +"contactInfo": { +"$ref": "IssuerContactInfo", +"description": "Issuer contact information." +}, +"homepageUrl": { +"description": "URL for the issuer's home page.", +"type": "string" +}, +"issuerId": { +"description": "The unique identifier for an issuer account. This is automatically generated when the issuer is inserted.", +"format": "int64", +"type": "string" +}, +"name": { +"description": "The account name of the issuer.", +"type": "string" +}, +"smartTapMerchantData": { +"$ref": "SmartTapMerchantData", +"description": "Available only to Smart Tap enabled partners. Contact support for additional guidance." +} +}, +"type": "object" +}, +"IssuerContactInfo": { +"id": "IssuerContactInfo", +"properties": { +"alertsEmails": { +"description": "Email addresses which will receive alerts.", +"items": { +"type": "string" +}, +"type": "array" +}, +"email": { +"description": "The primary contact email address.", +"type": "string" +}, +"name": { +"description": "The primary contact name.", +"type": "string" +}, +"phone": { +"description": "The primary contact phone number.", +"type": "string" +} +}, +"type": "object" +}, +"IssuerListResponse": { +"id": "IssuerListResponse", +"properties": { +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "Issuer" +}, +"type": "array" +} +}, +"type": "object" +}, +"IssuerToUserInfo": { +"id": "IssuerToUserInfo", +"properties": { +"action": { +"enum": [ +"ACTION_UNSPECIFIED", +"S2AP", +"s2ap", +"SIGN_UP", +"signUp" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `S2AP`. Deprecated.", +"", +"Legacy alias for `SIGN_UP`. Deprecated." +], +"type": "string" +}, +"signUpInfo": { +"$ref": "SignUpInfo" +}, +"url": { +"description": "Currently not used, consider deprecating.", +"type": "string" +}, +"value": { +"description": "JSON web token for action S2AP.", +"type": "string" +} +}, +"type": "object" +}, +"JwtInsertResponse": { +"id": "JwtInsertResponse", +"properties": { +"resources": { +"$ref": "Resources", +"description": "Data that corresponds to the ids of the provided classes and objects in the JWT. resources will only include the non-empty arrays (i.e. if the JWT only includes eventTicketObjects, then that is the only field that will be present in resources)." +}, +"saveUri": { +"description": "A URI that, when opened, will allow the end user to save the object(s) identified in the JWT to their Google account.", +"type": "string" +} +}, +"type": "object" +}, +"JwtResource": { +"id": "JwtResource", +"properties": { +"jwt": { +"description": "A string representing a JWT of the format described at https://developers.google.com/wallet/reference/rest/v1/Jwt", +"type": "string" +} +}, +"type": "object" +}, +"LabelValue": { +"description": "A pair of text strings to be displayed in the details view. Note we no longer display LabelValue/LabelValueRow as a table, instead a list of items.", +"id": "LabelValue", +"properties": { +"label": { +"description": "The label for a specific row and column. Recommended maximum is 15 characters for a two-column layout and 30 characters for a one-column layout.", +"type": "string" +}, +"localizedLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the label. Recommended maximum is 15 characters for a two-column layout and 30 characters for a one-column layout." +}, +"localizedValue": { +"$ref": "LocalizedString", +"description": "Translated strings for the value. Recommended maximum is 15 characters for a two-column layout and 30 characters for a one-column layout." +}, +"value": { +"description": "The value for a specific row and column. Recommended maximum is 15 characters for a two-column layout and 30 characters for a one-column layout.", +"type": "string" +} +}, +"type": "object" +}, +"LabelValueRow": { +"id": "LabelValueRow", +"properties": { +"columns": { +"description": "A list of labels and values. These will be displayed in a singular column, one after the other, not in multiple columns, despite the field name.", +"items": { +"$ref": "LabelValue" +}, +"type": "array" +} +}, +"type": "object" +}, +"LatLongPoint": { +"id": "LatLongPoint", +"properties": { +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#latLongPoint\"`.", +"type": "string" +}, +"latitude": { +"description": "The latitude specified as any value in the range of -90.0 through +90.0, both inclusive. Values outside these bounds will be rejected.", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "The longitude specified in the range -180.0 through +180.0, both inclusive. Values outside these bounds will be rejected.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"LinksModuleData": { +"id": "LinksModuleData", +"properties": { +"uris": { +"description": "The list of URIs.", +"items": { +"$ref": "Uri" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListTemplateOverride": { +"id": "ListTemplateOverride", +"properties": { +"firstRowOption": { +"$ref": "FirstRowOption", +"description": "Specifies from a predefined set of options or from a reference to the field what will be displayed in the first row. To set this override, set the FirstRowOption.fieldOption to the FieldSelector of your choice." +}, +"secondRowOption": { +"$ref": "FieldSelector", +"description": "A reference to the field to be displayed in the second row. This option is only displayed if there are not multiple user objects in a group. If there is a group, the second row will always display a field shared by all objects. To set this override, please set secondRowOption to the FieldSelector of you choice." +}, +"thirdRowOption": { +"$ref": "FieldSelector", +"deprecated": true, +"description": "An unused/deprecated field. Setting it will have no effect on what the user sees." +} +}, +"type": "object" +}, +"LocalizedString": { +"id": "LocalizedString", +"properties": { +"defaultValue": { +"$ref": "TranslatedString", +"description": "Contains the string to be displayed if no appropriate translation is available." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#localizedString\"`.", +"type": "string" +}, +"translatedValues": { +"description": "Contains the translations for the string.", +"items": { +"$ref": "TranslatedString" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoyaltyClass": { +"id": "LoyaltyClass", +"properties": { +"accountIdLabel": { +"description": "The account ID label, such as \"Member ID.\" Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"accountNameLabel": { +"description": "The account name label, such as \"Member Name.\" Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"allowMultipleUsersPerObject": { +"deprecated": true, +"description": "Deprecated. Use `multipleDevicesAndHoldersAllowedStatus` instead.", +"type": "boolean" +}, +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback." +}, +"classTemplateInfo": { +"$ref": "ClassTemplateInfo", +"description": "Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display." +}, +"countryCode": { +"description": "Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.", +"type": "string" +}, +"discoverableProgram": { +"$ref": "DiscoverableProgram", +"description": "Information about how the class may be discovered and instantiated from within the Google Pay app." +}, +"enableSmartTap": { +"description": "Identifies whether this class supports Smart Tap. The `redemptionIssuers` and one of object level `smartTapRedemptionLevel`, barcode.value`, or `accountId` fields must also be set up correctly in order for a pass to support Smart Tap.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"homepageUri": { +"$ref": "Uri", +"description": "The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object)." +}, +"id": { +"description": "Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"deprecated": true, +"description": "Deprecated. Use textModulesData instead." +}, +"issuerName": { +"description": "Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#loyaltyClass\"`.", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the object, both will be displayed." +}, +"localizedAccountIdLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the account_id_label. Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens." +}, +"localizedAccountNameLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the account_name_label. Recommended maximum length is 15 characters to ensure full string is displayed on smaller screens." +}, +"localizedIssuerName": { +"$ref": "LocalizedString", +"description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." +}, +"localizedProgramName": { +"$ref": "LocalizedString", +"description": "Translated strings for the program_name. The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens." +}, +"localizedRewardsTier": { +"$ref": "LocalizedString", +"description": "Translated strings for the rewards_tier. Recommended maximum length is 7 characters to ensure full string is displayed on smaller screens." +}, +"localizedRewardsTierLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the rewards_tier_label. Recommended maximum length is 9 characters to ensure full string is displayed on smaller screens." +}, +"localizedSecondaryRewardsTier": { +"$ref": "LocalizedString", +"description": "Translated strings for the secondary_rewards_tier." +}, +"localizedSecondaryRewardsTierLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the secondary_rewards_tier_label." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"multipleDevicesAndHoldersAllowedStatus": { +"description": "Identifies whether multiple users and devices will save the same object referencing this class.", +"enum": [ +"STATUS_UNSPECIFIED", +"MULTIPLE_HOLDERS", +"ONE_USER_ALL_DEVICES", +"ONE_USER_ONE_DEVICE", +"multipleHolders", +"oneUserAllDevices", +"oneUserOneDevice" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +true, +true +], +"enumDescriptions": [ +"Unspecified preference.", +"The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", +"An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", +"An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", +"Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", +"Legacy alias for `ONE_USER_ALL_DEVICES`. Deprecated.", +"Legacy alias for `ONE_USER_ONE_DEVICE`. Deprecated." +], +"type": "string" +}, +"programLogo": { +"$ref": "Image", +"description": "Required. The logo of the loyalty program or company. This logo is displayed in both the details and list views of the app." +}, +"programName": { +"description": "Required. The program name, such as \"Adam's Apparel\". The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"redemptionIssuers": { +"description": "Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The `enableSmartTap` and one of object level `smartTapRedemptionValue`, barcode.value`, or `accountId` fields must also be set up correctly in order for a pass to support Smart Tap.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"review": { +"$ref": "Review", +"description": "The review comments set by the platform when a class is marked `approved` or `rejected`." +}, +"reviewStatus": { +"description": "Required. The status of the class. This field can be set to `draft` or `underReview` using the insert, patch, or update API calls. Once the review state is changed from `draft` it may not be changed back to `draft`. You should keep this field to `draft` when the class is under development. A `draft` class cannot be used to create any object. You should set this field to `underReview` when you believe the class is ready for use. The platform will automatically set this field to `approved` and it can be immediately used to create or migrate objects. When updating an already `approved` class you should keep setting this field to `underReview`.", +"enum": [ +"REVIEW_STATUS_UNSPECIFIED", +"UNDER_REVIEW", +"underReview", +"APPROVED", +"approved", +"REJECTED", +"rejected", +"DRAFT", +"draft" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `UNDER_REVIEW`. Deprecated.", +"", +"Legacy alias for `APPROVED`. Deprecated.", +"", +"Legacy alias for `REJECTED`. Deprecated.", +"", +"Legacy alias for `DRAFT`. Deprecated." +], +"type": "string" +}, +"rewardsTier": { +"description": "The rewards tier, such as \"Gold\" or \"Platinum.\" Recommended maximum length is 7 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"rewardsTierLabel": { +"description": "The rewards tier label, such as \"Rewards Tier.\" Recommended maximum length is 9 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"secondaryRewardsTier": { +"description": "The secondary rewards tier, such as \"Gold\" or \"Platinum.\"", +"type": "string" +}, +"secondaryRewardsTierLabel": { +"description": "The secondary rewards tier label, such as \"Rewards Tier.\"", +"type": "string" +}, +"securityAnimation": { +"$ref": "SecurityAnimation", +"description": "Optional information about the security animation. If this is set a security animation will be rendered on pass details." +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +}, +"viewUnlockRequirement": { +"description": "View Unlock Requirement options for the loyalty card.", +"enum": [ +"VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED", +"UNLOCK_NOT_REQUIRED", +"UNLOCK_REQUIRED_TO_VIEW" +], +"enumDescriptions": [ +"Default value, same as UNLOCK_NOT_REQUIRED.", +"Default behavior for all the existing Passes if ViewUnlockRequirement is not set.", +"Requires the user to unlock their device each time the pass is viewed. If the user removes their device lock after saving the pass, then they will be prompted to create a device lock before the pass can be viewed." +], +"type": "string" +}, +"wideProgramLogo": { +"$ref": "Image", +"description": "The wide logo of the loyalty program or company. When provided, this will be used in place of the program logo in the top left of the card view." +}, +"wordMark": { +"$ref": "Image", +"deprecated": true, +"description": "Deprecated." +} +}, +"type": "object" +}, +"LoyaltyClassAddMessageResponse": { +"id": "LoyaltyClassAddMessageResponse", +"properties": { +"resource": { +"$ref": "LoyaltyClass", +"description": "The updated LoyaltyClass resource." +} +}, +"type": "object" +}, +"LoyaltyClassListResponse": { +"id": "LoyaltyClassListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "LoyaltyClass" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoyaltyObject": { +"id": "LoyaltyObject", +"properties": { +"accountId": { +"description": "The loyalty account identifier. Recommended maximum length is 20 characters.", +"type": "string" +}, +"accountName": { +"description": "The loyalty account holder name, such as \"John Smith.\" Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"appLinkData": { +"$ref": "AppLinkData", +"description": "Optional information about the partner app link." +}, +"barcode": { +"$ref": "Barcode", +"description": "The barcode type and value." +}, +"classId": { +"description": "Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you.", +"type": "string" +}, +"classReference": { +"$ref": "LoyaltyClass", +"description": "A copy of the inherited fields of the parent class. These fields are retrieved during a GET." +}, +"disableExpirationNotification": { +"description": "Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the `messages` field, expiration notifications to the user will be suppressed. By default, this field is set to false. Currently, this can only be set for offers.", +"type": "boolean" +}, +"groupingInfo": { +"$ref": "GroupingInfo", +"description": "Information that controls how passes are grouped together." +}, +"hasLinkedDevice": { +"description": "Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.", +"type": "boolean" +}, +"hasUsers": { +"description": "Indicates if the object has users. This field is set by the platform.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed." +}, +"id": { +"description": "Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. The unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"description": "Deprecated. Use textModulesData instead." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#loyaltyObject\"`.", +"type": "string" +}, +"linkedOfferIds": { +"description": "A list of offer objects linked to this loyalty card. The offer objects must already exist. Offer object IDs should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you.", +"items": { +"type": "string" +}, +"type": "array" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the class, both will be displayed." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"loyaltyPoints": { +"$ref": "LoyaltyPoints", +"description": "The loyalty reward points label, balance, and type." +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"passConstraints": { +"$ref": "PassConstraints", +"description": "Pass constraints for the object. Includes limiting NFC and screenshot behaviors." +}, +"rotatingBarcode": { +"$ref": "RotatingBarcode", +"description": "The rotating barcode type and value." +}, +"secondaryLoyaltyPoints": { +"$ref": "LoyaltyPoints", +"description": "The secondary loyalty reward points label, balance, and type. Shown in addition to the primary loyalty points." +}, +"smartTapRedemptionValue": { +"description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported. If this value is not set but the class level fields `enableSmartTap` and `redemptionIssuers` are set up correctly, the `barcode.value` or the `accountId` fields are used as fallback if present.", +"type": "string" +}, +"state": { +"description": "Required. The state of the object. This field is used to determine how an object is displayed in the app. For example, an `inactive` object is moved to the \"Expired passes\" section.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"active", +"COMPLETED", +"completed", +"EXPIRED", +"expired", +"INACTIVE", +"inactive" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Object is active and displayed to with other active objects.", +"Legacy alias for `ACTIVE`. Deprecated.", +"", +"Legacy alias for `COMPLETED`. Deprecated.", +"Object is no longer valid (`validTimeInterval` passed).", +"Legacy alias for `EXPIRED`. Deprecated.", +"", +"Legacy alias for `INACTIVE`. Deprecated." +], +"type": "string" +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"validTimeInterval": { +"$ref": "TimeInterval", +"description": "The time period this object will be `active` and object can be used. An object's state will be changed to `expired` when this time period has passed." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"LoyaltyObjectAddMessageResponse": { +"id": "LoyaltyObjectAddMessageResponse", +"properties": { +"resource": { +"$ref": "LoyaltyObject", +"description": "The updated LoyaltyObject resource." +} +}, +"type": "object" +}, +"LoyaltyObjectListResponse": { +"id": "LoyaltyObjectListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "LoyaltyObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"LoyaltyPoints": { +"id": "LoyaltyPoints", +"properties": { +"balance": { +"$ref": "LoyaltyPointsBalance", +"description": "The account holder's loyalty point balance, such as \"500\" or \"$10.00\". Recommended maximum length is 7 characters. This is a required field of `loyaltyPoints` and `secondaryLoyaltyPoints`." +}, +"label": { +"description": "The loyalty points label, such as \"Points\". Recommended maximum length is 9 characters.", +"type": "string" +}, +"localizedLabel": { +"$ref": "LocalizedString", +"description": "Translated strings for the label. Recommended maximum length is 9 characters." +} +}, +"type": "object" +}, +"LoyaltyPointsBalance": { +"id": "LoyaltyPointsBalance", +"properties": { +"double": { +"description": "The double form of a balance. Only one of these subtypes (string, int, double, money) should be populated.", +"format": "double", +"type": "number" +}, +"int": { +"description": "The integer form of a balance. Only one of these subtypes (string, int, double, money) should be populated.", +"format": "int32", +"type": "integer" +}, +"money": { +"$ref": "Money", +"description": "The money form of a balance. Only one of these subtypes (string, int, double, money) should be populated." +}, +"string": { +"description": "The string form of a balance. Only one of these subtypes (string, int, double, money) should be populated.", +"type": "string" +} +}, +"type": "object" +}, +"Media": { +"description": "A reference to data stored on the filesystem, on GFS or in blobstore.", +"id": "Media", +"properties": { +"algorithm": { +"deprecated": true, +"description": "Deprecated, use one of explicit hash type fields instead. Algorithm used for calculating the hash. As of 2011/01/21, \"MD5\" is the only possible value for this field. New values may be added at any time.", +"type": "string" +}, +"bigstoreObjectRef": { +"deprecated": true, +"description": "Use object_id instead.", +"format": "byte", +"type": "string" +}, +"blobRef": { +"deprecated": true, +"description": "Blobstore v1 reference, set if reference_type is BLOBSTORE_REF This should be the byte representation of a blobstore.BlobRef. Since Blobstore is deprecating v1, use blobstore2_info instead. For now, any v2 blob will also be represented in this field as v1 BlobRef.", +"format": "byte", +"type": "string" +}, +"blobstore2Info": { +"$ref": "Blobstore2Info", +"description": "Blobstore v2 info, set if reference_type is BLOBSTORE_REF and it refers to a v2 blob." +}, +"compositeMedia": { +"description": "A composite media composed of one or more media objects, set if reference_type is COMPOSITE_MEDIA. The media length field must be set to the sum of the lengths of all composite media objects. Note: All composite media must have length specified.", +"items": { +"$ref": "CompositeMedia" +}, +"type": "array" +}, +"contentType": { +"description": "MIME type of the data", +"type": "string" +}, +"contentTypeInfo": { +"$ref": "ContentTypeInfo", +"description": "Extended content type information provided for Scotty uploads." +}, +"cosmoBinaryReference": { +"description": "A binary data reference for a media download. Serves as a technology-agnostic binary reference in some Google infrastructure. This value is a serialized storage_cosmo.BinaryReference proto. Storing it as bytes is a hack to get around the fact that the cosmo proto (as well as others it includes) doesn't support JavaScript. This prevents us from including the actual type of this field.", +"format": "byte", +"type": "string" +}, +"crc32cHash": { +"description": "For Scotty Uploads: Scotty-provided hashes for uploads For Scotty Downloads: (WARNING: DO NOT USE WITHOUT PERMISSION FROM THE SCOTTY TEAM.) A Hash provided by the agent to be used to verify the data being downloaded. Currently only supported for inline payloads. Further, only crc32c_hash is currently supported.", +"format": "uint32", +"type": "integer" +}, +"diffChecksumsResponse": { +"$ref": "DiffChecksumsResponse", +"description": "Set if reference_type is DIFF_CHECKSUMS_RESPONSE." +}, +"diffDownloadResponse": { +"$ref": "DiffDownloadResponse", +"description": "Set if reference_type is DIFF_DOWNLOAD_RESPONSE." +}, +"diffUploadRequest": { +"$ref": "DiffUploadRequest", +"description": "Set if reference_type is DIFF_UPLOAD_REQUEST." +}, +"diffUploadResponse": { +"$ref": "DiffUploadResponse", +"description": "Set if reference_type is DIFF_UPLOAD_RESPONSE." +}, +"diffVersionResponse": { +"$ref": "DiffVersionResponse", +"description": "Set if reference_type is DIFF_VERSION_RESPONSE." +}, +"downloadParameters": { +"$ref": "DownloadParameters", +"description": "Parameters for a media download." +}, +"filename": { +"description": "Original file name", +"type": "string" +}, +"hash": { +"deprecated": true, +"description": "Deprecated, use one of explicit hash type fields instead. These two hash related fields will only be populated on Scotty based media uploads and will contain the content of the hash group in the NotificationRequest: http://cs/#google3/uploader/service/proto/upload_listener.proto&q=class:Hash Hex encoded hash value of the uploaded media.", +"type": "string" +}, +"hashVerified": { +"description": "For Scotty uploads only. If a user sends a hash code and the backend has requested that Scotty verify the upload against the client hash, Scotty will perform the check on behalf of the backend and will reject it if the hashes don't match. This is set to true if Scotty performed this verification.", +"type": "boolean" +}, +"inline": { +"description": "Media data, set if reference_type is INLINE", +"format": "byte", +"type": "string" +}, +"isPotentialRetry": { +"description": "|is_potential_retry| is set false only when Scotty is certain that it has not sent the request before. When a client resumes an upload, this field must be set true in agent calls, because Scotty cannot be certain that it has never sent the request before due to potential failure in the session state persistence.", +"type": "boolean" +}, +"length": { +"description": "Size of the data, in bytes", +"format": "int64", +"type": "string" +}, +"md5Hash": { +"description": "Scotty-provided MD5 hash for an upload.", +"format": "byte", +"type": "string" +}, +"mediaId": { +"description": "Media id to forward to the operation GetMedia. Can be set if reference_type is GET_MEDIA.", +"format": "byte", +"type": "string" +}, +"objectId": { +"$ref": "ObjectId", +"description": "Reference to a TI Blob, set if reference_type is BIGSTORE_REF." +}, +"path": { +"description": "Path to the data, set if reference_type is PATH", +"type": "string" +}, +"referenceType": { +"description": "Describes what the field reference contains.", +"enum": [ +"PATH", +"BLOB_REF", +"INLINE", +"GET_MEDIA", +"COMPOSITE_MEDIA", +"BIGSTORE_REF", +"DIFF_VERSION_RESPONSE", +"DIFF_CHECKSUMS_RESPONSE", +"DIFF_DOWNLOAD_RESPONSE", +"DIFF_UPLOAD_REQUEST", +"DIFF_UPLOAD_RESPONSE", +"COSMO_BINARY_REFERENCE", +"ARBITRARY_BYTES" +], +"enumDescriptions": [ +"Reference contains a GFS path or a local path.", +"Reference points to a blobstore object. This could be either a v1 blob_ref or a v2 blobstore2_info. Clients should check blobstore2_info first, since v1 is being deprecated.", +"Data is included into this proto buffer", +"Data should be accessed from the current service using the operation GetMedia.", +"The content for this media object is stored across multiple partial media objects under the composite_media field.", +"Reference points to a bigstore object", +"Indicates the data is stored in diff_version_response.", +"Indicates the data is stored in diff_checksums_response.", +"Indicates the data is stored in diff_download_response.", +"Indicates the data is stored in diff_upload_request.", +"Indicates the data is stored in diff_upload_response.", +"Indicates the data is stored in cosmo_binary_reference.", +"Informs Scotty to generate a response payload with the size specified in the length field. The contents of the payload are generated by Scotty and are undefined. This is useful for testing download speeds between the user and Scotty without involving a real payload source. Note: range is not supported when using arbitrary_bytes." +], +"type": "string" +}, +"sha1Hash": { +"description": "Scotty-provided SHA1 hash for an upload.", +"format": "byte", +"type": "string" +}, +"sha256Hash": { +"description": "Scotty-provided SHA256 hash for an upload.", +"format": "byte", +"type": "string" +}, +"timestamp": { +"description": "Time at which the media data was last updated, in milliseconds since UNIX epoch", +"format": "uint64", +"type": "string" +}, +"token": { +"description": "A unique fingerprint/version id for the media data", +"type": "string" +} +}, +"type": "object" +}, +"MediaRequestInfo": { +"description": "Extra information added to operations that support Scotty media requests.", +"id": "MediaRequestInfo", +"properties": { +"currentBytes": { +"description": "The number of current bytes uploaded or downloaded.", +"format": "int64", +"type": "string" +}, +"customData": { +"description": "Data to be copied to backend requests. Custom data is returned to Scotty in the agent_state field, which Scotty will then provide in subsequent upload notifications.", +"type": "string" +}, +"diffObjectVersion": { +"description": "Set if the http request info is diff encoded. The value of this field is the version number of the base revision. This is corresponding to Apiary's mediaDiffObjectVersion (//depot/google3/java/com/google/api/server/media/variable/DiffObjectVersionVariable.java). See go/esf-scotty-diff-upload for more information.", +"type": "string" +}, +"finalStatus": { +"description": "The existence of the final_status field indicates that this is the last call to the agent for this request_id. http://google3/uploader/agent/scotty_agent.proto?l=737&rcl=347601929", +"format": "int32", +"type": "integer" +}, +"notificationType": { +"description": "The type of notification received from Scotty.", +"enum": [ +"START", +"PROGRESS", +"END", +"RESPONSE_SENT", +"ERROR" +], +"enumDescriptions": [ +"Such requests signals the start of a request containing media upload. Only the media field(s) in the inserted/updated resource are set. The response should either return an error or succeed. On success, responses don't need to contain anything.", +"Such requests signals that the upload has progressed and that the backend might want to access the media file specified in relevant fields in the resource. Only the media field(s) in the inserted/updated resource are set. The response should either return an error or succeed. On success, responses don't need to contain anything.", +"Such requests signals the end of a request containing media upload. END should be handled just like normal Insert/Upload requests, that is, they should process the request and return a complete resource in the response. Pointers to media data (a GFS path usually) appear in the relevant fields in the inserted/updated resource. See gdata.Media in data.proto.", +"Such requests occur after an END and signal that the response has been sent back to the client. RESPONSE_SENT is only sent to the backend if it is configured to receive them. The response does not need to contain anything.", +"Such requests indicate that an error occurred while processing the request. ERROR is only sent to the backend if it is configured to receive them. It is not guaranteed that all errors will result in this notification to the backend, even if the backend requests them. Since these requests are just for informational purposes, the response does not need to contain anything." +], +"type": "string" +}, +"requestId": { +"description": "The Scotty request ID.", +"type": "string" +}, +"requestReceivedParamsServingInfo": { +"description": "The partition of the Scotty server handling this request. type is uploader_service.RequestReceivedParamsServingInfo LINT.IfChange(request_received_params_serving_info_annotations) LINT.ThenChange()", +"format": "byte", +"type": "string" +}, +"totalBytes": { +"description": "The total size of the file.", +"format": "int64", +"type": "string" +}, +"totalBytesIsEstimated": { +"description": "Whether the total bytes field contains an estimated data.", +"type": "boolean" +} +}, +"type": "object" +}, +"Message": { +"description": "A message that will be displayed with a Valuable", +"id": "Message", +"properties": { +"body": { +"description": "The message body.", +"type": "string" +}, +"displayInterval": { +"$ref": "TimeInterval", +"description": "The period of time that the message will be displayed to users. You can define both a `startTime` and `endTime` for each message. A message is displayed immediately after a Wallet Object is inserted unless a `startTime` is set. The message will appear in a list of messages indefinitely if `endTime` is not provided." +}, +"header": { +"description": "The message header.", +"type": "string" +}, +"id": { +"description": "The ID associated with a message. This field is here to enable ease of management of messages. Notice ID values could possibly duplicate across multiple messages in the same class/instance, and care must be taken to select a reasonable ID for each message.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#walletObjectMessage\"`.", +"type": "string" +}, +"localizedBody": { +"$ref": "LocalizedString", +"description": "Translated strings for the message body." +}, +"localizedHeader": { +"$ref": "LocalizedString", +"description": "Translated strings for the message header." +}, +"messageType": { +"description": "The message type.", +"enum": [ +"MESSAGE_TYPE_UNSPECIFIED", +"TEXT", +"text", +"EXPIRATION_NOTIFICATION", +"expirationNotification" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Renders the message as text on the card details screen. This is the default message type.", +"Legacy alias for `TEXT`. Deprecated.", +"Note: This enum is currently not supported.", +"Legacy alias for `EXPIRATION_NOTIFICATION`. Deprecated." +], +"type": "string" +} +}, +"type": "object" +}, +"ModifyLinkedOfferObjects": { +"id": "ModifyLinkedOfferObjects", +"properties": { +"addLinkedOfferObjectIds": { +"description": "The linked offer object ids to add to the object.", +"items": { +"type": "string" +}, +"type": "array" +}, +"removeLinkedOfferObjectIds": { +"description": "The linked offer object ids to remove from the object.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ModifyLinkedOfferObjectsRequest": { +"id": "ModifyLinkedOfferObjectsRequest", +"properties": { +"linkedOfferObjectIds": { +"$ref": "ModifyLinkedOfferObjects", +"description": "The linked offer object ids to add or remove from the object." +} +}, +"type": "object" +}, +"Money": { +"id": "Money", +"properties": { +"currencyCode": { +"description": "The currency code, such as \"USD\" or \"EUR.\"", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#money\"`.", +"type": "string" +}, +"micros": { +"description": "The unit of money amount in micros. For example, $1 USD would be represented as 1000000 micros.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Notifications": { +"description": "Indicates if the object needs to have notification enabled. We support only one of ExpiryNotification/UpcomingNotification. `expiryNotification` takes precedence over `upcomingNotification`. In other words if `expiryNotification` is set, we ignore the `upcomingNotification` field.", +"id": "Notifications", +"properties": { +"expiryNotification": { +"$ref": "ExpiryNotification", +"description": "A notification would be triggered at a specific time before the card expires." +}, +"upcomingNotification": { +"$ref": "UpcomingNotification", +"description": "A notification would be triggered at a specific time before the card becomes usable." +} +}, +"type": "object" +}, +"ObjectId": { +"description": "This is a copy of the tech.blob.ObjectId proto, which could not be used directly here due to transitive closure issues with JavaScript support; see http://b/8801763.", +"id": "ObjectId", +"properties": { +"bucketName": { +"description": "The name of the bucket to which this object belongs.", +"type": "string" +}, +"generation": { +"description": "Generation of the object. Generations are monotonically increasing across writes, allowing them to be be compared to determine which generation is newer. If this is omitted in a request, then you are requesting the live object. See http://go/bigstore-versions", +"format": "int64", +"type": "string" +}, +"objectName": { +"description": "The name of the object.", +"type": "string" +} +}, +"type": "object" +}, +"OfferClass": { +"id": "OfferClass", +"properties": { +"allowMultipleUsersPerObject": { +"deprecated": true, +"description": "Deprecated. Use `multipleDevicesAndHoldersAllowedStatus` instead.", +"type": "boolean" +}, +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback." +}, +"classTemplateInfo": { +"$ref": "ClassTemplateInfo", +"description": "Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display." +}, +"countryCode": { +"description": "Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.", +"type": "string" +}, +"details": { +"description": "The details of the offer.", +"type": "string" +}, +"enableSmartTap": { +"description": "Identifies whether this class supports Smart Tap. The `redemptionIssuers` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"type": "boolean" +}, +"finePrint": { +"description": "The fine print or terms of the offer, such as \"20% off any t-shirt at Adam's Apparel.\"", +"type": "string" +}, +"helpUri": { +"$ref": "Uri", +"description": "The help link for the offer, such as `http://myownpersonaldomain.com/help`" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"homepageUri": { +"$ref": "Uri", +"description": "The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object)." +}, +"id": { +"description": "Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"deprecated": true, +"description": "Deprecated. Use textModulesData instead." +}, +"issuerName": { +"description": "Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#offerClass\"`.", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the object, both will be displayed." +}, +"localizedDetails": { +"$ref": "LocalizedString", +"description": "Translated strings for the details." +}, +"localizedFinePrint": { +"$ref": "LocalizedString", +"description": "Translated strings for the fine_print." +}, +"localizedIssuerName": { +"$ref": "LocalizedString", +"description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." +}, +"localizedProvider": { +"$ref": "LocalizedString", +"description": "Translated strings for the provider. Recommended maximum length is 12 characters to ensure full string is displayed on smaller screens." +}, +"localizedShortTitle": { +"$ref": "LocalizedString", +"description": "Translated strings for the short title. Recommended maximum length is 20 characters." +}, +"localizedTitle": { +"$ref": "LocalizedString", +"description": "Translated strings for the title. Recommended maximum length is 60 characters to ensure full string is displayed on smaller screens." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"multipleDevicesAndHoldersAllowedStatus": { +"description": "Identifies whether multiple users and devices will save the same object referencing this class.", +"enum": [ +"STATUS_UNSPECIFIED", +"MULTIPLE_HOLDERS", +"ONE_USER_ALL_DEVICES", +"ONE_USER_ONE_DEVICE", +"multipleHolders", +"oneUserAllDevices", +"oneUserOneDevice" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +true, +true +], +"enumDescriptions": [ +"Unspecified preference.", +"The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", +"An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", +"An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", +"Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", +"Legacy alias for `ONE_USER_ALL_DEVICES`. Deprecated.", +"Legacy alias for `ONE_USER_ONE_DEVICE`. Deprecated." +], +"type": "string" +}, +"provider": { +"description": "Required. The offer provider (either the aggregator name or merchant name). Recommended maximum length is 12 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"redemptionChannel": { +"description": "Required. The redemption channels applicable to this offer.", +"enum": [ +"REDEMPTION_CHANNEL_UNSPECIFIED", +"INSTORE", +"instore", +"ONLINE", +"online", +"BOTH", +"both", +"TEMPORARY_PRICE_REDUCTION", +"temporaryPriceReduction" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `INSTORE`. Deprecated.", +"", +"Legacy alias for `ONLINE`. Deprecated.", +"", +"Legacy alias for `BOTH`. Deprecated.", +"", +"Legacy alias for `TEMPORARY_PRICE_REDUCTION`. Deprecated." +], +"type": "string" +}, +"redemptionIssuers": { +"description": "Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The `enableSmartTap` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"review": { +"$ref": "Review", +"description": "The review comments set by the platform when a class is marked `approved` or `rejected`." +}, +"reviewStatus": { +"description": "Required. The status of the class. This field can be set to `draft` or The status of the class. This field can be set to `draft` or `underReview` using the insert, patch, or update API calls. Once the review state is changed from `draft` it may not be changed back to `draft`. You should keep this field to `draft` when the class is under development. A `draft` class cannot be used to create any object. You should set this field to `underReview` when you believe the class is ready for use. The platform will automatically set this field to `approved` and it can be immediately used to create or migrate objects. When updating an already `approved` class you should keep setting this field to `underReview`.", +"enum": [ +"REVIEW_STATUS_UNSPECIFIED", +"UNDER_REVIEW", +"underReview", +"APPROVED", +"approved", +"REJECTED", +"rejected", +"DRAFT", +"draft" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `UNDER_REVIEW`. Deprecated.", +"", +"Legacy alias for `APPROVED`. Deprecated.", +"", +"Legacy alias for `REJECTED`. Deprecated.", +"", +"Legacy alias for `DRAFT`. Deprecated." +], +"type": "string" +}, +"securityAnimation": { +"$ref": "SecurityAnimation", +"description": "Optional information about the security animation. If this is set a security animation will be rendered on pass details." +}, +"shortTitle": { +"description": "A shortened version of the title of the offer, such as \"20% off,\" shown to users as a quick reference to the offer contents. Recommended maximum length is 20 characters.", +"type": "string" +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"title": { +"description": "Required. The title of the offer, such as \"20% off any t-shirt.\" Recommended maximum length is 60 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"titleImage": { +"$ref": "Image", +"description": "The title image of the offer. This image is displayed in both the details and list views of the app." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +}, +"viewUnlockRequirement": { +"description": "View Unlock Requirement options for the offer.", +"enum": [ +"VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED", +"UNLOCK_NOT_REQUIRED", +"UNLOCK_REQUIRED_TO_VIEW" +], +"enumDescriptions": [ +"Default value, same as UNLOCK_NOT_REQUIRED.", +"Default behavior for all the existing Passes if ViewUnlockRequirement is not set.", +"Requires the user to unlock their device each time the pass is viewed. If the user removes their device lock after saving the pass, then they will be prompted to create a device lock before the pass can be viewed." +], +"type": "string" +}, +"wideTitleImage": { +"$ref": "Image", +"description": "The wide title image of the offer. When provided, this will be used in place of the title image in the top left of the card view." +}, +"wordMark": { +"$ref": "Image", +"deprecated": true, +"description": "Deprecated." +} +}, +"type": "object" +}, +"OfferClassAddMessageResponse": { +"id": "OfferClassAddMessageResponse", +"properties": { +"resource": { +"$ref": "OfferClass", +"description": "The updated OfferClass resource." +} +}, +"type": "object" +}, +"OfferClassListResponse": { +"id": "OfferClassListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "OfferClass" +}, +"type": "array" +} +}, +"type": "object" +}, +"OfferObject": { +"id": "OfferObject", +"properties": { +"appLinkData": { +"$ref": "AppLinkData", +"description": "Optional information about the partner app link." +}, +"barcode": { +"$ref": "Barcode", +"description": "The barcode type and value." +}, +"classId": { +"description": "Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you.", +"type": "string" +}, +"classReference": { +"$ref": "OfferClass", +"description": "A copy of the inherited fields of the parent class. These fields are retrieved during a GET." +}, +"disableExpirationNotification": { +"description": "Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the `messages` field, expiration notifications to the user will be suppressed. By default, this field is set to false. Currently, this can only be set for offers.", +"type": "boolean" +}, +"groupingInfo": { +"$ref": "GroupingInfo", +"description": "Information that controls how passes are grouped together." +}, +"hasLinkedDevice": { +"description": "Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.", +"type": "boolean" +}, +"hasUsers": { +"description": "Indicates if the object has users. This field is set by the platform.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed." +}, +"id": { +"description": "Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. The unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"description": "Deprecated. Use textModulesData instead." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#offerObject\"`.", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the class, both will be displayed." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"passConstraints": { +"$ref": "PassConstraints", +"description": "Pass constraints for the object. Includes limiting NFC and screenshot behaviors." +}, +"rotatingBarcode": { +"$ref": "RotatingBarcode", +"description": "The rotating barcode type and value." +}, +"smartTapRedemptionValue": { +"description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", +"type": "string" +}, +"state": { +"description": "Required. The state of the object. This field is used to determine how an object is displayed in the app. For example, an `inactive` object is moved to the \"Expired passes\" section.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"active", +"COMPLETED", +"completed", +"EXPIRED", +"expired", +"INACTIVE", +"inactive" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Object is active and displayed to with other active objects.", +"Legacy alias for `ACTIVE`. Deprecated.", +"", +"Legacy alias for `COMPLETED`. Deprecated.", +"Object is no longer valid (`validTimeInterval` passed).", +"Legacy alias for `EXPIRED`. Deprecated.", +"", +"Legacy alias for `INACTIVE`. Deprecated." +], +"type": "string" +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"validTimeInterval": { +"$ref": "TimeInterval", +"description": "The time period this object will be `active` and object can be used. An object's state will be changed to `expired` when this time period has passed." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"OfferObjectAddMessageResponse": { +"id": "OfferObjectAddMessageResponse", +"properties": { +"resource": { +"$ref": "OfferObject", +"description": "The updated OfferObject resource." +} +}, +"type": "object" +}, +"OfferObjectListResponse": { +"id": "OfferObjectListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "OfferObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"Pagination": { +"id": "Pagination", +"properties": { +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#pagination\"`.", +"type": "string" +}, +"nextPageToken": { +"description": "Page token to send to fetch the next page.", +"type": "string" +}, +"resultsPerPage": { +"description": "Number of results returned in this page.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PassConstraints": { +"description": "Container for any constraints that may be placed on passes.", +"id": "PassConstraints", +"properties": { +"nfcConstraint": { +"description": "The NFC constraints for the pass.", +"items": { +"enum": [ +"NFC_CONSTRAINT_UNSPECIFIED", +"BLOCK_PAYMENT", +"BLOCK_CLOSED_LOOP_TRANSIT" +], +"enumDescriptions": [ +"Default value, no specified constraint.", +"Payment cards will not be conveyed while the pass is open.", +"Closed loop transit cards will not be conveyed while the pass is open." +], +"type": "string" +}, +"type": "array" +}, +"screenshotEligibility": { +"description": "The screenshot eligibility for the pass.", +"enum": [ +"SCREENSHOT_ELIGIBILITY_UNSPECIFIED", +"ELIGIBLE", +"INELIGIBLE" +], +"enumDescriptions": [ +"Default value, same as ELIGIBLE.", +"Default behavior for all existing Passes if ScreenshotEligibility is not set. Allows screenshots to be taken on Android devices.", +"Disallows screenshots to be taken on Android devices. Note that older versions of Wallet may still allow screenshots to be taken." +], +"type": "string" +} +}, +"type": "object" +}, +"Permission": { +"id": "Permission", +"properties": { +"emailAddress": { +"description": "The email address of the user, group, or service account to which this permission refers to.", +"type": "string" +}, +"role": { +"description": "The role granted by this permission.", +"enum": [ +"ROLE_UNSPECIFIED", +"OWNER", +"owner", +"READER", +"reader", +"WRITER", +"writer" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `OWNER`. Deprecated.", +"", +"Legacy alias for `READER`. Deprecated.", +"", +"Legacy alias for `WRITER`. Deprecated." +], +"type": "string" +} +}, +"type": "object" +}, +"Permissions": { +"id": "Permissions", +"properties": { +"issuerId": { +"description": "ID of the issuer the list of permissions refer to.", +"format": "int64", +"type": "string" +}, +"permissions": { +"description": "The complete list of permissions for the issuer account.", +"items": { +"$ref": "Permission" +}, +"type": "array" +} +}, +"type": "object" +}, +"PurchaseDetails": { +"id": "PurchaseDetails", +"properties": { +"accountId": { +"description": "ID of the account used to purchase the ticket.", +"type": "string" +}, +"confirmationCode": { +"description": "The confirmation code for the purchase. This may be the same for multiple different tickets and is used to group tickets together.", +"type": "string" +}, +"purchaseDateTime": { +"description": "The purchase date/time of the ticket. This is an ISO 8601 extended format date/time, with or without an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. Without offset information, some rich features may not be available.", +"type": "string" +}, +"purchaseReceiptNumber": { +"description": "Receipt number/identifier for tracking the ticket purchase via the body that sold the ticket.", +"type": "string" +}, +"ticketCost": { +"$ref": "TicketCost", +"description": "The cost of the ticket." +} +}, +"type": "object" +}, +"ReservationInfo": { +"id": "ReservationInfo", +"properties": { +"confirmationCode": { +"description": "Confirmation code needed to check into this flight. This is the number that the passenger would enter into a kiosk at the airport to look up the flight and print a boarding pass.", +"type": "string" +}, +"eticketNumber": { +"description": "E-ticket number.", +"type": "string" +}, +"frequentFlyerInfo": { +"$ref": "FrequentFlyerInfo", +"description": "Frequent flyer membership information." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#reservationInfo\"`.", +"type": "string" +} +}, +"type": "object" +}, +"Resources": { +"id": "Resources", +"properties": { +"eventTicketClasses": { +"items": { +"$ref": "EventTicketClass" +}, +"type": "array" +}, +"eventTicketObjects": { +"items": { +"$ref": "EventTicketObject" +}, +"type": "array" +}, +"flightClasses": { +"items": { +"$ref": "FlightClass" +}, +"type": "array" +}, +"flightObjects": { +"items": { +"$ref": "FlightObject" +}, +"type": "array" +}, +"giftCardClasses": { +"items": { +"$ref": "GiftCardClass" +}, +"type": "array" +}, +"giftCardObjects": { +"items": { +"$ref": "GiftCardObject" +}, +"type": "array" +}, +"loyaltyClasses": { +"items": { +"$ref": "LoyaltyClass" +}, +"type": "array" +}, +"loyaltyObjects": { +"items": { +"$ref": "LoyaltyObject" +}, +"type": "array" +}, +"offerClasses": { +"items": { +"$ref": "OfferClass" +}, +"type": "array" +}, +"offerObjects": { +"items": { +"$ref": "OfferObject" +}, +"type": "array" +}, +"transitClasses": { +"items": { +"$ref": "TransitClass" +}, +"type": "array" +}, +"transitObjects": { +"items": { +"$ref": "TransitObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"Review": { +"id": "Review", +"properties": { +"comments": { +"type": "string" +} +}, +"type": "object" +}, +"RotatingBarcode": { +"id": "RotatingBarcode", +"properties": { +"alternateText": { +"description": "An optional text that will override the default text that shows under the barcode. This field is intended for a human readable equivalent of the barcode value, used when the barcode cannot be scanned.", +"type": "string" +}, +"initialRotatingBarcodeValues": { +"$ref": "RotatingBarcodeValues", +"description": "Input only. NOTE: This feature is only available for the transit vertical. Optional set of initial rotating barcode values. This allows a small subset of barcodes to be included with the object. Further rotating barcode values must be uploaded with the UploadRotatingBarcodeValues endpoint." +}, +"renderEncoding": { +"description": "The render encoding for the barcode. When specified, barcode is rendered in the given encoding. Otherwise best known encoding is chosen by Google.", +"enum": [ +"RENDER_ENCODING_UNSPECIFIED", +"UTF_8" +], +"enumDescriptions": [ +"", +"UTF_8 encoding for barcodes. This is only supported for barcode type qrCode." +], +"type": "string" +}, +"showCodeText": { +"$ref": "LocalizedString", +"description": "Optional text that will be shown when the barcode is hidden behind a click action. This happens in cases where a pass has Smart Tap enabled. If not specified, a default is chosen by Google." +}, +"totpDetails": { +"$ref": "RotatingBarcodeTotpDetails", +"description": "Details used to evaluate the {totp_value_n} substitutions." +}, +"type": { +"description": "The type of this barcode.", +"enum": [ +"BARCODE_TYPE_UNSPECIFIED", +"AZTEC", +"aztec", +"CODE_39", +"code39", +"CODE_128", +"code128", +"CODABAR", +"codabar", +"DATA_MATRIX", +"dataMatrix", +"EAN_8", +"ean8", +"EAN_13", +"ean13", +"EAN13", +"ITF_14", +"itf14", +"PDF_417", +"pdf417", +"PDF417", +"QR_CODE", +"qrCode", +"qrcode", +"UPC_A", +"upcA", +"TEXT_ONLY", +"textOnly" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true, +true, +false, +true, +false, +true, +true, +false, +true, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Not supported for Rotating Barcodes.", +"Legacy alias for `AZTEC`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `CODE_39`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `CODE_128`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `CODABAR`. Deprecated. Not supported for Rotating Barcodes.", +"A 2D matrix barcode consisting of black and white. Cells or modules are arranged in either a square or rectangle. Not supported for Rotating Barcodes.", +"Legacy alias for `DATA_MATRIX`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `EAN_8`. Deprecated. Not supported for Rotating Barcodes.", +"Not supported for Rotating Barcodes.", +"Legacy alias for `EAN_13`. Deprecated. Not supported for Rotating Barcodes.", +"Legacy alias for `EAN_13`. Deprecated. Not supported for Rotating Barcodes.", +"14 digit ITF code Not supported for Rotating Barcodes.", +"Legacy alias for `ITF_14`. Deprecated. Not supported for Rotating Barcodes.", +"Supported for Rotating Barcodes.", +"Legacy alias for `PDF_417`. Deprecated.", +"Legacy alias for `PDF_417`. Deprecated.", +"Supported for Rotating Barcodes.", +"Legacy alias for `QR_CODE`. Deprecated.", +"Legacy alias for `QR_CODE`. Deprecated.", +"11 or 12 digit codes Not supported for Rotating Barcodes.", +"Legacy alias for `UPC_A`. Deprecated. Not supported for Rotating Barcodes.", +"Renders the field as a text field. The `alternateText` field may not be used with a barcode of type `textOnly`. Not supported for Rotating Barcodes.", +"Legacy alias for `TEXT_ONLY`. Deprecated. Not supported for Rotating Barcodes." +], +"type": "string" +}, +"valuePattern": { +"description": "String encoded barcode value. This string supports the following substitutions: * {totp_value_n}: Replaced with the TOTP value (see TotpDetails.parameters). * {totp_timestamp_millis}: Replaced with the timestamp (millis since epoch) at which the barcode was generated. * {totp_timestamp_seconds}: Replaced with the timestamp (seconds since epoch) at which the barcode was generated.", +"type": "string" +} +}, +"type": "object" +}, +"RotatingBarcodeTotpDetails": { +"description": "Configuration for the time-based OTP substitutions. See https://tools.ietf.org/html/rfc6238", +"id": "RotatingBarcodeTotpDetails", +"properties": { +"algorithm": { +"description": "The TOTP algorithm used to generate the OTP.", +"enum": [ +"TOTP_ALGORITHM_UNSPECIFIED", +"TOTP_SHA1" +], +"enumDescriptions": [ +"", +"TOTP algorithm from RFC 6238 with the SHA1 hash function" +], +"type": "string" +}, +"parameters": { +"description": "The TOTP parameters for each of the {totp_value_*} substitutions. The TotpParameters at index n is used for the {totp_value_n} substitution.", +"items": { +"$ref": "RotatingBarcodeTotpDetailsTotpParameters" +}, +"type": "array" +}, +"periodMillis": { +"description": "The time interval used for the TOTP value generation, in milliseconds.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"RotatingBarcodeTotpDetailsTotpParameters": { +"description": "Configuration for the key and value length. See https://www.rfc-editor.org/rfc/rfc4226#section-5.3", +"id": "RotatingBarcodeTotpDetailsTotpParameters", +"properties": { +"key": { +"description": "The secret key used for the TOTP value generation, encoded as a Base16 string.", +"type": "string" +}, +"valueLength": { +"description": "The length of the TOTP value in decimal digits.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"RotatingBarcodeValues": { +"description": "A payload containing many barcode values and start date/time.", +"id": "RotatingBarcodeValues", +"properties": { +"periodMillis": { +"description": "Required. The amount of time each barcode is valid for.", +"format": "int64", +"type": "string" +}, +"startDateTime": { +"description": "Required. The date/time the first barcode is valid from. Barcodes will be rotated through using period_millis defined on the object's RotatingBarcodeValueInfo. This is an ISO 8601 extended format date/time, with an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year.", +"type": "string" +}, +"values": { +"description": "Required. The values to encode in the barcode. At least one value is required.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"SecurityAnimation": { +"id": "SecurityAnimation", +"properties": { +"animationType": { +"description": "Type of animation.", +"enum": [ +"ANIMATION_UNSPECIFIED", +"FOIL_SHIMMER", +"foilShimmer" +], +"enumDeprecated": [ +false, +false, +true +], +"enumDescriptions": [ +"", +"Default Foil & Shimmer animation", +"Legacy alias for `FOIL_SHIMMER`. Deprecated." +], +"type": "string" +} +}, +"type": "object" +}, +"SignUpInfo": { +"id": "SignUpInfo", +"properties": { +"classId": { +"description": "ID of the class the user can sign up for.", +"type": "string" +} +}, +"type": "object" +}, +"SmartTap": { +"id": "SmartTap", +"properties": { +"id": { +"description": "The unique identifier for a smart tap. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is the Smart Tap id. The Smart Tap id is a Base64 encoded string which represents the id which was generated by the Google Pay app.", +"type": "string" +}, +"infos": { +"description": "Communication from merchant to user.", +"items": { +"$ref": "IssuerToUserInfo" +}, +"type": "array" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#smartTap\"`.", +"type": "string" +}, +"merchantId": { +"description": "Smart Tap merchant ID of who engaged in the Smart Tap interaction.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"SmartTapMerchantData": { +"id": "SmartTapMerchantData", +"properties": { +"authenticationKeys": { +"description": "Available only to Smart Tap enabled partners. Contact support for additional guidance.", +"items": { +"$ref": "AuthenticationKey" +}, +"type": "array" +}, +"smartTapMerchantId": { +"description": "Available only to Smart Tap enabled partners. Contact support for additional guidance.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"TemplateItem": { +"id": "TemplateItem", +"properties": { +"firstValue": { +"$ref": "FieldSelector", +"description": "A reference to a field to display. If both `firstValue` and `secondValue` are populated, they will both appear as one item with a slash between them. For example, values A and B would be shown as \"A / B\"." +}, +"predefinedItem": { +"description": "A predefined item to display. Only one of `firstValue` or `predefinedItem` may be set.", +"enum": [ +"PREDEFINED_ITEM_UNSPECIFIED", +"FREQUENT_FLYER_PROGRAM_NAME_AND_NUMBER", +"frequentFlyerProgramNameAndNumber", +"FLIGHT_NUMBER_AND_OPERATING_FLIGHT_NUMBER", +"flightNumberAndOperatingFlightNumber" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `FREQUENT_FLYER_PROGRAM_NAME_AND_NUMBER`. Deprecated.", +"", +"Legacy alias for `FLIGHT_NUMBER_AND_OPERATING_FLIGHT_NUMBER`. Deprecated." +], +"type": "string" +}, +"secondValue": { +"$ref": "FieldSelector", +"description": "A reference to a field to display. This may only be populated if the `firstValue` field is populated." +} +}, +"type": "object" +}, +"TextModuleData": { +"description": "Data for Text module. All fields are optional. Header will be displayed if available, different types of bodies will be concatenated if they are defined.", +"id": "TextModuleData", +"properties": { +"body": { +"description": "The body of the Text Module, which is defined as an uninterrupted string. Recommended maximum length is 500 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"header": { +"description": "The header of the Text Module. Recommended maximum length is 35 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"id": { +"description": "The ID associated with a text module. This field is here to enable ease of management of text modules.", +"type": "string" +}, +"localizedBody": { +"$ref": "LocalizedString", +"description": "Translated strings for the body. Recommended maximum length is 500 characters to ensure full string is displayed on smaller screens." +}, +"localizedHeader": { +"$ref": "LocalizedString", +"description": "Translated strings for the header. Recommended maximum length is 35 characters to ensure full string is displayed on smaller screens." +} +}, +"type": "object" +}, +"TicketCost": { +"id": "TicketCost", +"properties": { +"discountMessage": { +"$ref": "LocalizedString", +"description": "A message describing any kind of discount that was applied." +}, +"faceValue": { +"$ref": "Money", +"description": "The face value of the ticket." +}, +"purchasePrice": { +"$ref": "Money", +"description": "The actual purchase price of the ticket, after tax and/or discounts." +} +}, +"type": "object" +}, +"TicketLeg": { +"id": "TicketLeg", +"properties": { +"arrivalDateTime": { +"description": "The date/time of arrival. This is an ISO 8601 extended format date/time, with or without an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. The portion of the date/time without the offset is considered the \"local date/time\". This should be the local date/time at the destination station. For example, if the event occurs at the 20th hour of June 5th, 2018 at the destination station, the local date/time portion should be `2018-06-05T20:00:00`. If the local date/time at the destination station is 4 hours before UTC, an offset of `-04:00` may be appended. Without offset information, some rich features may not be available.", +"type": "string" +}, +"carriage": { +"description": "The train or ship name/number that the passsenger needs to board.", +"type": "string" +}, +"departureDateTime": { +"description": "The date/time of departure. This is required if there is no validity time interval set on the transit object. This is an ISO 8601 extended format date/time, with or without an offset. Time may be specified up to nanosecond precision. Offsets may be specified with seconds precision (even though offset seconds is not part of ISO 8601). For example: `1985-04-12T23:20:50.52Z` would be 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC. `1985-04-12T19:20:50.52-04:00` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985, 4 hours before UTC (same instant in time as the above example). If the event were in New York, this would be the equivalent of Eastern Daylight Time (EDT). Remember that offset varies in regions that observe Daylight Saving Time (or Summer Time), depending on the time of the year. `1985-04-12T19:20:50.52` would be 20 minutes and 50.52 seconds after the 19th hour of April 12th, 1985 with no offset information. The portion of the date/time without the offset is considered the \"local date/time\". This should be the local date/time at the origin station. For example, if the departure occurs at the 20th hour of June 5th, 2018 at the origin station, the local date/time portion should be `2018-06-05T20:00:00`. If the local date/time at the origin station is 4 hours before UTC, an offset of `-04:00` may be appended. Without offset information, some rich features may not be available.", +"type": "string" +}, +"destinationName": { +"$ref": "LocalizedString", +"description": "The destination name." +}, +"destinationStationCode": { +"description": "The destination station code.", +"type": "string" +}, +"fareName": { +"$ref": "LocalizedString", +"description": "Short description/name of the fare for this leg of travel. Eg \"Anytime Single Use\"." +}, +"originName": { +"$ref": "LocalizedString", +"description": "The name of the origin station. This is required if `desinationName` is present or if `originStationCode` is not present." +}, +"originStationCode": { +"description": "The origin station code. This is required if `destinationStationCode` is present or if `originName` is not present.", +"type": "string" +}, +"platform": { +"description": "The platform or gate where the passenger can board the carriage.", +"type": "string" +}, +"ticketSeat": { +"$ref": "TicketSeat", +"description": "The reserved seat for the passenger(s). If more than one seat is to be specified then use the `ticketSeats` field instead. Both `ticketSeat` and `ticketSeats` may not be set." +}, +"ticketSeats": { +"description": "The reserved seat for the passenger(s). If only one seat is to be specified then use the `ticketSeat` field instead. Both `ticketSeat` and `ticketSeats` may not be set.", +"items": { +"$ref": "TicketSeat" +}, +"type": "array" +}, +"transitOperatorName": { +"$ref": "LocalizedString", +"description": "The name of the transit operator that is operating this leg of a trip." +}, +"transitTerminusName": { +"$ref": "LocalizedString", +"description": "Terminus station or destination of the train/bus/etc." +}, +"zone": { +"description": "The zone of boarding within the platform.", +"type": "string" +} +}, +"type": "object" +}, +"TicketRestrictions": { +"id": "TicketRestrictions", +"properties": { +"otherRestrictions": { +"$ref": "LocalizedString", +"description": "Extra restrictions that don't fall under the \"route\" or \"time\" categories." +}, +"routeRestrictions": { +"$ref": "LocalizedString", +"description": "Restrictions about routes that may be taken. For example, this may be the string \"Reserved CrossCountry trains only\"." +}, +"routeRestrictionsDetails": { +"$ref": "LocalizedString", +"description": "More details about the above `routeRestrictions`." +}, +"timeRestrictions": { +"$ref": "LocalizedString", +"description": "Restrictions about times this ticket may be used." +} +}, +"type": "object" +}, +"TicketSeat": { +"id": "TicketSeat", +"properties": { +"coach": { +"description": "The identifier of the train car or coach in which the ticketed seat is located. Eg. \"10\"", +"type": "string" +}, +"customFareClass": { +"$ref": "LocalizedString", +"description": "A custome fare class to be used if no `fareClass` applies. Both `fareClass` and `customFareClass` may not be set." +}, +"fareClass": { +"description": "The fare class of the ticketed seat.", +"enum": [ +"FARE_CLASS_UNSPECIFIED", +"ECONOMY", +"economy", +"FIRST", +"first", +"BUSINESS", +"business" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `ECONOMY`. Deprecated.", +"", +"Legacy alias for `FIRST`. Deprecated.", +"", +"Legacy alias for `BUSINESS`. Deprecated." +], +"type": "string" +}, +"seat": { +"description": "The identifier of where the ticketed seat is located. Eg. \"42\". If there is no specific identifier, use `seatAssigment` instead.", +"type": "string" +}, +"seatAssignment": { +"$ref": "LocalizedString", +"description": "The passenger's seat assignment. Eg. \"no specific seat\". To be used when there is no specific identifier to use in `seat`." +} +}, +"type": "object" +}, +"TimeInterval": { +"id": "TimeInterval", +"properties": { +"end": { +"$ref": "DateTime", +"description": "End time of the interval. Offset is not required. If an offset is provided and `start` time is set, `start` must also include an offset." +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#timeInterval\"`.", +"type": "string" +}, +"start": { +"$ref": "DateTime", +"description": "Start time of the interval. Offset is not required. If an offset is provided and `end` time is set, `end` must also include an offset." +} +}, +"type": "object" +}, +"TransitClass": { +"id": "TransitClass", +"properties": { +"activationOptions": { +"$ref": "ActivationOptions", +"description": "Activation options for an activatable ticket." +}, +"allowMultipleUsersPerObject": { +"deprecated": true, +"description": "Deprecated. Use `multipleDevicesAndHoldersAllowedStatus` instead.", +"type": "boolean" +}, +"callbackOptions": { +"$ref": "CallbackOptions", +"description": "Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback." +}, +"classTemplateInfo": { +"$ref": "ClassTemplateInfo", +"description": "Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display." +}, +"countryCode": { +"description": "Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.", +"type": "string" +}, +"customCarriageLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the carriage value (`transitObject.ticketLeg.carriage`)." +}, +"customCoachLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the coach value (`transitObject.ticketLeg.ticketSeat.coach`)." +}, +"customConcessionCategoryLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the transit concession category value (`transitObject.concessionCategory`)." +}, +"customConfirmationCodeLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the confirmation code value (`transitObject.purchaseDetails.confirmationCode`)." +}, +"customDiscountMessageLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the transit discount message value (`transitObject.purchaseDetails.ticketCost.discountMessage`)." +}, +"customFareClassLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the fare class value (`transitObject.ticketLeg.ticketSeat.fareClass`)." +}, +"customFareNameLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the transit fare name value (`transitObject.ticketLeg.fareName`)." +}, +"customOtherRestrictionsLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the other restrictions value (`transitObject.ticketRestrictions.otherRestrictions`)." +}, +"customPlatformLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the boarding platform value (`transitObject.ticketLeg.platform`)." +}, +"customPurchaseFaceValueLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the purchase face value (`transitObject.purchaseDetails.ticketCost.faceValue`)." +}, +"customPurchasePriceLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the purchase price value (`transitObject.purchaseDetails.ticketCost.purchasePrice`)." +}, +"customPurchaseReceiptNumberLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the purchase receipt number value (`transitObject.purchaseDetails.purchaseReceiptNumber`)." +}, +"customRouteRestrictionsDetailsLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the route restrictions details value (`transitObject.ticketRestrictions.routeRestrictionsDetails`)." +}, +"customRouteRestrictionsLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the route restrictions value (`transitObject.ticketRestrictions.routeRestrictions`)." +}, +"customSeatLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the seat location value (`transitObject.ticketLeg.ticketSeat.seat`)." +}, +"customTicketNumberLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the ticket number value (`transitObject.ticketNumber`)." +}, +"customTimeRestrictionsLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the time restrictions details value (`transitObject.ticketRestrictions.timeRestrictions`)." +}, +"customTransitTerminusNameLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the transit terminus name value (`transitObject.ticketLeg.transitTerminusName`)." +}, +"customZoneLabel": { +"$ref": "LocalizedString", +"description": "A custom label to use for the boarding zone value (`transitObject.ticketLeg.zone`)." +}, +"enableSingleLegItinerary": { +"description": "Controls the display of the single-leg itinerary for this class. By default, an itinerary will only display for multi-leg trips.", +"type": "boolean" +}, +"enableSmartTap": { +"description": "Identifies whether this class supports Smart Tap. The `redemptionIssuers` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"homepageUri": { +"$ref": "Uri", +"description": "The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object)." +}, +"id": { +"description": "Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID. identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"deprecated": true, +"description": "Deprecated. Use textModulesData instead." +}, +"issuerName": { +"description": "Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.", +"type": "string" +}, +"languageOverride": { +"description": "If this field is present, transit tickets served to a user's device will always be in this language. Represents the BCP 47 language tag. Example values are \"en-US\", \"en-GB\", \"de\", or \"de-AT\".", +"type": "string" +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the object, both will be displayed." +}, +"localizedIssuerName": { +"$ref": "LocalizedString", +"description": "Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"logo": { +"$ref": "Image", +"description": "Required. The logo image of the ticket. This image is displayed in the card detail view of the app." +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"multipleDevicesAndHoldersAllowedStatus": { +"description": "Identifies whether multiple users and devices will save the same object referencing this class.", +"enum": [ +"STATUS_UNSPECIFIED", +"MULTIPLE_HOLDERS", +"ONE_USER_ALL_DEVICES", +"ONE_USER_ONE_DEVICE", +"multipleHolders", +"oneUserAllDevices", +"oneUserOneDevice" +], +"enumDeprecated": [ +false, +false, +false, +false, +true, +true, +true +], +"enumDescriptions": [ +"Unspecified preference.", +"The Pass object is shareable by a user and can be saved by any number of different users, and on any number of devices. Partners typically use this setup for passes that do not need to be restricted to a single user or pinned to a single device.", +"An object can only be saved by one user, but this user can view and use it on multiple of their devices. Once the first user saves the object, no other user will be allowed to view or save it.", +"An object can only be saved by one user on a single device. Intended for use by select partners in limited circumstances. An example use case is a transit ticket that should be \"device pinned\", meaning it can be saved, viewed and used only by a single user on a single device. Contact support for additional information.", +"Legacy alias for `MULTIPLE_HOLDERS`. Deprecated.", +"Legacy alias for `ONE_USER_ALL_DEVICES`. Deprecated.", +"Legacy alias for `ONE_USER_ONE_DEVICE`. Deprecated." +], +"type": "string" +}, +"redemptionIssuers": { +"description": "Identifies which redemption issuers can redeem the pass over Smart Tap. Redemption issuers are identified by their issuer ID. Redemption issuers must have at least one Smart Tap key configured. The `enableSmartTap` and object level `smartTapRedemptionLevel` fields must also be set up correctly in order for a pass to support Smart Tap.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"review": { +"$ref": "Review", +"description": "The review comments set by the platform when a class is marked `approved` or `rejected`." +}, +"reviewStatus": { +"description": "Required. The status of the class. This field can be set to `draft` or `underReview` using the insert, patch, or update API calls. Once the review state is changed from `draft` it may not be changed back to `draft`. You should keep this field to `draft` when the class is under development. A `draft` class cannot be used to create any object. You should set this field to `underReview` when you believe the class is ready for use. The platform will automatically set this field to `approved` and it can be immediately used to create or migrate objects. When updating an already `approved` class you should keep setting this field to `underReview`.", +"enum": [ +"REVIEW_STATUS_UNSPECIFIED", +"UNDER_REVIEW", +"underReview", +"APPROVED", +"approved", +"REJECTED", +"rejected", +"DRAFT", +"draft" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `UNDER_REVIEW`. Deprecated.", +"", +"Legacy alias for `APPROVED`. Deprecated.", +"", +"Legacy alias for `REJECTED`. Deprecated.", +"", +"Legacy alias for `DRAFT`. Deprecated." +], +"type": "string" +}, +"securityAnimation": { +"$ref": "SecurityAnimation", +"description": "Optional information about the security animation. If this is set a security animation will be rendered on pass details." +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"transitOperatorName": { +"$ref": "LocalizedString", +"description": "The name of the transit operator." +}, +"transitType": { +"description": "Required. The type of transit this class represents, such as \"bus\".", +"enum": [ +"TRANSIT_TYPE_UNSPECIFIED", +"BUS", +"bus", +"RAIL", +"rail", +"TRAM", +"tram", +"FERRY", +"ferry", +"OTHER", +"other" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `BUS`. Deprecated.", +"", +"Legacy alias for `RAIL`. Deprecated.", +"", +"Legacy alias for `TRAM`. Deprecated.", +"", +"Legacy alias for `FERRY`. Deprecated.", +"", +"Legacy alias for `OTHER`. Deprecated." +], +"type": "string" +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +}, +"viewUnlockRequirement": { +"description": "View Unlock Requirement options for the transit ticket.", +"enum": [ +"VIEW_UNLOCK_REQUIREMENT_UNSPECIFIED", +"UNLOCK_NOT_REQUIRED", +"UNLOCK_REQUIRED_TO_VIEW" +], +"enumDescriptions": [ +"Default value, same as UNLOCK_NOT_REQUIRED.", +"Default behavior for all the existing Passes if ViewUnlockRequirement is not set.", +"Requires the user to unlock their device each time the pass is viewed. If the user removes their device lock after saving the pass, then they will be prompted to create a device lock before the pass can be viewed." +], +"type": "string" +}, +"watermark": { +"$ref": "Image", +"description": "Watermark image to display on the user's device." +}, +"wideLogo": { +"$ref": "Image", +"description": "The wide logo of the ticket. When provided, this will be used in place of the logo in the top left of the card view." +}, +"wordMark": { +"$ref": "Image", +"deprecated": true, +"description": "Deprecated." +} +}, +"type": "object" +}, +"TransitClassAddMessageResponse": { +"id": "TransitClassAddMessageResponse", +"properties": { +"resource": { +"$ref": "TransitClass", +"description": "The updated TransitClass resource." +} +}, +"type": "object" +}, +"TransitClassListResponse": { +"id": "TransitClassListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "TransitClass" +}, +"type": "array" +} +}, +"type": "object" +}, +"TransitObject": { +"id": "TransitObject", +"properties": { +"activationStatus": { +"$ref": "ActivationStatus", +"description": "The activation status for the object. Required if the class has `activationOptions` set." +}, +"appLinkData": { +"$ref": "AppLinkData", +"description": "Optional information about the partner app link." +}, +"barcode": { +"$ref": "Barcode", +"description": "The barcode type and value." +}, +"classId": { +"description": "Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved. Class IDs should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you.", +"type": "string" +}, +"classReference": { +"$ref": "TransitClass", +"description": "A copy of the inherited fields of the parent class. These fields are retrieved during a GET." +}, +"concessionCategory": { +"description": "The concession category for the ticket.", +"enum": [ +"CONCESSION_CATEGORY_UNSPECIFIED", +"ADULT", +"adult", +"CHILD", +"child", +"SENIOR", +"senior" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `ADULT`. Deprecated.", +"", +"Legacy alias for `CHILD`. Deprecated.", +"", +"Legacy alias for `SENIOR`. Deprecated." +], +"type": "string" +}, +"customConcessionCategory": { +"$ref": "LocalizedString", +"description": "A custom concession category to use when `concessionCategory` does not provide the right option. Both `concessionCategory` and `customConcessionCategory` may not be set." +}, +"customTicketStatus": { +"$ref": "LocalizedString", +"description": "A custom status to use for the ticket status value when `ticketStatus` does not provide the right option. Both `ticketStatus` and `customTicketStatus` may not be set." +}, +"deviceContext": { +"$ref": "DeviceContext", +"description": "Device context associated with the object." +}, +"disableExpirationNotification": { +"description": "Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the `messages` field, expiration notifications to the user will be suppressed. By default, this field is set to false. Currently, this can only be set for offers.", +"type": "boolean" +}, +"groupingInfo": { +"$ref": "GroupingInfo", +"description": "Information that controls how passes are grouped together." +}, +"hasLinkedDevice": { +"description": "Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.", +"type": "boolean" +}, +"hasUsers": { +"description": "Indicates if the object has users. This field is set by the platform.", +"type": "boolean" +}, +"heroImage": { +"$ref": "Image", +"description": "Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed." +}, +"hexBackgroundColor": { +"description": "The background color for the card. If not set the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used. The format is #rrggbb where rrggbb is a hex RGB triplet, such as `#ffcc00`. You can also use the shorthand version of the RGB triplet which is #rgb, such as `#fc0`.", +"type": "string" +}, +"id": { +"description": "Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. The unique identifier should only include alphanumeric characters, '.', '_', or '-'.", +"type": "string" +}, +"imageModulesData": { +"description": "Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.", +"items": { +"$ref": "ImageModuleData" +}, +"type": "array" +}, +"infoModuleData": { +"$ref": "InfoModuleData", +"description": "Deprecated. Use textModulesData instead." +}, +"linksModuleData": { +"$ref": "LinksModuleData", +"description": "Links module data. If links module data is also defined on the class, both will be displayed." +}, +"locations": { +"description": "Note: This field is currently not supported to trigger geo notifications.", +"items": { +"$ref": "LatLongPoint" +}, +"type": "array" +}, +"messages": { +"description": "An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10.", +"items": { +"$ref": "Message" +}, +"type": "array" +}, +"passConstraints": { +"$ref": "PassConstraints", +"description": "Pass constraints for the object. Includes limiting NFC and screenshot behaviors." +}, +"passengerNames": { +"description": "The name(s) of the passengers the ticket is assigned to. The above `passengerType` field is meant to give Google context on this field.", +"type": "string" +}, +"passengerType": { +"description": "The number of passengers.", +"enum": [ +"PASSENGER_TYPE_UNSPECIFIED", +"SINGLE_PASSENGER", +"singlePassenger", +"MULTIPLE_PASSENGERS", +"multiplePassengers" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `SINGLE_PASSENGER`. Deprecated.", +"", +"Legacy alias for `MULTIPLE_PASSENGERS`. Deprecated." +], +"type": "string" +}, +"purchaseDetails": { +"$ref": "PurchaseDetails", +"description": "Purchase details for this ticket." +}, +"rotatingBarcode": { +"$ref": "RotatingBarcode", +"description": "The rotating barcode type and value." +}, +"smartTapRedemptionValue": { +"description": "The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields `enableSmartTap` and `redemptionIssuers` must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.", +"type": "string" +}, +"state": { +"description": "Required. The state of the object. This field is used to determine how an object is displayed in the app. For example, an `inactive` object is moved to the \"Expired passes\" section.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"active", +"COMPLETED", +"completed", +"EXPIRED", +"expired", +"INACTIVE", +"inactive" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"Object is active and displayed to with other active objects.", +"Legacy alias for `ACTIVE`. Deprecated.", +"", +"Legacy alias for `COMPLETED`. Deprecated.", +"Object is no longer valid (`validTimeInterval` passed).", +"Legacy alias for `EXPIRED`. Deprecated.", +"", +"Legacy alias for `INACTIVE`. Deprecated." +], +"type": "string" +}, +"textModulesData": { +"description": "Text module data. If text module data is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from the object and 10 from the class.", +"items": { +"$ref": "TextModuleData" +}, +"type": "array" +}, +"ticketLeg": { +"$ref": "TicketLeg", +"description": "A single ticket leg contains departure and arrival information along with boarding and seating information. If more than one leg is to be specified then use the `ticketLegs` field instead. Both `ticketLeg` and `ticketLegs` may not be set." +}, +"ticketLegs": { +"description": "Each ticket may contain one or more legs. Each leg contains departure and arrival information along with boarding and seating information. If only one leg is to be specified then use the `ticketLeg` field instead. Both `ticketLeg` and `ticketLegs` may not be set.", +"items": { +"$ref": "TicketLeg" +}, +"type": "array" +}, +"ticketNumber": { +"description": "The number of the ticket. This is a unique identifier for the ticket in the transit operator's system.", +"type": "string" +}, +"ticketRestrictions": { +"$ref": "TicketRestrictions", +"description": "Information about what kind of restrictions there are on using this ticket. For example, which days of the week it must be used, or which routes are allowed to be taken." +}, +"ticketStatus": { +"description": "The status of the ticket. For states which affect display, use the `state` field instead.", +"enum": [ +"TICKET_STATUS_UNSPECIFIED", +"USED", +"used", +"REFUNDED", +"refunded", +"EXCHANGED", +"exchanged" +], +"enumDeprecated": [ +false, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `USED`. Deprecated.", +"", +"Legacy alias for `REFUNDED`. Deprecated.", +"", +"Legacy alias for `EXCHANGED`. Deprecated." +], +"type": "string" +}, +"tripId": { +"description": "This id is used to group tickets together if the user has saved multiple tickets for the same trip.", +"type": "string" +}, +"tripType": { +"description": "Required. The type of trip this transit object represents. Used to determine the pass title and/or which symbol to use between the origin and destination.", +"enum": [ +"TRIP_TYPE_UNSPECIFIED", +"ROUND_TRIP", +"roundTrip", +"ONE_WAY", +"oneWay" +], +"enumDeprecated": [ +false, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"", +"Legacy alias for `ROUND_TRIP`. Deprecated.", +"", +"Legacy alias for `ONE_WAY`. Deprecated." +], +"type": "string" +}, +"validTimeInterval": { +"$ref": "TimeInterval", +"description": "The time period this object will be `active` and object can be used. An object's state will be changed to `expired` when this time period has passed." +}, +"version": { +"deprecated": true, +"description": "Deprecated", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"TransitObjectAddMessageResponse": { +"id": "TransitObjectAddMessageResponse", +"properties": { +"resource": { +"$ref": "TransitObject", +"description": "The updated TransitObject resource." +} +}, +"type": "object" +}, +"TransitObjectListResponse": { +"id": "TransitObjectListResponse", +"properties": { +"pagination": { +"$ref": "Pagination", +"description": "Pagination of the response." +}, +"resources": { +"description": "Resources corresponding to the list request.", +"items": { +"$ref": "TransitObject" +}, +"type": "array" +} +}, +"type": "object" +}, +"TransitObjectUploadRotatingBarcodeValuesRequest": { +"description": "Request to upload rotating barcode values.", +"id": "TransitObjectUploadRotatingBarcodeValuesRequest", +"properties": { +"blob": { +"$ref": "Media", +"description": "A reference to the rotating barcode values payload that was uploaded." +}, +"mediaRequestInfo": { +"$ref": "MediaRequestInfo", +"description": "Extra information about the uploaded media." +} +}, +"type": "object" +}, +"TransitObjectUploadRotatingBarcodeValuesResponse": { +"description": "Response for uploading rotating barcode values.", +"id": "TransitObjectUploadRotatingBarcodeValuesResponse", +"properties": {}, +"type": "object" +}, +"TranslatedString": { +"id": "TranslatedString", +"properties": { +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#translatedString\"`.", +"type": "string" +}, +"language": { +"description": "Represents the BCP 47 language tag. Example values are \"en-US\", \"en-GB\", \"de\", or \"de-AT\".", +"type": "string" +}, +"value": { +"description": "The UTF-8 encoded translated string.", +"type": "string" +} +}, +"type": "object" +}, +"UpcomingNotification": { +"description": "Indicates that the issuer would like Google Wallet to send an upcoming card validity notification 1 day before card becomes valid/usable.", +"id": "UpcomingNotification", +"properties": { +"enableNotification": { +"description": "Indicates if the object needs to have upcoming notification enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"Uri": { +"id": "Uri", +"properties": { +"description": { +"description": "The URI's title appearing in the app as text. Recommended maximum is 20 characters to ensure full string is displayed on smaller screens. Note that in some contexts this text is not used, such as when `description` is part of an image.", +"type": "string" +}, +"id": { +"description": "The ID associated with a uri. This field is here to enable ease of management of uris.", +"type": "string" +}, +"kind": { +"deprecated": true, +"description": "Identifies what kind of resource this is. Value: the fixed string `\"walletobjects#uri\"`.", +"type": "string" +}, +"localizedDescription": { +"$ref": "LocalizedString", +"description": "Translated strings for the description. Recommended maximum is 20 characters to ensure full string is displayed on smaller screens." +}, +"uri": { +"description": "The location of a web page, image, or other resource. URIs in the `LinksModuleData` module can have different prefixes indicating the type of URI (a link to a web page, a link to a map, a telephone number, or an email address). URIs must have a scheme.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Wallet API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webfonts.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webfonts.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..59c85f2e9cac746593e4ecfdd2b5d745a83f1397 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webfonts.v1.json @@ -0,0 +1,269 @@ +{ +"basePath": "", +"baseUrl": "https://webfonts.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Webfonts", +"description": "The Google Web Fonts Developer API lets you retrieve information about web fonts served by Google.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/fonts/docs/developer_api", +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "webfonts:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://webfonts.mtls.googleapis.com/", +"name": "webfonts", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"webfonts": { +"methods": { +"list": { +"description": "Retrieves the list of fonts currently served by the Google Fonts Developer API.", +"flatPath": "v1/webfonts", +"httpMethod": "GET", +"id": "webfonts.webfonts.list", +"parameterOrder": [], +"parameters": { +"capability": { +"description": "Controls the font urls in `Webfont.files`, by default, static ttf fonts are sent.", +"enum": [ +"CAPABILITY_UNSPECIFIED", +"WOFF2", +"VF" +], +"enumDescriptions": [ +"Default means static ttf fonts.", +"Use WOFF2(Compressed)instead of ttf.", +"Prefer variable font files instead of static fonts instantiated at standard weights." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"family": { +"description": "Filters by Webfont.family, using literal match. If not set, returns all families", +"location": "query", +"repeated": true, +"type": "string" +}, +"sort": { +"description": "Enables sorting of the list.", +"enum": [ +"SORT_UNDEFINED", +"ALPHA", +"DATE", +"POPULARITY", +"STYLE", +"TRENDING" +], +"enumDescriptions": [ +"No sorting specified, use the default sorting method.", +"Sort alphabetically", +"Sort by date added", +"Sort by popularity", +"Sort by number of styles", +"Sort by trending" +], +"location": "query", +"type": "string" +}, +"subset": { +"description": "Filters by Webfont.subset, if subset is found in Webfont.subsets. If not set, returns all families.", +"location": "query", +"type": "string" +} +}, +"path": "v1/webfonts", +"response": { +"$ref": "WebfontList" +} +} +} +} +}, +"revision": "20240417", +"rootUrl": "https://webfonts.googleapis.com/", +"schemas": { +"Axis": { +"description": "Metadata for a variable font axis.", +"id": "Axis", +"properties": { +"end": { +"description": "maximum value", +"format": "float", +"type": "number" +}, +"start": { +"description": "minimum value", +"format": "float", +"type": "number" +}, +"tag": { +"description": "tag name.", +"type": "string" +} +}, +"type": "object" +}, +"Webfont": { +"description": "Metadata describing a family of fonts.", +"id": "Webfont", +"properties": { +"axes": { +"description": "Axis for variable fonts.", +"items": { +"$ref": "Axis" +}, +"type": "array" +}, +"category": { +"description": "The category of the font.", +"type": "string" +}, +"family": { +"description": "The name of the font.", +"type": "string" +}, +"files": { +"additionalProperties": { +"type": "string" +}, +"description": "The font files (with all supported scripts) for each one of the available variants, as a key : value map.", +"type": "object" +}, +"kind": { +"description": "This kind represents a webfont object in the webfonts service.", +"type": "string" +}, +"lastModified": { +"description": "The date (format \"yyyy-MM-dd\") the font was modified for the last time.", +"type": "string" +}, +"menu": { +"description": "Font URL for menu subset, a subset of the font that is enough to display the font name", +"type": "string" +}, +"subsets": { +"description": "The scripts supported by the font.", +"items": { +"type": "string" +}, +"type": "array" +}, +"variants": { +"description": "The available variants for the font.", +"items": { +"type": "string" +}, +"type": "array" +}, +"version": { +"description": "The font version.", +"type": "string" +} +}, +"type": "object" +}, +"WebfontList": { +"description": "Response containing the list of fonts currently served by the Google Fonts API.", +"id": "WebfontList", +"properties": { +"items": { +"description": "The list of fonts currently served by the Google Fonts API.", +"items": { +"$ref": "Webfont" +}, +"type": "array" +}, +"kind": { +"description": "This kind represents a list of webfont objects in the webfonts service.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Web Fonts Developer API", +"version": "v1" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webmasters.v3.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webmasters.v3.json new file mode 100644 index 0000000000000000000000000000000000000000..94cd3762bd8f4d7f77ba35d8c545b90eb120d561 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webmasters.v3.json @@ -0,0 +1,555 @@ +{ + "auth": { + "oauth2": { + "scopes": { + "https://www.googleapis.com/auth/webmasters": { + "description": "View and manage Search Console data for your verified sites" + }, + "https://www.googleapis.com/auth/webmasters.readonly": { + "description": "View Search Console data for your verified sites" + } + } + } + }, + "basePath": "/webmasters/v3/", + "baseUrl": "https://www.googleapis.com/webmasters/v3/", + "batchPath": "batch/webmasters/v3", + "description": "View Google Search Console data for your verified sites.", + "discoveryVersion": "v1", + "documentationLink": "https://developers.google.com/webmaster-tools/", + "etag": "\"u9GIe6H63LSGq-9_t39K2Zx_EAc/yeQbVpX8MWZgvu0Tp4j1CJkOSB4\"", + "icons": { + "x16": "https://www.google.com/images/icons/product/webmaster_tools-16.png", + "x32": "https://www.google.com/images/icons/product/webmaster_tools-32.png" + }, + "id": "webmasters:v3", + "kind": "discovery#restDescription", + "name": "webmasters", + "ownerDomain": "google.com", + "ownerName": "Google", + "parameters": { + "alt": { + "default": "json", + "description": "Data format for the response.", + "enum": [ + "json" + ], + "enumDescriptions": [ + "Responses with Content-Type of application/json" + ], + "location": "query", + "type": "string" + }, + "fields": { + "description": "Selector specifying which fields to include in a partial response.", + "location": "query", + "type": "string" + }, + "key": { + "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", + "location": "query", + "type": "string" + }, + "oauth_token": { + "description": "OAuth 2.0 token for the current user.", + "location": "query", + "type": "string" + }, + "prettyPrint": { + "default": "true", + "description": "Returns response with indentations and line breaks.", + "location": "query", + "type": "boolean" + }, + "quotaUser": { + "description": "An opaque string that represents a user for quota purposes. Must not exceed 40 characters.", + "location": "query", + "type": "string" + }, + "userIp": { + "description": "Deprecated. Please use quotaUser instead.", + "location": "query", + "type": "string" + } + }, + "protocol": "rest", + "resources": { + "searchanalytics": { + "methods": { + "query": { + "description": "Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days.\n\nWhen date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.", + "httpMethod": "POST", + "id": "webmasters.searchanalytics.query", + "parameterOrder": [ + "siteUrl" + ], + "parameters": { + "siteUrl": { + "description": "The site's URL, including protocol. For example: http://www.example.com/", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sites/{siteUrl}/searchAnalytics/query", + "request": { + "$ref": "SearchAnalyticsQueryRequest" + }, + "response": { + "$ref": "SearchAnalyticsQueryResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/webmasters", + "https://www.googleapis.com/auth/webmasters.readonly" + ] + } + } + }, + "sitemaps": { + "methods": { + "delete": { + "description": "Deletes a sitemap from this site.", + "httpMethod": "DELETE", + "id": "webmasters.sitemaps.delete", + "parameterOrder": [ + "siteUrl", + "feedpath" + ], + "parameters": { + "feedpath": { + "description": "The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml", + "location": "path", + "required": true, + "type": "string" + }, + "siteUrl": { + "description": "The site's URL, including protocol. For example: http://www.example.com/", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sites/{siteUrl}/sitemaps/{feedpath}", + "scopes": [ + "https://www.googleapis.com/auth/webmasters" + ] + }, + "get": { + "description": "Retrieves information about a specific sitemap.", + "httpMethod": "GET", + "id": "webmasters.sitemaps.get", + "parameterOrder": [ + "siteUrl", + "feedpath" + ], + "parameters": { + "feedpath": { + "description": "The URL of the actual sitemap. For example: http://www.example.com/sitemap.xml", + "location": "path", + "required": true, + "type": "string" + }, + "siteUrl": { + "description": "The site's URL, including protocol. For example: http://www.example.com/", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sites/{siteUrl}/sitemaps/{feedpath}", + "response": { + "$ref": "WmxSitemap" + }, + "scopes": [ + "https://www.googleapis.com/auth/webmasters", + "https://www.googleapis.com/auth/webmasters.readonly" + ] + }, + "list": { + "description": "Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).", + "httpMethod": "GET", + "id": "webmasters.sitemaps.list", + "parameterOrder": [ + "siteUrl" + ], + "parameters": { + "siteUrl": { + "description": "The site's URL, including protocol. For example: http://www.example.com/", + "location": "path", + "required": true, + "type": "string" + }, + "sitemapIndex": { + "description": "A URL of a site's sitemap index. For example: http://www.example.com/sitemapindex.xml", + "location": "query", + "type": "string" + } + }, + "path": "sites/{siteUrl}/sitemaps", + "response": { + "$ref": "SitemapsListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/webmasters", + "https://www.googleapis.com/auth/webmasters.readonly" + ] + }, + "submit": { + "description": "Submits a sitemap for a site.", + "httpMethod": "PUT", + "id": "webmasters.sitemaps.submit", + "parameterOrder": [ + "siteUrl", + "feedpath" + ], + "parameters": { + "feedpath": { + "description": "The URL of the sitemap to add. For example: http://www.example.com/sitemap.xml", + "location": "path", + "required": true, + "type": "string" + }, + "siteUrl": { + "description": "The site's URL, including protocol. For example: http://www.example.com/", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sites/{siteUrl}/sitemaps/{feedpath}", + "scopes": [ + "https://www.googleapis.com/auth/webmasters" + ] + } + } + }, + "sites": { + "methods": { + "add": { + "description": "Adds a site to the set of the user's sites in Search Console.", + "httpMethod": "PUT", + "id": "webmasters.sites.add", + "parameterOrder": [ + "siteUrl" + ], + "parameters": { + "siteUrl": { + "description": "The URL of the site to add.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sites/{siteUrl}", + "scopes": [ + "https://www.googleapis.com/auth/webmasters" + ] + }, + "delete": { + "description": "Removes a site from the set of the user's Search Console sites.", + "httpMethod": "DELETE", + "id": "webmasters.sites.delete", + "parameterOrder": [ + "siteUrl" + ], + "parameters": { + "siteUrl": { + "description": "The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android-app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is used in Search Console URLs.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sites/{siteUrl}", + "scopes": [ + "https://www.googleapis.com/auth/webmasters" + ] + }, + "get": { + "description": "Retrieves information about specific site.", + "httpMethod": "GET", + "id": "webmasters.sites.get", + "parameterOrder": [ + "siteUrl" + ], + "parameters": { + "siteUrl": { + "description": "The URI of the property as defined in Search Console. Examples: http://www.example.com/ or android-app://com.example/ Note: for property-sets, use the URI that starts with sc-set: which is used in Search Console URLs.", + "location": "path", + "required": true, + "type": "string" + } + }, + "path": "sites/{siteUrl}", + "response": { + "$ref": "WmxSite" + }, + "scopes": [ + "https://www.googleapis.com/auth/webmasters", + "https://www.googleapis.com/auth/webmasters.readonly" + ] + }, + "list": { + "description": "Lists the user's Search Console sites.", + "httpMethod": "GET", + "id": "webmasters.sites.list", + "path": "sites", + "response": { + "$ref": "SitesListResponse" + }, + "scopes": [ + "https://www.googleapis.com/auth/webmasters", + "https://www.googleapis.com/auth/webmasters.readonly" + ] + } + } + } + }, + "revision": "20190428", + "rootUrl": "https://www.googleapis.com/", + "schemas": { + "ApiDataRow": { + "id": "ApiDataRow", + "properties": { + "clicks": { + "format": "double", + "type": "number" + }, + "ctr": { + "format": "double", + "type": "number" + }, + "impressions": { + "format": "double", + "type": "number" + }, + "keys": { + "items": { + "type": "string" + }, + "type": "array" + }, + "position": { + "format": "double", + "type": "number" + } + }, + "type": "object" + }, + "ApiDimensionFilter": { + "id": "ApiDimensionFilter", + "properties": { + "dimension": { + "type": "string" + }, + "expression": { + "type": "string" + }, + "operator": { + "type": "string" + } + }, + "type": "object" + }, + "ApiDimensionFilterGroup": { + "id": "ApiDimensionFilterGroup", + "properties": { + "filters": { + "items": { + "$ref": "ApiDimensionFilter" + }, + "type": "array" + }, + "groupType": { + "type": "string" + } + }, + "type": "object" + }, + "SearchAnalyticsQueryRequest": { + "id": "SearchAnalyticsQueryRequest", + "properties": { + "aggregationType": { + "description": "[Optional; Default is \"auto\"] How data is aggregated. If aggregated by property, all data for the same property is aggregated; if aggregated by page, all data is aggregated by canonical URI. If you filter or group by page, choose AUTO; otherwise you can aggregate either by property or by page, depending on how you want your data calculated; see the help documentation to learn how data is calculated differently by site versus by page.\n\nNote: If you group or filter by page, you cannot aggregate by property.\n\nIf you specify any value other than AUTO, the aggregation type in the result will match the requested type, or if you request an invalid type, you will get an error. The API will never change your aggregation type if the requested type is invalid.", + "type": "string" + }, + "dataState": { + "description": "[Optional] If \"all\" (case-insensitive), data will include fresh data. If \"final\" (case-insensitive) or if this parameter is omitted, the returned data will include only finalized data.", + "type": "string" + }, + "dimensionFilterGroups": { + "description": "[Optional] Zero or more filters to apply to the dimension grouping values; for example, 'query contains \"buy\"' to see only data where the query string contains the substring \"buy\" (not case-sensitive). You can filter by a dimension without grouping by it.", + "items": { + "$ref": "ApiDimensionFilterGroup" + }, + "type": "array" + }, + "dimensions": { + "description": "[Optional] Zero or more dimensions to group results by. Dimensions are the group-by values in the Search Analytics page. Dimensions are combined to create a unique row key for each row. Results are grouped in the order that you supply these dimensions.", + "items": { + "type": "string" + }, + "type": "array" + }, + "endDate": { + "description": "[Required] End date of the requested date range, in YYYY-MM-DD format, in PST (UTC - 8:00). Must be greater than or equal to the start date. This value is included in the range.", + "type": "string" + }, + "rowLimit": { + "description": "[Optional; Default is 1000] The maximum number of rows to return. Must be a number from 1 to 5,000 (inclusive).", + "format": "int32", + "type": "integer" + }, + "searchType": { + "description": "[Optional; Default is \"web\"] The search type to filter for.", + "type": "string" + }, + "startDate": { + "description": "[Required] Start date of the requested date range, in YYYY-MM-DD format, in PST time (UTC - 8:00). Must be less than or equal to the end date. This value is included in the range.", + "type": "string" + }, + "startRow": { + "description": "[Optional; Default is 0] Zero-based index of the first row in the response. Must be a non-negative number.", + "format": "int32", + "type": "integer" + } + }, + "type": "object" + }, + "SearchAnalyticsQueryResponse": { + "description": "A list of rows, one per result, grouped by key. Metrics in each row are aggregated for all data grouped by that key either by page or property, as specified by the aggregation type parameter.", + "id": "SearchAnalyticsQueryResponse", + "properties": { + "responseAggregationType": { + "description": "How the results were aggregated.", + "type": "string" + }, + "rows": { + "description": "A list of rows grouped by the key values in the order given in the query.", + "items": { + "$ref": "ApiDataRow" + }, + "type": "array" + } + }, + "type": "object" + }, + "SitemapsListResponse": { + "description": "List of sitemaps.", + "id": "SitemapsListResponse", + "properties": { + "sitemap": { + "description": "Contains detailed information about a specific URL submitted as a sitemap.", + "items": { + "$ref": "WmxSitemap" + }, + "type": "array" + } + }, + "type": "object" + }, + "SitesListResponse": { + "description": "List of sites with access level information.", + "id": "SitesListResponse", + "properties": { + "siteEntry": { + "description": "Contains permission level information about a Search Console site. For more information, see Permissions in Search Console.", + "items": { + "$ref": "WmxSite" + }, + "type": "array" + } + }, + "type": "object" + }, + "WmxSite": { + "description": "Contains permission level information about a Search Console site. For more information, see Permissions in Search Console.", + "id": "WmxSite", + "properties": { + "permissionLevel": { + "description": "The user's permission level for the site.", + "type": "string" + }, + "siteUrl": { + "description": "The URL of the site.", + "type": "string" + } + }, + "type": "object" + }, + "WmxSitemap": { + "description": "Contains detailed information about a specific URL submitted as a sitemap.", + "id": "WmxSitemap", + "properties": { + "contents": { + "description": "The various content types in the sitemap.", + "items": { + "$ref": "WmxSitemapContent" + }, + "type": "array" + }, + "errors": { + "description": "Number of errors in the sitemap. These are issues with the sitemap itself that need to be fixed before it can be processed correctly.", + "format": "int64", + "type": "string" + }, + "isPending": { + "description": "If true, the sitemap has not been processed.", + "type": "boolean" + }, + "isSitemapsIndex": { + "description": "If true, the sitemap is a collection of sitemaps.", + "type": "boolean" + }, + "lastDownloaded": { + "description": "Date & time in which this sitemap was last downloaded. Date format is in RFC 3339 format (yyyy-mm-dd).", + "format": "date-time", + "type": "string" + }, + "lastSubmitted": { + "description": "Date & time in which this sitemap was submitted. Date format is in RFC 3339 format (yyyy-mm-dd).", + "format": "date-time", + "type": "string" + }, + "path": { + "description": "The url of the sitemap.", + "type": "string" + }, + "type": { + "description": "The type of the sitemap. For example: rssFeed.", + "type": "string" + }, + "warnings": { + "description": "Number of warnings for the sitemap. These are generally non-critical issues with URLs in the sitemaps.", + "format": "int64", + "type": "string" + } + }, + "type": "object" + }, + "WmxSitemapContent": { + "description": "Information about the various content types in the sitemap.", + "id": "WmxSitemapContent", + "properties": { + "indexed": { + "description": "The number of URLs from the sitemap that were indexed (of the content type).", + "format": "int64", + "type": "string" + }, + "submitted": { + "description": "The number of URLs in the sitemap (of the content type).", + "format": "int64", + "type": "string" + }, + "type": { + "description": "The specific type of content in this sitemap. For example: web.", + "type": "string" + } + }, + "type": "object" + } + }, + "servicePath": "webmasters/v3/", + "title": "Search Console API", + "version": "v3" +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webrisk.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webrisk.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..93a0d55362a4dc2475fcdd874588690177ac19eb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/webrisk.v1.json @@ -0,0 +1,779 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://webrisk.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Web Risk", +"description": "", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/web-risk/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "webrisk:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://webrisk.mtls.googleapis.com/", +"name": "webrisk", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"hashes": { +"methods": { +"search": { +"description": "Gets the full hashes that match the requested hash prefix. This is used after a hash prefix is looked up in a threatList and there is a match. The client side threatList only holds partial hashes so the client must query this method to determine if there is a full hash match of a threat.", +"flatPath": "v1/hashes:search", +"httpMethod": "GET", +"id": "webrisk.hashes.search", +"parameterOrder": [], +"parameters": { +"hashPrefix": { +"description": "A hash prefix, consisting of the most significant 4-32 bytes of a SHA256 hash. For JSON requests, this field is base64-encoded. Note that if this parameter is provided by a URI, it must be encoded using the web safe base64 variant (RFC 4648).", +"format": "byte", +"location": "query", +"type": "string" +}, +"threatTypes": { +"description": "Required. The ThreatLists to search in. Multiple ThreatLists may be specified.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"SOCIAL_ENGINEERING_EXTENDED_COVERAGE" +], +"enumDescriptions": [ +"No entries should match this threat type. This threat type is unused.", +"Malware targeting any platform.", +"Social engineering targeting any platform.", +"Unwanted software targeting any platform.", +"A list of extended coverage social engineering URIs targeting any platform." +], +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "v1/hashes:search", +"response": { +"$ref": "GoogleCloudWebriskV1SearchHashesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"projects": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "webrisk.projects.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "GoogleLongrunningCancelOperationRequest" +}, +"response": { +"$ref": "GoogleProtobufEmpty" +} +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "webrisk.projects.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +} +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "webrisk.projects.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleLongrunningOperation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/operations", +"httpMethod": "GET", +"id": "webrisk.projects.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "GoogleLongrunningListOperationsResponse" +} +} +} +}, +"submissions": { +"methods": { +"create": { +"description": "Creates a Submission of a URI suspected of containing phishing content to be reviewed. If the result verifies the existence of malicious phishing content, the site will be added to the [Google's Social Engineering lists](https://support.google.com/webmasters/answer/6350487/) in order to protect users that could get exposed to this threat in the future. Only allowlisted projects can use this method during Early Access. Please reach out to Sales or your customer engineer to obtain access.", +"flatPath": "v1/projects/{projectsId}/submissions", +"httpMethod": "POST", +"id": "webrisk.projects.submissions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The name of the project that is making the submission. This string is in the format \"projects/{project_number}\".", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/submissions", +"request": { +"$ref": "GoogleCloudWebriskV1Submission" +}, +"response": { +"$ref": "GoogleCloudWebriskV1Submission" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +}, +"threatLists": { +"methods": { +"computeDiff": { +"description": "Gets the most recent threat list diffs. These diffs should be applied to a local database of hashes to keep it up-to-date. If the local database is empty or excessively out-of-date, a complete snapshot of the database will be returned. This Method only updates a single ThreatList at a time. To update multiple ThreatList databases, this method needs to be called once for each list.", +"flatPath": "v1/threatLists:computeDiff", +"httpMethod": "GET", +"id": "webrisk.threatLists.computeDiff", +"parameterOrder": [], +"parameters": { +"constraints.maxDatabaseEntries": { +"description": "Sets the maximum number of entries that the client is willing to have in the local database. This should be a power of 2 between 2**10 and 2**20. If zero, no database size limit is set.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"constraints.maxDiffEntries": { +"description": "The maximum size in number of entries. The diff will not contain more entries than this value. This should be a power of 2 between 2**10 and 2**20. If zero, no diff size limit is set.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"constraints.supportedCompressions": { +"description": "The compression types supported by the client.", +"enum": [ +"COMPRESSION_TYPE_UNSPECIFIED", +"RAW", +"RICE" +], +"enumDescriptions": [ +"Unknown.", +"Raw, uncompressed data.", +"Rice-Golomb encoded data." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"threatType": { +"description": "Required. The threat list to update. Only a single ThreatType should be specified per request. If you want to handle multiple ThreatTypes, you must make one request per ThreatType.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"SOCIAL_ENGINEERING_EXTENDED_COVERAGE" +], +"enumDescriptions": [ +"No entries should match this threat type. This threat type is unused.", +"Malware targeting any platform.", +"Social engineering targeting any platform.", +"Unwanted software targeting any platform.", +"A list of extended coverage social engineering URIs targeting any platform." +], +"location": "query", +"type": "string" +}, +"versionToken": { +"description": "The current version token of the client for the requested list (the client version that was received from the last successful diff). If the client does not have a version token (this is the first time calling ComputeThreatListDiff), this may be left empty and a full database snapshot will be returned.", +"format": "byte", +"location": "query", +"type": "string" +} +}, +"path": "v1/threatLists:computeDiff", +"response": { +"$ref": "GoogleCloudWebriskV1ComputeThreatListDiffResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"uris": { +"methods": { +"search": { +"description": "This method is used to check whether a URI is on a given threatList. Multiple threatLists may be searched in a single query. The response will list all requested threatLists the URI was found to match. If the URI is not found on any of the requested ThreatList an empty response will be returned.", +"flatPath": "v1/uris:search", +"httpMethod": "GET", +"id": "webrisk.uris.search", +"parameterOrder": [], +"parameters": { +"threatTypes": { +"description": "Required. The ThreatLists to search in. Multiple ThreatLists may be specified.", +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"SOCIAL_ENGINEERING_EXTENDED_COVERAGE" +], +"enumDescriptions": [ +"No entries should match this threat type. This threat type is unused.", +"Malware targeting any platform.", +"Social engineering targeting any platform.", +"Unwanted software targeting any platform.", +"A list of extended coverage social engineering URIs targeting any platform." +], +"location": "query", +"repeated": true, +"type": "string" +}, +"uri": { +"description": "Required. The URI to be checked for matches.", +"location": "query", +"type": "string" +} +}, +"path": "v1/uris:search", +"response": { +"$ref": "GoogleCloudWebriskV1SearchUrisResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://webrisk.googleapis.com/", +"schemas": { +"GoogleCloudWebriskV1ComputeThreatListDiffResponse": { +"id": "GoogleCloudWebriskV1ComputeThreatListDiffResponse", +"properties": { +"additions": { +"$ref": "GoogleCloudWebriskV1ThreatEntryAdditions", +"description": "A set of entries to add to a local threat type's list." +}, +"checksum": { +"$ref": "GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum", +"description": "The expected SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database after applying the provided diff. If the client state doesn't match the expected state, the client must discard this diff and retry later." +}, +"newVersionToken": { +"description": "The new opaque client version token. This should be retained by the client and passed into the next call of ComputeThreatListDiff as 'version_token'. A separate version token should be stored and used for each threatList.", +"format": "byte", +"type": "string" +}, +"recommendedNextDiff": { +"description": "The soonest the client should wait before issuing any diff request. Querying sooner is unlikely to produce a meaningful diff. Waiting longer is acceptable considering the use case. If this field is not set clients may update as soon as they want.", +"format": "google-datetime", +"type": "string" +}, +"removals": { +"$ref": "GoogleCloudWebriskV1ThreatEntryRemovals", +"description": "A set of entries to remove from a local threat type's list. This field may be empty." +}, +"responseType": { +"description": "The type of response. This may indicate that an action must be taken by the client when the response is received.", +"enum": [ +"RESPONSE_TYPE_UNSPECIFIED", +"DIFF", +"RESET" +], +"enumDescriptions": [ +"Unknown.", +"Partial updates are applied to the client's existing local database.", +"Full updates resets the client's entire local database. This means that either the client had no state, was seriously out-of-date, or the client is believed to be corrupt." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum": { +"description": "The expected state of a client's local database.", +"id": "GoogleCloudWebriskV1ComputeThreatListDiffResponseChecksum", +"properties": { +"sha256": { +"description": "The SHA256 hash of the client state; that is, of the sorted list of all hashes present in the database.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1RawHashes": { +"description": "The uncompressed threat entries in hash format. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URI. Used for sending ThreatEntryAdditons to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.", +"id": "GoogleCloudWebriskV1RawHashes", +"properties": { +"prefixSize": { +"description": "The number of bytes for each prefix encoded below. This field can be anywhere from 4 (shortest prefix) to 32 (full SHA256 hash). In practice this is almost always 4, except in exceptional circumstances.", +"format": "int32", +"type": "integer" +}, +"rawHashes": { +"description": "The hashes, in binary format, concatenated into one long string. Hashes are sorted in lexicographic order. For JSON API users, hashes are base64-encoded.", +"format": "byte", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1RawIndices": { +"description": "A set of raw indices to remove from a local list.", +"id": "GoogleCloudWebriskV1RawIndices", +"properties": { +"indices": { +"description": "The indices to remove from a lexicographically-sorted local list.", +"items": { +"format": "int32", +"type": "integer" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1RiceDeltaEncoding": { +"description": "The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.", +"id": "GoogleCloudWebriskV1RiceDeltaEncoding", +"properties": { +"encodedData": { +"description": "The encoded deltas that are encoded using the Golomb-Rice coder.", +"format": "byte", +"type": "string" +}, +"entryCount": { +"description": "The number of entries that are delta encoded in the encoded data. If only a single integer was encoded, this will be zero and the single value will be stored in `first_value`.", +"format": "int32", +"type": "integer" +}, +"firstValue": { +"description": "The offset of the first entry in the encoded data, or, if only a single integer was encoded, that single integer's value. If the field is empty or missing, assume zero.", +"format": "int64", +"type": "string" +}, +"riceParameter": { +"description": "The Golomb-Rice parameter, which is a number between 2 and 28. This field is missing (that is, zero) if `num_entries` is zero.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1SearchHashesResponse": { +"id": "GoogleCloudWebriskV1SearchHashesResponse", +"properties": { +"negativeExpireTime": { +"description": "For requested entities that did not match the threat list, how long to cache the response until.", +"format": "google-datetime", +"type": "string" +}, +"threats": { +"description": "The full hashes that matched the requested prefixes. The hash will be populated in the key.", +"items": { +"$ref": "GoogleCloudWebriskV1SearchHashesResponseThreatHash" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1SearchHashesResponseThreatHash": { +"description": "Contains threat information on a matching hash.", +"id": "GoogleCloudWebriskV1SearchHashesResponseThreatHash", +"properties": { +"expireTime": { +"description": "The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.", +"format": "google-datetime", +"type": "string" +}, +"hash": { +"description": "A 32 byte SHA256 hash. This field is in binary format. For JSON requests, hashes are base64-encoded.", +"format": "byte", +"type": "string" +}, +"threatTypes": { +"description": "The ThreatList this threat belongs to. This must contain at least one entry.", +"items": { +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"SOCIAL_ENGINEERING_EXTENDED_COVERAGE" +], +"enumDescriptions": [ +"No entries should match this threat type. This threat type is unused.", +"Malware targeting any platform.", +"Social engineering targeting any platform.", +"Unwanted software targeting any platform.", +"A list of extended coverage social engineering URIs targeting any platform." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1SearchUrisResponse": { +"id": "GoogleCloudWebriskV1SearchUrisResponse", +"properties": { +"threat": { +"$ref": "GoogleCloudWebriskV1SearchUrisResponseThreatUri", +"description": "The threat list matches. This might be empty if the URI is on no list." +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1SearchUrisResponseThreatUri": { +"description": "Contains threat information on a matching uri.", +"id": "GoogleCloudWebriskV1SearchUrisResponseThreatUri", +"properties": { +"expireTime": { +"description": "The cache lifetime for the returned match. Clients must not cache this response past this timestamp to avoid false positives.", +"format": "google-datetime", +"type": "string" +}, +"threatTypes": { +"description": "The ThreatList this threat belongs to.", +"items": { +"enum": [ +"THREAT_TYPE_UNSPECIFIED", +"MALWARE", +"SOCIAL_ENGINEERING", +"UNWANTED_SOFTWARE", +"SOCIAL_ENGINEERING_EXTENDED_COVERAGE" +], +"enumDescriptions": [ +"No entries should match this threat type. This threat type is unused.", +"Malware targeting any platform.", +"Social engineering targeting any platform.", +"Unwanted software targeting any platform.", +"A list of extended coverage social engineering URIs targeting any platform." +], +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1Submission": { +"description": "Wraps a URI that might be displaying malicious content.", +"id": "GoogleCloudWebriskV1Submission", +"properties": { +"uri": { +"description": "Required. The URI that is being reported for malicious content to be analyzed.", +"type": "string" +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1ThreatEntryAdditions": { +"description": "Contains the set of entries to add to a local database. May contain a combination of compressed and raw data in a single response.", +"id": "GoogleCloudWebriskV1ThreatEntryAdditions", +"properties": { +"rawHashes": { +"description": "The raw SHA256-formatted entries. Repeated to allow returning sets of hashes with different prefix sizes.", +"items": { +"$ref": "GoogleCloudWebriskV1RawHashes" +}, +"type": "array" +}, +"riceHashes": { +"$ref": "GoogleCloudWebriskV1RiceDeltaEncoding", +"description": "The encoded 4-byte prefixes of SHA256-formatted entries, using a Golomb-Rice encoding. The hashes are converted to uint32, sorted in ascending order, then delta encoded and stored as encoded_data." +} +}, +"type": "object" +}, +"GoogleCloudWebriskV1ThreatEntryRemovals": { +"description": "Contains the set of entries to remove from a local database.", +"id": "GoogleCloudWebriskV1ThreatEntryRemovals", +"properties": { +"rawIndices": { +"$ref": "GoogleCloudWebriskV1RawIndices", +"description": "The raw removal indices for a local list." +}, +"riceIndices": { +"$ref": "GoogleCloudWebriskV1RiceDeltaEncoding", +"description": "The encoded local, lexicographically-sorted list indices, using a Golomb-Rice encoding. Used for sending compressed removal indices. The removal indices (uint32) are sorted in ascending order, then delta encoded and stored as encoded_data." +} +}, +"type": "object" +}, +"GoogleLongrunningCancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "GoogleLongrunningCancelOperationRequest", +"properties": {}, +"type": "object" +}, +"GoogleLongrunningListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "GoogleLongrunningListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "GoogleLongrunningOperation" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleLongrunningOperation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "GoogleLongrunningOperation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "GoogleRpcStatus", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Contains a `SubmitUriMetadata` object.", +"type": "object" +}, +"name": { +"description": "Matches the `/v1/{project-name}/operations/{operation-id}` pattern.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"GoogleRpcStatus": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "GoogleRpcStatus", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Web Risk API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..a551de688134490d9d30f5e084d2f592d81dac66 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1.json @@ -0,0 +1,1408 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://websecurityscanner.googleapis.com/", +"batchPath": "batch", +"canonicalName": "WebSecurityScanner", +"description": "Scans your Compute and App Engine apps for common web vulnerabilities.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "websecurityscanner:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://websecurityscanner.mtls.googleapis.com/", +"name": "websecurityscanner", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"scanConfigs": { +"methods": { +"create": { +"description": "Creates a new ScanConfig.", +"flatPath": "v1/projects/{projectsId}/scanConfigs", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the scan is created, which should be a project resource name in the format 'projects/{projectId}'.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/scanConfigs", +"request": { +"$ref": "ScanConfig" +}, +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing ScanConfig and its child resources.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "DELETE", +"id": "websecurityscanner.projects.scanConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be deleted. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a ScanConfig.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ScanConfigs under a given project.", +"flatPath": "v1/projects/{projectsId}/scanConfigs", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ScanConfigs to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a project resource name in the format 'projects/{projectId}'.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/scanConfigs", +"response": { +"$ref": "ListScanConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a ScanConfig. This method support partial update of a ScanConfig.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "PATCH", +"id": "websecurityscanner.projects.scanConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "ScanConfig" +}, +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Start a ScanRun according to the given ScanConfig.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}:start", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be used. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:start", +"request": { +"$ref": "StartScanRunRequest" +}, +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"scanRuns": { +"methods": { +"get": { +"description": "Gets a ScanRun.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanRun to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ScanRuns to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/scanRuns", +"response": { +"$ref": "ListScanRunsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a ScanRun. The stopped ScanRun is returned.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}:stop", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanRun to be stopped. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:stop", +"request": { +"$ref": "StopScanRunRequest" +}, +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"crawledUrls": { +"methods": { +"list": { +"description": "List CrawledUrls under a given ScanRun.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/crawledUrls", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of CrawledUrls to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/crawledUrls", +"response": { +"$ref": "ListCrawledUrlsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"findingTypeStats": { +"methods": { +"list": { +"description": "List all FindingTypeStats under a given ScanRun.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findingTypeStats", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findingTypeStats.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findingTypeStats", +"response": { +"$ref": "ListFindingTypeStatsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"findings": { +"methods": { +"get": { +"description": "Gets a Finding.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findings/{findingsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Finding to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List Findings under a given ScanRun.", +"flatPath": "v1/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findings", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "The filter expression. The expression must be in the format: . Supported field: 'finding_type'. Supported operator: '='.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of Findings to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/findings", +"response": { +"$ref": "ListFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://websecurityscanner.googleapis.com/", +"schemas": { +"Authentication": { +"description": "Scan authentication configuration.", +"id": "Authentication", +"properties": { +"customAccount": { +"$ref": "CustomAccount", +"description": "Authentication using a custom account." +}, +"googleAccount": { +"$ref": "GoogleAccount", +"deprecated": true, +"description": "Authentication using a Google account." +}, +"iapCredential": { +"$ref": "IapCredential", +"description": "Authentication using Identity-Aware-Proxy (IAP)." +} +}, +"type": "object" +}, +"CrawledUrl": { +"description": "A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web Security Scanner Service crawls the web applications, following all links within the scope of sites, to find the URLs to test against.", +"id": "CrawledUrl", +"properties": { +"body": { +"description": "Output only. The body of the request that was used to visit the URL.", +"type": "string" +}, +"httpMethod": { +"description": "Output only. The http method of the request that was used to visit the URL, in uppercase.", +"type": "string" +}, +"url": { +"description": "Output only. The URL that was crawled.", +"type": "string" +} +}, +"type": "object" +}, +"CustomAccount": { +"description": "Describes authentication configuration that uses a custom account.", +"id": "CustomAccount", +"properties": { +"loginUrl": { +"description": "Required. The login form URL of the website.", +"type": "string" +}, +"password": { +"description": "Required. Input only. The password of the custom account. The credential is stored encrypted and not returned in any response nor included in audit logs.", +"type": "string" +}, +"username": { +"description": "Required. The user name of the custom account.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Finding": { +"description": "A Finding resource represents a vulnerability instance identified during a ScanRun.", +"id": "Finding", +"properties": { +"body": { +"description": "Output only. The body of the request that triggered the vulnerability.", +"type": "string" +}, +"description": { +"description": "Output only. The description of the vulnerability.", +"type": "string" +}, +"finalUrl": { +"description": "Output only. The URL where the browser lands when the vulnerability is detected.", +"type": "string" +}, +"findingType": { +"description": "Output only. The type of the Finding. Detailed and up-to-date information on findings can be found here: https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner-findings", +"type": "string" +}, +"form": { +"$ref": "Form", +"description": "Output only. An addon containing information reported for a vulnerability with an HTML form, if any." +}, +"frameUrl": { +"description": "Output only. If the vulnerability was originated from nested IFrame, the immediate parent IFrame is reported.", +"type": "string" +}, +"fuzzedUrl": { +"description": "Output only. The URL produced by the server-side fuzzer and used in the request that triggered the vulnerability.", +"type": "string" +}, +"httpMethod": { +"description": "Output only. The http method of the request that triggered the vulnerability, in uppercase.", +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the Finding. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. The finding IDs are generated by the system.", +"type": "string" +}, +"outdatedLibrary": { +"$ref": "OutdatedLibrary", +"description": "Output only. An addon containing information about outdated libraries." +}, +"reproductionUrl": { +"description": "Output only. The URL containing human-readable payload that user can leverage to reproduce the vulnerability.", +"type": "string" +}, +"severity": { +"description": "Output only. The severity level of the reported vulnerability.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No severity specified. The default value.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"readOnly": true, +"type": "string" +}, +"trackingId": { +"description": "Output only. The tracking ID uniquely identifies a vulnerability instance across multiple ScanRuns.", +"type": "string" +}, +"violatingResource": { +"$ref": "ViolatingResource", +"description": "Output only. An addon containing detailed information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc." +}, +"vulnerableHeaders": { +"$ref": "VulnerableHeaders", +"description": "Output only. An addon containing information about vulnerable or missing HTTP headers." +}, +"vulnerableParameters": { +"$ref": "VulnerableParameters", +"description": "Output only. An addon containing information about request parameters which were found to be vulnerable." +}, +"xss": { +"$ref": "Xss", +"description": "Output only. An addon containing information reported for an XSS, if any." +}, +"xxe": { +"$ref": "Xxe", +"description": "Output only. An addon containing information reported for an XXE, if any.", +"readOnly": true +} +}, +"type": "object" +}, +"FindingTypeStats": { +"description": "A FindingTypeStats resource represents stats regarding a specific FindingType of Findings under a given ScanRun.", +"id": "FindingTypeStats", +"properties": { +"findingCount": { +"description": "Output only. The count of findings belonging to this finding type.", +"format": "int32", +"type": "integer" +}, +"findingType": { +"description": "Output only. The finding type associated with the stats.", +"type": "string" +} +}, +"type": "object" +}, +"Form": { +"description": "! Information about a vulnerability with an HTML.", +"id": "Form", +"properties": { +"actionUri": { +"description": "! The URI where to send the form when it's submitted.", +"type": "string" +}, +"fields": { +"description": "! The names of form fields related to the vulnerability.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAccount": { +"deprecated": true, +"description": "Describes authentication configuration that uses a Google account.", +"id": "GoogleAccount", +"properties": { +"password": { +"description": "Required. Input only. The password of the Google account. The credential is stored encrypted and not returned in any response nor included in audit logs.", +"type": "string" +}, +"username": { +"description": "Required. The user name of the Google account.", +"type": "string" +} +}, +"type": "object" +}, +"Header": { +"description": "Describes a HTTP Header.", +"id": "Header", +"properties": { +"name": { +"description": "Header name.", +"type": "string" +}, +"value": { +"description": "Header value.", +"type": "string" +} +}, +"type": "object" +}, +"IapCredential": { +"description": "Describes authentication configuration for Identity-Aware-Proxy (IAP).", +"id": "IapCredential", +"properties": { +"iapTestServiceAccountInfo": { +"$ref": "IapTestServiceAccountInfo", +"description": "Authentication configuration when Web-Security-Scanner service account is added in Identity-Aware-Proxy (IAP) access policies." +} +}, +"type": "object" +}, +"IapTestServiceAccountInfo": { +"description": "Describes authentication configuration when Web-Security-Scanner service account is added in Identity-Aware-Proxy (IAP) access policies.", +"id": "IapTestServiceAccountInfo", +"properties": { +"targetAudienceClientId": { +"description": "Required. Describes OAuth2 client id of resources protected by Identity-Aware-Proxy (IAP).", +"type": "string" +} +}, +"type": "object" +}, +"ListCrawledUrlsResponse": { +"description": "Response for the `ListCrawledUrls` method.", +"id": "ListCrawledUrlsResponse", +"properties": { +"crawledUrls": { +"description": "The list of CrawledUrls returned.", +"items": { +"$ref": "CrawledUrl" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListFindingTypeStatsResponse": { +"description": "Response for the `ListFindingTypeStats` method.", +"id": "ListFindingTypeStatsResponse", +"properties": { +"findingTypeStats": { +"description": "The list of FindingTypeStats returned.", +"items": { +"$ref": "FindingTypeStats" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListFindingsResponse": { +"description": "Response for the `ListFindings` method.", +"id": "ListFindingsResponse", +"properties": { +"findings": { +"description": "The list of Findings returned.", +"items": { +"$ref": "Finding" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListScanConfigsResponse": { +"description": "Response for the `ListScanConfigs` method.", +"id": "ListScanConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"scanConfigs": { +"description": "The list of ScanConfigs returned.", +"items": { +"$ref": "ScanConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListScanRunsResponse": { +"description": "Response for the `ListScanRuns` method.", +"id": "ListScanRunsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"scanRuns": { +"description": "The list of ScanRuns returned.", +"items": { +"$ref": "ScanRun" +}, +"type": "array" +} +}, +"type": "object" +}, +"OutdatedLibrary": { +"description": "Information reported for an outdated library.", +"id": "OutdatedLibrary", +"properties": { +"learnMoreUrls": { +"description": "URLs to learn more information about the vulnerabilities in the library.", +"items": { +"type": "string" +}, +"type": "array" +}, +"libraryName": { +"description": "The name of the outdated library.", +"type": "string" +}, +"version": { +"description": "The version number.", +"type": "string" +} +}, +"type": "object" +}, +"ScanConfig": { +"description": "A ScanConfig resource contains the configurations to launch a scan.", +"id": "ScanConfig", +"properties": { +"authentication": { +"$ref": "Authentication", +"description": "The authentication configuration. If specified, service will use the authentication configuration during scanning." +}, +"blacklistPatterns": { +"description": "The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Required. The user provided display name of the ScanConfig.", +"type": "string" +}, +"exportToSecurityCommandCenter": { +"description": "Controls export of scan configurations and results to Security Command Center.", +"enum": [ +"EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Use default, which is ENABLED.", +"Export results of this scan to Security Command Center.", +"Do not export results of this scan to Security Command Center." +], +"type": "string" +}, +"ignoreHttpStatusErrors": { +"description": "Whether to keep scanning even if most requests return HTTP error codes.", +"type": "boolean" +}, +"managedScan": { +"description": "Whether the scan config is managed by Web Security Scanner, output only.", +"type": "boolean" +}, +"maxQps": { +"description": "The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.", +"type": "string" +}, +"riskLevel": { +"description": "The risk level selected for the scan", +"enum": [ +"RISK_LEVEL_UNSPECIFIED", +"NORMAL", +"LOW" +], +"enumDescriptions": [ +"Use default, which is NORMAL.", +"Normal scanning (Recommended)", +"Lower impact scanning" +], +"type": "string" +}, +"schedule": { +"$ref": "Schedule", +"description": "The schedule of the ScanConfig." +}, +"startingUrls": { +"description": "Required. The starting URLs from which the scanner finds site pages.", +"items": { +"type": "string" +}, +"type": "array" +}, +"staticIpScan": { +"description": "Whether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.", +"type": "boolean" +}, +"userAgent": { +"description": "The user agent used during scanning.", +"enum": [ +"USER_AGENT_UNSPECIFIED", +"CHROME_LINUX", +"CHROME_ANDROID", +"SAFARI_IPHONE" +], +"enumDescriptions": [ +"The user agent is unknown. Service will default to CHROME_LINUX.", +"Chrome on Linux. This is the service default if unspecified.", +"Chrome on Android.", +"Safari on IPhone." +], +"type": "string" +} +}, +"type": "object" +}, +"ScanConfigError": { +"description": "Defines a custom error message used by CreateScanConfig and UpdateScanConfig APIs when scan configuration validation fails. It is also reported as part of a ScanRunErrorTrace message if scan validation fails due to a scan configuration error.", +"id": "ScanConfigError", +"properties": { +"code": { +"description": "Output only. Indicates the reason code for a configuration failure.", +"enum": [ +"CODE_UNSPECIFIED", +"OK", +"INTERNAL_ERROR", +"APPENGINE_API_BACKEND_ERROR", +"APPENGINE_API_NOT_ACCESSIBLE", +"APPENGINE_DEFAULT_HOST_MISSING", +"CANNOT_USE_GOOGLE_COM_ACCOUNT", +"CANNOT_USE_OWNER_ACCOUNT", +"COMPUTE_API_BACKEND_ERROR", +"COMPUTE_API_NOT_ACCESSIBLE", +"CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT", +"CUSTOM_LOGIN_URL_MALFORMED", +"CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS", +"CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS", +"CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS", +"CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS", +"DUPLICATE_SCAN_NAME", +"INVALID_FIELD_VALUE", +"FAILED_TO_AUTHENTICATE_TO_TARGET", +"FINDING_TYPE_UNSPECIFIED", +"FORBIDDEN_TO_SCAN_COMPUTE", +"FORBIDDEN_UPDATE_TO_MANAGED_SCAN", +"MALFORMED_FILTER", +"MALFORMED_RESOURCE_NAME", +"PROJECT_INACTIVE", +"REQUIRED_FIELD", +"RESOURCE_NAME_INCONSISTENT", +"SCAN_ALREADY_RUNNING", +"SCAN_NOT_RUNNING", +"SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT", +"SEED_URL_MALFORMED", +"SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS", +"SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS", +"SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS", +"SEED_URL_HAS_UNRESERVED_IP_ADDRESS", +"SERVICE_ACCOUNT_NOT_CONFIGURED", +"TOO_MANY_SCANS", +"UNABLE_TO_RESOLVE_PROJECT_INFO", +"UNSUPPORTED_BLACKLIST_PATTERN_FORMAT", +"UNSUPPORTED_FILTER", +"UNSUPPORTED_FINDING_TYPE", +"UNSUPPORTED_URL_SCHEME", +"CLOUD_ASSET_INVENTORY_ASSET_NOT_FOUND" +], +"enumDescriptions": [ +"There is no error.", +"There is no error.", +"Indicates an internal server error. Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown.", +"One of the seed URLs is an App Engine URL but we cannot validate the scan settings due to an App Engine API backend error.", +"One of the seed URLs is an App Engine URL but we cannot access the App Engine API to validate scan settings.", +"One of the seed URLs is an App Engine URL but the Default Host of the App Engine is not set.", +"Google corporate accounts can not be used for scanning.", +"The account of the scan creator can not be used for scanning.", +"This scan targets Compute Engine, but we cannot validate scan settings due to a Compute Engine API backend error.", +"This scan targets Compute Engine, but we cannot access the Compute Engine API to validate the scan settings.", +"The Custom Login URL does not belong to the current project.", +"The Custom Login URL is malformed (can not be parsed).", +"The Custom Login URL is mapped to a non-routable IP address in DNS.", +"The Custom Login URL is mapped to an IP address which is not reserved for the current project.", +"The Custom Login URL has a non-routable IP address.", +"The Custom Login URL has an IP address which is not reserved for the current project.", +"Another scan with the same name (case-sensitive) already exists.", +"A field is set to an invalid value.", +"There was an error trying to authenticate to the scan target.", +"Finding type value is not specified in the list findings request.", +"Scan targets Compute Engine, yet current project was not whitelisted for Google Compute Engine Scanning Alpha access.", +"User tries to update managed scan", +"The supplied filter is malformed. For example, it can not be parsed, does not have a filter type in expression, or the same filter type appears more than once.", +"The supplied resource name is malformed (can not be parsed).", +"The current project is not in an active state.", +"A required field is not set.", +"Project id, scanconfig id, scanrun id, or finding id are not consistent with each other in resource name.", +"The scan being requested to start is already running.", +"The scan that was requested to be stopped is not running.", +"One of the seed URLs does not belong to the current project.", +"One of the seed URLs is malformed (can not be parsed).", +"One of the seed URLs is mapped to a non-routable IP address in DNS.", +"One of the seed URLs is mapped to an IP address which is not reserved for the current project.", +"One of the seed URLs has on-routable IP address.", +"One of the seed URLs has an IP address that is not reserved for the current project.", +"The Web Security Scanner service account is not configured under the project.", +"A project has reached the maximum number of scans.", +"Resolving the details of the current project fails.", +"One or more blacklist patterns were in the wrong format.", +"The supplied filter is not supported.", +"The supplied finding type is not supported. For example, we do not provide findings of the given finding type.", +"The URL scheme of one or more of the supplied URLs is not supported.", +"CAI is not able to list assets." +], +"type": "string" +}, +"fieldName": { +"description": "Output only. Indicates the full name of the ScanConfig field that triggers this error, for example \"scan_config.max_qps\". This field is provided for troubleshooting purposes only and its actual value can change in the future.", +"type": "string" +} +}, +"type": "object" +}, +"ScanRun": { +"description": "A ScanRun is a output-only resource representing an actual run of the scan. Next id: 12", +"id": "ScanRun", +"properties": { +"endTime": { +"description": "Output only. The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.", +"format": "google-datetime", +"type": "string" +}, +"errorTrace": { +"$ref": "ScanRunErrorTrace", +"description": "Output only. If result_state is an ERROR, this field provides the primary reason for scan's termination and more details, if such are available." +}, +"executionState": { +"description": "Output only. The execution state of the ScanRun.", +"enum": [ +"EXECUTION_STATE_UNSPECIFIED", +"QUEUED", +"SCANNING", +"FINISHED" +], +"enumDescriptions": [ +"Represents an invalid state caused by internal server error. This value should never be returned.", +"The scan is waiting in the queue.", +"The scan is in progress.", +"The scan is either finished or stopped by user." +], +"type": "string" +}, +"hasVulnerabilities": { +"description": "Output only. Whether the scan run has found any vulnerabilities.", +"type": "boolean" +}, +"name": { +"description": "Output only. The resource name of the ScanRun. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. The ScanRun IDs are generated by the system.", +"type": "string" +}, +"progressPercent": { +"description": "Output only. The percentage of total completion ranging from 0 to 100. If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100.", +"format": "int32", +"type": "integer" +}, +"resultState": { +"description": "Output only. The result state of the ScanRun. This field is only available after the execution state reaches \"FINISHED\".", +"enum": [ +"RESULT_STATE_UNSPECIFIED", +"SUCCESS", +"ERROR", +"KILLED" +], +"enumDescriptions": [ +"Default value. This value is returned when the ScanRun is not yet finished.", +"The scan finished without errors.", +"The scan finished with errors.", +"The scan was terminated by user." +], +"type": "string" +}, +"startTime": { +"description": "Output only. The time at which the ScanRun started.", +"format": "google-datetime", +"type": "string" +}, +"urlsCrawledCount": { +"description": "Output only. The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now.", +"format": "int64", +"type": "string" +}, +"urlsTestedCount": { +"description": "Output only. The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads.", +"format": "int64", +"type": "string" +}, +"warningTraces": { +"description": "Output only. A list of warnings, if such are encountered during this scan run.", +"items": { +"$ref": "ScanRunWarningTrace" +}, +"type": "array" +} +}, +"type": "object" +}, +"ScanRunErrorTrace": { +"description": "Output only. Defines an error trace message for a ScanRun.", +"id": "ScanRunErrorTrace", +"properties": { +"code": { +"description": "Output only. Indicates the error reason code.", +"enum": [ +"CODE_UNSPECIFIED", +"INTERNAL_ERROR", +"SCAN_CONFIG_ISSUE", +"AUTHENTICATION_CONFIG_ISSUE", +"TIMED_OUT_WHILE_SCANNING", +"TOO_MANY_REDIRECTS", +"TOO_MANY_HTTP_ERRORS", +"STARTING_URLS_CRAWL_HTTP_ERRORS" +], +"enumDescriptions": [ +"Default value is never used.", +"Indicates that the scan run failed due to an internal server error.", +"Indicates a scan configuration error, usually due to outdated ScanConfig settings, such as starting_urls or the DNS configuration.", +"Indicates an authentication error, usually due to outdated ScanConfig authentication settings.", +"Indicates a scan operation timeout, usually caused by a very large site.", +"Indicates that a scan encountered excessive redirects, either to authentication or some other page outside of the scan scope.", +"Indicates that a scan encountered numerous errors from the web site pages. When available, most_common_http_error_code field indicates the most common HTTP error code encountered during the scan.", +"Indicates that some of the starting web urls returned HTTP errors during the scan." +], +"type": "string" +}, +"mostCommonHttpErrorCode": { +"description": "Output only. If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most common HTTP error code, if such is available. For example, if this code is 404, the scan has encountered too many NOT_FOUND responses.", +"format": "int32", +"type": "integer" +}, +"scanConfigError": { +"$ref": "ScanConfigError", +"description": "Output only. If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error message encountered during scan configuration validation that is performed before each scan run." +} +}, +"type": "object" +}, +"ScanRunWarningTrace": { +"description": "Output only. Defines a warning trace message for ScanRun. Warning traces provide customers with useful information that helps make the scanning process more effective.", +"id": "ScanRunWarningTrace", +"properties": { +"code": { +"description": "Output only. Indicates the warning code.", +"enum": [ +"CODE_UNSPECIFIED", +"INSUFFICIENT_CRAWL_RESULTS", +"TOO_MANY_CRAWL_RESULTS", +"TOO_MANY_FUZZ_TASKS", +"BLOCKED_BY_IAP", +"NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN" +], +"enumDescriptions": [ +"Default value is never used.", +"Indicates that a scan discovered an unexpectedly low number of URLs. This is sometimes caused by complex navigation features or by using a single URL for numerous pages.", +"Indicates that a scan discovered too many URLs to test, or excessive redundant URLs.", +"Indicates that too many tests have been generated for the scan. Customer should try reducing the number of starting URLs, increasing the QPS rate, or narrowing down the scope of the scan using the excluded patterns.", +"Indicates that a scan is blocked by IAP.", +"Indicates that no seeds is found for a scan" +], +"type": "string" +} +}, +"type": "object" +}, +"Schedule": { +"description": "Scan schedule configuration.", +"id": "Schedule", +"properties": { +"intervalDurationDays": { +"description": "Required. The duration of time between executions in days.", +"format": "int32", +"type": "integer" +}, +"scheduleTime": { +"description": "A timestamp indicates when the next run will be scheduled. The value is refreshed by the server after each run. If unspecified, it will default to current server time, which means the scan will be scheduled to start immediately.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"StartScanRunRequest": { +"description": "Request for the `StartScanRun` method.", +"id": "StartScanRunRequest", +"properties": {}, +"type": "object" +}, +"StopScanRunRequest": { +"description": "Request for the `StopScanRun` method.", +"id": "StopScanRunRequest", +"properties": {}, +"type": "object" +}, +"ViolatingResource": { +"description": "Information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc.", +"id": "ViolatingResource", +"properties": { +"contentType": { +"description": "The MIME type of this resource.", +"type": "string" +}, +"resourceUrl": { +"description": "URL of this violating resource.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerableHeaders": { +"description": "Information about vulnerable or missing HTTP Headers.", +"id": "VulnerableHeaders", +"properties": { +"headers": { +"description": "List of vulnerable headers.", +"items": { +"$ref": "Header" +}, +"type": "array" +}, +"missingHeaders": { +"description": "List of missing headers.", +"items": { +"$ref": "Header" +}, +"type": "array" +} +}, +"type": "object" +}, +"VulnerableParameters": { +"description": "Information about vulnerable request parameters.", +"id": "VulnerableParameters", +"properties": { +"parameterNames": { +"description": "The vulnerable parameter names.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Xss": { +"description": "Information reported for an XSS.", +"id": "Xss", +"properties": { +"attackVector": { +"description": "The attack vector of the payload triggering this XSS.", +"enum": [ +"ATTACK_VECTOR_UNSPECIFIED", +"LOCAL_STORAGE", +"SESSION_STORAGE", +"WINDOW_NAME", +"REFERRER", +"FORM_INPUT", +"COOKIE", +"POST_MESSAGE", +"GET_PARAMETERS", +"URL_FRAGMENT", +"HTML_COMMENT", +"POST_PARAMETERS", +"PROTOCOL", +"STORED_XSS", +"SAME_ORIGIN", +"USER_CONTROLLABLE_URL" +], +"enumDescriptions": [ +"Unknown attack vector.", +"The attack comes from fuzzing the browser's localStorage.", +"The attack comes from fuzzing the browser's sessionStorage.", +"The attack comes from fuzzing the window's name property.", +"The attack comes from fuzzing the referrer property.", +"The attack comes from fuzzing an input element.", +"The attack comes from fuzzing the browser's cookies.", +"The attack comes from hijacking the post messaging mechanism.", +"The attack comes from fuzzing parameters in the url.", +"The attack comes from fuzzing the fragment in the url.", +"The attack comes from fuzzing the HTML comments.", +"The attack comes from fuzzing the POST parameters.", +"The attack comes from fuzzing the protocol.", +"The attack comes from the server side and is stored.", +"The attack is a Same-Origin Method Execution attack via a GET parameter.", +"The attack payload is received from a third-party host via a URL that is user-controllable" +], +"type": "string" +}, +"errorMessage": { +"description": "An error message generated by a javascript breakage.", +"type": "string" +}, +"stackTraces": { +"description": "Stack traces leading to the point where the XSS occurred.", +"items": { +"type": "string" +}, +"type": "array" +}, +"storedXssSeedingUrl": { +"description": "The reproduction url for the seeding POST request of a Stored XSS.", +"type": "string" +} +}, +"type": "object" +}, +"Xxe": { +"description": "Information reported for an XXE.", +"id": "Xxe", +"properties": { +"payloadLocation": { +"description": "Location within the request where the payload was placed.", +"enum": [ +"LOCATION_UNSPECIFIED", +"COMPLETE_REQUEST_BODY" +], +"enumDescriptions": [ +"Unknown Location.", +"The XML payload replaced the complete request body." +], +"type": "string" +}, +"payloadValue": { +"description": "The XML string that triggered the XXE vulnerability. Non-payload values might be redacted.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Web Security Scanner API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1alpha.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1alpha.json new file mode 100644 index 0000000000000000000000000000000000000000..e6a74f2cbb2db03cdde77c193a22a375303b6f54 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1alpha.json @@ -0,0 +1,1137 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://websecurityscanner.googleapis.com/", +"batchPath": "batch", +"canonicalName": "WebSecurityScanner", +"description": "Scans your Compute and App Engine apps for common web vulnerabilities.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "websecurityscanner:v1alpha", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://websecurityscanner.mtls.googleapis.com/", +"name": "websecurityscanner", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"scanConfigs": { +"methods": { +"create": { +"description": "Creates a new ScanConfig.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the scan is created, which should be a project resource name in the format 'projects/{projectId}'.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/scanConfigs", +"request": { +"$ref": "ScanConfig" +}, +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing ScanConfig and its child resources.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "DELETE", +"id": "websecurityscanner.projects.scanConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be deleted. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a ScanConfig.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ScanConfigs under a given project.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ScanConfigs to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a project resource name in the format 'projects/{projectId}'.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/scanConfigs", +"response": { +"$ref": "ListScanConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a ScanConfig. This method support partial update of a ScanConfig.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "PATCH", +"id": "websecurityscanner.projects.scanConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"request": { +"$ref": "ScanConfig" +}, +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Start a ScanRun according to the given ScanConfig.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}:start", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be used. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}:start", +"request": { +"$ref": "StartScanRunRequest" +}, +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"scanRuns": { +"methods": { +"get": { +"description": "Gets a ScanRun.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanRun to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ScanRuns to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/scanRuns", +"response": { +"$ref": "ListScanRunsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a ScanRun. The stopped ScanRun is returned.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}:stop", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanRun to be stopped. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}:stop", +"request": { +"$ref": "StopScanRunRequest" +}, +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"crawledUrls": { +"methods": { +"list": { +"description": "List CrawledUrls under a given ScanRun.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/crawledUrls", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of CrawledUrls to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/crawledUrls", +"response": { +"$ref": "ListCrawledUrlsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"findingTypeStats": { +"methods": { +"list": { +"description": "List all FindingTypeStats under a given ScanRun.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findingTypeStats", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findingTypeStats.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/findingTypeStats", +"response": { +"$ref": "ListFindingTypeStatsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"findings": { +"methods": { +"get": { +"description": "Gets a Finding.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findings/{findingsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Finding to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+name}", +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List Findings under a given ScanRun.", +"flatPath": "v1alpha/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findings", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Required. The filter expression. The expression must be in the format: . Supported field: 'finding_type'. Supported operator: '='.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of Findings to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1alpha/{+parent}/findings", +"response": { +"$ref": "ListFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://websecurityscanner.googleapis.com/", +"schemas": { +"Authentication": { +"description": "Scan authentication configuration.", +"id": "Authentication", +"properties": { +"customAccount": { +"$ref": "CustomAccount", +"description": "Authentication using a custom account." +}, +"googleAccount": { +"$ref": "GoogleAccount", +"description": "Authentication using a Google account." +} +}, +"type": "object" +}, +"CrawledUrl": { +"description": "A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web Security Scanner Service crawls the web applications, following all links within the scope of sites, to find the URLs to test against.", +"id": "CrawledUrl", +"properties": { +"body": { +"description": "Output only. The body of the request that was used to visit the URL.", +"type": "string" +}, +"httpMethod": { +"description": "Output only. The http method of the request that was used to visit the URL, in uppercase.", +"type": "string" +}, +"url": { +"description": "Output only. The URL that was crawled.", +"type": "string" +} +}, +"type": "object" +}, +"CustomAccount": { +"description": "Describes authentication configuration that uses a custom account.", +"id": "CustomAccount", +"properties": { +"loginUrl": { +"description": "Required. The login form URL of the website.", +"type": "string" +}, +"password": { +"description": "Required. Input only. The password of the custom account. The credential is stored encrypted and not returned in any response nor included in audit logs.", +"type": "string" +}, +"username": { +"description": "Required. The user name of the custom account.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Finding": { +"description": "A Finding resource represents a vulnerability instance identified during a ScanRun.", +"id": "Finding", +"properties": { +"body": { +"description": "The body of the request that triggered the vulnerability.", +"type": "string" +}, +"description": { +"description": "The description of the vulnerability.", +"type": "string" +}, +"finalUrl": { +"description": "The URL where the browser lands when the vulnerability is detected.", +"type": "string" +}, +"findingType": { +"description": "The type of the Finding.", +"enum": [ +"FINDING_TYPE_UNSPECIFIED", +"MIXED_CONTENT", +"OUTDATED_LIBRARY", +"ROSETTA_FLASH", +"XSS_CALLBACK", +"XSS_ERROR", +"CLEAR_TEXT_PASSWORD", +"INVALID_CONTENT_TYPE", +"XSS_ANGULAR_CALLBACK", +"INVALID_HEADER", +"MISSPELLED_SECURITY_HEADER_NAME", +"MISMATCHING_SECURITY_HEADER_VALUES", +"ACCESSIBLE_GIT_REPOSITORY", +"ACCESSIBLE_SVN_REPOSITORY", +"ACCESSIBLE_ENV_FILE" +], +"enumDescriptions": [ +"The invalid finding type.", +"A page that was served over HTTPS also resources over HTTP. A man-in-the-middle attacker could tamper with the HTTP resource and gain full access to the website that loads the resource or to monitor the actions taken by the user.", +"The version of an included library is known to contain a security issue. The scanner checks the version of library in use against a known list of vulnerable libraries. False positives are possible if the version detection fails or if the library has been manually patched.", +"This type of vulnerability occurs when the value of a request parameter is reflected at the beginning of the response, for example, in requests using JSONP. Under certain circumstances, an attacker may be able to supply an alphanumeric-only Flash file in the vulnerable parameter causing the browser to execute the Flash file as if it originated on the vulnerable server.", +"A cross-site scripting (XSS) bug is found via JavaScript callback. For detailed explanations on XSS, see https://www.google.com/about/appsecurity/learning/xss/.", +"A potential cross-site scripting (XSS) bug due to JavaScript breakage. In some circumstances, the application under test might modify the test string before it is parsed by the browser. When the browser attempts to runs this modified test string, it will likely break and throw a JavaScript execution error, thus an injection issue is occurring. However, it may not be exploitable. Manual verification is needed to see if the test string modifications can be evaded and confirm that the issue is in fact an XSS vulnerability. For detailed explanations on XSS, see https://www.google.com/about/appsecurity/learning/xss/.", +"An application appears to be transmitting a password field in clear text. An attacker can eavesdrop network traffic and sniff the password field.", +"An application returns sensitive content with an invalid content type, or without an 'X-Content-Type-Options: nosniff' header.", +"A cross-site scripting (XSS) vulnerability in AngularJS module that occurs when a user-provided string is interpolated by Angular.", +"A malformed or invalid valued header.", +"Misspelled security header name.", +"Mismatching values in a duplicate security header.", +"A world-readable git repository that potentially leaks source code, commit history or sensitive information such as credentials.", +"A world-readable subversion repository that potentially leaks source code, commit history or sensitive information such as credentials.", +"A world-readable env file that potentially leaks source code, commit history or sensitive information such as credentials." +], +"type": "string" +}, +"frameUrl": { +"description": "If the vulnerability was originated from nested IFrame, the immediate parent IFrame is reported.", +"type": "string" +}, +"fuzzedUrl": { +"description": "The URL produced by the server-side fuzzer and used in the request that triggered the vulnerability.", +"type": "string" +}, +"httpMethod": { +"description": "The http method of the request that triggered the vulnerability, in uppercase.", +"type": "string" +}, +"name": { +"description": "The resource name of the Finding. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. The finding IDs are generated by the system.", +"type": "string" +}, +"outdatedLibrary": { +"$ref": "OutdatedLibrary", +"description": "An addon containing information about outdated libraries." +}, +"reproductionUrl": { +"description": "The URL containing human-readable payload that user can leverage to reproduce the vulnerability.", +"type": "string" +}, +"trackingId": { +"description": "The tracking ID uniquely identifies a vulnerability instance across multiple ScanRuns.", +"type": "string" +}, +"violatingResource": { +"$ref": "ViolatingResource", +"description": "An addon containing detailed information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc." +}, +"vulnerableHeaders": { +"$ref": "VulnerableHeaders", +"description": "An addon containing information about vulnerable or missing HTTP headers." +}, +"vulnerableParameters": { +"$ref": "VulnerableParameters", +"description": "An addon containing information about request parameters which were found to be vulnerable." +}, +"xss": { +"$ref": "Xss", +"description": "An addon containing information reported for an XSS, if any." +} +}, +"type": "object" +}, +"FindingTypeStats": { +"description": "A FindingTypeStats resource represents stats regarding a specific FindingType of Findings under a given ScanRun.", +"id": "FindingTypeStats", +"properties": { +"findingCount": { +"description": "The count of findings belonging to this finding type.", +"format": "int32", +"type": "integer" +}, +"findingType": { +"description": "The finding type associated with the stats.", +"enum": [ +"FINDING_TYPE_UNSPECIFIED", +"MIXED_CONTENT", +"OUTDATED_LIBRARY", +"ROSETTA_FLASH", +"XSS_CALLBACK", +"XSS_ERROR", +"CLEAR_TEXT_PASSWORD", +"INVALID_CONTENT_TYPE", +"XSS_ANGULAR_CALLBACK", +"INVALID_HEADER", +"MISSPELLED_SECURITY_HEADER_NAME", +"MISMATCHING_SECURITY_HEADER_VALUES", +"ACCESSIBLE_GIT_REPOSITORY", +"ACCESSIBLE_SVN_REPOSITORY", +"ACCESSIBLE_ENV_FILE" +], +"enumDescriptions": [ +"The invalid finding type.", +"A page that was served over HTTPS also resources over HTTP. A man-in-the-middle attacker could tamper with the HTTP resource and gain full access to the website that loads the resource or to monitor the actions taken by the user.", +"The version of an included library is known to contain a security issue. The scanner checks the version of library in use against a known list of vulnerable libraries. False positives are possible if the version detection fails or if the library has been manually patched.", +"This type of vulnerability occurs when the value of a request parameter is reflected at the beginning of the response, for example, in requests using JSONP. Under certain circumstances, an attacker may be able to supply an alphanumeric-only Flash file in the vulnerable parameter causing the browser to execute the Flash file as if it originated on the vulnerable server.", +"A cross-site scripting (XSS) bug is found via JavaScript callback. For detailed explanations on XSS, see https://www.google.com/about/appsecurity/learning/xss/.", +"A potential cross-site scripting (XSS) bug due to JavaScript breakage. In some circumstances, the application under test might modify the test string before it is parsed by the browser. When the browser attempts to runs this modified test string, it will likely break and throw a JavaScript execution error, thus an injection issue is occurring. However, it may not be exploitable. Manual verification is needed to see if the test string modifications can be evaded and confirm that the issue is in fact an XSS vulnerability. For detailed explanations on XSS, see https://www.google.com/about/appsecurity/learning/xss/.", +"An application appears to be transmitting a password field in clear text. An attacker can eavesdrop network traffic and sniff the password field.", +"An application returns sensitive content with an invalid content type, or without an 'X-Content-Type-Options: nosniff' header.", +"A cross-site scripting (XSS) vulnerability in AngularJS module that occurs when a user-provided string is interpolated by Angular.", +"A malformed or invalid valued header.", +"Misspelled security header name.", +"Mismatching values in a duplicate security header.", +"A world-readable git repository that potentially leaks source code, commit history or sensitive information such as credentials.", +"A world-readable subversion repository that potentially leaks source code, commit history or sensitive information such as credentials.", +"A world-readable env file that potentially leaks source code, commit history or sensitive information such as credentials." +], +"type": "string" +} +}, +"type": "object" +}, +"GoogleAccount": { +"description": "Describes authentication configuration that uses a Google account.", +"id": "GoogleAccount", +"properties": { +"password": { +"description": "Required. Input only. The password of the Google account. The credential is stored encrypted and not returned in any response nor included in audit logs.", +"type": "string" +}, +"username": { +"description": "Required. The user name of the Google account.", +"type": "string" +} +}, +"type": "object" +}, +"Header": { +"description": "Describes a HTTP Header.", +"id": "Header", +"properties": { +"name": { +"description": "Header name.", +"type": "string" +}, +"value": { +"description": "Header value.", +"type": "string" +} +}, +"type": "object" +}, +"ListCrawledUrlsResponse": { +"description": "Response for the `ListCrawledUrls` method.", +"id": "ListCrawledUrlsResponse", +"properties": { +"crawledUrls": { +"description": "The list of CrawledUrls returned.", +"items": { +"$ref": "CrawledUrl" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListFindingTypeStatsResponse": { +"description": "Response for the `ListFindingTypeStats` method.", +"id": "ListFindingTypeStatsResponse", +"properties": { +"findingTypeStats": { +"description": "The list of FindingTypeStats returned.", +"items": { +"$ref": "FindingTypeStats" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListFindingsResponse": { +"description": "Response for the `ListFindings` method.", +"id": "ListFindingsResponse", +"properties": { +"findings": { +"description": "The list of Findings returned.", +"items": { +"$ref": "Finding" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListScanConfigsResponse": { +"description": "Response for the `ListScanConfigs` method.", +"id": "ListScanConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"scanConfigs": { +"description": "The list of ScanConfigs returned.", +"items": { +"$ref": "ScanConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListScanRunsResponse": { +"description": "Response for the `ListScanRuns` method.", +"id": "ListScanRunsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"scanRuns": { +"description": "The list of ScanRuns returned.", +"items": { +"$ref": "ScanRun" +}, +"type": "array" +} +}, +"type": "object" +}, +"OutdatedLibrary": { +"description": "Information reported for an outdated library.", +"id": "OutdatedLibrary", +"properties": { +"learnMoreUrls": { +"description": "URLs to learn more information about the vulnerabilities in the library.", +"items": { +"type": "string" +}, +"type": "array" +}, +"libraryName": { +"description": "The name of the outdated library.", +"type": "string" +}, +"version": { +"description": "The version number.", +"type": "string" +} +}, +"type": "object" +}, +"ScanConfig": { +"description": "A ScanConfig resource contains the configurations to launch a scan. next id: 12", +"id": "ScanConfig", +"properties": { +"authentication": { +"$ref": "Authentication", +"description": "The authentication configuration. If specified, service will use the authentication configuration during scanning." +}, +"blacklistPatterns": { +"description": "The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Required. The user provided display name of the ScanConfig.", +"type": "string" +}, +"latestRun": { +"$ref": "ScanRun", +"description": "Latest ScanRun if available." +}, +"maxQps": { +"description": "The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.", +"type": "string" +}, +"schedule": { +"$ref": "Schedule", +"description": "The schedule of the ScanConfig." +}, +"startingUrls": { +"description": "Required. The starting URLs from which the scanner finds site pages.", +"items": { +"type": "string" +}, +"type": "array" +}, +"targetPlatforms": { +"description": "Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.", +"items": { +"enum": [ +"TARGET_PLATFORM_UNSPECIFIED", +"APP_ENGINE", +"COMPUTE", +"CLOUD_RUN", +"CLOUD_FUNCTIONS" +], +"enumDescriptions": [ +"The target platform is unknown. Requests with this enum value will be rejected with INVALID_ARGUMENT error.", +"Google App Engine service.", +"Google Compute Engine service.", +"Google Cloud Run service.", +"Google Cloud Function service." +], +"type": "string" +}, +"type": "array" +}, +"userAgent": { +"description": "The user agent used during scanning.", +"enum": [ +"USER_AGENT_UNSPECIFIED", +"CHROME_LINUX", +"CHROME_ANDROID", +"SAFARI_IPHONE" +], +"enumDescriptions": [ +"The user agent is unknown. Service will default to CHROME_LINUX.", +"Chrome on Linux. This is the service default if unspecified.", +"Chrome on Android.", +"Safari on IPhone." +], +"type": "string" +} +}, +"type": "object" +}, +"ScanRun": { +"description": "A ScanRun is a output-only resource representing an actual run of the scan.", +"id": "ScanRun", +"properties": { +"endTime": { +"description": "The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.", +"format": "google-datetime", +"type": "string" +}, +"executionState": { +"description": "The execution state of the ScanRun.", +"enum": [ +"EXECUTION_STATE_UNSPECIFIED", +"QUEUED", +"SCANNING", +"FINISHED" +], +"enumDescriptions": [ +"Represents an invalid state caused by internal server error. This value should never be returned.", +"The scan is waiting in the queue.", +"The scan is in progress.", +"The scan is either finished or stopped by user." +], +"type": "string" +}, +"hasVulnerabilities": { +"description": "Whether the scan run has found any vulnerabilities.", +"type": "boolean" +}, +"name": { +"description": "The resource name of the ScanRun. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. The ScanRun IDs are generated by the system.", +"type": "string" +}, +"progressPercent": { +"description": "The percentage of total completion ranging from 0 to 100. If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100.", +"format": "int32", +"type": "integer" +}, +"resultState": { +"description": "The result state of the ScanRun. This field is only available after the execution state reaches \"FINISHED\".", +"enum": [ +"RESULT_STATE_UNSPECIFIED", +"SUCCESS", +"ERROR", +"KILLED" +], +"enumDescriptions": [ +"Default value. This value is returned when the ScanRun is not yet finished.", +"The scan finished without errors.", +"The scan finished with errors.", +"The scan was terminated by user." +], +"type": "string" +}, +"startTime": { +"description": "The time at which the ScanRun started.", +"format": "google-datetime", +"type": "string" +}, +"urlsCrawledCount": { +"description": "The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now.", +"format": "int64", +"type": "string" +}, +"urlsTestedCount": { +"description": "The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Schedule": { +"description": "Scan schedule configuration.", +"id": "Schedule", +"properties": { +"intervalDurationDays": { +"description": "Required. The duration of time between executions in days.", +"format": "int32", +"type": "integer" +}, +"scheduleTime": { +"description": "A timestamp indicates when the next run will be scheduled. The value is refreshed by the server after each run. If unspecified, it will default to current server time, which means the scan will be scheduled to start immediately.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"StartScanRunRequest": { +"description": "Request for the `StartScanRun` method.", +"id": "StartScanRunRequest", +"properties": {}, +"type": "object" +}, +"StopScanRunRequest": { +"description": "Request for the `StopScanRun` method.", +"id": "StopScanRunRequest", +"properties": {}, +"type": "object" +}, +"ViolatingResource": { +"description": "Information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc.", +"id": "ViolatingResource", +"properties": { +"contentType": { +"description": "The MIME type of this resource.", +"type": "string" +}, +"resourceUrl": { +"description": "URL of this violating resource.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerableHeaders": { +"description": "Information about vulnerable or missing HTTP Headers.", +"id": "VulnerableHeaders", +"properties": { +"headers": { +"description": "List of vulnerable headers.", +"items": { +"$ref": "Header" +}, +"type": "array" +}, +"missingHeaders": { +"description": "List of missing headers.", +"items": { +"$ref": "Header" +}, +"type": "array" +} +}, +"type": "object" +}, +"VulnerableParameters": { +"description": "Information about vulnerable request parameters.", +"id": "VulnerableParameters", +"properties": { +"parameterNames": { +"description": "The vulnerable parameter names.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Xss": { +"description": "Information reported for an XSS.", +"id": "Xss", +"properties": { +"errorMessage": { +"description": "An error message generated by a javascript breakage.", +"type": "string" +}, +"stackTraces": { +"description": "Stack traces leading to the point where the XSS occurred.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Web Security Scanner API", +"version": "v1alpha", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..afa86ed0244b27a569dccad8cc58fe0bc3ba5efb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/websecurityscanner.v1beta.json @@ -0,0 +1,1387 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://websecurityscanner.googleapis.com/", +"batchPath": "batch", +"canonicalName": "WebSecurityScanner", +"description": "Scans your Compute and App Engine apps for common web vulnerabilities.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/security-command-center/docs/concepts-web-security-scanner-overview/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "websecurityscanner:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://websecurityscanner.mtls.googleapis.com/", +"name": "websecurityscanner", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"scanConfigs": { +"methods": { +"create": { +"description": "Creates a new ScanConfig.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name where the scan is created, which should be a project resource name in the format 'projects/{projectId}'.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/scanConfigs", +"request": { +"$ref": "ScanConfig" +}, +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes an existing ScanConfig and its child resources.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "DELETE", +"id": "websecurityscanner.projects.scanConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be deleted. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets a ScanConfig.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ScanConfigs under a given project.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ScanConfigs to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a project resource name in the format 'projects/{projectId}'.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/scanConfigs", +"response": { +"$ref": "ListScanConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates a ScanConfig. This method support partial update of a ScanConfig.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}", +"httpMethod": "PATCH", +"id": "websecurityscanner.projects.scanConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. The update mask applies to the resource. For the `FieldMask` definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "ScanConfig" +}, +"response": { +"$ref": "ScanConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Start a ScanRun according to the given ScanConfig.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}:start", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanConfig to be used. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:start", +"request": { +"$ref": "StartScanRunRequest" +}, +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"scanRuns": { +"methods": { +"get": { +"description": "Gets a ScanRun.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanRun to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists ScanRuns under a given ScanConfig, in descending order of ScanRun stop time.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of ScanRuns to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/scanRuns", +"response": { +"$ref": "ListScanRunsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops a ScanRun. The stopped ScanRun is returned.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}:stop", +"httpMethod": "POST", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the ScanRun to be stopped. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:stop", +"request": { +"$ref": "StopScanRunRequest" +}, +"response": { +"$ref": "ScanRun" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"crawledUrls": { +"methods": { +"list": { +"description": "List CrawledUrls under a given ScanRun.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/crawledUrls", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.crawledUrls.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "The maximum number of CrawledUrls to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/crawledUrls", +"response": { +"$ref": "ListCrawledUrlsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"findingTypeStats": { +"methods": { +"list": { +"description": "List all FindingTypeStats under a given ScanRun.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findingTypeStats", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findingTypeStats.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/findingTypeStats", +"response": { +"$ref": "ListFindingTypeStatsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"findings": { +"methods": { +"get": { +"description": "Gets a Finding.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findings/{findingsId}", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findings.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Finding to be returned. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}/findings/{findingId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+/findings/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Finding" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "List Findings under a given ScanRun.", +"flatPath": "v1beta/projects/{projectsId}/scanConfigs/{scanConfigsId}/scanRuns/{scanRunsId}/findings", +"httpMethod": "GET", +"id": "websecurityscanner.projects.scanConfigs.scanRuns.findings.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Required. The filter expression. The expression must be in the format: . Supported field: 'finding_type'. Supported operator: '='.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "The maximum number of Findings to return, can be limited by server. If not specified or not positive, the implementation will select a reasonable value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results to be returned. This should be a `next_page_token` value returned from a previous List request. If unspecified, the first page of results is returned.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The parent resource name, which should be a scan run resource name in the format 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'.", +"location": "path", +"pattern": "^projects/[^/]+/scanConfigs/[^/]+/scanRuns/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/findings", +"response": { +"$ref": "ListFindingsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://websecurityscanner.googleapis.com/", +"schemas": { +"Authentication": { +"description": "Scan authentication configuration.", +"id": "Authentication", +"properties": { +"customAccount": { +"$ref": "CustomAccount", +"description": "Authentication using a custom account." +}, +"googleAccount": { +"$ref": "GoogleAccount", +"deprecated": true, +"description": "Authentication using a Google account." +}, +"iapCredential": { +"$ref": "IapCredential", +"description": "Authentication using Identity-Aware-Proxy (IAP)." +} +}, +"type": "object" +}, +"CrawledUrl": { +"description": "A CrawledUrl resource represents a URL that was crawled during a ScanRun. Web Security Scanner Service crawls the web applications, following all links within the scope of sites, to find the URLs to test against.", +"id": "CrawledUrl", +"properties": { +"body": { +"description": "The body of the request that was used to visit the URL.", +"type": "string" +}, +"httpMethod": { +"description": "The http method of the request that was used to visit the URL, in uppercase.", +"type": "string" +}, +"url": { +"description": "The URL that was crawled.", +"type": "string" +} +}, +"type": "object" +}, +"CustomAccount": { +"description": "Describes authentication configuration that uses a custom account.", +"id": "CustomAccount", +"properties": { +"loginUrl": { +"description": "Required. The login form URL of the website.", +"type": "string" +}, +"password": { +"description": "Required. Input only. The password of the custom account. The credential is stored encrypted and not returned in any response nor included in audit logs.", +"type": "string" +}, +"username": { +"description": "Required. The user name of the custom account.", +"type": "string" +} +}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Finding": { +"description": "A Finding resource represents a vulnerability instance identified during a ScanRun.", +"id": "Finding", +"properties": { +"body": { +"description": "The body of the request that triggered the vulnerability.", +"type": "string" +}, +"description": { +"description": "The description of the vulnerability.", +"type": "string" +}, +"finalUrl": { +"description": "The URL where the browser lands when the vulnerability is detected.", +"type": "string" +}, +"findingType": { +"description": "The type of the Finding. Detailed and up-to-date information on findings can be found here: https://cloud.google.com/security-command-center/docs/how-to-remediate-web-security-scanner", +"type": "string" +}, +"form": { +"$ref": "Form", +"description": "An addon containing information reported for a vulnerability with an HTML form, if any." +}, +"frameUrl": { +"description": "If the vulnerability was originated from nested IFrame, the immediate parent IFrame is reported.", +"type": "string" +}, +"fuzzedUrl": { +"description": "The URL produced by the server-side fuzzer and used in the request that triggered the vulnerability.", +"type": "string" +}, +"httpMethod": { +"description": "The http method of the request that triggered the vulnerability, in uppercase.", +"type": "string" +}, +"name": { +"description": "The resource name of the Finding. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanruns/{scanRunId}/findings/{findingId}'. The finding IDs are generated by the system.", +"type": "string" +}, +"outdatedLibrary": { +"$ref": "OutdatedLibrary", +"description": "An addon containing information about outdated libraries." +}, +"reproductionUrl": { +"description": "The URL containing human-readable payload that user can leverage to reproduce the vulnerability.", +"type": "string" +}, +"severity": { +"description": "The severity level of the reported vulnerability.", +"enum": [ +"SEVERITY_UNSPECIFIED", +"CRITICAL", +"HIGH", +"MEDIUM", +"LOW" +], +"enumDescriptions": [ +"No severity specified. The default value.", +"Critical severity.", +"High severity.", +"Medium severity.", +"Low severity." +], +"type": "string" +}, +"trackingId": { +"description": "The tracking ID uniquely identifies a vulnerability instance across multiple ScanRuns.", +"type": "string" +}, +"violatingResource": { +"$ref": "ViolatingResource", +"description": "An addon containing detailed information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc." +}, +"vulnerableHeaders": { +"$ref": "VulnerableHeaders", +"description": "An addon containing information about vulnerable or missing HTTP headers." +}, +"vulnerableParameters": { +"$ref": "VulnerableParameters", +"description": "An addon containing information about request parameters which were found to be vulnerable." +}, +"xss": { +"$ref": "Xss", +"description": "An addon containing information reported for an XSS, if any." +}, +"xxe": { +"$ref": "Xxe", +"description": "An addon containing information reported for an XXE, if any." +} +}, +"type": "object" +}, +"FindingTypeStats": { +"description": "A FindingTypeStats resource represents stats regarding a specific FindingType of Findings under a given ScanRun.", +"id": "FindingTypeStats", +"properties": { +"findingCount": { +"description": "The count of findings belonging to this finding type.", +"format": "int32", +"type": "integer" +}, +"findingType": { +"description": "The finding type associated with the stats.", +"type": "string" +} +}, +"type": "object" +}, +"Form": { +"description": "! Information about a vulnerability with an HTML.", +"id": "Form", +"properties": { +"actionUri": { +"description": "! The URI where to send the form when it's submitted.", +"type": "string" +}, +"fields": { +"description": "! The names of form fields related to the vulnerability.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GoogleAccount": { +"deprecated": true, +"description": "Describes authentication configuration that uses a Google account.", +"id": "GoogleAccount", +"properties": { +"password": { +"description": "Required. Input only. The password of the Google account. The credential is stored encrypted and not returned in any response nor included in audit logs.", +"type": "string" +}, +"username": { +"description": "Required. The user name of the Google account.", +"type": "string" +} +}, +"type": "object" +}, +"Header": { +"description": "Describes a HTTP Header.", +"id": "Header", +"properties": { +"name": { +"description": "Header name.", +"type": "string" +}, +"value": { +"description": "Header value.", +"type": "string" +} +}, +"type": "object" +}, +"IapCredential": { +"description": "Describes authentication configuration for Identity-Aware-Proxy (IAP).", +"id": "IapCredential", +"properties": { +"iapTestServiceAccountInfo": { +"$ref": "IapTestServiceAccountInfo", +"description": "Authentication configuration when Web-Security-Scanner service account is added in Identity-Aware-Proxy (IAP) access policies." +} +}, +"type": "object" +}, +"IapTestServiceAccountInfo": { +"description": "Describes authentication configuration when Web-Security-Scanner service account is added in Identity-Aware-Proxy (IAP) access policies.", +"id": "IapTestServiceAccountInfo", +"properties": { +"targetAudienceClientId": { +"description": "Required. Describes OAuth2 Client ID of resources protected by Identity-Aware-Proxy(IAP).", +"type": "string" +} +}, +"type": "object" +}, +"ListCrawledUrlsResponse": { +"description": "Response for the `ListCrawledUrls` method.", +"id": "ListCrawledUrlsResponse", +"properties": { +"crawledUrls": { +"description": "The list of CrawledUrls returned.", +"items": { +"$ref": "CrawledUrl" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListFindingTypeStatsResponse": { +"description": "Response for the `ListFindingTypeStats` method.", +"id": "ListFindingTypeStatsResponse", +"properties": { +"findingTypeStats": { +"description": "The list of FindingTypeStats returned.", +"items": { +"$ref": "FindingTypeStats" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListFindingsResponse": { +"description": "Response for the `ListFindings` method.", +"id": "ListFindingsResponse", +"properties": { +"findings": { +"description": "The list of Findings returned.", +"items": { +"$ref": "Finding" +}, +"type": "array" +}, +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +} +}, +"type": "object" +}, +"ListScanConfigsResponse": { +"description": "Response for the `ListScanConfigs` method.", +"id": "ListScanConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"scanConfigs": { +"description": "The list of ScanConfigs returned.", +"items": { +"$ref": "ScanConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListScanRunsResponse": { +"description": "Response for the `ListScanRuns` method.", +"id": "ListScanRunsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"scanRuns": { +"description": "The list of ScanRuns returned.", +"items": { +"$ref": "ScanRun" +}, +"type": "array" +} +}, +"type": "object" +}, +"OutdatedLibrary": { +"description": "Information reported for an outdated library.", +"id": "OutdatedLibrary", +"properties": { +"learnMoreUrls": { +"description": "URLs to learn more information about the vulnerabilities in the library.", +"items": { +"type": "string" +}, +"type": "array" +}, +"libraryName": { +"description": "The name of the outdated library.", +"type": "string" +}, +"version": { +"description": "The version number.", +"type": "string" +} +}, +"type": "object" +}, +"ScanConfig": { +"description": "A ScanConfig resource contains the configurations to launch a scan.", +"id": "ScanConfig", +"properties": { +"authentication": { +"$ref": "Authentication", +"description": "The authentication configuration. If specified, service will use the authentication configuration during scanning." +}, +"blacklistPatterns": { +"description": "The excluded URL patterns as described in https://cloud.google.com/security-command-center/docs/how-to-use-web-security-scanner#excluding_urls", +"items": { +"type": "string" +}, +"type": "array" +}, +"displayName": { +"description": "Required. The user provided display name of the ScanConfig.", +"type": "string" +}, +"exportToSecurityCommandCenter": { +"description": "Controls export of scan configurations and results to Security Command Center.", +"enum": [ +"EXPORT_TO_SECURITY_COMMAND_CENTER_UNSPECIFIED", +"ENABLED", +"DISABLED" +], +"enumDescriptions": [ +"Use default, which is ENABLED.", +"Export results of this scan to Security Command Center.", +"Do not export results of this scan to Security Command Center." +], +"type": "string" +}, +"ignoreHttpStatusErrors": { +"description": "Whether to keep scanning even if most requests return HTTP error codes.", +"type": "boolean" +}, +"latestRun": { +"$ref": "ScanRun", +"description": "Latest ScanRun if available." +}, +"managedScan": { +"description": "Whether the scan config is managed by Web Security Scanner, output only.", +"type": "boolean" +}, +"maxQps": { +"description": "The maximum QPS during scanning. A valid value ranges from 5 to 20 inclusively. If the field is unspecified or its value is set 0, server will default to 15. Other values outside of [5, 20] range will be rejected with INVALID_ARGUMENT error.", +"format": "int32", +"type": "integer" +}, +"name": { +"description": "The resource name of the ScanConfig. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}'. The ScanConfig IDs are generated by the system.", +"type": "string" +}, +"riskLevel": { +"description": "The risk level selected for the scan", +"enum": [ +"RISK_LEVEL_UNSPECIFIED", +"NORMAL", +"LOW" +], +"enumDescriptions": [ +"Use default, which is NORMAL.", +"Normal scanning (Recommended)", +"Lower impact scanning" +], +"type": "string" +}, +"schedule": { +"$ref": "Schedule", +"description": "The schedule of the ScanConfig." +}, +"startingUrls": { +"description": "Required. The starting URLs from which the scanner finds site pages.", +"items": { +"type": "string" +}, +"type": "array" +}, +"staticIpScan": { +"description": "Whether the scan configuration has enabled static IP address scan feature. If enabled, the scanner will access applications from static IP addresses.", +"type": "boolean" +}, +"targetPlatforms": { +"description": "Set of Google Cloud platforms targeted by the scan. If empty, APP_ENGINE will be used as a default.", +"items": { +"enum": [ +"TARGET_PLATFORM_UNSPECIFIED", +"APP_ENGINE", +"COMPUTE", +"CLOUD_RUN", +"CLOUD_FUNCTIONS" +], +"enumDescriptions": [ +"The target platform is unknown. Requests with this enum value will be rejected with INVALID_ARGUMENT error.", +"Google App Engine service.", +"Google Compute Engine service.", +"Google Cloud Run service.", +"Google Cloud Function service." +], +"type": "string" +}, +"type": "array" +}, +"userAgent": { +"description": "The user agent used during scanning.", +"enum": [ +"USER_AGENT_UNSPECIFIED", +"CHROME_LINUX", +"CHROME_ANDROID", +"SAFARI_IPHONE" +], +"enumDescriptions": [ +"The user agent is unknown. Service will default to CHROME_LINUX.", +"Chrome on Linux. This is the service default if unspecified.", +"Chrome on Android.", +"Safari on IPhone." +], +"type": "string" +} +}, +"type": "object" +}, +"ScanConfigError": { +"description": "Defines a custom error message used by CreateScanConfig and UpdateScanConfig APIs when scan configuration validation fails. It is also reported as part of a ScanRunErrorTrace message if scan validation fails due to a scan configuration error.", +"id": "ScanConfigError", +"properties": { +"code": { +"description": "Indicates the reason code for a configuration failure.", +"enum": [ +"CODE_UNSPECIFIED", +"OK", +"INTERNAL_ERROR", +"APPENGINE_API_BACKEND_ERROR", +"APPENGINE_API_NOT_ACCESSIBLE", +"APPENGINE_DEFAULT_HOST_MISSING", +"CANNOT_USE_GOOGLE_COM_ACCOUNT", +"CANNOT_USE_OWNER_ACCOUNT", +"COMPUTE_API_BACKEND_ERROR", +"COMPUTE_API_NOT_ACCESSIBLE", +"CUSTOM_LOGIN_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT", +"CUSTOM_LOGIN_URL_MALFORMED", +"CUSTOM_LOGIN_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS", +"CUSTOM_LOGIN_URL_MAPPED_TO_UNRESERVED_ADDRESS", +"CUSTOM_LOGIN_URL_HAS_NON_ROUTABLE_IP_ADDRESS", +"CUSTOM_LOGIN_URL_HAS_UNRESERVED_IP_ADDRESS", +"DUPLICATE_SCAN_NAME", +"INVALID_FIELD_VALUE", +"FAILED_TO_AUTHENTICATE_TO_TARGET", +"FINDING_TYPE_UNSPECIFIED", +"FORBIDDEN_TO_SCAN_COMPUTE", +"FORBIDDEN_UPDATE_TO_MANAGED_SCAN", +"MALFORMED_FILTER", +"MALFORMED_RESOURCE_NAME", +"PROJECT_INACTIVE", +"REQUIRED_FIELD", +"RESOURCE_NAME_INCONSISTENT", +"SCAN_ALREADY_RUNNING", +"SCAN_NOT_RUNNING", +"SEED_URL_DOES_NOT_BELONG_TO_CURRENT_PROJECT", +"SEED_URL_MALFORMED", +"SEED_URL_MAPPED_TO_NON_ROUTABLE_ADDRESS", +"SEED_URL_MAPPED_TO_UNRESERVED_ADDRESS", +"SEED_URL_HAS_NON_ROUTABLE_IP_ADDRESS", +"SEED_URL_HAS_UNRESERVED_IP_ADDRESS", +"SERVICE_ACCOUNT_NOT_CONFIGURED", +"TOO_MANY_SCANS", +"UNABLE_TO_RESOLVE_PROJECT_INFO", +"UNSUPPORTED_BLACKLIST_PATTERN_FORMAT", +"UNSUPPORTED_FILTER", +"UNSUPPORTED_FINDING_TYPE", +"UNSUPPORTED_URL_SCHEME", +"CLOUD_ASSET_INVENTORY_ASSET_NOT_FOUND" +], +"enumDescriptions": [ +"There is no error.", +"There is no error.", +"Indicates an internal server error. Please DO NOT USE THIS ERROR CODE unless the root cause is truly unknown.", +"One of the seed URLs is an App Engine URL but we cannot validate the scan settings due to an App Engine API backend error.", +"One of the seed URLs is an App Engine URL but we cannot access the App Engine API to validate scan settings.", +"One of the seed URLs is an App Engine URL but the Default Host of the App Engine is not set.", +"Google corporate accounts can not be used for scanning.", +"The account of the scan creator can not be used for scanning.", +"This scan targets Compute Engine, but we cannot validate scan settings due to a Compute Engine API backend error.", +"This scan targets Compute Engine, but we cannot access the Compute Engine API to validate the scan settings.", +"The Custom Login URL does not belong to the current project.", +"The Custom Login URL is malformed (can not be parsed).", +"The Custom Login URL is mapped to a non-routable IP address in DNS.", +"The Custom Login URL is mapped to an IP address which is not reserved for the current project.", +"The Custom Login URL has a non-routable IP address.", +"The Custom Login URL has an IP address which is not reserved for the current project.", +"Another scan with the same name (case-sensitive) already exists.", +"A field is set to an invalid value.", +"There was an error trying to authenticate to the scan target.", +"Finding type value is not specified in the list findings request.", +"Scan targets Compute Engine, yet current project was not whitelisted for Google Compute Engine Scanning Alpha access.", +"User tries to update managed scan", +"The supplied filter is malformed. For example, it can not be parsed, does not have a filter type in expression, or the same filter type appears more than once.", +"The supplied resource name is malformed (can not be parsed).", +"The current project is not in an active state.", +"A required field is not set.", +"Project id, scanconfig id, scanrun id, or finding id are not consistent with each other in resource name.", +"The scan being requested to start is already running.", +"The scan that was requested to be stopped is not running.", +"One of the seed URLs does not belong to the current project.", +"One of the seed URLs is malformed (can not be parsed).", +"One of the seed URLs is mapped to a non-routable IP address in DNS.", +"One of the seed URLs is mapped to an IP address which is not reserved for the current project.", +"One of the seed URLs has on-routable IP address.", +"One of the seed URLs has an IP address that is not reserved for the current project.", +"The Web Security Scanner service account is not configured under the project.", +"A project has reached the maximum number of scans.", +"Resolving the details of the current project fails.", +"One or more blacklist patterns were in the wrong format.", +"The supplied filter is not supported.", +"The supplied finding type is not supported. For example, we do not provide findings of the given finding type.", +"The URL scheme of one or more of the supplied URLs is not supported.", +"CAI is not able to list assets." +], +"type": "string" +}, +"fieldName": { +"description": "Indicates the full name of the ScanConfig field that triggers this error, for example \"scan_config.max_qps\". This field is provided for troubleshooting purposes only and its actual value can change in the future.", +"type": "string" +} +}, +"type": "object" +}, +"ScanRun": { +"description": "A ScanRun is a output-only resource representing an actual run of the scan. Next id: 12", +"id": "ScanRun", +"properties": { +"endTime": { +"description": "The time at which the ScanRun reached termination state - that the ScanRun is either finished or stopped by user.", +"format": "google-datetime", +"type": "string" +}, +"errorTrace": { +"$ref": "ScanRunErrorTrace", +"description": "If result_state is an ERROR, this field provides the primary reason for scan's termination and more details, if such are available." +}, +"executionState": { +"description": "The execution state of the ScanRun.", +"enum": [ +"EXECUTION_STATE_UNSPECIFIED", +"QUEUED", +"SCANNING", +"FINISHED" +], +"enumDescriptions": [ +"Represents an invalid state caused by internal server error. This value should never be returned.", +"The scan is waiting in the queue.", +"The scan is in progress.", +"The scan is either finished or stopped by user." +], +"type": "string" +}, +"hasVulnerabilities": { +"description": "Whether the scan run has found any vulnerabilities.", +"type": "boolean" +}, +"name": { +"description": "The resource name of the ScanRun. The name follows the format of 'projects/{projectId}/scanConfigs/{scanConfigId}/scanRuns/{scanRunId}'. The ScanRun IDs are generated by the system.", +"type": "string" +}, +"progressPercent": { +"description": "The percentage of total completion ranging from 0 to 100. If the scan is in queue, the value is 0. If the scan is running, the value ranges from 0 to 100. If the scan is finished, the value is 100.", +"format": "int32", +"type": "integer" +}, +"resultState": { +"description": "The result state of the ScanRun. This field is only available after the execution state reaches \"FINISHED\".", +"enum": [ +"RESULT_STATE_UNSPECIFIED", +"SUCCESS", +"ERROR", +"KILLED" +], +"enumDescriptions": [ +"Default value. This value is returned when the ScanRun is not yet finished.", +"The scan finished without errors.", +"The scan finished with errors.", +"The scan was terminated by user." +], +"type": "string" +}, +"startTime": { +"description": "The time at which the ScanRun started.", +"format": "google-datetime", +"type": "string" +}, +"urlsCrawledCount": { +"description": "The number of URLs crawled during this ScanRun. If the scan is in progress, the value represents the number of URLs crawled up to now.", +"format": "int64", +"type": "string" +}, +"urlsTestedCount": { +"description": "The number of URLs tested during this ScanRun. If the scan is in progress, the value represents the number of URLs tested up to now. The number of URLs tested is usually larger than the number URLS crawled because typically a crawled URL is tested with multiple test payloads.", +"format": "int64", +"type": "string" +}, +"warningTraces": { +"description": "A list of warnings, if such are encountered during this scan run.", +"items": { +"$ref": "ScanRunWarningTrace" +}, +"type": "array" +} +}, +"type": "object" +}, +"ScanRunErrorTrace": { +"description": "Output only. Defines an error trace message for a ScanRun.", +"id": "ScanRunErrorTrace", +"properties": { +"code": { +"description": "Indicates the error reason code.", +"enum": [ +"CODE_UNSPECIFIED", +"INTERNAL_ERROR", +"SCAN_CONFIG_ISSUE", +"AUTHENTICATION_CONFIG_ISSUE", +"TIMED_OUT_WHILE_SCANNING", +"TOO_MANY_REDIRECTS", +"TOO_MANY_HTTP_ERRORS", +"STARTING_URLS_CRAWL_HTTP_ERRORS" +], +"enumDescriptions": [ +"Default value is never used.", +"Indicates that the scan run failed due to an internal server error.", +"Indicates a scan configuration error, usually due to outdated ScanConfig settings, such as starting_urls or the DNS configuration.", +"Indicates an authentication error, usually due to outdated ScanConfig authentication settings.", +"Indicates a scan operation timeout, usually caused by a very large site.", +"Indicates that a scan encountered excessive redirects, either to authentication or some other page outside of the scan scope.", +"Indicates that a scan encountered numerous errors from the web site pages. When available, most_common_http_error_code field indicates the most common HTTP error code encountered during the scan.", +"Indicates that some of the starting web urls returned HTTP errors during the scan." +], +"type": "string" +}, +"mostCommonHttpErrorCode": { +"description": "If the scan encounters TOO_MANY_HTTP_ERRORS, this field indicates the most common HTTP error code, if such is available. For example, if this code is 404, the scan has encountered too many NOT_FOUND responses.", +"format": "int32", +"type": "integer" +}, +"scanConfigError": { +"$ref": "ScanConfigError", +"description": "If the scan encounters SCAN_CONFIG_ISSUE error, this field has the error message encountered during scan configuration validation that is performed before each scan run." +} +}, +"type": "object" +}, +"ScanRunWarningTrace": { +"description": "Output only. Defines a warning trace message for ScanRun. Warning traces provide customers with useful information that helps make the scanning process more effective.", +"id": "ScanRunWarningTrace", +"properties": { +"code": { +"description": "Indicates the warning code.", +"enum": [ +"CODE_UNSPECIFIED", +"INSUFFICIENT_CRAWL_RESULTS", +"TOO_MANY_CRAWL_RESULTS", +"TOO_MANY_FUZZ_TASKS", +"BLOCKED_BY_IAP", +"NO_STARTING_URL_FOUND_FOR_MANAGED_SCAN" +], +"enumDescriptions": [ +"Default value is never used.", +"Indicates that a scan discovered an unexpectedly low number of URLs. This is sometimes caused by complex navigation features or by using a single URL for numerous pages.", +"Indicates that a scan discovered too many URLs to test, or excessive redundant URLs.", +"Indicates that too many tests have been generated for the scan. Customer should try reducing the number of starting URLs, increasing the QPS rate, or narrowing down the scope of the scan using the excluded patterns.", +"Indicates that a scan is blocked by IAP.", +"Indicates that no seed is found for a scan" +], +"type": "string" +} +}, +"type": "object" +}, +"Schedule": { +"description": "Scan schedule configuration.", +"id": "Schedule", +"properties": { +"intervalDurationDays": { +"description": "Required. The duration of time between executions in days.", +"format": "int32", +"type": "integer" +}, +"scheduleTime": { +"description": "A timestamp indicates when the next run will be scheduled. The value is refreshed by the server after each run. If unspecified, it will default to current server time, which means the scan will be scheduled to start immediately.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"StartScanRunRequest": { +"description": "Request for the `StartScanRun` method.", +"id": "StartScanRunRequest", +"properties": {}, +"type": "object" +}, +"StopScanRunRequest": { +"description": "Request for the `StopScanRun` method.", +"id": "StopScanRunRequest", +"properties": {}, +"type": "object" +}, +"ViolatingResource": { +"description": "Information regarding any resource causing the vulnerability such as JavaScript sources, image, audio files, etc.", +"id": "ViolatingResource", +"properties": { +"contentType": { +"description": "The MIME type of this resource.", +"type": "string" +}, +"resourceUrl": { +"description": "URL of this violating resource.", +"type": "string" +} +}, +"type": "object" +}, +"VulnerableHeaders": { +"description": "Information about vulnerable or missing HTTP Headers.", +"id": "VulnerableHeaders", +"properties": { +"headers": { +"description": "List of vulnerable headers.", +"items": { +"$ref": "Header" +}, +"type": "array" +}, +"missingHeaders": { +"description": "List of missing headers.", +"items": { +"$ref": "Header" +}, +"type": "array" +} +}, +"type": "object" +}, +"VulnerableParameters": { +"description": "Information about vulnerable request parameters.", +"id": "VulnerableParameters", +"properties": { +"parameterNames": { +"description": "The vulnerable parameter names.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Xss": { +"description": "Information reported for an XSS.", +"id": "Xss", +"properties": { +"errorMessage": { +"description": "An error message generated by a javascript breakage.", +"type": "string" +}, +"stackTraces": { +"description": "Stack traces leading to the point where the XSS occurred.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Xxe": { +"description": "Information reported for an XXE.", +"id": "Xxe", +"properties": { +"payloadLocation": { +"description": "Location within the request where the payload was placed.", +"enum": [ +"LOCATION_UNSPECIFIED", +"COMPLETE_REQUEST_BODY" +], +"enumDescriptions": [ +"Unknown Location.", +"The XML payload replaced the complete request body." +], +"type": "string" +}, +"payloadValue": { +"description": "The XML string that triggered the XXE vulnerability. Non-payload values might be redacted.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Web Security Scanner API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflowexecutions.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflowexecutions.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..a80c65c136044a28fa53c91f91e47ad5ea1e25ce --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflowexecutions.v1.json @@ -0,0 +1,1070 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://workflowexecutions.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Workflow Executions", +"description": "Execute workflows created with Workflows API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/workflows", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workflowexecutions:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workflowexecutions.mtls.googleapis.com/", +"name": "workflowexecutions", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"workflows": { +"methods": { +"triggerPubsubExecution": { +"description": "Triggers a new execution using the latest revision of the given workflow by a Pub/Sub push notification.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:triggerPubsubExecution", +"httpMethod": "POST", +"id": "workflowexecutions.projects.locations.workflows.triggerPubsubExecution", +"parameterOrder": [ +"workflow" +], +"parameters": { +"workflow": { +"description": "Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+workflow}:triggerPubsubExecution", +"request": { +"$ref": "TriggerPubsubExecutionRequest" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"executions": { +"methods": { +"cancel": { +"description": "Cancels an execution of the given name.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:cancel", +"httpMethod": "POST", +"id": "workflowexecutions.projects.locations.workflows.executions.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelExecutionRequest" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new execution using the latest revision of the given workflow. For more information, see Execute a workflow.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions", +"httpMethod": "POST", +"id": "workflowexecutions.projects.locations.workflows.executions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/executions", +"request": { +"$ref": "Execution" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"exportData": { +"description": "Returns all metadata stored about an execution, excluding most data that is already accessible using other API methods.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:exportData", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.exportData", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the execution for which data is to be exported. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:exportData", +"response": { +"$ref": "ExportDataResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns an execution of the given name.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. A view defining which fields should be filled in the returned execution. The API will default to the FULL view.", +"enum": [ +"EXECUTION_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value.", +"Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.", +"Includes all data." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filters applied to the `[Executions.ListExecutions]` results. The following fields are supported for filtering: `executionId`, `state`, `createTime`, `startTime`, `endTime`, `duration`, `workflowRevisionId`, `stepName`, and `label`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `startTime>\"2023-08-01\" AND state=\"FAILED\"`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Comma-separated list of fields that specify the ordering applied to the `[Executions.ListExecutions]` results. By default the ordering is based on descending `createTime`. The following fields are supported for ordering: `executionId`, `state`, `createTime`, `startTime`, `endTime`, `duration`, and `workflowRevisionId`. For details, see AIP-132.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of executions to return per call. Max supported value depends on the selected Execution view: it's 1000 for BASIC and 100 for FULL. The default value used if the field is not specified is 100, regardless of the selected view. Values greater than the max value will be coerced down to it.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListExecutions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExecutions` must match the call that provided the page token. Note that pagination is applied to dynamic data. The list of executions returned can change between page requests.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. A view defining which fields should be filled in the returned executions. The API will default to the BASIC view.", +"enum": [ +"EXECUTION_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value.", +"Includes only basic metadata about the execution. The following fields are returned: name, start_time, end_time, duration, state, and workflow_revision_id.", +"Includes all data." +], +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/executions", +"response": { +"$ref": "ListExecutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"callbacks": { +"methods": { +"list": { +"description": "Returns a list of active callbacks that belong to the execution with the given name. The returned callbacks are ordered by callback ID.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}/callbacks", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.callbacks.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of callbacks to return per call. The default value is 100 and is also the maximum value.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListCallbacks` call. Provide this to retrieve the subsequent page. Note that pagination is applied to dynamic data. The list of callbacks returned can change between page requests if callbacks are created or deleted.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the execution for which the callbacks should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/callbacks", +"response": { +"$ref": "ListCallbacksResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"stepEntries": { +"methods": { +"get": { +"description": "Gets a step entry.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}/stepEntries/{stepEntriesId}", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.stepEntries.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The name of the step entry to retrieve. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/{step_entry}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+/stepEntries/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "StepEntry" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists step entries for the corresponding workflow execution. Returned entries are ordered by their create_time.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}/stepEntries", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.stepEntries.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Optional. Filters applied to the `[StepEntries.ListStepEntries]` results. The following fields are supported for filtering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `state`. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime>\"2023-08-01\" AND state=\"FAILED\"`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Optional. Comma-separated list of fields that specify the ordering applied to the `[StepEntries.ListStepEntries]` results. By default the ordering is based on ascending `entryId`. The following fields are supported for ordering: `entryId`, `createTime`, `updateTime`, `routine`, `step`, `stepType`, `state`. For details, see AIP-132.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. Number of step entries to return per call. The default max is 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous `ListStepEntries` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListStepEntries` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the workflow execution to list entries for. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"skip": { +"description": "Optional. The number of step entries to skip. It can be used with or without a pageToken. If used with a pageToken, then it indicates the number of step entries to skip starting from the requested page.", +"format": "int32", +"location": "query", +"type": "integer" +} +}, +"path": "v1/{+parent}/stepEntries", +"response": { +"$ref": "ListStepEntriesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +} +} +}, +"revision": "20240319", +"rootUrl": "https://workflowexecutions.googleapis.com/", +"schemas": { +"Callback": { +"description": "An instance of a Callback created by an execution.", +"id": "Callback", +"properties": { +"availablePayloads": { +"description": "Output only. The payloads received by the callback that have not been processed by a waiting execution step.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"method": { +"description": "Output only. The method accepted by the callback. For example: GET, POST, PUT.", +"readOnly": true, +"type": "string" +}, +"name": { +"description": "Output only. The resource name of the callback. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/callback/{callback}", +"readOnly": true, +"type": "string" +}, +"waiters": { +"description": "Output only. Number of execution steps waiting on this callback.", +"format": "int64", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"CancelExecutionRequest": { +"description": "Request for the CancelExecution method.", +"id": "CancelExecutionRequest", +"properties": {}, +"type": "object" +}, +"Error": { +"description": "Error describes why the execution was abnormally terminated.", +"id": "Error", +"properties": { +"context": { +"description": "Human-readable stack trace string.", +"type": "string" +}, +"payload": { +"description": "Error message and data returned represented as a JSON string.", +"type": "string" +}, +"stackTrace": { +"$ref": "StackTrace", +"description": "Stack trace with detailed information of where error was generated." +} +}, +"type": "object" +}, +"Exception": { +"description": "Exception describes why the step entry failed.", +"id": "Exception", +"properties": { +"payload": { +"description": "Error message represented as a JSON string.", +"type": "string" +} +}, +"type": "object" +}, +"Execution": { +"description": "A running instance of a [Workflow](/workflows/docs/reference/rest/v1/projects.locations.workflows).", +"id": "Execution", +"properties": { +"argument": { +"description": "Input parameters of the execution represented as a JSON string. The size limit is 32KB. *Note*: If you are using the REST API directly to run your workflow, you must escape any JSON string value of `argument`. Example: `'{\"argument\":\"{\\\"firstName\\\":\\\"FIRST\\\",\\\"lastName\\\":\\\"LAST\\\"}\"}'`", +"type": "string" +}, +"callLogLevel": { +"description": "The call logging level associated to this execution.", +"enum": [ +"CALL_LOG_LEVEL_UNSPECIFIED", +"LOG_ALL_CALLS", +"LOG_ERRORS_ONLY", +"LOG_NONE" +], +"enumDescriptions": [ +"No call logging level specified.", +"Log all call steps within workflows, all call returns, and all exceptions raised.", +"Log only exceptions that are raised from call steps within workflows.", +"Explicitly log nothing." +], +"type": "string" +}, +"createTime": { +"description": "Output only. Marks the creation of the execution.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"disableConcurrencyQuotaOverflowBuffering": { +"description": "Optional. If set to true, the execution will not be backlogged when the concurrency quota is exhausted. The backlog execution starts when the concurrency quota becomes available.", +"type": "boolean" +}, +"duration": { +"description": "Output only. Measures the duration of the execution.", +"format": "google-duration", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Marks the end of execution, successful or not.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Error", +"description": "Output only. The error which caused the execution to finish prematurely. The value is only present if the execution's state is `FAILED` or `CANCELLED`.", +"readOnly": true +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels associated with this execution. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. By default, labels are inherited from the workflow but are overridden by any labels associated with the execution.", +"type": "object" +}, +"name": { +"description": "Output only. The resource name of the execution. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"readOnly": true, +"type": "string" +}, +"result": { +"description": "Output only. Output of the execution represented as a JSON string. The value can only be present if the execution's state is `SUCCEEDED`.", +"readOnly": true, +"type": "string" +}, +"startTime": { +"description": "Output only. Marks the beginning of execution.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. Current state of the execution.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"SUCCEEDED", +"FAILED", +"CANCELLED", +"UNAVAILABLE", +"QUEUED" +], +"enumDescriptions": [ +"Invalid state.", +"The execution is in progress.", +"The execution finished successfully.", +"The execution failed with an error.", +"The execution was stopped intentionally.", +"Execution data is unavailable. See the `state_error` field.", +"Request has been placed in the backlog for processing at a later time." +], +"readOnly": true, +"type": "string" +}, +"stateError": { +"$ref": "StateError", +"description": "Output only. Error regarding the state of the Execution resource. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions.", +"readOnly": true +}, +"status": { +"$ref": "Status", +"description": "Output only. Status tracks the current steps and progress data of this execution.", +"readOnly": true +}, +"workflowRevisionId": { +"description": "Output only. Revision of the workflow this execution is using.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExportDataResponse": { +"description": "Response for the ExportData method.", +"id": "ExportDataResponse", +"properties": { +"data": { +"description": "The JSON string with customer data and metadata for an execution with the given name", +"type": "string" +} +}, +"type": "object" +}, +"ListCallbacksResponse": { +"description": "RPC response object for the ListCallbacks method.", +"id": "ListCallbacksResponse", +"properties": { +"callbacks": { +"description": "The callbacks which match the request.", +"items": { +"$ref": "Callback" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListExecutionsResponse": { +"description": "Response for the ListExecutions method.", +"id": "ListExecutionsResponse", +"properties": { +"executions": { +"description": "The executions which match the request.", +"items": { +"$ref": "Execution" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListStepEntriesResponse": { +"description": "Response message for ExecutionHistory.ListStepEntries.", +"id": "ListStepEntriesResponse", +"properties": { +"nextPageToken": { +"description": "A token to retrieve next page of results. Pass this value in the ListStepEntriesRequest.page_token field in the subsequent call to `ListStepEntries` method to retrieve the next page of results.", +"type": "string" +}, +"stepEntries": { +"description": "The list of entries.", +"items": { +"$ref": "StepEntry" +}, +"type": "array" +}, +"totalSize": { +"description": "Indicates the total number of StepEntries that matched the request filter. For running executions, this number shows the number of StepEntries that are executed thus far.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"NavigationInfo": { +"description": "NavigationInfo describes what steps if any come before or after this step, or what steps are parents or children of this step.", +"id": "NavigationInfo", +"properties": { +"children": { +"description": "Step entries that can be reached by \"stepping into\" e.g. a subworkflow call.", +"items": { +"format": "int64", +"type": "string" +}, +"type": "array" +}, +"next": { +"description": "The index of the next step in the current workflow, if any.", +"format": "int64", +"type": "string" +}, +"parent": { +"description": "The step entry, if any, that can be reached by \"stepping out\" of the current workflow being executed.", +"format": "int64", +"type": "string" +}, +"previous": { +"description": "The index of the previous step in the current workflow, if any.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"Position": { +"description": "Position contains source position information about the stack trace element such as line number, column number and length of the code block in bytes.", +"id": "Position", +"properties": { +"column": { +"description": "The source code column position (of the line) the current instruction was generated from.", +"format": "int64", +"type": "string" +}, +"length": { +"description": "The number of bytes of source code making up this stack trace element.", +"format": "int64", +"type": "string" +}, +"line": { +"description": "The source code line number the current instruction was generated from.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"PubsubMessage": { +"description": "A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding [client library documentation](https://cloud.google.com/pubsub/docs/reference/libraries) for more information. See [quotas and limits] (https://cloud.google.com/pubsub/quotas) for more information about message limits.", +"id": "PubsubMessage", +"properties": { +"attributes": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.", +"type": "object" +}, +"data": { +"description": "Optional. The message data field. If this field is empty, the message must contain at least one attribute.", +"format": "byte", +"type": "string" +}, +"messageId": { +"description": "ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a `PubsubMessage` via a `Pull` call or a push delivery. It must not be populated by the publisher in a `Publish` call.", +"type": "string" +}, +"orderingKey": { +"description": "Optional. If non-empty, identifies related messages for which publish order should be respected. If a `Subscription` has `enable_message_ordering` set to `true`, messages published with the same non-empty `ordering_key` value will be delivered to subscribers in the order in which they are received by the Pub/Sub system. All `PubsubMessage`s published in a given `PublishRequest` must specify the same `ordering_key` value. For more information, see [ordering messages](https://cloud.google.com/pubsub/docs/ordering).", +"type": "string" +}, +"publishTime": { +"description": "The time at which the message was published, populated by the server when it receives the `Publish` call. It must not be populated by the publisher in a `Publish` call.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"StackTrace": { +"description": "A collection of stack elements (frames) where an error occurred.", +"id": "StackTrace", +"properties": { +"elements": { +"description": "An array of stack elements.", +"items": { +"$ref": "StackTraceElement" +}, +"type": "array" +} +}, +"type": "object" +}, +"StackTraceElement": { +"description": "A single stack element (frame) where an error occurred.", +"id": "StackTraceElement", +"properties": { +"position": { +"$ref": "Position", +"description": "The source position information of the stack trace element." +}, +"routine": { +"description": "The routine where the error occurred.", +"type": "string" +}, +"step": { +"description": "The step the error occurred at.", +"type": "string" +} +}, +"type": "object" +}, +"StateError": { +"description": "Describes an error related to the current state of the Execution resource.", +"id": "StateError", +"properties": { +"details": { +"description": "Provides specifics about the error.", +"type": "string" +}, +"type": { +"description": "The type of this state error.", +"enum": [ +"TYPE_UNSPECIFIED", +"KMS_ERROR" +], +"enumDescriptions": [ +"No type specified.", +"Caused by an issue with KMS." +], +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "Represents the current status of this execution.", +"id": "Status", +"properties": { +"currentSteps": { +"description": "A list of currently executing or last executed step names for the workflow execution currently running. If the workflow has succeeded or failed, this is the last attempted or executed step. Presently, if the current step is inside a subworkflow, the list only includes that step. In the future, the list will contain items for each step in the call stack, starting with the outermost step in the `main` subworkflow, and ending with the most deeply nested step.", +"items": { +"$ref": "Step" +}, +"type": "array" +} +}, +"type": "object" +}, +"Step": { +"description": "Represents a step of the workflow this execution is running.", +"id": "Step", +"properties": { +"routine": { +"description": "Name of a routine within the workflow.", +"type": "string" +}, +"step": { +"description": "Name of a step within the routine.", +"type": "string" +} +}, +"type": "object" +}, +"StepEntry": { +"description": "An StepEntry contains debugging information for a step transition in a workflow execution.", +"id": "StepEntry", +"properties": { +"createTime": { +"description": "Output only. The creation time of the step entry.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"entryId": { +"description": "Output only. The numeric ID of this step entry, used for navigation.", +"format": "int64", +"readOnly": true, +"type": "string" +}, +"exception": { +"$ref": "Exception", +"description": "Output only. The exception thrown by the step entry.", +"readOnly": true +}, +"name": { +"description": "Output only. The full resource name of the step entry. Each step entry has a unique entry ID, which is a monotonically increasing counter. Step entry names have the format: `projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}/stepEntries/{step_entry}`.", +"readOnly": true, +"type": "string" +}, +"navigationInfo": { +"$ref": "NavigationInfo", +"description": "Output only. The NavigationInfo associated to this step.", +"readOnly": true +}, +"routine": { +"description": "Output only. The name of the routine this step entry belongs to. A routine name is the subworkflow name defined in the YAML source code. The top level routine name is `main`.", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. The state of the step entry.", +"enum": [ +"STATE_UNSPECIFIED", +"STATE_IN_PROGRESS", +"STATE_SUCCEEDED", +"STATE_FAILED" +], +"enumDescriptions": [ +"Invalid state.", +"The step entry is in progress.", +"The step entry finished successfully.", +"The step entry failed with an error." +], +"readOnly": true, +"type": "string" +}, +"step": { +"description": "Output only. The name of the step this step entry belongs to.", +"readOnly": true, +"type": "string" +}, +"stepEntryMetadata": { +"$ref": "StepEntryMetadata", +"description": "Output only. The StepEntryMetadata associated to this step.", +"readOnly": true +}, +"stepType": { +"description": "Output only. The type of the step this step entry belongs to.", +"enum": [ +"STEP_TYPE_UNSPECIFIED", +"STEP_ASSIGN", +"STEP_STD_LIB_CALL", +"STEP_CONNECTOR_CALL", +"STEP_SUBWORKFLOW_CALL", +"STEP_CALL", +"STEP_SWITCH", +"STEP_CONDITION", +"STEP_FOR", +"STEP_FOR_ITERATION", +"STEP_PARALLEL_FOR", +"STEP_PARALLEL_BRANCH", +"STEP_PARALLEL_BRANCH_ENTRY", +"STEP_TRY_RETRY_EXCEPT", +"STEP_TRY", +"STEP_RETRY", +"STEP_EXCEPT", +"STEP_RETURN", +"STEP_RAISE", +"STEP_GOTO" +], +"enumDescriptions": [ +"Invalid step type.", +"The step entry assigns new variable(s).", +"The step entry calls a standard library routine.", +"The step entry calls a connector.", +"The step entry calls a subworklfow.", +"The step entry calls a subworkflow/stdlib.", +"The step entry executes a switch-case block.", +"The step entry executes a condition inside a switch.", +"The step entry executes a for loop.", +"The step entry executes a iteration of a for loop.", +"The step entry executes a parallel for loop.", +"The step entry executes a series of parallel branch(es).", +"The step entry executes a branch of a parallel branch.", +"The step entry executes a try/retry/except block.", +"The step entry executes the try part of a try/retry/except block.", +"The step entry executes the retry part of a try/retry/except block.", +"The step entry executes the except part of a try/retry/except block.", +"The step entry returns.", +"The step entry raises an error.", +"The step entry jumps to another step." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The most recently updated time of the step entry.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"StepEntryMetadata": { +"description": "StepEntryMetadata contains metadata information about this step.", +"id": "StepEntryMetadata", +"properties": { +"progressNumber": { +"description": "Progress number represents the current state of the current progress. eg: A step entry represents the 4th iteration in a progress of PROGRESS_TYPE_FOR.", +"format": "int64", +"type": "string" +}, +"progressType": { +"description": "Progress type of this step entry.", +"enum": [ +"PROGRESS_TYPE_UNSPECIFIED", +"PROGRESS_TYPE_FOR", +"PROGRESS_TYPE_SWITCH", +"PROGRESS_TYPE_RETRY", +"PROGRESS_TYPE_PARALLEL_FOR", +"PROGRESS_TYPE_PARALLEL_BRANCH" +], +"enumDescriptions": [ +"Current step entry does not have any progress data.", +"Current step entry is in progress of a FOR step.", +"Current step entry is in progress of a SWITCH step.", +"Current step entry is in progress of a RETRY step.", +"Current step entry is in progress of a PARALLEL FOR step.", +"Current step entry is in progress of a PARALLEL BRANCH step." +], +"type": "string" +}, +"threadId": { +"description": "Child thread id that this step entry belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"TriggerPubsubExecutionRequest": { +"description": "Request for the TriggerPubsubExecution method.", +"id": "TriggerPubsubExecutionRequest", +"properties": { +"GCPCloudEventsMode": { +"description": "Required. LINT: LEGACY_NAMES The query parameter value for __GCP_CloudEventsMode, set by the Eventarc service when configuring triggers.", +"type": "string" +}, +"deliveryAttempt": { +"description": "The number of attempts that have been made to deliver this message. This is set by Pub/Sub for subscriptions that have the \"dead letter\" feature enabled, and hence provided here for compatibility, but is ignored by Workflows.", +"format": "int32", +"type": "integer" +}, +"message": { +"$ref": "PubsubMessage", +"description": "Required. The message of the Pub/Sub push notification." +}, +"subscription": { +"description": "Required. The subscription of the Pub/Sub push notification. Format: projects/{project}/subscriptions/{sub}", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Workflow Executions API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflowexecutions.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflowexecutions.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..4969500923eba8aa3b91eb9ec536e4b10d9afbda --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflowexecutions.v1beta.json @@ -0,0 +1,492 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://workflowexecutions.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Workflow Executions", +"description": "Execute workflows created with Workflows API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/workflows", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workflowexecutions:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workflowexecutions.mtls.googleapis.com/", +"name": "workflowexecutions", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"workflows": { +"resources": { +"executions": { +"methods": { +"cancel": { +"description": "Cancels an execution of the given name.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}:cancel", +"httpMethod": "POST", +"id": "workflowexecutions.projects.locations.workflows.executions.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the execution to be cancelled. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:cancel", +"request": { +"$ref": "CancelExecutionRequest" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"create": { +"description": "Creates a new execution using the latest revision of the given workflow.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions", +"httpMethod": "POST", +"id": "workflowexecutions.projects.locations.workflows.executions.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Name of the workflow for which an execution should be created. Format: projects/{project}/locations/{location}/workflows/{workflow} The latest revision of the workflow will be used.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/executions", +"request": { +"$ref": "Execution" +}, +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns an execution of the given name.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions/{executionsId}", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the execution to be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. A view defining which fields should be filled in the returned execution. The API will default to the FULL view.", +"enum": [ +"EXECUTION_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value.", +"Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, state and workflow_revision_id.", +"Includes all data." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns a list of executions which belong to the workflow with the given name. The method returns executions of all workflow revisions. Returned executions are ordered by their start time (newest first).", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}/executions", +"httpMethod": "GET", +"id": "workflowexecutions.projects.locations.workflows.executions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Maximum number of executions to return per call. Max supported value depends on the selected Execution view: it's 10000 for BASIC and 100 for FULL. The default value used if the field is not specified is 100, regardless of the selected view. Values greater than the max value will be coerced down to it.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListExecutions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListExecutions` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Name of the workflow for which the executions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +}, +"view": { +"description": "Optional. A view defining which fields should be filled in the returned executions. The API will default to the BASIC view.", +"enum": [ +"EXECUTION_VIEW_UNSPECIFIED", +"BASIC", +"FULL" +], +"enumDescriptions": [ +"The default / unset value.", +"Includes only basic metadata about the execution. Following fields are returned: name, start_time, end_time, state and workflow_revision_id.", +"Includes all data." +], +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+parent}/executions", +"response": { +"$ref": "ListExecutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +}, +"revision": "20240319", +"rootUrl": "https://workflowexecutions.googleapis.com/", +"schemas": { +"CancelExecutionRequest": { +"description": "Request for the CancelExecution method.", +"id": "CancelExecutionRequest", +"properties": {}, +"type": "object" +}, +"Error": { +"description": "Error describes why the execution was abnormally terminated.", +"id": "Error", +"properties": { +"context": { +"description": "Human-readable stack trace string.", +"type": "string" +}, +"payload": { +"description": "Error message and data returned represented as a JSON string.", +"type": "string" +}, +"stackTrace": { +"$ref": "StackTrace", +"description": "Stack trace with detailed information of where error was generated." +} +}, +"type": "object" +}, +"Execution": { +"description": "A running instance of a [Workflow](/workflows/docs/reference/rest/v1beta/projects.locations.workflows).", +"id": "Execution", +"properties": { +"argument": { +"description": "Input parameters of the execution represented as a JSON string. The size limit is 32KB. *Note*: If you are using the REST API directly to run your workflow, you must escape any JSON string value of `argument`. Example: `'{\"argument\":\"{\\\"firstName\\\":\\\"FIRST\\\",\\\"lastName\\\":\\\"LAST\\\"}\"}'`", +"type": "string" +}, +"callLogLevel": { +"description": "The call logging level associated to this execution.", +"enum": [ +"CALL_LOG_LEVEL_UNSPECIFIED", +"LOG_ALL_CALLS", +"LOG_ERRORS_ONLY" +], +"enumDescriptions": [ +"No call logging level specified.", +"Log all call steps within workflows, all call returns, and all exceptions raised.", +"Log only exceptions that are raised from call steps within workflows." +], +"type": "string" +}, +"endTime": { +"description": "Output only. Marks the end of execution, successful or not.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"error": { +"$ref": "Error", +"description": "Output only. The error which caused the execution to finish prematurely. The value is only present if the execution's state is `FAILED` or `CANCELLED`.", +"readOnly": true +}, +"name": { +"description": "Output only. The resource name of the execution. Format: projects/{project}/locations/{location}/workflows/{workflow}/executions/{execution}", +"readOnly": true, +"type": "string" +}, +"result": { +"description": "Output only. Output of the execution represented as a JSON string. The value can only be present if the execution's state is `SUCCEEDED`.", +"readOnly": true, +"type": "string" +}, +"startTime": { +"description": "Output only. Marks the beginning of execution.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. Current state of the execution.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"SUCCEEDED", +"FAILED", +"CANCELLED", +"UNAVAILABLE", +"QUEUED" +], +"enumDescriptions": [ +"Invalid state.", +"The execution is in progress.", +"The execution finished successfully.", +"The execution failed with an error.", +"The execution was stopped intentionally.", +"Reserved for future use.", +"Request has been placed in the backlog for processing at a later time." +], +"readOnly": true, +"type": "string" +}, +"status": { +"$ref": "Status", +"description": "Output only. Status tracks the current steps and progress data of this execution.", +"readOnly": true +}, +"workflowRevisionId": { +"description": "Output only. Revision of the workflow this execution is using.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ListExecutionsResponse": { +"description": "Response for the ListExecutions method.", +"id": "ListExecutionsResponse", +"properties": { +"executions": { +"description": "The executions which match the request.", +"items": { +"$ref": "Execution" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"Position": { +"description": "Position contains source position information about the stack trace element such as line number, column number and length of the code block in bytes.", +"id": "Position", +"properties": { +"column": { +"description": "The source code column position (of the line) the current instruction was generated from.", +"format": "int64", +"type": "string" +}, +"length": { +"description": "The number of bytes of source code making up this stack trace element.", +"format": "int64", +"type": "string" +}, +"line": { +"description": "The source code line number the current instruction was generated from.", +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"StackTrace": { +"description": "A collection of stack elements (frames) where an error occurred.", +"id": "StackTrace", +"properties": { +"elements": { +"description": "An array of stack elements.", +"items": { +"$ref": "StackTraceElement" +}, +"type": "array" +} +}, +"type": "object" +}, +"StackTraceElement": { +"description": "A single stack element (frame) where an error occurred.", +"id": "StackTraceElement", +"properties": { +"position": { +"$ref": "Position", +"description": "The source position information of the stack trace element." +}, +"routine": { +"description": "The routine where the error occurred.", +"type": "string" +}, +"step": { +"description": "The step the error occurred at.", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "Represents the current status of this execution.", +"id": "Status", +"properties": { +"currentSteps": { +"description": "A list of currently executing or last executed step names for the workflow execution currently running. If the workflow has succeeded or failed, this is the last attempted or executed step. Presently, if the current step is inside a subworkflow, the list only includes that step. In the future, the list will contain items for each step in the call stack, starting with the outermost step in the `main` subworkflow, and ending with the most deeply nested step.", +"items": { +"$ref": "Step" +}, +"type": "array" +} +}, +"type": "object" +}, +"Step": { +"description": "Represents a step of the workflow this execution is running.", +"id": "Step", +"properties": { +"routine": { +"description": "Name of a routine within the workflow.", +"type": "string" +}, +"step": { +"description": "Name of a step within the routine.", +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Workflow Executions API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflows.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflows.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..12365d253bbd15ee4ce0edb3fcc89f64c2bfef77 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflows.v1.json @@ -0,0 +1,829 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://workflows.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Workflows", +"description": "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/workflows", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workflows:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workflows.mtls.googleapis.com/", +"name": "workflows", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "workflows.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "workflows.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "workflows.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "workflows.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "workflows.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"workflows": { +"methods": { +"create": { +"description": "Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation returns a ALREADY_EXISTS error.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows", +"httpMethod": "POST", +"id": "workflows.projects.locations.workflows.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project and location in which the workflow should be created. Format: projects/{project}/locations/{location}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"workflowId": { +"description": "Required. The ID of the workflow to be created. It has to fulfill the following requirements: * Must contain only letters, numbers, underscores and hyphens. * Must start with a letter. * Must be between 1-64 characters. * Must end with a number or a letter. * Must be unique within the customer project and location.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/workflows", +"request": { +"$ref": "Workflow" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a workflow with the specified name. This method also cancels and deletes all running executions of the workflow.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", +"httpMethod": "DELETE", +"id": "workflows.projects.locations.workflows.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workflow to be deleted. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single workflow.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", +"httpMethod": "GET", +"id": "workflows.projects.locations.workflows.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workflow for which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +}, +"revisionId": { +"description": "Optional. The revision of the workflow to retrieve. If the revision_id is empty, the latest revision is retrieved. The format is \"000001-a4d\", where the first six characters define the zero-padded decimal revision number. They are followed by a hyphen and three hexadecimal characters.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Workflow" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists workflows in a given project and location. The default order is not specified.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows", +"httpMethod": "GET", +"id": "workflows.projects.locations.workflows.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter to restrict results to specific workflows. For details, see AIP-160. For example, if you are using the Google APIs Explorer: `state=\"SUCCEEDED\"` or `createTime>\"2023-08-01\" AND state=\"FAILED\"`", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Comma-separated list of fields that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a \"desc\" suffix. If not specified, the results are returned in an unspecified order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of workflows to return per call. The service might return fewer than this value even if not at the end of the collection. If a value is not specified, a default value of 500 is used. The maximum permitted value is 1000 and values greater than 1000 are coerced down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListWorkflows` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkflows` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Project and location from which the workflows should be listed. Format: projects/{project}/locations/{location}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/workflows", +"response": { +"$ref": "ListWorkflowsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listRevisions": { +"description": "Lists revisions for a given workflow.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}:listRevisions", +"httpMethod": "GET", +"id": "workflows.projects.locations.workflows.listRevisions", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Workflow for which the revisions should be listed. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of revisions to return per page. If a value is not specified, a default value of 20 is used. The maximum permitted value is 100. Values greater than 100 are coerced down to 100.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The page token, received from a previous ListWorkflowRevisions call. Provide this to retrieve the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}:listRevisions", +"response": { +"$ref": "ListWorkflowRevisionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow might be created as a result of a successful update operation. In that case, the new revision is used in new workflow executions.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", +"httpMethod": "PATCH", +"id": "workflows.projects.locations.workflows.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow}. This is a workflow-wide field and is not tied to a specific revision.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "List of fields to be updated. If not present, the entire workflow will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Workflow" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://workflows.googleapis.com/", +"schemas": { +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkflowRevisionsResponse": { +"description": "Response for the ListWorkflowRevisions method.", +"id": "ListWorkflowRevisionsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"workflows": { +"description": "The revisions of the workflow, ordered in reverse chronological order.", +"items": { +"$ref": "Workflow" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkflowsResponse": { +"description": "Response for the ListWorkflows method.", +"id": "ListWorkflowsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workflows": { +"description": "The workflows that match the request.", +"items": { +"$ref": "Workflow" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version used to start the operation.", +"type": "string" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"target": { +"description": "Server-defined resource path for the target of the operation.", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"StateError": { +"description": "Describes an error related to the current state of the workflow.", +"id": "StateError", +"properties": { +"details": { +"description": "Provides specifics about the error.", +"type": "string" +}, +"type": { +"description": "The type of this state error.", +"enum": [ +"TYPE_UNSPECIFIED", +"KMS_ERROR" +], +"enumDescriptions": [ +"No type specified.", +"Caused by an issue with KMS." +], +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Workflow": { +"description": "Workflow program to be executed by Workflows.", +"id": "Workflow", +"properties": { +"callLogLevel": { +"description": "Optional. Describes the level of platform logging to apply to calls and call responses during executions of this workflow. If both the workflow and the execution specify a logging level, the execution level takes precedence.", +"enum": [ +"CALL_LOG_LEVEL_UNSPECIFIED", +"LOG_ALL_CALLS", +"LOG_ERRORS_ONLY", +"LOG_NONE" +], +"enumDescriptions": [ +"No call logging level specified.", +"Log all call steps within workflows, all call returns, and all exceptions raised.", +"Log only exceptions that are raised from call steps within workflows.", +"Explicitly log nothing." +], +"type": "string" +}, +"createTime": { +"description": "Output only. The timestamp for when the workflow was created. This is a workflow-wide field and is not tied to a specific revision.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"cryptoKeyName": { +"description": "Optional. The resource name of a KMS crypto key used to encrypt or decrypt the data associated with the workflow. Format: projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey} Using `-` as a wildcard for the `{project}` or not providing one at all will infer the project from the account. If not provided, data associated with the workflow will not be CMEK-encrypted.", +"type": "string" +}, +"description": { +"description": "Description of the workflow provided by the user. Must be at most 1000 Unicode characters long. This is a workflow-wide field and is not tied to a specific revision.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels associated with this workflow. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores, and dashes. Label keys must start with a letter. International characters are allowed. This is a workflow-wide field and is not tied to a specific revision.", +"type": "object" +}, +"name": { +"description": "The resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow}. This is a workflow-wide field and is not tied to a specific revision.", +"type": "string" +}, +"revisionCreateTime": { +"description": "Output only. The timestamp for the latest revision of the workflow's creation.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"revisionId": { +"description": "Output only. The revision of the workflow. A new revision of a workflow is created as a result of updating the following properties of a workflow: - Service account - Workflow code to be executed The format is \"000001-a4d\", where the first six characters define the zero-padded revision ordinal number. They are followed by a hyphen and three hexadecimal random characters.", +"readOnly": true, +"type": "string" +}, +"serviceAccount": { +"description": "The service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. Format: projects/{project}/serviceAccounts/{account} or {account} Using `-` as a wildcard for the `{project}` or not providing one at all will infer the project from the account. The `{account}` value can be the `email` address or the `unique_id` of the service account. If not provided, workflow will use the project's default service account. Modifying this field for an existing workflow results in a new workflow revision.", +"type": "string" +}, +"sourceContents": { +"description": "Workflow code to be executed. The size limit is 128KB.", +"type": "string" +}, +"state": { +"description": "Output only. State of the workflow deployment.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"UNAVAILABLE" +], +"enumDescriptions": [ +"Invalid state.", +"The workflow has been deployed successfully and is serving.", +"Workflow data is unavailable. See the `state_error` field." +], +"readOnly": true, +"type": "string" +}, +"stateError": { +"$ref": "StateError", +"description": "Output only. Error regarding the state of the workflow. For example, this field will have error details if the execution data is unavailable due to revoked KMS key permissions.", +"readOnly": true +}, +"updateTime": { +"description": "Output only. The timestamp for when the workflow was last updated. This is a workflow-wide field and is not tied to a specific revision.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"userEnvVars": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. User-defined environment variables associated with this workflow revision. This map has a maximum length of 20. Each string can take up to 4KiB. Keys cannot be empty strings and cannot start with \"GOOGLE\" or \"WORKFLOWS\".", +"type": "object" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Workflows API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflows.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflows.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..7073a41ed03b41b813a658ceb32dd7691553b080 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workflows.v1beta.json @@ -0,0 +1,713 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://workflows.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Workflows", +"description": "Manage workflow definitions. To execute workflows and manage executions, see the Workflows Executions API.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/workflows", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workflows:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workflows.mtls.googleapis.com/", +"name": "workflows", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "workflows.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1beta/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "workflows.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "workflows.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "workflows.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "workflows.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"workflows": { +"methods": { +"create": { +"description": "Creates a new workflow. If a workflow with the specified name already exists in the specified project and location, the long running operation will return ALREADY_EXISTS error.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows", +"httpMethod": "POST", +"id": "workflows.projects.locations.workflows.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Project and location in which the workflow should be created. Format: projects/{project}/locations/{location}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"workflowId": { +"description": "Required. The ID of the workflow to be created. It has to fulfill the following requirements: * Must contain only letters, numbers, underscores and hyphens. * Must start with a letter. * Must be between 1-64 characters. * Must end with a number or a letter. * Must be unique within the customer project and location.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+parent}/workflows", +"request": { +"$ref": "Workflow" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a workflow with the specified name. This method also cancels and deletes all running executions of the workflow.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", +"httpMethod": "DELETE", +"id": "workflows.projects.locations.workflows.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workflow to be deleted. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Workflow.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", +"httpMethod": "GET", +"id": "workflows.projects.locations.workflows.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workflow which information should be retrieved. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Workflow" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Workflows in a given project and location. The default order is not specified.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows", +"httpMethod": "GET", +"id": "workflows.projects.locations.workflows.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filter to restrict results to specific workflows.", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Comma-separated list of fields that that specify the order of the results. Default sorting order for a field is ascending. To specify descending order for a field, append a \" desc\" suffix. If not specified, the results will be returned in an unspecified order.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Maximum number of workflows to return per call. The service may return fewer than this value. If the value is not specified, a default value of 500 will be used. The maximum permitted value is 1000 and values greater than 1000 will be coerced down to 1000.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token, received from a previous `ListWorkflows` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListWorkflows` must match the call that provided the page token.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Project and location from which the workflows should be listed. Format: projects/{project}/locations/{location}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/workflows", +"response": { +"$ref": "ListWorkflowsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workflow. Running this method has no impact on already running executions of the workflow. A new revision of the workflow may be created as a result of a successful update operation. In that case, such revision will be used in new workflow executions.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workflows/{workflowsId}", +"httpMethod": "PATCH", +"id": "workflows.projects.locations.workflows.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workflows/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "List of fields to be updated. If not present, the entire workflow will be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "Workflow" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://workflows.googleapis.com/", +"schemas": { +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkflowsResponse": { +"description": "Response for the ListWorkflows method.", +"id": "ListWorkflowsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workflows": { +"description": "The workflows which match the request.", +"items": { +"$ref": "Workflow" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "API version used to start the operation.", +"type": "string" +}, +"createTime": { +"description": "The time the operation was created.", +"format": "google-datetime", +"type": "string" +}, +"endTime": { +"description": "The time the operation finished running.", +"format": "google-datetime", +"type": "string" +}, +"target": { +"description": "Server-defined resource path for the target of the operation.", +"type": "string" +}, +"verb": { +"description": "Name of the verb executed by the operation.", +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Workflow": { +"description": "Workflow program to be executed by Workflows.", +"id": "Workflow", +"properties": { +"createTime": { +"description": "Output only. The timestamp of when the workflow was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"description": { +"description": "Description of the workflow provided by the user. Must be at most 1000 unicode characters long.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels associated with this workflow. Labels can contain at most 64 entries. Keys and values can be no longer than 63 characters and can only contain lowercase letters, numeric characters, underscores and dashes. Label keys must start with a letter. International characters are allowed.", +"type": "object" +}, +"name": { +"description": "The resource name of the workflow. Format: projects/{project}/locations/{location}/workflows/{workflow}", +"type": "string" +}, +"revisionCreateTime": { +"description": "Output only. The timestamp that the latest revision of the workflow was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"revisionId": { +"description": "Output only. The revision of the workflow. A new revision of a workflow is created as a result of updating the following properties of a workflow: - Service account - Workflow code to be executed The format is \"000001-a4d\", where the first 6 characters define the zero-padded revision ordinal number. They are followed by a hyphen and 3 hexadecimal random characters.", +"readOnly": true, +"type": "string" +}, +"serviceAccount": { +"description": "The service account associated with the latest workflow version. This service account represents the identity of the workflow and determines what permissions the workflow has. Format: projects/{project}/serviceAccounts/{account} or {account} Using `-` as a wildcard for the `{project}` or not providing one at all will infer the project from the account. The `{account}` value can be the `email` address or the `unique_id` of the service account. If not provided, workflow will use the project's default service account. Modifying this field for an existing workflow results in a new workflow revision.", +"type": "string" +}, +"sourceContents": { +"description": "Workflow code to be executed. The size limit is 128KB.", +"type": "string" +}, +"state": { +"description": "Output only. State of the workflow deployment.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE" +], +"enumDescriptions": [ +"Invalid state.", +"The workflow has been deployed successfully and is serving." +], +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last update timestamp of the workflow.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Workflows API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workloadmanager.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workloadmanager.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..49d9dbf30a853d96ad55564ee117d0fbdf28754e --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workloadmanager.v1.json @@ -0,0 +1,2030 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://workloadmanager.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Workload Manager", +"description": "Workload Manager is a service that provides tooling for enterprise workloads to automate the deployment and validation of your workloads against best practices and recommendations.", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/workload-manager/docs", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workloadmanager:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workloadmanager.mtls.googleapis.com/", +"name": "workloadmanager", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"evaluations": { +"methods": { +"create": { +"description": "Creates a new Evaluation in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", +"httpMethod": "POST", +"id": "workloadmanager.projects.locations.evaluations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"evaluationId": { +"description": "Required. Id of the requesting object", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource prefix of the evaluation location using the form: `projects/{project_id}/locations/{location_id}`", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/evaluations", +"request": { +"$ref": "Evaluation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a single Evaluation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", +"httpMethod": "DELETE", +"id": "workloadmanager.projects.locations.evaluations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"force": { +"description": "Optional. Followed the best practice from https://aip.dev/135#cascading-delete", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Evaluation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.evaluations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Evaluation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Evaluations in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.evaluations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filtering results", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Hint for how to order the results", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent value for ListEvaluationsRequest", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/evaluations", +"response": { +"$ref": "ListEvaluationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"executions": { +"methods": { +"delete": { +"description": "Deletes a single Execution.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", +"httpMethod": "DELETE", +"id": "workloadmanager.projects.locations.evaluations.executions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes after the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets details of a single Execution.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.evaluations.executions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the resource", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Execution" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists Executions in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.evaluations.executions.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filtering results", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The resource prefix of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}'", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/executions", +"response": { +"$ref": "ListExecutionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"run": { +"description": "Creates a new Execution in a given project and location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions:run", +"httpMethod": "POST", +"id": "workloadmanager.projects.locations.evaluations.executions.run", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. The resource name of the Execution using the form: 'projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}'", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}/executions:run", +"request": { +"$ref": "RunEvaluationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"results": { +"methods": { +"list": { +"description": "List the running result of a single Execution.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}/results", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.evaluations.executions.results.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filtering results", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The execution results. Format: {parent}/evaluations/*/executions/*/results", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/results", +"response": { +"$ref": "ListExecutionResultsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"scannedResources": { +"methods": { +"list": { +"description": "List all scanned resources for a single Execution.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/evaluations/{evaluationsId}/executions/{executionsId}/scannedResources", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.evaluations.executions.scannedResources.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"filter": { +"description": "Filtering results", +"location": "query", +"type": "string" +}, +"orderBy": { +"description": "Field to sort by. See https://google.aip.dev/132#ordering for more details.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. parent for ListScannedResourcesRequest", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/evaluations/[^/]+/executions/[^/]+$", +"required": true, +"type": "string" +}, +"rule": { +"description": "rule name", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/scannedResources", +"response": { +"$ref": "ListScannedResourcesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +}, +"insights": { +"methods": { +"writeInsight": { +"description": "Write the data insights to workload manager data warehouse.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/insights:writeInsight", +"httpMethod": "POST", +"id": "workloadmanager.projects.locations.insights.writeInsight", +"parameterOrder": [ +"location" +], +"parameters": { +"location": { +"description": "Required. The GCP location. The format is: projects/{project}/locations/{location}.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+location}/insights:writeInsight", +"request": { +"$ref": "WriteInsightRequest" +}, +"response": { +"$ref": "WriteInsightResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "workloadmanager.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "workloadmanager.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Empty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"rules": { +"methods": { +"list": { +"description": "Lists rules in a given project.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/rules", +"httpMethod": "GET", +"id": "workloadmanager.projects.locations.rules.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"customRulesBucket": { +"description": "The Cloud Storage bucket name for custom rules.", +"location": "query", +"type": "string" +}, +"filter": { +"description": "Filter based on primary_category, secondary_category", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A token identifying a page of results the server should return.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. The [project] on which to execute the request. The format is: projects/{project_id}/locations/{location} Currently, the pre-defined rules are global available to all projects and all regions", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/rules", +"response": { +"$ref": "ListRulesResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +}, +"revision": "20240410", +"rootUrl": "https://workloadmanager.googleapis.com/", +"schemas": { +"BigQueryDestination": { +"description": "Message describing big query destination", +"id": "BigQueryDestination", +"properties": { +"createNewResultsTable": { +"description": "Optional. determine if results will be saved in a new table", +"type": "boolean" +}, +"destinationDataset": { +"description": "Optional. destination dataset to save evaluation results", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Empty": { +"description": "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); }", +"id": "Empty", +"properties": {}, +"type": "object" +}, +"Evaluation": { +"description": "LINT.IfChange Message describing Evaluation object", +"id": "Evaluation", +"properties": { +"bigQueryDestination": { +"$ref": "BigQueryDestination", +"description": "Optional. BigQuery destination" +}, +"createTime": { +"description": "Output only. [Output only] Create time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"customRulesBucket": { +"description": "The Cloud Storage bucket name for custom rules.", +"type": "string" +}, +"description": { +"description": "Description of the Evaluation", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels as key value pairs", +"type": "object" +}, +"name": { +"description": "name of resource names have the form 'projects/{project_id}/locations/{location_id}/evaluations/{evaluation_id}'", +"type": "string" +}, +"resourceFilter": { +"$ref": "ResourceFilter", +"description": "annotations as key value pairs" +}, +"resourceStatus": { +"$ref": "ResourceStatus", +"description": "Output only. [Output only] The updated rule ids if exist.", +"readOnly": true +}, +"ruleNames": { +"description": "the name of the rule", +"items": { +"type": "string" +}, +"type": "array" +}, +"ruleVersions": { +"description": "Output only. [Output only] The updated rule ids if exist.", +"items": { +"type": "string" +}, +"readOnly": true, +"type": "array" +}, +"schedule": { +"description": "crontab format schedule for scheduled evaluation, currently only support the following schedule: \"0 */1 * * *\", \"0 */6 * * *\", \"0 */12 * * *\", \"0 0 */1 * *\", \"0 0 */7 * *\",", +"type": "string" +}, +"updateTime": { +"description": "Output only. [Output only] Update time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Execution": { +"description": "Message describing Execution object", +"id": "Execution", +"properties": { +"endTime": { +"description": "Output only. [Output only] End time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"evaluationId": { +"description": "Output only. [Output only] Evaluation ID", +"readOnly": true, +"type": "string" +}, +"inventoryTime": { +"description": "Output only. [Output only] Inventory time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Labels as key value pairs", +"type": "object" +}, +"name": { +"description": "The name of execution resource. The format is projects/{project}/locations/{location}/evaluations/{evaluation}/executions/{execution}", +"type": "string" +}, +"runType": { +"description": "type represent whether the execution executed directly by user or scheduled according evaluation.schedule field.", +"enum": [ +"TYPE_UNSPECIFIED", +"ONE_TIME", +"SCHEDULED" +], +"enumDescriptions": [ +"type of execution is unspecified", +"type of execution is one time", +"type of execution is scheduled" +], +"type": "string" +}, +"startTime": { +"description": "Output only. [Output only] Start time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. [Output only] State", +"enum": [ +"STATE_UNSPECIFIED", +"RUNNING", +"SUCCEEDED", +"FAILED" +], +"enumDescriptions": [ +"state of execution is unspecified", +"the execution is running in backend service", +"the execution run success", +"the execution run failed" +], +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ExecutionResult": { +"description": "Message describing the result of an execution", +"id": "ExecutionResult", +"properties": { +"documentationUrl": { +"description": "the document url of the rule", +"type": "string" +}, +"resource": { +"$ref": "Resource", +"description": "the violate resource" +}, +"rule": { +"description": "the rule which violate in execution", +"type": "string" +}, +"severity": { +"description": "severity of violation", +"type": "string" +}, +"violationDetails": { +"$ref": "ViolationDetails", +"description": "the details of violation in result" +}, +"violationMessage": { +"description": "the violation message of an execution", +"type": "string" +} +}, +"type": "object" +}, +"GceInstanceFilter": { +"description": "Message describing compute engine instance filter", +"id": "GceInstanceFilter", +"properties": { +"serviceAccounts": { +"description": "Service account of compute engine", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Insight": { +"description": "A presentation of host resource usage where the workload runs.", +"id": "Insight", +"properties": { +"instanceId": { +"description": "Required. The instance id where the insight is generated from", +"type": "string" +}, +"sapDiscovery": { +"$ref": "SapDiscovery", +"description": "The insights data for SAP system discovery. This is a copy of SAP System proto and should get updated whenever that one changes." +}, +"sapValidation": { +"$ref": "SapValidation", +"description": "The insights data for the SAP workload validation." +}, +"sentTime": { +"description": "Output only. [Output only] Create time stamp", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"sqlserverValidation": { +"$ref": "SqlserverValidation", +"description": "The insights data for the sqlserver workload validation." +} +}, +"type": "object" +}, +"ListEvaluationsResponse": { +"description": "Message for response to listing Evaluations", +"id": "ListEvaluationsResponse", +"properties": { +"evaluations": { +"description": "The list of Evaluation", +"items": { +"$ref": "Evaluation" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListExecutionResultsResponse": { +"description": "Message for response of list execution results", +"id": "ListExecutionResultsResponse", +"properties": { +"executionResults": { +"description": "The versions from the specified publisher.", +"items": { +"$ref": "ExecutionResult" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +} +}, +"type": "object" +}, +"ListExecutionsResponse": { +"description": "Message for response to listing Executions", +"id": "ListExecutionsResponse", +"properties": { +"executions": { +"description": "The list of Execution", +"items": { +"$ref": "Execution" +}, +"type": "array" +}, +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"unreachable": { +"description": "Locations that could not be reached.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListRulesResponse": { +"description": "Mesesage of response of list rules", +"id": "ListRulesResponse", +"properties": { +"nextPageToken": { +"description": "A token identifying a page of results the server should return.", +"type": "string" +}, +"rules": { +"description": "all rules in response", +"items": { +"$ref": "Rule" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListScannedResourcesResponse": { +"description": "Message for response to list scanned resources", +"id": "ListScannedResourcesResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"scannedResources": { +"description": "All scanned resources in response", +"items": { +"$ref": "ScannedResource" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Represents the metadata of the long-running operation.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. The time the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"Resource": { +"description": "Message represent resource in execution result", +"id": "Resource", +"properties": { +"name": { +"description": "the name of the resource", +"type": "string" +}, +"serviceAccount": { +"description": "the service account accosiate with resource", +"type": "string" +}, +"type": { +"description": "the type of reresource", +"type": "string" +} +}, +"type": "object" +}, +"ResourceFilter": { +"description": "Message describing resource filters", +"id": "ResourceFilter", +"properties": { +"gceInstanceFilter": { +"$ref": "GceInstanceFilter", +"description": "Filter compute engine resource" +}, +"inclusionLabels": { +"additionalProperties": { +"type": "string" +}, +"description": "The label used for filter resource", +"type": "object" +}, +"resourceIdPatterns": { +"description": "The id pattern for filter resource", +"items": { +"type": "string" +}, +"type": "array" +}, +"scopes": { +"description": "The scopes of evaluation resource", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ResourceStatus": { +"description": "Message describing resource status", +"id": "ResourceStatus", +"properties": { +"rulesNewerVersions": { +"deprecated": true, +"description": "Historical: Used before 2023-05-22 the new version of rule id if exists", +"items": { +"type": "string" +}, +"type": "array" +}, +"state": { +"description": "State of the resource", +"enum": [ +"STATE_UNSPECIFIED", +"CREATING", +"ACTIVE", +"DELETING" +], +"enumDescriptions": [ +"The state has not been populated in this message.", +"Resource has an active Create operation.", +"Resource has no outstanding operations on it or has active Update operations.", +"Resource has an active Delete operation." +], +"type": "string" +} +}, +"type": "object" +}, +"Rule": { +"description": "Message represent a rule", +"id": "Rule", +"properties": { +"description": { +"description": "descrite rule in plain language", +"type": "string" +}, +"displayName": { +"description": "the name display in UI", +"type": "string" +}, +"errorMessage": { +"description": "the message template for rule", +"type": "string" +}, +"name": { +"description": "rule name", +"type": "string" +}, +"primaryCategory": { +"description": "the primary category", +"type": "string" +}, +"remediation": { +"description": "the remediation for the rule", +"type": "string" +}, +"revisionId": { +"description": "Output only. the version of the rule", +"readOnly": true, +"type": "string" +}, +"secondaryCategory": { +"description": "the secondary category", +"type": "string" +}, +"severity": { +"description": "the severity of the rule", +"type": "string" +}, +"tags": { +"description": "List of user-defined tags", +"items": { +"type": "string" +}, +"type": "array" +}, +"uri": { +"description": "the docuement url for the rule", +"type": "string" +} +}, +"type": "object" +}, +"RunEvaluationRequest": { +"description": "Message for creating a Execution", +"id": "RunEvaluationRequest", +"properties": { +"execution": { +"$ref": "Execution", +"description": "Required. The resource being created" +}, +"executionId": { +"description": "Required. Id of the requesting object If auto-generating Id server-side, remove this field and execution_id from the method_signature of Create RPC", +"type": "string" +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"SapDiscovery": { +"description": "The schema of SAP system discovery data.", +"id": "SapDiscovery", +"properties": { +"applicationLayer": { +"$ref": "SapDiscoveryComponent", +"description": "Optional. An SAP system may run without an application layer." +}, +"databaseLayer": { +"$ref": "SapDiscoveryComponent", +"description": "Required. An SAP System must have a database." +}, +"metadata": { +"$ref": "SapDiscoveryMetadata", +"description": "Optional. The metadata for SAP system discovery data." +}, +"projectNumber": { +"description": "Optional. The GCP project number that this SapSystem belongs to.", +"type": "string" +}, +"systemId": { +"description": "Output only. A combination of database SID, database instance URI and tenant DB name to make a unique identifier per-system.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Required. Unix timestamp this system has been updated last.", +"format": "google-datetime", +"type": "string" +}, +"workloadProperties": { +"$ref": "SapDiscoveryWorkloadProperties", +"description": "Optional. The properties of the workload." +} +}, +"type": "object" +}, +"SapDiscoveryComponent": { +"description": "Message describing the system component.", +"id": "SapDiscoveryComponent", +"properties": { +"applicationProperties": { +"$ref": "SapDiscoveryComponentApplicationProperties", +"description": "Optional. The component is a SAP application." +}, +"databaseProperties": { +"$ref": "SapDiscoveryComponentDatabaseProperties", +"description": "Optional. The component is a SAP database." +}, +"haHosts": { +"description": "Optional. A list of host URIs that are part of the HA configuration if present. An empty list indicates the component is not configured for HA.", +"items": { +"type": "string" +}, +"type": "array" +}, +"hostProject": { +"description": "Required. Pantheon Project in which the resources reside.", +"type": "string" +}, +"resources": { +"description": "Optional. The resources in a component.", +"items": { +"$ref": "SapDiscoveryResource" +}, +"type": "array" +}, +"sid": { +"description": "Optional. The SAP identifier, used by the SAP software and helps differentiate systems for customers.", +"type": "string" +}, +"topologyType": { +"description": "Optional. The detected topology of the component.", +"enum": [ +"TOPOLOGY_TYPE_UNSPECIFIED", +"TOPOLOGY_SCALE_UP", +"TOPOLOGY_SCALE_OUT" +], +"enumDescriptions": [ +"Unspecified topology.", +"A scale-up single node system.", +"A scale-out multi-node system." +], +"type": "string" +} +}, +"type": "object" +}, +"SapDiscoveryComponentApplicationProperties": { +"description": "A set of properties describing an SAP Application layer.", +"id": "SapDiscoveryComponentApplicationProperties", +"properties": { +"abap": { +"description": "Optional. Indicates whether this is a Java or ABAP Netweaver instance. true means it is ABAP, false means it is Java.", +"type": "boolean" +}, +"appInstanceNumber": { +"description": "Optional. Instance number of the SAP application instance.", +"type": "string" +}, +"applicationType": { +"description": "Required. Type of the application. Netweaver, etc.", +"enum": [ +"APPLICATION_TYPE_UNSPECIFIED", +"NETWEAVER" +], +"enumDescriptions": [ +"Unspecified application type", +"SAP Netweaver" +], +"type": "string" +}, +"ascsInstanceNumber": { +"description": "Optional. Instance number of the ASCS instance.", +"type": "string" +}, +"ascsUri": { +"description": "Optional. Resource URI of the recognized ASCS host of the application.", +"type": "string" +}, +"kernelVersion": { +"description": "Optional. Kernel version for Netweaver running in the system.", +"type": "string" +}, +"nfsUri": { +"description": "Optional. Resource URI of the recognized shared NFS of the application. May be empty if the application server has only a single node.", +"type": "string" +} +}, +"type": "object" +}, +"SapDiscoveryComponentDatabaseProperties": { +"description": "A set of properties describing an SAP Database layer.", +"id": "SapDiscoveryComponentDatabaseProperties", +"properties": { +"databaseSid": { +"description": "Optional. SID of the system database.", +"type": "string" +}, +"databaseType": { +"description": "Required. Type of the database. HANA, DB2, etc.", +"enum": [ +"DATABASE_TYPE_UNSPECIFIED", +"HANA", +"MAX_DB", +"DB2" +], +"enumDescriptions": [ +"Unspecified database type.", +"SAP HANA", +"SAP MAX_DB", +"IBM DB2" +], +"type": "string" +}, +"databaseVersion": { +"description": "Optional. The version of the database software running in the system.", +"type": "string" +}, +"instanceNumber": { +"description": "Optional. Instance number of the SAP instance.", +"type": "string" +}, +"primaryInstanceUri": { +"description": "Required. URI of the recognized primary instance of the database.", +"type": "string" +}, +"sharedNfsUri": { +"description": "Optional. URI of the recognized shared NFS of the database. May be empty if the database has only a single node.", +"type": "string" +} +}, +"type": "object" +}, +"SapDiscoveryMetadata": { +"description": "Message describing SAP discovery system metadata", +"id": "SapDiscoveryMetadata", +"properties": { +"customerRegion": { +"description": "Optional. Customer region string for customer's use. Does not represent GCP region.", +"type": "string" +}, +"definedSystem": { +"description": "Optional. Customer defined, something like \"E-commerce pre prod\"", +"type": "string" +}, +"environmentType": { +"description": "Optional. Should be \"prod\", \"QA\", \"dev\", \"staging\", etc.", +"type": "string" +}, +"sapProduct": { +"description": "Optional. This SAP product name", +"type": "string" +} +}, +"type": "object" +}, +"SapDiscoveryResource": { +"description": "Message describing a resource.", +"id": "SapDiscoveryResource", +"properties": { +"instanceProperties": { +"$ref": "SapDiscoveryResourceInstanceProperties", +"description": "Optional. A set of properties only applying to instance type resources." +}, +"relatedResources": { +"description": "Optional. A list of resource URIs related to this resource.", +"items": { +"type": "string" +}, +"type": "array" +}, +"resourceKind": { +"description": "Required. ComputeInstance, ComputeDisk, VPC, Bare Metal server, etc.", +"enum": [ +"RESOURCE_KIND_UNSPECIFIED", +"RESOURCE_KIND_INSTANCE", +"RESOURCE_KIND_DISK", +"RESOURCE_KIND_ADDRESS", +"RESOURCE_KIND_FILESTORE", +"RESOURCE_KIND_HEALTH_CHECK", +"RESOURCE_KIND_FORWARDING_RULE", +"RESOURCE_KIND_BACKEND_SERVICE", +"RESOURCE_KIND_SUBNETWORK", +"RESOURCE_KIND_NETWORK", +"RESOURCE_KIND_PUBLIC_ADDRESS", +"RESOURCE_KIND_INSTANCE_GROUP" +], +"enumDescriptions": [ +"Unspecified resource kind.", +"This is a compute instance.", +"This is a compute disk.", +"This is a compute address.", +"This is a filestore instance.", +"This is a compute health check.", +"This is a compute forwarding rule.", +"This is a compute backend service.", +"This is a compute subnetwork.", +"This is a compute network.", +"This is a public accessible IP Address.", +"This is a compute instance group." +], +"type": "string" +}, +"resourceType": { +"description": "Required. The type of this resource.", +"enum": [ +"RESOURCE_TYPE_UNSPECIFIED", +"RESOURCE_TYPE_COMPUTE", +"RESOURCE_TYPE_STORAGE", +"RESOURCE_TYPE_NETWORK" +], +"enumDescriptions": [ +"Undefined resource type.", +"This is a compute resource.", +"This a storage resource.", +"This is a network resource." +], +"type": "string" +}, +"resourceUri": { +"description": "Required. URI of the resource, includes project, location, and name.", +"type": "string" +}, +"updateTime": { +"description": "Required. Unix timestamp of when this resource last had its discovery data updated.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"SapDiscoveryResourceInstanceProperties": { +"description": "A set of properties only present for an instance type resource", +"id": "SapDiscoveryResourceInstanceProperties", +"properties": { +"clusterInstances": { +"description": "Optional. A list of instance URIs that are part of a cluster with this one.", +"items": { +"type": "string" +}, +"type": "array" +}, +"instanceNumber": { +"description": "Optional. The VM's instance number.", +"format": "int64", +"type": "string" +}, +"virtualHostname": { +"description": "Optional. A virtual hostname of the instance if it has one.", +"type": "string" +} +}, +"type": "object" +}, +"SapDiscoveryWorkloadProperties": { +"description": "A set of properties describing an SAP workload.", +"id": "SapDiscoveryWorkloadProperties", +"properties": { +"productVersions": { +"description": "Optional. List of SAP Products and their versions running on the system.", +"items": { +"$ref": "SapDiscoveryWorkloadPropertiesProductVersion" +}, +"type": "array" +}, +"softwareComponentVersions": { +"description": "Optional. A list of SAP software components and their versions running on the system.", +"items": { +"$ref": "SapDiscoveryWorkloadPropertiesSoftwareComponentProperties" +}, +"type": "array" +} +}, +"type": "object" +}, +"SapDiscoveryWorkloadPropertiesProductVersion": { +"description": "A product name and version.", +"id": "SapDiscoveryWorkloadPropertiesProductVersion", +"properties": { +"name": { +"description": "Optional. Name of the product.", +"type": "string" +}, +"version": { +"description": "Optional. Version of the product.", +"type": "string" +} +}, +"type": "object" +}, +"SapDiscoveryWorkloadPropertiesSoftwareComponentProperties": { +"description": "A SAP software component name, version, and type.", +"id": "SapDiscoveryWorkloadPropertiesSoftwareComponentProperties", +"properties": { +"extVersion": { +"description": "Optional. The component's minor version.", +"type": "string" +}, +"name": { +"description": "Optional. Name of the component.", +"type": "string" +}, +"type": { +"description": "Optional. The component's type.", +"type": "string" +}, +"version": { +"description": "Optional. The component's major version.", +"type": "string" +} +}, +"type": "object" +}, +"SapValidation": { +"description": "A presentation of SAP workload insight. The schema of SAP workloads validation related data.", +"id": "SapValidation", +"properties": { +"projectId": { +"description": "Required. The project_id of the cloud project that the Insight data comes from.", +"type": "string" +}, +"validationDetails": { +"description": "Optional. A list of SAP validation metrics data.", +"items": { +"$ref": "SapValidationValidationDetail" +}, +"type": "array" +}, +"zone": { +"description": "Optional. The zone of the instance that the Insight data comes from.", +"type": "string" +} +}, +"type": "object" +}, +"SapValidationValidationDetail": { +"description": "Message describing the SAP validation metrics.", +"id": "SapValidationValidationDetail", +"properties": { +"details": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. The pairs of metrics data: field name & field value.", +"type": "object" +}, +"isPresent": { +"description": "Optional. Was there a SAP system detected for this validation type.", +"type": "boolean" +}, +"sapValidationType": { +"description": "Optional. The SAP system that the validation data is from.", +"enum": [ +"SAP_VALIDATION_TYPE_UNSPECIFIED", +"SYSTEM", +"COROSYNC", +"PACEMAKER", +"HANA", +"NETWEAVER", +"HANA_SECURITY", +"CUSTOM" +], +"enumDescriptions": [ +"Unspecified type.", +"The SYSTEM validation type collects underlying system data from the VM.", +"The COROSYNC validation type collects Corosync configuration and runtime data. Corosync enables servers to interact as a HA cluster.", +"The PACEMAKER validation type collects Pacemaker configuration data. Pacemaker is a high-availability cluster resource manager.", +"The HANA validation type collects HANA configuration data. SAP HANA is an in-memory, column-oriented, relational database management system.", +"The NETWEAVER validation type collects NetWeaver configuration data. SAP NetWeaver is a software stack for many of SAP SE's applications.", +"The HANA_SECURITY validation type collects HANA configuration data as it relates to SAP security best practices.", +"The CUSTOM validation type collects any customer-defined data that does not fall into any of the other categories of validations." +], +"type": "string" +} +}, +"type": "object" +}, +"ScannedResource": { +"description": "Message of scanned resource", +"id": "ScannedResource", +"properties": { +"resource": { +"description": "resource name", +"type": "string" +}, +"type": { +"description": "resource type", +"type": "string" +} +}, +"type": "object" +}, +"SqlserverValidation": { +"description": "A presentation of SQLServer workload insight. The schema of SqlServer workloads validation related data.", +"id": "SqlserverValidation", +"properties": { +"agentVersion": { +"description": "Optional. The agent version collected this data point", +"type": "string" +}, +"instance": { +"description": "Required. The instance_name of the instance that the Insight data comes from. According to https://linter.aip.dev/122/name-suffix: field names should not use the _name suffix unless the field would be ambiguous without it.", +"type": "string" +}, +"projectId": { +"description": "Required. The project_id of the cloud project that the Insight data comes from.", +"type": "string" +}, +"validationDetails": { +"description": "Optional. A list of SqlServer validation metrics data.", +"items": { +"$ref": "SqlserverValidationValidationDetail" +}, +"type": "array" +} +}, +"type": "object" +}, +"SqlserverValidationDetails": { +"description": "Message containing collected data names and values.", +"id": "SqlserverValidationDetails", +"properties": { +"fields": { +"additionalProperties": { +"type": "string" +}, +"description": "Required. Collected data is in format.", +"type": "object" +} +}, +"type": "object" +}, +"SqlserverValidationValidationDetail": { +"description": "Message describing the Sqlserver validation metrics.", +"id": "SqlserverValidationValidationDetail", +"properties": { +"details": { +"description": "Required. Details wraps map that represents collected data names and values.", +"items": { +"$ref": "SqlserverValidationDetails" +}, +"type": "array" +}, +"type": { +"description": "Optional. The Sqlserver system that the validation data is from.", +"enum": [ +"SQLSERVER_VALIDATION_TYPE_UNSPECIFIED", +"OS", +"DB_LOG_DISK_SEPARATION", +"DB_MAX_PARALLELISM", +"DB_CXPACKET_WAITS", +"DB_TRANSACTION_LOG_HANDLING", +"DB_VIRTUAL_LOG_FILE_COUNT", +"DB_BUFFER_POOL_EXTENSION", +"DB_MAX_SERVER_MEMORY", +"INSTANCE_METRICS", +"DB_INDEX_FRAGMENTATION", +"DB_TABLE_INDEX_COMPRESSION", +"DB_BACKUP_POLICY" +], +"enumDescriptions": [ +"Unspecified type.", +"The Sqlserver system named OS.", +"The LOG_DISK_SEPARATION table.", +"The MAX_PARALLELISM table.", +"The CXPACKET_WAITS table.", +"The TRANSACTION_LOG_HANDLING table.", +"The VIRTUAL_LOG_FILE_COUNT table.", +"The BUFFER_POOL_EXTENSION table.", +"The MAX_SERVER_MEMORY table.", +"The INSTANCE_METRICS table.", +"The DB_INDEX_FRAGMENTATION table.", +"The DB_TABLE_INDEX_COMPRESSION table.", +"The DB_BACKUP_POLICY table." +], +"type": "string" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"ViolationDetails": { +"description": "Message describing the violdation in execution result", +"id": "ViolationDetails", +"properties": { +"asset": { +"description": "the name of asset", +"type": "string" +}, +"observed": { +"additionalProperties": { +"type": "string" +}, +"description": "observed", +"type": "object" +}, +"serviceAccount": { +"description": "the service account associate with resource", +"type": "string" +} +}, +"type": "object" +}, +"WriteInsightRequest": { +"description": "Request for sending the data insights.", +"id": "WriteInsightRequest", +"properties": { +"agentVersion": { +"description": "Optional. The agent version collected this data point.", +"type": "string" +}, +"insight": { +"$ref": "Insight", +"description": "Required. The metrics data details." +}, +"requestId": { +"description": "Optional. An optional request ID to identify requests. Specify a unique request ID so that if you must retry your request, the server will know to ignore the request if it has already been completed. The server will guarantee that for at least 60 minutes since the first request. For example, consider a situation where you make an initial request and the request times out. If you make the request again with the same request ID, the server can check if original operation with the same request ID was received, and if so, will ignore the second request. This prevents clients from accidentally creating duplicate commitments. The request ID must be a valid UUID with the exception that zero UUID is not supported (00000000-0000-0000-0000-000000000000).", +"type": "string" +} +}, +"type": "object" +}, +"WriteInsightResponse": { +"description": "The response for write insights request.", +"id": "WriteInsightResponse", +"properties": {}, +"type": "object" +} +}, +"servicePath": "", +"title": "Workload Manager API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workspaceevents.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workspaceevents.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..bc544b2da6f1f8d55c80bb0bf5becbf773791e94 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workspaceevents.v1.json @@ -0,0 +1,661 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/chat.bot": { +"description": "Private Service: https://www.googleapis.com/auth/chat.bot" +}, +"https://www.googleapis.com/auth/chat.memberships": { +"description": "View, add, and remove members from conversations in Google Chat" +}, +"https://www.googleapis.com/auth/chat.memberships.readonly": { +"description": "View members in Google Chat conversations." +}, +"https://www.googleapis.com/auth/chat.messages": { +"description": "View, compose, send, update, and delete messages, and add, view, and delete reactions to messages." +}, +"https://www.googleapis.com/auth/chat.messages.reactions": { +"description": "View, add, and delete reactions to messages in Google Chat" +}, +"https://www.googleapis.com/auth/chat.messages.reactions.readonly": { +"description": "View reactions to messages in Google Chat" +}, +"https://www.googleapis.com/auth/chat.messages.readonly": { +"description": "View messages and reactions in Google Chat" +}, +"https://www.googleapis.com/auth/chat.spaces": { +"description": "Create conversations and spaces and see or edit metadata (including history settings and access settings) in Google Chat" +}, +"https://www.googleapis.com/auth/chat.spaces.readonly": { +"description": "View chat and spaces in Google Chat" +}, +"https://www.googleapis.com/auth/meetings.space.created": { +"description": "Create, edit, and see information about your Google Meet conferences created by the app." +}, +"https://www.googleapis.com/auth/meetings.space.readonly": { +"description": "Read information about any of your Google Meet conferences" +} +} +} +}, +"basePath": "", +"baseUrl": "https://workspaceevents.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Workspace Events", +"description": "The Google Workspace Events API lets you subscribe to events and manage change notifications across Google Workspace applications.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/workspace/events", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workspaceevents:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workspaceevents.mtls.googleapis.com/", +"name": "workspaceevents", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"operations": { +"methods": { +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/operations/{operationsId}", +"httpMethod": "GET", +"id": "workspaceevents.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^operations/.*$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/chat.bot", +"https://www.googleapis.com/auth/chat.memberships", +"https://www.googleapis.com/auth/chat.memberships.readonly", +"https://www.googleapis.com/auth/chat.messages", +"https://www.googleapis.com/auth/chat.messages.reactions", +"https://www.googleapis.com/auth/chat.messages.reactions.readonly", +"https://www.googleapis.com/auth/chat.messages.readonly", +"https://www.googleapis.com/auth/chat.spaces", +"https://www.googleapis.com/auth/chat.spaces.readonly", +"https://www.googleapis.com/auth/meetings.space.created", +"https://www.googleapis.com/auth/meetings.space.readonly" +] +} +} +}, +"subscriptions": { +"methods": { +"create": { +"description": "[Developer Preview](https://developers.google.com/workspace/preview): Creates a Google Workspace subscription. To learn how to use this method, see [Create a Google Workspace subscription](https://developers.google.com/workspace/events/guides/create-subscription).", +"flatPath": "v1/subscriptions", +"httpMethod": "POST", +"id": "workspaceevents.subscriptions.create", +"parameterOrder": [], +"parameters": { +"validateOnly": { +"description": "Optional. If set to `true`, validates and previews the request, but doesn't create the subscription.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/subscriptions", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/chat.memberships", +"https://www.googleapis.com/auth/chat.memberships.readonly", +"https://www.googleapis.com/auth/chat.messages", +"https://www.googleapis.com/auth/chat.messages.reactions", +"https://www.googleapis.com/auth/chat.messages.reactions.readonly", +"https://www.googleapis.com/auth/chat.messages.readonly", +"https://www.googleapis.com/auth/chat.spaces", +"https://www.googleapis.com/auth/chat.spaces.readonly", +"https://www.googleapis.com/auth/meetings.space.created", +"https://www.googleapis.com/auth/meetings.space.readonly" +] +}, +"delete": { +"description": "[Developer Preview](https://developers.google.com/workspace/preview): Deletes a Google Workspace subscription. To learn how to use this method, see [Delete a Google Workspace subscription](https://developers.google.com/workspace/events/guides/delete-subscription).", +"flatPath": "v1/subscriptions/{subscriptionsId}", +"httpMethod": "DELETE", +"id": "workspaceevents.subscriptions.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set to `true` and the subscription isn't found, the request succeeds but doesn't delete the subscription.", +"location": "query", +"type": "boolean" +}, +"etag": { +"description": "Optional. Etag of the subscription. If present, it must match with the server's etag. Otherwise, request fails with the status `ABORTED`.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. Resource name of the subscription to delete. Format: `subscriptions/{subscription}`", +"location": "path", +"pattern": "^subscriptions/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set to `true`, validates and previews the request, but doesn't delete the subscription.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/chat.bot", +"https://www.googleapis.com/auth/chat.memberships", +"https://www.googleapis.com/auth/chat.memberships.readonly", +"https://www.googleapis.com/auth/chat.messages", +"https://www.googleapis.com/auth/chat.messages.reactions", +"https://www.googleapis.com/auth/chat.messages.reactions.readonly", +"https://www.googleapis.com/auth/chat.messages.readonly", +"https://www.googleapis.com/auth/chat.spaces", +"https://www.googleapis.com/auth/chat.spaces.readonly", +"https://www.googleapis.com/auth/meetings.space.created", +"https://www.googleapis.com/auth/meetings.space.readonly" +] +}, +"get": { +"description": "[Developer Preview](https://developers.google.com/workspace/preview): Gets details about a Google Workspace subscription. To learn how to use this method, see [Get details about a Google Workspace subscription](https://developers.google.com/workspace/events/guides/get-subscription).", +"flatPath": "v1/subscriptions/{subscriptionsId}", +"httpMethod": "GET", +"id": "workspaceevents.subscriptions.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", +"location": "path", +"pattern": "^subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/chat.bot", +"https://www.googleapis.com/auth/chat.memberships", +"https://www.googleapis.com/auth/chat.memberships.readonly", +"https://www.googleapis.com/auth/chat.messages", +"https://www.googleapis.com/auth/chat.messages.reactions", +"https://www.googleapis.com/auth/chat.messages.reactions.readonly", +"https://www.googleapis.com/auth/chat.messages.readonly", +"https://www.googleapis.com/auth/chat.spaces", +"https://www.googleapis.com/auth/chat.spaces.readonly", +"https://www.googleapis.com/auth/meetings.space.created", +"https://www.googleapis.com/auth/meetings.space.readonly" +] +}, +"list": { +"description": "[Developer Preview](https://developers.google.com/workspace/preview): Lists Google Workspace subscriptions. To learn how to use this method, see [List Google Workspace subscriptions](https://developers.google.com/workspace/events/guides/list-subscriptions).", +"flatPath": "v1/subscriptions", +"httpMethod": "GET", +"id": "workspaceevents.subscriptions.list", +"parameterOrder": [], +"parameters": { +"filter": { +"description": "Required. A query filter. You can filter subscriptions by event type (`event_types`) and target resource (`target_resource`). You must specify at least one event type in your query. To filter for multiple event types, use the `OR` operator. To filter by both event type and target resource, use the `AND` operator and specify the full resource name, such as `//chat.googleapis.com/spaces/{space}`. For example, the following queries are valid: ``` event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" event_types:\"google.workspace.chat.message.v1.created\" AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ( event_types:\"google.workspace.chat.membership.v1.updated\" OR event_types:\"google.workspace.chat.message.v1.created\" ) AND target_resource=\"//chat.googleapis.com/spaces/{space}\" ``` The server rejects invalid queries with an `INVALID_ARGUMENT` error.", +"location": "query", +"type": "string" +}, +"pageSize": { +"description": "Optional. The maximum number of subscriptions to return. The service might return fewer than this value. If unspecified or set to `0`, up to 50 subscriptions are returned. The maximum value is 100. If you specify a value more than 100, the system only returns 100 subscriptions.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. A page token, received from a previous list subscriptions call. Provide this parameter to retrieve the subsequent page. When paginating, the filter value should match the call that provided the page token. Passing a different value might lead to unexpected results.", +"location": "query", +"type": "string" +} +}, +"path": "v1/subscriptions", +"response": { +"$ref": "ListSubscriptionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/chat.bot", +"https://www.googleapis.com/auth/chat.memberships", +"https://www.googleapis.com/auth/chat.memberships.readonly", +"https://www.googleapis.com/auth/chat.messages", +"https://www.googleapis.com/auth/chat.messages.reactions", +"https://www.googleapis.com/auth/chat.messages.reactions.readonly", +"https://www.googleapis.com/auth/chat.messages.readonly", +"https://www.googleapis.com/auth/chat.spaces", +"https://www.googleapis.com/auth/chat.spaces.readonly", +"https://www.googleapis.com/auth/meetings.space.created", +"https://www.googleapis.com/auth/meetings.space.readonly" +] +}, +"patch": { +"description": "[Developer Preview](https://developers.google.com/workspace/preview): Updates or renews a Google Workspace subscription. To learn how to use this method, see [Update or renew a Google Workspace subscription](https://developers.google.com/workspace/events/guides/update-subscription).", +"flatPath": "v1/subscriptions/{subscriptionsId}", +"httpMethod": "PATCH", +"id": "workspaceevents.subscriptions.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", +"location": "path", +"pattern": "^subscriptions/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Optional. The field to update. If omitted, updates any fields included in the request. You can update one of the following fields in a subscription: * `expire_time`: The timestamp when the subscription expires. * `ttl`: The time-to-live (TTL) or duration of the subscription. To fully replace the subscription (the equivalent of `PUT`), use `*`. Any omitted fields are updated with empty values.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set to `true`, validates and previews the request, but doesn't update the subscription.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/chat.memberships", +"https://www.googleapis.com/auth/chat.memberships.readonly", +"https://www.googleapis.com/auth/chat.messages", +"https://www.googleapis.com/auth/chat.messages.reactions", +"https://www.googleapis.com/auth/chat.messages.reactions.readonly", +"https://www.googleapis.com/auth/chat.messages.readonly", +"https://www.googleapis.com/auth/chat.spaces", +"https://www.googleapis.com/auth/chat.spaces.readonly", +"https://www.googleapis.com/auth/meetings.space.created", +"https://www.googleapis.com/auth/meetings.space.readonly" +] +}, +"reactivate": { +"description": "[Developer Preview](https://developers.google.com/workspace/preview): Reactivates a suspended Google Workspace subscription. This method resets your subscription's `State` field to `ACTIVE`. Before you use this method, you must fix the error that suspended the subscription. To learn how to use this method, see [Reactivate a Google Workspace subscription](https://developers.google.com/workspace/events/guides/reactivate-subscription).", +"flatPath": "v1/subscriptions/{subscriptionsId}:reactivate", +"httpMethod": "POST", +"id": "workspaceevents.subscriptions.reactivate", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Resource name of the subscription. Format: `subscriptions/{subscription}`", +"location": "path", +"pattern": "^subscriptions/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:reactivate", +"request": { +"$ref": "ReactivateSubscriptionRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/chat.memberships", +"https://www.googleapis.com/auth/chat.memberships.readonly", +"https://www.googleapis.com/auth/chat.messages", +"https://www.googleapis.com/auth/chat.messages.reactions", +"https://www.googleapis.com/auth/chat.messages.reactions.readonly", +"https://www.googleapis.com/auth/chat.messages.readonly", +"https://www.googleapis.com/auth/chat.spaces", +"https://www.googleapis.com/auth/chat.spaces.readonly", +"https://www.googleapis.com/auth/meetings.space.created", +"https://www.googleapis.com/auth/meetings.space.readonly" +] +} +} +} +}, +"revision": "20240414", +"rootUrl": "https://workspaceevents.googleapis.com/", +"schemas": { +"ListSubscriptionsResponse": { +"description": "The response message for SubscriptionsService.ListSubscriptions.", +"id": "ListSubscriptionsResponse", +"properties": { +"nextPageToken": { +"description": "A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages.", +"type": "string" +}, +"subscriptions": { +"description": "List of subscriptions.", +"items": { +"$ref": "Subscription" +}, +"type": "array" +} +}, +"type": "object" +}, +"NotificationEndpoint": { +"description": "The endpoint where the subscription delivers events.", +"id": "NotificationEndpoint", +"properties": { +"pubsubTopic": { +"description": "Immutable. The Cloud Pub/Sub topic that receives events for the subscription. Format: `projects/{project}/topics/{topic}` You must create the topic in the same Google Cloud project where you create this subscription. When the topic receives events, the events are encoded as Cloud Pub/Sub messages. For details, see the [Google Cloud Pub/Sub Protocol Binding for CloudEvents](https://github.com/googleapis/google-cloudevents/blob/main/docs/spec/pubsub.md).", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"PayloadOptions": { +"description": "Options about what data to include in the event payload. Only supported for Google Chat events.", +"id": "PayloadOptions", +"properties": { +"fieldMask": { +"description": "Optional. If `include_resource` is set to `true`, the list of fields to include in the event payload. Separate fields with a comma. For example, to include a Google Chat message's sender and create time, enter `message.sender,message.createTime`. If omitted, the payload includes all fields for the resource. If you specify a field that doesn't exist for the resource, the system ignores the field.", +"format": "google-fieldmask", +"type": "string" +}, +"includeResource": { +"description": "Optional. Whether the event payload includes data about the resource that changed. For example, for an event where a Google Chat message was created, whether the payload contains data about the [`Message`](https://developers.google.com/chat/api/reference/rest/v1/spaces.messages) resource. If false, the event payload only includes the name of the changed resource.", +"type": "boolean" +} +}, +"type": "object" +}, +"ReactivateSubscriptionRequest": { +"description": "The request message for SubscriptionsService.ReactivateSubscription.", +"id": "ReactivateSubscriptionRequest", +"properties": {}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"Subscription": { +"description": "[Developer Preview](https://developers.google.com/workspace/preview). A subscription to receive events about a Google Workspace resource. To learn more about subscriptions, see the [Google Workspace Events API overview](https://developers.google.com/workspace/events).", +"id": "Subscription", +"properties": { +"authority": { +"description": "Output only. The user who authorized the creation of the subscription. Format: `users/{user}` For Google Workspace users, the `{user}` value is the [`user.id`](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users#User.FIELDS.ids) field from the Directory API.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. The time when the subscription is created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"etag": { +"description": "Optional. This checksum is computed by the server based on the value of other fields, and might be sent on update requests to ensure the client has an up-to-date value before proceeding.", +"type": "string" +}, +"eventTypes": { +"description": "Required. Immutable. Unordered list. Input for creating a subscription. Otherwise, output only. One or more types of events to receive about the target resource. Formatted according to the CloudEvents specification. The supported event types depend on the target resource of your subscription. For details, see [Supported Google Workspace events](https://developers.google.com/workspace/events/guides#supported-events). By default, you also receive events about the [lifecycle of your subscription](https://developers.google.com/workspace/events/guides/events-lifecycle). You don't need to specify lifecycle events for this field. If you specify an event type that doesn't exist for the target resource, the request returns an HTTP `400 Bad Request` status code.", +"items": { +"type": "string" +}, +"type": "array" +}, +"expireTime": { +"description": "Non-empty default. The timestamp in UTC when the subscription expires. Always displayed on output, regardless of what was used on input.", +"format": "google-datetime", +"type": "string" +}, +"name": { +"description": "Optional. Immutable. Identifier. Resource name of the subscription. Format: `subscriptions/{subscription}`", +"type": "string" +}, +"notificationEndpoint": { +"$ref": "NotificationEndpoint", +"description": "Required. Immutable. The endpoint where the subscription delivers events, such as a Pub/Sub topic." +}, +"payloadOptions": { +"$ref": "PayloadOptions", +"description": "Optional. Options about what data to include in the event payload. Only supported for Google Chat events." +}, +"reconciling": { +"description": "Output only. If `true`, the subscription is in the process of being updated.", +"readOnly": true, +"type": "boolean" +}, +"state": { +"description": "Output only. The state of the subscription. Determines whether the subscription can receive events and deliver them to the notification endpoint.", +"enum": [ +"STATE_UNSPECIFIED", +"ACTIVE", +"SUSPENDED", +"DELETED" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The subscription is active and can receive and deliver events to its notification endpoint.", +"The subscription is unable to receive events due to an error. To identify the error, see the `suspension_reason` field.", +"The subscription is deleted." +], +"readOnly": true, +"type": "string" +}, +"suspensionReason": { +"description": "Output only. The error that suspended the subscription. To reactivate the subscription, resolve the error and call the `ReactivateSubscription` method.", +"enum": [ +"ERROR_TYPE_UNSPECIFIED", +"USER_SCOPE_REVOKED", +"RESOURCE_DELETED", +"USER_AUTHORIZATION_FAILURE", +"ENDPOINT_PERMISSION_DENIED", +"ENDPOINT_NOT_FOUND", +"ENDPOINT_RESOURCE_EXHAUSTED", +"OTHER" +], +"enumDescriptions": [ +"Default value. This value is unused.", +"The authorizing user has revoked the grant of one or more OAuth scopes. To learn more about authorization for Google Workspace, see [Configure the OAuth consent screen](https://developers.google.com/workspace/guides/configure-oauth-consent#choose-scopes).", +"The target resource for the subscription no longer exists.", +"The user that authorized the creation of the subscription no longer has access to the subscription's target resource.", +"The Google Workspace application doesn't have access to deliver events to your subscription's notification endpoint.", +"The subscription's notification endpoint doesn't exist, or the endpoint can't be found in the Google Cloud project where you created the subscription.", +"The subscription's notification endpoint failed to receive events due to insufficient quota or reaching rate limiting.", +"An unidentified error has occurred." +], +"readOnly": true, +"type": "string" +}, +"targetResource": { +"description": "Required. Immutable. The Google Workspace resource that's monitored for events, formatted as the [full resource name](https://google.aip.dev/122#full-resource-names). To learn about target resources and the events that they support, see [Supported Google Workspace events](https://developers.google.com/workspace/events#supported-events). A user can only authorize your app to create one subscription for a given target resource. If your app tries to create another subscription with the same user credentials, the request returns an `ALREADY_EXISTS` error.", +"type": "string" +}, +"ttl": { +"description": "Input only. The time-to-live (TTL) or duration for the subscription. If unspecified or set to `0`, uses the maximum possible duration.", +"format": "google-duration", +"type": "string" +}, +"uid": { +"description": "Output only. System-assigned unique identifier for the subscription.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. The last time that the subscription is updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Google Workspace Events API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workstations.v1.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workstations.v1.json new file mode 100644 index 0000000000000000000000000000000000000000..6cd0239e64d9406fbf77a6458b40f36039085ccb --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workstations.v1.json @@ -0,0 +1,2411 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://workstations.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Workstations", +"description": "Allows administrators to create managed developer environments in the cloud. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/workstations", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workstations:v1", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workstations.mtls.googleapis.com/", +"name": "workstations", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"methods": { +"get": { +"description": "Gets information about a location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Resource name for the location.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Location" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists information about the supported locations for this service.", +"flatPath": "v1/projects/{projectsId}/locations", +"httpMethod": "GET", +"id": "workstations.projects.locations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like `\"displayName=tokyo\"`, and is documented in more detail in [AIP-160](https://google.aip.dev/160).", +"location": "query", +"type": "string" +}, +"name": { +"description": "The resource that owns the locations collection, if applicable.", +"location": "path", +"pattern": "^projects/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The maximum number of results to return. If not set, the service selects a default.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/locations", +"response": { +"$ref": "ListLocationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "workstations.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "workstations.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"workstationClusters": { +"methods": { +"create": { +"description": "Creates a new workstation cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +}, +"workstationClusterId": { +"description": "Required. ID to use for the workstation cluster.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/workstationClusters", +"request": { +"$ref": "WorkstationCluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified workstation cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.workstationClusters.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", +"location": "query", +"type": "string" +}, +"force": { +"description": "Optional. If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. Name of the workstation cluster to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the requested workstation cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the requested resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "WorkstationCluster" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns all workstation clusters in the specified location.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/workstationClusters", +"response": { +"$ref": "ListWorkstationClustersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workstation cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", +"httpMethod": "PATCH", +"id": "workstations.projects.locations.workstationClusters.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Identifier. Full name of this workstation cluster.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask that specifies which fields in the workstation cluster should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "WorkstationCluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"workstationConfigs": { +"methods": { +"create": { +"description": "Creates a new workstation configuration.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +}, +"workstationConfigId": { +"description": "Required. ID to use for the workstation configuration.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/workstationConfigs", +"request": { +"$ref": "WorkstationConfig" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified workstation configuration.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", +"location": "query", +"type": "string" +}, +"force": { +"description": "Optional. If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. Name of the workstation configuration to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the requested workstation configuration.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the requested resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "WorkstationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:getIamPolicy", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns all workstation configurations in the specified cluster.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/workstationConfigs", +"response": { +"$ref": "ListWorkstationConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listUsable": { +"description": "Returns all workstation configurations in the specified cluster on which the caller has the \"workstations.workstation.create\" permission.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs:listUsable", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/workstationConfigs:listUsable", +"response": { +"$ref": "ListUsableWorkstationConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workstation configuration.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", +"httpMethod": "PATCH", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Identifier. Full name of this workstation configuration.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask specifying which fields in the workstation configuration should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "WorkstationConfig" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:setIamPolicy", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:testIamPermissions", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"workstations": { +"methods": { +"create": { +"description": "Creates a new workstation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +}, +"workstationId": { +"description": "Required. ID to use for the workstation.", +"location": "query", +"type": "string" +} +}, +"path": "v1/{+parent}/workstations", +"request": { +"$ref": "Workstation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified workstation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. Name of the workstation to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"generateAccessToken": { +"description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", +"parameterOrder": [ +"workstation" +], +"parameters": { +"workstation": { +"description": "Required. Name of the workstation for which the access token should be generated.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+workstation}:generateAccessToken", +"request": { +"$ref": "GenerateAccessTokenRequest" +}, +"response": { +"$ref": "GenerateAccessTokenResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the requested workstation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the requested resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}", +"response": { +"$ref": "Workstation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:getIamPolicy", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns all Workstations using the specified workstation configuration.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/workstations", +"response": { +"$ref": "ListWorkstationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listUsable": { +"description": "Returns all workstations using the specified workstation configuration on which the caller has the \"workstations.workstations.use\" permission.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations:listUsable", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+parent}/workstations:listUsable", +"response": { +"$ref": "ListUsableWorkstationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workstation.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", +"httpMethod": "PATCH", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Identifier. Full name of this workstation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask specifying which fields in the workstation configuration should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1/{+name}", +"request": { +"$ref": "Workstation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:setIamPolicy", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts running a workstation so that users can connect to it.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:start", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workstation to start.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:start", +"request": { +"$ref": "StartWorkstationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops running a workstation, reducing costs.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:stop", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workstation to stop.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+name}:stop", +"request": { +"$ref": "StopWorkstationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:testIamPermissions", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://workstations.googleapis.com/", +"schemas": { +"Accelerator": { +"description": "An accelerator card attached to the instance.", +"id": "Accelerator", +"properties": { +"count": { +"description": "Optional. Number of accelerator cards exposed to the instance.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "Optional. Type of accelerator resource to attach to the instance, for example, `\"nvidia-tesla-p100\"`.", +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Container": { +"description": "A Docker container.", +"id": "Container", +"properties": { +"args": { +"description": "Optional. Arguments passed to the entrypoint.", +"items": { +"type": "string" +}, +"type": "array" +}, +"command": { +"description": "Optional. If set, overrides the default ENTRYPOINT specified by the image.", +"items": { +"type": "string" +}, +"type": "array" +}, +"env": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Environment variables passed to the container's entrypoint.", +"type": "object" +}, +"image": { +"description": "Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration. If using a custom container image, the service account must have [Artifact Registry Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) permission to pull the specified image. Otherwise, the image must be publicly accessible.", +"type": "string" +}, +"runAsUser": { +"description": "Optional. If set, overrides the USER specified in the image with the given uid.", +"format": "int32", +"type": "integer" +}, +"workingDir": { +"description": "Optional. If set, overrides the default DIR specified by the image.", +"type": "string" +} +}, +"type": "object" +}, +"CustomerEncryptionKey": { +"description": "A customer-managed encryption key (CMEK) for the Compute Engine resources of the associated workstation configuration. Specify the name of your Cloud KMS encryption key and the default service account. We recommend that you use a separate service account and follow [Cloud KMS best practices](https://cloud.google.com/kms/docs/separation-of-duties).", +"id": "CustomerEncryptionKey", +"properties": { +"kmsKey": { +"description": "Immutable. The name of the Google Cloud KMS encryption key. For example, `\"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME\"`. The key must be in the same region as the workstation configuration.", +"type": "string" +}, +"kmsKeyServiceAccount": { +"description": "Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see [Separation of duties](https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud kms keys add-iam-policy-binding` [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).", +"type": "string" +} +}, +"type": "object" +}, +"DomainConfig": { +"description": "Configuration options for a custom domain.", +"id": "DomainConfig", +"properties": { +"domain": { +"description": "Immutable. Domain used by Workstations for HTTP ingress.", +"type": "string" +} +}, +"type": "object" +}, +"EphemeralDirectory": { +"description": "An ephemeral directory which won't persist across workstation sessions. It is freshly created on every workstation start operation.", +"id": "EphemeralDirectory", +"properties": { +"gcePd": { +"$ref": "GcePersistentDisk", +"description": "An EphemeralDirectory backed by a Compute Engine persistent disk." +}, +"mountPath": { +"description": "Required. Location of this directory in the running workstation.", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GceConfidentialInstanceConfig": { +"description": "A set of Compute Engine Confidential VM instance options.", +"id": "GceConfidentialInstanceConfig", +"properties": { +"enableConfidentialCompute": { +"description": "Optional. Whether the instance has confidential compute enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"GceInstance": { +"description": "A runtime using a Compute Engine instance.", +"id": "GceInstance", +"properties": { +"accelerators": { +"description": "Optional. A list of the type and count of accelerator cards attached to the instance.", +"items": { +"$ref": "Accelerator" +}, +"type": "array" +}, +"bootDiskSizeGb": { +"description": "Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.", +"format": "int32", +"type": "integer" +}, +"confidentialInstanceConfig": { +"$ref": "GceConfidentialInstanceConfig", +"description": "Optional. A set of Compute Engine Confidential VM instance options." +}, +"disablePublicIpAddresses": { +"description": "Optional. When set to true, disables public IP addresses for VMs. If you disable public IP addresses, you must set up Private Google Access or Cloud NAT on your network. If you use Private Google Access and you use `private.googleapis.com` or `restricted.googleapis.com` for Container Registry and Artifact Registry, make sure that you set up DNS records for domains `*.gcr.io` and `*.pkg.dev`. Defaults to false (VMs have public IP addresses).", +"type": "boolean" +}, +"disableSsh": { +"description": "Optional. Whether to disable SSH access to the VM.", +"type": "boolean" +}, +"enableNestedVirtualization": { +"description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created using this workstation configuration. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested virtualization may not be enabled on workstation configurations with accelerators. * **Operating System**: Because [Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) does not support nested virtualization, when nested virtualization is enabled, the underlying Compute Engine VM instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image.", +"type": "boolean" +}, +"machineType": { +"description": "Optional. The type of machine to use for VM instances\u2014for example, `\"e2-standard-4\"`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types).", +"type": "string" +}, +"poolSize": { +"description": "Optional. The number of VMs that the system should keep idle so that new workstations can be started quickly for new users. Defaults to `0` in the API.", +"format": "int32", +"type": "integer" +}, +"pooledInstances": { +"description": "Output only. Number of instances currently available in the pool for faster workstation startup.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"serviceAccount": { +"description": "Optional. The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logginglogEntries.create` permission on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have [Artifact Registry Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) permission to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.", +"type": "string" +}, +"serviceAccountScopes": { +"description": "Optional. Scopes to grant to the service_account. Various scopes are automatically added based on feature usage. When specified, users of workstations under this configuration must have `iam.serviceAccounts.actAs` on the service account.", +"items": { +"type": "string" +}, +"type": "array" +}, +"shieldedInstanceConfig": { +"$ref": "GceShieldedInstanceConfig", +"description": "Optional. A set of Compute Engine Shielded instance options." +}, +"tags": { +"description": "Optional. Network tags to add to the Compute Engine VMs backing the workstations. This option applies [network tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs created with this configuration. These network tags enable the creation of [firewall rules](https://cloud.google.com/workstations/docs/configure-firewall-rules).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"GcePersistentDisk": { +"description": "An EphemeralDirectory is backed by a Compute Engine persistent disk.", +"id": "GcePersistentDisk", +"properties": { +"diskType": { +"description": "Optional. Type of the disk to use. Defaults to `\"pd-standard\"`.", +"type": "string" +}, +"readOnly": { +"description": "Optional. Whether the disk is read only. If true, the disk may be shared by multiple VMs and source_snapshot must be set.", +"type": "boolean" +}, +"sourceImage": { +"description": "Optional. Name of the disk image to use as the source for the disk. Must be empty if source_snapshot is set. Updating source_image will update content in the ephemeral directory after the workstation is restarted. This field is mutable.", +"type": "string" +}, +"sourceSnapshot": { +"description": "Optional. Name of the snapshot to use as the source for the disk. Must be empty if source_image is set. Must be empty if read_only is false. Updating source_snapshot will update content in the ephemeral directory after the workstation is restarted. This field is mutable.", +"type": "string" +} +}, +"type": "object" +}, +"GceRegionalPersistentDisk": { +"description": "A Persistent Directory backed by a Compute Engine regional persistent disk. The persistent_directories field is repeated, but it may contain only one entry. It creates a [persistent disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that mounts to the workstation VM at `/home` when the session starts and detaches when the session ends. If this field is empty, workstations created with this configuration do not have a persistent home directory.", +"id": "GceRegionalPersistentDisk", +"properties": { +"diskType": { +"description": "Optional. The [type of the persistent disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `\"pd-standard\"`.", +"type": "string" +}, +"fsType": { +"description": "Optional. Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if source_snapshot is set. Defaults to `\"ext4\"`.", +"type": "string" +}, +"reclaimPolicy": { +"description": "Optional. Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.", +"enum": [ +"RECLAIM_POLICY_UNSPECIFIED", +"DELETE", +"RETAIN" +], +"enumDescriptions": [ +"Do not use.", +"Delete the persistent disk when deleting the workstation.", +"Keep the persistent disk when deleting the workstation. An administrator must manually delete the disk." +], +"type": "string" +}, +"sizeGb": { +"description": "Optional. The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if source_snapshot is set. Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. Defaults to `200`. If less than `200` GB, the disk_type must be `\"pd-balanced\"` or `\"pd-ssd\"`.", +"format": "int32", +"type": "integer" +}, +"sourceSnapshot": { +"description": "Optional. Name of the snapshot to use as the source for the disk. If set, size_gb and fs_type must be empty.", +"type": "string" +} +}, +"type": "object" +}, +"GceShieldedInstanceConfig": { +"description": "A set of Compute Engine Shielded instance options.", +"id": "GceShieldedInstanceConfig", +"properties": { +"enableIntegrityMonitoring": { +"description": "Optional. Whether the instance has integrity monitoring enabled.", +"type": "boolean" +}, +"enableSecureBoot": { +"description": "Optional. Whether the instance has Secure Boot enabled.", +"type": "boolean" +}, +"enableVtpm": { +"description": "Optional. Whether the instance has the vTPM enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"GenerateAccessTokenRequest": { +"description": "Request message for GenerateAccessToken.", +"id": "GenerateAccessTokenRequest", +"properties": { +"expireTime": { +"description": "Desired expiration time of the access token. This value must be at most 24 hours in the future. If a value is not specified, the token's expiration time will be set to a default value of 1 hour in the future.", +"format": "google-datetime", +"type": "string" +}, +"ttl": { +"description": "Desired lifetime duration of the access token. This value must be at most 24 hours. If a value is not specified, the token's lifetime will be set to a default value of 1 hour.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GenerateAccessTokenResponse": { +"description": "Response message for GenerateAccessToken.", +"id": "GenerateAccessTokenResponse", +"properties": { +"accessToken": { +"description": "The generated bearer access token. To use this token, include it in an Authorization header of an HTTP request sent to the associated workstation's hostname\u2014for example, `Authorization: Bearer `.", +"type": "string" +}, +"expireTime": { +"description": "Time at which the generated token will expire.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"Host": { +"description": "Runtime host for a workstation.", +"id": "Host", +"properties": { +"gceInstance": { +"$ref": "GceInstance", +"description": "Specifies a Compute Engine instance as the host." +} +}, +"type": "object" +}, +"ListLocationsResponse": { +"description": "The response message for Locations.ListLocations.", +"id": "ListLocationsResponse", +"properties": { +"locations": { +"description": "A list of locations that matches the specified filter in the request.", +"items": { +"$ref": "Location" +}, +"type": "array" +}, +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUsableWorkstationConfigsResponse": { +"description": "Response message for ListUsableWorkstationConfigs.", +"id": "ListUsableWorkstationConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstationConfigs": { +"description": "The requested configs.", +"items": { +"$ref": "WorkstationConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUsableWorkstationsResponse": { +"description": "Response message for ListUsableWorkstations.", +"id": "ListUsableWorkstationsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstations": { +"description": "The requested workstations.", +"items": { +"$ref": "Workstation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkstationClustersResponse": { +"description": "Response message for ListWorkstationClusters.", +"id": "ListWorkstationClustersResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstationClusters": { +"description": "The requested workstation clusters.", +"items": { +"$ref": "WorkstationCluster" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkstationConfigsResponse": { +"description": "Response message for ListWorkstationConfigs.", +"id": "ListWorkstationConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstationConfigs": { +"description": "The requested configs.", +"items": { +"$ref": "WorkstationConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkstationsResponse": { +"description": "Response message for ListWorkstations.", +"id": "ListWorkstationsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Optional. Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstations": { +"description": "The requested workstations.", +"items": { +"$ref": "Workstation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Location": { +"description": "A resource that represents a Google Cloud location.", +"id": "Location", +"properties": { +"displayName": { +"description": "The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Cross-service attributes for the location. For example {\"cloud.googleapis.com/region\": \"us-east1\"}", +"type": "object" +}, +"locationId": { +"description": "The canonical id for this location. For example: `\"us-east1\"`.", +"type": "string" +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata. For example the available capacity at the given location.", +"type": "object" +}, +"name": { +"description": "Resource name for the location, which may vary between implementations. For example: `\"projects/example-project/locations/us-east1\"`", +"type": "string" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata for long-running operations.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. Time that the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Time that the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PersistentDirectory": { +"description": "A directory to persist across workstation sessions.", +"id": "PersistentDirectory", +"properties": { +"gcePd": { +"$ref": "GceRegionalPersistentDisk", +"description": "A PersistentDirectory backed by a Compute Engine persistent disk." +}, +"mountPath": { +"description": "Optional. Location of this directory in the running workstation.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PrivateClusterConfig": { +"description": "Configuration options for private workstation clusters.", +"id": "PrivateClusterConfig", +"properties": { +"allowedProjects": { +"description": "Optional. Additional projects that are allowed to attach to the workstation cluster's service attachment. By default, the workstation cluster's project and the VPC host project (if different) are allowed.", +"items": { +"type": "string" +}, +"type": "array" +}, +"clusterHostname": { +"description": "Output only. Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the workstation cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.", +"readOnly": true, +"type": "string" +}, +"enablePrivateEndpoint": { +"description": "Immutable. Whether Workstations endpoint is private.", +"type": "boolean" +}, +"serviceAttachmentUri": { +"description": "Output only. Service attachment URI for the workstation cluster. The service attachemnt is created when private endpoint is enabled. To access workstations in the workstation cluster, configure access to the managed service using [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ReadinessCheck": { +"description": "A readiness check to be performed on a workstation.", +"id": "ReadinessCheck", +"properties": { +"path": { +"description": "Optional. Path to which the request should be sent.", +"type": "string" +}, +"port": { +"description": "Optional. Port to which the request should be sent.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"StartWorkstationRequest": { +"description": "Request message for StartWorkstation.", +"id": "StartWorkstationRequest", +"properties": { +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"type": "boolean" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopWorkstationRequest": { +"description": "Request message for StopWorkstation.", +"id": "StopWorkstationRequest", +"properties": { +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"type": "boolean" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Workstation": { +"description": "A single instance of a developer workstation with its own persistent storage.", +"id": "Workstation", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Client-specified annotations.", +"type": "object" +}, +"createTime": { +"description": "Output only. Time when this workstation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. Time when this workstation was soft-deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Optional. Human-readable name for this workstation.", +"type": "string" +}, +"env": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Environment variables passed to the workstation container's entrypoint.", +"type": "object" +}, +"etag": { +"description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", +"type": "string" +}, +"host": { +"description": "Output only. Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format `{port}-{host}`.", +"readOnly": true, +"type": "string" +}, +"kmsKey": { +"description": "Output only. The name of the Google Cloud KMS encryption key used to encrypt this workstation. The KMS key can only be configured in the WorkstationConfig. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation and that are also propagated to the underlying Compute Engine resources.", +"type": "object" +}, +"name": { +"description": "Identifier. Full name of this workstation.", +"type": "string" +}, +"reconciling": { +"description": "Output only. Indicates whether this workstation is currently being updated to match its intended state.", +"readOnly": true, +"type": "boolean" +}, +"startTime": { +"description": "Output only. Time when this workstation was most recently successfully started, regardless of the workstation's initial state.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. Current state of the workstation.", +"enum": [ +"STATE_UNSPECIFIED", +"STATE_STARTING", +"STATE_RUNNING", +"STATE_STOPPING", +"STATE_STOPPED" +], +"enumDescriptions": [ +"Do not use.", +"The workstation is not yet ready to accept requests from users but will be soon.", +"The workstation is ready to accept requests from users.", +"The workstation is being stopped.", +"The workstation is stopped and will not be able to receive requests until it is started." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. A system-assigned unique identifier for this workstation.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when this workstation was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"WorkstationCluster": { +"description": "A workstation cluster resource in the Cloud Workstations API. Defines a group of workstations in a particular region and the VPC network they're attached to.", +"id": "WorkstationCluster", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Client-specified annotations.", +"type": "object" +}, +"conditions": { +"description": "Output only. Status conditions describing the workstation cluster's current state.", +"items": { +"$ref": "Status" +}, +"readOnly": true, +"type": "array" +}, +"controlPlaneIp": { +"description": "Output only. The private IP address of the control plane for this workstation cluster. Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. Time when this workstation cluster was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"degraded": { +"description": "Output only. Whether this workstation cluster is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in conditions.", +"readOnly": true, +"type": "boolean" +}, +"deleteTime": { +"description": "Output only. Time when this workstation cluster was soft-deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Optional. Human-readable name for this workstation cluster.", +"type": "string" +}, +"domainConfig": { +"$ref": "DomainConfig", +"description": "Optional. Configuration options for a custom domain." +}, +"etag": { +"description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation cluster and that are also propagated to the underlying Compute Engine resources.", +"type": "object" +}, +"name": { +"description": "Identifier. Full name of this workstation cluster.", +"type": "string" +}, +"network": { +"description": "Immutable. Name of the Compute Engine network in which instances associated with this workstation cluster will be created.", +"type": "string" +}, +"privateClusterConfig": { +"$ref": "PrivateClusterConfig", +"description": "Optional. Configuration for private workstation cluster." +}, +"reconciling": { +"description": "Output only. Indicates whether this workstation cluster is currently being updated to match its intended state.", +"readOnly": true, +"type": "boolean" +}, +"subnetwork": { +"description": "Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster.", +"type": "string" +}, +"uid": { +"description": "Output only. A system-assigned unique identifier for this workstation cluster.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when this workstation cluster was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"WorkstationConfig": { +"description": "A workstation configuration resource in the Cloud Workstations API. Workstation configurations act as templates for workstations. The workstation configuration defines details such as the workstation virtual machine (VM) instance type, persistent storage, container image defining environment, which IDE or Code Editor to use, and more. Administrators and platform teams can also use [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to teams or to individual developers.", +"id": "WorkstationConfig", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Client-specified annotations.", +"type": "object" +}, +"conditions": { +"description": "Output only. Status conditions describing the current resource state.", +"items": { +"$ref": "Status" +}, +"readOnly": true, +"type": "array" +}, +"container": { +"$ref": "Container", +"description": "Optional. Container that runs upon startup for each workstation using this workstation configuration." +}, +"createTime": { +"description": "Output only. Time when this workstation configuration was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"degraded": { +"description": "Output only. Whether this resource is degraded, in which case it may require user action to restore full functionality. See also the conditions field.", +"readOnly": true, +"type": "boolean" +}, +"deleteTime": { +"description": "Output only. Time when this workstation configuration was soft-deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"disableTcpConnections": { +"description": "Optional. Disables support for plain TCP connections in the workstation. By default the service supports TCP connections through a websocket relay. Setting this option to true disables that relay, which prevents the usage of services that require plain TCP connections, such as SSH. When enabled, all communication must occur over HTTPS or WSS.", +"type": "boolean" +}, +"displayName": { +"description": "Optional. Human-readable name for this workstation configuration.", +"type": "string" +}, +"enableAuditAgent": { +"description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service account must also be specified that has `logging.buckets.write` permission on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging).", +"type": "boolean" +}, +"encryptionKey": { +"$ref": "CustomerEncryptionKey", +"description": "Immutable. Encrypts resources of this workstation configuration using a customer-managed encryption key (CMEK). If specified, the boot disk of the Compute Engine instance and the persistent disk are encrypted using this encryption key. If this field is not set, the disks are encrypted using a generated key. Customer-managed encryption keys do not protect disk metadata. If the customer-managed encryption key is rotated, when the workstation instance is stopped, the system attempts to recreate the persistent disk with the new version of the key. Be sure to keep older versions of the key until the persistent disk is recreated. Otherwise, data on the persistent disk might be lost. If the encryption key is revoked, the workstation session automatically stops within 7 hours. Immutable after the workstation configuration is created." +}, +"ephemeralDirectories": { +"description": "Optional. Ephemeral directories which won't persist across workstation sessions.", +"items": { +"$ref": "EphemeralDirectory" +}, +"type": "array" +}, +"etag": { +"description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", +"type": "string" +}, +"host": { +"$ref": "Host", +"description": "Optional. Runtime host for the workstation." +}, +"idleTimeout": { +"description": "Optional. Number of seconds to wait before automatically stopping a workstation after it last received user traffic. A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration should never time out due to idleness. Provide [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) terminated by `s` for seconds\u2014for example, `\"7200s\"` (2 hours). The default is `\"1200s\"` (20 minutes).", +"format": "google-duration", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation configuration and that are also propagated to the underlying Compute Engine resources.", +"type": "object" +}, +"name": { +"description": "Identifier. Full name of this workstation configuration.", +"type": "string" +}, +"persistentDirectories": { +"description": "Optional. Directories to persist across workstation sessions.", +"items": { +"$ref": "PersistentDirectory" +}, +"type": "array" +}, +"readinessChecks": { +"description": "Optional. Readiness checks to perform when starting a workstation using this workstation configuration. Mark a workstation as running only after all specified readiness checks return 200 status codes.", +"items": { +"$ref": "ReadinessCheck" +}, +"type": "array" +}, +"reconciling": { +"description": "Output only. Indicates whether this workstation configuration is currently being updated to match its intended state.", +"readOnly": true, +"type": "boolean" +}, +"replicaZones": { +"description": "Optional. Immutable. Specifies the zones used to replicate the VM and disk resources within the region. If set, exactly two zones within the workstation cluster's region must be specified\u2014for example, `['us-central1-a', 'us-central1-f']`. If this field is empty, two default zones within the region are used. Immutable after the workstation configuration is created.", +"items": { +"type": "string" +}, +"type": "array" +}, +"runningTimeout": { +"description": "Optional. Number of seconds that a workstation can run until it is automatically shut down. We recommend that workstations be shut down daily to reduce costs and so that security updates can be applied upon restart. The idle_timeout and running_timeout fields are independent of each other. Note that the running_timeout field shuts down VMs after the specified time, regardless of whether or not the VMs are idle. Provide duration terminated by `s` for seconds\u2014for example, `\"54000s\"` (15 hours). Defaults to `\"43200s\"` (12 hours). A value of `\"0s\"` indicates that workstations using this configuration should never time out. If encryption_key is set, it must be greater than `\"0s\"` and less than `\"86400s\"` (24 hours). Warning: A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration have no maximum running time. This is strongly discouraged because you incur costs and will not pick up security updates.", +"format": "google-duration", +"type": "string" +}, +"uid": { +"description": "Output only. A system-assigned unique identifier for this workstation configuration.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when this workstation configuration was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Workstations API", +"version": "v1", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workstations.v1beta.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workstations.v1beta.json new file mode 100644 index 0000000000000000000000000000000000000000..5e76c1c865eb63fbf5ced165e3b54fcc73a4e134 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/workstations.v1beta.json @@ -0,0 +1,2336 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/cloud-platform": { +"description": "See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account." +} +} +} +}, +"basePath": "", +"baseUrl": "https://workstations.googleapis.com/", +"batchPath": "batch", +"canonicalName": "Cloud Workstations", +"description": "Allows administrators to create managed developer environments in the cloud. ", +"discoveryVersion": "v1", +"documentationLink": "https://cloud.google.com/workstations", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "workstations:v1beta", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://workstations.mtls.googleapis.com/", +"name": "workstations", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"projects": { +"resources": { +"locations": { +"resources": { +"operations": { +"methods": { +"cancel": { +"description": "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`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}:cancel", +"httpMethod": "POST", +"id": "workstations.projects.locations.operations.cancel", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be cancelled.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:cancel", +"request": { +"$ref": "CancelOperationRequest" +}, +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.operations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource to be deleted.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "GoogleProtobufEmpty" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations/{operationsId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.operations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "The name of the operation resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/operations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/operations", +"httpMethod": "GET", +"id": "workstations.projects.locations.operations.list", +"parameterOrder": [ +"name" +], +"parameters": { +"filter": { +"description": "The standard list filter.", +"location": "query", +"type": "string" +}, +"name": { +"description": "The name of the operation's parent resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"pageSize": { +"description": "The standard list page size.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "The standard list page token.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+name}/operations", +"response": { +"$ref": "ListOperationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +}, +"workstationClusters": { +"methods": { +"create": { +"description": "Creates a new workstation cluster.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +}, +"workstationClusterId": { +"description": "Required. ID to use for the workstation cluster.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstationClusters", +"request": { +"$ref": "WorkstationCluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified workstation cluster.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.workstationClusters.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation cluster on the server does not have this ETag.", +"location": "query", +"type": "string" +}, +"force": { +"description": "Optional. If set, any workstation configurations and workstations in the workstation cluster are also deleted. Otherwise, the request only works if the workstation cluster has no configurations or workstations.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. Name of the workstation cluster to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the requested workstation cluster.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the requested resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "WorkstationCluster" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns all workstation clusters in the specified location.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstationClusters", +"response": { +"$ref": "ListWorkstationClustersResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workstation cluster.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}", +"httpMethod": "PATCH", +"id": "workstations.projects.locations.workstationClusters.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set, and the workstation cluster is not found, a new workstation cluster will be created. In this situation, update_mask is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Identifier. Full name of this workstation cluster.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask that specifies which fields in the workstation cluster should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "WorkstationCluster" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"workstationConfigs": { +"methods": { +"create": { +"description": "Creates a new workstation configuration.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +}, +"workstationConfigId": { +"description": "Required. ID to use for the workstation configuration.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstationConfigs", +"request": { +"$ref": "WorkstationConfig" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified workstation configuration.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If set, the request is rejected if the latest version of the workstation configuration on the server does not have this ETag.", +"location": "query", +"type": "string" +}, +"force": { +"description": "Optional. If set, any workstations in the workstation configuration are also deleted. Otherwise, the request works only if the workstation configuration has no workstations.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Required. Name of the workstation configuration to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the requested workstation configuration.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the requested resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "WorkstationConfig" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:getIamPolicy", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns all workstation configurations in the specified cluster.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstationConfigs", +"response": { +"$ref": "ListWorkstationConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listUsable": { +"description": "Returns all workstation configurations in the specified cluster on which the caller has the \"workstations.workstation.create\" permission.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs:listUsable", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.listUsable", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstationConfigs:listUsable", +"response": { +"$ref": "ListUsableWorkstationConfigsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workstation configuration.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}", +"httpMethod": "PATCH", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set and the workstation configuration is not found, a new workstation configuration will be created. In this situation, update_mask is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Identifier. Full name of this workstation configuration.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask specifying which fields in the workstation configuration should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "WorkstationConfig" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:setIamPolicy", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}:testIamPermissions", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +}, +"resources": { +"workstations": { +"methods": { +"create": { +"description": "Creates a new workstation.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.create", +"parameterOrder": [ +"parent" +], +"parameters": { +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +}, +"workstationId": { +"description": "Required. ID to use for the workstation.", +"location": "query", +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstations", +"request": { +"$ref": "Workstation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"delete": { +"description": "Deletes the specified workstation.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", +"httpMethod": "DELETE", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.delete", +"parameterOrder": [ +"name" +], +"parameters": { +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", +"location": "query", +"type": "string" +}, +"name": { +"description": "Required. Name of the workstation to delete.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"generateAccessToken": { +"description": "Returns a short-lived credential that can be used to send authenticated and authorized traffic to a workstation.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:generateAccessToken", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.generateAccessToken", +"parameterOrder": [ +"workstation" +], +"parameters": { +"workstation": { +"description": "Required. Name of the workstation for which the access token should be generated.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+workstation}:generateAccessToken", +"request": { +"$ref": "GenerateAccessTokenRequest" +}, +"response": { +"$ref": "GenerateAccessTokenResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"get": { +"description": "Returns the requested workstation.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.get", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the requested resource.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}", +"response": { +"$ref": "Workstation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"getIamPolicy": { +"description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:getIamPolicy", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.getIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"options.requestedPolicyVersion": { +"description": "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).", +"format": "int32", +"location": "query", +"type": "integer" +}, +"resource": { +"description": "REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+resource}:getIamPolicy", +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"list": { +"description": "Returns all Workstations using the specified workstation configuration.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.list", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstations", +"response": { +"$ref": "ListWorkstationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"listUsable": { +"description": "Returns all workstations using the specified workstation configuration on which the caller has the \"workstations.workstations.use\" permission.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations:listUsable", +"httpMethod": "GET", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.listUsable", +"parameterOrder": [ +"parent" +], +"parameters": { +"pageSize": { +"description": "Optional. Maximum number of items to return.", +"format": "int32", +"location": "query", +"type": "integer" +}, +"pageToken": { +"description": "Optional. next_page_token value returned from a previous List request, if any.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Required. Parent resource name.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+parent}/workstations:listUsable", +"response": { +"$ref": "ListUsableWorkstationsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"patch": { +"description": "Updates an existing workstation.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}", +"httpMethod": "PATCH", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.patch", +"parameterOrder": [ +"name" +], +"parameters": { +"allowMissing": { +"description": "Optional. If set and the workstation configuration is not found, a new workstation configuration is created. In this situation, update_mask is ignored.", +"location": "query", +"type": "boolean" +}, +"name": { +"description": "Identifier. Full name of this workstation.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +}, +"updateMask": { +"description": "Required. Mask specifying which fields in the workstation configuration should be updated.", +"format": "google-fieldmask", +"location": "query", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"location": "query", +"type": "boolean" +} +}, +"path": "v1beta/{+name}", +"request": { +"$ref": "Workstation" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"setIamPolicy": { +"description": "Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:setIamPolicy", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.setIamPolicy", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+resource}:setIamPolicy", +"request": { +"$ref": "SetIamPolicyRequest" +}, +"response": { +"$ref": "Policy" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"start": { +"description": "Starts running a workstation so that users can connect to it.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:start", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.start", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workstation to start.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:start", +"request": { +"$ref": "StartWorkstationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"stop": { +"description": "Stops running a workstation, reducing costs.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:stop", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.stop", +"parameterOrder": [ +"name" +], +"parameters": { +"name": { +"description": "Required. Name of the workstation to stop.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+name}:stop", +"request": { +"$ref": "StopWorkstationRequest" +}, +"response": { +"$ref": "Operation" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +}, +"testIamPermissions": { +"description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.", +"flatPath": "v1beta/projects/{projectsId}/locations/{locationsId}/workstationClusters/{workstationClustersId}/workstationConfigs/{workstationConfigsId}/workstations/{workstationsId}:testIamPermissions", +"httpMethod": "POST", +"id": "workstations.projects.locations.workstationClusters.workstationConfigs.workstations.testIamPermissions", +"parameterOrder": [ +"resource" +], +"parameters": { +"resource": { +"description": "REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field.", +"location": "path", +"pattern": "^projects/[^/]+/locations/[^/]+/workstationClusters/[^/]+/workstationConfigs/[^/]+/workstations/[^/]+$", +"required": true, +"type": "string" +} +}, +"path": "v1beta/{+resource}:testIamPermissions", +"request": { +"$ref": "TestIamPermissionsRequest" +}, +"response": { +"$ref": "TestIamPermissionsResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/cloud-platform" +] +} +} +} +} +} +} +} +} +} +} +} +}, +"revision": "20240409", +"rootUrl": "https://workstations.googleapis.com/", +"schemas": { +"Accelerator": { +"description": "An accelerator card attached to the instance.", +"id": "Accelerator", +"properties": { +"count": { +"description": "Optional. Number of accelerator cards exposed to the instance.", +"format": "int32", +"type": "integer" +}, +"type": { +"description": "Optional. Type of accelerator resource to attach to the instance, for example, `\"nvidia-tesla-p100\"`.", +"type": "string" +} +}, +"type": "object" +}, +"AuditConfig": { +"description": "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.", +"id": "AuditConfig", +"properties": { +"auditLogConfigs": { +"description": "The configuration for logging of each type of permission.", +"items": { +"$ref": "AuditLogConfig" +}, +"type": "array" +}, +"service": { +"description": "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.", +"type": "string" +} +}, +"type": "object" +}, +"AuditLogConfig": { +"description": "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.", +"id": "AuditLogConfig", +"properties": { +"exemptedMembers": { +"description": "Specifies the identities that do not cause logging for this type of permission. Follows the same format of Binding.members.", +"items": { +"type": "string" +}, +"type": "array" +}, +"logType": { +"description": "The log type that this config enables.", +"enum": [ +"LOG_TYPE_UNSPECIFIED", +"ADMIN_READ", +"DATA_WRITE", +"DATA_READ" +], +"enumDescriptions": [ +"Default case. Should never be this.", +"Admin reads. Example: CloudIAM getIamPolicy", +"Data writes. Example: CloudSQL Users create", +"Data reads. Example: CloudSQL Users list" +], +"type": "string" +} +}, +"type": "object" +}, +"Binding": { +"description": "Associates `members`, or principals, with a `role`.", +"id": "Binding", +"properties": { +"condition": { +"$ref": "Expr", +"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)." +}, +"members": { +"description": "Specifies the principals requesting access for a Google Cloud 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. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `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. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.", +"items": { +"type": "string" +}, +"type": "array" +}, +"role": { +"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).", +"type": "string" +} +}, +"type": "object" +}, +"BoostConfig": { +"description": "A configuration that workstations can boost to.", +"id": "BoostConfig", +"properties": { +"accelerators": { +"description": "Optional. A list of the type and count of accelerator cards attached to the boost instance. Defaults to `none`.", +"items": { +"$ref": "Accelerator" +}, +"type": "array" +}, +"id": { +"description": "Optional. Required. The id to be used for the boost config.", +"type": "string" +}, +"machineType": { +"description": "Optional. The type of machine that boosted VM instances will use\u2014for example, `e2-standard-4`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types). Defaults to `e2-standard-4`.", +"type": "string" +}, +"poolSize": { +"description": "Optional. The number of boost VMs that the system should keep idle so that workstations can be boosted quickly. Defaults to `0`.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"CancelOperationRequest": { +"description": "The request message for Operations.CancelOperation.", +"id": "CancelOperationRequest", +"properties": {}, +"type": "object" +}, +"Container": { +"description": "A Docker container.", +"id": "Container", +"properties": { +"args": { +"description": "Optional. Arguments passed to the entrypoint.", +"items": { +"type": "string" +}, +"type": "array" +}, +"command": { +"description": "Optional. If set, overrides the default ENTRYPOINT specified by the image.", +"items": { +"type": "string" +}, +"type": "array" +}, +"env": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Environment variables passed to the container's entrypoint.", +"type": "object" +}, +"image": { +"description": "Optional. A Docker container image that defines a custom environment. Cloud Workstations provides a number of [preconfigured images](https://cloud.google.com/workstations/docs/preconfigured-base-images), but you can create your own [custom container images](https://cloud.google.com/workstations/docs/custom-container-images). If using a private image, the `host.gceInstance.serviceAccount` field must be specified in the workstation configuration. If using a custom container image, the service account must have [Artifact Registry Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) permission to pull the specified image. Otherwise, the image must be publicly accessible.", +"type": "string" +}, +"runAsUser": { +"description": "Optional. If set, overrides the USER specified in the image with the given uid.", +"format": "int32", +"type": "integer" +}, +"workingDir": { +"description": "Optional. If set, overrides the default DIR specified by the image.", +"type": "string" +} +}, +"type": "object" +}, +"CustomerEncryptionKey": { +"description": "A customer-managed encryption key (CMEK) for the Compute Engine resources of the associated workstation configuration. Specify the name of your Cloud KMS encryption key and the default service account. We recommend that you use a separate service account and follow [Cloud KMS best practices](https://cloud.google.com/kms/docs/separation-of-duties).", +"id": "CustomerEncryptionKey", +"properties": { +"kmsKey": { +"description": "Immutable. The name of the Google Cloud KMS encryption key. For example, `\"projects/PROJECT_ID/locations/REGION/keyRings/KEY_RING/cryptoKeys/KEY_NAME\"`. The key must be in the same region as the workstation configuration.", +"type": "string" +}, +"kmsKeyServiceAccount": { +"description": "Immutable. The service account to use with the specified KMS key. We recommend that you use a separate service account and follow KMS best practices. For more information, see [Separation of duties](https://cloud.google.com/kms/docs/separation-of-duties) and `gcloud kms keys add-iam-policy-binding` [`--member`](https://cloud.google.com/sdk/gcloud/reference/kms/keys/add-iam-policy-binding#--member).", +"type": "string" +} +}, +"type": "object" +}, +"DomainConfig": { +"description": "Configuration options for a custom domain.", +"id": "DomainConfig", +"properties": { +"domain": { +"description": "Immutable. Domain used by Workstations for HTTP ingress.", +"type": "string" +} +}, +"type": "object" +}, +"EphemeralDirectory": { +"description": "An ephemeral directory which won't persist across workstation sessions. It is freshly created on every workstation start operation.", +"id": "EphemeralDirectory", +"properties": { +"gcePd": { +"$ref": "GcePersistentDisk", +"description": "An EphemeralDirectory backed by a Compute Engine persistent disk." +}, +"mountPath": { +"description": "Required. Location of this directory in the running workstation.", +"type": "string" +} +}, +"type": "object" +}, +"Expr": { +"description": "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.", +"id": "Expr", +"properties": { +"description": { +"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.", +"type": "string" +}, +"expression": { +"description": "Textual representation of an expression in Common Expression Language syntax.", +"type": "string" +}, +"location": { +"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.", +"type": "string" +}, +"title": { +"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.", +"type": "string" +} +}, +"type": "object" +}, +"GceConfidentialInstanceConfig": { +"description": "A set of Compute Engine Confidential VM instance options.", +"id": "GceConfidentialInstanceConfig", +"properties": { +"enableConfidentialCompute": { +"description": "Optional. Whether the instance has confidential compute enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"GceInstance": { +"description": "A runtime using a Compute Engine instance.", +"id": "GceInstance", +"properties": { +"accelerators": { +"description": "Optional. A list of the type and count of accelerator cards attached to the instance.", +"items": { +"$ref": "Accelerator" +}, +"type": "array" +}, +"boostConfigs": { +"description": "Optional. A list of the boost configurations that workstations created using this workstation configuration are allowed to use.", +"items": { +"$ref": "BoostConfig" +}, +"type": "array" +}, +"bootDiskSizeGb": { +"description": "Optional. The size of the boot disk for the VM in gigabytes (GB). The minimum boot disk size is `30` GB. Defaults to `50` GB.", +"format": "int32", +"type": "integer" +}, +"confidentialInstanceConfig": { +"$ref": "GceConfidentialInstanceConfig", +"description": "Optional. A set of Compute Engine Confidential VM instance options." +}, +"disablePublicIpAddresses": { +"description": "Optional. When set to true, disables public IP addresses for VMs. If you disable public IP addresses, you must set up Private Google Access or Cloud NAT on your network. If you use Private Google Access and you use `private.googleapis.com` or `restricted.googleapis.com` for Container Registry and Artifact Registry, make sure that you set up DNS records for domains `*.gcr.io` and `*.pkg.dev`. Defaults to false (VMs have public IP addresses).", +"type": "boolean" +}, +"disableSsh": { +"description": "Optional. Whether to disable SSH access to the VM.", +"type": "boolean" +}, +"enableNestedVirtualization": { +"description": "Optional. Whether to enable nested virtualization on Cloud Workstations VMs created using this workstation configuration. Nested virtualization lets you run virtual machine (VM) instances inside your workstation. Before enabling nested virtualization, consider the following important considerations. Cloud Workstations instances are subject to the [same restrictions as Compute Engine instances](https://cloud.google.com/compute/docs/instances/nested-virtualization/overview#restrictions): * **Organization policy**: projects, folders, or organizations may be restricted from creating nested VMs if the **Disable VM nested virtualization** constraint is enforced in the organization policy. For more information, see the Compute Engine section, [Checking whether nested virtualization is allowed](https://cloud.google.com/compute/docs/instances/nested-virtualization/managing-constraint#checking_whether_nested_virtualization_is_allowed). * **Performance**: nested VMs might experience a 10% or greater decrease in performance for workloads that are CPU-bound and possibly greater than a 10% decrease for workloads that are input/output bound. * **Machine Type**: nested virtualization can only be enabled on workstation configurations that specify a machine_type in the N1 or N2 machine series. * **GPUs**: nested virtualization may not be enabled on workstation configurations with accelerators. * **Operating System**: Because [Container-Optimized OS](https://cloud.google.com/compute/docs/images/os-details#container-optimized_os_cos) does not support nested virtualization, when nested virtualization is enabled, the underlying Compute Engine VM instances boot from an [Ubuntu LTS](https://cloud.google.com/compute/docs/images/os-details#ubuntu_lts) image.", +"type": "boolean" +}, +"machineType": { +"description": "Optional. The type of machine to use for VM instances\u2014for example, `\"e2-standard-4\"`. For more information about machine types that Cloud Workstations supports, see the list of [available machine types](https://cloud.google.com/workstations/docs/available-machine-types).", +"type": "string" +}, +"poolSize": { +"description": "Optional. The number of VMs that the system should keep idle so that new workstations can be started quickly for new users. Defaults to `0` in the API.", +"format": "int32", +"type": "integer" +}, +"pooledInstances": { +"description": "Output only. Number of instances currently available in the pool for faster workstation startup.", +"format": "int32", +"readOnly": true, +"type": "integer" +}, +"serviceAccount": { +"description": "Optional. The email address of the service account for Cloud Workstations VMs created with this configuration. When specified, be sure that the service account has `logginglogEntries.create` permission on the project so it can write logs out to Cloud Logging. If using a custom container image, the service account must have [Artifact Registry Reader](https://cloud.google.com/artifact-registry/docs/access-control#roles) permission to pull the specified image. If you as the administrator want to be able to `ssh` into the underlying VM, you need to set this value to a service account for which you have the `iam.serviceAccounts.actAs` permission. Conversely, if you don't want anyone to be able to `ssh` into the underlying VM, use a service account where no one has that permission. If not set, VMs run with a service account provided by the Cloud Workstations service, and the image must be publicly accessible.", +"type": "string" +}, +"serviceAccountScopes": { +"description": "Optional. Scopes to grant to the service_account. Various scopes are automatically added based on feature usage. When specified, users of workstations under this configuration must have `iam.serviceAccounts.actAs` on the service account.", +"items": { +"type": "string" +}, +"type": "array" +}, +"shieldedInstanceConfig": { +"$ref": "GceShieldedInstanceConfig", +"description": "Optional. A set of Compute Engine Shielded instance options." +}, +"tags": { +"description": "Optional. Network tags to add to the Compute Engine VMs backing the workstations. This option applies [network tags](https://cloud.google.com/vpc/docs/add-remove-network-tags) to VMs created with this configuration. These network tags enable the creation of [firewall rules](https://cloud.google.com/workstations/docs/configure-firewall-rules).", +"items": { +"type": "string" +}, +"type": "array" +}, +"vmTags": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Resource manager tags to be bound to this instance. Tag keys and values have the same definition as https://cloud.google.com/resource-manager/docs/tags/tags-overview Keys must be in the format `tagKeys/{tag_key_id}`, and values are in the format `tagValues/456`.", +"type": "object" +} +}, +"type": "object" +}, +"GcePersistentDisk": { +"description": "An EphemeralDirectory is backed by a Compute Engine persistent disk.", +"id": "GcePersistentDisk", +"properties": { +"diskType": { +"description": "Optional. Type of the disk to use. Defaults to `\"pd-standard\"`.", +"type": "string" +}, +"readOnly": { +"description": "Optional. Whether the disk is read only. If true, the disk may be shared by multiple VMs and source_snapshot must be set.", +"type": "boolean" +}, +"sourceImage": { +"description": "Optional. Name of the disk image to use as the source for the disk. Must be empty if source_snapshot is set. Updating source_image will update content in the ephemeral directory after the workstation is restarted. This field is mutable.", +"type": "string" +}, +"sourceSnapshot": { +"description": "Optional. Name of the snapshot to use as the source for the disk. Must be empty if source_image is set. Must be empty if read_only is false. Updating source_snapshot will update content in the ephemeral directory after the workstation is restarted. This field is mutable.", +"type": "string" +} +}, +"type": "object" +}, +"GceRegionalPersistentDisk": { +"description": "A Persistent Directory backed by a Compute Engine regional persistent disk. The persistent_directories field is repeated, but it may contain only one entry. It creates a [persistent disk](https://cloud.google.com/compute/docs/disks/persistent-disks) that mounts to the workstation VM at `/home` when the session starts and detaches when the session ends. If this field is empty, workstations created with this configuration do not have a persistent home directory.", +"id": "GceRegionalPersistentDisk", +"properties": { +"diskType": { +"description": "Optional. The [type of the persistent disk](https://cloud.google.com/compute/docs/disks#disk-types) for the home directory. Defaults to `\"pd-standard\"`.", +"type": "string" +}, +"fsType": { +"description": "Optional. Type of file system that the disk should be formatted with. The workstation image must support this file system type. Must be empty if source_snapshot is set. Defaults to `\"ext4\"`.", +"type": "string" +}, +"reclaimPolicy": { +"description": "Optional. Whether the persistent disk should be deleted when the workstation is deleted. Valid values are `DELETE` and `RETAIN`. Defaults to `DELETE`.", +"enum": [ +"RECLAIM_POLICY_UNSPECIFIED", +"DELETE", +"RETAIN" +], +"enumDescriptions": [ +"Do not use.", +"Delete the persistent disk when deleting the workstation.", +"Keep the persistent disk when deleting the workstation. An administrator must manually delete the disk." +], +"type": "string" +}, +"sizeGb": { +"description": "Optional. The GB capacity of a persistent home directory for each workstation created with this configuration. Must be empty if source_snapshot is set. Valid values are `10`, `50`, `100`, `200`, `500`, or `1000`. Defaults to `200`. If less than `200` GB, the disk_type must be `\"pd-balanced\"` or `\"pd-ssd\"`.", +"format": "int32", +"type": "integer" +}, +"sourceSnapshot": { +"description": "Optional. Name of the snapshot to use as the source for the disk. If set, size_gb and fs_type must be empty.", +"type": "string" +} +}, +"type": "object" +}, +"GceShieldedInstanceConfig": { +"description": "A set of Compute Engine Shielded instance options.", +"id": "GceShieldedInstanceConfig", +"properties": { +"enableIntegrityMonitoring": { +"description": "Optional. Whether the instance has integrity monitoring enabled.", +"type": "boolean" +}, +"enableSecureBoot": { +"description": "Optional. Whether the instance has Secure Boot enabled.", +"type": "boolean" +}, +"enableVtpm": { +"description": "Optional. Whether the instance has the vTPM enabled.", +"type": "boolean" +} +}, +"type": "object" +}, +"GenerateAccessTokenRequest": { +"description": "Request message for GenerateAccessToken.", +"id": "GenerateAccessTokenRequest", +"properties": { +"expireTime": { +"description": "Desired expiration time of the access token. This value must be at most 24 hours in the future. If a value is not specified, the token's expiration time will be set to a default value of 1 hour in the future.", +"format": "google-datetime", +"type": "string" +}, +"ttl": { +"description": "Desired lifetime duration of the access token. This value must be at most 24 hours. If a value is not specified, the token's lifetime will be set to a default value of 1 hour.", +"format": "google-duration", +"type": "string" +} +}, +"type": "object" +}, +"GenerateAccessTokenResponse": { +"description": "Response message for GenerateAccessToken.", +"id": "GenerateAccessTokenResponse", +"properties": { +"accessToken": { +"description": "The generated bearer access token. To use this token, include it in an Authorization header of an HTTP request sent to the associated workstation's hostname\u2014for example, `Authorization: Bearer `.", +"type": "string" +}, +"expireTime": { +"description": "Time at which the generated token will expire.", +"format": "google-datetime", +"type": "string" +} +}, +"type": "object" +}, +"GoogleProtobufEmpty": { +"description": "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); }", +"id": "GoogleProtobufEmpty", +"properties": {}, +"type": "object" +}, +"Host": { +"description": "Runtime host for a workstation.", +"id": "Host", +"properties": { +"gceInstance": { +"$ref": "GceInstance", +"description": "Specifies a Compute Engine instance as the host." +} +}, +"type": "object" +}, +"ListOperationsResponse": { +"description": "The response message for Operations.ListOperations.", +"id": "ListOperationsResponse", +"properties": { +"nextPageToken": { +"description": "The standard List next-page token.", +"type": "string" +}, +"operations": { +"description": "A list of operations that matches the specified filter in the request.", +"items": { +"$ref": "Operation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUsableWorkstationConfigsResponse": { +"description": "Response message for ListUsableWorkstationConfigs.", +"id": "ListUsableWorkstationConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstationConfigs": { +"description": "The requested configs.", +"items": { +"$ref": "WorkstationConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListUsableWorkstationsResponse": { +"description": "Response message for ListUsableWorkstations.", +"id": "ListUsableWorkstationsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstations": { +"description": "The requested workstations.", +"items": { +"$ref": "Workstation" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkstationClustersResponse": { +"description": "Response message for ListWorkstationClusters.", +"id": "ListWorkstationClustersResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstationClusters": { +"description": "The requested workstation clusters.", +"items": { +"$ref": "WorkstationCluster" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkstationConfigsResponse": { +"description": "Response message for ListWorkstationConfigs.", +"id": "ListWorkstationConfigsResponse", +"properties": { +"nextPageToken": { +"description": "Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstationConfigs": { +"description": "The requested configs.", +"items": { +"$ref": "WorkstationConfig" +}, +"type": "array" +} +}, +"type": "object" +}, +"ListWorkstationsResponse": { +"description": "Response message for ListWorkstations.", +"id": "ListWorkstationsResponse", +"properties": { +"nextPageToken": { +"description": "Optional. Token to retrieve the next page of results, or empty if there are no more results in the list.", +"type": "string" +}, +"unreachable": { +"description": "Optional. Unreachable resources.", +"items": { +"type": "string" +}, +"type": "array" +}, +"workstations": { +"description": "The requested workstations.", +"items": { +"$ref": "Workstation" +}, +"type": "array" +} +}, +"type": "object" +}, +"Operation": { +"description": "This resource represents a long-running operation that is the result of a network API call.", +"id": "Operation", +"properties": { +"done": { +"description": "If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.", +"type": "boolean" +}, +"error": { +"$ref": "Status", +"description": "The error result of the operation in case of failure or cancellation." +}, +"metadata": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.", +"type": "object" +}, +"name": { +"description": "The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.", +"type": "string" +}, +"response": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"description": "The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.", +"type": "object" +} +}, +"type": "object" +}, +"OperationMetadata": { +"description": "Metadata for long-running operations.", +"id": "OperationMetadata", +"properties": { +"apiVersion": { +"description": "Output only. API version used to start the operation.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. Time that the operation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"endTime": { +"description": "Output only. Time that the operation finished running.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"requestedCancellation": { +"description": "Output only. Identifies whether the user has requested cancellation of the operation.", +"readOnly": true, +"type": "boolean" +}, +"statusMessage": { +"description": "Output only. Human-readable status of the operation, if any.", +"readOnly": true, +"type": "string" +}, +"target": { +"description": "Output only. Server-defined resource path for the target of the operation.", +"readOnly": true, +"type": "string" +}, +"verb": { +"description": "Output only. Name of the verb executed by the operation.", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"PersistentDirectory": { +"description": "A directory to persist across workstation sessions.", +"id": "PersistentDirectory", +"properties": { +"gcePd": { +"$ref": "GceRegionalPersistentDisk", +"description": "A PersistentDirectory backed by a Compute Engine persistent disk." +}, +"mountPath": { +"description": "Optional. Location of this directory in the running workstation.", +"type": "string" +} +}, +"type": "object" +}, +"Policy": { +"description": "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/).", +"id": "Policy", +"properties": { +"auditConfigs": { +"description": "Specifies cloud audit logging configuration for this policy.", +"items": { +"$ref": "AuditConfig" +}, +"type": "array" +}, +"bindings": { +"description": "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`.", +"items": { +"$ref": "Binding" +}, +"type": "array" +}, +"etag": { +"description": "`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.", +"format": "byte", +"type": "string" +}, +"version": { +"description": "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).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PrivateClusterConfig": { +"description": "Configuration options for private workstation clusters.", +"id": "PrivateClusterConfig", +"properties": { +"allowedProjects": { +"description": "Optional. Additional projects that are allowed to attach to the workstation cluster's service attachment. By default, the workstation cluster's project and the VPC host project (if different) are allowed.", +"items": { +"type": "string" +}, +"type": "array" +}, +"clusterHostname": { +"description": "Output only. Hostname for the workstation cluster. This field will be populated only when private endpoint is enabled. To access workstations in the workstation cluster, create a new DNS zone mapping this domain name to an internal IP address and a forwarding rule mapping that address to the service attachment.", +"readOnly": true, +"type": "string" +}, +"enablePrivateEndpoint": { +"description": "Immutable. Whether Workstations endpoint is private.", +"type": "boolean" +}, +"serviceAttachmentUri": { +"description": "Output only. Service attachment URI for the workstation cluster. The service attachemnt is created when private endpoint is enabled. To access workstations in the workstation cluster, configure access to the managed service using [Private Service Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"ReadinessCheck": { +"description": "A readiness check to be performed on a workstation.", +"id": "ReadinessCheck", +"properties": { +"path": { +"description": "Optional. Path to which the request should be sent.", +"type": "string" +}, +"port": { +"description": "Optional. Port to which the request should be sent.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"SetIamPolicyRequest": { +"description": "Request message for `SetIamPolicy` method.", +"id": "SetIamPolicyRequest", +"properties": { +"policy": { +"$ref": "Policy", +"description": "REQUIRED: The complete policy to be applied to the `resource`. The size of the policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Google Cloud services (such as Projects) might reject them." +}, +"updateMask": { +"description": "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\"`", +"format": "google-fieldmask", +"type": "string" +} +}, +"type": "object" +}, +"StartWorkstationRequest": { +"description": "Request message for StartWorkstation.", +"id": "StartWorkstationRequest", +"properties": { +"boostConfig": { +"description": "Optional. If set, the workstation starts using the boost configuration with the specified ID.", +"type": "string" +}, +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"type": "boolean" +} +}, +"type": "object" +}, +"Status": { +"description": "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 data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).", +"id": "Status", +"properties": { +"code": { +"description": "The status code, which should be an enum value of google.rpc.Code.", +"format": "int32", +"type": "integer" +}, +"details": { +"description": "A list of messages that carry the error details. There is a common set of message types for APIs to use.", +"items": { +"additionalProperties": { +"description": "Properties of the object. Contains field @type with type URL.", +"type": "any" +}, +"type": "object" +}, +"type": "array" +}, +"message": { +"description": "A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.", +"type": "string" +} +}, +"type": "object" +}, +"StopWorkstationRequest": { +"description": "Request message for StopWorkstation.", +"id": "StopWorkstationRequest", +"properties": { +"etag": { +"description": "Optional. If set, the request will be rejected if the latest version of the workstation on the server does not have this ETag.", +"type": "string" +}, +"validateOnly": { +"description": "Optional. If set, validate the request and preview the review, but do not actually apply it.", +"type": "boolean" +} +}, +"type": "object" +}, +"TestIamPermissionsRequest": { +"description": "Request message for `TestIamPermissions` method.", +"id": "TestIamPermissionsRequest", +"properties": { +"permissions": { +"description": "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).", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"TestIamPermissionsResponse": { +"description": "Response message for `TestIamPermissions` method.", +"id": "TestIamPermissionsResponse", +"properties": { +"permissions": { +"description": "A subset of `TestPermissionsRequest.permissions` that the caller is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Workstation": { +"description": "A single instance of a developer workstation with its own persistent storage.", +"id": "Workstation", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Client-specified annotations.", +"type": "object" +}, +"createTime": { +"description": "Output only. Time when this workstation was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"deleteTime": { +"description": "Output only. Time when this workstation was soft-deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Optional. Human-readable name for this workstation.", +"type": "string" +}, +"env": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Environment variables passed to the workstation container's entrypoint.", +"type": "object" +}, +"etag": { +"description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", +"type": "string" +}, +"host": { +"description": "Output only. Host to which clients can send HTTPS traffic that will be received by the workstation. Authorized traffic will be received to the workstation as HTTP on port 80. To send traffic to a different port, clients may prefix the host with the destination port in the format `{port}-{host}`.", +"readOnly": true, +"type": "string" +}, +"kmsKey": { +"description": "Output only. The name of the Google Cloud KMS encryption key used to encrypt this workstation. The KMS key can only be configured in the WorkstationConfig. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.", +"readOnly": true, +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation and that are also propagated to the underlying Compute Engine resources.", +"type": "object" +}, +"name": { +"description": "Identifier. Full name of this workstation.", +"type": "string" +}, +"reconciling": { +"description": "Output only. Indicates whether this workstation is currently being updated to match its intended state.", +"readOnly": true, +"type": "boolean" +}, +"startTime": { +"description": "Output only. Time when this workstation was most recently successfully started, regardless of the workstation's initial state.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"state": { +"description": "Output only. Current state of the workstation.", +"enum": [ +"STATE_UNSPECIFIED", +"STATE_STARTING", +"STATE_RUNNING", +"STATE_STOPPING", +"STATE_STOPPED" +], +"enumDescriptions": [ +"Do not use.", +"The workstation is not yet ready to accept requests from users but will be soon.", +"The workstation is ready to accept requests from users.", +"The workstation is being stopped.", +"The workstation is stopped and will not be able to receive requests until it is started." +], +"readOnly": true, +"type": "string" +}, +"uid": { +"description": "Output only. A system-assigned unique identifier for this workstation.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when this workstation was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"WorkstationCluster": { +"description": "A workstation cluster resource in the Cloud Workstations API. Defines a group of workstations in a particular region and the VPC network they're attached to.", +"id": "WorkstationCluster", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Client-specified annotations.", +"type": "object" +}, +"conditions": { +"description": "Output only. Status conditions describing the workstation cluster's current state.", +"items": { +"$ref": "Status" +}, +"readOnly": true, +"type": "array" +}, +"controlPlaneIp": { +"description": "Output only. The private IP address of the control plane for this workstation cluster. Workstation VMs need access to this IP address to work with the service, so make sure that your firewall rules allow egress from the workstation VMs to this address.", +"readOnly": true, +"type": "string" +}, +"createTime": { +"description": "Output only. Time when this workstation cluster was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"degraded": { +"description": "Output only. Whether this workstation cluster is in degraded mode, in which case it may require user action to restore full functionality. Details can be found in conditions.", +"readOnly": true, +"type": "boolean" +}, +"deleteTime": { +"description": "Output only. Time when this workstation cluster was soft-deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"displayName": { +"description": "Optional. Human-readable name for this workstation cluster.", +"type": "string" +}, +"domainConfig": { +"$ref": "DomainConfig", +"description": "Optional. Configuration options for a custom domain." +}, +"etag": { +"description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation cluster and that are also propagated to the underlying Compute Engine resources.", +"type": "object" +}, +"name": { +"description": "Identifier. Full name of this workstation cluster.", +"type": "string" +}, +"network": { +"description": "Immutable. Name of the Compute Engine network in which instances associated with this workstation cluster will be created.", +"type": "string" +}, +"privateClusterConfig": { +"$ref": "PrivateClusterConfig", +"description": "Optional. Configuration for private workstation cluster." +}, +"reconciling": { +"description": "Output only. Indicates whether this workstation cluster is currently being updated to match its intended state.", +"readOnly": true, +"type": "boolean" +}, +"subnetwork": { +"description": "Immutable. Name of the Compute Engine subnetwork in which instances associated with this workstation cluster will be created. Must be part of the subnetwork specified for this workstation cluster.", +"type": "string" +}, +"uid": { +"description": "Output only. A system-assigned unique identifier for this workstation cluster.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when this workstation cluster was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +}, +"WorkstationConfig": { +"description": "A workstation configuration resource in the Cloud Workstations API. Workstation configurations act as templates for workstations. The workstation configuration defines details such as the workstation virtual machine (VM) instance type, persistent storage, container image defining environment, which IDE or Code Editor to use, and more. Administrators and platform teams can also use [Identity and Access Management (IAM)](https://cloud.google.com/iam/docs/overview) rules to grant access to teams or to individual developers.", +"id": "WorkstationConfig", +"properties": { +"annotations": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. Client-specified annotations.", +"type": "object" +}, +"conditions": { +"description": "Output only. Status conditions describing the current resource state.", +"items": { +"$ref": "Status" +}, +"readOnly": true, +"type": "array" +}, +"container": { +"$ref": "Container", +"description": "Optional. Container that runs upon startup for each workstation using this workstation configuration." +}, +"createTime": { +"description": "Output only. Time when this workstation configuration was created.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"degraded": { +"description": "Output only. Whether this resource is degraded, in which case it may require user action to restore full functionality. See also the conditions field.", +"readOnly": true, +"type": "boolean" +}, +"deleteTime": { +"description": "Output only. Time when this workstation configuration was soft-deleted.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +}, +"disableTcpConnections": { +"description": "Optional. Disables support for plain TCP connections in the workstation. By default the service supports TCP connections through a websocket relay. Setting this option to true disables that relay, which prevents the usage of services that require plain TCP connections, such as SSH. When enabled, all communication must occur over HTTPS or WSS.", +"type": "boolean" +}, +"displayName": { +"description": "Optional. Human-readable name for this workstation configuration.", +"type": "string" +}, +"enableAuditAgent": { +"description": "Optional. Whether to enable Linux `auditd` logging on the workstation. When enabled, a service account must also be specified that has `logging.buckets.write` permission on the project. Operating system audit logging is distinct from [Cloud Audit Logs](https://cloud.google.com/workstations/docs/audit-logging).", +"type": "boolean" +}, +"encryptionKey": { +"$ref": "CustomerEncryptionKey", +"description": "Immutable. Encrypts resources of this workstation configuration using a customer-managed encryption key (CMEK). If specified, the boot disk of the Compute Engine instance and the persistent disk are encrypted using this encryption key. If this field is not set, the disks are encrypted using a generated key. Customer-managed encryption keys do not protect disk metadata. If the customer-managed encryption key is rotated, when the workstation instance is stopped, the system attempts to recreate the persistent disk with the new version of the key. Be sure to keep older versions of the key until the persistent disk is recreated. Otherwise, data on the persistent disk might be lost. If the encryption key is revoked, the workstation session automatically stops within 7 hours. Immutable after the workstation configuration is created." +}, +"ephemeralDirectories": { +"description": "Optional. Ephemeral directories which won't persist across workstation sessions.", +"items": { +"$ref": "EphemeralDirectory" +}, +"type": "array" +}, +"etag": { +"description": "Optional. Checksum computed by the server. May be sent on update and delete requests to make sure that the client has an up-to-date value before proceeding.", +"type": "string" +}, +"host": { +"$ref": "Host", +"description": "Optional. Runtime host for the workstation." +}, +"idleTimeout": { +"description": "Optional. Number of seconds to wait before automatically stopping a workstation after it last received user traffic. A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration should never time out due to idleness. Provide [duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#duration) terminated by `s` for seconds\u2014for example, `\"7200s\"` (2 hours). The default is `\"1200s\"` (20 minutes).", +"format": "google-duration", +"type": "string" +}, +"labels": { +"additionalProperties": { +"type": "string" +}, +"description": "Optional. [Labels](https://cloud.google.com/workstations/docs/label-resources) that are applied to the workstation configuration and that are also propagated to the underlying Compute Engine resources.", +"type": "object" +}, +"name": { +"description": "Identifier. Full name of this workstation configuration.", +"type": "string" +}, +"persistentDirectories": { +"description": "Optional. Directories to persist across workstation sessions.", +"items": { +"$ref": "PersistentDirectory" +}, +"type": "array" +}, +"readinessChecks": { +"description": "Optional. Readiness checks to perform when starting a workstation using this workstation configuration. Mark a workstation as running only after all specified readiness checks return 200 status codes.", +"items": { +"$ref": "ReadinessCheck" +}, +"type": "array" +}, +"reconciling": { +"description": "Output only. Indicates whether this workstation configuration is currently being updated to match its intended state.", +"readOnly": true, +"type": "boolean" +}, +"replicaZones": { +"description": "Optional. Immutable. Specifies the zones used to replicate the VM and disk resources within the region. If set, exactly two zones within the workstation cluster's region must be specified\u2014for example, `['us-central1-a', 'us-central1-f']`. If this field is empty, two default zones within the region are used. Immutable after the workstation configuration is created.", +"items": { +"type": "string" +}, +"type": "array" +}, +"runningTimeout": { +"description": "Optional. Number of seconds that a workstation can run until it is automatically shut down. We recommend that workstations be shut down daily to reduce costs and so that security updates can be applied upon restart. The idle_timeout and running_timeout fields are independent of each other. Note that the running_timeout field shuts down VMs after the specified time, regardless of whether or not the VMs are idle. Provide duration terminated by `s` for seconds\u2014for example, `\"54000s\"` (15 hours). Defaults to `\"43200s\"` (12 hours). A value of `\"0s\"` indicates that workstations using this configuration should never time out. If encryption_key is set, it must be greater than `\"0s\"` and less than `\"86400s\"` (24 hours). Warning: A value of `\"0s\"` indicates that Cloud Workstations VMs created with this configuration have no maximum running time. This is strongly discouraged because you incur costs and will not pick up security updates.", +"format": "google-duration", +"type": "string" +}, +"uid": { +"description": "Output only. A system-assigned unique identifier for this workstation configuration.", +"readOnly": true, +"type": "string" +}, +"updateTime": { +"description": "Output only. Time when this workstation configuration was most recently updated.", +"format": "google-datetime", +"readOnly": true, +"type": "string" +} +}, +"type": "object" +} +}, +"servicePath": "", +"title": "Cloud Workstations API", +"version": "v1beta", +"version_module": true +} \ No newline at end of file diff --git a/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/youtube.v3.json b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/youtube.v3.json new file mode 100644 index 0000000000000000000000000000000000000000..afa88f5b8bc1e87a8e6218006b78a9091a672824 --- /dev/null +++ b/pgsql/pgAdmin 4/python/Lib/site-packages/googleapiclient/discovery_cache/documents/youtube.v3.json @@ -0,0 +1,12197 @@ +{ +"auth": { +"oauth2": { +"scopes": { +"https://www.googleapis.com/auth/youtube": { +"description": "Manage your YouTube account" +}, +"https://www.googleapis.com/auth/youtube.channel-memberships.creator": { +"description": "See a list of your current active channel members, their current level, and when they became a member" +}, +"https://www.googleapis.com/auth/youtube.force-ssl": { +"description": "See, edit, and permanently delete your YouTube videos, ratings, comments and captions" +}, +"https://www.googleapis.com/auth/youtube.readonly": { +"description": "View your YouTube account" +}, +"https://www.googleapis.com/auth/youtube.upload": { +"description": "Manage your YouTube videos" +}, +"https://www.googleapis.com/auth/youtubepartner": { +"description": "View and manage your assets and associated content on YouTube" +}, +"https://www.googleapis.com/auth/youtubepartner-channel-audit": { +"description": "View private information of your YouTube channel relevant during the audit process with a YouTube partner" +} +} +} +}, +"basePath": "", +"baseUrl": "https://youtube.googleapis.com/", +"batchPath": "batch", +"canonicalName": "YouTube", +"description": "The YouTube Data API v3 is an API that provides access to YouTube data, such as videos, playlists, and channels.", +"discoveryVersion": "v1", +"documentationLink": "https://developers.google.com/youtube/", +"fullyEncodeReservedExpansion": true, +"icons": { +"x16": "http://www.google.com/images/icons/product/search-16.gif", +"x32": "http://www.google.com/images/icons/product/search-32.gif" +}, +"id": "youtube:v3", +"kind": "discovery#restDescription", +"mtlsRootUrl": "https://youtube.mtls.googleapis.com/", +"name": "youtube", +"ownerDomain": "google.com", +"ownerName": "Google", +"parameters": { +"$.xgafv": { +"description": "V1 error format.", +"enum": [ +"1", +"2" +], +"enumDescriptions": [ +"v1 error format", +"v2 error format" +], +"location": "query", +"type": "string" +}, +"access_token": { +"description": "OAuth access token.", +"location": "query", +"type": "string" +}, +"alt": { +"default": "json", +"description": "Data format for response.", +"enum": [ +"json", +"media", +"proto" +], +"enumDescriptions": [ +"Responses with Content-Type of application/json", +"Media download with context-dependent Content-Type", +"Responses with Content-Type of application/x-protobuf" +], +"location": "query", +"type": "string" +}, +"callback": { +"description": "JSONP", +"location": "query", +"type": "string" +}, +"fields": { +"description": "Selector specifying which fields to include in a partial response.", +"location": "query", +"type": "string" +}, +"key": { +"description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.", +"location": "query", +"type": "string" +}, +"oauth_token": { +"description": "OAuth 2.0 token for the current user.", +"location": "query", +"type": "string" +}, +"prettyPrint": { +"default": "true", +"description": "Returns response with indentations and line breaks.", +"location": "query", +"type": "boolean" +}, +"quotaUser": { +"description": "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.", +"location": "query", +"type": "string" +}, +"uploadType": { +"description": "Legacy upload protocol for media (e.g. \"media\", \"multipart\").", +"location": "query", +"type": "string" +}, +"upload_protocol": { +"description": "Upload protocol for media (e.g. \"raw\", \"multipart\").", +"location": "query", +"type": "string" +} +}, +"protocol": "rest", +"resources": { +"abuseReports": { +"methods": { +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/abuseReports", +"httpMethod": "POST", +"id": "youtube.abuseReports.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/abuseReports", +"request": { +"$ref": "AbuseReport" +}, +"response": { +"$ref": "AbuseReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +} +} +}, +"activities": { +"methods": { +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/activities", +"httpMethod": "GET", +"id": "youtube.activities.list", +"parameterOrder": [ +"part" +], +"parameters": { +"channelId": { +"location": "query", +"type": "string" +}, +"home": { +"location": "query", +"type": "boolean" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"mine": { +"location": "query", +"type": "boolean" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more activity resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in an activity resource, the snippet property contains other properties that identify the type of activity, a display title for the activity, and so forth. If you set *part=snippet*, the API response will also contain all of those nested properties.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"publishedAfter": { +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"publishedBefore": { +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"regionCode": { +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/activities", +"response": { +"$ref": "ActivityListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly" +] +} +} +}, +"captions": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/captions", +"httpMethod": "DELETE", +"id": "youtube.captions.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOf": { +"description": "ID of the Google+ Page for the channel that the request is be on behalf of", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/captions", +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"download": { +"description": "Downloads a caption track.", +"flatPath": "youtube/v3/captions/{id}", +"httpMethod": "GET", +"id": "youtube.captions.download", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "The ID of the caption track to download, required for One Platform.", +"location": "path", +"required": true, +"type": "string" +}, +"onBehalfOf": { +"description": "ID of the Google+ Page for the channel that the request is be on behalf of", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"tfmt": { +"description": "Convert the captions into this format. Supported options are sbv, srt, and vtt.", +"location": "query", +"type": "string" +}, +"tlang": { +"description": "tlang is the language code; machine translate the captions into this language.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/captions/{id}", +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaDownload": true, +"useMediaDownloadService": true +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/captions", +"httpMethod": "POST", +"id": "youtube.captions.insert", +"mediaUpload": { +"accept": [ +"text/xml", +"application/octet-stream", +"*/*" +], +"maxSize": "104857600", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/captions" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/captions" +} +} +}, +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOf": { +"description": "ID of the Google+ Page for the channel that the request is be on behalf of", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"sync": { +"description": "Extra parameter to allow automatically syncing the uploaded caption/transcript with the audio.", +"location": "query", +"type": "boolean" +} +}, +"path": "youtube/v3/captions", +"request": { +"$ref": "Caption" +}, +"response": { +"$ref": "Caption" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaUpload": true +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/captions", +"httpMethod": "GET", +"id": "youtube.captions.list", +"parameterOrder": [ +"part", +"videoId" +], +"parameters": { +"id": { +"description": "Returns the captions with the given IDs for Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"onBehalfOf": { +"description": "ID of the Google+ Page for the channel that the request is on behalf of.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"videoId": { +"description": "Returns the captions for the specified video.", +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/captions", +"response": { +"$ref": "CaptionListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/captions", +"httpMethod": "PUT", +"id": "youtube.captions.update", +"mediaUpload": { +"accept": [ +"text/xml", +"application/octet-stream", +"*/*" +], +"maxSize": "104857600", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/captions" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/captions" +} +} +}, +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOf": { +"description": "ID of the Google+ Page for the channel that the request is on behalf of.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"sync": { +"description": "Extra parameter to allow automatically syncing the uploaded caption/transcript with the audio.", +"location": "query", +"type": "boolean" +} +}, +"path": "youtube/v3/captions", +"request": { +"$ref": "Caption" +}, +"response": { +"$ref": "Caption" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaUpload": true +} +} +}, +"channelBanners": { +"methods": { +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/channelBanners/insert", +"httpMethod": "POST", +"id": "youtube.channelBanners.insert", +"mediaUpload": { +"accept": [ +"image/jpeg", +"image/png", +"application/octet-stream" +], +"maxSize": "6291456", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/channelBanners/insert" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/channelBanners/insert" +} +} +}, +"parameterOrder": [], +"parameters": { +"channelId": { +"description": "Unused, channel_id is currently derived from the security context of the requestor.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/channelBanners/insert", +"request": { +"$ref": "ChannelBannerResource" +}, +"response": { +"$ref": "ChannelBannerResource" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.upload" +], +"supportsMediaUpload": true +} +} +}, +"channelSections": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/channelSections", +"httpMethod": "DELETE", +"id": "youtube.channelSections.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/channelSections", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/channelSections", +"httpMethod": "POST", +"id": "youtube.channelSections.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/channelSections", +"request": { +"$ref": "ChannelSection" +}, +"response": { +"$ref": "ChannelSection" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/channelSections", +"httpMethod": "GET", +"id": "youtube.channelSections.list", +"parameterOrder": [ +"part" +], +"parameters": { +"channelId": { +"description": "Return the ChannelSections owned by the specified channel ID.", +"location": "query", +"type": "string" +}, +"hl": { +"deprecated": true, +"description": "Return content in specified language", +"location": "query", +"type": "string" +}, +"id": { +"description": "Return the ChannelSections with the given IDs for Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"mine": { +"description": "Return the ChannelSections owned by the authenticated user.", +"location": "query", +"type": "boolean" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more channelSection resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, and contentDetails. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channelSection resource, the snippet property contains other properties, such as a display title for the channelSection. If you set *part=snippet*, the API response will also contain all of those nested properties.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/channelSections", +"response": { +"$ref": "ChannelSectionListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/channelSections", +"httpMethod": "PUT", +"id": "youtube.channelSections.update", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part names that you can include in the parameter value are snippet and contentDetails.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/channelSections", +"request": { +"$ref": "ChannelSection" +}, +"response": { +"$ref": "ChannelSection" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"channels": { +"methods": { +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/channels", +"httpMethod": "GET", +"id": "youtube.channels.list", +"parameterOrder": [ +"part" +], +"parameters": { +"categoryId": { +"description": "Return the channels within the specified guide category ID.", +"location": "query", +"type": "string" +}, +"forHandle": { +"description": "Return the channel associated with a YouTube handle.", +"location": "query", +"type": "string" +}, +"forUsername": { +"description": "Return the channel associated with a YouTube username.", +"location": "query", +"type": "string" +}, +"hl": { +"description": "Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).", +"location": "query", +"type": "string" +}, +"id": { +"description": "Return the channels with the specified IDs.", +"location": "query", +"repeated": true, +"type": "string" +}, +"managedByMe": { +"description": "Return the channels managed by the authenticated user.", +"location": "query", +"type": "boolean" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"mine": { +"description": "Return the ids of channels owned by the authenticated user.", +"location": "query", +"type": "boolean" +}, +"mySubscribers": { +"description": "Return the channels subscribed to the authenticated user", +"location": "query", +"type": "boolean" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more channel resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a channel resource, the contentDetails property contains other properties, such as the uploads properties. As such, if you set *part=contentDetails*, the API response will also contain all of those nested properties.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/channels", +"response": { +"$ref": "ChannelListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner", +"https://www.googleapis.com/auth/youtubepartner-channel-audit" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/channels", +"httpMethod": "PUT", +"id": "youtube.channels.update", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "The *onBehalfOfContentOwner* parameter indicates that the authenticated user is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with needs to be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The API currently only allows the parameter value to be set to either brandingSettings or invideoPromotion. (You cannot update both of those parts with a single request.) Note that this method overrides the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/channels", +"request": { +"$ref": "Channel" +}, +"response": { +"$ref": "Channel" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"commentThreads": { +"methods": { +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/commentThreads", +"httpMethod": "POST", +"id": "youtube.commentThreads.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/commentThreads", +"request": { +"$ref": "CommentThread" +}, +"response": { +"$ref": "CommentThread" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/commentThreads", +"httpMethod": "GET", +"id": "youtube.commentThreads.list", +"parameterOrder": [ +"part" +], +"parameters": { +"allThreadsRelatedToChannelId": { +"description": "Returns the comment threads of all videos of the channel and the channel comments as well.", +"location": "query", +"type": "string" +}, +"channelId": { +"description": "Returns the comment threads for all the channel comments (ie does not include comments left on videos).", +"location": "query", +"type": "string" +}, +"id": { +"description": "Returns the comment threads with the given IDs for Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxResults": { +"default": "20", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "100", +"minimum": "1", +"type": "integer" +}, +"moderationStatus": { +"default": "published", +"description": "Limits the returned comment threads to those with the specified moderation status. Not compatible with the 'id' filter. Valid values: published, heldForReview, likelySpam.", +"enum": [ +"published", +"heldForReview", +"likelySpam", +"rejected" +], +"enumDescriptions": [ +"The comment is available for public display.", +"The comment is awaiting review by a moderator.", +"", +"The comment is unfit for display." +], +"location": "query", +"type": "string" +}, +"order": { +"default": "time", +"enum": [ +"orderUnspecified", +"time", +"relevance" +], +"enumDescriptions": [ +"", +"Order by time.", +"Order by relevance." +], +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more commentThread resource properties that the API response will include.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"searchTerms": { +"description": "Limits the returned comment threads to those matching the specified key words. Not compatible with the 'id' filter.", +"location": "query", +"type": "string" +}, +"textFormat": { +"default": "html", +"description": "The requested text format for the returned comments.", +"enum": [ +"textFormatUnspecified", +"html", +"plainText" +], +"enumDescriptions": [ +"", +"Returns the comments in HTML format. This is the default value.", +"Returns the comments in plain text format." +], +"location": "query", +"type": "string" +}, +"videoId": { +"description": "Returns the comment threads of the specified video.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/commentThreads", +"response": { +"$ref": "CommentThreadListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +} +} +}, +"comments": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/comments", +"httpMethod": "DELETE", +"id": "youtube.comments.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/comments", +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/comments", +"httpMethod": "POST", +"id": "youtube.comments.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter identifies the properties that the API response will include. Set the parameter value to snippet. The snippet part has a quota cost of 2 units.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/comments", +"request": { +"$ref": "Comment" +}, +"response": { +"$ref": "Comment" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/comments", +"httpMethod": "GET", +"id": "youtube.comments.list", +"parameterOrder": [ +"part" +], +"parameters": { +"id": { +"description": "Returns the comments with the given IDs for One Platform.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxResults": { +"default": "20", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "100", +"minimum": "1", +"type": "integer" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"parentId": { +"description": "Returns replies to the specified comment. Note, currently YouTube features only one level of replies (ie replies to top level comments). However replies to replies may be supported in the future.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more comment resource properties that the API response will include.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"textFormat": { +"default": "html", +"description": "The requested text format for the returned comments.", +"enum": [ +"textFormatUnspecified", +"html", +"plainText" +], +"enumDescriptions": [ +"", +"Returns the comments in HTML format. This is the default value.", +"Returns the comments in plain text format." +], +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/comments", +"response": { +"$ref": "CommentListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"markAsSpam": { +"description": "Expresses the caller's opinion that one or more comments should be flagged as spam.", +"flatPath": "youtube/v3/comments/markAsSpam", +"httpMethod": "POST", +"id": "youtube.comments.markAsSpam", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "Flags the comments with the given IDs as spam in the caller's opinion.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/comments/markAsSpam", +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"setModerationStatus": { +"description": "Sets the moderation status of one or more comments.", +"flatPath": "youtube/v3/comments/setModerationStatus", +"httpMethod": "POST", +"id": "youtube.comments.setModerationStatus", +"parameterOrder": [ +"id", +"moderationStatus" +], +"parameters": { +"banAuthor": { +"default": "false", +"description": "If set to true the author of the comment gets added to the ban list. This means all future comments of the author will autmomatically be rejected. Only valid in combination with STATUS_REJECTED.", +"location": "query", +"type": "boolean" +}, +"id": { +"description": "Modifies the moderation status of the comments with the given IDs", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"moderationStatus": { +"description": "Specifies the requested moderation status. Note, comments can be in statuses, which are not available through this call. For example, this call does not allow to mark a comment as 'likely spam'. Valid values: 'heldForReview', 'published' or 'rejected'.", +"enum": [ +"published", +"heldForReview", +"likelySpam", +"rejected" +], +"enumDescriptions": [ +"The comment is available for public display.", +"The comment is awaiting review by a moderator.", +"", +"The comment is unfit for display." +], +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/comments/setModerationStatus", +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/comments", +"httpMethod": "PUT", +"id": "youtube.comments.update", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter identifies the properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/comments", +"request": { +"$ref": "Comment" +}, +"response": { +"$ref": "Comment" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.force-ssl" +] +} +} +}, +"i18nLanguages": { +"methods": { +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/i18nLanguages", +"httpMethod": "GET", +"id": "youtube.i18nLanguages.list", +"parameterOrder": [ +"part" +], +"parameters": { +"hl": { +"default": "en_US", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the i18nLanguage resource properties that the API response will include. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/i18nLanguages", +"response": { +"$ref": "I18nLanguageListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"i18nRegions": { +"methods": { +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/i18nRegions", +"httpMethod": "GET", +"id": "youtube.i18nRegions.list", +"parameterOrder": [ +"part" +], +"parameters": { +"hl": { +"default": "en_US", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the i18nRegion resource properties that the API response will include. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/i18nRegions", +"response": { +"$ref": "I18nRegionListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"liveBroadcasts": { +"methods": { +"bind": { +"description": "Bind a broadcast to a stream.", +"flatPath": "youtube/v3/liveBroadcasts/bind", +"httpMethod": "POST", +"id": "youtube.liveBroadcasts.bind", +"parameterOrder": [ +"id", +"part" +], +"parameters": { +"id": { +"description": "Broadcast to bind to the stream", +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"streamId": { +"description": "Stream to bind, if not set unbind the current one.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/liveBroadcasts/bind", +"response": { +"$ref": "LiveBroadcast" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"delete": { +"description": "Delete a given broadcast.", +"flatPath": "youtube/v3/liveBroadcasts", +"httpMethod": "DELETE", +"id": "youtube.liveBroadcasts.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"description": "Broadcast to delete.", +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/liveBroadcasts", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"insert": { +"description": "Inserts a new stream for the authenticated user.", +"flatPath": "youtube/v3/liveBroadcasts", +"httpMethod": "POST", +"id": "youtube.liveBroadcasts.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part properties that you can include in the parameter value are id, snippet, contentDetails, and status.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveBroadcasts", +"request": { +"$ref": "LiveBroadcast" +}, +"response": { +"$ref": "LiveBroadcast" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"insertCuepoint": { +"description": "Insert cuepoints in a broadcast", +"flatPath": "youtube/v3/liveBroadcasts/cuepoint", +"httpMethod": "POST", +"id": "youtube.liveBroadcasts.insertCuepoint", +"parameterOrder": [], +"parameters": { +"id": { +"description": "Broadcast to insert ads to, or equivalently `external_video_id` for internal use.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "youtube/v3/liveBroadcasts/cuepoint", +"request": { +"$ref": "Cuepoint" +}, +"response": { +"$ref": "Cuepoint" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"list": { +"description": "Retrieve the list of broadcasts associated with the given channel.", +"flatPath": "youtube/v3/liveBroadcasts", +"httpMethod": "GET", +"id": "youtube.liveBroadcasts.list", +"parameterOrder": [ +"part" +], +"parameters": { +"broadcastStatus": { +"description": "Return broadcasts with a certain status, e.g. active broadcasts.", +"enum": [ +"broadcastStatusFilterUnspecified", +"all", +"active", +"upcoming", +"completed" +], +"enumDescriptions": [ +"", +"Return all broadcasts.", +"Return current live broadcasts.", +"Return broadcasts that have not yet started.", +"Return broadcasts that have already ended." +], +"location": "query", +"type": "string" +}, +"broadcastType": { +"default": "event", +"description": "Return only broadcasts with the selected type.", +"enum": [ +"broadcastTypeFilterUnspecified", +"all", +"event", +"persistent" +], +"enumDescriptions": [ +"", +"Return all broadcasts.", +"Return only scheduled event broadcasts.", +"Return only persistent broadcasts." +], +"location": "query", +"type": "string" +}, +"id": { +"description": "Return broadcasts with the given ids from Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"mine": { +"location": "query", +"type": "boolean" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, status and statistics.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveBroadcasts", +"response": { +"$ref": "LiveBroadcastListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly" +] +}, +"transition": { +"description": "Transition a broadcast to a given status.", +"flatPath": "youtube/v3/liveBroadcasts/transition", +"httpMethod": "POST", +"id": "youtube.liveBroadcasts.transition", +"parameterOrder": [ +"broadcastStatus", +"id", +"part" +], +"parameters": { +"broadcastStatus": { +"description": "The status to which the broadcast is going to transition.", +"enum": [ +"statusUnspecified", +"testing", +"live", +"complete" +], +"enumDescriptions": [ +"", +"Start testing the broadcast. YouTube transmits video to the broadcast's monitor stream. Note that you can only transition a broadcast to the testing state if its contentDetails.monitorStream.enableMonitorStream property is set to true.\",", +"Return only persistent broadcasts.", +"The broadcast is over. YouTube stops transmitting video." +], +"location": "query", +"required": true, +"type": "string" +}, +"id": { +"description": "Broadcast to transition.", +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more liveBroadcast resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, contentDetails, and status.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveBroadcasts/transition", +"response": { +"$ref": "LiveBroadcast" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"update": { +"description": "Updates an existing broadcast for the authenticated user.", +"flatPath": "youtube/v3/liveBroadcasts", +"httpMethod": "PUT", +"id": "youtube.liveBroadcasts.update", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part properties that you can include in the parameter value are id, snippet, contentDetails, and status. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a broadcast's privacy status is defined in the status part. As such, if your request is updating a private or unlisted broadcast, and the request's part parameter value includes the status part, the broadcast's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the broadcast will revert to the default privacy setting.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveBroadcasts", +"request": { +"$ref": "LiveBroadcast" +}, +"response": { +"$ref": "LiveBroadcast" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +} +} +}, +"liveChatBans": { +"methods": { +"delete": { +"description": "Deletes a chat ban.", +"flatPath": "youtube/v3/liveChat/bans", +"httpMethod": "DELETE", +"id": "youtube.liveChatBans.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveChat/bans", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/liveChat/bans", +"httpMethod": "POST", +"id": "youtube.liveChatBans.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response returns. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveChat/bans", +"request": { +"$ref": "LiveChatBan" +}, +"response": { +"$ref": "LiveChatBan" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +} +} +}, +"liveChatMessages": { +"methods": { +"delete": { +"description": "Deletes a chat message.", +"flatPath": "youtube/v3/liveChat/messages", +"httpMethod": "DELETE", +"id": "youtube.liveChatMessages.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveChat/messages", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/liveChat/messages", +"httpMethod": "POST", +"id": "youtube.liveChatMessages.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter serves two purposes. It identifies the properties that the write operation will set as well as the properties that the API response will include. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveChat/messages", +"request": { +"$ref": "LiveChatMessage" +}, +"response": { +"$ref": "LiveChatMessage" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/liveChat/messages", +"httpMethod": "GET", +"id": "youtube.liveChatMessages.list", +"parameterOrder": [ +"liveChatId", +"part" +], +"parameters": { +"hl": { +"description": "Specifies the localization language in which the system messages should be returned.", +"location": "query", +"type": "string" +}, +"liveChatId": { +"description": "The id of the live chat for which comments should be returned.", +"location": "query", +"required": true, +"type": "string" +}, +"maxResults": { +"default": "500", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "2000", +"minimum": "200", +"type": "integer" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken property identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the liveChatComment resource parts that the API response will include. Supported values are id and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"profileImageSize": { +"description": "Specifies the size of the profile image that should be returned for each user.", +"format": "uint32", +"location": "query", +"maximum": "720", +"minimum": "16", +"type": "integer" +} +}, +"path": "youtube/v3/liveChat/messages", +"response": { +"$ref": "LiveChatMessageListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly" +] +} +} +}, +"liveChatModerators": { +"methods": { +"delete": { +"description": "Deletes a chat moderator.", +"flatPath": "youtube/v3/liveChat/moderators", +"httpMethod": "DELETE", +"id": "youtube.liveChatModerators.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveChat/moderators", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/liveChat/moderators", +"httpMethod": "POST", +"id": "youtube.liveChatModerators.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response returns. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveChat/moderators", +"request": { +"$ref": "LiveChatModerator" +}, +"response": { +"$ref": "LiveChatModerator" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/liveChat/moderators", +"httpMethod": "GET", +"id": "youtube.liveChatModerators.list", +"parameterOrder": [ +"liveChatId", +"part" +], +"parameters": { +"liveChatId": { +"description": "The id of the live chat for which moderators should be returned.", +"location": "query", +"required": true, +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the liveChatModerator resource parts that the API response will include. Supported values are id and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveChat/moderators", +"response": { +"$ref": "LiveChatModeratorListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly" +] +} +} +}, +"liveStreams": { +"methods": { +"delete": { +"description": "Deletes an existing stream for the authenticated user.", +"flatPath": "youtube/v3/liveStreams", +"httpMethod": "DELETE", +"id": "youtube.liveStreams.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/liveStreams", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"insert": { +"description": "Inserts a new stream for the authenticated user.", +"flatPath": "youtube/v3/liveStreams", +"httpMethod": "POST", +"id": "youtube.liveStreams.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part properties that you can include in the parameter value are id, snippet, cdn, content_details, and status.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveStreams", +"request": { +"$ref": "LiveStream" +}, +"response": { +"$ref": "LiveStream" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +}, +"list": { +"description": "Retrieve the list of streams associated with the given channel. --", +"flatPath": "youtube/v3/liveStreams", +"httpMethod": "GET", +"id": "youtube.liveStreams.list", +"parameterOrder": [ +"part" +], +"parameters": { +"id": { +"description": "Return LiveStreams with the given ids from Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"mine": { +"location": "query", +"type": "boolean" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more liveStream resource properties that the API response will include. The part names that you can include in the parameter value are id, snippet, cdn, and status.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveStreams", +"response": { +"$ref": "LiveStreamListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly" +] +}, +"update": { +"description": "Updates an existing stream for the authenticated user.", +"flatPath": "youtube/v3/liveStreams", +"httpMethod": "PUT", +"id": "youtube.liveStreams.update", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. The part properties that you can include in the parameter value are id, snippet, cdn, and status. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. If the request body does not specify a value for a mutable property, the existing value for that property will be removed.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/liveStreams", +"request": { +"$ref": "LiveStream" +}, +"response": { +"$ref": "LiveStream" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl" +] +} +} +}, +"members": { +"methods": { +"list": { +"description": "Retrieves a list of members that match the request criteria for a channel.", +"flatPath": "youtube/v3/members", +"httpMethod": "GET", +"id": "youtube.members.list", +"parameterOrder": [ +"part" +], +"parameters": { +"filterByMemberChannelId": { +"description": "Comma separated list of channel IDs. Only data about members that are part of this list will be included in the response.", +"location": "query", +"type": "string" +}, +"hasAccessToLevel": { +"description": "Filter members in the results set to the ones that have access to a level.", +"location": "query", +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "1000", +"minimum": "0", +"type": "integer" +}, +"mode": { +"default": "all_current", +"description": "Parameter that specifies which channel members to return.", +"enum": [ +"listMembersModeUnknown", +"updates", +"all_current" +], +"enumDescriptions": [ +"", +"Return only members that joined after the first call with this mode was made.", +"Return all current members, from newest to oldest." +], +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the member resource parts that the API response will include. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/members", +"response": { +"$ref": "MemberListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.channel-memberships.creator" +] +} +} +}, +"membershipsLevels": { +"methods": { +"list": { +"description": "Retrieves a list of all pricing levels offered by a creator to the fans.", +"flatPath": "youtube/v3/membershipsLevels", +"httpMethod": "GET", +"id": "youtube.membershipsLevels.list", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter specifies the membershipsLevel resource parts that the API response will include. Supported values are id and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/membershipsLevels", +"response": { +"$ref": "MembershipsLevelListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.channel-memberships.creator" +] +} +} +}, +"playlistImages": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/playlistImages", +"httpMethod": "DELETE", +"id": "youtube.playlistImages.delete", +"parameterOrder": [], +"parameters": { +"id": { +"description": "Id to identify this image. This is returned from by the List method.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/playlistImages", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/playlistImages", +"httpMethod": "POST", +"id": "youtube.playlistImages.insert", +"mediaUpload": { +"accept": [ +"image/jpeg", +"image/png", +"application/octet-stream" +], +"maxSize": "2097152", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/playlistImages" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/playlistImages" +} +} +}, +"parameterOrder": [], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the properties that the API response will include.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "youtube/v3/playlistImages", +"request": { +"$ref": "PlaylistImage" +}, +"response": { +"$ref": "PlaylistImage" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaUpload": true +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/playlistImages", +"httpMethod": "GET", +"id": "youtube.playlistImages.list", +"parameterOrder": [], +"parameters": { +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"parent": { +"description": "Return PlaylistImages for this playlist id.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more playlistImage resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "youtube/v3/playlistImages", +"response": { +"$ref": "PlaylistImageListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/playlistImages", +"httpMethod": "PUT", +"id": "youtube.playlistImages.update", +"mediaUpload": { +"accept": [ +"image/jpeg", +"image/png", +"application/octet-stream" +], +"maxSize": "2097152", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/playlistImages" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/playlistImages" +} +} +}, +"parameterOrder": [], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the properties that the API response will include.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "youtube/v3/playlistImages", +"request": { +"$ref": "PlaylistImage" +}, +"response": { +"$ref": "PlaylistImage" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaUpload": true +} +} +}, +"playlistItems": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/playlistItems", +"httpMethod": "DELETE", +"id": "youtube.playlistItems.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/playlistItems", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/playlistItems", +"httpMethod": "POST", +"id": "youtube.playlistItems.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/playlistItems", +"request": { +"$ref": "PlaylistItem" +}, +"response": { +"$ref": "PlaylistItem" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/playlistItems", +"httpMethod": "GET", +"id": "youtube.playlistItems.list", +"parameterOrder": [ +"part" +], +"parameters": { +"id": { +"location": "query", +"repeated": true, +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more playlistItem resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlistItem resource, the snippet property contains numerous fields, including the title, description, position, and resourceId properties. As such, if you set *part=snippet*, the API response will contain all of those properties.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"playlistId": { +"description": "Return the playlist items within the given playlist.", +"location": "query", +"type": "string" +}, +"videoId": { +"description": "Return the playlist items associated with the given video ID.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/playlistItems", +"response": { +"$ref": "PlaylistItemListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/playlistItems", +"httpMethod": "PUT", +"id": "youtube.playlistItems.update", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a playlist item can specify a start time and end time, which identify the times portion of the video that should play when users watch the video in the playlist. If your request is updating a playlist item that sets these values, and the request's part parameter value includes the contentDetails part, the playlist item's start and end times will be updated to whatever value the request body specifies. If the request body does not specify values, the existing start and end times will be removed and replaced with the default settings.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/playlistItems", +"request": { +"$ref": "PlaylistItem" +}, +"response": { +"$ref": "PlaylistItem" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"playlists": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/playlists", +"httpMethod": "DELETE", +"id": "youtube.playlists.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/playlists", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/playlists", +"httpMethod": "POST", +"id": "youtube.playlists.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/playlists", +"request": { +"$ref": "Playlist" +}, +"response": { +"$ref": "Playlist" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/playlists", +"httpMethod": "GET", +"id": "youtube.playlists.list", +"parameterOrder": [ +"part" +], +"parameters": { +"channelId": { +"description": "Return the playlists owned by the specified channel ID.", +"location": "query", +"type": "string" +}, +"hl": { +"description": "Return content in specified language", +"location": "query", +"type": "string" +}, +"id": { +"description": "Return the playlists with the given IDs for Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"mine": { +"description": "Return the playlists owned by the authenticated user.", +"location": "query", +"type": "boolean" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more playlist resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a playlist resource, the snippet property contains properties like author, title, description, tags, and timeCreated. As such, if you set *part=snippet*, the API response will contain all of those properties.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/playlists", +"response": { +"$ref": "PlaylistListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/playlists", +"httpMethod": "PUT", +"id": "youtube.playlists.update", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Note that this method will override the existing values for mutable properties that are contained in any parts that the request body specifies. For example, a playlist's description is contained in the snippet part, which must be included in the request body. If the request does not specify a value for the snippet.description property, the playlist's existing description will be deleted.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/playlists", +"request": { +"$ref": "Playlist" +}, +"response": { +"$ref": "Playlist" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"search": { +"methods": { +"list": { +"description": "Retrieves a list of search resources", +"flatPath": "youtube/v3/search", +"httpMethod": "GET", +"id": "youtube.search.list", +"parameterOrder": [ +"part" +], +"parameters": { +"channelId": { +"description": "Filter on resources belonging to this channelId.", +"location": "query", +"type": "string" +}, +"channelType": { +"description": "Add a filter on the channel search.", +"enum": [ +"channelTypeUnspecified", +"any", +"show" +], +"enumDescriptions": [ +"", +"Return all channels.", +"Only retrieve shows." +], +"location": "query", +"type": "string" +}, +"eventType": { +"description": "Filter on the livestream status of the videos.", +"enum": [ +"none", +"upcoming", +"live", +"completed" +], +"enumDescriptions": [ +"", +"The live broadcast is upcoming.", +"The live broadcast is active.", +"The live broadcast has been completed." +], +"location": "query", +"type": "string" +}, +"forContentOwner": { +"description": "Search owned by a content owner.", +"location": "query", +"type": "boolean" +}, +"forDeveloper": { +"description": "Restrict the search to only retrieve videos uploaded using the project id of the authenticated user.", +"location": "query", +"type": "boolean" +}, +"forMine": { +"description": "Search for the private videos of the authenticated user.", +"location": "query", +"type": "boolean" +}, +"location": { +"description": "Filter on location of the video", +"location": "query", +"type": "string" +}, +"locationRadius": { +"description": "Filter on distance from the location (specified above).", +"location": "query", +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"order": { +"default": "relevance", +"description": "Sort order of the results.", +"enum": [ +"searchSortUnspecified", +"date", +"rating", +"viewCount", +"relevance", +"title", +"videoCount" +], +"enumDescriptions": [ +"", +"Resources are sorted in reverse chronological order based on the date they were created.", +"Resources are sorted from highest to lowest rating.", +"Resources are sorted from highest to lowest number of views.", +"Resources are sorted based on their relevance to the search query. This is the default value for this parameter.", +"Resources are sorted alphabetically by title.", +"Channels are sorted in descending order of their number of uploaded videos." +], +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more search resource properties that the API response will include. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"publishedAfter": { +"description": "Filter on resources published after this date.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"publishedBefore": { +"description": "Filter on resources published before this date.", +"format": "google-datetime", +"location": "query", +"type": "string" +}, +"q": { +"description": "Textual search terms to match.", +"location": "query", +"type": "string" +}, +"regionCode": { +"description": "Display the content as seen by viewers in this country.", +"location": "query", +"type": "string" +}, +"relevanceLanguage": { +"description": "Return results relevant to this language.", +"location": "query", +"type": "string" +}, +"safeSearch": { +"default": "moderate", +"description": "Indicates whether the search results should include restricted content as well as standard content.", +"enum": [ +"safeSearchSettingUnspecified", +"none", +"moderate", +"strict" +], +"enumDescriptions": [ +"", +"YouTube will not filter the search result set.", +"YouTube will filter some content from search results and, at the least, will filter content that is restricted in your locale. Based on their content, search results could be removed from search results or demoted in search results. This is the default parameter value.", +"YouTube will try to exclude all restricted content from the search result set. Based on their content, search results could be removed from search results or demoted in search results." +], +"location": "query", +"type": "string" +}, +"topicId": { +"description": "Restrict results to a particular topic.", +"location": "query", +"type": "string" +}, +"type": { +"description": "Restrict results to a particular set of resource types from One Platform.", +"location": "query", +"repeated": true, +"type": "string" +}, +"videoCaption": { +"description": "Filter on the presence of captions on the videos.", +"enum": [ +"videoCaptionUnspecified", +"any", +"closedCaption", +"none" +], +"enumDescriptions": [ +"", +"Do not filter results based on caption availability.", +"Only include videos that have captions.", +"Only include videos that do not have captions." +], +"location": "query", +"type": "string" +}, +"videoCategoryId": { +"description": "Filter on videos in a specific category.", +"location": "query", +"type": "string" +}, +"videoDefinition": { +"description": "Filter on the definition of the videos.", +"enum": [ +"any", +"standard", +"high" +], +"enumDescriptions": [ +"Return all videos, regardless of their resolution.", +"Only retrieve videos in standard definition.", +"Only retrieve HD videos." +], +"location": "query", +"type": "string" +}, +"videoDimension": { +"description": "Filter on 3d videos.", +"enum": [ +"any", +"2d", +"3d" +], +"enumDescriptions": [ +"Include both 3D and non-3D videos in returned results. This is the default value.", +"Restrict search results to exclude 3D videos.", +"Restrict search results to only include 3D videos." +], +"location": "query", +"type": "string" +}, +"videoDuration": { +"description": "Filter on the duration of the videos.", +"enum": [ +"videoDurationUnspecified", +"any", +"short", +"medium", +"long" +], +"enumDescriptions": [ +"", +"Do not filter video search results based on their duration. This is the default value.", +"Only include videos that are less than four minutes long.", +"Only include videos that are between four and 20 minutes long (inclusive).", +"Only include videos longer than 20 minutes." +], +"location": "query", +"type": "string" +}, +"videoEmbeddable": { +"description": "Filter on embeddable videos.", +"enum": [ +"videoEmbeddableUnspecified", +"any", +"true" +], +"enumDescriptions": [ +"", +"Return all videos, embeddable or not.", +"Only retrieve embeddable videos." +], +"location": "query", +"type": "string" +}, +"videoLicense": { +"description": "Filter on the license of the videos.", +"enum": [ +"any", +"youtube", +"creativeCommon" +], +"enumDescriptions": [ +"Return all videos, regardless of which license they have, that match the query parameters.", +"Only return videos that have the standard YouTube license.", +"Only return videos that have a Creative Commons license. Users can reuse videos with this license in other videos that they create. Learn more." +], +"location": "query", +"type": "string" +}, +"videoPaidProductPlacement": { +"enum": [ +"videoPaidProductPlacementUnspecified", +"any", +"true" +], +"enumDescriptions": [ +"", +"Return all videos, paid product placement or not.", +"Restrict results to only videos with paid product placement." +], +"location": "query", +"type": "string" +}, +"videoSyndicated": { +"description": "Filter on syndicated videos.", +"enum": [ +"videoSyndicatedUnspecified", +"any", +"true" +], +"enumDescriptions": [ +"", +"Return all videos, syndicated or not.", +"Only retrieve syndicated videos." +], +"location": "query", +"type": "string" +}, +"videoType": { +"description": "Filter on videos of a specific type.", +"enum": [ +"videoTypeUnspecified", +"any", +"movie", +"episode" +], +"enumDescriptions": [ +"", +"Return all videos.", +"Only retrieve movies.", +"Only retrieve episodes of shows." +], +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/search", +"response": { +"$ref": "SearchListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"subscriptions": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/subscriptions", +"httpMethod": "DELETE", +"id": "youtube.subscriptions.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/subscriptions", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/subscriptions", +"httpMethod": "POST", +"id": "youtube.subscriptions.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/subscriptions", +"request": { +"$ref": "Subscription" +}, +"response": { +"$ref": "Subscription" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/subscriptions", +"httpMethod": "GET", +"id": "youtube.subscriptions.list", +"parameterOrder": [ +"part" +], +"parameters": { +"channelId": { +"description": "Return the subscriptions of the given channel owner.", +"location": "query", +"type": "string" +}, +"forChannelId": { +"description": "Return the subscriptions to the subset of these channels that the authenticated user is subscribed to.", +"location": "query", +"type": "string" +}, +"id": { +"description": "Return the subscriptions with the given IDs for Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "0", +"type": "integer" +}, +"mine": { +"description": "Flag for returning the subscriptions of the authenticated user.", +"location": "query", +"type": "boolean" +}, +"myRecentSubscribers": { +"location": "query", +"type": "boolean" +}, +"mySubscribers": { +"description": "Return the subscribers of the given channel owner.", +"location": "query", +"type": "boolean" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"order": { +"default": "relevance", +"description": "The order of the returned subscriptions", +"enum": [ +"subscriptionOrderUnspecified", +"relevance", +"unread", +"alphabetical" +], +"enumDescriptions": [ +"", +"Sort by relevance.", +"Sort by order of activity.", +"Sort alphabetically." +], +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more subscription resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a subscription resource, the snippet property contains other properties, such as a display title for the subscription. If you set *part=snippet*, the API response will also contain all of those nested properties.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/subscriptions", +"response": { +"$ref": "SubscriptionListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"superChatEvents": { +"methods": { +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/superChatEvents", +"httpMethod": "GET", +"id": "youtube.superChatEvents.list", +"parameterOrder": [ +"part" +], +"parameters": { +"hl": { +"description": "Return rendered funding amounts in specified language.", +"location": "query", +"type": "string" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "1", +"type": "integer" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the superChatEvent resource parts that the API response will include. This parameter is currently not supported.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/superChatEvents", +"response": { +"$ref": "SuperChatEventListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly" +] +} +} +}, +"tests": { +"methods": { +"insert": { +"description": "POST method.", +"flatPath": "youtube/v3/tests", +"httpMethod": "POST", +"id": "youtube.tests.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"externalChannelId": { +"location": "query", +"type": "string" +}, +"part": { +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/tests", +"request": { +"$ref": "TestItem" +}, +"response": { +"$ref": "TestItem" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube.readonly" +] +} +} +}, +"thirdPartyLinks": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/thirdPartyLinks", +"httpMethod": "DELETE", +"id": "youtube.thirdPartyLinks.delete", +"parameterOrder": [ +"linkingToken", +"type" +], +"parameters": { +"externalChannelId": { +"description": "Channel ID to which changes should be applied, for delegation.", +"location": "query", +"type": "string" +}, +"linkingToken": { +"description": "Delete the partner links with the given linking token.", +"location": "query", +"required": true, +"type": "string" +}, +"part": { +"description": "Do not use. Required for compatibility.", +"location": "query", +"repeated": true, +"type": "string" +}, +"type": { +"description": "Type of the link to be deleted.", +"enum": [ +"linkUnspecified", +"channelToStoreLink" +], +"enumDescriptions": [ +"", +"A link that is connecting (or about to connect) a channel with a store on a merchandising platform in order to enable retail commerce capabilities for that channel on YouTube." +], +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/thirdPartyLinks" +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/thirdPartyLinks", +"httpMethod": "POST", +"id": "youtube.thirdPartyLinks.insert", +"parameterOrder": [ +"part" +], +"parameters": { +"externalChannelId": { +"description": "Channel ID to which changes should be applied, for delegation.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the thirdPartyLink resource parts that the API request and response will include. Supported values are linkingToken, status, and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/thirdPartyLinks", +"request": { +"$ref": "ThirdPartyLink" +}, +"response": { +"$ref": "ThirdPartyLink" +} +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/thirdPartyLinks", +"httpMethod": "GET", +"id": "youtube.thirdPartyLinks.list", +"parameterOrder": [ +"part" +], +"parameters": { +"externalChannelId": { +"description": "Channel ID to which changes should be applied, for delegation.", +"location": "query", +"type": "string" +}, +"linkingToken": { +"description": "Get a third party link with the given linking token.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the thirdPartyLink resource parts that the API response will include. Supported values are linkingToken, status, and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"type": { +"description": "Get a third party link of the given type.", +"enum": [ +"linkUnspecified", +"channelToStoreLink" +], +"enumDescriptions": [ +"", +"A link that is connecting (or about to connect) a channel with a store on a merchandising platform in order to enable retail commerce capabilities for that channel on YouTube." +], +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/thirdPartyLinks", +"response": { +"$ref": "ThirdPartyLinkListResponse" +} +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/thirdPartyLinks", +"httpMethod": "PUT", +"id": "youtube.thirdPartyLinks.update", +"parameterOrder": [ +"part" +], +"parameters": { +"externalChannelId": { +"description": "Channel ID to which changes should be applied, for delegation.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the thirdPartyLink resource parts that the API request and response will include. Supported values are linkingToken, status, and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/thirdPartyLinks", +"request": { +"$ref": "ThirdPartyLink" +}, +"response": { +"$ref": "ThirdPartyLink" +} +} +} +}, +"thumbnails": { +"methods": { +"set": { +"description": "As this is not an insert in a strict sense (it supports uploading/setting of a thumbnail for multiple videos, which doesn't result in creation of a single resource), I use a custom verb here.", +"flatPath": "youtube/v3/thumbnails/set", +"httpMethod": "POST", +"id": "youtube.thumbnails.set", +"mediaUpload": { +"accept": [ +"image/jpeg", +"image/png", +"application/octet-stream" +], +"maxSize": "2097152", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/thumbnails/set" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/thumbnails/set" +} +} +}, +"parameterOrder": [ +"videoId" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"videoId": { +"description": "Returns the Thumbnail with the given video IDs for Stubby or Apiary.", +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/thumbnails/set", +"response": { +"$ref": "ThumbnailSetResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.upload", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaUpload": true +} +} +}, +"videoAbuseReportReasons": { +"methods": { +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/videoAbuseReportReasons", +"httpMethod": "GET", +"id": "youtube.videoAbuseReportReasons.list", +"parameterOrder": [ +"part" +], +"parameters": { +"hl": { +"default": "en-US", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the videoCategory resource parts that the API response will include. Supported values are id and snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/videoAbuseReportReasons", +"response": { +"$ref": "VideoAbuseReportReasonListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly" +] +} +} +}, +"videoCategories": { +"methods": { +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/videoCategories", +"httpMethod": "GET", +"id": "youtube.videoCategories.list", +"parameterOrder": [ +"part" +], +"parameters": { +"hl": { +"default": "en-US", +"location": "query", +"type": "string" +}, +"id": { +"description": "Returns the video categories with the given IDs for Stubby or Apiary.", +"location": "query", +"repeated": true, +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies the videoCategory resource properties that the API response will include. Set the parameter value to snippet.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"regionCode": { +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/videoCategories", +"response": { +"$ref": "VideoCategoryListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"videos": { +"methods": { +"delete": { +"description": "Deletes a resource.", +"flatPath": "youtube/v3/videos", +"httpMethod": "DELETE", +"id": "youtube.videos.delete", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/videos", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"getRating": { +"description": "Retrieves the ratings that the authorized user gave to a list of specified videos.", +"flatPath": "youtube/v3/videos/getRating", +"httpMethod": "GET", +"id": "youtube.videos.getRating", +"parameterOrder": [ +"id" +], +"parameters": { +"id": { +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/videos/getRating", +"response": { +"$ref": "VideoGetRatingResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"insert": { +"description": "Inserts a new resource into this collection.", +"flatPath": "youtube/v3/videos", +"httpMethod": "POST", +"id": "youtube.videos.insert", +"mediaUpload": { +"accept": [ +"video/*", +"application/octet-stream" +], +"maxSize": "274877906944", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/videos" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/videos" +} +} +}, +"parameterOrder": [ +"part" +], +"parameters": { +"autoLevels": { +"description": "Should auto-levels be applied to the upload.", +"location": "query", +"type": "boolean" +}, +"notifySubscribers": { +"default": "true", +"description": "Notify the channel subscribers about the new video. As default, the notification is enabled.", +"location": "query", +"type": "boolean" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwnerChannel": { +"description": "This parameter can only be used in a properly authorized request. *Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwnerChannel* parameter specifies the YouTube channel ID of the channel to which a video is being added. This parameter is required when a request specifies a value for the onBehalfOfContentOwner parameter, and it can only be used in conjunction with that parameter. In addition, the request must be authorized using a CMS account that is linked to the content owner that the onBehalfOfContentOwner parameter specifies. Finally, the channel that the onBehalfOfContentOwnerChannel parameter value specifies must be linked to the content owner that the onBehalfOfContentOwner parameter specifies. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and perform actions on behalf of the channel specified in the parameter value, without having to provide authentication credentials for each separate channel.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Note that not all parts contain properties that can be set when inserting or updating a video. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"stabilize": { +"description": "Should stabilize be applied to the upload.", +"location": "query", +"type": "boolean" +} +}, +"path": "youtube/v3/videos", +"request": { +"$ref": "Video" +}, +"response": { +"$ref": "Video" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.upload", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaUpload": true +}, +"list": { +"description": "Retrieves a list of resources, possibly filtered.", +"flatPath": "youtube/v3/videos", +"httpMethod": "GET", +"id": "youtube.videos.list", +"parameterOrder": [ +"part" +], +"parameters": { +"chart": { +"description": "Return the videos that are in the specified chart.", +"enum": [ +"chartUnspecified", +"mostPopular" +], +"enumDescriptions": [ +"", +"Return the most popular videos for the specified content region and video category." +], +"location": "query", +"type": "string" +}, +"hl": { +"description": "Stands for \"host language\". Specifies the localization language of the metadata to be filled into snippet.localized. The field is filled with the default metadata if there is no localization in the specified language. The parameter value must be a language code included in the list returned by the i18nLanguages.list method (e.g. en_US, es_MX).", +"location": "query", +"type": "string" +}, +"id": { +"description": "Return videos with the given ids.", +"location": "query", +"repeated": true, +"type": "string" +}, +"locale": { +"deprecated": true, +"location": "query", +"type": "string" +}, +"maxHeight": { +"format": "int32", +"location": "query", +"maximum": "8192", +"minimum": "72", +"type": "integer" +}, +"maxResults": { +"default": "5", +"description": "The *maxResults* parameter specifies the maximum number of items that should be returned in the result set. *Note:* This parameter is supported for use in conjunction with the myRating and chart parameters, but it is not supported for use in conjunction with the id parameter.", +"format": "uint32", +"location": "query", +"maximum": "50", +"minimum": "1", +"type": "integer" +}, +"maxWidth": { +"description": "Return the player with maximum height specified in", +"format": "int32", +"location": "query", +"maximum": "8192", +"minimum": "72", +"type": "integer" +}, +"myRating": { +"description": "Return videos liked/disliked by the authenticated user. Does not support RateType.RATED_TYPE_NONE.", +"enum": [ +"none", +"like", +"dislike" +], +"enumDescriptions": [ +"", +"The entity is liked.", +"The entity is disliked." +], +"location": "query", +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"pageToken": { +"description": "The *pageToken* parameter identifies a specific page in the result set that should be returned. In an API response, the nextPageToken and prevPageToken properties identify other pages that could be retrieved. *Note:* This parameter is supported for use in conjunction with the myRating and chart parameters, but it is not supported for use in conjunction with the id parameter.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter specifies a comma-separated list of one or more video resource properties that the API response will include. If the parameter identifies a property that contains child properties, the child properties will be included in the response. For example, in a video resource, the snippet property contains the channelId, title, description, tags, and categoryId properties. As such, if you set *part=snippet*, the API response will contain all of those properties.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +}, +"regionCode": { +"description": "Use a chart that is specific to the specified region", +"location": "query", +"type": "string" +}, +"videoCategoryId": { +"default": "0", +"description": "Use chart that is specific to the specified video category", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/videos", +"response": { +"$ref": "VideoListResponse" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.readonly", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"rate": { +"description": "Adds a like or dislike rating to a video or removes a rating from a video.", +"flatPath": "youtube/v3/videos/rate", +"httpMethod": "POST", +"id": "youtube.videos.rate", +"parameterOrder": [ +"id", +"rating" +], +"parameters": { +"id": { +"location": "query", +"required": true, +"type": "string" +}, +"rating": { +"enum": [ +"none", +"like", +"dislike" +], +"enumDescriptions": [ +"", +"The entity is liked.", +"The entity is disliked." +], +"location": "query", +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/videos/rate", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"reportAbuse": { +"description": "Report abuse for a video.", +"flatPath": "youtube/v3/videos/reportAbuse", +"httpMethod": "POST", +"id": "youtube.videos.reportAbuse", +"parameterOrder": [], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/videos/reportAbuse", +"request": { +"$ref": "VideoAbuseReport" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +}, +"update": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/videos", +"httpMethod": "PUT", +"id": "youtube.videos.update", +"parameterOrder": [ +"part" +], +"parameters": { +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +}, +"part": { +"description": "The *part* parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Note that this method will override the existing values for all of the mutable properties that are contained in any parts that the parameter value specifies. For example, a video's privacy setting is contained in the status part. As such, if your request is updating a private video, and the request's part parameter value includes the status part, the video's privacy setting will be updated to whatever value the request body specifies. If the request body does not specify a value, the existing privacy setting will be removed and the video will revert to the default privacy setting. In addition, not all parts contain properties that can be set when inserting or updating a video. For example, the statistics object encapsulates statistics that YouTube calculates for a video and does not contain values that you can set or modify. If the parameter value specifies a part that does not contain mutable values, that part will still be included in the API response.", +"location": "query", +"repeated": true, +"required": true, +"type": "string" +} +}, +"path": "youtube/v3/videos", +"request": { +"$ref": "Video" +}, +"response": { +"$ref": "Video" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"watermarks": { +"methods": { +"set": { +"description": "Allows upload of watermark image and setting it for a channel.", +"flatPath": "youtube/v3/watermarks/set", +"httpMethod": "POST", +"id": "youtube.watermarks.set", +"mediaUpload": { +"accept": [ +"image/jpeg", +"image/png", +"application/octet-stream" +], +"maxSize": "10485760", +"protocols": { +"resumable": { +"multipart": true, +"path": "/resumable/upload/youtube/v3/watermarks/set" +}, +"simple": { +"multipart": true, +"path": "/upload/youtube/v3/watermarks/set" +} +} +}, +"parameterOrder": [ +"channelId" +], +"parameters": { +"channelId": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/watermarks/set", +"request": { +"$ref": "InvideoBranding" +}, +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtube.upload", +"https://www.googleapis.com/auth/youtubepartner" +], +"supportsMediaUpload": true +}, +"unset": { +"description": "Allows removal of channel watermark.", +"flatPath": "youtube/v3/watermarks/unset", +"httpMethod": "POST", +"id": "youtube.watermarks.unset", +"parameterOrder": [ +"channelId" +], +"parameters": { +"channelId": { +"location": "query", +"required": true, +"type": "string" +}, +"onBehalfOfContentOwner": { +"description": "*Note:* This parameter is intended exclusively for YouTube content partners. The *onBehalfOfContentOwner* parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The CMS account that the user authenticates with must be linked to the specified YouTube content owner.", +"location": "query", +"type": "string" +} +}, +"path": "youtube/v3/watermarks/unset", +"scopes": [ +"https://www.googleapis.com/auth/youtube", +"https://www.googleapis.com/auth/youtube.force-ssl", +"https://www.googleapis.com/auth/youtubepartner" +] +} +} +}, +"youtube": { +"resources": { +"v3": { +"methods": { +"updateCommentThreads": { +"description": "Updates an existing resource.", +"flatPath": "youtube/v3/commentThreads", +"httpMethod": "PUT", +"id": "youtube.youtube.v3.updateCommentThreads", +"parameterOrder": [], +"parameters": { +"part": { +"description": "The *part* parameter specifies a comma-separated list of commentThread resource properties that the API response will include. You must at least include the snippet part in the parameter value since that part contains all of the properties that the API request can update.", +"location": "query", +"repeated": true, +"type": "string" +} +}, +"path": "youtube/v3/commentThreads", +"request": { +"$ref": "CommentThread" +}, +"response": { +"$ref": "CommentThread" +} +} +} +} +} +} +}, +"revision": "20240421", +"rootUrl": "https://youtube.googleapis.com/", +"schemas": { +"AbuseReport": { +"id": "AbuseReport", +"properties": { +"abuseTypes": { +"items": { +"$ref": "AbuseType" +}, +"type": "array" +}, +"description": { +"type": "string" +}, +"relatedEntities": { +"items": { +"$ref": "RelatedEntity" +}, +"type": "array" +}, +"subject": { +"$ref": "Entity" +} +}, +"type": "object" +}, +"AbuseType": { +"id": "AbuseType", +"properties": { +"id": { +"type": "string" +} +}, +"type": "object" +}, +"AccessPolicy": { +"description": "Rights management policy for YouTube resources.", +"id": "AccessPolicy", +"properties": { +"allowed": { +"description": "The value of allowed indicates whether the access to the policy is allowed or denied by default.", +"type": "boolean" +}, +"exception": { +"description": "A list of region codes that identify countries where the default policy do not apply.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Activity": { +"description": "An *activity* resource contains information about an action that a particular channel, or user, has taken on YouTube.The actions reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, commenting on a video, uploading a video, and so forth. Each activity resource identifies the type of action, the channel associated with the action, and the resource(s) associated with the action, such as the video that was rated or uploaded.", +"id": "Activity", +"properties": { +"contentDetails": { +"$ref": "ActivityContentDetails", +"description": "The contentDetails object contains information about the content associated with the activity. For example, if the snippet.type value is videoRated, then the contentDetails object's content identifies the rated video." +}, +"etag": { +"description": "Etag of this resource", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the activity.", +"type": "string" +}, +"kind": { +"default": "youtube#activity", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#activity\".", +"type": "string" +}, +"snippet": { +"$ref": "ActivitySnippet", +"description": "The snippet object contains basic details about the activity, including the activity's type and group ID." +} +}, +"type": "object" +}, +"ActivityContentDetails": { +"description": "Details about the content of an activity: the video that was shared, the channel that was subscribed to, etc.", +"id": "ActivityContentDetails", +"properties": { +"bulletin": { +"$ref": "ActivityContentDetailsBulletin", +"description": "The bulletin object contains details about a channel bulletin post. This object is only present if the snippet.type is bulletin." +}, +"channelItem": { +"$ref": "ActivityContentDetailsChannelItem", +"description": "The channelItem object contains details about a resource which was added to a channel. This property is only present if the snippet.type is channelItem." +}, +"comment": { +"$ref": "ActivityContentDetailsComment", +"description": "The comment object contains information about a resource that received a comment. This property is only present if the snippet.type is comment." +}, +"favorite": { +"$ref": "ActivityContentDetailsFavorite", +"description": "The favorite object contains information about a video that was marked as a favorite video. This property is only present if the snippet.type is favorite." +}, +"like": { +"$ref": "ActivityContentDetailsLike", +"description": "The like object contains information about a resource that received a positive (like) rating. This property is only present if the snippet.type is like." +}, +"playlistItem": { +"$ref": "ActivityContentDetailsPlaylistItem", +"description": "The playlistItem object contains information about a new playlist item. This property is only present if the snippet.type is playlistItem." +}, +"promotedItem": { +"$ref": "ActivityContentDetailsPromotedItem", +"description": "The promotedItem object contains details about a resource which is being promoted. This property is only present if the snippet.type is promotedItem." +}, +"recommendation": { +"$ref": "ActivityContentDetailsRecommendation", +"description": "The recommendation object contains information about a recommended resource. This property is only present if the snippet.type is recommendation." +}, +"social": { +"$ref": "ActivityContentDetailsSocial", +"description": "The social object contains details about a social network post. This property is only present if the snippet.type is social." +}, +"subscription": { +"$ref": "ActivityContentDetailsSubscription", +"description": "The subscription object contains information about a channel that a user subscribed to. This property is only present if the snippet.type is subscription." +}, +"upload": { +"$ref": "ActivityContentDetailsUpload", +"description": "The upload object contains information about the uploaded video. This property is only present if the snippet.type is upload." +} +}, +"type": "object" +}, +"ActivityContentDetailsBulletin": { +"description": "Details about a channel bulletin post.", +"id": "ActivityContentDetailsBulletin", +"properties": { +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information that identifies the resource associated with a bulletin post. @mutable youtube.activities.insert" +} +}, +"type": "object" +}, +"ActivityContentDetailsChannelItem": { +"description": "Details about a resource which was added to a channel.", +"id": "ActivityContentDetailsChannelItem", +"properties": { +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information that identifies the resource that was added to the channel." +} +}, +"type": "object" +}, +"ActivityContentDetailsComment": { +"description": "Information about a resource that received a comment.", +"id": "ActivityContentDetailsComment", +"properties": { +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information that identifies the resource associated with the comment." +} +}, +"type": "object" +}, +"ActivityContentDetailsFavorite": { +"description": "Information about a video that was marked as a favorite video.", +"id": "ActivityContentDetailsFavorite", +"properties": { +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information that identifies the resource that was marked as a favorite." +} +}, +"type": "object" +}, +"ActivityContentDetailsLike": { +"description": "Information about a resource that received a positive (like) rating.", +"id": "ActivityContentDetailsLike", +"properties": { +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information that identifies the rated resource." +} +}, +"type": "object" +}, +"ActivityContentDetailsPlaylistItem": { +"description": "Information about a new playlist item.", +"id": "ActivityContentDetailsPlaylistItem", +"properties": { +"playlistId": { +"description": "The value that YouTube uses to uniquely identify the playlist.", +"type": "string" +}, +"playlistItemId": { +"description": "ID of the item within the playlist.", +"type": "string" +}, +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information about the resource that was added to the playlist." +} +}, +"type": "object" +}, +"ActivityContentDetailsPromotedItem": { +"description": "Details about a resource which is being promoted.", +"id": "ActivityContentDetailsPromotedItem", +"properties": { +"adTag": { +"description": "The URL the client should fetch to request a promoted item.", +"type": "string" +}, +"clickTrackingUrl": { +"description": "The URL the client should ping to indicate that the user clicked through on this promoted item.", +"type": "string" +}, +"creativeViewUrl": { +"description": "The URL the client should ping to indicate that the user was shown this promoted item.", +"type": "string" +}, +"ctaType": { +"description": "The type of call-to-action, a message to the user indicating action that can be taken.", +"enum": [ +"ctaTypeUnspecified", +"visitAdvertiserSite" +], +"enumDescriptions": [ +"", +"" +], +"type": "string" +}, +"customCtaButtonText": { +"description": "The custom call-to-action button text. If specified, it will override the default button text for the cta_type.", +"type": "string" +}, +"descriptionText": { +"description": "The text description to accompany the promoted item.", +"type": "string" +}, +"destinationUrl": { +"description": "The URL the client should direct the user to, if the user chooses to visit the advertiser's website.", +"type": "string" +}, +"forecastingUrl": { +"description": "The list of forecasting URLs. The client should ping all of these URLs when a promoted item is not available, to indicate that a promoted item could have been shown.", +"items": { +"type": "string" +}, +"type": "array" +}, +"impressionUrl": { +"description": "The list of impression URLs. The client should ping all of these URLs to indicate that the user was shown this promoted item.", +"items": { +"type": "string" +}, +"type": "array" +}, +"videoId": { +"description": "The ID that YouTube uses to uniquely identify the promoted video.", +"type": "string" +} +}, +"type": "object" +}, +"ActivityContentDetailsRecommendation": { +"description": "Information that identifies the recommended resource.", +"id": "ActivityContentDetailsRecommendation", +"properties": { +"reason": { +"description": "The reason that the resource is recommended to the user.", +"enum": [ +"reasonUnspecified", +"videoFavorited", +"videoLiked", +"videoWatched" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information that identifies the recommended resource." +}, +"seedResourceId": { +"$ref": "ResourceId", +"description": "The seedResourceId object contains information about the resource that caused the recommendation." +} +}, +"type": "object" +}, +"ActivityContentDetailsSocial": { +"description": "Details about a social network post.", +"id": "ActivityContentDetailsSocial", +"properties": { +"author": { +"description": "The author of the social network post.", +"type": "string" +}, +"imageUrl": { +"description": "An image of the post's author.", +"type": "string" +}, +"referenceUrl": { +"description": "The URL of the social network post.", +"type": "string" +}, +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object encapsulates information that identifies the resource associated with a social network post." +}, +"type": { +"description": "The name of the social network.", +"enum": [ +"unspecified", +"googlePlus", +"facebook", +"twitter" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"ActivityContentDetailsSubscription": { +"description": "Information about a channel that a user subscribed to.", +"id": "ActivityContentDetailsSubscription", +"properties": { +"resourceId": { +"$ref": "ResourceId", +"description": "The resourceId object contains information that identifies the resource that the user subscribed to." +} +}, +"type": "object" +}, +"ActivityContentDetailsUpload": { +"description": "Information about the uploaded video.", +"id": "ActivityContentDetailsUpload", +"properties": { +"videoId": { +"description": "The ID that YouTube uses to uniquely identify the uploaded video.", +"type": "string" +} +}, +"type": "object" +}, +"ActivityListResponse": { +"id": "ActivityListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"items": { +"$ref": "Activity" +}, +"type": "array" +}, +"kind": { +"default": "youtube#activityListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#activityListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"ActivitySnippet": { +"description": "Basic details about an activity, including title, description, thumbnails, activity type and group. Next ID: 12", +"id": "ActivitySnippet", +"properties": { +"channelId": { +"description": "The ID that YouTube uses to uniquely identify the channel associated with the activity.", +"type": "string" +}, +"channelTitle": { +"description": "Channel title for the channel responsible for this activity", +"type": "string" +}, +"description": { +"description": "The description of the resource primarily associated with the activity. @mutable youtube.activities.insert", +"type": "string" +}, +"groupId": { +"description": "The group ID associated with the activity. A group ID identifies user events that are associated with the same user and resource. For example, if a user rates a video and marks the same video as a favorite, the entries for those events would have the same group ID in the user's activity feed. In your user interface, you can avoid repetition by grouping events with the same groupId value.", +"type": "string" +}, +"publishedAt": { +"description": "The date and time that the video was uploaded.", +"format": "date-time", +"type": "string" +}, +"thumbnails": { +"$ref": "ThumbnailDetails", +"description": "A map of thumbnail images associated with the resource that is primarily associated with the activity. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail." +}, +"title": { +"description": "The title of the resource primarily associated with the activity.", +"type": "string" +}, +"type": { +"description": "The type of activity that the resource describes.", +"enum": [ +"typeUnspecified", +"upload", +"like", +"favorite", +"comment", +"subscription", +"playlistItem", +"recommendation", +"bulletin", +"social", +"channelItem", +"promotedItem" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"Caption": { +"description": "A *caption* resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.", +"id": "Caption", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"annotations": { +"required": [ +"youtube.captions.update" +] +}, +"description": "The ID that YouTube uses to uniquely identify the caption track.", +"type": "string" +}, +"kind": { +"default": "youtube#caption", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#caption\".", +"type": "string" +}, +"snippet": { +"$ref": "CaptionSnippet", +"description": "The snippet object contains basic details about the caption." +} +}, +"type": "object" +}, +"CaptionListResponse": { +"id": "CaptionListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of captions that match the request criteria.", +"items": { +"$ref": "Caption" +}, +"type": "array" +}, +"kind": { +"default": "youtube#captionListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#captionListResponse\".", +"type": "string" +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"CaptionSnippet": { +"description": "Basic details about a caption track, such as its language and name.", +"id": "CaptionSnippet", +"properties": { +"audioTrackType": { +"description": "The type of audio track associated with the caption track.", +"enum": [ +"unknown", +"primary", +"commentary", +"descriptive" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"failureReason": { +"description": "The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed.", +"enum": [ +"unknownFormat", +"unsupportedFormat", +"processingFailed" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"isAutoSynced": { +"description": "Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions.", +"type": "boolean" +}, +"isCC": { +"description": "Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false.", +"type": "boolean" +}, +"isDraft": { +"description": "Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false. @mutable youtube.captions.insert youtube.captions.update", +"type": "boolean" +}, +"isEasyReader": { +"description": "Indicates whether caption track is formatted for \"easy reader,\" meaning it is at a third-grade level for language learners. The default value is false.", +"type": "boolean" +}, +"isLarge": { +"description": "Indicates whether the caption track uses large text for the vision-impaired. The default value is false.", +"type": "boolean" +}, +"language": { +"annotations": { +"required": [ +"youtube.captions.insert" +] +}, +"description": "The language of the caption track. The property value is a BCP-47 language tag.", +"type": "string" +}, +"lastUpdated": { +"description": "The date and time when the caption track was last updated.", +"format": "date-time", +"type": "string" +}, +"name": { +"annotations": { +"required": [ +"youtube.captions.insert" +] +}, +"description": "The name of the caption track. The name is intended to be visible to the user as an option during playback.", +"type": "string" +}, +"status": { +"description": "The caption track's status.", +"enum": [ +"serving", +"syncing", +"failed" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"trackKind": { +"description": "The caption track's type.", +"enum": [ +"standard", +"ASR", +"forced" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"videoId": { +"annotations": { +"required": [ +"youtube.captions.insert" +] +}, +"description": "The ID that YouTube uses to uniquely identify the video associated with the caption track. @mutable youtube.captions.insert", +"type": "string" +} +}, +"type": "object" +}, +"CdnSettings": { +"description": "Brief description of the live stream cdn settings.", +"id": "CdnSettings", +"properties": { +"format": { +"annotations": { +"required": [ +"youtube.liveStreams.insert", +"youtube.liveStreams.update" +] +}, +"deprecated": true, +"description": "The format of the video stream that you are sending to Youtube. ", +"type": "string" +}, +"frameRate": { +"description": "The frame rate of the inbound video data.", +"enum": [ +"30fps", +"60fps", +"variable" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"ingestionInfo": { +"$ref": "IngestionInfo", +"description": "The ingestionInfo object contains information that YouTube provides that you need to transmit your RTMP or HTTP stream to YouTube." +}, +"ingestionType": { +"annotations": { +"required": [ +"youtube.liveStreams.insert", +"youtube.liveStreams.update" +] +}, +"description": " The method or protocol used to transmit the video stream.", +"enum": [ +"rtmp", +"dash", +"webrtc", +"hls" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"resolution": { +"description": "The resolution of the inbound video data.", +"enum": [ +"240p", +"360p", +"480p", +"720p", +"1080p", +"1440p", +"2160p", +"variable" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"Channel": { +"description": "A *channel* resource contains information about a YouTube channel.", +"id": "Channel", +"properties": { +"auditDetails": { +"$ref": "ChannelAuditDetails", +"description": "The auditionDetails object encapsulates channel data that is relevant for YouTube Partners during the audition process." +}, +"brandingSettings": { +"$ref": "ChannelBrandingSettings", +"description": "The brandingSettings object encapsulates information about the branding of the channel." +}, +"contentDetails": { +"$ref": "ChannelContentDetails", +"description": "The contentDetails object encapsulates information about the channel's content." +}, +"contentOwnerDetails": { +"$ref": "ChannelContentOwnerDetails", +"description": "The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel." +}, +"conversionPings": { +"$ref": "ChannelConversionPings", +"deprecated": true, +"description": "The conversionPings object encapsulates information about conversion pings that need to be respected by the channel." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the channel.", +"type": "string" +}, +"kind": { +"default": "youtube#channel", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#channel\".", +"type": "string" +}, +"localizations": { +"additionalProperties": { +"$ref": "ChannelLocalization" +}, +"description": "Localizations for different languages", +"type": "object" +}, +"snippet": { +"$ref": "ChannelSnippet", +"description": "The snippet object contains basic details about the channel, such as its title, description, and thumbnail images." +}, +"statistics": { +"$ref": "ChannelStatistics", +"description": "The statistics object encapsulates statistics for the channel." +}, +"status": { +"$ref": "ChannelStatus", +"description": "The status object encapsulates information about the privacy status of the channel." +}, +"topicDetails": { +"$ref": "ChannelTopicDetails", +"description": "The topicDetails object encapsulates information about Freebase topics associated with the channel." +} +}, +"type": "object" +}, +"ChannelAuditDetails": { +"description": "The auditDetails object encapsulates channel data that is relevant for YouTube Partners during the audit process.", +"id": "ChannelAuditDetails", +"properties": { +"communityGuidelinesGoodStanding": { +"description": "Whether or not the channel respects the community guidelines.", +"type": "boolean" +}, +"contentIdClaimsGoodStanding": { +"description": "Whether or not the channel has any unresolved claims.", +"type": "boolean" +}, +"copyrightStrikesGoodStanding": { +"description": "Whether or not the channel has any copyright strikes.", +"type": "boolean" +} +}, +"type": "object" +}, +"ChannelBannerResource": { +"description": "A channel banner returned as the response to a channel_banner.insert call.", +"id": "ChannelBannerResource", +"properties": { +"etag": { +"type": "string" +}, +"kind": { +"default": "youtube#channelBannerResource", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#channelBannerResource\".", +"type": "string" +}, +"url": { +"description": "The URL of this banner image.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelBrandingSettings": { +"description": "Branding properties of a YouTube channel.", +"id": "ChannelBrandingSettings", +"properties": { +"channel": { +"$ref": "ChannelSettings", +"description": "Branding properties for the channel view." +}, +"hints": { +"deprecated": true, +"description": "Additional experimental branding properties.", +"items": { +"$ref": "PropertyValue" +}, +"type": "array" +}, +"image": { +"$ref": "ImageSettings", +"description": "Branding properties for branding images." +}, +"watch": { +"$ref": "WatchSettings", +"deprecated": true, +"description": "Branding properties for the watch page." +} +}, +"type": "object" +}, +"ChannelContentDetails": { +"description": "Details about the content of a channel.", +"id": "ChannelContentDetails", +"properties": { +"relatedPlaylists": { +"properties": { +"favorites": { +"deprecated": true, +"description": "The ID of the playlist that contains the channel\"s favorite videos. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list.", +"type": "string" +}, +"likes": { +"description": "The ID of the playlist that contains the channel\"s liked videos. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list.", +"type": "string" +}, +"uploads": { +"description": "The ID of the playlist that contains the channel\"s uploaded videos. Use the videos.insert method to upload new videos and the videos.delete method to delete previously uploaded videos.", +"type": "string" +}, +"watchHistory": { +"deprecated": true, +"description": "The ID of the playlist that contains the channel\"s watch history. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list.", +"type": "string" +}, +"watchLater": { +"deprecated": true, +"description": "The ID of the playlist that contains the channel\"s watch later playlist. Use the playlistItems.insert and playlistItems.delete to add or remove items from that list.", +"type": "string" +} +}, +"type": "object" +} +}, +"type": "object" +}, +"ChannelContentOwnerDetails": { +"description": "The contentOwnerDetails object encapsulates channel data that is relevant for YouTube Partners linked with the channel.", +"id": "ChannelContentOwnerDetails", +"properties": { +"contentOwner": { +"description": "The ID of the content owner linked to the channel.", +"type": "string" +}, +"timeLinked": { +"description": "The date and time when the channel was linked to the content owner.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"ChannelConversionPing": { +"description": "Pings that the app shall fire (authenticated by biscotti cookie). Each ping has a context, in which the app must fire the ping, and a url identifying the ping.", +"id": "ChannelConversionPing", +"properties": { +"context": { +"description": "Defines the context of the ping.", +"enum": [ +"subscribe", +"unsubscribe", +"cview" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"conversionUrl": { +"description": "The url (without the schema) that the player shall send the ping to. It's at caller's descretion to decide which schema to use (http vs https) Example of a returned url: //googleads.g.doubleclick.net/pagead/ viewthroughconversion/962985656/?data=path%3DtHe_path%3Btype%3D cview%3Butuid%3DGISQtTNGYqaYl4sKxoVvKA&labe=default The caller must append biscotti authentication (ms param in case of mobile, for example) to this ping.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelConversionPings": { +"description": "The conversionPings object encapsulates information about conversion pings that need to be respected by the channel.", +"id": "ChannelConversionPings", +"properties": { +"pings": { +"description": "Pings that the app shall fire (authenticated by biscotti cookie). Each ping has a context, in which the app must fire the ping, and a url identifying the ping.", +"items": { +"$ref": "ChannelConversionPing" +}, +"type": "array" +} +}, +"type": "object" +}, +"ChannelListResponse": { +"id": "ChannelListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"items": { +"$ref": "Channel" +}, +"type": "array" +}, +"kind": { +"default": "youtube#channelListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#channelListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelLocalization": { +"description": "Channel localization setting", +"id": "ChannelLocalization", +"properties": { +"description": { +"description": "The localized strings for channel's description.", +"type": "string" +}, +"title": { +"description": "The localized strings for channel's title.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelProfileDetails": { +"id": "ChannelProfileDetails", +"properties": { +"channelId": { +"description": "The YouTube channel ID.", +"type": "string" +}, +"channelUrl": { +"description": "The channel's URL.", +"type": "string" +}, +"displayName": { +"description": "The channel's display name.", +"type": "string" +}, +"profileImageUrl": { +"description": "The channels's avatar URL.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelSection": { +"id": "ChannelSection", +"properties": { +"contentDetails": { +"$ref": "ChannelSectionContentDetails", +"description": "The contentDetails object contains details about the channel section content, such as a list of playlists or channels featured in the section." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the channel section.", +"type": "string" +}, +"kind": { +"default": "youtube#channelSection", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#channelSection\".", +"type": "string" +}, +"localizations": { +"additionalProperties": { +"$ref": "ChannelSectionLocalization" +}, +"deprecated": true, +"description": "Localizations for different languages", +"type": "object" +}, +"snippet": { +"$ref": "ChannelSectionSnippet", +"description": "The snippet object contains basic details about the channel section, such as its type, style and title." +}, +"targeting": { +"$ref": "ChannelSectionTargeting", +"deprecated": true, +"description": "The targeting object contains basic targeting settings about the channel section." +} +}, +"type": "object" +}, +"ChannelSectionContentDetails": { +"description": "Details about a channelsection, including playlists and channels.", +"id": "ChannelSectionContentDetails", +"properties": { +"channels": { +"description": "The channel ids for type multiple_channels.", +"items": { +"type": "string" +}, +"type": "array" +}, +"playlists": { +"description": "The playlist ids for type single_playlist and multiple_playlists. For singlePlaylist, only one playlistId is allowed.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ChannelSectionListResponse": { +"id": "ChannelSectionListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of ChannelSections that match the request criteria.", +"items": { +"$ref": "ChannelSection" +}, +"type": "array" +}, +"kind": { +"default": "youtube#channelSectionListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#channelSectionListResponse\".", +"type": "string" +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelSectionLocalization": { +"description": "ChannelSection localization setting", +"id": "ChannelSectionLocalization", +"properties": { +"title": { +"deprecated": true, +"description": "The localized strings for channel section's title.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelSectionSnippet": { +"description": "Basic details about a channel section, including title, style and position.", +"id": "ChannelSectionSnippet", +"properties": { +"channelId": { +"description": "The ID that YouTube uses to uniquely identify the channel that published the channel section.", +"type": "string" +}, +"defaultLanguage": { +"deprecated": true, +"description": "The language of the channel section's default title and description.", +"type": "string" +}, +"localized": { +"$ref": "ChannelSectionLocalization", +"deprecated": true, +"description": "Localized title, read-only." +}, +"position": { +"description": "The position of the channel section in the channel.", +"format": "uint32", +"type": "integer" +}, +"style": { +"deprecated": true, +"description": "The style of the channel section.", +"enum": [ +"channelsectionStyleUnspecified", +"horizontalRow", +"verticalList" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"title": { +"description": "The channel section's title for multiple_playlists and multiple_channels.", +"type": "string" +}, +"type": { +"description": "The type of the channel section.", +"enum": [ +"channelsectionTypeUndefined", +"singlePlaylist", +"multiplePlaylists", +"popularUploads", +"recentUploads", +"likes", +"allPlaylists", +"likedPlaylists", +"recentPosts", +"recentActivity", +"liveEvents", +"upcomingEvents", +"completedEvents", +"multipleChannels", +"postedVideos", +"postedPlaylists", +"subscriptions" +], +"enumDeprecated": [ +false, +false, +false, +false, +false, +true, +false, +true, +true, +true, +false, +false, +false, +false, +true, +true, +false +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"ChannelSectionTargeting": { +"description": "ChannelSection targeting setting.", +"id": "ChannelSectionTargeting", +"properties": { +"countries": { +"deprecated": true, +"description": "The country the channel section is targeting.", +"items": { +"type": "string" +}, +"type": "array" +}, +"languages": { +"deprecated": true, +"description": "The language the channel section is targeting.", +"items": { +"type": "string" +}, +"type": "array" +}, +"regions": { +"deprecated": true, +"description": "The region the channel section is targeting.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"ChannelSettings": { +"description": "Branding properties for the channel view.", +"id": "ChannelSettings", +"properties": { +"country": { +"description": "The country of the channel.", +"type": "string" +}, +"defaultLanguage": { +"type": "string" +}, +"defaultTab": { +"deprecated": true, +"description": "Which content tab users should see when viewing the channel.", +"type": "string" +}, +"description": { +"description": "Specifies the channel description.", +"type": "string" +}, +"featuredChannelsTitle": { +"deprecated": true, +"description": "Title for the featured channels tab.", +"type": "string" +}, +"featuredChannelsUrls": { +"deprecated": true, +"description": "The list of featured channels.", +"items": { +"type": "string" +}, +"type": "array" +}, +"keywords": { +"description": "Lists keywords associated with the channel, comma-separated.", +"type": "string" +}, +"moderateComments": { +"deprecated": true, +"description": "Whether user-submitted comments left on the channel page need to be approved by the channel owner to be publicly visible.", +"type": "boolean" +}, +"profileColor": { +"deprecated": true, +"description": "A prominent color that can be rendered on this channel page.", +"type": "string" +}, +"showBrowseView": { +"deprecated": true, +"description": "Whether the tab to browse the videos should be displayed.", +"type": "boolean" +}, +"showRelatedChannels": { +"deprecated": true, +"description": "Whether related channels should be proposed.", +"type": "boolean" +}, +"title": { +"description": "Specifies the channel title.", +"type": "string" +}, +"trackingAnalyticsAccountId": { +"description": "The ID for a Google Analytics account to track and measure traffic to the channels.", +"type": "string" +}, +"unsubscribedTrailer": { +"description": "The trailer of the channel, for users that are not subscribers.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelSnippet": { +"description": "Basic details about a channel, including title, description and thumbnails.", +"id": "ChannelSnippet", +"properties": { +"country": { +"description": "The country of the channel.", +"type": "string" +}, +"customUrl": { +"description": "The custom url of the channel.", +"type": "string" +}, +"defaultLanguage": { +"description": "The language of the channel's default title and description.", +"type": "string" +}, +"description": { +"description": "The description of the channel.", +"type": "string" +}, +"localized": { +"$ref": "ChannelLocalization", +"description": "Localized title and description, read-only." +}, +"publishedAt": { +"description": "The date and time that the channel was created.", +"format": "date-time", +"type": "string" +}, +"thumbnails": { +"$ref": "ThumbnailDetails", +"description": "A map of thumbnail images associated with the channel. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail. When displaying thumbnails in your application, make sure that your code uses the image URLs exactly as they are returned in API responses. For example, your application should not use the http domain instead of the https domain in a URL returned in an API response. Beginning in July 2018, channel thumbnail URLs will only be available in the https domain, which is how the URLs appear in API responses. After that time, you might see broken images in your application if it tries to load YouTube images from the http domain. Thumbnail images might be empty for newly created channels and might take up to one day to populate." +}, +"title": { +"description": "The channel's title.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelStatistics": { +"description": "Statistics about a channel: number of subscribers, number of videos in the channel, etc.", +"id": "ChannelStatistics", +"properties": { +"commentCount": { +"description": "The number of comments for the channel.", +"format": "uint64", +"type": "string" +}, +"hiddenSubscriberCount": { +"description": "Whether or not the number of subscribers is shown for this user.", +"type": "boolean" +}, +"subscriberCount": { +"description": "The number of subscribers that the channel has.", +"format": "uint64", +"type": "string" +}, +"videoCount": { +"description": "The number of videos uploaded to the channel.", +"format": "uint64", +"type": "string" +}, +"viewCount": { +"description": "The number of times the channel has been viewed.", +"format": "uint64", +"type": "string" +} +}, +"type": "object" +}, +"ChannelStatus": { +"description": "JSON template for the status part of a channel.", +"id": "ChannelStatus", +"properties": { +"isLinked": { +"description": "If true, then the user is linked to either a YouTube username or G+ account. Otherwise, the user doesn't have a public YouTube identity.", +"type": "boolean" +}, +"longUploadsStatus": { +"description": "The long uploads status of this channel. See https://support.google.com/youtube/answer/71673 for more information.", +"enum": [ +"longUploadsUnspecified", +"allowed", +"eligible", +"disallowed" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"madeForKids": { +"type": "boolean" +}, +"privacyStatus": { +"description": "Privacy status of the channel.", +"enum": [ +"public", +"unlisted", +"private" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"selfDeclaredMadeForKids": { +"type": "boolean" +} +}, +"type": "object" +}, +"ChannelToStoreLinkDetails": { +"description": "Information specific to a store on a merchandising platform linked to a YouTube channel.", +"id": "ChannelToStoreLinkDetails", +"properties": { +"billingDetails": { +"$ref": "ChannelToStoreLinkDetailsBillingDetails", +"description": "Information specific to billing (read-only)." +}, +"merchantId": { +"description": "Google Merchant Center id of the store.", +"format": "uint64", +"type": "string" +}, +"storeName": { +"description": "Name of the store.", +"type": "string" +}, +"storeUrl": { +"description": "Landing page of the store.", +"type": "string" +} +}, +"type": "object" +}, +"ChannelToStoreLinkDetailsBillingDetails": { +"description": "Information specific to billing.", +"id": "ChannelToStoreLinkDetailsBillingDetails", +"properties": { +"billingStatus": { +"description": "The current billing profile status.", +"enum": [ +"billingStatusUnspecified", +"billingStatusPending", +"billingStatusActive", +"billingStatusInactive" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"ChannelTopicDetails": { +"description": "Freebase topic information related to the channel.", +"id": "ChannelTopicDetails", +"properties": { +"topicCategories": { +"description": "A list of Wikipedia URLs that describe the channel's content.", +"items": { +"type": "string" +}, +"type": "array" +}, +"topicIds": { +"deprecated": true, +"description": "A list of Freebase topic IDs associated with the channel. You can retrieve information about each topic using the Freebase Topic API.", +"items": { +"type": "string" +}, +"type": "array" +} +}, +"type": "object" +}, +"Comment": { +"description": "A *comment* represents a single YouTube comment.", +"id": "Comment", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the comment.", +"type": "string" +}, +"kind": { +"default": "youtube#comment", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#comment\".", +"type": "string" +}, +"snippet": { +"$ref": "CommentSnippet", +"description": "The snippet object contains basic details about the comment." +} +}, +"type": "object" +}, +"CommentListResponse": { +"id": "CommentListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of comments that match the request criteria.", +"items": { +"$ref": "Comment" +}, +"type": "array" +}, +"kind": { +"default": "youtube#commentListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#commentListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"CommentSnippet": { +"description": "Basic details about a comment, such as its author and text.", +"id": "CommentSnippet", +"properties": { +"authorChannelId": { +"$ref": "CommentSnippetAuthorChannelId" +}, +"authorChannelUrl": { +"description": "Link to the author's YouTube channel, if any.", +"type": "string" +}, +"authorDisplayName": { +"description": "The name of the user who posted the comment.", +"type": "string" +}, +"authorProfileImageUrl": { +"description": "The URL for the avatar of the user who posted the comment.", +"type": "string" +}, +"canRate": { +"description": "Whether the current viewer can rate this comment.", +"type": "boolean" +}, +"channelId": { +"description": "The id of the corresponding YouTube channel. In case of a channel comment this is the channel the comment refers to. In case of a video comment it's the video's channel.", +"type": "string" +}, +"likeCount": { +"description": "The total number of likes this comment has received.", +"format": "uint32", +"type": "integer" +}, +"moderationStatus": { +"description": "The comment's moderation status. Will not be set if the comments were requested through the id filter.", +"enum": [ +"published", +"heldForReview", +"likelySpam", +"rejected" +], +"enumDescriptions": [ +"The comment is available for public display.", +"The comment is awaiting review by a moderator.", +"", +"The comment is unfit for display." +], +"type": "string" +}, +"parentId": { +"description": "The unique id of the parent comment, only set for replies.", +"type": "string" +}, +"publishedAt": { +"description": "The date and time when the comment was originally published.", +"format": "date-time", +"type": "string" +}, +"textDisplay": { +"description": "The comment's text. The format is either plain text or HTML dependent on what has been requested. Even the plain text representation may differ from the text originally posted in that it may replace video links with video titles etc.", +"type": "string" +}, +"textOriginal": { +"description": "The comment's original raw text as initially posted or last updated. The original text will only be returned if it is accessible to the viewer, which is only guaranteed if the viewer is the comment's author.", +"type": "string" +}, +"updatedAt": { +"description": "The date and time when the comment was last updated.", +"format": "date-time", +"type": "string" +}, +"videoId": { +"description": "The ID of the video the comment refers to, if any.", +"type": "string" +}, +"viewerRating": { +"description": "The rating the viewer has given to this comment. For the time being this will never return RATE_TYPE_DISLIKE and instead return RATE_TYPE_NONE. This may change in the future.", +"enum": [ +"none", +"like", +"dislike" +], +"enumDescriptions": [ +"", +"The entity is liked.", +"The entity is disliked." +], +"type": "string" +} +}, +"type": "object" +}, +"CommentSnippetAuthorChannelId": { +"description": "The id of the author's YouTube channel, if any.", +"id": "CommentSnippetAuthorChannelId", +"properties": { +"value": { +"type": "string" +} +}, +"type": "object" +}, +"CommentThread": { +"description": "A *comment thread* represents information that applies to a top level comment and all its replies. It can also include the top level comment itself and some of the replies.", +"id": "CommentThread", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the comment thread.", +"type": "string" +}, +"kind": { +"default": "youtube#commentThread", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#commentThread\".", +"type": "string" +}, +"replies": { +"$ref": "CommentThreadReplies", +"description": "The replies object contains a limited number of replies (if any) to the top level comment found in the snippet." +}, +"snippet": { +"$ref": "CommentThreadSnippet", +"description": "The snippet object contains basic details about the comment thread and also the top level comment." +} +}, +"type": "object" +}, +"CommentThreadListResponse": { +"id": "CommentThreadListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of comment threads that match the request criteria.", +"items": { +"$ref": "CommentThread" +}, +"type": "array" +}, +"kind": { +"default": "youtube#commentThreadListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#commentThreadListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"CommentThreadReplies": { +"description": "Comments written in (direct or indirect) reply to the top level comment.", +"id": "CommentThreadReplies", +"properties": { +"comments": { +"description": "A limited number of replies. Unless the number of replies returned equals total_reply_count in the snippet the returned replies are only a subset of the total number of replies.", +"items": { +"$ref": "Comment" +}, +"type": "array" +} +}, +"type": "object" +}, +"CommentThreadSnippet": { +"description": "Basic details about a comment thread.", +"id": "CommentThreadSnippet", +"properties": { +"canReply": { +"description": "Whether the current viewer of the thread can reply to it. This is viewer specific - other viewers may see a different value for this field.", +"type": "boolean" +}, +"channelId": { +"description": "The YouTube channel the comments in the thread refer to or the channel with the video the comments refer to. If video_id isn't set the comments refer to the channel itself.", +"type": "string" +}, +"isPublic": { +"description": "Whether the thread (and therefore all its comments) is visible to all YouTube users.", +"type": "boolean" +}, +"topLevelComment": { +"$ref": "Comment", +"description": "The top level comment of this thread." +}, +"totalReplyCount": { +"description": "The total number of replies (not including the top level comment).", +"format": "uint32", +"type": "integer" +}, +"videoId": { +"description": "The ID of the video the comments refer to, if any. No video_id implies a channel discussion comment.", +"type": "string" +} +}, +"type": "object" +}, +"ContentRating": { +"description": "Ratings schemes. The country-specific ratings are mostly for movies and shows. LINT.IfChange", +"id": "ContentRating", +"properties": { +"acbRating": { +"description": "The video's Australian Classification Board (ACB) or Australian Communications and Media Authority (ACMA) rating. ACMA ratings are used to classify children's television programming.", +"enum": [ +"acbUnspecified", +"acbE", +"acbP", +"acbC", +"acbG", +"acbPg", +"acbM", +"acbMa15plus", +"acbR18plus", +"acbUnrated" +], +"enumDescriptions": [ +"", +"E", +"Programs that have been given a P classification by the Australian Communications and Media Authority. These programs are intended for preschool children.", +"Programs that have been given a C classification by the Australian Communications and Media Authority. These programs are intended for children (other than preschool children) who are younger than 14 years of age.", +"G", +"PG", +"M", +"MA15+", +"R18+", +"" +], +"type": "string" +}, +"agcomRating": { +"description": "The video's rating from Italy's Autorit\u00e0 per le Garanzie nelle Comunicazioni (AGCOM).", +"enum": [ +"agcomUnspecified", +"agcomT", +"agcomVm14", +"agcomVm18", +"agcomUnrated" +], +"enumDescriptions": [ +"", +"T", +"VM14", +"VM18", +"" +], +"type": "string" +}, +"anatelRating": { +"description": "The video's Anatel (Asociaci\u00f3n Nacional de Televisi\u00f3n) rating for Chilean television.", +"enum": [ +"anatelUnspecified", +"anatelF", +"anatelI", +"anatelI7", +"anatelI10", +"anatelI12", +"anatelR", +"anatelA", +"anatelUnrated" +], +"enumDescriptions": [ +"", +"F", +"I", +"I-7", +"I-10", +"I-12", +"R", +"A", +"" +], +"type": "string" +}, +"bbfcRating": { +"description": "The video's British Board of Film Classification (BBFC) rating.", +"enum": [ +"bbfcUnspecified", +"bbfcU", +"bbfcPg", +"bbfc12a", +"bbfc12", +"bbfc15", +"bbfc18", +"bbfcR18", +"bbfcUnrated" +], +"enumDescriptions": [ +"", +"U", +"PG", +"12A", +"12", +"15", +"18", +"R18", +"" +], +"type": "string" +}, +"bfvcRating": { +"description": "The video's rating from Thailand's Board of Film and Video Censors.", +"enum": [ +"bfvcUnspecified", +"bfvcG", +"bfvcE", +"bfvc13", +"bfvc15", +"bfvc18", +"bfvc20", +"bfvcB", +"bfvcUnrated" +], +"enumDescriptions": [ +"", +"G", +"E", +"13", +"15", +"18", +"20", +"B", +"" +], +"type": "string" +}, +"bmukkRating": { +"description": "The video's rating from the Austrian Board of Media Classification (Bundesministerium f\u00fcr Unterricht, Kunst und Kultur).", +"enum": [ +"bmukkUnspecified", +"bmukkAa", +"bmukk6", +"bmukk8", +"bmukk10", +"bmukk12", +"bmukk14", +"bmukk16", +"bmukkUnrated" +], +"enumDescriptions": [ +"", +"Unrestricted", +"6+", +"8+", +"10+", +"12+", +"14+", +"16+", +"" +], +"type": "string" +}, +"catvRating": { +"description": "Rating system for Canadian TV - Canadian TV Classification System The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian English-language broadcasts. For more information, see the Canadian Broadcast Standards Council website.", +"enum": [ +"catvUnspecified", +"catvC", +"catvC8", +"catvG", +"catvPg", +"catv14plus", +"catv18plus", +"catvUnrated", +"catvE" +], +"enumDescriptions": [ +"", +"C", +"C8", +"G", +"PG", +"14+", +"18+", +"", +"" +], +"type": "string" +}, +"catvfrRating": { +"description": "The video's rating from the Canadian Radio-Television and Telecommunications Commission (CRTC) for Canadian French-language broadcasts. For more information, see the Canadian Broadcast Standards Council website.", +"enum": [ +"catvfrUnspecified", +"catvfrG", +"catvfr8plus", +"catvfr13plus", +"catvfr16plus", +"catvfr18plus", +"catvfrUnrated", +"catvfrE" +], +"enumDescriptions": [ +"", +"G", +"8+", +"13+", +"16+", +"18+", +"", +"" +], +"type": "string" +}, +"cbfcRating": { +"description": "The video's Central Board of Film Certification (CBFC - India) rating.", +"enum": [ +"cbfcUnspecified", +"cbfcU", +"cbfcUA", +"cbfcUA7plus", +"cbfcUA13plus", +"cbfcUA16plus", +"cbfcA", +"cbfcS", +"cbfcUnrated" +], +"enumDescriptions": [ +"", +"U", +"U/A", +"U/A 7+", +"U/A 13+", +"U/A 16+", +"A", +"S", +"" +], +"type": "string" +}, +"cccRating": { +"description": "The video's Consejo de Calificaci\u00f3n Cinematogr\u00e1fica (Chile) rating.", +"enum": [ +"cccUnspecified", +"cccTe", +"ccc6", +"ccc14", +"ccc18", +"ccc18v", +"ccc18s", +"cccUnrated" +], +"enumDescriptions": [ +"", +"Todo espectador", +"6+ - Inconveniente para menores de 7 a\u00f1os", +"14+", +"18+", +"18+ - contenido excesivamente violento", +"18+ - contenido pornogr\u00e1fico", +"" +], +"type": "string" +}, +"cceRating": { +"description": "The video's rating from Portugal's Comiss\u00e3o de Classifica\u00e7\u00e3o de Espect\u00b4culos.", +"enum": [ +"cceUnspecified", +"cceM4", +"cceM6", +"cceM12", +"cceM16", +"cceM18", +"cceUnrated", +"cceM14" +], +"enumDescriptions": [ +"", +"4", +"6", +"12", +"16", +"18", +"", +"14" +], +"type": "string" +}, +"chfilmRating": { +"description": "The video's rating in Switzerland.", +"enum": [ +"chfilmUnspecified", +"chfilm0", +"chfilm6", +"chfilm12", +"chfilm16", +"chfilm18", +"chfilmUnrated" +], +"enumDescriptions": [ +"", +"0", +"6", +"12", +"16", +"18", +"" +], +"type": "string" +}, +"chvrsRating": { +"description": "The video's Canadian Home Video Rating System (CHVRS) rating.", +"enum": [ +"chvrsUnspecified", +"chvrsG", +"chvrsPg", +"chvrs14a", +"chvrs18a", +"chvrsR", +"chvrsE", +"chvrsUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"14A", +"18A", +"R", +"E", +"" +], +"type": "string" +}, +"cicfRating": { +"description": "The video's rating from the Commission de Contr\u00f4le des Films (Belgium).", +"enum": [ +"cicfUnspecified", +"cicfE", +"cicfKtEa", +"cicfKntEna", +"cicfUnrated" +], +"enumDescriptions": [ +"", +"E", +"KT/EA", +"KNT/ENA", +"" +], +"type": "string" +}, +"cnaRating": { +"description": "The video's rating from Romania's CONSILIUL NATIONAL AL AUDIOVIZUALULUI (CNA).", +"enum": [ +"cnaUnspecified", +"cnaAp", +"cna12", +"cna15", +"cna18", +"cna18plus", +"cnaUnrated" +], +"enumDescriptions": [ +"", +"AP", +"12", +"15", +"18", +"18+", +"" +], +"type": "string" +}, +"cncRating": { +"description": "Rating system in France - Commission de classification cinematographique", +"enum": [ +"cncUnspecified", +"cncT", +"cnc10", +"cnc12", +"cnc16", +"cnc18", +"cncE", +"cncInterdiction", +"cncUnrated" +], +"enumDescriptions": [ +"", +"T", +"10", +"12", +"16", +"18", +"E", +"interdiction", +"" +], +"type": "string" +}, +"csaRating": { +"description": "The video's rating from France's Conseil sup\u00e9rieur de l\u2019audiovisuel, which rates broadcast content.", +"enum": [ +"csaUnspecified", +"csaT", +"csa10", +"csa12", +"csa16", +"csa18", +"csaInterdiction", +"csaUnrated" +], +"enumDescriptions": [ +"", +"T", +"10", +"12", +"16", +"18", +"Interdiction", +"" +], +"type": "string" +}, +"cscfRating": { +"description": "The video's rating from Luxembourg's Commission de surveillance de la classification des films (CSCF).", +"enum": [ +"cscfUnspecified", +"cscfAl", +"cscfA", +"cscf6", +"cscf9", +"cscf12", +"cscf16", +"cscf18", +"cscfUnrated" +], +"enumDescriptions": [ +"", +"AL", +"A", +"6", +"9", +"12", +"16", +"18", +"" +], +"type": "string" +}, +"czfilmRating": { +"description": "The video's rating in the Czech Republic.", +"enum": [ +"czfilmUnspecified", +"czfilmU", +"czfilm12", +"czfilm14", +"czfilm18", +"czfilmUnrated" +], +"enumDescriptions": [ +"", +"U", +"12", +"14", +"18", +"" +], +"type": "string" +}, +"djctqRating": { +"description": "The video's Departamento de Justi\u00e7a, Classifica\u00e7\u00e3o, Qualifica\u00e7\u00e3o e T\u00edtulos (DJCQT - Brazil) rating.", +"enum": [ +"djctqUnspecified", +"djctqL", +"djctq10", +"djctq12", +"djctq14", +"djctq16", +"djctq18", +"djctqEr", +"djctqL10", +"djctqL12", +"djctqL14", +"djctqL16", +"djctqL18", +"djctq1012", +"djctq1014", +"djctq1016", +"djctq1018", +"djctq1214", +"djctq1216", +"djctq1218", +"djctq1416", +"djctq1418", +"djctq1618", +"djctqUnrated" +], +"enumDescriptions": [ +"", +"L", +"10", +"12", +"14", +"16", +"18", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"djctqRatingReasons": { +"description": "Reasons that explain why the video received its DJCQT (Brazil) rating.", +"items": { +"enum": [ +"djctqRatingReasonUnspecified", +"djctqViolence", +"djctqExtremeViolence", +"djctqSexualContent", +"djctqNudity", +"djctqSex", +"djctqExplicitSex", +"djctqDrugs", +"djctqLegalDrugs", +"djctqIllegalDrugs", +"djctqInappropriateLanguage", +"djctqCriminalActs", +"djctqImpactingContent" +], +"enumDescriptions": [ +"", +"Brazil rating content descriptors. See http://go/brazilratings section F. Viol\u00eancia (Violence)", +"Viol\u00eancia extrema (Extreme violence)", +"Conte\u00fado sexual (Sexual content)", +"Nudez (Nudity)", +"Sexo (Sex)", +"Sexo Expl\u00edcito (Explicit sex)", +"Drogas (Drugs)", +"Drogas L\u00edcitas (Legal drugs)", +"Drogas Il\u00edcitas (Illegal drugs)", +"Linguagem Impr\u00f3pria (Inappropriate language)", +"Atos Criminosos (Criminal Acts)", +"Conte\u00fado Impactante (Impacting content)" +], +"type": "string" +}, +"type": "array" +}, +"ecbmctRating": { +"description": "Rating system in Turkey - Evaluation and Classification Board of the Ministry of Culture and Tourism", +"enum": [ +"ecbmctUnspecified", +"ecbmctG", +"ecbmct7a", +"ecbmct7plus", +"ecbmct13a", +"ecbmct13plus", +"ecbmct15a", +"ecbmct15plus", +"ecbmct18plus", +"ecbmctUnrated" +], +"enumDescriptions": [ +"", +"G", +"7A", +"7+", +"13A", +"13+", +"15A", +"15+", +"18+", +"" +], +"type": "string" +}, +"eefilmRating": { +"description": "The video's rating in Estonia.", +"enum": [ +"eefilmUnspecified", +"eefilmPere", +"eefilmL", +"eefilmMs6", +"eefilmK6", +"eefilmMs12", +"eefilmK12", +"eefilmK14", +"eefilmK16", +"eefilmUnrated" +], +"enumDescriptions": [ +"", +"Pere", +"L", +"MS-6", +"K-6", +"MS-12", +"K-12", +"K-14", +"K-16", +"" +], +"type": "string" +}, +"egfilmRating": { +"description": "The video's rating in Egypt.", +"enum": [ +"egfilmUnspecified", +"egfilmGn", +"egfilm18", +"egfilmBn", +"egfilmUnrated" +], +"enumDescriptions": [ +"", +"GN", +"18", +"BN", +"" +], +"type": "string" +}, +"eirinRating": { +"description": "The video's Eirin (\u6620\u502b) rating. Eirin is the Japanese rating system.", +"enum": [ +"eirinUnspecified", +"eirinG", +"eirinPg12", +"eirinR15plus", +"eirinR18plus", +"eirinUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG-12", +"R15+", +"R18+", +"" +], +"type": "string" +}, +"fcbmRating": { +"description": "The video's rating from Malaysia's Film Censorship Board.", +"enum": [ +"fcbmUnspecified", +"fcbmU", +"fcbmPg13", +"fcbmP13", +"fcbm18", +"fcbm18sx", +"fcbm18pa", +"fcbm18sg", +"fcbm18pl", +"fcbmUnrated" +], +"enumDescriptions": [ +"", +"U", +"PG13", +"P13", +"18", +"18SX", +"18PA", +"18SG", +"18PL", +"" +], +"type": "string" +}, +"fcoRating": { +"description": "The video's rating from Hong Kong's Office for Film, Newspaper and Article Administration.", +"enum": [ +"fcoUnspecified", +"fcoI", +"fcoIia", +"fcoIib", +"fcoIi", +"fcoIii", +"fcoUnrated" +], +"enumDescriptions": [ +"", +"I", +"IIA", +"IIB", +"II", +"III", +"" +], +"type": "string" +}, +"fmocRating": { +"deprecated": true, +"description": "This property has been deprecated. Use the contentDetails.contentRating.cncRating instead.", +"enum": [ +"fmocUnspecified", +"fmocU", +"fmoc10", +"fmoc12", +"fmoc16", +"fmoc18", +"fmocE", +"fmocUnrated" +], +"enumDescriptions": [ +"", +"U", +"10", +"12", +"16", +"18", +"E", +"" +], +"type": "string" +}, +"fpbRating": { +"description": "The video's rating from South Africa's Film and Publication Board.", +"enum": [ +"fpbUnspecified", +"fpbA", +"fpbPg", +"fpb79Pg", +"fpb1012Pg", +"fpb13", +"fpb16", +"fpb18", +"fpbX18", +"fpbXx", +"fpbUnrated", +"fpb10" +], +"enumDescriptions": [ +"", +"A", +"PG", +"7-9PG", +"10-12PG", +"13", +"16", +"18", +"X18", +"XX", +"", +"10" +], +"type": "string" +}, +"fpbRatingReasons": { +"description": "Reasons that explain why the video received its FPB (South Africa) rating.", +"items": { +"enum": [ +"fpbRatingReasonUnspecified", +"fpbBlasphemy", +"fpbLanguage", +"fpbNudity", +"fpbPrejudice", +"fpbSex", +"fpbViolence", +"fpbDrugs", +"fpbSexualViolence", +"fpbHorror", +"fpbCriminalTechniques", +"fpbImitativeActsTechniques" +], +"enumDescriptions": [ +"", +"South Africa rating content descriptors.", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"type": "array" +}, +"fskRating": { +"description": "The video's Freiwillige Selbstkontrolle der Filmwirtschaft (FSK - Germany) rating.", +"enum": [ +"fskUnspecified", +"fsk0", +"fsk6", +"fsk12", +"fsk16", +"fsk18", +"fskUnrated" +], +"enumDescriptions": [ +"", +"FSK 0", +"FSK 6", +"FSK 12", +"FSK 16", +"FSK 18", +"" +], +"type": "string" +}, +"grfilmRating": { +"description": "The video's rating in Greece.", +"enum": [ +"grfilmUnspecified", +"grfilmK", +"grfilmE", +"grfilmK12", +"grfilmK13", +"grfilmK15", +"grfilmK17", +"grfilmK18", +"grfilmUnrated" +], +"enumDescriptions": [ +"", +"K", +"E", +"K-12", +"K-13", +"K-15", +"K-17", +"K-18", +"" +], +"type": "string" +}, +"icaaRating": { +"description": "The video's Instituto de la Cinematograf\u00eda y de las Artes Audiovisuales (ICAA - Spain) rating.", +"enum": [ +"icaaUnspecified", +"icaaApta", +"icaa7", +"icaa12", +"icaa13", +"icaa16", +"icaa18", +"icaaX", +"icaaUnrated" +], +"enumDescriptions": [ +"", +"APTA", +"7", +"12", +"13", +"16", +"18", +"X", +"" +], +"type": "string" +}, +"ifcoRating": { +"description": "The video's Irish Film Classification Office (IFCO - Ireland) rating. See the IFCO website for more information.", +"enum": [ +"ifcoUnspecified", +"ifcoG", +"ifcoPg", +"ifco12", +"ifco12a", +"ifco15", +"ifco15a", +"ifco16", +"ifco18", +"ifcoUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"12", +"12A", +"15", +"15A", +"16", +"18", +"" +], +"type": "string" +}, +"ilfilmRating": { +"description": "The video's rating in Israel.", +"enum": [ +"ilfilmUnspecified", +"ilfilmAa", +"ilfilm12", +"ilfilm14", +"ilfilm16", +"ilfilm18", +"ilfilmUnrated" +], +"enumDescriptions": [ +"", +"AA", +"12", +"14", +"16", +"18", +"" +], +"type": "string" +}, +"incaaRating": { +"description": "The video's INCAA (Instituto Nacional de Cine y Artes Audiovisuales - Argentina) rating.", +"enum": [ +"incaaUnspecified", +"incaaAtp", +"incaaSam13", +"incaaSam16", +"incaaSam18", +"incaaC", +"incaaUnrated" +], +"enumDescriptions": [ +"", +"ATP (Apta para todo publico)", +"13 (Solo apta para mayores de 13 a\u00f1os)", +"16 (Solo apta para mayores de 16 a\u00f1os)", +"18 (Solo apta para mayores de 18 a\u00f1os)", +"X (Solo apta para mayores de 18 a\u00f1os, de exhibici\u00f3n condicionada)", +"" +], +"type": "string" +}, +"kfcbRating": { +"description": "The video's rating from the Kenya Film Classification Board.", +"enum": [ +"kfcbUnspecified", +"kfcbG", +"kfcbPg", +"kfcb16plus", +"kfcbR", +"kfcbUnrated" +], +"enumDescriptions": [ +"", +"GE", +"PG", +"16", +"18", +"" +], +"type": "string" +}, +"kijkwijzerRating": { +"description": "The video's NICAM/Kijkwijzer rating from the Nederlands Instituut voor de Classificatie van Audiovisuele Media (Netherlands).", +"enum": [ +"kijkwijzerUnspecified", +"kijkwijzerAl", +"kijkwijzer6", +"kijkwijzer9", +"kijkwijzer12", +"kijkwijzer16", +"kijkwijzer18", +"kijkwijzerUnrated" +], +"enumDescriptions": [ +"", +"AL", +"6", +"9", +"12", +"16", +"", +"" +], +"type": "string" +}, +"kmrbRating": { +"description": "The video's Korea Media Rating Board (\uc601\uc0c1\ubb3c\ub4f1\uae09\uc704\uc6d0\ud68c) rating. The KMRB rates videos in South Korea.", +"enum": [ +"kmrbUnspecified", +"kmrbAll", +"kmrb12plus", +"kmrb15plus", +"kmrbTeenr", +"kmrbR", +"kmrbUnrated" +], +"enumDescriptions": [ +"", +"\uc804\uccb4\uad00\ub78c\uac00", +"12\uc138 \uc774\uc0c1 \uad00\ub78c\uac00", +"15\uc138 \uc774\uc0c1 \uad00\ub78c\uac00", +"", +"\uccad\uc18c\ub144 \uad00\ub78c\ubd88\uac00", +"" +], +"type": "string" +}, +"lsfRating": { +"description": "The video's rating from Indonesia's Lembaga Sensor Film.", +"enum": [ +"lsfUnspecified", +"lsfSu", +"lsfA", +"lsfBo", +"lsf13", +"lsfR", +"lsf17", +"lsfD", +"lsf21", +"lsfUnrated" +], +"enumDeprecated": [ +false, +false, +false, +true, +false, +true, +false, +true, +false, +true +], +"enumDescriptions": [ +"", +"SU", +"A", +"BO", +"13", +"R", +"17", +"D", +"21", +"" +], +"type": "string" +}, +"mccaaRating": { +"description": "The video's rating from Malta's Film Age-Classification Board.", +"enum": [ +"mccaaUnspecified", +"mccaaU", +"mccaaPg", +"mccaa12a", +"mccaa12", +"mccaa14", +"mccaa15", +"mccaa16", +"mccaa18", +"mccaaUnrated" +], +"enumDescriptions": [ +"", +"U", +"PG", +"12A", +"12", +"14 - this rating was removed from the new classification structure introduced in 2013.", +"15", +"16 - this rating was removed from the new classification structure introduced in 2013.", +"18", +"" +], +"type": "string" +}, +"mccypRating": { +"description": "The video's rating from the Danish Film Institute's (Det Danske Filminstitut) Media Council for Children and Young People.", +"enum": [ +"mccypUnspecified", +"mccypA", +"mccyp7", +"mccyp11", +"mccyp15", +"mccypUnrated" +], +"enumDescriptions": [ +"", +"A", +"7", +"11", +"15", +"" +], +"type": "string" +}, +"mcstRating": { +"description": "The video's rating system for Vietnam - MCST", +"enum": [ +"mcstUnspecified", +"mcstP", +"mcst0", +"mcstC13", +"mcstC16", +"mcst16plus", +"mcstC18", +"mcstGPg", +"mcstUnrated" +], +"enumDescriptions": [ +"", +"P", +"0", +"C13", +"C16", +"16+", +"C18", +"MCST_G_PG", +"" +], +"type": "string" +}, +"mdaRating": { +"description": "The video's rating from Singapore's Media Development Authority (MDA) and, specifically, it's Board of Film Censors (BFC).", +"enum": [ +"mdaUnspecified", +"mdaG", +"mdaPg", +"mdaPg13", +"mdaNc16", +"mdaM18", +"mdaR21", +"mdaUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"PG13", +"NC16", +"M18", +"R21", +"" +], +"type": "string" +}, +"medietilsynetRating": { +"description": "The video's rating from Medietilsynet, the Norwegian Media Authority.", +"enum": [ +"medietilsynetUnspecified", +"medietilsynetA", +"medietilsynet6", +"medietilsynet7", +"medietilsynet9", +"medietilsynet11", +"medietilsynet12", +"medietilsynet15", +"medietilsynet18", +"medietilsynetUnrated" +], +"enumDescriptions": [ +"", +"A", +"6", +"7", +"9", +"11", +"12", +"15", +"18", +"" +], +"type": "string" +}, +"mekuRating": { +"description": "The video's rating from Finland's Kansallinen Audiovisuaalinen Instituutti (National Audiovisual Institute).", +"enum": [ +"mekuUnspecified", +"mekuS", +"meku7", +"meku12", +"meku16", +"meku18", +"mekuUnrated" +], +"enumDescriptions": [ +"", +"S", +"7", +"12", +"16", +"18", +"" +], +"type": "string" +}, +"menaMpaaRating": { +"description": "The rating system for MENA countries, a clone of MPAA. It is needed to prevent titles go live w/o additional QC check, since some of them can be inappropriate for the countries at all. See b/33408548 for more details.", +"enum": [ +"menaMpaaUnspecified", +"menaMpaaG", +"menaMpaaPg", +"menaMpaaPg13", +"menaMpaaR", +"menaMpaaUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"PG-13", +"R", +"To keep the same enum values as MPAA's items have, skip NC_17." +], +"type": "string" +}, +"mibacRating": { +"description": "The video's rating from the Ministero dei Beni e delle Attivit\u00e0 Culturali e del Turismo (Italy).", +"enum": [ +"mibacUnspecified", +"mibacT", +"mibacVap", +"mibacVm6", +"mibacVm12", +"mibacVm14", +"mibacVm16", +"mibacVm18", +"mibacUnrated" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"mocRating": { +"description": "The video's Ministerio de Cultura (Colombia) rating.", +"enum": [ +"mocUnspecified", +"mocE", +"mocT", +"moc7", +"moc12", +"moc15", +"moc18", +"mocX", +"mocBanned", +"mocUnrated" +], +"enumDescriptions": [ +"", +"E", +"T", +"7", +"12", +"15", +"18", +"X", +"Banned", +"" +], +"type": "string" +}, +"moctwRating": { +"description": "The video's rating from Taiwan's Ministry of Culture (\u6587\u5316\u90e8).", +"enum": [ +"moctwUnspecified", +"moctwG", +"moctwP", +"moctwPg", +"moctwR", +"moctwUnrated", +"moctwR12", +"moctwR15" +], +"enumDescriptions": [ +"", +"G", +"P", +"PG", +"R", +"", +"R-12", +"R-15" +], +"type": "string" +}, +"mpaaRating": { +"description": "The video's Motion Picture Association of America (MPAA) rating.", +"enum": [ +"mpaaUnspecified", +"mpaaG", +"mpaaPg", +"mpaaPg13", +"mpaaR", +"mpaaNc17", +"mpaaX", +"mpaaUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"PG-13", +"R", +"NC-17", +"! X", +"" +], +"type": "string" +}, +"mpaatRating": { +"description": "The rating system for trailer, DVD, and Ad in the US. See http://movielabs.com/md/ratings/v2.3/html/US_MPAAT_Ratings.html.", +"enum": [ +"mpaatUnspecified", +"mpaatGb", +"mpaatRb" +], +"enumDescriptions": [ +"", +"GB", +"RB" +], +"type": "string" +}, +"mtrcbRating": { +"description": "The video's rating from the Movie and Television Review and Classification Board (Philippines).", +"enum": [ +"mtrcbUnspecified", +"mtrcbG", +"mtrcbPg", +"mtrcbR13", +"mtrcbR16", +"mtrcbR18", +"mtrcbX", +"mtrcbUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"R-13", +"R-16", +"R-18", +"X", +"" +], +"type": "string" +}, +"nbcRating": { +"description": "The video's rating from the Maldives National Bureau of Classification.", +"enum": [ +"nbcUnspecified", +"nbcG", +"nbcPg", +"nbc12plus", +"nbc15plus", +"nbc18plus", +"nbc18plusr", +"nbcPu", +"nbcUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"12+", +"15+", +"18+", +"18+R", +"PU", +"" +], +"type": "string" +}, +"nbcplRating": { +"description": "The video's rating in Poland.", +"enum": [ +"nbcplUnspecified", +"nbcplI", +"nbcplIi", +"nbcplIii", +"nbcplIv", +"nbcpl18plus", +"nbcplUnrated" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"nfrcRating": { +"description": "The video's rating from the Bulgarian National Film Center.", +"enum": [ +"nfrcUnspecified", +"nfrcA", +"nfrcB", +"nfrcC", +"nfrcD", +"nfrcX", +"nfrcUnrated" +], +"enumDescriptions": [ +"", +"A", +"B", +"C", +"D", +"X", +"" +], +"type": "string" +}, +"nfvcbRating": { +"description": "The video's rating from Nigeria's National Film and Video Censors Board.", +"enum": [ +"nfvcbUnspecified", +"nfvcbG", +"nfvcbPg", +"nfvcb12", +"nfvcb12a", +"nfvcb15", +"nfvcb18", +"nfvcbRe", +"nfvcbUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"12", +"12A", +"15", +"18", +"RE", +"" +], +"type": "string" +}, +"nkclvRating": { +"description": "The video's rating from the Nacion\u00e3lais Kino centrs (National Film Centre of Latvia).", +"enum": [ +"nkclvUnspecified", +"nkclvU", +"nkclv7plus", +"nkclv12plus", +"nkclv16plus", +"nkclv18plus", +"nkclvUnrated" +], +"enumDescriptions": [ +"", +"U", +"7+", +"12+", +"! 16+", +"18+", +"" +], +"type": "string" +}, +"nmcRating": { +"description": "The National Media Council ratings system for United Arab Emirates.", +"enum": [ +"nmcUnspecified", +"nmcG", +"nmcPg", +"nmcPg13", +"nmcPg15", +"nmc15plus", +"nmc18plus", +"nmc18tc", +"nmcUnrated" +], +"enumDescriptions": [ +"", +"G", +"PG", +"PG-13", +"PG-15", +"15+", +"18+", +"18TC", +"" +], +"type": "string" +}, +"oflcRating": { +"description": "The video's Office of Film and Literature Classification (OFLC - New Zealand) rating.", +"enum": [ +"oflcUnspecified", +"oflcG", +"oflcPg", +"oflcM", +"oflcR13", +"oflcR15", +"oflcR16", +"oflcR18", +"oflcUnrated", +"oflcRp13", +"oflcRp16", +"oflcRp18" +], +"enumDescriptions": [ +"", +"G", +"PG", +"M", +"R13", +"R15", +"R16", +"R18", +"", +"RP13", +"RP16", +"RP18" +], +"type": "string" +}, +"pefilmRating": { +"description": "The video's rating in Peru.", +"enum": [ +"pefilmUnspecified", +"pefilmPt", +"pefilmPg", +"pefilm14", +"pefilm18", +"pefilmUnrated" +], +"enumDescriptions": [ +"", +"PT", +"PG", +"14", +"18", +"" +], +"type": "string" +}, +"rcnofRating": { +"description": "The video's rating from the Hungarian Nemzeti Filmiroda, the Rating Committee of the National Office of Film.", +"enum": [ +"rcnofUnspecified", +"rcnofI", +"rcnofIi", +"rcnofIii", +"rcnofIv", +"rcnofV", +"rcnofVi", +"rcnofUnrated" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"resorteviolenciaRating": { +"description": "The video's rating in Venezuela.", +"enum": [ +"resorteviolenciaUnspecified", +"resorteviolenciaA", +"resorteviolenciaB", +"resorteviolenciaC", +"resorteviolenciaD", +"resorteviolenciaE", +"resorteviolenciaUnrated" +], +"enumDescriptions": [ +"", +"A", +"B", +"C", +"D", +"E", +"" +], +"type": "string" +}, +"rtcRating": { +"description": "The video's General Directorate of Radio, Television and Cinematography (Mexico) rating.", +"enum": [ +"rtcUnspecified", +"rtcAa", +"rtcA", +"rtcB", +"rtcB15", +"rtcC", +"rtcD", +"rtcUnrated" +], +"enumDescriptions": [ +"", +"AA", +"A", +"B", +"B15", +"C", +"D", +"" +], +"type": "string" +}, +"rteRating": { +"description": "The video's rating from Ireland's Raidi\u00f3 Teilif\u00eds \u00c9ireann.", +"enum": [ +"rteUnspecified", +"rteGa", +"rteCh", +"rtePs", +"rteMa", +"rteUnrated" +], +"enumDescriptions": [ +"", +"GA", +"CH", +"PS", +"MA", +"" +], +"type": "string" +}, +"russiaRating": { +"description": "The video's National Film Registry of the Russian Federation (MKRF - Russia) rating.", +"enum": [ +"russiaUnspecified", +"russia0", +"russia6", +"russia12", +"russia16", +"russia18", +"russiaUnrated" +], +"enumDescriptions": [ +"", +"0+", +"6+", +"12+", +"16+", +"18+", +"" +], +"type": "string" +}, +"skfilmRating": { +"description": "The video's rating in Slovakia.", +"enum": [ +"skfilmUnspecified", +"skfilmG", +"skfilmP2", +"skfilmP5", +"skfilmP8", +"skfilmUnrated" +], +"enumDescriptions": [ +"", +"G", +"P2", +"P5", +"P8", +"" +], +"type": "string" +}, +"smaisRating": { +"description": "The video's rating in Iceland.", +"enum": [ +"smaisUnspecified", +"smaisL", +"smais7", +"smais12", +"smais14", +"smais16", +"smais18", +"smaisUnrated" +], +"enumDescriptions": [ +"", +"L", +"7", +"12", +"14", +"16", +"18", +"" +], +"type": "string" +}, +"smsaRating": { +"description": "The video's rating from Statens medier\u00e5d (Sweden's National Media Council).", +"enum": [ +"smsaUnspecified", +"smsaA", +"smsa7", +"smsa11", +"smsa15", +"smsaUnrated" +], +"enumDescriptions": [ +"", +"All ages", +"7", +"11", +"15", +"" +], +"type": "string" +}, +"tvpgRating": { +"description": "The video's TV Parental Guidelines (TVPG) rating.", +"enum": [ +"tvpgUnspecified", +"tvpgY", +"tvpgY7", +"tvpgY7Fv", +"tvpgG", +"tvpgPg", +"pg14", +"tvpgMa", +"tvpgUnrated" +], +"enumDescriptions": [ +"", +"TV-Y", +"TV-Y7", +"TV-Y7-FV", +"TV-G", +"TV-PG", +"TV-14", +"TV-MA", +"" +], +"type": "string" +}, +"ytRating": { +"description": "A rating that YouTube uses to identify age-restricted content.", +"enum": [ +"ytUnspecified", +"ytAgeRestricted" +], +"enumDescriptions": [ +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"Cuepoint": { +"description": "Note that there may be a 5-second end-point resolution issue. For instance, if a cuepoint comes in for 22:03:27, we may stuff the cuepoint into 22:03:25 or 22:03:30, depending. This is an artifact of HLS.", +"id": "Cuepoint", +"properties": { +"cueType": { +"enum": [ +"cueTypeUnspecified", +"cueTypeAd" +], +"enumDescriptions": [ +"", +"" +], +"type": "string" +}, +"durationSecs": { +"description": "The duration of this cuepoint.", +"format": "uint32", +"type": "integer" +}, +"etag": { +"type": "string" +}, +"id": { +"description": "The identifier for cuepoint resource.", +"type": "string" +}, +"insertionOffsetTimeMs": { +"description": "The time when the cuepoint should be inserted by offset to the broadcast actual start time.", +"format": "int64", +"type": "string" +}, +"walltimeMs": { +"description": "The wall clock time at which the cuepoint should be inserted. Only one of insertion_offset_time_ms and walltime_ms may be set at a time.", +"format": "uint64", +"type": "string" +} +}, +"type": "object" +}, +"CuepointSchedule": { +"description": "Schedule to insert cuepoints into a broadcast by ads automator.", +"id": "CuepointSchedule", +"properties": { +"enabled": { +"description": "This field is semantically required. If it is set false or not set, other fields in this message will be ignored.", +"type": "boolean" +}, +"pauseAdsUntil": { +"description": "If set, automatic cuepoint insertion is paused until this timestamp (\"No Ad Zone\"). The value is specified in ISO 8601 format.", +"type": "string" +}, +"repeatIntervalSecs": { +"deprecated": true, +"description": "Interval frequency in seconds that api uses to insert cuepoints automatically.", +"format": "int32", +"type": "integer" +}, +"scheduleStrategy": { +"deprecated": true, +"description": "The strategy to use when scheduling cuepoints.", +"enum": [ +"scheduleStrategyUnspecified", +"concurrent", +"nonConcurrent" +], +"enumDescriptions": [ +"", +"Strategy to schedule cuepoints at one time for all viewers.", +"Strategy to schedule cuepoints at an increased rate to allow viewers to receive cuepoints when eligible. See go/lcr-non-concurrent-ads for more details." +], +"type": "string" +} +}, +"type": "object" +}, +"Entity": { +"id": "Entity", +"properties": { +"id": { +"type": "string" +}, +"typeId": { +"type": "string" +}, +"url": { +"type": "string" +} +}, +"type": "object" +}, +"GeoPoint": { +"description": "Geographical coordinates of a point, in WGS84.", +"id": "GeoPoint", +"properties": { +"altitude": { +"description": "Altitude above the reference ellipsoid, in meters.", +"format": "double", +"type": "number" +}, +"latitude": { +"description": "Latitude in degrees.", +"format": "double", +"type": "number" +}, +"longitude": { +"description": "Longitude in degrees.", +"format": "double", +"type": "number" +} +}, +"type": "object" +}, +"I18nLanguage": { +"description": "An *i18nLanguage* resource identifies a UI language currently supported by YouTube.", +"id": "I18nLanguage", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the i18n language.", +"type": "string" +}, +"kind": { +"default": "youtube#i18nLanguage", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#i18nLanguage\".", +"type": "string" +}, +"snippet": { +"$ref": "I18nLanguageSnippet", +"description": "The snippet object contains basic details about the i18n language, such as language code and human-readable name." +} +}, +"type": "object" +}, +"I18nLanguageListResponse": { +"id": "I18nLanguageListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of supported i18n languages. In this map, the i18n language ID is the map key, and its value is the corresponding i18nLanguage resource.", +"items": { +"$ref": "I18nLanguage" +}, +"type": "array" +}, +"kind": { +"default": "youtube#i18nLanguageListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#i18nLanguageListResponse\".", +"type": "string" +}, +"visitorId": { +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"I18nLanguageSnippet": { +"description": "Basic details about an i18n language, such as language code and human-readable name.", +"id": "I18nLanguageSnippet", +"properties": { +"hl": { +"description": "A short BCP-47 code that uniquely identifies a language.", +"type": "string" +}, +"name": { +"description": "The human-readable name of the language in the language itself.", +"type": "string" +} +}, +"type": "object" +}, +"I18nRegion": { +"description": "A *i18nRegion* resource identifies a region where YouTube is available.", +"id": "I18nRegion", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the i18n region.", +"type": "string" +}, +"kind": { +"default": "youtube#i18nRegion", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#i18nRegion\".", +"type": "string" +}, +"snippet": { +"$ref": "I18nRegionSnippet", +"description": "The snippet object contains basic details about the i18n region, such as region code and human-readable name." +} +}, +"type": "object" +}, +"I18nRegionListResponse": { +"id": "I18nRegionListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of regions where YouTube is available. In this map, the i18n region ID is the map key, and its value is the corresponding i18nRegion resource.", +"items": { +"$ref": "I18nRegion" +}, +"type": "array" +}, +"kind": { +"default": "youtube#i18nRegionListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#i18nRegionListResponse\".", +"type": "string" +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"I18nRegionSnippet": { +"description": "Basic details about an i18n region, such as region code and human-readable name.", +"id": "I18nRegionSnippet", +"properties": { +"gl": { +"description": "The region code as a 2-letter ISO country code.", +"type": "string" +}, +"name": { +"description": "The human-readable name of the region.", +"type": "string" +} +}, +"type": "object" +}, +"ImageSettings": { +"description": "Branding properties for images associated with the channel.", +"id": "ImageSettings", +"properties": { +"backgroundImageUrl": { +"$ref": "LocalizedProperty", +"deprecated": true, +"description": "The URL for the background image shown on the video watch page. The image should be 1200px by 615px, with a maximum file size of 128k." +}, +"bannerExternalUrl": { +"description": "This is generated when a ChannelBanner.Insert request has succeeded for the given channel.", +"type": "string" +}, +"bannerImageUrl": { +"deprecated": true, +"description": "Banner image. Desktop size (1060x175).", +"type": "string" +}, +"bannerMobileExtraHdImageUrl": { +"deprecated": true, +"description": "Banner image. Mobile size high resolution (1440x395).", +"type": "string" +}, +"bannerMobileHdImageUrl": { +"deprecated": true, +"description": "Banner image. Mobile size high resolution (1280x360).", +"type": "string" +}, +"bannerMobileImageUrl": { +"deprecated": true, +"description": "Banner image. Mobile size (640x175).", +"type": "string" +}, +"bannerMobileLowImageUrl": { +"deprecated": true, +"description": "Banner image. Mobile size low resolution (320x88).", +"type": "string" +}, +"bannerMobileMediumHdImageUrl": { +"deprecated": true, +"description": "Banner image. Mobile size medium/high resolution (960x263).", +"type": "string" +}, +"bannerTabletExtraHdImageUrl": { +"deprecated": true, +"description": "Banner image. Tablet size extra high resolution (2560x424).", +"type": "string" +}, +"bannerTabletHdImageUrl": { +"deprecated": true, +"description": "Banner image. Tablet size high resolution (2276x377).", +"type": "string" +}, +"bannerTabletImageUrl": { +"deprecated": true, +"description": "Banner image. Tablet size (1707x283).", +"type": "string" +}, +"bannerTabletLowImageUrl": { +"deprecated": true, +"description": "Banner image. Tablet size low resolution (1138x188).", +"type": "string" +}, +"bannerTvHighImageUrl": { +"deprecated": true, +"description": "Banner image. TV size high resolution (1920x1080).", +"type": "string" +}, +"bannerTvImageUrl": { +"deprecated": true, +"description": "Banner image. TV size extra high resolution (2120x1192).", +"type": "string" +}, +"bannerTvLowImageUrl": { +"deprecated": true, +"description": "Banner image. TV size low resolution (854x480).", +"type": "string" +}, +"bannerTvMediumImageUrl": { +"deprecated": true, +"description": "Banner image. TV size medium resolution (1280x720).", +"type": "string" +}, +"largeBrandedBannerImageImapScript": { +"$ref": "LocalizedProperty", +"deprecated": true, +"description": "The image map script for the large banner image." +}, +"largeBrandedBannerImageUrl": { +"$ref": "LocalizedProperty", +"deprecated": true, +"description": "The URL for the 854px by 70px image that appears below the video player in the expanded video view of the video watch page." +}, +"smallBrandedBannerImageImapScript": { +"$ref": "LocalizedProperty", +"deprecated": true, +"description": "The image map script for the small banner image." +}, +"smallBrandedBannerImageUrl": { +"$ref": "LocalizedProperty", +"deprecated": true, +"description": "The URL for the 640px by 70px banner image that appears below the video player in the default view of the video watch page. The URL for the image that appears above the top-left corner of the video player. This is a 25-pixel-high image with a flexible width that cannot exceed 170 pixels." +}, +"trackingImageUrl": { +"deprecated": true, +"description": "The URL for a 1px by 1px tracking pixel that can be used to collect statistics for views of the channel or video pages.", +"type": "string" +}, +"watchIconImageUrl": { +"deprecated": true, +"type": "string" +} +}, +"type": "object" +}, +"IngestionInfo": { +"description": "Describes information necessary for ingesting an RTMP, HTTP, or SRT stream.", +"id": "IngestionInfo", +"properties": { +"backupIngestionAddress": { +"description": "The backup ingestion URL that you should use to stream video to YouTube. You have the option of simultaneously streaming the content that you are sending to the ingestionAddress to this URL.", +"type": "string" +}, +"ingestionAddress": { +"description": "The primary ingestion URL that you should use to stream video to YouTube. You must stream video to this URL. Depending on which application or tool you use to encode your video stream, you may need to enter the stream URL and stream name separately or you may need to concatenate them in the following format: *STREAM_URL/STREAM_NAME* ", +"type": "string" +}, +"rtmpsBackupIngestionAddress": { +"description": "This ingestion url may be used instead of backupIngestionAddress in order to stream via RTMPS. Not applicable to non-RTMP streams.", +"type": "string" +}, +"rtmpsIngestionAddress": { +"description": "This ingestion url may be used instead of ingestionAddress in order to stream via RTMPS. Not applicable to non-RTMP streams.", +"type": "string" +}, +"streamName": { +"description": "The stream name that YouTube assigns to the video stream.", +"type": "string" +} +}, +"type": "object" +}, +"InvideoBranding": { +"description": "LINT.IfChange Describes an invideo branding.", +"id": "InvideoBranding", +"properties": { +"imageBytes": { +"description": "The bytes the uploaded image. Only used in api to youtube communication.", +"format": "byte", +"type": "string" +}, +"imageUrl": { +"description": "The url of the uploaded image. Only used in apiary to api communication.", +"type": "string" +}, +"position": { +"$ref": "InvideoPosition", +"description": "The spatial position within the video where the branding watermark will be displayed." +}, +"targetChannelId": { +"description": "The channel to which this branding links. If not present it defaults to the current channel.", +"type": "string" +}, +"timing": { +"$ref": "InvideoTiming", +"description": "The temporal position within the video where watermark will be displayed." +} +}, +"type": "object" +}, +"InvideoPosition": { +"description": "Describes the spatial position of a visual widget inside a video. It is a union of various position types, out of which only will be set one.", +"id": "InvideoPosition", +"properties": { +"cornerPosition": { +"description": "Describes in which corner of the video the visual widget will appear.", +"enum": [ +"topLeft", +"topRight", +"bottomLeft", +"bottomRight" +], +"enumDeprecated": [ +true, +false, +true, +true +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"type": { +"description": "Defines the position type.", +"enum": [ +"corner" +], +"enumDescriptions": [ +"" +], +"type": "string" +} +}, +"type": "object" +}, +"InvideoTiming": { +"description": "Describes a temporal position of a visual widget inside a video.", +"id": "InvideoTiming", +"properties": { +"durationMs": { +"description": "Defines the duration in milliseconds for which the promotion should be displayed. If missing, the client should use the default.", +"format": "uint64", +"type": "string" +}, +"offsetMs": { +"description": "Defines the time at which the promotion will appear. Depending on the value of type the value of the offsetMs field will represent a time offset from the start or from the end of the video, expressed in milliseconds.", +"format": "uint64", +"type": "string" +}, +"type": { +"description": "Describes a timing type. If the value is offsetFromStart, then the offsetMs field represents an offset from the start of the video. If the value is offsetFromEnd, then the offsetMs field represents an offset from the end of the video.", +"enum": [ +"offsetFromStart", +"offsetFromEnd" +], +"enumDescriptions": [ +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"LanguageTag": { +"id": "LanguageTag", +"properties": { +"value": { +"type": "string" +} +}, +"type": "object" +}, +"LevelDetails": { +"id": "LevelDetails", +"properties": { +"displayName": { +"description": "The name that should be used when referring to this level.", +"type": "string" +} +}, +"type": "object" +}, +"LiveBroadcast": { +"description": "A *liveBroadcast* resource represents an event that will be streamed, via live video, on YouTube.", +"id": "LiveBroadcast", +"properties": { +"contentDetails": { +"$ref": "LiveBroadcastContentDetails", +"description": "The contentDetails object contains information about the event's video content, such as whether the content can be shown in an embedded video player or if it will be archived and therefore available for viewing after the event has concluded." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"annotations": { +"required": [ +"youtube.liveBroadcasts.update" +] +}, +"description": "The ID that YouTube assigns to uniquely identify the broadcast.", +"type": "string" +}, +"kind": { +"default": "youtube#liveBroadcast", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveBroadcast\".", +"type": "string" +}, +"monetizationDetails": { +"$ref": "LiveBroadcastMonetizationDetails", +"description": "The monetizationDetails object contains information about the event's monetization details." +}, +"snippet": { +"$ref": "LiveBroadcastSnippet", +"description": "The snippet object contains basic details about the event, including its title, description, start time, and end time." +}, +"statistics": { +"$ref": "LiveBroadcastStatistics", +"description": "The statistics object contains info about the event's current stats. These include concurrent viewers and total chat count. Statistics can change (in either direction) during the lifetime of an event. Statistics are only returned while the event is live." +}, +"status": { +"$ref": "LiveBroadcastStatus", +"description": "The status object contains information about the event's status." +} +}, +"type": "object" +}, +"LiveBroadcastContentDetails": { +"description": "Detailed settings of a broadcast.", +"id": "LiveBroadcastContentDetails", +"properties": { +"boundStreamId": { +"description": "This value uniquely identifies the live stream bound to the broadcast.", +"type": "string" +}, +"boundStreamLastUpdateTimeMs": { +"description": "The date and time that the live stream referenced by boundStreamId was last updated.", +"format": "date-time", +"type": "string" +}, +"closedCaptionsType": { +"enum": [ +"closedCaptionsTypeUnspecified", +"closedCaptionsDisabled", +"closedCaptionsHttpPost", +"closedCaptionsEmbedded" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"enableAutoStart": { +"description": "This setting indicates whether auto start is enabled for this broadcast. The default value for this property is false. This setting can only be used by Events.", +"type": "boolean" +}, +"enableAutoStop": { +"description": "This setting indicates whether auto stop is enabled for this broadcast. The default value for this property is false. This setting can only be used by Events.", +"type": "boolean" +}, +"enableClosedCaptions": { +"deprecated": true, +"description": "This setting indicates whether HTTP POST closed captioning is enabled for this broadcast. The ingestion URL of the closed captions is returned through the liveStreams API. This is mutually exclusive with using the closed_captions_type property, and is equivalent to setting closed_captions_type to CLOSED_CAPTIONS_HTTP_POST.", +"type": "boolean" +}, +"enableContentEncryption": { +"description": "This setting indicates whether YouTube should enable content encryption for the broadcast.", +"type": "boolean" +}, +"enableDvr": { +"description": "This setting determines whether viewers can access DVR controls while watching the video. DVR controls enable the viewer to control the video playback experience by pausing, rewinding, or fast forwarding content. The default value for this property is true. *Important:* You must set the value to true and also set the enableArchive property's value to true if you want to make playback available immediately after the broadcast ends.", +"type": "boolean" +}, +"enableEmbed": { +"description": "This setting indicates whether the broadcast video can be played in an embedded player. If you choose to archive the video (using the enableArchive property), this setting will also apply to the archived video.", +"type": "boolean" +}, +"enableLowLatency": { +"deprecated": true, +"description": "Indicates whether this broadcast has low latency enabled.", +"type": "boolean" +}, +"latencyPreference": { +"description": "If both this and enable_low_latency are set, they must match. LATENCY_NORMAL should match enable_low_latency=false LATENCY_LOW should match enable_low_latency=true LATENCY_ULTRA_LOW should have enable_low_latency omitted.", +"enum": [ +"latencyPreferenceUnspecified", +"normal", +"low", +"ultraLow" +], +"enumDescriptions": [ +"", +"Best for: highest quality viewer playbacks and higher resolutions.", +"Best for: near real-time interaction, with minimal playback buffering.", +"Best for: real-time interaction Does not support: Closed captions, 1440p, and 4k resolutions" +], +"type": "string" +}, +"mesh": { +"description": "The mesh for projecting the video if projection is mesh. The mesh value must be a UTF-8 string containing the base-64 encoding of 3D mesh data that follows the Spherical Video V2 RFC specification for an mshp box, excluding the box size and type but including the following four reserved zero bytes for the version and flags.", +"format": "byte", +"type": "string" +}, +"monitorStream": { +"$ref": "MonitorStreamInfo", +"description": "The monitorStream object contains information about the monitor stream, which the broadcaster can use to review the event content before the broadcast stream is shown publicly." +}, +"projection": { +"description": "The projection format of this broadcast. This defaults to rectangular.", +"enum": [ +"projectionUnspecified", +"rectangular", +"360", +"mesh" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +}, +"recordFromStart": { +"description": "Automatically start recording after the event goes live. The default value for this property is true. *Important:* You must also set the enableDvr property's value to true if you want the playback to be available immediately after the broadcast ends. If you set this property's value to true but do not also set the enableDvr property to true, there may be a delay of around one day before the archived video will be available for playback.", +"type": "boolean" +}, +"startWithSlate": { +"deprecated": true, +"description": "This setting indicates whether the broadcast should automatically begin with an in-stream slate when you update the broadcast's status to live. After updating the status, you then need to send a liveCuepoints.insert request that sets the cuepoint's eventState to end to remove the in-stream slate and make your broadcast stream visible to viewers.", +"type": "boolean" +}, +"stereoLayout": { +"description": "The 3D stereo layout of this broadcast. This defaults to mono.", +"enum": [ +"stereoLayoutUnspecified", +"mono", +"leftRight", +"topBottom" +], +"enumDescriptions": [ +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"LiveBroadcastListResponse": { +"id": "LiveBroadcastListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of broadcasts that match the request criteria.", +"items": { +"$ref": "LiveBroadcast" +}, +"type": "array" +}, +"kind": { +"default": "youtube#liveBroadcastListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveBroadcastListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"LiveBroadcastMonetizationDetails": { +"description": "Monetization settings of a broadcast.", +"id": "LiveBroadcastMonetizationDetails", +"properties": { +"cuepointSchedule": { +"$ref": "CuepointSchedule" +} +}, +"type": "object" +}, +"LiveBroadcastSnippet": { +"description": "Basic broadcast information.", +"id": "LiveBroadcastSnippet", +"properties": { +"actualEndTime": { +"description": "The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete.", +"format": "date-time", +"type": "string" +}, +"actualStartTime": { +"description": "The date and time that the broadcast actually started. This information is only available once the broadcast's state is live.", +"format": "date-time", +"type": "string" +}, +"channelId": { +"description": "The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast.", +"type": "string" +}, +"description": { +"description": "The broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting the description field of the corresponding video resource.", +"type": "string" +}, +"isDefaultBroadcast": { +"description": "Indicates whether this broadcast is the default broadcast. Internal only.", +"type": "boolean" +}, +"liveChatId": { +"description": "The id of the live chat for this broadcast.", +"type": "string" +}, +"publishedAt": { +"description": "The date and time that the broadcast was added to YouTube's live broadcast schedule.", +"format": "date-time", +"type": "string" +}, +"scheduledEndTime": { +"description": "The date and time that the broadcast is scheduled to end.", +"format": "date-time", +"type": "string" +}, +"scheduledStartTime": { +"annotations": { +"required": [ +"youtube.liveBroadcasts.insert", +"youtube.liveBroadcasts.update" +] +}, +"description": "The date and time that the broadcast is scheduled to start.", +"format": "date-time", +"type": "string" +}, +"thumbnails": { +"$ref": "ThumbnailDetails", +"description": "A map of thumbnail images associated with the broadcast. For each nested object in this object, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail." +}, +"title": { +"annotations": { +"required": [ +"youtube.liveBroadcasts.insert", +"youtube.liveBroadcasts.update" +] +}, +"description": "The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the title field of the corresponding video resource.", +"type": "string" +} +}, +"type": "object" +}, +"LiveBroadcastStatistics": { +"description": "Statistics about the live broadcast. These represent a snapshot of the values at the time of the request. Statistics are only returned for live broadcasts.", +"id": "LiveBroadcastStatistics", +"properties": { +"concurrentViewers": { +"description": "The number of viewers currently watching the broadcast. The property and its value will be present if the broadcast has current viewers and the broadcast owner has not hidden the viewcount for the video. Note that YouTube stops tracking the number of concurrent viewers for a broadcast when the broadcast ends. So, this property would not identify the number of viewers watching an archived video of a live broadcast that already ended.", +"format": "uint64", +"type": "string" +} +}, +"type": "object" +}, +"LiveBroadcastStatus": { +"description": "Live broadcast state.", +"id": "LiveBroadcastStatus", +"properties": { +"lifeCycleStatus": { +"description": "The broadcast's status. The status can be updated using the API's liveBroadcasts.transition method.", +"enum": [ +"lifeCycleStatusUnspecified", +"created", +"ready", +"testing", +"live", +"complete", +"revoked", +"testStarting", +"liveStarting" +], +"enumDescriptions": [ +"No value or the value is unknown.", +"Incomplete settings, but otherwise valid", +"Complete settings", +"Visible only to partner, may need special UI treatment", +"Viper is recording; this means the \"clock\" is running", +"The broadcast is finished.", +"This broadcast was removed by admin action", +"Transition into TESTING has been requested", +"Transition into LIVE has been requested" +], +"type": "string" +}, +"liveBroadcastPriority": { +"description": "Priority of the live broadcast event (internal state).", +"enum": [ +"liveBroadcastPriorityUnspecified", +"low", +"normal", +"high" +], +"enumDescriptions": [ +"", +"Low priority broadcast: for low view count HoAs or other low priority broadcasts.", +"Normal priority broadcast: for regular HoAs and broadcasts.", +"High priority broadcast: for high profile HoAs, like PixelCorp ones." +], +"type": "string" +}, +"madeForKids": { +"description": "Whether the broadcast is made for kids or not, decided by YouTube instead of the creator. This field is read only.", +"type": "boolean" +}, +"privacyStatus": { +"annotations": { +"required": [ +"youtube.liveBroadcasts.insert", +"youtube.liveBroadcasts.update" +] +}, +"description": "The broadcast's privacy status. Note that the broadcast represents exactly one YouTube video, so the privacy settings are identical to those supported for videos. In addition, you can set this field by modifying the broadcast resource or by setting the privacyStatus field of the corresponding video resource.", +"enum": [ +"public", +"unlisted", +"private" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"recordingStatus": { +"description": "The broadcast's recording status.", +"enum": [ +"liveBroadcastRecordingStatusUnspecified", +"notRecording", +"recording", +"recorded" +], +"enumDescriptions": [ +"No value or the value is unknown.", +"The recording has not yet been started.", +"The recording is currently on.", +"The recording is completed, and cannot be started again." +], +"type": "string" +}, +"selfDeclaredMadeForKids": { +"description": "This field will be set to True if the creator declares the broadcast to be kids only: go/live-cw-work.", +"type": "boolean" +} +}, +"type": "object" +}, +"LiveChatBan": { +"description": "A `__liveChatBan__` resource represents a ban for a YouTube live chat.", +"id": "LiveChatBan", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube assigns to uniquely identify the ban.", +"type": "string" +}, +"kind": { +"default": "youtube#liveChatBan", +"description": "Identifies what kind of resource this is. Value: the fixed string `\"youtube#liveChatBan\"`.", +"type": "string" +}, +"snippet": { +"$ref": "LiveChatBanSnippet", +"description": "The `snippet` object contains basic details about the ban." +} +}, +"type": "object" +}, +"LiveChatBanSnippet": { +"id": "LiveChatBanSnippet", +"properties": { +"banDurationSeconds": { +"description": "The duration of a ban, only filled if the ban has type TEMPORARY.", +"format": "uint64", +"type": "string" +}, +"bannedUserDetails": { +"$ref": "ChannelProfileDetails" +}, +"liveChatId": { +"description": "The chat this ban is pertinent to.", +"type": "string" +}, +"type": { +"description": "The type of ban.", +"enum": [ +"liveChatBanTypeUnspecified", +"permanent", +"temporary" +], +"enumDescriptions": [ +"An invalid ban type.", +"A permanent ban.", +"A temporary ban." +], +"type": "string" +} +}, +"type": "object" +}, +"LiveChatFanFundingEventDetails": { +"id": "LiveChatFanFundingEventDetails", +"properties": { +"amountDisplayString": { +"description": "A rendered string that displays the fund amount and currency to the user.", +"type": "string" +}, +"amountMicros": { +"description": "The amount of the fund.", +"format": "uint64", +"type": "string" +}, +"currency": { +"description": "The currency in which the fund was made.", +"type": "string" +}, +"userComment": { +"description": "The comment added by the user to this fan funding event.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatGiftMembershipReceivedDetails": { +"id": "LiveChatGiftMembershipReceivedDetails", +"properties": { +"associatedMembershipGiftingMessageId": { +"description": "The ID of the membership gifting message that is related to this gift membership. This ID will always refer to a message whose type is 'membershipGiftingEvent'.", +"type": "string" +}, +"gifterChannelId": { +"description": "The ID of the user that made the membership gifting purchase. This matches the `snippet.authorChannelId` of the associated membership gifting message.", +"type": "string" +}, +"memberLevelName": { +"description": "The name of the Level at which the viewer is a member. This matches the `snippet.membershipGiftingDetails.giftMembershipsLevelName` of the associated membership gifting message. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatMemberMilestoneChatDetails": { +"id": "LiveChatMemberMilestoneChatDetails", +"properties": { +"memberLevelName": { +"description": "The name of the Level at which the viever is a member. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.", +"type": "string" +}, +"memberMonth": { +"description": "The total amount of months (rounded up) the viewer has been a member that granted them this Member Milestone Chat. This is the same number of months as is being displayed to YouTube users.", +"format": "uint32", +"type": "integer" +}, +"userComment": { +"description": "The comment added by the member to this Member Milestone Chat. This field is empty for messages without a comment from the member.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatMembershipGiftingDetails": { +"id": "LiveChatMembershipGiftingDetails", +"properties": { +"giftMembershipsCount": { +"description": "The number of gift memberships purchased by the user.", +"format": "int32", +"type": "integer" +}, +"giftMembershipsLevelName": { +"description": "The name of the level of the gift memberships purchased by the user. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatMessage": { +"description": "A *liveChatMessage* resource represents a chat message in a YouTube Live Chat.", +"id": "LiveChatMessage", +"properties": { +"authorDetails": { +"$ref": "LiveChatMessageAuthorDetails", +"description": "The authorDetails object contains basic details about the user that posted this message." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube assigns to uniquely identify the message.", +"type": "string" +}, +"kind": { +"default": "youtube#liveChatMessage", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveChatMessage\".", +"type": "string" +}, +"snippet": { +"$ref": "LiveChatMessageSnippet", +"description": "The snippet object contains basic details about the message." +} +}, +"type": "object" +}, +"LiveChatMessageAuthorDetails": { +"id": "LiveChatMessageAuthorDetails", +"properties": { +"channelId": { +"description": "The YouTube channel ID.", +"type": "string" +}, +"channelUrl": { +"description": "The channel's URL.", +"type": "string" +}, +"displayName": { +"description": "The channel's display name.", +"type": "string" +}, +"isChatModerator": { +"description": "Whether the author is a moderator of the live chat.", +"type": "boolean" +}, +"isChatOwner": { +"description": "Whether the author is the owner of the live chat.", +"type": "boolean" +}, +"isChatSponsor": { +"description": "Whether the author is a sponsor of the live chat.", +"type": "boolean" +}, +"isVerified": { +"description": "Whether the author's identity has been verified by YouTube.", +"type": "boolean" +}, +"profileImageUrl": { +"description": "The channels's avatar URL.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatMessageDeletedDetails": { +"id": "LiveChatMessageDeletedDetails", +"properties": { +"deletedMessageId": { +"type": "string" +} +}, +"type": "object" +}, +"LiveChatMessageListResponse": { +"id": "LiveChatMessageListResponse", +"properties": { +"activePollItem": { +"$ref": "LiveChatMessage", +"description": "Set when there is an active poll." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"items": { +"$ref": "LiveChatMessage" +}, +"type": "array" +}, +"kind": { +"default": "youtube#liveChatMessageListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveChatMessageListResponse\".", +"type": "string" +}, +"nextPageToken": { +"type": "string" +}, +"offlineAt": { +"description": "The date and time when the underlying stream went offline.", +"format": "date-time", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"pollingIntervalMillis": { +"description": "The amount of time the client should wait before polling again.", +"format": "uint32", +"type": "integer" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatMessageRetractedDetails": { +"id": "LiveChatMessageRetractedDetails", +"properties": { +"retractedMessageId": { +"type": "string" +} +}, +"type": "object" +}, +"LiveChatMessageSnippet": { +"description": "Next ID: 34", +"id": "LiveChatMessageSnippet", +"properties": { +"authorChannelId": { +"description": "The ID of the user that authored this message, this field is not always filled. textMessageEvent - the user that wrote the message fanFundingEvent - the user that funded the broadcast newSponsorEvent - the user that just became a sponsor memberMilestoneChatEvent - the member that sent the message membershipGiftingEvent - the user that made the purchase giftMembershipReceivedEvent - the user that received the gift membership messageDeletedEvent - the moderator that took the action messageRetractedEvent - the author that retracted their message userBannedEvent - the moderator that took the action superChatEvent - the user that made the purchase superStickerEvent - the user that made the purchase pollEvent - the user that created the poll", +"type": "string" +}, +"displayMessage": { +"description": "Contains a string that can be displayed to the user. If this field is not present the message is silent, at the moment only messages of type TOMBSTONE and CHAT_ENDED_EVENT are silent.", +"type": "string" +}, +"fanFundingEventDetails": { +"$ref": "LiveChatFanFundingEventDetails", +"deprecated": true, +"description": "Details about the funding event, this is only set if the type is 'fanFundingEvent'." +}, +"giftMembershipReceivedDetails": { +"$ref": "LiveChatGiftMembershipReceivedDetails", +"description": "Details about the Gift Membership Received event, this is only set if the type is 'giftMembershipReceivedEvent'." +}, +"hasDisplayContent": { +"description": "Whether the message has display content that should be displayed to users.", +"type": "boolean" +}, +"liveChatId": { +"type": "string" +}, +"memberMilestoneChatDetails": { +"$ref": "LiveChatMemberMilestoneChatDetails", +"description": "Details about the Member Milestone Chat event, this is only set if the type is 'memberMilestoneChatEvent'." +}, +"membershipGiftingDetails": { +"$ref": "LiveChatMembershipGiftingDetails", +"description": "Details about the Membership Gifting event, this is only set if the type is 'membershipGiftingEvent'." +}, +"messageDeletedDetails": { +"$ref": "LiveChatMessageDeletedDetails" +}, +"messageRetractedDetails": { +"$ref": "LiveChatMessageRetractedDetails" +}, +"newSponsorDetails": { +"$ref": "LiveChatNewSponsorDetails", +"description": "Details about the New Member Announcement event, this is only set if the type is 'newSponsorEvent'. Please note that \"member\" is the new term for \"sponsor\"." +}, +"pollDetails": { +"$ref": "LiveChatPollDetails", +"description": "Details about the poll event, this is only set if the type is 'pollEvent'." +}, +"publishedAt": { +"description": "The date and time when the message was orignally published.", +"format": "date-time", +"type": "string" +}, +"superChatDetails": { +"$ref": "LiveChatSuperChatDetails", +"description": "Details about the Super Chat event, this is only set if the type is 'superChatEvent'." +}, +"superStickerDetails": { +"$ref": "LiveChatSuperStickerDetails", +"description": "Details about the Super Sticker event, this is only set if the type is 'superStickerEvent'." +}, +"textMessageDetails": { +"$ref": "LiveChatTextMessageDetails", +"description": "Details about the text message, this is only set if the type is 'textMessageEvent'." +}, +"type": { +"description": "The type of message, this will always be present, it determines the contents of the message as well as which fields will be present.", +"enum": [ +"invalidType", +"textMessageEvent", +"tombstone", +"fanFundingEvent", +"chatEndedEvent", +"sponsorOnlyModeStartedEvent", +"sponsorOnlyModeEndedEvent", +"newSponsorEvent", +"memberMilestoneChatEvent", +"membershipGiftingEvent", +"giftMembershipReceivedEvent", +"messageDeletedEvent", +"messageRetractedEvent", +"userBannedEvent", +"superChatEvent", +"superStickerEvent", +"pollEvent" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +}, +"userBannedDetails": { +"$ref": "LiveChatUserBannedMessageDetails" +} +}, +"type": "object" +}, +"LiveChatModerator": { +"description": "A *liveChatModerator* resource represents a moderator for a YouTube live chat. A chat moderator has the ability to ban/unban users from a chat, remove message, etc.", +"id": "LiveChatModerator", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube assigns to uniquely identify the moderator.", +"type": "string" +}, +"kind": { +"default": "youtube#liveChatModerator", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveChatModerator\".", +"type": "string" +}, +"snippet": { +"$ref": "LiveChatModeratorSnippet", +"description": "The snippet object contains basic details about the moderator." +} +}, +"type": "object" +}, +"LiveChatModeratorListResponse": { +"id": "LiveChatModeratorListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of moderators that match the request criteria.", +"items": { +"$ref": "LiveChatModerator" +}, +"type": "array" +}, +"kind": { +"default": "youtube#liveChatModeratorListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveChatModeratorListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatModeratorSnippet": { +"id": "LiveChatModeratorSnippet", +"properties": { +"liveChatId": { +"description": "The ID of the live chat this moderator can act on.", +"type": "string" +}, +"moderatorDetails": { +"$ref": "ChannelProfileDetails", +"description": "Details about the moderator." +} +}, +"type": "object" +}, +"LiveChatNewSponsorDetails": { +"id": "LiveChatNewSponsorDetails", +"properties": { +"isUpgrade": { +"description": "If the viewer just had upgraded from a lower level. For viewers that were not members at the time of purchase, this field is false.", +"type": "boolean" +}, +"memberLevelName": { +"description": "The name of the Level that the viewer just had joined. The Level names are defined by the YouTube channel offering the Membership. In some situations this field isn't filled.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatPollDetails": { +"id": "LiveChatPollDetails", +"properties": { +"metadata": { +"$ref": "LiveChatPollDetailsPollMetadata" +}, +"status": { +"enum": [ +"unknown", +"active", +"closed" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"LiveChatPollDetailsPollMetadata": { +"id": "LiveChatPollDetailsPollMetadata", +"properties": { +"options": { +"description": "The options will be returned in the order that is displayed in 1P", +"items": { +"$ref": "LiveChatPollDetailsPollMetadataPollOption" +}, +"type": "array" +}, +"questionText": { +"type": "string" +} +}, +"type": "object" +}, +"LiveChatPollDetailsPollMetadataPollOption": { +"id": "LiveChatPollDetailsPollMetadataPollOption", +"properties": { +"optionText": { +"type": "string" +}, +"tally": { +"format": "int64", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatSuperChatDetails": { +"id": "LiveChatSuperChatDetails", +"properties": { +"amountDisplayString": { +"description": "A rendered string that displays the fund amount and currency to the user.", +"type": "string" +}, +"amountMicros": { +"description": "The amount purchased by the user, in micros (1,750,000 micros = 1.75).", +"format": "uint64", +"type": "string" +}, +"currency": { +"description": "The currency in which the purchase was made.", +"type": "string" +}, +"tier": { +"description": "The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1.", +"format": "uint32", +"type": "integer" +}, +"userComment": { +"description": "The comment added by the user to this Super Chat event.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatSuperStickerDetails": { +"id": "LiveChatSuperStickerDetails", +"properties": { +"amountDisplayString": { +"description": "A rendered string that displays the fund amount and currency to the user.", +"type": "string" +}, +"amountMicros": { +"description": "The amount purchased by the user, in micros (1,750,000 micros = 1.75).", +"format": "uint64", +"type": "string" +}, +"currency": { +"description": "The currency in which the purchase was made.", +"type": "string" +}, +"superStickerMetadata": { +"$ref": "SuperStickerMetadata", +"description": "Information about the Super Sticker." +}, +"tier": { +"description": "The tier in which the amount belongs. Lower amounts belong to lower tiers. The lowest tier is 1.", +"format": "uint32", +"type": "integer" +} +}, +"type": "object" +}, +"LiveChatTextMessageDetails": { +"id": "LiveChatTextMessageDetails", +"properties": { +"messageText": { +"description": "The user's message.", +"type": "string" +} +}, +"type": "object" +}, +"LiveChatUserBannedMessageDetails": { +"id": "LiveChatUserBannedMessageDetails", +"properties": { +"banDurationSeconds": { +"description": "The duration of the ban. This property is only present if the banType is temporary.", +"format": "uint64", +"type": "string" +}, +"banType": { +"description": "The type of ban.", +"enum": [ +"permanent", +"temporary" +], +"enumDescriptions": [ +"", +"" +], +"type": "string" +}, +"bannedUserDetails": { +"$ref": "ChannelProfileDetails", +"description": "The details of the user that was banned." +} +}, +"type": "object" +}, +"LiveStream": { +"description": "A live stream describes a live ingestion point.", +"id": "LiveStream", +"properties": { +"cdn": { +"$ref": "CdnSettings", +"description": "The cdn object defines the live stream's content delivery network (CDN) settings. These settings provide details about the manner in which you stream your content to YouTube." +}, +"contentDetails": { +"$ref": "LiveStreamContentDetails", +"description": "The content_details object contains information about the stream, including the closed captions ingestion URL." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"annotations": { +"required": [ +"youtube.liveStreams.update" +] +}, +"description": "The ID that YouTube assigns to uniquely identify the stream.", +"type": "string" +}, +"kind": { +"default": "youtube#liveStream", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveStream\".", +"type": "string" +}, +"snippet": { +"$ref": "LiveStreamSnippet", +"description": "The snippet object contains basic details about the stream, including its channel, title, and description." +}, +"status": { +"$ref": "LiveStreamStatus", +"description": "The status object contains information about live stream's status." +} +}, +"type": "object" +}, +"LiveStreamConfigurationIssue": { +"id": "LiveStreamConfigurationIssue", +"properties": { +"description": { +"description": "The long-form description of the issue and how to resolve it.", +"type": "string" +}, +"reason": { +"description": "The short-form reason for this issue.", +"type": "string" +}, +"severity": { +"description": "How severe this issue is to the stream.", +"enum": [ +"info", +"warning", +"error" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +}, +"type": { +"description": "The kind of error happening.", +"enum": [ +"gopSizeOver", +"gopSizeLong", +"gopSizeShort", +"openGop", +"badContainer", +"audioBitrateHigh", +"audioBitrateLow", +"audioSampleRate", +"bitrateHigh", +"bitrateLow", +"audioCodec", +"videoCodec", +"noAudioStream", +"noVideoStream", +"multipleVideoStreams", +"multipleAudioStreams", +"audioTooManyChannels", +"interlacedVideo", +"frameRateHigh", +"resolutionMismatch", +"videoCodecMismatch", +"videoInterlaceMismatch", +"videoProfileMismatch", +"videoBitrateMismatch", +"framerateMismatch", +"gopMismatch", +"audioSampleRateMismatch", +"audioStereoMismatch", +"audioCodecMismatch", +"audioBitrateMismatch", +"videoResolutionSuboptimal", +"videoResolutionUnsupported", +"videoIngestionStarved", +"videoIngestionFasterThanRealtime" +], +"enumDescriptions": [ +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"LiveStreamContentDetails": { +"description": "Detailed settings of a stream.", +"id": "LiveStreamContentDetails", +"properties": { +"closedCaptionsIngestionUrl": { +"description": "The ingestion URL where the closed captions of this stream are sent.", +"type": "string" +}, +"isReusable": { +"description": "Indicates whether the stream is reusable, which means that it can be bound to multiple broadcasts. It is common for broadcasters to reuse the same stream for many different broadcasts if those broadcasts occur at different times. If you set this value to false, then the stream will not be reusable, which means that it can only be bound to one broadcast. Non-reusable streams differ from reusable streams in the following ways: - A non-reusable stream can only be bound to one broadcast. - A non-reusable stream might be deleted by an automated process after the broadcast ends. - The liveStreams.list method does not list non-reusable streams if you call the method and set the mine parameter to true. The only way to use that method to retrieve the resource for a non-reusable stream is to use the id parameter to identify the stream. ", +"type": "boolean" +} +}, +"type": "object" +}, +"LiveStreamHealthStatus": { +"id": "LiveStreamHealthStatus", +"properties": { +"configurationIssues": { +"description": "The configurations issues on this stream", +"items": { +"$ref": "LiveStreamConfigurationIssue" +}, +"type": "array" +}, +"lastUpdateTimeSeconds": { +"description": "The last time this status was updated (in seconds)", +"format": "uint64", +"type": "string" +}, +"status": { +"description": "The status code of this stream", +"enum": [ +"good", +"ok", +"bad", +"noData", +"revoked" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"LiveStreamListResponse": { +"id": "LiveStreamListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of live streams that match the request criteria.", +"items": { +"$ref": "LiveStream" +}, +"type": "array" +}, +"kind": { +"default": "youtube#liveStreamListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#liveStreamListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo" +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"LiveStreamSnippet": { +"id": "LiveStreamSnippet", +"properties": { +"channelId": { +"description": "The ID that YouTube uses to uniquely identify the channel that is transmitting the stream.", +"type": "string" +}, +"description": { +"description": "The stream's description. The value cannot be longer than 10000 characters.", +"type": "string" +}, +"isDefaultStream": { +"type": "boolean" +}, +"publishedAt": { +"description": "The date and time that the stream was created.", +"format": "date-time", +"type": "string" +}, +"title": { +"annotations": { +"required": [ +"youtube.liveStreams.insert", +"youtube.liveStreams.update" +] +}, +"description": "The stream's title. The value must be between 1 and 128 characters long.", +"type": "string" +} +}, +"type": "object" +}, +"LiveStreamStatus": { +"description": "Brief description of the live stream status.", +"id": "LiveStreamStatus", +"properties": { +"healthStatus": { +"$ref": "LiveStreamHealthStatus", +"description": "The health status of the stream." +}, +"streamStatus": { +"enum": [ +"created", +"ready", +"active", +"inactive", +"error" +], +"enumDescriptions": [ +"", +"", +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"LocalizedProperty": { +"id": "LocalizedProperty", +"properties": { +"default": { +"type": "string" +}, +"defaultLanguage": { +"$ref": "LanguageTag", +"description": "The language of the default property." +}, +"localized": { +"items": { +"$ref": "LocalizedString" +}, +"type": "array" +} +}, +"type": "object" +}, +"LocalizedString": { +"id": "LocalizedString", +"properties": { +"language": { +"type": "string" +}, +"value": { +"type": "string" +} +}, +"type": "object" +}, +"Member": { +"description": "A *member* resource represents a member for a YouTube channel. A member provides recurring monetary support to a creator and receives special benefits.", +"id": "Member", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"kind": { +"default": "youtube#member", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#member\".", +"type": "string" +}, +"snippet": { +"$ref": "MemberSnippet", +"description": "The snippet object contains basic details about the member." +} +}, +"type": "object" +}, +"MemberListResponse": { +"id": "MemberListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of members that match the request criteria.", +"items": { +"$ref": "Member" +}, +"type": "array" +}, +"kind": { +"default": "youtube#memberListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#memberListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"MemberSnippet": { +"id": "MemberSnippet", +"properties": { +"creatorChannelId": { +"description": "The id of the channel that's offering memberships.", +"type": "string" +}, +"memberDetails": { +"$ref": "ChannelProfileDetails", +"description": "Details about the member." +}, +"membershipsDetails": { +"$ref": "MembershipsDetails", +"description": "Details about the user's membership." +} +}, +"type": "object" +}, +"MembershipsDetails": { +"id": "MembershipsDetails", +"properties": { +"accessibleLevels": { +"description": "Ids of all levels that the user has access to. This includes the currently active level and all other levels that are included because of a higher purchase.", +"items": { +"type": "string" +}, +"type": "array" +}, +"highestAccessibleLevel": { +"description": "Id of the highest level that the user has access to at the moment.", +"type": "string" +}, +"highestAccessibleLevelDisplayName": { +"description": "Display name for the highest level that the user has access to at the moment.", +"type": "string" +}, +"membershipsDuration": { +"$ref": "MembershipsDuration", +"description": "Data about memberships duration without taking into consideration pricing levels." +}, +"membershipsDurationAtLevels": { +"description": "Data about memberships duration on particular pricing levels.", +"items": { +"$ref": "MembershipsDurationAtLevel" +}, +"type": "array" +} +}, +"type": "object" +}, +"MembershipsDuration": { +"id": "MembershipsDuration", +"properties": { +"memberSince": { +"description": "The date and time when the user became a continuous member across all levels.", +"type": "string" +}, +"memberTotalDurationMonths": { +"description": "The cumulative time the user has been a member across all levels in complete months (the time is rounded down to the nearest integer).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"MembershipsDurationAtLevel": { +"id": "MembershipsDurationAtLevel", +"properties": { +"level": { +"description": "Pricing level ID.", +"type": "string" +}, +"memberSince": { +"description": "The date and time when the user became a continuous member for the given level.", +"type": "string" +}, +"memberTotalDurationMonths": { +"description": "The cumulative time the user has been a member for the given level in complete months (the time is rounded down to the nearest integer).", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"MembershipsLevel": { +"description": "A *membershipsLevel* resource represents an offer made by YouTube creators for their fans. Users can become members of the channel by joining one of the available levels. They will provide recurring monetary support and receives special benefits.", +"id": "MembershipsLevel", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube assigns to uniquely identify the memberships level.", +"type": "string" +}, +"kind": { +"default": "youtube#membershipsLevel", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#membershipsLevelListResponse\".", +"type": "string" +}, +"snippet": { +"$ref": "MembershipsLevelSnippet", +"description": "The snippet object contains basic details about the level." +} +}, +"type": "object" +}, +"MembershipsLevelListResponse": { +"id": "MembershipsLevelListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of pricing levels offered by a creator to the fans.", +"items": { +"$ref": "MembershipsLevel" +}, +"type": "array" +}, +"kind": { +"default": "youtube#membershipsLevelListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#membershipsLevelListResponse\".", +"type": "string" +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"MembershipsLevelSnippet": { +"id": "MembershipsLevelSnippet", +"properties": { +"creatorChannelId": { +"description": "The id of the channel that's offering channel memberships.", +"type": "string" +}, +"levelDetails": { +"$ref": "LevelDetails", +"description": "Details about the pricing level." +} +}, +"type": "object" +}, +"MonitorStreamInfo": { +"description": "Settings and Info of the monitor stream", +"id": "MonitorStreamInfo", +"properties": { +"broadcastStreamDelayMs": { +"annotations": { +"required": [ +"youtube.liveBroadcasts.update" +] +}, +"description": "If you have set the enableMonitorStream property to true, then this property determines the length of the live broadcast delay.", +"format": "uint32", +"type": "integer" +}, +"embedHtml": { +"description": "HTML code that embeds a player that plays the monitor stream.", +"type": "string" +}, +"enableMonitorStream": { +"annotations": { +"required": [ +"youtube.liveBroadcasts.update" +] +}, +"description": "This value determines whether the monitor stream is enabled for the broadcast. If the monitor stream is enabled, then YouTube will broadcast the event content on a special stream intended only for the broadcaster's consumption. The broadcaster can use the stream to review the event content and also to identify the optimal times to insert cuepoints. You need to set this value to true if you intend to have a broadcast delay for your event. *Note:* This property cannot be updated once the broadcast is in the testing or live state.", +"type": "boolean" +} +}, +"type": "object" +}, +"PageInfo": { +"description": "Paging details for lists of resources, including total number of items available and number of resources returned in a single page.", +"id": "PageInfo", +"properties": { +"resultsPerPage": { +"description": "The number of results included in the API response.", +"format": "int32", +"type": "integer" +}, +"totalResults": { +"description": "The total number of results in the result set.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"Playlist": { +"description": "A *playlist* resource represents a YouTube playlist. A playlist is a collection of videos that can be viewed sequentially and shared with other users. A playlist can contain up to 200 videos, and YouTube does not limit the number of playlists that each user creates. By default, playlists are publicly visible to other users, but playlists can be public or private. YouTube also uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods.", +"id": "Playlist", +"properties": { +"contentDetails": { +"$ref": "PlaylistContentDetails", +"description": "The contentDetails object contains information like video count." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the playlist.", +"type": "string" +}, +"kind": { +"default": "youtube#playlist", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlist\".", +"type": "string" +}, +"localizations": { +"additionalProperties": { +"$ref": "PlaylistLocalization" +}, +"description": "Localizations for different languages", +"type": "object" +}, +"player": { +"$ref": "PlaylistPlayer", +"description": "The player object contains information that you would use to play the playlist in an embedded player." +}, +"snippet": { +"$ref": "PlaylistSnippet", +"description": "The snippet object contains basic details about the playlist, such as its title and description." +}, +"status": { +"$ref": "PlaylistStatus", +"description": "The status object contains status information for the playlist." +} +}, +"type": "object" +}, +"PlaylistContentDetails": { +"id": "PlaylistContentDetails", +"properties": { +"itemCount": { +"description": "The number of videos in the playlist.", +"format": "uint32", +"type": "integer" +} +}, +"type": "object" +}, +"PlaylistImage": { +"id": "PlaylistImage", +"properties": { +"id": { +"description": "Identifies this resource (playlist id and image type).", +"type": "string" +}, +"kind": { +"default": "youtube#playlistImage", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlistImages\".", +"type": "string" +}, +"snippet": { +"$ref": "PlaylistImageSnippet" +} +}, +"type": "object" +}, +"PlaylistImageListResponse": { +"id": "PlaylistImageListResponse", +"properties": { +"items": { +"items": { +"$ref": "PlaylistImage" +}, +"type": "array" +}, +"kind": { +"default": "youtube#playlistImageListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlistImageListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +} +}, +"type": "object" +}, +"PlaylistImageSnippet": { +"description": "A *playlistImage* resource identifies another resource, such as a image, that is associated with a playlist. In addition, the playlistImage resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. YouTube uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistImages.list method to retrieve image data for any of those playlists. You can also add or remove images from those lists by calling the playlistImages.insert and playlistImages.delete methods.", +"id": "PlaylistImageSnippet", +"properties": { +"height": { +"description": "The image height.", +"format": "int32", +"type": "integer" +}, +"playlistId": { +"description": "The Playlist ID of the playlist this image is associated with.", +"type": "string" +}, +"type": { +"description": "The image type.", +"enum": [ +"hero" +], +"enumDescriptions": [ +"The main image that will be used for this playlist." +], +"type": "string" +}, +"width": { +"description": "The image width.", +"format": "int32", +"type": "integer" +} +}, +"type": "object" +}, +"PlaylistItem": { +"description": "A *playlistItem* resource identifies another resource, such as a video, that is included in a playlist. In addition, the playlistItem resource contains details about the included resource that pertain specifically to how that resource is used in that playlist. YouTube uses playlists to identify special collections of videos for a channel, such as: - uploaded videos - favorite videos - positively rated (liked) videos - watch history - watch later To be more specific, these lists are associated with a channel, which is a collection of a person, group, or company's videos, playlists, and other YouTube information. You can retrieve the playlist IDs for each of these lists from the channel resource for a given channel. You can then use the playlistItems.list method to retrieve any of those lists. You can also add or remove items from those lists by calling the playlistItems.insert and playlistItems.delete methods. For example, if a user gives a positive rating to a video, you would insert that video into the liked videos playlist for that user's channel.", +"id": "PlaylistItem", +"properties": { +"contentDetails": { +"$ref": "PlaylistItemContentDetails", +"description": "The contentDetails object is included in the resource if the included item is a YouTube video. The object contains additional information about the video." +}, +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"id": { +"description": "The ID that YouTube uses to uniquely identify the playlist item.", +"type": "string" +}, +"kind": { +"default": "youtube#playlistItem", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlistItem\".", +"type": "string" +}, +"snippet": { +"$ref": "PlaylistItemSnippet", +"description": "The snippet object contains basic details about the playlist item, such as its title and position in the playlist." +}, +"status": { +"$ref": "PlaylistItemStatus", +"description": "The status object contains information about the playlist item's privacy status." +} +}, +"type": "object" +}, +"PlaylistItemContentDetails": { +"id": "PlaylistItemContentDetails", +"properties": { +"endAt": { +"deprecated": true, +"description": "The time, measured in seconds from the start of the video, when the video should stop playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) By default, assume that the video.endTime is the end of the video.", +"type": "string" +}, +"note": { +"description": "A user-generated note for this item.", +"type": "string" +}, +"startAt": { +"deprecated": true, +"description": "The time, measured in seconds from the start of the video, when the video should start playing. (The playlist owner can specify the times when the video should start and stop playing when the video is played in the context of the playlist.) The default value is 0.", +"type": "string" +}, +"videoId": { +"description": "The ID that YouTube uses to uniquely identify a video. To retrieve the video resource, set the id query parameter to this value in your API request.", +"type": "string" +}, +"videoPublishedAt": { +"description": "The date and time that the video was published to YouTube.", +"format": "date-time", +"type": "string" +} +}, +"type": "object" +}, +"PlaylistItemListResponse": { +"id": "PlaylistItemListResponse", +"properties": { +"etag": { +"type": "string" +}, +"eventId": { +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of playlist items that match the request criteria.", +"items": { +"$ref": "PlaylistItem" +}, +"type": "array" +}, +"kind": { +"default": "youtube#playlistItemListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlistItemListResponse\". Etag of this resource.", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +}, +"tokenPagination": { +"$ref": "TokenPagination" +}, +"visitorId": { +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"PlaylistItemSnippet": { +"description": "Basic details about a playlist, including title, description and thumbnails. Basic details of a YouTube Playlist item provided by the author. Next ID: 15", +"id": "PlaylistItemSnippet", +"properties": { +"channelId": { +"description": "The ID that YouTube uses to uniquely identify the user that added the item to the playlist.", +"type": "string" +}, +"channelTitle": { +"description": "Channel title for the channel that the playlist item belongs to.", +"type": "string" +}, +"description": { +"description": "The item's description.", +"type": "string" +}, +"playlistId": { +"annotations": { +"required": [ +"youtube.playlistItems.insert", +"youtube.playlistItems.update" +] +}, +"description": "The ID that YouTube uses to uniquely identify thGe playlist that the playlist item is in.", +"type": "string" +}, +"position": { +"description": "The order in which the item appears in the playlist. The value uses a zero-based index, so the first item has a position of 0, the second item has a position of 1, and so forth.", +"format": "uint32", +"type": "integer" +}, +"publishedAt": { +"description": "The date and time that the item was added to the playlist.", +"format": "date-time", +"type": "string" +}, +"resourceId": { +"$ref": "ResourceId", +"annotations": { +"required": [ +"youtube.playlistItems.insert", +"youtube.playlistItems.update" +] +}, +"description": "The id object contains information that can be used to uniquely identify the resource that is included in the playlist as the playlist item." +}, +"thumbnails": { +"$ref": "ThumbnailDetails", +"description": "A map of thumbnail images associated with the playlist item. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail." +}, +"title": { +"description": "The item's title.", +"type": "string" +}, +"videoOwnerChannelId": { +"description": "Channel id for the channel this video belongs to.", +"type": "string" +}, +"videoOwnerChannelTitle": { +"description": "Channel title for the channel this video belongs to.", +"type": "string" +} +}, +"type": "object" +}, +"PlaylistItemStatus": { +"description": "Information about the playlist item's privacy status.", +"id": "PlaylistItemStatus", +"properties": { +"privacyStatus": { +"description": "This resource's privacy status.", +"enum": [ +"public", +"unlisted", +"private" +], +"enumDescriptions": [ +"", +"", +"" +], +"type": "string" +} +}, +"type": "object" +}, +"PlaylistListResponse": { +"id": "PlaylistListResponse", +"properties": { +"etag": { +"description": "Etag of this resource.", +"type": "string" +}, +"eventId": { +"deprecated": true, +"description": "Serialized EventId of the request which produced this response.", +"type": "string" +}, +"items": { +"description": "A list of playlists that match the request criteria", +"items": { +"$ref": "Playlist" +}, +"type": "array" +}, +"kind": { +"default": "youtube#playlistListResponse", +"description": "Identifies what kind of resource this is. Value: the fixed string \"youtube#playlistListResponse\".", +"type": "string" +}, +"nextPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the next page in the result set.", +"type": "string" +}, +"pageInfo": { +"$ref": "PageInfo", +"description": "General pagination information." +}, +"prevPageToken": { +"description": "The token that can be used as the value of the pageToken parameter to retrieve the previous page in the result set.", +"type": "string" +}, +"tokenPagination": { +"$ref": "TokenPagination", +"deprecated": true +}, +"visitorId": { +"deprecated": true, +"description": "The visitorId identifies the visitor.", +"type": "string" +} +}, +"type": "object" +}, +"PlaylistLocalization": { +"description": "Playlist localization setting", +"id": "PlaylistLocalization", +"properties": { +"description": { +"description": "The localized strings for playlist's description.", +"type": "string" +}, +"title": { +"description": "The localized strings for playlist's title.", +"type": "string" +} +}, +"type": "object" +}, +"PlaylistPlayer": { +"id": "PlaylistPlayer", +"properties": { +"embedHtml": { +"description": "An